diff --git a/sdk/python/pulumi_azure/_inputs.py b/sdk/python/pulumi_azure/_inputs.py index 1d2a90eb1a..4b6f594135 100644 --- a/sdk/python/pulumi_azure/_inputs.py +++ b/sdk/python/pulumi_azure/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ @@ -40,30 +40,85 @@ def __init__(__self__, *, template_deployment: Optional[pulumi.Input['ProviderFeaturesTemplateDeploymentArgs']] = None, virtual_machine: Optional[pulumi.Input['ProviderFeaturesVirtualMachineArgs']] = None, virtual_machine_scale_set: Optional[pulumi.Input['ProviderFeaturesVirtualMachineScaleSetArgs']] = None): + ProviderFeaturesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management=api_management, + app_configuration=app_configuration, + application_insights=application_insights, + cognitive_account=cognitive_account, + key_vault=key_vault, + log_analytics_workspace=log_analytics_workspace, + managed_disk=managed_disk, + resource_group=resource_group, + subscription=subscription, + template_deployment=template_deployment, + virtual_machine=virtual_machine, + virtual_machine_scale_set=virtual_machine_scale_set, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management: Optional[pulumi.Input['ProviderFeaturesApiManagementArgs']] = None, + app_configuration: Optional[pulumi.Input['ProviderFeaturesAppConfigurationArgs']] = None, + application_insights: Optional[pulumi.Input['ProviderFeaturesApplicationInsightsArgs']] = None, + cognitive_account: Optional[pulumi.Input['ProviderFeaturesCognitiveAccountArgs']] = None, + key_vault: Optional[pulumi.Input['ProviderFeaturesKeyVaultArgs']] = None, + log_analytics_workspace: Optional[pulumi.Input['ProviderFeaturesLogAnalyticsWorkspaceArgs']] = None, + managed_disk: Optional[pulumi.Input['ProviderFeaturesManagedDiskArgs']] = None, + resource_group: Optional[pulumi.Input['ProviderFeaturesResourceGroupArgs']] = None, + subscription: Optional[pulumi.Input['ProviderFeaturesSubscriptionArgs']] = None, + template_deployment: Optional[pulumi.Input['ProviderFeaturesTemplateDeploymentArgs']] = None, + virtual_machine: Optional[pulumi.Input['ProviderFeaturesVirtualMachineArgs']] = None, + virtual_machine_scale_set: Optional[pulumi.Input['ProviderFeaturesVirtualMachineScaleSetArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management is None and 'apiManagement' in kwargs: + api_management = kwargs['apiManagement'] + if app_configuration is None and 'appConfiguration' in kwargs: + app_configuration = kwargs['appConfiguration'] + if application_insights is None and 'applicationInsights' in kwargs: + application_insights = kwargs['applicationInsights'] + if cognitive_account is None and 'cognitiveAccount' in kwargs: + cognitive_account = kwargs['cognitiveAccount'] + if key_vault is None and 'keyVault' in kwargs: + key_vault = kwargs['keyVault'] + if log_analytics_workspace is None and 'logAnalyticsWorkspace' in kwargs: + log_analytics_workspace = kwargs['logAnalyticsWorkspace'] + if managed_disk is None and 'managedDisk' in kwargs: + managed_disk = kwargs['managedDisk'] + if resource_group is None and 'resourceGroup' in kwargs: + resource_group = kwargs['resourceGroup'] + if template_deployment is None and 'templateDeployment' in kwargs: + template_deployment = kwargs['templateDeployment'] + if virtual_machine is None and 'virtualMachine' in kwargs: + virtual_machine = kwargs['virtualMachine'] + if virtual_machine_scale_set is None and 'virtualMachineScaleSet' in kwargs: + virtual_machine_scale_set = kwargs['virtualMachineScaleSet'] + if api_management is not None: - pulumi.set(__self__, "api_management", api_management) + _setter("api_management", api_management) if app_configuration is not None: - pulumi.set(__self__, "app_configuration", app_configuration) + _setter("app_configuration", app_configuration) if application_insights is not None: - pulumi.set(__self__, "application_insights", application_insights) + _setter("application_insights", application_insights) if cognitive_account is not None: - pulumi.set(__self__, "cognitive_account", cognitive_account) + _setter("cognitive_account", cognitive_account) if key_vault is not None: - pulumi.set(__self__, "key_vault", key_vault) + _setter("key_vault", key_vault) if log_analytics_workspace is not None: - pulumi.set(__self__, "log_analytics_workspace", log_analytics_workspace) + _setter("log_analytics_workspace", log_analytics_workspace) if managed_disk is not None: - pulumi.set(__self__, "managed_disk", managed_disk) + _setter("managed_disk", managed_disk) if resource_group is not None: - pulumi.set(__self__, "resource_group", resource_group) + _setter("resource_group", resource_group) if subscription is not None: - pulumi.set(__self__, "subscription", subscription) + _setter("subscription", subscription) if template_deployment is not None: - pulumi.set(__self__, "template_deployment", template_deployment) + _setter("template_deployment", template_deployment) if virtual_machine is not None: - pulumi.set(__self__, "virtual_machine", virtual_machine) + _setter("virtual_machine", virtual_machine) if virtual_machine_scale_set is not None: - pulumi.set(__self__, "virtual_machine_scale_set", virtual_machine_scale_set) + _setter("virtual_machine_scale_set", virtual_machine_scale_set) @property @pulumi.getter(name="apiManagement") @@ -179,10 +234,27 @@ class ProviderFeaturesApiManagementArgs: def __init__(__self__, *, purge_soft_delete_on_destroy: Optional[pulumi.Input[bool]] = None, recover_soft_deleted: Optional[pulumi.Input[bool]] = None): + ProviderFeaturesApiManagementArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + purge_soft_delete_on_destroy=purge_soft_delete_on_destroy, + recover_soft_deleted=recover_soft_deleted, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + purge_soft_delete_on_destroy: Optional[pulumi.Input[bool]] = None, + recover_soft_deleted: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if purge_soft_delete_on_destroy is None and 'purgeSoftDeleteOnDestroy' in kwargs: + purge_soft_delete_on_destroy = kwargs['purgeSoftDeleteOnDestroy'] + if recover_soft_deleted is None and 'recoverSoftDeleted' in kwargs: + recover_soft_deleted = kwargs['recoverSoftDeleted'] + if purge_soft_delete_on_destroy is not None: - pulumi.set(__self__, "purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) + _setter("purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) if recover_soft_deleted is not None: - pulumi.set(__self__, "recover_soft_deleted", recover_soft_deleted) + _setter("recover_soft_deleted", recover_soft_deleted) @property @pulumi.getter(name="purgeSoftDeleteOnDestroy") @@ -208,10 +280,27 @@ class ProviderFeaturesAppConfigurationArgs: def __init__(__self__, *, purge_soft_delete_on_destroy: Optional[pulumi.Input[bool]] = None, recover_soft_deleted: Optional[pulumi.Input[bool]] = None): + ProviderFeaturesAppConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + purge_soft_delete_on_destroy=purge_soft_delete_on_destroy, + recover_soft_deleted=recover_soft_deleted, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + purge_soft_delete_on_destroy: Optional[pulumi.Input[bool]] = None, + recover_soft_deleted: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if purge_soft_delete_on_destroy is None and 'purgeSoftDeleteOnDestroy' in kwargs: + purge_soft_delete_on_destroy = kwargs['purgeSoftDeleteOnDestroy'] + if recover_soft_deleted is None and 'recoverSoftDeleted' in kwargs: + recover_soft_deleted = kwargs['recoverSoftDeleted'] + if purge_soft_delete_on_destroy is not None: - pulumi.set(__self__, "purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) + _setter("purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) if recover_soft_deleted is not None: - pulumi.set(__self__, "recover_soft_deleted", recover_soft_deleted) + _setter("recover_soft_deleted", recover_soft_deleted) @property @pulumi.getter(name="purgeSoftDeleteOnDestroy") @@ -236,8 +325,21 @@ def recover_soft_deleted(self, value: Optional[pulumi.Input[bool]]): class ProviderFeaturesApplicationInsightsArgs: def __init__(__self__, *, disable_generated_rule: Optional[pulumi.Input[bool]] = None): + ProviderFeaturesApplicationInsightsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disable_generated_rule=disable_generated_rule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disable_generated_rule: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disable_generated_rule is None and 'disableGeneratedRule' in kwargs: + disable_generated_rule = kwargs['disableGeneratedRule'] + if disable_generated_rule is not None: - pulumi.set(__self__, "disable_generated_rule", disable_generated_rule) + _setter("disable_generated_rule", disable_generated_rule) @property @pulumi.getter(name="disableGeneratedRule") @@ -253,8 +355,21 @@ def disable_generated_rule(self, value: Optional[pulumi.Input[bool]]): class ProviderFeaturesCognitiveAccountArgs: def __init__(__self__, *, purge_soft_delete_on_destroy: Optional[pulumi.Input[bool]] = None): + ProviderFeaturesCognitiveAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + purge_soft_delete_on_destroy=purge_soft_delete_on_destroy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + purge_soft_delete_on_destroy: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if purge_soft_delete_on_destroy is None and 'purgeSoftDeleteOnDestroy' in kwargs: + purge_soft_delete_on_destroy = kwargs['purgeSoftDeleteOnDestroy'] + if purge_soft_delete_on_destroy is not None: - pulumi.set(__self__, "purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) + _setter("purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) @property @pulumi.getter(name="purgeSoftDeleteOnDestroy") @@ -278,24 +393,69 @@ def __init__(__self__, *, recover_soft_deleted_key_vaults: Optional[pulumi.Input[bool]] = None, recover_soft_deleted_keys: Optional[pulumi.Input[bool]] = None, recover_soft_deleted_secrets: Optional[pulumi.Input[bool]] = None): + ProviderFeaturesKeyVaultArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + purge_soft_delete_on_destroy=purge_soft_delete_on_destroy, + purge_soft_deleted_certificates_on_destroy=purge_soft_deleted_certificates_on_destroy, + purge_soft_deleted_hardware_security_modules_on_destroy=purge_soft_deleted_hardware_security_modules_on_destroy, + purge_soft_deleted_keys_on_destroy=purge_soft_deleted_keys_on_destroy, + purge_soft_deleted_secrets_on_destroy=purge_soft_deleted_secrets_on_destroy, + recover_soft_deleted_certificates=recover_soft_deleted_certificates, + recover_soft_deleted_key_vaults=recover_soft_deleted_key_vaults, + recover_soft_deleted_keys=recover_soft_deleted_keys, + recover_soft_deleted_secrets=recover_soft_deleted_secrets, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + purge_soft_delete_on_destroy: Optional[pulumi.Input[bool]] = None, + purge_soft_deleted_certificates_on_destroy: Optional[pulumi.Input[bool]] = None, + purge_soft_deleted_hardware_security_modules_on_destroy: Optional[pulumi.Input[bool]] = None, + purge_soft_deleted_keys_on_destroy: Optional[pulumi.Input[bool]] = None, + purge_soft_deleted_secrets_on_destroy: Optional[pulumi.Input[bool]] = None, + recover_soft_deleted_certificates: Optional[pulumi.Input[bool]] = None, + recover_soft_deleted_key_vaults: Optional[pulumi.Input[bool]] = None, + recover_soft_deleted_keys: Optional[pulumi.Input[bool]] = None, + recover_soft_deleted_secrets: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if purge_soft_delete_on_destroy is None and 'purgeSoftDeleteOnDestroy' in kwargs: + purge_soft_delete_on_destroy = kwargs['purgeSoftDeleteOnDestroy'] + if purge_soft_deleted_certificates_on_destroy is None and 'purgeSoftDeletedCertificatesOnDestroy' in kwargs: + purge_soft_deleted_certificates_on_destroy = kwargs['purgeSoftDeletedCertificatesOnDestroy'] + if purge_soft_deleted_hardware_security_modules_on_destroy is None and 'purgeSoftDeletedHardwareSecurityModulesOnDestroy' in kwargs: + purge_soft_deleted_hardware_security_modules_on_destroy = kwargs['purgeSoftDeletedHardwareSecurityModulesOnDestroy'] + if purge_soft_deleted_keys_on_destroy is None and 'purgeSoftDeletedKeysOnDestroy' in kwargs: + purge_soft_deleted_keys_on_destroy = kwargs['purgeSoftDeletedKeysOnDestroy'] + if purge_soft_deleted_secrets_on_destroy is None and 'purgeSoftDeletedSecretsOnDestroy' in kwargs: + purge_soft_deleted_secrets_on_destroy = kwargs['purgeSoftDeletedSecretsOnDestroy'] + if recover_soft_deleted_certificates is None and 'recoverSoftDeletedCertificates' in kwargs: + recover_soft_deleted_certificates = kwargs['recoverSoftDeletedCertificates'] + if recover_soft_deleted_key_vaults is None and 'recoverSoftDeletedKeyVaults' in kwargs: + recover_soft_deleted_key_vaults = kwargs['recoverSoftDeletedKeyVaults'] + if recover_soft_deleted_keys is None and 'recoverSoftDeletedKeys' in kwargs: + recover_soft_deleted_keys = kwargs['recoverSoftDeletedKeys'] + if recover_soft_deleted_secrets is None and 'recoverSoftDeletedSecrets' in kwargs: + recover_soft_deleted_secrets = kwargs['recoverSoftDeletedSecrets'] + if purge_soft_delete_on_destroy is not None: - pulumi.set(__self__, "purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) + _setter("purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) if purge_soft_deleted_certificates_on_destroy is not None: - pulumi.set(__self__, "purge_soft_deleted_certificates_on_destroy", purge_soft_deleted_certificates_on_destroy) + _setter("purge_soft_deleted_certificates_on_destroy", purge_soft_deleted_certificates_on_destroy) if purge_soft_deleted_hardware_security_modules_on_destroy is not None: - pulumi.set(__self__, "purge_soft_deleted_hardware_security_modules_on_destroy", purge_soft_deleted_hardware_security_modules_on_destroy) + _setter("purge_soft_deleted_hardware_security_modules_on_destroy", purge_soft_deleted_hardware_security_modules_on_destroy) if purge_soft_deleted_keys_on_destroy is not None: - pulumi.set(__self__, "purge_soft_deleted_keys_on_destroy", purge_soft_deleted_keys_on_destroy) + _setter("purge_soft_deleted_keys_on_destroy", purge_soft_deleted_keys_on_destroy) if purge_soft_deleted_secrets_on_destroy is not None: - pulumi.set(__self__, "purge_soft_deleted_secrets_on_destroy", purge_soft_deleted_secrets_on_destroy) + _setter("purge_soft_deleted_secrets_on_destroy", purge_soft_deleted_secrets_on_destroy) if recover_soft_deleted_certificates is not None: - pulumi.set(__self__, "recover_soft_deleted_certificates", recover_soft_deleted_certificates) + _setter("recover_soft_deleted_certificates", recover_soft_deleted_certificates) if recover_soft_deleted_key_vaults is not None: - pulumi.set(__self__, "recover_soft_deleted_key_vaults", recover_soft_deleted_key_vaults) + _setter("recover_soft_deleted_key_vaults", recover_soft_deleted_key_vaults) if recover_soft_deleted_keys is not None: - pulumi.set(__self__, "recover_soft_deleted_keys", recover_soft_deleted_keys) + _setter("recover_soft_deleted_keys", recover_soft_deleted_keys) if recover_soft_deleted_secrets is not None: - pulumi.set(__self__, "recover_soft_deleted_secrets", recover_soft_deleted_secrets) + _setter("recover_soft_deleted_secrets", recover_soft_deleted_secrets) @property @pulumi.getter(name="purgeSoftDeleteOnDestroy") @@ -383,8 +543,21 @@ def recover_soft_deleted_secrets(self, value: Optional[pulumi.Input[bool]]): class ProviderFeaturesLogAnalyticsWorkspaceArgs: def __init__(__self__, *, permanently_delete_on_destroy: Optional[pulumi.Input[bool]] = None): + ProviderFeaturesLogAnalyticsWorkspaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + permanently_delete_on_destroy=permanently_delete_on_destroy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + permanently_delete_on_destroy: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if permanently_delete_on_destroy is None and 'permanentlyDeleteOnDestroy' in kwargs: + permanently_delete_on_destroy = kwargs['permanentlyDeleteOnDestroy'] + if permanently_delete_on_destroy is not None: - pulumi.set(__self__, "permanently_delete_on_destroy", permanently_delete_on_destroy) + _setter("permanently_delete_on_destroy", permanently_delete_on_destroy) @property @pulumi.getter(name="permanentlyDeleteOnDestroy") @@ -400,8 +573,21 @@ def permanently_delete_on_destroy(self, value: Optional[pulumi.Input[bool]]): class ProviderFeaturesManagedDiskArgs: def __init__(__self__, *, expand_without_downtime: Optional[pulumi.Input[bool]] = None): + ProviderFeaturesManagedDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + expand_without_downtime=expand_without_downtime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expand_without_downtime: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expand_without_downtime is None and 'expandWithoutDowntime' in kwargs: + expand_without_downtime = kwargs['expandWithoutDowntime'] + if expand_without_downtime is not None: - pulumi.set(__self__, "expand_without_downtime", expand_without_downtime) + _setter("expand_without_downtime", expand_without_downtime) @property @pulumi.getter(name="expandWithoutDowntime") @@ -417,8 +603,21 @@ def expand_without_downtime(self, value: Optional[pulumi.Input[bool]]): class ProviderFeaturesResourceGroupArgs: def __init__(__self__, *, prevent_deletion_if_contains_resources: Optional[pulumi.Input[bool]] = None): + ProviderFeaturesResourceGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + prevent_deletion_if_contains_resources=prevent_deletion_if_contains_resources, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + prevent_deletion_if_contains_resources: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if prevent_deletion_if_contains_resources is None and 'preventDeletionIfContainsResources' in kwargs: + prevent_deletion_if_contains_resources = kwargs['preventDeletionIfContainsResources'] + if prevent_deletion_if_contains_resources is not None: - pulumi.set(__self__, "prevent_deletion_if_contains_resources", prevent_deletion_if_contains_resources) + _setter("prevent_deletion_if_contains_resources", prevent_deletion_if_contains_resources) @property @pulumi.getter(name="preventDeletionIfContainsResources") @@ -434,8 +633,21 @@ def prevent_deletion_if_contains_resources(self, value: Optional[pulumi.Input[bo class ProviderFeaturesSubscriptionArgs: def __init__(__self__, *, prevent_cancellation_on_destroy: Optional[pulumi.Input[bool]] = None): + ProviderFeaturesSubscriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + prevent_cancellation_on_destroy=prevent_cancellation_on_destroy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + prevent_cancellation_on_destroy: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if prevent_cancellation_on_destroy is None and 'preventCancellationOnDestroy' in kwargs: + prevent_cancellation_on_destroy = kwargs['preventCancellationOnDestroy'] + if prevent_cancellation_on_destroy is not None: - pulumi.set(__self__, "prevent_cancellation_on_destroy", prevent_cancellation_on_destroy) + _setter("prevent_cancellation_on_destroy", prevent_cancellation_on_destroy) @property @pulumi.getter(name="preventCancellationOnDestroy") @@ -451,7 +663,22 @@ def prevent_cancellation_on_destroy(self, value: Optional[pulumi.Input[bool]]): class ProviderFeaturesTemplateDeploymentArgs: def __init__(__self__, *, delete_nested_items_during_deletion: pulumi.Input[bool]): - pulumi.set(__self__, "delete_nested_items_during_deletion", delete_nested_items_during_deletion) + ProviderFeaturesTemplateDeploymentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + delete_nested_items_during_deletion=delete_nested_items_during_deletion, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + delete_nested_items_during_deletion: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if delete_nested_items_during_deletion is None and 'deleteNestedItemsDuringDeletion' in kwargs: + delete_nested_items_during_deletion = kwargs['deleteNestedItemsDuringDeletion'] + if delete_nested_items_during_deletion is None: + raise TypeError("Missing 'delete_nested_items_during_deletion' argument") + + _setter("delete_nested_items_during_deletion", delete_nested_items_during_deletion) @property @pulumi.getter(name="deleteNestedItemsDuringDeletion") @@ -469,12 +696,33 @@ def __init__(__self__, *, delete_os_disk_on_deletion: Optional[pulumi.Input[bool]] = None, graceful_shutdown: Optional[pulumi.Input[bool]] = None, skip_shutdown_and_force_delete: Optional[pulumi.Input[bool]] = None): + ProviderFeaturesVirtualMachineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + delete_os_disk_on_deletion=delete_os_disk_on_deletion, + graceful_shutdown=graceful_shutdown, + skip_shutdown_and_force_delete=skip_shutdown_and_force_delete, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + delete_os_disk_on_deletion: Optional[pulumi.Input[bool]] = None, + graceful_shutdown: Optional[pulumi.Input[bool]] = None, + skip_shutdown_and_force_delete: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if delete_os_disk_on_deletion is None and 'deleteOsDiskOnDeletion' in kwargs: + delete_os_disk_on_deletion = kwargs['deleteOsDiskOnDeletion'] + if graceful_shutdown is None and 'gracefulShutdown' in kwargs: + graceful_shutdown = kwargs['gracefulShutdown'] + if skip_shutdown_and_force_delete is None and 'skipShutdownAndForceDelete' in kwargs: + skip_shutdown_and_force_delete = kwargs['skipShutdownAndForceDelete'] + if delete_os_disk_on_deletion is not None: - pulumi.set(__self__, "delete_os_disk_on_deletion", delete_os_disk_on_deletion) + _setter("delete_os_disk_on_deletion", delete_os_disk_on_deletion) if graceful_shutdown is not None: - pulumi.set(__self__, "graceful_shutdown", graceful_shutdown) + _setter("graceful_shutdown", graceful_shutdown) if skip_shutdown_and_force_delete is not None: - pulumi.set(__self__, "skip_shutdown_and_force_delete", skip_shutdown_and_force_delete) + _setter("skip_shutdown_and_force_delete", skip_shutdown_and_force_delete) @property @pulumi.getter(name="deleteOsDiskOnDeletion") @@ -510,12 +758,33 @@ def __init__(__self__, *, force_delete: Optional[pulumi.Input[bool]] = None, roll_instances_when_required: Optional[pulumi.Input[bool]] = None, scale_to_zero_before_deletion: Optional[pulumi.Input[bool]] = None): + ProviderFeaturesVirtualMachineScaleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + force_delete=force_delete, + roll_instances_when_required=roll_instances_when_required, + scale_to_zero_before_deletion=scale_to_zero_before_deletion, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + force_delete: Optional[pulumi.Input[bool]] = None, + roll_instances_when_required: Optional[pulumi.Input[bool]] = None, + scale_to_zero_before_deletion: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if force_delete is None and 'forceDelete' in kwargs: + force_delete = kwargs['forceDelete'] + if roll_instances_when_required is None and 'rollInstancesWhenRequired' in kwargs: + roll_instances_when_required = kwargs['rollInstancesWhenRequired'] + if scale_to_zero_before_deletion is None and 'scaleToZeroBeforeDeletion' in kwargs: + scale_to_zero_before_deletion = kwargs['scaleToZeroBeforeDeletion'] + if force_delete is not None: - pulumi.set(__self__, "force_delete", force_delete) + _setter("force_delete", force_delete) if roll_instances_when_required is not None: - pulumi.set(__self__, "roll_instances_when_required", roll_instances_when_required) + _setter("roll_instances_when_required", roll_instances_when_required) if scale_to_zero_before_deletion is not None: - pulumi.set(__self__, "scale_to_zero_before_deletion", scale_to_zero_before_deletion) + _setter("scale_to_zero_before_deletion", scale_to_zero_before_deletion) @property @pulumi.getter(name="forceDelete") diff --git a/sdk/python/pulumi_azure/aadb2c/directory.py b/sdk/python/pulumi_azure/aadb2c/directory.py index 1aef7fd574..8e828f1c1c 100644 --- a/sdk/python/pulumi_azure/aadb2c/directory.py +++ b/sdk/python/pulumi_azure/aadb2c/directory.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DirectoryArgs', 'Directory'] @@ -31,16 +31,59 @@ def __init__(__self__, *, :param pulumi.Input[str] display_name: The initial display name of the B2C tenant. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the AAD B2C Directory. """ - pulumi.set(__self__, "data_residency_location", data_residency_location) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + DirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_residency_location=data_residency_location, + domain_name=domain_name, + resource_group_name=resource_group_name, + sku_name=sku_name, + country_code=country_code, + display_name=display_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_residency_location: Optional[pulumi.Input[str]] = None, + domain_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + country_code: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_residency_location is None and 'dataResidencyLocation' in kwargs: + data_residency_location = kwargs['dataResidencyLocation'] + if data_residency_location is None: + raise TypeError("Missing 'data_residency_location' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if country_code is None and 'countryCode' in kwargs: + country_code = kwargs['countryCode'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + + _setter("data_residency_location", data_residency_location) + _setter("domain_name", domain_name) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if country_code is not None: - pulumi.set(__self__, "country_code", country_code) + _setter("country_code", country_code) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dataResidencyLocation") @@ -153,26 +196,73 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the AAD B2C Directory. :param pulumi.Input[str] tenant_id: The Tenant ID for the AAD B2C tenant. """ + _DirectoryState._configure( + lambda key, value: pulumi.set(__self__, key, value), + billing_type=billing_type, + country_code=country_code, + data_residency_location=data_residency_location, + display_name=display_name, + domain_name=domain_name, + effective_start_date=effective_start_date, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + billing_type: Optional[pulumi.Input[str]] = None, + country_code: Optional[pulumi.Input[str]] = None, + data_residency_location: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + domain_name: Optional[pulumi.Input[str]] = None, + effective_start_date: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if billing_type is None and 'billingType' in kwargs: + billing_type = kwargs['billingType'] + if country_code is None and 'countryCode' in kwargs: + country_code = kwargs['countryCode'] + if data_residency_location is None and 'dataResidencyLocation' in kwargs: + data_residency_location = kwargs['dataResidencyLocation'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if effective_start_date is None and 'effectiveStartDate' in kwargs: + effective_start_date = kwargs['effectiveStartDate'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if billing_type is not None: - pulumi.set(__self__, "billing_type", billing_type) + _setter("billing_type", billing_type) if country_code is not None: - pulumi.set(__self__, "country_code", country_code) + _setter("country_code", country_code) if data_residency_location is not None: - pulumi.set(__self__, "data_residency_location", data_residency_location) + _setter("data_residency_location", data_residency_location) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if domain_name is not None: - pulumi.set(__self__, "domain_name", domain_name) + _setter("domain_name", domain_name) if effective_start_date is not None: - pulumi.set(__self__, "effective_start_date", effective_start_date) + _setter("effective_start_date", effective_start_date) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="billingType") @@ -386,6 +476,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DirectoryArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/aadb2c/get_directory.py b/sdk/python/pulumi_azure/aadb2c/get_directory.py index 1ff8f31ae6..7a8e4233a0 100644 --- a/sdk/python/pulumi_azure/aadb2c/get_directory.py +++ b/sdk/python/pulumi_azure/aadb2c/get_directory.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/advisor/get_recommendations.py b/sdk/python/pulumi_azure/advisor/get_recommendations.py index bf55a6524e..9023034e97 100644 --- a/sdk/python/pulumi_azure/advisor/get_recommendations.py +++ b/sdk/python/pulumi_azure/advisor/get_recommendations.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/advisor/outputs.py b/sdk/python/pulumi_azure/advisor/outputs.py index 8d9fee7614..5e48c481ea 100644 --- a/sdk/python/pulumi_azure/advisor/outputs.py +++ b/sdk/python/pulumi_azure/advisor/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -36,15 +36,72 @@ def __init__(__self__, *, :param Sequence[str] suppression_names: A list of Advisor Suppression names of the Advisor Recommendation. :param str updated_time: The most recent time that Advisor checked the validity of the recommendation.. """ - pulumi.set(__self__, "category", category) - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "impact", impact) - pulumi.set(__self__, "recommendation_name", recommendation_name) - pulumi.set(__self__, "recommendation_type_id", recommendation_type_id) - pulumi.set(__self__, "resource_name", resource_name) - pulumi.set(__self__, "resource_type", resource_type) - pulumi.set(__self__, "suppression_names", suppression_names) - pulumi.set(__self__, "updated_time", updated_time) + GetRecommendationsRecommendationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + description=description, + impact=impact, + recommendation_name=recommendation_name, + recommendation_type_id=recommendation_type_id, + resource_name=resource_name, + resource_type=resource_type, + suppression_names=suppression_names, + updated_time=updated_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[str] = None, + description: Optional[str] = None, + impact: Optional[str] = None, + recommendation_name: Optional[str] = None, + recommendation_type_id: Optional[str] = None, + resource_name: Optional[str] = None, + resource_type: Optional[str] = None, + suppression_names: Optional[Sequence[str]] = None, + updated_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category is None: + raise TypeError("Missing 'category' argument") + if description is None: + raise TypeError("Missing 'description' argument") + if impact is None: + raise TypeError("Missing 'impact' argument") + if recommendation_name is None and 'recommendationName' in kwargs: + recommendation_name = kwargs['recommendationName'] + if recommendation_name is None: + raise TypeError("Missing 'recommendation_name' argument") + if recommendation_type_id is None and 'recommendationTypeId' in kwargs: + recommendation_type_id = kwargs['recommendationTypeId'] + if recommendation_type_id is None: + raise TypeError("Missing 'recommendation_type_id' argument") + if resource_name is None and 'resourceName' in kwargs: + resource_name = kwargs['resourceName'] + if resource_name is None: + raise TypeError("Missing 'resource_name' argument") + if resource_type is None and 'resourceType' in kwargs: + resource_type = kwargs['resourceType'] + if resource_type is None: + raise TypeError("Missing 'resource_type' argument") + if suppression_names is None and 'suppressionNames' in kwargs: + suppression_names = kwargs['suppressionNames'] + if suppression_names is None: + raise TypeError("Missing 'suppression_names' argument") + if updated_time is None and 'updatedTime' in kwargs: + updated_time = kwargs['updatedTime'] + if updated_time is None: + raise TypeError("Missing 'updated_time' argument") + + _setter("category", category) + _setter("description", description) + _setter("impact", impact) + _setter("recommendation_name", recommendation_name) + _setter("recommendation_type_id", recommendation_type_id) + _setter("resource_name", resource_name) + _setter("resource_type", resource_type) + _setter("suppression_names", suppression_names) + _setter("updated_time", updated_time) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/analysisservices/_inputs.py b/sdk/python/pulumi_azure/analysisservices/_inputs.py index ce3c815438..1707e7c57b 100644 --- a/sdk/python/pulumi_azure/analysisservices/_inputs.py +++ b/sdk/python/pulumi_azure/analysisservices/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -24,9 +24,34 @@ def __init__(__self__, *, :param pulumi.Input[str] range_end: End of the firewall rule range as IPv4 address. :param pulumi.Input[str] range_start: Start of the firewall rule range as IPv4 address. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "range_end", range_end) - pulumi.set(__self__, "range_start", range_start) + ServerIpv4FirewallRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + range_end=range_end, + range_start=range_start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + range_end: Optional[pulumi.Input[str]] = None, + range_start: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if range_end is None and 'rangeEnd' in kwargs: + range_end = kwargs['rangeEnd'] + if range_end is None: + raise TypeError("Missing 'range_end' argument") + if range_start is None and 'rangeStart' in kwargs: + range_start = kwargs['rangeStart'] + if range_start is None: + raise TypeError("Missing 'range_start' argument") + + _setter("name", name) + _setter("range_end", range_end) + _setter("range_start", range_start) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/analysisservices/outputs.py b/sdk/python/pulumi_azure/analysisservices/outputs.py index 9aabb5966d..d921c4a23f 100644 --- a/sdk/python/pulumi_azure/analysisservices/outputs.py +++ b/sdk/python/pulumi_azure/analysisservices/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -43,9 +43,34 @@ def __init__(__self__, *, :param str range_end: End of the firewall rule range as IPv4 address. :param str range_start: Start of the firewall rule range as IPv4 address. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "range_end", range_end) - pulumi.set(__self__, "range_start", range_start) + ServerIpv4FirewallRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + range_end=range_end, + range_start=range_start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + range_end: Optional[str] = None, + range_start: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if range_end is None and 'rangeEnd' in kwargs: + range_end = kwargs['rangeEnd'] + if range_end is None: + raise TypeError("Missing 'range_end' argument") + if range_start is None and 'rangeStart' in kwargs: + range_start = kwargs['rangeStart'] + if range_start is None: + raise TypeError("Missing 'range_start' argument") + + _setter("name", name) + _setter("range_end", range_end) + _setter("range_start", range_start) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/analysisservices/server.py b/sdk/python/pulumi_azure/analysisservices/server.py index e33153001d..c0aaf4a222 100644 --- a/sdk/python/pulumi_azure/analysisservices/server.py +++ b/sdk/python/pulumi_azure/analysisservices/server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,24 +39,69 @@ def __init__(__self__, *, :param pulumi.Input[str] querypool_connection_mode: Controls how the read-write server is used in the query pool. If this value is set to `All` then read-write servers are also used for queries. Otherwise with `ReadOnly` these servers do not participate in query operations. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + ServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + admin_users=admin_users, + backup_blob_container_uri=backup_blob_container_uri, + enable_power_bi_service=enable_power_bi_service, + ipv4_firewall_rules=ipv4_firewall_rules, + location=location, + name=name, + querypool_connection_mode=querypool_connection_mode, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + admin_users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + backup_blob_container_uri: Optional[pulumi.Input[str]] = None, + enable_power_bi_service: Optional[pulumi.Input[bool]] = None, + ipv4_firewall_rules: Optional[pulumi.Input[Sequence[pulumi.Input['ServerIpv4FirewallRuleArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + querypool_connection_mode: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if admin_users is None and 'adminUsers' in kwargs: + admin_users = kwargs['adminUsers'] + if backup_blob_container_uri is None and 'backupBlobContainerUri' in kwargs: + backup_blob_container_uri = kwargs['backupBlobContainerUri'] + if enable_power_bi_service is None and 'enablePowerBiService' in kwargs: + enable_power_bi_service = kwargs['enablePowerBiService'] + if ipv4_firewall_rules is None and 'ipv4FirewallRules' in kwargs: + ipv4_firewall_rules = kwargs['ipv4FirewallRules'] + if querypool_connection_mode is None and 'querypoolConnectionMode' in kwargs: + querypool_connection_mode = kwargs['querypoolConnectionMode'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if admin_users is not None: - pulumi.set(__self__, "admin_users", admin_users) + _setter("admin_users", admin_users) if backup_blob_container_uri is not None: - pulumi.set(__self__, "backup_blob_container_uri", backup_blob_container_uri) + _setter("backup_blob_container_uri", backup_blob_container_uri) if enable_power_bi_service is not None: - pulumi.set(__self__, "enable_power_bi_service", enable_power_bi_service) + _setter("enable_power_bi_service", enable_power_bi_service) if ipv4_firewall_rules is not None: - pulumi.set(__self__, "ipv4_firewall_rules", ipv4_firewall_rules) + _setter("ipv4_firewall_rules", ipv4_firewall_rules) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if querypool_connection_mode is not None: - pulumi.set(__self__, "querypool_connection_mode", querypool_connection_mode) + _setter("querypool_connection_mode", querypool_connection_mode) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -207,28 +252,73 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: SKU for the Analysis Services Server. Possible values are: `D1`, `B1`, `B2`, `S0`, `S1`, `S2`, `S4`, `S8`, `S9`, `S8v2` and `S9v2`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ServerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_users=admin_users, + backup_blob_container_uri=backup_blob_container_uri, + enable_power_bi_service=enable_power_bi_service, + ipv4_firewall_rules=ipv4_firewall_rules, + location=location, + name=name, + querypool_connection_mode=querypool_connection_mode, + resource_group_name=resource_group_name, + server_full_name=server_full_name, + sku=sku, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + backup_blob_container_uri: Optional[pulumi.Input[str]] = None, + enable_power_bi_service: Optional[pulumi.Input[bool]] = None, + ipv4_firewall_rules: Optional[pulumi.Input[Sequence[pulumi.Input['ServerIpv4FirewallRuleArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + querypool_connection_mode: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_full_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_users is None and 'adminUsers' in kwargs: + admin_users = kwargs['adminUsers'] + if backup_blob_container_uri is None and 'backupBlobContainerUri' in kwargs: + backup_blob_container_uri = kwargs['backupBlobContainerUri'] + if enable_power_bi_service is None and 'enablePowerBiService' in kwargs: + enable_power_bi_service = kwargs['enablePowerBiService'] + if ipv4_firewall_rules is None and 'ipv4FirewallRules' in kwargs: + ipv4_firewall_rules = kwargs['ipv4FirewallRules'] + if querypool_connection_mode is None and 'querypoolConnectionMode' in kwargs: + querypool_connection_mode = kwargs['querypoolConnectionMode'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_full_name is None and 'serverFullName' in kwargs: + server_full_name = kwargs['serverFullName'] + if admin_users is not None: - pulumi.set(__self__, "admin_users", admin_users) + _setter("admin_users", admin_users) if backup_blob_container_uri is not None: - pulumi.set(__self__, "backup_blob_container_uri", backup_blob_container_uri) + _setter("backup_blob_container_uri", backup_blob_container_uri) if enable_power_bi_service is not None: - pulumi.set(__self__, "enable_power_bi_service", enable_power_bi_service) + _setter("enable_power_bi_service", enable_power_bi_service) if ipv4_firewall_rules is not None: - pulumi.set(__self__, "ipv4_firewall_rules", ipv4_firewall_rules) + _setter("ipv4_firewall_rules", ipv4_firewall_rules) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if querypool_connection_mode is not None: - pulumi.set(__self__, "querypool_connection_mode", querypool_connection_mode) + _setter("querypool_connection_mode", querypool_connection_mode) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_full_name is not None: - pulumi.set(__self__, "server_full_name", server_full_name) + _setter("server_full_name", server_full_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="adminUsers") @@ -480,6 +570,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/_inputs.py b/sdk/python/pulumi_azure/apimanagement/_inputs.py index 75bb6d2b89..5f3d239d76 100644 --- a/sdk/python/pulumi_azure/apimanagement/_inputs.py +++ b/sdk/python/pulumi_azure/apimanagement/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -115,12 +115,27 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the contact person/organization. :param pulumi.Input[str] url: Absolute URL of the contact information. """ + ApiContactArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + name=name, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter @@ -170,12 +185,33 @@ def __init__(__self__, *, :param pulumi.Input['ApiDiagnosticBackendRequestDataMaskingArgs'] data_masking: A `data_masking` block as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] headers_to_logs: Specifies a list of headers to log. """ + ApiDiagnosticBackendRequestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[pulumi.Input[int]] = None, + data_masking: Optional[pulumi.Input['ApiDiagnosticBackendRequestDataMaskingArgs']] = None, + headers_to_logs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -223,10 +259,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticBackendRequestDataMaskingHeaderArgs']]] headers: A `headers` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticBackendRequestDataMaskingQueryParamArgs']]] query_params: A `query_params` block as defined below. """ + ApiDiagnosticBackendRequestDataMaskingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticBackendRequestDataMaskingHeaderArgs']]]] = None, + query_params: Optional[pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticBackendRequestDataMaskingQueryParamArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -262,8 +313,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticBackendRequestDataMaskingHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -299,8 +367,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticBackendRequestDataMaskingQueryParamArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -338,12 +423,33 @@ def __init__(__self__, *, :param pulumi.Input['ApiDiagnosticBackendResponseDataMaskingArgs'] data_masking: A `data_masking` block as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] headers_to_logs: Specifies a list of headers to log. """ + ApiDiagnosticBackendResponseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[pulumi.Input[int]] = None, + data_masking: Optional[pulumi.Input['ApiDiagnosticBackendResponseDataMaskingArgs']] = None, + headers_to_logs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -391,10 +497,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticBackendResponseDataMaskingHeaderArgs']]] headers: A `headers` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticBackendResponseDataMaskingQueryParamArgs']]] query_params: A `query_params` block as defined below. """ + ApiDiagnosticBackendResponseDataMaskingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticBackendResponseDataMaskingHeaderArgs']]]] = None, + query_params: Optional[pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticBackendResponseDataMaskingQueryParamArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -430,8 +551,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticBackendResponseDataMaskingHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -467,8 +605,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticBackendResponseDataMaskingQueryParamArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -506,12 +661,33 @@ def __init__(__self__, *, :param pulumi.Input['ApiDiagnosticFrontendRequestDataMaskingArgs'] data_masking: A `data_masking` block as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] headers_to_logs: Specifies a list of headers to log. """ + ApiDiagnosticFrontendRequestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[pulumi.Input[int]] = None, + data_masking: Optional[pulumi.Input['ApiDiagnosticFrontendRequestDataMaskingArgs']] = None, + headers_to_logs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -559,10 +735,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticFrontendRequestDataMaskingHeaderArgs']]] headers: A `headers` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticFrontendRequestDataMaskingQueryParamArgs']]] query_params: A `query_params` block as defined below. """ + ApiDiagnosticFrontendRequestDataMaskingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticFrontendRequestDataMaskingHeaderArgs']]]] = None, + query_params: Optional[pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticFrontendRequestDataMaskingQueryParamArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -598,8 +789,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticFrontendRequestDataMaskingHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -635,8 +843,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticFrontendRequestDataMaskingQueryParamArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -674,12 +899,33 @@ def __init__(__self__, *, :param pulumi.Input['ApiDiagnosticFrontendResponseDataMaskingArgs'] data_masking: A `data_masking` block as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] headers_to_logs: Specifies a list of headers to log. """ + ApiDiagnosticFrontendResponseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[pulumi.Input[int]] = None, + data_masking: Optional[pulumi.Input['ApiDiagnosticFrontendResponseDataMaskingArgs']] = None, + headers_to_logs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -727,10 +973,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticFrontendResponseDataMaskingHeaderArgs']]] headers: A `headers` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticFrontendResponseDataMaskingQueryParamArgs']]] query_params: A `query_params` block as defined below. """ + ApiDiagnosticFrontendResponseDataMaskingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticFrontendResponseDataMaskingHeaderArgs']]]] = None, + query_params: Optional[pulumi.Input[Sequence[pulumi.Input['ApiDiagnosticFrontendResponseDataMaskingQueryParamArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -766,8 +1027,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticFrontendResponseDataMaskingHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -803,8 +1081,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticFrontendResponseDataMaskingQueryParamArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -842,10 +1137,35 @@ def __init__(__self__, *, :param pulumi.Input[str] content_value: The Content from which the API Definition should be imported. When a `content_format` of `*-link-*` is specified this must be a URL, otherwise this must be defined inline. :param pulumi.Input['ApiImportWsdlSelectorArgs'] wsdl_selector: A `wsdl_selector` block as defined below, which allows you to limit the import of a WSDL to only a subset of the document. This can only be specified when `content_format` is `wsdl` or `wsdl-link`. """ - pulumi.set(__self__, "content_format", content_format) - pulumi.set(__self__, "content_value", content_value) + ApiImportArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_format=content_format, + content_value=content_value, + wsdl_selector=wsdl_selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_format: Optional[pulumi.Input[str]] = None, + content_value: Optional[pulumi.Input[str]] = None, + wsdl_selector: Optional[pulumi.Input['ApiImportWsdlSelectorArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_format is None and 'contentFormat' in kwargs: + content_format = kwargs['contentFormat'] + if content_format is None: + raise TypeError("Missing 'content_format' argument") + if content_value is None and 'contentValue' in kwargs: + content_value = kwargs['contentValue'] + if content_value is None: + raise TypeError("Missing 'content_value' argument") + if wsdl_selector is None and 'wsdlSelector' in kwargs: + wsdl_selector = kwargs['wsdlSelector'] + + _setter("content_format", content_format) + _setter("content_value", content_value) if wsdl_selector is not None: - pulumi.set(__self__, "wsdl_selector", wsdl_selector) + _setter("wsdl_selector", wsdl_selector) @property @pulumi.getter(name="contentFormat") @@ -893,8 +1213,29 @@ def __init__(__self__, *, :param pulumi.Input[str] endpoint_name: The name of endpoint (port) to import from WSDL. :param pulumi.Input[str] service_name: The name of service to import from WSDL. """ - pulumi.set(__self__, "endpoint_name", endpoint_name) - pulumi.set(__self__, "service_name", service_name) + ApiImportWsdlSelectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint_name=endpoint_name, + service_name=service_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint_name: Optional[pulumi.Input[str]] = None, + service_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_name is None and 'endpointName' in kwargs: + endpoint_name = kwargs['endpointName'] + if endpoint_name is None: + raise TypeError("Missing 'endpoint_name' argument") + if service_name is None and 'serviceName' in kwargs: + service_name = kwargs['serviceName'] + if service_name is None: + raise TypeError("Missing 'service_name' argument") + + _setter("endpoint_name", endpoint_name) + _setter("service_name", service_name) @property @pulumi.getter(name="endpointName") @@ -930,10 +1271,23 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the license . :param pulumi.Input[str] url: Absolute URL of the license. """ + ApiLicenseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter @@ -969,9 +1323,26 @@ def __init__(__self__, *, :param pulumi.Input[str] authorization_server_name: OAuth authorization server identifier. The name of an OAuth2 Authorization Server. :param pulumi.Input[str] scope: Operations scope. """ - pulumi.set(__self__, "authorization_server_name", authorization_server_name) + ApiOauth2AuthorizationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorization_server_name=authorization_server_name, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorization_server_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorization_server_name is None and 'authorizationServerName' in kwargs: + authorization_server_name = kwargs['authorizationServerName'] + if authorization_server_name is None: + raise TypeError("Missing 'authorization_server_name' argument") + + _setter("authorization_server_name", authorization_server_name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="authorizationServerName") @@ -1007,9 +1378,28 @@ def __init__(__self__, *, :param pulumi.Input[str] openid_provider_name: OpenID Connect provider identifier. The name of an OpenID Connect Provider. :param pulumi.Input[Sequence[pulumi.Input[str]]] bearer_token_sending_methods: How to send token to the server. A list of zero or more methods. Valid values are `authorizationHeader` and `query`. """ - pulumi.set(__self__, "openid_provider_name", openid_provider_name) + ApiOpenidAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + openid_provider_name=openid_provider_name, + bearer_token_sending_methods=bearer_token_sending_methods, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + openid_provider_name: Optional[pulumi.Input[str]] = None, + bearer_token_sending_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if openid_provider_name is None and 'openidProviderName' in kwargs: + openid_provider_name = kwargs['openidProviderName'] + if openid_provider_name is None: + raise TypeError("Missing 'openid_provider_name' argument") + if bearer_token_sending_methods is None and 'bearerTokenSendingMethods' in kwargs: + bearer_token_sending_methods = kwargs['bearerTokenSendingMethods'] + + _setter("openid_provider_name", openid_provider_name) if bearer_token_sending_methods is not None: - pulumi.set(__self__, "bearer_token_sending_methods", bearer_token_sending_methods) + _setter("bearer_token_sending_methods", bearer_token_sending_methods) @property @pulumi.getter(name="openidProviderName") @@ -1049,14 +1439,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ApiOperationRequestQueryParameterArgs']]] query_parameters: One or more `query_parameter` blocks as defined above. :param pulumi.Input[Sequence[pulumi.Input['ApiOperationRequestRepresentationArgs']]] representations: One or more `representation` blocks as defined below. """ + ApiOperationRequestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + headers=headers, + query_parameters=query_parameters, + representations=representations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationRequestHeaderArgs']]]] = None, + query_parameters: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationRequestQueryParameterArgs']]]] = None, + representations: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationRequestRepresentationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_parameters is None and 'queryParameters' in kwargs: + query_parameters = kwargs['queryParameters'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_parameters is not None: - pulumi.set(__self__, "query_parameters", query_parameters) + _setter("query_parameters", query_parameters) if representations is not None: - pulumi.set(__self__, "representations", representations) + _setter("representations", representations) @property @pulumi.getter @@ -1130,21 +1539,60 @@ def __init__(__self__, *, :param pulumi.Input[str] type_name: The type name defined by the Schema. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: One or more acceptable values for this Header. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "required", required) - pulumi.set(__self__, "type", type) + ApiOperationRequestHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + required=required, + type=type, + default_value=default_value, + description=description, + examples=examples, + schema_id=schema_id, + type_name=type_name, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + required: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None, + default_value: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + examples: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationRequestHeaderExampleArgs']]]] = None, + schema_id: Optional[pulumi.Input[str]] = None, + type_name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if required is None: + raise TypeError("Missing 'required' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("name", name) + _setter("required", required) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -1270,15 +1718,38 @@ def __init__(__self__, *, :param pulumi.Input[str] summary: A short description for this example. :param pulumi.Input[str] value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationRequestHeaderExampleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + external_value: Optional[pulumi.Input[str]] = None, + summary: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -1364,21 +1835,60 @@ def __init__(__self__, *, :param pulumi.Input[str] type_name: The type name defined by the Schema. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: One or more acceptable values for this Query Parameter. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "required", required) - pulumi.set(__self__, "type", type) + ApiOperationRequestQueryParameterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + required=required, + type=type, + default_value=default_value, + description=description, + examples=examples, + schema_id=schema_id, + type_name=type_name, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + required: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None, + default_value: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + examples: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationRequestQueryParameterExampleArgs']]]] = None, + schema_id: Optional[pulumi.Input[str]] = None, + type_name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if required is None: + raise TypeError("Missing 'required' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("name", name) + _setter("required", required) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -1504,15 +2014,38 @@ def __init__(__self__, *, :param pulumi.Input[str] summary: A short description for this example. :param pulumi.Input[str] value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationRequestQueryParameterExampleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + external_value: Optional[pulumi.Input[str]] = None, + summary: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -1596,15 +2129,44 @@ def __init__(__self__, *, > **NOTE:** This can only be specified when `content_type` is not set to `application/x-www-form-urlencoded` or `multipart/form-data`. """ - pulumi.set(__self__, "content_type", content_type) + ApiOperationRequestRepresentationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + examples=examples, + form_parameters=form_parameters, + schema_id=schema_id, + type_name=type_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[pulumi.Input[str]] = None, + examples: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationRequestRepresentationExampleArgs']]]] = None, + form_parameters: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationRequestRepresentationFormParameterArgs']]]] = None, + schema_id: Optional[pulumi.Input[str]] = None, + type_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if content_type is None: + raise TypeError("Missing 'content_type' argument") + if form_parameters is None and 'formParameters' in kwargs: + form_parameters = kwargs['formParameters'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("content_type", content_type) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if form_parameters is not None: - pulumi.set(__self__, "form_parameters", form_parameters) + _setter("form_parameters", form_parameters) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) @property @pulumi.getter(name="contentType") @@ -1688,15 +2250,38 @@ def __init__(__self__, *, :param pulumi.Input[str] summary: A short description for this example. :param pulumi.Input[str] value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationRequestRepresentationExampleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + external_value: Optional[pulumi.Input[str]] = None, + summary: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -1782,21 +2367,60 @@ def __init__(__self__, *, :param pulumi.Input[str] type_name: The type name defined by the Schema. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: One or more acceptable values for this Form Parameter. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "required", required) - pulumi.set(__self__, "type", type) + ApiOperationRequestRepresentationFormParameterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + required=required, + type=type, + default_value=default_value, + description=description, + examples=examples, + schema_id=schema_id, + type_name=type_name, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + required: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None, + default_value: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + examples: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationRequestRepresentationFormParameterExampleArgs']]]] = None, + schema_id: Optional[pulumi.Input[str]] = None, + type_name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if required is None: + raise TypeError("Missing 'required' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("name", name) + _setter("required", required) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -1922,15 +2546,38 @@ def __init__(__self__, *, :param pulumi.Input[str] summary: A short description for this example. :param pulumi.Input[str] value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationRequestRepresentationFormParameterExampleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + external_value: Optional[pulumi.Input[str]] = None, + summary: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2006,13 +2653,34 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ApiOperationResponseHeaderArgs']]] headers: One or more `header` blocks as defined above. :param pulumi.Input[Sequence[pulumi.Input['ApiOperationResponseRepresentationArgs']]] representations: One or more `representation` blocks as defined below. """ - pulumi.set(__self__, "status_code", status_code) + ApiOperationResponseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + status_code=status_code, + description=description, + headers=headers, + representations=representations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + status_code: Optional[pulumi.Input[int]] = None, + description: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationResponseHeaderArgs']]]] = None, + representations: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationResponseRepresentationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if status_code is None and 'statusCode' in kwargs: + status_code = kwargs['statusCode'] + if status_code is None: + raise TypeError("Missing 'status_code' argument") + + _setter("status_code", status_code) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if representations is not None: - pulumi.set(__self__, "representations", representations) + _setter("representations", representations) @property @pulumi.getter(name="statusCode") @@ -2086,21 +2754,60 @@ def __init__(__self__, *, :param pulumi.Input[str] type_name: The type name defined by the Schema. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: One or more acceptable values for this Header. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "required", required) - pulumi.set(__self__, "type", type) + ApiOperationResponseHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + required=required, + type=type, + default_value=default_value, + description=description, + examples=examples, + schema_id=schema_id, + type_name=type_name, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + required: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None, + default_value: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + examples: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationResponseHeaderExampleArgs']]]] = None, + schema_id: Optional[pulumi.Input[str]] = None, + type_name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if required is None: + raise TypeError("Missing 'required' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("name", name) + _setter("required", required) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -2226,15 +2933,38 @@ def __init__(__self__, *, :param pulumi.Input[str] summary: A short description for this example. :param pulumi.Input[str] value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationResponseHeaderExampleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + external_value: Optional[pulumi.Input[str]] = None, + summary: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2318,15 +3048,44 @@ def __init__(__self__, *, > **NOTE:** This can only be specified when `content_type` is not set to `application/x-www-form-urlencoded` or `multipart/form-data`. """ - pulumi.set(__self__, "content_type", content_type) + ApiOperationResponseRepresentationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + examples=examples, + form_parameters=form_parameters, + schema_id=schema_id, + type_name=type_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[pulumi.Input[str]] = None, + examples: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationResponseRepresentationExampleArgs']]]] = None, + form_parameters: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationResponseRepresentationFormParameterArgs']]]] = None, + schema_id: Optional[pulumi.Input[str]] = None, + type_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if content_type is None: + raise TypeError("Missing 'content_type' argument") + if form_parameters is None and 'formParameters' in kwargs: + form_parameters = kwargs['formParameters'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("content_type", content_type) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if form_parameters is not None: - pulumi.set(__self__, "form_parameters", form_parameters) + _setter("form_parameters", form_parameters) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) @property @pulumi.getter(name="contentType") @@ -2410,15 +3169,38 @@ def __init__(__self__, *, :param pulumi.Input[str] summary: A short description for this example. :param pulumi.Input[str] value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationResponseRepresentationExampleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + external_value: Optional[pulumi.Input[str]] = None, + summary: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2504,21 +3286,60 @@ def __init__(__self__, *, :param pulumi.Input[str] type_name: The type name defined by the Schema. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: One or more acceptable values for this Form Parameter. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "required", required) - pulumi.set(__self__, "type", type) + ApiOperationResponseRepresentationFormParameterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + required=required, + type=type, + default_value=default_value, + description=description, + examples=examples, + schema_id=schema_id, + type_name=type_name, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + required: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None, + default_value: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + examples: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationResponseRepresentationFormParameterExampleArgs']]]] = None, + schema_id: Optional[pulumi.Input[str]] = None, + type_name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if required is None: + raise TypeError("Missing 'required' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("name", name) + _setter("required", required) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -2644,15 +3465,38 @@ def __init__(__self__, *, :param pulumi.Input[str] summary: A short description for this example. :param pulumi.Input[str] value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationResponseRepresentationFormParameterExampleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + external_value: Optional[pulumi.Input[str]] = None, + summary: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2738,21 +3582,60 @@ def __init__(__self__, *, :param pulumi.Input[str] type_name: The type name defined by the Schema. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: One or more acceptable values for this Template Parameter. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "required", required) - pulumi.set(__self__, "type", type) + ApiOperationTemplateParameterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + required=required, + type=type, + default_value=default_value, + description=description, + examples=examples, + schema_id=schema_id, + type_name=type_name, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + required: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None, + default_value: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + examples: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationTemplateParameterExampleArgs']]]] = None, + schema_id: Optional[pulumi.Input[str]] = None, + type_name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if required is None: + raise TypeError("Missing 'required' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("name", name) + _setter("required", required) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -2878,15 +3761,38 @@ def __init__(__self__, *, :param pulumi.Input[str] summary: A short description for this example. :param pulumi.Input[str] value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationTemplateParameterExampleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + external_value: Optional[pulumi.Input[str]] = None, + summary: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2958,8 +3864,25 @@ def __init__(__self__, *, :param pulumi.Input[str] header: The name of the HTTP Header which should be used for the Subscription Key. :param pulumi.Input[str] query: The name of the QueryString parameter which should be used for the Subscription Key. """ - pulumi.set(__self__, "header", header) - pulumi.set(__self__, "query", query) + ApiSubscriptionKeyParameterNamesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + header=header, + query=query, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header: Optional[pulumi.Input[str]] = None, + query: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header is None: + raise TypeError("Missing 'header' argument") + if query is None: + raise TypeError("Missing 'query' argument") + + _setter("header", header) + _setter("query", query) @property @pulumi.getter @@ -2995,8 +3918,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Name of the Parameter. :param pulumi.Input[str] value: The Value of the Parameter. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AuthorizationServerTokenBodyParameterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -3036,14 +3976,31 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] header: A mapping of header parameters to pass to the backend host. The keys are the header names and the values are a comma separated string of header values. This is converted to a list before being passed to the API. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] query: A mapping of query parameters to pass to the backend host. The keys are the query names and the values are a comma separated string of query values. This is converted to a list before being passed to the API. """ + BackendCredentialsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorization=authorization, + certificates=certificates, + header=header, + query=query, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorization: Optional[pulumi.Input['BackendCredentialsAuthorizationArgs']] = None, + certificates: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + header: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + query: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorization is not None: - pulumi.set(__self__, "authorization", authorization) + _setter("authorization", authorization) if certificates is not None: - pulumi.set(__self__, "certificates", certificates) + _setter("certificates", certificates) if header is not None: - pulumi.set(__self__, "header", header) + _setter("header", header) if query is not None: - pulumi.set(__self__, "query", query) + _setter("query", query) @property @pulumi.getter @@ -3103,10 +4060,23 @@ def __init__(__self__, *, :param pulumi.Input[str] parameter: The authentication Parameter value. :param pulumi.Input[str] scheme: The authentication Scheme name. """ + BackendCredentialsAuthorizationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + parameter=parameter, + scheme=scheme, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + parameter: Optional[pulumi.Input[str]] = None, + scheme: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parameter is not None: - pulumi.set(__self__, "parameter", parameter) + _setter("parameter", parameter) if scheme is not None: - pulumi.set(__self__, "scheme", scheme) + _setter("scheme", scheme) @property @pulumi.getter @@ -3144,10 +4114,29 @@ def __init__(__self__, *, :param pulumi.Input[str] username: The username to connect to the proxy server. :param pulumi.Input[str] password: The password to connect to the proxy server. """ - pulumi.set(__self__, "url", url) - pulumi.set(__self__, "username", username) + BackendProxyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + username=username, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("url", url) + _setter("username", username) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -3206,16 +4195,53 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] server_certificate_thumbprints: A list of thumbprints of the server certificates of the Service Fabric cluster. :param pulumi.Input[Sequence[pulumi.Input['BackendServiceFabricClusterServerX509NameArgs']]] server_x509_names: One or more `server_x509_name` blocks as documented below. """ - pulumi.set(__self__, "management_endpoints", management_endpoints) - pulumi.set(__self__, "max_partition_resolution_retries", max_partition_resolution_retries) + BackendServiceFabricClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_endpoints=management_endpoints, + max_partition_resolution_retries=max_partition_resolution_retries, + client_certificate_id=client_certificate_id, + client_certificate_thumbprint=client_certificate_thumbprint, + server_certificate_thumbprints=server_certificate_thumbprints, + server_x509_names=server_x509_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + max_partition_resolution_retries: Optional[pulumi.Input[int]] = None, + client_certificate_id: Optional[pulumi.Input[str]] = None, + client_certificate_thumbprint: Optional[pulumi.Input[str]] = None, + server_certificate_thumbprints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + server_x509_names: Optional[pulumi.Input[Sequence[pulumi.Input['BackendServiceFabricClusterServerX509NameArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_endpoints is None and 'managementEndpoints' in kwargs: + management_endpoints = kwargs['managementEndpoints'] + if management_endpoints is None: + raise TypeError("Missing 'management_endpoints' argument") + if max_partition_resolution_retries is None and 'maxPartitionResolutionRetries' in kwargs: + max_partition_resolution_retries = kwargs['maxPartitionResolutionRetries'] + if max_partition_resolution_retries is None: + raise TypeError("Missing 'max_partition_resolution_retries' argument") + if client_certificate_id is None and 'clientCertificateId' in kwargs: + client_certificate_id = kwargs['clientCertificateId'] + if client_certificate_thumbprint is None and 'clientCertificateThumbprint' in kwargs: + client_certificate_thumbprint = kwargs['clientCertificateThumbprint'] + if server_certificate_thumbprints is None and 'serverCertificateThumbprints' in kwargs: + server_certificate_thumbprints = kwargs['serverCertificateThumbprints'] + if server_x509_names is None and 'serverX509Names' in kwargs: + server_x509_names = kwargs['serverX509Names'] + + _setter("management_endpoints", management_endpoints) + _setter("max_partition_resolution_retries", max_partition_resolution_retries) if client_certificate_id is not None: - pulumi.set(__self__, "client_certificate_id", client_certificate_id) + _setter("client_certificate_id", client_certificate_id) if client_certificate_thumbprint is not None: - pulumi.set(__self__, "client_certificate_thumbprint", client_certificate_thumbprint) + _setter("client_certificate_thumbprint", client_certificate_thumbprint) if server_certificate_thumbprints is not None: - pulumi.set(__self__, "server_certificate_thumbprints", server_certificate_thumbprints) + _setter("server_certificate_thumbprints", server_certificate_thumbprints) if server_x509_names is not None: - pulumi.set(__self__, "server_x509_names", server_x509_names) + _setter("server_x509_names", server_x509_names) @property @pulumi.getter(name="managementEndpoints") @@ -3302,8 +4328,27 @@ def __init__(__self__, *, :param pulumi.Input[str] issuer_certificate_thumbprint: The thumbprint for the issuer of the certificate. :param pulumi.Input[str] name: The name of the API Management backend. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "issuer_certificate_thumbprint", issuer_certificate_thumbprint) - pulumi.set(__self__, "name", name) + BackendServiceFabricClusterServerX509NameArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + issuer_certificate_thumbprint=issuer_certificate_thumbprint, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + issuer_certificate_thumbprint: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if issuer_certificate_thumbprint is None and 'issuerCertificateThumbprint' in kwargs: + issuer_certificate_thumbprint = kwargs['issuerCertificateThumbprint'] + if issuer_certificate_thumbprint is None: + raise TypeError("Missing 'issuer_certificate_thumbprint' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("issuer_certificate_thumbprint", issuer_certificate_thumbprint) + _setter("name", name) @property @pulumi.getter(name="issuerCertificateThumbprint") @@ -3339,10 +4384,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] validate_certificate_chain: Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for the backend host. :param pulumi.Input[bool] validate_certificate_name: Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for the backend host. """ + BackendTlsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + validate_certificate_chain=validate_certificate_chain, + validate_certificate_name=validate_certificate_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + validate_certificate_chain: Optional[pulumi.Input[bool]] = None, + validate_certificate_name: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if validate_certificate_chain is None and 'validateCertificateChain' in kwargs: + validate_certificate_chain = kwargs['validateCertificateChain'] + if validate_certificate_name is None and 'validateCertificateName' in kwargs: + validate_certificate_name = kwargs['validateCertificateName'] + if validate_certificate_chain is not None: - pulumi.set(__self__, "validate_certificate_chain", validate_certificate_chain) + _setter("validate_certificate_chain", validate_certificate_chain) if validate_certificate_name is not None: - pulumi.set(__self__, "validate_certificate_name", validate_certificate_name) + _setter("validate_certificate_name", validate_certificate_name) @property @pulumi.getter(name="validateCertificateChain") @@ -3393,27 +4455,74 @@ def __init__(__self__, *, > **NOTE:** If a User Assigned Managed identity is specified for `ssl_keyvault_identity_client_id` then this identity must be associated to the `apimanagement.Service` within an `identity` block. """ - pulumi.set(__self__, "host_name", host_name) + CustomDomainDeveloperPortalArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + certificate_password: Optional[pulumi.Input[str]] = None, + certificate_source: Optional[pulumi.Input[str]] = None, + certificate_status: Optional[pulumi.Input[str]] = None, + expiry: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + negotiate_client_certificate: Optional[pulumi.Input[bool]] = None, + ssl_keyvault_identity_client_id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -3561,29 +4670,80 @@ def __init__(__self__, *, > **NOTE:** If a User Assigned Managed identity is specified for `ssl_keyvault_identity_client_id` then this identity must be associated to the `apimanagement.Service` within an `identity` block. """ - pulumi.set(__self__, "host_name", host_name) + CustomDomainGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + default_ssl_binding=default_ssl_binding, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + certificate_password: Optional[pulumi.Input[str]] = None, + certificate_source: Optional[pulumi.Input[str]] = None, + certificate_status: Optional[pulumi.Input[str]] = None, + default_ssl_binding: Optional[pulumi.Input[bool]] = None, + expiry: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + negotiate_client_certificate: Optional[pulumi.Input[bool]] = None, + ssl_keyvault_identity_client_id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if default_ssl_binding is None and 'defaultSslBinding' in kwargs: + default_ssl_binding = kwargs['defaultSslBinding'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if default_ssl_binding is not None: - pulumi.set(__self__, "default_ssl_binding", default_ssl_binding) + _setter("default_ssl_binding", default_ssl_binding) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -3741,27 +4901,74 @@ def __init__(__self__, *, > **NOTE:** If a User Assigned Managed identity is specified for `ssl_keyvault_identity_client_id` then this identity must be associated to the `apimanagement.Service` within an `identity` block. """ - pulumi.set(__self__, "host_name", host_name) + CustomDomainManagementArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + certificate_password: Optional[pulumi.Input[str]] = None, + certificate_source: Optional[pulumi.Input[str]] = None, + certificate_status: Optional[pulumi.Input[str]] = None, + expiry: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + negotiate_client_certificate: Optional[pulumi.Input[bool]] = None, + ssl_keyvault_identity_client_id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -3907,27 +5114,74 @@ def __init__(__self__, *, > **NOTE:** If a User Assigned Managed identity is specified for `ssl_keyvault_identity_client_id` then this identity must be associated to the `apimanagement.Service` within an `identity` block. """ - pulumi.set(__self__, "host_name", host_name) + CustomDomainPortalArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + certificate_password: Optional[pulumi.Input[str]] = None, + certificate_source: Optional[pulumi.Input[str]] = None, + certificate_status: Optional[pulumi.Input[str]] = None, + expiry: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + negotiate_client_certificate: Optional[pulumi.Input[bool]] = None, + ssl_keyvault_identity_client_id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -4073,27 +5327,74 @@ def __init__(__self__, *, > **NOTE:** If a User Assigned Managed identity is specified for `ssl_keyvault_identity_client_id` then this identity must be associated to the `apimanagement.Service` within an `identity` block. """ - pulumi.set(__self__, "host_name", host_name) + CustomDomainScmArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + certificate_password: Optional[pulumi.Input[str]] = None, + certificate_source: Optional[pulumi.Input[str]] = None, + certificate_status: Optional[pulumi.Input[str]] = None, + expiry: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + negotiate_client_certificate: Optional[pulumi.Input[bool]] = None, + ssl_keyvault_identity_client_id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -4226,12 +5527,33 @@ def __init__(__self__, *, :param pulumi.Input['DiagnosticBackendRequestDataMaskingArgs'] data_masking: A `data_masking` block as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] headers_to_logs: Specifies a list of headers to log. """ + DiagnosticBackendRequestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[pulumi.Input[int]] = None, + data_masking: Optional[pulumi.Input['DiagnosticBackendRequestDataMaskingArgs']] = None, + headers_to_logs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -4279,10 +5601,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DiagnosticBackendRequestDataMaskingHeaderArgs']]] headers: A `headers` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['DiagnosticBackendRequestDataMaskingQueryParamArgs']]] query_params: A `query_params` block as defined below. """ + DiagnosticBackendRequestDataMaskingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticBackendRequestDataMaskingHeaderArgs']]]] = None, + query_params: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticBackendRequestDataMaskingQueryParamArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -4318,8 +5655,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticBackendRequestDataMaskingHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4355,8 +5709,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticBackendRequestDataMaskingQueryParamArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4394,12 +5765,33 @@ def __init__(__self__, *, :param pulumi.Input['DiagnosticBackendResponseDataMaskingArgs'] data_masking: A `data_masking` block as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] headers_to_logs: Specifies a list of headers to log. """ + DiagnosticBackendResponseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[pulumi.Input[int]] = None, + data_masking: Optional[pulumi.Input['DiagnosticBackendResponseDataMaskingArgs']] = None, + headers_to_logs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -4447,10 +5839,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DiagnosticBackendResponseDataMaskingHeaderArgs']]] headers: A `headers` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['DiagnosticBackendResponseDataMaskingQueryParamArgs']]] query_params: A `query_params` block as defined below. """ + DiagnosticBackendResponseDataMaskingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticBackendResponseDataMaskingHeaderArgs']]]] = None, + query_params: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticBackendResponseDataMaskingQueryParamArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -4486,8 +5893,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticBackendResponseDataMaskingHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4523,8 +5947,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticBackendResponseDataMaskingQueryParamArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4562,12 +6003,33 @@ def __init__(__self__, *, :param pulumi.Input['DiagnosticFrontendRequestDataMaskingArgs'] data_masking: A `data_masking` block as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] headers_to_logs: Specifies a list of headers to log. """ + DiagnosticFrontendRequestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[pulumi.Input[int]] = None, + data_masking: Optional[pulumi.Input['DiagnosticFrontendRequestDataMaskingArgs']] = None, + headers_to_logs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -4615,10 +6077,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DiagnosticFrontendRequestDataMaskingHeaderArgs']]] headers: A `headers` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['DiagnosticFrontendRequestDataMaskingQueryParamArgs']]] query_params: A `query_params` block as defined below. """ + DiagnosticFrontendRequestDataMaskingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticFrontendRequestDataMaskingHeaderArgs']]]] = None, + query_params: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticFrontendRequestDataMaskingQueryParamArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -4654,8 +6131,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticFrontendRequestDataMaskingHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4691,8 +6185,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticFrontendRequestDataMaskingQueryParamArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4730,12 +6241,33 @@ def __init__(__self__, *, :param pulumi.Input['DiagnosticFrontendResponseDataMaskingArgs'] data_masking: A `data_masking` block as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] headers_to_logs: Specifies a list of headers to log. """ + DiagnosticFrontendResponseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[pulumi.Input[int]] = None, + data_masking: Optional[pulumi.Input['DiagnosticFrontendResponseDataMaskingArgs']] = None, + headers_to_logs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -4783,10 +6315,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DiagnosticFrontendResponseDataMaskingHeaderArgs']]] headers: A `headers` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['DiagnosticFrontendResponseDataMaskingQueryParamArgs']]] query_params: A `query_params` block as defined below. """ + DiagnosticFrontendResponseDataMaskingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticFrontendResponseDataMaskingHeaderArgs']]]] = None, + query_params: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticFrontendResponseDataMaskingQueryParamArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -4822,8 +6369,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticFrontendResponseDataMaskingHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4859,8 +6423,25 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param pulumi.Input[str] value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticFrontendResponseDataMaskingQueryParamArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4900,13 +6481,32 @@ def __init__(__self__, *, :param pulumi.Input[str] district: The district, state, or province where the resource is located. :param pulumi.Input[str] region: The country or region where the resource is located. """ - pulumi.set(__self__, "name", name) + GatewayLocationDataArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + city=city, + district=district, + region=region, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + city: Optional[pulumi.Input[str]] = None, + district: Optional[pulumi.Input[str]] = None, + region: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if city is not None: - pulumi.set(__self__, "city", city) + _setter("city", city) if district is not None: - pulumi.set(__self__, "district", district) + _setter("district", district) if region is not None: - pulumi.set(__self__, "region", region) + _setter("region", region) @property @pulumi.getter @@ -4964,7 +6564,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] instrumentation_key: The instrumentation key used to push data to Application Insights. """ - pulumi.set(__self__, "instrumentation_key", instrumentation_key) + LoggerApplicationInsightsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + instrumentation_key=instrumentation_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + instrumentation_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if instrumentation_key is None and 'instrumentationKey' in kwargs: + instrumentation_key = kwargs['instrumentationKey'] + if instrumentation_key is None: + raise TypeError("Missing 'instrumentation_key' argument") + + _setter("instrumentation_key", instrumentation_key) @property @pulumi.getter(name="instrumentationKey") @@ -4988,8 +6603,27 @@ def __init__(__self__, *, :param pulumi.Input[str] connection_string: The connection string of an EventHub Namespace. :param pulumi.Input[str] name: The name of an EventHub. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "name", name) + LoggerEventhubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("connection_string", connection_string) + _setter("name", name) @property @pulumi.getter(name="connectionString") @@ -5025,9 +6659,28 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_id: The resource ID of the Key Vault Secret. :param pulumi.Input[str] identity_client_id: The client ID of User Assigned Identity, for the API Management Service, which will be used to access the key vault secret. The System Assigned Identity will be used in absence. """ - pulumi.set(__self__, "secret_id", secret_id) + NamedValueValueFromKeyVaultArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_id=secret_id, + identity_client_id=identity_client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_id: Optional[pulumi.Input[str]] = None, + identity_client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_id is None and 'secretId' in kwargs: + secret_id = kwargs['secretId'] + if secret_id is None: + raise TypeError("Missing 'secret_id' argument") + if identity_client_id is None and 'identityClientId' in kwargs: + identity_client_id = kwargs['identityClientId'] + + _setter("secret_id", secret_id) if identity_client_id is not None: - pulumi.set(__self__, "identity_client_id", identity_client_id) + _setter("identity_client_id", identity_client_id) @property @pulumi.getter(name="secretId") @@ -5079,23 +6732,64 @@ def __init__(__self__, *, :param pulumi.Input['ServiceAdditionalLocationVirtualNetworkConfigurationArgs'] virtual_network_configuration: A `virtual_network_configuration` block as defined below. Required when `virtual_network_type` is `External` or `Internal`. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: A list of availability zones. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "location", location) + ServiceAdditionalLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + capacity=capacity, + gateway_disabled=gateway_disabled, + gateway_regional_url=gateway_regional_url, + private_ip_addresses=private_ip_addresses, + public_ip_address_id=public_ip_address_id, + public_ip_addresses=public_ip_addresses, + virtual_network_configuration=virtual_network_configuration, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + capacity: Optional[pulumi.Input[int]] = None, + gateway_disabled: Optional[pulumi.Input[bool]] = None, + gateway_regional_url: Optional[pulumi.Input[str]] = None, + private_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + virtual_network_configuration: Optional[pulumi.Input['ServiceAdditionalLocationVirtualNetworkConfigurationArgs']] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is None: + raise TypeError("Missing 'location' argument") + if gateway_disabled is None and 'gatewayDisabled' in kwargs: + gateway_disabled = kwargs['gatewayDisabled'] + if gateway_regional_url is None and 'gatewayRegionalUrl' in kwargs: + gateway_regional_url = kwargs['gatewayRegionalUrl'] + if private_ip_addresses is None and 'privateIpAddresses' in kwargs: + private_ip_addresses = kwargs['privateIpAddresses'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if virtual_network_configuration is None and 'virtualNetworkConfiguration' in kwargs: + virtual_network_configuration = kwargs['virtualNetworkConfiguration'] + + _setter("location", location) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if gateway_disabled is not None: - pulumi.set(__self__, "gateway_disabled", gateway_disabled) + _setter("gateway_disabled", gateway_disabled) if gateway_regional_url is not None: - pulumi.set(__self__, "gateway_regional_url", gateway_regional_url) + _setter("gateway_regional_url", gateway_regional_url) if private_ip_addresses is not None: - pulumi.set(__self__, "private_ip_addresses", private_ip_addresses) + _setter("private_ip_addresses", private_ip_addresses) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if virtual_network_configuration is not None: - pulumi.set(__self__, "virtual_network_configuration", virtual_network_configuration) + _setter("virtual_network_configuration", virtual_network_configuration) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -5215,7 +6909,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] subnet_id: The id of the subnet that will be used for the API Management. """ - pulumi.set(__self__, "subnet_id", subnet_id) + ServiceAdditionalLocationVirtualNetworkConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="subnetId") @@ -5247,16 +6956,47 @@ def __init__(__self__, *, :param pulumi.Input[str] subject: The subject of the certificate. :param pulumi.Input[str] thumbprint: The thumbprint of the certificate. """ - pulumi.set(__self__, "encoded_certificate", encoded_certificate) - pulumi.set(__self__, "store_name", store_name) + ServiceCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + encoded_certificate=encoded_certificate, + store_name=store_name, + certificate_password=certificate_password, + expiry=expiry, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encoded_certificate: Optional[pulumi.Input[str]] = None, + store_name: Optional[pulumi.Input[str]] = None, + certificate_password: Optional[pulumi.Input[str]] = None, + expiry: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encoded_certificate is None and 'encodedCertificate' in kwargs: + encoded_certificate = kwargs['encodedCertificate'] + if encoded_certificate is None: + raise TypeError("Missing 'encoded_certificate' argument") + if store_name is None and 'storeName' in kwargs: + store_name = kwargs['storeName'] + if store_name is None: + raise TypeError("Missing 'store_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + + _setter("encoded_certificate", encoded_certificate) + _setter("store_name", store_name) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="encodedCertificate") @@ -5344,14 +7084,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] user_registration_enabled: Should user registration requests be delegated to an external url? Defaults to `false`. :param pulumi.Input[str] validation_key: A base64-encoded validation key to validate, that a request is coming from Azure API Management. """ + ServiceDelegationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subscriptions_enabled=subscriptions_enabled, + url=url, + user_registration_enabled=user_registration_enabled, + validation_key=validation_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subscriptions_enabled: Optional[pulumi.Input[bool]] = None, + url: Optional[pulumi.Input[str]] = None, + user_registration_enabled: Optional[pulumi.Input[bool]] = None, + validation_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subscriptions_enabled is None and 'subscriptionsEnabled' in kwargs: + subscriptions_enabled = kwargs['subscriptionsEnabled'] + if user_registration_enabled is None and 'userRegistrationEnabled' in kwargs: + user_registration_enabled = kwargs['userRegistrationEnabled'] + if validation_key is None and 'validationKey' in kwargs: + validation_key = kwargs['validationKey'] + if subscriptions_enabled is not None: - pulumi.set(__self__, "subscriptions_enabled", subscriptions_enabled) + _setter("subscriptions_enabled", subscriptions_enabled) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) if user_registration_enabled is not None: - pulumi.set(__self__, "user_registration_enabled", user_registration_enabled) + _setter("user_registration_enabled", user_registration_enabled) if validation_key is not None: - pulumi.set(__self__, "validation_key", validation_key) + _setter("validation_key", validation_key) @property @pulumi.getter(name="subscriptionsEnabled") @@ -5417,16 +7180,37 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ServiceHostnameConfigurationProxyArgs']]] proxies: One or more `proxy` blocks as documented below. :param pulumi.Input[Sequence[pulumi.Input['ServiceHostnameConfigurationScmArgs']]] scms: One or more `scm` blocks as documented below. """ + ServiceHostnameConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + developer_portals=developer_portals, + managements=managements, + portals=portals, + proxies=proxies, + scms=scms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + developer_portals: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceHostnameConfigurationDeveloperPortalArgs']]]] = None, + managements: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceHostnameConfigurationManagementArgs']]]] = None, + portals: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceHostnameConfigurationPortalArgs']]]] = None, + proxies: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceHostnameConfigurationProxyArgs']]]] = None, + scms: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceHostnameConfigurationScmArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if developer_portals is None and 'developerPortals' in kwargs: + developer_portals = kwargs['developerPortals'] + if developer_portals is not None: - pulumi.set(__self__, "developer_portals", developer_portals) + _setter("developer_portals", developer_portals) if managements is not None: - pulumi.set(__self__, "managements", managements) + _setter("managements", managements) if portals is not None: - pulumi.set(__self__, "portals", portals) + _setter("portals", portals) if proxies is not None: - pulumi.set(__self__, "proxies", proxies) + _setter("proxies", proxies) if scms is not None: - pulumi.set(__self__, "scms", scms) + _setter("scms", scms) @property @pulumi.getter(name="developerPortals") @@ -5520,27 +7304,74 @@ def __init__(__self__, *, :param pulumi.Input[str] subject: The subject of the certificate. :param pulumi.Input[str] thumbprint: The thumbprint of the certificate. """ - pulumi.set(__self__, "host_name", host_name) + ServiceHostnameConfigurationDeveloperPortalArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + certificate_password: Optional[pulumi.Input[str]] = None, + certificate_source: Optional[pulumi.Input[str]] = None, + certificate_status: Optional[pulumi.Input[str]] = None, + expiry: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + negotiate_client_certificate: Optional[pulumi.Input[bool]] = None, + ssl_keyvault_identity_client_id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -5712,27 +7543,74 @@ def __init__(__self__, *, :param pulumi.Input[str] subject: The subject of the certificate. :param pulumi.Input[str] thumbprint: The thumbprint of the certificate. """ - pulumi.set(__self__, "host_name", host_name) + ServiceHostnameConfigurationManagementArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + certificate_password: Optional[pulumi.Input[str]] = None, + certificate_source: Optional[pulumi.Input[str]] = None, + certificate_status: Optional[pulumi.Input[str]] = None, + expiry: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + negotiate_client_certificate: Optional[pulumi.Input[bool]] = None, + ssl_keyvault_identity_client_id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -5904,27 +7782,74 @@ def __init__(__self__, *, :param pulumi.Input[str] subject: The subject of the certificate. :param pulumi.Input[str] thumbprint: The thumbprint of the certificate. """ - pulumi.set(__self__, "host_name", host_name) + ServiceHostnameConfigurationPortalArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + certificate_password: Optional[pulumi.Input[str]] = None, + certificate_source: Optional[pulumi.Input[str]] = None, + certificate_status: Optional[pulumi.Input[str]] = None, + expiry: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + negotiate_client_certificate: Optional[pulumi.Input[bool]] = None, + ssl_keyvault_identity_client_id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -6096,29 +8021,80 @@ def __init__(__self__, *, :param pulumi.Input[str] subject: The subject of the certificate. :param pulumi.Input[str] thumbprint: The thumbprint of the certificate. """ - pulumi.set(__self__, "host_name", host_name) + ServiceHostnameConfigurationProxyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + default_ssl_binding=default_ssl_binding, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + certificate_password: Optional[pulumi.Input[str]] = None, + certificate_source: Optional[pulumi.Input[str]] = None, + certificate_status: Optional[pulumi.Input[str]] = None, + default_ssl_binding: Optional[pulumi.Input[bool]] = None, + expiry: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + negotiate_client_certificate: Optional[pulumi.Input[bool]] = None, + ssl_keyvault_identity_client_id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if default_ssl_binding is None and 'defaultSslBinding' in kwargs: + default_ssl_binding = kwargs['defaultSslBinding'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if default_ssl_binding is not None: - pulumi.set(__self__, "default_ssl_binding", default_ssl_binding) + _setter("default_ssl_binding", default_ssl_binding) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -6300,27 +8276,74 @@ def __init__(__self__, *, :param pulumi.Input[str] subject: The subject of the certificate. :param pulumi.Input[str] thumbprint: The thumbprint of the certificate. """ - pulumi.set(__self__, "host_name", host_name) + ServiceHostnameConfigurationScmArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + certificate_password: Optional[pulumi.Input[str]] = None, + certificate_source: Optional[pulumi.Input[str]] = None, + certificate_status: Optional[pulumi.Input[str]] = None, + expiry: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + negotiate_client_certificate: Optional[pulumi.Input[bool]] = None, + ssl_keyvault_identity_client_id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -6474,13 +8497,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The identifier for the tenant access information contract. """ - pulumi.set(__self__, "type", type) + ServiceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -6542,10 +8590,27 @@ def __init__(__self__, *, :param pulumi.Input[str] xml_content: The XML Content for this Policy. :param pulumi.Input[str] xml_link: A link to an API Management Policy XML Document, which must be publicly available. """ + ServicePolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + xml_content=xml_content, + xml_link=xml_link, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + xml_content: Optional[pulumi.Input[str]] = None, + xml_link: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if xml_content is None and 'xmlContent' in kwargs: + xml_content = kwargs['xmlContent'] + if xml_link is None and 'xmlLink' in kwargs: + xml_link = kwargs['xmlLink'] + if xml_content is not None: - pulumi.set(__self__, "xml_content", xml_content) + _setter("xml_content", xml_content) if xml_link is not None: - pulumi.set(__self__, "xml_link", xml_link) + _setter("xml_link", xml_link) @property @pulumi.getter(name="xmlContent") @@ -6579,8 +8644,21 @@ def __init__(__self__, *, """ :param pulumi.Input[bool] enable_http2: Should HTTP/2 be supported by the API Management Service? Defaults to `false`. """ + ServiceProtocolsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enable_http2=enable_http2, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enable_http2: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enable_http2 is None and 'enableHttp2' in kwargs: + enable_http2 = kwargs['enableHttp2'] + if enable_http2 is not None: - pulumi.set(__self__, "enable_http2", enable_http2) + _setter("enable_http2", enable_http2) @property @pulumi.getter(name="enableHttp2") @@ -6668,40 +8746,117 @@ def __init__(__self__, *, > **info:** This maps to the `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` field """ + ServiceSecurityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enable_backend_ssl30=enable_backend_ssl30, + enable_backend_tls10=enable_backend_tls10, + enable_backend_tls11=enable_backend_tls11, + enable_frontend_ssl30=enable_frontend_ssl30, + enable_frontend_tls10=enable_frontend_tls10, + enable_frontend_tls11=enable_frontend_tls11, + tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled=tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled, + tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled=tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled, + tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled=tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled, + tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled=tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled, + tls_rsa_with_aes128_cbc_sha256_ciphers_enabled=tls_rsa_with_aes128_cbc_sha256_ciphers_enabled, + tls_rsa_with_aes128_cbc_sha_ciphers_enabled=tls_rsa_with_aes128_cbc_sha_ciphers_enabled, + tls_rsa_with_aes128_gcm_sha256_ciphers_enabled=tls_rsa_with_aes128_gcm_sha256_ciphers_enabled, + tls_rsa_with_aes256_cbc_sha256_ciphers_enabled=tls_rsa_with_aes256_cbc_sha256_ciphers_enabled, + tls_rsa_with_aes256_cbc_sha_ciphers_enabled=tls_rsa_with_aes256_cbc_sha_ciphers_enabled, + tls_rsa_with_aes256_gcm_sha384_ciphers_enabled=tls_rsa_with_aes256_gcm_sha384_ciphers_enabled, + triple_des_ciphers_enabled=triple_des_ciphers_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enable_backend_ssl30: Optional[pulumi.Input[bool]] = None, + enable_backend_tls10: Optional[pulumi.Input[bool]] = None, + enable_backend_tls11: Optional[pulumi.Input[bool]] = None, + enable_frontend_ssl30: Optional[pulumi.Input[bool]] = None, + enable_frontend_tls10: Optional[pulumi.Input[bool]] = None, + enable_frontend_tls11: Optional[pulumi.Input[bool]] = None, + tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled: Optional[pulumi.Input[bool]] = None, + tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled: Optional[pulumi.Input[bool]] = None, + tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled: Optional[pulumi.Input[bool]] = None, + tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled: Optional[pulumi.Input[bool]] = None, + tls_rsa_with_aes128_cbc_sha256_ciphers_enabled: Optional[pulumi.Input[bool]] = None, + tls_rsa_with_aes128_cbc_sha_ciphers_enabled: Optional[pulumi.Input[bool]] = None, + tls_rsa_with_aes128_gcm_sha256_ciphers_enabled: Optional[pulumi.Input[bool]] = None, + tls_rsa_with_aes256_cbc_sha256_ciphers_enabled: Optional[pulumi.Input[bool]] = None, + tls_rsa_with_aes256_cbc_sha_ciphers_enabled: Optional[pulumi.Input[bool]] = None, + tls_rsa_with_aes256_gcm_sha384_ciphers_enabled: Optional[pulumi.Input[bool]] = None, + triple_des_ciphers_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enable_backend_ssl30 is None and 'enableBackendSsl30' in kwargs: + enable_backend_ssl30 = kwargs['enableBackendSsl30'] + if enable_backend_tls10 is None and 'enableBackendTls10' in kwargs: + enable_backend_tls10 = kwargs['enableBackendTls10'] + if enable_backend_tls11 is None and 'enableBackendTls11' in kwargs: + enable_backend_tls11 = kwargs['enableBackendTls11'] + if enable_frontend_ssl30 is None and 'enableFrontendSsl30' in kwargs: + enable_frontend_ssl30 = kwargs['enableFrontendSsl30'] + if enable_frontend_tls10 is None and 'enableFrontendTls10' in kwargs: + enable_frontend_tls10 = kwargs['enableFrontendTls10'] + if enable_frontend_tls11 is None and 'enableFrontendTls11' in kwargs: + enable_frontend_tls11 = kwargs['enableFrontendTls11'] + if tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled is None and 'tlsEcdheEcdsaWithAes128CbcShaCiphersEnabled' in kwargs: + tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled = kwargs['tlsEcdheEcdsaWithAes128CbcShaCiphersEnabled'] + if tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled is None and 'tlsEcdheEcdsaWithAes256CbcShaCiphersEnabled' in kwargs: + tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled = kwargs['tlsEcdheEcdsaWithAes256CbcShaCiphersEnabled'] + if tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled is None and 'tlsEcdheRsaWithAes128CbcShaCiphersEnabled' in kwargs: + tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled = kwargs['tlsEcdheRsaWithAes128CbcShaCiphersEnabled'] + if tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled is None and 'tlsEcdheRsaWithAes256CbcShaCiphersEnabled' in kwargs: + tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled = kwargs['tlsEcdheRsaWithAes256CbcShaCiphersEnabled'] + if tls_rsa_with_aes128_cbc_sha256_ciphers_enabled is None and 'tlsRsaWithAes128CbcSha256CiphersEnabled' in kwargs: + tls_rsa_with_aes128_cbc_sha256_ciphers_enabled = kwargs['tlsRsaWithAes128CbcSha256CiphersEnabled'] + if tls_rsa_with_aes128_cbc_sha_ciphers_enabled is None and 'tlsRsaWithAes128CbcShaCiphersEnabled' in kwargs: + tls_rsa_with_aes128_cbc_sha_ciphers_enabled = kwargs['tlsRsaWithAes128CbcShaCiphersEnabled'] + if tls_rsa_with_aes128_gcm_sha256_ciphers_enabled is None and 'tlsRsaWithAes128GcmSha256CiphersEnabled' in kwargs: + tls_rsa_with_aes128_gcm_sha256_ciphers_enabled = kwargs['tlsRsaWithAes128GcmSha256CiphersEnabled'] + if tls_rsa_with_aes256_cbc_sha256_ciphers_enabled is None and 'tlsRsaWithAes256CbcSha256CiphersEnabled' in kwargs: + tls_rsa_with_aes256_cbc_sha256_ciphers_enabled = kwargs['tlsRsaWithAes256CbcSha256CiphersEnabled'] + if tls_rsa_with_aes256_cbc_sha_ciphers_enabled is None and 'tlsRsaWithAes256CbcShaCiphersEnabled' in kwargs: + tls_rsa_with_aes256_cbc_sha_ciphers_enabled = kwargs['tlsRsaWithAes256CbcShaCiphersEnabled'] + if tls_rsa_with_aes256_gcm_sha384_ciphers_enabled is None and 'tlsRsaWithAes256GcmSha384CiphersEnabled' in kwargs: + tls_rsa_with_aes256_gcm_sha384_ciphers_enabled = kwargs['tlsRsaWithAes256GcmSha384CiphersEnabled'] + if triple_des_ciphers_enabled is None and 'tripleDesCiphersEnabled' in kwargs: + triple_des_ciphers_enabled = kwargs['tripleDesCiphersEnabled'] + if enable_backend_ssl30 is not None: - pulumi.set(__self__, "enable_backend_ssl30", enable_backend_ssl30) + _setter("enable_backend_ssl30", enable_backend_ssl30) if enable_backend_tls10 is not None: - pulumi.set(__self__, "enable_backend_tls10", enable_backend_tls10) + _setter("enable_backend_tls10", enable_backend_tls10) if enable_backend_tls11 is not None: - pulumi.set(__self__, "enable_backend_tls11", enable_backend_tls11) + _setter("enable_backend_tls11", enable_backend_tls11) if enable_frontend_ssl30 is not None: - pulumi.set(__self__, "enable_frontend_ssl30", enable_frontend_ssl30) + _setter("enable_frontend_ssl30", enable_frontend_ssl30) if enable_frontend_tls10 is not None: - pulumi.set(__self__, "enable_frontend_tls10", enable_frontend_tls10) + _setter("enable_frontend_tls10", enable_frontend_tls10) if enable_frontend_tls11 is not None: - pulumi.set(__self__, "enable_frontend_tls11", enable_frontend_tls11) + _setter("enable_frontend_tls11", enable_frontend_tls11) if tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled is not None: - pulumi.set(__self__, "tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled", tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled) + _setter("tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled", tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled) if tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled is not None: - pulumi.set(__self__, "tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled", tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled) + _setter("tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled", tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled) if tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled is not None: - pulumi.set(__self__, "tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled", tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled) + _setter("tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled", tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled) if tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled is not None: - pulumi.set(__self__, "tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled", tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled) + _setter("tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled", tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled) if tls_rsa_with_aes128_cbc_sha256_ciphers_enabled is not None: - pulumi.set(__self__, "tls_rsa_with_aes128_cbc_sha256_ciphers_enabled", tls_rsa_with_aes128_cbc_sha256_ciphers_enabled) + _setter("tls_rsa_with_aes128_cbc_sha256_ciphers_enabled", tls_rsa_with_aes128_cbc_sha256_ciphers_enabled) if tls_rsa_with_aes128_cbc_sha_ciphers_enabled is not None: - pulumi.set(__self__, "tls_rsa_with_aes128_cbc_sha_ciphers_enabled", tls_rsa_with_aes128_cbc_sha_ciphers_enabled) + _setter("tls_rsa_with_aes128_cbc_sha_ciphers_enabled", tls_rsa_with_aes128_cbc_sha_ciphers_enabled) if tls_rsa_with_aes128_gcm_sha256_ciphers_enabled is not None: - pulumi.set(__self__, "tls_rsa_with_aes128_gcm_sha256_ciphers_enabled", tls_rsa_with_aes128_gcm_sha256_ciphers_enabled) + _setter("tls_rsa_with_aes128_gcm_sha256_ciphers_enabled", tls_rsa_with_aes128_gcm_sha256_ciphers_enabled) if tls_rsa_with_aes256_cbc_sha256_ciphers_enabled is not None: - pulumi.set(__self__, "tls_rsa_with_aes256_cbc_sha256_ciphers_enabled", tls_rsa_with_aes256_cbc_sha256_ciphers_enabled) + _setter("tls_rsa_with_aes256_cbc_sha256_ciphers_enabled", tls_rsa_with_aes256_cbc_sha256_ciphers_enabled) if tls_rsa_with_aes256_cbc_sha_ciphers_enabled is not None: - pulumi.set(__self__, "tls_rsa_with_aes256_cbc_sha_ciphers_enabled", tls_rsa_with_aes256_cbc_sha_ciphers_enabled) + _setter("tls_rsa_with_aes256_cbc_sha_ciphers_enabled", tls_rsa_with_aes256_cbc_sha_ciphers_enabled) if tls_rsa_with_aes256_gcm_sha384_ciphers_enabled is not None: - pulumi.set(__self__, "tls_rsa_with_aes256_gcm_sha384_ciphers_enabled", tls_rsa_with_aes256_gcm_sha384_ciphers_enabled) + _setter("tls_rsa_with_aes256_gcm_sha384_ciphers_enabled", tls_rsa_with_aes256_gcm_sha384_ciphers_enabled) if triple_des_ciphers_enabled is not None: - pulumi.set(__self__, "triple_des_ciphers_enabled", triple_des_ciphers_enabled) + _setter("triple_des_ciphers_enabled", triple_des_ciphers_enabled) @property @pulumi.getter(name="enableBackendSsl30") @@ -6949,7 +9104,20 @@ def __init__(__self__, *, """ :param pulumi.Input[bool] enabled: Should anonymous users be redirected to the sign in page? """ - pulumi.set(__self__, "enabled", enabled) + ServiceSignInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) @property @pulumi.getter @@ -6973,8 +9141,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Can users sign up on the development portal? :param pulumi.Input['ServiceSignUpTermsOfServiceArgs'] terms_of_service: A `terms_of_service` block as defined below. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "terms_of_service", terms_of_service) + ServiceSignUpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + terms_of_service=terms_of_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + terms_of_service: Optional[pulumi.Input['ServiceSignUpTermsOfServiceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if terms_of_service is None and 'termsOfService' in kwargs: + terms_of_service = kwargs['termsOfService'] + if terms_of_service is None: + raise TypeError("Missing 'terms_of_service' argument") + + _setter("enabled", enabled) + _setter("terms_of_service", terms_of_service) @property @pulumi.getter @@ -7012,10 +9199,31 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Should Terms of Service be displayed during sign up?. :param pulumi.Input[str] text: The Terms of Service which users are required to agree to in order to sign up. """ - pulumi.set(__self__, "consent_required", consent_required) - pulumi.set(__self__, "enabled", enabled) + ServiceSignUpTermsOfServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consent_required=consent_required, + enabled=enabled, + text=text, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consent_required: Optional[pulumi.Input[bool]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + text: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consent_required is None and 'consentRequired' in kwargs: + consent_required = kwargs['consentRequired'] + if consent_required is None: + raise TypeError("Missing 'consent_required' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("consent_required", consent_required) + _setter("enabled", enabled) if text is not None: - pulumi.set(__self__, "text", text) + _setter("text", text) @property @pulumi.getter(name="consentRequired") @@ -7067,13 +9275,38 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_key: Secondary access key for the tenant access information contract. :param pulumi.Input[str] tenant_id: The identifier for the tenant access information contract. """ - pulumi.set(__self__, "enabled", enabled) + ServiceTenantAccessArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + primary_key=primary_key, + secondary_key=secondary_key, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("enabled", enabled) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -7131,7 +9364,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] subnet_id: The id of the subnet that will be used for the API Management. """ - pulumi.set(__self__, "subnet_id", subnet_id) + ServiceVirtualNetworkConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="subnetId") diff --git a/sdk/python/pulumi_azure/apimanagement/api.py b/sdk/python/pulumi_azure/apimanagement/api.py index b43f193fa1..5210039348 100644 --- a/sdk/python/pulumi_azure/apimanagement/api.py +++ b/sdk/python/pulumi_azure/apimanagement/api.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -73,54 +73,149 @@ def __init__(__self__, *, > **NOTE:** When `version` is set, `version_set_id` must also be specified """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "revision", revision) + ApiArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + resource_group_name=resource_group_name, + revision=revision, + api_type=api_type, + contact=contact, + description=description, + display_name=display_name, + import_=import_, + license=license, + name=name, + oauth2_authorization=oauth2_authorization, + openid_authentication=openid_authentication, + path=path, + protocols=protocols, + revision_description=revision_description, + service_url=service_url, + soap_pass_through=soap_pass_through, + source_api_id=source_api_id, + subscription_key_parameter_names=subscription_key_parameter_names, + subscription_required=subscription_required, + terms_of_service_url=terms_of_service_url, + version=version, + version_description=version_description, + version_set_id=version_set_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + revision: Optional[pulumi.Input[str]] = None, + api_type: Optional[pulumi.Input[str]] = None, + contact: Optional[pulumi.Input['ApiContactArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + import_: Optional[pulumi.Input['ApiImportArgs']] = None, + license: Optional[pulumi.Input['ApiLicenseArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + oauth2_authorization: Optional[pulumi.Input['ApiOauth2AuthorizationArgs']] = None, + openid_authentication: Optional[pulumi.Input['ApiOpenidAuthenticationArgs']] = None, + path: Optional[pulumi.Input[str]] = None, + protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + revision_description: Optional[pulumi.Input[str]] = None, + service_url: Optional[pulumi.Input[str]] = None, + soap_pass_through: Optional[pulumi.Input[bool]] = None, + source_api_id: Optional[pulumi.Input[str]] = None, + subscription_key_parameter_names: Optional[pulumi.Input['ApiSubscriptionKeyParameterNamesArgs']] = None, + subscription_required: Optional[pulumi.Input[bool]] = None, + terms_of_service_url: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + version_description: Optional[pulumi.Input[str]] = None, + version_set_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if revision is None: + raise TypeError("Missing 'revision' argument") + if api_type is None and 'apiType' in kwargs: + api_type = kwargs['apiType'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if import_ is None and 'import' in kwargs: + import_ = kwargs['import'] + if oauth2_authorization is None and 'oauth2Authorization' in kwargs: + oauth2_authorization = kwargs['oauth2Authorization'] + if openid_authentication is None and 'openidAuthentication' in kwargs: + openid_authentication = kwargs['openidAuthentication'] + if revision_description is None and 'revisionDescription' in kwargs: + revision_description = kwargs['revisionDescription'] + if service_url is None and 'serviceUrl' in kwargs: + service_url = kwargs['serviceUrl'] + if soap_pass_through is None and 'soapPassThrough' in kwargs: + soap_pass_through = kwargs['soapPassThrough'] + if source_api_id is None and 'sourceApiId' in kwargs: + source_api_id = kwargs['sourceApiId'] + if subscription_key_parameter_names is None and 'subscriptionKeyParameterNames' in kwargs: + subscription_key_parameter_names = kwargs['subscriptionKeyParameterNames'] + if subscription_required is None and 'subscriptionRequired' in kwargs: + subscription_required = kwargs['subscriptionRequired'] + if terms_of_service_url is None and 'termsOfServiceUrl' in kwargs: + terms_of_service_url = kwargs['termsOfServiceUrl'] + if version_description is None and 'versionDescription' in kwargs: + version_description = kwargs['versionDescription'] + if version_set_id is None and 'versionSetId' in kwargs: + version_set_id = kwargs['versionSetId'] + + _setter("api_management_name", api_management_name) + _setter("resource_group_name", resource_group_name) + _setter("revision", revision) if api_type is not None: - pulumi.set(__self__, "api_type", api_type) + _setter("api_type", api_type) if contact is not None: - pulumi.set(__self__, "contact", contact) + _setter("contact", contact) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if import_ is not None: - pulumi.set(__self__, "import_", import_) + _setter("import_", import_) if license is not None: - pulumi.set(__self__, "license", license) + _setter("license", license) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if oauth2_authorization is not None: - pulumi.set(__self__, "oauth2_authorization", oauth2_authorization) + _setter("oauth2_authorization", oauth2_authorization) if openid_authentication is not None: - pulumi.set(__self__, "openid_authentication", openid_authentication) + _setter("openid_authentication", openid_authentication) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) if revision_description is not None: - pulumi.set(__self__, "revision_description", revision_description) + _setter("revision_description", revision_description) if service_url is not None: - pulumi.set(__self__, "service_url", service_url) + _setter("service_url", service_url) if soap_pass_through is not None: warnings.warn("""`soap_pass_through` will be removed in favour of the property `api_type` in version 4.0 of the AzureRM Provider""", DeprecationWarning) pulumi.log.warn("""soap_pass_through is deprecated: `soap_pass_through` will be removed in favour of the property `api_type` in version 4.0 of the AzureRM Provider""") if soap_pass_through is not None: - pulumi.set(__self__, "soap_pass_through", soap_pass_through) + _setter("soap_pass_through", soap_pass_through) if source_api_id is not None: - pulumi.set(__self__, "source_api_id", source_api_id) + _setter("source_api_id", source_api_id) if subscription_key_parameter_names is not None: - pulumi.set(__self__, "subscription_key_parameter_names", subscription_key_parameter_names) + _setter("subscription_key_parameter_names", subscription_key_parameter_names) if subscription_required is not None: - pulumi.set(__self__, "subscription_required", subscription_required) + _setter("subscription_required", subscription_required) if terms_of_service_url is not None: - pulumi.set(__self__, "terms_of_service_url", terms_of_service_url) + _setter("terms_of_service_url", terms_of_service_url) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if version_description is not None: - pulumi.set(__self__, "version_description", version_description) + _setter("version_description", version_description) if version_set_id is not None: - pulumi.set(__self__, "version_set_id", version_set_id) + _setter("version_set_id", version_set_id) @property @pulumi.getter(name="apiManagementName") @@ -484,61 +579,158 @@ def __init__(__self__, *, > **NOTE:** When `version` is set, `version_set_id` must also be specified """ + _ApiState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + api_type=api_type, + contact=contact, + description=description, + display_name=display_name, + import_=import_, + is_current=is_current, + is_online=is_online, + license=license, + name=name, + oauth2_authorization=oauth2_authorization, + openid_authentication=openid_authentication, + path=path, + protocols=protocols, + resource_group_name=resource_group_name, + revision=revision, + revision_description=revision_description, + service_url=service_url, + soap_pass_through=soap_pass_through, + source_api_id=source_api_id, + subscription_key_parameter_names=subscription_key_parameter_names, + subscription_required=subscription_required, + terms_of_service_url=terms_of_service_url, + version=version, + version_description=version_description, + version_set_id=version_set_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + api_type: Optional[pulumi.Input[str]] = None, + contact: Optional[pulumi.Input['ApiContactArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + import_: Optional[pulumi.Input['ApiImportArgs']] = None, + is_current: Optional[pulumi.Input[bool]] = None, + is_online: Optional[pulumi.Input[bool]] = None, + license: Optional[pulumi.Input['ApiLicenseArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + oauth2_authorization: Optional[pulumi.Input['ApiOauth2AuthorizationArgs']] = None, + openid_authentication: Optional[pulumi.Input['ApiOpenidAuthenticationArgs']] = None, + path: Optional[pulumi.Input[str]] = None, + protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + revision: Optional[pulumi.Input[str]] = None, + revision_description: Optional[pulumi.Input[str]] = None, + service_url: Optional[pulumi.Input[str]] = None, + soap_pass_through: Optional[pulumi.Input[bool]] = None, + source_api_id: Optional[pulumi.Input[str]] = None, + subscription_key_parameter_names: Optional[pulumi.Input['ApiSubscriptionKeyParameterNamesArgs']] = None, + subscription_required: Optional[pulumi.Input[bool]] = None, + terms_of_service_url: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + version_description: Optional[pulumi.Input[str]] = None, + version_set_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_type is None and 'apiType' in kwargs: + api_type = kwargs['apiType'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if import_ is None and 'import' in kwargs: + import_ = kwargs['import'] + if is_current is None and 'isCurrent' in kwargs: + is_current = kwargs['isCurrent'] + if is_online is None and 'isOnline' in kwargs: + is_online = kwargs['isOnline'] + if oauth2_authorization is None and 'oauth2Authorization' in kwargs: + oauth2_authorization = kwargs['oauth2Authorization'] + if openid_authentication is None and 'openidAuthentication' in kwargs: + openid_authentication = kwargs['openidAuthentication'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if revision_description is None and 'revisionDescription' in kwargs: + revision_description = kwargs['revisionDescription'] + if service_url is None and 'serviceUrl' in kwargs: + service_url = kwargs['serviceUrl'] + if soap_pass_through is None and 'soapPassThrough' in kwargs: + soap_pass_through = kwargs['soapPassThrough'] + if source_api_id is None and 'sourceApiId' in kwargs: + source_api_id = kwargs['sourceApiId'] + if subscription_key_parameter_names is None and 'subscriptionKeyParameterNames' in kwargs: + subscription_key_parameter_names = kwargs['subscriptionKeyParameterNames'] + if subscription_required is None and 'subscriptionRequired' in kwargs: + subscription_required = kwargs['subscriptionRequired'] + if terms_of_service_url is None and 'termsOfServiceUrl' in kwargs: + terms_of_service_url = kwargs['termsOfServiceUrl'] + if version_description is None and 'versionDescription' in kwargs: + version_description = kwargs['versionDescription'] + if version_set_id is None and 'versionSetId' in kwargs: + version_set_id = kwargs['versionSetId'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if api_type is not None: - pulumi.set(__self__, "api_type", api_type) + _setter("api_type", api_type) if contact is not None: - pulumi.set(__self__, "contact", contact) + _setter("contact", contact) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if import_ is not None: - pulumi.set(__self__, "import_", import_) + _setter("import_", import_) if is_current is not None: - pulumi.set(__self__, "is_current", is_current) + _setter("is_current", is_current) if is_online is not None: - pulumi.set(__self__, "is_online", is_online) + _setter("is_online", is_online) if license is not None: - pulumi.set(__self__, "license", license) + _setter("license", license) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if oauth2_authorization is not None: - pulumi.set(__self__, "oauth2_authorization", oauth2_authorization) + _setter("oauth2_authorization", oauth2_authorization) if openid_authentication is not None: - pulumi.set(__self__, "openid_authentication", openid_authentication) + _setter("openid_authentication", openid_authentication) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if revision is not None: - pulumi.set(__self__, "revision", revision) + _setter("revision", revision) if revision_description is not None: - pulumi.set(__self__, "revision_description", revision_description) + _setter("revision_description", revision_description) if service_url is not None: - pulumi.set(__self__, "service_url", service_url) + _setter("service_url", service_url) if soap_pass_through is not None: warnings.warn("""`soap_pass_through` will be removed in favour of the property `api_type` in version 4.0 of the AzureRM Provider""", DeprecationWarning) pulumi.log.warn("""soap_pass_through is deprecated: `soap_pass_through` will be removed in favour of the property `api_type` in version 4.0 of the AzureRM Provider""") if soap_pass_through is not None: - pulumi.set(__self__, "soap_pass_through", soap_pass_through) + _setter("soap_pass_through", soap_pass_through) if source_api_id is not None: - pulumi.set(__self__, "source_api_id", source_api_id) + _setter("source_api_id", source_api_id) if subscription_key_parameter_names is not None: - pulumi.set(__self__, "subscription_key_parameter_names", subscription_key_parameter_names) + _setter("subscription_key_parameter_names", subscription_key_parameter_names) if subscription_required is not None: - pulumi.set(__self__, "subscription_required", subscription_required) + _setter("subscription_required", subscription_required) if terms_of_service_url is not None: - pulumi.set(__self__, "terms_of_service_url", terms_of_service_url) + _setter("terms_of_service_url", terms_of_service_url) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if version_description is not None: - pulumi.set(__self__, "version_description", version_description) + _setter("version_description", version_description) if version_set_id is not None: - pulumi.set(__self__, "version_set_id", version_set_id) + _setter("version_set_id", version_set_id) @property @pulumi.getter(name="apiManagementName") @@ -1015,6 +1207,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApiArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1057,13 +1253,38 @@ def _internal_init(__self__, raise TypeError("Missing required property 'api_management_name'") __props__.__dict__["api_management_name"] = api_management_name __props__.__dict__["api_type"] = api_type + if contact is not None and not isinstance(contact, ApiContactArgs): + contact = contact or {} + def _setter(key, value): + contact[key] = value + ApiContactArgs._configure(_setter, **contact) __props__.__dict__["contact"] = contact __props__.__dict__["description"] = description __props__.__dict__["display_name"] = display_name + if import_ is not None and not isinstance(import_, ApiImportArgs): + import_ = import_ or {} + def _setter(key, value): + import_[key] = value + ApiImportArgs._configure(_setter, **import_) __props__.__dict__["import_"] = import_ + if license is not None and not isinstance(license, ApiLicenseArgs): + license = license or {} + def _setter(key, value): + license[key] = value + ApiLicenseArgs._configure(_setter, **license) __props__.__dict__["license"] = license __props__.__dict__["name"] = name + if oauth2_authorization is not None and not isinstance(oauth2_authorization, ApiOauth2AuthorizationArgs): + oauth2_authorization = oauth2_authorization or {} + def _setter(key, value): + oauth2_authorization[key] = value + ApiOauth2AuthorizationArgs._configure(_setter, **oauth2_authorization) __props__.__dict__["oauth2_authorization"] = oauth2_authorization + if openid_authentication is not None and not isinstance(openid_authentication, ApiOpenidAuthenticationArgs): + openid_authentication = openid_authentication or {} + def _setter(key, value): + openid_authentication[key] = value + ApiOpenidAuthenticationArgs._configure(_setter, **openid_authentication) __props__.__dict__["openid_authentication"] = openid_authentication __props__.__dict__["path"] = path __props__.__dict__["protocols"] = protocols @@ -1077,6 +1298,11 @@ def _internal_init(__self__, __props__.__dict__["service_url"] = service_url __props__.__dict__["soap_pass_through"] = soap_pass_through __props__.__dict__["source_api_id"] = source_api_id + if subscription_key_parameter_names is not None and not isinstance(subscription_key_parameter_names, ApiSubscriptionKeyParameterNamesArgs): + subscription_key_parameter_names = subscription_key_parameter_names or {} + def _setter(key, value): + subscription_key_parameter_names[key] = value + ApiSubscriptionKeyParameterNamesArgs._configure(_setter, **subscription_key_parameter_names) __props__.__dict__["subscription_key_parameter_names"] = subscription_key_parameter_names __props__.__dict__["subscription_required"] = subscription_required __props__.__dict__["terms_of_service_url"] = terms_of_service_url diff --git a/sdk/python/pulumi_azure/apimanagement/api_diagnostic.py b/sdk/python/pulumi_azure/apimanagement/api_diagnostic.py index 0c6930689c..0739de7964 100644 --- a/sdk/python/pulumi_azure/apimanagement/api_diagnostic.py +++ b/sdk/python/pulumi_azure/apimanagement/api_diagnostic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,31 +49,106 @@ def __init__(__self__, *, :param pulumi.Input[float] sampling_percentage: Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`. :param pulumi.Input[str] verbosity: Logging verbosity. Possible values are `verbose`, `information` or `error`. """ - pulumi.set(__self__, "api_management_logger_id", api_management_logger_id) - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "api_name", api_name) - pulumi.set(__self__, "identifier", identifier) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ApiDiagnosticArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_logger_id=api_management_logger_id, + api_management_name=api_management_name, + api_name=api_name, + identifier=identifier, + resource_group_name=resource_group_name, + always_log_errors=always_log_errors, + backend_request=backend_request, + backend_response=backend_response, + frontend_request=frontend_request, + frontend_response=frontend_response, + http_correlation_protocol=http_correlation_protocol, + log_client_ip=log_client_ip, + operation_name_format=operation_name_format, + sampling_percentage=sampling_percentage, + verbosity=verbosity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_logger_id: Optional[pulumi.Input[str]] = None, + api_management_name: Optional[pulumi.Input[str]] = None, + api_name: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + always_log_errors: Optional[pulumi.Input[bool]] = None, + backend_request: Optional[pulumi.Input['ApiDiagnosticBackendRequestArgs']] = None, + backend_response: Optional[pulumi.Input['ApiDiagnosticBackendResponseArgs']] = None, + frontend_request: Optional[pulumi.Input['ApiDiagnosticFrontendRequestArgs']] = None, + frontend_response: Optional[pulumi.Input['ApiDiagnosticFrontendResponseArgs']] = None, + http_correlation_protocol: Optional[pulumi.Input[str]] = None, + log_client_ip: Optional[pulumi.Input[bool]] = None, + operation_name_format: Optional[pulumi.Input[str]] = None, + sampling_percentage: Optional[pulumi.Input[float]] = None, + verbosity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_logger_id is None and 'apiManagementLoggerId' in kwargs: + api_management_logger_id = kwargs['apiManagementLoggerId'] + if api_management_logger_id is None: + raise TypeError("Missing 'api_management_logger_id' argument") + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if api_name is None and 'apiName' in kwargs: + api_name = kwargs['apiName'] + if api_name is None: + raise TypeError("Missing 'api_name' argument") + if identifier is None: + raise TypeError("Missing 'identifier' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if always_log_errors is None and 'alwaysLogErrors' in kwargs: + always_log_errors = kwargs['alwaysLogErrors'] + if backend_request is None and 'backendRequest' in kwargs: + backend_request = kwargs['backendRequest'] + if backend_response is None and 'backendResponse' in kwargs: + backend_response = kwargs['backendResponse'] + if frontend_request is None and 'frontendRequest' in kwargs: + frontend_request = kwargs['frontendRequest'] + if frontend_response is None and 'frontendResponse' in kwargs: + frontend_response = kwargs['frontendResponse'] + if http_correlation_protocol is None and 'httpCorrelationProtocol' in kwargs: + http_correlation_protocol = kwargs['httpCorrelationProtocol'] + if log_client_ip is None and 'logClientIp' in kwargs: + log_client_ip = kwargs['logClientIp'] + if operation_name_format is None and 'operationNameFormat' in kwargs: + operation_name_format = kwargs['operationNameFormat'] + if sampling_percentage is None and 'samplingPercentage' in kwargs: + sampling_percentage = kwargs['samplingPercentage'] + + _setter("api_management_logger_id", api_management_logger_id) + _setter("api_management_name", api_management_name) + _setter("api_name", api_name) + _setter("identifier", identifier) + _setter("resource_group_name", resource_group_name) if always_log_errors is not None: - pulumi.set(__self__, "always_log_errors", always_log_errors) + _setter("always_log_errors", always_log_errors) if backend_request is not None: - pulumi.set(__self__, "backend_request", backend_request) + _setter("backend_request", backend_request) if backend_response is not None: - pulumi.set(__self__, "backend_response", backend_response) + _setter("backend_response", backend_response) if frontend_request is not None: - pulumi.set(__self__, "frontend_request", frontend_request) + _setter("frontend_request", frontend_request) if frontend_response is not None: - pulumi.set(__self__, "frontend_response", frontend_response) + _setter("frontend_response", frontend_response) if http_correlation_protocol is not None: - pulumi.set(__self__, "http_correlation_protocol", http_correlation_protocol) + _setter("http_correlation_protocol", http_correlation_protocol) if log_client_ip is not None: - pulumi.set(__self__, "log_client_ip", log_client_ip) + _setter("log_client_ip", log_client_ip) if operation_name_format is not None: - pulumi.set(__self__, "operation_name_format", operation_name_format) + _setter("operation_name_format", operation_name_format) if sampling_percentage is not None: - pulumi.set(__self__, "sampling_percentage", sampling_percentage) + _setter("sampling_percentage", sampling_percentage) if verbosity is not None: - pulumi.set(__self__, "verbosity", verbosity) + _setter("verbosity", verbosity) @property @pulumi.getter(name="apiManagementLoggerId") @@ -292,36 +367,101 @@ def __init__(__self__, *, :param pulumi.Input[float] sampling_percentage: Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`. :param pulumi.Input[str] verbosity: Logging verbosity. Possible values are `verbose`, `information` or `error`. """ + _ApiDiagnosticState._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_log_errors=always_log_errors, + api_management_logger_id=api_management_logger_id, + api_management_name=api_management_name, + api_name=api_name, + backend_request=backend_request, + backend_response=backend_response, + frontend_request=frontend_request, + frontend_response=frontend_response, + http_correlation_protocol=http_correlation_protocol, + identifier=identifier, + log_client_ip=log_client_ip, + operation_name_format=operation_name_format, + resource_group_name=resource_group_name, + sampling_percentage=sampling_percentage, + verbosity=verbosity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_log_errors: Optional[pulumi.Input[bool]] = None, + api_management_logger_id: Optional[pulumi.Input[str]] = None, + api_management_name: Optional[pulumi.Input[str]] = None, + api_name: Optional[pulumi.Input[str]] = None, + backend_request: Optional[pulumi.Input['ApiDiagnosticBackendRequestArgs']] = None, + backend_response: Optional[pulumi.Input['ApiDiagnosticBackendResponseArgs']] = None, + frontend_request: Optional[pulumi.Input['ApiDiagnosticFrontendRequestArgs']] = None, + frontend_response: Optional[pulumi.Input['ApiDiagnosticFrontendResponseArgs']] = None, + http_correlation_protocol: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input[str]] = None, + log_client_ip: Optional[pulumi.Input[bool]] = None, + operation_name_format: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sampling_percentage: Optional[pulumi.Input[float]] = None, + verbosity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_log_errors is None and 'alwaysLogErrors' in kwargs: + always_log_errors = kwargs['alwaysLogErrors'] + if api_management_logger_id is None and 'apiManagementLoggerId' in kwargs: + api_management_logger_id = kwargs['apiManagementLoggerId'] + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_name is None and 'apiName' in kwargs: + api_name = kwargs['apiName'] + if backend_request is None and 'backendRequest' in kwargs: + backend_request = kwargs['backendRequest'] + if backend_response is None and 'backendResponse' in kwargs: + backend_response = kwargs['backendResponse'] + if frontend_request is None and 'frontendRequest' in kwargs: + frontend_request = kwargs['frontendRequest'] + if frontend_response is None and 'frontendResponse' in kwargs: + frontend_response = kwargs['frontendResponse'] + if http_correlation_protocol is None and 'httpCorrelationProtocol' in kwargs: + http_correlation_protocol = kwargs['httpCorrelationProtocol'] + if log_client_ip is None and 'logClientIp' in kwargs: + log_client_ip = kwargs['logClientIp'] + if operation_name_format is None and 'operationNameFormat' in kwargs: + operation_name_format = kwargs['operationNameFormat'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sampling_percentage is None and 'samplingPercentage' in kwargs: + sampling_percentage = kwargs['samplingPercentage'] + if always_log_errors is not None: - pulumi.set(__self__, "always_log_errors", always_log_errors) + _setter("always_log_errors", always_log_errors) if api_management_logger_id is not None: - pulumi.set(__self__, "api_management_logger_id", api_management_logger_id) + _setter("api_management_logger_id", api_management_logger_id) if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if api_name is not None: - pulumi.set(__self__, "api_name", api_name) + _setter("api_name", api_name) if backend_request is not None: - pulumi.set(__self__, "backend_request", backend_request) + _setter("backend_request", backend_request) if backend_response is not None: - pulumi.set(__self__, "backend_response", backend_response) + _setter("backend_response", backend_response) if frontend_request is not None: - pulumi.set(__self__, "frontend_request", frontend_request) + _setter("frontend_request", frontend_request) if frontend_response is not None: - pulumi.set(__self__, "frontend_response", frontend_response) + _setter("frontend_response", frontend_response) if http_correlation_protocol is not None: - pulumi.set(__self__, "http_correlation_protocol", http_correlation_protocol) + _setter("http_correlation_protocol", http_correlation_protocol) if identifier is not None: - pulumi.set(__self__, "identifier", identifier) + _setter("identifier", identifier) if log_client_ip is not None: - pulumi.set(__self__, "log_client_ip", log_client_ip) + _setter("log_client_ip", log_client_ip) if operation_name_format is not None: - pulumi.set(__self__, "operation_name_format", operation_name_format) + _setter("operation_name_format", operation_name_format) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sampling_percentage is not None: - pulumi.set(__self__, "sampling_percentage", sampling_percentage) + _setter("sampling_percentage", sampling_percentage) if verbosity is not None: - pulumi.set(__self__, "verbosity", verbosity) + _setter("verbosity", verbosity) @property @pulumi.getter(name="alwaysLogErrors") @@ -739,6 +879,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApiDiagnosticArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -778,9 +922,29 @@ def _internal_init(__self__, if api_name is None and not opts.urn: raise TypeError("Missing required property 'api_name'") __props__.__dict__["api_name"] = api_name + if backend_request is not None and not isinstance(backend_request, ApiDiagnosticBackendRequestArgs): + backend_request = backend_request or {} + def _setter(key, value): + backend_request[key] = value + ApiDiagnosticBackendRequestArgs._configure(_setter, **backend_request) __props__.__dict__["backend_request"] = backend_request + if backend_response is not None and not isinstance(backend_response, ApiDiagnosticBackendResponseArgs): + backend_response = backend_response or {} + def _setter(key, value): + backend_response[key] = value + ApiDiagnosticBackendResponseArgs._configure(_setter, **backend_response) __props__.__dict__["backend_response"] = backend_response + if frontend_request is not None and not isinstance(frontend_request, ApiDiagnosticFrontendRequestArgs): + frontend_request = frontend_request or {} + def _setter(key, value): + frontend_request[key] = value + ApiDiagnosticFrontendRequestArgs._configure(_setter, **frontend_request) __props__.__dict__["frontend_request"] = frontend_request + if frontend_response is not None and not isinstance(frontend_response, ApiDiagnosticFrontendResponseArgs): + frontend_response = frontend_response or {} + def _setter(key, value): + frontend_response[key] = value + ApiDiagnosticFrontendResponseArgs._configure(_setter, **frontend_response) __props__.__dict__["frontend_response"] = frontend_response __props__.__dict__["http_correlation_protocol"] = http_correlation_protocol if identifier is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/apimanagement/api_operation.py b/sdk/python/pulumi_azure/apimanagement/api_operation.py index dea667365a..34c8aef394 100644 --- a/sdk/python/pulumi_azure/apimanagement/api_operation.py +++ b/sdk/python/pulumi_azure/apimanagement/api_operation.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,21 +41,80 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ApiOperationResponseArgs']]] responses: One or more `response` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['ApiOperationTemplateParameterArgs']]] template_parameters: One or more `template_parameter` blocks as defined below. Required if `url_template` contains one or more parameters. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "api_name", api_name) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "method", method) - pulumi.set(__self__, "operation_id", operation_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "url_template", url_template) + ApiOperationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + api_name=api_name, + display_name=display_name, + method=method, + operation_id=operation_id, + resource_group_name=resource_group_name, + url_template=url_template, + description=description, + request=request, + responses=responses, + template_parameters=template_parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + api_name: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + method: Optional[pulumi.Input[str]] = None, + operation_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + url_template: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + request: Optional[pulumi.Input['ApiOperationRequestArgs']] = None, + responses: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationResponseArgs']]]] = None, + template_parameters: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationTemplateParameterArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if api_name is None and 'apiName' in kwargs: + api_name = kwargs['apiName'] + if api_name is None: + raise TypeError("Missing 'api_name' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if method is None: + raise TypeError("Missing 'method' argument") + if operation_id is None and 'operationId' in kwargs: + operation_id = kwargs['operationId'] + if operation_id is None: + raise TypeError("Missing 'operation_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if url_template is None and 'urlTemplate' in kwargs: + url_template = kwargs['urlTemplate'] + if url_template is None: + raise TypeError("Missing 'url_template' argument") + if template_parameters is None and 'templateParameters' in kwargs: + template_parameters = kwargs['templateParameters'] + + _setter("api_management_name", api_management_name) + _setter("api_name", api_name) + _setter("display_name", display_name) + _setter("method", method) + _setter("operation_id", operation_id) + _setter("resource_group_name", resource_group_name) + _setter("url_template", url_template) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if request is not None: - pulumi.set(__self__, "request", request) + _setter("request", request) if responses is not None: - pulumi.set(__self__, "responses", responses) + _setter("responses", responses) if template_parameters is not None: - pulumi.set(__self__, "template_parameters", template_parameters) + _setter("template_parameters", template_parameters) @property @pulumi.getter(name="apiManagementName") @@ -218,28 +277,73 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ApiOperationTemplateParameterArgs']]] template_parameters: One or more `template_parameter` blocks as defined below. Required if `url_template` contains one or more parameters. :param pulumi.Input[str] url_template: The relative URL Template identifying the target resource for this operation, which may include parameters. """ + _ApiOperationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + api_name=api_name, + description=description, + display_name=display_name, + method=method, + operation_id=operation_id, + request=request, + resource_group_name=resource_group_name, + responses=responses, + template_parameters=template_parameters, + url_template=url_template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + api_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + method: Optional[pulumi.Input[str]] = None, + operation_id: Optional[pulumi.Input[str]] = None, + request: Optional[pulumi.Input['ApiOperationRequestArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + responses: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationResponseArgs']]]] = None, + template_parameters: Optional[pulumi.Input[Sequence[pulumi.Input['ApiOperationTemplateParameterArgs']]]] = None, + url_template: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_name is None and 'apiName' in kwargs: + api_name = kwargs['apiName'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if operation_id is None and 'operationId' in kwargs: + operation_id = kwargs['operationId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if template_parameters is None and 'templateParameters' in kwargs: + template_parameters = kwargs['templateParameters'] + if url_template is None and 'urlTemplate' in kwargs: + url_template = kwargs['urlTemplate'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if api_name is not None: - pulumi.set(__self__, "api_name", api_name) + _setter("api_name", api_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if method is not None: - pulumi.set(__self__, "method", method) + _setter("method", method) if operation_id is not None: - pulumi.set(__self__, "operation_id", operation_id) + _setter("operation_id", operation_id) if request is not None: - pulumi.set(__self__, "request", request) + _setter("request", request) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if responses is not None: - pulumi.set(__self__, "responses", responses) + _setter("responses", responses) if template_parameters is not None: - pulumi.set(__self__, "template_parameters", template_parameters) + _setter("template_parameters", template_parameters) if url_template is not None: - pulumi.set(__self__, "url_template", url_template) + _setter("url_template", url_template) @property @pulumi.getter(name="apiManagementName") @@ -501,6 +605,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApiOperationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -542,6 +650,11 @@ def _internal_init(__self__, if operation_id is None and not opts.urn: raise TypeError("Missing required property 'operation_id'") __props__.__dict__["operation_id"] = operation_id + if request is not None and not isinstance(request, ApiOperationRequestArgs): + request = request or {} + def _setter(key, value): + request[key] = value + ApiOperationRequestArgs._configure(_setter, **request) __props__.__dict__["request"] = request if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") diff --git a/sdk/python/pulumi_azure/apimanagement/api_operation_policy.py b/sdk/python/pulumi_azure/apimanagement/api_operation_policy.py index 6d62267ea8..bf148dff89 100644 --- a/sdk/python/pulumi_azure/apimanagement/api_operation_policy.py +++ b/sdk/python/pulumi_azure/apimanagement/api_operation_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApiOperationPolicyArgs', 'ApiOperationPolicy'] @@ -29,14 +29,55 @@ def __init__(__self__, *, :param pulumi.Input[str] xml_content: The XML Content for this Policy. :param pulumi.Input[str] xml_link: A link to a Policy XML Document, which must be publicly available. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "api_name", api_name) - pulumi.set(__self__, "operation_id", operation_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ApiOperationPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + api_name=api_name, + operation_id=operation_id, + resource_group_name=resource_group_name, + xml_content=xml_content, + xml_link=xml_link, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + api_name: Optional[pulumi.Input[str]] = None, + operation_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + xml_content: Optional[pulumi.Input[str]] = None, + xml_link: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if api_name is None and 'apiName' in kwargs: + api_name = kwargs['apiName'] + if api_name is None: + raise TypeError("Missing 'api_name' argument") + if operation_id is None and 'operationId' in kwargs: + operation_id = kwargs['operationId'] + if operation_id is None: + raise TypeError("Missing 'operation_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if xml_content is None and 'xmlContent' in kwargs: + xml_content = kwargs['xmlContent'] + if xml_link is None and 'xmlLink' in kwargs: + xml_link = kwargs['xmlLink'] + + _setter("api_management_name", api_management_name) + _setter("api_name", api_name) + _setter("operation_id", operation_id) + _setter("resource_group_name", resource_group_name) if xml_content is not None: - pulumi.set(__self__, "xml_content", xml_content) + _setter("xml_content", xml_content) if xml_link is not None: - pulumi.set(__self__, "xml_link", xml_link) + _setter("xml_link", xml_link) @property @pulumi.getter(name="apiManagementName") @@ -129,18 +170,51 @@ def __init__(__self__, *, :param pulumi.Input[str] xml_content: The XML Content for this Policy. :param pulumi.Input[str] xml_link: A link to a Policy XML Document, which must be publicly available. """ + _ApiOperationPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + api_name=api_name, + operation_id=operation_id, + resource_group_name=resource_group_name, + xml_content=xml_content, + xml_link=xml_link, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + api_name: Optional[pulumi.Input[str]] = None, + operation_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + xml_content: Optional[pulumi.Input[str]] = None, + xml_link: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_name is None and 'apiName' in kwargs: + api_name = kwargs['apiName'] + if operation_id is None and 'operationId' in kwargs: + operation_id = kwargs['operationId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if xml_content is None and 'xmlContent' in kwargs: + xml_content = kwargs['xmlContent'] + if xml_link is None and 'xmlLink' in kwargs: + xml_link = kwargs['xmlLink'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if api_name is not None: - pulumi.set(__self__, "api_name", api_name) + _setter("api_name", api_name) if operation_id is not None: - pulumi.set(__self__, "operation_id", operation_id) + _setter("operation_id", operation_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if xml_content is not None: - pulumi.set(__self__, "xml_content", xml_content) + _setter("xml_content", xml_content) if xml_link is not None: - pulumi.set(__self__, "xml_link", xml_link) + _setter("xml_link", xml_link) @property @pulumi.getter(name="apiManagementName") @@ -350,6 +424,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApiOperationPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/api_operation_tag.py b/sdk/python/pulumi_azure/apimanagement/api_operation_tag.py index d0750f2434..9f9f1cca17 100644 --- a/sdk/python/pulumi_azure/apimanagement/api_operation_tag.py +++ b/sdk/python/pulumi_azure/apimanagement/api_operation_tag.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApiOperationTagArgs', 'ApiOperationTag'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] display_name: The display name of the API Management API Operation Tag. :param pulumi.Input[str] name: The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service. """ - pulumi.set(__self__, "api_operation_id", api_operation_id) - pulumi.set(__self__, "display_name", display_name) + ApiOperationTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_operation_id=api_operation_id, + display_name=display_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_operation_id: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_operation_id is None and 'apiOperationId' in kwargs: + api_operation_id = kwargs['apiOperationId'] + if api_operation_id is None: + raise TypeError("Missing 'api_operation_id' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + + _setter("api_operation_id", api_operation_id) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="apiOperationId") @@ -77,12 +100,31 @@ def __init__(__self__, *, :param pulumi.Input[str] display_name: The display name of the API Management API Operation Tag. :param pulumi.Input[str] name: The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service. """ + _ApiOperationTagState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_operation_id=api_operation_id, + display_name=display_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_operation_id: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_operation_id is None and 'apiOperationId' in kwargs: + api_operation_id = kwargs['apiOperationId'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if api_operation_id is not None: - pulumi.set(__self__, "api_operation_id", api_operation_id) + _setter("api_operation_id", api_operation_id) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="apiOperationId") @@ -238,6 +280,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApiOperationTagArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/api_policy.py b/sdk/python/pulumi_azure/apimanagement/api_policy.py index 27a99806a5..ef46253e13 100644 --- a/sdk/python/pulumi_azure/apimanagement/api_policy.py +++ b/sdk/python/pulumi_azure/apimanagement/api_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApiPolicyArgs', 'ApiPolicy'] @@ -27,13 +27,48 @@ def __init__(__self__, *, :param pulumi.Input[str] xml_content: The XML Content for this Policy as a string. :param pulumi.Input[str] xml_link: A link to a Policy XML Document, which must be publicly available. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "api_name", api_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ApiPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + api_name=api_name, + resource_group_name=resource_group_name, + xml_content=xml_content, + xml_link=xml_link, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + api_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + xml_content: Optional[pulumi.Input[str]] = None, + xml_link: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if api_name is None and 'apiName' in kwargs: + api_name = kwargs['apiName'] + if api_name is None: + raise TypeError("Missing 'api_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if xml_content is None and 'xmlContent' in kwargs: + xml_content = kwargs['xmlContent'] + if xml_link is None and 'xmlLink' in kwargs: + xml_link = kwargs['xmlLink'] + + _setter("api_management_name", api_management_name) + _setter("api_name", api_name) + _setter("resource_group_name", resource_group_name) if xml_content is not None: - pulumi.set(__self__, "xml_content", xml_content) + _setter("xml_content", xml_content) if xml_link is not None: - pulumi.set(__self__, "xml_link", xml_link) + _setter("xml_link", xml_link) @property @pulumi.getter(name="apiManagementName") @@ -112,16 +147,45 @@ def __init__(__self__, *, :param pulumi.Input[str] xml_content: The XML Content for this Policy as a string. :param pulumi.Input[str] xml_link: A link to a Policy XML Document, which must be publicly available. """ + _ApiPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + api_name=api_name, + resource_group_name=resource_group_name, + xml_content=xml_content, + xml_link=xml_link, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + api_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + xml_content: Optional[pulumi.Input[str]] = None, + xml_link: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_name is None and 'apiName' in kwargs: + api_name = kwargs['apiName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if xml_content is None and 'xmlContent' in kwargs: + xml_content = kwargs['xmlContent'] + if xml_link is None and 'xmlLink' in kwargs: + xml_link = kwargs['xmlLink'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if api_name is not None: - pulumi.set(__self__, "api_name", api_name) + _setter("api_name", api_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if xml_content is not None: - pulumi.set(__self__, "xml_content", xml_content) + _setter("xml_content", xml_content) if xml_link is not None: - pulumi.set(__self__, "xml_link", xml_link) + _setter("xml_link", xml_link) @property @pulumi.getter(name="apiManagementName") @@ -285,6 +349,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApiPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/api_release.py b/sdk/python/pulumi_azure/apimanagement/api_release.py index 1e25a7ce34..4d4532c074 100644 --- a/sdk/python/pulumi_azure/apimanagement/api_release.py +++ b/sdk/python/pulumi_azure/apimanagement/api_release.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApiReleaseArgs', 'ApiRelease'] @@ -23,11 +23,30 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this API Management API Release. Changing this forces a new API Management API Release to be created. :param pulumi.Input[str] notes: The Release Notes. """ - pulumi.set(__self__, "api_id", api_id) + ApiReleaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_id=api_id, + name=name, + notes=notes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_id is None and 'apiId' in kwargs: + api_id = kwargs['apiId'] + if api_id is None: + raise TypeError("Missing 'api_id' argument") + + _setter("api_id", api_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) @property @pulumi.getter(name="apiId") @@ -78,12 +97,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this API Management API Release. Changing this forces a new API Management API Release to be created. :param pulumi.Input[str] notes: The Release Notes. """ + _ApiReleaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_id=api_id, + name=name, + notes=notes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_id is None and 'apiId' in kwargs: + api_id = kwargs['apiId'] + if api_id is not None: - pulumi.set(__self__, "api_id", api_id) + _setter("api_id", api_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) @property @pulumi.getter(name="apiId") @@ -229,6 +265,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApiReleaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/api_schema.py b/sdk/python/pulumi_azure/apimanagement/api_schema.py index 13c117c0ae..fa9602d53e 100644 --- a/sdk/python/pulumi_azure/apimanagement/api_schema.py +++ b/sdk/python/pulumi_azure/apimanagement/api_schema.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApiSchemaArgs', 'ApiSchema'] @@ -33,17 +33,62 @@ def __init__(__self__, *, :param pulumi.Input[str] definitions: Types definitions. Used for Swagger/OpenAPI v1 schemas only. :param pulumi.Input[str] value: The JSON escaped string defining the document representing the Schema. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "api_name", api_name) - pulumi.set(__self__, "content_type", content_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "schema_id", schema_id) + ApiSchemaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + api_name=api_name, + content_type=content_type, + resource_group_name=resource_group_name, + schema_id=schema_id, + components=components, + definitions=definitions, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + api_name: Optional[pulumi.Input[str]] = None, + content_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + schema_id: Optional[pulumi.Input[str]] = None, + components: Optional[pulumi.Input[str]] = None, + definitions: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if api_name is None and 'apiName' in kwargs: + api_name = kwargs['apiName'] + if api_name is None: + raise TypeError("Missing 'api_name' argument") + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if content_type is None: + raise TypeError("Missing 'content_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if schema_id is None: + raise TypeError("Missing 'schema_id' argument") + + _setter("api_management_name", api_management_name) + _setter("api_name", api_name) + _setter("content_type", content_type) + _setter("resource_group_name", resource_group_name) + _setter("schema_id", schema_id) if components is not None: - pulumi.set(__self__, "components", components) + _setter("components", components) if definitions is not None: - pulumi.set(__self__, "definitions", definitions) + _setter("definitions", definitions) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="apiManagementName") @@ -164,22 +209,57 @@ def __init__(__self__, *, :param pulumi.Input[str] schema_id: A unique identifier for this API Schema. Changing this forces a new resource to be created. :param pulumi.Input[str] value: The JSON escaped string defining the document representing the Schema. """ + _ApiSchemaState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + api_name=api_name, + components=components, + content_type=content_type, + definitions=definitions, + resource_group_name=resource_group_name, + schema_id=schema_id, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + api_name: Optional[pulumi.Input[str]] = None, + components: Optional[pulumi.Input[str]] = None, + content_type: Optional[pulumi.Input[str]] = None, + definitions: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + schema_id: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_name is None and 'apiName' in kwargs: + api_name = kwargs['apiName'] + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if api_name is not None: - pulumi.set(__self__, "api_name", api_name) + _setter("api_name", api_name) if components is not None: - pulumi.set(__self__, "components", components) + _setter("components", components) if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if definitions is not None: - pulumi.set(__self__, "definitions", definitions) + _setter("definitions", definitions) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="apiManagementName") @@ -379,6 +459,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApiSchemaArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/api_tag.py b/sdk/python/pulumi_azure/apimanagement/api_tag.py index 7bd93c103a..7f11b6dea2 100644 --- a/sdk/python/pulumi_azure/apimanagement/api_tag.py +++ b/sdk/python/pulumi_azure/apimanagement/api_tag.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApiTagArgs', 'ApiTag'] @@ -21,9 +21,26 @@ def __init__(__self__, *, :param pulumi.Input[str] api_id: The ID of the API Management API. Changing this forces a new API Management API Tag to be created. :param pulumi.Input[str] name: The name of the tag. It must be known in the API Management instance. Changing this forces a new API Management API Tag to be created. """ - pulumi.set(__self__, "api_id", api_id) + ApiTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_id=api_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_id is None and 'apiId' in kwargs: + api_id = kwargs['apiId'] + if api_id is None: + raise TypeError("Missing 'api_id' argument") + + _setter("api_id", api_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="apiId") @@ -60,10 +77,25 @@ def __init__(__self__, *, :param pulumi.Input[str] api_id: The ID of the API Management API. Changing this forces a new API Management API Tag to be created. :param pulumi.Input[str] name: The name of the tag. It must be known in the API Management instance. Changing this forces a new API Management API Tag to be created. """ + _ApiTagState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_id=api_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_id is None and 'apiId' in kwargs: + api_id = kwargs['apiId'] + if api_id is not None: - pulumi.set(__self__, "api_id", api_id) + _setter("api_id", api_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="apiId") @@ -175,6 +207,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApiTagArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/api_tag_description.py b/sdk/python/pulumi_azure/apimanagement/api_tag_description.py index 5baa6b71c6..616e669b6c 100644 --- a/sdk/python/pulumi_azure/apimanagement/api_tag_description.py +++ b/sdk/python/pulumi_azure/apimanagement/api_tag_description.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApiTagDescriptionArgs', 'ApiTagDescription'] @@ -25,13 +25,38 @@ def __init__(__self__, *, :param pulumi.Input[str] external_documentation_description: The description of the external documentation resources describing the tag. :param pulumi.Input[str] external_documentation_url: The URL of external documentation resources describing the tag. """ - pulumi.set(__self__, "api_tag_id", api_tag_id) + ApiTagDescriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_tag_id=api_tag_id, + description=description, + external_documentation_description=external_documentation_description, + external_documentation_url=external_documentation_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_tag_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + external_documentation_description: Optional[pulumi.Input[str]] = None, + external_documentation_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_tag_id is None and 'apiTagId' in kwargs: + api_tag_id = kwargs['apiTagId'] + if api_tag_id is None: + raise TypeError("Missing 'api_tag_id' argument") + if external_documentation_description is None and 'externalDocumentationDescription' in kwargs: + external_documentation_description = kwargs['externalDocumentationDescription'] + if external_documentation_url is None and 'externalDocumentationUrl' in kwargs: + external_documentation_url = kwargs['externalDocumentationUrl'] + + _setter("api_tag_id", api_tag_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_documentation_description is not None: - pulumi.set(__self__, "external_documentation_description", external_documentation_description) + _setter("external_documentation_description", external_documentation_description) if external_documentation_url is not None: - pulumi.set(__self__, "external_documentation_url", external_documentation_url) + _setter("external_documentation_url", external_documentation_url) @property @pulumi.getter(name="apiTagId") @@ -96,14 +121,37 @@ def __init__(__self__, *, :param pulumi.Input[str] external_documentation_description: The description of the external documentation resources describing the tag. :param pulumi.Input[str] external_documentation_url: The URL of external documentation resources describing the tag. """ + _ApiTagDescriptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_tag_id=api_tag_id, + description=description, + external_documentation_description=external_documentation_description, + external_documentation_url=external_documentation_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_tag_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + external_documentation_description: Optional[pulumi.Input[str]] = None, + external_documentation_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_tag_id is None and 'apiTagId' in kwargs: + api_tag_id = kwargs['apiTagId'] + if external_documentation_description is None and 'externalDocumentationDescription' in kwargs: + external_documentation_description = kwargs['externalDocumentationDescription'] + if external_documentation_url is None and 'externalDocumentationUrl' in kwargs: + external_documentation_url = kwargs['externalDocumentationUrl'] + if api_tag_id is not None: - pulumi.set(__self__, "api_tag_id", api_tag_id) + _setter("api_tag_id", api_tag_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_documentation_description is not None: - pulumi.set(__self__, "external_documentation_description", external_documentation_description) + _setter("external_documentation_description", external_documentation_description) if external_documentation_url is not None: - pulumi.set(__self__, "external_documentation_url", external_documentation_url) + _setter("external_documentation_url", external_documentation_url) @property @pulumi.getter(name="apiTagId") @@ -209,6 +257,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApiTagDescriptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/api_version_set.py b/sdk/python/pulumi_azure/apimanagement/api_version_set.py index 88b18122ab..17705c657d 100644 --- a/sdk/python/pulumi_azure/apimanagement/api_version_set.py +++ b/sdk/python/pulumi_azure/apimanagement/api_version_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApiVersionSetArgs', 'ApiVersionSet'] @@ -37,18 +37,63 @@ def __init__(__self__, *, > **NOTE:** This must be specified when `versioning_scheme` is set to `Query`. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "versioning_scheme", versioning_scheme) + ApiVersionSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + display_name=display_name, + resource_group_name=resource_group_name, + versioning_scheme=versioning_scheme, + description=description, + name=name, + version_header_name=version_header_name, + version_query_name=version_query_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + versioning_scheme: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + version_header_name: Optional[pulumi.Input[str]] = None, + version_query_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if versioning_scheme is None and 'versioningScheme' in kwargs: + versioning_scheme = kwargs['versioningScheme'] + if versioning_scheme is None: + raise TypeError("Missing 'versioning_scheme' argument") + if version_header_name is None and 'versionHeaderName' in kwargs: + version_header_name = kwargs['versionHeaderName'] + if version_query_name is None and 'versionQueryName' in kwargs: + version_query_name = kwargs['versionQueryName'] + + _setter("api_management_name", api_management_name) + _setter("display_name", display_name) + _setter("resource_group_name", resource_group_name) + _setter("versioning_scheme", versioning_scheme) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if version_header_name is not None: - pulumi.set(__self__, "version_header_name", version_header_name) + _setter("version_header_name", version_header_name) if version_query_name is not None: - pulumi.set(__self__, "version_query_name", version_query_name) + _setter("version_query_name", version_query_name) @property @pulumi.getter(name="apiManagementName") @@ -177,22 +222,59 @@ def __init__(__self__, *, > **NOTE:** This must be specified when `versioning_scheme` is set to `Query`. :param pulumi.Input[str] versioning_scheme: Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are `Header`, `Query` and `Segment`. """ + _ApiVersionSetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + description=description, + display_name=display_name, + name=name, + resource_group_name=resource_group_name, + version_header_name=version_header_name, + version_query_name=version_query_name, + versioning_scheme=versioning_scheme, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + version_header_name: Optional[pulumi.Input[str]] = None, + version_query_name: Optional[pulumi.Input[str]] = None, + versioning_scheme: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if version_header_name is None and 'versionHeaderName' in kwargs: + version_header_name = kwargs['versionHeaderName'] + if version_query_name is None and 'versionQueryName' in kwargs: + version_query_name = kwargs['versionQueryName'] + if versioning_scheme is None and 'versioningScheme' in kwargs: + versioning_scheme = kwargs['versioningScheme'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if version_header_name is not None: - pulumi.set(__self__, "version_header_name", version_header_name) + _setter("version_header_name", version_header_name) if version_query_name is not None: - pulumi.set(__self__, "version_query_name", version_query_name) + _setter("version_query_name", version_query_name) if versioning_scheme is not None: - pulumi.set(__self__, "versioning_scheme", versioning_scheme) + _setter("versioning_scheme", versioning_scheme) @property @pulumi.getter(name="apiManagementName") @@ -402,6 +484,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApiVersionSetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/authorization_server.py b/sdk/python/pulumi_azure/apimanagement/authorization_server.py index f2a014086d..23f746b263 100644 --- a/sdk/python/pulumi_azure/apimanagement/authorization_server.py +++ b/sdk/python/pulumi_azure/apimanagement/authorization_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -63,36 +63,133 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['AuthorizationServerTokenBodyParameterArgs']]] token_body_parameters: A `token_body_parameter` block as defined below. :param pulumi.Input[str] token_endpoint: The OAUTH Token Endpoint. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "authorization_endpoint", authorization_endpoint) - pulumi.set(__self__, "authorization_methods", authorization_methods) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_registration_endpoint", client_registration_endpoint) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "grant_types", grant_types) - pulumi.set(__self__, "resource_group_name", resource_group_name) + AuthorizationServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + authorization_endpoint=authorization_endpoint, + authorization_methods=authorization_methods, + client_id=client_id, + client_registration_endpoint=client_registration_endpoint, + display_name=display_name, + grant_types=grant_types, + resource_group_name=resource_group_name, + bearer_token_sending_methods=bearer_token_sending_methods, + client_authentication_methods=client_authentication_methods, + client_secret=client_secret, + default_scope=default_scope, + description=description, + name=name, + resource_owner_password=resource_owner_password, + resource_owner_username=resource_owner_username, + support_state=support_state, + token_body_parameters=token_body_parameters, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + authorization_endpoint: Optional[pulumi.Input[str]] = None, + authorization_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_registration_endpoint: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + grant_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + bearer_token_sending_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_authentication_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + default_scope: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_owner_password: Optional[pulumi.Input[str]] = None, + resource_owner_username: Optional[pulumi.Input[str]] = None, + support_state: Optional[pulumi.Input[bool]] = None, + token_body_parameters: Optional[pulumi.Input[Sequence[pulumi.Input['AuthorizationServerTokenBodyParameterArgs']]]] = None, + token_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if authorization_endpoint is None and 'authorizationEndpoint' in kwargs: + authorization_endpoint = kwargs['authorizationEndpoint'] + if authorization_endpoint is None: + raise TypeError("Missing 'authorization_endpoint' argument") + if authorization_methods is None and 'authorizationMethods' in kwargs: + authorization_methods = kwargs['authorizationMethods'] + if authorization_methods is None: + raise TypeError("Missing 'authorization_methods' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_registration_endpoint is None and 'clientRegistrationEndpoint' in kwargs: + client_registration_endpoint = kwargs['clientRegistrationEndpoint'] + if client_registration_endpoint is None: + raise TypeError("Missing 'client_registration_endpoint' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if grant_types is None and 'grantTypes' in kwargs: + grant_types = kwargs['grantTypes'] + if grant_types is None: + raise TypeError("Missing 'grant_types' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if bearer_token_sending_methods is None and 'bearerTokenSendingMethods' in kwargs: + bearer_token_sending_methods = kwargs['bearerTokenSendingMethods'] + if client_authentication_methods is None and 'clientAuthenticationMethods' in kwargs: + client_authentication_methods = kwargs['clientAuthenticationMethods'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if default_scope is None and 'defaultScope' in kwargs: + default_scope = kwargs['defaultScope'] + if resource_owner_password is None and 'resourceOwnerPassword' in kwargs: + resource_owner_password = kwargs['resourceOwnerPassword'] + if resource_owner_username is None and 'resourceOwnerUsername' in kwargs: + resource_owner_username = kwargs['resourceOwnerUsername'] + if support_state is None and 'supportState' in kwargs: + support_state = kwargs['supportState'] + if token_body_parameters is None and 'tokenBodyParameters' in kwargs: + token_body_parameters = kwargs['tokenBodyParameters'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("api_management_name", api_management_name) + _setter("authorization_endpoint", authorization_endpoint) + _setter("authorization_methods", authorization_methods) + _setter("client_id", client_id) + _setter("client_registration_endpoint", client_registration_endpoint) + _setter("display_name", display_name) + _setter("grant_types", grant_types) + _setter("resource_group_name", resource_group_name) if bearer_token_sending_methods is not None: - pulumi.set(__self__, "bearer_token_sending_methods", bearer_token_sending_methods) + _setter("bearer_token_sending_methods", bearer_token_sending_methods) if client_authentication_methods is not None: - pulumi.set(__self__, "client_authentication_methods", client_authentication_methods) + _setter("client_authentication_methods", client_authentication_methods) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if default_scope is not None: - pulumi.set(__self__, "default_scope", default_scope) + _setter("default_scope", default_scope) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_owner_password is not None: - pulumi.set(__self__, "resource_owner_password", resource_owner_password) + _setter("resource_owner_password", resource_owner_password) if resource_owner_username is not None: - pulumi.set(__self__, "resource_owner_username", resource_owner_username) + _setter("resource_owner_username", resource_owner_username) if support_state is not None: - pulumi.set(__self__, "support_state", support_state) + _setter("support_state", support_state) if token_body_parameters is not None: - pulumi.set(__self__, "token_body_parameters", token_body_parameters) + _setter("token_body_parameters", token_body_parameters) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="apiManagementName") @@ -379,44 +476,125 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['AuthorizationServerTokenBodyParameterArgs']]] token_body_parameters: A `token_body_parameter` block as defined below. :param pulumi.Input[str] token_endpoint: The OAUTH Token Endpoint. """ + _AuthorizationServerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + authorization_endpoint=authorization_endpoint, + authorization_methods=authorization_methods, + bearer_token_sending_methods=bearer_token_sending_methods, + client_authentication_methods=client_authentication_methods, + client_id=client_id, + client_registration_endpoint=client_registration_endpoint, + client_secret=client_secret, + default_scope=default_scope, + description=description, + display_name=display_name, + grant_types=grant_types, + name=name, + resource_group_name=resource_group_name, + resource_owner_password=resource_owner_password, + resource_owner_username=resource_owner_username, + support_state=support_state, + token_body_parameters=token_body_parameters, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + authorization_endpoint: Optional[pulumi.Input[str]] = None, + authorization_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + bearer_token_sending_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_authentication_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_registration_endpoint: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + default_scope: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + grant_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + resource_owner_password: Optional[pulumi.Input[str]] = None, + resource_owner_username: Optional[pulumi.Input[str]] = None, + support_state: Optional[pulumi.Input[bool]] = None, + token_body_parameters: Optional[pulumi.Input[Sequence[pulumi.Input['AuthorizationServerTokenBodyParameterArgs']]]] = None, + token_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if authorization_endpoint is None and 'authorizationEndpoint' in kwargs: + authorization_endpoint = kwargs['authorizationEndpoint'] + if authorization_methods is None and 'authorizationMethods' in kwargs: + authorization_methods = kwargs['authorizationMethods'] + if bearer_token_sending_methods is None and 'bearerTokenSendingMethods' in kwargs: + bearer_token_sending_methods = kwargs['bearerTokenSendingMethods'] + if client_authentication_methods is None and 'clientAuthenticationMethods' in kwargs: + client_authentication_methods = kwargs['clientAuthenticationMethods'] + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_registration_endpoint is None and 'clientRegistrationEndpoint' in kwargs: + client_registration_endpoint = kwargs['clientRegistrationEndpoint'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if default_scope is None and 'defaultScope' in kwargs: + default_scope = kwargs['defaultScope'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if grant_types is None and 'grantTypes' in kwargs: + grant_types = kwargs['grantTypes'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_owner_password is None and 'resourceOwnerPassword' in kwargs: + resource_owner_password = kwargs['resourceOwnerPassword'] + if resource_owner_username is None and 'resourceOwnerUsername' in kwargs: + resource_owner_username = kwargs['resourceOwnerUsername'] + if support_state is None and 'supportState' in kwargs: + support_state = kwargs['supportState'] + if token_body_parameters is None and 'tokenBodyParameters' in kwargs: + token_body_parameters = kwargs['tokenBodyParameters'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if authorization_endpoint is not None: - pulumi.set(__self__, "authorization_endpoint", authorization_endpoint) + _setter("authorization_endpoint", authorization_endpoint) if authorization_methods is not None: - pulumi.set(__self__, "authorization_methods", authorization_methods) + _setter("authorization_methods", authorization_methods) if bearer_token_sending_methods is not None: - pulumi.set(__self__, "bearer_token_sending_methods", bearer_token_sending_methods) + _setter("bearer_token_sending_methods", bearer_token_sending_methods) if client_authentication_methods is not None: - pulumi.set(__self__, "client_authentication_methods", client_authentication_methods) + _setter("client_authentication_methods", client_authentication_methods) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_registration_endpoint is not None: - pulumi.set(__self__, "client_registration_endpoint", client_registration_endpoint) + _setter("client_registration_endpoint", client_registration_endpoint) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if default_scope is not None: - pulumi.set(__self__, "default_scope", default_scope) + _setter("default_scope", default_scope) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if grant_types is not None: - pulumi.set(__self__, "grant_types", grant_types) + _setter("grant_types", grant_types) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if resource_owner_password is not None: - pulumi.set(__self__, "resource_owner_password", resource_owner_password) + _setter("resource_owner_password", resource_owner_password) if resource_owner_username is not None: - pulumi.set(__self__, "resource_owner_username", resource_owner_username) + _setter("resource_owner_username", resource_owner_username) if support_state is not None: - pulumi.set(__self__, "support_state", support_state) + _setter("support_state", support_state) if token_body_parameters is not None: - pulumi.set(__self__, "token_body_parameters", token_body_parameters) + _setter("token_body_parameters", token_body_parameters) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="apiManagementName") @@ -782,6 +960,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AuthorizationServerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/backend.py b/sdk/python/pulumi_azure/apimanagement/backend.py index 753a3c14ca..2f236501ee 100644 --- a/sdk/python/pulumi_azure/apimanagement/backend.py +++ b/sdk/python/pulumi_azure/apimanagement/backend.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,26 +43,75 @@ def __init__(__self__, *, :param pulumi.Input[str] title: The title of the backend. :param pulumi.Input['BackendTlsArgs'] tls: A `tls` block as documented below. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "url", url) + BackendArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + protocol=protocol, + resource_group_name=resource_group_name, + url=url, + credentials=credentials, + description=description, + name=name, + proxy=proxy, + resource_id=resource_id, + service_fabric_cluster=service_fabric_cluster, + title=title, + tls=tls, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + credentials: Optional[pulumi.Input['BackendCredentialsArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + proxy: Optional[pulumi.Input['BackendProxyArgs']] = None, + resource_id: Optional[pulumi.Input[str]] = None, + service_fabric_cluster: Optional[pulumi.Input['BackendServiceFabricClusterArgs']] = None, + title: Optional[pulumi.Input[str]] = None, + tls: Optional[pulumi.Input['BackendTlsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if service_fabric_cluster is None and 'serviceFabricCluster' in kwargs: + service_fabric_cluster = kwargs['serviceFabricCluster'] + + _setter("api_management_name", api_management_name) + _setter("protocol", protocol) + _setter("resource_group_name", resource_group_name) + _setter("url", url) if credentials is not None: - pulumi.set(__self__, "credentials", credentials) + _setter("credentials", credentials) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if proxy is not None: - pulumi.set(__self__, "proxy", proxy) + _setter("proxy", proxy) if resource_id is not None: - pulumi.set(__self__, "resource_id", resource_id) + _setter("resource_id", resource_id) if service_fabric_cluster is not None: - pulumi.set(__self__, "service_fabric_cluster", service_fabric_cluster) + _setter("service_fabric_cluster", service_fabric_cluster) if title is not None: - pulumi.set(__self__, "title", title) + _setter("title", title) if tls is not None: - pulumi.set(__self__, "tls", tls) + _setter("tls", tls) @property @pulumi.getter(name="apiManagementName") @@ -239,30 +288,71 @@ def __init__(__self__, *, :param pulumi.Input['BackendTlsArgs'] tls: A `tls` block as documented below. :param pulumi.Input[str] url: The URL of the backend host. """ + _BackendState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + credentials=credentials, + description=description, + name=name, + protocol=protocol, + proxy=proxy, + resource_group_name=resource_group_name, + resource_id=resource_id, + service_fabric_cluster=service_fabric_cluster, + title=title, + tls=tls, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + credentials: Optional[pulumi.Input['BackendCredentialsArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + proxy: Optional[pulumi.Input['BackendProxyArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + service_fabric_cluster: Optional[pulumi.Input['BackendServiceFabricClusterArgs']] = None, + title: Optional[pulumi.Input[str]] = None, + tls: Optional[pulumi.Input['BackendTlsArgs']] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if service_fabric_cluster is None and 'serviceFabricCluster' in kwargs: + service_fabric_cluster = kwargs['serviceFabricCluster'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if credentials is not None: - pulumi.set(__self__, "credentials", credentials) + _setter("credentials", credentials) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if proxy is not None: - pulumi.set(__self__, "proxy", proxy) + _setter("proxy", proxy) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if resource_id is not None: - pulumi.set(__self__, "resource_id", resource_id) + _setter("resource_id", resource_id) if service_fabric_cluster is not None: - pulumi.set(__self__, "service_fabric_cluster", service_fabric_cluster) + _setter("service_fabric_cluster", service_fabric_cluster) if title is not None: - pulumi.set(__self__, "title", title) + _setter("title", title) if tls is not None: - pulumi.set(__self__, "tls", tls) + _setter("tls", tls) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="apiManagementName") @@ -520,6 +610,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BackendArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -549,19 +643,39 @@ def _internal_init(__self__, if api_management_name is None and not opts.urn: raise TypeError("Missing required property 'api_management_name'") __props__.__dict__["api_management_name"] = api_management_name + if credentials is not None and not isinstance(credentials, BackendCredentialsArgs): + credentials = credentials or {} + def _setter(key, value): + credentials[key] = value + BackendCredentialsArgs._configure(_setter, **credentials) __props__.__dict__["credentials"] = credentials __props__.__dict__["description"] = description __props__.__dict__["name"] = name if protocol is None and not opts.urn: raise TypeError("Missing required property 'protocol'") __props__.__dict__["protocol"] = protocol + if proxy is not None and not isinstance(proxy, BackendProxyArgs): + proxy = proxy or {} + def _setter(key, value): + proxy[key] = value + BackendProxyArgs._configure(_setter, **proxy) __props__.__dict__["proxy"] = proxy if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["resource_id"] = resource_id + if service_fabric_cluster is not None and not isinstance(service_fabric_cluster, BackendServiceFabricClusterArgs): + service_fabric_cluster = service_fabric_cluster or {} + def _setter(key, value): + service_fabric_cluster[key] = value + BackendServiceFabricClusterArgs._configure(_setter, **service_fabric_cluster) __props__.__dict__["service_fabric_cluster"] = service_fabric_cluster __props__.__dict__["title"] = title + if tls is not None and not isinstance(tls, BackendTlsArgs): + tls = tls or {} + def _setter(key, value): + tls[key] = value + BackendTlsArgs._configure(_setter, **tls) __props__.__dict__["tls"] = tls if url is None and not opts.urn: raise TypeError("Missing required property 'url'") diff --git a/sdk/python/pulumi_azure/apimanagement/certificate.py b/sdk/python/pulumi_azure/apimanagement/certificate.py index 1441f10746..9056abfd8f 100644 --- a/sdk/python/pulumi_azure/apimanagement/certificate.py +++ b/sdk/python/pulumi_azure/apimanagement/certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CertificateArgs', 'Certificate'] @@ -37,18 +37,53 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the API Management Certificate. Changing this forces a new resource to be created. :param pulumi.Input[str] password: The password used for this certificate. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + CertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + resource_group_name=resource_group_name, + data=data, + key_vault_identity_client_id=key_vault_identity_client_id, + key_vault_secret_id=key_vault_secret_id, + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + data: Optional[pulumi.Input[str]] = None, + key_vault_identity_client_id: Optional[pulumi.Input[str]] = None, + key_vault_secret_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if key_vault_identity_client_id is None and 'keyVaultIdentityClientId' in kwargs: + key_vault_identity_client_id = kwargs['keyVaultIdentityClientId'] + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + + _setter("api_management_name", api_management_name) + _setter("resource_group_name", resource_group_name) if data is not None: - pulumi.set(__self__, "data", data) + _setter("data", data) if key_vault_identity_client_id is not None: - pulumi.set(__self__, "key_vault_identity_client_id", key_vault_identity_client_id) + _setter("key_vault_identity_client_id", key_vault_identity_client_id) if key_vault_secret_id is not None: - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) + _setter("key_vault_secret_id", key_vault_secret_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter(name="apiManagementName") @@ -173,26 +208,63 @@ def __init__(__self__, *, :param pulumi.Input[str] subject: The Subject of this Certificate. :param pulumi.Input[str] thumbprint: The Thumbprint of this Certificate. """ + _CertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + data=data, + expiration=expiration, + key_vault_identity_client_id=key_vault_identity_client_id, + key_vault_secret_id=key_vault_secret_id, + name=name, + password=password, + resource_group_name=resource_group_name, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + data: Optional[pulumi.Input[str]] = None, + expiration: Optional[pulumi.Input[str]] = None, + key_vault_identity_client_id: Optional[pulumi.Input[str]] = None, + key_vault_secret_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if key_vault_identity_client_id is None and 'keyVaultIdentityClientId' in kwargs: + key_vault_identity_client_id = kwargs['keyVaultIdentityClientId'] + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if data is not None: - pulumi.set(__self__, "data", data) + _setter("data", data) if expiration is not None: - pulumi.set(__self__, "expiration", expiration) + _setter("expiration", expiration) if key_vault_identity_client_id is not None: - pulumi.set(__self__, "key_vault_identity_client_id", key_vault_identity_client_id) + _setter("key_vault_identity_client_id", key_vault_identity_client_id) if key_vault_secret_id is not None: - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) + _setter("key_vault_secret_id", key_vault_secret_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="apiManagementName") @@ -538,6 +610,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/custom_domain.py b/sdk/python/pulumi_azure/apimanagement/custom_domain.py index 9d5630221e..06d153a631 100644 --- a/sdk/python/pulumi_azure/apimanagement/custom_domain.py +++ b/sdk/python/pulumi_azure/apimanagement/custom_domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,17 +31,44 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['CustomDomainPortalArgs']]] portals: One or more `portal` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['CustomDomainScmArgs']]] scms: One or more `scm` blocks as defined below. """ - pulumi.set(__self__, "api_management_id", api_management_id) + CustomDomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + developer_portals=developer_portals, + gateways=gateways, + managements=managements, + portals=portals, + scms=scms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + developer_portals: Optional[pulumi.Input[Sequence[pulumi.Input['CustomDomainDeveloperPortalArgs']]]] = None, + gateways: Optional[pulumi.Input[Sequence[pulumi.Input['CustomDomainGatewayArgs']]]] = None, + managements: Optional[pulumi.Input[Sequence[pulumi.Input['CustomDomainManagementArgs']]]] = None, + portals: Optional[pulumi.Input[Sequence[pulumi.Input['CustomDomainPortalArgs']]]] = None, + scms: Optional[pulumi.Input[Sequence[pulumi.Input['CustomDomainScmArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if api_management_id is None: + raise TypeError("Missing 'api_management_id' argument") + if developer_portals is None and 'developerPortals' in kwargs: + developer_portals = kwargs['developerPortals'] + + _setter("api_management_id", api_management_id) if developer_portals is not None: - pulumi.set(__self__, "developer_portals", developer_portals) + _setter("developer_portals", developer_portals) if gateways is not None: - pulumi.set(__self__, "gateways", gateways) + _setter("gateways", gateways) if managements is not None: - pulumi.set(__self__, "managements", managements) + _setter("managements", managements) if portals is not None: - pulumi.set(__self__, "portals", portals) + _setter("portals", portals) if scms is not None: - pulumi.set(__self__, "scms", scms) + _setter("scms", scms) @property @pulumi.getter(name="apiManagementId") @@ -134,18 +161,43 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['CustomDomainPortalArgs']]] portals: One or more `portal` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['CustomDomainScmArgs']]] scms: One or more `scm` blocks as defined below. """ + _CustomDomainState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + developer_portals=developer_portals, + gateways=gateways, + managements=managements, + portals=portals, + scms=scms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + developer_portals: Optional[pulumi.Input[Sequence[pulumi.Input['CustomDomainDeveloperPortalArgs']]]] = None, + gateways: Optional[pulumi.Input[Sequence[pulumi.Input['CustomDomainGatewayArgs']]]] = None, + managements: Optional[pulumi.Input[Sequence[pulumi.Input['CustomDomainManagementArgs']]]] = None, + portals: Optional[pulumi.Input[Sequence[pulumi.Input['CustomDomainPortalArgs']]]] = None, + scms: Optional[pulumi.Input[Sequence[pulumi.Input['CustomDomainScmArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if developer_portals is None and 'developerPortals' in kwargs: + developer_portals = kwargs['developerPortals'] + if api_management_id is not None: - pulumi.set(__self__, "api_management_id", api_management_id) + _setter("api_management_id", api_management_id) if developer_portals is not None: - pulumi.set(__self__, "developer_portals", developer_portals) + _setter("developer_portals", developer_portals) if gateways is not None: - pulumi.set(__self__, "gateways", gateways) + _setter("gateways", gateways) if managements is not None: - pulumi.set(__self__, "managements", managements) + _setter("managements", managements) if portals is not None: - pulumi.set(__self__, "portals", portals) + _setter("portals", portals) if scms is not None: - pulumi.set(__self__, "scms", scms) + _setter("scms", scms) @property @pulumi.getter(name="apiManagementId") @@ -425,6 +477,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CustomDomainArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/diagnostic.py b/sdk/python/pulumi_azure/apimanagement/diagnostic.py index b7f1b3fde1..df4767c192 100644 --- a/sdk/python/pulumi_azure/apimanagement/diagnostic.py +++ b/sdk/python/pulumi_azure/apimanagement/diagnostic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,30 +47,99 @@ def __init__(__self__, *, :param pulumi.Input[float] sampling_percentage: Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`. :param pulumi.Input[str] verbosity: Logging verbosity. Possible values are `verbose`, `information` or `error`. """ - pulumi.set(__self__, "api_management_logger_id", api_management_logger_id) - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "identifier", identifier) - pulumi.set(__self__, "resource_group_name", resource_group_name) + DiagnosticArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_logger_id=api_management_logger_id, + api_management_name=api_management_name, + identifier=identifier, + resource_group_name=resource_group_name, + always_log_errors=always_log_errors, + backend_request=backend_request, + backend_response=backend_response, + frontend_request=frontend_request, + frontend_response=frontend_response, + http_correlation_protocol=http_correlation_protocol, + log_client_ip=log_client_ip, + operation_name_format=operation_name_format, + sampling_percentage=sampling_percentage, + verbosity=verbosity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_logger_id: Optional[pulumi.Input[str]] = None, + api_management_name: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + always_log_errors: Optional[pulumi.Input[bool]] = None, + backend_request: Optional[pulumi.Input['DiagnosticBackendRequestArgs']] = None, + backend_response: Optional[pulumi.Input['DiagnosticBackendResponseArgs']] = None, + frontend_request: Optional[pulumi.Input['DiagnosticFrontendRequestArgs']] = None, + frontend_response: Optional[pulumi.Input['DiagnosticFrontendResponseArgs']] = None, + http_correlation_protocol: Optional[pulumi.Input[str]] = None, + log_client_ip: Optional[pulumi.Input[bool]] = None, + operation_name_format: Optional[pulumi.Input[str]] = None, + sampling_percentage: Optional[pulumi.Input[float]] = None, + verbosity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_logger_id is None and 'apiManagementLoggerId' in kwargs: + api_management_logger_id = kwargs['apiManagementLoggerId'] + if api_management_logger_id is None: + raise TypeError("Missing 'api_management_logger_id' argument") + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if identifier is None: + raise TypeError("Missing 'identifier' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if always_log_errors is None and 'alwaysLogErrors' in kwargs: + always_log_errors = kwargs['alwaysLogErrors'] + if backend_request is None and 'backendRequest' in kwargs: + backend_request = kwargs['backendRequest'] + if backend_response is None and 'backendResponse' in kwargs: + backend_response = kwargs['backendResponse'] + if frontend_request is None and 'frontendRequest' in kwargs: + frontend_request = kwargs['frontendRequest'] + if frontend_response is None and 'frontendResponse' in kwargs: + frontend_response = kwargs['frontendResponse'] + if http_correlation_protocol is None and 'httpCorrelationProtocol' in kwargs: + http_correlation_protocol = kwargs['httpCorrelationProtocol'] + if log_client_ip is None and 'logClientIp' in kwargs: + log_client_ip = kwargs['logClientIp'] + if operation_name_format is None and 'operationNameFormat' in kwargs: + operation_name_format = kwargs['operationNameFormat'] + if sampling_percentage is None and 'samplingPercentage' in kwargs: + sampling_percentage = kwargs['samplingPercentage'] + + _setter("api_management_logger_id", api_management_logger_id) + _setter("api_management_name", api_management_name) + _setter("identifier", identifier) + _setter("resource_group_name", resource_group_name) if always_log_errors is not None: - pulumi.set(__self__, "always_log_errors", always_log_errors) + _setter("always_log_errors", always_log_errors) if backend_request is not None: - pulumi.set(__self__, "backend_request", backend_request) + _setter("backend_request", backend_request) if backend_response is not None: - pulumi.set(__self__, "backend_response", backend_response) + _setter("backend_response", backend_response) if frontend_request is not None: - pulumi.set(__self__, "frontend_request", frontend_request) + _setter("frontend_request", frontend_request) if frontend_response is not None: - pulumi.set(__self__, "frontend_response", frontend_response) + _setter("frontend_response", frontend_response) if http_correlation_protocol is not None: - pulumi.set(__self__, "http_correlation_protocol", http_correlation_protocol) + _setter("http_correlation_protocol", http_correlation_protocol) if log_client_ip is not None: - pulumi.set(__self__, "log_client_ip", log_client_ip) + _setter("log_client_ip", log_client_ip) if operation_name_format is not None: - pulumi.set(__self__, "operation_name_format", operation_name_format) + _setter("operation_name_format", operation_name_format) if sampling_percentage is not None: - pulumi.set(__self__, "sampling_percentage", sampling_percentage) + _setter("sampling_percentage", sampling_percentage) if verbosity is not None: - pulumi.set(__self__, "verbosity", verbosity) + _setter("verbosity", verbosity) @property @pulumi.getter(name="apiManagementLoggerId") @@ -275,34 +344,95 @@ def __init__(__self__, *, :param pulumi.Input[float] sampling_percentage: Sampling (%). For high traffic APIs, please read this [documentation](https://docs.microsoft.com/azure/api-management/api-management-howto-app-insights#performance-implications-and-log-sampling) to understand performance implications and log sampling. Valid values are between `0.0` and `100.0`. :param pulumi.Input[str] verbosity: Logging verbosity. Possible values are `verbose`, `information` or `error`. """ + _DiagnosticState._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_log_errors=always_log_errors, + api_management_logger_id=api_management_logger_id, + api_management_name=api_management_name, + backend_request=backend_request, + backend_response=backend_response, + frontend_request=frontend_request, + frontend_response=frontend_response, + http_correlation_protocol=http_correlation_protocol, + identifier=identifier, + log_client_ip=log_client_ip, + operation_name_format=operation_name_format, + resource_group_name=resource_group_name, + sampling_percentage=sampling_percentage, + verbosity=verbosity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_log_errors: Optional[pulumi.Input[bool]] = None, + api_management_logger_id: Optional[pulumi.Input[str]] = None, + api_management_name: Optional[pulumi.Input[str]] = None, + backend_request: Optional[pulumi.Input['DiagnosticBackendRequestArgs']] = None, + backend_response: Optional[pulumi.Input['DiagnosticBackendResponseArgs']] = None, + frontend_request: Optional[pulumi.Input['DiagnosticFrontendRequestArgs']] = None, + frontend_response: Optional[pulumi.Input['DiagnosticFrontendResponseArgs']] = None, + http_correlation_protocol: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input[str]] = None, + log_client_ip: Optional[pulumi.Input[bool]] = None, + operation_name_format: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sampling_percentage: Optional[pulumi.Input[float]] = None, + verbosity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_log_errors is None and 'alwaysLogErrors' in kwargs: + always_log_errors = kwargs['alwaysLogErrors'] + if api_management_logger_id is None and 'apiManagementLoggerId' in kwargs: + api_management_logger_id = kwargs['apiManagementLoggerId'] + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if backend_request is None and 'backendRequest' in kwargs: + backend_request = kwargs['backendRequest'] + if backend_response is None and 'backendResponse' in kwargs: + backend_response = kwargs['backendResponse'] + if frontend_request is None and 'frontendRequest' in kwargs: + frontend_request = kwargs['frontendRequest'] + if frontend_response is None and 'frontendResponse' in kwargs: + frontend_response = kwargs['frontendResponse'] + if http_correlation_protocol is None and 'httpCorrelationProtocol' in kwargs: + http_correlation_protocol = kwargs['httpCorrelationProtocol'] + if log_client_ip is None and 'logClientIp' in kwargs: + log_client_ip = kwargs['logClientIp'] + if operation_name_format is None and 'operationNameFormat' in kwargs: + operation_name_format = kwargs['operationNameFormat'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sampling_percentage is None and 'samplingPercentage' in kwargs: + sampling_percentage = kwargs['samplingPercentage'] + if always_log_errors is not None: - pulumi.set(__self__, "always_log_errors", always_log_errors) + _setter("always_log_errors", always_log_errors) if api_management_logger_id is not None: - pulumi.set(__self__, "api_management_logger_id", api_management_logger_id) + _setter("api_management_logger_id", api_management_logger_id) if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if backend_request is not None: - pulumi.set(__self__, "backend_request", backend_request) + _setter("backend_request", backend_request) if backend_response is not None: - pulumi.set(__self__, "backend_response", backend_response) + _setter("backend_response", backend_response) if frontend_request is not None: - pulumi.set(__self__, "frontend_request", frontend_request) + _setter("frontend_request", frontend_request) if frontend_response is not None: - pulumi.set(__self__, "frontend_response", frontend_response) + _setter("frontend_response", frontend_response) if http_correlation_protocol is not None: - pulumi.set(__self__, "http_correlation_protocol", http_correlation_protocol) + _setter("http_correlation_protocol", http_correlation_protocol) if identifier is not None: - pulumi.set(__self__, "identifier", identifier) + _setter("identifier", identifier) if log_client_ip is not None: - pulumi.set(__self__, "log_client_ip", log_client_ip) + _setter("log_client_ip", log_client_ip) if operation_name_format is not None: - pulumi.set(__self__, "operation_name_format", operation_name_format) + _setter("operation_name_format", operation_name_format) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sampling_percentage is not None: - pulumi.set(__self__, "sampling_percentage", sampling_percentage) + _setter("sampling_percentage", sampling_percentage) if verbosity is not None: - pulumi.set(__self__, "verbosity", verbosity) + _setter("verbosity", verbosity) @property @pulumi.getter(name="alwaysLogErrors") @@ -682,6 +812,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DiagnosticArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -717,9 +851,29 @@ def _internal_init(__self__, if api_management_name is None and not opts.urn: raise TypeError("Missing required property 'api_management_name'") __props__.__dict__["api_management_name"] = api_management_name + if backend_request is not None and not isinstance(backend_request, DiagnosticBackendRequestArgs): + backend_request = backend_request or {} + def _setter(key, value): + backend_request[key] = value + DiagnosticBackendRequestArgs._configure(_setter, **backend_request) __props__.__dict__["backend_request"] = backend_request + if backend_response is not None and not isinstance(backend_response, DiagnosticBackendResponseArgs): + backend_response = backend_response or {} + def _setter(key, value): + backend_response[key] = value + DiagnosticBackendResponseArgs._configure(_setter, **backend_response) __props__.__dict__["backend_response"] = backend_response + if frontend_request is not None and not isinstance(frontend_request, DiagnosticFrontendRequestArgs): + frontend_request = frontend_request or {} + def _setter(key, value): + frontend_request[key] = value + DiagnosticFrontendRequestArgs._configure(_setter, **frontend_request) __props__.__dict__["frontend_request"] = frontend_request + if frontend_response is not None and not isinstance(frontend_response, DiagnosticFrontendResponseArgs): + frontend_response = frontend_response or {} + def _setter(key, value): + frontend_response[key] = value + DiagnosticFrontendResponseArgs._configure(_setter, **frontend_response) __props__.__dict__["frontend_response"] = frontend_response __props__.__dict__["http_correlation_protocol"] = http_correlation_protocol if identifier is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/apimanagement/email_template.py b/sdk/python/pulumi_azure/apimanagement/email_template.py index cadd9374df..5754ed28d4 100644 --- a/sdk/python/pulumi_azure/apimanagement/email_template.py +++ b/sdk/python/pulumi_azure/apimanagement/email_template.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EmailTemplateArgs', 'EmailTemplate'] @@ -29,11 +29,46 @@ def __init__(__self__, *, :param pulumi.Input[str] subject: The subject of the Email. :param pulumi.Input[str] template_name: The name of the Email Template. Possible values are `AccountClosedDeveloper`, `ApplicationApprovedNotificationMessage`, `ConfirmSignUpIdentityDefault`, `EmailChangeIdentityDefault`, `InviteUserNotificationMessage`, `NewCommentNotificationMessage`, `NewDeveloperNotificationMessage`, `NewIssueNotificationMessage`, `PasswordResetByAdminNotificationMessage`, `PasswordResetIdentityDefault`, `PurchaseDeveloperNotificationMessage`, `QuotaLimitApproachingDeveloperNotificationMessage`, `RejectDeveloperNotificationMessage`, `RequestDeveloperNotificationMessage`. Changing this forces a new API Management Email Template to be created. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "body", body) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "subject", subject) - pulumi.set(__self__, "template_name", template_name) + EmailTemplateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + body=body, + resource_group_name=resource_group_name, + subject=subject, + template_name=template_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + body: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + template_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if body is None: + raise TypeError("Missing 'body' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if subject is None: + raise TypeError("Missing 'subject' argument") + if template_name is None and 'templateName' in kwargs: + template_name = kwargs['templateName'] + if template_name is None: + raise TypeError("Missing 'template_name' argument") + + _setter("api_management_name", api_management_name) + _setter("body", body) + _setter("resource_group_name", resource_group_name) + _setter("subject", subject) + _setter("template_name", template_name) @property @pulumi.getter(name="apiManagementName") @@ -120,20 +155,49 @@ def __init__(__self__, *, :param pulumi.Input[str] template_name: The name of the Email Template. Possible values are `AccountClosedDeveloper`, `ApplicationApprovedNotificationMessage`, `ConfirmSignUpIdentityDefault`, `EmailChangeIdentityDefault`, `InviteUserNotificationMessage`, `NewCommentNotificationMessage`, `NewDeveloperNotificationMessage`, `NewIssueNotificationMessage`, `PasswordResetByAdminNotificationMessage`, `PasswordResetIdentityDefault`, `PurchaseDeveloperNotificationMessage`, `QuotaLimitApproachingDeveloperNotificationMessage`, `RejectDeveloperNotificationMessage`, `RequestDeveloperNotificationMessage`. Changing this forces a new API Management Email Template to be created. :param pulumi.Input[str] title: The title of the Email Template. """ + _EmailTemplateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + body=body, + description=description, + resource_group_name=resource_group_name, + subject=subject, + template_name=template_name, + title=title, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + body: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + template_name: Optional[pulumi.Input[str]] = None, + title: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if template_name is None and 'templateName' in kwargs: + template_name = kwargs['templateName'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if body is not None: - pulumi.set(__self__, "body", body) + _setter("body", body) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if template_name is not None: - pulumi.set(__self__, "template_name", template_name) + _setter("template_name", template_name) if title is not None: - pulumi.set(__self__, "title", title) + _setter("title", title) @property @pulumi.getter(name="apiManagementName") @@ -343,6 +407,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EmailTemplateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/gateway.py b/sdk/python/pulumi_azure/apimanagement/gateway.py index 78a848e8e1..f210777ea1 100644 --- a/sdk/python/pulumi_azure/apimanagement/gateway.py +++ b/sdk/python/pulumi_azure/apimanagement/gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,12 +27,37 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the API Management Gateway. :param pulumi.Input[str] name: The name which should be used for the API Management Gateway. Changing this forces a new API Management Gateway to be created. """ - pulumi.set(__self__, "api_management_id", api_management_id) - pulumi.set(__self__, "location_data", location_data) + GatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + location_data=location_data, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + location_data: Optional[pulumi.Input['GatewayLocationDataArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if api_management_id is None: + raise TypeError("Missing 'api_management_id' argument") + if location_data is None and 'locationData' in kwargs: + location_data = kwargs['locationData'] + if location_data is None: + raise TypeError("Missing 'location_data' argument") + + _setter("api_management_id", api_management_id) + _setter("location_data", location_data) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="apiManagementId") @@ -97,14 +122,35 @@ def __init__(__self__, *, :param pulumi.Input['GatewayLocationDataArgs'] location_data: A `location_data` block as documented below. :param pulumi.Input[str] name: The name which should be used for the API Management Gateway. Changing this forces a new API Management Gateway to be created. """ + _GatewayState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + description=description, + location_data=location_data, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + location_data: Optional[pulumi.Input['GatewayLocationDataArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if location_data is None and 'locationData' in kwargs: + location_data = kwargs['locationData'] + if api_management_id is not None: - pulumi.set(__self__, "api_management_id", api_management_id) + _setter("api_management_id", api_management_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location_data is not None: - pulumi.set(__self__, "location_data", location_data) + _setter("location_data", location_data) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="apiManagementId") @@ -258,6 +304,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GatewayArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -280,6 +330,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'api_management_id'") __props__.__dict__["api_management_id"] = api_management_id __props__.__dict__["description"] = description + if location_data is not None and not isinstance(location_data, GatewayLocationDataArgs): + location_data = location_data or {} + def _setter(key, value): + location_data[key] = value + GatewayLocationDataArgs._configure(_setter, **location_data) if location_data is None and not opts.urn: raise TypeError("Missing required property 'location_data'") __props__.__dict__["location_data"] = location_data diff --git a/sdk/python/pulumi_azure/apimanagement/gateway_api.py b/sdk/python/pulumi_azure/apimanagement/gateway_api.py index f51c64e3cd..ec60e39d60 100644 --- a/sdk/python/pulumi_azure/apimanagement/gateway_api.py +++ b/sdk/python/pulumi_azure/apimanagement/gateway_api.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['GatewayApiArgs', 'GatewayApi'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] api_id: The Identifier of the API Management API within the API Management Service. Changing this forces a new API Management Gateway API to be created. :param pulumi.Input[str] gateway_id: The Identifier for the API Management Gateway. Changing this forces a new API Management Gateway API to be created. """ - pulumi.set(__self__, "api_id", api_id) - pulumi.set(__self__, "gateway_id", gateway_id) + GatewayApiArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_id=api_id, + gateway_id=gateway_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_id: Optional[pulumi.Input[str]] = None, + gateway_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_id is None and 'apiId' in kwargs: + api_id = kwargs['apiId'] + if api_id is None: + raise TypeError("Missing 'api_id' argument") + if gateway_id is None and 'gatewayId' in kwargs: + gateway_id = kwargs['gatewayId'] + if gateway_id is None: + raise TypeError("Missing 'gateway_id' argument") + + _setter("api_id", api_id) + _setter("gateway_id", gateway_id) @property @pulumi.getter(name="apiId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] api_id: The Identifier of the API Management API within the API Management Service. Changing this forces a new API Management Gateway API to be created. :param pulumi.Input[str] gateway_id: The Identifier for the API Management Gateway. Changing this forces a new API Management Gateway API to be created. """ + _GatewayApiState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_id=api_id, + gateway_id=gateway_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_id: Optional[pulumi.Input[str]] = None, + gateway_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_id is None and 'apiId' in kwargs: + api_id = kwargs['apiId'] + if gateway_id is None and 'gatewayId' in kwargs: + gateway_id = kwargs['gatewayId'] + if api_id is not None: - pulumi.set(__self__, "api_id", api_id) + _setter("api_id", api_id) if gateway_id is not None: - pulumi.set(__self__, "gateway_id", gateway_id) + _setter("gateway_id", gateway_id) @property @pulumi.getter(name="apiId") @@ -178,6 +216,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GatewayApiArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/gateway_certificate_authority.py b/sdk/python/pulumi_azure/apimanagement/gateway_certificate_authority.py index a0066b4bea..3a68519939 100644 --- a/sdk/python/pulumi_azure/apimanagement/gateway_certificate_authority.py +++ b/sdk/python/pulumi_azure/apimanagement/gateway_certificate_authority.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['GatewayCertificateAuthorityArgs', 'GatewayCertificateAuthority'] @@ -25,11 +25,42 @@ def __init__(__self__, *, :param pulumi.Input[str] gateway_name: The name of the API Management Gateway. Changing this forces a new resource to be created. :param pulumi.Input[bool] is_trusted: Whether the API Management Gateway Certificate Authority is trusted. """ - pulumi.set(__self__, "api_management_id", api_management_id) - pulumi.set(__self__, "certificate_name", certificate_name) - pulumi.set(__self__, "gateway_name", gateway_name) + GatewayCertificateAuthorityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + certificate_name=certificate_name, + gateway_name=gateway_name, + is_trusted=is_trusted, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + certificate_name: Optional[pulumi.Input[str]] = None, + gateway_name: Optional[pulumi.Input[str]] = None, + is_trusted: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if api_management_id is None: + raise TypeError("Missing 'api_management_id' argument") + if certificate_name is None and 'certificateName' in kwargs: + certificate_name = kwargs['certificateName'] + if certificate_name is None: + raise TypeError("Missing 'certificate_name' argument") + if gateway_name is None and 'gatewayName' in kwargs: + gateway_name = kwargs['gatewayName'] + if gateway_name is None: + raise TypeError("Missing 'gateway_name' argument") + if is_trusted is None and 'isTrusted' in kwargs: + is_trusted = kwargs['isTrusted'] + + _setter("api_management_id", api_management_id) + _setter("certificate_name", certificate_name) + _setter("gateway_name", gateway_name) if is_trusted is not None: - pulumi.set(__self__, "is_trusted", is_trusted) + _setter("is_trusted", is_trusted) @property @pulumi.getter(name="apiManagementId") @@ -94,14 +125,39 @@ def __init__(__self__, *, :param pulumi.Input[str] gateway_name: The name of the API Management Gateway. Changing this forces a new resource to be created. :param pulumi.Input[bool] is_trusted: Whether the API Management Gateway Certificate Authority is trusted. """ + _GatewayCertificateAuthorityState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + certificate_name=certificate_name, + gateway_name=gateway_name, + is_trusted=is_trusted, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + certificate_name: Optional[pulumi.Input[str]] = None, + gateway_name: Optional[pulumi.Input[str]] = None, + is_trusted: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if certificate_name is None and 'certificateName' in kwargs: + certificate_name = kwargs['certificateName'] + if gateway_name is None and 'gatewayName' in kwargs: + gateway_name = kwargs['gatewayName'] + if is_trusted is None and 'isTrusted' in kwargs: + is_trusted = kwargs['isTrusted'] + if api_management_id is not None: - pulumi.set(__self__, "api_management_id", api_management_id) + _setter("api_management_id", api_management_id) if certificate_name is not None: - pulumi.set(__self__, "certificate_name", certificate_name) + _setter("certificate_name", certificate_name) if gateway_name is not None: - pulumi.set(__self__, "gateway_name", gateway_name) + _setter("gateway_name", gateway_name) if is_trusted is not None: - pulumi.set(__self__, "is_trusted", is_trusted) + _setter("is_trusted", is_trusted) @property @pulumi.getter(name="apiManagementId") @@ -275,6 +331,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GatewayCertificateAuthorityArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/gateway_host_name_configuration.py b/sdk/python/pulumi_azure/apimanagement/gateway_host_name_configuration.py index fb993810dd..65269a0072 100644 --- a/sdk/python/pulumi_azure/apimanagement/gateway_host_name_configuration.py +++ b/sdk/python/pulumi_azure/apimanagement/gateway_host_name_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['GatewayHostNameConfigurationArgs', 'GatewayHostNameConfiguration'] @@ -35,20 +35,71 @@ def __init__(__self__, *, :param pulumi.Input[bool] tls10_enabled: Whether TLS 1.0 is supported. :param pulumi.Input[bool] tls11_enabled: Whether TLS 1.1 is supported. """ - pulumi.set(__self__, "api_management_id", api_management_id) - pulumi.set(__self__, "certificate_id", certificate_id) - pulumi.set(__self__, "gateway_name", gateway_name) - pulumi.set(__self__, "host_name", host_name) + GatewayHostNameConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + certificate_id=certificate_id, + gateway_name=gateway_name, + host_name=host_name, + http2_enabled=http2_enabled, + name=name, + request_client_certificate_enabled=request_client_certificate_enabled, + tls10_enabled=tls10_enabled, + tls11_enabled=tls11_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + certificate_id: Optional[pulumi.Input[str]] = None, + gateway_name: Optional[pulumi.Input[str]] = None, + host_name: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + request_client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + tls10_enabled: Optional[pulumi.Input[bool]] = None, + tls11_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if api_management_id is None: + raise TypeError("Missing 'api_management_id' argument") + if certificate_id is None and 'certificateId' in kwargs: + certificate_id = kwargs['certificateId'] + if certificate_id is None: + raise TypeError("Missing 'certificate_id' argument") + if gateway_name is None and 'gatewayName' in kwargs: + gateway_name = kwargs['gatewayName'] + if gateway_name is None: + raise TypeError("Missing 'gateway_name' argument") + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if request_client_certificate_enabled is None and 'requestClientCertificateEnabled' in kwargs: + request_client_certificate_enabled = kwargs['requestClientCertificateEnabled'] + if tls10_enabled is None and 'tls10Enabled' in kwargs: + tls10_enabled = kwargs['tls10Enabled'] + if tls11_enabled is None and 'tls11Enabled' in kwargs: + tls11_enabled = kwargs['tls11Enabled'] + + _setter("api_management_id", api_management_id) + _setter("certificate_id", certificate_id) + _setter("gateway_name", gateway_name) + _setter("host_name", host_name) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if request_client_certificate_enabled is not None: - pulumi.set(__self__, "request_client_certificate_enabled", request_client_certificate_enabled) + _setter("request_client_certificate_enabled", request_client_certificate_enabled) if tls10_enabled is not None: - pulumi.set(__self__, "tls10_enabled", tls10_enabled) + _setter("tls10_enabled", tls10_enabled) if tls11_enabled is not None: - pulumi.set(__self__, "tls11_enabled", tls11_enabled) + _setter("tls11_enabled", tls11_enabled) @property @pulumi.getter(name="apiManagementId") @@ -183,24 +234,67 @@ def __init__(__self__, *, :param pulumi.Input[bool] tls10_enabled: Whether TLS 1.0 is supported. :param pulumi.Input[bool] tls11_enabled: Whether TLS 1.1 is supported. """ + _GatewayHostNameConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + certificate_id=certificate_id, + gateway_name=gateway_name, + host_name=host_name, + http2_enabled=http2_enabled, + name=name, + request_client_certificate_enabled=request_client_certificate_enabled, + tls10_enabled=tls10_enabled, + tls11_enabled=tls11_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + certificate_id: Optional[pulumi.Input[str]] = None, + gateway_name: Optional[pulumi.Input[str]] = None, + host_name: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + request_client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + tls10_enabled: Optional[pulumi.Input[bool]] = None, + tls11_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if certificate_id is None and 'certificateId' in kwargs: + certificate_id = kwargs['certificateId'] + if gateway_name is None and 'gatewayName' in kwargs: + gateway_name = kwargs['gatewayName'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if request_client_certificate_enabled is None and 'requestClientCertificateEnabled' in kwargs: + request_client_certificate_enabled = kwargs['requestClientCertificateEnabled'] + if tls10_enabled is None and 'tls10Enabled' in kwargs: + tls10_enabled = kwargs['tls10Enabled'] + if tls11_enabled is None and 'tls11Enabled' in kwargs: + tls11_enabled = kwargs['tls11Enabled'] + if api_management_id is not None: - pulumi.set(__self__, "api_management_id", api_management_id) + _setter("api_management_id", api_management_id) if certificate_id is not None: - pulumi.set(__self__, "certificate_id", certificate_id) + _setter("certificate_id", certificate_id) if gateway_name is not None: - pulumi.set(__self__, "gateway_name", gateway_name) + _setter("gateway_name", gateway_name) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if request_client_certificate_enabled is not None: - pulumi.set(__self__, "request_client_certificate_enabled", request_client_certificate_enabled) + _setter("request_client_certificate_enabled", request_client_certificate_enabled) if tls10_enabled is not None: - pulumi.set(__self__, "tls10_enabled", tls10_enabled) + _setter("tls10_enabled", tls10_enabled) if tls11_enabled is not None: - pulumi.set(__self__, "tls11_enabled", tls11_enabled) + _setter("tls11_enabled", tls11_enabled) @property @pulumi.getter(name="apiManagementId") @@ -452,6 +546,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GatewayHostNameConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/get_api.py b/sdk/python/pulumi_azure/apimanagement/get_api.py index 95da5d2428..957c94b759 100644 --- a/sdk/python/pulumi_azure/apimanagement/get_api.py +++ b/sdk/python/pulumi_azure/apimanagement/get_api.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/apimanagement/get_api_version_set.py b/sdk/python/pulumi_azure/apimanagement/get_api_version_set.py index 6e7155c295..4d86915118 100644 --- a/sdk/python/pulumi_azure/apimanagement/get_api_version_set.py +++ b/sdk/python/pulumi_azure/apimanagement/get_api_version_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/apimanagement/get_gateway.py b/sdk/python/pulumi_azure/apimanagement/get_gateway.py index a4f93fba1d..4352410173 100644 --- a/sdk/python/pulumi_azure/apimanagement/get_gateway.py +++ b/sdk/python/pulumi_azure/apimanagement/get_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/apimanagement/get_gateway_host_name_configuration.py b/sdk/python/pulumi_azure/apimanagement/get_gateway_host_name_configuration.py index 292e7cde8c..2c2d8561e8 100644 --- a/sdk/python/pulumi_azure/apimanagement/get_gateway_host_name_configuration.py +++ b/sdk/python/pulumi_azure/apimanagement/get_gateway_host_name_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/apimanagement/get_group.py b/sdk/python/pulumi_azure/apimanagement/get_group.py index 0041c368b5..4d6c0d36a0 100644 --- a/sdk/python/pulumi_azure/apimanagement/get_group.py +++ b/sdk/python/pulumi_azure/apimanagement/get_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/apimanagement/get_product.py b/sdk/python/pulumi_azure/apimanagement/get_product.py index 75cdc8e629..7ec4dfec5f 100644 --- a/sdk/python/pulumi_azure/apimanagement/get_product.py +++ b/sdk/python/pulumi_azure/apimanagement/get_product.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/apimanagement/get_service.py b/sdk/python/pulumi_azure/apimanagement/get_service.py index 606619baa4..9c9cd7e248 100644 --- a/sdk/python/pulumi_azure/apimanagement/get_service.py +++ b/sdk/python/pulumi_azure/apimanagement/get_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/apimanagement/get_user.py b/sdk/python/pulumi_azure/apimanagement/get_user.py index 0b32f229d0..ce9a095269 100644 --- a/sdk/python/pulumi_azure/apimanagement/get_user.py +++ b/sdk/python/pulumi_azure/apimanagement/get_user.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/apimanagement/global_schema.py b/sdk/python/pulumi_azure/apimanagement/global_schema.py index 8421e6224b..518939d948 100644 --- a/sdk/python/pulumi_azure/apimanagement/global_schema.py +++ b/sdk/python/pulumi_azure/apimanagement/global_schema.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['GlobalSchemaArgs', 'GlobalSchema'] @@ -29,13 +29,50 @@ def __init__(__self__, *, :param pulumi.Input[str] value: The string defining the document representing the Schema. :param pulumi.Input[str] description: The description of the schema. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "schema_id", schema_id) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + GlobalSchemaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + resource_group_name=resource_group_name, + schema_id=schema_id, + type=type, + value=value, + description=description, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + schema_id: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if schema_id is None: + raise TypeError("Missing 'schema_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("api_management_name", api_management_name) + _setter("resource_group_name", resource_group_name) + _setter("schema_id", schema_id) + _setter("type", type) + _setter("value", value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) @property @pulumi.getter(name="apiManagementName") @@ -128,18 +165,45 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The content type of the Schema. Possible values are `xml` and `json`. :param pulumi.Input[str] value: The string defining the document representing the Schema. """ + _GlobalSchemaState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + description=description, + resource_group_name=resource_group_name, + schema_id=schema_id, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + schema_id: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="apiManagementName") @@ -315,6 +379,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GlobalSchemaArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/group.py b/sdk/python/pulumi_azure/apimanagement/group.py index ab6a3badd5..848d9d1490 100644 --- a/sdk/python/pulumi_azure/apimanagement/group.py +++ b/sdk/python/pulumi_azure/apimanagement/group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['GroupArgs', 'Group'] @@ -31,17 +31,54 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the API Management Group. Changing this forces a new resource to be created. :param pulumi.Input[str] type: The type of this API Management Group. Possible values are `custom`, `external` and `system`. Default is `custom`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + GroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + display_name=display_name, + resource_group_name=resource_group_name, + description=description, + external_id=external_id, + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + external_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if external_id is None and 'externalId' in kwargs: + external_id = kwargs['externalId'] + + _setter("api_management_name", api_management_name) + _setter("display_name", display_name) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_id is not None: - pulumi.set(__self__, "external_id", external_id) + _setter("external_id", external_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="apiManagementName") @@ -148,20 +185,51 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Group should exist. Changing this forces a new resource to be created. :param pulumi.Input[str] type: The type of this API Management Group. Possible values are `custom`, `external` and `system`. Default is `custom`. Changing this forces a new resource to be created. """ + _GroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + description=description, + display_name=display_name, + external_id=external_id, + name=name, + resource_group_name=resource_group_name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + external_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if external_id is None and 'externalId' in kwargs: + external_id = kwargs['externalId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if external_id is not None: - pulumi.set(__self__, "external_id", external_id) + _setter("external_id", external_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="apiManagementName") @@ -349,6 +417,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/group_user.py b/sdk/python/pulumi_azure/apimanagement/group_user.py index 1894d7ea30..e95762b3d1 100644 --- a/sdk/python/pulumi_azure/apimanagement/group_user.py +++ b/sdk/python/pulumi_azure/apimanagement/group_user.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['GroupUserArgs', 'GroupUser'] @@ -25,10 +25,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created. :param pulumi.Input[str] user_id: The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "group_name", group_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "user_id", user_id) + GroupUserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + group_name=group_name, + resource_group_name=resource_group_name, + user_id=user_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + group_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if group_name is None and 'groupName' in kwargs: + group_name = kwargs['groupName'] + if group_name is None: + raise TypeError("Missing 'group_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if user_id is None and 'userId' in kwargs: + user_id = kwargs['userId'] + if user_id is None: + raise TypeError("Missing 'user_id' argument") + + _setter("api_management_name", api_management_name) + _setter("group_name", group_name) + _setter("resource_group_name", resource_group_name) + _setter("user_id", user_id) @property @pulumi.getter(name="apiManagementName") @@ -93,14 +126,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created. :param pulumi.Input[str] user_id: The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created. """ + _GroupUserState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + group_name=group_name, + resource_group_name=resource_group_name, + user_id=user_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + group_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if group_name is None and 'groupName' in kwargs: + group_name = kwargs['groupName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if user_id is None and 'userId' in kwargs: + user_id = kwargs['userId'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if group_name is not None: - pulumi.set(__self__, "group_name", group_name) + _setter("group_name", group_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if user_id is not None: - pulumi.set(__self__, "user_id", user_id) + _setter("user_id", user_id) @property @pulumi.getter(name="apiManagementName") @@ -238,6 +296,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GroupUserArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/identity_provider_aad.py b/sdk/python/pulumi_azure/apimanagement/identity_provider_aad.py index cee51d8d5d..770bacb022 100644 --- a/sdk/python/pulumi_azure/apimanagement/identity_provider_aad.py +++ b/sdk/python/pulumi_azure/apimanagement/identity_provider_aad.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IdentityProviderAadArgs', 'IdentityProviderAad'] @@ -29,13 +29,56 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created. :param pulumi.Input[str] signin_tenant: The AAD Tenant to use instead of Common when logging into Active Directory """ - pulumi.set(__self__, "allowed_tenants", allowed_tenants) - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IdentityProviderAadArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_tenants=allowed_tenants, + api_management_name=api_management_name, + client_id=client_id, + client_secret=client_secret, + resource_group_name=resource_group_name, + signin_tenant=signin_tenant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_tenants: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + api_management_name: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + signin_tenant: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_tenants is None and 'allowedTenants' in kwargs: + allowed_tenants = kwargs['allowedTenants'] + if allowed_tenants is None: + raise TypeError("Missing 'allowed_tenants' argument") + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if signin_tenant is None and 'signinTenant' in kwargs: + signin_tenant = kwargs['signinTenant'] + + _setter("allowed_tenants", allowed_tenants) + _setter("api_management_name", api_management_name) + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("resource_group_name", resource_group_name) if signin_tenant is not None: - pulumi.set(__self__, "signin_tenant", signin_tenant) + _setter("signin_tenant", signin_tenant) @property @pulumi.getter(name="allowedTenants") @@ -128,18 +171,51 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created. :param pulumi.Input[str] signin_tenant: The AAD Tenant to use instead of Common when logging into Active Directory """ + _IdentityProviderAadState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_tenants=allowed_tenants, + api_management_name=api_management_name, + client_id=client_id, + client_secret=client_secret, + resource_group_name=resource_group_name, + signin_tenant=signin_tenant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_tenants: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + api_management_name: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + signin_tenant: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_tenants is None and 'allowedTenants' in kwargs: + allowed_tenants = kwargs['allowedTenants'] + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if signin_tenant is None and 'signinTenant' in kwargs: + signin_tenant = kwargs['signinTenant'] + if allowed_tenants is not None: - pulumi.set(__self__, "allowed_tenants", allowed_tenants) + _setter("allowed_tenants", allowed_tenants) if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if signin_tenant is not None: - pulumi.set(__self__, "signin_tenant", signin_tenant) + _setter("signin_tenant", signin_tenant) @property @pulumi.getter(name="allowedTenants") @@ -315,6 +391,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IdentityProviderAadArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/identity_provider_aadb2c.py b/sdk/python/pulumi_azure/apimanagement/identity_provider_aadb2c.py index c6ec96e192..1bd0d2e2dd 100644 --- a/sdk/python/pulumi_azure/apimanagement/identity_provider_aadb2c.py +++ b/sdk/python/pulumi_azure/apimanagement/identity_provider_aadb2c.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IdentityProviderAadb2cArgs', 'IdentityProviderAadb2c'] @@ -39,19 +39,88 @@ def __init__(__self__, *, :param pulumi.Input[str] password_reset_policy: Password reset Policy Name. :param pulumi.Input[str] profile_editing_policy: Profile editing Policy Name. """ - pulumi.set(__self__, "allowed_tenant", allowed_tenant) - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "authority", authority) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "signin_policy", signin_policy) - pulumi.set(__self__, "signin_tenant", signin_tenant) - pulumi.set(__self__, "signup_policy", signup_policy) + IdentityProviderAadb2cArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_tenant=allowed_tenant, + api_management_name=api_management_name, + authority=authority, + client_id=client_id, + client_secret=client_secret, + resource_group_name=resource_group_name, + signin_policy=signin_policy, + signin_tenant=signin_tenant, + signup_policy=signup_policy, + password_reset_policy=password_reset_policy, + profile_editing_policy=profile_editing_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_tenant: Optional[pulumi.Input[str]] = None, + api_management_name: Optional[pulumi.Input[str]] = None, + authority: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + signin_policy: Optional[pulumi.Input[str]] = None, + signin_tenant: Optional[pulumi.Input[str]] = None, + signup_policy: Optional[pulumi.Input[str]] = None, + password_reset_policy: Optional[pulumi.Input[str]] = None, + profile_editing_policy: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_tenant is None and 'allowedTenant' in kwargs: + allowed_tenant = kwargs['allowedTenant'] + if allowed_tenant is None: + raise TypeError("Missing 'allowed_tenant' argument") + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if authority is None: + raise TypeError("Missing 'authority' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if signin_policy is None and 'signinPolicy' in kwargs: + signin_policy = kwargs['signinPolicy'] + if signin_policy is None: + raise TypeError("Missing 'signin_policy' argument") + if signin_tenant is None and 'signinTenant' in kwargs: + signin_tenant = kwargs['signinTenant'] + if signin_tenant is None: + raise TypeError("Missing 'signin_tenant' argument") + if signup_policy is None and 'signupPolicy' in kwargs: + signup_policy = kwargs['signupPolicy'] + if signup_policy is None: + raise TypeError("Missing 'signup_policy' argument") + if password_reset_policy is None and 'passwordResetPolicy' in kwargs: + password_reset_policy = kwargs['passwordResetPolicy'] + if profile_editing_policy is None and 'profileEditingPolicy' in kwargs: + profile_editing_policy = kwargs['profileEditingPolicy'] + + _setter("allowed_tenant", allowed_tenant) + _setter("api_management_name", api_management_name) + _setter("authority", authority) + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("resource_group_name", resource_group_name) + _setter("signin_policy", signin_policy) + _setter("signin_tenant", signin_tenant) + _setter("signup_policy", signup_policy) if password_reset_policy is not None: - pulumi.set(__self__, "password_reset_policy", password_reset_policy) + _setter("password_reset_policy", password_reset_policy) if profile_editing_policy is not None: - pulumi.set(__self__, "profile_editing_policy", profile_editing_policy) + _setter("profile_editing_policy", profile_editing_policy) @property @pulumi.getter(name="allowedTenant") @@ -214,28 +283,79 @@ def __init__(__self__, *, :param pulumi.Input[str] signin_tenant: The tenant to use instead of Common when logging into Active Directory, usually your B2C tenant domain. :param pulumi.Input[str] signup_policy: Signup Policy Name. """ + _IdentityProviderAadb2cState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_tenant=allowed_tenant, + api_management_name=api_management_name, + authority=authority, + client_id=client_id, + client_secret=client_secret, + password_reset_policy=password_reset_policy, + profile_editing_policy=profile_editing_policy, + resource_group_name=resource_group_name, + signin_policy=signin_policy, + signin_tenant=signin_tenant, + signup_policy=signup_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_tenant: Optional[pulumi.Input[str]] = None, + api_management_name: Optional[pulumi.Input[str]] = None, + authority: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + password_reset_policy: Optional[pulumi.Input[str]] = None, + profile_editing_policy: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + signin_policy: Optional[pulumi.Input[str]] = None, + signin_tenant: Optional[pulumi.Input[str]] = None, + signup_policy: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_tenant is None and 'allowedTenant' in kwargs: + allowed_tenant = kwargs['allowedTenant'] + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if password_reset_policy is None and 'passwordResetPolicy' in kwargs: + password_reset_policy = kwargs['passwordResetPolicy'] + if profile_editing_policy is None and 'profileEditingPolicy' in kwargs: + profile_editing_policy = kwargs['profileEditingPolicy'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if signin_policy is None and 'signinPolicy' in kwargs: + signin_policy = kwargs['signinPolicy'] + if signin_tenant is None and 'signinTenant' in kwargs: + signin_tenant = kwargs['signinTenant'] + if signup_policy is None and 'signupPolicy' in kwargs: + signup_policy = kwargs['signupPolicy'] + if allowed_tenant is not None: - pulumi.set(__self__, "allowed_tenant", allowed_tenant) + _setter("allowed_tenant", allowed_tenant) if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if authority is not None: - pulumi.set(__self__, "authority", authority) + _setter("authority", authority) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if password_reset_policy is not None: - pulumi.set(__self__, "password_reset_policy", password_reset_policy) + _setter("password_reset_policy", password_reset_policy) if profile_editing_policy is not None: - pulumi.set(__self__, "profile_editing_policy", profile_editing_policy) + _setter("profile_editing_policy", profile_editing_policy) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if signin_policy is not None: - pulumi.set(__self__, "signin_policy", signin_policy) + _setter("signin_policy", signin_policy) if signin_tenant is not None: - pulumi.set(__self__, "signin_tenant", signin_tenant) + _setter("signin_tenant", signin_tenant) if signup_policy is not None: - pulumi.set(__self__, "signup_policy", signup_policy) + _setter("signup_policy", signup_policy) @property @pulumi.getter(name="allowedTenant") @@ -501,6 +621,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IdentityProviderAadb2cArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/identity_provider_facebook.py b/sdk/python/pulumi_azure/apimanagement/identity_provider_facebook.py index 30553cef12..83e5027a9d 100644 --- a/sdk/python/pulumi_azure/apimanagement/identity_provider_facebook.py +++ b/sdk/python/pulumi_azure/apimanagement/identity_provider_facebook.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IdentityProviderFacebookArgs', 'IdentityProviderFacebook'] @@ -25,10 +25,43 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret: App Secret for Facebook. :param pulumi.Input[str] resource_group_name: The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret", app_secret) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IdentityProviderFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + app_id=app_id, + app_secret=app_secret, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret is None: + raise TypeError("Missing 'app_secret' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("api_management_name", api_management_name) + _setter("app_id", app_id) + _setter("app_secret", app_secret) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiManagementName") @@ -93,14 +126,39 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret: App Secret for Facebook. :param pulumi.Input[str] resource_group_name: The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created. """ + _IdentityProviderFacebookState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + app_id=app_id, + app_secret=app_secret, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if app_id is not None: - pulumi.set(__self__, "app_id", app_id) + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiManagementName") @@ -246,6 +304,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IdentityProviderFacebookArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/identity_provider_google.py b/sdk/python/pulumi_azure/apimanagement/identity_provider_google.py index 4bc07aaa8b..d115f76339 100644 --- a/sdk/python/pulumi_azure/apimanagement/identity_provider_google.py +++ b/sdk/python/pulumi_azure/apimanagement/identity_provider_google.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IdentityProviderGoogleArgs', 'IdentityProviderGoogle'] @@ -25,10 +25,43 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: Client secret for Google Sign-in. :param pulumi.Input[str] resource_group_name: The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IdentityProviderGoogleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + client_id=client_id, + client_secret=client_secret, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("api_management_name", api_management_name) + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiManagementName") @@ -93,14 +126,39 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: Client secret for Google Sign-in. :param pulumi.Input[str] resource_group_name: The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created. """ + _IdentityProviderGoogleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + client_id=client_id, + client_secret=client_secret, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiManagementName") @@ -246,6 +304,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IdentityProviderGoogleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/identity_provider_microsoft.py b/sdk/python/pulumi_azure/apimanagement/identity_provider_microsoft.py index 79f6aee7e2..69b6a122c2 100644 --- a/sdk/python/pulumi_azure/apimanagement/identity_provider_microsoft.py +++ b/sdk/python/pulumi_azure/apimanagement/identity_provider_microsoft.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IdentityProviderMicrosoftArgs', 'IdentityProviderMicrosoft'] @@ -25,10 +25,43 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: Client secret of the Azure AD Application. :param pulumi.Input[str] resource_group_name: The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IdentityProviderMicrosoftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + client_id=client_id, + client_secret=client_secret, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("api_management_name", api_management_name) + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiManagementName") @@ -93,14 +126,39 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: Client secret of the Azure AD Application. :param pulumi.Input[str] resource_group_name: The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created. """ + _IdentityProviderMicrosoftState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + client_id=client_id, + client_secret=client_secret, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiManagementName") @@ -246,6 +304,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IdentityProviderMicrosoftArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/identity_provider_twitter.py b/sdk/python/pulumi_azure/apimanagement/identity_provider_twitter.py index 79e20720e9..e5c557bf5d 100644 --- a/sdk/python/pulumi_azure/apimanagement/identity_provider_twitter.py +++ b/sdk/python/pulumi_azure/apimanagement/identity_provider_twitter.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IdentityProviderTwitterArgs', 'IdentityProviderTwitter'] @@ -25,10 +25,43 @@ def __init__(__self__, *, :param pulumi.Input[str] api_secret_key: App Consumer API secret key for Twitter. :param pulumi.Input[str] resource_group_name: The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "api_key", api_key) - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "api_secret_key", api_secret_key) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IdentityProviderTwitterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_key=api_key, + api_management_name=api_management_name, + api_secret_key=api_secret_key, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_key: Optional[pulumi.Input[str]] = None, + api_management_name: Optional[pulumi.Input[str]] = None, + api_secret_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_key is None and 'apiKey' in kwargs: + api_key = kwargs['apiKey'] + if api_key is None: + raise TypeError("Missing 'api_key' argument") + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if api_secret_key is None and 'apiSecretKey' in kwargs: + api_secret_key = kwargs['apiSecretKey'] + if api_secret_key is None: + raise TypeError("Missing 'api_secret_key' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("api_key", api_key) + _setter("api_management_name", api_management_name) + _setter("api_secret_key", api_secret_key) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiKey") @@ -93,14 +126,39 @@ def __init__(__self__, *, :param pulumi.Input[str] api_secret_key: App Consumer API secret key for Twitter. :param pulumi.Input[str] resource_group_name: The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created. """ + _IdentityProviderTwitterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_key=api_key, + api_management_name=api_management_name, + api_secret_key=api_secret_key, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_key: Optional[pulumi.Input[str]] = None, + api_management_name: Optional[pulumi.Input[str]] = None, + api_secret_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_key is None and 'apiKey' in kwargs: + api_key = kwargs['apiKey'] + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_secret_key is None and 'apiSecretKey' in kwargs: + api_secret_key = kwargs['apiSecretKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if api_key is not None: - pulumi.set(__self__, "api_key", api_key) + _setter("api_key", api_key) if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if api_secret_key is not None: - pulumi.set(__self__, "api_secret_key", api_secret_key) + _setter("api_secret_key", api_secret_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiKey") @@ -246,6 +304,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IdentityProviderTwitterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/logger.py b/sdk/python/pulumi_azure/apimanagement/logger.py index 8a55adfe90..e381ed5fc7 100644 --- a/sdk/python/pulumi_azure/apimanagement/logger.py +++ b/sdk/python/pulumi_azure/apimanagement/logger.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,20 +35,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of this Logger, which must be unique within the API Management Service. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_id: The target resource id which will be linked in the API-Management portal page. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + LoggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + resource_group_name=resource_group_name, + application_insights=application_insights, + buffered=buffered, + description=description, + eventhub=eventhub, + name=name, + resource_id=resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + application_insights: Optional[pulumi.Input['LoggerApplicationInsightsArgs']] = None, + buffered: Optional[pulumi.Input[bool]] = None, + description: Optional[pulumi.Input[str]] = None, + eventhub: Optional[pulumi.Input['LoggerEventhubArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if application_insights is None and 'applicationInsights' in kwargs: + application_insights = kwargs['applicationInsights'] + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + + _setter("api_management_name", api_management_name) + _setter("resource_group_name", resource_group_name) if application_insights is not None: - pulumi.set(__self__, "application_insights", application_insights) + _setter("application_insights", application_insights) if buffered is not None: - pulumi.set(__self__, "buffered", buffered) + _setter("buffered", buffered) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if eventhub is not None: - pulumi.set(__self__, "eventhub", eventhub) + _setter("eventhub", eventhub) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_id is not None: - pulumi.set(__self__, "resource_id", resource_id) + _setter("resource_id", resource_id) @property @pulumi.getter(name="apiManagementName") @@ -169,22 +206,55 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_id: The target resource id which will be linked in the API-Management portal page. Changing this forces a new resource to be created. """ + _LoggerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + application_insights=application_insights, + buffered=buffered, + description=description, + eventhub=eventhub, + name=name, + resource_group_name=resource_group_name, + resource_id=resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + application_insights: Optional[pulumi.Input['LoggerApplicationInsightsArgs']] = None, + buffered: Optional[pulumi.Input[bool]] = None, + description: Optional[pulumi.Input[str]] = None, + eventhub: Optional[pulumi.Input['LoggerEventhubArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if application_insights is None and 'applicationInsights' in kwargs: + application_insights = kwargs['applicationInsights'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if application_insights is not None: - pulumi.set(__self__, "application_insights", application_insights) + _setter("application_insights", application_insights) if buffered is not None: - pulumi.set(__self__, "buffered", buffered) + _setter("buffered", buffered) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if eventhub is not None: - pulumi.set(__self__, "eventhub", eventhub) + _setter("eventhub", eventhub) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if resource_id is not None: - pulumi.set(__self__, "resource_id", resource_id) + _setter("resource_id", resource_id) @property @pulumi.getter(name="apiManagementName") @@ -398,6 +468,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LoggerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -423,9 +497,19 @@ def _internal_init(__self__, if api_management_name is None and not opts.urn: raise TypeError("Missing required property 'api_management_name'") __props__.__dict__["api_management_name"] = api_management_name + if application_insights is not None and not isinstance(application_insights, LoggerApplicationInsightsArgs): + application_insights = application_insights or {} + def _setter(key, value): + application_insights[key] = value + LoggerApplicationInsightsArgs._configure(_setter, **application_insights) __props__.__dict__["application_insights"] = application_insights __props__.__dict__["buffered"] = buffered __props__.__dict__["description"] = description + if eventhub is not None and not isinstance(eventhub, LoggerEventhubArgs): + eventhub = eventhub or {} + def _setter(key, value): + eventhub[key] = value + LoggerEventhubArgs._configure(_setter, **eventhub) __props__.__dict__["eventhub"] = eventhub __props__.__dict__["name"] = name if resource_group_name is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/apimanagement/named_value.py b/sdk/python/pulumi_azure/apimanagement/named_value.py index f5b2755667..6c396086ca 100644 --- a/sdk/python/pulumi_azure/apimanagement/named_value.py +++ b/sdk/python/pulumi_azure/apimanagement/named_value.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,19 +37,58 @@ def __init__(__self__, *, :param pulumi.Input[str] value: The value of this API Management Named Value. :param pulumi.Input['NamedValueValueFromKeyVaultArgs'] value_from_key_vault: A `value_from_key_vault` block as defined below. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + NamedValueArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + display_name=display_name, + resource_group_name=resource_group_name, + name=name, + secret=secret, + tags=tags, + value=value, + value_from_key_vault=value_from_key_vault, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + value: Optional[pulumi.Input[str]] = None, + value_from_key_vault: Optional[pulumi.Input['NamedValueValueFromKeyVaultArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if value_from_key_vault is None and 'valueFromKeyVault' in kwargs: + value_from_key_vault = kwargs['valueFromKeyVault'] + + _setter("api_management_name", api_management_name) + _setter("display_name", display_name) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) if value_from_key_vault is not None: - pulumi.set(__self__, "value_from_key_vault", value_from_key_vault) + _setter("value_from_key_vault", value_from_key_vault) @property @pulumi.getter(name="apiManagementName") @@ -174,22 +213,55 @@ def __init__(__self__, *, :param pulumi.Input[str] value: The value of this API Management Named Value. :param pulumi.Input['NamedValueValueFromKeyVaultArgs'] value_from_key_vault: A `value_from_key_vault` block as defined below. """ + _NamedValueState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + display_name=display_name, + name=name, + resource_group_name=resource_group_name, + secret=secret, + tags=tags, + value=value, + value_from_key_vault=value_from_key_vault, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + value: Optional[pulumi.Input[str]] = None, + value_from_key_vault: Optional[pulumi.Input['NamedValueValueFromKeyVaultArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if value_from_key_vault is None and 'valueFromKeyVault' in kwargs: + value_from_key_vault = kwargs['valueFromKeyVault'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) if value_from_key_vault is not None: - pulumi.set(__self__, "value_from_key_vault", value_from_key_vault) + _setter("value_from_key_vault", value_from_key_vault) @property @pulumi.getter(name="apiManagementName") @@ -395,6 +467,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NamedValueArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -430,6 +506,11 @@ def _internal_init(__self__, __props__.__dict__["secret"] = secret __props__.__dict__["tags"] = tags __props__.__dict__["value"] = None if value is None else pulumi.Output.secret(value) + if value_from_key_vault is not None and not isinstance(value_from_key_vault, NamedValueValueFromKeyVaultArgs): + value_from_key_vault = value_from_key_vault or {} + def _setter(key, value): + value_from_key_vault[key] = value + NamedValueValueFromKeyVaultArgs._configure(_setter, **value_from_key_vault) __props__.__dict__["value_from_key_vault"] = value_from_key_vault secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["value"]) opts = pulumi.ResourceOptions.merge(opts, secret_opts) diff --git a/sdk/python/pulumi_azure/apimanagement/notification_recipient_email.py b/sdk/python/pulumi_azure/apimanagement/notification_recipient_email.py index a28f5b10d6..1ba0adf623 100644 --- a/sdk/python/pulumi_azure/apimanagement/notification_recipient_email.py +++ b/sdk/python/pulumi_azure/apimanagement/notification_recipient_email.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NotificationRecipientEmailArgs', 'NotificationRecipientEmail'] @@ -23,9 +23,34 @@ def __init__(__self__, *, :param pulumi.Input[str] email: The recipient email address. Changing this forces a new API Management Notification Recipient Email to be created. :param pulumi.Input[str] notification_type: The Notification Name to be received. Changing this forces a new API Management Notification Recipient Email to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`. """ - pulumi.set(__self__, "api_management_id", api_management_id) - pulumi.set(__self__, "email", email) - pulumi.set(__self__, "notification_type", notification_type) + NotificationRecipientEmailArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + email=email, + notification_type=notification_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + email: Optional[pulumi.Input[str]] = None, + notification_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if api_management_id is None: + raise TypeError("Missing 'api_management_id' argument") + if email is None: + raise TypeError("Missing 'email' argument") + if notification_type is None and 'notificationType' in kwargs: + notification_type = kwargs['notificationType'] + if notification_type is None: + raise TypeError("Missing 'notification_type' argument") + + _setter("api_management_id", api_management_id) + _setter("email", email) + _setter("notification_type", notification_type) @property @pulumi.getter(name="apiManagementId") @@ -76,12 +101,31 @@ def __init__(__self__, *, :param pulumi.Input[str] email: The recipient email address. Changing this forces a new API Management Notification Recipient Email to be created. :param pulumi.Input[str] notification_type: The Notification Name to be received. Changing this forces a new API Management Notification Recipient Email to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`. """ + _NotificationRecipientEmailState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + email=email, + notification_type=notification_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + email: Optional[pulumi.Input[str]] = None, + notification_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if notification_type is None and 'notificationType' in kwargs: + notification_type = kwargs['notificationType'] + if api_management_id is not None: - pulumi.set(__self__, "api_management_id", api_management_id) + _setter("api_management_id", api_management_id) if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if notification_type is not None: - pulumi.set(__self__, "notification_type", notification_type) + _setter("notification_type", notification_type) @property @pulumi.getter(name="apiManagementId") @@ -211,6 +255,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NotificationRecipientEmailArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/notification_recipient_user.py b/sdk/python/pulumi_azure/apimanagement/notification_recipient_user.py index ded46c69d0..56c3a05462 100644 --- a/sdk/python/pulumi_azure/apimanagement/notification_recipient_user.py +++ b/sdk/python/pulumi_azure/apimanagement/notification_recipient_user.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NotificationRecipientUserArgs', 'NotificationRecipientUser'] @@ -23,9 +23,36 @@ def __init__(__self__, *, :param pulumi.Input[str] notification_type: The Notification Name to be received. Changing this forces a new API Management Notification Recipient User to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`. :param pulumi.Input[str] user_id: The recipient user ID. Changing this forces a new API Management Notification Recipient User to be created. """ - pulumi.set(__self__, "api_management_id", api_management_id) - pulumi.set(__self__, "notification_type", notification_type) - pulumi.set(__self__, "user_id", user_id) + NotificationRecipientUserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + notification_type=notification_type, + user_id=user_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + notification_type: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if api_management_id is None: + raise TypeError("Missing 'api_management_id' argument") + if notification_type is None and 'notificationType' in kwargs: + notification_type = kwargs['notificationType'] + if notification_type is None: + raise TypeError("Missing 'notification_type' argument") + if user_id is None and 'userId' in kwargs: + user_id = kwargs['userId'] + if user_id is None: + raise TypeError("Missing 'user_id' argument") + + _setter("api_management_id", api_management_id) + _setter("notification_type", notification_type) + _setter("user_id", user_id) @property @pulumi.getter(name="apiManagementId") @@ -76,12 +103,33 @@ def __init__(__self__, *, :param pulumi.Input[str] notification_type: The Notification Name to be received. Changing this forces a new API Management Notification Recipient User to be created. Possible values are `AccountClosedPublisher`, `BCC`, `NewApplicationNotificationMessage`, `NewIssuePublisherNotificationMessage`, `PurchasePublisherNotificationMessage`, `QuotaLimitApproachingPublisherNotificationMessage`, and `RequestPublisherNotificationMessage`. :param pulumi.Input[str] user_id: The recipient user ID. Changing this forces a new API Management Notification Recipient User to be created. """ + _NotificationRecipientUserState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + notification_type=notification_type, + user_id=user_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + notification_type: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if notification_type is None and 'notificationType' in kwargs: + notification_type = kwargs['notificationType'] + if user_id is None and 'userId' in kwargs: + user_id = kwargs['userId'] + if api_management_id is not None: - pulumi.set(__self__, "api_management_id", api_management_id) + _setter("api_management_id", api_management_id) if notification_type is not None: - pulumi.set(__self__, "notification_type", notification_type) + _setter("notification_type", notification_type) if user_id is not None: - pulumi.set(__self__, "user_id", user_id) + _setter("user_id", user_id) @property @pulumi.getter(name="apiManagementId") @@ -227,6 +275,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NotificationRecipientUserArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/open_id_connect_provider.py b/sdk/python/pulumi_azure/apimanagement/open_id_connect_provider.py index 40c0ffc595..6b104dbb9e 100644 --- a/sdk/python/pulumi_azure/apimanagement/open_id_connect_provider.py +++ b/sdk/python/pulumi_azure/apimanagement/open_id_connect_provider.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['OpenIdConnectProviderArgs', 'OpenIdConnectProvider'] @@ -33,16 +33,65 @@ def __init__(__self__, *, :param pulumi.Input[str] description: A description of this OpenID Connect Provider. :param pulumi.Input[str] name: the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "metadata_endpoint", metadata_endpoint) - pulumi.set(__self__, "resource_group_name", resource_group_name) + OpenIdConnectProviderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + client_id=client_id, + client_secret=client_secret, + display_name=display_name, + metadata_endpoint=metadata_endpoint, + resource_group_name=resource_group_name, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + metadata_endpoint: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if metadata_endpoint is None and 'metadataEndpoint' in kwargs: + metadata_endpoint = kwargs['metadataEndpoint'] + if metadata_endpoint is None: + raise TypeError("Missing 'metadata_endpoint' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("api_management_name", api_management_name) + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("display_name", display_name) + _setter("metadata_endpoint", metadata_endpoint) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="apiManagementName") @@ -163,22 +212,59 @@ def __init__(__self__, *, :param pulumi.Input[str] name: the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created. """ + _OpenIdConnectProviderState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + client_id=client_id, + client_secret=client_secret, + description=description, + display_name=display_name, + metadata_endpoint=metadata_endpoint, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + metadata_endpoint: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if metadata_endpoint is None and 'metadataEndpoint' in kwargs: + metadata_endpoint = kwargs['metadataEndpoint'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if metadata_endpoint is not None: - pulumi.set(__self__, "metadata_endpoint", metadata_endpoint) + _setter("metadata_endpoint", metadata_endpoint) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiManagementName") @@ -384,6 +470,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OpenIdConnectProviderArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/outputs.py b/sdk/python/pulumi_azure/apimanagement/outputs.py index b47c9b2e75..12db383a4a 100644 --- a/sdk/python/pulumi_azure/apimanagement/outputs.py +++ b/sdk/python/pulumi_azure/apimanagement/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -127,12 +127,27 @@ def __init__(__self__, *, :param str name: The name of the contact person/organization. :param str url: Absolute URL of the contact information. """ + ApiContact._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + name=name, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[str] = None, + name: Optional[str] = None, + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter @@ -191,12 +206,33 @@ def __init__(__self__, *, :param 'ApiDiagnosticBackendRequestDataMaskingArgs' data_masking: A `data_masking` block as defined below. :param Sequence[str] headers_to_logs: Specifies a list of headers to log. """ + ApiDiagnosticBackendRequest._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[int] = None, + data_masking: Optional['outputs.ApiDiagnosticBackendRequestDataMasking'] = None, + headers_to_logs: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -249,10 +285,25 @@ def __init__(__self__, *, :param Sequence['ApiDiagnosticBackendRequestDataMaskingHeaderArgs'] headers: A `headers` block as defined below. :param Sequence['ApiDiagnosticBackendRequestDataMaskingQueryParamArgs'] query_params: A `query_params` block as defined below. """ + ApiDiagnosticBackendRequestDataMasking._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[Sequence['outputs.ApiDiagnosticBackendRequestDataMaskingHeader']] = None, + query_params: Optional[Sequence['outputs.ApiDiagnosticBackendRequestDataMaskingQueryParam']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -280,8 +331,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticBackendRequestDataMaskingHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -309,8 +377,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticBackendRequestDataMaskingQueryParam._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -361,12 +446,33 @@ def __init__(__self__, *, :param 'ApiDiagnosticBackendResponseDataMaskingArgs' data_masking: A `data_masking` block as defined below. :param Sequence[str] headers_to_logs: Specifies a list of headers to log. """ + ApiDiagnosticBackendResponse._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[int] = None, + data_masking: Optional['outputs.ApiDiagnosticBackendResponseDataMasking'] = None, + headers_to_logs: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -419,10 +525,25 @@ def __init__(__self__, *, :param Sequence['ApiDiagnosticBackendResponseDataMaskingHeaderArgs'] headers: A `headers` block as defined below. :param Sequence['ApiDiagnosticBackendResponseDataMaskingQueryParamArgs'] query_params: A `query_params` block as defined below. """ + ApiDiagnosticBackendResponseDataMasking._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[Sequence['outputs.ApiDiagnosticBackendResponseDataMaskingHeader']] = None, + query_params: Optional[Sequence['outputs.ApiDiagnosticBackendResponseDataMaskingQueryParam']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -450,8 +571,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticBackendResponseDataMaskingHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -479,8 +617,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticBackendResponseDataMaskingQueryParam._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -531,12 +686,33 @@ def __init__(__self__, *, :param 'ApiDiagnosticFrontendRequestDataMaskingArgs' data_masking: A `data_masking` block as defined below. :param Sequence[str] headers_to_logs: Specifies a list of headers to log. """ + ApiDiagnosticFrontendRequest._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[int] = None, + data_masking: Optional['outputs.ApiDiagnosticFrontendRequestDataMasking'] = None, + headers_to_logs: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -589,10 +765,25 @@ def __init__(__self__, *, :param Sequence['ApiDiagnosticFrontendRequestDataMaskingHeaderArgs'] headers: A `headers` block as defined below. :param Sequence['ApiDiagnosticFrontendRequestDataMaskingQueryParamArgs'] query_params: A `query_params` block as defined below. """ + ApiDiagnosticFrontendRequestDataMasking._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[Sequence['outputs.ApiDiagnosticFrontendRequestDataMaskingHeader']] = None, + query_params: Optional[Sequence['outputs.ApiDiagnosticFrontendRequestDataMaskingQueryParam']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -620,8 +811,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticFrontendRequestDataMaskingHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -649,8 +857,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticFrontendRequestDataMaskingQueryParam._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -701,12 +926,33 @@ def __init__(__self__, *, :param 'ApiDiagnosticFrontendResponseDataMaskingArgs' data_masking: A `data_masking` block as defined below. :param Sequence[str] headers_to_logs: Specifies a list of headers to log. """ + ApiDiagnosticFrontendResponse._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[int] = None, + data_masking: Optional['outputs.ApiDiagnosticFrontendResponseDataMasking'] = None, + headers_to_logs: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -759,10 +1005,25 @@ def __init__(__self__, *, :param Sequence['ApiDiagnosticFrontendResponseDataMaskingHeaderArgs'] headers: A `headers` block as defined below. :param Sequence['ApiDiagnosticFrontendResponseDataMaskingQueryParamArgs'] query_params: A `query_params` block as defined below. """ + ApiDiagnosticFrontendResponseDataMasking._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[Sequence['outputs.ApiDiagnosticFrontendResponseDataMaskingHeader']] = None, + query_params: Optional[Sequence['outputs.ApiDiagnosticFrontendResponseDataMaskingQueryParam']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -790,8 +1051,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticFrontendResponseDataMaskingHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -819,8 +1097,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + ApiDiagnosticFrontendResponseDataMaskingQueryParam._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -871,10 +1166,35 @@ def __init__(__self__, *, :param str content_value: The Content from which the API Definition should be imported. When a `content_format` of `*-link-*` is specified this must be a URL, otherwise this must be defined inline. :param 'ApiImportWsdlSelectorArgs' wsdl_selector: A `wsdl_selector` block as defined below, which allows you to limit the import of a WSDL to only a subset of the document. This can only be specified when `content_format` is `wsdl` or `wsdl-link`. """ - pulumi.set(__self__, "content_format", content_format) - pulumi.set(__self__, "content_value", content_value) + ApiImport._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_format=content_format, + content_value=content_value, + wsdl_selector=wsdl_selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_format: Optional[str] = None, + content_value: Optional[str] = None, + wsdl_selector: Optional['outputs.ApiImportWsdlSelector'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_format is None and 'contentFormat' in kwargs: + content_format = kwargs['contentFormat'] + if content_format is None: + raise TypeError("Missing 'content_format' argument") + if content_value is None and 'contentValue' in kwargs: + content_value = kwargs['contentValue'] + if content_value is None: + raise TypeError("Missing 'content_value' argument") + if wsdl_selector is None and 'wsdlSelector' in kwargs: + wsdl_selector = kwargs['wsdlSelector'] + + _setter("content_format", content_format) + _setter("content_value", content_value) if wsdl_selector is not None: - pulumi.set(__self__, "wsdl_selector", wsdl_selector) + _setter("wsdl_selector", wsdl_selector) @property @pulumi.getter(name="contentFormat") @@ -929,8 +1249,29 @@ def __init__(__self__, *, :param str endpoint_name: The name of endpoint (port) to import from WSDL. :param str service_name: The name of service to import from WSDL. """ - pulumi.set(__self__, "endpoint_name", endpoint_name) - pulumi.set(__self__, "service_name", service_name) + ApiImportWsdlSelector._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint_name=endpoint_name, + service_name=service_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint_name: Optional[str] = None, + service_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_name is None and 'endpointName' in kwargs: + endpoint_name = kwargs['endpointName'] + if endpoint_name is None: + raise TypeError("Missing 'endpoint_name' argument") + if service_name is None and 'serviceName' in kwargs: + service_name = kwargs['serviceName'] + if service_name is None: + raise TypeError("Missing 'service_name' argument") + + _setter("endpoint_name", endpoint_name) + _setter("service_name", service_name) @property @pulumi.getter(name="endpointName") @@ -958,10 +1299,23 @@ def __init__(__self__, *, :param str name: The name of the license . :param str url: Absolute URL of the license. """ + ApiLicense._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter @@ -1006,9 +1360,26 @@ def __init__(__self__, *, :param str authorization_server_name: OAuth authorization server identifier. The name of an OAuth2 Authorization Server. :param str scope: Operations scope. """ - pulumi.set(__self__, "authorization_server_name", authorization_server_name) + ApiOauth2Authorization._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorization_server_name=authorization_server_name, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorization_server_name: Optional[str] = None, + scope: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorization_server_name is None and 'authorizationServerName' in kwargs: + authorization_server_name = kwargs['authorizationServerName'] + if authorization_server_name is None: + raise TypeError("Missing 'authorization_server_name' argument") + + _setter("authorization_server_name", authorization_server_name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="authorizationServerName") @@ -1055,9 +1426,28 @@ def __init__(__self__, *, :param str openid_provider_name: OpenID Connect provider identifier. The name of an OpenID Connect Provider. :param Sequence[str] bearer_token_sending_methods: How to send token to the server. A list of zero or more methods. Valid values are `authorizationHeader` and `query`. """ - pulumi.set(__self__, "openid_provider_name", openid_provider_name) + ApiOpenidAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + openid_provider_name=openid_provider_name, + bearer_token_sending_methods=bearer_token_sending_methods, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + openid_provider_name: Optional[str] = None, + bearer_token_sending_methods: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if openid_provider_name is None and 'openidProviderName' in kwargs: + openid_provider_name = kwargs['openidProviderName'] + if openid_provider_name is None: + raise TypeError("Missing 'openid_provider_name' argument") + if bearer_token_sending_methods is None and 'bearerTokenSendingMethods' in kwargs: + bearer_token_sending_methods = kwargs['bearerTokenSendingMethods'] + + _setter("openid_provider_name", openid_provider_name) if bearer_token_sending_methods is not None: - pulumi.set(__self__, "bearer_token_sending_methods", bearer_token_sending_methods) + _setter("bearer_token_sending_methods", bearer_token_sending_methods) @property @pulumi.getter(name="openidProviderName") @@ -1106,14 +1496,33 @@ def __init__(__self__, *, :param Sequence['ApiOperationRequestQueryParameterArgs'] query_parameters: One or more `query_parameter` blocks as defined above. :param Sequence['ApiOperationRequestRepresentationArgs'] representations: One or more `representation` blocks as defined below. """ + ApiOperationRequest._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + headers=headers, + query_parameters=query_parameters, + representations=representations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + headers: Optional[Sequence['outputs.ApiOperationRequestHeader']] = None, + query_parameters: Optional[Sequence['outputs.ApiOperationRequestQueryParameter']] = None, + representations: Optional[Sequence['outputs.ApiOperationRequestRepresentation']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_parameters is None and 'queryParameters' in kwargs: + query_parameters = kwargs['queryParameters'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_parameters is not None: - pulumi.set(__self__, "query_parameters", query_parameters) + _setter("query_parameters", query_parameters) if representations is not None: - pulumi.set(__self__, "representations", representations) + _setter("representations", representations) @property @pulumi.getter @@ -1192,21 +1601,60 @@ def __init__(__self__, *, :param str type_name: The type name defined by the Schema. :param Sequence[str] values: One or more acceptable values for this Header. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "required", required) - pulumi.set(__self__, "type", type) + ApiOperationRequestHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + required=required, + type=type, + default_value=default_value, + description=description, + examples=examples, + schema_id=schema_id, + type_name=type_name, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + required: Optional[bool] = None, + type: Optional[str] = None, + default_value: Optional[str] = None, + description: Optional[str] = None, + examples: Optional[Sequence['outputs.ApiOperationRequestHeaderExample']] = None, + schema_id: Optional[str] = None, + type_name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if required is None: + raise TypeError("Missing 'required' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("name", name) + _setter("required", required) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -1313,15 +1761,38 @@ def __init__(__self__, *, :param str summary: A short description for this example. :param str value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationRequestHeaderExample._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + external_value: Optional[str] = None, + summary: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -1408,21 +1879,60 @@ def __init__(__self__, *, :param str type_name: The type name defined by the Schema. :param Sequence[str] values: One or more acceptable values for this Query Parameter. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "required", required) - pulumi.set(__self__, "type", type) + ApiOperationRequestQueryParameter._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + required=required, + type=type, + default_value=default_value, + description=description, + examples=examples, + schema_id=schema_id, + type_name=type_name, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + required: Optional[bool] = None, + type: Optional[str] = None, + default_value: Optional[str] = None, + description: Optional[str] = None, + examples: Optional[Sequence['outputs.ApiOperationRequestQueryParameterExample']] = None, + schema_id: Optional[str] = None, + type_name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if required is None: + raise TypeError("Missing 'required' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("name", name) + _setter("required", required) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -1529,15 +2039,38 @@ def __init__(__self__, *, :param str summary: A short description for this example. :param str value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationRequestQueryParameterExample._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + external_value: Optional[str] = None, + summary: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -1624,15 +2157,44 @@ def __init__(__self__, *, > **NOTE:** This can only be specified when `content_type` is not set to `application/x-www-form-urlencoded` or `multipart/form-data`. """ - pulumi.set(__self__, "content_type", content_type) + ApiOperationRequestRepresentation._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + examples=examples, + form_parameters=form_parameters, + schema_id=schema_id, + type_name=type_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[str] = None, + examples: Optional[Sequence['outputs.ApiOperationRequestRepresentationExample']] = None, + form_parameters: Optional[Sequence['outputs.ApiOperationRequestRepresentationFormParameter']] = None, + schema_id: Optional[str] = None, + type_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if content_type is None: + raise TypeError("Missing 'content_type' argument") + if form_parameters is None and 'formParameters' in kwargs: + form_parameters = kwargs['formParameters'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("content_type", content_type) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if form_parameters is not None: - pulumi.set(__self__, "form_parameters", form_parameters) + _setter("form_parameters", form_parameters) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) @property @pulumi.getter(name="contentType") @@ -1713,15 +2275,38 @@ def __init__(__self__, *, :param str summary: A short description for this example. :param str value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationRequestRepresentationExample._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + external_value: Optional[str] = None, + summary: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -1808,21 +2393,60 @@ def __init__(__self__, *, :param str type_name: The type name defined by the Schema. :param Sequence[str] values: One or more acceptable values for this Form Parameter. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "required", required) - pulumi.set(__self__, "type", type) + ApiOperationRequestRepresentationFormParameter._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + required=required, + type=type, + default_value=default_value, + description=description, + examples=examples, + schema_id=schema_id, + type_name=type_name, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + required: Optional[bool] = None, + type: Optional[str] = None, + default_value: Optional[str] = None, + description: Optional[str] = None, + examples: Optional[Sequence['outputs.ApiOperationRequestRepresentationFormParameterExample']] = None, + schema_id: Optional[str] = None, + type_name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if required is None: + raise TypeError("Missing 'required' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("name", name) + _setter("required", required) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -1929,15 +2553,38 @@ def __init__(__self__, *, :param str summary: A short description for this example. :param str value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationRequestRepresentationFormParameterExample._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + external_value: Optional[str] = None, + summary: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2010,13 +2657,34 @@ def __init__(__self__, *, :param Sequence['ApiOperationResponseHeaderArgs'] headers: One or more `header` blocks as defined above. :param Sequence['ApiOperationResponseRepresentationArgs'] representations: One or more `representation` blocks as defined below. """ - pulumi.set(__self__, "status_code", status_code) + ApiOperationResponse._configure( + lambda key, value: pulumi.set(__self__, key, value), + status_code=status_code, + description=description, + headers=headers, + representations=representations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + status_code: Optional[int] = None, + description: Optional[str] = None, + headers: Optional[Sequence['outputs.ApiOperationResponseHeader']] = None, + representations: Optional[Sequence['outputs.ApiOperationResponseRepresentation']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if status_code is None and 'statusCode' in kwargs: + status_code = kwargs['statusCode'] + if status_code is None: + raise TypeError("Missing 'status_code' argument") + + _setter("status_code", status_code) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if representations is not None: - pulumi.set(__self__, "representations", representations) + _setter("representations", representations) @property @pulumi.getter(name="statusCode") @@ -2095,21 +2763,60 @@ def __init__(__self__, *, :param str type_name: The type name defined by the Schema. :param Sequence[str] values: One or more acceptable values for this Header. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "required", required) - pulumi.set(__self__, "type", type) + ApiOperationResponseHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + required=required, + type=type, + default_value=default_value, + description=description, + examples=examples, + schema_id=schema_id, + type_name=type_name, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + required: Optional[bool] = None, + type: Optional[str] = None, + default_value: Optional[str] = None, + description: Optional[str] = None, + examples: Optional[Sequence['outputs.ApiOperationResponseHeaderExample']] = None, + schema_id: Optional[str] = None, + type_name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if required is None: + raise TypeError("Missing 'required' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("name", name) + _setter("required", required) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -2216,15 +2923,38 @@ def __init__(__self__, *, :param str summary: A short description for this example. :param str value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationResponseHeaderExample._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + external_value: Optional[str] = None, + summary: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2311,15 +3041,44 @@ def __init__(__self__, *, > **NOTE:** This can only be specified when `content_type` is not set to `application/x-www-form-urlencoded` or `multipart/form-data`. """ - pulumi.set(__self__, "content_type", content_type) + ApiOperationResponseRepresentation._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + examples=examples, + form_parameters=form_parameters, + schema_id=schema_id, + type_name=type_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[str] = None, + examples: Optional[Sequence['outputs.ApiOperationResponseRepresentationExample']] = None, + form_parameters: Optional[Sequence['outputs.ApiOperationResponseRepresentationFormParameter']] = None, + schema_id: Optional[str] = None, + type_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if content_type is None: + raise TypeError("Missing 'content_type' argument") + if form_parameters is None and 'formParameters' in kwargs: + form_parameters = kwargs['formParameters'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("content_type", content_type) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if form_parameters is not None: - pulumi.set(__self__, "form_parameters", form_parameters) + _setter("form_parameters", form_parameters) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) @property @pulumi.getter(name="contentType") @@ -2400,15 +3159,38 @@ def __init__(__self__, *, :param str summary: A short description for this example. :param str value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationResponseRepresentationExample._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + external_value: Optional[str] = None, + summary: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2495,21 +3277,60 @@ def __init__(__self__, *, :param str type_name: The type name defined by the Schema. :param Sequence[str] values: One or more acceptable values for this Form Parameter. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "required", required) - pulumi.set(__self__, "type", type) + ApiOperationResponseRepresentationFormParameter._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + required=required, + type=type, + default_value=default_value, + description=description, + examples=examples, + schema_id=schema_id, + type_name=type_name, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + required: Optional[bool] = None, + type: Optional[str] = None, + default_value: Optional[str] = None, + description: Optional[str] = None, + examples: Optional[Sequence['outputs.ApiOperationResponseRepresentationFormParameterExample']] = None, + schema_id: Optional[str] = None, + type_name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if required is None: + raise TypeError("Missing 'required' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("name", name) + _setter("required", required) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -2616,15 +3437,38 @@ def __init__(__self__, *, :param str summary: A short description for this example. :param str value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationResponseRepresentationFormParameterExample._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + external_value: Optional[str] = None, + summary: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2711,21 +3555,60 @@ def __init__(__self__, *, :param str type_name: The type name defined by the Schema. :param Sequence[str] values: One or more acceptable values for this Template Parameter. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "required", required) - pulumi.set(__self__, "type", type) + ApiOperationTemplateParameter._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + required=required, + type=type, + default_value=default_value, + description=description, + examples=examples, + schema_id=schema_id, + type_name=type_name, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + required: Optional[bool] = None, + type: Optional[str] = None, + default_value: Optional[str] = None, + description: Optional[str] = None, + examples: Optional[Sequence['outputs.ApiOperationTemplateParameterExample']] = None, + schema_id: Optional[str] = None, + type_name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if required is None: + raise TypeError("Missing 'required' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + if schema_id is None and 'schemaId' in kwargs: + schema_id = kwargs['schemaId'] + if type_name is None and 'typeName' in kwargs: + type_name = kwargs['typeName'] + + _setter("name", name) + _setter("required", required) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if examples is not None: - pulumi.set(__self__, "examples", examples) + _setter("examples", examples) if schema_id is not None: - pulumi.set(__self__, "schema_id", schema_id) + _setter("schema_id", schema_id) if type_name is not None: - pulumi.set(__self__, "type_name", type_name) + _setter("type_name", type_name) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -2832,15 +3715,38 @@ def __init__(__self__, *, :param str summary: A short description for this example. :param str value: The example of the representation. """ - pulumi.set(__self__, "name", name) + ApiOperationTemplateParameterExample._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + external_value=external_value, + summary=summary, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + external_value: Optional[str] = None, + summary: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if external_value is None and 'externalValue' in kwargs: + external_value = kwargs['externalValue'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if external_value is not None: - pulumi.set(__self__, "external_value", external_value) + _setter("external_value", external_value) if summary is not None: - pulumi.set(__self__, "summary", summary) + _setter("summary", summary) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2892,8 +3798,25 @@ def __init__(__self__, *, :param str header: The name of the HTTP Header which should be used for the Subscription Key. :param str query: The name of the QueryString parameter which should be used for the Subscription Key. """ - pulumi.set(__self__, "header", header) - pulumi.set(__self__, "query", query) + ApiSubscriptionKeyParameterNames._configure( + lambda key, value: pulumi.set(__self__, key, value), + header=header, + query=query, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header: Optional[str] = None, + query: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header is None: + raise TypeError("Missing 'header' argument") + if query is None: + raise TypeError("Missing 'query' argument") + + _setter("header", header) + _setter("query", query) @property @pulumi.getter @@ -2921,8 +3844,25 @@ def __init__(__self__, *, :param str name: The Name of the Parameter. :param str value: The Value of the Parameter. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AuthorizationServerTokenBodyParameter._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -2954,14 +3894,31 @@ def __init__(__self__, *, :param Mapping[str, str] header: A mapping of header parameters to pass to the backend host. The keys are the header names and the values are a comma separated string of header values. This is converted to a list before being passed to the API. :param Mapping[str, str] query: A mapping of query parameters to pass to the backend host. The keys are the query names and the values are a comma separated string of query values. This is converted to a list before being passed to the API. """ + BackendCredentials._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorization=authorization, + certificates=certificates, + header=header, + query=query, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorization: Optional['outputs.BackendCredentialsAuthorization'] = None, + certificates: Optional[Sequence[str]] = None, + header: Optional[Mapping[str, str]] = None, + query: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorization is not None: - pulumi.set(__self__, "authorization", authorization) + _setter("authorization", authorization) if certificates is not None: - pulumi.set(__self__, "certificates", certificates) + _setter("certificates", certificates) if header is not None: - pulumi.set(__self__, "header", header) + _setter("header", header) if query is not None: - pulumi.set(__self__, "query", query) + _setter("query", query) @property @pulumi.getter @@ -3005,10 +3962,23 @@ def __init__(__self__, *, :param str parameter: The authentication Parameter value. :param str scheme: The authentication Scheme name. """ + BackendCredentialsAuthorization._configure( + lambda key, value: pulumi.set(__self__, key, value), + parameter=parameter, + scheme=scheme, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + parameter: Optional[str] = None, + scheme: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parameter is not None: - pulumi.set(__self__, "parameter", parameter) + _setter("parameter", parameter) if scheme is not None: - pulumi.set(__self__, "scheme", scheme) + _setter("scheme", scheme) @property @pulumi.getter @@ -3038,10 +4008,29 @@ def __init__(__self__, *, :param str username: The username to connect to the proxy server. :param str password: The password to connect to the proxy server. """ - pulumi.set(__self__, "url", url) - pulumi.set(__self__, "username", username) + BackendProxy._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + username=username, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[str] = None, + username: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("url", url) + _setter("username", username) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -3115,16 +4104,53 @@ def __init__(__self__, *, :param Sequence[str] server_certificate_thumbprints: A list of thumbprints of the server certificates of the Service Fabric cluster. :param Sequence['BackendServiceFabricClusterServerX509NameArgs'] server_x509_names: One or more `server_x509_name` blocks as documented below. """ - pulumi.set(__self__, "management_endpoints", management_endpoints) - pulumi.set(__self__, "max_partition_resolution_retries", max_partition_resolution_retries) + BackendServiceFabricCluster._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_endpoints=management_endpoints, + max_partition_resolution_retries=max_partition_resolution_retries, + client_certificate_id=client_certificate_id, + client_certificate_thumbprint=client_certificate_thumbprint, + server_certificate_thumbprints=server_certificate_thumbprints, + server_x509_names=server_x509_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_endpoints: Optional[Sequence[str]] = None, + max_partition_resolution_retries: Optional[int] = None, + client_certificate_id: Optional[str] = None, + client_certificate_thumbprint: Optional[str] = None, + server_certificate_thumbprints: Optional[Sequence[str]] = None, + server_x509_names: Optional[Sequence['outputs.BackendServiceFabricClusterServerX509Name']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_endpoints is None and 'managementEndpoints' in kwargs: + management_endpoints = kwargs['managementEndpoints'] + if management_endpoints is None: + raise TypeError("Missing 'management_endpoints' argument") + if max_partition_resolution_retries is None and 'maxPartitionResolutionRetries' in kwargs: + max_partition_resolution_retries = kwargs['maxPartitionResolutionRetries'] + if max_partition_resolution_retries is None: + raise TypeError("Missing 'max_partition_resolution_retries' argument") + if client_certificate_id is None and 'clientCertificateId' in kwargs: + client_certificate_id = kwargs['clientCertificateId'] + if client_certificate_thumbprint is None and 'clientCertificateThumbprint' in kwargs: + client_certificate_thumbprint = kwargs['clientCertificateThumbprint'] + if server_certificate_thumbprints is None and 'serverCertificateThumbprints' in kwargs: + server_certificate_thumbprints = kwargs['serverCertificateThumbprints'] + if server_x509_names is None and 'serverX509Names' in kwargs: + server_x509_names = kwargs['serverX509Names'] + + _setter("management_endpoints", management_endpoints) + _setter("max_partition_resolution_retries", max_partition_resolution_retries) if client_certificate_id is not None: - pulumi.set(__self__, "client_certificate_id", client_certificate_id) + _setter("client_certificate_id", client_certificate_id) if client_certificate_thumbprint is not None: - pulumi.set(__self__, "client_certificate_thumbprint", client_certificate_thumbprint) + _setter("client_certificate_thumbprint", client_certificate_thumbprint) if server_certificate_thumbprints is not None: - pulumi.set(__self__, "server_certificate_thumbprints", server_certificate_thumbprints) + _setter("server_certificate_thumbprints", server_certificate_thumbprints) if server_x509_names is not None: - pulumi.set(__self__, "server_x509_names", server_x509_names) + _setter("server_x509_names", server_x509_names) @property @pulumi.getter(name="managementEndpoints") @@ -3204,8 +4230,27 @@ def __init__(__self__, *, :param str issuer_certificate_thumbprint: The thumbprint for the issuer of the certificate. :param str name: The name of the API Management backend. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "issuer_certificate_thumbprint", issuer_certificate_thumbprint) - pulumi.set(__self__, "name", name) + BackendServiceFabricClusterServerX509Name._configure( + lambda key, value: pulumi.set(__self__, key, value), + issuer_certificate_thumbprint=issuer_certificate_thumbprint, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + issuer_certificate_thumbprint: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if issuer_certificate_thumbprint is None and 'issuerCertificateThumbprint' in kwargs: + issuer_certificate_thumbprint = kwargs['issuerCertificateThumbprint'] + if issuer_certificate_thumbprint is None: + raise TypeError("Missing 'issuer_certificate_thumbprint' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("issuer_certificate_thumbprint", issuer_certificate_thumbprint) + _setter("name", name) @property @pulumi.getter(name="issuerCertificateThumbprint") @@ -3252,10 +4297,27 @@ def __init__(__self__, *, :param bool validate_certificate_chain: Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for the backend host. :param bool validate_certificate_name: Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for the backend host. """ + BackendTls._configure( + lambda key, value: pulumi.set(__self__, key, value), + validate_certificate_chain=validate_certificate_chain, + validate_certificate_name=validate_certificate_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + validate_certificate_chain: Optional[bool] = None, + validate_certificate_name: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if validate_certificate_chain is None and 'validateCertificateChain' in kwargs: + validate_certificate_chain = kwargs['validateCertificateChain'] + if validate_certificate_name is None and 'validateCertificateName' in kwargs: + validate_certificate_name = kwargs['validateCertificateName'] + if validate_certificate_chain is not None: - pulumi.set(__self__, "validate_certificate_chain", validate_certificate_chain) + _setter("validate_certificate_chain", validate_certificate_chain) if validate_certificate_name is not None: - pulumi.set(__self__, "validate_certificate_name", validate_certificate_name) + _setter("validate_certificate_name", validate_certificate_name) @property @pulumi.getter(name="validateCertificateChain") @@ -3327,27 +4389,74 @@ def __init__(__self__, *, > **NOTE:** If a User Assigned Managed identity is specified for `ssl_keyvault_identity_client_id` then this identity must be associated to the `apimanagement.Service` within an `identity` block. """ - pulumi.set(__self__, "host_name", host_name) + CustomDomainDeveloperPortal._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + certificate: Optional[str] = None, + certificate_password: Optional[str] = None, + certificate_source: Optional[str] = None, + certificate_status: Optional[str] = None, + expiry: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + ssl_keyvault_identity_client_id: Optional[str] = None, + subject: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -3482,29 +4591,80 @@ def __init__(__self__, *, > **NOTE:** If a User Assigned Managed identity is specified for `ssl_keyvault_identity_client_id` then this identity must be associated to the `apimanagement.Service` within an `identity` block. """ - pulumi.set(__self__, "host_name", host_name) + CustomDomainGateway._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + default_ssl_binding=default_ssl_binding, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + certificate: Optional[str] = None, + certificate_password: Optional[str] = None, + certificate_source: Optional[str] = None, + certificate_status: Optional[str] = None, + default_ssl_binding: Optional[bool] = None, + expiry: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + ssl_keyvault_identity_client_id: Optional[str] = None, + subject: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if default_ssl_binding is None and 'defaultSslBinding' in kwargs: + default_ssl_binding = kwargs['defaultSslBinding'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if default_ssl_binding is not None: - pulumi.set(__self__, "default_ssl_binding", default_ssl_binding) + _setter("default_ssl_binding", default_ssl_binding) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -3643,27 +4803,74 @@ def __init__(__self__, *, > **NOTE:** If a User Assigned Managed identity is specified for `ssl_keyvault_identity_client_id` then this identity must be associated to the `apimanagement.Service` within an `identity` block. """ - pulumi.set(__self__, "host_name", host_name) + CustomDomainManagement._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + certificate: Optional[str] = None, + certificate_password: Optional[str] = None, + certificate_source: Optional[str] = None, + certificate_status: Optional[str] = None, + expiry: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + ssl_keyvault_identity_client_id: Optional[str] = None, + subject: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -3794,27 +5001,74 @@ def __init__(__self__, *, > **NOTE:** If a User Assigned Managed identity is specified for `ssl_keyvault_identity_client_id` then this identity must be associated to the `apimanagement.Service` within an `identity` block. """ - pulumi.set(__self__, "host_name", host_name) + CustomDomainPortal._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + certificate: Optional[str] = None, + certificate_password: Optional[str] = None, + certificate_source: Optional[str] = None, + certificate_status: Optional[str] = None, + expiry: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + ssl_keyvault_identity_client_id: Optional[str] = None, + subject: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -3945,27 +5199,74 @@ def __init__(__self__, *, > **NOTE:** If a User Assigned Managed identity is specified for `ssl_keyvault_identity_client_id` then this identity must be associated to the `apimanagement.Service` within an `identity` block. """ - pulumi.set(__self__, "host_name", host_name) + CustomDomainScm._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + certificate: Optional[str] = None, + certificate_password: Optional[str] = None, + certificate_source: Optional[str] = None, + certificate_status: Optional[str] = None, + expiry: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + ssl_keyvault_identity_client_id: Optional[str] = None, + subject: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -4075,12 +5376,33 @@ def __init__(__self__, *, :param 'DiagnosticBackendRequestDataMaskingArgs' data_masking: A `data_masking` block as defined below. :param Sequence[str] headers_to_logs: Specifies a list of headers to log. """ + DiagnosticBackendRequest._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[int] = None, + data_masking: Optional['outputs.DiagnosticBackendRequestDataMasking'] = None, + headers_to_logs: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -4133,10 +5455,25 @@ def __init__(__self__, *, :param Sequence['DiagnosticBackendRequestDataMaskingHeaderArgs'] headers: A `headers` block as defined below. :param Sequence['DiagnosticBackendRequestDataMaskingQueryParamArgs'] query_params: A `query_params` block as defined below. """ + DiagnosticBackendRequestDataMasking._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[Sequence['outputs.DiagnosticBackendRequestDataMaskingHeader']] = None, + query_params: Optional[Sequence['outputs.DiagnosticBackendRequestDataMaskingQueryParam']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -4164,8 +5501,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticBackendRequestDataMaskingHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4193,8 +5547,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticBackendRequestDataMaskingQueryParam._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4245,12 +5616,33 @@ def __init__(__self__, *, :param 'DiagnosticBackendResponseDataMaskingArgs' data_masking: A `data_masking` block as defined below. :param Sequence[str] headers_to_logs: Specifies a list of headers to log. """ + DiagnosticBackendResponse._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[int] = None, + data_masking: Optional['outputs.DiagnosticBackendResponseDataMasking'] = None, + headers_to_logs: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -4303,10 +5695,25 @@ def __init__(__self__, *, :param Sequence['DiagnosticBackendResponseDataMaskingHeaderArgs'] headers: A `headers` block as defined below. :param Sequence['DiagnosticBackendResponseDataMaskingQueryParamArgs'] query_params: A `query_params` block as defined below. """ + DiagnosticBackendResponseDataMasking._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[Sequence['outputs.DiagnosticBackendResponseDataMaskingHeader']] = None, + query_params: Optional[Sequence['outputs.DiagnosticBackendResponseDataMaskingQueryParam']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -4334,8 +5741,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticBackendResponseDataMaskingHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4363,8 +5787,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticBackendResponseDataMaskingQueryParam._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4415,12 +5856,33 @@ def __init__(__self__, *, :param 'DiagnosticFrontendRequestDataMaskingArgs' data_masking: A `data_masking` block as defined below. :param Sequence[str] headers_to_logs: Specifies a list of headers to log. """ + DiagnosticFrontendRequest._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[int] = None, + data_masking: Optional['outputs.DiagnosticFrontendRequestDataMasking'] = None, + headers_to_logs: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -4473,10 +5935,25 @@ def __init__(__self__, *, :param Sequence['DiagnosticFrontendRequestDataMaskingHeaderArgs'] headers: A `headers` block as defined below. :param Sequence['DiagnosticFrontendRequestDataMaskingQueryParamArgs'] query_params: A `query_params` block as defined below. """ + DiagnosticFrontendRequestDataMasking._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[Sequence['outputs.DiagnosticFrontendRequestDataMaskingHeader']] = None, + query_params: Optional[Sequence['outputs.DiagnosticFrontendRequestDataMaskingQueryParam']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -4504,8 +5981,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticFrontendRequestDataMaskingHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4533,8 +6027,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticFrontendRequestDataMaskingQueryParam._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4585,12 +6096,33 @@ def __init__(__self__, *, :param 'DiagnosticFrontendResponseDataMaskingArgs' data_masking: A `data_masking` block as defined below. :param Sequence[str] headers_to_logs: Specifies a list of headers to log. """ + DiagnosticFrontendResponse._configure( + lambda key, value: pulumi.set(__self__, key, value), + body_bytes=body_bytes, + data_masking=data_masking, + headers_to_logs=headers_to_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body_bytes: Optional[int] = None, + data_masking: Optional['outputs.DiagnosticFrontendResponseDataMasking'] = None, + headers_to_logs: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body_bytes is None and 'bodyBytes' in kwargs: + body_bytes = kwargs['bodyBytes'] + if data_masking is None and 'dataMasking' in kwargs: + data_masking = kwargs['dataMasking'] + if headers_to_logs is None and 'headersToLogs' in kwargs: + headers_to_logs = kwargs['headersToLogs'] + if body_bytes is not None: - pulumi.set(__self__, "body_bytes", body_bytes) + _setter("body_bytes", body_bytes) if data_masking is not None: - pulumi.set(__self__, "data_masking", data_masking) + _setter("data_masking", data_masking) if headers_to_logs is not None: - pulumi.set(__self__, "headers_to_logs", headers_to_logs) + _setter("headers_to_logs", headers_to_logs) @property @pulumi.getter(name="bodyBytes") @@ -4643,10 +6175,25 @@ def __init__(__self__, *, :param Sequence['DiagnosticFrontendResponseDataMaskingHeaderArgs'] headers: A `headers` block as defined below. :param Sequence['DiagnosticFrontendResponseDataMaskingQueryParamArgs'] query_params: A `query_params` block as defined below. """ + DiagnosticFrontendResponseDataMasking._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + query_params=query_params, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional[Sequence['outputs.DiagnosticFrontendResponseDataMaskingHeader']] = None, + query_params: Optional[Sequence['outputs.DiagnosticFrontendResponseDataMaskingQueryParam']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_params is None and 'queryParams' in kwargs: + query_params = kwargs['queryParams'] + if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if query_params is not None: - pulumi.set(__self__, "query_params", query_params) + _setter("query_params", query_params) @property @pulumi.getter @@ -4674,8 +6221,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticFrontendResponseDataMaskingHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4703,8 +6267,25 @@ def __init__(__self__, *, :param str mode: The data masking mode. Possible values are `Mask` and `Hide` for `query_params`. The only possible value is `Mask` for `headers`. :param str value: The name of the header or the query parameter to mask. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "value", value) + DiagnosticFrontendResponseDataMaskingQueryParam._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("mode", mode) + _setter("value", value) @property @pulumi.getter @@ -4736,13 +6317,32 @@ def __init__(__self__, *, :param str district: The district, state, or province where the resource is located. :param str region: The country or region where the resource is located. """ - pulumi.set(__self__, "name", name) + GatewayLocationData._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + city=city, + district=district, + region=region, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + city: Optional[str] = None, + district: Optional[str] = None, + region: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if city is not None: - pulumi.set(__self__, "city", city) + _setter("city", city) if district is not None: - pulumi.set(__self__, "district", district) + _setter("district", district) if region is not None: - pulumi.set(__self__, "region", region) + _setter("region", region) @property @pulumi.getter @@ -4801,7 +6401,22 @@ def __init__(__self__, *, """ :param str instrumentation_key: The instrumentation key used to push data to Application Insights. """ - pulumi.set(__self__, "instrumentation_key", instrumentation_key) + LoggerApplicationInsights._configure( + lambda key, value: pulumi.set(__self__, key, value), + instrumentation_key=instrumentation_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + instrumentation_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if instrumentation_key is None and 'instrumentationKey' in kwargs: + instrumentation_key = kwargs['instrumentationKey'] + if instrumentation_key is None: + raise TypeError("Missing 'instrumentation_key' argument") + + _setter("instrumentation_key", instrumentation_key) @property @pulumi.getter(name="instrumentationKey") @@ -4838,8 +6453,27 @@ def __init__(__self__, *, :param str connection_string: The connection string of an EventHub Namespace. :param str name: The name of an EventHub. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "name", name) + LoggerEventhub._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("connection_string", connection_string) + _setter("name", name) @property @pulumi.getter(name="connectionString") @@ -4886,9 +6520,28 @@ def __init__(__self__, *, :param str secret_id: The resource ID of the Key Vault Secret. :param str identity_client_id: The client ID of User Assigned Identity, for the API Management Service, which will be used to access the key vault secret. The System Assigned Identity will be used in absence. """ - pulumi.set(__self__, "secret_id", secret_id) + NamedValueValueFromKeyVault._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_id=secret_id, + identity_client_id=identity_client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_id: Optional[str] = None, + identity_client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_id is None and 'secretId' in kwargs: + secret_id = kwargs['secretId'] + if secret_id is None: + raise TypeError("Missing 'secret_id' argument") + if identity_client_id is None and 'identityClientId' in kwargs: + identity_client_id = kwargs['identityClientId'] + + _setter("secret_id", secret_id) if identity_client_id is not None: - pulumi.set(__self__, "identity_client_id", identity_client_id) + _setter("identity_client_id", identity_client_id) @property @pulumi.getter(name="secretId") @@ -4959,23 +6612,64 @@ def __init__(__self__, *, :param 'ServiceAdditionalLocationVirtualNetworkConfigurationArgs' virtual_network_configuration: A `virtual_network_configuration` block as defined below. Required when `virtual_network_type` is `External` or `Internal`. :param Sequence[str] zones: A list of availability zones. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "location", location) + ServiceAdditionalLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + capacity=capacity, + gateway_disabled=gateway_disabled, + gateway_regional_url=gateway_regional_url, + private_ip_addresses=private_ip_addresses, + public_ip_address_id=public_ip_address_id, + public_ip_addresses=public_ip_addresses, + virtual_network_configuration=virtual_network_configuration, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[str] = None, + capacity: Optional[int] = None, + gateway_disabled: Optional[bool] = None, + gateway_regional_url: Optional[str] = None, + private_ip_addresses: Optional[Sequence[str]] = None, + public_ip_address_id: Optional[str] = None, + public_ip_addresses: Optional[Sequence[str]] = None, + virtual_network_configuration: Optional['outputs.ServiceAdditionalLocationVirtualNetworkConfiguration'] = None, + zones: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is None: + raise TypeError("Missing 'location' argument") + if gateway_disabled is None and 'gatewayDisabled' in kwargs: + gateway_disabled = kwargs['gatewayDisabled'] + if gateway_regional_url is None and 'gatewayRegionalUrl' in kwargs: + gateway_regional_url = kwargs['gatewayRegionalUrl'] + if private_ip_addresses is None and 'privateIpAddresses' in kwargs: + private_ip_addresses = kwargs['privateIpAddresses'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if virtual_network_configuration is None and 'virtualNetworkConfiguration' in kwargs: + virtual_network_configuration = kwargs['virtualNetworkConfiguration'] + + _setter("location", location) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if gateway_disabled is not None: - pulumi.set(__self__, "gateway_disabled", gateway_disabled) + _setter("gateway_disabled", gateway_disabled) if gateway_regional_url is not None: - pulumi.set(__self__, "gateway_regional_url", gateway_regional_url) + _setter("gateway_regional_url", gateway_regional_url) if private_ip_addresses is not None: - pulumi.set(__self__, "private_ip_addresses", private_ip_addresses) + _setter("private_ip_addresses", private_ip_addresses) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if virtual_network_configuration is not None: - pulumi.set(__self__, "virtual_network_configuration", virtual_network_configuration) + _setter("virtual_network_configuration", virtual_network_configuration) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -5076,7 +6770,22 @@ def __init__(__self__, *, """ :param str subnet_id: The id of the subnet that will be used for the API Management. """ - pulumi.set(__self__, "subnet_id", subnet_id) + ServiceAdditionalLocationVirtualNetworkConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="subnetId") @@ -5125,16 +6834,47 @@ def __init__(__self__, *, :param str subject: The subject of the certificate. :param str thumbprint: The thumbprint of the certificate. """ - pulumi.set(__self__, "encoded_certificate", encoded_certificate) - pulumi.set(__self__, "store_name", store_name) + ServiceCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + encoded_certificate=encoded_certificate, + store_name=store_name, + certificate_password=certificate_password, + expiry=expiry, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encoded_certificate: Optional[str] = None, + store_name: Optional[str] = None, + certificate_password: Optional[str] = None, + expiry: Optional[str] = None, + subject: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encoded_certificate is None and 'encodedCertificate' in kwargs: + encoded_certificate = kwargs['encodedCertificate'] + if encoded_certificate is None: + raise TypeError("Missing 'encoded_certificate' argument") + if store_name is None and 'storeName' in kwargs: + store_name = kwargs['storeName'] + if store_name is None: + raise TypeError("Missing 'store_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + + _setter("encoded_certificate", encoded_certificate) + _setter("store_name", store_name) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="encodedCertificate") @@ -5219,14 +6959,37 @@ def __init__(__self__, *, :param bool user_registration_enabled: Should user registration requests be delegated to an external url? Defaults to `false`. :param str validation_key: A base64-encoded validation key to validate, that a request is coming from Azure API Management. """ + ServiceDelegation._configure( + lambda key, value: pulumi.set(__self__, key, value), + subscriptions_enabled=subscriptions_enabled, + url=url, + user_registration_enabled=user_registration_enabled, + validation_key=validation_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subscriptions_enabled: Optional[bool] = None, + url: Optional[str] = None, + user_registration_enabled: Optional[bool] = None, + validation_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subscriptions_enabled is None and 'subscriptionsEnabled' in kwargs: + subscriptions_enabled = kwargs['subscriptionsEnabled'] + if user_registration_enabled is None and 'userRegistrationEnabled' in kwargs: + user_registration_enabled = kwargs['userRegistrationEnabled'] + if validation_key is None and 'validationKey' in kwargs: + validation_key = kwargs['validationKey'] + if subscriptions_enabled is not None: - pulumi.set(__self__, "subscriptions_enabled", subscriptions_enabled) + _setter("subscriptions_enabled", subscriptions_enabled) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) if user_registration_enabled is not None: - pulumi.set(__self__, "user_registration_enabled", user_registration_enabled) + _setter("user_registration_enabled", user_registration_enabled) if validation_key is not None: - pulumi.set(__self__, "validation_key", validation_key) + _setter("validation_key", validation_key) @property @pulumi.getter(name="subscriptionsEnabled") @@ -5293,16 +7056,37 @@ def __init__(__self__, *, :param Sequence['ServiceHostnameConfigurationProxyArgs'] proxies: One or more `proxy` blocks as documented below. :param Sequence['ServiceHostnameConfigurationScmArgs'] scms: One or more `scm` blocks as documented below. """ + ServiceHostnameConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + developer_portals=developer_portals, + managements=managements, + portals=portals, + proxies=proxies, + scms=scms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + developer_portals: Optional[Sequence['outputs.ServiceHostnameConfigurationDeveloperPortal']] = None, + managements: Optional[Sequence['outputs.ServiceHostnameConfigurationManagement']] = None, + portals: Optional[Sequence['outputs.ServiceHostnameConfigurationPortal']] = None, + proxies: Optional[Sequence['outputs.ServiceHostnameConfigurationProxy']] = None, + scms: Optional[Sequence['outputs.ServiceHostnameConfigurationScm']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if developer_portals is None and 'developerPortals' in kwargs: + developer_portals = kwargs['developerPortals'] + if developer_portals is not None: - pulumi.set(__self__, "developer_portals", developer_portals) + _setter("developer_portals", developer_portals) if managements is not None: - pulumi.set(__self__, "managements", managements) + _setter("managements", managements) if portals is not None: - pulumi.set(__self__, "portals", portals) + _setter("portals", portals) if proxies is not None: - pulumi.set(__self__, "proxies", proxies) + _setter("proxies", proxies) if scms is not None: - pulumi.set(__self__, "scms", scms) + _setter("scms", scms) @property @pulumi.getter(name="developerPortals") @@ -5405,27 +7189,74 @@ def __init__(__self__, *, :param str subject: The subject of the certificate. :param str thumbprint: The thumbprint of the certificate. """ - pulumi.set(__self__, "host_name", host_name) + ServiceHostnameConfigurationDeveloperPortal._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + certificate: Optional[str] = None, + certificate_password: Optional[str] = None, + certificate_source: Optional[str] = None, + certificate_status: Optional[str] = None, + expiry: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + ssl_keyvault_identity_client_id: Optional[str] = None, + subject: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -5582,27 +7413,74 @@ def __init__(__self__, *, :param str subject: The subject of the certificate. :param str thumbprint: The thumbprint of the certificate. """ - pulumi.set(__self__, "host_name", host_name) + ServiceHostnameConfigurationManagement._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + certificate: Optional[str] = None, + certificate_password: Optional[str] = None, + certificate_source: Optional[str] = None, + certificate_status: Optional[str] = None, + expiry: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + ssl_keyvault_identity_client_id: Optional[str] = None, + subject: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -5759,27 +7637,74 @@ def __init__(__self__, *, :param str subject: The subject of the certificate. :param str thumbprint: The thumbprint of the certificate. """ - pulumi.set(__self__, "host_name", host_name) + ServiceHostnameConfigurationPortal._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + certificate: Optional[str] = None, + certificate_password: Optional[str] = None, + certificate_source: Optional[str] = None, + certificate_status: Optional[str] = None, + expiry: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + ssl_keyvault_identity_client_id: Optional[str] = None, + subject: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -5938,29 +7863,80 @@ def __init__(__self__, *, :param str subject: The subject of the certificate. :param str thumbprint: The thumbprint of the certificate. """ - pulumi.set(__self__, "host_name", host_name) + ServiceHostnameConfigurationProxy._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + default_ssl_binding=default_ssl_binding, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + certificate: Optional[str] = None, + certificate_password: Optional[str] = None, + certificate_source: Optional[str] = None, + certificate_status: Optional[str] = None, + default_ssl_binding: Optional[bool] = None, + expiry: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + ssl_keyvault_identity_client_id: Optional[str] = None, + subject: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if default_ssl_binding is None and 'defaultSslBinding' in kwargs: + default_ssl_binding = kwargs['defaultSslBinding'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if default_ssl_binding is not None: - pulumi.set(__self__, "default_ssl_binding", default_ssl_binding) + _setter("default_ssl_binding", default_ssl_binding) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -6123,27 +8099,74 @@ def __init__(__self__, *, :param str subject: The subject of the certificate. :param str thumbprint: The thumbprint of the certificate. """ - pulumi.set(__self__, "host_name", host_name) + ServiceHostnameConfigurationScm._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + certificate=certificate, + certificate_password=certificate_password, + certificate_source=certificate_source, + certificate_status=certificate_status, + expiry=expiry, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ssl_keyvault_identity_client_id=ssl_keyvault_identity_client_id, + subject=subject, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + certificate: Optional[str] = None, + certificate_password: Optional[str] = None, + certificate_source: Optional[str] = None, + certificate_status: Optional[str] = None, + expiry: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + ssl_keyvault_identity_client_id: Optional[str] = None, + subject: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if certificate_status is None and 'certificateStatus' in kwargs: + certificate_status = kwargs['certificateStatus'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if ssl_keyvault_identity_client_id is None and 'sslKeyvaultIdentityClientId' in kwargs: + ssl_keyvault_identity_client_id = kwargs['sslKeyvaultIdentityClientId'] + + _setter("host_name", host_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if certificate_status is not None: - pulumi.set(__self__, "certificate_status", certificate_status) + _setter("certificate_status", certificate_status) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if negotiate_client_certificate is not None: - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + _setter("negotiate_client_certificate", negotiate_client_certificate) if ssl_keyvault_identity_client_id is not None: - pulumi.set(__self__, "ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) + _setter("ssl_keyvault_identity_client_id", ssl_keyvault_identity_client_id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="hostName") @@ -6274,13 +8297,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The identifier for the tenant access information contract. """ - pulumi.set(__self__, "type", type) + ServiceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -6345,10 +8393,27 @@ def __init__(__self__, *, :param str xml_content: The XML Content for this Policy. :param str xml_link: A link to an API Management Policy XML Document, which must be publicly available. """ + ServicePolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + xml_content=xml_content, + xml_link=xml_link, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + xml_content: Optional[str] = None, + xml_link: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if xml_content is None and 'xmlContent' in kwargs: + xml_content = kwargs['xmlContent'] + if xml_link is None and 'xmlLink' in kwargs: + xml_link = kwargs['xmlLink'] + if xml_content is not None: - pulumi.set(__self__, "xml_content", xml_content) + _setter("xml_content", xml_content) if xml_link is not None: - pulumi.set(__self__, "xml_link", xml_link) + _setter("xml_link", xml_link) @property @pulumi.getter(name="xmlContent") @@ -6391,8 +8456,21 @@ def __init__(__self__, *, """ :param bool enable_http2: Should HTTP/2 be supported by the API Management Service? Defaults to `false`. """ + ServiceProtocols._configure( + lambda key, value: pulumi.set(__self__, key, value), + enable_http2=enable_http2, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enable_http2: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enable_http2 is None and 'enableHttp2' in kwargs: + enable_http2 = kwargs['enableHttp2'] + if enable_http2 is not None: - pulumi.set(__self__, "enable_http2", enable_http2) + _setter("enable_http2", enable_http2) @property @pulumi.getter(name="enableHttp2") @@ -6525,40 +8603,117 @@ def __init__(__self__, *, > **info:** This maps to the `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` field """ + ServiceSecurity._configure( + lambda key, value: pulumi.set(__self__, key, value), + enable_backend_ssl30=enable_backend_ssl30, + enable_backend_tls10=enable_backend_tls10, + enable_backend_tls11=enable_backend_tls11, + enable_frontend_ssl30=enable_frontend_ssl30, + enable_frontend_tls10=enable_frontend_tls10, + enable_frontend_tls11=enable_frontend_tls11, + tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled=tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled, + tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled=tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled, + tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled=tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled, + tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled=tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled, + tls_rsa_with_aes128_cbc_sha256_ciphers_enabled=tls_rsa_with_aes128_cbc_sha256_ciphers_enabled, + tls_rsa_with_aes128_cbc_sha_ciphers_enabled=tls_rsa_with_aes128_cbc_sha_ciphers_enabled, + tls_rsa_with_aes128_gcm_sha256_ciphers_enabled=tls_rsa_with_aes128_gcm_sha256_ciphers_enabled, + tls_rsa_with_aes256_cbc_sha256_ciphers_enabled=tls_rsa_with_aes256_cbc_sha256_ciphers_enabled, + tls_rsa_with_aes256_cbc_sha_ciphers_enabled=tls_rsa_with_aes256_cbc_sha_ciphers_enabled, + tls_rsa_with_aes256_gcm_sha384_ciphers_enabled=tls_rsa_with_aes256_gcm_sha384_ciphers_enabled, + triple_des_ciphers_enabled=triple_des_ciphers_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enable_backend_ssl30: Optional[bool] = None, + enable_backend_tls10: Optional[bool] = None, + enable_backend_tls11: Optional[bool] = None, + enable_frontend_ssl30: Optional[bool] = None, + enable_frontend_tls10: Optional[bool] = None, + enable_frontend_tls11: Optional[bool] = None, + tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled: Optional[bool] = None, + tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled: Optional[bool] = None, + tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled: Optional[bool] = None, + tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled: Optional[bool] = None, + tls_rsa_with_aes128_cbc_sha256_ciphers_enabled: Optional[bool] = None, + tls_rsa_with_aes128_cbc_sha_ciphers_enabled: Optional[bool] = None, + tls_rsa_with_aes128_gcm_sha256_ciphers_enabled: Optional[bool] = None, + tls_rsa_with_aes256_cbc_sha256_ciphers_enabled: Optional[bool] = None, + tls_rsa_with_aes256_cbc_sha_ciphers_enabled: Optional[bool] = None, + tls_rsa_with_aes256_gcm_sha384_ciphers_enabled: Optional[bool] = None, + triple_des_ciphers_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enable_backend_ssl30 is None and 'enableBackendSsl30' in kwargs: + enable_backend_ssl30 = kwargs['enableBackendSsl30'] + if enable_backend_tls10 is None and 'enableBackendTls10' in kwargs: + enable_backend_tls10 = kwargs['enableBackendTls10'] + if enable_backend_tls11 is None and 'enableBackendTls11' in kwargs: + enable_backend_tls11 = kwargs['enableBackendTls11'] + if enable_frontend_ssl30 is None and 'enableFrontendSsl30' in kwargs: + enable_frontend_ssl30 = kwargs['enableFrontendSsl30'] + if enable_frontend_tls10 is None and 'enableFrontendTls10' in kwargs: + enable_frontend_tls10 = kwargs['enableFrontendTls10'] + if enable_frontend_tls11 is None and 'enableFrontendTls11' in kwargs: + enable_frontend_tls11 = kwargs['enableFrontendTls11'] + if tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled is None and 'tlsEcdheEcdsaWithAes128CbcShaCiphersEnabled' in kwargs: + tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled = kwargs['tlsEcdheEcdsaWithAes128CbcShaCiphersEnabled'] + if tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled is None and 'tlsEcdheEcdsaWithAes256CbcShaCiphersEnabled' in kwargs: + tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled = kwargs['tlsEcdheEcdsaWithAes256CbcShaCiphersEnabled'] + if tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled is None and 'tlsEcdheRsaWithAes128CbcShaCiphersEnabled' in kwargs: + tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled = kwargs['tlsEcdheRsaWithAes128CbcShaCiphersEnabled'] + if tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled is None and 'tlsEcdheRsaWithAes256CbcShaCiphersEnabled' in kwargs: + tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled = kwargs['tlsEcdheRsaWithAes256CbcShaCiphersEnabled'] + if tls_rsa_with_aes128_cbc_sha256_ciphers_enabled is None and 'tlsRsaWithAes128CbcSha256CiphersEnabled' in kwargs: + tls_rsa_with_aes128_cbc_sha256_ciphers_enabled = kwargs['tlsRsaWithAes128CbcSha256CiphersEnabled'] + if tls_rsa_with_aes128_cbc_sha_ciphers_enabled is None and 'tlsRsaWithAes128CbcShaCiphersEnabled' in kwargs: + tls_rsa_with_aes128_cbc_sha_ciphers_enabled = kwargs['tlsRsaWithAes128CbcShaCiphersEnabled'] + if tls_rsa_with_aes128_gcm_sha256_ciphers_enabled is None and 'tlsRsaWithAes128GcmSha256CiphersEnabled' in kwargs: + tls_rsa_with_aes128_gcm_sha256_ciphers_enabled = kwargs['tlsRsaWithAes128GcmSha256CiphersEnabled'] + if tls_rsa_with_aes256_cbc_sha256_ciphers_enabled is None and 'tlsRsaWithAes256CbcSha256CiphersEnabled' in kwargs: + tls_rsa_with_aes256_cbc_sha256_ciphers_enabled = kwargs['tlsRsaWithAes256CbcSha256CiphersEnabled'] + if tls_rsa_with_aes256_cbc_sha_ciphers_enabled is None and 'tlsRsaWithAes256CbcShaCiphersEnabled' in kwargs: + tls_rsa_with_aes256_cbc_sha_ciphers_enabled = kwargs['tlsRsaWithAes256CbcShaCiphersEnabled'] + if tls_rsa_with_aes256_gcm_sha384_ciphers_enabled is None and 'tlsRsaWithAes256GcmSha384CiphersEnabled' in kwargs: + tls_rsa_with_aes256_gcm_sha384_ciphers_enabled = kwargs['tlsRsaWithAes256GcmSha384CiphersEnabled'] + if triple_des_ciphers_enabled is None and 'tripleDesCiphersEnabled' in kwargs: + triple_des_ciphers_enabled = kwargs['tripleDesCiphersEnabled'] + if enable_backend_ssl30 is not None: - pulumi.set(__self__, "enable_backend_ssl30", enable_backend_ssl30) + _setter("enable_backend_ssl30", enable_backend_ssl30) if enable_backend_tls10 is not None: - pulumi.set(__self__, "enable_backend_tls10", enable_backend_tls10) + _setter("enable_backend_tls10", enable_backend_tls10) if enable_backend_tls11 is not None: - pulumi.set(__self__, "enable_backend_tls11", enable_backend_tls11) + _setter("enable_backend_tls11", enable_backend_tls11) if enable_frontend_ssl30 is not None: - pulumi.set(__self__, "enable_frontend_ssl30", enable_frontend_ssl30) + _setter("enable_frontend_ssl30", enable_frontend_ssl30) if enable_frontend_tls10 is not None: - pulumi.set(__self__, "enable_frontend_tls10", enable_frontend_tls10) + _setter("enable_frontend_tls10", enable_frontend_tls10) if enable_frontend_tls11 is not None: - pulumi.set(__self__, "enable_frontend_tls11", enable_frontend_tls11) + _setter("enable_frontend_tls11", enable_frontend_tls11) if tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled is not None: - pulumi.set(__self__, "tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled", tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled) + _setter("tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled", tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled) if tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled is not None: - pulumi.set(__self__, "tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled", tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled) + _setter("tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled", tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled) if tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled is not None: - pulumi.set(__self__, "tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled", tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled) + _setter("tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled", tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled) if tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled is not None: - pulumi.set(__self__, "tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled", tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled) + _setter("tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled", tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled) if tls_rsa_with_aes128_cbc_sha256_ciphers_enabled is not None: - pulumi.set(__self__, "tls_rsa_with_aes128_cbc_sha256_ciphers_enabled", tls_rsa_with_aes128_cbc_sha256_ciphers_enabled) + _setter("tls_rsa_with_aes128_cbc_sha256_ciphers_enabled", tls_rsa_with_aes128_cbc_sha256_ciphers_enabled) if tls_rsa_with_aes128_cbc_sha_ciphers_enabled is not None: - pulumi.set(__self__, "tls_rsa_with_aes128_cbc_sha_ciphers_enabled", tls_rsa_with_aes128_cbc_sha_ciphers_enabled) + _setter("tls_rsa_with_aes128_cbc_sha_ciphers_enabled", tls_rsa_with_aes128_cbc_sha_ciphers_enabled) if tls_rsa_with_aes128_gcm_sha256_ciphers_enabled is not None: - pulumi.set(__self__, "tls_rsa_with_aes128_gcm_sha256_ciphers_enabled", tls_rsa_with_aes128_gcm_sha256_ciphers_enabled) + _setter("tls_rsa_with_aes128_gcm_sha256_ciphers_enabled", tls_rsa_with_aes128_gcm_sha256_ciphers_enabled) if tls_rsa_with_aes256_cbc_sha256_ciphers_enabled is not None: - pulumi.set(__self__, "tls_rsa_with_aes256_cbc_sha256_ciphers_enabled", tls_rsa_with_aes256_cbc_sha256_ciphers_enabled) + _setter("tls_rsa_with_aes256_cbc_sha256_ciphers_enabled", tls_rsa_with_aes256_cbc_sha256_ciphers_enabled) if tls_rsa_with_aes256_cbc_sha_ciphers_enabled is not None: - pulumi.set(__self__, "tls_rsa_with_aes256_cbc_sha_ciphers_enabled", tls_rsa_with_aes256_cbc_sha_ciphers_enabled) + _setter("tls_rsa_with_aes256_cbc_sha_ciphers_enabled", tls_rsa_with_aes256_cbc_sha_ciphers_enabled) if tls_rsa_with_aes256_gcm_sha384_ciphers_enabled is not None: - pulumi.set(__self__, "tls_rsa_with_aes256_gcm_sha384_ciphers_enabled", tls_rsa_with_aes256_gcm_sha384_ciphers_enabled) + _setter("tls_rsa_with_aes256_gcm_sha384_ciphers_enabled", tls_rsa_with_aes256_gcm_sha384_ciphers_enabled) if triple_des_ciphers_enabled is not None: - pulumi.set(__self__, "triple_des_ciphers_enabled", triple_des_ciphers_enabled) + _setter("triple_des_ciphers_enabled", triple_des_ciphers_enabled) @property @pulumi.getter(name="enableBackendSsl30") @@ -6738,7 +8893,20 @@ def __init__(__self__, *, """ :param bool enabled: Should anonymous users be redirected to the sign in page? """ - pulumi.set(__self__, "enabled", enabled) + ServiceSignIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) @property @pulumi.getter @@ -6775,8 +8943,27 @@ def __init__(__self__, *, :param bool enabled: Can users sign up on the development portal? :param 'ServiceSignUpTermsOfServiceArgs' terms_of_service: A `terms_of_service` block as defined below. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "terms_of_service", terms_of_service) + ServiceSignUp._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + terms_of_service=terms_of_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + terms_of_service: Optional['outputs.ServiceSignUpTermsOfService'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if terms_of_service is None and 'termsOfService' in kwargs: + terms_of_service = kwargs['termsOfService'] + if terms_of_service is None: + raise TypeError("Missing 'terms_of_service' argument") + + _setter("enabled", enabled) + _setter("terms_of_service", terms_of_service) @property @pulumi.getter @@ -6823,10 +9010,31 @@ def __init__(__self__, *, :param bool enabled: Should Terms of Service be displayed during sign up?. :param str text: The Terms of Service which users are required to agree to in order to sign up. """ - pulumi.set(__self__, "consent_required", consent_required) - pulumi.set(__self__, "enabled", enabled) + ServiceSignUpTermsOfService._configure( + lambda key, value: pulumi.set(__self__, key, value), + consent_required=consent_required, + enabled=enabled, + text=text, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consent_required: Optional[bool] = None, + enabled: Optional[bool] = None, + text: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consent_required is None and 'consentRequired' in kwargs: + consent_required = kwargs['consentRequired'] + if consent_required is None: + raise TypeError("Missing 'consent_required' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("consent_required", consent_required) + _setter("enabled", enabled) if text is not None: - pulumi.set(__self__, "text", text) + _setter("text", text) @property @pulumi.getter(name="consentRequired") @@ -6887,13 +9095,38 @@ def __init__(__self__, *, :param str secondary_key: Secondary access key for the tenant access information contract. :param str tenant_id: The identifier for the tenant access information contract. """ - pulumi.set(__self__, "enabled", enabled) + ServiceTenantAccess._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + primary_key=primary_key, + secondary_key=secondary_key, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + primary_key: Optional[str] = None, + secondary_key: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("enabled", enabled) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -6952,7 +9185,22 @@ def __init__(__self__, *, """ :param str subnet_id: The id of the subnet that will be used for the API Management. """ - pulumi.set(__self__, "subnet_id", subnet_id) + ServiceVirtualNetworkConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="subnetId") @@ -6972,8 +9220,25 @@ def __init__(__self__, *, :param str header: The name of the HTTP Header which should be used for the Subscription Key. :param str query: The name of the QueryString parameter which should be used for the Subscription Key. """ - pulumi.set(__self__, "header", header) - pulumi.set(__self__, "query", query) + GetApiSubscriptionKeyParameterNameResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + header=header, + query=query, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header: Optional[str] = None, + query: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header is None: + raise TypeError("Missing 'header' argument") + if query is None: + raise TypeError("Missing 'query' argument") + + _setter("header", header) + _setter("query", query) @property @pulumi.getter @@ -7004,10 +9269,35 @@ def __init__(__self__, *, :param str district: The district, state, or province where the resource is located. :param str name: The name of the API Management Gateway. """ - pulumi.set(__self__, "city", city) - pulumi.set(__self__, "district", district) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "region", region) + GetGatewayLocationDataResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + city=city, + district=district, + name=name, + region=region, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + city: Optional[str] = None, + district: Optional[str] = None, + name: Optional[str] = None, + region: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if city is None: + raise TypeError("Missing 'city' argument") + if district is None: + raise TypeError("Missing 'district' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if region is None: + raise TypeError("Missing 'region' argument") + + _setter("city", city) + _setter("district", district) + _setter("name", name) + _setter("region", region) @property @pulumi.getter @@ -7058,13 +9348,58 @@ def __init__(__self__, *, :param Sequence[str] public_ip_addresses: Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard and Premium SKU. :param Sequence[str] zones: List of the availability zones where API Management is deployed in the additional region exists. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "gateway_regional_url", gateway_regional_url) - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "private_ip_addresses", private_ip_addresses) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) - pulumi.set(__self__, "zones", zones) + GetServiceAdditionalLocationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + gateway_regional_url=gateway_regional_url, + location=location, + private_ip_addresses=private_ip_addresses, + public_ip_address_id=public_ip_address_id, + public_ip_addresses=public_ip_addresses, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + gateway_regional_url: Optional[str] = None, + location: Optional[str] = None, + private_ip_addresses: Optional[Sequence[str]] = None, + public_ip_address_id: Optional[str] = None, + public_ip_addresses: Optional[Sequence[str]] = None, + zones: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if gateway_regional_url is None and 'gatewayRegionalUrl' in kwargs: + gateway_regional_url = kwargs['gatewayRegionalUrl'] + if gateway_regional_url is None: + raise TypeError("Missing 'gateway_regional_url' argument") + if location is None: + raise TypeError("Missing 'location' argument") + if private_ip_addresses is None and 'privateIpAddresses' in kwargs: + private_ip_addresses = kwargs['privateIpAddresses'] + if private_ip_addresses is None: + raise TypeError("Missing 'private_ip_addresses' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if public_ip_addresses is None: + raise TypeError("Missing 'public_ip_addresses' argument") + if zones is None: + raise TypeError("Missing 'zones' argument") + + _setter("capacity", capacity) + _setter("gateway_regional_url", gateway_regional_url) + _setter("location", location) + _setter("private_ip_addresses", private_ip_addresses) + _setter("public_ip_address_id", public_ip_address_id) + _setter("public_ip_addresses", public_ip_addresses) + _setter("zones", zones) @property @pulumi.getter @@ -7138,11 +9473,42 @@ def __init__(__self__, *, :param Sequence['GetServiceHostnameConfigurationProxyArgs'] proxies: One or more `proxy` blocks as documented below. :param Sequence['GetServiceHostnameConfigurationScmArgs'] scms: One or more `scm` blocks as documented below. """ - pulumi.set(__self__, "developer_portals", developer_portals) - pulumi.set(__self__, "managements", managements) - pulumi.set(__self__, "portals", portals) - pulumi.set(__self__, "proxies", proxies) - pulumi.set(__self__, "scms", scms) + GetServiceHostnameConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + developer_portals=developer_portals, + managements=managements, + portals=portals, + proxies=proxies, + scms=scms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + developer_portals: Optional[Sequence['outputs.GetServiceHostnameConfigurationDeveloperPortalResult']] = None, + managements: Optional[Sequence['outputs.GetServiceHostnameConfigurationManagementResult']] = None, + portals: Optional[Sequence['outputs.GetServiceHostnameConfigurationPortalResult']] = None, + proxies: Optional[Sequence['outputs.GetServiceHostnameConfigurationProxyResult']] = None, + scms: Optional[Sequence['outputs.GetServiceHostnameConfigurationScmResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if developer_portals is None and 'developerPortals' in kwargs: + developer_portals = kwargs['developerPortals'] + if developer_portals is None: + raise TypeError("Missing 'developer_portals' argument") + if managements is None: + raise TypeError("Missing 'managements' argument") + if portals is None: + raise TypeError("Missing 'portals' argument") + if proxies is None: + raise TypeError("Missing 'proxies' argument") + if scms is None: + raise TypeError("Missing 'scms' argument") + + _setter("developer_portals", developer_portals) + _setter("managements", managements) + _setter("portals", portals) + _setter("proxies", proxies) + _setter("scms", scms) @property @pulumi.getter(name="developerPortals") @@ -7196,9 +9562,36 @@ def __init__(__self__, *, :param str key_vault_id: The ID of the Key Vault Secret which contains the SSL Certificate. :param bool negotiate_client_certificate: Is Client Certificate Negotiation enabled? """ - pulumi.set(__self__, "host_name", host_name) - pulumi.set(__self__, "key_vault_id", key_vault_id) - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + GetServiceHostnameConfigurationDeveloperPortalResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if negotiate_client_certificate is None: + raise TypeError("Missing 'negotiate_client_certificate' argument") + + _setter("host_name", host_name) + _setter("key_vault_id", key_vault_id) + _setter("negotiate_client_certificate", negotiate_client_certificate) @property @pulumi.getter(name="hostName") @@ -7236,9 +9629,36 @@ def __init__(__self__, *, :param str key_vault_id: The ID of the Key Vault Secret which contains the SSL Certificate. :param bool negotiate_client_certificate: Is Client Certificate Negotiation enabled? """ - pulumi.set(__self__, "host_name", host_name) - pulumi.set(__self__, "key_vault_id", key_vault_id) - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + GetServiceHostnameConfigurationManagementResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if negotiate_client_certificate is None: + raise TypeError("Missing 'negotiate_client_certificate' argument") + + _setter("host_name", host_name) + _setter("key_vault_id", key_vault_id) + _setter("negotiate_client_certificate", negotiate_client_certificate) @property @pulumi.getter(name="hostName") @@ -7276,9 +9696,36 @@ def __init__(__self__, *, :param str key_vault_id: The ID of the Key Vault Secret which contains the SSL Certificate. :param bool negotiate_client_certificate: Is Client Certificate Negotiation enabled? """ - pulumi.set(__self__, "host_name", host_name) - pulumi.set(__self__, "key_vault_id", key_vault_id) - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + GetServiceHostnameConfigurationPortalResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if negotiate_client_certificate is None: + raise TypeError("Missing 'negotiate_client_certificate' argument") + + _setter("host_name", host_name) + _setter("key_vault_id", key_vault_id) + _setter("negotiate_client_certificate", negotiate_client_certificate) @property @pulumi.getter(name="hostName") @@ -7318,10 +9765,43 @@ def __init__(__self__, *, :param str key_vault_id: The ID of the Key Vault Secret which contains the SSL Certificate. :param bool negotiate_client_certificate: Is Client Certificate Negotiation enabled? """ - pulumi.set(__self__, "default_ssl_binding", default_ssl_binding) - pulumi.set(__self__, "host_name", host_name) - pulumi.set(__self__, "key_vault_id", key_vault_id) - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + GetServiceHostnameConfigurationProxyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_ssl_binding=default_ssl_binding, + host_name=host_name, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_ssl_binding: Optional[bool] = None, + host_name: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_ssl_binding is None and 'defaultSslBinding' in kwargs: + default_ssl_binding = kwargs['defaultSslBinding'] + if default_ssl_binding is None: + raise TypeError("Missing 'default_ssl_binding' argument") + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if negotiate_client_certificate is None: + raise TypeError("Missing 'negotiate_client_certificate' argument") + + _setter("default_ssl_binding", default_ssl_binding) + _setter("host_name", host_name) + _setter("key_vault_id", key_vault_id) + _setter("negotiate_client_certificate", negotiate_client_certificate) @property @pulumi.getter(name="defaultSslBinding") @@ -7367,9 +9847,36 @@ def __init__(__self__, *, :param str key_vault_id: The ID of the Key Vault Secret which contains the SSL Certificate. :param bool negotiate_client_certificate: Is Client Certificate Negotiation enabled? """ - pulumi.set(__self__, "host_name", host_name) - pulumi.set(__self__, "key_vault_id", key_vault_id) - pulumi.set(__self__, "negotiate_client_certificate", negotiate_client_certificate) + GetServiceHostnameConfigurationScmResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + key_vault_id=key_vault_id, + negotiate_client_certificate=negotiate_client_certificate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + key_vault_id: Optional[str] = None, + negotiate_client_certificate: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if negotiate_client_certificate is None and 'negotiateClientCertificate' in kwargs: + negotiate_client_certificate = kwargs['negotiateClientCertificate'] + if negotiate_client_certificate is None: + raise TypeError("Missing 'negotiate_client_certificate' argument") + + _setter("host_name", host_name) + _setter("key_vault_id", key_vault_id) + _setter("negotiate_client_certificate", negotiate_client_certificate) @property @pulumi.getter(name="hostName") @@ -7409,10 +9916,41 @@ def __init__(__self__, *, :param str tenant_id: The ID of the Tenant which has access to this API Management instance. :param str type: The type of Managed Service Identity that is configured on this API Management Service. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetServiceIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -7460,10 +9998,41 @@ def __init__(__self__, *, :param str secondary_key: Secondary access key for the tenant access information contract. :param str tenant_id: The ID of the Tenant which has access to this API Management instance. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "primary_key", primary_key) - pulumi.set(__self__, "secondary_key", secondary_key) - pulumi.set(__self__, "tenant_id", tenant_id) + GetServiceTenantAccessResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + primary_key=primary_key, + secondary_key=secondary_key, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + primary_key: Optional[str] = None, + secondary_key: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if secondary_key is None: + raise TypeError("Missing 'secondary_key' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("enabled", enabled) + _setter("primary_key", primary_key) + _setter("secondary_key", secondary_key) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/apimanagement/policy.py b/sdk/python/pulumi_azure/apimanagement/policy.py index bb0b151bcf..c0aefbd5c7 100644 --- a/sdk/python/pulumi_azure/apimanagement/policy.py +++ b/sdk/python/pulumi_azure/apimanagement/policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PolicyArgs', 'Policy'] @@ -23,11 +23,34 @@ def __init__(__self__, *, :param pulumi.Input[str] xml_content: The XML Content for this Policy as a string. :param pulumi.Input[str] xml_link: A link to a Policy XML Document, which must be publicly available. """ - pulumi.set(__self__, "api_management_id", api_management_id) + PolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + xml_content=xml_content, + xml_link=xml_link, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + xml_content: Optional[pulumi.Input[str]] = None, + xml_link: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if api_management_id is None: + raise TypeError("Missing 'api_management_id' argument") + if xml_content is None and 'xmlContent' in kwargs: + xml_content = kwargs['xmlContent'] + if xml_link is None and 'xmlLink' in kwargs: + xml_link = kwargs['xmlLink'] + + _setter("api_management_id", api_management_id) if xml_content is not None: - pulumi.set(__self__, "xml_content", xml_content) + _setter("xml_content", xml_content) if xml_link is not None: - pulumi.set(__self__, "xml_link", xml_link) + _setter("xml_link", xml_link) @property @pulumi.getter(name="apiManagementId") @@ -78,12 +101,33 @@ def __init__(__self__, *, :param pulumi.Input[str] xml_content: The XML Content for this Policy as a string. :param pulumi.Input[str] xml_link: A link to a Policy XML Document, which must be publicly available. """ + _PolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + xml_content=xml_content, + xml_link=xml_link, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + xml_content: Optional[pulumi.Input[str]] = None, + xml_link: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if xml_content is None and 'xmlContent' in kwargs: + xml_content = kwargs['xmlContent'] + if xml_link is None and 'xmlLink' in kwargs: + xml_link = kwargs['xmlLink'] + if api_management_id is not None: - pulumi.set(__self__, "api_management_id", api_management_id) + _setter("api_management_id", api_management_id) if xml_content is not None: - pulumi.set(__self__, "xml_content", xml_content) + _setter("xml_content", xml_content) if xml_link is not None: - pulumi.set(__self__, "xml_link", xml_link) + _setter("xml_link", xml_link) @property @pulumi.getter(name="apiManagementId") @@ -225,6 +269,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/product.py b/sdk/python/pulumi_azure/apimanagement/product.py index 005fae7a11..e16dfa3294 100644 --- a/sdk/python/pulumi_azure/apimanagement/product.py +++ b/sdk/python/pulumi_azure/apimanagement/product.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ProductArgs', 'Product'] @@ -41,21 +41,74 @@ def __init__(__self__, *, > **NOTE:** `subscriptions_limit` can only be set when `subscription_required` is set to `true`. :param pulumi.Input[str] terms: The Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "product_id", product_id) - pulumi.set(__self__, "published", published) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ProductArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + display_name=display_name, + product_id=product_id, + published=published, + resource_group_name=resource_group_name, + approval_required=approval_required, + description=description, + subscription_required=subscription_required, + subscriptions_limit=subscriptions_limit, + terms=terms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + product_id: Optional[pulumi.Input[str]] = None, + published: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + approval_required: Optional[pulumi.Input[bool]] = None, + description: Optional[pulumi.Input[str]] = None, + subscription_required: Optional[pulumi.Input[bool]] = None, + subscriptions_limit: Optional[pulumi.Input[int]] = None, + terms: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if product_id is None and 'productId' in kwargs: + product_id = kwargs['productId'] + if product_id is None: + raise TypeError("Missing 'product_id' argument") + if published is None: + raise TypeError("Missing 'published' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if approval_required is None and 'approvalRequired' in kwargs: + approval_required = kwargs['approvalRequired'] + if subscription_required is None and 'subscriptionRequired' in kwargs: + subscription_required = kwargs['subscriptionRequired'] + if subscriptions_limit is None and 'subscriptionsLimit' in kwargs: + subscriptions_limit = kwargs['subscriptionsLimit'] + + _setter("api_management_name", api_management_name) + _setter("display_name", display_name) + _setter("product_id", product_id) + _setter("published", published) + _setter("resource_group_name", resource_group_name) if approval_required is not None: - pulumi.set(__self__, "approval_required", approval_required) + _setter("approval_required", approval_required) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if subscription_required is not None: - pulumi.set(__self__, "subscription_required", subscription_required) + _setter("subscription_required", subscription_required) if subscriptions_limit is not None: - pulumi.set(__self__, "subscriptions_limit", subscriptions_limit) + _setter("subscriptions_limit", subscriptions_limit) if terms is not None: - pulumi.set(__self__, "terms", terms) + _setter("terms", terms) @property @pulumi.getter(name="apiManagementName") @@ -212,26 +265,69 @@ def __init__(__self__, *, > **NOTE:** `subscriptions_limit` can only be set when `subscription_required` is set to `true`. :param pulumi.Input[str] terms: The Terms and Conditions for this Product, which must be accepted by Developers before they can begin the Subscription process. """ + _ProductState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + approval_required=approval_required, + description=description, + display_name=display_name, + product_id=product_id, + published=published, + resource_group_name=resource_group_name, + subscription_required=subscription_required, + subscriptions_limit=subscriptions_limit, + terms=terms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + approval_required: Optional[pulumi.Input[bool]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + product_id: Optional[pulumi.Input[str]] = None, + published: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subscription_required: Optional[pulumi.Input[bool]] = None, + subscriptions_limit: Optional[pulumi.Input[int]] = None, + terms: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if approval_required is None and 'approvalRequired' in kwargs: + approval_required = kwargs['approvalRequired'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if product_id is None and 'productId' in kwargs: + product_id = kwargs['productId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if subscription_required is None and 'subscriptionRequired' in kwargs: + subscription_required = kwargs['subscriptionRequired'] + if subscriptions_limit is None and 'subscriptionsLimit' in kwargs: + subscriptions_limit = kwargs['subscriptionsLimit'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if approval_required is not None: - pulumi.set(__self__, "approval_required", approval_required) + _setter("approval_required", approval_required) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if product_id is not None: - pulumi.set(__self__, "product_id", product_id) + _setter("product_id", product_id) if published is not None: - pulumi.set(__self__, "published", published) + _setter("published", published) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if subscription_required is not None: - pulumi.set(__self__, "subscription_required", subscription_required) + _setter("subscription_required", subscription_required) if subscriptions_limit is not None: - pulumi.set(__self__, "subscriptions_limit", subscriptions_limit) + _setter("subscriptions_limit", subscriptions_limit) if terms is not None: - pulumi.set(__self__, "terms", terms) + _setter("terms", terms) @property @pulumi.getter(name="apiManagementName") @@ -475,6 +571,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProductArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/product_api.py b/sdk/python/pulumi_azure/apimanagement/product_api.py index d386b1577d..df6d851842 100644 --- a/sdk/python/pulumi_azure/apimanagement/product_api.py +++ b/sdk/python/pulumi_azure/apimanagement/product_api.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ProductApiArgs', 'ProductApi'] @@ -25,10 +25,43 @@ def __init__(__self__, *, :param pulumi.Input[str] product_id: The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "api_name", api_name) - pulumi.set(__self__, "product_id", product_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ProductApiArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + api_name=api_name, + product_id=product_id, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + api_name: Optional[pulumi.Input[str]] = None, + product_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if api_name is None and 'apiName' in kwargs: + api_name = kwargs['apiName'] + if api_name is None: + raise TypeError("Missing 'api_name' argument") + if product_id is None and 'productId' in kwargs: + product_id = kwargs['productId'] + if product_id is None: + raise TypeError("Missing 'product_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("api_management_name", api_management_name) + _setter("api_name", api_name) + _setter("product_id", product_id) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiManagementName") @@ -93,14 +126,39 @@ def __init__(__self__, *, :param pulumi.Input[str] product_id: The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created. """ + _ProductApiState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + api_name=api_name, + product_id=product_id, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + api_name: Optional[pulumi.Input[str]] = None, + product_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_name is None and 'apiName' in kwargs: + api_name = kwargs['apiName'] + if product_id is None and 'productId' in kwargs: + product_id = kwargs['productId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if api_name is not None: - pulumi.set(__self__, "api_name", api_name) + _setter("api_name", api_name) if product_id is not None: - pulumi.set(__self__, "product_id", product_id) + _setter("product_id", product_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiManagementName") @@ -250,6 +308,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProductApiArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/product_group.py b/sdk/python/pulumi_azure/apimanagement/product_group.py index 8ad4e921cb..8617a09b27 100644 --- a/sdk/python/pulumi_azure/apimanagement/product_group.py +++ b/sdk/python/pulumi_azure/apimanagement/product_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ProductGroupArgs', 'ProductGroup'] @@ -25,10 +25,43 @@ def __init__(__self__, *, :param pulumi.Input[str] product_id: The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "group_name", group_name) - pulumi.set(__self__, "product_id", product_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ProductGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + group_name=group_name, + product_id=product_id, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + group_name: Optional[pulumi.Input[str]] = None, + product_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if group_name is None and 'groupName' in kwargs: + group_name = kwargs['groupName'] + if group_name is None: + raise TypeError("Missing 'group_name' argument") + if product_id is None and 'productId' in kwargs: + product_id = kwargs['productId'] + if product_id is None: + raise TypeError("Missing 'product_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("api_management_name", api_management_name) + _setter("group_name", group_name) + _setter("product_id", product_id) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiManagementName") @@ -93,14 +126,39 @@ def __init__(__self__, *, :param pulumi.Input[str] product_id: The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created. """ + _ProductGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + group_name=group_name, + product_id=product_id, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + group_name: Optional[pulumi.Input[str]] = None, + product_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if group_name is None and 'groupName' in kwargs: + group_name = kwargs['groupName'] + if product_id is None and 'productId' in kwargs: + product_id = kwargs['productId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if group_name is not None: - pulumi.set(__self__, "group_name", group_name) + _setter("group_name", group_name) if product_id is not None: - pulumi.set(__self__, "product_id", product_id) + _setter("product_id", product_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiManagementName") @@ -248,6 +306,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProductGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/product_policy.py b/sdk/python/pulumi_azure/apimanagement/product_policy.py index 97e5c4b319..7775b50128 100644 --- a/sdk/python/pulumi_azure/apimanagement/product_policy.py +++ b/sdk/python/pulumi_azure/apimanagement/product_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ProductPolicyArgs', 'ProductPolicy'] @@ -27,13 +27,48 @@ def __init__(__self__, *, :param pulumi.Input[str] xml_content: The XML Content for this Policy. :param pulumi.Input[str] xml_link: A link to a Policy XML Document, which must be publicly available. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "product_id", product_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ProductPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + product_id=product_id, + resource_group_name=resource_group_name, + xml_content=xml_content, + xml_link=xml_link, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + product_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + xml_content: Optional[pulumi.Input[str]] = None, + xml_link: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if product_id is None and 'productId' in kwargs: + product_id = kwargs['productId'] + if product_id is None: + raise TypeError("Missing 'product_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if xml_content is None and 'xmlContent' in kwargs: + xml_content = kwargs['xmlContent'] + if xml_link is None and 'xmlLink' in kwargs: + xml_link = kwargs['xmlLink'] + + _setter("api_management_name", api_management_name) + _setter("product_id", product_id) + _setter("resource_group_name", resource_group_name) if xml_content is not None: - pulumi.set(__self__, "xml_content", xml_content) + _setter("xml_content", xml_content) if xml_link is not None: - pulumi.set(__self__, "xml_link", xml_link) + _setter("xml_link", xml_link) @property @pulumi.getter(name="apiManagementName") @@ -112,16 +147,45 @@ def __init__(__self__, *, :param pulumi.Input[str] xml_content: The XML Content for this Policy. :param pulumi.Input[str] xml_link: A link to a Policy XML Document, which must be publicly available. """ + _ProductPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + product_id=product_id, + resource_group_name=resource_group_name, + xml_content=xml_content, + xml_link=xml_link, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + product_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + xml_content: Optional[pulumi.Input[str]] = None, + xml_link: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if product_id is None and 'productId' in kwargs: + product_id = kwargs['productId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if xml_content is None and 'xmlContent' in kwargs: + xml_content = kwargs['xmlContent'] + if xml_link is None and 'xmlLink' in kwargs: + xml_link = kwargs['xmlLink'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if product_id is not None: - pulumi.set(__self__, "product_id", product_id) + _setter("product_id", product_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if xml_content is not None: - pulumi.set(__self__, "xml_content", xml_content) + _setter("xml_content", xml_content) if xml_link is not None: - pulumi.set(__self__, "xml_link", xml_link) + _setter("xml_link", xml_link) @property @pulumi.getter(name="apiManagementName") @@ -283,6 +347,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProductPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/product_tag.py b/sdk/python/pulumi_azure/apimanagement/product_tag.py index 5a079cce5c..f655320db8 100644 --- a/sdk/python/pulumi_azure/apimanagement/product_tag.py +++ b/sdk/python/pulumi_azure/apimanagement/product_tag.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ProductTagArgs', 'ProductTag'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "api_management_product_id", api_management_product_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ProductTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + api_management_product_id=api_management_product_id, + resource_group_name=resource_group_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + api_management_product_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if api_management_product_id is None and 'apiManagementProductId' in kwargs: + api_management_product_id = kwargs['apiManagementProductId'] + if api_management_product_id is None: + raise TypeError("Missing 'api_management_product_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("api_management_name", api_management_name) + _setter("api_management_product_id", api_management_product_id) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="apiManagementName") @@ -94,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created. """ + _ProductTagState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + api_management_product_id=api_management_product_id, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + api_management_product_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_product_id is None and 'apiManagementProductId' in kwargs: + api_management_product_id = kwargs['apiManagementProductId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if api_management_product_id is not None: - pulumi.set(__self__, "api_management_product_id", api_management_product_id) + _setter("api_management_product_id", api_management_product_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="apiManagementName") @@ -263,6 +315,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProductTagArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/redis_cache.py b/sdk/python/pulumi_azure/apimanagement/redis_cache.py index 175245eaf5..ceece52131 100644 --- a/sdk/python/pulumi_azure/apimanagement/redis_cache.py +++ b/sdk/python/pulumi_azure/apimanagement/redis_cache.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RedisCacheArgs', 'RedisCache'] @@ -29,16 +29,49 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this API Management Redis Cache. Changing this forces a new API Management Redis Cache to be created. :param pulumi.Input[str] redis_cache_id: The resource ID of the Cache for Redis. """ - pulumi.set(__self__, "api_management_id", api_management_id) - pulumi.set(__self__, "connection_string", connection_string) + RedisCacheArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + connection_string=connection_string, + cache_location=cache_location, + description=description, + name=name, + redis_cache_id=redis_cache_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + cache_location: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + redis_cache_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if api_management_id is None: + raise TypeError("Missing 'api_management_id' argument") + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if cache_location is None and 'cacheLocation' in kwargs: + cache_location = kwargs['cacheLocation'] + if redis_cache_id is None and 'redisCacheId' in kwargs: + redis_cache_id = kwargs['redisCacheId'] + + _setter("api_management_id", api_management_id) + _setter("connection_string", connection_string) if cache_location is not None: - pulumi.set(__self__, "cache_location", cache_location) + _setter("cache_location", cache_location) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if redis_cache_id is not None: - pulumi.set(__self__, "redis_cache_id", redis_cache_id) + _setter("redis_cache_id", redis_cache_id) @property @pulumi.getter(name="apiManagementId") @@ -131,18 +164,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this API Management Redis Cache. Changing this forces a new API Management Redis Cache to be created. :param pulumi.Input[str] redis_cache_id: The resource ID of the Cache for Redis. """ + _RedisCacheState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + cache_location=cache_location, + connection_string=connection_string, + description=description, + name=name, + redis_cache_id=redis_cache_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + cache_location: Optional[pulumi.Input[str]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + redis_cache_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if cache_location is None and 'cacheLocation' in kwargs: + cache_location = kwargs['cacheLocation'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if redis_cache_id is None and 'redisCacheId' in kwargs: + redis_cache_id = kwargs['redisCacheId'] + if api_management_id is not None: - pulumi.set(__self__, "api_management_id", api_management_id) + _setter("api_management_id", api_management_id) if cache_location is not None: - pulumi.set(__self__, "cache_location", cache_location) + _setter("cache_location", cache_location) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if redis_cache_id is not None: - pulumi.set(__self__, "redis_cache_id", redis_cache_id) + _setter("redis_cache_id", redis_cache_id) @property @pulumi.getter(name="apiManagementId") @@ -336,6 +398,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RedisCacheArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/service.py b/sdk/python/pulumi_azure/apimanagement/service.py index 0ff04b6935..313796e5a8 100644 --- a/sdk/python/pulumi_azure/apimanagement/service.py +++ b/sdk/python/pulumi_azure/apimanagement/service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -85,56 +85,161 @@ def __init__(__self__, *, > **NOTE:** Availability zones are only supported in the Premium tier. """ - pulumi.set(__self__, "publisher_email", publisher_email) - pulumi.set(__self__, "publisher_name", publisher_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + ServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + publisher_email=publisher_email, + publisher_name=publisher_name, + resource_group_name=resource_group_name, + sku_name=sku_name, + additional_locations=additional_locations, + certificates=certificates, + client_certificate_enabled=client_certificate_enabled, + delegation=delegation, + gateway_disabled=gateway_disabled, + hostname_configuration=hostname_configuration, + identity=identity, + location=location, + min_api_version=min_api_version, + name=name, + notification_sender_email=notification_sender_email, + policy=policy, + protocols=protocols, + public_ip_address_id=public_ip_address_id, + public_network_access_enabled=public_network_access_enabled, + security=security, + sign_in=sign_in, + sign_up=sign_up, + tags=tags, + tenant_access=tenant_access, + virtual_network_configuration=virtual_network_configuration, + virtual_network_type=virtual_network_type, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + publisher_email: Optional[pulumi.Input[str]] = None, + publisher_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + additional_locations: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceAdditionalLocationArgs']]]] = None, + certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceCertificateArgs']]]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + delegation: Optional[pulumi.Input['ServiceDelegationArgs']] = None, + gateway_disabled: Optional[pulumi.Input[bool]] = None, + hostname_configuration: Optional[pulumi.Input['ServiceHostnameConfigurationArgs']] = None, + identity: Optional[pulumi.Input['ServiceIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + min_api_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notification_sender_email: Optional[pulumi.Input[str]] = None, + policy: Optional[pulumi.Input['ServicePolicyArgs']] = None, + protocols: Optional[pulumi.Input['ServiceProtocolsArgs']] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + security: Optional[pulumi.Input['ServiceSecurityArgs']] = None, + sign_in: Optional[pulumi.Input['ServiceSignInArgs']] = None, + sign_up: Optional[pulumi.Input['ServiceSignUpArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_access: Optional[pulumi.Input['ServiceTenantAccessArgs']] = None, + virtual_network_configuration: Optional[pulumi.Input['ServiceVirtualNetworkConfigurationArgs']] = None, + virtual_network_type: Optional[pulumi.Input[str]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if publisher_email is None and 'publisherEmail' in kwargs: + publisher_email = kwargs['publisherEmail'] + if publisher_email is None: + raise TypeError("Missing 'publisher_email' argument") + if publisher_name is None and 'publisherName' in kwargs: + publisher_name = kwargs['publisherName'] + if publisher_name is None: + raise TypeError("Missing 'publisher_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if additional_locations is None and 'additionalLocations' in kwargs: + additional_locations = kwargs['additionalLocations'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if gateway_disabled is None and 'gatewayDisabled' in kwargs: + gateway_disabled = kwargs['gatewayDisabled'] + if hostname_configuration is None and 'hostnameConfiguration' in kwargs: + hostname_configuration = kwargs['hostnameConfiguration'] + if min_api_version is None and 'minApiVersion' in kwargs: + min_api_version = kwargs['minApiVersion'] + if notification_sender_email is None and 'notificationSenderEmail' in kwargs: + notification_sender_email = kwargs['notificationSenderEmail'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if sign_in is None and 'signIn' in kwargs: + sign_in = kwargs['signIn'] + if sign_up is None and 'signUp' in kwargs: + sign_up = kwargs['signUp'] + if tenant_access is None and 'tenantAccess' in kwargs: + tenant_access = kwargs['tenantAccess'] + if virtual_network_configuration is None and 'virtualNetworkConfiguration' in kwargs: + virtual_network_configuration = kwargs['virtualNetworkConfiguration'] + if virtual_network_type is None and 'virtualNetworkType' in kwargs: + virtual_network_type = kwargs['virtualNetworkType'] + + _setter("publisher_email", publisher_email) + _setter("publisher_name", publisher_name) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if additional_locations is not None: - pulumi.set(__self__, "additional_locations", additional_locations) + _setter("additional_locations", additional_locations) if certificates is not None: - pulumi.set(__self__, "certificates", certificates) + _setter("certificates", certificates) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if delegation is not None: - pulumi.set(__self__, "delegation", delegation) + _setter("delegation", delegation) if gateway_disabled is not None: - pulumi.set(__self__, "gateway_disabled", gateway_disabled) + _setter("gateway_disabled", gateway_disabled) if hostname_configuration is not None: - pulumi.set(__self__, "hostname_configuration", hostname_configuration) + _setter("hostname_configuration", hostname_configuration) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if min_api_version is not None: - pulumi.set(__self__, "min_api_version", min_api_version) + _setter("min_api_version", min_api_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notification_sender_email is not None: - pulumi.set(__self__, "notification_sender_email", notification_sender_email) + _setter("notification_sender_email", notification_sender_email) if policy is not None: - pulumi.set(__self__, "policy", policy) + _setter("policy", policy) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if security is not None: - pulumi.set(__self__, "security", security) + _setter("security", security) if sign_in is not None: - pulumi.set(__self__, "sign_in", sign_in) + _setter("sign_in", sign_in) if sign_up is not None: - pulumi.set(__self__, "sign_up", sign_up) + _setter("sign_up", sign_up) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_access is not None: - pulumi.set(__self__, "tenant_access", tenant_access) + _setter("tenant_access", tenant_access) if virtual_network_configuration is not None: - pulumi.set(__self__, "virtual_network_configuration", virtual_network_configuration) + _setter("virtual_network_configuration", virtual_network_configuration) if virtual_network_type is not None: - pulumi.set(__self__, "virtual_network_type", virtual_network_type) + _setter("virtual_network_type", virtual_network_type) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="publisherEmail") @@ -561,76 +666,205 @@ def __init__(__self__, *, > **NOTE:** Availability zones are only supported in the Premium tier. """ + _ServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_locations=additional_locations, + certificates=certificates, + client_certificate_enabled=client_certificate_enabled, + delegation=delegation, + developer_portal_url=developer_portal_url, + gateway_disabled=gateway_disabled, + gateway_regional_url=gateway_regional_url, + gateway_url=gateway_url, + hostname_configuration=hostname_configuration, + identity=identity, + location=location, + management_api_url=management_api_url, + min_api_version=min_api_version, + name=name, + notification_sender_email=notification_sender_email, + policy=policy, + portal_url=portal_url, + private_ip_addresses=private_ip_addresses, + protocols=protocols, + public_ip_address_id=public_ip_address_id, + public_ip_addresses=public_ip_addresses, + public_network_access_enabled=public_network_access_enabled, + publisher_email=publisher_email, + publisher_name=publisher_name, + resource_group_name=resource_group_name, + scm_url=scm_url, + security=security, + sign_in=sign_in, + sign_up=sign_up, + sku_name=sku_name, + tags=tags, + tenant_access=tenant_access, + virtual_network_configuration=virtual_network_configuration, + virtual_network_type=virtual_network_type, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_locations: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceAdditionalLocationArgs']]]] = None, + certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceCertificateArgs']]]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + delegation: Optional[pulumi.Input['ServiceDelegationArgs']] = None, + developer_portal_url: Optional[pulumi.Input[str]] = None, + gateway_disabled: Optional[pulumi.Input[bool]] = None, + gateway_regional_url: Optional[pulumi.Input[str]] = None, + gateway_url: Optional[pulumi.Input[str]] = None, + hostname_configuration: Optional[pulumi.Input['ServiceHostnameConfigurationArgs']] = None, + identity: Optional[pulumi.Input['ServiceIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + management_api_url: Optional[pulumi.Input[str]] = None, + min_api_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notification_sender_email: Optional[pulumi.Input[str]] = None, + policy: Optional[pulumi.Input['ServicePolicyArgs']] = None, + portal_url: Optional[pulumi.Input[str]] = None, + private_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + protocols: Optional[pulumi.Input['ServiceProtocolsArgs']] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + publisher_email: Optional[pulumi.Input[str]] = None, + publisher_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scm_url: Optional[pulumi.Input[str]] = None, + security: Optional[pulumi.Input['ServiceSecurityArgs']] = None, + sign_in: Optional[pulumi.Input['ServiceSignInArgs']] = None, + sign_up: Optional[pulumi.Input['ServiceSignUpArgs']] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_access: Optional[pulumi.Input['ServiceTenantAccessArgs']] = None, + virtual_network_configuration: Optional[pulumi.Input['ServiceVirtualNetworkConfigurationArgs']] = None, + virtual_network_type: Optional[pulumi.Input[str]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_locations is None and 'additionalLocations' in kwargs: + additional_locations = kwargs['additionalLocations'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if developer_portal_url is None and 'developerPortalUrl' in kwargs: + developer_portal_url = kwargs['developerPortalUrl'] + if gateway_disabled is None and 'gatewayDisabled' in kwargs: + gateway_disabled = kwargs['gatewayDisabled'] + if gateway_regional_url is None and 'gatewayRegionalUrl' in kwargs: + gateway_regional_url = kwargs['gatewayRegionalUrl'] + if gateway_url is None and 'gatewayUrl' in kwargs: + gateway_url = kwargs['gatewayUrl'] + if hostname_configuration is None and 'hostnameConfiguration' in kwargs: + hostname_configuration = kwargs['hostnameConfiguration'] + if management_api_url is None and 'managementApiUrl' in kwargs: + management_api_url = kwargs['managementApiUrl'] + if min_api_version is None and 'minApiVersion' in kwargs: + min_api_version = kwargs['minApiVersion'] + if notification_sender_email is None and 'notificationSenderEmail' in kwargs: + notification_sender_email = kwargs['notificationSenderEmail'] + if portal_url is None and 'portalUrl' in kwargs: + portal_url = kwargs['portalUrl'] + if private_ip_addresses is None and 'privateIpAddresses' in kwargs: + private_ip_addresses = kwargs['privateIpAddresses'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if publisher_email is None and 'publisherEmail' in kwargs: + publisher_email = kwargs['publisherEmail'] + if publisher_name is None and 'publisherName' in kwargs: + publisher_name = kwargs['publisherName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if scm_url is None and 'scmUrl' in kwargs: + scm_url = kwargs['scmUrl'] + if sign_in is None and 'signIn' in kwargs: + sign_in = kwargs['signIn'] + if sign_up is None and 'signUp' in kwargs: + sign_up = kwargs['signUp'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if tenant_access is None and 'tenantAccess' in kwargs: + tenant_access = kwargs['tenantAccess'] + if virtual_network_configuration is None and 'virtualNetworkConfiguration' in kwargs: + virtual_network_configuration = kwargs['virtualNetworkConfiguration'] + if virtual_network_type is None and 'virtualNetworkType' in kwargs: + virtual_network_type = kwargs['virtualNetworkType'] + if additional_locations is not None: - pulumi.set(__self__, "additional_locations", additional_locations) + _setter("additional_locations", additional_locations) if certificates is not None: - pulumi.set(__self__, "certificates", certificates) + _setter("certificates", certificates) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if delegation is not None: - pulumi.set(__self__, "delegation", delegation) + _setter("delegation", delegation) if developer_portal_url is not None: - pulumi.set(__self__, "developer_portal_url", developer_portal_url) + _setter("developer_portal_url", developer_portal_url) if gateway_disabled is not None: - pulumi.set(__self__, "gateway_disabled", gateway_disabled) + _setter("gateway_disabled", gateway_disabled) if gateway_regional_url is not None: - pulumi.set(__self__, "gateway_regional_url", gateway_regional_url) + _setter("gateway_regional_url", gateway_regional_url) if gateway_url is not None: - pulumi.set(__self__, "gateway_url", gateway_url) + _setter("gateway_url", gateway_url) if hostname_configuration is not None: - pulumi.set(__self__, "hostname_configuration", hostname_configuration) + _setter("hostname_configuration", hostname_configuration) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if management_api_url is not None: - pulumi.set(__self__, "management_api_url", management_api_url) + _setter("management_api_url", management_api_url) if min_api_version is not None: - pulumi.set(__self__, "min_api_version", min_api_version) + _setter("min_api_version", min_api_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notification_sender_email is not None: - pulumi.set(__self__, "notification_sender_email", notification_sender_email) + _setter("notification_sender_email", notification_sender_email) if policy is not None: - pulumi.set(__self__, "policy", policy) + _setter("policy", policy) if portal_url is not None: - pulumi.set(__self__, "portal_url", portal_url) + _setter("portal_url", portal_url) if private_ip_addresses is not None: - pulumi.set(__self__, "private_ip_addresses", private_ip_addresses) + _setter("private_ip_addresses", private_ip_addresses) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if publisher_email is not None: - pulumi.set(__self__, "publisher_email", publisher_email) + _setter("publisher_email", publisher_email) if publisher_name is not None: - pulumi.set(__self__, "publisher_name", publisher_name) + _setter("publisher_name", publisher_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scm_url is not None: - pulumi.set(__self__, "scm_url", scm_url) + _setter("scm_url", scm_url) if security is not None: - pulumi.set(__self__, "security", security) + _setter("security", security) if sign_in is not None: - pulumi.set(__self__, "sign_in", sign_in) + _setter("sign_in", sign_in) if sign_up is not None: - pulumi.set(__self__, "sign_up", sign_up) + _setter("sign_up", sign_up) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_access is not None: - pulumi.set(__self__, "tenant_access", tenant_access) + _setter("tenant_access", tenant_access) if virtual_network_configuration is not None: - pulumi.set(__self__, "virtual_network_configuration", virtual_network_configuration) + _setter("virtual_network_configuration", virtual_network_configuration) if virtual_network_type is not None: - pulumi.set(__self__, "virtual_network_type", virtual_network_type) + _setter("virtual_network_type", virtual_network_type) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="additionalLocations") @@ -1204,6 +1438,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1248,15 +1486,40 @@ def _internal_init(__self__, __props__.__dict__["additional_locations"] = additional_locations __props__.__dict__["certificates"] = certificates __props__.__dict__["client_certificate_enabled"] = client_certificate_enabled + if delegation is not None and not isinstance(delegation, ServiceDelegationArgs): + delegation = delegation or {} + def _setter(key, value): + delegation[key] = value + ServiceDelegationArgs._configure(_setter, **delegation) __props__.__dict__["delegation"] = delegation __props__.__dict__["gateway_disabled"] = gateway_disabled + if hostname_configuration is not None and not isinstance(hostname_configuration, ServiceHostnameConfigurationArgs): + hostname_configuration = hostname_configuration or {} + def _setter(key, value): + hostname_configuration[key] = value + ServiceHostnameConfigurationArgs._configure(_setter, **hostname_configuration) __props__.__dict__["hostname_configuration"] = hostname_configuration + if identity is not None and not isinstance(identity, ServiceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ServiceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["min_api_version"] = min_api_version __props__.__dict__["name"] = name __props__.__dict__["notification_sender_email"] = notification_sender_email + if policy is not None and not isinstance(policy, ServicePolicyArgs): + policy = policy or {} + def _setter(key, value): + policy[key] = value + ServicePolicyArgs._configure(_setter, **policy) __props__.__dict__["policy"] = policy + if protocols is not None and not isinstance(protocols, ServiceProtocolsArgs): + protocols = protocols or {} + def _setter(key, value): + protocols[key] = value + ServiceProtocolsArgs._configure(_setter, **protocols) __props__.__dict__["protocols"] = protocols __props__.__dict__["public_ip_address_id"] = public_ip_address_id __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled @@ -1269,14 +1532,39 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if security is not None and not isinstance(security, ServiceSecurityArgs): + security = security or {} + def _setter(key, value): + security[key] = value + ServiceSecurityArgs._configure(_setter, **security) __props__.__dict__["security"] = security + if sign_in is not None and not isinstance(sign_in, ServiceSignInArgs): + sign_in = sign_in or {} + def _setter(key, value): + sign_in[key] = value + ServiceSignInArgs._configure(_setter, **sign_in) __props__.__dict__["sign_in"] = sign_in + if sign_up is not None and not isinstance(sign_up, ServiceSignUpArgs): + sign_up = sign_up or {} + def _setter(key, value): + sign_up[key] = value + ServiceSignUpArgs._configure(_setter, **sign_up) __props__.__dict__["sign_up"] = sign_up if sku_name is None and not opts.urn: raise TypeError("Missing required property 'sku_name'") __props__.__dict__["sku_name"] = sku_name __props__.__dict__["tags"] = tags + if tenant_access is not None and not isinstance(tenant_access, ServiceTenantAccessArgs): + tenant_access = tenant_access or {} + def _setter(key, value): + tenant_access[key] = value + ServiceTenantAccessArgs._configure(_setter, **tenant_access) __props__.__dict__["tenant_access"] = tenant_access + if virtual_network_configuration is not None and not isinstance(virtual_network_configuration, ServiceVirtualNetworkConfigurationArgs): + virtual_network_configuration = virtual_network_configuration or {} + def _setter(key, value): + virtual_network_configuration[key] = value + ServiceVirtualNetworkConfigurationArgs._configure(_setter, **virtual_network_configuration) __props__.__dict__["virtual_network_configuration"] = virtual_network_configuration __props__.__dict__["virtual_network_type"] = virtual_network_type __props__.__dict__["zones"] = zones diff --git a/sdk/python/pulumi_azure/apimanagement/subscription.py b/sdk/python/pulumi_azure/apimanagement/subscription.py index fdd7ca1520..a6af8e9d6a 100644 --- a/sdk/python/pulumi_azure/apimanagement/subscription.py +++ b/sdk/python/pulumi_azure/apimanagement/subscription.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SubscriptionArgs', 'Subscription'] @@ -43,25 +43,82 @@ def __init__(__self__, *, :param pulumi.Input[str] subscription_id: An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created. :param pulumi.Input[str] user_id: The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + SubscriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + display_name=display_name, + resource_group_name=resource_group_name, + allow_tracing=allow_tracing, + api_id=api_id, + primary_key=primary_key, + product_id=product_id, + secondary_key=secondary_key, + state=state, + subscription_id=subscription_id, + user_id=user_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + allow_tracing: Optional[pulumi.Input[bool]] = None, + api_id: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + product_id: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + state: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if allow_tracing is None and 'allowTracing' in kwargs: + allow_tracing = kwargs['allowTracing'] + if api_id is None and 'apiId' in kwargs: + api_id = kwargs['apiId'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if product_id is None and 'productId' in kwargs: + product_id = kwargs['productId'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if user_id is None and 'userId' in kwargs: + user_id = kwargs['userId'] + + _setter("api_management_name", api_management_name) + _setter("display_name", display_name) + _setter("resource_group_name", resource_group_name) if allow_tracing is not None: - pulumi.set(__self__, "allow_tracing", allow_tracing) + _setter("allow_tracing", allow_tracing) if api_id is not None: - pulumi.set(__self__, "api_id", api_id) + _setter("api_id", api_id) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if product_id is not None: - pulumi.set(__self__, "product_id", product_id) + _setter("product_id", product_id) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) if user_id is not None: - pulumi.set(__self__, "user_id", user_id) + _setter("user_id", user_id) @property @pulumi.getter(name="apiManagementName") @@ -232,28 +289,79 @@ def __init__(__self__, *, :param pulumi.Input[str] subscription_id: An Identifier which should used as the ID of this Subscription. If not specified a new Subscription ID will be generated. Changing this forces a new resource to be created. :param pulumi.Input[str] user_id: The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created. """ + _SubscriptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_tracing=allow_tracing, + api_id=api_id, + api_management_name=api_management_name, + display_name=display_name, + primary_key=primary_key, + product_id=product_id, + resource_group_name=resource_group_name, + secondary_key=secondary_key, + state=state, + subscription_id=subscription_id, + user_id=user_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_tracing: Optional[pulumi.Input[bool]] = None, + api_id: Optional[pulumi.Input[str]] = None, + api_management_name: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + product_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + state: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_tracing is None and 'allowTracing' in kwargs: + allow_tracing = kwargs['allowTracing'] + if api_id is None and 'apiId' in kwargs: + api_id = kwargs['apiId'] + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if product_id is None and 'productId' in kwargs: + product_id = kwargs['productId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if user_id is None and 'userId' in kwargs: + user_id = kwargs['userId'] + if allow_tracing is not None: - pulumi.set(__self__, "allow_tracing", allow_tracing) + _setter("allow_tracing", allow_tracing) if api_id is not None: - pulumi.set(__self__, "api_id", api_id) + _setter("api_id", api_id) if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if product_id is not None: - pulumi.set(__self__, "product_id", product_id) + _setter("product_id", product_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) if user_id is not None: - pulumi.set(__self__, "user_id", user_id) + _setter("user_id", user_id) @property @pulumi.getter(name="allowTracing") @@ -509,6 +617,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubscriptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/tag.py b/sdk/python/pulumi_azure/apimanagement/tag.py index b059a93246..04001dd105 100644 --- a/sdk/python/pulumi_azure/apimanagement/tag.py +++ b/sdk/python/pulumi_azure/apimanagement/tag.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TagArgs', 'Tag'] @@ -23,11 +23,32 @@ def __init__(__self__, *, :param pulumi.Input[str] display_name: The display name of the API Management Tag. Defaults to the `name`. :param pulumi.Input[str] name: The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created. The name must be unique in the API Management Service. """ - pulumi.set(__self__, "api_management_id", api_management_id) + TagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + display_name=display_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if api_management_id is None: + raise TypeError("Missing 'api_management_id' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + + _setter("api_management_id", api_management_id) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="apiManagementId") @@ -78,12 +99,31 @@ def __init__(__self__, *, :param pulumi.Input[str] display_name: The display name of the API Management Tag. Defaults to the `name`. :param pulumi.Input[str] name: The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created. The name must be unique in the API Management Service. """ + _TagState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_id=api_management_id, + display_name=display_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_id: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_id is None and 'apiManagementId' in kwargs: + api_management_id = kwargs['apiManagementId'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if api_management_id is not None: - pulumi.set(__self__, "api_management_id", api_management_id) + _setter("api_management_id", api_management_id) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="apiManagementId") @@ -207,6 +247,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TagArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/apimanagement/user.py b/sdk/python/pulumi_azure/apimanagement/user.py index f8a5cd5bbd..48d266e4d9 100644 --- a/sdk/python/pulumi_azure/apimanagement/user.py +++ b/sdk/python/pulumi_azure/apimanagement/user.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['UserArgs', 'User'] @@ -39,20 +39,71 @@ def __init__(__self__, *, > **NOTE:** the State can be changed from Pending > Active/Blocked but not from Active/Blocked > Pending. """ - pulumi.set(__self__, "api_management_name", api_management_name) - pulumi.set(__self__, "email", email) - pulumi.set(__self__, "first_name", first_name) - pulumi.set(__self__, "last_name", last_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "user_id", user_id) + UserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + email=email, + first_name=first_name, + last_name=last_name, + resource_group_name=resource_group_name, + user_id=user_id, + confirmation=confirmation, + note=note, + password=password, + state=state, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + email: Optional[pulumi.Input[str]] = None, + first_name: Optional[pulumi.Input[str]] = None, + last_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None, + confirmation: Optional[pulumi.Input[str]] = None, + note: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + state: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if api_management_name is None: + raise TypeError("Missing 'api_management_name' argument") + if email is None: + raise TypeError("Missing 'email' argument") + if first_name is None and 'firstName' in kwargs: + first_name = kwargs['firstName'] + if first_name is None: + raise TypeError("Missing 'first_name' argument") + if last_name is None and 'lastName' in kwargs: + last_name = kwargs['lastName'] + if last_name is None: + raise TypeError("Missing 'last_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if user_id is None and 'userId' in kwargs: + user_id = kwargs['userId'] + if user_id is None: + raise TypeError("Missing 'user_id' argument") + + _setter("api_management_name", api_management_name) + _setter("email", email) + _setter("first_name", first_name) + _setter("last_name", last_name) + _setter("resource_group_name", resource_group_name) + _setter("user_id", user_id) if confirmation is not None: - pulumi.set(__self__, "confirmation", confirmation) + _setter("confirmation", confirmation) if note is not None: - pulumi.set(__self__, "note", note) + _setter("note", note) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) @property @pulumi.getter(name="apiManagementName") @@ -205,26 +256,65 @@ def __init__(__self__, *, > **NOTE:** the State can be changed from Pending > Active/Blocked but not from Active/Blocked > Pending. :param pulumi.Input[str] user_id: The Identifier for this User, which must be unique within the API Management Service. Changing this forces a new resource to be created. """ + _UserState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management_name=api_management_name, + confirmation=confirmation, + email=email, + first_name=first_name, + last_name=last_name, + note=note, + password=password, + resource_group_name=resource_group_name, + state=state, + user_id=user_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management_name: Optional[pulumi.Input[str]] = None, + confirmation: Optional[pulumi.Input[str]] = None, + email: Optional[pulumi.Input[str]] = None, + first_name: Optional[pulumi.Input[str]] = None, + last_name: Optional[pulumi.Input[str]] = None, + note: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + state: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management_name is None and 'apiManagementName' in kwargs: + api_management_name = kwargs['apiManagementName'] + if first_name is None and 'firstName' in kwargs: + first_name = kwargs['firstName'] + if last_name is None and 'lastName' in kwargs: + last_name = kwargs['lastName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if user_id is None and 'userId' in kwargs: + user_id = kwargs['userId'] + if api_management_name is not None: - pulumi.set(__self__, "api_management_name", api_management_name) + _setter("api_management_name", api_management_name) if confirmation is not None: - pulumi.set(__self__, "confirmation", confirmation) + _setter("confirmation", confirmation) if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if first_name is not None: - pulumi.set(__self__, "first_name", first_name) + _setter("first_name", first_name) if last_name is not None: - pulumi.set(__self__, "last_name", last_name) + _setter("last_name", last_name) if note is not None: - pulumi.set(__self__, "note", note) + _setter("note", note) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) if user_id is not None: - pulumi.set(__self__, "user_id", user_id) + _setter("user_id", user_id) @property @pulumi.getter(name="apiManagementName") @@ -464,6 +554,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + UserArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appconfiguration/_inputs.py b/sdk/python/pulumi_azure/appconfiguration/_inputs.py index 5b7a895fa7..cc77a141de 100644 --- a/sdk/python/pulumi_azure/appconfiguration/_inputs.py +++ b/sdk/python/pulumi_azure/appconfiguration/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -33,11 +33,30 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ConfigurationFeatureTargetingFilterGroupArgs']]] groups: One or more blocks of type `groups` as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] users: A list of users to target for this feature. """ - pulumi.set(__self__, "default_rollout_percentage", default_rollout_percentage) + ConfigurationFeatureTargetingFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_rollout_percentage=default_rollout_percentage, + groups=groups, + users=users, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_rollout_percentage: Optional[pulumi.Input[int]] = None, + groups: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationFeatureTargetingFilterGroupArgs']]]] = None, + users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_rollout_percentage is None and 'defaultRolloutPercentage' in kwargs: + default_rollout_percentage = kwargs['defaultRolloutPercentage'] + if default_rollout_percentage is None: + raise TypeError("Missing 'default_rollout_percentage' argument") + + _setter("default_rollout_percentage", default_rollout_percentage) if groups is not None: - pulumi.set(__self__, "groups", groups) + _setter("groups", groups) if users is not None: - pulumi.set(__self__, "users", users) + _setter("users", users) @property @pulumi.getter(name="defaultRolloutPercentage") @@ -85,8 +104,27 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the group. :param pulumi.Input[int] rollout_percentage: Rollout percentage of the group. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "rollout_percentage", rollout_percentage) + ConfigurationFeatureTargetingFilterGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + rollout_percentage=rollout_percentage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + rollout_percentage: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if rollout_percentage is None and 'rolloutPercentage' in kwargs: + rollout_percentage = kwargs['rolloutPercentage'] + if rollout_percentage is None: + raise TypeError("Missing 'rollout_percentage' argument") + + _setter("name", name) + _setter("rollout_percentage", rollout_percentage) @property @pulumi.getter @@ -122,10 +160,23 @@ def __init__(__self__, *, :param pulumi.Input[str] end: The latest timestamp the feature is enabled. The timestamp must be in RFC3339 format. :param pulumi.Input[str] start: The earliest timestamp the feature is enabled. The timestamp must be in RFC3339 format. """ + ConfigurationFeatureTimewindowFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end=end, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end: Optional[pulumi.Input[str]] = None, + start: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end is not None: - pulumi.set(__self__, "end", end) + _setter("end", end) if start is not None: - pulumi.set(__self__, "start", start) + _setter("start", start) @property @pulumi.getter @@ -161,10 +212,27 @@ def __init__(__self__, *, :param pulumi.Input[str] identity_client_id: Specifies the client id of the identity which will be used to access key vault. :param pulumi.Input[str] key_vault_key_identifier: Specifies the URI of the key vault key used to encrypt data. """ + ConfigurationStoreEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_client_id=identity_client_id, + key_vault_key_identifier=key_vault_key_identifier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_client_id: Optional[pulumi.Input[str]] = None, + key_vault_key_identifier: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_client_id is None and 'identityClientId' in kwargs: + identity_client_id = kwargs['identityClientId'] + if key_vault_key_identifier is None and 'keyVaultKeyIdentifier' in kwargs: + key_vault_key_identifier = kwargs['keyVaultKeyIdentifier'] + if identity_client_id is not None: - pulumi.set(__self__, "identity_client_id", identity_client_id) + _setter("identity_client_id", identity_client_id) if key_vault_key_identifier is not None: - pulumi.set(__self__, "key_vault_key_identifier", key_vault_key_identifier) + _setter("key_vault_key_identifier", key_vault_key_identifier) @property @pulumi.getter(name="identityClientId") @@ -206,13 +274,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ConfigurationStoreIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -276,12 +369,29 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the Access Key. :param pulumi.Input[str] secret: The Secret of the Access Key. """ + ConfigurationStorePrimaryReadKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) @property @pulumi.getter(name="connectionString") @@ -331,12 +441,29 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the Access Key. :param pulumi.Input[str] secret: The Secret of the Access Key. """ + ConfigurationStorePrimaryWriteKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) @property @pulumi.getter(name="connectionString") @@ -388,12 +515,33 @@ def __init__(__self__, *, :param pulumi.Input[str] endpoint: The URL of the App Configuration Replica. :param pulumi.Input[str] id: The ID of the Access Key. """ - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "name", name) + ConfigurationStoreReplicaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + endpoint=endpoint, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is None: + raise TypeError("Missing 'location' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("location", location) + _setter("name", name) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -455,12 +603,29 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the Access Key. :param pulumi.Input[str] secret: The Secret of the Access Key. """ + ConfigurationStoreSecondaryReadKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) @property @pulumi.getter(name="connectionString") @@ -510,12 +675,29 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the Access Key. :param pulumi.Input[str] secret: The Secret of the Access Key. """ + ConfigurationStoreSecondaryWriteKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) @property @pulumi.getter(name="connectionString") diff --git a/sdk/python/pulumi_azure/appconfiguration/configuration_feature.py b/sdk/python/pulumi_azure/appconfiguration/configuration_feature.py index 316433c2e5..c51944819c 100644 --- a/sdk/python/pulumi_azure/appconfiguration/configuration_feature.py +++ b/sdk/python/pulumi_azure/appconfiguration/configuration_feature.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -42,29 +42,72 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ConfigurationFeatureTargetingFilterArgs']]] targeting_filters: A `targeting_filter` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['ConfigurationFeatureTimewindowFilterArgs']]] timewindow_filters: A `timewindow_filter` block as defined below. """ - pulumi.set(__self__, "configuration_store_id", configuration_store_id) + ConfigurationFeatureArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + configuration_store_id=configuration_store_id, + description=description, + enabled=enabled, + etag=etag, + key=key, + label=label, + locked=locked, + name=name, + percentage_filter_value=percentage_filter_value, + tags=tags, + targeting_filters=targeting_filters, + timewindow_filters=timewindow_filters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + configuration_store_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + etag: Optional[pulumi.Input[str]] = None, + key: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + locked: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + percentage_filter_value: Optional[pulumi.Input[float]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + targeting_filters: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationFeatureTargetingFilterArgs']]]] = None, + timewindow_filters: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationFeatureTimewindowFilterArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if configuration_store_id is None and 'configurationStoreId' in kwargs: + configuration_store_id = kwargs['configurationStoreId'] + if configuration_store_id is None: + raise TypeError("Missing 'configuration_store_id' argument") + if percentage_filter_value is None and 'percentageFilterValue' in kwargs: + percentage_filter_value = kwargs['percentageFilterValue'] + if targeting_filters is None and 'targetingFilters' in kwargs: + targeting_filters = kwargs['targetingFilters'] + if timewindow_filters is None and 'timewindowFilters' in kwargs: + timewindow_filters = kwargs['timewindowFilters'] + + _setter("configuration_store_id", configuration_store_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if etag is not None: - pulumi.set(__self__, "etag", etag) + _setter("etag", etag) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if locked is not None: - pulumi.set(__self__, "locked", locked) + _setter("locked", locked) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if percentage_filter_value is not None: - pulumi.set(__self__, "percentage_filter_value", percentage_filter_value) + _setter("percentage_filter_value", percentage_filter_value) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if targeting_filters is not None: - pulumi.set(__self__, "targeting_filters", targeting_filters) + _setter("targeting_filters", targeting_filters) if timewindow_filters is not None: - pulumi.set(__self__, "timewindow_filters", timewindow_filters) + _setter("timewindow_filters", timewindow_filters) @property @pulumi.getter(name="configurationStoreId") @@ -237,30 +280,71 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ConfigurationFeatureTargetingFilterArgs']]] targeting_filters: A `targeting_filter` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['ConfigurationFeatureTimewindowFilterArgs']]] timewindow_filters: A `timewindow_filter` block as defined below. """ + _ConfigurationFeatureState._configure( + lambda key, value: pulumi.set(__self__, key, value), + configuration_store_id=configuration_store_id, + description=description, + enabled=enabled, + etag=etag, + key=key, + label=label, + locked=locked, + name=name, + percentage_filter_value=percentage_filter_value, + tags=tags, + targeting_filters=targeting_filters, + timewindow_filters=timewindow_filters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + configuration_store_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + etag: Optional[pulumi.Input[str]] = None, + key: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + locked: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + percentage_filter_value: Optional[pulumi.Input[float]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + targeting_filters: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationFeatureTargetingFilterArgs']]]] = None, + timewindow_filters: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationFeatureTimewindowFilterArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if configuration_store_id is None and 'configurationStoreId' in kwargs: + configuration_store_id = kwargs['configurationStoreId'] + if percentage_filter_value is None and 'percentageFilterValue' in kwargs: + percentage_filter_value = kwargs['percentageFilterValue'] + if targeting_filters is None and 'targetingFilters' in kwargs: + targeting_filters = kwargs['targetingFilters'] + if timewindow_filters is None and 'timewindowFilters' in kwargs: + timewindow_filters = kwargs['timewindowFilters'] + if configuration_store_id is not None: - pulumi.set(__self__, "configuration_store_id", configuration_store_id) + _setter("configuration_store_id", configuration_store_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if etag is not None: - pulumi.set(__self__, "etag", etag) + _setter("etag", etag) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if locked is not None: - pulumi.set(__self__, "locked", locked) + _setter("locked", locked) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if percentage_filter_value is not None: - pulumi.set(__self__, "percentage_filter_value", percentage_filter_value) + _setter("percentage_filter_value", percentage_filter_value) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if targeting_filters is not None: - pulumi.set(__self__, "targeting_filters", targeting_filters) + _setter("targeting_filters", targeting_filters) if timewindow_filters is not None: - pulumi.set(__self__, "timewindow_filters", timewindow_filters) + _setter("timewindow_filters", timewindow_filters) @property @pulumi.getter(name="configurationStoreId") @@ -534,6 +618,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConfigurationFeatureArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appconfiguration/configuration_key.py b/sdk/python/pulumi_azure/appconfiguration/configuration_key.py index fa3240b323..2b3754a05c 100644 --- a/sdk/python/pulumi_azure/appconfiguration/configuration_key.py +++ b/sdk/python/pulumi_azure/appconfiguration/configuration_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ConfigurationKeyArgs', 'ConfigurationKey'] @@ -39,24 +39,63 @@ def __init__(__self__, *, > **NOTE:** When setting the `vault_key_reference` using the `id` will pin the value to specific version of the secret, to reference latest secret value use `versionless_id` """ - pulumi.set(__self__, "configuration_store_id", configuration_store_id) - pulumi.set(__self__, "key", key) + ConfigurationKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + configuration_store_id=configuration_store_id, + key=key, + content_type=content_type, + etag=etag, + label=label, + locked=locked, + tags=tags, + type=type, + value=value, + vault_key_reference=vault_key_reference, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + configuration_store_id: Optional[pulumi.Input[str]] = None, + key: Optional[pulumi.Input[str]] = None, + content_type: Optional[pulumi.Input[str]] = None, + etag: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + locked: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + vault_key_reference: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if configuration_store_id is None and 'configurationStoreId' in kwargs: + configuration_store_id = kwargs['configurationStoreId'] + if configuration_store_id is None: + raise TypeError("Missing 'configuration_store_id' argument") + if key is None: + raise TypeError("Missing 'key' argument") + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if vault_key_reference is None and 'vaultKeyReference' in kwargs: + vault_key_reference = kwargs['vaultKeyReference'] + + _setter("configuration_store_id", configuration_store_id) + _setter("key", key) if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if etag is not None: - pulumi.set(__self__, "etag", etag) + _setter("etag", etag) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if locked is not None: - pulumi.set(__self__, "locked", locked) + _setter("locked", locked) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) if vault_key_reference is not None: - pulumi.set(__self__, "vault_key_reference", vault_key_reference) + _setter("vault_key_reference", vault_key_reference) @property @pulumi.getter(name="configurationStoreId") @@ -209,26 +248,61 @@ def __init__(__self__, *, > **NOTE:** When setting the `vault_key_reference` using the `id` will pin the value to specific version of the secret, to reference latest secret value use `versionless_id` """ + _ConfigurationKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + configuration_store_id=configuration_store_id, + content_type=content_type, + etag=etag, + key=key, + label=label, + locked=locked, + tags=tags, + type=type, + value=value, + vault_key_reference=vault_key_reference, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + configuration_store_id: Optional[pulumi.Input[str]] = None, + content_type: Optional[pulumi.Input[str]] = None, + etag: Optional[pulumi.Input[str]] = None, + key: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + locked: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + vault_key_reference: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if configuration_store_id is None and 'configurationStoreId' in kwargs: + configuration_store_id = kwargs['configurationStoreId'] + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if vault_key_reference is None and 'vaultKeyReference' in kwargs: + vault_key_reference = kwargs['vaultKeyReference'] + if configuration_store_id is not None: - pulumi.set(__self__, "configuration_store_id", configuration_store_id) + _setter("configuration_store_id", configuration_store_id) if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if etag is not None: - pulumi.set(__self__, "etag", etag) + _setter("etag", etag) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if locked is not None: - pulumi.set(__self__, "locked", locked) + _setter("locked", locked) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) if vault_key_reference is not None: - pulumi.set(__self__, "vault_key_reference", vault_key_reference) + _setter("vault_key_reference", vault_key_reference) @property @pulumi.getter(name="configurationStoreId") @@ -580,6 +654,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConfigurationKeyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appconfiguration/configuration_store.py b/sdk/python/pulumi_azure/appconfiguration/configuration_store.py index cb00679d7e..f7121b6b73 100644 --- a/sdk/python/pulumi_azure/appconfiguration/configuration_store.py +++ b/sdk/python/pulumi_azure/appconfiguration/configuration_store.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -51,29 +51,74 @@ def __init__(__self__, *, > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + ConfigurationStoreArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + encryption=encryption, + identity=identity, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + public_network_access=public_network_access, + purge_protection_enabled=purge_protection_enabled, + replicas=replicas, + sku=sku, + soft_delete_retention_days=soft_delete_retention_days, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + encryption: Optional[pulumi.Input['ConfigurationStoreEncryptionArgs']] = None, + identity: Optional[pulumi.Input['ConfigurationStoreIdentityArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access: Optional[pulumi.Input[str]] = None, + purge_protection_enabled: Optional[pulumi.Input[bool]] = None, + replicas: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationStoreReplicaArgs']]]] = None, + sku: Optional[pulumi.Input[str]] = None, + soft_delete_retention_days: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if public_network_access is None and 'publicNetworkAccess' in kwargs: + public_network_access = kwargs['publicNetworkAccess'] + if purge_protection_enabled is None and 'purgeProtectionEnabled' in kwargs: + purge_protection_enabled = kwargs['purgeProtectionEnabled'] + if soft_delete_retention_days is None and 'softDeleteRetentionDays' in kwargs: + soft_delete_retention_days = kwargs['softDeleteRetentionDays'] + + _setter("resource_group_name", resource_group_name) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access is not None: - pulumi.set(__self__, "public_network_access", public_network_access) + _setter("public_network_access", public_network_access) if purge_protection_enabled is not None: - pulumi.set(__self__, "purge_protection_enabled", purge_protection_enabled) + _setter("purge_protection_enabled", purge_protection_enabled) if replicas is not None: - pulumi.set(__self__, "replicas", replicas) + _setter("replicas", replicas) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if soft_delete_retention_days is not None: - pulumi.set(__self__, "soft_delete_retention_days", soft_delete_retention_days) + _setter("soft_delete_retention_days", soft_delete_retention_days) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -276,40 +321,101 @@ def __init__(__self__, *, > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ConfigurationStoreState._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption=encryption, + endpoint=endpoint, + identity=identity, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + primary_read_keys=primary_read_keys, + primary_write_keys=primary_write_keys, + public_network_access=public_network_access, + purge_protection_enabled=purge_protection_enabled, + replicas=replicas, + resource_group_name=resource_group_name, + secondary_read_keys=secondary_read_keys, + secondary_write_keys=secondary_write_keys, + sku=sku, + soft_delete_retention_days=soft_delete_retention_days, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption: Optional[pulumi.Input['ConfigurationStoreEncryptionArgs']] = None, + endpoint: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ConfigurationStoreIdentityArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_read_keys: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationStorePrimaryReadKeyArgs']]]] = None, + primary_write_keys: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationStorePrimaryWriteKeyArgs']]]] = None, + public_network_access: Optional[pulumi.Input[str]] = None, + purge_protection_enabled: Optional[pulumi.Input[bool]] = None, + replicas: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationStoreReplicaArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_read_keys: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationStoreSecondaryReadKeyArgs']]]] = None, + secondary_write_keys: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationStoreSecondaryWriteKeyArgs']]]] = None, + sku: Optional[pulumi.Input[str]] = None, + soft_delete_retention_days: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if primary_read_keys is None and 'primaryReadKeys' in kwargs: + primary_read_keys = kwargs['primaryReadKeys'] + if primary_write_keys is None and 'primaryWriteKeys' in kwargs: + primary_write_keys = kwargs['primaryWriteKeys'] + if public_network_access is None and 'publicNetworkAccess' in kwargs: + public_network_access = kwargs['publicNetworkAccess'] + if purge_protection_enabled is None and 'purgeProtectionEnabled' in kwargs: + purge_protection_enabled = kwargs['purgeProtectionEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_read_keys is None and 'secondaryReadKeys' in kwargs: + secondary_read_keys = kwargs['secondaryReadKeys'] + if secondary_write_keys is None and 'secondaryWriteKeys' in kwargs: + secondary_write_keys = kwargs['secondaryWriteKeys'] + if soft_delete_retention_days is None and 'softDeleteRetentionDays' in kwargs: + soft_delete_retention_days = kwargs['softDeleteRetentionDays'] + if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_read_keys is not None: - pulumi.set(__self__, "primary_read_keys", primary_read_keys) + _setter("primary_read_keys", primary_read_keys) if primary_write_keys is not None: - pulumi.set(__self__, "primary_write_keys", primary_write_keys) + _setter("primary_write_keys", primary_write_keys) if public_network_access is not None: - pulumi.set(__self__, "public_network_access", public_network_access) + _setter("public_network_access", public_network_access) if purge_protection_enabled is not None: - pulumi.set(__self__, "purge_protection_enabled", purge_protection_enabled) + _setter("purge_protection_enabled", purge_protection_enabled) if replicas is not None: - pulumi.set(__self__, "replicas", replicas) + _setter("replicas", replicas) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_read_keys is not None: - pulumi.set(__self__, "secondary_read_keys", secondary_read_keys) + _setter("secondary_read_keys", secondary_read_keys) if secondary_write_keys is not None: - pulumi.set(__self__, "secondary_write_keys", secondary_write_keys) + _setter("secondary_write_keys", secondary_write_keys) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if soft_delete_retention_days is not None: - pulumi.set(__self__, "soft_delete_retention_days", soft_delete_retention_days) + _setter("soft_delete_retention_days", soft_delete_retention_days) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -809,6 +915,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConfigurationStoreArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -835,7 +945,17 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ConfigurationStoreArgs.__new__(ConfigurationStoreArgs) + if encryption is not None and not isinstance(encryption, ConfigurationStoreEncryptionArgs): + encryption = encryption or {} + def _setter(key, value): + encryption[key] = value + ConfigurationStoreEncryptionArgs._configure(_setter, **encryption) __props__.__dict__["encryption"] = encryption + if identity is not None and not isinstance(identity, ConfigurationStoreIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ConfigurationStoreIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["local_auth_enabled"] = local_auth_enabled __props__.__dict__["location"] = location diff --git a/sdk/python/pulumi_azure/appconfiguration/get_configuration_key.py b/sdk/python/pulumi_azure/appconfiguration/get_configuration_key.py index 44ea17de4e..af08fbe0f7 100644 --- a/sdk/python/pulumi_azure/appconfiguration/get_configuration_key.py +++ b/sdk/python/pulumi_azure/appconfiguration/get_configuration_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/appconfiguration/get_configuration_keys.py b/sdk/python/pulumi_azure/appconfiguration/get_configuration_keys.py index c8843eebec..b896578b5d 100644 --- a/sdk/python/pulumi_azure/appconfiguration/get_configuration_keys.py +++ b/sdk/python/pulumi_azure/appconfiguration/get_configuration_keys.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appconfiguration/get_configuration_store.py b/sdk/python/pulumi_azure/appconfiguration/get_configuration_store.py index eef750ac6a..2d58fd46ff 100644 --- a/sdk/python/pulumi_azure/appconfiguration/get_configuration_store.py +++ b/sdk/python/pulumi_azure/appconfiguration/get_configuration_store.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appconfiguration/lication_load_balancer.py b/sdk/python/pulumi_azure/appconfiguration/lication_load_balancer.py index 92dfca7152..d8a3bc1dc2 100644 --- a/sdk/python/pulumi_azure/appconfiguration/lication_load_balancer.py +++ b/sdk/python/pulumi_azure/appconfiguration/lication_load_balancer.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LicationLoadBalancerArgs', 'LicationLoadBalancer'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Application Gateway for Containers (ALB). Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Application Gateway for Containers (ALB). """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + LicationLoadBalancerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -98,16 +119,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of Resource Group where the Application Gateway for Containers (ALB) should exist. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Application Gateway for Containers (ALB). """ + _LicationLoadBalancerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + primary_configuration_endpoint=primary_configuration_endpoint, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_configuration_endpoint: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary_configuration_endpoint is None and 'primaryConfigurationEndpoint' in kwargs: + primary_configuration_endpoint = kwargs['primaryConfigurationEndpoint'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_configuration_endpoint is not None: - pulumi.set(__self__, "primary_configuration_endpoint", primary_configuration_endpoint) + _setter("primary_configuration_endpoint", primary_configuration_endpoint) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -249,6 +293,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LicationLoadBalancerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appconfiguration/lication_load_balancer_frontend.py b/sdk/python/pulumi_azure/appconfiguration/lication_load_balancer_frontend.py index af53bac6f2..e596c97818 100644 --- a/sdk/python/pulumi_azure/appconfiguration/lication_load_balancer_frontend.py +++ b/sdk/python/pulumi_azure/appconfiguration/lication_load_balancer_frontend.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LicationLoadBalancerFrontendArgs', 'LicationLoadBalancerFrontend'] @@ -23,11 +23,30 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Application Gateway for Containers Frontend. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Application Gateway for Containers Frontend. """ - pulumi.set(__self__, "application_load_balancer_id", application_load_balancer_id) + LicationLoadBalancerFrontendArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_load_balancer_id=application_load_balancer_id, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_load_balancer_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_load_balancer_id is None and 'applicationLoadBalancerId' in kwargs: + application_load_balancer_id = kwargs['applicationLoadBalancerId'] + if application_load_balancer_id is None: + raise TypeError("Missing 'application_load_balancer_id' argument") + + _setter("application_load_balancer_id", application_load_balancer_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="applicationLoadBalancerId") @@ -80,14 +99,35 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Application Gateway for Containers Frontend. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Application Gateway for Containers Frontend. """ + _LicationLoadBalancerFrontendState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_load_balancer_id=application_load_balancer_id, + fully_qualified_domain_name=fully_qualified_domain_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_load_balancer_id: Optional[pulumi.Input[str]] = None, + fully_qualified_domain_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_load_balancer_id is None and 'applicationLoadBalancerId' in kwargs: + application_load_balancer_id = kwargs['applicationLoadBalancerId'] + if fully_qualified_domain_name is None and 'fullyQualifiedDomainName' in kwargs: + fully_qualified_domain_name = kwargs['fullyQualifiedDomainName'] + if application_load_balancer_id is not None: - pulumi.set(__self__, "application_load_balancer_id", application_load_balancer_id) + _setter("application_load_balancer_id", application_load_balancer_id) if fully_qualified_domain_name is not None: - pulumi.set(__self__, "fully_qualified_domain_name", fully_qualified_domain_name) + _setter("fully_qualified_domain_name", fully_qualified_domain_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="applicationLoadBalancerId") @@ -215,6 +255,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LicationLoadBalancerFrontendArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appconfiguration/outputs.py b/sdk/python/pulumi_azure/appconfiguration/outputs.py index a3db6ad690..da75efe729 100644 --- a/sdk/python/pulumi_azure/appconfiguration/outputs.py +++ b/sdk/python/pulumi_azure/appconfiguration/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -59,11 +59,30 @@ def __init__(__self__, *, :param Sequence['ConfigurationFeatureTargetingFilterGroupArgs'] groups: One or more blocks of type `groups` as defined below. :param Sequence[str] users: A list of users to target for this feature. """ - pulumi.set(__self__, "default_rollout_percentage", default_rollout_percentage) + ConfigurationFeatureTargetingFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_rollout_percentage=default_rollout_percentage, + groups=groups, + users=users, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_rollout_percentage: Optional[int] = None, + groups: Optional[Sequence['outputs.ConfigurationFeatureTargetingFilterGroup']] = None, + users: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_rollout_percentage is None and 'defaultRolloutPercentage' in kwargs: + default_rollout_percentage = kwargs['defaultRolloutPercentage'] + if default_rollout_percentage is None: + raise TypeError("Missing 'default_rollout_percentage' argument") + + _setter("default_rollout_percentage", default_rollout_percentage) if groups is not None: - pulumi.set(__self__, "groups", groups) + _setter("groups", groups) if users is not None: - pulumi.set(__self__, "users", users) + _setter("users", users) @property @pulumi.getter(name="defaultRolloutPercentage") @@ -116,8 +135,27 @@ def __init__(__self__, *, :param str name: The name of the group. :param int rollout_percentage: Rollout percentage of the group. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "rollout_percentage", rollout_percentage) + ConfigurationFeatureTargetingFilterGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + rollout_percentage=rollout_percentage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + rollout_percentage: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if rollout_percentage is None and 'rolloutPercentage' in kwargs: + rollout_percentage = kwargs['rolloutPercentage'] + if rollout_percentage is None: + raise TypeError("Missing 'rollout_percentage' argument") + + _setter("name", name) + _setter("rollout_percentage", rollout_percentage) @property @pulumi.getter @@ -145,10 +183,23 @@ def __init__(__self__, *, :param str end: The latest timestamp the feature is enabled. The timestamp must be in RFC3339 format. :param str start: The earliest timestamp the feature is enabled. The timestamp must be in RFC3339 format. """ + ConfigurationFeatureTimewindowFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + end=end, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end: Optional[str] = None, + start: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end is not None: - pulumi.set(__self__, "end", end) + _setter("end", end) if start is not None: - pulumi.set(__self__, "start", start) + _setter("start", start) @property @pulumi.getter @@ -195,10 +246,27 @@ def __init__(__self__, *, :param str identity_client_id: Specifies the client id of the identity which will be used to access key vault. :param str key_vault_key_identifier: Specifies the URI of the key vault key used to encrypt data. """ + ConfigurationStoreEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_client_id=identity_client_id, + key_vault_key_identifier=key_vault_key_identifier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_client_id: Optional[str] = None, + key_vault_key_identifier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_client_id is None and 'identityClientId' in kwargs: + identity_client_id = kwargs['identityClientId'] + if key_vault_key_identifier is None and 'keyVaultKeyIdentifier' in kwargs: + key_vault_key_identifier = kwargs['keyVaultKeyIdentifier'] + if identity_client_id is not None: - pulumi.set(__self__, "identity_client_id", identity_client_id) + _setter("identity_client_id", identity_client_id) if key_vault_key_identifier is not None: - pulumi.set(__self__, "key_vault_key_identifier", key_vault_key_identifier) + _setter("key_vault_key_identifier", key_vault_key_identifier) @property @pulumi.getter(name="identityClientId") @@ -253,13 +321,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ConfigurationStoreIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -324,12 +417,29 @@ def __init__(__self__, *, :param str id: The ID of the Access Key. :param str secret: The Secret of the Access Key. """ + ConfigurationStorePrimaryReadKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[str] = None, + id: Optional[str] = None, + secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) @property @pulumi.getter(name="connectionString") @@ -384,12 +494,29 @@ def __init__(__self__, *, :param str id: The ID of the Access Key. :param str secret: The Secret of the Access Key. """ + ConfigurationStorePrimaryWriteKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[str] = None, + id: Optional[str] = None, + secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) @property @pulumi.getter(name="connectionString") @@ -429,12 +556,33 @@ def __init__(__self__, *, :param str endpoint: The URL of the App Configuration Replica. :param str id: The ID of the Access Key. """ - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "name", name) + ConfigurationStoreReplica._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + endpoint=endpoint, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[str] = None, + name: Optional[str] = None, + endpoint: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is None: + raise TypeError("Missing 'location' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("location", location) + _setter("name", name) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -497,12 +645,29 @@ def __init__(__self__, *, :param str id: The ID of the Access Key. :param str secret: The Secret of the Access Key. """ + ConfigurationStoreSecondaryReadKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[str] = None, + id: Optional[str] = None, + secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) @property @pulumi.getter(name="connectionString") @@ -557,12 +722,29 @@ def __init__(__self__, *, :param str id: The ID of the Access Key. :param str secret: The Secret of the Access Key. """ + ConfigurationStoreSecondaryWriteKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[str] = None, + id: Optional[str] = None, + secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) @property @pulumi.getter(name="connectionString") @@ -612,15 +794,64 @@ def __init__(__self__, *, :param str value: The value of the App Configuration Key. :param str vault_key_reference: The ID of the vault secret this App Configuration Key refers to, when `type` is `vault`. """ - pulumi.set(__self__, "content_type", content_type) - pulumi.set(__self__, "etag", etag) - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "label", label) - pulumi.set(__self__, "locked", locked) - pulumi.set(__self__, "tags", tags) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) - pulumi.set(__self__, "vault_key_reference", vault_key_reference) + GetConfigurationKeysItemResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + etag=etag, + key=key, + label=label, + locked=locked, + tags=tags, + type=type, + value=value, + vault_key_reference=vault_key_reference, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[str] = None, + etag: Optional[str] = None, + key: Optional[str] = None, + label: Optional[str] = None, + locked: Optional[bool] = None, + tags: Optional[Mapping[str, str]] = None, + type: Optional[str] = None, + value: Optional[str] = None, + vault_key_reference: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if content_type is None: + raise TypeError("Missing 'content_type' argument") + if etag is None: + raise TypeError("Missing 'etag' argument") + if key is None: + raise TypeError("Missing 'key' argument") + if label is None: + raise TypeError("Missing 'label' argument") + if locked is None: + raise TypeError("Missing 'locked' argument") + if tags is None: + raise TypeError("Missing 'tags' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + if vault_key_reference is None and 'vaultKeyReference' in kwargs: + vault_key_reference = kwargs['vaultKeyReference'] + if vault_key_reference is None: + raise TypeError("Missing 'vault_key_reference' argument") + + _setter("content_type", content_type) + _setter("etag", etag) + _setter("key", key) + _setter("label", label) + _setter("locked", locked) + _setter("tags", tags) + _setter("type", type) + _setter("value", value) + _setter("vault_key_reference", vault_key_reference) @property @pulumi.getter(name="contentType") @@ -700,8 +931,29 @@ class GetConfigurationStoreEncryptionResult(dict): def __init__(__self__, *, identity_client_id: str, key_vault_key_identifier: str): - pulumi.set(__self__, "identity_client_id", identity_client_id) - pulumi.set(__self__, "key_vault_key_identifier", key_vault_key_identifier) + GetConfigurationStoreEncryptionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_client_id=identity_client_id, + key_vault_key_identifier=key_vault_key_identifier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_client_id: Optional[str] = None, + key_vault_key_identifier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_client_id is None and 'identityClientId' in kwargs: + identity_client_id = kwargs['identityClientId'] + if identity_client_id is None: + raise TypeError("Missing 'identity_client_id' argument") + if key_vault_key_identifier is None and 'keyVaultKeyIdentifier' in kwargs: + key_vault_key_identifier = kwargs['keyVaultKeyIdentifier'] + if key_vault_key_identifier is None: + raise TypeError("Missing 'key_vault_key_identifier' argument") + + _setter("identity_client_id", identity_client_id) + _setter("key_vault_key_identifier", key_vault_key_identifier) @property @pulumi.getter(name="identityClientId") @@ -721,10 +973,41 @@ def __init__(__self__, *, principal_id: str, tenant_id: str, type: str): - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetConfigurationStoreIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -758,9 +1041,32 @@ def __init__(__self__, *, :param str id: The ID of the Access Key. :param str secret: The Secret of the Access Key. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "secret", secret) + GetConfigurationStorePrimaryReadKeyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[str] = None, + id: Optional[str] = None, + secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if secret is None: + raise TypeError("Missing 'secret' argument") + + _setter("connection_string", connection_string) + _setter("id", id) + _setter("secret", secret) @property @pulumi.getter(name="connectionString") @@ -798,9 +1104,32 @@ def __init__(__self__, *, :param str id: The ID of the Access Key. :param str secret: The Secret of the Access Key. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "secret", secret) + GetConfigurationStorePrimaryWriteKeyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[str] = None, + id: Optional[str] = None, + secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if secret is None: + raise TypeError("Missing 'secret' argument") + + _setter("connection_string", connection_string) + _setter("id", id) + _setter("secret", secret) @property @pulumi.getter(name="connectionString") @@ -840,10 +1169,35 @@ def __init__(__self__, *, :param str location: The supported Azure location where the App Configuration Replica exists. :param str name: The Name of this App Configuration. """ - pulumi.set(__self__, "endpoint", endpoint) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "name", name) + GetConfigurationStoreReplicaResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint=endpoint, + id=id, + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint: Optional[str] = None, + id: Optional[str] = None, + location: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint is None: + raise TypeError("Missing 'endpoint' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if location is None: + raise TypeError("Missing 'location' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("endpoint", endpoint) + _setter("id", id) + _setter("location", location) + _setter("name", name) @property @pulumi.getter @@ -889,9 +1243,32 @@ def __init__(__self__, *, :param str id: The ID of the Access Key. :param str secret: The Secret of the Access Key. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "secret", secret) + GetConfigurationStoreSecondaryReadKeyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[str] = None, + id: Optional[str] = None, + secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if secret is None: + raise TypeError("Missing 'secret' argument") + + _setter("connection_string", connection_string) + _setter("id", id) + _setter("secret", secret) @property @pulumi.getter(name="connectionString") @@ -929,9 +1306,32 @@ def __init__(__self__, *, :param str id: The ID of the Access Key. :param str secret: The Secret of the Access Key. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "secret", secret) + GetConfigurationStoreSecondaryWriteKeyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[str] = None, + id: Optional[str] = None, + secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if secret is None: + raise TypeError("Missing 'secret' argument") + + _setter("connection_string", connection_string) + _setter("id", id) + _setter("secret", secret) @property @pulumi.getter(name="connectionString") diff --git a/sdk/python/pulumi_azure/appinsights/_inputs.py b/sdk/python/pulumi_azure/appinsights/_inputs.py index 53590f4705..9982149944 100644 --- a/sdk/python/pulumi_azure/appinsights/_inputs.py +++ b/sdk/python/pulumi_azure/appinsights/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -35,17 +35,46 @@ def __init__(__self__, *, :param pulumi.Input[str] http_verb: Which HTTP verb to use for the call. Options are 'GET', 'POST', 'PUT', 'PATCH', and 'DELETE'. :param pulumi.Input[bool] parse_dependent_requests_enabled: Should the parsing of dependend requests be enabled? Defaults to `true`. """ - pulumi.set(__self__, "url", url) + StandardWebTestRequestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + body=body, + follow_redirects_enabled=follow_redirects_enabled, + headers=headers, + http_verb=http_verb, + parse_dependent_requests_enabled=parse_dependent_requests_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[pulumi.Input[str]] = None, + body: Optional[pulumi.Input[str]] = None, + follow_redirects_enabled: Optional[pulumi.Input[bool]] = None, + headers: Optional[pulumi.Input[Sequence[pulumi.Input['StandardWebTestRequestHeaderArgs']]]] = None, + http_verb: Optional[pulumi.Input[str]] = None, + parse_dependent_requests_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + if follow_redirects_enabled is None and 'followRedirectsEnabled' in kwargs: + follow_redirects_enabled = kwargs['followRedirectsEnabled'] + if http_verb is None and 'httpVerb' in kwargs: + http_verb = kwargs['httpVerb'] + if parse_dependent_requests_enabled is None and 'parseDependentRequestsEnabled' in kwargs: + parse_dependent_requests_enabled = kwargs['parseDependentRequestsEnabled'] + + _setter("url", url) if body is not None: - pulumi.set(__self__, "body", body) + _setter("body", body) if follow_redirects_enabled is not None: - pulumi.set(__self__, "follow_redirects_enabled", follow_redirects_enabled) + _setter("follow_redirects_enabled", follow_redirects_enabled) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if http_verb is not None: - pulumi.set(__self__, "http_verb", http_verb) + _setter("http_verb", http_verb) if parse_dependent_requests_enabled is not None: - pulumi.set(__self__, "parse_dependent_requests_enabled", parse_dependent_requests_enabled) + _setter("parse_dependent_requests_enabled", parse_dependent_requests_enabled) @property @pulumi.getter @@ -129,8 +158,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for a header in the request. :param pulumi.Input[str] value: The value which should be used for a header in the request. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + StandardWebTestRequestHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -170,14 +216,37 @@ def __init__(__self__, *, :param pulumi.Input[int] ssl_cert_remaining_lifetime: The number of days of SSL certificate validity remaining for the checked endpoint. If the certificate has a shorter remaining lifetime left, the test will fail. This number should be between 1 and 365. :param pulumi.Input[bool] ssl_check_enabled: Should the SSL check be enabled? """ + StandardWebTestValidationRulesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + expected_status_code=expected_status_code, + ssl_cert_remaining_lifetime=ssl_cert_remaining_lifetime, + ssl_check_enabled=ssl_check_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input['StandardWebTestValidationRulesContentArgs']] = None, + expected_status_code: Optional[pulumi.Input[int]] = None, + ssl_cert_remaining_lifetime: Optional[pulumi.Input[int]] = None, + ssl_check_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expected_status_code is None and 'expectedStatusCode' in kwargs: + expected_status_code = kwargs['expectedStatusCode'] + if ssl_cert_remaining_lifetime is None and 'sslCertRemainingLifetime' in kwargs: + ssl_cert_remaining_lifetime = kwargs['sslCertRemainingLifetime'] + if ssl_check_enabled is None and 'sslCheckEnabled' in kwargs: + ssl_check_enabled = kwargs['sslCheckEnabled'] + if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if expected_status_code is not None: - pulumi.set(__self__, "expected_status_code", expected_status_code) + _setter("expected_status_code", expected_status_code) if ssl_cert_remaining_lifetime is not None: - pulumi.set(__self__, "ssl_cert_remaining_lifetime", ssl_cert_remaining_lifetime) + _setter("ssl_cert_remaining_lifetime", ssl_cert_remaining_lifetime) if ssl_check_enabled is not None: - pulumi.set(__self__, "ssl_check_enabled", ssl_check_enabled) + _setter("ssl_check_enabled", ssl_check_enabled) @property @pulumi.getter @@ -239,11 +308,34 @@ def __init__(__self__, *, :param pulumi.Input[bool] ignore_case: Ignore the casing in the `content_match` value. :param pulumi.Input[bool] pass_if_text_found: If the content of `content_match` is found, pass the test. If set to `false`, the WebTest is failing if the content of `content_match` is found. """ - pulumi.set(__self__, "content_match", content_match) + StandardWebTestValidationRulesContentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_match=content_match, + ignore_case=ignore_case, + pass_if_text_found=pass_if_text_found, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_match: Optional[pulumi.Input[str]] = None, + ignore_case: Optional[pulumi.Input[bool]] = None, + pass_if_text_found: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_match is None and 'contentMatch' in kwargs: + content_match = kwargs['contentMatch'] + if content_match is None: + raise TypeError("Missing 'content_match' argument") + if ignore_case is None and 'ignoreCase' in kwargs: + ignore_case = kwargs['ignoreCase'] + if pass_if_text_found is None and 'passIfTextFound' in kwargs: + pass_if_text_found = kwargs['passIfTextFound'] + + _setter("content_match", content_match) if ignore_case is not None: - pulumi.set(__self__, "ignore_case", ignore_case) + _setter("ignore_case", ignore_case) if pass_if_text_found is not None: - pulumi.set(__self__, "pass_if_text_found", pass_if_text_found) + _setter("pass_if_text_found", pass_if_text_found) @property @pulumi.getter(name="contentMatch") @@ -295,13 +387,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID of the System Assigned Managed Service Identity that is configured on this Workbook. :param pulumi.Input[str] tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Workbook. """ - pulumi.set(__self__, "type", type) + WorkbookIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -369,14 +486,39 @@ def __init__(__self__, *, > **Note:** See [documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-automate#galleries) for more information of `resource_type` and `type`. """ - pulumi.set(__self__, "category", category) - pulumi.set(__self__, "name", name) + WorkbookTemplateGalleryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + name=name, + order=order, + resource_type=resource_type, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + resource_type: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category is None: + raise TypeError("Missing 'category' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if resource_type is None and 'resourceType' in kwargs: + resource_type = kwargs['resourceType'] + + _setter("category", category) + _setter("name", name) if order is not None: - pulumi.set(__self__, "order", order) + _setter("order", order) if resource_type is not None: - pulumi.set(__self__, "resource_type", resource_type) + _setter("resource_type", resource_type) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/appinsights/analytics_item.py b/sdk/python/pulumi_azure/appinsights/analytics_item.py index 00fedbf237..e296104bb5 100644 --- a/sdk/python/pulumi_azure/appinsights/analytics_item.py +++ b/sdk/python/pulumi_azure/appinsights/analytics_item.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AnalyticsItemArgs', 'AnalyticsItem'] @@ -29,14 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] function_alias: The alias to use for the function. Required when `type` is `function`. :param pulumi.Input[str] name: Specifies the name of the Application Insights Analytics Item. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "application_insights_id", application_insights_id) - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "scope", scope) - pulumi.set(__self__, "type", type) + AnalyticsItemArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_insights_id=application_insights_id, + content=content, + scope=scope, + type=type, + function_alias=function_alias, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_insights_id: Optional[pulumi.Input[str]] = None, + content: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + function_alias: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_insights_id is None and 'applicationInsightsId' in kwargs: + application_insights_id = kwargs['applicationInsightsId'] + if application_insights_id is None: + raise TypeError("Missing 'application_insights_id' argument") + if content is None: + raise TypeError("Missing 'content' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if function_alias is None and 'functionAlias' in kwargs: + function_alias = kwargs['functionAlias'] + + _setter("application_insights_id", application_insights_id) + _setter("content", content) + _setter("scope", scope) + _setter("type", type) if function_alias is not None: - pulumi.set(__self__, "function_alias", function_alias) + _setter("function_alias", function_alias) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="applicationInsightsId") @@ -135,24 +168,59 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of Analytics Item to create. Can be one of `query`, `function`, `folder`, `recent`. Changing this forces a new resource to be created. :param pulumi.Input[str] version: A string indicating the version of the query format """ + _AnalyticsItemState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_insights_id=application_insights_id, + content=content, + function_alias=function_alias, + name=name, + scope=scope, + time_created=time_created, + time_modified=time_modified, + type=type, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_insights_id: Optional[pulumi.Input[str]] = None, + content: Optional[pulumi.Input[str]] = None, + function_alias: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + time_created: Optional[pulumi.Input[str]] = None, + time_modified: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_insights_id is None and 'applicationInsightsId' in kwargs: + application_insights_id = kwargs['applicationInsightsId'] + if function_alias is None and 'functionAlias' in kwargs: + function_alias = kwargs['functionAlias'] + if time_created is None and 'timeCreated' in kwargs: + time_created = kwargs['timeCreated'] + if time_modified is None and 'timeModified' in kwargs: + time_modified = kwargs['timeModified'] + if application_insights_id is not None: - pulumi.set(__self__, "application_insights_id", application_insights_id) + _setter("application_insights_id", application_insights_id) if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if function_alias is not None: - pulumi.set(__self__, "function_alias", function_alias) + _setter("function_alias", function_alias) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if time_created is not None: - pulumi.set(__self__, "time_created", time_created) + _setter("time_created", time_created) if time_modified is not None: - pulumi.set(__self__, "time_modified", time_modified) + _setter("time_modified", time_modified) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="applicationInsightsId") @@ -362,6 +430,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AnalyticsItemArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appinsights/api_key.py b/sdk/python/pulumi_azure/appinsights/api_key.py index 1b60dfe390..552a87b76b 100644 --- a/sdk/python/pulumi_azure/appinsights/api_key.py +++ b/sdk/python/pulumi_azure/appinsights/api_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApiKeyArgs', 'ApiKey'] @@ -27,13 +27,38 @@ def __init__(__self__, *, > **Note:** At least one read or write permission must be defined. """ - pulumi.set(__self__, "application_insights_id", application_insights_id) + ApiKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_insights_id=application_insights_id, + name=name, + read_permissions=read_permissions, + write_permissions=write_permissions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_insights_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + read_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + write_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_insights_id is None and 'applicationInsightsId' in kwargs: + application_insights_id = kwargs['applicationInsightsId'] + if application_insights_id is None: + raise TypeError("Missing 'application_insights_id' argument") + if read_permissions is None and 'readPermissions' in kwargs: + read_permissions = kwargs['readPermissions'] + if write_permissions is None and 'writePermissions' in kwargs: + write_permissions = kwargs['writePermissions'] + + _setter("application_insights_id", application_insights_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if read_permissions is not None: - pulumi.set(__self__, "read_permissions", read_permissions) + _setter("read_permissions", read_permissions) if write_permissions is not None: - pulumi.set(__self__, "write_permissions", write_permissions) + _setter("write_permissions", write_permissions) @property @pulumi.getter(name="applicationInsightsId") @@ -104,16 +129,43 @@ def __init__(__self__, *, > **Note:** At least one read or write permission must be defined. """ + _ApiKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_key=api_key, + application_insights_id=application_insights_id, + name=name, + read_permissions=read_permissions, + write_permissions=write_permissions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_key: Optional[pulumi.Input[str]] = None, + application_insights_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + read_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + write_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_key is None and 'apiKey' in kwargs: + api_key = kwargs['apiKey'] + if application_insights_id is None and 'applicationInsightsId' in kwargs: + application_insights_id = kwargs['applicationInsightsId'] + if read_permissions is None and 'readPermissions' in kwargs: + read_permissions = kwargs['readPermissions'] + if write_permissions is None and 'writePermissions' in kwargs: + write_permissions = kwargs['writePermissions'] + if api_key is not None: - pulumi.set(__self__, "api_key", api_key) + _setter("api_key", api_key) if application_insights_id is not None: - pulumi.set(__self__, "application_insights_id", application_insights_id) + _setter("application_insights_id", application_insights_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if read_permissions is not None: - pulumi.set(__self__, "read_permissions", read_permissions) + _setter("read_permissions", read_permissions) if write_permissions is not None: - pulumi.set(__self__, "write_permissions", write_permissions) + _setter("write_permissions", write_permissions) @property @pulumi.getter(name="apiKey") @@ -321,6 +373,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApiKeyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appinsights/get_insights.py b/sdk/python/pulumi_azure/appinsights/get_insights.py index 8a0433a305..b94e1791c1 100644 --- a/sdk/python/pulumi_azure/appinsights/get_insights.py +++ b/sdk/python/pulumi_azure/appinsights/get_insights.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/appinsights/insights.py b/sdk/python/pulumi_azure/appinsights/insights.py index ff26abb32a..8fbed1e8bc 100644 --- a/sdk/python/pulumi_azure/appinsights/insights.py +++ b/sdk/python/pulumi_azure/appinsights/insights.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['InsightsArgs', 'Insights'] @@ -49,34 +49,101 @@ def __init__(__self__, *, > **NOTE:** This can not be removed after set. More details can be found at [Migrate to workspace-based Application Insights resources](https://docs.microsoft.com/azure/azure-monitor/app/convert-classic-resource#migration-process) """ - pulumi.set(__self__, "application_type", application_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) + InsightsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_type=application_type, + resource_group_name=resource_group_name, + daily_data_cap_in_gb=daily_data_cap_in_gb, + daily_data_cap_notifications_disabled=daily_data_cap_notifications_disabled, + disable_ip_masking=disable_ip_masking, + force_customer_storage_for_profiler=force_customer_storage_for_profiler, + internet_ingestion_enabled=internet_ingestion_enabled, + internet_query_enabled=internet_query_enabled, + local_authentication_disabled=local_authentication_disabled, + location=location, + name=name, + retention_in_days=retention_in_days, + sampling_percentage=sampling_percentage, + tags=tags, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + daily_data_cap_in_gb: Optional[pulumi.Input[float]] = None, + daily_data_cap_notifications_disabled: Optional[pulumi.Input[bool]] = None, + disable_ip_masking: Optional[pulumi.Input[bool]] = None, + force_customer_storage_for_profiler: Optional[pulumi.Input[bool]] = None, + internet_ingestion_enabled: Optional[pulumi.Input[bool]] = None, + internet_query_enabled: Optional[pulumi.Input[bool]] = None, + local_authentication_disabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + sampling_percentage: Optional[pulumi.Input[float]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_type is None and 'applicationType' in kwargs: + application_type = kwargs['applicationType'] + if application_type is None: + raise TypeError("Missing 'application_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if daily_data_cap_in_gb is None and 'dailyDataCapInGb' in kwargs: + daily_data_cap_in_gb = kwargs['dailyDataCapInGb'] + if daily_data_cap_notifications_disabled is None and 'dailyDataCapNotificationsDisabled' in kwargs: + daily_data_cap_notifications_disabled = kwargs['dailyDataCapNotificationsDisabled'] + if disable_ip_masking is None and 'disableIpMasking' in kwargs: + disable_ip_masking = kwargs['disableIpMasking'] + if force_customer_storage_for_profiler is None and 'forceCustomerStorageForProfiler' in kwargs: + force_customer_storage_for_profiler = kwargs['forceCustomerStorageForProfiler'] + if internet_ingestion_enabled is None and 'internetIngestionEnabled' in kwargs: + internet_ingestion_enabled = kwargs['internetIngestionEnabled'] + if internet_query_enabled is None and 'internetQueryEnabled' in kwargs: + internet_query_enabled = kwargs['internetQueryEnabled'] + if local_authentication_disabled is None and 'localAuthenticationDisabled' in kwargs: + local_authentication_disabled = kwargs['localAuthenticationDisabled'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if sampling_percentage is None and 'samplingPercentage' in kwargs: + sampling_percentage = kwargs['samplingPercentage'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + + _setter("application_type", application_type) + _setter("resource_group_name", resource_group_name) if daily_data_cap_in_gb is not None: - pulumi.set(__self__, "daily_data_cap_in_gb", daily_data_cap_in_gb) + _setter("daily_data_cap_in_gb", daily_data_cap_in_gb) if daily_data_cap_notifications_disabled is not None: - pulumi.set(__self__, "daily_data_cap_notifications_disabled", daily_data_cap_notifications_disabled) + _setter("daily_data_cap_notifications_disabled", daily_data_cap_notifications_disabled) if disable_ip_masking is not None: - pulumi.set(__self__, "disable_ip_masking", disable_ip_masking) + _setter("disable_ip_masking", disable_ip_masking) if force_customer_storage_for_profiler is not None: - pulumi.set(__self__, "force_customer_storage_for_profiler", force_customer_storage_for_profiler) + _setter("force_customer_storage_for_profiler", force_customer_storage_for_profiler) if internet_ingestion_enabled is not None: - pulumi.set(__self__, "internet_ingestion_enabled", internet_ingestion_enabled) + _setter("internet_ingestion_enabled", internet_ingestion_enabled) if internet_query_enabled is not None: - pulumi.set(__self__, "internet_query_enabled", internet_query_enabled) + _setter("internet_query_enabled", internet_query_enabled) if local_authentication_disabled is not None: - pulumi.set(__self__, "local_authentication_disabled", local_authentication_disabled) + _setter("local_authentication_disabled", local_authentication_disabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) if sampling_percentage is not None: - pulumi.set(__self__, "sampling_percentage", sampling_percentage) + _setter("sampling_percentage", sampling_percentage) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="applicationType") @@ -305,42 +372,117 @@ def __init__(__self__, *, > **NOTE:** This can not be removed after set. More details can be found at [Migrate to workspace-based Application Insights resources](https://docs.microsoft.com/azure/azure-monitor/app/convert-classic-resource#migration-process) """ + _InsightsState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + application_type=application_type, + connection_string=connection_string, + daily_data_cap_in_gb=daily_data_cap_in_gb, + daily_data_cap_notifications_disabled=daily_data_cap_notifications_disabled, + disable_ip_masking=disable_ip_masking, + force_customer_storage_for_profiler=force_customer_storage_for_profiler, + instrumentation_key=instrumentation_key, + internet_ingestion_enabled=internet_ingestion_enabled, + internet_query_enabled=internet_query_enabled, + local_authentication_disabled=local_authentication_disabled, + location=location, + name=name, + resource_group_name=resource_group_name, + retention_in_days=retention_in_days, + sampling_percentage=sampling_percentage, + tags=tags, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + application_type: Optional[pulumi.Input[str]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + daily_data_cap_in_gb: Optional[pulumi.Input[float]] = None, + daily_data_cap_notifications_disabled: Optional[pulumi.Input[bool]] = None, + disable_ip_masking: Optional[pulumi.Input[bool]] = None, + force_customer_storage_for_profiler: Optional[pulumi.Input[bool]] = None, + instrumentation_key: Optional[pulumi.Input[str]] = None, + internet_ingestion_enabled: Optional[pulumi.Input[bool]] = None, + internet_query_enabled: Optional[pulumi.Input[bool]] = None, + local_authentication_disabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + sampling_percentage: Optional[pulumi.Input[float]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if application_type is None and 'applicationType' in kwargs: + application_type = kwargs['applicationType'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if daily_data_cap_in_gb is None and 'dailyDataCapInGb' in kwargs: + daily_data_cap_in_gb = kwargs['dailyDataCapInGb'] + if daily_data_cap_notifications_disabled is None and 'dailyDataCapNotificationsDisabled' in kwargs: + daily_data_cap_notifications_disabled = kwargs['dailyDataCapNotificationsDisabled'] + if disable_ip_masking is None and 'disableIpMasking' in kwargs: + disable_ip_masking = kwargs['disableIpMasking'] + if force_customer_storage_for_profiler is None and 'forceCustomerStorageForProfiler' in kwargs: + force_customer_storage_for_profiler = kwargs['forceCustomerStorageForProfiler'] + if instrumentation_key is None and 'instrumentationKey' in kwargs: + instrumentation_key = kwargs['instrumentationKey'] + if internet_ingestion_enabled is None and 'internetIngestionEnabled' in kwargs: + internet_ingestion_enabled = kwargs['internetIngestionEnabled'] + if internet_query_enabled is None and 'internetQueryEnabled' in kwargs: + internet_query_enabled = kwargs['internetQueryEnabled'] + if local_authentication_disabled is None and 'localAuthenticationDisabled' in kwargs: + local_authentication_disabled = kwargs['localAuthenticationDisabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if sampling_percentage is None and 'samplingPercentage' in kwargs: + sampling_percentage = kwargs['samplingPercentage'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if app_id is not None: - pulumi.set(__self__, "app_id", app_id) + _setter("app_id", app_id) if application_type is not None: - pulumi.set(__self__, "application_type", application_type) + _setter("application_type", application_type) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if daily_data_cap_in_gb is not None: - pulumi.set(__self__, "daily_data_cap_in_gb", daily_data_cap_in_gb) + _setter("daily_data_cap_in_gb", daily_data_cap_in_gb) if daily_data_cap_notifications_disabled is not None: - pulumi.set(__self__, "daily_data_cap_notifications_disabled", daily_data_cap_notifications_disabled) + _setter("daily_data_cap_notifications_disabled", daily_data_cap_notifications_disabled) if disable_ip_masking is not None: - pulumi.set(__self__, "disable_ip_masking", disable_ip_masking) + _setter("disable_ip_masking", disable_ip_masking) if force_customer_storage_for_profiler is not None: - pulumi.set(__self__, "force_customer_storage_for_profiler", force_customer_storage_for_profiler) + _setter("force_customer_storage_for_profiler", force_customer_storage_for_profiler) if instrumentation_key is not None: - pulumi.set(__self__, "instrumentation_key", instrumentation_key) + _setter("instrumentation_key", instrumentation_key) if internet_ingestion_enabled is not None: - pulumi.set(__self__, "internet_ingestion_enabled", internet_ingestion_enabled) + _setter("internet_ingestion_enabled", internet_ingestion_enabled) if internet_query_enabled is not None: - pulumi.set(__self__, "internet_query_enabled", internet_query_enabled) + _setter("internet_query_enabled", internet_query_enabled) if local_authentication_disabled is not None: - pulumi.set(__self__, "local_authentication_disabled", local_authentication_disabled) + _setter("local_authentication_disabled", local_authentication_disabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) if sampling_percentage is not None: - pulumi.set(__self__, "sampling_percentage", sampling_percentage) + _setter("sampling_percentage", sampling_percentage) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="appId") @@ -710,6 +852,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + InsightsArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appinsights/outputs.py b/sdk/python/pulumi_azure/appinsights/outputs.py index ee055ba488..104514d56e 100644 --- a/sdk/python/pulumi_azure/appinsights/outputs.py +++ b/sdk/python/pulumi_azure/appinsights/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -57,17 +57,46 @@ def __init__(__self__, *, :param str http_verb: Which HTTP verb to use for the call. Options are 'GET', 'POST', 'PUT', 'PATCH', and 'DELETE'. :param bool parse_dependent_requests_enabled: Should the parsing of dependend requests be enabled? Defaults to `true`. """ - pulumi.set(__self__, "url", url) + StandardWebTestRequest._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + body=body, + follow_redirects_enabled=follow_redirects_enabled, + headers=headers, + http_verb=http_verb, + parse_dependent_requests_enabled=parse_dependent_requests_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[str] = None, + body: Optional[str] = None, + follow_redirects_enabled: Optional[bool] = None, + headers: Optional[Sequence['outputs.StandardWebTestRequestHeader']] = None, + http_verb: Optional[str] = None, + parse_dependent_requests_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + if follow_redirects_enabled is None and 'followRedirectsEnabled' in kwargs: + follow_redirects_enabled = kwargs['followRedirectsEnabled'] + if http_verb is None and 'httpVerb' in kwargs: + http_verb = kwargs['httpVerb'] + if parse_dependent_requests_enabled is None and 'parseDependentRequestsEnabled' in kwargs: + parse_dependent_requests_enabled = kwargs['parseDependentRequestsEnabled'] + + _setter("url", url) if body is not None: - pulumi.set(__self__, "body", body) + _setter("body", body) if follow_redirects_enabled is not None: - pulumi.set(__self__, "follow_redirects_enabled", follow_redirects_enabled) + _setter("follow_redirects_enabled", follow_redirects_enabled) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if http_verb is not None: - pulumi.set(__self__, "http_verb", http_verb) + _setter("http_verb", http_verb) if parse_dependent_requests_enabled is not None: - pulumi.set(__self__, "parse_dependent_requests_enabled", parse_dependent_requests_enabled) + _setter("parse_dependent_requests_enabled", parse_dependent_requests_enabled) @property @pulumi.getter @@ -127,8 +156,25 @@ def __init__(__self__, *, :param str name: The name which should be used for a header in the request. :param str value: The value which should be used for a header in the request. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + StandardWebTestRequestHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -181,14 +227,37 @@ def __init__(__self__, *, :param int ssl_cert_remaining_lifetime: The number of days of SSL certificate validity remaining for the checked endpoint. If the certificate has a shorter remaining lifetime left, the test will fail. This number should be between 1 and 365. :param bool ssl_check_enabled: Should the SSL check be enabled? """ + StandardWebTestValidationRules._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + expected_status_code=expected_status_code, + ssl_cert_remaining_lifetime=ssl_cert_remaining_lifetime, + ssl_check_enabled=ssl_check_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional['outputs.StandardWebTestValidationRulesContent'] = None, + expected_status_code: Optional[int] = None, + ssl_cert_remaining_lifetime: Optional[int] = None, + ssl_check_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expected_status_code is None and 'expectedStatusCode' in kwargs: + expected_status_code = kwargs['expectedStatusCode'] + if ssl_cert_remaining_lifetime is None and 'sslCertRemainingLifetime' in kwargs: + ssl_cert_remaining_lifetime = kwargs['sslCertRemainingLifetime'] + if ssl_check_enabled is None and 'sslCheckEnabled' in kwargs: + ssl_check_enabled = kwargs['sslCheckEnabled'] + if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if expected_status_code is not None: - pulumi.set(__self__, "expected_status_code", expected_status_code) + _setter("expected_status_code", expected_status_code) if ssl_cert_remaining_lifetime is not None: - pulumi.set(__self__, "ssl_cert_remaining_lifetime", ssl_cert_remaining_lifetime) + _setter("ssl_cert_remaining_lifetime", ssl_cert_remaining_lifetime) if ssl_check_enabled is not None: - pulumi.set(__self__, "ssl_check_enabled", ssl_check_enabled) + _setter("ssl_check_enabled", ssl_check_enabled) @property @pulumi.getter @@ -255,11 +324,34 @@ def __init__(__self__, *, :param bool ignore_case: Ignore the casing in the `content_match` value. :param bool pass_if_text_found: If the content of `content_match` is found, pass the test. If set to `false`, the WebTest is failing if the content of `content_match` is found. """ - pulumi.set(__self__, "content_match", content_match) + StandardWebTestValidationRulesContent._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_match=content_match, + ignore_case=ignore_case, + pass_if_text_found=pass_if_text_found, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_match: Optional[str] = None, + ignore_case: Optional[bool] = None, + pass_if_text_found: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_match is None and 'contentMatch' in kwargs: + content_match = kwargs['contentMatch'] + if content_match is None: + raise TypeError("Missing 'content_match' argument") + if ignore_case is None and 'ignoreCase' in kwargs: + ignore_case = kwargs['ignoreCase'] + if pass_if_text_found is None and 'passIfTextFound' in kwargs: + pass_if_text_found = kwargs['passIfTextFound'] + + _setter("content_match", content_match) if ignore_case is not None: - pulumi.set(__self__, "ignore_case", ignore_case) + _setter("ignore_case", ignore_case) if pass_if_text_found is not None: - pulumi.set(__self__, "pass_if_text_found", pass_if_text_found) + _setter("pass_if_text_found", pass_if_text_found) @property @pulumi.getter(name="contentMatch") @@ -320,13 +412,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID of the System Assigned Managed Service Identity that is configured on this Workbook. :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Workbook. """ - pulumi.set(__self__, "type", type) + WorkbookIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -395,14 +512,39 @@ def __init__(__self__, *, > **Note:** See [documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-automate#galleries) for more information of `resource_type` and `type`. """ - pulumi.set(__self__, "category", category) - pulumi.set(__self__, "name", name) + WorkbookTemplateGallery._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + name=name, + order=order, + resource_type=resource_type, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[str] = None, + name: Optional[str] = None, + order: Optional[int] = None, + resource_type: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category is None: + raise TypeError("Missing 'category' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if resource_type is None and 'resourceType' in kwargs: + resource_type = kwargs['resourceType'] + + _setter("category", category) + _setter("name", name) if order is not None: - pulumi.set(__self__, "order", order) + _setter("order", order) if resource_type is not None: - pulumi.set(__self__, "resource_type", resource_type) + _setter("resource_type", resource_type) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/appinsights/smart_detection_rule.py b/sdk/python/pulumi_azure/appinsights/smart_detection_rule.py index cc51020bbe..77ea90751b 100644 --- a/sdk/python/pulumi_azure/appinsights/smart_detection_rule.py +++ b/sdk/python/pulumi_azure/appinsights/smart_detection_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SmartDetectionRuleArgs', 'SmartDetectionRule'] @@ -29,15 +29,42 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Application Insights Smart Detection Rule. Valid values include `Slow page load time`, `Slow server response time`, `Long dependency duration`, `Degradation in server response time`, `Degradation in dependency duration`, `Degradation in trace severity ratio`, `Abnormal rise in exception volume`, `Potential memory leak detected`, `Potential security issue detected` and `Abnormal rise in daily data volume`, `Long dependency duration`, `Degradation in server response time`, `Degradation in dependency duration`, `Degradation in trace severity ratio`, `Abnormal rise in exception volume`, `Potential memory leak detected`, `Potential security issue detected`, `Abnormal rise in daily data volume`. Changing this forces a new resource to be created. :param pulumi.Input[bool] send_emails_to_subscription_owners: Do emails get sent to subscription owners? Defaults to `true`. """ - pulumi.set(__self__, "application_insights_id", application_insights_id) + SmartDetectionRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_insights_id=application_insights_id, + additional_email_recipients=additional_email_recipients, + enabled=enabled, + name=name, + send_emails_to_subscription_owners=send_emails_to_subscription_owners, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_insights_id: Optional[pulumi.Input[str]] = None, + additional_email_recipients: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send_emails_to_subscription_owners: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_insights_id is None and 'applicationInsightsId' in kwargs: + application_insights_id = kwargs['applicationInsightsId'] + if application_insights_id is None: + raise TypeError("Missing 'application_insights_id' argument") + if additional_email_recipients is None and 'additionalEmailRecipients' in kwargs: + additional_email_recipients = kwargs['additionalEmailRecipients'] + if send_emails_to_subscription_owners is None and 'sendEmailsToSubscriptionOwners' in kwargs: + send_emails_to_subscription_owners = kwargs['sendEmailsToSubscriptionOwners'] + + _setter("application_insights_id", application_insights_id) if additional_email_recipients is not None: - pulumi.set(__self__, "additional_email_recipients", additional_email_recipients) + _setter("additional_email_recipients", additional_email_recipients) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send_emails_to_subscription_owners is not None: - pulumi.set(__self__, "send_emails_to_subscription_owners", send_emails_to_subscription_owners) + _setter("send_emails_to_subscription_owners", send_emails_to_subscription_owners) @property @pulumi.getter(name="applicationInsightsId") @@ -120,16 +147,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Application Insights Smart Detection Rule. Valid values include `Slow page load time`, `Slow server response time`, `Long dependency duration`, `Degradation in server response time`, `Degradation in dependency duration`, `Degradation in trace severity ratio`, `Abnormal rise in exception volume`, `Potential memory leak detected`, `Potential security issue detected` and `Abnormal rise in daily data volume`, `Long dependency duration`, `Degradation in server response time`, `Degradation in dependency duration`, `Degradation in trace severity ratio`, `Abnormal rise in exception volume`, `Potential memory leak detected`, `Potential security issue detected`, `Abnormal rise in daily data volume`. Changing this forces a new resource to be created. :param pulumi.Input[bool] send_emails_to_subscription_owners: Do emails get sent to subscription owners? Defaults to `true`. """ + _SmartDetectionRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_email_recipients=additional_email_recipients, + application_insights_id=application_insights_id, + enabled=enabled, + name=name, + send_emails_to_subscription_owners=send_emails_to_subscription_owners, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_email_recipients: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + application_insights_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send_emails_to_subscription_owners: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_email_recipients is None and 'additionalEmailRecipients' in kwargs: + additional_email_recipients = kwargs['additionalEmailRecipients'] + if application_insights_id is None and 'applicationInsightsId' in kwargs: + application_insights_id = kwargs['applicationInsightsId'] + if send_emails_to_subscription_owners is None and 'sendEmailsToSubscriptionOwners' in kwargs: + send_emails_to_subscription_owners = kwargs['sendEmailsToSubscriptionOwners'] + if additional_email_recipients is not None: - pulumi.set(__self__, "additional_email_recipients", additional_email_recipients) + _setter("additional_email_recipients", additional_email_recipients) if application_insights_id is not None: - pulumi.set(__self__, "application_insights_id", application_insights_id) + _setter("application_insights_id", application_insights_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send_emails_to_subscription_owners is not None: - pulumi.set(__self__, "send_emails_to_subscription_owners", send_emails_to_subscription_owners) + _setter("send_emails_to_subscription_owners", send_emails_to_subscription_owners) @property @pulumi.getter(name="additionalEmailRecipients") @@ -285,6 +337,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SmartDetectionRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appinsights/standard_web_test.py b/sdk/python/pulumi_azure/appinsights/standard_web_test.py index fc6d6ad5da..c3c02d02df 100644 --- a/sdk/python/pulumi_azure/appinsights/standard_web_test.py +++ b/sdk/python/pulumi_azure/appinsights/standard_web_test.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,28 +47,81 @@ def __init__(__self__, *, :param pulumi.Input[int] timeout: Seconds until this WebTest will timeout and fail. Default is `30`. :param pulumi.Input['StandardWebTestValidationRulesArgs'] validation_rules: A `validation_rules` block as defined below. """ - pulumi.set(__self__, "application_insights_id", application_insights_id) - pulumi.set(__self__, "geo_locations", geo_locations) - pulumi.set(__self__, "request", request) - pulumi.set(__self__, "resource_group_name", resource_group_name) + StandardWebTestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_insights_id=application_insights_id, + geo_locations=geo_locations, + request=request, + resource_group_name=resource_group_name, + description=description, + enabled=enabled, + frequency=frequency, + location=location, + name=name, + retry_enabled=retry_enabled, + tags=tags, + timeout=timeout, + validation_rules=validation_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_insights_id: Optional[pulumi.Input[str]] = None, + geo_locations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + request: Optional[pulumi.Input['StandardWebTestRequestArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + frequency: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + retry_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timeout: Optional[pulumi.Input[int]] = None, + validation_rules: Optional[pulumi.Input['StandardWebTestValidationRulesArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_insights_id is None and 'applicationInsightsId' in kwargs: + application_insights_id = kwargs['applicationInsightsId'] + if application_insights_id is None: + raise TypeError("Missing 'application_insights_id' argument") + if geo_locations is None and 'geoLocations' in kwargs: + geo_locations = kwargs['geoLocations'] + if geo_locations is None: + raise TypeError("Missing 'geo_locations' argument") + if request is None: + raise TypeError("Missing 'request' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if retry_enabled is None and 'retryEnabled' in kwargs: + retry_enabled = kwargs['retryEnabled'] + if validation_rules is None and 'validationRules' in kwargs: + validation_rules = kwargs['validationRules'] + + _setter("application_insights_id", application_insights_id) + _setter("geo_locations", geo_locations) + _setter("request", request) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retry_enabled is not None: - pulumi.set(__self__, "retry_enabled", retry_enabled) + _setter("retry_enabled", retry_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) if validation_rules is not None: - pulumi.set(__self__, "validation_rules", validation_rules) + _setter("validation_rules", validation_rules) @property @pulumi.getter(name="applicationInsightsId") @@ -265,34 +318,83 @@ def __init__(__self__, *, :param pulumi.Input[int] timeout: Seconds until this WebTest will timeout and fail. Default is `30`. :param pulumi.Input['StandardWebTestValidationRulesArgs'] validation_rules: A `validation_rules` block as defined below. """ + _StandardWebTestState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_insights_id=application_insights_id, + description=description, + enabled=enabled, + frequency=frequency, + geo_locations=geo_locations, + location=location, + name=name, + request=request, + resource_group_name=resource_group_name, + retry_enabled=retry_enabled, + synthetic_monitor_id=synthetic_monitor_id, + tags=tags, + timeout=timeout, + validation_rules=validation_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_insights_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + frequency: Optional[pulumi.Input[int]] = None, + geo_locations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + request: Optional[pulumi.Input['StandardWebTestRequestArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retry_enabled: Optional[pulumi.Input[bool]] = None, + synthetic_monitor_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timeout: Optional[pulumi.Input[int]] = None, + validation_rules: Optional[pulumi.Input['StandardWebTestValidationRulesArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_insights_id is None and 'applicationInsightsId' in kwargs: + application_insights_id = kwargs['applicationInsightsId'] + if geo_locations is None and 'geoLocations' in kwargs: + geo_locations = kwargs['geoLocations'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retry_enabled is None and 'retryEnabled' in kwargs: + retry_enabled = kwargs['retryEnabled'] + if synthetic_monitor_id is None and 'syntheticMonitorId' in kwargs: + synthetic_monitor_id = kwargs['syntheticMonitorId'] + if validation_rules is None and 'validationRules' in kwargs: + validation_rules = kwargs['validationRules'] + if application_insights_id is not None: - pulumi.set(__self__, "application_insights_id", application_insights_id) + _setter("application_insights_id", application_insights_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if geo_locations is not None: - pulumi.set(__self__, "geo_locations", geo_locations) + _setter("geo_locations", geo_locations) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if request is not None: - pulumi.set(__self__, "request", request) + _setter("request", request) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retry_enabled is not None: - pulumi.set(__self__, "retry_enabled", retry_enabled) + _setter("retry_enabled", retry_enabled) if synthetic_monitor_id is not None: - pulumi.set(__self__, "synthetic_monitor_id", synthetic_monitor_id) + _setter("synthetic_monitor_id", synthetic_monitor_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) if validation_rules is not None: - pulumi.set(__self__, "validation_rules", validation_rules) + _setter("validation_rules", validation_rules) @property @pulumi.getter(name="applicationInsightsId") @@ -582,6 +684,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StandardWebTestArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -620,6 +726,11 @@ def _internal_init(__self__, __props__.__dict__["geo_locations"] = geo_locations __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if request is not None and not isinstance(request, StandardWebTestRequestArgs): + request = request or {} + def _setter(key, value): + request[key] = value + StandardWebTestRequestArgs._configure(_setter, **request) if request is None and not opts.urn: raise TypeError("Missing required property 'request'") __props__.__dict__["request"] = request @@ -629,6 +740,11 @@ def _internal_init(__self__, __props__.__dict__["retry_enabled"] = retry_enabled __props__.__dict__["tags"] = tags __props__.__dict__["timeout"] = timeout + if validation_rules is not None and not isinstance(validation_rules, StandardWebTestValidationRulesArgs): + validation_rules = validation_rules or {} + def _setter(key, value): + validation_rules[key] = value + StandardWebTestValidationRulesArgs._configure(_setter, **validation_rules) __props__.__dict__["validation_rules"] = validation_rules __props__.__dict__["synthetic_monitor_id"] = None super(StandardWebTest, __self__).__init__( diff --git a/sdk/python/pulumi_azure/appinsights/web_test.py b/sdk/python/pulumi_azure/appinsights/web_test.py index 50ff037f91..5f5f1eafe6 100644 --- a/sdk/python/pulumi_azure/appinsights/web_test.py +++ b/sdk/python/pulumi_azure/appinsights/web_test.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WebTestArgs', 'WebTest'] @@ -45,27 +45,80 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[int] timeout: Seconds until this WebTest will timeout and fail. Default is `30`. """ - pulumi.set(__self__, "application_insights_id", application_insights_id) - pulumi.set(__self__, "configuration", configuration) - pulumi.set(__self__, "geo_locations", geo_locations) - pulumi.set(__self__, "kind", kind) - pulumi.set(__self__, "resource_group_name", resource_group_name) + WebTestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_insights_id=application_insights_id, + configuration=configuration, + geo_locations=geo_locations, + kind=kind, + resource_group_name=resource_group_name, + description=description, + enabled=enabled, + frequency=frequency, + location=location, + name=name, + retry_enabled=retry_enabled, + tags=tags, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_insights_id: Optional[pulumi.Input[str]] = None, + configuration: Optional[pulumi.Input[str]] = None, + geo_locations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + kind: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + frequency: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + retry_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timeout: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_insights_id is None and 'applicationInsightsId' in kwargs: + application_insights_id = kwargs['applicationInsightsId'] + if application_insights_id is None: + raise TypeError("Missing 'application_insights_id' argument") + if configuration is None: + raise TypeError("Missing 'configuration' argument") + if geo_locations is None and 'geoLocations' in kwargs: + geo_locations = kwargs['geoLocations'] + if geo_locations is None: + raise TypeError("Missing 'geo_locations' argument") + if kind is None: + raise TypeError("Missing 'kind' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if retry_enabled is None and 'retryEnabled' in kwargs: + retry_enabled = kwargs['retryEnabled'] + + _setter("application_insights_id", application_insights_id) + _setter("configuration", configuration) + _setter("geo_locations", geo_locations) + _setter("kind", kind) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retry_enabled is not None: - pulumi.set(__self__, "retry_enabled", retry_enabled) + _setter("retry_enabled", retry_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter(name="applicationInsightsId") @@ -261,34 +314,81 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[int] timeout: Seconds until this WebTest will timeout and fail. Default is `30`. """ + _WebTestState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_insights_id=application_insights_id, + configuration=configuration, + description=description, + enabled=enabled, + frequency=frequency, + geo_locations=geo_locations, + kind=kind, + location=location, + name=name, + resource_group_name=resource_group_name, + retry_enabled=retry_enabled, + synthetic_monitor_id=synthetic_monitor_id, + tags=tags, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_insights_id: Optional[pulumi.Input[str]] = None, + configuration: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + frequency: Optional[pulumi.Input[int]] = None, + geo_locations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retry_enabled: Optional[pulumi.Input[bool]] = None, + synthetic_monitor_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timeout: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_insights_id is None and 'applicationInsightsId' in kwargs: + application_insights_id = kwargs['applicationInsightsId'] + if geo_locations is None and 'geoLocations' in kwargs: + geo_locations = kwargs['geoLocations'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retry_enabled is None and 'retryEnabled' in kwargs: + retry_enabled = kwargs['retryEnabled'] + if synthetic_monitor_id is None and 'syntheticMonitorId' in kwargs: + synthetic_monitor_id = kwargs['syntheticMonitorId'] + if application_insights_id is not None: - pulumi.set(__self__, "application_insights_id", application_insights_id) + _setter("application_insights_id", application_insights_id) if configuration is not None: - pulumi.set(__self__, "configuration", configuration) + _setter("configuration", configuration) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if geo_locations is not None: - pulumi.set(__self__, "geo_locations", geo_locations) + _setter("geo_locations", geo_locations) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retry_enabled is not None: - pulumi.set(__self__, "retry_enabled", retry_enabled) + _setter("retry_enabled", retry_enabled) if synthetic_monitor_id is not None: - pulumi.set(__self__, "synthetic_monitor_id", synthetic_monitor_id) + _setter("synthetic_monitor_id", synthetic_monitor_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter(name="applicationInsightsId") @@ -599,6 +699,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WebTestArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appinsights/workbook.py b/sdk/python/pulumi_azure/appinsights/workbook.py index 03f37b93a8..9e6658537c 100644 --- a/sdk/python/pulumi_azure/appinsights/workbook.py +++ b/sdk/python/pulumi_azure/appinsights/workbook.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,25 +43,72 @@ def __init__(__self__, *, > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resource_manager_id`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Workbook. """ - pulumi.set(__self__, "data_json", data_json) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + WorkbookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_json=data_json, + display_name=display_name, + resource_group_name=resource_group_name, + category=category, + description=description, + identity=identity, + location=location, + name=name, + source_id=source_id, + storage_container_id=storage_container_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_json: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + category: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['WorkbookIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + source_id: Optional[pulumi.Input[str]] = None, + storage_container_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_json is None and 'dataJson' in kwargs: + data_json = kwargs['dataJson'] + if data_json is None: + raise TypeError("Missing 'data_json' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if source_id is None and 'sourceId' in kwargs: + source_id = kwargs['sourceId'] + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + + _setter("data_json", data_json) + _setter("display_name", display_name) + _setter("resource_group_name", resource_group_name) if category is not None: - pulumi.set(__self__, "category", category) + _setter("category", category) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if source_id is not None: - pulumi.set(__self__, "source_id", source_id) + _setter("source_id", source_id) if storage_container_id is not None: - pulumi.set(__self__, "storage_container_id", storage_container_id) + _setter("storage_container_id", storage_container_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dataJson") @@ -228,28 +275,69 @@ def __init__(__self__, *, > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resource_manager_id`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Workbook. """ + _WorkbookState._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + data_json=data_json, + description=description, + display_name=display_name, + identity=identity, + location=location, + name=name, + resource_group_name=resource_group_name, + source_id=source_id, + storage_container_id=storage_container_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[pulumi.Input[str]] = None, + data_json: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['WorkbookIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source_id: Optional[pulumi.Input[str]] = None, + storage_container_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_json is None and 'dataJson' in kwargs: + data_json = kwargs['dataJson'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if source_id is None and 'sourceId' in kwargs: + source_id = kwargs['sourceId'] + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if category is not None: - pulumi.set(__self__, "category", category) + _setter("category", category) if data_json is not None: - pulumi.set(__self__, "data_json", data_json) + _setter("data_json", data_json) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if source_id is not None: - pulumi.set(__self__, "source_id", source_id) + _setter("source_id", source_id) if storage_container_id is not None: - pulumi.set(__self__, "storage_container_id", storage_container_id) + _setter("storage_container_id", storage_container_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -515,6 +603,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkbookArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -548,6 +640,11 @@ def _internal_init(__self__, if display_name is None and not opts.urn: raise TypeError("Missing required property 'display_name'") __props__.__dict__["display_name"] = display_name + if identity is not None and not isinstance(identity, WorkbookIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + WorkbookIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/appinsights/workbook_template.py b/sdk/python/pulumi_azure/appinsights/workbook_template.py index aff129218b..d60ffe8b2e 100644 --- a/sdk/python/pulumi_azure/appinsights/workbook_template.py +++ b/sdk/python/pulumi_azure/appinsights/workbook_template.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,21 +37,58 @@ def __init__(__self__, *, :param pulumi.Input[int] priority: Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode. Defaults to `0`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Application Insights Workbook Template. """ - pulumi.set(__self__, "galleries", galleries) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "template_data", template_data) + WorkbookTemplateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + galleries=galleries, + resource_group_name=resource_group_name, + template_data=template_data, + author=author, + localized=localized, + location=location, + name=name, + priority=priority, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + galleries: Optional[pulumi.Input[Sequence[pulumi.Input['WorkbookTemplateGalleryArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + template_data: Optional[pulumi.Input[str]] = None, + author: Optional[pulumi.Input[str]] = None, + localized: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if galleries is None: + raise TypeError("Missing 'galleries' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if template_data is None and 'templateData' in kwargs: + template_data = kwargs['templateData'] + if template_data is None: + raise TypeError("Missing 'template_data' argument") + + _setter("galleries", galleries) + _setter("resource_group_name", resource_group_name) + _setter("template_data", template_data) if author is not None: - pulumi.set(__self__, "author", author) + _setter("author", author) if localized is not None: - pulumi.set(__self__, "localized", localized) + _setter("localized", localized) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -186,24 +223,55 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Application Insights Workbook Template. :param pulumi.Input[str] template_data: Valid JSON object containing workbook template payload. """ + _WorkbookTemplateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + author=author, + galleries=galleries, + localized=localized, + location=location, + name=name, + priority=priority, + resource_group_name=resource_group_name, + tags=tags, + template_data=template_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + author: Optional[pulumi.Input[str]] = None, + galleries: Optional[pulumi.Input[Sequence[pulumi.Input['WorkbookTemplateGalleryArgs']]]] = None, + localized: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + template_data: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if template_data is None and 'templateData' in kwargs: + template_data = kwargs['templateData'] + if author is not None: - pulumi.set(__self__, "author", author) + _setter("author", author) if galleries is not None: - pulumi.set(__self__, "galleries", galleries) + _setter("galleries", galleries) if localized is not None: - pulumi.set(__self__, "localized", localized) + _setter("localized", localized) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if template_data is not None: - pulumi.set(__self__, "template_data", template_data) + _setter("template_data", template_data) @property @pulumi.getter @@ -511,6 +579,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkbookTemplateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appplatform/_inputs.py b/sdk/python/pulumi_azure/appplatform/_inputs.py index 6a175ac813..d8408a5d38 100644 --- a/sdk/python/pulumi_azure/appplatform/_inputs.py +++ b/sdk/python/pulumi_azure/appplatform/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -62,14 +62,37 @@ def __init__(__self__, *, :param pulumi.Input[str] issuer_uri: The URI of Issuer Identifier. :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: It defines the specific actions applications can be allowed to do on a user's behalf. """ + SpringCloudApiPortalSsoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + issuer_uri=issuer_uri, + scopes=scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + issuer_uri: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if issuer_uri is None and 'issuerUri' in kwargs: + issuer_uri = kwargs['issuerUri'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if issuer_uri is not None: - pulumi.set(__self__, "issuer_uri", issuer_uri) + _setter("issuer_uri", issuer_uri) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) @property @pulumi.getter(name="clientId") @@ -135,13 +158,48 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] mount_options: These are the mount options for a persistent disk. :param pulumi.Input[bool] read_only_enabled: Indicates whether the persistent disk is a readOnly one. """ - pulumi.set(__self__, "mount_path", mount_path) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "storage_name", storage_name) + SpringCloudAppCustomPersistentDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mount_path=mount_path, + share_name=share_name, + storage_name=storage_name, + mount_options=mount_options, + read_only_enabled=read_only_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mount_path: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + storage_name: Optional[pulumi.Input[str]] = None, + mount_options: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + read_only_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + if mount_path is None: + raise TypeError("Missing 'mount_path' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if storage_name is None and 'storageName' in kwargs: + storage_name = kwargs['storageName'] + if storage_name is None: + raise TypeError("Missing 'storage_name' argument") + if mount_options is None and 'mountOptions' in kwargs: + mount_options = kwargs['mountOptions'] + if read_only_enabled is None and 'readOnlyEnabled' in kwargs: + read_only_enabled = kwargs['readOnlyEnabled'] + + _setter("mount_path", mount_path) + _setter("share_name", share_name) + _setter("storage_name", storage_name) if mount_options is not None: - pulumi.set(__self__, "mount_options", mount_options) + _setter("mount_options", mount_options) if read_only_enabled is not None: - pulumi.set(__self__, "read_only_enabled", read_only_enabled) + _setter("read_only_enabled", read_only_enabled) @property @pulumi.getter(name="mountPath") @@ -219,13 +277,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Spring Cloud Application. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this Spring Cloud Application. """ - pulumi.set(__self__, "type", type) + SpringCloudAppIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -293,16 +376,45 @@ def __init__(__self__, *, :param pulumi.Input[str] session_affinity: Specifies the type of the affinity, set this to `Cookie` to enable session affinity. Allowed values are `Cookie` and `None`. Defaults to `None`. :param pulumi.Input[int] session_cookie_max_age: Specifies the time in seconds until the cookie expires. """ + SpringCloudAppIngressSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_protocol=backend_protocol, + read_timeout_in_seconds=read_timeout_in_seconds, + send_timeout_in_seconds=send_timeout_in_seconds, + session_affinity=session_affinity, + session_cookie_max_age=session_cookie_max_age, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_protocol: Optional[pulumi.Input[str]] = None, + read_timeout_in_seconds: Optional[pulumi.Input[int]] = None, + send_timeout_in_seconds: Optional[pulumi.Input[int]] = None, + session_affinity: Optional[pulumi.Input[str]] = None, + session_cookie_max_age: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_protocol is None and 'backendProtocol' in kwargs: + backend_protocol = kwargs['backendProtocol'] + if read_timeout_in_seconds is None and 'readTimeoutInSeconds' in kwargs: + read_timeout_in_seconds = kwargs['readTimeoutInSeconds'] + if send_timeout_in_seconds is None and 'sendTimeoutInSeconds' in kwargs: + send_timeout_in_seconds = kwargs['sendTimeoutInSeconds'] + if session_affinity is None and 'sessionAffinity' in kwargs: + session_affinity = kwargs['sessionAffinity'] + if session_cookie_max_age is None and 'sessionCookieMaxAge' in kwargs: + session_cookie_max_age = kwargs['sessionCookieMaxAge'] + if backend_protocol is not None: - pulumi.set(__self__, "backend_protocol", backend_protocol) + _setter("backend_protocol", backend_protocol) if read_timeout_in_seconds is not None: - pulumi.set(__self__, "read_timeout_in_seconds", read_timeout_in_seconds) + _setter("read_timeout_in_seconds", read_timeout_in_seconds) if send_timeout_in_seconds is not None: - pulumi.set(__self__, "send_timeout_in_seconds", send_timeout_in_seconds) + _setter("send_timeout_in_seconds", send_timeout_in_seconds) if session_affinity is not None: - pulumi.set(__self__, "session_affinity", session_affinity) + _setter("session_affinity", session_affinity) if session_cookie_max_age is not None: - pulumi.set(__self__, "session_cookie_max_age", session_cookie_max_age) + _setter("session_cookie_max_age", session_cookie_max_age) @property @pulumi.getter(name="backendProtocol") @@ -374,9 +486,28 @@ def __init__(__self__, *, :param pulumi.Input[int] size_in_gb: Specifies the size of the persistent disk in GB. Possible values are between `0` and `50`. :param pulumi.Input[str] mount_path: Specifies the mount path of the persistent disk. Defaults to `/persistent`. """ - pulumi.set(__self__, "size_in_gb", size_in_gb) + SpringCloudAppPersistentDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + size_in_gb=size_in_gb, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + size_in_gb: Optional[pulumi.Input[int]] = None, + mount_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if size_in_gb is None and 'sizeInGb' in kwargs: + size_in_gb = kwargs['sizeInGb'] + if size_in_gb is None: + raise TypeError("Missing 'size_in_gb' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("size_in_gb", size_in_gb) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="sizeInGb") @@ -416,10 +547,23 @@ def __init__(__self__, *, > **Note:** `memory` supports `512Mi`, `1Gi` and `2Gi` for Basic tier, `512Mi`, `1Gi`, `2Gi`, `3Gi`, `4Gi`, `5Gi`, `6Gi`, `7Gi`, and `8Gi` for Standard tier. """ + SpringCloudBuildDeploymentQuotaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + memory=memory, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[pulumi.Input[str]] = None, + memory: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is not None: - pulumi.set(__self__, "cpu", cpu) + _setter("cpu", cpu) if memory is not None: - pulumi.set(__self__, "memory", memory) + _setter("memory", memory) @property @pulumi.getter @@ -459,10 +603,23 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] properties: Specifies a map of non-sensitive properties for launchProperties. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] secrets: Specifies a map of sensitive properties for launchProperties. """ + SpringCloudBuildPackBindingLaunchArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + properties=properties, + secrets=secrets, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + secrets: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) @property @pulumi.getter @@ -498,9 +655,26 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this build pack group. :param pulumi.Input[Sequence[pulumi.Input[str]]] build_pack_ids: Specifies a list of the build pack's ID. """ - pulumi.set(__self__, "name", name) + SpringCloudBuilderBuildPackGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + build_pack_ids=build_pack_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + build_pack_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if build_pack_ids is None and 'buildPackIds' in kwargs: + build_pack_ids = kwargs['buildPackIds'] + + _setter("name", name) if build_pack_ids is not None: - pulumi.set(__self__, "build_pack_ids", build_pack_ids) + _setter("build_pack_ids", build_pack_ids) @property @pulumi.getter @@ -536,8 +710,25 @@ def __init__(__self__, *, :param pulumi.Input[str] id: Specifies the ID of the ClusterStack. :param pulumi.Input[str] version: Specifies the version of the ClusterStack """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "version", version) + SpringCloudBuilderStackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("id", id) + _setter("version", version) @property @pulumi.getter @@ -593,26 +784,79 @@ def __init__(__self__, *, :param pulumi.Input[bool] strict_host_key_checking: Specifies whether enable the strict host key checking. :param pulumi.Input[str] username: Specifies the username of git repository basic auth. """ - pulumi.set(__self__, "label", label) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "patterns", patterns) - pulumi.set(__self__, "uri", uri) + SpringCloudConfigurationServiceRepositoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + name=name, + patterns=patterns, + uri=uri, + ca_certificate_id=ca_certificate_id, + host_key=host_key, + host_key_algorithm=host_key_algorithm, + password=password, + private_key=private_key, + search_paths=search_paths, + strict_host_key_checking=strict_host_key_checking, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + patterns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + uri: Optional[pulumi.Input[str]] = None, + ca_certificate_id: Optional[pulumi.Input[str]] = None, + host_key: Optional[pulumi.Input[str]] = None, + host_key_algorithm: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + private_key: Optional[pulumi.Input[str]] = None, + search_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + strict_host_key_checking: Optional[pulumi.Input[bool]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if label is None: + raise TypeError("Missing 'label' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if patterns is None: + raise TypeError("Missing 'patterns' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + if ca_certificate_id is None and 'caCertificateId' in kwargs: + ca_certificate_id = kwargs['caCertificateId'] + if host_key is None and 'hostKey' in kwargs: + host_key = kwargs['hostKey'] + if host_key_algorithm is None and 'hostKeyAlgorithm' in kwargs: + host_key_algorithm = kwargs['hostKeyAlgorithm'] + if private_key is None and 'privateKey' in kwargs: + private_key = kwargs['privateKey'] + if search_paths is None and 'searchPaths' in kwargs: + search_paths = kwargs['searchPaths'] + if strict_host_key_checking is None and 'strictHostKeyChecking' in kwargs: + strict_host_key_checking = kwargs['strictHostKeyChecking'] + + _setter("label", label) + _setter("name", name) + _setter("patterns", patterns) + _setter("uri", uri) if ca_certificate_id is not None: - pulumi.set(__self__, "ca_certificate_id", ca_certificate_id) + _setter("ca_certificate_id", ca_certificate_id) if host_key is not None: - pulumi.set(__self__, "host_key", host_key) + _setter("host_key", host_key) if host_key_algorithm is not None: - pulumi.set(__self__, "host_key_algorithm", host_key_algorithm) + _setter("host_key_algorithm", host_key_algorithm) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if private_key is not None: - pulumi.set(__self__, "private_key", private_key) + _setter("private_key", private_key) if search_paths is not None: - pulumi.set(__self__, "search_paths", search_paths) + _setter("search_paths", search_paths) if strict_host_key_checking is not None: - pulumi.set(__self__, "strict_host_key_checking", strict_host_key_checking) + _setter("strict_host_key_checking", strict_host_key_checking) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -778,19 +1022,50 @@ def __init__(__self__, *, :param pulumi.Input[str] secret: Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`. :param pulumi.Input[str] subscription_id: Subscription ID for `userAssignedIdentity`. `subscription_id` and `client_id` should be either both specified or both not specified. """ - pulumi.set(__self__, "type", type) + SpringCloudConnectionAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + certificate=certificate, + client_id=client_id, + name=name, + principal_id=principal_id, + secret=secret, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + + _setter("type", type) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -884,7 +1159,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] key_vault_id: The key vault id to store secret. """ - pulumi.set(__self__, "key_vault_id", key_vault_id) + SpringCloudConnectionSecretStoreArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("key_vault_id", key_vault_id) @property @pulumi.getter(name="keyVaultId") @@ -912,10 +1202,23 @@ def __init__(__self__, *, > **Note:** `memory` supports `512Mi`, `1Gi` and `2Gi` for Basic tier, `512Mi`, `1Gi`, `2Gi`, `3Gi`, `4Gi`, `5Gi`, `6Gi`, `7Gi`, and `8Gi` for Standard tier. """ + SpringCloudContainerDeploymentQuotaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + memory=memory, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[pulumi.Input[str]] = None, + memory: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is not None: - pulumi.set(__self__, "cpu", cpu) + _setter("cpu", cpu) if memory is not None: - pulumi.set(__self__, "memory", memory) + _setter("memory", memory) @property @pulumi.getter @@ -967,21 +1270,58 @@ def __init__(__self__, *, :param pulumi.Input[int] interval_in_seconds: Specifies the interval for checking for updates to Git or image repository. It should be greater than 10. :param pulumi.Input['SpringCloudCustomizedAcceleratorGitRepositorySshAuthArgs'] ssh_auth: A `ssh_auth` block as defined below. Conflicts with `git_repository.0.basic_auth`. Changing this forces a new Spring Cloud Customized Accelerator to be created. """ - pulumi.set(__self__, "url", url) + SpringCloudCustomizedAcceleratorGitRepositoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + basic_auth=basic_auth, + branch=branch, + ca_certificate_id=ca_certificate_id, + commit=commit, + git_tag=git_tag, + interval_in_seconds=interval_in_seconds, + ssh_auth=ssh_auth, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[pulumi.Input[str]] = None, + basic_auth: Optional[pulumi.Input['SpringCloudCustomizedAcceleratorGitRepositoryBasicAuthArgs']] = None, + branch: Optional[pulumi.Input[str]] = None, + ca_certificate_id: Optional[pulumi.Input[str]] = None, + commit: Optional[pulumi.Input[str]] = None, + git_tag: Optional[pulumi.Input[str]] = None, + interval_in_seconds: Optional[pulumi.Input[int]] = None, + ssh_auth: Optional[pulumi.Input['SpringCloudCustomizedAcceleratorGitRepositorySshAuthArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + if basic_auth is None and 'basicAuth' in kwargs: + basic_auth = kwargs['basicAuth'] + if ca_certificate_id is None and 'caCertificateId' in kwargs: + ca_certificate_id = kwargs['caCertificateId'] + if git_tag is None and 'gitTag' in kwargs: + git_tag = kwargs['gitTag'] + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if ssh_auth is None and 'sshAuth' in kwargs: + ssh_auth = kwargs['sshAuth'] + + _setter("url", url) if basic_auth is not None: - pulumi.set(__self__, "basic_auth", basic_auth) + _setter("basic_auth", basic_auth) if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if ca_certificate_id is not None: - pulumi.set(__self__, "ca_certificate_id", ca_certificate_id) + _setter("ca_certificate_id", ca_certificate_id) if commit is not None: - pulumi.set(__self__, "commit", commit) + _setter("commit", commit) if git_tag is not None: - pulumi.set(__self__, "git_tag", git_tag) + _setter("git_tag", git_tag) if interval_in_seconds is not None: - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) + _setter("interval_in_seconds", interval_in_seconds) if ssh_auth is not None: - pulumi.set(__self__, "ssh_auth", ssh_auth) + _setter("ssh_auth", ssh_auth) @property @pulumi.getter @@ -1089,8 +1429,25 @@ def __init__(__self__, *, :param pulumi.Input[str] password: Specifies the password of git repository basic auth. :param pulumi.Input[str] username: Specifies the username of git repository basic auth. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + SpringCloudCustomizedAcceleratorGitRepositoryBasicAuthArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -1128,11 +1485,34 @@ def __init__(__self__, *, :param pulumi.Input[str] host_key: Specifies the Public SSH Key of git repository basic auth. :param pulumi.Input[str] host_key_algorithm: Specifies the SSH Key algorithm of git repository basic auth. """ - pulumi.set(__self__, "private_key", private_key) + SpringCloudCustomizedAcceleratorGitRepositorySshAuthArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_key=private_key, + host_key=host_key, + host_key_algorithm=host_key_algorithm, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_key: Optional[pulumi.Input[str]] = None, + host_key: Optional[pulumi.Input[str]] = None, + host_key_algorithm: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_key is None and 'privateKey' in kwargs: + private_key = kwargs['privateKey'] + if private_key is None: + raise TypeError("Missing 'private_key' argument") + if host_key is None and 'hostKey' in kwargs: + host_key = kwargs['hostKey'] + if host_key_algorithm is None and 'hostKeyAlgorithm' in kwargs: + host_key_algorithm = kwargs['hostKeyAlgorithm'] + + _setter("private_key", private_key) if host_key is not None: - pulumi.set(__self__, "host_key", host_key) + _setter("host_key", host_key) if host_key_algorithm is not None: - pulumi.set(__self__, "host_key_algorithm", host_key_algorithm) + _setter("host_key_algorithm", host_key_algorithm) @property @pulumi.getter(name="privateKey") @@ -1184,14 +1564,37 @@ def __init__(__self__, *, :param pulumi.Input[str] metadata_url: Specifies the URI of a JSON file with generic OIDC provider configuration. :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: Specifies a list of specific actions applications can be allowed to do on a user's behalf. """ + SpringCloudDevToolPortalSsoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + metadata_url=metadata_url, + scopes=scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + metadata_url: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if metadata_url is None and 'metadataUrl' in kwargs: + metadata_url = kwargs['metadataUrl'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if metadata_url is not None: - pulumi.set(__self__, "metadata_url", metadata_url) + _setter("metadata_url", metadata_url) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) @property @pulumi.getter(name="clientId") @@ -1257,16 +1660,39 @@ def __init__(__self__, *, :param pulumi.Input[str] title: Specifies the title describing the context of the APIs available on the Gateway instance. :param pulumi.Input[str] version: Specifies the version of APIs available on this Gateway instance. """ + SpringCloudGatewayApiMetadataArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + documentation_url=documentation_url, + server_url=server_url, + title=title, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + documentation_url: Optional[pulumi.Input[str]] = None, + server_url: Optional[pulumi.Input[str]] = None, + title: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if documentation_url is None and 'documentationUrl' in kwargs: + documentation_url = kwargs['documentationUrl'] + if server_url is None and 'serverUrl' in kwargs: + server_url = kwargs['serverUrl'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if documentation_url is not None: - pulumi.set(__self__, "documentation_url", documentation_url) + _setter("documentation_url", documentation_url) if server_url is not None: - pulumi.set(__self__, "server_url", server_url) + _setter("server_url", server_url) if title is not None: - pulumi.set(__self__, "title", title) + _setter("title", title) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -1338,10 +1764,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] certificate_ids: Specifies the Spring Cloud Certificate IDs of the Spring Cloud Gateway. :param pulumi.Input[bool] verification_enabled: Specifies whether the client certificate verification is enabled. """ + SpringCloudGatewayClientAuthorizationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_ids=certificate_ids, + verification_enabled=verification_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + verification_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_ids is None and 'certificateIds' in kwargs: + certificate_ids = kwargs['certificateIds'] + if verification_enabled is None and 'verificationEnabled' in kwargs: + verification_enabled = kwargs['verificationEnabled'] + if certificate_ids is not None: - pulumi.set(__self__, "certificate_ids", certificate_ids) + _setter("certificate_ids", certificate_ids) if verification_enabled is not None: - pulumi.set(__self__, "verification_enabled", verification_enabled) + _setter("verification_enabled", verification_enabled) @property @pulumi.getter(name="certificateIds") @@ -1387,20 +1830,57 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] exposed_headers: HTTP response headers to expose for cross-site requests. :param pulumi.Input[int] max_age_seconds: How long, in seconds, the response from a pre-flight request can be cached by clients. """ + SpringCloudGatewayCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origin_patterns=allowed_origin_patterns, + allowed_origins=allowed_origins, + credentials_allowed=credentials_allowed, + exposed_headers=exposed_headers, + max_age_seconds=max_age_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_origin_patterns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + credentials_allowed: Optional[pulumi.Input[bool]] = None, + exposed_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + max_age_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_origin_patterns is None and 'allowedOriginPatterns' in kwargs: + allowed_origin_patterns = kwargs['allowedOriginPatterns'] + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if credentials_allowed is None and 'credentialsAllowed' in kwargs: + credentials_allowed = kwargs['credentialsAllowed'] + if exposed_headers is None and 'exposedHeaders' in kwargs: + exposed_headers = kwargs['exposedHeaders'] + if max_age_seconds is None and 'maxAgeSeconds' in kwargs: + max_age_seconds = kwargs['maxAgeSeconds'] + if allowed_headers is not None: - pulumi.set(__self__, "allowed_headers", allowed_headers) + _setter("allowed_headers", allowed_headers) if allowed_methods is not None: - pulumi.set(__self__, "allowed_methods", allowed_methods) + _setter("allowed_methods", allowed_methods) if allowed_origin_patterns is not None: - pulumi.set(__self__, "allowed_origin_patterns", allowed_origin_patterns) + _setter("allowed_origin_patterns", allowed_origin_patterns) if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if credentials_allowed is not None: - pulumi.set(__self__, "credentials_allowed", credentials_allowed) + _setter("credentials_allowed", credentials_allowed) if exposed_headers is not None: - pulumi.set(__self__, "exposed_headers", exposed_headers) + _setter("exposed_headers", exposed_headers) if max_age_seconds is not None: - pulumi.set(__self__, "max_age_seconds", max_age_seconds) + _setter("max_age_seconds", max_age_seconds) @property @pulumi.getter(name="allowedHeaders") @@ -1500,10 +1980,23 @@ def __init__(__self__, *, > **Note:** `memory` supports `512Mi`, `1Gi` and `2Gi` for Basic tier, `512Mi`, `1Gi`, `2Gi`, `3Gi`, `4Gi`, `5Gi`, `6Gi`, `7Gi`, and `8Gi` for Standard tier. """ + SpringCloudGatewayQuotaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + memory=memory, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[pulumi.Input[str]] = None, + memory: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is not None: - pulumi.set(__self__, "cpu", cpu) + _setter("cpu", cpu) if memory is not None: - pulumi.set(__self__, "memory", memory) + _setter("memory", memory) @property @pulumi.getter @@ -1541,8 +2034,19 @@ def __init__(__self__, *, """ :param pulumi.Input[str] uri: The URI of OpenAPI specification. """ + SpringCloudGatewayRouteConfigOpenApiArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + uri=uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if uri is not None: - pulumi.set(__self__, "uri", uri) + _setter("uri", uri) @property @pulumi.getter @@ -1580,23 +2084,58 @@ def __init__(__self__, *, :param pulumi.Input[bool] token_relay: Should pass currently-authenticated user's identity token to application service? :param pulumi.Input[str] uri: Specifies the full uri which will override `appName`. """ - pulumi.set(__self__, "order", order) + SpringCloudGatewayRouteConfigRouteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + order=order, + classification_tags=classification_tags, + description=description, + filters=filters, + predicates=predicates, + sso_validation_enabled=sso_validation_enabled, + title=title, + token_relay=token_relay, + uri=uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + order: Optional[pulumi.Input[int]] = None, + classification_tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + predicates: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sso_validation_enabled: Optional[pulumi.Input[bool]] = None, + title: Optional[pulumi.Input[str]] = None, + token_relay: Optional[pulumi.Input[bool]] = None, + uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if order is None: + raise TypeError("Missing 'order' argument") + if classification_tags is None and 'classificationTags' in kwargs: + classification_tags = kwargs['classificationTags'] + if sso_validation_enabled is None and 'ssoValidationEnabled' in kwargs: + sso_validation_enabled = kwargs['ssoValidationEnabled'] + if token_relay is None and 'tokenRelay' in kwargs: + token_relay = kwargs['tokenRelay'] + + _setter("order", order) if classification_tags is not None: - pulumi.set(__self__, "classification_tags", classification_tags) + _setter("classification_tags", classification_tags) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) if predicates is not None: - pulumi.set(__self__, "predicates", predicates) + _setter("predicates", predicates) if sso_validation_enabled is not None: - pulumi.set(__self__, "sso_validation_enabled", sso_validation_enabled) + _setter("sso_validation_enabled", sso_validation_enabled) if title is not None: - pulumi.set(__self__, "title", title) + _setter("title", title) if token_relay is not None: - pulumi.set(__self__, "token_relay", token_relay) + _setter("token_relay", token_relay) if uri is not None: - pulumi.set(__self__, "uri", uri) + _setter("uri", uri) @property @pulumi.getter @@ -1720,14 +2259,37 @@ def __init__(__self__, *, :param pulumi.Input[str] issuer_uri: The URI of Issuer Identifier. :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: It defines the specific actions applications can be allowed to do on a user's behalf. """ + SpringCloudGatewaySsoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + issuer_uri=issuer_uri, + scopes=scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + issuer_uri: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if issuer_uri is None and 'issuerUri' in kwargs: + issuer_uri = kwargs['issuerUri'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if issuer_uri is not None: - pulumi.set(__self__, "issuer_uri", issuer_uri) + _setter("issuer_uri", issuer_uri) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) @property @pulumi.getter(name="clientId") @@ -1791,10 +2353,23 @@ def __init__(__self__, *, > **Note:** `memory` supports `512Mi`, `1Gi` and `2Gi` for Basic tier, `512Mi`, `1Gi`, `2Gi`, `3Gi`, `4Gi`, `5Gi`, `6Gi`, `7Gi`, and `8Gi` for Standard tier. """ + SpringCloudJavaDeploymentQuotaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + memory=memory, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[pulumi.Input[str]] = None, + memory: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is not None: - pulumi.set(__self__, "cpu", cpu) + _setter("cpu", cpu) if memory is not None: - pulumi.set(__self__, "memory", memory) + _setter("memory", memory) @property @pulumi.getter @@ -1842,17 +2417,46 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] search_paths: An array of strings used to search subdirectories of the Git repository. :param pulumi.Input['SpringCloudServiceConfigServerGitSettingSshAuthArgs'] ssh_auth: A `ssh_auth` block as defined below. """ - pulumi.set(__self__, "uri", uri) + SpringCloudServiceConfigServerGitSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + uri=uri, + http_basic_auth=http_basic_auth, + label=label, + repositories=repositories, + search_paths=search_paths, + ssh_auth=ssh_auth, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + uri: Optional[pulumi.Input[str]] = None, + http_basic_auth: Optional[pulumi.Input['SpringCloudServiceConfigServerGitSettingHttpBasicAuthArgs']] = None, + label: Optional[pulumi.Input[str]] = None, + repositories: Optional[pulumi.Input[Sequence[pulumi.Input['SpringCloudServiceConfigServerGitSettingRepositoryArgs']]]] = None, + search_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ssh_auth: Optional[pulumi.Input['SpringCloudServiceConfigServerGitSettingSshAuthArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if uri is None: + raise TypeError("Missing 'uri' argument") + if http_basic_auth is None and 'httpBasicAuth' in kwargs: + http_basic_auth = kwargs['httpBasicAuth'] + if search_paths is None and 'searchPaths' in kwargs: + search_paths = kwargs['searchPaths'] + if ssh_auth is None and 'sshAuth' in kwargs: + ssh_auth = kwargs['sshAuth'] + + _setter("uri", uri) if http_basic_auth is not None: - pulumi.set(__self__, "http_basic_auth", http_basic_auth) + _setter("http_basic_auth", http_basic_auth) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if repositories is not None: - pulumi.set(__self__, "repositories", repositories) + _setter("repositories", repositories) if search_paths is not None: - pulumi.set(__self__, "search_paths", search_paths) + _setter("search_paths", search_paths) if ssh_auth is not None: - pulumi.set(__self__, "ssh_auth", ssh_auth) + _setter("ssh_auth", ssh_auth) @property @pulumi.getter @@ -1936,8 +2540,25 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password used to access the Git repository server, required when the Git repository server supports HTTP Basic Authentication. :param pulumi.Input[str] username: The username that's used to access the Git repository server, required when the Git repository server supports HTTP Basic Authentication. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + SpringCloudServiceConfigServerGitSettingHttpBasicAuthArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -1983,18 +2604,51 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] search_paths: An array of strings used to search subdirectories of the Git repository. :param pulumi.Input['SpringCloudServiceConfigServerGitSettingRepositorySshAuthArgs'] ssh_auth: A `ssh_auth` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + SpringCloudServiceConfigServerGitSettingRepositoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + http_basic_auth=http_basic_auth, + label=label, + patterns=patterns, + search_paths=search_paths, + ssh_auth=ssh_auth, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + http_basic_auth: Optional[pulumi.Input['SpringCloudServiceConfigServerGitSettingRepositoryHttpBasicAuthArgs']] = None, + label: Optional[pulumi.Input[str]] = None, + patterns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + search_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ssh_auth: Optional[pulumi.Input['SpringCloudServiceConfigServerGitSettingRepositorySshAuthArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + if http_basic_auth is None and 'httpBasicAuth' in kwargs: + http_basic_auth = kwargs['httpBasicAuth'] + if search_paths is None and 'searchPaths' in kwargs: + search_paths = kwargs['searchPaths'] + if ssh_auth is None and 'sshAuth' in kwargs: + ssh_auth = kwargs['sshAuth'] + + _setter("name", name) + _setter("uri", uri) if http_basic_auth is not None: - pulumi.set(__self__, "http_basic_auth", http_basic_auth) + _setter("http_basic_auth", http_basic_auth) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if patterns is not None: - pulumi.set(__self__, "patterns", patterns) + _setter("patterns", patterns) if search_paths is not None: - pulumi.set(__self__, "search_paths", search_paths) + _setter("search_paths", search_paths) if ssh_auth is not None: - pulumi.set(__self__, "ssh_auth", ssh_auth) + _setter("ssh_auth", ssh_auth) @property @pulumi.getter @@ -2090,8 +2744,25 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password used to access the Git repository server, required when the Git repository server supports HTTP Basic Authentication. :param pulumi.Input[str] username: The username that's used to access the Git repository server, required when the Git repository server supports HTTP Basic Authentication. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + SpringCloudServiceConfigServerGitSettingRepositoryHttpBasicAuthArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -2131,13 +2802,40 @@ def __init__(__self__, *, :param pulumi.Input[str] host_key_algorithm: The host key algorithm, should be `ssh-dss`, `ssh-rsa`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`. Required only if `host-key` exists. :param pulumi.Input[bool] strict_host_key_checking_enabled: Indicates whether the Config Server instance will fail to start if the host_key does not match. Defaults to `true`. """ - pulumi.set(__self__, "private_key", private_key) + SpringCloudServiceConfigServerGitSettingRepositorySshAuthArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_key=private_key, + host_key=host_key, + host_key_algorithm=host_key_algorithm, + strict_host_key_checking_enabled=strict_host_key_checking_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_key: Optional[pulumi.Input[str]] = None, + host_key: Optional[pulumi.Input[str]] = None, + host_key_algorithm: Optional[pulumi.Input[str]] = None, + strict_host_key_checking_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_key is None and 'privateKey' in kwargs: + private_key = kwargs['privateKey'] + if private_key is None: + raise TypeError("Missing 'private_key' argument") + if host_key is None and 'hostKey' in kwargs: + host_key = kwargs['hostKey'] + if host_key_algorithm is None and 'hostKeyAlgorithm' in kwargs: + host_key_algorithm = kwargs['hostKeyAlgorithm'] + if strict_host_key_checking_enabled is None and 'strictHostKeyCheckingEnabled' in kwargs: + strict_host_key_checking_enabled = kwargs['strictHostKeyCheckingEnabled'] + + _setter("private_key", private_key) if host_key is not None: - pulumi.set(__self__, "host_key", host_key) + _setter("host_key", host_key) if host_key_algorithm is not None: - pulumi.set(__self__, "host_key_algorithm", host_key_algorithm) + _setter("host_key_algorithm", host_key_algorithm) if strict_host_key_checking_enabled is not None: - pulumi.set(__self__, "strict_host_key_checking_enabled", strict_host_key_checking_enabled) + _setter("strict_host_key_checking_enabled", strict_host_key_checking_enabled) @property @pulumi.getter(name="privateKey") @@ -2201,13 +2899,40 @@ def __init__(__self__, *, :param pulumi.Input[str] host_key_algorithm: The host key algorithm, should be `ssh-dss`, `ssh-rsa`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`. Required only if `host-key` exists. :param pulumi.Input[bool] strict_host_key_checking_enabled: Indicates whether the Config Server instance will fail to start if the host_key does not match. Defaults to `true`. """ - pulumi.set(__self__, "private_key", private_key) + SpringCloudServiceConfigServerGitSettingSshAuthArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_key=private_key, + host_key=host_key, + host_key_algorithm=host_key_algorithm, + strict_host_key_checking_enabled=strict_host_key_checking_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_key: Optional[pulumi.Input[str]] = None, + host_key: Optional[pulumi.Input[str]] = None, + host_key_algorithm: Optional[pulumi.Input[str]] = None, + strict_host_key_checking_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_key is None and 'privateKey' in kwargs: + private_key = kwargs['privateKey'] + if private_key is None: + raise TypeError("Missing 'private_key' argument") + if host_key is None and 'hostKey' in kwargs: + host_key = kwargs['hostKey'] + if host_key_algorithm is None and 'hostKeyAlgorithm' in kwargs: + host_key_algorithm = kwargs['hostKeyAlgorithm'] + if strict_host_key_checking_enabled is None and 'strictHostKeyCheckingEnabled' in kwargs: + strict_host_key_checking_enabled = kwargs['strictHostKeyCheckingEnabled'] + + _setter("private_key", private_key) if host_key is not None: - pulumi.set(__self__, "host_key", host_key) + _setter("host_key", host_key) if host_key_algorithm is not None: - pulumi.set(__self__, "host_key_algorithm", host_key_algorithm) + _setter("host_key_algorithm", host_key_algorithm) if strict_host_key_checking_enabled is not None: - pulumi.set(__self__, "strict_host_key_checking_enabled", strict_host_key_checking_enabled) + _setter("strict_host_key_checking_enabled", strict_host_key_checking_enabled) @property @pulumi.getter(name="privateKey") @@ -2271,10 +2996,35 @@ def __init__(__self__, *, :param pulumi.Input[str] server: Specifies the login server of the container registry. :param pulumi.Input[str] username: Specifies the username of the container registry. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + SpringCloudServiceContainerRegistryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("name", name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter @@ -2332,8 +3082,21 @@ def __init__(__self__, *, """ :param pulumi.Input[str] container_registry_name: Specifies the name of the container registry used in the default build service. """ + SpringCloudServiceDefaultBuildServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_registry_name=container_registry_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_registry_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_registry_name is None and 'containerRegistryName' in kwargs: + container_registry_name = kwargs['containerRegistryName'] + if container_registry_name is not None: - pulumi.set(__self__, "container_registry_name", container_registry_name) + _setter("container_registry_name", container_registry_name) @property @pulumi.getter(name="containerRegistryName") @@ -2359,9 +3122,30 @@ def __init__(__self__, *, :param pulumi.Input[str] product: Specifies the 3rd Party artifact that is being procured. :param pulumi.Input[str] publisher: Specifies the publisher ID of the 3rd Party Artifact that is being procured. """ - pulumi.set(__self__, "plan", plan) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + SpringCloudServiceMarketplaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + plan=plan, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + plan: Optional[pulumi.Input[str]] = None, + product: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if plan is None: + raise TypeError("Missing 'plan' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("plan", plan) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -2419,17 +3203,60 @@ def __init__(__self__, *, :param pulumi.Input[int] read_timeout_seconds: Ingress read time out in seconds. :param pulumi.Input[str] service_runtime_network_resource_group: Specifies the Name of the resource group containing network resources of Azure Spring Cloud Service Runtime. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "app_subnet_id", app_subnet_id) - pulumi.set(__self__, "cidr_ranges", cidr_ranges) - pulumi.set(__self__, "service_runtime_subnet_id", service_runtime_subnet_id) + SpringCloudServiceNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_subnet_id=app_subnet_id, + cidr_ranges=cidr_ranges, + service_runtime_subnet_id=service_runtime_subnet_id, + app_network_resource_group=app_network_resource_group, + outbound_type=outbound_type, + read_timeout_seconds=read_timeout_seconds, + service_runtime_network_resource_group=service_runtime_network_resource_group, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_subnet_id: Optional[pulumi.Input[str]] = None, + cidr_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + service_runtime_subnet_id: Optional[pulumi.Input[str]] = None, + app_network_resource_group: Optional[pulumi.Input[str]] = None, + outbound_type: Optional[pulumi.Input[str]] = None, + read_timeout_seconds: Optional[pulumi.Input[int]] = None, + service_runtime_network_resource_group: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_subnet_id is None and 'appSubnetId' in kwargs: + app_subnet_id = kwargs['appSubnetId'] + if app_subnet_id is None: + raise TypeError("Missing 'app_subnet_id' argument") + if cidr_ranges is None and 'cidrRanges' in kwargs: + cidr_ranges = kwargs['cidrRanges'] + if cidr_ranges is None: + raise TypeError("Missing 'cidr_ranges' argument") + if service_runtime_subnet_id is None and 'serviceRuntimeSubnetId' in kwargs: + service_runtime_subnet_id = kwargs['serviceRuntimeSubnetId'] + if service_runtime_subnet_id is None: + raise TypeError("Missing 'service_runtime_subnet_id' argument") + if app_network_resource_group is None and 'appNetworkResourceGroup' in kwargs: + app_network_resource_group = kwargs['appNetworkResourceGroup'] + if outbound_type is None and 'outboundType' in kwargs: + outbound_type = kwargs['outboundType'] + if read_timeout_seconds is None and 'readTimeoutSeconds' in kwargs: + read_timeout_seconds = kwargs['readTimeoutSeconds'] + if service_runtime_network_resource_group is None and 'serviceRuntimeNetworkResourceGroup' in kwargs: + service_runtime_network_resource_group = kwargs['serviceRuntimeNetworkResourceGroup'] + + _setter("app_subnet_id", app_subnet_id) + _setter("cidr_ranges", cidr_ranges) + _setter("service_runtime_subnet_id", service_runtime_subnet_id) if app_network_resource_group is not None: - pulumi.set(__self__, "app_network_resource_group", app_network_resource_group) + _setter("app_network_resource_group", app_network_resource_group) if outbound_type is not None: - pulumi.set(__self__, "outbound_type", outbound_type) + _setter("outbound_type", outbound_type) if read_timeout_seconds is not None: - pulumi.set(__self__, "read_timeout_seconds", read_timeout_seconds) + _setter("read_timeout_seconds", read_timeout_seconds) if service_runtime_network_resource_group is not None: - pulumi.set(__self__, "service_runtime_network_resource_group", service_runtime_network_resource_group) + _setter("service_runtime_network_resource_group", service_runtime_network_resource_group) @property @pulumi.getter(name="appSubnetId") @@ -2531,16 +3358,37 @@ def __init__(__self__, *, :param pulumi.Input[int] port: The port of required traffic. :param pulumi.Input[str] protocol: The protocol of required traffic. """ + SpringCloudServiceRequiredNetworkTrafficRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + direction=direction, + fqdns=fqdns, + ip_addresses=ip_addresses, + port=port, + protocol=protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + direction: Optional[pulumi.Input[str]] = None, + fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + port: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if direction is not None: - pulumi.set(__self__, "direction", direction) + _setter("direction", direction) if fqdns is not None: - pulumi.set(__self__, "fqdns", fqdns) + _setter("fqdns", fqdns) if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) @property @pulumi.getter @@ -2612,10 +3460,27 @@ def __init__(__self__, *, :param pulumi.Input[str] connection_string: The connection string used for Application Insights. :param pulumi.Input[float] sample_rate: The sampling rate of Application Insights Agent. Must be between `0.0` and `100.0`. Defaults to `10.0`. """ + SpringCloudServiceTraceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + sample_rate=sample_rate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + sample_rate: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if sample_rate is None and 'sampleRate' in kwargs: + sample_rate = kwargs['sampleRate'] + if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if sample_rate is not None: - pulumi.set(__self__, "sample_rate", sample_rate) + _setter("sample_rate", sample_rate) @property @pulumi.getter(name="connectionString") diff --git a/sdk/python/pulumi_azure/appplatform/get_spring_cloud_app.py b/sdk/python/pulumi_azure/appplatform/get_spring_cloud_app.py index 5e18735248..cf3c236a07 100644 --- a/sdk/python/pulumi_azure/appplatform/get_spring_cloud_app.py +++ b/sdk/python/pulumi_azure/appplatform/get_spring_cloud_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appplatform/get_spring_cloud_service.py b/sdk/python/pulumi_azure/appplatform/get_spring_cloud_service.py index 3617b93faf..c76233204e 100644 --- a/sdk/python/pulumi_azure/appplatform/get_spring_cloud_service.py +++ b/sdk/python/pulumi_azure/appplatform/get_spring_cloud_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appplatform/outputs.py b/sdk/python/pulumi_azure/appplatform/outputs.py index 6dab0c9862..c53f709c4d 100644 --- a/sdk/python/pulumi_azure/appplatform/outputs.py +++ b/sdk/python/pulumi_azure/appplatform/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -93,14 +93,37 @@ def __init__(__self__, *, :param str issuer_uri: The URI of Issuer Identifier. :param Sequence[str] scopes: It defines the specific actions applications can be allowed to do on a user's behalf. """ + SpringCloudApiPortalSso._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + issuer_uri=issuer_uri, + scopes=scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + issuer_uri: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if issuer_uri is None and 'issuerUri' in kwargs: + issuer_uri = kwargs['issuerUri'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if issuer_uri is not None: - pulumi.set(__self__, "issuer_uri", issuer_uri) + _setter("issuer_uri", issuer_uri) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) @property @pulumi.getter(name="clientId") @@ -175,13 +198,48 @@ def __init__(__self__, *, :param Sequence[str] mount_options: These are the mount options for a persistent disk. :param bool read_only_enabled: Indicates whether the persistent disk is a readOnly one. """ - pulumi.set(__self__, "mount_path", mount_path) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "storage_name", storage_name) + SpringCloudAppCustomPersistentDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + mount_path=mount_path, + share_name=share_name, + storage_name=storage_name, + mount_options=mount_options, + read_only_enabled=read_only_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mount_path: Optional[str] = None, + share_name: Optional[str] = None, + storage_name: Optional[str] = None, + mount_options: Optional[Sequence[str]] = None, + read_only_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + if mount_path is None: + raise TypeError("Missing 'mount_path' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if storage_name is None and 'storageName' in kwargs: + storage_name = kwargs['storageName'] + if storage_name is None: + raise TypeError("Missing 'storage_name' argument") + if mount_options is None and 'mountOptions' in kwargs: + mount_options = kwargs['mountOptions'] + if read_only_enabled is None and 'readOnlyEnabled' in kwargs: + read_only_enabled = kwargs['readOnlyEnabled'] + + _setter("mount_path", mount_path) + _setter("share_name", share_name) + _setter("storage_name", storage_name) if mount_options is not None: - pulumi.set(__self__, "mount_options", mount_options) + _setter("mount_options", mount_options) if read_only_enabled is not None: - pulumi.set(__self__, "read_only_enabled", read_only_enabled) + _setter("read_only_enabled", read_only_enabled) @property @pulumi.getter(name="mountPath") @@ -260,13 +318,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Spring Cloud Application. :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this Spring Cloud Application. """ - pulumi.set(__self__, "type", type) + SpringCloudAppIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -343,16 +426,45 @@ def __init__(__self__, *, :param str session_affinity: Specifies the type of the affinity, set this to `Cookie` to enable session affinity. Allowed values are `Cookie` and `None`. Defaults to `None`. :param int session_cookie_max_age: Specifies the time in seconds until the cookie expires. """ + SpringCloudAppIngressSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_protocol=backend_protocol, + read_timeout_in_seconds=read_timeout_in_seconds, + send_timeout_in_seconds=send_timeout_in_seconds, + session_affinity=session_affinity, + session_cookie_max_age=session_cookie_max_age, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_protocol: Optional[str] = None, + read_timeout_in_seconds: Optional[int] = None, + send_timeout_in_seconds: Optional[int] = None, + session_affinity: Optional[str] = None, + session_cookie_max_age: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_protocol is None and 'backendProtocol' in kwargs: + backend_protocol = kwargs['backendProtocol'] + if read_timeout_in_seconds is None and 'readTimeoutInSeconds' in kwargs: + read_timeout_in_seconds = kwargs['readTimeoutInSeconds'] + if send_timeout_in_seconds is None and 'sendTimeoutInSeconds' in kwargs: + send_timeout_in_seconds = kwargs['sendTimeoutInSeconds'] + if session_affinity is None and 'sessionAffinity' in kwargs: + session_affinity = kwargs['sessionAffinity'] + if session_cookie_max_age is None and 'sessionCookieMaxAge' in kwargs: + session_cookie_max_age = kwargs['sessionCookieMaxAge'] + if backend_protocol is not None: - pulumi.set(__self__, "backend_protocol", backend_protocol) + _setter("backend_protocol", backend_protocol) if read_timeout_in_seconds is not None: - pulumi.set(__self__, "read_timeout_in_seconds", read_timeout_in_seconds) + _setter("read_timeout_in_seconds", read_timeout_in_seconds) if send_timeout_in_seconds is not None: - pulumi.set(__self__, "send_timeout_in_seconds", send_timeout_in_seconds) + _setter("send_timeout_in_seconds", send_timeout_in_seconds) if session_affinity is not None: - pulumi.set(__self__, "session_affinity", session_affinity) + _setter("session_affinity", session_affinity) if session_cookie_max_age is not None: - pulumi.set(__self__, "session_cookie_max_age", session_cookie_max_age) + _setter("session_cookie_max_age", session_cookie_max_age) @property @pulumi.getter(name="backendProtocol") @@ -423,9 +535,28 @@ def __init__(__self__, *, :param int size_in_gb: Specifies the size of the persistent disk in GB. Possible values are between `0` and `50`. :param str mount_path: Specifies the mount path of the persistent disk. Defaults to `/persistent`. """ - pulumi.set(__self__, "size_in_gb", size_in_gb) + SpringCloudAppPersistentDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + size_in_gb=size_in_gb, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + size_in_gb: Optional[int] = None, + mount_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if size_in_gb is None and 'sizeInGb' in kwargs: + size_in_gb = kwargs['sizeInGb'] + if size_in_gb is None: + raise TypeError("Missing 'size_in_gb' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("size_in_gb", size_in_gb) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="sizeInGb") @@ -457,10 +588,23 @@ def __init__(__self__, *, > **Note:** `memory` supports `512Mi`, `1Gi` and `2Gi` for Basic tier, `512Mi`, `1Gi`, `2Gi`, `3Gi`, `4Gi`, `5Gi`, `6Gi`, `7Gi`, and `8Gi` for Standard tier. """ + SpringCloudBuildDeploymentQuota._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + memory=memory, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[str] = None, + memory: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is not None: - pulumi.set(__self__, "cpu", cpu) + _setter("cpu", cpu) if memory is not None: - pulumi.set(__self__, "memory", memory) + _setter("memory", memory) @property @pulumi.getter @@ -492,10 +636,23 @@ def __init__(__self__, *, :param Mapping[str, str] properties: Specifies a map of non-sensitive properties for launchProperties. :param Mapping[str, str] secrets: Specifies a map of sensitive properties for launchProperties. """ + SpringCloudBuildPackBindingLaunch._configure( + lambda key, value: pulumi.set(__self__, key, value), + properties=properties, + secrets=secrets, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + properties: Optional[Mapping[str, str]] = None, + secrets: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) @property @pulumi.getter @@ -540,9 +697,26 @@ def __init__(__self__, *, :param str name: The name which should be used for this build pack group. :param Sequence[str] build_pack_ids: Specifies a list of the build pack's ID. """ - pulumi.set(__self__, "name", name) + SpringCloudBuilderBuildPackGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + build_pack_ids=build_pack_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + build_pack_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if build_pack_ids is None and 'buildPackIds' in kwargs: + build_pack_ids = kwargs['buildPackIds'] + + _setter("name", name) if build_pack_ids is not None: - pulumi.set(__self__, "build_pack_ids", build_pack_ids) + _setter("build_pack_ids", build_pack_ids) @property @pulumi.getter @@ -570,8 +744,25 @@ def __init__(__self__, *, :param str id: Specifies the ID of the ClusterStack. :param str version: Specifies the version of the ClusterStack """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "version", version) + SpringCloudBuilderStack._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("id", id) + _setter("version", version) @property @pulumi.getter @@ -646,26 +837,79 @@ def __init__(__self__, *, :param bool strict_host_key_checking: Specifies whether enable the strict host key checking. :param str username: Specifies the username of git repository basic auth. """ - pulumi.set(__self__, "label", label) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "patterns", patterns) - pulumi.set(__self__, "uri", uri) + SpringCloudConfigurationServiceRepository._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + name=name, + patterns=patterns, + uri=uri, + ca_certificate_id=ca_certificate_id, + host_key=host_key, + host_key_algorithm=host_key_algorithm, + password=password, + private_key=private_key, + search_paths=search_paths, + strict_host_key_checking=strict_host_key_checking, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[str] = None, + name: Optional[str] = None, + patterns: Optional[Sequence[str]] = None, + uri: Optional[str] = None, + ca_certificate_id: Optional[str] = None, + host_key: Optional[str] = None, + host_key_algorithm: Optional[str] = None, + password: Optional[str] = None, + private_key: Optional[str] = None, + search_paths: Optional[Sequence[str]] = None, + strict_host_key_checking: Optional[bool] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if label is None: + raise TypeError("Missing 'label' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if patterns is None: + raise TypeError("Missing 'patterns' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + if ca_certificate_id is None and 'caCertificateId' in kwargs: + ca_certificate_id = kwargs['caCertificateId'] + if host_key is None and 'hostKey' in kwargs: + host_key = kwargs['hostKey'] + if host_key_algorithm is None and 'hostKeyAlgorithm' in kwargs: + host_key_algorithm = kwargs['hostKeyAlgorithm'] + if private_key is None and 'privateKey' in kwargs: + private_key = kwargs['privateKey'] + if search_paths is None and 'searchPaths' in kwargs: + search_paths = kwargs['searchPaths'] + if strict_host_key_checking is None and 'strictHostKeyChecking' in kwargs: + strict_host_key_checking = kwargs['strictHostKeyChecking'] + + _setter("label", label) + _setter("name", name) + _setter("patterns", patterns) + _setter("uri", uri) if ca_certificate_id is not None: - pulumi.set(__self__, "ca_certificate_id", ca_certificate_id) + _setter("ca_certificate_id", ca_certificate_id) if host_key is not None: - pulumi.set(__self__, "host_key", host_key) + _setter("host_key", host_key) if host_key_algorithm is not None: - pulumi.set(__self__, "host_key_algorithm", host_key_algorithm) + _setter("host_key_algorithm", host_key_algorithm) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if private_key is not None: - pulumi.set(__self__, "private_key", private_key) + _setter("private_key", private_key) if search_paths is not None: - pulumi.set(__self__, "search_paths", search_paths) + _setter("search_paths", search_paths) if strict_host_key_checking is not None: - pulumi.set(__self__, "strict_host_key_checking", strict_host_key_checking) + _setter("strict_host_key_checking", strict_host_key_checking) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -804,19 +1048,50 @@ def __init__(__self__, *, :param str secret: Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`. :param str subscription_id: Subscription ID for `userAssignedIdentity`. `subscription_id` and `client_id` should be either both specified or both not specified. """ - pulumi.set(__self__, "type", type) + SpringCloudConnectionAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + certificate=certificate, + client_id=client_id, + name=name, + principal_id=principal_id, + secret=secret, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + certificate: Optional[str] = None, + client_id: Optional[str] = None, + name: Optional[str] = None, + principal_id: Optional[str] = None, + secret: Optional[str] = None, + subscription_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + + _setter("type", type) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -899,7 +1174,22 @@ def __init__(__self__, *, """ :param str key_vault_id: The key vault id to store secret. """ - pulumi.set(__self__, "key_vault_id", key_vault_id) + SpringCloudConnectionSecretStore._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("key_vault_id", key_vault_id) @property @pulumi.getter(name="keyVaultId") @@ -923,10 +1213,23 @@ def __init__(__self__, *, > **Note:** `memory` supports `512Mi`, `1Gi` and `2Gi` for Basic tier, `512Mi`, `1Gi`, `2Gi`, `3Gi`, `4Gi`, `5Gi`, `6Gi`, `7Gi`, and `8Gi` for Standard tier. """ + SpringCloudContainerDeploymentQuota._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + memory=memory, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[str] = None, + memory: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is not None: - pulumi.set(__self__, "cpu", cpu) + _setter("cpu", cpu) if memory is not None: - pulumi.set(__self__, "memory", memory) + _setter("memory", memory) @property @pulumi.getter @@ -995,21 +1298,58 @@ def __init__(__self__, *, :param int interval_in_seconds: Specifies the interval for checking for updates to Git or image repository. It should be greater than 10. :param 'SpringCloudCustomizedAcceleratorGitRepositorySshAuthArgs' ssh_auth: A `ssh_auth` block as defined below. Conflicts with `git_repository.0.basic_auth`. Changing this forces a new Spring Cloud Customized Accelerator to be created. """ - pulumi.set(__self__, "url", url) + SpringCloudCustomizedAcceleratorGitRepository._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + basic_auth=basic_auth, + branch=branch, + ca_certificate_id=ca_certificate_id, + commit=commit, + git_tag=git_tag, + interval_in_seconds=interval_in_seconds, + ssh_auth=ssh_auth, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[str] = None, + basic_auth: Optional['outputs.SpringCloudCustomizedAcceleratorGitRepositoryBasicAuth'] = None, + branch: Optional[str] = None, + ca_certificate_id: Optional[str] = None, + commit: Optional[str] = None, + git_tag: Optional[str] = None, + interval_in_seconds: Optional[int] = None, + ssh_auth: Optional['outputs.SpringCloudCustomizedAcceleratorGitRepositorySshAuth'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + if basic_auth is None and 'basicAuth' in kwargs: + basic_auth = kwargs['basicAuth'] + if ca_certificate_id is None and 'caCertificateId' in kwargs: + ca_certificate_id = kwargs['caCertificateId'] + if git_tag is None and 'gitTag' in kwargs: + git_tag = kwargs['gitTag'] + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if ssh_auth is None and 'sshAuth' in kwargs: + ssh_auth = kwargs['sshAuth'] + + _setter("url", url) if basic_auth is not None: - pulumi.set(__self__, "basic_auth", basic_auth) + _setter("basic_auth", basic_auth) if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if ca_certificate_id is not None: - pulumi.set(__self__, "ca_certificate_id", ca_certificate_id) + _setter("ca_certificate_id", ca_certificate_id) if commit is not None: - pulumi.set(__self__, "commit", commit) + _setter("commit", commit) if git_tag is not None: - pulumi.set(__self__, "git_tag", git_tag) + _setter("git_tag", git_tag) if interval_in_seconds is not None: - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) + _setter("interval_in_seconds", interval_in_seconds) if ssh_auth is not None: - pulumi.set(__self__, "ssh_auth", ssh_auth) + _setter("ssh_auth", ssh_auth) @property @pulumi.getter @@ -1085,8 +1425,25 @@ def __init__(__self__, *, :param str password: Specifies the password of git repository basic auth. :param str username: Specifies the username of git repository basic auth. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + SpringCloudCustomizedAcceleratorGitRepositoryBasicAuth._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -1137,11 +1494,34 @@ def __init__(__self__, *, :param str host_key: Specifies the Public SSH Key of git repository basic auth. :param str host_key_algorithm: Specifies the SSH Key algorithm of git repository basic auth. """ - pulumi.set(__self__, "private_key", private_key) + SpringCloudCustomizedAcceleratorGitRepositorySshAuth._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_key=private_key, + host_key=host_key, + host_key_algorithm=host_key_algorithm, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_key: Optional[str] = None, + host_key: Optional[str] = None, + host_key_algorithm: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_key is None and 'privateKey' in kwargs: + private_key = kwargs['privateKey'] + if private_key is None: + raise TypeError("Missing 'private_key' argument") + if host_key is None and 'hostKey' in kwargs: + host_key = kwargs['hostKey'] + if host_key_algorithm is None and 'hostKeyAlgorithm' in kwargs: + host_key_algorithm = kwargs['hostKeyAlgorithm'] + + _setter("private_key", private_key) if host_key is not None: - pulumi.set(__self__, "host_key", host_key) + _setter("host_key", host_key) if host_key_algorithm is not None: - pulumi.set(__self__, "host_key_algorithm", host_key_algorithm) + _setter("host_key_algorithm", host_key_algorithm) @property @pulumi.getter(name="privateKey") @@ -1202,14 +1582,37 @@ def __init__(__self__, *, :param str metadata_url: Specifies the URI of a JSON file with generic OIDC provider configuration. :param Sequence[str] scopes: Specifies a list of specific actions applications can be allowed to do on a user's behalf. """ + SpringCloudDevToolPortalSso._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + metadata_url=metadata_url, + scopes=scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + metadata_url: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if metadata_url is None and 'metadataUrl' in kwargs: + metadata_url = kwargs['metadataUrl'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if metadata_url is not None: - pulumi.set(__self__, "metadata_url", metadata_url) + _setter("metadata_url", metadata_url) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) @property @pulumi.getter(name="clientId") @@ -1278,16 +1681,39 @@ def __init__(__self__, *, :param str title: Specifies the title describing the context of the APIs available on the Gateway instance. :param str version: Specifies the version of APIs available on this Gateway instance. """ + SpringCloudGatewayApiMetadata._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + documentation_url=documentation_url, + server_url=server_url, + title=title, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + documentation_url: Optional[str] = None, + server_url: Optional[str] = None, + title: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if documentation_url is None and 'documentationUrl' in kwargs: + documentation_url = kwargs['documentationUrl'] + if server_url is None and 'serverUrl' in kwargs: + server_url = kwargs['serverUrl'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if documentation_url is not None: - pulumi.set(__self__, "documentation_url", documentation_url) + _setter("documentation_url", documentation_url) if server_url is not None: - pulumi.set(__self__, "server_url", server_url) + _setter("server_url", server_url) if title is not None: - pulumi.set(__self__, "title", title) + _setter("title", title) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -1358,10 +1784,27 @@ def __init__(__self__, *, :param Sequence[str] certificate_ids: Specifies the Spring Cloud Certificate IDs of the Spring Cloud Gateway. :param bool verification_enabled: Specifies whether the client certificate verification is enabled. """ + SpringCloudGatewayClientAuthorization._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_ids=certificate_ids, + verification_enabled=verification_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_ids: Optional[Sequence[str]] = None, + verification_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_ids is None and 'certificateIds' in kwargs: + certificate_ids = kwargs['certificateIds'] + if verification_enabled is None and 'verificationEnabled' in kwargs: + verification_enabled = kwargs['verificationEnabled'] + if certificate_ids is not None: - pulumi.set(__self__, "certificate_ids", certificate_ids) + _setter("certificate_ids", certificate_ids) if verification_enabled is not None: - pulumi.set(__self__, "verification_enabled", verification_enabled) + _setter("verification_enabled", verification_enabled) @property @pulumi.getter(name="certificateIds") @@ -1428,20 +1871,57 @@ def __init__(__self__, *, :param Sequence[str] exposed_headers: HTTP response headers to expose for cross-site requests. :param int max_age_seconds: How long, in seconds, the response from a pre-flight request can be cached by clients. """ + SpringCloudGatewayCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origin_patterns=allowed_origin_patterns, + allowed_origins=allowed_origins, + credentials_allowed=credentials_allowed, + exposed_headers=exposed_headers, + max_age_seconds=max_age_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_headers: Optional[Sequence[str]] = None, + allowed_methods: Optional[Sequence[str]] = None, + allowed_origin_patterns: Optional[Sequence[str]] = None, + allowed_origins: Optional[Sequence[str]] = None, + credentials_allowed: Optional[bool] = None, + exposed_headers: Optional[Sequence[str]] = None, + max_age_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_origin_patterns is None and 'allowedOriginPatterns' in kwargs: + allowed_origin_patterns = kwargs['allowedOriginPatterns'] + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if credentials_allowed is None and 'credentialsAllowed' in kwargs: + credentials_allowed = kwargs['credentialsAllowed'] + if exposed_headers is None and 'exposedHeaders' in kwargs: + exposed_headers = kwargs['exposedHeaders'] + if max_age_seconds is None and 'maxAgeSeconds' in kwargs: + max_age_seconds = kwargs['maxAgeSeconds'] + if allowed_headers is not None: - pulumi.set(__self__, "allowed_headers", allowed_headers) + _setter("allowed_headers", allowed_headers) if allowed_methods is not None: - pulumi.set(__self__, "allowed_methods", allowed_methods) + _setter("allowed_methods", allowed_methods) if allowed_origin_patterns is not None: - pulumi.set(__self__, "allowed_origin_patterns", allowed_origin_patterns) + _setter("allowed_origin_patterns", allowed_origin_patterns) if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if credentials_allowed is not None: - pulumi.set(__self__, "credentials_allowed", credentials_allowed) + _setter("credentials_allowed", credentials_allowed) if exposed_headers is not None: - pulumi.set(__self__, "exposed_headers", exposed_headers) + _setter("exposed_headers", exposed_headers) if max_age_seconds is not None: - pulumi.set(__self__, "max_age_seconds", max_age_seconds) + _setter("max_age_seconds", max_age_seconds) @property @pulumi.getter(name="allowedHeaders") @@ -1513,10 +1993,23 @@ def __init__(__self__, *, > **Note:** `memory` supports `512Mi`, `1Gi` and `2Gi` for Basic tier, `512Mi`, `1Gi`, `2Gi`, `3Gi`, `4Gi`, `5Gi`, `6Gi`, `7Gi`, and `8Gi` for Standard tier. """ + SpringCloudGatewayQuota._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + memory=memory, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[str] = None, + memory: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is not None: - pulumi.set(__self__, "cpu", cpu) + _setter("cpu", cpu) if memory is not None: - pulumi.set(__self__, "memory", memory) + _setter("memory", memory) @property @pulumi.getter @@ -1546,8 +2039,19 @@ def __init__(__self__, *, """ :param str uri: The URI of OpenAPI specification. """ + SpringCloudGatewayRouteConfigOpenApi._configure( + lambda key, value: pulumi.set(__self__, key, value), + uri=uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + uri: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if uri is not None: - pulumi.set(__self__, "uri", uri) + _setter("uri", uri) @property @pulumi.getter @@ -1602,23 +2106,58 @@ def __init__(__self__, *, :param bool token_relay: Should pass currently-authenticated user's identity token to application service? :param str uri: Specifies the full uri which will override `appName`. """ - pulumi.set(__self__, "order", order) + SpringCloudGatewayRouteConfigRoute._configure( + lambda key, value: pulumi.set(__self__, key, value), + order=order, + classification_tags=classification_tags, + description=description, + filters=filters, + predicates=predicates, + sso_validation_enabled=sso_validation_enabled, + title=title, + token_relay=token_relay, + uri=uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + order: Optional[int] = None, + classification_tags: Optional[Sequence[str]] = None, + description: Optional[str] = None, + filters: Optional[Sequence[str]] = None, + predicates: Optional[Sequence[str]] = None, + sso_validation_enabled: Optional[bool] = None, + title: Optional[str] = None, + token_relay: Optional[bool] = None, + uri: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if order is None: + raise TypeError("Missing 'order' argument") + if classification_tags is None and 'classificationTags' in kwargs: + classification_tags = kwargs['classificationTags'] + if sso_validation_enabled is None and 'ssoValidationEnabled' in kwargs: + sso_validation_enabled = kwargs['ssoValidationEnabled'] + if token_relay is None and 'tokenRelay' in kwargs: + token_relay = kwargs['tokenRelay'] + + _setter("order", order) if classification_tags is not None: - pulumi.set(__self__, "classification_tags", classification_tags) + _setter("classification_tags", classification_tags) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) if predicates is not None: - pulumi.set(__self__, "predicates", predicates) + _setter("predicates", predicates) if sso_validation_enabled is not None: - pulumi.set(__self__, "sso_validation_enabled", sso_validation_enabled) + _setter("sso_validation_enabled", sso_validation_enabled) if title is not None: - pulumi.set(__self__, "title", title) + _setter("title", title) if token_relay is not None: - pulumi.set(__self__, "token_relay", token_relay) + _setter("token_relay", token_relay) if uri is not None: - pulumi.set(__self__, "uri", uri) + _setter("uri", uri) @property @pulumi.getter @@ -1727,14 +2266,37 @@ def __init__(__self__, *, :param str issuer_uri: The URI of Issuer Identifier. :param Sequence[str] scopes: It defines the specific actions applications can be allowed to do on a user's behalf. """ + SpringCloudGatewaySso._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + issuer_uri=issuer_uri, + scopes=scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + issuer_uri: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if issuer_uri is None and 'issuerUri' in kwargs: + issuer_uri = kwargs['issuerUri'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if issuer_uri is not None: - pulumi.set(__self__, "issuer_uri", issuer_uri) + _setter("issuer_uri", issuer_uri) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) @property @pulumi.getter(name="clientId") @@ -1782,10 +2344,23 @@ def __init__(__self__, *, > **Note:** `memory` supports `512Mi`, `1Gi` and `2Gi` for Basic tier, `512Mi`, `1Gi`, `2Gi`, `3Gi`, `4Gi`, `5Gi`, `6Gi`, `7Gi`, and `8Gi` for Standard tier. """ + SpringCloudJavaDeploymentQuota._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + memory=memory, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[str] = None, + memory: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is not None: - pulumi.set(__self__, "cpu", cpu) + _setter("cpu", cpu) if memory is not None: - pulumi.set(__self__, "memory", memory) + _setter("memory", memory) @property @pulumi.getter @@ -1846,17 +2421,46 @@ def __init__(__self__, *, :param Sequence[str] search_paths: An array of strings used to search subdirectories of the Git repository. :param 'SpringCloudServiceConfigServerGitSettingSshAuthArgs' ssh_auth: A `ssh_auth` block as defined below. """ - pulumi.set(__self__, "uri", uri) + SpringCloudServiceConfigServerGitSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + uri=uri, + http_basic_auth=http_basic_auth, + label=label, + repositories=repositories, + search_paths=search_paths, + ssh_auth=ssh_auth, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + uri: Optional[str] = None, + http_basic_auth: Optional['outputs.SpringCloudServiceConfigServerGitSettingHttpBasicAuth'] = None, + label: Optional[str] = None, + repositories: Optional[Sequence['outputs.SpringCloudServiceConfigServerGitSettingRepository']] = None, + search_paths: Optional[Sequence[str]] = None, + ssh_auth: Optional['outputs.SpringCloudServiceConfigServerGitSettingSshAuth'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if uri is None: + raise TypeError("Missing 'uri' argument") + if http_basic_auth is None and 'httpBasicAuth' in kwargs: + http_basic_auth = kwargs['httpBasicAuth'] + if search_paths is None and 'searchPaths' in kwargs: + search_paths = kwargs['searchPaths'] + if ssh_auth is None and 'sshAuth' in kwargs: + ssh_auth = kwargs['sshAuth'] + + _setter("uri", uri) if http_basic_auth is not None: - pulumi.set(__self__, "http_basic_auth", http_basic_auth) + _setter("http_basic_auth", http_basic_auth) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if repositories is not None: - pulumi.set(__self__, "repositories", repositories) + _setter("repositories", repositories) if search_paths is not None: - pulumi.set(__self__, "search_paths", search_paths) + _setter("search_paths", search_paths) if ssh_auth is not None: - pulumi.set(__self__, "ssh_auth", ssh_auth) + _setter("ssh_auth", ssh_auth) @property @pulumi.getter @@ -1916,8 +2520,25 @@ def __init__(__self__, *, :param str password: The password used to access the Git repository server, required when the Git repository server supports HTTP Basic Authentication. :param str username: The username that's used to access the Git repository server, required when the Git repository server supports HTTP Basic Authentication. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + SpringCloudServiceConfigServerGitSettingHttpBasicAuth._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -1976,18 +2597,51 @@ def __init__(__self__, *, :param Sequence[str] search_paths: An array of strings used to search subdirectories of the Git repository. :param 'SpringCloudServiceConfigServerGitSettingRepositorySshAuthArgs' ssh_auth: A `ssh_auth` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + SpringCloudServiceConfigServerGitSettingRepository._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + http_basic_auth=http_basic_auth, + label=label, + patterns=patterns, + search_paths=search_paths, + ssh_auth=ssh_auth, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + http_basic_auth: Optional['outputs.SpringCloudServiceConfigServerGitSettingRepositoryHttpBasicAuth'] = None, + label: Optional[str] = None, + patterns: Optional[Sequence[str]] = None, + search_paths: Optional[Sequence[str]] = None, + ssh_auth: Optional['outputs.SpringCloudServiceConfigServerGitSettingRepositorySshAuth'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + if http_basic_auth is None and 'httpBasicAuth' in kwargs: + http_basic_auth = kwargs['httpBasicAuth'] + if search_paths is None and 'searchPaths' in kwargs: + search_paths = kwargs['searchPaths'] + if ssh_auth is None and 'sshAuth' in kwargs: + ssh_auth = kwargs['sshAuth'] + + _setter("name", name) + _setter("uri", uri) if http_basic_auth is not None: - pulumi.set(__self__, "http_basic_auth", http_basic_auth) + _setter("http_basic_auth", http_basic_auth) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if patterns is not None: - pulumi.set(__self__, "patterns", patterns) + _setter("patterns", patterns) if search_paths is not None: - pulumi.set(__self__, "search_paths", search_paths) + _setter("search_paths", search_paths) if ssh_auth is not None: - pulumi.set(__self__, "ssh_auth", ssh_auth) + _setter("ssh_auth", ssh_auth) @property @pulumi.getter @@ -2055,8 +2709,25 @@ def __init__(__self__, *, :param str password: The password used to access the Git repository server, required when the Git repository server supports HTTP Basic Authentication. :param str username: The username that's used to access the Git repository server, required when the Git repository server supports HTTP Basic Authentication. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + SpringCloudServiceConfigServerGitSettingRepositoryHttpBasicAuth._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -2111,13 +2782,40 @@ def __init__(__self__, *, :param str host_key_algorithm: The host key algorithm, should be `ssh-dss`, `ssh-rsa`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`. Required only if `host-key` exists. :param bool strict_host_key_checking_enabled: Indicates whether the Config Server instance will fail to start if the host_key does not match. Defaults to `true`. """ - pulumi.set(__self__, "private_key", private_key) + SpringCloudServiceConfigServerGitSettingRepositorySshAuth._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_key=private_key, + host_key=host_key, + host_key_algorithm=host_key_algorithm, + strict_host_key_checking_enabled=strict_host_key_checking_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_key: Optional[str] = None, + host_key: Optional[str] = None, + host_key_algorithm: Optional[str] = None, + strict_host_key_checking_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_key is None and 'privateKey' in kwargs: + private_key = kwargs['privateKey'] + if private_key is None: + raise TypeError("Missing 'private_key' argument") + if host_key is None and 'hostKey' in kwargs: + host_key = kwargs['hostKey'] + if host_key_algorithm is None and 'hostKeyAlgorithm' in kwargs: + host_key_algorithm = kwargs['hostKeyAlgorithm'] + if strict_host_key_checking_enabled is None and 'strictHostKeyCheckingEnabled' in kwargs: + strict_host_key_checking_enabled = kwargs['strictHostKeyCheckingEnabled'] + + _setter("private_key", private_key) if host_key is not None: - pulumi.set(__self__, "host_key", host_key) + _setter("host_key", host_key) if host_key_algorithm is not None: - pulumi.set(__self__, "host_key_algorithm", host_key_algorithm) + _setter("host_key_algorithm", host_key_algorithm) if strict_host_key_checking_enabled is not None: - pulumi.set(__self__, "strict_host_key_checking_enabled", strict_host_key_checking_enabled) + _setter("strict_host_key_checking_enabled", strict_host_key_checking_enabled) @property @pulumi.getter(name="privateKey") @@ -2188,13 +2886,40 @@ def __init__(__self__, *, :param str host_key_algorithm: The host key algorithm, should be `ssh-dss`, `ssh-rsa`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`. Required only if `host-key` exists. :param bool strict_host_key_checking_enabled: Indicates whether the Config Server instance will fail to start if the host_key does not match. Defaults to `true`. """ - pulumi.set(__self__, "private_key", private_key) + SpringCloudServiceConfigServerGitSettingSshAuth._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_key=private_key, + host_key=host_key, + host_key_algorithm=host_key_algorithm, + strict_host_key_checking_enabled=strict_host_key_checking_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_key: Optional[str] = None, + host_key: Optional[str] = None, + host_key_algorithm: Optional[str] = None, + strict_host_key_checking_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_key is None and 'privateKey' in kwargs: + private_key = kwargs['privateKey'] + if private_key is None: + raise TypeError("Missing 'private_key' argument") + if host_key is None and 'hostKey' in kwargs: + host_key = kwargs['hostKey'] + if host_key_algorithm is None and 'hostKeyAlgorithm' in kwargs: + host_key_algorithm = kwargs['hostKeyAlgorithm'] + if strict_host_key_checking_enabled is None and 'strictHostKeyCheckingEnabled' in kwargs: + strict_host_key_checking_enabled = kwargs['strictHostKeyCheckingEnabled'] + + _setter("private_key", private_key) if host_key is not None: - pulumi.set(__self__, "host_key", host_key) + _setter("host_key", host_key) if host_key_algorithm is not None: - pulumi.set(__self__, "host_key_algorithm", host_key_algorithm) + _setter("host_key_algorithm", host_key_algorithm) if strict_host_key_checking_enabled is not None: - pulumi.set(__self__, "strict_host_key_checking_enabled", strict_host_key_checking_enabled) + _setter("strict_host_key_checking_enabled", strict_host_key_checking_enabled) @property @pulumi.getter(name="privateKey") @@ -2242,10 +2967,35 @@ def __init__(__self__, *, :param str server: Specifies the login server of the container registry. :param str username: Specifies the username of the container registry. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + SpringCloudServiceContainerRegistry._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("name", name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter @@ -2304,8 +3054,21 @@ def __init__(__self__, *, """ :param str container_registry_name: Specifies the name of the container registry used in the default build service. """ + SpringCloudServiceDefaultBuildService._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_registry_name=container_registry_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_registry_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_registry_name is None and 'containerRegistryName' in kwargs: + container_registry_name = kwargs['containerRegistryName'] + if container_registry_name is not None: - pulumi.set(__self__, "container_registry_name", container_registry_name) + _setter("container_registry_name", container_registry_name) @property @pulumi.getter(name="containerRegistryName") @@ -2327,9 +3090,30 @@ def __init__(__self__, *, :param str product: Specifies the 3rd Party artifact that is being procured. :param str publisher: Specifies the publisher ID of the 3rd Party Artifact that is being procured. """ - pulumi.set(__self__, "plan", plan) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + SpringCloudServiceMarketplace._configure( + lambda key, value: pulumi.set(__self__, key, value), + plan=plan, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + plan: Optional[str] = None, + product: Optional[str] = None, + publisher: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if plan is None: + raise TypeError("Missing 'plan' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("plan", plan) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -2404,17 +3188,60 @@ def __init__(__self__, *, :param int read_timeout_seconds: Ingress read time out in seconds. :param str service_runtime_network_resource_group: Specifies the Name of the resource group containing network resources of Azure Spring Cloud Service Runtime. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "app_subnet_id", app_subnet_id) - pulumi.set(__self__, "cidr_ranges", cidr_ranges) - pulumi.set(__self__, "service_runtime_subnet_id", service_runtime_subnet_id) + SpringCloudServiceNetwork._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_subnet_id=app_subnet_id, + cidr_ranges=cidr_ranges, + service_runtime_subnet_id=service_runtime_subnet_id, + app_network_resource_group=app_network_resource_group, + outbound_type=outbound_type, + read_timeout_seconds=read_timeout_seconds, + service_runtime_network_resource_group=service_runtime_network_resource_group, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_subnet_id: Optional[str] = None, + cidr_ranges: Optional[Sequence[str]] = None, + service_runtime_subnet_id: Optional[str] = None, + app_network_resource_group: Optional[str] = None, + outbound_type: Optional[str] = None, + read_timeout_seconds: Optional[int] = None, + service_runtime_network_resource_group: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_subnet_id is None and 'appSubnetId' in kwargs: + app_subnet_id = kwargs['appSubnetId'] + if app_subnet_id is None: + raise TypeError("Missing 'app_subnet_id' argument") + if cidr_ranges is None and 'cidrRanges' in kwargs: + cidr_ranges = kwargs['cidrRanges'] + if cidr_ranges is None: + raise TypeError("Missing 'cidr_ranges' argument") + if service_runtime_subnet_id is None and 'serviceRuntimeSubnetId' in kwargs: + service_runtime_subnet_id = kwargs['serviceRuntimeSubnetId'] + if service_runtime_subnet_id is None: + raise TypeError("Missing 'service_runtime_subnet_id' argument") + if app_network_resource_group is None and 'appNetworkResourceGroup' in kwargs: + app_network_resource_group = kwargs['appNetworkResourceGroup'] + if outbound_type is None and 'outboundType' in kwargs: + outbound_type = kwargs['outboundType'] + if read_timeout_seconds is None and 'readTimeoutSeconds' in kwargs: + read_timeout_seconds = kwargs['readTimeoutSeconds'] + if service_runtime_network_resource_group is None and 'serviceRuntimeNetworkResourceGroup' in kwargs: + service_runtime_network_resource_group = kwargs['serviceRuntimeNetworkResourceGroup'] + + _setter("app_subnet_id", app_subnet_id) + _setter("cidr_ranges", cidr_ranges) + _setter("service_runtime_subnet_id", service_runtime_subnet_id) if app_network_resource_group is not None: - pulumi.set(__self__, "app_network_resource_group", app_network_resource_group) + _setter("app_network_resource_group", app_network_resource_group) if outbound_type is not None: - pulumi.set(__self__, "outbound_type", outbound_type) + _setter("outbound_type", outbound_type) if read_timeout_seconds is not None: - pulumi.set(__self__, "read_timeout_seconds", read_timeout_seconds) + _setter("read_timeout_seconds", read_timeout_seconds) if service_runtime_network_resource_group is not None: - pulumi.set(__self__, "service_runtime_network_resource_group", service_runtime_network_resource_group) + _setter("service_runtime_network_resource_group", service_runtime_network_resource_group) @property @pulumi.getter(name="appSubnetId") @@ -2505,16 +3332,37 @@ def __init__(__self__, *, :param int port: The port of required traffic. :param str protocol: The protocol of required traffic. """ + SpringCloudServiceRequiredNetworkTrafficRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + direction=direction, + fqdns=fqdns, + ip_addresses=ip_addresses, + port=port, + protocol=protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + direction: Optional[str] = None, + fqdns: Optional[Sequence[str]] = None, + ip_addresses: Optional[Sequence[str]] = None, + port: Optional[int] = None, + protocol: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if direction is not None: - pulumi.set(__self__, "direction", direction) + _setter("direction", direction) if fqdns is not None: - pulumi.set(__self__, "fqdns", fqdns) + _setter("fqdns", fqdns) if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) @property @pulumi.getter @@ -2585,10 +3433,27 @@ def __init__(__self__, *, :param str connection_string: The connection string used for Application Insights. :param float sample_rate: The sampling rate of Application Insights Agent. Must be between `0.0` and `100.0`. Defaults to `10.0`. """ + SpringCloudServiceTrace._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + sample_rate=sample_rate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[str] = None, + sample_rate: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if sample_rate is None and 'sampleRate' in kwargs: + sample_rate = kwargs['sampleRate'] + if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if sample_rate is not None: - pulumi.set(__self__, "sample_rate", sample_rate) + _setter("sample_rate", sample_rate) @property @pulumi.getter(name="connectionString") @@ -2619,10 +3484,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this Spring Cloud Application. :param str type: The Type of Managed Identity assigned to the Spring Cloud Application. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetSpringCloudAppIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -2663,8 +3559,29 @@ def __init__(__self__, *, :param str mount_path: The mount path of the persistent disk. :param int size_in_gb: The size of the persistent disk in GB. """ - pulumi.set(__self__, "mount_path", mount_path) - pulumi.set(__self__, "size_in_gb", size_in_gb) + GetSpringCloudAppPersistentDiskResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + mount_path=mount_path, + size_in_gb=size_in_gb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mount_path: Optional[str] = None, + size_in_gb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + if mount_path is None: + raise TypeError("Missing 'mount_path' argument") + if size_in_gb is None and 'sizeInGb' in kwargs: + size_in_gb = kwargs['sizeInGb'] + if size_in_gb is None: + raise TypeError("Missing 'size_in_gb' argument") + + _setter("mount_path", mount_path) + _setter("size_in_gb", size_in_gb) @property @pulumi.getter(name="mountPath") @@ -2700,12 +3617,51 @@ def __init__(__self__, *, :param Sequence['GetSpringCloudServiceConfigServerGitSettingSshAuthArgs'] ssh_auths: A `ssh_auth` block as defined below. :param str uri: The URI of the Git repository """ - pulumi.set(__self__, "http_basic_auths", http_basic_auths) - pulumi.set(__self__, "label", label) - pulumi.set(__self__, "repositories", repositories) - pulumi.set(__self__, "search_paths", search_paths) - pulumi.set(__self__, "ssh_auths", ssh_auths) - pulumi.set(__self__, "uri", uri) + GetSpringCloudServiceConfigServerGitSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + http_basic_auths=http_basic_auths, + label=label, + repositories=repositories, + search_paths=search_paths, + ssh_auths=ssh_auths, + uri=uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + http_basic_auths: Optional[Sequence['outputs.GetSpringCloudServiceConfigServerGitSettingHttpBasicAuthResult']] = None, + label: Optional[str] = None, + repositories: Optional[Sequence['outputs.GetSpringCloudServiceConfigServerGitSettingRepositoryResult']] = None, + search_paths: Optional[Sequence[str]] = None, + ssh_auths: Optional[Sequence['outputs.GetSpringCloudServiceConfigServerGitSettingSshAuthResult']] = None, + uri: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if http_basic_auths is None and 'httpBasicAuths' in kwargs: + http_basic_auths = kwargs['httpBasicAuths'] + if http_basic_auths is None: + raise TypeError("Missing 'http_basic_auths' argument") + if label is None: + raise TypeError("Missing 'label' argument") + if repositories is None: + raise TypeError("Missing 'repositories' argument") + if search_paths is None and 'searchPaths' in kwargs: + search_paths = kwargs['searchPaths'] + if search_paths is None: + raise TypeError("Missing 'search_paths' argument") + if ssh_auths is None and 'sshAuths' in kwargs: + ssh_auths = kwargs['sshAuths'] + if ssh_auths is None: + raise TypeError("Missing 'ssh_auths' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("http_basic_auths", http_basic_auths) + _setter("label", label) + _setter("repositories", repositories) + _setter("search_paths", search_paths) + _setter("ssh_auths", ssh_auths) + _setter("uri", uri) @property @pulumi.getter(name="httpBasicAuths") @@ -2765,8 +3721,25 @@ def __init__(__self__, *, :param str password: The password used to access the HTTP Basic Authentication Git repository server. :param str username: The username used to access the HTTP Basic Authentication Git repository server. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + GetSpringCloudServiceConfigServerGitSettingHttpBasicAuthResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -2804,13 +3777,56 @@ def __init__(__self__, *, :param Sequence['GetSpringCloudServiceConfigServerGitSettingRepositorySshAuthArgs'] ssh_auths: A `ssh_auth` block as defined below. :param str uri: The URI of the Git repository """ - pulumi.set(__self__, "http_basic_auths", http_basic_auths) - pulumi.set(__self__, "label", label) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "patterns", patterns) - pulumi.set(__self__, "search_paths", search_paths) - pulumi.set(__self__, "ssh_auths", ssh_auths) - pulumi.set(__self__, "uri", uri) + GetSpringCloudServiceConfigServerGitSettingRepositoryResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + http_basic_auths=http_basic_auths, + label=label, + name=name, + patterns=patterns, + search_paths=search_paths, + ssh_auths=ssh_auths, + uri=uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + http_basic_auths: Optional[Sequence['outputs.GetSpringCloudServiceConfigServerGitSettingRepositoryHttpBasicAuthResult']] = None, + label: Optional[str] = None, + name: Optional[str] = None, + patterns: Optional[Sequence[str]] = None, + search_paths: Optional[Sequence[str]] = None, + ssh_auths: Optional[Sequence['outputs.GetSpringCloudServiceConfigServerGitSettingRepositorySshAuthResult']] = None, + uri: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if http_basic_auths is None and 'httpBasicAuths' in kwargs: + http_basic_auths = kwargs['httpBasicAuths'] + if http_basic_auths is None: + raise TypeError("Missing 'http_basic_auths' argument") + if label is None: + raise TypeError("Missing 'label' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if patterns is None: + raise TypeError("Missing 'patterns' argument") + if search_paths is None and 'searchPaths' in kwargs: + search_paths = kwargs['searchPaths'] + if search_paths is None: + raise TypeError("Missing 'search_paths' argument") + if ssh_auths is None and 'sshAuths' in kwargs: + ssh_auths = kwargs['sshAuths'] + if ssh_auths is None: + raise TypeError("Missing 'ssh_auths' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("http_basic_auths", http_basic_auths) + _setter("label", label) + _setter("name", name) + _setter("patterns", patterns) + _setter("search_paths", search_paths) + _setter("ssh_auths", ssh_auths) + _setter("uri", uri) @property @pulumi.getter(name="httpBasicAuths") @@ -2878,8 +3894,25 @@ def __init__(__self__, *, :param str password: The password used to access the HTTP Basic Authentication Git repository server. :param str username: The username used to access the HTTP Basic Authentication Git repository server. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + GetSpringCloudServiceConfigServerGitSettingRepositoryHttpBasicAuthResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -2911,10 +3944,43 @@ def __init__(__self__, *, :param str private_key: The SSH private key to access the Git repository, needed when the URI starts with `git@` or `ssh://`. :param bool strict_host_key_checking_enabled: Indicates whether the Config Server instance will fail to start if the host_key does not match. """ - pulumi.set(__self__, "host_key", host_key) - pulumi.set(__self__, "host_key_algorithm", host_key_algorithm) - pulumi.set(__self__, "private_key", private_key) - pulumi.set(__self__, "strict_host_key_checking_enabled", strict_host_key_checking_enabled) + GetSpringCloudServiceConfigServerGitSettingRepositorySshAuthResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_key=host_key, + host_key_algorithm=host_key_algorithm, + private_key=private_key, + strict_host_key_checking_enabled=strict_host_key_checking_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_key: Optional[str] = None, + host_key_algorithm: Optional[str] = None, + private_key: Optional[str] = None, + strict_host_key_checking_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_key is None and 'hostKey' in kwargs: + host_key = kwargs['hostKey'] + if host_key is None: + raise TypeError("Missing 'host_key' argument") + if host_key_algorithm is None and 'hostKeyAlgorithm' in kwargs: + host_key_algorithm = kwargs['hostKeyAlgorithm'] + if host_key_algorithm is None: + raise TypeError("Missing 'host_key_algorithm' argument") + if private_key is None and 'privateKey' in kwargs: + private_key = kwargs['privateKey'] + if private_key is None: + raise TypeError("Missing 'private_key' argument") + if strict_host_key_checking_enabled is None and 'strictHostKeyCheckingEnabled' in kwargs: + strict_host_key_checking_enabled = kwargs['strictHostKeyCheckingEnabled'] + if strict_host_key_checking_enabled is None: + raise TypeError("Missing 'strict_host_key_checking_enabled' argument") + + _setter("host_key", host_key) + _setter("host_key_algorithm", host_key_algorithm) + _setter("private_key", private_key) + _setter("strict_host_key_checking_enabled", strict_host_key_checking_enabled) @property @pulumi.getter(name="hostKey") @@ -2962,10 +4028,43 @@ def __init__(__self__, *, :param str private_key: The SSH private key to access the Git repository, needed when the URI starts with `git@` or `ssh://`. :param bool strict_host_key_checking_enabled: Indicates whether the Config Server instance will fail to start if the host_key does not match. """ - pulumi.set(__self__, "host_key", host_key) - pulumi.set(__self__, "host_key_algorithm", host_key_algorithm) - pulumi.set(__self__, "private_key", private_key) - pulumi.set(__self__, "strict_host_key_checking_enabled", strict_host_key_checking_enabled) + GetSpringCloudServiceConfigServerGitSettingSshAuthResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_key=host_key, + host_key_algorithm=host_key_algorithm, + private_key=private_key, + strict_host_key_checking_enabled=strict_host_key_checking_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_key: Optional[str] = None, + host_key_algorithm: Optional[str] = None, + private_key: Optional[str] = None, + strict_host_key_checking_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_key is None and 'hostKey' in kwargs: + host_key = kwargs['hostKey'] + if host_key is None: + raise TypeError("Missing 'host_key' argument") + if host_key_algorithm is None and 'hostKeyAlgorithm' in kwargs: + host_key_algorithm = kwargs['hostKeyAlgorithm'] + if host_key_algorithm is None: + raise TypeError("Missing 'host_key_algorithm' argument") + if private_key is None and 'privateKey' in kwargs: + private_key = kwargs['privateKey'] + if private_key is None: + raise TypeError("Missing 'private_key' argument") + if strict_host_key_checking_enabled is None and 'strictHostKeyCheckingEnabled' in kwargs: + strict_host_key_checking_enabled = kwargs['strictHostKeyCheckingEnabled'] + if strict_host_key_checking_enabled is None: + raise TypeError("Missing 'strict_host_key_checking_enabled' argument") + + _setter("host_key", host_key) + _setter("host_key_algorithm", host_key_algorithm) + _setter("private_key", private_key) + _setter("strict_host_key_checking_enabled", strict_host_key_checking_enabled) @property @pulumi.getter(name="hostKey") @@ -3015,11 +4114,42 @@ def __init__(__self__, *, :param int port: The port of required traffic. :param str protocol: The protocol of required traffic. """ - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "fqdns", fqdns) - pulumi.set(__self__, "ip_addresses", ip_addresses) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "protocol", protocol) + GetSpringCloudServiceRequiredNetworkTrafficRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + direction=direction, + fqdns=fqdns, + ip_addresses=ip_addresses, + port=port, + protocol=protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + direction: Optional[str] = None, + fqdns: Optional[Sequence[str]] = None, + ip_addresses: Optional[Sequence[str]] = None, + port: Optional[int] = None, + protocol: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if direction is None: + raise TypeError("Missing 'direction' argument") + if fqdns is None: + raise TypeError("Missing 'fqdns' argument") + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if ip_addresses is None: + raise TypeError("Missing 'ip_addresses' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + + _setter("direction", direction) + _setter("fqdns", fqdns) + _setter("ip_addresses", ip_addresses) + _setter("port", port) + _setter("protocol", protocol) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_accelerator.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_accelerator.py index af254fadfa..810fa7a28d 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_accelerator.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_accelerator.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SpringCloudAcceleratorArgs', 'SpringCloudAccelerator'] @@ -21,9 +21,26 @@ def __init__(__self__, *, :param pulumi.Input[str] spring_cloud_service_id: The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Accelerator to be created. :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Accelerator. Changing this forces a new Spring Cloud Accelerator to be created. The only possible value is `default`. """ - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + SpringCloudAcceleratorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_service_id=spring_cloud_service_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if spring_cloud_service_id is None: + raise TypeError("Missing 'spring_cloud_service_id' argument") + + _setter("spring_cloud_service_id", spring_cloud_service_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="springCloudServiceId") @@ -60,10 +77,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Accelerator. Changing this forces a new Spring Cloud Accelerator to be created. The only possible value is `default`. :param pulumi.Input[str] spring_cloud_service_id: The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Accelerator to be created. """ + _SpringCloudAcceleratorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + spring_cloud_service_id=spring_cloud_service_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if spring_cloud_service_id is not None: - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + _setter("spring_cloud_service_id", spring_cloud_service_id) @property @pulumi.getter @@ -173,6 +205,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudAcceleratorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_active_deployment.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_active_deployment.py index 228cea4ac8..bed6e8ba4b 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_active_deployment.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_active_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SpringCloudActiveDeploymentArgs', 'SpringCloudActiveDeployment'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] deployment_name: Specifies the name of Spring Cloud Deployment which is going to be active. :param pulumi.Input[str] spring_cloud_app_id: Specifies the id of the Spring Cloud Application. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "deployment_name", deployment_name) - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + SpringCloudActiveDeploymentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + deployment_name=deployment_name, + spring_cloud_app_id=spring_cloud_app_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + deployment_name: Optional[pulumi.Input[str]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if deployment_name is None and 'deploymentName' in kwargs: + deployment_name = kwargs['deploymentName'] + if deployment_name is None: + raise TypeError("Missing 'deployment_name' argument") + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if spring_cloud_app_id is None: + raise TypeError("Missing 'spring_cloud_app_id' argument") + + _setter("deployment_name", deployment_name) + _setter("spring_cloud_app_id", spring_cloud_app_id) @property @pulumi.getter(name="deploymentName") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] deployment_name: Specifies the name of Spring Cloud Deployment which is going to be active. :param pulumi.Input[str] spring_cloud_app_id: Specifies the id of the Spring Cloud Application. Changing this forces a new resource to be created. """ + _SpringCloudActiveDeploymentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + deployment_name=deployment_name, + spring_cloud_app_id=spring_cloud_app_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + deployment_name: Optional[pulumi.Input[str]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if deployment_name is None and 'deploymentName' in kwargs: + deployment_name = kwargs['deploymentName'] + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if deployment_name is not None: - pulumi.set(__self__, "deployment_name", deployment_name) + _setter("deployment_name", deployment_name) if spring_cloud_app_id is not None: - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + _setter("spring_cloud_app_id", spring_cloud_app_id) @property @pulumi.getter(name="deploymentName") @@ -206,6 +244,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudActiveDeploymentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_api_portal.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_api_portal.py index ff3db973b2..1e0da7ae22 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_api_portal.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_api_portal.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,19 +33,54 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Is the public network access enabled? :param pulumi.Input['SpringCloudApiPortalSsoArgs'] sso: A `sso` block as defined below. """ - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + SpringCloudApiPortalArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_service_id=spring_cloud_service_id, + gateway_ids=gateway_ids, + https_only_enabled=https_only_enabled, + instance_count=instance_count, + name=name, + public_network_access_enabled=public_network_access_enabled, + sso=sso, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + gateway_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + https_only_enabled: Optional[pulumi.Input[bool]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + sso: Optional[pulumi.Input['SpringCloudApiPortalSsoArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if spring_cloud_service_id is None: + raise TypeError("Missing 'spring_cloud_service_id' argument") + if gateway_ids is None and 'gatewayIds' in kwargs: + gateway_ids = kwargs['gatewayIds'] + if https_only_enabled is None and 'httpsOnlyEnabled' in kwargs: + https_only_enabled = kwargs['httpsOnlyEnabled'] + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("spring_cloud_service_id", spring_cloud_service_id) if gateway_ids is not None: - pulumi.set(__self__, "gateway_ids", gateway_ids) + _setter("gateway_ids", gateway_ids) if https_only_enabled is not None: - pulumi.set(__self__, "https_only_enabled", https_only_enabled) + _setter("https_only_enabled", https_only_enabled) if instance_count is not None: - pulumi.set(__self__, "instance_count", instance_count) + _setter("instance_count", instance_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if sso is not None: - pulumi.set(__self__, "sso", sso) + _setter("sso", sso) @property @pulumi.getter(name="springCloudServiceId") @@ -154,22 +189,57 @@ def __init__(__self__, *, :param pulumi.Input['SpringCloudApiPortalSsoArgs'] sso: A `sso` block as defined below. :param pulumi.Input[str] url: TODO. """ + _SpringCloudApiPortalState._configure( + lambda key, value: pulumi.set(__self__, key, value), + gateway_ids=gateway_ids, + https_only_enabled=https_only_enabled, + instance_count=instance_count, + name=name, + public_network_access_enabled=public_network_access_enabled, + spring_cloud_service_id=spring_cloud_service_id, + sso=sso, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + gateway_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + https_only_enabled: Optional[pulumi.Input[bool]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + sso: Optional[pulumi.Input['SpringCloudApiPortalSsoArgs']] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if gateway_ids is None and 'gatewayIds' in kwargs: + gateway_ids = kwargs['gatewayIds'] + if https_only_enabled is None and 'httpsOnlyEnabled' in kwargs: + https_only_enabled = kwargs['httpsOnlyEnabled'] + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if gateway_ids is not None: - pulumi.set(__self__, "gateway_ids", gateway_ids) + _setter("gateway_ids", gateway_ids) if https_only_enabled is not None: - pulumi.set(__self__, "https_only_enabled", https_only_enabled) + _setter("https_only_enabled", https_only_enabled) if instance_count is not None: - pulumi.set(__self__, "instance_count", instance_count) + _setter("instance_count", instance_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if spring_cloud_service_id is not None: - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + _setter("spring_cloud_service_id", spring_cloud_service_id) if sso is not None: - pulumi.set(__self__, "sso", sso) + _setter("sso", sso) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="gatewayIds") @@ -385,6 +455,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudApiPortalArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -414,6 +488,11 @@ def _internal_init(__self__, if spring_cloud_service_id is None and not opts.urn: raise TypeError("Missing required property 'spring_cloud_service_id'") __props__.__dict__["spring_cloud_service_id"] = spring_cloud_service_id + if sso is not None and not isinstance(sso, SpringCloudApiPortalSsoArgs): + sso = sso or {} + def _setter(key, value): + sso[key] = value + SpringCloudApiPortalSsoArgs._configure(_setter, **sso) __props__.__dict__["sso"] = sso __props__.__dict__["url"] = None super(SpringCloudApiPortal, __self__).__init__( diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_api_portal_custom_domain.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_api_portal_custom_domain.py index e7b683c202..89cb285696 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_api_portal_custom_domain.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_api_portal_custom_domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SpringCloudApiPortalCustomDomainArgs', 'SpringCloudApiPortalCustomDomain'] @@ -23,11 +23,30 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Spring Cloud API Portal Domain. Changing this forces a new Spring Cloud API Portal Domain to be created. :param pulumi.Input[str] thumbprint: Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud API Portal Domain. """ - pulumi.set(__self__, "spring_cloud_api_portal_id", spring_cloud_api_portal_id) + SpringCloudApiPortalCustomDomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_api_portal_id=spring_cloud_api_portal_id, + name=name, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_api_portal_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_api_portal_id is None and 'springCloudApiPortalId' in kwargs: + spring_cloud_api_portal_id = kwargs['springCloudApiPortalId'] + if spring_cloud_api_portal_id is None: + raise TypeError("Missing 'spring_cloud_api_portal_id' argument") + + _setter("spring_cloud_api_portal_id", spring_cloud_api_portal_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="springCloudApiPortalId") @@ -78,12 +97,29 @@ def __init__(__self__, *, :param pulumi.Input[str] spring_cloud_api_portal_id: The ID of the Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal Domain to be created. :param pulumi.Input[str] thumbprint: Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud API Portal Domain. """ + _SpringCloudApiPortalCustomDomainState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + spring_cloud_api_portal_id=spring_cloud_api_portal_id, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + spring_cloud_api_portal_id: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_api_portal_id is None and 'springCloudApiPortalId' in kwargs: + spring_cloud_api_portal_id = kwargs['springCloudApiPortalId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if spring_cloud_api_portal_id is not None: - pulumi.set(__self__, "spring_cloud_api_portal_id", spring_cloud_api_portal_id) + _setter("spring_cloud_api_portal_id", spring_cloud_api_portal_id) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter @@ -215,6 +251,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudApiPortalCustomDomainArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_app.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_app.py index 16b674b485..1c25f7a569 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_app.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,28 +43,85 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_endpoint_enabled: Should the App in vnet injection instance exposes endpoint which could be accessed from Internet? :param pulumi.Input[bool] tls_enabled: Is End to End TLS Enabled? Defaults to `false`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "service_name", service_name) + SpringCloudAppArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + service_name=service_name, + addon_json=addon_json, + custom_persistent_disks=custom_persistent_disks, + https_only=https_only, + identity=identity, + ingress_settings=ingress_settings, + is_public=is_public, + name=name, + persistent_disk=persistent_disk, + public_endpoint_enabled=public_endpoint_enabled, + tls_enabled=tls_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + service_name: Optional[pulumi.Input[str]] = None, + addon_json: Optional[pulumi.Input[str]] = None, + custom_persistent_disks: Optional[pulumi.Input[Sequence[pulumi.Input['SpringCloudAppCustomPersistentDiskArgs']]]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['SpringCloudAppIdentityArgs']] = None, + ingress_settings: Optional[pulumi.Input['SpringCloudAppIngressSettingsArgs']] = None, + is_public: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + persistent_disk: Optional[pulumi.Input['SpringCloudAppPersistentDiskArgs']] = None, + public_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + tls_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if service_name is None and 'serviceName' in kwargs: + service_name = kwargs['serviceName'] + if service_name is None: + raise TypeError("Missing 'service_name' argument") + if addon_json is None and 'addonJson' in kwargs: + addon_json = kwargs['addonJson'] + if custom_persistent_disks is None and 'customPersistentDisks' in kwargs: + custom_persistent_disks = kwargs['customPersistentDisks'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if ingress_settings is None and 'ingressSettings' in kwargs: + ingress_settings = kwargs['ingressSettings'] + if is_public is None and 'isPublic' in kwargs: + is_public = kwargs['isPublic'] + if persistent_disk is None and 'persistentDisk' in kwargs: + persistent_disk = kwargs['persistentDisk'] + if public_endpoint_enabled is None and 'publicEndpointEnabled' in kwargs: + public_endpoint_enabled = kwargs['publicEndpointEnabled'] + if tls_enabled is None and 'tlsEnabled' in kwargs: + tls_enabled = kwargs['tlsEnabled'] + + _setter("resource_group_name", resource_group_name) + _setter("service_name", service_name) if addon_json is not None: - pulumi.set(__self__, "addon_json", addon_json) + _setter("addon_json", addon_json) if custom_persistent_disks is not None: - pulumi.set(__self__, "custom_persistent_disks", custom_persistent_disks) + _setter("custom_persistent_disks", custom_persistent_disks) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if ingress_settings is not None: - pulumi.set(__self__, "ingress_settings", ingress_settings) + _setter("ingress_settings", ingress_settings) if is_public is not None: - pulumi.set(__self__, "is_public", is_public) + _setter("is_public", is_public) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if persistent_disk is not None: - pulumi.set(__self__, "persistent_disk", persistent_disk) + _setter("persistent_disk", persistent_disk) if public_endpoint_enabled is not None: - pulumi.set(__self__, "public_endpoint_enabled", public_endpoint_enabled) + _setter("public_endpoint_enabled", public_endpoint_enabled) if tls_enabled is not None: - pulumi.set(__self__, "tls_enabled", tls_enabled) + _setter("tls_enabled", tls_enabled) @property @pulumi.getter(name="resourceGroupName") @@ -245,34 +302,91 @@ def __init__(__self__, *, :param pulumi.Input[bool] tls_enabled: Is End to End TLS Enabled? Defaults to `false`. :param pulumi.Input[str] url: The public endpoint of the Spring Cloud Application. """ + _SpringCloudAppState._configure( + lambda key, value: pulumi.set(__self__, key, value), + addon_json=addon_json, + custom_persistent_disks=custom_persistent_disks, + fqdn=fqdn, + https_only=https_only, + identity=identity, + ingress_settings=ingress_settings, + is_public=is_public, + name=name, + persistent_disk=persistent_disk, + public_endpoint_enabled=public_endpoint_enabled, + resource_group_name=resource_group_name, + service_name=service_name, + tls_enabled=tls_enabled, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + addon_json: Optional[pulumi.Input[str]] = None, + custom_persistent_disks: Optional[pulumi.Input[Sequence[pulumi.Input['SpringCloudAppCustomPersistentDiskArgs']]]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['SpringCloudAppIdentityArgs']] = None, + ingress_settings: Optional[pulumi.Input['SpringCloudAppIngressSettingsArgs']] = None, + is_public: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + persistent_disk: Optional[pulumi.Input['SpringCloudAppPersistentDiskArgs']] = None, + public_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_name: Optional[pulumi.Input[str]] = None, + tls_enabled: Optional[pulumi.Input[bool]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if addon_json is None and 'addonJson' in kwargs: + addon_json = kwargs['addonJson'] + if custom_persistent_disks is None and 'customPersistentDisks' in kwargs: + custom_persistent_disks = kwargs['customPersistentDisks'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if ingress_settings is None and 'ingressSettings' in kwargs: + ingress_settings = kwargs['ingressSettings'] + if is_public is None and 'isPublic' in kwargs: + is_public = kwargs['isPublic'] + if persistent_disk is None and 'persistentDisk' in kwargs: + persistent_disk = kwargs['persistentDisk'] + if public_endpoint_enabled is None and 'publicEndpointEnabled' in kwargs: + public_endpoint_enabled = kwargs['publicEndpointEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_name is None and 'serviceName' in kwargs: + service_name = kwargs['serviceName'] + if tls_enabled is None and 'tlsEnabled' in kwargs: + tls_enabled = kwargs['tlsEnabled'] + if addon_json is not None: - pulumi.set(__self__, "addon_json", addon_json) + _setter("addon_json", addon_json) if custom_persistent_disks is not None: - pulumi.set(__self__, "custom_persistent_disks", custom_persistent_disks) + _setter("custom_persistent_disks", custom_persistent_disks) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if ingress_settings is not None: - pulumi.set(__self__, "ingress_settings", ingress_settings) + _setter("ingress_settings", ingress_settings) if is_public is not None: - pulumi.set(__self__, "is_public", is_public) + _setter("is_public", is_public) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if persistent_disk is not None: - pulumi.set(__self__, "persistent_disk", persistent_disk) + _setter("persistent_disk", persistent_disk) if public_endpoint_enabled is not None: - pulumi.set(__self__, "public_endpoint_enabled", public_endpoint_enabled) + _setter("public_endpoint_enabled", public_endpoint_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_name is not None: - pulumi.set(__self__, "service_name", service_name) + _setter("service_name", service_name) if tls_enabled is not None: - pulumi.set(__self__, "tls_enabled", tls_enabled) + _setter("tls_enabled", tls_enabled) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="addonJson") @@ -550,6 +664,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudAppArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -579,10 +697,25 @@ def _internal_init(__self__, __props__.__dict__["addon_json"] = addon_json __props__.__dict__["custom_persistent_disks"] = custom_persistent_disks __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, SpringCloudAppIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + SpringCloudAppIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity + if ingress_settings is not None and not isinstance(ingress_settings, SpringCloudAppIngressSettingsArgs): + ingress_settings = ingress_settings or {} + def _setter(key, value): + ingress_settings[key] = value + SpringCloudAppIngressSettingsArgs._configure(_setter, **ingress_settings) __props__.__dict__["ingress_settings"] = ingress_settings __props__.__dict__["is_public"] = is_public __props__.__dict__["name"] = name + if persistent_disk is not None and not isinstance(persistent_disk, SpringCloudAppPersistentDiskArgs): + persistent_disk = persistent_disk or {} + def _setter(key, value): + persistent_disk[key] = value + SpringCloudAppPersistentDiskArgs._configure(_setter, **persistent_disk) __props__.__dict__["persistent_disk"] = persistent_disk __props__.__dict__["public_endpoint_enabled"] = public_endpoint_enabled if resource_group_name is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_app_cosmos_dbassociation.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_app_cosmos_dbassociation.py index 725bfc4e70..6469cc5889 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_app_cosmos_dbassociation.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_app_cosmos_dbassociation.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SpringCloudAppCosmosDBAssociationArgs', 'SpringCloudAppCosmosDBAssociation'] @@ -37,22 +37,77 @@ def __init__(__self__, *, :param pulumi.Input[str] cosmosdb_sql_database_name: Specifies the name of the SQL Database which the Spring Cloud App should be associated with. Should only be set when `api_type` is `sql`. :param pulumi.Input[str] name: Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "api_type", api_type) - pulumi.set(__self__, "cosmosdb_access_key", cosmosdb_access_key) - pulumi.set(__self__, "cosmosdb_account_id", cosmosdb_account_id) - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + SpringCloudAppCosmosDBAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_type=api_type, + cosmosdb_access_key=cosmosdb_access_key, + cosmosdb_account_id=cosmosdb_account_id, + spring_cloud_app_id=spring_cloud_app_id, + cosmosdb_cassandra_keyspace_name=cosmosdb_cassandra_keyspace_name, + cosmosdb_gremlin_database_name=cosmosdb_gremlin_database_name, + cosmosdb_gremlin_graph_name=cosmosdb_gremlin_graph_name, + cosmosdb_mongo_database_name=cosmosdb_mongo_database_name, + cosmosdb_sql_database_name=cosmosdb_sql_database_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_type: Optional[pulumi.Input[str]] = None, + cosmosdb_access_key: Optional[pulumi.Input[str]] = None, + cosmosdb_account_id: Optional[pulumi.Input[str]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + cosmosdb_cassandra_keyspace_name: Optional[pulumi.Input[str]] = None, + cosmosdb_gremlin_database_name: Optional[pulumi.Input[str]] = None, + cosmosdb_gremlin_graph_name: Optional[pulumi.Input[str]] = None, + cosmosdb_mongo_database_name: Optional[pulumi.Input[str]] = None, + cosmosdb_sql_database_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_type is None and 'apiType' in kwargs: + api_type = kwargs['apiType'] + if api_type is None: + raise TypeError("Missing 'api_type' argument") + if cosmosdb_access_key is None and 'cosmosdbAccessKey' in kwargs: + cosmosdb_access_key = kwargs['cosmosdbAccessKey'] + if cosmosdb_access_key is None: + raise TypeError("Missing 'cosmosdb_access_key' argument") + if cosmosdb_account_id is None and 'cosmosdbAccountId' in kwargs: + cosmosdb_account_id = kwargs['cosmosdbAccountId'] + if cosmosdb_account_id is None: + raise TypeError("Missing 'cosmosdb_account_id' argument") + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if spring_cloud_app_id is None: + raise TypeError("Missing 'spring_cloud_app_id' argument") + if cosmosdb_cassandra_keyspace_name is None and 'cosmosdbCassandraKeyspaceName' in kwargs: + cosmosdb_cassandra_keyspace_name = kwargs['cosmosdbCassandraKeyspaceName'] + if cosmosdb_gremlin_database_name is None and 'cosmosdbGremlinDatabaseName' in kwargs: + cosmosdb_gremlin_database_name = kwargs['cosmosdbGremlinDatabaseName'] + if cosmosdb_gremlin_graph_name is None and 'cosmosdbGremlinGraphName' in kwargs: + cosmosdb_gremlin_graph_name = kwargs['cosmosdbGremlinGraphName'] + if cosmosdb_mongo_database_name is None and 'cosmosdbMongoDatabaseName' in kwargs: + cosmosdb_mongo_database_name = kwargs['cosmosdbMongoDatabaseName'] + if cosmosdb_sql_database_name is None and 'cosmosdbSqlDatabaseName' in kwargs: + cosmosdb_sql_database_name = kwargs['cosmosdbSqlDatabaseName'] + + _setter("api_type", api_type) + _setter("cosmosdb_access_key", cosmosdb_access_key) + _setter("cosmosdb_account_id", cosmosdb_account_id) + _setter("spring_cloud_app_id", spring_cloud_app_id) if cosmosdb_cassandra_keyspace_name is not None: - pulumi.set(__self__, "cosmosdb_cassandra_keyspace_name", cosmosdb_cassandra_keyspace_name) + _setter("cosmosdb_cassandra_keyspace_name", cosmosdb_cassandra_keyspace_name) if cosmosdb_gremlin_database_name is not None: - pulumi.set(__self__, "cosmosdb_gremlin_database_name", cosmosdb_gremlin_database_name) + _setter("cosmosdb_gremlin_database_name", cosmosdb_gremlin_database_name) if cosmosdb_gremlin_graph_name is not None: - pulumi.set(__self__, "cosmosdb_gremlin_graph_name", cosmosdb_gremlin_graph_name) + _setter("cosmosdb_gremlin_graph_name", cosmosdb_gremlin_graph_name) if cosmosdb_mongo_database_name is not None: - pulumi.set(__self__, "cosmosdb_mongo_database_name", cosmosdb_mongo_database_name) + _setter("cosmosdb_mongo_database_name", cosmosdb_mongo_database_name) if cosmosdb_sql_database_name is not None: - pulumi.set(__self__, "cosmosdb_sql_database_name", cosmosdb_sql_database_name) + _setter("cosmosdb_sql_database_name", cosmosdb_sql_database_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="apiType") @@ -201,26 +256,73 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created. :param pulumi.Input[str] spring_cloud_app_id: Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created. """ + _SpringCloudAppCosmosDBAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_type=api_type, + cosmosdb_access_key=cosmosdb_access_key, + cosmosdb_account_id=cosmosdb_account_id, + cosmosdb_cassandra_keyspace_name=cosmosdb_cassandra_keyspace_name, + cosmosdb_gremlin_database_name=cosmosdb_gremlin_database_name, + cosmosdb_gremlin_graph_name=cosmosdb_gremlin_graph_name, + cosmosdb_mongo_database_name=cosmosdb_mongo_database_name, + cosmosdb_sql_database_name=cosmosdb_sql_database_name, + name=name, + spring_cloud_app_id=spring_cloud_app_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_type: Optional[pulumi.Input[str]] = None, + cosmosdb_access_key: Optional[pulumi.Input[str]] = None, + cosmosdb_account_id: Optional[pulumi.Input[str]] = None, + cosmosdb_cassandra_keyspace_name: Optional[pulumi.Input[str]] = None, + cosmosdb_gremlin_database_name: Optional[pulumi.Input[str]] = None, + cosmosdb_gremlin_graph_name: Optional[pulumi.Input[str]] = None, + cosmosdb_mongo_database_name: Optional[pulumi.Input[str]] = None, + cosmosdb_sql_database_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_type is None and 'apiType' in kwargs: + api_type = kwargs['apiType'] + if cosmosdb_access_key is None and 'cosmosdbAccessKey' in kwargs: + cosmosdb_access_key = kwargs['cosmosdbAccessKey'] + if cosmosdb_account_id is None and 'cosmosdbAccountId' in kwargs: + cosmosdb_account_id = kwargs['cosmosdbAccountId'] + if cosmosdb_cassandra_keyspace_name is None and 'cosmosdbCassandraKeyspaceName' in kwargs: + cosmosdb_cassandra_keyspace_name = kwargs['cosmosdbCassandraKeyspaceName'] + if cosmosdb_gremlin_database_name is None and 'cosmosdbGremlinDatabaseName' in kwargs: + cosmosdb_gremlin_database_name = kwargs['cosmosdbGremlinDatabaseName'] + if cosmosdb_gremlin_graph_name is None and 'cosmosdbGremlinGraphName' in kwargs: + cosmosdb_gremlin_graph_name = kwargs['cosmosdbGremlinGraphName'] + if cosmosdb_mongo_database_name is None and 'cosmosdbMongoDatabaseName' in kwargs: + cosmosdb_mongo_database_name = kwargs['cosmosdbMongoDatabaseName'] + if cosmosdb_sql_database_name is None and 'cosmosdbSqlDatabaseName' in kwargs: + cosmosdb_sql_database_name = kwargs['cosmosdbSqlDatabaseName'] + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if api_type is not None: - pulumi.set(__self__, "api_type", api_type) + _setter("api_type", api_type) if cosmosdb_access_key is not None: - pulumi.set(__self__, "cosmosdb_access_key", cosmosdb_access_key) + _setter("cosmosdb_access_key", cosmosdb_access_key) if cosmosdb_account_id is not None: - pulumi.set(__self__, "cosmosdb_account_id", cosmosdb_account_id) + _setter("cosmosdb_account_id", cosmosdb_account_id) if cosmosdb_cassandra_keyspace_name is not None: - pulumi.set(__self__, "cosmosdb_cassandra_keyspace_name", cosmosdb_cassandra_keyspace_name) + _setter("cosmosdb_cassandra_keyspace_name", cosmosdb_cassandra_keyspace_name) if cosmosdb_gremlin_database_name is not None: - pulumi.set(__self__, "cosmosdb_gremlin_database_name", cosmosdb_gremlin_database_name) + _setter("cosmosdb_gremlin_database_name", cosmosdb_gremlin_database_name) if cosmosdb_gremlin_graph_name is not None: - pulumi.set(__self__, "cosmosdb_gremlin_graph_name", cosmosdb_gremlin_graph_name) + _setter("cosmosdb_gremlin_graph_name", cosmosdb_gremlin_graph_name) if cosmosdb_mongo_database_name is not None: - pulumi.set(__self__, "cosmosdb_mongo_database_name", cosmosdb_mongo_database_name) + _setter("cosmosdb_mongo_database_name", cosmosdb_mongo_database_name) if cosmosdb_sql_database_name is not None: - pulumi.set(__self__, "cosmosdb_sql_database_name", cosmosdb_sql_database_name) + _setter("cosmosdb_sql_database_name", cosmosdb_sql_database_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if spring_cloud_app_id is not None: - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + _setter("spring_cloud_app_id", spring_cloud_app_id) @property @pulumi.getter(name="apiType") @@ -474,6 +576,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudAppCosmosDBAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_app_mysql_association.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_app_mysql_association.py index 55199262f2..99f46af49c 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_app_mysql_association.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_app_mysql_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SpringCloudAppMysqlAssociationArgs', 'SpringCloudAppMysqlAssociation'] @@ -29,13 +29,50 @@ def __init__(__self__, *, :param pulumi.Input[str] username: Specifies the username which should be used when connecting to the MySQL Database from the Spring Cloud App. :param pulumi.Input[str] name: Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "mysql_server_id", mysql_server_id) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) - pulumi.set(__self__, "username", username) + SpringCloudAppMysqlAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + mysql_server_id=mysql_server_id, + password=password, + spring_cloud_app_id=spring_cloud_app_id, + username=username, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + mysql_server_id: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if mysql_server_id is None and 'mysqlServerId' in kwargs: + mysql_server_id = kwargs['mysqlServerId'] + if mysql_server_id is None: + raise TypeError("Missing 'mysql_server_id' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if spring_cloud_app_id is None: + raise TypeError("Missing 'spring_cloud_app_id' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("mysql_server_id", mysql_server_id) + _setter("password", password) + _setter("spring_cloud_app_id", spring_cloud_app_id) + _setter("username", username) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="databaseName") @@ -128,18 +165,45 @@ def __init__(__self__, *, :param pulumi.Input[str] spring_cloud_app_id: Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created. :param pulumi.Input[str] username: Specifies the username which should be used when connecting to the MySQL Database from the Spring Cloud App. """ + _SpringCloudAppMysqlAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + mysql_server_id=mysql_server_id, + name=name, + password=password, + spring_cloud_app_id=spring_cloud_app_id, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + mysql_server_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if mysql_server_id is None and 'mysqlServerId' in kwargs: + mysql_server_id = kwargs['mysqlServerId'] + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if database_name is not None: - pulumi.set(__self__, "database_name", database_name) + _setter("database_name", database_name) if mysql_server_id is not None: - pulumi.set(__self__, "mysql_server_id", mysql_server_id) + _setter("mysql_server_id", mysql_server_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if spring_cloud_app_id is not None: - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + _setter("spring_cloud_app_id", spring_cloud_app_id) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -345,6 +409,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudAppMysqlAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_app_redis_association.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_app_redis_association.py index 957666ac1f..4248bd5733 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_app_redis_association.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_app_redis_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SpringCloudAppRedisAssociationArgs', 'SpringCloudAppRedisAssociation'] @@ -27,13 +27,46 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created. :param pulumi.Input[bool] ssl_enabled: Should SSL be used when connecting to Redis? Defaults to `true`. """ - pulumi.set(__self__, "redis_access_key", redis_access_key) - pulumi.set(__self__, "redis_cache_id", redis_cache_id) - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + SpringCloudAppRedisAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + redis_access_key=redis_access_key, + redis_cache_id=redis_cache_id, + spring_cloud_app_id=spring_cloud_app_id, + name=name, + ssl_enabled=ssl_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + redis_access_key: Optional[pulumi.Input[str]] = None, + redis_cache_id: Optional[pulumi.Input[str]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + ssl_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if redis_access_key is None and 'redisAccessKey' in kwargs: + redis_access_key = kwargs['redisAccessKey'] + if redis_access_key is None: + raise TypeError("Missing 'redis_access_key' argument") + if redis_cache_id is None and 'redisCacheId' in kwargs: + redis_cache_id = kwargs['redisCacheId'] + if redis_cache_id is None: + raise TypeError("Missing 'redis_cache_id' argument") + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if spring_cloud_app_id is None: + raise TypeError("Missing 'spring_cloud_app_id' argument") + if ssl_enabled is None and 'sslEnabled' in kwargs: + ssl_enabled = kwargs['sslEnabled'] + + _setter("redis_access_key", redis_access_key) + _setter("redis_cache_id", redis_cache_id) + _setter("spring_cloud_app_id", spring_cloud_app_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if ssl_enabled is not None: - pulumi.set(__self__, "ssl_enabled", ssl_enabled) + _setter("ssl_enabled", ssl_enabled) @property @pulumi.getter(name="redisAccessKey") @@ -112,16 +145,43 @@ def __init__(__self__, *, :param pulumi.Input[str] spring_cloud_app_id: Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created. :param pulumi.Input[bool] ssl_enabled: Should SSL be used when connecting to Redis? Defaults to `true`. """ + _SpringCloudAppRedisAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + redis_access_key=redis_access_key, + redis_cache_id=redis_cache_id, + spring_cloud_app_id=spring_cloud_app_id, + ssl_enabled=ssl_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + redis_access_key: Optional[pulumi.Input[str]] = None, + redis_cache_id: Optional[pulumi.Input[str]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + ssl_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if redis_access_key is None and 'redisAccessKey' in kwargs: + redis_access_key = kwargs['redisAccessKey'] + if redis_cache_id is None and 'redisCacheId' in kwargs: + redis_cache_id = kwargs['redisCacheId'] + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if ssl_enabled is None and 'sslEnabled' in kwargs: + ssl_enabled = kwargs['sslEnabled'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if redis_access_key is not None: - pulumi.set(__self__, "redis_access_key", redis_access_key) + _setter("redis_access_key", redis_access_key) if redis_cache_id is not None: - pulumi.set(__self__, "redis_cache_id", redis_cache_id) + _setter("redis_cache_id", redis_cache_id) if spring_cloud_app_id is not None: - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + _setter("spring_cloud_app_id", spring_cloud_app_id) if ssl_enabled is not None: - pulumi.set(__self__, "ssl_enabled", ssl_enabled) + _setter("ssl_enabled", ssl_enabled) @property @pulumi.getter @@ -295,6 +355,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudAppRedisAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_application_insights_application_performance_monitoring.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_application_insights_application_performance_monitoring.py index f56099c2e8..0380792fbc 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_application_insights_application_performance_monitoring.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_application_insights_application_performance_monitoring.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SpringCloudApplicationInsightsApplicationPerformanceMonitoringArgs', 'SpringCloudApplicationInsightsApplicationPerformanceMonitoring'] @@ -33,21 +33,62 @@ def __init__(__self__, *, :param pulumi.Input[int] sampling_percentage: Specifies the percentage for fixed-percentage sampling. :param pulumi.Input[int] sampling_requests_per_second: Specifies the number of requests per second for the rate-limited sampling. """ - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + SpringCloudApplicationInsightsApplicationPerformanceMonitoringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_service_id=spring_cloud_service_id, + connection_string=connection_string, + globally_enabled=globally_enabled, + name=name, + role_instance=role_instance, + role_name=role_name, + sampling_percentage=sampling_percentage, + sampling_requests_per_second=sampling_requests_per_second, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + globally_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + role_instance: Optional[pulumi.Input[str]] = None, + role_name: Optional[pulumi.Input[str]] = None, + sampling_percentage: Optional[pulumi.Input[int]] = None, + sampling_requests_per_second: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if spring_cloud_service_id is None: + raise TypeError("Missing 'spring_cloud_service_id' argument") + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if globally_enabled is None and 'globallyEnabled' in kwargs: + globally_enabled = kwargs['globallyEnabled'] + if role_instance is None and 'roleInstance' in kwargs: + role_instance = kwargs['roleInstance'] + if role_name is None and 'roleName' in kwargs: + role_name = kwargs['roleName'] + if sampling_percentage is None and 'samplingPercentage' in kwargs: + sampling_percentage = kwargs['samplingPercentage'] + if sampling_requests_per_second is None and 'samplingRequestsPerSecond' in kwargs: + sampling_requests_per_second = kwargs['samplingRequestsPerSecond'] + + _setter("spring_cloud_service_id", spring_cloud_service_id) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if globally_enabled is not None: - pulumi.set(__self__, "globally_enabled", globally_enabled) + _setter("globally_enabled", globally_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if role_instance is not None: - pulumi.set(__self__, "role_instance", role_instance) + _setter("role_instance", role_instance) if role_name is not None: - pulumi.set(__self__, "role_name", role_name) + _setter("role_name", role_name) if sampling_percentage is not None: - pulumi.set(__self__, "sampling_percentage", sampling_percentage) + _setter("sampling_percentage", sampling_percentage) if sampling_requests_per_second is not None: - pulumi.set(__self__, "sampling_requests_per_second", sampling_requests_per_second) + _setter("sampling_requests_per_second", sampling_requests_per_second) @property @pulumi.getter(name="springCloudServiceId") @@ -168,22 +209,61 @@ def __init__(__self__, *, :param pulumi.Input[int] sampling_requests_per_second: Specifies the number of requests per second for the rate-limited sampling. :param pulumi.Input[str] spring_cloud_service_id: The ID of the Spring Cloud Service. Changing this forces a new resource to be created. """ + _SpringCloudApplicationInsightsApplicationPerformanceMonitoringState._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + globally_enabled=globally_enabled, + name=name, + role_instance=role_instance, + role_name=role_name, + sampling_percentage=sampling_percentage, + sampling_requests_per_second=sampling_requests_per_second, + spring_cloud_service_id=spring_cloud_service_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + globally_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + role_instance: Optional[pulumi.Input[str]] = None, + role_name: Optional[pulumi.Input[str]] = None, + sampling_percentage: Optional[pulumi.Input[int]] = None, + sampling_requests_per_second: Optional[pulumi.Input[int]] = None, + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if globally_enabled is None and 'globallyEnabled' in kwargs: + globally_enabled = kwargs['globallyEnabled'] + if role_instance is None and 'roleInstance' in kwargs: + role_instance = kwargs['roleInstance'] + if role_name is None and 'roleName' in kwargs: + role_name = kwargs['roleName'] + if sampling_percentage is None and 'samplingPercentage' in kwargs: + sampling_percentage = kwargs['samplingPercentage'] + if sampling_requests_per_second is None and 'samplingRequestsPerSecond' in kwargs: + sampling_requests_per_second = kwargs['samplingRequestsPerSecond'] + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if globally_enabled is not None: - pulumi.set(__self__, "globally_enabled", globally_enabled) + _setter("globally_enabled", globally_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if role_instance is not None: - pulumi.set(__self__, "role_instance", role_instance) + _setter("role_instance", role_instance) if role_name is not None: - pulumi.set(__self__, "role_name", role_name) + _setter("role_name", role_name) if sampling_percentage is not None: - pulumi.set(__self__, "sampling_percentage", sampling_percentage) + _setter("sampling_percentage", sampling_percentage) if sampling_requests_per_second is not None: - pulumi.set(__self__, "sampling_requests_per_second", sampling_requests_per_second) + _setter("sampling_requests_per_second", sampling_requests_per_second) if spring_cloud_service_id is not None: - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + _setter("spring_cloud_service_id", spring_cloud_service_id) @property @pulumi.getter(name="connectionString") @@ -399,6 +479,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudApplicationInsightsApplicationPerformanceMonitoringArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_application_live_view.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_application_live_view.py index 130e0bbbb1..8da6dac5c5 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_application_live_view.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_application_live_view.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SpringCloudApplicationLiveViewArgs', 'SpringCloudApplicationLiveView'] @@ -21,9 +21,26 @@ def __init__(__self__, *, :param pulumi.Input[str] spring_cloud_service_id: The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Application Live View to be created. :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Application Live View. Changing this forces a new Spring Cloud Application Live View to be created. The only possible value is `default`. """ - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + SpringCloudApplicationLiveViewArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_service_id=spring_cloud_service_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if spring_cloud_service_id is None: + raise TypeError("Missing 'spring_cloud_service_id' argument") + + _setter("spring_cloud_service_id", spring_cloud_service_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="springCloudServiceId") @@ -60,10 +77,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Application Live View. Changing this forces a new Spring Cloud Application Live View to be created. The only possible value is `default`. :param pulumi.Input[str] spring_cloud_service_id: The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Application Live View to be created. """ + _SpringCloudApplicationLiveViewState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + spring_cloud_service_id=spring_cloud_service_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if spring_cloud_service_id is not None: - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + _setter("spring_cloud_service_id", spring_cloud_service_id) @property @pulumi.getter @@ -173,6 +205,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudApplicationLiveViewArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_build_deployment.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_build_deployment.py index e60d6b5c87..f18fc3bce6 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_build_deployment.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_build_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,18 +33,55 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Build Deployment. Changing this forces a new Spring Cloud Build Deployment to be created. :param pulumi.Input['SpringCloudBuildDeploymentQuotaArgs'] quota: A `quota` block as defined below. """ - pulumi.set(__self__, "build_result_id", build_result_id) - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + SpringCloudBuildDeploymentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + build_result_id=build_result_id, + spring_cloud_app_id=spring_cloud_app_id, + addon_json=addon_json, + environment_variables=environment_variables, + instance_count=instance_count, + name=name, + quota=quota, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + build_result_id: Optional[pulumi.Input[str]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + addon_json: Optional[pulumi.Input[str]] = None, + environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + quota: Optional[pulumi.Input['SpringCloudBuildDeploymentQuotaArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if build_result_id is None and 'buildResultId' in kwargs: + build_result_id = kwargs['buildResultId'] + if build_result_id is None: + raise TypeError("Missing 'build_result_id' argument") + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if spring_cloud_app_id is None: + raise TypeError("Missing 'spring_cloud_app_id' argument") + if addon_json is None and 'addonJson' in kwargs: + addon_json = kwargs['addonJson'] + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + + _setter("build_result_id", build_result_id) + _setter("spring_cloud_app_id", spring_cloud_app_id) if addon_json is not None: - pulumi.set(__self__, "addon_json", addon_json) + _setter("addon_json", addon_json) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if instance_count is not None: - pulumi.set(__self__, "instance_count", instance_count) + _setter("instance_count", instance_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if quota is not None: - pulumi.set(__self__, "quota", quota) + _setter("quota", quota) @property @pulumi.getter(name="buildResultId") @@ -151,20 +188,53 @@ def __init__(__self__, *, :param pulumi.Input['SpringCloudBuildDeploymentQuotaArgs'] quota: A `quota` block as defined below. :param pulumi.Input[str] spring_cloud_app_id: The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Build Deployment to be created. """ + _SpringCloudBuildDeploymentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + addon_json=addon_json, + build_result_id=build_result_id, + environment_variables=environment_variables, + instance_count=instance_count, + name=name, + quota=quota, + spring_cloud_app_id=spring_cloud_app_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + addon_json: Optional[pulumi.Input[str]] = None, + build_result_id: Optional[pulumi.Input[str]] = None, + environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + quota: Optional[pulumi.Input['SpringCloudBuildDeploymentQuotaArgs']] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if addon_json is None and 'addonJson' in kwargs: + addon_json = kwargs['addonJson'] + if build_result_id is None and 'buildResultId' in kwargs: + build_result_id = kwargs['buildResultId'] + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if addon_json is not None: - pulumi.set(__self__, "addon_json", addon_json) + _setter("addon_json", addon_json) if build_result_id is not None: - pulumi.set(__self__, "build_result_id", build_result_id) + _setter("build_result_id", build_result_id) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if instance_count is not None: - pulumi.set(__self__, "instance_count", instance_count) + _setter("instance_count", instance_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if quota is not None: - pulumi.set(__self__, "quota", quota) + _setter("quota", quota) if spring_cloud_app_id is not None: - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + _setter("spring_cloud_app_id", spring_cloud_app_id) @property @pulumi.getter(name="addonJson") @@ -372,6 +442,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudBuildDeploymentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -400,6 +474,11 @@ def _internal_init(__self__, __props__.__dict__["environment_variables"] = environment_variables __props__.__dict__["instance_count"] = instance_count __props__.__dict__["name"] = name + if quota is not None and not isinstance(quota, SpringCloudBuildDeploymentQuotaArgs): + quota = quota or {} + def _setter(key, value): + quota[key] = value + SpringCloudBuildDeploymentQuotaArgs._configure(_setter, **quota) __props__.__dict__["quota"] = quota if spring_cloud_app_id is None and not opts.urn: raise TypeError("Missing required property 'spring_cloud_app_id'") diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_build_pack_binding.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_build_pack_binding.py index fef59d19da..fa94c7bfa1 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_build_pack_binding.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_build_pack_binding.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,13 +27,36 @@ def __init__(__self__, *, :param pulumi.Input['SpringCloudBuildPackBindingLaunchArgs'] launch: A `launch` block as defined below. :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Build Pack Binding. Changing this forces a new Spring Cloud Build Pack Binding to be created. """ - pulumi.set(__self__, "spring_cloud_builder_id", spring_cloud_builder_id) + SpringCloudBuildPackBindingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_builder_id=spring_cloud_builder_id, + binding_type=binding_type, + launch=launch, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_builder_id: Optional[pulumi.Input[str]] = None, + binding_type: Optional[pulumi.Input[str]] = None, + launch: Optional[pulumi.Input['SpringCloudBuildPackBindingLaunchArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_builder_id is None and 'springCloudBuilderId' in kwargs: + spring_cloud_builder_id = kwargs['springCloudBuilderId'] + if spring_cloud_builder_id is None: + raise TypeError("Missing 'spring_cloud_builder_id' argument") + if binding_type is None and 'bindingType' in kwargs: + binding_type = kwargs['bindingType'] + + _setter("spring_cloud_builder_id", spring_cloud_builder_id) if binding_type is not None: - pulumi.set(__self__, "binding_type", binding_type) + _setter("binding_type", binding_type) if launch is not None: - pulumi.set(__self__, "launch", launch) + _setter("launch", launch) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="springCloudBuilderId") @@ -98,14 +121,35 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Build Pack Binding. Changing this forces a new Spring Cloud Build Pack Binding to be created. :param pulumi.Input[str] spring_cloud_builder_id: The ID of the Spring Cloud Builder. Changing this forces a new Spring Cloud Build Pack Binding to be created. """ + _SpringCloudBuildPackBindingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + binding_type=binding_type, + launch=launch, + name=name, + spring_cloud_builder_id=spring_cloud_builder_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + binding_type: Optional[pulumi.Input[str]] = None, + launch: Optional[pulumi.Input['SpringCloudBuildPackBindingLaunchArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + spring_cloud_builder_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if binding_type is None and 'bindingType' in kwargs: + binding_type = kwargs['bindingType'] + if spring_cloud_builder_id is None and 'springCloudBuilderId' in kwargs: + spring_cloud_builder_id = kwargs['springCloudBuilderId'] + if binding_type is not None: - pulumi.set(__self__, "binding_type", binding_type) + _setter("binding_type", binding_type) if launch is not None: - pulumi.set(__self__, "launch", launch) + _setter("launch", launch) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if spring_cloud_builder_id is not None: - pulumi.set(__self__, "spring_cloud_builder_id", spring_cloud_builder_id) + _setter("spring_cloud_builder_id", spring_cloud_builder_id) @property @pulumi.getter(name="bindingType") @@ -287,6 +331,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudBuildPackBindingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -306,6 +354,11 @@ def _internal_init(__self__, __props__ = SpringCloudBuildPackBindingArgs.__new__(SpringCloudBuildPackBindingArgs) __props__.__dict__["binding_type"] = binding_type + if launch is not None and not isinstance(launch, SpringCloudBuildPackBindingLaunchArgs): + launch = launch or {} + def _setter(key, value): + launch[key] = value + SpringCloudBuildPackBindingLaunchArgs._configure(_setter, **launch) __props__.__dict__["launch"] = launch __props__.__dict__["name"] = name if spring_cloud_builder_id is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_builder.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_builder.py index 0cda3f431c..ffec949764 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_builder.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_builder.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,11 +27,38 @@ def __init__(__self__, *, :param pulumi.Input['SpringCloudBuilderStackArgs'] stack: A `stack` block as defined below. :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Builder. Changing this forces a new Spring Cloud Builder to be created. """ - pulumi.set(__self__, "build_pack_groups", build_pack_groups) - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) - pulumi.set(__self__, "stack", stack) + SpringCloudBuilderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + build_pack_groups=build_pack_groups, + spring_cloud_service_id=spring_cloud_service_id, + stack=stack, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + build_pack_groups: Optional[pulumi.Input[Sequence[pulumi.Input['SpringCloudBuilderBuildPackGroupArgs']]]] = None, + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + stack: Optional[pulumi.Input['SpringCloudBuilderStackArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if build_pack_groups is None and 'buildPackGroups' in kwargs: + build_pack_groups = kwargs['buildPackGroups'] + if build_pack_groups is None: + raise TypeError("Missing 'build_pack_groups' argument") + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if spring_cloud_service_id is None: + raise TypeError("Missing 'spring_cloud_service_id' argument") + if stack is None: + raise TypeError("Missing 'stack' argument") + + _setter("build_pack_groups", build_pack_groups) + _setter("spring_cloud_service_id", spring_cloud_service_id) + _setter("stack", stack) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="buildPackGroups") @@ -96,14 +123,35 @@ def __init__(__self__, *, :param pulumi.Input[str] spring_cloud_service_id: The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Builder to be created. :param pulumi.Input['SpringCloudBuilderStackArgs'] stack: A `stack` block as defined below. """ + _SpringCloudBuilderState._configure( + lambda key, value: pulumi.set(__self__, key, value), + build_pack_groups=build_pack_groups, + name=name, + spring_cloud_service_id=spring_cloud_service_id, + stack=stack, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + build_pack_groups: Optional[pulumi.Input[Sequence[pulumi.Input['SpringCloudBuilderBuildPackGroupArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + stack: Optional[pulumi.Input['SpringCloudBuilderStackArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if build_pack_groups is None and 'buildPackGroups' in kwargs: + build_pack_groups = kwargs['buildPackGroups'] + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if build_pack_groups is not None: - pulumi.set(__self__, "build_pack_groups", build_pack_groups) + _setter("build_pack_groups", build_pack_groups) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if spring_cloud_service_id is not None: - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + _setter("spring_cloud_service_id", spring_cloud_service_id) if stack is not None: - pulumi.set(__self__, "stack", stack) + _setter("stack", stack) @property @pulumi.getter(name="buildPackGroups") @@ -259,6 +307,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudBuilderArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -284,6 +336,11 @@ def _internal_init(__self__, if spring_cloud_service_id is None and not opts.urn: raise TypeError("Missing required property 'spring_cloud_service_id'") __props__.__dict__["spring_cloud_service_id"] = spring_cloud_service_id + if stack is not None and not isinstance(stack, SpringCloudBuilderStackArgs): + stack = stack or {} + def _setter(key, value): + stack[key] = value + SpringCloudBuilderStackArgs._configure(_setter, **stack) if stack is None and not opts.urn: raise TypeError("Missing required property 'stack'") __props__.__dict__["stack"] = stack diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_certificate.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_certificate.py index 134dbf89e9..4ea0c9752b 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_certificate.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SpringCloudCertificateArgs', 'SpringCloudCertificate'] @@ -29,16 +29,51 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_certificate_id: Specifies the ID of the Key Vault Certificate resource. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the Spring Cloud Certificate. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "service_name", service_name) + SpringCloudCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + service_name=service_name, + certificate_content=certificate_content, + exclude_private_key=exclude_private_key, + key_vault_certificate_id=key_vault_certificate_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + service_name: Optional[pulumi.Input[str]] = None, + certificate_content: Optional[pulumi.Input[str]] = None, + exclude_private_key: Optional[pulumi.Input[bool]] = None, + key_vault_certificate_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if service_name is None and 'serviceName' in kwargs: + service_name = kwargs['serviceName'] + if service_name is None: + raise TypeError("Missing 'service_name' argument") + if certificate_content is None and 'certificateContent' in kwargs: + certificate_content = kwargs['certificateContent'] + if exclude_private_key is None and 'excludePrivateKey' in kwargs: + exclude_private_key = kwargs['excludePrivateKey'] + if key_vault_certificate_id is None and 'keyVaultCertificateId' in kwargs: + key_vault_certificate_id = kwargs['keyVaultCertificateId'] + + _setter("resource_group_name", resource_group_name) + _setter("service_name", service_name) if certificate_content is not None: - pulumi.set(__self__, "certificate_content", certificate_content) + _setter("certificate_content", certificate_content) if exclude_private_key is not None: - pulumi.set(__self__, "exclude_private_key", exclude_private_key) + _setter("exclude_private_key", exclude_private_key) if key_vault_certificate_id is not None: - pulumi.set(__self__, "key_vault_certificate_id", key_vault_certificate_id) + _setter("key_vault_certificate_id", key_vault_certificate_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="resourceGroupName") @@ -133,20 +168,53 @@ def __init__(__self__, *, :param pulumi.Input[str] service_name: Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created. :param pulumi.Input[str] thumbprint: The thumbprint of the Spring Cloud certificate. """ + _SpringCloudCertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_content=certificate_content, + exclude_private_key=exclude_private_key, + key_vault_certificate_id=key_vault_certificate_id, + name=name, + resource_group_name=resource_group_name, + service_name=service_name, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_content: Optional[pulumi.Input[str]] = None, + exclude_private_key: Optional[pulumi.Input[bool]] = None, + key_vault_certificate_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_name: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_content is None and 'certificateContent' in kwargs: + certificate_content = kwargs['certificateContent'] + if exclude_private_key is None and 'excludePrivateKey' in kwargs: + exclude_private_key = kwargs['excludePrivateKey'] + if key_vault_certificate_id is None and 'keyVaultCertificateId' in kwargs: + key_vault_certificate_id = kwargs['keyVaultCertificateId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_name is None and 'serviceName' in kwargs: + service_name = kwargs['serviceName'] + if certificate_content is not None: - pulumi.set(__self__, "certificate_content", certificate_content) + _setter("certificate_content", certificate_content) if exclude_private_key is not None: - pulumi.set(__self__, "exclude_private_key", exclude_private_key) + _setter("exclude_private_key", exclude_private_key) if key_vault_certificate_id is not None: - pulumi.set(__self__, "key_vault_certificate_id", key_vault_certificate_id) + _setter("key_vault_certificate_id", key_vault_certificate_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_name is not None: - pulumi.set(__self__, "service_name", service_name) + _setter("service_name", service_name) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="certificateContent") @@ -464,6 +532,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudCertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_configuration_service.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_configuration_service.py index 9ff2f675ec..393d2d5666 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_configuration_service.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_configuration_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,13 +27,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Configuration Service. The only possible value is `default`. Changing this forces a new Spring Cloud Configuration Service to be created. :param pulumi.Input[Sequence[pulumi.Input['SpringCloudConfigurationServiceRepositoryArgs']]] repositories: One or more `repository` blocks as defined below. """ - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + SpringCloudConfigurationServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_service_id=spring_cloud_service_id, + generation=generation, + name=name, + repositories=repositories, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + generation: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + repositories: Optional[pulumi.Input[Sequence[pulumi.Input['SpringCloudConfigurationServiceRepositoryArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if spring_cloud_service_id is None: + raise TypeError("Missing 'spring_cloud_service_id' argument") + + _setter("spring_cloud_service_id", spring_cloud_service_id) if generation is not None: - pulumi.set(__self__, "generation", generation) + _setter("generation", generation) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if repositories is not None: - pulumi.set(__self__, "repositories", repositories) + _setter("repositories", repositories) @property @pulumi.getter(name="springCloudServiceId") @@ -98,14 +119,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['SpringCloudConfigurationServiceRepositoryArgs']]] repositories: One or more `repository` blocks as defined below. :param pulumi.Input[str] spring_cloud_service_id: The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Configuration Service to be created. """ + _SpringCloudConfigurationServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + generation=generation, + name=name, + repositories=repositories, + spring_cloud_service_id=spring_cloud_service_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + generation: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + repositories: Optional[pulumi.Input[Sequence[pulumi.Input['SpringCloudConfigurationServiceRepositoryArgs']]]] = None, + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if generation is not None: - pulumi.set(__self__, "generation", generation) + _setter("generation", generation) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if repositories is not None: - pulumi.set(__self__, "repositories", repositories) + _setter("repositories", repositories) if spring_cloud_service_id is not None: - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + _setter("spring_cloud_service_id", spring_cloud_service_id) @property @pulumi.getter @@ -271,6 +311,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudConfigurationServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_connection.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_connection.py index 556f9adfef..c3fdd2ab2f 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_connection.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,56 @@ def __init__(__self__, *, :param pulumi.Input['SpringCloudConnectionSecretStoreArgs'] secret_store: An option to store secret value in secure place. An `secret_store` block as defined below. :param pulumi.Input[str] vnet_solution: The type of the VNet solution. Possible values are `serviceEndpoint`, `privateLink`. """ - pulumi.set(__self__, "authentication", authentication) - pulumi.set(__self__, "spring_cloud_id", spring_cloud_id) - pulumi.set(__self__, "target_resource_id", target_resource_id) + SpringCloudConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication=authentication, + spring_cloud_id=spring_cloud_id, + target_resource_id=target_resource_id, + client_type=client_type, + name=name, + secret_store=secret_store, + vnet_solution=vnet_solution, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication: Optional[pulumi.Input['SpringCloudConnectionAuthenticationArgs']] = None, + spring_cloud_id: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + client_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + secret_store: Optional[pulumi.Input['SpringCloudConnectionSecretStoreArgs']] = None, + vnet_solution: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication is None: + raise TypeError("Missing 'authentication' argument") + if spring_cloud_id is None and 'springCloudId' in kwargs: + spring_cloud_id = kwargs['springCloudId'] + if spring_cloud_id is None: + raise TypeError("Missing 'spring_cloud_id' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + if client_type is None and 'clientType' in kwargs: + client_type = kwargs['clientType'] + if secret_store is None and 'secretStore' in kwargs: + secret_store = kwargs['secretStore'] + if vnet_solution is None and 'vnetSolution' in kwargs: + vnet_solution = kwargs['vnetSolution'] + + _setter("authentication", authentication) + _setter("spring_cloud_id", spring_cloud_id) + _setter("target_resource_id", target_resource_id) if client_type is not None: - pulumi.set(__self__, "client_type", client_type) + _setter("client_type", client_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if secret_store is not None: - pulumi.set(__self__, "secret_store", secret_store) + _setter("secret_store", secret_store) if vnet_solution is not None: - pulumi.set(__self__, "vnet_solution", vnet_solution) + _setter("vnet_solution", vnet_solution) @property @pulumi.getter @@ -150,20 +189,53 @@ def __init__(__self__, *, :param pulumi.Input[str] target_resource_id: The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are `Postgres`, `PostgresFlexible`, `Mysql`, `Sql`, `Redis`, `RedisEnterprise`, `CosmosCassandra`, `CosmosGremlin`, `CosmosMongo`, `CosmosSql`, `CosmosTable`, `StorageBlob`, `StorageQueue`, `StorageFile`, `StorageTable`, `AppConfig`, `EventHub`, `ServiceBus`, `SignalR`, `WebPubSub`, `ConfluentKafka`. The integration guide can be found [here](https://learn.microsoft.com/en-us/azure/service-connector/how-to-integrate-postgres). :param pulumi.Input[str] vnet_solution: The type of the VNet solution. Possible values are `serviceEndpoint`, `privateLink`. """ + _SpringCloudConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication=authentication, + client_type=client_type, + name=name, + secret_store=secret_store, + spring_cloud_id=spring_cloud_id, + target_resource_id=target_resource_id, + vnet_solution=vnet_solution, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication: Optional[pulumi.Input['SpringCloudConnectionAuthenticationArgs']] = None, + client_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + secret_store: Optional[pulumi.Input['SpringCloudConnectionSecretStoreArgs']] = None, + spring_cloud_id: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + vnet_solution: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_type is None and 'clientType' in kwargs: + client_type = kwargs['clientType'] + if secret_store is None and 'secretStore' in kwargs: + secret_store = kwargs['secretStore'] + if spring_cloud_id is None and 'springCloudId' in kwargs: + spring_cloud_id = kwargs['springCloudId'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if vnet_solution is None and 'vnetSolution' in kwargs: + vnet_solution = kwargs['vnetSolution'] + if authentication is not None: - pulumi.set(__self__, "authentication", authentication) + _setter("authentication", authentication) if client_type is not None: - pulumi.set(__self__, "client_type", client_type) + _setter("client_type", client_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if secret_store is not None: - pulumi.set(__self__, "secret_store", secret_store) + _setter("secret_store", secret_store) if spring_cloud_id is not None: - pulumi.set(__self__, "spring_cloud_id", spring_cloud_id) + _setter("spring_cloud_id", spring_cloud_id) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) if vnet_solution is not None: - pulumi.set(__self__, "vnet_solution", vnet_solution) + _setter("vnet_solution", vnet_solution) @property @pulumi.getter @@ -407,6 +479,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -428,11 +504,21 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = SpringCloudConnectionArgs.__new__(SpringCloudConnectionArgs) + if authentication is not None and not isinstance(authentication, SpringCloudConnectionAuthenticationArgs): + authentication = authentication or {} + def _setter(key, value): + authentication[key] = value + SpringCloudConnectionAuthenticationArgs._configure(_setter, **authentication) if authentication is None and not opts.urn: raise TypeError("Missing required property 'authentication'") __props__.__dict__["authentication"] = authentication __props__.__dict__["client_type"] = client_type __props__.__dict__["name"] = name + if secret_store is not None and not isinstance(secret_store, SpringCloudConnectionSecretStoreArgs): + secret_store = secret_store or {} + def _setter(key, value): + secret_store[key] = value + SpringCloudConnectionSecretStoreArgs._configure(_setter, **secret_store) __props__.__dict__["secret_store"] = secret_store if spring_cloud_id is None and not opts.urn: raise TypeError("Missing required property 'spring_cloud_id'") diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_container_deployment.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_container_deployment.py index c8f83d1c0a..14ae515989 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_container_deployment.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_container_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,25 +41,72 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Container Deployment. Changing this forces a new Spring Cloud Container Deployment to be created. :param pulumi.Input['SpringCloudContainerDeploymentQuotaArgs'] quota: A `quota` block as defined below. """ - pulumi.set(__self__, "image", image) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + SpringCloudContainerDeploymentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + image=image, + server=server, + spring_cloud_app_id=spring_cloud_app_id, + addon_json=addon_json, + arguments=arguments, + commands=commands, + environment_variables=environment_variables, + instance_count=instance_count, + language_framework=language_framework, + name=name, + quota=quota, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + addon_json: Optional[pulumi.Input[str]] = None, + arguments: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + commands: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + language_framework: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + quota: Optional[pulumi.Input['SpringCloudContainerDeploymentQuotaArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image is None: + raise TypeError("Missing 'image' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if spring_cloud_app_id is None: + raise TypeError("Missing 'spring_cloud_app_id' argument") + if addon_json is None and 'addonJson' in kwargs: + addon_json = kwargs['addonJson'] + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if language_framework is None and 'languageFramework' in kwargs: + language_framework = kwargs['languageFramework'] + + _setter("image", image) + _setter("server", server) + _setter("spring_cloud_app_id", spring_cloud_app_id) if addon_json is not None: - pulumi.set(__self__, "addon_json", addon_json) + _setter("addon_json", addon_json) if arguments is not None: - pulumi.set(__self__, "arguments", arguments) + _setter("arguments", arguments) if commands is not None: - pulumi.set(__self__, "commands", commands) + _setter("commands", commands) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if instance_count is not None: - pulumi.set(__self__, "instance_count", instance_count) + _setter("instance_count", instance_count) if language_framework is not None: - pulumi.set(__self__, "language_framework", language_framework) + _setter("language_framework", language_framework) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if quota is not None: - pulumi.set(__self__, "quota", quota) + _setter("quota", quota) @property @pulumi.getter @@ -222,28 +269,69 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The name of the registry that contains the container image. :param pulumi.Input[str] spring_cloud_app_id: The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Container Deployment to be created. """ + _SpringCloudContainerDeploymentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + addon_json=addon_json, + arguments=arguments, + commands=commands, + environment_variables=environment_variables, + image=image, + instance_count=instance_count, + language_framework=language_framework, + name=name, + quota=quota, + server=server, + spring_cloud_app_id=spring_cloud_app_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + addon_json: Optional[pulumi.Input[str]] = None, + arguments: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + commands: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + image: Optional[pulumi.Input[str]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + language_framework: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + quota: Optional[pulumi.Input['SpringCloudContainerDeploymentQuotaArgs']] = None, + server: Optional[pulumi.Input[str]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if addon_json is None and 'addonJson' in kwargs: + addon_json = kwargs['addonJson'] + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if language_framework is None and 'languageFramework' in kwargs: + language_framework = kwargs['languageFramework'] + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if addon_json is not None: - pulumi.set(__self__, "addon_json", addon_json) + _setter("addon_json", addon_json) if arguments is not None: - pulumi.set(__self__, "arguments", arguments) + _setter("arguments", arguments) if commands is not None: - pulumi.set(__self__, "commands", commands) + _setter("commands", commands) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if image is not None: - pulumi.set(__self__, "image", image) + _setter("image", image) if instance_count is not None: - pulumi.set(__self__, "instance_count", instance_count) + _setter("instance_count", instance_count) if language_framework is not None: - pulumi.set(__self__, "language_framework", language_framework) + _setter("language_framework", language_framework) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if quota is not None: - pulumi.set(__self__, "quota", quota) + _setter("quota", quota) if server is not None: - pulumi.set(__self__, "server", server) + _setter("server", server) if spring_cloud_app_id is not None: - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + _setter("spring_cloud_app_id", spring_cloud_app_id) @property @pulumi.getter(name="addonJson") @@ -511,6 +599,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudContainerDeploymentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -546,6 +638,11 @@ def _internal_init(__self__, __props__.__dict__["instance_count"] = instance_count __props__.__dict__["language_framework"] = language_framework __props__.__dict__["name"] = name + if quota is not None and not isinstance(quota, SpringCloudContainerDeploymentQuotaArgs): + quota = quota or {} + def _setter(key, value): + quota[key] = value + SpringCloudContainerDeploymentQuotaArgs._configure(_setter, **quota) __props__.__dict__["quota"] = quota if server is None and not opts.urn: raise TypeError("Missing required property 'server'") diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_custom_domain.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_custom_domain.py index c078e43f05..e5a867cc26 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_custom_domain.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_custom_domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SpringCloudCustomDomainArgs', 'SpringCloudCustomDomain'] @@ -25,13 +25,36 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Spring Cloud Custom Domain. Changing this forces a new resource to be created. :param pulumi.Input[str] thumbprint: Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `certificate_name` is specified. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + SpringCloudCustomDomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_app_id=spring_cloud_app_id, + certificate_name=certificate_name, + name=name, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + certificate_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if spring_cloud_app_id is None: + raise TypeError("Missing 'spring_cloud_app_id' argument") + if certificate_name is None and 'certificateName' in kwargs: + certificate_name = kwargs['certificateName'] + + _setter("spring_cloud_app_id", spring_cloud_app_id) if certificate_name is not None: - pulumi.set(__self__, "certificate_name", certificate_name) + _setter("certificate_name", certificate_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="springCloudAppId") @@ -96,14 +119,35 @@ def __init__(__self__, *, :param pulumi.Input[str] spring_cloud_app_id: Specifies the resource ID of the Spring Cloud Application. Changing this forces a new resource to be created. :param pulumi.Input[str] thumbprint: Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `certificate_name` is specified. Changing this forces a new resource to be created. """ + _SpringCloudCustomDomainState._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_name=certificate_name, + name=name, + spring_cloud_app_id=spring_cloud_app_id, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_name is None and 'certificateName' in kwargs: + certificate_name = kwargs['certificateName'] + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if certificate_name is not None: - pulumi.set(__self__, "certificate_name", certificate_name) + _setter("certificate_name", certificate_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if spring_cloud_app_id is not None: - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + _setter("spring_cloud_app_id", spring_cloud_app_id) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="certificateName") @@ -209,6 +253,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudCustomDomainArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_customized_accelerator.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_customized_accelerator.py index 3ad682aee2..a61e7cd603 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_customized_accelerator.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_customized_accelerator.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,18 +33,55 @@ def __init__(__self__, *, :param pulumi.Input[str] icon_url: Specifies the icon URL of the Spring Cloud Customized Accelerator.. :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Customized Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created. """ - pulumi.set(__self__, "git_repository", git_repository) - pulumi.set(__self__, "spring_cloud_accelerator_id", spring_cloud_accelerator_id) + SpringCloudCustomizedAcceleratorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + git_repository=git_repository, + spring_cloud_accelerator_id=spring_cloud_accelerator_id, + accelerator_tags=accelerator_tags, + description=description, + display_name=display_name, + icon_url=icon_url, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + git_repository: Optional[pulumi.Input['SpringCloudCustomizedAcceleratorGitRepositoryArgs']] = None, + spring_cloud_accelerator_id: Optional[pulumi.Input[str]] = None, + accelerator_tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + icon_url: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if git_repository is None and 'gitRepository' in kwargs: + git_repository = kwargs['gitRepository'] + if git_repository is None: + raise TypeError("Missing 'git_repository' argument") + if spring_cloud_accelerator_id is None and 'springCloudAcceleratorId' in kwargs: + spring_cloud_accelerator_id = kwargs['springCloudAcceleratorId'] + if spring_cloud_accelerator_id is None: + raise TypeError("Missing 'spring_cloud_accelerator_id' argument") + if accelerator_tags is None and 'acceleratorTags' in kwargs: + accelerator_tags = kwargs['acceleratorTags'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if icon_url is None and 'iconUrl' in kwargs: + icon_url = kwargs['iconUrl'] + + _setter("git_repository", git_repository) + _setter("spring_cloud_accelerator_id", spring_cloud_accelerator_id) if accelerator_tags is not None: - pulumi.set(__self__, "accelerator_tags", accelerator_tags) + _setter("accelerator_tags", accelerator_tags) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if icon_url is not None: - pulumi.set(__self__, "icon_url", icon_url) + _setter("icon_url", icon_url) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="gitRepository") @@ -151,20 +188,53 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Customized Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created. :param pulumi.Input[str] spring_cloud_accelerator_id: The ID of the Spring Cloud Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created. """ + _SpringCloudCustomizedAcceleratorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + accelerator_tags=accelerator_tags, + description=description, + display_name=display_name, + git_repository=git_repository, + icon_url=icon_url, + name=name, + spring_cloud_accelerator_id=spring_cloud_accelerator_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + accelerator_tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + git_repository: Optional[pulumi.Input['SpringCloudCustomizedAcceleratorGitRepositoryArgs']] = None, + icon_url: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + spring_cloud_accelerator_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if accelerator_tags is None and 'acceleratorTags' in kwargs: + accelerator_tags = kwargs['acceleratorTags'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if git_repository is None and 'gitRepository' in kwargs: + git_repository = kwargs['gitRepository'] + if icon_url is None and 'iconUrl' in kwargs: + icon_url = kwargs['iconUrl'] + if spring_cloud_accelerator_id is None and 'springCloudAcceleratorId' in kwargs: + spring_cloud_accelerator_id = kwargs['springCloudAcceleratorId'] + if accelerator_tags is not None: - pulumi.set(__self__, "accelerator_tags", accelerator_tags) + _setter("accelerator_tags", accelerator_tags) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if git_repository is not None: - pulumi.set(__self__, "git_repository", git_repository) + _setter("git_repository", git_repository) if icon_url is not None: - pulumi.set(__self__, "icon_url", icon_url) + _setter("icon_url", icon_url) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if spring_cloud_accelerator_id is not None: - pulumi.set(__self__, "spring_cloud_accelerator_id", spring_cloud_accelerator_id) + _setter("spring_cloud_accelerator_id", spring_cloud_accelerator_id) @property @pulumi.getter(name="acceleratorTags") @@ -368,6 +438,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudCustomizedAcceleratorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -392,6 +466,11 @@ def _internal_init(__self__, __props__.__dict__["accelerator_tags"] = accelerator_tags __props__.__dict__["description"] = description __props__.__dict__["display_name"] = display_name + if git_repository is not None and not isinstance(git_repository, SpringCloudCustomizedAcceleratorGitRepositoryArgs): + git_repository = git_repository or {} + def _setter(key, value): + git_repository[key] = value + SpringCloudCustomizedAcceleratorGitRepositoryArgs._configure(_setter, **git_repository) if git_repository is None and not opts.urn: raise TypeError("Missing required property 'git_repository'") __props__.__dict__["git_repository"] = git_repository diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_dev_tool_portal.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_dev_tool_portal.py index 2029a5155b..7ba1ab055c 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_dev_tool_portal.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_dev_tool_portal.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,17 +31,48 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Is public network access enabled? :param pulumi.Input['SpringCloudDevToolPortalSsoArgs'] sso: A `sso` block as defined below. """ - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + SpringCloudDevToolPortalArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_service_id=spring_cloud_service_id, + application_accelerator_enabled=application_accelerator_enabled, + application_live_view_enabled=application_live_view_enabled, + name=name, + public_network_access_enabled=public_network_access_enabled, + sso=sso, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + application_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + application_live_view_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + sso: Optional[pulumi.Input['SpringCloudDevToolPortalSsoArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if spring_cloud_service_id is None: + raise TypeError("Missing 'spring_cloud_service_id' argument") + if application_accelerator_enabled is None and 'applicationAcceleratorEnabled' in kwargs: + application_accelerator_enabled = kwargs['applicationAcceleratorEnabled'] + if application_live_view_enabled is None and 'applicationLiveViewEnabled' in kwargs: + application_live_view_enabled = kwargs['applicationLiveViewEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("spring_cloud_service_id", spring_cloud_service_id) if application_accelerator_enabled is not None: - pulumi.set(__self__, "application_accelerator_enabled", application_accelerator_enabled) + _setter("application_accelerator_enabled", application_accelerator_enabled) if application_live_view_enabled is not None: - pulumi.set(__self__, "application_live_view_enabled", application_live_view_enabled) + _setter("application_live_view_enabled", application_live_view_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if sso is not None: - pulumi.set(__self__, "sso", sso) + _setter("sso", sso) @property @pulumi.getter(name="springCloudServiceId") @@ -134,18 +165,47 @@ def __init__(__self__, *, :param pulumi.Input[str] spring_cloud_service_id: The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Dev Tool Portal to be created. :param pulumi.Input['SpringCloudDevToolPortalSsoArgs'] sso: A `sso` block as defined below. """ + _SpringCloudDevToolPortalState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_accelerator_enabled=application_accelerator_enabled, + application_live_view_enabled=application_live_view_enabled, + name=name, + public_network_access_enabled=public_network_access_enabled, + spring_cloud_service_id=spring_cloud_service_id, + sso=sso, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + application_live_view_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + sso: Optional[pulumi.Input['SpringCloudDevToolPortalSsoArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_accelerator_enabled is None and 'applicationAcceleratorEnabled' in kwargs: + application_accelerator_enabled = kwargs['applicationAcceleratorEnabled'] + if application_live_view_enabled is None and 'applicationLiveViewEnabled' in kwargs: + application_live_view_enabled = kwargs['applicationLiveViewEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if application_accelerator_enabled is not None: - pulumi.set(__self__, "application_accelerator_enabled", application_accelerator_enabled) + _setter("application_accelerator_enabled", application_accelerator_enabled) if application_live_view_enabled is not None: - pulumi.set(__self__, "application_live_view_enabled", application_live_view_enabled) + _setter("application_live_view_enabled", application_live_view_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if spring_cloud_service_id is not None: - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + _setter("spring_cloud_service_id", spring_cloud_service_id) if sso is not None: - pulumi.set(__self__, "sso", sso) + _setter("sso", sso) @property @pulumi.getter(name="applicationAcceleratorEnabled") @@ -341,6 +401,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudDevToolPortalArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -368,6 +432,11 @@ def _internal_init(__self__, if spring_cloud_service_id is None and not opts.urn: raise TypeError("Missing required property 'spring_cloud_service_id'") __props__.__dict__["spring_cloud_service_id"] = spring_cloud_service_id + if sso is not None and not isinstance(sso, SpringCloudDevToolPortalSsoArgs): + sso = sso or {} + def _setter(key, value): + sso[key] = value + SpringCloudDevToolPortalSsoArgs._configure(_setter, **sso) __props__.__dict__["sso"] = sso super(SpringCloudDevToolPortal, __self__).__init__( 'azure:appplatform/springCloudDevToolPortal:SpringCloudDevToolPortal', diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_gateway.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_gateway.py index 3a156f677a..181933a2fb 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_gateway.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,31 +45,86 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] sensitive_environment_variables: Specifies the sensitive environment variables of the Spring Cloud Gateway as a map of key-value pairs. Changing this forces a new resource to be created. :param pulumi.Input['SpringCloudGatewaySsoArgs'] sso: A `sso` block as defined below. """ - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + SpringCloudGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_service_id=spring_cloud_service_id, + api_metadata=api_metadata, + application_performance_monitoring_types=application_performance_monitoring_types, + client_authorization=client_authorization, + cors=cors, + environment_variables=environment_variables, + https_only=https_only, + instance_count=instance_count, + name=name, + public_network_access_enabled=public_network_access_enabled, + quota=quota, + sensitive_environment_variables=sensitive_environment_variables, + sso=sso, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + api_metadata: Optional[pulumi.Input['SpringCloudGatewayApiMetadataArgs']] = None, + application_performance_monitoring_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_authorization: Optional[pulumi.Input['SpringCloudGatewayClientAuthorizationArgs']] = None, + cors: Optional[pulumi.Input['SpringCloudGatewayCorsArgs']] = None, + environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + quota: Optional[pulumi.Input['SpringCloudGatewayQuotaArgs']] = None, + sensitive_environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + sso: Optional[pulumi.Input['SpringCloudGatewaySsoArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if spring_cloud_service_id is None: + raise TypeError("Missing 'spring_cloud_service_id' argument") + if api_metadata is None and 'apiMetadata' in kwargs: + api_metadata = kwargs['apiMetadata'] + if application_performance_monitoring_types is None and 'applicationPerformanceMonitoringTypes' in kwargs: + application_performance_monitoring_types = kwargs['applicationPerformanceMonitoringTypes'] + if client_authorization is None and 'clientAuthorization' in kwargs: + client_authorization = kwargs['clientAuthorization'] + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if sensitive_environment_variables is None and 'sensitiveEnvironmentVariables' in kwargs: + sensitive_environment_variables = kwargs['sensitiveEnvironmentVariables'] + + _setter("spring_cloud_service_id", spring_cloud_service_id) if api_metadata is not None: - pulumi.set(__self__, "api_metadata", api_metadata) + _setter("api_metadata", api_metadata) if application_performance_monitoring_types is not None: - pulumi.set(__self__, "application_performance_monitoring_types", application_performance_monitoring_types) + _setter("application_performance_monitoring_types", application_performance_monitoring_types) if client_authorization is not None: - pulumi.set(__self__, "client_authorization", client_authorization) + _setter("client_authorization", client_authorization) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if instance_count is not None: - pulumi.set(__self__, "instance_count", instance_count) + _setter("instance_count", instance_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if quota is not None: - pulumi.set(__self__, "quota", quota) + _setter("quota", quota) if sensitive_environment_variables is not None: - pulumi.set(__self__, "sensitive_environment_variables", sensitive_environment_variables) + _setter("sensitive_environment_variables", sensitive_environment_variables) if sso is not None: - pulumi.set(__self__, "sso", sso) + _setter("sso", sso) @property @pulumi.getter(name="springCloudServiceId") @@ -262,34 +317,89 @@ def __init__(__self__, *, :param pulumi.Input['SpringCloudGatewaySsoArgs'] sso: A `sso` block as defined below. :param pulumi.Input[str] url: URL of the Spring Cloud Gateway, exposed when 'public_network_access_enabled' is true. """ + _SpringCloudGatewayState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_metadata=api_metadata, + application_performance_monitoring_types=application_performance_monitoring_types, + client_authorization=client_authorization, + cors=cors, + environment_variables=environment_variables, + https_only=https_only, + instance_count=instance_count, + name=name, + public_network_access_enabled=public_network_access_enabled, + quota=quota, + sensitive_environment_variables=sensitive_environment_variables, + spring_cloud_service_id=spring_cloud_service_id, + sso=sso, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_metadata: Optional[pulumi.Input['SpringCloudGatewayApiMetadataArgs']] = None, + application_performance_monitoring_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_authorization: Optional[pulumi.Input['SpringCloudGatewayClientAuthorizationArgs']] = None, + cors: Optional[pulumi.Input['SpringCloudGatewayCorsArgs']] = None, + environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + quota: Optional[pulumi.Input['SpringCloudGatewayQuotaArgs']] = None, + sensitive_environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + sso: Optional[pulumi.Input['SpringCloudGatewaySsoArgs']] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_metadata is None and 'apiMetadata' in kwargs: + api_metadata = kwargs['apiMetadata'] + if application_performance_monitoring_types is None and 'applicationPerformanceMonitoringTypes' in kwargs: + application_performance_monitoring_types = kwargs['applicationPerformanceMonitoringTypes'] + if client_authorization is None and 'clientAuthorization' in kwargs: + client_authorization = kwargs['clientAuthorization'] + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if sensitive_environment_variables is None and 'sensitiveEnvironmentVariables' in kwargs: + sensitive_environment_variables = kwargs['sensitiveEnvironmentVariables'] + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if api_metadata is not None: - pulumi.set(__self__, "api_metadata", api_metadata) + _setter("api_metadata", api_metadata) if application_performance_monitoring_types is not None: - pulumi.set(__self__, "application_performance_monitoring_types", application_performance_monitoring_types) + _setter("application_performance_monitoring_types", application_performance_monitoring_types) if client_authorization is not None: - pulumi.set(__self__, "client_authorization", client_authorization) + _setter("client_authorization", client_authorization) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if instance_count is not None: - pulumi.set(__self__, "instance_count", instance_count) + _setter("instance_count", instance_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if quota is not None: - pulumi.set(__self__, "quota", quota) + _setter("quota", quota) if sensitive_environment_variables is not None: - pulumi.set(__self__, "sensitive_environment_variables", sensitive_environment_variables) + _setter("sensitive_environment_variables", sensitive_environment_variables) if spring_cloud_service_id is not None: - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + _setter("spring_cloud_service_id", spring_cloud_service_id) if sso is not None: - pulumi.set(__self__, "sso", sso) + _setter("sso", sso) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="apiMetadata") @@ -623,6 +733,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudGatewayArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -650,20 +764,45 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = SpringCloudGatewayArgs.__new__(SpringCloudGatewayArgs) + if api_metadata is not None and not isinstance(api_metadata, SpringCloudGatewayApiMetadataArgs): + api_metadata = api_metadata or {} + def _setter(key, value): + api_metadata[key] = value + SpringCloudGatewayApiMetadataArgs._configure(_setter, **api_metadata) __props__.__dict__["api_metadata"] = api_metadata __props__.__dict__["application_performance_monitoring_types"] = application_performance_monitoring_types + if client_authorization is not None and not isinstance(client_authorization, SpringCloudGatewayClientAuthorizationArgs): + client_authorization = client_authorization or {} + def _setter(key, value): + client_authorization[key] = value + SpringCloudGatewayClientAuthorizationArgs._configure(_setter, **client_authorization) __props__.__dict__["client_authorization"] = client_authorization + if cors is not None and not isinstance(cors, SpringCloudGatewayCorsArgs): + cors = cors or {} + def _setter(key, value): + cors[key] = value + SpringCloudGatewayCorsArgs._configure(_setter, **cors) __props__.__dict__["cors"] = cors __props__.__dict__["environment_variables"] = environment_variables __props__.__dict__["https_only"] = https_only __props__.__dict__["instance_count"] = instance_count __props__.__dict__["name"] = name __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled + if quota is not None and not isinstance(quota, SpringCloudGatewayQuotaArgs): + quota = quota or {} + def _setter(key, value): + quota[key] = value + SpringCloudGatewayQuotaArgs._configure(_setter, **quota) __props__.__dict__["quota"] = quota __props__.__dict__["sensitive_environment_variables"] = None if sensitive_environment_variables is None else pulumi.Output.secret(sensitive_environment_variables) if spring_cloud_service_id is None and not opts.urn: raise TypeError("Missing required property 'spring_cloud_service_id'") __props__.__dict__["spring_cloud_service_id"] = spring_cloud_service_id + if sso is not None and not isinstance(sso, SpringCloudGatewaySsoArgs): + sso = sso or {} + def _setter(key, value): + sso[key] = value + SpringCloudGatewaySsoArgs._configure(_setter, **sso) __props__.__dict__["sso"] = sso __props__.__dict__["url"] = None secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["sensitiveEnvironmentVariables"]) diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_gateway_custom_domain.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_gateway_custom_domain.py index efca371e22..5c4d6de38b 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_gateway_custom_domain.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_gateway_custom_domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SpringCloudGatewayCustomDomainArgs', 'SpringCloudGatewayCustomDomain'] @@ -23,11 +23,30 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Gateway Custom Domain. Changing this forces a new Spring Cloud Gateway Custom Domain to be created. :param pulumi.Input[str] thumbprint: Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Gateway Custom Domain. """ - pulumi.set(__self__, "spring_cloud_gateway_id", spring_cloud_gateway_id) + SpringCloudGatewayCustomDomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_gateway_id=spring_cloud_gateway_id, + name=name, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_gateway_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_gateway_id is None and 'springCloudGatewayId' in kwargs: + spring_cloud_gateway_id = kwargs['springCloudGatewayId'] + if spring_cloud_gateway_id is None: + raise TypeError("Missing 'spring_cloud_gateway_id' argument") + + _setter("spring_cloud_gateway_id", spring_cloud_gateway_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="springCloudGatewayId") @@ -78,12 +97,29 @@ def __init__(__self__, *, :param pulumi.Input[str] spring_cloud_gateway_id: The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Custom Domain to be created. :param pulumi.Input[str] thumbprint: Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Gateway Custom Domain. """ + _SpringCloudGatewayCustomDomainState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + spring_cloud_gateway_id=spring_cloud_gateway_id, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + spring_cloud_gateway_id: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_gateway_id is None and 'springCloudGatewayId' in kwargs: + spring_cloud_gateway_id = kwargs['springCloudGatewayId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if spring_cloud_gateway_id is not None: - pulumi.set(__self__, "spring_cloud_gateway_id", spring_cloud_gateway_id) + _setter("spring_cloud_gateway_id", spring_cloud_gateway_id) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter @@ -209,6 +245,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudGatewayCustomDomainArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_gateway_route_config.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_gateway_route_config.py index 709b6313b5..c8b07f4816 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_gateway_route_config.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_gateway_route_config.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,23 +39,60 @@ def __init__(__self__, *, :param pulumi.Input[str] spring_cloud_app_id: The ID of the Spring Cloud App. :param pulumi.Input[bool] sso_validation_enabled: Should the sso validation be enabled in app level? """ - pulumi.set(__self__, "spring_cloud_gateway_id", spring_cloud_gateway_id) + SpringCloudGatewayRouteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_gateway_id=spring_cloud_gateway_id, + filters=filters, + name=name, + open_api=open_api, + predicates=predicates, + protocol=protocol, + routes=routes, + spring_cloud_app_id=spring_cloud_app_id, + sso_validation_enabled=sso_validation_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_gateway_id: Optional[pulumi.Input[str]] = None, + filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + open_api: Optional[pulumi.Input['SpringCloudGatewayRouteConfigOpenApiArgs']] = None, + predicates: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + protocol: Optional[pulumi.Input[str]] = None, + routes: Optional[pulumi.Input[Sequence[pulumi.Input['SpringCloudGatewayRouteConfigRouteArgs']]]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + sso_validation_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_gateway_id is None and 'springCloudGatewayId' in kwargs: + spring_cloud_gateway_id = kwargs['springCloudGatewayId'] + if spring_cloud_gateway_id is None: + raise TypeError("Missing 'spring_cloud_gateway_id' argument") + if open_api is None and 'openApi' in kwargs: + open_api = kwargs['openApi'] + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if sso_validation_enabled is None and 'ssoValidationEnabled' in kwargs: + sso_validation_enabled = kwargs['ssoValidationEnabled'] + + _setter("spring_cloud_gateway_id", spring_cloud_gateway_id) if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if open_api is not None: - pulumi.set(__self__, "open_api", open_api) + _setter("open_api", open_api) if predicates is not None: - pulumi.set(__self__, "predicates", predicates) + _setter("predicates", predicates) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if routes is not None: - pulumi.set(__self__, "routes", routes) + _setter("routes", routes) if spring_cloud_app_id is not None: - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + _setter("spring_cloud_app_id", spring_cloud_app_id) if sso_validation_enabled is not None: - pulumi.set(__self__, "sso_validation_enabled", sso_validation_enabled) + _setter("sso_validation_enabled", sso_validation_enabled) @property @pulumi.getter(name="springCloudGatewayId") @@ -194,24 +231,59 @@ def __init__(__self__, *, :param pulumi.Input[str] spring_cloud_gateway_id: The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Route Config to be created. :param pulumi.Input[bool] sso_validation_enabled: Should the sso validation be enabled in app level? """ + _SpringCloudGatewayRouteConfigState._configure( + lambda key, value: pulumi.set(__self__, key, value), + filters=filters, + name=name, + open_api=open_api, + predicates=predicates, + protocol=protocol, + routes=routes, + spring_cloud_app_id=spring_cloud_app_id, + spring_cloud_gateway_id=spring_cloud_gateway_id, + sso_validation_enabled=sso_validation_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + open_api: Optional[pulumi.Input['SpringCloudGatewayRouteConfigOpenApiArgs']] = None, + predicates: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + protocol: Optional[pulumi.Input[str]] = None, + routes: Optional[pulumi.Input[Sequence[pulumi.Input['SpringCloudGatewayRouteConfigRouteArgs']]]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + spring_cloud_gateway_id: Optional[pulumi.Input[str]] = None, + sso_validation_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if open_api is None and 'openApi' in kwargs: + open_api = kwargs['openApi'] + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if spring_cloud_gateway_id is None and 'springCloudGatewayId' in kwargs: + spring_cloud_gateway_id = kwargs['springCloudGatewayId'] + if sso_validation_enabled is None and 'ssoValidationEnabled' in kwargs: + sso_validation_enabled = kwargs['ssoValidationEnabled'] + if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if open_api is not None: - pulumi.set(__self__, "open_api", open_api) + _setter("open_api", open_api) if predicates is not None: - pulumi.set(__self__, "predicates", predicates) + _setter("predicates", predicates) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if routes is not None: - pulumi.set(__self__, "routes", routes) + _setter("routes", routes) if spring_cloud_app_id is not None: - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + _setter("spring_cloud_app_id", spring_cloud_app_id) if spring_cloud_gateway_id is not None: - pulumi.set(__self__, "spring_cloud_gateway_id", spring_cloud_gateway_id) + _setter("spring_cloud_gateway_id", spring_cloud_gateway_id) if sso_validation_enabled is not None: - pulumi.set(__self__, "sso_validation_enabled", sso_validation_enabled) + _setter("sso_validation_enabled", sso_validation_enabled) @property @pulumi.getter @@ -471,6 +543,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudGatewayRouteConfigArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -496,6 +572,11 @@ def _internal_init(__self__, __props__.__dict__["filters"] = filters __props__.__dict__["name"] = name + if open_api is not None and not isinstance(open_api, SpringCloudGatewayRouteConfigOpenApiArgs): + open_api = open_api or {} + def _setter(key, value): + open_api[key] = value + SpringCloudGatewayRouteConfigOpenApiArgs._configure(_setter, **open_api) __props__.__dict__["open_api"] = open_api __props__.__dict__["predicates"] = predicates __props__.__dict__["protocol"] = protocol diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_java_deployment.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_java_deployment.py index 607d98f136..7a51488293 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_java_deployment.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_java_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,19 +33,54 @@ def __init__(__self__, *, :param pulumi.Input['SpringCloudJavaDeploymentQuotaArgs'] quota: A `quota` block as defined below. :param pulumi.Input[str] runtime_version: Specifies the runtime version of the Spring Cloud Deployment. Possible Values are `Java_8`, `Java_11` and `Java_17`. Defaults to `Java_8`. """ - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + SpringCloudJavaDeploymentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_app_id=spring_cloud_app_id, + environment_variables=environment_variables, + instance_count=instance_count, + jvm_options=jvm_options, + name=name, + quota=quota, + runtime_version=runtime_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + jvm_options: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + quota: Optional[pulumi.Input['SpringCloudJavaDeploymentQuotaArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if spring_cloud_app_id is None: + raise TypeError("Missing 'spring_cloud_app_id' argument") + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if jvm_options is None and 'jvmOptions' in kwargs: + jvm_options = kwargs['jvmOptions'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + + _setter("spring_cloud_app_id", spring_cloud_app_id) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if instance_count is not None: - pulumi.set(__self__, "instance_count", instance_count) + _setter("instance_count", instance_count) if jvm_options is not None: - pulumi.set(__self__, "jvm_options", jvm_options) + _setter("jvm_options", jvm_options) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if quota is not None: - pulumi.set(__self__, "quota", quota) + _setter("quota", quota) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) @property @pulumi.getter(name="springCloudAppId") @@ -152,20 +187,53 @@ def __init__(__self__, *, :param pulumi.Input[str] runtime_version: Specifies the runtime version of the Spring Cloud Deployment. Possible Values are `Java_8`, `Java_11` and `Java_17`. Defaults to `Java_8`. :param pulumi.Input[str] spring_cloud_app_id: Specifies the id of the Spring Cloud Application in which to create the Deployment. Changing this forces a new resource to be created. """ + _SpringCloudJavaDeploymentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + environment_variables=environment_variables, + instance_count=instance_count, + jvm_options=jvm_options, + name=name, + quota=quota, + runtime_version=runtime_version, + spring_cloud_app_id=spring_cloud_app_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + jvm_options: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + quota: Optional[pulumi.Input['SpringCloudJavaDeploymentQuotaArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + spring_cloud_app_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if jvm_options is None and 'jvmOptions' in kwargs: + jvm_options = kwargs['jvmOptions'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if spring_cloud_app_id is None and 'springCloudAppId' in kwargs: + spring_cloud_app_id = kwargs['springCloudAppId'] + if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if instance_count is not None: - pulumi.set(__self__, "instance_count", instance_count) + _setter("instance_count", instance_count) if jvm_options is not None: - pulumi.set(__self__, "jvm_options", jvm_options) + _setter("jvm_options", jvm_options) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if quota is not None: - pulumi.set(__self__, "quota", quota) + _setter("quota", quota) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if spring_cloud_app_id is not None: - pulumi.set(__self__, "spring_cloud_app_id", spring_cloud_app_id) + _setter("spring_cloud_app_id", spring_cloud_app_id) @property @pulumi.getter(name="environmentVariables") @@ -379,6 +447,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudJavaDeploymentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -404,6 +476,11 @@ def _internal_init(__self__, __props__.__dict__["instance_count"] = instance_count __props__.__dict__["jvm_options"] = jvm_options __props__.__dict__["name"] = name + if quota is not None and not isinstance(quota, SpringCloudJavaDeploymentQuotaArgs): + quota = quota or {} + def _setter(key, value): + quota[key] = value + SpringCloudJavaDeploymentQuotaArgs._configure(_setter, **quota) __props__.__dict__["quota"] = quota __props__.__dict__["runtime_version"] = runtime_version if spring_cloud_app_id is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_service.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_service.py index aa4d5c059d..711a621ffc 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_service.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,35 +49,94 @@ def __init__(__self__, *, :param pulumi.Input['SpringCloudServiceTraceArgs'] trace: A `trace` block as defined below. :param pulumi.Input[bool] zone_redundant: Whether zone redundancy is enabled for this Spring Cloud Service. Defaults to `false`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + SpringCloudServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + build_agent_pool_size=build_agent_pool_size, + config_server_git_setting=config_server_git_setting, + container_registries=container_registries, + default_build_service=default_build_service, + location=location, + log_stream_public_endpoint_enabled=log_stream_public_endpoint_enabled, + marketplace=marketplace, + name=name, + network=network, + service_registry_enabled=service_registry_enabled, + sku_name=sku_name, + tags=tags, + trace=trace, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + build_agent_pool_size: Optional[pulumi.Input[str]] = None, + config_server_git_setting: Optional[pulumi.Input['SpringCloudServiceConfigServerGitSettingArgs']] = None, + container_registries: Optional[pulumi.Input[Sequence[pulumi.Input['SpringCloudServiceContainerRegistryArgs']]]] = None, + default_build_service: Optional[pulumi.Input['SpringCloudServiceDefaultBuildServiceArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + log_stream_public_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + marketplace: Optional[pulumi.Input['SpringCloudServiceMarketplaceArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['SpringCloudServiceNetworkArgs']] = None, + service_registry_enabled: Optional[pulumi.Input[bool]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + trace: Optional[pulumi.Input['SpringCloudServiceTraceArgs']] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if build_agent_pool_size is None and 'buildAgentPoolSize' in kwargs: + build_agent_pool_size = kwargs['buildAgentPoolSize'] + if config_server_git_setting is None and 'configServerGitSetting' in kwargs: + config_server_git_setting = kwargs['configServerGitSetting'] + if container_registries is None and 'containerRegistries' in kwargs: + container_registries = kwargs['containerRegistries'] + if default_build_service is None and 'defaultBuildService' in kwargs: + default_build_service = kwargs['defaultBuildService'] + if log_stream_public_endpoint_enabled is None and 'logStreamPublicEndpointEnabled' in kwargs: + log_stream_public_endpoint_enabled = kwargs['logStreamPublicEndpointEnabled'] + if service_registry_enabled is None and 'serviceRegistryEnabled' in kwargs: + service_registry_enabled = kwargs['serviceRegistryEnabled'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + + _setter("resource_group_name", resource_group_name) if build_agent_pool_size is not None: - pulumi.set(__self__, "build_agent_pool_size", build_agent_pool_size) + _setter("build_agent_pool_size", build_agent_pool_size) if config_server_git_setting is not None: - pulumi.set(__self__, "config_server_git_setting", config_server_git_setting) + _setter("config_server_git_setting", config_server_git_setting) if container_registries is not None: - pulumi.set(__self__, "container_registries", container_registries) + _setter("container_registries", container_registries) if default_build_service is not None: - pulumi.set(__self__, "default_build_service", default_build_service) + _setter("default_build_service", default_build_service) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if log_stream_public_endpoint_enabled is not None: - pulumi.set(__self__, "log_stream_public_endpoint_enabled", log_stream_public_endpoint_enabled) + _setter("log_stream_public_endpoint_enabled", log_stream_public_endpoint_enabled) if marketplace is not None: - pulumi.set(__self__, "marketplace", marketplace) + _setter("marketplace", marketplace) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if service_registry_enabled is not None: - pulumi.set(__self__, "service_registry_enabled", service_registry_enabled) + _setter("service_registry_enabled", service_registry_enabled) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if trace is not None: - pulumi.set(__self__, "trace", trace) + _setter("trace", trace) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="resourceGroupName") @@ -302,42 +361,111 @@ def __init__(__self__, *, :param pulumi.Input['SpringCloudServiceTraceArgs'] trace: A `trace` block as defined below. :param pulumi.Input[bool] zone_redundant: Whether zone redundancy is enabled for this Spring Cloud Service. Defaults to `false`. """ + _SpringCloudServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + build_agent_pool_size=build_agent_pool_size, + config_server_git_setting=config_server_git_setting, + container_registries=container_registries, + default_build_service=default_build_service, + location=location, + log_stream_public_endpoint_enabled=log_stream_public_endpoint_enabled, + marketplace=marketplace, + name=name, + network=network, + outbound_public_ip_addresses=outbound_public_ip_addresses, + required_network_traffic_rules=required_network_traffic_rules, + resource_group_name=resource_group_name, + service_registry_enabled=service_registry_enabled, + service_registry_id=service_registry_id, + sku_name=sku_name, + tags=tags, + trace=trace, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + build_agent_pool_size: Optional[pulumi.Input[str]] = None, + config_server_git_setting: Optional[pulumi.Input['SpringCloudServiceConfigServerGitSettingArgs']] = None, + container_registries: Optional[pulumi.Input[Sequence[pulumi.Input['SpringCloudServiceContainerRegistryArgs']]]] = None, + default_build_service: Optional[pulumi.Input['SpringCloudServiceDefaultBuildServiceArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + log_stream_public_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + marketplace: Optional[pulumi.Input['SpringCloudServiceMarketplaceArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['SpringCloudServiceNetworkArgs']] = None, + outbound_public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + required_network_traffic_rules: Optional[pulumi.Input[Sequence[pulumi.Input['SpringCloudServiceRequiredNetworkTrafficRuleArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_registry_enabled: Optional[pulumi.Input[bool]] = None, + service_registry_id: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + trace: Optional[pulumi.Input['SpringCloudServiceTraceArgs']] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if build_agent_pool_size is None and 'buildAgentPoolSize' in kwargs: + build_agent_pool_size = kwargs['buildAgentPoolSize'] + if config_server_git_setting is None and 'configServerGitSetting' in kwargs: + config_server_git_setting = kwargs['configServerGitSetting'] + if container_registries is None and 'containerRegistries' in kwargs: + container_registries = kwargs['containerRegistries'] + if default_build_service is None and 'defaultBuildService' in kwargs: + default_build_service = kwargs['defaultBuildService'] + if log_stream_public_endpoint_enabled is None and 'logStreamPublicEndpointEnabled' in kwargs: + log_stream_public_endpoint_enabled = kwargs['logStreamPublicEndpointEnabled'] + if outbound_public_ip_addresses is None and 'outboundPublicIpAddresses' in kwargs: + outbound_public_ip_addresses = kwargs['outboundPublicIpAddresses'] + if required_network_traffic_rules is None and 'requiredNetworkTrafficRules' in kwargs: + required_network_traffic_rules = kwargs['requiredNetworkTrafficRules'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_registry_enabled is None and 'serviceRegistryEnabled' in kwargs: + service_registry_enabled = kwargs['serviceRegistryEnabled'] + if service_registry_id is None and 'serviceRegistryId' in kwargs: + service_registry_id = kwargs['serviceRegistryId'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + if build_agent_pool_size is not None: - pulumi.set(__self__, "build_agent_pool_size", build_agent_pool_size) + _setter("build_agent_pool_size", build_agent_pool_size) if config_server_git_setting is not None: - pulumi.set(__self__, "config_server_git_setting", config_server_git_setting) + _setter("config_server_git_setting", config_server_git_setting) if container_registries is not None: - pulumi.set(__self__, "container_registries", container_registries) + _setter("container_registries", container_registries) if default_build_service is not None: - pulumi.set(__self__, "default_build_service", default_build_service) + _setter("default_build_service", default_build_service) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if log_stream_public_endpoint_enabled is not None: - pulumi.set(__self__, "log_stream_public_endpoint_enabled", log_stream_public_endpoint_enabled) + _setter("log_stream_public_endpoint_enabled", log_stream_public_endpoint_enabled) if marketplace is not None: - pulumi.set(__self__, "marketplace", marketplace) + _setter("marketplace", marketplace) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if outbound_public_ip_addresses is not None: - pulumi.set(__self__, "outbound_public_ip_addresses", outbound_public_ip_addresses) + _setter("outbound_public_ip_addresses", outbound_public_ip_addresses) if required_network_traffic_rules is not None: - pulumi.set(__self__, "required_network_traffic_rules", required_network_traffic_rules) + _setter("required_network_traffic_rules", required_network_traffic_rules) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_registry_enabled is not None: - pulumi.set(__self__, "service_registry_enabled", service_registry_enabled) + _setter("service_registry_enabled", service_registry_enabled) if service_registry_id is not None: - pulumi.set(__self__, "service_registry_id", service_registry_id) + _setter("service_registry_id", service_registry_id) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if trace is not None: - pulumi.set(__self__, "trace", trace) + _setter("trace", trace) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="buildAgentPoolSize") @@ -697,6 +825,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -727,13 +859,33 @@ def _internal_init(__self__, __props__ = SpringCloudServiceArgs.__new__(SpringCloudServiceArgs) __props__.__dict__["build_agent_pool_size"] = build_agent_pool_size + if config_server_git_setting is not None and not isinstance(config_server_git_setting, SpringCloudServiceConfigServerGitSettingArgs): + config_server_git_setting = config_server_git_setting or {} + def _setter(key, value): + config_server_git_setting[key] = value + SpringCloudServiceConfigServerGitSettingArgs._configure(_setter, **config_server_git_setting) __props__.__dict__["config_server_git_setting"] = config_server_git_setting __props__.__dict__["container_registries"] = container_registries + if default_build_service is not None and not isinstance(default_build_service, SpringCloudServiceDefaultBuildServiceArgs): + default_build_service = default_build_service or {} + def _setter(key, value): + default_build_service[key] = value + SpringCloudServiceDefaultBuildServiceArgs._configure(_setter, **default_build_service) __props__.__dict__["default_build_service"] = default_build_service __props__.__dict__["location"] = location __props__.__dict__["log_stream_public_endpoint_enabled"] = log_stream_public_endpoint_enabled + if marketplace is not None and not isinstance(marketplace, SpringCloudServiceMarketplaceArgs): + marketplace = marketplace or {} + def _setter(key, value): + marketplace[key] = value + SpringCloudServiceMarketplaceArgs._configure(_setter, **marketplace) __props__.__dict__["marketplace"] = marketplace __props__.__dict__["name"] = name + if network is not None and not isinstance(network, SpringCloudServiceNetworkArgs): + network = network or {} + def _setter(key, value): + network[key] = value + SpringCloudServiceNetworkArgs._configure(_setter, **network) __props__.__dict__["network"] = network if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") @@ -741,6 +893,11 @@ def _internal_init(__self__, __props__.__dict__["service_registry_enabled"] = service_registry_enabled __props__.__dict__["sku_name"] = sku_name __props__.__dict__["tags"] = tags + if trace is not None and not isinstance(trace, SpringCloudServiceTraceArgs): + trace = trace or {} + def _setter(key, value): + trace[key] = value + SpringCloudServiceTraceArgs._configure(_setter, **trace) __props__.__dict__["trace"] = trace __props__.__dict__["zone_redundant"] = zone_redundant __props__.__dict__["outbound_public_ip_addresses"] = None diff --git a/sdk/python/pulumi_azure/appplatform/spring_cloud_storage.py b/sdk/python/pulumi_azure/appplatform/spring_cloud_storage.py index 5876409a2f..d64ad1fbb8 100644 --- a/sdk/python/pulumi_azure/appplatform/spring_cloud_storage.py +++ b/sdk/python/pulumi_azure/appplatform/spring_cloud_storage.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SpringCloudStorageArgs', 'SpringCloudStorage'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_name: The account name of the Azure Storage Account. :param pulumi.Input[str] name: The name which should be used for this Spring Cloud Storage. Changing this forces a new Spring Cloud Storage to be created. """ - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "storage_account_name", storage_account_name) + SpringCloudStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spring_cloud_service_id=spring_cloud_service_id, + storage_account_key=storage_account_key, + storage_account_name=storage_account_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if spring_cloud_service_id is None: + raise TypeError("Missing 'spring_cloud_service_id' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + + _setter("spring_cloud_service_id", spring_cloud_service_id) + _setter("storage_account_key", storage_account_key) + _setter("storage_account_name", storage_account_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="springCloudServiceId") @@ -94,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_key: The access key of the Azure Storage Account. :param pulumi.Input[str] storage_account_name: The account name of the Azure Storage Account. """ + _SpringCloudStorageState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + spring_cloud_service_id=spring_cloud_service_id, + storage_account_key=storage_account_key, + storage_account_name=storage_account_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + spring_cloud_service_id: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spring_cloud_service_id is None and 'springCloudServiceId' in kwargs: + spring_cloud_service_id = kwargs['springCloudServiceId'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if spring_cloud_service_id is not None: - pulumi.set(__self__, "spring_cloud_service_id", spring_cloud_service_id) + _setter("spring_cloud_service_id", spring_cloud_service_id) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) @property @pulumi.getter @@ -249,6 +301,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpringCloudStorageArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/_inputs.py b/sdk/python/pulumi_azure/appservice/_inputs.py index 5e8fc2a48a..9c8847d484 100644 --- a/sdk/python/pulumi_azure/appservice/_inputs.py +++ b/sdk/python/pulumi_azure/appservice/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -438,19 +438,50 @@ def __init__(__self__, *, :param pulumi.Input[str] secret: Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`. :param pulumi.Input[str] subscription_id: Subscription ID for `userAssignedIdentity`. `subscription_id` and `client_id` should be either both specified or both not specified. """ - pulumi.set(__self__, "type", type) + AppConnectionAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + certificate=certificate, + client_id=client_id, + name=name, + principal_id=principal_id, + secret=secret, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + + _setter("type", type) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -544,7 +575,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] key_vault_id: The key vault id to store secret. """ - pulumi.set(__self__, "key_vault_id", key_vault_id) + AppConnectionSecretStoreArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("key_vault_id", key_vault_id) @property @pulumi.getter(name="keyVaultId") @@ -594,33 +640,88 @@ def __init__(__self__, *, :param pulumi.Input['AppServiceAuthSettingsTwitterArgs'] twitter: A `twitter` block as defined below. :param pulumi.Input[str] unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values are `AllowAnonymous` and `RedirectToLoginPage`. """ - pulumi.set(__self__, "enabled", enabled) + AppServiceAuthSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_params=additional_login_params, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + active_directory: Optional[pulumi.Input['AppServiceAuthSettingsActiveDirectoryArgs']] = None, + additional_login_params: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + facebook: Optional[pulumi.Input['AppServiceAuthSettingsFacebookArgs']] = None, + google: Optional[pulumi.Input['AppServiceAuthSettingsGoogleArgs']] = None, + issuer: Optional[pulumi.Input[str]] = None, + microsoft: Optional[pulumi.Input['AppServiceAuthSettingsMicrosoftArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + token_refresh_extension_hours: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + twitter: Optional[pulumi.Input['AppServiceAuthSettingsTwitterArgs']] = None, + unauthenticated_client_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_params is None and 'additionalLoginParams' in kwargs: + additional_login_params = kwargs['additionalLoginParams'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_params is not None: - pulumi.set(__self__, "additional_login_params", additional_login_params) + _setter("additional_login_params", additional_login_params) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -804,11 +905,34 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_audiences: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. :param pulumi.Input[str] client_secret: The Client Secret of this relying party application. If no secret is provided, implicit flow will be used. """ - pulumi.set(__self__, "client_id", client_id) + AppServiceAuthSettingsActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -858,10 +982,35 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret: The App Secret of the Facebook app used for Facebook login. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret", app_secret) + AppServiceAuthSettingsFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret is None: + raise TypeError("Missing 'app_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) + _setter("app_secret", app_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -911,10 +1060,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The client secret associated with the Google web application. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + AppServiceAuthSettingsGoogleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -964,10 +1138,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The OAuth 2.0 client secret that was created for the app used for authentication. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + AppServiceAuthSettingsMicrosoftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -1015,8 +1214,29 @@ def __init__(__self__, *, :param pulumi.Input[str] consumer_key: The consumer key of the Twitter app used for login :param pulumi.Input[str] consumer_secret: The consumer secret of the Twitter app used for login. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret", consumer_secret) + AppServiceAuthSettingsTwitterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret is None: + raise TypeError("Missing 'consumer_secret' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret", consumer_secret) @property @pulumi.getter(name="consumerKey") @@ -1056,11 +1276,36 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_url: The SAS URL to a Storage Container where Backups should be saved. :param pulumi.Input[bool] enabled: Is this Backup enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + AppServiceBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['AppServiceBackupScheduleArgs']] = None, + storage_account_url: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -1126,14 +1371,47 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_period_in_days: Specifies the number of days after which Backups should be deleted. Defaults to `30`. :param pulumi.Input[str] start_time: Sets when the schedule should start working. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + AppServiceBackupScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + retention_period_in_days=retention_period_in_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[pulumi.Input[int]] = None, + frequency_unit: Optional[pulumi.Input[str]] = None, + keep_at_least_one_backup: Optional[pulumi.Input[bool]] = None, + retention_period_in_days: Optional[pulumi.Input[int]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if retention_period_in_days is None and 'retentionPeriodInDays' in kwargs: + retention_period_in_days = kwargs['retentionPeriodInDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if retention_period_in_days is not None: - pulumi.set(__self__, "retention_period_in_days", retention_period_in_days) + _setter("retention_period_in_days", retention_period_in_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -1207,9 +1485,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of the Connection String. Possible values are `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure` and `SQLServer`. :param pulumi.Input[str] value: The value for the Connection String. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + AppServiceConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -1263,13 +1562,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service. """ - pulumi.set(__self__, "type", type) + AppServiceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1335,14 +1659,39 @@ def __init__(__self__, *, :param pulumi.Input[bool] failed_request_tracing_enabled: Should `Failed request tracing` be enabled on this App Service? Defaults to `false`. :param pulumi.Input['AppServiceLogsHttpLogsArgs'] http_logs: An `http_logs` block as defined below. """ + AppServiceLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages_enabled=detailed_error_messages_enabled, + failed_request_tracing_enabled=failed_request_tracing_enabled, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional[pulumi.Input['AppServiceLogsApplicationLogsArgs']] = None, + detailed_error_messages_enabled: Optional[pulumi.Input[bool]] = None, + failed_request_tracing_enabled: Optional[pulumi.Input[bool]] = None, + http_logs: Optional[pulumi.Input['AppServiceLogsHttpLogsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if detailed_error_messages_enabled is None and 'detailedErrorMessagesEnabled' in kwargs: + detailed_error_messages_enabled = kwargs['detailedErrorMessagesEnabled'] + if failed_request_tracing_enabled is None and 'failedRequestTracingEnabled' in kwargs: + failed_request_tracing_enabled = kwargs['failedRequestTracingEnabled'] + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if application_logs is not None: - pulumi.set(__self__, "application_logs", application_logs) + _setter("application_logs", application_logs) if detailed_error_messages_enabled is not None: - pulumi.set(__self__, "detailed_error_messages_enabled", detailed_error_messages_enabled) + _setter("detailed_error_messages_enabled", detailed_error_messages_enabled) if failed_request_tracing_enabled is not None: - pulumi.set(__self__, "failed_request_tracing_enabled", failed_request_tracing_enabled) + _setter("failed_request_tracing_enabled", failed_request_tracing_enabled) if http_logs is not None: - pulumi.set(__self__, "http_logs", http_logs) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -1402,10 +1751,27 @@ def __init__(__self__, *, :param pulumi.Input['AppServiceLogsApplicationLogsAzureBlobStorageArgs'] azure_blob_storage: An `azure_blob_storage` block as defined below. :param pulumi.Input[str] file_system_level: Log level for filesystem based logging. Supported values are `Error`, `Information`, `Verbose`, `Warning` and `Off`. Defaults to `Off`. """ + AppServiceLogsApplicationLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system_level=file_system_level, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional[pulumi.Input['AppServiceLogsApplicationLogsAzureBlobStorageArgs']] = None, + file_system_level: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system_level is not None: - pulumi.set(__self__, "file_system_level", file_system_level) + _setter("file_system_level", file_system_level) @property @pulumi.getter(name="azureBlobStorage") @@ -1443,9 +1809,34 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The number of days to retain logs for. :param pulumi.Input[str] sas_url: The URL to the storage container with a shared access signature token appended. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + AppServiceLogsApplicationLogsAzureBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[pulumi.Input[str]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + sas_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -1493,10 +1884,27 @@ def __init__(__self__, *, :param pulumi.Input['AppServiceLogsHttpLogsAzureBlobStorageArgs'] azure_blob_storage: An `azure_blob_storage` block as defined below. :param pulumi.Input['AppServiceLogsHttpLogsFileSystemArgs'] file_system: A `file_system` block as defined below. """ + AppServiceLogsHttpLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system=file_system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional[pulumi.Input['AppServiceLogsHttpLogsAzureBlobStorageArgs']] = None, + file_system: Optional[pulumi.Input['AppServiceLogsHttpLogsFileSystemArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) @property @pulumi.getter(name="azureBlobStorage") @@ -1532,8 +1940,29 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The number of days to retain logs for. :param pulumi.Input[str] sas_url: The URL to the storage container with a shared access signature token appended. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + AppServiceLogsHttpLogsAzureBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[pulumi.Input[int]] = None, + sas_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter(name="retentionInDays") @@ -1569,8 +1998,29 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The number of days to retain logs for. :param pulumi.Input[int] retention_in_mb: The maximum size in megabytes that HTTP log files can use before being removed. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + AppServiceLogsHttpLogsFileSystemArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[pulumi.Input[int]] = None, + retention_in_mb: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -1679,68 +2129,199 @@ def __init__(__self__, *, :param pulumi.Input[bool] websockets_enabled: Should WebSockets be enabled? :param pulumi.Input[str] windows_fx_version: The Windows Docker container image (`DOCKER|`) """ + AppServiceSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + acr_use_managed_identity_credentials=acr_use_managed_identity_credentials, + acr_user_managed_identity_client_id=acr_user_managed_identity_client_id, + always_on=always_on, + app_command_line=app_command_line, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + default_documents=default_documents, + dotnet_framework_version=dotnet_framework_version, + ftps_state=ftps_state, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + java_container=java_container, + java_container_version=java_container_version, + java_version=java_version, + linux_fx_version=linux_fx_version, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + min_tls_version=min_tls_version, + number_of_workers=number_of_workers, + php_version=php_version, + python_version=python_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + acr_use_managed_identity_credentials: Optional[pulumi.Input[bool]] = None, + acr_user_managed_identity_client_id: Optional[pulumi.Input[str]] = None, + always_on: Optional[pulumi.Input[bool]] = None, + app_command_line: Optional[pulumi.Input[str]] = None, + auto_swap_slot_name: Optional[pulumi.Input[str]] = None, + cors: Optional[pulumi.Input['AppServiceSiteConfigCorsArgs']] = None, + default_documents: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + dotnet_framework_version: Optional[pulumi.Input[str]] = None, + ftps_state: Optional[pulumi.Input[str]] = None, + health_check_path: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['AppServiceSiteConfigIpRestrictionArgs']]]] = None, + java_container: Optional[pulumi.Input[str]] = None, + java_container_version: Optional[pulumi.Input[str]] = None, + java_version: Optional[pulumi.Input[str]] = None, + linux_fx_version: Optional[pulumi.Input[str]] = None, + local_mysql_enabled: Optional[pulumi.Input[bool]] = None, + managed_pipeline_mode: Optional[pulumi.Input[str]] = None, + min_tls_version: Optional[pulumi.Input[str]] = None, + number_of_workers: Optional[pulumi.Input[int]] = None, + php_version: Optional[pulumi.Input[str]] = None, + python_version: Optional[pulumi.Input[str]] = None, + remote_debugging_enabled: Optional[pulumi.Input[bool]] = None, + remote_debugging_version: Optional[pulumi.Input[str]] = None, + scm_ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['AppServiceSiteConfigScmIpRestrictionArgs']]]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + scm_use_main_ip_restriction: Optional[pulumi.Input[bool]] = None, + use32_bit_worker_process: Optional[pulumi.Input[bool]] = None, + vnet_route_all_enabled: Optional[pulumi.Input[bool]] = None, + websockets_enabled: Optional[pulumi.Input[bool]] = None, + windows_fx_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if acr_use_managed_identity_credentials is None and 'acrUseManagedIdentityCredentials' in kwargs: + acr_use_managed_identity_credentials = kwargs['acrUseManagedIdentityCredentials'] + if acr_user_managed_identity_client_id is None and 'acrUserManagedIdentityClientId' in kwargs: + acr_user_managed_identity_client_id = kwargs['acrUserManagedIdentityClientId'] + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if java_container is None and 'javaContainer' in kwargs: + java_container = kwargs['javaContainer'] + if java_container_version is None and 'javaContainerVersion' in kwargs: + java_container_version = kwargs['javaContainerVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if number_of_workers is None and 'numberOfWorkers' in kwargs: + number_of_workers = kwargs['numberOfWorkers'] + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if acr_use_managed_identity_credentials is not None: - pulumi.set(__self__, "acr_use_managed_identity_credentials", acr_use_managed_identity_credentials) + _setter("acr_use_managed_identity_credentials", acr_use_managed_identity_credentials) if acr_user_managed_identity_client_id is not None: - pulumi.set(__self__, "acr_user_managed_identity_client_id", acr_user_managed_identity_client_id) + _setter("acr_user_managed_identity_client_id", acr_user_managed_identity_client_id) if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if dotnet_framework_version is not None: - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) + _setter("dotnet_framework_version", dotnet_framework_version) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if java_container is not None: - pulumi.set(__self__, "java_container", java_container) + _setter("java_container", java_container) if java_container_version is not None: - pulumi.set(__self__, "java_container_version", java_container_version) + _setter("java_container_version", java_container_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if local_mysql_enabled is not None: - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) + _setter("local_mysql_enabled", local_mysql_enabled) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if number_of_workers is not None: - pulumi.set(__self__, "number_of_workers", number_of_workers) + _setter("number_of_workers", number_of_workers) if php_version is not None: - pulumi.set(__self__, "php_version", php_version) + _setter("php_version", php_version) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker_process is not None: - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) + _setter("use32_bit_worker_process", use32_bit_worker_process) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if windows_fx_version is not None: - pulumi.set(__self__, "windows_fx_version", windows_fx_version) + _setter("windows_fx_version", windows_fx_version) @property @pulumi.getter(name="acrUseManagedIdentityCredentials") @@ -2137,9 +2718,28 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls. :param pulumi.Input[bool] support_credentials: Are credentials supported? """ - pulumi.set(__self__, "allowed_origins", allowed_origins) + AppServiceSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + support_credentials: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -2187,20 +2787,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + AppServiceSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['AppServiceSiteConfigIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -2302,14 +2931,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + AppServiceSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -2381,20 +3035,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + AppServiceSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['AppServiceSiteConfigScmIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -2496,14 +3179,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + AppServiceSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -2563,10 +3271,23 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password associated with the username, which can be used to publish to this App Service. :param pulumi.Input[str] username: The username which can be used to publish to this App Service """ + AppServiceSiteCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -2608,16 +3329,43 @@ def __init__(__self__, *, :param pulumi.Input[bool] rollback_enabled: Enable roll-back for the repository. Defaults to `false` if not specified. :param pulumi.Input[bool] use_mercurial: Use Mercurial if `true`, otherwise uses Git. """ + AppServiceSourceControlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + branch=branch, + manual_integration=manual_integration, + repo_url=repo_url, + rollback_enabled=rollback_enabled, + use_mercurial=use_mercurial, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + branch: Optional[pulumi.Input[str]] = None, + manual_integration: Optional[pulumi.Input[bool]] = None, + repo_url: Optional[pulumi.Input[str]] = None, + rollback_enabled: Optional[pulumi.Input[bool]] = None, + use_mercurial: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if manual_integration is None and 'manualIntegration' in kwargs: + manual_integration = kwargs['manualIntegration'] + if repo_url is None and 'repoUrl' in kwargs: + repo_url = kwargs['repoUrl'] + if rollback_enabled is None and 'rollbackEnabled' in kwargs: + rollback_enabled = kwargs['rollbackEnabled'] + if use_mercurial is None and 'useMercurial' in kwargs: + use_mercurial = kwargs['useMercurial'] + if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if manual_integration is not None: - pulumi.set(__self__, "manual_integration", manual_integration) + _setter("manual_integration", manual_integration) if repo_url is not None: - pulumi.set(__self__, "repo_url", repo_url) + _setter("repo_url", repo_url) if rollback_enabled is not None: - pulumi.set(__self__, "rollback_enabled", rollback_enabled) + _setter("rollback_enabled", rollback_enabled) if use_mercurial is not None: - pulumi.set(__self__, "use_mercurial", use_mercurial) + _setter("use_mercurial", use_mercurial) @property @pulumi.getter @@ -2697,13 +3445,52 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of storage. Possible values are `AzureBlob` and `AzureFiles`. :param pulumi.Input[str] mount_path: The path to mount the storage within the site's runtime environment. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + AppServiceStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + mount_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -2791,14 +3578,39 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_secret_name: Key Vault secret name. :param pulumi.Input[str] provisioning_state: Status of the Key Vault secret. """ + CertificateOrderCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_name=certificate_name, + key_vault_id=key_vault_id, + key_vault_secret_name=key_vault_secret_name, + provisioning_state=provisioning_state, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_name: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + key_vault_secret_name: Optional[pulumi.Input[str]] = None, + provisioning_state: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_name is None and 'certificateName' in kwargs: + certificate_name = kwargs['certificateName'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_secret_name is None and 'keyVaultSecretName' in kwargs: + key_vault_secret_name = kwargs['keyVaultSecretName'] + if provisioning_state is None and 'provisioningState' in kwargs: + provisioning_state = kwargs['provisioningState'] + if certificate_name is not None: - pulumi.set(__self__, "certificate_name", certificate_name) + _setter("certificate_name", certificate_name) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if key_vault_secret_name is not None: - pulumi.set(__self__, "key_vault_secret_name", key_vault_secret_name) + _setter("key_vault_secret_name", key_vault_secret_name) if provisioning_state is not None: - pulumi.set(__self__, "provisioning_state", provisioning_state) + _setter("provisioning_state", provisioning_state) @property @pulumi.getter(name="certificateName") @@ -2868,19 +3680,50 @@ def __init__(__self__, *, :param pulumi.Input[str] secret: Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`. :param pulumi.Input[str] subscription_id: Subscription ID for `userAssignedIdentity`. `subscription_id` and `client_id` should be either both specified or both not specified. """ - pulumi.set(__self__, "type", type) + ConnectionAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + certificate=certificate, + client_id=client_id, + name=name, + principal_id=principal_id, + secret=secret, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + + _setter("type", type) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -2974,7 +3817,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] key_vault_id: The key vault id to store secret. """ - pulumi.set(__self__, "key_vault_id", key_vault_id) + ConnectionSecretStoreArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("key_vault_id", key_vault_id) @property @pulumi.getter(name="keyVaultId") @@ -2998,8 +3856,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Cluster Setting. :param pulumi.Input[str] value: The value for the Cluster Setting. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + EnvironmentClusterSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -3035,8 +3910,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Cluster Setting. :param pulumi.Input[str] value: The value for the Cluster Setting. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + EnvironmentV3ClusterSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -3074,12 +3966,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_addresses: A list of IP addresses that network traffic will originate from in CIDR notation. :param pulumi.Input[Sequence[pulumi.Input[str]]] ports: The ports that network traffic will arrive to the App Service Environment V3 on. """ + EnvironmentV3InboundNetworkDependencyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + ip_addresses=ip_addresses, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) if ports is not None: - pulumi.set(__self__, "ports", ports) + _setter("ports", ports) @property @pulumi.getter @@ -3153,33 +4062,88 @@ def __init__(__self__, *, :param pulumi.Input['FunctionAppAuthSettingsTwitterArgs'] twitter: A `twitter` block as defined below. :param pulumi.Input[str] unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values are `AllowAnonymous` and `RedirectToLoginPage`. """ - pulumi.set(__self__, "enabled", enabled) + FunctionAppAuthSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_params=additional_login_params, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + active_directory: Optional[pulumi.Input['FunctionAppAuthSettingsActiveDirectoryArgs']] = None, + additional_login_params: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + facebook: Optional[pulumi.Input['FunctionAppAuthSettingsFacebookArgs']] = None, + google: Optional[pulumi.Input['FunctionAppAuthSettingsGoogleArgs']] = None, + issuer: Optional[pulumi.Input[str]] = None, + microsoft: Optional[pulumi.Input['FunctionAppAuthSettingsMicrosoftArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + token_refresh_extension_hours: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + twitter: Optional[pulumi.Input['FunctionAppAuthSettingsTwitterArgs']] = None, + unauthenticated_client_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_params is None and 'additionalLoginParams' in kwargs: + additional_login_params = kwargs['additionalLoginParams'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_params is not None: - pulumi.set(__self__, "additional_login_params", additional_login_params) + _setter("additional_login_params", additional_login_params) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -3363,11 +4327,34 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_audiences: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. :param pulumi.Input[str] client_secret: The Client Secret of this relying party application. If no secret is provided, implicit flow will be used. """ - pulumi.set(__self__, "client_id", client_id) + FunctionAppAuthSettingsActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -3417,10 +4404,35 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret: The App Secret of the Facebook app used for Facebook login. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret", app_secret) + FunctionAppAuthSettingsFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret is None: + raise TypeError("Missing 'app_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) + _setter("app_secret", app_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -3470,10 +4482,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The client secret associated with the Google web application. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + FunctionAppAuthSettingsGoogleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -3523,10 +4560,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The OAuth 2.0 client secret that was created for the app used for authentication. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + FunctionAppAuthSettingsMicrosoftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -3574,8 +4636,29 @@ def __init__(__self__, *, :param pulumi.Input[str] consumer_key: The OAuth 1.0a consumer key of the Twitter application used for sign-in. :param pulumi.Input[str] consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret", consumer_secret) + FunctionAppAuthSettingsTwitterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret is None: + raise TypeError("Missing 'consumer_secret' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret", consumer_secret) @property @pulumi.getter(name="consumerKey") @@ -3613,9 +4696,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of the Connection String. Possible values are `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure` and `SQLServer`. :param pulumi.Input[str] value: The value for the Connection String. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + FunctionAppConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -3663,8 +4767,25 @@ def __init__(__self__, *, :param pulumi.Input[str] content: The content of the file. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The filename of the file to be uploaded. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "name", name) + FunctionAppFunctionFileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("content", content) + _setter("name", name) @property @pulumi.getter @@ -3706,13 +4827,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service. """ - pulumi.set(__self__, "type", type) + FunctionAppIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -3823,48 +4969,139 @@ def __init__(__self__, *, > **Note:** when using an App Service Plan in the `Free` or `Shared` Tiers `use_32_bit_worker_process` must be set to `true`. :param pulumi.Input[bool] websockets_enabled: Should WebSockets be enabled? """ + FunctionAppSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + app_scale_limit=app_scale_limit, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + dotnet_framework_version=dotnet_framework_version, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + java_version=java_version, + linux_fx_version=linux_fx_version, + min_tls_version=min_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[pulumi.Input[bool]] = None, + app_scale_limit: Optional[pulumi.Input[int]] = None, + auto_swap_slot_name: Optional[pulumi.Input[str]] = None, + cors: Optional[pulumi.Input['FunctionAppSiteConfigCorsArgs']] = None, + dotnet_framework_version: Optional[pulumi.Input[str]] = None, + elastic_instance_minimum: Optional[pulumi.Input[int]] = None, + ftps_state: Optional[pulumi.Input[str]] = None, + health_check_path: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionAppSiteConfigIpRestrictionArgs']]]] = None, + java_version: Optional[pulumi.Input[str]] = None, + linux_fx_version: Optional[pulumi.Input[str]] = None, + min_tls_version: Optional[pulumi.Input[str]] = None, + pre_warmed_instance_count: Optional[pulumi.Input[int]] = None, + runtime_scale_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + scm_ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionAppSiteConfigScmIpRestrictionArgs']]]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + scm_use_main_ip_restriction: Optional[pulumi.Input[bool]] = None, + use32_bit_worker_process: Optional[pulumi.Input[bool]] = None, + vnet_route_all_enabled: Optional[pulumi.Input[bool]] = None, + websockets_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if dotnet_framework_version is not None: - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) + _setter("dotnet_framework_version", dotnet_framework_version) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker_process is not None: - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) + _setter("use32_bit_worker_process", use32_bit_worker_process) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) @property @pulumi.getter(name="alwaysOn") @@ -4137,9 +5374,28 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls. :param pulumi.Input[bool] support_credentials: Are credentials supported? """ - pulumi.set(__self__, "allowed_origins", allowed_origins) + FunctionAppSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + support_credentials: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -4187,20 +5443,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + FunctionAppSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['FunctionAppSiteConfigIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -4302,14 +5587,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + FunctionAppSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -4381,20 +5691,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + FunctionAppSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['FunctionAppSiteConfigScmIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -4496,14 +5835,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + FunctionAppSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -4563,10 +5927,23 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password associated with the username, which can be used to publish to this App Service. :param pulumi.Input[str] username: The username which can be used to publish to this App Service """ + FunctionAppSiteCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -4628,33 +6005,88 @@ def __init__(__self__, *, :param pulumi.Input['FunctionAppSlotAuthSettingsTwitterArgs'] twitter: A `twitter` block as defined below. :param pulumi.Input[str] unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values are `AllowAnonymous` and `RedirectToLoginPage`. """ - pulumi.set(__self__, "enabled", enabled) + FunctionAppSlotAuthSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_params=additional_login_params, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + active_directory: Optional[pulumi.Input['FunctionAppSlotAuthSettingsActiveDirectoryArgs']] = None, + additional_login_params: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + facebook: Optional[pulumi.Input['FunctionAppSlotAuthSettingsFacebookArgs']] = None, + google: Optional[pulumi.Input['FunctionAppSlotAuthSettingsGoogleArgs']] = None, + issuer: Optional[pulumi.Input[str]] = None, + microsoft: Optional[pulumi.Input['FunctionAppSlotAuthSettingsMicrosoftArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + token_refresh_extension_hours: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + twitter: Optional[pulumi.Input['FunctionAppSlotAuthSettingsTwitterArgs']] = None, + unauthenticated_client_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_params is None and 'additionalLoginParams' in kwargs: + additional_login_params = kwargs['additionalLoginParams'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_params is not None: - pulumi.set(__self__, "additional_login_params", additional_login_params) + _setter("additional_login_params", additional_login_params) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -4838,11 +6270,34 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_audiences: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. :param pulumi.Input[str] client_secret: The Client Secret of this relying party application. If no secret is provided, implicit flow will be used. """ - pulumi.set(__self__, "client_id", client_id) + FunctionAppSlotAuthSettingsActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -4892,10 +6347,35 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret: The App Secret of the Facebook app used for Facebook login. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret", app_secret) + FunctionAppSlotAuthSettingsFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret is None: + raise TypeError("Missing 'app_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) + _setter("app_secret", app_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -4945,10 +6425,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The client secret associated with the Google web application. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + FunctionAppSlotAuthSettingsGoogleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -4998,10 +6503,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The OAuth 2.0 client secret that was created for the app used for authentication. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + FunctionAppSlotAuthSettingsMicrosoftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -5049,8 +6579,29 @@ def __init__(__self__, *, :param pulumi.Input[str] consumer_key: The OAuth 1.0a consumer key of the Twitter application used for sign-in. :param pulumi.Input[str] consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret", consumer_secret) + FunctionAppSlotAuthSettingsTwitterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret is None: + raise TypeError("Missing 'consumer_secret' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret", consumer_secret) @property @pulumi.getter(name="consumerKey") @@ -5088,9 +6639,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of the Connection String. Possible values are `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure` and `SQLServer`. :param pulumi.Input[str] value: The value for the Connection String. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + FunctionAppSlotConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -5144,13 +6716,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service. """ - pulumi.set(__self__, "type", type) + FunctionAppSlotIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -5257,48 +6854,139 @@ def __init__(__self__, *, > **Note:** when using an App Service Plan in the `Free` or `Shared` Tiers `use_32_bit_worker_process` must be set to `true`. :param pulumi.Input[bool] websockets_enabled: Should WebSockets be enabled? """ + FunctionAppSlotSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + app_scale_limit=app_scale_limit, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + dotnet_framework_version=dotnet_framework_version, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + java_version=java_version, + linux_fx_version=linux_fx_version, + min_tls_version=min_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[pulumi.Input[bool]] = None, + app_scale_limit: Optional[pulumi.Input[int]] = None, + auto_swap_slot_name: Optional[pulumi.Input[str]] = None, + cors: Optional[pulumi.Input['FunctionAppSlotSiteConfigCorsArgs']] = None, + dotnet_framework_version: Optional[pulumi.Input[str]] = None, + elastic_instance_minimum: Optional[pulumi.Input[int]] = None, + ftps_state: Optional[pulumi.Input[str]] = None, + health_check_path: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionAppSlotSiteConfigIpRestrictionArgs']]]] = None, + java_version: Optional[pulumi.Input[str]] = None, + linux_fx_version: Optional[pulumi.Input[str]] = None, + min_tls_version: Optional[pulumi.Input[str]] = None, + pre_warmed_instance_count: Optional[pulumi.Input[int]] = None, + runtime_scale_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + scm_ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionAppSlotSiteConfigScmIpRestrictionArgs']]]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + scm_use_main_ip_restriction: Optional[pulumi.Input[bool]] = None, + use32_bit_worker_process: Optional[pulumi.Input[bool]] = None, + vnet_route_all_enabled: Optional[pulumi.Input[bool]] = None, + websockets_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if dotnet_framework_version is not None: - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) + _setter("dotnet_framework_version", dotnet_framework_version) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker_process is not None: - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) + _setter("use32_bit_worker_process", use32_bit_worker_process) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) @property @pulumi.getter(name="alwaysOn") @@ -5567,9 +7255,28 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls. :param pulumi.Input[bool] support_credentials: Are credentials supported? """ - pulumi.set(__self__, "allowed_origins", allowed_origins) + FunctionAppSlotSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + support_credentials: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -5617,20 +7324,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + FunctionAppSlotSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['FunctionAppSlotSiteConfigIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -5732,14 +7468,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + FunctionAppSlotSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -5811,20 +7572,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + FunctionAppSlotSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['FunctionAppSlotSiteConfigScmIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -5926,14 +7716,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + FunctionAppSlotSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -5993,10 +7808,23 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password associated with the username, which can be used to publish to this App Service. :param pulumi.Input[str] username: The username which can be used to publish to this App Service """ + FunctionAppSlotSiteCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -6038,16 +7866,43 @@ def __init__(__self__, *, :param pulumi.Input[bool] rollback_enabled: Enable roll-back for the repository. Defaults to `false` if not specified. :param pulumi.Input[bool] use_mercurial: Use Mercurial if `true`, otherwise uses Git. """ + FunctionAppSourceControlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + branch=branch, + manual_integration=manual_integration, + repo_url=repo_url, + rollback_enabled=rollback_enabled, + use_mercurial=use_mercurial, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + branch: Optional[pulumi.Input[str]] = None, + manual_integration: Optional[pulumi.Input[bool]] = None, + repo_url: Optional[pulumi.Input[str]] = None, + rollback_enabled: Optional[pulumi.Input[bool]] = None, + use_mercurial: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if manual_integration is None and 'manualIntegration' in kwargs: + manual_integration = kwargs['manualIntegration'] + if repo_url is None and 'repoUrl' in kwargs: + repo_url = kwargs['repoUrl'] + if rollback_enabled is None and 'rollbackEnabled' in kwargs: + rollback_enabled = kwargs['rollbackEnabled'] + if use_mercurial is None and 'useMercurial' in kwargs: + use_mercurial = kwargs['useMercurial'] + if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if manual_integration is not None: - pulumi.set(__self__, "manual_integration", manual_integration) + _setter("manual_integration", manual_integration) if repo_url is not None: - pulumi.set(__self__, "repo_url", repo_url) + _setter("repo_url", repo_url) if rollback_enabled is not None: - pulumi.set(__self__, "rollback_enabled", rollback_enabled) + _setter("rollback_enabled", rollback_enabled) if use_mercurial is not None: - pulumi.set(__self__, "use_mercurial", use_mercurial) + _setter("use_mercurial", use_mercurial) @property @pulumi.getter @@ -6149,35 +8004,92 @@ def __init__(__self__, *, :param pulumi.Input['LinuxFunctionAppAuthSettingsTwitterArgs'] twitter: A `twitter` block as defined below. :param pulumi.Input[str] unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + LinuxFunctionAppAuthSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + active_directory: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsActiveDirectoryArgs']] = None, + additional_login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + facebook: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsFacebookArgs']] = None, + github: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsGithubArgs']] = None, + google: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsGoogleArgs']] = None, + issuer: Optional[pulumi.Input[str]] = None, + microsoft: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsMicrosoftArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + token_refresh_extension_hours: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + twitter: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsTwitterArgs']] = None, + unauthenticated_client_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -6379,13 +8291,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppAuthSettingsActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -6451,13 +8390,40 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + LinuxFunctionAppAuthSettingsFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -6521,13 +8487,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppAuthSettingsGithubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -6591,13 +8584,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppAuthSettingsGoogleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -6661,13 +8681,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppAuthSettingsMicrosoftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -6729,11 +8776,34 @@ def __init__(__self__, *, :param pulumi.Input[str] consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param pulumi.Input[str] consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + LinuxFunctionAppAuthSettingsTwitterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -6827,49 +8897,146 @@ def __init__(__self__, *, :param pulumi.Input['LinuxFunctionAppAuthSettingsV2TwitterV2Args'] twitter_v2: A `twitter_v2` block as defined below. :param pulumi.Input[str] unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + LinuxFunctionAppAuthSettingsV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsV2LoginArgs']] = None, + active_directory_v2: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsV2ActiveDirectoryV2Args']] = None, + apple_v2: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsV2AppleV2Args']] = None, + auth_enabled: Optional[pulumi.Input[bool]] = None, + azure_static_web_app_v2: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsV2AzureStaticWebAppV2Args']] = None, + config_file_path: Optional[pulumi.Input[str]] = None, + custom_oidc_v2s: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppAuthSettingsV2CustomOidcV2Args']]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + excluded_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + facebook_v2: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsV2FacebookV2Args']] = None, + forward_proxy_convention: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_host_header_name: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_scheme_header_name: Optional[pulumi.Input[str]] = None, + github_v2: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsV2GithubV2Args']] = None, + google_v2: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsV2GoogleV2Args']] = None, + http_route_api_prefix: Optional[pulumi.Input[str]] = None, + microsoft_v2: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsV2MicrosoftV2Args']] = None, + require_authentication: Optional[pulumi.Input[bool]] = None, + require_https: Optional[pulumi.Input[bool]] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + twitter_v2: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsV2TwitterV2Args']] = None, + unauthenticated_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -7175,28 +9342,89 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param pulumi.Input[bool] www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + LinuxFunctionAppAuthSettingsV2ActiveDirectoryV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + tenant_auth_endpoint: Optional[pulumi.Input[str]] = None, + allowed_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret_certificate_thumbprint: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + jwt_allowed_client_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + jwt_allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + www_authentication_disabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -7358,10 +9586,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppAuthSettingsV2AppleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -7407,7 +9660,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppAuthSettingsV2AzureStaticWebAppV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -7449,25 +9717,80 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: The list of the scopes that should be requested while authenticating. :param pulumi.Input[str] token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + LinuxFunctionAppAuthSettingsV2CustomOidcV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + openid_configuration_endpoint: Optional[pulumi.Input[str]] = None, + authorisation_endpoint: Optional[pulumi.Input[str]] = None, + certification_uri: Optional[pulumi.Input[str]] = None, + client_credential_method: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + issuer_endpoint: Optional[pulumi.Input[str]] = None, + name_claim_type: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + token_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -7617,12 +9940,41 @@ def __init__(__self__, *, :param pulumi.Input[str] graph_api_version: The version of the Facebook API to be used while logging in. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + LinuxFunctionAppAuthSettingsV2FacebookV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + graph_api_version: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -7686,10 +10038,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppAuthSettingsV2GithubV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -7743,12 +10120,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppAuthSettingsV2GoogleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -7830,28 +10236,81 @@ def __init__(__self__, *, :param pulumi.Input[str] token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param pulumi.Input[bool] validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + LinuxFunctionAppAuthSettingsV2LoginArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cookie_expiration_convention: Optional[pulumi.Input[str]] = None, + cookie_expiration_time: Optional[pulumi.Input[str]] = None, + logout_endpoint: Optional[pulumi.Input[str]] = None, + nonce_expiration_time: Optional[pulumi.Input[str]] = None, + preserve_url_fragments_for_logins: Optional[pulumi.Input[bool]] = None, + token_refresh_extension_time: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + token_store_path: Optional[pulumi.Input[str]] = None, + token_store_sas_setting_name: Optional[pulumi.Input[str]] = None, + validate_nonce: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -8003,12 +10462,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppAuthSettingsV2MicrosoftV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -8072,8 +10560,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + LinuxFunctionAppAuthSettingsV2TwitterV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -8115,11 +10624,36 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_url: The SAS URL to the container. :param pulumi.Input[bool] enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + LinuxFunctionAppBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['LinuxFunctionAppBackupScheduleArgs']] = None, + storage_account_url: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -8188,16 +10722,53 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param pulumi.Input[str] start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + LinuxFunctionAppBackupScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[pulumi.Input[int]] = None, + frequency_unit: Optional[pulumi.Input[str]] = None, + keep_at_least_one_backup: Optional[pulumi.Input[bool]] = None, + last_execution_time: Optional[pulumi.Input[str]] = None, + retention_period_days: Optional[pulumi.Input[int]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -8282,9 +10853,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`. :param pulumi.Input[str] value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + LinuxFunctionAppConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -8338,13 +10930,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + LinuxFunctionAppIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -8477,78 +11094,229 @@ def __init__(__self__, *, :param pulumi.Input[bool] websockets_enabled: Should Web Sockets be enabled. Defaults to `false`. :param pulumi.Input[int] worker_count: The number of Workers for this Linux Function App. """ + LinuxFunctionAppSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + app_scale_limit=app_scale_limit, + app_service_logs=app_service_logs, + application_insights_connection_string=application_insights_connection_string, + application_insights_key=application_insights_key, + application_stack=application_stack, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + load_balancing_mode=load_balancing_mode, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[pulumi.Input[bool]] = None, + api_definition_url: Optional[pulumi.Input[str]] = None, + api_management_api_id: Optional[pulumi.Input[str]] = None, + app_command_line: Optional[pulumi.Input[str]] = None, + app_scale_limit: Optional[pulumi.Input[int]] = None, + app_service_logs: Optional[pulumi.Input['LinuxFunctionAppSiteConfigAppServiceLogsArgs']] = None, + application_insights_connection_string: Optional[pulumi.Input[str]] = None, + application_insights_key: Optional[pulumi.Input[str]] = None, + application_stack: Optional[pulumi.Input['LinuxFunctionAppSiteConfigApplicationStackArgs']] = None, + container_registry_managed_identity_client_id: Optional[pulumi.Input[str]] = None, + container_registry_use_managed_identity: Optional[pulumi.Input[bool]] = None, + cors: Optional[pulumi.Input['LinuxFunctionAppSiteConfigCorsArgs']] = None, + default_documents: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + detailed_error_logging_enabled: Optional[pulumi.Input[bool]] = None, + elastic_instance_minimum: Optional[pulumi.Input[int]] = None, + ftps_state: Optional[pulumi.Input[str]] = None, + health_check_eviction_time_in_min: Optional[pulumi.Input[int]] = None, + health_check_path: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppSiteConfigIpRestrictionArgs']]]] = None, + linux_fx_version: Optional[pulumi.Input[str]] = None, + load_balancing_mode: Optional[pulumi.Input[str]] = None, + managed_pipeline_mode: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + pre_warmed_instance_count: Optional[pulumi.Input[int]] = None, + remote_debugging_enabled: Optional[pulumi.Input[bool]] = None, + remote_debugging_version: Optional[pulumi.Input[str]] = None, + runtime_scale_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + scm_ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppSiteConfigScmIpRestrictionArgs']]]] = None, + scm_minimum_tls_version: Optional[pulumi.Input[str]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + scm_use_main_ip_restriction: Optional[pulumi.Input[bool]] = None, + use32_bit_worker: Optional[pulumi.Input[bool]] = None, + vnet_route_all_enabled: Optional[pulumi.Input[bool]] = None, + websockets_enabled: Optional[pulumi.Input[bool]] = None, + worker_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if app_service_logs is None and 'appServiceLogs' in kwargs: + app_service_logs = kwargs['appServiceLogs'] + if application_insights_connection_string is None and 'applicationInsightsConnectionString' in kwargs: + application_insights_connection_string = kwargs['applicationInsightsConnectionString'] + if application_insights_key is None and 'applicationInsightsKey' in kwargs: + application_insights_key = kwargs['applicationInsightsKey'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if app_service_logs is not None: - pulumi.set(__self__, "app_service_logs", app_service_logs) + _setter("app_service_logs", app_service_logs) if application_insights_connection_string is not None: - pulumi.set(__self__, "application_insights_connection_string", application_insights_connection_string) + _setter("application_insights_connection_string", application_insights_connection_string) if application_insights_key is not None: - pulumi.set(__self__, "application_insights_key", application_insights_key) + _setter("application_insights_key", application_insights_key) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if container_registry_managed_identity_client_id is not None: - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) if container_registry_use_managed_identity is not None: - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -8991,10 +11759,27 @@ def __init__(__self__, *, > **NOTE:** This block is not supported on Consumption plans. """ + LinuxFunctionAppSiteConfigAppServiceLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_quota_mb=disk_quota_mb, + retention_period_days=retention_period_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_quota_mb: Optional[pulumi.Input[int]] = None, + retention_period_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_quota_mb is None and 'diskQuotaMb' in kwargs: + disk_quota_mb = kwargs['diskQuotaMb'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if disk_quota_mb is not None: - pulumi.set(__self__, "disk_quota_mb", disk_quota_mb) + _setter("disk_quota_mb", disk_quota_mb) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) @property @pulumi.getter(name="diskQuotaMb") @@ -9044,22 +11829,61 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_custom_runtime: Should the Linux Function App use a custom runtime? :param pulumi.Input[bool] use_dotnet_isolated_runtime: Should the DotNet process use an isolated runtime. Defaults to `false`. """ + LinuxFunctionAppSiteConfigApplicationStackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dockers=dockers, + dotnet_version=dotnet_version, + java_version=java_version, + node_version=node_version, + powershell_core_version=powershell_core_version, + python_version=python_version, + use_custom_runtime=use_custom_runtime, + use_dotnet_isolated_runtime=use_dotnet_isolated_runtime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dockers: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppSiteConfigApplicationStackDockerArgs']]]] = None, + dotnet_version: Optional[pulumi.Input[str]] = None, + java_version: Optional[pulumi.Input[str]] = None, + node_version: Optional[pulumi.Input[str]] = None, + powershell_core_version: Optional[pulumi.Input[str]] = None, + python_version: Optional[pulumi.Input[str]] = None, + use_custom_runtime: Optional[pulumi.Input[bool]] = None, + use_dotnet_isolated_runtime: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if powershell_core_version is None and 'powershellCoreVersion' in kwargs: + powershell_core_version = kwargs['powershellCoreVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if use_custom_runtime is None and 'useCustomRuntime' in kwargs: + use_custom_runtime = kwargs['useCustomRuntime'] + if use_dotnet_isolated_runtime is None and 'useDotnetIsolatedRuntime' in kwargs: + use_dotnet_isolated_runtime = kwargs['useDotnetIsolatedRuntime'] + if dockers is not None: - pulumi.set(__self__, "dockers", dockers) + _setter("dockers", dockers) if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if powershell_core_version is not None: - pulumi.set(__self__, "powershell_core_version", powershell_core_version) + _setter("powershell_core_version", powershell_core_version) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if use_custom_runtime is not None: - pulumi.set(__self__, "use_custom_runtime", use_custom_runtime) + _setter("use_custom_runtime", use_custom_runtime) if use_dotnet_isolated_runtime is not None: - pulumi.set(__self__, "use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) + _setter("use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) @property @pulumi.getter @@ -9177,13 +12001,48 @@ def __init__(__self__, *, > **NOTE:** This value is required if `container_registry_use_managed_identity` is not set to `true`. """ - pulumi.set(__self__, "image_name", image_name) - pulumi.set(__self__, "image_tag", image_tag) - pulumi.set(__self__, "registry_url", registry_url) + LinuxFunctionAppSiteConfigApplicationStackDockerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + image_name=image_name, + image_tag=image_tag, + registry_url=registry_url, + registry_password=registry_password, + registry_username=registry_username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image_name: Optional[pulumi.Input[str]] = None, + image_tag: Optional[pulumi.Input[str]] = None, + registry_url: Optional[pulumi.Input[str]] = None, + registry_password: Optional[pulumi.Input[str]] = None, + registry_username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if image_name is None: + raise TypeError("Missing 'image_name' argument") + if image_tag is None and 'imageTag' in kwargs: + image_tag = kwargs['imageTag'] + if image_tag is None: + raise TypeError("Missing 'image_tag' argument") + if registry_url is None and 'registryUrl' in kwargs: + registry_url = kwargs['registryUrl'] + if registry_url is None: + raise TypeError("Missing 'registry_url' argument") + if registry_password is None and 'registryPassword' in kwargs: + registry_password = kwargs['registryPassword'] + if registry_username is None and 'registryUsername' in kwargs: + registry_username = kwargs['registryUsername'] + + _setter("image_name", image_name) + _setter("image_tag", image_tag) + _setter("registry_url", registry_url) if registry_password is not None: - pulumi.set(__self__, "registry_password", registry_password) + _setter("registry_password", registry_password) if registry_username is not None: - pulumi.set(__self__, "registry_username", registry_username) + _setter("registry_username", registry_username) @property @pulumi.getter(name="imageName") @@ -9259,10 +12118,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: Specifies a list of origins that should be allowed to make cross-origin calls. :param pulumi.Input[bool] support_credentials: Are credentials allowed in CORS requests? Defaults to `false`. """ + LinuxFunctionAppSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + support_credentials: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -9310,20 +12186,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxFunctionAppSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['LinuxFunctionAppSiteConfigIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -9425,14 +12330,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxFunctionAppSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -9504,20 +12434,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxFunctionAppSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['LinuxFunctionAppSiteConfigScmIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -9619,14 +12578,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxFunctionAppSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -9686,10 +12670,23 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Linux Function App. Changing this forces a new Linux Function App to be created. Limit the function name to 32 characters to avoid naming collisions. For more information about [Function App naming rule](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftweb) and [Host ID Collisions](https://github.com/Azure/azure-functions-host/wiki/Host-IDs#host-id-collisions) :param pulumi.Input[str] password: The Site Credentials Password used for publishing. """ + LinuxFunctionAppSiteCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -9755,35 +12752,92 @@ def __init__(__self__, *, :param pulumi.Input['LinuxFunctionAppSlotAuthSettingsTwitterArgs'] twitter: a `twitter` block as detailed below. :param pulumi.Input[str] unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + LinuxFunctionAppSlotAuthSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + active_directory: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsActiveDirectoryArgs']] = None, + additional_login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + facebook: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsFacebookArgs']] = None, + github: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsGithubArgs']] = None, + google: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsGoogleArgs']] = None, + issuer: Optional[pulumi.Input[str]] = None, + microsoft: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsMicrosoftArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + token_refresh_extension_hours: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + twitter: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsTwitterArgs']] = None, + unauthenticated_client_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -9985,13 +13039,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppSlotAuthSettingsActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -10057,13 +13138,40 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + LinuxFunctionAppSlotAuthSettingsFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -10127,13 +13235,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppSlotAuthSettingsGithubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -10197,13 +13332,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppSlotAuthSettingsGoogleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -10267,13 +13429,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppSlotAuthSettingsMicrosoftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -10335,11 +13524,34 @@ def __init__(__self__, *, :param pulumi.Input[str] consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param pulumi.Input[str] consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + LinuxFunctionAppSlotAuthSettingsTwitterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -10433,49 +13645,146 @@ def __init__(__self__, *, :param pulumi.Input['LinuxFunctionAppSlotAuthSettingsV2TwitterV2Args'] twitter_v2: A `twitter_v2` block as defined below. :param pulumi.Input[str] unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + LinuxFunctionAppSlotAuthSettingsV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsV2LoginArgs']] = None, + active_directory_v2: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsV2ActiveDirectoryV2Args']] = None, + apple_v2: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsV2AppleV2Args']] = None, + auth_enabled: Optional[pulumi.Input[bool]] = None, + azure_static_web_app_v2: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsV2AzureStaticWebAppV2Args']] = None, + config_file_path: Optional[pulumi.Input[str]] = None, + custom_oidc_v2s: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppSlotAuthSettingsV2CustomOidcV2Args']]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + excluded_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + facebook_v2: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsV2FacebookV2Args']] = None, + forward_proxy_convention: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_host_header_name: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_scheme_header_name: Optional[pulumi.Input[str]] = None, + github_v2: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsV2GithubV2Args']] = None, + google_v2: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsV2GoogleV2Args']] = None, + http_route_api_prefix: Optional[pulumi.Input[str]] = None, + microsoft_v2: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsV2MicrosoftV2Args']] = None, + require_authentication: Optional[pulumi.Input[bool]] = None, + require_https: Optional[pulumi.Input[bool]] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + twitter_v2: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsV2TwitterV2Args']] = None, + unauthenticated_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -10781,28 +14090,89 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param pulumi.Input[bool] www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + LinuxFunctionAppSlotAuthSettingsV2ActiveDirectoryV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + tenant_auth_endpoint: Optional[pulumi.Input[str]] = None, + allowed_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret_certificate_thumbprint: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + jwt_allowed_client_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + jwt_allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + www_authentication_disabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -10964,10 +14334,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppSlotAuthSettingsV2AppleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -11013,7 +14408,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppSlotAuthSettingsV2AzureStaticWebAppV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -11055,25 +14465,80 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: The list of the scopes that should be requested while authenticating. :param pulumi.Input[str] token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + LinuxFunctionAppSlotAuthSettingsV2CustomOidcV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + openid_configuration_endpoint: Optional[pulumi.Input[str]] = None, + authorisation_endpoint: Optional[pulumi.Input[str]] = None, + certification_uri: Optional[pulumi.Input[str]] = None, + client_credential_method: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + issuer_endpoint: Optional[pulumi.Input[str]] = None, + name_claim_type: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + token_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -11223,12 +14688,41 @@ def __init__(__self__, *, :param pulumi.Input[str] graph_api_version: The version of the Facebook API to be used while logging in. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + LinuxFunctionAppSlotAuthSettingsV2FacebookV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + graph_api_version: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -11292,10 +14786,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppSlotAuthSettingsV2GithubV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -11349,12 +14868,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppSlotAuthSettingsV2GoogleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -11436,28 +14984,81 @@ def __init__(__self__, *, :param pulumi.Input[str] token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param pulumi.Input[bool] validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + LinuxFunctionAppSlotAuthSettingsV2LoginArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cookie_expiration_convention: Optional[pulumi.Input[str]] = None, + cookie_expiration_time: Optional[pulumi.Input[str]] = None, + logout_endpoint: Optional[pulumi.Input[str]] = None, + nonce_expiration_time: Optional[pulumi.Input[str]] = None, + preserve_url_fragments_for_logins: Optional[pulumi.Input[bool]] = None, + token_refresh_extension_time: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + token_store_path: Optional[pulumi.Input[str]] = None, + token_store_sas_setting_name: Optional[pulumi.Input[str]] = None, + validate_nonce: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -11609,12 +15210,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppSlotAuthSettingsV2MicrosoftV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -11678,8 +15308,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + LinuxFunctionAppSlotAuthSettingsV2TwitterV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -11721,11 +15372,36 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_url: The SAS URL to the container. :param pulumi.Input[bool] enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + LinuxFunctionAppSlotBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['LinuxFunctionAppSlotBackupScheduleArgs']] = None, + storage_account_url: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -11795,16 +15471,53 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param pulumi.Input[str] start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + LinuxFunctionAppSlotBackupScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[pulumi.Input[int]] = None, + frequency_unit: Optional[pulumi.Input[str]] = None, + keep_at_least_one_backup: Optional[pulumi.Input[bool]] = None, + last_execution_time: Optional[pulumi.Input[str]] = None, + retention_period_days: Optional[pulumi.Input[int]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -11892,9 +15605,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Type of database. Possible values include: `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param pulumi.Input[str] value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + LinuxFunctionAppSlotConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -11948,13 +15682,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + LinuxFunctionAppSlotIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -12088,80 +15847,235 @@ def __init__(__self__, *, :param pulumi.Input[bool] websockets_enabled: Should Web Sockets be enabled. Defaults to `false`. :param pulumi.Input[int] worker_count: The number of Workers for this Linux Function App. """ + LinuxFunctionAppSlotSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + app_scale_limit=app_scale_limit, + app_service_logs=app_service_logs, + application_insights_connection_string=application_insights_connection_string, + application_insights_key=application_insights_key, + application_stack=application_stack, + auto_swap_slot_name=auto_swap_slot_name, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + load_balancing_mode=load_balancing_mode, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[pulumi.Input[bool]] = None, + api_definition_url: Optional[pulumi.Input[str]] = None, + api_management_api_id: Optional[pulumi.Input[str]] = None, + app_command_line: Optional[pulumi.Input[str]] = None, + app_scale_limit: Optional[pulumi.Input[int]] = None, + app_service_logs: Optional[pulumi.Input['LinuxFunctionAppSlotSiteConfigAppServiceLogsArgs']] = None, + application_insights_connection_string: Optional[pulumi.Input[str]] = None, + application_insights_key: Optional[pulumi.Input[str]] = None, + application_stack: Optional[pulumi.Input['LinuxFunctionAppSlotSiteConfigApplicationStackArgs']] = None, + auto_swap_slot_name: Optional[pulumi.Input[str]] = None, + container_registry_managed_identity_client_id: Optional[pulumi.Input[str]] = None, + container_registry_use_managed_identity: Optional[pulumi.Input[bool]] = None, + cors: Optional[pulumi.Input['LinuxFunctionAppSlotSiteConfigCorsArgs']] = None, + default_documents: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + detailed_error_logging_enabled: Optional[pulumi.Input[bool]] = None, + elastic_instance_minimum: Optional[pulumi.Input[int]] = None, + ftps_state: Optional[pulumi.Input[str]] = None, + health_check_eviction_time_in_min: Optional[pulumi.Input[int]] = None, + health_check_path: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppSlotSiteConfigIpRestrictionArgs']]]] = None, + linux_fx_version: Optional[pulumi.Input[str]] = None, + load_balancing_mode: Optional[pulumi.Input[str]] = None, + managed_pipeline_mode: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + pre_warmed_instance_count: Optional[pulumi.Input[int]] = None, + remote_debugging_enabled: Optional[pulumi.Input[bool]] = None, + remote_debugging_version: Optional[pulumi.Input[str]] = None, + runtime_scale_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + scm_ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppSlotSiteConfigScmIpRestrictionArgs']]]] = None, + scm_minimum_tls_version: Optional[pulumi.Input[str]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + scm_use_main_ip_restriction: Optional[pulumi.Input[bool]] = None, + use32_bit_worker: Optional[pulumi.Input[bool]] = None, + vnet_route_all_enabled: Optional[pulumi.Input[bool]] = None, + websockets_enabled: Optional[pulumi.Input[bool]] = None, + worker_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if app_service_logs is None and 'appServiceLogs' in kwargs: + app_service_logs = kwargs['appServiceLogs'] + if application_insights_connection_string is None and 'applicationInsightsConnectionString' in kwargs: + application_insights_connection_string = kwargs['applicationInsightsConnectionString'] + if application_insights_key is None and 'applicationInsightsKey' in kwargs: + application_insights_key = kwargs['applicationInsightsKey'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if app_service_logs is not None: - pulumi.set(__self__, "app_service_logs", app_service_logs) + _setter("app_service_logs", app_service_logs) if application_insights_connection_string is not None: - pulumi.set(__self__, "application_insights_connection_string", application_insights_connection_string) + _setter("application_insights_connection_string", application_insights_connection_string) if application_insights_key is not None: - pulumi.set(__self__, "application_insights_key", application_insights_key) + _setter("application_insights_key", application_insights_key) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if container_registry_managed_identity_client_id is not None: - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) if container_registry_use_managed_identity is not None: - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -12621,10 +16535,27 @@ def __init__(__self__, *, > **NOTE:** This block is not supported on Consumption plans. """ + LinuxFunctionAppSlotSiteConfigAppServiceLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_quota_mb=disk_quota_mb, + retention_period_days=retention_period_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_quota_mb: Optional[pulumi.Input[int]] = None, + retention_period_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_quota_mb is None and 'diskQuotaMb' in kwargs: + disk_quota_mb = kwargs['diskQuotaMb'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if disk_quota_mb is not None: - pulumi.set(__self__, "disk_quota_mb", disk_quota_mb) + _setter("disk_quota_mb", disk_quota_mb) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) @property @pulumi.getter(name="diskQuotaMb") @@ -12674,22 +16605,61 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_custom_runtime: Should the Linux Function App use a custom runtime? :param pulumi.Input[bool] use_dotnet_isolated_runtime: Should the DotNet process use an isolated runtime. Defaults to `false`. """ + LinuxFunctionAppSlotSiteConfigApplicationStackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dockers=dockers, + dotnet_version=dotnet_version, + java_version=java_version, + node_version=node_version, + powershell_core_version=powershell_core_version, + python_version=python_version, + use_custom_runtime=use_custom_runtime, + use_dotnet_isolated_runtime=use_dotnet_isolated_runtime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dockers: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppSlotSiteConfigApplicationStackDockerArgs']]]] = None, + dotnet_version: Optional[pulumi.Input[str]] = None, + java_version: Optional[pulumi.Input[str]] = None, + node_version: Optional[pulumi.Input[str]] = None, + powershell_core_version: Optional[pulumi.Input[str]] = None, + python_version: Optional[pulumi.Input[str]] = None, + use_custom_runtime: Optional[pulumi.Input[bool]] = None, + use_dotnet_isolated_runtime: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if powershell_core_version is None and 'powershellCoreVersion' in kwargs: + powershell_core_version = kwargs['powershellCoreVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if use_custom_runtime is None and 'useCustomRuntime' in kwargs: + use_custom_runtime = kwargs['useCustomRuntime'] + if use_dotnet_isolated_runtime is None and 'useDotnetIsolatedRuntime' in kwargs: + use_dotnet_isolated_runtime = kwargs['useDotnetIsolatedRuntime'] + if dockers is not None: - pulumi.set(__self__, "dockers", dockers) + _setter("dockers", dockers) if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if powershell_core_version is not None: - pulumi.set(__self__, "powershell_core_version", powershell_core_version) + _setter("powershell_core_version", powershell_core_version) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if use_custom_runtime is not None: - pulumi.set(__self__, "use_custom_runtime", use_custom_runtime) + _setter("use_custom_runtime", use_custom_runtime) if use_dotnet_isolated_runtime is not None: - pulumi.set(__self__, "use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) + _setter("use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) @property @pulumi.getter @@ -12807,13 +16777,48 @@ def __init__(__self__, *, > **NOTE:** This value is required if `container_registry_use_managed_identity` is not set to `true`. """ - pulumi.set(__self__, "image_name", image_name) - pulumi.set(__self__, "image_tag", image_tag) - pulumi.set(__self__, "registry_url", registry_url) + LinuxFunctionAppSlotSiteConfigApplicationStackDockerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + image_name=image_name, + image_tag=image_tag, + registry_url=registry_url, + registry_password=registry_password, + registry_username=registry_username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image_name: Optional[pulumi.Input[str]] = None, + image_tag: Optional[pulumi.Input[str]] = None, + registry_url: Optional[pulumi.Input[str]] = None, + registry_password: Optional[pulumi.Input[str]] = None, + registry_username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if image_name is None: + raise TypeError("Missing 'image_name' argument") + if image_tag is None and 'imageTag' in kwargs: + image_tag = kwargs['imageTag'] + if image_tag is None: + raise TypeError("Missing 'image_tag' argument") + if registry_url is None and 'registryUrl' in kwargs: + registry_url = kwargs['registryUrl'] + if registry_url is None: + raise TypeError("Missing 'registry_url' argument") + if registry_password is None and 'registryPassword' in kwargs: + registry_password = kwargs['registryPassword'] + if registry_username is None and 'registryUsername' in kwargs: + registry_username = kwargs['registryUsername'] + + _setter("image_name", image_name) + _setter("image_tag", image_tag) + _setter("registry_url", registry_url) if registry_password is not None: - pulumi.set(__self__, "registry_password", registry_password) + _setter("registry_password", registry_password) if registry_username is not None: - pulumi.set(__self__, "registry_username", registry_username) + _setter("registry_username", registry_username) @property @pulumi.getter(name="imageName") @@ -12889,10 +16894,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: an `allowed_origins` block as detailed below. :param pulumi.Input[bool] support_credentials: Are credentials allowed in CORS requests? Defaults to `false`. """ + LinuxFunctionAppSlotSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + support_credentials: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -12940,20 +16962,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxFunctionAppSlotSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['LinuxFunctionAppSlotSiteConfigIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -13055,14 +17106,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxFunctionAppSlotSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -13134,20 +17210,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxFunctionAppSlotSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['LinuxFunctionAppSlotSiteConfigScmIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -13249,14 +17354,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxFunctionAppSlotSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -13316,10 +17446,23 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Site Credentials Username used for publishing. :param pulumi.Input[str] password: The Site Credentials Password used for publishing. """ + LinuxFunctionAppSlotSiteCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -13363,13 +17506,52 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The Azure Storage Type. Possible values include `AzureFiles` and `AzureBlob`. :param pulumi.Input[str] mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + LinuxFunctionAppSlotStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + mount_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -13453,10 +17635,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] app_setting_names: A list of `app_setting` names that the Linux Function App will not swap between Slots when a swap operation is triggered. :param pulumi.Input[Sequence[pulumi.Input[str]]] connection_string_names: A list of `connection_string` names that the Linux Function App will not swap between Slots when a swap operation is triggered. """ + LinuxFunctionAppStickySettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_setting_names=app_setting_names, + connection_string_names=connection_string_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_setting_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_setting_names is None and 'appSettingNames' in kwargs: + app_setting_names = kwargs['appSettingNames'] + if connection_string_names is None and 'connectionStringNames' in kwargs: + connection_string_names = kwargs['connectionStringNames'] + if app_setting_names is not None: - pulumi.set(__self__, "app_setting_names", app_setting_names) + _setter("app_setting_names", app_setting_names) if connection_string_names is not None: - pulumi.set(__self__, "connection_string_names", connection_string_names) + _setter("connection_string_names", connection_string_names) @property @pulumi.getter(name="appSettingNames") @@ -13500,13 +17699,52 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The Azure Storage Type. Possible values include `AzureFiles` and `AzureBlob`. :param pulumi.Input[str] mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + LinuxFunctionAppStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + mount_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -13620,35 +17858,92 @@ def __init__(__self__, *, :param pulumi.Input['LinuxWebAppAuthSettingsTwitterArgs'] twitter: A `twitter` block as defined below. :param pulumi.Input[str] unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + LinuxWebAppAuthSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + active_directory: Optional[pulumi.Input['LinuxWebAppAuthSettingsActiveDirectoryArgs']] = None, + additional_login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + facebook: Optional[pulumi.Input['LinuxWebAppAuthSettingsFacebookArgs']] = None, + github: Optional[pulumi.Input['LinuxWebAppAuthSettingsGithubArgs']] = None, + google: Optional[pulumi.Input['LinuxWebAppAuthSettingsGoogleArgs']] = None, + issuer: Optional[pulumi.Input[str]] = None, + microsoft: Optional[pulumi.Input['LinuxWebAppAuthSettingsMicrosoftArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + token_refresh_extension_hours: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + twitter: Optional[pulumi.Input['LinuxWebAppAuthSettingsTwitterArgs']] = None, + unauthenticated_client_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -13850,13 +18145,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppAuthSettingsActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -13922,13 +18244,40 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + LinuxWebAppAuthSettingsFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -13992,13 +18341,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppAuthSettingsGithubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -14062,13 +18438,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppAuthSettingsGoogleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -14132,13 +18535,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, "wl.basic" is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppAuthSettingsMicrosoftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -14200,11 +18630,34 @@ def __init__(__self__, *, :param pulumi.Input[str] consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param pulumi.Input[str] consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + LinuxWebAppAuthSettingsTwitterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -14298,49 +18751,146 @@ def __init__(__self__, *, :param pulumi.Input['LinuxWebAppAuthSettingsV2TwitterV2Args'] twitter_v2: A `twitter_v2` block as defined below. :param pulumi.Input[str] unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + LinuxWebAppAuthSettingsV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input['LinuxWebAppAuthSettingsV2LoginArgs']] = None, + active_directory_v2: Optional[pulumi.Input['LinuxWebAppAuthSettingsV2ActiveDirectoryV2Args']] = None, + apple_v2: Optional[pulumi.Input['LinuxWebAppAuthSettingsV2AppleV2Args']] = None, + auth_enabled: Optional[pulumi.Input[bool]] = None, + azure_static_web_app_v2: Optional[pulumi.Input['LinuxWebAppAuthSettingsV2AzureStaticWebAppV2Args']] = None, + config_file_path: Optional[pulumi.Input[str]] = None, + custom_oidc_v2s: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppAuthSettingsV2CustomOidcV2Args']]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + excluded_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + facebook_v2: Optional[pulumi.Input['LinuxWebAppAuthSettingsV2FacebookV2Args']] = None, + forward_proxy_convention: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_host_header_name: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_scheme_header_name: Optional[pulumi.Input[str]] = None, + github_v2: Optional[pulumi.Input['LinuxWebAppAuthSettingsV2GithubV2Args']] = None, + google_v2: Optional[pulumi.Input['LinuxWebAppAuthSettingsV2GoogleV2Args']] = None, + http_route_api_prefix: Optional[pulumi.Input[str]] = None, + microsoft_v2: Optional[pulumi.Input['LinuxWebAppAuthSettingsV2MicrosoftV2Args']] = None, + require_authentication: Optional[pulumi.Input[bool]] = None, + require_https: Optional[pulumi.Input[bool]] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + twitter_v2: Optional[pulumi.Input['LinuxWebAppAuthSettingsV2TwitterV2Args']] = None, + unauthenticated_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -14646,28 +19196,89 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param pulumi.Input[bool] www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + LinuxWebAppAuthSettingsV2ActiveDirectoryV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + tenant_auth_endpoint: Optional[pulumi.Input[str]] = None, + allowed_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret_certificate_thumbprint: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + jwt_allowed_client_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + jwt_allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + www_authentication_disabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -14829,10 +19440,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppAuthSettingsV2AppleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -14878,7 +19514,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppAuthSettingsV2AzureStaticWebAppV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -14919,25 +19570,80 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: The list of the scopes that should be requested while authenticating. :param pulumi.Input[str] token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + LinuxWebAppAuthSettingsV2CustomOidcV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + openid_configuration_endpoint: Optional[pulumi.Input[str]] = None, + authorisation_endpoint: Optional[pulumi.Input[str]] = None, + certification_uri: Optional[pulumi.Input[str]] = None, + client_credential_method: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + issuer_endpoint: Optional[pulumi.Input[str]] = None, + name_claim_type: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + token_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -15084,12 +19790,41 @@ def __init__(__self__, *, :param pulumi.Input[str] graph_api_version: The version of the Facebook API to be used while logging in. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + LinuxWebAppAuthSettingsV2FacebookV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + graph_api_version: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -15153,10 +19888,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppAuthSettingsV2GithubV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -15210,12 +19970,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppAuthSettingsV2GoogleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -15297,28 +20086,81 @@ def __init__(__self__, *, :param pulumi.Input[str] token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param pulumi.Input[bool] validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + LinuxWebAppAuthSettingsV2LoginArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cookie_expiration_convention: Optional[pulumi.Input[str]] = None, + cookie_expiration_time: Optional[pulumi.Input[str]] = None, + logout_endpoint: Optional[pulumi.Input[str]] = None, + nonce_expiration_time: Optional[pulumi.Input[str]] = None, + preserve_url_fragments_for_logins: Optional[pulumi.Input[bool]] = None, + token_refresh_extension_time: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + token_store_path: Optional[pulumi.Input[str]] = None, + token_store_sas_setting_name: Optional[pulumi.Input[str]] = None, + validate_nonce: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -15470,12 +20312,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppAuthSettingsV2MicrosoftV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -15539,8 +20410,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + LinuxWebAppAuthSettingsV2TwitterV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -15582,11 +20474,36 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_url: The SAS URL to the container. :param pulumi.Input[bool] enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + LinuxWebAppBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['LinuxWebAppBackupScheduleArgs']] = None, + storage_account_url: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -15655,16 +20572,53 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param pulumi.Input[str] start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + LinuxWebAppBackupScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[pulumi.Input[int]] = None, + frequency_unit: Optional[pulumi.Input[str]] = None, + keep_at_least_one_backup: Optional[pulumi.Input[bool]] = None, + last_execution_time: Optional[pulumi.Input[str]] = None, + retention_period_days: Optional[pulumi.Input[int]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -15749,9 +20703,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`. :param pulumi.Input[str] value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + LinuxWebAppConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -15805,13 +20780,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + LinuxWebAppIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -15877,14 +20877,39 @@ def __init__(__self__, *, :param pulumi.Input[bool] failed_request_tracing: Should the failed request tracing be enabled? :param pulumi.Input['LinuxWebAppLogsHttpLogsArgs'] http_logs: An `http_logs` block as defined above. """ + LinuxWebAppLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages=detailed_error_messages, + failed_request_tracing=failed_request_tracing, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional[pulumi.Input['LinuxWebAppLogsApplicationLogsArgs']] = None, + detailed_error_messages: Optional[pulumi.Input[bool]] = None, + failed_request_tracing: Optional[pulumi.Input[bool]] = None, + http_logs: Optional[pulumi.Input['LinuxWebAppLogsHttpLogsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if detailed_error_messages is None and 'detailedErrorMessages' in kwargs: + detailed_error_messages = kwargs['detailedErrorMessages'] + if failed_request_tracing is None and 'failedRequestTracing' in kwargs: + failed_request_tracing = kwargs['failedRequestTracing'] + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if application_logs is not None: - pulumi.set(__self__, "application_logs", application_logs) + _setter("application_logs", application_logs) if detailed_error_messages is not None: - pulumi.set(__self__, "detailed_error_messages", detailed_error_messages) + _setter("detailed_error_messages", detailed_error_messages) if failed_request_tracing is not None: - pulumi.set(__self__, "failed_request_tracing", failed_request_tracing) + _setter("failed_request_tracing", failed_request_tracing) if http_logs is not None: - pulumi.set(__self__, "http_logs", http_logs) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -15944,9 +20969,28 @@ def __init__(__self__, *, :param pulumi.Input[str] file_system_level: Log level. Possible values include: `Verbose`, `Information`, `Warning`, and `Error`. :param pulumi.Input['LinuxWebAppLogsApplicationLogsAzureBlobStorageArgs'] azure_blob_storage: An `azure_blob_storage` block as defined below. """ - pulumi.set(__self__, "file_system_level", file_system_level) + LinuxWebAppLogsApplicationLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_system_level=file_system_level, + azure_blob_storage=azure_blob_storage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_system_level: Optional[pulumi.Input[str]] = None, + azure_blob_storage: Optional[pulumi.Input['LinuxWebAppLogsApplicationLogsAzureBlobStorageArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if file_system_level is None: + raise TypeError("Missing 'file_system_level' argument") + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + + _setter("file_system_level", file_system_level) if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) @property @pulumi.getter(name="fileSystemLevel") @@ -15984,9 +21028,34 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. :param pulumi.Input[str] sas_url: SAS url to an Azure blob container with read/write/list/delete permissions. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + LinuxWebAppLogsApplicationLogsAzureBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[pulumi.Input[str]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + sas_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -16034,10 +21103,27 @@ def __init__(__self__, *, :param pulumi.Input['LinuxWebAppLogsHttpLogsAzureBlobStorageArgs'] azure_blob_storage: A `azure_blob_storage_http` block as defined below. :param pulumi.Input['LinuxWebAppLogsHttpLogsFileSystemArgs'] file_system: A `file_system` block as defined above. """ + LinuxWebAppLogsHttpLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system=file_system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional[pulumi.Input['LinuxWebAppLogsHttpLogsAzureBlobStorageArgs']] = None, + file_system: Optional[pulumi.Input['LinuxWebAppLogsHttpLogsFileSystemArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) @property @pulumi.getter(name="azureBlobStorage") @@ -16073,9 +21159,28 @@ def __init__(__self__, *, :param pulumi.Input[str] sas_url: SAS url to an Azure blob container with read/write/list/delete permissions. :param pulumi.Input[int] retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. """ - pulumi.set(__self__, "sas_url", sas_url) + LinuxWebAppLogsHttpLogsAzureBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + sas_url=sas_url, + retention_in_days=retention_in_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sas_url: Optional[pulumi.Input[str]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + + _setter("sas_url", sas_url) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) @property @pulumi.getter(name="sasUrl") @@ -16111,8 +21216,29 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The retention period in days. A value of `0` means no retention. :param pulumi.Input[int] retention_in_mb: The maximum size in megabytes that log files can use. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + LinuxWebAppLogsHttpLogsFileSystemArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[pulumi.Input[int]] = None, + retention_in_mb: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -16206,70 +21332,205 @@ def __init__(__self__, *, :param pulumi.Input[bool] websockets_enabled: Should Web Sockets be enabled? Defaults to `false`. :param pulumi.Input[int] worker_count: The number of Workers for this Linux App Service. """ + LinuxWebAppSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + application_stack=application_stack, + auto_heal_enabled=auto_heal_enabled, + auto_heal_setting=auto_heal_setting, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + load_balancing_mode=load_balancing_mode, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[pulumi.Input[bool]] = None, + api_definition_url: Optional[pulumi.Input[str]] = None, + api_management_api_id: Optional[pulumi.Input[str]] = None, + app_command_line: Optional[pulumi.Input[str]] = None, + application_stack: Optional[pulumi.Input['LinuxWebAppSiteConfigApplicationStackArgs']] = None, + auto_heal_enabled: Optional[pulumi.Input[bool]] = None, + auto_heal_setting: Optional[pulumi.Input['LinuxWebAppSiteConfigAutoHealSettingArgs']] = None, + container_registry_managed_identity_client_id: Optional[pulumi.Input[str]] = None, + container_registry_use_managed_identity: Optional[pulumi.Input[bool]] = None, + cors: Optional[pulumi.Input['LinuxWebAppSiteConfigCorsArgs']] = None, + default_documents: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + detailed_error_logging_enabled: Optional[pulumi.Input[bool]] = None, + ftps_state: Optional[pulumi.Input[str]] = None, + health_check_eviction_time_in_min: Optional[pulumi.Input[int]] = None, + health_check_path: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSiteConfigIpRestrictionArgs']]]] = None, + linux_fx_version: Optional[pulumi.Input[str]] = None, + load_balancing_mode: Optional[pulumi.Input[str]] = None, + local_mysql_enabled: Optional[pulumi.Input[bool]] = None, + managed_pipeline_mode: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + remote_debugging_enabled: Optional[pulumi.Input[bool]] = None, + remote_debugging_version: Optional[pulumi.Input[str]] = None, + scm_ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSiteConfigScmIpRestrictionArgs']]]] = None, + scm_minimum_tls_version: Optional[pulumi.Input[str]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + scm_use_main_ip_restriction: Optional[pulumi.Input[bool]] = None, + use32_bit_worker: Optional[pulumi.Input[bool]] = None, + vnet_route_all_enabled: Optional[pulumi.Input[bool]] = None, + websockets_enabled: Optional[pulumi.Input[bool]] = None, + worker_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if auto_heal_enabled is None and 'autoHealEnabled' in kwargs: + auto_heal_enabled = kwargs['autoHealEnabled'] + if auto_heal_setting is None and 'autoHealSetting' in kwargs: + auto_heal_setting = kwargs['autoHealSetting'] + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if auto_heal_enabled is not None: - pulumi.set(__self__, "auto_heal_enabled", auto_heal_enabled) + _setter("auto_heal_enabled", auto_heal_enabled) if auto_heal_setting is not None: - pulumi.set(__self__, "auto_heal_setting", auto_heal_setting) + _setter("auto_heal_setting", auto_heal_setting) if container_registry_managed_identity_client_id is not None: - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) if container_registry_use_managed_identity is not None: - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if local_mysql_enabled is not None: - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) + _setter("local_mysql_enabled", local_mysql_enabled) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -16689,42 +21950,111 @@ def __init__(__self__, *, :param pulumi.Input[str] python_version: The version of Python to run. Possible values include `3.7`, `3.8`, `3.9`, `3.10` and `3.11`. :param pulumi.Input[str] ruby_version: Te version of Ruby to run. Possible values include `2.6` and `2.7`. """ + LinuxWebAppSiteConfigApplicationStackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + docker_image=docker_image, + docker_image_name=docker_image_name, + docker_image_tag=docker_image_tag, + docker_registry_password=docker_registry_password, + docker_registry_url=docker_registry_url, + docker_registry_username=docker_registry_username, + dotnet_version=dotnet_version, + go_version=go_version, + java_server=java_server, + java_server_version=java_server_version, + java_version=java_version, + node_version=node_version, + php_version=php_version, + python_version=python_version, + ruby_version=ruby_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + docker_image: Optional[pulumi.Input[str]] = None, + docker_image_name: Optional[pulumi.Input[str]] = None, + docker_image_tag: Optional[pulumi.Input[str]] = None, + docker_registry_password: Optional[pulumi.Input[str]] = None, + docker_registry_url: Optional[pulumi.Input[str]] = None, + docker_registry_username: Optional[pulumi.Input[str]] = None, + dotnet_version: Optional[pulumi.Input[str]] = None, + go_version: Optional[pulumi.Input[str]] = None, + java_server: Optional[pulumi.Input[str]] = None, + java_server_version: Optional[pulumi.Input[str]] = None, + java_version: Optional[pulumi.Input[str]] = None, + node_version: Optional[pulumi.Input[str]] = None, + php_version: Optional[pulumi.Input[str]] = None, + python_version: Optional[pulumi.Input[str]] = None, + ruby_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if docker_image is None and 'dockerImage' in kwargs: + docker_image = kwargs['dockerImage'] + if docker_image_name is None and 'dockerImageName' in kwargs: + docker_image_name = kwargs['dockerImageName'] + if docker_image_tag is None and 'dockerImageTag' in kwargs: + docker_image_tag = kwargs['dockerImageTag'] + if docker_registry_password is None and 'dockerRegistryPassword' in kwargs: + docker_registry_password = kwargs['dockerRegistryPassword'] + if docker_registry_url is None and 'dockerRegistryUrl' in kwargs: + docker_registry_url = kwargs['dockerRegistryUrl'] + if docker_registry_username is None and 'dockerRegistryUsername' in kwargs: + docker_registry_username = kwargs['dockerRegistryUsername'] + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if go_version is None and 'goVersion' in kwargs: + go_version = kwargs['goVersion'] + if java_server is None and 'javaServer' in kwargs: + java_server = kwargs['javaServer'] + if java_server_version is None and 'javaServerVersion' in kwargs: + java_server_version = kwargs['javaServerVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if ruby_version is None and 'rubyVersion' in kwargs: + ruby_version = kwargs['rubyVersion'] + if docker_image is not None: warnings.warn("""This property has been deprecated and will be removed in 4.0 of the provider.""", DeprecationWarning) pulumi.log.warn("""docker_image is deprecated: This property has been deprecated and will be removed in 4.0 of the provider.""") if docker_image is not None: - pulumi.set(__self__, "docker_image", docker_image) + _setter("docker_image", docker_image) if docker_image_name is not None: - pulumi.set(__self__, "docker_image_name", docker_image_name) + _setter("docker_image_name", docker_image_name) if docker_image_tag is not None: warnings.warn("""This property has been deprecated and will be removed in 4.0 of the provider.""", DeprecationWarning) pulumi.log.warn("""docker_image_tag is deprecated: This property has been deprecated and will be removed in 4.0 of the provider.""") if docker_image_tag is not None: - pulumi.set(__self__, "docker_image_tag", docker_image_tag) + _setter("docker_image_tag", docker_image_tag) if docker_registry_password is not None: - pulumi.set(__self__, "docker_registry_password", docker_registry_password) + _setter("docker_registry_password", docker_registry_password) if docker_registry_url is not None: - pulumi.set(__self__, "docker_registry_url", docker_registry_url) + _setter("docker_registry_url", docker_registry_url) if docker_registry_username is not None: - pulumi.set(__self__, "docker_registry_username", docker_registry_username) + _setter("docker_registry_username", docker_registry_username) if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if go_version is not None: - pulumi.set(__self__, "go_version", go_version) + _setter("go_version", go_version) if java_server is not None: - pulumi.set(__self__, "java_server", java_server) + _setter("java_server", java_server) if java_server_version is not None: - pulumi.set(__self__, "java_server_version", java_server_version) + _setter("java_server_version", java_server_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if php_version is not None: - pulumi.set(__self__, "php_version", php_version) + _setter("php_version", php_version) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if ruby_version is not None: - pulumi.set(__self__, "ruby_version", ruby_version) + _setter("ruby_version", ruby_version) @property @pulumi.getter(name="dockerImage") @@ -16926,10 +22256,23 @@ def __init__(__self__, *, :param pulumi.Input['LinuxWebAppSiteConfigAutoHealSettingActionArgs'] action: A `action` block as defined above. :param pulumi.Input['LinuxWebAppSiteConfigAutoHealSettingTriggerArgs'] trigger: A `trigger` block as defined below. """ + LinuxWebAppSiteConfigAutoHealSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + trigger=trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input['LinuxWebAppSiteConfigAutoHealSettingActionArgs']] = None, + trigger: Optional[pulumi.Input['LinuxWebAppSiteConfigAutoHealSettingTriggerArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if trigger is not None: - pulumi.set(__self__, "trigger", trigger) + _setter("trigger", trigger) @property @pulumi.getter @@ -16965,9 +22308,28 @@ def __init__(__self__, *, :param pulumi.Input[str] action_type: Predefined action to be taken to an Auto Heal trigger. Possible values include: `Recycle`. :param pulumi.Input[str] minimum_process_execution_time: The minimum amount of time in `hh:mm:ss` the Linux Web App must have been running before the defined action will be run in the event of a trigger. """ - pulumi.set(__self__, "action_type", action_type) + LinuxWebAppSiteConfigAutoHealSettingActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + minimum_process_execution_time=minimum_process_execution_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[pulumi.Input[str]] = None, + minimum_process_execution_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + if minimum_process_execution_time is None and 'minimumProcessExecutionTime' in kwargs: + minimum_process_execution_time = kwargs['minimumProcessExecutionTime'] + + _setter("action_type", action_type) if minimum_process_execution_time is not None: - pulumi.set(__self__, "minimum_process_execution_time", minimum_process_execution_time) + _setter("minimum_process_execution_time", minimum_process_execution_time) @property @pulumi.getter(name="actionType") @@ -17005,12 +22367,31 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSiteConfigAutoHealSettingTriggerSlowRequestArgs']]] slow_requests: One or more `slow_request` blocks as defined above. :param pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSiteConfigAutoHealSettingTriggerStatusCodeArgs']]] status_codes: One or more `status_code` blocks as defined above. """ + LinuxWebAppSiteConfigAutoHealSettingTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + requests=requests, + slow_requests=slow_requests, + status_codes=status_codes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + requests: Optional[pulumi.Input['LinuxWebAppSiteConfigAutoHealSettingTriggerRequestsArgs']] = None, + slow_requests: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSiteConfigAutoHealSettingTriggerSlowRequestArgs']]]] = None, + status_codes: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSiteConfigAutoHealSettingTriggerStatusCodeArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if slow_requests is None and 'slowRequests' in kwargs: + slow_requests = kwargs['slowRequests'] + if status_codes is None and 'statusCodes' in kwargs: + status_codes = kwargs['statusCodes'] + if requests is not None: - pulumi.set(__self__, "requests", requests) + _setter("requests", requests) if slow_requests is not None: - pulumi.set(__self__, "slow_requests", slow_requests) + _setter("slow_requests", slow_requests) if status_codes is not None: - pulumi.set(__self__, "status_codes", status_codes) + _setter("status_codes", status_codes) @property @pulumi.getter @@ -17058,8 +22439,25 @@ def __init__(__self__, *, :param pulumi.Input[int] count: The number of requests in the specified `interval` to trigger this rule. :param pulumi.Input[str] interval: The interval in `hh:mm:ss`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) + LinuxWebAppSiteConfigAutoHealSettingTriggerRequestsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + interval: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + + _setter("count", count) + _setter("interval", interval) @property @pulumi.getter @@ -17099,11 +22497,36 @@ def __init__(__self__, *, :param pulumi.Input[str] time_taken: The threshold of time passed to qualify as a Slow Request in `hh:mm:ss`. :param pulumi.Input[str] path: The path for which this slow request rule applies. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "time_taken", time_taken) + LinuxWebAppSiteConfigAutoHealSettingTriggerSlowRequestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + time_taken=time_taken, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + interval: Optional[pulumi.Input[str]] = None, + time_taken: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if time_taken is None and 'timeTaken' in kwargs: + time_taken = kwargs['timeTaken'] + if time_taken is None: + raise TypeError("Missing 'time_taken' argument") + + _setter("count", count) + _setter("interval", interval) + _setter("time_taken", time_taken) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -17171,15 +22594,48 @@ def __init__(__self__, *, :param pulumi.Input[int] sub_status: The Request Sub Status of the Status Code. :param pulumi.Input[int] win32_status_code: The Win32 Status Code of the Request. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "status_code_range", status_code_range) + LinuxWebAppSiteConfigAutoHealSettingTriggerStatusCodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + status_code_range=status_code_range, + path=path, + sub_status=sub_status, + win32_status_code=win32_status_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + interval: Optional[pulumi.Input[str]] = None, + status_code_range: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + sub_status: Optional[pulumi.Input[int]] = None, + win32_status_code: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if status_code_range is None and 'statusCodeRange' in kwargs: + status_code_range = kwargs['statusCodeRange'] + if status_code_range is None: + raise TypeError("Missing 'status_code_range' argument") + if sub_status is None and 'subStatus' in kwargs: + sub_status = kwargs['subStatus'] + if win32_status_code is None and 'win32StatusCode' in kwargs: + win32_status_code = kwargs['win32StatusCode'] + + _setter("count", count) + _setter("interval", interval) + _setter("status_code_range", status_code_range) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if sub_status is not None: - pulumi.set(__self__, "sub_status", sub_status) + _setter("sub_status", sub_status) if win32_status_code is not None: - pulumi.set(__self__, "win32_status_code", win32_status_code) + _setter("win32_status_code", win32_status_code) @property @pulumi.getter @@ -17263,10 +22719,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: Specifies a list of origins that should be allowed to make cross-origin calls. :param pulumi.Input[bool] support_credentials: Whether CORS requests with credentials are allowed. Defaults to `false` """ + LinuxWebAppSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + support_credentials: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -17314,20 +22787,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxWebAppSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['LinuxWebAppSiteConfigIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -17429,14 +22931,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxWebAppSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -17508,20 +23035,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxWebAppSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['LinuxWebAppSiteConfigScmIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -17623,14 +23179,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxWebAppSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -17689,10 +23270,23 @@ def __init__(__self__, *, """ :param pulumi.Input[str] password: The Site Credentials Password used for publishing. """ + LinuxWebAppSiteCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -17755,35 +23349,92 @@ def __init__(__self__, *, :param pulumi.Input['LinuxWebAppSlotAuthSettingsTwitterArgs'] twitter: A `twitter` block as defined below. :param pulumi.Input[str] unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + LinuxWebAppSlotAuthSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + active_directory: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsActiveDirectoryArgs']] = None, + additional_login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + facebook: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsFacebookArgs']] = None, + github: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsGithubArgs']] = None, + google: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsGoogleArgs']] = None, + issuer: Optional[pulumi.Input[str]] = None, + microsoft: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsMicrosoftArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + token_refresh_extension_hours: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + twitter: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsTwitterArgs']] = None, + unauthenticated_client_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -17985,13 +23636,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppSlotAuthSettingsActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -18057,13 +23735,40 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + LinuxWebAppSlotAuthSettingsFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -18127,13 +23832,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppSlotAuthSettingsGithubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -18197,13 +23929,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppSlotAuthSettingsGoogleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -18267,13 +24026,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, "wl.basic" is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppSlotAuthSettingsMicrosoftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -18335,11 +24121,34 @@ def __init__(__self__, *, :param pulumi.Input[str] consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param pulumi.Input[str] consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + LinuxWebAppSlotAuthSettingsTwitterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -18433,49 +24242,146 @@ def __init__(__self__, *, :param pulumi.Input['LinuxWebAppSlotAuthSettingsV2TwitterV2Args'] twitter_v2: A `twitter_v2` block as defined below. :param pulumi.Input[str] unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + LinuxWebAppSlotAuthSettingsV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsV2LoginArgs']] = None, + active_directory_v2: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsV2ActiveDirectoryV2Args']] = None, + apple_v2: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsV2AppleV2Args']] = None, + auth_enabled: Optional[pulumi.Input[bool]] = None, + azure_static_web_app_v2: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsV2AzureStaticWebAppV2Args']] = None, + config_file_path: Optional[pulumi.Input[str]] = None, + custom_oidc_v2s: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSlotAuthSettingsV2CustomOidcV2Args']]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + excluded_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + facebook_v2: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsV2FacebookV2Args']] = None, + forward_proxy_convention: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_host_header_name: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_scheme_header_name: Optional[pulumi.Input[str]] = None, + github_v2: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsV2GithubV2Args']] = None, + google_v2: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsV2GoogleV2Args']] = None, + http_route_api_prefix: Optional[pulumi.Input[str]] = None, + microsoft_v2: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsV2MicrosoftV2Args']] = None, + require_authentication: Optional[pulumi.Input[bool]] = None, + require_https: Optional[pulumi.Input[bool]] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + twitter_v2: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsV2TwitterV2Args']] = None, + unauthenticated_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -18781,28 +24687,89 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param pulumi.Input[bool] www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + LinuxWebAppSlotAuthSettingsV2ActiveDirectoryV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + tenant_auth_endpoint: Optional[pulumi.Input[str]] = None, + allowed_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret_certificate_thumbprint: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + jwt_allowed_client_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + jwt_allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + www_authentication_disabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -18964,10 +24931,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppSlotAuthSettingsV2AppleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -19013,7 +25005,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppSlotAuthSettingsV2AzureStaticWebAppV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -19054,25 +25061,80 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: The list of the scopes that should be requested while authenticating. :param pulumi.Input[str] token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + LinuxWebAppSlotAuthSettingsV2CustomOidcV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + openid_configuration_endpoint: Optional[pulumi.Input[str]] = None, + authorisation_endpoint: Optional[pulumi.Input[str]] = None, + certification_uri: Optional[pulumi.Input[str]] = None, + client_credential_method: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + issuer_endpoint: Optional[pulumi.Input[str]] = None, + name_claim_type: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + token_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -19219,12 +25281,41 @@ def __init__(__self__, *, :param pulumi.Input[str] graph_api_version: The version of the Facebook API to be used while logging in. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + LinuxWebAppSlotAuthSettingsV2FacebookV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + graph_api_version: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -19288,10 +25379,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppSlotAuthSettingsV2GithubV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -19345,12 +25461,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppSlotAuthSettingsV2GoogleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -19432,28 +25577,81 @@ def __init__(__self__, *, :param pulumi.Input[str] token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param pulumi.Input[bool] validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + LinuxWebAppSlotAuthSettingsV2LoginArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cookie_expiration_convention: Optional[pulumi.Input[str]] = None, + cookie_expiration_time: Optional[pulumi.Input[str]] = None, + logout_endpoint: Optional[pulumi.Input[str]] = None, + nonce_expiration_time: Optional[pulumi.Input[str]] = None, + preserve_url_fragments_for_logins: Optional[pulumi.Input[bool]] = None, + token_refresh_extension_time: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + token_store_path: Optional[pulumi.Input[str]] = None, + token_store_sas_setting_name: Optional[pulumi.Input[str]] = None, + validate_nonce: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -19605,12 +25803,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppSlotAuthSettingsV2MicrosoftV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -19674,8 +25901,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + LinuxWebAppSlotAuthSettingsV2TwitterV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -19717,11 +25965,36 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_url: The SAS URL to the container. :param pulumi.Input[bool] enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + LinuxWebAppSlotBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['LinuxWebAppSlotBackupScheduleArgs']] = None, + storage_account_url: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -19790,16 +26063,53 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param pulumi.Input[str] start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + LinuxWebAppSlotBackupScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[pulumi.Input[int]] = None, + frequency_unit: Optional[pulumi.Input[str]] = None, + keep_at_least_one_backup: Optional[pulumi.Input[bool]] = None, + last_execution_time: Optional[pulumi.Input[str]] = None, + retention_period_days: Optional[pulumi.Input[int]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -19884,9 +26194,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Type of database. Possible values include `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param pulumi.Input[str] value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + LinuxWebAppSlotConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -19940,13 +26271,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + LinuxWebAppSlotIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -20012,14 +26368,39 @@ def __init__(__self__, *, :param pulumi.Input[bool] failed_request_tracing: Should the failed request tracing be enabled? :param pulumi.Input['LinuxWebAppSlotLogsHttpLogsArgs'] http_logs: An `http_logs` block as defined above. """ + LinuxWebAppSlotLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages=detailed_error_messages, + failed_request_tracing=failed_request_tracing, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional[pulumi.Input['LinuxWebAppSlotLogsApplicationLogsArgs']] = None, + detailed_error_messages: Optional[pulumi.Input[bool]] = None, + failed_request_tracing: Optional[pulumi.Input[bool]] = None, + http_logs: Optional[pulumi.Input['LinuxWebAppSlotLogsHttpLogsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if detailed_error_messages is None and 'detailedErrorMessages' in kwargs: + detailed_error_messages = kwargs['detailedErrorMessages'] + if failed_request_tracing is None and 'failedRequestTracing' in kwargs: + failed_request_tracing = kwargs['failedRequestTracing'] + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if application_logs is not None: - pulumi.set(__self__, "application_logs", application_logs) + _setter("application_logs", application_logs) if detailed_error_messages is not None: - pulumi.set(__self__, "detailed_error_messages", detailed_error_messages) + _setter("detailed_error_messages", detailed_error_messages) if failed_request_tracing is not None: - pulumi.set(__self__, "failed_request_tracing", failed_request_tracing) + _setter("failed_request_tracing", failed_request_tracing) if http_logs is not None: - pulumi.set(__self__, "http_logs", http_logs) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -20079,9 +26460,28 @@ def __init__(__self__, *, :param pulumi.Input[str] file_system_level: Log level. Possible values include `Verbose`, `Information`, `Warning`, and `Error`. :param pulumi.Input['LinuxWebAppSlotLogsApplicationLogsAzureBlobStorageArgs'] azure_blob_storage: An `azure_blob_storage` block as defined below. """ - pulumi.set(__self__, "file_system_level", file_system_level) + LinuxWebAppSlotLogsApplicationLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_system_level=file_system_level, + azure_blob_storage=azure_blob_storage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_system_level: Optional[pulumi.Input[str]] = None, + azure_blob_storage: Optional[pulumi.Input['LinuxWebAppSlotLogsApplicationLogsAzureBlobStorageArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if file_system_level is None: + raise TypeError("Missing 'file_system_level' argument") + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + + _setter("file_system_level", file_system_level) if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) @property @pulumi.getter(name="fileSystemLevel") @@ -20119,9 +26519,34 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. :param pulumi.Input[str] sas_url: SAS URL to an Azure blob container with read/write/list/delete permissions. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + LinuxWebAppSlotLogsApplicationLogsAzureBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[pulumi.Input[str]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + sas_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -20169,10 +26594,27 @@ def __init__(__self__, *, :param pulumi.Input['LinuxWebAppSlotLogsHttpLogsAzureBlobStorageArgs'] azure_blob_storage: A `azure_blob_storage_http` block as defined above. :param pulumi.Input['LinuxWebAppSlotLogsHttpLogsFileSystemArgs'] file_system: A `file_system` block as defined above. """ + LinuxWebAppSlotLogsHttpLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system=file_system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional[pulumi.Input['LinuxWebAppSlotLogsHttpLogsAzureBlobStorageArgs']] = None, + file_system: Optional[pulumi.Input['LinuxWebAppSlotLogsHttpLogsFileSystemArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) @property @pulumi.getter(name="azureBlobStorage") @@ -20208,9 +26650,28 @@ def __init__(__self__, *, :param pulumi.Input[str] sas_url: SAS URL to an Azure blob container with read/write/list/delete permissions. :param pulumi.Input[int] retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. """ - pulumi.set(__self__, "sas_url", sas_url) + LinuxWebAppSlotLogsHttpLogsAzureBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + sas_url=sas_url, + retention_in_days=retention_in_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sas_url: Optional[pulumi.Input[str]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + + _setter("sas_url", sas_url) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) @property @pulumi.getter(name="sasUrl") @@ -20246,8 +26707,29 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The retention period in days. A values of `0` means no retention. :param pulumi.Input[int] retention_in_mb: The maximum size in megabytes that log files can use. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + LinuxWebAppSlotLogsHttpLogsFileSystemArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[pulumi.Input[int]] = None, + retention_in_mb: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -20343,72 +26825,211 @@ def __init__(__self__, *, :param pulumi.Input[bool] websockets_enabled: Should Web Sockets be enabled? Defaults to `false`. :param pulumi.Input[int] worker_count: The number of Workers for this Linux App Service Slot. """ + LinuxWebAppSlotSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + application_stack=application_stack, + auto_heal_enabled=auto_heal_enabled, + auto_heal_setting=auto_heal_setting, + auto_swap_slot_name=auto_swap_slot_name, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + load_balancing_mode=load_balancing_mode, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[pulumi.Input[bool]] = None, + api_definition_url: Optional[pulumi.Input[str]] = None, + api_management_api_id: Optional[pulumi.Input[str]] = None, + app_command_line: Optional[pulumi.Input[str]] = None, + application_stack: Optional[pulumi.Input['LinuxWebAppSlotSiteConfigApplicationStackArgs']] = None, + auto_heal_enabled: Optional[pulumi.Input[bool]] = None, + auto_heal_setting: Optional[pulumi.Input['LinuxWebAppSlotSiteConfigAutoHealSettingArgs']] = None, + auto_swap_slot_name: Optional[pulumi.Input[str]] = None, + container_registry_managed_identity_client_id: Optional[pulumi.Input[str]] = None, + container_registry_use_managed_identity: Optional[pulumi.Input[bool]] = None, + cors: Optional[pulumi.Input['LinuxWebAppSlotSiteConfigCorsArgs']] = None, + default_documents: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + detailed_error_logging_enabled: Optional[pulumi.Input[bool]] = None, + ftps_state: Optional[pulumi.Input[str]] = None, + health_check_eviction_time_in_min: Optional[pulumi.Input[int]] = None, + health_check_path: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSlotSiteConfigIpRestrictionArgs']]]] = None, + linux_fx_version: Optional[pulumi.Input[str]] = None, + load_balancing_mode: Optional[pulumi.Input[str]] = None, + local_mysql_enabled: Optional[pulumi.Input[bool]] = None, + managed_pipeline_mode: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + remote_debugging_enabled: Optional[pulumi.Input[bool]] = None, + remote_debugging_version: Optional[pulumi.Input[str]] = None, + scm_ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSlotSiteConfigScmIpRestrictionArgs']]]] = None, + scm_minimum_tls_version: Optional[pulumi.Input[str]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + scm_use_main_ip_restriction: Optional[pulumi.Input[bool]] = None, + use32_bit_worker: Optional[pulumi.Input[bool]] = None, + vnet_route_all_enabled: Optional[pulumi.Input[bool]] = None, + websockets_enabled: Optional[pulumi.Input[bool]] = None, + worker_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if auto_heal_enabled is None and 'autoHealEnabled' in kwargs: + auto_heal_enabled = kwargs['autoHealEnabled'] + if auto_heal_setting is None and 'autoHealSetting' in kwargs: + auto_heal_setting = kwargs['autoHealSetting'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if auto_heal_enabled is not None: - pulumi.set(__self__, "auto_heal_enabled", auto_heal_enabled) + _setter("auto_heal_enabled", auto_heal_enabled) if auto_heal_setting is not None: - pulumi.set(__self__, "auto_heal_setting", auto_heal_setting) + _setter("auto_heal_setting", auto_heal_setting) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if container_registry_managed_identity_client_id is not None: - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) if container_registry_use_managed_identity is not None: - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if local_mysql_enabled is not None: - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) + _setter("local_mysql_enabled", local_mysql_enabled) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -20840,42 +27461,111 @@ def __init__(__self__, *, :param pulumi.Input[str] python_version: The version of Python to run. Possible values include `3.7`, `3.8`, `3.9`, `3.10` and `3.11`. :param pulumi.Input[str] ruby_version: Te version of Ruby to run. Possible values include `2.6` and `2.7`. """ + LinuxWebAppSlotSiteConfigApplicationStackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + docker_image=docker_image, + docker_image_name=docker_image_name, + docker_image_tag=docker_image_tag, + docker_registry_password=docker_registry_password, + docker_registry_url=docker_registry_url, + docker_registry_username=docker_registry_username, + dotnet_version=dotnet_version, + go_version=go_version, + java_server=java_server, + java_server_version=java_server_version, + java_version=java_version, + node_version=node_version, + php_version=php_version, + python_version=python_version, + ruby_version=ruby_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + docker_image: Optional[pulumi.Input[str]] = None, + docker_image_name: Optional[pulumi.Input[str]] = None, + docker_image_tag: Optional[pulumi.Input[str]] = None, + docker_registry_password: Optional[pulumi.Input[str]] = None, + docker_registry_url: Optional[pulumi.Input[str]] = None, + docker_registry_username: Optional[pulumi.Input[str]] = None, + dotnet_version: Optional[pulumi.Input[str]] = None, + go_version: Optional[pulumi.Input[str]] = None, + java_server: Optional[pulumi.Input[str]] = None, + java_server_version: Optional[pulumi.Input[str]] = None, + java_version: Optional[pulumi.Input[str]] = None, + node_version: Optional[pulumi.Input[str]] = None, + php_version: Optional[pulumi.Input[str]] = None, + python_version: Optional[pulumi.Input[str]] = None, + ruby_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if docker_image is None and 'dockerImage' in kwargs: + docker_image = kwargs['dockerImage'] + if docker_image_name is None and 'dockerImageName' in kwargs: + docker_image_name = kwargs['dockerImageName'] + if docker_image_tag is None and 'dockerImageTag' in kwargs: + docker_image_tag = kwargs['dockerImageTag'] + if docker_registry_password is None and 'dockerRegistryPassword' in kwargs: + docker_registry_password = kwargs['dockerRegistryPassword'] + if docker_registry_url is None and 'dockerRegistryUrl' in kwargs: + docker_registry_url = kwargs['dockerRegistryUrl'] + if docker_registry_username is None and 'dockerRegistryUsername' in kwargs: + docker_registry_username = kwargs['dockerRegistryUsername'] + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if go_version is None and 'goVersion' in kwargs: + go_version = kwargs['goVersion'] + if java_server is None and 'javaServer' in kwargs: + java_server = kwargs['javaServer'] + if java_server_version is None and 'javaServerVersion' in kwargs: + java_server_version = kwargs['javaServerVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if ruby_version is None and 'rubyVersion' in kwargs: + ruby_version = kwargs['rubyVersion'] + if docker_image is not None: warnings.warn("""This property has been deprecated and will be removed in 4.0 of the provider.""", DeprecationWarning) pulumi.log.warn("""docker_image is deprecated: This property has been deprecated and will be removed in 4.0 of the provider.""") if docker_image is not None: - pulumi.set(__self__, "docker_image", docker_image) + _setter("docker_image", docker_image) if docker_image_name is not None: - pulumi.set(__self__, "docker_image_name", docker_image_name) + _setter("docker_image_name", docker_image_name) if docker_image_tag is not None: warnings.warn("""This property has been deprecated and will be removed in 4.0 of the provider.""", DeprecationWarning) pulumi.log.warn("""docker_image_tag is deprecated: This property has been deprecated and will be removed in 4.0 of the provider.""") if docker_image_tag is not None: - pulumi.set(__self__, "docker_image_tag", docker_image_tag) + _setter("docker_image_tag", docker_image_tag) if docker_registry_password is not None: - pulumi.set(__self__, "docker_registry_password", docker_registry_password) + _setter("docker_registry_password", docker_registry_password) if docker_registry_url is not None: - pulumi.set(__self__, "docker_registry_url", docker_registry_url) + _setter("docker_registry_url", docker_registry_url) if docker_registry_username is not None: - pulumi.set(__self__, "docker_registry_username", docker_registry_username) + _setter("docker_registry_username", docker_registry_username) if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if go_version is not None: - pulumi.set(__self__, "go_version", go_version) + _setter("go_version", go_version) if java_server is not None: - pulumi.set(__self__, "java_server", java_server) + _setter("java_server", java_server) if java_server_version is not None: - pulumi.set(__self__, "java_server_version", java_server_version) + _setter("java_server_version", java_server_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if php_version is not None: - pulumi.set(__self__, "php_version", php_version) + _setter("php_version", php_version) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if ruby_version is not None: - pulumi.set(__self__, "ruby_version", ruby_version) + _setter("ruby_version", ruby_version) @property @pulumi.getter(name="dockerImage") @@ -21077,10 +27767,23 @@ def __init__(__self__, *, :param pulumi.Input['LinuxWebAppSlotSiteConfigAutoHealSettingActionArgs'] action: A `action` block as defined above. :param pulumi.Input['LinuxWebAppSlotSiteConfigAutoHealSettingTriggerArgs'] trigger: A `trigger` block as defined below. """ + LinuxWebAppSlotSiteConfigAutoHealSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + trigger=trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input['LinuxWebAppSlotSiteConfigAutoHealSettingActionArgs']] = None, + trigger: Optional[pulumi.Input['LinuxWebAppSlotSiteConfigAutoHealSettingTriggerArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if trigger is not None: - pulumi.set(__self__, "trigger", trigger) + _setter("trigger", trigger) @property @pulumi.getter @@ -21116,9 +27819,28 @@ def __init__(__self__, *, :param pulumi.Input[str] action_type: Predefined action to be taken to an Auto Heal trigger. Possible values include: `Recycle`. :param pulumi.Input[str] minimum_process_execution_time: The minimum amount of time in `hh:mm:ss` the Linux Web App must have been running before the defined action will be run in the event of a trigger. """ - pulumi.set(__self__, "action_type", action_type) + LinuxWebAppSlotSiteConfigAutoHealSettingActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + minimum_process_execution_time=minimum_process_execution_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[pulumi.Input[str]] = None, + minimum_process_execution_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + if minimum_process_execution_time is None and 'minimumProcessExecutionTime' in kwargs: + minimum_process_execution_time = kwargs['minimumProcessExecutionTime'] + + _setter("action_type", action_type) if minimum_process_execution_time is not None: - pulumi.set(__self__, "minimum_process_execution_time", minimum_process_execution_time) + _setter("minimum_process_execution_time", minimum_process_execution_time) @property @pulumi.getter(name="actionType") @@ -21156,12 +27878,31 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSlotSiteConfigAutoHealSettingTriggerSlowRequestArgs']]] slow_requests: One or more `slow_request` blocks as defined above. :param pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSlotSiteConfigAutoHealSettingTriggerStatusCodeArgs']]] status_codes: One or more `status_code` blocks as defined above. """ + LinuxWebAppSlotSiteConfigAutoHealSettingTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + requests=requests, + slow_requests=slow_requests, + status_codes=status_codes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + requests: Optional[pulumi.Input['LinuxWebAppSlotSiteConfigAutoHealSettingTriggerRequestsArgs']] = None, + slow_requests: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSlotSiteConfigAutoHealSettingTriggerSlowRequestArgs']]]] = None, + status_codes: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSlotSiteConfigAutoHealSettingTriggerStatusCodeArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if slow_requests is None and 'slowRequests' in kwargs: + slow_requests = kwargs['slowRequests'] + if status_codes is None and 'statusCodes' in kwargs: + status_codes = kwargs['statusCodes'] + if requests is not None: - pulumi.set(__self__, "requests", requests) + _setter("requests", requests) if slow_requests is not None: - pulumi.set(__self__, "slow_requests", slow_requests) + _setter("slow_requests", slow_requests) if status_codes is not None: - pulumi.set(__self__, "status_codes", status_codes) + _setter("status_codes", status_codes) @property @pulumi.getter @@ -21209,8 +27950,25 @@ def __init__(__self__, *, :param pulumi.Input[int] count: The number of requests in the specified `interval` to trigger this rule. :param pulumi.Input[str] interval: The interval in `hh:mm:ss`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) + LinuxWebAppSlotSiteConfigAutoHealSettingTriggerRequestsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + interval: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + + _setter("count", count) + _setter("interval", interval) @property @pulumi.getter @@ -21250,11 +28008,36 @@ def __init__(__self__, *, :param pulumi.Input[str] time_taken: The threshold of time passed to qualify as a Slow Request in `hh:mm:ss`. :param pulumi.Input[str] path: The path for which this slow request rule applies. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "time_taken", time_taken) + LinuxWebAppSlotSiteConfigAutoHealSettingTriggerSlowRequestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + time_taken=time_taken, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + interval: Optional[pulumi.Input[str]] = None, + time_taken: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if time_taken is None and 'timeTaken' in kwargs: + time_taken = kwargs['timeTaken'] + if time_taken is None: + raise TypeError("Missing 'time_taken' argument") + + _setter("count", count) + _setter("interval", interval) + _setter("time_taken", time_taken) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -21322,15 +28105,48 @@ def __init__(__self__, *, :param pulumi.Input[int] sub_status: The Request Sub Status of the Status Code. :param pulumi.Input[int] win32_status_code: The Win32 Status Code of the Request. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "status_code_range", status_code_range) + LinuxWebAppSlotSiteConfigAutoHealSettingTriggerStatusCodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + status_code_range=status_code_range, + path=path, + sub_status=sub_status, + win32_status_code=win32_status_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + interval: Optional[pulumi.Input[str]] = None, + status_code_range: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + sub_status: Optional[pulumi.Input[int]] = None, + win32_status_code: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if status_code_range is None and 'statusCodeRange' in kwargs: + status_code_range = kwargs['statusCodeRange'] + if status_code_range is None: + raise TypeError("Missing 'status_code_range' argument") + if sub_status is None and 'subStatus' in kwargs: + sub_status = kwargs['subStatus'] + if win32_status_code is None and 'win32StatusCode' in kwargs: + win32_status_code = kwargs['win32StatusCode'] + + _setter("count", count) + _setter("interval", interval) + _setter("status_code_range", status_code_range) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if sub_status is not None: - pulumi.set(__self__, "sub_status", sub_status) + _setter("sub_status", sub_status) if win32_status_code is not None: - pulumi.set(__self__, "win32_status_code", win32_status_code) + _setter("win32_status_code", win32_status_code) @property @pulumi.getter @@ -21414,10 +28230,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: Specifies a list of origins that should be allowed to make cross-origin calls. :param pulumi.Input[bool] support_credentials: Whether CORS requests with credentials are allowed. Defaults to `false` """ + LinuxWebAppSlotSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + support_credentials: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -21465,20 +28298,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxWebAppSlotSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['LinuxWebAppSlotSiteConfigIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -21580,14 +28442,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxWebAppSlotSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -21659,20 +28546,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxWebAppSlotSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['LinuxWebAppSlotSiteConfigScmIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -21774,14 +28690,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxWebAppSlotSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -21840,10 +28781,23 @@ def __init__(__self__, *, """ :param pulumi.Input[str] password: The Site Credentials Password used for publishing. """ + LinuxWebAppSlotSiteCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -21884,13 +28838,52 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The Azure Storage Type. Possible values include `AzureFiles` and `AzureBlob` :param pulumi.Input[str] mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + LinuxWebAppSlotStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + mount_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -21974,10 +28967,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] app_setting_names: A list of `app_setting` names that the Linux Web App will not swap between Slots when a swap operation is triggered. :param pulumi.Input[Sequence[pulumi.Input[str]]] connection_string_names: A list of `connection_string` names that the Linux Web App will not swap between Slots when a swap operation is triggered. """ + LinuxWebAppStickySettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_setting_names=app_setting_names, + connection_string_names=connection_string_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_setting_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_setting_names is None and 'appSettingNames' in kwargs: + app_setting_names = kwargs['appSettingNames'] + if connection_string_names is None and 'connectionStringNames' in kwargs: + connection_string_names = kwargs['connectionStringNames'] + if app_setting_names is not None: - pulumi.set(__self__, "app_setting_names", app_setting_names) + _setter("app_setting_names", app_setting_names) if connection_string_names is not None: - pulumi.set(__self__, "connection_string_names", connection_string_names) + _setter("connection_string_names", connection_string_names) @property @pulumi.getter(name="appSettingNames") @@ -22021,13 +29031,52 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The Azure Storage Type. Possible values include `AzureFiles` and `AzureBlob` :param pulumi.Input[str] mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + LinuxWebAppStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + mount_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -22113,10 +29162,29 @@ def __init__(__self__, *, :param pulumi.Input[str] tier: Specifies the plan's pricing tier. :param pulumi.Input[int] capacity: Specifies the number of workers associated with this App Service Plan. """ - pulumi.set(__self__, "size", size) - pulumi.set(__self__, "tier", tier) + PlanSkuArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + size=size, + tier=tier, + capacity=capacity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + size: Optional[pulumi.Input[str]] = None, + tier: Optional[pulumi.Input[str]] = None, + capacity: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if size is None: + raise TypeError("Missing 'size' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("size", size) + _setter("tier", tier) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) @property @pulumi.getter @@ -22190,33 +29258,88 @@ def __init__(__self__, *, :param pulumi.Input['SlotAuthSettingsTwitterArgs'] twitter: A `twitter` block as defined below. :param pulumi.Input[str] unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values are `AllowAnonymous` and `RedirectToLoginPage`. """ - pulumi.set(__self__, "enabled", enabled) + SlotAuthSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_params=additional_login_params, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + active_directory: Optional[pulumi.Input['SlotAuthSettingsActiveDirectoryArgs']] = None, + additional_login_params: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + facebook: Optional[pulumi.Input['SlotAuthSettingsFacebookArgs']] = None, + google: Optional[pulumi.Input['SlotAuthSettingsGoogleArgs']] = None, + issuer: Optional[pulumi.Input[str]] = None, + microsoft: Optional[pulumi.Input['SlotAuthSettingsMicrosoftArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + token_refresh_extension_hours: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + twitter: Optional[pulumi.Input['SlotAuthSettingsTwitterArgs']] = None, + unauthenticated_client_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_params is None and 'additionalLoginParams' in kwargs: + additional_login_params = kwargs['additionalLoginParams'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_params is not None: - pulumi.set(__self__, "additional_login_params", additional_login_params) + _setter("additional_login_params", additional_login_params) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -22400,11 +29523,34 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_audiences: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. :param pulumi.Input[str] client_secret: The Client Secret of this relying party application. If no secret is provided, implicit flow will be used. """ - pulumi.set(__self__, "client_id", client_id) + SlotAuthSettingsActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -22454,10 +29600,35 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret: The App Secret of the Facebook app used for Facebook login. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret", app_secret) + SlotAuthSettingsFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret is None: + raise TypeError("Missing 'app_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) + _setter("app_secret", app_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -22507,10 +29678,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The client secret associated with the Google web application. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + SlotAuthSettingsGoogleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -22560,10 +29756,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The OAuth 2.0 client secret that was created for the app used for authentication. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + SlotAuthSettingsMicrosoftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -22611,8 +29832,29 @@ def __init__(__self__, *, :param pulumi.Input[str] consumer_key: The consumer key of the Twitter app used for login :param pulumi.Input[str] consumer_secret: The consumer secret of the Twitter app used for login. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret", consumer_secret) + SlotAuthSettingsTwitterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret is None: + raise TypeError("Missing 'consumer_secret' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret", consumer_secret) @property @pulumi.getter(name="consumerKey") @@ -22650,9 +29892,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of the Connection String. Possible values are `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param pulumi.Input[str] value: The value for the Connection String. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + SlotConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -22706,13 +29969,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service slot. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service slot. """ - pulumi.set(__self__, "type", type) + SlotIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -22778,14 +30066,39 @@ def __init__(__self__, *, :param pulumi.Input[bool] failed_request_tracing_enabled: Should `Failed request tracing` be enabled on this App Service slot? Defaults to `false`. :param pulumi.Input['SlotLogsHttpLogsArgs'] http_logs: An `http_logs` block as defined below. """ + SlotLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages_enabled=detailed_error_messages_enabled, + failed_request_tracing_enabled=failed_request_tracing_enabled, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional[pulumi.Input['SlotLogsApplicationLogsArgs']] = None, + detailed_error_messages_enabled: Optional[pulumi.Input[bool]] = None, + failed_request_tracing_enabled: Optional[pulumi.Input[bool]] = None, + http_logs: Optional[pulumi.Input['SlotLogsHttpLogsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if detailed_error_messages_enabled is None and 'detailedErrorMessagesEnabled' in kwargs: + detailed_error_messages_enabled = kwargs['detailedErrorMessagesEnabled'] + if failed_request_tracing_enabled is None and 'failedRequestTracingEnabled' in kwargs: + failed_request_tracing_enabled = kwargs['failedRequestTracingEnabled'] + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if application_logs is not None: - pulumi.set(__self__, "application_logs", application_logs) + _setter("application_logs", application_logs) if detailed_error_messages_enabled is not None: - pulumi.set(__self__, "detailed_error_messages_enabled", detailed_error_messages_enabled) + _setter("detailed_error_messages_enabled", detailed_error_messages_enabled) if failed_request_tracing_enabled is not None: - pulumi.set(__self__, "failed_request_tracing_enabled", failed_request_tracing_enabled) + _setter("failed_request_tracing_enabled", failed_request_tracing_enabled) if http_logs is not None: - pulumi.set(__self__, "http_logs", http_logs) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -22845,10 +30158,27 @@ def __init__(__self__, *, :param pulumi.Input['SlotLogsApplicationLogsAzureBlobStorageArgs'] azure_blob_storage: An `azure_blob_storage` block as defined below. :param pulumi.Input[str] file_system_level: The file system log level. Possible values are `Off`, `Error`, `Warning`, `Information`, and `Verbose`. """ + SlotLogsApplicationLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system_level=file_system_level, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional[pulumi.Input['SlotLogsApplicationLogsAzureBlobStorageArgs']] = None, + file_system_level: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system_level is not None: - pulumi.set(__self__, "file_system_level", file_system_level) + _setter("file_system_level", file_system_level) @property @pulumi.getter(name="azureBlobStorage") @@ -22886,9 +30216,34 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The number of days to retain logs for. :param pulumi.Input[str] sas_url: The URL to the storage container, with a Service SAS token appended. **NOTE:** there is currently no means of generating Service SAS tokens with the `azurerm` provider. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + SlotLogsApplicationLogsAzureBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[pulumi.Input[str]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + sas_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -22936,10 +30291,27 @@ def __init__(__self__, *, :param pulumi.Input['SlotLogsHttpLogsAzureBlobStorageArgs'] azure_blob_storage: An `azure_blob_storage` block as defined below. :param pulumi.Input['SlotLogsHttpLogsFileSystemArgs'] file_system: A `file_system` block as defined below. """ + SlotLogsHttpLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system=file_system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional[pulumi.Input['SlotLogsHttpLogsAzureBlobStorageArgs']] = None, + file_system: Optional[pulumi.Input['SlotLogsHttpLogsFileSystemArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) @property @pulumi.getter(name="azureBlobStorage") @@ -22975,8 +30347,29 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The number of days to retain logs for. :param pulumi.Input[str] sas_url: The URL to the storage container, with a Service SAS token appended. **NOTE:** there is currently no means of generating Service SAS tokens with the `azurerm` provider. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + SlotLogsHttpLogsAzureBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[pulumi.Input[int]] = None, + sas_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter(name="retentionInDays") @@ -23012,8 +30405,29 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The number of days to retain logs for. :param pulumi.Input[int] retention_in_mb: The maximum size in megabytes that HTTP log files can use before being removed. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + SlotLogsHttpLogsFileSystemArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[pulumi.Input[int]] = None, + retention_in_mb: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -23121,68 +30535,199 @@ def __init__(__self__, *, > **NOTE:** when using an App Service Plan in the `Free` or `Shared` Tiers `use_32_bit_worker_process` must be set to `true`. :param pulumi.Input[bool] websockets_enabled: Should WebSockets be enabled? """ + SlotSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + acr_use_managed_identity_credentials=acr_use_managed_identity_credentials, + acr_user_managed_identity_client_id=acr_user_managed_identity_client_id, + always_on=always_on, + app_command_line=app_command_line, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + default_documents=default_documents, + dotnet_framework_version=dotnet_framework_version, + ftps_state=ftps_state, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + java_container=java_container, + java_container_version=java_container_version, + java_version=java_version, + linux_fx_version=linux_fx_version, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + min_tls_version=min_tls_version, + number_of_workers=number_of_workers, + php_version=php_version, + python_version=python_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + acr_use_managed_identity_credentials: Optional[pulumi.Input[bool]] = None, + acr_user_managed_identity_client_id: Optional[pulumi.Input[str]] = None, + always_on: Optional[pulumi.Input[bool]] = None, + app_command_line: Optional[pulumi.Input[str]] = None, + auto_swap_slot_name: Optional[pulumi.Input[str]] = None, + cors: Optional[pulumi.Input['SlotSiteConfigCorsArgs']] = None, + default_documents: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + dotnet_framework_version: Optional[pulumi.Input[str]] = None, + ftps_state: Optional[pulumi.Input[str]] = None, + health_check_path: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['SlotSiteConfigIpRestrictionArgs']]]] = None, + java_container: Optional[pulumi.Input[str]] = None, + java_container_version: Optional[pulumi.Input[str]] = None, + java_version: Optional[pulumi.Input[str]] = None, + linux_fx_version: Optional[pulumi.Input[str]] = None, + local_mysql_enabled: Optional[pulumi.Input[bool]] = None, + managed_pipeline_mode: Optional[pulumi.Input[str]] = None, + min_tls_version: Optional[pulumi.Input[str]] = None, + number_of_workers: Optional[pulumi.Input[int]] = None, + php_version: Optional[pulumi.Input[str]] = None, + python_version: Optional[pulumi.Input[str]] = None, + remote_debugging_enabled: Optional[pulumi.Input[bool]] = None, + remote_debugging_version: Optional[pulumi.Input[str]] = None, + scm_ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['SlotSiteConfigScmIpRestrictionArgs']]]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + scm_use_main_ip_restriction: Optional[pulumi.Input[bool]] = None, + use32_bit_worker_process: Optional[pulumi.Input[bool]] = None, + vnet_route_all_enabled: Optional[pulumi.Input[bool]] = None, + websockets_enabled: Optional[pulumi.Input[bool]] = None, + windows_fx_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if acr_use_managed_identity_credentials is None and 'acrUseManagedIdentityCredentials' in kwargs: + acr_use_managed_identity_credentials = kwargs['acrUseManagedIdentityCredentials'] + if acr_user_managed_identity_client_id is None and 'acrUserManagedIdentityClientId' in kwargs: + acr_user_managed_identity_client_id = kwargs['acrUserManagedIdentityClientId'] + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if java_container is None and 'javaContainer' in kwargs: + java_container = kwargs['javaContainer'] + if java_container_version is None and 'javaContainerVersion' in kwargs: + java_container_version = kwargs['javaContainerVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if number_of_workers is None and 'numberOfWorkers' in kwargs: + number_of_workers = kwargs['numberOfWorkers'] + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if acr_use_managed_identity_credentials is not None: - pulumi.set(__self__, "acr_use_managed_identity_credentials", acr_use_managed_identity_credentials) + _setter("acr_use_managed_identity_credentials", acr_use_managed_identity_credentials) if acr_user_managed_identity_client_id is not None: - pulumi.set(__self__, "acr_user_managed_identity_client_id", acr_user_managed_identity_client_id) + _setter("acr_user_managed_identity_client_id", acr_user_managed_identity_client_id) if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if dotnet_framework_version is not None: - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) + _setter("dotnet_framework_version", dotnet_framework_version) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if java_container is not None: - pulumi.set(__self__, "java_container", java_container) + _setter("java_container", java_container) if java_container_version is not None: - pulumi.set(__self__, "java_container_version", java_container_version) + _setter("java_container_version", java_container_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if local_mysql_enabled is not None: - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) + _setter("local_mysql_enabled", local_mysql_enabled) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if number_of_workers is not None: - pulumi.set(__self__, "number_of_workers", number_of_workers) + _setter("number_of_workers", number_of_workers) if php_version is not None: - pulumi.set(__self__, "php_version", php_version) + _setter("php_version", php_version) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker_process is not None: - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) + _setter("use32_bit_worker_process", use32_bit_worker_process) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if windows_fx_version is not None: - pulumi.set(__self__, "windows_fx_version", windows_fx_version) + _setter("windows_fx_version", windows_fx_version) @property @pulumi.getter(name="acrUseManagedIdentityCredentials") @@ -23576,9 +31121,28 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls. :param pulumi.Input[bool] support_credentials: Are credentials supported? """ - pulumi.set(__self__, "allowed_origins", allowed_origins) + SlotSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + support_credentials: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -23626,20 +31190,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + SlotSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['SlotSiteConfigIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -23741,14 +31334,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + SlotSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -23820,20 +31438,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + SlotSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['SlotSiteConfigScmIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -23935,14 +31582,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + SlotSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -24002,10 +31674,23 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password associated with the username, which can be used to publish to this App Service. :param pulumi.Input[str] username: The username which can be used to publish to this App Service """ + SlotSiteCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -24049,13 +31734,52 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of storage. Possible values are `AzureBlob` and `AzureFiles`. :param pulumi.Input[str] mount_path: The path to mount the storage within the site's runtime environment. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + SlotStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + mount_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -24142,14 +31866,39 @@ def __init__(__self__, *, :param pulumi.Input['SourceControlGithubActionConfigurationContainerConfigurationArgs'] container_configuration: A `container_configuration` block as defined above. :param pulumi.Input[bool] generate_workflow_file: Whether to generate the GitHub work flow file. Defaults to `true`. Changing this forces a new resource to be created. """ + SourceControlGithubActionConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + code_configuration=code_configuration, + container_configuration=container_configuration, + generate_workflow_file=generate_workflow_file, + linux_action=linux_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + code_configuration: Optional[pulumi.Input['SourceControlGithubActionConfigurationCodeConfigurationArgs']] = None, + container_configuration: Optional[pulumi.Input['SourceControlGithubActionConfigurationContainerConfigurationArgs']] = None, + generate_workflow_file: Optional[pulumi.Input[bool]] = None, + linux_action: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if code_configuration is None and 'codeConfiguration' in kwargs: + code_configuration = kwargs['codeConfiguration'] + if container_configuration is None and 'containerConfiguration' in kwargs: + container_configuration = kwargs['containerConfiguration'] + if generate_workflow_file is None and 'generateWorkflowFile' in kwargs: + generate_workflow_file = kwargs['generateWorkflowFile'] + if linux_action is None and 'linuxAction' in kwargs: + linux_action = kwargs['linuxAction'] + if code_configuration is not None: - pulumi.set(__self__, "code_configuration", code_configuration) + _setter("code_configuration", code_configuration) if container_configuration is not None: - pulumi.set(__self__, "container_configuration", container_configuration) + _setter("container_configuration", container_configuration) if generate_workflow_file is not None: - pulumi.set(__self__, "generate_workflow_file", generate_workflow_file) + _setter("generate_workflow_file", generate_workflow_file) if linux_action is not None: - pulumi.set(__self__, "linux_action", linux_action) + _setter("linux_action", linux_action) @property @pulumi.getter(name="codeConfiguration") @@ -24206,8 +31955,29 @@ def __init__(__self__, *, :param pulumi.Input[str] runtime_stack: The value to use for the Runtime Stack in the workflow file content for code base apps. Possible values are `dotnetcore`, `spring`, `tomcat`, `node` and `python`. Changing this forces a new resource to be created. :param pulumi.Input[str] runtime_version: The value to use for the Runtime Version in the workflow file content for code base apps. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "runtime_stack", runtime_stack) - pulumi.set(__self__, "runtime_version", runtime_version) + SourceControlGithubActionConfigurationCodeConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + runtime_stack=runtime_stack, + runtime_version=runtime_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + runtime_stack: Optional[pulumi.Input[str]] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if runtime_stack is None and 'runtimeStack' in kwargs: + runtime_stack = kwargs['runtimeStack'] + if runtime_stack is None: + raise TypeError("Missing 'runtime_stack' argument") + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if runtime_version is None: + raise TypeError("Missing 'runtime_version' argument") + + _setter("runtime_stack", runtime_stack) + _setter("runtime_version", runtime_version) @property @pulumi.getter(name="runtimeStack") @@ -24247,12 +32017,41 @@ def __init__(__self__, *, :param pulumi.Input[str] registry_password: The password used to upload the image to the container registry. Changing this forces a new resource to be created. :param pulumi.Input[str] registry_username: The username used to upload the image to the container registry. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "image_name", image_name) - pulumi.set(__self__, "registry_url", registry_url) + SourceControlGithubActionConfigurationContainerConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + image_name=image_name, + registry_url=registry_url, + registry_password=registry_password, + registry_username=registry_username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image_name: Optional[pulumi.Input[str]] = None, + registry_url: Optional[pulumi.Input[str]] = None, + registry_password: Optional[pulumi.Input[str]] = None, + registry_username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if image_name is None: + raise TypeError("Missing 'image_name' argument") + if registry_url is None and 'registryUrl' in kwargs: + registry_url = kwargs['registryUrl'] + if registry_url is None: + raise TypeError("Missing 'registry_url' argument") + if registry_password is None and 'registryPassword' in kwargs: + registry_password = kwargs['registryPassword'] + if registry_username is None and 'registryUsername' in kwargs: + registry_username = kwargs['registryUsername'] + + _setter("image_name", image_name) + _setter("registry_url", registry_url) if registry_password is not None: - pulumi.set(__self__, "registry_password", registry_password) + _setter("registry_password", registry_password) if registry_username is not None: - pulumi.set(__self__, "registry_username", registry_username) + _setter("registry_username", registry_username) @property @pulumi.getter(name="imageName") @@ -24316,14 +32115,39 @@ def __init__(__self__, *, :param pulumi.Input[bool] generate_workflow_file: Should the service generate the GitHub Action Workflow file. Defaults to `true` Changing this forces a new resource to be created. :param pulumi.Input[bool] linux_action: Denotes this action uses a Linux base image. """ + SourceControlSlotGithubActionConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + code_configuration=code_configuration, + container_configuration=container_configuration, + generate_workflow_file=generate_workflow_file, + linux_action=linux_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + code_configuration: Optional[pulumi.Input['SourceControlSlotGithubActionConfigurationCodeConfigurationArgs']] = None, + container_configuration: Optional[pulumi.Input['SourceControlSlotGithubActionConfigurationContainerConfigurationArgs']] = None, + generate_workflow_file: Optional[pulumi.Input[bool]] = None, + linux_action: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if code_configuration is None and 'codeConfiguration' in kwargs: + code_configuration = kwargs['codeConfiguration'] + if container_configuration is None and 'containerConfiguration' in kwargs: + container_configuration = kwargs['containerConfiguration'] + if generate_workflow_file is None and 'generateWorkflowFile' in kwargs: + generate_workflow_file = kwargs['generateWorkflowFile'] + if linux_action is None and 'linuxAction' in kwargs: + linux_action = kwargs['linuxAction'] + if code_configuration is not None: - pulumi.set(__self__, "code_configuration", code_configuration) + _setter("code_configuration", code_configuration) if container_configuration is not None: - pulumi.set(__self__, "container_configuration", container_configuration) + _setter("container_configuration", container_configuration) if generate_workflow_file is not None: - pulumi.set(__self__, "generate_workflow_file", generate_workflow_file) + _setter("generate_workflow_file", generate_workflow_file) if linux_action is not None: - pulumi.set(__self__, "linux_action", linux_action) + _setter("linux_action", linux_action) @property @pulumi.getter(name="codeConfiguration") @@ -24383,8 +32207,29 @@ def __init__(__self__, *, :param pulumi.Input[str] runtime_stack: The value to use for the Runtime Stack in the workflow file content for code base apps. Changing this forces a new resource to be created. Possible values are `dotnetcore`, `spring`, `tomcat`, `node` and `python`. :param pulumi.Input[str] runtime_version: The value to use for the Runtime Version in the workflow file content for code base apps. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "runtime_stack", runtime_stack) - pulumi.set(__self__, "runtime_version", runtime_version) + SourceControlSlotGithubActionConfigurationCodeConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + runtime_stack=runtime_stack, + runtime_version=runtime_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + runtime_stack: Optional[pulumi.Input[str]] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if runtime_stack is None and 'runtimeStack' in kwargs: + runtime_stack = kwargs['runtimeStack'] + if runtime_stack is None: + raise TypeError("Missing 'runtime_stack' argument") + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if runtime_version is None: + raise TypeError("Missing 'runtime_version' argument") + + _setter("runtime_stack", runtime_stack) + _setter("runtime_version", runtime_version) @property @pulumi.getter(name="runtimeStack") @@ -24424,12 +32269,41 @@ def __init__(__self__, *, :param pulumi.Input[str] registry_password: The password used to upload the image to the container registry. Changing this forces a new resource to be created. :param pulumi.Input[str] registry_username: The username used to upload the image to the container registry. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "image_name", image_name) - pulumi.set(__self__, "registry_url", registry_url) + SourceControlSlotGithubActionConfigurationContainerConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + image_name=image_name, + registry_url=registry_url, + registry_password=registry_password, + registry_username=registry_username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image_name: Optional[pulumi.Input[str]] = None, + registry_url: Optional[pulumi.Input[str]] = None, + registry_password: Optional[pulumi.Input[str]] = None, + registry_username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if image_name is None: + raise TypeError("Missing 'image_name' argument") + if registry_url is None and 'registryUrl' in kwargs: + registry_url = kwargs['registryUrl'] + if registry_url is None: + raise TypeError("Missing 'registry_url' argument") + if registry_password is None and 'registryPassword' in kwargs: + registry_password = kwargs['registryPassword'] + if registry_username is None and 'registryUsername' in kwargs: + registry_username = kwargs['registryUsername'] + + _setter("image_name", image_name) + _setter("registry_url", registry_url) if registry_password is not None: - pulumi.set(__self__, "registry_password", registry_password) + _setter("registry_password", registry_password) if registry_username is not None: - pulumi.set(__self__, "registry_username", registry_username) + _setter("registry_username", registry_username) @property @pulumi.getter(name="imageName") @@ -24492,13 +32366,38 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: A list of Managed Identity IDs which should be assigned to this Static Site resource. :param pulumi.Input[str] principal_id: (Optional) The Principal ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + StaticSiteIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -24585,35 +32484,92 @@ def __init__(__self__, *, :param pulumi.Input['WindowsFunctionAppAuthSettingsTwitterArgs'] twitter: A `twitter` block as defined below. :param pulumi.Input[str] unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + WindowsFunctionAppAuthSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + active_directory: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsActiveDirectoryArgs']] = None, + additional_login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + facebook: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsFacebookArgs']] = None, + github: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsGithubArgs']] = None, + google: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsGoogleArgs']] = None, + issuer: Optional[pulumi.Input[str]] = None, + microsoft: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsMicrosoftArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + token_refresh_extension_hours: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + twitter: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsTwitterArgs']] = None, + unauthenticated_client_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -24815,13 +32771,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppAuthSettingsActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -24887,13 +32870,40 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + WindowsFunctionAppAuthSettingsFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -24957,13 +32967,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppAuthSettingsGithubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -25027,13 +33064,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppAuthSettingsGoogleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -25097,13 +33161,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppAuthSettingsMicrosoftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -25165,11 +33256,34 @@ def __init__(__self__, *, :param pulumi.Input[str] consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param pulumi.Input[str] consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + WindowsFunctionAppAuthSettingsTwitterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -25263,49 +33377,146 @@ def __init__(__self__, *, :param pulumi.Input['WindowsFunctionAppAuthSettingsV2TwitterV2Args'] twitter_v2: A `twitter_v2` block as defined below. :param pulumi.Input[str] unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + WindowsFunctionAppAuthSettingsV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsV2LoginArgs']] = None, + active_directory_v2: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsV2ActiveDirectoryV2Args']] = None, + apple_v2: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsV2AppleV2Args']] = None, + auth_enabled: Optional[pulumi.Input[bool]] = None, + azure_static_web_app_v2: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsV2AzureStaticWebAppV2Args']] = None, + config_file_path: Optional[pulumi.Input[str]] = None, + custom_oidc_v2s: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppAuthSettingsV2CustomOidcV2Args']]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + excluded_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + facebook_v2: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsV2FacebookV2Args']] = None, + forward_proxy_convention: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_host_header_name: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_scheme_header_name: Optional[pulumi.Input[str]] = None, + github_v2: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsV2GithubV2Args']] = None, + google_v2: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsV2GoogleV2Args']] = None, + http_route_api_prefix: Optional[pulumi.Input[str]] = None, + microsoft_v2: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsV2MicrosoftV2Args']] = None, + require_authentication: Optional[pulumi.Input[bool]] = None, + require_https: Optional[pulumi.Input[bool]] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + twitter_v2: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsV2TwitterV2Args']] = None, + unauthenticated_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -25611,28 +33822,89 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param pulumi.Input[bool] www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + WindowsFunctionAppAuthSettingsV2ActiveDirectoryV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + tenant_auth_endpoint: Optional[pulumi.Input[str]] = None, + allowed_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret_certificate_thumbprint: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + jwt_allowed_client_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + jwt_allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + www_authentication_disabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -25794,10 +34066,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppAuthSettingsV2AppleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -25843,7 +34140,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppAuthSettingsV2AzureStaticWebAppV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -25885,25 +34197,80 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: The list of the scopes that should be requested while authenticating. :param pulumi.Input[str] token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + WindowsFunctionAppAuthSettingsV2CustomOidcV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + openid_configuration_endpoint: Optional[pulumi.Input[str]] = None, + authorisation_endpoint: Optional[pulumi.Input[str]] = None, + certification_uri: Optional[pulumi.Input[str]] = None, + client_credential_method: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + issuer_endpoint: Optional[pulumi.Input[str]] = None, + name_claim_type: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + token_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -26053,12 +34420,41 @@ def __init__(__self__, *, :param pulumi.Input[str] graph_api_version: The version of the Facebook API to be used while logging in. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + WindowsFunctionAppAuthSettingsV2FacebookV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + graph_api_version: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -26122,10 +34518,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppAuthSettingsV2GithubV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -26179,12 +34600,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppAuthSettingsV2GoogleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -26266,28 +34716,81 @@ def __init__(__self__, *, :param pulumi.Input[str] token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param pulumi.Input[bool] validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + WindowsFunctionAppAuthSettingsV2LoginArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cookie_expiration_convention: Optional[pulumi.Input[str]] = None, + cookie_expiration_time: Optional[pulumi.Input[str]] = None, + logout_endpoint: Optional[pulumi.Input[str]] = None, + nonce_expiration_time: Optional[pulumi.Input[str]] = None, + preserve_url_fragments_for_logins: Optional[pulumi.Input[bool]] = None, + token_refresh_extension_time: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + token_store_path: Optional[pulumi.Input[str]] = None, + token_store_sas_setting_name: Optional[pulumi.Input[str]] = None, + validate_nonce: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -26439,12 +34942,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppAuthSettingsV2MicrosoftV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -26508,8 +35040,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + WindowsFunctionAppAuthSettingsV2TwitterV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -26551,11 +35104,36 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_url: The SAS URL to the container. :param pulumi.Input[bool] enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + WindowsFunctionAppBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['WindowsFunctionAppBackupScheduleArgs']] = None, + storage_account_url: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -26624,16 +35202,53 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param pulumi.Input[str] start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + WindowsFunctionAppBackupScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[pulumi.Input[int]] = None, + frequency_unit: Optional[pulumi.Input[str]] = None, + keep_at_least_one_backup: Optional[pulumi.Input[bool]] = None, + last_execution_time: Optional[pulumi.Input[str]] = None, + retention_period_days: Optional[pulumi.Input[int]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -26718,9 +35333,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Type of database. Possible values include: `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param pulumi.Input[str] value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + WindowsFunctionAppConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -26774,13 +35410,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WindowsFunctionAppIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -26909,74 +35570,217 @@ def __init__(__self__, *, :param pulumi.Input[bool] websockets_enabled: Should Web Sockets be enabled. Defaults to `false`. :param pulumi.Input[int] worker_count: The number of Workers for this Windows Function App. """ + WindowsFunctionAppSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + app_scale_limit=app_scale_limit, + app_service_logs=app_service_logs, + application_insights_connection_string=application_insights_connection_string, + application_insights_key=application_insights_key, + application_stack=application_stack, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + load_balancing_mode=load_balancing_mode, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[pulumi.Input[bool]] = None, + api_definition_url: Optional[pulumi.Input[str]] = None, + api_management_api_id: Optional[pulumi.Input[str]] = None, + app_command_line: Optional[pulumi.Input[str]] = None, + app_scale_limit: Optional[pulumi.Input[int]] = None, + app_service_logs: Optional[pulumi.Input['WindowsFunctionAppSiteConfigAppServiceLogsArgs']] = None, + application_insights_connection_string: Optional[pulumi.Input[str]] = None, + application_insights_key: Optional[pulumi.Input[str]] = None, + application_stack: Optional[pulumi.Input['WindowsFunctionAppSiteConfigApplicationStackArgs']] = None, + cors: Optional[pulumi.Input['WindowsFunctionAppSiteConfigCorsArgs']] = None, + default_documents: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + detailed_error_logging_enabled: Optional[pulumi.Input[bool]] = None, + elastic_instance_minimum: Optional[pulumi.Input[int]] = None, + ftps_state: Optional[pulumi.Input[str]] = None, + health_check_eviction_time_in_min: Optional[pulumi.Input[int]] = None, + health_check_path: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppSiteConfigIpRestrictionArgs']]]] = None, + load_balancing_mode: Optional[pulumi.Input[str]] = None, + managed_pipeline_mode: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + pre_warmed_instance_count: Optional[pulumi.Input[int]] = None, + remote_debugging_enabled: Optional[pulumi.Input[bool]] = None, + remote_debugging_version: Optional[pulumi.Input[str]] = None, + runtime_scale_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + scm_ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppSiteConfigScmIpRestrictionArgs']]]] = None, + scm_minimum_tls_version: Optional[pulumi.Input[str]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + scm_use_main_ip_restriction: Optional[pulumi.Input[bool]] = None, + use32_bit_worker: Optional[pulumi.Input[bool]] = None, + vnet_route_all_enabled: Optional[pulumi.Input[bool]] = None, + websockets_enabled: Optional[pulumi.Input[bool]] = None, + windows_fx_version: Optional[pulumi.Input[str]] = None, + worker_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if app_service_logs is None and 'appServiceLogs' in kwargs: + app_service_logs = kwargs['appServiceLogs'] + if application_insights_connection_string is None and 'applicationInsightsConnectionString' in kwargs: + application_insights_connection_string = kwargs['applicationInsightsConnectionString'] + if application_insights_key is None and 'applicationInsightsKey' in kwargs: + application_insights_key = kwargs['applicationInsightsKey'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if app_service_logs is not None: - pulumi.set(__self__, "app_service_logs", app_service_logs) + _setter("app_service_logs", app_service_logs) if application_insights_connection_string is not None: - pulumi.set(__self__, "application_insights_connection_string", application_insights_connection_string) + _setter("application_insights_connection_string", application_insights_connection_string) if application_insights_key is not None: - pulumi.set(__self__, "application_insights_key", application_insights_key) + _setter("application_insights_key", application_insights_key) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if windows_fx_version is not None: - pulumi.set(__self__, "windows_fx_version", windows_fx_version) + _setter("windows_fx_version", windows_fx_version) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -27395,10 +36199,27 @@ def __init__(__self__, *, > **NOTE:** This block is not supported on Consumption plans. """ + WindowsFunctionAppSiteConfigAppServiceLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_quota_mb=disk_quota_mb, + retention_period_days=retention_period_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_quota_mb: Optional[pulumi.Input[int]] = None, + retention_period_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_quota_mb is None and 'diskQuotaMb' in kwargs: + disk_quota_mb = kwargs['diskQuotaMb'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if disk_quota_mb is not None: - pulumi.set(__self__, "disk_quota_mb", disk_quota_mb) + _setter("disk_quota_mb", disk_quota_mb) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) @property @pulumi.getter(name="diskQuotaMb") @@ -27446,18 +36267,51 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_custom_runtime: Should the Windows Function App use a custom runtime? :param pulumi.Input[bool] use_dotnet_isolated_runtime: Should the DotNet process use an isolated runtime. Defaults to `false`. """ + WindowsFunctionAppSiteConfigApplicationStackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dotnet_version=dotnet_version, + java_version=java_version, + node_version=node_version, + powershell_core_version=powershell_core_version, + use_custom_runtime=use_custom_runtime, + use_dotnet_isolated_runtime=use_dotnet_isolated_runtime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dotnet_version: Optional[pulumi.Input[str]] = None, + java_version: Optional[pulumi.Input[str]] = None, + node_version: Optional[pulumi.Input[str]] = None, + powershell_core_version: Optional[pulumi.Input[str]] = None, + use_custom_runtime: Optional[pulumi.Input[bool]] = None, + use_dotnet_isolated_runtime: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if powershell_core_version is None and 'powershellCoreVersion' in kwargs: + powershell_core_version = kwargs['powershellCoreVersion'] + if use_custom_runtime is None and 'useCustomRuntime' in kwargs: + use_custom_runtime = kwargs['useCustomRuntime'] + if use_dotnet_isolated_runtime is None and 'useDotnetIsolatedRuntime' in kwargs: + use_dotnet_isolated_runtime = kwargs['useDotnetIsolatedRuntime'] + if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if powershell_core_version is not None: - pulumi.set(__self__, "powershell_core_version", powershell_core_version) + _setter("powershell_core_version", powershell_core_version) if use_custom_runtime is not None: - pulumi.set(__self__, "use_custom_runtime", use_custom_runtime) + _setter("use_custom_runtime", use_custom_runtime) if use_dotnet_isolated_runtime is not None: - pulumi.set(__self__, "use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) + _setter("use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) @property @pulumi.getter(name="dotnetVersion") @@ -27543,10 +36397,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: Specifies a list of origins that should be allowed to make cross-origin calls. :param pulumi.Input[bool] support_credentials: Are credentials allowed in CORS requests? Defaults to `false`. """ + WindowsFunctionAppSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + support_credentials: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -27594,20 +36465,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsFunctionAppSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['WindowsFunctionAppSiteConfigIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -27709,14 +36609,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsFunctionAppSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -27788,20 +36713,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsFunctionAppSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['WindowsFunctionAppSiteConfigScmIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -27903,14 +36857,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsFunctionAppSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -27970,10 +36949,23 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Windows Function App. Changing this forces a new Windows Function App to be created. Limit the function name to 32 characters to avoid naming collisions. For more information about [Function App naming rule](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftweb) and [Host ID Collisions](https://github.com/Azure/azure-functions-host/wiki/Host-IDs#host-id-collisions) :param pulumi.Input[str] password: The Site Credentials Password used for publishing. """ + WindowsFunctionAppSiteCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -28039,35 +37031,92 @@ def __init__(__self__, *, :param pulumi.Input['WindowsFunctionAppSlotAuthSettingsTwitterArgs'] twitter: a `twitter` block as detailed below. :param pulumi.Input[str] unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + WindowsFunctionAppSlotAuthSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + active_directory: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsActiveDirectoryArgs']] = None, + additional_login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + facebook: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsFacebookArgs']] = None, + github: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsGithubArgs']] = None, + google: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsGoogleArgs']] = None, + issuer: Optional[pulumi.Input[str]] = None, + microsoft: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsMicrosoftArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + token_refresh_extension_hours: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + twitter: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsTwitterArgs']] = None, + unauthenticated_client_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -28269,13 +37318,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppSlotAuthSettingsActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -28341,13 +37417,40 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: an `oauth_scopes` block as detailed below. """ - pulumi.set(__self__, "app_id", app_id) + WindowsFunctionAppSlotAuthSettingsFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -28411,13 +37514,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: an `oauth_scopes` block as detailed below. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppSlotAuthSettingsGithubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -28481,13 +37611,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: an `oauth_scopes` block as detailed below. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppSlotAuthSettingsGoogleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -28551,13 +37708,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppSlotAuthSettingsMicrosoftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -28619,11 +37803,34 @@ def __init__(__self__, *, :param pulumi.Input[str] consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param pulumi.Input[str] consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + WindowsFunctionAppSlotAuthSettingsTwitterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -28717,49 +37924,146 @@ def __init__(__self__, *, :param pulumi.Input['WindowsFunctionAppSlotAuthSettingsV2TwitterV2Args'] twitter_v2: A `twitter_v2` block as defined below. :param pulumi.Input[str] unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + WindowsFunctionAppSlotAuthSettingsV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsV2LoginArgs']] = None, + active_directory_v2: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsV2ActiveDirectoryV2Args']] = None, + apple_v2: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsV2AppleV2Args']] = None, + auth_enabled: Optional[pulumi.Input[bool]] = None, + azure_static_web_app_v2: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsV2AzureStaticWebAppV2Args']] = None, + config_file_path: Optional[pulumi.Input[str]] = None, + custom_oidc_v2s: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppSlotAuthSettingsV2CustomOidcV2Args']]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + excluded_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + facebook_v2: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsV2FacebookV2Args']] = None, + forward_proxy_convention: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_host_header_name: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_scheme_header_name: Optional[pulumi.Input[str]] = None, + github_v2: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsV2GithubV2Args']] = None, + google_v2: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsV2GoogleV2Args']] = None, + http_route_api_prefix: Optional[pulumi.Input[str]] = None, + microsoft_v2: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsV2MicrosoftV2Args']] = None, + require_authentication: Optional[pulumi.Input[bool]] = None, + require_https: Optional[pulumi.Input[bool]] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + twitter_v2: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsV2TwitterV2Args']] = None, + unauthenticated_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -29065,28 +38369,89 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param pulumi.Input[bool] www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + WindowsFunctionAppSlotAuthSettingsV2ActiveDirectoryV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + tenant_auth_endpoint: Optional[pulumi.Input[str]] = None, + allowed_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret_certificate_thumbprint: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + jwt_allowed_client_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + jwt_allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + www_authentication_disabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -29248,10 +38613,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppSlotAuthSettingsV2AppleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -29297,7 +38687,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppSlotAuthSettingsV2AzureStaticWebAppV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -29339,25 +38744,80 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: The list of the scopes that should be requested while authenticating. :param pulumi.Input[str] token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + WindowsFunctionAppSlotAuthSettingsV2CustomOidcV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + openid_configuration_endpoint: Optional[pulumi.Input[str]] = None, + authorisation_endpoint: Optional[pulumi.Input[str]] = None, + certification_uri: Optional[pulumi.Input[str]] = None, + client_credential_method: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + issuer_endpoint: Optional[pulumi.Input[str]] = None, + name_claim_type: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + token_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -29507,12 +38967,41 @@ def __init__(__self__, *, :param pulumi.Input[str] graph_api_version: The version of the Facebook API to be used while logging in. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + WindowsFunctionAppSlotAuthSettingsV2FacebookV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + graph_api_version: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -29576,10 +39065,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppSlotAuthSettingsV2GithubV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -29633,12 +39147,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppSlotAuthSettingsV2GoogleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -29720,28 +39263,81 @@ def __init__(__self__, *, :param pulumi.Input[str] token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param pulumi.Input[bool] validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + WindowsFunctionAppSlotAuthSettingsV2LoginArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cookie_expiration_convention: Optional[pulumi.Input[str]] = None, + cookie_expiration_time: Optional[pulumi.Input[str]] = None, + logout_endpoint: Optional[pulumi.Input[str]] = None, + nonce_expiration_time: Optional[pulumi.Input[str]] = None, + preserve_url_fragments_for_logins: Optional[pulumi.Input[bool]] = None, + token_refresh_extension_time: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + token_store_path: Optional[pulumi.Input[str]] = None, + token_store_sas_setting_name: Optional[pulumi.Input[str]] = None, + validate_nonce: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -29893,12 +39489,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppSlotAuthSettingsV2MicrosoftV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -29962,8 +39587,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + WindowsFunctionAppSlotAuthSettingsV2TwitterV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -30005,11 +39651,36 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_url: The SAS URL to the container. :param pulumi.Input[bool] enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + WindowsFunctionAppSlotBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['WindowsFunctionAppSlotBackupScheduleArgs']] = None, + storage_account_url: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -30079,16 +39750,53 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param pulumi.Input[str] start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + WindowsFunctionAppSlotBackupScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[pulumi.Input[int]] = None, + frequency_unit: Optional[pulumi.Input[str]] = None, + keep_at_least_one_backup: Optional[pulumi.Input[bool]] = None, + last_execution_time: Optional[pulumi.Input[str]] = None, + retention_period_days: Optional[pulumi.Input[int]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -30176,9 +39884,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Type of database. Possible values include: `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param pulumi.Input[str] value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + WindowsFunctionAppSlotConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -30232,13 +39961,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WindowsFunctionAppSlotIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -30368,76 +40122,223 @@ def __init__(__self__, *, :param pulumi.Input[str] windows_fx_version: The Windows FX Version string. :param pulumi.Input[int] worker_count: The number of Workers for this Windows Function App. """ + WindowsFunctionAppSlotSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + app_scale_limit=app_scale_limit, + app_service_logs=app_service_logs, + application_insights_connection_string=application_insights_connection_string, + application_insights_key=application_insights_key, + application_stack=application_stack, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + load_balancing_mode=load_balancing_mode, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[pulumi.Input[bool]] = None, + api_definition_url: Optional[pulumi.Input[str]] = None, + api_management_api_id: Optional[pulumi.Input[str]] = None, + app_command_line: Optional[pulumi.Input[str]] = None, + app_scale_limit: Optional[pulumi.Input[int]] = None, + app_service_logs: Optional[pulumi.Input['WindowsFunctionAppSlotSiteConfigAppServiceLogsArgs']] = None, + application_insights_connection_string: Optional[pulumi.Input[str]] = None, + application_insights_key: Optional[pulumi.Input[str]] = None, + application_stack: Optional[pulumi.Input['WindowsFunctionAppSlotSiteConfigApplicationStackArgs']] = None, + auto_swap_slot_name: Optional[pulumi.Input[str]] = None, + cors: Optional[pulumi.Input['WindowsFunctionAppSlotSiteConfigCorsArgs']] = None, + default_documents: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + detailed_error_logging_enabled: Optional[pulumi.Input[bool]] = None, + elastic_instance_minimum: Optional[pulumi.Input[int]] = None, + ftps_state: Optional[pulumi.Input[str]] = None, + health_check_eviction_time_in_min: Optional[pulumi.Input[int]] = None, + health_check_path: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppSlotSiteConfigIpRestrictionArgs']]]] = None, + load_balancing_mode: Optional[pulumi.Input[str]] = None, + managed_pipeline_mode: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + pre_warmed_instance_count: Optional[pulumi.Input[int]] = None, + remote_debugging_enabled: Optional[pulumi.Input[bool]] = None, + remote_debugging_version: Optional[pulumi.Input[str]] = None, + runtime_scale_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + scm_ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppSlotSiteConfigScmIpRestrictionArgs']]]] = None, + scm_minimum_tls_version: Optional[pulumi.Input[str]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + scm_use_main_ip_restriction: Optional[pulumi.Input[bool]] = None, + use32_bit_worker: Optional[pulumi.Input[bool]] = None, + vnet_route_all_enabled: Optional[pulumi.Input[bool]] = None, + websockets_enabled: Optional[pulumi.Input[bool]] = None, + windows_fx_version: Optional[pulumi.Input[str]] = None, + worker_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if app_service_logs is None and 'appServiceLogs' in kwargs: + app_service_logs = kwargs['appServiceLogs'] + if application_insights_connection_string is None and 'applicationInsightsConnectionString' in kwargs: + application_insights_connection_string = kwargs['applicationInsightsConnectionString'] + if application_insights_key is None and 'applicationInsightsKey' in kwargs: + application_insights_key = kwargs['applicationInsightsKey'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if app_service_logs is not None: - pulumi.set(__self__, "app_service_logs", app_service_logs) + _setter("app_service_logs", app_service_logs) if application_insights_connection_string is not None: - pulumi.set(__self__, "application_insights_connection_string", application_insights_connection_string) + _setter("application_insights_connection_string", application_insights_connection_string) if application_insights_key is not None: - pulumi.set(__self__, "application_insights_key", application_insights_key) + _setter("application_insights_key", application_insights_key) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if windows_fx_version is not None: - pulumi.set(__self__, "windows_fx_version", windows_fx_version) + _setter("windows_fx_version", windows_fx_version) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -30873,10 +40774,27 @@ def __init__(__self__, *, > **NOTE:** This block is not supported on Consumption plans. """ + WindowsFunctionAppSlotSiteConfigAppServiceLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_quota_mb=disk_quota_mb, + retention_period_days=retention_period_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_quota_mb: Optional[pulumi.Input[int]] = None, + retention_period_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_quota_mb is None and 'diskQuotaMb' in kwargs: + disk_quota_mb = kwargs['diskQuotaMb'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if disk_quota_mb is not None: - pulumi.set(__self__, "disk_quota_mb", disk_quota_mb) + _setter("disk_quota_mb", disk_quota_mb) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) @property @pulumi.getter(name="diskQuotaMb") @@ -30922,18 +40840,51 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_custom_runtime: Does the Function App use a custom Application Stack? :param pulumi.Input[bool] use_dotnet_isolated_runtime: Should the DotNet process use an isolated runtime. Defaults to `false`. """ + WindowsFunctionAppSlotSiteConfigApplicationStackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dotnet_version=dotnet_version, + java_version=java_version, + node_version=node_version, + powershell_core_version=powershell_core_version, + use_custom_runtime=use_custom_runtime, + use_dotnet_isolated_runtime=use_dotnet_isolated_runtime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dotnet_version: Optional[pulumi.Input[str]] = None, + java_version: Optional[pulumi.Input[str]] = None, + node_version: Optional[pulumi.Input[str]] = None, + powershell_core_version: Optional[pulumi.Input[str]] = None, + use_custom_runtime: Optional[pulumi.Input[bool]] = None, + use_dotnet_isolated_runtime: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if powershell_core_version is None and 'powershellCoreVersion' in kwargs: + powershell_core_version = kwargs['powershellCoreVersion'] + if use_custom_runtime is None and 'useCustomRuntime' in kwargs: + use_custom_runtime = kwargs['useCustomRuntime'] + if use_dotnet_isolated_runtime is None and 'useDotnetIsolatedRuntime' in kwargs: + use_dotnet_isolated_runtime = kwargs['useDotnetIsolatedRuntime'] + if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if powershell_core_version is not None: - pulumi.set(__self__, "powershell_core_version", powershell_core_version) + _setter("powershell_core_version", powershell_core_version) if use_custom_runtime is not None: - pulumi.set(__self__, "use_custom_runtime", use_custom_runtime) + _setter("use_custom_runtime", use_custom_runtime) if use_dotnet_isolated_runtime is not None: - pulumi.set(__self__, "use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) + _setter("use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) @property @pulumi.getter(name="dotnetVersion") @@ -31017,10 +40968,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: an `allowed_origins` block as detailed below. :param pulumi.Input[bool] support_credentials: Are credentials allowed in CORS requests? Defaults to `false`. """ + WindowsFunctionAppSlotSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + support_credentials: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -31068,20 +41036,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsFunctionAppSlotSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['WindowsFunctionAppSlotSiteConfigIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -31183,14 +41180,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsFunctionAppSlotSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -31262,20 +41284,49 @@ def __init__(__self__, *, > **NOTE:** Exactly one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsFunctionAppSlotSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['WindowsFunctionAppSlotSiteConfigScmIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -31377,14 +41428,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsFunctionAppSlotSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -31444,10 +41520,23 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Site Credentials Username used for publishing. :param pulumi.Input[str] password: The Site Credentials Password used for publishing. """ + WindowsFunctionAppSlotSiteCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -31491,13 +41580,52 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The Azure Storage Type. Possible values include `AzureFiles`. :param pulumi.Input[str] mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + WindowsFunctionAppSlotStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + mount_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -31581,10 +41709,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] app_setting_names: A list of `app_setting` names that the Windows Function App will not swap between Slots when a swap operation is triggered. :param pulumi.Input[Sequence[pulumi.Input[str]]] connection_string_names: A list of `connection_string` names that the Windows Function App will not swap between Slots when a swap operation is triggered. """ + WindowsFunctionAppStickySettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_setting_names=app_setting_names, + connection_string_names=connection_string_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_setting_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_setting_names is None and 'appSettingNames' in kwargs: + app_setting_names = kwargs['appSettingNames'] + if connection_string_names is None and 'connectionStringNames' in kwargs: + connection_string_names = kwargs['connectionStringNames'] + if app_setting_names is not None: - pulumi.set(__self__, "app_setting_names", app_setting_names) + _setter("app_setting_names", app_setting_names) if connection_string_names is not None: - pulumi.set(__self__, "connection_string_names", connection_string_names) + _setter("connection_string_names", connection_string_names) @property @pulumi.getter(name="appSettingNames") @@ -31628,13 +41773,52 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The Azure Storage Type. Possible values include `AzureFiles`. :param pulumi.Input[str] mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + WindowsFunctionAppStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + mount_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -31748,35 +41932,92 @@ def __init__(__self__, *, :param pulumi.Input['WindowsWebAppAuthSettingsTwitterArgs'] twitter: A `twitter` block as defined below. :param pulumi.Input[str] unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + WindowsWebAppAuthSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + active_directory: Optional[pulumi.Input['WindowsWebAppAuthSettingsActiveDirectoryArgs']] = None, + additional_login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + facebook: Optional[pulumi.Input['WindowsWebAppAuthSettingsFacebookArgs']] = None, + github: Optional[pulumi.Input['WindowsWebAppAuthSettingsGithubArgs']] = None, + google: Optional[pulumi.Input['WindowsWebAppAuthSettingsGoogleArgs']] = None, + issuer: Optional[pulumi.Input[str]] = None, + microsoft: Optional[pulumi.Input['WindowsWebAppAuthSettingsMicrosoftArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + token_refresh_extension_hours: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + twitter: Optional[pulumi.Input['WindowsWebAppAuthSettingsTwitterArgs']] = None, + unauthenticated_client_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -31978,13 +42219,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppAuthSettingsActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -32050,13 +42318,40 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + WindowsWebAppAuthSettingsFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -32120,13 +42415,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppAuthSettingsGithubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -32190,13 +42512,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppAuthSettingsGoogleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -32260,13 +42609,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, "wl.basic" is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppAuthSettingsMicrosoftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -32328,11 +42704,34 @@ def __init__(__self__, *, :param pulumi.Input[str] consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param pulumi.Input[str] consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + WindowsWebAppAuthSettingsTwitterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -32426,49 +42825,146 @@ def __init__(__self__, *, :param pulumi.Input['WindowsWebAppAuthSettingsV2TwitterV2Args'] twitter_v2: A `twitter_v2` block as defined below. :param pulumi.Input[str] unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + WindowsWebAppAuthSettingsV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input['WindowsWebAppAuthSettingsV2LoginArgs']] = None, + active_directory_v2: Optional[pulumi.Input['WindowsWebAppAuthSettingsV2ActiveDirectoryV2Args']] = None, + apple_v2: Optional[pulumi.Input['WindowsWebAppAuthSettingsV2AppleV2Args']] = None, + auth_enabled: Optional[pulumi.Input[bool]] = None, + azure_static_web_app_v2: Optional[pulumi.Input['WindowsWebAppAuthSettingsV2AzureStaticWebAppV2Args']] = None, + config_file_path: Optional[pulumi.Input[str]] = None, + custom_oidc_v2s: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppAuthSettingsV2CustomOidcV2Args']]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + excluded_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + facebook_v2: Optional[pulumi.Input['WindowsWebAppAuthSettingsV2FacebookV2Args']] = None, + forward_proxy_convention: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_host_header_name: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_scheme_header_name: Optional[pulumi.Input[str]] = None, + github_v2: Optional[pulumi.Input['WindowsWebAppAuthSettingsV2GithubV2Args']] = None, + google_v2: Optional[pulumi.Input['WindowsWebAppAuthSettingsV2GoogleV2Args']] = None, + http_route_api_prefix: Optional[pulumi.Input[str]] = None, + microsoft_v2: Optional[pulumi.Input['WindowsWebAppAuthSettingsV2MicrosoftV2Args']] = None, + require_authentication: Optional[pulumi.Input[bool]] = None, + require_https: Optional[pulumi.Input[bool]] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + twitter_v2: Optional[pulumi.Input['WindowsWebAppAuthSettingsV2TwitterV2Args']] = None, + unauthenticated_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -32774,28 +43270,89 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param pulumi.Input[bool] www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + WindowsWebAppAuthSettingsV2ActiveDirectoryV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + tenant_auth_endpoint: Optional[pulumi.Input[str]] = None, + allowed_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret_certificate_thumbprint: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + jwt_allowed_client_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + jwt_allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + www_authentication_disabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -32957,10 +43514,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppAuthSettingsV2AppleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -33006,7 +43588,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppAuthSettingsV2AzureStaticWebAppV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -33048,25 +43645,80 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: The list of the scopes that should be requested while authenticating. :param pulumi.Input[str] token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + WindowsWebAppAuthSettingsV2CustomOidcV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + openid_configuration_endpoint: Optional[pulumi.Input[str]] = None, + authorisation_endpoint: Optional[pulumi.Input[str]] = None, + certification_uri: Optional[pulumi.Input[str]] = None, + client_credential_method: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + issuer_endpoint: Optional[pulumi.Input[str]] = None, + name_claim_type: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + token_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -33216,12 +43868,41 @@ def __init__(__self__, *, :param pulumi.Input[str] graph_api_version: The version of the Facebook API to be used while logging in. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + WindowsWebAppAuthSettingsV2FacebookV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + graph_api_version: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -33285,10 +43966,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppAuthSettingsV2GithubV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -33342,12 +44048,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppAuthSettingsV2GoogleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -33429,28 +44164,81 @@ def __init__(__self__, *, :param pulumi.Input[str] token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param pulumi.Input[bool] validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + WindowsWebAppAuthSettingsV2LoginArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cookie_expiration_convention: Optional[pulumi.Input[str]] = None, + cookie_expiration_time: Optional[pulumi.Input[str]] = None, + logout_endpoint: Optional[pulumi.Input[str]] = None, + nonce_expiration_time: Optional[pulumi.Input[str]] = None, + preserve_url_fragments_for_logins: Optional[pulumi.Input[bool]] = None, + token_refresh_extension_time: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + token_store_path: Optional[pulumi.Input[str]] = None, + token_store_sas_setting_name: Optional[pulumi.Input[str]] = None, + validate_nonce: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -33602,12 +44390,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppAuthSettingsV2MicrosoftV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -33671,8 +44488,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + WindowsWebAppAuthSettingsV2TwitterV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -33714,11 +44552,36 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_url: The SAS URL to the container. :param pulumi.Input[bool] enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + WindowsWebAppBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['WindowsWebAppBackupScheduleArgs']] = None, + storage_account_url: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -33787,16 +44650,53 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param pulumi.Input[str] start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + WindowsWebAppBackupScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[pulumi.Input[int]] = None, + frequency_unit: Optional[pulumi.Input[str]] = None, + keep_at_least_one_backup: Optional[pulumi.Input[bool]] = None, + last_execution_time: Optional[pulumi.Input[str]] = None, + retention_period_days: Optional[pulumi.Input[int]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -33881,9 +44781,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Type of database. Possible values include: `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param pulumi.Input[str] value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + WindowsWebAppConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -33937,13 +44858,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WindowsWebAppIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -34009,14 +44955,39 @@ def __init__(__self__, *, :param pulumi.Input[bool] failed_request_tracing: Should tracing be enabled for failed requests. :param pulumi.Input['WindowsWebAppLogsHttpLogsArgs'] http_logs: A `http_logs` block as defined above. """ + WindowsWebAppLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages=detailed_error_messages, + failed_request_tracing=failed_request_tracing, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional[pulumi.Input['WindowsWebAppLogsApplicationLogsArgs']] = None, + detailed_error_messages: Optional[pulumi.Input[bool]] = None, + failed_request_tracing: Optional[pulumi.Input[bool]] = None, + http_logs: Optional[pulumi.Input['WindowsWebAppLogsHttpLogsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if detailed_error_messages is None and 'detailedErrorMessages' in kwargs: + detailed_error_messages = kwargs['detailedErrorMessages'] + if failed_request_tracing is None and 'failedRequestTracing' in kwargs: + failed_request_tracing = kwargs['failedRequestTracing'] + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if application_logs is not None: - pulumi.set(__self__, "application_logs", application_logs) + _setter("application_logs", application_logs) if detailed_error_messages is not None: - pulumi.set(__self__, "detailed_error_messages", detailed_error_messages) + _setter("detailed_error_messages", detailed_error_messages) if failed_request_tracing is not None: - pulumi.set(__self__, "failed_request_tracing", failed_request_tracing) + _setter("failed_request_tracing", failed_request_tracing) if http_logs is not None: - pulumi.set(__self__, "http_logs", http_logs) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -34076,9 +45047,28 @@ def __init__(__self__, *, :param pulumi.Input[str] file_system_level: Log level. Possible values include: `Verbose`, `Information`, `Warning`, and `Error`. :param pulumi.Input['WindowsWebAppLogsApplicationLogsAzureBlobStorageArgs'] azure_blob_storage: An `azure_blob_storage` block as defined below. """ - pulumi.set(__self__, "file_system_level", file_system_level) + WindowsWebAppLogsApplicationLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_system_level=file_system_level, + azure_blob_storage=azure_blob_storage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_system_level: Optional[pulumi.Input[str]] = None, + azure_blob_storage: Optional[pulumi.Input['WindowsWebAppLogsApplicationLogsAzureBlobStorageArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if file_system_level is None: + raise TypeError("Missing 'file_system_level' argument") + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + + _setter("file_system_level", file_system_level) if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) @property @pulumi.getter(name="fileSystemLevel") @@ -34116,9 +45106,34 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. :param pulumi.Input[str] sas_url: SAS url to an Azure blob container with read/write/list/delete permissions. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + WindowsWebAppLogsApplicationLogsAzureBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[pulumi.Input[str]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + sas_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -34166,10 +45181,27 @@ def __init__(__self__, *, :param pulumi.Input['WindowsWebAppLogsHttpLogsAzureBlobStorageArgs'] azure_blob_storage: A `azure_blob_storage_http` block as defined above. :param pulumi.Input['WindowsWebAppLogsHttpLogsFileSystemArgs'] file_system: A `file_system` block as defined above. """ + WindowsWebAppLogsHttpLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system=file_system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional[pulumi.Input['WindowsWebAppLogsHttpLogsAzureBlobStorageArgs']] = None, + file_system: Optional[pulumi.Input['WindowsWebAppLogsHttpLogsFileSystemArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) @property @pulumi.getter(name="azureBlobStorage") @@ -34205,9 +45237,28 @@ def __init__(__self__, *, :param pulumi.Input[str] sas_url: SAS url to an Azure blob container with read/write/list/delete permissions. :param pulumi.Input[int] retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. """ - pulumi.set(__self__, "sas_url", sas_url) + WindowsWebAppLogsHttpLogsAzureBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + sas_url=sas_url, + retention_in_days=retention_in_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sas_url: Optional[pulumi.Input[str]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + + _setter("sas_url", sas_url) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) @property @pulumi.getter(name="sasUrl") @@ -34243,8 +45294,29 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The retention period in days. A values of `0` means no retention. :param pulumi.Input[int] retention_in_mb: The maximum size in megabytes that log files can use. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + WindowsWebAppLogsHttpLogsFileSystemArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[pulumi.Input[int]] = None, + retention_in_mb: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -34341,74 +45413,217 @@ def __init__(__self__, *, :param pulumi.Input[bool] websockets_enabled: Should Web Sockets be enabled. Defaults to `false`. :param pulumi.Input[int] worker_count: The number of Workers for this Windows App Service. """ + WindowsWebAppSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + application_stack=application_stack, + auto_heal_enabled=auto_heal_enabled, + auto_heal_setting=auto_heal_setting, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + load_balancing_mode=load_balancing_mode, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + virtual_applications=virtual_applications, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[pulumi.Input[bool]] = None, + api_definition_url: Optional[pulumi.Input[str]] = None, + api_management_api_id: Optional[pulumi.Input[str]] = None, + app_command_line: Optional[pulumi.Input[str]] = None, + application_stack: Optional[pulumi.Input['WindowsWebAppSiteConfigApplicationStackArgs']] = None, + auto_heal_enabled: Optional[pulumi.Input[bool]] = None, + auto_heal_setting: Optional[pulumi.Input['WindowsWebAppSiteConfigAutoHealSettingArgs']] = None, + container_registry_managed_identity_client_id: Optional[pulumi.Input[str]] = None, + container_registry_use_managed_identity: Optional[pulumi.Input[bool]] = None, + cors: Optional[pulumi.Input['WindowsWebAppSiteConfigCorsArgs']] = None, + default_documents: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + detailed_error_logging_enabled: Optional[pulumi.Input[bool]] = None, + ftps_state: Optional[pulumi.Input[str]] = None, + health_check_eviction_time_in_min: Optional[pulumi.Input[int]] = None, + health_check_path: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSiteConfigIpRestrictionArgs']]]] = None, + linux_fx_version: Optional[pulumi.Input[str]] = None, + load_balancing_mode: Optional[pulumi.Input[str]] = None, + local_mysql_enabled: Optional[pulumi.Input[bool]] = None, + managed_pipeline_mode: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + remote_debugging_enabled: Optional[pulumi.Input[bool]] = None, + remote_debugging_version: Optional[pulumi.Input[str]] = None, + scm_ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSiteConfigScmIpRestrictionArgs']]]] = None, + scm_minimum_tls_version: Optional[pulumi.Input[str]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + scm_use_main_ip_restriction: Optional[pulumi.Input[bool]] = None, + use32_bit_worker: Optional[pulumi.Input[bool]] = None, + virtual_applications: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSiteConfigVirtualApplicationArgs']]]] = None, + vnet_route_all_enabled: Optional[pulumi.Input[bool]] = None, + websockets_enabled: Optional[pulumi.Input[bool]] = None, + windows_fx_version: Optional[pulumi.Input[str]] = None, + worker_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if auto_heal_enabled is None and 'autoHealEnabled' in kwargs: + auto_heal_enabled = kwargs['autoHealEnabled'] + if auto_heal_setting is None and 'autoHealSetting' in kwargs: + auto_heal_setting = kwargs['autoHealSetting'] + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if virtual_applications is None and 'virtualApplications' in kwargs: + virtual_applications = kwargs['virtualApplications'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if auto_heal_enabled is not None: - pulumi.set(__self__, "auto_heal_enabled", auto_heal_enabled) + _setter("auto_heal_enabled", auto_heal_enabled) if auto_heal_setting is not None: - pulumi.set(__self__, "auto_heal_setting", auto_heal_setting) + _setter("auto_heal_setting", auto_heal_setting) if container_registry_managed_identity_client_id is not None: - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) if container_registry_use_managed_identity is not None: - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if local_mysql_enabled is not None: - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) + _setter("local_mysql_enabled", local_mysql_enabled) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if virtual_applications is not None: - pulumi.set(__self__, "virtual_applications", virtual_applications) + _setter("virtual_applications", virtual_applications) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if windows_fx_version is not None: - pulumi.set(__self__, "windows_fx_version", windows_fx_version) + _setter("windows_fx_version", windows_fx_version) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -34863,56 +46078,139 @@ def __init__(__self__, *, > **NOTE:** See the official documentation for current supported versions. Some example valuess include: `10.0`, `10.0.20`. """ + WindowsWebAppSiteConfigApplicationStackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + current_stack=current_stack, + docker_container_name=docker_container_name, + docker_container_registry=docker_container_registry, + docker_container_tag=docker_container_tag, + docker_image_name=docker_image_name, + docker_registry_password=docker_registry_password, + docker_registry_url=docker_registry_url, + docker_registry_username=docker_registry_username, + dotnet_core_version=dotnet_core_version, + dotnet_version=dotnet_version, + java_container=java_container, + java_container_version=java_container_version, + java_embedded_server_enabled=java_embedded_server_enabled, + java_version=java_version, + node_version=node_version, + php_version=php_version, + python=python, + python_version=python_version, + tomcat_version=tomcat_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + current_stack: Optional[pulumi.Input[str]] = None, + docker_container_name: Optional[pulumi.Input[str]] = None, + docker_container_registry: Optional[pulumi.Input[str]] = None, + docker_container_tag: Optional[pulumi.Input[str]] = None, + docker_image_name: Optional[pulumi.Input[str]] = None, + docker_registry_password: Optional[pulumi.Input[str]] = None, + docker_registry_url: Optional[pulumi.Input[str]] = None, + docker_registry_username: Optional[pulumi.Input[str]] = None, + dotnet_core_version: Optional[pulumi.Input[str]] = None, + dotnet_version: Optional[pulumi.Input[str]] = None, + java_container: Optional[pulumi.Input[str]] = None, + java_container_version: Optional[pulumi.Input[str]] = None, + java_embedded_server_enabled: Optional[pulumi.Input[bool]] = None, + java_version: Optional[pulumi.Input[str]] = None, + node_version: Optional[pulumi.Input[str]] = None, + php_version: Optional[pulumi.Input[str]] = None, + python: Optional[pulumi.Input[bool]] = None, + python_version: Optional[pulumi.Input[str]] = None, + tomcat_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if current_stack is None and 'currentStack' in kwargs: + current_stack = kwargs['currentStack'] + if docker_container_name is None and 'dockerContainerName' in kwargs: + docker_container_name = kwargs['dockerContainerName'] + if docker_container_registry is None and 'dockerContainerRegistry' in kwargs: + docker_container_registry = kwargs['dockerContainerRegistry'] + if docker_container_tag is None and 'dockerContainerTag' in kwargs: + docker_container_tag = kwargs['dockerContainerTag'] + if docker_image_name is None and 'dockerImageName' in kwargs: + docker_image_name = kwargs['dockerImageName'] + if docker_registry_password is None and 'dockerRegistryPassword' in kwargs: + docker_registry_password = kwargs['dockerRegistryPassword'] + if docker_registry_url is None and 'dockerRegistryUrl' in kwargs: + docker_registry_url = kwargs['dockerRegistryUrl'] + if docker_registry_username is None and 'dockerRegistryUsername' in kwargs: + docker_registry_username = kwargs['dockerRegistryUsername'] + if dotnet_core_version is None and 'dotnetCoreVersion' in kwargs: + dotnet_core_version = kwargs['dotnetCoreVersion'] + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if java_container is None and 'javaContainer' in kwargs: + java_container = kwargs['javaContainer'] + if java_container_version is None and 'javaContainerVersion' in kwargs: + java_container_version = kwargs['javaContainerVersion'] + if java_embedded_server_enabled is None and 'javaEmbeddedServerEnabled' in kwargs: + java_embedded_server_enabled = kwargs['javaEmbeddedServerEnabled'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if tomcat_version is None and 'tomcatVersion' in kwargs: + tomcat_version = kwargs['tomcatVersion'] + if current_stack is not None: - pulumi.set(__self__, "current_stack", current_stack) + _setter("current_stack", current_stack) if docker_container_name is not None: - pulumi.set(__self__, "docker_container_name", docker_container_name) + _setter("docker_container_name", docker_container_name) if docker_container_registry is not None: warnings.warn("""This property has been deprecated and will be removed in a future release of the provider.""", DeprecationWarning) pulumi.log.warn("""docker_container_registry is deprecated: This property has been deprecated and will be removed in a future release of the provider.""") if docker_container_registry is not None: - pulumi.set(__self__, "docker_container_registry", docker_container_registry) + _setter("docker_container_registry", docker_container_registry) if docker_container_tag is not None: - pulumi.set(__self__, "docker_container_tag", docker_container_tag) + _setter("docker_container_tag", docker_container_tag) if docker_image_name is not None: - pulumi.set(__self__, "docker_image_name", docker_image_name) + _setter("docker_image_name", docker_image_name) if docker_registry_password is not None: - pulumi.set(__self__, "docker_registry_password", docker_registry_password) + _setter("docker_registry_password", docker_registry_password) if docker_registry_url is not None: - pulumi.set(__self__, "docker_registry_url", docker_registry_url) + _setter("docker_registry_url", docker_registry_url) if docker_registry_username is not None: - pulumi.set(__self__, "docker_registry_username", docker_registry_username) + _setter("docker_registry_username", docker_registry_username) if dotnet_core_version is not None: - pulumi.set(__self__, "dotnet_core_version", dotnet_core_version) + _setter("dotnet_core_version", dotnet_core_version) if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if java_container is not None: warnings.warn("""this property has been deprecated in favour of `tomcat_version` and `java_embedded_server_enabled`""", DeprecationWarning) pulumi.log.warn("""java_container is deprecated: this property has been deprecated in favour of `tomcat_version` and `java_embedded_server_enabled`""") if java_container is not None: - pulumi.set(__self__, "java_container", java_container) + _setter("java_container", java_container) if java_container_version is not None: warnings.warn("""This property has been deprecated in favour of `tomcat_version` and `java_embedded_server_enabled`""", DeprecationWarning) pulumi.log.warn("""java_container_version is deprecated: This property has been deprecated in favour of `tomcat_version` and `java_embedded_server_enabled`""") if java_container_version is not None: - pulumi.set(__self__, "java_container_version", java_container_version) + _setter("java_container_version", java_container_version) if java_embedded_server_enabled is not None: - pulumi.set(__self__, "java_embedded_server_enabled", java_embedded_server_enabled) + _setter("java_embedded_server_enabled", java_embedded_server_enabled) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if php_version is not None: - pulumi.set(__self__, "php_version", php_version) + _setter("php_version", php_version) if python is not None: - pulumi.set(__self__, "python", python) + _setter("python", python) if python_version is not None: warnings.warn("""This property is deprecated. Values set are not used by the service.""", DeprecationWarning) pulumi.log.warn("""python_version is deprecated: This property is deprecated. Values set are not used by the service.""") if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if tomcat_version is not None: - pulumi.set(__self__, "tomcat_version", tomcat_version) + _setter("tomcat_version", tomcat_version) @property @pulumi.getter(name="currentStack") @@ -35166,8 +46464,25 @@ def __init__(__self__, *, :param pulumi.Input['WindowsWebAppSiteConfigAutoHealSettingActionArgs'] action: An `action` block as defined above. :param pulumi.Input['WindowsWebAppSiteConfigAutoHealSettingTriggerArgs'] trigger: A `trigger` block as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "trigger", trigger) + WindowsWebAppSiteConfigAutoHealSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + trigger=trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input['WindowsWebAppSiteConfigAutoHealSettingActionArgs']] = None, + trigger: Optional[pulumi.Input['WindowsWebAppSiteConfigAutoHealSettingTriggerArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if trigger is None: + raise TypeError("Missing 'trigger' argument") + + _setter("action", action) + _setter("trigger", trigger) @property @pulumi.getter @@ -35205,11 +46520,34 @@ def __init__(__self__, *, :param pulumi.Input['WindowsWebAppSiteConfigAutoHealSettingActionCustomActionArgs'] custom_action: A `custom_action` block as defined below. :param pulumi.Input[str] minimum_process_execution_time: The minimum amount of time in `hh:mm:ss` the Windows Web App must have been running before the defined action will be run in the event of a trigger. """ - pulumi.set(__self__, "action_type", action_type) + WindowsWebAppSiteConfigAutoHealSettingActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + custom_action=custom_action, + minimum_process_execution_time=minimum_process_execution_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[pulumi.Input[str]] = None, + custom_action: Optional[pulumi.Input['WindowsWebAppSiteConfigAutoHealSettingActionCustomActionArgs']] = None, + minimum_process_execution_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + if custom_action is None and 'customAction' in kwargs: + custom_action = kwargs['customAction'] + if minimum_process_execution_time is None and 'minimumProcessExecutionTime' in kwargs: + minimum_process_execution_time = kwargs['minimumProcessExecutionTime'] + + _setter("action_type", action_type) if custom_action is not None: - pulumi.set(__self__, "custom_action", custom_action) + _setter("custom_action", custom_action) if minimum_process_execution_time is not None: - pulumi.set(__self__, "minimum_process_execution_time", minimum_process_execution_time) + _setter("minimum_process_execution_time", minimum_process_execution_time) @property @pulumi.getter(name="actionType") @@ -35257,9 +46595,24 @@ def __init__(__self__, *, :param pulumi.Input[str] executable: The executable to run for the `custom_action`. :param pulumi.Input[str] parameters: The parameters to pass to the specified `executable`. """ - pulumi.set(__self__, "executable", executable) + WindowsWebAppSiteConfigAutoHealSettingActionCustomActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + executable=executable, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + executable: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if executable is None: + raise TypeError("Missing 'executable' argument") + + _setter("executable", executable) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -35299,14 +46652,37 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSiteConfigAutoHealSettingTriggerSlowRequestArgs']]] slow_requests: One or more `slow_request` blocks as defined above. :param pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSiteConfigAutoHealSettingTriggerStatusCodeArgs']]] status_codes: One or more `status_code` blocks as defined above. """ + WindowsWebAppSiteConfigAutoHealSettingTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_memory_kb=private_memory_kb, + requests=requests, + slow_requests=slow_requests, + status_codes=status_codes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_memory_kb: Optional[pulumi.Input[int]] = None, + requests: Optional[pulumi.Input['WindowsWebAppSiteConfigAutoHealSettingTriggerRequestsArgs']] = None, + slow_requests: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSiteConfigAutoHealSettingTriggerSlowRequestArgs']]]] = None, + status_codes: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSiteConfigAutoHealSettingTriggerStatusCodeArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_memory_kb is None and 'privateMemoryKb' in kwargs: + private_memory_kb = kwargs['privateMemoryKb'] + if slow_requests is None and 'slowRequests' in kwargs: + slow_requests = kwargs['slowRequests'] + if status_codes is None and 'statusCodes' in kwargs: + status_codes = kwargs['statusCodes'] + if private_memory_kb is not None: - pulumi.set(__self__, "private_memory_kb", private_memory_kb) + _setter("private_memory_kb", private_memory_kb) if requests is not None: - pulumi.set(__self__, "requests", requests) + _setter("requests", requests) if slow_requests is not None: - pulumi.set(__self__, "slow_requests", slow_requests) + _setter("slow_requests", slow_requests) if status_codes is not None: - pulumi.set(__self__, "status_codes", status_codes) + _setter("status_codes", status_codes) @property @pulumi.getter(name="privateMemoryKb") @@ -35366,8 +46742,25 @@ def __init__(__self__, *, :param pulumi.Input[int] count: The number of requests in the specified `interval` to trigger this rule. :param pulumi.Input[str] interval: The interval in `hh:mm:ss`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) + WindowsWebAppSiteConfigAutoHealSettingTriggerRequestsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + interval: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + + _setter("count", count) + _setter("interval", interval) @property @pulumi.getter @@ -35407,11 +46800,36 @@ def __init__(__self__, *, :param pulumi.Input[str] time_taken: The threshold of time passed to qualify as a Slow Request in `hh:mm:ss`. :param pulumi.Input[str] path: The path for which this slow request rule applies. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "time_taken", time_taken) + WindowsWebAppSiteConfigAutoHealSettingTriggerSlowRequestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + time_taken=time_taken, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + interval: Optional[pulumi.Input[str]] = None, + time_taken: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if time_taken is None and 'timeTaken' in kwargs: + time_taken = kwargs['timeTaken'] + if time_taken is None: + raise TypeError("Missing 'time_taken' argument") + + _setter("count", count) + _setter("interval", interval) + _setter("time_taken", time_taken) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -35479,15 +46897,48 @@ def __init__(__self__, *, :param pulumi.Input[int] sub_status: The Request Sub Status of the Status Code. :param pulumi.Input[int] win32_status_code: The Win32 Status Code of the Request. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "status_code_range", status_code_range) + WindowsWebAppSiteConfigAutoHealSettingTriggerStatusCodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + status_code_range=status_code_range, + path=path, + sub_status=sub_status, + win32_status_code=win32_status_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + interval: Optional[pulumi.Input[str]] = None, + status_code_range: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + sub_status: Optional[pulumi.Input[int]] = None, + win32_status_code: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if status_code_range is None and 'statusCodeRange' in kwargs: + status_code_range = kwargs['statusCodeRange'] + if status_code_range is None: + raise TypeError("Missing 'status_code_range' argument") + if sub_status is None and 'subStatus' in kwargs: + sub_status = kwargs['subStatus'] + if win32_status_code is None and 'win32StatusCode' in kwargs: + win32_status_code = kwargs['win32StatusCode'] + + _setter("count", count) + _setter("interval", interval) + _setter("status_code_range", status_code_range) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if sub_status is not None: - pulumi.set(__self__, "sub_status", sub_status) + _setter("sub_status", sub_status) if win32_status_code is not None: - pulumi.set(__self__, "win32_status_code", win32_status_code) + _setter("win32_status_code", win32_status_code) @property @pulumi.getter @@ -35571,10 +47022,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: Specifies a list of origins that should be allowed to make cross-origin calls. :param pulumi.Input[bool] support_credentials: Whether CORS requests with credentials are allowed. Defaults to `false` """ + WindowsWebAppSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + support_credentials: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -35622,20 +47090,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsWebAppSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['WindowsWebAppSiteConfigIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -35737,14 +47234,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsWebAppSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -35816,20 +47338,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsWebAppSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['WindowsWebAppSiteConfigScmIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -35931,14 +47482,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsWebAppSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -36002,11 +47578,40 @@ def __init__(__self__, *, :param pulumi.Input[str] virtual_path: The Virtual Path for the Virtual Application. :param pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSiteConfigVirtualApplicationVirtualDirectoryArgs']]] virtual_directories: One or more `virtual_directory` blocks as defined below. """ - pulumi.set(__self__, "physical_path", physical_path) - pulumi.set(__self__, "preload", preload) - pulumi.set(__self__, "virtual_path", virtual_path) + WindowsWebAppSiteConfigVirtualApplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + physical_path=physical_path, + preload=preload, + virtual_path=virtual_path, + virtual_directories=virtual_directories, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + physical_path: Optional[pulumi.Input[str]] = None, + preload: Optional[pulumi.Input[bool]] = None, + virtual_path: Optional[pulumi.Input[str]] = None, + virtual_directories: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSiteConfigVirtualApplicationVirtualDirectoryArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if physical_path is None and 'physicalPath' in kwargs: + physical_path = kwargs['physicalPath'] + if physical_path is None: + raise TypeError("Missing 'physical_path' argument") + if preload is None: + raise TypeError("Missing 'preload' argument") + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if virtual_path is None: + raise TypeError("Missing 'virtual_path' argument") + if virtual_directories is None and 'virtualDirectories' in kwargs: + virtual_directories = kwargs['virtualDirectories'] + + _setter("physical_path", physical_path) + _setter("preload", preload) + _setter("virtual_path", virtual_path) if virtual_directories is not None: - pulumi.set(__self__, "virtual_directories", virtual_directories) + _setter("virtual_directories", virtual_directories) @property @pulumi.getter(name="physicalPath") @@ -36066,10 +47671,27 @@ def __init__(__self__, *, :param pulumi.Input[str] physical_path: The physical path for the Virtual Application. :param pulumi.Input[str] virtual_path: The Virtual Path for the Virtual Application. """ + WindowsWebAppSiteConfigVirtualApplicationVirtualDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + physical_path=physical_path, + virtual_path=virtual_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + physical_path: Optional[pulumi.Input[str]] = None, + virtual_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if physical_path is None and 'physicalPath' in kwargs: + physical_path = kwargs['physicalPath'] + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if physical_path is not None: - pulumi.set(__self__, "physical_path", physical_path) + _setter("physical_path", physical_path) if virtual_path is not None: - pulumi.set(__self__, "virtual_path", virtual_path) + _setter("virtual_path", virtual_path) @property @pulumi.getter(name="physicalPath") @@ -36105,10 +47727,23 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Windows Web App. Changing this forces a new Windows Web App to be created. :param pulumi.Input[str] password: The Site Credentials Password used for publishing. """ + WindowsWebAppSiteCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -36174,35 +47809,92 @@ def __init__(__self__, *, :param pulumi.Input['WindowsWebAppSlotAuthSettingsTwitterArgs'] twitter: A `twitter` block as defined below. :param pulumi.Input[str] unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + WindowsWebAppSlotAuthSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + active_directory: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsActiveDirectoryArgs']] = None, + additional_login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + facebook: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsFacebookArgs']] = None, + github: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsGithubArgs']] = None, + google: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsGoogleArgs']] = None, + issuer: Optional[pulumi.Input[str]] = None, + microsoft: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsMicrosoftArgs']] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + token_refresh_extension_hours: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + twitter: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsTwitterArgs']] = None, + unauthenticated_client_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -36404,13 +48096,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppSlotAuthSettingsActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -36476,13 +48195,40 @@ def __init__(__self__, *, :param pulumi.Input[str] app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + WindowsWebAppSlotAuthSettingsFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -36546,13 +48292,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppSlotAuthSettingsGithubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -36616,13 +48389,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppSlotAuthSettingsGoogleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -36686,13 +48486,40 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, "wl.basic" is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppSlotAuthSettingsMicrosoftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + oauth_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -36754,11 +48581,34 @@ def __init__(__self__, *, :param pulumi.Input[str] consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param pulumi.Input[str] consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + WindowsWebAppSlotAuthSettingsTwitterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -36852,49 +48702,146 @@ def __init__(__self__, *, :param pulumi.Input['WindowsWebAppSlotAuthSettingsV2TwitterV2Args'] twitter_v2: A `twitter_v2` block as defined below. :param pulumi.Input[str] unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + WindowsWebAppSlotAuthSettingsV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsV2LoginArgs']] = None, + active_directory_v2: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsV2ActiveDirectoryV2Args']] = None, + apple_v2: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsV2AppleV2Args']] = None, + auth_enabled: Optional[pulumi.Input[bool]] = None, + azure_static_web_app_v2: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsV2AzureStaticWebAppV2Args']] = None, + config_file_path: Optional[pulumi.Input[str]] = None, + custom_oidc_v2s: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotAuthSettingsV2CustomOidcV2Args']]]] = None, + default_provider: Optional[pulumi.Input[str]] = None, + excluded_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + facebook_v2: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsV2FacebookV2Args']] = None, + forward_proxy_convention: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_host_header_name: Optional[pulumi.Input[str]] = None, + forward_proxy_custom_scheme_header_name: Optional[pulumi.Input[str]] = None, + github_v2: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsV2GithubV2Args']] = None, + google_v2: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsV2GoogleV2Args']] = None, + http_route_api_prefix: Optional[pulumi.Input[str]] = None, + microsoft_v2: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsV2MicrosoftV2Args']] = None, + require_authentication: Optional[pulumi.Input[bool]] = None, + require_https: Optional[pulumi.Input[bool]] = None, + runtime_version: Optional[pulumi.Input[str]] = None, + twitter_v2: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsV2TwitterV2Args']] = None, + unauthenticated_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -37200,28 +49147,89 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param pulumi.Input[bool] www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + WindowsWebAppSlotAuthSettingsV2ActiveDirectoryV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + tenant_auth_endpoint: Optional[pulumi.Input[str]] = None, + allowed_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_secret_certificate_thumbprint: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + jwt_allowed_client_applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + jwt_allowed_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + www_authentication_disabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -37383,10 +49391,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppSlotAuthSettingsV2AppleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -37432,7 +49465,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppSlotAuthSettingsV2AzureStaticWebAppV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -37473,25 +49521,80 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: The list of the scopes that should be requested while authenticating. :param pulumi.Input[str] token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + WindowsWebAppSlotAuthSettingsV2CustomOidcV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + openid_configuration_endpoint: Optional[pulumi.Input[str]] = None, + authorisation_endpoint: Optional[pulumi.Input[str]] = None, + certification_uri: Optional[pulumi.Input[str]] = None, + client_credential_method: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + issuer_endpoint: Optional[pulumi.Input[str]] = None, + name_claim_type: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + token_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -37638,12 +49741,41 @@ def __init__(__self__, *, :param pulumi.Input[str] graph_api_version: The version of the Facebook API to be used while logging in. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + WindowsWebAppSlotAuthSettingsV2FacebookV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_secret_setting_name: Optional[pulumi.Input[str]] = None, + graph_api_version: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -37707,10 +49839,35 @@ def __init__(__self__, *, :param pulumi.Input[str] client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppSlotAuthSettingsV2GithubV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -37764,12 +49921,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience, so should not be included. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppSlotAuthSettingsV2GoogleV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -37851,28 +50037,81 @@ def __init__(__self__, *, :param pulumi.Input[str] token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param pulumi.Input[bool] validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + WindowsWebAppSlotAuthSettingsV2LoginArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cookie_expiration_convention: Optional[pulumi.Input[str]] = None, + cookie_expiration_time: Optional[pulumi.Input[str]] = None, + logout_endpoint: Optional[pulumi.Input[str]] = None, + nonce_expiration_time: Optional[pulumi.Input[str]] = None, + preserve_url_fragments_for_logins: Optional[pulumi.Input[bool]] = None, + token_refresh_extension_time: Optional[pulumi.Input[float]] = None, + token_store_enabled: Optional[pulumi.Input[bool]] = None, + token_store_path: Optional[pulumi.Input[str]] = None, + token_store_sas_setting_name: Optional[pulumi.Input[str]] = None, + validate_nonce: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -38024,12 +50263,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience, so should not be included. :param pulumi.Input[Sequence[pulumi.Input[str]]] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppSlotAuthSettingsV2MicrosoftV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret_setting_name: Optional[pulumi.Input[str]] = None, + allowed_audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + login_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -38093,8 +50361,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + WindowsWebAppSlotAuthSettingsV2TwitterV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[pulumi.Input[str]] = None, + consumer_secret_setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -38136,11 +50425,36 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_url: The SAS URL to the container. :param pulumi.Input[bool] enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + WindowsWebAppSlotBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['WindowsWebAppSlotBackupScheduleArgs']] = None, + storage_account_url: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -38209,16 +50523,53 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param pulumi.Input[str] start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + WindowsWebAppSlotBackupScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[pulumi.Input[int]] = None, + frequency_unit: Optional[pulumi.Input[str]] = None, + keep_at_least_one_backup: Optional[pulumi.Input[bool]] = None, + last_execution_time: Optional[pulumi.Input[str]] = None, + retention_period_days: Optional[pulumi.Input[int]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -38303,9 +50654,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Type of database. Possible values include: `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param pulumi.Input[str] value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + WindowsWebAppSlotConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -38359,13 +50731,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WindowsWebAppSlotIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -38431,14 +50828,39 @@ def __init__(__self__, *, :param pulumi.Input[bool] failed_request_tracing: Should failed request tracing be enabled. :param pulumi.Input['WindowsWebAppSlotLogsHttpLogsArgs'] http_logs: An `http_logs` block as defined above. """ + WindowsWebAppSlotLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages=detailed_error_messages, + failed_request_tracing=failed_request_tracing, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional[pulumi.Input['WindowsWebAppSlotLogsApplicationLogsArgs']] = None, + detailed_error_messages: Optional[pulumi.Input[bool]] = None, + failed_request_tracing: Optional[pulumi.Input[bool]] = None, + http_logs: Optional[pulumi.Input['WindowsWebAppSlotLogsHttpLogsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if detailed_error_messages is None and 'detailedErrorMessages' in kwargs: + detailed_error_messages = kwargs['detailedErrorMessages'] + if failed_request_tracing is None and 'failedRequestTracing' in kwargs: + failed_request_tracing = kwargs['failedRequestTracing'] + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if application_logs is not None: - pulumi.set(__self__, "application_logs", application_logs) + _setter("application_logs", application_logs) if detailed_error_messages is not None: - pulumi.set(__self__, "detailed_error_messages", detailed_error_messages) + _setter("detailed_error_messages", detailed_error_messages) if failed_request_tracing is not None: - pulumi.set(__self__, "failed_request_tracing", failed_request_tracing) + _setter("failed_request_tracing", failed_request_tracing) if http_logs is not None: - pulumi.set(__self__, "http_logs", http_logs) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -38498,9 +50920,28 @@ def __init__(__self__, *, :param pulumi.Input[str] file_system_level: Log level. Possible values include: `Verbose`, `Information`, `Warning`, and `Error`. :param pulumi.Input['WindowsWebAppSlotLogsApplicationLogsAzureBlobStorageArgs'] azure_blob_storage: An `azure_blob_storage` block as defined below. """ - pulumi.set(__self__, "file_system_level", file_system_level) + WindowsWebAppSlotLogsApplicationLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_system_level=file_system_level, + azure_blob_storage=azure_blob_storage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_system_level: Optional[pulumi.Input[str]] = None, + azure_blob_storage: Optional[pulumi.Input['WindowsWebAppSlotLogsApplicationLogsAzureBlobStorageArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if file_system_level is None: + raise TypeError("Missing 'file_system_level' argument") + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + + _setter("file_system_level", file_system_level) if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) @property @pulumi.getter(name="fileSystemLevel") @@ -38538,9 +50979,34 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. :param pulumi.Input[str] sas_url: SAS url to an Azure blob container with read/write/list/delete permissions. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + WindowsWebAppSlotLogsApplicationLogsAzureBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[pulumi.Input[str]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + sas_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -38588,10 +51054,27 @@ def __init__(__self__, *, :param pulumi.Input['WindowsWebAppSlotLogsHttpLogsAzureBlobStorageArgs'] azure_blob_storage: A `azure_blob_storage_http` block as defined above. :param pulumi.Input['WindowsWebAppSlotLogsHttpLogsFileSystemArgs'] file_system: A `file_system` block as defined above. """ + WindowsWebAppSlotLogsHttpLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system=file_system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional[pulumi.Input['WindowsWebAppSlotLogsHttpLogsAzureBlobStorageArgs']] = None, + file_system: Optional[pulumi.Input['WindowsWebAppSlotLogsHttpLogsFileSystemArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) @property @pulumi.getter(name="azureBlobStorage") @@ -38627,9 +51110,28 @@ def __init__(__self__, *, :param pulumi.Input[str] sas_url: SAS url to an Azure blob container with read/write/list/delete permissions. :param pulumi.Input[int] retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. """ - pulumi.set(__self__, "sas_url", sas_url) + WindowsWebAppSlotLogsHttpLogsAzureBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + sas_url=sas_url, + retention_in_days=retention_in_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sas_url: Optional[pulumi.Input[str]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + + _setter("sas_url", sas_url) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) @property @pulumi.getter(name="sasUrl") @@ -38665,8 +51167,29 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_days: The retention period in days. A values of `0` means no retention. :param pulumi.Input[int] retention_in_mb: The maximum size in megabytes that log files can use. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + WindowsWebAppSlotLogsHttpLogsFileSystemArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[pulumi.Input[int]] = None, + retention_in_mb: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -38764,74 +51287,217 @@ def __init__(__self__, *, :param pulumi.Input[bool] websockets_enabled: Should Web Sockets be enabled. Defaults to `false`. :param pulumi.Input[int] worker_count: The number of Workers for this Windows App Service Slot. """ + WindowsWebAppSlotSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + application_stack=application_stack, + auto_heal_enabled=auto_heal_enabled, + auto_heal_setting=auto_heal_setting, + auto_swap_slot_name=auto_swap_slot_name, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + load_balancing_mode=load_balancing_mode, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + virtual_applications=virtual_applications, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[pulumi.Input[bool]] = None, + api_definition_url: Optional[pulumi.Input[str]] = None, + api_management_api_id: Optional[pulumi.Input[str]] = None, + app_command_line: Optional[pulumi.Input[str]] = None, + application_stack: Optional[pulumi.Input['WindowsWebAppSlotSiteConfigApplicationStackArgs']] = None, + auto_heal_enabled: Optional[pulumi.Input[bool]] = None, + auto_heal_setting: Optional[pulumi.Input['WindowsWebAppSlotSiteConfigAutoHealSettingArgs']] = None, + auto_swap_slot_name: Optional[pulumi.Input[str]] = None, + container_registry_managed_identity_client_id: Optional[pulumi.Input[str]] = None, + container_registry_use_managed_identity: Optional[pulumi.Input[bool]] = None, + cors: Optional[pulumi.Input['WindowsWebAppSlotSiteConfigCorsArgs']] = None, + default_documents: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + detailed_error_logging_enabled: Optional[pulumi.Input[bool]] = None, + ftps_state: Optional[pulumi.Input[str]] = None, + health_check_eviction_time_in_min: Optional[pulumi.Input[int]] = None, + health_check_path: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotSiteConfigIpRestrictionArgs']]]] = None, + load_balancing_mode: Optional[pulumi.Input[str]] = None, + local_mysql_enabled: Optional[pulumi.Input[bool]] = None, + managed_pipeline_mode: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + remote_debugging_enabled: Optional[pulumi.Input[bool]] = None, + remote_debugging_version: Optional[pulumi.Input[str]] = None, + scm_ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotSiteConfigScmIpRestrictionArgs']]]] = None, + scm_minimum_tls_version: Optional[pulumi.Input[str]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + scm_use_main_ip_restriction: Optional[pulumi.Input[bool]] = None, + use32_bit_worker: Optional[pulumi.Input[bool]] = None, + virtual_applications: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotSiteConfigVirtualApplicationArgs']]]] = None, + vnet_route_all_enabled: Optional[pulumi.Input[bool]] = None, + websockets_enabled: Optional[pulumi.Input[bool]] = None, + windows_fx_version: Optional[pulumi.Input[str]] = None, + worker_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if auto_heal_enabled is None and 'autoHealEnabled' in kwargs: + auto_heal_enabled = kwargs['autoHealEnabled'] + if auto_heal_setting is None and 'autoHealSetting' in kwargs: + auto_heal_setting = kwargs['autoHealSetting'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if virtual_applications is None and 'virtualApplications' in kwargs: + virtual_applications = kwargs['virtualApplications'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if auto_heal_enabled is not None: - pulumi.set(__self__, "auto_heal_enabled", auto_heal_enabled) + _setter("auto_heal_enabled", auto_heal_enabled) if auto_heal_setting is not None: - pulumi.set(__self__, "auto_heal_setting", auto_heal_setting) + _setter("auto_heal_setting", auto_heal_setting) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if container_registry_managed_identity_client_id is not None: - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) if container_registry_use_managed_identity is not None: - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if local_mysql_enabled is not None: - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) + _setter("local_mysql_enabled", local_mysql_enabled) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if virtual_applications is not None: - pulumi.set(__self__, "virtual_applications", virtual_applications) + _setter("virtual_applications", virtual_applications) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if windows_fx_version is not None: - pulumi.set(__self__, "windows_fx_version", windows_fx_version) + _setter("windows_fx_version", windows_fx_version) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -39281,56 +51947,139 @@ def __init__(__self__, *, > **NOTE:** See the official documentation for current supported versions. """ + WindowsWebAppSlotSiteConfigApplicationStackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + current_stack=current_stack, + docker_container_name=docker_container_name, + docker_container_registry=docker_container_registry, + docker_container_tag=docker_container_tag, + docker_image_name=docker_image_name, + docker_registry_password=docker_registry_password, + docker_registry_url=docker_registry_url, + docker_registry_username=docker_registry_username, + dotnet_core_version=dotnet_core_version, + dotnet_version=dotnet_version, + java_container=java_container, + java_container_version=java_container_version, + java_embedded_server_enabled=java_embedded_server_enabled, + java_version=java_version, + node_version=node_version, + php_version=php_version, + python=python, + python_version=python_version, + tomcat_version=tomcat_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + current_stack: Optional[pulumi.Input[str]] = None, + docker_container_name: Optional[pulumi.Input[str]] = None, + docker_container_registry: Optional[pulumi.Input[str]] = None, + docker_container_tag: Optional[pulumi.Input[str]] = None, + docker_image_name: Optional[pulumi.Input[str]] = None, + docker_registry_password: Optional[pulumi.Input[str]] = None, + docker_registry_url: Optional[pulumi.Input[str]] = None, + docker_registry_username: Optional[pulumi.Input[str]] = None, + dotnet_core_version: Optional[pulumi.Input[str]] = None, + dotnet_version: Optional[pulumi.Input[str]] = None, + java_container: Optional[pulumi.Input[str]] = None, + java_container_version: Optional[pulumi.Input[str]] = None, + java_embedded_server_enabled: Optional[pulumi.Input[bool]] = None, + java_version: Optional[pulumi.Input[str]] = None, + node_version: Optional[pulumi.Input[str]] = None, + php_version: Optional[pulumi.Input[str]] = None, + python: Optional[pulumi.Input[bool]] = None, + python_version: Optional[pulumi.Input[str]] = None, + tomcat_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if current_stack is None and 'currentStack' in kwargs: + current_stack = kwargs['currentStack'] + if docker_container_name is None and 'dockerContainerName' in kwargs: + docker_container_name = kwargs['dockerContainerName'] + if docker_container_registry is None and 'dockerContainerRegistry' in kwargs: + docker_container_registry = kwargs['dockerContainerRegistry'] + if docker_container_tag is None and 'dockerContainerTag' in kwargs: + docker_container_tag = kwargs['dockerContainerTag'] + if docker_image_name is None and 'dockerImageName' in kwargs: + docker_image_name = kwargs['dockerImageName'] + if docker_registry_password is None and 'dockerRegistryPassword' in kwargs: + docker_registry_password = kwargs['dockerRegistryPassword'] + if docker_registry_url is None and 'dockerRegistryUrl' in kwargs: + docker_registry_url = kwargs['dockerRegistryUrl'] + if docker_registry_username is None and 'dockerRegistryUsername' in kwargs: + docker_registry_username = kwargs['dockerRegistryUsername'] + if dotnet_core_version is None and 'dotnetCoreVersion' in kwargs: + dotnet_core_version = kwargs['dotnetCoreVersion'] + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if java_container is None and 'javaContainer' in kwargs: + java_container = kwargs['javaContainer'] + if java_container_version is None and 'javaContainerVersion' in kwargs: + java_container_version = kwargs['javaContainerVersion'] + if java_embedded_server_enabled is None and 'javaEmbeddedServerEnabled' in kwargs: + java_embedded_server_enabled = kwargs['javaEmbeddedServerEnabled'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if tomcat_version is None and 'tomcatVersion' in kwargs: + tomcat_version = kwargs['tomcatVersion'] + if current_stack is not None: - pulumi.set(__self__, "current_stack", current_stack) + _setter("current_stack", current_stack) if docker_container_name is not None: - pulumi.set(__self__, "docker_container_name", docker_container_name) + _setter("docker_container_name", docker_container_name) if docker_container_registry is not None: warnings.warn("""This property has been deprecated and will be removed in a future release of the provider.""", DeprecationWarning) pulumi.log.warn("""docker_container_registry is deprecated: This property has been deprecated and will be removed in a future release of the provider.""") if docker_container_registry is not None: - pulumi.set(__self__, "docker_container_registry", docker_container_registry) + _setter("docker_container_registry", docker_container_registry) if docker_container_tag is not None: - pulumi.set(__self__, "docker_container_tag", docker_container_tag) + _setter("docker_container_tag", docker_container_tag) if docker_image_name is not None: - pulumi.set(__self__, "docker_image_name", docker_image_name) + _setter("docker_image_name", docker_image_name) if docker_registry_password is not None: - pulumi.set(__self__, "docker_registry_password", docker_registry_password) + _setter("docker_registry_password", docker_registry_password) if docker_registry_url is not None: - pulumi.set(__self__, "docker_registry_url", docker_registry_url) + _setter("docker_registry_url", docker_registry_url) if docker_registry_username is not None: - pulumi.set(__self__, "docker_registry_username", docker_registry_username) + _setter("docker_registry_username", docker_registry_username) if dotnet_core_version is not None: - pulumi.set(__self__, "dotnet_core_version", dotnet_core_version) + _setter("dotnet_core_version", dotnet_core_version) if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if java_container is not None: warnings.warn("""this property has been deprecated in favour of `tomcat_version` and `java_embedded_server_enabled`""", DeprecationWarning) pulumi.log.warn("""java_container is deprecated: this property has been deprecated in favour of `tomcat_version` and `java_embedded_server_enabled`""") if java_container is not None: - pulumi.set(__self__, "java_container", java_container) + _setter("java_container", java_container) if java_container_version is not None: warnings.warn("""This property has been deprecated in favour of `tomcat_version` and `java_embedded_server_enabled`""", DeprecationWarning) pulumi.log.warn("""java_container_version is deprecated: This property has been deprecated in favour of `tomcat_version` and `java_embedded_server_enabled`""") if java_container_version is not None: - pulumi.set(__self__, "java_container_version", java_container_version) + _setter("java_container_version", java_container_version) if java_embedded_server_enabled is not None: - pulumi.set(__self__, "java_embedded_server_enabled", java_embedded_server_enabled) + _setter("java_embedded_server_enabled", java_embedded_server_enabled) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if php_version is not None: - pulumi.set(__self__, "php_version", php_version) + _setter("php_version", php_version) if python is not None: - pulumi.set(__self__, "python", python) + _setter("python", python) if python_version is not None: warnings.warn("""This property is deprecated. Values set are not used by the service.""", DeprecationWarning) pulumi.log.warn("""python_version is deprecated: This property is deprecated. Values set are not used by the service.""") if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if tomcat_version is not None: - pulumi.set(__self__, "tomcat_version", tomcat_version) + _setter("tomcat_version", tomcat_version) @property @pulumi.getter(name="currentStack") @@ -39576,8 +52325,25 @@ def __init__(__self__, *, :param pulumi.Input['WindowsWebAppSlotSiteConfigAutoHealSettingActionArgs'] action: A `action` block as defined above. :param pulumi.Input['WindowsWebAppSlotSiteConfigAutoHealSettingTriggerArgs'] trigger: A `trigger` block as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "trigger", trigger) + WindowsWebAppSlotSiteConfigAutoHealSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + trigger=trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input['WindowsWebAppSlotSiteConfigAutoHealSettingActionArgs']] = None, + trigger: Optional[pulumi.Input['WindowsWebAppSlotSiteConfigAutoHealSettingTriggerArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if trigger is None: + raise TypeError("Missing 'trigger' argument") + + _setter("action", action) + _setter("trigger", trigger) @property @pulumi.getter @@ -39615,11 +52381,34 @@ def __init__(__self__, *, :param pulumi.Input['WindowsWebAppSlotSiteConfigAutoHealSettingActionCustomActionArgs'] custom_action: A `custom_action` block as defined below. :param pulumi.Input[str] minimum_process_execution_time: The minimum amount of time in `hh:mm:ss` the Windows Web App Slot must have been running before the defined action will be run in the event of a trigger. """ - pulumi.set(__self__, "action_type", action_type) + WindowsWebAppSlotSiteConfigAutoHealSettingActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + custom_action=custom_action, + minimum_process_execution_time=minimum_process_execution_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[pulumi.Input[str]] = None, + custom_action: Optional[pulumi.Input['WindowsWebAppSlotSiteConfigAutoHealSettingActionCustomActionArgs']] = None, + minimum_process_execution_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + if custom_action is None and 'customAction' in kwargs: + custom_action = kwargs['customAction'] + if minimum_process_execution_time is None and 'minimumProcessExecutionTime' in kwargs: + minimum_process_execution_time = kwargs['minimumProcessExecutionTime'] + + _setter("action_type", action_type) if custom_action is not None: - pulumi.set(__self__, "custom_action", custom_action) + _setter("custom_action", custom_action) if minimum_process_execution_time is not None: - pulumi.set(__self__, "minimum_process_execution_time", minimum_process_execution_time) + _setter("minimum_process_execution_time", minimum_process_execution_time) @property @pulumi.getter(name="actionType") @@ -39667,9 +52456,24 @@ def __init__(__self__, *, :param pulumi.Input[str] executable: The executable to run for the `custom_action`. :param pulumi.Input[str] parameters: The parameters to pass to the specified `executable`. """ - pulumi.set(__self__, "executable", executable) + WindowsWebAppSlotSiteConfigAutoHealSettingActionCustomActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + executable=executable, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + executable: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if executable is None: + raise TypeError("Missing 'executable' argument") + + _setter("executable", executable) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -39709,14 +52513,37 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotSiteConfigAutoHealSettingTriggerSlowRequestArgs']]] slow_requests: One or more `slow_request` blocks as defined above. :param pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotSiteConfigAutoHealSettingTriggerStatusCodeArgs']]] status_codes: One or more `status_code` blocks as defined above. """ + WindowsWebAppSlotSiteConfigAutoHealSettingTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_memory_kb=private_memory_kb, + requests=requests, + slow_requests=slow_requests, + status_codes=status_codes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_memory_kb: Optional[pulumi.Input[int]] = None, + requests: Optional[pulumi.Input['WindowsWebAppSlotSiteConfigAutoHealSettingTriggerRequestsArgs']] = None, + slow_requests: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotSiteConfigAutoHealSettingTriggerSlowRequestArgs']]]] = None, + status_codes: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotSiteConfigAutoHealSettingTriggerStatusCodeArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_memory_kb is None and 'privateMemoryKb' in kwargs: + private_memory_kb = kwargs['privateMemoryKb'] + if slow_requests is None and 'slowRequests' in kwargs: + slow_requests = kwargs['slowRequests'] + if status_codes is None and 'statusCodes' in kwargs: + status_codes = kwargs['statusCodes'] + if private_memory_kb is not None: - pulumi.set(__self__, "private_memory_kb", private_memory_kb) + _setter("private_memory_kb", private_memory_kb) if requests is not None: - pulumi.set(__self__, "requests", requests) + _setter("requests", requests) if slow_requests is not None: - pulumi.set(__self__, "slow_requests", slow_requests) + _setter("slow_requests", slow_requests) if status_codes is not None: - pulumi.set(__self__, "status_codes", status_codes) + _setter("status_codes", status_codes) @property @pulumi.getter(name="privateMemoryKb") @@ -39776,8 +52603,25 @@ def __init__(__self__, *, :param pulumi.Input[int] count: The number of requests in the specified `interval` to trigger this rule. :param pulumi.Input[str] interval: The interval in `hh:mm:ss`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) + WindowsWebAppSlotSiteConfigAutoHealSettingTriggerRequestsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + interval: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + + _setter("count", count) + _setter("interval", interval) @property @pulumi.getter @@ -39817,11 +52661,36 @@ def __init__(__self__, *, :param pulumi.Input[str] time_taken: The threshold of time passed to qualify as a Slow Request in `hh:mm:ss`. :param pulumi.Input[str] path: The path for which this slow request rule applies. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "time_taken", time_taken) + WindowsWebAppSlotSiteConfigAutoHealSettingTriggerSlowRequestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + time_taken=time_taken, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + interval: Optional[pulumi.Input[str]] = None, + time_taken: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if time_taken is None and 'timeTaken' in kwargs: + time_taken = kwargs['timeTaken'] + if time_taken is None: + raise TypeError("Missing 'time_taken' argument") + + _setter("count", count) + _setter("interval", interval) + _setter("time_taken", time_taken) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -39889,15 +52758,48 @@ def __init__(__self__, *, :param pulumi.Input[int] sub_status: The Request Sub Status of the Status Code. :param pulumi.Input[int] win32_status_code: The Win32 Status Code of the Request. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "status_code_range", status_code_range) + WindowsWebAppSlotSiteConfigAutoHealSettingTriggerStatusCodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + status_code_range=status_code_range, + path=path, + sub_status=sub_status, + win32_status_code=win32_status_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + interval: Optional[pulumi.Input[str]] = None, + status_code_range: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + sub_status: Optional[pulumi.Input[int]] = None, + win32_status_code: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if status_code_range is None and 'statusCodeRange' in kwargs: + status_code_range = kwargs['statusCodeRange'] + if status_code_range is None: + raise TypeError("Missing 'status_code_range' argument") + if sub_status is None and 'subStatus' in kwargs: + sub_status = kwargs['subStatus'] + if win32_status_code is None and 'win32StatusCode' in kwargs: + win32_status_code = kwargs['win32StatusCode'] + + _setter("count", count) + _setter("interval", interval) + _setter("status_code_range", status_code_range) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if sub_status is not None: - pulumi.set(__self__, "sub_status", sub_status) + _setter("sub_status", sub_status) if win32_status_code is not None: - pulumi.set(__self__, "win32_status_code", win32_status_code) + _setter("win32_status_code", win32_status_code) @property @pulumi.getter @@ -39981,10 +52883,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: Specifies a list of origins that should be allowed to make cross-origin calls. :param pulumi.Input[bool] support_credentials: Whether CORS requests with credentials are allowed. Defaults to `false` """ + WindowsWebAppSlotSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + support_credentials: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -40032,20 +52951,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsWebAppSlotSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['WindowsWebAppSlotSiteConfigIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -40147,14 +53095,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsWebAppSlotSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -40226,20 +53199,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsWebAppSlotSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['WindowsWebAppSlotSiteConfigScmIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -40341,14 +53343,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsWebAppSlotSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -40412,11 +53439,40 @@ def __init__(__self__, *, :param pulumi.Input[str] virtual_path: The Virtual Path for the Virtual Application. :param pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotSiteConfigVirtualApplicationVirtualDirectoryArgs']]] virtual_directories: One or more `virtual_directory` blocks as defined below. """ - pulumi.set(__self__, "physical_path", physical_path) - pulumi.set(__self__, "preload", preload) - pulumi.set(__self__, "virtual_path", virtual_path) + WindowsWebAppSlotSiteConfigVirtualApplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + physical_path=physical_path, + preload=preload, + virtual_path=virtual_path, + virtual_directories=virtual_directories, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + physical_path: Optional[pulumi.Input[str]] = None, + preload: Optional[pulumi.Input[bool]] = None, + virtual_path: Optional[pulumi.Input[str]] = None, + virtual_directories: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotSiteConfigVirtualApplicationVirtualDirectoryArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if physical_path is None and 'physicalPath' in kwargs: + physical_path = kwargs['physicalPath'] + if physical_path is None: + raise TypeError("Missing 'physical_path' argument") + if preload is None: + raise TypeError("Missing 'preload' argument") + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if virtual_path is None: + raise TypeError("Missing 'virtual_path' argument") + if virtual_directories is None and 'virtualDirectories' in kwargs: + virtual_directories = kwargs['virtualDirectories'] + + _setter("physical_path", physical_path) + _setter("preload", preload) + _setter("virtual_path", virtual_path) if virtual_directories is not None: - pulumi.set(__self__, "virtual_directories", virtual_directories) + _setter("virtual_directories", virtual_directories) @property @pulumi.getter(name="physicalPath") @@ -40476,10 +53532,27 @@ def __init__(__self__, *, :param pulumi.Input[str] physical_path: The physical path for the Virtual Application. :param pulumi.Input[str] virtual_path: The Virtual Path for the Virtual Application. """ + WindowsWebAppSlotSiteConfigVirtualApplicationVirtualDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + physical_path=physical_path, + virtual_path=virtual_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + physical_path: Optional[pulumi.Input[str]] = None, + virtual_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if physical_path is None and 'physicalPath' in kwargs: + physical_path = kwargs['physicalPath'] + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if physical_path is not None: - pulumi.set(__self__, "physical_path", physical_path) + _setter("physical_path", physical_path) if virtual_path is not None: - pulumi.set(__self__, "virtual_path", virtual_path) + _setter("virtual_path", virtual_path) @property @pulumi.getter(name="physicalPath") @@ -40514,10 +53587,23 @@ def __init__(__self__, *, """ :param pulumi.Input[str] password: The Site Credentials Password used for publishing. """ + WindowsWebAppSlotSiteCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -40558,13 +53644,52 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The Azure Storage Type. Possible values include `AzureFiles` and `AzureBlob` :param pulumi.Input[str] mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + WindowsWebAppSlotStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + mount_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -40648,10 +53773,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] app_setting_names: A list of `app_setting` names that the Windows Web App will not swap between Slots when a swap operation is triggered. :param pulumi.Input[Sequence[pulumi.Input[str]]] connection_string_names: A list of `connection_string` names that the Windows Web App will not swap between Slots when a swap operation is triggered. """ + WindowsWebAppStickySettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_setting_names=app_setting_names, + connection_string_names=connection_string_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_setting_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_setting_names is None and 'appSettingNames' in kwargs: + app_setting_names = kwargs['appSettingNames'] + if connection_string_names is None and 'connectionStringNames' in kwargs: + connection_string_names = kwargs['connectionStringNames'] + if app_setting_names is not None: - pulumi.set(__self__, "app_setting_names", app_setting_names) + _setter("app_setting_names", app_setting_names) if connection_string_names is not None: - pulumi.set(__self__, "connection_string_names", connection_string_names) + _setter("connection_string_names", connection_string_names) @property @pulumi.getter(name="appSettingNames") @@ -40695,13 +53837,52 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The Azure Storage Type. Possible values include `AzureFiles` and `AzureBlob` :param pulumi.Input[str] mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + WindowsWebAppStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + mount_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") diff --git a/sdk/python/pulumi_azure/appservice/active_slot.py b/sdk/python/pulumi_azure/appservice/active_slot.py index f1939d0e41..5523319c25 100644 --- a/sdk/python/pulumi_azure/appservice/active_slot.py +++ b/sdk/python/pulumi_azure/appservice/active_slot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ActiveSlotArgs', 'ActiveSlot'] @@ -23,9 +23,36 @@ def __init__(__self__, *, :param pulumi.Input[str] app_service_slot_name: The name of the App Service Slot which should be promoted to the Production Slot within the App Service. :param pulumi.Input[str] resource_group_name: The name of the resource group in which the App Service exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "app_service_name", app_service_name) - pulumi.set(__self__, "app_service_slot_name", app_service_slot_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ActiveSlotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_name=app_service_name, + app_service_slot_name=app_service_slot_name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_name: Optional[pulumi.Input[str]] = None, + app_service_slot_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_name is None and 'appServiceName' in kwargs: + app_service_name = kwargs['appServiceName'] + if app_service_name is None: + raise TypeError("Missing 'app_service_name' argument") + if app_service_slot_name is None and 'appServiceSlotName' in kwargs: + app_service_slot_name = kwargs['appServiceSlotName'] + if app_service_slot_name is None: + raise TypeError("Missing 'app_service_slot_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("app_service_name", app_service_name) + _setter("app_service_slot_name", app_service_slot_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="appServiceName") @@ -76,12 +103,33 @@ def __init__(__self__, *, :param pulumi.Input[str] app_service_slot_name: The name of the App Service Slot which should be promoted to the Production Slot within the App Service. :param pulumi.Input[str] resource_group_name: The name of the resource group in which the App Service exists. Changing this forces a new resource to be created. """ + _ActiveSlotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_name=app_service_name, + app_service_slot_name=app_service_slot_name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_name: Optional[pulumi.Input[str]] = None, + app_service_slot_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_name is None and 'appServiceName' in kwargs: + app_service_name = kwargs['appServiceName'] + if app_service_slot_name is None and 'appServiceSlotName' in kwargs: + app_service_slot_name = kwargs['appServiceSlotName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if app_service_name is not None: - pulumi.set(__self__, "app_service_name", app_service_name) + _setter("app_service_name", app_service_name) if app_service_slot_name is not None: - pulumi.set(__self__, "app_service_slot_name", app_service_slot_name) + _setter("app_service_slot_name", app_service_slot_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="appServiceName") @@ -211,6 +259,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ActiveSlotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/app_connection.py b/sdk/python/pulumi_azure/appservice/app_connection.py index afe2ecbbdc..83c724fa14 100644 --- a/sdk/python/pulumi_azure/appservice/app_connection.py +++ b/sdk/python/pulumi_azure/appservice/app_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,17 +35,56 @@ def __init__(__self__, *, :param pulumi.Input['AppConnectionSecretStoreArgs'] secret_store: An option to store secret value in secure place. An `secret_store` block as defined below. :param pulumi.Input[str] vnet_solution: The type of the VNet solution. Possible values are `serviceEndpoint`, `privateLink`. """ - pulumi.set(__self__, "authentication", authentication) - pulumi.set(__self__, "function_app_id", function_app_id) - pulumi.set(__self__, "target_resource_id", target_resource_id) + AppConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication=authentication, + function_app_id=function_app_id, + target_resource_id=target_resource_id, + client_type=client_type, + name=name, + secret_store=secret_store, + vnet_solution=vnet_solution, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication: Optional[pulumi.Input['AppConnectionAuthenticationArgs']] = None, + function_app_id: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + client_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + secret_store: Optional[pulumi.Input['AppConnectionSecretStoreArgs']] = None, + vnet_solution: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication is None: + raise TypeError("Missing 'authentication' argument") + if function_app_id is None and 'functionAppId' in kwargs: + function_app_id = kwargs['functionAppId'] + if function_app_id is None: + raise TypeError("Missing 'function_app_id' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + if client_type is None and 'clientType' in kwargs: + client_type = kwargs['clientType'] + if secret_store is None and 'secretStore' in kwargs: + secret_store = kwargs['secretStore'] + if vnet_solution is None and 'vnetSolution' in kwargs: + vnet_solution = kwargs['vnetSolution'] + + _setter("authentication", authentication) + _setter("function_app_id", function_app_id) + _setter("target_resource_id", target_resource_id) if client_type is not None: - pulumi.set(__self__, "client_type", client_type) + _setter("client_type", client_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if secret_store is not None: - pulumi.set(__self__, "secret_store", secret_store) + _setter("secret_store", secret_store) if vnet_solution is not None: - pulumi.set(__self__, "vnet_solution", vnet_solution) + _setter("vnet_solution", vnet_solution) @property @pulumi.getter @@ -156,20 +195,53 @@ def __init__(__self__, *, :param pulumi.Input[str] target_resource_id: The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are `Postgres`, `PostgresFlexible`, `Mysql`, `Sql`, `Redis`, `RedisEnterprise`, `CosmosCassandra`, `CosmosGremlin`, `CosmosMongo`, `CosmosSql`, `CosmosTable`, `StorageBlob`, `StorageQueue`, `StorageFile`, `StorageTable`, `AppConfig`, `EventHub`, `ServiceBus`, `SignalR`, `WebPubSub`, `ConfluentKafka`. The integration guide can be found [here](https://learn.microsoft.com/en-us/azure/service-connector/how-to-integrate-postgres). :param pulumi.Input[str] vnet_solution: The type of the VNet solution. Possible values are `serviceEndpoint`, `privateLink`. """ + _AppConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication=authentication, + client_type=client_type, + function_app_id=function_app_id, + name=name, + secret_store=secret_store, + target_resource_id=target_resource_id, + vnet_solution=vnet_solution, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication: Optional[pulumi.Input['AppConnectionAuthenticationArgs']] = None, + client_type: Optional[pulumi.Input[str]] = None, + function_app_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + secret_store: Optional[pulumi.Input['AppConnectionSecretStoreArgs']] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + vnet_solution: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_type is None and 'clientType' in kwargs: + client_type = kwargs['clientType'] + if function_app_id is None and 'functionAppId' in kwargs: + function_app_id = kwargs['functionAppId'] + if secret_store is None and 'secretStore' in kwargs: + secret_store = kwargs['secretStore'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if vnet_solution is None and 'vnetSolution' in kwargs: + vnet_solution = kwargs['vnetSolution'] + if authentication is not None: - pulumi.set(__self__, "authentication", authentication) + _setter("authentication", authentication) if client_type is not None: - pulumi.set(__self__, "client_type", client_type) + _setter("client_type", client_type) if function_app_id is not None: - pulumi.set(__self__, "function_app_id", function_app_id) + _setter("function_app_id", function_app_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if secret_store is not None: - pulumi.set(__self__, "secret_store", secret_store) + _setter("secret_store", secret_store) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) if vnet_solution is not None: - pulumi.set(__self__, "vnet_solution", vnet_solution) + _setter("vnet_solution", vnet_solution) @property @pulumi.getter @@ -429,6 +501,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AppConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -450,6 +526,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = AppConnectionArgs.__new__(AppConnectionArgs) + if authentication is not None and not isinstance(authentication, AppConnectionAuthenticationArgs): + authentication = authentication or {} + def _setter(key, value): + authentication[key] = value + AppConnectionAuthenticationArgs._configure(_setter, **authentication) if authentication is None and not opts.urn: raise TypeError("Missing required property 'authentication'") __props__.__dict__["authentication"] = authentication @@ -458,6 +539,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'function_app_id'") __props__.__dict__["function_app_id"] = function_app_id __props__.__dict__["name"] = name + if secret_store is not None and not isinstance(secret_store, AppConnectionSecretStoreArgs): + secret_store = secret_store or {} + def _setter(key, value): + secret_store[key] = value + AppConnectionSecretStoreArgs._configure(_setter, **secret_store) __props__.__dict__["secret_store"] = secret_store if target_resource_id is None and not opts.urn: raise TypeError("Missing required property 'target_resource_id'") diff --git a/sdk/python/pulumi_azure/appservice/app_service.py b/sdk/python/pulumi_azure/appservice/app_service.py index 2d30211a79..17a993de65 100644 --- a/sdk/python/pulumi_azure/appservice/app_service.py +++ b/sdk/python/pulumi_azure/appservice/app_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,44 +59,123 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['AppServiceStorageAccountArgs']]] storage_accounts: One or more `storage_account` blocks as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "app_service_plan_id", app_service_plan_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + AppServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_plan_id=app_service_plan_id, + resource_group_name=resource_group_name, + app_settings=app_settings, + auth_settings=auth_settings, + backup=backup, + client_affinity_enabled=client_affinity_enabled, + client_cert_enabled=client_cert_enabled, + client_cert_mode=client_cert_mode, + connection_strings=connection_strings, + enabled=enabled, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + location=location, + logs=logs, + name=name, + site_config=site_config, + source_control=source_control, + storage_accounts=storage_accounts, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_plan_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['AppServiceAuthSettingsArgs']] = None, + backup: Optional[pulumi.Input['AppServiceBackupArgs']] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + client_cert_enabled: Optional[pulumi.Input[bool]] = None, + client_cert_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['AppServiceConnectionStringArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['AppServiceIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['AppServiceLogsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['AppServiceSiteConfigArgs']] = None, + source_control: Optional[pulumi.Input['AppServiceSourceControlArgs']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['AppServiceStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_plan_id is None and 'appServicePlanId' in kwargs: + app_service_plan_id = kwargs['appServicePlanId'] + if app_service_plan_id is None: + raise TypeError("Missing 'app_service_plan_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if client_cert_enabled is None and 'clientCertEnabled' in kwargs: + client_cert_enabled = kwargs['clientCertEnabled'] + if client_cert_mode is None and 'clientCertMode' in kwargs: + client_cert_mode = kwargs['clientCertMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if source_control is None and 'sourceControl' in kwargs: + source_control = kwargs['sourceControl'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + + _setter("app_service_plan_id", app_service_plan_id) + _setter("resource_group_name", resource_group_name) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if client_cert_enabled is not None: - pulumi.set(__self__, "client_cert_enabled", client_cert_enabled) + _setter("client_cert_enabled", client_cert_enabled) if client_cert_mode is not None: - pulumi.set(__self__, "client_cert_mode", client_cert_mode) + _setter("client_cert_mode", client_cert_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if source_control is not None: - pulumi.set(__self__, "source_control", source_control) + _setter("source_control", source_control) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="appServicePlanId") @@ -399,60 +478,163 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['AppServiceStorageAccountArgs']]] storage_accounts: One or more `storage_account` blocks as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _AppServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_plan_id=app_service_plan_id, + app_settings=app_settings, + auth_settings=auth_settings, + backup=backup, + client_affinity_enabled=client_affinity_enabled, + client_cert_enabled=client_cert_enabled, + client_cert_mode=client_cert_mode, + connection_strings=connection_strings, + custom_domain_verification_id=custom_domain_verification_id, + default_site_hostname=default_site_hostname, + enabled=enabled, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + location=location, + logs=logs, + name=name, + outbound_ip_address_lists=outbound_ip_address_lists, + outbound_ip_addresses=outbound_ip_addresses, + possible_outbound_ip_address_lists=possible_outbound_ip_address_lists, + possible_outbound_ip_addresses=possible_outbound_ip_addresses, + resource_group_name=resource_group_name, + site_config=site_config, + site_credentials=site_credentials, + source_control=source_control, + storage_accounts=storage_accounts, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_plan_id: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['AppServiceAuthSettingsArgs']] = None, + backup: Optional[pulumi.Input['AppServiceBackupArgs']] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + client_cert_enabled: Optional[pulumi.Input[bool]] = None, + client_cert_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['AppServiceConnectionStringArgs']]]] = None, + custom_domain_verification_id: Optional[pulumi.Input[str]] = None, + default_site_hostname: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['AppServiceIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['AppServiceLogsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + possible_outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + possible_outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['AppServiceSiteConfigArgs']] = None, + site_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['AppServiceSiteCredentialArgs']]]] = None, + source_control: Optional[pulumi.Input['AppServiceSourceControlArgs']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['AppServiceStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_plan_id is None and 'appServicePlanId' in kwargs: + app_service_plan_id = kwargs['appServicePlanId'] + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if client_cert_enabled is None and 'clientCertEnabled' in kwargs: + client_cert_enabled = kwargs['clientCertEnabled'] + if client_cert_mode is None and 'clientCertMode' in kwargs: + client_cert_mode = kwargs['clientCertMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if custom_domain_verification_id is None and 'customDomainVerificationId' in kwargs: + custom_domain_verification_id = kwargs['customDomainVerificationId'] + if default_site_hostname is None and 'defaultSiteHostname' in kwargs: + default_site_hostname = kwargs['defaultSiteHostname'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if outbound_ip_address_lists is None and 'outboundIpAddressLists' in kwargs: + outbound_ip_address_lists = kwargs['outboundIpAddressLists'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if possible_outbound_ip_address_lists is None and 'possibleOutboundIpAddressLists' in kwargs: + possible_outbound_ip_address_lists = kwargs['possibleOutboundIpAddressLists'] + if possible_outbound_ip_addresses is None and 'possibleOutboundIpAddresses' in kwargs: + possible_outbound_ip_addresses = kwargs['possibleOutboundIpAddresses'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_credentials is None and 'siteCredentials' in kwargs: + site_credentials = kwargs['siteCredentials'] + if source_control is None and 'sourceControl' in kwargs: + source_control = kwargs['sourceControl'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if app_service_plan_id is not None: - pulumi.set(__self__, "app_service_plan_id", app_service_plan_id) + _setter("app_service_plan_id", app_service_plan_id) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if client_cert_enabled is not None: - pulumi.set(__self__, "client_cert_enabled", client_cert_enabled) + _setter("client_cert_enabled", client_cert_enabled) if client_cert_mode is not None: - pulumi.set(__self__, "client_cert_mode", client_cert_mode) + _setter("client_cert_mode", client_cert_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if custom_domain_verification_id is not None: - pulumi.set(__self__, "custom_domain_verification_id", custom_domain_verification_id) + _setter("custom_domain_verification_id", custom_domain_verification_id) if default_site_hostname is not None: - pulumi.set(__self__, "default_site_hostname", default_site_hostname) + _setter("default_site_hostname", default_site_hostname) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_ip_address_lists is not None: - pulumi.set(__self__, "outbound_ip_address_lists", outbound_ip_address_lists) + _setter("outbound_ip_address_lists", outbound_ip_address_lists) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if possible_outbound_ip_address_lists is not None: - pulumi.set(__self__, "possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) + _setter("possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) if possible_outbound_ip_addresses is not None: - pulumi.set(__self__, "possible_outbound_ip_addresses", possible_outbound_ip_addresses) + _setter("possible_outbound_ip_addresses", possible_outbound_ip_addresses) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if site_credentials is not None: - pulumi.set(__self__, "site_credentials", site_credentials) + _setter("site_credentials", site_credentials) if source_control is not None: - pulumi.set(__self__, "source_control", source_control) + _setter("source_control", source_control) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="appServicePlanId") @@ -942,6 +1124,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AppServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -980,7 +1166,17 @@ def _internal_init(__self__, raise TypeError("Missing required property 'app_service_plan_id'") __props__.__dict__["app_service_plan_id"] = app_service_plan_id __props__.__dict__["app_settings"] = app_settings + if auth_settings is not None and not isinstance(auth_settings, AppServiceAuthSettingsArgs): + auth_settings = auth_settings or {} + def _setter(key, value): + auth_settings[key] = value + AppServiceAuthSettingsArgs._configure(_setter, **auth_settings) __props__.__dict__["auth_settings"] = auth_settings + if backup is not None and not isinstance(backup, AppServiceBackupArgs): + backup = backup or {} + def _setter(key, value): + backup[key] = value + AppServiceBackupArgs._configure(_setter, **backup) __props__.__dict__["backup"] = backup __props__.__dict__["client_affinity_enabled"] = client_affinity_enabled __props__.__dict__["client_cert_enabled"] = client_cert_enabled @@ -988,15 +1184,35 @@ def _internal_init(__self__, __props__.__dict__["connection_strings"] = connection_strings __props__.__dict__["enabled"] = enabled __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, AppServiceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + AppServiceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["key_vault_reference_identity_id"] = key_vault_reference_identity_id __props__.__dict__["location"] = location + if logs is not None and not isinstance(logs, AppServiceLogsArgs): + logs = logs or {} + def _setter(key, value): + logs[key] = value + AppServiceLogsArgs._configure(_setter, **logs) __props__.__dict__["logs"] = logs __props__.__dict__["name"] = name if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if site_config is not None and not isinstance(site_config, AppServiceSiteConfigArgs): + site_config = site_config or {} + def _setter(key, value): + site_config[key] = value + AppServiceSiteConfigArgs._configure(_setter, **site_config) __props__.__dict__["site_config"] = site_config + if source_control is not None and not isinstance(source_control, AppServiceSourceControlArgs): + source_control = source_control or {} + def _setter(key, value): + source_control[key] = value + AppServiceSourceControlArgs._configure(_setter, **source_control) __props__.__dict__["source_control"] = source_control __props__.__dict__["storage_accounts"] = storage_accounts __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/appservice/certificate.py b/sdk/python/pulumi_azure/appservice/certificate.py index 7b2ee93b86..0b106e8219 100644 --- a/sdk/python/pulumi_azure/appservice/certificate.py +++ b/sdk/python/pulumi_azure/appservice/certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CertificateArgs', 'Certificate'] @@ -35,21 +35,56 @@ def __init__(__self__, *, > **NOTE:** Either `pfx_blob` or `key_vault_secret_id` must be set - but not both. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + CertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + app_service_plan_id=app_service_plan_id, + key_vault_secret_id=key_vault_secret_id, + location=location, + name=name, + password=password, + pfx_blob=pfx_blob, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + app_service_plan_id: Optional[pulumi.Input[str]] = None, + key_vault_secret_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + pfx_blob: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if app_service_plan_id is None and 'appServicePlanId' in kwargs: + app_service_plan_id = kwargs['appServicePlanId'] + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + if pfx_blob is None and 'pfxBlob' in kwargs: + pfx_blob = kwargs['pfxBlob'] + + _setter("resource_group_name", resource_group_name) if app_service_plan_id is not None: - pulumi.set(__self__, "app_service_plan_id", app_service_plan_id) + _setter("app_service_plan_id", app_service_plan_id) if key_vault_secret_id is not None: - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) + _setter("key_vault_secret_id", key_vault_secret_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if pfx_blob is not None: - pulumi.set(__self__, "pfx_blob", pfx_blob) + _setter("pfx_blob", pfx_blob) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -190,38 +225,99 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] thumbprint: The thumbprint for the certificate. """ + _CertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_plan_id=app_service_plan_id, + expiration_date=expiration_date, + friendly_name=friendly_name, + host_names=host_names, + hosting_environment_profile_id=hosting_environment_profile_id, + issue_date=issue_date, + issuer=issuer, + key_vault_secret_id=key_vault_secret_id, + location=location, + name=name, + password=password, + pfx_blob=pfx_blob, + resource_group_name=resource_group_name, + subject_name=subject_name, + tags=tags, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_plan_id: Optional[pulumi.Input[str]] = None, + expiration_date: Optional[pulumi.Input[str]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + host_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + hosting_environment_profile_id: Optional[pulumi.Input[str]] = None, + issue_date: Optional[pulumi.Input[str]] = None, + issuer: Optional[pulumi.Input[str]] = None, + key_vault_secret_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + pfx_blob: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subject_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_plan_id is None and 'appServicePlanId' in kwargs: + app_service_plan_id = kwargs['appServicePlanId'] + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if host_names is None and 'hostNames' in kwargs: + host_names = kwargs['hostNames'] + if hosting_environment_profile_id is None and 'hostingEnvironmentProfileId' in kwargs: + hosting_environment_profile_id = kwargs['hostingEnvironmentProfileId'] + if issue_date is None and 'issueDate' in kwargs: + issue_date = kwargs['issueDate'] + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + if pfx_blob is None and 'pfxBlob' in kwargs: + pfx_blob = kwargs['pfxBlob'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if subject_name is None and 'subjectName' in kwargs: + subject_name = kwargs['subjectName'] + if app_service_plan_id is not None: - pulumi.set(__self__, "app_service_plan_id", app_service_plan_id) + _setter("app_service_plan_id", app_service_plan_id) if expiration_date is not None: - pulumi.set(__self__, "expiration_date", expiration_date) + _setter("expiration_date", expiration_date) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if host_names is not None: - pulumi.set(__self__, "host_names", host_names) + _setter("host_names", host_names) if hosting_environment_profile_id is not None: - pulumi.set(__self__, "hosting_environment_profile_id", hosting_environment_profile_id) + _setter("hosting_environment_profile_id", hosting_environment_profile_id) if issue_date is not None: - pulumi.set(__self__, "issue_date", issue_date) + _setter("issue_date", issue_date) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if key_vault_secret_id is not None: - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) + _setter("key_vault_secret_id", key_vault_secret_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if pfx_blob is not None: - pulumi.set(__self__, "pfx_blob", pfx_blob) + _setter("pfx_blob", pfx_blob) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if subject_name is not None: - pulumi.set(__self__, "subject_name", subject_name) + _setter("subject_name", subject_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="appServicePlanId") @@ -517,6 +613,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/certificate_binding.py b/sdk/python/pulumi_azure/appservice/certificate_binding.py index 6b7db89c2f..d147e69cd2 100644 --- a/sdk/python/pulumi_azure/appservice/certificate_binding.py +++ b/sdk/python/pulumi_azure/appservice/certificate_binding.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CertificateBindingArgs', 'CertificateBinding'] @@ -23,9 +23,36 @@ def __init__(__self__, *, :param pulumi.Input[str] hostname_binding_id: The ID of the Custom Domain/Hostname Binding. Changing this forces a new App Service Certificate Binding to be created. :param pulumi.Input[str] ssl_state: The type of certificate binding. Allowed values are `IpBasedEnabled` or `SniEnabled`. Changing this forces a new App Service Certificate Binding to be created. """ - pulumi.set(__self__, "certificate_id", certificate_id) - pulumi.set(__self__, "hostname_binding_id", hostname_binding_id) - pulumi.set(__self__, "ssl_state", ssl_state) + CertificateBindingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_id=certificate_id, + hostname_binding_id=hostname_binding_id, + ssl_state=ssl_state, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_id: Optional[pulumi.Input[str]] = None, + hostname_binding_id: Optional[pulumi.Input[str]] = None, + ssl_state: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_id is None and 'certificateId' in kwargs: + certificate_id = kwargs['certificateId'] + if certificate_id is None: + raise TypeError("Missing 'certificate_id' argument") + if hostname_binding_id is None and 'hostnameBindingId' in kwargs: + hostname_binding_id = kwargs['hostnameBindingId'] + if hostname_binding_id is None: + raise TypeError("Missing 'hostname_binding_id' argument") + if ssl_state is None and 'sslState' in kwargs: + ssl_state = kwargs['sslState'] + if ssl_state is None: + raise TypeError("Missing 'ssl_state' argument") + + _setter("certificate_id", certificate_id) + _setter("hostname_binding_id", hostname_binding_id) + _setter("ssl_state", ssl_state) @property @pulumi.getter(name="certificateId") @@ -82,18 +109,47 @@ def __init__(__self__, *, :param pulumi.Input[str] ssl_state: The type of certificate binding. Allowed values are `IpBasedEnabled` or `SniEnabled`. Changing this forces a new App Service Certificate Binding to be created. :param pulumi.Input[str] thumbprint: The certificate thumbprint. """ + _CertificateBindingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_name=app_service_name, + certificate_id=certificate_id, + hostname=hostname, + hostname_binding_id=hostname_binding_id, + ssl_state=ssl_state, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_name: Optional[pulumi.Input[str]] = None, + certificate_id: Optional[pulumi.Input[str]] = None, + hostname: Optional[pulumi.Input[str]] = None, + hostname_binding_id: Optional[pulumi.Input[str]] = None, + ssl_state: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_name is None and 'appServiceName' in kwargs: + app_service_name = kwargs['appServiceName'] + if certificate_id is None and 'certificateId' in kwargs: + certificate_id = kwargs['certificateId'] + if hostname_binding_id is None and 'hostnameBindingId' in kwargs: + hostname_binding_id = kwargs['hostnameBindingId'] + if ssl_state is None and 'sslState' in kwargs: + ssl_state = kwargs['sslState'] + if app_service_name is not None: - pulumi.set(__self__, "app_service_name", app_service_name) + _setter("app_service_name", app_service_name) if certificate_id is not None: - pulumi.set(__self__, "certificate_id", certificate_id) + _setter("certificate_id", certificate_id) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if hostname_binding_id is not None: - pulumi.set(__self__, "hostname_binding_id", hostname_binding_id) + _setter("hostname_binding_id", hostname_binding_id) if ssl_state is not None: - pulumi.set(__self__, "ssl_state", ssl_state) + _setter("ssl_state", ssl_state) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="appServiceName") @@ -221,6 +277,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CertificateBindingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/certificate_order.py b/sdk/python/pulumi_azure/appservice/certificate_order.py index 575c403620..d8fecf05cd 100644 --- a/sdk/python/pulumi_azure/appservice/certificate_order.py +++ b/sdk/python/pulumi_azure/appservice/certificate_order.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,25 +41,68 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: (Optional) A mapping of tags to assign to the resource. :param pulumi.Input[int] validity_in_years: Duration in years (must be between `1` and `3`). Defaults to `1`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + CertificateOrderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + auto_renew=auto_renew, + csr=csr, + distinguished_name=distinguished_name, + key_size=key_size, + location=location, + name=name, + product_type=product_type, + tags=tags, + validity_in_years=validity_in_years, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + auto_renew: Optional[pulumi.Input[bool]] = None, + csr: Optional[pulumi.Input[str]] = None, + distinguished_name: Optional[pulumi.Input[str]] = None, + key_size: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + product_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + validity_in_years: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if auto_renew is None and 'autoRenew' in kwargs: + auto_renew = kwargs['autoRenew'] + if distinguished_name is None and 'distinguishedName' in kwargs: + distinguished_name = kwargs['distinguishedName'] + if key_size is None and 'keySize' in kwargs: + key_size = kwargs['keySize'] + if product_type is None and 'productType' in kwargs: + product_type = kwargs['productType'] + if validity_in_years is None and 'validityInYears' in kwargs: + validity_in_years = kwargs['validityInYears'] + + _setter("resource_group_name", resource_group_name) if auto_renew is not None: - pulumi.set(__self__, "auto_renew", auto_renew) + _setter("auto_renew", auto_renew) if csr is not None: - pulumi.set(__self__, "csr", csr) + _setter("csr", csr) if distinguished_name is not None: - pulumi.set(__self__, "distinguished_name", distinguished_name) + _setter("distinguished_name", distinguished_name) if key_size is not None: - pulumi.set(__self__, "key_size", key_size) + _setter("key_size", key_size) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if product_type is not None: - pulumi.set(__self__, "product_type", product_type) + _setter("product_type", product_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if validity_in_years is not None: - pulumi.set(__self__, "validity_in_years", validity_in_years) + _setter("validity_in_years", validity_in_years) @property @pulumi.getter(name="resourceGroupName") @@ -230,44 +273,117 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: (Optional) A mapping of tags to assign to the resource. :param pulumi.Input[int] validity_in_years: Duration in years (must be between `1` and `3`). Defaults to `1`. """ + _CertificateOrderState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_certificate_not_renewable_reasons=app_service_certificate_not_renewable_reasons, + auto_renew=auto_renew, + certificates=certificates, + csr=csr, + distinguished_name=distinguished_name, + domain_verification_token=domain_verification_token, + expiration_time=expiration_time, + intermediate_thumbprint=intermediate_thumbprint, + is_private_key_external=is_private_key_external, + key_size=key_size, + location=location, + name=name, + product_type=product_type, + resource_group_name=resource_group_name, + root_thumbprint=root_thumbprint, + signed_certificate_thumbprint=signed_certificate_thumbprint, + status=status, + tags=tags, + validity_in_years=validity_in_years, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_certificate_not_renewable_reasons: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + auto_renew: Optional[pulumi.Input[bool]] = None, + certificates: Optional[pulumi.Input[Sequence[pulumi.Input['CertificateOrderCertificateArgs']]]] = None, + csr: Optional[pulumi.Input[str]] = None, + distinguished_name: Optional[pulumi.Input[str]] = None, + domain_verification_token: Optional[pulumi.Input[str]] = None, + expiration_time: Optional[pulumi.Input[str]] = None, + intermediate_thumbprint: Optional[pulumi.Input[str]] = None, + is_private_key_external: Optional[pulumi.Input[bool]] = None, + key_size: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + product_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + root_thumbprint: Optional[pulumi.Input[str]] = None, + signed_certificate_thumbprint: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + validity_in_years: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_certificate_not_renewable_reasons is None and 'appServiceCertificateNotRenewableReasons' in kwargs: + app_service_certificate_not_renewable_reasons = kwargs['appServiceCertificateNotRenewableReasons'] + if auto_renew is None and 'autoRenew' in kwargs: + auto_renew = kwargs['autoRenew'] + if distinguished_name is None and 'distinguishedName' in kwargs: + distinguished_name = kwargs['distinguishedName'] + if domain_verification_token is None and 'domainVerificationToken' in kwargs: + domain_verification_token = kwargs['domainVerificationToken'] + if expiration_time is None and 'expirationTime' in kwargs: + expiration_time = kwargs['expirationTime'] + if intermediate_thumbprint is None and 'intermediateThumbprint' in kwargs: + intermediate_thumbprint = kwargs['intermediateThumbprint'] + if is_private_key_external is None and 'isPrivateKeyExternal' in kwargs: + is_private_key_external = kwargs['isPrivateKeyExternal'] + if key_size is None and 'keySize' in kwargs: + key_size = kwargs['keySize'] + if product_type is None and 'productType' in kwargs: + product_type = kwargs['productType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if root_thumbprint is None and 'rootThumbprint' in kwargs: + root_thumbprint = kwargs['rootThumbprint'] + if signed_certificate_thumbprint is None and 'signedCertificateThumbprint' in kwargs: + signed_certificate_thumbprint = kwargs['signedCertificateThumbprint'] + if validity_in_years is None and 'validityInYears' in kwargs: + validity_in_years = kwargs['validityInYears'] + if app_service_certificate_not_renewable_reasons is not None: - pulumi.set(__self__, "app_service_certificate_not_renewable_reasons", app_service_certificate_not_renewable_reasons) + _setter("app_service_certificate_not_renewable_reasons", app_service_certificate_not_renewable_reasons) if auto_renew is not None: - pulumi.set(__self__, "auto_renew", auto_renew) + _setter("auto_renew", auto_renew) if certificates is not None: - pulumi.set(__self__, "certificates", certificates) + _setter("certificates", certificates) if csr is not None: - pulumi.set(__self__, "csr", csr) + _setter("csr", csr) if distinguished_name is not None: - pulumi.set(__self__, "distinguished_name", distinguished_name) + _setter("distinguished_name", distinguished_name) if domain_verification_token is not None: - pulumi.set(__self__, "domain_verification_token", domain_verification_token) + _setter("domain_verification_token", domain_verification_token) if expiration_time is not None: - pulumi.set(__self__, "expiration_time", expiration_time) + _setter("expiration_time", expiration_time) if intermediate_thumbprint is not None: - pulumi.set(__self__, "intermediate_thumbprint", intermediate_thumbprint) + _setter("intermediate_thumbprint", intermediate_thumbprint) if is_private_key_external is not None: - pulumi.set(__self__, "is_private_key_external", is_private_key_external) + _setter("is_private_key_external", is_private_key_external) if key_size is not None: - pulumi.set(__self__, "key_size", key_size) + _setter("key_size", key_size) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if product_type is not None: - pulumi.set(__self__, "product_type", product_type) + _setter("product_type", product_type) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if root_thumbprint is not None: - pulumi.set(__self__, "root_thumbprint", root_thumbprint) + _setter("root_thumbprint", root_thumbprint) if signed_certificate_thumbprint is not None: - pulumi.set(__self__, "signed_certificate_thumbprint", signed_certificate_thumbprint) + _setter("signed_certificate_thumbprint", signed_certificate_thumbprint) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if validity_in_years is not None: - pulumi.set(__self__, "validity_in_years", validity_in_years) + _setter("validity_in_years", validity_in_years) @property @pulumi.getter(name="appServiceCertificateNotRenewableReasons") @@ -597,6 +713,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CertificateOrderArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/connection.py b/sdk/python/pulumi_azure/appservice/connection.py index 76fda0bcd9..c0dde92348 100644 --- a/sdk/python/pulumi_azure/appservice/connection.py +++ b/sdk/python/pulumi_azure/appservice/connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,17 +35,56 @@ def __init__(__self__, *, :param pulumi.Input['ConnectionSecretStoreArgs'] secret_store: An option to store secret value in secure place. An `secret_store` block as defined below. :param pulumi.Input[str] vnet_solution: The type of the VNet solution. Possible values are `serviceEndpoint`, `privateLink`. """ - pulumi.set(__self__, "app_service_id", app_service_id) - pulumi.set(__self__, "authentication", authentication) - pulumi.set(__self__, "target_resource_id", target_resource_id) + ConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_id=app_service_id, + authentication=authentication, + target_resource_id=target_resource_id, + client_type=client_type, + name=name, + secret_store=secret_store, + vnet_solution=vnet_solution, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_id: Optional[pulumi.Input[str]] = None, + authentication: Optional[pulumi.Input['ConnectionAuthenticationArgs']] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + client_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + secret_store: Optional[pulumi.Input['ConnectionSecretStoreArgs']] = None, + vnet_solution: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_id is None and 'appServiceId' in kwargs: + app_service_id = kwargs['appServiceId'] + if app_service_id is None: + raise TypeError("Missing 'app_service_id' argument") + if authentication is None: + raise TypeError("Missing 'authentication' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + if client_type is None and 'clientType' in kwargs: + client_type = kwargs['clientType'] + if secret_store is None and 'secretStore' in kwargs: + secret_store = kwargs['secretStore'] + if vnet_solution is None and 'vnetSolution' in kwargs: + vnet_solution = kwargs['vnetSolution'] + + _setter("app_service_id", app_service_id) + _setter("authentication", authentication) + _setter("target_resource_id", target_resource_id) if client_type is not None: - pulumi.set(__self__, "client_type", client_type) + _setter("client_type", client_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if secret_store is not None: - pulumi.set(__self__, "secret_store", secret_store) + _setter("secret_store", secret_store) if vnet_solution is not None: - pulumi.set(__self__, "vnet_solution", vnet_solution) + _setter("vnet_solution", vnet_solution) @property @pulumi.getter(name="appServiceId") @@ -156,20 +195,53 @@ def __init__(__self__, *, :param pulumi.Input[str] target_resource_id: The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are `Postgres`, `PostgresFlexible`, `Mysql`, `Sql`, `Redis`, `RedisEnterprise`, `CosmosCassandra`, `CosmosGremlin`, `CosmosMongo`, `CosmosSql`, `CosmosTable`, `StorageBlob`, `StorageQueue`, `StorageFile`, `StorageTable`, `AppConfig`, `EventHub`, `ServiceBus`, `SignalR`, `WebPubSub`, `ConfluentKafka`. The integration guide can be found [here](https://learn.microsoft.com/en-us/azure/service-connector/how-to-integrate-postgres). :param pulumi.Input[str] vnet_solution: The type of the VNet solution. Possible values are `serviceEndpoint`, `privateLink`. """ + _ConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_id=app_service_id, + authentication=authentication, + client_type=client_type, + name=name, + secret_store=secret_store, + target_resource_id=target_resource_id, + vnet_solution=vnet_solution, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_id: Optional[pulumi.Input[str]] = None, + authentication: Optional[pulumi.Input['ConnectionAuthenticationArgs']] = None, + client_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + secret_store: Optional[pulumi.Input['ConnectionSecretStoreArgs']] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + vnet_solution: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_id is None and 'appServiceId' in kwargs: + app_service_id = kwargs['appServiceId'] + if client_type is None and 'clientType' in kwargs: + client_type = kwargs['clientType'] + if secret_store is None and 'secretStore' in kwargs: + secret_store = kwargs['secretStore'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if vnet_solution is None and 'vnetSolution' in kwargs: + vnet_solution = kwargs['vnetSolution'] + if app_service_id is not None: - pulumi.set(__self__, "app_service_id", app_service_id) + _setter("app_service_id", app_service_id) if authentication is not None: - pulumi.set(__self__, "authentication", authentication) + _setter("authentication", authentication) if client_type is not None: - pulumi.set(__self__, "client_type", client_type) + _setter("client_type", client_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if secret_store is not None: - pulumi.set(__self__, "secret_store", secret_store) + _setter("secret_store", secret_store) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) if vnet_solution is not None: - pulumi.set(__self__, "vnet_solution", vnet_solution) + _setter("vnet_solution", vnet_solution) @property @pulumi.getter(name="appServiceId") @@ -417,6 +489,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -441,11 +517,21 @@ def _internal_init(__self__, if app_service_id is None and not opts.urn: raise TypeError("Missing required property 'app_service_id'") __props__.__dict__["app_service_id"] = app_service_id + if authentication is not None and not isinstance(authentication, ConnectionAuthenticationArgs): + authentication = authentication or {} + def _setter(key, value): + authentication[key] = value + ConnectionAuthenticationArgs._configure(_setter, **authentication) if authentication is None and not opts.urn: raise TypeError("Missing required property 'authentication'") __props__.__dict__["authentication"] = authentication __props__.__dict__["client_type"] = client_type __props__.__dict__["name"] = name + if secret_store is not None and not isinstance(secret_store, ConnectionSecretStoreArgs): + secret_store = secret_store or {} + def _setter(key, value): + secret_store[key] = value + ConnectionSecretStoreArgs._configure(_setter, **secret_store) __props__.__dict__["secret_store"] = secret_store if target_resource_id is None and not opts.urn: raise TypeError("Missing required property 'target_resource_id'") diff --git a/sdk/python/pulumi_azure/appservice/custom_hostname_binding.py b/sdk/python/pulumi_azure/appservice/custom_hostname_binding.py index 88c2a72386..9318a7ad15 100644 --- a/sdk/python/pulumi_azure/appservice/custom_hostname_binding.py +++ b/sdk/python/pulumi_azure/appservice/custom_hostname_binding.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CustomHostnameBindingArgs', 'CustomHostnameBinding'] @@ -31,13 +31,44 @@ def __init__(__self__, *, > **NOTE:** `thumbprint` must be specified when `ssl_state` is set. """ - pulumi.set(__self__, "app_service_name", app_service_name) - pulumi.set(__self__, "hostname", hostname) - pulumi.set(__self__, "resource_group_name", resource_group_name) + CustomHostnameBindingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_name=app_service_name, + hostname=hostname, + resource_group_name=resource_group_name, + ssl_state=ssl_state, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_name: Optional[pulumi.Input[str]] = None, + hostname: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ssl_state: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_name is None and 'appServiceName' in kwargs: + app_service_name = kwargs['appServiceName'] + if app_service_name is None: + raise TypeError("Missing 'app_service_name' argument") + if hostname is None: + raise TypeError("Missing 'hostname' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ssl_state is None and 'sslState' in kwargs: + ssl_state = kwargs['sslState'] + + _setter("app_service_name", app_service_name) + _setter("hostname", hostname) + _setter("resource_group_name", resource_group_name) if ssl_state is not None: - pulumi.set(__self__, "ssl_state", ssl_state) + _setter("ssl_state", ssl_state) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="appServiceName") @@ -126,18 +157,47 @@ def __init__(__self__, *, > **NOTE:** `thumbprint` must be specified when `ssl_state` is set. :param pulumi.Input[str] virtual_ip: The virtual IP address assigned to the hostname if IP based SSL is enabled. """ + _CustomHostnameBindingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_name=app_service_name, + hostname=hostname, + resource_group_name=resource_group_name, + ssl_state=ssl_state, + thumbprint=thumbprint, + virtual_ip=virtual_ip, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_name: Optional[pulumi.Input[str]] = None, + hostname: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ssl_state: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + virtual_ip: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_name is None and 'appServiceName' in kwargs: + app_service_name = kwargs['appServiceName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if ssl_state is None and 'sslState' in kwargs: + ssl_state = kwargs['sslState'] + if virtual_ip is None and 'virtualIp' in kwargs: + virtual_ip = kwargs['virtualIp'] + if app_service_name is not None: - pulumi.set(__self__, "app_service_name", app_service_name) + _setter("app_service_name", app_service_name) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if ssl_state is not None: - pulumi.set(__self__, "ssl_state", ssl_state) + _setter("ssl_state", ssl_state) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) if virtual_ip is not None: - pulumi.set(__self__, "virtual_ip", virtual_ip) + _setter("virtual_ip", virtual_ip) @property @pulumi.getter(name="appServiceName") @@ -337,6 +397,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CustomHostnameBindingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/environment.py b/sdk/python/pulumi_azure/appservice/environment.py index 710b4c7b7f..e4476770f8 100644 --- a/sdk/python/pulumi_azure/appservice/environment.py +++ b/sdk/python/pulumi_azure/appservice/environment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,22 +41,67 @@ def __init__(__self__, *, :param pulumi.Input[str] pricing_tier: Pricing tier for the front end instances. Possible values are `I1`, `I2` and `I3`. Defaults to `I1`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "subnet_id", subnet_id) + EnvironmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + subnet_id=subnet_id, + allowed_user_ip_cidrs=allowed_user_ip_cidrs, + cluster_settings=cluster_settings, + front_end_scale_factor=front_end_scale_factor, + internal_load_balancing_mode=internal_load_balancing_mode, + name=name, + pricing_tier=pricing_tier, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + allowed_user_ip_cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cluster_settings: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentClusterSettingArgs']]]] = None, + front_end_scale_factor: Optional[pulumi.Input[int]] = None, + internal_load_balancing_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + pricing_tier: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if allowed_user_ip_cidrs is None and 'allowedUserIpCidrs' in kwargs: + allowed_user_ip_cidrs = kwargs['allowedUserIpCidrs'] + if cluster_settings is None and 'clusterSettings' in kwargs: + cluster_settings = kwargs['clusterSettings'] + if front_end_scale_factor is None and 'frontEndScaleFactor' in kwargs: + front_end_scale_factor = kwargs['frontEndScaleFactor'] + if internal_load_balancing_mode is None and 'internalLoadBalancingMode' in kwargs: + internal_load_balancing_mode = kwargs['internalLoadBalancingMode'] + if pricing_tier is None and 'pricingTier' in kwargs: + pricing_tier = kwargs['pricingTier'] + + _setter("resource_group_name", resource_group_name) + _setter("subnet_id", subnet_id) if allowed_user_ip_cidrs is not None: - pulumi.set(__self__, "allowed_user_ip_cidrs", allowed_user_ip_cidrs) + _setter("allowed_user_ip_cidrs", allowed_user_ip_cidrs) if cluster_settings is not None: - pulumi.set(__self__, "cluster_settings", cluster_settings) + _setter("cluster_settings", cluster_settings) if front_end_scale_factor is not None: - pulumi.set(__self__, "front_end_scale_factor", front_end_scale_factor) + _setter("front_end_scale_factor", front_end_scale_factor) if internal_load_balancing_mode is not None: - pulumi.set(__self__, "internal_load_balancing_mode", internal_load_balancing_mode) + _setter("internal_load_balancing_mode", internal_load_balancing_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pricing_tier is not None: - pulumi.set(__self__, "pricing_tier", pricing_tier) + _setter("pricing_tier", pricing_tier) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -207,32 +252,87 @@ def __init__(__self__, *, > **NOTE** a /24 or larger CIDR is required. Once associated with an ASE this size cannot be changed. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. Changing this forces a new resource to be created. """ + _EnvironmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_user_ip_cidrs=allowed_user_ip_cidrs, + cluster_settings=cluster_settings, + front_end_scale_factor=front_end_scale_factor, + internal_ip_address=internal_ip_address, + internal_load_balancing_mode=internal_load_balancing_mode, + location=location, + name=name, + outbound_ip_addresses=outbound_ip_addresses, + pricing_tier=pricing_tier, + resource_group_name=resource_group_name, + service_ip_address=service_ip_address, + subnet_id=subnet_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_user_ip_cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cluster_settings: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentClusterSettingArgs']]]] = None, + front_end_scale_factor: Optional[pulumi.Input[int]] = None, + internal_ip_address: Optional[pulumi.Input[str]] = None, + internal_load_balancing_mode: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + pricing_tier: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_ip_address: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_user_ip_cidrs is None and 'allowedUserIpCidrs' in kwargs: + allowed_user_ip_cidrs = kwargs['allowedUserIpCidrs'] + if cluster_settings is None and 'clusterSettings' in kwargs: + cluster_settings = kwargs['clusterSettings'] + if front_end_scale_factor is None and 'frontEndScaleFactor' in kwargs: + front_end_scale_factor = kwargs['frontEndScaleFactor'] + if internal_ip_address is None and 'internalIpAddress' in kwargs: + internal_ip_address = kwargs['internalIpAddress'] + if internal_load_balancing_mode is None and 'internalLoadBalancingMode' in kwargs: + internal_load_balancing_mode = kwargs['internalLoadBalancingMode'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if pricing_tier is None and 'pricingTier' in kwargs: + pricing_tier = kwargs['pricingTier'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_ip_address is None and 'serviceIpAddress' in kwargs: + service_ip_address = kwargs['serviceIpAddress'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if allowed_user_ip_cidrs is not None: - pulumi.set(__self__, "allowed_user_ip_cidrs", allowed_user_ip_cidrs) + _setter("allowed_user_ip_cidrs", allowed_user_ip_cidrs) if cluster_settings is not None: - pulumi.set(__self__, "cluster_settings", cluster_settings) + _setter("cluster_settings", cluster_settings) if front_end_scale_factor is not None: - pulumi.set(__self__, "front_end_scale_factor", front_end_scale_factor) + _setter("front_end_scale_factor", front_end_scale_factor) if internal_ip_address is not None: - pulumi.set(__self__, "internal_ip_address", internal_ip_address) + _setter("internal_ip_address", internal_ip_address) if internal_load_balancing_mode is not None: - pulumi.set(__self__, "internal_load_balancing_mode", internal_load_balancing_mode) + _setter("internal_load_balancing_mode", internal_load_balancing_mode) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if pricing_tier is not None: - pulumi.set(__self__, "pricing_tier", pricing_tier) + _setter("pricing_tier", pricing_tier) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_ip_address is not None: - pulumi.set(__self__, "service_ip_address", service_ip_address) + _setter("service_ip_address", service_ip_address) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="allowedUserIpCidrs") @@ -534,6 +634,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EnvironmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/environment_v3.py b/sdk/python/pulumi_azure/appservice/environment_v3.py index c12cb2ce3c..3056165920 100644 --- a/sdk/python/pulumi_azure/appservice/environment_v3.py +++ b/sdk/python/pulumi_azure/appservice/environment_v3.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -42,22 +42,67 @@ def __init__(__self__, *, > **NOTE:** Setting this value will provision 2 Physical Hosts for your App Service Environment V3, this is done at additional cost, please be aware of the pricing commitment in the [General Availability Notes](https://techcommunity.microsoft.com/t5/apps-on-azure/announcing-app-service-environment-v3-ga/ba-p/2517990) """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "subnet_id", subnet_id) + EnvironmentV3Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + subnet_id=subnet_id, + allow_new_private_endpoint_connections=allow_new_private_endpoint_connections, + cluster_settings=cluster_settings, + dedicated_host_count=dedicated_host_count, + internal_load_balancing_mode=internal_load_balancing_mode, + name=name, + tags=tags, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + allow_new_private_endpoint_connections: Optional[pulumi.Input[bool]] = None, + cluster_settings: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentV3ClusterSettingArgs']]]] = None, + dedicated_host_count: Optional[pulumi.Input[int]] = None, + internal_load_balancing_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if allow_new_private_endpoint_connections is None and 'allowNewPrivateEndpointConnections' in kwargs: + allow_new_private_endpoint_connections = kwargs['allowNewPrivateEndpointConnections'] + if cluster_settings is None and 'clusterSettings' in kwargs: + cluster_settings = kwargs['clusterSettings'] + if dedicated_host_count is None and 'dedicatedHostCount' in kwargs: + dedicated_host_count = kwargs['dedicatedHostCount'] + if internal_load_balancing_mode is None and 'internalLoadBalancingMode' in kwargs: + internal_load_balancing_mode = kwargs['internalLoadBalancingMode'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + + _setter("resource_group_name", resource_group_name) + _setter("subnet_id", subnet_id) if allow_new_private_endpoint_connections is not None: - pulumi.set(__self__, "allow_new_private_endpoint_connections", allow_new_private_endpoint_connections) + _setter("allow_new_private_endpoint_connections", allow_new_private_endpoint_connections) if cluster_settings is not None: - pulumi.set(__self__, "cluster_settings", cluster_settings) + _setter("cluster_settings", cluster_settings) if dedicated_host_count is not None: - pulumi.set(__self__, "dedicated_host_count", dedicated_host_count) + _setter("dedicated_host_count", dedicated_host_count) if internal_load_balancing_mode is not None: - pulumi.set(__self__, "internal_load_balancing_mode", internal_load_balancing_mode) + _setter("internal_load_balancing_mode", internal_load_balancing_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="resourceGroupName") @@ -218,42 +263,117 @@ def __init__(__self__, *, > **NOTE:** Setting this value will provision 2 Physical Hosts for your App Service Environment V3, this is done at additional cost, please be aware of the pricing commitment in the [General Availability Notes](https://techcommunity.microsoft.com/t5/apps-on-azure/announcing-app-service-environment-v3-ga/ba-p/2517990) """ + _EnvironmentV3State._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_new_private_endpoint_connections=allow_new_private_endpoint_connections, + cluster_settings=cluster_settings, + dedicated_host_count=dedicated_host_count, + dns_suffix=dns_suffix, + external_inbound_ip_addresses=external_inbound_ip_addresses, + inbound_network_dependencies=inbound_network_dependencies, + internal_inbound_ip_addresses=internal_inbound_ip_addresses, + internal_load_balancing_mode=internal_load_balancing_mode, + ip_ssl_address_count=ip_ssl_address_count, + linux_outbound_ip_addresses=linux_outbound_ip_addresses, + location=location, + name=name, + pricing_tier=pricing_tier, + resource_group_name=resource_group_name, + subnet_id=subnet_id, + tags=tags, + windows_outbound_ip_addresses=windows_outbound_ip_addresses, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_new_private_endpoint_connections: Optional[pulumi.Input[bool]] = None, + cluster_settings: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentV3ClusterSettingArgs']]]] = None, + dedicated_host_count: Optional[pulumi.Input[int]] = None, + dns_suffix: Optional[pulumi.Input[str]] = None, + external_inbound_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + inbound_network_dependencies: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentV3InboundNetworkDependencyArgs']]]] = None, + internal_inbound_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + internal_load_balancing_mode: Optional[pulumi.Input[str]] = None, + ip_ssl_address_count: Optional[pulumi.Input[int]] = None, + linux_outbound_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + pricing_tier: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + windows_outbound_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_new_private_endpoint_connections is None and 'allowNewPrivateEndpointConnections' in kwargs: + allow_new_private_endpoint_connections = kwargs['allowNewPrivateEndpointConnections'] + if cluster_settings is None and 'clusterSettings' in kwargs: + cluster_settings = kwargs['clusterSettings'] + if dedicated_host_count is None and 'dedicatedHostCount' in kwargs: + dedicated_host_count = kwargs['dedicatedHostCount'] + if dns_suffix is None and 'dnsSuffix' in kwargs: + dns_suffix = kwargs['dnsSuffix'] + if external_inbound_ip_addresses is None and 'externalInboundIpAddresses' in kwargs: + external_inbound_ip_addresses = kwargs['externalInboundIpAddresses'] + if inbound_network_dependencies is None and 'inboundNetworkDependencies' in kwargs: + inbound_network_dependencies = kwargs['inboundNetworkDependencies'] + if internal_inbound_ip_addresses is None and 'internalInboundIpAddresses' in kwargs: + internal_inbound_ip_addresses = kwargs['internalInboundIpAddresses'] + if internal_load_balancing_mode is None and 'internalLoadBalancingMode' in kwargs: + internal_load_balancing_mode = kwargs['internalLoadBalancingMode'] + if ip_ssl_address_count is None and 'ipSslAddressCount' in kwargs: + ip_ssl_address_count = kwargs['ipSslAddressCount'] + if linux_outbound_ip_addresses is None and 'linuxOutboundIpAddresses' in kwargs: + linux_outbound_ip_addresses = kwargs['linuxOutboundIpAddresses'] + if pricing_tier is None and 'pricingTier' in kwargs: + pricing_tier = kwargs['pricingTier'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if windows_outbound_ip_addresses is None and 'windowsOutboundIpAddresses' in kwargs: + windows_outbound_ip_addresses = kwargs['windowsOutboundIpAddresses'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + if allow_new_private_endpoint_connections is not None: - pulumi.set(__self__, "allow_new_private_endpoint_connections", allow_new_private_endpoint_connections) + _setter("allow_new_private_endpoint_connections", allow_new_private_endpoint_connections) if cluster_settings is not None: - pulumi.set(__self__, "cluster_settings", cluster_settings) + _setter("cluster_settings", cluster_settings) if dedicated_host_count is not None: - pulumi.set(__self__, "dedicated_host_count", dedicated_host_count) + _setter("dedicated_host_count", dedicated_host_count) if dns_suffix is not None: - pulumi.set(__self__, "dns_suffix", dns_suffix) + _setter("dns_suffix", dns_suffix) if external_inbound_ip_addresses is not None: - pulumi.set(__self__, "external_inbound_ip_addresses", external_inbound_ip_addresses) + _setter("external_inbound_ip_addresses", external_inbound_ip_addresses) if inbound_network_dependencies is not None: - pulumi.set(__self__, "inbound_network_dependencies", inbound_network_dependencies) + _setter("inbound_network_dependencies", inbound_network_dependencies) if internal_inbound_ip_addresses is not None: - pulumi.set(__self__, "internal_inbound_ip_addresses", internal_inbound_ip_addresses) + _setter("internal_inbound_ip_addresses", internal_inbound_ip_addresses) if internal_load_balancing_mode is not None: - pulumi.set(__self__, "internal_load_balancing_mode", internal_load_balancing_mode) + _setter("internal_load_balancing_mode", internal_load_balancing_mode) if ip_ssl_address_count is not None: - pulumi.set(__self__, "ip_ssl_address_count", ip_ssl_address_count) + _setter("ip_ssl_address_count", ip_ssl_address_count) if linux_outbound_ip_addresses is not None: - pulumi.set(__self__, "linux_outbound_ip_addresses", linux_outbound_ip_addresses) + _setter("linux_outbound_ip_addresses", linux_outbound_ip_addresses) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pricing_tier is not None: - pulumi.set(__self__, "pricing_tier", pricing_tier) + _setter("pricing_tier", pricing_tier) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if windows_outbound_ip_addresses is not None: - pulumi.set(__self__, "windows_outbound_ip_addresses", windows_outbound_ip_addresses) + _setter("windows_outbound_ip_addresses", windows_outbound_ip_addresses) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="allowNewPrivateEndpointConnections") @@ -541,6 +661,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EnvironmentV3Args._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/function_app.py b/sdk/python/pulumi_azure/appservice/function_app.py index ddf98ee00c..a7ecb4e6d4 100644 --- a/sdk/python/pulumi_azure/appservice/function_app.py +++ b/sdk/python/pulumi_azure/appservice/function_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -69,44 +69,133 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] version: The runtime version associated with the Function App. Defaults to `~1`. """ - pulumi.set(__self__, "app_service_plan_id", app_service_plan_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) - pulumi.set(__self__, "storage_account_name", storage_account_name) + FunctionAppArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_plan_id=app_service_plan_id, + resource_group_name=resource_group_name, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + app_settings=app_settings, + auth_settings=auth_settings, + client_cert_mode=client_cert_mode, + connection_strings=connection_strings, + daily_memory_time_quota=daily_memory_time_quota, + enable_builtin_logging=enable_builtin_logging, + enabled=enabled, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + location=location, + name=name, + os_type=os_type, + site_config=site_config, + source_control=source_control, + tags=tags, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_plan_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['FunctionAppAuthSettingsArgs']] = None, + client_cert_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionAppConnectionStringArgs']]]] = None, + daily_memory_time_quota: Optional[pulumi.Input[int]] = None, + enable_builtin_logging: Optional[pulumi.Input[bool]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['FunctionAppIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + os_type: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['FunctionAppSiteConfigArgs']] = None, + source_control: Optional[pulumi.Input['FunctionAppSourceControlArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_plan_id is None and 'appServicePlanId' in kwargs: + app_service_plan_id = kwargs['appServicePlanId'] + if app_service_plan_id is None: + raise TypeError("Missing 'app_service_plan_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key is None: + raise TypeError("Missing 'storage_account_access_key' argument") + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if client_cert_mode is None and 'clientCertMode' in kwargs: + client_cert_mode = kwargs['clientCertMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if daily_memory_time_quota is None and 'dailyMemoryTimeQuota' in kwargs: + daily_memory_time_quota = kwargs['dailyMemoryTimeQuota'] + if enable_builtin_logging is None and 'enableBuiltinLogging' in kwargs: + enable_builtin_logging = kwargs['enableBuiltinLogging'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if source_control is None and 'sourceControl' in kwargs: + source_control = kwargs['sourceControl'] + + _setter("app_service_plan_id", app_service_plan_id) + _setter("resource_group_name", resource_group_name) + _setter("storage_account_access_key", storage_account_access_key) + _setter("storage_account_name", storage_account_name) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if client_cert_mode is not None: - pulumi.set(__self__, "client_cert_mode", client_cert_mode) + _setter("client_cert_mode", client_cert_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if daily_memory_time_quota is not None: - pulumi.set(__self__, "daily_memory_time_quota", daily_memory_time_quota) + _setter("daily_memory_time_quota", daily_memory_time_quota) if enable_builtin_logging is not None: - pulumi.set(__self__, "enable_builtin_logging", enable_builtin_logging) + _setter("enable_builtin_logging", enable_builtin_logging) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if source_control is not None: - pulumi.set(__self__, "source_control", source_control) + _setter("source_control", source_control) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="appServicePlanId") @@ -437,60 +526,163 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] version: The runtime version associated with the Function App. Defaults to `~1`. """ + _FunctionAppState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_plan_id=app_service_plan_id, + app_settings=app_settings, + auth_settings=auth_settings, + client_cert_mode=client_cert_mode, + connection_strings=connection_strings, + custom_domain_verification_id=custom_domain_verification_id, + daily_memory_time_quota=daily_memory_time_quota, + default_hostname=default_hostname, + enable_builtin_logging=enable_builtin_logging, + enabled=enabled, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + kind=kind, + location=location, + name=name, + os_type=os_type, + outbound_ip_addresses=outbound_ip_addresses, + possible_outbound_ip_addresses=possible_outbound_ip_addresses, + resource_group_name=resource_group_name, + site_config=site_config, + site_credentials=site_credentials, + source_control=source_control, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + tags=tags, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_plan_id: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['FunctionAppAuthSettingsArgs']] = None, + client_cert_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionAppConnectionStringArgs']]]] = None, + custom_domain_verification_id: Optional[pulumi.Input[str]] = None, + daily_memory_time_quota: Optional[pulumi.Input[int]] = None, + default_hostname: Optional[pulumi.Input[str]] = None, + enable_builtin_logging: Optional[pulumi.Input[bool]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['FunctionAppIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + os_type: Optional[pulumi.Input[str]] = None, + outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + possible_outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['FunctionAppSiteConfigArgs']] = None, + site_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionAppSiteCredentialArgs']]]] = None, + source_control: Optional[pulumi.Input['FunctionAppSourceControlArgs']] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_plan_id is None and 'appServicePlanId' in kwargs: + app_service_plan_id = kwargs['appServicePlanId'] + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if client_cert_mode is None and 'clientCertMode' in kwargs: + client_cert_mode = kwargs['clientCertMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if custom_domain_verification_id is None and 'customDomainVerificationId' in kwargs: + custom_domain_verification_id = kwargs['customDomainVerificationId'] + if daily_memory_time_quota is None and 'dailyMemoryTimeQuota' in kwargs: + daily_memory_time_quota = kwargs['dailyMemoryTimeQuota'] + if default_hostname is None and 'defaultHostname' in kwargs: + default_hostname = kwargs['defaultHostname'] + if enable_builtin_logging is None and 'enableBuiltinLogging' in kwargs: + enable_builtin_logging = kwargs['enableBuiltinLogging'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if possible_outbound_ip_addresses is None and 'possibleOutboundIpAddresses' in kwargs: + possible_outbound_ip_addresses = kwargs['possibleOutboundIpAddresses'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_credentials is None and 'siteCredentials' in kwargs: + site_credentials = kwargs['siteCredentials'] + if source_control is None and 'sourceControl' in kwargs: + source_control = kwargs['sourceControl'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if app_service_plan_id is not None: - pulumi.set(__self__, "app_service_plan_id", app_service_plan_id) + _setter("app_service_plan_id", app_service_plan_id) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if client_cert_mode is not None: - pulumi.set(__self__, "client_cert_mode", client_cert_mode) + _setter("client_cert_mode", client_cert_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if custom_domain_verification_id is not None: - pulumi.set(__self__, "custom_domain_verification_id", custom_domain_verification_id) + _setter("custom_domain_verification_id", custom_domain_verification_id) if daily_memory_time_quota is not None: - pulumi.set(__self__, "daily_memory_time_quota", daily_memory_time_quota) + _setter("daily_memory_time_quota", daily_memory_time_quota) if default_hostname is not None: - pulumi.set(__self__, "default_hostname", default_hostname) + _setter("default_hostname", default_hostname) if enable_builtin_logging is not None: - pulumi.set(__self__, "enable_builtin_logging", enable_builtin_logging) + _setter("enable_builtin_logging", enable_builtin_logging) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if possible_outbound_ip_addresses is not None: - pulumi.set(__self__, "possible_outbound_ip_addresses", possible_outbound_ip_addresses) + _setter("possible_outbound_ip_addresses", possible_outbound_ip_addresses) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if site_credentials is not None: - pulumi.set(__self__, "site_credentials", site_credentials) + _setter("site_credentials", site_credentials) if source_control is not None: - pulumi.set(__self__, "source_control", source_control) + _setter("source_control", source_control) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="appServicePlanId") @@ -1106,6 +1298,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FunctionAppArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1145,6 +1341,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'app_service_plan_id'") __props__.__dict__["app_service_plan_id"] = app_service_plan_id __props__.__dict__["app_settings"] = app_settings + if auth_settings is not None and not isinstance(auth_settings, FunctionAppAuthSettingsArgs): + auth_settings = auth_settings or {} + def _setter(key, value): + auth_settings[key] = value + FunctionAppAuthSettingsArgs._configure(_setter, **auth_settings) __props__.__dict__["auth_settings"] = auth_settings __props__.__dict__["client_cert_mode"] = client_cert_mode __props__.__dict__["connection_strings"] = connection_strings @@ -1152,6 +1353,11 @@ def _internal_init(__self__, __props__.__dict__["enable_builtin_logging"] = enable_builtin_logging __props__.__dict__["enabled"] = enabled __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, FunctionAppIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + FunctionAppIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["key_vault_reference_identity_id"] = key_vault_reference_identity_id __props__.__dict__["location"] = location @@ -1160,7 +1366,17 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if site_config is not None and not isinstance(site_config, FunctionAppSiteConfigArgs): + site_config = site_config or {} + def _setter(key, value): + site_config[key] = value + FunctionAppSiteConfigArgs._configure(_setter, **site_config) __props__.__dict__["site_config"] = site_config + if source_control is not None and not isinstance(source_control, FunctionAppSourceControlArgs): + source_control = source_control or {} + def _setter(key, value): + source_control[key] = value + FunctionAppSourceControlArgs._configure(_setter, **source_control) __props__.__dict__["source_control"] = source_control if storage_account_access_key is None and not opts.urn: raise TypeError("Missing required property 'storage_account_access_key'") diff --git a/sdk/python/pulumi_azure/appservice/function_app_active_slot.py b/sdk/python/pulumi_azure/appservice/function_app_active_slot.py index b9264854dc..ca44f0d903 100644 --- a/sdk/python/pulumi_azure/appservice/function_app_active_slot.py +++ b/sdk/python/pulumi_azure/appservice/function_app_active_slot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FunctionAppActiveSlotArgs', 'FunctionAppActiveSlot'] @@ -21,9 +21,28 @@ def __init__(__self__, *, :param pulumi.Input[str] slot_id: The ID of the Slot to swap with `Production`. :param pulumi.Input[bool] overwrite_network_config: The swap action should overwrite the Production slot's network configuration with the configuration from this slot. Defaults to `true`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "slot_id", slot_id) + FunctionAppActiveSlotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + slot_id=slot_id, + overwrite_network_config=overwrite_network_config, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + slot_id: Optional[pulumi.Input[str]] = None, + overwrite_network_config: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if slot_id is None and 'slotId' in kwargs: + slot_id = kwargs['slotId'] + if slot_id is None: + raise TypeError("Missing 'slot_id' argument") + if overwrite_network_config is None and 'overwriteNetworkConfig' in kwargs: + overwrite_network_config = kwargs['overwriteNetworkConfig'] + + _setter("slot_id", slot_id) if overwrite_network_config is not None: - pulumi.set(__self__, "overwrite_network_config", overwrite_network_config) + _setter("overwrite_network_config", overwrite_network_config) @property @pulumi.getter(name="slotId") @@ -62,12 +81,33 @@ def __init__(__self__, *, :param pulumi.Input[bool] overwrite_network_config: The swap action should overwrite the Production slot's network configuration with the configuration from this slot. Defaults to `true`. Changing this forces a new resource to be created. :param pulumi.Input[str] slot_id: The ID of the Slot to swap with `Production`. """ + _FunctionAppActiveSlotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + last_successful_swap=last_successful_swap, + overwrite_network_config=overwrite_network_config, + slot_id=slot_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + last_successful_swap: Optional[pulumi.Input[str]] = None, + overwrite_network_config: Optional[pulumi.Input[bool]] = None, + slot_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if last_successful_swap is None and 'lastSuccessfulSwap' in kwargs: + last_successful_swap = kwargs['lastSuccessfulSwap'] + if overwrite_network_config is None and 'overwriteNetworkConfig' in kwargs: + overwrite_network_config = kwargs['overwriteNetworkConfig'] + if slot_id is None and 'slotId' in kwargs: + slot_id = kwargs['slotId'] + if last_successful_swap is not None: - pulumi.set(__self__, "last_successful_swap", last_successful_swap) + _setter("last_successful_swap", last_successful_swap) if overwrite_network_config is not None: - pulumi.set(__self__, "overwrite_network_config", overwrite_network_config) + _setter("overwrite_network_config", overwrite_network_config) if slot_id is not None: - pulumi.set(__self__, "slot_id", slot_id) + _setter("slot_id", slot_id) @property @pulumi.getter(name="lastSuccessfulSwap") @@ -277,6 +317,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FunctionAppActiveSlotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/function_app_function.py b/sdk/python/pulumi_azure/appservice/function_app_function.py index 4818336517..1ff8e648e0 100644 --- a/sdk/python/pulumi_azure/appservice/function_app_function.py +++ b/sdk/python/pulumi_azure/appservice/function_app_function.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,18 +35,51 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the function. Changing this forces a new resource to be created. :param pulumi.Input[str] test_data: The test data for the function. """ - pulumi.set(__self__, "config_json", config_json) - pulumi.set(__self__, "function_app_id", function_app_id) + FunctionAppFunctionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + config_json=config_json, + function_app_id=function_app_id, + enabled=enabled, + files=files, + language=language, + name=name, + test_data=test_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + config_json: Optional[pulumi.Input[str]] = None, + function_app_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + files: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionAppFunctionFileArgs']]]] = None, + language: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + test_data: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if config_json is None and 'configJson' in kwargs: + config_json = kwargs['configJson'] + if config_json is None: + raise TypeError("Missing 'config_json' argument") + if function_app_id is None and 'functionAppId' in kwargs: + function_app_id = kwargs['functionAppId'] + if function_app_id is None: + raise TypeError("Missing 'function_app_id' argument") + if test_data is None and 'testData' in kwargs: + test_data = kwargs['testData'] + + _setter("config_json", config_json) + _setter("function_app_id", function_app_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if files is not None: - pulumi.set(__self__, "files", files) + _setter("files", files) if language is not None: - pulumi.set(__self__, "language", language) + _setter("language", language) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if test_data is not None: - pulumi.set(__self__, "test_data", test_data) + _setter("test_data", test_data) @property @pulumi.getter(name="configJson") @@ -171,34 +204,89 @@ def __init__(__self__, *, :param pulumi.Input[str] test_data_url: The Test data URL. :param pulumi.Input[str] url: The function URL. """ + _FunctionAppFunctionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + config_json=config_json, + config_url=config_url, + enabled=enabled, + files=files, + function_app_id=function_app_id, + invocation_url=invocation_url, + language=language, + name=name, + script_root_path_url=script_root_path_url, + script_url=script_url, + secrets_file_url=secrets_file_url, + test_data=test_data, + test_data_url=test_data_url, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + config_json: Optional[pulumi.Input[str]] = None, + config_url: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + files: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionAppFunctionFileArgs']]]] = None, + function_app_id: Optional[pulumi.Input[str]] = None, + invocation_url: Optional[pulumi.Input[str]] = None, + language: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + script_root_path_url: Optional[pulumi.Input[str]] = None, + script_url: Optional[pulumi.Input[str]] = None, + secrets_file_url: Optional[pulumi.Input[str]] = None, + test_data: Optional[pulumi.Input[str]] = None, + test_data_url: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if config_json is None and 'configJson' in kwargs: + config_json = kwargs['configJson'] + if config_url is None and 'configUrl' in kwargs: + config_url = kwargs['configUrl'] + if function_app_id is None and 'functionAppId' in kwargs: + function_app_id = kwargs['functionAppId'] + if invocation_url is None and 'invocationUrl' in kwargs: + invocation_url = kwargs['invocationUrl'] + if script_root_path_url is None and 'scriptRootPathUrl' in kwargs: + script_root_path_url = kwargs['scriptRootPathUrl'] + if script_url is None and 'scriptUrl' in kwargs: + script_url = kwargs['scriptUrl'] + if secrets_file_url is None and 'secretsFileUrl' in kwargs: + secrets_file_url = kwargs['secretsFileUrl'] + if test_data is None and 'testData' in kwargs: + test_data = kwargs['testData'] + if test_data_url is None and 'testDataUrl' in kwargs: + test_data_url = kwargs['testDataUrl'] + if config_json is not None: - pulumi.set(__self__, "config_json", config_json) + _setter("config_json", config_json) if config_url is not None: - pulumi.set(__self__, "config_url", config_url) + _setter("config_url", config_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if files is not None: - pulumi.set(__self__, "files", files) + _setter("files", files) if function_app_id is not None: - pulumi.set(__self__, "function_app_id", function_app_id) + _setter("function_app_id", function_app_id) if invocation_url is not None: - pulumi.set(__self__, "invocation_url", invocation_url) + _setter("invocation_url", invocation_url) if language is not None: - pulumi.set(__self__, "language", language) + _setter("language", language) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if script_root_path_url is not None: - pulumi.set(__self__, "script_root_path_url", script_root_path_url) + _setter("script_root_path_url", script_root_path_url) if script_url is not None: - pulumi.set(__self__, "script_url", script_url) + _setter("script_url", script_url) if secrets_file_url is not None: - pulumi.set(__self__, "secrets_file_url", secrets_file_url) + _setter("secrets_file_url", secrets_file_url) if test_data is not None: - pulumi.set(__self__, "test_data", test_data) + _setter("test_data", test_data) if test_data_url is not None: - pulumi.set(__self__, "test_data_url", test_data_url) + _setter("test_data_url", test_data_url) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="configJson") @@ -666,6 +754,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FunctionAppFunctionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/function_app_hybrid_connection.py b/sdk/python/pulumi_azure/appservice/function_app_hybrid_connection.py index acee7996cd..b19047a456 100644 --- a/sdk/python/pulumi_azure/appservice/function_app_hybrid_connection.py +++ b/sdk/python/pulumi_azure/appservice/function_app_hybrid_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FunctionAppHybridConnectionArgs', 'FunctionAppHybridConnection'] @@ -27,12 +27,45 @@ def __init__(__self__, *, :param pulumi.Input[str] relay_id: The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created. :param pulumi.Input[str] send_key_name: The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey` """ - pulumi.set(__self__, "function_app_id", function_app_id) - pulumi.set(__self__, "hostname", hostname) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "relay_id", relay_id) + FunctionAppHybridConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_app_id=function_app_id, + hostname=hostname, + port=port, + relay_id=relay_id, + send_key_name=send_key_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_app_id: Optional[pulumi.Input[str]] = None, + hostname: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + relay_id: Optional[pulumi.Input[str]] = None, + send_key_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_app_id is None and 'functionAppId' in kwargs: + function_app_id = kwargs['functionAppId'] + if function_app_id is None: + raise TypeError("Missing 'function_app_id' argument") + if hostname is None: + raise TypeError("Missing 'hostname' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if relay_id is None and 'relayId' in kwargs: + relay_id = kwargs['relayId'] + if relay_id is None: + raise TypeError("Missing 'relay_id' argument") + if send_key_name is None and 'sendKeyName' in kwargs: + send_key_name = kwargs['sendKeyName'] + + _setter("function_app_id", function_app_id) + _setter("hostname", hostname) + _setter("port", port) + _setter("relay_id", relay_id) if send_key_name is not None: - pulumi.set(__self__, "send_key_name", send_key_name) + _setter("send_key_name", send_key_name) @property @pulumi.getter(name="functionAppId") @@ -121,26 +154,71 @@ def __init__(__self__, *, :param pulumi.Input[str] service_bus_namespace: The Service Bus Namespace. :param pulumi.Input[str] service_bus_suffix: The suffix for the endpoint. """ + _FunctionAppHybridConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_app_id=function_app_id, + hostname=hostname, + namespace_name=namespace_name, + port=port, + relay_id=relay_id, + relay_name=relay_name, + send_key_name=send_key_name, + send_key_value=send_key_value, + service_bus_namespace=service_bus_namespace, + service_bus_suffix=service_bus_suffix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_app_id: Optional[pulumi.Input[str]] = None, + hostname: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + relay_id: Optional[pulumi.Input[str]] = None, + relay_name: Optional[pulumi.Input[str]] = None, + send_key_name: Optional[pulumi.Input[str]] = None, + send_key_value: Optional[pulumi.Input[str]] = None, + service_bus_namespace: Optional[pulumi.Input[str]] = None, + service_bus_suffix: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_app_id is None and 'functionAppId' in kwargs: + function_app_id = kwargs['functionAppId'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if relay_id is None and 'relayId' in kwargs: + relay_id = kwargs['relayId'] + if relay_name is None and 'relayName' in kwargs: + relay_name = kwargs['relayName'] + if send_key_name is None and 'sendKeyName' in kwargs: + send_key_name = kwargs['sendKeyName'] + if send_key_value is None and 'sendKeyValue' in kwargs: + send_key_value = kwargs['sendKeyValue'] + if service_bus_namespace is None and 'serviceBusNamespace' in kwargs: + service_bus_namespace = kwargs['serviceBusNamespace'] + if service_bus_suffix is None and 'serviceBusSuffix' in kwargs: + service_bus_suffix = kwargs['serviceBusSuffix'] + if function_app_id is not None: - pulumi.set(__self__, "function_app_id", function_app_id) + _setter("function_app_id", function_app_id) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if relay_id is not None: - pulumi.set(__self__, "relay_id", relay_id) + _setter("relay_id", relay_id) if relay_name is not None: - pulumi.set(__self__, "relay_name", relay_name) + _setter("relay_name", relay_name) if send_key_name is not None: - pulumi.set(__self__, "send_key_name", send_key_name) + _setter("send_key_name", send_key_name) if send_key_value is not None: - pulumi.set(__self__, "send_key_value", send_key_value) + _setter("send_key_value", send_key_value) if service_bus_namespace is not None: - pulumi.set(__self__, "service_bus_namespace", service_bus_namespace) + _setter("service_bus_namespace", service_bus_namespace) if service_bus_suffix is not None: - pulumi.set(__self__, "service_bus_suffix", service_bus_suffix) + _setter("service_bus_suffix", service_bus_suffix) @property @pulumi.getter(name="functionAppId") @@ -406,6 +484,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FunctionAppHybridConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/function_app_slot.py b/sdk/python/pulumi_azure/appservice/function_app_slot.py index a77b32f2ac..c38f4ec20b 100644 --- a/sdk/python/pulumi_azure/appservice/function_app_slot.py +++ b/sdk/python/pulumi_azure/appservice/function_app_slot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -65,39 +65,122 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] version: The runtime version associated with the Function App. Defaults to `~1`. """ - pulumi.set(__self__, "app_service_plan_id", app_service_plan_id) - pulumi.set(__self__, "function_app_name", function_app_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) - pulumi.set(__self__, "storage_account_name", storage_account_name) + FunctionAppSlotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_plan_id=app_service_plan_id, + function_app_name=function_app_name, + resource_group_name=resource_group_name, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + app_settings=app_settings, + auth_settings=auth_settings, + connection_strings=connection_strings, + daily_memory_time_quota=daily_memory_time_quota, + enable_builtin_logging=enable_builtin_logging, + enabled=enabled, + https_only=https_only, + identity=identity, + location=location, + name=name, + os_type=os_type, + site_config=site_config, + tags=tags, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_plan_id: Optional[pulumi.Input[str]] = None, + function_app_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['FunctionAppSlotAuthSettingsArgs']] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionAppSlotConnectionStringArgs']]]] = None, + daily_memory_time_quota: Optional[pulumi.Input[int]] = None, + enable_builtin_logging: Optional[pulumi.Input[bool]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['FunctionAppSlotIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + os_type: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['FunctionAppSlotSiteConfigArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_plan_id is None and 'appServicePlanId' in kwargs: + app_service_plan_id = kwargs['appServicePlanId'] + if app_service_plan_id is None: + raise TypeError("Missing 'app_service_plan_id' argument") + if function_app_name is None and 'functionAppName' in kwargs: + function_app_name = kwargs['functionAppName'] + if function_app_name is None: + raise TypeError("Missing 'function_app_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key is None: + raise TypeError("Missing 'storage_account_access_key' argument") + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if daily_memory_time_quota is None and 'dailyMemoryTimeQuota' in kwargs: + daily_memory_time_quota = kwargs['dailyMemoryTimeQuota'] + if enable_builtin_logging is None and 'enableBuiltinLogging' in kwargs: + enable_builtin_logging = kwargs['enableBuiltinLogging'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + + _setter("app_service_plan_id", app_service_plan_id) + _setter("function_app_name", function_app_name) + _setter("resource_group_name", resource_group_name) + _setter("storage_account_access_key", storage_account_access_key) + _setter("storage_account_name", storage_account_name) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if daily_memory_time_quota is not None: - pulumi.set(__self__, "daily_memory_time_quota", daily_memory_time_quota) + _setter("daily_memory_time_quota", daily_memory_time_quota) if enable_builtin_logging is not None: - pulumi.set(__self__, "enable_builtin_logging", enable_builtin_logging) + _setter("enable_builtin_logging", enable_builtin_logging) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="appServicePlanId") @@ -398,54 +481,145 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] version: The runtime version associated with the Function App. Defaults to `~1`. """ + _FunctionAppSlotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_plan_id=app_service_plan_id, + app_settings=app_settings, + auth_settings=auth_settings, + connection_strings=connection_strings, + daily_memory_time_quota=daily_memory_time_quota, + default_hostname=default_hostname, + enable_builtin_logging=enable_builtin_logging, + enabled=enabled, + function_app_name=function_app_name, + https_only=https_only, + identity=identity, + kind=kind, + location=location, + name=name, + os_type=os_type, + outbound_ip_addresses=outbound_ip_addresses, + possible_outbound_ip_addresses=possible_outbound_ip_addresses, + resource_group_name=resource_group_name, + site_config=site_config, + site_credentials=site_credentials, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + tags=tags, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_plan_id: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['FunctionAppSlotAuthSettingsArgs']] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionAppSlotConnectionStringArgs']]]] = None, + daily_memory_time_quota: Optional[pulumi.Input[int]] = None, + default_hostname: Optional[pulumi.Input[str]] = None, + enable_builtin_logging: Optional[pulumi.Input[bool]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + function_app_name: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['FunctionAppSlotIdentityArgs']] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + os_type: Optional[pulumi.Input[str]] = None, + outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + possible_outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['FunctionAppSlotSiteConfigArgs']] = None, + site_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionAppSlotSiteCredentialArgs']]]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_plan_id is None and 'appServicePlanId' in kwargs: + app_service_plan_id = kwargs['appServicePlanId'] + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if daily_memory_time_quota is None and 'dailyMemoryTimeQuota' in kwargs: + daily_memory_time_quota = kwargs['dailyMemoryTimeQuota'] + if default_hostname is None and 'defaultHostname' in kwargs: + default_hostname = kwargs['defaultHostname'] + if enable_builtin_logging is None and 'enableBuiltinLogging' in kwargs: + enable_builtin_logging = kwargs['enableBuiltinLogging'] + if function_app_name is None and 'functionAppName' in kwargs: + function_app_name = kwargs['functionAppName'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if possible_outbound_ip_addresses is None and 'possibleOutboundIpAddresses' in kwargs: + possible_outbound_ip_addresses = kwargs['possibleOutboundIpAddresses'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_credentials is None and 'siteCredentials' in kwargs: + site_credentials = kwargs['siteCredentials'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if app_service_plan_id is not None: - pulumi.set(__self__, "app_service_plan_id", app_service_plan_id) + _setter("app_service_plan_id", app_service_plan_id) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if daily_memory_time_quota is not None: - pulumi.set(__self__, "daily_memory_time_quota", daily_memory_time_quota) + _setter("daily_memory_time_quota", daily_memory_time_quota) if default_hostname is not None: - pulumi.set(__self__, "default_hostname", default_hostname) + _setter("default_hostname", default_hostname) if enable_builtin_logging is not None: - pulumi.set(__self__, "enable_builtin_logging", enable_builtin_logging) + _setter("enable_builtin_logging", enable_builtin_logging) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if function_app_name is not None: - pulumi.set(__self__, "function_app_name", function_app_name) + _setter("function_app_name", function_app_name) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if possible_outbound_ip_addresses is not None: - pulumi.set(__self__, "possible_outbound_ip_addresses", possible_outbound_ip_addresses) + _setter("possible_outbound_ip_addresses", possible_outbound_ip_addresses) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if site_credentials is not None: - pulumi.set(__self__, "site_credentials", site_credentials) + _setter("site_credentials", site_credentials) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="appServicePlanId") @@ -911,6 +1085,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FunctionAppSlotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -948,6 +1126,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'app_service_plan_id'") __props__.__dict__["app_service_plan_id"] = app_service_plan_id __props__.__dict__["app_settings"] = app_settings + if auth_settings is not None and not isinstance(auth_settings, FunctionAppSlotAuthSettingsArgs): + auth_settings = auth_settings or {} + def _setter(key, value): + auth_settings[key] = value + FunctionAppSlotAuthSettingsArgs._configure(_setter, **auth_settings) __props__.__dict__["auth_settings"] = auth_settings __props__.__dict__["connection_strings"] = connection_strings __props__.__dict__["daily_memory_time_quota"] = daily_memory_time_quota @@ -957,6 +1140,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'function_app_name'") __props__.__dict__["function_app_name"] = function_app_name __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, FunctionAppSlotIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + FunctionAppSlotIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name @@ -964,6 +1152,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if site_config is not None and not isinstance(site_config, FunctionAppSlotSiteConfigArgs): + site_config = site_config or {} + def _setter(key, value): + site_config[key] = value + FunctionAppSlotSiteConfigArgs._configure(_setter, **site_config) __props__.__dict__["site_config"] = site_config if storage_account_access_key is None and not opts.urn: raise TypeError("Missing required property 'storage_account_access_key'") diff --git a/sdk/python/pulumi_azure/appservice/get_app_service.py b/sdk/python/pulumi_azure/appservice/get_app_service.py index abeb7b374c..2f9578438b 100644 --- a/sdk/python/pulumi_azure/appservice/get_app_service.py +++ b/sdk/python/pulumi_azure/appservice/get_app_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appservice/get_app_service_environment.py b/sdk/python/pulumi_azure/appservice/get_app_service_environment.py index dfa757eaef..96f9437227 100644 --- a/sdk/python/pulumi_azure/appservice/get_app_service_environment.py +++ b/sdk/python/pulumi_azure/appservice/get_app_service_environment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appservice/get_app_service_plan.py b/sdk/python/pulumi_azure/appservice/get_app_service_plan.py index 119520a562..4e7c259434 100644 --- a/sdk/python/pulumi_azure/appservice/get_app_service_plan.py +++ b/sdk/python/pulumi_azure/appservice/get_app_service_plan.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appservice/get_certificate.py b/sdk/python/pulumi_azure/appservice/get_certificate.py index afd247b874..04240b1e8b 100644 --- a/sdk/python/pulumi_azure/appservice/get_certificate.py +++ b/sdk/python/pulumi_azure/appservice/get_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/appservice/get_certificate_order.py b/sdk/python/pulumi_azure/appservice/get_certificate_order.py index 723d6450dd..64e5d184af 100644 --- a/sdk/python/pulumi_azure/appservice/get_certificate_order.py +++ b/sdk/python/pulumi_azure/appservice/get_certificate_order.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appservice/get_environment_v3.py b/sdk/python/pulumi_azure/appservice/get_environment_v3.py index 21ad08191a..6f997734b6 100644 --- a/sdk/python/pulumi_azure/appservice/get_environment_v3.py +++ b/sdk/python/pulumi_azure/appservice/get_environment_v3.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appservice/get_function_app.py b/sdk/python/pulumi_azure/appservice/get_function_app.py index 2f015e2785..734681d1fd 100644 --- a/sdk/python/pulumi_azure/appservice/get_function_app.py +++ b/sdk/python/pulumi_azure/appservice/get_function_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appservice/get_function_app_host_keys.py b/sdk/python/pulumi_azure/appservice/get_function_app_host_keys.py index 4621200bf0..b945c8eda0 100644 --- a/sdk/python/pulumi_azure/appservice/get_function_app_host_keys.py +++ b/sdk/python/pulumi_azure/appservice/get_function_app_host_keys.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/appservice/get_linux_function_app.py b/sdk/python/pulumi_azure/appservice/get_linux_function_app.py index 2afa7b1571..c1939e9644 100644 --- a/sdk/python/pulumi_azure/appservice/get_linux_function_app.py +++ b/sdk/python/pulumi_azure/appservice/get_linux_function_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appservice/get_linux_web_app.py b/sdk/python/pulumi_azure/appservice/get_linux_web_app.py index 2184ccc5b2..82f158a029 100644 --- a/sdk/python/pulumi_azure/appservice/get_linux_web_app.py +++ b/sdk/python/pulumi_azure/appservice/get_linux_web_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appservice/get_service_plan.py b/sdk/python/pulumi_azure/appservice/get_service_plan.py index b65fb76700..00fa41480b 100644 --- a/sdk/python/pulumi_azure/appservice/get_service_plan.py +++ b/sdk/python/pulumi_azure/appservice/get_service_plan.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/appservice/get_source_control_token.py b/sdk/python/pulumi_azure/appservice/get_source_control_token.py index d23ede5c68..c4d53a02b8 100644 --- a/sdk/python/pulumi_azure/appservice/get_source_control_token.py +++ b/sdk/python/pulumi_azure/appservice/get_source_control_token.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/appservice/get_windows_function_app.py b/sdk/python/pulumi_azure/appservice/get_windows_function_app.py index 5854ad17af..cba71ac498 100644 --- a/sdk/python/pulumi_azure/appservice/get_windows_function_app.py +++ b/sdk/python/pulumi_azure/appservice/get_windows_function_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appservice/get_windows_web_app.py b/sdk/python/pulumi_azure/appservice/get_windows_web_app.py index 7ef8ec8496..3ace1c9892 100644 --- a/sdk/python/pulumi_azure/appservice/get_windows_web_app.py +++ b/sdk/python/pulumi_azure/appservice/get_windows_web_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/appservice/hybrid_connection.py b/sdk/python/pulumi_azure/appservice/hybrid_connection.py index 0f3fd4eb06..f204caef3e 100644 --- a/sdk/python/pulumi_azure/appservice/hybrid_connection.py +++ b/sdk/python/pulumi_azure/appservice/hybrid_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['HybridConnectionArgs', 'HybridConnection'] @@ -29,13 +29,52 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the App Service. Changing this forces a new resource to be created. :param pulumi.Input[str] send_key_name: The name of the Service Bus key which has Send permissions. Defaults to `RootManageSharedAccessKey`. """ - pulumi.set(__self__, "app_service_name", app_service_name) - pulumi.set(__self__, "hostname", hostname) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "relay_id", relay_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + HybridConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_name=app_service_name, + hostname=hostname, + port=port, + relay_id=relay_id, + resource_group_name=resource_group_name, + send_key_name=send_key_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_name: Optional[pulumi.Input[str]] = None, + hostname: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + relay_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + send_key_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_name is None and 'appServiceName' in kwargs: + app_service_name = kwargs['appServiceName'] + if app_service_name is None: + raise TypeError("Missing 'app_service_name' argument") + if hostname is None: + raise TypeError("Missing 'hostname' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if relay_id is None and 'relayId' in kwargs: + relay_id = kwargs['relayId'] + if relay_id is None: + raise TypeError("Missing 'relay_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if send_key_name is None and 'sendKeyName' in kwargs: + send_key_name = kwargs['sendKeyName'] + + _setter("app_service_name", app_service_name) + _setter("hostname", hostname) + _setter("port", port) + _setter("relay_id", relay_id) + _setter("resource_group_name", resource_group_name) if send_key_name is not None: - pulumi.set(__self__, "send_key_name", send_key_name) + _setter("send_key_name", send_key_name) @property @pulumi.getter(name="appServiceName") @@ -137,28 +176,77 @@ def __init__(__self__, *, :param pulumi.Input[str] service_bus_namespace: The name of the Service Bus namespace. :param pulumi.Input[str] service_bus_suffix: The suffix for the service bus endpoint. """ + _HybridConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_name=app_service_name, + hostname=hostname, + namespace_name=namespace_name, + port=port, + relay_id=relay_id, + relay_name=relay_name, + resource_group_name=resource_group_name, + send_key_name=send_key_name, + send_key_value=send_key_value, + service_bus_namespace=service_bus_namespace, + service_bus_suffix=service_bus_suffix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_name: Optional[pulumi.Input[str]] = None, + hostname: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + relay_id: Optional[pulumi.Input[str]] = None, + relay_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + send_key_name: Optional[pulumi.Input[str]] = None, + send_key_value: Optional[pulumi.Input[str]] = None, + service_bus_namespace: Optional[pulumi.Input[str]] = None, + service_bus_suffix: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_name is None and 'appServiceName' in kwargs: + app_service_name = kwargs['appServiceName'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if relay_id is None and 'relayId' in kwargs: + relay_id = kwargs['relayId'] + if relay_name is None and 'relayName' in kwargs: + relay_name = kwargs['relayName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if send_key_name is None and 'sendKeyName' in kwargs: + send_key_name = kwargs['sendKeyName'] + if send_key_value is None and 'sendKeyValue' in kwargs: + send_key_value = kwargs['sendKeyValue'] + if service_bus_namespace is None and 'serviceBusNamespace' in kwargs: + service_bus_namespace = kwargs['serviceBusNamespace'] + if service_bus_suffix is None and 'serviceBusSuffix' in kwargs: + service_bus_suffix = kwargs['serviceBusSuffix'] + if app_service_name is not None: - pulumi.set(__self__, "app_service_name", app_service_name) + _setter("app_service_name", app_service_name) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if relay_id is not None: - pulumi.set(__self__, "relay_id", relay_id) + _setter("relay_id", relay_id) if relay_name is not None: - pulumi.set(__self__, "relay_name", relay_name) + _setter("relay_name", relay_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if send_key_name is not None: - pulumi.set(__self__, "send_key_name", send_key_name) + _setter("send_key_name", send_key_name) if send_key_value is not None: - pulumi.set(__self__, "send_key_value", send_key_value) + _setter("send_key_value", send_key_value) if service_bus_namespace is not None: - pulumi.set(__self__, "service_bus_namespace", service_bus_namespace) + _setter("service_bus_namespace", service_bus_namespace) if service_bus_suffix is not None: - pulumi.set(__self__, "service_bus_suffix", service_bus_suffix) + _setter("service_bus_suffix", service_bus_suffix) @property @pulumi.getter(name="appServiceName") @@ -427,6 +515,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HybridConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/linux_function_app.py b/sdk/python/pulumi_azure/appservice/linux_function_app.py index c0200ae1fb..113c8c2b93 100644 --- a/sdk/python/pulumi_azure/appservice/linux_function_app.py +++ b/sdk/python/pulumi_azure/appservice/linux_function_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -89,65 +89,192 @@ def __init__(__self__, *, > **Note:** Using this value requires either `WEBSITE_RUN_FROM_PACKAGE=1` or `SCM_DO_BUILD_DURING_DEPLOYMENT=true` to be set on the App in `app_settings`. Refer to the [Azure docs](https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies) for further details. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "service_plan_id", service_plan_id) - pulumi.set(__self__, "site_config", site_config) + LinuxFunctionAppArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + service_plan_id=service_plan_id, + site_config=site_config, + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + builtin_logging_enabled=builtin_logging_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + content_share_force_disabled=content_share_force_disabled, + daily_memory_time_quota=daily_memory_time_quota, + enabled=enabled, + functions_extension_version=functions_extension_version, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + sticky_settings=sticky_settings, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + storage_accounts=storage_accounts, + storage_key_vault_secret_id=storage_key_vault_secret_id, + storage_uses_managed_identity=storage_uses_managed_identity, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + zip_deploy_file=zip_deploy_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['LinuxFunctionAppSiteConfigArgs']] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['LinuxFunctionAppBackupArgs']] = None, + builtin_logging_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppConnectionStringArgs']]]] = None, + content_share_force_disabled: Optional[pulumi.Input[bool]] = None, + daily_memory_time_quota: Optional[pulumi.Input[int]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + functions_extension_version: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['LinuxFunctionAppIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + sticky_settings: Optional[pulumi.Input['LinuxFunctionAppStickySettingsArgs']] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppStorageAccountArgs']]]] = None, + storage_key_vault_secret_id: Optional[pulumi.Input[str]] = None, + storage_uses_managed_identity: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + zip_deploy_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if service_plan_id is None: + raise TypeError("Missing 'service_plan_id' argument") + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_config is None: + raise TypeError("Missing 'site_config' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if builtin_logging_enabled is None and 'builtinLoggingEnabled' in kwargs: + builtin_logging_enabled = kwargs['builtinLoggingEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if content_share_force_disabled is None and 'contentShareForceDisabled' in kwargs: + content_share_force_disabled = kwargs['contentShareForceDisabled'] + if daily_memory_time_quota is None and 'dailyMemoryTimeQuota' in kwargs: + daily_memory_time_quota = kwargs['dailyMemoryTimeQuota'] + if functions_extension_version is None and 'functionsExtensionVersion' in kwargs: + functions_extension_version = kwargs['functionsExtensionVersion'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if sticky_settings is None and 'stickySettings' in kwargs: + sticky_settings = kwargs['stickySettings'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if storage_key_vault_secret_id is None and 'storageKeyVaultSecretId' in kwargs: + storage_key_vault_secret_id = kwargs['storageKeyVaultSecretId'] + if storage_uses_managed_identity is None and 'storageUsesManagedIdentity' in kwargs: + storage_uses_managed_identity = kwargs['storageUsesManagedIdentity'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if zip_deploy_file is None and 'zipDeployFile' in kwargs: + zip_deploy_file = kwargs['zipDeployFile'] + + _setter("resource_group_name", resource_group_name) + _setter("service_plan_id", service_plan_id) + _setter("site_config", site_config) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if builtin_logging_enabled is not None: - pulumi.set(__self__, "builtin_logging_enabled", builtin_logging_enabled) + _setter("builtin_logging_enabled", builtin_logging_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if content_share_force_disabled is not None: - pulumi.set(__self__, "content_share_force_disabled", content_share_force_disabled) + _setter("content_share_force_disabled", content_share_force_disabled) if daily_memory_time_quota is not None: - pulumi.set(__self__, "daily_memory_time_quota", daily_memory_time_quota) + _setter("daily_memory_time_quota", daily_memory_time_quota) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if functions_extension_version is not None: - pulumi.set(__self__, "functions_extension_version", functions_extension_version) + _setter("functions_extension_version", functions_extension_version) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if sticky_settings is not None: - pulumi.set(__self__, "sticky_settings", sticky_settings) + _setter("sticky_settings", sticky_settings) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if storage_key_vault_secret_id is not None: - pulumi.set(__self__, "storage_key_vault_secret_id", storage_key_vault_secret_id) + _setter("storage_key_vault_secret_id", storage_key_vault_secret_id) if storage_uses_managed_identity is not None: - pulumi.set(__self__, "storage_uses_managed_identity", storage_uses_managed_identity) + _setter("storage_uses_managed_identity", storage_uses_managed_identity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) if zip_deploy_file is not None: - pulumi.set(__self__, "zip_deploy_file", zip_deploy_file) + _setter("zip_deploy_file", zip_deploy_file) @property @pulumi.getter(name="resourceGroupName") @@ -622,86 +749,241 @@ def __init__(__self__, *, > **Note:** Using this value requires either `WEBSITE_RUN_FROM_PACKAGE=1` or `SCM_DO_BUILD_DURING_DEPLOYMENT=true` to be set on the App in `app_settings`. Refer to the [Azure docs](https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies) for further details. """ + _LinuxFunctionAppState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + builtin_logging_enabled=builtin_logging_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + content_share_force_disabled=content_share_force_disabled, + custom_domain_verification_id=custom_domain_verification_id, + daily_memory_time_quota=daily_memory_time_quota, + default_hostname=default_hostname, + enabled=enabled, + functions_extension_version=functions_extension_version, + hosting_environment_id=hosting_environment_id, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + kind=kind, + location=location, + name=name, + outbound_ip_address_lists=outbound_ip_address_lists, + outbound_ip_addresses=outbound_ip_addresses, + possible_outbound_ip_address_lists=possible_outbound_ip_address_lists, + possible_outbound_ip_addresses=possible_outbound_ip_addresses, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + service_plan_id=service_plan_id, + site_config=site_config, + site_credentials=site_credentials, + sticky_settings=sticky_settings, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + storage_accounts=storage_accounts, + storage_key_vault_secret_id=storage_key_vault_secret_id, + storage_uses_managed_identity=storage_uses_managed_identity, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + zip_deploy_file=zip_deploy_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['LinuxFunctionAppAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['LinuxFunctionAppBackupArgs']] = None, + builtin_logging_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppConnectionStringArgs']]]] = None, + content_share_force_disabled: Optional[pulumi.Input[bool]] = None, + custom_domain_verification_id: Optional[pulumi.Input[str]] = None, + daily_memory_time_quota: Optional[pulumi.Input[int]] = None, + default_hostname: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + functions_extension_version: Optional[pulumi.Input[str]] = None, + hosting_environment_id: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['LinuxFunctionAppIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + possible_outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + possible_outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['LinuxFunctionAppSiteConfigArgs']] = None, + site_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppSiteCredentialArgs']]]] = None, + sticky_settings: Optional[pulumi.Input['LinuxFunctionAppStickySettingsArgs']] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppStorageAccountArgs']]]] = None, + storage_key_vault_secret_id: Optional[pulumi.Input[str]] = None, + storage_uses_managed_identity: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + zip_deploy_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if builtin_logging_enabled is None and 'builtinLoggingEnabled' in kwargs: + builtin_logging_enabled = kwargs['builtinLoggingEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if content_share_force_disabled is None and 'contentShareForceDisabled' in kwargs: + content_share_force_disabled = kwargs['contentShareForceDisabled'] + if custom_domain_verification_id is None and 'customDomainVerificationId' in kwargs: + custom_domain_verification_id = kwargs['customDomainVerificationId'] + if daily_memory_time_quota is None and 'dailyMemoryTimeQuota' in kwargs: + daily_memory_time_quota = kwargs['dailyMemoryTimeQuota'] + if default_hostname is None and 'defaultHostname' in kwargs: + default_hostname = kwargs['defaultHostname'] + if functions_extension_version is None and 'functionsExtensionVersion' in kwargs: + functions_extension_version = kwargs['functionsExtensionVersion'] + if hosting_environment_id is None and 'hostingEnvironmentId' in kwargs: + hosting_environment_id = kwargs['hostingEnvironmentId'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if outbound_ip_address_lists is None and 'outboundIpAddressLists' in kwargs: + outbound_ip_address_lists = kwargs['outboundIpAddressLists'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if possible_outbound_ip_address_lists is None and 'possibleOutboundIpAddressLists' in kwargs: + possible_outbound_ip_address_lists = kwargs['possibleOutboundIpAddressLists'] + if possible_outbound_ip_addresses is None and 'possibleOutboundIpAddresses' in kwargs: + possible_outbound_ip_addresses = kwargs['possibleOutboundIpAddresses'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_credentials is None and 'siteCredentials' in kwargs: + site_credentials = kwargs['siteCredentials'] + if sticky_settings is None and 'stickySettings' in kwargs: + sticky_settings = kwargs['stickySettings'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if storage_key_vault_secret_id is None and 'storageKeyVaultSecretId' in kwargs: + storage_key_vault_secret_id = kwargs['storageKeyVaultSecretId'] + if storage_uses_managed_identity is None and 'storageUsesManagedIdentity' in kwargs: + storage_uses_managed_identity = kwargs['storageUsesManagedIdentity'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if zip_deploy_file is None and 'zipDeployFile' in kwargs: + zip_deploy_file = kwargs['zipDeployFile'] + if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if builtin_logging_enabled is not None: - pulumi.set(__self__, "builtin_logging_enabled", builtin_logging_enabled) + _setter("builtin_logging_enabled", builtin_logging_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if content_share_force_disabled is not None: - pulumi.set(__self__, "content_share_force_disabled", content_share_force_disabled) + _setter("content_share_force_disabled", content_share_force_disabled) if custom_domain_verification_id is not None: - pulumi.set(__self__, "custom_domain_verification_id", custom_domain_verification_id) + _setter("custom_domain_verification_id", custom_domain_verification_id) if daily_memory_time_quota is not None: - pulumi.set(__self__, "daily_memory_time_quota", daily_memory_time_quota) + _setter("daily_memory_time_quota", daily_memory_time_quota) if default_hostname is not None: - pulumi.set(__self__, "default_hostname", default_hostname) + _setter("default_hostname", default_hostname) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if functions_extension_version is not None: - pulumi.set(__self__, "functions_extension_version", functions_extension_version) + _setter("functions_extension_version", functions_extension_version) if hosting_environment_id is not None: - pulumi.set(__self__, "hosting_environment_id", hosting_environment_id) + _setter("hosting_environment_id", hosting_environment_id) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_ip_address_lists is not None: - pulumi.set(__self__, "outbound_ip_address_lists", outbound_ip_address_lists) + _setter("outbound_ip_address_lists", outbound_ip_address_lists) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if possible_outbound_ip_address_lists is not None: - pulumi.set(__self__, "possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) + _setter("possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) if possible_outbound_ip_addresses is not None: - pulumi.set(__self__, "possible_outbound_ip_addresses", possible_outbound_ip_addresses) + _setter("possible_outbound_ip_addresses", possible_outbound_ip_addresses) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_plan_id is not None: - pulumi.set(__self__, "service_plan_id", service_plan_id) + _setter("service_plan_id", service_plan_id) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if site_credentials is not None: - pulumi.set(__self__, "site_credentials", site_credentials) + _setter("site_credentials", site_credentials) if sticky_settings is not None: - pulumi.set(__self__, "sticky_settings", sticky_settings) + _setter("sticky_settings", sticky_settings) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if storage_key_vault_secret_id is not None: - pulumi.set(__self__, "storage_key_vault_secret_id", storage_key_vault_secret_id) + _setter("storage_key_vault_secret_id", storage_key_vault_secret_id) if storage_uses_managed_identity is not None: - pulumi.set(__self__, "storage_uses_managed_identity", storage_uses_managed_identity) + _setter("storage_uses_managed_identity", storage_uses_managed_identity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) if zip_deploy_file is not None: - pulumi.set(__self__, "zip_deploy_file", zip_deploy_file) + _setter("zip_deploy_file", zip_deploy_file) @property @pulumi.getter(name="appSettings") @@ -1359,6 +1641,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinuxFunctionAppArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1405,8 +1691,23 @@ def _internal_init(__self__, __props__ = LinuxFunctionAppArgs.__new__(LinuxFunctionAppArgs) __props__.__dict__["app_settings"] = app_settings + if auth_settings is not None and not isinstance(auth_settings, LinuxFunctionAppAuthSettingsArgs): + auth_settings = auth_settings or {} + def _setter(key, value): + auth_settings[key] = value + LinuxFunctionAppAuthSettingsArgs._configure(_setter, **auth_settings) __props__.__dict__["auth_settings"] = auth_settings + if auth_settings_v2 is not None and not isinstance(auth_settings_v2, LinuxFunctionAppAuthSettingsV2Args): + auth_settings_v2 = auth_settings_v2 or {} + def _setter(key, value): + auth_settings_v2[key] = value + LinuxFunctionAppAuthSettingsV2Args._configure(_setter, **auth_settings_v2) __props__.__dict__["auth_settings_v2"] = auth_settings_v2 + if backup is not None and not isinstance(backup, LinuxFunctionAppBackupArgs): + backup = backup or {} + def _setter(key, value): + backup[key] = value + LinuxFunctionAppBackupArgs._configure(_setter, **backup) __props__.__dict__["backup"] = backup __props__.__dict__["builtin_logging_enabled"] = builtin_logging_enabled __props__.__dict__["client_certificate_enabled"] = client_certificate_enabled @@ -1418,6 +1719,11 @@ def _internal_init(__self__, __props__.__dict__["enabled"] = enabled __props__.__dict__["functions_extension_version"] = functions_extension_version __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, LinuxFunctionAppIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + LinuxFunctionAppIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["key_vault_reference_identity_id"] = key_vault_reference_identity_id __props__.__dict__["location"] = location @@ -1429,9 +1735,19 @@ def _internal_init(__self__, if service_plan_id is None and not opts.urn: raise TypeError("Missing required property 'service_plan_id'") __props__.__dict__["service_plan_id"] = service_plan_id + if site_config is not None and not isinstance(site_config, LinuxFunctionAppSiteConfigArgs): + site_config = site_config or {} + def _setter(key, value): + site_config[key] = value + LinuxFunctionAppSiteConfigArgs._configure(_setter, **site_config) if site_config is None and not opts.urn: raise TypeError("Missing required property 'site_config'") __props__.__dict__["site_config"] = site_config + if sticky_settings is not None and not isinstance(sticky_settings, LinuxFunctionAppStickySettingsArgs): + sticky_settings = sticky_settings or {} + def _setter(key, value): + sticky_settings[key] = value + LinuxFunctionAppStickySettingsArgs._configure(_setter, **sticky_settings) __props__.__dict__["sticky_settings"] = sticky_settings __props__.__dict__["storage_account_access_key"] = None if storage_account_access_key is None else pulumi.Output.secret(storage_account_access_key) __props__.__dict__["storage_account_name"] = storage_account_name diff --git a/sdk/python/pulumi_azure/appservice/linux_function_app_slot.py b/sdk/python/pulumi_azure/appservice/linux_function_app_slot.py index 1012b058f7..c0213888ac 100644 --- a/sdk/python/pulumi_azure/appservice/linux_function_app_slot.py +++ b/sdk/python/pulumi_azure/appservice/linux_function_app_slot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -80,60 +80,175 @@ def __init__(__self__, *, > **NOTE:** One of `storage_account_access_key` or `storage_uses_managed_identity` must be specified when using `storage_account_name`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Linux Function App. """ - pulumi.set(__self__, "function_app_id", function_app_id) - pulumi.set(__self__, "site_config", site_config) + LinuxFunctionAppSlotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_app_id=function_app_id, + site_config=site_config, + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + builtin_logging_enabled=builtin_logging_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + content_share_force_disabled=content_share_force_disabled, + daily_memory_time_quota=daily_memory_time_quota, + enabled=enabled, + functions_extension_version=functions_extension_version, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + name=name, + public_network_access_enabled=public_network_access_enabled, + service_plan_id=service_plan_id, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + storage_accounts=storage_accounts, + storage_key_vault_secret_id=storage_key_vault_secret_id, + storage_uses_managed_identity=storage_uses_managed_identity, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_app_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['LinuxFunctionAppSlotSiteConfigArgs']] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['LinuxFunctionAppSlotBackupArgs']] = None, + builtin_logging_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppSlotConnectionStringArgs']]]] = None, + content_share_force_disabled: Optional[pulumi.Input[bool]] = None, + daily_memory_time_quota: Optional[pulumi.Input[int]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + functions_extension_version: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['LinuxFunctionAppSlotIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppSlotStorageAccountArgs']]]] = None, + storage_key_vault_secret_id: Optional[pulumi.Input[str]] = None, + storage_uses_managed_identity: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_app_id is None and 'functionAppId' in kwargs: + function_app_id = kwargs['functionAppId'] + if function_app_id is None: + raise TypeError("Missing 'function_app_id' argument") + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_config is None: + raise TypeError("Missing 'site_config' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if builtin_logging_enabled is None and 'builtinLoggingEnabled' in kwargs: + builtin_logging_enabled = kwargs['builtinLoggingEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if content_share_force_disabled is None and 'contentShareForceDisabled' in kwargs: + content_share_force_disabled = kwargs['contentShareForceDisabled'] + if daily_memory_time_quota is None and 'dailyMemoryTimeQuota' in kwargs: + daily_memory_time_quota = kwargs['dailyMemoryTimeQuota'] + if functions_extension_version is None and 'functionsExtensionVersion' in kwargs: + functions_extension_version = kwargs['functionsExtensionVersion'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if storage_key_vault_secret_id is None and 'storageKeyVaultSecretId' in kwargs: + storage_key_vault_secret_id = kwargs['storageKeyVaultSecretId'] + if storage_uses_managed_identity is None and 'storageUsesManagedIdentity' in kwargs: + storage_uses_managed_identity = kwargs['storageUsesManagedIdentity'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + + _setter("function_app_id", function_app_id) + _setter("site_config", site_config) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if builtin_logging_enabled is not None: - pulumi.set(__self__, "builtin_logging_enabled", builtin_logging_enabled) + _setter("builtin_logging_enabled", builtin_logging_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if content_share_force_disabled is not None: - pulumi.set(__self__, "content_share_force_disabled", content_share_force_disabled) + _setter("content_share_force_disabled", content_share_force_disabled) if daily_memory_time_quota is not None: - pulumi.set(__self__, "daily_memory_time_quota", daily_memory_time_quota) + _setter("daily_memory_time_quota", daily_memory_time_quota) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if functions_extension_version is not None: - pulumi.set(__self__, "functions_extension_version", functions_extension_version) + _setter("functions_extension_version", functions_extension_version) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if service_plan_id is not None: - pulumi.set(__self__, "service_plan_id", service_plan_id) + _setter("service_plan_id", service_plan_id) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if storage_key_vault_secret_id is not None: - pulumi.set(__self__, "storage_key_vault_secret_id", storage_key_vault_secret_id) + _setter("storage_key_vault_secret_id", storage_key_vault_secret_id) if storage_uses_managed_identity is not None: - pulumi.set(__self__, "storage_uses_managed_identity", storage_uses_managed_identity) + _setter("storage_uses_managed_identity", storage_uses_managed_identity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter(name="functionAppId") @@ -560,80 +675,225 @@ def __init__(__self__, *, > **NOTE:** One of `storage_account_access_key` or `storage_uses_managed_identity` must be specified when using `storage_account_name`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Linux Function App. """ + _LinuxFunctionAppSlotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + builtin_logging_enabled=builtin_logging_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + content_share_force_disabled=content_share_force_disabled, + custom_domain_verification_id=custom_domain_verification_id, + daily_memory_time_quota=daily_memory_time_quota, + default_hostname=default_hostname, + enabled=enabled, + function_app_id=function_app_id, + functions_extension_version=functions_extension_version, + hosting_environment_id=hosting_environment_id, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + kind=kind, + name=name, + outbound_ip_address_lists=outbound_ip_address_lists, + outbound_ip_addresses=outbound_ip_addresses, + possible_outbound_ip_address_lists=possible_outbound_ip_address_lists, + possible_outbound_ip_addresses=possible_outbound_ip_addresses, + public_network_access_enabled=public_network_access_enabled, + service_plan_id=service_plan_id, + site_config=site_config, + site_credentials=site_credentials, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + storage_accounts=storage_accounts, + storage_key_vault_secret_id=storage_key_vault_secret_id, + storage_uses_managed_identity=storage_uses_managed_identity, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['LinuxFunctionAppSlotAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['LinuxFunctionAppSlotBackupArgs']] = None, + builtin_logging_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppSlotConnectionStringArgs']]]] = None, + content_share_force_disabled: Optional[pulumi.Input[bool]] = None, + custom_domain_verification_id: Optional[pulumi.Input[str]] = None, + daily_memory_time_quota: Optional[pulumi.Input[int]] = None, + default_hostname: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + function_app_id: Optional[pulumi.Input[str]] = None, + functions_extension_version: Optional[pulumi.Input[str]] = None, + hosting_environment_id: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['LinuxFunctionAppSlotIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + possible_outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + possible_outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['LinuxFunctionAppSlotSiteConfigArgs']] = None, + site_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppSlotSiteCredentialArgs']]]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxFunctionAppSlotStorageAccountArgs']]]] = None, + storage_key_vault_secret_id: Optional[pulumi.Input[str]] = None, + storage_uses_managed_identity: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if builtin_logging_enabled is None and 'builtinLoggingEnabled' in kwargs: + builtin_logging_enabled = kwargs['builtinLoggingEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if content_share_force_disabled is None and 'contentShareForceDisabled' in kwargs: + content_share_force_disabled = kwargs['contentShareForceDisabled'] + if custom_domain_verification_id is None and 'customDomainVerificationId' in kwargs: + custom_domain_verification_id = kwargs['customDomainVerificationId'] + if daily_memory_time_quota is None and 'dailyMemoryTimeQuota' in kwargs: + daily_memory_time_quota = kwargs['dailyMemoryTimeQuota'] + if default_hostname is None and 'defaultHostname' in kwargs: + default_hostname = kwargs['defaultHostname'] + if function_app_id is None and 'functionAppId' in kwargs: + function_app_id = kwargs['functionAppId'] + if functions_extension_version is None and 'functionsExtensionVersion' in kwargs: + functions_extension_version = kwargs['functionsExtensionVersion'] + if hosting_environment_id is None and 'hostingEnvironmentId' in kwargs: + hosting_environment_id = kwargs['hostingEnvironmentId'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if outbound_ip_address_lists is None and 'outboundIpAddressLists' in kwargs: + outbound_ip_address_lists = kwargs['outboundIpAddressLists'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if possible_outbound_ip_address_lists is None and 'possibleOutboundIpAddressLists' in kwargs: + possible_outbound_ip_address_lists = kwargs['possibleOutboundIpAddressLists'] + if possible_outbound_ip_addresses is None and 'possibleOutboundIpAddresses' in kwargs: + possible_outbound_ip_addresses = kwargs['possibleOutboundIpAddresses'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_credentials is None and 'siteCredentials' in kwargs: + site_credentials = kwargs['siteCredentials'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if storage_key_vault_secret_id is None and 'storageKeyVaultSecretId' in kwargs: + storage_key_vault_secret_id = kwargs['storageKeyVaultSecretId'] + if storage_uses_managed_identity is None and 'storageUsesManagedIdentity' in kwargs: + storage_uses_managed_identity = kwargs['storageUsesManagedIdentity'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if builtin_logging_enabled is not None: - pulumi.set(__self__, "builtin_logging_enabled", builtin_logging_enabled) + _setter("builtin_logging_enabled", builtin_logging_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if content_share_force_disabled is not None: - pulumi.set(__self__, "content_share_force_disabled", content_share_force_disabled) + _setter("content_share_force_disabled", content_share_force_disabled) if custom_domain_verification_id is not None: - pulumi.set(__self__, "custom_domain_verification_id", custom_domain_verification_id) + _setter("custom_domain_verification_id", custom_domain_verification_id) if daily_memory_time_quota is not None: - pulumi.set(__self__, "daily_memory_time_quota", daily_memory_time_quota) + _setter("daily_memory_time_quota", daily_memory_time_quota) if default_hostname is not None: - pulumi.set(__self__, "default_hostname", default_hostname) + _setter("default_hostname", default_hostname) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if function_app_id is not None: - pulumi.set(__self__, "function_app_id", function_app_id) + _setter("function_app_id", function_app_id) if functions_extension_version is not None: - pulumi.set(__self__, "functions_extension_version", functions_extension_version) + _setter("functions_extension_version", functions_extension_version) if hosting_environment_id is not None: - pulumi.set(__self__, "hosting_environment_id", hosting_environment_id) + _setter("hosting_environment_id", hosting_environment_id) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_ip_address_lists is not None: - pulumi.set(__self__, "outbound_ip_address_lists", outbound_ip_address_lists) + _setter("outbound_ip_address_lists", outbound_ip_address_lists) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if possible_outbound_ip_address_lists is not None: - pulumi.set(__self__, "possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) + _setter("possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) if possible_outbound_ip_addresses is not None: - pulumi.set(__self__, "possible_outbound_ip_addresses", possible_outbound_ip_addresses) + _setter("possible_outbound_ip_addresses", possible_outbound_ip_addresses) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if service_plan_id is not None: - pulumi.set(__self__, "service_plan_id", service_plan_id) + _setter("service_plan_id", service_plan_id) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if site_credentials is not None: - pulumi.set(__self__, "site_credentials", site_credentials) + _setter("site_credentials", site_credentials) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if storage_key_vault_secret_id is not None: - pulumi.set(__self__, "storage_key_vault_secret_id", storage_key_vault_secret_id) + _setter("storage_key_vault_secret_id", storage_key_vault_secret_id) if storage_uses_managed_identity is not None: - pulumi.set(__self__, "storage_uses_managed_identity", storage_uses_managed_identity) + _setter("storage_uses_managed_identity", storage_uses_managed_identity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter(name="appSettings") @@ -1249,6 +1509,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinuxFunctionAppSlotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1292,8 +1556,23 @@ def _internal_init(__self__, __props__ = LinuxFunctionAppSlotArgs.__new__(LinuxFunctionAppSlotArgs) __props__.__dict__["app_settings"] = app_settings + if auth_settings is not None and not isinstance(auth_settings, LinuxFunctionAppSlotAuthSettingsArgs): + auth_settings = auth_settings or {} + def _setter(key, value): + auth_settings[key] = value + LinuxFunctionAppSlotAuthSettingsArgs._configure(_setter, **auth_settings) __props__.__dict__["auth_settings"] = auth_settings + if auth_settings_v2 is not None and not isinstance(auth_settings_v2, LinuxFunctionAppSlotAuthSettingsV2Args): + auth_settings_v2 = auth_settings_v2 or {} + def _setter(key, value): + auth_settings_v2[key] = value + LinuxFunctionAppSlotAuthSettingsV2Args._configure(_setter, **auth_settings_v2) __props__.__dict__["auth_settings_v2"] = auth_settings_v2 + if backup is not None and not isinstance(backup, LinuxFunctionAppSlotBackupArgs): + backup = backup or {} + def _setter(key, value): + backup[key] = value + LinuxFunctionAppSlotBackupArgs._configure(_setter, **backup) __props__.__dict__["backup"] = backup __props__.__dict__["builtin_logging_enabled"] = builtin_logging_enabled __props__.__dict__["client_certificate_enabled"] = client_certificate_enabled @@ -1308,11 +1587,21 @@ def _internal_init(__self__, __props__.__dict__["function_app_id"] = function_app_id __props__.__dict__["functions_extension_version"] = functions_extension_version __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, LinuxFunctionAppSlotIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + LinuxFunctionAppSlotIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["key_vault_reference_identity_id"] = key_vault_reference_identity_id __props__.__dict__["name"] = name __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled __props__.__dict__["service_plan_id"] = service_plan_id + if site_config is not None and not isinstance(site_config, LinuxFunctionAppSlotSiteConfigArgs): + site_config = site_config or {} + def _setter(key, value): + site_config[key] = value + LinuxFunctionAppSlotSiteConfigArgs._configure(_setter, **site_config) if site_config is None and not opts.urn: raise TypeError("Missing required property 'site_config'") __props__.__dict__["site_config"] = site_config diff --git a/sdk/python/pulumi_azure/appservice/linux_web_app.py b/sdk/python/pulumi_azure/appservice/linux_web_app.py index b2df2763b6..b2b86d52db 100644 --- a/sdk/python/pulumi_azure/appservice/linux_web_app.py +++ b/sdk/python/pulumi_azure/appservice/linux_web_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -69,53 +69,154 @@ def __init__(__self__, *, > **Note:** Using this value requires either `WEBSITE_RUN_FROM_PACKAGE=1` or `SCM_DO_BUILD_DURING_DEPLOYMENT=true` to be set on the App in `app_settings`. Refer to the Azure docs on [running the Web App directly from the Zip package](https://learn.microsoft.com/en-us/azure/app-service/deploy-run-package), or [automating the build for Zip deploy](https://learn.microsoft.com/en-us/azure/app-service/deploy-zip#enable-build-automation-for-zip-deploy) for further details. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "service_plan_id", service_plan_id) - pulumi.set(__self__, "site_config", site_config) + LinuxWebAppArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + service_plan_id=service_plan_id, + site_config=site_config, + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + client_affinity_enabled=client_affinity_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + enabled=enabled, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + location=location, + logs=logs, + name=name, + public_network_access_enabled=public_network_access_enabled, + sticky_settings=sticky_settings, + storage_accounts=storage_accounts, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + zip_deploy_file=zip_deploy_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['LinuxWebAppSiteConfigArgs']] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['LinuxWebAppAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['LinuxWebAppAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['LinuxWebAppBackupArgs']] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppConnectionStringArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['LinuxWebAppIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['LinuxWebAppLogsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + sticky_settings: Optional[pulumi.Input['LinuxWebAppStickySettingsArgs']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + zip_deploy_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if service_plan_id is None: + raise TypeError("Missing 'service_plan_id' argument") + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_config is None: + raise TypeError("Missing 'site_config' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if sticky_settings is None and 'stickySettings' in kwargs: + sticky_settings = kwargs['stickySettings'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if zip_deploy_file is None and 'zipDeployFile' in kwargs: + zip_deploy_file = kwargs['zipDeployFile'] + + _setter("resource_group_name", resource_group_name) + _setter("service_plan_id", service_plan_id) + _setter("site_config", site_config) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if sticky_settings is not None: - pulumi.set(__self__, "sticky_settings", sticky_settings) + _setter("sticky_settings", sticky_settings) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) if zip_deploy_file is not None: - pulumi.set(__self__, "zip_deploy_file", zip_deploy_file) + _setter("zip_deploy_file", zip_deploy_file) @property @pulumi.getter(name="resourceGroupName") @@ -488,74 +589,203 @@ def __init__(__self__, *, > **Note:** Using this value requires either `WEBSITE_RUN_FROM_PACKAGE=1` or `SCM_DO_BUILD_DURING_DEPLOYMENT=true` to be set on the App in `app_settings`. Refer to the Azure docs on [running the Web App directly from the Zip package](https://learn.microsoft.com/en-us/azure/app-service/deploy-run-package), or [automating the build for Zip deploy](https://learn.microsoft.com/en-us/azure/app-service/deploy-zip#enable-build-automation-for-zip-deploy) for further details. """ + _LinuxWebAppState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + client_affinity_enabled=client_affinity_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + custom_domain_verification_id=custom_domain_verification_id, + default_hostname=default_hostname, + enabled=enabled, + hosting_environment_id=hosting_environment_id, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + kind=kind, + location=location, + logs=logs, + name=name, + outbound_ip_address_lists=outbound_ip_address_lists, + outbound_ip_addresses=outbound_ip_addresses, + possible_outbound_ip_address_lists=possible_outbound_ip_address_lists, + possible_outbound_ip_addresses=possible_outbound_ip_addresses, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + service_plan_id=service_plan_id, + site_config=site_config, + site_credentials=site_credentials, + sticky_settings=sticky_settings, + storage_accounts=storage_accounts, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + zip_deploy_file=zip_deploy_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['LinuxWebAppAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['LinuxWebAppAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['LinuxWebAppBackupArgs']] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppConnectionStringArgs']]]] = None, + custom_domain_verification_id: Optional[pulumi.Input[str]] = None, + default_hostname: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + hosting_environment_id: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['LinuxWebAppIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['LinuxWebAppLogsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + possible_outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + possible_outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['LinuxWebAppSiteConfigArgs']] = None, + site_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSiteCredentialArgs']]]] = None, + sticky_settings: Optional[pulumi.Input['LinuxWebAppStickySettingsArgs']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + zip_deploy_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if custom_domain_verification_id is None and 'customDomainVerificationId' in kwargs: + custom_domain_verification_id = kwargs['customDomainVerificationId'] + if default_hostname is None and 'defaultHostname' in kwargs: + default_hostname = kwargs['defaultHostname'] + if hosting_environment_id is None and 'hostingEnvironmentId' in kwargs: + hosting_environment_id = kwargs['hostingEnvironmentId'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if outbound_ip_address_lists is None and 'outboundIpAddressLists' in kwargs: + outbound_ip_address_lists = kwargs['outboundIpAddressLists'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if possible_outbound_ip_address_lists is None and 'possibleOutboundIpAddressLists' in kwargs: + possible_outbound_ip_address_lists = kwargs['possibleOutboundIpAddressLists'] + if possible_outbound_ip_addresses is None and 'possibleOutboundIpAddresses' in kwargs: + possible_outbound_ip_addresses = kwargs['possibleOutboundIpAddresses'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_credentials is None and 'siteCredentials' in kwargs: + site_credentials = kwargs['siteCredentials'] + if sticky_settings is None and 'stickySettings' in kwargs: + sticky_settings = kwargs['stickySettings'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if zip_deploy_file is None and 'zipDeployFile' in kwargs: + zip_deploy_file = kwargs['zipDeployFile'] + if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if custom_domain_verification_id is not None: - pulumi.set(__self__, "custom_domain_verification_id", custom_domain_verification_id) + _setter("custom_domain_verification_id", custom_domain_verification_id) if default_hostname is not None: - pulumi.set(__self__, "default_hostname", default_hostname) + _setter("default_hostname", default_hostname) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if hosting_environment_id is not None: - pulumi.set(__self__, "hosting_environment_id", hosting_environment_id) + _setter("hosting_environment_id", hosting_environment_id) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_ip_address_lists is not None: - pulumi.set(__self__, "outbound_ip_address_lists", outbound_ip_address_lists) + _setter("outbound_ip_address_lists", outbound_ip_address_lists) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if possible_outbound_ip_address_lists is not None: - pulumi.set(__self__, "possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) + _setter("possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) if possible_outbound_ip_addresses is not None: - pulumi.set(__self__, "possible_outbound_ip_addresses", possible_outbound_ip_addresses) + _setter("possible_outbound_ip_addresses", possible_outbound_ip_addresses) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_plan_id is not None: - pulumi.set(__self__, "service_plan_id", service_plan_id) + _setter("service_plan_id", service_plan_id) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if site_credentials is not None: - pulumi.set(__self__, "site_credentials", site_credentials) + _setter("site_credentials", site_credentials) if sticky_settings is not None: - pulumi.set(__self__, "sticky_settings", sticky_settings) + _setter("sticky_settings", sticky_settings) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) if zip_deploy_file is not None: - pulumi.set(__self__, "zip_deploy_file", zip_deploy_file) + _setter("zip_deploy_file", zip_deploy_file) @property @pulumi.getter(name="appSettings") @@ -1097,6 +1327,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinuxWebAppArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1137,8 +1371,23 @@ def _internal_init(__self__, __props__ = LinuxWebAppArgs.__new__(LinuxWebAppArgs) __props__.__dict__["app_settings"] = app_settings + if auth_settings is not None and not isinstance(auth_settings, LinuxWebAppAuthSettingsArgs): + auth_settings = auth_settings or {} + def _setter(key, value): + auth_settings[key] = value + LinuxWebAppAuthSettingsArgs._configure(_setter, **auth_settings) __props__.__dict__["auth_settings"] = auth_settings + if auth_settings_v2 is not None and not isinstance(auth_settings_v2, LinuxWebAppAuthSettingsV2Args): + auth_settings_v2 = auth_settings_v2 or {} + def _setter(key, value): + auth_settings_v2[key] = value + LinuxWebAppAuthSettingsV2Args._configure(_setter, **auth_settings_v2) __props__.__dict__["auth_settings_v2"] = auth_settings_v2 + if backup is not None and not isinstance(backup, LinuxWebAppBackupArgs): + backup = backup or {} + def _setter(key, value): + backup[key] = value + LinuxWebAppBackupArgs._configure(_setter, **backup) __props__.__dict__["backup"] = backup __props__.__dict__["client_affinity_enabled"] = client_affinity_enabled __props__.__dict__["client_certificate_enabled"] = client_certificate_enabled @@ -1147,9 +1396,19 @@ def _internal_init(__self__, __props__.__dict__["connection_strings"] = connection_strings __props__.__dict__["enabled"] = enabled __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, LinuxWebAppIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + LinuxWebAppIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["key_vault_reference_identity_id"] = key_vault_reference_identity_id __props__.__dict__["location"] = location + if logs is not None and not isinstance(logs, LinuxWebAppLogsArgs): + logs = logs or {} + def _setter(key, value): + logs[key] = value + LinuxWebAppLogsArgs._configure(_setter, **logs) __props__.__dict__["logs"] = logs __props__.__dict__["name"] = name __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled @@ -1159,9 +1418,19 @@ def _internal_init(__self__, if service_plan_id is None and not opts.urn: raise TypeError("Missing required property 'service_plan_id'") __props__.__dict__["service_plan_id"] = service_plan_id + if site_config is not None and not isinstance(site_config, LinuxWebAppSiteConfigArgs): + site_config = site_config or {} + def _setter(key, value): + site_config[key] = value + LinuxWebAppSiteConfigArgs._configure(_setter, **site_config) if site_config is None and not opts.urn: raise TypeError("Missing required property 'site_config'") __props__.__dict__["site_config"] = site_config + if sticky_settings is not None and not isinstance(sticky_settings, LinuxWebAppStickySettingsArgs): + sticky_settings = sticky_settings or {} + def _setter(key, value): + sticky_settings[key] = value + LinuxWebAppStickySettingsArgs._configure(_setter, **sticky_settings) __props__.__dict__["sticky_settings"] = sticky_settings __props__.__dict__["storage_accounts"] = storage_accounts __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/appservice/linux_web_app_slot.py b/sdk/python/pulumi_azure/appservice/linux_web_app_slot.py index e64a145df0..9d764f3360 100644 --- a/sdk/python/pulumi_azure/appservice/linux_web_app_slot.py +++ b/sdk/python/pulumi_azure/appservice/linux_web_app_slot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -65,50 +65,143 @@ def __init__(__self__, *, > **Note:** Using this value requires `WEBSITE_RUN_FROM_PACKAGE=1` to be set on the App in `app_settings`. Refer to the [Azure docs](https://docs.microsoft.com/en-us/azure/app-service/deploy-run-package) for further details. """ - pulumi.set(__self__, "app_service_id", app_service_id) - pulumi.set(__self__, "site_config", site_config) + LinuxWebAppSlotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_id=app_service_id, + site_config=site_config, + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + client_affinity_enabled=client_affinity_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + enabled=enabled, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + logs=logs, + name=name, + public_network_access_enabled=public_network_access_enabled, + service_plan_id=service_plan_id, + storage_accounts=storage_accounts, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + zip_deploy_file=zip_deploy_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['LinuxWebAppSlotSiteConfigArgs']] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['LinuxWebAppSlotBackupArgs']] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSlotConnectionStringArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['LinuxWebAppSlotIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['LinuxWebAppSlotLogsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSlotStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + zip_deploy_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_id is None and 'appServiceId' in kwargs: + app_service_id = kwargs['appServiceId'] + if app_service_id is None: + raise TypeError("Missing 'app_service_id' argument") + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_config is None: + raise TypeError("Missing 'site_config' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if zip_deploy_file is None and 'zipDeployFile' in kwargs: + zip_deploy_file = kwargs['zipDeployFile'] + + _setter("app_service_id", app_service_id) + _setter("site_config", site_config) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if service_plan_id is not None: - pulumi.set(__self__, "service_plan_id", service_plan_id) + _setter("service_plan_id", service_plan_id) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) if zip_deploy_file is not None: - pulumi.set(__self__, "zip_deploy_file", zip_deploy_file) + _setter("zip_deploy_file", zip_deploy_file) @property @pulumi.getter(name="appServiceId") @@ -455,72 +548,199 @@ def __init__(__self__, *, > **Note:** Using this value requires `WEBSITE_RUN_FROM_PACKAGE=1` to be set on the App in `app_settings`. Refer to the [Azure docs](https://docs.microsoft.com/en-us/azure/app-service/deploy-run-package) for further details. """ + _LinuxWebAppSlotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_metadata=app_metadata, + app_service_id=app_service_id, + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + client_affinity_enabled=client_affinity_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + custom_domain_verification_id=custom_domain_verification_id, + default_hostname=default_hostname, + enabled=enabled, + hosting_environment_id=hosting_environment_id, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + kind=kind, + logs=logs, + name=name, + outbound_ip_address_lists=outbound_ip_address_lists, + outbound_ip_addresses=outbound_ip_addresses, + possible_outbound_ip_address_lists=possible_outbound_ip_address_lists, + possible_outbound_ip_addresses=possible_outbound_ip_addresses, + public_network_access_enabled=public_network_access_enabled, + service_plan_id=service_plan_id, + site_config=site_config, + site_credentials=site_credentials, + storage_accounts=storage_accounts, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + zip_deploy_file=zip_deploy_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + app_service_id: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['LinuxWebAppSlotAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['LinuxWebAppSlotBackupArgs']] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSlotConnectionStringArgs']]]] = None, + custom_domain_verification_id: Optional[pulumi.Input[str]] = None, + default_hostname: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + hosting_environment_id: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['LinuxWebAppSlotIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['LinuxWebAppSlotLogsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + possible_outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + possible_outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['LinuxWebAppSlotSiteConfigArgs']] = None, + site_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSlotSiteCredentialArgs']]]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxWebAppSlotStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + zip_deploy_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_metadata is None and 'appMetadata' in kwargs: + app_metadata = kwargs['appMetadata'] + if app_service_id is None and 'appServiceId' in kwargs: + app_service_id = kwargs['appServiceId'] + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if custom_domain_verification_id is None and 'customDomainVerificationId' in kwargs: + custom_domain_verification_id = kwargs['customDomainVerificationId'] + if default_hostname is None and 'defaultHostname' in kwargs: + default_hostname = kwargs['defaultHostname'] + if hosting_environment_id is None and 'hostingEnvironmentId' in kwargs: + hosting_environment_id = kwargs['hostingEnvironmentId'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if outbound_ip_address_lists is None and 'outboundIpAddressLists' in kwargs: + outbound_ip_address_lists = kwargs['outboundIpAddressLists'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if possible_outbound_ip_address_lists is None and 'possibleOutboundIpAddressLists' in kwargs: + possible_outbound_ip_address_lists = kwargs['possibleOutboundIpAddressLists'] + if possible_outbound_ip_addresses is None and 'possibleOutboundIpAddresses' in kwargs: + possible_outbound_ip_addresses = kwargs['possibleOutboundIpAddresses'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_credentials is None and 'siteCredentials' in kwargs: + site_credentials = kwargs['siteCredentials'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if zip_deploy_file is None and 'zipDeployFile' in kwargs: + zip_deploy_file = kwargs['zipDeployFile'] + if app_metadata is not None: - pulumi.set(__self__, "app_metadata", app_metadata) + _setter("app_metadata", app_metadata) if app_service_id is not None: - pulumi.set(__self__, "app_service_id", app_service_id) + _setter("app_service_id", app_service_id) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if custom_domain_verification_id is not None: - pulumi.set(__self__, "custom_domain_verification_id", custom_domain_verification_id) + _setter("custom_domain_verification_id", custom_domain_verification_id) if default_hostname is not None: - pulumi.set(__self__, "default_hostname", default_hostname) + _setter("default_hostname", default_hostname) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if hosting_environment_id is not None: - pulumi.set(__self__, "hosting_environment_id", hosting_environment_id) + _setter("hosting_environment_id", hosting_environment_id) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_ip_address_lists is not None: - pulumi.set(__self__, "outbound_ip_address_lists", outbound_ip_address_lists) + _setter("outbound_ip_address_lists", outbound_ip_address_lists) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if possible_outbound_ip_address_lists is not None: - pulumi.set(__self__, "possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) + _setter("possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) if possible_outbound_ip_addresses is not None: - pulumi.set(__self__, "possible_outbound_ip_addresses", possible_outbound_ip_addresses) + _setter("possible_outbound_ip_addresses", possible_outbound_ip_addresses) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if service_plan_id is not None: - pulumi.set(__self__, "service_plan_id", service_plan_id) + _setter("service_plan_id", service_plan_id) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if site_credentials is not None: - pulumi.set(__self__, "site_credentials", site_credentials) + _setter("site_credentials", site_credentials) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) if zip_deploy_file is not None: - pulumi.set(__self__, "zip_deploy_file", zip_deploy_file) + _setter("zip_deploy_file", zip_deploy_file) @property @pulumi.getter(name="appMetadata") @@ -1052,6 +1272,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinuxWebAppSlotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1093,8 +1317,23 @@ def _internal_init(__self__, raise TypeError("Missing required property 'app_service_id'") __props__.__dict__["app_service_id"] = app_service_id __props__.__dict__["app_settings"] = app_settings + if auth_settings is not None and not isinstance(auth_settings, LinuxWebAppSlotAuthSettingsArgs): + auth_settings = auth_settings or {} + def _setter(key, value): + auth_settings[key] = value + LinuxWebAppSlotAuthSettingsArgs._configure(_setter, **auth_settings) __props__.__dict__["auth_settings"] = auth_settings + if auth_settings_v2 is not None and not isinstance(auth_settings_v2, LinuxWebAppSlotAuthSettingsV2Args): + auth_settings_v2 = auth_settings_v2 or {} + def _setter(key, value): + auth_settings_v2[key] = value + LinuxWebAppSlotAuthSettingsV2Args._configure(_setter, **auth_settings_v2) __props__.__dict__["auth_settings_v2"] = auth_settings_v2 + if backup is not None and not isinstance(backup, LinuxWebAppSlotBackupArgs): + backup = backup or {} + def _setter(key, value): + backup[key] = value + LinuxWebAppSlotBackupArgs._configure(_setter, **backup) __props__.__dict__["backup"] = backup __props__.__dict__["client_affinity_enabled"] = client_affinity_enabled __props__.__dict__["client_certificate_enabled"] = client_certificate_enabled @@ -1103,12 +1342,27 @@ def _internal_init(__self__, __props__.__dict__["connection_strings"] = connection_strings __props__.__dict__["enabled"] = enabled __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, LinuxWebAppSlotIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + LinuxWebAppSlotIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["key_vault_reference_identity_id"] = key_vault_reference_identity_id + if logs is not None and not isinstance(logs, LinuxWebAppSlotLogsArgs): + logs = logs or {} + def _setter(key, value): + logs[key] = value + LinuxWebAppSlotLogsArgs._configure(_setter, **logs) __props__.__dict__["logs"] = logs __props__.__dict__["name"] = name __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled __props__.__dict__["service_plan_id"] = service_plan_id + if site_config is not None and not isinstance(site_config, LinuxWebAppSlotSiteConfigArgs): + site_config = site_config or {} + def _setter(key, value): + site_config[key] = value + LinuxWebAppSlotSiteConfigArgs._configure(_setter, **site_config) if site_config is None and not opts.urn: raise TypeError("Missing required property 'site_config'") __props__.__dict__["site_config"] = site_config diff --git a/sdk/python/pulumi_azure/appservice/managed_certificate.py b/sdk/python/pulumi_azure/appservice/managed_certificate.py index 6c475bfd3a..8e087b2daa 100644 --- a/sdk/python/pulumi_azure/appservice/managed_certificate.py +++ b/sdk/python/pulumi_azure/appservice/managed_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManagedCertificateArgs', 'ManagedCertificate'] @@ -21,9 +21,26 @@ def __init__(__self__, *, :param pulumi.Input[str] custom_hostname_binding_id: The ID of the App Service Custom Hostname Binding for the Certificate. Changing this forces a new App Service Managed Certificate to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the App Service Managed Certificate. """ - pulumi.set(__self__, "custom_hostname_binding_id", custom_hostname_binding_id) + ManagedCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_hostname_binding_id=custom_hostname_binding_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_hostname_binding_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_hostname_binding_id is None and 'customHostnameBindingId' in kwargs: + custom_hostname_binding_id = kwargs['customHostnameBindingId'] + if custom_hostname_binding_id is None: + raise TypeError("Missing 'custom_hostname_binding_id' argument") + + _setter("custom_hostname_binding_id", custom_hostname_binding_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="customHostnameBindingId") @@ -76,26 +93,69 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the App Service Managed Certificate. :param pulumi.Input[str] thumbprint: The Certificate Thumbprint. """ + _ManagedCertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + canonical_name=canonical_name, + custom_hostname_binding_id=custom_hostname_binding_id, + expiration_date=expiration_date, + friendly_name=friendly_name, + host_names=host_names, + issue_date=issue_date, + issuer=issuer, + subject_name=subject_name, + tags=tags, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + canonical_name: Optional[pulumi.Input[str]] = None, + custom_hostname_binding_id: Optional[pulumi.Input[str]] = None, + expiration_date: Optional[pulumi.Input[str]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + host_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + issue_date: Optional[pulumi.Input[str]] = None, + issuer: Optional[pulumi.Input[str]] = None, + subject_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if canonical_name is None and 'canonicalName' in kwargs: + canonical_name = kwargs['canonicalName'] + if custom_hostname_binding_id is None and 'customHostnameBindingId' in kwargs: + custom_hostname_binding_id = kwargs['customHostnameBindingId'] + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if host_names is None and 'hostNames' in kwargs: + host_names = kwargs['hostNames'] + if issue_date is None and 'issueDate' in kwargs: + issue_date = kwargs['issueDate'] + if subject_name is None and 'subjectName' in kwargs: + subject_name = kwargs['subjectName'] + if canonical_name is not None: - pulumi.set(__self__, "canonical_name", canonical_name) + _setter("canonical_name", canonical_name) if custom_hostname_binding_id is not None: - pulumi.set(__self__, "custom_hostname_binding_id", custom_hostname_binding_id) + _setter("custom_hostname_binding_id", custom_hostname_binding_id) if expiration_date is not None: - pulumi.set(__self__, "expiration_date", expiration_date) + _setter("expiration_date", expiration_date) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if host_names is not None: - pulumi.set(__self__, "host_names", host_names) + _setter("host_names", host_names) if issue_date is not None: - pulumi.set(__self__, "issue_date", issue_date) + _setter("issue_date", issue_date) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if subject_name is not None: - pulumi.set(__self__, "subject_name", subject_name) + _setter("subject_name", subject_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="canonicalName") @@ -273,6 +333,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedCertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/outputs.py b/sdk/python/pulumi_azure/appservice/outputs.py index f3865a5522..8960562586 100644 --- a/sdk/python/pulumi_azure/appservice/outputs.py +++ b/sdk/python/pulumi_azure/appservice/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -640,19 +640,50 @@ def __init__(__self__, *, :param str secret: Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`. :param str subscription_id: Subscription ID for `userAssignedIdentity`. `subscription_id` and `client_id` should be either both specified or both not specified. """ - pulumi.set(__self__, "type", type) + AppConnectionAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + certificate=certificate, + client_id=client_id, + name=name, + principal_id=principal_id, + secret=secret, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + certificate: Optional[str] = None, + client_id: Optional[str] = None, + name: Optional[str] = None, + principal_id: Optional[str] = None, + secret: Optional[str] = None, + subscription_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + + _setter("type", type) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -735,7 +766,22 @@ def __init__(__self__, *, """ :param str key_vault_id: The key vault id to store secret. """ - pulumi.set(__self__, "key_vault_id", key_vault_id) + AppConnectionSecretStore._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("key_vault_id", key_vault_id) @property @pulumi.getter(name="keyVaultId") @@ -812,33 +858,88 @@ def __init__(__self__, *, :param 'AppServiceAuthSettingsTwitterArgs' twitter: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values are `AllowAnonymous` and `RedirectToLoginPage`. """ - pulumi.set(__self__, "enabled", enabled) + AppServiceAuthSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_params=additional_login_params, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + active_directory: Optional['outputs.AppServiceAuthSettingsActiveDirectory'] = None, + additional_login_params: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + facebook: Optional['outputs.AppServiceAuthSettingsFacebook'] = None, + google: Optional['outputs.AppServiceAuthSettingsGoogle'] = None, + issuer: Optional[str] = None, + microsoft: Optional['outputs.AppServiceAuthSettingsMicrosoft'] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitter: Optional['outputs.AppServiceAuthSettingsTwitter'] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_params is None and 'additionalLoginParams' in kwargs: + additional_login_params = kwargs['additionalLoginParams'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_params is not None: - pulumi.set(__self__, "additional_login_params", additional_login_params) + _setter("additional_login_params", additional_login_params) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -987,11 +1088,34 @@ def __init__(__self__, *, :param Sequence[str] allowed_audiences: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. :param str client_secret: The Client Secret of this relying party application. If no secret is provided, implicit flow will be used. """ - pulumi.set(__self__, "client_id", client_id) + AppServiceAuthSettingsActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + client_secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -1050,10 +1174,35 @@ def __init__(__self__, *, :param str app_secret: The App Secret of the Facebook app used for Facebook login. :param Sequence[str] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret", app_secret) + AppServiceAuthSettingsFacebook._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret is None: + raise TypeError("Missing 'app_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) + _setter("app_secret", app_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -1112,10 +1261,35 @@ def __init__(__self__, *, :param str client_secret: The client secret associated with the Google web application. :param Sequence[str] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + AppServiceAuthSettingsGoogle._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -1174,10 +1348,35 @@ def __init__(__self__, *, :param str client_secret: The OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + AppServiceAuthSettingsMicrosoft._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -1232,8 +1431,29 @@ def __init__(__self__, *, :param str consumer_key: The consumer key of the Twitter app used for login :param str consumer_secret: The consumer secret of the Twitter app used for login. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret", consumer_secret) + AppServiceAuthSettingsTwitter._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret is None: + raise TypeError("Missing 'consumer_secret' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret", consumer_secret) @property @pulumi.getter(name="consumerKey") @@ -1282,11 +1502,36 @@ def __init__(__self__, *, :param str storage_account_url: The SAS URL to a Storage Container where Backups should be saved. :param bool enabled: Is this Backup enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + AppServiceBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + schedule: Optional['outputs.AppServiceBackupSchedule'] = None, + storage_account_url: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -1361,14 +1606,47 @@ def __init__(__self__, *, :param int retention_period_in_days: Specifies the number of days after which Backups should be deleted. Defaults to `30`. :param str start_time: Sets when the schedule should start working. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + AppServiceBackupSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + retention_period_in_days=retention_period_in_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[int] = None, + frequency_unit: Optional[str] = None, + keep_at_least_one_backup: Optional[bool] = None, + retention_period_in_days: Optional[int] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if retention_period_in_days is None and 'retentionPeriodInDays' in kwargs: + retention_period_in_days = kwargs['retentionPeriodInDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if retention_period_in_days is not None: - pulumi.set(__self__, "retention_period_in_days", retention_period_in_days) + _setter("retention_period_in_days", retention_period_in_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -1422,9 +1700,30 @@ def __init__(__self__, *, :param str type: The type of the Connection String. Possible values are `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure` and `SQLServer`. :param str value: The value for the Connection String. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + AppServiceConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -1487,13 +1786,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service. :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service. """ - pulumi.set(__self__, "type", type) + AppServiceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1566,14 +1890,39 @@ def __init__(__self__, *, :param bool failed_request_tracing_enabled: Should `Failed request tracing` be enabled on this App Service? Defaults to `false`. :param 'AppServiceLogsHttpLogsArgs' http_logs: An `http_logs` block as defined below. """ + AppServiceLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages_enabled=detailed_error_messages_enabled, + failed_request_tracing_enabled=failed_request_tracing_enabled, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional['outputs.AppServiceLogsApplicationLogs'] = None, + detailed_error_messages_enabled: Optional[bool] = None, + failed_request_tracing_enabled: Optional[bool] = None, + http_logs: Optional['outputs.AppServiceLogsHttpLogs'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if detailed_error_messages_enabled is None and 'detailedErrorMessagesEnabled' in kwargs: + detailed_error_messages_enabled = kwargs['detailedErrorMessagesEnabled'] + if failed_request_tracing_enabled is None and 'failedRequestTracingEnabled' in kwargs: + failed_request_tracing_enabled = kwargs['failedRequestTracingEnabled'] + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if application_logs is not None: - pulumi.set(__self__, "application_logs", application_logs) + _setter("application_logs", application_logs) if detailed_error_messages_enabled is not None: - pulumi.set(__self__, "detailed_error_messages_enabled", detailed_error_messages_enabled) + _setter("detailed_error_messages_enabled", detailed_error_messages_enabled) if failed_request_tracing_enabled is not None: - pulumi.set(__self__, "failed_request_tracing_enabled", failed_request_tracing_enabled) + _setter("failed_request_tracing_enabled", failed_request_tracing_enabled) if http_logs is not None: - pulumi.set(__self__, "http_logs", http_logs) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -1636,10 +1985,27 @@ def __init__(__self__, *, :param 'AppServiceLogsApplicationLogsAzureBlobStorageArgs' azure_blob_storage: An `azure_blob_storage` block as defined below. :param str file_system_level: Log level for filesystem based logging. Supported values are `Error`, `Information`, `Verbose`, `Warning` and `Off`. Defaults to `Off`. """ + AppServiceLogsApplicationLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system_level=file_system_level, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional['outputs.AppServiceLogsApplicationLogsAzureBlobStorage'] = None, + file_system_level: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system_level is not None: - pulumi.set(__self__, "file_system_level", file_system_level) + _setter("file_system_level", file_system_level) @property @pulumi.getter(name="azureBlobStorage") @@ -1688,9 +2054,34 @@ def __init__(__self__, *, :param int retention_in_days: The number of days to retain logs for. :param str sas_url: The URL to the storage container with a shared access signature token appended. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + AppServiceLogsApplicationLogsAzureBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[str] = None, + retention_in_days: Optional[int] = None, + sas_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -1745,10 +2136,27 @@ def __init__(__self__, *, :param 'AppServiceLogsHttpLogsAzureBlobStorageArgs' azure_blob_storage: An `azure_blob_storage` block as defined below. :param 'AppServiceLogsHttpLogsFileSystemArgs' file_system: A `file_system` block as defined below. """ + AppServiceLogsHttpLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system=file_system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional['outputs.AppServiceLogsHttpLogsAzureBlobStorage'] = None, + file_system: Optional['outputs.AppServiceLogsHttpLogsFileSystem'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) @property @pulumi.getter(name="azureBlobStorage") @@ -1795,8 +2203,29 @@ def __init__(__self__, *, :param int retention_in_days: The number of days to retain logs for. :param str sas_url: The URL to the storage container with a shared access signature token appended. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + AppServiceLogsHttpLogsAzureBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[int] = None, + sas_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter(name="retentionInDays") @@ -1843,8 +2272,29 @@ def __init__(__self__, *, :param int retention_in_days: The number of days to retain logs for. :param int retention_in_mb: The maximum size in megabytes that HTTP log files can use before being removed. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + AppServiceLogsHttpLogsFileSystem._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[int] = None, + retention_in_mb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -2020,68 +2470,199 @@ def __init__(__self__, *, :param bool websockets_enabled: Should WebSockets be enabled? :param str windows_fx_version: The Windows Docker container image (`DOCKER|`) """ + AppServiceSiteConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + acr_use_managed_identity_credentials=acr_use_managed_identity_credentials, + acr_user_managed_identity_client_id=acr_user_managed_identity_client_id, + always_on=always_on, + app_command_line=app_command_line, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + default_documents=default_documents, + dotnet_framework_version=dotnet_framework_version, + ftps_state=ftps_state, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + java_container=java_container, + java_container_version=java_container_version, + java_version=java_version, + linux_fx_version=linux_fx_version, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + min_tls_version=min_tls_version, + number_of_workers=number_of_workers, + php_version=php_version, + python_version=python_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + acr_use_managed_identity_credentials: Optional[bool] = None, + acr_user_managed_identity_client_id: Optional[str] = None, + always_on: Optional[bool] = None, + app_command_line: Optional[str] = None, + auto_swap_slot_name: Optional[str] = None, + cors: Optional['outputs.AppServiceSiteConfigCors'] = None, + default_documents: Optional[Sequence[str]] = None, + dotnet_framework_version: Optional[str] = None, + ftps_state: Optional[str] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.AppServiceSiteConfigIpRestriction']] = None, + java_container: Optional[str] = None, + java_container_version: Optional[str] = None, + java_version: Optional[str] = None, + linux_fx_version: Optional[str] = None, + local_mysql_enabled: Optional[bool] = None, + managed_pipeline_mode: Optional[str] = None, + min_tls_version: Optional[str] = None, + number_of_workers: Optional[int] = None, + php_version: Optional[str] = None, + python_version: Optional[str] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + scm_ip_restrictions: Optional[Sequence['outputs.AppServiceSiteConfigScmIpRestriction']] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker_process: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + windows_fx_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if acr_use_managed_identity_credentials is None and 'acrUseManagedIdentityCredentials' in kwargs: + acr_use_managed_identity_credentials = kwargs['acrUseManagedIdentityCredentials'] + if acr_user_managed_identity_client_id is None and 'acrUserManagedIdentityClientId' in kwargs: + acr_user_managed_identity_client_id = kwargs['acrUserManagedIdentityClientId'] + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if java_container is None and 'javaContainer' in kwargs: + java_container = kwargs['javaContainer'] + if java_container_version is None and 'javaContainerVersion' in kwargs: + java_container_version = kwargs['javaContainerVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if number_of_workers is None and 'numberOfWorkers' in kwargs: + number_of_workers = kwargs['numberOfWorkers'] + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if acr_use_managed_identity_credentials is not None: - pulumi.set(__self__, "acr_use_managed_identity_credentials", acr_use_managed_identity_credentials) + _setter("acr_use_managed_identity_credentials", acr_use_managed_identity_credentials) if acr_user_managed_identity_client_id is not None: - pulumi.set(__self__, "acr_user_managed_identity_client_id", acr_user_managed_identity_client_id) + _setter("acr_user_managed_identity_client_id", acr_user_managed_identity_client_id) if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if dotnet_framework_version is not None: - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) + _setter("dotnet_framework_version", dotnet_framework_version) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if java_container is not None: - pulumi.set(__self__, "java_container", java_container) + _setter("java_container", java_container) if java_container_version is not None: - pulumi.set(__self__, "java_container_version", java_container_version) + _setter("java_container_version", java_container_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if local_mysql_enabled is not None: - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) + _setter("local_mysql_enabled", local_mysql_enabled) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if number_of_workers is not None: - pulumi.set(__self__, "number_of_workers", number_of_workers) + _setter("number_of_workers", number_of_workers) if php_version is not None: - pulumi.set(__self__, "php_version", php_version) + _setter("php_version", php_version) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker_process is not None: - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) + _setter("use32_bit_worker_process", use32_bit_worker_process) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if windows_fx_version is not None: - pulumi.set(__self__, "windows_fx_version", windows_fx_version) + _setter("windows_fx_version", windows_fx_version) @property @pulumi.getter(name="acrUseManagedIdentityCredentials") @@ -2373,9 +2954,28 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls. :param bool support_credentials: Are credentials supported? """ - pulumi.set(__self__, "allowed_origins", allowed_origins) + AppServiceSiteConfigCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -2436,20 +3036,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + AppServiceSiteConfigIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.AppServiceSiteConfigIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -2546,14 +3175,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param Sequence[str] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + AppServiceSiteConfigIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -2630,20 +3284,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + AppServiceSiteConfigScmIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.AppServiceSiteConfigScmIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -2740,14 +3423,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param Sequence[str] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + AppServiceSiteConfigScmIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -2791,10 +3499,23 @@ def __init__(__self__, *, :param str password: The password associated with the username, which can be used to publish to this App Service. :param str username: The username which can be used to publish to this App Service """ + AppServiceSiteCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -2851,16 +3572,43 @@ def __init__(__self__, *, :param bool rollback_enabled: Enable roll-back for the repository. Defaults to `false` if not specified. :param bool use_mercurial: Use Mercurial if `true`, otherwise uses Git. """ + AppServiceSourceControl._configure( + lambda key, value: pulumi.set(__self__, key, value), + branch=branch, + manual_integration=manual_integration, + repo_url=repo_url, + rollback_enabled=rollback_enabled, + use_mercurial=use_mercurial, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + branch: Optional[str] = None, + manual_integration: Optional[bool] = None, + repo_url: Optional[str] = None, + rollback_enabled: Optional[bool] = None, + use_mercurial: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if manual_integration is None and 'manualIntegration' in kwargs: + manual_integration = kwargs['manualIntegration'] + if repo_url is None and 'repoUrl' in kwargs: + repo_url = kwargs['repoUrl'] + if rollback_enabled is None and 'rollbackEnabled' in kwargs: + rollback_enabled = kwargs['rollbackEnabled'] + if use_mercurial is None and 'useMercurial' in kwargs: + use_mercurial = kwargs['useMercurial'] + if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if manual_integration is not None: - pulumi.set(__self__, "manual_integration", manual_integration) + _setter("manual_integration", manual_integration) if repo_url is not None: - pulumi.set(__self__, "repo_url", repo_url) + _setter("repo_url", repo_url) if rollback_enabled is not None: - pulumi.set(__self__, "rollback_enabled", rollback_enabled) + _setter("rollback_enabled", rollback_enabled) if use_mercurial is not None: - pulumi.set(__self__, "use_mercurial", use_mercurial) + _setter("use_mercurial", use_mercurial) @property @pulumi.getter @@ -2943,13 +3691,52 @@ def __init__(__self__, *, :param str type: The type of storage. Possible values are `AzureBlob` and `AzureFiles`. :param str mount_path: The path to mount the storage within the site's runtime environment. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + AppServiceStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[str] = None, + account_name: Optional[str] = None, + name: Optional[str] = None, + share_name: Optional[str] = None, + type: Optional[str] = None, + mount_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -3036,14 +3823,39 @@ def __init__(__self__, *, :param str key_vault_secret_name: Key Vault secret name. :param str provisioning_state: Status of the Key Vault secret. """ + CertificateOrderCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_name=certificate_name, + key_vault_id=key_vault_id, + key_vault_secret_name=key_vault_secret_name, + provisioning_state=provisioning_state, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_name: Optional[str] = None, + key_vault_id: Optional[str] = None, + key_vault_secret_name: Optional[str] = None, + provisioning_state: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_name is None and 'certificateName' in kwargs: + certificate_name = kwargs['certificateName'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_secret_name is None and 'keyVaultSecretName' in kwargs: + key_vault_secret_name = kwargs['keyVaultSecretName'] + if provisioning_state is None and 'provisioningState' in kwargs: + provisioning_state = kwargs['provisioningState'] + if certificate_name is not None: - pulumi.set(__self__, "certificate_name", certificate_name) + _setter("certificate_name", certificate_name) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if key_vault_secret_name is not None: - pulumi.set(__self__, "key_vault_secret_name", key_vault_secret_name) + _setter("key_vault_secret_name", key_vault_secret_name) if provisioning_state is not None: - pulumi.set(__self__, "provisioning_state", provisioning_state) + _setter("provisioning_state", provisioning_state) @property @pulumi.getter(name="certificateName") @@ -3118,19 +3930,50 @@ def __init__(__self__, *, :param str secret: Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`. :param str subscription_id: Subscription ID for `userAssignedIdentity`. `subscription_id` and `client_id` should be either both specified or both not specified. """ - pulumi.set(__self__, "type", type) + ConnectionAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + certificate=certificate, + client_id=client_id, + name=name, + principal_id=principal_id, + secret=secret, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + certificate: Optional[str] = None, + client_id: Optional[str] = None, + name: Optional[str] = None, + principal_id: Optional[str] = None, + secret: Optional[str] = None, + subscription_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + + _setter("type", type) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -3213,7 +4056,22 @@ def __init__(__self__, *, """ :param str key_vault_id: The key vault id to store secret. """ - pulumi.set(__self__, "key_vault_id", key_vault_id) + ConnectionSecretStore._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("key_vault_id", key_vault_id) @property @pulumi.getter(name="keyVaultId") @@ -3233,8 +4091,25 @@ def __init__(__self__, *, :param str name: The name of the Cluster Setting. :param str value: The value for the Cluster Setting. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + EnvironmentClusterSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -3262,8 +4137,25 @@ def __init__(__self__, *, :param str name: The name of the Cluster Setting. :param str value: The value for the Cluster Setting. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + EnvironmentV3ClusterSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -3310,12 +4202,29 @@ def __init__(__self__, *, :param Sequence[str] ip_addresses: A list of IP addresses that network traffic will originate from in CIDR notation. :param Sequence[str] ports: The ports that network traffic will arrive to the App Service Environment V3 on. """ + EnvironmentV3InboundNetworkDependency._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + ip_addresses=ip_addresses, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + ip_addresses: Optional[Sequence[str]] = None, + ports: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) if ports is not None: - pulumi.set(__self__, "ports", ports) + _setter("ports", ports) @property @pulumi.getter @@ -3408,33 +4317,88 @@ def __init__(__self__, *, :param 'FunctionAppAuthSettingsTwitterArgs' twitter: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values are `AllowAnonymous` and `RedirectToLoginPage`. """ - pulumi.set(__self__, "enabled", enabled) + FunctionAppAuthSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_params=additional_login_params, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + active_directory: Optional['outputs.FunctionAppAuthSettingsActiveDirectory'] = None, + additional_login_params: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + facebook: Optional['outputs.FunctionAppAuthSettingsFacebook'] = None, + google: Optional['outputs.FunctionAppAuthSettingsGoogle'] = None, + issuer: Optional[str] = None, + microsoft: Optional['outputs.FunctionAppAuthSettingsMicrosoft'] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitter: Optional['outputs.FunctionAppAuthSettingsTwitter'] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_params is None and 'additionalLoginParams' in kwargs: + additional_login_params = kwargs['additionalLoginParams'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_params is not None: - pulumi.set(__self__, "additional_login_params", additional_login_params) + _setter("additional_login_params", additional_login_params) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -3583,11 +4547,34 @@ def __init__(__self__, *, :param Sequence[str] allowed_audiences: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. :param str client_secret: The Client Secret of this relying party application. If no secret is provided, implicit flow will be used. """ - pulumi.set(__self__, "client_id", client_id) + FunctionAppAuthSettingsActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + client_secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -3646,10 +4633,35 @@ def __init__(__self__, *, :param str app_secret: The App Secret of the Facebook app used for Facebook login. :param Sequence[str] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret", app_secret) + FunctionAppAuthSettingsFacebook._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret is None: + raise TypeError("Missing 'app_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) + _setter("app_secret", app_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -3708,10 +4720,35 @@ def __init__(__self__, *, :param str client_secret: The client secret associated with the Google web application. :param Sequence[str] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + FunctionAppAuthSettingsGoogle._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -3770,10 +4807,35 @@ def __init__(__self__, *, :param str client_secret: The OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + FunctionAppAuthSettingsMicrosoft._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -3828,8 +4890,29 @@ def __init__(__self__, *, :param str consumer_key: The OAuth 1.0a consumer key of the Twitter application used for sign-in. :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret", consumer_secret) + FunctionAppAuthSettingsTwitter._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret is None: + raise TypeError("Missing 'consumer_secret' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret", consumer_secret) @property @pulumi.getter(name="consumerKey") @@ -3859,9 +4942,30 @@ def __init__(__self__, *, :param str type: The type of the Connection String. Possible values are `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure` and `SQLServer`. :param str value: The value for the Connection String. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + FunctionAppConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -3897,8 +5001,25 @@ def __init__(__self__, *, :param str content: The content of the file. Changing this forces a new resource to be created. :param str name: The filename of the file to be uploaded. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "name", name) + FunctionAppFunctionFile._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("content", content) + _setter("name", name) @property @pulumi.getter @@ -3953,13 +5074,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service. :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service. """ - pulumi.set(__self__, "type", type) + FunctionAppIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -4109,48 +5255,139 @@ def __init__(__self__, *, > **Note:** when using an App Service Plan in the `Free` or `Shared` Tiers `use_32_bit_worker_process` must be set to `true`. :param bool websockets_enabled: Should WebSockets be enabled? """ + FunctionAppSiteConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + app_scale_limit=app_scale_limit, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + dotnet_framework_version=dotnet_framework_version, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + java_version=java_version, + linux_fx_version=linux_fx_version, + min_tls_version=min_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + app_scale_limit: Optional[int] = None, + auto_swap_slot_name: Optional[str] = None, + cors: Optional['outputs.FunctionAppSiteConfigCors'] = None, + dotnet_framework_version: Optional[str] = None, + elastic_instance_minimum: Optional[int] = None, + ftps_state: Optional[str] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.FunctionAppSiteConfigIpRestriction']] = None, + java_version: Optional[str] = None, + linux_fx_version: Optional[str] = None, + min_tls_version: Optional[str] = None, + pre_warmed_instance_count: Optional[int] = None, + runtime_scale_monitoring_enabled: Optional[bool] = None, + scm_ip_restrictions: Optional[Sequence['outputs.FunctionAppSiteConfigScmIpRestriction']] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker_process: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if dotnet_framework_version is not None: - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) + _setter("dotnet_framework_version", dotnet_framework_version) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker_process is not None: - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) + _setter("use32_bit_worker_process", use32_bit_worker_process) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) @property @pulumi.getter(name="alwaysOn") @@ -4358,9 +5595,28 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls. :param bool support_credentials: Are credentials supported? """ - pulumi.set(__self__, "allowed_origins", allowed_origins) + FunctionAppSiteConfigCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -4421,20 +5677,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + FunctionAppSiteConfigIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.FunctionAppSiteConfigIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -4531,14 +5816,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param Sequence[str] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + FunctionAppSiteConfigIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -4615,20 +5925,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + FunctionAppSiteConfigScmIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.FunctionAppSiteConfigScmIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -4725,14 +6064,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param Sequence[str] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + FunctionAppSiteConfigScmIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -4776,10 +6140,23 @@ def __init__(__self__, *, :param str password: The password associated with the username, which can be used to publish to this App Service. :param str username: The username which can be used to publish to this App Service """ + FunctionAppSiteCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -4864,33 +6241,88 @@ def __init__(__self__, *, :param 'FunctionAppSlotAuthSettingsTwitterArgs' twitter: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values are `AllowAnonymous` and `RedirectToLoginPage`. """ - pulumi.set(__self__, "enabled", enabled) + FunctionAppSlotAuthSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_params=additional_login_params, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + active_directory: Optional['outputs.FunctionAppSlotAuthSettingsActiveDirectory'] = None, + additional_login_params: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + facebook: Optional['outputs.FunctionAppSlotAuthSettingsFacebook'] = None, + google: Optional['outputs.FunctionAppSlotAuthSettingsGoogle'] = None, + issuer: Optional[str] = None, + microsoft: Optional['outputs.FunctionAppSlotAuthSettingsMicrosoft'] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitter: Optional['outputs.FunctionAppSlotAuthSettingsTwitter'] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_params is None and 'additionalLoginParams' in kwargs: + additional_login_params = kwargs['additionalLoginParams'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_params is not None: - pulumi.set(__self__, "additional_login_params", additional_login_params) + _setter("additional_login_params", additional_login_params) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -5039,11 +6471,34 @@ def __init__(__self__, *, :param Sequence[str] allowed_audiences: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. :param str client_secret: The Client Secret of this relying party application. If no secret is provided, implicit flow will be used. """ - pulumi.set(__self__, "client_id", client_id) + FunctionAppSlotAuthSettingsActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + client_secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -5102,10 +6557,35 @@ def __init__(__self__, *, :param str app_secret: The App Secret of the Facebook app used for Facebook login. :param Sequence[str] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret", app_secret) + FunctionAppSlotAuthSettingsFacebook._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret is None: + raise TypeError("Missing 'app_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) + _setter("app_secret", app_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -5164,10 +6644,35 @@ def __init__(__self__, *, :param str client_secret: The client secret associated with the Google web application. :param Sequence[str] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + FunctionAppSlotAuthSettingsGoogle._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -5226,10 +6731,35 @@ def __init__(__self__, *, :param str client_secret: The OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + FunctionAppSlotAuthSettingsMicrosoft._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -5284,8 +6814,29 @@ def __init__(__self__, *, :param str consumer_key: The OAuth 1.0a consumer key of the Twitter application used for sign-in. :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret", consumer_secret) + FunctionAppSlotAuthSettingsTwitter._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret is None: + raise TypeError("Missing 'consumer_secret' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret", consumer_secret) @property @pulumi.getter(name="consumerKey") @@ -5315,9 +6866,30 @@ def __init__(__self__, *, :param str type: The type of the Connection String. Possible values are `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure` and `SQLServer`. :param str value: The value for the Connection String. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + FunctionAppSlotConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -5380,13 +6952,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service. :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service. """ - pulumi.set(__self__, "type", type) + FunctionAppSlotIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -5532,48 +7129,139 @@ def __init__(__self__, *, > **Note:** when using an App Service Plan in the `Free` or `Shared` Tiers `use_32_bit_worker_process` must be set to `true`. :param bool websockets_enabled: Should WebSockets be enabled? """ + FunctionAppSlotSiteConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + app_scale_limit=app_scale_limit, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + dotnet_framework_version=dotnet_framework_version, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + java_version=java_version, + linux_fx_version=linux_fx_version, + min_tls_version=min_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + app_scale_limit: Optional[int] = None, + auto_swap_slot_name: Optional[str] = None, + cors: Optional['outputs.FunctionAppSlotSiteConfigCors'] = None, + dotnet_framework_version: Optional[str] = None, + elastic_instance_minimum: Optional[int] = None, + ftps_state: Optional[str] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.FunctionAppSlotSiteConfigIpRestriction']] = None, + java_version: Optional[str] = None, + linux_fx_version: Optional[str] = None, + min_tls_version: Optional[str] = None, + pre_warmed_instance_count: Optional[int] = None, + runtime_scale_monitoring_enabled: Optional[bool] = None, + scm_ip_restrictions: Optional[Sequence['outputs.FunctionAppSlotSiteConfigScmIpRestriction']] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker_process: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if dotnet_framework_version is not None: - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) + _setter("dotnet_framework_version", dotnet_framework_version) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker_process is not None: - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) + _setter("use32_bit_worker_process", use32_bit_worker_process) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) @property @pulumi.getter(name="alwaysOn") @@ -5777,9 +7465,28 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls. :param bool support_credentials: Are credentials supported? """ - pulumi.set(__self__, "allowed_origins", allowed_origins) + FunctionAppSlotSiteConfigCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -5840,20 +7547,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + FunctionAppSlotSiteConfigIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.FunctionAppSlotSiteConfigIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -5950,14 +7686,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param Sequence[str] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + FunctionAppSlotSiteConfigIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -6034,20 +7795,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + FunctionAppSlotSiteConfigScmIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.FunctionAppSlotSiteConfigScmIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -6144,14 +7934,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param Sequence[str] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + FunctionAppSlotSiteConfigScmIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -6195,10 +8010,23 @@ def __init__(__self__, *, :param str password: The password associated with the username, which can be used to publish to this App Service. :param str username: The username which can be used to publish to this App Service """ + FunctionAppSlotSiteCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -6255,16 +8083,43 @@ def __init__(__self__, *, :param bool rollback_enabled: Enable roll-back for the repository. Defaults to `false` if not specified. :param bool use_mercurial: Use Mercurial if `true`, otherwise uses Git. """ + FunctionAppSourceControl._configure( + lambda key, value: pulumi.set(__self__, key, value), + branch=branch, + manual_integration=manual_integration, + repo_url=repo_url, + rollback_enabled=rollback_enabled, + use_mercurial=use_mercurial, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + branch: Optional[str] = None, + manual_integration: Optional[bool] = None, + repo_url: Optional[str] = None, + rollback_enabled: Optional[bool] = None, + use_mercurial: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if manual_integration is None and 'manualIntegration' in kwargs: + manual_integration = kwargs['manualIntegration'] + if repo_url is None and 'repoUrl' in kwargs: + repo_url = kwargs['repoUrl'] + if rollback_enabled is None and 'rollbackEnabled' in kwargs: + rollback_enabled = kwargs['rollbackEnabled'] + if use_mercurial is None and 'useMercurial' in kwargs: + use_mercurial = kwargs['useMercurial'] + if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if manual_integration is not None: - pulumi.set(__self__, "manual_integration", manual_integration) + _setter("manual_integration", manual_integration) if repo_url is not None: - pulumi.set(__self__, "repo_url", repo_url) + _setter("repo_url", repo_url) if rollback_enabled is not None: - pulumi.set(__self__, "rollback_enabled", rollback_enabled) + _setter("rollback_enabled", rollback_enabled) if use_mercurial is not None: - pulumi.set(__self__, "use_mercurial", use_mercurial) + _setter("use_mercurial", use_mercurial) @property @pulumi.getter @@ -6377,35 +8232,92 @@ def __init__(__self__, *, :param 'LinuxFunctionAppAuthSettingsTwitterArgs' twitter: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + LinuxFunctionAppAuthSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + active_directory: Optional['outputs.LinuxFunctionAppAuthSettingsActiveDirectory'] = None, + additional_login_parameters: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + facebook: Optional['outputs.LinuxFunctionAppAuthSettingsFacebook'] = None, + github: Optional['outputs.LinuxFunctionAppAuthSettingsGithub'] = None, + google: Optional['outputs.LinuxFunctionAppAuthSettingsGoogle'] = None, + issuer: Optional[str] = None, + microsoft: Optional['outputs.LinuxFunctionAppAuthSettingsMicrosoft'] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitter: Optional['outputs.LinuxFunctionAppAuthSettingsTwitter'] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -6570,13 +8482,40 @@ def __init__(__self__, *, :param str client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppAuthSettingsActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -6649,13 +8588,40 @@ def __init__(__self__, *, :param str app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + LinuxFunctionAppAuthSettingsFacebook._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -6726,13 +8692,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppAuthSettingsGithub._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -6803,13 +8796,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppAuthSettingsGoogle._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -6880,13 +8900,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppAuthSettingsMicrosoft._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -6953,11 +9000,34 @@ def __init__(__self__, *, :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + LinuxFunctionAppAuthSettingsTwitter._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -7096,49 +9166,146 @@ def __init__(__self__, *, :param 'LinuxFunctionAppAuthSettingsV2TwitterV2Args' twitter_v2: A `twitter_v2` block as defined below. :param str unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + LinuxFunctionAppAuthSettingsV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional['outputs.LinuxFunctionAppAuthSettingsV2Login'] = None, + active_directory_v2: Optional['outputs.LinuxFunctionAppAuthSettingsV2ActiveDirectoryV2'] = None, + apple_v2: Optional['outputs.LinuxFunctionAppAuthSettingsV2AppleV2'] = None, + auth_enabled: Optional[bool] = None, + azure_static_web_app_v2: Optional['outputs.LinuxFunctionAppAuthSettingsV2AzureStaticWebAppV2'] = None, + config_file_path: Optional[str] = None, + custom_oidc_v2s: Optional[Sequence['outputs.LinuxFunctionAppAuthSettingsV2CustomOidcV2']] = None, + default_provider: Optional[str] = None, + excluded_paths: Optional[Sequence[str]] = None, + facebook_v2: Optional['outputs.LinuxFunctionAppAuthSettingsV2FacebookV2'] = None, + forward_proxy_convention: Optional[str] = None, + forward_proxy_custom_host_header_name: Optional[str] = None, + forward_proxy_custom_scheme_header_name: Optional[str] = None, + github_v2: Optional['outputs.LinuxFunctionAppAuthSettingsV2GithubV2'] = None, + google_v2: Optional['outputs.LinuxFunctionAppAuthSettingsV2GoogleV2'] = None, + http_route_api_prefix: Optional[str] = None, + microsoft_v2: Optional['outputs.LinuxFunctionAppAuthSettingsV2MicrosoftV2'] = None, + require_authentication: Optional[bool] = None, + require_https: Optional[bool] = None, + runtime_version: Optional[str] = None, + twitter_v2: Optional['outputs.LinuxFunctionAppAuthSettingsV2TwitterV2'] = None, + unauthenticated_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -7395,28 +9562,89 @@ def __init__(__self__, *, :param Mapping[str, str] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param bool www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + LinuxFunctionAppAuthSettingsV2ActiveDirectoryV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + tenant_auth_endpoint: Optional[str] = None, + allowed_applications: Optional[Sequence[str]] = None, + allowed_audiences: Optional[Sequence[str]] = None, + allowed_groups: Optional[Sequence[str]] = None, + allowed_identities: Optional[Sequence[str]] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + jwt_allowed_client_applications: Optional[Sequence[str]] = None, + jwt_allowed_groups: Optional[Sequence[str]] = None, + login_parameters: Optional[Mapping[str, str]] = None, + www_authentication_disabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -7551,10 +9779,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppAuthSettingsV2AppleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -7605,7 +9858,22 @@ def __init__(__self__, *, """ :param str client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppAuthSettingsV2AzureStaticWebAppV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -7676,25 +9944,80 @@ def __init__(__self__, *, :param Sequence[str] scopes: The list of the scopes that should be requested while authenticating. :param str token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + LinuxFunctionAppAuthSettingsV2CustomOidcV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + name: Optional[str] = None, + openid_configuration_endpoint: Optional[str] = None, + authorisation_endpoint: Optional[str] = None, + certification_uri: Optional[str] = None, + client_credential_method: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + issuer_endpoint: Optional[str] = None, + name_claim_type: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + token_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -7823,12 +10146,41 @@ def __init__(__self__, *, :param str graph_api_version: The version of the Facebook API to be used while logging in. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + LinuxFunctionAppAuthSettingsV2FacebookV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + graph_api_version: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -7897,10 +10249,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppAuthSettingsV2GithubV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -7965,12 +10342,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppAuthSettingsV2GoogleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -8073,28 +10479,81 @@ def __init__(__self__, *, :param str token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param bool validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + LinuxFunctionAppAuthSettingsV2Login._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + cookie_expiration_convention: Optional[str] = None, + cookie_expiration_time: Optional[str] = None, + logout_endpoint: Optional[str] = None, + nonce_expiration_time: Optional[str] = None, + preserve_url_fragments_for_logins: Optional[bool] = None, + token_refresh_extension_time: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + token_store_path: Optional[str] = None, + token_store_sas_setting_name: Optional[str] = None, + validate_nonce: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -8225,12 +10684,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppAuthSettingsV2MicrosoftV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -8297,8 +10785,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + LinuxFunctionAppAuthSettingsV2TwitterV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -8349,11 +10858,36 @@ def __init__(__self__, *, :param str storage_account_url: The SAS URL to the container. :param bool enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + LinuxFunctionAppBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + schedule: Optional['outputs.LinuxFunctionAppBackupSchedule'] = None, + storage_account_url: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -8433,16 +10967,53 @@ def __init__(__self__, *, :param int retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param str start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + LinuxFunctionAppBackupSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[int] = None, + frequency_unit: Optional[str] = None, + keep_at_least_one_backup: Optional[bool] = None, + last_execution_time: Optional[str] = None, + retention_period_days: Optional[int] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -8503,9 +11074,30 @@ def __init__(__self__, *, :param str type: Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`. :param str value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + LinuxFunctionAppConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -8568,13 +11160,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + LinuxFunctionAppIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -8776,78 +11393,229 @@ def __init__(__self__, *, :param bool websockets_enabled: Should Web Sockets be enabled. Defaults to `false`. :param int worker_count: The number of Workers for this Linux Function App. """ + LinuxFunctionAppSiteConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + app_scale_limit=app_scale_limit, + app_service_logs=app_service_logs, + application_insights_connection_string=application_insights_connection_string, + application_insights_key=application_insights_key, + application_stack=application_stack, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + load_balancing_mode=load_balancing_mode, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + api_definition_url: Optional[str] = None, + api_management_api_id: Optional[str] = None, + app_command_line: Optional[str] = None, + app_scale_limit: Optional[int] = None, + app_service_logs: Optional['outputs.LinuxFunctionAppSiteConfigAppServiceLogs'] = None, + application_insights_connection_string: Optional[str] = None, + application_insights_key: Optional[str] = None, + application_stack: Optional['outputs.LinuxFunctionAppSiteConfigApplicationStack'] = None, + container_registry_managed_identity_client_id: Optional[str] = None, + container_registry_use_managed_identity: Optional[bool] = None, + cors: Optional['outputs.LinuxFunctionAppSiteConfigCors'] = None, + default_documents: Optional[Sequence[str]] = None, + detailed_error_logging_enabled: Optional[bool] = None, + elastic_instance_minimum: Optional[int] = None, + ftps_state: Optional[str] = None, + health_check_eviction_time_in_min: Optional[int] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.LinuxFunctionAppSiteConfigIpRestriction']] = None, + linux_fx_version: Optional[str] = None, + load_balancing_mode: Optional[str] = None, + managed_pipeline_mode: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + pre_warmed_instance_count: Optional[int] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + runtime_scale_monitoring_enabled: Optional[bool] = None, + scm_ip_restrictions: Optional[Sequence['outputs.LinuxFunctionAppSiteConfigScmIpRestriction']] = None, + scm_minimum_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + worker_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if app_service_logs is None and 'appServiceLogs' in kwargs: + app_service_logs = kwargs['appServiceLogs'] + if application_insights_connection_string is None and 'applicationInsightsConnectionString' in kwargs: + application_insights_connection_string = kwargs['applicationInsightsConnectionString'] + if application_insights_key is None and 'applicationInsightsKey' in kwargs: + application_insights_key = kwargs['applicationInsightsKey'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if app_service_logs is not None: - pulumi.set(__self__, "app_service_logs", app_service_logs) + _setter("app_service_logs", app_service_logs) if application_insights_connection_string is not None: - pulumi.set(__self__, "application_insights_connection_string", application_insights_connection_string) + _setter("application_insights_connection_string", application_insights_connection_string) if application_insights_key is not None: - pulumi.set(__self__, "application_insights_key", application_insights_key) + _setter("application_insights_key", application_insights_key) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if container_registry_managed_identity_client_id is not None: - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) if container_registry_use_managed_identity is not None: - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -9165,10 +11933,27 @@ def __init__(__self__, *, > **NOTE:** This block is not supported on Consumption plans. """ + LinuxFunctionAppSiteConfigAppServiceLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_quota_mb=disk_quota_mb, + retention_period_days=retention_period_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_quota_mb: Optional[int] = None, + retention_period_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_quota_mb is None and 'diskQuotaMb' in kwargs: + disk_quota_mb = kwargs['diskQuotaMb'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if disk_quota_mb is not None: - pulumi.set(__self__, "disk_quota_mb", disk_quota_mb) + _setter("disk_quota_mb", disk_quota_mb) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) @property @pulumi.getter(name="diskQuotaMb") @@ -9239,22 +12024,61 @@ def __init__(__self__, *, :param bool use_custom_runtime: Should the Linux Function App use a custom runtime? :param bool use_dotnet_isolated_runtime: Should the DotNet process use an isolated runtime. Defaults to `false`. """ + LinuxFunctionAppSiteConfigApplicationStack._configure( + lambda key, value: pulumi.set(__self__, key, value), + dockers=dockers, + dotnet_version=dotnet_version, + java_version=java_version, + node_version=node_version, + powershell_core_version=powershell_core_version, + python_version=python_version, + use_custom_runtime=use_custom_runtime, + use_dotnet_isolated_runtime=use_dotnet_isolated_runtime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dockers: Optional[Sequence['outputs.LinuxFunctionAppSiteConfigApplicationStackDocker']] = None, + dotnet_version: Optional[str] = None, + java_version: Optional[str] = None, + node_version: Optional[str] = None, + powershell_core_version: Optional[str] = None, + python_version: Optional[str] = None, + use_custom_runtime: Optional[bool] = None, + use_dotnet_isolated_runtime: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if powershell_core_version is None and 'powershellCoreVersion' in kwargs: + powershell_core_version = kwargs['powershellCoreVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if use_custom_runtime is None and 'useCustomRuntime' in kwargs: + use_custom_runtime = kwargs['useCustomRuntime'] + if use_dotnet_isolated_runtime is None and 'useDotnetIsolatedRuntime' in kwargs: + use_dotnet_isolated_runtime = kwargs['useDotnetIsolatedRuntime'] + if dockers is not None: - pulumi.set(__self__, "dockers", dockers) + _setter("dockers", dockers) if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if powershell_core_version is not None: - pulumi.set(__self__, "powershell_core_version", powershell_core_version) + _setter("powershell_core_version", powershell_core_version) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if use_custom_runtime is not None: - pulumi.set(__self__, "use_custom_runtime", use_custom_runtime) + _setter("use_custom_runtime", use_custom_runtime) if use_dotnet_isolated_runtime is not None: - pulumi.set(__self__, "use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) + _setter("use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) @property @pulumi.getter @@ -9365,13 +12189,48 @@ def __init__(__self__, *, > **NOTE:** This value is required if `container_registry_use_managed_identity` is not set to `true`. """ - pulumi.set(__self__, "image_name", image_name) - pulumi.set(__self__, "image_tag", image_tag) - pulumi.set(__self__, "registry_url", registry_url) + LinuxFunctionAppSiteConfigApplicationStackDocker._configure( + lambda key, value: pulumi.set(__self__, key, value), + image_name=image_name, + image_tag=image_tag, + registry_url=registry_url, + registry_password=registry_password, + registry_username=registry_username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image_name: Optional[str] = None, + image_tag: Optional[str] = None, + registry_url: Optional[str] = None, + registry_password: Optional[str] = None, + registry_username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if image_name is None: + raise TypeError("Missing 'image_name' argument") + if image_tag is None and 'imageTag' in kwargs: + image_tag = kwargs['imageTag'] + if image_tag is None: + raise TypeError("Missing 'image_tag' argument") + if registry_url is None and 'registryUrl' in kwargs: + registry_url = kwargs['registryUrl'] + if registry_url is None: + raise TypeError("Missing 'registry_url' argument") + if registry_password is None and 'registryPassword' in kwargs: + registry_password = kwargs['registryPassword'] + if registry_username is None and 'registryUsername' in kwargs: + registry_username = kwargs['registryUsername'] + + _setter("image_name", image_name) + _setter("image_tag", image_tag) + _setter("registry_url", registry_url) if registry_password is not None: - pulumi.set(__self__, "registry_password", registry_password) + _setter("registry_password", registry_password) if registry_username is not None: - pulumi.set(__self__, "registry_username", registry_username) + _setter("registry_username", registry_username) @property @pulumi.getter(name="imageName") @@ -9446,10 +12305,27 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: Specifies a list of origins that should be allowed to make cross-origin calls. :param bool support_credentials: Are credentials allowed in CORS requests? Defaults to `false`. """ + LinuxFunctionAppSiteConfigCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -9510,20 +12386,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxFunctionAppSiteConfigIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.LinuxFunctionAppSiteConfigIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -9620,14 +12525,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxFunctionAppSiteConfigIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -9704,20 +12634,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxFunctionAppSiteConfigScmIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.LinuxFunctionAppSiteConfigScmIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -9814,14 +12773,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxFunctionAppSiteConfigScmIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -9865,10 +12849,23 @@ def __init__(__self__, *, :param str name: The name which should be used for this Linux Function App. Changing this forces a new Linux Function App to be created. Limit the function name to 32 characters to avoid naming collisions. For more information about [Function App naming rule](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftweb) and [Host ID Collisions](https://github.com/Azure/azure-functions-host/wiki/Host-IDs#host-id-collisions) :param str password: The Site Credentials Password used for publishing. """ + LinuxFunctionAppSiteCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -9957,35 +12954,92 @@ def __init__(__self__, *, :param 'LinuxFunctionAppSlotAuthSettingsTwitterArgs' twitter: a `twitter` block as detailed below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + LinuxFunctionAppSlotAuthSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + active_directory: Optional['outputs.LinuxFunctionAppSlotAuthSettingsActiveDirectory'] = None, + additional_login_parameters: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + facebook: Optional['outputs.LinuxFunctionAppSlotAuthSettingsFacebook'] = None, + github: Optional['outputs.LinuxFunctionAppSlotAuthSettingsGithub'] = None, + google: Optional['outputs.LinuxFunctionAppSlotAuthSettingsGoogle'] = None, + issuer: Optional[str] = None, + microsoft: Optional['outputs.LinuxFunctionAppSlotAuthSettingsMicrosoft'] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitter: Optional['outputs.LinuxFunctionAppSlotAuthSettingsTwitter'] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -10150,13 +13204,40 @@ def __init__(__self__, *, :param str client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppSlotAuthSettingsActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -10229,13 +13310,40 @@ def __init__(__self__, *, :param str app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + LinuxFunctionAppSlotAuthSettingsFacebook._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -10306,13 +13414,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppSlotAuthSettingsGithub._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -10383,13 +13518,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppSlotAuthSettingsGoogle._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -10460,13 +13622,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppSlotAuthSettingsMicrosoft._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -10533,11 +13722,34 @@ def __init__(__self__, *, :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + LinuxFunctionAppSlotAuthSettingsTwitter._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -10676,49 +13888,146 @@ def __init__(__self__, *, :param 'LinuxFunctionAppSlotAuthSettingsV2TwitterV2Args' twitter_v2: A `twitter_v2` block as defined below. :param str unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + LinuxFunctionAppSlotAuthSettingsV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional['outputs.LinuxFunctionAppSlotAuthSettingsV2Login'] = None, + active_directory_v2: Optional['outputs.LinuxFunctionAppSlotAuthSettingsV2ActiveDirectoryV2'] = None, + apple_v2: Optional['outputs.LinuxFunctionAppSlotAuthSettingsV2AppleV2'] = None, + auth_enabled: Optional[bool] = None, + azure_static_web_app_v2: Optional['outputs.LinuxFunctionAppSlotAuthSettingsV2AzureStaticWebAppV2'] = None, + config_file_path: Optional[str] = None, + custom_oidc_v2s: Optional[Sequence['outputs.LinuxFunctionAppSlotAuthSettingsV2CustomOidcV2']] = None, + default_provider: Optional[str] = None, + excluded_paths: Optional[Sequence[str]] = None, + facebook_v2: Optional['outputs.LinuxFunctionAppSlotAuthSettingsV2FacebookV2'] = None, + forward_proxy_convention: Optional[str] = None, + forward_proxy_custom_host_header_name: Optional[str] = None, + forward_proxy_custom_scheme_header_name: Optional[str] = None, + github_v2: Optional['outputs.LinuxFunctionAppSlotAuthSettingsV2GithubV2'] = None, + google_v2: Optional['outputs.LinuxFunctionAppSlotAuthSettingsV2GoogleV2'] = None, + http_route_api_prefix: Optional[str] = None, + microsoft_v2: Optional['outputs.LinuxFunctionAppSlotAuthSettingsV2MicrosoftV2'] = None, + require_authentication: Optional[bool] = None, + require_https: Optional[bool] = None, + runtime_version: Optional[str] = None, + twitter_v2: Optional['outputs.LinuxFunctionAppSlotAuthSettingsV2TwitterV2'] = None, + unauthenticated_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -10975,28 +14284,89 @@ def __init__(__self__, *, :param Mapping[str, str] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param bool www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + LinuxFunctionAppSlotAuthSettingsV2ActiveDirectoryV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + tenant_auth_endpoint: Optional[str] = None, + allowed_applications: Optional[Sequence[str]] = None, + allowed_audiences: Optional[Sequence[str]] = None, + allowed_groups: Optional[Sequence[str]] = None, + allowed_identities: Optional[Sequence[str]] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + jwt_allowed_client_applications: Optional[Sequence[str]] = None, + jwt_allowed_groups: Optional[Sequence[str]] = None, + login_parameters: Optional[Mapping[str, str]] = None, + www_authentication_disabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -11131,10 +14501,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppSlotAuthSettingsV2AppleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -11185,7 +14580,22 @@ def __init__(__self__, *, """ :param str client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + LinuxFunctionAppSlotAuthSettingsV2AzureStaticWebAppV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -11256,25 +14666,80 @@ def __init__(__self__, *, :param Sequence[str] scopes: The list of the scopes that should be requested while authenticating. :param str token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + LinuxFunctionAppSlotAuthSettingsV2CustomOidcV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + name: Optional[str] = None, + openid_configuration_endpoint: Optional[str] = None, + authorisation_endpoint: Optional[str] = None, + certification_uri: Optional[str] = None, + client_credential_method: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + issuer_endpoint: Optional[str] = None, + name_claim_type: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + token_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -11403,12 +14868,41 @@ def __init__(__self__, *, :param str graph_api_version: The version of the Facebook API to be used while logging in. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + LinuxFunctionAppSlotAuthSettingsV2FacebookV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + graph_api_version: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -11477,10 +14971,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppSlotAuthSettingsV2GithubV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -11545,12 +15064,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppSlotAuthSettingsV2GoogleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -11653,28 +15201,81 @@ def __init__(__self__, *, :param str token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param bool validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + LinuxFunctionAppSlotAuthSettingsV2Login._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + cookie_expiration_convention: Optional[str] = None, + cookie_expiration_time: Optional[str] = None, + logout_endpoint: Optional[str] = None, + nonce_expiration_time: Optional[str] = None, + preserve_url_fragments_for_logins: Optional[bool] = None, + token_refresh_extension_time: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + token_store_path: Optional[str] = None, + token_store_sas_setting_name: Optional[str] = None, + validate_nonce: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -11805,12 +15406,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxFunctionAppSlotAuthSettingsV2MicrosoftV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -11877,8 +15507,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + LinuxFunctionAppSlotAuthSettingsV2TwitterV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -11929,11 +15580,36 @@ def __init__(__self__, *, :param str storage_account_url: The SAS URL to the container. :param bool enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + LinuxFunctionAppSlotBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + schedule: Optional['outputs.LinuxFunctionAppSlotBackupSchedule'] = None, + storage_account_url: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -12014,16 +15690,53 @@ def __init__(__self__, *, :param int retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param str start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + LinuxFunctionAppSlotBackupSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[int] = None, + frequency_unit: Optional[str] = None, + keep_at_least_one_backup: Optional[bool] = None, + last_execution_time: Optional[str] = None, + retention_period_days: Optional[int] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -12087,9 +15800,30 @@ def __init__(__self__, *, :param str type: Type of database. Possible values include: `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param str value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + LinuxFunctionAppSlotConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -12152,13 +15886,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + LinuxFunctionAppSlotIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -12363,80 +16122,235 @@ def __init__(__self__, *, :param bool websockets_enabled: Should Web Sockets be enabled. Defaults to `false`. :param int worker_count: The number of Workers for this Linux Function App. """ + LinuxFunctionAppSlotSiteConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + app_scale_limit=app_scale_limit, + app_service_logs=app_service_logs, + application_insights_connection_string=application_insights_connection_string, + application_insights_key=application_insights_key, + application_stack=application_stack, + auto_swap_slot_name=auto_swap_slot_name, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + load_balancing_mode=load_balancing_mode, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + api_definition_url: Optional[str] = None, + api_management_api_id: Optional[str] = None, + app_command_line: Optional[str] = None, + app_scale_limit: Optional[int] = None, + app_service_logs: Optional['outputs.LinuxFunctionAppSlotSiteConfigAppServiceLogs'] = None, + application_insights_connection_string: Optional[str] = None, + application_insights_key: Optional[str] = None, + application_stack: Optional['outputs.LinuxFunctionAppSlotSiteConfigApplicationStack'] = None, + auto_swap_slot_name: Optional[str] = None, + container_registry_managed_identity_client_id: Optional[str] = None, + container_registry_use_managed_identity: Optional[bool] = None, + cors: Optional['outputs.LinuxFunctionAppSlotSiteConfigCors'] = None, + default_documents: Optional[Sequence[str]] = None, + detailed_error_logging_enabled: Optional[bool] = None, + elastic_instance_minimum: Optional[int] = None, + ftps_state: Optional[str] = None, + health_check_eviction_time_in_min: Optional[int] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.LinuxFunctionAppSlotSiteConfigIpRestriction']] = None, + linux_fx_version: Optional[str] = None, + load_balancing_mode: Optional[str] = None, + managed_pipeline_mode: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + pre_warmed_instance_count: Optional[int] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + runtime_scale_monitoring_enabled: Optional[bool] = None, + scm_ip_restrictions: Optional[Sequence['outputs.LinuxFunctionAppSlotSiteConfigScmIpRestriction']] = None, + scm_minimum_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + worker_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if app_service_logs is None and 'appServiceLogs' in kwargs: + app_service_logs = kwargs['appServiceLogs'] + if application_insights_connection_string is None and 'applicationInsightsConnectionString' in kwargs: + application_insights_connection_string = kwargs['applicationInsightsConnectionString'] + if application_insights_key is None and 'applicationInsightsKey' in kwargs: + application_insights_key = kwargs['applicationInsightsKey'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if app_service_logs is not None: - pulumi.set(__self__, "app_service_logs", app_service_logs) + _setter("app_service_logs", app_service_logs) if application_insights_connection_string is not None: - pulumi.set(__self__, "application_insights_connection_string", application_insights_connection_string) + _setter("application_insights_connection_string", application_insights_connection_string) if application_insights_key is not None: - pulumi.set(__self__, "application_insights_key", application_insights_key) + _setter("application_insights_key", application_insights_key) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if container_registry_managed_identity_client_id is not None: - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) if container_registry_use_managed_identity is not None: - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -12767,10 +16681,27 @@ def __init__(__self__, *, > **NOTE:** This block is not supported on Consumption plans. """ + LinuxFunctionAppSlotSiteConfigAppServiceLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_quota_mb=disk_quota_mb, + retention_period_days=retention_period_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_quota_mb: Optional[int] = None, + retention_period_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_quota_mb is None and 'diskQuotaMb' in kwargs: + disk_quota_mb = kwargs['diskQuotaMb'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if disk_quota_mb is not None: - pulumi.set(__self__, "disk_quota_mb", disk_quota_mb) + _setter("disk_quota_mb", disk_quota_mb) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) @property @pulumi.getter(name="diskQuotaMb") @@ -12841,22 +16772,61 @@ def __init__(__self__, *, :param bool use_custom_runtime: Should the Linux Function App use a custom runtime? :param bool use_dotnet_isolated_runtime: Should the DotNet process use an isolated runtime. Defaults to `false`. """ + LinuxFunctionAppSlotSiteConfigApplicationStack._configure( + lambda key, value: pulumi.set(__self__, key, value), + dockers=dockers, + dotnet_version=dotnet_version, + java_version=java_version, + node_version=node_version, + powershell_core_version=powershell_core_version, + python_version=python_version, + use_custom_runtime=use_custom_runtime, + use_dotnet_isolated_runtime=use_dotnet_isolated_runtime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dockers: Optional[Sequence['outputs.LinuxFunctionAppSlotSiteConfigApplicationStackDocker']] = None, + dotnet_version: Optional[str] = None, + java_version: Optional[str] = None, + node_version: Optional[str] = None, + powershell_core_version: Optional[str] = None, + python_version: Optional[str] = None, + use_custom_runtime: Optional[bool] = None, + use_dotnet_isolated_runtime: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if powershell_core_version is None and 'powershellCoreVersion' in kwargs: + powershell_core_version = kwargs['powershellCoreVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if use_custom_runtime is None and 'useCustomRuntime' in kwargs: + use_custom_runtime = kwargs['useCustomRuntime'] + if use_dotnet_isolated_runtime is None and 'useDotnetIsolatedRuntime' in kwargs: + use_dotnet_isolated_runtime = kwargs['useDotnetIsolatedRuntime'] + if dockers is not None: - pulumi.set(__self__, "dockers", dockers) + _setter("dockers", dockers) if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if powershell_core_version is not None: - pulumi.set(__self__, "powershell_core_version", powershell_core_version) + _setter("powershell_core_version", powershell_core_version) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if use_custom_runtime is not None: - pulumi.set(__self__, "use_custom_runtime", use_custom_runtime) + _setter("use_custom_runtime", use_custom_runtime) if use_dotnet_isolated_runtime is not None: - pulumi.set(__self__, "use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) + _setter("use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) @property @pulumi.getter @@ -12967,13 +16937,48 @@ def __init__(__self__, *, > **NOTE:** This value is required if `container_registry_use_managed_identity` is not set to `true`. """ - pulumi.set(__self__, "image_name", image_name) - pulumi.set(__self__, "image_tag", image_tag) - pulumi.set(__self__, "registry_url", registry_url) + LinuxFunctionAppSlotSiteConfigApplicationStackDocker._configure( + lambda key, value: pulumi.set(__self__, key, value), + image_name=image_name, + image_tag=image_tag, + registry_url=registry_url, + registry_password=registry_password, + registry_username=registry_username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image_name: Optional[str] = None, + image_tag: Optional[str] = None, + registry_url: Optional[str] = None, + registry_password: Optional[str] = None, + registry_username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if image_name is None: + raise TypeError("Missing 'image_name' argument") + if image_tag is None and 'imageTag' in kwargs: + image_tag = kwargs['imageTag'] + if image_tag is None: + raise TypeError("Missing 'image_tag' argument") + if registry_url is None and 'registryUrl' in kwargs: + registry_url = kwargs['registryUrl'] + if registry_url is None: + raise TypeError("Missing 'registry_url' argument") + if registry_password is None and 'registryPassword' in kwargs: + registry_password = kwargs['registryPassword'] + if registry_username is None and 'registryUsername' in kwargs: + registry_username = kwargs['registryUsername'] + + _setter("image_name", image_name) + _setter("image_tag", image_tag) + _setter("registry_url", registry_url) if registry_password is not None: - pulumi.set(__self__, "registry_password", registry_password) + _setter("registry_password", registry_password) if registry_username is not None: - pulumi.set(__self__, "registry_username", registry_username) + _setter("registry_username", registry_username) @property @pulumi.getter(name="imageName") @@ -13048,10 +17053,27 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: an `allowed_origins` block as detailed below. :param bool support_credentials: Are credentials allowed in CORS requests? Defaults to `false`. """ + LinuxFunctionAppSlotSiteConfigCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -13112,20 +17134,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxFunctionAppSlotSiteConfigIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.LinuxFunctionAppSlotSiteConfigIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -13222,14 +17273,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxFunctionAppSlotSiteConfigIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -13306,20 +17382,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxFunctionAppSlotSiteConfigScmIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.LinuxFunctionAppSlotSiteConfigScmIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -13416,14 +17521,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxFunctionAppSlotSiteConfigScmIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -13467,10 +17597,23 @@ def __init__(__self__, *, :param str name: The Site Credentials Username used for publishing. :param str password: The Site Credentials Password used for publishing. """ + LinuxFunctionAppSlotSiteCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -13529,13 +17672,52 @@ def __init__(__self__, *, :param str type: The Azure Storage Type. Possible values include `AzureFiles` and `AzureBlob`. :param str mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + LinuxFunctionAppSlotStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[str] = None, + account_name: Optional[str] = None, + name: Optional[str] = None, + share_name: Optional[str] = None, + type: Optional[str] = None, + mount_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -13614,10 +17796,27 @@ def __init__(__self__, *, :param Sequence[str] app_setting_names: A list of `app_setting` names that the Linux Function App will not swap between Slots when a swap operation is triggered. :param Sequence[str] connection_string_names: A list of `connection_string` names that the Linux Function App will not swap between Slots when a swap operation is triggered. """ + LinuxFunctionAppStickySettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_setting_names=app_setting_names, + connection_string_names=connection_string_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_setting_names: Optional[Sequence[str]] = None, + connection_string_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_setting_names is None and 'appSettingNames' in kwargs: + app_setting_names = kwargs['appSettingNames'] + if connection_string_names is None and 'connectionStringNames' in kwargs: + connection_string_names = kwargs['connectionStringNames'] + if app_setting_names is not None: - pulumi.set(__self__, "app_setting_names", app_setting_names) + _setter("app_setting_names", app_setting_names) if connection_string_names is not None: - pulumi.set(__self__, "connection_string_names", connection_string_names) + _setter("connection_string_names", connection_string_names) @property @pulumi.getter(name="appSettingNames") @@ -13676,13 +17875,52 @@ def __init__(__self__, *, :param str type: The Azure Storage Type. Possible values include `AzureFiles` and `AzureBlob`. :param str mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + LinuxFunctionAppStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[str] = None, + account_name: Optional[str] = None, + name: Optional[str] = None, + share_name: Optional[str] = None, + type: Optional[str] = None, + mount_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -13803,35 +18041,92 @@ def __init__(__self__, *, :param 'LinuxWebAppAuthSettingsTwitterArgs' twitter: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + LinuxWebAppAuthSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + active_directory: Optional['outputs.LinuxWebAppAuthSettingsActiveDirectory'] = None, + additional_login_parameters: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + facebook: Optional['outputs.LinuxWebAppAuthSettingsFacebook'] = None, + github: Optional['outputs.LinuxWebAppAuthSettingsGithub'] = None, + google: Optional['outputs.LinuxWebAppAuthSettingsGoogle'] = None, + issuer: Optional[str] = None, + microsoft: Optional['outputs.LinuxWebAppAuthSettingsMicrosoft'] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitter: Optional['outputs.LinuxWebAppAuthSettingsTwitter'] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -13996,13 +18291,40 @@ def __init__(__self__, *, :param str client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppAuthSettingsActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -14075,13 +18397,40 @@ def __init__(__self__, *, :param str app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + LinuxWebAppAuthSettingsFacebook._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -14152,13 +18501,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppAuthSettingsGithub._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -14229,13 +18605,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppAuthSettingsGoogle._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -14306,13 +18709,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, "wl.basic" is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppAuthSettingsMicrosoft._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -14379,11 +18809,34 @@ def __init__(__self__, *, :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + LinuxWebAppAuthSettingsTwitter._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -14522,49 +18975,146 @@ def __init__(__self__, *, :param 'LinuxWebAppAuthSettingsV2TwitterV2Args' twitter_v2: A `twitter_v2` block as defined below. :param str unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + LinuxWebAppAuthSettingsV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional['outputs.LinuxWebAppAuthSettingsV2Login'] = None, + active_directory_v2: Optional['outputs.LinuxWebAppAuthSettingsV2ActiveDirectoryV2'] = None, + apple_v2: Optional['outputs.LinuxWebAppAuthSettingsV2AppleV2'] = None, + auth_enabled: Optional[bool] = None, + azure_static_web_app_v2: Optional['outputs.LinuxWebAppAuthSettingsV2AzureStaticWebAppV2'] = None, + config_file_path: Optional[str] = None, + custom_oidc_v2s: Optional[Sequence['outputs.LinuxWebAppAuthSettingsV2CustomOidcV2']] = None, + default_provider: Optional[str] = None, + excluded_paths: Optional[Sequence[str]] = None, + facebook_v2: Optional['outputs.LinuxWebAppAuthSettingsV2FacebookV2'] = None, + forward_proxy_convention: Optional[str] = None, + forward_proxy_custom_host_header_name: Optional[str] = None, + forward_proxy_custom_scheme_header_name: Optional[str] = None, + github_v2: Optional['outputs.LinuxWebAppAuthSettingsV2GithubV2'] = None, + google_v2: Optional['outputs.LinuxWebAppAuthSettingsV2GoogleV2'] = None, + http_route_api_prefix: Optional[str] = None, + microsoft_v2: Optional['outputs.LinuxWebAppAuthSettingsV2MicrosoftV2'] = None, + require_authentication: Optional[bool] = None, + require_https: Optional[bool] = None, + runtime_version: Optional[str] = None, + twitter_v2: Optional['outputs.LinuxWebAppAuthSettingsV2TwitterV2'] = None, + unauthenticated_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -14821,28 +19371,89 @@ def __init__(__self__, *, :param Mapping[str, str] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param bool www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + LinuxWebAppAuthSettingsV2ActiveDirectoryV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + tenant_auth_endpoint: Optional[str] = None, + allowed_applications: Optional[Sequence[str]] = None, + allowed_audiences: Optional[Sequence[str]] = None, + allowed_groups: Optional[Sequence[str]] = None, + allowed_identities: Optional[Sequence[str]] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + jwt_allowed_client_applications: Optional[Sequence[str]] = None, + jwt_allowed_groups: Optional[Sequence[str]] = None, + login_parameters: Optional[Mapping[str, str]] = None, + www_authentication_disabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -14977,10 +19588,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppAuthSettingsV2AppleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -15031,7 +19667,22 @@ def __init__(__self__, *, """ :param str client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppAuthSettingsV2AzureStaticWebAppV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -15101,25 +19752,80 @@ def __init__(__self__, *, :param Sequence[str] scopes: The list of the scopes that should be requested while authenticating. :param str token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + LinuxWebAppAuthSettingsV2CustomOidcV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + name: Optional[str] = None, + openid_configuration_endpoint: Optional[str] = None, + authorisation_endpoint: Optional[str] = None, + certification_uri: Optional[str] = None, + client_credential_method: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + issuer_endpoint: Optional[str] = None, + name_claim_type: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + token_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -15245,12 +19951,41 @@ def __init__(__self__, *, :param str graph_api_version: The version of the Facebook API to be used while logging in. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + LinuxWebAppAuthSettingsV2FacebookV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + graph_api_version: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -15319,10 +20054,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppAuthSettingsV2GithubV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -15387,12 +20147,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppAuthSettingsV2GoogleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -15495,28 +20284,81 @@ def __init__(__self__, *, :param str token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param bool validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + LinuxWebAppAuthSettingsV2Login._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + cookie_expiration_convention: Optional[str] = None, + cookie_expiration_time: Optional[str] = None, + logout_endpoint: Optional[str] = None, + nonce_expiration_time: Optional[str] = None, + preserve_url_fragments_for_logins: Optional[bool] = None, + token_refresh_extension_time: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + token_store_path: Optional[str] = None, + token_store_sas_setting_name: Optional[str] = None, + validate_nonce: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -15647,12 +20489,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppAuthSettingsV2MicrosoftV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -15719,8 +20590,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + LinuxWebAppAuthSettingsV2TwitterV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -15771,11 +20663,36 @@ def __init__(__self__, *, :param str storage_account_url: The SAS URL to the container. :param bool enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + LinuxWebAppBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + schedule: Optional['outputs.LinuxWebAppBackupSchedule'] = None, + storage_account_url: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -15855,16 +20772,53 @@ def __init__(__self__, *, :param int retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param str start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + LinuxWebAppBackupSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[int] = None, + frequency_unit: Optional[str] = None, + keep_at_least_one_backup: Optional[bool] = None, + last_execution_time: Optional[str] = None, + retention_period_days: Optional[int] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -15925,9 +20879,30 @@ def __init__(__self__, *, :param str type: Type of database. Possible values include: `MySQL`, `SQLServer`, `SQLAzure`, `Custom`, `NotificationHub`, `ServiceBus`, `EventHub`, `APIHub`, `DocDb`, `RedisCache`, and `PostgreSQL`. :param str value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + LinuxWebAppConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -15990,13 +20965,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + LinuxWebAppIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -16069,14 +21069,39 @@ def __init__(__self__, *, :param bool failed_request_tracing: Should the failed request tracing be enabled? :param 'LinuxWebAppLogsHttpLogsArgs' http_logs: An `http_logs` block as defined above. """ + LinuxWebAppLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages=detailed_error_messages, + failed_request_tracing=failed_request_tracing, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional['outputs.LinuxWebAppLogsApplicationLogs'] = None, + detailed_error_messages: Optional[bool] = None, + failed_request_tracing: Optional[bool] = None, + http_logs: Optional['outputs.LinuxWebAppLogsHttpLogs'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if detailed_error_messages is None and 'detailedErrorMessages' in kwargs: + detailed_error_messages = kwargs['detailedErrorMessages'] + if failed_request_tracing is None and 'failedRequestTracing' in kwargs: + failed_request_tracing = kwargs['failedRequestTracing'] + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if application_logs is not None: - pulumi.set(__self__, "application_logs", application_logs) + _setter("application_logs", application_logs) if detailed_error_messages is not None: - pulumi.set(__self__, "detailed_error_messages", detailed_error_messages) + _setter("detailed_error_messages", detailed_error_messages) if failed_request_tracing is not None: - pulumi.set(__self__, "failed_request_tracing", failed_request_tracing) + _setter("failed_request_tracing", failed_request_tracing) if http_logs is not None: - pulumi.set(__self__, "http_logs", http_logs) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -16139,9 +21164,28 @@ def __init__(__self__, *, :param str file_system_level: Log level. Possible values include: `Verbose`, `Information`, `Warning`, and `Error`. :param 'LinuxWebAppLogsApplicationLogsAzureBlobStorageArgs' azure_blob_storage: An `azure_blob_storage` block as defined below. """ - pulumi.set(__self__, "file_system_level", file_system_level) + LinuxWebAppLogsApplicationLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_system_level=file_system_level, + azure_blob_storage=azure_blob_storage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_system_level: Optional[str] = None, + azure_blob_storage: Optional['outputs.LinuxWebAppLogsApplicationLogsAzureBlobStorage'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if file_system_level is None: + raise TypeError("Missing 'file_system_level' argument") + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + + _setter("file_system_level", file_system_level) if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) @property @pulumi.getter(name="fileSystemLevel") @@ -16190,9 +21234,34 @@ def __init__(__self__, *, :param int retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. :param str sas_url: SAS url to an Azure blob container with read/write/list/delete permissions. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + LinuxWebAppLogsApplicationLogsAzureBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[str] = None, + retention_in_days: Optional[int] = None, + sas_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -16247,10 +21316,27 @@ def __init__(__self__, *, :param 'LinuxWebAppLogsHttpLogsAzureBlobStorageArgs' azure_blob_storage: A `azure_blob_storage_http` block as defined below. :param 'LinuxWebAppLogsHttpLogsFileSystemArgs' file_system: A `file_system` block as defined above. """ + LinuxWebAppLogsHttpLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system=file_system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional['outputs.LinuxWebAppLogsHttpLogsAzureBlobStorage'] = None, + file_system: Optional['outputs.LinuxWebAppLogsHttpLogsFileSystem'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) @property @pulumi.getter(name="azureBlobStorage") @@ -16297,9 +21383,28 @@ def __init__(__self__, *, :param str sas_url: SAS url to an Azure blob container with read/write/list/delete permissions. :param int retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. """ - pulumi.set(__self__, "sas_url", sas_url) + LinuxWebAppLogsHttpLogsAzureBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + sas_url=sas_url, + retention_in_days=retention_in_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sas_url: Optional[str] = None, + retention_in_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + + _setter("sas_url", sas_url) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) @property @pulumi.getter(name="sasUrl") @@ -16346,8 +21451,29 @@ def __init__(__self__, *, :param int retention_in_days: The retention period in days. A value of `0` means no retention. :param int retention_in_mb: The maximum size in megabytes that log files can use. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + LinuxWebAppLogsHttpLogsFileSystem._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[int] = None, + retention_in_mb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -16510,70 +21636,205 @@ def __init__(__self__, *, :param bool websockets_enabled: Should Web Sockets be enabled? Defaults to `false`. :param int worker_count: The number of Workers for this Linux App Service. """ + LinuxWebAppSiteConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + application_stack=application_stack, + auto_heal_enabled=auto_heal_enabled, + auto_heal_setting=auto_heal_setting, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + load_balancing_mode=load_balancing_mode, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + api_definition_url: Optional[str] = None, + api_management_api_id: Optional[str] = None, + app_command_line: Optional[str] = None, + application_stack: Optional['outputs.LinuxWebAppSiteConfigApplicationStack'] = None, + auto_heal_enabled: Optional[bool] = None, + auto_heal_setting: Optional['outputs.LinuxWebAppSiteConfigAutoHealSetting'] = None, + container_registry_managed_identity_client_id: Optional[str] = None, + container_registry_use_managed_identity: Optional[bool] = None, + cors: Optional['outputs.LinuxWebAppSiteConfigCors'] = None, + default_documents: Optional[Sequence[str]] = None, + detailed_error_logging_enabled: Optional[bool] = None, + ftps_state: Optional[str] = None, + health_check_eviction_time_in_min: Optional[int] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.LinuxWebAppSiteConfigIpRestriction']] = None, + linux_fx_version: Optional[str] = None, + load_balancing_mode: Optional[str] = None, + local_mysql_enabled: Optional[bool] = None, + managed_pipeline_mode: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + scm_ip_restrictions: Optional[Sequence['outputs.LinuxWebAppSiteConfigScmIpRestriction']] = None, + scm_minimum_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + worker_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if auto_heal_enabled is None and 'autoHealEnabled' in kwargs: + auto_heal_enabled = kwargs['autoHealEnabled'] + if auto_heal_setting is None and 'autoHealSetting' in kwargs: + auto_heal_setting = kwargs['autoHealSetting'] + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if auto_heal_enabled is not None: - pulumi.set(__self__, "auto_heal_enabled", auto_heal_enabled) + _setter("auto_heal_enabled", auto_heal_enabled) if auto_heal_setting is not None: - pulumi.set(__self__, "auto_heal_setting", auto_heal_setting) + _setter("auto_heal_setting", auto_heal_setting) if container_registry_managed_identity_client_id is not None: - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) if container_registry_use_managed_identity is not None: - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if local_mysql_enabled is not None: - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) + _setter("local_mysql_enabled", local_mysql_enabled) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -16910,36 +22171,105 @@ def __init__(__self__, *, :param str python_version: The version of Python to run. Possible values include `3.7`, `3.8`, `3.9`, `3.10` and `3.11`. :param str ruby_version: Te version of Ruby to run. Possible values include `2.6` and `2.7`. """ + LinuxWebAppSiteConfigApplicationStack._configure( + lambda key, value: pulumi.set(__self__, key, value), + docker_image=docker_image, + docker_image_name=docker_image_name, + docker_image_tag=docker_image_tag, + docker_registry_password=docker_registry_password, + docker_registry_url=docker_registry_url, + docker_registry_username=docker_registry_username, + dotnet_version=dotnet_version, + go_version=go_version, + java_server=java_server, + java_server_version=java_server_version, + java_version=java_version, + node_version=node_version, + php_version=php_version, + python_version=python_version, + ruby_version=ruby_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + docker_image: Optional[str] = None, + docker_image_name: Optional[str] = None, + docker_image_tag: Optional[str] = None, + docker_registry_password: Optional[str] = None, + docker_registry_url: Optional[str] = None, + docker_registry_username: Optional[str] = None, + dotnet_version: Optional[str] = None, + go_version: Optional[str] = None, + java_server: Optional[str] = None, + java_server_version: Optional[str] = None, + java_version: Optional[str] = None, + node_version: Optional[str] = None, + php_version: Optional[str] = None, + python_version: Optional[str] = None, + ruby_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if docker_image is None and 'dockerImage' in kwargs: + docker_image = kwargs['dockerImage'] + if docker_image_name is None and 'dockerImageName' in kwargs: + docker_image_name = kwargs['dockerImageName'] + if docker_image_tag is None and 'dockerImageTag' in kwargs: + docker_image_tag = kwargs['dockerImageTag'] + if docker_registry_password is None and 'dockerRegistryPassword' in kwargs: + docker_registry_password = kwargs['dockerRegistryPassword'] + if docker_registry_url is None and 'dockerRegistryUrl' in kwargs: + docker_registry_url = kwargs['dockerRegistryUrl'] + if docker_registry_username is None and 'dockerRegistryUsername' in kwargs: + docker_registry_username = kwargs['dockerRegistryUsername'] + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if go_version is None and 'goVersion' in kwargs: + go_version = kwargs['goVersion'] + if java_server is None and 'javaServer' in kwargs: + java_server = kwargs['javaServer'] + if java_server_version is None and 'javaServerVersion' in kwargs: + java_server_version = kwargs['javaServerVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if ruby_version is None and 'rubyVersion' in kwargs: + ruby_version = kwargs['rubyVersion'] + if docker_image is not None: - pulumi.set(__self__, "docker_image", docker_image) + _setter("docker_image", docker_image) if docker_image_name is not None: - pulumi.set(__self__, "docker_image_name", docker_image_name) + _setter("docker_image_name", docker_image_name) if docker_image_tag is not None: - pulumi.set(__self__, "docker_image_tag", docker_image_tag) + _setter("docker_image_tag", docker_image_tag) if docker_registry_password is not None: - pulumi.set(__self__, "docker_registry_password", docker_registry_password) + _setter("docker_registry_password", docker_registry_password) if docker_registry_url is not None: - pulumi.set(__self__, "docker_registry_url", docker_registry_url) + _setter("docker_registry_url", docker_registry_url) if docker_registry_username is not None: - pulumi.set(__self__, "docker_registry_username", docker_registry_username) + _setter("docker_registry_username", docker_registry_username) if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if go_version is not None: - pulumi.set(__self__, "go_version", go_version) + _setter("go_version", go_version) if java_server is not None: - pulumi.set(__self__, "java_server", java_server) + _setter("java_server", java_server) if java_server_version is not None: - pulumi.set(__self__, "java_server_version", java_server_version) + _setter("java_server_version", java_server_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if php_version is not None: - pulumi.set(__self__, "php_version", php_version) + _setter("php_version", php_version) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if ruby_version is not None: - pulumi.set(__self__, "ruby_version", ruby_version) + _setter("ruby_version", ruby_version) @property @pulumi.getter(name="dockerImage") @@ -17081,10 +22411,23 @@ def __init__(__self__, *, :param 'LinuxWebAppSiteConfigAutoHealSettingActionArgs' action: A `action` block as defined above. :param 'LinuxWebAppSiteConfigAutoHealSettingTriggerArgs' trigger: A `trigger` block as defined below. """ + LinuxWebAppSiteConfigAutoHealSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + trigger=trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional['outputs.LinuxWebAppSiteConfigAutoHealSettingAction'] = None, + trigger: Optional['outputs.LinuxWebAppSiteConfigAutoHealSettingTrigger'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if trigger is not None: - pulumi.set(__self__, "trigger", trigger) + _setter("trigger", trigger) @property @pulumi.getter @@ -17131,9 +22474,28 @@ def __init__(__self__, *, :param str action_type: Predefined action to be taken to an Auto Heal trigger. Possible values include: `Recycle`. :param str minimum_process_execution_time: The minimum amount of time in `hh:mm:ss` the Linux Web App must have been running before the defined action will be run in the event of a trigger. """ - pulumi.set(__self__, "action_type", action_type) + LinuxWebAppSiteConfigAutoHealSettingAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + minimum_process_execution_time=minimum_process_execution_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[str] = None, + minimum_process_execution_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + if minimum_process_execution_time is None and 'minimumProcessExecutionTime' in kwargs: + minimum_process_execution_time = kwargs['minimumProcessExecutionTime'] + + _setter("action_type", action_type) if minimum_process_execution_time is not None: - pulumi.set(__self__, "minimum_process_execution_time", minimum_process_execution_time) + _setter("minimum_process_execution_time", minimum_process_execution_time) @property @pulumi.getter(name="actionType") @@ -17182,12 +22544,31 @@ def __init__(__self__, *, :param Sequence['LinuxWebAppSiteConfigAutoHealSettingTriggerSlowRequestArgs'] slow_requests: One or more `slow_request` blocks as defined above. :param Sequence['LinuxWebAppSiteConfigAutoHealSettingTriggerStatusCodeArgs'] status_codes: One or more `status_code` blocks as defined above. """ + LinuxWebAppSiteConfigAutoHealSettingTrigger._configure( + lambda key, value: pulumi.set(__self__, key, value), + requests=requests, + slow_requests=slow_requests, + status_codes=status_codes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + requests: Optional['outputs.LinuxWebAppSiteConfigAutoHealSettingTriggerRequests'] = None, + slow_requests: Optional[Sequence['outputs.LinuxWebAppSiteConfigAutoHealSettingTriggerSlowRequest']] = None, + status_codes: Optional[Sequence['outputs.LinuxWebAppSiteConfigAutoHealSettingTriggerStatusCode']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if slow_requests is None and 'slowRequests' in kwargs: + slow_requests = kwargs['slowRequests'] + if status_codes is None and 'statusCodes' in kwargs: + status_codes = kwargs['statusCodes'] + if requests is not None: - pulumi.set(__self__, "requests", requests) + _setter("requests", requests) if slow_requests is not None: - pulumi.set(__self__, "slow_requests", slow_requests) + _setter("slow_requests", slow_requests) if status_codes is not None: - pulumi.set(__self__, "status_codes", status_codes) + _setter("status_codes", status_codes) @property @pulumi.getter @@ -17223,8 +22604,25 @@ def __init__(__self__, *, :param int count: The number of requests in the specified `interval` to trigger this rule. :param str interval: The interval in `hh:mm:ss`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) + LinuxWebAppSiteConfigAutoHealSettingTriggerRequests._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + + _setter("count", count) + _setter("interval", interval) @property @pulumi.getter @@ -17273,11 +22671,36 @@ def __init__(__self__, *, :param str time_taken: The threshold of time passed to qualify as a Slow Request in `hh:mm:ss`. :param str path: The path for which this slow request rule applies. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "time_taken", time_taken) + LinuxWebAppSiteConfigAutoHealSettingTriggerSlowRequest._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + time_taken=time_taken, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + time_taken: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if time_taken is None and 'timeTaken' in kwargs: + time_taken = kwargs['timeTaken'] + if time_taken is None: + raise TypeError("Missing 'time_taken' argument") + + _setter("count", count) + _setter("interval", interval) + _setter("time_taken", time_taken) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -17350,15 +22773,48 @@ def __init__(__self__, *, :param int sub_status: The Request Sub Status of the Status Code. :param int win32_status_code: The Win32 Status Code of the Request. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "status_code_range", status_code_range) + LinuxWebAppSiteConfigAutoHealSettingTriggerStatusCode._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + status_code_range=status_code_range, + path=path, + sub_status=sub_status, + win32_status_code=win32_status_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + status_code_range: Optional[str] = None, + path: Optional[str] = None, + sub_status: Optional[int] = None, + win32_status_code: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if status_code_range is None and 'statusCodeRange' in kwargs: + status_code_range = kwargs['statusCodeRange'] + if status_code_range is None: + raise TypeError("Missing 'status_code_range' argument") + if sub_status is None and 'subStatus' in kwargs: + sub_status = kwargs['subStatus'] + if win32_status_code is None and 'win32StatusCode' in kwargs: + win32_status_code = kwargs['win32StatusCode'] + + _setter("count", count) + _setter("interval", interval) + _setter("status_code_range", status_code_range) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if sub_status is not None: - pulumi.set(__self__, "sub_status", sub_status) + _setter("sub_status", sub_status) if win32_status_code is not None: - pulumi.set(__self__, "win32_status_code", win32_status_code) + _setter("win32_status_code", win32_status_code) @property @pulumi.getter @@ -17437,10 +22893,27 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: Specifies a list of origins that should be allowed to make cross-origin calls. :param bool support_credentials: Whether CORS requests with credentials are allowed. Defaults to `false` """ + LinuxWebAppSiteConfigCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -17501,20 +22974,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxWebAppSiteConfigIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.LinuxWebAppSiteConfigIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -17611,14 +23113,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxWebAppSiteConfigIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -17695,20 +23222,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxWebAppSiteConfigScmIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.LinuxWebAppSiteConfigScmIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -17805,14 +23361,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxWebAppSiteConfigScmIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -17855,10 +23436,23 @@ def __init__(__self__, *, """ :param str password: The Site Credentials Password used for publishing. """ + LinuxWebAppSiteCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -17944,35 +23538,92 @@ def __init__(__self__, *, :param 'LinuxWebAppSlotAuthSettingsTwitterArgs' twitter: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + LinuxWebAppSlotAuthSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + active_directory: Optional['outputs.LinuxWebAppSlotAuthSettingsActiveDirectory'] = None, + additional_login_parameters: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + facebook: Optional['outputs.LinuxWebAppSlotAuthSettingsFacebook'] = None, + github: Optional['outputs.LinuxWebAppSlotAuthSettingsGithub'] = None, + google: Optional['outputs.LinuxWebAppSlotAuthSettingsGoogle'] = None, + issuer: Optional[str] = None, + microsoft: Optional['outputs.LinuxWebAppSlotAuthSettingsMicrosoft'] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitter: Optional['outputs.LinuxWebAppSlotAuthSettingsTwitter'] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -18137,13 +23788,40 @@ def __init__(__self__, *, :param str client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppSlotAuthSettingsActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -18216,13 +23894,40 @@ def __init__(__self__, *, :param str app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + LinuxWebAppSlotAuthSettingsFacebook._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -18293,13 +23998,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppSlotAuthSettingsGithub._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -18370,13 +24102,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppSlotAuthSettingsGoogle._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -18447,13 +24206,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, "wl.basic" is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppSlotAuthSettingsMicrosoft._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -18520,11 +24306,34 @@ def __init__(__self__, *, :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + LinuxWebAppSlotAuthSettingsTwitter._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -18663,49 +24472,146 @@ def __init__(__self__, *, :param 'LinuxWebAppSlotAuthSettingsV2TwitterV2Args' twitter_v2: A `twitter_v2` block as defined below. :param str unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + LinuxWebAppSlotAuthSettingsV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional['outputs.LinuxWebAppSlotAuthSettingsV2Login'] = None, + active_directory_v2: Optional['outputs.LinuxWebAppSlotAuthSettingsV2ActiveDirectoryV2'] = None, + apple_v2: Optional['outputs.LinuxWebAppSlotAuthSettingsV2AppleV2'] = None, + auth_enabled: Optional[bool] = None, + azure_static_web_app_v2: Optional['outputs.LinuxWebAppSlotAuthSettingsV2AzureStaticWebAppV2'] = None, + config_file_path: Optional[str] = None, + custom_oidc_v2s: Optional[Sequence['outputs.LinuxWebAppSlotAuthSettingsV2CustomOidcV2']] = None, + default_provider: Optional[str] = None, + excluded_paths: Optional[Sequence[str]] = None, + facebook_v2: Optional['outputs.LinuxWebAppSlotAuthSettingsV2FacebookV2'] = None, + forward_proxy_convention: Optional[str] = None, + forward_proxy_custom_host_header_name: Optional[str] = None, + forward_proxy_custom_scheme_header_name: Optional[str] = None, + github_v2: Optional['outputs.LinuxWebAppSlotAuthSettingsV2GithubV2'] = None, + google_v2: Optional['outputs.LinuxWebAppSlotAuthSettingsV2GoogleV2'] = None, + http_route_api_prefix: Optional[str] = None, + microsoft_v2: Optional['outputs.LinuxWebAppSlotAuthSettingsV2MicrosoftV2'] = None, + require_authentication: Optional[bool] = None, + require_https: Optional[bool] = None, + runtime_version: Optional[str] = None, + twitter_v2: Optional['outputs.LinuxWebAppSlotAuthSettingsV2TwitterV2'] = None, + unauthenticated_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -18962,28 +24868,89 @@ def __init__(__self__, *, :param Mapping[str, str] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param bool www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + LinuxWebAppSlotAuthSettingsV2ActiveDirectoryV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + tenant_auth_endpoint: Optional[str] = None, + allowed_applications: Optional[Sequence[str]] = None, + allowed_audiences: Optional[Sequence[str]] = None, + allowed_groups: Optional[Sequence[str]] = None, + allowed_identities: Optional[Sequence[str]] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + jwt_allowed_client_applications: Optional[Sequence[str]] = None, + jwt_allowed_groups: Optional[Sequence[str]] = None, + login_parameters: Optional[Mapping[str, str]] = None, + www_authentication_disabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -19118,10 +25085,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppSlotAuthSettingsV2AppleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -19172,7 +25164,22 @@ def __init__(__self__, *, """ :param str client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + LinuxWebAppSlotAuthSettingsV2AzureStaticWebAppV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -19242,25 +25249,80 @@ def __init__(__self__, *, :param Sequence[str] scopes: The list of the scopes that should be requested while authenticating. :param str token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + LinuxWebAppSlotAuthSettingsV2CustomOidcV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + name: Optional[str] = None, + openid_configuration_endpoint: Optional[str] = None, + authorisation_endpoint: Optional[str] = None, + certification_uri: Optional[str] = None, + client_credential_method: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + issuer_endpoint: Optional[str] = None, + name_claim_type: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + token_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -19386,12 +25448,41 @@ def __init__(__self__, *, :param str graph_api_version: The version of the Facebook API to be used while logging in. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + LinuxWebAppSlotAuthSettingsV2FacebookV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + graph_api_version: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -19460,10 +25551,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppSlotAuthSettingsV2GithubV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -19528,12 +25644,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppSlotAuthSettingsV2GoogleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -19636,28 +25781,81 @@ def __init__(__self__, *, :param str token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param bool validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + LinuxWebAppSlotAuthSettingsV2Login._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + cookie_expiration_convention: Optional[str] = None, + cookie_expiration_time: Optional[str] = None, + logout_endpoint: Optional[str] = None, + nonce_expiration_time: Optional[str] = None, + preserve_url_fragments_for_logins: Optional[bool] = None, + token_refresh_extension_time: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + token_store_path: Optional[str] = None, + token_store_sas_setting_name: Optional[str] = None, + validate_nonce: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -19788,12 +25986,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + LinuxWebAppSlotAuthSettingsV2MicrosoftV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -19860,8 +26087,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + LinuxWebAppSlotAuthSettingsV2TwitterV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -19912,11 +26160,36 @@ def __init__(__self__, *, :param str storage_account_url: The SAS URL to the container. :param bool enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + LinuxWebAppSlotBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + schedule: Optional['outputs.LinuxWebAppSlotBackupSchedule'] = None, + storage_account_url: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -19996,16 +26269,53 @@ def __init__(__self__, *, :param int retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param str start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + LinuxWebAppSlotBackupSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[int] = None, + frequency_unit: Optional[str] = None, + keep_at_least_one_backup: Optional[bool] = None, + last_execution_time: Optional[str] = None, + retention_period_days: Optional[int] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -20066,9 +26376,30 @@ def __init__(__self__, *, :param str type: Type of database. Possible values include `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param str value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + LinuxWebAppSlotConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -20131,13 +26462,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + LinuxWebAppSlotIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -20210,14 +26566,39 @@ def __init__(__self__, *, :param bool failed_request_tracing: Should the failed request tracing be enabled? :param 'LinuxWebAppSlotLogsHttpLogsArgs' http_logs: An `http_logs` block as defined above. """ + LinuxWebAppSlotLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages=detailed_error_messages, + failed_request_tracing=failed_request_tracing, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional['outputs.LinuxWebAppSlotLogsApplicationLogs'] = None, + detailed_error_messages: Optional[bool] = None, + failed_request_tracing: Optional[bool] = None, + http_logs: Optional['outputs.LinuxWebAppSlotLogsHttpLogs'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if detailed_error_messages is None and 'detailedErrorMessages' in kwargs: + detailed_error_messages = kwargs['detailedErrorMessages'] + if failed_request_tracing is None and 'failedRequestTracing' in kwargs: + failed_request_tracing = kwargs['failedRequestTracing'] + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if application_logs is not None: - pulumi.set(__self__, "application_logs", application_logs) + _setter("application_logs", application_logs) if detailed_error_messages is not None: - pulumi.set(__self__, "detailed_error_messages", detailed_error_messages) + _setter("detailed_error_messages", detailed_error_messages) if failed_request_tracing is not None: - pulumi.set(__self__, "failed_request_tracing", failed_request_tracing) + _setter("failed_request_tracing", failed_request_tracing) if http_logs is not None: - pulumi.set(__self__, "http_logs", http_logs) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -20280,9 +26661,28 @@ def __init__(__self__, *, :param str file_system_level: Log level. Possible values include `Verbose`, `Information`, `Warning`, and `Error`. :param 'LinuxWebAppSlotLogsApplicationLogsAzureBlobStorageArgs' azure_blob_storage: An `azure_blob_storage` block as defined below. """ - pulumi.set(__self__, "file_system_level", file_system_level) + LinuxWebAppSlotLogsApplicationLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_system_level=file_system_level, + azure_blob_storage=azure_blob_storage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_system_level: Optional[str] = None, + azure_blob_storage: Optional['outputs.LinuxWebAppSlotLogsApplicationLogsAzureBlobStorage'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if file_system_level is None: + raise TypeError("Missing 'file_system_level' argument") + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + + _setter("file_system_level", file_system_level) if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) @property @pulumi.getter(name="fileSystemLevel") @@ -20331,9 +26731,34 @@ def __init__(__self__, *, :param int retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. :param str sas_url: SAS URL to an Azure blob container with read/write/list/delete permissions. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + LinuxWebAppSlotLogsApplicationLogsAzureBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[str] = None, + retention_in_days: Optional[int] = None, + sas_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -20388,10 +26813,27 @@ def __init__(__self__, *, :param 'LinuxWebAppSlotLogsHttpLogsAzureBlobStorageArgs' azure_blob_storage: A `azure_blob_storage_http` block as defined above. :param 'LinuxWebAppSlotLogsHttpLogsFileSystemArgs' file_system: A `file_system` block as defined above. """ + LinuxWebAppSlotLogsHttpLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system=file_system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional['outputs.LinuxWebAppSlotLogsHttpLogsAzureBlobStorage'] = None, + file_system: Optional['outputs.LinuxWebAppSlotLogsHttpLogsFileSystem'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) @property @pulumi.getter(name="azureBlobStorage") @@ -20438,9 +26880,28 @@ def __init__(__self__, *, :param str sas_url: SAS URL to an Azure blob container with read/write/list/delete permissions. :param int retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. """ - pulumi.set(__self__, "sas_url", sas_url) + LinuxWebAppSlotLogsHttpLogsAzureBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + sas_url=sas_url, + retention_in_days=retention_in_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sas_url: Optional[str] = None, + retention_in_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + + _setter("sas_url", sas_url) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) @property @pulumi.getter(name="sasUrl") @@ -20487,8 +26948,29 @@ def __init__(__self__, *, :param int retention_in_days: The retention period in days. A values of `0` means no retention. :param int retention_in_mb: The maximum size in megabytes that log files can use. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + LinuxWebAppSlotLogsHttpLogsFileSystem._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[int] = None, + retention_in_mb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -20655,72 +27137,211 @@ def __init__(__self__, *, :param bool websockets_enabled: Should Web Sockets be enabled? Defaults to `false`. :param int worker_count: The number of Workers for this Linux App Service Slot. """ + LinuxWebAppSlotSiteConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + application_stack=application_stack, + auto_heal_enabled=auto_heal_enabled, + auto_heal_setting=auto_heal_setting, + auto_swap_slot_name=auto_swap_slot_name, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + load_balancing_mode=load_balancing_mode, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + api_definition_url: Optional[str] = None, + api_management_api_id: Optional[str] = None, + app_command_line: Optional[str] = None, + application_stack: Optional['outputs.LinuxWebAppSlotSiteConfigApplicationStack'] = None, + auto_heal_enabled: Optional[bool] = None, + auto_heal_setting: Optional['outputs.LinuxWebAppSlotSiteConfigAutoHealSetting'] = None, + auto_swap_slot_name: Optional[str] = None, + container_registry_managed_identity_client_id: Optional[str] = None, + container_registry_use_managed_identity: Optional[bool] = None, + cors: Optional['outputs.LinuxWebAppSlotSiteConfigCors'] = None, + default_documents: Optional[Sequence[str]] = None, + detailed_error_logging_enabled: Optional[bool] = None, + ftps_state: Optional[str] = None, + health_check_eviction_time_in_min: Optional[int] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.LinuxWebAppSlotSiteConfigIpRestriction']] = None, + linux_fx_version: Optional[str] = None, + load_balancing_mode: Optional[str] = None, + local_mysql_enabled: Optional[bool] = None, + managed_pipeline_mode: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + scm_ip_restrictions: Optional[Sequence['outputs.LinuxWebAppSlotSiteConfigScmIpRestriction']] = None, + scm_minimum_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + worker_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if auto_heal_enabled is None and 'autoHealEnabled' in kwargs: + auto_heal_enabled = kwargs['autoHealEnabled'] + if auto_heal_setting is None and 'autoHealSetting' in kwargs: + auto_heal_setting = kwargs['autoHealSetting'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if auto_heal_enabled is not None: - pulumi.set(__self__, "auto_heal_enabled", auto_heal_enabled) + _setter("auto_heal_enabled", auto_heal_enabled) if auto_heal_setting is not None: - pulumi.set(__self__, "auto_heal_setting", auto_heal_setting) + _setter("auto_heal_setting", auto_heal_setting) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if container_registry_managed_identity_client_id is not None: - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) if container_registry_use_managed_identity is not None: - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if local_mysql_enabled is not None: - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) + _setter("local_mysql_enabled", local_mysql_enabled) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -21065,36 +27686,105 @@ def __init__(__self__, *, :param str python_version: The version of Python to run. Possible values include `3.7`, `3.8`, `3.9`, `3.10` and `3.11`. :param str ruby_version: Te version of Ruby to run. Possible values include `2.6` and `2.7`. """ + LinuxWebAppSlotSiteConfigApplicationStack._configure( + lambda key, value: pulumi.set(__self__, key, value), + docker_image=docker_image, + docker_image_name=docker_image_name, + docker_image_tag=docker_image_tag, + docker_registry_password=docker_registry_password, + docker_registry_url=docker_registry_url, + docker_registry_username=docker_registry_username, + dotnet_version=dotnet_version, + go_version=go_version, + java_server=java_server, + java_server_version=java_server_version, + java_version=java_version, + node_version=node_version, + php_version=php_version, + python_version=python_version, + ruby_version=ruby_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + docker_image: Optional[str] = None, + docker_image_name: Optional[str] = None, + docker_image_tag: Optional[str] = None, + docker_registry_password: Optional[str] = None, + docker_registry_url: Optional[str] = None, + docker_registry_username: Optional[str] = None, + dotnet_version: Optional[str] = None, + go_version: Optional[str] = None, + java_server: Optional[str] = None, + java_server_version: Optional[str] = None, + java_version: Optional[str] = None, + node_version: Optional[str] = None, + php_version: Optional[str] = None, + python_version: Optional[str] = None, + ruby_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if docker_image is None and 'dockerImage' in kwargs: + docker_image = kwargs['dockerImage'] + if docker_image_name is None and 'dockerImageName' in kwargs: + docker_image_name = kwargs['dockerImageName'] + if docker_image_tag is None and 'dockerImageTag' in kwargs: + docker_image_tag = kwargs['dockerImageTag'] + if docker_registry_password is None and 'dockerRegistryPassword' in kwargs: + docker_registry_password = kwargs['dockerRegistryPassword'] + if docker_registry_url is None and 'dockerRegistryUrl' in kwargs: + docker_registry_url = kwargs['dockerRegistryUrl'] + if docker_registry_username is None and 'dockerRegistryUsername' in kwargs: + docker_registry_username = kwargs['dockerRegistryUsername'] + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if go_version is None and 'goVersion' in kwargs: + go_version = kwargs['goVersion'] + if java_server is None and 'javaServer' in kwargs: + java_server = kwargs['javaServer'] + if java_server_version is None and 'javaServerVersion' in kwargs: + java_server_version = kwargs['javaServerVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if ruby_version is None and 'rubyVersion' in kwargs: + ruby_version = kwargs['rubyVersion'] + if docker_image is not None: - pulumi.set(__self__, "docker_image", docker_image) + _setter("docker_image", docker_image) if docker_image_name is not None: - pulumi.set(__self__, "docker_image_name", docker_image_name) + _setter("docker_image_name", docker_image_name) if docker_image_tag is not None: - pulumi.set(__self__, "docker_image_tag", docker_image_tag) + _setter("docker_image_tag", docker_image_tag) if docker_registry_password is not None: - pulumi.set(__self__, "docker_registry_password", docker_registry_password) + _setter("docker_registry_password", docker_registry_password) if docker_registry_url is not None: - pulumi.set(__self__, "docker_registry_url", docker_registry_url) + _setter("docker_registry_url", docker_registry_url) if docker_registry_username is not None: - pulumi.set(__self__, "docker_registry_username", docker_registry_username) + _setter("docker_registry_username", docker_registry_username) if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if go_version is not None: - pulumi.set(__self__, "go_version", go_version) + _setter("go_version", go_version) if java_server is not None: - pulumi.set(__self__, "java_server", java_server) + _setter("java_server", java_server) if java_server_version is not None: - pulumi.set(__self__, "java_server_version", java_server_version) + _setter("java_server_version", java_server_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if php_version is not None: - pulumi.set(__self__, "php_version", php_version) + _setter("php_version", php_version) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if ruby_version is not None: - pulumi.set(__self__, "ruby_version", ruby_version) + _setter("ruby_version", ruby_version) @property @pulumi.getter(name="dockerImage") @@ -21236,10 +27926,23 @@ def __init__(__self__, *, :param 'LinuxWebAppSlotSiteConfigAutoHealSettingActionArgs' action: A `action` block as defined above. :param 'LinuxWebAppSlotSiteConfigAutoHealSettingTriggerArgs' trigger: A `trigger` block as defined below. """ + LinuxWebAppSlotSiteConfigAutoHealSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + trigger=trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional['outputs.LinuxWebAppSlotSiteConfigAutoHealSettingAction'] = None, + trigger: Optional['outputs.LinuxWebAppSlotSiteConfigAutoHealSettingTrigger'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if trigger is not None: - pulumi.set(__self__, "trigger", trigger) + _setter("trigger", trigger) @property @pulumi.getter @@ -21286,9 +27989,28 @@ def __init__(__self__, *, :param str action_type: Predefined action to be taken to an Auto Heal trigger. Possible values include: `Recycle`. :param str minimum_process_execution_time: The minimum amount of time in `hh:mm:ss` the Linux Web App must have been running before the defined action will be run in the event of a trigger. """ - pulumi.set(__self__, "action_type", action_type) + LinuxWebAppSlotSiteConfigAutoHealSettingAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + minimum_process_execution_time=minimum_process_execution_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[str] = None, + minimum_process_execution_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + if minimum_process_execution_time is None and 'minimumProcessExecutionTime' in kwargs: + minimum_process_execution_time = kwargs['minimumProcessExecutionTime'] + + _setter("action_type", action_type) if minimum_process_execution_time is not None: - pulumi.set(__self__, "minimum_process_execution_time", minimum_process_execution_time) + _setter("minimum_process_execution_time", minimum_process_execution_time) @property @pulumi.getter(name="actionType") @@ -21337,12 +28059,31 @@ def __init__(__self__, *, :param Sequence['LinuxWebAppSlotSiteConfigAutoHealSettingTriggerSlowRequestArgs'] slow_requests: One or more `slow_request` blocks as defined above. :param Sequence['LinuxWebAppSlotSiteConfigAutoHealSettingTriggerStatusCodeArgs'] status_codes: One or more `status_code` blocks as defined above. """ + LinuxWebAppSlotSiteConfigAutoHealSettingTrigger._configure( + lambda key, value: pulumi.set(__self__, key, value), + requests=requests, + slow_requests=slow_requests, + status_codes=status_codes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + requests: Optional['outputs.LinuxWebAppSlotSiteConfigAutoHealSettingTriggerRequests'] = None, + slow_requests: Optional[Sequence['outputs.LinuxWebAppSlotSiteConfigAutoHealSettingTriggerSlowRequest']] = None, + status_codes: Optional[Sequence['outputs.LinuxWebAppSlotSiteConfigAutoHealSettingTriggerStatusCode']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if slow_requests is None and 'slowRequests' in kwargs: + slow_requests = kwargs['slowRequests'] + if status_codes is None and 'statusCodes' in kwargs: + status_codes = kwargs['statusCodes'] + if requests is not None: - pulumi.set(__self__, "requests", requests) + _setter("requests", requests) if slow_requests is not None: - pulumi.set(__self__, "slow_requests", slow_requests) + _setter("slow_requests", slow_requests) if status_codes is not None: - pulumi.set(__self__, "status_codes", status_codes) + _setter("status_codes", status_codes) @property @pulumi.getter @@ -21378,8 +28119,25 @@ def __init__(__self__, *, :param int count: The number of requests in the specified `interval` to trigger this rule. :param str interval: The interval in `hh:mm:ss`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) + LinuxWebAppSlotSiteConfigAutoHealSettingTriggerRequests._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + + _setter("count", count) + _setter("interval", interval) @property @pulumi.getter @@ -21428,11 +28186,36 @@ def __init__(__self__, *, :param str time_taken: The threshold of time passed to qualify as a Slow Request in `hh:mm:ss`. :param str path: The path for which this slow request rule applies. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "time_taken", time_taken) + LinuxWebAppSlotSiteConfigAutoHealSettingTriggerSlowRequest._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + time_taken=time_taken, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + time_taken: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if time_taken is None and 'timeTaken' in kwargs: + time_taken = kwargs['timeTaken'] + if time_taken is None: + raise TypeError("Missing 'time_taken' argument") + + _setter("count", count) + _setter("interval", interval) + _setter("time_taken", time_taken) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -21505,15 +28288,48 @@ def __init__(__self__, *, :param int sub_status: The Request Sub Status of the Status Code. :param int win32_status_code: The Win32 Status Code of the Request. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "status_code_range", status_code_range) + LinuxWebAppSlotSiteConfigAutoHealSettingTriggerStatusCode._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + status_code_range=status_code_range, + path=path, + sub_status=sub_status, + win32_status_code=win32_status_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + status_code_range: Optional[str] = None, + path: Optional[str] = None, + sub_status: Optional[int] = None, + win32_status_code: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if status_code_range is None and 'statusCodeRange' in kwargs: + status_code_range = kwargs['statusCodeRange'] + if status_code_range is None: + raise TypeError("Missing 'status_code_range' argument") + if sub_status is None and 'subStatus' in kwargs: + sub_status = kwargs['subStatus'] + if win32_status_code is None and 'win32StatusCode' in kwargs: + win32_status_code = kwargs['win32StatusCode'] + + _setter("count", count) + _setter("interval", interval) + _setter("status_code_range", status_code_range) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if sub_status is not None: - pulumi.set(__self__, "sub_status", sub_status) + _setter("sub_status", sub_status) if win32_status_code is not None: - pulumi.set(__self__, "win32_status_code", win32_status_code) + _setter("win32_status_code", win32_status_code) @property @pulumi.getter @@ -21592,10 +28408,27 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: Specifies a list of origins that should be allowed to make cross-origin calls. :param bool support_credentials: Whether CORS requests with credentials are allowed. Defaults to `false` """ + LinuxWebAppSlotSiteConfigCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -21656,20 +28489,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxWebAppSlotSiteConfigIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.LinuxWebAppSlotSiteConfigIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -21766,14 +28628,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxWebAppSlotSiteConfigIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -21850,20 +28737,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + LinuxWebAppSlotSiteConfigScmIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.LinuxWebAppSlotSiteConfigScmIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -21960,14 +28876,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + LinuxWebAppSlotSiteConfigScmIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -22010,10 +28951,23 @@ def __init__(__self__, *, """ :param str password: The Site Credentials Password used for publishing. """ + LinuxWebAppSlotSiteCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -22069,13 +29023,52 @@ def __init__(__self__, *, :param str type: The Azure Storage Type. Possible values include `AzureFiles` and `AzureBlob` :param str mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + LinuxWebAppSlotStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[str] = None, + account_name: Optional[str] = None, + name: Optional[str] = None, + share_name: Optional[str] = None, + type: Optional[str] = None, + mount_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -22154,10 +29147,27 @@ def __init__(__self__, *, :param Sequence[str] app_setting_names: A list of `app_setting` names that the Linux Web App will not swap between Slots when a swap operation is triggered. :param Sequence[str] connection_string_names: A list of `connection_string` names that the Linux Web App will not swap between Slots when a swap operation is triggered. """ + LinuxWebAppStickySettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_setting_names=app_setting_names, + connection_string_names=connection_string_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_setting_names: Optional[Sequence[str]] = None, + connection_string_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_setting_names is None and 'appSettingNames' in kwargs: + app_setting_names = kwargs['appSettingNames'] + if connection_string_names is None and 'connectionStringNames' in kwargs: + connection_string_names = kwargs['connectionStringNames'] + if app_setting_names is not None: - pulumi.set(__self__, "app_setting_names", app_setting_names) + _setter("app_setting_names", app_setting_names) if connection_string_names is not None: - pulumi.set(__self__, "connection_string_names", connection_string_names) + _setter("connection_string_names", connection_string_names) @property @pulumi.getter(name="appSettingNames") @@ -22216,13 +29226,52 @@ def __init__(__self__, *, :param str type: The Azure Storage Type. Possible values include `AzureFiles` and `AzureBlob` :param str mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + LinuxWebAppStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[str] = None, + account_name: Optional[str] = None, + name: Optional[str] = None, + share_name: Optional[str] = None, + type: Optional[str] = None, + mount_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -22284,10 +29333,29 @@ def __init__(__self__, *, :param str tier: Specifies the plan's pricing tier. :param int capacity: Specifies the number of workers associated with this App Service Plan. """ - pulumi.set(__self__, "size", size) - pulumi.set(__self__, "tier", tier) + PlanSku._configure( + lambda key, value: pulumi.set(__self__, key, value), + size=size, + tier=tier, + capacity=capacity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + size: Optional[str] = None, + tier: Optional[str] = None, + capacity: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if size is None: + raise TypeError("Missing 'size' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("size", size) + _setter("tier", tier) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) @property @pulumi.getter @@ -22380,33 +29448,88 @@ def __init__(__self__, *, :param 'SlotAuthSettingsTwitterArgs' twitter: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values are `AllowAnonymous` and `RedirectToLoginPage`. """ - pulumi.set(__self__, "enabled", enabled) + SlotAuthSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_params=additional_login_params, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + active_directory: Optional['outputs.SlotAuthSettingsActiveDirectory'] = None, + additional_login_params: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + facebook: Optional['outputs.SlotAuthSettingsFacebook'] = None, + google: Optional['outputs.SlotAuthSettingsGoogle'] = None, + issuer: Optional[str] = None, + microsoft: Optional['outputs.SlotAuthSettingsMicrosoft'] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitter: Optional['outputs.SlotAuthSettingsTwitter'] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_params is None and 'additionalLoginParams' in kwargs: + additional_login_params = kwargs['additionalLoginParams'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_params is not None: - pulumi.set(__self__, "additional_login_params", additional_login_params) + _setter("additional_login_params", additional_login_params) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -22555,11 +29678,34 @@ def __init__(__self__, *, :param Sequence[str] allowed_audiences: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. :param str client_secret: The Client Secret of this relying party application. If no secret is provided, implicit flow will be used. """ - pulumi.set(__self__, "client_id", client_id) + SlotAuthSettingsActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + client_secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -22618,10 +29764,35 @@ def __init__(__self__, *, :param str app_secret: The App Secret of the Facebook app used for Facebook login. :param Sequence[str] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret", app_secret) + SlotAuthSettingsFacebook._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret is None: + raise TypeError("Missing 'app_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) + _setter("app_secret", app_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -22680,10 +29851,35 @@ def __init__(__self__, *, :param str client_secret: The client secret associated with the Google web application. :param Sequence[str] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + SlotAuthSettingsGoogle._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -22742,10 +29938,35 @@ def __init__(__self__, *, :param str client_secret: The OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] oauth_scopes: The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + SlotAuthSettingsMicrosoft._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) + _setter("client_secret", client_secret) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -22800,8 +30021,29 @@ def __init__(__self__, *, :param str consumer_key: The consumer key of the Twitter app used for login :param str consumer_secret: The consumer secret of the Twitter app used for login. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret", consumer_secret) + SlotAuthSettingsTwitter._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret is None: + raise TypeError("Missing 'consumer_secret' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret", consumer_secret) @property @pulumi.getter(name="consumerKey") @@ -22831,9 +30073,30 @@ def __init__(__self__, *, :param str type: The type of the Connection String. Possible values are `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param str value: The value for the Connection String. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + SlotConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -22896,13 +30159,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service slot. :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service slot. """ - pulumi.set(__self__, "type", type) + SlotIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -22975,14 +30263,39 @@ def __init__(__self__, *, :param bool failed_request_tracing_enabled: Should `Failed request tracing` be enabled on this App Service slot? Defaults to `false`. :param 'SlotLogsHttpLogsArgs' http_logs: An `http_logs` block as defined below. """ + SlotLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages_enabled=detailed_error_messages_enabled, + failed_request_tracing_enabled=failed_request_tracing_enabled, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional['outputs.SlotLogsApplicationLogs'] = None, + detailed_error_messages_enabled: Optional[bool] = None, + failed_request_tracing_enabled: Optional[bool] = None, + http_logs: Optional['outputs.SlotLogsHttpLogs'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if detailed_error_messages_enabled is None and 'detailedErrorMessagesEnabled' in kwargs: + detailed_error_messages_enabled = kwargs['detailedErrorMessagesEnabled'] + if failed_request_tracing_enabled is None and 'failedRequestTracingEnabled' in kwargs: + failed_request_tracing_enabled = kwargs['failedRequestTracingEnabled'] + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if application_logs is not None: - pulumi.set(__self__, "application_logs", application_logs) + _setter("application_logs", application_logs) if detailed_error_messages_enabled is not None: - pulumi.set(__self__, "detailed_error_messages_enabled", detailed_error_messages_enabled) + _setter("detailed_error_messages_enabled", detailed_error_messages_enabled) if failed_request_tracing_enabled is not None: - pulumi.set(__self__, "failed_request_tracing_enabled", failed_request_tracing_enabled) + _setter("failed_request_tracing_enabled", failed_request_tracing_enabled) if http_logs is not None: - pulumi.set(__self__, "http_logs", http_logs) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -23045,10 +30358,27 @@ def __init__(__self__, *, :param 'SlotLogsApplicationLogsAzureBlobStorageArgs' azure_blob_storage: An `azure_blob_storage` block as defined below. :param str file_system_level: The file system log level. Possible values are `Off`, `Error`, `Warning`, `Information`, and `Verbose`. """ + SlotLogsApplicationLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system_level=file_system_level, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional['outputs.SlotLogsApplicationLogsAzureBlobStorage'] = None, + file_system_level: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system_level is not None: - pulumi.set(__self__, "file_system_level", file_system_level) + _setter("file_system_level", file_system_level) @property @pulumi.getter(name="azureBlobStorage") @@ -23097,9 +30427,34 @@ def __init__(__self__, *, :param int retention_in_days: The number of days to retain logs for. :param str sas_url: The URL to the storage container, with a Service SAS token appended. **NOTE:** there is currently no means of generating Service SAS tokens with the `azurerm` provider. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + SlotLogsApplicationLogsAzureBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[str] = None, + retention_in_days: Optional[int] = None, + sas_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -23154,10 +30509,27 @@ def __init__(__self__, *, :param 'SlotLogsHttpLogsAzureBlobStorageArgs' azure_blob_storage: An `azure_blob_storage` block as defined below. :param 'SlotLogsHttpLogsFileSystemArgs' file_system: A `file_system` block as defined below. """ + SlotLogsHttpLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system=file_system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional['outputs.SlotLogsHttpLogsAzureBlobStorage'] = None, + file_system: Optional['outputs.SlotLogsHttpLogsFileSystem'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) @property @pulumi.getter(name="azureBlobStorage") @@ -23204,8 +30576,29 @@ def __init__(__self__, *, :param int retention_in_days: The number of days to retain logs for. :param str sas_url: The URL to the storage container, with a Service SAS token appended. **NOTE:** there is currently no means of generating Service SAS tokens with the `azurerm` provider. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + SlotLogsHttpLogsAzureBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[int] = None, + sas_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter(name="retentionInDays") @@ -23252,8 +30645,29 @@ def __init__(__self__, *, :param int retention_in_days: The number of days to retain logs for. :param int retention_in_mb: The maximum size in megabytes that HTTP log files can use before being removed. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + SlotLogsHttpLogsFileSystem._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[int] = None, + retention_in_mb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -23428,68 +30842,199 @@ def __init__(__self__, *, > **NOTE:** when using an App Service Plan in the `Free` or `Shared` Tiers `use_32_bit_worker_process` must be set to `true`. :param bool websockets_enabled: Should WebSockets be enabled? """ + SlotSiteConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + acr_use_managed_identity_credentials=acr_use_managed_identity_credentials, + acr_user_managed_identity_client_id=acr_user_managed_identity_client_id, + always_on=always_on, + app_command_line=app_command_line, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + default_documents=default_documents, + dotnet_framework_version=dotnet_framework_version, + ftps_state=ftps_state, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + java_container=java_container, + java_container_version=java_container_version, + java_version=java_version, + linux_fx_version=linux_fx_version, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + min_tls_version=min_tls_version, + number_of_workers=number_of_workers, + php_version=php_version, + python_version=python_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + acr_use_managed_identity_credentials: Optional[bool] = None, + acr_user_managed_identity_client_id: Optional[str] = None, + always_on: Optional[bool] = None, + app_command_line: Optional[str] = None, + auto_swap_slot_name: Optional[str] = None, + cors: Optional['outputs.SlotSiteConfigCors'] = None, + default_documents: Optional[Sequence[str]] = None, + dotnet_framework_version: Optional[str] = None, + ftps_state: Optional[str] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.SlotSiteConfigIpRestriction']] = None, + java_container: Optional[str] = None, + java_container_version: Optional[str] = None, + java_version: Optional[str] = None, + linux_fx_version: Optional[str] = None, + local_mysql_enabled: Optional[bool] = None, + managed_pipeline_mode: Optional[str] = None, + min_tls_version: Optional[str] = None, + number_of_workers: Optional[int] = None, + php_version: Optional[str] = None, + python_version: Optional[str] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + scm_ip_restrictions: Optional[Sequence['outputs.SlotSiteConfigScmIpRestriction']] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker_process: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + windows_fx_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if acr_use_managed_identity_credentials is None and 'acrUseManagedIdentityCredentials' in kwargs: + acr_use_managed_identity_credentials = kwargs['acrUseManagedIdentityCredentials'] + if acr_user_managed_identity_client_id is None and 'acrUserManagedIdentityClientId' in kwargs: + acr_user_managed_identity_client_id = kwargs['acrUserManagedIdentityClientId'] + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if java_container is None and 'javaContainer' in kwargs: + java_container = kwargs['javaContainer'] + if java_container_version is None and 'javaContainerVersion' in kwargs: + java_container_version = kwargs['javaContainerVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if number_of_workers is None and 'numberOfWorkers' in kwargs: + number_of_workers = kwargs['numberOfWorkers'] + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if acr_use_managed_identity_credentials is not None: - pulumi.set(__self__, "acr_use_managed_identity_credentials", acr_use_managed_identity_credentials) + _setter("acr_use_managed_identity_credentials", acr_use_managed_identity_credentials) if acr_user_managed_identity_client_id is not None: - pulumi.set(__self__, "acr_user_managed_identity_client_id", acr_user_managed_identity_client_id) + _setter("acr_user_managed_identity_client_id", acr_user_managed_identity_client_id) if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if dotnet_framework_version is not None: - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) + _setter("dotnet_framework_version", dotnet_framework_version) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if java_container is not None: - pulumi.set(__self__, "java_container", java_container) + _setter("java_container", java_container) if java_container_version is not None: - pulumi.set(__self__, "java_container_version", java_container_version) + _setter("java_container_version", java_container_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if local_mysql_enabled is not None: - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) + _setter("local_mysql_enabled", local_mysql_enabled) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if number_of_workers is not None: - pulumi.set(__self__, "number_of_workers", number_of_workers) + _setter("number_of_workers", number_of_workers) if php_version is not None: - pulumi.set(__self__, "php_version", php_version) + _setter("php_version", php_version) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker_process is not None: - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) + _setter("use32_bit_worker_process", use32_bit_worker_process) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if windows_fx_version is not None: - pulumi.set(__self__, "windows_fx_version", windows_fx_version) + _setter("windows_fx_version", windows_fx_version) @property @pulumi.getter(name="acrUseManagedIdentityCredentials") @@ -23778,9 +31323,28 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls. :param bool support_credentials: Are credentials supported? """ - pulumi.set(__self__, "allowed_origins", allowed_origins) + SlotSiteConfigCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -23841,20 +31405,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + SlotSiteConfigIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.SlotSiteConfigIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -23951,14 +31544,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param Sequence[str] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + SlotSiteConfigIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -24035,20 +31653,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + SlotSiteConfigScmIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.SlotSiteConfigScmIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -24145,14 +31792,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param Sequence[str] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + SlotSiteConfigScmIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -24196,10 +31868,23 @@ def __init__(__self__, *, :param str password: The password associated with the username, which can be used to publish to this App Service. :param str username: The username which can be used to publish to this App Service """ + SlotSiteCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -24258,13 +31943,52 @@ def __init__(__self__, *, :param str type: The type of storage. Possible values are `AzureBlob` and `AzureFiles`. :param str mount_path: The path to mount the storage within the site's runtime environment. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + SlotStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[str] = None, + account_name: Optional[str] = None, + name: Optional[str] = None, + share_name: Optional[str] = None, + type: Optional[str] = None, + mount_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -24350,14 +32074,39 @@ def __init__(__self__, *, :param 'SourceControlGithubActionConfigurationContainerConfigurationArgs' container_configuration: A `container_configuration` block as defined above. :param bool generate_workflow_file: Whether to generate the GitHub work flow file. Defaults to `true`. Changing this forces a new resource to be created. """ + SourceControlGithubActionConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + code_configuration=code_configuration, + container_configuration=container_configuration, + generate_workflow_file=generate_workflow_file, + linux_action=linux_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + code_configuration: Optional['outputs.SourceControlGithubActionConfigurationCodeConfiguration'] = None, + container_configuration: Optional['outputs.SourceControlGithubActionConfigurationContainerConfiguration'] = None, + generate_workflow_file: Optional[bool] = None, + linux_action: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if code_configuration is None and 'codeConfiguration' in kwargs: + code_configuration = kwargs['codeConfiguration'] + if container_configuration is None and 'containerConfiguration' in kwargs: + container_configuration = kwargs['containerConfiguration'] + if generate_workflow_file is None and 'generateWorkflowFile' in kwargs: + generate_workflow_file = kwargs['generateWorkflowFile'] + if linux_action is None and 'linuxAction' in kwargs: + linux_action = kwargs['linuxAction'] + if code_configuration is not None: - pulumi.set(__self__, "code_configuration", code_configuration) + _setter("code_configuration", code_configuration) if container_configuration is not None: - pulumi.set(__self__, "container_configuration", container_configuration) + _setter("container_configuration", container_configuration) if generate_workflow_file is not None: - pulumi.set(__self__, "generate_workflow_file", generate_workflow_file) + _setter("generate_workflow_file", generate_workflow_file) if linux_action is not None: - pulumi.set(__self__, "linux_action", linux_action) + _setter("linux_action", linux_action) @property @pulumi.getter(name="codeConfiguration") @@ -24417,8 +32166,29 @@ def __init__(__self__, *, :param str runtime_stack: The value to use for the Runtime Stack in the workflow file content for code base apps. Possible values are `dotnetcore`, `spring`, `tomcat`, `node` and `python`. Changing this forces a new resource to be created. :param str runtime_version: The value to use for the Runtime Version in the workflow file content for code base apps. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "runtime_stack", runtime_stack) - pulumi.set(__self__, "runtime_version", runtime_version) + SourceControlGithubActionConfigurationCodeConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + runtime_stack=runtime_stack, + runtime_version=runtime_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + runtime_stack: Optional[str] = None, + runtime_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if runtime_stack is None and 'runtimeStack' in kwargs: + runtime_stack = kwargs['runtimeStack'] + if runtime_stack is None: + raise TypeError("Missing 'runtime_stack' argument") + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if runtime_version is None: + raise TypeError("Missing 'runtime_version' argument") + + _setter("runtime_stack", runtime_stack) + _setter("runtime_version", runtime_version) @property @pulumi.getter(name="runtimeStack") @@ -24473,12 +32243,41 @@ def __init__(__self__, *, :param str registry_password: The password used to upload the image to the container registry. Changing this forces a new resource to be created. :param str registry_username: The username used to upload the image to the container registry. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "image_name", image_name) - pulumi.set(__self__, "registry_url", registry_url) + SourceControlGithubActionConfigurationContainerConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + image_name=image_name, + registry_url=registry_url, + registry_password=registry_password, + registry_username=registry_username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image_name: Optional[str] = None, + registry_url: Optional[str] = None, + registry_password: Optional[str] = None, + registry_username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if image_name is None: + raise TypeError("Missing 'image_name' argument") + if registry_url is None and 'registryUrl' in kwargs: + registry_url = kwargs['registryUrl'] + if registry_url is None: + raise TypeError("Missing 'registry_url' argument") + if registry_password is None and 'registryPassword' in kwargs: + registry_password = kwargs['registryPassword'] + if registry_username is None and 'registryUsername' in kwargs: + registry_username = kwargs['registryUsername'] + + _setter("image_name", image_name) + _setter("registry_url", registry_url) if registry_password is not None: - pulumi.set(__self__, "registry_password", registry_password) + _setter("registry_password", registry_password) if registry_username is not None: - pulumi.set(__self__, "registry_username", registry_username) + _setter("registry_username", registry_username) @property @pulumi.getter(name="imageName") @@ -24549,14 +32348,39 @@ def __init__(__self__, *, :param bool generate_workflow_file: Should the service generate the GitHub Action Workflow file. Defaults to `true` Changing this forces a new resource to be created. :param bool linux_action: Denotes this action uses a Linux base image. """ + SourceControlSlotGithubActionConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + code_configuration=code_configuration, + container_configuration=container_configuration, + generate_workflow_file=generate_workflow_file, + linux_action=linux_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + code_configuration: Optional['outputs.SourceControlSlotGithubActionConfigurationCodeConfiguration'] = None, + container_configuration: Optional['outputs.SourceControlSlotGithubActionConfigurationContainerConfiguration'] = None, + generate_workflow_file: Optional[bool] = None, + linux_action: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if code_configuration is None and 'codeConfiguration' in kwargs: + code_configuration = kwargs['codeConfiguration'] + if container_configuration is None and 'containerConfiguration' in kwargs: + container_configuration = kwargs['containerConfiguration'] + if generate_workflow_file is None and 'generateWorkflowFile' in kwargs: + generate_workflow_file = kwargs['generateWorkflowFile'] + if linux_action is None and 'linuxAction' in kwargs: + linux_action = kwargs['linuxAction'] + if code_configuration is not None: - pulumi.set(__self__, "code_configuration", code_configuration) + _setter("code_configuration", code_configuration) if container_configuration is not None: - pulumi.set(__self__, "container_configuration", container_configuration) + _setter("container_configuration", container_configuration) if generate_workflow_file is not None: - pulumi.set(__self__, "generate_workflow_file", generate_workflow_file) + _setter("generate_workflow_file", generate_workflow_file) if linux_action is not None: - pulumi.set(__self__, "linux_action", linux_action) + _setter("linux_action", linux_action) @property @pulumi.getter(name="codeConfiguration") @@ -24619,8 +32443,29 @@ def __init__(__self__, *, :param str runtime_stack: The value to use for the Runtime Stack in the workflow file content for code base apps. Changing this forces a new resource to be created. Possible values are `dotnetcore`, `spring`, `tomcat`, `node` and `python`. :param str runtime_version: The value to use for the Runtime Version in the workflow file content for code base apps. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "runtime_stack", runtime_stack) - pulumi.set(__self__, "runtime_version", runtime_version) + SourceControlSlotGithubActionConfigurationCodeConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + runtime_stack=runtime_stack, + runtime_version=runtime_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + runtime_stack: Optional[str] = None, + runtime_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if runtime_stack is None and 'runtimeStack' in kwargs: + runtime_stack = kwargs['runtimeStack'] + if runtime_stack is None: + raise TypeError("Missing 'runtime_stack' argument") + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if runtime_version is None: + raise TypeError("Missing 'runtime_version' argument") + + _setter("runtime_stack", runtime_stack) + _setter("runtime_version", runtime_version) @property @pulumi.getter(name="runtimeStack") @@ -24675,12 +32520,41 @@ def __init__(__self__, *, :param str registry_password: The password used to upload the image to the container registry. Changing this forces a new resource to be created. :param str registry_username: The username used to upload the image to the container registry. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "image_name", image_name) - pulumi.set(__self__, "registry_url", registry_url) + SourceControlSlotGithubActionConfigurationContainerConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + image_name=image_name, + registry_url=registry_url, + registry_password=registry_password, + registry_username=registry_username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image_name: Optional[str] = None, + registry_url: Optional[str] = None, + registry_password: Optional[str] = None, + registry_username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if image_name is None: + raise TypeError("Missing 'image_name' argument") + if registry_url is None and 'registryUrl' in kwargs: + registry_url = kwargs['registryUrl'] + if registry_url is None: + raise TypeError("Missing 'registry_url' argument") + if registry_password is None and 'registryPassword' in kwargs: + registry_password = kwargs['registryPassword'] + if registry_username is None and 'registryUsername' in kwargs: + registry_username = kwargs['registryUsername'] + + _setter("image_name", image_name) + _setter("registry_url", registry_url) if registry_password is not None: - pulumi.set(__self__, "registry_password", registry_password) + _setter("registry_password", registry_password) if registry_username is not None: - pulumi.set(__self__, "registry_username", registry_username) + _setter("registry_username", registry_username) @property @pulumi.getter(name="imageName") @@ -24748,13 +32622,38 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: A list of Managed Identity IDs which should be assigned to this Static Site resource. :param str principal_id: (Optional) The Principal ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + StaticSiteIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -24856,35 +32755,92 @@ def __init__(__self__, *, :param 'WindowsFunctionAppAuthSettingsTwitterArgs' twitter: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + WindowsFunctionAppAuthSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + active_directory: Optional['outputs.WindowsFunctionAppAuthSettingsActiveDirectory'] = None, + additional_login_parameters: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + facebook: Optional['outputs.WindowsFunctionAppAuthSettingsFacebook'] = None, + github: Optional['outputs.WindowsFunctionAppAuthSettingsGithub'] = None, + google: Optional['outputs.WindowsFunctionAppAuthSettingsGoogle'] = None, + issuer: Optional[str] = None, + microsoft: Optional['outputs.WindowsFunctionAppAuthSettingsMicrosoft'] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitter: Optional['outputs.WindowsFunctionAppAuthSettingsTwitter'] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -25049,13 +33005,40 @@ def __init__(__self__, *, :param str client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppAuthSettingsActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -25128,13 +33111,40 @@ def __init__(__self__, *, :param str app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + WindowsFunctionAppAuthSettingsFacebook._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -25205,13 +33215,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppAuthSettingsGithub._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -25282,13 +33319,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppAuthSettingsGoogle._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -25359,13 +33423,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppAuthSettingsMicrosoft._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -25432,11 +33523,34 @@ def __init__(__self__, *, :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + WindowsFunctionAppAuthSettingsTwitter._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -25575,49 +33689,146 @@ def __init__(__self__, *, :param 'WindowsFunctionAppAuthSettingsV2TwitterV2Args' twitter_v2: A `twitter_v2` block as defined below. :param str unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + WindowsFunctionAppAuthSettingsV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional['outputs.WindowsFunctionAppAuthSettingsV2Login'] = None, + active_directory_v2: Optional['outputs.WindowsFunctionAppAuthSettingsV2ActiveDirectoryV2'] = None, + apple_v2: Optional['outputs.WindowsFunctionAppAuthSettingsV2AppleV2'] = None, + auth_enabled: Optional[bool] = None, + azure_static_web_app_v2: Optional['outputs.WindowsFunctionAppAuthSettingsV2AzureStaticWebAppV2'] = None, + config_file_path: Optional[str] = None, + custom_oidc_v2s: Optional[Sequence['outputs.WindowsFunctionAppAuthSettingsV2CustomOidcV2']] = None, + default_provider: Optional[str] = None, + excluded_paths: Optional[Sequence[str]] = None, + facebook_v2: Optional['outputs.WindowsFunctionAppAuthSettingsV2FacebookV2'] = None, + forward_proxy_convention: Optional[str] = None, + forward_proxy_custom_host_header_name: Optional[str] = None, + forward_proxy_custom_scheme_header_name: Optional[str] = None, + github_v2: Optional['outputs.WindowsFunctionAppAuthSettingsV2GithubV2'] = None, + google_v2: Optional['outputs.WindowsFunctionAppAuthSettingsV2GoogleV2'] = None, + http_route_api_prefix: Optional[str] = None, + microsoft_v2: Optional['outputs.WindowsFunctionAppAuthSettingsV2MicrosoftV2'] = None, + require_authentication: Optional[bool] = None, + require_https: Optional[bool] = None, + runtime_version: Optional[str] = None, + twitter_v2: Optional['outputs.WindowsFunctionAppAuthSettingsV2TwitterV2'] = None, + unauthenticated_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -25874,28 +34085,89 @@ def __init__(__self__, *, :param Mapping[str, str] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param bool www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + WindowsFunctionAppAuthSettingsV2ActiveDirectoryV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + tenant_auth_endpoint: Optional[str] = None, + allowed_applications: Optional[Sequence[str]] = None, + allowed_audiences: Optional[Sequence[str]] = None, + allowed_groups: Optional[Sequence[str]] = None, + allowed_identities: Optional[Sequence[str]] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + jwt_allowed_client_applications: Optional[Sequence[str]] = None, + jwt_allowed_groups: Optional[Sequence[str]] = None, + login_parameters: Optional[Mapping[str, str]] = None, + www_authentication_disabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -26030,10 +34302,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppAuthSettingsV2AppleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -26084,7 +34381,22 @@ def __init__(__self__, *, """ :param str client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppAuthSettingsV2AzureStaticWebAppV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -26155,25 +34467,80 @@ def __init__(__self__, *, :param Sequence[str] scopes: The list of the scopes that should be requested while authenticating. :param str token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + WindowsFunctionAppAuthSettingsV2CustomOidcV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + name: Optional[str] = None, + openid_configuration_endpoint: Optional[str] = None, + authorisation_endpoint: Optional[str] = None, + certification_uri: Optional[str] = None, + client_credential_method: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + issuer_endpoint: Optional[str] = None, + name_claim_type: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + token_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -26302,12 +34669,41 @@ def __init__(__self__, *, :param str graph_api_version: The version of the Facebook API to be used while logging in. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + WindowsFunctionAppAuthSettingsV2FacebookV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + graph_api_version: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -26376,10 +34772,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppAuthSettingsV2GithubV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -26444,12 +34865,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppAuthSettingsV2GoogleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -26552,28 +35002,81 @@ def __init__(__self__, *, :param str token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param bool validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + WindowsFunctionAppAuthSettingsV2Login._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + cookie_expiration_convention: Optional[str] = None, + cookie_expiration_time: Optional[str] = None, + logout_endpoint: Optional[str] = None, + nonce_expiration_time: Optional[str] = None, + preserve_url_fragments_for_logins: Optional[bool] = None, + token_refresh_extension_time: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + token_store_path: Optional[str] = None, + token_store_sas_setting_name: Optional[str] = None, + validate_nonce: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -26704,12 +35207,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppAuthSettingsV2MicrosoftV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -26776,8 +35308,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + WindowsFunctionAppAuthSettingsV2TwitterV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -26828,11 +35381,36 @@ def __init__(__self__, *, :param str storage_account_url: The SAS URL to the container. :param bool enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + WindowsFunctionAppBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + schedule: Optional['outputs.WindowsFunctionAppBackupSchedule'] = None, + storage_account_url: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -26912,16 +35490,53 @@ def __init__(__self__, *, :param int retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param str start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + WindowsFunctionAppBackupSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[int] = None, + frequency_unit: Optional[str] = None, + keep_at_least_one_backup: Optional[bool] = None, + last_execution_time: Optional[str] = None, + retention_period_days: Optional[int] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -26982,9 +35597,30 @@ def __init__(__self__, *, :param str type: Type of database. Possible values include: `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param str value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + WindowsFunctionAppConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -27047,13 +35683,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WindowsFunctionAppIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -27247,74 +35908,217 @@ def __init__(__self__, *, :param bool websockets_enabled: Should Web Sockets be enabled. Defaults to `false`. :param int worker_count: The number of Workers for this Windows Function App. """ + WindowsFunctionAppSiteConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + app_scale_limit=app_scale_limit, + app_service_logs=app_service_logs, + application_insights_connection_string=application_insights_connection_string, + application_insights_key=application_insights_key, + application_stack=application_stack, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + load_balancing_mode=load_balancing_mode, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + api_definition_url: Optional[str] = None, + api_management_api_id: Optional[str] = None, + app_command_line: Optional[str] = None, + app_scale_limit: Optional[int] = None, + app_service_logs: Optional['outputs.WindowsFunctionAppSiteConfigAppServiceLogs'] = None, + application_insights_connection_string: Optional[str] = None, + application_insights_key: Optional[str] = None, + application_stack: Optional['outputs.WindowsFunctionAppSiteConfigApplicationStack'] = None, + cors: Optional['outputs.WindowsFunctionAppSiteConfigCors'] = None, + default_documents: Optional[Sequence[str]] = None, + detailed_error_logging_enabled: Optional[bool] = None, + elastic_instance_minimum: Optional[int] = None, + ftps_state: Optional[str] = None, + health_check_eviction_time_in_min: Optional[int] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.WindowsFunctionAppSiteConfigIpRestriction']] = None, + load_balancing_mode: Optional[str] = None, + managed_pipeline_mode: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + pre_warmed_instance_count: Optional[int] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + runtime_scale_monitoring_enabled: Optional[bool] = None, + scm_ip_restrictions: Optional[Sequence['outputs.WindowsFunctionAppSiteConfigScmIpRestriction']] = None, + scm_minimum_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + windows_fx_version: Optional[str] = None, + worker_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if app_service_logs is None and 'appServiceLogs' in kwargs: + app_service_logs = kwargs['appServiceLogs'] + if application_insights_connection_string is None and 'applicationInsightsConnectionString' in kwargs: + application_insights_connection_string = kwargs['applicationInsightsConnectionString'] + if application_insights_key is None and 'applicationInsightsKey' in kwargs: + application_insights_key = kwargs['applicationInsightsKey'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if app_service_logs is not None: - pulumi.set(__self__, "app_service_logs", app_service_logs) + _setter("app_service_logs", app_service_logs) if application_insights_connection_string is not None: - pulumi.set(__self__, "application_insights_connection_string", application_insights_connection_string) + _setter("application_insights_connection_string", application_insights_connection_string) if application_insights_key is not None: - pulumi.set(__self__, "application_insights_key", application_insights_key) + _setter("application_insights_key", application_insights_key) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if windows_fx_version is not None: - pulumi.set(__self__, "windows_fx_version", windows_fx_version) + _setter("windows_fx_version", windows_fx_version) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -27616,10 +36420,27 @@ def __init__(__self__, *, > **NOTE:** This block is not supported on Consumption plans. """ + WindowsFunctionAppSiteConfigAppServiceLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_quota_mb=disk_quota_mb, + retention_period_days=retention_period_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_quota_mb: Optional[int] = None, + retention_period_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_quota_mb is None and 'diskQuotaMb' in kwargs: + disk_quota_mb = kwargs['diskQuotaMb'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if disk_quota_mb is not None: - pulumi.set(__self__, "disk_quota_mb", disk_quota_mb) + _setter("disk_quota_mb", disk_quota_mb) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) @property @pulumi.getter(name="diskQuotaMb") @@ -27686,18 +36507,51 @@ def __init__(__self__, *, :param bool use_custom_runtime: Should the Windows Function App use a custom runtime? :param bool use_dotnet_isolated_runtime: Should the DotNet process use an isolated runtime. Defaults to `false`. """ + WindowsFunctionAppSiteConfigApplicationStack._configure( + lambda key, value: pulumi.set(__self__, key, value), + dotnet_version=dotnet_version, + java_version=java_version, + node_version=node_version, + powershell_core_version=powershell_core_version, + use_custom_runtime=use_custom_runtime, + use_dotnet_isolated_runtime=use_dotnet_isolated_runtime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dotnet_version: Optional[str] = None, + java_version: Optional[str] = None, + node_version: Optional[str] = None, + powershell_core_version: Optional[str] = None, + use_custom_runtime: Optional[bool] = None, + use_dotnet_isolated_runtime: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if powershell_core_version is None and 'powershellCoreVersion' in kwargs: + powershell_core_version = kwargs['powershellCoreVersion'] + if use_custom_runtime is None and 'useCustomRuntime' in kwargs: + use_custom_runtime = kwargs['useCustomRuntime'] + if use_dotnet_isolated_runtime is None and 'useDotnetIsolatedRuntime' in kwargs: + use_dotnet_isolated_runtime = kwargs['useDotnetIsolatedRuntime'] + if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if powershell_core_version is not None: - pulumi.set(__self__, "powershell_core_version", powershell_core_version) + _setter("powershell_core_version", powershell_core_version) if use_custom_runtime is not None: - pulumi.set(__self__, "use_custom_runtime", use_custom_runtime) + _setter("use_custom_runtime", use_custom_runtime) if use_dotnet_isolated_runtime is not None: - pulumi.set(__self__, "use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) + _setter("use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) @property @pulumi.getter(name="dotnetVersion") @@ -27778,10 +36632,27 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: Specifies a list of origins that should be allowed to make cross-origin calls. :param bool support_credentials: Are credentials allowed in CORS requests? Defaults to `false`. """ + WindowsFunctionAppSiteConfigCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -27842,20 +36713,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsFunctionAppSiteConfigIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.WindowsFunctionAppSiteConfigIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -27952,14 +36852,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsFunctionAppSiteConfigIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -28036,20 +36961,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsFunctionAppSiteConfigScmIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.WindowsFunctionAppSiteConfigScmIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -28146,14 +37100,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsFunctionAppSiteConfigScmIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -28197,10 +37176,23 @@ def __init__(__self__, *, :param str name: The name which should be used for this Windows Function App. Changing this forces a new Windows Function App to be created. Limit the function name to 32 characters to avoid naming collisions. For more information about [Function App naming rule](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftweb) and [Host ID Collisions](https://github.com/Azure/azure-functions-host/wiki/Host-IDs#host-id-collisions) :param str password: The Site Credentials Password used for publishing. """ + WindowsFunctionAppSiteCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -28289,35 +37281,92 @@ def __init__(__self__, *, :param 'WindowsFunctionAppSlotAuthSettingsTwitterArgs' twitter: a `twitter` block as detailed below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + WindowsFunctionAppSlotAuthSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + active_directory: Optional['outputs.WindowsFunctionAppSlotAuthSettingsActiveDirectory'] = None, + additional_login_parameters: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + facebook: Optional['outputs.WindowsFunctionAppSlotAuthSettingsFacebook'] = None, + github: Optional['outputs.WindowsFunctionAppSlotAuthSettingsGithub'] = None, + google: Optional['outputs.WindowsFunctionAppSlotAuthSettingsGoogle'] = None, + issuer: Optional[str] = None, + microsoft: Optional['outputs.WindowsFunctionAppSlotAuthSettingsMicrosoft'] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitter: Optional['outputs.WindowsFunctionAppSlotAuthSettingsTwitter'] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -28482,13 +37531,40 @@ def __init__(__self__, *, :param str client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppSlotAuthSettingsActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -28561,13 +37637,40 @@ def __init__(__self__, *, :param str app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param Sequence[str] oauth_scopes: an `oauth_scopes` block as detailed below. """ - pulumi.set(__self__, "app_id", app_id) + WindowsFunctionAppSlotAuthSettingsFacebook._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -28638,13 +37741,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: an `oauth_scopes` block as detailed below. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppSlotAuthSettingsGithub._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -28715,13 +37845,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: an `oauth_scopes` block as detailed below. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppSlotAuthSettingsGoogle._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -28792,13 +37949,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, `wl.basic` is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppSlotAuthSettingsMicrosoft._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -28865,11 +38049,34 @@ def __init__(__self__, *, :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + WindowsFunctionAppSlotAuthSettingsTwitter._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -29008,49 +38215,146 @@ def __init__(__self__, *, :param 'WindowsFunctionAppSlotAuthSettingsV2TwitterV2Args' twitter_v2: A `twitter_v2` block as defined below. :param str unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + WindowsFunctionAppSlotAuthSettingsV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional['outputs.WindowsFunctionAppSlotAuthSettingsV2Login'] = None, + active_directory_v2: Optional['outputs.WindowsFunctionAppSlotAuthSettingsV2ActiveDirectoryV2'] = None, + apple_v2: Optional['outputs.WindowsFunctionAppSlotAuthSettingsV2AppleV2'] = None, + auth_enabled: Optional[bool] = None, + azure_static_web_app_v2: Optional['outputs.WindowsFunctionAppSlotAuthSettingsV2AzureStaticWebAppV2'] = None, + config_file_path: Optional[str] = None, + custom_oidc_v2s: Optional[Sequence['outputs.WindowsFunctionAppSlotAuthSettingsV2CustomOidcV2']] = None, + default_provider: Optional[str] = None, + excluded_paths: Optional[Sequence[str]] = None, + facebook_v2: Optional['outputs.WindowsFunctionAppSlotAuthSettingsV2FacebookV2'] = None, + forward_proxy_convention: Optional[str] = None, + forward_proxy_custom_host_header_name: Optional[str] = None, + forward_proxy_custom_scheme_header_name: Optional[str] = None, + github_v2: Optional['outputs.WindowsFunctionAppSlotAuthSettingsV2GithubV2'] = None, + google_v2: Optional['outputs.WindowsFunctionAppSlotAuthSettingsV2GoogleV2'] = None, + http_route_api_prefix: Optional[str] = None, + microsoft_v2: Optional['outputs.WindowsFunctionAppSlotAuthSettingsV2MicrosoftV2'] = None, + require_authentication: Optional[bool] = None, + require_https: Optional[bool] = None, + runtime_version: Optional[str] = None, + twitter_v2: Optional['outputs.WindowsFunctionAppSlotAuthSettingsV2TwitterV2'] = None, + unauthenticated_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -29307,28 +38611,89 @@ def __init__(__self__, *, :param Mapping[str, str] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param bool www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + WindowsFunctionAppSlotAuthSettingsV2ActiveDirectoryV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + tenant_auth_endpoint: Optional[str] = None, + allowed_applications: Optional[Sequence[str]] = None, + allowed_audiences: Optional[Sequence[str]] = None, + allowed_groups: Optional[Sequence[str]] = None, + allowed_identities: Optional[Sequence[str]] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + jwt_allowed_client_applications: Optional[Sequence[str]] = None, + jwt_allowed_groups: Optional[Sequence[str]] = None, + login_parameters: Optional[Mapping[str, str]] = None, + www_authentication_disabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -29463,10 +38828,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppSlotAuthSettingsV2AppleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -29517,7 +38907,22 @@ def __init__(__self__, *, """ :param str client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + WindowsFunctionAppSlotAuthSettingsV2AzureStaticWebAppV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -29588,25 +38993,80 @@ def __init__(__self__, *, :param Sequence[str] scopes: The list of the scopes that should be requested while authenticating. :param str token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + WindowsFunctionAppSlotAuthSettingsV2CustomOidcV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + name: Optional[str] = None, + openid_configuration_endpoint: Optional[str] = None, + authorisation_endpoint: Optional[str] = None, + certification_uri: Optional[str] = None, + client_credential_method: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + issuer_endpoint: Optional[str] = None, + name_claim_type: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + token_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -29735,12 +39195,41 @@ def __init__(__self__, *, :param str graph_api_version: The version of the Facebook API to be used while logging in. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + WindowsFunctionAppSlotAuthSettingsV2FacebookV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + graph_api_version: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -29809,10 +39298,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppSlotAuthSettingsV2GithubV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -29877,12 +39391,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppSlotAuthSettingsV2GoogleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -29985,28 +39528,81 @@ def __init__(__self__, *, :param str token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param bool validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + WindowsFunctionAppSlotAuthSettingsV2Login._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + cookie_expiration_convention: Optional[str] = None, + cookie_expiration_time: Optional[str] = None, + logout_endpoint: Optional[str] = None, + nonce_expiration_time: Optional[str] = None, + preserve_url_fragments_for_logins: Optional[bool] = None, + token_refresh_extension_time: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + token_store_path: Optional[str] = None, + token_store_sas_setting_name: Optional[str] = None, + validate_nonce: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -30137,12 +39733,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsFunctionAppSlotAuthSettingsV2MicrosoftV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -30209,8 +39834,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + WindowsFunctionAppSlotAuthSettingsV2TwitterV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -30261,11 +39907,36 @@ def __init__(__self__, *, :param str storage_account_url: The SAS URL to the container. :param bool enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + WindowsFunctionAppSlotBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + schedule: Optional['outputs.WindowsFunctionAppSlotBackupSchedule'] = None, + storage_account_url: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -30346,16 +40017,53 @@ def __init__(__self__, *, :param int retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param str start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + WindowsFunctionAppSlotBackupSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[int] = None, + frequency_unit: Optional[str] = None, + keep_at_least_one_backup: Optional[bool] = None, + last_execution_time: Optional[str] = None, + retention_period_days: Optional[int] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -30419,9 +40127,30 @@ def __init__(__self__, *, :param str type: Type of database. Possible values include: `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param str value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + WindowsFunctionAppSlotConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -30484,13 +40213,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WindowsFunctionAppSlotIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -30687,76 +40441,223 @@ def __init__(__self__, *, :param str windows_fx_version: The Windows FX Version string. :param int worker_count: The number of Workers for this Windows Function App. """ + WindowsFunctionAppSlotSiteConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + app_scale_limit=app_scale_limit, + app_service_logs=app_service_logs, + application_insights_connection_string=application_insights_connection_string, + application_insights_key=application_insights_key, + application_stack=application_stack, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + load_balancing_mode=load_balancing_mode, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + api_definition_url: Optional[str] = None, + api_management_api_id: Optional[str] = None, + app_command_line: Optional[str] = None, + app_scale_limit: Optional[int] = None, + app_service_logs: Optional['outputs.WindowsFunctionAppSlotSiteConfigAppServiceLogs'] = None, + application_insights_connection_string: Optional[str] = None, + application_insights_key: Optional[str] = None, + application_stack: Optional['outputs.WindowsFunctionAppSlotSiteConfigApplicationStack'] = None, + auto_swap_slot_name: Optional[str] = None, + cors: Optional['outputs.WindowsFunctionAppSlotSiteConfigCors'] = None, + default_documents: Optional[Sequence[str]] = None, + detailed_error_logging_enabled: Optional[bool] = None, + elastic_instance_minimum: Optional[int] = None, + ftps_state: Optional[str] = None, + health_check_eviction_time_in_min: Optional[int] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.WindowsFunctionAppSlotSiteConfigIpRestriction']] = None, + load_balancing_mode: Optional[str] = None, + managed_pipeline_mode: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + pre_warmed_instance_count: Optional[int] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + runtime_scale_monitoring_enabled: Optional[bool] = None, + scm_ip_restrictions: Optional[Sequence['outputs.WindowsFunctionAppSlotSiteConfigScmIpRestriction']] = None, + scm_minimum_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + windows_fx_version: Optional[str] = None, + worker_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if app_service_logs is None and 'appServiceLogs' in kwargs: + app_service_logs = kwargs['appServiceLogs'] + if application_insights_connection_string is None and 'applicationInsightsConnectionString' in kwargs: + application_insights_connection_string = kwargs['applicationInsightsConnectionString'] + if application_insights_key is None and 'applicationInsightsKey' in kwargs: + application_insights_key = kwargs['applicationInsightsKey'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if app_service_logs is not None: - pulumi.set(__self__, "app_service_logs", app_service_logs) + _setter("app_service_logs", app_service_logs) if application_insights_connection_string is not None: - pulumi.set(__self__, "application_insights_connection_string", application_insights_connection_string) + _setter("application_insights_connection_string", application_insights_connection_string) if application_insights_key is not None: - pulumi.set(__self__, "application_insights_key", application_insights_key) + _setter("application_insights_key", application_insights_key) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if windows_fx_version is not None: - pulumi.set(__self__, "windows_fx_version", windows_fx_version) + _setter("windows_fx_version", windows_fx_version) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -31071,10 +40972,27 @@ def __init__(__self__, *, > **NOTE:** This block is not supported on Consumption plans. """ + WindowsFunctionAppSlotSiteConfigAppServiceLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_quota_mb=disk_quota_mb, + retention_period_days=retention_period_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_quota_mb: Optional[int] = None, + retention_period_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_quota_mb is None and 'diskQuotaMb' in kwargs: + disk_quota_mb = kwargs['diskQuotaMb'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if disk_quota_mb is not None: - pulumi.set(__self__, "disk_quota_mb", disk_quota_mb) + _setter("disk_quota_mb", disk_quota_mb) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) @property @pulumi.getter(name="diskQuotaMb") @@ -31139,18 +41057,51 @@ def __init__(__self__, *, :param bool use_custom_runtime: Does the Function App use a custom Application Stack? :param bool use_dotnet_isolated_runtime: Should the DotNet process use an isolated runtime. Defaults to `false`. """ + WindowsFunctionAppSlotSiteConfigApplicationStack._configure( + lambda key, value: pulumi.set(__self__, key, value), + dotnet_version=dotnet_version, + java_version=java_version, + node_version=node_version, + powershell_core_version=powershell_core_version, + use_custom_runtime=use_custom_runtime, + use_dotnet_isolated_runtime=use_dotnet_isolated_runtime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dotnet_version: Optional[str] = None, + java_version: Optional[str] = None, + node_version: Optional[str] = None, + powershell_core_version: Optional[str] = None, + use_custom_runtime: Optional[bool] = None, + use_dotnet_isolated_runtime: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if powershell_core_version is None and 'powershellCoreVersion' in kwargs: + powershell_core_version = kwargs['powershellCoreVersion'] + if use_custom_runtime is None and 'useCustomRuntime' in kwargs: + use_custom_runtime = kwargs['useCustomRuntime'] + if use_dotnet_isolated_runtime is None and 'useDotnetIsolatedRuntime' in kwargs: + use_dotnet_isolated_runtime = kwargs['useDotnetIsolatedRuntime'] + if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if powershell_core_version is not None: - pulumi.set(__self__, "powershell_core_version", powershell_core_version) + _setter("powershell_core_version", powershell_core_version) if use_custom_runtime is not None: - pulumi.set(__self__, "use_custom_runtime", use_custom_runtime) + _setter("use_custom_runtime", use_custom_runtime) if use_dotnet_isolated_runtime is not None: - pulumi.set(__self__, "use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) + _setter("use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) @property @pulumi.getter(name="dotnetVersion") @@ -31229,10 +41180,27 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: an `allowed_origins` block as detailed below. :param bool support_credentials: Are credentials allowed in CORS requests? Defaults to `false`. """ + WindowsFunctionAppSlotSiteConfigCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -31293,20 +41261,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsFunctionAppSlotSiteConfigIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.WindowsFunctionAppSlotSiteConfigIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -31403,14 +41400,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsFunctionAppSlotSiteConfigIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -31487,20 +41509,49 @@ def __init__(__self__, *, > **NOTE:** Exactly one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsFunctionAppSlotSiteConfigScmIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.WindowsFunctionAppSlotSiteConfigScmIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -31597,14 +41648,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsFunctionAppSlotSiteConfigScmIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -31648,10 +41724,23 @@ def __init__(__self__, *, :param str name: The Site Credentials Username used for publishing. :param str password: The Site Credentials Password used for publishing. """ + WindowsFunctionAppSlotSiteCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -31710,13 +41799,52 @@ def __init__(__self__, *, :param str type: The Azure Storage Type. Possible values include `AzureFiles`. :param str mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + WindowsFunctionAppSlotStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[str] = None, + account_name: Optional[str] = None, + name: Optional[str] = None, + share_name: Optional[str] = None, + type: Optional[str] = None, + mount_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -31795,10 +41923,27 @@ def __init__(__self__, *, :param Sequence[str] app_setting_names: A list of `app_setting` names that the Windows Function App will not swap between Slots when a swap operation is triggered. :param Sequence[str] connection_string_names: A list of `connection_string` names that the Windows Function App will not swap between Slots when a swap operation is triggered. """ + WindowsFunctionAppStickySettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_setting_names=app_setting_names, + connection_string_names=connection_string_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_setting_names: Optional[Sequence[str]] = None, + connection_string_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_setting_names is None and 'appSettingNames' in kwargs: + app_setting_names = kwargs['appSettingNames'] + if connection_string_names is None and 'connectionStringNames' in kwargs: + connection_string_names = kwargs['connectionStringNames'] + if app_setting_names is not None: - pulumi.set(__self__, "app_setting_names", app_setting_names) + _setter("app_setting_names", app_setting_names) if connection_string_names is not None: - pulumi.set(__self__, "connection_string_names", connection_string_names) + _setter("connection_string_names", connection_string_names) @property @pulumi.getter(name="appSettingNames") @@ -31857,13 +42002,52 @@ def __init__(__self__, *, :param str type: The Azure Storage Type. Possible values include `AzureFiles`. :param str mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + WindowsFunctionAppStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[str] = None, + account_name: Optional[str] = None, + name: Optional[str] = None, + share_name: Optional[str] = None, + type: Optional[str] = None, + mount_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -31984,35 +42168,92 @@ def __init__(__self__, *, :param 'WindowsWebAppAuthSettingsTwitterArgs' twitter: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + WindowsWebAppAuthSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + active_directory: Optional['outputs.WindowsWebAppAuthSettingsActiveDirectory'] = None, + additional_login_parameters: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + facebook: Optional['outputs.WindowsWebAppAuthSettingsFacebook'] = None, + github: Optional['outputs.WindowsWebAppAuthSettingsGithub'] = None, + google: Optional['outputs.WindowsWebAppAuthSettingsGoogle'] = None, + issuer: Optional[str] = None, + microsoft: Optional['outputs.WindowsWebAppAuthSettingsMicrosoft'] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitter: Optional['outputs.WindowsWebAppAuthSettingsTwitter'] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -32177,13 +42418,40 @@ def __init__(__self__, *, :param str client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppAuthSettingsActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -32256,13 +42524,40 @@ def __init__(__self__, *, :param str app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + WindowsWebAppAuthSettingsFacebook._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -32333,13 +42628,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppAuthSettingsGithub._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -32410,13 +42732,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppAuthSettingsGoogle._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -32487,13 +42836,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, "wl.basic" is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppAuthSettingsMicrosoft._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -32560,11 +42936,34 @@ def __init__(__self__, *, :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + WindowsWebAppAuthSettingsTwitter._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -32703,49 +43102,146 @@ def __init__(__self__, *, :param 'WindowsWebAppAuthSettingsV2TwitterV2Args' twitter_v2: A `twitter_v2` block as defined below. :param str unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + WindowsWebAppAuthSettingsV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional['outputs.WindowsWebAppAuthSettingsV2Login'] = None, + active_directory_v2: Optional['outputs.WindowsWebAppAuthSettingsV2ActiveDirectoryV2'] = None, + apple_v2: Optional['outputs.WindowsWebAppAuthSettingsV2AppleV2'] = None, + auth_enabled: Optional[bool] = None, + azure_static_web_app_v2: Optional['outputs.WindowsWebAppAuthSettingsV2AzureStaticWebAppV2'] = None, + config_file_path: Optional[str] = None, + custom_oidc_v2s: Optional[Sequence['outputs.WindowsWebAppAuthSettingsV2CustomOidcV2']] = None, + default_provider: Optional[str] = None, + excluded_paths: Optional[Sequence[str]] = None, + facebook_v2: Optional['outputs.WindowsWebAppAuthSettingsV2FacebookV2'] = None, + forward_proxy_convention: Optional[str] = None, + forward_proxy_custom_host_header_name: Optional[str] = None, + forward_proxy_custom_scheme_header_name: Optional[str] = None, + github_v2: Optional['outputs.WindowsWebAppAuthSettingsV2GithubV2'] = None, + google_v2: Optional['outputs.WindowsWebAppAuthSettingsV2GoogleV2'] = None, + http_route_api_prefix: Optional[str] = None, + microsoft_v2: Optional['outputs.WindowsWebAppAuthSettingsV2MicrosoftV2'] = None, + require_authentication: Optional[bool] = None, + require_https: Optional[bool] = None, + runtime_version: Optional[str] = None, + twitter_v2: Optional['outputs.WindowsWebAppAuthSettingsV2TwitterV2'] = None, + unauthenticated_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -33002,28 +43498,89 @@ def __init__(__self__, *, :param Mapping[str, str] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param bool www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + WindowsWebAppAuthSettingsV2ActiveDirectoryV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + tenant_auth_endpoint: Optional[str] = None, + allowed_applications: Optional[Sequence[str]] = None, + allowed_audiences: Optional[Sequence[str]] = None, + allowed_groups: Optional[Sequence[str]] = None, + allowed_identities: Optional[Sequence[str]] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + jwt_allowed_client_applications: Optional[Sequence[str]] = None, + jwt_allowed_groups: Optional[Sequence[str]] = None, + login_parameters: Optional[Mapping[str, str]] = None, + www_authentication_disabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -33158,10 +43715,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppAuthSettingsV2AppleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -33212,7 +43794,22 @@ def __init__(__self__, *, """ :param str client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppAuthSettingsV2AzureStaticWebAppV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -33283,25 +43880,80 @@ def __init__(__self__, *, :param Sequence[str] scopes: The list of the scopes that should be requested while authenticating. :param str token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + WindowsWebAppAuthSettingsV2CustomOidcV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + name: Optional[str] = None, + openid_configuration_endpoint: Optional[str] = None, + authorisation_endpoint: Optional[str] = None, + certification_uri: Optional[str] = None, + client_credential_method: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + issuer_endpoint: Optional[str] = None, + name_claim_type: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + token_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -33430,12 +44082,41 @@ def __init__(__self__, *, :param str graph_api_version: The version of the Facebook API to be used while logging in. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + WindowsWebAppAuthSettingsV2FacebookV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + graph_api_version: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -33504,10 +44185,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppAuthSettingsV2GithubV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -33572,12 +44278,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppAuthSettingsV2GoogleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -33680,28 +44415,81 @@ def __init__(__self__, *, :param str token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param bool validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + WindowsWebAppAuthSettingsV2Login._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + cookie_expiration_convention: Optional[str] = None, + cookie_expiration_time: Optional[str] = None, + logout_endpoint: Optional[str] = None, + nonce_expiration_time: Optional[str] = None, + preserve_url_fragments_for_logins: Optional[bool] = None, + token_refresh_extension_time: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + token_store_path: Optional[str] = None, + token_store_sas_setting_name: Optional[str] = None, + validate_nonce: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -33832,12 +44620,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppAuthSettingsV2MicrosoftV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -33904,8 +44721,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + WindowsWebAppAuthSettingsV2TwitterV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -33956,11 +44794,36 @@ def __init__(__self__, *, :param str storage_account_url: The SAS URL to the container. :param bool enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + WindowsWebAppBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + schedule: Optional['outputs.WindowsWebAppBackupSchedule'] = None, + storage_account_url: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -34040,16 +44903,53 @@ def __init__(__self__, *, :param int retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param str start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + WindowsWebAppBackupSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[int] = None, + frequency_unit: Optional[str] = None, + keep_at_least_one_backup: Optional[bool] = None, + last_execution_time: Optional[str] = None, + retention_period_days: Optional[int] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -34110,9 +45010,30 @@ def __init__(__self__, *, :param str type: Type of database. Possible values include: `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param str value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + WindowsWebAppConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -34175,13 +45096,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WindowsWebAppIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -34254,14 +45200,39 @@ def __init__(__self__, *, :param bool failed_request_tracing: Should tracing be enabled for failed requests. :param 'WindowsWebAppLogsHttpLogsArgs' http_logs: A `http_logs` block as defined above. """ + WindowsWebAppLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages=detailed_error_messages, + failed_request_tracing=failed_request_tracing, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional['outputs.WindowsWebAppLogsApplicationLogs'] = None, + detailed_error_messages: Optional[bool] = None, + failed_request_tracing: Optional[bool] = None, + http_logs: Optional['outputs.WindowsWebAppLogsHttpLogs'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if detailed_error_messages is None and 'detailedErrorMessages' in kwargs: + detailed_error_messages = kwargs['detailedErrorMessages'] + if failed_request_tracing is None and 'failedRequestTracing' in kwargs: + failed_request_tracing = kwargs['failedRequestTracing'] + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if application_logs is not None: - pulumi.set(__self__, "application_logs", application_logs) + _setter("application_logs", application_logs) if detailed_error_messages is not None: - pulumi.set(__self__, "detailed_error_messages", detailed_error_messages) + _setter("detailed_error_messages", detailed_error_messages) if failed_request_tracing is not None: - pulumi.set(__self__, "failed_request_tracing", failed_request_tracing) + _setter("failed_request_tracing", failed_request_tracing) if http_logs is not None: - pulumi.set(__self__, "http_logs", http_logs) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -34324,9 +45295,28 @@ def __init__(__self__, *, :param str file_system_level: Log level. Possible values include: `Verbose`, `Information`, `Warning`, and `Error`. :param 'WindowsWebAppLogsApplicationLogsAzureBlobStorageArgs' azure_blob_storage: An `azure_blob_storage` block as defined below. """ - pulumi.set(__self__, "file_system_level", file_system_level) + WindowsWebAppLogsApplicationLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_system_level=file_system_level, + azure_blob_storage=azure_blob_storage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_system_level: Optional[str] = None, + azure_blob_storage: Optional['outputs.WindowsWebAppLogsApplicationLogsAzureBlobStorage'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if file_system_level is None: + raise TypeError("Missing 'file_system_level' argument") + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + + _setter("file_system_level", file_system_level) if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) @property @pulumi.getter(name="fileSystemLevel") @@ -34375,9 +45365,34 @@ def __init__(__self__, *, :param int retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. :param str sas_url: SAS url to an Azure blob container with read/write/list/delete permissions. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + WindowsWebAppLogsApplicationLogsAzureBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[str] = None, + retention_in_days: Optional[int] = None, + sas_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -34432,10 +45447,27 @@ def __init__(__self__, *, :param 'WindowsWebAppLogsHttpLogsAzureBlobStorageArgs' azure_blob_storage: A `azure_blob_storage_http` block as defined above. :param 'WindowsWebAppLogsHttpLogsFileSystemArgs' file_system: A `file_system` block as defined above. """ + WindowsWebAppLogsHttpLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system=file_system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional['outputs.WindowsWebAppLogsHttpLogsAzureBlobStorage'] = None, + file_system: Optional['outputs.WindowsWebAppLogsHttpLogsFileSystem'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) @property @pulumi.getter(name="azureBlobStorage") @@ -34482,9 +45514,28 @@ def __init__(__self__, *, :param str sas_url: SAS url to an Azure blob container with read/write/list/delete permissions. :param int retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. """ - pulumi.set(__self__, "sas_url", sas_url) + WindowsWebAppLogsHttpLogsAzureBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + sas_url=sas_url, + retention_in_days=retention_in_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sas_url: Optional[str] = None, + retention_in_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + + _setter("sas_url", sas_url) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) @property @pulumi.getter(name="sasUrl") @@ -34531,8 +45582,29 @@ def __init__(__self__, *, :param int retention_in_days: The retention period in days. A values of `0` means no retention. :param int retention_in_mb: The maximum size in megabytes that log files can use. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + WindowsWebAppLogsHttpLogsFileSystem._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[int] = None, + retention_in_mb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -34702,74 +45774,217 @@ def __init__(__self__, *, :param bool websockets_enabled: Should Web Sockets be enabled. Defaults to `false`. :param int worker_count: The number of Workers for this Windows App Service. """ + WindowsWebAppSiteConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + application_stack=application_stack, + auto_heal_enabled=auto_heal_enabled, + auto_heal_setting=auto_heal_setting, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + load_balancing_mode=load_balancing_mode, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + virtual_applications=virtual_applications, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + api_definition_url: Optional[str] = None, + api_management_api_id: Optional[str] = None, + app_command_line: Optional[str] = None, + application_stack: Optional['outputs.WindowsWebAppSiteConfigApplicationStack'] = None, + auto_heal_enabled: Optional[bool] = None, + auto_heal_setting: Optional['outputs.WindowsWebAppSiteConfigAutoHealSetting'] = None, + container_registry_managed_identity_client_id: Optional[str] = None, + container_registry_use_managed_identity: Optional[bool] = None, + cors: Optional['outputs.WindowsWebAppSiteConfigCors'] = None, + default_documents: Optional[Sequence[str]] = None, + detailed_error_logging_enabled: Optional[bool] = None, + ftps_state: Optional[str] = None, + health_check_eviction_time_in_min: Optional[int] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.WindowsWebAppSiteConfigIpRestriction']] = None, + linux_fx_version: Optional[str] = None, + load_balancing_mode: Optional[str] = None, + local_mysql_enabled: Optional[bool] = None, + managed_pipeline_mode: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + scm_ip_restrictions: Optional[Sequence['outputs.WindowsWebAppSiteConfigScmIpRestriction']] = None, + scm_minimum_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker: Optional[bool] = None, + virtual_applications: Optional[Sequence['outputs.WindowsWebAppSiteConfigVirtualApplication']] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + windows_fx_version: Optional[str] = None, + worker_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if auto_heal_enabled is None and 'autoHealEnabled' in kwargs: + auto_heal_enabled = kwargs['autoHealEnabled'] + if auto_heal_setting is None and 'autoHealSetting' in kwargs: + auto_heal_setting = kwargs['autoHealSetting'] + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if virtual_applications is None and 'virtualApplications' in kwargs: + virtual_applications = kwargs['virtualApplications'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if auto_heal_enabled is not None: - pulumi.set(__self__, "auto_heal_enabled", auto_heal_enabled) + _setter("auto_heal_enabled", auto_heal_enabled) if auto_heal_setting is not None: - pulumi.set(__self__, "auto_heal_setting", auto_heal_setting) + _setter("auto_heal_setting", auto_heal_setting) if container_registry_managed_identity_client_id is not None: - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) if container_registry_use_managed_identity is not None: - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if local_mysql_enabled is not None: - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) + _setter("local_mysql_enabled", local_mysql_enabled) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if virtual_applications is not None: - pulumi.set(__self__, "virtual_applications", virtual_applications) + _setter("virtual_applications", virtual_applications) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if windows_fx_version is not None: - pulumi.set(__self__, "windows_fx_version", windows_fx_version) + _setter("windows_fx_version", windows_fx_version) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -35139,44 +46354,127 @@ def __init__(__self__, *, > **NOTE:** See the official documentation for current supported versions. Some example valuess include: `10.0`, `10.0.20`. """ + WindowsWebAppSiteConfigApplicationStack._configure( + lambda key, value: pulumi.set(__self__, key, value), + current_stack=current_stack, + docker_container_name=docker_container_name, + docker_container_registry=docker_container_registry, + docker_container_tag=docker_container_tag, + docker_image_name=docker_image_name, + docker_registry_password=docker_registry_password, + docker_registry_url=docker_registry_url, + docker_registry_username=docker_registry_username, + dotnet_core_version=dotnet_core_version, + dotnet_version=dotnet_version, + java_container=java_container, + java_container_version=java_container_version, + java_embedded_server_enabled=java_embedded_server_enabled, + java_version=java_version, + node_version=node_version, + php_version=php_version, + python=python, + python_version=python_version, + tomcat_version=tomcat_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + current_stack: Optional[str] = None, + docker_container_name: Optional[str] = None, + docker_container_registry: Optional[str] = None, + docker_container_tag: Optional[str] = None, + docker_image_name: Optional[str] = None, + docker_registry_password: Optional[str] = None, + docker_registry_url: Optional[str] = None, + docker_registry_username: Optional[str] = None, + dotnet_core_version: Optional[str] = None, + dotnet_version: Optional[str] = None, + java_container: Optional[str] = None, + java_container_version: Optional[str] = None, + java_embedded_server_enabled: Optional[bool] = None, + java_version: Optional[str] = None, + node_version: Optional[str] = None, + php_version: Optional[str] = None, + python: Optional[bool] = None, + python_version: Optional[str] = None, + tomcat_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if current_stack is None and 'currentStack' in kwargs: + current_stack = kwargs['currentStack'] + if docker_container_name is None and 'dockerContainerName' in kwargs: + docker_container_name = kwargs['dockerContainerName'] + if docker_container_registry is None and 'dockerContainerRegistry' in kwargs: + docker_container_registry = kwargs['dockerContainerRegistry'] + if docker_container_tag is None and 'dockerContainerTag' in kwargs: + docker_container_tag = kwargs['dockerContainerTag'] + if docker_image_name is None and 'dockerImageName' in kwargs: + docker_image_name = kwargs['dockerImageName'] + if docker_registry_password is None and 'dockerRegistryPassword' in kwargs: + docker_registry_password = kwargs['dockerRegistryPassword'] + if docker_registry_url is None and 'dockerRegistryUrl' in kwargs: + docker_registry_url = kwargs['dockerRegistryUrl'] + if docker_registry_username is None and 'dockerRegistryUsername' in kwargs: + docker_registry_username = kwargs['dockerRegistryUsername'] + if dotnet_core_version is None and 'dotnetCoreVersion' in kwargs: + dotnet_core_version = kwargs['dotnetCoreVersion'] + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if java_container is None and 'javaContainer' in kwargs: + java_container = kwargs['javaContainer'] + if java_container_version is None and 'javaContainerVersion' in kwargs: + java_container_version = kwargs['javaContainerVersion'] + if java_embedded_server_enabled is None and 'javaEmbeddedServerEnabled' in kwargs: + java_embedded_server_enabled = kwargs['javaEmbeddedServerEnabled'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if tomcat_version is None and 'tomcatVersion' in kwargs: + tomcat_version = kwargs['tomcatVersion'] + if current_stack is not None: - pulumi.set(__self__, "current_stack", current_stack) + _setter("current_stack", current_stack) if docker_container_name is not None: - pulumi.set(__self__, "docker_container_name", docker_container_name) + _setter("docker_container_name", docker_container_name) if docker_container_registry is not None: - pulumi.set(__self__, "docker_container_registry", docker_container_registry) + _setter("docker_container_registry", docker_container_registry) if docker_container_tag is not None: - pulumi.set(__self__, "docker_container_tag", docker_container_tag) + _setter("docker_container_tag", docker_container_tag) if docker_image_name is not None: - pulumi.set(__self__, "docker_image_name", docker_image_name) + _setter("docker_image_name", docker_image_name) if docker_registry_password is not None: - pulumi.set(__self__, "docker_registry_password", docker_registry_password) + _setter("docker_registry_password", docker_registry_password) if docker_registry_url is not None: - pulumi.set(__self__, "docker_registry_url", docker_registry_url) + _setter("docker_registry_url", docker_registry_url) if docker_registry_username is not None: - pulumi.set(__self__, "docker_registry_username", docker_registry_username) + _setter("docker_registry_username", docker_registry_username) if dotnet_core_version is not None: - pulumi.set(__self__, "dotnet_core_version", dotnet_core_version) + _setter("dotnet_core_version", dotnet_core_version) if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if java_container is not None: - pulumi.set(__self__, "java_container", java_container) + _setter("java_container", java_container) if java_container_version is not None: - pulumi.set(__self__, "java_container_version", java_container_version) + _setter("java_container_version", java_container_version) if java_embedded_server_enabled is not None: - pulumi.set(__self__, "java_embedded_server_enabled", java_embedded_server_enabled) + _setter("java_embedded_server_enabled", java_embedded_server_enabled) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if php_version is not None: - pulumi.set(__self__, "php_version", php_version) + _setter("php_version", php_version) if python is not None: - pulumi.set(__self__, "python", python) + _setter("python", python) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if tomcat_version is not None: - pulumi.set(__self__, "tomcat_version", tomcat_version) + _setter("tomcat_version", tomcat_version) @property @pulumi.getter(name="currentStack") @@ -35354,8 +46652,25 @@ def __init__(__self__, *, :param 'WindowsWebAppSiteConfigAutoHealSettingActionArgs' action: An `action` block as defined above. :param 'WindowsWebAppSiteConfigAutoHealSettingTriggerArgs' trigger: A `trigger` block as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "trigger", trigger) + WindowsWebAppSiteConfigAutoHealSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + trigger=trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional['outputs.WindowsWebAppSiteConfigAutoHealSettingAction'] = None, + trigger: Optional['outputs.WindowsWebAppSiteConfigAutoHealSettingTrigger'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if trigger is None: + raise TypeError("Missing 'trigger' argument") + + _setter("action", action) + _setter("trigger", trigger) @property @pulumi.getter @@ -35406,11 +46721,34 @@ def __init__(__self__, *, :param 'WindowsWebAppSiteConfigAutoHealSettingActionCustomActionArgs' custom_action: A `custom_action` block as defined below. :param str minimum_process_execution_time: The minimum amount of time in `hh:mm:ss` the Windows Web App must have been running before the defined action will be run in the event of a trigger. """ - pulumi.set(__self__, "action_type", action_type) + WindowsWebAppSiteConfigAutoHealSettingAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + custom_action=custom_action, + minimum_process_execution_time=minimum_process_execution_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[str] = None, + custom_action: Optional['outputs.WindowsWebAppSiteConfigAutoHealSettingActionCustomAction'] = None, + minimum_process_execution_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + if custom_action is None and 'customAction' in kwargs: + custom_action = kwargs['customAction'] + if minimum_process_execution_time is None and 'minimumProcessExecutionTime' in kwargs: + minimum_process_execution_time = kwargs['minimumProcessExecutionTime'] + + _setter("action_type", action_type) if custom_action is not None: - pulumi.set(__self__, "custom_action", custom_action) + _setter("custom_action", custom_action) if minimum_process_execution_time is not None: - pulumi.set(__self__, "minimum_process_execution_time", minimum_process_execution_time) + _setter("minimum_process_execution_time", minimum_process_execution_time) @property @pulumi.getter(name="actionType") @@ -35446,9 +46784,24 @@ def __init__(__self__, *, :param str executable: The executable to run for the `custom_action`. :param str parameters: The parameters to pass to the specified `executable`. """ - pulumi.set(__self__, "executable", executable) + WindowsWebAppSiteConfigAutoHealSettingActionCustomAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + executable=executable, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + executable: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if executable is None: + raise TypeError("Missing 'executable' argument") + + _setter("executable", executable) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -35501,14 +46854,37 @@ def __init__(__self__, *, :param Sequence['WindowsWebAppSiteConfigAutoHealSettingTriggerSlowRequestArgs'] slow_requests: One or more `slow_request` blocks as defined above. :param Sequence['WindowsWebAppSiteConfigAutoHealSettingTriggerStatusCodeArgs'] status_codes: One or more `status_code` blocks as defined above. """ + WindowsWebAppSiteConfigAutoHealSettingTrigger._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_memory_kb=private_memory_kb, + requests=requests, + slow_requests=slow_requests, + status_codes=status_codes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_memory_kb: Optional[int] = None, + requests: Optional['outputs.WindowsWebAppSiteConfigAutoHealSettingTriggerRequests'] = None, + slow_requests: Optional[Sequence['outputs.WindowsWebAppSiteConfigAutoHealSettingTriggerSlowRequest']] = None, + status_codes: Optional[Sequence['outputs.WindowsWebAppSiteConfigAutoHealSettingTriggerStatusCode']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_memory_kb is None and 'privateMemoryKb' in kwargs: + private_memory_kb = kwargs['privateMemoryKb'] + if slow_requests is None and 'slowRequests' in kwargs: + slow_requests = kwargs['slowRequests'] + if status_codes is None and 'statusCodes' in kwargs: + status_codes = kwargs['statusCodes'] + if private_memory_kb is not None: - pulumi.set(__self__, "private_memory_kb", private_memory_kb) + _setter("private_memory_kb", private_memory_kb) if requests is not None: - pulumi.set(__self__, "requests", requests) + _setter("requests", requests) if slow_requests is not None: - pulumi.set(__self__, "slow_requests", slow_requests) + _setter("slow_requests", slow_requests) if status_codes is not None: - pulumi.set(__self__, "status_codes", status_codes) + _setter("status_codes", status_codes) @property @pulumi.getter(name="privateMemoryKb") @@ -35552,8 +46928,25 @@ def __init__(__self__, *, :param int count: The number of requests in the specified `interval` to trigger this rule. :param str interval: The interval in `hh:mm:ss`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) + WindowsWebAppSiteConfigAutoHealSettingTriggerRequests._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + + _setter("count", count) + _setter("interval", interval) @property @pulumi.getter @@ -35602,11 +46995,36 @@ def __init__(__self__, *, :param str time_taken: The threshold of time passed to qualify as a Slow Request in `hh:mm:ss`. :param str path: The path for which this slow request rule applies. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "time_taken", time_taken) + WindowsWebAppSiteConfigAutoHealSettingTriggerSlowRequest._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + time_taken=time_taken, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + time_taken: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if time_taken is None and 'timeTaken' in kwargs: + time_taken = kwargs['timeTaken'] + if time_taken is None: + raise TypeError("Missing 'time_taken' argument") + + _setter("count", count) + _setter("interval", interval) + _setter("time_taken", time_taken) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -35679,15 +47097,48 @@ def __init__(__self__, *, :param int sub_status: The Request Sub Status of the Status Code. :param int win32_status_code: The Win32 Status Code of the Request. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "status_code_range", status_code_range) + WindowsWebAppSiteConfigAutoHealSettingTriggerStatusCode._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + status_code_range=status_code_range, + path=path, + sub_status=sub_status, + win32_status_code=win32_status_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + status_code_range: Optional[str] = None, + path: Optional[str] = None, + sub_status: Optional[int] = None, + win32_status_code: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if status_code_range is None and 'statusCodeRange' in kwargs: + status_code_range = kwargs['statusCodeRange'] + if status_code_range is None: + raise TypeError("Missing 'status_code_range' argument") + if sub_status is None and 'subStatus' in kwargs: + sub_status = kwargs['subStatus'] + if win32_status_code is None and 'win32StatusCode' in kwargs: + win32_status_code = kwargs['win32StatusCode'] + + _setter("count", count) + _setter("interval", interval) + _setter("status_code_range", status_code_range) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if sub_status is not None: - pulumi.set(__self__, "sub_status", sub_status) + _setter("sub_status", sub_status) if win32_status_code is not None: - pulumi.set(__self__, "win32_status_code", win32_status_code) + _setter("win32_status_code", win32_status_code) @property @pulumi.getter @@ -35766,10 +47217,27 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: Specifies a list of origins that should be allowed to make cross-origin calls. :param bool support_credentials: Whether CORS requests with credentials are allowed. Defaults to `false` """ + WindowsWebAppSiteConfigCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -35830,20 +47298,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsWebAppSiteConfigIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.WindowsWebAppSiteConfigIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -35940,14 +47437,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsWebAppSiteConfigIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -36024,20 +47546,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsWebAppSiteConfigScmIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.WindowsWebAppSiteConfigScmIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -36134,14 +47685,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsWebAppSiteConfigScmIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -36210,11 +47786,40 @@ def __init__(__self__, *, :param str virtual_path: The Virtual Path for the Virtual Application. :param Sequence['WindowsWebAppSiteConfigVirtualApplicationVirtualDirectoryArgs'] virtual_directories: One or more `virtual_directory` blocks as defined below. """ - pulumi.set(__self__, "physical_path", physical_path) - pulumi.set(__self__, "preload", preload) - pulumi.set(__self__, "virtual_path", virtual_path) + WindowsWebAppSiteConfigVirtualApplication._configure( + lambda key, value: pulumi.set(__self__, key, value), + physical_path=physical_path, + preload=preload, + virtual_path=virtual_path, + virtual_directories=virtual_directories, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + physical_path: Optional[str] = None, + preload: Optional[bool] = None, + virtual_path: Optional[str] = None, + virtual_directories: Optional[Sequence['outputs.WindowsWebAppSiteConfigVirtualApplicationVirtualDirectory']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if physical_path is None and 'physicalPath' in kwargs: + physical_path = kwargs['physicalPath'] + if physical_path is None: + raise TypeError("Missing 'physical_path' argument") + if preload is None: + raise TypeError("Missing 'preload' argument") + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if virtual_path is None: + raise TypeError("Missing 'virtual_path' argument") + if virtual_directories is None and 'virtualDirectories' in kwargs: + virtual_directories = kwargs['virtualDirectories'] + + _setter("physical_path", physical_path) + _setter("preload", preload) + _setter("virtual_path", virtual_path) if virtual_directories is not None: - pulumi.set(__self__, "virtual_directories", virtual_directories) + _setter("virtual_directories", virtual_directories) @property @pulumi.getter(name="physicalPath") @@ -36277,10 +47882,27 @@ def __init__(__self__, *, :param str physical_path: The physical path for the Virtual Application. :param str virtual_path: The Virtual Path for the Virtual Application. """ + WindowsWebAppSiteConfigVirtualApplicationVirtualDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + physical_path=physical_path, + virtual_path=virtual_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + physical_path: Optional[str] = None, + virtual_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if physical_path is None and 'physicalPath' in kwargs: + physical_path = kwargs['physicalPath'] + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if physical_path is not None: - pulumi.set(__self__, "physical_path", physical_path) + _setter("physical_path", physical_path) if virtual_path is not None: - pulumi.set(__self__, "virtual_path", virtual_path) + _setter("virtual_path", virtual_path) @property @pulumi.getter(name="physicalPath") @@ -36308,10 +47930,23 @@ def __init__(__self__, *, :param str name: The name which should be used for this Windows Web App. Changing this forces a new Windows Web App to be created. :param str password: The Site Credentials Password used for publishing. """ + WindowsWebAppSiteCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -36400,35 +48035,92 @@ def __init__(__self__, *, :param 'WindowsWebAppSlotAuthSettingsTwitterArgs' twitter: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. """ - pulumi.set(__self__, "enabled", enabled) + WindowsWebAppSlotAuthSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + active_directory=active_directory, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + facebook=facebook, + github=github, + google=google, + issuer=issuer, + microsoft=microsoft, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitter=twitter, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + active_directory: Optional['outputs.WindowsWebAppSlotAuthSettingsActiveDirectory'] = None, + additional_login_parameters: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + facebook: Optional['outputs.WindowsWebAppSlotAuthSettingsFacebook'] = None, + github: Optional['outputs.WindowsWebAppSlotAuthSettingsGithub'] = None, + google: Optional['outputs.WindowsWebAppSlotAuthSettingsGoogle'] = None, + issuer: Optional[str] = None, + microsoft: Optional['outputs.WindowsWebAppSlotAuthSettingsMicrosoft'] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitter: Optional['outputs.WindowsWebAppSlotAuthSettingsTwitter'] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + + _setter("enabled", enabled) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if additional_login_parameters is not None: - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) + _setter("additional_login_parameters", additional_login_parameters) if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if facebook is not None: - pulumi.set(__self__, "facebook", facebook) + _setter("facebook", facebook) if github is not None: - pulumi.set(__self__, "github", github) + _setter("github", github) if google is not None: - pulumi.set(__self__, "google", google) + _setter("google", google) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if microsoft is not None: - pulumi.set(__self__, "microsoft", microsoft) + _setter("microsoft", microsoft) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if token_refresh_extension_hours is not None: - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if twitter is not None: - pulumi.set(__self__, "twitter", twitter) + _setter("twitter", twitter) if unauthenticated_client_action is not None: - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter @@ -36593,13 +48285,40 @@ def __init__(__self__, *, :param str client_secret: The Client Secret for the Client ID. Cannot be used with `client_secret_setting_name`. :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppSlotAuthSettingsActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + allowed_audiences=allowed_audiences, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + + _setter("client_id", client_id) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="clientId") @@ -36672,13 +48391,40 @@ def __init__(__self__, *, :param str app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. Cannot be specified with `app_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes to be requested as part of Facebook login authentication. """ - pulumi.set(__self__, "app_id", app_id) + WindowsWebAppSlotAuthSettingsFacebook._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("app_id", app_id) if app_secret is not None: - pulumi.set(__self__, "app_secret", app_secret) + _setter("app_secret", app_secret) if app_secret_setting_name is not None: - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + _setter("app_secret_setting_name", app_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -36749,13 +48495,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for GitHub login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of GitHub login authentication. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppSlotAuthSettingsGithub._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -36826,13 +48599,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name that contains the `client_secret` value used for Google login. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. If not specified, `openid`, `profile`, and `email` are used as default scopes. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppSlotAuthSettingsGoogle._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -36903,13 +48703,40 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. Cannot be specified with `client_secret`. :param Sequence[str] oauth_scopes: Specifies a list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. If not specified, "wl.basic" is used as the default scope. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppSlotAuthSettingsMicrosoft._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if oauth_scopes is not None: - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -36976,11 +48803,34 @@ def __init__(__self__, *, :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret_setting_name`. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. Cannot be specified with `consumer_secret`. """ - pulumi.set(__self__, "consumer_key", consumer_key) + WindowsWebAppSlotAuthSettingsTwitter._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + + _setter("consumer_key", consumer_key) if consumer_secret is not None: - pulumi.set(__self__, "consumer_secret", consumer_secret) + _setter("consumer_secret", consumer_secret) if consumer_secret_setting_name is not None: - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -37119,49 +48969,146 @@ def __init__(__self__, *, :param 'WindowsWebAppSlotAuthSettingsV2TwitterV2Args' twitter_v2: A `twitter_v2` block as defined below. :param str unauthenticated_action: The action to take for requests made without authentication. Possible values include `RedirectToLoginPage`, `AllowAnonymous`, `Return401`, and `Return403`. Defaults to `RedirectToLoginPage`. """ - pulumi.set(__self__, "login", login) + WindowsWebAppSlotAuthSettingsV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + active_directory_v2=active_directory_v2, + apple_v2=apple_v2, + auth_enabled=auth_enabled, + azure_static_web_app_v2=azure_static_web_app_v2, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2=facebook_v2, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2=github_v2, + google_v2=google_v2, + http_route_api_prefix=http_route_api_prefix, + microsoft_v2=microsoft_v2, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2=twitter_v2, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional['outputs.WindowsWebAppSlotAuthSettingsV2Login'] = None, + active_directory_v2: Optional['outputs.WindowsWebAppSlotAuthSettingsV2ActiveDirectoryV2'] = None, + apple_v2: Optional['outputs.WindowsWebAppSlotAuthSettingsV2AppleV2'] = None, + auth_enabled: Optional[bool] = None, + azure_static_web_app_v2: Optional['outputs.WindowsWebAppSlotAuthSettingsV2AzureStaticWebAppV2'] = None, + config_file_path: Optional[str] = None, + custom_oidc_v2s: Optional[Sequence['outputs.WindowsWebAppSlotAuthSettingsV2CustomOidcV2']] = None, + default_provider: Optional[str] = None, + excluded_paths: Optional[Sequence[str]] = None, + facebook_v2: Optional['outputs.WindowsWebAppSlotAuthSettingsV2FacebookV2'] = None, + forward_proxy_convention: Optional[str] = None, + forward_proxy_custom_host_header_name: Optional[str] = None, + forward_proxy_custom_scheme_header_name: Optional[str] = None, + github_v2: Optional['outputs.WindowsWebAppSlotAuthSettingsV2GithubV2'] = None, + google_v2: Optional['outputs.WindowsWebAppSlotAuthSettingsV2GoogleV2'] = None, + http_route_api_prefix: Optional[str] = None, + microsoft_v2: Optional['outputs.WindowsWebAppSlotAuthSettingsV2MicrosoftV2'] = None, + require_authentication: Optional[bool] = None, + require_https: Optional[bool] = None, + runtime_version: Optional[str] = None, + twitter_v2: Optional['outputs.WindowsWebAppSlotAuthSettingsV2TwitterV2'] = None, + unauthenticated_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if active_directory_v2 is None and 'activeDirectoryV2' in kwargs: + active_directory_v2 = kwargs['activeDirectoryV2'] + if apple_v2 is None and 'appleV2' in kwargs: + apple_v2 = kwargs['appleV2'] + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if azure_static_web_app_v2 is None and 'azureStaticWebAppV2' in kwargs: + azure_static_web_app_v2 = kwargs['azureStaticWebAppV2'] + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if facebook_v2 is None and 'facebookV2' in kwargs: + facebook_v2 = kwargs['facebookV2'] + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if github_v2 is None and 'githubV2' in kwargs: + github_v2 = kwargs['githubV2'] + if google_v2 is None and 'googleV2' in kwargs: + google_v2 = kwargs['googleV2'] + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if microsoft_v2 is None and 'microsoftV2' in kwargs: + microsoft_v2 = kwargs['microsoftV2'] + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if twitter_v2 is None and 'twitterV2' in kwargs: + twitter_v2 = kwargs['twitterV2'] + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + + _setter("login", login) if active_directory_v2 is not None: - pulumi.set(__self__, "active_directory_v2", active_directory_v2) + _setter("active_directory_v2", active_directory_v2) if apple_v2 is not None: - pulumi.set(__self__, "apple_v2", apple_v2) + _setter("apple_v2", apple_v2) if auth_enabled is not None: - pulumi.set(__self__, "auth_enabled", auth_enabled) + _setter("auth_enabled", auth_enabled) if azure_static_web_app_v2 is not None: - pulumi.set(__self__, "azure_static_web_app_v2", azure_static_web_app_v2) + _setter("azure_static_web_app_v2", azure_static_web_app_v2) if config_file_path is not None: - pulumi.set(__self__, "config_file_path", config_file_path) + _setter("config_file_path", config_file_path) if custom_oidc_v2s is not None: - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) + _setter("custom_oidc_v2s", custom_oidc_v2s) if default_provider is not None: - pulumi.set(__self__, "default_provider", default_provider) + _setter("default_provider", default_provider) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if facebook_v2 is not None: - pulumi.set(__self__, "facebook_v2", facebook_v2) + _setter("facebook_v2", facebook_v2) if forward_proxy_convention is not None: - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_convention", forward_proxy_convention) if forward_proxy_custom_host_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) if forward_proxy_custom_scheme_header_name is not None: - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) if github_v2 is not None: - pulumi.set(__self__, "github_v2", github_v2) + _setter("github_v2", github_v2) if google_v2 is not None: - pulumi.set(__self__, "google_v2", google_v2) + _setter("google_v2", google_v2) if http_route_api_prefix is not None: - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) + _setter("http_route_api_prefix", http_route_api_prefix) if microsoft_v2 is not None: - pulumi.set(__self__, "microsoft_v2", microsoft_v2) + _setter("microsoft_v2", microsoft_v2) if require_authentication is not None: - pulumi.set(__self__, "require_authentication", require_authentication) + _setter("require_authentication", require_authentication) if require_https is not None: - pulumi.set(__self__, "require_https", require_https) + _setter("require_https", require_https) if runtime_version is not None: - pulumi.set(__self__, "runtime_version", runtime_version) + _setter("runtime_version", runtime_version) if twitter_v2 is not None: - pulumi.set(__self__, "twitter_v2", twitter_v2) + _setter("twitter_v2", twitter_v2) if unauthenticated_action is not None: - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter @@ -37418,28 +49365,89 @@ def __init__(__self__, *, :param Mapping[str, str] login_parameters: A map of key-value pairs to send to the Authorisation Endpoint when a user logs in. :param bool www_authentication_disabled: Should the www-authenticate provider should be omitted from the request? Defaults to `false` """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) + WindowsWebAppSlotAuthSettingsV2ActiveDirectoryV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_auth_endpoint=tenant_auth_endpoint, + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + tenant_auth_endpoint: Optional[str] = None, + allowed_applications: Optional[Sequence[str]] = None, + allowed_audiences: Optional[Sequence[str]] = None, + allowed_groups: Optional[Sequence[str]] = None, + allowed_identities: Optional[Sequence[str]] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + jwt_allowed_client_applications: Optional[Sequence[str]] = None, + jwt_allowed_groups: Optional[Sequence[str]] = None, + login_parameters: Optional[Mapping[str, str]] = None, + www_authentication_disabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + + _setter("client_id", client_id) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) if allowed_applications is not None: - pulumi.set(__self__, "allowed_applications", allowed_applications) + _setter("allowed_applications", allowed_applications) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if allowed_groups is not None: - pulumi.set(__self__, "allowed_groups", allowed_groups) + _setter("allowed_groups", allowed_groups) if allowed_identities is not None: - pulumi.set(__self__, "allowed_identities", allowed_identities) + _setter("allowed_identities", allowed_identities) if client_secret_certificate_thumbprint is not None: - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if jwt_allowed_client_applications is not None: - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) if jwt_allowed_groups is not None: - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) + _setter("jwt_allowed_groups", jwt_allowed_groups) if login_parameters is not None: - pulumi.set(__self__, "login_parameters", login_parameters) + _setter("login_parameters", login_parameters) if www_authentication_disabled is not None: - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="clientId") @@ -37574,10 +49582,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppSlotAuthSettingsV2AppleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -37628,7 +49661,22 @@ def __init__(__self__, *, """ :param str client_id: The ID of the Client to use to authenticate with Azure Active Directory. """ - pulumi.set(__self__, "client_id", client_id) + WindowsWebAppSlotAuthSettingsV2AzureStaticWebAppV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -37698,25 +49746,80 @@ def __init__(__self__, *, :param Sequence[str] scopes: The list of the scopes that should be requested while authenticating. :param str token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) + WindowsWebAppSlotAuthSettingsV2CustomOidcV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + name=name, + openid_configuration_endpoint=openid_configuration_endpoint, + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name_claim_type=name_claim_type, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + name: Optional[str] = None, + openid_configuration_endpoint: Optional[str] = None, + authorisation_endpoint: Optional[str] = None, + certification_uri: Optional[str] = None, + client_credential_method: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + issuer_endpoint: Optional[str] = None, + name_claim_type: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + token_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + + _setter("client_id", client_id) + _setter("name", name) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) if authorisation_endpoint is not None: - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) + _setter("authorisation_endpoint", authorisation_endpoint) if certification_uri is not None: - pulumi.set(__self__, "certification_uri", certification_uri) + _setter("certification_uri", certification_uri) if client_credential_method is not None: - pulumi.set(__self__, "client_credential_method", client_credential_method) + _setter("client_credential_method", client_credential_method) if client_secret_setting_name is not None: - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + _setter("client_secret_setting_name", client_secret_setting_name) if issuer_endpoint is not None: - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) + _setter("issuer_endpoint", issuer_endpoint) if name_claim_type is not None: - pulumi.set(__self__, "name_claim_type", name_claim_type) + _setter("name_claim_type", name_claim_type) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if token_endpoint is not None: - pulumi.set(__self__, "token_endpoint", token_endpoint) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="clientId") @@ -37842,12 +49945,41 @@ def __init__(__self__, *, :param str graph_api_version: The version of the Facebook API to be used while logging in. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) + WindowsWebAppSlotAuthSettingsV2FacebookV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + graph_api_version: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) if graph_api_version is not None: - pulumi.set(__self__, "graph_api_version", graph_api_version) + _setter("graph_api_version", graph_api_version) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -37916,10 +50048,35 @@ def __init__(__self__, *, :param str client_secret_setting_name: The App Setting name that contains the client secret of the Client. Cannot be used with `client_secret`. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppSlotAuthSettingsV2GithubV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -37984,12 +50141,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience, so should not be included. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppSlotAuthSettingsV2GoogleV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -38092,28 +50278,81 @@ def __init__(__self__, *, :param str token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param bool validate_nonce: Should the nonce be validated while completing the login flow. Defaults to `true`. """ + WindowsWebAppSlotAuthSettingsV2Login._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + cookie_expiration_convention: Optional[str] = None, + cookie_expiration_time: Optional[str] = None, + logout_endpoint: Optional[str] = None, + nonce_expiration_time: Optional[str] = None, + preserve_url_fragments_for_logins: Optional[bool] = None, + token_refresh_extension_time: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + token_store_path: Optional[str] = None, + token_store_sas_setting_name: Optional[str] = None, + validate_nonce: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if allowed_external_redirect_urls is not None: - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) if cookie_expiration_convention is not None: - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_convention", cookie_expiration_convention) if cookie_expiration_time is not None: - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) + _setter("cookie_expiration_time", cookie_expiration_time) if logout_endpoint is not None: - pulumi.set(__self__, "logout_endpoint", logout_endpoint) + _setter("logout_endpoint", logout_endpoint) if nonce_expiration_time is not None: - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) + _setter("nonce_expiration_time", nonce_expiration_time) if preserve_url_fragments_for_logins is not None: - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) if token_refresh_extension_time is not None: - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) + _setter("token_refresh_extension_time", token_refresh_extension_time) if token_store_enabled is not None: - pulumi.set(__self__, "token_store_enabled", token_store_enabled) + _setter("token_store_enabled", token_store_enabled) if token_store_path is not None: - pulumi.set(__self__, "token_store_path", token_store_path) + _setter("token_store_path", token_store_path) if token_store_sas_setting_name is not None: - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) if validate_nonce is not None: - pulumi.set(__self__, "validate_nonce", validate_nonce) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -38244,12 +50483,41 @@ def __init__(__self__, *, > **Note:** The `client_id` value is always considered an allowed audience, so should not be included. :param Sequence[str] login_scopes: The list of Login scopes that should be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + WindowsWebAppSlotAuthSettingsV2MicrosoftV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + allowed_audiences=allowed_audiences, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + allowed_audiences: Optional[Sequence[str]] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) if allowed_audiences is not None: - pulumi.set(__self__, "allowed_audiences", allowed_audiences) + _setter("allowed_audiences", allowed_audiences) if login_scopes is not None: - pulumi.set(__self__, "login_scopes", login_scopes) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -38316,8 +50584,29 @@ def __init__(__self__, *, !> **NOTE:** A setting with this name must exist in `app_settings` to function correctly. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + WindowsWebAppSlotAuthSettingsV2TwitterV2._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -38368,11 +50657,36 @@ def __init__(__self__, *, :param str storage_account_url: The SAS URL to the container. :param bool enabled: Should this backup job be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "storage_account_url", storage_account_url) + WindowsWebAppSlotBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + storage_account_url=storage_account_url, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + schedule: Optional['outputs.WindowsWebAppSlotBackupSchedule'] = None, + storage_account_url: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("name", name) + _setter("schedule", schedule) + _setter("storage_account_url", storage_account_url) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -38452,16 +50766,53 @@ def __init__(__self__, *, :param int retention_period_days: After how many days backups should be deleted. Defaults to `30`. :param str start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) + WindowsWebAppSlotBackupSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[int] = None, + frequency_unit: Optional[str] = None, + keep_at_least_one_backup: Optional[bool] = None, + last_execution_time: Optional[str] = None, + retention_period_days: Optional[int] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) if keep_at_least_one_backup is not None: - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) if last_execution_time is not None: - pulumi.set(__self__, "last_execution_time", last_execution_time) + _setter("last_execution_time", last_execution_time) if retention_period_days is not None: - pulumi.set(__self__, "retention_period_days", retention_period_days) + _setter("retention_period_days", retention_period_days) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -38522,9 +50873,30 @@ def __init__(__self__, *, :param str type: Type of database. Possible values include: `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure`, and `SQLServer`. :param str value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + WindowsWebAppSlotConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -38587,13 +50959,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WindowsWebAppSlotIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -38666,14 +51063,39 @@ def __init__(__self__, *, :param bool failed_request_tracing: Should failed request tracing be enabled. :param 'WindowsWebAppSlotLogsHttpLogsArgs' http_logs: An `http_logs` block as defined above. """ + WindowsWebAppSlotLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages=detailed_error_messages, + failed_request_tracing=failed_request_tracing, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional['outputs.WindowsWebAppSlotLogsApplicationLogs'] = None, + detailed_error_messages: Optional[bool] = None, + failed_request_tracing: Optional[bool] = None, + http_logs: Optional['outputs.WindowsWebAppSlotLogsHttpLogs'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if detailed_error_messages is None and 'detailedErrorMessages' in kwargs: + detailed_error_messages = kwargs['detailedErrorMessages'] + if failed_request_tracing is None and 'failedRequestTracing' in kwargs: + failed_request_tracing = kwargs['failedRequestTracing'] + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if application_logs is not None: - pulumi.set(__self__, "application_logs", application_logs) + _setter("application_logs", application_logs) if detailed_error_messages is not None: - pulumi.set(__self__, "detailed_error_messages", detailed_error_messages) + _setter("detailed_error_messages", detailed_error_messages) if failed_request_tracing is not None: - pulumi.set(__self__, "failed_request_tracing", failed_request_tracing) + _setter("failed_request_tracing", failed_request_tracing) if http_logs is not None: - pulumi.set(__self__, "http_logs", http_logs) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -38736,9 +51158,28 @@ def __init__(__self__, *, :param str file_system_level: Log level. Possible values include: `Verbose`, `Information`, `Warning`, and `Error`. :param 'WindowsWebAppSlotLogsApplicationLogsAzureBlobStorageArgs' azure_blob_storage: An `azure_blob_storage` block as defined below. """ - pulumi.set(__self__, "file_system_level", file_system_level) + WindowsWebAppSlotLogsApplicationLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_system_level=file_system_level, + azure_blob_storage=azure_blob_storage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_system_level: Optional[str] = None, + azure_blob_storage: Optional['outputs.WindowsWebAppSlotLogsApplicationLogsAzureBlobStorage'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if file_system_level is None: + raise TypeError("Missing 'file_system_level' argument") + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + + _setter("file_system_level", file_system_level) if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) @property @pulumi.getter(name="fileSystemLevel") @@ -38787,9 +51228,34 @@ def __init__(__self__, *, :param int retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. :param str sas_url: SAS url to an Azure blob container with read/write/list/delete permissions. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + WindowsWebAppSlotLogsApplicationLogsAzureBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[str] = None, + retention_in_days: Optional[int] = None, + sas_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -38844,10 +51310,27 @@ def __init__(__self__, *, :param 'WindowsWebAppSlotLogsHttpLogsAzureBlobStorageArgs' azure_blob_storage: A `azure_blob_storage_http` block as defined above. :param 'WindowsWebAppSlotLogsHttpLogsFileSystemArgs' file_system: A `file_system` block as defined above. """ + WindowsWebAppSlotLogsHttpLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storage=azure_blob_storage, + file_system=file_system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storage: Optional['outputs.WindowsWebAppSlotLogsHttpLogsAzureBlobStorage'] = None, + file_system: Optional['outputs.WindowsWebAppSlotLogsHttpLogsFileSystem'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storage is None and 'azureBlobStorage' in kwargs: + azure_blob_storage = kwargs['azureBlobStorage'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if azure_blob_storage is not None: - pulumi.set(__self__, "azure_blob_storage", azure_blob_storage) + _setter("azure_blob_storage", azure_blob_storage) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) @property @pulumi.getter(name="azureBlobStorage") @@ -38894,9 +51377,28 @@ def __init__(__self__, *, :param str sas_url: SAS url to an Azure blob container with read/write/list/delete permissions. :param int retention_in_days: The time in days after which to remove blobs. A value of `0` means no retention. """ - pulumi.set(__self__, "sas_url", sas_url) + WindowsWebAppSlotLogsHttpLogsAzureBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + sas_url=sas_url, + retention_in_days=retention_in_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sas_url: Optional[str] = None, + retention_in_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + + _setter("sas_url", sas_url) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) @property @pulumi.getter(name="sasUrl") @@ -38943,8 +51445,29 @@ def __init__(__self__, *, :param int retention_in_days: The retention period in days. A values of `0` means no retention. :param int retention_in_mb: The maximum size in megabytes that log files can use. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + WindowsWebAppSlotLogsHttpLogsFileSystem._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[int] = None, + retention_in_mb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -39115,74 +51638,217 @@ def __init__(__self__, *, :param bool websockets_enabled: Should Web Sockets be enabled. Defaults to `false`. :param int worker_count: The number of Workers for this Windows App Service Slot. """ + WindowsWebAppSlotSiteConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + application_stack=application_stack, + auto_heal_enabled=auto_heal_enabled, + auto_heal_setting=auto_heal_setting, + auto_swap_slot_name=auto_swap_slot_name, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + load_balancing_mode=load_balancing_mode, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + virtual_applications=virtual_applications, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + api_definition_url: Optional[str] = None, + api_management_api_id: Optional[str] = None, + app_command_line: Optional[str] = None, + application_stack: Optional['outputs.WindowsWebAppSlotSiteConfigApplicationStack'] = None, + auto_heal_enabled: Optional[bool] = None, + auto_heal_setting: Optional['outputs.WindowsWebAppSlotSiteConfigAutoHealSetting'] = None, + auto_swap_slot_name: Optional[str] = None, + container_registry_managed_identity_client_id: Optional[str] = None, + container_registry_use_managed_identity: Optional[bool] = None, + cors: Optional['outputs.WindowsWebAppSlotSiteConfigCors'] = None, + default_documents: Optional[Sequence[str]] = None, + detailed_error_logging_enabled: Optional[bool] = None, + ftps_state: Optional[str] = None, + health_check_eviction_time_in_min: Optional[int] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.WindowsWebAppSlotSiteConfigIpRestriction']] = None, + load_balancing_mode: Optional[str] = None, + local_mysql_enabled: Optional[bool] = None, + managed_pipeline_mode: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + scm_ip_restrictions: Optional[Sequence['outputs.WindowsWebAppSlotSiteConfigScmIpRestriction']] = None, + scm_minimum_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker: Optional[bool] = None, + virtual_applications: Optional[Sequence['outputs.WindowsWebAppSlotSiteConfigVirtualApplication']] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + windows_fx_version: Optional[str] = None, + worker_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if application_stack is None and 'applicationStack' in kwargs: + application_stack = kwargs['applicationStack'] + if auto_heal_enabled is None and 'autoHealEnabled' in kwargs: + auto_heal_enabled = kwargs['autoHealEnabled'] + if auto_heal_setting is None and 'autoHealSetting' in kwargs: + auto_heal_setting = kwargs['autoHealSetting'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if virtual_applications is None and 'virtualApplications' in kwargs: + virtual_applications = kwargs['virtualApplications'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if api_definition_url is not None: - pulumi.set(__self__, "api_definition_url", api_definition_url) + _setter("api_definition_url", api_definition_url) if api_management_api_id is not None: - pulumi.set(__self__, "api_management_api_id", api_management_api_id) + _setter("api_management_api_id", api_management_api_id) if app_command_line is not None: - pulumi.set(__self__, "app_command_line", app_command_line) + _setter("app_command_line", app_command_line) if application_stack is not None: - pulumi.set(__self__, "application_stack", application_stack) + _setter("application_stack", application_stack) if auto_heal_enabled is not None: - pulumi.set(__self__, "auto_heal_enabled", auto_heal_enabled) + _setter("auto_heal_enabled", auto_heal_enabled) if auto_heal_setting is not None: - pulumi.set(__self__, "auto_heal_setting", auto_heal_setting) + _setter("auto_heal_setting", auto_heal_setting) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if container_registry_managed_identity_client_id is not None: - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) if container_registry_use_managed_identity is not None: - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if default_documents is not None: - pulumi.set(__self__, "default_documents", default_documents) + _setter("default_documents", default_documents) if detailed_error_logging_enabled is not None: - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_eviction_time_in_min is not None: - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if load_balancing_mode is not None: - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) + _setter("load_balancing_mode", load_balancing_mode) if local_mysql_enabled is not None: - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) + _setter("local_mysql_enabled", local_mysql_enabled) if managed_pipeline_mode is not None: - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if remote_debugging_enabled is not None: - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_enabled", remote_debugging_enabled) if remote_debugging_version is not None: - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) + _setter("remote_debugging_version", remote_debugging_version) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_minimum_tls_version is not None: - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker is not None: - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) + _setter("use32_bit_worker", use32_bit_worker) if virtual_applications is not None: - pulumi.set(__self__, "virtual_applications", virtual_applications) + _setter("virtual_applications", virtual_applications) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) if windows_fx_version is not None: - pulumi.set(__self__, "windows_fx_version", windows_fx_version) + _setter("windows_fx_version", windows_fx_version) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -39547,44 +52213,127 @@ def __init__(__self__, *, > **NOTE:** See the official documentation for current supported versions. """ + WindowsWebAppSlotSiteConfigApplicationStack._configure( + lambda key, value: pulumi.set(__self__, key, value), + current_stack=current_stack, + docker_container_name=docker_container_name, + docker_container_registry=docker_container_registry, + docker_container_tag=docker_container_tag, + docker_image_name=docker_image_name, + docker_registry_password=docker_registry_password, + docker_registry_url=docker_registry_url, + docker_registry_username=docker_registry_username, + dotnet_core_version=dotnet_core_version, + dotnet_version=dotnet_version, + java_container=java_container, + java_container_version=java_container_version, + java_embedded_server_enabled=java_embedded_server_enabled, + java_version=java_version, + node_version=node_version, + php_version=php_version, + python=python, + python_version=python_version, + tomcat_version=tomcat_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + current_stack: Optional[str] = None, + docker_container_name: Optional[str] = None, + docker_container_registry: Optional[str] = None, + docker_container_tag: Optional[str] = None, + docker_image_name: Optional[str] = None, + docker_registry_password: Optional[str] = None, + docker_registry_url: Optional[str] = None, + docker_registry_username: Optional[str] = None, + dotnet_core_version: Optional[str] = None, + dotnet_version: Optional[str] = None, + java_container: Optional[str] = None, + java_container_version: Optional[str] = None, + java_embedded_server_enabled: Optional[bool] = None, + java_version: Optional[str] = None, + node_version: Optional[str] = None, + php_version: Optional[str] = None, + python: Optional[bool] = None, + python_version: Optional[str] = None, + tomcat_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if current_stack is None and 'currentStack' in kwargs: + current_stack = kwargs['currentStack'] + if docker_container_name is None and 'dockerContainerName' in kwargs: + docker_container_name = kwargs['dockerContainerName'] + if docker_container_registry is None and 'dockerContainerRegistry' in kwargs: + docker_container_registry = kwargs['dockerContainerRegistry'] + if docker_container_tag is None and 'dockerContainerTag' in kwargs: + docker_container_tag = kwargs['dockerContainerTag'] + if docker_image_name is None and 'dockerImageName' in kwargs: + docker_image_name = kwargs['dockerImageName'] + if docker_registry_password is None and 'dockerRegistryPassword' in kwargs: + docker_registry_password = kwargs['dockerRegistryPassword'] + if docker_registry_url is None and 'dockerRegistryUrl' in kwargs: + docker_registry_url = kwargs['dockerRegistryUrl'] + if docker_registry_username is None and 'dockerRegistryUsername' in kwargs: + docker_registry_username = kwargs['dockerRegistryUsername'] + if dotnet_core_version is None and 'dotnetCoreVersion' in kwargs: + dotnet_core_version = kwargs['dotnetCoreVersion'] + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if java_container is None and 'javaContainer' in kwargs: + java_container = kwargs['javaContainer'] + if java_container_version is None and 'javaContainerVersion' in kwargs: + java_container_version = kwargs['javaContainerVersion'] + if java_embedded_server_enabled is None and 'javaEmbeddedServerEnabled' in kwargs: + java_embedded_server_enabled = kwargs['javaEmbeddedServerEnabled'] + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if tomcat_version is None and 'tomcatVersion' in kwargs: + tomcat_version = kwargs['tomcatVersion'] + if current_stack is not None: - pulumi.set(__self__, "current_stack", current_stack) + _setter("current_stack", current_stack) if docker_container_name is not None: - pulumi.set(__self__, "docker_container_name", docker_container_name) + _setter("docker_container_name", docker_container_name) if docker_container_registry is not None: - pulumi.set(__self__, "docker_container_registry", docker_container_registry) + _setter("docker_container_registry", docker_container_registry) if docker_container_tag is not None: - pulumi.set(__self__, "docker_container_tag", docker_container_tag) + _setter("docker_container_tag", docker_container_tag) if docker_image_name is not None: - pulumi.set(__self__, "docker_image_name", docker_image_name) + _setter("docker_image_name", docker_image_name) if docker_registry_password is not None: - pulumi.set(__self__, "docker_registry_password", docker_registry_password) + _setter("docker_registry_password", docker_registry_password) if docker_registry_url is not None: - pulumi.set(__self__, "docker_registry_url", docker_registry_url) + _setter("docker_registry_url", docker_registry_url) if docker_registry_username is not None: - pulumi.set(__self__, "docker_registry_username", docker_registry_username) + _setter("docker_registry_username", docker_registry_username) if dotnet_core_version is not None: - pulumi.set(__self__, "dotnet_core_version", dotnet_core_version) + _setter("dotnet_core_version", dotnet_core_version) if dotnet_version is not None: - pulumi.set(__self__, "dotnet_version", dotnet_version) + _setter("dotnet_version", dotnet_version) if java_container is not None: - pulumi.set(__self__, "java_container", java_container) + _setter("java_container", java_container) if java_container_version is not None: - pulumi.set(__self__, "java_container_version", java_container_version) + _setter("java_container_version", java_container_version) if java_embedded_server_enabled is not None: - pulumi.set(__self__, "java_embedded_server_enabled", java_embedded_server_enabled) + _setter("java_embedded_server_enabled", java_embedded_server_enabled) if java_version is not None: - pulumi.set(__self__, "java_version", java_version) + _setter("java_version", java_version) if node_version is not None: - pulumi.set(__self__, "node_version", node_version) + _setter("node_version", node_version) if php_version is not None: - pulumi.set(__self__, "php_version", php_version) + _setter("php_version", php_version) if python is not None: - pulumi.set(__self__, "python", python) + _setter("python", python) if python_version is not None: - pulumi.set(__self__, "python_version", python_version) + _setter("python_version", python_version) if tomcat_version is not None: - pulumi.set(__self__, "tomcat_version", tomcat_version) + _setter("tomcat_version", tomcat_version) @property @pulumi.getter(name="currentStack") @@ -39754,8 +52503,25 @@ def __init__(__self__, *, :param 'WindowsWebAppSlotSiteConfigAutoHealSettingActionArgs' action: A `action` block as defined above. :param 'WindowsWebAppSlotSiteConfigAutoHealSettingTriggerArgs' trigger: A `trigger` block as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "trigger", trigger) + WindowsWebAppSlotSiteConfigAutoHealSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + trigger=trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional['outputs.WindowsWebAppSlotSiteConfigAutoHealSettingAction'] = None, + trigger: Optional['outputs.WindowsWebAppSlotSiteConfigAutoHealSettingTrigger'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if trigger is None: + raise TypeError("Missing 'trigger' argument") + + _setter("action", action) + _setter("trigger", trigger) @property @pulumi.getter @@ -39806,11 +52572,34 @@ def __init__(__self__, *, :param 'WindowsWebAppSlotSiteConfigAutoHealSettingActionCustomActionArgs' custom_action: A `custom_action` block as defined below. :param str minimum_process_execution_time: The minimum amount of time in `hh:mm:ss` the Windows Web App Slot must have been running before the defined action will be run in the event of a trigger. """ - pulumi.set(__self__, "action_type", action_type) + WindowsWebAppSlotSiteConfigAutoHealSettingAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + custom_action=custom_action, + minimum_process_execution_time=minimum_process_execution_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[str] = None, + custom_action: Optional['outputs.WindowsWebAppSlotSiteConfigAutoHealSettingActionCustomAction'] = None, + minimum_process_execution_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + if custom_action is None and 'customAction' in kwargs: + custom_action = kwargs['customAction'] + if minimum_process_execution_time is None and 'minimumProcessExecutionTime' in kwargs: + minimum_process_execution_time = kwargs['minimumProcessExecutionTime'] + + _setter("action_type", action_type) if custom_action is not None: - pulumi.set(__self__, "custom_action", custom_action) + _setter("custom_action", custom_action) if minimum_process_execution_time is not None: - pulumi.set(__self__, "minimum_process_execution_time", minimum_process_execution_time) + _setter("minimum_process_execution_time", minimum_process_execution_time) @property @pulumi.getter(name="actionType") @@ -39846,9 +52635,24 @@ def __init__(__self__, *, :param str executable: The executable to run for the `custom_action`. :param str parameters: The parameters to pass to the specified `executable`. """ - pulumi.set(__self__, "executable", executable) + WindowsWebAppSlotSiteConfigAutoHealSettingActionCustomAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + executable=executable, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + executable: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if executable is None: + raise TypeError("Missing 'executable' argument") + + _setter("executable", executable) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -39901,14 +52705,37 @@ def __init__(__self__, *, :param Sequence['WindowsWebAppSlotSiteConfigAutoHealSettingTriggerSlowRequestArgs'] slow_requests: One or more `slow_request` blocks as defined above. :param Sequence['WindowsWebAppSlotSiteConfigAutoHealSettingTriggerStatusCodeArgs'] status_codes: One or more `status_code` blocks as defined above. """ + WindowsWebAppSlotSiteConfigAutoHealSettingTrigger._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_memory_kb=private_memory_kb, + requests=requests, + slow_requests=slow_requests, + status_codes=status_codes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_memory_kb: Optional[int] = None, + requests: Optional['outputs.WindowsWebAppSlotSiteConfigAutoHealSettingTriggerRequests'] = None, + slow_requests: Optional[Sequence['outputs.WindowsWebAppSlotSiteConfigAutoHealSettingTriggerSlowRequest']] = None, + status_codes: Optional[Sequence['outputs.WindowsWebAppSlotSiteConfigAutoHealSettingTriggerStatusCode']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_memory_kb is None and 'privateMemoryKb' in kwargs: + private_memory_kb = kwargs['privateMemoryKb'] + if slow_requests is None and 'slowRequests' in kwargs: + slow_requests = kwargs['slowRequests'] + if status_codes is None and 'statusCodes' in kwargs: + status_codes = kwargs['statusCodes'] + if private_memory_kb is not None: - pulumi.set(__self__, "private_memory_kb", private_memory_kb) + _setter("private_memory_kb", private_memory_kb) if requests is not None: - pulumi.set(__self__, "requests", requests) + _setter("requests", requests) if slow_requests is not None: - pulumi.set(__self__, "slow_requests", slow_requests) + _setter("slow_requests", slow_requests) if status_codes is not None: - pulumi.set(__self__, "status_codes", status_codes) + _setter("status_codes", status_codes) @property @pulumi.getter(name="privateMemoryKb") @@ -39952,8 +52779,25 @@ def __init__(__self__, *, :param int count: The number of requests in the specified `interval` to trigger this rule. :param str interval: The interval in `hh:mm:ss`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) + WindowsWebAppSlotSiteConfigAutoHealSettingTriggerRequests._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + + _setter("count", count) + _setter("interval", interval) @property @pulumi.getter @@ -40002,11 +52846,36 @@ def __init__(__self__, *, :param str time_taken: The threshold of time passed to qualify as a Slow Request in `hh:mm:ss`. :param str path: The path for which this slow request rule applies. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "time_taken", time_taken) + WindowsWebAppSlotSiteConfigAutoHealSettingTriggerSlowRequest._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + time_taken=time_taken, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + time_taken: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if time_taken is None and 'timeTaken' in kwargs: + time_taken = kwargs['timeTaken'] + if time_taken is None: + raise TypeError("Missing 'time_taken' argument") + + _setter("count", count) + _setter("interval", interval) + _setter("time_taken", time_taken) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -40079,15 +52948,48 @@ def __init__(__self__, *, :param int sub_status: The Request Sub Status of the Status Code. :param int win32_status_code: The Win32 Status Code of the Request. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "status_code_range", status_code_range) + WindowsWebAppSlotSiteConfigAutoHealSettingTriggerStatusCode._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + status_code_range=status_code_range, + path=path, + sub_status=sub_status, + win32_status_code=win32_status_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + status_code_range: Optional[str] = None, + path: Optional[str] = None, + sub_status: Optional[int] = None, + win32_status_code: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if status_code_range is None and 'statusCodeRange' in kwargs: + status_code_range = kwargs['statusCodeRange'] + if status_code_range is None: + raise TypeError("Missing 'status_code_range' argument") + if sub_status is None and 'subStatus' in kwargs: + sub_status = kwargs['subStatus'] + if win32_status_code is None and 'win32StatusCode' in kwargs: + win32_status_code = kwargs['win32StatusCode'] + + _setter("count", count) + _setter("interval", interval) + _setter("status_code_range", status_code_range) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if sub_status is not None: - pulumi.set(__self__, "sub_status", sub_status) + _setter("sub_status", sub_status) if win32_status_code is not None: - pulumi.set(__self__, "win32_status_code", win32_status_code) + _setter("win32_status_code", win32_status_code) @property @pulumi.getter @@ -40166,10 +53068,27 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: Specifies a list of origins that should be allowed to make cross-origin calls. :param bool support_credentials: Whether CORS requests with credentials are allowed. Defaults to `false` """ + WindowsWebAppSlotSiteConfigCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -40230,20 +53149,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsWebAppSlotSiteConfigIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.WindowsWebAppSlotSiteConfigIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -40340,14 +53288,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsWebAppSlotSiteConfigIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -40424,20 +53397,49 @@ def __init__(__self__, *, > **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. """ + WindowsWebAppSlotSiteConfigScmIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.WindowsWebAppSlotSiteConfigScmIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -40534,14 +53536,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: Specifies a list of addresses for which matching should be applied. Omitting this value means allow any. :param Sequence[str] x_forwarded_hosts: Specifies a list of Hosts for which matching should be applied. """ + WindowsWebAppSlotSiteConfigScmIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -40610,11 +53637,40 @@ def __init__(__self__, *, :param str virtual_path: The Virtual Path for the Virtual Application. :param Sequence['WindowsWebAppSlotSiteConfigVirtualApplicationVirtualDirectoryArgs'] virtual_directories: One or more `virtual_directory` blocks as defined below. """ - pulumi.set(__self__, "physical_path", physical_path) - pulumi.set(__self__, "preload", preload) - pulumi.set(__self__, "virtual_path", virtual_path) + WindowsWebAppSlotSiteConfigVirtualApplication._configure( + lambda key, value: pulumi.set(__self__, key, value), + physical_path=physical_path, + preload=preload, + virtual_path=virtual_path, + virtual_directories=virtual_directories, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + physical_path: Optional[str] = None, + preload: Optional[bool] = None, + virtual_path: Optional[str] = None, + virtual_directories: Optional[Sequence['outputs.WindowsWebAppSlotSiteConfigVirtualApplicationVirtualDirectory']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if physical_path is None and 'physicalPath' in kwargs: + physical_path = kwargs['physicalPath'] + if physical_path is None: + raise TypeError("Missing 'physical_path' argument") + if preload is None: + raise TypeError("Missing 'preload' argument") + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if virtual_path is None: + raise TypeError("Missing 'virtual_path' argument") + if virtual_directories is None and 'virtualDirectories' in kwargs: + virtual_directories = kwargs['virtualDirectories'] + + _setter("physical_path", physical_path) + _setter("preload", preload) + _setter("virtual_path", virtual_path) if virtual_directories is not None: - pulumi.set(__self__, "virtual_directories", virtual_directories) + _setter("virtual_directories", virtual_directories) @property @pulumi.getter(name="physicalPath") @@ -40677,10 +53733,27 @@ def __init__(__self__, *, :param str physical_path: The physical path for the Virtual Application. :param str virtual_path: The Virtual Path for the Virtual Application. """ + WindowsWebAppSlotSiteConfigVirtualApplicationVirtualDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + physical_path=physical_path, + virtual_path=virtual_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + physical_path: Optional[str] = None, + virtual_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if physical_path is None and 'physicalPath' in kwargs: + physical_path = kwargs['physicalPath'] + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if physical_path is not None: - pulumi.set(__self__, "physical_path", physical_path) + _setter("physical_path", physical_path) if virtual_path is not None: - pulumi.set(__self__, "virtual_path", virtual_path) + _setter("virtual_path", virtual_path) @property @pulumi.getter(name="physicalPath") @@ -40707,10 +53780,23 @@ def __init__(__self__, *, """ :param str password: The Site Credentials Password used for publishing. """ + WindowsWebAppSlotSiteCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -40766,13 +53852,52 @@ def __init__(__self__, *, :param str type: The Azure Storage Type. Possible values include `AzureFiles` and `AzureBlob` :param str mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + WindowsWebAppSlotStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[str] = None, + account_name: Optional[str] = None, + name: Optional[str] = None, + share_name: Optional[str] = None, + type: Optional[str] = None, + mount_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -40851,10 +53976,27 @@ def __init__(__self__, *, :param Sequence[str] app_setting_names: A list of `app_setting` names that the Windows Web App will not swap between Slots when a swap operation is triggered. :param Sequence[str] connection_string_names: A list of `connection_string` names that the Windows Web App will not swap between Slots when a swap operation is triggered. """ + WindowsWebAppStickySettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_setting_names=app_setting_names, + connection_string_names=connection_string_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_setting_names: Optional[Sequence[str]] = None, + connection_string_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_setting_names is None and 'appSettingNames' in kwargs: + app_setting_names = kwargs['appSettingNames'] + if connection_string_names is None and 'connectionStringNames' in kwargs: + connection_string_names = kwargs['connectionStringNames'] + if app_setting_names is not None: - pulumi.set(__self__, "app_setting_names", app_setting_names) + _setter("app_setting_names", app_setting_names) if connection_string_names is not None: - pulumi.set(__self__, "connection_string_names", connection_string_names) + _setter("connection_string_names", connection_string_names) @property @pulumi.getter(name="appSettingNames") @@ -40913,13 +54055,52 @@ def __init__(__self__, *, :param str type: The Azure Storage Type. Possible values include `AzureFiles` and `AzureBlob` :param str mount_path: The path at which to mount the storage share. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + WindowsWebAppStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + name=name, + share_name=share_name, + type=type, + mount_path=mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[str] = None, + account_name: Optional[str] = None, + name: Optional[str] = None, + share_name: Optional[str] = None, + type: Optional[str] = None, + mount_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) if mount_path is not None: - pulumi.set(__self__, "mount_path", mount_path) + _setter("mount_path", mount_path) @property @pulumi.getter(name="accessKey") @@ -40981,9 +54162,30 @@ def __init__(__self__, *, :param str type: The type of the Connection String. :param str value: The value for the Connection String. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + GetAppServiceConnectionStringResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -41019,8 +54221,25 @@ def __init__(__self__, *, :param str name: The name of this App Service Environment. :param str value: The value for the Cluster Setting. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetAppServiceEnvironmentClusterSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -41050,9 +54269,30 @@ def __init__(__self__, *, :param str size: Specifies the plan's instance size. :param str tier: Specifies the plan's pricing tier. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "size", size) - pulumi.set(__self__, "tier", tier) + GetAppServicePlanSkuResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + size=size, + tier=tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + size: Optional[str] = None, + tier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if size is None: + raise TypeError("Missing 'size' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("capacity", capacity) + _setter("size", size) + _setter("tier", tier) @property @pulumi.getter @@ -41144,36 +54384,223 @@ def __init__(__self__, *, :param bool websockets_enabled: Are WebSockets enabled for this App Service? :param str windows_fx_version: Windows Container Docker Image for the AppService. """ - pulumi.set(__self__, "acr_use_managed_identity_credentials", acr_use_managed_identity_credentials) - pulumi.set(__self__, "acr_user_managed_identity_client_id", acr_user_managed_identity_client_id) - pulumi.set(__self__, "always_on", always_on) - pulumi.set(__self__, "app_command_line", app_command_line) - pulumi.set(__self__, "cors", cors) - pulumi.set(__self__, "default_documents", default_documents) - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) - pulumi.set(__self__, "ftps_state", ftps_state) - pulumi.set(__self__, "health_check_path", health_check_path) - pulumi.set(__self__, "http2_enabled", http2_enabled) - pulumi.set(__self__, "ip_restrictions", ip_restrictions) - pulumi.set(__self__, "java_container", java_container) - pulumi.set(__self__, "java_container_version", java_container_version) - pulumi.set(__self__, "java_version", java_version) - pulumi.set(__self__, "linux_fx_version", linux_fx_version) - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) - pulumi.set(__self__, "min_tls_version", min_tls_version) - pulumi.set(__self__, "number_of_workers", number_of_workers) - pulumi.set(__self__, "php_version", php_version) - pulumi.set(__self__, "python_version", python_version) - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) - pulumi.set(__self__, "scm_type", scm_type) - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) - pulumi.set(__self__, "websockets_enabled", websockets_enabled) - pulumi.set(__self__, "windows_fx_version", windows_fx_version) + GetAppServiceSiteConfigResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + acr_use_managed_identity_credentials=acr_use_managed_identity_credentials, + acr_user_managed_identity_client_id=acr_user_managed_identity_client_id, + always_on=always_on, + app_command_line=app_command_line, + cors=cors, + default_documents=default_documents, + dotnet_framework_version=dotnet_framework_version, + ftps_state=ftps_state, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + java_container=java_container, + java_container_version=java_container_version, + java_version=java_version, + linux_fx_version=linux_fx_version, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + min_tls_version=min_tls_version, + number_of_workers=number_of_workers, + php_version=php_version, + python_version=python_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + acr_use_managed_identity_credentials: Optional[bool] = None, + acr_user_managed_identity_client_id: Optional[str] = None, + always_on: Optional[bool] = None, + app_command_line: Optional[str] = None, + cors: Optional[Sequence['outputs.GetAppServiceSiteConfigCorResult']] = None, + default_documents: Optional[Sequence[str]] = None, + dotnet_framework_version: Optional[str] = None, + ftps_state: Optional[str] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.GetAppServiceSiteConfigIpRestrictionResult']] = None, + java_container: Optional[str] = None, + java_container_version: Optional[str] = None, + java_version: Optional[str] = None, + linux_fx_version: Optional[str] = None, + local_mysql_enabled: Optional[bool] = None, + managed_pipeline_mode: Optional[str] = None, + min_tls_version: Optional[str] = None, + number_of_workers: Optional[int] = None, + php_version: Optional[str] = None, + python_version: Optional[str] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + scm_ip_restrictions: Optional[Sequence['outputs.GetAppServiceSiteConfigScmIpRestrictionResult']] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker_process: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + windows_fx_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if acr_use_managed_identity_credentials is None and 'acrUseManagedIdentityCredentials' in kwargs: + acr_use_managed_identity_credentials = kwargs['acrUseManagedIdentityCredentials'] + if acr_use_managed_identity_credentials is None: + raise TypeError("Missing 'acr_use_managed_identity_credentials' argument") + if acr_user_managed_identity_client_id is None and 'acrUserManagedIdentityClientId' in kwargs: + acr_user_managed_identity_client_id = kwargs['acrUserManagedIdentityClientId'] + if acr_user_managed_identity_client_id is None: + raise TypeError("Missing 'acr_user_managed_identity_client_id' argument") + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if always_on is None: + raise TypeError("Missing 'always_on' argument") + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if app_command_line is None: + raise TypeError("Missing 'app_command_line' argument") + if cors is None: + raise TypeError("Missing 'cors' argument") + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if default_documents is None: + raise TypeError("Missing 'default_documents' argument") + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if dotnet_framework_version is None: + raise TypeError("Missing 'dotnet_framework_version' argument") + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if ftps_state is None: + raise TypeError("Missing 'ftps_state' argument") + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if health_check_path is None: + raise TypeError("Missing 'health_check_path' argument") + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if http2_enabled is None: + raise TypeError("Missing 'http2_enabled' argument") + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if ip_restrictions is None: + raise TypeError("Missing 'ip_restrictions' argument") + if java_container is None and 'javaContainer' in kwargs: + java_container = kwargs['javaContainer'] + if java_container is None: + raise TypeError("Missing 'java_container' argument") + if java_container_version is None and 'javaContainerVersion' in kwargs: + java_container_version = kwargs['javaContainerVersion'] + if java_container_version is None: + raise TypeError("Missing 'java_container_version' argument") + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if java_version is None: + raise TypeError("Missing 'java_version' argument") + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if linux_fx_version is None: + raise TypeError("Missing 'linux_fx_version' argument") + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if local_mysql_enabled is None: + raise TypeError("Missing 'local_mysql_enabled' argument") + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if managed_pipeline_mode is None: + raise TypeError("Missing 'managed_pipeline_mode' argument") + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if min_tls_version is None: + raise TypeError("Missing 'min_tls_version' argument") + if number_of_workers is None and 'numberOfWorkers' in kwargs: + number_of_workers = kwargs['numberOfWorkers'] + if number_of_workers is None: + raise TypeError("Missing 'number_of_workers' argument") + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if php_version is None: + raise TypeError("Missing 'php_version' argument") + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if python_version is None: + raise TypeError("Missing 'python_version' argument") + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_enabled is None: + raise TypeError("Missing 'remote_debugging_enabled' argument") + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if remote_debugging_version is None: + raise TypeError("Missing 'remote_debugging_version' argument") + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_ip_restrictions is None: + raise TypeError("Missing 'scm_ip_restrictions' argument") + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_type is None: + raise TypeError("Missing 'scm_type' argument") + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if scm_use_main_ip_restriction is None: + raise TypeError("Missing 'scm_use_main_ip_restriction' argument") + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if use32_bit_worker_process is None: + raise TypeError("Missing 'use32_bit_worker_process' argument") + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if vnet_route_all_enabled is None: + raise TypeError("Missing 'vnet_route_all_enabled' argument") + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if websockets_enabled is None: + raise TypeError("Missing 'websockets_enabled' argument") + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if windows_fx_version is None: + raise TypeError("Missing 'windows_fx_version' argument") + + _setter("acr_use_managed_identity_credentials", acr_use_managed_identity_credentials) + _setter("acr_user_managed_identity_client_id", acr_user_managed_identity_client_id) + _setter("always_on", always_on) + _setter("app_command_line", app_command_line) + _setter("cors", cors) + _setter("default_documents", default_documents) + _setter("dotnet_framework_version", dotnet_framework_version) + _setter("ftps_state", ftps_state) + _setter("health_check_path", health_check_path) + _setter("http2_enabled", http2_enabled) + _setter("ip_restrictions", ip_restrictions) + _setter("java_container", java_container) + _setter("java_container_version", java_container_version) + _setter("java_version", java_version) + _setter("linux_fx_version", linux_fx_version) + _setter("local_mysql_enabled", local_mysql_enabled) + _setter("managed_pipeline_mode", managed_pipeline_mode) + _setter("min_tls_version", min_tls_version) + _setter("number_of_workers", number_of_workers) + _setter("php_version", php_version) + _setter("python_version", python_version) + _setter("remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_version", remote_debugging_version) + _setter("scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_type", scm_type) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("use32_bit_worker_process", use32_bit_worker_process) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) + _setter("websockets_enabled", websockets_enabled) + _setter("windows_fx_version", windows_fx_version) @property @pulumi.getter(name="acrUseManagedIdentityCredentials") @@ -41425,8 +54852,29 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: A list of origins which are able to make cross-origin calls. :param bool support_credentials: Are credentials supported? """ - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "support_credentials", support_credentials) + GetAppServiceSiteConfigCorResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if support_credentials is None: + raise TypeError("Missing 'support_credentials' argument") + + _setter("allowed_origins", allowed_origins) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -41463,13 +54911,56 @@ def __init__(__self__, *, :param str service_tag: The Service Tag used for this IP Restriction. :param str virtual_network_subnet_id: The Virtual Network Subnet ID used for this IP Restriction. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "service_tag", service_tag) - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + GetAppServiceSiteConfigIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.GetAppServiceSiteConfigIpRestrictionHeadersResult'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if service_tag is None: + raise TypeError("Missing 'service_tag' argument") + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if virtual_network_subnet_id is None: + raise TypeError("Missing 'virtual_network_subnet_id' argument") + + _setter("action", action) + _setter("headers", headers) + _setter("ip_address", ip_address) + _setter("name", name) + _setter("priority", priority) + _setter("service_tag", service_tag) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -41532,10 +55023,43 @@ def __init__(__self__, *, x_fd_health_probes: Sequence[str], x_forwarded_fors: Sequence[str], x_forwarded_hosts: Sequence[str]): - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) - pulumi.set(__self__, "x_fd_health_probes", x_fd_health_probes) - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + GetAppServiceSiteConfigIpRestrictionHeadersResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probes=x_fd_health_probes, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probes: Optional[Sequence[str]] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_azure_fdids is None: + raise TypeError("Missing 'x_azure_fdids' argument") + if x_fd_health_probes is None and 'xFdHealthProbes' in kwargs: + x_fd_health_probes = kwargs['xFdHealthProbes'] + if x_fd_health_probes is None: + raise TypeError("Missing 'x_fd_health_probes' argument") + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_fors is None: + raise TypeError("Missing 'x_forwarded_fors' argument") + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_forwarded_hosts is None: + raise TypeError("Missing 'x_forwarded_hosts' argument") + + _setter("x_azure_fdids", x_azure_fdids) + _setter("x_fd_health_probes", x_fd_health_probes) + _setter("x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -41576,13 +55100,56 @@ def __init__(__self__, *, :param str service_tag: The Service Tag used for this IP Restriction. :param str virtual_network_subnet_id: The Virtual Network Subnet ID used for this IP Restriction. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "service_tag", service_tag) - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + GetAppServiceSiteConfigScmIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.GetAppServiceSiteConfigScmIpRestrictionHeadersResult'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if service_tag is None: + raise TypeError("Missing 'service_tag' argument") + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if virtual_network_subnet_id is None: + raise TypeError("Missing 'virtual_network_subnet_id' argument") + + _setter("action", action) + _setter("headers", headers) + _setter("ip_address", ip_address) + _setter("name", name) + _setter("priority", priority) + _setter("service_tag", service_tag) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -41645,10 +55212,43 @@ def __init__(__self__, *, x_fd_health_probes: Sequence[str], x_forwarded_fors: Sequence[str], x_forwarded_hosts: Sequence[str]): - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) - pulumi.set(__self__, "x_fd_health_probes", x_fd_health_probes) - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + GetAppServiceSiteConfigScmIpRestrictionHeadersResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probes=x_fd_health_probes, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probes: Optional[Sequence[str]] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_azure_fdids is None: + raise TypeError("Missing 'x_azure_fdids' argument") + if x_fd_health_probes is None and 'xFdHealthProbes' in kwargs: + x_fd_health_probes = kwargs['xFdHealthProbes'] + if x_fd_health_probes is None: + raise TypeError("Missing 'x_fd_health_probes' argument") + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_fors is None: + raise TypeError("Missing 'x_forwarded_fors' argument") + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_forwarded_hosts is None: + raise TypeError("Missing 'x_forwarded_hosts' argument") + + _setter("x_azure_fdids", x_azure_fdids) + _setter("x_fd_health_probes", x_fd_health_probes) + _setter("x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -41676,8 +55276,25 @@ class GetAppServiceSiteCredentialResult(dict): def __init__(__self__, *, password: str, username: str): - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + GetAppServiceSiteCredentialResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -41705,11 +55322,48 @@ def __init__(__self__, *, :param bool rollback_enabled: Is roll-back enabled for the repository. :param bool use_mercurial: Uses Mercurial if `true`, otherwise uses Git. """ - pulumi.set(__self__, "branch", branch) - pulumi.set(__self__, "manual_integration", manual_integration) - pulumi.set(__self__, "repo_url", repo_url) - pulumi.set(__self__, "rollback_enabled", rollback_enabled) - pulumi.set(__self__, "use_mercurial", use_mercurial) + GetAppServiceSourceControlResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + branch=branch, + manual_integration=manual_integration, + repo_url=repo_url, + rollback_enabled=rollback_enabled, + use_mercurial=use_mercurial, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + branch: Optional[str] = None, + manual_integration: Optional[bool] = None, + repo_url: Optional[str] = None, + rollback_enabled: Optional[bool] = None, + use_mercurial: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if branch is None: + raise TypeError("Missing 'branch' argument") + if manual_integration is None and 'manualIntegration' in kwargs: + manual_integration = kwargs['manualIntegration'] + if manual_integration is None: + raise TypeError("Missing 'manual_integration' argument") + if repo_url is None and 'repoUrl' in kwargs: + repo_url = kwargs['repoUrl'] + if repo_url is None: + raise TypeError("Missing 'repo_url' argument") + if rollback_enabled is None and 'rollbackEnabled' in kwargs: + rollback_enabled = kwargs['rollbackEnabled'] + if rollback_enabled is None: + raise TypeError("Missing 'rollback_enabled' argument") + if use_mercurial is None and 'useMercurial' in kwargs: + use_mercurial = kwargs['useMercurial'] + if use_mercurial is None: + raise TypeError("Missing 'use_mercurial' argument") + + _setter("branch", branch) + _setter("manual_integration", manual_integration) + _setter("repo_url", repo_url) + _setter("rollback_enabled", rollback_enabled) + _setter("use_mercurial", use_mercurial) @property @pulumi.getter @@ -41765,10 +55419,43 @@ def __init__(__self__, *, :param str key_vault_secret_name: Key Vault secret name. :param str provisioning_state: Status of the Key Vault secret. """ - pulumi.set(__self__, "certificate_name", certificate_name) - pulumi.set(__self__, "key_vault_id", key_vault_id) - pulumi.set(__self__, "key_vault_secret_name", key_vault_secret_name) - pulumi.set(__self__, "provisioning_state", provisioning_state) + GetCertificateOrderCertificateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_name=certificate_name, + key_vault_id=key_vault_id, + key_vault_secret_name=key_vault_secret_name, + provisioning_state=provisioning_state, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_name: Optional[str] = None, + key_vault_id: Optional[str] = None, + key_vault_secret_name: Optional[str] = None, + provisioning_state: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_name is None and 'certificateName' in kwargs: + certificate_name = kwargs['certificateName'] + if certificate_name is None: + raise TypeError("Missing 'certificate_name' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if key_vault_secret_name is None and 'keyVaultSecretName' in kwargs: + key_vault_secret_name = kwargs['keyVaultSecretName'] + if key_vault_secret_name is None: + raise TypeError("Missing 'key_vault_secret_name' argument") + if provisioning_state is None and 'provisioningState' in kwargs: + provisioning_state = kwargs['provisioningState'] + if provisioning_state is None: + raise TypeError("Missing 'provisioning_state' argument") + + _setter("certificate_name", certificate_name) + _setter("key_vault_id", key_vault_id) + _setter("key_vault_secret_name", key_vault_secret_name) + _setter("provisioning_state", provisioning_state) @property @pulumi.getter(name="certificateName") @@ -41812,8 +55499,25 @@ def __init__(__self__, *, :param str name: The name of this v3 App Service Environment. :param str value: The value for the Cluster Setting. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetEnvironmentV3ClusterSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -41843,9 +55547,32 @@ def __init__(__self__, *, :param Sequence[str] ip_addresses: A list of IP addresses that network traffic will originate from in CIDR notation. :param Sequence[str] ports: The ports that network traffic will arrive to the App Service Environment V3 on. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "ip_addresses", ip_addresses) - pulumi.set(__self__, "ports", ports) + GetEnvironmentV3InboundNetworkDependencyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + ip_addresses=ip_addresses, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + ip_addresses: Optional[Sequence[str]] = None, + ports: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if ip_addresses is None: + raise TypeError("Missing 'ip_addresses' argument") + if ports is None: + raise TypeError("Missing 'ports' argument") + + _setter("description", description) + _setter("ip_addresses", ip_addresses) + _setter("ports", ports) @property @pulumi.getter @@ -41883,9 +55610,30 @@ def __init__(__self__, *, :param str type: The identity type of the Managed Identity assigned to the Function App. :param str value: The value for the Connection String. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + GetFunctionAppConnectionStringResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -41925,10 +55673,41 @@ def __init__(__self__, *, :param str tenant_id: The ID of the Tenant where the Managed Identity assigned to the Function App is located. :param str type: The identity type of the Managed Identity assigned to the Function App. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetFunctionAppIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -42008,27 +55787,160 @@ def __init__(__self__, *, :param bool vnet_route_all_enabled: (Optional) Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied? :param bool websockets_enabled: Are WebSockets enabled for this App Service? """ - pulumi.set(__self__, "always_on", always_on) - pulumi.set(__self__, "app_scale_limit", app_scale_limit) - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) - pulumi.set(__self__, "cors", cors) - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) - pulumi.set(__self__, "ftps_state", ftps_state) - pulumi.set(__self__, "health_check_path", health_check_path) - pulumi.set(__self__, "http2_enabled", http2_enabled) - pulumi.set(__self__, "ip_restrictions", ip_restrictions) - pulumi.set(__self__, "java_version", java_version) - pulumi.set(__self__, "linux_fx_version", linux_fx_version) - pulumi.set(__self__, "min_tls_version", min_tls_version) - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) - pulumi.set(__self__, "scm_type", scm_type) - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + GetFunctionAppSiteConfigResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + app_scale_limit=app_scale_limit, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + dotnet_framework_version=dotnet_framework_version, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + java_version=java_version, + linux_fx_version=linux_fx_version, + min_tls_version=min_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + app_scale_limit: Optional[int] = None, + auto_swap_slot_name: Optional[str] = None, + cors: Optional['outputs.GetFunctionAppSiteConfigCorsResult'] = None, + dotnet_framework_version: Optional[str] = None, + elastic_instance_minimum: Optional[int] = None, + ftps_state: Optional[str] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.GetFunctionAppSiteConfigIpRestrictionResult']] = None, + java_version: Optional[str] = None, + linux_fx_version: Optional[str] = None, + min_tls_version: Optional[str] = None, + pre_warmed_instance_count: Optional[int] = None, + runtime_scale_monitoring_enabled: Optional[bool] = None, + scm_ip_restrictions: Optional[Sequence['outputs.GetFunctionAppSiteConfigScmIpRestrictionResult']] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker_process: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if always_on is None: + raise TypeError("Missing 'always_on' argument") + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if app_scale_limit is None: + raise TypeError("Missing 'app_scale_limit' argument") + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if auto_swap_slot_name is None: + raise TypeError("Missing 'auto_swap_slot_name' argument") + if cors is None: + raise TypeError("Missing 'cors' argument") + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if dotnet_framework_version is None: + raise TypeError("Missing 'dotnet_framework_version' argument") + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if elastic_instance_minimum is None: + raise TypeError("Missing 'elastic_instance_minimum' argument") + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if ftps_state is None: + raise TypeError("Missing 'ftps_state' argument") + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if health_check_path is None: + raise TypeError("Missing 'health_check_path' argument") + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if http2_enabled is None: + raise TypeError("Missing 'http2_enabled' argument") + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if ip_restrictions is None: + raise TypeError("Missing 'ip_restrictions' argument") + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if java_version is None: + raise TypeError("Missing 'java_version' argument") + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if linux_fx_version is None: + raise TypeError("Missing 'linux_fx_version' argument") + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if min_tls_version is None: + raise TypeError("Missing 'min_tls_version' argument") + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if pre_warmed_instance_count is None: + raise TypeError("Missing 'pre_warmed_instance_count' argument") + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if runtime_scale_monitoring_enabled is None: + raise TypeError("Missing 'runtime_scale_monitoring_enabled' argument") + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_ip_restrictions is None: + raise TypeError("Missing 'scm_ip_restrictions' argument") + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_type is None: + raise TypeError("Missing 'scm_type' argument") + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if scm_use_main_ip_restriction is None: + raise TypeError("Missing 'scm_use_main_ip_restriction' argument") + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if use32_bit_worker_process is None: + raise TypeError("Missing 'use32_bit_worker_process' argument") + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if vnet_route_all_enabled is None: + raise TypeError("Missing 'vnet_route_all_enabled' argument") + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if websockets_enabled is None: + raise TypeError("Missing 'websockets_enabled' argument") + + _setter("always_on", always_on) + _setter("app_scale_limit", app_scale_limit) + _setter("auto_swap_slot_name", auto_swap_slot_name) + _setter("cors", cors) + _setter("dotnet_framework_version", dotnet_framework_version) + _setter("elastic_instance_minimum", elastic_instance_minimum) + _setter("ftps_state", ftps_state) + _setter("health_check_path", health_check_path) + _setter("http2_enabled", http2_enabled) + _setter("ip_restrictions", ip_restrictions) + _setter("java_version", java_version) + _setter("linux_fx_version", linux_fx_version) + _setter("min_tls_version", min_tls_version) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_type", scm_type) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("use32_bit_worker_process", use32_bit_worker_process) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) + _setter("websockets_enabled", websockets_enabled) @property @pulumi.getter(name="alwaysOn") @@ -42198,9 +56110,28 @@ class GetFunctionAppSiteConfigCorsResult(dict): def __init__(__self__, *, allowed_origins: Sequence[str], support_credentials: Optional[bool] = None): - pulumi.set(__self__, "allowed_origins", allowed_origins) + GetFunctionAppSiteConfigCorsResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -42231,13 +56162,56 @@ def __init__(__self__, *, :param str service_tag: The Service Tag used for this IP Restriction. :param str virtual_network_subnet_id: The Virtual Network Subnet ID used for this IP Restriction. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "service_tag", service_tag) - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + GetFunctionAppSiteConfigIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.GetFunctionAppSiteConfigIpRestrictionHeadersResult'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if service_tag is None: + raise TypeError("Missing 'service_tag' argument") + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if virtual_network_subnet_id is None: + raise TypeError("Missing 'virtual_network_subnet_id' argument") + + _setter("action", action) + _setter("headers", headers) + _setter("ip_address", ip_address) + _setter("name", name) + _setter("priority", priority) + _setter("service_tag", service_tag) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -42300,10 +56274,43 @@ def __init__(__self__, *, x_fd_health_probes: Sequence[str], x_forwarded_fors: Sequence[str], x_forwarded_hosts: Sequence[str]): - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) - pulumi.set(__self__, "x_fd_health_probes", x_fd_health_probes) - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + GetFunctionAppSiteConfigIpRestrictionHeadersResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probes=x_fd_health_probes, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probes: Optional[Sequence[str]] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_azure_fdids is None: + raise TypeError("Missing 'x_azure_fdids' argument") + if x_fd_health_probes is None and 'xFdHealthProbes' in kwargs: + x_fd_health_probes = kwargs['xFdHealthProbes'] + if x_fd_health_probes is None: + raise TypeError("Missing 'x_fd_health_probes' argument") + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_fors is None: + raise TypeError("Missing 'x_forwarded_fors' argument") + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_forwarded_hosts is None: + raise TypeError("Missing 'x_forwarded_hosts' argument") + + _setter("x_azure_fdids", x_azure_fdids) + _setter("x_fd_health_probes", x_fd_health_probes) + _setter("x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -42344,13 +56351,56 @@ def __init__(__self__, *, :param str service_tag: The Service Tag used for this IP Restriction. :param str virtual_network_subnet_id: The Virtual Network Subnet ID used for this IP Restriction. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "service_tag", service_tag) - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + GetFunctionAppSiteConfigScmIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.GetFunctionAppSiteConfigScmIpRestrictionHeadersResult'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if service_tag is None: + raise TypeError("Missing 'service_tag' argument") + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if virtual_network_subnet_id is None: + raise TypeError("Missing 'virtual_network_subnet_id' argument") + + _setter("action", action) + _setter("headers", headers) + _setter("ip_address", ip_address) + _setter("name", name) + _setter("priority", priority) + _setter("service_tag", service_tag) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -42413,10 +56463,43 @@ def __init__(__self__, *, x_fd_health_probes: Sequence[str], x_forwarded_fors: Sequence[str], x_forwarded_hosts: Sequence[str]): - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) - pulumi.set(__self__, "x_fd_health_probes", x_fd_health_probes) - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + GetFunctionAppSiteConfigScmIpRestrictionHeadersResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probes=x_fd_health_probes, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probes: Optional[Sequence[str]] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_azure_fdids is None: + raise TypeError("Missing 'x_azure_fdids' argument") + if x_fd_health_probes is None and 'xFdHealthProbes' in kwargs: + x_fd_health_probes = kwargs['xFdHealthProbes'] + if x_fd_health_probes is None: + raise TypeError("Missing 'x_fd_health_probes' argument") + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_fors is None: + raise TypeError("Missing 'x_forwarded_fors' argument") + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_forwarded_hosts is None: + raise TypeError("Missing 'x_forwarded_hosts' argument") + + _setter("x_azure_fdids", x_azure_fdids) + _setter("x_fd_health_probes", x_fd_health_probes) + _setter("x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -42448,8 +56531,25 @@ def __init__(__self__, *, :param str password: The password associated with the username, which can be used to publish to this App Service. :param str username: The username which can be used to publish to this App Service """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + GetFunctionAppSiteCredentialResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -42483,11 +56583,48 @@ def __init__(__self__, *, :param bool rollback_enabled: Is roll-back enabled for the repository. :param bool use_mercurial: Uses Mercurial if `true`, otherwise uses Git. """ - pulumi.set(__self__, "branch", branch) - pulumi.set(__self__, "manual_integration", manual_integration) - pulumi.set(__self__, "repo_url", repo_url) - pulumi.set(__self__, "rollback_enabled", rollback_enabled) - pulumi.set(__self__, "use_mercurial", use_mercurial) + GetFunctionAppSourceControlResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + branch=branch, + manual_integration=manual_integration, + repo_url=repo_url, + rollback_enabled=rollback_enabled, + use_mercurial=use_mercurial, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + branch: Optional[str] = None, + manual_integration: Optional[bool] = None, + repo_url: Optional[str] = None, + rollback_enabled: Optional[bool] = None, + use_mercurial: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if branch is None: + raise TypeError("Missing 'branch' argument") + if manual_integration is None and 'manualIntegration' in kwargs: + manual_integration = kwargs['manualIntegration'] + if manual_integration is None: + raise TypeError("Missing 'manual_integration' argument") + if repo_url is None and 'repoUrl' in kwargs: + repo_url = kwargs['repoUrl'] + if repo_url is None: + raise TypeError("Missing 'repo_url' argument") + if rollback_enabled is None and 'rollbackEnabled' in kwargs: + rollback_enabled = kwargs['rollbackEnabled'] + if rollback_enabled is None: + raise TypeError("Missing 'rollback_enabled' argument") + if use_mercurial is None and 'useMercurial' in kwargs: + use_mercurial = kwargs['useMercurial'] + if use_mercurial is None: + raise TypeError("Missing 'use_mercurial' argument") + + _setter("branch", branch) + _setter("manual_integration", manual_integration) + _setter("repo_url", repo_url) + _setter("rollback_enabled", rollback_enabled) + _setter("use_mercurial", use_mercurial) @property @pulumi.getter @@ -42565,21 +56702,106 @@ def __init__(__self__, *, :param Sequence['GetLinuxFunctionAppAuthSettingTwitterArgs'] twitters: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to taken when an unauthenticated client attempts to access the app. """ - pulumi.set(__self__, "active_directories", active_directories) - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) - pulumi.set(__self__, "default_provider", default_provider) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "facebooks", facebooks) - pulumi.set(__self__, "githubs", githubs) - pulumi.set(__self__, "googles", googles) - pulumi.set(__self__, "issuer", issuer) - pulumi.set(__self__, "microsofts", microsofts) - pulumi.set(__self__, "runtime_version", runtime_version) - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) - pulumi.set(__self__, "token_store_enabled", token_store_enabled) - pulumi.set(__self__, "twitters", twitters) - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + GetLinuxFunctionAppAuthSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directories=active_directories, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + enabled=enabled, + facebooks=facebooks, + githubs=githubs, + googles=googles, + issuer=issuer, + microsofts=microsofts, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitters=twitters, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directories: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingActiveDirectoryResult']] = None, + additional_login_parameters: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + enabled: Optional[bool] = None, + facebooks: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingFacebookResult']] = None, + githubs: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingGithubResult']] = None, + googles: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingGoogleResult']] = None, + issuer: Optional[str] = None, + microsofts: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingMicrosoftResult']] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitters: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingTwitterResult']] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directories is None and 'activeDirectories' in kwargs: + active_directories = kwargs['activeDirectories'] + if active_directories is None: + raise TypeError("Missing 'active_directories' argument") + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if additional_login_parameters is None: + raise TypeError("Missing 'additional_login_parameters' argument") + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if allowed_external_redirect_urls is None: + raise TypeError("Missing 'allowed_external_redirect_urls' argument") + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if default_provider is None: + raise TypeError("Missing 'default_provider' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if facebooks is None: + raise TypeError("Missing 'facebooks' argument") + if githubs is None: + raise TypeError("Missing 'githubs' argument") + if googles is None: + raise TypeError("Missing 'googles' argument") + if issuer is None: + raise TypeError("Missing 'issuer' argument") + if microsofts is None: + raise TypeError("Missing 'microsofts' argument") + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if runtime_version is None: + raise TypeError("Missing 'runtime_version' argument") + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_refresh_extension_hours is None: + raise TypeError("Missing 'token_refresh_extension_hours' argument") + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_enabled is None: + raise TypeError("Missing 'token_store_enabled' argument") + if twitters is None: + raise TypeError("Missing 'twitters' argument") + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + if unauthenticated_client_action is None: + raise TypeError("Missing 'unauthenticated_client_action' argument") + + _setter("active_directories", active_directories) + _setter("additional_login_parameters", additional_login_parameters) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("default_provider", default_provider) + _setter("enabled", enabled) + _setter("facebooks", facebooks) + _setter("githubs", githubs) + _setter("googles", googles) + _setter("issuer", issuer) + _setter("microsofts", microsofts) + _setter("runtime_version", runtime_version) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_store_enabled", token_store_enabled) + _setter("twitters", twitters) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter(name="activeDirectories") @@ -42715,10 +56937,43 @@ def __init__(__self__, *, :param str client_secret: The OAuth 2.0 client secret that was created for the app used for authentication. :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. """ - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + GetLinuxFunctionAppAuthSettingActiveDirectoryResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_audiences=allowed_audiences, + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_audiences: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + + _setter("allowed_audiences", allowed_audiences) + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="allowedAudiences") @@ -42766,10 +57021,43 @@ def __init__(__self__, *, :param str app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret", app_secret) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetLinuxFunctionAppAuthSettingFacebookResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret is None: + raise TypeError("Missing 'app_secret' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("app_id", app_id) + _setter("app_secret", app_secret) + _setter("app_secret_setting_name", app_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -42817,10 +57105,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetLinuxFunctionAppAuthSettingGithubResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -42868,10 +57189,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetLinuxFunctionAppAuthSettingGoogleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -42919,10 +57273,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetLinuxFunctionAppAuthSettingMicrosoftResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -42968,9 +57355,36 @@ def __init__(__self__, *, :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret", consumer_secret) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + GetLinuxFunctionAppAuthSettingTwitterResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret is None: + raise TypeError("Missing 'consumer_secret' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret", consumer_secret) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -43046,28 +57460,167 @@ def __init__(__self__, *, :param Sequence['GetLinuxFunctionAppAuthSettingsV2TwitterV2Args'] twitter_v2s: A `twitter_v2` block as defined below. :param str unauthenticated_action: The action to take for requests made without authentication. """ - pulumi.set(__self__, "active_directory_v2s", active_directory_v2s) - pulumi.set(__self__, "apple_v2s", apple_v2s) - pulumi.set(__self__, "auth_enabled", auth_enabled) - pulumi.set(__self__, "azure_static_web_app_v2s", azure_static_web_app_v2s) - pulumi.set(__self__, "config_file_path", config_file_path) - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) - pulumi.set(__self__, "default_provider", default_provider) - pulumi.set(__self__, "excluded_paths", excluded_paths) - pulumi.set(__self__, "facebook_v2s", facebook_v2s) - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) - pulumi.set(__self__, "github_v2s", github_v2s) - pulumi.set(__self__, "google_v2s", google_v2s) - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) - pulumi.set(__self__, "logins", logins) - pulumi.set(__self__, "microsoft_v2s", microsoft_v2s) - pulumi.set(__self__, "require_authentication", require_authentication) - pulumi.set(__self__, "require_https", require_https) - pulumi.set(__self__, "runtime_version", runtime_version) - pulumi.set(__self__, "twitter_v2s", twitter_v2s) - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + GetLinuxFunctionAppAuthSettingsV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directory_v2s=active_directory_v2s, + apple_v2s=apple_v2s, + auth_enabled=auth_enabled, + azure_static_web_app_v2s=azure_static_web_app_v2s, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2s=facebook_v2s, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2s=github_v2s, + google_v2s=google_v2s, + http_route_api_prefix=http_route_api_prefix, + logins=logins, + microsoft_v2s=microsoft_v2s, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2s=twitter_v2s, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directory_v2s: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingsV2ActiveDirectoryV2Result']] = None, + apple_v2s: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingsV2AppleV2Result']] = None, + auth_enabled: Optional[bool] = None, + azure_static_web_app_v2s: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingsV2AzureStaticWebAppV2Result']] = None, + config_file_path: Optional[str] = None, + custom_oidc_v2s: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingsV2CustomOidcV2Result']] = None, + default_provider: Optional[str] = None, + excluded_paths: Optional[Sequence[str]] = None, + facebook_v2s: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingsV2FacebookV2Result']] = None, + forward_proxy_convention: Optional[str] = None, + forward_proxy_custom_host_header_name: Optional[str] = None, + forward_proxy_custom_scheme_header_name: Optional[str] = None, + github_v2s: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingsV2GithubV2Result']] = None, + google_v2s: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingsV2GoogleV2Result']] = None, + http_route_api_prefix: Optional[str] = None, + logins: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingsV2LoginResult']] = None, + microsoft_v2s: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingsV2MicrosoftV2Result']] = None, + require_authentication: Optional[bool] = None, + require_https: Optional[bool] = None, + runtime_version: Optional[str] = None, + twitter_v2s: Optional[Sequence['outputs.GetLinuxFunctionAppAuthSettingsV2TwitterV2Result']] = None, + unauthenticated_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directory_v2s is None and 'activeDirectoryV2s' in kwargs: + active_directory_v2s = kwargs['activeDirectoryV2s'] + if active_directory_v2s is None: + raise TypeError("Missing 'active_directory_v2s' argument") + if apple_v2s is None and 'appleV2s' in kwargs: + apple_v2s = kwargs['appleV2s'] + if apple_v2s is None: + raise TypeError("Missing 'apple_v2s' argument") + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if auth_enabled is None: + raise TypeError("Missing 'auth_enabled' argument") + if azure_static_web_app_v2s is None and 'azureStaticWebAppV2s' in kwargs: + azure_static_web_app_v2s = kwargs['azureStaticWebAppV2s'] + if azure_static_web_app_v2s is None: + raise TypeError("Missing 'azure_static_web_app_v2s' argument") + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if config_file_path is None: + raise TypeError("Missing 'config_file_path' argument") + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if custom_oidc_v2s is None: + raise TypeError("Missing 'custom_oidc_v2s' argument") + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if default_provider is None: + raise TypeError("Missing 'default_provider' argument") + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if excluded_paths is None: + raise TypeError("Missing 'excluded_paths' argument") + if facebook_v2s is None and 'facebookV2s' in kwargs: + facebook_v2s = kwargs['facebookV2s'] + if facebook_v2s is None: + raise TypeError("Missing 'facebook_v2s' argument") + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_convention is None: + raise TypeError("Missing 'forward_proxy_convention' argument") + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_host_header_name is None: + raise TypeError("Missing 'forward_proxy_custom_host_header_name' argument") + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if forward_proxy_custom_scheme_header_name is None: + raise TypeError("Missing 'forward_proxy_custom_scheme_header_name' argument") + if github_v2s is None and 'githubV2s' in kwargs: + github_v2s = kwargs['githubV2s'] + if github_v2s is None: + raise TypeError("Missing 'github_v2s' argument") + if google_v2s is None and 'googleV2s' in kwargs: + google_v2s = kwargs['googleV2s'] + if google_v2s is None: + raise TypeError("Missing 'google_v2s' argument") + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if http_route_api_prefix is None: + raise TypeError("Missing 'http_route_api_prefix' argument") + if logins is None: + raise TypeError("Missing 'logins' argument") + if microsoft_v2s is None and 'microsoftV2s' in kwargs: + microsoft_v2s = kwargs['microsoftV2s'] + if microsoft_v2s is None: + raise TypeError("Missing 'microsoft_v2s' argument") + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_authentication is None: + raise TypeError("Missing 'require_authentication' argument") + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if require_https is None: + raise TypeError("Missing 'require_https' argument") + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if runtime_version is None: + raise TypeError("Missing 'runtime_version' argument") + if twitter_v2s is None and 'twitterV2s' in kwargs: + twitter_v2s = kwargs['twitterV2s'] + if twitter_v2s is None: + raise TypeError("Missing 'twitter_v2s' argument") + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + if unauthenticated_action is None: + raise TypeError("Missing 'unauthenticated_action' argument") + + _setter("active_directory_v2s", active_directory_v2s) + _setter("apple_v2s", apple_v2s) + _setter("auth_enabled", auth_enabled) + _setter("azure_static_web_app_v2s", azure_static_web_app_v2s) + _setter("config_file_path", config_file_path) + _setter("custom_oidc_v2s", custom_oidc_v2s) + _setter("default_provider", default_provider) + _setter("excluded_paths", excluded_paths) + _setter("facebook_v2s", facebook_v2s) + _setter("forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("github_v2s", github_v2s) + _setter("google_v2s", google_v2s) + _setter("http_route_api_prefix", http_route_api_prefix) + _setter("logins", logins) + _setter("microsoft_v2s", microsoft_v2s) + _setter("require_authentication", require_authentication) + _setter("require_https", require_https) + _setter("runtime_version", runtime_version) + _setter("twitter_v2s", twitter_v2s) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter(name="activeDirectoryV2s") @@ -43275,18 +57828,99 @@ def __init__(__self__, *, :param str tenant_auth_endpoint: The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/` :param bool www_authentication_disabled: Is the www-authenticate provider omitted from the request? """ - pulumi.set(__self__, "allowed_applications", allowed_applications) - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "allowed_groups", allowed_groups) - pulumi.set(__self__, "allowed_identities", allowed_identities) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) - pulumi.set(__self__, "login_parameters", login_parameters) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + GetLinuxFunctionAppAuthSettingsV2ActiveDirectoryV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_id=client_id, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + tenant_auth_endpoint=tenant_auth_endpoint, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_applications: Optional[Sequence[str]] = None, + allowed_audiences: Optional[Sequence[str]] = None, + allowed_groups: Optional[Sequence[str]] = None, + allowed_identities: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + jwt_allowed_client_applications: Optional[Sequence[str]] = None, + jwt_allowed_groups: Optional[Sequence[str]] = None, + login_parameters: Optional[Mapping[str, str]] = None, + tenant_auth_endpoint: Optional[str] = None, + www_authentication_disabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_applications is None: + raise TypeError("Missing 'allowed_applications' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_groups is None: + raise TypeError("Missing 'allowed_groups' argument") + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if allowed_identities is None: + raise TypeError("Missing 'allowed_identities' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_certificate_thumbprint is None: + raise TypeError("Missing 'client_secret_certificate_thumbprint' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_client_applications is None: + raise TypeError("Missing 'jwt_allowed_client_applications' argument") + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if jwt_allowed_groups is None: + raise TypeError("Missing 'jwt_allowed_groups' argument") + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if login_parameters is None: + raise TypeError("Missing 'login_parameters' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + if www_authentication_disabled is None: + raise TypeError("Missing 'www_authentication_disabled' argument") + + _setter("allowed_applications", allowed_applications) + _setter("allowed_audiences", allowed_audiences) + _setter("allowed_groups", allowed_groups) + _setter("allowed_identities", allowed_identities) + _setter("client_id", client_id) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_groups", jwt_allowed_groups) + _setter("login_parameters", login_parameters) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="allowedApplications") @@ -43396,9 +58030,36 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetLinuxFunctionAppAuthSettingsV2AppleV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -43432,7 +58093,22 @@ def __init__(__self__, *, """ :param str client_id: The OAuth 2.0 client ID that was created for the app used for authentication. """ - pulumi.set(__self__, "client_id", client_id) + GetLinuxFunctionAppAuthSettingsV2AzureStaticWebAppV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -43470,17 +58146,88 @@ def __init__(__self__, *, :param Sequence[str] scopes: The list of the scopes that are requested while authenticating. :param str token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) - pulumi.set(__self__, "certification_uri", certification_uri) - pulumi.set(__self__, "client_credential_method", client_credential_method) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "name_claim_type", name_claim_type) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) - pulumi.set(__self__, "scopes", scopes) - pulumi.set(__self__, "token_endpoint", token_endpoint) + GetLinuxFunctionAppAuthSettingsV2CustomOidcV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name=name, + name_claim_type=name_claim_type, + openid_configuration_endpoint=openid_configuration_endpoint, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorisation_endpoint: Optional[str] = None, + certification_uri: Optional[str] = None, + client_credential_method: Optional[str] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + issuer_endpoint: Optional[str] = None, + name: Optional[str] = None, + name_claim_type: Optional[str] = None, + openid_configuration_endpoint: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + token_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if authorisation_endpoint is None: + raise TypeError("Missing 'authorisation_endpoint' argument") + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if certification_uri is None: + raise TypeError("Missing 'certification_uri' argument") + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_credential_method is None: + raise TypeError("Missing 'client_credential_method' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if issuer_endpoint is None: + raise TypeError("Missing 'issuer_endpoint' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if name_claim_type is None: + raise TypeError("Missing 'name_claim_type' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if scopes is None: + raise TypeError("Missing 'scopes' argument") + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + if token_endpoint is None: + raise TypeError("Missing 'token_endpoint' argument") + + _setter("authorisation_endpoint", authorisation_endpoint) + _setter("certification_uri", certification_uri) + _setter("client_credential_method", client_credential_method) + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("issuer_endpoint", issuer_endpoint) + _setter("name", name) + _setter("name_claim_type", name_claim_type) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) + _setter("scopes", scopes) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="authorisationEndpoint") @@ -43584,10 +58331,43 @@ def __init__(__self__, *, :param str graph_api_version: The version of the Facebook API to be used while logging in. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) - pulumi.set(__self__, "graph_api_version", graph_api_version) - pulumi.set(__self__, "login_scopes", login_scopes) + GetLinuxFunctionAppAuthSettingsV2FacebookV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + graph_api_version: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if graph_api_version is None: + raise TypeError("Missing 'graph_api_version' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) + _setter("graph_api_version", graph_api_version) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -43633,9 +58413,36 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetLinuxFunctionAppAuthSettingsV2GithubV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -43675,10 +58482,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetLinuxFunctionAppAuthSettingsV2GoogleV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_audiences=allowed_audiences, + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_audiences: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("allowed_audiences", allowed_audiences) + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="allowedAudiences") @@ -43740,17 +58580,92 @@ def __init__(__self__, *, :param str token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param bool validate_nonce: Is the nonce validated while completing the login flow. """ - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) - pulumi.set(__self__, "logout_endpoint", logout_endpoint) - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) - pulumi.set(__self__, "token_store_enabled", token_store_enabled) - pulumi.set(__self__, "token_store_path", token_store_path) - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) - pulumi.set(__self__, "validate_nonce", validate_nonce) + GetLinuxFunctionAppAuthSettingsV2LoginResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + cookie_expiration_convention: Optional[str] = None, + cookie_expiration_time: Optional[str] = None, + logout_endpoint: Optional[str] = None, + nonce_expiration_time: Optional[str] = None, + preserve_url_fragments_for_logins: Optional[bool] = None, + token_refresh_extension_time: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + token_store_path: Optional[str] = None, + token_store_sas_setting_name: Optional[str] = None, + validate_nonce: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if allowed_external_redirect_urls is None: + raise TypeError("Missing 'allowed_external_redirect_urls' argument") + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_convention is None: + raise TypeError("Missing 'cookie_expiration_convention' argument") + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if cookie_expiration_time is None: + raise TypeError("Missing 'cookie_expiration_time' argument") + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if logout_endpoint is None: + raise TypeError("Missing 'logout_endpoint' argument") + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if nonce_expiration_time is None: + raise TypeError("Missing 'nonce_expiration_time' argument") + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if preserve_url_fragments_for_logins is None: + raise TypeError("Missing 'preserve_url_fragments_for_logins' argument") + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_refresh_extension_time is None: + raise TypeError("Missing 'token_refresh_extension_time' argument") + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_enabled is None: + raise TypeError("Missing 'token_store_enabled' argument") + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_path is None: + raise TypeError("Missing 'token_store_path' argument") + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if token_store_sas_setting_name is None: + raise TypeError("Missing 'token_store_sas_setting_name' argument") + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if validate_nonce is None: + raise TypeError("Missing 'validate_nonce' argument") + + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_time", cookie_expiration_time) + _setter("logout_endpoint", logout_endpoint) + _setter("nonce_expiration_time", nonce_expiration_time) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("token_refresh_extension_time", token_refresh_extension_time) + _setter("token_store_enabled", token_store_enabled) + _setter("token_store_path", token_store_path) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -43854,10 +58769,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetLinuxFunctionAppAuthSettingsV2MicrosoftV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_audiences=allowed_audiences, + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_audiences: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("allowed_audiences", allowed_audiences) + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="allowedAudiences") @@ -43901,8 +58849,29 @@ def __init__(__self__, *, :param str consumer_key: The OAuth 1.0a consumer key of the Twitter application used for sign-in. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + GetLinuxFunctionAppAuthSettingsV2TwitterV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -43934,10 +58903,37 @@ def __init__(__self__, *, :param Sequence['GetLinuxFunctionAppBackupScheduleArgs'] schedules: A `schedule` block as defined below. :param str storage_account_url: The SAS URL to the container. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "storage_account_url", storage_account_url) + GetLinuxFunctionAppBackupResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + name=name, + schedules=schedules, + storage_account_url=storage_account_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + name: Optional[str] = None, + schedules: Optional[Sequence['outputs.GetLinuxFunctionAppBackupScheduleResult']] = None, + storage_account_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("enabled", enabled) + _setter("name", name) + _setter("schedules", schedules) + _setter("storage_account_url", storage_account_url) @property @pulumi.getter @@ -43988,12 +58984,57 @@ def __init__(__self__, *, :param int retention_period_days: After how many days backups are deleted. :param str start_time: When the schedule starts working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) - pulumi.set(__self__, "last_execution_time", last_execution_time) - pulumi.set(__self__, "retention_period_days", retention_period_days) - pulumi.set(__self__, "start_time", start_time) + GetLinuxFunctionAppBackupScheduleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[int] = None, + frequency_unit: Optional[str] = None, + keep_at_least_one_backup: Optional[bool] = None, + last_execution_time: Optional[str] = None, + retention_period_days: Optional[int] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if keep_at_least_one_backup is None: + raise TypeError("Missing 'keep_at_least_one_backup' argument") + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if last_execution_time is None: + raise TypeError("Missing 'last_execution_time' argument") + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if retention_period_days is None: + raise TypeError("Missing 'retention_period_days' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) + _setter("last_execution_time", last_execution_time) + _setter("retention_period_days", retention_period_days) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -44052,9 +59093,30 @@ def __init__(__self__, *, :param str type: The type of Managed Service Identity that is configured on this Linux Function App. :param str value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + GetLinuxFunctionAppConnectionStringResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -44094,10 +59156,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Linux Function App. :param str type: The type of Managed Service Identity that is configured on this Linux Function App. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetLinuxFunctionAppIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -44206,42 +59299,265 @@ def __init__(__self__, *, :param bool websockets_enabled: Are Web Sockets enabled? :param int worker_count: The number of Workers for this Linux Function App. """ - pulumi.set(__self__, "always_on", always_on) - pulumi.set(__self__, "api_definition_url", api_definition_url) - pulumi.set(__self__, "api_management_api_id", api_management_api_id) - pulumi.set(__self__, "app_command_line", app_command_line) - pulumi.set(__self__, "app_scale_limit", app_scale_limit) - pulumi.set(__self__, "app_service_logs", app_service_logs) - pulumi.set(__self__, "application_insights_connection_string", application_insights_connection_string) - pulumi.set(__self__, "application_insights_key", application_insights_key) - pulumi.set(__self__, "application_stacks", application_stacks) - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) - pulumi.set(__self__, "cors", cors) - pulumi.set(__self__, "default_documents", default_documents) - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) - pulumi.set(__self__, "ftps_state", ftps_state) - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) - pulumi.set(__self__, "health_check_path", health_check_path) - pulumi.set(__self__, "http2_enabled", http2_enabled) - pulumi.set(__self__, "ip_restrictions", ip_restrictions) - pulumi.set(__self__, "linux_fx_version", linux_fx_version) - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) - pulumi.set(__self__, "scm_type", scm_type) - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) - pulumi.set(__self__, "websockets_enabled", websockets_enabled) - pulumi.set(__self__, "worker_count", worker_count) + GetLinuxFunctionAppSiteConfigResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + app_scale_limit=app_scale_limit, + app_service_logs=app_service_logs, + application_insights_connection_string=application_insights_connection_string, + application_insights_key=application_insights_key, + application_stacks=application_stacks, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + load_balancing_mode=load_balancing_mode, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + api_definition_url: Optional[str] = None, + api_management_api_id: Optional[str] = None, + app_command_line: Optional[str] = None, + app_scale_limit: Optional[int] = None, + app_service_logs: Optional[Sequence['outputs.GetLinuxFunctionAppSiteConfigAppServiceLogResult']] = None, + application_insights_connection_string: Optional[str] = None, + application_insights_key: Optional[str] = None, + application_stacks: Optional[Sequence['outputs.GetLinuxFunctionAppSiteConfigApplicationStackResult']] = None, + container_registry_managed_identity_client_id: Optional[str] = None, + container_registry_use_managed_identity: Optional[bool] = None, + cors: Optional[Sequence['outputs.GetLinuxFunctionAppSiteConfigCorResult']] = None, + default_documents: Optional[Sequence[str]] = None, + detailed_error_logging_enabled: Optional[bool] = None, + elastic_instance_minimum: Optional[int] = None, + ftps_state: Optional[str] = None, + health_check_eviction_time_in_min: Optional[int] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.GetLinuxFunctionAppSiteConfigIpRestrictionResult']] = None, + linux_fx_version: Optional[str] = None, + load_balancing_mode: Optional[str] = None, + managed_pipeline_mode: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + pre_warmed_instance_count: Optional[int] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + runtime_scale_monitoring_enabled: Optional[bool] = None, + scm_ip_restrictions: Optional[Sequence['outputs.GetLinuxFunctionAppSiteConfigScmIpRestrictionResult']] = None, + scm_minimum_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + worker_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if always_on is None: + raise TypeError("Missing 'always_on' argument") + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_definition_url is None: + raise TypeError("Missing 'api_definition_url' argument") + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if api_management_api_id is None: + raise TypeError("Missing 'api_management_api_id' argument") + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if app_command_line is None: + raise TypeError("Missing 'app_command_line' argument") + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if app_scale_limit is None: + raise TypeError("Missing 'app_scale_limit' argument") + if app_service_logs is None and 'appServiceLogs' in kwargs: + app_service_logs = kwargs['appServiceLogs'] + if app_service_logs is None: + raise TypeError("Missing 'app_service_logs' argument") + if application_insights_connection_string is None and 'applicationInsightsConnectionString' in kwargs: + application_insights_connection_string = kwargs['applicationInsightsConnectionString'] + if application_insights_connection_string is None: + raise TypeError("Missing 'application_insights_connection_string' argument") + if application_insights_key is None and 'applicationInsightsKey' in kwargs: + application_insights_key = kwargs['applicationInsightsKey'] + if application_insights_key is None: + raise TypeError("Missing 'application_insights_key' argument") + if application_stacks is None and 'applicationStacks' in kwargs: + application_stacks = kwargs['applicationStacks'] + if application_stacks is None: + raise TypeError("Missing 'application_stacks' argument") + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_managed_identity_client_id is None: + raise TypeError("Missing 'container_registry_managed_identity_client_id' argument") + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if container_registry_use_managed_identity is None: + raise TypeError("Missing 'container_registry_use_managed_identity' argument") + if cors is None: + raise TypeError("Missing 'cors' argument") + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if default_documents is None: + raise TypeError("Missing 'default_documents' argument") + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if detailed_error_logging_enabled is None: + raise TypeError("Missing 'detailed_error_logging_enabled' argument") + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if elastic_instance_minimum is None: + raise TypeError("Missing 'elastic_instance_minimum' argument") + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if ftps_state is None: + raise TypeError("Missing 'ftps_state' argument") + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_eviction_time_in_min is None: + raise TypeError("Missing 'health_check_eviction_time_in_min' argument") + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if health_check_path is None: + raise TypeError("Missing 'health_check_path' argument") + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if http2_enabled is None: + raise TypeError("Missing 'http2_enabled' argument") + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if ip_restrictions is None: + raise TypeError("Missing 'ip_restrictions' argument") + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if linux_fx_version is None: + raise TypeError("Missing 'linux_fx_version' argument") + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if load_balancing_mode is None: + raise TypeError("Missing 'load_balancing_mode' argument") + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if managed_pipeline_mode is None: + raise TypeError("Missing 'managed_pipeline_mode' argument") + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if minimum_tls_version is None: + raise TypeError("Missing 'minimum_tls_version' argument") + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if pre_warmed_instance_count is None: + raise TypeError("Missing 'pre_warmed_instance_count' argument") + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_enabled is None: + raise TypeError("Missing 'remote_debugging_enabled' argument") + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if remote_debugging_version is None: + raise TypeError("Missing 'remote_debugging_version' argument") + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if runtime_scale_monitoring_enabled is None: + raise TypeError("Missing 'runtime_scale_monitoring_enabled' argument") + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_ip_restrictions is None: + raise TypeError("Missing 'scm_ip_restrictions' argument") + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_minimum_tls_version is None: + raise TypeError("Missing 'scm_minimum_tls_version' argument") + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_type is None: + raise TypeError("Missing 'scm_type' argument") + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if scm_use_main_ip_restriction is None: + raise TypeError("Missing 'scm_use_main_ip_restriction' argument") + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if use32_bit_worker is None: + raise TypeError("Missing 'use32_bit_worker' argument") + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if vnet_route_all_enabled is None: + raise TypeError("Missing 'vnet_route_all_enabled' argument") + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if websockets_enabled is None: + raise TypeError("Missing 'websockets_enabled' argument") + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if worker_count is None: + raise TypeError("Missing 'worker_count' argument") + + _setter("always_on", always_on) + _setter("api_definition_url", api_definition_url) + _setter("api_management_api_id", api_management_api_id) + _setter("app_command_line", app_command_line) + _setter("app_scale_limit", app_scale_limit) + _setter("app_service_logs", app_service_logs) + _setter("application_insights_connection_string", application_insights_connection_string) + _setter("application_insights_key", application_insights_key) + _setter("application_stacks", application_stacks) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("cors", cors) + _setter("default_documents", default_documents) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("elastic_instance_minimum", elastic_instance_minimum) + _setter("ftps_state", ftps_state) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_path", health_check_path) + _setter("http2_enabled", http2_enabled) + _setter("ip_restrictions", ip_restrictions) + _setter("linux_fx_version", linux_fx_version) + _setter("load_balancing_mode", load_balancing_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) + _setter("minimum_tls_version", minimum_tls_version) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) + _setter("remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_version", remote_debugging_version) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_type", scm_type) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("use32_bit_worker", use32_bit_worker) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) + _setter("websockets_enabled", websockets_enabled) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -44532,8 +59848,29 @@ def __init__(__self__, *, :param int disk_quota_mb: The amount of disk space used for logs. :param int retention_period_days: After how many days backups are deleted. """ - pulumi.set(__self__, "disk_quota_mb", disk_quota_mb) - pulumi.set(__self__, "retention_period_days", retention_period_days) + GetLinuxFunctionAppSiteConfigAppServiceLogResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_quota_mb=disk_quota_mb, + retention_period_days=retention_period_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_quota_mb: Optional[int] = None, + retention_period_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_quota_mb is None and 'diskQuotaMb' in kwargs: + disk_quota_mb = kwargs['diskQuotaMb'] + if disk_quota_mb is None: + raise TypeError("Missing 'disk_quota_mb' argument") + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if retention_period_days is None: + raise TypeError("Missing 'retention_period_days' argument") + + _setter("disk_quota_mb", disk_quota_mb) + _setter("retention_period_days", retention_period_days) @property @pulumi.getter(name="diskQuotaMb") @@ -44572,14 +59909,69 @@ def __init__(__self__, *, :param str python_version: The version of Python used. :param bool use_custom_runtime: Does the Linux Function App use a custom runtime? """ - pulumi.set(__self__, "dockers", dockers) - pulumi.set(__self__, "dotnet_version", dotnet_version) - pulumi.set(__self__, "java_version", java_version) - pulumi.set(__self__, "node_version", node_version) - pulumi.set(__self__, "powershell_core_version", powershell_core_version) - pulumi.set(__self__, "python_version", python_version) - pulumi.set(__self__, "use_custom_runtime", use_custom_runtime) - pulumi.set(__self__, "use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) + GetLinuxFunctionAppSiteConfigApplicationStackResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + dockers=dockers, + dotnet_version=dotnet_version, + java_version=java_version, + node_version=node_version, + powershell_core_version=powershell_core_version, + python_version=python_version, + use_custom_runtime=use_custom_runtime, + use_dotnet_isolated_runtime=use_dotnet_isolated_runtime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dockers: Optional[Sequence['outputs.GetLinuxFunctionAppSiteConfigApplicationStackDockerResult']] = None, + dotnet_version: Optional[str] = None, + java_version: Optional[str] = None, + node_version: Optional[str] = None, + powershell_core_version: Optional[str] = None, + python_version: Optional[str] = None, + use_custom_runtime: Optional[bool] = None, + use_dotnet_isolated_runtime: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dockers is None: + raise TypeError("Missing 'dockers' argument") + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if dotnet_version is None: + raise TypeError("Missing 'dotnet_version' argument") + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if java_version is None: + raise TypeError("Missing 'java_version' argument") + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if node_version is None: + raise TypeError("Missing 'node_version' argument") + if powershell_core_version is None and 'powershellCoreVersion' in kwargs: + powershell_core_version = kwargs['powershellCoreVersion'] + if powershell_core_version is None: + raise TypeError("Missing 'powershell_core_version' argument") + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if python_version is None: + raise TypeError("Missing 'python_version' argument") + if use_custom_runtime is None and 'useCustomRuntime' in kwargs: + use_custom_runtime = kwargs['useCustomRuntime'] + if use_custom_runtime is None: + raise TypeError("Missing 'use_custom_runtime' argument") + if use_dotnet_isolated_runtime is None and 'useDotnetIsolatedRuntime' in kwargs: + use_dotnet_isolated_runtime = kwargs['useDotnetIsolatedRuntime'] + if use_dotnet_isolated_runtime is None: + raise TypeError("Missing 'use_dotnet_isolated_runtime' argument") + + _setter("dockers", dockers) + _setter("dotnet_version", dotnet_version) + _setter("java_version", java_version) + _setter("node_version", node_version) + _setter("powershell_core_version", powershell_core_version) + _setter("python_version", python_version) + _setter("use_custom_runtime", use_custom_runtime) + _setter("use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) @property @pulumi.getter @@ -44658,11 +60050,50 @@ def __init__(__self__, *, :param str registry_url: The URL of the docker registry. :param str registry_username: The username used for connections to the registry. """ - pulumi.set(__self__, "image_name", image_name) - pulumi.set(__self__, "image_tag", image_tag) - pulumi.set(__self__, "registry_password", registry_password) - pulumi.set(__self__, "registry_url", registry_url) - pulumi.set(__self__, "registry_username", registry_username) + GetLinuxFunctionAppSiteConfigApplicationStackDockerResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + image_name=image_name, + image_tag=image_tag, + registry_password=registry_password, + registry_url=registry_url, + registry_username=registry_username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image_name: Optional[str] = None, + image_tag: Optional[str] = None, + registry_password: Optional[str] = None, + registry_url: Optional[str] = None, + registry_username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if image_name is None: + raise TypeError("Missing 'image_name' argument") + if image_tag is None and 'imageTag' in kwargs: + image_tag = kwargs['imageTag'] + if image_tag is None: + raise TypeError("Missing 'image_tag' argument") + if registry_password is None and 'registryPassword' in kwargs: + registry_password = kwargs['registryPassword'] + if registry_password is None: + raise TypeError("Missing 'registry_password' argument") + if registry_url is None and 'registryUrl' in kwargs: + registry_url = kwargs['registryUrl'] + if registry_url is None: + raise TypeError("Missing 'registry_url' argument") + if registry_username is None and 'registryUsername' in kwargs: + registry_username = kwargs['registryUsername'] + if registry_username is None: + raise TypeError("Missing 'registry_username' argument") + + _setter("image_name", image_name) + _setter("image_tag", image_tag) + _setter("registry_password", registry_password) + _setter("registry_url", registry_url) + _setter("registry_username", registry_username) @property @pulumi.getter(name="imageName") @@ -44714,8 +60145,29 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: A list of origins that are allowed to make cross-origin calls. :param bool support_credentials: Are credentials allowed in CORS requests? """ - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "support_credentials", support_credentials) + GetLinuxFunctionAppSiteConfigCorResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if support_credentials is None: + raise TypeError("Missing 'support_credentials' argument") + + _setter("allowed_origins", allowed_origins) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -44753,13 +60205,56 @@ def __init__(__self__, *, :param str service_tag: The Service Tag used for this IP Restriction. :param str virtual_network_subnet_id: The Virtual Network Subnet ID used for this IP Restriction. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "service_tag", service_tag) - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + GetLinuxFunctionAppSiteConfigIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional[Sequence['outputs.GetLinuxFunctionAppSiteConfigIpRestrictionHeaderResult']] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if service_tag is None: + raise TypeError("Missing 'service_tag' argument") + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if virtual_network_subnet_id is None: + raise TypeError("Missing 'virtual_network_subnet_id' argument") + + _setter("action", action) + _setter("headers", headers) + _setter("ip_address", ip_address) + _setter("name", name) + _setter("priority", priority) + _setter("service_tag", service_tag) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -44831,10 +60326,43 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: A list of addresses for which matching is applied. :param Sequence[str] x_forwarded_hosts: A list of Hosts for which matching is applied. """ - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) - pulumi.set(__self__, "x_fd_health_probes", x_fd_health_probes) - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + GetLinuxFunctionAppSiteConfigIpRestrictionHeaderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probes=x_fd_health_probes, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probes: Optional[Sequence[str]] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_azure_fdids is None: + raise TypeError("Missing 'x_azure_fdids' argument") + if x_fd_health_probes is None and 'xFdHealthProbes' in kwargs: + x_fd_health_probes = kwargs['xFdHealthProbes'] + if x_fd_health_probes is None: + raise TypeError("Missing 'x_fd_health_probes' argument") + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_fors is None: + raise TypeError("Missing 'x_forwarded_fors' argument") + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_forwarded_hosts is None: + raise TypeError("Missing 'x_forwarded_hosts' argument") + + _setter("x_azure_fdids", x_azure_fdids) + _setter("x_fd_health_probes", x_fd_health_probes) + _setter("x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -44888,13 +60416,56 @@ def __init__(__self__, *, :param str service_tag: The Service Tag used for this IP Restriction. :param str virtual_network_subnet_id: The Virtual Network Subnet ID used for this IP Restriction. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "service_tag", service_tag) - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + GetLinuxFunctionAppSiteConfigScmIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional[Sequence['outputs.GetLinuxFunctionAppSiteConfigScmIpRestrictionHeaderResult']] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if service_tag is None: + raise TypeError("Missing 'service_tag' argument") + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if virtual_network_subnet_id is None: + raise TypeError("Missing 'virtual_network_subnet_id' argument") + + _setter("action", action) + _setter("headers", headers) + _setter("ip_address", ip_address) + _setter("name", name) + _setter("priority", priority) + _setter("service_tag", service_tag) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -44966,10 +60537,43 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: A list of addresses for which matching is applied. :param Sequence[str] x_forwarded_hosts: A list of Hosts for which matching is applied. """ - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) - pulumi.set(__self__, "x_fd_health_probes", x_fd_health_probes) - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + GetLinuxFunctionAppSiteConfigScmIpRestrictionHeaderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probes=x_fd_health_probes, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probes: Optional[Sequence[str]] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_azure_fdids is None: + raise TypeError("Missing 'x_azure_fdids' argument") + if x_fd_health_probes is None and 'xFdHealthProbes' in kwargs: + x_fd_health_probes = kwargs['xFdHealthProbes'] + if x_fd_health_probes is None: + raise TypeError("Missing 'x_fd_health_probes' argument") + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_fors is None: + raise TypeError("Missing 'x_forwarded_fors' argument") + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_forwarded_hosts is None: + raise TypeError("Missing 'x_forwarded_hosts' argument") + + _setter("x_azure_fdids", x_azure_fdids) + _setter("x_fd_health_probes", x_fd_health_probes) + _setter("x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -45013,8 +60617,25 @@ def __init__(__self__, *, :param str name: The name which should be used for this Linux Function App. :param str password: The Site Credentials Password used for publishing. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "password", password) + GetLinuxFunctionAppSiteCredentialResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + + _setter("name", name) + _setter("password", password) @property @pulumi.getter @@ -45042,8 +60663,29 @@ def __init__(__self__, *, :param Sequence[str] app_setting_names: A list of `app_setting` names that the Linux Function App will not swap between Slots when a swap operation is triggered. :param Sequence[str] connection_string_names: A list of `connection_string` names that the Linux Function App will not swap between Slots when a swap operation is triggered. """ - pulumi.set(__self__, "app_setting_names", app_setting_names) - pulumi.set(__self__, "connection_string_names", connection_string_names) + GetLinuxFunctionAppStickySettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_setting_names=app_setting_names, + connection_string_names=connection_string_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_setting_names: Optional[Sequence[str]] = None, + connection_string_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_setting_names is None and 'appSettingNames' in kwargs: + app_setting_names = kwargs['appSettingNames'] + if app_setting_names is None: + raise TypeError("Missing 'app_setting_names' argument") + if connection_string_names is None and 'connectionStringNames' in kwargs: + connection_string_names = kwargs['connectionStringNames'] + if connection_string_names is None: + raise TypeError("Missing 'connection_string_names' argument") + + _setter("app_setting_names", app_setting_names) + _setter("connection_string_names", connection_string_names) @property @pulumi.getter(name="appSettingNames") @@ -45097,21 +60739,106 @@ def __init__(__self__, *, :param Sequence['GetLinuxWebAppAuthSettingTwitterArgs'] twitters: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. """ - pulumi.set(__self__, "active_directories", active_directories) - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) - pulumi.set(__self__, "default_provider", default_provider) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "facebooks", facebooks) - pulumi.set(__self__, "githubs", githubs) - pulumi.set(__self__, "googles", googles) - pulumi.set(__self__, "issuer", issuer) - pulumi.set(__self__, "microsofts", microsofts) - pulumi.set(__self__, "runtime_version", runtime_version) - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) - pulumi.set(__self__, "token_store_enabled", token_store_enabled) - pulumi.set(__self__, "twitters", twitters) - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + GetLinuxWebAppAuthSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directories=active_directories, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + enabled=enabled, + facebooks=facebooks, + githubs=githubs, + googles=googles, + issuer=issuer, + microsofts=microsofts, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitters=twitters, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directories: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingActiveDirectoryResult']] = None, + additional_login_parameters: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + enabled: Optional[bool] = None, + facebooks: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingFacebookResult']] = None, + githubs: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingGithubResult']] = None, + googles: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingGoogleResult']] = None, + issuer: Optional[str] = None, + microsofts: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingMicrosoftResult']] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitters: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingTwitterResult']] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directories is None and 'activeDirectories' in kwargs: + active_directories = kwargs['activeDirectories'] + if active_directories is None: + raise TypeError("Missing 'active_directories' argument") + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if additional_login_parameters is None: + raise TypeError("Missing 'additional_login_parameters' argument") + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if allowed_external_redirect_urls is None: + raise TypeError("Missing 'allowed_external_redirect_urls' argument") + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if default_provider is None: + raise TypeError("Missing 'default_provider' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if facebooks is None: + raise TypeError("Missing 'facebooks' argument") + if githubs is None: + raise TypeError("Missing 'githubs' argument") + if googles is None: + raise TypeError("Missing 'googles' argument") + if issuer is None: + raise TypeError("Missing 'issuer' argument") + if microsofts is None: + raise TypeError("Missing 'microsofts' argument") + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if runtime_version is None: + raise TypeError("Missing 'runtime_version' argument") + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_refresh_extension_hours is None: + raise TypeError("Missing 'token_refresh_extension_hours' argument") + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_enabled is None: + raise TypeError("Missing 'token_store_enabled' argument") + if twitters is None: + raise TypeError("Missing 'twitters' argument") + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + if unauthenticated_client_action is None: + raise TypeError("Missing 'unauthenticated_client_action' argument") + + _setter("active_directories", active_directories) + _setter("additional_login_parameters", additional_login_parameters) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("default_provider", default_provider) + _setter("enabled", enabled) + _setter("facebooks", facebooks) + _setter("githubs", githubs) + _setter("googles", googles) + _setter("issuer", issuer) + _setter("microsofts", microsofts) + _setter("runtime_version", runtime_version) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_store_enabled", token_store_enabled) + _setter("twitters", twitters) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter(name="activeDirectories") @@ -45247,10 +60974,43 @@ def __init__(__self__, *, :param str client_secret: The OAuth 2.0 client secret used by the app for authentication. :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. """ - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + GetLinuxWebAppAuthSettingActiveDirectoryResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_audiences=allowed_audiences, + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_audiences: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + + _setter("allowed_audiences", allowed_audiences) + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="allowedAudiences") @@ -45298,10 +61058,43 @@ def __init__(__self__, *, :param str app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret", app_secret) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetLinuxWebAppAuthSettingFacebookResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret is None: + raise TypeError("Missing 'app_secret' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("app_id", app_id) + _setter("app_secret", app_secret) + _setter("app_secret_setting_name", app_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -45349,10 +61142,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetLinuxWebAppAuthSettingGithubResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -45400,10 +61226,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetLinuxWebAppAuthSettingGoogleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -45451,10 +61310,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetLinuxWebAppAuthSettingMicrosoftResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -45500,9 +61392,36 @@ def __init__(__self__, *, :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret", consumer_secret) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + GetLinuxWebAppAuthSettingTwitterResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret is None: + raise TypeError("Missing 'consumer_secret' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret", consumer_secret) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -45578,28 +61497,167 @@ def __init__(__self__, *, :param Sequence['GetLinuxWebAppAuthSettingsV2TwitterV2Args'] twitter_v2s: A `twitter_v2` block as defined below. :param str unauthenticated_action: The action to take for requests made without authentication. """ - pulumi.set(__self__, "active_directory_v2s", active_directory_v2s) - pulumi.set(__self__, "apple_v2s", apple_v2s) - pulumi.set(__self__, "auth_enabled", auth_enabled) - pulumi.set(__self__, "azure_static_web_app_v2s", azure_static_web_app_v2s) - pulumi.set(__self__, "config_file_path", config_file_path) - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) - pulumi.set(__self__, "default_provider", default_provider) - pulumi.set(__self__, "excluded_paths", excluded_paths) - pulumi.set(__self__, "facebook_v2s", facebook_v2s) - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) - pulumi.set(__self__, "github_v2s", github_v2s) - pulumi.set(__self__, "google_v2s", google_v2s) - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) - pulumi.set(__self__, "logins", logins) - pulumi.set(__self__, "microsoft_v2s", microsoft_v2s) - pulumi.set(__self__, "require_authentication", require_authentication) - pulumi.set(__self__, "require_https", require_https) - pulumi.set(__self__, "runtime_version", runtime_version) - pulumi.set(__self__, "twitter_v2s", twitter_v2s) - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + GetLinuxWebAppAuthSettingsV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directory_v2s=active_directory_v2s, + apple_v2s=apple_v2s, + auth_enabled=auth_enabled, + azure_static_web_app_v2s=azure_static_web_app_v2s, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2s=facebook_v2s, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2s=github_v2s, + google_v2s=google_v2s, + http_route_api_prefix=http_route_api_prefix, + logins=logins, + microsoft_v2s=microsoft_v2s, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2s=twitter_v2s, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directory_v2s: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingsV2ActiveDirectoryV2Result']] = None, + apple_v2s: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingsV2AppleV2Result']] = None, + auth_enabled: Optional[bool] = None, + azure_static_web_app_v2s: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingsV2AzureStaticWebAppV2Result']] = None, + config_file_path: Optional[str] = None, + custom_oidc_v2s: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingsV2CustomOidcV2Result']] = None, + default_provider: Optional[str] = None, + excluded_paths: Optional[Sequence[str]] = None, + facebook_v2s: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingsV2FacebookV2Result']] = None, + forward_proxy_convention: Optional[str] = None, + forward_proxy_custom_host_header_name: Optional[str] = None, + forward_proxy_custom_scheme_header_name: Optional[str] = None, + github_v2s: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingsV2GithubV2Result']] = None, + google_v2s: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingsV2GoogleV2Result']] = None, + http_route_api_prefix: Optional[str] = None, + logins: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingsV2LoginResult']] = None, + microsoft_v2s: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingsV2MicrosoftV2Result']] = None, + require_authentication: Optional[bool] = None, + require_https: Optional[bool] = None, + runtime_version: Optional[str] = None, + twitter_v2s: Optional[Sequence['outputs.GetLinuxWebAppAuthSettingsV2TwitterV2Result']] = None, + unauthenticated_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directory_v2s is None and 'activeDirectoryV2s' in kwargs: + active_directory_v2s = kwargs['activeDirectoryV2s'] + if active_directory_v2s is None: + raise TypeError("Missing 'active_directory_v2s' argument") + if apple_v2s is None and 'appleV2s' in kwargs: + apple_v2s = kwargs['appleV2s'] + if apple_v2s is None: + raise TypeError("Missing 'apple_v2s' argument") + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if auth_enabled is None: + raise TypeError("Missing 'auth_enabled' argument") + if azure_static_web_app_v2s is None and 'azureStaticWebAppV2s' in kwargs: + azure_static_web_app_v2s = kwargs['azureStaticWebAppV2s'] + if azure_static_web_app_v2s is None: + raise TypeError("Missing 'azure_static_web_app_v2s' argument") + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if config_file_path is None: + raise TypeError("Missing 'config_file_path' argument") + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if custom_oidc_v2s is None: + raise TypeError("Missing 'custom_oidc_v2s' argument") + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if default_provider is None: + raise TypeError("Missing 'default_provider' argument") + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if excluded_paths is None: + raise TypeError("Missing 'excluded_paths' argument") + if facebook_v2s is None and 'facebookV2s' in kwargs: + facebook_v2s = kwargs['facebookV2s'] + if facebook_v2s is None: + raise TypeError("Missing 'facebook_v2s' argument") + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_convention is None: + raise TypeError("Missing 'forward_proxy_convention' argument") + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_host_header_name is None: + raise TypeError("Missing 'forward_proxy_custom_host_header_name' argument") + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if forward_proxy_custom_scheme_header_name is None: + raise TypeError("Missing 'forward_proxy_custom_scheme_header_name' argument") + if github_v2s is None and 'githubV2s' in kwargs: + github_v2s = kwargs['githubV2s'] + if github_v2s is None: + raise TypeError("Missing 'github_v2s' argument") + if google_v2s is None and 'googleV2s' in kwargs: + google_v2s = kwargs['googleV2s'] + if google_v2s is None: + raise TypeError("Missing 'google_v2s' argument") + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if http_route_api_prefix is None: + raise TypeError("Missing 'http_route_api_prefix' argument") + if logins is None: + raise TypeError("Missing 'logins' argument") + if microsoft_v2s is None and 'microsoftV2s' in kwargs: + microsoft_v2s = kwargs['microsoftV2s'] + if microsoft_v2s is None: + raise TypeError("Missing 'microsoft_v2s' argument") + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_authentication is None: + raise TypeError("Missing 'require_authentication' argument") + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if require_https is None: + raise TypeError("Missing 'require_https' argument") + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if runtime_version is None: + raise TypeError("Missing 'runtime_version' argument") + if twitter_v2s is None and 'twitterV2s' in kwargs: + twitter_v2s = kwargs['twitterV2s'] + if twitter_v2s is None: + raise TypeError("Missing 'twitter_v2s' argument") + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + if unauthenticated_action is None: + raise TypeError("Missing 'unauthenticated_action' argument") + + _setter("active_directory_v2s", active_directory_v2s) + _setter("apple_v2s", apple_v2s) + _setter("auth_enabled", auth_enabled) + _setter("azure_static_web_app_v2s", azure_static_web_app_v2s) + _setter("config_file_path", config_file_path) + _setter("custom_oidc_v2s", custom_oidc_v2s) + _setter("default_provider", default_provider) + _setter("excluded_paths", excluded_paths) + _setter("facebook_v2s", facebook_v2s) + _setter("forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("github_v2s", github_v2s) + _setter("google_v2s", google_v2s) + _setter("http_route_api_prefix", http_route_api_prefix) + _setter("logins", logins) + _setter("microsoft_v2s", microsoft_v2s) + _setter("require_authentication", require_authentication) + _setter("require_https", require_https) + _setter("runtime_version", runtime_version) + _setter("twitter_v2s", twitter_v2s) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter(name="activeDirectoryV2s") @@ -45807,18 +61865,99 @@ def __init__(__self__, *, :param str tenant_auth_endpoint: The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/` :param bool www_authentication_disabled: Is the www-authenticate provider omitted from the request? """ - pulumi.set(__self__, "allowed_applications", allowed_applications) - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "allowed_groups", allowed_groups) - pulumi.set(__self__, "allowed_identities", allowed_identities) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) - pulumi.set(__self__, "login_parameters", login_parameters) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + GetLinuxWebAppAuthSettingsV2ActiveDirectoryV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_id=client_id, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + tenant_auth_endpoint=tenant_auth_endpoint, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_applications: Optional[Sequence[str]] = None, + allowed_audiences: Optional[Sequence[str]] = None, + allowed_groups: Optional[Sequence[str]] = None, + allowed_identities: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + jwt_allowed_client_applications: Optional[Sequence[str]] = None, + jwt_allowed_groups: Optional[Sequence[str]] = None, + login_parameters: Optional[Mapping[str, str]] = None, + tenant_auth_endpoint: Optional[str] = None, + www_authentication_disabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_applications is None: + raise TypeError("Missing 'allowed_applications' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_groups is None: + raise TypeError("Missing 'allowed_groups' argument") + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if allowed_identities is None: + raise TypeError("Missing 'allowed_identities' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_certificate_thumbprint is None: + raise TypeError("Missing 'client_secret_certificate_thumbprint' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_client_applications is None: + raise TypeError("Missing 'jwt_allowed_client_applications' argument") + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if jwt_allowed_groups is None: + raise TypeError("Missing 'jwt_allowed_groups' argument") + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if login_parameters is None: + raise TypeError("Missing 'login_parameters' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + if www_authentication_disabled is None: + raise TypeError("Missing 'www_authentication_disabled' argument") + + _setter("allowed_applications", allowed_applications) + _setter("allowed_audiences", allowed_audiences) + _setter("allowed_groups", allowed_groups) + _setter("allowed_identities", allowed_identities) + _setter("client_id", client_id) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_groups", jwt_allowed_groups) + _setter("login_parameters", login_parameters) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="allowedApplications") @@ -45928,9 +62067,36 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetLinuxWebAppAuthSettingsV2AppleV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -45964,7 +62130,22 @@ def __init__(__self__, *, """ :param str client_id: The OAuth 2.0 client ID used by the app for authentication. """ - pulumi.set(__self__, "client_id", client_id) + GetLinuxWebAppAuthSettingsV2AzureStaticWebAppV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -46002,17 +62183,88 @@ def __init__(__self__, *, :param Sequence[str] scopes: The list of the scopes that are requested while authenticating. :param str token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) - pulumi.set(__self__, "certification_uri", certification_uri) - pulumi.set(__self__, "client_credential_method", client_credential_method) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "name_claim_type", name_claim_type) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) - pulumi.set(__self__, "scopes", scopes) - pulumi.set(__self__, "token_endpoint", token_endpoint) + GetLinuxWebAppAuthSettingsV2CustomOidcV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name=name, + name_claim_type=name_claim_type, + openid_configuration_endpoint=openid_configuration_endpoint, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorisation_endpoint: Optional[str] = None, + certification_uri: Optional[str] = None, + client_credential_method: Optional[str] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + issuer_endpoint: Optional[str] = None, + name: Optional[str] = None, + name_claim_type: Optional[str] = None, + openid_configuration_endpoint: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + token_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if authorisation_endpoint is None: + raise TypeError("Missing 'authorisation_endpoint' argument") + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if certification_uri is None: + raise TypeError("Missing 'certification_uri' argument") + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_credential_method is None: + raise TypeError("Missing 'client_credential_method' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if issuer_endpoint is None: + raise TypeError("Missing 'issuer_endpoint' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if name_claim_type is None: + raise TypeError("Missing 'name_claim_type' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if scopes is None: + raise TypeError("Missing 'scopes' argument") + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + if token_endpoint is None: + raise TypeError("Missing 'token_endpoint' argument") + + _setter("authorisation_endpoint", authorisation_endpoint) + _setter("certification_uri", certification_uri) + _setter("client_credential_method", client_credential_method) + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("issuer_endpoint", issuer_endpoint) + _setter("name", name) + _setter("name_claim_type", name_claim_type) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) + _setter("scopes", scopes) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="authorisationEndpoint") @@ -46116,10 +62368,43 @@ def __init__(__self__, *, :param str graph_api_version: The version of the Facebook API to be used while logging in. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) - pulumi.set(__self__, "graph_api_version", graph_api_version) - pulumi.set(__self__, "login_scopes", login_scopes) + GetLinuxWebAppAuthSettingsV2FacebookV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + graph_api_version: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if graph_api_version is None: + raise TypeError("Missing 'graph_api_version' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) + _setter("graph_api_version", graph_api_version) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -46165,9 +62450,36 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetLinuxWebAppAuthSettingsV2GithubV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -46207,10 +62519,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetLinuxWebAppAuthSettingsV2GoogleV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_audiences=allowed_audiences, + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_audiences: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("allowed_audiences", allowed_audiences) + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="allowedAudiences") @@ -46272,17 +62617,92 @@ def __init__(__self__, *, :param str token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param bool validate_nonce: Is the nonce validated while completing the login flow. """ - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) - pulumi.set(__self__, "logout_endpoint", logout_endpoint) - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) - pulumi.set(__self__, "token_store_enabled", token_store_enabled) - pulumi.set(__self__, "token_store_path", token_store_path) - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) - pulumi.set(__self__, "validate_nonce", validate_nonce) + GetLinuxWebAppAuthSettingsV2LoginResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + cookie_expiration_convention: Optional[str] = None, + cookie_expiration_time: Optional[str] = None, + logout_endpoint: Optional[str] = None, + nonce_expiration_time: Optional[str] = None, + preserve_url_fragments_for_logins: Optional[bool] = None, + token_refresh_extension_time: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + token_store_path: Optional[str] = None, + token_store_sas_setting_name: Optional[str] = None, + validate_nonce: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if allowed_external_redirect_urls is None: + raise TypeError("Missing 'allowed_external_redirect_urls' argument") + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_convention is None: + raise TypeError("Missing 'cookie_expiration_convention' argument") + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if cookie_expiration_time is None: + raise TypeError("Missing 'cookie_expiration_time' argument") + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if logout_endpoint is None: + raise TypeError("Missing 'logout_endpoint' argument") + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if nonce_expiration_time is None: + raise TypeError("Missing 'nonce_expiration_time' argument") + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if preserve_url_fragments_for_logins is None: + raise TypeError("Missing 'preserve_url_fragments_for_logins' argument") + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_refresh_extension_time is None: + raise TypeError("Missing 'token_refresh_extension_time' argument") + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_enabled is None: + raise TypeError("Missing 'token_store_enabled' argument") + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_path is None: + raise TypeError("Missing 'token_store_path' argument") + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if token_store_sas_setting_name is None: + raise TypeError("Missing 'token_store_sas_setting_name' argument") + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if validate_nonce is None: + raise TypeError("Missing 'validate_nonce' argument") + + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_time", cookie_expiration_time) + _setter("logout_endpoint", logout_endpoint) + _setter("nonce_expiration_time", nonce_expiration_time) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("token_refresh_extension_time", token_refresh_extension_time) + _setter("token_store_enabled", token_store_enabled) + _setter("token_store_path", token_store_path) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -46386,10 +62806,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetLinuxWebAppAuthSettingsV2MicrosoftV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_audiences=allowed_audiences, + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_audiences: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("allowed_audiences", allowed_audiences) + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="allowedAudiences") @@ -46433,8 +62886,29 @@ def __init__(__self__, *, :param str consumer_key: The OAuth 1.0a consumer key of the Twitter application used for sign-in. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + GetLinuxWebAppAuthSettingsV2TwitterV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -46466,10 +62940,37 @@ def __init__(__self__, *, :param Sequence['GetLinuxWebAppBackupScheduleArgs'] schedules: A `schedule` block as defined below. :param str storage_account_url: The SAS URL to the container. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "storage_account_url", storage_account_url) + GetLinuxWebAppBackupResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + name=name, + schedules=schedules, + storage_account_url=storage_account_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + name: Optional[str] = None, + schedules: Optional[Sequence['outputs.GetLinuxWebAppBackupScheduleResult']] = None, + storage_account_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("enabled", enabled) + _setter("name", name) + _setter("schedules", schedules) + _setter("storage_account_url", storage_account_url) @property @pulumi.getter @@ -46521,12 +63022,57 @@ def __init__(__self__, *, :param int retention_period_days: After how many days backups should be deleted. :param str start_time: When the schedule should start in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) - pulumi.set(__self__, "last_execution_time", last_execution_time) - pulumi.set(__self__, "retention_period_days", retention_period_days) - pulumi.set(__self__, "start_time", start_time) + GetLinuxWebAppBackupScheduleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[int] = None, + frequency_unit: Optional[str] = None, + keep_at_least_one_backup: Optional[bool] = None, + last_execution_time: Optional[str] = None, + retention_period_days: Optional[int] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if keep_at_least_one_backup is None: + raise TypeError("Missing 'keep_at_least_one_backup' argument") + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if last_execution_time is None: + raise TypeError("Missing 'last_execution_time' argument") + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if retention_period_days is None: + raise TypeError("Missing 'retention_period_days' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) + _setter("last_execution_time", last_execution_time) + _setter("retention_period_days", retention_period_days) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -46588,9 +63134,30 @@ def __init__(__self__, *, :param str type: The Azure Storage Type. :param str value: The Connection String value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + GetLinuxWebAppConnectionStringResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -46630,10 +63197,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Linux Web App. :param str type: The Azure Storage Type. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetLinuxWebAppIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -46681,10 +63279,43 @@ def __init__(__self__, *, :param bool failed_request_tracing: Is Failed Request Tracing enabled. :param Sequence['GetLinuxWebAppLogHttpLogArgs'] http_logs: An `http_logs` block as defined above. """ - pulumi.set(__self__, "application_logs", application_logs) - pulumi.set(__self__, "detailed_error_messages", detailed_error_messages) - pulumi.set(__self__, "failed_request_tracing", failed_request_tracing) - pulumi.set(__self__, "http_logs", http_logs) + GetLinuxWebAppLogResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages=detailed_error_messages, + failed_request_tracing=failed_request_tracing, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional[Sequence['outputs.GetLinuxWebAppLogApplicationLogResult']] = None, + detailed_error_messages: Optional[bool] = None, + failed_request_tracing: Optional[bool] = None, + http_logs: Optional[Sequence['outputs.GetLinuxWebAppLogHttpLogResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if application_logs is None: + raise TypeError("Missing 'application_logs' argument") + if detailed_error_messages is None and 'detailedErrorMessages' in kwargs: + detailed_error_messages = kwargs['detailedErrorMessages'] + if detailed_error_messages is None: + raise TypeError("Missing 'detailed_error_messages' argument") + if failed_request_tracing is None and 'failedRequestTracing' in kwargs: + failed_request_tracing = kwargs['failedRequestTracing'] + if failed_request_tracing is None: + raise TypeError("Missing 'failed_request_tracing' argument") + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if http_logs is None: + raise TypeError("Missing 'http_logs' argument") + + _setter("application_logs", application_logs) + _setter("detailed_error_messages", detailed_error_messages) + _setter("failed_request_tracing", failed_request_tracing) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -46728,8 +63359,29 @@ def __init__(__self__, *, :param Sequence['GetLinuxWebAppLogApplicationLogAzureBlobStorageArgs'] azure_blob_storages: A `azure_blob_storage` block as defined above. :param str file_system_level: The logging level. """ - pulumi.set(__self__, "azure_blob_storages", azure_blob_storages) - pulumi.set(__self__, "file_system_level", file_system_level) + GetLinuxWebAppLogApplicationLogResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storages=azure_blob_storages, + file_system_level=file_system_level, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storages: Optional[Sequence['outputs.GetLinuxWebAppLogApplicationLogAzureBlobStorageResult']] = None, + file_system_level: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storages is None and 'azureBlobStorages' in kwargs: + azure_blob_storages = kwargs['azureBlobStorages'] + if azure_blob_storages is None: + raise TypeError("Missing 'azure_blob_storages' argument") + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if file_system_level is None: + raise TypeError("Missing 'file_system_level' argument") + + _setter("azure_blob_storages", azure_blob_storages) + _setter("file_system_level", file_system_level) @property @pulumi.getter(name="azureBlobStorages") @@ -46759,9 +63411,34 @@ def __init__(__self__, *, :param int retention_in_days: The retention period in days. :param str sas_url: The SAS url to an Azure blob container. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + GetLinuxWebAppLogApplicationLogAzureBlobStorageResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[str] = None, + retention_in_days: Optional[int] = None, + sas_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -46797,8 +63474,29 @@ def __init__(__self__, *, :param Sequence['GetLinuxWebAppLogHttpLogAzureBlobStorageArgs'] azure_blob_storages: A `azure_blob_storage` block as defined above. :param Sequence['GetLinuxWebAppLogHttpLogFileSystemArgs'] file_systems: A `file_system` block as defined above. """ - pulumi.set(__self__, "azure_blob_storages", azure_blob_storages) - pulumi.set(__self__, "file_systems", file_systems) + GetLinuxWebAppLogHttpLogResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storages=azure_blob_storages, + file_systems=file_systems, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storages: Optional[Sequence['outputs.GetLinuxWebAppLogHttpLogAzureBlobStorageResult']] = None, + file_systems: Optional[Sequence['outputs.GetLinuxWebAppLogHttpLogFileSystemResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storages is None and 'azureBlobStorages' in kwargs: + azure_blob_storages = kwargs['azureBlobStorages'] + if azure_blob_storages is None: + raise TypeError("Missing 'azure_blob_storages' argument") + if file_systems is None and 'fileSystems' in kwargs: + file_systems = kwargs['fileSystems'] + if file_systems is None: + raise TypeError("Missing 'file_systems' argument") + + _setter("azure_blob_storages", azure_blob_storages) + _setter("file_systems", file_systems) @property @pulumi.getter(name="azureBlobStorages") @@ -46826,8 +63524,29 @@ def __init__(__self__, *, :param int retention_in_days: The retention period in days. :param str sas_url: The SAS url to an Azure blob container. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + GetLinuxWebAppLogHttpLogAzureBlobStorageResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[int] = None, + sas_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter(name="retentionInDays") @@ -46855,8 +63574,29 @@ def __init__(__self__, *, :param int retention_in_days: The retention period in days. :param int retention_in_mb: The maximum size in megabytes that log files can use. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + GetLinuxWebAppLogHttpLogFileSystemResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[int] = None, + retention_in_mb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -46944,38 +63684,237 @@ def __init__(__self__, *, :param bool websockets_enabled: Are Web Sockets enabled? :param int worker_count: The number of Workers for this Linux App Service. """ - pulumi.set(__self__, "always_on", always_on) - pulumi.set(__self__, "api_definition_url", api_definition_url) - pulumi.set(__self__, "api_management_api_id", api_management_api_id) - pulumi.set(__self__, "app_command_line", app_command_line) - pulumi.set(__self__, "application_stacks", application_stacks) - pulumi.set(__self__, "auto_heal_enabled", auto_heal_enabled) - pulumi.set(__self__, "auto_heal_settings", auto_heal_settings) - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) - pulumi.set(__self__, "cors", cors) - pulumi.set(__self__, "default_documents", default_documents) - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) - pulumi.set(__self__, "ftps_state", ftps_state) - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) - pulumi.set(__self__, "health_check_path", health_check_path) - pulumi.set(__self__, "http2_enabled", http2_enabled) - pulumi.set(__self__, "ip_restrictions", ip_restrictions) - pulumi.set(__self__, "linux_fx_version", linux_fx_version) - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) - pulumi.set(__self__, "scm_type", scm_type) - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) - pulumi.set(__self__, "websockets_enabled", websockets_enabled) - pulumi.set(__self__, "worker_count", worker_count) + GetLinuxWebAppSiteConfigResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + application_stacks=application_stacks, + auto_heal_enabled=auto_heal_enabled, + auto_heal_settings=auto_heal_settings, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + load_balancing_mode=load_balancing_mode, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + api_definition_url: Optional[str] = None, + api_management_api_id: Optional[str] = None, + app_command_line: Optional[str] = None, + application_stacks: Optional[Sequence['outputs.GetLinuxWebAppSiteConfigApplicationStackResult']] = None, + auto_heal_enabled: Optional[bool] = None, + auto_heal_settings: Optional[Sequence['outputs.GetLinuxWebAppSiteConfigAutoHealSettingResult']] = None, + container_registry_managed_identity_client_id: Optional[str] = None, + container_registry_use_managed_identity: Optional[bool] = None, + cors: Optional[Sequence['outputs.GetLinuxWebAppSiteConfigCorResult']] = None, + default_documents: Optional[Sequence[str]] = None, + detailed_error_logging_enabled: Optional[bool] = None, + ftps_state: Optional[str] = None, + health_check_eviction_time_in_min: Optional[int] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.GetLinuxWebAppSiteConfigIpRestrictionResult']] = None, + linux_fx_version: Optional[str] = None, + load_balancing_mode: Optional[str] = None, + local_mysql_enabled: Optional[bool] = None, + managed_pipeline_mode: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + scm_ip_restrictions: Optional[Sequence['outputs.GetLinuxWebAppSiteConfigScmIpRestrictionResult']] = None, + scm_minimum_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + worker_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if always_on is None: + raise TypeError("Missing 'always_on' argument") + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_definition_url is None: + raise TypeError("Missing 'api_definition_url' argument") + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if api_management_api_id is None: + raise TypeError("Missing 'api_management_api_id' argument") + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if app_command_line is None: + raise TypeError("Missing 'app_command_line' argument") + if application_stacks is None and 'applicationStacks' in kwargs: + application_stacks = kwargs['applicationStacks'] + if application_stacks is None: + raise TypeError("Missing 'application_stacks' argument") + if auto_heal_enabled is None and 'autoHealEnabled' in kwargs: + auto_heal_enabled = kwargs['autoHealEnabled'] + if auto_heal_enabled is None: + raise TypeError("Missing 'auto_heal_enabled' argument") + if auto_heal_settings is None and 'autoHealSettings' in kwargs: + auto_heal_settings = kwargs['autoHealSettings'] + if auto_heal_settings is None: + raise TypeError("Missing 'auto_heal_settings' argument") + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_managed_identity_client_id is None: + raise TypeError("Missing 'container_registry_managed_identity_client_id' argument") + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if container_registry_use_managed_identity is None: + raise TypeError("Missing 'container_registry_use_managed_identity' argument") + if cors is None: + raise TypeError("Missing 'cors' argument") + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if default_documents is None: + raise TypeError("Missing 'default_documents' argument") + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if detailed_error_logging_enabled is None: + raise TypeError("Missing 'detailed_error_logging_enabled' argument") + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if ftps_state is None: + raise TypeError("Missing 'ftps_state' argument") + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_eviction_time_in_min is None: + raise TypeError("Missing 'health_check_eviction_time_in_min' argument") + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if health_check_path is None: + raise TypeError("Missing 'health_check_path' argument") + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if http2_enabled is None: + raise TypeError("Missing 'http2_enabled' argument") + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if ip_restrictions is None: + raise TypeError("Missing 'ip_restrictions' argument") + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if linux_fx_version is None: + raise TypeError("Missing 'linux_fx_version' argument") + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if load_balancing_mode is None: + raise TypeError("Missing 'load_balancing_mode' argument") + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if local_mysql_enabled is None: + raise TypeError("Missing 'local_mysql_enabled' argument") + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if managed_pipeline_mode is None: + raise TypeError("Missing 'managed_pipeline_mode' argument") + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if minimum_tls_version is None: + raise TypeError("Missing 'minimum_tls_version' argument") + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_enabled is None: + raise TypeError("Missing 'remote_debugging_enabled' argument") + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if remote_debugging_version is None: + raise TypeError("Missing 'remote_debugging_version' argument") + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_ip_restrictions is None: + raise TypeError("Missing 'scm_ip_restrictions' argument") + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_minimum_tls_version is None: + raise TypeError("Missing 'scm_minimum_tls_version' argument") + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_type is None: + raise TypeError("Missing 'scm_type' argument") + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if scm_use_main_ip_restriction is None: + raise TypeError("Missing 'scm_use_main_ip_restriction' argument") + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if use32_bit_worker is None: + raise TypeError("Missing 'use32_bit_worker' argument") + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if vnet_route_all_enabled is None: + raise TypeError("Missing 'vnet_route_all_enabled' argument") + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if websockets_enabled is None: + raise TypeError("Missing 'websockets_enabled' argument") + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if worker_count is None: + raise TypeError("Missing 'worker_count' argument") + + _setter("always_on", always_on) + _setter("api_definition_url", api_definition_url) + _setter("api_management_api_id", api_management_api_id) + _setter("app_command_line", app_command_line) + _setter("application_stacks", application_stacks) + _setter("auto_heal_enabled", auto_heal_enabled) + _setter("auto_heal_settings", auto_heal_settings) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("cors", cors) + _setter("default_documents", default_documents) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("ftps_state", ftps_state) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_path", health_check_path) + _setter("http2_enabled", http2_enabled) + _setter("ip_restrictions", ip_restrictions) + _setter("linux_fx_version", linux_fx_version) + _setter("load_balancing_mode", load_balancing_mode) + _setter("local_mysql_enabled", local_mysql_enabled) + _setter("managed_pipeline_mode", managed_pipeline_mode) + _setter("minimum_tls_version", minimum_tls_version) + _setter("remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_version", remote_debugging_version) + _setter("scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_type", scm_type) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("use32_bit_worker", use32_bit_worker) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) + _setter("websockets_enabled", websockets_enabled) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -47266,21 +64205,120 @@ def __init__(__self__, *, :param str python_version: The version of Python in use. :param str ruby_version: The version of Ruby in use. """ - pulumi.set(__self__, "docker_image", docker_image) - pulumi.set(__self__, "docker_image_name", docker_image_name) - pulumi.set(__self__, "docker_image_tag", docker_image_tag) - pulumi.set(__self__, "docker_registry_password", docker_registry_password) - pulumi.set(__self__, "docker_registry_url", docker_registry_url) - pulumi.set(__self__, "docker_registry_username", docker_registry_username) - pulumi.set(__self__, "dotnet_version", dotnet_version) - pulumi.set(__self__, "go_version", go_version) - pulumi.set(__self__, "java_server", java_server) - pulumi.set(__self__, "java_server_version", java_server_version) - pulumi.set(__self__, "java_version", java_version) - pulumi.set(__self__, "node_version", node_version) - pulumi.set(__self__, "php_version", php_version) - pulumi.set(__self__, "python_version", python_version) - pulumi.set(__self__, "ruby_version", ruby_version) + GetLinuxWebAppSiteConfigApplicationStackResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + docker_image=docker_image, + docker_image_name=docker_image_name, + docker_image_tag=docker_image_tag, + docker_registry_password=docker_registry_password, + docker_registry_url=docker_registry_url, + docker_registry_username=docker_registry_username, + dotnet_version=dotnet_version, + go_version=go_version, + java_server=java_server, + java_server_version=java_server_version, + java_version=java_version, + node_version=node_version, + php_version=php_version, + python_version=python_version, + ruby_version=ruby_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + docker_image: Optional[str] = None, + docker_image_name: Optional[str] = None, + docker_image_tag: Optional[str] = None, + docker_registry_password: Optional[str] = None, + docker_registry_url: Optional[str] = None, + docker_registry_username: Optional[str] = None, + dotnet_version: Optional[str] = None, + go_version: Optional[str] = None, + java_server: Optional[str] = None, + java_server_version: Optional[str] = None, + java_version: Optional[str] = None, + node_version: Optional[str] = None, + php_version: Optional[str] = None, + python_version: Optional[str] = None, + ruby_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if docker_image is None and 'dockerImage' in kwargs: + docker_image = kwargs['dockerImage'] + if docker_image is None: + raise TypeError("Missing 'docker_image' argument") + if docker_image_name is None and 'dockerImageName' in kwargs: + docker_image_name = kwargs['dockerImageName'] + if docker_image_name is None: + raise TypeError("Missing 'docker_image_name' argument") + if docker_image_tag is None and 'dockerImageTag' in kwargs: + docker_image_tag = kwargs['dockerImageTag'] + if docker_image_tag is None: + raise TypeError("Missing 'docker_image_tag' argument") + if docker_registry_password is None and 'dockerRegistryPassword' in kwargs: + docker_registry_password = kwargs['dockerRegistryPassword'] + if docker_registry_password is None: + raise TypeError("Missing 'docker_registry_password' argument") + if docker_registry_url is None and 'dockerRegistryUrl' in kwargs: + docker_registry_url = kwargs['dockerRegistryUrl'] + if docker_registry_url is None: + raise TypeError("Missing 'docker_registry_url' argument") + if docker_registry_username is None and 'dockerRegistryUsername' in kwargs: + docker_registry_username = kwargs['dockerRegistryUsername'] + if docker_registry_username is None: + raise TypeError("Missing 'docker_registry_username' argument") + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if dotnet_version is None: + raise TypeError("Missing 'dotnet_version' argument") + if go_version is None and 'goVersion' in kwargs: + go_version = kwargs['goVersion'] + if go_version is None: + raise TypeError("Missing 'go_version' argument") + if java_server is None and 'javaServer' in kwargs: + java_server = kwargs['javaServer'] + if java_server is None: + raise TypeError("Missing 'java_server' argument") + if java_server_version is None and 'javaServerVersion' in kwargs: + java_server_version = kwargs['javaServerVersion'] + if java_server_version is None: + raise TypeError("Missing 'java_server_version' argument") + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if java_version is None: + raise TypeError("Missing 'java_version' argument") + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if node_version is None: + raise TypeError("Missing 'node_version' argument") + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if php_version is None: + raise TypeError("Missing 'php_version' argument") + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if python_version is None: + raise TypeError("Missing 'python_version' argument") + if ruby_version is None and 'rubyVersion' in kwargs: + ruby_version = kwargs['rubyVersion'] + if ruby_version is None: + raise TypeError("Missing 'ruby_version' argument") + + _setter("docker_image", docker_image) + _setter("docker_image_name", docker_image_name) + _setter("docker_image_tag", docker_image_tag) + _setter("docker_registry_password", docker_registry_password) + _setter("docker_registry_url", docker_registry_url) + _setter("docker_registry_username", docker_registry_username) + _setter("dotnet_version", dotnet_version) + _setter("go_version", go_version) + _setter("java_server", java_server) + _setter("java_server_version", java_server_version) + _setter("java_version", java_version) + _setter("node_version", node_version) + _setter("php_version", php_version) + _setter("python_version", python_version) + _setter("ruby_version", ruby_version) @property @pulumi.getter(name="dockerImage") @@ -47403,8 +64441,25 @@ def __init__(__self__, *, :param Sequence['GetLinuxWebAppSiteConfigAutoHealSettingActionArgs'] actions: A `action` block as defined above. :param Sequence['GetLinuxWebAppSiteConfigAutoHealSettingTriggerArgs'] triggers: A `trigger` block as defined below. """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "triggers", triggers) + GetLinuxWebAppSiteConfigAutoHealSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + triggers=triggers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[Sequence['outputs.GetLinuxWebAppSiteConfigAutoHealSettingActionResult']] = None, + triggers: Optional[Sequence['outputs.GetLinuxWebAppSiteConfigAutoHealSettingTriggerResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if triggers is None: + raise TypeError("Missing 'triggers' argument") + + _setter("actions", actions) + _setter("triggers", triggers) @property @pulumi.getter @@ -47432,8 +64487,29 @@ def __init__(__self__, *, :param str action_type: The predefined action to be taken to an Auto Heal trigger. :param str minimum_process_execution_time: The minimum amount of time in `hh:mm:ss` the Linux Web App must have been running before the defined action will be run in the event of a trigger. """ - pulumi.set(__self__, "action_type", action_type) - pulumi.set(__self__, "minimum_process_execution_time", minimum_process_execution_time) + GetLinuxWebAppSiteConfigAutoHealSettingActionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + minimum_process_execution_time=minimum_process_execution_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[str] = None, + minimum_process_execution_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + if minimum_process_execution_time is None and 'minimumProcessExecutionTime' in kwargs: + minimum_process_execution_time = kwargs['minimumProcessExecutionTime'] + if minimum_process_execution_time is None: + raise TypeError("Missing 'minimum_process_execution_time' argument") + + _setter("action_type", action_type) + _setter("minimum_process_execution_time", minimum_process_execution_time) @property @pulumi.getter(name="actionType") @@ -47463,10 +64539,33 @@ def __init__(__self__, *, :param Sequence['GetLinuxWebAppSiteConfigAutoHealSettingTriggerStatusCodeArgs'] status_codes: A `status_code` block as defined above. :param Sequence['GetLinuxWebAppSiteConfigAutoHealSettingTriggerSlowRequestArgs'] slow_requests: A `slow_request` block as defined above. """ - pulumi.set(__self__, "requests", requests) - pulumi.set(__self__, "status_codes", status_codes) + GetLinuxWebAppSiteConfigAutoHealSettingTriggerResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + requests=requests, + status_codes=status_codes, + slow_requests=slow_requests, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + requests: Optional[Sequence['outputs.GetLinuxWebAppSiteConfigAutoHealSettingTriggerRequestResult']] = None, + status_codes: Optional[Sequence['outputs.GetLinuxWebAppSiteConfigAutoHealSettingTriggerStatusCodeResult']] = None, + slow_requests: Optional[Sequence['outputs.GetLinuxWebAppSiteConfigAutoHealSettingTriggerSlowRequestResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if requests is None: + raise TypeError("Missing 'requests' argument") + if status_codes is None and 'statusCodes' in kwargs: + status_codes = kwargs['statusCodes'] + if status_codes is None: + raise TypeError("Missing 'status_codes' argument") + if slow_requests is None and 'slowRequests' in kwargs: + slow_requests = kwargs['slowRequests'] + + _setter("requests", requests) + _setter("status_codes", status_codes) if slow_requests is not None: - pulumi.set(__self__, "slow_requests", slow_requests) + _setter("slow_requests", slow_requests) @property @pulumi.getter @@ -47502,8 +64601,25 @@ def __init__(__self__, *, :param int count: The number of occurrences of the defined `status_code` in the specified `interval` on which to trigger this rule. :param str interval: The time interval in the form `hh:mm:ss`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) + GetLinuxWebAppSiteConfigAutoHealSettingTriggerRequestResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + + _setter("count", count) + _setter("interval", interval) @property @pulumi.getter @@ -47535,10 +64651,37 @@ def __init__(__self__, *, :param str path: The path to which this rule status code applies. :param str time_taken: The amount of time that qualifies as slow for this rule. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "time_taken", time_taken) + GetLinuxWebAppSiteConfigAutoHealSettingTriggerSlowRequestResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + path=path, + time_taken=time_taken, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + path: Optional[str] = None, + time_taken: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if time_taken is None and 'timeTaken' in kwargs: + time_taken = kwargs['timeTaken'] + if time_taken is None: + raise TypeError("Missing 'time_taken' argument") + + _setter("count", count) + _setter("interval", interval) + _setter("path", path) + _setter("time_taken", time_taken) @property @pulumi.getter @@ -47590,12 +64733,51 @@ def __init__(__self__, *, :param int sub_status: The Request Sub Status of the Status Code. :param int win32_status_code: The Win32 Status Code of the Request. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "status_code_range", status_code_range) - pulumi.set(__self__, "sub_status", sub_status) - pulumi.set(__self__, "win32_status_code", win32_status_code) + GetLinuxWebAppSiteConfigAutoHealSettingTriggerStatusCodeResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + path=path, + status_code_range=status_code_range, + sub_status=sub_status, + win32_status_code=win32_status_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + path: Optional[str] = None, + status_code_range: Optional[str] = None, + sub_status: Optional[int] = None, + win32_status_code: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if status_code_range is None and 'statusCodeRange' in kwargs: + status_code_range = kwargs['statusCodeRange'] + if status_code_range is None: + raise TypeError("Missing 'status_code_range' argument") + if sub_status is None and 'subStatus' in kwargs: + sub_status = kwargs['subStatus'] + if sub_status is None: + raise TypeError("Missing 'sub_status' argument") + if win32_status_code is None and 'win32StatusCode' in kwargs: + win32_status_code = kwargs['win32StatusCode'] + if win32_status_code is None: + raise TypeError("Missing 'win32_status_code' argument") + + _setter("count", count) + _setter("interval", interval) + _setter("path", path) + _setter("status_code_range", status_code_range) + _setter("sub_status", sub_status) + _setter("win32_status_code", win32_status_code) @property @pulumi.getter @@ -47655,8 +64837,29 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: A list of origins that should be allowed to make cross-origin calls. :param bool support_credentials: Whether CORS requests with credentials are allowed. """ - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "support_credentials", support_credentials) + GetLinuxWebAppSiteConfigCorResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if support_credentials is None: + raise TypeError("Missing 'support_credentials' argument") + + _setter("allowed_origins", allowed_origins) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -47690,13 +64893,56 @@ def __init__(__self__, *, :param str name: The name of this Linux Web App. :param str virtual_network_subnet_id: The subnet id which the Linux Web App is vNet Integrated with. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "service_tag", service_tag) - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + GetLinuxWebAppSiteConfigIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional[Sequence['outputs.GetLinuxWebAppSiteConfigIpRestrictionHeaderResult']] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if service_tag is None: + raise TypeError("Missing 'service_tag' argument") + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if virtual_network_subnet_id is None: + raise TypeError("Missing 'virtual_network_subnet_id' argument") + + _setter("action", action) + _setter("headers", headers) + _setter("ip_address", ip_address) + _setter("name", name) + _setter("priority", priority) + _setter("service_tag", service_tag) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -47750,10 +64996,43 @@ def __init__(__self__, *, x_fd_health_probes: Sequence[str], x_forwarded_fors: Sequence[str], x_forwarded_hosts: Sequence[str]): - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) - pulumi.set(__self__, "x_fd_health_probes", x_fd_health_probes) - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + GetLinuxWebAppSiteConfigIpRestrictionHeaderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probes=x_fd_health_probes, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probes: Optional[Sequence[str]] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_azure_fdids is None: + raise TypeError("Missing 'x_azure_fdids' argument") + if x_fd_health_probes is None and 'xFdHealthProbes' in kwargs: + x_fd_health_probes = kwargs['xFdHealthProbes'] + if x_fd_health_probes is None: + raise TypeError("Missing 'x_fd_health_probes' argument") + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_fors is None: + raise TypeError("Missing 'x_forwarded_fors' argument") + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_forwarded_hosts is None: + raise TypeError("Missing 'x_forwarded_hosts' argument") + + _setter("x_azure_fdids", x_azure_fdids) + _setter("x_fd_health_probes", x_fd_health_probes) + _setter("x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -47791,13 +65070,56 @@ def __init__(__self__, *, :param str name: The name of this Linux Web App. :param str virtual_network_subnet_id: The subnet id which the Linux Web App is vNet Integrated with. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "service_tag", service_tag) - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + GetLinuxWebAppSiteConfigScmIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional[Sequence['outputs.GetLinuxWebAppSiteConfigScmIpRestrictionHeaderResult']] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if service_tag is None: + raise TypeError("Missing 'service_tag' argument") + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if virtual_network_subnet_id is None: + raise TypeError("Missing 'virtual_network_subnet_id' argument") + + _setter("action", action) + _setter("headers", headers) + _setter("ip_address", ip_address) + _setter("name", name) + _setter("priority", priority) + _setter("service_tag", service_tag) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -47851,10 +65173,43 @@ def __init__(__self__, *, x_fd_health_probes: Sequence[str], x_forwarded_fors: Sequence[str], x_forwarded_hosts: Sequence[str]): - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) - pulumi.set(__self__, "x_fd_health_probes", x_fd_health_probes) - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + GetLinuxWebAppSiteConfigScmIpRestrictionHeaderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probes=x_fd_health_probes, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probes: Optional[Sequence[str]] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_azure_fdids is None: + raise TypeError("Missing 'x_azure_fdids' argument") + if x_fd_health_probes is None and 'xFdHealthProbes' in kwargs: + x_fd_health_probes = kwargs['xFdHealthProbes'] + if x_fd_health_probes is None: + raise TypeError("Missing 'x_fd_health_probes' argument") + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_fors is None: + raise TypeError("Missing 'x_forwarded_fors' argument") + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_forwarded_hosts is None: + raise TypeError("Missing 'x_forwarded_hosts' argument") + + _setter("x_azure_fdids", x_azure_fdids) + _setter("x_fd_health_probes", x_fd_health_probes) + _setter("x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -47886,8 +65241,25 @@ def __init__(__self__, *, :param str name: The name of this Linux Web App. :param str password: The Site Credentials Password used for publishing. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "password", password) + GetLinuxWebAppSiteCredentialResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + + _setter("name", name) + _setter("password", password) @property @pulumi.getter @@ -47915,8 +65287,29 @@ def __init__(__self__, *, :param Sequence[str] app_setting_names: A list of `app_setting` names that the Linux Web App will not swap between Slots when a swap operation is triggered. :param Sequence[str] connection_string_names: A list of `connection_string` names that the Linux Web App will not swap between Slots when a swap operation is triggered. """ - pulumi.set(__self__, "app_setting_names", app_setting_names) - pulumi.set(__self__, "connection_string_names", connection_string_names) + GetLinuxWebAppStickySettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_setting_names=app_setting_names, + connection_string_names=connection_string_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_setting_names: Optional[Sequence[str]] = None, + connection_string_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_setting_names is None and 'appSettingNames' in kwargs: + app_setting_names = kwargs['appSettingNames'] + if app_setting_names is None: + raise TypeError("Missing 'app_setting_names' argument") + if connection_string_names is None and 'connectionStringNames' in kwargs: + connection_string_names = kwargs['connectionStringNames'] + if connection_string_names is None: + raise TypeError("Missing 'connection_string_names' argument") + + _setter("app_setting_names", app_setting_names) + _setter("connection_string_names", connection_string_names) @property @pulumi.getter(name="appSettingNames") @@ -47952,12 +65345,53 @@ def __init__(__self__, *, :param str share_name: The Name of the File Share or Container Name for Blob storage. :param str type: The Azure Storage Type. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "mount_path", mount_path) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + GetLinuxWebAppStorageAccountResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + mount_path=mount_path, + name=name, + share_name=share_name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[str] = None, + account_name: Optional[str] = None, + mount_path: Optional[str] = None, + name: Optional[str] = None, + share_name: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + if mount_path is None: + raise TypeError("Missing 'mount_path' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("mount_path", mount_path) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) @property @pulumi.getter(name="accessKey") @@ -48043,21 +65477,106 @@ def __init__(__self__, *, :param Sequence['GetWindowsFunctionAppAuthSettingTwitterArgs'] twitters: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. """ - pulumi.set(__self__, "active_directories", active_directories) - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) - pulumi.set(__self__, "default_provider", default_provider) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "facebooks", facebooks) - pulumi.set(__self__, "githubs", githubs) - pulumi.set(__self__, "googles", googles) - pulumi.set(__self__, "issuer", issuer) - pulumi.set(__self__, "microsofts", microsofts) - pulumi.set(__self__, "runtime_version", runtime_version) - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) - pulumi.set(__self__, "token_store_enabled", token_store_enabled) - pulumi.set(__self__, "twitters", twitters) - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + GetWindowsFunctionAppAuthSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directories=active_directories, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + enabled=enabled, + facebooks=facebooks, + githubs=githubs, + googles=googles, + issuer=issuer, + microsofts=microsofts, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitters=twitters, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directories: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingActiveDirectoryResult']] = None, + additional_login_parameters: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + enabled: Optional[bool] = None, + facebooks: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingFacebookResult']] = None, + githubs: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingGithubResult']] = None, + googles: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingGoogleResult']] = None, + issuer: Optional[str] = None, + microsofts: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingMicrosoftResult']] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitters: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingTwitterResult']] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directories is None and 'activeDirectories' in kwargs: + active_directories = kwargs['activeDirectories'] + if active_directories is None: + raise TypeError("Missing 'active_directories' argument") + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if additional_login_parameters is None: + raise TypeError("Missing 'additional_login_parameters' argument") + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if allowed_external_redirect_urls is None: + raise TypeError("Missing 'allowed_external_redirect_urls' argument") + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if default_provider is None: + raise TypeError("Missing 'default_provider' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if facebooks is None: + raise TypeError("Missing 'facebooks' argument") + if githubs is None: + raise TypeError("Missing 'githubs' argument") + if googles is None: + raise TypeError("Missing 'googles' argument") + if issuer is None: + raise TypeError("Missing 'issuer' argument") + if microsofts is None: + raise TypeError("Missing 'microsofts' argument") + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if runtime_version is None: + raise TypeError("Missing 'runtime_version' argument") + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_refresh_extension_hours is None: + raise TypeError("Missing 'token_refresh_extension_hours' argument") + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_enabled is None: + raise TypeError("Missing 'token_store_enabled' argument") + if twitters is None: + raise TypeError("Missing 'twitters' argument") + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + if unauthenticated_client_action is None: + raise TypeError("Missing 'unauthenticated_client_action' argument") + + _setter("active_directories", active_directories) + _setter("additional_login_parameters", additional_login_parameters) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("default_provider", default_provider) + _setter("enabled", enabled) + _setter("facebooks", facebooks) + _setter("githubs", githubs) + _setter("googles", googles) + _setter("issuer", issuer) + _setter("microsofts", microsofts) + _setter("runtime_version", runtime_version) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_store_enabled", token_store_enabled) + _setter("twitters", twitters) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter(name="activeDirectories") @@ -48193,10 +65712,43 @@ def __init__(__self__, *, :param str client_secret: The OAuth 2.0 client secret that was created for the app used for authentication. :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. """ - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + GetWindowsFunctionAppAuthSettingActiveDirectoryResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_audiences=allowed_audiences, + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_audiences: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + + _setter("allowed_audiences", allowed_audiences) + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="allowedAudiences") @@ -48244,10 +65796,43 @@ def __init__(__self__, *, :param str app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook Login. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret", app_secret) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetWindowsFunctionAppAuthSettingFacebookResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret is None: + raise TypeError("Missing 'app_secret' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("app_id", app_id) + _setter("app_secret", app_secret) + _setter("app_secret_setting_name", app_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -48295,10 +65880,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetWindowsFunctionAppAuthSettingGithubResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -48346,10 +65964,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetWindowsFunctionAppAuthSettingGoogleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -48397,10 +66048,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetWindowsFunctionAppAuthSettingMicrosoftResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -48446,9 +66130,36 @@ def __init__(__self__, *, :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret", consumer_secret) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + GetWindowsFunctionAppAuthSettingTwitterResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret is None: + raise TypeError("Missing 'consumer_secret' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret", consumer_secret) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -48524,28 +66235,167 @@ def __init__(__self__, *, :param Sequence['GetWindowsFunctionAppAuthSettingsV2TwitterV2Args'] twitter_v2s: A `twitter_v2` block as defined below. :param str unauthenticated_action: The action to take for requests made without authentication. """ - pulumi.set(__self__, "active_directory_v2s", active_directory_v2s) - pulumi.set(__self__, "apple_v2s", apple_v2s) - pulumi.set(__self__, "auth_enabled", auth_enabled) - pulumi.set(__self__, "azure_static_web_app_v2s", azure_static_web_app_v2s) - pulumi.set(__self__, "config_file_path", config_file_path) - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) - pulumi.set(__self__, "default_provider", default_provider) - pulumi.set(__self__, "excluded_paths", excluded_paths) - pulumi.set(__self__, "facebook_v2s", facebook_v2s) - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) - pulumi.set(__self__, "github_v2s", github_v2s) - pulumi.set(__self__, "google_v2s", google_v2s) - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) - pulumi.set(__self__, "logins", logins) - pulumi.set(__self__, "microsoft_v2s", microsoft_v2s) - pulumi.set(__self__, "require_authentication", require_authentication) - pulumi.set(__self__, "require_https", require_https) - pulumi.set(__self__, "runtime_version", runtime_version) - pulumi.set(__self__, "twitter_v2s", twitter_v2s) - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + GetWindowsFunctionAppAuthSettingsV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directory_v2s=active_directory_v2s, + apple_v2s=apple_v2s, + auth_enabled=auth_enabled, + azure_static_web_app_v2s=azure_static_web_app_v2s, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2s=facebook_v2s, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2s=github_v2s, + google_v2s=google_v2s, + http_route_api_prefix=http_route_api_prefix, + logins=logins, + microsoft_v2s=microsoft_v2s, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2s=twitter_v2s, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directory_v2s: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingsV2ActiveDirectoryV2Result']] = None, + apple_v2s: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingsV2AppleV2Result']] = None, + auth_enabled: Optional[bool] = None, + azure_static_web_app_v2s: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingsV2AzureStaticWebAppV2Result']] = None, + config_file_path: Optional[str] = None, + custom_oidc_v2s: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingsV2CustomOidcV2Result']] = None, + default_provider: Optional[str] = None, + excluded_paths: Optional[Sequence[str]] = None, + facebook_v2s: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingsV2FacebookV2Result']] = None, + forward_proxy_convention: Optional[str] = None, + forward_proxy_custom_host_header_name: Optional[str] = None, + forward_proxy_custom_scheme_header_name: Optional[str] = None, + github_v2s: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingsV2GithubV2Result']] = None, + google_v2s: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingsV2GoogleV2Result']] = None, + http_route_api_prefix: Optional[str] = None, + logins: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingsV2LoginResult']] = None, + microsoft_v2s: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingsV2MicrosoftV2Result']] = None, + require_authentication: Optional[bool] = None, + require_https: Optional[bool] = None, + runtime_version: Optional[str] = None, + twitter_v2s: Optional[Sequence['outputs.GetWindowsFunctionAppAuthSettingsV2TwitterV2Result']] = None, + unauthenticated_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directory_v2s is None and 'activeDirectoryV2s' in kwargs: + active_directory_v2s = kwargs['activeDirectoryV2s'] + if active_directory_v2s is None: + raise TypeError("Missing 'active_directory_v2s' argument") + if apple_v2s is None and 'appleV2s' in kwargs: + apple_v2s = kwargs['appleV2s'] + if apple_v2s is None: + raise TypeError("Missing 'apple_v2s' argument") + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if auth_enabled is None: + raise TypeError("Missing 'auth_enabled' argument") + if azure_static_web_app_v2s is None and 'azureStaticWebAppV2s' in kwargs: + azure_static_web_app_v2s = kwargs['azureStaticWebAppV2s'] + if azure_static_web_app_v2s is None: + raise TypeError("Missing 'azure_static_web_app_v2s' argument") + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if config_file_path is None: + raise TypeError("Missing 'config_file_path' argument") + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if custom_oidc_v2s is None: + raise TypeError("Missing 'custom_oidc_v2s' argument") + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if default_provider is None: + raise TypeError("Missing 'default_provider' argument") + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if excluded_paths is None: + raise TypeError("Missing 'excluded_paths' argument") + if facebook_v2s is None and 'facebookV2s' in kwargs: + facebook_v2s = kwargs['facebookV2s'] + if facebook_v2s is None: + raise TypeError("Missing 'facebook_v2s' argument") + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_convention is None: + raise TypeError("Missing 'forward_proxy_convention' argument") + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_host_header_name is None: + raise TypeError("Missing 'forward_proxy_custom_host_header_name' argument") + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if forward_proxy_custom_scheme_header_name is None: + raise TypeError("Missing 'forward_proxy_custom_scheme_header_name' argument") + if github_v2s is None and 'githubV2s' in kwargs: + github_v2s = kwargs['githubV2s'] + if github_v2s is None: + raise TypeError("Missing 'github_v2s' argument") + if google_v2s is None and 'googleV2s' in kwargs: + google_v2s = kwargs['googleV2s'] + if google_v2s is None: + raise TypeError("Missing 'google_v2s' argument") + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if http_route_api_prefix is None: + raise TypeError("Missing 'http_route_api_prefix' argument") + if logins is None: + raise TypeError("Missing 'logins' argument") + if microsoft_v2s is None and 'microsoftV2s' in kwargs: + microsoft_v2s = kwargs['microsoftV2s'] + if microsoft_v2s is None: + raise TypeError("Missing 'microsoft_v2s' argument") + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_authentication is None: + raise TypeError("Missing 'require_authentication' argument") + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if require_https is None: + raise TypeError("Missing 'require_https' argument") + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if runtime_version is None: + raise TypeError("Missing 'runtime_version' argument") + if twitter_v2s is None and 'twitterV2s' in kwargs: + twitter_v2s = kwargs['twitterV2s'] + if twitter_v2s is None: + raise TypeError("Missing 'twitter_v2s' argument") + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + if unauthenticated_action is None: + raise TypeError("Missing 'unauthenticated_action' argument") + + _setter("active_directory_v2s", active_directory_v2s) + _setter("apple_v2s", apple_v2s) + _setter("auth_enabled", auth_enabled) + _setter("azure_static_web_app_v2s", azure_static_web_app_v2s) + _setter("config_file_path", config_file_path) + _setter("custom_oidc_v2s", custom_oidc_v2s) + _setter("default_provider", default_provider) + _setter("excluded_paths", excluded_paths) + _setter("facebook_v2s", facebook_v2s) + _setter("forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("github_v2s", github_v2s) + _setter("google_v2s", google_v2s) + _setter("http_route_api_prefix", http_route_api_prefix) + _setter("logins", logins) + _setter("microsoft_v2s", microsoft_v2s) + _setter("require_authentication", require_authentication) + _setter("require_https", require_https) + _setter("runtime_version", runtime_version) + _setter("twitter_v2s", twitter_v2s) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter(name="activeDirectoryV2s") @@ -48753,18 +66603,99 @@ def __init__(__self__, *, :param str tenant_auth_endpoint: The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/` :param bool www_authentication_disabled: Is the www-authenticate provider omitted from the request? """ - pulumi.set(__self__, "allowed_applications", allowed_applications) - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "allowed_groups", allowed_groups) - pulumi.set(__self__, "allowed_identities", allowed_identities) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) - pulumi.set(__self__, "login_parameters", login_parameters) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + GetWindowsFunctionAppAuthSettingsV2ActiveDirectoryV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_id=client_id, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + tenant_auth_endpoint=tenant_auth_endpoint, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_applications: Optional[Sequence[str]] = None, + allowed_audiences: Optional[Sequence[str]] = None, + allowed_groups: Optional[Sequence[str]] = None, + allowed_identities: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + jwt_allowed_client_applications: Optional[Sequence[str]] = None, + jwt_allowed_groups: Optional[Sequence[str]] = None, + login_parameters: Optional[Mapping[str, str]] = None, + tenant_auth_endpoint: Optional[str] = None, + www_authentication_disabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_applications is None: + raise TypeError("Missing 'allowed_applications' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_groups is None: + raise TypeError("Missing 'allowed_groups' argument") + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if allowed_identities is None: + raise TypeError("Missing 'allowed_identities' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_certificate_thumbprint is None: + raise TypeError("Missing 'client_secret_certificate_thumbprint' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_client_applications is None: + raise TypeError("Missing 'jwt_allowed_client_applications' argument") + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if jwt_allowed_groups is None: + raise TypeError("Missing 'jwt_allowed_groups' argument") + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if login_parameters is None: + raise TypeError("Missing 'login_parameters' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + if www_authentication_disabled is None: + raise TypeError("Missing 'www_authentication_disabled' argument") + + _setter("allowed_applications", allowed_applications) + _setter("allowed_audiences", allowed_audiences) + _setter("allowed_groups", allowed_groups) + _setter("allowed_identities", allowed_identities) + _setter("client_id", client_id) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_groups", jwt_allowed_groups) + _setter("login_parameters", login_parameters) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="allowedApplications") @@ -48874,9 +66805,36 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetWindowsFunctionAppAuthSettingsV2AppleV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -48910,7 +66868,22 @@ def __init__(__self__, *, """ :param str client_id: The OAuth 2.0 client ID that was created for the app used for authentication. """ - pulumi.set(__self__, "client_id", client_id) + GetWindowsFunctionAppAuthSettingsV2AzureStaticWebAppV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -48948,17 +66921,88 @@ def __init__(__self__, *, :param Sequence[str] scopes: The list of the scopes that are requested while authenticating. :param str token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) - pulumi.set(__self__, "certification_uri", certification_uri) - pulumi.set(__self__, "client_credential_method", client_credential_method) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "name_claim_type", name_claim_type) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) - pulumi.set(__self__, "scopes", scopes) - pulumi.set(__self__, "token_endpoint", token_endpoint) + GetWindowsFunctionAppAuthSettingsV2CustomOidcV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name=name, + name_claim_type=name_claim_type, + openid_configuration_endpoint=openid_configuration_endpoint, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorisation_endpoint: Optional[str] = None, + certification_uri: Optional[str] = None, + client_credential_method: Optional[str] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + issuer_endpoint: Optional[str] = None, + name: Optional[str] = None, + name_claim_type: Optional[str] = None, + openid_configuration_endpoint: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + token_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if authorisation_endpoint is None: + raise TypeError("Missing 'authorisation_endpoint' argument") + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if certification_uri is None: + raise TypeError("Missing 'certification_uri' argument") + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_credential_method is None: + raise TypeError("Missing 'client_credential_method' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if issuer_endpoint is None: + raise TypeError("Missing 'issuer_endpoint' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if name_claim_type is None: + raise TypeError("Missing 'name_claim_type' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if scopes is None: + raise TypeError("Missing 'scopes' argument") + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + if token_endpoint is None: + raise TypeError("Missing 'token_endpoint' argument") + + _setter("authorisation_endpoint", authorisation_endpoint) + _setter("certification_uri", certification_uri) + _setter("client_credential_method", client_credential_method) + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("issuer_endpoint", issuer_endpoint) + _setter("name", name) + _setter("name_claim_type", name_claim_type) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) + _setter("scopes", scopes) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="authorisationEndpoint") @@ -49062,10 +67106,43 @@ def __init__(__self__, *, :param str graph_api_version: The version of the Facebook API to be used while logging in. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) - pulumi.set(__self__, "graph_api_version", graph_api_version) - pulumi.set(__self__, "login_scopes", login_scopes) + GetWindowsFunctionAppAuthSettingsV2FacebookV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + graph_api_version: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if graph_api_version is None: + raise TypeError("Missing 'graph_api_version' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) + _setter("graph_api_version", graph_api_version) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -49111,9 +67188,36 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetWindowsFunctionAppAuthSettingsV2GithubV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -49153,10 +67257,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetWindowsFunctionAppAuthSettingsV2GoogleV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_audiences=allowed_audiences, + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_audiences: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("allowed_audiences", allowed_audiences) + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="allowedAudiences") @@ -49218,17 +67355,92 @@ def __init__(__self__, *, :param str token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param bool validate_nonce: Is the nonce validated while completing the login flow. """ - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) - pulumi.set(__self__, "logout_endpoint", logout_endpoint) - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) - pulumi.set(__self__, "token_store_enabled", token_store_enabled) - pulumi.set(__self__, "token_store_path", token_store_path) - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) - pulumi.set(__self__, "validate_nonce", validate_nonce) + GetWindowsFunctionAppAuthSettingsV2LoginResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + cookie_expiration_convention: Optional[str] = None, + cookie_expiration_time: Optional[str] = None, + logout_endpoint: Optional[str] = None, + nonce_expiration_time: Optional[str] = None, + preserve_url_fragments_for_logins: Optional[bool] = None, + token_refresh_extension_time: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + token_store_path: Optional[str] = None, + token_store_sas_setting_name: Optional[str] = None, + validate_nonce: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if allowed_external_redirect_urls is None: + raise TypeError("Missing 'allowed_external_redirect_urls' argument") + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_convention is None: + raise TypeError("Missing 'cookie_expiration_convention' argument") + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if cookie_expiration_time is None: + raise TypeError("Missing 'cookie_expiration_time' argument") + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if logout_endpoint is None: + raise TypeError("Missing 'logout_endpoint' argument") + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if nonce_expiration_time is None: + raise TypeError("Missing 'nonce_expiration_time' argument") + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if preserve_url_fragments_for_logins is None: + raise TypeError("Missing 'preserve_url_fragments_for_logins' argument") + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_refresh_extension_time is None: + raise TypeError("Missing 'token_refresh_extension_time' argument") + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_enabled is None: + raise TypeError("Missing 'token_store_enabled' argument") + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_path is None: + raise TypeError("Missing 'token_store_path' argument") + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if token_store_sas_setting_name is None: + raise TypeError("Missing 'token_store_sas_setting_name' argument") + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if validate_nonce is None: + raise TypeError("Missing 'validate_nonce' argument") + + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_time", cookie_expiration_time) + _setter("logout_endpoint", logout_endpoint) + _setter("nonce_expiration_time", nonce_expiration_time) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("token_refresh_extension_time", token_refresh_extension_time) + _setter("token_store_enabled", token_store_enabled) + _setter("token_store_path", token_store_path) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -49332,10 +67544,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetWindowsFunctionAppAuthSettingsV2MicrosoftV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_audiences=allowed_audiences, + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_audiences: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("allowed_audiences", allowed_audiences) + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="allowedAudiences") @@ -49379,8 +67624,29 @@ def __init__(__self__, *, :param str consumer_key: The OAuth 1.0a consumer key of the Twitter application used for sign-in. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + GetWindowsFunctionAppAuthSettingsV2TwitterV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -49412,10 +67678,37 @@ def __init__(__self__, *, :param Sequence['GetWindowsFunctionAppBackupScheduleArgs'] schedules: A `schedule` block as defined below. :param str storage_account_url: The SAS URL to the container. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "storage_account_url", storage_account_url) + GetWindowsFunctionAppBackupResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + name=name, + schedules=schedules, + storage_account_url=storage_account_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + name: Optional[str] = None, + schedules: Optional[Sequence['outputs.GetWindowsFunctionAppBackupScheduleResult']] = None, + storage_account_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("enabled", enabled) + _setter("name", name) + _setter("schedules", schedules) + _setter("storage_account_url", storage_account_url) @property @pulumi.getter @@ -49466,12 +67759,57 @@ def __init__(__self__, *, :param int retention_period_days: After how many days backups is deleted. :param str start_time: When the schedule should start working in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) - pulumi.set(__self__, "last_execution_time", last_execution_time) - pulumi.set(__self__, "retention_period_days", retention_period_days) - pulumi.set(__self__, "start_time", start_time) + GetWindowsFunctionAppBackupScheduleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[int] = None, + frequency_unit: Optional[str] = None, + keep_at_least_one_backup: Optional[bool] = None, + last_execution_time: Optional[str] = None, + retention_period_days: Optional[int] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if keep_at_least_one_backup is None: + raise TypeError("Missing 'keep_at_least_one_backup' argument") + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if last_execution_time is None: + raise TypeError("Missing 'last_execution_time' argument") + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if retention_period_days is None: + raise TypeError("Missing 'retention_period_days' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) + _setter("last_execution_time", last_execution_time) + _setter("retention_period_days", retention_period_days) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -49530,9 +67868,30 @@ def __init__(__self__, *, :param str type: The type of Managed Service Identity that is configured on this Windows Function App. :param str value: The connection string value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + GetWindowsFunctionAppConnectionStringResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -49572,10 +67931,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Windows Function App. :param str type: The type of Managed Service Identity that is configured on this Windows Function App. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetWindowsFunctionAppIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -49683,40 +68073,251 @@ def __init__(__self__, *, :param str windows_fx_version: The Windows FX version. :param int worker_count: The number of Workers for this Windows Function App. """ - pulumi.set(__self__, "always_on", always_on) - pulumi.set(__self__, "api_definition_url", api_definition_url) - pulumi.set(__self__, "api_management_api_id", api_management_api_id) - pulumi.set(__self__, "app_command_line", app_command_line) - pulumi.set(__self__, "app_scale_limit", app_scale_limit) - pulumi.set(__self__, "app_service_logs", app_service_logs) - pulumi.set(__self__, "application_insights_connection_string", application_insights_connection_string) - pulumi.set(__self__, "application_insights_key", application_insights_key) - pulumi.set(__self__, "application_stacks", application_stacks) - pulumi.set(__self__, "cors", cors) - pulumi.set(__self__, "default_documents", default_documents) - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) - pulumi.set(__self__, "ftps_state", ftps_state) - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) - pulumi.set(__self__, "health_check_path", health_check_path) - pulumi.set(__self__, "http2_enabled", http2_enabled) - pulumi.set(__self__, "ip_restrictions", ip_restrictions) - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) - pulumi.set(__self__, "scm_type", scm_type) - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) - pulumi.set(__self__, "websockets_enabled", websockets_enabled) - pulumi.set(__self__, "windows_fx_version", windows_fx_version) - pulumi.set(__self__, "worker_count", worker_count) + GetWindowsFunctionAppSiteConfigResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + app_scale_limit=app_scale_limit, + app_service_logs=app_service_logs, + application_insights_connection_string=application_insights_connection_string, + application_insights_key=application_insights_key, + application_stacks=application_stacks, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + load_balancing_mode=load_balancing_mode, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + api_definition_url: Optional[str] = None, + api_management_api_id: Optional[str] = None, + app_command_line: Optional[str] = None, + app_scale_limit: Optional[int] = None, + app_service_logs: Optional[Sequence['outputs.GetWindowsFunctionAppSiteConfigAppServiceLogResult']] = None, + application_insights_connection_string: Optional[str] = None, + application_insights_key: Optional[str] = None, + application_stacks: Optional[Sequence['outputs.GetWindowsFunctionAppSiteConfigApplicationStackResult']] = None, + cors: Optional[Sequence['outputs.GetWindowsFunctionAppSiteConfigCorResult']] = None, + default_documents: Optional[Sequence[str]] = None, + detailed_error_logging_enabled: Optional[bool] = None, + elastic_instance_minimum: Optional[int] = None, + ftps_state: Optional[str] = None, + health_check_eviction_time_in_min: Optional[int] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.GetWindowsFunctionAppSiteConfigIpRestrictionResult']] = None, + load_balancing_mode: Optional[str] = None, + managed_pipeline_mode: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + pre_warmed_instance_count: Optional[int] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + runtime_scale_monitoring_enabled: Optional[bool] = None, + scm_ip_restrictions: Optional[Sequence['outputs.GetWindowsFunctionAppSiteConfigScmIpRestrictionResult']] = None, + scm_minimum_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + windows_fx_version: Optional[str] = None, + worker_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if always_on is None: + raise TypeError("Missing 'always_on' argument") + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_definition_url is None: + raise TypeError("Missing 'api_definition_url' argument") + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if api_management_api_id is None: + raise TypeError("Missing 'api_management_api_id' argument") + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if app_command_line is None: + raise TypeError("Missing 'app_command_line' argument") + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if app_scale_limit is None: + raise TypeError("Missing 'app_scale_limit' argument") + if app_service_logs is None and 'appServiceLogs' in kwargs: + app_service_logs = kwargs['appServiceLogs'] + if app_service_logs is None: + raise TypeError("Missing 'app_service_logs' argument") + if application_insights_connection_string is None and 'applicationInsightsConnectionString' in kwargs: + application_insights_connection_string = kwargs['applicationInsightsConnectionString'] + if application_insights_connection_string is None: + raise TypeError("Missing 'application_insights_connection_string' argument") + if application_insights_key is None and 'applicationInsightsKey' in kwargs: + application_insights_key = kwargs['applicationInsightsKey'] + if application_insights_key is None: + raise TypeError("Missing 'application_insights_key' argument") + if application_stacks is None and 'applicationStacks' in kwargs: + application_stacks = kwargs['applicationStacks'] + if application_stacks is None: + raise TypeError("Missing 'application_stacks' argument") + if cors is None: + raise TypeError("Missing 'cors' argument") + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if default_documents is None: + raise TypeError("Missing 'default_documents' argument") + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if detailed_error_logging_enabled is None: + raise TypeError("Missing 'detailed_error_logging_enabled' argument") + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if elastic_instance_minimum is None: + raise TypeError("Missing 'elastic_instance_minimum' argument") + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if ftps_state is None: + raise TypeError("Missing 'ftps_state' argument") + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_eviction_time_in_min is None: + raise TypeError("Missing 'health_check_eviction_time_in_min' argument") + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if health_check_path is None: + raise TypeError("Missing 'health_check_path' argument") + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if http2_enabled is None: + raise TypeError("Missing 'http2_enabled' argument") + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if ip_restrictions is None: + raise TypeError("Missing 'ip_restrictions' argument") + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if load_balancing_mode is None: + raise TypeError("Missing 'load_balancing_mode' argument") + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if managed_pipeline_mode is None: + raise TypeError("Missing 'managed_pipeline_mode' argument") + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if minimum_tls_version is None: + raise TypeError("Missing 'minimum_tls_version' argument") + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if pre_warmed_instance_count is None: + raise TypeError("Missing 'pre_warmed_instance_count' argument") + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_enabled is None: + raise TypeError("Missing 'remote_debugging_enabled' argument") + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if remote_debugging_version is None: + raise TypeError("Missing 'remote_debugging_version' argument") + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if runtime_scale_monitoring_enabled is None: + raise TypeError("Missing 'runtime_scale_monitoring_enabled' argument") + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_ip_restrictions is None: + raise TypeError("Missing 'scm_ip_restrictions' argument") + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_minimum_tls_version is None: + raise TypeError("Missing 'scm_minimum_tls_version' argument") + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_type is None: + raise TypeError("Missing 'scm_type' argument") + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if scm_use_main_ip_restriction is None: + raise TypeError("Missing 'scm_use_main_ip_restriction' argument") + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if use32_bit_worker is None: + raise TypeError("Missing 'use32_bit_worker' argument") + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if vnet_route_all_enabled is None: + raise TypeError("Missing 'vnet_route_all_enabled' argument") + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if websockets_enabled is None: + raise TypeError("Missing 'websockets_enabled' argument") + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if windows_fx_version is None: + raise TypeError("Missing 'windows_fx_version' argument") + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if worker_count is None: + raise TypeError("Missing 'worker_count' argument") + + _setter("always_on", always_on) + _setter("api_definition_url", api_definition_url) + _setter("api_management_api_id", api_management_api_id) + _setter("app_command_line", app_command_line) + _setter("app_scale_limit", app_scale_limit) + _setter("app_service_logs", app_service_logs) + _setter("application_insights_connection_string", application_insights_connection_string) + _setter("application_insights_key", application_insights_key) + _setter("application_stacks", application_stacks) + _setter("cors", cors) + _setter("default_documents", default_documents) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("elastic_instance_minimum", elastic_instance_minimum) + _setter("ftps_state", ftps_state) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_path", health_check_path) + _setter("http2_enabled", http2_enabled) + _setter("ip_restrictions", ip_restrictions) + _setter("load_balancing_mode", load_balancing_mode) + _setter("managed_pipeline_mode", managed_pipeline_mode) + _setter("minimum_tls_version", minimum_tls_version) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) + _setter("remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_version", remote_debugging_version) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_type", scm_type) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("use32_bit_worker", use32_bit_worker) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) + _setter("websockets_enabled", websockets_enabled) + _setter("windows_fx_version", windows_fx_version) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -50000,8 +68601,29 @@ def __init__(__self__, *, :param int disk_quota_mb: The amount of disk space to use for logs. :param int retention_period_days: After how many days backups is deleted. """ - pulumi.set(__self__, "disk_quota_mb", disk_quota_mb) - pulumi.set(__self__, "retention_period_days", retention_period_days) + GetWindowsFunctionAppSiteConfigAppServiceLogResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_quota_mb=disk_quota_mb, + retention_period_days=retention_period_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_quota_mb: Optional[int] = None, + retention_period_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_quota_mb is None and 'diskQuotaMb' in kwargs: + disk_quota_mb = kwargs['diskQuotaMb'] + if disk_quota_mb is None: + raise TypeError("Missing 'disk_quota_mb' argument") + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if retention_period_days is None: + raise TypeError("Missing 'retention_period_days' argument") + + _setter("disk_quota_mb", disk_quota_mb) + _setter("retention_period_days", retention_period_days) @property @pulumi.getter(name="diskQuotaMb") @@ -50036,12 +68658,57 @@ def __init__(__self__, *, :param str powershell_core_version: The version of PowerShell Core to use. :param bool use_custom_runtime: Is the Windows Function App using a custom runtime?. """ - pulumi.set(__self__, "dotnet_version", dotnet_version) - pulumi.set(__self__, "java_version", java_version) - pulumi.set(__self__, "node_version", node_version) - pulumi.set(__self__, "powershell_core_version", powershell_core_version) - pulumi.set(__self__, "use_custom_runtime", use_custom_runtime) - pulumi.set(__self__, "use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) + GetWindowsFunctionAppSiteConfigApplicationStackResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + dotnet_version=dotnet_version, + java_version=java_version, + node_version=node_version, + powershell_core_version=powershell_core_version, + use_custom_runtime=use_custom_runtime, + use_dotnet_isolated_runtime=use_dotnet_isolated_runtime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dotnet_version: Optional[str] = None, + java_version: Optional[str] = None, + node_version: Optional[str] = None, + powershell_core_version: Optional[str] = None, + use_custom_runtime: Optional[bool] = None, + use_dotnet_isolated_runtime: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if dotnet_version is None: + raise TypeError("Missing 'dotnet_version' argument") + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if java_version is None: + raise TypeError("Missing 'java_version' argument") + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if node_version is None: + raise TypeError("Missing 'node_version' argument") + if powershell_core_version is None and 'powershellCoreVersion' in kwargs: + powershell_core_version = kwargs['powershellCoreVersion'] + if powershell_core_version is None: + raise TypeError("Missing 'powershell_core_version' argument") + if use_custom_runtime is None and 'useCustomRuntime' in kwargs: + use_custom_runtime = kwargs['useCustomRuntime'] + if use_custom_runtime is None: + raise TypeError("Missing 'use_custom_runtime' argument") + if use_dotnet_isolated_runtime is None and 'useDotnetIsolatedRuntime' in kwargs: + use_dotnet_isolated_runtime = kwargs['useDotnetIsolatedRuntime'] + if use_dotnet_isolated_runtime is None: + raise TypeError("Missing 'use_dotnet_isolated_runtime' argument") + + _setter("dotnet_version", dotnet_version) + _setter("java_version", java_version) + _setter("node_version", node_version) + _setter("powershell_core_version", powershell_core_version) + _setter("use_custom_runtime", use_custom_runtime) + _setter("use_dotnet_isolated_runtime", use_dotnet_isolated_runtime) @property @pulumi.getter(name="dotnetVersion") @@ -50098,8 +68765,29 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: A list of origins that should be allowed to make cross-origin calls. :param bool support_credentials: Are credentials allows in CORS requests?. """ - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "support_credentials", support_credentials) + GetWindowsFunctionAppSiteConfigCorResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if support_credentials is None: + raise TypeError("Missing 'support_credentials' argument") + + _setter("allowed_origins", allowed_origins) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -50132,13 +68820,56 @@ def __init__(__self__, *, :param str name: The name of this Windows Function App. :param str virtual_network_subnet_id: The subnet id which the Windows Function App is vNet Integrated with. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "service_tag", service_tag) - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + GetWindowsFunctionAppSiteConfigIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional[Sequence['outputs.GetWindowsFunctionAppSiteConfigIpRestrictionHeaderResult']] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if service_tag is None: + raise TypeError("Missing 'service_tag' argument") + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if virtual_network_subnet_id is None: + raise TypeError("Missing 'virtual_network_subnet_id' argument") + + _setter("action", action) + _setter("headers", headers) + _setter("ip_address", ip_address) + _setter("name", name) + _setter("priority", priority) + _setter("service_tag", service_tag) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -50189,10 +68920,43 @@ def __init__(__self__, *, x_fd_health_probes: Sequence[str], x_forwarded_fors: Sequence[str], x_forwarded_hosts: Sequence[str]): - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) - pulumi.set(__self__, "x_fd_health_probes", x_fd_health_probes) - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + GetWindowsFunctionAppSiteConfigIpRestrictionHeaderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probes=x_fd_health_probes, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probes: Optional[Sequence[str]] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_azure_fdids is None: + raise TypeError("Missing 'x_azure_fdids' argument") + if x_fd_health_probes is None and 'xFdHealthProbes' in kwargs: + x_fd_health_probes = kwargs['xFdHealthProbes'] + if x_fd_health_probes is None: + raise TypeError("Missing 'x_fd_health_probes' argument") + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_fors is None: + raise TypeError("Missing 'x_forwarded_fors' argument") + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_forwarded_hosts is None: + raise TypeError("Missing 'x_forwarded_hosts' argument") + + _setter("x_azure_fdids", x_azure_fdids) + _setter("x_fd_health_probes", x_fd_health_probes) + _setter("x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -50229,13 +68993,56 @@ def __init__(__self__, *, :param str name: The name of this Windows Function App. :param str virtual_network_subnet_id: The subnet id which the Windows Function App is vNet Integrated with. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "service_tag", service_tag) - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + GetWindowsFunctionAppSiteConfigScmIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional[Sequence['outputs.GetWindowsFunctionAppSiteConfigScmIpRestrictionHeaderResult']] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if service_tag is None: + raise TypeError("Missing 'service_tag' argument") + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if virtual_network_subnet_id is None: + raise TypeError("Missing 'virtual_network_subnet_id' argument") + + _setter("action", action) + _setter("headers", headers) + _setter("ip_address", ip_address) + _setter("name", name) + _setter("priority", priority) + _setter("service_tag", service_tag) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -50286,10 +69093,43 @@ def __init__(__self__, *, x_fd_health_probes: Sequence[str], x_forwarded_fors: Sequence[str], x_forwarded_hosts: Sequence[str]): - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) - pulumi.set(__self__, "x_fd_health_probes", x_fd_health_probes) - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + GetWindowsFunctionAppSiteConfigScmIpRestrictionHeaderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probes=x_fd_health_probes, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probes: Optional[Sequence[str]] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_azure_fdids is None: + raise TypeError("Missing 'x_azure_fdids' argument") + if x_fd_health_probes is None and 'xFdHealthProbes' in kwargs: + x_fd_health_probes = kwargs['xFdHealthProbes'] + if x_fd_health_probes is None: + raise TypeError("Missing 'x_fd_health_probes' argument") + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_fors is None: + raise TypeError("Missing 'x_forwarded_fors' argument") + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_forwarded_hosts is None: + raise TypeError("Missing 'x_forwarded_hosts' argument") + + _setter("x_azure_fdids", x_azure_fdids) + _setter("x_fd_health_probes", x_fd_health_probes) + _setter("x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -50321,8 +69161,25 @@ def __init__(__self__, *, :param str name: The name of this Windows Function App. :param str password: The Site Credentials Password used for publishing. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "password", password) + GetWindowsFunctionAppSiteCredentialResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + + _setter("name", name) + _setter("password", password) @property @pulumi.getter @@ -50350,8 +69207,29 @@ def __init__(__self__, *, :param Sequence[str] app_setting_names: A list of `app_setting` names that the Windows Function App will not swap between Slots when a swap operation is triggered. :param Sequence[str] connection_string_names: A list of `connection_string` names that the Windows Function App will not swap between Slots when a swap operation is triggered. """ - pulumi.set(__self__, "app_setting_names", app_setting_names) - pulumi.set(__self__, "connection_string_names", connection_string_names) + GetWindowsFunctionAppStickySettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_setting_names=app_setting_names, + connection_string_names=connection_string_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_setting_names: Optional[Sequence[str]] = None, + connection_string_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_setting_names is None and 'appSettingNames' in kwargs: + app_setting_names = kwargs['appSettingNames'] + if app_setting_names is None: + raise TypeError("Missing 'app_setting_names' argument") + if connection_string_names is None and 'connectionStringNames' in kwargs: + connection_string_names = kwargs['connectionStringNames'] + if connection_string_names is None: + raise TypeError("Missing 'connection_string_names' argument") + + _setter("app_setting_names", app_setting_names) + _setter("connection_string_names", connection_string_names) @property @pulumi.getter(name="appSettingNames") @@ -50405,21 +69283,106 @@ def __init__(__self__, *, :param Sequence['GetWindowsWebAppAuthSettingTwitterArgs'] twitters: A `twitter` block as defined below. :param str unauthenticated_client_action: The action to take when an unauthenticated client attempts to access the app. """ - pulumi.set(__self__, "active_directories", active_directories) - pulumi.set(__self__, "additional_login_parameters", additional_login_parameters) - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) - pulumi.set(__self__, "default_provider", default_provider) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "facebooks", facebooks) - pulumi.set(__self__, "githubs", githubs) - pulumi.set(__self__, "googles", googles) - pulumi.set(__self__, "issuer", issuer) - pulumi.set(__self__, "microsofts", microsofts) - pulumi.set(__self__, "runtime_version", runtime_version) - pulumi.set(__self__, "token_refresh_extension_hours", token_refresh_extension_hours) - pulumi.set(__self__, "token_store_enabled", token_store_enabled) - pulumi.set(__self__, "twitters", twitters) - pulumi.set(__self__, "unauthenticated_client_action", unauthenticated_client_action) + GetWindowsWebAppAuthSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directories=active_directories, + additional_login_parameters=additional_login_parameters, + allowed_external_redirect_urls=allowed_external_redirect_urls, + default_provider=default_provider, + enabled=enabled, + facebooks=facebooks, + githubs=githubs, + googles=googles, + issuer=issuer, + microsofts=microsofts, + runtime_version=runtime_version, + token_refresh_extension_hours=token_refresh_extension_hours, + token_store_enabled=token_store_enabled, + twitters=twitters, + unauthenticated_client_action=unauthenticated_client_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directories: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingActiveDirectoryResult']] = None, + additional_login_parameters: Optional[Mapping[str, str]] = None, + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + default_provider: Optional[str] = None, + enabled: Optional[bool] = None, + facebooks: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingFacebookResult']] = None, + githubs: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingGithubResult']] = None, + googles: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingGoogleResult']] = None, + issuer: Optional[str] = None, + microsofts: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingMicrosoftResult']] = None, + runtime_version: Optional[str] = None, + token_refresh_extension_hours: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + twitters: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingTwitterResult']] = None, + unauthenticated_client_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directories is None and 'activeDirectories' in kwargs: + active_directories = kwargs['activeDirectories'] + if active_directories is None: + raise TypeError("Missing 'active_directories' argument") + if additional_login_parameters is None and 'additionalLoginParameters' in kwargs: + additional_login_parameters = kwargs['additionalLoginParameters'] + if additional_login_parameters is None: + raise TypeError("Missing 'additional_login_parameters' argument") + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if allowed_external_redirect_urls is None: + raise TypeError("Missing 'allowed_external_redirect_urls' argument") + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if default_provider is None: + raise TypeError("Missing 'default_provider' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if facebooks is None: + raise TypeError("Missing 'facebooks' argument") + if githubs is None: + raise TypeError("Missing 'githubs' argument") + if googles is None: + raise TypeError("Missing 'googles' argument") + if issuer is None: + raise TypeError("Missing 'issuer' argument") + if microsofts is None: + raise TypeError("Missing 'microsofts' argument") + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if runtime_version is None: + raise TypeError("Missing 'runtime_version' argument") + if token_refresh_extension_hours is None and 'tokenRefreshExtensionHours' in kwargs: + token_refresh_extension_hours = kwargs['tokenRefreshExtensionHours'] + if token_refresh_extension_hours is None: + raise TypeError("Missing 'token_refresh_extension_hours' argument") + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_enabled is None: + raise TypeError("Missing 'token_store_enabled' argument") + if twitters is None: + raise TypeError("Missing 'twitters' argument") + if unauthenticated_client_action is None and 'unauthenticatedClientAction' in kwargs: + unauthenticated_client_action = kwargs['unauthenticatedClientAction'] + if unauthenticated_client_action is None: + raise TypeError("Missing 'unauthenticated_client_action' argument") + + _setter("active_directories", active_directories) + _setter("additional_login_parameters", additional_login_parameters) + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("default_provider", default_provider) + _setter("enabled", enabled) + _setter("facebooks", facebooks) + _setter("githubs", githubs) + _setter("googles", googles) + _setter("issuer", issuer) + _setter("microsofts", microsofts) + _setter("runtime_version", runtime_version) + _setter("token_refresh_extension_hours", token_refresh_extension_hours) + _setter("token_store_enabled", token_store_enabled) + _setter("twitters", twitters) + _setter("unauthenticated_client_action", unauthenticated_client_action) @property @pulumi.getter(name="activeDirectories") @@ -50555,10 +69518,43 @@ def __init__(__self__, *, :param str client_secret: The OAuth 2.0 client secret used by the app for authentication. :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. """ - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) + GetWindowsWebAppAuthSettingActiveDirectoryResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_audiences=allowed_audiences, + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_audiences: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + + _setter("allowed_audiences", allowed_audiences) + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) @property @pulumi.getter(name="allowedAudiences") @@ -50606,10 +69602,43 @@ def __init__(__self__, *, :param str app_secret_setting_name: The app setting name that contains the `app_secret` value used for Facebook login. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret", app_secret) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetWindowsWebAppAuthSettingFacebookResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret=app_secret, + app_secret_setting_name=app_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret is None and 'appSecret' in kwargs: + app_secret = kwargs['appSecret'] + if app_secret is None: + raise TypeError("Missing 'app_secret' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("app_id", app_id) + _setter("app_secret", app_secret) + _setter("app_secret_setting_name", app_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="appId") @@ -50657,10 +69686,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetWindowsWebAppAuthSettingGithubResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -50708,10 +69770,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetWindowsWebAppAuthSettingGoogleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -50759,10 +69854,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] oauth_scopes: A list of OAuth 2.0 scopes requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "oauth_scopes", oauth_scopes) + GetWindowsWebAppAuthSettingMicrosoftResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + client_secret_setting_name=client_secret_setting_name, + oauth_scopes=oauth_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + oauth_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if oauth_scopes is None and 'oauthScopes' in kwargs: + oauth_scopes = kwargs['oauthScopes'] + if oauth_scopes is None: + raise TypeError("Missing 'oauth_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("oauth_scopes", oauth_scopes) @property @pulumi.getter(name="clientId") @@ -50808,9 +69936,36 @@ def __init__(__self__, *, :param str consumer_secret: The OAuth 1.0a consumer secret of the Twitter application used for sign-in. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret", consumer_secret) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + GetWindowsWebAppAuthSettingTwitterResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret=consumer_secret, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret is None and 'consumerSecret' in kwargs: + consumer_secret = kwargs['consumerSecret'] + if consumer_secret is None: + raise TypeError("Missing 'consumer_secret' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret", consumer_secret) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -50886,28 +70041,167 @@ def __init__(__self__, *, :param Sequence['GetWindowsWebAppAuthSettingsV2TwitterV2Args'] twitter_v2s: A `twitter_v2` block as defined below. :param str unauthenticated_action: The action to take for requests made without authentication. """ - pulumi.set(__self__, "active_directory_v2s", active_directory_v2s) - pulumi.set(__self__, "apple_v2s", apple_v2s) - pulumi.set(__self__, "auth_enabled", auth_enabled) - pulumi.set(__self__, "azure_static_web_app_v2s", azure_static_web_app_v2s) - pulumi.set(__self__, "config_file_path", config_file_path) - pulumi.set(__self__, "custom_oidc_v2s", custom_oidc_v2s) - pulumi.set(__self__, "default_provider", default_provider) - pulumi.set(__self__, "excluded_paths", excluded_paths) - pulumi.set(__self__, "facebook_v2s", facebook_v2s) - pulumi.set(__self__, "forward_proxy_convention", forward_proxy_convention) - pulumi.set(__self__, "forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) - pulumi.set(__self__, "forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) - pulumi.set(__self__, "github_v2s", github_v2s) - pulumi.set(__self__, "google_v2s", google_v2s) - pulumi.set(__self__, "http_route_api_prefix", http_route_api_prefix) - pulumi.set(__self__, "logins", logins) - pulumi.set(__self__, "microsoft_v2s", microsoft_v2s) - pulumi.set(__self__, "require_authentication", require_authentication) - pulumi.set(__self__, "require_https", require_https) - pulumi.set(__self__, "runtime_version", runtime_version) - pulumi.set(__self__, "twitter_v2s", twitter_v2s) - pulumi.set(__self__, "unauthenticated_action", unauthenticated_action) + GetWindowsWebAppAuthSettingsV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directory_v2s=active_directory_v2s, + apple_v2s=apple_v2s, + auth_enabled=auth_enabled, + azure_static_web_app_v2s=azure_static_web_app_v2s, + config_file_path=config_file_path, + custom_oidc_v2s=custom_oidc_v2s, + default_provider=default_provider, + excluded_paths=excluded_paths, + facebook_v2s=facebook_v2s, + forward_proxy_convention=forward_proxy_convention, + forward_proxy_custom_host_header_name=forward_proxy_custom_host_header_name, + forward_proxy_custom_scheme_header_name=forward_proxy_custom_scheme_header_name, + github_v2s=github_v2s, + google_v2s=google_v2s, + http_route_api_prefix=http_route_api_prefix, + logins=logins, + microsoft_v2s=microsoft_v2s, + require_authentication=require_authentication, + require_https=require_https, + runtime_version=runtime_version, + twitter_v2s=twitter_v2s, + unauthenticated_action=unauthenticated_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directory_v2s: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingsV2ActiveDirectoryV2Result']] = None, + apple_v2s: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingsV2AppleV2Result']] = None, + auth_enabled: Optional[bool] = None, + azure_static_web_app_v2s: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingsV2AzureStaticWebAppV2Result']] = None, + config_file_path: Optional[str] = None, + custom_oidc_v2s: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingsV2CustomOidcV2Result']] = None, + default_provider: Optional[str] = None, + excluded_paths: Optional[Sequence[str]] = None, + facebook_v2s: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingsV2FacebookV2Result']] = None, + forward_proxy_convention: Optional[str] = None, + forward_proxy_custom_host_header_name: Optional[str] = None, + forward_proxy_custom_scheme_header_name: Optional[str] = None, + github_v2s: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingsV2GithubV2Result']] = None, + google_v2s: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingsV2GoogleV2Result']] = None, + http_route_api_prefix: Optional[str] = None, + logins: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingsV2LoginResult']] = None, + microsoft_v2s: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingsV2MicrosoftV2Result']] = None, + require_authentication: Optional[bool] = None, + require_https: Optional[bool] = None, + runtime_version: Optional[str] = None, + twitter_v2s: Optional[Sequence['outputs.GetWindowsWebAppAuthSettingsV2TwitterV2Result']] = None, + unauthenticated_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directory_v2s is None and 'activeDirectoryV2s' in kwargs: + active_directory_v2s = kwargs['activeDirectoryV2s'] + if active_directory_v2s is None: + raise TypeError("Missing 'active_directory_v2s' argument") + if apple_v2s is None and 'appleV2s' in kwargs: + apple_v2s = kwargs['appleV2s'] + if apple_v2s is None: + raise TypeError("Missing 'apple_v2s' argument") + if auth_enabled is None and 'authEnabled' in kwargs: + auth_enabled = kwargs['authEnabled'] + if auth_enabled is None: + raise TypeError("Missing 'auth_enabled' argument") + if azure_static_web_app_v2s is None and 'azureStaticWebAppV2s' in kwargs: + azure_static_web_app_v2s = kwargs['azureStaticWebAppV2s'] + if azure_static_web_app_v2s is None: + raise TypeError("Missing 'azure_static_web_app_v2s' argument") + if config_file_path is None and 'configFilePath' in kwargs: + config_file_path = kwargs['configFilePath'] + if config_file_path is None: + raise TypeError("Missing 'config_file_path' argument") + if custom_oidc_v2s is None and 'customOidcV2s' in kwargs: + custom_oidc_v2s = kwargs['customOidcV2s'] + if custom_oidc_v2s is None: + raise TypeError("Missing 'custom_oidc_v2s' argument") + if default_provider is None and 'defaultProvider' in kwargs: + default_provider = kwargs['defaultProvider'] + if default_provider is None: + raise TypeError("Missing 'default_provider' argument") + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if excluded_paths is None: + raise TypeError("Missing 'excluded_paths' argument") + if facebook_v2s is None and 'facebookV2s' in kwargs: + facebook_v2s = kwargs['facebookV2s'] + if facebook_v2s is None: + raise TypeError("Missing 'facebook_v2s' argument") + if forward_proxy_convention is None and 'forwardProxyConvention' in kwargs: + forward_proxy_convention = kwargs['forwardProxyConvention'] + if forward_proxy_convention is None: + raise TypeError("Missing 'forward_proxy_convention' argument") + if forward_proxy_custom_host_header_name is None and 'forwardProxyCustomHostHeaderName' in kwargs: + forward_proxy_custom_host_header_name = kwargs['forwardProxyCustomHostHeaderName'] + if forward_proxy_custom_host_header_name is None: + raise TypeError("Missing 'forward_proxy_custom_host_header_name' argument") + if forward_proxy_custom_scheme_header_name is None and 'forwardProxyCustomSchemeHeaderName' in kwargs: + forward_proxy_custom_scheme_header_name = kwargs['forwardProxyCustomSchemeHeaderName'] + if forward_proxy_custom_scheme_header_name is None: + raise TypeError("Missing 'forward_proxy_custom_scheme_header_name' argument") + if github_v2s is None and 'githubV2s' in kwargs: + github_v2s = kwargs['githubV2s'] + if github_v2s is None: + raise TypeError("Missing 'github_v2s' argument") + if google_v2s is None and 'googleV2s' in kwargs: + google_v2s = kwargs['googleV2s'] + if google_v2s is None: + raise TypeError("Missing 'google_v2s' argument") + if http_route_api_prefix is None and 'httpRouteApiPrefix' in kwargs: + http_route_api_prefix = kwargs['httpRouteApiPrefix'] + if http_route_api_prefix is None: + raise TypeError("Missing 'http_route_api_prefix' argument") + if logins is None: + raise TypeError("Missing 'logins' argument") + if microsoft_v2s is None and 'microsoftV2s' in kwargs: + microsoft_v2s = kwargs['microsoftV2s'] + if microsoft_v2s is None: + raise TypeError("Missing 'microsoft_v2s' argument") + if require_authentication is None and 'requireAuthentication' in kwargs: + require_authentication = kwargs['requireAuthentication'] + if require_authentication is None: + raise TypeError("Missing 'require_authentication' argument") + if require_https is None and 'requireHttps' in kwargs: + require_https = kwargs['requireHttps'] + if require_https is None: + raise TypeError("Missing 'require_https' argument") + if runtime_version is None and 'runtimeVersion' in kwargs: + runtime_version = kwargs['runtimeVersion'] + if runtime_version is None: + raise TypeError("Missing 'runtime_version' argument") + if twitter_v2s is None and 'twitterV2s' in kwargs: + twitter_v2s = kwargs['twitterV2s'] + if twitter_v2s is None: + raise TypeError("Missing 'twitter_v2s' argument") + if unauthenticated_action is None and 'unauthenticatedAction' in kwargs: + unauthenticated_action = kwargs['unauthenticatedAction'] + if unauthenticated_action is None: + raise TypeError("Missing 'unauthenticated_action' argument") + + _setter("active_directory_v2s", active_directory_v2s) + _setter("apple_v2s", apple_v2s) + _setter("auth_enabled", auth_enabled) + _setter("azure_static_web_app_v2s", azure_static_web_app_v2s) + _setter("config_file_path", config_file_path) + _setter("custom_oidc_v2s", custom_oidc_v2s) + _setter("default_provider", default_provider) + _setter("excluded_paths", excluded_paths) + _setter("facebook_v2s", facebook_v2s) + _setter("forward_proxy_convention", forward_proxy_convention) + _setter("forward_proxy_custom_host_header_name", forward_proxy_custom_host_header_name) + _setter("forward_proxy_custom_scheme_header_name", forward_proxy_custom_scheme_header_name) + _setter("github_v2s", github_v2s) + _setter("google_v2s", google_v2s) + _setter("http_route_api_prefix", http_route_api_prefix) + _setter("logins", logins) + _setter("microsoft_v2s", microsoft_v2s) + _setter("require_authentication", require_authentication) + _setter("require_https", require_https) + _setter("runtime_version", runtime_version) + _setter("twitter_v2s", twitter_v2s) + _setter("unauthenticated_action", unauthenticated_action) @property @pulumi.getter(name="activeDirectoryV2s") @@ -51115,18 +70409,99 @@ def __init__(__self__, *, :param str tenant_auth_endpoint: The Azure Tenant Endpoint for the Authenticating Tenant. e.g. `https://login.microsoftonline.com/v2.0/{tenant-guid}/` :param bool www_authentication_disabled: Is the www-authenticate provider omitted from the request? """ - pulumi.set(__self__, "allowed_applications", allowed_applications) - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "allowed_groups", allowed_groups) - pulumi.set(__self__, "allowed_identities", allowed_identities) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "jwt_allowed_client_applications", jwt_allowed_client_applications) - pulumi.set(__self__, "jwt_allowed_groups", jwt_allowed_groups) - pulumi.set(__self__, "login_parameters", login_parameters) - pulumi.set(__self__, "tenant_auth_endpoint", tenant_auth_endpoint) - pulumi.set(__self__, "www_authentication_disabled", www_authentication_disabled) + GetWindowsWebAppAuthSettingsV2ActiveDirectoryV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_applications=allowed_applications, + allowed_audiences=allowed_audiences, + allowed_groups=allowed_groups, + allowed_identities=allowed_identities, + client_id=client_id, + client_secret_certificate_thumbprint=client_secret_certificate_thumbprint, + client_secret_setting_name=client_secret_setting_name, + jwt_allowed_client_applications=jwt_allowed_client_applications, + jwt_allowed_groups=jwt_allowed_groups, + login_parameters=login_parameters, + tenant_auth_endpoint=tenant_auth_endpoint, + www_authentication_disabled=www_authentication_disabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_applications: Optional[Sequence[str]] = None, + allowed_audiences: Optional[Sequence[str]] = None, + allowed_groups: Optional[Sequence[str]] = None, + allowed_identities: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret_certificate_thumbprint: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + jwt_allowed_client_applications: Optional[Sequence[str]] = None, + jwt_allowed_groups: Optional[Sequence[str]] = None, + login_parameters: Optional[Mapping[str, str]] = None, + tenant_auth_endpoint: Optional[str] = None, + www_authentication_disabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_applications is None and 'allowedApplications' in kwargs: + allowed_applications = kwargs['allowedApplications'] + if allowed_applications is None: + raise TypeError("Missing 'allowed_applications' argument") + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if allowed_groups is None and 'allowedGroups' in kwargs: + allowed_groups = kwargs['allowedGroups'] + if allowed_groups is None: + raise TypeError("Missing 'allowed_groups' argument") + if allowed_identities is None and 'allowedIdentities' in kwargs: + allowed_identities = kwargs['allowedIdentities'] + if allowed_identities is None: + raise TypeError("Missing 'allowed_identities' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_certificate_thumbprint is None and 'clientSecretCertificateThumbprint' in kwargs: + client_secret_certificate_thumbprint = kwargs['clientSecretCertificateThumbprint'] + if client_secret_certificate_thumbprint is None: + raise TypeError("Missing 'client_secret_certificate_thumbprint' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if jwt_allowed_client_applications is None and 'jwtAllowedClientApplications' in kwargs: + jwt_allowed_client_applications = kwargs['jwtAllowedClientApplications'] + if jwt_allowed_client_applications is None: + raise TypeError("Missing 'jwt_allowed_client_applications' argument") + if jwt_allowed_groups is None and 'jwtAllowedGroups' in kwargs: + jwt_allowed_groups = kwargs['jwtAllowedGroups'] + if jwt_allowed_groups is None: + raise TypeError("Missing 'jwt_allowed_groups' argument") + if login_parameters is None and 'loginParameters' in kwargs: + login_parameters = kwargs['loginParameters'] + if login_parameters is None: + raise TypeError("Missing 'login_parameters' argument") + if tenant_auth_endpoint is None and 'tenantAuthEndpoint' in kwargs: + tenant_auth_endpoint = kwargs['tenantAuthEndpoint'] + if tenant_auth_endpoint is None: + raise TypeError("Missing 'tenant_auth_endpoint' argument") + if www_authentication_disabled is None and 'wwwAuthenticationDisabled' in kwargs: + www_authentication_disabled = kwargs['wwwAuthenticationDisabled'] + if www_authentication_disabled is None: + raise TypeError("Missing 'www_authentication_disabled' argument") + + _setter("allowed_applications", allowed_applications) + _setter("allowed_audiences", allowed_audiences) + _setter("allowed_groups", allowed_groups) + _setter("allowed_identities", allowed_identities) + _setter("client_id", client_id) + _setter("client_secret_certificate_thumbprint", client_secret_certificate_thumbprint) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("jwt_allowed_client_applications", jwt_allowed_client_applications) + _setter("jwt_allowed_groups", jwt_allowed_groups) + _setter("login_parameters", login_parameters) + _setter("tenant_auth_endpoint", tenant_auth_endpoint) + _setter("www_authentication_disabled", www_authentication_disabled) @property @pulumi.getter(name="allowedApplications") @@ -51236,9 +70611,36 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetWindowsWebAppAuthSettingsV2AppleV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -51272,7 +70674,22 @@ def __init__(__self__, *, """ :param str client_id: The OAuth 2.0 client ID used by the app for authentication. """ - pulumi.set(__self__, "client_id", client_id) + GetWindowsWebAppAuthSettingsV2AzureStaticWebAppV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -51310,17 +70727,88 @@ def __init__(__self__, *, :param Sequence[str] scopes: The list of the scopes that are requested while authenticating. :param str token_endpoint: The endpoint used to request a Token as supplied by `openid_configuration_endpoint` response. """ - pulumi.set(__self__, "authorisation_endpoint", authorisation_endpoint) - pulumi.set(__self__, "certification_uri", certification_uri) - pulumi.set(__self__, "client_credential_method", client_credential_method) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "issuer_endpoint", issuer_endpoint) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "name_claim_type", name_claim_type) - pulumi.set(__self__, "openid_configuration_endpoint", openid_configuration_endpoint) - pulumi.set(__self__, "scopes", scopes) - pulumi.set(__self__, "token_endpoint", token_endpoint) + GetWindowsWebAppAuthSettingsV2CustomOidcV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorisation_endpoint=authorisation_endpoint, + certification_uri=certification_uri, + client_credential_method=client_credential_method, + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + issuer_endpoint=issuer_endpoint, + name=name, + name_claim_type=name_claim_type, + openid_configuration_endpoint=openid_configuration_endpoint, + scopes=scopes, + token_endpoint=token_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorisation_endpoint: Optional[str] = None, + certification_uri: Optional[str] = None, + client_credential_method: Optional[str] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + issuer_endpoint: Optional[str] = None, + name: Optional[str] = None, + name_claim_type: Optional[str] = None, + openid_configuration_endpoint: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + token_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorisation_endpoint is None and 'authorisationEndpoint' in kwargs: + authorisation_endpoint = kwargs['authorisationEndpoint'] + if authorisation_endpoint is None: + raise TypeError("Missing 'authorisation_endpoint' argument") + if certification_uri is None and 'certificationUri' in kwargs: + certification_uri = kwargs['certificationUri'] + if certification_uri is None: + raise TypeError("Missing 'certification_uri' argument") + if client_credential_method is None and 'clientCredentialMethod' in kwargs: + client_credential_method = kwargs['clientCredentialMethod'] + if client_credential_method is None: + raise TypeError("Missing 'client_credential_method' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if issuer_endpoint is None and 'issuerEndpoint' in kwargs: + issuer_endpoint = kwargs['issuerEndpoint'] + if issuer_endpoint is None: + raise TypeError("Missing 'issuer_endpoint' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if name_claim_type is None and 'nameClaimType' in kwargs: + name_claim_type = kwargs['nameClaimType'] + if name_claim_type is None: + raise TypeError("Missing 'name_claim_type' argument") + if openid_configuration_endpoint is None and 'openidConfigurationEndpoint' in kwargs: + openid_configuration_endpoint = kwargs['openidConfigurationEndpoint'] + if openid_configuration_endpoint is None: + raise TypeError("Missing 'openid_configuration_endpoint' argument") + if scopes is None: + raise TypeError("Missing 'scopes' argument") + if token_endpoint is None and 'tokenEndpoint' in kwargs: + token_endpoint = kwargs['tokenEndpoint'] + if token_endpoint is None: + raise TypeError("Missing 'token_endpoint' argument") + + _setter("authorisation_endpoint", authorisation_endpoint) + _setter("certification_uri", certification_uri) + _setter("client_credential_method", client_credential_method) + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("issuer_endpoint", issuer_endpoint) + _setter("name", name) + _setter("name_claim_type", name_claim_type) + _setter("openid_configuration_endpoint", openid_configuration_endpoint) + _setter("scopes", scopes) + _setter("token_endpoint", token_endpoint) @property @pulumi.getter(name="authorisationEndpoint") @@ -51424,10 +70912,43 @@ def __init__(__self__, *, :param str graph_api_version: The version of the Facebook API to be used while logging in. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_secret_setting_name", app_secret_setting_name) - pulumi.set(__self__, "graph_api_version", graph_api_version) - pulumi.set(__self__, "login_scopes", login_scopes) + GetWindowsWebAppAuthSettingsV2FacebookV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_secret_setting_name=app_secret_setting_name, + graph_api_version=graph_api_version, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_secret_setting_name: Optional[str] = None, + graph_api_version: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_secret_setting_name is None and 'appSecretSettingName' in kwargs: + app_secret_setting_name = kwargs['appSecretSettingName'] + if app_secret_setting_name is None: + raise TypeError("Missing 'app_secret_setting_name' argument") + if graph_api_version is None and 'graphApiVersion' in kwargs: + graph_api_version = kwargs['graphApiVersion'] + if graph_api_version is None: + raise TypeError("Missing 'graph_api_version' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("app_id", app_id) + _setter("app_secret_setting_name", app_secret_setting_name) + _setter("graph_api_version", graph_api_version) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="appId") @@ -51473,9 +70994,36 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetWindowsWebAppAuthSettingsV2GithubV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="clientId") @@ -51515,10 +71063,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetWindowsWebAppAuthSettingsV2GoogleV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_audiences=allowed_audiences, + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_audiences: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("allowed_audiences", allowed_audiences) + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="allowedAudiences") @@ -51580,17 +71161,92 @@ def __init__(__self__, *, :param str token_store_sas_setting_name: The name of the app setting which contains the SAS URL of the blob storage containing the tokens. :param bool validate_nonce: Is the nonce validated while completing the login flow. """ - pulumi.set(__self__, "allowed_external_redirect_urls", allowed_external_redirect_urls) - pulumi.set(__self__, "cookie_expiration_convention", cookie_expiration_convention) - pulumi.set(__self__, "cookie_expiration_time", cookie_expiration_time) - pulumi.set(__self__, "logout_endpoint", logout_endpoint) - pulumi.set(__self__, "nonce_expiration_time", nonce_expiration_time) - pulumi.set(__self__, "preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) - pulumi.set(__self__, "token_refresh_extension_time", token_refresh_extension_time) - pulumi.set(__self__, "token_store_enabled", token_store_enabled) - pulumi.set(__self__, "token_store_path", token_store_path) - pulumi.set(__self__, "token_store_sas_setting_name", token_store_sas_setting_name) - pulumi.set(__self__, "validate_nonce", validate_nonce) + GetWindowsWebAppAuthSettingsV2LoginResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_external_redirect_urls=allowed_external_redirect_urls, + cookie_expiration_convention=cookie_expiration_convention, + cookie_expiration_time=cookie_expiration_time, + logout_endpoint=logout_endpoint, + nonce_expiration_time=nonce_expiration_time, + preserve_url_fragments_for_logins=preserve_url_fragments_for_logins, + token_refresh_extension_time=token_refresh_extension_time, + token_store_enabled=token_store_enabled, + token_store_path=token_store_path, + token_store_sas_setting_name=token_store_sas_setting_name, + validate_nonce=validate_nonce, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_external_redirect_urls: Optional[Sequence[str]] = None, + cookie_expiration_convention: Optional[str] = None, + cookie_expiration_time: Optional[str] = None, + logout_endpoint: Optional[str] = None, + nonce_expiration_time: Optional[str] = None, + preserve_url_fragments_for_logins: Optional[bool] = None, + token_refresh_extension_time: Optional[float] = None, + token_store_enabled: Optional[bool] = None, + token_store_path: Optional[str] = None, + token_store_sas_setting_name: Optional[str] = None, + validate_nonce: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_external_redirect_urls is None and 'allowedExternalRedirectUrls' in kwargs: + allowed_external_redirect_urls = kwargs['allowedExternalRedirectUrls'] + if allowed_external_redirect_urls is None: + raise TypeError("Missing 'allowed_external_redirect_urls' argument") + if cookie_expiration_convention is None and 'cookieExpirationConvention' in kwargs: + cookie_expiration_convention = kwargs['cookieExpirationConvention'] + if cookie_expiration_convention is None: + raise TypeError("Missing 'cookie_expiration_convention' argument") + if cookie_expiration_time is None and 'cookieExpirationTime' in kwargs: + cookie_expiration_time = kwargs['cookieExpirationTime'] + if cookie_expiration_time is None: + raise TypeError("Missing 'cookie_expiration_time' argument") + if logout_endpoint is None and 'logoutEndpoint' in kwargs: + logout_endpoint = kwargs['logoutEndpoint'] + if logout_endpoint is None: + raise TypeError("Missing 'logout_endpoint' argument") + if nonce_expiration_time is None and 'nonceExpirationTime' in kwargs: + nonce_expiration_time = kwargs['nonceExpirationTime'] + if nonce_expiration_time is None: + raise TypeError("Missing 'nonce_expiration_time' argument") + if preserve_url_fragments_for_logins is None and 'preserveUrlFragmentsForLogins' in kwargs: + preserve_url_fragments_for_logins = kwargs['preserveUrlFragmentsForLogins'] + if preserve_url_fragments_for_logins is None: + raise TypeError("Missing 'preserve_url_fragments_for_logins' argument") + if token_refresh_extension_time is None and 'tokenRefreshExtensionTime' in kwargs: + token_refresh_extension_time = kwargs['tokenRefreshExtensionTime'] + if token_refresh_extension_time is None: + raise TypeError("Missing 'token_refresh_extension_time' argument") + if token_store_enabled is None and 'tokenStoreEnabled' in kwargs: + token_store_enabled = kwargs['tokenStoreEnabled'] + if token_store_enabled is None: + raise TypeError("Missing 'token_store_enabled' argument") + if token_store_path is None and 'tokenStorePath' in kwargs: + token_store_path = kwargs['tokenStorePath'] + if token_store_path is None: + raise TypeError("Missing 'token_store_path' argument") + if token_store_sas_setting_name is None and 'tokenStoreSasSettingName' in kwargs: + token_store_sas_setting_name = kwargs['tokenStoreSasSettingName'] + if token_store_sas_setting_name is None: + raise TypeError("Missing 'token_store_sas_setting_name' argument") + if validate_nonce is None and 'validateNonce' in kwargs: + validate_nonce = kwargs['validateNonce'] + if validate_nonce is None: + raise TypeError("Missing 'validate_nonce' argument") + + _setter("allowed_external_redirect_urls", allowed_external_redirect_urls) + _setter("cookie_expiration_convention", cookie_expiration_convention) + _setter("cookie_expiration_time", cookie_expiration_time) + _setter("logout_endpoint", logout_endpoint) + _setter("nonce_expiration_time", nonce_expiration_time) + _setter("preserve_url_fragments_for_logins", preserve_url_fragments_for_logins) + _setter("token_refresh_extension_time", token_refresh_extension_time) + _setter("token_store_enabled", token_store_enabled) + _setter("token_store_path", token_store_path) + _setter("token_store_sas_setting_name", token_store_sas_setting_name) + _setter("validate_nonce", validate_nonce) @property @pulumi.getter(name="allowedExternalRedirectUrls") @@ -51694,10 +71350,43 @@ def __init__(__self__, *, :param str client_secret_setting_name: The app setting name containing the OAuth 2.0 client secret used by the app for authentication. :param Sequence[str] login_scopes: The list of Login scopes that are requested as part of Microsoft Account authentication. """ - pulumi.set(__self__, "allowed_audiences", allowed_audiences) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret_setting_name", client_secret_setting_name) - pulumi.set(__self__, "login_scopes", login_scopes) + GetWindowsWebAppAuthSettingsV2MicrosoftV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_audiences=allowed_audiences, + client_id=client_id, + client_secret_setting_name=client_secret_setting_name, + login_scopes=login_scopes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_audiences: Optional[Sequence[str]] = None, + client_id: Optional[str] = None, + client_secret_setting_name: Optional[str] = None, + login_scopes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_audiences is None and 'allowedAudiences' in kwargs: + allowed_audiences = kwargs['allowedAudiences'] + if allowed_audiences is None: + raise TypeError("Missing 'allowed_audiences' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret_setting_name is None and 'clientSecretSettingName' in kwargs: + client_secret_setting_name = kwargs['clientSecretSettingName'] + if client_secret_setting_name is None: + raise TypeError("Missing 'client_secret_setting_name' argument") + if login_scopes is None and 'loginScopes' in kwargs: + login_scopes = kwargs['loginScopes'] + if login_scopes is None: + raise TypeError("Missing 'login_scopes' argument") + + _setter("allowed_audiences", allowed_audiences) + _setter("client_id", client_id) + _setter("client_secret_setting_name", client_secret_setting_name) + _setter("login_scopes", login_scopes) @property @pulumi.getter(name="allowedAudiences") @@ -51741,8 +71430,29 @@ def __init__(__self__, *, :param str consumer_key: The OAuth 1.0a consumer key of the Twitter application used for sign-in. :param str consumer_secret_setting_name: The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. """ - pulumi.set(__self__, "consumer_key", consumer_key) - pulumi.set(__self__, "consumer_secret_setting_name", consumer_secret_setting_name) + GetWindowsWebAppAuthSettingsV2TwitterV2Result._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_key=consumer_key, + consumer_secret_setting_name=consumer_secret_setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_key: Optional[str] = None, + consumer_secret_setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_key is None and 'consumerKey' in kwargs: + consumer_key = kwargs['consumerKey'] + if consumer_key is None: + raise TypeError("Missing 'consumer_key' argument") + if consumer_secret_setting_name is None and 'consumerSecretSettingName' in kwargs: + consumer_secret_setting_name = kwargs['consumerSecretSettingName'] + if consumer_secret_setting_name is None: + raise TypeError("Missing 'consumer_secret_setting_name' argument") + + _setter("consumer_key", consumer_key) + _setter("consumer_secret_setting_name", consumer_secret_setting_name) @property @pulumi.getter(name="consumerKey") @@ -51774,10 +71484,37 @@ def __init__(__self__, *, :param Sequence['GetWindowsWebAppBackupScheduleArgs'] schedules: A `schedule` block as defined below. :param str storage_account_url: The SAS URL to the container. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "storage_account_url", storage_account_url) + GetWindowsWebAppBackupResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + name=name, + schedules=schedules, + storage_account_url=storage_account_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + name: Optional[str] = None, + schedules: Optional[Sequence['outputs.GetWindowsWebAppBackupScheduleResult']] = None, + storage_account_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + if storage_account_url is None: + raise TypeError("Missing 'storage_account_url' argument") + + _setter("enabled", enabled) + _setter("name", name) + _setter("schedules", schedules) + _setter("storage_account_url", storage_account_url) @property @pulumi.getter @@ -51829,12 +71566,57 @@ def __init__(__self__, *, :param int retention_period_days: After how many days backups should be deleted. :param str start_time: When the schedule should start in RFC-3339 format. """ - pulumi.set(__self__, "frequency_interval", frequency_interval) - pulumi.set(__self__, "frequency_unit", frequency_unit) - pulumi.set(__self__, "keep_at_least_one_backup", keep_at_least_one_backup) - pulumi.set(__self__, "last_execution_time", last_execution_time) - pulumi.set(__self__, "retention_period_days", retention_period_days) - pulumi.set(__self__, "start_time", start_time) + GetWindowsWebAppBackupScheduleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency_interval=frequency_interval, + frequency_unit=frequency_unit, + keep_at_least_one_backup=keep_at_least_one_backup, + last_execution_time=last_execution_time, + retention_period_days=retention_period_days, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency_interval: Optional[int] = None, + frequency_unit: Optional[str] = None, + keep_at_least_one_backup: Optional[bool] = None, + last_execution_time: Optional[str] = None, + retention_period_days: Optional[int] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_interval is None and 'frequencyInterval' in kwargs: + frequency_interval = kwargs['frequencyInterval'] + if frequency_interval is None: + raise TypeError("Missing 'frequency_interval' argument") + if frequency_unit is None and 'frequencyUnit' in kwargs: + frequency_unit = kwargs['frequencyUnit'] + if frequency_unit is None: + raise TypeError("Missing 'frequency_unit' argument") + if keep_at_least_one_backup is None and 'keepAtLeastOneBackup' in kwargs: + keep_at_least_one_backup = kwargs['keepAtLeastOneBackup'] + if keep_at_least_one_backup is None: + raise TypeError("Missing 'keep_at_least_one_backup' argument") + if last_execution_time is None and 'lastExecutionTime' in kwargs: + last_execution_time = kwargs['lastExecutionTime'] + if last_execution_time is None: + raise TypeError("Missing 'last_execution_time' argument") + if retention_period_days is None and 'retentionPeriodDays' in kwargs: + retention_period_days = kwargs['retentionPeriodDays'] + if retention_period_days is None: + raise TypeError("Missing 'retention_period_days' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + + _setter("frequency_interval", frequency_interval) + _setter("frequency_unit", frequency_unit) + _setter("keep_at_least_one_backup", keep_at_least_one_backup) + _setter("last_execution_time", last_execution_time) + _setter("retention_period_days", retention_period_days) + _setter("start_time", start_time) @property @pulumi.getter(name="frequencyInterval") @@ -51896,9 +71678,30 @@ def __init__(__self__, *, :param str type: The Azure Storage Type. :param str value: The Connection String value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + GetWindowsWebAppConnectionStringResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -51938,10 +71741,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the Managed Service Identity. :param str type: The Azure Storage Type. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetWindowsWebAppIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -51989,10 +71823,43 @@ def __init__(__self__, *, :param bool failed_request_tracing: Is Failed Request Tracing enabled. :param Sequence['GetWindowsWebAppLogHttpLogArgs'] http_logs: An `http_logs` block as defined above. """ - pulumi.set(__self__, "application_logs", application_logs) - pulumi.set(__self__, "detailed_error_messages", detailed_error_messages) - pulumi.set(__self__, "failed_request_tracing", failed_request_tracing) - pulumi.set(__self__, "http_logs", http_logs) + GetWindowsWebAppLogResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_logs=application_logs, + detailed_error_messages=detailed_error_messages, + failed_request_tracing=failed_request_tracing, + http_logs=http_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_logs: Optional[Sequence['outputs.GetWindowsWebAppLogApplicationLogResult']] = None, + detailed_error_messages: Optional[bool] = None, + failed_request_tracing: Optional[bool] = None, + http_logs: Optional[Sequence['outputs.GetWindowsWebAppLogHttpLogResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_logs is None and 'applicationLogs' in kwargs: + application_logs = kwargs['applicationLogs'] + if application_logs is None: + raise TypeError("Missing 'application_logs' argument") + if detailed_error_messages is None and 'detailedErrorMessages' in kwargs: + detailed_error_messages = kwargs['detailedErrorMessages'] + if detailed_error_messages is None: + raise TypeError("Missing 'detailed_error_messages' argument") + if failed_request_tracing is None and 'failedRequestTracing' in kwargs: + failed_request_tracing = kwargs['failedRequestTracing'] + if failed_request_tracing is None: + raise TypeError("Missing 'failed_request_tracing' argument") + if http_logs is None and 'httpLogs' in kwargs: + http_logs = kwargs['httpLogs'] + if http_logs is None: + raise TypeError("Missing 'http_logs' argument") + + _setter("application_logs", application_logs) + _setter("detailed_error_messages", detailed_error_messages) + _setter("failed_request_tracing", failed_request_tracing) + _setter("http_logs", http_logs) @property @pulumi.getter(name="applicationLogs") @@ -52036,8 +71903,29 @@ def __init__(__self__, *, :param Sequence['GetWindowsWebAppLogApplicationLogAzureBlobStorageArgs'] azure_blob_storages: A `azure_blob_storage` block as defined above. :param str file_system_level: The logging level. """ - pulumi.set(__self__, "azure_blob_storages", azure_blob_storages) - pulumi.set(__self__, "file_system_level", file_system_level) + GetWindowsWebAppLogApplicationLogResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storages=azure_blob_storages, + file_system_level=file_system_level, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storages: Optional[Sequence['outputs.GetWindowsWebAppLogApplicationLogAzureBlobStorageResult']] = None, + file_system_level: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storages is None and 'azureBlobStorages' in kwargs: + azure_blob_storages = kwargs['azureBlobStorages'] + if azure_blob_storages is None: + raise TypeError("Missing 'azure_blob_storages' argument") + if file_system_level is None and 'fileSystemLevel' in kwargs: + file_system_level = kwargs['fileSystemLevel'] + if file_system_level is None: + raise TypeError("Missing 'file_system_level' argument") + + _setter("azure_blob_storages", azure_blob_storages) + _setter("file_system_level", file_system_level) @property @pulumi.getter(name="azureBlobStorages") @@ -52067,9 +71955,34 @@ def __init__(__self__, *, :param int retention_in_days: The retention period in days. :param str sas_url: The SAS url to the Azure Blob container. """ - pulumi.set(__self__, "level", level) - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + GetWindowsWebAppLogApplicationLogAzureBlobStorageResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + level=level, + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + level: Optional[str] = None, + retention_in_days: Optional[int] = None, + sas_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if level is None: + raise TypeError("Missing 'level' argument") + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("level", level) + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter @@ -52105,8 +72018,29 @@ def __init__(__self__, *, :param Sequence['GetWindowsWebAppLogHttpLogAzureBlobStorageArgs'] azure_blob_storages: A `azure_blob_storage` block as defined above. :param Sequence['GetWindowsWebAppLogHttpLogFileSystemArgs'] file_systems: A `file_system` block as defined above. """ - pulumi.set(__self__, "azure_blob_storages", azure_blob_storages) - pulumi.set(__self__, "file_systems", file_systems) + GetWindowsWebAppLogHttpLogResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_storages=azure_blob_storages, + file_systems=file_systems, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_storages: Optional[Sequence['outputs.GetWindowsWebAppLogHttpLogAzureBlobStorageResult']] = None, + file_systems: Optional[Sequence['outputs.GetWindowsWebAppLogHttpLogFileSystemResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_storages is None and 'azureBlobStorages' in kwargs: + azure_blob_storages = kwargs['azureBlobStorages'] + if azure_blob_storages is None: + raise TypeError("Missing 'azure_blob_storages' argument") + if file_systems is None and 'fileSystems' in kwargs: + file_systems = kwargs['fileSystems'] + if file_systems is None: + raise TypeError("Missing 'file_systems' argument") + + _setter("azure_blob_storages", azure_blob_storages) + _setter("file_systems", file_systems) @property @pulumi.getter(name="azureBlobStorages") @@ -52134,8 +72068,29 @@ def __init__(__self__, *, :param int retention_in_days: The retention period in days. :param str sas_url: The SAS url to the Azure Blob container. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "sas_url", sas_url) + GetWindowsWebAppLogHttpLogAzureBlobStorageResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[int] = None, + sas_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if sas_url is None: + raise TypeError("Missing 'sas_url' argument") + + _setter("retention_in_days", retention_in_days) + _setter("sas_url", sas_url) @property @pulumi.getter(name="retentionInDays") @@ -52163,8 +72118,29 @@ def __init__(__self__, *, :param int retention_in_days: The retention period in days. :param int retention_in_mb: The maximum size in megabytes that log files can use. """ - pulumi.set(__self__, "retention_in_days", retention_in_days) - pulumi.set(__self__, "retention_in_mb", retention_in_mb) + GetWindowsWebAppLogHttpLogFileSystemResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_in_days=retention_in_days, + retention_in_mb=retention_in_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_in_days: Optional[int] = None, + retention_in_mb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if retention_in_days is None: + raise TypeError("Missing 'retention_in_days' argument") + if retention_in_mb is None and 'retentionInMb' in kwargs: + retention_in_mb = kwargs['retentionInMb'] + if retention_in_mb is None: + raise TypeError("Missing 'retention_in_mb' argument") + + _setter("retention_in_days", retention_in_days) + _setter("retention_in_mb", retention_in_mb) @property @pulumi.getter(name="retentionInDays") @@ -52253,39 +72229,244 @@ def __init__(__self__, *, :param str windows_fx_version: The string representation of the Windows FX Version. :param int worker_count: The number of Workers for this Windows App Service. """ - pulumi.set(__self__, "always_on", always_on) - pulumi.set(__self__, "api_definition_url", api_definition_url) - pulumi.set(__self__, "api_management_api_id", api_management_api_id) - pulumi.set(__self__, "app_command_line", app_command_line) - pulumi.set(__self__, "application_stacks", application_stacks) - pulumi.set(__self__, "auto_heal_enabled", auto_heal_enabled) - pulumi.set(__self__, "auto_heal_settings", auto_heal_settings) - pulumi.set(__self__, "container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) - pulumi.set(__self__, "container_registry_use_managed_identity", container_registry_use_managed_identity) - pulumi.set(__self__, "cors", cors) - pulumi.set(__self__, "default_documents", default_documents) - pulumi.set(__self__, "detailed_error_logging_enabled", detailed_error_logging_enabled) - pulumi.set(__self__, "ftps_state", ftps_state) - pulumi.set(__self__, "health_check_eviction_time_in_min", health_check_eviction_time_in_min) - pulumi.set(__self__, "health_check_path", health_check_path) - pulumi.set(__self__, "http2_enabled", http2_enabled) - pulumi.set(__self__, "ip_restrictions", ip_restrictions) - pulumi.set(__self__, "load_balancing_mode", load_balancing_mode) - pulumi.set(__self__, "local_mysql_enabled", local_mysql_enabled) - pulumi.set(__self__, "managed_pipeline_mode", managed_pipeline_mode) - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) - pulumi.set(__self__, "remote_debugging_enabled", remote_debugging_enabled) - pulumi.set(__self__, "remote_debugging_version", remote_debugging_version) - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) - pulumi.set(__self__, "scm_minimum_tls_version", scm_minimum_tls_version) - pulumi.set(__self__, "scm_type", scm_type) - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) - pulumi.set(__self__, "use32_bit_worker", use32_bit_worker) - pulumi.set(__self__, "virtual_applications", virtual_applications) - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) - pulumi.set(__self__, "websockets_enabled", websockets_enabled) - pulumi.set(__self__, "windows_fx_version", windows_fx_version) - pulumi.set(__self__, "worker_count", worker_count) + GetWindowsWebAppSiteConfigResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + api_definition_url=api_definition_url, + api_management_api_id=api_management_api_id, + app_command_line=app_command_line, + application_stacks=application_stacks, + auto_heal_enabled=auto_heal_enabled, + auto_heal_settings=auto_heal_settings, + container_registry_managed_identity_client_id=container_registry_managed_identity_client_id, + container_registry_use_managed_identity=container_registry_use_managed_identity, + cors=cors, + default_documents=default_documents, + detailed_error_logging_enabled=detailed_error_logging_enabled, + ftps_state=ftps_state, + health_check_eviction_time_in_min=health_check_eviction_time_in_min, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + load_balancing_mode=load_balancing_mode, + local_mysql_enabled=local_mysql_enabled, + managed_pipeline_mode=managed_pipeline_mode, + minimum_tls_version=minimum_tls_version, + remote_debugging_enabled=remote_debugging_enabled, + remote_debugging_version=remote_debugging_version, + scm_ip_restrictions=scm_ip_restrictions, + scm_minimum_tls_version=scm_minimum_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker=use32_bit_worker, + virtual_applications=virtual_applications, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + windows_fx_version=windows_fx_version, + worker_count=worker_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + api_definition_url: Optional[str] = None, + api_management_api_id: Optional[str] = None, + app_command_line: Optional[str] = None, + application_stacks: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigApplicationStackResult']] = None, + auto_heal_enabled: Optional[bool] = None, + auto_heal_settings: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigAutoHealSettingResult']] = None, + container_registry_managed_identity_client_id: Optional[str] = None, + container_registry_use_managed_identity: Optional[bool] = None, + cors: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigCorResult']] = None, + default_documents: Optional[Sequence[str]] = None, + detailed_error_logging_enabled: Optional[bool] = None, + ftps_state: Optional[str] = None, + health_check_eviction_time_in_min: Optional[int] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigIpRestrictionResult']] = None, + load_balancing_mode: Optional[str] = None, + local_mysql_enabled: Optional[bool] = None, + managed_pipeline_mode: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + remote_debugging_enabled: Optional[bool] = None, + remote_debugging_version: Optional[str] = None, + scm_ip_restrictions: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigScmIpRestrictionResult']] = None, + scm_minimum_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker: Optional[bool] = None, + virtual_applications: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigVirtualApplicationResult']] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + windows_fx_version: Optional[str] = None, + worker_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if always_on is None: + raise TypeError("Missing 'always_on' argument") + if api_definition_url is None and 'apiDefinitionUrl' in kwargs: + api_definition_url = kwargs['apiDefinitionUrl'] + if api_definition_url is None: + raise TypeError("Missing 'api_definition_url' argument") + if api_management_api_id is None and 'apiManagementApiId' in kwargs: + api_management_api_id = kwargs['apiManagementApiId'] + if api_management_api_id is None: + raise TypeError("Missing 'api_management_api_id' argument") + if app_command_line is None and 'appCommandLine' in kwargs: + app_command_line = kwargs['appCommandLine'] + if app_command_line is None: + raise TypeError("Missing 'app_command_line' argument") + if application_stacks is None and 'applicationStacks' in kwargs: + application_stacks = kwargs['applicationStacks'] + if application_stacks is None: + raise TypeError("Missing 'application_stacks' argument") + if auto_heal_enabled is None and 'autoHealEnabled' in kwargs: + auto_heal_enabled = kwargs['autoHealEnabled'] + if auto_heal_enabled is None: + raise TypeError("Missing 'auto_heal_enabled' argument") + if auto_heal_settings is None and 'autoHealSettings' in kwargs: + auto_heal_settings = kwargs['autoHealSettings'] + if auto_heal_settings is None: + raise TypeError("Missing 'auto_heal_settings' argument") + if container_registry_managed_identity_client_id is None and 'containerRegistryManagedIdentityClientId' in kwargs: + container_registry_managed_identity_client_id = kwargs['containerRegistryManagedIdentityClientId'] + if container_registry_managed_identity_client_id is None: + raise TypeError("Missing 'container_registry_managed_identity_client_id' argument") + if container_registry_use_managed_identity is None and 'containerRegistryUseManagedIdentity' in kwargs: + container_registry_use_managed_identity = kwargs['containerRegistryUseManagedIdentity'] + if container_registry_use_managed_identity is None: + raise TypeError("Missing 'container_registry_use_managed_identity' argument") + if cors is None: + raise TypeError("Missing 'cors' argument") + if default_documents is None and 'defaultDocuments' in kwargs: + default_documents = kwargs['defaultDocuments'] + if default_documents is None: + raise TypeError("Missing 'default_documents' argument") + if detailed_error_logging_enabled is None and 'detailedErrorLoggingEnabled' in kwargs: + detailed_error_logging_enabled = kwargs['detailedErrorLoggingEnabled'] + if detailed_error_logging_enabled is None: + raise TypeError("Missing 'detailed_error_logging_enabled' argument") + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if ftps_state is None: + raise TypeError("Missing 'ftps_state' argument") + if health_check_eviction_time_in_min is None and 'healthCheckEvictionTimeInMin' in kwargs: + health_check_eviction_time_in_min = kwargs['healthCheckEvictionTimeInMin'] + if health_check_eviction_time_in_min is None: + raise TypeError("Missing 'health_check_eviction_time_in_min' argument") + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if health_check_path is None: + raise TypeError("Missing 'health_check_path' argument") + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if http2_enabled is None: + raise TypeError("Missing 'http2_enabled' argument") + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if ip_restrictions is None: + raise TypeError("Missing 'ip_restrictions' argument") + if load_balancing_mode is None and 'loadBalancingMode' in kwargs: + load_balancing_mode = kwargs['loadBalancingMode'] + if load_balancing_mode is None: + raise TypeError("Missing 'load_balancing_mode' argument") + if local_mysql_enabled is None and 'localMysqlEnabled' in kwargs: + local_mysql_enabled = kwargs['localMysqlEnabled'] + if local_mysql_enabled is None: + raise TypeError("Missing 'local_mysql_enabled' argument") + if managed_pipeline_mode is None and 'managedPipelineMode' in kwargs: + managed_pipeline_mode = kwargs['managedPipelineMode'] + if managed_pipeline_mode is None: + raise TypeError("Missing 'managed_pipeline_mode' argument") + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if minimum_tls_version is None: + raise TypeError("Missing 'minimum_tls_version' argument") + if remote_debugging_enabled is None and 'remoteDebuggingEnabled' in kwargs: + remote_debugging_enabled = kwargs['remoteDebuggingEnabled'] + if remote_debugging_enabled is None: + raise TypeError("Missing 'remote_debugging_enabled' argument") + if remote_debugging_version is None and 'remoteDebuggingVersion' in kwargs: + remote_debugging_version = kwargs['remoteDebuggingVersion'] + if remote_debugging_version is None: + raise TypeError("Missing 'remote_debugging_version' argument") + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_ip_restrictions is None: + raise TypeError("Missing 'scm_ip_restrictions' argument") + if scm_minimum_tls_version is None and 'scmMinimumTlsVersion' in kwargs: + scm_minimum_tls_version = kwargs['scmMinimumTlsVersion'] + if scm_minimum_tls_version is None: + raise TypeError("Missing 'scm_minimum_tls_version' argument") + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_type is None: + raise TypeError("Missing 'scm_type' argument") + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if scm_use_main_ip_restriction is None: + raise TypeError("Missing 'scm_use_main_ip_restriction' argument") + if use32_bit_worker is None and 'use32BitWorker' in kwargs: + use32_bit_worker = kwargs['use32BitWorker'] + if use32_bit_worker is None: + raise TypeError("Missing 'use32_bit_worker' argument") + if virtual_applications is None and 'virtualApplications' in kwargs: + virtual_applications = kwargs['virtualApplications'] + if virtual_applications is None: + raise TypeError("Missing 'virtual_applications' argument") + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if vnet_route_all_enabled is None: + raise TypeError("Missing 'vnet_route_all_enabled' argument") + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if websockets_enabled is None: + raise TypeError("Missing 'websockets_enabled' argument") + if windows_fx_version is None and 'windowsFxVersion' in kwargs: + windows_fx_version = kwargs['windowsFxVersion'] + if windows_fx_version is None: + raise TypeError("Missing 'windows_fx_version' argument") + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if worker_count is None: + raise TypeError("Missing 'worker_count' argument") + + _setter("always_on", always_on) + _setter("api_definition_url", api_definition_url) + _setter("api_management_api_id", api_management_api_id) + _setter("app_command_line", app_command_line) + _setter("application_stacks", application_stacks) + _setter("auto_heal_enabled", auto_heal_enabled) + _setter("auto_heal_settings", auto_heal_settings) + _setter("container_registry_managed_identity_client_id", container_registry_managed_identity_client_id) + _setter("container_registry_use_managed_identity", container_registry_use_managed_identity) + _setter("cors", cors) + _setter("default_documents", default_documents) + _setter("detailed_error_logging_enabled", detailed_error_logging_enabled) + _setter("ftps_state", ftps_state) + _setter("health_check_eviction_time_in_min", health_check_eviction_time_in_min) + _setter("health_check_path", health_check_path) + _setter("http2_enabled", http2_enabled) + _setter("ip_restrictions", ip_restrictions) + _setter("load_balancing_mode", load_balancing_mode) + _setter("local_mysql_enabled", local_mysql_enabled) + _setter("managed_pipeline_mode", managed_pipeline_mode) + _setter("minimum_tls_version", minimum_tls_version) + _setter("remote_debugging_enabled", remote_debugging_enabled) + _setter("remote_debugging_version", remote_debugging_version) + _setter("scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_minimum_tls_version", scm_minimum_tls_version) + _setter("scm_type", scm_type) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("use32_bit_worker", use32_bit_worker) + _setter("virtual_applications", virtual_applications) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) + _setter("websockets_enabled", websockets_enabled) + _setter("windows_fx_version", windows_fx_version) + _setter("worker_count", worker_count) @property @pulumi.getter(name="alwaysOn") @@ -52585,25 +72766,146 @@ def __init__(__self__, *, :param str php_version: The Version of the PHP in use. :param str python_version: The Version of Python in use. """ - pulumi.set(__self__, "current_stack", current_stack) - pulumi.set(__self__, "docker_container_name", docker_container_name) - pulumi.set(__self__, "docker_container_registry", docker_container_registry) - pulumi.set(__self__, "docker_container_tag", docker_container_tag) - pulumi.set(__self__, "docker_image_name", docker_image_name) - pulumi.set(__self__, "docker_registry_password", docker_registry_password) - pulumi.set(__self__, "docker_registry_url", docker_registry_url) - pulumi.set(__self__, "docker_registry_username", docker_registry_username) - pulumi.set(__self__, "dotnet_core_version", dotnet_core_version) - pulumi.set(__self__, "dotnet_version", dotnet_version) - pulumi.set(__self__, "java_container", java_container) - pulumi.set(__self__, "java_container_version", java_container_version) - pulumi.set(__self__, "java_embedded_server_enabled", java_embedded_server_enabled) - pulumi.set(__self__, "java_version", java_version) - pulumi.set(__self__, "node_version", node_version) - pulumi.set(__self__, "php_version", php_version) - pulumi.set(__self__, "python", python) - pulumi.set(__self__, "python_version", python_version) - pulumi.set(__self__, "tomcat_version", tomcat_version) + GetWindowsWebAppSiteConfigApplicationStackResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + current_stack=current_stack, + docker_container_name=docker_container_name, + docker_container_registry=docker_container_registry, + docker_container_tag=docker_container_tag, + docker_image_name=docker_image_name, + docker_registry_password=docker_registry_password, + docker_registry_url=docker_registry_url, + docker_registry_username=docker_registry_username, + dotnet_core_version=dotnet_core_version, + dotnet_version=dotnet_version, + java_container=java_container, + java_container_version=java_container_version, + java_embedded_server_enabled=java_embedded_server_enabled, + java_version=java_version, + node_version=node_version, + php_version=php_version, + python=python, + python_version=python_version, + tomcat_version=tomcat_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + current_stack: Optional[str] = None, + docker_container_name: Optional[str] = None, + docker_container_registry: Optional[str] = None, + docker_container_tag: Optional[str] = None, + docker_image_name: Optional[str] = None, + docker_registry_password: Optional[str] = None, + docker_registry_url: Optional[str] = None, + docker_registry_username: Optional[str] = None, + dotnet_core_version: Optional[str] = None, + dotnet_version: Optional[str] = None, + java_container: Optional[str] = None, + java_container_version: Optional[str] = None, + java_embedded_server_enabled: Optional[bool] = None, + java_version: Optional[str] = None, + node_version: Optional[str] = None, + php_version: Optional[str] = None, + python: Optional[bool] = None, + python_version: Optional[str] = None, + tomcat_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if current_stack is None and 'currentStack' in kwargs: + current_stack = kwargs['currentStack'] + if current_stack is None: + raise TypeError("Missing 'current_stack' argument") + if docker_container_name is None and 'dockerContainerName' in kwargs: + docker_container_name = kwargs['dockerContainerName'] + if docker_container_name is None: + raise TypeError("Missing 'docker_container_name' argument") + if docker_container_registry is None and 'dockerContainerRegistry' in kwargs: + docker_container_registry = kwargs['dockerContainerRegistry'] + if docker_container_registry is None: + raise TypeError("Missing 'docker_container_registry' argument") + if docker_container_tag is None and 'dockerContainerTag' in kwargs: + docker_container_tag = kwargs['dockerContainerTag'] + if docker_container_tag is None: + raise TypeError("Missing 'docker_container_tag' argument") + if docker_image_name is None and 'dockerImageName' in kwargs: + docker_image_name = kwargs['dockerImageName'] + if docker_image_name is None: + raise TypeError("Missing 'docker_image_name' argument") + if docker_registry_password is None and 'dockerRegistryPassword' in kwargs: + docker_registry_password = kwargs['dockerRegistryPassword'] + if docker_registry_password is None: + raise TypeError("Missing 'docker_registry_password' argument") + if docker_registry_url is None and 'dockerRegistryUrl' in kwargs: + docker_registry_url = kwargs['dockerRegistryUrl'] + if docker_registry_url is None: + raise TypeError("Missing 'docker_registry_url' argument") + if docker_registry_username is None and 'dockerRegistryUsername' in kwargs: + docker_registry_username = kwargs['dockerRegistryUsername'] + if docker_registry_username is None: + raise TypeError("Missing 'docker_registry_username' argument") + if dotnet_core_version is None and 'dotnetCoreVersion' in kwargs: + dotnet_core_version = kwargs['dotnetCoreVersion'] + if dotnet_core_version is None: + raise TypeError("Missing 'dotnet_core_version' argument") + if dotnet_version is None and 'dotnetVersion' in kwargs: + dotnet_version = kwargs['dotnetVersion'] + if dotnet_version is None: + raise TypeError("Missing 'dotnet_version' argument") + if java_container is None and 'javaContainer' in kwargs: + java_container = kwargs['javaContainer'] + if java_container is None: + raise TypeError("Missing 'java_container' argument") + if java_container_version is None and 'javaContainerVersion' in kwargs: + java_container_version = kwargs['javaContainerVersion'] + if java_container_version is None: + raise TypeError("Missing 'java_container_version' argument") + if java_embedded_server_enabled is None and 'javaEmbeddedServerEnabled' in kwargs: + java_embedded_server_enabled = kwargs['javaEmbeddedServerEnabled'] + if java_embedded_server_enabled is None: + raise TypeError("Missing 'java_embedded_server_enabled' argument") + if java_version is None and 'javaVersion' in kwargs: + java_version = kwargs['javaVersion'] + if java_version is None: + raise TypeError("Missing 'java_version' argument") + if node_version is None and 'nodeVersion' in kwargs: + node_version = kwargs['nodeVersion'] + if node_version is None: + raise TypeError("Missing 'node_version' argument") + if php_version is None and 'phpVersion' in kwargs: + php_version = kwargs['phpVersion'] + if php_version is None: + raise TypeError("Missing 'php_version' argument") + if python is None: + raise TypeError("Missing 'python' argument") + if python_version is None and 'pythonVersion' in kwargs: + python_version = kwargs['pythonVersion'] + if python_version is None: + raise TypeError("Missing 'python_version' argument") + if tomcat_version is None and 'tomcatVersion' in kwargs: + tomcat_version = kwargs['tomcatVersion'] + if tomcat_version is None: + raise TypeError("Missing 'tomcat_version' argument") + + _setter("current_stack", current_stack) + _setter("docker_container_name", docker_container_name) + _setter("docker_container_registry", docker_container_registry) + _setter("docker_container_tag", docker_container_tag) + _setter("docker_image_name", docker_image_name) + _setter("docker_registry_password", docker_registry_password) + _setter("docker_registry_url", docker_registry_url) + _setter("docker_registry_username", docker_registry_username) + _setter("dotnet_core_version", dotnet_core_version) + _setter("dotnet_version", dotnet_version) + _setter("java_container", java_container) + _setter("java_container_version", java_container_version) + _setter("java_embedded_server_enabled", java_embedded_server_enabled) + _setter("java_version", java_version) + _setter("node_version", node_version) + _setter("php_version", php_version) + _setter("python", python) + _setter("python_version", python_version) + _setter("tomcat_version", tomcat_version) @property @pulumi.getter(name="currentStack") @@ -52746,8 +73048,25 @@ def __init__(__self__, *, :param Sequence['GetWindowsWebAppSiteConfigAutoHealSettingActionArgs'] actions: A `action` block as defined above. :param Sequence['GetWindowsWebAppSiteConfigAutoHealSettingTriggerArgs'] triggers: A `trigger` block as defined below. """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "triggers", triggers) + GetWindowsWebAppSiteConfigAutoHealSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + triggers=triggers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigAutoHealSettingActionResult']] = None, + triggers: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigAutoHealSettingTriggerResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if triggers is None: + raise TypeError("Missing 'triggers' argument") + + _setter("actions", actions) + _setter("triggers", triggers) @property @pulumi.getter @@ -52777,9 +73096,36 @@ def __init__(__self__, *, :param Sequence['GetWindowsWebAppSiteConfigAutoHealSettingActionCustomActionArgs'] custom_actions: A `custom_action` block as defined below. :param str minimum_process_execution_time: The minimum amount of time in `hh:mm:ss` the Windows Web App must have been running before the defined action will be run in the event of a trigger. """ - pulumi.set(__self__, "action_type", action_type) - pulumi.set(__self__, "custom_actions", custom_actions) - pulumi.set(__self__, "minimum_process_execution_time", minimum_process_execution_time) + GetWindowsWebAppSiteConfigAutoHealSettingActionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + custom_actions=custom_actions, + minimum_process_execution_time=minimum_process_execution_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[str] = None, + custom_actions: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigAutoHealSettingActionCustomActionResult']] = None, + minimum_process_execution_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + if custom_actions is None and 'customActions' in kwargs: + custom_actions = kwargs['customActions'] + if custom_actions is None: + raise TypeError("Missing 'custom_actions' argument") + if minimum_process_execution_time is None and 'minimumProcessExecutionTime' in kwargs: + minimum_process_execution_time = kwargs['minimumProcessExecutionTime'] + if minimum_process_execution_time is None: + raise TypeError("Missing 'minimum_process_execution_time' argument") + + _setter("action_type", action_type) + _setter("custom_actions", custom_actions) + _setter("minimum_process_execution_time", minimum_process_execution_time) @property @pulumi.getter(name="actionType") @@ -52815,8 +73161,25 @@ def __init__(__self__, *, :param str executable: The command run when this `auto_heal` action is triggered. :param str parameters: The parameters passed to the `executable`. """ - pulumi.set(__self__, "executable", executable) - pulumi.set(__self__, "parameters", parameters) + GetWindowsWebAppSiteConfigAutoHealSettingActionCustomActionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + executable=executable, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + executable: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if executable is None: + raise TypeError("Missing 'executable' argument") + if parameters is None: + raise TypeError("Missing 'parameters' argument") + + _setter("executable", executable) + _setter("parameters", parameters) @property @pulumi.getter @@ -52848,10 +73211,41 @@ def __init__(__self__, *, :param Sequence['GetWindowsWebAppSiteConfigAutoHealSettingTriggerSlowRequestArgs'] slow_requests: A `slow_request` block as defined above. :param Sequence['GetWindowsWebAppSiteConfigAutoHealSettingTriggerStatusCodeArgs'] status_codes: A `status_code` block as defined above. """ - pulumi.set(__self__, "private_memory_kb", private_memory_kb) - pulumi.set(__self__, "requests", requests) - pulumi.set(__self__, "slow_requests", slow_requests) - pulumi.set(__self__, "status_codes", status_codes) + GetWindowsWebAppSiteConfigAutoHealSettingTriggerResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_memory_kb=private_memory_kb, + requests=requests, + slow_requests=slow_requests, + status_codes=status_codes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_memory_kb: Optional[int] = None, + requests: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigAutoHealSettingTriggerRequestResult']] = None, + slow_requests: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigAutoHealSettingTriggerSlowRequestResult']] = None, + status_codes: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigAutoHealSettingTriggerStatusCodeResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_memory_kb is None and 'privateMemoryKb' in kwargs: + private_memory_kb = kwargs['privateMemoryKb'] + if private_memory_kb is None: + raise TypeError("Missing 'private_memory_kb' argument") + if requests is None: + raise TypeError("Missing 'requests' argument") + if slow_requests is None and 'slowRequests' in kwargs: + slow_requests = kwargs['slowRequests'] + if slow_requests is None: + raise TypeError("Missing 'slow_requests' argument") + if status_codes is None and 'statusCodes' in kwargs: + status_codes = kwargs['statusCodes'] + if status_codes is None: + raise TypeError("Missing 'status_codes' argument") + + _setter("private_memory_kb", private_memory_kb) + _setter("requests", requests) + _setter("slow_requests", slow_requests) + _setter("status_codes", status_codes) @property @pulumi.getter(name="privateMemoryKb") @@ -52895,8 +73289,25 @@ def __init__(__self__, *, :param int count: The number of occurrences of the defined `status_code` in the specified `interval` on which to trigger this rule. :param str interval: The time interval in the form `hh:mm:ss`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) + GetWindowsWebAppSiteConfigAutoHealSettingTriggerRequestResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + + _setter("count", count) + _setter("interval", interval) @property @pulumi.getter @@ -52928,10 +73339,37 @@ def __init__(__self__, *, :param str path: The path to which this rule status code applies. :param str time_taken: The amount of time that qualifies as slow for this rule. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "time_taken", time_taken) + GetWindowsWebAppSiteConfigAutoHealSettingTriggerSlowRequestResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + path=path, + time_taken=time_taken, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + path: Optional[str] = None, + time_taken: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if time_taken is None and 'timeTaken' in kwargs: + time_taken = kwargs['timeTaken'] + if time_taken is None: + raise TypeError("Missing 'time_taken' argument") + + _setter("count", count) + _setter("interval", interval) + _setter("path", path) + _setter("time_taken", time_taken) @property @pulumi.getter @@ -52983,12 +73421,51 @@ def __init__(__self__, *, :param int sub_status: The Request Sub Status of the Status Code. :param int win32_status_code: The Win32 Status Code of the Request. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "status_code_range", status_code_range) - pulumi.set(__self__, "sub_status", sub_status) - pulumi.set(__self__, "win32_status_code", win32_status_code) + GetWindowsWebAppSiteConfigAutoHealSettingTriggerStatusCodeResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + path=path, + status_code_range=status_code_range, + sub_status=sub_status, + win32_status_code=win32_status_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[str] = None, + path: Optional[str] = None, + status_code_range: Optional[str] = None, + sub_status: Optional[int] = None, + win32_status_code: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if status_code_range is None and 'statusCodeRange' in kwargs: + status_code_range = kwargs['statusCodeRange'] + if status_code_range is None: + raise TypeError("Missing 'status_code_range' argument") + if sub_status is None and 'subStatus' in kwargs: + sub_status = kwargs['subStatus'] + if sub_status is None: + raise TypeError("Missing 'sub_status' argument") + if win32_status_code is None and 'win32StatusCode' in kwargs: + win32_status_code = kwargs['win32StatusCode'] + if win32_status_code is None: + raise TypeError("Missing 'win32_status_code' argument") + + _setter("count", count) + _setter("interval", interval) + _setter("path", path) + _setter("status_code_range", status_code_range) + _setter("sub_status", sub_status) + _setter("win32_status_code", win32_status_code) @property @pulumi.getter @@ -53048,8 +73525,29 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: A `allowed_origins` block as defined above. :param bool support_credentials: Whether CORS requests with credentials are allowed. """ - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "support_credentials", support_credentials) + GetWindowsWebAppSiteConfigCorResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + if support_credentials is None: + raise TypeError("Missing 'support_credentials' argument") + + _setter("allowed_origins", allowed_origins) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -53083,13 +73581,56 @@ def __init__(__self__, *, :param str name: The name of this Windows Web App. :param str virtual_network_subnet_id: The subnet id which the Windows Web App is vNet Integrated with. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "service_tag", service_tag) - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + GetWindowsWebAppSiteConfigIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigIpRestrictionHeaderResult']] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if service_tag is None: + raise TypeError("Missing 'service_tag' argument") + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if virtual_network_subnet_id is None: + raise TypeError("Missing 'virtual_network_subnet_id' argument") + + _setter("action", action) + _setter("headers", headers) + _setter("ip_address", ip_address) + _setter("name", name) + _setter("priority", priority) + _setter("service_tag", service_tag) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -53143,10 +73684,43 @@ def __init__(__self__, *, x_fd_health_probes: Sequence[str], x_forwarded_fors: Sequence[str], x_forwarded_hosts: Sequence[str]): - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) - pulumi.set(__self__, "x_fd_health_probes", x_fd_health_probes) - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + GetWindowsWebAppSiteConfigIpRestrictionHeaderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probes=x_fd_health_probes, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probes: Optional[Sequence[str]] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_azure_fdids is None: + raise TypeError("Missing 'x_azure_fdids' argument") + if x_fd_health_probes is None and 'xFdHealthProbes' in kwargs: + x_fd_health_probes = kwargs['xFdHealthProbes'] + if x_fd_health_probes is None: + raise TypeError("Missing 'x_fd_health_probes' argument") + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_fors is None: + raise TypeError("Missing 'x_forwarded_fors' argument") + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_forwarded_hosts is None: + raise TypeError("Missing 'x_forwarded_hosts' argument") + + _setter("x_azure_fdids", x_azure_fdids) + _setter("x_fd_health_probes", x_fd_health_probes) + _setter("x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -53184,13 +73758,56 @@ def __init__(__self__, *, :param str name: The name of this Windows Web App. :param str virtual_network_subnet_id: The subnet id which the Windows Web App is vNet Integrated with. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "service_tag", service_tag) - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + GetWindowsWebAppSiteConfigScmIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigScmIpRestrictionHeaderResult']] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if service_tag is None: + raise TypeError("Missing 'service_tag' argument") + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if virtual_network_subnet_id is None: + raise TypeError("Missing 'virtual_network_subnet_id' argument") + + _setter("action", action) + _setter("headers", headers) + _setter("ip_address", ip_address) + _setter("name", name) + _setter("priority", priority) + _setter("service_tag", service_tag) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -53244,10 +73861,43 @@ def __init__(__self__, *, x_fd_health_probes: Sequence[str], x_forwarded_fors: Sequence[str], x_forwarded_hosts: Sequence[str]): - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) - pulumi.set(__self__, "x_fd_health_probes", x_fd_health_probes) - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + GetWindowsWebAppSiteConfigScmIpRestrictionHeaderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probes=x_fd_health_probes, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probes: Optional[Sequence[str]] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_azure_fdids is None: + raise TypeError("Missing 'x_azure_fdids' argument") + if x_fd_health_probes is None and 'xFdHealthProbes' in kwargs: + x_fd_health_probes = kwargs['xFdHealthProbes'] + if x_fd_health_probes is None: + raise TypeError("Missing 'x_fd_health_probes' argument") + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_fors is None: + raise TypeError("Missing 'x_forwarded_fors' argument") + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_forwarded_hosts is None: + raise TypeError("Missing 'x_forwarded_hosts' argument") + + _setter("x_azure_fdids", x_azure_fdids) + _setter("x_fd_health_probes", x_fd_health_probes) + _setter("x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -53283,10 +73933,41 @@ def __init__(__self__, *, :param Sequence['GetWindowsWebAppSiteConfigVirtualApplicationVirtualDirectoryArgs'] virtual_directories: A `virtual_directory` block as defined below. :param str virtual_path: The Virtual Path of the Virtual Directory. """ - pulumi.set(__self__, "physical_path", physical_path) - pulumi.set(__self__, "preload", preload) - pulumi.set(__self__, "virtual_directories", virtual_directories) - pulumi.set(__self__, "virtual_path", virtual_path) + GetWindowsWebAppSiteConfigVirtualApplicationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + physical_path=physical_path, + preload=preload, + virtual_directories=virtual_directories, + virtual_path=virtual_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + physical_path: Optional[str] = None, + preload: Optional[bool] = None, + virtual_directories: Optional[Sequence['outputs.GetWindowsWebAppSiteConfigVirtualApplicationVirtualDirectoryResult']] = None, + virtual_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if physical_path is None and 'physicalPath' in kwargs: + physical_path = kwargs['physicalPath'] + if physical_path is None: + raise TypeError("Missing 'physical_path' argument") + if preload is None: + raise TypeError("Missing 'preload' argument") + if virtual_directories is None and 'virtualDirectories' in kwargs: + virtual_directories = kwargs['virtualDirectories'] + if virtual_directories is None: + raise TypeError("Missing 'virtual_directories' argument") + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if virtual_path is None: + raise TypeError("Missing 'virtual_path' argument") + + _setter("physical_path", physical_path) + _setter("preload", preload) + _setter("virtual_directories", virtual_directories) + _setter("virtual_path", virtual_path) @property @pulumi.getter(name="physicalPath") @@ -53330,8 +74011,29 @@ def __init__(__self__, *, :param str physical_path: The path on disk to the Virtual Directory :param str virtual_path: The Virtual Path of the Virtual Directory. """ - pulumi.set(__self__, "physical_path", physical_path) - pulumi.set(__self__, "virtual_path", virtual_path) + GetWindowsWebAppSiteConfigVirtualApplicationVirtualDirectoryResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + physical_path=physical_path, + virtual_path=virtual_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + physical_path: Optional[str] = None, + virtual_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if physical_path is None and 'physicalPath' in kwargs: + physical_path = kwargs['physicalPath'] + if physical_path is None: + raise TypeError("Missing 'physical_path' argument") + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if virtual_path is None: + raise TypeError("Missing 'virtual_path' argument") + + _setter("physical_path", physical_path) + _setter("virtual_path", virtual_path) @property @pulumi.getter(name="physicalPath") @@ -53359,8 +74061,25 @@ def __init__(__self__, *, :param str name: The name of this Windows Web App. :param str password: The Site Credentials Password used for publishing. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "password", password) + GetWindowsWebAppSiteCredentialResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + + _setter("name", name) + _setter("password", password) @property @pulumi.getter @@ -53388,8 +74107,29 @@ def __init__(__self__, *, :param Sequence[str] app_setting_names: A list of `app_setting` names that the Windows Web App will not swap between Slots when a swap operation is triggered. :param Sequence[str] connection_string_names: A list of `connection_string` names that the Windows Web App will not swap between Slots when a swap operation is triggered. """ - pulumi.set(__self__, "app_setting_names", app_setting_names) - pulumi.set(__self__, "connection_string_names", connection_string_names) + GetWindowsWebAppStickySettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_setting_names=app_setting_names, + connection_string_names=connection_string_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_setting_names: Optional[Sequence[str]] = None, + connection_string_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_setting_names is None and 'appSettingNames' in kwargs: + app_setting_names = kwargs['appSettingNames'] + if app_setting_names is None: + raise TypeError("Missing 'app_setting_names' argument") + if connection_string_names is None and 'connectionStringNames' in kwargs: + connection_string_names = kwargs['connectionStringNames'] + if connection_string_names is None: + raise TypeError("Missing 'connection_string_names' argument") + + _setter("app_setting_names", app_setting_names) + _setter("connection_string_names", connection_string_names) @property @pulumi.getter(name="appSettingNames") @@ -53425,12 +74165,53 @@ def __init__(__self__, *, :param str share_name: The Name of the File Share. :param str type: The Azure Storage Type. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "mount_path", mount_path) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "type", type) + GetWindowsWebAppStorageAccountResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + account_name=account_name, + mount_path=mount_path, + name=name, + share_name=share_name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[str] = None, + account_name: Optional[str] = None, + mount_path: Optional[str] = None, + name: Optional[str] = None, + share_name: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + if mount_path is None: + raise TypeError("Missing 'mount_path' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("access_key", access_key) + _setter("account_name", account_name) + _setter("mount_path", mount_path) + _setter("name", name) + _setter("share_name", share_name) + _setter("type", type) @property @pulumi.getter(name="accessKey") diff --git a/sdk/python/pulumi_azure/appservice/plan.py b/sdk/python/pulumi_azure/appservice/plan.py index 004ee8ce4e..6119b59e6e 100644 --- a/sdk/python/pulumi_azure/appservice/plan.py +++ b/sdk/python/pulumi_azure/appservice/plan.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,28 +49,77 @@ def __init__(__self__, *, > **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html). """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + PlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + app_service_environment_id=app_service_environment_id, + is_xenon=is_xenon, + kind=kind, + location=location, + maximum_elastic_worker_count=maximum_elastic_worker_count, + name=name, + per_site_scaling=per_site_scaling, + reserved=reserved, + tags=tags, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['PlanSkuArgs']] = None, + app_service_environment_id: Optional[pulumi.Input[str]] = None, + is_xenon: Optional[pulumi.Input[bool]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + maximum_elastic_worker_count: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + per_site_scaling: Optional[pulumi.Input[bool]] = None, + reserved: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if app_service_environment_id is None and 'appServiceEnvironmentId' in kwargs: + app_service_environment_id = kwargs['appServiceEnvironmentId'] + if is_xenon is None and 'isXenon' in kwargs: + is_xenon = kwargs['isXenon'] + if maximum_elastic_worker_count is None and 'maximumElasticWorkerCount' in kwargs: + maximum_elastic_worker_count = kwargs['maximumElasticWorkerCount'] + if per_site_scaling is None and 'perSiteScaling' in kwargs: + per_site_scaling = kwargs['perSiteScaling'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if app_service_environment_id is not None: - pulumi.set(__self__, "app_service_environment_id", app_service_environment_id) + _setter("app_service_environment_id", app_service_environment_id) if is_xenon is not None: - pulumi.set(__self__, "is_xenon", is_xenon) + _setter("is_xenon", is_xenon) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maximum_elastic_worker_count is not None: - pulumi.set(__self__, "maximum_elastic_worker_count", maximum_elastic_worker_count) + _setter("maximum_elastic_worker_count", maximum_elastic_worker_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if per_site_scaling is not None: - pulumi.set(__self__, "per_site_scaling", per_site_scaling) + _setter("per_site_scaling", per_site_scaling) if reserved is not None: - pulumi.set(__self__, "reserved", reserved) + _setter("reserved", reserved) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="resourceGroupName") @@ -261,32 +310,81 @@ def __init__(__self__, *, > **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html). """ + _PlanState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_environment_id=app_service_environment_id, + is_xenon=is_xenon, + kind=kind, + location=location, + maximum_elastic_worker_count=maximum_elastic_worker_count, + maximum_number_of_workers=maximum_number_of_workers, + name=name, + per_site_scaling=per_site_scaling, + reserved=reserved, + resource_group_name=resource_group_name, + sku=sku, + tags=tags, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_environment_id: Optional[pulumi.Input[str]] = None, + is_xenon: Optional[pulumi.Input[bool]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + maximum_elastic_worker_count: Optional[pulumi.Input[int]] = None, + maximum_number_of_workers: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + per_site_scaling: Optional[pulumi.Input[bool]] = None, + reserved: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['PlanSkuArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_environment_id is None and 'appServiceEnvironmentId' in kwargs: + app_service_environment_id = kwargs['appServiceEnvironmentId'] + if is_xenon is None and 'isXenon' in kwargs: + is_xenon = kwargs['isXenon'] + if maximum_elastic_worker_count is None and 'maximumElasticWorkerCount' in kwargs: + maximum_elastic_worker_count = kwargs['maximumElasticWorkerCount'] + if maximum_number_of_workers is None and 'maximumNumberOfWorkers' in kwargs: + maximum_number_of_workers = kwargs['maximumNumberOfWorkers'] + if per_site_scaling is None and 'perSiteScaling' in kwargs: + per_site_scaling = kwargs['perSiteScaling'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + if app_service_environment_id is not None: - pulumi.set(__self__, "app_service_environment_id", app_service_environment_id) + _setter("app_service_environment_id", app_service_environment_id) if is_xenon is not None: - pulumi.set(__self__, "is_xenon", is_xenon) + _setter("is_xenon", is_xenon) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maximum_elastic_worker_count is not None: - pulumi.set(__self__, "maximum_elastic_worker_count", maximum_elastic_worker_count) + _setter("maximum_elastic_worker_count", maximum_elastic_worker_count) if maximum_number_of_workers is not None: - pulumi.set(__self__, "maximum_number_of_workers", maximum_number_of_workers) + _setter("maximum_number_of_workers", maximum_number_of_workers) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if per_site_scaling is not None: - pulumi.set(__self__, "per_site_scaling", per_site_scaling) + _setter("per_site_scaling", per_site_scaling) if reserved is not None: - pulumi.set(__self__, "reserved", reserved) + _setter("reserved", reserved) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="appServiceEnvironmentId") @@ -666,6 +764,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PlanArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -703,6 +805,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if sku is not None and not isinstance(sku, PlanSkuArgs): + sku = sku or {} + def _setter(key, value): + sku[key] = value + PlanSkuArgs._configure(_setter, **sku) if sku is None and not opts.urn: raise TypeError("Missing required property 'sku'") __props__.__dict__["sku"] = sku diff --git a/sdk/python/pulumi_azure/appservice/public_certificate.py b/sdk/python/pulumi_azure/appservice/public_certificate.py index f041fab3f7..2a07a2b3d6 100644 --- a/sdk/python/pulumi_azure/appservice/public_certificate.py +++ b/sdk/python/pulumi_azure/appservice/public_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PublicCertificateArgs', 'PublicCertificate'] @@ -27,11 +27,48 @@ def __init__(__self__, *, :param pulumi.Input[str] certificate_name: The name of the public certificate. Changing this forces a new App Service Public Certificate to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the App Service Public Certificate should exist. Changing this forces a new App Service Public Certificate to be created. """ - pulumi.set(__self__, "app_service_name", app_service_name) - pulumi.set(__self__, "blob", blob) - pulumi.set(__self__, "certificate_location", certificate_location) - pulumi.set(__self__, "certificate_name", certificate_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + PublicCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_name=app_service_name, + blob=blob, + certificate_location=certificate_location, + certificate_name=certificate_name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_name: Optional[pulumi.Input[str]] = None, + blob: Optional[pulumi.Input[str]] = None, + certificate_location: Optional[pulumi.Input[str]] = None, + certificate_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_name is None and 'appServiceName' in kwargs: + app_service_name = kwargs['appServiceName'] + if app_service_name is None: + raise TypeError("Missing 'app_service_name' argument") + if blob is None: + raise TypeError("Missing 'blob' argument") + if certificate_location is None and 'certificateLocation' in kwargs: + certificate_location = kwargs['certificateLocation'] + if certificate_location is None: + raise TypeError("Missing 'certificate_location' argument") + if certificate_name is None and 'certificateName' in kwargs: + certificate_name = kwargs['certificateName'] + if certificate_name is None: + raise TypeError("Missing 'certificate_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("app_service_name", app_service_name) + _setter("blob", blob) + _setter("certificate_location", certificate_location) + _setter("certificate_name", certificate_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="appServiceName") @@ -112,18 +149,47 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the App Service Public Certificate should exist. Changing this forces a new App Service Public Certificate to be created. :param pulumi.Input[str] thumbprint: The thumbprint of the public certificate. """ + _PublicCertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_name=app_service_name, + blob=blob, + certificate_location=certificate_location, + certificate_name=certificate_name, + resource_group_name=resource_group_name, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_name: Optional[pulumi.Input[str]] = None, + blob: Optional[pulumi.Input[str]] = None, + certificate_location: Optional[pulumi.Input[str]] = None, + certificate_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_name is None and 'appServiceName' in kwargs: + app_service_name = kwargs['appServiceName'] + if certificate_location is None and 'certificateLocation' in kwargs: + certificate_location = kwargs['certificateLocation'] + if certificate_name is None and 'certificateName' in kwargs: + certificate_name = kwargs['certificateName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if app_service_name is not None: - pulumi.set(__self__, "app_service_name", app_service_name) + _setter("app_service_name", app_service_name) if blob is not None: - pulumi.set(__self__, "blob", blob) + _setter("blob", blob) if certificate_location is not None: - pulumi.set(__self__, "certificate_location", certificate_location) + _setter("certificate_location", certificate_location) if certificate_name is not None: - pulumi.set(__self__, "certificate_name", certificate_name) + _setter("certificate_name", certificate_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="appServiceName") @@ -309,6 +375,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PublicCertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/service_plan.py b/sdk/python/pulumi_azure/appservice/service_plan.py index f009b866e4..1640cfd5ca 100644 --- a/sdk/python/pulumi_azure/appservice/service_plan.py +++ b/sdk/python/pulumi_azure/appservice/service_plan.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServicePlanArgs', 'ServicePlan'] @@ -47,25 +47,78 @@ def __init__(__self__, *, > **NOTE:** If this setting is set to `true` and the `worker_count` value is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region. """ - pulumi.set(__self__, "os_type", os_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + ServicePlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + os_type=os_type, + resource_group_name=resource_group_name, + sku_name=sku_name, + app_service_environment_id=app_service_environment_id, + location=location, + maximum_elastic_worker_count=maximum_elastic_worker_count, + name=name, + per_site_scaling_enabled=per_site_scaling_enabled, + tags=tags, + worker_count=worker_count, + zone_balancing_enabled=zone_balancing_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + os_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + app_service_environment_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + maximum_elastic_worker_count: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + per_site_scaling_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + worker_count: Optional[pulumi.Input[int]] = None, + zone_balancing_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if os_type is None: + raise TypeError("Missing 'os_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if app_service_environment_id is None and 'appServiceEnvironmentId' in kwargs: + app_service_environment_id = kwargs['appServiceEnvironmentId'] + if maximum_elastic_worker_count is None and 'maximumElasticWorkerCount' in kwargs: + maximum_elastic_worker_count = kwargs['maximumElasticWorkerCount'] + if per_site_scaling_enabled is None and 'perSiteScalingEnabled' in kwargs: + per_site_scaling_enabled = kwargs['perSiteScalingEnabled'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if zone_balancing_enabled is None and 'zoneBalancingEnabled' in kwargs: + zone_balancing_enabled = kwargs['zoneBalancingEnabled'] + + _setter("os_type", os_type) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if app_service_environment_id is not None: - pulumi.set(__self__, "app_service_environment_id", app_service_environment_id) + _setter("app_service_environment_id", app_service_environment_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maximum_elastic_worker_count is not None: - pulumi.set(__self__, "maximum_elastic_worker_count", maximum_elastic_worker_count) + _setter("maximum_elastic_worker_count", maximum_elastic_worker_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if per_site_scaling_enabled is not None: - pulumi.set(__self__, "per_site_scaling_enabled", per_site_scaling_enabled) + _setter("per_site_scaling_enabled", per_site_scaling_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) if zone_balancing_enabled is not None: - pulumi.set(__self__, "zone_balancing_enabled", zone_balancing_enabled) + _setter("zone_balancing_enabled", zone_balancing_enabled) @property @pulumi.getter(name="osType") @@ -248,32 +301,83 @@ def __init__(__self__, *, > **NOTE:** If this setting is set to `true` and the `worker_count` value is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region. """ + _ServicePlanState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_environment_id=app_service_environment_id, + kind=kind, + location=location, + maximum_elastic_worker_count=maximum_elastic_worker_count, + name=name, + os_type=os_type, + per_site_scaling_enabled=per_site_scaling_enabled, + reserved=reserved, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + worker_count=worker_count, + zone_balancing_enabled=zone_balancing_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_environment_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + maximum_elastic_worker_count: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + os_type: Optional[pulumi.Input[str]] = None, + per_site_scaling_enabled: Optional[pulumi.Input[bool]] = None, + reserved: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + worker_count: Optional[pulumi.Input[int]] = None, + zone_balancing_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_environment_id is None and 'appServiceEnvironmentId' in kwargs: + app_service_environment_id = kwargs['appServiceEnvironmentId'] + if maximum_elastic_worker_count is None and 'maximumElasticWorkerCount' in kwargs: + maximum_elastic_worker_count = kwargs['maximumElasticWorkerCount'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if per_site_scaling_enabled is None and 'perSiteScalingEnabled' in kwargs: + per_site_scaling_enabled = kwargs['perSiteScalingEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if worker_count is None and 'workerCount' in kwargs: + worker_count = kwargs['workerCount'] + if zone_balancing_enabled is None and 'zoneBalancingEnabled' in kwargs: + zone_balancing_enabled = kwargs['zoneBalancingEnabled'] + if app_service_environment_id is not None: - pulumi.set(__self__, "app_service_environment_id", app_service_environment_id) + _setter("app_service_environment_id", app_service_environment_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maximum_elastic_worker_count is not None: - pulumi.set(__self__, "maximum_elastic_worker_count", maximum_elastic_worker_count) + _setter("maximum_elastic_worker_count", maximum_elastic_worker_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if per_site_scaling_enabled is not None: - pulumi.set(__self__, "per_site_scaling_enabled", per_site_scaling_enabled) + _setter("per_site_scaling_enabled", per_site_scaling_enabled) if reserved is not None: - pulumi.set(__self__, "reserved", reserved) + _setter("reserved", reserved) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if worker_count is not None: - pulumi.set(__self__, "worker_count", worker_count) + _setter("worker_count", worker_count) if zone_balancing_enabled is not None: - pulumi.set(__self__, "zone_balancing_enabled", zone_balancing_enabled) + _setter("zone_balancing_enabled", zone_balancing_enabled) @property @pulumi.getter(name="appServiceEnvironmentId") @@ -545,6 +649,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServicePlanArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/slot.py b/sdk/python/pulumi_azure/appservice/slot.py index 84f0f3a78a..6477b83310 100644 --- a/sdk/python/pulumi_azure/appservice/slot.py +++ b/sdk/python/pulumi_azure/appservice/slot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -53,37 +53,108 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['SlotStorageAccountArgs']]] storage_accounts: One or more `storage_account` blocks as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "app_service_name", app_service_name) - pulumi.set(__self__, "app_service_plan_id", app_service_plan_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + SlotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_name=app_service_name, + app_service_plan_id=app_service_plan_id, + resource_group_name=resource_group_name, + app_settings=app_settings, + auth_settings=auth_settings, + client_affinity_enabled=client_affinity_enabled, + connection_strings=connection_strings, + enabled=enabled, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + location=location, + logs=logs, + name=name, + site_config=site_config, + storage_accounts=storage_accounts, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_name: Optional[pulumi.Input[str]] = None, + app_service_plan_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['SlotAuthSettingsArgs']] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['SlotConnectionStringArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['SlotIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['SlotLogsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['SlotSiteConfigArgs']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['SlotStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_name is None and 'appServiceName' in kwargs: + app_service_name = kwargs['appServiceName'] + if app_service_name is None: + raise TypeError("Missing 'app_service_name' argument") + if app_service_plan_id is None and 'appServicePlanId' in kwargs: + app_service_plan_id = kwargs['appServicePlanId'] + if app_service_plan_id is None: + raise TypeError("Missing 'app_service_plan_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + + _setter("app_service_name", app_service_name) + _setter("app_service_plan_id", app_service_plan_id) + _setter("resource_group_name", resource_group_name) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="appServiceName") @@ -334,44 +405,117 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['SlotStorageAccountArgs']]] storage_accounts: One or more `storage_account` blocks as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _SlotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_name=app_service_name, + app_service_plan_id=app_service_plan_id, + app_settings=app_settings, + auth_settings=auth_settings, + client_affinity_enabled=client_affinity_enabled, + connection_strings=connection_strings, + default_site_hostname=default_site_hostname, + enabled=enabled, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + location=location, + logs=logs, + name=name, + resource_group_name=resource_group_name, + site_config=site_config, + site_credentials=site_credentials, + storage_accounts=storage_accounts, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_name: Optional[pulumi.Input[str]] = None, + app_service_plan_id: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['SlotAuthSettingsArgs']] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['SlotConnectionStringArgs']]]] = None, + default_site_hostname: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['SlotIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['SlotLogsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['SlotSiteConfigArgs']] = None, + site_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['SlotSiteCredentialArgs']]]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['SlotStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_name is None and 'appServiceName' in kwargs: + app_service_name = kwargs['appServiceName'] + if app_service_plan_id is None and 'appServicePlanId' in kwargs: + app_service_plan_id = kwargs['appServicePlanId'] + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if default_site_hostname is None and 'defaultSiteHostname' in kwargs: + default_site_hostname = kwargs['defaultSiteHostname'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_credentials is None and 'siteCredentials' in kwargs: + site_credentials = kwargs['siteCredentials'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if app_service_name is not None: - pulumi.set(__self__, "app_service_name", app_service_name) + _setter("app_service_name", app_service_name) if app_service_plan_id is not None: - pulumi.set(__self__, "app_service_plan_id", app_service_plan_id) + _setter("app_service_plan_id", app_service_plan_id) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if default_site_hostname is not None: - pulumi.set(__self__, "default_site_hostname", default_site_hostname) + _setter("default_site_hostname", default_site_hostname) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if site_credentials is not None: - pulumi.set(__self__, "site_credentials", site_credentials) + _setter("site_credentials", site_credentials) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="appServiceName") @@ -879,6 +1023,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SlotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -917,19 +1065,39 @@ def _internal_init(__self__, raise TypeError("Missing required property 'app_service_plan_id'") __props__.__dict__["app_service_plan_id"] = app_service_plan_id __props__.__dict__["app_settings"] = app_settings + if auth_settings is not None and not isinstance(auth_settings, SlotAuthSettingsArgs): + auth_settings = auth_settings or {} + def _setter(key, value): + auth_settings[key] = value + SlotAuthSettingsArgs._configure(_setter, **auth_settings) __props__.__dict__["auth_settings"] = auth_settings __props__.__dict__["client_affinity_enabled"] = client_affinity_enabled __props__.__dict__["connection_strings"] = connection_strings __props__.__dict__["enabled"] = enabled __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, SlotIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + SlotIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["key_vault_reference_identity_id"] = key_vault_reference_identity_id __props__.__dict__["location"] = location + if logs is not None and not isinstance(logs, SlotLogsArgs): + logs = logs or {} + def _setter(key, value): + logs[key] = value + SlotLogsArgs._configure(_setter, **logs) __props__.__dict__["logs"] = logs __props__.__dict__["name"] = name if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if site_config is not None and not isinstance(site_config, SlotSiteConfigArgs): + site_config = site_config or {} + def _setter(key, value): + site_config[key] = value + SlotSiteConfigArgs._configure(_setter, **site_config) __props__.__dict__["site_config"] = site_config __props__.__dict__["storage_accounts"] = storage_accounts __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/appservice/slot_custom_hostname_binding.py b/sdk/python/pulumi_azure/appservice/slot_custom_hostname_binding.py index f1608faf76..1377ef471e 100644 --- a/sdk/python/pulumi_azure/appservice/slot_custom_hostname_binding.py +++ b/sdk/python/pulumi_azure/appservice/slot_custom_hostname_binding.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SlotCustomHostnameBindingArgs', 'SlotCustomHostnameBinding'] @@ -29,12 +29,37 @@ def __init__(__self__, *, > **NOTE:** `thumbprint` must be specified when `ssl_state` is set. """ - pulumi.set(__self__, "app_service_slot_id", app_service_slot_id) - pulumi.set(__self__, "hostname", hostname) + SlotCustomHostnameBindingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_slot_id=app_service_slot_id, + hostname=hostname, + ssl_state=ssl_state, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_slot_id: Optional[pulumi.Input[str]] = None, + hostname: Optional[pulumi.Input[str]] = None, + ssl_state: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_slot_id is None and 'appServiceSlotId' in kwargs: + app_service_slot_id = kwargs['appServiceSlotId'] + if app_service_slot_id is None: + raise TypeError("Missing 'app_service_slot_id' argument") + if hostname is None: + raise TypeError("Missing 'hostname' argument") + if ssl_state is None and 'sslState' in kwargs: + ssl_state = kwargs['sslState'] + + _setter("app_service_slot_id", app_service_slot_id) + _setter("hostname", hostname) if ssl_state is not None: - pulumi.set(__self__, "ssl_state", ssl_state) + _setter("ssl_state", ssl_state) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="appServiceSlotId") @@ -109,16 +134,41 @@ def __init__(__self__, *, > **NOTE:** `thumbprint` must be specified when `ssl_state` is set. :param pulumi.Input[str] virtual_ip: The virtual IP address assigned to the hostname if IP based SSL is enabled. """ + _SlotCustomHostnameBindingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_slot_id=app_service_slot_id, + hostname=hostname, + ssl_state=ssl_state, + thumbprint=thumbprint, + virtual_ip=virtual_ip, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_slot_id: Optional[pulumi.Input[str]] = None, + hostname: Optional[pulumi.Input[str]] = None, + ssl_state: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + virtual_ip: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_slot_id is None and 'appServiceSlotId' in kwargs: + app_service_slot_id = kwargs['appServiceSlotId'] + if ssl_state is None and 'sslState' in kwargs: + ssl_state = kwargs['sslState'] + if virtual_ip is None and 'virtualIp' in kwargs: + virtual_ip = kwargs['virtualIp'] + if app_service_slot_id is not None: - pulumi.set(__self__, "app_service_slot_id", app_service_slot_id) + _setter("app_service_slot_id", app_service_slot_id) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if ssl_state is not None: - pulumi.set(__self__, "ssl_state", ssl_state) + _setter("ssl_state", ssl_state) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) if virtual_ip is not None: - pulumi.set(__self__, "virtual_ip", virtual_ip) + _setter("virtual_ip", virtual_ip) @property @pulumi.getter(name="appServiceSlotId") @@ -300,6 +350,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SlotCustomHostnameBindingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/slot_virtual_network_swift_connection.py b/sdk/python/pulumi_azure/appservice/slot_virtual_network_swift_connection.py index c8e80307d4..b17c125cd3 100644 --- a/sdk/python/pulumi_azure/appservice/slot_virtual_network_swift_connection.py +++ b/sdk/python/pulumi_azure/appservice/slot_virtual_network_swift_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SlotVirtualNetworkSwiftConnectionArgs', 'SlotVirtualNetworkSwiftConnection'] @@ -23,9 +23,36 @@ def __init__(__self__, *, :param pulumi.Input[str] slot_name: The name of the App Service Slot or Function App Slot. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ID of the subnet the app service will be associated to (the subnet must have a `service_delegation` configured for `Microsoft.Web/serverFarms`). """ - pulumi.set(__self__, "app_service_id", app_service_id) - pulumi.set(__self__, "slot_name", slot_name) - pulumi.set(__self__, "subnet_id", subnet_id) + SlotVirtualNetworkSwiftConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_id=app_service_id, + slot_name=slot_name, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_id: Optional[pulumi.Input[str]] = None, + slot_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_id is None and 'appServiceId' in kwargs: + app_service_id = kwargs['appServiceId'] + if app_service_id is None: + raise TypeError("Missing 'app_service_id' argument") + if slot_name is None and 'slotName' in kwargs: + slot_name = kwargs['slotName'] + if slot_name is None: + raise TypeError("Missing 'slot_name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("app_service_id", app_service_id) + _setter("slot_name", slot_name) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="appServiceId") @@ -76,12 +103,33 @@ def __init__(__self__, *, :param pulumi.Input[str] slot_name: The name of the App Service Slot or Function App Slot. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ID of the subnet the app service will be associated to (the subnet must have a `service_delegation` configured for `Microsoft.Web/serverFarms`). """ + _SlotVirtualNetworkSwiftConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_id=app_service_id, + slot_name=slot_name, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_id: Optional[pulumi.Input[str]] = None, + slot_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_id is None and 'appServiceId' in kwargs: + app_service_id = kwargs['appServiceId'] + if slot_name is None and 'slotName' in kwargs: + slot_name = kwargs['slotName'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if app_service_id is not None: - pulumi.set(__self__, "app_service_id", app_service_id) + _setter("app_service_id", app_service_id) if slot_name is not None: - pulumi.set(__self__, "slot_name", slot_name) + _setter("slot_name", slot_name) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="appServiceId") @@ -261,6 +309,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SlotVirtualNetworkSwiftConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/source_code_token.py b/sdk/python/pulumi_azure/appservice/source_code_token.py index cdcb1afdd0..29c782db9e 100644 --- a/sdk/python/pulumi_azure/appservice/source_code_token.py +++ b/sdk/python/pulumi_azure/appservice/source_code_token.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SourceCodeTokenArgs', 'SourceCodeToken'] @@ -23,10 +23,31 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The source control type. Possible values are `BitBucket`, `Dropbox`, `GitHub` and `OneDrive`. :param pulumi.Input[str] token_secret: The OAuth access token secret. """ - pulumi.set(__self__, "token", token) - pulumi.set(__self__, "type", type) + SourceCodeTokenArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + token=token, + type=type, + token_secret=token_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + token: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + token_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if token is None: + raise TypeError("Missing 'token' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if token_secret is None and 'tokenSecret' in kwargs: + token_secret = kwargs['tokenSecret'] + + _setter("token", token) + _setter("type", type) if token_secret is not None: - pulumi.set(__self__, "token_secret", token_secret) + _setter("token_secret", token_secret) @property @pulumi.getter @@ -77,12 +98,29 @@ def __init__(__self__, *, :param pulumi.Input[str] token_secret: The OAuth access token secret. :param pulumi.Input[str] type: The source control type. Possible values are `BitBucket`, `Dropbox`, `GitHub` and `OneDrive`. """ + _SourceCodeTokenState._configure( + lambda key, value: pulumi.set(__self__, key, value), + token=token, + token_secret=token_secret, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + token: Optional[pulumi.Input[str]] = None, + token_secret: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if token_secret is None and 'tokenSecret' in kwargs: + token_secret = kwargs['tokenSecret'] + if token is not None: - pulumi.set(__self__, "token", token) + _setter("token", token) if token_secret is not None: - pulumi.set(__self__, "token_secret", token_secret) + _setter("token_secret", token_secret) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -204,6 +242,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SourceCodeTokenArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/source_control.py b/sdk/python/pulumi_azure/appservice/source_control.py index 3f43a7dfce..acb16a3e57 100644 --- a/sdk/python/pulumi_azure/appservice/source_control.py +++ b/sdk/python/pulumi_azure/appservice/source_control.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,21 +39,62 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_manual_integration: Should code be deployed manually. Set to `false` to enable continuous integration, such as webhooks into online repos such as GitHub. Defaults to `false`. Changing this forces a new resource to be created. :param pulumi.Input[bool] use_mercurial: The repository specified is Mercurial. Defaults to `false`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "app_id", app_id) + SourceControlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + branch=branch, + github_action_configuration=github_action_configuration, + repo_url=repo_url, + rollback_enabled=rollback_enabled, + use_local_git=use_local_git, + use_manual_integration=use_manual_integration, + use_mercurial=use_mercurial, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + branch: Optional[pulumi.Input[str]] = None, + github_action_configuration: Optional[pulumi.Input['SourceControlGithubActionConfigurationArgs']] = None, + repo_url: Optional[pulumi.Input[str]] = None, + rollback_enabled: Optional[pulumi.Input[bool]] = None, + use_local_git: Optional[pulumi.Input[bool]] = None, + use_manual_integration: Optional[pulumi.Input[bool]] = None, + use_mercurial: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if github_action_configuration is None and 'githubActionConfiguration' in kwargs: + github_action_configuration = kwargs['githubActionConfiguration'] + if repo_url is None and 'repoUrl' in kwargs: + repo_url = kwargs['repoUrl'] + if rollback_enabled is None and 'rollbackEnabled' in kwargs: + rollback_enabled = kwargs['rollbackEnabled'] + if use_local_git is None and 'useLocalGit' in kwargs: + use_local_git = kwargs['useLocalGit'] + if use_manual_integration is None and 'useManualIntegration' in kwargs: + use_manual_integration = kwargs['useManualIntegration'] + if use_mercurial is None and 'useMercurial' in kwargs: + use_mercurial = kwargs['useMercurial'] + + _setter("app_id", app_id) if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if github_action_configuration is not None: - pulumi.set(__self__, "github_action_configuration", github_action_configuration) + _setter("github_action_configuration", github_action_configuration) if repo_url is not None: - pulumi.set(__self__, "repo_url", repo_url) + _setter("repo_url", repo_url) if rollback_enabled is not None: - pulumi.set(__self__, "rollback_enabled", rollback_enabled) + _setter("rollback_enabled", rollback_enabled) if use_local_git is not None: - pulumi.set(__self__, "use_local_git", use_local_git) + _setter("use_local_git", use_local_git) if use_manual_integration is not None: - pulumi.set(__self__, "use_manual_integration", use_manual_integration) + _setter("use_manual_integration", use_manual_integration) if use_mercurial is not None: - pulumi.set(__self__, "use_mercurial", use_mercurial) + _setter("use_mercurial", use_mercurial) @property @pulumi.getter(name="appId") @@ -186,26 +227,73 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_mercurial: The repository specified is Mercurial. Defaults to `false`. Changing this forces a new resource to be created. :param pulumi.Input[bool] uses_github_action: Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied. """ + _SourceControlState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + branch=branch, + github_action_configuration=github_action_configuration, + repo_url=repo_url, + rollback_enabled=rollback_enabled, + scm_type=scm_type, + use_local_git=use_local_git, + use_manual_integration=use_manual_integration, + use_mercurial=use_mercurial, + uses_github_action=uses_github_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + branch: Optional[pulumi.Input[str]] = None, + github_action_configuration: Optional[pulumi.Input['SourceControlGithubActionConfigurationArgs']] = None, + repo_url: Optional[pulumi.Input[str]] = None, + rollback_enabled: Optional[pulumi.Input[bool]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + use_local_git: Optional[pulumi.Input[bool]] = None, + use_manual_integration: Optional[pulumi.Input[bool]] = None, + use_mercurial: Optional[pulumi.Input[bool]] = None, + uses_github_action: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if github_action_configuration is None and 'githubActionConfiguration' in kwargs: + github_action_configuration = kwargs['githubActionConfiguration'] + if repo_url is None and 'repoUrl' in kwargs: + repo_url = kwargs['repoUrl'] + if rollback_enabled is None and 'rollbackEnabled' in kwargs: + rollback_enabled = kwargs['rollbackEnabled'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if use_local_git is None and 'useLocalGit' in kwargs: + use_local_git = kwargs['useLocalGit'] + if use_manual_integration is None and 'useManualIntegration' in kwargs: + use_manual_integration = kwargs['useManualIntegration'] + if use_mercurial is None and 'useMercurial' in kwargs: + use_mercurial = kwargs['useMercurial'] + if uses_github_action is None and 'usesGithubAction' in kwargs: + uses_github_action = kwargs['usesGithubAction'] + if app_id is not None: - pulumi.set(__self__, "app_id", app_id) + _setter("app_id", app_id) if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if github_action_configuration is not None: - pulumi.set(__self__, "github_action_configuration", github_action_configuration) + _setter("github_action_configuration", github_action_configuration) if repo_url is not None: - pulumi.set(__self__, "repo_url", repo_url) + _setter("repo_url", repo_url) if rollback_enabled is not None: - pulumi.set(__self__, "rollback_enabled", rollback_enabled) + _setter("rollback_enabled", rollback_enabled) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if use_local_git is not None: - pulumi.set(__self__, "use_local_git", use_local_git) + _setter("use_local_git", use_local_git) if use_manual_integration is not None: - pulumi.set(__self__, "use_manual_integration", use_manual_integration) + _setter("use_manual_integration", use_manual_integration) if use_mercurial is not None: - pulumi.set(__self__, "use_mercurial", use_mercurial) + _setter("use_mercurial", use_mercurial) if uses_github_action is not None: - pulumi.set(__self__, "uses_github_action", uses_github_action) + _setter("uses_github_action", uses_github_action) @property @pulumi.getter(name="appId") @@ -445,6 +533,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SourceControlArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -471,6 +563,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'app_id'") __props__.__dict__["app_id"] = app_id __props__.__dict__["branch"] = branch + if github_action_configuration is not None and not isinstance(github_action_configuration, SourceControlGithubActionConfigurationArgs): + github_action_configuration = github_action_configuration or {} + def _setter(key, value): + github_action_configuration[key] = value + SourceControlGithubActionConfigurationArgs._configure(_setter, **github_action_configuration) __props__.__dict__["github_action_configuration"] = github_action_configuration __props__.__dict__["repo_url"] = repo_url __props__.__dict__["rollback_enabled"] = rollback_enabled diff --git a/sdk/python/pulumi_azure/appservice/source_control_slot.py b/sdk/python/pulumi_azure/appservice/source_control_slot.py index 8772a17be7..3fc6682afd 100644 --- a/sdk/python/pulumi_azure/appservice/source_control_slot.py +++ b/sdk/python/pulumi_azure/appservice/source_control_slot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,21 +37,62 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_manual_integration: Should code be deployed manually. Set to `true` to disable continuous integration, such as webhooks into online repos such as GitHub. Defaults to `false`. Changing this forces a new resource to be created. :param pulumi.Input[bool] use_mercurial: The repository specified is Mercurial. Defaults to `false`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "slot_id", slot_id) + SourceControlSlotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + slot_id=slot_id, + branch=branch, + github_action_configuration=github_action_configuration, + repo_url=repo_url, + rollback_enabled=rollback_enabled, + use_local_git=use_local_git, + use_manual_integration=use_manual_integration, + use_mercurial=use_mercurial, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + slot_id: Optional[pulumi.Input[str]] = None, + branch: Optional[pulumi.Input[str]] = None, + github_action_configuration: Optional[pulumi.Input['SourceControlSlotGithubActionConfigurationArgs']] = None, + repo_url: Optional[pulumi.Input[str]] = None, + rollback_enabled: Optional[pulumi.Input[bool]] = None, + use_local_git: Optional[pulumi.Input[bool]] = None, + use_manual_integration: Optional[pulumi.Input[bool]] = None, + use_mercurial: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if slot_id is None and 'slotId' in kwargs: + slot_id = kwargs['slotId'] + if slot_id is None: + raise TypeError("Missing 'slot_id' argument") + if github_action_configuration is None and 'githubActionConfiguration' in kwargs: + github_action_configuration = kwargs['githubActionConfiguration'] + if repo_url is None and 'repoUrl' in kwargs: + repo_url = kwargs['repoUrl'] + if rollback_enabled is None and 'rollbackEnabled' in kwargs: + rollback_enabled = kwargs['rollbackEnabled'] + if use_local_git is None and 'useLocalGit' in kwargs: + use_local_git = kwargs['useLocalGit'] + if use_manual_integration is None and 'useManualIntegration' in kwargs: + use_manual_integration = kwargs['useManualIntegration'] + if use_mercurial is None and 'useMercurial' in kwargs: + use_mercurial = kwargs['useMercurial'] + + _setter("slot_id", slot_id) if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if github_action_configuration is not None: - pulumi.set(__self__, "github_action_configuration", github_action_configuration) + _setter("github_action_configuration", github_action_configuration) if repo_url is not None: - pulumi.set(__self__, "repo_url", repo_url) + _setter("repo_url", repo_url) if rollback_enabled is not None: - pulumi.set(__self__, "rollback_enabled", rollback_enabled) + _setter("rollback_enabled", rollback_enabled) if use_local_git is not None: - pulumi.set(__self__, "use_local_git", use_local_git) + _setter("use_local_git", use_local_git) if use_manual_integration is not None: - pulumi.set(__self__, "use_manual_integration", use_manual_integration) + _setter("use_manual_integration", use_manual_integration) if use_mercurial is not None: - pulumi.set(__self__, "use_mercurial", use_mercurial) + _setter("use_mercurial", use_mercurial) @property @pulumi.getter(name="slotId") @@ -180,26 +221,73 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_mercurial: The repository specified is Mercurial. Defaults to `false`. Changing this forces a new resource to be created. :param pulumi.Input[bool] uses_github_action: Indicates if the Slot uses a GitHub action for deployment. This value is decoded by the service from the repository information supplied. """ + _SourceControlSlotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + branch=branch, + github_action_configuration=github_action_configuration, + repo_url=repo_url, + rollback_enabled=rollback_enabled, + scm_type=scm_type, + slot_id=slot_id, + use_local_git=use_local_git, + use_manual_integration=use_manual_integration, + use_mercurial=use_mercurial, + uses_github_action=uses_github_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + branch: Optional[pulumi.Input[str]] = None, + github_action_configuration: Optional[pulumi.Input['SourceControlSlotGithubActionConfigurationArgs']] = None, + repo_url: Optional[pulumi.Input[str]] = None, + rollback_enabled: Optional[pulumi.Input[bool]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + slot_id: Optional[pulumi.Input[str]] = None, + use_local_git: Optional[pulumi.Input[bool]] = None, + use_manual_integration: Optional[pulumi.Input[bool]] = None, + use_mercurial: Optional[pulumi.Input[bool]] = None, + uses_github_action: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if github_action_configuration is None and 'githubActionConfiguration' in kwargs: + github_action_configuration = kwargs['githubActionConfiguration'] + if repo_url is None and 'repoUrl' in kwargs: + repo_url = kwargs['repoUrl'] + if rollback_enabled is None and 'rollbackEnabled' in kwargs: + rollback_enabled = kwargs['rollbackEnabled'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if slot_id is None and 'slotId' in kwargs: + slot_id = kwargs['slotId'] + if use_local_git is None and 'useLocalGit' in kwargs: + use_local_git = kwargs['useLocalGit'] + if use_manual_integration is None and 'useManualIntegration' in kwargs: + use_manual_integration = kwargs['useManualIntegration'] + if use_mercurial is None and 'useMercurial' in kwargs: + use_mercurial = kwargs['useMercurial'] + if uses_github_action is None and 'usesGithubAction' in kwargs: + uses_github_action = kwargs['usesGithubAction'] + if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if github_action_configuration is not None: - pulumi.set(__self__, "github_action_configuration", github_action_configuration) + _setter("github_action_configuration", github_action_configuration) if repo_url is not None: - pulumi.set(__self__, "repo_url", repo_url) + _setter("repo_url", repo_url) if rollback_enabled is not None: - pulumi.set(__self__, "rollback_enabled", rollback_enabled) + _setter("rollback_enabled", rollback_enabled) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if slot_id is not None: - pulumi.set(__self__, "slot_id", slot_id) + _setter("slot_id", slot_id) if use_local_git is not None: - pulumi.set(__self__, "use_local_git", use_local_git) + _setter("use_local_git", use_local_git) if use_manual_integration is not None: - pulumi.set(__self__, "use_manual_integration", use_manual_integration) + _setter("use_manual_integration", use_manual_integration) if use_mercurial is not None: - pulumi.set(__self__, "use_mercurial", use_mercurial) + _setter("use_mercurial", use_mercurial) if uses_github_action is not None: - pulumi.set(__self__, "uses_github_action", uses_github_action) + _setter("uses_github_action", uses_github_action) @property @pulumi.getter @@ -441,6 +529,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SourceControlSlotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -464,6 +556,11 @@ def _internal_init(__self__, __props__ = SourceControlSlotArgs.__new__(SourceControlSlotArgs) __props__.__dict__["branch"] = branch + if github_action_configuration is not None and not isinstance(github_action_configuration, SourceControlSlotGithubActionConfigurationArgs): + github_action_configuration = github_action_configuration or {} + def _setter(key, value): + github_action_configuration[key] = value + SourceControlSlotGithubActionConfigurationArgs._configure(_setter, **github_action_configuration) __props__.__dict__["github_action_configuration"] = github_action_configuration __props__.__dict__["repo_url"] = repo_url __props__.__dict__["rollback_enabled"] = rollback_enabled diff --git a/sdk/python/pulumi_azure/appservice/source_control_token.py b/sdk/python/pulumi_azure/appservice/source_control_token.py index 092ec621cd..96b15e17fe 100644 --- a/sdk/python/pulumi_azure/appservice/source_control_token.py +++ b/sdk/python/pulumi_azure/appservice/source_control_token.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SourceControlTokenArgs', 'SourceControlToken'] @@ -25,10 +25,31 @@ def __init__(__self__, *, > **NOTE:** The token used for deploying App Service needs the following permissions: `repo` and `workflow`. """ - pulumi.set(__self__, "token", token) - pulumi.set(__self__, "type", type) + SourceControlTokenArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + token=token, + type=type, + token_secret=token_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + token: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + token_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if token is None: + raise TypeError("Missing 'token' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if token_secret is None and 'tokenSecret' in kwargs: + token_secret = kwargs['tokenSecret'] + + _setter("token", token) + _setter("type", type) if token_secret is not None: - pulumi.set(__self__, "token_secret", token_secret) + _setter("token_secret", token_secret) @property @pulumi.getter @@ -83,12 +104,29 @@ def __init__(__self__, *, > **NOTE:** The token used for deploying App Service needs the following permissions: `repo` and `workflow`. :param pulumi.Input[str] type: The Token type. Possible values include `Bitbucket`, `Dropbox`, `Github`, and `OneDrive`. """ + _SourceControlTokenState._configure( + lambda key, value: pulumi.set(__self__, key, value), + token=token, + token_secret=token_secret, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + token: Optional[pulumi.Input[str]] = None, + token_secret: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if token_secret is None and 'tokenSecret' in kwargs: + token_secret = kwargs['tokenSecret'] + if token is not None: - pulumi.set(__self__, "token", token) + _setter("token", token) if token_secret is not None: - pulumi.set(__self__, "token_secret", token_secret) + _setter("token_secret", token_secret) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -202,6 +240,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SourceControlTokenArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/static_site.py b/sdk/python/pulumi_azure/appservice/static_site.py index a9942fd103..3fab911829 100644 --- a/sdk/python/pulumi_azure/appservice/static_site.py +++ b/sdk/python/pulumi_azure/appservice/static_site.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,21 +35,56 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_tier: Specifies the SKU tier of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + StaticSiteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + app_settings=app_settings, + identity=identity, + location=location, + name=name, + sku_size=sku_size, + sku_tier=sku_tier, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + identity: Optional[pulumi.Input['StaticSiteIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sku_size: Optional[pulumi.Input[str]] = None, + sku_tier: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if sku_size is None and 'skuSize' in kwargs: + sku_size = kwargs['skuSize'] + if sku_tier is None and 'skuTier' in kwargs: + sku_tier = kwargs['skuTier'] + + _setter("resource_group_name", resource_group_name) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sku_size is not None: - pulumi.set(__self__, "sku_size", sku_size) + _setter("sku_size", sku_size) if sku_tier is not None: - pulumi.set(__self__, "sku_tier", sku_tier) + _setter("sku_tier", sku_tier) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -174,26 +209,67 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_tier: Specifies the SKU tier of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _StaticSiteState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_key=api_key, + app_settings=app_settings, + default_host_name=default_host_name, + identity=identity, + location=location, + name=name, + resource_group_name=resource_group_name, + sku_size=sku_size, + sku_tier=sku_tier, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_key: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + default_host_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['StaticSiteIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_size: Optional[pulumi.Input[str]] = None, + sku_tier: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_key is None and 'apiKey' in kwargs: + api_key = kwargs['apiKey'] + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if default_host_name is None and 'defaultHostName' in kwargs: + default_host_name = kwargs['defaultHostName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_size is None and 'skuSize' in kwargs: + sku_size = kwargs['skuSize'] + if sku_tier is None and 'skuTier' in kwargs: + sku_tier = kwargs['skuTier'] + if api_key is not None: - pulumi.set(__self__, "api_key", api_key) + _setter("api_key", api_key) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if default_host_name is not None: - pulumi.set(__self__, "default_host_name", default_host_name) + _setter("default_host_name", default_host_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_size is not None: - pulumi.set(__self__, "sku_size", sku_size) + _setter("sku_size", sku_size) if sku_tier is not None: - pulumi.set(__self__, "sku_tier", sku_tier) + _setter("sku_tier", sku_tier) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="apiKey") @@ -405,6 +481,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StaticSiteArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -428,6 +508,11 @@ def _internal_init(__self__, __props__ = StaticSiteArgs.__new__(StaticSiteArgs) __props__.__dict__["app_settings"] = app_settings + if identity is not None and not isinstance(identity, StaticSiteIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + StaticSiteIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/appservice/static_site_custom_domain.py b/sdk/python/pulumi_azure/appservice/static_site_custom_domain.py index 66f6d0518e..27fc5089c7 100644 --- a/sdk/python/pulumi_azure/appservice/static_site_custom_domain.py +++ b/sdk/python/pulumi_azure/appservice/static_site_custom_domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['StaticSiteCustomDomainArgs', 'StaticSiteCustomDomain'] @@ -23,10 +23,35 @@ def __init__(__self__, *, :param pulumi.Input[str] static_site_id: The ID of the Static Site. Changing this forces a new Static Site Custom Domain to be created. :param pulumi.Input[str] validation_type: One of `cname-delegation` or `dns-txt-token`. Changing this forces a new Static Site Custom Domain to be created. """ - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "static_site_id", static_site_id) + StaticSiteCustomDomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name=domain_name, + static_site_id=static_site_id, + validation_type=validation_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name: Optional[pulumi.Input[str]] = None, + static_site_id: Optional[pulumi.Input[str]] = None, + validation_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if static_site_id is None and 'staticSiteId' in kwargs: + static_site_id = kwargs['staticSiteId'] + if static_site_id is None: + raise TypeError("Missing 'static_site_id' argument") + if validation_type is None and 'validationType' in kwargs: + validation_type = kwargs['validationType'] + + _setter("domain_name", domain_name) + _setter("static_site_id", static_site_id) if validation_type is not None: - pulumi.set(__self__, "validation_type", validation_type) + _setter("validation_type", validation_type) @property @pulumi.getter(name="domainName") @@ -79,14 +104,39 @@ def __init__(__self__, *, :param pulumi.Input[str] validation_token: Token to be used with `dns-txt-token` validation. :param pulumi.Input[str] validation_type: One of `cname-delegation` or `dns-txt-token`. Changing this forces a new Static Site Custom Domain to be created. """ + _StaticSiteCustomDomainState._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name=domain_name, + static_site_id=static_site_id, + validation_token=validation_token, + validation_type=validation_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name: Optional[pulumi.Input[str]] = None, + static_site_id: Optional[pulumi.Input[str]] = None, + validation_token: Optional[pulumi.Input[str]] = None, + validation_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if static_site_id is None and 'staticSiteId' in kwargs: + static_site_id = kwargs['staticSiteId'] + if validation_token is None and 'validationToken' in kwargs: + validation_token = kwargs['validationToken'] + if validation_type is None and 'validationType' in kwargs: + validation_type = kwargs['validationType'] + if domain_name is not None: - pulumi.set(__self__, "domain_name", domain_name) + _setter("domain_name", domain_name) if static_site_id is not None: - pulumi.set(__self__, "static_site_id", static_site_id) + _setter("static_site_id", static_site_id) if validation_token is not None: - pulumi.set(__self__, "validation_token", validation_token) + _setter("validation_token", validation_token) if validation_type is not None: - pulumi.set(__self__, "validation_type", validation_type) + _setter("validation_type", validation_type) @property @pulumi.getter(name="domainName") @@ -274,6 +324,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StaticSiteCustomDomainArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/virtual_network_swift_connection.py b/sdk/python/pulumi_azure/appservice/virtual_network_swift_connection.py index 3e2b364997..299e56877a 100644 --- a/sdk/python/pulumi_azure/appservice/virtual_network_swift_connection.py +++ b/sdk/python/pulumi_azure/appservice/virtual_network_swift_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VirtualNetworkSwiftConnectionArgs', 'VirtualNetworkSwiftConnection'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] app_service_id: The ID of the App Service or Function App to associate to the VNet. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ID of the subnet the app service will be associated to (the subnet must have a `service_delegation` configured for `Microsoft.Web/serverFarms`). """ - pulumi.set(__self__, "app_service_id", app_service_id) - pulumi.set(__self__, "subnet_id", subnet_id) + VirtualNetworkSwiftConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_id=app_service_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_id is None and 'appServiceId' in kwargs: + app_service_id = kwargs['appServiceId'] + if app_service_id is None: + raise TypeError("Missing 'app_service_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("app_service_id", app_service_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="appServiceId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] app_service_id: The ID of the App Service or Function App to associate to the VNet. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ID of the subnet the app service will be associated to (the subnet must have a `service_delegation` configured for `Microsoft.Web/serverFarms`). """ + _VirtualNetworkSwiftConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_id=app_service_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_id is None and 'appServiceId' in kwargs: + app_service_id = kwargs['appServiceId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if app_service_id is not None: - pulumi.set(__self__, "app_service_id", app_service_id) + _setter("app_service_id", app_service_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="appServiceId") @@ -348,6 +386,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkSwiftConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/web_app_active_slot.py b/sdk/python/pulumi_azure/appservice/web_app_active_slot.py index 35da4b31a0..caa4eb37bb 100644 --- a/sdk/python/pulumi_azure/appservice/web_app_active_slot.py +++ b/sdk/python/pulumi_azure/appservice/web_app_active_slot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WebAppActiveSlotArgs', 'WebAppActiveSlot'] @@ -21,9 +21,28 @@ def __init__(__self__, *, :param pulumi.Input[str] slot_id: The ID of the Slot to swap with `Production`. :param pulumi.Input[bool] overwrite_network_config: The swap action should overwrite the Production slot's network configuration with the configuration from this slot. Defaults to `true`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "slot_id", slot_id) + WebAppActiveSlotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + slot_id=slot_id, + overwrite_network_config=overwrite_network_config, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + slot_id: Optional[pulumi.Input[str]] = None, + overwrite_network_config: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if slot_id is None and 'slotId' in kwargs: + slot_id = kwargs['slotId'] + if slot_id is None: + raise TypeError("Missing 'slot_id' argument") + if overwrite_network_config is None and 'overwriteNetworkConfig' in kwargs: + overwrite_network_config = kwargs['overwriteNetworkConfig'] + + _setter("slot_id", slot_id) if overwrite_network_config is not None: - pulumi.set(__self__, "overwrite_network_config", overwrite_network_config) + _setter("overwrite_network_config", overwrite_network_config) @property @pulumi.getter(name="slotId") @@ -62,12 +81,33 @@ def __init__(__self__, *, :param pulumi.Input[bool] overwrite_network_config: The swap action should overwrite the Production slot's network configuration with the configuration from this slot. Defaults to `true`. Changing this forces a new resource to be created. :param pulumi.Input[str] slot_id: The ID of the Slot to swap with `Production`. """ + _WebAppActiveSlotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + last_successful_swap=last_successful_swap, + overwrite_network_config=overwrite_network_config, + slot_id=slot_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + last_successful_swap: Optional[pulumi.Input[str]] = None, + overwrite_network_config: Optional[pulumi.Input[bool]] = None, + slot_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if last_successful_swap is None and 'lastSuccessfulSwap' in kwargs: + last_successful_swap = kwargs['lastSuccessfulSwap'] + if overwrite_network_config is None and 'overwriteNetworkConfig' in kwargs: + overwrite_network_config = kwargs['overwriteNetworkConfig'] + if slot_id is None and 'slotId' in kwargs: + slot_id = kwargs['slotId'] + if last_successful_swap is not None: - pulumi.set(__self__, "last_successful_swap", last_successful_swap) + _setter("last_successful_swap", last_successful_swap) if overwrite_network_config is not None: - pulumi.set(__self__, "overwrite_network_config", overwrite_network_config) + _setter("overwrite_network_config", overwrite_network_config) if slot_id is not None: - pulumi.set(__self__, "slot_id", slot_id) + _setter("slot_id", slot_id) @property @pulumi.getter(name="lastSuccessfulSwap") @@ -205,6 +245,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WebAppActiveSlotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/web_app_hybrid_connection.py b/sdk/python/pulumi_azure/appservice/web_app_hybrid_connection.py index d872b494a3..5a2e719be2 100644 --- a/sdk/python/pulumi_azure/appservice/web_app_hybrid_connection.py +++ b/sdk/python/pulumi_azure/appservice/web_app_hybrid_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WebAppHybridConnectionArgs', 'WebAppHybridConnection'] @@ -27,12 +27,45 @@ def __init__(__self__, *, :param pulumi.Input[str] web_app_id: The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created. :param pulumi.Input[str] send_key_name: The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey` """ - pulumi.set(__self__, "hostname", hostname) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "relay_id", relay_id) - pulumi.set(__self__, "web_app_id", web_app_id) + WebAppHybridConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + hostname=hostname, + port=port, + relay_id=relay_id, + web_app_id=web_app_id, + send_key_name=send_key_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hostname: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + relay_id: Optional[pulumi.Input[str]] = None, + web_app_id: Optional[pulumi.Input[str]] = None, + send_key_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hostname is None: + raise TypeError("Missing 'hostname' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if relay_id is None and 'relayId' in kwargs: + relay_id = kwargs['relayId'] + if relay_id is None: + raise TypeError("Missing 'relay_id' argument") + if web_app_id is None and 'webAppId' in kwargs: + web_app_id = kwargs['webAppId'] + if web_app_id is None: + raise TypeError("Missing 'web_app_id' argument") + if send_key_name is None and 'sendKeyName' in kwargs: + send_key_name = kwargs['sendKeyName'] + + _setter("hostname", hostname) + _setter("port", port) + _setter("relay_id", relay_id) + _setter("web_app_id", web_app_id) if send_key_name is not None: - pulumi.set(__self__, "send_key_name", send_key_name) + _setter("send_key_name", send_key_name) @property @pulumi.getter @@ -121,26 +154,71 @@ def __init__(__self__, *, :param pulumi.Input[str] service_bus_suffix: The suffix for the endpoint. :param pulumi.Input[str] web_app_id: The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created. """ + _WebAppHybridConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + hostname=hostname, + namespace_name=namespace_name, + port=port, + relay_id=relay_id, + relay_name=relay_name, + send_key_name=send_key_name, + send_key_value=send_key_value, + service_bus_namespace=service_bus_namespace, + service_bus_suffix=service_bus_suffix, + web_app_id=web_app_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hostname: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + relay_id: Optional[pulumi.Input[str]] = None, + relay_name: Optional[pulumi.Input[str]] = None, + send_key_name: Optional[pulumi.Input[str]] = None, + send_key_value: Optional[pulumi.Input[str]] = None, + service_bus_namespace: Optional[pulumi.Input[str]] = None, + service_bus_suffix: Optional[pulumi.Input[str]] = None, + web_app_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if relay_id is None and 'relayId' in kwargs: + relay_id = kwargs['relayId'] + if relay_name is None and 'relayName' in kwargs: + relay_name = kwargs['relayName'] + if send_key_name is None and 'sendKeyName' in kwargs: + send_key_name = kwargs['sendKeyName'] + if send_key_value is None and 'sendKeyValue' in kwargs: + send_key_value = kwargs['sendKeyValue'] + if service_bus_namespace is None and 'serviceBusNamespace' in kwargs: + service_bus_namespace = kwargs['serviceBusNamespace'] + if service_bus_suffix is None and 'serviceBusSuffix' in kwargs: + service_bus_suffix = kwargs['serviceBusSuffix'] + if web_app_id is None and 'webAppId' in kwargs: + web_app_id = kwargs['webAppId'] + if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if relay_id is not None: - pulumi.set(__self__, "relay_id", relay_id) + _setter("relay_id", relay_id) if relay_name is not None: - pulumi.set(__self__, "relay_name", relay_name) + _setter("relay_name", relay_name) if send_key_name is not None: - pulumi.set(__self__, "send_key_name", send_key_name) + _setter("send_key_name", send_key_name) if send_key_value is not None: - pulumi.set(__self__, "send_key_value", send_key_value) + _setter("send_key_value", send_key_value) if service_bus_namespace is not None: - pulumi.set(__self__, "service_bus_namespace", service_bus_namespace) + _setter("service_bus_namespace", service_bus_namespace) if service_bus_suffix is not None: - pulumi.set(__self__, "service_bus_suffix", service_bus_suffix) + _setter("service_bus_suffix", service_bus_suffix) if web_app_id is not None: - pulumi.set(__self__, "web_app_id", web_app_id) + _setter("web_app_id", web_app_id) @property @pulumi.getter @@ -382,6 +460,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WebAppHybridConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/appservice/windows_function_app.py b/sdk/python/pulumi_azure/appservice/windows_function_app.py index 8a37386461..652c314126 100644 --- a/sdk/python/pulumi_azure/appservice/windows_function_app.py +++ b/sdk/python/pulumi_azure/appservice/windows_function_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -89,65 +89,192 @@ def __init__(__self__, *, > **Note:** Using this value requires `WEBSITE_RUN_FROM_PACKAGE=1` to be set on the App in `app_settings`. Refer to the [Azure docs](https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies) for further details. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "service_plan_id", service_plan_id) - pulumi.set(__self__, "site_config", site_config) + WindowsFunctionAppArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + service_plan_id=service_plan_id, + site_config=site_config, + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + builtin_logging_enabled=builtin_logging_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + content_share_force_disabled=content_share_force_disabled, + daily_memory_time_quota=daily_memory_time_quota, + enabled=enabled, + functions_extension_version=functions_extension_version, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + sticky_settings=sticky_settings, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + storage_accounts=storage_accounts, + storage_key_vault_secret_id=storage_key_vault_secret_id, + storage_uses_managed_identity=storage_uses_managed_identity, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + zip_deploy_file=zip_deploy_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['WindowsFunctionAppSiteConfigArgs']] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['WindowsFunctionAppBackupArgs']] = None, + builtin_logging_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppConnectionStringArgs']]]] = None, + content_share_force_disabled: Optional[pulumi.Input[bool]] = None, + daily_memory_time_quota: Optional[pulumi.Input[int]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + functions_extension_version: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['WindowsFunctionAppIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + sticky_settings: Optional[pulumi.Input['WindowsFunctionAppStickySettingsArgs']] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppStorageAccountArgs']]]] = None, + storage_key_vault_secret_id: Optional[pulumi.Input[str]] = None, + storage_uses_managed_identity: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + zip_deploy_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if service_plan_id is None: + raise TypeError("Missing 'service_plan_id' argument") + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_config is None: + raise TypeError("Missing 'site_config' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if builtin_logging_enabled is None and 'builtinLoggingEnabled' in kwargs: + builtin_logging_enabled = kwargs['builtinLoggingEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if content_share_force_disabled is None and 'contentShareForceDisabled' in kwargs: + content_share_force_disabled = kwargs['contentShareForceDisabled'] + if daily_memory_time_quota is None and 'dailyMemoryTimeQuota' in kwargs: + daily_memory_time_quota = kwargs['dailyMemoryTimeQuota'] + if functions_extension_version is None and 'functionsExtensionVersion' in kwargs: + functions_extension_version = kwargs['functionsExtensionVersion'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if sticky_settings is None and 'stickySettings' in kwargs: + sticky_settings = kwargs['stickySettings'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if storage_key_vault_secret_id is None and 'storageKeyVaultSecretId' in kwargs: + storage_key_vault_secret_id = kwargs['storageKeyVaultSecretId'] + if storage_uses_managed_identity is None and 'storageUsesManagedIdentity' in kwargs: + storage_uses_managed_identity = kwargs['storageUsesManagedIdentity'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if zip_deploy_file is None and 'zipDeployFile' in kwargs: + zip_deploy_file = kwargs['zipDeployFile'] + + _setter("resource_group_name", resource_group_name) + _setter("service_plan_id", service_plan_id) + _setter("site_config", site_config) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if builtin_logging_enabled is not None: - pulumi.set(__self__, "builtin_logging_enabled", builtin_logging_enabled) + _setter("builtin_logging_enabled", builtin_logging_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if content_share_force_disabled is not None: - pulumi.set(__self__, "content_share_force_disabled", content_share_force_disabled) + _setter("content_share_force_disabled", content_share_force_disabled) if daily_memory_time_quota is not None: - pulumi.set(__self__, "daily_memory_time_quota", daily_memory_time_quota) + _setter("daily_memory_time_quota", daily_memory_time_quota) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if functions_extension_version is not None: - pulumi.set(__self__, "functions_extension_version", functions_extension_version) + _setter("functions_extension_version", functions_extension_version) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if sticky_settings is not None: - pulumi.set(__self__, "sticky_settings", sticky_settings) + _setter("sticky_settings", sticky_settings) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if storage_key_vault_secret_id is not None: - pulumi.set(__self__, "storage_key_vault_secret_id", storage_key_vault_secret_id) + _setter("storage_key_vault_secret_id", storage_key_vault_secret_id) if storage_uses_managed_identity is not None: - pulumi.set(__self__, "storage_uses_managed_identity", storage_uses_managed_identity) + _setter("storage_uses_managed_identity", storage_uses_managed_identity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) if zip_deploy_file is not None: - pulumi.set(__self__, "zip_deploy_file", zip_deploy_file) + _setter("zip_deploy_file", zip_deploy_file) @property @pulumi.getter(name="resourceGroupName") @@ -622,86 +749,241 @@ def __init__(__self__, *, > **Note:** Using this value requires `WEBSITE_RUN_FROM_PACKAGE=1` to be set on the App in `app_settings`. Refer to the [Azure docs](https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies) for further details. """ + _WindowsFunctionAppState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + builtin_logging_enabled=builtin_logging_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + content_share_force_disabled=content_share_force_disabled, + custom_domain_verification_id=custom_domain_verification_id, + daily_memory_time_quota=daily_memory_time_quota, + default_hostname=default_hostname, + enabled=enabled, + functions_extension_version=functions_extension_version, + hosting_environment_id=hosting_environment_id, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + kind=kind, + location=location, + name=name, + outbound_ip_address_lists=outbound_ip_address_lists, + outbound_ip_addresses=outbound_ip_addresses, + possible_outbound_ip_address_lists=possible_outbound_ip_address_lists, + possible_outbound_ip_addresses=possible_outbound_ip_addresses, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + service_plan_id=service_plan_id, + site_config=site_config, + site_credentials=site_credentials, + sticky_settings=sticky_settings, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + storage_accounts=storage_accounts, + storage_key_vault_secret_id=storage_key_vault_secret_id, + storage_uses_managed_identity=storage_uses_managed_identity, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + zip_deploy_file=zip_deploy_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['WindowsFunctionAppAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['WindowsFunctionAppBackupArgs']] = None, + builtin_logging_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppConnectionStringArgs']]]] = None, + content_share_force_disabled: Optional[pulumi.Input[bool]] = None, + custom_domain_verification_id: Optional[pulumi.Input[str]] = None, + daily_memory_time_quota: Optional[pulumi.Input[int]] = None, + default_hostname: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + functions_extension_version: Optional[pulumi.Input[str]] = None, + hosting_environment_id: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['WindowsFunctionAppIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + possible_outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + possible_outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['WindowsFunctionAppSiteConfigArgs']] = None, + site_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppSiteCredentialArgs']]]] = None, + sticky_settings: Optional[pulumi.Input['WindowsFunctionAppStickySettingsArgs']] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppStorageAccountArgs']]]] = None, + storage_key_vault_secret_id: Optional[pulumi.Input[str]] = None, + storage_uses_managed_identity: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + zip_deploy_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if builtin_logging_enabled is None and 'builtinLoggingEnabled' in kwargs: + builtin_logging_enabled = kwargs['builtinLoggingEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if content_share_force_disabled is None and 'contentShareForceDisabled' in kwargs: + content_share_force_disabled = kwargs['contentShareForceDisabled'] + if custom_domain_verification_id is None and 'customDomainVerificationId' in kwargs: + custom_domain_verification_id = kwargs['customDomainVerificationId'] + if daily_memory_time_quota is None and 'dailyMemoryTimeQuota' in kwargs: + daily_memory_time_quota = kwargs['dailyMemoryTimeQuota'] + if default_hostname is None and 'defaultHostname' in kwargs: + default_hostname = kwargs['defaultHostname'] + if functions_extension_version is None and 'functionsExtensionVersion' in kwargs: + functions_extension_version = kwargs['functionsExtensionVersion'] + if hosting_environment_id is None and 'hostingEnvironmentId' in kwargs: + hosting_environment_id = kwargs['hostingEnvironmentId'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if outbound_ip_address_lists is None and 'outboundIpAddressLists' in kwargs: + outbound_ip_address_lists = kwargs['outboundIpAddressLists'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if possible_outbound_ip_address_lists is None and 'possibleOutboundIpAddressLists' in kwargs: + possible_outbound_ip_address_lists = kwargs['possibleOutboundIpAddressLists'] + if possible_outbound_ip_addresses is None and 'possibleOutboundIpAddresses' in kwargs: + possible_outbound_ip_addresses = kwargs['possibleOutboundIpAddresses'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_credentials is None and 'siteCredentials' in kwargs: + site_credentials = kwargs['siteCredentials'] + if sticky_settings is None and 'stickySettings' in kwargs: + sticky_settings = kwargs['stickySettings'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if storage_key_vault_secret_id is None and 'storageKeyVaultSecretId' in kwargs: + storage_key_vault_secret_id = kwargs['storageKeyVaultSecretId'] + if storage_uses_managed_identity is None and 'storageUsesManagedIdentity' in kwargs: + storage_uses_managed_identity = kwargs['storageUsesManagedIdentity'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if zip_deploy_file is None and 'zipDeployFile' in kwargs: + zip_deploy_file = kwargs['zipDeployFile'] + if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if builtin_logging_enabled is not None: - pulumi.set(__self__, "builtin_logging_enabled", builtin_logging_enabled) + _setter("builtin_logging_enabled", builtin_logging_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if content_share_force_disabled is not None: - pulumi.set(__self__, "content_share_force_disabled", content_share_force_disabled) + _setter("content_share_force_disabled", content_share_force_disabled) if custom_domain_verification_id is not None: - pulumi.set(__self__, "custom_domain_verification_id", custom_domain_verification_id) + _setter("custom_domain_verification_id", custom_domain_verification_id) if daily_memory_time_quota is not None: - pulumi.set(__self__, "daily_memory_time_quota", daily_memory_time_quota) + _setter("daily_memory_time_quota", daily_memory_time_quota) if default_hostname is not None: - pulumi.set(__self__, "default_hostname", default_hostname) + _setter("default_hostname", default_hostname) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if functions_extension_version is not None: - pulumi.set(__self__, "functions_extension_version", functions_extension_version) + _setter("functions_extension_version", functions_extension_version) if hosting_environment_id is not None: - pulumi.set(__self__, "hosting_environment_id", hosting_environment_id) + _setter("hosting_environment_id", hosting_environment_id) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_ip_address_lists is not None: - pulumi.set(__self__, "outbound_ip_address_lists", outbound_ip_address_lists) + _setter("outbound_ip_address_lists", outbound_ip_address_lists) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if possible_outbound_ip_address_lists is not None: - pulumi.set(__self__, "possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) + _setter("possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) if possible_outbound_ip_addresses is not None: - pulumi.set(__self__, "possible_outbound_ip_addresses", possible_outbound_ip_addresses) + _setter("possible_outbound_ip_addresses", possible_outbound_ip_addresses) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_plan_id is not None: - pulumi.set(__self__, "service_plan_id", service_plan_id) + _setter("service_plan_id", service_plan_id) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if site_credentials is not None: - pulumi.set(__self__, "site_credentials", site_credentials) + _setter("site_credentials", site_credentials) if sticky_settings is not None: - pulumi.set(__self__, "sticky_settings", sticky_settings) + _setter("sticky_settings", sticky_settings) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if storage_key_vault_secret_id is not None: - pulumi.set(__self__, "storage_key_vault_secret_id", storage_key_vault_secret_id) + _setter("storage_key_vault_secret_id", storage_key_vault_secret_id) if storage_uses_managed_identity is not None: - pulumi.set(__self__, "storage_uses_managed_identity", storage_uses_managed_identity) + _setter("storage_uses_managed_identity", storage_uses_managed_identity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) if zip_deploy_file is not None: - pulumi.set(__self__, "zip_deploy_file", zip_deploy_file) + _setter("zip_deploy_file", zip_deploy_file) @property @pulumi.getter(name="appSettings") @@ -1359,6 +1641,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WindowsFunctionAppArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1405,8 +1691,23 @@ def _internal_init(__self__, __props__ = WindowsFunctionAppArgs.__new__(WindowsFunctionAppArgs) __props__.__dict__["app_settings"] = app_settings + if auth_settings is not None and not isinstance(auth_settings, WindowsFunctionAppAuthSettingsArgs): + auth_settings = auth_settings or {} + def _setter(key, value): + auth_settings[key] = value + WindowsFunctionAppAuthSettingsArgs._configure(_setter, **auth_settings) __props__.__dict__["auth_settings"] = auth_settings + if auth_settings_v2 is not None and not isinstance(auth_settings_v2, WindowsFunctionAppAuthSettingsV2Args): + auth_settings_v2 = auth_settings_v2 or {} + def _setter(key, value): + auth_settings_v2[key] = value + WindowsFunctionAppAuthSettingsV2Args._configure(_setter, **auth_settings_v2) __props__.__dict__["auth_settings_v2"] = auth_settings_v2 + if backup is not None and not isinstance(backup, WindowsFunctionAppBackupArgs): + backup = backup or {} + def _setter(key, value): + backup[key] = value + WindowsFunctionAppBackupArgs._configure(_setter, **backup) __props__.__dict__["backup"] = backup __props__.__dict__["builtin_logging_enabled"] = builtin_logging_enabled __props__.__dict__["client_certificate_enabled"] = client_certificate_enabled @@ -1418,6 +1719,11 @@ def _internal_init(__self__, __props__.__dict__["enabled"] = enabled __props__.__dict__["functions_extension_version"] = functions_extension_version __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, WindowsFunctionAppIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + WindowsFunctionAppIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["key_vault_reference_identity_id"] = key_vault_reference_identity_id __props__.__dict__["location"] = location @@ -1429,9 +1735,19 @@ def _internal_init(__self__, if service_plan_id is None and not opts.urn: raise TypeError("Missing required property 'service_plan_id'") __props__.__dict__["service_plan_id"] = service_plan_id + if site_config is not None and not isinstance(site_config, WindowsFunctionAppSiteConfigArgs): + site_config = site_config or {} + def _setter(key, value): + site_config[key] = value + WindowsFunctionAppSiteConfigArgs._configure(_setter, **site_config) if site_config is None and not opts.urn: raise TypeError("Missing required property 'site_config'") __props__.__dict__["site_config"] = site_config + if sticky_settings is not None and not isinstance(sticky_settings, WindowsFunctionAppStickySettingsArgs): + sticky_settings = sticky_settings or {} + def _setter(key, value): + sticky_settings[key] = value + WindowsFunctionAppStickySettingsArgs._configure(_setter, **sticky_settings) __props__.__dict__["sticky_settings"] = sticky_settings __props__.__dict__["storage_account_access_key"] = None if storage_account_access_key is None else pulumi.Output.secret(storage_account_access_key) __props__.__dict__["storage_account_name"] = storage_account_name diff --git a/sdk/python/pulumi_azure/appservice/windows_function_app_slot.py b/sdk/python/pulumi_azure/appservice/windows_function_app_slot.py index 48a4b1a63a..e3636d3717 100644 --- a/sdk/python/pulumi_azure/appservice/windows_function_app_slot.py +++ b/sdk/python/pulumi_azure/appservice/windows_function_app_slot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -80,60 +80,175 @@ def __init__(__self__, *, > **NOTE:** One of `storage_account_access_key` or `storage_uses_managed_identity` must be specified when using `storage_account_name`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Windows Function App Slot. """ - pulumi.set(__self__, "function_app_id", function_app_id) - pulumi.set(__self__, "site_config", site_config) + WindowsFunctionAppSlotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_app_id=function_app_id, + site_config=site_config, + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + builtin_logging_enabled=builtin_logging_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + content_share_force_disabled=content_share_force_disabled, + daily_memory_time_quota=daily_memory_time_quota, + enabled=enabled, + functions_extension_version=functions_extension_version, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + name=name, + public_network_access_enabled=public_network_access_enabled, + service_plan_id=service_plan_id, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + storage_accounts=storage_accounts, + storage_key_vault_secret_id=storage_key_vault_secret_id, + storage_uses_managed_identity=storage_uses_managed_identity, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_app_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['WindowsFunctionAppSlotSiteConfigArgs']] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['WindowsFunctionAppSlotBackupArgs']] = None, + builtin_logging_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppSlotConnectionStringArgs']]]] = None, + content_share_force_disabled: Optional[pulumi.Input[bool]] = None, + daily_memory_time_quota: Optional[pulumi.Input[int]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + functions_extension_version: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['WindowsFunctionAppSlotIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppSlotStorageAccountArgs']]]] = None, + storage_key_vault_secret_id: Optional[pulumi.Input[str]] = None, + storage_uses_managed_identity: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_app_id is None and 'functionAppId' in kwargs: + function_app_id = kwargs['functionAppId'] + if function_app_id is None: + raise TypeError("Missing 'function_app_id' argument") + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_config is None: + raise TypeError("Missing 'site_config' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if builtin_logging_enabled is None and 'builtinLoggingEnabled' in kwargs: + builtin_logging_enabled = kwargs['builtinLoggingEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if content_share_force_disabled is None and 'contentShareForceDisabled' in kwargs: + content_share_force_disabled = kwargs['contentShareForceDisabled'] + if daily_memory_time_quota is None and 'dailyMemoryTimeQuota' in kwargs: + daily_memory_time_quota = kwargs['dailyMemoryTimeQuota'] + if functions_extension_version is None and 'functionsExtensionVersion' in kwargs: + functions_extension_version = kwargs['functionsExtensionVersion'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if storage_key_vault_secret_id is None and 'storageKeyVaultSecretId' in kwargs: + storage_key_vault_secret_id = kwargs['storageKeyVaultSecretId'] + if storage_uses_managed_identity is None and 'storageUsesManagedIdentity' in kwargs: + storage_uses_managed_identity = kwargs['storageUsesManagedIdentity'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + + _setter("function_app_id", function_app_id) + _setter("site_config", site_config) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if builtin_logging_enabled is not None: - pulumi.set(__self__, "builtin_logging_enabled", builtin_logging_enabled) + _setter("builtin_logging_enabled", builtin_logging_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if content_share_force_disabled is not None: - pulumi.set(__self__, "content_share_force_disabled", content_share_force_disabled) + _setter("content_share_force_disabled", content_share_force_disabled) if daily_memory_time_quota is not None: - pulumi.set(__self__, "daily_memory_time_quota", daily_memory_time_quota) + _setter("daily_memory_time_quota", daily_memory_time_quota) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if functions_extension_version is not None: - pulumi.set(__self__, "functions_extension_version", functions_extension_version) + _setter("functions_extension_version", functions_extension_version) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if service_plan_id is not None: - pulumi.set(__self__, "service_plan_id", service_plan_id) + _setter("service_plan_id", service_plan_id) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if storage_key_vault_secret_id is not None: - pulumi.set(__self__, "storage_key_vault_secret_id", storage_key_vault_secret_id) + _setter("storage_key_vault_secret_id", storage_key_vault_secret_id) if storage_uses_managed_identity is not None: - pulumi.set(__self__, "storage_uses_managed_identity", storage_uses_managed_identity) + _setter("storage_uses_managed_identity", storage_uses_managed_identity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter(name="functionAppId") @@ -560,80 +675,225 @@ def __init__(__self__, *, > **NOTE:** One of `storage_account_access_key` or `storage_uses_managed_identity` must be specified when using `storage_account_name`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Windows Function App Slot. """ + _WindowsFunctionAppSlotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + builtin_logging_enabled=builtin_logging_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + content_share_force_disabled=content_share_force_disabled, + custom_domain_verification_id=custom_domain_verification_id, + daily_memory_time_quota=daily_memory_time_quota, + default_hostname=default_hostname, + enabled=enabled, + function_app_id=function_app_id, + functions_extension_version=functions_extension_version, + hosting_environment_id=hosting_environment_id, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + kind=kind, + name=name, + outbound_ip_address_lists=outbound_ip_address_lists, + outbound_ip_addresses=outbound_ip_addresses, + possible_outbound_ip_address_lists=possible_outbound_ip_address_lists, + possible_outbound_ip_addresses=possible_outbound_ip_addresses, + public_network_access_enabled=public_network_access_enabled, + service_plan_id=service_plan_id, + site_config=site_config, + site_credentials=site_credentials, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + storage_accounts=storage_accounts, + storage_key_vault_secret_id=storage_key_vault_secret_id, + storage_uses_managed_identity=storage_uses_managed_identity, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['WindowsFunctionAppSlotAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['WindowsFunctionAppSlotBackupArgs']] = None, + builtin_logging_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppSlotConnectionStringArgs']]]] = None, + content_share_force_disabled: Optional[pulumi.Input[bool]] = None, + custom_domain_verification_id: Optional[pulumi.Input[str]] = None, + daily_memory_time_quota: Optional[pulumi.Input[int]] = None, + default_hostname: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + function_app_id: Optional[pulumi.Input[str]] = None, + functions_extension_version: Optional[pulumi.Input[str]] = None, + hosting_environment_id: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['WindowsFunctionAppSlotIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + possible_outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + possible_outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['WindowsFunctionAppSlotSiteConfigArgs']] = None, + site_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppSlotSiteCredentialArgs']]]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsFunctionAppSlotStorageAccountArgs']]]] = None, + storage_key_vault_secret_id: Optional[pulumi.Input[str]] = None, + storage_uses_managed_identity: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if builtin_logging_enabled is None and 'builtinLoggingEnabled' in kwargs: + builtin_logging_enabled = kwargs['builtinLoggingEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if content_share_force_disabled is None and 'contentShareForceDisabled' in kwargs: + content_share_force_disabled = kwargs['contentShareForceDisabled'] + if custom_domain_verification_id is None and 'customDomainVerificationId' in kwargs: + custom_domain_verification_id = kwargs['customDomainVerificationId'] + if daily_memory_time_quota is None and 'dailyMemoryTimeQuota' in kwargs: + daily_memory_time_quota = kwargs['dailyMemoryTimeQuota'] + if default_hostname is None and 'defaultHostname' in kwargs: + default_hostname = kwargs['defaultHostname'] + if function_app_id is None and 'functionAppId' in kwargs: + function_app_id = kwargs['functionAppId'] + if functions_extension_version is None and 'functionsExtensionVersion' in kwargs: + functions_extension_version = kwargs['functionsExtensionVersion'] + if hosting_environment_id is None and 'hostingEnvironmentId' in kwargs: + hosting_environment_id = kwargs['hostingEnvironmentId'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if outbound_ip_address_lists is None and 'outboundIpAddressLists' in kwargs: + outbound_ip_address_lists = kwargs['outboundIpAddressLists'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if possible_outbound_ip_address_lists is None and 'possibleOutboundIpAddressLists' in kwargs: + possible_outbound_ip_address_lists = kwargs['possibleOutboundIpAddressLists'] + if possible_outbound_ip_addresses is None and 'possibleOutboundIpAddresses' in kwargs: + possible_outbound_ip_addresses = kwargs['possibleOutboundIpAddresses'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_credentials is None and 'siteCredentials' in kwargs: + site_credentials = kwargs['siteCredentials'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if storage_key_vault_secret_id is None and 'storageKeyVaultSecretId' in kwargs: + storage_key_vault_secret_id = kwargs['storageKeyVaultSecretId'] + if storage_uses_managed_identity is None and 'storageUsesManagedIdentity' in kwargs: + storage_uses_managed_identity = kwargs['storageUsesManagedIdentity'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if builtin_logging_enabled is not None: - pulumi.set(__self__, "builtin_logging_enabled", builtin_logging_enabled) + _setter("builtin_logging_enabled", builtin_logging_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if content_share_force_disabled is not None: - pulumi.set(__self__, "content_share_force_disabled", content_share_force_disabled) + _setter("content_share_force_disabled", content_share_force_disabled) if custom_domain_verification_id is not None: - pulumi.set(__self__, "custom_domain_verification_id", custom_domain_verification_id) + _setter("custom_domain_verification_id", custom_domain_verification_id) if daily_memory_time_quota is not None: - pulumi.set(__self__, "daily_memory_time_quota", daily_memory_time_quota) + _setter("daily_memory_time_quota", daily_memory_time_quota) if default_hostname is not None: - pulumi.set(__self__, "default_hostname", default_hostname) + _setter("default_hostname", default_hostname) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if function_app_id is not None: - pulumi.set(__self__, "function_app_id", function_app_id) + _setter("function_app_id", function_app_id) if functions_extension_version is not None: - pulumi.set(__self__, "functions_extension_version", functions_extension_version) + _setter("functions_extension_version", functions_extension_version) if hosting_environment_id is not None: - pulumi.set(__self__, "hosting_environment_id", hosting_environment_id) + _setter("hosting_environment_id", hosting_environment_id) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_ip_address_lists is not None: - pulumi.set(__self__, "outbound_ip_address_lists", outbound_ip_address_lists) + _setter("outbound_ip_address_lists", outbound_ip_address_lists) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if possible_outbound_ip_address_lists is not None: - pulumi.set(__self__, "possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) + _setter("possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) if possible_outbound_ip_addresses is not None: - pulumi.set(__self__, "possible_outbound_ip_addresses", possible_outbound_ip_addresses) + _setter("possible_outbound_ip_addresses", possible_outbound_ip_addresses) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if service_plan_id is not None: - pulumi.set(__self__, "service_plan_id", service_plan_id) + _setter("service_plan_id", service_plan_id) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if site_credentials is not None: - pulumi.set(__self__, "site_credentials", site_credentials) + _setter("site_credentials", site_credentials) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if storage_key_vault_secret_id is not None: - pulumi.set(__self__, "storage_key_vault_secret_id", storage_key_vault_secret_id) + _setter("storage_key_vault_secret_id", storage_key_vault_secret_id) if storage_uses_managed_identity is not None: - pulumi.set(__self__, "storage_uses_managed_identity", storage_uses_managed_identity) + _setter("storage_uses_managed_identity", storage_uses_managed_identity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter(name="appSettings") @@ -1249,6 +1509,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WindowsFunctionAppSlotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1292,8 +1556,23 @@ def _internal_init(__self__, __props__ = WindowsFunctionAppSlotArgs.__new__(WindowsFunctionAppSlotArgs) __props__.__dict__["app_settings"] = app_settings + if auth_settings is not None and not isinstance(auth_settings, WindowsFunctionAppSlotAuthSettingsArgs): + auth_settings = auth_settings or {} + def _setter(key, value): + auth_settings[key] = value + WindowsFunctionAppSlotAuthSettingsArgs._configure(_setter, **auth_settings) __props__.__dict__["auth_settings"] = auth_settings + if auth_settings_v2 is not None and not isinstance(auth_settings_v2, WindowsFunctionAppSlotAuthSettingsV2Args): + auth_settings_v2 = auth_settings_v2 or {} + def _setter(key, value): + auth_settings_v2[key] = value + WindowsFunctionAppSlotAuthSettingsV2Args._configure(_setter, **auth_settings_v2) __props__.__dict__["auth_settings_v2"] = auth_settings_v2 + if backup is not None and not isinstance(backup, WindowsFunctionAppSlotBackupArgs): + backup = backup or {} + def _setter(key, value): + backup[key] = value + WindowsFunctionAppSlotBackupArgs._configure(_setter, **backup) __props__.__dict__["backup"] = backup __props__.__dict__["builtin_logging_enabled"] = builtin_logging_enabled __props__.__dict__["client_certificate_enabled"] = client_certificate_enabled @@ -1308,11 +1587,21 @@ def _internal_init(__self__, __props__.__dict__["function_app_id"] = function_app_id __props__.__dict__["functions_extension_version"] = functions_extension_version __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, WindowsFunctionAppSlotIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + WindowsFunctionAppSlotIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["key_vault_reference_identity_id"] = key_vault_reference_identity_id __props__.__dict__["name"] = name __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled __props__.__dict__["service_plan_id"] = service_plan_id + if site_config is not None and not isinstance(site_config, WindowsFunctionAppSlotSiteConfigArgs): + site_config = site_config or {} + def _setter(key, value): + site_config[key] = value + WindowsFunctionAppSlotSiteConfigArgs._configure(_setter, **site_config) if site_config is None and not opts.urn: raise TypeError("Missing required property 'site_config'") __props__.__dict__["site_config"] = site_config diff --git a/sdk/python/pulumi_azure/appservice/windows_web_app.py b/sdk/python/pulumi_azure/appservice/windows_web_app.py index 8db5832b57..fba29f8612 100644 --- a/sdk/python/pulumi_azure/appservice/windows_web_app.py +++ b/sdk/python/pulumi_azure/appservice/windows_web_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -72,53 +72,154 @@ def __init__(__self__, *, > **Note:** Using this value requires either `WEBSITE_RUN_FROM_PACKAGE=1` or `SCM_DO_BUILD_DURING_DEPLOYMENT=true` to be set on the App in `app_settings`. Refer to the Azure docs on [running the Web App directly from the Zip package](https://learn.microsoft.com/en-us/azure/app-service/deploy-run-package), or [automating the build for Zip deploy](https://learn.microsoft.com/en-us/azure/app-service/deploy-zip#enable-build-automation-for-zip-deploy) for further details. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "service_plan_id", service_plan_id) - pulumi.set(__self__, "site_config", site_config) + WindowsWebAppArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + service_plan_id=service_plan_id, + site_config=site_config, + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + client_affinity_enabled=client_affinity_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + enabled=enabled, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + location=location, + logs=logs, + name=name, + public_network_access_enabled=public_network_access_enabled, + sticky_settings=sticky_settings, + storage_accounts=storage_accounts, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + zip_deploy_file=zip_deploy_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['WindowsWebAppSiteConfigArgs']] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['WindowsWebAppAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['WindowsWebAppAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['WindowsWebAppBackupArgs']] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppConnectionStringArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['WindowsWebAppIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['WindowsWebAppLogsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + sticky_settings: Optional[pulumi.Input['WindowsWebAppStickySettingsArgs']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + zip_deploy_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if service_plan_id is None: + raise TypeError("Missing 'service_plan_id' argument") + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_config is None: + raise TypeError("Missing 'site_config' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if sticky_settings is None and 'stickySettings' in kwargs: + sticky_settings = kwargs['stickySettings'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if zip_deploy_file is None and 'zipDeployFile' in kwargs: + zip_deploy_file = kwargs['zipDeployFile'] + + _setter("resource_group_name", resource_group_name) + _setter("service_plan_id", service_plan_id) + _setter("site_config", site_config) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if sticky_settings is not None: - pulumi.set(__self__, "sticky_settings", sticky_settings) + _setter("sticky_settings", sticky_settings) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) if zip_deploy_file is not None: - pulumi.set(__self__, "zip_deploy_file", zip_deploy_file) + _setter("zip_deploy_file", zip_deploy_file) @property @pulumi.getter(name="resourceGroupName") @@ -499,74 +600,203 @@ def __init__(__self__, *, > **Note:** Using this value requires either `WEBSITE_RUN_FROM_PACKAGE=1` or `SCM_DO_BUILD_DURING_DEPLOYMENT=true` to be set on the App in `app_settings`. Refer to the Azure docs on [running the Web App directly from the Zip package](https://learn.microsoft.com/en-us/azure/app-service/deploy-run-package), or [automating the build for Zip deploy](https://learn.microsoft.com/en-us/azure/app-service/deploy-zip#enable-build-automation-for-zip-deploy) for further details. """ + _WindowsWebAppState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + client_affinity_enabled=client_affinity_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + custom_domain_verification_id=custom_domain_verification_id, + default_hostname=default_hostname, + enabled=enabled, + hosting_environment_id=hosting_environment_id, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + kind=kind, + location=location, + logs=logs, + name=name, + outbound_ip_address_lists=outbound_ip_address_lists, + outbound_ip_addresses=outbound_ip_addresses, + possible_outbound_ip_address_lists=possible_outbound_ip_address_lists, + possible_outbound_ip_addresses=possible_outbound_ip_addresses, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + service_plan_id=service_plan_id, + site_config=site_config, + site_credentials=site_credentials, + sticky_settings=sticky_settings, + storage_accounts=storage_accounts, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + zip_deploy_file=zip_deploy_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['WindowsWebAppAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['WindowsWebAppAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['WindowsWebAppBackupArgs']] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppConnectionStringArgs']]]] = None, + custom_domain_verification_id: Optional[pulumi.Input[str]] = None, + default_hostname: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + hosting_environment_id: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['WindowsWebAppIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['WindowsWebAppLogsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + possible_outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + possible_outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['WindowsWebAppSiteConfigArgs']] = None, + site_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSiteCredentialArgs']]]] = None, + sticky_settings: Optional[pulumi.Input['WindowsWebAppStickySettingsArgs']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + zip_deploy_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if custom_domain_verification_id is None and 'customDomainVerificationId' in kwargs: + custom_domain_verification_id = kwargs['customDomainVerificationId'] + if default_hostname is None and 'defaultHostname' in kwargs: + default_hostname = kwargs['defaultHostname'] + if hosting_environment_id is None and 'hostingEnvironmentId' in kwargs: + hosting_environment_id = kwargs['hostingEnvironmentId'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if outbound_ip_address_lists is None and 'outboundIpAddressLists' in kwargs: + outbound_ip_address_lists = kwargs['outboundIpAddressLists'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if possible_outbound_ip_address_lists is None and 'possibleOutboundIpAddressLists' in kwargs: + possible_outbound_ip_address_lists = kwargs['possibleOutboundIpAddressLists'] + if possible_outbound_ip_addresses is None and 'possibleOutboundIpAddresses' in kwargs: + possible_outbound_ip_addresses = kwargs['possibleOutboundIpAddresses'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_credentials is None and 'siteCredentials' in kwargs: + site_credentials = kwargs['siteCredentials'] + if sticky_settings is None and 'stickySettings' in kwargs: + sticky_settings = kwargs['stickySettings'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if zip_deploy_file is None and 'zipDeployFile' in kwargs: + zip_deploy_file = kwargs['zipDeployFile'] + if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if custom_domain_verification_id is not None: - pulumi.set(__self__, "custom_domain_verification_id", custom_domain_verification_id) + _setter("custom_domain_verification_id", custom_domain_verification_id) if default_hostname is not None: - pulumi.set(__self__, "default_hostname", default_hostname) + _setter("default_hostname", default_hostname) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if hosting_environment_id is not None: - pulumi.set(__self__, "hosting_environment_id", hosting_environment_id) + _setter("hosting_environment_id", hosting_environment_id) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_ip_address_lists is not None: - pulumi.set(__self__, "outbound_ip_address_lists", outbound_ip_address_lists) + _setter("outbound_ip_address_lists", outbound_ip_address_lists) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if possible_outbound_ip_address_lists is not None: - pulumi.set(__self__, "possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) + _setter("possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) if possible_outbound_ip_addresses is not None: - pulumi.set(__self__, "possible_outbound_ip_addresses", possible_outbound_ip_addresses) + _setter("possible_outbound_ip_addresses", possible_outbound_ip_addresses) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_plan_id is not None: - pulumi.set(__self__, "service_plan_id", service_plan_id) + _setter("service_plan_id", service_plan_id) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if site_credentials is not None: - pulumi.set(__self__, "site_credentials", site_credentials) + _setter("site_credentials", site_credentials) if sticky_settings is not None: - pulumi.set(__self__, "sticky_settings", sticky_settings) + _setter("sticky_settings", sticky_settings) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) if zip_deploy_file is not None: - pulumi.set(__self__, "zip_deploy_file", zip_deploy_file) + _setter("zip_deploy_file", zip_deploy_file) @property @pulumi.getter(name="appSettings") @@ -1116,6 +1346,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WindowsWebAppArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1156,8 +1390,23 @@ def _internal_init(__self__, __props__ = WindowsWebAppArgs.__new__(WindowsWebAppArgs) __props__.__dict__["app_settings"] = app_settings + if auth_settings is not None and not isinstance(auth_settings, WindowsWebAppAuthSettingsArgs): + auth_settings = auth_settings or {} + def _setter(key, value): + auth_settings[key] = value + WindowsWebAppAuthSettingsArgs._configure(_setter, **auth_settings) __props__.__dict__["auth_settings"] = auth_settings + if auth_settings_v2 is not None and not isinstance(auth_settings_v2, WindowsWebAppAuthSettingsV2Args): + auth_settings_v2 = auth_settings_v2 or {} + def _setter(key, value): + auth_settings_v2[key] = value + WindowsWebAppAuthSettingsV2Args._configure(_setter, **auth_settings_v2) __props__.__dict__["auth_settings_v2"] = auth_settings_v2 + if backup is not None and not isinstance(backup, WindowsWebAppBackupArgs): + backup = backup or {} + def _setter(key, value): + backup[key] = value + WindowsWebAppBackupArgs._configure(_setter, **backup) __props__.__dict__["backup"] = backup __props__.__dict__["client_affinity_enabled"] = client_affinity_enabled __props__.__dict__["client_certificate_enabled"] = client_certificate_enabled @@ -1166,9 +1415,19 @@ def _internal_init(__self__, __props__.__dict__["connection_strings"] = connection_strings __props__.__dict__["enabled"] = enabled __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, WindowsWebAppIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + WindowsWebAppIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["key_vault_reference_identity_id"] = key_vault_reference_identity_id __props__.__dict__["location"] = location + if logs is not None and not isinstance(logs, WindowsWebAppLogsArgs): + logs = logs or {} + def _setter(key, value): + logs[key] = value + WindowsWebAppLogsArgs._configure(_setter, **logs) __props__.__dict__["logs"] = logs __props__.__dict__["name"] = name __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled @@ -1178,9 +1437,19 @@ def _internal_init(__self__, if service_plan_id is None and not opts.urn: raise TypeError("Missing required property 'service_plan_id'") __props__.__dict__["service_plan_id"] = service_plan_id + if site_config is not None and not isinstance(site_config, WindowsWebAppSiteConfigArgs): + site_config = site_config or {} + def _setter(key, value): + site_config[key] = value + WindowsWebAppSiteConfigArgs._configure(_setter, **site_config) if site_config is None and not opts.urn: raise TypeError("Missing required property 'site_config'") __props__.__dict__["site_config"] = site_config + if sticky_settings is not None and not isinstance(sticky_settings, WindowsWebAppStickySettingsArgs): + sticky_settings = sticky_settings or {} + def _setter(key, value): + sticky_settings[key] = value + WindowsWebAppStickySettingsArgs._configure(_setter, **sticky_settings) __props__.__dict__["sticky_settings"] = sticky_settings __props__.__dict__["storage_accounts"] = storage_accounts __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/appservice/windows_web_app_slot.py b/sdk/python/pulumi_azure/appservice/windows_web_app_slot.py index 46e163e965..23cb8b11fe 100644 --- a/sdk/python/pulumi_azure/appservice/windows_web_app_slot.py +++ b/sdk/python/pulumi_azure/appservice/windows_web_app_slot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -65,50 +65,143 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Windows Web App Slot. :param pulumi.Input[str] zip_deploy_file: The local path and filename of the Zip packaged application to deploy to this Windows Web App. """ - pulumi.set(__self__, "app_service_id", app_service_id) - pulumi.set(__self__, "site_config", site_config) + WindowsWebAppSlotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_id=app_service_id, + site_config=site_config, + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + client_affinity_enabled=client_affinity_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + enabled=enabled, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + logs=logs, + name=name, + public_network_access_enabled=public_network_access_enabled, + service_plan_id=service_plan_id, + storage_accounts=storage_accounts, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + zip_deploy_file=zip_deploy_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['WindowsWebAppSlotSiteConfigArgs']] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['WindowsWebAppSlotBackupArgs']] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotConnectionStringArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['WindowsWebAppSlotIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['WindowsWebAppSlotLogsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + zip_deploy_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_id is None and 'appServiceId' in kwargs: + app_service_id = kwargs['appServiceId'] + if app_service_id is None: + raise TypeError("Missing 'app_service_id' argument") + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_config is None: + raise TypeError("Missing 'site_config' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if zip_deploy_file is None and 'zipDeployFile' in kwargs: + zip_deploy_file = kwargs['zipDeployFile'] + + _setter("app_service_id", app_service_id) + _setter("site_config", site_config) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if service_plan_id is not None: - pulumi.set(__self__, "service_plan_id", service_plan_id) + _setter("service_plan_id", service_plan_id) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) if zip_deploy_file is not None: - pulumi.set(__self__, "zip_deploy_file", zip_deploy_file) + _setter("zip_deploy_file", zip_deploy_file) @property @pulumi.getter(name="appServiceId") @@ -453,70 +546,193 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Windows Web App Slot. :param pulumi.Input[str] zip_deploy_file: The local path and filename of the Zip packaged application to deploy to this Windows Web App. """ + _WindowsWebAppSlotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_id=app_service_id, + app_settings=app_settings, + auth_settings=auth_settings, + auth_settings_v2=auth_settings_v2, + backup=backup, + client_affinity_enabled=client_affinity_enabled, + client_certificate_enabled=client_certificate_enabled, + client_certificate_exclusion_paths=client_certificate_exclusion_paths, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + custom_domain_verification_id=custom_domain_verification_id, + default_hostname=default_hostname, + enabled=enabled, + hosting_environment_id=hosting_environment_id, + https_only=https_only, + identity=identity, + key_vault_reference_identity_id=key_vault_reference_identity_id, + kind=kind, + logs=logs, + name=name, + outbound_ip_address_lists=outbound_ip_address_lists, + outbound_ip_addresses=outbound_ip_addresses, + possible_outbound_ip_address_lists=possible_outbound_ip_address_lists, + possible_outbound_ip_addresses=possible_outbound_ip_addresses, + public_network_access_enabled=public_network_access_enabled, + service_plan_id=service_plan_id, + site_config=site_config, + site_credentials=site_credentials, + storage_accounts=storage_accounts, + tags=tags, + virtual_network_subnet_id=virtual_network_subnet_id, + zip_deploy_file=zip_deploy_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_id: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + auth_settings: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsArgs']] = None, + auth_settings_v2: Optional[pulumi.Input['WindowsWebAppSlotAuthSettingsV2Args']] = None, + backup: Optional[pulumi.Input['WindowsWebAppSlotBackupArgs']] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_exclusion_paths: Optional[pulumi.Input[str]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotConnectionStringArgs']]]] = None, + custom_domain_verification_id: Optional[pulumi.Input[str]] = None, + default_hostname: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + hosting_environment_id: Optional[pulumi.Input[str]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['WindowsWebAppSlotIdentityArgs']] = None, + key_vault_reference_identity_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['WindowsWebAppSlotLogsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + possible_outbound_ip_address_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + possible_outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + service_plan_id: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['WindowsWebAppSlotSiteConfigArgs']] = None, + site_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotSiteCredentialArgs']]]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsWebAppSlotStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + zip_deploy_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_id is None and 'appServiceId' in kwargs: + app_service_id = kwargs['appServiceId'] + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if auth_settings is None and 'authSettings' in kwargs: + auth_settings = kwargs['authSettings'] + if auth_settings_v2 is None and 'authSettingsV2' in kwargs: + auth_settings_v2 = kwargs['authSettingsV2'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if client_certificate_enabled is None and 'clientCertificateEnabled' in kwargs: + client_certificate_enabled = kwargs['clientCertificateEnabled'] + if client_certificate_exclusion_paths is None and 'clientCertificateExclusionPaths' in kwargs: + client_certificate_exclusion_paths = kwargs['clientCertificateExclusionPaths'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if custom_domain_verification_id is None and 'customDomainVerificationId' in kwargs: + custom_domain_verification_id = kwargs['customDomainVerificationId'] + if default_hostname is None and 'defaultHostname' in kwargs: + default_hostname = kwargs['defaultHostname'] + if hosting_environment_id is None and 'hostingEnvironmentId' in kwargs: + hosting_environment_id = kwargs['hostingEnvironmentId'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if key_vault_reference_identity_id is None and 'keyVaultReferenceIdentityId' in kwargs: + key_vault_reference_identity_id = kwargs['keyVaultReferenceIdentityId'] + if outbound_ip_address_lists is None and 'outboundIpAddressLists' in kwargs: + outbound_ip_address_lists = kwargs['outboundIpAddressLists'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if possible_outbound_ip_address_lists is None and 'possibleOutboundIpAddressLists' in kwargs: + possible_outbound_ip_address_lists = kwargs['possibleOutboundIpAddressLists'] + if possible_outbound_ip_addresses is None and 'possibleOutboundIpAddresses' in kwargs: + possible_outbound_ip_addresses = kwargs['possibleOutboundIpAddresses'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if service_plan_id is None and 'servicePlanId' in kwargs: + service_plan_id = kwargs['servicePlanId'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_credentials is None and 'siteCredentials' in kwargs: + site_credentials = kwargs['siteCredentials'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if zip_deploy_file is None and 'zipDeployFile' in kwargs: + zip_deploy_file = kwargs['zipDeployFile'] + if app_service_id is not None: - pulumi.set(__self__, "app_service_id", app_service_id) + _setter("app_service_id", app_service_id) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if auth_settings is not None: - pulumi.set(__self__, "auth_settings", auth_settings) + _setter("auth_settings", auth_settings) if auth_settings_v2 is not None: - pulumi.set(__self__, "auth_settings_v2", auth_settings_v2) + _setter("auth_settings_v2", auth_settings_v2) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if client_certificate_enabled is not None: - pulumi.set(__self__, "client_certificate_enabled", client_certificate_enabled) + _setter("client_certificate_enabled", client_certificate_enabled) if client_certificate_exclusion_paths is not None: - pulumi.set(__self__, "client_certificate_exclusion_paths", client_certificate_exclusion_paths) + _setter("client_certificate_exclusion_paths", client_certificate_exclusion_paths) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if custom_domain_verification_id is not None: - pulumi.set(__self__, "custom_domain_verification_id", custom_domain_verification_id) + _setter("custom_domain_verification_id", custom_domain_verification_id) if default_hostname is not None: - pulumi.set(__self__, "default_hostname", default_hostname) + _setter("default_hostname", default_hostname) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if hosting_environment_id is not None: - pulumi.set(__self__, "hosting_environment_id", hosting_environment_id) + _setter("hosting_environment_id", hosting_environment_id) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference_identity_id is not None: - pulumi.set(__self__, "key_vault_reference_identity_id", key_vault_reference_identity_id) + _setter("key_vault_reference_identity_id", key_vault_reference_identity_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_ip_address_lists is not None: - pulumi.set(__self__, "outbound_ip_address_lists", outbound_ip_address_lists) + _setter("outbound_ip_address_lists", outbound_ip_address_lists) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if possible_outbound_ip_address_lists is not None: - pulumi.set(__self__, "possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) + _setter("possible_outbound_ip_address_lists", possible_outbound_ip_address_lists) if possible_outbound_ip_addresses is not None: - pulumi.set(__self__, "possible_outbound_ip_addresses", possible_outbound_ip_addresses) + _setter("possible_outbound_ip_addresses", possible_outbound_ip_addresses) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if service_plan_id is not None: - pulumi.set(__self__, "service_plan_id", service_plan_id) + _setter("service_plan_id", service_plan_id) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if site_credentials is not None: - pulumi.set(__self__, "site_credentials", site_credentials) + _setter("site_credentials", site_credentials) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) if zip_deploy_file is not None: - pulumi.set(__self__, "zip_deploy_file", zip_deploy_file) + _setter("zip_deploy_file", zip_deploy_file) @property @pulumi.getter(name="appServiceId") @@ -1036,6 +1252,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WindowsWebAppSlotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1077,8 +1297,23 @@ def _internal_init(__self__, raise TypeError("Missing required property 'app_service_id'") __props__.__dict__["app_service_id"] = app_service_id __props__.__dict__["app_settings"] = app_settings + if auth_settings is not None and not isinstance(auth_settings, WindowsWebAppSlotAuthSettingsArgs): + auth_settings = auth_settings or {} + def _setter(key, value): + auth_settings[key] = value + WindowsWebAppSlotAuthSettingsArgs._configure(_setter, **auth_settings) __props__.__dict__["auth_settings"] = auth_settings + if auth_settings_v2 is not None and not isinstance(auth_settings_v2, WindowsWebAppSlotAuthSettingsV2Args): + auth_settings_v2 = auth_settings_v2 or {} + def _setter(key, value): + auth_settings_v2[key] = value + WindowsWebAppSlotAuthSettingsV2Args._configure(_setter, **auth_settings_v2) __props__.__dict__["auth_settings_v2"] = auth_settings_v2 + if backup is not None and not isinstance(backup, WindowsWebAppSlotBackupArgs): + backup = backup or {} + def _setter(key, value): + backup[key] = value + WindowsWebAppSlotBackupArgs._configure(_setter, **backup) __props__.__dict__["backup"] = backup __props__.__dict__["client_affinity_enabled"] = client_affinity_enabled __props__.__dict__["client_certificate_enabled"] = client_certificate_enabled @@ -1087,12 +1322,27 @@ def _internal_init(__self__, __props__.__dict__["connection_strings"] = connection_strings __props__.__dict__["enabled"] = enabled __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, WindowsWebAppSlotIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + WindowsWebAppSlotIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["key_vault_reference_identity_id"] = key_vault_reference_identity_id + if logs is not None and not isinstance(logs, WindowsWebAppSlotLogsArgs): + logs = logs or {} + def _setter(key, value): + logs[key] = value + WindowsWebAppSlotLogsArgs._configure(_setter, **logs) __props__.__dict__["logs"] = logs __props__.__dict__["name"] = name __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled __props__.__dict__["service_plan_id"] = service_plan_id + if site_config is not None and not isinstance(site_config, WindowsWebAppSlotSiteConfigArgs): + site_config = site_config or {} + def _setter(key, value): + site_config[key] = value + WindowsWebAppSlotSiteConfigArgs._configure(_setter, **site_config) if site_config is None and not opts.urn: raise TypeError("Missing required property 'site_config'") __props__.__dict__["site_config"] = site_config diff --git a/sdk/python/pulumi_azure/arc/_inputs.py b/sdk/python/pulumi_azure/arc/_inputs.py index 2c34f15b55..94f2f32da2 100644 --- a/sdk/python/pulumi_azure/arc/_inputs.py +++ b/sdk/python/pulumi_azure/arc/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -22,11 +22,32 @@ def __init__(__self__, *, """ :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that should be configured on this Arc Resource Bridge Appliance. The only possible value is `SystemAssigned`. """ - pulumi.set(__self__, "type", type) + ResourceBridgeApplianceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/arc/outputs.py b/sdk/python/pulumi_azure/arc/outputs.py index 4d1c60f12f..6ddf2f125a 100644 --- a/sdk/python/pulumi_azure/arc/outputs.py +++ b/sdk/python/pulumi_azure/arc/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -41,11 +41,32 @@ def __init__(__self__, *, """ :param str type: Specifies the type of Managed Service Identity that should be configured on this Arc Resource Bridge Appliance. The only possible value is `SystemAssigned`. """ - pulumi.set(__self__, "type", type) + ResourceBridgeApplianceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/arc/private_link_scope.py b/sdk/python/pulumi_azure/arc/private_link_scope.py index 1ef314436b..91a2cbb920 100644 --- a/sdk/python/pulumi_azure/arc/private_link_scope.py +++ b/sdk/python/pulumi_azure/arc/private_link_scope.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PrivateLinkScopeArgs', 'PrivateLinkScope'] @@ -27,15 +27,40 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. Defaults to `false`. Possible values are `true` and `false`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Azure Arc Private Link Scope. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + PrivateLinkScopeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -114,16 +139,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Azure Arc Private Link Scope should exist. Changing this forces a new Azure Arc Private Link Scope to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Azure Arc Private Link Scope. """ + _PrivateLinkScopeState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -267,6 +315,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PrivateLinkScopeArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/arc/resource_bridge_appliance.py b/sdk/python/pulumi_azure/arc/resource_bridge_appliance.py index 1101f18ad9..f021f37c01 100644 --- a/sdk/python/pulumi_azure/arc/resource_bridge_appliance.py +++ b/sdk/python/pulumi_azure/arc/resource_bridge_appliance.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,18 +35,57 @@ def __init__(__self__, *, :param pulumi.Input[str] public_key_base64: The `public_key_base64` is an RSA public key in PKCS1 format encoded in base64. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Arc Resource Bridge Appliance. """ - pulumi.set(__self__, "distro", distro) - pulumi.set(__self__, "identity", identity) - pulumi.set(__self__, "infrastructure_provider", infrastructure_provider) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ResourceBridgeApplianceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + distro=distro, + identity=identity, + infrastructure_provider=infrastructure_provider, + resource_group_name=resource_group_name, + location=location, + name=name, + public_key_base64=public_key_base64, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + distro: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ResourceBridgeApplianceIdentityArgs']] = None, + infrastructure_provider: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_key_base64: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if distro is None: + raise TypeError("Missing 'distro' argument") + if identity is None: + raise TypeError("Missing 'identity' argument") + if infrastructure_provider is None and 'infrastructureProvider' in kwargs: + infrastructure_provider = kwargs['infrastructureProvider'] + if infrastructure_provider is None: + raise TypeError("Missing 'infrastructure_provider' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if public_key_base64 is None and 'publicKeyBase64' in kwargs: + public_key_base64 = kwargs['publicKeyBase64'] + + _setter("distro", distro) + _setter("identity", identity) + _setter("infrastructure_provider", infrastructure_provider) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_key_base64 is not None: - pulumi.set(__self__, "public_key_base64", public_key_base64) + _setter("public_key_base64", public_key_base64) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -167,22 +206,53 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the resource group where the Arc Resource Bridge Appliance exists. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Arc Resource Bridge Appliance. """ + _ResourceBridgeApplianceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + distro=distro, + identity=identity, + infrastructure_provider=infrastructure_provider, + location=location, + name=name, + public_key_base64=public_key_base64, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + distro: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ResourceBridgeApplianceIdentityArgs']] = None, + infrastructure_provider: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_key_base64: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if infrastructure_provider is None and 'infrastructureProvider' in kwargs: + infrastructure_provider = kwargs['infrastructureProvider'] + if public_key_base64 is None and 'publicKeyBase64' in kwargs: + public_key_base64 = kwargs['publicKeyBase64'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if distro is not None: - pulumi.set(__self__, "distro", distro) + _setter("distro", distro) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if infrastructure_provider is not None: - pulumi.set(__self__, "infrastructure_provider", infrastructure_provider) + _setter("infrastructure_provider", infrastructure_provider) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_key_base64 is not None: - pulumi.set(__self__, "public_key_base64", public_key_base64) + _setter("public_key_base64", public_key_base64) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -384,6 +454,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourceBridgeApplianceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -409,6 +483,11 @@ def _internal_init(__self__, if distro is None and not opts.urn: raise TypeError("Missing required property 'distro'") __props__.__dict__["distro"] = distro + if identity is not None and not isinstance(identity, ResourceBridgeApplianceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ResourceBridgeApplianceIdentityArgs._configure(_setter, **identity) if identity is None and not opts.urn: raise TypeError("Missing required property 'identity'") __props__.__dict__["identity"] = identity diff --git a/sdk/python/pulumi_azure/arckubernetes/_inputs.py b/sdk/python/pulumi_azure/arckubernetes/_inputs.py index f20d2e8f0e..7c698b2212 100644 --- a/sdk/python/pulumi_azure/arckubernetes/_inputs.py +++ b/sdk/python/pulumi_azure/arckubernetes/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -30,11 +30,32 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ClusterExtensionIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -84,11 +105,32 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ClusterIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -146,19 +188,58 @@ def __init__(__self__, *, :param pulumi.Input[int] sync_interval_in_seconds: Specifies the interval at which to re-reconcile the cluster Azure Blob source with the remote. :param pulumi.Input[int] timeout_in_seconds: Specifies the maximum time to attempt to reconcile the cluster Azure Blob source with the remote. """ - pulumi.set(__self__, "container_id", container_id) + FluxConfigurationBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + account_key=account_key, + local_auth_reference=local_auth_reference, + sas_token=sas_token, + service_principal=service_principal, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[pulumi.Input[str]] = None, + account_key: Optional[pulumi.Input[str]] = None, + local_auth_reference: Optional[pulumi.Input[str]] = None, + sas_token: Optional[pulumi.Input[str]] = None, + service_principal: Optional[pulumi.Input['FluxConfigurationBlobStorageServicePrincipalArgs']] = None, + sync_interval_in_seconds: Optional[pulumi.Input[int]] = None, + timeout_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if local_auth_reference is None and 'localAuthReference' in kwargs: + local_auth_reference = kwargs['localAuthReference'] + if sas_token is None and 'sasToken' in kwargs: + sas_token = kwargs['sasToken'] + if service_principal is None and 'servicePrincipal' in kwargs: + service_principal = kwargs['servicePrincipal'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + + _setter("container_id", container_id) if account_key is not None: - pulumi.set(__self__, "account_key", account_key) + _setter("account_key", account_key) if local_auth_reference is not None: - pulumi.set(__self__, "local_auth_reference", local_auth_reference) + _setter("local_auth_reference", local_auth_reference) if sas_token is not None: - pulumi.set(__self__, "sas_token", sas_token) + _setter("sas_token", sas_token) if service_principal is not None: - pulumi.set(__self__, "service_principal", service_principal) + _setter("service_principal", service_principal) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) @property @pulumi.getter(name="containerId") @@ -262,16 +343,53 @@ def __init__(__self__, *, :param pulumi.Input[bool] client_certificate_send_chain: Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the client certificate. :param pulumi.Input[str] client_secret: Specifies the client secret for authenticating a Service Principal. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_id", tenant_id) + FluxConfigurationBlobStorageServicePrincipalArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_id=tenant_id, + client_certificate_base64=client_certificate_base64, + client_certificate_password=client_certificate_password, + client_certificate_send_chain=client_certificate_send_chain, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + client_certificate_base64: Optional[pulumi.Input[str]] = None, + client_certificate_password: Optional[pulumi.Input[str]] = None, + client_certificate_send_chain: Optional[pulumi.Input[bool]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if client_certificate_base64 is None and 'clientCertificateBase64' in kwargs: + client_certificate_base64 = kwargs['clientCertificateBase64'] + if client_certificate_password is None and 'clientCertificatePassword' in kwargs: + client_certificate_password = kwargs['clientCertificatePassword'] + if client_certificate_send_chain is None and 'clientCertificateSendChain' in kwargs: + client_certificate_send_chain = kwargs['clientCertificateSendChain'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + + _setter("client_id", client_id) + _setter("tenant_id", tenant_id) if client_certificate_base64 is not None: - pulumi.set(__self__, "client_certificate_base64", client_certificate_base64) + _setter("client_certificate_base64", client_certificate_base64) if client_certificate_password is not None: - pulumi.set(__self__, "client_certificate_password", client_certificate_password) + _setter("client_certificate_password", client_certificate_password) if client_certificate_send_chain is not None: - pulumi.set(__self__, "client_certificate_send_chain", client_certificate_send_chain) + _setter("client_certificate_send_chain", client_certificate_send_chain) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -367,20 +485,63 @@ def __init__(__self__, *, :param pulumi.Input[int] timeout_in_seconds: Specifies the maximum time to attempt to reconcile the cluster git repository source with the remote. Defaults to `600`. :param pulumi.Input[bool] tls_enabled: Specify whether to communicate with a bucket using TLS is enabled. Defaults to `true`. """ - pulumi.set(__self__, "bucket_name", bucket_name) - pulumi.set(__self__, "url", url) + FluxConfigurationBucketArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bucket_name=bucket_name, + url=url, + access_key=access_key, + local_auth_reference=local_auth_reference, + secret_key_base64=secret_key_base64, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + tls_enabled=tls_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bucket_name: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + access_key: Optional[pulumi.Input[str]] = None, + local_auth_reference: Optional[pulumi.Input[str]] = None, + secret_key_base64: Optional[pulumi.Input[str]] = None, + sync_interval_in_seconds: Optional[pulumi.Input[int]] = None, + timeout_in_seconds: Optional[pulumi.Input[int]] = None, + tls_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bucket_name is None and 'bucketName' in kwargs: + bucket_name = kwargs['bucketName'] + if bucket_name is None: + raise TypeError("Missing 'bucket_name' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if local_auth_reference is None and 'localAuthReference' in kwargs: + local_auth_reference = kwargs['localAuthReference'] + if secret_key_base64 is None and 'secretKeyBase64' in kwargs: + secret_key_base64 = kwargs['secretKeyBase64'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + if tls_enabled is None and 'tlsEnabled' in kwargs: + tls_enabled = kwargs['tlsEnabled'] + + _setter("bucket_name", bucket_name) + _setter("url", url) if access_key is not None: - pulumi.set(__self__, "access_key", access_key) + _setter("access_key", access_key) if local_auth_reference is not None: - pulumi.set(__self__, "local_auth_reference", local_auth_reference) + _setter("local_auth_reference", local_auth_reference) if secret_key_base64 is not None: - pulumi.set(__self__, "secret_key_base64", secret_key_base64) + _setter("secret_key_base64", secret_key_base64) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) if tls_enabled is not None: - pulumi.set(__self__, "tls_enabled", tls_enabled) + _setter("tls_enabled", tls_enabled) @property @pulumi.getter(name="bucketName") @@ -506,25 +667,82 @@ def __init__(__self__, *, :param pulumi.Input[int] sync_interval_in_seconds: Specifies the interval at which to re-reconcile the cluster git repository source with the remote. Defaults to `600`. :param pulumi.Input[int] timeout_in_seconds: Specifies the maximum time to attempt to reconcile the cluster git repository source with the remote. Defaults to `600`. """ - pulumi.set(__self__, "reference_type", reference_type) - pulumi.set(__self__, "reference_value", reference_value) - pulumi.set(__self__, "url", url) + FluxConfigurationGitRepositoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + reference_type=reference_type, + reference_value=reference_value, + url=url, + https_ca_cert_base64=https_ca_cert_base64, + https_key_base64=https_key_base64, + https_user=https_user, + local_auth_reference=local_auth_reference, + ssh_known_hosts_base64=ssh_known_hosts_base64, + ssh_private_key_base64=ssh_private_key_base64, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + reference_type: Optional[pulumi.Input[str]] = None, + reference_value: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + https_ca_cert_base64: Optional[pulumi.Input[str]] = None, + https_key_base64: Optional[pulumi.Input[str]] = None, + https_user: Optional[pulumi.Input[str]] = None, + local_auth_reference: Optional[pulumi.Input[str]] = None, + ssh_known_hosts_base64: Optional[pulumi.Input[str]] = None, + ssh_private_key_base64: Optional[pulumi.Input[str]] = None, + sync_interval_in_seconds: Optional[pulumi.Input[int]] = None, + timeout_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if reference_type is None and 'referenceType' in kwargs: + reference_type = kwargs['referenceType'] + if reference_type is None: + raise TypeError("Missing 'reference_type' argument") + if reference_value is None and 'referenceValue' in kwargs: + reference_value = kwargs['referenceValue'] + if reference_value is None: + raise TypeError("Missing 'reference_value' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if https_ca_cert_base64 is None and 'httpsCaCertBase64' in kwargs: + https_ca_cert_base64 = kwargs['httpsCaCertBase64'] + if https_key_base64 is None and 'httpsKeyBase64' in kwargs: + https_key_base64 = kwargs['httpsKeyBase64'] + if https_user is None and 'httpsUser' in kwargs: + https_user = kwargs['httpsUser'] + if local_auth_reference is None and 'localAuthReference' in kwargs: + local_auth_reference = kwargs['localAuthReference'] + if ssh_known_hosts_base64 is None and 'sshKnownHostsBase64' in kwargs: + ssh_known_hosts_base64 = kwargs['sshKnownHostsBase64'] + if ssh_private_key_base64 is None and 'sshPrivateKeyBase64' in kwargs: + ssh_private_key_base64 = kwargs['sshPrivateKeyBase64'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + + _setter("reference_type", reference_type) + _setter("reference_value", reference_value) + _setter("url", url) if https_ca_cert_base64 is not None: - pulumi.set(__self__, "https_ca_cert_base64", https_ca_cert_base64) + _setter("https_ca_cert_base64", https_ca_cert_base64) if https_key_base64 is not None: - pulumi.set(__self__, "https_key_base64", https_key_base64) + _setter("https_key_base64", https_key_base64) if https_user is not None: - pulumi.set(__self__, "https_user", https_user) + _setter("https_user", https_user) if local_auth_reference is not None: - pulumi.set(__self__, "local_auth_reference", local_auth_reference) + _setter("local_auth_reference", local_auth_reference) if ssh_known_hosts_base64 is not None: - pulumi.set(__self__, "ssh_known_hosts_base64", ssh_known_hosts_base64) + _setter("ssh_known_hosts_base64", ssh_known_hosts_base64) if ssh_private_key_base64 is not None: - pulumi.set(__self__, "ssh_private_key_base64", ssh_private_key_base64) + _setter("ssh_private_key_base64", ssh_private_key_base64) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) @property @pulumi.getter(name="referenceType") @@ -680,21 +898,60 @@ def __init__(__self__, *, :param pulumi.Input[int] sync_interval_in_seconds: The interval at which to re-reconcile the kustomization on the cluster. Defaults to `600`. :param pulumi.Input[int] timeout_in_seconds: The maximum time to attempt to reconcile the kustomization on the cluster. Defaults to `600`. """ - pulumi.set(__self__, "name", name) + FluxConfigurationKustomizationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + depends_ons=depends_ons, + garbage_collection_enabled=garbage_collection_enabled, + path=path, + recreating_enabled=recreating_enabled, + retry_interval_in_seconds=retry_interval_in_seconds, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + depends_ons: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + garbage_collection_enabled: Optional[pulumi.Input[bool]] = None, + path: Optional[pulumi.Input[str]] = None, + recreating_enabled: Optional[pulumi.Input[bool]] = None, + retry_interval_in_seconds: Optional[pulumi.Input[int]] = None, + sync_interval_in_seconds: Optional[pulumi.Input[int]] = None, + timeout_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if depends_ons is None and 'dependsOns' in kwargs: + depends_ons = kwargs['dependsOns'] + if garbage_collection_enabled is None and 'garbageCollectionEnabled' in kwargs: + garbage_collection_enabled = kwargs['garbageCollectionEnabled'] + if recreating_enabled is None and 'recreatingEnabled' in kwargs: + recreating_enabled = kwargs['recreatingEnabled'] + if retry_interval_in_seconds is None and 'retryIntervalInSeconds' in kwargs: + retry_interval_in_seconds = kwargs['retryIntervalInSeconds'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + + _setter("name", name) if depends_ons is not None: - pulumi.set(__self__, "depends_ons", depends_ons) + _setter("depends_ons", depends_ons) if garbage_collection_enabled is not None: - pulumi.set(__self__, "garbage_collection_enabled", garbage_collection_enabled) + _setter("garbage_collection_enabled", garbage_collection_enabled) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if recreating_enabled is not None: - pulumi.set(__self__, "recreating_enabled", recreating_enabled) + _setter("recreating_enabled", recreating_enabled) if retry_interval_in_seconds is not None: - pulumi.set(__self__, "retry_interval_in_seconds", retry_interval_in_seconds) + _setter("retry_interval_in_seconds", retry_interval_in_seconds) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/arckubernetes/cluster.py b/sdk/python/pulumi_azure/arckubernetes/cluster.py index bce0a72667..78cfd3911f 100644 --- a/sdk/python/pulumi_azure/arckubernetes/cluster.py +++ b/sdk/python/pulumi_azure/arckubernetes/cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,15 +31,46 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Arc Kubernetes Cluster. Changing this forces a new Arc Kubernetes Cluster to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Arc Kubernetes Cluster. """ - pulumi.set(__self__, "agent_public_key_certificate", agent_public_key_certificate) - pulumi.set(__self__, "identity", identity) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + agent_public_key_certificate=agent_public_key_certificate, + identity=identity, + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + agent_public_key_certificate: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ClusterIdentityArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if agent_public_key_certificate is None and 'agentPublicKeyCertificate' in kwargs: + agent_public_key_certificate = kwargs['agentPublicKeyCertificate'] + if agent_public_key_certificate is None: + raise TypeError("Missing 'agent_public_key_certificate' argument") + if identity is None: + raise TypeError("Missing 'identity' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("agent_public_key_certificate", agent_public_key_certificate) + _setter("identity", identity) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="agentPublicKeyCertificate") @@ -146,32 +177,79 @@ def __init__(__self__, *, :param pulumi.Input[int] total_core_count: Number of CPU cores present in the cluster resource. :param pulumi.Input[int] total_node_count: Number of nodes present in the cluster resource. """ + _ClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + agent_public_key_certificate=agent_public_key_certificate, + agent_version=agent_version, + distribution=distribution, + identity=identity, + infrastructure=infrastructure, + kubernetes_version=kubernetes_version, + location=location, + name=name, + offering=offering, + resource_group_name=resource_group_name, + tags=tags, + total_core_count=total_core_count, + total_node_count=total_node_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + agent_public_key_certificate: Optional[pulumi.Input[str]] = None, + agent_version: Optional[pulumi.Input[str]] = None, + distribution: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ClusterIdentityArgs']] = None, + infrastructure: Optional[pulumi.Input[str]] = None, + kubernetes_version: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + offering: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + total_core_count: Optional[pulumi.Input[int]] = None, + total_node_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if agent_public_key_certificate is None and 'agentPublicKeyCertificate' in kwargs: + agent_public_key_certificate = kwargs['agentPublicKeyCertificate'] + if agent_version is None and 'agentVersion' in kwargs: + agent_version = kwargs['agentVersion'] + if kubernetes_version is None and 'kubernetesVersion' in kwargs: + kubernetes_version = kwargs['kubernetesVersion'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if total_core_count is None and 'totalCoreCount' in kwargs: + total_core_count = kwargs['totalCoreCount'] + if total_node_count is None and 'totalNodeCount' in kwargs: + total_node_count = kwargs['totalNodeCount'] + if agent_public_key_certificate is not None: - pulumi.set(__self__, "agent_public_key_certificate", agent_public_key_certificate) + _setter("agent_public_key_certificate", agent_public_key_certificate) if agent_version is not None: - pulumi.set(__self__, "agent_version", agent_version) + _setter("agent_version", agent_version) if distribution is not None: - pulumi.set(__self__, "distribution", distribution) + _setter("distribution", distribution) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if infrastructure is not None: - pulumi.set(__self__, "infrastructure", infrastructure) + _setter("infrastructure", infrastructure) if kubernetes_version is not None: - pulumi.set(__self__, "kubernetes_version", kubernetes_version) + _setter("kubernetes_version", kubernetes_version) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if offering is not None: - pulumi.set(__self__, "offering", offering) + _setter("offering", offering) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if total_core_count is not None: - pulumi.set(__self__, "total_core_count", total_core_count) + _setter("total_core_count", total_core_count) if total_node_count is not None: - pulumi.set(__self__, "total_node_count", total_node_count) + _setter("total_node_count", total_node_count) @property @pulumi.getter(name="agentPublicKeyCertificate") @@ -385,6 +463,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -408,6 +490,11 @@ def _internal_init(__self__, if agent_public_key_certificate is None and not opts.urn: raise TypeError("Missing required property 'agent_public_key_certificate'") __props__.__dict__["agent_public_key_certificate"] = agent_public_key_certificate + if identity is not None and not isinstance(identity, ClusterIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ClusterIdentityArgs._configure(_setter, **identity) if identity is None and not opts.urn: raise TypeError("Missing required property 'identity'") __props__.__dict__["identity"] = identity diff --git a/sdk/python/pulumi_azure/arckubernetes/cluster_extension.py b/sdk/python/pulumi_azure/arckubernetes/cluster_extension.py index f0529a6d96..393fc380e7 100644 --- a/sdk/python/pulumi_azure/arckubernetes/cluster_extension.py +++ b/sdk/python/pulumi_azure/arckubernetes/cluster_extension.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,23 +39,72 @@ def __init__(__self__, *, :param pulumi.Input[str] target_namespace: Namespace where the extension will be created for a namespace scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created. :param pulumi.Input[str] version: User-specified version that the extension should pin to. If it is not set, Azure will use the latest version and auto upgrade it. Changing this forces a new Arc Kubernetes Cluster Extension to be created. """ - pulumi.set(__self__, "cluster_id", cluster_id) - pulumi.set(__self__, "extension_type", extension_type) - pulumi.set(__self__, "identity", identity) + ClusterExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + extension_type=extension_type, + identity=identity, + configuration_protected_settings=configuration_protected_settings, + configuration_settings=configuration_settings, + name=name, + release_namespace=release_namespace, + release_train=release_train, + target_namespace=target_namespace, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + extension_type: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ClusterExtensionIdentityArgs']] = None, + configuration_protected_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + configuration_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + release_namespace: Optional[pulumi.Input[str]] = None, + release_train: Optional[pulumi.Input[str]] = None, + target_namespace: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if cluster_id is None: + raise TypeError("Missing 'cluster_id' argument") + if extension_type is None and 'extensionType' in kwargs: + extension_type = kwargs['extensionType'] + if extension_type is None: + raise TypeError("Missing 'extension_type' argument") + if identity is None: + raise TypeError("Missing 'identity' argument") + if configuration_protected_settings is None and 'configurationProtectedSettings' in kwargs: + configuration_protected_settings = kwargs['configurationProtectedSettings'] + if configuration_settings is None and 'configurationSettings' in kwargs: + configuration_settings = kwargs['configurationSettings'] + if release_namespace is None and 'releaseNamespace' in kwargs: + release_namespace = kwargs['releaseNamespace'] + if release_train is None and 'releaseTrain' in kwargs: + release_train = kwargs['releaseTrain'] + if target_namespace is None and 'targetNamespace' in kwargs: + target_namespace = kwargs['targetNamespace'] + + _setter("cluster_id", cluster_id) + _setter("extension_type", extension_type) + _setter("identity", identity) if configuration_protected_settings is not None: - pulumi.set(__self__, "configuration_protected_settings", configuration_protected_settings) + _setter("configuration_protected_settings", configuration_protected_settings) if configuration_settings is not None: - pulumi.set(__self__, "configuration_settings", configuration_settings) + _setter("configuration_settings", configuration_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if release_namespace is not None: - pulumi.set(__self__, "release_namespace", release_namespace) + _setter("release_namespace", release_namespace) if release_train is not None: - pulumi.set(__self__, "release_train", release_train) + _setter("release_train", release_train) if target_namespace is not None: - pulumi.set(__self__, "target_namespace", target_namespace) + _setter("target_namespace", target_namespace) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="clusterId") @@ -206,28 +255,75 @@ def __init__(__self__, *, :param pulumi.Input[str] target_namespace: Namespace where the extension will be created for a namespace scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created. :param pulumi.Input[str] version: User-specified version that the extension should pin to. If it is not set, Azure will use the latest version and auto upgrade it. Changing this forces a new Arc Kubernetes Cluster Extension to be created. """ + _ClusterExtensionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + configuration_protected_settings=configuration_protected_settings, + configuration_settings=configuration_settings, + current_version=current_version, + extension_type=extension_type, + identity=identity, + name=name, + release_namespace=release_namespace, + release_train=release_train, + target_namespace=target_namespace, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + configuration_protected_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + configuration_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + current_version: Optional[pulumi.Input[str]] = None, + extension_type: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ClusterExtensionIdentityArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + release_namespace: Optional[pulumi.Input[str]] = None, + release_train: Optional[pulumi.Input[str]] = None, + target_namespace: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if configuration_protected_settings is None and 'configurationProtectedSettings' in kwargs: + configuration_protected_settings = kwargs['configurationProtectedSettings'] + if configuration_settings is None and 'configurationSettings' in kwargs: + configuration_settings = kwargs['configurationSettings'] + if current_version is None and 'currentVersion' in kwargs: + current_version = kwargs['currentVersion'] + if extension_type is None and 'extensionType' in kwargs: + extension_type = kwargs['extensionType'] + if release_namespace is None and 'releaseNamespace' in kwargs: + release_namespace = kwargs['releaseNamespace'] + if release_train is None and 'releaseTrain' in kwargs: + release_train = kwargs['releaseTrain'] + if target_namespace is None and 'targetNamespace' in kwargs: + target_namespace = kwargs['targetNamespace'] + if cluster_id is not None: - pulumi.set(__self__, "cluster_id", cluster_id) + _setter("cluster_id", cluster_id) if configuration_protected_settings is not None: - pulumi.set(__self__, "configuration_protected_settings", configuration_protected_settings) + _setter("configuration_protected_settings", configuration_protected_settings) if configuration_settings is not None: - pulumi.set(__self__, "configuration_settings", configuration_settings) + _setter("configuration_settings", configuration_settings) if current_version is not None: - pulumi.set(__self__, "current_version", current_version) + _setter("current_version", current_version) if extension_type is not None: - pulumi.set(__self__, "extension_type", extension_type) + _setter("extension_type", extension_type) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if release_namespace is not None: - pulumi.set(__self__, "release_namespace", release_namespace) + _setter("release_namespace", release_namespace) if release_train is not None: - pulumi.set(__self__, "release_train", release_train) + _setter("release_train", release_train) if target_namespace is not None: - pulumi.set(__self__, "target_namespace", target_namespace) + _setter("target_namespace", target_namespace) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="clusterId") @@ -475,6 +571,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ClusterExtensionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -507,6 +607,11 @@ def _internal_init(__self__, if extension_type is None and not opts.urn: raise TypeError("Missing required property 'extension_type'") __props__.__dict__["extension_type"] = extension_type + if identity is not None and not isinstance(identity, ClusterExtensionIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ClusterExtensionIdentityArgs._configure(_setter, **identity) if identity is None and not opts.urn: raise TypeError("Missing required property 'identity'") __props__.__dict__["identity"] = identity diff --git a/sdk/python/pulumi_azure/arckubernetes/flux_configuration.py b/sdk/python/pulumi_azure/arckubernetes/flux_configuration.py index 18a9e2cc4e..e51e4d7a1a 100644 --- a/sdk/python/pulumi_azure/arckubernetes/flux_configuration.py +++ b/sdk/python/pulumi_azure/arckubernetes/flux_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,21 +37,62 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Arc Kubernetes Flux Configuration. Changing this forces a new Arc Kubernetes Flux Configuration to be created. :param pulumi.Input[str] scope: Specifies the scope at which the operator will be installed. Possible values are `cluster` and `namespace`. Defaults to `namespace`. Changing this forces a new Arc Kubernetes Flux Configuration to be created. """ - pulumi.set(__self__, "cluster_id", cluster_id) - pulumi.set(__self__, "kustomizations", kustomizations) - pulumi.set(__self__, "namespace", namespace) + FluxConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + kustomizations=kustomizations, + namespace=namespace, + blob_storage=blob_storage, + bucket=bucket, + continuous_reconciliation_enabled=continuous_reconciliation_enabled, + git_repository=git_repository, + name=name, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + kustomizations: Optional[pulumi.Input[Sequence[pulumi.Input['FluxConfigurationKustomizationArgs']]]] = None, + namespace: Optional[pulumi.Input[str]] = None, + blob_storage: Optional[pulumi.Input['FluxConfigurationBlobStorageArgs']] = None, + bucket: Optional[pulumi.Input['FluxConfigurationBucketArgs']] = None, + continuous_reconciliation_enabled: Optional[pulumi.Input[bool]] = None, + git_repository: Optional[pulumi.Input['FluxConfigurationGitRepositoryArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if cluster_id is None: + raise TypeError("Missing 'cluster_id' argument") + if kustomizations is None: + raise TypeError("Missing 'kustomizations' argument") + if namespace is None: + raise TypeError("Missing 'namespace' argument") + if blob_storage is None and 'blobStorage' in kwargs: + blob_storage = kwargs['blobStorage'] + if continuous_reconciliation_enabled is None and 'continuousReconciliationEnabled' in kwargs: + continuous_reconciliation_enabled = kwargs['continuousReconciliationEnabled'] + if git_repository is None and 'gitRepository' in kwargs: + git_repository = kwargs['gitRepository'] + + _setter("cluster_id", cluster_id) + _setter("kustomizations", kustomizations) + _setter("namespace", namespace) if blob_storage is not None: - pulumi.set(__self__, "blob_storage", blob_storage) + _setter("blob_storage", blob_storage) if bucket is not None: - pulumi.set(__self__, "bucket", bucket) + _setter("bucket", bucket) if continuous_reconciliation_enabled is not None: - pulumi.set(__self__, "continuous_reconciliation_enabled", continuous_reconciliation_enabled) + _setter("continuous_reconciliation_enabled", continuous_reconciliation_enabled) if git_repository is not None: - pulumi.set(__self__, "git_repository", git_repository) + _setter("git_repository", git_repository) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="clusterId") @@ -186,24 +227,59 @@ def __init__(__self__, *, :param pulumi.Input[str] namespace: Specifies the namespace to which this configuration is installed to. Changing this forces a new Arc Kubernetes Flux Configuration to be created. :param pulumi.Input[str] scope: Specifies the scope at which the operator will be installed. Possible values are `cluster` and `namespace`. Defaults to `namespace`. Changing this forces a new Arc Kubernetes Flux Configuration to be created. """ + _FluxConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_storage=blob_storage, + bucket=bucket, + cluster_id=cluster_id, + continuous_reconciliation_enabled=continuous_reconciliation_enabled, + git_repository=git_repository, + kustomizations=kustomizations, + name=name, + namespace=namespace, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_storage: Optional[pulumi.Input['FluxConfigurationBlobStorageArgs']] = None, + bucket: Optional[pulumi.Input['FluxConfigurationBucketArgs']] = None, + cluster_id: Optional[pulumi.Input[str]] = None, + continuous_reconciliation_enabled: Optional[pulumi.Input[bool]] = None, + git_repository: Optional[pulumi.Input['FluxConfigurationGitRepositoryArgs']] = None, + kustomizations: Optional[pulumi.Input[Sequence[pulumi.Input['FluxConfigurationKustomizationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_storage is None and 'blobStorage' in kwargs: + blob_storage = kwargs['blobStorage'] + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if continuous_reconciliation_enabled is None and 'continuousReconciliationEnabled' in kwargs: + continuous_reconciliation_enabled = kwargs['continuousReconciliationEnabled'] + if git_repository is None and 'gitRepository' in kwargs: + git_repository = kwargs['gitRepository'] + if blob_storage is not None: - pulumi.set(__self__, "blob_storage", blob_storage) + _setter("blob_storage", blob_storage) if bucket is not None: - pulumi.set(__self__, "bucket", bucket) + _setter("bucket", bucket) if cluster_id is not None: - pulumi.set(__self__, "cluster_id", cluster_id) + _setter("cluster_id", cluster_id) if continuous_reconciliation_enabled is not None: - pulumi.set(__self__, "continuous_reconciliation_enabled", continuous_reconciliation_enabled) + _setter("continuous_reconciliation_enabled", continuous_reconciliation_enabled) if git_repository is not None: - pulumi.set(__self__, "git_repository", git_repository) + _setter("git_repository", git_repository) if kustomizations is not None: - pulumi.set(__self__, "kustomizations", kustomizations) + _setter("kustomizations", kustomizations) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace is not None: - pulumi.set(__self__, "namespace", namespace) + _setter("namespace", namespace) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="blobStorage") @@ -449,6 +525,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FluxConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -472,12 +552,27 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = FluxConfigurationArgs.__new__(FluxConfigurationArgs) + if blob_storage is not None and not isinstance(blob_storage, FluxConfigurationBlobStorageArgs): + blob_storage = blob_storage or {} + def _setter(key, value): + blob_storage[key] = value + FluxConfigurationBlobStorageArgs._configure(_setter, **blob_storage) __props__.__dict__["blob_storage"] = blob_storage + if bucket is not None and not isinstance(bucket, FluxConfigurationBucketArgs): + bucket = bucket or {} + def _setter(key, value): + bucket[key] = value + FluxConfigurationBucketArgs._configure(_setter, **bucket) __props__.__dict__["bucket"] = bucket if cluster_id is None and not opts.urn: raise TypeError("Missing required property 'cluster_id'") __props__.__dict__["cluster_id"] = cluster_id __props__.__dict__["continuous_reconciliation_enabled"] = continuous_reconciliation_enabled + if git_repository is not None and not isinstance(git_repository, FluxConfigurationGitRepositoryArgs): + git_repository = git_repository or {} + def _setter(key, value): + git_repository[key] = value + FluxConfigurationGitRepositoryArgs._configure(_setter, **git_repository) __props__.__dict__["git_repository"] = git_repository if kustomizations is None and not opts.urn: raise TypeError("Missing required property 'kustomizations'") diff --git a/sdk/python/pulumi_azure/arckubernetes/outputs.py b/sdk/python/pulumi_azure/arckubernetes/outputs.py index 5df14a5227..240e0afd04 100644 --- a/sdk/python/pulumi_azure/arckubernetes/outputs.py +++ b/sdk/python/pulumi_azure/arckubernetes/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -50,11 +50,32 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ClusterExtensionIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -111,11 +132,32 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ClusterIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -190,19 +232,58 @@ def __init__(__self__, *, :param int sync_interval_in_seconds: Specifies the interval at which to re-reconcile the cluster Azure Blob source with the remote. :param int timeout_in_seconds: Specifies the maximum time to attempt to reconcile the cluster Azure Blob source with the remote. """ - pulumi.set(__self__, "container_id", container_id) + FluxConfigurationBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + account_key=account_key, + local_auth_reference=local_auth_reference, + sas_token=sas_token, + service_principal=service_principal, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[str] = None, + account_key: Optional[str] = None, + local_auth_reference: Optional[str] = None, + sas_token: Optional[str] = None, + service_principal: Optional['outputs.FluxConfigurationBlobStorageServicePrincipal'] = None, + sync_interval_in_seconds: Optional[int] = None, + timeout_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if local_auth_reference is None and 'localAuthReference' in kwargs: + local_auth_reference = kwargs['localAuthReference'] + if sas_token is None and 'sasToken' in kwargs: + sas_token = kwargs['sasToken'] + if service_principal is None and 'servicePrincipal' in kwargs: + service_principal = kwargs['servicePrincipal'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + + _setter("container_id", container_id) if account_key is not None: - pulumi.set(__self__, "account_key", account_key) + _setter("account_key", account_key) if local_auth_reference is not None: - pulumi.set(__self__, "local_auth_reference", local_auth_reference) + _setter("local_auth_reference", local_auth_reference) if sas_token is not None: - pulumi.set(__self__, "sas_token", sas_token) + _setter("sas_token", sas_token) if service_principal is not None: - pulumi.set(__self__, "service_principal", service_principal) + _setter("service_principal", service_principal) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) @property @pulumi.getter(name="containerId") @@ -305,16 +386,53 @@ def __init__(__self__, *, :param bool client_certificate_send_chain: Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the client certificate. :param str client_secret: Specifies the client secret for authenticating a Service Principal. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_id", tenant_id) + FluxConfigurationBlobStorageServicePrincipal._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_id=tenant_id, + client_certificate_base64=client_certificate_base64, + client_certificate_password=client_certificate_password, + client_certificate_send_chain=client_certificate_send_chain, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + tenant_id: Optional[str] = None, + client_certificate_base64: Optional[str] = None, + client_certificate_password: Optional[str] = None, + client_certificate_send_chain: Optional[bool] = None, + client_secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if client_certificate_base64 is None and 'clientCertificateBase64' in kwargs: + client_certificate_base64 = kwargs['clientCertificateBase64'] + if client_certificate_password is None and 'clientCertificatePassword' in kwargs: + client_certificate_password = kwargs['clientCertificatePassword'] + if client_certificate_send_chain is None and 'clientCertificateSendChain' in kwargs: + client_certificate_send_chain = kwargs['clientCertificateSendChain'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + + _setter("client_id", client_id) + _setter("tenant_id", tenant_id) if client_certificate_base64 is not None: - pulumi.set(__self__, "client_certificate_base64", client_certificate_base64) + _setter("client_certificate_base64", client_certificate_base64) if client_certificate_password is not None: - pulumi.set(__self__, "client_certificate_password", client_certificate_password) + _setter("client_certificate_password", client_certificate_password) if client_certificate_send_chain is not None: - pulumi.set(__self__, "client_certificate_send_chain", client_certificate_send_chain) + _setter("client_certificate_send_chain", client_certificate_send_chain) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -415,20 +533,63 @@ def __init__(__self__, *, :param int timeout_in_seconds: Specifies the maximum time to attempt to reconcile the cluster git repository source with the remote. Defaults to `600`. :param bool tls_enabled: Specify whether to communicate with a bucket using TLS is enabled. Defaults to `true`. """ - pulumi.set(__self__, "bucket_name", bucket_name) - pulumi.set(__self__, "url", url) + FluxConfigurationBucket._configure( + lambda key, value: pulumi.set(__self__, key, value), + bucket_name=bucket_name, + url=url, + access_key=access_key, + local_auth_reference=local_auth_reference, + secret_key_base64=secret_key_base64, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + tls_enabled=tls_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bucket_name: Optional[str] = None, + url: Optional[str] = None, + access_key: Optional[str] = None, + local_auth_reference: Optional[str] = None, + secret_key_base64: Optional[str] = None, + sync_interval_in_seconds: Optional[int] = None, + timeout_in_seconds: Optional[int] = None, + tls_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bucket_name is None and 'bucketName' in kwargs: + bucket_name = kwargs['bucketName'] + if bucket_name is None: + raise TypeError("Missing 'bucket_name' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if local_auth_reference is None and 'localAuthReference' in kwargs: + local_auth_reference = kwargs['localAuthReference'] + if secret_key_base64 is None and 'secretKeyBase64' in kwargs: + secret_key_base64 = kwargs['secretKeyBase64'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + if tls_enabled is None and 'tlsEnabled' in kwargs: + tls_enabled = kwargs['tlsEnabled'] + + _setter("bucket_name", bucket_name) + _setter("url", url) if access_key is not None: - pulumi.set(__self__, "access_key", access_key) + _setter("access_key", access_key) if local_auth_reference is not None: - pulumi.set(__self__, "local_auth_reference", local_auth_reference) + _setter("local_auth_reference", local_auth_reference) if secret_key_base64 is not None: - pulumi.set(__self__, "secret_key_base64", secret_key_base64) + _setter("secret_key_base64", secret_key_base64) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) if tls_enabled is not None: - pulumi.set(__self__, "tls_enabled", tls_enabled) + _setter("tls_enabled", tls_enabled) @property @pulumi.getter(name="bucketName") @@ -557,25 +718,82 @@ def __init__(__self__, *, :param int sync_interval_in_seconds: Specifies the interval at which to re-reconcile the cluster git repository source with the remote. Defaults to `600`. :param int timeout_in_seconds: Specifies the maximum time to attempt to reconcile the cluster git repository source with the remote. Defaults to `600`. """ - pulumi.set(__self__, "reference_type", reference_type) - pulumi.set(__self__, "reference_value", reference_value) - pulumi.set(__self__, "url", url) + FluxConfigurationGitRepository._configure( + lambda key, value: pulumi.set(__self__, key, value), + reference_type=reference_type, + reference_value=reference_value, + url=url, + https_ca_cert_base64=https_ca_cert_base64, + https_key_base64=https_key_base64, + https_user=https_user, + local_auth_reference=local_auth_reference, + ssh_known_hosts_base64=ssh_known_hosts_base64, + ssh_private_key_base64=ssh_private_key_base64, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + reference_type: Optional[str] = None, + reference_value: Optional[str] = None, + url: Optional[str] = None, + https_ca_cert_base64: Optional[str] = None, + https_key_base64: Optional[str] = None, + https_user: Optional[str] = None, + local_auth_reference: Optional[str] = None, + ssh_known_hosts_base64: Optional[str] = None, + ssh_private_key_base64: Optional[str] = None, + sync_interval_in_seconds: Optional[int] = None, + timeout_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if reference_type is None and 'referenceType' in kwargs: + reference_type = kwargs['referenceType'] + if reference_type is None: + raise TypeError("Missing 'reference_type' argument") + if reference_value is None and 'referenceValue' in kwargs: + reference_value = kwargs['referenceValue'] + if reference_value is None: + raise TypeError("Missing 'reference_value' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if https_ca_cert_base64 is None and 'httpsCaCertBase64' in kwargs: + https_ca_cert_base64 = kwargs['httpsCaCertBase64'] + if https_key_base64 is None and 'httpsKeyBase64' in kwargs: + https_key_base64 = kwargs['httpsKeyBase64'] + if https_user is None and 'httpsUser' in kwargs: + https_user = kwargs['httpsUser'] + if local_auth_reference is None and 'localAuthReference' in kwargs: + local_auth_reference = kwargs['localAuthReference'] + if ssh_known_hosts_base64 is None and 'sshKnownHostsBase64' in kwargs: + ssh_known_hosts_base64 = kwargs['sshKnownHostsBase64'] + if ssh_private_key_base64 is None and 'sshPrivateKeyBase64' in kwargs: + ssh_private_key_base64 = kwargs['sshPrivateKeyBase64'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + + _setter("reference_type", reference_type) + _setter("reference_value", reference_value) + _setter("url", url) if https_ca_cert_base64 is not None: - pulumi.set(__self__, "https_ca_cert_base64", https_ca_cert_base64) + _setter("https_ca_cert_base64", https_ca_cert_base64) if https_key_base64 is not None: - pulumi.set(__self__, "https_key_base64", https_key_base64) + _setter("https_key_base64", https_key_base64) if https_user is not None: - pulumi.set(__self__, "https_user", https_user) + _setter("https_user", https_user) if local_auth_reference is not None: - pulumi.set(__self__, "local_auth_reference", local_auth_reference) + _setter("local_auth_reference", local_auth_reference) if ssh_known_hosts_base64 is not None: - pulumi.set(__self__, "ssh_known_hosts_base64", ssh_known_hosts_base64) + _setter("ssh_known_hosts_base64", ssh_known_hosts_base64) if ssh_private_key_base64 is not None: - pulumi.set(__self__, "ssh_private_key_base64", ssh_private_key_base64) + _setter("ssh_private_key_base64", ssh_private_key_base64) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) @property @pulumi.getter(name="referenceType") @@ -714,21 +932,60 @@ def __init__(__self__, *, :param int sync_interval_in_seconds: The interval at which to re-reconcile the kustomization on the cluster. Defaults to `600`. :param int timeout_in_seconds: The maximum time to attempt to reconcile the kustomization on the cluster. Defaults to `600`. """ - pulumi.set(__self__, "name", name) + FluxConfigurationKustomization._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + depends_ons=depends_ons, + garbage_collection_enabled=garbage_collection_enabled, + path=path, + recreating_enabled=recreating_enabled, + retry_interval_in_seconds=retry_interval_in_seconds, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + depends_ons: Optional[Sequence[str]] = None, + garbage_collection_enabled: Optional[bool] = None, + path: Optional[str] = None, + recreating_enabled: Optional[bool] = None, + retry_interval_in_seconds: Optional[int] = None, + sync_interval_in_seconds: Optional[int] = None, + timeout_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if depends_ons is None and 'dependsOns' in kwargs: + depends_ons = kwargs['dependsOns'] + if garbage_collection_enabled is None and 'garbageCollectionEnabled' in kwargs: + garbage_collection_enabled = kwargs['garbageCollectionEnabled'] + if recreating_enabled is None and 'recreatingEnabled' in kwargs: + recreating_enabled = kwargs['recreatingEnabled'] + if retry_interval_in_seconds is None and 'retryIntervalInSeconds' in kwargs: + retry_interval_in_seconds = kwargs['retryIntervalInSeconds'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + + _setter("name", name) if depends_ons is not None: - pulumi.set(__self__, "depends_ons", depends_ons) + _setter("depends_ons", depends_ons) if garbage_collection_enabled is not None: - pulumi.set(__self__, "garbage_collection_enabled", garbage_collection_enabled) + _setter("garbage_collection_enabled", garbage_collection_enabled) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if recreating_enabled is not None: - pulumi.set(__self__, "recreating_enabled", recreating_enabled) + _setter("recreating_enabled", recreating_enabled) if retry_interval_in_seconds is not None: - pulumi.set(__self__, "retry_interval_in_seconds", retry_interval_in_seconds) + _setter("retry_interval_in_seconds", retry_interval_in_seconds) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/arcmachine/extension.py b/sdk/python/pulumi_azure/arcmachine/extension.py index 0a62152b69..15834dff90 100644 --- a/sdk/python/pulumi_azure/arcmachine/extension.py +++ b/sdk/python/pulumi_azure/arcmachine/extension.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ExtensionArgs', 'Extension'] @@ -45,25 +45,72 @@ def __init__(__self__, *, **NOTE:** 1. When `automatic_upgrade_enabled` is set to `false` and no `type_handler_version` is specified, the `type_handler_version` change should be manually ignored by `ignore_changes` lifecycle block. This is because the `type_handler_version` is set by the Azure platform when the extension is created. 2. When `automatic_upgrade_enabled` is set to `false` and `type_handler_version` is specified, the provider will check whether the version prefix is aligned with user input. For example, if user specifies `1.24` in `type_handler_version`, `1.24.1` will be considered as no diff. """ - pulumi.set(__self__, "arc_machine_id", arc_machine_id) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) + ExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + arc_machine_id=arc_machine_id, + publisher=publisher, + type=type, + automatic_upgrade_enabled=automatic_upgrade_enabled, + force_update_tag=force_update_tag, + location=location, + name=name, + protected_settings=protected_settings, + settings=settings, + tags=tags, + type_handler_version=type_handler_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + arc_machine_id: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + automatic_upgrade_enabled: Optional[pulumi.Input[bool]] = None, + force_update_tag: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + protected_settings: Optional[pulumi.Input[str]] = None, + settings: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + type_handler_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if arc_machine_id is None and 'arcMachineId' in kwargs: + arc_machine_id = kwargs['arcMachineId'] + if arc_machine_id is None: + raise TypeError("Missing 'arc_machine_id' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if automatic_upgrade_enabled is None and 'automaticUpgradeEnabled' in kwargs: + automatic_upgrade_enabled = kwargs['automaticUpgradeEnabled'] + if force_update_tag is None and 'forceUpdateTag' in kwargs: + force_update_tag = kwargs['forceUpdateTag'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + + _setter("arc_machine_id", arc_machine_id) + _setter("publisher", publisher) + _setter("type", type) if automatic_upgrade_enabled is not None: - pulumi.set(__self__, "automatic_upgrade_enabled", automatic_upgrade_enabled) + _setter("automatic_upgrade_enabled", automatic_upgrade_enabled) if force_update_tag is not None: - pulumi.set(__self__, "force_update_tag", force_update_tag) + _setter("force_update_tag", force_update_tag) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type_handler_version is not None: - pulumi.set(__self__, "type_handler_version", type_handler_version) + _setter("type_handler_version", type_handler_version) @property @pulumi.getter(name="arcMachineId") @@ -238,28 +285,69 @@ def __init__(__self__, *, **NOTE:** 1. When `automatic_upgrade_enabled` is set to `false` and no `type_handler_version` is specified, the `type_handler_version` change should be manually ignored by `ignore_changes` lifecycle block. This is because the `type_handler_version` is set by the Azure platform when the extension is created. 2. When `automatic_upgrade_enabled` is set to `false` and `type_handler_version` is specified, the provider will check whether the version prefix is aligned with user input. For example, if user specifies `1.24` in `type_handler_version`, `1.24.1` will be considered as no diff. """ + _ExtensionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + arc_machine_id=arc_machine_id, + automatic_upgrade_enabled=automatic_upgrade_enabled, + force_update_tag=force_update_tag, + location=location, + name=name, + protected_settings=protected_settings, + publisher=publisher, + settings=settings, + tags=tags, + type=type, + type_handler_version=type_handler_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + arc_machine_id: Optional[pulumi.Input[str]] = None, + automatic_upgrade_enabled: Optional[pulumi.Input[bool]] = None, + force_update_tag: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + protected_settings: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + settings: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + type_handler_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if arc_machine_id is None and 'arcMachineId' in kwargs: + arc_machine_id = kwargs['arcMachineId'] + if automatic_upgrade_enabled is None and 'automaticUpgradeEnabled' in kwargs: + automatic_upgrade_enabled = kwargs['automaticUpgradeEnabled'] + if force_update_tag is None and 'forceUpdateTag' in kwargs: + force_update_tag = kwargs['forceUpdateTag'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if arc_machine_id is not None: - pulumi.set(__self__, "arc_machine_id", arc_machine_id) + _setter("arc_machine_id", arc_machine_id) if automatic_upgrade_enabled is not None: - pulumi.set(__self__, "automatic_upgrade_enabled", automatic_upgrade_enabled) + _setter("automatic_upgrade_enabled", automatic_upgrade_enabled) if force_update_tag is not None: - pulumi.set(__self__, "force_update_tag", force_update_tag) + _setter("force_update_tag", force_update_tag) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if type_handler_version is not None: - pulumi.set(__self__, "type_handler_version", type_handler_version) + _setter("type_handler_version", type_handler_version) @property @pulumi.getter(name="arcMachineId") @@ -475,6 +563,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ExtensionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/arcmachine/get.py b/sdk/python/pulumi_azure/arcmachine/get.py index 66c0faa0bc..0cb09a3f0c 100644 --- a/sdk/python/pulumi_azure/arcmachine/get.py +++ b/sdk/python/pulumi_azure/arcmachine/get.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/arcmachine/outputs.py b/sdk/python/pulumi_azure/arcmachine/outputs.py index e78c4c3a31..0a3cbdc65f 100644 --- a/sdk/python/pulumi_azure/arcmachine/outputs.py +++ b/sdk/python/pulumi_azure/arcmachine/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -46,13 +46,64 @@ def __init__(__self__, *, :param Sequence[str] proxy_bypasses: List of service names which should not use the specified proxy server. :param str proxy_url: Specifies the URL of the proxy to be used. """ - pulumi.set(__self__, "extensions_allow_lists", extensions_allow_lists) - pulumi.set(__self__, "extensions_block_lists", extensions_block_lists) - pulumi.set(__self__, "extensions_enabled", extensions_enabled) - pulumi.set(__self__, "guest_configuration_enabled", guest_configuration_enabled) - pulumi.set(__self__, "incoming_connections_ports", incoming_connections_ports) - pulumi.set(__self__, "proxy_bypasses", proxy_bypasses) - pulumi.set(__self__, "proxy_url", proxy_url) + GetAgentResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + extensions_allow_lists=extensions_allow_lists, + extensions_block_lists=extensions_block_lists, + extensions_enabled=extensions_enabled, + guest_configuration_enabled=guest_configuration_enabled, + incoming_connections_ports=incoming_connections_ports, + proxy_bypasses=proxy_bypasses, + proxy_url=proxy_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + extensions_allow_lists: Optional[Sequence['outputs.GetAgentExtensionsAllowListResult']] = None, + extensions_block_lists: Optional[Sequence['outputs.GetAgentExtensionsBlockListResult']] = None, + extensions_enabled: Optional[bool] = None, + guest_configuration_enabled: Optional[bool] = None, + incoming_connections_ports: Optional[Sequence[str]] = None, + proxy_bypasses: Optional[Sequence[str]] = None, + proxy_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if extensions_allow_lists is None and 'extensionsAllowLists' in kwargs: + extensions_allow_lists = kwargs['extensionsAllowLists'] + if extensions_allow_lists is None: + raise TypeError("Missing 'extensions_allow_lists' argument") + if extensions_block_lists is None and 'extensionsBlockLists' in kwargs: + extensions_block_lists = kwargs['extensionsBlockLists'] + if extensions_block_lists is None: + raise TypeError("Missing 'extensions_block_lists' argument") + if extensions_enabled is None and 'extensionsEnabled' in kwargs: + extensions_enabled = kwargs['extensionsEnabled'] + if extensions_enabled is None: + raise TypeError("Missing 'extensions_enabled' argument") + if guest_configuration_enabled is None and 'guestConfigurationEnabled' in kwargs: + guest_configuration_enabled = kwargs['guestConfigurationEnabled'] + if guest_configuration_enabled is None: + raise TypeError("Missing 'guest_configuration_enabled' argument") + if incoming_connections_ports is None and 'incomingConnectionsPorts' in kwargs: + incoming_connections_ports = kwargs['incomingConnectionsPorts'] + if incoming_connections_ports is None: + raise TypeError("Missing 'incoming_connections_ports' argument") + if proxy_bypasses is None and 'proxyBypasses' in kwargs: + proxy_bypasses = kwargs['proxyBypasses'] + if proxy_bypasses is None: + raise TypeError("Missing 'proxy_bypasses' argument") + if proxy_url is None and 'proxyUrl' in kwargs: + proxy_url = kwargs['proxyUrl'] + if proxy_url is None: + raise TypeError("Missing 'proxy_url' argument") + + _setter("extensions_allow_lists", extensions_allow_lists) + _setter("extensions_block_lists", extensions_block_lists) + _setter("extensions_enabled", extensions_enabled) + _setter("guest_configuration_enabled", guest_configuration_enabled) + _setter("incoming_connections_ports", incoming_connections_ports) + _setter("proxy_bypasses", proxy_bypasses) + _setter("proxy_url", proxy_url) @property @pulumi.getter(name="extensionsAllowLists") @@ -120,8 +171,25 @@ def __init__(__self__, *, :param str publisher: Publisher of the extension. :param str type: The identity type. """ - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) + GetAgentExtensionsAllowListResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + publisher=publisher, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + publisher: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("publisher", publisher) + _setter("type", type) @property @pulumi.getter @@ -149,8 +217,25 @@ def __init__(__self__, *, :param str publisher: Publisher of the extension. :param str type: The identity type. """ - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) + GetAgentExtensionsBlockListResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + publisher=publisher, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + publisher: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("publisher", publisher) + _setter("type", type) @property @pulumi.getter @@ -176,7 +261,20 @@ def __init__(__self__, *, """ :param str provider: Specifies the cloud provider. For example `Azure`, `AWS` and `GCP`. """ - pulumi.set(__self__, "provider", provider) + GetCloudMetadataResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + provider=provider, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + provider: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if provider is None: + raise TypeError("Missing 'provider' argument") + + _setter("provider", provider) @property @pulumi.getter @@ -198,9 +296,34 @@ def __init__(__self__, *, :param str tenant_id: The tenant ID of resource. :param str type: The identity type. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="principalId") @@ -240,10 +363,37 @@ def __init__(__self__, *, :param str district: The district, state, or province where the resource is located. :param str name: The name of this Azure Arc machine. """ - pulumi.set(__self__, "city", city) - pulumi.set(__self__, "country_or_region", country_or_region) - pulumi.set(__self__, "district", district) - pulumi.set(__self__, "name", name) + GetLocationDataResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + city=city, + country_or_region=country_or_region, + district=district, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + city: Optional[str] = None, + country_or_region: Optional[str] = None, + district: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if city is None: + raise TypeError("Missing 'city' argument") + if country_or_region is None and 'countryOrRegion' in kwargs: + country_or_region = kwargs['countryOrRegion'] + if country_or_region is None: + raise TypeError("Missing 'country_or_region' argument") + if district is None: + raise TypeError("Missing 'district' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("city", city) + _setter("country_or_region", country_or_region) + _setter("district", district) + _setter("name", name) @property @pulumi.getter @@ -289,9 +439,32 @@ def __init__(__self__, *, :param Sequence['GetOsProfileLinuxArgs'] linuxes: A `linux` block as defined above. :param Sequence['GetOsProfileWindowArgs'] windows: A `windows` block as defined below. """ - pulumi.set(__self__, "computer_name", computer_name) - pulumi.set(__self__, "linuxes", linuxes) - pulumi.set(__self__, "windows", windows) + GetOsProfileResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + computer_name=computer_name, + linuxes=linuxes, + windows=windows, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + computer_name: Optional[str] = None, + linuxes: Optional[Sequence['outputs.GetOsProfileLinuxResult']] = None, + windows: Optional[Sequence['outputs.GetOsProfileWindowResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if computer_name is None and 'computerName' in kwargs: + computer_name = kwargs['computerName'] + if computer_name is None: + raise TypeError("Missing 'computer_name' argument") + if linuxes is None: + raise TypeError("Missing 'linuxes' argument") + if windows is None: + raise TypeError("Missing 'windows' argument") + + _setter("computer_name", computer_name) + _setter("linuxes", linuxes) + _setter("windows", windows) @property @pulumi.getter(name="computerName") @@ -325,7 +498,20 @@ def __init__(__self__, *, """ :param Sequence['GetOsProfileLinuxPatchArgs'] patches: A `patch` block as defined above. """ - pulumi.set(__self__, "patches", patches) + GetOsProfileLinuxResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + patches=patches, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + patches: Optional[Sequence['outputs.GetOsProfileLinuxPatchResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if patches is None: + raise TypeError("Missing 'patches' argument") + + _setter("patches", patches) @property @pulumi.getter @@ -345,8 +531,29 @@ def __init__(__self__, *, :param str assessment_mode: Specifies the assessment mode. :param str patch_mode: Specifies the patch mode. """ - pulumi.set(__self__, "assessment_mode", assessment_mode) - pulumi.set(__self__, "patch_mode", patch_mode) + GetOsProfileLinuxPatchResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + assessment_mode=assessment_mode, + patch_mode=patch_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assessment_mode: Optional[str] = None, + patch_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assessment_mode is None and 'assessmentMode' in kwargs: + assessment_mode = kwargs['assessmentMode'] + if assessment_mode is None: + raise TypeError("Missing 'assessment_mode' argument") + if patch_mode is None and 'patchMode' in kwargs: + patch_mode = kwargs['patchMode'] + if patch_mode is None: + raise TypeError("Missing 'patch_mode' argument") + + _setter("assessment_mode", assessment_mode) + _setter("patch_mode", patch_mode) @property @pulumi.getter(name="assessmentMode") @@ -372,7 +579,20 @@ def __init__(__self__, *, """ :param Sequence['GetOsProfileWindowPatchArgs'] patches: A `patch` block as defined above. """ - pulumi.set(__self__, "patches", patches) + GetOsProfileWindowResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + patches=patches, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + patches: Optional[Sequence['outputs.GetOsProfileWindowPatchResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if patches is None: + raise TypeError("Missing 'patches' argument") + + _setter("patches", patches) @property @pulumi.getter @@ -392,8 +612,29 @@ def __init__(__self__, *, :param str assessment_mode: Specifies the assessment mode. :param str patch_mode: Specifies the patch mode. """ - pulumi.set(__self__, "assessment_mode", assessment_mode) - pulumi.set(__self__, "patch_mode", patch_mode) + GetOsProfileWindowPatchResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + assessment_mode=assessment_mode, + patch_mode=patch_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assessment_mode: Optional[str] = None, + patch_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assessment_mode is None and 'assessmentMode' in kwargs: + assessment_mode = kwargs['assessmentMode'] + if assessment_mode is None: + raise TypeError("Missing 'assessment_mode' argument") + if patch_mode is None and 'patchMode' in kwargs: + patch_mode = kwargs['patchMode'] + if patch_mode is None: + raise TypeError("Missing 'patch_mode' argument") + + _setter("assessment_mode", assessment_mode) + _setter("patch_mode", patch_mode) @property @pulumi.getter(name="assessmentMode") @@ -421,8 +662,29 @@ def __init__(__self__, *, :param Sequence['GetServiceStatusExtensionServiceArgs'] extension_services: A `extension_service` block as defined above. :param Sequence['GetServiceStatusGuestConfigurationServiceArgs'] guest_configuration_services: A `guest_configuration_service` block as defined above. """ - pulumi.set(__self__, "extension_services", extension_services) - pulumi.set(__self__, "guest_configuration_services", guest_configuration_services) + GetServiceStatusResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + extension_services=extension_services, + guest_configuration_services=guest_configuration_services, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + extension_services: Optional[Sequence['outputs.GetServiceStatusExtensionServiceResult']] = None, + guest_configuration_services: Optional[Sequence['outputs.GetServiceStatusGuestConfigurationServiceResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if extension_services is None and 'extensionServices' in kwargs: + extension_services = kwargs['extensionServices'] + if extension_services is None: + raise TypeError("Missing 'extension_services' argument") + if guest_configuration_services is None and 'guestConfigurationServices' in kwargs: + guest_configuration_services = kwargs['guestConfigurationServices'] + if guest_configuration_services is None: + raise TypeError("Missing 'guest_configuration_services' argument") + + _setter("extension_services", extension_services) + _setter("guest_configuration_services", guest_configuration_services) @property @pulumi.getter(name="extensionServices") @@ -450,8 +712,27 @@ def __init__(__self__, *, :param str startup_type: The behavior of the service when the Arc-enabled machine starts up. :param str status: The current status of the service. """ - pulumi.set(__self__, "startup_type", startup_type) - pulumi.set(__self__, "status", status) + GetServiceStatusExtensionServiceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + startup_type=startup_type, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + startup_type: Optional[str] = None, + status: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if startup_type is None and 'startupType' in kwargs: + startup_type = kwargs['startupType'] + if startup_type is None: + raise TypeError("Missing 'startup_type' argument") + if status is None: + raise TypeError("Missing 'status' argument") + + _setter("startup_type", startup_type) + _setter("status", status) @property @pulumi.getter(name="startupType") @@ -479,8 +760,27 @@ def __init__(__self__, *, :param str startup_type: The behavior of the service when the Arc-enabled machine starts up. :param str status: The current status of the service. """ - pulumi.set(__self__, "startup_type", startup_type) - pulumi.set(__self__, "status", status) + GetServiceStatusGuestConfigurationServiceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + startup_type=startup_type, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + startup_type: Optional[str] = None, + status: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if startup_type is None and 'startupType' in kwargs: + startup_type = kwargs['startupType'] + if startup_type is None: + raise TypeError("Missing 'startup_type' argument") + if status is None: + raise TypeError("Missing 'status' argument") + + _setter("startup_type", startup_type) + _setter("status", status) @property @pulumi.getter(name="startupType") diff --git a/sdk/python/pulumi_azure/armmsi/federated_identity_credential.py b/sdk/python/pulumi_azure/armmsi/federated_identity_credential.py index b0cca73aa7..f032e5398d 100644 --- a/sdk/python/pulumi_azure/armmsi/federated_identity_credential.py +++ b/sdk/python/pulumi_azure/armmsi/federated_identity_credential.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FederatedIdentityCredentialArgs', 'FederatedIdentityCredential'] @@ -29,13 +29,48 @@ def __init__(__self__, *, :param pulumi.Input[str] subject: Specifies the subject for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created. :param pulumi.Input[str] name: Specifies the name of this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created. """ - pulumi.set(__self__, "audience", audience) - pulumi.set(__self__, "issuer", issuer) - pulumi.set(__self__, "parent_id", parent_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "subject", subject) + FederatedIdentityCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + audience=audience, + issuer=issuer, + parent_id=parent_id, + resource_group_name=resource_group_name, + subject=subject, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audience: Optional[pulumi.Input[str]] = None, + issuer: Optional[pulumi.Input[str]] = None, + parent_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audience is None: + raise TypeError("Missing 'audience' argument") + if issuer is None: + raise TypeError("Missing 'issuer' argument") + if parent_id is None and 'parentId' in kwargs: + parent_id = kwargs['parentId'] + if parent_id is None: + raise TypeError("Missing 'parent_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if subject is None: + raise TypeError("Missing 'subject' argument") + + _setter("audience", audience) + _setter("issuer", issuer) + _setter("parent_id", parent_id) + _setter("resource_group_name", resource_group_name) + _setter("subject", subject) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -128,18 +163,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group within which this Federated Identity Credential should exist. Changing this forces a new Federated Identity Credential to be created. :param pulumi.Input[str] subject: Specifies the subject for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created. """ + _FederatedIdentityCredentialState._configure( + lambda key, value: pulumi.set(__self__, key, value), + audience=audience, + issuer=issuer, + name=name, + parent_id=parent_id, + resource_group_name=resource_group_name, + subject=subject, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audience: Optional[pulumi.Input[str]] = None, + issuer: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parent_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parent_id is None and 'parentId' in kwargs: + parent_id = kwargs['parentId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if audience is not None: - pulumi.set(__self__, "audience", audience) + _setter("audience", audience) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parent_id is not None: - pulumi.set(__self__, "parent_id", parent_id) + _setter("parent_id", parent_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) @property @pulumi.getter @@ -273,6 +333,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FederatedIdentityCredentialArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/attestation/_inputs.py b/sdk/python/pulumi_azure/attestation/_inputs.py index b831e8b294..85f8154a5f 100644 --- a/sdk/python/pulumi_azure/attestation/_inputs.py +++ b/sdk/python/pulumi_azure/attestation/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -18,10 +18,25 @@ class ProviderPolicyArgs: def __init__(__self__, *, data: Optional[pulumi.Input[str]] = None, environment_type: Optional[pulumi.Input[str]] = None): + ProviderPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data=data, + environment_type=environment_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data: Optional[pulumi.Input[str]] = None, + environment_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if environment_type is None and 'environmentType' in kwargs: + environment_type = kwargs['environmentType'] + if data is not None: - pulumi.set(__self__, "data", data) + _setter("data", data) if environment_type is not None: - pulumi.set(__self__, "environment_type", environment_type) + _setter("environment_type", environment_type) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/attestation/get_provider.py b/sdk/python/pulumi_azure/attestation/get_provider.py index fd41fa97ea..9c14963473 100644 --- a/sdk/python/pulumi_azure/attestation/get_provider.py +++ b/sdk/python/pulumi_azure/attestation/get_provider.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/attestation/outputs.py b/sdk/python/pulumi_azure/attestation/outputs.py index d976f08945..d23b86e0b7 100644 --- a/sdk/python/pulumi_azure/attestation/outputs.py +++ b/sdk/python/pulumi_azure/attestation/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -35,10 +35,25 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, data: Optional[str] = None, environment_type: Optional[str] = None): + ProviderPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + data=data, + environment_type=environment_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data: Optional[str] = None, + environment_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if environment_type is None and 'environmentType' in kwargs: + environment_type = kwargs['environmentType'] + if data is not None: - pulumi.set(__self__, "data", data) + _setter("data", data) if environment_type is not None: - pulumi.set(__self__, "environment_type", environment_type) + _setter("environment_type", environment_type) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/attestation/provider.py b/sdk/python/pulumi_azure/attestation/provider.py index 9c585b8048..fc6543bb6f 100644 --- a/sdk/python/pulumi_azure/attestation/provider.py +++ b/sdk/python/pulumi_azure/attestation/provider.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -42,28 +42,71 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Attestation Provider. :param pulumi.Input[str] tpm_policy_base64: Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + ProviderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + open_enclave_policy_base64=open_enclave_policy_base64, + policies=policies, + policy_signing_certificate_data=policy_signing_certificate_data, + sev_snp_policy_base64=sev_snp_policy_base64, + sgx_enclave_policy_base64=sgx_enclave_policy_base64, + tags=tags, + tpm_policy_base64=tpm_policy_base64, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + open_enclave_policy_base64: Optional[pulumi.Input[str]] = None, + policies: Optional[pulumi.Input[Sequence[pulumi.Input['ProviderPolicyArgs']]]] = None, + policy_signing_certificate_data: Optional[pulumi.Input[str]] = None, + sev_snp_policy_base64: Optional[pulumi.Input[str]] = None, + sgx_enclave_policy_base64: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tpm_policy_base64: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if open_enclave_policy_base64 is None and 'openEnclavePolicyBase64' in kwargs: + open_enclave_policy_base64 = kwargs['openEnclavePolicyBase64'] + if policy_signing_certificate_data is None and 'policySigningCertificateData' in kwargs: + policy_signing_certificate_data = kwargs['policySigningCertificateData'] + if sev_snp_policy_base64 is None and 'sevSnpPolicyBase64' in kwargs: + sev_snp_policy_base64 = kwargs['sevSnpPolicyBase64'] + if sgx_enclave_policy_base64 is None and 'sgxEnclavePolicyBase64' in kwargs: + sgx_enclave_policy_base64 = kwargs['sgxEnclavePolicyBase64'] + if tpm_policy_base64 is None and 'tpmPolicyBase64' in kwargs: + tpm_policy_base64 = kwargs['tpmPolicyBase64'] + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if open_enclave_policy_base64 is not None: - pulumi.set(__self__, "open_enclave_policy_base64", open_enclave_policy_base64) + _setter("open_enclave_policy_base64", open_enclave_policy_base64) if policies is not None: warnings.warn("""This field is no longer used and will be removed in v4.0 of the Azure Provider - use `open_enclave_policy_base64`, `sgx_enclave_policy_base64`, `tpm_policy_base64` and `sev_snp_policy_base64` instead.""", DeprecationWarning) pulumi.log.warn("""policies is deprecated: This field is no longer used and will be removed in v4.0 of the Azure Provider - use `open_enclave_policy_base64`, `sgx_enclave_policy_base64`, `tpm_policy_base64` and `sev_snp_policy_base64` instead.""") if policies is not None: - pulumi.set(__self__, "policies", policies) + _setter("policies", policies) if policy_signing_certificate_data is not None: - pulumi.set(__self__, "policy_signing_certificate_data", policy_signing_certificate_data) + _setter("policy_signing_certificate_data", policy_signing_certificate_data) if sev_snp_policy_base64 is not None: - pulumi.set(__self__, "sev_snp_policy_base64", sev_snp_policy_base64) + _setter("sev_snp_policy_base64", sev_snp_policy_base64) if sgx_enclave_policy_base64 is not None: - pulumi.set(__self__, "sgx_enclave_policy_base64", sgx_enclave_policy_base64) + _setter("sgx_enclave_policy_base64", sgx_enclave_policy_base64) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tpm_policy_base64 is not None: - pulumi.set(__self__, "tpm_policy_base64", tpm_policy_base64) + _setter("tpm_policy_base64", tpm_policy_base64) @property @pulumi.getter(name="resourceGroupName") @@ -223,33 +266,82 @@ def __init__(__self__, *, :param pulumi.Input[str] tpm_policy_base64: Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. :param pulumi.Input[str] trust_model: Trust model used for the Attestation Service. """ + _ProviderState._configure( + lambda key, value: pulumi.set(__self__, key, value), + attestation_uri=attestation_uri, + location=location, + name=name, + open_enclave_policy_base64=open_enclave_policy_base64, + policies=policies, + policy_signing_certificate_data=policy_signing_certificate_data, + resource_group_name=resource_group_name, + sev_snp_policy_base64=sev_snp_policy_base64, + sgx_enclave_policy_base64=sgx_enclave_policy_base64, + tags=tags, + tpm_policy_base64=tpm_policy_base64, + trust_model=trust_model, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + attestation_uri: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + open_enclave_policy_base64: Optional[pulumi.Input[str]] = None, + policies: Optional[pulumi.Input[Sequence[pulumi.Input['ProviderPolicyArgs']]]] = None, + policy_signing_certificate_data: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sev_snp_policy_base64: Optional[pulumi.Input[str]] = None, + sgx_enclave_policy_base64: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tpm_policy_base64: Optional[pulumi.Input[str]] = None, + trust_model: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if attestation_uri is None and 'attestationUri' in kwargs: + attestation_uri = kwargs['attestationUri'] + if open_enclave_policy_base64 is None and 'openEnclavePolicyBase64' in kwargs: + open_enclave_policy_base64 = kwargs['openEnclavePolicyBase64'] + if policy_signing_certificate_data is None and 'policySigningCertificateData' in kwargs: + policy_signing_certificate_data = kwargs['policySigningCertificateData'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sev_snp_policy_base64 is None and 'sevSnpPolicyBase64' in kwargs: + sev_snp_policy_base64 = kwargs['sevSnpPolicyBase64'] + if sgx_enclave_policy_base64 is None and 'sgxEnclavePolicyBase64' in kwargs: + sgx_enclave_policy_base64 = kwargs['sgxEnclavePolicyBase64'] + if tpm_policy_base64 is None and 'tpmPolicyBase64' in kwargs: + tpm_policy_base64 = kwargs['tpmPolicyBase64'] + if trust_model is None and 'trustModel' in kwargs: + trust_model = kwargs['trustModel'] + if attestation_uri is not None: - pulumi.set(__self__, "attestation_uri", attestation_uri) + _setter("attestation_uri", attestation_uri) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if open_enclave_policy_base64 is not None: - pulumi.set(__self__, "open_enclave_policy_base64", open_enclave_policy_base64) + _setter("open_enclave_policy_base64", open_enclave_policy_base64) if policies is not None: warnings.warn("""This field is no longer used and will be removed in v4.0 of the Azure Provider - use `open_enclave_policy_base64`, `sgx_enclave_policy_base64`, `tpm_policy_base64` and `sev_snp_policy_base64` instead.""", DeprecationWarning) pulumi.log.warn("""policies is deprecated: This field is no longer used and will be removed in v4.0 of the Azure Provider - use `open_enclave_policy_base64`, `sgx_enclave_policy_base64`, `tpm_policy_base64` and `sev_snp_policy_base64` instead.""") if policies is not None: - pulumi.set(__self__, "policies", policies) + _setter("policies", policies) if policy_signing_certificate_data is not None: - pulumi.set(__self__, "policy_signing_certificate_data", policy_signing_certificate_data) + _setter("policy_signing_certificate_data", policy_signing_certificate_data) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sev_snp_policy_base64 is not None: - pulumi.set(__self__, "sev_snp_policy_base64", sev_snp_policy_base64) + _setter("sev_snp_policy_base64", sev_snp_policy_base64) if sgx_enclave_policy_base64 is not None: - pulumi.set(__self__, "sgx_enclave_policy_base64", sgx_enclave_policy_base64) + _setter("sgx_enclave_policy_base64", sgx_enclave_policy_base64) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tpm_policy_base64 is not None: - pulumi.set(__self__, "tpm_policy_base64", tpm_policy_base64) + _setter("tpm_policy_base64", tpm_policy_base64) if trust_model is not None: - pulumi.set(__self__, "trust_model", trust_model) + _setter("trust_model", trust_model) @property @pulumi.getter(name="attestationUri") @@ -496,6 +588,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProviderArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/authorization/_inputs.py b/sdk/python/pulumi_azure/authorization/_inputs.py index 20c51613c2..6fc2935f45 100644 --- a/sdk/python/pulumi_azure/authorization/_inputs.py +++ b/sdk/python/pulumi_azure/authorization/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -26,14 +26,37 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] not_actions: One or more Disallowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. :param pulumi.Input[Sequence[pulumi.Input[str]]] not_data_actions: One or more Disallowed Data Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. """ + RoleDefinitionPermissionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + data_actions=data_actions, + not_actions=not_actions, + not_data_actions=not_data_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + not_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + not_data_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_actions is None and 'dataActions' in kwargs: + data_actions = kwargs['dataActions'] + if not_actions is None and 'notActions' in kwargs: + not_actions = kwargs['notActions'] + if not_data_actions is None and 'notDataActions' in kwargs: + not_data_actions = kwargs['notDataActions'] + if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if data_actions is not None: - pulumi.set(__self__, "data_actions", data_actions) + _setter("data_actions", data_actions) if not_actions is not None: - pulumi.set(__self__, "not_actions", not_actions) + _setter("not_actions", not_actions) if not_data_actions is not None: - pulumi.set(__self__, "not_data_actions", not_data_actions) + _setter("not_data_actions", not_data_actions) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/authorization/assignment.py b/sdk/python/pulumi_azure/authorization/assignment.py index 1ffcaae66c..8eb9e118ba 100644 --- a/sdk/python/pulumi_azure/authorization/assignment.py +++ b/sdk/python/pulumi_azure/authorization/assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AssignmentArgs', 'Assignment'] @@ -43,24 +43,69 @@ def __init__(__self__, *, > **NOTE:** If it is not a `Service Principal` identity it will cause the role assignment to fail. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "scope", scope) + AssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + scope=scope, + condition=condition, + condition_version=condition_version, + delegated_managed_identity_resource_id=delegated_managed_identity_resource_id, + description=description, + name=name, + role_definition_id=role_definition_id, + role_definition_name=role_definition_name, + skip_service_principal_aad_check=skip_service_principal_aad_check, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + condition: Optional[pulumi.Input[str]] = None, + condition_version: Optional[pulumi.Input[str]] = None, + delegated_managed_identity_resource_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + role_definition_name: Optional[pulumi.Input[str]] = None, + skip_service_principal_aad_check: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + if condition_version is None and 'conditionVersion' in kwargs: + condition_version = kwargs['conditionVersion'] + if delegated_managed_identity_resource_id is None and 'delegatedManagedIdentityResourceId' in kwargs: + delegated_managed_identity_resource_id = kwargs['delegatedManagedIdentityResourceId'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_name is None and 'roleDefinitionName' in kwargs: + role_definition_name = kwargs['roleDefinitionName'] + if skip_service_principal_aad_check is None and 'skipServicePrincipalAadCheck' in kwargs: + skip_service_principal_aad_check = kwargs['skipServicePrincipalAadCheck'] + + _setter("principal_id", principal_id) + _setter("scope", scope) if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if condition_version is not None: - pulumi.set(__self__, "condition_version", condition_version) + _setter("condition_version", condition_version) if delegated_managed_identity_resource_id is not None: - pulumi.set(__self__, "delegated_managed_identity_resource_id", delegated_managed_identity_resource_id) + _setter("delegated_managed_identity_resource_id", delegated_managed_identity_resource_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) if role_definition_name is not None: - pulumi.set(__self__, "role_definition_name", role_definition_name) + _setter("role_definition_name", role_definition_name) if skip_service_principal_aad_check is not None: - pulumi.set(__self__, "skip_service_principal_aad_check", skip_service_principal_aad_check) + _setter("skip_service_principal_aad_check", skip_service_principal_aad_check) @property @pulumi.getter(name="principalId") @@ -223,28 +268,73 @@ def __init__(__self__, *, > **NOTE:** If it is not a `Service Principal` identity it will cause the role assignment to fail. """ + _AssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + condition=condition, + condition_version=condition_version, + delegated_managed_identity_resource_id=delegated_managed_identity_resource_id, + description=description, + name=name, + principal_id=principal_id, + principal_type=principal_type, + role_definition_id=role_definition_id, + role_definition_name=role_definition_name, + scope=scope, + skip_service_principal_aad_check=skip_service_principal_aad_check, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + condition: Optional[pulumi.Input[str]] = None, + condition_version: Optional[pulumi.Input[str]] = None, + delegated_managed_identity_resource_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + principal_type: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + role_definition_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + skip_service_principal_aad_check: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if condition_version is None and 'conditionVersion' in kwargs: + condition_version = kwargs['conditionVersion'] + if delegated_managed_identity_resource_id is None and 'delegatedManagedIdentityResourceId' in kwargs: + delegated_managed_identity_resource_id = kwargs['delegatedManagedIdentityResourceId'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_type is None and 'principalType' in kwargs: + principal_type = kwargs['principalType'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_name is None and 'roleDefinitionName' in kwargs: + role_definition_name = kwargs['roleDefinitionName'] + if skip_service_principal_aad_check is None and 'skipServicePrincipalAadCheck' in kwargs: + skip_service_principal_aad_check = kwargs['skipServicePrincipalAadCheck'] + if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if condition_version is not None: - pulumi.set(__self__, "condition_version", condition_version) + _setter("condition_version", condition_version) if delegated_managed_identity_resource_id is not None: - pulumi.set(__self__, "delegated_managed_identity_resource_id", delegated_managed_identity_resource_id) + _setter("delegated_managed_identity_resource_id", delegated_managed_identity_resource_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if principal_type is not None: - pulumi.set(__self__, "principal_type", principal_type) + _setter("principal_type", principal_type) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) if role_definition_name is not None: - pulumi.set(__self__, "role_definition_name", role_definition_name) + _setter("role_definition_name", role_definition_name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if skip_service_principal_aad_check is not None: - pulumi.set(__self__, "skip_service_principal_aad_check", skip_service_principal_aad_check) + _setter("skip_service_principal_aad_check", skip_service_principal_aad_check) @property @pulumi.getter @@ -626,6 +716,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/authorization/get_role_definition.py b/sdk/python/pulumi_azure/authorization/get_role_definition.py index 3eb6ec0ed3..3d5300519f 100644 --- a/sdk/python/pulumi_azure/authorization/get_role_definition.py +++ b/sdk/python/pulumi_azure/authorization/get_role_definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/authorization/get_user_assigned_identity.py b/sdk/python/pulumi_azure/authorization/get_user_assigned_identity.py index f2c85b624e..809d617aa6 100644 --- a/sdk/python/pulumi_azure/authorization/get_user_assigned_identity.py +++ b/sdk/python/pulumi_azure/authorization/get_user_assigned_identity.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/authorization/outputs.py b/sdk/python/pulumi_azure/authorization/outputs.py index 5e042f3fd3..7e2eaed4e6 100644 --- a/sdk/python/pulumi_azure/authorization/outputs.py +++ b/sdk/python/pulumi_azure/authorization/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -48,14 +48,37 @@ def __init__(__self__, *, :param Sequence[str] not_actions: One or more Disallowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. :param Sequence[str] not_data_actions: One or more Disallowed Data Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. """ + RoleDefinitionPermission._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + data_actions=data_actions, + not_actions=not_actions, + not_data_actions=not_data_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[Sequence[str]] = None, + data_actions: Optional[Sequence[str]] = None, + not_actions: Optional[Sequence[str]] = None, + not_data_actions: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_actions is None and 'dataActions' in kwargs: + data_actions = kwargs['dataActions'] + if not_actions is None and 'notActions' in kwargs: + not_actions = kwargs['notActions'] + if not_data_actions is None and 'notDataActions' in kwargs: + not_data_actions = kwargs['notDataActions'] + if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if data_actions is not None: - pulumi.set(__self__, "data_actions", data_actions) + _setter("data_actions", data_actions) if not_actions is not None: - pulumi.set(__self__, "not_actions", not_actions) + _setter("not_actions", not_actions) if not_data_actions is not None: - pulumi.set(__self__, "not_data_actions", not_data_actions) + _setter("not_data_actions", not_data_actions) @property @pulumi.getter @@ -101,12 +124,39 @@ def __init__(__self__, *, :param Sequence[str] actions: a list of actions supported by this role :param Sequence[str] not_actions: a list of actions which are denied by this role """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "not_actions", not_actions) + GetRoleDefinitionPermissionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + not_actions=not_actions, + data_actions=data_actions, + not_data_actions=not_data_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[Sequence[str]] = None, + not_actions: Optional[Sequence[str]] = None, + data_actions: Optional[Sequence[str]] = None, + not_data_actions: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if not_actions is None and 'notActions' in kwargs: + not_actions = kwargs['notActions'] + if not_actions is None: + raise TypeError("Missing 'not_actions' argument") + if data_actions is None and 'dataActions' in kwargs: + data_actions = kwargs['dataActions'] + if not_data_actions is None and 'notDataActions' in kwargs: + not_data_actions = kwargs['notDataActions'] + + _setter("actions", actions) + _setter("not_actions", not_actions) if data_actions is not None: - pulumi.set(__self__, "data_actions", data_actions) + _setter("data_actions", data_actions) if not_data_actions is not None: - pulumi.set(__self__, "not_data_actions", not_data_actions) + _setter("not_data_actions", not_data_actions) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/authorization/role_definition.py b/sdk/python/pulumi_azure/authorization/role_definition.py index 1a7a01d65f..b61632e0aa 100644 --- a/sdk/python/pulumi_azure/authorization/role_definition.py +++ b/sdk/python/pulumi_azure/authorization/role_definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,44 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['RoleDefinitionPermissionArgs']]] permissions: A `permissions` block as defined below. :param pulumi.Input[str] role_definition_id: A unique UUID/GUID which identifies this role - one will be generated if not specified. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "scope", scope) + RoleDefinitionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + scope=scope, + assignable_scopes=assignable_scopes, + description=description, + name=name, + permissions=permissions, + role_definition_id=role_definition_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + scope: Optional[pulumi.Input[str]] = None, + assignable_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[Sequence[pulumi.Input['RoleDefinitionPermissionArgs']]]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if scope is None: + raise TypeError("Missing 'scope' argument") + if assignable_scopes is None and 'assignableScopes' in kwargs: + assignable_scopes = kwargs['assignableScopes'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + + _setter("scope", scope) if assignable_scopes is not None: - pulumi.set(__self__, "assignable_scopes", assignable_scopes) + _setter("assignable_scopes", assignable_scopes) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if permissions is not None: - pulumi.set(__self__, "permissions", permissions) + _setter("permissions", permissions) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) @property @pulumi.getter @@ -142,20 +169,49 @@ def __init__(__self__, *, :param pulumi.Input[str] role_definition_resource_id: The Azure Resource Manager ID for the resource. :param pulumi.Input[str] scope: The scope at which the Role Definition applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. It is recommended to use the first entry of the `assignable_scopes`. Changing this forces a new resource to be created. """ + _RoleDefinitionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + assignable_scopes=assignable_scopes, + description=description, + name=name, + permissions=permissions, + role_definition_id=role_definition_id, + role_definition_resource_id=role_definition_resource_id, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assignable_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[Sequence[pulumi.Input['RoleDefinitionPermissionArgs']]]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + role_definition_resource_id: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assignable_scopes is None and 'assignableScopes' in kwargs: + assignable_scopes = kwargs['assignableScopes'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_resource_id is None and 'roleDefinitionResourceId' in kwargs: + role_definition_resource_id = kwargs['roleDefinitionResourceId'] + if assignable_scopes is not None: - pulumi.set(__self__, "assignable_scopes", assignable_scopes) + _setter("assignable_scopes", assignable_scopes) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if permissions is not None: - pulumi.set(__self__, "permissions", permissions) + _setter("permissions", permissions) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) if role_definition_resource_id is not None: - pulumi.set(__self__, "role_definition_resource_id", role_definition_resource_id) + _setter("role_definition_resource_id", role_definition_resource_id) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="assignableScopes") @@ -339,6 +395,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RoleDefinitionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/authorization/user_assigned_identity.py b/sdk/python/pulumi_azure/authorization/user_assigned_identity.py index 6110f4387e..f118e17c4f 100644 --- a/sdk/python/pulumi_azure/authorization/user_assigned_identity.py +++ b/sdk/python/pulumi_azure/authorization/user_assigned_identity.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['UserAssignedIdentityArgs', 'UserAssignedIdentity'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of this User Assigned Identity. Changing this forces a new User Assigned Identity to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the User Assigned Identity. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + UserAssignedIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -102,20 +123,51 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the User Assigned Identity. :param pulumi.Input[str] tenant_id: The ID of the Tenant which the Identity belongs to. """ + _UserAssignedIdentityState._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + location=location, + name=name, + principal_id=principal_id, + resource_group_name=resource_group_name, + tags=tags, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="clientId") @@ -289,6 +341,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + UserAssignedIdentityArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automanage/_inputs.py b/sdk/python/pulumi_azure/automanage/_inputs.py index ba276ff27b..5d3a3b238c 100644 --- a/sdk/python/pulumi_azure/automanage/_inputs.py +++ b/sdk/python/pulumi_azure/automanage/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -39,18 +39,49 @@ def __init__(__self__, *, :param pulumi.Input[int] scheduled_scan_time_in_minutes: The time of the scheduled scan in minutes. Possible values are `0` to `1439` where `0` is 12:00 AM and `1439` is 11:59 PM. :param pulumi.Input[str] scheduled_scan_type: The type of the scheduled scan. Possible values are `Quick` and `Full`. Defaults to `Quick`. """ + ConfigurationAntimalwareArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + exclusions=exclusions, + real_time_protection_enabled=real_time_protection_enabled, + scheduled_scan_day=scheduled_scan_day, + scheduled_scan_enabled=scheduled_scan_enabled, + scheduled_scan_time_in_minutes=scheduled_scan_time_in_minutes, + scheduled_scan_type=scheduled_scan_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exclusions: Optional[pulumi.Input['ConfigurationAntimalwareExclusionsArgs']] = None, + real_time_protection_enabled: Optional[pulumi.Input[bool]] = None, + scheduled_scan_day: Optional[pulumi.Input[int]] = None, + scheduled_scan_enabled: Optional[pulumi.Input[bool]] = None, + scheduled_scan_time_in_minutes: Optional[pulumi.Input[int]] = None, + scheduled_scan_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if real_time_protection_enabled is None and 'realTimeProtectionEnabled' in kwargs: + real_time_protection_enabled = kwargs['realTimeProtectionEnabled'] + if scheduled_scan_day is None and 'scheduledScanDay' in kwargs: + scheduled_scan_day = kwargs['scheduledScanDay'] + if scheduled_scan_enabled is None and 'scheduledScanEnabled' in kwargs: + scheduled_scan_enabled = kwargs['scheduledScanEnabled'] + if scheduled_scan_time_in_minutes is None and 'scheduledScanTimeInMinutes' in kwargs: + scheduled_scan_time_in_minutes = kwargs['scheduledScanTimeInMinutes'] + if scheduled_scan_type is None and 'scheduledScanType' in kwargs: + scheduled_scan_type = kwargs['scheduledScanType'] + if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) if real_time_protection_enabled is not None: - pulumi.set(__self__, "real_time_protection_enabled", real_time_protection_enabled) + _setter("real_time_protection_enabled", real_time_protection_enabled) if scheduled_scan_day is not None: - pulumi.set(__self__, "scheduled_scan_day", scheduled_scan_day) + _setter("scheduled_scan_day", scheduled_scan_day) if scheduled_scan_enabled is not None: - pulumi.set(__self__, "scheduled_scan_enabled", scheduled_scan_enabled) + _setter("scheduled_scan_enabled", scheduled_scan_enabled) if scheduled_scan_time_in_minutes is not None: - pulumi.set(__self__, "scheduled_scan_time_in_minutes", scheduled_scan_time_in_minutes) + _setter("scheduled_scan_time_in_minutes", scheduled_scan_time_in_minutes) if scheduled_scan_type is not None: - pulumi.set(__self__, "scheduled_scan_type", scheduled_scan_type) + _setter("scheduled_scan_type", scheduled_scan_type) @property @pulumi.getter @@ -136,12 +167,27 @@ def __init__(__self__, *, :param pulumi.Input[str] paths: The paths to exclude from the antimalware scan, separated by `;`. For example `C:\\\\Windows\\\\Temp;D:\\\\Temp`. :param pulumi.Input[str] processes: The processes to exclude from the antimalware scan, separated by `;`. For example `svchost.exe;notepad.exe`. """ + ConfigurationAntimalwareExclusionsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + extensions=extensions, + paths=paths, + processes=processes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + extensions: Optional[pulumi.Input[str]] = None, + paths: Optional[pulumi.Input[str]] = None, + processes: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if paths is not None: - pulumi.set(__self__, "paths", paths) + _setter("paths", paths) if processes is not None: - pulumi.set(__self__, "processes", processes) + _setter("processes", processes) @property @pulumi.getter @@ -187,8 +233,21 @@ def __init__(__self__, *, """ :param pulumi.Input[str] assignment_type: The assignment type of the azure security baseline. Possible values are `ApplyAndAutoCorrect`, `ApplyAndMonitor`, `Audit` and `DeployAndAutoCorrect`. Defaults to `ApplyAndAutoCorrect`. """ + ConfigurationAzureSecurityBaselineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + assignment_type=assignment_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assignment_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assignment_type is None and 'assignmentType' in kwargs: + assignment_type = kwargs['assignmentType'] + if assignment_type is not None: - pulumi.set(__self__, "assignment_type", assignment_type) + _setter("assignment_type", assignment_type) @property @pulumi.getter(name="assignmentType") @@ -218,16 +277,45 @@ def __init__(__self__, *, :param pulumi.Input['ConfigurationBackupSchedulePolicyArgs'] schedule_policy: A `schedule_policy` block as defined below. :param pulumi.Input[str] time_zone: The timezone of the backup policy. Defaults to `UTC`. """ + ConfigurationBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + instant_rp_retention_range_in_days=instant_rp_retention_range_in_days, + policy_name=policy_name, + retention_policy=retention_policy, + schedule_policy=schedule_policy, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + instant_rp_retention_range_in_days: Optional[pulumi.Input[int]] = None, + policy_name: Optional[pulumi.Input[str]] = None, + retention_policy: Optional[pulumi.Input['ConfigurationBackupRetentionPolicyArgs']] = None, + schedule_policy: Optional[pulumi.Input['ConfigurationBackupSchedulePolicyArgs']] = None, + time_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if instant_rp_retention_range_in_days is None and 'instantRpRetentionRangeInDays' in kwargs: + instant_rp_retention_range_in_days = kwargs['instantRpRetentionRangeInDays'] + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if schedule_policy is None and 'schedulePolicy' in kwargs: + schedule_policy = kwargs['schedulePolicy'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if instant_rp_retention_range_in_days is not None: - pulumi.set(__self__, "instant_rp_retention_range_in_days", instant_rp_retention_range_in_days) + _setter("instant_rp_retention_range_in_days", instant_rp_retention_range_in_days) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) if schedule_policy is not None: - pulumi.set(__self__, "schedule_policy", schedule_policy) + _setter("schedule_policy", schedule_policy) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter(name="instantRpRetentionRangeInDays") @@ -301,12 +389,33 @@ def __init__(__self__, *, :param pulumi.Input[str] retention_policy_type: The retention policy type of the backup policy. Possible value is `LongTermRetentionPolicy`. :param pulumi.Input['ConfigurationBackupRetentionPolicyWeeklyScheduleArgs'] weekly_schedule: A `weekly_schedule` block as defined below. """ + ConfigurationBackupRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + daily_schedule=daily_schedule, + retention_policy_type=retention_policy_type, + weekly_schedule=weekly_schedule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + daily_schedule: Optional[pulumi.Input['ConfigurationBackupRetentionPolicyDailyScheduleArgs']] = None, + retention_policy_type: Optional[pulumi.Input[str]] = None, + weekly_schedule: Optional[pulumi.Input['ConfigurationBackupRetentionPolicyWeeklyScheduleArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if daily_schedule is None and 'dailySchedule' in kwargs: + daily_schedule = kwargs['dailySchedule'] + if retention_policy_type is None and 'retentionPolicyType' in kwargs: + retention_policy_type = kwargs['retentionPolicyType'] + if weekly_schedule is None and 'weeklySchedule' in kwargs: + weekly_schedule = kwargs['weeklySchedule'] + if daily_schedule is not None: - pulumi.set(__self__, "daily_schedule", daily_schedule) + _setter("daily_schedule", daily_schedule) if retention_policy_type is not None: - pulumi.set(__self__, "retention_policy_type", retention_policy_type) + _setter("retention_policy_type", retention_policy_type) if weekly_schedule is not None: - pulumi.set(__self__, "weekly_schedule", weekly_schedule) + _setter("weekly_schedule", weekly_schedule) @property @pulumi.getter(name="dailySchedule") @@ -354,10 +463,27 @@ def __init__(__self__, *, :param pulumi.Input['ConfigurationBackupRetentionPolicyDailyScheduleRetentionDurationArgs'] retention_duration: A `retention_duration` block as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] retention_times: The retention times of the backup policy. """ + ConfigurationBackupRetentionPolicyDailyScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_duration=retention_duration, + retention_times=retention_times, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_duration: Optional[pulumi.Input['ConfigurationBackupRetentionPolicyDailyScheduleRetentionDurationArgs']] = None, + retention_times: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_duration is None and 'retentionDuration' in kwargs: + retention_duration = kwargs['retentionDuration'] + if retention_times is None and 'retentionTimes' in kwargs: + retention_times = kwargs['retentionTimes'] + if retention_duration is not None: - pulumi.set(__self__, "retention_duration", retention_duration) + _setter("retention_duration", retention_duration) if retention_times is not None: - pulumi.set(__self__, "retention_times", retention_times) + _setter("retention_times", retention_times) @property @pulumi.getter(name="retentionDuration") @@ -393,10 +519,25 @@ def __init__(__self__, *, :param pulumi.Input[int] count: The count of the retention duration of the backup policy. Valid value inside `daily_schedule` is `7` to `9999` and inside `weekly_schedule` is `1` to `5163`. :param pulumi.Input[str] duration_type: The duration type of the retention duration of the backup policy. Valid value inside `daily_schedule` is `Days` and inside `weekly_schedule` is `Weeks`. """ + ConfigurationBackupRetentionPolicyDailyScheduleRetentionDurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + duration_type=duration_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + duration_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration_type is None and 'durationType' in kwargs: + duration_type = kwargs['durationType'] + if count is not None: - pulumi.set(__self__, "count", count) + _setter("count", count) if duration_type is not None: - pulumi.set(__self__, "duration_type", duration_type) + _setter("duration_type", duration_type) @property @pulumi.getter @@ -432,10 +573,27 @@ def __init__(__self__, *, :param pulumi.Input['ConfigurationBackupRetentionPolicyWeeklyScheduleRetentionDurationArgs'] retention_duration: A `retention_duration` block as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] retention_times: The retention times of the backup policy. """ + ConfigurationBackupRetentionPolicyWeeklyScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_duration=retention_duration, + retention_times=retention_times, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_duration: Optional[pulumi.Input['ConfigurationBackupRetentionPolicyWeeklyScheduleRetentionDurationArgs']] = None, + retention_times: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_duration is None and 'retentionDuration' in kwargs: + retention_duration = kwargs['retentionDuration'] + if retention_times is None and 'retentionTimes' in kwargs: + retention_times = kwargs['retentionTimes'] + if retention_duration is not None: - pulumi.set(__self__, "retention_duration", retention_duration) + _setter("retention_duration", retention_duration) if retention_times is not None: - pulumi.set(__self__, "retention_times", retention_times) + _setter("retention_times", retention_times) @property @pulumi.getter(name="retentionDuration") @@ -471,10 +629,25 @@ def __init__(__self__, *, :param pulumi.Input[int] count: The count of the retention duration of the backup policy. Valid value inside `daily_schedule` is `7` to `9999` and inside `weekly_schedule` is `1` to `5163`. :param pulumi.Input[str] duration_type: The duration type of the retention duration of the backup policy. Valid value inside `daily_schedule` is `Days` and inside `weekly_schedule` is `Weeks`. """ + ConfigurationBackupRetentionPolicyWeeklyScheduleRetentionDurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + duration_type=duration_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + duration_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration_type is None and 'durationType' in kwargs: + duration_type = kwargs['durationType'] + if count is not None: - pulumi.set(__self__, "count", count) + _setter("count", count) if duration_type is not None: - pulumi.set(__self__, "duration_type", duration_type) + _setter("duration_type", duration_type) @property @pulumi.getter @@ -514,14 +687,39 @@ def __init__(__self__, *, :param pulumi.Input[str] schedule_run_frequency: The schedule run frequency of the backup policy. Possible values are `Daily` and `Weekly`. Defaults to `Daily`. :param pulumi.Input[Sequence[pulumi.Input[str]]] schedule_run_times: The schedule run times of the backup policy. """ + ConfigurationBackupSchedulePolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + schedule_policy_type=schedule_policy_type, + schedule_run_days=schedule_run_days, + schedule_run_frequency=schedule_run_frequency, + schedule_run_times=schedule_run_times, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schedule_policy_type: Optional[pulumi.Input[str]] = None, + schedule_run_days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + schedule_run_frequency: Optional[pulumi.Input[str]] = None, + schedule_run_times: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schedule_policy_type is None and 'schedulePolicyType' in kwargs: + schedule_policy_type = kwargs['schedulePolicyType'] + if schedule_run_days is None and 'scheduleRunDays' in kwargs: + schedule_run_days = kwargs['scheduleRunDays'] + if schedule_run_frequency is None and 'scheduleRunFrequency' in kwargs: + schedule_run_frequency = kwargs['scheduleRunFrequency'] + if schedule_run_times is None and 'scheduleRunTimes' in kwargs: + schedule_run_times = kwargs['scheduleRunTimes'] + if schedule_policy_type is not None: - pulumi.set(__self__, "schedule_policy_type", schedule_policy_type) + _setter("schedule_policy_type", schedule_policy_type) if schedule_run_days is not None: - pulumi.set(__self__, "schedule_run_days", schedule_run_days) + _setter("schedule_run_days", schedule_run_days) if schedule_run_frequency is not None: - pulumi.set(__self__, "schedule_run_frequency", schedule_run_frequency) + _setter("schedule_run_frequency", schedule_run_frequency) if schedule_run_times is not None: - pulumi.set(__self__, "schedule_run_times", schedule_run_times) + _setter("schedule_run_times", schedule_run_times) @property @pulumi.getter(name="schedulePolicyType") diff --git a/sdk/python/pulumi_azure/automanage/configuration.py b/sdk/python/pulumi_azure/automanage/configuration.py index c443b683df..13bd4dc3d9 100644 --- a/sdk/python/pulumi_azure/automanage/configuration.py +++ b/sdk/python/pulumi_azure/automanage/configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,31 +45,84 @@ def __init__(__self__, *, :param pulumi.Input[bool] status_change_alert_enabled: Whether the status change alert is enabled. Defaults to `false`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + ConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + antimalware=antimalware, + automation_account_enabled=automation_account_enabled, + azure_security_baseline=azure_security_baseline, + backup=backup, + boot_diagnostics_enabled=boot_diagnostics_enabled, + defender_for_cloud_enabled=defender_for_cloud_enabled, + guest_configuration_enabled=guest_configuration_enabled, + location=location, + log_analytics_enabled=log_analytics_enabled, + name=name, + status_change_alert_enabled=status_change_alert_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + antimalware: Optional[pulumi.Input['ConfigurationAntimalwareArgs']] = None, + automation_account_enabled: Optional[pulumi.Input[bool]] = None, + azure_security_baseline: Optional[pulumi.Input['ConfigurationAzureSecurityBaselineArgs']] = None, + backup: Optional[pulumi.Input['ConfigurationBackupArgs']] = None, + boot_diagnostics_enabled: Optional[pulumi.Input[bool]] = None, + defender_for_cloud_enabled: Optional[pulumi.Input[bool]] = None, + guest_configuration_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + log_analytics_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + status_change_alert_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if automation_account_enabled is None and 'automationAccountEnabled' in kwargs: + automation_account_enabled = kwargs['automationAccountEnabled'] + if azure_security_baseline is None and 'azureSecurityBaseline' in kwargs: + azure_security_baseline = kwargs['azureSecurityBaseline'] + if boot_diagnostics_enabled is None and 'bootDiagnosticsEnabled' in kwargs: + boot_diagnostics_enabled = kwargs['bootDiagnosticsEnabled'] + if defender_for_cloud_enabled is None and 'defenderForCloudEnabled' in kwargs: + defender_for_cloud_enabled = kwargs['defenderForCloudEnabled'] + if guest_configuration_enabled is None and 'guestConfigurationEnabled' in kwargs: + guest_configuration_enabled = kwargs['guestConfigurationEnabled'] + if log_analytics_enabled is None and 'logAnalyticsEnabled' in kwargs: + log_analytics_enabled = kwargs['logAnalyticsEnabled'] + if status_change_alert_enabled is None and 'statusChangeAlertEnabled' in kwargs: + status_change_alert_enabled = kwargs['statusChangeAlertEnabled'] + + _setter("resource_group_name", resource_group_name) if antimalware is not None: - pulumi.set(__self__, "antimalware", antimalware) + _setter("antimalware", antimalware) if automation_account_enabled is not None: - pulumi.set(__self__, "automation_account_enabled", automation_account_enabled) + _setter("automation_account_enabled", automation_account_enabled) if azure_security_baseline is not None: - pulumi.set(__self__, "azure_security_baseline", azure_security_baseline) + _setter("azure_security_baseline", azure_security_baseline) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if boot_diagnostics_enabled is not None: - pulumi.set(__self__, "boot_diagnostics_enabled", boot_diagnostics_enabled) + _setter("boot_diagnostics_enabled", boot_diagnostics_enabled) if defender_for_cloud_enabled is not None: - pulumi.set(__self__, "defender_for_cloud_enabled", defender_for_cloud_enabled) + _setter("defender_for_cloud_enabled", defender_for_cloud_enabled) if guest_configuration_enabled is not None: - pulumi.set(__self__, "guest_configuration_enabled", guest_configuration_enabled) + _setter("guest_configuration_enabled", guest_configuration_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if log_analytics_enabled is not None: - pulumi.set(__self__, "log_analytics_enabled", log_analytics_enabled) + _setter("log_analytics_enabled", log_analytics_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if status_change_alert_enabled is not None: - pulumi.set(__self__, "status_change_alert_enabled", status_change_alert_enabled) + _setter("status_change_alert_enabled", status_change_alert_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -260,32 +313,83 @@ def __init__(__self__, *, :param pulumi.Input[bool] status_change_alert_enabled: Whether the status change alert is enabled. Defaults to `false`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + antimalware=antimalware, + automation_account_enabled=automation_account_enabled, + azure_security_baseline=azure_security_baseline, + backup=backup, + boot_diagnostics_enabled=boot_diagnostics_enabled, + defender_for_cloud_enabled=defender_for_cloud_enabled, + guest_configuration_enabled=guest_configuration_enabled, + location=location, + log_analytics_enabled=log_analytics_enabled, + name=name, + resource_group_name=resource_group_name, + status_change_alert_enabled=status_change_alert_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + antimalware: Optional[pulumi.Input['ConfigurationAntimalwareArgs']] = None, + automation_account_enabled: Optional[pulumi.Input[bool]] = None, + azure_security_baseline: Optional[pulumi.Input['ConfigurationAzureSecurityBaselineArgs']] = None, + backup: Optional[pulumi.Input['ConfigurationBackupArgs']] = None, + boot_diagnostics_enabled: Optional[pulumi.Input[bool]] = None, + defender_for_cloud_enabled: Optional[pulumi.Input[bool]] = None, + guest_configuration_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + log_analytics_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + status_change_alert_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_enabled is None and 'automationAccountEnabled' in kwargs: + automation_account_enabled = kwargs['automationAccountEnabled'] + if azure_security_baseline is None and 'azureSecurityBaseline' in kwargs: + azure_security_baseline = kwargs['azureSecurityBaseline'] + if boot_diagnostics_enabled is None and 'bootDiagnosticsEnabled' in kwargs: + boot_diagnostics_enabled = kwargs['bootDiagnosticsEnabled'] + if defender_for_cloud_enabled is None and 'defenderForCloudEnabled' in kwargs: + defender_for_cloud_enabled = kwargs['defenderForCloudEnabled'] + if guest_configuration_enabled is None and 'guestConfigurationEnabled' in kwargs: + guest_configuration_enabled = kwargs['guestConfigurationEnabled'] + if log_analytics_enabled is None and 'logAnalyticsEnabled' in kwargs: + log_analytics_enabled = kwargs['logAnalyticsEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if status_change_alert_enabled is None and 'statusChangeAlertEnabled' in kwargs: + status_change_alert_enabled = kwargs['statusChangeAlertEnabled'] + if antimalware is not None: - pulumi.set(__self__, "antimalware", antimalware) + _setter("antimalware", antimalware) if automation_account_enabled is not None: - pulumi.set(__self__, "automation_account_enabled", automation_account_enabled) + _setter("automation_account_enabled", automation_account_enabled) if azure_security_baseline is not None: - pulumi.set(__self__, "azure_security_baseline", azure_security_baseline) + _setter("azure_security_baseline", azure_security_baseline) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if boot_diagnostics_enabled is not None: - pulumi.set(__self__, "boot_diagnostics_enabled", boot_diagnostics_enabled) + _setter("boot_diagnostics_enabled", boot_diagnostics_enabled) if defender_for_cloud_enabled is not None: - pulumi.set(__self__, "defender_for_cloud_enabled", defender_for_cloud_enabled) + _setter("defender_for_cloud_enabled", defender_for_cloud_enabled) if guest_configuration_enabled is not None: - pulumi.set(__self__, "guest_configuration_enabled", guest_configuration_enabled) + _setter("guest_configuration_enabled", guest_configuration_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if log_analytics_enabled is not None: - pulumi.set(__self__, "log_analytics_enabled", log_analytics_enabled) + _setter("log_analytics_enabled", log_analytics_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if status_change_alert_enabled is not None: - pulumi.set(__self__, "status_change_alert_enabled", status_change_alert_enabled) + _setter("status_change_alert_enabled", status_change_alert_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -651,6 +755,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -678,9 +786,24 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ConfigurationArgs.__new__(ConfigurationArgs) + if antimalware is not None and not isinstance(antimalware, ConfigurationAntimalwareArgs): + antimalware = antimalware or {} + def _setter(key, value): + antimalware[key] = value + ConfigurationAntimalwareArgs._configure(_setter, **antimalware) __props__.__dict__["antimalware"] = antimalware __props__.__dict__["automation_account_enabled"] = automation_account_enabled + if azure_security_baseline is not None and not isinstance(azure_security_baseline, ConfigurationAzureSecurityBaselineArgs): + azure_security_baseline = azure_security_baseline or {} + def _setter(key, value): + azure_security_baseline[key] = value + ConfigurationAzureSecurityBaselineArgs._configure(_setter, **azure_security_baseline) __props__.__dict__["azure_security_baseline"] = azure_security_baseline + if backup is not None and not isinstance(backup, ConfigurationBackupArgs): + backup = backup or {} + def _setter(key, value): + backup[key] = value + ConfigurationBackupArgs._configure(_setter, **backup) __props__.__dict__["backup"] = backup __props__.__dict__["boot_diagnostics_enabled"] = boot_diagnostics_enabled __props__.__dict__["defender_for_cloud_enabled"] = defender_for_cloud_enabled diff --git a/sdk/python/pulumi_azure/automanage/outputs.py b/sdk/python/pulumi_azure/automanage/outputs.py index 8594914e74..c29516fea9 100644 --- a/sdk/python/pulumi_azure/automanage/outputs.py +++ b/sdk/python/pulumi_azure/automanage/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -65,18 +65,49 @@ def __init__(__self__, *, :param int scheduled_scan_time_in_minutes: The time of the scheduled scan in minutes. Possible values are `0` to `1439` where `0` is 12:00 AM and `1439` is 11:59 PM. :param str scheduled_scan_type: The type of the scheduled scan. Possible values are `Quick` and `Full`. Defaults to `Quick`. """ + ConfigurationAntimalware._configure( + lambda key, value: pulumi.set(__self__, key, value), + exclusions=exclusions, + real_time_protection_enabled=real_time_protection_enabled, + scheduled_scan_day=scheduled_scan_day, + scheduled_scan_enabled=scheduled_scan_enabled, + scheduled_scan_time_in_minutes=scheduled_scan_time_in_minutes, + scheduled_scan_type=scheduled_scan_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exclusions: Optional['outputs.ConfigurationAntimalwareExclusions'] = None, + real_time_protection_enabled: Optional[bool] = None, + scheduled_scan_day: Optional[int] = None, + scheduled_scan_enabled: Optional[bool] = None, + scheduled_scan_time_in_minutes: Optional[int] = None, + scheduled_scan_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if real_time_protection_enabled is None and 'realTimeProtectionEnabled' in kwargs: + real_time_protection_enabled = kwargs['realTimeProtectionEnabled'] + if scheduled_scan_day is None and 'scheduledScanDay' in kwargs: + scheduled_scan_day = kwargs['scheduledScanDay'] + if scheduled_scan_enabled is None and 'scheduledScanEnabled' in kwargs: + scheduled_scan_enabled = kwargs['scheduledScanEnabled'] + if scheduled_scan_time_in_minutes is None and 'scheduledScanTimeInMinutes' in kwargs: + scheduled_scan_time_in_minutes = kwargs['scheduledScanTimeInMinutes'] + if scheduled_scan_type is None and 'scheduledScanType' in kwargs: + scheduled_scan_type = kwargs['scheduledScanType'] + if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) if real_time_protection_enabled is not None: - pulumi.set(__self__, "real_time_protection_enabled", real_time_protection_enabled) + _setter("real_time_protection_enabled", real_time_protection_enabled) if scheduled_scan_day is not None: - pulumi.set(__self__, "scheduled_scan_day", scheduled_scan_day) + _setter("scheduled_scan_day", scheduled_scan_day) if scheduled_scan_enabled is not None: - pulumi.set(__self__, "scheduled_scan_enabled", scheduled_scan_enabled) + _setter("scheduled_scan_enabled", scheduled_scan_enabled) if scheduled_scan_time_in_minutes is not None: - pulumi.set(__self__, "scheduled_scan_time_in_minutes", scheduled_scan_time_in_minutes) + _setter("scheduled_scan_time_in_minutes", scheduled_scan_time_in_minutes) if scheduled_scan_type is not None: - pulumi.set(__self__, "scheduled_scan_type", scheduled_scan_type) + _setter("scheduled_scan_type", scheduled_scan_type) @property @pulumi.getter @@ -138,12 +169,27 @@ def __init__(__self__, *, :param str paths: The paths to exclude from the antimalware scan, separated by `;`. For example `C:\\\\Windows\\\\Temp;D:\\\\Temp`. :param str processes: The processes to exclude from the antimalware scan, separated by `;`. For example `svchost.exe;notepad.exe`. """ + ConfigurationAntimalwareExclusions._configure( + lambda key, value: pulumi.set(__self__, key, value), + extensions=extensions, + paths=paths, + processes=processes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + extensions: Optional[str] = None, + paths: Optional[str] = None, + processes: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if paths is not None: - pulumi.set(__self__, "paths", paths) + _setter("paths", paths) if processes is not None: - pulumi.set(__self__, "processes", processes) + _setter("processes", processes) @property @pulumi.getter @@ -194,8 +240,21 @@ def __init__(__self__, *, """ :param str assignment_type: The assignment type of the azure security baseline. Possible values are `ApplyAndAutoCorrect`, `ApplyAndMonitor`, `Audit` and `DeployAndAutoCorrect`. Defaults to `ApplyAndAutoCorrect`. """ + ConfigurationAzureSecurityBaseline._configure( + lambda key, value: pulumi.set(__self__, key, value), + assignment_type=assignment_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assignment_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assignment_type is None and 'assignmentType' in kwargs: + assignment_type = kwargs['assignmentType'] + if assignment_type is not None: - pulumi.set(__self__, "assignment_type", assignment_type) + _setter("assignment_type", assignment_type) @property @pulumi.getter(name="assignmentType") @@ -246,16 +305,45 @@ def __init__(__self__, *, :param 'ConfigurationBackupSchedulePolicyArgs' schedule_policy: A `schedule_policy` block as defined below. :param str time_zone: The timezone of the backup policy. Defaults to `UTC`. """ + ConfigurationBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + instant_rp_retention_range_in_days=instant_rp_retention_range_in_days, + policy_name=policy_name, + retention_policy=retention_policy, + schedule_policy=schedule_policy, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + instant_rp_retention_range_in_days: Optional[int] = None, + policy_name: Optional[str] = None, + retention_policy: Optional['outputs.ConfigurationBackupRetentionPolicy'] = None, + schedule_policy: Optional['outputs.ConfigurationBackupSchedulePolicy'] = None, + time_zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if instant_rp_retention_range_in_days is None and 'instantRpRetentionRangeInDays' in kwargs: + instant_rp_retention_range_in_days = kwargs['instantRpRetentionRangeInDays'] + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if schedule_policy is None and 'schedulePolicy' in kwargs: + schedule_policy = kwargs['schedulePolicy'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if instant_rp_retention_range_in_days is not None: - pulumi.set(__self__, "instant_rp_retention_range_in_days", instant_rp_retention_range_in_days) + _setter("instant_rp_retention_range_in_days", instant_rp_retention_range_in_days) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) if schedule_policy is not None: - pulumi.set(__self__, "schedule_policy", schedule_policy) + _setter("schedule_policy", schedule_policy) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter(name="instantRpRetentionRangeInDays") @@ -330,12 +418,33 @@ def __init__(__self__, *, :param str retention_policy_type: The retention policy type of the backup policy. Possible value is `LongTermRetentionPolicy`. :param 'ConfigurationBackupRetentionPolicyWeeklyScheduleArgs' weekly_schedule: A `weekly_schedule` block as defined below. """ + ConfigurationBackupRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + daily_schedule=daily_schedule, + retention_policy_type=retention_policy_type, + weekly_schedule=weekly_schedule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + daily_schedule: Optional['outputs.ConfigurationBackupRetentionPolicyDailySchedule'] = None, + retention_policy_type: Optional[str] = None, + weekly_schedule: Optional['outputs.ConfigurationBackupRetentionPolicyWeeklySchedule'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if daily_schedule is None and 'dailySchedule' in kwargs: + daily_schedule = kwargs['dailySchedule'] + if retention_policy_type is None and 'retentionPolicyType' in kwargs: + retention_policy_type = kwargs['retentionPolicyType'] + if weekly_schedule is None and 'weeklySchedule' in kwargs: + weekly_schedule = kwargs['weeklySchedule'] + if daily_schedule is not None: - pulumi.set(__self__, "daily_schedule", daily_schedule) + _setter("daily_schedule", daily_schedule) if retention_policy_type is not None: - pulumi.set(__self__, "retention_policy_type", retention_policy_type) + _setter("retention_policy_type", retention_policy_type) if weekly_schedule is not None: - pulumi.set(__self__, "weekly_schedule", weekly_schedule) + _setter("weekly_schedule", weekly_schedule) @property @pulumi.getter(name="dailySchedule") @@ -390,10 +499,27 @@ def __init__(__self__, *, :param 'ConfigurationBackupRetentionPolicyDailyScheduleRetentionDurationArgs' retention_duration: A `retention_duration` block as defined below. :param Sequence[str] retention_times: The retention times of the backup policy. """ + ConfigurationBackupRetentionPolicyDailySchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_duration=retention_duration, + retention_times=retention_times, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_duration: Optional['outputs.ConfigurationBackupRetentionPolicyDailyScheduleRetentionDuration'] = None, + retention_times: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_duration is None and 'retentionDuration' in kwargs: + retention_duration = kwargs['retentionDuration'] + if retention_times is None and 'retentionTimes' in kwargs: + retention_times = kwargs['retentionTimes'] + if retention_duration is not None: - pulumi.set(__self__, "retention_duration", retention_duration) + _setter("retention_duration", retention_duration) if retention_times is not None: - pulumi.set(__self__, "retention_times", retention_times) + _setter("retention_times", retention_times) @property @pulumi.getter(name="retentionDuration") @@ -438,10 +564,25 @@ def __init__(__self__, *, :param int count: The count of the retention duration of the backup policy. Valid value inside `daily_schedule` is `7` to `9999` and inside `weekly_schedule` is `1` to `5163`. :param str duration_type: The duration type of the retention duration of the backup policy. Valid value inside `daily_schedule` is `Days` and inside `weekly_schedule` is `Weeks`. """ + ConfigurationBackupRetentionPolicyDailyScheduleRetentionDuration._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + duration_type=duration_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + duration_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration_type is None and 'durationType' in kwargs: + duration_type = kwargs['durationType'] + if count is not None: - pulumi.set(__self__, "count", count) + _setter("count", count) if duration_type is not None: - pulumi.set(__self__, "duration_type", duration_type) + _setter("duration_type", duration_type) @property @pulumi.getter @@ -488,10 +629,27 @@ def __init__(__self__, *, :param 'ConfigurationBackupRetentionPolicyWeeklyScheduleRetentionDurationArgs' retention_duration: A `retention_duration` block as defined below. :param Sequence[str] retention_times: The retention times of the backup policy. """ + ConfigurationBackupRetentionPolicyWeeklySchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_duration=retention_duration, + retention_times=retention_times, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_duration: Optional['outputs.ConfigurationBackupRetentionPolicyWeeklyScheduleRetentionDuration'] = None, + retention_times: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_duration is None and 'retentionDuration' in kwargs: + retention_duration = kwargs['retentionDuration'] + if retention_times is None and 'retentionTimes' in kwargs: + retention_times = kwargs['retentionTimes'] + if retention_duration is not None: - pulumi.set(__self__, "retention_duration", retention_duration) + _setter("retention_duration", retention_duration) if retention_times is not None: - pulumi.set(__self__, "retention_times", retention_times) + _setter("retention_times", retention_times) @property @pulumi.getter(name="retentionDuration") @@ -536,10 +694,25 @@ def __init__(__self__, *, :param int count: The count of the retention duration of the backup policy. Valid value inside `daily_schedule` is `7` to `9999` and inside `weekly_schedule` is `1` to `5163`. :param str duration_type: The duration type of the retention duration of the backup policy. Valid value inside `daily_schedule` is `Days` and inside `weekly_schedule` is `Weeks`. """ + ConfigurationBackupRetentionPolicyWeeklyScheduleRetentionDuration._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + duration_type=duration_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + duration_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration_type is None and 'durationType' in kwargs: + duration_type = kwargs['durationType'] + if count is not None: - pulumi.set(__self__, "count", count) + _setter("count", count) if duration_type is not None: - pulumi.set(__self__, "duration_type", duration_type) + _setter("duration_type", duration_type) @property @pulumi.getter @@ -594,14 +767,39 @@ def __init__(__self__, *, :param str schedule_run_frequency: The schedule run frequency of the backup policy. Possible values are `Daily` and `Weekly`. Defaults to `Daily`. :param Sequence[str] schedule_run_times: The schedule run times of the backup policy. """ + ConfigurationBackupSchedulePolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + schedule_policy_type=schedule_policy_type, + schedule_run_days=schedule_run_days, + schedule_run_frequency=schedule_run_frequency, + schedule_run_times=schedule_run_times, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schedule_policy_type: Optional[str] = None, + schedule_run_days: Optional[Sequence[str]] = None, + schedule_run_frequency: Optional[str] = None, + schedule_run_times: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schedule_policy_type is None and 'schedulePolicyType' in kwargs: + schedule_policy_type = kwargs['schedulePolicyType'] + if schedule_run_days is None and 'scheduleRunDays' in kwargs: + schedule_run_days = kwargs['scheduleRunDays'] + if schedule_run_frequency is None and 'scheduleRunFrequency' in kwargs: + schedule_run_frequency = kwargs['scheduleRunFrequency'] + if schedule_run_times is None and 'scheduleRunTimes' in kwargs: + schedule_run_times = kwargs['scheduleRunTimes'] + if schedule_policy_type is not None: - pulumi.set(__self__, "schedule_policy_type", schedule_policy_type) + _setter("schedule_policy_type", schedule_policy_type) if schedule_run_days is not None: - pulumi.set(__self__, "schedule_run_days", schedule_run_days) + _setter("schedule_run_days", schedule_run_days) if schedule_run_frequency is not None: - pulumi.set(__self__, "schedule_run_frequency", schedule_run_frequency) + _setter("schedule_run_frequency", schedule_run_frequency) if schedule_run_times is not None: - pulumi.set(__self__, "schedule_run_times", schedule_run_times) + _setter("schedule_run_times", schedule_run_times) @property @pulumi.getter(name="schedulePolicyType") diff --git a/sdk/python/pulumi_azure/automation/_inputs.py b/sdk/python/pulumi_azure/automation/_inputs.py index 72de202a44..1bb5a6c678 100644 --- a/sdk/python/pulumi_azure/automation/_inputs.py +++ b/sdk/python/pulumi_azure/automation/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -47,14 +47,37 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault Key which should be used to Encrypt the data in this Automation Account. :param pulumi.Input[str] user_assigned_identity_id: The User Assigned Managed Identity ID to be used for accessing the Customer Managed Key for encryption. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + AccountEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + key_source=key_source, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + key_source: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if key_source is None and 'keySource' in kwargs: + key_source = kwargs['keySource'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + + _setter("key_vault_key_id", key_vault_key_id) if key_source is not None: warnings.warn("""This field is now ignored and will be removed in the next major version of the Azure Provider, the `encryption` block can be omitted to disable encryption""", DeprecationWarning) pulumi.log.warn("""key_source is deprecated: This field is now ignored and will be removed in the next major version of the Azure Provider, the `encryption` block can be omitted to disable encryption""") if key_source is not None: - pulumi.set(__self__, "key_source", key_source) + _setter("key_source", key_source) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -108,13 +131,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + AccountIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -176,10 +224,23 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the Automation Account. :param pulumi.Input[str] name: Specifies the name of the Automation Account. Changing this forces a new resource to be created. """ + AccountPrivateEndpointConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -219,12 +280,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] is_encrypted: Whether to set the isEncrypted flag of the connection field definition. :param pulumi.Input[bool] is_optional: Whether to set the isOptional flag of the connection field definition. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ConnectionTypeFieldArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + is_encrypted=is_encrypted, + is_optional=is_optional, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + is_encrypted: Optional[pulumi.Input[bool]] = None, + is_optional: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if is_encrypted is None and 'isEncrypted' in kwargs: + is_encrypted = kwargs['isEncrypted'] + if is_optional is None and 'isOptional' in kwargs: + is_optional = kwargs['isOptional'] + + _setter("name", name) + _setter("type", type) if is_encrypted is not None: - pulumi.set(__self__, "is_encrypted", is_encrypted) + _setter("is_encrypted", is_encrypted) if is_optional is not None: - pulumi.set(__self__, "is_optional", is_optional) + _setter("is_optional", is_optional) @property @pulumi.getter @@ -284,9 +370,24 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI of the module content (zip or nupkg). :param pulumi.Input['ModuleModuleLinkHashArgs'] hash: A `hash` block as defined below. """ - pulumi.set(__self__, "uri", uri) + ModuleModuleLinkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + uri=uri, + hash=hash, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + uri: Optional[pulumi.Input[str]] = None, + hash: Optional[pulumi.Input['ModuleModuleLinkHashArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("uri", uri) if hash is not None: - pulumi.set(__self__, "hash", hash) + _setter("hash", hash) @property @pulumi.getter @@ -322,8 +423,25 @@ def __init__(__self__, *, :param pulumi.Input[str] algorithm: Specifies the algorithm used for the hash content. :param pulumi.Input[str] value: The hash value of the content. """ - pulumi.set(__self__, "algorithm", algorithm) - pulumi.set(__self__, "value", value) + ModuleModuleLinkHashArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + algorithm=algorithm, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + algorithm: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if algorithm is None: + raise TypeError("Missing 'algorithm' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("algorithm", algorithm) + _setter("value", value) @property @pulumi.getter @@ -365,18 +483,49 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] output_types: Specifies the output types of the runbook. :param pulumi.Input[Sequence[pulumi.Input['RunBookDraftParameterArgs']]] parameters: A list of `parameters` block as defined below. """ + RunBookDraftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_link=content_link, + creation_time=creation_time, + edit_mode_enabled=edit_mode_enabled, + last_modified_time=last_modified_time, + output_types=output_types, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_link: Optional[pulumi.Input['RunBookDraftContentLinkArgs']] = None, + creation_time: Optional[pulumi.Input[str]] = None, + edit_mode_enabled: Optional[pulumi.Input[bool]] = None, + last_modified_time: Optional[pulumi.Input[str]] = None, + output_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + parameters: Optional[pulumi.Input[Sequence[pulumi.Input['RunBookDraftParameterArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_link is None and 'contentLink' in kwargs: + content_link = kwargs['contentLink'] + if creation_time is None and 'creationTime' in kwargs: + creation_time = kwargs['creationTime'] + if edit_mode_enabled is None and 'editModeEnabled' in kwargs: + edit_mode_enabled = kwargs['editModeEnabled'] + if last_modified_time is None and 'lastModifiedTime' in kwargs: + last_modified_time = kwargs['lastModifiedTime'] + if output_types is None and 'outputTypes' in kwargs: + output_types = kwargs['outputTypes'] + if content_link is not None: - pulumi.set(__self__, "content_link", content_link) + _setter("content_link", content_link) if creation_time is not None: - pulumi.set(__self__, "creation_time", creation_time) + _setter("creation_time", creation_time) if edit_mode_enabled is not None: - pulumi.set(__self__, "edit_mode_enabled", edit_mode_enabled) + _setter("edit_mode_enabled", edit_mode_enabled) if last_modified_time is not None: - pulumi.set(__self__, "last_modified_time", last_modified_time) + _setter("last_modified_time", last_modified_time) if output_types is not None: - pulumi.set(__self__, "output_types", output_types) + _setter("output_types", output_types) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="contentLink") @@ -456,11 +605,28 @@ def __init__(__self__, *, :param pulumi.Input['RunBookDraftContentLinkHashArgs'] hash: A `hash` block as defined below. :param pulumi.Input[str] version: Specifies the version of the content """ - pulumi.set(__self__, "uri", uri) + RunBookDraftContentLinkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + uri=uri, + hash=hash, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + uri: Optional[pulumi.Input[str]] = None, + hash: Optional[pulumi.Input['RunBookDraftContentLinkHashArgs']] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("uri", uri) if hash is not None: - pulumi.set(__self__, "hash", hash) + _setter("hash", hash) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -508,8 +674,25 @@ def __init__(__self__, *, :param pulumi.Input[str] algorithm: Specifies the hash algorithm used to hash the content. :param pulumi.Input[str] value: Specifies the expected hash value of the content. """ - pulumi.set(__self__, "algorithm", algorithm) - pulumi.set(__self__, "value", value) + RunBookDraftContentLinkHashArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + algorithm=algorithm, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + algorithm: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if algorithm is None: + raise TypeError("Missing 'algorithm' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("algorithm", algorithm) + _setter("value", value) @property @pulumi.getter @@ -551,14 +734,39 @@ def __init__(__self__, *, :param pulumi.Input[bool] mandatory: Whether this parameter is mandatory. :param pulumi.Input[int] position: Specifies the position of the parameter. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "type", type) + RunBookDraftParameterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + type=type, + default_value=default_value, + mandatory=mandatory, + position=position, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + default_value: Optional[pulumi.Input[str]] = None, + mandatory: Optional[pulumi.Input[bool]] = None, + position: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + + _setter("key", key) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if mandatory is not None: - pulumi.set(__self__, "mandatory", mandatory) + _setter("mandatory", mandatory) if position is not None: - pulumi.set(__self__, "position", position) + _setter("position", position) @property @pulumi.getter @@ -631,13 +839,38 @@ def __init__(__self__, *, """ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A list of `parameters` block as defined below. """ - pulumi.set(__self__, "schedule_name", schedule_name) + RunBookJobScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + schedule_name=schedule_name, + job_schedule_id=job_schedule_id, + parameters=parameters, + run_on=run_on, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schedule_name: Optional[pulumi.Input[str]] = None, + job_schedule_id: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + run_on: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schedule_name is None and 'scheduleName' in kwargs: + schedule_name = kwargs['scheduleName'] + if schedule_name is None: + raise TypeError("Missing 'schedule_name' argument") + if job_schedule_id is None and 'jobScheduleId' in kwargs: + job_schedule_id = kwargs['jobScheduleId'] + if run_on is None and 'runOn' in kwargs: + run_on = kwargs['runOn'] + + _setter("schedule_name", schedule_name) if job_schedule_id is not None: - pulumi.set(__self__, "job_schedule_id", job_schedule_id) + _setter("job_schedule_id", job_schedule_id) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if run_on is not None: - pulumi.set(__self__, "run_on", run_on) + _setter("run_on", run_on) @property @pulumi.getter(name="scheduleName") @@ -690,11 +923,28 @@ def __init__(__self__, *, :param pulumi.Input['RunBookPublishContentLinkHashArgs'] hash: A `hash` block as defined below. :param pulumi.Input[str] version: Specifies the version of the content """ - pulumi.set(__self__, "uri", uri) + RunBookPublishContentLinkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + uri=uri, + hash=hash, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + uri: Optional[pulumi.Input[str]] = None, + hash: Optional[pulumi.Input['RunBookPublishContentLinkHashArgs']] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("uri", uri) if hash is not None: - pulumi.set(__self__, "hash", hash) + _setter("hash", hash) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -742,8 +992,25 @@ def __init__(__self__, *, :param pulumi.Input[str] algorithm: Specifies the hash algorithm used to hash the content. :param pulumi.Input[str] value: Specifies the expected hash value of the content. """ - pulumi.set(__self__, "algorithm", algorithm) - pulumi.set(__self__, "value", value) + RunBookPublishContentLinkHashArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + algorithm=algorithm, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + algorithm: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if algorithm is None: + raise TypeError("Missing 'algorithm' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("algorithm", algorithm) + _setter("value", value) @property @pulumi.getter @@ -779,8 +1046,25 @@ def __init__(__self__, *, :param pulumi.Input[str] day: Day of the occurrence. Must be one of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`. :param pulumi.Input[int] occurrence: Occurrence of the week within the month. Must be between `1` and `5`. `-1` for last week within the month. """ - pulumi.set(__self__, "day", day) - pulumi.set(__self__, "occurrence", occurrence) + ScheduleMonthlyOccurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + day=day, + occurrence=occurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day: Optional[pulumi.Input[str]] = None, + occurrence: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day is None: + raise TypeError("Missing 'day' argument") + if occurrence is None: + raise TypeError("Missing 'occurrence' argument") + + _setter("day", day) + _setter("occurrence", occurrence) @property @pulumi.getter @@ -821,16 +1105,43 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] included_packages: Specifies a list of packages to included from the Software Update Configuration. :param pulumi.Input[str] reboot: Specifies the reboot settings after software update, possible values are `IfRequired`, `Never`, `RebootOnly` and `Always`. Defaults to `IfRequired`. """ + SoftwareUpdateConfigurationLinuxArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + classification_included=classification_included, + classifications_includeds=classifications_includeds, + excluded_packages=excluded_packages, + included_packages=included_packages, + reboot=reboot, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + classification_included: Optional[pulumi.Input[str]] = None, + classifications_includeds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + excluded_packages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + included_packages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + reboot: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if classification_included is None and 'classificationIncluded' in kwargs: + classification_included = kwargs['classificationIncluded'] + if classifications_includeds is None and 'classificationsIncludeds' in kwargs: + classifications_includeds = kwargs['classificationsIncludeds'] + if excluded_packages is None and 'excludedPackages' in kwargs: + excluded_packages = kwargs['excludedPackages'] + if included_packages is None and 'includedPackages' in kwargs: + included_packages = kwargs['includedPackages'] + if classification_included is not None: - pulumi.set(__self__, "classification_included", classification_included) + _setter("classification_included", classification_included) if classifications_includeds is not None: - pulumi.set(__self__, "classifications_includeds", classifications_includeds) + _setter("classifications_includeds", classifications_includeds) if excluded_packages is not None: - pulumi.set(__self__, "excluded_packages", excluded_packages) + _setter("excluded_packages", excluded_packages) if included_packages is not None: - pulumi.set(__self__, "included_packages", included_packages) + _setter("included_packages", included_packages) if reboot is not None: - pulumi.set(__self__, "reboot", reboot) + _setter("reboot", reboot) @property @pulumi.getter(name="classificationIncluded") @@ -899,10 +1210,23 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: Specifies a map of parameters for the task. :param pulumi.Input[str] source: The name of the runbook for the post task. """ + SoftwareUpdateConfigurationPostTaskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + parameters=parameters, + source=source, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + source: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) @property @pulumi.getter @@ -938,10 +1262,23 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: Specifies a map of parameters for the task. :param pulumi.Input[str] source: The name of the runbook for the pre task. """ + SoftwareUpdateConfigurationPreTaskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + parameters=parameters, + source=source, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + source: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) @property @pulumi.getter @@ -999,37 +1336,106 @@ def __init__(__self__, *, :param pulumi.Input[str] start_time: Start time of the schedule. Must be at least five minutes in the future. Defaults to seven minutes in the future from the time the resource is created. :param pulumi.Input[str] time_zone: The timezone of the start time. Defaults to `Etc/UTC`. For possible values see: """ - pulumi.set(__self__, "frequency", frequency) + SoftwareUpdateConfigurationScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency=frequency, + advanced_month_days=advanced_month_days, + advanced_week_days=advanced_week_days, + creation_time=creation_time, + description=description, + expiry_time=expiry_time, + expiry_time_offset_minutes=expiry_time_offset_minutes, + interval=interval, + is_enabled=is_enabled, + last_modified_time=last_modified_time, + monthly_occurrences=monthly_occurrences, + next_run=next_run, + next_run_offset_minutes=next_run_offset_minutes, + start_time=start_time, + start_time_offset_minutes=start_time_offset_minutes, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency: Optional[pulumi.Input[str]] = None, + advanced_month_days: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + advanced_week_days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + creation_time: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + expiry_time: Optional[pulumi.Input[str]] = None, + expiry_time_offset_minutes: Optional[pulumi.Input[float]] = None, + interval: Optional[pulumi.Input[int]] = None, + is_enabled: Optional[pulumi.Input[bool]] = None, + last_modified_time: Optional[pulumi.Input[str]] = None, + monthly_occurrences: Optional[pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationScheduleMonthlyOccurrenceArgs']]]] = None, + next_run: Optional[pulumi.Input[str]] = None, + next_run_offset_minutes: Optional[pulumi.Input[float]] = None, + start_time: Optional[pulumi.Input[str]] = None, + start_time_offset_minutes: Optional[pulumi.Input[float]] = None, + time_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if advanced_month_days is None and 'advancedMonthDays' in kwargs: + advanced_month_days = kwargs['advancedMonthDays'] + if advanced_week_days is None and 'advancedWeekDays' in kwargs: + advanced_week_days = kwargs['advancedWeekDays'] + if creation_time is None and 'creationTime' in kwargs: + creation_time = kwargs['creationTime'] + if expiry_time is None and 'expiryTime' in kwargs: + expiry_time = kwargs['expiryTime'] + if expiry_time_offset_minutes is None and 'expiryTimeOffsetMinutes' in kwargs: + expiry_time_offset_minutes = kwargs['expiryTimeOffsetMinutes'] + if is_enabled is None and 'isEnabled' in kwargs: + is_enabled = kwargs['isEnabled'] + if last_modified_time is None and 'lastModifiedTime' in kwargs: + last_modified_time = kwargs['lastModifiedTime'] + if monthly_occurrences is None and 'monthlyOccurrences' in kwargs: + monthly_occurrences = kwargs['monthlyOccurrences'] + if next_run is None and 'nextRun' in kwargs: + next_run = kwargs['nextRun'] + if next_run_offset_minutes is None and 'nextRunOffsetMinutes' in kwargs: + next_run_offset_minutes = kwargs['nextRunOffsetMinutes'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time_offset_minutes is None and 'startTimeOffsetMinutes' in kwargs: + start_time_offset_minutes = kwargs['startTimeOffsetMinutes'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + + _setter("frequency", frequency) if advanced_month_days is not None: - pulumi.set(__self__, "advanced_month_days", advanced_month_days) + _setter("advanced_month_days", advanced_month_days) if advanced_week_days is not None: - pulumi.set(__self__, "advanced_week_days", advanced_week_days) + _setter("advanced_week_days", advanced_week_days) if creation_time is not None: - pulumi.set(__self__, "creation_time", creation_time) + _setter("creation_time", creation_time) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if expiry_time is not None: - pulumi.set(__self__, "expiry_time", expiry_time) + _setter("expiry_time", expiry_time) if expiry_time_offset_minutes is not None: - pulumi.set(__self__, "expiry_time_offset_minutes", expiry_time_offset_minutes) + _setter("expiry_time_offset_minutes", expiry_time_offset_minutes) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) if is_enabled is not None: - pulumi.set(__self__, "is_enabled", is_enabled) + _setter("is_enabled", is_enabled) if last_modified_time is not None: - pulumi.set(__self__, "last_modified_time", last_modified_time) + _setter("last_modified_time", last_modified_time) if monthly_occurrences is not None: - pulumi.set(__self__, "monthly_occurrences", monthly_occurrences) + _setter("monthly_occurrences", monthly_occurrences) if next_run is not None: - pulumi.set(__self__, "next_run", next_run) + _setter("next_run", next_run) if next_run_offset_minutes is not None: - pulumi.set(__self__, "next_run_offset_minutes", next_run_offset_minutes) + _setter("next_run_offset_minutes", next_run_offset_minutes) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if start_time_offset_minutes is not None: - pulumi.set(__self__, "start_time_offset_minutes", start_time_offset_minutes) + _setter("start_time_offset_minutes", start_time_offset_minutes) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter @@ -1215,8 +1621,25 @@ def __init__(__self__, *, :param pulumi.Input[str] day: Day of the occurrence. Must be one of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`. :param pulumi.Input[int] occurrence: Occurrence of the week within the month. Must be between `1` and `5`. `-1` for last week within the month. """ - pulumi.set(__self__, "day", day) - pulumi.set(__self__, "occurrence", occurrence) + SoftwareUpdateConfigurationScheduleMonthlyOccurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + day=day, + occurrence=occurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day: Optional[pulumi.Input[str]] = None, + occurrence: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day is None: + raise TypeError("Missing 'day' argument") + if occurrence is None: + raise TypeError("Missing 'occurrence' argument") + + _setter("day", day) + _setter("occurrence", occurrence) @property @pulumi.getter @@ -1252,10 +1675,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationTargetAzureQueryArgs']]] azure_queries: One or more `azure_query` blocks as defined above. :param pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationTargetNonAzureQueryArgs']]] non_azure_queries: One or more `non_azure_query` blocks as defined above. """ + SoftwareUpdateConfigurationTargetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_queries=azure_queries, + non_azure_queries=non_azure_queries, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_queries: Optional[pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationTargetAzureQueryArgs']]]] = None, + non_azure_queries: Optional[pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationTargetNonAzureQueryArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_queries is None and 'azureQueries' in kwargs: + azure_queries = kwargs['azureQueries'] + if non_azure_queries is None and 'nonAzureQueries' in kwargs: + non_azure_queries = kwargs['nonAzureQueries'] + if azure_queries is not None: - pulumi.set(__self__, "azure_queries", azure_queries) + _setter("azure_queries", azure_queries) if non_azure_queries is not None: - pulumi.set(__self__, "non_azure_queries", non_azure_queries) + _setter("non_azure_queries", non_azure_queries) @property @pulumi.getter(name="azureQueries") @@ -1295,14 +1735,33 @@ def __init__(__self__, *, :param pulumi.Input[str] tag_filter: Specifies how the specified tags to filter VMs. Possible values are `Any` and `All`. :param pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationTargetAzureQueryTagArgs']]] tags: A mapping of tags used for query filter as defined below. """ + SoftwareUpdateConfigurationTargetAzureQueryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + locations=locations, + scopes=scopes, + tag_filter=tag_filter, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + locations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tag_filter: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationTargetAzureQueryTagArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag_filter is None and 'tagFilter' in kwargs: + tag_filter = kwargs['tagFilter'] + if locations is not None: - pulumi.set(__self__, "locations", locations) + _setter("locations", locations) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if tag_filter is not None: - pulumi.set(__self__, "tag_filter", tag_filter) + _setter("tag_filter", tag_filter) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -1362,8 +1821,25 @@ def __init__(__self__, *, :param pulumi.Input[str] tag: Specifies the name of the tag to filter. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values for this tag key. """ - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "values", values) + SoftwareUpdateConfigurationTargetAzureQueryTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + tag=tag, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tag: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag is None: + raise TypeError("Missing 'tag' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("tag", tag) + _setter("values", values) @property @pulumi.getter @@ -1399,10 +1875,27 @@ def __init__(__self__, *, :param pulumi.Input[str] function_alias: Specifies the Log Analytics save search name. :param pulumi.Input[str] workspace_id: The workspace id for Log Analytics in which the saved search in. """ + SoftwareUpdateConfigurationTargetNonAzureQueryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_alias=function_alias, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_alias: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_alias is None and 'functionAlias' in kwargs: + function_alias = kwargs['functionAlias'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if function_alias is not None: - pulumi.set(__self__, "function_alias", function_alias) + _setter("function_alias", function_alias) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="functionAlias") @@ -1443,19 +1936,46 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] included_knowledge_base_numbers: Specifies a list of knowledge base numbers included. :param pulumi.Input[str] reboot: Specifies the reboot settings after software update, possible values are `IfRequired`, `Never`, `RebootOnly` and `Always`. Defaults to `IfRequired`. """ + SoftwareUpdateConfigurationWindowsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + classification_included=classification_included, + classifications_includeds=classifications_includeds, + excluded_knowledge_base_numbers=excluded_knowledge_base_numbers, + included_knowledge_base_numbers=included_knowledge_base_numbers, + reboot=reboot, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + classification_included: Optional[pulumi.Input[str]] = None, + classifications_includeds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + excluded_knowledge_base_numbers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + included_knowledge_base_numbers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + reboot: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if classification_included is None and 'classificationIncluded' in kwargs: + classification_included = kwargs['classificationIncluded'] + if classifications_includeds is None and 'classificationsIncludeds' in kwargs: + classifications_includeds = kwargs['classificationsIncludeds'] + if excluded_knowledge_base_numbers is None and 'excludedKnowledgeBaseNumbers' in kwargs: + excluded_knowledge_base_numbers = kwargs['excludedKnowledgeBaseNumbers'] + if included_knowledge_base_numbers is None and 'includedKnowledgeBaseNumbers' in kwargs: + included_knowledge_base_numbers = kwargs['includedKnowledgeBaseNumbers'] + if classification_included is not None: warnings.warn("""windows classification can be set as a list, use `classifications_included` instead.""", DeprecationWarning) pulumi.log.warn("""classification_included is deprecated: windows classification can be set as a list, use `classifications_included` instead.""") if classification_included is not None: - pulumi.set(__self__, "classification_included", classification_included) + _setter("classification_included", classification_included) if classifications_includeds is not None: - pulumi.set(__self__, "classifications_includeds", classifications_includeds) + _setter("classifications_includeds", classifications_includeds) if excluded_knowledge_base_numbers is not None: - pulumi.set(__self__, "excluded_knowledge_base_numbers", excluded_knowledge_base_numbers) + _setter("excluded_knowledge_base_numbers", excluded_knowledge_base_numbers) if included_knowledge_base_numbers is not None: - pulumi.set(__self__, "included_knowledge_base_numbers", included_knowledge_base_numbers) + _setter("included_knowledge_base_numbers", included_knowledge_base_numbers) if reboot is not None: - pulumi.set(__self__, "reboot", reboot) + _setter("reboot", reboot) @property @pulumi.getter(name="classificationIncluded") @@ -1529,10 +2049,33 @@ def __init__(__self__, *, :param pulumi.Input[str] token_type: Specify the token type, possible values are `PersonalAccessToken` and `Oauth`. :param pulumi.Input[str] refresh_token: The refresh token of specified rpeo. """ - pulumi.set(__self__, "token", token) - pulumi.set(__self__, "token_type", token_type) + SourceControlSecurityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + token=token, + token_type=token_type, + refresh_token=refresh_token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + token: Optional[pulumi.Input[str]] = None, + token_type: Optional[pulumi.Input[str]] = None, + refresh_token: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if token is None: + raise TypeError("Missing 'token' argument") + if token_type is None and 'tokenType' in kwargs: + token_type = kwargs['tokenType'] + if token_type is None: + raise TypeError("Missing 'token_type' argument") + if refresh_token is None and 'refreshToken' in kwargs: + refresh_token = kwargs['refreshToken'] + + _setter("token", token) + _setter("token_type", token_type) if refresh_token is not None: - pulumi.set(__self__, "refresh_token", refresh_token) + _setter("refresh_token", refresh_token) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/automation/account.py b/sdk/python/pulumi_azure/automation/account.py index 15f4d2c2f1..a1bdedb133 100644 --- a/sdk/python/pulumi_azure/automation/account.py +++ b/sdk/python/pulumi_azure/automation/account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,22 +37,61 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether public network access is allowed for the automation account. Defaults to `true`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + AccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + encryptions=encryptions, + identity=identity, + local_authentication_enabled=local_authentication_enabled, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['AccountEncryptionArgs']]]] = None, + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + local_authentication_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if local_authentication_enabled is None and 'localAuthenticationEnabled' in kwargs: + local_authentication_enabled = kwargs['localAuthenticationEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if encryptions is not None: - pulumi.set(__self__, "encryptions", encryptions) + _setter("encryptions", encryptions) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_authentication_enabled is not None: - pulumi.set(__self__, "local_authentication_enabled", local_authentication_enabled) + _setter("local_authentication_enabled", local_authentication_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -196,34 +235,89 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_name: The SKU of the account. Possible values are `Basic` and `Free`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _AccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dsc_primary_access_key=dsc_primary_access_key, + dsc_secondary_access_key=dsc_secondary_access_key, + dsc_server_endpoint=dsc_server_endpoint, + encryptions=encryptions, + hybrid_service_url=hybrid_service_url, + identity=identity, + local_authentication_enabled=local_authentication_enabled, + location=location, + name=name, + private_endpoint_connections=private_endpoint_connections, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dsc_primary_access_key: Optional[pulumi.Input[str]] = None, + dsc_secondary_access_key: Optional[pulumi.Input[str]] = None, + dsc_server_endpoint: Optional[pulumi.Input[str]] = None, + encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['AccountEncryptionArgs']]]] = None, + hybrid_service_url: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + local_authentication_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_endpoint_connections: Optional[pulumi.Input[Sequence[pulumi.Input['AccountPrivateEndpointConnectionArgs']]]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dsc_primary_access_key is None and 'dscPrimaryAccessKey' in kwargs: + dsc_primary_access_key = kwargs['dscPrimaryAccessKey'] + if dsc_secondary_access_key is None and 'dscSecondaryAccessKey' in kwargs: + dsc_secondary_access_key = kwargs['dscSecondaryAccessKey'] + if dsc_server_endpoint is None and 'dscServerEndpoint' in kwargs: + dsc_server_endpoint = kwargs['dscServerEndpoint'] + if hybrid_service_url is None and 'hybridServiceUrl' in kwargs: + hybrid_service_url = kwargs['hybridServiceUrl'] + if local_authentication_enabled is None and 'localAuthenticationEnabled' in kwargs: + local_authentication_enabled = kwargs['localAuthenticationEnabled'] + if private_endpoint_connections is None and 'privateEndpointConnections' in kwargs: + private_endpoint_connections = kwargs['privateEndpointConnections'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if dsc_primary_access_key is not None: - pulumi.set(__self__, "dsc_primary_access_key", dsc_primary_access_key) + _setter("dsc_primary_access_key", dsc_primary_access_key) if dsc_secondary_access_key is not None: - pulumi.set(__self__, "dsc_secondary_access_key", dsc_secondary_access_key) + _setter("dsc_secondary_access_key", dsc_secondary_access_key) if dsc_server_endpoint is not None: - pulumi.set(__self__, "dsc_server_endpoint", dsc_server_endpoint) + _setter("dsc_server_endpoint", dsc_server_endpoint) if encryptions is not None: - pulumi.set(__self__, "encryptions", encryptions) + _setter("encryptions", encryptions) if hybrid_service_url is not None: - pulumi.set(__self__, "hybrid_service_url", hybrid_service_url) + _setter("hybrid_service_url", hybrid_service_url) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_authentication_enabled is not None: - pulumi.set(__self__, "local_authentication_enabled", local_authentication_enabled) + _setter("local_authentication_enabled", local_authentication_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_endpoint_connections is not None: - pulumi.set(__self__, "private_endpoint_connections", private_endpoint_connections) + _setter("private_endpoint_connections", private_endpoint_connections) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dscPrimaryAccessKey") @@ -488,6 +582,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -512,6 +610,11 @@ def _internal_init(__self__, __props__ = AccountArgs.__new__(AccountArgs) __props__.__dict__["encryptions"] = encryptions + if identity is not None and not isinstance(identity, AccountIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + AccountIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["local_authentication_enabled"] = local_authentication_enabled __props__.__dict__["location"] = location diff --git a/sdk/python/pulumi_azure/automation/bool_variable.py b/sdk/python/pulumi_azure/automation/bool_variable.py index 70c0051da0..e5b2ae0db4 100644 --- a/sdk/python/pulumi_azure/automation/bool_variable.py +++ b/sdk/python/pulumi_azure/automation/bool_variable.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['BoolVariableArgs', 'BoolVariable'] @@ -29,16 +29,45 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Automation Variable. Changing this forces a new resource to be created. :param pulumi.Input[bool] value: The value of the Automation Variable as a `boolean`. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + BoolVariableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + resource_group_name=resource_group_name, + description=description, + encrypted=encrypted, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encrypted: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("automation_account_name", automation_account_name) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encrypted is not None: - pulumi.set(__self__, "encrypted", encrypted) + _setter("encrypted", encrypted) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="automationAccountName") @@ -131,18 +160,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created. :param pulumi.Input[bool] value: The value of the Automation Variable as a `boolean`. """ + _BoolVariableState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + description=description, + encrypted=encrypted, + name=name, + resource_group_name=resource_group_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encrypted: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encrypted is not None: - pulumi.set(__self__, "encrypted", encrypted) + _setter("encrypted", encrypted) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="automationAccountName") @@ -310,6 +364,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BoolVariableArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/certificate.py b/sdk/python/pulumi_azure/automation/certificate.py index b17cce43b8..1c38d8931d 100644 --- a/sdk/python/pulumi_azure/automation/certificate.py +++ b/sdk/python/pulumi_azure/automation/certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CertificateArgs', 'Certificate'] @@ -29,15 +29,46 @@ def __init__(__self__, *, :param pulumi.Input[bool] exportable: The is exportable flag of the certificate. :param pulumi.Input[str] name: Specifies the name of the Certificate. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "base64", base64) - pulumi.set(__self__, "resource_group_name", resource_group_name) + CertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + base64=base64, + resource_group_name=resource_group_name, + description=description, + exportable=exportable, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + base64: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + exportable: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if base64 is None: + raise TypeError("Missing 'base64' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("automation_account_name", automation_account_name) + _setter("base64", base64) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if exportable is not None: - pulumi.set(__self__, "exportable", exportable) + _setter("exportable", exportable) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="automationAccountName") @@ -132,20 +163,47 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Certificate is created. Changing this forces a new resource to be created. :param pulumi.Input[str] thumbprint: The thumbprint for the certificate. """ + _CertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + base64=base64, + description=description, + exportable=exportable, + name=name, + resource_group_name=resource_group_name, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + base64: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + exportable: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if base64 is not None: - pulumi.set(__self__, "base64", base64) + _setter("base64", base64) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if exportable is not None: - pulumi.set(__self__, "exportable", exportable) + _setter("exportable", exportable) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="automationAccountName") @@ -331,6 +389,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/connection.py b/sdk/python/pulumi_azure/automation/connection.py index ad85275fe4..72f0917d65 100644 --- a/sdk/python/pulumi_azure/automation/connection.py +++ b/sdk/python/pulumi_azure/automation/connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ConnectionArgs', 'Connection'] @@ -29,14 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] description: A description for this Connection. :param pulumi.Input[str] name: Specifies the name of the Connection. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "values", values) + ConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + resource_group_name=resource_group_name, + type=type, + values=values, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("automation_account_name", automation_account_name) + _setter("resource_group_name", resource_group_name) + _setter("type", type) + _setter("values", values) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="automationAccountName") @@ -129,18 +162,43 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of the Connection - can be either builtin type such as `Azure`, `AzureClassicCertificate`, and `AzureServicePrincipal`, or a user defined types. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] values: A mapping of key value pairs passed to the connection. Different `type` needs different parameters in the `values`. Builtin types have required field values as below: """ + _ConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + description=description, + name=name, + resource_group_name=resource_group_name, + type=type, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter(name="automationAccountName") @@ -322,6 +380,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/connection_certificate.py b/sdk/python/pulumi_azure/automation/connection_certificate.py index 387dc7ed9c..fbc814b96a 100644 --- a/sdk/python/pulumi_azure/automation/connection_certificate.py +++ b/sdk/python/pulumi_azure/automation/connection_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ConnectionCertificateArgs', 'ConnectionCertificate'] @@ -29,14 +29,51 @@ def __init__(__self__, *, :param pulumi.Input[str] description: A description for this Connection. :param pulumi.Input[str] name: Specifies the name of the Connection. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "automation_certificate_name", automation_certificate_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "subscription_id", subscription_id) + ConnectionCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + automation_certificate_name=automation_certificate_name, + resource_group_name=resource_group_name, + subscription_id=subscription_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + automation_certificate_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if automation_certificate_name is None and 'automationCertificateName' in kwargs: + automation_certificate_name = kwargs['automationCertificateName'] + if automation_certificate_name is None: + raise TypeError("Missing 'automation_certificate_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + + _setter("automation_account_name", automation_account_name) + _setter("automation_certificate_name", automation_certificate_name) + _setter("resource_group_name", resource_group_name) + _setter("subscription_id", subscription_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="automationAccountName") @@ -129,18 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Connection is created. Changing this forces a new resource to be created. :param pulumi.Input[str] subscription_id: The id of subscription where the automation certificate exists. """ + _ConnectionCertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + automation_certificate_name=automation_certificate_name, + description=description, + name=name, + resource_group_name=resource_group_name, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + automation_certificate_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_certificate_name is None and 'automationCertificateName' in kwargs: + automation_certificate_name = kwargs['automationCertificateName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if automation_certificate_name is not None: - pulumi.set(__self__, "automation_certificate_name", automation_certificate_name) + _setter("automation_certificate_name", automation_certificate_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter(name="automationAccountName") @@ -322,6 +388,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConnectionCertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/connection_classic_certificate.py b/sdk/python/pulumi_azure/automation/connection_classic_certificate.py index 219cef2708..89c6aa9b45 100644 --- a/sdk/python/pulumi_azure/automation/connection_classic_certificate.py +++ b/sdk/python/pulumi_azure/automation/connection_classic_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ConnectionClassicCertificateArgs', 'ConnectionClassicCertificate'] @@ -31,15 +31,58 @@ def __init__(__self__, *, :param pulumi.Input[str] description: A description for this Connection. :param pulumi.Input[str] name: Specifies the name of the Connection. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "certificate_asset_name", certificate_asset_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "subscription_id", subscription_id) - pulumi.set(__self__, "subscription_name", subscription_name) + ConnectionClassicCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + certificate_asset_name=certificate_asset_name, + resource_group_name=resource_group_name, + subscription_id=subscription_id, + subscription_name=subscription_name, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + certificate_asset_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + subscription_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if certificate_asset_name is None and 'certificateAssetName' in kwargs: + certificate_asset_name = kwargs['certificateAssetName'] + if certificate_asset_name is None: + raise TypeError("Missing 'certificate_asset_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + if subscription_name is None and 'subscriptionName' in kwargs: + subscription_name = kwargs['subscriptionName'] + if subscription_name is None: + raise TypeError("Missing 'subscription_name' argument") + + _setter("automation_account_name", automation_account_name) + _setter("certificate_asset_name", certificate_asset_name) + _setter("resource_group_name", resource_group_name) + _setter("subscription_id", subscription_id) + _setter("subscription_name", subscription_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="automationAccountName") @@ -146,20 +189,53 @@ def __init__(__self__, *, :param pulumi.Input[str] subscription_id: The id of subscription. :param pulumi.Input[str] subscription_name: The name of subscription. """ + _ConnectionClassicCertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + certificate_asset_name=certificate_asset_name, + description=description, + name=name, + resource_group_name=resource_group_name, + subscription_id=subscription_id, + subscription_name=subscription_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + certificate_asset_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + subscription_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if certificate_asset_name is None and 'certificateAssetName' in kwargs: + certificate_asset_name = kwargs['certificateAssetName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_name is None and 'subscriptionName' in kwargs: + subscription_name = kwargs['subscriptionName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if certificate_asset_name is not None: - pulumi.set(__self__, "certificate_asset_name", certificate_asset_name) + _setter("certificate_asset_name", certificate_asset_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) if subscription_name is not None: - pulumi.set(__self__, "subscription_name", subscription_name) + _setter("subscription_name", subscription_name) @property @pulumi.getter(name="automationAccountName") @@ -347,6 +423,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConnectionClassicCertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/connection_service_principal.py b/sdk/python/pulumi_azure/automation/connection_service_principal.py index 1185a95c0c..30cad3123d 100644 --- a/sdk/python/pulumi_azure/automation/connection_service_principal.py +++ b/sdk/python/pulumi_azure/automation/connection_service_principal.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ConnectionServicePrincipalArgs', 'ConnectionServicePrincipal'] @@ -33,16 +33,65 @@ def __init__(__self__, *, :param pulumi.Input[str] description: A description for this Connection. :param pulumi.Input[str] name: Specifies the name of the Connection. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "application_id", application_id) - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "certificate_thumbprint", certificate_thumbprint) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "subscription_id", subscription_id) - pulumi.set(__self__, "tenant_id", tenant_id) + ConnectionServicePrincipalArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_id=application_id, + automation_account_name=automation_account_name, + certificate_thumbprint=certificate_thumbprint, + resource_group_name=resource_group_name, + subscription_id=subscription_id, + tenant_id=tenant_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_id: Optional[pulumi.Input[str]] = None, + automation_account_name: Optional[pulumi.Input[str]] = None, + certificate_thumbprint: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_id is None and 'applicationId' in kwargs: + application_id = kwargs['applicationId'] + if application_id is None: + raise TypeError("Missing 'application_id' argument") + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if certificate_thumbprint is None and 'certificateThumbprint' in kwargs: + certificate_thumbprint = kwargs['certificateThumbprint'] + if certificate_thumbprint is None: + raise TypeError("Missing 'certificate_thumbprint' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("application_id", application_id) + _setter("automation_account_name", automation_account_name) + _setter("certificate_thumbprint", certificate_thumbprint) + _setter("resource_group_name", resource_group_name) + _setter("subscription_id", subscription_id) + _setter("tenant_id", tenant_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="applicationId") @@ -163,22 +212,59 @@ def __init__(__self__, *, :param pulumi.Input[str] subscription_id: The subscription GUID. :param pulumi.Input[str] tenant_id: The ID of the Tenant the Service Principal is assigned in. """ + _ConnectionServicePrincipalState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_id=application_id, + automation_account_name=automation_account_name, + certificate_thumbprint=certificate_thumbprint, + description=description, + name=name, + resource_group_name=resource_group_name, + subscription_id=subscription_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_id: Optional[pulumi.Input[str]] = None, + automation_account_name: Optional[pulumi.Input[str]] = None, + certificate_thumbprint: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_id is None and 'applicationId' in kwargs: + application_id = kwargs['applicationId'] + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if certificate_thumbprint is None and 'certificateThumbprint' in kwargs: + certificate_thumbprint = kwargs['certificateThumbprint'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if application_id is not None: - pulumi.set(__self__, "application_id", application_id) + _setter("application_id", application_id) if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if certificate_thumbprint is not None: - pulumi.set(__self__, "certificate_thumbprint", certificate_thumbprint) + _setter("certificate_thumbprint", certificate_thumbprint) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="applicationId") @@ -382,6 +468,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConnectionServicePrincipalArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/connection_type.py b/sdk/python/pulumi_azure/automation/connection_type.py index bffb452ba6..5da077e045 100644 --- a/sdk/python/pulumi_azure/automation/connection_type.py +++ b/sdk/python/pulumi_azure/automation/connection_type.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,13 +29,44 @@ def __init__(__self__, *, :param pulumi.Input[bool] is_global: Whether the connection type is global. Changing this forces a new Automation to be created. :param pulumi.Input[str] name: The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "fields", fields) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ConnectionTypeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + fields=fields, + resource_group_name=resource_group_name, + is_global=is_global, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + fields: Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionTypeFieldArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + is_global: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if fields is None: + raise TypeError("Missing 'fields' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if is_global is None and 'isGlobal' in kwargs: + is_global = kwargs['isGlobal'] + + _setter("automation_account_name", automation_account_name) + _setter("fields", fields) + _setter("resource_group_name", resource_group_name) if is_global is not None: - pulumi.set(__self__, "is_global", is_global) + _setter("is_global", is_global) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="automationAccountName") @@ -114,16 +145,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created. """ + _ConnectionTypeState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + fields=fields, + is_global=is_global, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + fields: Optional[pulumi.Input[Sequence[pulumi.Input['ConnectionTypeFieldArgs']]]] = None, + is_global: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if is_global is None and 'isGlobal' in kwargs: + is_global = kwargs['isGlobal'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if fields is not None: - pulumi.set(__self__, "fields", fields) + _setter("fields", fields) if is_global is not None: - pulumi.set(__self__, "is_global", is_global) + _setter("is_global", is_global) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="automationAccountName") @@ -285,6 +341,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConnectionTypeArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/credential.py b/sdk/python/pulumi_azure/automation/credential.py index 1bd8907180..7646796464 100644 --- a/sdk/python/pulumi_azure/automation/credential.py +++ b/sdk/python/pulumi_azure/automation/credential.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CredentialArgs', 'Credential'] @@ -29,14 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description associated with this Automation Credential. :param pulumi.Input[str] name: Specifies the name of the Credential. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "username", username) + CredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + password=password, + resource_group_name=resource_group_name, + username=username, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("automation_account_name", automation_account_name) + _setter("password", password) + _setter("resource_group_name", resource_group_name) + _setter("username", username) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="automationAccountName") @@ -129,18 +162,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Credential is created. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The username associated with this Automation Credential. """ + _CredentialState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + description=description, + name=name, + password=password, + resource_group_name=resource_group_name, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="automationAccountName") @@ -312,6 +370,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CredentialArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/date_time_variable.py b/sdk/python/pulumi_azure/automation/date_time_variable.py index 0d2166cbbe..fc53773a4f 100644 --- a/sdk/python/pulumi_azure/automation/date_time_variable.py +++ b/sdk/python/pulumi_azure/automation/date_time_variable.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DateTimeVariableArgs', 'DateTimeVariable'] @@ -29,16 +29,45 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Automation Variable. Changing this forces a new resource to be created. :param pulumi.Input[str] value: The value of the Automation Variable in the [RFC3339 Section 5.6 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6). """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + DateTimeVariableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + resource_group_name=resource_group_name, + description=description, + encrypted=encrypted, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encrypted: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("automation_account_name", automation_account_name) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encrypted is not None: - pulumi.set(__self__, "encrypted", encrypted) + _setter("encrypted", encrypted) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="automationAccountName") @@ -131,18 +160,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created. :param pulumi.Input[str] value: The value of the Automation Variable in the [RFC3339 Section 5.6 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6). """ + _DateTimeVariableState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + description=description, + encrypted=encrypted, + name=name, + resource_group_name=resource_group_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encrypted: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encrypted is not None: - pulumi.set(__self__, "encrypted", encrypted) + _setter("encrypted", encrypted) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="automationAccountName") @@ -310,6 +364,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DateTimeVariableArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/dsc_configuration.py b/sdk/python/pulumi_azure/automation/dsc_configuration.py index a73634a3ed..775c6b429e 100644 --- a/sdk/python/pulumi_azure/automation/dsc_configuration.py +++ b/sdk/python/pulumi_azure/automation/dsc_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DscConfigurationArgs', 'DscConfiguration'] @@ -33,19 +33,58 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the DSC Configuration. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "content_embedded", content_embedded) - pulumi.set(__self__, "resource_group_name", resource_group_name) + DscConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + content_embedded=content_embedded, + resource_group_name=resource_group_name, + description=description, + location=location, + log_verbose=log_verbose, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + content_embedded: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + log_verbose: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if content_embedded is None and 'contentEmbedded' in kwargs: + content_embedded = kwargs['contentEmbedded'] + if content_embedded is None: + raise TypeError("Missing 'content_embedded' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if log_verbose is None and 'logVerbose' in kwargs: + log_verbose = kwargs['logVerbose'] + + _setter("automation_account_name", automation_account_name) + _setter("content_embedded", content_embedded) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if log_verbose is not None: - pulumi.set(__self__, "log_verbose", log_verbose) + _setter("log_verbose", log_verbose) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="automationAccountName") @@ -167,24 +206,59 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the DSC Configuration is created. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _DscConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + content_embedded=content_embedded, + description=description, + location=location, + log_verbose=log_verbose, + name=name, + resource_group_name=resource_group_name, + state=state, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + content_embedded: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + log_verbose: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + state: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if content_embedded is None and 'contentEmbedded' in kwargs: + content_embedded = kwargs['contentEmbedded'] + if log_verbose is None and 'logVerbose' in kwargs: + log_verbose = kwargs['logVerbose'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if content_embedded is not None: - pulumi.set(__self__, "content_embedded", content_embedded) + _setter("content_embedded", content_embedded) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if log_verbose is not None: - pulumi.set(__self__, "log_verbose", log_verbose) + _setter("log_verbose", log_verbose) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="automationAccountName") @@ -391,6 +465,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DscConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/dsc_node_configuration.py b/sdk/python/pulumi_azure/automation/dsc_node_configuration.py index ede8da0609..416bbe2790 100644 --- a/sdk/python/pulumi_azure/automation/dsc_node_configuration.py +++ b/sdk/python/pulumi_azure/automation/dsc_node_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DscNodeConfigurationArgs', 'DscNodeConfiguration'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "content_embedded", content_embedded) - pulumi.set(__self__, "resource_group_name", resource_group_name) + DscNodeConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + content_embedded=content_embedded, + resource_group_name=resource_group_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + content_embedded: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if content_embedded is None and 'contentEmbedded' in kwargs: + content_embedded = kwargs['contentEmbedded'] + if content_embedded is None: + raise TypeError("Missing 'content_embedded' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("automation_account_name", automation_account_name) + _setter("content_embedded", content_embedded) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="automationAccountName") @@ -95,16 +124,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created. """ + _DscNodeConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + configuration_name=configuration_name, + content_embedded=content_embedded, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + configuration_name: Optional[pulumi.Input[str]] = None, + content_embedded: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if configuration_name is None and 'configurationName' in kwargs: + configuration_name = kwargs['configurationName'] + if content_embedded is None and 'contentEmbedded' in kwargs: + content_embedded = kwargs['contentEmbedded'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if configuration_name is not None: - pulumi.set(__self__, "configuration_name", configuration_name) + _setter("configuration_name", configuration_name) if content_embedded is not None: - pulumi.set(__self__, "content_embedded", content_embedded) + _setter("content_embedded", content_embedded) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="automationAccountName") @@ -307,6 +363,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DscNodeConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/get_account.py b/sdk/python/pulumi_azure/automation/get_account.py index dfea52f826..3bd12173a2 100644 --- a/sdk/python/pulumi_azure/automation/get_account.py +++ b/sdk/python/pulumi_azure/automation/get_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/automation/get_bool_variable.py b/sdk/python/pulumi_azure/automation/get_bool_variable.py index d1d637ec84..99a4391e05 100644 --- a/sdk/python/pulumi_azure/automation/get_bool_variable.py +++ b/sdk/python/pulumi_azure/automation/get_bool_variable.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/automation/get_date_time_variable.py b/sdk/python/pulumi_azure/automation/get_date_time_variable.py index 3c06e87ef6..bafaa62e1c 100644 --- a/sdk/python/pulumi_azure/automation/get_date_time_variable.py +++ b/sdk/python/pulumi_azure/automation/get_date_time_variable.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/automation/get_int_variable.py b/sdk/python/pulumi_azure/automation/get_int_variable.py index d5cf1b2eaf..324a8215c4 100644 --- a/sdk/python/pulumi_azure/automation/get_int_variable.py +++ b/sdk/python/pulumi_azure/automation/get_int_variable.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/automation/get_string_variable.py b/sdk/python/pulumi_azure/automation/get_string_variable.py index ef591af022..58f0a2d586 100644 --- a/sdk/python/pulumi_azure/automation/get_string_variable.py +++ b/sdk/python/pulumi_azure/automation/get_string_variable.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/automation/get_variable_object.py b/sdk/python/pulumi_azure/automation/get_variable_object.py index f5935506ae..96167e2295 100644 --- a/sdk/python/pulumi_azure/automation/get_variable_object.py +++ b/sdk/python/pulumi_azure/automation/get_variable_object.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/automation/get_variables.py b/sdk/python/pulumi_azure/automation/get_variables.py index acdec8b055..e2e91e8d8a 100644 --- a/sdk/python/pulumi_azure/automation/get_variables.py +++ b/sdk/python/pulumi_azure/automation/get_variables.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/automation/hybrid_runbook_worker.py b/sdk/python/pulumi_azure/automation/hybrid_runbook_worker.py index bc5c061da6..94b8070bde 100644 --- a/sdk/python/pulumi_azure/automation/hybrid_runbook_worker.py +++ b/sdk/python/pulumi_azure/automation/hybrid_runbook_worker.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['HybridRunbookWorkerArgs', 'HybridRunbookWorker'] @@ -27,11 +27,50 @@ def __init__(__self__, *, :param pulumi.Input[str] worker_group_name: The name of the HybridWorker Group. Changing this forces a new Automation to be created. :param pulumi.Input[str] worker_id: Specify the ID of this HybridWorker in UUID notation. Changing this forces a new Automation to be created. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "vm_resource_id", vm_resource_id) - pulumi.set(__self__, "worker_group_name", worker_group_name) - pulumi.set(__self__, "worker_id", worker_id) + HybridRunbookWorkerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + resource_group_name=resource_group_name, + vm_resource_id=vm_resource_id, + worker_group_name=worker_group_name, + worker_id=worker_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + vm_resource_id: Optional[pulumi.Input[str]] = None, + worker_group_name: Optional[pulumi.Input[str]] = None, + worker_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if vm_resource_id is None and 'vmResourceId' in kwargs: + vm_resource_id = kwargs['vmResourceId'] + if vm_resource_id is None: + raise TypeError("Missing 'vm_resource_id' argument") + if worker_group_name is None and 'workerGroupName' in kwargs: + worker_group_name = kwargs['workerGroupName'] + if worker_group_name is None: + raise TypeError("Missing 'worker_group_name' argument") + if worker_id is None and 'workerId' in kwargs: + worker_id = kwargs['workerId'] + if worker_id is None: + raise TypeError("Missing 'worker_id' argument") + + _setter("automation_account_name", automation_account_name) + _setter("resource_group_name", resource_group_name) + _setter("vm_resource_id", vm_resource_id) + _setter("worker_group_name", worker_group_name) + _setter("worker_id", worker_id) @property @pulumi.getter(name="automationAccountName") @@ -120,26 +159,73 @@ def __init__(__self__, *, :param pulumi.Input[str] worker_name: The name of HybridWorker. :param pulumi.Input[str] worker_type: The type of the HybridWorker, the possible values are `HybridV1` and `HybridV2`. """ + _HybridRunbookWorkerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + ip=ip, + last_seen_date_time=last_seen_date_time, + registration_date_time=registration_date_time, + resource_group_name=resource_group_name, + vm_resource_id=vm_resource_id, + worker_group_name=worker_group_name, + worker_id=worker_id, + worker_name=worker_name, + worker_type=worker_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + ip: Optional[pulumi.Input[str]] = None, + last_seen_date_time: Optional[pulumi.Input[str]] = None, + registration_date_time: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + vm_resource_id: Optional[pulumi.Input[str]] = None, + worker_group_name: Optional[pulumi.Input[str]] = None, + worker_id: Optional[pulumi.Input[str]] = None, + worker_name: Optional[pulumi.Input[str]] = None, + worker_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if last_seen_date_time is None and 'lastSeenDateTime' in kwargs: + last_seen_date_time = kwargs['lastSeenDateTime'] + if registration_date_time is None and 'registrationDateTime' in kwargs: + registration_date_time = kwargs['registrationDateTime'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if vm_resource_id is None and 'vmResourceId' in kwargs: + vm_resource_id = kwargs['vmResourceId'] + if worker_group_name is None and 'workerGroupName' in kwargs: + worker_group_name = kwargs['workerGroupName'] + if worker_id is None and 'workerId' in kwargs: + worker_id = kwargs['workerId'] + if worker_name is None and 'workerName' in kwargs: + worker_name = kwargs['workerName'] + if worker_type is None and 'workerType' in kwargs: + worker_type = kwargs['workerType'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if ip is not None: - pulumi.set(__self__, "ip", ip) + _setter("ip", ip) if last_seen_date_time is not None: - pulumi.set(__self__, "last_seen_date_time", last_seen_date_time) + _setter("last_seen_date_time", last_seen_date_time) if registration_date_time is not None: - pulumi.set(__self__, "registration_date_time", registration_date_time) + _setter("registration_date_time", registration_date_time) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if vm_resource_id is not None: - pulumi.set(__self__, "vm_resource_id", vm_resource_id) + _setter("vm_resource_id", vm_resource_id) if worker_group_name is not None: - pulumi.set(__self__, "worker_group_name", worker_group_name) + _setter("worker_group_name", worker_group_name) if worker_id is not None: - pulumi.set(__self__, "worker_id", worker_id) + _setter("worker_id", worker_id) if worker_name is not None: - pulumi.set(__self__, "worker_name", worker_name) + _setter("worker_name", worker_name) if worker_type is not None: - pulumi.set(__self__, "worker_type", worker_type) + _setter("worker_type", worker_type) @property @pulumi.getter(name="automationAccountName") @@ -433,6 +519,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HybridRunbookWorkerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/hybrid_runbook_worker_group.py b/sdk/python/pulumi_azure/automation/hybrid_runbook_worker_group.py index f545f65080..017387b9bb 100644 --- a/sdk/python/pulumi_azure/automation/hybrid_runbook_worker_group.py +++ b/sdk/python/pulumi_azure/automation/hybrid_runbook_worker_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['HybridRunbookWorkerGroupArgs', 'HybridRunbookWorkerGroup'] @@ -25,12 +25,39 @@ def __init__(__self__, *, :param pulumi.Input[str] credential_name: The name of resource type `automation.Credential` to use for hybrid worker. :param pulumi.Input[str] name: The name which should be used for this Automation Account Runbook Worker Group. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + HybridRunbookWorkerGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + resource_group_name=resource_group_name, + credential_name=credential_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + credential_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if credential_name is None and 'credentialName' in kwargs: + credential_name = kwargs['credentialName'] + + _setter("automation_account_name", automation_account_name) + _setter("resource_group_name", resource_group_name) if credential_name is not None: - pulumi.set(__self__, "credential_name", credential_name) + _setter("credential_name", credential_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="automationAccountName") @@ -95,14 +122,37 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Automation Account Runbook Worker Group. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created. """ + _HybridRunbookWorkerGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + credential_name=credential_name, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + credential_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if credential_name is None and 'credentialName' in kwargs: + credential_name = kwargs['credentialName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if credential_name is not None: - pulumi.set(__self__, "credential_name", credential_name) + _setter("credential_name", credential_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="automationAccountName") @@ -240,6 +290,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HybridRunbookWorkerGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/int_variable.py b/sdk/python/pulumi_azure/automation/int_variable.py index 1d586b67e8..79ee351b71 100644 --- a/sdk/python/pulumi_azure/automation/int_variable.py +++ b/sdk/python/pulumi_azure/automation/int_variable.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IntVariableArgs', 'IntVariable'] @@ -29,16 +29,45 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Automation Variable. Changing this forces a new resource to be created. :param pulumi.Input[int] value: The value of the Automation Variable as a `integer`. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IntVariableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + resource_group_name=resource_group_name, + description=description, + encrypted=encrypted, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encrypted: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("automation_account_name", automation_account_name) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encrypted is not None: - pulumi.set(__self__, "encrypted", encrypted) + _setter("encrypted", encrypted) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="automationAccountName") @@ -131,18 +160,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created. :param pulumi.Input[int] value: The value of the Automation Variable as a `integer`. """ + _IntVariableState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + description=description, + encrypted=encrypted, + name=name, + resource_group_name=resource_group_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encrypted: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encrypted is not None: - pulumi.set(__self__, "encrypted", encrypted) + _setter("encrypted", encrypted) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="automationAccountName") @@ -310,6 +364,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntVariableArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/job_schedule.py b/sdk/python/pulumi_azure/automation/job_schedule.py index 7393256041..68f44e5b3e 100644 --- a/sdk/python/pulumi_azure/automation/job_schedule.py +++ b/sdk/python/pulumi_azure/automation/job_schedule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['JobScheduleArgs', 'JobSchedule'] @@ -33,16 +33,59 @@ def __init__(__self__, *, > **NOTE:** The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation. :param pulumi.Input[str] run_on: Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "runbook_name", runbook_name) - pulumi.set(__self__, "schedule_name", schedule_name) + JobScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + resource_group_name=resource_group_name, + runbook_name=runbook_name, + schedule_name=schedule_name, + job_schedule_id=job_schedule_id, + parameters=parameters, + run_on=run_on, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + runbook_name: Optional[pulumi.Input[str]] = None, + schedule_name: Optional[pulumi.Input[str]] = None, + job_schedule_id: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + run_on: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if runbook_name is None and 'runbookName' in kwargs: + runbook_name = kwargs['runbookName'] + if runbook_name is None: + raise TypeError("Missing 'runbook_name' argument") + if schedule_name is None and 'scheduleName' in kwargs: + schedule_name = kwargs['scheduleName'] + if schedule_name is None: + raise TypeError("Missing 'schedule_name' argument") + if job_schedule_id is None and 'jobScheduleId' in kwargs: + job_schedule_id = kwargs['jobScheduleId'] + if run_on is None and 'runOn' in kwargs: + run_on = kwargs['runOn'] + + _setter("automation_account_name", automation_account_name) + _setter("resource_group_name", resource_group_name) + _setter("runbook_name", runbook_name) + _setter("schedule_name", schedule_name) if job_schedule_id is not None: - pulumi.set(__self__, "job_schedule_id", job_schedule_id) + _setter("job_schedule_id", job_schedule_id) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if run_on is not None: - pulumi.set(__self__, "run_on", run_on) + _setter("run_on", run_on) @property @pulumi.getter(name="automationAccountName") @@ -153,20 +196,55 @@ def __init__(__self__, *, :param pulumi.Input[str] runbook_name: The name of a Runbook to link to a Schedule. It needs to be in the same Automation Account as the Schedule and Job Schedule. Changing this forces a new resource to be created. :param pulumi.Input[str] schedule_name: The name of the Schedule. Changing this forces a new resource to be created. """ + _JobScheduleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + job_schedule_id=job_schedule_id, + parameters=parameters, + resource_group_name=resource_group_name, + run_on=run_on, + runbook_name=runbook_name, + schedule_name=schedule_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + job_schedule_id: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + run_on: Optional[pulumi.Input[str]] = None, + runbook_name: Optional[pulumi.Input[str]] = None, + schedule_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if job_schedule_id is None and 'jobScheduleId' in kwargs: + job_schedule_id = kwargs['jobScheduleId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if run_on is None and 'runOn' in kwargs: + run_on = kwargs['runOn'] + if runbook_name is None and 'runbookName' in kwargs: + runbook_name = kwargs['runbookName'] + if schedule_name is None and 'scheduleName' in kwargs: + schedule_name = kwargs['scheduleName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if job_schedule_id is not None: - pulumi.set(__self__, "job_schedule_id", job_schedule_id) + _setter("job_schedule_id", job_schedule_id) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if run_on is not None: - pulumi.set(__self__, "run_on", run_on) + _setter("run_on", run_on) if runbook_name is not None: - pulumi.set(__self__, "runbook_name", runbook_name) + _setter("runbook_name", runbook_name) if schedule_name is not None: - pulumi.set(__self__, "schedule_name", schedule_name) + _setter("schedule_name", schedule_name) @property @pulumi.getter(name="automationAccountName") @@ -356,6 +434,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + JobScheduleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/module.py b/sdk/python/pulumi_azure/automation/module.py index 6069872951..bfb86ecf79 100644 --- a/sdk/python/pulumi_azure/automation/module.py +++ b/sdk/python/pulumi_azure/automation/module.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,11 +27,40 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Module is created. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the Module. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "module_link", module_link) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ModuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + module_link=module_link, + resource_group_name=resource_group_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + module_link: Optional[pulumi.Input['ModuleModuleLinkArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if module_link is None and 'moduleLink' in kwargs: + module_link = kwargs['moduleLink'] + if module_link is None: + raise TypeError("Missing 'module_link' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("automation_account_name", automation_account_name) + _setter("module_link", module_link) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="automationAccountName") @@ -96,14 +125,37 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Module. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Module is created. Changing this forces a new resource to be created. """ + _ModuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + module_link=module_link, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + module_link: Optional[pulumi.Input['ModuleModuleLinkArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if module_link is None and 'moduleLink' in kwargs: + module_link = kwargs['moduleLink'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if module_link is not None: - pulumi.set(__self__, "module_link", module_link) + _setter("module_link", module_link) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="automationAccountName") @@ -247,6 +299,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ModuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -268,6 +324,11 @@ def _internal_init(__self__, if automation_account_name is None and not opts.urn: raise TypeError("Missing required property 'automation_account_name'") __props__.__dict__["automation_account_name"] = automation_account_name + if module_link is not None and not isinstance(module_link, ModuleModuleLinkArgs): + module_link = module_link or {} + def _setter(key, value): + module_link[key] = value + ModuleModuleLinkArgs._configure(_setter, **module_link) if module_link is None and not opts.urn: raise TypeError("Missing required property 'module_link'") __props__.__dict__["module_link"] = module_link diff --git a/sdk/python/pulumi_azure/automation/outputs.py b/sdk/python/pulumi_azure/automation/outputs.py index 4703c37d35..b492793ad6 100644 --- a/sdk/python/pulumi_azure/automation/outputs.py +++ b/sdk/python/pulumi_azure/automation/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -78,11 +78,34 @@ def __init__(__self__, *, :param str key_vault_key_id: The ID of the Key Vault Key which should be used to Encrypt the data in this Automation Account. :param str user_assigned_identity_id: The User Assigned Managed Identity ID to be used for accessing the Customer Managed Key for encryption. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + AccountEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + key_source=key_source, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[str] = None, + key_source: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if key_source is None and 'keySource' in kwargs: + key_source = kwargs['keySource'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + + _setter("key_vault_key_id", key_vault_key_id) if key_source is not None: - pulumi.set(__self__, "key_source", key_source) + _setter("key_source", key_source) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -145,13 +168,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + AccountIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -197,10 +245,23 @@ def __init__(__self__, *, :param str id: The ID of the Automation Account. :param str name: Specifies the name of the Automation Account. Changing this forces a new resource to be created. """ + AccountPrivateEndpointConnection._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -251,12 +312,37 @@ def __init__(__self__, *, :param bool is_encrypted: Whether to set the isEncrypted flag of the connection field definition. :param bool is_optional: Whether to set the isOptional flag of the connection field definition. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ConnectionTypeField._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + is_encrypted=is_encrypted, + is_optional=is_optional, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + is_encrypted: Optional[bool] = None, + is_optional: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if is_encrypted is None and 'isEncrypted' in kwargs: + is_encrypted = kwargs['isEncrypted'] + if is_optional is None and 'isOptional' in kwargs: + is_optional = kwargs['isOptional'] + + _setter("name", name) + _setter("type", type) if is_encrypted is not None: - pulumi.set(__self__, "is_encrypted", is_encrypted) + _setter("is_encrypted", is_encrypted) if is_optional is not None: - pulumi.set(__self__, "is_optional", is_optional) + _setter("is_optional", is_optional) @property @pulumi.getter @@ -300,9 +386,24 @@ def __init__(__self__, *, :param str uri: The URI of the module content (zip or nupkg). :param 'ModuleModuleLinkHashArgs' hash: A `hash` block as defined below. """ - pulumi.set(__self__, "uri", uri) + ModuleModuleLink._configure( + lambda key, value: pulumi.set(__self__, key, value), + uri=uri, + hash=hash, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + uri: Optional[str] = None, + hash: Optional['outputs.ModuleModuleLinkHash'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("uri", uri) if hash is not None: - pulumi.set(__self__, "hash", hash) + _setter("hash", hash) @property @pulumi.getter @@ -330,8 +431,25 @@ def __init__(__self__, *, :param str algorithm: Specifies the algorithm used for the hash content. :param str value: The hash value of the content. """ - pulumi.set(__self__, "algorithm", algorithm) - pulumi.set(__self__, "value", value) + ModuleModuleLinkHash._configure( + lambda key, value: pulumi.set(__self__, key, value), + algorithm=algorithm, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + algorithm: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if algorithm is None: + raise TypeError("Missing 'algorithm' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("algorithm", algorithm) + _setter("value", value) @property @pulumi.getter @@ -390,18 +508,49 @@ def __init__(__self__, *, :param Sequence[str] output_types: Specifies the output types of the runbook. :param Sequence['RunBookDraftParameterArgs'] parameters: A list of `parameters` block as defined below. """ + RunBookDraft._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_link=content_link, + creation_time=creation_time, + edit_mode_enabled=edit_mode_enabled, + last_modified_time=last_modified_time, + output_types=output_types, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_link: Optional['outputs.RunBookDraftContentLink'] = None, + creation_time: Optional[str] = None, + edit_mode_enabled: Optional[bool] = None, + last_modified_time: Optional[str] = None, + output_types: Optional[Sequence[str]] = None, + parameters: Optional[Sequence['outputs.RunBookDraftParameter']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_link is None and 'contentLink' in kwargs: + content_link = kwargs['contentLink'] + if creation_time is None and 'creationTime' in kwargs: + creation_time = kwargs['creationTime'] + if edit_mode_enabled is None and 'editModeEnabled' in kwargs: + edit_mode_enabled = kwargs['editModeEnabled'] + if last_modified_time is None and 'lastModifiedTime' in kwargs: + last_modified_time = kwargs['lastModifiedTime'] + if output_types is None and 'outputTypes' in kwargs: + output_types = kwargs['outputTypes'] + if content_link is not None: - pulumi.set(__self__, "content_link", content_link) + _setter("content_link", content_link) if creation_time is not None: - pulumi.set(__self__, "creation_time", creation_time) + _setter("creation_time", creation_time) if edit_mode_enabled is not None: - pulumi.set(__self__, "edit_mode_enabled", edit_mode_enabled) + _setter("edit_mode_enabled", edit_mode_enabled) if last_modified_time is not None: - pulumi.set(__self__, "last_modified_time", last_modified_time) + _setter("last_modified_time", last_modified_time) if output_types is not None: - pulumi.set(__self__, "output_types", output_types) + _setter("output_types", output_types) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="contentLink") @@ -457,11 +606,28 @@ def __init__(__self__, *, :param 'RunBookDraftContentLinkHashArgs' hash: A `hash` block as defined below. :param str version: Specifies the version of the content """ - pulumi.set(__self__, "uri", uri) + RunBookDraftContentLink._configure( + lambda key, value: pulumi.set(__self__, key, value), + uri=uri, + hash=hash, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + uri: Optional[str] = None, + hash: Optional['outputs.RunBookDraftContentLinkHash'] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("uri", uri) if hash is not None: - pulumi.set(__self__, "hash", hash) + _setter("hash", hash) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -497,8 +663,25 @@ def __init__(__self__, *, :param str algorithm: Specifies the hash algorithm used to hash the content. :param str value: Specifies the expected hash value of the content. """ - pulumi.set(__self__, "algorithm", algorithm) - pulumi.set(__self__, "value", value) + RunBookDraftContentLinkHash._configure( + lambda key, value: pulumi.set(__self__, key, value), + algorithm=algorithm, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + algorithm: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if algorithm is None: + raise TypeError("Missing 'algorithm' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("algorithm", algorithm) + _setter("value", value) @property @pulumi.getter @@ -549,14 +732,39 @@ def __init__(__self__, *, :param bool mandatory: Whether this parameter is mandatory. :param int position: Specifies the position of the parameter. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "type", type) + RunBookDraftParameter._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + type=type, + default_value=default_value, + mandatory=mandatory, + position=position, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + type: Optional[str] = None, + default_value: Optional[str] = None, + mandatory: Optional[bool] = None, + position: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_value is None and 'defaultValue' in kwargs: + default_value = kwargs['defaultValue'] + + _setter("key", key) + _setter("type", type) if default_value is not None: - pulumi.set(__self__, "default_value", default_value) + _setter("default_value", default_value) if mandatory is not None: - pulumi.set(__self__, "mandatory", mandatory) + _setter("mandatory", mandatory) if position is not None: - pulumi.set(__self__, "position", position) + _setter("position", position) @property @pulumi.getter @@ -630,13 +838,38 @@ def __init__(__self__, *, """ :param Mapping[str, str] parameters: A list of `parameters` block as defined below. """ - pulumi.set(__self__, "schedule_name", schedule_name) + RunBookJobSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + schedule_name=schedule_name, + job_schedule_id=job_schedule_id, + parameters=parameters, + run_on=run_on, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schedule_name: Optional[str] = None, + job_schedule_id: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + run_on: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schedule_name is None and 'scheduleName' in kwargs: + schedule_name = kwargs['scheduleName'] + if schedule_name is None: + raise TypeError("Missing 'schedule_name' argument") + if job_schedule_id is None and 'jobScheduleId' in kwargs: + job_schedule_id = kwargs['jobScheduleId'] + if run_on is None and 'runOn' in kwargs: + run_on = kwargs['runOn'] + + _setter("schedule_name", schedule_name) if job_schedule_id is not None: - pulumi.set(__self__, "job_schedule_id", job_schedule_id) + _setter("job_schedule_id", job_schedule_id) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if run_on is not None: - pulumi.set(__self__, "run_on", run_on) + _setter("run_on", run_on) @property @pulumi.getter(name="scheduleName") @@ -673,11 +906,28 @@ def __init__(__self__, *, :param 'RunBookPublishContentLinkHashArgs' hash: A `hash` block as defined below. :param str version: Specifies the version of the content """ - pulumi.set(__self__, "uri", uri) + RunBookPublishContentLink._configure( + lambda key, value: pulumi.set(__self__, key, value), + uri=uri, + hash=hash, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + uri: Optional[str] = None, + hash: Optional['outputs.RunBookPublishContentLinkHash'] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("uri", uri) if hash is not None: - pulumi.set(__self__, "hash", hash) + _setter("hash", hash) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -713,8 +963,25 @@ def __init__(__self__, *, :param str algorithm: Specifies the hash algorithm used to hash the content. :param str value: Specifies the expected hash value of the content. """ - pulumi.set(__self__, "algorithm", algorithm) - pulumi.set(__self__, "value", value) + RunBookPublishContentLinkHash._configure( + lambda key, value: pulumi.set(__self__, key, value), + algorithm=algorithm, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + algorithm: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if algorithm is None: + raise TypeError("Missing 'algorithm' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("algorithm", algorithm) + _setter("value", value) @property @pulumi.getter @@ -742,8 +1009,25 @@ def __init__(__self__, *, :param str day: Day of the occurrence. Must be one of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`. :param int occurrence: Occurrence of the week within the month. Must be between `1` and `5`. `-1` for last week within the month. """ - pulumi.set(__self__, "day", day) - pulumi.set(__self__, "occurrence", occurrence) + ScheduleMonthlyOccurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + day=day, + occurrence=occurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day: Optional[str] = None, + occurrence: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day is None: + raise TypeError("Missing 'day' argument") + if occurrence is None: + raise TypeError("Missing 'occurrence' argument") + + _setter("day", day) + _setter("occurrence", occurrence) @property @pulumi.getter @@ -799,16 +1083,43 @@ def __init__(__self__, *, :param Sequence[str] included_packages: Specifies a list of packages to included from the Software Update Configuration. :param str reboot: Specifies the reboot settings after software update, possible values are `IfRequired`, `Never`, `RebootOnly` and `Always`. Defaults to `IfRequired`. """ + SoftwareUpdateConfigurationLinux._configure( + lambda key, value: pulumi.set(__self__, key, value), + classification_included=classification_included, + classifications_includeds=classifications_includeds, + excluded_packages=excluded_packages, + included_packages=included_packages, + reboot=reboot, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + classification_included: Optional[str] = None, + classifications_includeds: Optional[Sequence[str]] = None, + excluded_packages: Optional[Sequence[str]] = None, + included_packages: Optional[Sequence[str]] = None, + reboot: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if classification_included is None and 'classificationIncluded' in kwargs: + classification_included = kwargs['classificationIncluded'] + if classifications_includeds is None and 'classificationsIncludeds' in kwargs: + classifications_includeds = kwargs['classificationsIncludeds'] + if excluded_packages is None and 'excludedPackages' in kwargs: + excluded_packages = kwargs['excludedPackages'] + if included_packages is None and 'includedPackages' in kwargs: + included_packages = kwargs['includedPackages'] + if classification_included is not None: - pulumi.set(__self__, "classification_included", classification_included) + _setter("classification_included", classification_included) if classifications_includeds is not None: - pulumi.set(__self__, "classifications_includeds", classifications_includeds) + _setter("classifications_includeds", classifications_includeds) if excluded_packages is not None: - pulumi.set(__self__, "excluded_packages", excluded_packages) + _setter("excluded_packages", excluded_packages) if included_packages is not None: - pulumi.set(__self__, "included_packages", included_packages) + _setter("included_packages", included_packages) if reboot is not None: - pulumi.set(__self__, "reboot", reboot) + _setter("reboot", reboot) @property @pulumi.getter(name="classificationIncluded") @@ -857,10 +1168,23 @@ def __init__(__self__, *, :param Mapping[str, str] parameters: Specifies a map of parameters for the task. :param str source: The name of the runbook for the post task. """ + SoftwareUpdateConfigurationPostTask._configure( + lambda key, value: pulumi.set(__self__, key, value), + parameters=parameters, + source=source, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + parameters: Optional[Mapping[str, str]] = None, + source: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) @property @pulumi.getter @@ -888,10 +1212,23 @@ def __init__(__self__, *, :param Mapping[str, str] parameters: Specifies a map of parameters for the task. :param str source: The name of the runbook for the pre task. """ + SoftwareUpdateConfigurationPreTask._configure( + lambda key, value: pulumi.set(__self__, key, value), + parameters=parameters, + source=source, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + parameters: Optional[Mapping[str, str]] = None, + source: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) @property @pulumi.getter @@ -982,37 +1319,106 @@ def __init__(__self__, *, :param str start_time: Start time of the schedule. Must be at least five minutes in the future. Defaults to seven minutes in the future from the time the resource is created. :param str time_zone: The timezone of the start time. Defaults to `Etc/UTC`. For possible values see: """ - pulumi.set(__self__, "frequency", frequency) + SoftwareUpdateConfigurationSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency=frequency, + advanced_month_days=advanced_month_days, + advanced_week_days=advanced_week_days, + creation_time=creation_time, + description=description, + expiry_time=expiry_time, + expiry_time_offset_minutes=expiry_time_offset_minutes, + interval=interval, + is_enabled=is_enabled, + last_modified_time=last_modified_time, + monthly_occurrences=monthly_occurrences, + next_run=next_run, + next_run_offset_minutes=next_run_offset_minutes, + start_time=start_time, + start_time_offset_minutes=start_time_offset_minutes, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency: Optional[str] = None, + advanced_month_days: Optional[Sequence[int]] = None, + advanced_week_days: Optional[Sequence[str]] = None, + creation_time: Optional[str] = None, + description: Optional[str] = None, + expiry_time: Optional[str] = None, + expiry_time_offset_minutes: Optional[float] = None, + interval: Optional[int] = None, + is_enabled: Optional[bool] = None, + last_modified_time: Optional[str] = None, + monthly_occurrences: Optional[Sequence['outputs.SoftwareUpdateConfigurationScheduleMonthlyOccurrence']] = None, + next_run: Optional[str] = None, + next_run_offset_minutes: Optional[float] = None, + start_time: Optional[str] = None, + start_time_offset_minutes: Optional[float] = None, + time_zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if advanced_month_days is None and 'advancedMonthDays' in kwargs: + advanced_month_days = kwargs['advancedMonthDays'] + if advanced_week_days is None and 'advancedWeekDays' in kwargs: + advanced_week_days = kwargs['advancedWeekDays'] + if creation_time is None and 'creationTime' in kwargs: + creation_time = kwargs['creationTime'] + if expiry_time is None and 'expiryTime' in kwargs: + expiry_time = kwargs['expiryTime'] + if expiry_time_offset_minutes is None and 'expiryTimeOffsetMinutes' in kwargs: + expiry_time_offset_minutes = kwargs['expiryTimeOffsetMinutes'] + if is_enabled is None and 'isEnabled' in kwargs: + is_enabled = kwargs['isEnabled'] + if last_modified_time is None and 'lastModifiedTime' in kwargs: + last_modified_time = kwargs['lastModifiedTime'] + if monthly_occurrences is None and 'monthlyOccurrences' in kwargs: + monthly_occurrences = kwargs['monthlyOccurrences'] + if next_run is None and 'nextRun' in kwargs: + next_run = kwargs['nextRun'] + if next_run_offset_minutes is None and 'nextRunOffsetMinutes' in kwargs: + next_run_offset_minutes = kwargs['nextRunOffsetMinutes'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time_offset_minutes is None and 'startTimeOffsetMinutes' in kwargs: + start_time_offset_minutes = kwargs['startTimeOffsetMinutes'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + + _setter("frequency", frequency) if advanced_month_days is not None: - pulumi.set(__self__, "advanced_month_days", advanced_month_days) + _setter("advanced_month_days", advanced_month_days) if advanced_week_days is not None: - pulumi.set(__self__, "advanced_week_days", advanced_week_days) + _setter("advanced_week_days", advanced_week_days) if creation_time is not None: - pulumi.set(__self__, "creation_time", creation_time) + _setter("creation_time", creation_time) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if expiry_time is not None: - pulumi.set(__self__, "expiry_time", expiry_time) + _setter("expiry_time", expiry_time) if expiry_time_offset_minutes is not None: - pulumi.set(__self__, "expiry_time_offset_minutes", expiry_time_offset_minutes) + _setter("expiry_time_offset_minutes", expiry_time_offset_minutes) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) if is_enabled is not None: - pulumi.set(__self__, "is_enabled", is_enabled) + _setter("is_enabled", is_enabled) if last_modified_time is not None: - pulumi.set(__self__, "last_modified_time", last_modified_time) + _setter("last_modified_time", last_modified_time) if monthly_occurrences is not None: - pulumi.set(__self__, "monthly_occurrences", monthly_occurrences) + _setter("monthly_occurrences", monthly_occurrences) if next_run is not None: - pulumi.set(__self__, "next_run", next_run) + _setter("next_run", next_run) if next_run_offset_minutes is not None: - pulumi.set(__self__, "next_run_offset_minutes", next_run_offset_minutes) + _setter("next_run_offset_minutes", next_run_offset_minutes) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if start_time_offset_minutes is not None: - pulumi.set(__self__, "start_time_offset_minutes", start_time_offset_minutes) + _setter("start_time_offset_minutes", start_time_offset_minutes) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter @@ -1134,8 +1540,25 @@ def __init__(__self__, *, :param str day: Day of the occurrence. Must be one of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`. :param int occurrence: Occurrence of the week within the month. Must be between `1` and `5`. `-1` for last week within the month. """ - pulumi.set(__self__, "day", day) - pulumi.set(__self__, "occurrence", occurrence) + SoftwareUpdateConfigurationScheduleMonthlyOccurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + day=day, + occurrence=occurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day: Optional[str] = None, + occurrence: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day is None: + raise TypeError("Missing 'day' argument") + if occurrence is None: + raise TypeError("Missing 'occurrence' argument") + + _setter("day", day) + _setter("occurrence", occurrence) @property @pulumi.getter @@ -1182,10 +1605,27 @@ def __init__(__self__, *, :param Sequence['SoftwareUpdateConfigurationTargetAzureQueryArgs'] azure_queries: One or more `azure_query` blocks as defined above. :param Sequence['SoftwareUpdateConfigurationTargetNonAzureQueryArgs'] non_azure_queries: One or more `non_azure_query` blocks as defined above. """ + SoftwareUpdateConfigurationTarget._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_queries=azure_queries, + non_azure_queries=non_azure_queries, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_queries: Optional[Sequence['outputs.SoftwareUpdateConfigurationTargetAzureQuery']] = None, + non_azure_queries: Optional[Sequence['outputs.SoftwareUpdateConfigurationTargetNonAzureQuery']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_queries is None and 'azureQueries' in kwargs: + azure_queries = kwargs['azureQueries'] + if non_azure_queries is None and 'nonAzureQueries' in kwargs: + non_azure_queries = kwargs['nonAzureQueries'] + if azure_queries is not None: - pulumi.set(__self__, "azure_queries", azure_queries) + _setter("azure_queries", azure_queries) if non_azure_queries is not None: - pulumi.set(__self__, "non_azure_queries", non_azure_queries) + _setter("non_azure_queries", non_azure_queries) @property @pulumi.getter(name="azureQueries") @@ -1234,14 +1674,33 @@ def __init__(__self__, *, :param str tag_filter: Specifies how the specified tags to filter VMs. Possible values are `Any` and `All`. :param Sequence['SoftwareUpdateConfigurationTargetAzureQueryTagArgs'] tags: A mapping of tags used for query filter as defined below. """ + SoftwareUpdateConfigurationTargetAzureQuery._configure( + lambda key, value: pulumi.set(__self__, key, value), + locations=locations, + scopes=scopes, + tag_filter=tag_filter, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + locations: Optional[Sequence[str]] = None, + scopes: Optional[Sequence[str]] = None, + tag_filter: Optional[str] = None, + tags: Optional[Sequence['outputs.SoftwareUpdateConfigurationTargetAzureQueryTag']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag_filter is None and 'tagFilter' in kwargs: + tag_filter = kwargs['tagFilter'] + if locations is not None: - pulumi.set(__self__, "locations", locations) + _setter("locations", locations) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if tag_filter is not None: - pulumi.set(__self__, "tag_filter", tag_filter) + _setter("tag_filter", tag_filter) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -1285,8 +1744,25 @@ def __init__(__self__, *, :param str tag: Specifies the name of the tag to filter. :param Sequence[str] values: Specifies a list of values for this tag key. """ - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "values", values) + SoftwareUpdateConfigurationTargetAzureQueryTag._configure( + lambda key, value: pulumi.set(__self__, key, value), + tag=tag, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tag: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag is None: + raise TypeError("Missing 'tag' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("tag", tag) + _setter("values", values) @property @pulumi.getter @@ -1333,10 +1809,27 @@ def __init__(__self__, *, :param str function_alias: Specifies the Log Analytics save search name. :param str workspace_id: The workspace id for Log Analytics in which the saved search in. """ + SoftwareUpdateConfigurationTargetNonAzureQuery._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_alias=function_alias, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_alias: Optional[str] = None, + workspace_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_alias is None and 'functionAlias' in kwargs: + function_alias = kwargs['functionAlias'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if function_alias is not None: - pulumi.set(__self__, "function_alias", function_alias) + _setter("function_alias", function_alias) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="functionAlias") @@ -1392,16 +1885,43 @@ def __init__(__self__, *, :param Sequence[str] included_knowledge_base_numbers: Specifies a list of knowledge base numbers included. :param str reboot: Specifies the reboot settings after software update, possible values are `IfRequired`, `Never`, `RebootOnly` and `Always`. Defaults to `IfRequired`. """ + SoftwareUpdateConfigurationWindows._configure( + lambda key, value: pulumi.set(__self__, key, value), + classification_included=classification_included, + classifications_includeds=classifications_includeds, + excluded_knowledge_base_numbers=excluded_knowledge_base_numbers, + included_knowledge_base_numbers=included_knowledge_base_numbers, + reboot=reboot, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + classification_included: Optional[str] = None, + classifications_includeds: Optional[Sequence[str]] = None, + excluded_knowledge_base_numbers: Optional[Sequence[str]] = None, + included_knowledge_base_numbers: Optional[Sequence[str]] = None, + reboot: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if classification_included is None and 'classificationIncluded' in kwargs: + classification_included = kwargs['classificationIncluded'] + if classifications_includeds is None and 'classificationsIncludeds' in kwargs: + classifications_includeds = kwargs['classificationsIncludeds'] + if excluded_knowledge_base_numbers is None and 'excludedKnowledgeBaseNumbers' in kwargs: + excluded_knowledge_base_numbers = kwargs['excludedKnowledgeBaseNumbers'] + if included_knowledge_base_numbers is None and 'includedKnowledgeBaseNumbers' in kwargs: + included_knowledge_base_numbers = kwargs['includedKnowledgeBaseNumbers'] + if classification_included is not None: - pulumi.set(__self__, "classification_included", classification_included) + _setter("classification_included", classification_included) if classifications_includeds is not None: - pulumi.set(__self__, "classifications_includeds", classifications_includeds) + _setter("classifications_includeds", classifications_includeds) if excluded_knowledge_base_numbers is not None: - pulumi.set(__self__, "excluded_knowledge_base_numbers", excluded_knowledge_base_numbers) + _setter("excluded_knowledge_base_numbers", excluded_knowledge_base_numbers) if included_knowledge_base_numbers is not None: - pulumi.set(__self__, "included_knowledge_base_numbers", included_knowledge_base_numbers) + _setter("included_knowledge_base_numbers", included_knowledge_base_numbers) if reboot is not None: - pulumi.set(__self__, "reboot", reboot) + _setter("reboot", reboot) @property @pulumi.getter(name="classificationIncluded") @@ -1474,10 +1994,33 @@ def __init__(__self__, *, :param str token_type: Specify the token type, possible values are `PersonalAccessToken` and `Oauth`. :param str refresh_token: The refresh token of specified rpeo. """ - pulumi.set(__self__, "token", token) - pulumi.set(__self__, "token_type", token_type) + SourceControlSecurity._configure( + lambda key, value: pulumi.set(__self__, key, value), + token=token, + token_type=token_type, + refresh_token=refresh_token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + token: Optional[str] = None, + token_type: Optional[str] = None, + refresh_token: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if token is None: + raise TypeError("Missing 'token' argument") + if token_type is None and 'tokenType' in kwargs: + token_type = kwargs['tokenType'] + if token_type is None: + raise TypeError("Missing 'token_type' argument") + if refresh_token is None and 'refreshToken' in kwargs: + refresh_token = kwargs['refreshToken'] + + _setter("token", token) + _setter("token_type", token_type) if refresh_token is not None: - pulumi.set(__self__, "refresh_token", refresh_token) + _setter("refresh_token", refresh_token) @property @pulumi.getter @@ -1517,10 +2060,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Automation Account. :param str type: The type of Managed Service Identity that is configured on this Automation Account. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetAccountIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -1564,8 +2138,25 @@ def __init__(__self__, *, :param str id: The ID of the Automation Account :param str name: The name of the Automation Account. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) + GetAccountPrivateEndpointConnectionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("id", id) + _setter("name", name) @property @pulumi.getter @@ -1598,11 +2189,40 @@ def __init__(__self__, *, :param str name: The name of the Automation Variable. :param bool value: The value of the Automation Variable. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "encrypted", encrypted) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetVariablesBoolResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + encrypted=encrypted, + id=id, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + encrypted: Optional[bool] = None, + id: Optional[str] = None, + name: Optional[str] = None, + value: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if encrypted is None: + raise TypeError("Missing 'encrypted' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("description", description) + _setter("encrypted", encrypted) + _setter("id", id) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1656,11 +2276,40 @@ def __init__(__self__, *, :param str name: The name of the Automation Variable. :param str value: The value of the Automation Variable. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "encrypted", encrypted) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetVariablesDatetimeResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + encrypted=encrypted, + id=id, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + encrypted: Optional[bool] = None, + id: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if encrypted is None: + raise TypeError("Missing 'encrypted' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("description", description) + _setter("encrypted", encrypted) + _setter("id", id) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1714,11 +2363,40 @@ def __init__(__self__, *, :param str name: The name of the Automation Variable. :param str value: The value of the Automation Variable. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "encrypted", encrypted) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetVariablesEncryptedResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + encrypted=encrypted, + id=id, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + encrypted: Optional[bool] = None, + id: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if encrypted is None: + raise TypeError("Missing 'encrypted' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("description", description) + _setter("encrypted", encrypted) + _setter("id", id) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1772,11 +2450,40 @@ def __init__(__self__, *, :param str name: The name of the Automation Variable. :param int value: The value of the Automation Variable. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "encrypted", encrypted) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetVariablesIntResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + encrypted=encrypted, + id=id, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + encrypted: Optional[bool] = None, + id: Optional[str] = None, + name: Optional[str] = None, + value: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if encrypted is None: + raise TypeError("Missing 'encrypted' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("description", description) + _setter("encrypted", encrypted) + _setter("id", id) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1830,11 +2537,40 @@ def __init__(__self__, *, :param str name: The name of the Automation Variable. :param str value: The value of the Automation Variable. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "encrypted", encrypted) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetVariablesNullResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + encrypted=encrypted, + id=id, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + encrypted: Optional[bool] = None, + id: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if encrypted is None: + raise TypeError("Missing 'encrypted' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("description", description) + _setter("encrypted", encrypted) + _setter("id", id) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1888,11 +2624,40 @@ def __init__(__self__, *, :param str name: The name of the Automation Variable. :param str value: The value of the Automation Variable. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "encrypted", encrypted) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetVariablesObjectResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + encrypted=encrypted, + id=id, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + encrypted: Optional[bool] = None, + id: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if encrypted is None: + raise TypeError("Missing 'encrypted' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("description", description) + _setter("encrypted", encrypted) + _setter("id", id) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1946,11 +2711,40 @@ def __init__(__self__, *, :param str name: The name of the Automation Variable. :param str value: The value of the Automation Variable. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "encrypted", encrypted) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetVariablesStringResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + encrypted=encrypted, + id=id, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + encrypted: Optional[bool] = None, + id: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if encrypted is None: + raise TypeError("Missing 'encrypted' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("description", description) + _setter("encrypted", encrypted) + _setter("id", id) + _setter("name", name) + _setter("value", value) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/automation/python3_package.py b/sdk/python/pulumi_azure/automation/python3_package.py index f58999a2c1..b1590c2c9d 100644 --- a/sdk/python/pulumi_azure/automation/python3_package.py +++ b/sdk/python/pulumi_azure/automation/python3_package.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['Python3PackageArgs', 'Python3Package'] @@ -33,19 +33,62 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Automation Python3 Package. Changing this forces a new Automation Python3 Package to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Automation Python3 Package. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "content_uri", content_uri) - pulumi.set(__self__, "resource_group_name", resource_group_name) + Python3PackageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + content_uri=content_uri, + resource_group_name=resource_group_name, + content_version=content_version, + hash_algorithm=hash_algorithm, + hash_value=hash_value, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + content_uri: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + content_version: Optional[pulumi.Input[str]] = None, + hash_algorithm: Optional[pulumi.Input[str]] = None, + hash_value: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if content_uri is None and 'contentUri' in kwargs: + content_uri = kwargs['contentUri'] + if content_uri is None: + raise TypeError("Missing 'content_uri' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if content_version is None and 'contentVersion' in kwargs: + content_version = kwargs['contentVersion'] + if hash_algorithm is None and 'hashAlgorithm' in kwargs: + hash_algorithm = kwargs['hashAlgorithm'] + if hash_value is None and 'hashValue' in kwargs: + hash_value = kwargs['hashValue'] + + _setter("automation_account_name", automation_account_name) + _setter("content_uri", content_uri) + _setter("resource_group_name", resource_group_name) if content_version is not None: - pulumi.set(__self__, "content_version", content_version) + _setter("content_version", content_version) if hash_algorithm is not None: - pulumi.set(__self__, "hash_algorithm", hash_algorithm) + _setter("hash_algorithm", hash_algorithm) if hash_value is not None: - pulumi.set(__self__, "hash_value", hash_value) + _setter("hash_value", hash_value) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="automationAccountName") @@ -166,22 +209,59 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Python3 Package is created. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Automation Python3 Package. """ + _Python3PackageState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + content_uri=content_uri, + content_version=content_version, + hash_algorithm=hash_algorithm, + hash_value=hash_value, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + content_uri: Optional[pulumi.Input[str]] = None, + content_version: Optional[pulumi.Input[str]] = None, + hash_algorithm: Optional[pulumi.Input[str]] = None, + hash_value: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if content_uri is None and 'contentUri' in kwargs: + content_uri = kwargs['contentUri'] + if content_version is None and 'contentVersion' in kwargs: + content_version = kwargs['contentVersion'] + if hash_algorithm is None and 'hashAlgorithm' in kwargs: + hash_algorithm = kwargs['hashAlgorithm'] + if hash_value is None and 'hashValue' in kwargs: + hash_value = kwargs['hashValue'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if content_uri is not None: - pulumi.set(__self__, "content_uri", content_uri) + _setter("content_uri", content_uri) if content_version is not None: - pulumi.set(__self__, "content_version", content_version) + _setter("content_version", content_version) if hash_algorithm is not None: - pulumi.set(__self__, "hash_algorithm", hash_algorithm) + _setter("hash_algorithm", hash_algorithm) if hash_value is not None: - pulumi.set(__self__, "hash_value", hash_value) + _setter("hash_value", hash_value) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="automationAccountName") @@ -389,6 +469,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + Python3PackageArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/run_book.py b/sdk/python/pulumi_azure/automation/run_book.py index e3414c3b41..43fac8ea6e 100644 --- a/sdk/python/pulumi_azure/automation/run_book.py +++ b/sdk/python/pulumi_azure/automation/run_book.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -48,29 +48,92 @@ def __init__(__self__, *, :param pulumi.Input['RunBookPublishContentLinkArgs'] publish_content_link: The published runbook content link. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "log_progress", log_progress) - pulumi.set(__self__, "log_verbose", log_verbose) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "runbook_type", runbook_type) + RunBookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + log_progress=log_progress, + log_verbose=log_verbose, + resource_group_name=resource_group_name, + runbook_type=runbook_type, + content=content, + description=description, + draft=draft, + job_schedules=job_schedules, + location=location, + log_activity_trace_level=log_activity_trace_level, + name=name, + publish_content_link=publish_content_link, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + log_progress: Optional[pulumi.Input[bool]] = None, + log_verbose: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + runbook_type: Optional[pulumi.Input[str]] = None, + content: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + draft: Optional[pulumi.Input['RunBookDraftArgs']] = None, + job_schedules: Optional[pulumi.Input[Sequence[pulumi.Input['RunBookJobScheduleArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + log_activity_trace_level: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + publish_content_link: Optional[pulumi.Input['RunBookPublishContentLinkArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if log_progress is None and 'logProgress' in kwargs: + log_progress = kwargs['logProgress'] + if log_progress is None: + raise TypeError("Missing 'log_progress' argument") + if log_verbose is None and 'logVerbose' in kwargs: + log_verbose = kwargs['logVerbose'] + if log_verbose is None: + raise TypeError("Missing 'log_verbose' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if runbook_type is None and 'runbookType' in kwargs: + runbook_type = kwargs['runbookType'] + if runbook_type is None: + raise TypeError("Missing 'runbook_type' argument") + if job_schedules is None and 'jobSchedules' in kwargs: + job_schedules = kwargs['jobSchedules'] + if log_activity_trace_level is None and 'logActivityTraceLevel' in kwargs: + log_activity_trace_level = kwargs['logActivityTraceLevel'] + if publish_content_link is None and 'publishContentLink' in kwargs: + publish_content_link = kwargs['publishContentLink'] + + _setter("automation_account_name", automation_account_name) + _setter("log_progress", log_progress) + _setter("log_verbose", log_verbose) + _setter("resource_group_name", resource_group_name) + _setter("runbook_type", runbook_type) if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if draft is not None: - pulumi.set(__self__, "draft", draft) + _setter("draft", draft) if job_schedules is not None: - pulumi.set(__self__, "job_schedules", job_schedules) + _setter("job_schedules", job_schedules) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if log_activity_trace_level is not None: - pulumi.set(__self__, "log_activity_trace_level", log_activity_trace_level) + _setter("log_activity_trace_level", log_activity_trace_level) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if publish_content_link is not None: - pulumi.set(__self__, "publish_content_link", publish_content_link) + _setter("publish_content_link", publish_content_link) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="automationAccountName") @@ -275,34 +338,87 @@ def __init__(__self__, *, :param pulumi.Input[str] runbook_type: The type of the runbook - can be either `Graph`, `GraphPowerShell`, `GraphPowerShellWorkflow`, `PowerShellWorkflow`, `PowerShell`, `Python3`, `Python2` or `Script`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _RunBookState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + content=content, + description=description, + draft=draft, + job_schedules=job_schedules, + location=location, + log_activity_trace_level=log_activity_trace_level, + log_progress=log_progress, + log_verbose=log_verbose, + name=name, + publish_content_link=publish_content_link, + resource_group_name=resource_group_name, + runbook_type=runbook_type, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + content: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + draft: Optional[pulumi.Input['RunBookDraftArgs']] = None, + job_schedules: Optional[pulumi.Input[Sequence[pulumi.Input['RunBookJobScheduleArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + log_activity_trace_level: Optional[pulumi.Input[int]] = None, + log_progress: Optional[pulumi.Input[bool]] = None, + log_verbose: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + publish_content_link: Optional[pulumi.Input['RunBookPublishContentLinkArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + runbook_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if job_schedules is None and 'jobSchedules' in kwargs: + job_schedules = kwargs['jobSchedules'] + if log_activity_trace_level is None and 'logActivityTraceLevel' in kwargs: + log_activity_trace_level = kwargs['logActivityTraceLevel'] + if log_progress is None and 'logProgress' in kwargs: + log_progress = kwargs['logProgress'] + if log_verbose is None and 'logVerbose' in kwargs: + log_verbose = kwargs['logVerbose'] + if publish_content_link is None and 'publishContentLink' in kwargs: + publish_content_link = kwargs['publishContentLink'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if runbook_type is None and 'runbookType' in kwargs: + runbook_type = kwargs['runbookType'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if draft is not None: - pulumi.set(__self__, "draft", draft) + _setter("draft", draft) if job_schedules is not None: - pulumi.set(__self__, "job_schedules", job_schedules) + _setter("job_schedules", job_schedules) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if log_activity_trace_level is not None: - pulumi.set(__self__, "log_activity_trace_level", log_activity_trace_level) + _setter("log_activity_trace_level", log_activity_trace_level) if log_progress is not None: - pulumi.set(__self__, "log_progress", log_progress) + _setter("log_progress", log_progress) if log_verbose is not None: - pulumi.set(__self__, "log_verbose", log_verbose) + _setter("log_verbose", log_verbose) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if publish_content_link is not None: - pulumi.set(__self__, "publish_content_link", publish_content_link) + _setter("publish_content_link", publish_content_link) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if runbook_type is not None: - pulumi.set(__self__, "runbook_type", runbook_type) + _setter("runbook_type", runbook_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="automationAccountName") @@ -642,6 +758,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RunBookArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -675,6 +795,11 @@ def _internal_init(__self__, __props__.__dict__["automation_account_name"] = automation_account_name __props__.__dict__["content"] = content __props__.__dict__["description"] = description + if draft is not None and not isinstance(draft, RunBookDraftArgs): + draft = draft or {} + def _setter(key, value): + draft[key] = value + RunBookDraftArgs._configure(_setter, **draft) __props__.__dict__["draft"] = draft __props__.__dict__["job_schedules"] = job_schedules __props__.__dict__["location"] = location @@ -686,6 +811,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'log_verbose'") __props__.__dict__["log_verbose"] = log_verbose __props__.__dict__["name"] = name + if publish_content_link is not None and not isinstance(publish_content_link, RunBookPublishContentLinkArgs): + publish_content_link = publish_content_link or {} + def _setter(key, value): + publish_content_link[key] = value + RunBookPublishContentLinkArgs._configure(_setter, **publish_content_link) __props__.__dict__["publish_content_link"] = publish_content_link if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") diff --git a/sdk/python/pulumi_azure/automation/schedule.py b/sdk/python/pulumi_azure/automation/schedule.py index 0e257eff55..b9b49d4310 100644 --- a/sdk/python/pulumi_azure/automation/schedule.py +++ b/sdk/python/pulumi_azure/automation/schedule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,27 +43,80 @@ def __init__(__self__, *, :param pulumi.Input[str] timezone: The timezone of the start time. Defaults to `Etc/UTC`. For possible values see: :param pulumi.Input[Sequence[pulumi.Input[str]]] week_days: List of days of the week that the job should execute on. Only valid when frequency is `Week`. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + frequency=frequency, + resource_group_name=resource_group_name, + description=description, + expiry_time=expiry_time, + interval=interval, + month_days=month_days, + monthly_occurrences=monthly_occurrences, + name=name, + start_time=start_time, + timezone=timezone, + week_days=week_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + frequency: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + expiry_time: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[int]] = None, + month_days: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + monthly_occurrences: Optional[pulumi.Input[Sequence[pulumi.Input['ScheduleMonthlyOccurrenceArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + timezone: Optional[pulumi.Input[str]] = None, + week_days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if expiry_time is None and 'expiryTime' in kwargs: + expiry_time = kwargs['expiryTime'] + if month_days is None and 'monthDays' in kwargs: + month_days = kwargs['monthDays'] + if monthly_occurrences is None and 'monthlyOccurrences' in kwargs: + monthly_occurrences = kwargs['monthlyOccurrences'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if week_days is None and 'weekDays' in kwargs: + week_days = kwargs['weekDays'] + + _setter("automation_account_name", automation_account_name) + _setter("frequency", frequency) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if expiry_time is not None: - pulumi.set(__self__, "expiry_time", expiry_time) + _setter("expiry_time", expiry_time) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) if month_days is not None: - pulumi.set(__self__, "month_days", month_days) + _setter("month_days", month_days) if monthly_occurrences is not None: - pulumi.set(__self__, "monthly_occurrences", monthly_occurrences) + _setter("monthly_occurrences", monthly_occurrences) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) if week_days is not None: - pulumi.set(__self__, "week_days", week_days) + _setter("week_days", week_days) @property @pulumi.getter(name="automationAccountName") @@ -240,30 +293,77 @@ def __init__(__self__, *, :param pulumi.Input[str] timezone: The timezone of the start time. Defaults to `Etc/UTC`. For possible values see: :param pulumi.Input[Sequence[pulumi.Input[str]]] week_days: List of days of the week that the job should execute on. Only valid when frequency is `Week`. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`. """ + _ScheduleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + description=description, + expiry_time=expiry_time, + frequency=frequency, + interval=interval, + month_days=month_days, + monthly_occurrences=monthly_occurrences, + name=name, + resource_group_name=resource_group_name, + start_time=start_time, + timezone=timezone, + week_days=week_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + expiry_time: Optional[pulumi.Input[str]] = None, + frequency: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[int]] = None, + month_days: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + monthly_occurrences: Optional[pulumi.Input[Sequence[pulumi.Input['ScheduleMonthlyOccurrenceArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + timezone: Optional[pulumi.Input[str]] = None, + week_days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if expiry_time is None and 'expiryTime' in kwargs: + expiry_time = kwargs['expiryTime'] + if month_days is None and 'monthDays' in kwargs: + month_days = kwargs['monthDays'] + if monthly_occurrences is None and 'monthlyOccurrences' in kwargs: + monthly_occurrences = kwargs['monthlyOccurrences'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if week_days is None and 'weekDays' in kwargs: + week_days = kwargs['weekDays'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if expiry_time is not None: - pulumi.set(__self__, "expiry_time", expiry_time) + _setter("expiry_time", expiry_time) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) if month_days is not None: - pulumi.set(__self__, "month_days", month_days) + _setter("month_days", month_days) if monthly_occurrences is not None: - pulumi.set(__self__, "monthly_occurrences", monthly_occurrences) + _setter("monthly_occurrences", monthly_occurrences) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) if week_days is not None: - pulumi.set(__self__, "week_days", week_days) + _setter("week_days", week_days) @property @pulumi.getter(name="automationAccountName") @@ -525,6 +625,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ScheduleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/software_update_configuration.py b/sdk/python/pulumi_azure/automation/software_update_configuration.py index bde92190cd..1be3249052 100644 --- a/sdk/python/pulumi_azure/automation/software_update_configuration.py +++ b/sdk/python/pulumi_azure/automation/software_update_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -44,31 +44,80 @@ def __init__(__self__, *, > **NOTE:** One of `linux` or `windows` must be specified. """ - pulumi.set(__self__, "automation_account_id", automation_account_id) - pulumi.set(__self__, "schedules", schedules) + SoftwareUpdateConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_id=automation_account_id, + schedules=schedules, + duration=duration, + linuxes=linuxes, + name=name, + non_azure_computer_names=non_azure_computer_names, + operating_system=operating_system, + post_tasks=post_tasks, + pre_tasks=pre_tasks, + target=target, + virtual_machine_ids=virtual_machine_ids, + windows=windows, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_id: Optional[pulumi.Input[str]] = None, + schedules: Optional[pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationScheduleArgs']]]] = None, + duration: Optional[pulumi.Input[str]] = None, + linuxes: Optional[pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationLinuxArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + non_azure_computer_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operating_system: Optional[pulumi.Input[str]] = None, + post_tasks: Optional[pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationPostTaskArgs']]]] = None, + pre_tasks: Optional[pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationPreTaskArgs']]]] = None, + target: Optional[pulumi.Input['SoftwareUpdateConfigurationTargetArgs']] = None, + virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + windows: Optional[pulumi.Input['SoftwareUpdateConfigurationWindowsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_id is None and 'automationAccountId' in kwargs: + automation_account_id = kwargs['automationAccountId'] + if automation_account_id is None: + raise TypeError("Missing 'automation_account_id' argument") + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if non_azure_computer_names is None and 'nonAzureComputerNames' in kwargs: + non_azure_computer_names = kwargs['nonAzureComputerNames'] + if operating_system is None and 'operatingSystem' in kwargs: + operating_system = kwargs['operatingSystem'] + if post_tasks is None and 'postTasks' in kwargs: + post_tasks = kwargs['postTasks'] + if pre_tasks is None and 'preTasks' in kwargs: + pre_tasks = kwargs['preTasks'] + if virtual_machine_ids is None and 'virtualMachineIds' in kwargs: + virtual_machine_ids = kwargs['virtualMachineIds'] + + _setter("automation_account_id", automation_account_id) + _setter("schedules", schedules) if duration is not None: - pulumi.set(__self__, "duration", duration) + _setter("duration", duration) if linuxes is not None: - pulumi.set(__self__, "linuxes", linuxes) + _setter("linuxes", linuxes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if non_azure_computer_names is not None: - pulumi.set(__self__, "non_azure_computer_names", non_azure_computer_names) + _setter("non_azure_computer_names", non_azure_computer_names) if operating_system is not None: warnings.warn("""This property has been deprecated and will be removed in a future release. The use of either the `linux` or `windows` blocks replaces setting this value directly. This value is ignored by the provider.""", DeprecationWarning) pulumi.log.warn("""operating_system is deprecated: This property has been deprecated and will be removed in a future release. The use of either the `linux` or `windows` blocks replaces setting this value directly. This value is ignored by the provider.""") if operating_system is not None: - pulumi.set(__self__, "operating_system", operating_system) + _setter("operating_system", operating_system) if post_tasks is not None: - pulumi.set(__self__, "post_tasks", post_tasks) + _setter("post_tasks", post_tasks) if pre_tasks is not None: - pulumi.set(__self__, "pre_tasks", pre_tasks) + _setter("pre_tasks", pre_tasks) if target is not None: - pulumi.set(__self__, "target", target) + _setter("target", target) if virtual_machine_ids is not None: - pulumi.set(__self__, "virtual_machine_ids", virtual_machine_ids) + _setter("virtual_machine_ids", virtual_machine_ids) if windows is not None: - pulumi.set(__self__, "windows", windows) + _setter("windows", windows) @property @pulumi.getter(name="automationAccountId") @@ -253,42 +302,99 @@ def __init__(__self__, *, > **NOTE:** One of `linux` or `windows` must be specified. """ + _SoftwareUpdateConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_id=automation_account_id, + duration=duration, + error_code=error_code, + error_meesage=error_meesage, + error_message=error_message, + linuxes=linuxes, + name=name, + non_azure_computer_names=non_azure_computer_names, + operating_system=operating_system, + post_tasks=post_tasks, + pre_tasks=pre_tasks, + schedules=schedules, + target=target, + virtual_machine_ids=virtual_machine_ids, + windows=windows, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_id: Optional[pulumi.Input[str]] = None, + duration: Optional[pulumi.Input[str]] = None, + error_code: Optional[pulumi.Input[str]] = None, + error_meesage: Optional[pulumi.Input[str]] = None, + error_message: Optional[pulumi.Input[str]] = None, + linuxes: Optional[pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationLinuxArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + non_azure_computer_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operating_system: Optional[pulumi.Input[str]] = None, + post_tasks: Optional[pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationPostTaskArgs']]]] = None, + pre_tasks: Optional[pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationPreTaskArgs']]]] = None, + schedules: Optional[pulumi.Input[Sequence[pulumi.Input['SoftwareUpdateConfigurationScheduleArgs']]]] = None, + target: Optional[pulumi.Input['SoftwareUpdateConfigurationTargetArgs']] = None, + virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + windows: Optional[pulumi.Input['SoftwareUpdateConfigurationWindowsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_id is None and 'automationAccountId' in kwargs: + automation_account_id = kwargs['automationAccountId'] + if error_code is None and 'errorCode' in kwargs: + error_code = kwargs['errorCode'] + if error_meesage is None and 'errorMeesage' in kwargs: + error_meesage = kwargs['errorMeesage'] + if error_message is None and 'errorMessage' in kwargs: + error_message = kwargs['errorMessage'] + if non_azure_computer_names is None and 'nonAzureComputerNames' in kwargs: + non_azure_computer_names = kwargs['nonAzureComputerNames'] + if operating_system is None and 'operatingSystem' in kwargs: + operating_system = kwargs['operatingSystem'] + if post_tasks is None and 'postTasks' in kwargs: + post_tasks = kwargs['postTasks'] + if pre_tasks is None and 'preTasks' in kwargs: + pre_tasks = kwargs['preTasks'] + if virtual_machine_ids is None and 'virtualMachineIds' in kwargs: + virtual_machine_ids = kwargs['virtualMachineIds'] + if automation_account_id is not None: - pulumi.set(__self__, "automation_account_id", automation_account_id) + _setter("automation_account_id", automation_account_id) if duration is not None: - pulumi.set(__self__, "duration", duration) + _setter("duration", duration) if error_code is not None: - pulumi.set(__self__, "error_code", error_code) + _setter("error_code", error_code) if error_meesage is not None: warnings.warn("""`error_meesage` will be removed in favour of `error_message` in version 4.0 of the AzureRM Provider""", DeprecationWarning) pulumi.log.warn("""error_meesage is deprecated: `error_meesage` will be removed in favour of `error_message` in version 4.0 of the AzureRM Provider""") if error_meesage is not None: - pulumi.set(__self__, "error_meesage", error_meesage) + _setter("error_meesage", error_meesage) if error_message is not None: - pulumi.set(__self__, "error_message", error_message) + _setter("error_message", error_message) if linuxes is not None: - pulumi.set(__self__, "linuxes", linuxes) + _setter("linuxes", linuxes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if non_azure_computer_names is not None: - pulumi.set(__self__, "non_azure_computer_names", non_azure_computer_names) + _setter("non_azure_computer_names", non_azure_computer_names) if operating_system is not None: warnings.warn("""This property has been deprecated and will be removed in a future release. The use of either the `linux` or `windows` blocks replaces setting this value directly. This value is ignored by the provider.""", DeprecationWarning) pulumi.log.warn("""operating_system is deprecated: This property has been deprecated and will be removed in a future release. The use of either the `linux` or `windows` blocks replaces setting this value directly. This value is ignored by the provider.""") if operating_system is not None: - pulumi.set(__self__, "operating_system", operating_system) + _setter("operating_system", operating_system) if post_tasks is not None: - pulumi.set(__self__, "post_tasks", post_tasks) + _setter("post_tasks", post_tasks) if pre_tasks is not None: - pulumi.set(__self__, "pre_tasks", pre_tasks) + _setter("pre_tasks", pre_tasks) if schedules is not None: - pulumi.set(__self__, "schedules", schedules) + _setter("schedules", schedules) if target is not None: - pulumi.set(__self__, "target", target) + _setter("target", target) if virtual_machine_ids is not None: - pulumi.set(__self__, "virtual_machine_ids", virtual_machine_ids) + _setter("virtual_machine_ids", virtual_machine_ids) if windows is not None: - pulumi.set(__self__, "windows", windows) + _setter("windows", windows) @property @pulumi.getter(name="automationAccountId") @@ -631,6 +737,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SoftwareUpdateConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -670,8 +780,18 @@ def _internal_init(__self__, if schedules is None and not opts.urn: raise TypeError("Missing required property 'schedules'") __props__.__dict__["schedules"] = schedules + if target is not None and not isinstance(target, SoftwareUpdateConfigurationTargetArgs): + target = target or {} + def _setter(key, value): + target[key] = value + SoftwareUpdateConfigurationTargetArgs._configure(_setter, **target) __props__.__dict__["target"] = target __props__.__dict__["virtual_machine_ids"] = virtual_machine_ids + if windows is not None and not isinstance(windows, SoftwareUpdateConfigurationWindowsArgs): + windows = windows or {} + def _setter(key, value): + windows[key] = value + SoftwareUpdateConfigurationWindowsArgs._configure(_setter, **windows) __props__.__dict__["windows"] = windows __props__.__dict__["error_code"] = None __props__.__dict__["error_meesage"] = None diff --git a/sdk/python/pulumi_azure/automation/source_control.py b/sdk/python/pulumi_azure/automation/source_control.py index 21bbf89cda..90e490a681 100644 --- a/sdk/python/pulumi_azure/automation/source_control.py +++ b/sdk/python/pulumi_azure/automation/source_control.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,21 +39,72 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Automation Source Control. Changing this forces a new Automation Source Control to be created. :param pulumi.Input[bool] publish_runbook_enabled: Whether auto publish the Source Control. Defaults to `true`. """ - pulumi.set(__self__, "automation_account_id", automation_account_id) - pulumi.set(__self__, "folder_path", folder_path) - pulumi.set(__self__, "repository_url", repository_url) - pulumi.set(__self__, "security", security) - pulumi.set(__self__, "source_control_type", source_control_type) + SourceControlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_id=automation_account_id, + folder_path=folder_path, + repository_url=repository_url, + security=security, + source_control_type=source_control_type, + automatic_sync=automatic_sync, + branch=branch, + description=description, + name=name, + publish_runbook_enabled=publish_runbook_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_id: Optional[pulumi.Input[str]] = None, + folder_path: Optional[pulumi.Input[str]] = None, + repository_url: Optional[pulumi.Input[str]] = None, + security: Optional[pulumi.Input['SourceControlSecurityArgs']] = None, + source_control_type: Optional[pulumi.Input[str]] = None, + automatic_sync: Optional[pulumi.Input[bool]] = None, + branch: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + publish_runbook_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_id is None and 'automationAccountId' in kwargs: + automation_account_id = kwargs['automationAccountId'] + if automation_account_id is None: + raise TypeError("Missing 'automation_account_id' argument") + if folder_path is None and 'folderPath' in kwargs: + folder_path = kwargs['folderPath'] + if folder_path is None: + raise TypeError("Missing 'folder_path' argument") + if repository_url is None and 'repositoryUrl' in kwargs: + repository_url = kwargs['repositoryUrl'] + if repository_url is None: + raise TypeError("Missing 'repository_url' argument") + if security is None: + raise TypeError("Missing 'security' argument") + if source_control_type is None and 'sourceControlType' in kwargs: + source_control_type = kwargs['sourceControlType'] + if source_control_type is None: + raise TypeError("Missing 'source_control_type' argument") + if automatic_sync is None and 'automaticSync' in kwargs: + automatic_sync = kwargs['automaticSync'] + if publish_runbook_enabled is None and 'publishRunbookEnabled' in kwargs: + publish_runbook_enabled = kwargs['publishRunbookEnabled'] + + _setter("automation_account_id", automation_account_id) + _setter("folder_path", folder_path) + _setter("repository_url", repository_url) + _setter("security", security) + _setter("source_control_type", source_control_type) if automatic_sync is not None: - pulumi.set(__self__, "automatic_sync", automatic_sync) + _setter("automatic_sync", automatic_sync) if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if publish_runbook_enabled is not None: - pulumi.set(__self__, "publish_runbook_enabled", publish_runbook_enabled) + _setter("publish_runbook_enabled", publish_runbook_enabled) @property @pulumi.getter(name="automationAccountId") @@ -202,26 +253,67 @@ def __init__(__self__, *, :param pulumi.Input['SourceControlSecurityArgs'] security: A `security` block as defined below. :param pulumi.Input[str] source_control_type: The source type of Source Control, possible vaules are `VsoGit`, `VsoTfvc` and `GitHub`, and the value is case sensitive. """ + _SourceControlState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automatic_sync=automatic_sync, + automation_account_id=automation_account_id, + branch=branch, + description=description, + folder_path=folder_path, + name=name, + publish_runbook_enabled=publish_runbook_enabled, + repository_url=repository_url, + security=security, + source_control_type=source_control_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automatic_sync: Optional[pulumi.Input[bool]] = None, + automation_account_id: Optional[pulumi.Input[str]] = None, + branch: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder_path: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + publish_runbook_enabled: Optional[pulumi.Input[bool]] = None, + repository_url: Optional[pulumi.Input[str]] = None, + security: Optional[pulumi.Input['SourceControlSecurityArgs']] = None, + source_control_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automatic_sync is None and 'automaticSync' in kwargs: + automatic_sync = kwargs['automaticSync'] + if automation_account_id is None and 'automationAccountId' in kwargs: + automation_account_id = kwargs['automationAccountId'] + if folder_path is None and 'folderPath' in kwargs: + folder_path = kwargs['folderPath'] + if publish_runbook_enabled is None and 'publishRunbookEnabled' in kwargs: + publish_runbook_enabled = kwargs['publishRunbookEnabled'] + if repository_url is None and 'repositoryUrl' in kwargs: + repository_url = kwargs['repositoryUrl'] + if source_control_type is None and 'sourceControlType' in kwargs: + source_control_type = kwargs['sourceControlType'] + if automatic_sync is not None: - pulumi.set(__self__, "automatic_sync", automatic_sync) + _setter("automatic_sync", automatic_sync) if automation_account_id is not None: - pulumi.set(__self__, "automation_account_id", automation_account_id) + _setter("automation_account_id", automation_account_id) if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder_path is not None: - pulumi.set(__self__, "folder_path", folder_path) + _setter("folder_path", folder_path) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if publish_runbook_enabled is not None: - pulumi.set(__self__, "publish_runbook_enabled", publish_runbook_enabled) + _setter("publish_runbook_enabled", publish_runbook_enabled) if repository_url is not None: - pulumi.set(__self__, "repository_url", repository_url) + _setter("repository_url", repository_url) if security is not None: - pulumi.set(__self__, "security", security) + _setter("security", security) if source_control_type is not None: - pulumi.set(__self__, "source_control_type", source_control_type) + _setter("source_control_type", source_control_type) @property @pulumi.getter(name="automaticSync") @@ -457,6 +549,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SourceControlArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -495,6 +591,11 @@ def _internal_init(__self__, if repository_url is None and not opts.urn: raise TypeError("Missing required property 'repository_url'") __props__.__dict__["repository_url"] = repository_url + if security is not None and not isinstance(security, SourceControlSecurityArgs): + security = security or {} + def _setter(key, value): + security[key] = value + SourceControlSecurityArgs._configure(_setter, **security) if security is None and not opts.urn: raise TypeError("Missing required property 'security'") __props__.__dict__["security"] = security diff --git a/sdk/python/pulumi_azure/automation/string_variable.py b/sdk/python/pulumi_azure/automation/string_variable.py index 1aade5d878..04ad74aeb4 100644 --- a/sdk/python/pulumi_azure/automation/string_variable.py +++ b/sdk/python/pulumi_azure/automation/string_variable.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['StringVariableArgs', 'StringVariable'] @@ -29,16 +29,45 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Automation Variable. Changing this forces a new resource to be created. :param pulumi.Input[str] value: The value of the Automation Variable as a `string`. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + StringVariableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + resource_group_name=resource_group_name, + description=description, + encrypted=encrypted, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encrypted: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("automation_account_name", automation_account_name) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encrypted is not None: - pulumi.set(__self__, "encrypted", encrypted) + _setter("encrypted", encrypted) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="automationAccountName") @@ -131,18 +160,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created. :param pulumi.Input[str] value: The value of the Automation Variable as a `string`. """ + _StringVariableState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + description=description, + encrypted=encrypted, + name=name, + resource_group_name=resource_group_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encrypted: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encrypted is not None: - pulumi.set(__self__, "encrypted", encrypted) + _setter("encrypted", encrypted) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="automationAccountName") @@ -310,6 +364,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StringVariableArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/variable_object.py b/sdk/python/pulumi_azure/automation/variable_object.py index 2ecc02f340..a8f9748680 100644 --- a/sdk/python/pulumi_azure/automation/variable_object.py +++ b/sdk/python/pulumi_azure/automation/variable_object.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VariableObjectArgs', 'VariableObject'] @@ -29,16 +29,45 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Automation Variable. Changing this forces a new resource to be created. :param pulumi.Input[str] value: The value of the Automation Variable as a `jsonencode()` string. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + VariableObjectArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + resource_group_name=resource_group_name, + description=description, + encrypted=encrypted, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encrypted: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("automation_account_name", automation_account_name) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encrypted is not None: - pulumi.set(__self__, "encrypted", encrypted) + _setter("encrypted", encrypted) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="automationAccountName") @@ -131,18 +160,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created. :param pulumi.Input[str] value: The value of the Automation Variable as a `jsonencode()` string. """ + _VariableObjectState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + description=description, + encrypted=encrypted, + name=name, + resource_group_name=resource_group_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encrypted: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encrypted is not None: - pulumi.set(__self__, "encrypted", encrypted) + _setter("encrypted", encrypted) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="automationAccountName") @@ -318,6 +372,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VariableObjectArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/watcher.py b/sdk/python/pulumi_azure/automation/watcher.py index d6be629c7e..da4f475119 100644 --- a/sdk/python/pulumi_azure/automation/watcher.py +++ b/sdk/python/pulumi_azure/automation/watcher.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WatcherArgs', 'Watcher'] @@ -37,22 +37,69 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] script_parameters: Specifies a list of key-vaule parameters. Changing this forces a new Automation watcher to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Automation Watcher. """ - pulumi.set(__self__, "automation_account_id", automation_account_id) - pulumi.set(__self__, "execution_frequency_in_seconds", execution_frequency_in_seconds) - pulumi.set(__self__, "script_name", script_name) - pulumi.set(__self__, "script_run_on", script_run_on) + WatcherArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_id=automation_account_id, + execution_frequency_in_seconds=execution_frequency_in_seconds, + script_name=script_name, + script_run_on=script_run_on, + description=description, + etag=etag, + location=location, + name=name, + script_parameters=script_parameters, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_id: Optional[pulumi.Input[str]] = None, + execution_frequency_in_seconds: Optional[pulumi.Input[int]] = None, + script_name: Optional[pulumi.Input[str]] = None, + script_run_on: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + etag: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + script_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_id is None and 'automationAccountId' in kwargs: + automation_account_id = kwargs['automationAccountId'] + if automation_account_id is None: + raise TypeError("Missing 'automation_account_id' argument") + if execution_frequency_in_seconds is None and 'executionFrequencyInSeconds' in kwargs: + execution_frequency_in_seconds = kwargs['executionFrequencyInSeconds'] + if execution_frequency_in_seconds is None: + raise TypeError("Missing 'execution_frequency_in_seconds' argument") + if script_name is None and 'scriptName' in kwargs: + script_name = kwargs['scriptName'] + if script_name is None: + raise TypeError("Missing 'script_name' argument") + if script_run_on is None and 'scriptRunOn' in kwargs: + script_run_on = kwargs['scriptRunOn'] + if script_run_on is None: + raise TypeError("Missing 'script_run_on' argument") + if script_parameters is None and 'scriptParameters' in kwargs: + script_parameters = kwargs['scriptParameters'] + + _setter("automation_account_id", automation_account_id) + _setter("execution_frequency_in_seconds", execution_frequency_in_seconds) + _setter("script_name", script_name) + _setter("script_run_on", script_run_on) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if etag is not None: - pulumi.set(__self__, "etag", etag) + _setter("etag", etag) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if script_parameters is not None: - pulumi.set(__self__, "script_parameters", script_parameters) + _setter("script_parameters", script_parameters) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="automationAccountId") @@ -203,28 +250,69 @@ def __init__(__self__, *, :param pulumi.Input[str] status: The current status of the Automation Watcher. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Automation Watcher. """ + _WatcherState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_id=automation_account_id, + description=description, + etag=etag, + execution_frequency_in_seconds=execution_frequency_in_seconds, + location=location, + name=name, + script_name=script_name, + script_parameters=script_parameters, + script_run_on=script_run_on, + status=status, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + etag: Optional[pulumi.Input[str]] = None, + execution_frequency_in_seconds: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + script_name: Optional[pulumi.Input[str]] = None, + script_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + script_run_on: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_id is None and 'automationAccountId' in kwargs: + automation_account_id = kwargs['automationAccountId'] + if execution_frequency_in_seconds is None and 'executionFrequencyInSeconds' in kwargs: + execution_frequency_in_seconds = kwargs['executionFrequencyInSeconds'] + if script_name is None and 'scriptName' in kwargs: + script_name = kwargs['scriptName'] + if script_parameters is None and 'scriptParameters' in kwargs: + script_parameters = kwargs['scriptParameters'] + if script_run_on is None and 'scriptRunOn' in kwargs: + script_run_on = kwargs['scriptRunOn'] + if automation_account_id is not None: - pulumi.set(__self__, "automation_account_id", automation_account_id) + _setter("automation_account_id", automation_account_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if etag is not None: - pulumi.set(__self__, "etag", etag) + _setter("etag", etag) if execution_frequency_in_seconds is not None: - pulumi.set(__self__, "execution_frequency_in_seconds", execution_frequency_in_seconds) + _setter("execution_frequency_in_seconds", execution_frequency_in_seconds) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if script_name is not None: - pulumi.set(__self__, "script_name", script_name) + _setter("script_name", script_name) if script_parameters is not None: - pulumi.set(__self__, "script_parameters", script_parameters) + _setter("script_parameters", script_parameters) if script_run_on is not None: - pulumi.set(__self__, "script_run_on", script_run_on) + _setter("script_run_on", script_run_on) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="automationAccountId") @@ -506,6 +594,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WatcherArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/automation/webhook.py b/sdk/python/pulumi_azure/automation/webhook.py index d38a510465..e980ea9083 100644 --- a/sdk/python/pulumi_azure/automation/webhook.py +++ b/sdk/python/pulumi_azure/automation/webhook.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WebhookArgs', 'Webhook'] @@ -35,20 +35,65 @@ def __init__(__self__, *, :param pulumi.Input[str] run_on_worker_group: Name of the hybrid worker group the Webhook job will run on. :param pulumi.Input[str] uri: URI to initiate the webhook. Can be generated using [Generate URI API](https://docs.microsoft.com/rest/api/automation/webhook/generate-uri). By default, new URI is generated on each new resource creation. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "automation_account_name", automation_account_name) - pulumi.set(__self__, "expiry_time", expiry_time) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "runbook_name", runbook_name) + WebhookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + expiry_time=expiry_time, + resource_group_name=resource_group_name, + runbook_name=runbook_name, + enabled=enabled, + name=name, + parameters=parameters, + run_on_worker_group=run_on_worker_group, + uri=uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + expiry_time: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + runbook_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + run_on_worker_group: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if automation_account_name is None: + raise TypeError("Missing 'automation_account_name' argument") + if expiry_time is None and 'expiryTime' in kwargs: + expiry_time = kwargs['expiryTime'] + if expiry_time is None: + raise TypeError("Missing 'expiry_time' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if runbook_name is None and 'runbookName' in kwargs: + runbook_name = kwargs['runbookName'] + if runbook_name is None: + raise TypeError("Missing 'runbook_name' argument") + if run_on_worker_group is None and 'runOnWorkerGroup' in kwargs: + run_on_worker_group = kwargs['runOnWorkerGroup'] + + _setter("automation_account_name", automation_account_name) + _setter("expiry_time", expiry_time) + _setter("resource_group_name", resource_group_name) + _setter("runbook_name", runbook_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if run_on_worker_group is not None: - pulumi.set(__self__, "run_on_worker_group", run_on_worker_group) + _setter("run_on_worker_group", run_on_worker_group) if uri is not None: - pulumi.set(__self__, "uri", uri) + _setter("uri", uri) @property @pulumi.getter(name="automationAccountName") @@ -183,24 +228,61 @@ def __init__(__self__, *, :param pulumi.Input[str] runbook_name: Name of the Automation Runbook to execute by Webhook. :param pulumi.Input[str] uri: URI to initiate the webhook. Can be generated using [Generate URI API](https://docs.microsoft.com/rest/api/automation/webhook/generate-uri). By default, new URI is generated on each new resource creation. Changing this forces a new resource to be created. """ + _WebhookState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_name=automation_account_name, + enabled=enabled, + expiry_time=expiry_time, + name=name, + parameters=parameters, + resource_group_name=resource_group_name, + run_on_worker_group=run_on_worker_group, + runbook_name=runbook_name, + uri=uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + expiry_time: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + run_on_worker_group: Optional[pulumi.Input[str]] = None, + runbook_name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_name is None and 'automationAccountName' in kwargs: + automation_account_name = kwargs['automationAccountName'] + if expiry_time is None and 'expiryTime' in kwargs: + expiry_time = kwargs['expiryTime'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if run_on_worker_group is None and 'runOnWorkerGroup' in kwargs: + run_on_worker_group = kwargs['runOnWorkerGroup'] + if runbook_name is None and 'runbookName' in kwargs: + runbook_name = kwargs['runbookName'] + if automation_account_name is not None: - pulumi.set(__self__, "automation_account_name", automation_account_name) + _setter("automation_account_name", automation_account_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if expiry_time is not None: - pulumi.set(__self__, "expiry_time", expiry_time) + _setter("expiry_time", expiry_time) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if run_on_worker_group is not None: - pulumi.set(__self__, "run_on_worker_group", run_on_worker_group) + _setter("run_on_worker_group", run_on_worker_group) if runbook_name is not None: - pulumi.set(__self__, "runbook_name", runbook_name) + _setter("runbook_name", runbook_name) if uri is not None: - pulumi.set(__self__, "uri", uri) + _setter("uri", uri) @property @pulumi.getter(name="automationAccountName") @@ -442,6 +524,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WebhookArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/avs/_inputs.py b/sdk/python/pulumi_azure/avs/_inputs.py index b8c5b41b4d..276695e8d4 100644 --- a/sdk/python/pulumi_azure/avs/_inputs.py +++ b/sdk/python/pulumi_azure/avs/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -27,14 +27,39 @@ def __init__(__self__, *, :param pulumi.Input[str] primary_subnet_cidr: The CIDR of the primary subnet. :param pulumi.Input[str] secondary_subnet_cidr: The CIDR of the secondary subnet. """ + PrivateCloudCircuitArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + express_route_id=express_route_id, + express_route_private_peering_id=express_route_private_peering_id, + primary_subnet_cidr=primary_subnet_cidr, + secondary_subnet_cidr=secondary_subnet_cidr, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + express_route_id: Optional[pulumi.Input[str]] = None, + express_route_private_peering_id: Optional[pulumi.Input[str]] = None, + primary_subnet_cidr: Optional[pulumi.Input[str]] = None, + secondary_subnet_cidr: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if express_route_id is None and 'expressRouteId' in kwargs: + express_route_id = kwargs['expressRouteId'] + if express_route_private_peering_id is None and 'expressRoutePrivatePeeringId' in kwargs: + express_route_private_peering_id = kwargs['expressRoutePrivatePeeringId'] + if primary_subnet_cidr is None and 'primarySubnetCidr' in kwargs: + primary_subnet_cidr = kwargs['primarySubnetCidr'] + if secondary_subnet_cidr is None and 'secondarySubnetCidr' in kwargs: + secondary_subnet_cidr = kwargs['secondarySubnetCidr'] + if express_route_id is not None: - pulumi.set(__self__, "express_route_id", express_route_id) + _setter("express_route_id", express_route_id) if express_route_private_peering_id is not None: - pulumi.set(__self__, "express_route_private_peering_id", express_route_private_peering_id) + _setter("express_route_private_peering_id", express_route_private_peering_id) if primary_subnet_cidr is not None: - pulumi.set(__self__, "primary_subnet_cidr", primary_subnet_cidr) + _setter("primary_subnet_cidr", primary_subnet_cidr) if secondary_subnet_cidr is not None: - pulumi.set(__self__, "secondary_subnet_cidr", secondary_subnet_cidr) + _setter("secondary_subnet_cidr", secondary_subnet_cidr) @property @pulumi.getter(name="expressRouteId") @@ -96,11 +121,28 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] hosts: A list of hosts in the management cluster. :param pulumi.Input[int] id: The ID of the management cluster. """ - pulumi.set(__self__, "size", size) + PrivateCloudManagementClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + size=size, + hosts=hosts, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + size: Optional[pulumi.Input[int]] = None, + hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + id: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if size is None: + raise TypeError("Missing 'size' argument") + + _setter("size", size) if hosts is not None: - pulumi.set(__self__, "hosts", hosts) + _setter("hosts", hosts) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/avs/cluster.py b/sdk/python/pulumi_azure/avs/cluster.py index 88a074fee6..5de224c45a 100644 --- a/sdk/python/pulumi_azure/avs/cluster.py +++ b/sdk/python/pulumi_azure/avs/cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ClusterArgs', 'Cluster'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] vmware_cloud_id: The ID of the VMware Private Cloud in which to create this VMware Cluster. Changing this forces a new VMware Cluster to be created. :param pulumi.Input[str] name: The name which should be used for this VMware Cluster. Changing this forces a new VMware Cluster to be created. """ - pulumi.set(__self__, "cluster_node_count", cluster_node_count) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "vmware_cloud_id", vmware_cloud_id) + ClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_node_count=cluster_node_count, + sku_name=sku_name, + vmware_cloud_id=vmware_cloud_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_node_count: Optional[pulumi.Input[int]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + vmware_cloud_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_node_count is None and 'clusterNodeCount' in kwargs: + cluster_node_count = kwargs['clusterNodeCount'] + if cluster_node_count is None: + raise TypeError("Missing 'cluster_node_count' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if vmware_cloud_id is None and 'vmwareCloudId' in kwargs: + vmware_cloud_id = kwargs['vmwareCloudId'] + if vmware_cloud_id is None: + raise TypeError("Missing 'vmware_cloud_id' argument") + + _setter("cluster_node_count", cluster_node_count) + _setter("sku_name", sku_name) + _setter("vmware_cloud_id", vmware_cloud_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="clusterNodeCount") @@ -98,18 +127,47 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_name: The cluster SKU to use. Possible values are `av20`, `av36`, `av36t`, `av36p` and `av52`. Changing this forces a new VMware Cluster to be created. :param pulumi.Input[str] vmware_cloud_id: The ID of the VMware Private Cloud in which to create this VMware Cluster. Changing this forces a new VMware Cluster to be created. """ + _ClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_node_count=cluster_node_count, + cluster_number=cluster_number, + hosts=hosts, + name=name, + sku_name=sku_name, + vmware_cloud_id=vmware_cloud_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_node_count: Optional[pulumi.Input[int]] = None, + cluster_number: Optional[pulumi.Input[int]] = None, + hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + vmware_cloud_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_node_count is None and 'clusterNodeCount' in kwargs: + cluster_node_count = kwargs['clusterNodeCount'] + if cluster_number is None and 'clusterNumber' in kwargs: + cluster_number = kwargs['clusterNumber'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if vmware_cloud_id is None and 'vmwareCloudId' in kwargs: + vmware_cloud_id = kwargs['vmwareCloudId'] + if cluster_node_count is not None: - pulumi.set(__self__, "cluster_node_count", cluster_node_count) + _setter("cluster_node_count", cluster_node_count) if cluster_number is not None: - pulumi.set(__self__, "cluster_number", cluster_number) + _setter("cluster_number", cluster_number) if hosts is not None: - pulumi.set(__self__, "hosts", hosts) + _setter("hosts", hosts) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if vmware_cloud_id is not None: - pulumi.set(__self__, "vmware_cloud_id", vmware_cloud_id) + _setter("vmware_cloud_id", vmware_cloud_id) @property @pulumi.getter(name="clusterNodeCount") @@ -287,6 +345,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/avs/express_route_authorization.py b/sdk/python/pulumi_azure/avs/express_route_authorization.py index 46fa3d7ca2..b34278ac18 100644 --- a/sdk/python/pulumi_azure/avs/express_route_authorization.py +++ b/sdk/python/pulumi_azure/avs/express_route_authorization.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ExpressRouteAuthorizationArgs', 'ExpressRouteAuthorization'] @@ -21,9 +21,26 @@ def __init__(__self__, *, :param pulumi.Input[str] private_cloud_id: The ID of the VMware Private Cloud in which to create this Express Route VMware Authorization. Changing this forces a new VMware Authorization to be created. :param pulumi.Input[str] name: The name which should be used for this Express Route VMware Authorization. Changing this forces a new VMware Authorization to be created. """ - pulumi.set(__self__, "private_cloud_id", private_cloud_id) + ExpressRouteAuthorizationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_cloud_id=private_cloud_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_cloud_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_cloud_id is None and 'privateCloudId' in kwargs: + private_cloud_id = kwargs['privateCloudId'] + if private_cloud_id is None: + raise TypeError("Missing 'private_cloud_id' argument") + + _setter("private_cloud_id", private_cloud_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="privateCloudId") @@ -64,14 +81,37 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Express Route VMware Authorization. Changing this forces a new VMware Authorization to be created. :param pulumi.Input[str] private_cloud_id: The ID of the VMware Private Cloud in which to create this Express Route VMware Authorization. Changing this forces a new VMware Authorization to be created. """ + _ExpressRouteAuthorizationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + express_route_authorization_id=express_route_authorization_id, + express_route_authorization_key=express_route_authorization_key, + name=name, + private_cloud_id=private_cloud_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + express_route_authorization_id: Optional[pulumi.Input[str]] = None, + express_route_authorization_key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_cloud_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if express_route_authorization_id is None and 'expressRouteAuthorizationId' in kwargs: + express_route_authorization_id = kwargs['expressRouteAuthorizationId'] + if express_route_authorization_key is None and 'expressRouteAuthorizationKey' in kwargs: + express_route_authorization_key = kwargs['expressRouteAuthorizationKey'] + if private_cloud_id is None and 'privateCloudId' in kwargs: + private_cloud_id = kwargs['privateCloudId'] + if express_route_authorization_id is not None: - pulumi.set(__self__, "express_route_authorization_id", express_route_authorization_id) + _setter("express_route_authorization_id", express_route_authorization_id) if express_route_authorization_key is not None: - pulumi.set(__self__, "express_route_authorization_key", express_route_authorization_key) + _setter("express_route_authorization_key", express_route_authorization_key) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_cloud_id is not None: - pulumi.set(__self__, "private_cloud_id", private_cloud_id) + _setter("private_cloud_id", private_cloud_id) @property @pulumi.getter(name="expressRouteAuthorizationId") @@ -215,6 +255,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ExpressRouteAuthorizationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/avs/get_private_cloud.py b/sdk/python/pulumi_azure/avs/get_private_cloud.py index b3ff5f8044..0ad753d96b 100644 --- a/sdk/python/pulumi_azure/avs/get_private_cloud.py +++ b/sdk/python/pulumi_azure/avs/get_private_cloud.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/avs/netapp_volume_attachment.py b/sdk/python/pulumi_azure/avs/netapp_volume_attachment.py index 09df4c7e1a..2aab3616d5 100644 --- a/sdk/python/pulumi_azure/avs/netapp_volume_attachment.py +++ b/sdk/python/pulumi_azure/avs/netapp_volume_attachment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetappVolumeAttachmentArgs', 'NetappVolumeAttachment'] @@ -25,10 +25,33 @@ def __init__(__self__, *, > **NOTE :** please follow the prerequisites mentioned in this [article](https://learn.microsoft.com/en-us/azure/azure-vmware/attach-azure-netapp-files-to-azure-vmware-solution-hosts?tabs=azure-portal#prerequisites) before associating the netapp file volume to the vmware solution hosts. :param pulumi.Input[str] name: The name which should be used for this VMware Private Cloud Netapp File Volume Attachment. Changing this forces a new VMware Private Cloud Netapp File Volume Attachment to be created. """ - pulumi.set(__self__, "netapp_volume_id", netapp_volume_id) - pulumi.set(__self__, "vmware_cluster_id", vmware_cluster_id) + NetappVolumeAttachmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + netapp_volume_id=netapp_volume_id, + vmware_cluster_id=vmware_cluster_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + netapp_volume_id: Optional[pulumi.Input[str]] = None, + vmware_cluster_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if netapp_volume_id is None and 'netappVolumeId' in kwargs: + netapp_volume_id = kwargs['netappVolumeId'] + if netapp_volume_id is None: + raise TypeError("Missing 'netapp_volume_id' argument") + if vmware_cluster_id is None and 'vmwareClusterId' in kwargs: + vmware_cluster_id = kwargs['vmwareClusterId'] + if vmware_cluster_id is None: + raise TypeError("Missing 'vmware_cluster_id' argument") + + _setter("netapp_volume_id", netapp_volume_id) + _setter("vmware_cluster_id", vmware_cluster_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="netappVolumeId") @@ -83,12 +106,31 @@ def __init__(__self__, *, > **NOTE :** please follow the prerequisites mentioned in this [article](https://learn.microsoft.com/en-us/azure/azure-vmware/attach-azure-netapp-files-to-azure-vmware-solution-hosts?tabs=azure-portal#prerequisites) before associating the netapp file volume to the vmware solution hosts. """ + _NetappVolumeAttachmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + netapp_volume_id=netapp_volume_id, + vmware_cluster_id=vmware_cluster_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + netapp_volume_id: Optional[pulumi.Input[str]] = None, + vmware_cluster_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if netapp_volume_id is None and 'netappVolumeId' in kwargs: + netapp_volume_id = kwargs['netappVolumeId'] + if vmware_cluster_id is None and 'vmwareClusterId' in kwargs: + vmware_cluster_id = kwargs['vmwareClusterId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if netapp_volume_id is not None: - pulumi.set(__self__, "netapp_volume_id", netapp_volume_id) + _setter("netapp_volume_id", netapp_volume_id) if vmware_cluster_id is not None: - pulumi.set(__self__, "vmware_cluster_id", vmware_cluster_id) + _setter("vmware_cluster_id", vmware_cluster_id) @property @pulumi.getter @@ -184,6 +226,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetappVolumeAttachmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/avs/outputs.py b/sdk/python/pulumi_azure/avs/outputs.py index 1df8b24333..79df93be15 100644 --- a/sdk/python/pulumi_azure/avs/outputs.py +++ b/sdk/python/pulumi_azure/avs/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -52,14 +52,39 @@ def __init__(__self__, *, :param str primary_subnet_cidr: The CIDR of the primary subnet. :param str secondary_subnet_cidr: The CIDR of the secondary subnet. """ + PrivateCloudCircuit._configure( + lambda key, value: pulumi.set(__self__, key, value), + express_route_id=express_route_id, + express_route_private_peering_id=express_route_private_peering_id, + primary_subnet_cidr=primary_subnet_cidr, + secondary_subnet_cidr=secondary_subnet_cidr, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + express_route_id: Optional[str] = None, + express_route_private_peering_id: Optional[str] = None, + primary_subnet_cidr: Optional[str] = None, + secondary_subnet_cidr: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if express_route_id is None and 'expressRouteId' in kwargs: + express_route_id = kwargs['expressRouteId'] + if express_route_private_peering_id is None and 'expressRoutePrivatePeeringId' in kwargs: + express_route_private_peering_id = kwargs['expressRoutePrivatePeeringId'] + if primary_subnet_cidr is None and 'primarySubnetCidr' in kwargs: + primary_subnet_cidr = kwargs['primarySubnetCidr'] + if secondary_subnet_cidr is None and 'secondarySubnetCidr' in kwargs: + secondary_subnet_cidr = kwargs['secondarySubnetCidr'] + if express_route_id is not None: - pulumi.set(__self__, "express_route_id", express_route_id) + _setter("express_route_id", express_route_id) if express_route_private_peering_id is not None: - pulumi.set(__self__, "express_route_private_peering_id", express_route_private_peering_id) + _setter("express_route_private_peering_id", express_route_private_peering_id) if primary_subnet_cidr is not None: - pulumi.set(__self__, "primary_subnet_cidr", primary_subnet_cidr) + _setter("primary_subnet_cidr", primary_subnet_cidr) if secondary_subnet_cidr is not None: - pulumi.set(__self__, "secondary_subnet_cidr", secondary_subnet_cidr) + _setter("secondary_subnet_cidr", secondary_subnet_cidr) @property @pulumi.getter(name="expressRouteId") @@ -105,11 +130,28 @@ def __init__(__self__, *, :param Sequence[str] hosts: A list of hosts in the management cluster. :param int id: The ID of the management cluster. """ - pulumi.set(__self__, "size", size) + PrivateCloudManagementCluster._configure( + lambda key, value: pulumi.set(__self__, key, value), + size=size, + hosts=hosts, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + size: Optional[int] = None, + hosts: Optional[Sequence[str]] = None, + id: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if size is None: + raise TypeError("Missing 'size' argument") + + _setter("size", size) if hosts is not None: - pulumi.set(__self__, "hosts", hosts) + _setter("hosts", hosts) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -149,10 +191,43 @@ def __init__(__self__, *, :param str primary_subnet_cidr: The CIDR of the primary subnet. :param str secondary_subnet_cidr: The CIDR of the secondary subnet. """ - pulumi.set(__self__, "express_route_id", express_route_id) - pulumi.set(__self__, "express_route_private_peering_id", express_route_private_peering_id) - pulumi.set(__self__, "primary_subnet_cidr", primary_subnet_cidr) - pulumi.set(__self__, "secondary_subnet_cidr", secondary_subnet_cidr) + GetPrivateCloudCircuitResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + express_route_id=express_route_id, + express_route_private_peering_id=express_route_private_peering_id, + primary_subnet_cidr=primary_subnet_cidr, + secondary_subnet_cidr=secondary_subnet_cidr, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + express_route_id: Optional[str] = None, + express_route_private_peering_id: Optional[str] = None, + primary_subnet_cidr: Optional[str] = None, + secondary_subnet_cidr: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if express_route_id is None and 'expressRouteId' in kwargs: + express_route_id = kwargs['expressRouteId'] + if express_route_id is None: + raise TypeError("Missing 'express_route_id' argument") + if express_route_private_peering_id is None and 'expressRoutePrivatePeeringId' in kwargs: + express_route_private_peering_id = kwargs['expressRoutePrivatePeeringId'] + if express_route_private_peering_id is None: + raise TypeError("Missing 'express_route_private_peering_id' argument") + if primary_subnet_cidr is None and 'primarySubnetCidr' in kwargs: + primary_subnet_cidr = kwargs['primarySubnetCidr'] + if primary_subnet_cidr is None: + raise TypeError("Missing 'primary_subnet_cidr' argument") + if secondary_subnet_cidr is None and 'secondarySubnetCidr' in kwargs: + secondary_subnet_cidr = kwargs['secondarySubnetCidr'] + if secondary_subnet_cidr is None: + raise TypeError("Missing 'secondary_subnet_cidr' argument") + + _setter("express_route_id", express_route_id) + _setter("express_route_private_peering_id", express_route_private_peering_id) + _setter("primary_subnet_cidr", primary_subnet_cidr) + _setter("secondary_subnet_cidr", secondary_subnet_cidr) @property @pulumi.getter(name="expressRouteId") @@ -198,9 +273,30 @@ def __init__(__self__, *, :param int id: The ID of the management cluster. :param int size: The size of the management cluster. """ - pulumi.set(__self__, "hosts", hosts) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "size", size) + GetPrivateCloudManagementClusterResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + hosts=hosts, + id=id, + size=size, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hosts: Optional[Sequence[str]] = None, + id: Optional[int] = None, + size: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hosts is None: + raise TypeError("Missing 'hosts' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if size is None: + raise TypeError("Missing 'size' argument") + + _setter("hosts", hosts) + _setter("id", id) + _setter("size", size) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/avs/private_cloud.py b/sdk/python/pulumi_azure/avs/private_cloud.py index de75faaf25..d1e96fea33 100644 --- a/sdk/python/pulumi_azure/avs/private_cloud.py +++ b/sdk/python/pulumi_azure/avs/private_cloud.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,22 +41,73 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the VMware Private Cloud. :param pulumi.Input[str] vcenter_password: The password of the vCenter admin. Changing this forces a new VMware Private Cloud to be created. """ - pulumi.set(__self__, "management_cluster", management_cluster) - pulumi.set(__self__, "network_subnet_cidr", network_subnet_cidr) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + PrivateCloudArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_cluster=management_cluster, + network_subnet_cidr=network_subnet_cidr, + resource_group_name=resource_group_name, + sku_name=sku_name, + internet_connection_enabled=internet_connection_enabled, + location=location, + name=name, + nsxt_password=nsxt_password, + tags=tags, + vcenter_password=vcenter_password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_cluster: Optional[pulumi.Input['PrivateCloudManagementClusterArgs']] = None, + network_subnet_cidr: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + internet_connection_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + nsxt_password: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + vcenter_password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_cluster is None and 'managementCluster' in kwargs: + management_cluster = kwargs['managementCluster'] + if management_cluster is None: + raise TypeError("Missing 'management_cluster' argument") + if network_subnet_cidr is None and 'networkSubnetCidr' in kwargs: + network_subnet_cidr = kwargs['networkSubnetCidr'] + if network_subnet_cidr is None: + raise TypeError("Missing 'network_subnet_cidr' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if internet_connection_enabled is None and 'internetConnectionEnabled' in kwargs: + internet_connection_enabled = kwargs['internetConnectionEnabled'] + if nsxt_password is None and 'nsxtPassword' in kwargs: + nsxt_password = kwargs['nsxtPassword'] + if vcenter_password is None and 'vcenterPassword' in kwargs: + vcenter_password = kwargs['vcenterPassword'] + + _setter("management_cluster", management_cluster) + _setter("network_subnet_cidr", network_subnet_cidr) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if internet_connection_enabled is not None: - pulumi.set(__self__, "internet_connection_enabled", internet_connection_enabled) + _setter("internet_connection_enabled", internet_connection_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if nsxt_password is not None: - pulumi.set(__self__, "nsxt_password", nsxt_password) + _setter("nsxt_password", nsxt_password) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if vcenter_password is not None: - pulumi.set(__self__, "vcenter_password", vcenter_password) + _setter("vcenter_password", vcenter_password) @property @pulumi.getter(name="managementCluster") @@ -227,44 +278,121 @@ def __init__(__self__, *, :param pulumi.Input[str] vcsa_endpoint: The endpoint for Virtual Center Server Appliance. :param pulumi.Input[str] vmotion_subnet_cidr: The network which is used for live migration of virtual machines. """ + _PrivateCloudState._configure( + lambda key, value: pulumi.set(__self__, key, value), + circuits=circuits, + hcx_cloud_manager_endpoint=hcx_cloud_manager_endpoint, + internet_connection_enabled=internet_connection_enabled, + location=location, + management_cluster=management_cluster, + management_subnet_cidr=management_subnet_cidr, + name=name, + network_subnet_cidr=network_subnet_cidr, + nsxt_certificate_thumbprint=nsxt_certificate_thumbprint, + nsxt_manager_endpoint=nsxt_manager_endpoint, + nsxt_password=nsxt_password, + provisioning_subnet_cidr=provisioning_subnet_cidr, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + vcenter_certificate_thumbprint=vcenter_certificate_thumbprint, + vcenter_password=vcenter_password, + vcsa_endpoint=vcsa_endpoint, + vmotion_subnet_cidr=vmotion_subnet_cidr, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + circuits: Optional[pulumi.Input[Sequence[pulumi.Input['PrivateCloudCircuitArgs']]]] = None, + hcx_cloud_manager_endpoint: Optional[pulumi.Input[str]] = None, + internet_connection_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + management_cluster: Optional[pulumi.Input['PrivateCloudManagementClusterArgs']] = None, + management_subnet_cidr: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_subnet_cidr: Optional[pulumi.Input[str]] = None, + nsxt_certificate_thumbprint: Optional[pulumi.Input[str]] = None, + nsxt_manager_endpoint: Optional[pulumi.Input[str]] = None, + nsxt_password: Optional[pulumi.Input[str]] = None, + provisioning_subnet_cidr: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + vcenter_certificate_thumbprint: Optional[pulumi.Input[str]] = None, + vcenter_password: Optional[pulumi.Input[str]] = None, + vcsa_endpoint: Optional[pulumi.Input[str]] = None, + vmotion_subnet_cidr: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hcx_cloud_manager_endpoint is None and 'hcxCloudManagerEndpoint' in kwargs: + hcx_cloud_manager_endpoint = kwargs['hcxCloudManagerEndpoint'] + if internet_connection_enabled is None and 'internetConnectionEnabled' in kwargs: + internet_connection_enabled = kwargs['internetConnectionEnabled'] + if management_cluster is None and 'managementCluster' in kwargs: + management_cluster = kwargs['managementCluster'] + if management_subnet_cidr is None and 'managementSubnetCidr' in kwargs: + management_subnet_cidr = kwargs['managementSubnetCidr'] + if network_subnet_cidr is None and 'networkSubnetCidr' in kwargs: + network_subnet_cidr = kwargs['networkSubnetCidr'] + if nsxt_certificate_thumbprint is None and 'nsxtCertificateThumbprint' in kwargs: + nsxt_certificate_thumbprint = kwargs['nsxtCertificateThumbprint'] + if nsxt_manager_endpoint is None and 'nsxtManagerEndpoint' in kwargs: + nsxt_manager_endpoint = kwargs['nsxtManagerEndpoint'] + if nsxt_password is None and 'nsxtPassword' in kwargs: + nsxt_password = kwargs['nsxtPassword'] + if provisioning_subnet_cidr is None and 'provisioningSubnetCidr' in kwargs: + provisioning_subnet_cidr = kwargs['provisioningSubnetCidr'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if vcenter_certificate_thumbprint is None and 'vcenterCertificateThumbprint' in kwargs: + vcenter_certificate_thumbprint = kwargs['vcenterCertificateThumbprint'] + if vcenter_password is None and 'vcenterPassword' in kwargs: + vcenter_password = kwargs['vcenterPassword'] + if vcsa_endpoint is None and 'vcsaEndpoint' in kwargs: + vcsa_endpoint = kwargs['vcsaEndpoint'] + if vmotion_subnet_cidr is None and 'vmotionSubnetCidr' in kwargs: + vmotion_subnet_cidr = kwargs['vmotionSubnetCidr'] + if circuits is not None: - pulumi.set(__self__, "circuits", circuits) + _setter("circuits", circuits) if hcx_cloud_manager_endpoint is not None: - pulumi.set(__self__, "hcx_cloud_manager_endpoint", hcx_cloud_manager_endpoint) + _setter("hcx_cloud_manager_endpoint", hcx_cloud_manager_endpoint) if internet_connection_enabled is not None: - pulumi.set(__self__, "internet_connection_enabled", internet_connection_enabled) + _setter("internet_connection_enabled", internet_connection_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if management_cluster is not None: - pulumi.set(__self__, "management_cluster", management_cluster) + _setter("management_cluster", management_cluster) if management_subnet_cidr is not None: - pulumi.set(__self__, "management_subnet_cidr", management_subnet_cidr) + _setter("management_subnet_cidr", management_subnet_cidr) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_subnet_cidr is not None: - pulumi.set(__self__, "network_subnet_cidr", network_subnet_cidr) + _setter("network_subnet_cidr", network_subnet_cidr) if nsxt_certificate_thumbprint is not None: - pulumi.set(__self__, "nsxt_certificate_thumbprint", nsxt_certificate_thumbprint) + _setter("nsxt_certificate_thumbprint", nsxt_certificate_thumbprint) if nsxt_manager_endpoint is not None: - pulumi.set(__self__, "nsxt_manager_endpoint", nsxt_manager_endpoint) + _setter("nsxt_manager_endpoint", nsxt_manager_endpoint) if nsxt_password is not None: - pulumi.set(__self__, "nsxt_password", nsxt_password) + _setter("nsxt_password", nsxt_password) if provisioning_subnet_cidr is not None: - pulumi.set(__self__, "provisioning_subnet_cidr", provisioning_subnet_cidr) + _setter("provisioning_subnet_cidr", provisioning_subnet_cidr) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if vcenter_certificate_thumbprint is not None: - pulumi.set(__self__, "vcenter_certificate_thumbprint", vcenter_certificate_thumbprint) + _setter("vcenter_certificate_thumbprint", vcenter_certificate_thumbprint) if vcenter_password is not None: - pulumi.set(__self__, "vcenter_password", vcenter_password) + _setter("vcenter_password", vcenter_password) if vcsa_endpoint is not None: - pulumi.set(__self__, "vcsa_endpoint", vcsa_endpoint) + _setter("vcsa_endpoint", vcsa_endpoint) if vmotion_subnet_cidr is not None: - pulumi.set(__self__, "vmotion_subnet_cidr", vmotion_subnet_cidr) + _setter("vmotion_subnet_cidr", vmotion_subnet_cidr) @property @pulumi.getter @@ -610,6 +738,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PrivateCloudArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -636,6 +768,11 @@ def _internal_init(__self__, __props__.__dict__["internet_connection_enabled"] = internet_connection_enabled __props__.__dict__["location"] = location + if management_cluster is not None and not isinstance(management_cluster, PrivateCloudManagementClusterArgs): + management_cluster = management_cluster or {} + def _setter(key, value): + management_cluster[key] = value + PrivateCloudManagementClusterArgs._configure(_setter, **management_cluster) if management_cluster is None and not opts.urn: raise TypeError("Missing required property 'management_cluster'") __props__.__dict__["management_cluster"] = management_cluster diff --git a/sdk/python/pulumi_azure/backup/_inputs.py b/sdk/python/pulumi_azure/backup/_inputs.py index 9670c28350..57ab042a81 100644 --- a/sdk/python/pulumi_azure/backup/_inputs.py +++ b/sdk/python/pulumi_azure/backup/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -47,11 +47,28 @@ def __init__(__self__, *, > **NOTE:** `time` is required when `frequency` is set to `Daily`. """ - pulumi.set(__self__, "frequency", frequency) + PolicyFileShareBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency=frequency, + hourly=hourly, + time=time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency: Optional[pulumi.Input[str]] = None, + hourly: Optional[pulumi.Input['PolicyFileShareBackupHourlyArgs']] = None, + time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency is None: + raise TypeError("Missing 'frequency' argument") + + _setter("frequency", frequency) if hourly is not None: - pulumi.set(__self__, "hourly", hourly) + _setter("hourly", hourly) if time is not None: - pulumi.set(__self__, "time", time) + _setter("time", time) @property @pulumi.getter @@ -105,9 +122,34 @@ def __init__(__self__, *, :param pulumi.Input[str] start_time: Specifies the start time of the hourly backup. The time format should be in 24-hour format. Times must be either on the hour or half hour (e.g. 12:00, 12:30, 13:00, etc.) :param pulumi.Input[int] window_duration: Species the duration of the backup window in hours. Details could be found [here](https://learn.microsoft.com/en-us/azure/backup/backup-azure-files-faq#what-does-the-duration-attribute-in-azure-files-backup-policy-signify-) """ - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "start_time", start_time) - pulumi.set(__self__, "window_duration", window_duration) + PolicyFileShareBackupHourlyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + interval=interval, + start_time=start_time, + window_duration=window_duration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + interval: Optional[pulumi.Input[int]] = None, + start_time: Optional[pulumi.Input[str]] = None, + window_duration: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if interval is None: + raise TypeError("Missing 'interval' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + if window_duration is None and 'windowDuration' in kwargs: + window_duration = kwargs['windowDuration'] + if window_duration is None: + raise TypeError("Missing 'window_duration' argument") + + _setter("interval", interval) + _setter("start_time", start_time) + _setter("window_duration", window_duration) @property @pulumi.getter @@ -153,7 +195,20 @@ def __init__(__self__, *, """ :param pulumi.Input[int] count: The number of daily backups to keep. Must be between `1` and `200` (inclusive) """ - pulumi.set(__self__, "count", count) + PolicyFileShareRetentionDailyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + + _setter("count", count) @property @pulumi.getter @@ -185,15 +240,38 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] weekdays: The weekday backups to retain . Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. :param pulumi.Input[Sequence[pulumi.Input[str]]] weeks: The weeks of the month to retain backups of. Must be one of `First`, `Second`, `Third`, `Fourth`, `Last`. """ - pulumi.set(__self__, "count", count) + PolicyFileShareRetentionMonthlyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + days=days, + include_last_days=include_last_days, + weekdays=weekdays, + weeks=weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + days: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + include_last_days: Optional[pulumi.Input[bool]] = None, + weekdays: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if include_last_days is None and 'includeLastDays' in kwargs: + include_last_days = kwargs['includeLastDays'] + + _setter("count", count) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if include_last_days is not None: - pulumi.set(__self__, "include_last_days", include_last_days) + _setter("include_last_days", include_last_days) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) if weeks is not None: - pulumi.set(__self__, "weeks", weeks) + _setter("weeks", weeks) @property @pulumi.getter @@ -267,8 +345,25 @@ def __init__(__self__, *, :param pulumi.Input[int] count: The number of daily backups to keep. Must be between `1` and `200` (inclusive) :param pulumi.Input[Sequence[pulumi.Input[str]]] weekdays: The weekday backups to retain. Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "weekdays", weekdays) + PolicyFileShareRetentionWeeklyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + weekdays=weekdays, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + weekdays: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if weekdays is None: + raise TypeError("Missing 'weekdays' argument") + + _setter("count", count) + _setter("weekdays", weekdays) @property @pulumi.getter @@ -314,16 +409,43 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] weekdays: The weekday backups to retain . Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. :param pulumi.Input[Sequence[pulumi.Input[str]]] weeks: The weeks of the month to retain backups of. Must be one of `First`, `Second`, `Third`, `Fourth`, `Last`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "months", months) + PolicyFileShareRetentionYearlyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + months=months, + days=days, + include_last_days=include_last_days, + weekdays=weekdays, + weeks=weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + months: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + days: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + include_last_days: Optional[pulumi.Input[bool]] = None, + weekdays: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if months is None: + raise TypeError("Missing 'months' argument") + if include_last_days is None and 'includeLastDays' in kwargs: + include_last_days = kwargs['includeLastDays'] + + _setter("count", count) + _setter("months", months) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if include_last_days is not None: - pulumi.set(__self__, "include_last_days", include_last_days) + _setter("include_last_days", include_last_days) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) if weeks is not None: - pulumi.set(__self__, "weeks", weeks) + _setter("weeks", weeks) @property @pulumi.getter @@ -417,14 +539,41 @@ def __init__(__self__, *, :param pulumi.Input[int] hour_interval: Interval in hour at which backup is triggered. Possible values are `4`, `6`, `8` and `12`. This is used when `frequency` is `Hourly`. :param pulumi.Input[Sequence[pulumi.Input[str]]] weekdays: The days of the week to perform backups on. Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. This is used when `frequency` is `Weekly`. """ - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "time", time) + PolicyVMBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency=frequency, + time=time, + hour_duration=hour_duration, + hour_interval=hour_interval, + weekdays=weekdays, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency: Optional[pulumi.Input[str]] = None, + time: Optional[pulumi.Input[str]] = None, + hour_duration: Optional[pulumi.Input[int]] = None, + hour_interval: Optional[pulumi.Input[int]] = None, + weekdays: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if time is None: + raise TypeError("Missing 'time' argument") + if hour_duration is None and 'hourDuration' in kwargs: + hour_duration = kwargs['hourDuration'] + if hour_interval is None and 'hourInterval' in kwargs: + hour_interval = kwargs['hourInterval'] + + _setter("frequency", frequency) + _setter("time", time) if hour_duration is not None: - pulumi.set(__self__, "hour_duration", hour_duration) + _setter("hour_duration", hour_duration) if hour_interval is not None: - pulumi.set(__self__, "hour_interval", hour_interval) + _setter("hour_interval", hour_interval) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) @property @pulumi.getter @@ -498,9 +647,24 @@ def __init__(__self__, *, :param pulumi.Input[str] prefix: The prefix for the `instant_restore_resource_group` name. :param pulumi.Input[str] suffix: The suffix for the `instant_restore_resource_group` name. """ - pulumi.set(__self__, "prefix", prefix) + PolicyVMInstantRestoreResourceGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + prefix=prefix, + suffix=suffix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + prefix: Optional[pulumi.Input[str]] = None, + suffix: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if prefix is None: + raise TypeError("Missing 'prefix' argument") + + _setter("prefix", prefix) if suffix is not None: - pulumi.set(__self__, "suffix", suffix) + _setter("suffix", suffix) @property @pulumi.getter @@ -536,7 +700,20 @@ def __init__(__self__, *, > **Note:** Azure previously allows this field to be set to a minimum of 1 (day) - but for new resources/to update this value on existing Backup Policies - this value must now be at least 7 (days). """ - pulumi.set(__self__, "count", count) + PolicyVMRetentionDailyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + + _setter("count", count) @property @pulumi.getter @@ -570,15 +747,38 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] weekdays: The weekday backups to retain . Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. :param pulumi.Input[Sequence[pulumi.Input[str]]] weeks: The weeks of the month to retain backups of. Must be one of `First`, `Second`, `Third`, `Fourth`, `Last`. """ - pulumi.set(__self__, "count", count) + PolicyVMRetentionMonthlyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + days=days, + include_last_days=include_last_days, + weekdays=weekdays, + weeks=weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + days: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + include_last_days: Optional[pulumi.Input[bool]] = None, + weekdays: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if include_last_days is None and 'includeLastDays' in kwargs: + include_last_days = kwargs['includeLastDays'] + + _setter("count", count) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if include_last_days is not None: - pulumi.set(__self__, "include_last_days", include_last_days) + _setter("include_last_days", include_last_days) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) if weeks is not None: - pulumi.set(__self__, "weeks", weeks) + _setter("weeks", weeks) @property @pulumi.getter @@ -652,8 +852,25 @@ def __init__(__self__, *, :param pulumi.Input[int] count: The number of weekly backups to keep. Must be between `1` and `9999` :param pulumi.Input[Sequence[pulumi.Input[str]]] weekdays: The weekday backups to retain. Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "weekdays", weekdays) + PolicyVMRetentionWeeklyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + weekdays=weekdays, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + weekdays: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if weekdays is None: + raise TypeError("Missing 'weekdays' argument") + + _setter("count", count) + _setter("weekdays", weekdays) @property @pulumi.getter @@ -699,16 +916,43 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] weekdays: The weekday backups to retain . Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. :param pulumi.Input[Sequence[pulumi.Input[str]]] weeks: The weeks of the month to retain backups of. Must be one of `First`, `Second`, `Third`, `Fourth`, `Last`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "months", months) + PolicyVMRetentionYearlyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + months=months, + days=days, + include_last_days=include_last_days, + weekdays=weekdays, + weeks=weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + months: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + days: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + include_last_days: Optional[pulumi.Input[bool]] = None, + weekdays: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if months is None: + raise TypeError("Missing 'months' argument") + if include_last_days is None and 'includeLastDays' in kwargs: + include_last_days = kwargs['includeLastDays'] + + _setter("count", count) + _setter("months", months) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if include_last_days is not None: - pulumi.set(__self__, "include_last_days", include_last_days) + _setter("include_last_days", include_last_days) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) if weeks is not None: - pulumi.set(__self__, "weeks", weeks) + _setter("weeks", weeks) @property @pulumi.getter @@ -804,18 +1048,57 @@ def __init__(__self__, *, :param pulumi.Input['PolicyVMWorkloadProtectionPolicyRetentionYearlyArgs'] retention_yearly: A `retention_yearly` block as defined below. :param pulumi.Input['PolicyVMWorkloadProtectionPolicySimpleRetentionArgs'] simple_retention: A `simple_retention` block as defined below. """ - pulumi.set(__self__, "backup", backup) - pulumi.set(__self__, "policy_type", policy_type) + PolicyVMWorkloadProtectionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup=backup, + policy_type=policy_type, + retention_daily=retention_daily, + retention_monthly=retention_monthly, + retention_weekly=retention_weekly, + retention_yearly=retention_yearly, + simple_retention=simple_retention, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup: Optional[pulumi.Input['PolicyVMWorkloadProtectionPolicyBackupArgs']] = None, + policy_type: Optional[pulumi.Input[str]] = None, + retention_daily: Optional[pulumi.Input['PolicyVMWorkloadProtectionPolicyRetentionDailyArgs']] = None, + retention_monthly: Optional[pulumi.Input['PolicyVMWorkloadProtectionPolicyRetentionMonthlyArgs']] = None, + retention_weekly: Optional[pulumi.Input['PolicyVMWorkloadProtectionPolicyRetentionWeeklyArgs']] = None, + retention_yearly: Optional[pulumi.Input['PolicyVMWorkloadProtectionPolicyRetentionYearlyArgs']] = None, + simple_retention: Optional[pulumi.Input['PolicyVMWorkloadProtectionPolicySimpleRetentionArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup is None: + raise TypeError("Missing 'backup' argument") + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if policy_type is None: + raise TypeError("Missing 'policy_type' argument") + if retention_daily is None and 'retentionDaily' in kwargs: + retention_daily = kwargs['retentionDaily'] + if retention_monthly is None and 'retentionMonthly' in kwargs: + retention_monthly = kwargs['retentionMonthly'] + if retention_weekly is None and 'retentionWeekly' in kwargs: + retention_weekly = kwargs['retentionWeekly'] + if retention_yearly is None and 'retentionYearly' in kwargs: + retention_yearly = kwargs['retentionYearly'] + if simple_retention is None and 'simpleRetention' in kwargs: + simple_retention = kwargs['simpleRetention'] + + _setter("backup", backup) + _setter("policy_type", policy_type) if retention_daily is not None: - pulumi.set(__self__, "retention_daily", retention_daily) + _setter("retention_daily", retention_daily) if retention_monthly is not None: - pulumi.set(__self__, "retention_monthly", retention_monthly) + _setter("retention_monthly", retention_monthly) if retention_weekly is not None: - pulumi.set(__self__, "retention_weekly", retention_weekly) + _setter("retention_weekly", retention_weekly) if retention_yearly is not None: - pulumi.set(__self__, "retention_yearly", retention_yearly) + _setter("retention_yearly", retention_yearly) if simple_retention is not None: - pulumi.set(__self__, "simple_retention", simple_retention) + _setter("simple_retention", simple_retention) @property @pulumi.getter @@ -915,14 +1198,33 @@ def __init__(__self__, *, :param pulumi.Input[str] time: The time of day to perform the backup in 24hour format. :param pulumi.Input[Sequence[pulumi.Input[str]]] weekdays: The days of the week to perform backups on. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. This is used when `frequency` is `Weekly`. """ + PolicyVMWorkloadProtectionPolicyBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency=frequency, + frequency_in_minutes=frequency_in_minutes, + time=time, + weekdays=weekdays, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency: Optional[pulumi.Input[str]] = None, + frequency_in_minutes: Optional[pulumi.Input[int]] = None, + time: Optional[pulumi.Input[str]] = None, + weekdays: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_in_minutes is None and 'frequencyInMinutes' in kwargs: + frequency_in_minutes = kwargs['frequencyInMinutes'] + if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if frequency_in_minutes is not None: - pulumi.set(__self__, "frequency_in_minutes", frequency_in_minutes) + _setter("frequency_in_minutes", frequency_in_minutes) if time is not None: - pulumi.set(__self__, "time", time) + _setter("time", time) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) @property @pulumi.getter @@ -980,7 +1282,20 @@ def __init__(__self__, *, """ :param pulumi.Input[int] count: The number of daily backups to keep. Possible values are between `7` and `9999`. """ - pulumi.set(__self__, "count", count) + PolicyVMWorkloadProtectionPolicyRetentionDailyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + + _setter("count", count) @property @pulumi.getter @@ -1010,14 +1325,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] weekdays: The weekday backups to retain. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. :param pulumi.Input[Sequence[pulumi.Input[str]]] weeks: The weeks of the month to retain backups of. Possible values are `First`, `Second`, `Third`, `Fourth` and `Last`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "format_type", format_type) + PolicyVMWorkloadProtectionPolicyRetentionMonthlyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + format_type=format_type, + monthdays=monthdays, + weekdays=weekdays, + weeks=weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + format_type: Optional[pulumi.Input[str]] = None, + monthdays: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + weekdays: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if format_type is None and 'formatType' in kwargs: + format_type = kwargs['formatType'] + if format_type is None: + raise TypeError("Missing 'format_type' argument") + + _setter("count", count) + _setter("format_type", format_type) if monthdays is not None: - pulumi.set(__self__, "monthdays", monthdays) + _setter("monthdays", monthdays) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) if weeks is not None: - pulumi.set(__self__, "weeks", weeks) + _setter("weeks", weeks) @property @pulumi.getter @@ -1089,8 +1429,25 @@ def __init__(__self__, *, :param pulumi.Input[int] count: The number of weekly backups to keep. Possible values are between `1` and `5163`. :param pulumi.Input[Sequence[pulumi.Input[str]]] weekdays: The weekday backups to retain. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "weekdays", weekdays) + PolicyVMWorkloadProtectionPolicyRetentionWeeklyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + weekdays=weekdays, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + weekdays: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if weekdays is None: + raise TypeError("Missing 'weekdays' argument") + + _setter("count", count) + _setter("weekdays", weekdays) @property @pulumi.getter @@ -1134,15 +1491,44 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] weekdays: The weekday backups to retain. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. :param pulumi.Input[Sequence[pulumi.Input[str]]] weeks: The weeks of the month to retain backups of. Possible values are `First`, `Second`, `Third`, `Fourth`, `Last`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "format_type", format_type) - pulumi.set(__self__, "months", months) + PolicyVMWorkloadProtectionPolicyRetentionYearlyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + format_type=format_type, + months=months, + monthdays=monthdays, + weekdays=weekdays, + weeks=weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + format_type: Optional[pulumi.Input[str]] = None, + months: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + monthdays: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + weekdays: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if format_type is None and 'formatType' in kwargs: + format_type = kwargs['formatType'] + if format_type is None: + raise TypeError("Missing 'format_type' argument") + if months is None: + raise TypeError("Missing 'months' argument") + + _setter("count", count) + _setter("format_type", format_type) + _setter("months", months) if monthdays is not None: - pulumi.set(__self__, "monthdays", monthdays) + _setter("monthdays", monthdays) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) if weeks is not None: - pulumi.set(__self__, "weeks", weeks) + _setter("weeks", weeks) @property @pulumi.getter @@ -1224,7 +1610,20 @@ def __init__(__self__, *, """ :param pulumi.Input[int] count: The count that is used to count retention duration with duration type `Days`. Possible values are between `7` and `35`. """ - pulumi.set(__self__, "count", count) + PolicyVMWorkloadProtectionPolicySimpleRetentionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + + _setter("count", count) @property @pulumi.getter @@ -1248,9 +1647,28 @@ def __init__(__self__, *, :param pulumi.Input[str] time_zone: The timezone for the VM Workload Backup Policy. [The possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). :param pulumi.Input[bool] compression_enabled: The compression setting for the VM Workload Backup Policy. Defaults to `false`. """ - pulumi.set(__self__, "time_zone", time_zone) + PolicyVMWorkloadSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + time_zone=time_zone, + compression_enabled=compression_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time_zone: Optional[pulumi.Input[str]] = None, + compression_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if time_zone is None: + raise TypeError("Missing 'time_zone' argument") + if compression_enabled is None and 'compressionEnabled' in kwargs: + compression_enabled = kwargs['compressionEnabled'] + + _setter("time_zone", time_zone) if compression_enabled is not None: - pulumi.set(__self__, "compression_enabled", compression_enabled) + _setter("compression_enabled", compression_enabled) @property @pulumi.getter(name="timeZone") diff --git a/sdk/python/pulumi_azure/backup/container_storage_account.py b/sdk/python/pulumi_azure/backup/container_storage_account.py index 304582569e..57391d79ec 100644 --- a/sdk/python/pulumi_azure/backup/container_storage_account.py +++ b/sdk/python/pulumi_azure/backup/container_storage_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ContainerStorageAccountArgs', 'ContainerStorageAccount'] @@ -25,9 +25,36 @@ def __init__(__self__, *, > **NOTE** Azure Backup places a Resource Lock on the storage account that will cause deletion to fail until the account is unregistered from Azure Backup """ - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + ContainerStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if recovery_vault_name is None: + raise TypeError("Missing 'recovery_vault_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + + _setter("recovery_vault_name", recovery_vault_name) + _setter("resource_group_name", resource_group_name) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="recoveryVaultName") @@ -82,12 +109,33 @@ def __init__(__self__, *, > **NOTE** Azure Backup places a Resource Lock on the storage account that will cause deletion to fail until the account is unregistered from Azure Backup """ + _ContainerStorageAccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if recovery_vault_name is not None: - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) + _setter("recovery_vault_name", recovery_vault_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="recoveryVaultName") @@ -231,6 +279,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ContainerStorageAccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/backup/get_policy_fileshare.py b/sdk/python/pulumi_azure/backup/get_policy_fileshare.py index 694ca76660..2e949210c9 100644 --- a/sdk/python/pulumi_azure/backup/get_policy_fileshare.py +++ b/sdk/python/pulumi_azure/backup/get_policy_fileshare.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/backup/get_policy_vm.py b/sdk/python/pulumi_azure/backup/get_policy_vm.py index 27753aa710..718b9964f4 100644 --- a/sdk/python/pulumi_azure/backup/get_policy_vm.py +++ b/sdk/python/pulumi_azure/backup/get_policy_vm.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/backup/outputs.py b/sdk/python/pulumi_azure/backup/outputs.py index 364d44e7b9..9613631112 100644 --- a/sdk/python/pulumi_azure/backup/outputs.py +++ b/sdk/python/pulumi_azure/backup/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -48,11 +48,28 @@ def __init__(__self__, *, > **NOTE:** `time` is required when `frequency` is set to `Daily`. """ - pulumi.set(__self__, "frequency", frequency) + PolicyFileShareBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency=frequency, + hourly=hourly, + time=time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency: Optional[str] = None, + hourly: Optional['outputs.PolicyFileShareBackupHourly'] = None, + time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency is None: + raise TypeError("Missing 'frequency' argument") + + _setter("frequency", frequency) if hourly is not None: - pulumi.set(__self__, "hourly", hourly) + _setter("hourly", hourly) if time is not None: - pulumi.set(__self__, "time", time) + _setter("time", time) @property @pulumi.getter @@ -113,9 +130,34 @@ def __init__(__self__, *, :param str start_time: Specifies the start time of the hourly backup. The time format should be in 24-hour format. Times must be either on the hour or half hour (e.g. 12:00, 12:30, 13:00, etc.) :param int window_duration: Species the duration of the backup window in hours. Details could be found [here](https://learn.microsoft.com/en-us/azure/backup/backup-azure-files-faq#what-does-the-duration-attribute-in-azure-files-backup-policy-signify-) """ - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "start_time", start_time) - pulumi.set(__self__, "window_duration", window_duration) + PolicyFileShareBackupHourly._configure( + lambda key, value: pulumi.set(__self__, key, value), + interval=interval, + start_time=start_time, + window_duration=window_duration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + interval: Optional[int] = None, + start_time: Optional[str] = None, + window_duration: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if interval is None: + raise TypeError("Missing 'interval' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + if window_duration is None and 'windowDuration' in kwargs: + window_duration = kwargs['windowDuration'] + if window_duration is None: + raise TypeError("Missing 'window_duration' argument") + + _setter("interval", interval) + _setter("start_time", start_time) + _setter("window_duration", window_duration) @property @pulumi.getter @@ -149,7 +191,20 @@ def __init__(__self__, *, """ :param int count: The number of daily backups to keep. Must be between `1` and `200` (inclusive) """ - pulumi.set(__self__, "count", count) + PolicyFileShareRetentionDaily._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + + _setter("count", count) @property @pulumi.getter @@ -194,15 +249,38 @@ def __init__(__self__, *, :param Sequence[str] weekdays: The weekday backups to retain . Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. :param Sequence[str] weeks: The weeks of the month to retain backups of. Must be one of `First`, `Second`, `Third`, `Fourth`, `Last`. """ - pulumi.set(__self__, "count", count) + PolicyFileShareRetentionMonthly._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + days=days, + include_last_days=include_last_days, + weekdays=weekdays, + weeks=weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + days: Optional[Sequence[int]] = None, + include_last_days: Optional[bool] = None, + weekdays: Optional[Sequence[str]] = None, + weeks: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if include_last_days is None and 'includeLastDays' in kwargs: + include_last_days = kwargs['includeLastDays'] + + _setter("count", count) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if include_last_days is not None: - pulumi.set(__self__, "include_last_days", include_last_days) + _setter("include_last_days", include_last_days) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) if weeks is not None: - pulumi.set(__self__, "weeks", weeks) + _setter("weeks", weeks) @property @pulumi.getter @@ -256,8 +334,25 @@ def __init__(__self__, *, :param int count: The number of daily backups to keep. Must be between `1` and `200` (inclusive) :param Sequence[str] weekdays: The weekday backups to retain. Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "weekdays", weekdays) + PolicyFileShareRetentionWeekly._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + weekdays=weekdays, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + weekdays: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if weekdays is None: + raise TypeError("Missing 'weekdays' argument") + + _setter("count", count) + _setter("weekdays", weekdays) @property @pulumi.getter @@ -312,16 +407,43 @@ def __init__(__self__, *, :param Sequence[str] weekdays: The weekday backups to retain . Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. :param Sequence[str] weeks: The weeks of the month to retain backups of. Must be one of `First`, `Second`, `Third`, `Fourth`, `Last`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "months", months) + PolicyFileShareRetentionYearly._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + months=months, + days=days, + include_last_days=include_last_days, + weekdays=weekdays, + weeks=weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + months: Optional[Sequence[str]] = None, + days: Optional[Sequence[int]] = None, + include_last_days: Optional[bool] = None, + weekdays: Optional[Sequence[str]] = None, + weeks: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if months is None: + raise TypeError("Missing 'months' argument") + if include_last_days is None and 'includeLastDays' in kwargs: + include_last_days = kwargs['includeLastDays'] + + _setter("count", count) + _setter("months", months) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if include_last_days is not None: - pulumi.set(__self__, "include_last_days", include_last_days) + _setter("include_last_days", include_last_days) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) if weeks is not None: - pulumi.set(__self__, "weeks", weeks) + _setter("weeks", weeks) @property @pulumi.getter @@ -410,14 +532,41 @@ def __init__(__self__, *, :param int hour_interval: Interval in hour at which backup is triggered. Possible values are `4`, `6`, `8` and `12`. This is used when `frequency` is `Hourly`. :param Sequence[str] weekdays: The days of the week to perform backups on. Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. This is used when `frequency` is `Weekly`. """ - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "time", time) + PolicyVMBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency=frequency, + time=time, + hour_duration=hour_duration, + hour_interval=hour_interval, + weekdays=weekdays, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency: Optional[str] = None, + time: Optional[str] = None, + hour_duration: Optional[int] = None, + hour_interval: Optional[int] = None, + weekdays: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if time is None: + raise TypeError("Missing 'time' argument") + if hour_duration is None and 'hourDuration' in kwargs: + hour_duration = kwargs['hourDuration'] + if hour_interval is None and 'hourInterval' in kwargs: + hour_interval = kwargs['hourInterval'] + + _setter("frequency", frequency) + _setter("time", time) if hour_duration is not None: - pulumi.set(__self__, "hour_duration", hour_duration) + _setter("hour_duration", hour_duration) if hour_interval is not None: - pulumi.set(__self__, "hour_interval", hour_interval) + _setter("hour_interval", hour_interval) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) @property @pulumi.getter @@ -471,9 +620,24 @@ def __init__(__self__, *, :param str prefix: The prefix for the `instant_restore_resource_group` name. :param str suffix: The suffix for the `instant_restore_resource_group` name. """ - pulumi.set(__self__, "prefix", prefix) + PolicyVMInstantRestoreResourceGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + prefix=prefix, + suffix=suffix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + prefix: Optional[str] = None, + suffix: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if prefix is None: + raise TypeError("Missing 'prefix' argument") + + _setter("prefix", prefix) if suffix is not None: - pulumi.set(__self__, "suffix", suffix) + _setter("suffix", suffix) @property @pulumi.getter @@ -501,7 +665,20 @@ def __init__(__self__, *, > **Note:** Azure previously allows this field to be set to a minimum of 1 (day) - but for new resources/to update this value on existing Backup Policies - this value must now be at least 7 (days). """ - pulumi.set(__self__, "count", count) + PolicyVMRetentionDaily._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + + _setter("count", count) @property @pulumi.getter @@ -548,15 +725,38 @@ def __init__(__self__, *, :param Sequence[str] weekdays: The weekday backups to retain . Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. :param Sequence[str] weeks: The weeks of the month to retain backups of. Must be one of `First`, `Second`, `Third`, `Fourth`, `Last`. """ - pulumi.set(__self__, "count", count) + PolicyVMRetentionMonthly._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + days=days, + include_last_days=include_last_days, + weekdays=weekdays, + weeks=weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + days: Optional[Sequence[int]] = None, + include_last_days: Optional[bool] = None, + weekdays: Optional[Sequence[str]] = None, + weeks: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if include_last_days is None and 'includeLastDays' in kwargs: + include_last_days = kwargs['includeLastDays'] + + _setter("count", count) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if include_last_days is not None: - pulumi.set(__self__, "include_last_days", include_last_days) + _setter("include_last_days", include_last_days) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) if weeks is not None: - pulumi.set(__self__, "weeks", weeks) + _setter("weeks", weeks) @property @pulumi.getter @@ -610,8 +810,25 @@ def __init__(__self__, *, :param int count: The number of weekly backups to keep. Must be between `1` and `9999` :param Sequence[str] weekdays: The weekday backups to retain. Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "weekdays", weekdays) + PolicyVMRetentionWeekly._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + weekdays=weekdays, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + weekdays: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if weekdays is None: + raise TypeError("Missing 'weekdays' argument") + + _setter("count", count) + _setter("weekdays", weekdays) @property @pulumi.getter @@ -666,16 +883,43 @@ def __init__(__self__, *, :param Sequence[str] weekdays: The weekday backups to retain . Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. :param Sequence[str] weeks: The weeks of the month to retain backups of. Must be one of `First`, `Second`, `Third`, `Fourth`, `Last`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "months", months) + PolicyVMRetentionYearly._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + months=months, + days=days, + include_last_days=include_last_days, + weekdays=weekdays, + weeks=weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + months: Optional[Sequence[str]] = None, + days: Optional[Sequence[int]] = None, + include_last_days: Optional[bool] = None, + weekdays: Optional[Sequence[str]] = None, + weeks: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if months is None: + raise TypeError("Missing 'months' argument") + if include_last_days is None and 'includeLastDays' in kwargs: + include_last_days = kwargs['includeLastDays'] + + _setter("count", count) + _setter("months", months) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if include_last_days is not None: - pulumi.set(__self__, "include_last_days", include_last_days) + _setter("include_last_days", include_last_days) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) if weeks is not None: - pulumi.set(__self__, "weeks", weeks) + _setter("weeks", weeks) @property @pulumi.getter @@ -774,18 +1018,57 @@ def __init__(__self__, *, :param 'PolicyVMWorkloadProtectionPolicyRetentionYearlyArgs' retention_yearly: A `retention_yearly` block as defined below. :param 'PolicyVMWorkloadProtectionPolicySimpleRetentionArgs' simple_retention: A `simple_retention` block as defined below. """ - pulumi.set(__self__, "backup", backup) - pulumi.set(__self__, "policy_type", policy_type) + PolicyVMWorkloadProtectionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup=backup, + policy_type=policy_type, + retention_daily=retention_daily, + retention_monthly=retention_monthly, + retention_weekly=retention_weekly, + retention_yearly=retention_yearly, + simple_retention=simple_retention, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup: Optional['outputs.PolicyVMWorkloadProtectionPolicyBackup'] = None, + policy_type: Optional[str] = None, + retention_daily: Optional['outputs.PolicyVMWorkloadProtectionPolicyRetentionDaily'] = None, + retention_monthly: Optional['outputs.PolicyVMWorkloadProtectionPolicyRetentionMonthly'] = None, + retention_weekly: Optional['outputs.PolicyVMWorkloadProtectionPolicyRetentionWeekly'] = None, + retention_yearly: Optional['outputs.PolicyVMWorkloadProtectionPolicyRetentionYearly'] = None, + simple_retention: Optional['outputs.PolicyVMWorkloadProtectionPolicySimpleRetention'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup is None: + raise TypeError("Missing 'backup' argument") + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if policy_type is None: + raise TypeError("Missing 'policy_type' argument") + if retention_daily is None and 'retentionDaily' in kwargs: + retention_daily = kwargs['retentionDaily'] + if retention_monthly is None and 'retentionMonthly' in kwargs: + retention_monthly = kwargs['retentionMonthly'] + if retention_weekly is None and 'retentionWeekly' in kwargs: + retention_weekly = kwargs['retentionWeekly'] + if retention_yearly is None and 'retentionYearly' in kwargs: + retention_yearly = kwargs['retentionYearly'] + if simple_retention is None and 'simpleRetention' in kwargs: + simple_retention = kwargs['simpleRetention'] + + _setter("backup", backup) + _setter("policy_type", policy_type) if retention_daily is not None: - pulumi.set(__self__, "retention_daily", retention_daily) + _setter("retention_daily", retention_daily) if retention_monthly is not None: - pulumi.set(__self__, "retention_monthly", retention_monthly) + _setter("retention_monthly", retention_monthly) if retention_weekly is not None: - pulumi.set(__self__, "retention_weekly", retention_weekly) + _setter("retention_weekly", retention_weekly) if retention_yearly is not None: - pulumi.set(__self__, "retention_yearly", retention_yearly) + _setter("retention_yearly", retention_yearly) if simple_retention is not None: - pulumi.set(__self__, "simple_retention", simple_retention) + _setter("simple_retention", simple_retention) @property @pulumi.getter @@ -874,14 +1157,33 @@ def __init__(__self__, *, :param str time: The time of day to perform the backup in 24hour format. :param Sequence[str] weekdays: The days of the week to perform backups on. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. This is used when `frequency` is `Weekly`. """ + PolicyVMWorkloadProtectionPolicyBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency=frequency, + frequency_in_minutes=frequency_in_minutes, + time=time, + weekdays=weekdays, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency: Optional[str] = None, + frequency_in_minutes: Optional[int] = None, + time: Optional[str] = None, + weekdays: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency_in_minutes is None and 'frequencyInMinutes' in kwargs: + frequency_in_minutes = kwargs['frequencyInMinutes'] + if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if frequency_in_minutes is not None: - pulumi.set(__self__, "frequency_in_minutes", frequency_in_minutes) + _setter("frequency_in_minutes", frequency_in_minutes) if time is not None: - pulumi.set(__self__, "time", time) + _setter("time", time) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) @property @pulumi.getter @@ -923,7 +1225,20 @@ def __init__(__self__, *, """ :param int count: The number of daily backups to keep. Possible values are between `7` and `9999`. """ - pulumi.set(__self__, "count", count) + PolicyVMWorkloadProtectionPolicyRetentionDaily._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + + _setter("count", count) @property @pulumi.getter @@ -966,14 +1281,39 @@ def __init__(__self__, *, :param Sequence[str] weekdays: The weekday backups to retain. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. :param Sequence[str] weeks: The weeks of the month to retain backups of. Possible values are `First`, `Second`, `Third`, `Fourth` and `Last`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "format_type", format_type) + PolicyVMWorkloadProtectionPolicyRetentionMonthly._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + format_type=format_type, + monthdays=monthdays, + weekdays=weekdays, + weeks=weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + format_type: Optional[str] = None, + monthdays: Optional[Sequence[int]] = None, + weekdays: Optional[Sequence[str]] = None, + weeks: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if format_type is None and 'formatType' in kwargs: + format_type = kwargs['formatType'] + if format_type is None: + raise TypeError("Missing 'format_type' argument") + + _setter("count", count) + _setter("format_type", format_type) if monthdays is not None: - pulumi.set(__self__, "monthdays", monthdays) + _setter("monthdays", monthdays) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) if weeks is not None: - pulumi.set(__self__, "weeks", weeks) + _setter("weeks", weeks) @property @pulumi.getter @@ -1025,8 +1365,25 @@ def __init__(__self__, *, :param int count: The number of weekly backups to keep. Possible values are between `1` and `5163`. :param Sequence[str] weekdays: The weekday backups to retain. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "weekdays", weekdays) + PolicyVMWorkloadProtectionPolicyRetentionWeekly._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + weekdays=weekdays, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + weekdays: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if weekdays is None: + raise TypeError("Missing 'weekdays' argument") + + _setter("count", count) + _setter("weekdays", weekdays) @property @pulumi.getter @@ -1079,15 +1436,44 @@ def __init__(__self__, *, :param Sequence[str] weekdays: The weekday backups to retain. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. :param Sequence[str] weeks: The weeks of the month to retain backups of. Possible values are `First`, `Second`, `Third`, `Fourth`, `Last`. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "format_type", format_type) - pulumi.set(__self__, "months", months) + PolicyVMWorkloadProtectionPolicyRetentionYearly._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + format_type=format_type, + months=months, + monthdays=monthdays, + weekdays=weekdays, + weeks=weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + format_type: Optional[str] = None, + months: Optional[Sequence[str]] = None, + monthdays: Optional[Sequence[int]] = None, + weekdays: Optional[Sequence[str]] = None, + weeks: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if format_type is None and 'formatType' in kwargs: + format_type = kwargs['formatType'] + if format_type is None: + raise TypeError("Missing 'format_type' argument") + if months is None: + raise TypeError("Missing 'months' argument") + + _setter("count", count) + _setter("format_type", format_type) + _setter("months", months) if monthdays is not None: - pulumi.set(__self__, "monthdays", monthdays) + _setter("monthdays", monthdays) if weekdays is not None: - pulumi.set(__self__, "weekdays", weekdays) + _setter("weekdays", weekdays) if weeks is not None: - pulumi.set(__self__, "weeks", weeks) + _setter("weeks", weeks) @property @pulumi.getter @@ -1145,7 +1531,20 @@ def __init__(__self__, *, """ :param int count: The count that is used to count retention duration with duration type `Days`. Possible values are between `7` and `35`. """ - pulumi.set(__self__, "count", count) + PolicyVMWorkloadProtectionPolicySimpleRetention._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + + _setter("count", count) @property @pulumi.getter @@ -1184,9 +1583,28 @@ def __init__(__self__, *, :param str time_zone: The timezone for the VM Workload Backup Policy. [The possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). :param bool compression_enabled: The compression setting for the VM Workload Backup Policy. Defaults to `false`. """ - pulumi.set(__self__, "time_zone", time_zone) + PolicyVMWorkloadSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + time_zone=time_zone, + compression_enabled=compression_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time_zone: Optional[str] = None, + compression_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if time_zone is None: + raise TypeError("Missing 'time_zone' argument") + if compression_enabled is None and 'compressionEnabled' in kwargs: + compression_enabled = kwargs['compressionEnabled'] + + _setter("time_zone", time_zone) if compression_enabled is not None: - pulumi.set(__self__, "compression_enabled", compression_enabled) + _setter("compression_enabled", compression_enabled) @property @pulumi.getter(name="timeZone") diff --git a/sdk/python/pulumi_azure/backup/policy_file_share.py b/sdk/python/pulumi_azure/backup/policy_file_share.py index 68df8ee66a..89de80888b 100644 --- a/sdk/python/pulumi_azure/backup/policy_file_share.py +++ b/sdk/python/pulumi_azure/backup/policy_file_share.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,20 +39,67 @@ def __init__(__self__, *, > **NOTE:** The maximum number of snapshots that Azure Files can retain is 200. If your combined snapshot count exceeds 200 based on your retention policies, it will result in an error. See [this](https://docs.microsoft.com/azure/backup/backup-azure-files-faq#what-is-the-maximum-retention-i-can-configure-for-backups) article for more information. """ - pulumi.set(__self__, "backup", backup) - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "retention_daily", retention_daily) + PolicyFileShareArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup=backup, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + retention_daily=retention_daily, + name=name, + retention_monthly=retention_monthly, + retention_weekly=retention_weekly, + retention_yearly=retention_yearly, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup: Optional[pulumi.Input['PolicyFileShareBackupArgs']] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_daily: Optional[pulumi.Input['PolicyFileShareRetentionDailyArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + retention_monthly: Optional[pulumi.Input['PolicyFileShareRetentionMonthlyArgs']] = None, + retention_weekly: Optional[pulumi.Input['PolicyFileShareRetentionWeeklyArgs']] = None, + retention_yearly: Optional[pulumi.Input['PolicyFileShareRetentionYearlyArgs']] = None, + timezone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup is None: + raise TypeError("Missing 'backup' argument") + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if recovery_vault_name is None: + raise TypeError("Missing 'recovery_vault_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if retention_daily is None and 'retentionDaily' in kwargs: + retention_daily = kwargs['retentionDaily'] + if retention_daily is None: + raise TypeError("Missing 'retention_daily' argument") + if retention_monthly is None and 'retentionMonthly' in kwargs: + retention_monthly = kwargs['retentionMonthly'] + if retention_weekly is None and 'retentionWeekly' in kwargs: + retention_weekly = kwargs['retentionWeekly'] + if retention_yearly is None and 'retentionYearly' in kwargs: + retention_yearly = kwargs['retentionYearly'] + + _setter("backup", backup) + _setter("recovery_vault_name", recovery_vault_name) + _setter("resource_group_name", resource_group_name) + _setter("retention_daily", retention_daily) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retention_monthly is not None: - pulumi.set(__self__, "retention_monthly", retention_monthly) + _setter("retention_monthly", retention_monthly) if retention_weekly is not None: - pulumi.set(__self__, "retention_weekly", retention_weekly) + _setter("retention_weekly", retention_weekly) if retention_yearly is not None: - pulumi.set(__self__, "retention_yearly", retention_yearly) + _setter("retention_yearly", retention_yearly) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) @property @pulumi.getter @@ -191,24 +238,63 @@ def __init__(__self__, *, > **NOTE:** The maximum number of snapshots that Azure Files can retain is 200. If your combined snapshot count exceeds 200 based on your retention policies, it will result in an error. See [this](https://docs.microsoft.com/azure/backup/backup-azure-files-faq#what-is-the-maximum-retention-i-can-configure-for-backups) article for more information. """ + _PolicyFileShareState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup=backup, + name=name, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + retention_daily=retention_daily, + retention_monthly=retention_monthly, + retention_weekly=retention_weekly, + retention_yearly=retention_yearly, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup: Optional[pulumi.Input['PolicyFileShareBackupArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_daily: Optional[pulumi.Input['PolicyFileShareRetentionDailyArgs']] = None, + retention_monthly: Optional[pulumi.Input['PolicyFileShareRetentionMonthlyArgs']] = None, + retention_weekly: Optional[pulumi.Input['PolicyFileShareRetentionWeeklyArgs']] = None, + retention_yearly: Optional[pulumi.Input['PolicyFileShareRetentionYearlyArgs']] = None, + timezone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retention_daily is None and 'retentionDaily' in kwargs: + retention_daily = kwargs['retentionDaily'] + if retention_monthly is None and 'retentionMonthly' in kwargs: + retention_monthly = kwargs['retentionMonthly'] + if retention_weekly is None and 'retentionWeekly' in kwargs: + retention_weekly = kwargs['retentionWeekly'] + if retention_yearly is None and 'retentionYearly' in kwargs: + retention_yearly = kwargs['retentionYearly'] + if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_vault_name is not None: - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) + _setter("recovery_vault_name", recovery_vault_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retention_daily is not None: - pulumi.set(__self__, "retention_daily", retention_daily) + _setter("retention_daily", retention_daily) if retention_monthly is not None: - pulumi.set(__self__, "retention_monthly", retention_monthly) + _setter("retention_monthly", retention_monthly) if retention_weekly is not None: - pulumi.set(__self__, "retention_weekly", retention_weekly) + _setter("retention_weekly", retention_weekly) if retention_yearly is not None: - pulumi.set(__self__, "retention_yearly", retention_yearly) + _setter("retention_yearly", retention_yearly) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) @property @pulumi.getter @@ -488,6 +574,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PolicyFileShareArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -511,6 +601,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = PolicyFileShareArgs.__new__(PolicyFileShareArgs) + if backup is not None and not isinstance(backup, PolicyFileShareBackupArgs): + backup = backup or {} + def _setter(key, value): + backup[key] = value + PolicyFileShareBackupArgs._configure(_setter, **backup) if backup is None and not opts.urn: raise TypeError("Missing required property 'backup'") __props__.__dict__["backup"] = backup @@ -521,11 +616,31 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if retention_daily is not None and not isinstance(retention_daily, PolicyFileShareRetentionDailyArgs): + retention_daily = retention_daily or {} + def _setter(key, value): + retention_daily[key] = value + PolicyFileShareRetentionDailyArgs._configure(_setter, **retention_daily) if retention_daily is None and not opts.urn: raise TypeError("Missing required property 'retention_daily'") __props__.__dict__["retention_daily"] = retention_daily + if retention_monthly is not None and not isinstance(retention_monthly, PolicyFileShareRetentionMonthlyArgs): + retention_monthly = retention_monthly or {} + def _setter(key, value): + retention_monthly[key] = value + PolicyFileShareRetentionMonthlyArgs._configure(_setter, **retention_monthly) __props__.__dict__["retention_monthly"] = retention_monthly + if retention_weekly is not None and not isinstance(retention_weekly, PolicyFileShareRetentionWeeklyArgs): + retention_weekly = retention_weekly or {} + def _setter(key, value): + retention_weekly[key] = value + PolicyFileShareRetentionWeeklyArgs._configure(_setter, **retention_weekly) __props__.__dict__["retention_weekly"] = retention_weekly + if retention_yearly is not None and not isinstance(retention_yearly, PolicyFileShareRetentionYearlyArgs): + retention_yearly = retention_yearly or {} + def _setter(key, value): + retention_yearly[key] = value + PolicyFileShareRetentionYearlyArgs._configure(_setter, **retention_yearly) __props__.__dict__["retention_yearly"] = retention_yearly __props__.__dict__["timezone"] = timezone super(PolicyFileShare, __self__).__init__( diff --git a/sdk/python/pulumi_azure/backup/policy_vm.py b/sdk/python/pulumi_azure/backup/policy_vm.py index 88a2da5614..3470bb4071 100644 --- a/sdk/python/pulumi_azure/backup/policy_vm.py +++ b/sdk/python/pulumi_azure/backup/policy_vm.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,27 +43,84 @@ def __init__(__self__, *, :param pulumi.Input['PolicyVMRetentionYearlyArgs'] retention_yearly: Configures the policy yearly retention as documented in the `retention_yearly` block below. :param pulumi.Input[str] timezone: Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` """ - pulumi.set(__self__, "backup", backup) - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + PolicyVMArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup=backup, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + instant_restore_resource_group=instant_restore_resource_group, + instant_restore_retention_days=instant_restore_retention_days, + name=name, + policy_type=policy_type, + retention_daily=retention_daily, + retention_monthly=retention_monthly, + retention_weekly=retention_weekly, + retention_yearly=retention_yearly, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup: Optional[pulumi.Input['PolicyVMBackupArgs']] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + instant_restore_resource_group: Optional[pulumi.Input['PolicyVMInstantRestoreResourceGroupArgs']] = None, + instant_restore_retention_days: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_type: Optional[pulumi.Input[str]] = None, + retention_daily: Optional[pulumi.Input['PolicyVMRetentionDailyArgs']] = None, + retention_monthly: Optional[pulumi.Input['PolicyVMRetentionMonthlyArgs']] = None, + retention_weekly: Optional[pulumi.Input['PolicyVMRetentionWeeklyArgs']] = None, + retention_yearly: Optional[pulumi.Input['PolicyVMRetentionYearlyArgs']] = None, + timezone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup is None: + raise TypeError("Missing 'backup' argument") + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if recovery_vault_name is None: + raise TypeError("Missing 'recovery_vault_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if instant_restore_resource_group is None and 'instantRestoreResourceGroup' in kwargs: + instant_restore_resource_group = kwargs['instantRestoreResourceGroup'] + if instant_restore_retention_days is None and 'instantRestoreRetentionDays' in kwargs: + instant_restore_retention_days = kwargs['instantRestoreRetentionDays'] + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if retention_daily is None and 'retentionDaily' in kwargs: + retention_daily = kwargs['retentionDaily'] + if retention_monthly is None and 'retentionMonthly' in kwargs: + retention_monthly = kwargs['retentionMonthly'] + if retention_weekly is None and 'retentionWeekly' in kwargs: + retention_weekly = kwargs['retentionWeekly'] + if retention_yearly is None and 'retentionYearly' in kwargs: + retention_yearly = kwargs['retentionYearly'] + + _setter("backup", backup) + _setter("recovery_vault_name", recovery_vault_name) + _setter("resource_group_name", resource_group_name) if instant_restore_resource_group is not None: - pulumi.set(__self__, "instant_restore_resource_group", instant_restore_resource_group) + _setter("instant_restore_resource_group", instant_restore_resource_group) if instant_restore_retention_days is not None: - pulumi.set(__self__, "instant_restore_retention_days", instant_restore_retention_days) + _setter("instant_restore_retention_days", instant_restore_retention_days) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_type is not None: - pulumi.set(__self__, "policy_type", policy_type) + _setter("policy_type", policy_type) if retention_daily is not None: - pulumi.set(__self__, "retention_daily", retention_daily) + _setter("retention_daily", retention_daily) if retention_monthly is not None: - pulumi.set(__self__, "retention_monthly", retention_monthly) + _setter("retention_monthly", retention_monthly) if retention_weekly is not None: - pulumi.set(__self__, "retention_weekly", retention_weekly) + _setter("retention_weekly", retention_weekly) if retention_yearly is not None: - pulumi.set(__self__, "retention_yearly", retention_yearly) + _setter("retention_yearly", retention_yearly) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) @property @pulumi.getter @@ -240,30 +297,81 @@ def __init__(__self__, *, :param pulumi.Input['PolicyVMRetentionYearlyArgs'] retention_yearly: Configures the policy yearly retention as documented in the `retention_yearly` block below. :param pulumi.Input[str] timezone: Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` """ + _PolicyVMState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup=backup, + instant_restore_resource_group=instant_restore_resource_group, + instant_restore_retention_days=instant_restore_retention_days, + name=name, + policy_type=policy_type, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + retention_daily=retention_daily, + retention_monthly=retention_monthly, + retention_weekly=retention_weekly, + retention_yearly=retention_yearly, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup: Optional[pulumi.Input['PolicyVMBackupArgs']] = None, + instant_restore_resource_group: Optional[pulumi.Input['PolicyVMInstantRestoreResourceGroupArgs']] = None, + instant_restore_retention_days: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_type: Optional[pulumi.Input[str]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_daily: Optional[pulumi.Input['PolicyVMRetentionDailyArgs']] = None, + retention_monthly: Optional[pulumi.Input['PolicyVMRetentionMonthlyArgs']] = None, + retention_weekly: Optional[pulumi.Input['PolicyVMRetentionWeeklyArgs']] = None, + retention_yearly: Optional[pulumi.Input['PolicyVMRetentionYearlyArgs']] = None, + timezone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if instant_restore_resource_group is None and 'instantRestoreResourceGroup' in kwargs: + instant_restore_resource_group = kwargs['instantRestoreResourceGroup'] + if instant_restore_retention_days is None and 'instantRestoreRetentionDays' in kwargs: + instant_restore_retention_days = kwargs['instantRestoreRetentionDays'] + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retention_daily is None and 'retentionDaily' in kwargs: + retention_daily = kwargs['retentionDaily'] + if retention_monthly is None and 'retentionMonthly' in kwargs: + retention_monthly = kwargs['retentionMonthly'] + if retention_weekly is None and 'retentionWeekly' in kwargs: + retention_weekly = kwargs['retentionWeekly'] + if retention_yearly is None and 'retentionYearly' in kwargs: + retention_yearly = kwargs['retentionYearly'] + if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if instant_restore_resource_group is not None: - pulumi.set(__self__, "instant_restore_resource_group", instant_restore_resource_group) + _setter("instant_restore_resource_group", instant_restore_resource_group) if instant_restore_retention_days is not None: - pulumi.set(__self__, "instant_restore_retention_days", instant_restore_retention_days) + _setter("instant_restore_retention_days", instant_restore_retention_days) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_type is not None: - pulumi.set(__self__, "policy_type", policy_type) + _setter("policy_type", policy_type) if recovery_vault_name is not None: - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) + _setter("recovery_vault_name", recovery_vault_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retention_daily is not None: - pulumi.set(__self__, "retention_daily", retention_daily) + _setter("retention_daily", retention_daily) if retention_monthly is not None: - pulumi.set(__self__, "retention_monthly", retention_monthly) + _setter("retention_monthly", retention_monthly) if retention_weekly is not None: - pulumi.set(__self__, "retention_weekly", retention_weekly) + _setter("retention_weekly", retention_weekly) if retention_yearly is not None: - pulumi.set(__self__, "retention_yearly", retention_yearly) + _setter("retention_yearly", retention_yearly) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) @property @pulumi.getter @@ -581,6 +689,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PolicyVMArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -607,9 +719,19 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = PolicyVMArgs.__new__(PolicyVMArgs) + if backup is not None and not isinstance(backup, PolicyVMBackupArgs): + backup = backup or {} + def _setter(key, value): + backup[key] = value + PolicyVMBackupArgs._configure(_setter, **backup) if backup is None and not opts.urn: raise TypeError("Missing required property 'backup'") __props__.__dict__["backup"] = backup + if instant_restore_resource_group is not None and not isinstance(instant_restore_resource_group, PolicyVMInstantRestoreResourceGroupArgs): + instant_restore_resource_group = instant_restore_resource_group or {} + def _setter(key, value): + instant_restore_resource_group[key] = value + PolicyVMInstantRestoreResourceGroupArgs._configure(_setter, **instant_restore_resource_group) __props__.__dict__["instant_restore_resource_group"] = instant_restore_resource_group __props__.__dict__["instant_restore_retention_days"] = instant_restore_retention_days __props__.__dict__["name"] = name @@ -620,9 +742,29 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if retention_daily is not None and not isinstance(retention_daily, PolicyVMRetentionDailyArgs): + retention_daily = retention_daily or {} + def _setter(key, value): + retention_daily[key] = value + PolicyVMRetentionDailyArgs._configure(_setter, **retention_daily) __props__.__dict__["retention_daily"] = retention_daily + if retention_monthly is not None and not isinstance(retention_monthly, PolicyVMRetentionMonthlyArgs): + retention_monthly = retention_monthly or {} + def _setter(key, value): + retention_monthly[key] = value + PolicyVMRetentionMonthlyArgs._configure(_setter, **retention_monthly) __props__.__dict__["retention_monthly"] = retention_monthly + if retention_weekly is not None and not isinstance(retention_weekly, PolicyVMRetentionWeeklyArgs): + retention_weekly = retention_weekly or {} + def _setter(key, value): + retention_weekly[key] = value + PolicyVMRetentionWeeklyArgs._configure(_setter, **retention_weekly) __props__.__dict__["retention_weekly"] = retention_weekly + if retention_yearly is not None and not isinstance(retention_yearly, PolicyVMRetentionYearlyArgs): + retention_yearly = retention_yearly or {} + def _setter(key, value): + retention_yearly[key] = value + PolicyVMRetentionYearlyArgs._configure(_setter, **retention_yearly) __props__.__dict__["retention_yearly"] = retention_yearly __props__.__dict__["timezone"] = timezone super(PolicyVM, __self__).__init__( diff --git a/sdk/python/pulumi_azure/backup/policy_vm_workload.py b/sdk/python/pulumi_azure/backup/policy_vm_workload.py index c61ef36b8c..261c451bf4 100644 --- a/sdk/python/pulumi_azure/backup/policy_vm_workload.py +++ b/sdk/python/pulumi_azure/backup/policy_vm_workload.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,13 +31,52 @@ def __init__(__self__, *, :param pulumi.Input[str] workload_type: The VM Workload type for the Backup Policy. Possible values are `SQLDataBase` and `SAPHanaDatabase`. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the VM Workload Backup Policy. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "protection_policies", protection_policies) - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "settings", settings) - pulumi.set(__self__, "workload_type", workload_type) + PolicyVMWorkloadArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + protection_policies=protection_policies, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + settings=settings, + workload_type=workload_type, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protection_policies: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyVMWorkloadProtectionPolicyArgs']]]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + settings: Optional[pulumi.Input['PolicyVMWorkloadSettingsArgs']] = None, + workload_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protection_policies is None and 'protectionPolicies' in kwargs: + protection_policies = kwargs['protectionPolicies'] + if protection_policies is None: + raise TypeError("Missing 'protection_policies' argument") + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if recovery_vault_name is None: + raise TypeError("Missing 'recovery_vault_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if settings is None: + raise TypeError("Missing 'settings' argument") + if workload_type is None and 'workloadType' in kwargs: + workload_type = kwargs['workloadType'] + if workload_type is None: + raise TypeError("Missing 'workload_type' argument") + + _setter("protection_policies", protection_policies) + _setter("recovery_vault_name", recovery_vault_name) + _setter("resource_group_name", resource_group_name) + _setter("settings", settings) + _setter("workload_type", workload_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="protectionPolicies") @@ -130,18 +169,47 @@ def __init__(__self__, *, :param pulumi.Input['PolicyVMWorkloadSettingsArgs'] settings: A `settings` block as defined below. :param pulumi.Input[str] workload_type: The VM Workload type for the Backup Policy. Possible values are `SQLDataBase` and `SAPHanaDatabase`. Changing this forces a new resource to be created. """ + _PolicyVMWorkloadState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protection_policies=protection_policies, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + settings=settings, + workload_type=workload_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + protection_policies: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyVMWorkloadProtectionPolicyArgs']]]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + settings: Optional[pulumi.Input['PolicyVMWorkloadSettingsArgs']] = None, + workload_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protection_policies is None and 'protectionPolicies' in kwargs: + protection_policies = kwargs['protectionPolicies'] + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if workload_type is None and 'workloadType' in kwargs: + workload_type = kwargs['workloadType'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protection_policies is not None: - pulumi.set(__self__, "protection_policies", protection_policies) + _setter("protection_policies", protection_policies) if recovery_vault_name is not None: - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) + _setter("recovery_vault_name", recovery_vault_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) if workload_type is not None: - pulumi.set(__self__, "workload_type", workload_type) + _setter("workload_type", workload_type) @property @pulumi.getter @@ -361,6 +429,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PolicyVMWorkloadArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -391,6 +463,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if settings is not None and not isinstance(settings, PolicyVMWorkloadSettingsArgs): + settings = settings or {} + def _setter(key, value): + settings[key] = value + PolicyVMWorkloadSettingsArgs._configure(_setter, **settings) if settings is None and not opts.urn: raise TypeError("Missing required property 'settings'") __props__.__dict__["settings"] = settings diff --git a/sdk/python/pulumi_azure/backup/protected_file_share.py b/sdk/python/pulumi_azure/backup/protected_file_share.py index 9bf7adb465..041887babe 100644 --- a/sdk/python/pulumi_azure/backup/protected_file_share.py +++ b/sdk/python/pulumi_azure/backup/protected_file_share.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ProtectedFileShareArgs', 'ProtectedFileShare'] @@ -29,11 +29,50 @@ def __init__(__self__, *, > **NOTE** The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the `backup.ContainerStorageAccount` resource or the [Register-AzRecoveryServicesBackupContainer PowerShell cmdlet](https://docs.microsoft.com/powershell/module/az.recoveryservices/register-azrecoveryservicesbackupcontainer?view=azps-3.2.0) to register a storage account with a vault. When using the `backup.ContainerStorageAccount` resource to register, you can use `depends_on` to explicitly declare the dependency. It will make sure that the registration is completed before creating the `backup.ProtectedFileShare` resource. """ - pulumi.set(__self__, "backup_policy_id", backup_policy_id) - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "source_file_share_name", source_file_share_name) - pulumi.set(__self__, "source_storage_account_id", source_storage_account_id) + ProtectedFileShareArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup_policy_id=backup_policy_id, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + source_file_share_name=source_file_share_name, + source_storage_account_id=source_storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup_policy_id: Optional[pulumi.Input[str]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source_file_share_name: Optional[pulumi.Input[str]] = None, + source_storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_policy_id is None and 'backupPolicyId' in kwargs: + backup_policy_id = kwargs['backupPolicyId'] + if backup_policy_id is None: + raise TypeError("Missing 'backup_policy_id' argument") + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if recovery_vault_name is None: + raise TypeError("Missing 'recovery_vault_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if source_file_share_name is None and 'sourceFileShareName' in kwargs: + source_file_share_name = kwargs['sourceFileShareName'] + if source_file_share_name is None: + raise TypeError("Missing 'source_file_share_name' argument") + if source_storage_account_id is None and 'sourceStorageAccountId' in kwargs: + source_storage_account_id = kwargs['sourceStorageAccountId'] + if source_storage_account_id is None: + raise TypeError("Missing 'source_storage_account_id' argument") + + _setter("backup_policy_id", backup_policy_id) + _setter("recovery_vault_name", recovery_vault_name) + _setter("resource_group_name", resource_group_name) + _setter("source_file_share_name", source_file_share_name) + _setter("source_storage_account_id", source_storage_account_id) @property @pulumi.getter(name="backupPolicyId") @@ -116,16 +155,45 @@ def __init__(__self__, *, > **NOTE** The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the `backup.ContainerStorageAccount` resource or the [Register-AzRecoveryServicesBackupContainer PowerShell cmdlet](https://docs.microsoft.com/powershell/module/az.recoveryservices/register-azrecoveryservicesbackupcontainer?view=azps-3.2.0) to register a storage account with a vault. When using the `backup.ContainerStorageAccount` resource to register, you can use `depends_on` to explicitly declare the dependency. It will make sure that the registration is completed before creating the `backup.ProtectedFileShare` resource. """ + _ProtectedFileShareState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup_policy_id=backup_policy_id, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + source_file_share_name=source_file_share_name, + source_storage_account_id=source_storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup_policy_id: Optional[pulumi.Input[str]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source_file_share_name: Optional[pulumi.Input[str]] = None, + source_storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_policy_id is None and 'backupPolicyId' in kwargs: + backup_policy_id = kwargs['backupPolicyId'] + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if source_file_share_name is None and 'sourceFileShareName' in kwargs: + source_file_share_name = kwargs['sourceFileShareName'] + if source_storage_account_id is None and 'sourceStorageAccountId' in kwargs: + source_storage_account_id = kwargs['sourceStorageAccountId'] + if backup_policy_id is not None: - pulumi.set(__self__, "backup_policy_id", backup_policy_id) + _setter("backup_policy_id", backup_policy_id) if recovery_vault_name is not None: - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) + _setter("recovery_vault_name", recovery_vault_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if source_file_share_name is not None: - pulumi.set(__self__, "source_file_share_name", source_file_share_name) + _setter("source_file_share_name", source_file_share_name) if source_storage_account_id is not None: - pulumi.set(__self__, "source_storage_account_id", source_storage_account_id) + _setter("source_storage_account_id", source_storage_account_id) @property @pulumi.getter(name="backupPolicyId") @@ -335,6 +403,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProtectedFileShareArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/backup/protected_vm.py b/sdk/python/pulumi_azure/backup/protected_vm.py index 4489094ac9..1f22e9c9f9 100644 --- a/sdk/python/pulumi_azure/backup/protected_vm.py +++ b/sdk/python/pulumi_azure/backup/protected_vm.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ProtectedVMArgs', 'ProtectedVM'] @@ -34,18 +34,59 @@ def __init__(__self__, *, > **NOTE:** After creation, the `source_vm_id` property can be removed without forcing a new resource to be created; however, setting it to a different ID will create a new resource. This allows the source vm to be deleted without having to remove the backup. """ - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ProtectedVMArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + backup_policy_id=backup_policy_id, + exclude_disk_luns=exclude_disk_luns, + include_disk_luns=include_disk_luns, + protection_state=protection_state, + source_vm_id=source_vm_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + backup_policy_id: Optional[pulumi.Input[str]] = None, + exclude_disk_luns: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + include_disk_luns: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + protection_state: Optional[pulumi.Input[str]] = None, + source_vm_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if recovery_vault_name is None: + raise TypeError("Missing 'recovery_vault_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if backup_policy_id is None and 'backupPolicyId' in kwargs: + backup_policy_id = kwargs['backupPolicyId'] + if exclude_disk_luns is None and 'excludeDiskLuns' in kwargs: + exclude_disk_luns = kwargs['excludeDiskLuns'] + if include_disk_luns is None and 'includeDiskLuns' in kwargs: + include_disk_luns = kwargs['includeDiskLuns'] + if protection_state is None and 'protectionState' in kwargs: + protection_state = kwargs['protectionState'] + if source_vm_id is None and 'sourceVmId' in kwargs: + source_vm_id = kwargs['sourceVmId'] + + _setter("recovery_vault_name", recovery_vault_name) + _setter("resource_group_name", resource_group_name) if backup_policy_id is not None: - pulumi.set(__self__, "backup_policy_id", backup_policy_id) + _setter("backup_policy_id", backup_policy_id) if exclude_disk_luns is not None: - pulumi.set(__self__, "exclude_disk_luns", exclude_disk_luns) + _setter("exclude_disk_luns", exclude_disk_luns) if include_disk_luns is not None: - pulumi.set(__self__, "include_disk_luns", include_disk_luns) + _setter("include_disk_luns", include_disk_luns) if protection_state is not None: - pulumi.set(__self__, "protection_state", protection_state) + _setter("protection_state", protection_state) if source_vm_id is not None: - pulumi.set(__self__, "source_vm_id", source_vm_id) + _setter("source_vm_id", source_vm_id) @property @pulumi.getter(name="recoveryVaultName") @@ -158,20 +199,57 @@ def __init__(__self__, *, > **NOTE:** After creation, the `source_vm_id` property can be removed without forcing a new resource to be created; however, setting it to a different ID will create a new resource. This allows the source vm to be deleted without having to remove the backup. """ + _ProtectedVMState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup_policy_id=backup_policy_id, + exclude_disk_luns=exclude_disk_luns, + include_disk_luns=include_disk_luns, + protection_state=protection_state, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + source_vm_id=source_vm_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup_policy_id: Optional[pulumi.Input[str]] = None, + exclude_disk_luns: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + include_disk_luns: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + protection_state: Optional[pulumi.Input[str]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source_vm_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_policy_id is None and 'backupPolicyId' in kwargs: + backup_policy_id = kwargs['backupPolicyId'] + if exclude_disk_luns is None and 'excludeDiskLuns' in kwargs: + exclude_disk_luns = kwargs['excludeDiskLuns'] + if include_disk_luns is None and 'includeDiskLuns' in kwargs: + include_disk_luns = kwargs['includeDiskLuns'] + if protection_state is None and 'protectionState' in kwargs: + protection_state = kwargs['protectionState'] + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if source_vm_id is None and 'sourceVmId' in kwargs: + source_vm_id = kwargs['sourceVmId'] + if backup_policy_id is not None: - pulumi.set(__self__, "backup_policy_id", backup_policy_id) + _setter("backup_policy_id", backup_policy_id) if exclude_disk_luns is not None: - pulumi.set(__self__, "exclude_disk_luns", exclude_disk_luns) + _setter("exclude_disk_luns", exclude_disk_luns) if include_disk_luns is not None: - pulumi.set(__self__, "include_disk_luns", include_disk_luns) + _setter("include_disk_luns", include_disk_luns) if protection_state is not None: - pulumi.set(__self__, "protection_state", protection_state) + _setter("protection_state", protection_state) if recovery_vault_name is not None: - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) + _setter("recovery_vault_name", recovery_vault_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if source_vm_id is not None: - pulumi.set(__self__, "source_vm_id", source_vm_id) + _setter("source_vm_id", source_vm_id) @property @pulumi.getter(name="backupPolicyId") @@ -389,6 +467,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProtectedVMArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/batch/_inputs.py b/sdk/python/pulumi_azure/batch/_inputs.py index d5ad9e95fc..66adae0aca 100644 --- a/sdk/python/pulumi_azure/batch/_inputs.py +++ b/sdk/python/pulumi_azure/batch/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -58,7 +58,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] key_vault_key_id: The full URL path to the Azure key vault key id that should be used to encrypt data, as documented [here](https://docs.microsoft.com/azure/batch/batch-customer-managed-key). Both versioned and versionless keys are supported. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + AccountEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + + _setter("key_vault_key_id", key_vault_key_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -88,13 +103,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + AccountIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -156,8 +196,25 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The Azure identifier of the Azure KeyVault to use. :param pulumi.Input[str] url: The HTTPS URL of the Azure KeyVault to use. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "url", url) + AccountKeyVaultReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("id", id) + _setter("url", url) @property @pulumi.getter @@ -195,10 +252,27 @@ def __init__(__self__, *, > **NOTE:** At least one of `account_access` or `node_management_access` must be specified. """ + AccountNetworkProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_access=account_access, + node_management_access=node_management_access, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_access: Optional[pulumi.Input['AccountNetworkProfileAccountAccessArgs']] = None, + node_management_access: Optional[pulumi.Input['AccountNetworkProfileNodeManagementAccessArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_access is None and 'accountAccess' in kwargs: + account_access = kwargs['accountAccess'] + if node_management_access is None and 'nodeManagementAccess' in kwargs: + node_management_access = kwargs['nodeManagementAccess'] + if account_access is not None: - pulumi.set(__self__, "account_access", account_access) + _setter("account_access", account_access) if node_management_access is not None: - pulumi.set(__self__, "node_management_access", node_management_access) + _setter("node_management_access", node_management_access) @property @pulumi.getter(name="accountAccess") @@ -236,10 +310,27 @@ def __init__(__self__, *, :param pulumi.Input[str] default_action: Specifies the default action for the account access. Possible values are `Allow` and `Deny`. Defaults to `Deny`. :param pulumi.Input[Sequence[pulumi.Input['AccountNetworkProfileAccountAccessIpRuleArgs']]] ip_rules: One or more `ip_rule` blocks as defined below. """ + AccountNetworkProfileAccountAccessArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AccountNetworkProfileAccountAccessIpRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) @property @pulumi.getter(name="defaultAction") @@ -275,9 +366,26 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_range: The CIDR block from which requests will match the rule. :param pulumi.Input[str] action: Specifies the action of the ip rule. The only possible value is `Allow`. Defaults to `Allow`. """ - pulumi.set(__self__, "ip_range", ip_range) + AccountNetworkProfileAccountAccessIpRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_range=ip_range, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_range: Optional[pulumi.Input[str]] = None, + action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_range is None and 'ipRange' in kwargs: + ip_range = kwargs['ipRange'] + if ip_range is None: + raise TypeError("Missing 'ip_range' argument") + + _setter("ip_range", ip_range) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipRange") @@ -313,10 +421,27 @@ def __init__(__self__, *, :param pulumi.Input[str] default_action: Specifies the default action for the node management access. Possible values are `Allow` and `Deny`. Defaults to `Deny`. :param pulumi.Input[Sequence[pulumi.Input['AccountNetworkProfileNodeManagementAccessIpRuleArgs']]] ip_rules: One or more `ip_rule` blocks as defined below. """ + AccountNetworkProfileNodeManagementAccessArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AccountNetworkProfileNodeManagementAccessIpRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) @property @pulumi.getter(name="defaultAction") @@ -352,9 +477,26 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_range: The CIDR block from which requests will match the rule. :param pulumi.Input[str] action: Specifies the action of the ip rule. The only possible value is `Allow`. Defaults to `Allow`. """ - pulumi.set(__self__, "ip_range", ip_range) + AccountNetworkProfileNodeManagementAccessIpRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_range=ip_range, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_range: Optional[pulumi.Input[str]] = None, + action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_range is None and 'ipRange' in kwargs: + ip_range = kwargs['ipRange'] + if ip_range is None: + raise TypeError("Missing 'ip_range' argument") + + _setter("ip_range", ip_range) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipRange") @@ -390,9 +532,26 @@ def __init__(__self__, *, :param pulumi.Input[str] formula: The autoscale formula that needs to be used for scaling the Batch pool. :param pulumi.Input[str] evaluation_interval: The interval to wait before evaluating if the pool needs to be scaled. Defaults to `PT15M`. """ - pulumi.set(__self__, "formula", formula) + PoolAutoScaleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + formula=formula, + evaluation_interval=evaluation_interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + formula: Optional[pulumi.Input[str]] = None, + evaluation_interval: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if formula is None: + raise TypeError("Missing 'formula' argument") + if evaluation_interval is None and 'evaluationInterval' in kwargs: + evaluation_interval = kwargs['evaluationInterval'] + + _setter("formula", formula) if evaluation_interval is not None: - pulumi.set(__self__, "evaluation_interval", evaluation_interval) + _setter("evaluation_interval", evaluation_interval) @property @pulumi.getter @@ -434,12 +593,37 @@ def __init__(__self__, *, :param pulumi.Input[str] store_name: The name of the certificate store on the compute node into which to install the certificate. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: `My`, `Root`, `CA`, `Trust`, `Disallowed`, `TrustedPeople`, `TrustedPublisher`, `AuthRoot`, `AddressBook`, but any custom store name can also be used. The default value is `My`. :param pulumi.Input[Sequence[pulumi.Input[str]]] visibilities: Which user accounts on the compute node should have access to the private data of the certificate. Possible values are `StartTask`, `Task` and `RemoteUser`. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "store_location", store_location) + PoolCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + store_location=store_location, + store_name=store_name, + visibilities=visibilities, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + store_location: Optional[pulumi.Input[str]] = None, + store_name: Optional[pulumi.Input[str]] = None, + visibilities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if store_location is None and 'storeLocation' in kwargs: + store_location = kwargs['storeLocation'] + if store_location is None: + raise TypeError("Missing 'store_location' argument") + if store_name is None and 'storeName' in kwargs: + store_name = kwargs['storeName'] + + _setter("id", id) + _setter("store_location", store_location) if store_name is not None: - pulumi.set(__self__, "store_name", store_name) + _setter("store_name", store_name) if visibilities is not None: - pulumi.set(__self__, "visibilities", visibilities) + _setter("visibilities", visibilities) @property @pulumi.getter @@ -503,12 +687,31 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['PoolContainerConfigurationContainerRegistryArgs']]] container_registries: One or more `container_registries` blocks as defined below. Additional container registries from which container images can be pulled by the pool's VMs. Changing this forces a new resource to be created. :param pulumi.Input[str] type: The type of container configuration. Possible value is `DockerCompatible`. """ + PoolContainerConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_image_names=container_image_names, + container_registries=container_registries, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_image_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + container_registries: Optional[pulumi.Input[Sequence[pulumi.Input['PoolContainerConfigurationContainerRegistryArgs']]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_image_names is None and 'containerImageNames' in kwargs: + container_image_names = kwargs['containerImageNames'] + if container_registries is None and 'containerRegistries' in kwargs: + container_registries = kwargs['containerRegistries'] + if container_image_names is not None: - pulumi.set(__self__, "container_image_names", container_image_names) + _setter("container_image_names", container_image_names) if container_registries is not None: - pulumi.set(__self__, "container_registries", container_registries) + _setter("container_registries", container_registries) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="containerImageNames") @@ -560,13 +763,38 @@ def __init__(__self__, *, :param pulumi.Input[str] user_assigned_identity_id: The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password. Changing this forces a new resource to be created. :param pulumi.Input[str] user_name: The user name to log into the registry server. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "registry_server", registry_server) + PoolContainerConfigurationContainerRegistryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + registry_server=registry_server, + password=password, + user_assigned_identity_id=user_assigned_identity_id, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + registry_server: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + user_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if registry_server is None and 'registryServer' in kwargs: + registry_server = kwargs['registryServer'] + if registry_server is None: + raise TypeError("Missing 'registry_server' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + + _setter("registry_server", registry_server) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) if user_name is not None: - pulumi.set(__self__, "user_name", user_name) + _setter("user_name", user_name) @property @pulumi.getter(name="registryServer") @@ -630,12 +858,37 @@ def __init__(__self__, *, :param pulumi.Input[str] caching: Values are: "none" - The caching mode for the disk is not enabled. "readOnly" - The caching mode for the disk is read only. "readWrite" - The caching mode for the disk is read and write. The default value for caching is "none". For information about the caching options see: . Possible values are `None`, `ReadOnly` and `ReadWrite`. :param pulumi.Input[str] storage_account_type: The storage account type to be used for the data disk. If omitted, the default is "Standard_LRS". Values are: "Standard_LRS" - The data disk should use standard locally redundant storage. "Premium_LRS" - The data disk should use premium locally redundant storage. """ - pulumi.set(__self__, "disk_size_gb", disk_size_gb) - pulumi.set(__self__, "lun", lun) + PoolDataDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_size_gb=disk_size_gb, + lun=lun, + caching=caching, + storage_account_type=storage_account_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_size_gb: Optional[pulumi.Input[int]] = None, + lun: Optional[pulumi.Input[int]] = None, + caching: Optional[pulumi.Input[str]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if disk_size_gb is None: + raise TypeError("Missing 'disk_size_gb' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + + _setter("disk_size_gb", disk_size_gb) + _setter("lun", lun) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) @property @pulumi.getter(name="diskSizeGb") @@ -693,7 +946,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] disk_encryption_target: On Linux pool, only \\"TemporaryDisk\\" is supported; on Windows pool, \\"OsDisk\\" and \\"TemporaryDisk\\" must be specified. """ - pulumi.set(__self__, "disk_encryption_target", disk_encryption_target) + PoolDiskEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_encryption_target=disk_encryption_target, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_encryption_target: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_encryption_target is None and 'diskEncryptionTarget' in kwargs: + disk_encryption_target = kwargs['diskEncryptionTarget'] + if disk_encryption_target is None: + raise TypeError("Missing 'disk_encryption_target' argument") + + _setter("disk_encryption_target", disk_encryption_target) @property @pulumi.getter(name="diskEncryptionTarget") @@ -733,21 +1001,66 @@ def __init__(__self__, *, :param pulumi.Input[str] settings_json: JSON formatted public settings for the extension. :param pulumi.Input[str] type_handler_version: The version of script handler. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) + PoolExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + publisher=publisher, + type=type, + auto_upgrade_minor_version=auto_upgrade_minor_version, + automatic_upgrade_enabled=automatic_upgrade_enabled, + protected_settings=protected_settings, + provision_after_extensions=provision_after_extensions, + settings_json=settings_json, + type_handler_version=type_handler_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + auto_upgrade_minor_version: Optional[pulumi.Input[bool]] = None, + automatic_upgrade_enabled: Optional[pulumi.Input[bool]] = None, + protected_settings: Optional[pulumi.Input[str]] = None, + provision_after_extensions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + settings_json: Optional[pulumi.Input[str]] = None, + type_handler_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if auto_upgrade_minor_version is None and 'autoUpgradeMinorVersion' in kwargs: + auto_upgrade_minor_version = kwargs['autoUpgradeMinorVersion'] + if automatic_upgrade_enabled is None and 'automaticUpgradeEnabled' in kwargs: + automatic_upgrade_enabled = kwargs['automaticUpgradeEnabled'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if provision_after_extensions is None and 'provisionAfterExtensions' in kwargs: + provision_after_extensions = kwargs['provisionAfterExtensions'] + if settings_json is None and 'settingsJson' in kwargs: + settings_json = kwargs['settingsJson'] + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + + _setter("name", name) + _setter("publisher", publisher) + _setter("type", type) if auto_upgrade_minor_version is not None: - pulumi.set(__self__, "auto_upgrade_minor_version", auto_upgrade_minor_version) + _setter("auto_upgrade_minor_version", auto_upgrade_minor_version) if automatic_upgrade_enabled is not None: - pulumi.set(__self__, "automatic_upgrade_enabled", automatic_upgrade_enabled) + _setter("automatic_upgrade_enabled", automatic_upgrade_enabled) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if provision_after_extensions is not None: - pulumi.set(__self__, "provision_after_extensions", provision_after_extensions) + _setter("provision_after_extensions", provision_after_extensions) if settings_json is not None: - pulumi.set(__self__, "settings_json", settings_json) + _setter("settings_json", settings_json) if type_handler_version is not None: - pulumi.set(__self__, "type_handler_version", type_handler_version) + _setter("type_handler_version", type_handler_version) @property @pulumi.getter @@ -873,14 +1186,39 @@ def __init__(__self__, *, :param pulumi.Input[int] target_dedicated_nodes: The number of nodes in the Batch pool. Defaults to `1`. :param pulumi.Input[int] target_low_priority_nodes: The number of low priority nodes in the Batch pool. Defaults to `0`. """ + PoolFixedScaleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + node_deallocation_method=node_deallocation_method, + resize_timeout=resize_timeout, + target_dedicated_nodes=target_dedicated_nodes, + target_low_priority_nodes=target_low_priority_nodes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + node_deallocation_method: Optional[pulumi.Input[str]] = None, + resize_timeout: Optional[pulumi.Input[str]] = None, + target_dedicated_nodes: Optional[pulumi.Input[int]] = None, + target_low_priority_nodes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if node_deallocation_method is None and 'nodeDeallocationMethod' in kwargs: + node_deallocation_method = kwargs['nodeDeallocationMethod'] + if resize_timeout is None and 'resizeTimeout' in kwargs: + resize_timeout = kwargs['resizeTimeout'] + if target_dedicated_nodes is None and 'targetDedicatedNodes' in kwargs: + target_dedicated_nodes = kwargs['targetDedicatedNodes'] + if target_low_priority_nodes is None and 'targetLowPriorityNodes' in kwargs: + target_low_priority_nodes = kwargs['targetLowPriorityNodes'] + if node_deallocation_method is not None: - pulumi.set(__self__, "node_deallocation_method", node_deallocation_method) + _setter("node_deallocation_method", node_deallocation_method) if resize_timeout is not None: - pulumi.set(__self__, "resize_timeout", resize_timeout) + _setter("resize_timeout", resize_timeout) if target_dedicated_nodes is not None: - pulumi.set(__self__, "target_dedicated_nodes", target_dedicated_nodes) + _setter("target_dedicated_nodes", target_dedicated_nodes) if target_low_priority_nodes is not None: - pulumi.set(__self__, "target_low_priority_nodes", target_low_priority_nodes) + _setter("target_low_priority_nodes", target_low_priority_nodes) @property @pulumi.getter(name="nodeDeallocationMethod") @@ -940,8 +1278,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: Specifies a list of User Assigned Managed Identity IDs to be assigned to this Batch Account. :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that should be configured on this Batch Account. Only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + PoolIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -981,14 +1338,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['PoolMountCifsMountArgs']]] cifs_mounts: A `cifs_mount` block defined as below. :param pulumi.Input[Sequence[pulumi.Input['PoolMountNfsMountArgs']]] nfs_mounts: A `nfs_mount` block defined as below. """ + PoolMountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_file_system=azure_blob_file_system, + azure_file_shares=azure_file_shares, + cifs_mounts=cifs_mounts, + nfs_mounts=nfs_mounts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_file_system: Optional[pulumi.Input['PoolMountAzureBlobFileSystemArgs']] = None, + azure_file_shares: Optional[pulumi.Input[Sequence[pulumi.Input['PoolMountAzureFileShareArgs']]]] = None, + cifs_mounts: Optional[pulumi.Input[Sequence[pulumi.Input['PoolMountCifsMountArgs']]]] = None, + nfs_mounts: Optional[pulumi.Input[Sequence[pulumi.Input['PoolMountNfsMountArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_file_system is None and 'azureBlobFileSystem' in kwargs: + azure_blob_file_system = kwargs['azureBlobFileSystem'] + if azure_file_shares is None and 'azureFileShares' in kwargs: + azure_file_shares = kwargs['azureFileShares'] + if cifs_mounts is None and 'cifsMounts' in kwargs: + cifs_mounts = kwargs['cifsMounts'] + if nfs_mounts is None and 'nfsMounts' in kwargs: + nfs_mounts = kwargs['nfsMounts'] + if azure_blob_file_system is not None: - pulumi.set(__self__, "azure_blob_file_system", azure_blob_file_system) + _setter("azure_blob_file_system", azure_blob_file_system) if azure_file_shares is not None: - pulumi.set(__self__, "azure_file_shares", azure_file_shares) + _setter("azure_file_shares", azure_file_shares) if cifs_mounts is not None: - pulumi.set(__self__, "cifs_mounts", cifs_mounts) + _setter("cifs_mounts", cifs_mounts) if nfs_mounts is not None: - pulumi.set(__self__, "nfs_mounts", nfs_mounts) + _setter("nfs_mounts", nfs_mounts) @property @pulumi.getter(name="azureBlobFileSystem") @@ -1058,17 +1440,60 @@ def __init__(__self__, *, :param pulumi.Input[str] identity_id: The ARM resource id of the user assigned identity. This property is mutually exclusive with both `account_key` and `sas_key`; exactly one must be specified. :param pulumi.Input[str] sas_key: The Azure Storage SAS token. This property is mutually exclusive with both `account_key` and `identity_id`; exactly one must be specified. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "relative_mount_path", relative_mount_path) + PoolMountAzureBlobFileSystemArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + container_name=container_name, + relative_mount_path=relative_mount_path, + account_key=account_key, + blobfuse_options=blobfuse_options, + identity_id=identity_id, + sas_key=sas_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + container_name: Optional[pulumi.Input[str]] = None, + relative_mount_path: Optional[pulumi.Input[str]] = None, + account_key: Optional[pulumi.Input[str]] = None, + blobfuse_options: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + sas_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if relative_mount_path is None and 'relativeMountPath' in kwargs: + relative_mount_path = kwargs['relativeMountPath'] + if relative_mount_path is None: + raise TypeError("Missing 'relative_mount_path' argument") + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if blobfuse_options is None and 'blobfuseOptions' in kwargs: + blobfuse_options = kwargs['blobfuseOptions'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if sas_key is None and 'sasKey' in kwargs: + sas_key = kwargs['sasKey'] + + _setter("account_name", account_name) + _setter("container_name", container_name) + _setter("relative_mount_path", relative_mount_path) if account_key is not None: - pulumi.set(__self__, "account_key", account_key) + _setter("account_key", account_key) if blobfuse_options is not None: - pulumi.set(__self__, "blobfuse_options", blobfuse_options) + _setter("blobfuse_options", blobfuse_options) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if sas_key is not None: - pulumi.set(__self__, "sas_key", sas_key) + _setter("sas_key", sas_key) @property @pulumi.getter(name="accountName") @@ -1170,12 +1595,49 @@ def __init__(__self__, *, :param pulumi.Input[str] relative_mount_path: The relative path on compute node where the file system will be mounted All file systems are mounted relative to the Batch mounts directory, accessible via the `AZ_BATCH_NODE_MOUNTS_DIR` environment variable. :param pulumi.Input[str] mount_options: Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. """ - pulumi.set(__self__, "account_key", account_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "azure_file_url", azure_file_url) - pulumi.set(__self__, "relative_mount_path", relative_mount_path) + PoolMountAzureFileShareArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_key=account_key, + account_name=account_name, + azure_file_url=azure_file_url, + relative_mount_path=relative_mount_path, + mount_options=mount_options, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_key: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + azure_file_url: Optional[pulumi.Input[str]] = None, + relative_mount_path: Optional[pulumi.Input[str]] = None, + mount_options: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if account_key is None: + raise TypeError("Missing 'account_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if azure_file_url is None and 'azureFileUrl' in kwargs: + azure_file_url = kwargs['azureFileUrl'] + if azure_file_url is None: + raise TypeError("Missing 'azure_file_url' argument") + if relative_mount_path is None and 'relativeMountPath' in kwargs: + relative_mount_path = kwargs['relativeMountPath'] + if relative_mount_path is None: + raise TypeError("Missing 'relative_mount_path' argument") + if mount_options is None and 'mountOptions' in kwargs: + mount_options = kwargs['mountOptions'] + + _setter("account_key", account_key) + _setter("account_name", account_name) + _setter("azure_file_url", azure_file_url) + _setter("relative_mount_path", relative_mount_path) if mount_options is not None: - pulumi.set(__self__, "mount_options", mount_options) + _setter("mount_options", mount_options) @property @pulumi.getter(name="accountKey") @@ -1253,12 +1715,45 @@ def __init__(__self__, *, :param pulumi.Input[str] user_name: The user to use for authentication against the CIFS file system. :param pulumi.Input[str] mount_options: Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "relative_mount_path", relative_mount_path) - pulumi.set(__self__, "source", source) - pulumi.set(__self__, "user_name", user_name) + PoolMountCifsMountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + relative_mount_path=relative_mount_path, + source=source, + user_name=user_name, + mount_options=mount_options, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + relative_mount_path: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input[str]] = None, + user_name: Optional[pulumi.Input[str]] = None, + mount_options: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if relative_mount_path is None and 'relativeMountPath' in kwargs: + relative_mount_path = kwargs['relativeMountPath'] + if relative_mount_path is None: + raise TypeError("Missing 'relative_mount_path' argument") + if source is None: + raise TypeError("Missing 'source' argument") + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + if user_name is None: + raise TypeError("Missing 'user_name' argument") + if mount_options is None and 'mountOptions' in kwargs: + mount_options = kwargs['mountOptions'] + + _setter("password", password) + _setter("relative_mount_path", relative_mount_path) + _setter("source", source) + _setter("user_name", user_name) if mount_options is not None: - pulumi.set(__self__, "mount_options", mount_options) + _setter("mount_options", mount_options) @property @pulumi.getter @@ -1332,10 +1827,33 @@ def __init__(__self__, *, :param pulumi.Input[str] source: The URI of the file system to mount. :param pulumi.Input[str] mount_options: Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. """ - pulumi.set(__self__, "relative_mount_path", relative_mount_path) - pulumi.set(__self__, "source", source) + PoolMountNfsMountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + relative_mount_path=relative_mount_path, + source=source, + mount_options=mount_options, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + relative_mount_path: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input[str]] = None, + mount_options: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if relative_mount_path is None and 'relativeMountPath' in kwargs: + relative_mount_path = kwargs['relativeMountPath'] + if relative_mount_path is None: + raise TypeError("Missing 'relative_mount_path' argument") + if source is None: + raise TypeError("Missing 'source' argument") + if mount_options is None and 'mountOptions' in kwargs: + mount_options = kwargs['mountOptions'] + + _setter("relative_mount_path", relative_mount_path) + _setter("source", source) if mount_options is not None: - pulumi.set(__self__, "mount_options", mount_options) + _setter("mount_options", mount_options) @property @pulumi.getter(name="relativeMountPath") @@ -1391,18 +1909,51 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] public_ips: A list of public IP ids that will be allocated to nodes. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ARM resource identifier of the virtual network subnet which the compute nodes of the pool will join. Changing this forces a new resource to be created. """ + PoolNetworkConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + accelerated_networking_enabled=accelerated_networking_enabled, + dynamic_vnet_assignment_scope=dynamic_vnet_assignment_scope, + endpoint_configurations=endpoint_configurations, + public_address_provisioning_type=public_address_provisioning_type, + public_ips=public_ips, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + accelerated_networking_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_vnet_assignment_scope: Optional[pulumi.Input[str]] = None, + endpoint_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['PoolNetworkConfigurationEndpointConfigurationArgs']]]] = None, + public_address_provisioning_type: Optional[pulumi.Input[str]] = None, + public_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if accelerated_networking_enabled is None and 'acceleratedNetworkingEnabled' in kwargs: + accelerated_networking_enabled = kwargs['acceleratedNetworkingEnabled'] + if dynamic_vnet_assignment_scope is None and 'dynamicVnetAssignmentScope' in kwargs: + dynamic_vnet_assignment_scope = kwargs['dynamicVnetAssignmentScope'] + if endpoint_configurations is None and 'endpointConfigurations' in kwargs: + endpoint_configurations = kwargs['endpointConfigurations'] + if public_address_provisioning_type is None and 'publicAddressProvisioningType' in kwargs: + public_address_provisioning_type = kwargs['publicAddressProvisioningType'] + if public_ips is None and 'publicIps' in kwargs: + public_ips = kwargs['publicIps'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if accelerated_networking_enabled is not None: - pulumi.set(__self__, "accelerated_networking_enabled", accelerated_networking_enabled) + _setter("accelerated_networking_enabled", accelerated_networking_enabled) if dynamic_vnet_assignment_scope is not None: - pulumi.set(__self__, "dynamic_vnet_assignment_scope", dynamic_vnet_assignment_scope) + _setter("dynamic_vnet_assignment_scope", dynamic_vnet_assignment_scope) if endpoint_configurations is not None: - pulumi.set(__self__, "endpoint_configurations", endpoint_configurations) + _setter("endpoint_configurations", endpoint_configurations) if public_address_provisioning_type is not None: - pulumi.set(__self__, "public_address_provisioning_type", public_address_provisioning_type) + _setter("public_address_provisioning_type", public_address_provisioning_type) if public_ips is not None: - pulumi.set(__self__, "public_ips", public_ips) + _setter("public_ips", public_ips) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="acceleratedNetworkingEnabled") @@ -1492,12 +2043,45 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol: The protocol of the endpoint. Acceptable values are `TCP` and `UDP`. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['PoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleArgs']]] network_security_group_rules: A list of `network_security_group_rules` blocks as defined below that will be applied to the endpoint. The maximum number of rules that can be specified across all the endpoints on a Batch pool is `25`. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. Set as documented in the network_security_group_rules block below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "backend_port", backend_port) - pulumi.set(__self__, "frontend_port_range", frontend_port_range) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + PoolNetworkConfigurationEndpointConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + frontend_port_range=frontend_port_range, + name=name, + protocol=protocol, + network_security_group_rules=network_security_group_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[pulumi.Input[int]] = None, + frontend_port_range: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + network_security_group_rules: Optional[pulumi.Input[Sequence[pulumi.Input['PoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if backend_port is None: + raise TypeError("Missing 'backend_port' argument") + if frontend_port_range is None and 'frontendPortRange' in kwargs: + frontend_port_range = kwargs['frontendPortRange'] + if frontend_port_range is None: + raise TypeError("Missing 'frontend_port_range' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if network_security_group_rules is None and 'networkSecurityGroupRules' in kwargs: + network_security_group_rules = kwargs['networkSecurityGroupRules'] + + _setter("backend_port", backend_port) + _setter("frontend_port_range", frontend_port_range) + _setter("name", name) + _setter("protocol", protocol) if network_security_group_rules is not None: - pulumi.set(__self__, "network_security_group_rules", network_security_group_rules) + _setter("network_security_group_rules", network_security_group_rules) @property @pulumi.getter(name="backendPort") @@ -1573,11 +2157,38 @@ def __init__(__self__, *, :param pulumi.Input[str] source_address_prefix: The source address prefix or tag to match for the rule. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] source_port_ranges: The source port ranges to match for the rule. Valid values are `*` (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. `100-200`). The ports should in the range of 0 to 65535 and the port ranges or ports can't overlap. If any other values are provided the request fails with HTTP status code 400. Default value will be `*`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "source_address_prefix", source_address_prefix) + PoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + priority=priority, + source_address_prefix=source_address_prefix, + source_port_ranges=source_port_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + source_address_prefix: Optional[pulumi.Input[str]] = None, + source_port_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if source_address_prefix is None and 'sourceAddressPrefix' in kwargs: + source_address_prefix = kwargs['sourceAddressPrefix'] + if source_address_prefix is None: + raise TypeError("Missing 'source_address_prefix' argument") + if source_port_ranges is None and 'sourcePortRanges' in kwargs: + source_port_ranges = kwargs['sourcePortRanges'] + + _setter("access", access) + _setter("priority", priority) + _setter("source_address_prefix", source_address_prefix) if source_port_ranges is not None: - pulumi.set(__self__, "source_port_ranges", source_port_ranges) + _setter("source_port_ranges", source_port_ranges) @property @pulumi.getter @@ -1635,8 +2246,19 @@ def __init__(__self__, *, """ :param pulumi.Input[str] policy: The placement policy for allocating nodes in the pool. Values are: "Regional": All nodes in the pool will be allocated in the same region; "Zonal": Nodes in the pool will be spread across different zones with the best effort balancing. """ + PoolNodePlacementArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy is not None: - pulumi.set(__self__, "policy", policy) + _setter("policy", policy) @property @pulumi.getter @@ -1670,18 +2292,57 @@ def __init__(__self__, *, :param pulumi.Input[int] task_retry_maximum: The number of retry count. :param pulumi.Input[bool] wait_for_success: A flag that indicates if the Batch pool should wait for the start task to be completed. Default to `false`. """ - pulumi.set(__self__, "command_line", command_line) - pulumi.set(__self__, "user_identity", user_identity) + PoolStartTaskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + command_line=command_line, + user_identity=user_identity, + common_environment_properties=common_environment_properties, + containers=containers, + resource_files=resource_files, + task_retry_maximum=task_retry_maximum, + wait_for_success=wait_for_success, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + command_line: Optional[pulumi.Input[str]] = None, + user_identity: Optional[pulumi.Input['PoolStartTaskUserIdentityArgs']] = None, + common_environment_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + containers: Optional[pulumi.Input[Sequence[pulumi.Input['PoolStartTaskContainerArgs']]]] = None, + resource_files: Optional[pulumi.Input[Sequence[pulumi.Input['PoolStartTaskResourceFileArgs']]]] = None, + task_retry_maximum: Optional[pulumi.Input[int]] = None, + wait_for_success: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if command_line is None and 'commandLine' in kwargs: + command_line = kwargs['commandLine'] + if command_line is None: + raise TypeError("Missing 'command_line' argument") + if user_identity is None and 'userIdentity' in kwargs: + user_identity = kwargs['userIdentity'] + if user_identity is None: + raise TypeError("Missing 'user_identity' argument") + if common_environment_properties is None and 'commonEnvironmentProperties' in kwargs: + common_environment_properties = kwargs['commonEnvironmentProperties'] + if resource_files is None and 'resourceFiles' in kwargs: + resource_files = kwargs['resourceFiles'] + if task_retry_maximum is None and 'taskRetryMaximum' in kwargs: + task_retry_maximum = kwargs['taskRetryMaximum'] + if wait_for_success is None and 'waitForSuccess' in kwargs: + wait_for_success = kwargs['waitForSuccess'] + + _setter("command_line", command_line) + _setter("user_identity", user_identity) if common_environment_properties is not None: - pulumi.set(__self__, "common_environment_properties", common_environment_properties) + _setter("common_environment_properties", common_environment_properties) if containers is not None: - pulumi.set(__self__, "containers", containers) + _setter("containers", containers) if resource_files is not None: - pulumi.set(__self__, "resource_files", resource_files) + _setter("resource_files", resource_files) if task_retry_maximum is not None: - pulumi.set(__self__, "task_retry_maximum", task_retry_maximum) + _setter("task_retry_maximum", task_retry_maximum) if wait_for_success is not None: - pulumi.set(__self__, "wait_for_success", wait_for_success) + _setter("wait_for_success", wait_for_success) @property @pulumi.getter(name="commandLine") @@ -1781,13 +2442,38 @@ def __init__(__self__, *, :param pulumi.Input[str] run_options: Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service. :param pulumi.Input[str] working_directory: A flag to indicate where the container task working directory is. The default is `TaskWorkingDirectory`, an alternative value is `ContainerImageDefault`. """ - pulumi.set(__self__, "image_name", image_name) + PoolStartTaskContainerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + image_name=image_name, + registries=registries, + run_options=run_options, + working_directory=working_directory, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image_name: Optional[pulumi.Input[str]] = None, + registries: Optional[pulumi.Input[Sequence[pulumi.Input['PoolStartTaskContainerRegistryArgs']]]] = None, + run_options: Optional[pulumi.Input[str]] = None, + working_directory: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if image_name is None: + raise TypeError("Missing 'image_name' argument") + if run_options is None and 'runOptions' in kwargs: + run_options = kwargs['runOptions'] + if working_directory is None and 'workingDirectory' in kwargs: + working_directory = kwargs['workingDirectory'] + + _setter("image_name", image_name) if registries is not None: - pulumi.set(__self__, "registries", registries) + _setter("registries", registries) if run_options is not None: - pulumi.set(__self__, "run_options", run_options) + _setter("run_options", run_options) if working_directory is not None: - pulumi.set(__self__, "working_directory", working_directory) + _setter("working_directory", working_directory) @property @pulumi.getter(name="imageName") @@ -1851,13 +2537,38 @@ def __init__(__self__, *, :param pulumi.Input[str] user_assigned_identity_id: The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password. Changing this forces a new resource to be created. :param pulumi.Input[str] user_name: The user to use for authentication against the CIFS file system. """ - pulumi.set(__self__, "registry_server", registry_server) + PoolStartTaskContainerRegistryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + registry_server=registry_server, + password=password, + user_assigned_identity_id=user_assigned_identity_id, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + registry_server: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + user_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if registry_server is None and 'registryServer' in kwargs: + registry_server = kwargs['registryServer'] + if registry_server is None: + raise TypeError("Missing 'registry_server' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + + _setter("registry_server", registry_server) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) if user_name is not None: - pulumi.set(__self__, "user_name", user_name) + _setter("user_name", user_name) @property @pulumi.getter(name="registryServer") @@ -1929,20 +2640,57 @@ def __init__(__self__, *, > **Please Note:** Exactly one of `auto_storage_container_name`, `storage_container_url` and `auto_user` must be specified. """ + PoolStartTaskResourceFileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_storage_container_name=auto_storage_container_name, + blob_prefix=blob_prefix, + file_mode=file_mode, + file_path=file_path, + http_url=http_url, + storage_container_url=storage_container_url, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_storage_container_name: Optional[pulumi.Input[str]] = None, + blob_prefix: Optional[pulumi.Input[str]] = None, + file_mode: Optional[pulumi.Input[str]] = None, + file_path: Optional[pulumi.Input[str]] = None, + http_url: Optional[pulumi.Input[str]] = None, + storage_container_url: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_storage_container_name is None and 'autoStorageContainerName' in kwargs: + auto_storage_container_name = kwargs['autoStorageContainerName'] + if blob_prefix is None and 'blobPrefix' in kwargs: + blob_prefix = kwargs['blobPrefix'] + if file_mode is None and 'fileMode' in kwargs: + file_mode = kwargs['fileMode'] + if file_path is None and 'filePath' in kwargs: + file_path = kwargs['filePath'] + if http_url is None and 'httpUrl' in kwargs: + http_url = kwargs['httpUrl'] + if storage_container_url is None and 'storageContainerUrl' in kwargs: + storage_container_url = kwargs['storageContainerUrl'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if auto_storage_container_name is not None: - pulumi.set(__self__, "auto_storage_container_name", auto_storage_container_name) + _setter("auto_storage_container_name", auto_storage_container_name) if blob_prefix is not None: - pulumi.set(__self__, "blob_prefix", blob_prefix) + _setter("blob_prefix", blob_prefix) if file_mode is not None: - pulumi.set(__self__, "file_mode", file_mode) + _setter("file_mode", file_mode) if file_path is not None: - pulumi.set(__self__, "file_path", file_path) + _setter("file_path", file_path) if http_url is not None: - pulumi.set(__self__, "http_url", http_url) + _setter("http_url", http_url) if storage_container_url is not None: - pulumi.set(__self__, "storage_container_url", storage_container_url) + _setter("storage_container_url", storage_container_url) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="autoStorageContainerName") @@ -2042,10 +2790,27 @@ def __init__(__self__, *, > **Please Note:** `user_name` and `auto_user` blocks cannot be used both at the same time, but you need to define one or the other. :param pulumi.Input[str] user_name: The username to be used by the Batch pool start task. """ + PoolStartTaskUserIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_user=auto_user, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_user: Optional[pulumi.Input['PoolStartTaskUserIdentityAutoUserArgs']] = None, + user_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_user is None and 'autoUser' in kwargs: + auto_user = kwargs['autoUser'] + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + if auto_user is not None: - pulumi.set(__self__, "auto_user", auto_user) + _setter("auto_user", auto_user) if user_name is not None: - pulumi.set(__self__, "user_name", user_name) + _setter("user_name", user_name) @property @pulumi.getter(name="autoUser") @@ -2083,10 +2848,25 @@ def __init__(__self__, *, :param pulumi.Input[str] elevation_level: The elevation level of the user identity under which the start task runs. Possible values are `Admin` or `NonAdmin`. Defaults to `NonAdmin`. :param pulumi.Input[str] scope: The scope of the user identity under which the start task runs. Possible values are `Task` or `Pool`. Defaults to `Task`. """ + PoolStartTaskUserIdentityAutoUserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + elevation_level=elevation_level, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + elevation_level: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if elevation_level is None and 'elevationLevel' in kwargs: + elevation_level = kwargs['elevationLevel'] + if elevation_level is not None: - pulumi.set(__self__, "elevation_level", elevation_level) + _setter("elevation_level", elevation_level) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="elevationLevel") @@ -2130,16 +2910,35 @@ def __init__(__self__, *, To provision a Custom Image, the following fields are applicable: """ + PoolStorageImageReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + offer: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if offer is not None: - pulumi.set(__self__, "offer", offer) + _setter("offer", offer) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -2211,8 +3010,21 @@ def __init__(__self__, *, """ :param pulumi.Input[str] node_fill_type: Supported values are "Pack" and "Spread". "Pack" means as many tasks as possible (taskSlotsPerNode) should be assigned to each node in the pool before any tasks are assigned to the next node in the pool. "Spread" means that tasks should be assigned evenly across all nodes in the pool. """ + PoolTaskSchedulingPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + node_fill_type=node_fill_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + node_fill_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if node_fill_type is None and 'nodeFillType' in kwargs: + node_fill_type = kwargs['nodeFillType'] + if node_fill_type is not None: - pulumi.set(__self__, "node_fill_type", node_fill_type) + _setter("node_fill_type", node_fill_type) @property @pulumi.getter(name="nodeFillType") @@ -2242,13 +3054,44 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['PoolUserAccountLinuxUserConfigurationArgs']]] linux_user_configurations: The `linux_user_configuration` block defined below is a linux-specific user configuration for the user account. This property is ignored if specified on a Windows pool. If not specified, the user is created with the default options. :param pulumi.Input[Sequence[pulumi.Input['PoolUserAccountWindowsUserConfigurationArgs']]] windows_user_configurations: The `windows_user_configuration` block defined below is a windows-specific user configuration for the user account. This property can only be specified if the user is on a Windows pool. If not specified and on a Windows pool, the user is created with the default options. """ - pulumi.set(__self__, "elevation_level", elevation_level) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "password", password) + PoolUserAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + elevation_level=elevation_level, + name=name, + password=password, + linux_user_configurations=linux_user_configurations, + windows_user_configurations=windows_user_configurations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + elevation_level: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + linux_user_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['PoolUserAccountLinuxUserConfigurationArgs']]]] = None, + windows_user_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['PoolUserAccountWindowsUserConfigurationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if elevation_level is None and 'elevationLevel' in kwargs: + elevation_level = kwargs['elevationLevel'] + if elevation_level is None: + raise TypeError("Missing 'elevation_level' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if linux_user_configurations is None and 'linuxUserConfigurations' in kwargs: + linux_user_configurations = kwargs['linuxUserConfigurations'] + if windows_user_configurations is None and 'windowsUserConfigurations' in kwargs: + windows_user_configurations = kwargs['windowsUserConfigurations'] + + _setter("elevation_level", elevation_level) + _setter("name", name) + _setter("password", password) if linux_user_configurations is not None: - pulumi.set(__self__, "linux_user_configurations", linux_user_configurations) + _setter("linux_user_configurations", linux_user_configurations) if windows_user_configurations is not None: - pulumi.set(__self__, "windows_user_configurations", windows_user_configurations) + _setter("windows_user_configurations", windows_user_configurations) @property @pulumi.getter(name="elevationLevel") @@ -2322,12 +3165,29 @@ def __init__(__self__, *, :param pulumi.Input[str] ssh_private_key: The SSH private key for the user account. The private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between nodes in a Linux pool when the pool's enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not configured between nodes (no modification of the user's .ssh directory is done). :param pulumi.Input[int] uid: The group ID for the user account. The `uid` and `gid` properties must be specified together or not at all. If not specified the underlying operating system picks the gid. """ + PoolUserAccountLinuxUserConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + gid=gid, + ssh_private_key=ssh_private_key, + uid=uid, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + gid: Optional[pulumi.Input[int]] = None, + ssh_private_key: Optional[pulumi.Input[str]] = None, + uid: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ssh_private_key is None and 'sshPrivateKey' in kwargs: + ssh_private_key = kwargs['sshPrivateKey'] + if gid is not None: - pulumi.set(__self__, "gid", gid) + _setter("gid", gid) if ssh_private_key is not None: - pulumi.set(__self__, "ssh_private_key", ssh_private_key) + _setter("ssh_private_key", ssh_private_key) if uid is not None: - pulumi.set(__self__, "uid", uid) + _setter("uid", uid) @property @pulumi.getter @@ -2373,7 +3233,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] login_mode: Specifies login mode for the user. The default value for VirtualMachineConfiguration pools is interactive mode and for CloudServiceConfiguration pools is batch mode. Values supported are "Batch" and "Interactive". """ - pulumi.set(__self__, "login_mode", login_mode) + PoolUserAccountWindowsUserConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login_mode=login_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login_mode is None and 'loginMode' in kwargs: + login_mode = kwargs['loginMode'] + if login_mode is None: + raise TypeError("Missing 'login_mode' argument") + + _setter("login_mode", login_mode) @property @pulumi.getter(name="loginMode") @@ -2395,8 +3270,21 @@ def __init__(__self__, *, """ :param pulumi.Input[bool] enable_automatic_updates: Whether automatic updates are enabled on the virtual machine. If omitted, the default value is true. """ + PoolWindowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enable_automatic_updates=enable_automatic_updates, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enable_automatic_updates: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enable_automatic_updates is None and 'enableAutomaticUpdates' in kwargs: + enable_automatic_updates = kwargs['enableAutomaticUpdates'] + if enable_automatic_updates is not None: - pulumi.set(__self__, "enable_automatic_updates", enable_automatic_updates) + _setter("enable_automatic_updates", enable_automatic_updates) @property @pulumi.getter(name="enableAutomaticUpdates") @@ -2418,7 +3306,22 @@ def __init__(__self__, *, """ :param str key_vault_key_id: The full URL path of the Key Vault Key used to encrypt data for this Batch account. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + GetAccountEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + + _setter("key_vault_key_id", key_vault_key_id) @property @pulumi.getter(name="keyVaultKeyId") diff --git a/sdk/python/pulumi_azure/batch/account.py b/sdk/python/pulumi_azure/batch/account.py index 133229cfbf..7938eede5a 100644 --- a/sdk/python/pulumi_azure/batch/account.py +++ b/sdk/python/pulumi_azure/batch/account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -57,33 +57,90 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_node_identity: Specifies the user assigned identity for the storage account. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + AccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + allowed_authentication_modes=allowed_authentication_modes, + encryption=encryption, + identity=identity, + key_vault_reference=key_vault_reference, + location=location, + name=name, + network_profile=network_profile, + pool_allocation_mode=pool_allocation_mode, + public_network_access_enabled=public_network_access_enabled, + storage_account_authentication_mode=storage_account_authentication_mode, + storage_account_id=storage_account_id, + storage_account_node_identity=storage_account_node_identity, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + allowed_authentication_modes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + encryption: Optional[pulumi.Input['AccountEncryptionArgs']] = None, + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + key_vault_reference: Optional[pulumi.Input['AccountKeyVaultReferenceArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_profile: Optional[pulumi.Input['AccountNetworkProfileArgs']] = None, + pool_allocation_mode: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + storage_account_authentication_mode: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_account_node_identity: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if allowed_authentication_modes is None and 'allowedAuthenticationModes' in kwargs: + allowed_authentication_modes = kwargs['allowedAuthenticationModes'] + if key_vault_reference is None and 'keyVaultReference' in kwargs: + key_vault_reference = kwargs['keyVaultReference'] + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if pool_allocation_mode is None and 'poolAllocationMode' in kwargs: + pool_allocation_mode = kwargs['poolAllocationMode'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if storage_account_authentication_mode is None and 'storageAccountAuthenticationMode' in kwargs: + storage_account_authentication_mode = kwargs['storageAccountAuthenticationMode'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_node_identity is None and 'storageAccountNodeIdentity' in kwargs: + storage_account_node_identity = kwargs['storageAccountNodeIdentity'] + + _setter("resource_group_name", resource_group_name) if allowed_authentication_modes is not None: - pulumi.set(__self__, "allowed_authentication_modes", allowed_authentication_modes) + _setter("allowed_authentication_modes", allowed_authentication_modes) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference is not None: - pulumi.set(__self__, "key_vault_reference", key_vault_reference) + _setter("key_vault_reference", key_vault_reference) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_profile is not None: - pulumi.set(__self__, "network_profile", network_profile) + _setter("network_profile", network_profile) if pool_allocation_mode is not None: - pulumi.set(__self__, "pool_allocation_mode", pool_allocation_mode) + _setter("pool_allocation_mode", pool_allocation_mode) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if storage_account_authentication_mode is not None: - pulumi.set(__self__, "storage_account_authentication_mode", storage_account_authentication_mode) + _setter("storage_account_authentication_mode", storage_account_authentication_mode) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if storage_account_node_identity is not None: - pulumi.set(__self__, "storage_account_node_identity", storage_account_node_identity) + _setter("storage_account_node_identity", storage_account_node_identity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -314,40 +371,107 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_node_identity: Specifies the user assigned identity for the storage account. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _AccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_endpoint=account_endpoint, + allowed_authentication_modes=allowed_authentication_modes, + encryption=encryption, + identity=identity, + key_vault_reference=key_vault_reference, + location=location, + name=name, + network_profile=network_profile, + pool_allocation_mode=pool_allocation_mode, + primary_access_key=primary_access_key, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + secondary_access_key=secondary_access_key, + storage_account_authentication_mode=storage_account_authentication_mode, + storage_account_id=storage_account_id, + storage_account_node_identity=storage_account_node_identity, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_endpoint: Optional[pulumi.Input[str]] = None, + allowed_authentication_modes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + encryption: Optional[pulumi.Input['AccountEncryptionArgs']] = None, + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + key_vault_reference: Optional[pulumi.Input['AccountKeyVaultReferenceArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_profile: Optional[pulumi.Input['AccountNetworkProfileArgs']] = None, + pool_allocation_mode: Optional[pulumi.Input[str]] = None, + primary_access_key: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_access_key: Optional[pulumi.Input[str]] = None, + storage_account_authentication_mode: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_account_node_identity: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_endpoint is None and 'accountEndpoint' in kwargs: + account_endpoint = kwargs['accountEndpoint'] + if allowed_authentication_modes is None and 'allowedAuthenticationModes' in kwargs: + allowed_authentication_modes = kwargs['allowedAuthenticationModes'] + if key_vault_reference is None and 'keyVaultReference' in kwargs: + key_vault_reference = kwargs['keyVaultReference'] + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if pool_allocation_mode is None and 'poolAllocationMode' in kwargs: + pool_allocation_mode = kwargs['poolAllocationMode'] + if primary_access_key is None and 'primaryAccessKey' in kwargs: + primary_access_key = kwargs['primaryAccessKey'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_access_key is None and 'secondaryAccessKey' in kwargs: + secondary_access_key = kwargs['secondaryAccessKey'] + if storage_account_authentication_mode is None and 'storageAccountAuthenticationMode' in kwargs: + storage_account_authentication_mode = kwargs['storageAccountAuthenticationMode'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_node_identity is None and 'storageAccountNodeIdentity' in kwargs: + storage_account_node_identity = kwargs['storageAccountNodeIdentity'] + if account_endpoint is not None: - pulumi.set(__self__, "account_endpoint", account_endpoint) + _setter("account_endpoint", account_endpoint) if allowed_authentication_modes is not None: - pulumi.set(__self__, "allowed_authentication_modes", allowed_authentication_modes) + _setter("allowed_authentication_modes", allowed_authentication_modes) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_reference is not None: - pulumi.set(__self__, "key_vault_reference", key_vault_reference) + _setter("key_vault_reference", key_vault_reference) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_profile is not None: - pulumi.set(__self__, "network_profile", network_profile) + _setter("network_profile", network_profile) if pool_allocation_mode is not None: - pulumi.set(__self__, "pool_allocation_mode", pool_allocation_mode) + _setter("pool_allocation_mode", pool_allocation_mode) if primary_access_key is not None: - pulumi.set(__self__, "primary_access_key", primary_access_key) + _setter("primary_access_key", primary_access_key) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_access_key is not None: - pulumi.set(__self__, "secondary_access_key", secondary_access_key) + _setter("secondary_access_key", secondary_access_key) if storage_account_authentication_mode is not None: - pulumi.set(__self__, "storage_account_authentication_mode", storage_account_authentication_mode) + _setter("storage_account_authentication_mode", storage_account_authentication_mode) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if storage_account_node_identity is not None: - pulumi.set(__self__, "storage_account_node_identity", storage_account_node_identity) + _setter("storage_account_node_identity", storage_account_node_identity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="accountEndpoint") @@ -695,6 +819,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -724,11 +852,31 @@ def _internal_init(__self__, __props__ = AccountArgs.__new__(AccountArgs) __props__.__dict__["allowed_authentication_modes"] = allowed_authentication_modes + if encryption is not None and not isinstance(encryption, AccountEncryptionArgs): + encryption = encryption or {} + def _setter(key, value): + encryption[key] = value + AccountEncryptionArgs._configure(_setter, **encryption) __props__.__dict__["encryption"] = encryption + if identity is not None and not isinstance(identity, AccountIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + AccountIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity + if key_vault_reference is not None and not isinstance(key_vault_reference, AccountKeyVaultReferenceArgs): + key_vault_reference = key_vault_reference or {} + def _setter(key, value): + key_vault_reference[key] = value + AccountKeyVaultReferenceArgs._configure(_setter, **key_vault_reference) __props__.__dict__["key_vault_reference"] = key_vault_reference __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if network_profile is not None and not isinstance(network_profile, AccountNetworkProfileArgs): + network_profile = network_profile or {} + def _setter(key, value): + network_profile[key] = value + AccountNetworkProfileArgs._configure(_setter, **network_profile) __props__.__dict__["network_profile"] = network_profile __props__.__dict__["pool_allocation_mode"] = pool_allocation_mode __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled diff --git a/sdk/python/pulumi_azure/batch/application.py b/sdk/python/pulumi_azure/batch/application.py index cf9fc7777d..4e1b4d8f8b 100644 --- a/sdk/python/pulumi_azure/batch/application.py +++ b/sdk/python/pulumi_azure/batch/application.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApplicationArgs', 'Application'] @@ -29,16 +29,51 @@ def __init__(__self__, *, :param pulumi.Input[str] display_name: The display name for the application. :param pulumi.Input[str] name: The name of the application. This must be unique within the account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ApplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + resource_group_name=resource_group_name, + allow_updates=allow_updates, + default_version=default_version, + display_name=display_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + allow_updates: Optional[pulumi.Input[bool]] = None, + default_version: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if allow_updates is None and 'allowUpdates' in kwargs: + allow_updates = kwargs['allowUpdates'] + if default_version is None and 'defaultVersion' in kwargs: + default_version = kwargs['defaultVersion'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + + _setter("account_name", account_name) + _setter("resource_group_name", resource_group_name) if allow_updates is not None: - pulumi.set(__self__, "allow_updates", allow_updates) + _setter("allow_updates", allow_updates) if default_version is not None: - pulumi.set(__self__, "default_version", default_version) + _setter("default_version", default_version) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="accountName") @@ -131,18 +166,49 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the application. This must be unique within the account. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group that contains the Batch account. Changing this forces a new resource to be created. """ + _ApplicationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + allow_updates=allow_updates, + default_version=default_version, + display_name=display_name, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + allow_updates: Optional[pulumi.Input[bool]] = None, + default_version: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if allow_updates is None and 'allowUpdates' in kwargs: + allow_updates = kwargs['allowUpdates'] + if default_version is None and 'defaultVersion' in kwargs: + default_version = kwargs['defaultVersion'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if allow_updates is not None: - pulumi.set(__self__, "allow_updates", allow_updates) + _setter("allow_updates", allow_updates) if default_version is not None: - pulumi.set(__self__, "default_version", default_version) + _setter("default_version", default_version) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="accountName") @@ -322,6 +388,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApplicationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/batch/certificate.py b/sdk/python/pulumi_azure/batch/certificate.py index 233801a409..5510f84425 100644 --- a/sdk/python/pulumi_azure/batch/certificate.py +++ b/sdk/python/pulumi_azure/batch/certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CertificateArgs', 'Certificate'] @@ -31,14 +31,55 @@ def __init__(__self__, *, :param pulumi.Input[str] thumbprint_algorithm: The algorithm of the certificate thumbprint. At this time the only supported value is `SHA1`. Changing this forces a new resource to be created. :param pulumi.Input[str] password: The password to access the certificate's private key. This can only be specified when `format` is `Pfx`. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "certificate", certificate) - pulumi.set(__self__, "format", format) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "thumbprint", thumbprint) - pulumi.set(__self__, "thumbprint_algorithm", thumbprint_algorithm) + CertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + certificate=certificate, + format=format, + resource_group_name=resource_group_name, + thumbprint=thumbprint, + thumbprint_algorithm=thumbprint_algorithm, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + format: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + thumbprint_algorithm: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if certificate is None: + raise TypeError("Missing 'certificate' argument") + if format is None: + raise TypeError("Missing 'format' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + if thumbprint_algorithm is None and 'thumbprintAlgorithm' in kwargs: + thumbprint_algorithm = kwargs['thumbprintAlgorithm'] + if thumbprint_algorithm is None: + raise TypeError("Missing 'thumbprint_algorithm' argument") + + _setter("account_name", account_name) + _setter("certificate", certificate) + _setter("format", format) + _setter("resource_group_name", resource_group_name) + _setter("thumbprint", thumbprint) + _setter("thumbprint_algorithm", thumbprint_algorithm) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter(name="accountName") @@ -149,24 +190,59 @@ def __init__(__self__, *, :param pulumi.Input[str] thumbprint: The thumbprint of the certificate. Changing this forces a new resource to be created. :param pulumi.Input[str] thumbprint_algorithm: The algorithm of the certificate thumbprint. At this time the only supported value is `SHA1`. Changing this forces a new resource to be created. """ + _CertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + certificate=certificate, + format=format, + name=name, + password=password, + public_data=public_data, + resource_group_name=resource_group_name, + thumbprint=thumbprint, + thumbprint_algorithm=thumbprint_algorithm, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input[str]] = None, + format: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + public_data: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + thumbprint_algorithm: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if public_data is None and 'publicData' in kwargs: + public_data = kwargs['publicData'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if thumbprint_algorithm is None and 'thumbprintAlgorithm' in kwargs: + thumbprint_algorithm = kwargs['thumbprintAlgorithm'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if format is not None: - pulumi.set(__self__, "format", format) + _setter("format", format) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if public_data is not None: - pulumi.set(__self__, "public_data", public_data) + _setter("public_data", public_data) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) if thumbprint_algorithm is not None: - pulumi.set(__self__, "thumbprint_algorithm", thumbprint_algorithm) + _setter("thumbprint_algorithm", thumbprint_algorithm) @property @pulumi.getter(name="accountName") @@ -402,6 +478,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/batch/get_account.py b/sdk/python/pulumi_azure/batch/get_account.py index e40dded710..9b3a871102 100644 --- a/sdk/python/pulumi_azure/batch/get_account.py +++ b/sdk/python/pulumi_azure/batch/get_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * diff --git a/sdk/python/pulumi_azure/batch/get_application.py b/sdk/python/pulumi_azure/batch/get_application.py index 76045c7b41..7cd5f71eea 100644 --- a/sdk/python/pulumi_azure/batch/get_application.py +++ b/sdk/python/pulumi_azure/batch/get_application.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/batch/get_certificate.py b/sdk/python/pulumi_azure/batch/get_certificate.py index 5f937d9dd1..868d4d121c 100644 --- a/sdk/python/pulumi_azure/batch/get_certificate.py +++ b/sdk/python/pulumi_azure/batch/get_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/batch/get_pool.py b/sdk/python/pulumi_azure/batch/get_pool.py index 30adc78486..c68f4786cf 100644 --- a/sdk/python/pulumi_azure/batch/get_pool.py +++ b/sdk/python/pulumi_azure/batch/get_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/batch/job.py b/sdk/python/pulumi_azure/batch/job.py index 37b3473182..252d313184 100644 --- a/sdk/python/pulumi_azure/batch/job.py +++ b/sdk/python/pulumi_azure/batch/job.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['JobArgs', 'Job'] @@ -29,17 +29,48 @@ def __init__(__self__, *, :param pulumi.Input[int] priority: The priority of this Batch Job, possible values can range from -1000 (lowest) to 1000 (highest). Defaults to `0`. :param pulumi.Input[int] task_retry_maximum: The number of retries to each Batch Task belongs to this Batch Job. If this is set to `0`, the Batch service does not retry Tasks. If this is set to `-1`, the Batch service retries Batch Tasks without limit. Default value is `0`. """ - pulumi.set(__self__, "batch_pool_id", batch_pool_id) + JobArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + batch_pool_id=batch_pool_id, + common_environment_properties=common_environment_properties, + display_name=display_name, + name=name, + priority=priority, + task_retry_maximum=task_retry_maximum, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + batch_pool_id: Optional[pulumi.Input[str]] = None, + common_environment_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + task_retry_maximum: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if batch_pool_id is None and 'batchPoolId' in kwargs: + batch_pool_id = kwargs['batchPoolId'] + if batch_pool_id is None: + raise TypeError("Missing 'batch_pool_id' argument") + if common_environment_properties is None and 'commonEnvironmentProperties' in kwargs: + common_environment_properties = kwargs['commonEnvironmentProperties'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if task_retry_maximum is None and 'taskRetryMaximum' in kwargs: + task_retry_maximum = kwargs['taskRetryMaximum'] + + _setter("batch_pool_id", batch_pool_id) if common_environment_properties is not None: - pulumi.set(__self__, "common_environment_properties", common_environment_properties) + _setter("common_environment_properties", common_environment_properties) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if task_retry_maximum is not None: - pulumi.set(__self__, "task_retry_maximum", task_retry_maximum) + _setter("task_retry_maximum", task_retry_maximum) @property @pulumi.getter(name="batchPoolId") @@ -132,18 +163,47 @@ def __init__(__self__, *, :param pulumi.Input[int] priority: The priority of this Batch Job, possible values can range from -1000 (lowest) to 1000 (highest). Defaults to `0`. :param pulumi.Input[int] task_retry_maximum: The number of retries to each Batch Task belongs to this Batch Job. If this is set to `0`, the Batch service does not retry Tasks. If this is set to `-1`, the Batch service retries Batch Tasks without limit. Default value is `0`. """ + _JobState._configure( + lambda key, value: pulumi.set(__self__, key, value), + batch_pool_id=batch_pool_id, + common_environment_properties=common_environment_properties, + display_name=display_name, + name=name, + priority=priority, + task_retry_maximum=task_retry_maximum, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + batch_pool_id: Optional[pulumi.Input[str]] = None, + common_environment_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + task_retry_maximum: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if batch_pool_id is None and 'batchPoolId' in kwargs: + batch_pool_id = kwargs['batchPoolId'] + if common_environment_properties is None and 'commonEnvironmentProperties' in kwargs: + common_environment_properties = kwargs['commonEnvironmentProperties'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if task_retry_maximum is None and 'taskRetryMaximum' in kwargs: + task_retry_maximum = kwargs['taskRetryMaximum'] + if batch_pool_id is not None: - pulumi.set(__self__, "batch_pool_id", batch_pool_id) + _setter("batch_pool_id", batch_pool_id) if common_environment_properties is not None: - pulumi.set(__self__, "common_environment_properties", common_environment_properties) + _setter("common_environment_properties", common_environment_properties) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if task_retry_maximum is not None: - pulumi.set(__self__, "task_retry_maximum", task_retry_maximum) + _setter("task_retry_maximum", task_retry_maximum) @property @pulumi.getter(name="batchPoolId") @@ -331,6 +391,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + JobArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/batch/outputs.py b/sdk/python/pulumi_azure/batch/outputs.py index e949b0b517..a52188f3e4 100644 --- a/sdk/python/pulumi_azure/batch/outputs.py +++ b/sdk/python/pulumi_azure/batch/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -106,7 +106,22 @@ def __init__(__self__, *, """ :param str key_vault_key_id: The full URL path to the Azure key vault key id that should be used to encrypt data, as documented [here](https://docs.microsoft.com/azure/batch/batch-customer-managed-key). Both versioned and versionless keys are supported. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + AccountEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + + _setter("key_vault_key_id", key_vault_key_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -153,13 +168,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + AccountIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -205,8 +245,25 @@ def __init__(__self__, *, :param str id: The Azure identifier of the Azure KeyVault to use. :param str url: The HTTPS URL of the Azure KeyVault to use. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "url", url) + AccountKeyVaultReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("id", id) + _setter("url", url) @property @pulumi.getter @@ -255,10 +312,27 @@ def __init__(__self__, *, > **NOTE:** At least one of `account_access` or `node_management_access` must be specified. """ + AccountNetworkProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_access=account_access, + node_management_access=node_management_access, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_access: Optional['outputs.AccountNetworkProfileAccountAccess'] = None, + node_management_access: Optional['outputs.AccountNetworkProfileNodeManagementAccess'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_access is None and 'accountAccess' in kwargs: + account_access = kwargs['accountAccess'] + if node_management_access is None and 'nodeManagementAccess' in kwargs: + node_management_access = kwargs['nodeManagementAccess'] + if account_access is not None: - pulumi.set(__self__, "account_access", account_access) + _setter("account_access", account_access) if node_management_access is not None: - pulumi.set(__self__, "node_management_access", node_management_access) + _setter("node_management_access", node_management_access) @property @pulumi.getter(name="accountAccess") @@ -307,10 +381,27 @@ def __init__(__self__, *, :param str default_action: Specifies the default action for the account access. Possible values are `Allow` and `Deny`. Defaults to `Deny`. :param Sequence['AccountNetworkProfileAccountAccessIpRuleArgs'] ip_rules: One or more `ip_rule` blocks as defined below. """ + AccountNetworkProfileAccountAccess._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[str] = None, + ip_rules: Optional[Sequence['outputs.AccountNetworkProfileAccountAccessIpRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) @property @pulumi.getter(name="defaultAction") @@ -355,9 +446,26 @@ def __init__(__self__, *, :param str ip_range: The CIDR block from which requests will match the rule. :param str action: Specifies the action of the ip rule. The only possible value is `Allow`. Defaults to `Allow`. """ - pulumi.set(__self__, "ip_range", ip_range) + AccountNetworkProfileAccountAccessIpRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_range=ip_range, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_range: Optional[str] = None, + action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_range is None and 'ipRange' in kwargs: + ip_range = kwargs['ipRange'] + if ip_range is None: + raise TypeError("Missing 'ip_range' argument") + + _setter("ip_range", ip_range) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipRange") @@ -404,10 +512,27 @@ def __init__(__self__, *, :param str default_action: Specifies the default action for the node management access. Possible values are `Allow` and `Deny`. Defaults to `Deny`. :param Sequence['AccountNetworkProfileNodeManagementAccessIpRuleArgs'] ip_rules: One or more `ip_rule` blocks as defined below. """ + AccountNetworkProfileNodeManagementAccess._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[str] = None, + ip_rules: Optional[Sequence['outputs.AccountNetworkProfileNodeManagementAccessIpRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) @property @pulumi.getter(name="defaultAction") @@ -452,9 +577,26 @@ def __init__(__self__, *, :param str ip_range: The CIDR block from which requests will match the rule. :param str action: Specifies the action of the ip rule. The only possible value is `Allow`. Defaults to `Allow`. """ - pulumi.set(__self__, "ip_range", ip_range) + AccountNetworkProfileNodeManagementAccessIpRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_range=ip_range, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_range: Optional[str] = None, + action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_range is None and 'ipRange' in kwargs: + ip_range = kwargs['ipRange'] + if ip_range is None: + raise TypeError("Missing 'ip_range' argument") + + _setter("ip_range", ip_range) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipRange") @@ -499,9 +641,26 @@ def __init__(__self__, *, :param str formula: The autoscale formula that needs to be used for scaling the Batch pool. :param str evaluation_interval: The interval to wait before evaluating if the pool needs to be scaled. Defaults to `PT15M`. """ - pulumi.set(__self__, "formula", formula) + PoolAutoScale._configure( + lambda key, value: pulumi.set(__self__, key, value), + formula=formula, + evaluation_interval=evaluation_interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + formula: Optional[str] = None, + evaluation_interval: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if formula is None: + raise TypeError("Missing 'formula' argument") + if evaluation_interval is None and 'evaluationInterval' in kwargs: + evaluation_interval = kwargs['evaluationInterval'] + + _setter("formula", formula) if evaluation_interval is not None: - pulumi.set(__self__, "evaluation_interval", evaluation_interval) + _setter("evaluation_interval", evaluation_interval) @property @pulumi.getter @@ -554,12 +713,37 @@ def __init__(__self__, *, :param str store_name: The name of the certificate store on the compute node into which to install the certificate. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: `My`, `Root`, `CA`, `Trust`, `Disallowed`, `TrustedPeople`, `TrustedPublisher`, `AuthRoot`, `AddressBook`, but any custom store name can also be used. The default value is `My`. :param Sequence[str] visibilities: Which user accounts on the compute node should have access to the private data of the certificate. Possible values are `StartTask`, `Task` and `RemoteUser`. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "store_location", store_location) + PoolCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + store_location=store_location, + store_name=store_name, + visibilities=visibilities, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + store_location: Optional[str] = None, + store_name: Optional[str] = None, + visibilities: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if store_location is None and 'storeLocation' in kwargs: + store_location = kwargs['storeLocation'] + if store_location is None: + raise TypeError("Missing 'store_location' argument") + if store_name is None and 'storeName' in kwargs: + store_name = kwargs['storeName'] + + _setter("id", id) + _setter("store_location", store_location) if store_name is not None: - pulumi.set(__self__, "store_name", store_name) + _setter("store_name", store_name) if visibilities is not None: - pulumi.set(__self__, "visibilities", visibilities) + _setter("visibilities", visibilities) @property @pulumi.getter @@ -626,12 +810,31 @@ def __init__(__self__, *, :param Sequence['PoolContainerConfigurationContainerRegistryArgs'] container_registries: One or more `container_registries` blocks as defined below. Additional container registries from which container images can be pulled by the pool's VMs. Changing this forces a new resource to be created. :param str type: The type of container configuration. Possible value is `DockerCompatible`. """ + PoolContainerConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_image_names=container_image_names, + container_registries=container_registries, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_image_names: Optional[Sequence[str]] = None, + container_registries: Optional[Sequence['outputs.PoolContainerConfigurationContainerRegistry']] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_image_names is None and 'containerImageNames' in kwargs: + container_image_names = kwargs['containerImageNames'] + if container_registries is None and 'containerRegistries' in kwargs: + container_registries = kwargs['containerRegistries'] + if container_image_names is not None: - pulumi.set(__self__, "container_image_names", container_image_names) + _setter("container_image_names", container_image_names) if container_registries is not None: - pulumi.set(__self__, "container_registries", container_registries) + _setter("container_registries", container_registries) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="containerImageNames") @@ -692,13 +895,38 @@ def __init__(__self__, *, :param str user_assigned_identity_id: The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password. Changing this forces a new resource to be created. :param str user_name: The user name to log into the registry server. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "registry_server", registry_server) + PoolContainerConfigurationContainerRegistry._configure( + lambda key, value: pulumi.set(__self__, key, value), + registry_server=registry_server, + password=password, + user_assigned_identity_id=user_assigned_identity_id, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + registry_server: Optional[str] = None, + password: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + user_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if registry_server is None and 'registryServer' in kwargs: + registry_server = kwargs['registryServer'] + if registry_server is None: + raise TypeError("Missing 'registry_server' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + + _setter("registry_server", registry_server) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) if user_name is not None: - pulumi.set(__self__, "user_name", user_name) + _setter("user_name", user_name) @property @pulumi.getter(name="registryServer") @@ -765,12 +993,37 @@ def __init__(__self__, *, :param str caching: Values are: "none" - The caching mode for the disk is not enabled. "readOnly" - The caching mode for the disk is read only. "readWrite" - The caching mode for the disk is read and write. The default value for caching is "none". For information about the caching options see: . Possible values are `None`, `ReadOnly` and `ReadWrite`. :param str storage_account_type: The storage account type to be used for the data disk. If omitted, the default is "Standard_LRS". Values are: "Standard_LRS" - The data disk should use standard locally redundant storage. "Premium_LRS" - The data disk should use premium locally redundant storage. """ - pulumi.set(__self__, "disk_size_gb", disk_size_gb) - pulumi.set(__self__, "lun", lun) + PoolDataDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_size_gb=disk_size_gb, + lun=lun, + caching=caching, + storage_account_type=storage_account_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_size_gb: Optional[int] = None, + lun: Optional[int] = None, + caching: Optional[str] = None, + storage_account_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if disk_size_gb is None: + raise TypeError("Missing 'disk_size_gb' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + + _setter("disk_size_gb", disk_size_gb) + _setter("lun", lun) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) @property @pulumi.getter(name="diskSizeGb") @@ -829,7 +1082,22 @@ def __init__(__self__, *, """ :param str disk_encryption_target: On Linux pool, only \\"TemporaryDisk\\" is supported; on Windows pool, \\"OsDisk\\" and \\"TemporaryDisk\\" must be specified. """ - pulumi.set(__self__, "disk_encryption_target", disk_encryption_target) + PoolDiskEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_encryption_target=disk_encryption_target, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_encryption_target: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_encryption_target is None and 'diskEncryptionTarget' in kwargs: + disk_encryption_target = kwargs['diskEncryptionTarget'] + if disk_encryption_target is None: + raise TypeError("Missing 'disk_encryption_target' argument") + + _setter("disk_encryption_target", disk_encryption_target) @property @pulumi.getter(name="diskEncryptionTarget") @@ -892,21 +1160,66 @@ def __init__(__self__, *, :param str settings_json: JSON formatted public settings for the extension. :param str type_handler_version: The version of script handler. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) + PoolExtension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + publisher=publisher, + type=type, + auto_upgrade_minor_version=auto_upgrade_minor_version, + automatic_upgrade_enabled=automatic_upgrade_enabled, + protected_settings=protected_settings, + provision_after_extensions=provision_after_extensions, + settings_json=settings_json, + type_handler_version=type_handler_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + publisher: Optional[str] = None, + type: Optional[str] = None, + auto_upgrade_minor_version: Optional[bool] = None, + automatic_upgrade_enabled: Optional[bool] = None, + protected_settings: Optional[str] = None, + provision_after_extensions: Optional[Sequence[str]] = None, + settings_json: Optional[str] = None, + type_handler_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if auto_upgrade_minor_version is None and 'autoUpgradeMinorVersion' in kwargs: + auto_upgrade_minor_version = kwargs['autoUpgradeMinorVersion'] + if automatic_upgrade_enabled is None and 'automaticUpgradeEnabled' in kwargs: + automatic_upgrade_enabled = kwargs['automaticUpgradeEnabled'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if provision_after_extensions is None and 'provisionAfterExtensions' in kwargs: + provision_after_extensions = kwargs['provisionAfterExtensions'] + if settings_json is None and 'settingsJson' in kwargs: + settings_json = kwargs['settingsJson'] + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + + _setter("name", name) + _setter("publisher", publisher) + _setter("type", type) if auto_upgrade_minor_version is not None: - pulumi.set(__self__, "auto_upgrade_minor_version", auto_upgrade_minor_version) + _setter("auto_upgrade_minor_version", auto_upgrade_minor_version) if automatic_upgrade_enabled is not None: - pulumi.set(__self__, "automatic_upgrade_enabled", automatic_upgrade_enabled) + _setter("automatic_upgrade_enabled", automatic_upgrade_enabled) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if provision_after_extensions is not None: - pulumi.set(__self__, "provision_after_extensions", provision_after_extensions) + _setter("provision_after_extensions", provision_after_extensions) if settings_json is not None: - pulumi.set(__self__, "settings_json", settings_json) + _setter("settings_json", settings_json) if type_handler_version is not None: - pulumi.set(__self__, "type_handler_version", type_handler_version) + _setter("type_handler_version", type_handler_version) @property @pulumi.getter @@ -1019,14 +1332,39 @@ def __init__(__self__, *, :param int target_dedicated_nodes: The number of nodes in the Batch pool. Defaults to `1`. :param int target_low_priority_nodes: The number of low priority nodes in the Batch pool. Defaults to `0`. """ + PoolFixedScale._configure( + lambda key, value: pulumi.set(__self__, key, value), + node_deallocation_method=node_deallocation_method, + resize_timeout=resize_timeout, + target_dedicated_nodes=target_dedicated_nodes, + target_low_priority_nodes=target_low_priority_nodes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + node_deallocation_method: Optional[str] = None, + resize_timeout: Optional[str] = None, + target_dedicated_nodes: Optional[int] = None, + target_low_priority_nodes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if node_deallocation_method is None and 'nodeDeallocationMethod' in kwargs: + node_deallocation_method = kwargs['nodeDeallocationMethod'] + if resize_timeout is None and 'resizeTimeout' in kwargs: + resize_timeout = kwargs['resizeTimeout'] + if target_dedicated_nodes is None and 'targetDedicatedNodes' in kwargs: + target_dedicated_nodes = kwargs['targetDedicatedNodes'] + if target_low_priority_nodes is None and 'targetLowPriorityNodes' in kwargs: + target_low_priority_nodes = kwargs['targetLowPriorityNodes'] + if node_deallocation_method is not None: - pulumi.set(__self__, "node_deallocation_method", node_deallocation_method) + _setter("node_deallocation_method", node_deallocation_method) if resize_timeout is not None: - pulumi.set(__self__, "resize_timeout", resize_timeout) + _setter("resize_timeout", resize_timeout) if target_dedicated_nodes is not None: - pulumi.set(__self__, "target_dedicated_nodes", target_dedicated_nodes) + _setter("target_dedicated_nodes", target_dedicated_nodes) if target_low_priority_nodes is not None: - pulumi.set(__self__, "target_low_priority_nodes", target_low_priority_nodes) + _setter("target_low_priority_nodes", target_low_priority_nodes) @property @pulumi.getter(name="nodeDeallocationMethod") @@ -1087,8 +1425,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: Specifies a list of User Assigned Managed Identity IDs to be assigned to this Batch Account. :param str type: Specifies the type of Managed Service Identity that should be configured on this Batch Account. Only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + PoolIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -1143,14 +1500,39 @@ def __init__(__self__, *, :param Sequence['PoolMountCifsMountArgs'] cifs_mounts: A `cifs_mount` block defined as below. :param Sequence['PoolMountNfsMountArgs'] nfs_mounts: A `nfs_mount` block defined as below. """ + PoolMount._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_blob_file_system=azure_blob_file_system, + azure_file_shares=azure_file_shares, + cifs_mounts=cifs_mounts, + nfs_mounts=nfs_mounts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_blob_file_system: Optional['outputs.PoolMountAzureBlobFileSystem'] = None, + azure_file_shares: Optional[Sequence['outputs.PoolMountAzureFileShare']] = None, + cifs_mounts: Optional[Sequence['outputs.PoolMountCifsMount']] = None, + nfs_mounts: Optional[Sequence['outputs.PoolMountNfsMount']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_blob_file_system is None and 'azureBlobFileSystem' in kwargs: + azure_blob_file_system = kwargs['azureBlobFileSystem'] + if azure_file_shares is None and 'azureFileShares' in kwargs: + azure_file_shares = kwargs['azureFileShares'] + if cifs_mounts is None and 'cifsMounts' in kwargs: + cifs_mounts = kwargs['cifsMounts'] + if nfs_mounts is None and 'nfsMounts' in kwargs: + nfs_mounts = kwargs['nfsMounts'] + if azure_blob_file_system is not None: - pulumi.set(__self__, "azure_blob_file_system", azure_blob_file_system) + _setter("azure_blob_file_system", azure_blob_file_system) if azure_file_shares is not None: - pulumi.set(__self__, "azure_file_shares", azure_file_shares) + _setter("azure_file_shares", azure_file_shares) if cifs_mounts is not None: - pulumi.set(__self__, "cifs_mounts", cifs_mounts) + _setter("cifs_mounts", cifs_mounts) if nfs_mounts is not None: - pulumi.set(__self__, "nfs_mounts", nfs_mounts) + _setter("nfs_mounts", nfs_mounts) @property @pulumi.getter(name="azureBlobFileSystem") @@ -1233,17 +1615,60 @@ def __init__(__self__, *, :param str identity_id: The ARM resource id of the user assigned identity. This property is mutually exclusive with both `account_key` and `sas_key`; exactly one must be specified. :param str sas_key: The Azure Storage SAS token. This property is mutually exclusive with both `account_key` and `identity_id`; exactly one must be specified. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "relative_mount_path", relative_mount_path) + PoolMountAzureBlobFileSystem._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + container_name=container_name, + relative_mount_path=relative_mount_path, + account_key=account_key, + blobfuse_options=blobfuse_options, + identity_id=identity_id, + sas_key=sas_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[str] = None, + container_name: Optional[str] = None, + relative_mount_path: Optional[str] = None, + account_key: Optional[str] = None, + blobfuse_options: Optional[str] = None, + identity_id: Optional[str] = None, + sas_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if relative_mount_path is None and 'relativeMountPath' in kwargs: + relative_mount_path = kwargs['relativeMountPath'] + if relative_mount_path is None: + raise TypeError("Missing 'relative_mount_path' argument") + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if blobfuse_options is None and 'blobfuseOptions' in kwargs: + blobfuse_options = kwargs['blobfuseOptions'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if sas_key is None and 'sasKey' in kwargs: + sas_key = kwargs['sasKey'] + + _setter("account_name", account_name) + _setter("container_name", container_name) + _setter("relative_mount_path", relative_mount_path) if account_key is not None: - pulumi.set(__self__, "account_key", account_key) + _setter("account_key", account_key) if blobfuse_options is not None: - pulumi.set(__self__, "blobfuse_options", blobfuse_options) + _setter("blobfuse_options", blobfuse_options) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if sas_key is not None: - pulumi.set(__self__, "sas_key", sas_key) + _setter("sas_key", sas_key) @property @pulumi.getter(name="accountName") @@ -1342,12 +1767,49 @@ def __init__(__self__, *, :param str relative_mount_path: The relative path on compute node where the file system will be mounted All file systems are mounted relative to the Batch mounts directory, accessible via the `AZ_BATCH_NODE_MOUNTS_DIR` environment variable. :param str mount_options: Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. """ - pulumi.set(__self__, "account_key", account_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "azure_file_url", azure_file_url) - pulumi.set(__self__, "relative_mount_path", relative_mount_path) + PoolMountAzureFileShare._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_key=account_key, + account_name=account_name, + azure_file_url=azure_file_url, + relative_mount_path=relative_mount_path, + mount_options=mount_options, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_key: Optional[str] = None, + account_name: Optional[str] = None, + azure_file_url: Optional[str] = None, + relative_mount_path: Optional[str] = None, + mount_options: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if account_key is None: + raise TypeError("Missing 'account_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if azure_file_url is None and 'azureFileUrl' in kwargs: + azure_file_url = kwargs['azureFileUrl'] + if azure_file_url is None: + raise TypeError("Missing 'azure_file_url' argument") + if relative_mount_path is None and 'relativeMountPath' in kwargs: + relative_mount_path = kwargs['relativeMountPath'] + if relative_mount_path is None: + raise TypeError("Missing 'relative_mount_path' argument") + if mount_options is None and 'mountOptions' in kwargs: + mount_options = kwargs['mountOptions'] + + _setter("account_key", account_key) + _setter("account_name", account_name) + _setter("azure_file_url", azure_file_url) + _setter("relative_mount_path", relative_mount_path) if mount_options is not None: - pulumi.set(__self__, "mount_options", mount_options) + _setter("mount_options", mount_options) @property @pulumi.getter(name="accountKey") @@ -1426,12 +1888,45 @@ def __init__(__self__, *, :param str user_name: The user to use for authentication against the CIFS file system. :param str mount_options: Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "relative_mount_path", relative_mount_path) - pulumi.set(__self__, "source", source) - pulumi.set(__self__, "user_name", user_name) + PoolMountCifsMount._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + relative_mount_path=relative_mount_path, + source=source, + user_name=user_name, + mount_options=mount_options, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + relative_mount_path: Optional[str] = None, + source: Optional[str] = None, + user_name: Optional[str] = None, + mount_options: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if relative_mount_path is None and 'relativeMountPath' in kwargs: + relative_mount_path = kwargs['relativeMountPath'] + if relative_mount_path is None: + raise TypeError("Missing 'relative_mount_path' argument") + if source is None: + raise TypeError("Missing 'source' argument") + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + if user_name is None: + raise TypeError("Missing 'user_name' argument") + if mount_options is None and 'mountOptions' in kwargs: + mount_options = kwargs['mountOptions'] + + _setter("password", password) + _setter("relative_mount_path", relative_mount_path) + _setter("source", source) + _setter("user_name", user_name) if mount_options is not None: - pulumi.set(__self__, "mount_options", mount_options) + _setter("mount_options", mount_options) @property @pulumi.getter @@ -1504,10 +1999,33 @@ def __init__(__self__, *, :param str source: The URI of the file system to mount. :param str mount_options: Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. """ - pulumi.set(__self__, "relative_mount_path", relative_mount_path) - pulumi.set(__self__, "source", source) + PoolMountNfsMount._configure( + lambda key, value: pulumi.set(__self__, key, value), + relative_mount_path=relative_mount_path, + source=source, + mount_options=mount_options, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + relative_mount_path: Optional[str] = None, + source: Optional[str] = None, + mount_options: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if relative_mount_path is None and 'relativeMountPath' in kwargs: + relative_mount_path = kwargs['relativeMountPath'] + if relative_mount_path is None: + raise TypeError("Missing 'relative_mount_path' argument") + if source is None: + raise TypeError("Missing 'source' argument") + if mount_options is None and 'mountOptions' in kwargs: + mount_options = kwargs['mountOptions'] + + _setter("relative_mount_path", relative_mount_path) + _setter("source", source) if mount_options is not None: - pulumi.set(__self__, "mount_options", mount_options) + _setter("mount_options", mount_options) @property @pulumi.getter(name="relativeMountPath") @@ -1578,18 +2096,51 @@ def __init__(__self__, *, :param Sequence[str] public_ips: A list of public IP ids that will be allocated to nodes. Changing this forces a new resource to be created. :param str subnet_id: The ARM resource identifier of the virtual network subnet which the compute nodes of the pool will join. Changing this forces a new resource to be created. """ + PoolNetworkConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + accelerated_networking_enabled=accelerated_networking_enabled, + dynamic_vnet_assignment_scope=dynamic_vnet_assignment_scope, + endpoint_configurations=endpoint_configurations, + public_address_provisioning_type=public_address_provisioning_type, + public_ips=public_ips, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + accelerated_networking_enabled: Optional[bool] = None, + dynamic_vnet_assignment_scope: Optional[str] = None, + endpoint_configurations: Optional[Sequence['outputs.PoolNetworkConfigurationEndpointConfiguration']] = None, + public_address_provisioning_type: Optional[str] = None, + public_ips: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if accelerated_networking_enabled is None and 'acceleratedNetworkingEnabled' in kwargs: + accelerated_networking_enabled = kwargs['acceleratedNetworkingEnabled'] + if dynamic_vnet_assignment_scope is None and 'dynamicVnetAssignmentScope' in kwargs: + dynamic_vnet_assignment_scope = kwargs['dynamicVnetAssignmentScope'] + if endpoint_configurations is None and 'endpointConfigurations' in kwargs: + endpoint_configurations = kwargs['endpointConfigurations'] + if public_address_provisioning_type is None and 'publicAddressProvisioningType' in kwargs: + public_address_provisioning_type = kwargs['publicAddressProvisioningType'] + if public_ips is None and 'publicIps' in kwargs: + public_ips = kwargs['publicIps'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if accelerated_networking_enabled is not None: - pulumi.set(__self__, "accelerated_networking_enabled", accelerated_networking_enabled) + _setter("accelerated_networking_enabled", accelerated_networking_enabled) if dynamic_vnet_assignment_scope is not None: - pulumi.set(__self__, "dynamic_vnet_assignment_scope", dynamic_vnet_assignment_scope) + _setter("dynamic_vnet_assignment_scope", dynamic_vnet_assignment_scope) if endpoint_configurations is not None: - pulumi.set(__self__, "endpoint_configurations", endpoint_configurations) + _setter("endpoint_configurations", endpoint_configurations) if public_address_provisioning_type is not None: - pulumi.set(__self__, "public_address_provisioning_type", public_address_provisioning_type) + _setter("public_address_provisioning_type", public_address_provisioning_type) if public_ips is not None: - pulumi.set(__self__, "public_ips", public_ips) + _setter("public_ips", public_ips) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="acceleratedNetworkingEnabled") @@ -1676,12 +2227,45 @@ def __init__(__self__, *, :param str protocol: The protocol of the endpoint. Acceptable values are `TCP` and `UDP`. Changing this forces a new resource to be created. :param Sequence['PoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleArgs'] network_security_group_rules: A list of `network_security_group_rules` blocks as defined below that will be applied to the endpoint. The maximum number of rules that can be specified across all the endpoints on a Batch pool is `25`. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. Set as documented in the network_security_group_rules block below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "backend_port", backend_port) - pulumi.set(__self__, "frontend_port_range", frontend_port_range) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + PoolNetworkConfigurationEndpointConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + frontend_port_range=frontend_port_range, + name=name, + protocol=protocol, + network_security_group_rules=network_security_group_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[int] = None, + frontend_port_range: Optional[str] = None, + name: Optional[str] = None, + protocol: Optional[str] = None, + network_security_group_rules: Optional[Sequence['outputs.PoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if backend_port is None: + raise TypeError("Missing 'backend_port' argument") + if frontend_port_range is None and 'frontendPortRange' in kwargs: + frontend_port_range = kwargs['frontendPortRange'] + if frontend_port_range is None: + raise TypeError("Missing 'frontend_port_range' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if network_security_group_rules is None and 'networkSecurityGroupRules' in kwargs: + network_security_group_rules = kwargs['networkSecurityGroupRules'] + + _setter("backend_port", backend_port) + _setter("frontend_port_range", frontend_port_range) + _setter("name", name) + _setter("protocol", protocol) if network_security_group_rules is not None: - pulumi.set(__self__, "network_security_group_rules", network_security_group_rules) + _setter("network_security_group_rules", network_security_group_rules) @property @pulumi.getter(name="backendPort") @@ -1756,11 +2340,38 @@ def __init__(__self__, *, :param str source_address_prefix: The source address prefix or tag to match for the rule. Changing this forces a new resource to be created. :param Sequence[str] source_port_ranges: The source port ranges to match for the rule. Valid values are `*` (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. `100-200`). The ports should in the range of 0 to 65535 and the port ranges or ports can't overlap. If any other values are provided the request fails with HTTP status code 400. Default value will be `*`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "source_address_prefix", source_address_prefix) + PoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + priority=priority, + source_address_prefix=source_address_prefix, + source_port_ranges=source_port_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[str] = None, + priority: Optional[int] = None, + source_address_prefix: Optional[str] = None, + source_port_ranges: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if source_address_prefix is None and 'sourceAddressPrefix' in kwargs: + source_address_prefix = kwargs['sourceAddressPrefix'] + if source_address_prefix is None: + raise TypeError("Missing 'source_address_prefix' argument") + if source_port_ranges is None and 'sourcePortRanges' in kwargs: + source_port_ranges = kwargs['sourcePortRanges'] + + _setter("access", access) + _setter("priority", priority) + _setter("source_address_prefix", source_address_prefix) if source_port_ranges is not None: - pulumi.set(__self__, "source_port_ranges", source_port_ranges) + _setter("source_port_ranges", source_port_ranges) @property @pulumi.getter @@ -1802,8 +2413,19 @@ def __init__(__self__, *, """ :param str policy: The placement policy for allocating nodes in the pool. Values are: "Regional": All nodes in the pool will be allocated in the same region; "Zonal": Nodes in the pool will be spread across different zones with the best effort balancing. """ + PoolNodePlacement._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy is not None: - pulumi.set(__self__, "policy", policy) + _setter("policy", policy) @property @pulumi.getter @@ -1860,18 +2482,57 @@ def __init__(__self__, *, :param int task_retry_maximum: The number of retry count. :param bool wait_for_success: A flag that indicates if the Batch pool should wait for the start task to be completed. Default to `false`. """ - pulumi.set(__self__, "command_line", command_line) - pulumi.set(__self__, "user_identity", user_identity) + PoolStartTask._configure( + lambda key, value: pulumi.set(__self__, key, value), + command_line=command_line, + user_identity=user_identity, + common_environment_properties=common_environment_properties, + containers=containers, + resource_files=resource_files, + task_retry_maximum=task_retry_maximum, + wait_for_success=wait_for_success, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + command_line: Optional[str] = None, + user_identity: Optional['outputs.PoolStartTaskUserIdentity'] = None, + common_environment_properties: Optional[Mapping[str, str]] = None, + containers: Optional[Sequence['outputs.PoolStartTaskContainer']] = None, + resource_files: Optional[Sequence['outputs.PoolStartTaskResourceFile']] = None, + task_retry_maximum: Optional[int] = None, + wait_for_success: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if command_line is None and 'commandLine' in kwargs: + command_line = kwargs['commandLine'] + if command_line is None: + raise TypeError("Missing 'command_line' argument") + if user_identity is None and 'userIdentity' in kwargs: + user_identity = kwargs['userIdentity'] + if user_identity is None: + raise TypeError("Missing 'user_identity' argument") + if common_environment_properties is None and 'commonEnvironmentProperties' in kwargs: + common_environment_properties = kwargs['commonEnvironmentProperties'] + if resource_files is None and 'resourceFiles' in kwargs: + resource_files = kwargs['resourceFiles'] + if task_retry_maximum is None and 'taskRetryMaximum' in kwargs: + task_retry_maximum = kwargs['taskRetryMaximum'] + if wait_for_success is None and 'waitForSuccess' in kwargs: + wait_for_success = kwargs['waitForSuccess'] + + _setter("command_line", command_line) + _setter("user_identity", user_identity) if common_environment_properties is not None: - pulumi.set(__self__, "common_environment_properties", common_environment_properties) + _setter("common_environment_properties", common_environment_properties) if containers is not None: - pulumi.set(__self__, "containers", containers) + _setter("containers", containers) if resource_files is not None: - pulumi.set(__self__, "resource_files", resource_files) + _setter("resource_files", resource_files) if task_retry_maximum is not None: - pulumi.set(__self__, "task_retry_maximum", task_retry_maximum) + _setter("task_retry_maximum", task_retry_maximum) if wait_for_success is not None: - pulumi.set(__self__, "wait_for_success", wait_for_success) + _setter("wait_for_success", wait_for_success) @property @pulumi.getter(name="commandLine") @@ -1964,13 +2625,38 @@ def __init__(__self__, *, :param str run_options: Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service. :param str working_directory: A flag to indicate where the container task working directory is. The default is `TaskWorkingDirectory`, an alternative value is `ContainerImageDefault`. """ - pulumi.set(__self__, "image_name", image_name) + PoolStartTaskContainer._configure( + lambda key, value: pulumi.set(__self__, key, value), + image_name=image_name, + registries=registries, + run_options=run_options, + working_directory=working_directory, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image_name: Optional[str] = None, + registries: Optional[Sequence['outputs.PoolStartTaskContainerRegistry']] = None, + run_options: Optional[str] = None, + working_directory: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if image_name is None: + raise TypeError("Missing 'image_name' argument") + if run_options is None and 'runOptions' in kwargs: + run_options = kwargs['runOptions'] + if working_directory is None and 'workingDirectory' in kwargs: + working_directory = kwargs['workingDirectory'] + + _setter("image_name", image_name) if registries is not None: - pulumi.set(__self__, "registries", registries) + _setter("registries", registries) if run_options is not None: - pulumi.set(__self__, "run_options", run_options) + _setter("run_options", run_options) if working_directory is not None: - pulumi.set(__self__, "working_directory", working_directory) + _setter("working_directory", working_directory) @property @pulumi.getter(name="imageName") @@ -2039,13 +2725,38 @@ def __init__(__self__, *, :param str user_assigned_identity_id: The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password. Changing this forces a new resource to be created. :param str user_name: The user to use for authentication against the CIFS file system. """ - pulumi.set(__self__, "registry_server", registry_server) + PoolStartTaskContainerRegistry._configure( + lambda key, value: pulumi.set(__self__, key, value), + registry_server=registry_server, + password=password, + user_assigned_identity_id=user_assigned_identity_id, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + registry_server: Optional[str] = None, + password: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + user_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if registry_server is None and 'registryServer' in kwargs: + registry_server = kwargs['registryServer'] + if registry_server is None: + raise TypeError("Missing 'registry_server' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + + _setter("registry_server", registry_server) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) if user_name is not None: - pulumi.set(__self__, "user_name", user_name) + _setter("user_name", user_name) @property @pulumi.getter(name="registryServer") @@ -2130,20 +2841,57 @@ def __init__(__self__, *, > **Please Note:** Exactly one of `auto_storage_container_name`, `storage_container_url` and `auto_user` must be specified. """ + PoolStartTaskResourceFile._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_storage_container_name=auto_storage_container_name, + blob_prefix=blob_prefix, + file_mode=file_mode, + file_path=file_path, + http_url=http_url, + storage_container_url=storage_container_url, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_storage_container_name: Optional[str] = None, + blob_prefix: Optional[str] = None, + file_mode: Optional[str] = None, + file_path: Optional[str] = None, + http_url: Optional[str] = None, + storage_container_url: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_storage_container_name is None and 'autoStorageContainerName' in kwargs: + auto_storage_container_name = kwargs['autoStorageContainerName'] + if blob_prefix is None and 'blobPrefix' in kwargs: + blob_prefix = kwargs['blobPrefix'] + if file_mode is None and 'fileMode' in kwargs: + file_mode = kwargs['fileMode'] + if file_path is None and 'filePath' in kwargs: + file_path = kwargs['filePath'] + if http_url is None and 'httpUrl' in kwargs: + http_url = kwargs['httpUrl'] + if storage_container_url is None and 'storageContainerUrl' in kwargs: + storage_container_url = kwargs['storageContainerUrl'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if auto_storage_container_name is not None: - pulumi.set(__self__, "auto_storage_container_name", auto_storage_container_name) + _setter("auto_storage_container_name", auto_storage_container_name) if blob_prefix is not None: - pulumi.set(__self__, "blob_prefix", blob_prefix) + _setter("blob_prefix", blob_prefix) if file_mode is not None: - pulumi.set(__self__, "file_mode", file_mode) + _setter("file_mode", file_mode) if file_path is not None: - pulumi.set(__self__, "file_path", file_path) + _setter("file_path", file_path) if http_url is not None: - pulumi.set(__self__, "http_url", http_url) + _setter("http_url", http_url) if storage_container_url is not None: - pulumi.set(__self__, "storage_container_url", storage_container_url) + _setter("storage_container_url", storage_container_url) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="autoStorageContainerName") @@ -2234,10 +2982,27 @@ def __init__(__self__, *, > **Please Note:** `user_name` and `auto_user` blocks cannot be used both at the same time, but you need to define one or the other. :param str user_name: The username to be used by the Batch pool start task. """ + PoolStartTaskUserIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_user=auto_user, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_user: Optional['outputs.PoolStartTaskUserIdentityAutoUser'] = None, + user_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_user is None and 'autoUser' in kwargs: + auto_user = kwargs['autoUser'] + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + if auto_user is not None: - pulumi.set(__self__, "auto_user", auto_user) + _setter("auto_user", auto_user) if user_name is not None: - pulumi.set(__self__, "user_name", user_name) + _setter("user_name", user_name) @property @pulumi.getter(name="autoUser") @@ -2284,10 +3049,25 @@ def __init__(__self__, *, :param str elevation_level: The elevation level of the user identity under which the start task runs. Possible values are `Admin` or `NonAdmin`. Defaults to `NonAdmin`. :param str scope: The scope of the user identity under which the start task runs. Possible values are `Task` or `Pool`. Defaults to `Task`. """ + PoolStartTaskUserIdentityAutoUser._configure( + lambda key, value: pulumi.set(__self__, key, value), + elevation_level=elevation_level, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + elevation_level: Optional[str] = None, + scope: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if elevation_level is None and 'elevationLevel' in kwargs: + elevation_level = kwargs['elevationLevel'] + if elevation_level is not None: - pulumi.set(__self__, "elevation_level", elevation_level) + _setter("elevation_level", elevation_level) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="elevationLevel") @@ -2323,16 +3103,35 @@ def __init__(__self__, *, To provision a Custom Image, the following fields are applicable: """ + PoolStorageImageReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if offer is not None: - pulumi.set(__self__, "offer", offer) + _setter("offer", offer) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -2401,8 +3200,21 @@ def __init__(__self__, *, """ :param str node_fill_type: Supported values are "Pack" and "Spread". "Pack" means as many tasks as possible (taskSlotsPerNode) should be assigned to each node in the pool before any tasks are assigned to the next node in the pool. "Spread" means that tasks should be assigned evenly across all nodes in the pool. """ + PoolTaskSchedulingPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + node_fill_type=node_fill_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + node_fill_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if node_fill_type is None and 'nodeFillType' in kwargs: + node_fill_type = kwargs['nodeFillType'] + if node_fill_type is not None: - pulumi.set(__self__, "node_fill_type", node_fill_type) + _setter("node_fill_type", node_fill_type) @property @pulumi.getter(name="nodeFillType") @@ -2449,13 +3261,44 @@ def __init__(__self__, *, :param Sequence['PoolUserAccountLinuxUserConfigurationArgs'] linux_user_configurations: The `linux_user_configuration` block defined below is a linux-specific user configuration for the user account. This property is ignored if specified on a Windows pool. If not specified, the user is created with the default options. :param Sequence['PoolUserAccountWindowsUserConfigurationArgs'] windows_user_configurations: The `windows_user_configuration` block defined below is a windows-specific user configuration for the user account. This property can only be specified if the user is on a Windows pool. If not specified and on a Windows pool, the user is created with the default options. """ - pulumi.set(__self__, "elevation_level", elevation_level) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "password", password) + PoolUserAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + elevation_level=elevation_level, + name=name, + password=password, + linux_user_configurations=linux_user_configurations, + windows_user_configurations=windows_user_configurations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + elevation_level: Optional[str] = None, + name: Optional[str] = None, + password: Optional[str] = None, + linux_user_configurations: Optional[Sequence['outputs.PoolUserAccountLinuxUserConfiguration']] = None, + windows_user_configurations: Optional[Sequence['outputs.PoolUserAccountWindowsUserConfiguration']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if elevation_level is None and 'elevationLevel' in kwargs: + elevation_level = kwargs['elevationLevel'] + if elevation_level is None: + raise TypeError("Missing 'elevation_level' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if linux_user_configurations is None and 'linuxUserConfigurations' in kwargs: + linux_user_configurations = kwargs['linuxUserConfigurations'] + if windows_user_configurations is None and 'windowsUserConfigurations' in kwargs: + windows_user_configurations = kwargs['windowsUserConfigurations'] + + _setter("elevation_level", elevation_level) + _setter("name", name) + _setter("password", password) if linux_user_configurations is not None: - pulumi.set(__self__, "linux_user_configurations", linux_user_configurations) + _setter("linux_user_configurations", linux_user_configurations) if windows_user_configurations is not None: - pulumi.set(__self__, "windows_user_configurations", windows_user_configurations) + _setter("windows_user_configurations", windows_user_configurations) @property @pulumi.getter(name="elevationLevel") @@ -2526,12 +3369,29 @@ def __init__(__self__, *, :param str ssh_private_key: The SSH private key for the user account. The private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between nodes in a Linux pool when the pool's enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not configured between nodes (no modification of the user's .ssh directory is done). :param int uid: The group ID for the user account. The `uid` and `gid` properties must be specified together or not at all. If not specified the underlying operating system picks the gid. """ + PoolUserAccountLinuxUserConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + gid=gid, + ssh_private_key=ssh_private_key, + uid=uid, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + gid: Optional[int] = None, + ssh_private_key: Optional[str] = None, + uid: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ssh_private_key is None and 'sshPrivateKey' in kwargs: + ssh_private_key = kwargs['sshPrivateKey'] + if gid is not None: - pulumi.set(__self__, "gid", gid) + _setter("gid", gid) if ssh_private_key is not None: - pulumi.set(__self__, "ssh_private_key", ssh_private_key) + _setter("ssh_private_key", ssh_private_key) if uid is not None: - pulumi.set(__self__, "uid", uid) + _setter("uid", uid) @property @pulumi.getter @@ -2582,7 +3442,22 @@ def __init__(__self__, *, """ :param str login_mode: Specifies login mode for the user. The default value for VirtualMachineConfiguration pools is interactive mode and for CloudServiceConfiguration pools is batch mode. Values supported are "Batch" and "Interactive". """ - pulumi.set(__self__, "login_mode", login_mode) + PoolUserAccountWindowsUserConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + login_mode=login_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login_mode is None and 'loginMode' in kwargs: + login_mode = kwargs['loginMode'] + if login_mode is None: + raise TypeError("Missing 'login_mode' argument") + + _setter("login_mode", login_mode) @property @pulumi.getter(name="loginMode") @@ -2617,8 +3492,21 @@ def __init__(__self__, *, """ :param bool enable_automatic_updates: Whether automatic updates are enabled on the virtual machine. If omitted, the default value is true. """ + PoolWindow._configure( + lambda key, value: pulumi.set(__self__, key, value), + enable_automatic_updates=enable_automatic_updates, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enable_automatic_updates: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enable_automatic_updates is None and 'enableAutomaticUpdates' in kwargs: + enable_automatic_updates = kwargs['enableAutomaticUpdates'] + if enable_automatic_updates is not None: - pulumi.set(__self__, "enable_automatic_updates", enable_automatic_updates) + _setter("enable_automatic_updates", enable_automatic_updates) @property @pulumi.getter(name="enableAutomaticUpdates") @@ -2636,7 +3524,22 @@ def __init__(__self__, *, """ :param str key_vault_key_id: The full URL path of the Key Vault Key used to encrypt data for this Batch account. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + GetAccountEncryptionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + + _setter("key_vault_key_id", key_vault_key_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -2656,8 +3559,25 @@ def __init__(__self__, *, :param str id: The Azure identifier of the Azure KeyVault reference. :param str url: The HTTPS URL of the Azure KeyVault reference. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "url", url) + GetAccountKeyVaultReferenceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("id", id) + _setter("url", url) @property @pulumi.getter @@ -2685,8 +3605,27 @@ def __init__(__self__, *, :param str evaluation_interval: The interval to wait before evaluating if the pool needs to be scaled. :param str formula: The autoscale formula that needs to be used for scaling the Batch pool. """ - pulumi.set(__self__, "evaluation_interval", evaluation_interval) - pulumi.set(__self__, "formula", formula) + GetPoolAutoScaleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + evaluation_interval=evaluation_interval, + formula=formula, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + evaluation_interval: Optional[str] = None, + formula: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if evaluation_interval is None and 'evaluationInterval' in kwargs: + evaluation_interval = kwargs['evaluationInterval'] + if evaluation_interval is None: + raise TypeError("Missing 'evaluation_interval' argument") + if formula is None: + raise TypeError("Missing 'formula' argument") + + _setter("evaluation_interval", evaluation_interval) + _setter("formula", formula) @property @pulumi.getter(name="evaluationInterval") @@ -2718,10 +3657,39 @@ def __init__(__self__, *, :param str store_name: The name of the certificate store on the compute node into which the certificate is installed. :param Sequence[str] visibilities: Which user accounts on the compute node have access to the private data of the certificate. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "store_location", store_location) - pulumi.set(__self__, "store_name", store_name) - pulumi.set(__self__, "visibilities", visibilities) + GetPoolCertificateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + store_location=store_location, + store_name=store_name, + visibilities=visibilities, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + store_location: Optional[str] = None, + store_name: Optional[str] = None, + visibilities: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if store_location is None and 'storeLocation' in kwargs: + store_location = kwargs['storeLocation'] + if store_location is None: + raise TypeError("Missing 'store_location' argument") + if store_name is None and 'storeName' in kwargs: + store_name = kwargs['storeName'] + if store_name is None: + raise TypeError("Missing 'store_name' argument") + if visibilities is None: + raise TypeError("Missing 'visibilities' argument") + + _setter("id", id) + _setter("store_location", store_location) + _setter("store_name", store_name) + _setter("visibilities", visibilities) @property @pulumi.getter @@ -2767,9 +3735,34 @@ def __init__(__self__, *, :param Sequence['GetPoolContainerConfigurationContainerRegistryArgs'] container_registries: Additional container registries from which container images can be pulled by the pool's VMs. :param str type: The type of container configuration. """ - pulumi.set(__self__, "container_image_names", container_image_names) - pulumi.set(__self__, "container_registries", container_registries) - pulumi.set(__self__, "type", type) + GetPoolContainerConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_image_names=container_image_names, + container_registries=container_registries, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_image_names: Optional[Sequence[str]] = None, + container_registries: Optional[Sequence['outputs.GetPoolContainerConfigurationContainerRegistryResult']] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_image_names is None and 'containerImageNames' in kwargs: + container_image_names = kwargs['containerImageNames'] + if container_image_names is None: + raise TypeError("Missing 'container_image_names' argument") + if container_registries is None and 'containerRegistries' in kwargs: + container_registries = kwargs['containerRegistries'] + if container_registries is None: + raise TypeError("Missing 'container_registries' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("container_image_names", container_image_names) + _setter("container_registries", container_registries) + _setter("type", type) @property @pulumi.getter(name="containerImageNames") @@ -2809,10 +3802,41 @@ def __init__(__self__, *, :param str user_assigned_identity_id: The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password. :param str user_name: The user to use for authentication against the CIFS file system. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "registry_server", registry_server) - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) - pulumi.set(__self__, "user_name", user_name) + GetPoolContainerConfigurationContainerRegistryResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + registry_server=registry_server, + user_assigned_identity_id=user_assigned_identity_id, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + registry_server: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + user_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if registry_server is None and 'registryServer' in kwargs: + registry_server = kwargs['registryServer'] + if registry_server is None: + raise TypeError("Missing 'registry_server' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_assigned_identity_id is None: + raise TypeError("Missing 'user_assigned_identity_id' argument") + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + if user_name is None: + raise TypeError("Missing 'user_name' argument") + + _setter("password", password) + _setter("registry_server", registry_server) + _setter("user_assigned_identity_id", user_assigned_identity_id) + _setter("user_name", user_name) @property @pulumi.getter @@ -2860,10 +3884,39 @@ def __init__(__self__, *, :param int lun: The lun is used to uniquely identify each data disk. :param str storage_account_type: The storage account type to be used for the data disk. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "disk_size_gb", disk_size_gb) - pulumi.set(__self__, "lun", lun) - pulumi.set(__self__, "storage_account_type", storage_account_type) + GetPoolDataDiskResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + disk_size_gb=disk_size_gb, + lun=lun, + storage_account_type=storage_account_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[str] = None, + disk_size_gb: Optional[int] = None, + lun: Optional[int] = None, + storage_account_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if disk_size_gb is None: + raise TypeError("Missing 'disk_size_gb' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + + _setter("caching", caching) + _setter("disk_size_gb", disk_size_gb) + _setter("lun", lun) + _setter("storage_account_type", storage_account_type) @property @pulumi.getter @@ -2905,7 +3958,22 @@ def __init__(__self__, *, """ :param str disk_encryption_target: On Linux pool, only `TemporaryDisk` is supported; on Windows pool, `OsDisk` and `TemporaryDisk` must be specified. """ - pulumi.set(__self__, "disk_encryption_target", disk_encryption_target) + GetPoolDiskEncryptionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_encryption_target=disk_encryption_target, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_encryption_target: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_encryption_target is None and 'diskEncryptionTarget' in kwargs: + disk_encryption_target = kwargs['diskEncryptionTarget'] + if disk_encryption_target is None: + raise TypeError("Missing 'disk_encryption_target' argument") + + _setter("disk_encryption_target", disk_encryption_target) @property @pulumi.getter(name="diskEncryptionTarget") @@ -2937,14 +4005,65 @@ def __init__(__self__, *, :param str type: The type of container configuration. :param str type_handler_version: The version of script handler. """ - pulumi.set(__self__, "auto_upgrade_minor_version", auto_upgrade_minor_version) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protected_settings", protected_settings) - pulumi.set(__self__, "provision_after_extensions", provision_after_extensions) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "settings_json", settings_json) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_handler_version", type_handler_version) + GetPoolExtensionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_upgrade_minor_version=auto_upgrade_minor_version, + name=name, + protected_settings=protected_settings, + provision_after_extensions=provision_after_extensions, + publisher=publisher, + settings_json=settings_json, + type=type, + type_handler_version=type_handler_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_upgrade_minor_version: Optional[bool] = None, + name: Optional[str] = None, + protected_settings: Optional[str] = None, + provision_after_extensions: Optional[Sequence[str]] = None, + publisher: Optional[str] = None, + settings_json: Optional[str] = None, + type: Optional[str] = None, + type_handler_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_upgrade_minor_version is None and 'autoUpgradeMinorVersion' in kwargs: + auto_upgrade_minor_version = kwargs['autoUpgradeMinorVersion'] + if auto_upgrade_minor_version is None: + raise TypeError("Missing 'auto_upgrade_minor_version' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if protected_settings is None: + raise TypeError("Missing 'protected_settings' argument") + if provision_after_extensions is None and 'provisionAfterExtensions' in kwargs: + provision_after_extensions = kwargs['provisionAfterExtensions'] + if provision_after_extensions is None: + raise TypeError("Missing 'provision_after_extensions' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if settings_json is None and 'settingsJson' in kwargs: + settings_json = kwargs['settingsJson'] + if settings_json is None: + raise TypeError("Missing 'settings_json' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if type_handler_version is None: + raise TypeError("Missing 'type_handler_version' argument") + + _setter("auto_upgrade_minor_version", auto_upgrade_minor_version) + _setter("name", name) + _setter("protected_settings", protected_settings) + _setter("provision_after_extensions", provision_after_extensions) + _setter("publisher", publisher) + _setter("settings_json", settings_json) + _setter("type", type) + _setter("type_handler_version", type_handler_version) @property @pulumi.getter(name="autoUpgradeMinorVersion") @@ -3022,9 +4141,36 @@ def __init__(__self__, *, :param int target_dedicated_nodes: The number of nodes in the Batch pool. :param int target_low_priority_nodes: The number of low priority nodes in the Batch pool. """ - pulumi.set(__self__, "resize_timeout", resize_timeout) - pulumi.set(__self__, "target_dedicated_nodes", target_dedicated_nodes) - pulumi.set(__self__, "target_low_priority_nodes", target_low_priority_nodes) + GetPoolFixedScaleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + resize_timeout=resize_timeout, + target_dedicated_nodes=target_dedicated_nodes, + target_low_priority_nodes=target_low_priority_nodes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resize_timeout: Optional[str] = None, + target_dedicated_nodes: Optional[int] = None, + target_low_priority_nodes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resize_timeout is None and 'resizeTimeout' in kwargs: + resize_timeout = kwargs['resizeTimeout'] + if resize_timeout is None: + raise TypeError("Missing 'resize_timeout' argument") + if target_dedicated_nodes is None and 'targetDedicatedNodes' in kwargs: + target_dedicated_nodes = kwargs['targetDedicatedNodes'] + if target_dedicated_nodes is None: + raise TypeError("Missing 'target_dedicated_nodes' argument") + if target_low_priority_nodes is None and 'targetLowPriorityNodes' in kwargs: + target_low_priority_nodes = kwargs['targetLowPriorityNodes'] + if target_low_priority_nodes is None: + raise TypeError("Missing 'target_low_priority_nodes' argument") + + _setter("resize_timeout", resize_timeout) + _setter("target_dedicated_nodes", target_dedicated_nodes) + _setter("target_low_priority_nodes", target_low_priority_nodes) @property @pulumi.getter(name="resizeTimeout") @@ -3064,12 +4210,41 @@ def __init__(__self__, *, :param Sequence['GetPoolMountAzureBlobFileSystemArgs'] azure_blob_file_systems: A `azure_blob_file_system` block defined as below. :param Sequence['GetPoolMountAzureFileShareArgs'] azure_file_shares: A `azure_file_share` block defined as below. """ - pulumi.set(__self__, "cifs_mounts", cifs_mounts) - pulumi.set(__self__, "nfs_mounts", nfs_mounts) + GetPoolMountResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + cifs_mounts=cifs_mounts, + nfs_mounts=nfs_mounts, + azure_blob_file_systems=azure_blob_file_systems, + azure_file_shares=azure_file_shares, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cifs_mounts: Optional[Sequence['outputs.GetPoolMountCifsMountResult']] = None, + nfs_mounts: Optional[Sequence['outputs.GetPoolMountNfsMountResult']] = None, + azure_blob_file_systems: Optional[Sequence['outputs.GetPoolMountAzureBlobFileSystemResult']] = None, + azure_file_shares: Optional[Sequence['outputs.GetPoolMountAzureFileShareResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cifs_mounts is None and 'cifsMounts' in kwargs: + cifs_mounts = kwargs['cifsMounts'] + if cifs_mounts is None: + raise TypeError("Missing 'cifs_mounts' argument") + if nfs_mounts is None and 'nfsMounts' in kwargs: + nfs_mounts = kwargs['nfsMounts'] + if nfs_mounts is None: + raise TypeError("Missing 'nfs_mounts' argument") + if azure_blob_file_systems is None and 'azureBlobFileSystems' in kwargs: + azure_blob_file_systems = kwargs['azureBlobFileSystems'] + if azure_file_shares is None and 'azureFileShares' in kwargs: + azure_file_shares = kwargs['azureFileShares'] + + _setter("cifs_mounts", cifs_mounts) + _setter("nfs_mounts", nfs_mounts) if azure_blob_file_systems is not None: - pulumi.set(__self__, "azure_blob_file_systems", azure_blob_file_systems) + _setter("azure_blob_file_systems", azure_blob_file_systems) if azure_file_shares is not None: - pulumi.set(__self__, "azure_file_shares", azure_file_shares) + _setter("azure_file_shares", azure_file_shares) @property @pulumi.getter(name="cifsMounts") @@ -3123,13 +4298,64 @@ def __init__(__self__, *, :param str relative_mount_path: The relative path on compute node where the file system will be mounted All file systems are mounted relative to the Batch mounts directory, accessible via the `AZ_BATCH_NODE_MOUNTS_DIR` environment variable. :param str sas_key: The Azure Storage SAS token. This property is mutually exclusive with both `account_key` and `identity_id`; exactly one must be specified. """ - pulumi.set(__self__, "account_key", account_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "blobfuse_options", blobfuse_options) - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "identity_id", identity_id) - pulumi.set(__self__, "relative_mount_path", relative_mount_path) - pulumi.set(__self__, "sas_key", sas_key) + GetPoolMountAzureBlobFileSystemResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_key=account_key, + account_name=account_name, + blobfuse_options=blobfuse_options, + container_name=container_name, + identity_id=identity_id, + relative_mount_path=relative_mount_path, + sas_key=sas_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_key: Optional[str] = None, + account_name: Optional[str] = None, + blobfuse_options: Optional[str] = None, + container_name: Optional[str] = None, + identity_id: Optional[str] = None, + relative_mount_path: Optional[str] = None, + sas_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if account_key is None: + raise TypeError("Missing 'account_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if blobfuse_options is None and 'blobfuseOptions' in kwargs: + blobfuse_options = kwargs['blobfuseOptions'] + if blobfuse_options is None: + raise TypeError("Missing 'blobfuse_options' argument") + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if identity_id is None: + raise TypeError("Missing 'identity_id' argument") + if relative_mount_path is None and 'relativeMountPath' in kwargs: + relative_mount_path = kwargs['relativeMountPath'] + if relative_mount_path is None: + raise TypeError("Missing 'relative_mount_path' argument") + if sas_key is None and 'sasKey' in kwargs: + sas_key = kwargs['sasKey'] + if sas_key is None: + raise TypeError("Missing 'sas_key' argument") + + _setter("account_key", account_key) + _setter("account_name", account_name) + _setter("blobfuse_options", blobfuse_options) + _setter("container_name", container_name) + _setter("identity_id", identity_id) + _setter("relative_mount_path", relative_mount_path) + _setter("sas_key", sas_key) @property @pulumi.getter(name="accountKey") @@ -3203,11 +4429,50 @@ def __init__(__self__, *, :param str mount_options: Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. :param str relative_mount_path: The relative path on compute node where the file system will be mounted All file systems are mounted relative to the Batch mounts directory, accessible via the `AZ_BATCH_NODE_MOUNTS_DIR` environment variable. """ - pulumi.set(__self__, "account_key", account_key) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "azure_file_url", azure_file_url) - pulumi.set(__self__, "mount_options", mount_options) - pulumi.set(__self__, "relative_mount_path", relative_mount_path) + GetPoolMountAzureFileShareResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_key=account_key, + account_name=account_name, + azure_file_url=azure_file_url, + mount_options=mount_options, + relative_mount_path=relative_mount_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_key: Optional[str] = None, + account_name: Optional[str] = None, + azure_file_url: Optional[str] = None, + mount_options: Optional[str] = None, + relative_mount_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if account_key is None: + raise TypeError("Missing 'account_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if azure_file_url is None and 'azureFileUrl' in kwargs: + azure_file_url = kwargs['azureFileUrl'] + if azure_file_url is None: + raise TypeError("Missing 'azure_file_url' argument") + if mount_options is None and 'mountOptions' in kwargs: + mount_options = kwargs['mountOptions'] + if mount_options is None: + raise TypeError("Missing 'mount_options' argument") + if relative_mount_path is None and 'relativeMountPath' in kwargs: + relative_mount_path = kwargs['relativeMountPath'] + if relative_mount_path is None: + raise TypeError("Missing 'relative_mount_path' argument") + + _setter("account_key", account_key) + _setter("account_name", account_name) + _setter("azure_file_url", azure_file_url) + _setter("mount_options", mount_options) + _setter("relative_mount_path", relative_mount_path) @property @pulumi.getter(name="accountKey") @@ -3265,11 +4530,46 @@ def __init__(__self__, *, :param str source: The URI of the file system to mount. :param str user_name: The user to use for authentication against the CIFS file system. """ - pulumi.set(__self__, "mount_options", mount_options) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "relative_mount_path", relative_mount_path) - pulumi.set(__self__, "source", source) - pulumi.set(__self__, "user_name", user_name) + GetPoolMountCifsMountResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + mount_options=mount_options, + password=password, + relative_mount_path=relative_mount_path, + source=source, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mount_options: Optional[str] = None, + password: Optional[str] = None, + relative_mount_path: Optional[str] = None, + source: Optional[str] = None, + user_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mount_options is None and 'mountOptions' in kwargs: + mount_options = kwargs['mountOptions'] + if mount_options is None: + raise TypeError("Missing 'mount_options' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if relative_mount_path is None and 'relativeMountPath' in kwargs: + relative_mount_path = kwargs['relativeMountPath'] + if relative_mount_path is None: + raise TypeError("Missing 'relative_mount_path' argument") + if source is None: + raise TypeError("Missing 'source' argument") + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + if user_name is None: + raise TypeError("Missing 'user_name' argument") + + _setter("mount_options", mount_options) + _setter("password", password) + _setter("relative_mount_path", relative_mount_path) + _setter("source", source) + _setter("user_name", user_name) @property @pulumi.getter(name="mountOptions") @@ -3323,9 +4623,34 @@ def __init__(__self__, *, :param str relative_mount_path: The relative path on compute node where the file system will be mounted All file systems are mounted relative to the Batch mounts directory, accessible via the `AZ_BATCH_NODE_MOUNTS_DIR` environment variable. :param str source: The URI of the file system to mount. """ - pulumi.set(__self__, "mount_options", mount_options) - pulumi.set(__self__, "relative_mount_path", relative_mount_path) - pulumi.set(__self__, "source", source) + GetPoolMountNfsMountResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + mount_options=mount_options, + relative_mount_path=relative_mount_path, + source=source, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mount_options: Optional[str] = None, + relative_mount_path: Optional[str] = None, + source: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mount_options is None and 'mountOptions' in kwargs: + mount_options = kwargs['mountOptions'] + if mount_options is None: + raise TypeError("Missing 'mount_options' argument") + if relative_mount_path is None and 'relativeMountPath' in kwargs: + relative_mount_path = kwargs['relativeMountPath'] + if relative_mount_path is None: + raise TypeError("Missing 'relative_mount_path' argument") + if source is None: + raise TypeError("Missing 'source' argument") + + _setter("mount_options", mount_options) + _setter("relative_mount_path", relative_mount_path) + _setter("source", source) @property @pulumi.getter(name="mountOptions") @@ -3368,12 +4693,57 @@ def __init__(__self__, *, :param Sequence[str] public_ips: A list of public IP ids that will be allocated to nodes. :param str subnet_id: The ARM resource identifier of the virtual network subnet which the compute nodes of the pool are joined too. """ - pulumi.set(__self__, "accelerated_networking_enabled", accelerated_networking_enabled) - pulumi.set(__self__, "dynamic_vnet_assignment_scope", dynamic_vnet_assignment_scope) - pulumi.set(__self__, "endpoint_configurations", endpoint_configurations) - pulumi.set(__self__, "public_address_provisioning_type", public_address_provisioning_type) - pulumi.set(__self__, "public_ips", public_ips) - pulumi.set(__self__, "subnet_id", subnet_id) + GetPoolNetworkConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + accelerated_networking_enabled=accelerated_networking_enabled, + dynamic_vnet_assignment_scope=dynamic_vnet_assignment_scope, + endpoint_configurations=endpoint_configurations, + public_address_provisioning_type=public_address_provisioning_type, + public_ips=public_ips, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + accelerated_networking_enabled: Optional[bool] = None, + dynamic_vnet_assignment_scope: Optional[str] = None, + endpoint_configurations: Optional[Sequence['outputs.GetPoolNetworkConfigurationEndpointConfigurationResult']] = None, + public_address_provisioning_type: Optional[str] = None, + public_ips: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if accelerated_networking_enabled is None and 'acceleratedNetworkingEnabled' in kwargs: + accelerated_networking_enabled = kwargs['acceleratedNetworkingEnabled'] + if accelerated_networking_enabled is None: + raise TypeError("Missing 'accelerated_networking_enabled' argument") + if dynamic_vnet_assignment_scope is None and 'dynamicVnetAssignmentScope' in kwargs: + dynamic_vnet_assignment_scope = kwargs['dynamicVnetAssignmentScope'] + if dynamic_vnet_assignment_scope is None: + raise TypeError("Missing 'dynamic_vnet_assignment_scope' argument") + if endpoint_configurations is None and 'endpointConfigurations' in kwargs: + endpoint_configurations = kwargs['endpointConfigurations'] + if endpoint_configurations is None: + raise TypeError("Missing 'endpoint_configurations' argument") + if public_address_provisioning_type is None and 'publicAddressProvisioningType' in kwargs: + public_address_provisioning_type = kwargs['publicAddressProvisioningType'] + if public_address_provisioning_type is None: + raise TypeError("Missing 'public_address_provisioning_type' argument") + if public_ips is None and 'publicIps' in kwargs: + public_ips = kwargs['publicIps'] + if public_ips is None: + raise TypeError("Missing 'public_ips' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("accelerated_networking_enabled", accelerated_networking_enabled) + _setter("dynamic_vnet_assignment_scope", dynamic_vnet_assignment_scope) + _setter("endpoint_configurations", endpoint_configurations) + _setter("public_address_provisioning_type", public_address_provisioning_type) + _setter("public_ips", public_ips) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="acceleratedNetworkingEnabled") @@ -3436,11 +4806,46 @@ def __init__(__self__, *, :param Sequence['GetPoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleArgs'] network_security_group_rules: The list of network security group rules that are applied to the endpoint. :param str protocol: The protocol of the endpoint. """ - pulumi.set(__self__, "backend_port", backend_port) - pulumi.set(__self__, "frontend_port_range", frontend_port_range) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "network_security_group_rules", network_security_group_rules) - pulumi.set(__self__, "protocol", protocol) + GetPoolNetworkConfigurationEndpointConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + frontend_port_range=frontend_port_range, + name=name, + network_security_group_rules=network_security_group_rules, + protocol=protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[int] = None, + frontend_port_range: Optional[str] = None, + name: Optional[str] = None, + network_security_group_rules: Optional[Sequence['outputs.GetPoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleResult']] = None, + protocol: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if backend_port is None: + raise TypeError("Missing 'backend_port' argument") + if frontend_port_range is None and 'frontendPortRange' in kwargs: + frontend_port_range = kwargs['frontendPortRange'] + if frontend_port_range is None: + raise TypeError("Missing 'frontend_port_range' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if network_security_group_rules is None and 'networkSecurityGroupRules' in kwargs: + network_security_group_rules = kwargs['networkSecurityGroupRules'] + if network_security_group_rules is None: + raise TypeError("Missing 'network_security_group_rules' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + + _setter("backend_port", backend_port) + _setter("frontend_port_range", frontend_port_range) + _setter("name", name) + _setter("network_security_group_rules", network_security_group_rules) + _setter("protocol", protocol) @property @pulumi.getter(name="backendPort") @@ -3496,10 +4901,39 @@ def __init__(__self__, *, :param str source_address_prefix: The source address prefix or tag to match for the rule. :param Sequence[str] source_port_ranges: The source port ranges to match for the rule. """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "source_address_prefix", source_address_prefix) - pulumi.set(__self__, "source_port_ranges", source_port_ranges) + GetPoolNetworkConfigurationEndpointConfigurationNetworkSecurityGroupRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + priority=priority, + source_address_prefix=source_address_prefix, + source_port_ranges=source_port_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[str] = None, + priority: Optional[int] = None, + source_address_prefix: Optional[str] = None, + source_port_ranges: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if source_address_prefix is None and 'sourceAddressPrefix' in kwargs: + source_address_prefix = kwargs['sourceAddressPrefix'] + if source_address_prefix is None: + raise TypeError("Missing 'source_address_prefix' argument") + if source_port_ranges is None and 'sourcePortRanges' in kwargs: + source_port_ranges = kwargs['sourcePortRanges'] + if source_port_ranges is None: + raise TypeError("Missing 'source_port_ranges' argument") + + _setter("access", access) + _setter("priority", priority) + _setter("source_address_prefix", source_address_prefix) + _setter("source_port_ranges", source_port_ranges) @property @pulumi.getter @@ -3541,7 +4975,20 @@ def __init__(__self__, *, """ :param str policy: The placement policy for allocating nodes in the pool. """ - pulumi.set(__self__, "policy", policy) + GetPoolNodePlacementResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy is None: + raise TypeError("Missing 'policy' argument") + + _setter("policy", policy) @property @pulumi.getter @@ -3571,14 +5018,61 @@ def __init__(__self__, *, :param bool wait_for_success: A flag that indicates if the Batch pool should wait for the start task to be completed. :param Mapping[str, str] common_environment_properties: A map of strings (key,value) that represents the environment variables to set in the start task. """ - pulumi.set(__self__, "command_line", command_line) - pulumi.set(__self__, "containers", containers) - pulumi.set(__self__, "resource_files", resource_files) - pulumi.set(__self__, "task_retry_maximum", task_retry_maximum) - pulumi.set(__self__, "user_identities", user_identities) - pulumi.set(__self__, "wait_for_success", wait_for_success) + GetPoolStartTaskResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + command_line=command_line, + containers=containers, + resource_files=resource_files, + task_retry_maximum=task_retry_maximum, + user_identities=user_identities, + wait_for_success=wait_for_success, + common_environment_properties=common_environment_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + command_line: Optional[str] = None, + containers: Optional[Sequence['outputs.GetPoolStartTaskContainerResult']] = None, + resource_files: Optional[Sequence['outputs.GetPoolStartTaskResourceFileResult']] = None, + task_retry_maximum: Optional[int] = None, + user_identities: Optional[Sequence['outputs.GetPoolStartTaskUserIdentityResult']] = None, + wait_for_success: Optional[bool] = None, + common_environment_properties: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if command_line is None and 'commandLine' in kwargs: + command_line = kwargs['commandLine'] + if command_line is None: + raise TypeError("Missing 'command_line' argument") + if containers is None: + raise TypeError("Missing 'containers' argument") + if resource_files is None and 'resourceFiles' in kwargs: + resource_files = kwargs['resourceFiles'] + if resource_files is None: + raise TypeError("Missing 'resource_files' argument") + if task_retry_maximum is None and 'taskRetryMaximum' in kwargs: + task_retry_maximum = kwargs['taskRetryMaximum'] + if task_retry_maximum is None: + raise TypeError("Missing 'task_retry_maximum' argument") + if user_identities is None and 'userIdentities' in kwargs: + user_identities = kwargs['userIdentities'] + if user_identities is None: + raise TypeError("Missing 'user_identities' argument") + if wait_for_success is None and 'waitForSuccess' in kwargs: + wait_for_success = kwargs['waitForSuccess'] + if wait_for_success is None: + raise TypeError("Missing 'wait_for_success' argument") + if common_environment_properties is None and 'commonEnvironmentProperties' in kwargs: + common_environment_properties = kwargs['commonEnvironmentProperties'] + + _setter("command_line", command_line) + _setter("containers", containers) + _setter("resource_files", resource_files) + _setter("task_retry_maximum", task_retry_maximum) + _setter("user_identities", user_identities) + _setter("wait_for_success", wait_for_success) if common_environment_properties is not None: - pulumi.set(__self__, "common_environment_properties", common_environment_properties) + _setter("common_environment_properties", common_environment_properties) @property @pulumi.getter(name="commandLine") @@ -3650,10 +5144,41 @@ def __init__(__self__, *, :param str run_options: Additional options to the container create command. :param str working_directory: A flag to indicate where the container task working directory is. """ - pulumi.set(__self__, "image_name", image_name) - pulumi.set(__self__, "registries", registries) - pulumi.set(__self__, "run_options", run_options) - pulumi.set(__self__, "working_directory", working_directory) + GetPoolStartTaskContainerResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + image_name=image_name, + registries=registries, + run_options=run_options, + working_directory=working_directory, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image_name: Optional[str] = None, + registries: Optional[Sequence['outputs.GetPoolStartTaskContainerRegistryResult']] = None, + run_options: Optional[str] = None, + working_directory: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if image_name is None: + raise TypeError("Missing 'image_name' argument") + if registries is None: + raise TypeError("Missing 'registries' argument") + if run_options is None and 'runOptions' in kwargs: + run_options = kwargs['runOptions'] + if run_options is None: + raise TypeError("Missing 'run_options' argument") + if working_directory is None and 'workingDirectory' in kwargs: + working_directory = kwargs['workingDirectory'] + if working_directory is None: + raise TypeError("Missing 'working_directory' argument") + + _setter("image_name", image_name) + _setter("registries", registries) + _setter("run_options", run_options) + _setter("working_directory", working_directory) @property @pulumi.getter(name="imageName") @@ -3701,10 +5226,41 @@ def __init__(__self__, *, :param str user_assigned_identity_id: The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password. :param str user_name: The user to use for authentication against the CIFS file system. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "registry_server", registry_server) - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) - pulumi.set(__self__, "user_name", user_name) + GetPoolStartTaskContainerRegistryResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + registry_server=registry_server, + user_assigned_identity_id=user_assigned_identity_id, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + registry_server: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + user_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if registry_server is None and 'registryServer' in kwargs: + registry_server = kwargs['registryServer'] + if registry_server is None: + raise TypeError("Missing 'registry_server' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_assigned_identity_id is None: + raise TypeError("Missing 'user_assigned_identity_id' argument") + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + if user_name is None: + raise TypeError("Missing 'user_name' argument") + + _setter("password", password) + _setter("registry_server", registry_server) + _setter("user_assigned_identity_id", user_assigned_identity_id) + _setter("user_name", user_name) @property @pulumi.getter @@ -3758,13 +5314,64 @@ def __init__(__self__, *, :param str storage_container_url: The URL of the blob container within Azure Blob Storage. :param str user_assigned_identity_id: The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password. """ - pulumi.set(__self__, "auto_storage_container_name", auto_storage_container_name) - pulumi.set(__self__, "blob_prefix", blob_prefix) - pulumi.set(__self__, "file_mode", file_mode) - pulumi.set(__self__, "file_path", file_path) - pulumi.set(__self__, "http_url", http_url) - pulumi.set(__self__, "storage_container_url", storage_container_url) - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + GetPoolStartTaskResourceFileResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_storage_container_name=auto_storage_container_name, + blob_prefix=blob_prefix, + file_mode=file_mode, + file_path=file_path, + http_url=http_url, + storage_container_url=storage_container_url, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_storage_container_name: Optional[str] = None, + blob_prefix: Optional[str] = None, + file_mode: Optional[str] = None, + file_path: Optional[str] = None, + http_url: Optional[str] = None, + storage_container_url: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_storage_container_name is None and 'autoStorageContainerName' in kwargs: + auto_storage_container_name = kwargs['autoStorageContainerName'] + if auto_storage_container_name is None: + raise TypeError("Missing 'auto_storage_container_name' argument") + if blob_prefix is None and 'blobPrefix' in kwargs: + blob_prefix = kwargs['blobPrefix'] + if blob_prefix is None: + raise TypeError("Missing 'blob_prefix' argument") + if file_mode is None and 'fileMode' in kwargs: + file_mode = kwargs['fileMode'] + if file_mode is None: + raise TypeError("Missing 'file_mode' argument") + if file_path is None and 'filePath' in kwargs: + file_path = kwargs['filePath'] + if file_path is None: + raise TypeError("Missing 'file_path' argument") + if http_url is None and 'httpUrl' in kwargs: + http_url = kwargs['httpUrl'] + if http_url is None: + raise TypeError("Missing 'http_url' argument") + if storage_container_url is None and 'storageContainerUrl' in kwargs: + storage_container_url = kwargs['storageContainerUrl'] + if storage_container_url is None: + raise TypeError("Missing 'storage_container_url' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_assigned_identity_id is None: + raise TypeError("Missing 'user_assigned_identity_id' argument") + + _setter("auto_storage_container_name", auto_storage_container_name) + _setter("blob_prefix", blob_prefix) + _setter("file_mode", file_mode) + _setter("file_path", file_path) + _setter("http_url", http_url) + _setter("storage_container_url", storage_container_url) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="autoStorageContainerName") @@ -3832,8 +5439,29 @@ def __init__(__self__, *, :param Sequence['GetPoolStartTaskUserIdentityAutoUserArgs'] auto_users: A `auto_user` block that describes the user identity under which the start task runs. :param str user_name: The user to use for authentication against the CIFS file system. """ - pulumi.set(__self__, "auto_users", auto_users) - pulumi.set(__self__, "user_name", user_name) + GetPoolStartTaskUserIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_users=auto_users, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_users: Optional[Sequence['outputs.GetPoolStartTaskUserIdentityAutoUserResult']] = None, + user_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_users is None and 'autoUsers' in kwargs: + auto_users = kwargs['autoUsers'] + if auto_users is None: + raise TypeError("Missing 'auto_users' argument") + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + if user_name is None: + raise TypeError("Missing 'user_name' argument") + + _setter("auto_users", auto_users) + _setter("user_name", user_name) @property @pulumi.getter(name="autoUsers") @@ -3861,8 +5489,27 @@ def __init__(__self__, *, :param str elevation_level: The elevation level of the user account. "NonAdmin" - The auto user is a standard user without elevated access. "Admin" - The auto user is a user with elevated access and operates with full Administrator permissions. The default value is nonAdmin. :param str scope: The scope of the user identity under which the start task runs. """ - pulumi.set(__self__, "elevation_level", elevation_level) - pulumi.set(__self__, "scope", scope) + GetPoolStartTaskUserIdentityAutoUserResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + elevation_level=elevation_level, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + elevation_level: Optional[str] = None, + scope: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if elevation_level is None and 'elevationLevel' in kwargs: + elevation_level = kwargs['elevationLevel'] + if elevation_level is None: + raise TypeError("Missing 'elevation_level' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + + _setter("elevation_level", elevation_level) + _setter("scope", scope) @property @pulumi.getter(name="elevationLevel") @@ -3893,11 +5540,40 @@ def __init__(__self__, *, :param str id: The fully qualified ID of the certificate installed on the pool. :param str publisher: The name of the extension handler publisher.The name of the extension handler publisher. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + GetPoolStorageImageReferenceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("id", id) + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -3938,7 +5614,22 @@ def __init__(__self__, *, """ :param str node_fill_type: Supported values are `Pack` and `Spread`. `Pack` means as many tasks as possible (taskSlotsPerNode) should be assigned to each node in the pool before any tasks are assigned to the next node in the pool. `Spread` means that tasks should be assigned evenly across all nodes in the pool. """ - pulumi.set(__self__, "node_fill_type", node_fill_type) + GetPoolTaskSchedulingPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + node_fill_type=node_fill_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + node_fill_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if node_fill_type is None and 'nodeFillType' in kwargs: + node_fill_type = kwargs['nodeFillType'] + if node_fill_type is None: + raise TypeError("Missing 'node_fill_type' argument") + + _setter("node_fill_type", node_fill_type) @property @pulumi.getter(name="nodeFillType") @@ -3964,11 +5655,46 @@ def __init__(__self__, *, :param str password: The password for the user account. :param Sequence['GetPoolUserAccountWindowsUserConfigurationArgs'] windows_user_configurations: The `windows_user_configuration` block defined below is a windows-specific user configuration for the user account. This property can only be specified if the user is on a Windows pool. If not specified and on a Windows pool, the user is created with the default options. """ - pulumi.set(__self__, "elevation_level", elevation_level) - pulumi.set(__self__, "linux_user_configurations", linux_user_configurations) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "windows_user_configurations", windows_user_configurations) + GetPoolUserAccountResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + elevation_level=elevation_level, + linux_user_configurations=linux_user_configurations, + name=name, + password=password, + windows_user_configurations=windows_user_configurations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + elevation_level: Optional[str] = None, + linux_user_configurations: Optional[Sequence['outputs.GetPoolUserAccountLinuxUserConfigurationResult']] = None, + name: Optional[str] = None, + password: Optional[str] = None, + windows_user_configurations: Optional[Sequence['outputs.GetPoolUserAccountWindowsUserConfigurationResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if elevation_level is None and 'elevationLevel' in kwargs: + elevation_level = kwargs['elevationLevel'] + if elevation_level is None: + raise TypeError("Missing 'elevation_level' argument") + if linux_user_configurations is None and 'linuxUserConfigurations' in kwargs: + linux_user_configurations = kwargs['linuxUserConfigurations'] + if linux_user_configurations is None: + raise TypeError("Missing 'linux_user_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if windows_user_configurations is None and 'windowsUserConfigurations' in kwargs: + windows_user_configurations = kwargs['windowsUserConfigurations'] + if windows_user_configurations is None: + raise TypeError("Missing 'windows_user_configurations' argument") + + _setter("elevation_level", elevation_level) + _setter("linux_user_configurations", linux_user_configurations) + _setter("name", name) + _setter("password", password) + _setter("windows_user_configurations", windows_user_configurations) @property @pulumi.getter(name="elevationLevel") @@ -4022,9 +5748,32 @@ def __init__(__self__, *, :param str ssh_private_key: The SSH private key for the user account. :param int uid: The group ID for the user account. """ - pulumi.set(__self__, "gid", gid) - pulumi.set(__self__, "ssh_private_key", ssh_private_key) - pulumi.set(__self__, "uid", uid) + GetPoolUserAccountLinuxUserConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + gid=gid, + ssh_private_key=ssh_private_key, + uid=uid, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + gid: Optional[int] = None, + ssh_private_key: Optional[str] = None, + uid: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if gid is None: + raise TypeError("Missing 'gid' argument") + if ssh_private_key is None and 'sshPrivateKey' in kwargs: + ssh_private_key = kwargs['sshPrivateKey'] + if ssh_private_key is None: + raise TypeError("Missing 'ssh_private_key' argument") + if uid is None: + raise TypeError("Missing 'uid' argument") + + _setter("gid", gid) + _setter("ssh_private_key", ssh_private_key) + _setter("uid", uid) @property @pulumi.getter @@ -4058,7 +5807,22 @@ def __init__(__self__, *, """ :param str login_mode: Specifies login mode for the user. """ - pulumi.set(__self__, "login_mode", login_mode) + GetPoolUserAccountWindowsUserConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + login_mode=login_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login_mode is None and 'loginMode' in kwargs: + login_mode = kwargs['loginMode'] + if login_mode is None: + raise TypeError("Missing 'login_mode' argument") + + _setter("login_mode", login_mode) @property @pulumi.getter(name="loginMode") @@ -4076,7 +5840,22 @@ def __init__(__self__, *, """ :param bool enable_automatic_updates: Whether automatic updates are enabled on the virtual machine. """ - pulumi.set(__self__, "enable_automatic_updates", enable_automatic_updates) + GetPoolWindowResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + enable_automatic_updates=enable_automatic_updates, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enable_automatic_updates: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enable_automatic_updates is None and 'enableAutomaticUpdates' in kwargs: + enable_automatic_updates = kwargs['enableAutomaticUpdates'] + if enable_automatic_updates is None: + raise TypeError("Missing 'enable_automatic_updates' argument") + + _setter("enable_automatic_updates", enable_automatic_updates) @property @pulumi.getter(name="enableAutomaticUpdates") diff --git a/sdk/python/pulumi_azure/batch/pool.py b/sdk/python/pulumi_azure/batch/pool.py index 4a36c46b6d..183d11ac73 100644 --- a/sdk/python/pulumi_azure/batch/pool.py +++ b/sdk/python/pulumi_azure/batch/pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -81,59 +81,180 @@ def __init__(__self__, *, > **Please Note:** `fixed_scale` and `auto_scale` blocks cannot be used both at the same time. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "node_agent_sku_id", node_agent_sku_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_image_reference", storage_image_reference) - pulumi.set(__self__, "vm_size", vm_size) + PoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + node_agent_sku_id=node_agent_sku_id, + resource_group_name=resource_group_name, + storage_image_reference=storage_image_reference, + vm_size=vm_size, + auto_scale=auto_scale, + certificates=certificates, + container_configuration=container_configuration, + data_disks=data_disks, + disk_encryptions=disk_encryptions, + display_name=display_name, + extensions=extensions, + fixed_scale=fixed_scale, + identity=identity, + inter_node_communication=inter_node_communication, + license_type=license_type, + max_tasks_per_node=max_tasks_per_node, + metadata=metadata, + mounts=mounts, + name=name, + network_configuration=network_configuration, + node_placements=node_placements, + os_disk_placement=os_disk_placement, + start_task=start_task, + stop_pending_resize_operation=stop_pending_resize_operation, + target_node_communication_mode=target_node_communication_mode, + task_scheduling_policies=task_scheduling_policies, + user_accounts=user_accounts, + windows=windows, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + node_agent_sku_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_image_reference: Optional[pulumi.Input['PoolStorageImageReferenceArgs']] = None, + vm_size: Optional[pulumi.Input[str]] = None, + auto_scale: Optional[pulumi.Input['PoolAutoScaleArgs']] = None, + certificates: Optional[pulumi.Input[Sequence[pulumi.Input['PoolCertificateArgs']]]] = None, + container_configuration: Optional[pulumi.Input['PoolContainerConfigurationArgs']] = None, + data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['PoolDataDiskArgs']]]] = None, + disk_encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['PoolDiskEncryptionArgs']]]] = None, + display_name: Optional[pulumi.Input[str]] = None, + extensions: Optional[pulumi.Input[Sequence[pulumi.Input['PoolExtensionArgs']]]] = None, + fixed_scale: Optional[pulumi.Input['PoolFixedScaleArgs']] = None, + identity: Optional[pulumi.Input['PoolIdentityArgs']] = None, + inter_node_communication: Optional[pulumi.Input[str]] = None, + license_type: Optional[pulumi.Input[str]] = None, + max_tasks_per_node: Optional[pulumi.Input[int]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + mounts: Optional[pulumi.Input[Sequence[pulumi.Input['PoolMountArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + network_configuration: Optional[pulumi.Input['PoolNetworkConfigurationArgs']] = None, + node_placements: Optional[pulumi.Input[Sequence[pulumi.Input['PoolNodePlacementArgs']]]] = None, + os_disk_placement: Optional[pulumi.Input[str]] = None, + start_task: Optional[pulumi.Input['PoolStartTaskArgs']] = None, + stop_pending_resize_operation: Optional[pulumi.Input[bool]] = None, + target_node_communication_mode: Optional[pulumi.Input[str]] = None, + task_scheduling_policies: Optional[pulumi.Input[Sequence[pulumi.Input['PoolTaskSchedulingPolicyArgs']]]] = None, + user_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['PoolUserAccountArgs']]]] = None, + windows: Optional[pulumi.Input[Sequence[pulumi.Input['PoolWindowArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if node_agent_sku_id is None and 'nodeAgentSkuId' in kwargs: + node_agent_sku_id = kwargs['nodeAgentSkuId'] + if node_agent_sku_id is None: + raise TypeError("Missing 'node_agent_sku_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_image_reference is None and 'storageImageReference' in kwargs: + storage_image_reference = kwargs['storageImageReference'] + if storage_image_reference is None: + raise TypeError("Missing 'storage_image_reference' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if auto_scale is None and 'autoScale' in kwargs: + auto_scale = kwargs['autoScale'] + if container_configuration is None and 'containerConfiguration' in kwargs: + container_configuration = kwargs['containerConfiguration'] + if data_disks is None and 'dataDisks' in kwargs: + data_disks = kwargs['dataDisks'] + if disk_encryptions is None and 'diskEncryptions' in kwargs: + disk_encryptions = kwargs['diskEncryptions'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if fixed_scale is None and 'fixedScale' in kwargs: + fixed_scale = kwargs['fixedScale'] + if inter_node_communication is None and 'interNodeCommunication' in kwargs: + inter_node_communication = kwargs['interNodeCommunication'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_tasks_per_node is None and 'maxTasksPerNode' in kwargs: + max_tasks_per_node = kwargs['maxTasksPerNode'] + if network_configuration is None and 'networkConfiguration' in kwargs: + network_configuration = kwargs['networkConfiguration'] + if node_placements is None and 'nodePlacements' in kwargs: + node_placements = kwargs['nodePlacements'] + if os_disk_placement is None and 'osDiskPlacement' in kwargs: + os_disk_placement = kwargs['osDiskPlacement'] + if start_task is None and 'startTask' in kwargs: + start_task = kwargs['startTask'] + if stop_pending_resize_operation is None and 'stopPendingResizeOperation' in kwargs: + stop_pending_resize_operation = kwargs['stopPendingResizeOperation'] + if target_node_communication_mode is None and 'targetNodeCommunicationMode' in kwargs: + target_node_communication_mode = kwargs['targetNodeCommunicationMode'] + if task_scheduling_policies is None and 'taskSchedulingPolicies' in kwargs: + task_scheduling_policies = kwargs['taskSchedulingPolicies'] + if user_accounts is None and 'userAccounts' in kwargs: + user_accounts = kwargs['userAccounts'] + + _setter("account_name", account_name) + _setter("node_agent_sku_id", node_agent_sku_id) + _setter("resource_group_name", resource_group_name) + _setter("storage_image_reference", storage_image_reference) + _setter("vm_size", vm_size) if auto_scale is not None: - pulumi.set(__self__, "auto_scale", auto_scale) + _setter("auto_scale", auto_scale) if certificates is not None: - pulumi.set(__self__, "certificates", certificates) + _setter("certificates", certificates) if container_configuration is not None: - pulumi.set(__self__, "container_configuration", container_configuration) + _setter("container_configuration", container_configuration) if data_disks is not None: - pulumi.set(__self__, "data_disks", data_disks) + _setter("data_disks", data_disks) if disk_encryptions is not None: - pulumi.set(__self__, "disk_encryptions", disk_encryptions) + _setter("disk_encryptions", disk_encryptions) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if fixed_scale is not None: - pulumi.set(__self__, "fixed_scale", fixed_scale) + _setter("fixed_scale", fixed_scale) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if inter_node_communication is not None: - pulumi.set(__self__, "inter_node_communication", inter_node_communication) + _setter("inter_node_communication", inter_node_communication) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if max_tasks_per_node is not None: - pulumi.set(__self__, "max_tasks_per_node", max_tasks_per_node) + _setter("max_tasks_per_node", max_tasks_per_node) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if mounts is not None: - pulumi.set(__self__, "mounts", mounts) + _setter("mounts", mounts) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_configuration is not None: - pulumi.set(__self__, "network_configuration", network_configuration) + _setter("network_configuration", network_configuration) if node_placements is not None: - pulumi.set(__self__, "node_placements", node_placements) + _setter("node_placements", node_placements) if os_disk_placement is not None: - pulumi.set(__self__, "os_disk_placement", os_disk_placement) + _setter("os_disk_placement", os_disk_placement) if start_task is not None: - pulumi.set(__self__, "start_task", start_task) + _setter("start_task", start_task) if stop_pending_resize_operation is not None: - pulumi.set(__self__, "stop_pending_resize_operation", stop_pending_resize_operation) + _setter("stop_pending_resize_operation", stop_pending_resize_operation) if target_node_communication_mode is not None: - pulumi.set(__self__, "target_node_communication_mode", target_node_communication_mode) + _setter("target_node_communication_mode", target_node_communication_mode) if task_scheduling_policies is not None: - pulumi.set(__self__, "task_scheduling_policies", task_scheduling_policies) + _setter("task_scheduling_policies", task_scheduling_policies) if user_accounts is not None: - pulumi.set(__self__, "user_accounts", user_accounts) + _setter("user_accounts", user_accounts) if windows is not None: - pulumi.set(__self__, "windows", windows) + _setter("windows", windows) @property @pulumi.getter(name="accountName") @@ -556,64 +677,175 @@ def __init__(__self__, *, > **Please Note:** `fixed_scale` and `auto_scale` blocks cannot be used both at the same time. """ + _PoolState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + auto_scale=auto_scale, + certificates=certificates, + container_configuration=container_configuration, + data_disks=data_disks, + disk_encryptions=disk_encryptions, + display_name=display_name, + extensions=extensions, + fixed_scale=fixed_scale, + identity=identity, + inter_node_communication=inter_node_communication, + license_type=license_type, + max_tasks_per_node=max_tasks_per_node, + metadata=metadata, + mounts=mounts, + name=name, + network_configuration=network_configuration, + node_agent_sku_id=node_agent_sku_id, + node_placements=node_placements, + os_disk_placement=os_disk_placement, + resource_group_name=resource_group_name, + start_task=start_task, + stop_pending_resize_operation=stop_pending_resize_operation, + storage_image_reference=storage_image_reference, + target_node_communication_mode=target_node_communication_mode, + task_scheduling_policies=task_scheduling_policies, + user_accounts=user_accounts, + vm_size=vm_size, + windows=windows, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + auto_scale: Optional[pulumi.Input['PoolAutoScaleArgs']] = None, + certificates: Optional[pulumi.Input[Sequence[pulumi.Input['PoolCertificateArgs']]]] = None, + container_configuration: Optional[pulumi.Input['PoolContainerConfigurationArgs']] = None, + data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['PoolDataDiskArgs']]]] = None, + disk_encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['PoolDiskEncryptionArgs']]]] = None, + display_name: Optional[pulumi.Input[str]] = None, + extensions: Optional[pulumi.Input[Sequence[pulumi.Input['PoolExtensionArgs']]]] = None, + fixed_scale: Optional[pulumi.Input['PoolFixedScaleArgs']] = None, + identity: Optional[pulumi.Input['PoolIdentityArgs']] = None, + inter_node_communication: Optional[pulumi.Input[str]] = None, + license_type: Optional[pulumi.Input[str]] = None, + max_tasks_per_node: Optional[pulumi.Input[int]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + mounts: Optional[pulumi.Input[Sequence[pulumi.Input['PoolMountArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + network_configuration: Optional[pulumi.Input['PoolNetworkConfigurationArgs']] = None, + node_agent_sku_id: Optional[pulumi.Input[str]] = None, + node_placements: Optional[pulumi.Input[Sequence[pulumi.Input['PoolNodePlacementArgs']]]] = None, + os_disk_placement: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + start_task: Optional[pulumi.Input['PoolStartTaskArgs']] = None, + stop_pending_resize_operation: Optional[pulumi.Input[bool]] = None, + storage_image_reference: Optional[pulumi.Input['PoolStorageImageReferenceArgs']] = None, + target_node_communication_mode: Optional[pulumi.Input[str]] = None, + task_scheduling_policies: Optional[pulumi.Input[Sequence[pulumi.Input['PoolTaskSchedulingPolicyArgs']]]] = None, + user_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['PoolUserAccountArgs']]]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + windows: Optional[pulumi.Input[Sequence[pulumi.Input['PoolWindowArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if auto_scale is None and 'autoScale' in kwargs: + auto_scale = kwargs['autoScale'] + if container_configuration is None and 'containerConfiguration' in kwargs: + container_configuration = kwargs['containerConfiguration'] + if data_disks is None and 'dataDisks' in kwargs: + data_disks = kwargs['dataDisks'] + if disk_encryptions is None and 'diskEncryptions' in kwargs: + disk_encryptions = kwargs['diskEncryptions'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if fixed_scale is None and 'fixedScale' in kwargs: + fixed_scale = kwargs['fixedScale'] + if inter_node_communication is None and 'interNodeCommunication' in kwargs: + inter_node_communication = kwargs['interNodeCommunication'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_tasks_per_node is None and 'maxTasksPerNode' in kwargs: + max_tasks_per_node = kwargs['maxTasksPerNode'] + if network_configuration is None and 'networkConfiguration' in kwargs: + network_configuration = kwargs['networkConfiguration'] + if node_agent_sku_id is None and 'nodeAgentSkuId' in kwargs: + node_agent_sku_id = kwargs['nodeAgentSkuId'] + if node_placements is None and 'nodePlacements' in kwargs: + node_placements = kwargs['nodePlacements'] + if os_disk_placement is None and 'osDiskPlacement' in kwargs: + os_disk_placement = kwargs['osDiskPlacement'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if start_task is None and 'startTask' in kwargs: + start_task = kwargs['startTask'] + if stop_pending_resize_operation is None and 'stopPendingResizeOperation' in kwargs: + stop_pending_resize_operation = kwargs['stopPendingResizeOperation'] + if storage_image_reference is None and 'storageImageReference' in kwargs: + storage_image_reference = kwargs['storageImageReference'] + if target_node_communication_mode is None and 'targetNodeCommunicationMode' in kwargs: + target_node_communication_mode = kwargs['targetNodeCommunicationMode'] + if task_scheduling_policies is None and 'taskSchedulingPolicies' in kwargs: + task_scheduling_policies = kwargs['taskSchedulingPolicies'] + if user_accounts is None and 'userAccounts' in kwargs: + user_accounts = kwargs['userAccounts'] + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if auto_scale is not None: - pulumi.set(__self__, "auto_scale", auto_scale) + _setter("auto_scale", auto_scale) if certificates is not None: - pulumi.set(__self__, "certificates", certificates) + _setter("certificates", certificates) if container_configuration is not None: - pulumi.set(__self__, "container_configuration", container_configuration) + _setter("container_configuration", container_configuration) if data_disks is not None: - pulumi.set(__self__, "data_disks", data_disks) + _setter("data_disks", data_disks) if disk_encryptions is not None: - pulumi.set(__self__, "disk_encryptions", disk_encryptions) + _setter("disk_encryptions", disk_encryptions) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if fixed_scale is not None: - pulumi.set(__self__, "fixed_scale", fixed_scale) + _setter("fixed_scale", fixed_scale) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if inter_node_communication is not None: - pulumi.set(__self__, "inter_node_communication", inter_node_communication) + _setter("inter_node_communication", inter_node_communication) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if max_tasks_per_node is not None: - pulumi.set(__self__, "max_tasks_per_node", max_tasks_per_node) + _setter("max_tasks_per_node", max_tasks_per_node) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if mounts is not None: - pulumi.set(__self__, "mounts", mounts) + _setter("mounts", mounts) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_configuration is not None: - pulumi.set(__self__, "network_configuration", network_configuration) + _setter("network_configuration", network_configuration) if node_agent_sku_id is not None: - pulumi.set(__self__, "node_agent_sku_id", node_agent_sku_id) + _setter("node_agent_sku_id", node_agent_sku_id) if node_placements is not None: - pulumi.set(__self__, "node_placements", node_placements) + _setter("node_placements", node_placements) if os_disk_placement is not None: - pulumi.set(__self__, "os_disk_placement", os_disk_placement) + _setter("os_disk_placement", os_disk_placement) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if start_task is not None: - pulumi.set(__self__, "start_task", start_task) + _setter("start_task", start_task) if stop_pending_resize_operation is not None: - pulumi.set(__self__, "stop_pending_resize_operation", stop_pending_resize_operation) + _setter("stop_pending_resize_operation", stop_pending_resize_operation) if storage_image_reference is not None: - pulumi.set(__self__, "storage_image_reference", storage_image_reference) + _setter("storage_image_reference", storage_image_reference) if target_node_communication_mode is not None: - pulumi.set(__self__, "target_node_communication_mode", target_node_communication_mode) + _setter("target_node_communication_mode", target_node_communication_mode) if task_scheduling_policies is not None: - pulumi.set(__self__, "task_scheduling_policies", task_scheduling_policies) + _setter("task_scheduling_policies", task_scheduling_policies) if user_accounts is not None: - pulumi.set(__self__, "user_accounts", user_accounts) + _setter("user_accounts", user_accounts) if vm_size is not None: - pulumi.set(__self__, "vm_size", vm_size) + _setter("vm_size", vm_size) if windows is not None: - pulumi.set(__self__, "windows", windows) + _setter("windows", windows) @property @pulumi.getter(name="accountName") @@ -1235,6 +1467,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PoolArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1281,14 +1517,34 @@ def _internal_init(__self__, if account_name is None and not opts.urn: raise TypeError("Missing required property 'account_name'") __props__.__dict__["account_name"] = account_name + if auto_scale is not None and not isinstance(auto_scale, PoolAutoScaleArgs): + auto_scale = auto_scale or {} + def _setter(key, value): + auto_scale[key] = value + PoolAutoScaleArgs._configure(_setter, **auto_scale) __props__.__dict__["auto_scale"] = auto_scale __props__.__dict__["certificates"] = certificates + if container_configuration is not None and not isinstance(container_configuration, PoolContainerConfigurationArgs): + container_configuration = container_configuration or {} + def _setter(key, value): + container_configuration[key] = value + PoolContainerConfigurationArgs._configure(_setter, **container_configuration) __props__.__dict__["container_configuration"] = container_configuration __props__.__dict__["data_disks"] = data_disks __props__.__dict__["disk_encryptions"] = disk_encryptions __props__.__dict__["display_name"] = display_name __props__.__dict__["extensions"] = extensions + if fixed_scale is not None and not isinstance(fixed_scale, PoolFixedScaleArgs): + fixed_scale = fixed_scale or {} + def _setter(key, value): + fixed_scale[key] = value + PoolFixedScaleArgs._configure(_setter, **fixed_scale) __props__.__dict__["fixed_scale"] = fixed_scale + if identity is not None and not isinstance(identity, PoolIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + PoolIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["inter_node_communication"] = inter_node_communication __props__.__dict__["license_type"] = license_type @@ -1296,6 +1552,11 @@ def _internal_init(__self__, __props__.__dict__["metadata"] = metadata __props__.__dict__["mounts"] = mounts __props__.__dict__["name"] = name + if network_configuration is not None and not isinstance(network_configuration, PoolNetworkConfigurationArgs): + network_configuration = network_configuration or {} + def _setter(key, value): + network_configuration[key] = value + PoolNetworkConfigurationArgs._configure(_setter, **network_configuration) __props__.__dict__["network_configuration"] = network_configuration if node_agent_sku_id is None and not opts.urn: raise TypeError("Missing required property 'node_agent_sku_id'") @@ -1305,8 +1566,18 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if start_task is not None and not isinstance(start_task, PoolStartTaskArgs): + start_task = start_task or {} + def _setter(key, value): + start_task[key] = value + PoolStartTaskArgs._configure(_setter, **start_task) __props__.__dict__["start_task"] = start_task __props__.__dict__["stop_pending_resize_operation"] = stop_pending_resize_operation + if storage_image_reference is not None and not isinstance(storage_image_reference, PoolStorageImageReferenceArgs): + storage_image_reference = storage_image_reference or {} + def _setter(key, value): + storage_image_reference[key] = value + PoolStorageImageReferenceArgs._configure(_setter, **storage_image_reference) if storage_image_reference is None and not opts.urn: raise TypeError("Missing required property 'storage_image_reference'") __props__.__dict__["storage_image_reference"] = storage_image_reference diff --git a/sdk/python/pulumi_azure/billing/_inputs.py b/sdk/python/pulumi_azure/billing/_inputs.py index aa194a7ecd..22f772bbc5 100644 --- a/sdk/python/pulumi_azure/billing/_inputs.py +++ b/sdk/python/pulumi_azure/billing/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -23,8 +23,27 @@ def __init__(__self__, *, :param pulumi.Input[str] time_frame: The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: `WeekToDate`, `MonthToDate`, `BillingMonthToDate`, `TheLast7Days`, `TheLastMonth`, `TheLastBillingMonth`, `Custom`. :param pulumi.Input[str] type: The type of the query. Possible values are `ActualCost`, `AmortizedCost` and `Usage`. """ - pulumi.set(__self__, "time_frame", time_frame) - pulumi.set(__self__, "type", type) + AccountCostManagementExportExportDataOptionsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + time_frame=time_frame, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time_frame: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time_frame is None and 'timeFrame' in kwargs: + time_frame = kwargs['timeFrame'] + if time_frame is None: + raise TypeError("Missing 'time_frame' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("time_frame", time_frame) + _setter("type", type) @property @pulumi.getter(name="timeFrame") @@ -62,8 +81,29 @@ def __init__(__self__, *, > **Note:** The Resource Manager ID of a Storage Container is exposed via the `resource_manager_id` attribute of the `storage.Container` resource. """ - pulumi.set(__self__, "container_id", container_id) - pulumi.set(__self__, "root_folder_path", root_folder_path) + AccountCostManagementExportExportDataStorageLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + root_folder_path=root_folder_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[pulumi.Input[str]] = None, + root_folder_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if root_folder_path is None and 'rootFolderPath' in kwargs: + root_folder_path = kwargs['rootFolderPath'] + if root_folder_path is None: + raise TypeError("Missing 'root_folder_path' argument") + + _setter("container_id", container_id) + _setter("root_folder_path", root_folder_path) @property @pulumi.getter(name="containerId") diff --git a/sdk/python/pulumi_azure/billing/account_cost_management_export.py b/sdk/python/pulumi_azure/billing/account_cost_management_export.py index a1fe195f37..7380870b88 100644 --- a/sdk/python/pulumi_azure/billing/account_cost_management_export.py +++ b/sdk/python/pulumi_azure/billing/account_cost_management_export.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,16 +35,65 @@ def __init__(__self__, *, :param pulumi.Input[bool] active: Is the cost management export active? Default is `true`. :param pulumi.Input[str] name: Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "billing_account_id", billing_account_id) - pulumi.set(__self__, "export_data_options", export_data_options) - pulumi.set(__self__, "export_data_storage_location", export_data_storage_location) - pulumi.set(__self__, "recurrence_period_end_date", recurrence_period_end_date) - pulumi.set(__self__, "recurrence_period_start_date", recurrence_period_start_date) - pulumi.set(__self__, "recurrence_type", recurrence_type) + AccountCostManagementExportArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + billing_account_id=billing_account_id, + export_data_options=export_data_options, + export_data_storage_location=export_data_storage_location, + recurrence_period_end_date=recurrence_period_end_date, + recurrence_period_start_date=recurrence_period_start_date, + recurrence_type=recurrence_type, + active=active, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + billing_account_id: Optional[pulumi.Input[str]] = None, + export_data_options: Optional[pulumi.Input['AccountCostManagementExportExportDataOptionsArgs']] = None, + export_data_storage_location: Optional[pulumi.Input['AccountCostManagementExportExportDataStorageLocationArgs']] = None, + recurrence_period_end_date: Optional[pulumi.Input[str]] = None, + recurrence_period_start_date: Optional[pulumi.Input[str]] = None, + recurrence_type: Optional[pulumi.Input[str]] = None, + active: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if billing_account_id is None and 'billingAccountId' in kwargs: + billing_account_id = kwargs['billingAccountId'] + if billing_account_id is None: + raise TypeError("Missing 'billing_account_id' argument") + if export_data_options is None and 'exportDataOptions' in kwargs: + export_data_options = kwargs['exportDataOptions'] + if export_data_options is None: + raise TypeError("Missing 'export_data_options' argument") + if export_data_storage_location is None and 'exportDataStorageLocation' in kwargs: + export_data_storage_location = kwargs['exportDataStorageLocation'] + if export_data_storage_location is None: + raise TypeError("Missing 'export_data_storage_location' argument") + if recurrence_period_end_date is None and 'recurrencePeriodEndDate' in kwargs: + recurrence_period_end_date = kwargs['recurrencePeriodEndDate'] + if recurrence_period_end_date is None: + raise TypeError("Missing 'recurrence_period_end_date' argument") + if recurrence_period_start_date is None and 'recurrencePeriodStartDate' in kwargs: + recurrence_period_start_date = kwargs['recurrencePeriodStartDate'] + if recurrence_period_start_date is None: + raise TypeError("Missing 'recurrence_period_start_date' argument") + if recurrence_type is None and 'recurrenceType' in kwargs: + recurrence_type = kwargs['recurrenceType'] + if recurrence_type is None: + raise TypeError("Missing 'recurrence_type' argument") + + _setter("billing_account_id", billing_account_id) + _setter("export_data_options", export_data_options) + _setter("export_data_storage_location", export_data_storage_location) + _setter("recurrence_period_end_date", recurrence_period_end_date) + _setter("recurrence_period_start_date", recurrence_period_start_date) + _setter("recurrence_type", recurrence_type) if active is not None: - pulumi.set(__self__, "active", active) + _setter("active", active) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="billingAccountId") @@ -165,22 +214,59 @@ def __init__(__self__, *, :param pulumi.Input[str] recurrence_period_start_date: The date the export will start capturing information. :param pulumi.Input[str] recurrence_type: How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. """ + _AccountCostManagementExportState._configure( + lambda key, value: pulumi.set(__self__, key, value), + active=active, + billing_account_id=billing_account_id, + export_data_options=export_data_options, + export_data_storage_location=export_data_storage_location, + name=name, + recurrence_period_end_date=recurrence_period_end_date, + recurrence_period_start_date=recurrence_period_start_date, + recurrence_type=recurrence_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active: Optional[pulumi.Input[bool]] = None, + billing_account_id: Optional[pulumi.Input[str]] = None, + export_data_options: Optional[pulumi.Input['AccountCostManagementExportExportDataOptionsArgs']] = None, + export_data_storage_location: Optional[pulumi.Input['AccountCostManagementExportExportDataStorageLocationArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + recurrence_period_end_date: Optional[pulumi.Input[str]] = None, + recurrence_period_start_date: Optional[pulumi.Input[str]] = None, + recurrence_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if billing_account_id is None and 'billingAccountId' in kwargs: + billing_account_id = kwargs['billingAccountId'] + if export_data_options is None and 'exportDataOptions' in kwargs: + export_data_options = kwargs['exportDataOptions'] + if export_data_storage_location is None and 'exportDataStorageLocation' in kwargs: + export_data_storage_location = kwargs['exportDataStorageLocation'] + if recurrence_period_end_date is None and 'recurrencePeriodEndDate' in kwargs: + recurrence_period_end_date = kwargs['recurrencePeriodEndDate'] + if recurrence_period_start_date is None and 'recurrencePeriodStartDate' in kwargs: + recurrence_period_start_date = kwargs['recurrencePeriodStartDate'] + if recurrence_type is None and 'recurrenceType' in kwargs: + recurrence_type = kwargs['recurrenceType'] + if active is not None: - pulumi.set(__self__, "active", active) + _setter("active", active) if billing_account_id is not None: - pulumi.set(__self__, "billing_account_id", billing_account_id) + _setter("billing_account_id", billing_account_id) if export_data_options is not None: - pulumi.set(__self__, "export_data_options", export_data_options) + _setter("export_data_options", export_data_options) if export_data_storage_location is not None: - pulumi.set(__self__, "export_data_storage_location", export_data_storage_location) + _setter("export_data_storage_location", export_data_storage_location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recurrence_period_end_date is not None: - pulumi.set(__self__, "recurrence_period_end_date", recurrence_period_end_date) + _setter("recurrence_period_end_date", recurrence_period_end_date) if recurrence_period_start_date is not None: - pulumi.set(__self__, "recurrence_period_start_date", recurrence_period_start_date) + _setter("recurrence_period_start_date", recurrence_period_start_date) if recurrence_type is not None: - pulumi.set(__self__, "recurrence_type", recurrence_type) + _setter("recurrence_type", recurrence_type) @property @pulumi.getter @@ -398,6 +484,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountCostManagementExportArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -424,9 +514,19 @@ def _internal_init(__self__, if billing_account_id is None and not opts.urn: raise TypeError("Missing required property 'billing_account_id'") __props__.__dict__["billing_account_id"] = billing_account_id + if export_data_options is not None and not isinstance(export_data_options, AccountCostManagementExportExportDataOptionsArgs): + export_data_options = export_data_options or {} + def _setter(key, value): + export_data_options[key] = value + AccountCostManagementExportExportDataOptionsArgs._configure(_setter, **export_data_options) if export_data_options is None and not opts.urn: raise TypeError("Missing required property 'export_data_options'") __props__.__dict__["export_data_options"] = export_data_options + if export_data_storage_location is not None and not isinstance(export_data_storage_location, AccountCostManagementExportExportDataStorageLocationArgs): + export_data_storage_location = export_data_storage_location or {} + def _setter(key, value): + export_data_storage_location[key] = value + AccountCostManagementExportExportDataStorageLocationArgs._configure(_setter, **export_data_storage_location) if export_data_storage_location is None and not opts.urn: raise TypeError("Missing required property 'export_data_storage_location'") __props__.__dict__["export_data_storage_location"] = export_data_storage_location diff --git a/sdk/python/pulumi_azure/billing/get_enrollment_account_scope.py b/sdk/python/pulumi_azure/billing/get_enrollment_account_scope.py index ff386a14c5..cb6789f732 100644 --- a/sdk/python/pulumi_azure/billing/get_enrollment_account_scope.py +++ b/sdk/python/pulumi_azure/billing/get_enrollment_account_scope.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/billing/get_mca_account_scope.py b/sdk/python/pulumi_azure/billing/get_mca_account_scope.py index 554bc64526..524dc77655 100644 --- a/sdk/python/pulumi_azure/billing/get_mca_account_scope.py +++ b/sdk/python/pulumi_azure/billing/get_mca_account_scope.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/billing/get_mpa_account_scope.py b/sdk/python/pulumi_azure/billing/get_mpa_account_scope.py index a8142c1a0a..c721cce1d4 100644 --- a/sdk/python/pulumi_azure/billing/get_mpa_account_scope.py +++ b/sdk/python/pulumi_azure/billing/get_mpa_account_scope.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/billing/outputs.py b/sdk/python/pulumi_azure/billing/outputs.py index 01b0603f99..872af53b04 100644 --- a/sdk/python/pulumi_azure/billing/outputs.py +++ b/sdk/python/pulumi_azure/billing/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -40,8 +40,27 @@ def __init__(__self__, *, :param str time_frame: The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: `WeekToDate`, `MonthToDate`, `BillingMonthToDate`, `TheLast7Days`, `TheLastMonth`, `TheLastBillingMonth`, `Custom`. :param str type: The type of the query. Possible values are `ActualCost`, `AmortizedCost` and `Usage`. """ - pulumi.set(__self__, "time_frame", time_frame) - pulumi.set(__self__, "type", type) + AccountCostManagementExportExportDataOptions._configure( + lambda key, value: pulumi.set(__self__, key, value), + time_frame=time_frame, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time_frame: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time_frame is None and 'timeFrame' in kwargs: + time_frame = kwargs['timeFrame'] + if time_frame is None: + raise TypeError("Missing 'time_frame' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("time_frame", time_frame) + _setter("type", type) @property @pulumi.getter(name="timeFrame") @@ -90,8 +109,29 @@ def __init__(__self__, *, > **Note:** The Resource Manager ID of a Storage Container is exposed via the `resource_manager_id` attribute of the `storage.Container` resource. """ - pulumi.set(__self__, "container_id", container_id) - pulumi.set(__self__, "root_folder_path", root_folder_path) + AccountCostManagementExportExportDataStorageLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + root_folder_path=root_folder_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[str] = None, + root_folder_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if root_folder_path is None and 'rootFolderPath' in kwargs: + root_folder_path = kwargs['rootFolderPath'] + if root_folder_path is None: + raise TypeError("Missing 'root_folder_path' argument") + + _setter("container_id", container_id) + _setter("root_folder_path", root_folder_path) @property @pulumi.getter(name="containerId") diff --git a/sdk/python/pulumi_azure/blueprint/_inputs.py b/sdk/python/pulumi_azure/blueprint/_inputs.py index c536aa8692..d67c2d2472 100644 --- a/sdk/python/pulumi_azure/blueprint/_inputs.py +++ b/sdk/python/pulumi_azure/blueprint/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -24,13 +24,38 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that should be configured on this Blueprint. Possible values are `SystemAssigned` and `UserAssigned`. :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: Specifies a list of User Assigned Managed Identity IDs to be assigned to this Blueprint. """ - pulumi.set(__self__, "type", type) + AssignmentIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/blueprint/assignment.py b/sdk/python/pulumi_azure/blueprint/assignment.py index f2f79d3ead..aba1abfe16 100644 --- a/sdk/python/pulumi_azure/blueprint/assignment.py +++ b/sdk/python/pulumi_azure/blueprint/assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,23 +43,72 @@ def __init__(__self__, *, > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail. """ - pulumi.set(__self__, "identity", identity) - pulumi.set(__self__, "target_subscription_id", target_subscription_id) - pulumi.set(__self__, "version_id", version_id) + AssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity=identity, + target_subscription_id=target_subscription_id, + version_id=version_id, + location=location, + lock_exclude_actions=lock_exclude_actions, + lock_exclude_principals=lock_exclude_principals, + lock_mode=lock_mode, + name=name, + parameter_values=parameter_values, + resource_groups=resource_groups, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity: Optional[pulumi.Input['AssignmentIdentityArgs']] = None, + target_subscription_id: Optional[pulumi.Input[str]] = None, + version_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + lock_exclude_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + lock_exclude_principals: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + lock_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameter_values: Optional[pulumi.Input[str]] = None, + resource_groups: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity is None: + raise TypeError("Missing 'identity' argument") + if target_subscription_id is None and 'targetSubscriptionId' in kwargs: + target_subscription_id = kwargs['targetSubscriptionId'] + if target_subscription_id is None: + raise TypeError("Missing 'target_subscription_id' argument") + if version_id is None and 'versionId' in kwargs: + version_id = kwargs['versionId'] + if version_id is None: + raise TypeError("Missing 'version_id' argument") + if lock_exclude_actions is None and 'lockExcludeActions' in kwargs: + lock_exclude_actions = kwargs['lockExcludeActions'] + if lock_exclude_principals is None and 'lockExcludePrincipals' in kwargs: + lock_exclude_principals = kwargs['lockExcludePrincipals'] + if lock_mode is None and 'lockMode' in kwargs: + lock_mode = kwargs['lockMode'] + if parameter_values is None and 'parameterValues' in kwargs: + parameter_values = kwargs['parameterValues'] + if resource_groups is None and 'resourceGroups' in kwargs: + resource_groups = kwargs['resourceGroups'] + + _setter("identity", identity) + _setter("target_subscription_id", target_subscription_id) + _setter("version_id", version_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if lock_exclude_actions is not None: - pulumi.set(__self__, "lock_exclude_actions", lock_exclude_actions) + _setter("lock_exclude_actions", lock_exclude_actions) if lock_exclude_principals is not None: - pulumi.set(__self__, "lock_exclude_principals", lock_exclude_principals) + _setter("lock_exclude_principals", lock_exclude_principals) if lock_mode is not None: - pulumi.set(__self__, "lock_mode", lock_mode) + _setter("lock_mode", lock_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameter_values is not None: - pulumi.set(__self__, "parameter_values", parameter_values) + _setter("parameter_values", parameter_values) if resource_groups is not None: - pulumi.set(__self__, "resource_groups", resource_groups) + _setter("resource_groups", resource_groups) @property @pulumi.getter @@ -224,34 +273,89 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that should be configured on this Blueprint. Possible values are `SystemAssigned` and `UserAssigned`. :param pulumi.Input[str] version_id: The ID of the Published Version of the blueprint to be assigned. """ + _AssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + blueprint_name=blueprint_name, + description=description, + display_name=display_name, + identity=identity, + location=location, + lock_exclude_actions=lock_exclude_actions, + lock_exclude_principals=lock_exclude_principals, + lock_mode=lock_mode, + name=name, + parameter_values=parameter_values, + resource_groups=resource_groups, + target_subscription_id=target_subscription_id, + type=type, + version_id=version_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blueprint_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['AssignmentIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + lock_exclude_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + lock_exclude_principals: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + lock_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameter_values: Optional[pulumi.Input[str]] = None, + resource_groups: Optional[pulumi.Input[str]] = None, + target_subscription_id: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + version_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blueprint_name is None and 'blueprintName' in kwargs: + blueprint_name = kwargs['blueprintName'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if lock_exclude_actions is None and 'lockExcludeActions' in kwargs: + lock_exclude_actions = kwargs['lockExcludeActions'] + if lock_exclude_principals is None and 'lockExcludePrincipals' in kwargs: + lock_exclude_principals = kwargs['lockExcludePrincipals'] + if lock_mode is None and 'lockMode' in kwargs: + lock_mode = kwargs['lockMode'] + if parameter_values is None and 'parameterValues' in kwargs: + parameter_values = kwargs['parameterValues'] + if resource_groups is None and 'resourceGroups' in kwargs: + resource_groups = kwargs['resourceGroups'] + if target_subscription_id is None and 'targetSubscriptionId' in kwargs: + target_subscription_id = kwargs['targetSubscriptionId'] + if version_id is None and 'versionId' in kwargs: + version_id = kwargs['versionId'] + if blueprint_name is not None: - pulumi.set(__self__, "blueprint_name", blueprint_name) + _setter("blueprint_name", blueprint_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if lock_exclude_actions is not None: - pulumi.set(__self__, "lock_exclude_actions", lock_exclude_actions) + _setter("lock_exclude_actions", lock_exclude_actions) if lock_exclude_principals is not None: - pulumi.set(__self__, "lock_exclude_principals", lock_exclude_principals) + _setter("lock_exclude_principals", lock_exclude_principals) if lock_mode is not None: - pulumi.set(__self__, "lock_mode", lock_mode) + _setter("lock_mode", lock_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameter_values is not None: - pulumi.set(__self__, "parameter_values", parameter_values) + _setter("parameter_values", parameter_values) if resource_groups is not None: - pulumi.set(__self__, "resource_groups", resource_groups) + _setter("resource_groups", resource_groups) if target_subscription_id is not None: - pulumi.set(__self__, "target_subscription_id", target_subscription_id) + _setter("target_subscription_id", target_subscription_id) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if version_id is not None: - pulumi.set(__self__, "version_id", version_id) + _setter("version_id", version_id) @property @pulumi.getter(name="blueprintName") @@ -619,6 +723,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -643,6 +751,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = AssignmentArgs.__new__(AssignmentArgs) + if identity is not None and not isinstance(identity, AssignmentIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + AssignmentIdentityArgs._configure(_setter, **identity) if identity is None and not opts.urn: raise TypeError("Missing required property 'identity'") __props__.__dict__["identity"] = identity diff --git a/sdk/python/pulumi_azure/blueprint/get_definition.py b/sdk/python/pulumi_azure/blueprint/get_definition.py index 5ab1bd2075..537ad26899 100644 --- a/sdk/python/pulumi_azure/blueprint/get_definition.py +++ b/sdk/python/pulumi_azure/blueprint/get_definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/blueprint/get_published_version.py b/sdk/python/pulumi_azure/blueprint/get_published_version.py index 98b0a963e1..9972355dd0 100644 --- a/sdk/python/pulumi_azure/blueprint/get_published_version.py +++ b/sdk/python/pulumi_azure/blueprint/get_published_version.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/blueprint/outputs.py b/sdk/python/pulumi_azure/blueprint/outputs.py index 2b0cd30083..7e1e47336e 100644 --- a/sdk/python/pulumi_azure/blueprint/outputs.py +++ b/sdk/python/pulumi_azure/blueprint/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -45,13 +45,38 @@ def __init__(__self__, *, :param str type: Specifies the type of Managed Service Identity that should be configured on this Blueprint. Possible values are `SystemAssigned` and `UserAssigned`. :param Sequence[str] identity_ids: Specifies a list of User Assigned Managed Identity IDs to be assigned to this Blueprint. """ - pulumi.set(__self__, "type", type) + AssignmentIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/bot/_inputs.py b/sdk/python/pulumi_azure/bot/_inputs.py index 24c792ad24..b14d34a2b2 100644 --- a/sdk/python/pulumi_azure/bot/_inputs.py +++ b/sdk/python/pulumi_azure/bot/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -45,29 +45,78 @@ def __init__(__self__, *, :param pulumi.Input[bool] v1_allowed: Enables v1 of the Directline protocol for this site. Enabled by default Defaults to `true`. :param pulumi.Input[bool] v3_allowed: Enables v3 of the Directline protocol for this site. Enabled by default Defaults to `true`. """ - pulumi.set(__self__, "name", name) + ChannelDirectLineSiteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + enabled=enabled, + endpoint_parameters_enabled=endpoint_parameters_enabled, + enhanced_authentication_enabled=enhanced_authentication_enabled, + id=id, + key=key, + key2=key2, + storage_enabled=storage_enabled, + trusted_origins=trusted_origins, + user_upload_enabled=user_upload_enabled, + v1_allowed=v1_allowed, + v3_allowed=v3_allowed, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + endpoint_parameters_enabled: Optional[pulumi.Input[bool]] = None, + enhanced_authentication_enabled: Optional[pulumi.Input[bool]] = None, + id: Optional[pulumi.Input[str]] = None, + key: Optional[pulumi.Input[str]] = None, + key2: Optional[pulumi.Input[str]] = None, + storage_enabled: Optional[pulumi.Input[bool]] = None, + trusted_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_upload_enabled: Optional[pulumi.Input[bool]] = None, + v1_allowed: Optional[pulumi.Input[bool]] = None, + v3_allowed: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if endpoint_parameters_enabled is None and 'endpointParametersEnabled' in kwargs: + endpoint_parameters_enabled = kwargs['endpointParametersEnabled'] + if enhanced_authentication_enabled is None and 'enhancedAuthenticationEnabled' in kwargs: + enhanced_authentication_enabled = kwargs['enhancedAuthenticationEnabled'] + if storage_enabled is None and 'storageEnabled' in kwargs: + storage_enabled = kwargs['storageEnabled'] + if trusted_origins is None and 'trustedOrigins' in kwargs: + trusted_origins = kwargs['trustedOrigins'] + if user_upload_enabled is None and 'userUploadEnabled' in kwargs: + user_upload_enabled = kwargs['userUploadEnabled'] + if v1_allowed is None and 'v1Allowed' in kwargs: + v1_allowed = kwargs['v1Allowed'] + if v3_allowed is None and 'v3Allowed' in kwargs: + v3_allowed = kwargs['v3Allowed'] + + _setter("name", name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if endpoint_parameters_enabled is not None: - pulumi.set(__self__, "endpoint_parameters_enabled", endpoint_parameters_enabled) + _setter("endpoint_parameters_enabled", endpoint_parameters_enabled) if enhanced_authentication_enabled is not None: - pulumi.set(__self__, "enhanced_authentication_enabled", enhanced_authentication_enabled) + _setter("enhanced_authentication_enabled", enhanced_authentication_enabled) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if key2 is not None: - pulumi.set(__self__, "key2", key2) + _setter("key2", key2) if storage_enabled is not None: - pulumi.set(__self__, "storage_enabled", storage_enabled) + _setter("storage_enabled", storage_enabled) if trusted_origins is not None: - pulumi.set(__self__, "trusted_origins", trusted_origins) + _setter("trusted_origins", trusted_origins) if user_upload_enabled is not None: - pulumi.set(__self__, "user_upload_enabled", user_upload_enabled) + _setter("user_upload_enabled", user_upload_enabled) if v1_allowed is not None: - pulumi.set(__self__, "v1_allowed", v1_allowed) + _setter("v1_allowed", v1_allowed) if v3_allowed is not None: - pulumi.set(__self__, "v3_allowed", v3_allowed) + _setter("v3_allowed", v3_allowed) @property @pulumi.getter @@ -223,8 +272,27 @@ def __init__(__self__, *, :param pulumi.Input[str] access_token: The Facebook Page Access Token for the Facebook Channel. :param pulumi.Input[str] id: The Facebook Page ID for the Facebook Channel. """ - pulumi.set(__self__, "access_token", access_token) - pulumi.set(__self__, "id", id) + ChannelFacebookPageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_token=access_token, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_token: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_token is None and 'accessToken' in kwargs: + access_token = kwargs['accessToken'] + if access_token is None: + raise TypeError("Missing 'access_token' argument") + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("access_token", access_token) + _setter("id", id) @property @pulumi.getter(name="accessToken") @@ -260,8 +328,27 @@ def __init__(__self__, *, :param pulumi.Input[str] access_token: The access token which is used to call the Line Channel API. :param pulumi.Input[str] secret: The secret which is used to access the Line Channel. """ - pulumi.set(__self__, "access_token", access_token) - pulumi.set(__self__, "secret", secret) + ChannelLineLineChannelArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_token=access_token, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_token: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_token is None and 'accessToken' in kwargs: + access_token = kwargs['accessToken'] + if access_token is None: + raise TypeError("Missing 'access_token' argument") + if secret is None: + raise TypeError("Missing 'secret' argument") + + _setter("access_token", access_token) + _setter("secret", secret) @property @pulumi.getter(name="accessToken") @@ -301,13 +388,38 @@ def __init__(__self__, *, :param pulumi.Input[bool] storage_enabled: Is the storage site enabled for detailed logging? Defaults to `true`. :param pulumi.Input[bool] user_upload_enabled: Is the user upload enabled for this site? Defaults to `true`. """ - pulumi.set(__self__, "name", name) + ChannelWebChatSiteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + endpoint_parameters_enabled=endpoint_parameters_enabled, + storage_enabled=storage_enabled, + user_upload_enabled=user_upload_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + endpoint_parameters_enabled: Optional[pulumi.Input[bool]] = None, + storage_enabled: Optional[pulumi.Input[bool]] = None, + user_upload_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if endpoint_parameters_enabled is None and 'endpointParametersEnabled' in kwargs: + endpoint_parameters_enabled = kwargs['endpointParametersEnabled'] + if storage_enabled is None and 'storageEnabled' in kwargs: + storage_enabled = kwargs['storageEnabled'] + if user_upload_enabled is None and 'userUploadEnabled' in kwargs: + user_upload_enabled = kwargs['userUploadEnabled'] + + _setter("name", name) if endpoint_parameters_enabled is not None: - pulumi.set(__self__, "endpoint_parameters_enabled", endpoint_parameters_enabled) + _setter("endpoint_parameters_enabled", endpoint_parameters_enabled) if storage_enabled is not None: - pulumi.set(__self__, "storage_enabled", storage_enabled) + _setter("storage_enabled", storage_enabled) if user_upload_enabled is not None: - pulumi.set(__self__, "user_upload_enabled", user_upload_enabled) + _setter("user_upload_enabled", user_upload_enabled) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/bot/channel_alexa.py b/sdk/python/pulumi_azure/bot/channel_alexa.py index 131d429b58..2a08941271 100644 --- a/sdk/python/pulumi_azure/bot/channel_alexa.py +++ b/sdk/python/pulumi_azure/bot/channel_alexa.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ChannelAlexaArgs', 'ChannelAlexa'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] skill_id: The Alexa skill ID for the Alexa Channel. :param pulumi.Input[str] location: The supported Azure location where the resource exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "bot_name", bot_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "skill_id", skill_id) + ChannelAlexaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + resource_group_name=resource_group_name, + skill_id=skill_id, + location=location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + skill_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if bot_name is None: + raise TypeError("Missing 'bot_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if skill_id is None and 'skillId' in kwargs: + skill_id = kwargs['skillId'] + if skill_id is None: + raise TypeError("Missing 'skill_id' argument") + + _setter("bot_name", bot_name) + _setter("resource_group_name", resource_group_name) + _setter("skill_id", skill_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) @property @pulumi.getter(name="botName") @@ -94,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group where the Alexa Channel should be created. Changing this forces a new resource to be created. :param pulumi.Input[str] skill_id: The Alexa skill ID for the Alexa Channel. """ + _ChannelAlexaState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + location=location, + resource_group_name=resource_group_name, + skill_id=skill_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + skill_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if skill_id is None and 'skillId' in kwargs: + skill_id = kwargs['skillId'] + if bot_name is not None: - pulumi.set(__self__, "bot_name", bot_name) + _setter("bot_name", bot_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if skill_id is not None: - pulumi.set(__self__, "skill_id", skill_id) + _setter("skill_id", skill_id) @property @pulumi.getter(name="botName") @@ -251,6 +303,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ChannelAlexaArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/channel_direct_line.py b/sdk/python/pulumi_azure/bot/channel_direct_line.py index 523576ba8c..4e1c3fc2a0 100644 --- a/sdk/python/pulumi_azure/bot/channel_direct_line.py +++ b/sdk/python/pulumi_azure/bot/channel_direct_line.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,11 +27,38 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ChannelDirectLineSiteArgs']]] sites: A site represents a client application that you want to connect to your bot. Multiple `site` blocks may be defined as below :param pulumi.Input[str] location: The supported Azure location where the resource exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "bot_name", bot_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sites", sites) + ChannelDirectLineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + resource_group_name=resource_group_name, + sites=sites, + location=location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sites: Optional[pulumi.Input[Sequence[pulumi.Input['ChannelDirectLineSiteArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if bot_name is None: + raise TypeError("Missing 'bot_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sites is None: + raise TypeError("Missing 'sites' argument") + + _setter("bot_name", bot_name) + _setter("resource_group_name", resource_group_name) + _setter("sites", sites) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) @property @pulumi.getter(name="botName") @@ -96,14 +123,35 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['ChannelDirectLineSiteArgs']]] sites: A site represents a client application that you want to connect to your bot. Multiple `site` blocks may be defined as below """ + _ChannelDirectLineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + location=location, + resource_group_name=resource_group_name, + sites=sites, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sites: Optional[pulumi.Input[Sequence[pulumi.Input['ChannelDirectLineSiteArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if bot_name is not None: - pulumi.set(__self__, "bot_name", bot_name) + _setter("bot_name", bot_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sites is not None: - pulumi.set(__self__, "sites", sites) + _setter("sites", sites) @property @pulumi.getter(name="botName") @@ -255,6 +303,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ChannelDirectLineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/channel_direct_line_speech.py b/sdk/python/pulumi_azure/bot/channel_direct_line_speech.py index 6734a6e6b4..cfe6fc2ec3 100644 --- a/sdk/python/pulumi_azure/bot/channel_direct_line_speech.py +++ b/sdk/python/pulumi_azure/bot/channel_direct_line_speech.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ChannelDirectLineSpeechArgs', 'ChannelDirectLineSpeech'] @@ -33,18 +33,65 @@ def __init__(__self__, *, :param pulumi.Input[str] custom_voice_deployment_id: The custom voice deployment id for the Direct Line Speech Channel. :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "bot_name", bot_name) - pulumi.set(__self__, "cognitive_service_access_key", cognitive_service_access_key) - pulumi.set(__self__, "cognitive_service_location", cognitive_service_location) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ChannelDirectLineSpeechArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + cognitive_service_access_key=cognitive_service_access_key, + cognitive_service_location=cognitive_service_location, + resource_group_name=resource_group_name, + cognitive_account_id=cognitive_account_id, + custom_speech_model_id=custom_speech_model_id, + custom_voice_deployment_id=custom_voice_deployment_id, + location=location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + cognitive_service_access_key: Optional[pulumi.Input[str]] = None, + cognitive_service_location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + cognitive_account_id: Optional[pulumi.Input[str]] = None, + custom_speech_model_id: Optional[pulumi.Input[str]] = None, + custom_voice_deployment_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if bot_name is None: + raise TypeError("Missing 'bot_name' argument") + if cognitive_service_access_key is None and 'cognitiveServiceAccessKey' in kwargs: + cognitive_service_access_key = kwargs['cognitiveServiceAccessKey'] + if cognitive_service_access_key is None: + raise TypeError("Missing 'cognitive_service_access_key' argument") + if cognitive_service_location is None and 'cognitiveServiceLocation' in kwargs: + cognitive_service_location = kwargs['cognitiveServiceLocation'] + if cognitive_service_location is None: + raise TypeError("Missing 'cognitive_service_location' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if cognitive_account_id is None and 'cognitiveAccountId' in kwargs: + cognitive_account_id = kwargs['cognitiveAccountId'] + if custom_speech_model_id is None and 'customSpeechModelId' in kwargs: + custom_speech_model_id = kwargs['customSpeechModelId'] + if custom_voice_deployment_id is None and 'customVoiceDeploymentId' in kwargs: + custom_voice_deployment_id = kwargs['customVoiceDeploymentId'] + + _setter("bot_name", bot_name) + _setter("cognitive_service_access_key", cognitive_service_access_key) + _setter("cognitive_service_location", cognitive_service_location) + _setter("resource_group_name", resource_group_name) if cognitive_account_id is not None: - pulumi.set(__self__, "cognitive_account_id", cognitive_account_id) + _setter("cognitive_account_id", cognitive_account_id) if custom_speech_model_id is not None: - pulumi.set(__self__, "custom_speech_model_id", custom_speech_model_id) + _setter("custom_speech_model_id", custom_speech_model_id) if custom_voice_deployment_id is not None: - pulumi.set(__self__, "custom_voice_deployment_id", custom_voice_deployment_id) + _setter("custom_voice_deployment_id", custom_voice_deployment_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) @property @pulumi.getter(name="botName") @@ -165,22 +212,61 @@ def __init__(__self__, *, :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group where the Direct Line Speech Channel should be created. Changing this forces a new resource to be created. """ + _ChannelDirectLineSpeechState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + cognitive_account_id=cognitive_account_id, + cognitive_service_access_key=cognitive_service_access_key, + cognitive_service_location=cognitive_service_location, + custom_speech_model_id=custom_speech_model_id, + custom_voice_deployment_id=custom_voice_deployment_id, + location=location, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + cognitive_account_id: Optional[pulumi.Input[str]] = None, + cognitive_service_access_key: Optional[pulumi.Input[str]] = None, + cognitive_service_location: Optional[pulumi.Input[str]] = None, + custom_speech_model_id: Optional[pulumi.Input[str]] = None, + custom_voice_deployment_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if cognitive_account_id is None and 'cognitiveAccountId' in kwargs: + cognitive_account_id = kwargs['cognitiveAccountId'] + if cognitive_service_access_key is None and 'cognitiveServiceAccessKey' in kwargs: + cognitive_service_access_key = kwargs['cognitiveServiceAccessKey'] + if cognitive_service_location is None and 'cognitiveServiceLocation' in kwargs: + cognitive_service_location = kwargs['cognitiveServiceLocation'] + if custom_speech_model_id is None and 'customSpeechModelId' in kwargs: + custom_speech_model_id = kwargs['customSpeechModelId'] + if custom_voice_deployment_id is None and 'customVoiceDeploymentId' in kwargs: + custom_voice_deployment_id = kwargs['customVoiceDeploymentId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if bot_name is not None: - pulumi.set(__self__, "bot_name", bot_name) + _setter("bot_name", bot_name) if cognitive_account_id is not None: - pulumi.set(__self__, "cognitive_account_id", cognitive_account_id) + _setter("cognitive_account_id", cognitive_account_id) if cognitive_service_access_key is not None: - pulumi.set(__self__, "cognitive_service_access_key", cognitive_service_access_key) + _setter("cognitive_service_access_key", cognitive_service_access_key) if cognitive_service_location is not None: - pulumi.set(__self__, "cognitive_service_location", cognitive_service_location) + _setter("cognitive_service_location", cognitive_service_location) if custom_speech_model_id is not None: - pulumi.set(__self__, "custom_speech_model_id", custom_speech_model_id) + _setter("custom_speech_model_id", custom_speech_model_id) if custom_voice_deployment_id is not None: - pulumi.set(__self__, "custom_voice_deployment_id", custom_voice_deployment_id) + _setter("custom_voice_deployment_id", custom_voice_deployment_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="botName") @@ -394,6 +480,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ChannelDirectLineSpeechArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/channel_email.py b/sdk/python/pulumi_azure/bot/channel_email.py index 025aae90f1..1d0224d623 100644 --- a/sdk/python/pulumi_azure/bot/channel_email.py +++ b/sdk/python/pulumi_azure/bot/channel_email.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ChannelEmailArgs', 'ChannelEmail'] @@ -27,12 +27,47 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created. :param pulumi.Input[str] location: The supported Azure location where the resource exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "bot_name", bot_name) - pulumi.set(__self__, "email_address", email_address) - pulumi.set(__self__, "email_password", email_password) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ChannelEmailArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + email_address=email_address, + email_password=email_password, + resource_group_name=resource_group_name, + location=location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + email_address: Optional[pulumi.Input[str]] = None, + email_password: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if bot_name is None: + raise TypeError("Missing 'bot_name' argument") + if email_address is None and 'emailAddress' in kwargs: + email_address = kwargs['emailAddress'] + if email_address is None: + raise TypeError("Missing 'email_address' argument") + if email_password is None and 'emailPassword' in kwargs: + email_password = kwargs['emailPassword'] + if email_password is None: + raise TypeError("Missing 'email_password' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("bot_name", bot_name) + _setter("email_address", email_address) + _setter("email_password", email_password) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) @property @pulumi.getter(name="botName") @@ -111,16 +146,43 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The supported Azure location where the resource exists. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created. """ + _ChannelEmailState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + email_address=email_address, + email_password=email_password, + location=location, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + email_address: Optional[pulumi.Input[str]] = None, + email_password: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if email_address is None and 'emailAddress' in kwargs: + email_address = kwargs['emailAddress'] + if email_password is None and 'emailPassword' in kwargs: + email_password = kwargs['emailPassword'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if bot_name is not None: - pulumi.set(__self__, "bot_name", bot_name) + _setter("bot_name", bot_name) if email_address is not None: - pulumi.set(__self__, "email_address", email_address) + _setter("email_address", email_address) if email_password is not None: - pulumi.set(__self__, "email_password", email_password) + _setter("email_password", email_password) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="botName") @@ -286,6 +348,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ChannelEmailArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/channel_facebook.py b/sdk/python/pulumi_azure/bot/channel_facebook.py index 81e1067047..4fa1bb3a13 100644 --- a/sdk/python/pulumi_azure/bot/channel_facebook.py +++ b/sdk/python/pulumi_azure/bot/channel_facebook.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,13 +31,52 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group where the Facebook Channel should be created. Changing this forces a new resource to be created. :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "bot_name", bot_name) - pulumi.set(__self__, "facebook_application_id", facebook_application_id) - pulumi.set(__self__, "facebook_application_secret", facebook_application_secret) - pulumi.set(__self__, "pages", pages) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ChannelFacebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + facebook_application_id=facebook_application_id, + facebook_application_secret=facebook_application_secret, + pages=pages, + resource_group_name=resource_group_name, + location=location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + facebook_application_id: Optional[pulumi.Input[str]] = None, + facebook_application_secret: Optional[pulumi.Input[str]] = None, + pages: Optional[pulumi.Input[Sequence[pulumi.Input['ChannelFacebookPageArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if bot_name is None: + raise TypeError("Missing 'bot_name' argument") + if facebook_application_id is None and 'facebookApplicationId' in kwargs: + facebook_application_id = kwargs['facebookApplicationId'] + if facebook_application_id is None: + raise TypeError("Missing 'facebook_application_id' argument") + if facebook_application_secret is None and 'facebookApplicationSecret' in kwargs: + facebook_application_secret = kwargs['facebookApplicationSecret'] + if facebook_application_secret is None: + raise TypeError("Missing 'facebook_application_secret' argument") + if pages is None: + raise TypeError("Missing 'pages' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("bot_name", bot_name) + _setter("facebook_application_id", facebook_application_id) + _setter("facebook_application_secret", facebook_application_secret) + _setter("pages", pages) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) @property @pulumi.getter(name="botName") @@ -130,18 +169,47 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ChannelFacebookPageArgs']]] pages: One or more `page` blocks as defined below. :param pulumi.Input[str] resource_group_name: The name of the resource group where the Facebook Channel should be created. Changing this forces a new resource to be created. """ + _ChannelFacebookState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + facebook_application_id=facebook_application_id, + facebook_application_secret=facebook_application_secret, + location=location, + pages=pages, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + facebook_application_id: Optional[pulumi.Input[str]] = None, + facebook_application_secret: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + pages: Optional[pulumi.Input[Sequence[pulumi.Input['ChannelFacebookPageArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if facebook_application_id is None and 'facebookApplicationId' in kwargs: + facebook_application_id = kwargs['facebookApplicationId'] + if facebook_application_secret is None and 'facebookApplicationSecret' in kwargs: + facebook_application_secret = kwargs['facebookApplicationSecret'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if bot_name is not None: - pulumi.set(__self__, "bot_name", bot_name) + _setter("bot_name", bot_name) if facebook_application_id is not None: - pulumi.set(__self__, "facebook_application_id", facebook_application_id) + _setter("facebook_application_id", facebook_application_id) if facebook_application_secret is not None: - pulumi.set(__self__, "facebook_application_secret", facebook_application_secret) + _setter("facebook_application_secret", facebook_application_secret) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if pages is not None: - pulumi.set(__self__, "pages", pages) + _setter("pages", pages) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="botName") @@ -329,6 +397,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ChannelFacebookArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/channel_line.py b/sdk/python/pulumi_azure/bot/channel_line.py index 384ed56e13..d92f310f95 100644 --- a/sdk/python/pulumi_azure/bot/channel_line.py +++ b/sdk/python/pulumi_azure/bot/channel_line.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,11 +27,40 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group where the Line Channel should be created. Changing this forces a new resource to be created. :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "bot_name", bot_name) - pulumi.set(__self__, "line_channels", line_channels) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ChannelLineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + line_channels=line_channels, + resource_group_name=resource_group_name, + location=location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + line_channels: Optional[pulumi.Input[Sequence[pulumi.Input['ChannelLineLineChannelArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if bot_name is None: + raise TypeError("Missing 'bot_name' argument") + if line_channels is None and 'lineChannels' in kwargs: + line_channels = kwargs['lineChannels'] + if line_channels is None: + raise TypeError("Missing 'line_channels' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("bot_name", bot_name) + _setter("line_channels", line_channels) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) @property @pulumi.getter(name="botName") @@ -96,14 +125,37 @@ def __init__(__self__, *, :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group where the Line Channel should be created. Changing this forces a new resource to be created. """ + _ChannelLineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + line_channels=line_channels, + location=location, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + line_channels: Optional[pulumi.Input[Sequence[pulumi.Input['ChannelLineLineChannelArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if line_channels is None and 'lineChannels' in kwargs: + line_channels = kwargs['lineChannels'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if bot_name is not None: - pulumi.set(__self__, "bot_name", bot_name) + _setter("bot_name", bot_name) if line_channels is not None: - pulumi.set(__self__, "line_channels", line_channels) + _setter("line_channels", line_channels) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="botName") @@ -259,6 +311,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ChannelLineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/channel_slack.py b/sdk/python/pulumi_azure/bot/channel_slack.py index ebbb11b76a..2cfb14943e 100644 --- a/sdk/python/pulumi_azure/bot/channel_slack.py +++ b/sdk/python/pulumi_azure/bot/channel_slack.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ChannelSlackArgs', 'ChannelSlack'] @@ -33,17 +33,66 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The supported Azure location where the resource exists. Changing this forces a new resource to be created. :param pulumi.Input[str] signing_secret: The Signing Secret that will be used to sign the requests. """ - pulumi.set(__self__, "bot_name", bot_name) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "verification_token", verification_token) + ChannelSlackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + client_id=client_id, + client_secret=client_secret, + resource_group_name=resource_group_name, + verification_token=verification_token, + landing_page_url=landing_page_url, + location=location, + signing_secret=signing_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + verification_token: Optional[pulumi.Input[str]] = None, + landing_page_url: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + signing_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if bot_name is None: + raise TypeError("Missing 'bot_name' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if verification_token is None and 'verificationToken' in kwargs: + verification_token = kwargs['verificationToken'] + if verification_token is None: + raise TypeError("Missing 'verification_token' argument") + if landing_page_url is None and 'landingPageUrl' in kwargs: + landing_page_url = kwargs['landingPageUrl'] + if signing_secret is None and 'signingSecret' in kwargs: + signing_secret = kwargs['signingSecret'] + + _setter("bot_name", bot_name) + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("resource_group_name", resource_group_name) + _setter("verification_token", verification_token) if landing_page_url is not None: - pulumi.set(__self__, "landing_page_url", landing_page_url) + _setter("landing_page_url", landing_page_url) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if signing_secret is not None: - pulumi.set(__self__, "signing_secret", signing_secret) + _setter("signing_secret", signing_secret) @property @pulumi.getter(name="botName") @@ -164,22 +213,61 @@ def __init__(__self__, *, :param pulumi.Input[str] signing_secret: The Signing Secret that will be used to sign the requests. :param pulumi.Input[str] verification_token: The Verification Token that will be used to authenticate with Slack. """ + _ChannelSlackState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + client_id=client_id, + client_secret=client_secret, + landing_page_url=landing_page_url, + location=location, + resource_group_name=resource_group_name, + signing_secret=signing_secret, + verification_token=verification_token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + landing_page_url: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + signing_secret: Optional[pulumi.Input[str]] = None, + verification_token: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if landing_page_url is None and 'landingPageUrl' in kwargs: + landing_page_url = kwargs['landingPageUrl'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if signing_secret is None and 'signingSecret' in kwargs: + signing_secret = kwargs['signingSecret'] + if verification_token is None and 'verificationToken' in kwargs: + verification_token = kwargs['verificationToken'] + if bot_name is not None: - pulumi.set(__self__, "bot_name", bot_name) + _setter("bot_name", bot_name) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if landing_page_url is not None: - pulumi.set(__self__, "landing_page_url", landing_page_url) + _setter("landing_page_url", landing_page_url) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if signing_secret is not None: - pulumi.set(__self__, "signing_secret", signing_secret) + _setter("signing_secret", signing_secret) if verification_token is not None: - pulumi.set(__self__, "verification_token", verification_token) + _setter("verification_token", verification_token) @property @pulumi.getter(name="botName") @@ -389,6 +477,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ChannelSlackArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/channel_sms.py b/sdk/python/pulumi_azure/bot/channel_sms.py index faead4187e..9cb03d856a 100644 --- a/sdk/python/pulumi_azure/bot/channel_sms.py +++ b/sdk/python/pulumi_azure/bot/channel_sms.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ChannelSmsArgs', 'ChannelSms'] @@ -29,13 +29,54 @@ def __init__(__self__, *, :param pulumi.Input[str] sms_channel_auth_token: The authorization token for the SMS Channel. :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "bot_name", bot_name) - pulumi.set(__self__, "phone_number", phone_number) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sms_channel_account_security_id", sms_channel_account_security_id) - pulumi.set(__self__, "sms_channel_auth_token", sms_channel_auth_token) + ChannelSmsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + phone_number=phone_number, + resource_group_name=resource_group_name, + sms_channel_account_security_id=sms_channel_account_security_id, + sms_channel_auth_token=sms_channel_auth_token, + location=location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + phone_number: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sms_channel_account_security_id: Optional[pulumi.Input[str]] = None, + sms_channel_auth_token: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if bot_name is None: + raise TypeError("Missing 'bot_name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sms_channel_account_security_id is None and 'smsChannelAccountSecurityId' in kwargs: + sms_channel_account_security_id = kwargs['smsChannelAccountSecurityId'] + if sms_channel_account_security_id is None: + raise TypeError("Missing 'sms_channel_account_security_id' argument") + if sms_channel_auth_token is None and 'smsChannelAuthToken' in kwargs: + sms_channel_auth_token = kwargs['smsChannelAuthToken'] + if sms_channel_auth_token is None: + raise TypeError("Missing 'sms_channel_auth_token' argument") + + _setter("bot_name", bot_name) + _setter("phone_number", phone_number) + _setter("resource_group_name", resource_group_name) + _setter("sms_channel_account_security_id", sms_channel_account_security_id) + _setter("sms_channel_auth_token", sms_channel_auth_token) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) @property @pulumi.getter(name="botName") @@ -128,18 +169,49 @@ def __init__(__self__, *, :param pulumi.Input[str] sms_channel_account_security_id: The account security identifier (SID) for the SMS Channel. :param pulumi.Input[str] sms_channel_auth_token: The authorization token for the SMS Channel. """ + _ChannelSmsState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + location=location, + phone_number=phone_number, + resource_group_name=resource_group_name, + sms_channel_account_security_id=sms_channel_account_security_id, + sms_channel_auth_token=sms_channel_auth_token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + phone_number: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sms_channel_account_security_id: Optional[pulumi.Input[str]] = None, + sms_channel_auth_token: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sms_channel_account_security_id is None and 'smsChannelAccountSecurityId' in kwargs: + sms_channel_account_security_id = kwargs['smsChannelAccountSecurityId'] + if sms_channel_auth_token is None and 'smsChannelAuthToken' in kwargs: + sms_channel_auth_token = kwargs['smsChannelAuthToken'] + if bot_name is not None: - pulumi.set(__self__, "bot_name", bot_name) + _setter("bot_name", bot_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if phone_number is not None: - pulumi.set(__self__, "phone_number", phone_number) + _setter("phone_number", phone_number) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sms_channel_account_security_id is not None: - pulumi.set(__self__, "sms_channel_account_security_id", sms_channel_account_security_id) + _setter("sms_channel_account_security_id", sms_channel_account_security_id) if sms_channel_auth_token is not None: - pulumi.set(__self__, "sms_channel_auth_token", sms_channel_auth_token) + _setter("sms_channel_auth_token", sms_channel_auth_token) @property @pulumi.getter(name="botName") @@ -321,6 +393,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ChannelSmsArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/channel_teams.py b/sdk/python/pulumi_azure/bot/channel_teams.py index caa62b7376..341ea8e12b 100644 --- a/sdk/python/pulumi_azure/bot/channel_teams.py +++ b/sdk/python/pulumi_azure/bot/channel_teams.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ChannelTeamsArgs', 'ChannelTeams'] @@ -29,16 +29,51 @@ def __init__(__self__, *, :param pulumi.Input[bool] enable_calling: Specifies whether to enable Microsoft Teams channel calls. This defaults to `false`. :param pulumi.Input[str] location: The supported Azure location where the resource exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "bot_name", bot_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ChannelTeamsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + resource_group_name=resource_group_name, + calling_web_hook=calling_web_hook, + deployment_environment=deployment_environment, + enable_calling=enable_calling, + location=location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + calling_web_hook: Optional[pulumi.Input[str]] = None, + deployment_environment: Optional[pulumi.Input[str]] = None, + enable_calling: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if bot_name is None: + raise TypeError("Missing 'bot_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if calling_web_hook is None and 'callingWebHook' in kwargs: + calling_web_hook = kwargs['callingWebHook'] + if deployment_environment is None and 'deploymentEnvironment' in kwargs: + deployment_environment = kwargs['deploymentEnvironment'] + if enable_calling is None and 'enableCalling' in kwargs: + enable_calling = kwargs['enableCalling'] + + _setter("bot_name", bot_name) + _setter("resource_group_name", resource_group_name) if calling_web_hook is not None: - pulumi.set(__self__, "calling_web_hook", calling_web_hook) + _setter("calling_web_hook", calling_web_hook) if deployment_environment is not None: - pulumi.set(__self__, "deployment_environment", deployment_environment) + _setter("deployment_environment", deployment_environment) if enable_calling is not None: - pulumi.set(__self__, "enable_calling", enable_calling) + _setter("enable_calling", enable_calling) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) @property @pulumi.getter(name="botName") @@ -131,18 +166,49 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The supported Azure location where the resource exists. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created. """ + _ChannelTeamsState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + calling_web_hook=calling_web_hook, + deployment_environment=deployment_environment, + enable_calling=enable_calling, + location=location, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + calling_web_hook: Optional[pulumi.Input[str]] = None, + deployment_environment: Optional[pulumi.Input[str]] = None, + enable_calling: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if calling_web_hook is None and 'callingWebHook' in kwargs: + calling_web_hook = kwargs['callingWebHook'] + if deployment_environment is None and 'deploymentEnvironment' in kwargs: + deployment_environment = kwargs['deploymentEnvironment'] + if enable_calling is None and 'enableCalling' in kwargs: + enable_calling = kwargs['enableCalling'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if bot_name is not None: - pulumi.set(__self__, "bot_name", bot_name) + _setter("bot_name", bot_name) if calling_web_hook is not None: - pulumi.set(__self__, "calling_web_hook", calling_web_hook) + _setter("calling_web_hook", calling_web_hook) if deployment_environment is not None: - pulumi.set(__self__, "deployment_environment", deployment_environment) + _setter("deployment_environment", deployment_environment) if enable_calling is not None: - pulumi.set(__self__, "enable_calling", enable_calling) + _setter("enable_calling", enable_calling) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="botName") @@ -318,6 +384,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ChannelTeamsArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/channel_web_chat.py b/sdk/python/pulumi_azure/bot/channel_web_chat.py index a5406a5248..4bb8e26153 100644 --- a/sdk/python/pulumi_azure/bot/channel_web_chat.py +++ b/sdk/python/pulumi_azure/bot/channel_web_chat.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,17 +31,46 @@ def __init__(__self__, *, > **NOTE:** `site_names` is deprecated and will be removed in favour of the property `site` in version 4.0 of the AzureRM Provider. :param pulumi.Input[Sequence[pulumi.Input['ChannelWebChatSiteArgs']]] sites: A site represents a client application that you want to connect to your bot. Multiple `site` blocks may be defined as below """ - pulumi.set(__self__, "bot_name", bot_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ChannelWebChatArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + resource_group_name=resource_group_name, + location=location, + site_names=site_names, + sites=sites, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + site_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sites: Optional[pulumi.Input[Sequence[pulumi.Input['ChannelWebChatSiteArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if bot_name is None: + raise TypeError("Missing 'bot_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if site_names is None and 'siteNames' in kwargs: + site_names = kwargs['siteNames'] + + _setter("bot_name", bot_name) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if site_names is not None: warnings.warn("""`site_names` will be removed in favour of the property `site` in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""site_names is deprecated: `site_names` will be removed in favour of the property `site` in version 4.0 of the AzureRM Provider.""") if site_names is not None: - pulumi.set(__self__, "site_names", site_names) + _setter("site_names", site_names) if sites is not None: - pulumi.set(__self__, "sites", sites) + _setter("sites", sites) @property @pulumi.getter(name="botName") @@ -127,19 +156,44 @@ def __init__(__self__, *, > **NOTE:** `site_names` is deprecated and will be removed in favour of the property `site` in version 4.0 of the AzureRM Provider. :param pulumi.Input[Sequence[pulumi.Input['ChannelWebChatSiteArgs']]] sites: A site represents a client application that you want to connect to your bot. Multiple `site` blocks may be defined as below """ + _ChannelWebChatState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + location=location, + resource_group_name=resource_group_name, + site_names=site_names, + sites=sites, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + site_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sites: Optional[pulumi.Input[Sequence[pulumi.Input['ChannelWebChatSiteArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if site_names is None and 'siteNames' in kwargs: + site_names = kwargs['siteNames'] + if bot_name is not None: - pulumi.set(__self__, "bot_name", bot_name) + _setter("bot_name", bot_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if site_names is not None: warnings.warn("""`site_names` will be removed in favour of the property `site` in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""site_names is deprecated: `site_names` will be removed in favour of the property `site` in version 4.0 of the AzureRM Provider.""") if site_names is not None: - pulumi.set(__self__, "site_names", site_names) + _setter("site_names", site_names) if sites is not None: - pulumi.set(__self__, "sites", sites) + _setter("sites", sites) @property @pulumi.getter(name="botName") @@ -310,6 +364,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ChannelWebChatArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/channels_registration.py b/sdk/python/pulumi_azure/bot/channels_registration.py index 40c7a3e9d2..88a377ed61 100644 --- a/sdk/python/pulumi_azure/bot/channels_registration.py +++ b/sdk/python/pulumi_azure/bot/channels_registration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ChannelsRegistrationArgs', 'ChannelsRegistration'] @@ -57,40 +57,111 @@ def __init__(__self__, *, :param pulumi.Input[bool] streaming_endpoint_enabled: Is the streaming endpoint enabled for the Bot Channels Registration. Defaults to `false`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "microsoft_app_id", microsoft_app_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + ChannelsRegistrationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + microsoft_app_id=microsoft_app_id, + resource_group_name=resource_group_name, + sku=sku, + cmk_key_vault_url=cmk_key_vault_url, + description=description, + developer_app_insights_api_key=developer_app_insights_api_key, + developer_app_insights_application_id=developer_app_insights_application_id, + developer_app_insights_key=developer_app_insights_key, + display_name=display_name, + endpoint=endpoint, + icon_url=icon_url, + isolated_network_enabled=isolated_network_enabled, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + streaming_endpoint_enabled=streaming_endpoint_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + microsoft_app_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + cmk_key_vault_url: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + developer_app_insights_api_key: Optional[pulumi.Input[str]] = None, + developer_app_insights_application_id: Optional[pulumi.Input[str]] = None, + developer_app_insights_key: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + icon_url: Optional[pulumi.Input[str]] = None, + isolated_network_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + streaming_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if microsoft_app_id is None and 'microsoftAppId' in kwargs: + microsoft_app_id = kwargs['microsoftAppId'] + if microsoft_app_id is None: + raise TypeError("Missing 'microsoft_app_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if cmk_key_vault_url is None and 'cmkKeyVaultUrl' in kwargs: + cmk_key_vault_url = kwargs['cmkKeyVaultUrl'] + if developer_app_insights_api_key is None and 'developerAppInsightsApiKey' in kwargs: + developer_app_insights_api_key = kwargs['developerAppInsightsApiKey'] + if developer_app_insights_application_id is None and 'developerAppInsightsApplicationId' in kwargs: + developer_app_insights_application_id = kwargs['developerAppInsightsApplicationId'] + if developer_app_insights_key is None and 'developerAppInsightsKey' in kwargs: + developer_app_insights_key = kwargs['developerAppInsightsKey'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if icon_url is None and 'iconUrl' in kwargs: + icon_url = kwargs['iconUrl'] + if isolated_network_enabled is None and 'isolatedNetworkEnabled' in kwargs: + isolated_network_enabled = kwargs['isolatedNetworkEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if streaming_endpoint_enabled is None and 'streamingEndpointEnabled' in kwargs: + streaming_endpoint_enabled = kwargs['streamingEndpointEnabled'] + + _setter("microsoft_app_id", microsoft_app_id) + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if cmk_key_vault_url is not None: - pulumi.set(__self__, "cmk_key_vault_url", cmk_key_vault_url) + _setter("cmk_key_vault_url", cmk_key_vault_url) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if developer_app_insights_api_key is not None: - pulumi.set(__self__, "developer_app_insights_api_key", developer_app_insights_api_key) + _setter("developer_app_insights_api_key", developer_app_insights_api_key) if developer_app_insights_application_id is not None: - pulumi.set(__self__, "developer_app_insights_application_id", developer_app_insights_application_id) + _setter("developer_app_insights_application_id", developer_app_insights_application_id) if developer_app_insights_key is not None: - pulumi.set(__self__, "developer_app_insights_key", developer_app_insights_key) + _setter("developer_app_insights_key", developer_app_insights_key) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if icon_url is not None: - pulumi.set(__self__, "icon_url", icon_url) + _setter("icon_url", icon_url) if isolated_network_enabled is not None: warnings.warn("""`isolated_network_enabled` will be removed in favour of the property `public_network_access_enabled` in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""isolated_network_enabled is deprecated: `isolated_network_enabled` will be removed in favour of the property `public_network_access_enabled` in version 4.0 of the AzureRM Provider.""") if isolated_network_enabled is not None: - pulumi.set(__self__, "isolated_network_enabled", isolated_network_enabled) + _setter("isolated_network_enabled", isolated_network_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if streaming_endpoint_enabled is not None: - pulumi.set(__self__, "streaming_endpoint_enabled", streaming_endpoint_enabled) + _setter("streaming_endpoint_enabled", streaming_endpoint_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="microsoftAppId") @@ -352,43 +423,108 @@ def __init__(__self__, *, :param pulumi.Input[bool] streaming_endpoint_enabled: Is the streaming endpoint enabled for the Bot Channels Registration. Defaults to `false`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ChannelsRegistrationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cmk_key_vault_url=cmk_key_vault_url, + description=description, + developer_app_insights_api_key=developer_app_insights_api_key, + developer_app_insights_application_id=developer_app_insights_application_id, + developer_app_insights_key=developer_app_insights_key, + display_name=display_name, + endpoint=endpoint, + icon_url=icon_url, + isolated_network_enabled=isolated_network_enabled, + location=location, + microsoft_app_id=microsoft_app_id, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + sku=sku, + streaming_endpoint_enabled=streaming_endpoint_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cmk_key_vault_url: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + developer_app_insights_api_key: Optional[pulumi.Input[str]] = None, + developer_app_insights_application_id: Optional[pulumi.Input[str]] = None, + developer_app_insights_key: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + icon_url: Optional[pulumi.Input[str]] = None, + isolated_network_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + microsoft_app_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + streaming_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cmk_key_vault_url is None and 'cmkKeyVaultUrl' in kwargs: + cmk_key_vault_url = kwargs['cmkKeyVaultUrl'] + if developer_app_insights_api_key is None and 'developerAppInsightsApiKey' in kwargs: + developer_app_insights_api_key = kwargs['developerAppInsightsApiKey'] + if developer_app_insights_application_id is None and 'developerAppInsightsApplicationId' in kwargs: + developer_app_insights_application_id = kwargs['developerAppInsightsApplicationId'] + if developer_app_insights_key is None and 'developerAppInsightsKey' in kwargs: + developer_app_insights_key = kwargs['developerAppInsightsKey'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if icon_url is None and 'iconUrl' in kwargs: + icon_url = kwargs['iconUrl'] + if isolated_network_enabled is None and 'isolatedNetworkEnabled' in kwargs: + isolated_network_enabled = kwargs['isolatedNetworkEnabled'] + if microsoft_app_id is None and 'microsoftAppId' in kwargs: + microsoft_app_id = kwargs['microsoftAppId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if streaming_endpoint_enabled is None and 'streamingEndpointEnabled' in kwargs: + streaming_endpoint_enabled = kwargs['streamingEndpointEnabled'] + if cmk_key_vault_url is not None: - pulumi.set(__self__, "cmk_key_vault_url", cmk_key_vault_url) + _setter("cmk_key_vault_url", cmk_key_vault_url) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if developer_app_insights_api_key is not None: - pulumi.set(__self__, "developer_app_insights_api_key", developer_app_insights_api_key) + _setter("developer_app_insights_api_key", developer_app_insights_api_key) if developer_app_insights_application_id is not None: - pulumi.set(__self__, "developer_app_insights_application_id", developer_app_insights_application_id) + _setter("developer_app_insights_application_id", developer_app_insights_application_id) if developer_app_insights_key is not None: - pulumi.set(__self__, "developer_app_insights_key", developer_app_insights_key) + _setter("developer_app_insights_key", developer_app_insights_key) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if icon_url is not None: - pulumi.set(__self__, "icon_url", icon_url) + _setter("icon_url", icon_url) if isolated_network_enabled is not None: warnings.warn("""`isolated_network_enabled` will be removed in favour of the property `public_network_access_enabled` in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""isolated_network_enabled is deprecated: `isolated_network_enabled` will be removed in favour of the property `public_network_access_enabled` in version 4.0 of the AzureRM Provider.""") if isolated_network_enabled is not None: - pulumi.set(__self__, "isolated_network_enabled", isolated_network_enabled) + _setter("isolated_network_enabled", isolated_network_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if microsoft_app_id is not None: - pulumi.set(__self__, "microsoft_app_id", microsoft_app_id) + _setter("microsoft_app_id", microsoft_app_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if streaming_endpoint_enabled is not None: - pulumi.set(__self__, "streaming_endpoint_enabled", streaming_endpoint_enabled) + _setter("streaming_endpoint_enabled", streaming_endpoint_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="cmkKeyVaultUrl") @@ -721,6 +857,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ChannelsRegistrationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/connection.py b/sdk/python/pulumi_azure/bot/connection.py index 9c375cf6ea..b1ac62122e 100644 --- a/sdk/python/pulumi_azure/bot/connection.py +++ b/sdk/python/pulumi_azure/bot/connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ConnectionArgs', 'Connection'] @@ -39,24 +39,73 @@ def __init__(__self__, *, > **Note:** `tags` has been deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. """ - pulumi.set(__self__, "bot_name", bot_name) - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "service_provider_name", service_provider_name) + ConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + client_id=client_id, + client_secret=client_secret, + resource_group_name=resource_group_name, + service_provider_name=service_provider_name, + location=location, + name=name, + parameters=parameters, + scopes=scopes, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_provider_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + scopes: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if bot_name is None: + raise TypeError("Missing 'bot_name' argument") + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if service_provider_name is None and 'serviceProviderName' in kwargs: + service_provider_name = kwargs['serviceProviderName'] + if service_provider_name is None: + raise TypeError("Missing 'service_provider_name' argument") + + _setter("bot_name", bot_name) + _setter("client_id", client_id) + _setter("client_secret", client_secret) + _setter("resource_group_name", resource_group_name) + _setter("service_provider_name", service_provider_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if tags is not None: warnings.warn("""This property has been deprecated as the API no longer supports tags and will be removed in version 4.0 of the provider.""", DeprecationWarning) pulumi.log.warn("""tags is deprecated: This property has been deprecated as the API no longer supports tags and will be removed in version 4.0 of the provider.""") if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="botName") @@ -212,29 +261,68 @@ def __init__(__self__, *, > **Note:** `tags` has been deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. """ + _ConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_name=bot_name, + client_id=client_id, + client_secret=client_secret, + location=location, + name=name, + parameters=parameters, + resource_group_name=resource_group_name, + scopes=scopes, + service_provider_name=service_provider_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_name: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[str]] = None, + service_provider_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_name is None and 'botName' in kwargs: + bot_name = kwargs['botName'] + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_provider_name is None and 'serviceProviderName' in kwargs: + service_provider_name = kwargs['serviceProviderName'] + if bot_name is not None: - pulumi.set(__self__, "bot_name", bot_name) + _setter("bot_name", bot_name) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if service_provider_name is not None: - pulumi.set(__self__, "service_provider_name", service_provider_name) + _setter("service_provider_name", service_provider_name) if tags is not None: warnings.warn("""This property has been deprecated as the API no longer supports tags and will be removed in version 4.0 of the provider.""", DeprecationWarning) pulumi.log.warn("""tags is deprecated: This property has been deprecated as the API no longer supports tags and will be removed in version 4.0 of the provider.""") if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="botName") @@ -475,6 +563,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/healthbot.py b/sdk/python/pulumi_azure/bot/healthbot.py index dc1ca63073..1b3ebb4f64 100644 --- a/sdk/python/pulumi_azure/bot/healthbot.py +++ b/sdk/python/pulumi_azure/bot/healthbot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['HealthbotArgs', 'Healthbot'] @@ -27,14 +27,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies The name of the Healthbot Service resource. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the service. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + HealthbotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -115,18 +142,45 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_name: The name which should be used for the SKU of the service. Possible values are `C0`, `F0` and `S1`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the service. """ + _HealthbotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bot_management_portal_url=bot_management_portal_url, + location=location, + name=name, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bot_management_portal_url: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bot_management_portal_url is None and 'botManagementPortalUrl' in kwargs: + bot_management_portal_url = kwargs['botManagementPortalUrl'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if bot_management_portal_url is not None: - pulumi.set(__self__, "bot_management_portal_url", bot_management_portal_url) + _setter("bot_management_portal_url", bot_management_portal_url) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="botManagementPortalUrl") @@ -284,6 +338,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HealthbotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/outputs.py b/sdk/python/pulumi_azure/bot/outputs.py index 69de7b571d..fb3046bd22 100644 --- a/sdk/python/pulumi_azure/bot/outputs.py +++ b/sdk/python/pulumi_azure/bot/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -74,29 +74,78 @@ def __init__(__self__, *, :param bool v1_allowed: Enables v1 of the Directline protocol for this site. Enabled by default Defaults to `true`. :param bool v3_allowed: Enables v3 of the Directline protocol for this site. Enabled by default Defaults to `true`. """ - pulumi.set(__self__, "name", name) + ChannelDirectLineSite._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + enabled=enabled, + endpoint_parameters_enabled=endpoint_parameters_enabled, + enhanced_authentication_enabled=enhanced_authentication_enabled, + id=id, + key=key, + key2=key2, + storage_enabled=storage_enabled, + trusted_origins=trusted_origins, + user_upload_enabled=user_upload_enabled, + v1_allowed=v1_allowed, + v3_allowed=v3_allowed, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + enabled: Optional[bool] = None, + endpoint_parameters_enabled: Optional[bool] = None, + enhanced_authentication_enabled: Optional[bool] = None, + id: Optional[str] = None, + key: Optional[str] = None, + key2: Optional[str] = None, + storage_enabled: Optional[bool] = None, + trusted_origins: Optional[Sequence[str]] = None, + user_upload_enabled: Optional[bool] = None, + v1_allowed: Optional[bool] = None, + v3_allowed: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if endpoint_parameters_enabled is None and 'endpointParametersEnabled' in kwargs: + endpoint_parameters_enabled = kwargs['endpointParametersEnabled'] + if enhanced_authentication_enabled is None and 'enhancedAuthenticationEnabled' in kwargs: + enhanced_authentication_enabled = kwargs['enhancedAuthenticationEnabled'] + if storage_enabled is None and 'storageEnabled' in kwargs: + storage_enabled = kwargs['storageEnabled'] + if trusted_origins is None and 'trustedOrigins' in kwargs: + trusted_origins = kwargs['trustedOrigins'] + if user_upload_enabled is None and 'userUploadEnabled' in kwargs: + user_upload_enabled = kwargs['userUploadEnabled'] + if v1_allowed is None and 'v1Allowed' in kwargs: + v1_allowed = kwargs['v1Allowed'] + if v3_allowed is None and 'v3Allowed' in kwargs: + v3_allowed = kwargs['v3Allowed'] + + _setter("name", name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if endpoint_parameters_enabled is not None: - pulumi.set(__self__, "endpoint_parameters_enabled", endpoint_parameters_enabled) + _setter("endpoint_parameters_enabled", endpoint_parameters_enabled) if enhanced_authentication_enabled is not None: - pulumi.set(__self__, "enhanced_authentication_enabled", enhanced_authentication_enabled) + _setter("enhanced_authentication_enabled", enhanced_authentication_enabled) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if key2 is not None: - pulumi.set(__self__, "key2", key2) + _setter("key2", key2) if storage_enabled is not None: - pulumi.set(__self__, "storage_enabled", storage_enabled) + _setter("storage_enabled", storage_enabled) if trusted_origins is not None: - pulumi.set(__self__, "trusted_origins", trusted_origins) + _setter("trusted_origins", trusted_origins) if user_upload_enabled is not None: - pulumi.set(__self__, "user_upload_enabled", user_upload_enabled) + _setter("user_upload_enabled", user_upload_enabled) if v1_allowed is not None: - pulumi.set(__self__, "v1_allowed", v1_allowed) + _setter("v1_allowed", v1_allowed) if v3_allowed is not None: - pulumi.set(__self__, "v3_allowed", v3_allowed) + _setter("v3_allowed", v3_allowed) @property @pulumi.getter @@ -221,8 +270,27 @@ def __init__(__self__, *, :param str access_token: The Facebook Page Access Token for the Facebook Channel. :param str id: The Facebook Page ID for the Facebook Channel. """ - pulumi.set(__self__, "access_token", access_token) - pulumi.set(__self__, "id", id) + ChannelFacebookPage._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_token=access_token, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_token: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_token is None and 'accessToken' in kwargs: + access_token = kwargs['accessToken'] + if access_token is None: + raise TypeError("Missing 'access_token' argument") + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("access_token", access_token) + _setter("id", id) @property @pulumi.getter(name="accessToken") @@ -267,8 +335,27 @@ def __init__(__self__, *, :param str access_token: The access token which is used to call the Line Channel API. :param str secret: The secret which is used to access the Line Channel. """ - pulumi.set(__self__, "access_token", access_token) - pulumi.set(__self__, "secret", secret) + ChannelLineLineChannel._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_token=access_token, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_token: Optional[str] = None, + secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_token is None and 'accessToken' in kwargs: + access_token = kwargs['accessToken'] + if access_token is None: + raise TypeError("Missing 'access_token' argument") + if secret is None: + raise TypeError("Missing 'secret' argument") + + _setter("access_token", access_token) + _setter("secret", secret) @property @pulumi.getter(name="accessToken") @@ -321,13 +408,38 @@ def __init__(__self__, *, :param bool storage_enabled: Is the storage site enabled for detailed logging? Defaults to `true`. :param bool user_upload_enabled: Is the user upload enabled for this site? Defaults to `true`. """ - pulumi.set(__self__, "name", name) + ChannelWebChatSite._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + endpoint_parameters_enabled=endpoint_parameters_enabled, + storage_enabled=storage_enabled, + user_upload_enabled=user_upload_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + endpoint_parameters_enabled: Optional[bool] = None, + storage_enabled: Optional[bool] = None, + user_upload_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if endpoint_parameters_enabled is None and 'endpointParametersEnabled' in kwargs: + endpoint_parameters_enabled = kwargs['endpointParametersEnabled'] + if storage_enabled is None and 'storageEnabled' in kwargs: + storage_enabled = kwargs['storageEnabled'] + if user_upload_enabled is None and 'userUploadEnabled' in kwargs: + user_upload_enabled = kwargs['userUploadEnabled'] + + _setter("name", name) if endpoint_parameters_enabled is not None: - pulumi.set(__self__, "endpoint_parameters_enabled", endpoint_parameters_enabled) + _setter("endpoint_parameters_enabled", endpoint_parameters_enabled) if storage_enabled is not None: - pulumi.set(__self__, "storage_enabled", storage_enabled) + _setter("storage_enabled", storage_enabled) if user_upload_enabled is not None: - pulumi.set(__self__, "user_upload_enabled", user_upload_enabled) + _setter("user_upload_enabled", user_upload_enabled) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/bot/service_azure_bot.py b/sdk/python/pulumi_azure/bot/service_azure_bot.py index aad012aa93..eadfe75a95 100644 --- a/sdk/python/pulumi_azure/bot/service_azure_bot.py +++ b/sdk/python/pulumi_azure/bot/service_azure_bot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServiceAzureBotArgs', 'ServiceAzureBot'] @@ -55,41 +55,122 @@ def __init__(__self__, *, :param pulumi.Input[bool] streaming_endpoint_enabled: Is the streaming endpoint enabled for this Azure Bot Service. Defaults to `false`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to this Azure Bot Service. """ - pulumi.set(__self__, "microsoft_app_id", microsoft_app_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + ServiceAzureBotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + microsoft_app_id=microsoft_app_id, + resource_group_name=resource_group_name, + sku=sku, + developer_app_insights_api_key=developer_app_insights_api_key, + developer_app_insights_application_id=developer_app_insights_application_id, + developer_app_insights_key=developer_app_insights_key, + display_name=display_name, + endpoint=endpoint, + icon_url=icon_url, + local_authentication_enabled=local_authentication_enabled, + location=location, + luis_app_ids=luis_app_ids, + luis_key=luis_key, + microsoft_app_msi_id=microsoft_app_msi_id, + microsoft_app_tenant_id=microsoft_app_tenant_id, + microsoft_app_type=microsoft_app_type, + name=name, + streaming_endpoint_enabled=streaming_endpoint_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + microsoft_app_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + developer_app_insights_api_key: Optional[pulumi.Input[str]] = None, + developer_app_insights_application_id: Optional[pulumi.Input[str]] = None, + developer_app_insights_key: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + icon_url: Optional[pulumi.Input[str]] = None, + local_authentication_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + luis_app_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + luis_key: Optional[pulumi.Input[str]] = None, + microsoft_app_msi_id: Optional[pulumi.Input[str]] = None, + microsoft_app_tenant_id: Optional[pulumi.Input[str]] = None, + microsoft_app_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + streaming_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if microsoft_app_id is None and 'microsoftAppId' in kwargs: + microsoft_app_id = kwargs['microsoftAppId'] + if microsoft_app_id is None: + raise TypeError("Missing 'microsoft_app_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if developer_app_insights_api_key is None and 'developerAppInsightsApiKey' in kwargs: + developer_app_insights_api_key = kwargs['developerAppInsightsApiKey'] + if developer_app_insights_application_id is None and 'developerAppInsightsApplicationId' in kwargs: + developer_app_insights_application_id = kwargs['developerAppInsightsApplicationId'] + if developer_app_insights_key is None and 'developerAppInsightsKey' in kwargs: + developer_app_insights_key = kwargs['developerAppInsightsKey'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if icon_url is None and 'iconUrl' in kwargs: + icon_url = kwargs['iconUrl'] + if local_authentication_enabled is None and 'localAuthenticationEnabled' in kwargs: + local_authentication_enabled = kwargs['localAuthenticationEnabled'] + if luis_app_ids is None and 'luisAppIds' in kwargs: + luis_app_ids = kwargs['luisAppIds'] + if luis_key is None and 'luisKey' in kwargs: + luis_key = kwargs['luisKey'] + if microsoft_app_msi_id is None and 'microsoftAppMsiId' in kwargs: + microsoft_app_msi_id = kwargs['microsoftAppMsiId'] + if microsoft_app_tenant_id is None and 'microsoftAppTenantId' in kwargs: + microsoft_app_tenant_id = kwargs['microsoftAppTenantId'] + if microsoft_app_type is None and 'microsoftAppType' in kwargs: + microsoft_app_type = kwargs['microsoftAppType'] + if streaming_endpoint_enabled is None and 'streamingEndpointEnabled' in kwargs: + streaming_endpoint_enabled = kwargs['streamingEndpointEnabled'] + + _setter("microsoft_app_id", microsoft_app_id) + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if developer_app_insights_api_key is not None: - pulumi.set(__self__, "developer_app_insights_api_key", developer_app_insights_api_key) + _setter("developer_app_insights_api_key", developer_app_insights_api_key) if developer_app_insights_application_id is not None: - pulumi.set(__self__, "developer_app_insights_application_id", developer_app_insights_application_id) + _setter("developer_app_insights_application_id", developer_app_insights_application_id) if developer_app_insights_key is not None: - pulumi.set(__self__, "developer_app_insights_key", developer_app_insights_key) + _setter("developer_app_insights_key", developer_app_insights_key) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if icon_url is not None: - pulumi.set(__self__, "icon_url", icon_url) + _setter("icon_url", icon_url) if local_authentication_enabled is not None: - pulumi.set(__self__, "local_authentication_enabled", local_authentication_enabled) + _setter("local_authentication_enabled", local_authentication_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if luis_app_ids is not None: - pulumi.set(__self__, "luis_app_ids", luis_app_ids) + _setter("luis_app_ids", luis_app_ids) if luis_key is not None: - pulumi.set(__self__, "luis_key", luis_key) + _setter("luis_key", luis_key) if microsoft_app_msi_id is not None: - pulumi.set(__self__, "microsoft_app_msi_id", microsoft_app_msi_id) + _setter("microsoft_app_msi_id", microsoft_app_msi_id) if microsoft_app_tenant_id is not None: - pulumi.set(__self__, "microsoft_app_tenant_id", microsoft_app_tenant_id) + _setter("microsoft_app_tenant_id", microsoft_app_tenant_id) if microsoft_app_type is not None: - pulumi.set(__self__, "microsoft_app_type", microsoft_app_type) + _setter("microsoft_app_type", microsoft_app_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if streaming_endpoint_enabled is not None: - pulumi.set(__self__, "streaming_endpoint_enabled", streaming_endpoint_enabled) + _setter("streaming_endpoint_enabled", streaming_endpoint_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="microsoftAppId") @@ -364,44 +445,119 @@ def __init__(__self__, *, :param pulumi.Input[bool] streaming_endpoint_enabled: Is the streaming endpoint enabled for this Azure Bot Service. Defaults to `false`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to this Azure Bot Service. """ + _ServiceAzureBotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + developer_app_insights_api_key=developer_app_insights_api_key, + developer_app_insights_application_id=developer_app_insights_application_id, + developer_app_insights_key=developer_app_insights_key, + display_name=display_name, + endpoint=endpoint, + icon_url=icon_url, + local_authentication_enabled=local_authentication_enabled, + location=location, + luis_app_ids=luis_app_ids, + luis_key=luis_key, + microsoft_app_id=microsoft_app_id, + microsoft_app_msi_id=microsoft_app_msi_id, + microsoft_app_tenant_id=microsoft_app_tenant_id, + microsoft_app_type=microsoft_app_type, + name=name, + resource_group_name=resource_group_name, + sku=sku, + streaming_endpoint_enabled=streaming_endpoint_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + developer_app_insights_api_key: Optional[pulumi.Input[str]] = None, + developer_app_insights_application_id: Optional[pulumi.Input[str]] = None, + developer_app_insights_key: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + icon_url: Optional[pulumi.Input[str]] = None, + local_authentication_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + luis_app_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + luis_key: Optional[pulumi.Input[str]] = None, + microsoft_app_id: Optional[pulumi.Input[str]] = None, + microsoft_app_msi_id: Optional[pulumi.Input[str]] = None, + microsoft_app_tenant_id: Optional[pulumi.Input[str]] = None, + microsoft_app_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + streaming_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if developer_app_insights_api_key is None and 'developerAppInsightsApiKey' in kwargs: + developer_app_insights_api_key = kwargs['developerAppInsightsApiKey'] + if developer_app_insights_application_id is None and 'developerAppInsightsApplicationId' in kwargs: + developer_app_insights_application_id = kwargs['developerAppInsightsApplicationId'] + if developer_app_insights_key is None and 'developerAppInsightsKey' in kwargs: + developer_app_insights_key = kwargs['developerAppInsightsKey'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if icon_url is None and 'iconUrl' in kwargs: + icon_url = kwargs['iconUrl'] + if local_authentication_enabled is None and 'localAuthenticationEnabled' in kwargs: + local_authentication_enabled = kwargs['localAuthenticationEnabled'] + if luis_app_ids is None and 'luisAppIds' in kwargs: + luis_app_ids = kwargs['luisAppIds'] + if luis_key is None and 'luisKey' in kwargs: + luis_key = kwargs['luisKey'] + if microsoft_app_id is None and 'microsoftAppId' in kwargs: + microsoft_app_id = kwargs['microsoftAppId'] + if microsoft_app_msi_id is None and 'microsoftAppMsiId' in kwargs: + microsoft_app_msi_id = kwargs['microsoftAppMsiId'] + if microsoft_app_tenant_id is None and 'microsoftAppTenantId' in kwargs: + microsoft_app_tenant_id = kwargs['microsoftAppTenantId'] + if microsoft_app_type is None and 'microsoftAppType' in kwargs: + microsoft_app_type = kwargs['microsoftAppType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if streaming_endpoint_enabled is None and 'streamingEndpointEnabled' in kwargs: + streaming_endpoint_enabled = kwargs['streamingEndpointEnabled'] + if developer_app_insights_api_key is not None: - pulumi.set(__self__, "developer_app_insights_api_key", developer_app_insights_api_key) + _setter("developer_app_insights_api_key", developer_app_insights_api_key) if developer_app_insights_application_id is not None: - pulumi.set(__self__, "developer_app_insights_application_id", developer_app_insights_application_id) + _setter("developer_app_insights_application_id", developer_app_insights_application_id) if developer_app_insights_key is not None: - pulumi.set(__self__, "developer_app_insights_key", developer_app_insights_key) + _setter("developer_app_insights_key", developer_app_insights_key) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if icon_url is not None: - pulumi.set(__self__, "icon_url", icon_url) + _setter("icon_url", icon_url) if local_authentication_enabled is not None: - pulumi.set(__self__, "local_authentication_enabled", local_authentication_enabled) + _setter("local_authentication_enabled", local_authentication_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if luis_app_ids is not None: - pulumi.set(__self__, "luis_app_ids", luis_app_ids) + _setter("luis_app_ids", luis_app_ids) if luis_key is not None: - pulumi.set(__self__, "luis_key", luis_key) + _setter("luis_key", luis_key) if microsoft_app_id is not None: - pulumi.set(__self__, "microsoft_app_id", microsoft_app_id) + _setter("microsoft_app_id", microsoft_app_id) if microsoft_app_msi_id is not None: - pulumi.set(__self__, "microsoft_app_msi_id", microsoft_app_msi_id) + _setter("microsoft_app_msi_id", microsoft_app_msi_id) if microsoft_app_tenant_id is not None: - pulumi.set(__self__, "microsoft_app_tenant_id", microsoft_app_tenant_id) + _setter("microsoft_app_tenant_id", microsoft_app_tenant_id) if microsoft_app_type is not None: - pulumi.set(__self__, "microsoft_app_type", microsoft_app_type) + _setter("microsoft_app_type", microsoft_app_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if streaming_endpoint_enabled is not None: - pulumi.set(__self__, "streaming_endpoint_enabled", streaming_endpoint_enabled) + _setter("streaming_endpoint_enabled", streaming_endpoint_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="developerAppInsightsApiKey") @@ -785,6 +941,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceAzureBotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/bot/web_app.py b/sdk/python/pulumi_azure/bot/web_app.py index b321fcab70..fc53d0aca0 100644 --- a/sdk/python/pulumi_azure/bot/web_app.py +++ b/sdk/python/pulumi_azure/bot/web_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WebAppArgs', 'WebApp'] @@ -43,29 +43,86 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Web App Bot. Changing this forces a new resource to be created. Must be globally unique. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "microsoft_app_id", microsoft_app_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + WebAppArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + microsoft_app_id=microsoft_app_id, + resource_group_name=resource_group_name, + sku=sku, + developer_app_insights_api_key=developer_app_insights_api_key, + developer_app_insights_application_id=developer_app_insights_application_id, + developer_app_insights_key=developer_app_insights_key, + display_name=display_name, + endpoint=endpoint, + location=location, + luis_app_ids=luis_app_ids, + luis_key=luis_key, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + microsoft_app_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + developer_app_insights_api_key: Optional[pulumi.Input[str]] = None, + developer_app_insights_application_id: Optional[pulumi.Input[str]] = None, + developer_app_insights_key: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + luis_app_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + luis_key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if microsoft_app_id is None and 'microsoftAppId' in kwargs: + microsoft_app_id = kwargs['microsoftAppId'] + if microsoft_app_id is None: + raise TypeError("Missing 'microsoft_app_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if developer_app_insights_api_key is None and 'developerAppInsightsApiKey' in kwargs: + developer_app_insights_api_key = kwargs['developerAppInsightsApiKey'] + if developer_app_insights_application_id is None and 'developerAppInsightsApplicationId' in kwargs: + developer_app_insights_application_id = kwargs['developerAppInsightsApplicationId'] + if developer_app_insights_key is None and 'developerAppInsightsKey' in kwargs: + developer_app_insights_key = kwargs['developerAppInsightsKey'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if luis_app_ids is None and 'luisAppIds' in kwargs: + luis_app_ids = kwargs['luisAppIds'] + if luis_key is None and 'luisKey' in kwargs: + luis_key = kwargs['luisKey'] + + _setter("microsoft_app_id", microsoft_app_id) + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if developer_app_insights_api_key is not None: - pulumi.set(__self__, "developer_app_insights_api_key", developer_app_insights_api_key) + _setter("developer_app_insights_api_key", developer_app_insights_api_key) if developer_app_insights_application_id is not None: - pulumi.set(__self__, "developer_app_insights_application_id", developer_app_insights_application_id) + _setter("developer_app_insights_application_id", developer_app_insights_application_id) if developer_app_insights_key is not None: - pulumi.set(__self__, "developer_app_insights_key", developer_app_insights_key) + _setter("developer_app_insights_key", developer_app_insights_key) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if luis_app_ids is not None: - pulumi.set(__self__, "luis_app_ids", luis_app_ids) + _setter("luis_app_ids", luis_app_ids) if luis_key is not None: - pulumi.set(__self__, "luis_key", luis_key) + _setter("luis_key", luis_key) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="microsoftAppId") @@ -256,32 +313,83 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: The SKU of the Web App Bot. Valid values include `F0` or `S1`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _WebAppState._configure( + lambda key, value: pulumi.set(__self__, key, value), + developer_app_insights_api_key=developer_app_insights_api_key, + developer_app_insights_application_id=developer_app_insights_application_id, + developer_app_insights_key=developer_app_insights_key, + display_name=display_name, + endpoint=endpoint, + location=location, + luis_app_ids=luis_app_ids, + luis_key=luis_key, + microsoft_app_id=microsoft_app_id, + name=name, + resource_group_name=resource_group_name, + sku=sku, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + developer_app_insights_api_key: Optional[pulumi.Input[str]] = None, + developer_app_insights_application_id: Optional[pulumi.Input[str]] = None, + developer_app_insights_key: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + luis_app_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + luis_key: Optional[pulumi.Input[str]] = None, + microsoft_app_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if developer_app_insights_api_key is None and 'developerAppInsightsApiKey' in kwargs: + developer_app_insights_api_key = kwargs['developerAppInsightsApiKey'] + if developer_app_insights_application_id is None and 'developerAppInsightsApplicationId' in kwargs: + developer_app_insights_application_id = kwargs['developerAppInsightsApplicationId'] + if developer_app_insights_key is None and 'developerAppInsightsKey' in kwargs: + developer_app_insights_key = kwargs['developerAppInsightsKey'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if luis_app_ids is None and 'luisAppIds' in kwargs: + luis_app_ids = kwargs['luisAppIds'] + if luis_key is None and 'luisKey' in kwargs: + luis_key = kwargs['luisKey'] + if microsoft_app_id is None and 'microsoftAppId' in kwargs: + microsoft_app_id = kwargs['microsoftAppId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if developer_app_insights_api_key is not None: - pulumi.set(__self__, "developer_app_insights_api_key", developer_app_insights_api_key) + _setter("developer_app_insights_api_key", developer_app_insights_api_key) if developer_app_insights_application_id is not None: - pulumi.set(__self__, "developer_app_insights_application_id", developer_app_insights_application_id) + _setter("developer_app_insights_application_id", developer_app_insights_application_id) if developer_app_insights_key is not None: - pulumi.set(__self__, "developer_app_insights_key", developer_app_insights_key) + _setter("developer_app_insights_key", developer_app_insights_key) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if luis_app_ids is not None: - pulumi.set(__self__, "luis_app_ids", luis_app_ids) + _setter("luis_app_ids", luis_app_ids) if luis_key is not None: - pulumi.set(__self__, "luis_key", luis_key) + _setter("luis_key", luis_key) if microsoft_app_id is not None: - pulumi.set(__self__, "microsoft_app_id", microsoft_app_id) + _setter("microsoft_app_id", microsoft_app_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="developerAppInsightsApiKey") @@ -543,6 +651,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WebAppArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cdn/_inputs.py b/sdk/python/pulumi_azure/cdn/_inputs.py index d2dd80f76f..ff72644342 100644 --- a/sdk/python/pulumi_azure/cdn/_inputs.py +++ b/sdk/python/pulumi_azure/cdn/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -100,10 +100,35 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol_type: The type of protocol. Possible values are `ServerNameIndication` and `IPBased`. :param pulumi.Input[str] tls_version: The minimum TLS protocol version that is used for HTTPS. Possible values are `TLS10` (representing TLS 1.0/1.1), `TLS12` (representing TLS 1.2) and `None` (representing no minimums). Defaults to `TLS12`. """ - pulumi.set(__self__, "certificate_type", certificate_type) - pulumi.set(__self__, "protocol_type", protocol_type) + EndpointCustomDomainCdnManagedHttpsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_type=certificate_type, + protocol_type=protocol_type, + tls_version=tls_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_type: Optional[pulumi.Input[str]] = None, + protocol_type: Optional[pulumi.Input[str]] = None, + tls_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_type is None and 'certificateType' in kwargs: + certificate_type = kwargs['certificateType'] + if certificate_type is None: + raise TypeError("Missing 'certificate_type' argument") + if protocol_type is None and 'protocolType' in kwargs: + protocol_type = kwargs['protocolType'] + if protocol_type is None: + raise TypeError("Missing 'protocol_type' argument") + if tls_version is None and 'tlsVersion' in kwargs: + tls_version = kwargs['tlsVersion'] + + _setter("certificate_type", certificate_type) + _setter("protocol_type", protocol_type) if tls_version is not None: - pulumi.set(__self__, "tls_version", tls_version) + _setter("tls_version", tls_version) @property @pulumi.getter(name="certificateType") @@ -155,15 +180,36 @@ def __init__(__self__, *, > **NOTE** Either `key_vault_certificate_id` or `key_vault_secret_id` has to be specified. :param pulumi.Input[str] tls_version: The minimum TLS protocol version that is used for HTTPS. Possible values are `TLS10` (representing TLS 1.0/1.1), `TLS12` (representing TLS 1.2) and `None` (representing no minimums). Defaults to `TLS12`. """ + EndpointCustomDomainUserManagedHttpsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_certificate_id=key_vault_certificate_id, + key_vault_secret_id=key_vault_secret_id, + tls_version=tls_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_certificate_id: Optional[pulumi.Input[str]] = None, + key_vault_secret_id: Optional[pulumi.Input[str]] = None, + tls_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_certificate_id is None and 'keyVaultCertificateId' in kwargs: + key_vault_certificate_id = kwargs['keyVaultCertificateId'] + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + if tls_version is None and 'tlsVersion' in kwargs: + tls_version = kwargs['tlsVersion'] + if key_vault_certificate_id is not None: warnings.warn("""This is deprecated in favor of `key_vault_secret_id` as the service is actually looking for a secret, not a certificate""", DeprecationWarning) pulumi.log.warn("""key_vault_certificate_id is deprecated: This is deprecated in favor of `key_vault_secret_id` as the service is actually looking for a secret, not a certificate""") if key_vault_certificate_id is not None: - pulumi.set(__self__, "key_vault_certificate_id", key_vault_certificate_id) + _setter("key_vault_certificate_id", key_vault_certificate_id) if key_vault_secret_id is not None: - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) + _setter("key_vault_secret_id", key_vault_secret_id) if tls_version is not None: - pulumi.set(__self__, "tls_version", tls_version) + _setter("tls_version", tls_version) @property @pulumi.getter(name="keyVaultCertificateId") @@ -256,48 +302,145 @@ def __init__(__self__, *, :param pulumi.Input['EndpointDeliveryRuleUrlRedirectActionArgs'] url_redirect_action: A `url_redirect_action` block as defined below. :param pulumi.Input['EndpointDeliveryRuleUrlRewriteActionArgs'] url_rewrite_action: A `url_rewrite_action` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "order", order) + EndpointDeliveryRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + order=order, + cache_expiration_action=cache_expiration_action, + cache_key_query_string_action=cache_key_query_string_action, + cookies_conditions=cookies_conditions, + device_condition=device_condition, + http_version_conditions=http_version_conditions, + modify_request_header_actions=modify_request_header_actions, + modify_response_header_actions=modify_response_header_actions, + post_arg_conditions=post_arg_conditions, + query_string_conditions=query_string_conditions, + remote_address_conditions=remote_address_conditions, + request_body_conditions=request_body_conditions, + request_header_conditions=request_header_conditions, + request_method_condition=request_method_condition, + request_scheme_condition=request_scheme_condition, + request_uri_conditions=request_uri_conditions, + url_file_extension_conditions=url_file_extension_conditions, + url_file_name_conditions=url_file_name_conditions, + url_path_conditions=url_path_conditions, + url_redirect_action=url_redirect_action, + url_rewrite_action=url_rewrite_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + cache_expiration_action: Optional[pulumi.Input['EndpointDeliveryRuleCacheExpirationActionArgs']] = None, + cache_key_query_string_action: Optional[pulumi.Input['EndpointDeliveryRuleCacheKeyQueryStringActionArgs']] = None, + cookies_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleCookiesConditionArgs']]]] = None, + device_condition: Optional[pulumi.Input['EndpointDeliveryRuleDeviceConditionArgs']] = None, + http_version_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleHttpVersionConditionArgs']]]] = None, + modify_request_header_actions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleModifyRequestHeaderActionArgs']]]] = None, + modify_response_header_actions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleModifyResponseHeaderActionArgs']]]] = None, + post_arg_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRulePostArgConditionArgs']]]] = None, + query_string_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleQueryStringConditionArgs']]]] = None, + remote_address_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleRemoteAddressConditionArgs']]]] = None, + request_body_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleRequestBodyConditionArgs']]]] = None, + request_header_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleRequestHeaderConditionArgs']]]] = None, + request_method_condition: Optional[pulumi.Input['EndpointDeliveryRuleRequestMethodConditionArgs']] = None, + request_scheme_condition: Optional[pulumi.Input['EndpointDeliveryRuleRequestSchemeConditionArgs']] = None, + request_uri_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleRequestUriConditionArgs']]]] = None, + url_file_extension_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleUrlFileExtensionConditionArgs']]]] = None, + url_file_name_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleUrlFileNameConditionArgs']]]] = None, + url_path_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleUrlPathConditionArgs']]]] = None, + url_redirect_action: Optional[pulumi.Input['EndpointDeliveryRuleUrlRedirectActionArgs']] = None, + url_rewrite_action: Optional[pulumi.Input['EndpointDeliveryRuleUrlRewriteActionArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if order is None: + raise TypeError("Missing 'order' argument") + if cache_expiration_action is None and 'cacheExpirationAction' in kwargs: + cache_expiration_action = kwargs['cacheExpirationAction'] + if cache_key_query_string_action is None and 'cacheKeyQueryStringAction' in kwargs: + cache_key_query_string_action = kwargs['cacheKeyQueryStringAction'] + if cookies_conditions is None and 'cookiesConditions' in kwargs: + cookies_conditions = kwargs['cookiesConditions'] + if device_condition is None and 'deviceCondition' in kwargs: + device_condition = kwargs['deviceCondition'] + if http_version_conditions is None and 'httpVersionConditions' in kwargs: + http_version_conditions = kwargs['httpVersionConditions'] + if modify_request_header_actions is None and 'modifyRequestHeaderActions' in kwargs: + modify_request_header_actions = kwargs['modifyRequestHeaderActions'] + if modify_response_header_actions is None and 'modifyResponseHeaderActions' in kwargs: + modify_response_header_actions = kwargs['modifyResponseHeaderActions'] + if post_arg_conditions is None and 'postArgConditions' in kwargs: + post_arg_conditions = kwargs['postArgConditions'] + if query_string_conditions is None and 'queryStringConditions' in kwargs: + query_string_conditions = kwargs['queryStringConditions'] + if remote_address_conditions is None and 'remoteAddressConditions' in kwargs: + remote_address_conditions = kwargs['remoteAddressConditions'] + if request_body_conditions is None and 'requestBodyConditions' in kwargs: + request_body_conditions = kwargs['requestBodyConditions'] + if request_header_conditions is None and 'requestHeaderConditions' in kwargs: + request_header_conditions = kwargs['requestHeaderConditions'] + if request_method_condition is None and 'requestMethodCondition' in kwargs: + request_method_condition = kwargs['requestMethodCondition'] + if request_scheme_condition is None and 'requestSchemeCondition' in kwargs: + request_scheme_condition = kwargs['requestSchemeCondition'] + if request_uri_conditions is None and 'requestUriConditions' in kwargs: + request_uri_conditions = kwargs['requestUriConditions'] + if url_file_extension_conditions is None and 'urlFileExtensionConditions' in kwargs: + url_file_extension_conditions = kwargs['urlFileExtensionConditions'] + if url_file_name_conditions is None and 'urlFileNameConditions' in kwargs: + url_file_name_conditions = kwargs['urlFileNameConditions'] + if url_path_conditions is None and 'urlPathConditions' in kwargs: + url_path_conditions = kwargs['urlPathConditions'] + if url_redirect_action is None and 'urlRedirectAction' in kwargs: + url_redirect_action = kwargs['urlRedirectAction'] + if url_rewrite_action is None and 'urlRewriteAction' in kwargs: + url_rewrite_action = kwargs['urlRewriteAction'] + + _setter("name", name) + _setter("order", order) if cache_expiration_action is not None: - pulumi.set(__self__, "cache_expiration_action", cache_expiration_action) + _setter("cache_expiration_action", cache_expiration_action) if cache_key_query_string_action is not None: - pulumi.set(__self__, "cache_key_query_string_action", cache_key_query_string_action) + _setter("cache_key_query_string_action", cache_key_query_string_action) if cookies_conditions is not None: - pulumi.set(__self__, "cookies_conditions", cookies_conditions) + _setter("cookies_conditions", cookies_conditions) if device_condition is not None: - pulumi.set(__self__, "device_condition", device_condition) + _setter("device_condition", device_condition) if http_version_conditions is not None: - pulumi.set(__self__, "http_version_conditions", http_version_conditions) + _setter("http_version_conditions", http_version_conditions) if modify_request_header_actions is not None: - pulumi.set(__self__, "modify_request_header_actions", modify_request_header_actions) + _setter("modify_request_header_actions", modify_request_header_actions) if modify_response_header_actions is not None: - pulumi.set(__self__, "modify_response_header_actions", modify_response_header_actions) + _setter("modify_response_header_actions", modify_response_header_actions) if post_arg_conditions is not None: - pulumi.set(__self__, "post_arg_conditions", post_arg_conditions) + _setter("post_arg_conditions", post_arg_conditions) if query_string_conditions is not None: - pulumi.set(__self__, "query_string_conditions", query_string_conditions) + _setter("query_string_conditions", query_string_conditions) if remote_address_conditions is not None: - pulumi.set(__self__, "remote_address_conditions", remote_address_conditions) + _setter("remote_address_conditions", remote_address_conditions) if request_body_conditions is not None: - pulumi.set(__self__, "request_body_conditions", request_body_conditions) + _setter("request_body_conditions", request_body_conditions) if request_header_conditions is not None: - pulumi.set(__self__, "request_header_conditions", request_header_conditions) + _setter("request_header_conditions", request_header_conditions) if request_method_condition is not None: - pulumi.set(__self__, "request_method_condition", request_method_condition) + _setter("request_method_condition", request_method_condition) if request_scheme_condition is not None: - pulumi.set(__self__, "request_scheme_condition", request_scheme_condition) + _setter("request_scheme_condition", request_scheme_condition) if request_uri_conditions is not None: - pulumi.set(__self__, "request_uri_conditions", request_uri_conditions) + _setter("request_uri_conditions", request_uri_conditions) if url_file_extension_conditions is not None: - pulumi.set(__self__, "url_file_extension_conditions", url_file_extension_conditions) + _setter("url_file_extension_conditions", url_file_extension_conditions) if url_file_name_conditions is not None: - pulumi.set(__self__, "url_file_name_conditions", url_file_name_conditions) + _setter("url_file_name_conditions", url_file_name_conditions) if url_path_conditions is not None: - pulumi.set(__self__, "url_path_conditions", url_path_conditions) + _setter("url_path_conditions", url_path_conditions) if url_redirect_action is not None: - pulumi.set(__self__, "url_redirect_action", url_redirect_action) + _setter("url_redirect_action", url_redirect_action) if url_rewrite_action is not None: - pulumi.set(__self__, "url_rewrite_action", url_rewrite_action) + _setter("url_rewrite_action", url_rewrite_action) @property @pulumi.getter @@ -573,9 +716,24 @@ def __init__(__self__, *, :param pulumi.Input[str] behavior: The behavior of the cache. Valid values are `BypassCache`, `Override` and `SetIfMissing`. :param pulumi.Input[str] duration: Duration of the cache. Only allowed when `behavior` is set to `Override` or `SetIfMissing`. Format: `[d.]hh:mm:ss` """ - pulumi.set(__self__, "behavior", behavior) + EndpointDeliveryRuleCacheExpirationActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + behavior=behavior, + duration=duration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + behavior: Optional[pulumi.Input[str]] = None, + duration: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if behavior is None: + raise TypeError("Missing 'behavior' argument") + + _setter("behavior", behavior) if duration is not None: - pulumi.set(__self__, "duration", duration) + _setter("duration", duration) @property @pulumi.getter @@ -611,9 +769,24 @@ def __init__(__self__, *, :param pulumi.Input[str] behavior: The behavior of the cache key for query strings. Valid values are `Exclude`, `ExcludeAll`, `Include` and `IncludeAll`. :param pulumi.Input[str] parameters: Comma separated list of parameter values. """ - pulumi.set(__self__, "behavior", behavior) + EndpointDeliveryRuleCacheKeyQueryStringActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + behavior=behavior, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + behavior: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if behavior is None: + raise TypeError("Missing 'behavior' argument") + + _setter("behavior", behavior) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -655,14 +828,41 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: Defaults to `false`. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + EndpointDeliveryRuleCookiesConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + selector=selector, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + selector: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) + _setter("selector", selector) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -736,11 +936,32 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: Defaults to `false`. :param pulumi.Input[str] operator: Valid values are `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + EndpointDeliveryRuleDeviceConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -790,11 +1011,32 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: Defaults to `false`. :param pulumi.Input[str] operator: Valid values are `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + EndpointDeliveryRuleHttpVersionConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -844,10 +1086,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The header name. :param pulumi.Input[str] value: The value of the header. Only needed when `action` is set to `Append` or `overwrite`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + EndpointDeliveryRuleModifyRequestHeaderActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -897,10 +1158,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The header name. :param pulumi.Input[str] value: The value of the header. Only needed when `action` is set to `Append` or `overwrite`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + EndpointDeliveryRuleModifyResponseHeaderActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -954,14 +1234,41 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: Defaults to `false`. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + EndpointDeliveryRulePostArgConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + selector=selector, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + selector: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) + _setter("selector", selector) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1037,13 +1344,36 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: Defaults to `false`. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleQueryStringConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1105,11 +1435,32 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] match_values: List of string values. For `GeoMatch` `operator` this should be a list of country codes (e.g. `US` or `DE`). List of IP address if `operator` equals to `IPMatch`. This is required if `operator` is not `Any`. :param pulumi.Input[bool] negate_condition: Defaults to `false`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleRemoteAddressConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) @property @pulumi.getter @@ -1161,13 +1512,36 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: Defaults to `false`. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleRequestBodyConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1233,14 +1607,41 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: Defaults to `false`. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + EndpointDeliveryRuleRequestHeaderConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + selector=selector, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + selector: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) + _setter("selector", selector) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1314,11 +1715,32 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: Defaults to `false`. :param pulumi.Input[str] operator: Valid values are `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + EndpointDeliveryRuleRequestMethodConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -1368,11 +1790,32 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: Defaults to `false`. :param pulumi.Input[str] operator: Valid values are `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + EndpointDeliveryRuleRequestSchemeConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -1424,13 +1867,36 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: Defaults to `false`. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleRequestUriConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1494,13 +1960,36 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: Defaults to `false`. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleUrlFileExtensionConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1564,13 +2053,36 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: Defaults to `false`. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleUrlFileNameConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1634,13 +2146,36 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: Defaults to `false`. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleUrlPathConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1708,17 +2243,44 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol: Specifies the protocol part of the URL. Valid values are `MatchRequest`, `Http` and `Https`. :param pulumi.Input[str] query_string: Specifies the query string part of the URL. This value must not start with a `?` or `&` and must be in `=` format separated by `&`. """ - pulumi.set(__self__, "redirect_type", redirect_type) + EndpointDeliveryRuleUrlRedirectActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + redirect_type=redirect_type, + fragment=fragment, + hostname=hostname, + path=path, + protocol=protocol, + query_string=query_string, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + redirect_type: Optional[pulumi.Input[str]] = None, + fragment: Optional[pulumi.Input[str]] = None, + hostname: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + query_string: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if redirect_type is None and 'redirectType' in kwargs: + redirect_type = kwargs['redirectType'] + if redirect_type is None: + raise TypeError("Missing 'redirect_type' argument") + if query_string is None and 'queryString' in kwargs: + query_string = kwargs['queryString'] + + _setter("redirect_type", redirect_type) if fragment is not None: - pulumi.set(__self__, "fragment", fragment) + _setter("fragment", fragment) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if query_string is not None: - pulumi.set(__self__, "query_string", query_string) + _setter("query_string", query_string) @property @pulumi.getter(name="redirectType") @@ -1804,10 +2366,33 @@ def __init__(__self__, *, :param pulumi.Input[str] source_pattern: This value must start with a `/` and can't be longer than 260 characters. :param pulumi.Input[bool] preserve_unmatched_path: Defaults to `true`. """ - pulumi.set(__self__, "destination", destination) - pulumi.set(__self__, "source_pattern", source_pattern) + EndpointDeliveryRuleUrlRewriteActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination=destination, + source_pattern=source_pattern, + preserve_unmatched_path=preserve_unmatched_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination: Optional[pulumi.Input[str]] = None, + source_pattern: Optional[pulumi.Input[str]] = None, + preserve_unmatched_path: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination is None: + raise TypeError("Missing 'destination' argument") + if source_pattern is None and 'sourcePattern' in kwargs: + source_pattern = kwargs['sourcePattern'] + if source_pattern is None: + raise TypeError("Missing 'source_pattern' argument") + if preserve_unmatched_path is None and 'preserveUnmatchedPath' in kwargs: + preserve_unmatched_path = kwargs['preserveUnmatchedPath'] + + _setter("destination", destination) + _setter("source_pattern", source_pattern) if preserve_unmatched_path is not None: - pulumi.set(__self__, "preserve_unmatched_path", preserve_unmatched_path) + _setter("preserve_unmatched_path", preserve_unmatched_path) @property @pulumi.getter @@ -1857,9 +2442,34 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] country_codes: A List of two letter country codes (e.g. `US`, `GB`) to be associated with this Geo Filter. :param pulumi.Input[str] relative_path: The relative path applicable to geo filter. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "country_codes", country_codes) - pulumi.set(__self__, "relative_path", relative_path) + EndpointGeoFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + country_codes=country_codes, + relative_path=relative_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + country_codes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + relative_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if country_codes is None and 'countryCodes' in kwargs: + country_codes = kwargs['countryCodes'] + if country_codes is None: + raise TypeError("Missing 'country_codes' argument") + if relative_path is None and 'relativePath' in kwargs: + relative_path = kwargs['relativePath'] + if relative_path is None: + raise TypeError("Missing 'relative_path' argument") + + _setter("action", action) + _setter("country_codes", country_codes) + _setter("relative_path", relative_path) @property @pulumi.getter @@ -1915,18 +2525,51 @@ def __init__(__self__, *, :param pulumi.Input['EndpointGlobalDeliveryRuleUrlRedirectActionArgs'] url_redirect_action: A `url_redirect_action` block as defined below. :param pulumi.Input['EndpointGlobalDeliveryRuleUrlRewriteActionArgs'] url_rewrite_action: A `url_rewrite_action` block as defined below. """ + EndpointGlobalDeliveryRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache_expiration_action=cache_expiration_action, + cache_key_query_string_action=cache_key_query_string_action, + modify_request_header_actions=modify_request_header_actions, + modify_response_header_actions=modify_response_header_actions, + url_redirect_action=url_redirect_action, + url_rewrite_action=url_rewrite_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache_expiration_action: Optional[pulumi.Input['EndpointGlobalDeliveryRuleCacheExpirationActionArgs']] = None, + cache_key_query_string_action: Optional[pulumi.Input['EndpointGlobalDeliveryRuleCacheKeyQueryStringActionArgs']] = None, + modify_request_header_actions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointGlobalDeliveryRuleModifyRequestHeaderActionArgs']]]] = None, + modify_response_header_actions: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointGlobalDeliveryRuleModifyResponseHeaderActionArgs']]]] = None, + url_redirect_action: Optional[pulumi.Input['EndpointGlobalDeliveryRuleUrlRedirectActionArgs']] = None, + url_rewrite_action: Optional[pulumi.Input['EndpointGlobalDeliveryRuleUrlRewriteActionArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cache_expiration_action is None and 'cacheExpirationAction' in kwargs: + cache_expiration_action = kwargs['cacheExpirationAction'] + if cache_key_query_string_action is None and 'cacheKeyQueryStringAction' in kwargs: + cache_key_query_string_action = kwargs['cacheKeyQueryStringAction'] + if modify_request_header_actions is None and 'modifyRequestHeaderActions' in kwargs: + modify_request_header_actions = kwargs['modifyRequestHeaderActions'] + if modify_response_header_actions is None and 'modifyResponseHeaderActions' in kwargs: + modify_response_header_actions = kwargs['modifyResponseHeaderActions'] + if url_redirect_action is None and 'urlRedirectAction' in kwargs: + url_redirect_action = kwargs['urlRedirectAction'] + if url_rewrite_action is None and 'urlRewriteAction' in kwargs: + url_rewrite_action = kwargs['urlRewriteAction'] + if cache_expiration_action is not None: - pulumi.set(__self__, "cache_expiration_action", cache_expiration_action) + _setter("cache_expiration_action", cache_expiration_action) if cache_key_query_string_action is not None: - pulumi.set(__self__, "cache_key_query_string_action", cache_key_query_string_action) + _setter("cache_key_query_string_action", cache_key_query_string_action) if modify_request_header_actions is not None: - pulumi.set(__self__, "modify_request_header_actions", modify_request_header_actions) + _setter("modify_request_header_actions", modify_request_header_actions) if modify_response_header_actions is not None: - pulumi.set(__self__, "modify_response_header_actions", modify_response_header_actions) + _setter("modify_response_header_actions", modify_response_header_actions) if url_redirect_action is not None: - pulumi.set(__self__, "url_redirect_action", url_redirect_action) + _setter("url_redirect_action", url_redirect_action) if url_rewrite_action is not None: - pulumi.set(__self__, "url_rewrite_action", url_rewrite_action) + _setter("url_rewrite_action", url_rewrite_action) @property @pulumi.getter(name="cacheExpirationAction") @@ -2010,9 +2653,24 @@ def __init__(__self__, *, :param pulumi.Input[str] behavior: The behavior of the cache. Valid values are `BypassCache`, `Override` and `SetIfMissing`. :param pulumi.Input[str] duration: Duration of the cache. Only allowed when `behavior` is set to `Override` or `SetIfMissing`. Format: `[d.]hh:mm:ss` """ - pulumi.set(__self__, "behavior", behavior) + EndpointGlobalDeliveryRuleCacheExpirationActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + behavior=behavior, + duration=duration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + behavior: Optional[pulumi.Input[str]] = None, + duration: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if behavior is None: + raise TypeError("Missing 'behavior' argument") + + _setter("behavior", behavior) if duration is not None: - pulumi.set(__self__, "duration", duration) + _setter("duration", duration) @property @pulumi.getter @@ -2048,9 +2706,24 @@ def __init__(__self__, *, :param pulumi.Input[str] behavior: The behavior of the cache key for query strings. Valid values are `Exclude`, `ExcludeAll`, `Include` and `IncludeAll`. :param pulumi.Input[str] parameters: Comma separated list of parameter values. """ - pulumi.set(__self__, "behavior", behavior) + EndpointGlobalDeliveryRuleCacheKeyQueryStringActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + behavior=behavior, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + behavior: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if behavior is None: + raise TypeError("Missing 'behavior' argument") + + _setter("behavior", behavior) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -2088,10 +2761,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The header name. :param pulumi.Input[str] value: The value of the header. Only needed when `action` is set to `Append` or `overwrite`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + EndpointGlobalDeliveryRuleModifyRequestHeaderActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2141,10 +2833,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The header name. :param pulumi.Input[str] value: The value of the header. Only needed when `action` is set to `Append` or `overwrite`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + EndpointGlobalDeliveryRuleModifyResponseHeaderActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2200,17 +2911,44 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol: Specifies the protocol part of the URL. Valid values are `MatchRequest`, `Http` and `Https`. :param pulumi.Input[str] query_string: Specifies the query string part of the URL. This value must not start with a `?` or `&` and must be in `=` format separated by `&`. """ - pulumi.set(__self__, "redirect_type", redirect_type) + EndpointGlobalDeliveryRuleUrlRedirectActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + redirect_type=redirect_type, + fragment=fragment, + hostname=hostname, + path=path, + protocol=protocol, + query_string=query_string, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + redirect_type: Optional[pulumi.Input[str]] = None, + fragment: Optional[pulumi.Input[str]] = None, + hostname: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + query_string: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if redirect_type is None and 'redirectType' in kwargs: + redirect_type = kwargs['redirectType'] + if redirect_type is None: + raise TypeError("Missing 'redirect_type' argument") + if query_string is None and 'queryString' in kwargs: + query_string = kwargs['queryString'] + + _setter("redirect_type", redirect_type) if fragment is not None: - pulumi.set(__self__, "fragment", fragment) + _setter("fragment", fragment) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if query_string is not None: - pulumi.set(__self__, "query_string", query_string) + _setter("query_string", query_string) @property @pulumi.getter(name="redirectType") @@ -2296,10 +3034,33 @@ def __init__(__self__, *, :param pulumi.Input[str] source_pattern: This value must start with a `/` and can't be longer than 260 characters. :param pulumi.Input[bool] preserve_unmatched_path: Defaults to `true`. """ - pulumi.set(__self__, "destination", destination) - pulumi.set(__self__, "source_pattern", source_pattern) + EndpointGlobalDeliveryRuleUrlRewriteActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination=destination, + source_pattern=source_pattern, + preserve_unmatched_path=preserve_unmatched_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination: Optional[pulumi.Input[str]] = None, + source_pattern: Optional[pulumi.Input[str]] = None, + preserve_unmatched_path: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination is None: + raise TypeError("Missing 'destination' argument") + if source_pattern is None and 'sourcePattern' in kwargs: + source_pattern = kwargs['sourcePattern'] + if source_pattern is None: + raise TypeError("Missing 'source_pattern' argument") + if preserve_unmatched_path is None and 'preserveUnmatchedPath' in kwargs: + preserve_unmatched_path = kwargs['preserveUnmatchedPath'] + + _setter("destination", destination) + _setter("source_pattern", source_pattern) if preserve_unmatched_path is not None: - pulumi.set(__self__, "preserve_unmatched_path", preserve_unmatched_path) + _setter("preserve_unmatched_path", preserve_unmatched_path) @property @pulumi.getter @@ -2351,12 +3112,39 @@ def __init__(__self__, *, :param pulumi.Input[int] http_port: The HTTP port of the origin. Defaults to `80`. Changing this forces a new resource to be created. :param pulumi.Input[int] https_port: The HTTPS port of the origin. Defaults to `443`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "host_name", host_name) - pulumi.set(__self__, "name", name) + EndpointOriginArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + name=name, + http_port=http_port, + https_port=https_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + http_port: Optional[pulumi.Input[int]] = None, + https_port: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if http_port is None and 'httpPort' in kwargs: + http_port = kwargs['httpPort'] + if https_port is None and 'httpsPort' in kwargs: + https_port = kwargs['httpsPort'] + + _setter("host_name", host_name) + _setter("name", name) if http_port is not None: - pulumi.set(__self__, "http_port", http_port) + _setter("http_port", http_port) if https_port is not None: - pulumi.set(__self__, "https_port", https_port) + _setter("https_port", https_port) @property @pulumi.getter(name="hostName") @@ -2420,12 +3208,33 @@ def __init__(__self__, *, ->**NOTE:** It may take up to 15 minutes for the Front Door Service to validate the state and Domain ownership of the Custom Domain. :param pulumi.Input[str] minimum_tls_version: TLS protocol version that will be used for Https. Possible values include `TLS10` and `TLS12`. Defaults to `TLS12`. """ + FrontdoorCustomDomainTlsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_secret_id=cdn_frontdoor_secret_id, + certificate_type=certificate_type, + minimum_tls_version=minimum_tls_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_secret_id: Optional[pulumi.Input[str]] = None, + certificate_type: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_secret_id is None and 'cdnFrontdoorSecretId' in kwargs: + cdn_frontdoor_secret_id = kwargs['cdnFrontdoorSecretId'] + if certificate_type is None and 'certificateType' in kwargs: + certificate_type = kwargs['certificateType'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if cdn_frontdoor_secret_id is not None: - pulumi.set(__self__, "cdn_frontdoor_secret_id", cdn_frontdoor_secret_id) + _setter("cdn_frontdoor_secret_id", cdn_frontdoor_secret_id) if certificate_type is not None: - pulumi.set(__self__, "certificate_type", certificate_type) + _setter("certificate_type", certificate_type) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) @property @pulumi.getter(name="cdnFrontdoorSecretId") @@ -2487,19 +3296,56 @@ def __init__(__self__, *, :param pulumi.Input[int] rate_limit_duration_in_minutes: The rate limit duration in minutes. Defaults to `1`. :param pulumi.Input[int] rate_limit_threshold: The rate limit threshold. Defaults to `10`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + FrontdoorFirewallPolicyCustomRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + type=type, + enabled=enabled, + match_conditions=match_conditions, + priority=priority, + rate_limit_duration_in_minutes=rate_limit_duration_in_minutes, + rate_limit_threshold=rate_limit_threshold, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + match_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyCustomRuleMatchConditionArgs']]]] = None, + priority: Optional[pulumi.Input[int]] = None, + rate_limit_duration_in_minutes: Optional[pulumi.Input[int]] = None, + rate_limit_threshold: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if match_conditions is None and 'matchConditions' in kwargs: + match_conditions = kwargs['matchConditions'] + if rate_limit_duration_in_minutes is None and 'rateLimitDurationInMinutes' in kwargs: + rate_limit_duration_in_minutes = kwargs['rateLimitDurationInMinutes'] + if rate_limit_threshold is None and 'rateLimitThreshold' in kwargs: + rate_limit_threshold = kwargs['rateLimitThreshold'] + + _setter("action", action) + _setter("name", name) + _setter("type", type) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if match_conditions is not None: - pulumi.set(__self__, "match_conditions", match_conditions) + _setter("match_conditions", match_conditions) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if rate_limit_duration_in_minutes is not None: - pulumi.set(__self__, "rate_limit_duration_in_minutes", rate_limit_duration_in_minutes) + _setter("rate_limit_duration_in_minutes", rate_limit_duration_in_minutes) if rate_limit_threshold is not None: - pulumi.set(__self__, "rate_limit_threshold", rate_limit_threshold) + _setter("rate_limit_threshold", rate_limit_threshold) @property @pulumi.getter @@ -2615,15 +3461,48 @@ def __init__(__self__, *, :param pulumi.Input[str] selector: Match against a specific key if the `match_variable` is `QueryString`, `PostArgs`, `RequestHeader` or `Cookies`. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: Up to `5` transforms to apply. Possible values are `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `URLDecode` or `URLEncode`. """ - pulumi.set(__self__, "match_values", match_values) - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) + FrontdoorFirewallPolicyCustomRuleMatchConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + match_variable=match_variable, + operator=operator, + negation_condition=negation_condition, + selector=selector, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + match_variable: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + negation_condition: Optional[pulumi.Input[bool]] = None, + selector: Optional[pulumi.Input[str]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if negation_condition is None and 'negationCondition' in kwargs: + negation_condition = kwargs['negationCondition'] + + _setter("match_values", match_values) + _setter("match_variable", match_variable) + _setter("operator", operator) if negation_condition is not None: - pulumi.set(__self__, "negation_condition", negation_condition) + _setter("negation_condition", negation_condition) if selector is not None: - pulumi.set(__self__, "selector", selector) + _setter("selector", selector) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="matchValues") @@ -2713,13 +3592,38 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyManagedRuleExclusionArgs']]] exclusions: One or more `exclusion` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyManagedRuleOverrideArgs']]] overrides: One or more `override` blocks as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "version", version) + FrontdoorFirewallPolicyManagedRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + type=type, + version=version, + exclusions=exclusions, + overrides=overrides, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + exclusions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyManagedRuleExclusionArgs']]]] = None, + overrides: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyManagedRuleOverrideArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("action", action) + _setter("type", type) + _setter("version", version) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) if overrides is not None: - pulumi.set(__self__, "overrides", overrides) + _setter("overrides", overrides) @property @pulumi.getter @@ -2797,9 +3701,32 @@ def __init__(__self__, *, > **NOTE:** `selector` must be set to `*` if `operator` is set to `EqualsAny`. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + FrontdoorFirewallPolicyManagedRuleExclusionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + operator=operator, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + selector: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + + _setter("match_variable", match_variable) + _setter("operator", operator) + _setter("selector", selector) @property @pulumi.getter(name="matchVariable") @@ -2853,11 +3780,30 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyManagedRuleOverrideExclusionArgs']]] exclusions: One or more `exclusion` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyManagedRuleOverrideRuleArgs']]] rules: One or more `rule` blocks as defined below. If none are specified, all of the rules in the group will be disabled. """ - pulumi.set(__self__, "rule_group_name", rule_group_name) + FrontdoorFirewallPolicyManagedRuleOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_group_name=rule_group_name, + exclusions=exclusions, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_group_name: Optional[pulumi.Input[str]] = None, + exclusions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyManagedRuleOverrideExclusionArgs']]]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyManagedRuleOverrideRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_group_name is None and 'ruleGroupName' in kwargs: + rule_group_name = kwargs['ruleGroupName'] + if rule_group_name is None: + raise TypeError("Missing 'rule_group_name' argument") + + _setter("rule_group_name", rule_group_name) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter(name="ruleGroupName") @@ -2911,9 +3857,32 @@ def __init__(__self__, *, > **NOTE:** `selector` must be set to `*` if `operator` is set to `EqualsAny`. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + FrontdoorFirewallPolicyManagedRuleOverrideExclusionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + operator=operator, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + selector: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + + _setter("match_variable", match_variable) + _setter("operator", operator) + _setter("selector", selector) @property @pulumi.getter(name="matchVariable") @@ -2971,12 +3940,35 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Is the managed rule override enabled or disabled. Defaults to `false` :param pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyManagedRuleOverrideRuleExclusionArgs']]] exclusions: One or more `exclusion` blocks as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "rule_id", rule_id) + FrontdoorFirewallPolicyManagedRuleOverrideRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + rule_id=rule_id, + enabled=enabled, + exclusions=exclusions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + rule_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + exclusions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyManagedRuleOverrideRuleExclusionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if rule_id is None and 'ruleId' in kwargs: + rule_id = kwargs['ruleId'] + if rule_id is None: + raise TypeError("Missing 'rule_id' argument") + + _setter("action", action) + _setter("rule_id", rule_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) @property @pulumi.getter @@ -3044,9 +4036,32 @@ def __init__(__self__, *, > **NOTE:** `selector` must be set to `*` if `operator` is set to `EqualsAny`. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + FrontdoorFirewallPolicyManagedRuleOverrideRuleExclusionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + operator=operator, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + selector: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + + _setter("match_variable", match_variable) + _setter("operator", operator) + _setter("selector", selector) @property @pulumi.getter(name="matchVariable") @@ -3104,12 +4119,37 @@ def __init__(__self__, *, > **NOTE:** Health probes can only be disabled if there is a single enabled origin in a single enabled origin group. For more information about the `health_probe` settings please see the [product documentation](https://docs.microsoft.com/azure/frontdoor/health-probes). :param pulumi.Input[str] request_type: Specifies the type of health probe request that is made. Possible values are `GET` and `HEAD`. Defaults to `HEAD`. """ - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) - pulumi.set(__self__, "protocol", protocol) + FrontdoorOriginGroupHealthProbeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + interval_in_seconds=interval_in_seconds, + protocol=protocol, + path=path, + request_type=request_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + interval_in_seconds: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + request_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if interval_in_seconds is None: + raise TypeError("Missing 'interval_in_seconds' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if request_type is None and 'requestType' in kwargs: + request_type = kwargs['requestType'] + + _setter("interval_in_seconds", interval_in_seconds) + _setter("protocol", protocol) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if request_type is not None: - pulumi.set(__self__, "request_type", request_type) + _setter("request_type", request_type) @property @pulumi.getter(name="intervalInSeconds") @@ -3173,12 +4213,33 @@ def __init__(__self__, *, :param pulumi.Input[int] sample_size: Specifies the number of samples to consider for load balancing decisions. Possible values are between `0` and `255` (inclusive). Defaults to `4`. :param pulumi.Input[int] successful_samples_required: Specifies the number of samples within the sample period that must succeed. Possible values are between `0` and `255` (inclusive). Defaults to `3`. """ + FrontdoorOriginGroupLoadBalancingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_latency_in_milliseconds=additional_latency_in_milliseconds, + sample_size=sample_size, + successful_samples_required=successful_samples_required, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_latency_in_milliseconds: Optional[pulumi.Input[int]] = None, + sample_size: Optional[pulumi.Input[int]] = None, + successful_samples_required: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_latency_in_milliseconds is None and 'additionalLatencyInMilliseconds' in kwargs: + additional_latency_in_milliseconds = kwargs['additionalLatencyInMilliseconds'] + if sample_size is None and 'sampleSize' in kwargs: + sample_size = kwargs['sampleSize'] + if successful_samples_required is None and 'successfulSamplesRequired' in kwargs: + successful_samples_required = kwargs['successfulSamplesRequired'] + if additional_latency_in_milliseconds is not None: - pulumi.set(__self__, "additional_latency_in_milliseconds", additional_latency_in_milliseconds) + _setter("additional_latency_in_milliseconds", additional_latency_in_milliseconds) if sample_size is not None: - pulumi.set(__self__, "sample_size", sample_size) + _setter("sample_size", sample_size) if successful_samples_required is not None: - pulumi.set(__self__, "successful_samples_required", successful_samples_required) + _setter("successful_samples_required", successful_samples_required) @property @pulumi.getter(name="additionalLatencyInMilliseconds") @@ -3234,12 +4295,39 @@ def __init__(__self__, *, > **NOTE:** `target_type` cannot be specified when using a Load Balancer as an Origin. """ - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "private_link_target_id", private_link_target_id) + FrontdoorOriginPrivateLinkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + private_link_target_id=private_link_target_id, + request_message=request_message, + target_type=target_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + private_link_target_id: Optional[pulumi.Input[str]] = None, + request_message: Optional[pulumi.Input[str]] = None, + target_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is None: + raise TypeError("Missing 'location' argument") + if private_link_target_id is None and 'privateLinkTargetId' in kwargs: + private_link_target_id = kwargs['privateLinkTargetId'] + if private_link_target_id is None: + raise TypeError("Missing 'private_link_target_id' argument") + if request_message is None and 'requestMessage' in kwargs: + request_message = kwargs['requestMessage'] + if target_type is None and 'targetType' in kwargs: + target_type = kwargs['targetType'] + + _setter("location", location) + _setter("private_link_target_id", private_link_target_id) if request_message is not None: - pulumi.set(__self__, "request_message", request_message) + _setter("request_message", request_message) if target_type is not None: - pulumi.set(__self__, "target_type", target_type) + _setter("target_type", target_type) @property @pulumi.getter @@ -3311,14 +4399,39 @@ def __init__(__self__, *, > **NOTE:** The value of the `query_string_caching_behavior` determines if the `query_strings` field will be used as an include list or an ignore list. :param pulumi.Input[Sequence[pulumi.Input[str]]] query_strings: Query strings to include or ignore. """ + FrontdoorRouteCacheArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compression_enabled=compression_enabled, + content_types_to_compresses=content_types_to_compresses, + query_string_caching_behavior=query_string_caching_behavior, + query_strings=query_strings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compression_enabled: Optional[pulumi.Input[bool]] = None, + content_types_to_compresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + query_string_caching_behavior: Optional[pulumi.Input[str]] = None, + query_strings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compression_enabled is None and 'compressionEnabled' in kwargs: + compression_enabled = kwargs['compressionEnabled'] + if content_types_to_compresses is None and 'contentTypesToCompresses' in kwargs: + content_types_to_compresses = kwargs['contentTypesToCompresses'] + if query_string_caching_behavior is None and 'queryStringCachingBehavior' in kwargs: + query_string_caching_behavior = kwargs['queryStringCachingBehavior'] + if query_strings is None and 'queryStrings' in kwargs: + query_strings = kwargs['queryStrings'] + if compression_enabled is not None: - pulumi.set(__self__, "compression_enabled", compression_enabled) + _setter("compression_enabled", compression_enabled) if content_types_to_compresses is not None: - pulumi.set(__self__, "content_types_to_compresses", content_types_to_compresses) + _setter("content_types_to_compresses", content_types_to_compresses) if query_string_caching_behavior is not None: - pulumi.set(__self__, "query_string_caching_behavior", query_string_caching_behavior) + _setter("query_string_caching_behavior", query_string_caching_behavior) if query_strings is not None: - pulumi.set(__self__, "query_strings", query_strings) + _setter("query_strings", query_strings) @property @pulumi.getter(name="compressionEnabled") @@ -3388,16 +4501,45 @@ def __init__(__self__, *, :param pulumi.Input['FrontdoorRuleActionsUrlRedirectActionArgs'] url_redirect_action: A `url_redirect_action` block as defined below. You may **not** have a `url_redirect_action` **and** a `url_rewrite_action` defined in the same `actions` block. :param pulumi.Input['FrontdoorRuleActionsUrlRewriteActionArgs'] url_rewrite_action: A `url_rewrite_action` block as defined below. You may **not** have a `url_rewrite_action` **and** a `url_redirect_action` defined in the same `actions` block. """ + FrontdoorRuleActionsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + request_header_actions=request_header_actions, + response_header_actions=response_header_actions, + route_configuration_override_action=route_configuration_override_action, + url_redirect_action=url_redirect_action, + url_rewrite_action=url_rewrite_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + request_header_actions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleActionsRequestHeaderActionArgs']]]] = None, + response_header_actions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleActionsResponseHeaderActionArgs']]]] = None, + route_configuration_override_action: Optional[pulumi.Input['FrontdoorRuleActionsRouteConfigurationOverrideActionArgs']] = None, + url_redirect_action: Optional[pulumi.Input['FrontdoorRuleActionsUrlRedirectActionArgs']] = None, + url_rewrite_action: Optional[pulumi.Input['FrontdoorRuleActionsUrlRewriteActionArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if request_header_actions is None and 'requestHeaderActions' in kwargs: + request_header_actions = kwargs['requestHeaderActions'] + if response_header_actions is None and 'responseHeaderActions' in kwargs: + response_header_actions = kwargs['responseHeaderActions'] + if route_configuration_override_action is None and 'routeConfigurationOverrideAction' in kwargs: + route_configuration_override_action = kwargs['routeConfigurationOverrideAction'] + if url_redirect_action is None and 'urlRedirectAction' in kwargs: + url_redirect_action = kwargs['urlRedirectAction'] + if url_rewrite_action is None and 'urlRewriteAction' in kwargs: + url_rewrite_action = kwargs['urlRewriteAction'] + if request_header_actions is not None: - pulumi.set(__self__, "request_header_actions", request_header_actions) + _setter("request_header_actions", request_header_actions) if response_header_actions is not None: - pulumi.set(__self__, "response_header_actions", response_header_actions) + _setter("response_header_actions", response_header_actions) if route_configuration_override_action is not None: - pulumi.set(__self__, "route_configuration_override_action", route_configuration_override_action) + _setter("route_configuration_override_action", route_configuration_override_action) if url_redirect_action is not None: - pulumi.set(__self__, "url_redirect_action", url_redirect_action) + _setter("url_redirect_action", url_redirect_action) if url_rewrite_action is not None: - pulumi.set(__self__, "url_rewrite_action", url_rewrite_action) + _setter("url_rewrite_action", url_rewrite_action) @property @pulumi.getter(name="requestHeaderActions") @@ -3475,10 +4617,33 @@ def __init__(__self__, *, ->**NOTE:** `value` is required if the `header_action` is set to `Append` or `Overwrite`. """ - pulumi.set(__self__, "header_action", header_action) - pulumi.set(__self__, "header_name", header_name) + FrontdoorRuleActionsRequestHeaderActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_action=header_action, + header_name=header_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_action: Optional[pulumi.Input[str]] = None, + header_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_action is None and 'headerAction' in kwargs: + header_action = kwargs['headerAction'] + if header_action is None: + raise TypeError("Missing 'header_action' argument") + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + + _setter("header_action", header_action) + _setter("header_name", header_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerAction") @@ -3536,10 +4701,33 @@ def __init__(__self__, *, ->**NOTE:** `value` is required if the `header_action` is set to `Append` or `Overwrite`. """ - pulumi.set(__self__, "header_action", header_action) - pulumi.set(__self__, "header_name", header_name) + FrontdoorRuleActionsResponseHeaderActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_action=header_action, + header_name=header_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_action: Optional[pulumi.Input[str]] = None, + header_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_action is None and 'headerAction' in kwargs: + header_action = kwargs['headerAction'] + if header_action is None: + raise TypeError("Missing 'header_action' argument") + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + + _setter("header_action", header_action) + _setter("header_name", header_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerAction") @@ -3607,20 +4795,57 @@ def __init__(__self__, *, ->**NOTE:** `query_string_parameters` is a required field when the `query_string_caching_behavior` is set to `IncludeSpecifiedQueryStrings` or `IgnoreSpecifiedQueryStrings`. """ + FrontdoorRuleActionsRouteConfigurationOverrideActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache_behavior=cache_behavior, + cache_duration=cache_duration, + cdn_frontdoor_origin_group_id=cdn_frontdoor_origin_group_id, + compression_enabled=compression_enabled, + forwarding_protocol=forwarding_protocol, + query_string_caching_behavior=query_string_caching_behavior, + query_string_parameters=query_string_parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache_behavior: Optional[pulumi.Input[str]] = None, + cache_duration: Optional[pulumi.Input[str]] = None, + cdn_frontdoor_origin_group_id: Optional[pulumi.Input[str]] = None, + compression_enabled: Optional[pulumi.Input[bool]] = None, + forwarding_protocol: Optional[pulumi.Input[str]] = None, + query_string_caching_behavior: Optional[pulumi.Input[str]] = None, + query_string_parameters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cache_behavior is None and 'cacheBehavior' in kwargs: + cache_behavior = kwargs['cacheBehavior'] + if cache_duration is None and 'cacheDuration' in kwargs: + cache_duration = kwargs['cacheDuration'] + if cdn_frontdoor_origin_group_id is None and 'cdnFrontdoorOriginGroupId' in kwargs: + cdn_frontdoor_origin_group_id = kwargs['cdnFrontdoorOriginGroupId'] + if compression_enabled is None and 'compressionEnabled' in kwargs: + compression_enabled = kwargs['compressionEnabled'] + if forwarding_protocol is None and 'forwardingProtocol' in kwargs: + forwarding_protocol = kwargs['forwardingProtocol'] + if query_string_caching_behavior is None and 'queryStringCachingBehavior' in kwargs: + query_string_caching_behavior = kwargs['queryStringCachingBehavior'] + if query_string_parameters is None and 'queryStringParameters' in kwargs: + query_string_parameters = kwargs['queryStringParameters'] + if cache_behavior is not None: - pulumi.set(__self__, "cache_behavior", cache_behavior) + _setter("cache_behavior", cache_behavior) if cache_duration is not None: - pulumi.set(__self__, "cache_duration", cache_duration) + _setter("cache_duration", cache_duration) if cdn_frontdoor_origin_group_id is not None: - pulumi.set(__self__, "cdn_frontdoor_origin_group_id", cdn_frontdoor_origin_group_id) + _setter("cdn_frontdoor_origin_group_id", cdn_frontdoor_origin_group_id) if compression_enabled is not None: - pulumi.set(__self__, "compression_enabled", compression_enabled) + _setter("compression_enabled", compression_enabled) if forwarding_protocol is not None: - pulumi.set(__self__, "forwarding_protocol", forwarding_protocol) + _setter("forwarding_protocol", forwarding_protocol) if query_string_caching_behavior is not None: - pulumi.set(__self__, "query_string_caching_behavior", query_string_caching_behavior) + _setter("query_string_caching_behavior", query_string_caching_behavior) if query_string_parameters is not None: - pulumi.set(__self__, "query_string_parameters", query_string_parameters) + _setter("query_string_parameters", query_string_parameters) @property @pulumi.getter(name="cacheBehavior") @@ -3730,16 +4955,53 @@ def __init__(__self__, *, :param pulumi.Input[str] query_string: The query string used in the redirect URL. The value must be in the <key>=<value> or <key>={`action_server_variable`} format and must not include the leading `?`, leave blank to preserve the incoming query string. Maximum allowed length for this field is `2048` characters. Defaults to an empty string. Defaults to `""`. :param pulumi.Input[str] redirect_protocol: The protocol the request will be redirected as. Possible values include `MatchRequest`, `Http` or `Https`. Defaults to `MatchRequest`. """ - pulumi.set(__self__, "destination_hostname", destination_hostname) - pulumi.set(__self__, "redirect_type", redirect_type) + FrontdoorRuleActionsUrlRedirectActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_hostname=destination_hostname, + redirect_type=redirect_type, + destination_fragment=destination_fragment, + destination_path=destination_path, + query_string=query_string, + redirect_protocol=redirect_protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_hostname: Optional[pulumi.Input[str]] = None, + redirect_type: Optional[pulumi.Input[str]] = None, + destination_fragment: Optional[pulumi.Input[str]] = None, + destination_path: Optional[pulumi.Input[str]] = None, + query_string: Optional[pulumi.Input[str]] = None, + redirect_protocol: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_hostname is None and 'destinationHostname' in kwargs: + destination_hostname = kwargs['destinationHostname'] + if destination_hostname is None: + raise TypeError("Missing 'destination_hostname' argument") + if redirect_type is None and 'redirectType' in kwargs: + redirect_type = kwargs['redirectType'] + if redirect_type is None: + raise TypeError("Missing 'redirect_type' argument") + if destination_fragment is None and 'destinationFragment' in kwargs: + destination_fragment = kwargs['destinationFragment'] + if destination_path is None and 'destinationPath' in kwargs: + destination_path = kwargs['destinationPath'] + if query_string is None and 'queryString' in kwargs: + query_string = kwargs['queryString'] + if redirect_protocol is None and 'redirectProtocol' in kwargs: + redirect_protocol = kwargs['redirectProtocol'] + + _setter("destination_hostname", destination_hostname) + _setter("redirect_type", redirect_type) if destination_fragment is not None: - pulumi.set(__self__, "destination_fragment", destination_fragment) + _setter("destination_fragment", destination_fragment) if destination_path is not None: - pulumi.set(__self__, "destination_path", destination_path) + _setter("destination_path", destination_path) if query_string is not None: - pulumi.set(__self__, "query_string", query_string) + _setter("query_string", query_string) if redirect_protocol is not None: - pulumi.set(__self__, "redirect_protocol", redirect_protocol) + _setter("redirect_protocol", redirect_protocol) @property @pulumi.getter(name="destinationHostname") @@ -3825,10 +5087,33 @@ def __init__(__self__, *, :param pulumi.Input[str] source_pattern: The source pattern in the URL path to replace. This uses prefix-based matching. For example, to match all URL paths use a forward slash `"/"` as the source pattern value. :param pulumi.Input[bool] preserve_unmatched_path: Append the remaining path after the source pattern to the new destination path? Possible values `true` or `false`. Defaults to `false`. """ - pulumi.set(__self__, "destination", destination) - pulumi.set(__self__, "source_pattern", source_pattern) + FrontdoorRuleActionsUrlRewriteActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination=destination, + source_pattern=source_pattern, + preserve_unmatched_path=preserve_unmatched_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination: Optional[pulumi.Input[str]] = None, + source_pattern: Optional[pulumi.Input[str]] = None, + preserve_unmatched_path: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination is None: + raise TypeError("Missing 'destination' argument") + if source_pattern is None and 'sourcePattern' in kwargs: + source_pattern = kwargs['sourcePattern'] + if source_pattern is None: + raise TypeError("Missing 'source_pattern' argument") + if preserve_unmatched_path is None and 'preserveUnmatchedPath' in kwargs: + preserve_unmatched_path = kwargs['preserveUnmatchedPath'] + + _setter("destination", destination) + _setter("source_pattern", source_pattern) if preserve_unmatched_path is not None: - pulumi.set(__self__, "preserve_unmatched_path", preserve_unmatched_path) + _setter("preserve_unmatched_path", preserve_unmatched_path) @property @pulumi.getter @@ -3910,44 +5195,129 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsUrlFilenameConditionArgs']]] url_filename_conditions: A `url_filename_condition` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsUrlPathConditionArgs']]] url_path_conditions: A `url_path_condition` block as defined below. """ + FrontdoorRuleConditionsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_port_conditions=client_port_conditions, + cookies_conditions=cookies_conditions, + host_name_conditions=host_name_conditions, + http_version_conditions=http_version_conditions, + is_device_conditions=is_device_conditions, + post_args_conditions=post_args_conditions, + query_string_conditions=query_string_conditions, + remote_address_conditions=remote_address_conditions, + request_body_conditions=request_body_conditions, + request_header_conditions=request_header_conditions, + request_method_conditions=request_method_conditions, + request_scheme_conditions=request_scheme_conditions, + request_uri_conditions=request_uri_conditions, + server_port_conditions=server_port_conditions, + socket_address_conditions=socket_address_conditions, + ssl_protocol_conditions=ssl_protocol_conditions, + url_file_extension_conditions=url_file_extension_conditions, + url_filename_conditions=url_filename_conditions, + url_path_conditions=url_path_conditions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_port_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsClientPortConditionArgs']]]] = None, + cookies_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsCookiesConditionArgs']]]] = None, + host_name_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsHostNameConditionArgs']]]] = None, + http_version_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsHttpVersionConditionArgs']]]] = None, + is_device_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsIsDeviceConditionArgs']]]] = None, + post_args_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsPostArgsConditionArgs']]]] = None, + query_string_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsQueryStringConditionArgs']]]] = None, + remote_address_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsRemoteAddressConditionArgs']]]] = None, + request_body_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsRequestBodyConditionArgs']]]] = None, + request_header_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsRequestHeaderConditionArgs']]]] = None, + request_method_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsRequestMethodConditionArgs']]]] = None, + request_scheme_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsRequestSchemeConditionArgs']]]] = None, + request_uri_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsRequestUriConditionArgs']]]] = None, + server_port_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsServerPortConditionArgs']]]] = None, + socket_address_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsSocketAddressConditionArgs']]]] = None, + ssl_protocol_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsSslProtocolConditionArgs']]]] = None, + url_file_extension_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsUrlFileExtensionConditionArgs']]]] = None, + url_filename_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsUrlFilenameConditionArgs']]]] = None, + url_path_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRuleConditionsUrlPathConditionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_port_conditions is None and 'clientPortConditions' in kwargs: + client_port_conditions = kwargs['clientPortConditions'] + if cookies_conditions is None and 'cookiesConditions' in kwargs: + cookies_conditions = kwargs['cookiesConditions'] + if host_name_conditions is None and 'hostNameConditions' in kwargs: + host_name_conditions = kwargs['hostNameConditions'] + if http_version_conditions is None and 'httpVersionConditions' in kwargs: + http_version_conditions = kwargs['httpVersionConditions'] + if is_device_conditions is None and 'isDeviceConditions' in kwargs: + is_device_conditions = kwargs['isDeviceConditions'] + if post_args_conditions is None and 'postArgsConditions' in kwargs: + post_args_conditions = kwargs['postArgsConditions'] + if query_string_conditions is None and 'queryStringConditions' in kwargs: + query_string_conditions = kwargs['queryStringConditions'] + if remote_address_conditions is None and 'remoteAddressConditions' in kwargs: + remote_address_conditions = kwargs['remoteAddressConditions'] + if request_body_conditions is None and 'requestBodyConditions' in kwargs: + request_body_conditions = kwargs['requestBodyConditions'] + if request_header_conditions is None and 'requestHeaderConditions' in kwargs: + request_header_conditions = kwargs['requestHeaderConditions'] + if request_method_conditions is None and 'requestMethodConditions' in kwargs: + request_method_conditions = kwargs['requestMethodConditions'] + if request_scheme_conditions is None and 'requestSchemeConditions' in kwargs: + request_scheme_conditions = kwargs['requestSchemeConditions'] + if request_uri_conditions is None and 'requestUriConditions' in kwargs: + request_uri_conditions = kwargs['requestUriConditions'] + if server_port_conditions is None and 'serverPortConditions' in kwargs: + server_port_conditions = kwargs['serverPortConditions'] + if socket_address_conditions is None and 'socketAddressConditions' in kwargs: + socket_address_conditions = kwargs['socketAddressConditions'] + if ssl_protocol_conditions is None and 'sslProtocolConditions' in kwargs: + ssl_protocol_conditions = kwargs['sslProtocolConditions'] + if url_file_extension_conditions is None and 'urlFileExtensionConditions' in kwargs: + url_file_extension_conditions = kwargs['urlFileExtensionConditions'] + if url_filename_conditions is None and 'urlFilenameConditions' in kwargs: + url_filename_conditions = kwargs['urlFilenameConditions'] + if url_path_conditions is None and 'urlPathConditions' in kwargs: + url_path_conditions = kwargs['urlPathConditions'] + if client_port_conditions is not None: - pulumi.set(__self__, "client_port_conditions", client_port_conditions) + _setter("client_port_conditions", client_port_conditions) if cookies_conditions is not None: - pulumi.set(__self__, "cookies_conditions", cookies_conditions) + _setter("cookies_conditions", cookies_conditions) if host_name_conditions is not None: - pulumi.set(__self__, "host_name_conditions", host_name_conditions) + _setter("host_name_conditions", host_name_conditions) if http_version_conditions is not None: - pulumi.set(__self__, "http_version_conditions", http_version_conditions) + _setter("http_version_conditions", http_version_conditions) if is_device_conditions is not None: - pulumi.set(__self__, "is_device_conditions", is_device_conditions) + _setter("is_device_conditions", is_device_conditions) if post_args_conditions is not None: - pulumi.set(__self__, "post_args_conditions", post_args_conditions) + _setter("post_args_conditions", post_args_conditions) if query_string_conditions is not None: - pulumi.set(__self__, "query_string_conditions", query_string_conditions) + _setter("query_string_conditions", query_string_conditions) if remote_address_conditions is not None: - pulumi.set(__self__, "remote_address_conditions", remote_address_conditions) + _setter("remote_address_conditions", remote_address_conditions) if request_body_conditions is not None: - pulumi.set(__self__, "request_body_conditions", request_body_conditions) + _setter("request_body_conditions", request_body_conditions) if request_header_conditions is not None: - pulumi.set(__self__, "request_header_conditions", request_header_conditions) + _setter("request_header_conditions", request_header_conditions) if request_method_conditions is not None: - pulumi.set(__self__, "request_method_conditions", request_method_conditions) + _setter("request_method_conditions", request_method_conditions) if request_scheme_conditions is not None: - pulumi.set(__self__, "request_scheme_conditions", request_scheme_conditions) + _setter("request_scheme_conditions", request_scheme_conditions) if request_uri_conditions is not None: - pulumi.set(__self__, "request_uri_conditions", request_uri_conditions) + _setter("request_uri_conditions", request_uri_conditions) if server_port_conditions is not None: - pulumi.set(__self__, "server_port_conditions", server_port_conditions) + _setter("server_port_conditions", server_port_conditions) if socket_address_conditions is not None: - pulumi.set(__self__, "socket_address_conditions", socket_address_conditions) + _setter("socket_address_conditions", socket_address_conditions) if ssl_protocol_conditions is not None: - pulumi.set(__self__, "ssl_protocol_conditions", ssl_protocol_conditions) + _setter("ssl_protocol_conditions", ssl_protocol_conditions) if url_file_extension_conditions is not None: - pulumi.set(__self__, "url_file_extension_conditions", url_file_extension_conditions) + _setter("url_file_extension_conditions", url_file_extension_conditions) if url_filename_conditions is not None: - pulumi.set(__self__, "url_filename_conditions", url_filename_conditions) + _setter("url_filename_conditions", url_filename_conditions) if url_path_conditions is not None: - pulumi.set(__self__, "url_path_conditions", url_path_conditions) + _setter("url_path_conditions", url_path_conditions) @property @pulumi.getter(name="clientPortConditions") @@ -4189,11 +5559,32 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] match_values: One or more integer values(e.g. "1") representing the value of the client port to match. If multiple values are specified, they're evaluated using `OR` logic. :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. """ - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsClientPortConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) @property @pulumi.getter @@ -4247,14 +5638,43 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "cookie_name", cookie_name) - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsCookiesConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cookie_name=cookie_name, + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cookie_name: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cookie_name is None and 'cookieName' in kwargs: + cookie_name = kwargs['cookieName'] + if cookie_name is None: + raise TypeError("Missing 'cookie_name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("cookie_name", cookie_name) + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="cookieName") @@ -4330,13 +5750,36 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsHostNameConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -4398,11 +5841,32 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[str] operator: Possible value `Equal`. Defaults to `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + FrontdoorRuleConditionsHttpVersionConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -4452,12 +5916,31 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[str] operator: Possible value `Equal`. Defaults to `Equal`. """ + FrontdoorRuleConditionsIsDeviceConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[str]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -4511,14 +5994,43 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "post_args_name", post_args_name) + FrontdoorRuleConditionsPostArgsConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + post_args_name=post_args_name, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + post_args_name: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if post_args_name is None and 'postArgsName' in kwargs: + post_args_name = kwargs['postArgsName'] + if post_args_name is None: + raise TypeError("Missing 'post_args_name' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) + _setter("post_args_name", post_args_name) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -4594,13 +6106,36 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsQueryStringConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -4664,12 +6199,31 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[str] operator: The type of the remote address to match. Possible values include `Any`, `GeoMatch` or `IPMatch`. Use the `negate_condition` to specify Not `GeoMatch` or Not `IPMatch`. """ + FrontdoorRuleConditionsRemoteAddressConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -4723,12 +6277,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "match_values", match_values) - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsRequestBodyConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + operator=operator, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) + _setter("operator", operator) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="matchValues") @@ -4794,14 +6373,43 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsRequestHeaderConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("header_name", header_name) + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="headerName") @@ -4875,11 +6483,32 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[str] operator: Possible value `Equal`. Defaults to `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + FrontdoorRuleConditionsRequestMethodConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -4929,12 +6558,31 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[str] operator: Possible value `Equal`. Defaults to `Equal`. """ + FrontdoorRuleConditionsRequestSchemeConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[str]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -4986,13 +6634,36 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsRequestUriConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -5054,10 +6725,33 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: A Conditional operator. Possible values include `Any`, `Equal`, `Contains`, `BeginsWith`, `EndsWith`, `LessThan`, `LessThanOrEqual`, `GreaterThan`, `GreaterThanOrEqual` or `RegEx`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. """ - pulumi.set(__self__, "match_values", match_values) - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsServerPortConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + operator=operator, + negate_condition=negate_condition, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) + _setter("operator", operator) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) @property @pulumi.getter(name="matchValues") @@ -5111,12 +6805,31 @@ def __init__(__self__, *, ->**NOTE:** If the value of the `operator` field is set to `IpMatch` then the `match_values` field is also required. """ + FrontdoorRuleConditionsSocketAddressConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -5170,11 +6883,32 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[str] operator: Possible value `Equal`. Defaults to `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + FrontdoorRuleConditionsSslProtocolConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -5226,12 +6960,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "match_values", match_values) - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsUrlFileExtensionConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + operator=operator, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) + _setter("operator", operator) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="matchValues") @@ -5297,13 +7056,36 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsUrlFilenameConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -5369,13 +7151,36 @@ def __init__(__self__, *, :param pulumi.Input[bool] negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsUrlPathConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -5433,7 +7238,22 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input['FrontdoorSecretSecretCustomerCertificateArgs']]] customer_certificates: A `customer_certificate` block as defined below. Changing this forces a new Front Door Secret to be created. """ - pulumi.set(__self__, "customer_certificates", customer_certificates) + FrontdoorSecretSecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + customer_certificates=customer_certificates, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + customer_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorSecretSecretCustomerCertificateArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if customer_certificates is None and 'customerCertificates' in kwargs: + customer_certificates = kwargs['customerCertificates'] + if customer_certificates is None: + raise TypeError("Missing 'customer_certificates' argument") + + _setter("customer_certificates", customer_certificates) @property @pulumi.getter(name="customerCertificates") @@ -5459,9 +7279,28 @@ def __init__(__self__, *, ->**NOTE:** If you would like to use the **latest version** of the Key Vault Certificate use the Key Vault Certificates `versionless_id` attribute as the `key_vault_certificate_id` fields value(e.g. `key_vault_certificate_id = azurerm_key_vault_certificate.example.versionless_id`). :param pulumi.Input[Sequence[pulumi.Input[str]]] subject_alternative_names: One or more `subject alternative names` contained within the key vault certificate. """ - pulumi.set(__self__, "key_vault_certificate_id", key_vault_certificate_id) + FrontdoorSecretSecretCustomerCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_certificate_id=key_vault_certificate_id, + subject_alternative_names=subject_alternative_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_certificate_id: Optional[pulumi.Input[str]] = None, + subject_alternative_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_certificate_id is None and 'keyVaultCertificateId' in kwargs: + key_vault_certificate_id = kwargs['keyVaultCertificateId'] + if key_vault_certificate_id is None: + raise TypeError("Missing 'key_vault_certificate_id' argument") + if subject_alternative_names is None and 'subjectAlternativeNames' in kwargs: + subject_alternative_names = kwargs['subjectAlternativeNames'] + + _setter("key_vault_certificate_id", key_vault_certificate_id) if subject_alternative_names is not None: - pulumi.set(__self__, "subject_alternative_names", subject_alternative_names) + _setter("subject_alternative_names", subject_alternative_names) @property @pulumi.getter(name="keyVaultCertificateId") @@ -5497,7 +7336,20 @@ def __init__(__self__, *, """ :param pulumi.Input['FrontdoorSecurityPolicySecurityPoliciesFirewallArgs'] firewall: An `firewall` block as defined below. Changing this forces a new Front Door Security Policy to be created. """ - pulumi.set(__self__, "firewall", firewall) + FrontdoorSecurityPolicySecurityPoliciesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + firewall=firewall, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + firewall: Optional[pulumi.Input['FrontdoorSecurityPolicySecurityPoliciesFirewallArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if firewall is None: + raise TypeError("Missing 'firewall' argument") + + _setter("firewall", firewall) @property @pulumi.getter @@ -5521,8 +7373,27 @@ def __init__(__self__, *, :param pulumi.Input['FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationArgs'] association: An `association` block as defined below. Changing this forces a new Front Door Security Policy to be created. :param pulumi.Input[str] cdn_frontdoor_firewall_policy_id: The Resource Id of the Front Door Firewall Policy that should be linked to this Front Door Security Policy. Changing this forces a new Front Door Security Policy to be created. """ - pulumi.set(__self__, "association", association) - pulumi.set(__self__, "cdn_frontdoor_firewall_policy_id", cdn_frontdoor_firewall_policy_id) + FrontdoorSecurityPolicySecurityPoliciesFirewallArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + association=association, + cdn_frontdoor_firewall_policy_id=cdn_frontdoor_firewall_policy_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + association: Optional[pulumi.Input['FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationArgs']] = None, + cdn_frontdoor_firewall_policy_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if association is None: + raise TypeError("Missing 'association' argument") + if cdn_frontdoor_firewall_policy_id is None and 'cdnFrontdoorFirewallPolicyId' in kwargs: + cdn_frontdoor_firewall_policy_id = kwargs['cdnFrontdoorFirewallPolicyId'] + if cdn_frontdoor_firewall_policy_id is None: + raise TypeError("Missing 'cdn_frontdoor_firewall_policy_id' argument") + + _setter("association", association) + _setter("cdn_frontdoor_firewall_policy_id", cdn_frontdoor_firewall_policy_id) @property @pulumi.getter @@ -5558,8 +7429,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationDomainArgs']]] domains: One or more `domain` blocks as defined below. Changing this forces a new Front Door Security Policy to be created. :param pulumi.Input[str] patterns_to_match: The list of paths to match for this firewall policy. Possible value includes `/*`. Changing this forces a new Front Door Security Policy to be created. """ - pulumi.set(__self__, "domains", domains) - pulumi.set(__self__, "patterns_to_match", patterns_to_match) + FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + domains=domains, + patterns_to_match=patterns_to_match, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domains: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationDomainArgs']]]] = None, + patterns_to_match: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domains is None: + raise TypeError("Missing 'domains' argument") + if patterns_to_match is None and 'patternsToMatch' in kwargs: + patterns_to_match = kwargs['patternsToMatch'] + if patterns_to_match is None: + raise TypeError("Missing 'patterns_to_match' argument") + + _setter("domains", domains) + _setter("patterns_to_match", patterns_to_match) @property @pulumi.getter @@ -5595,9 +7485,26 @@ def __init__(__self__, *, :param pulumi.Input[str] cdn_frontdoor_domain_id: The Resource Id of the **Front Door Custom Domain** or **Front Door Endpoint** that should be bound to this Front Door Security Policy. Changing this forces a new Front Door Security Policy to be created. :param pulumi.Input[bool] active: Is the Front Door Custom Domain/Endpoint activated? """ - pulumi.set(__self__, "cdn_frontdoor_domain_id", cdn_frontdoor_domain_id) + FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationDomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_domain_id=cdn_frontdoor_domain_id, + active=active, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_domain_id: Optional[pulumi.Input[str]] = None, + active: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_domain_id is None and 'cdnFrontdoorDomainId' in kwargs: + cdn_frontdoor_domain_id = kwargs['cdnFrontdoorDomainId'] + if cdn_frontdoor_domain_id is None: + raise TypeError("Missing 'cdn_frontdoor_domain_id' argument") + + _setter("cdn_frontdoor_domain_id", cdn_frontdoor_domain_id) if active is not None: - pulumi.set(__self__, "active", active) + _setter("active", active) @property @pulumi.getter(name="cdnFrontdoorDomainId") diff --git a/sdk/python/pulumi_azure/cdn/endpoint.py b/sdk/python/pulumi_azure/cdn/endpoint.py index 326ce8fabb..ec438938c3 100644 --- a/sdk/python/pulumi_azure/cdn/endpoint.py +++ b/sdk/python/pulumi_azure/cdn/endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -57,39 +57,118 @@ def __init__(__self__, *, :param pulumi.Input[str] querystring_caching_behaviour: Sets query string caching behavior. Allowed values are `IgnoreQueryString`, `BypassCaching` and `UseQueryString`. `NotSet` value can be used for `Premium Verizon` CDN profile. Defaults to `IgnoreQueryString`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "origins", origins) - pulumi.set(__self__, "profile_name", profile_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + EndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + origins=origins, + profile_name=profile_name, + resource_group_name=resource_group_name, + content_types_to_compresses=content_types_to_compresses, + delivery_rules=delivery_rules, + geo_filters=geo_filters, + global_delivery_rule=global_delivery_rule, + is_compression_enabled=is_compression_enabled, + is_http_allowed=is_http_allowed, + is_https_allowed=is_https_allowed, + location=location, + name=name, + optimization_type=optimization_type, + origin_host_header=origin_host_header, + origin_path=origin_path, + probe_path=probe_path, + querystring_caching_behaviour=querystring_caching_behaviour, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + origins: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointOriginArgs']]]] = None, + profile_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + content_types_to_compresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + delivery_rules: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleArgs']]]] = None, + geo_filters: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointGeoFilterArgs']]]] = None, + global_delivery_rule: Optional[pulumi.Input['EndpointGlobalDeliveryRuleArgs']] = None, + is_compression_enabled: Optional[pulumi.Input[bool]] = None, + is_http_allowed: Optional[pulumi.Input[bool]] = None, + is_https_allowed: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + optimization_type: Optional[pulumi.Input[str]] = None, + origin_host_header: Optional[pulumi.Input[str]] = None, + origin_path: Optional[pulumi.Input[str]] = None, + probe_path: Optional[pulumi.Input[str]] = None, + querystring_caching_behaviour: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if origins is None: + raise TypeError("Missing 'origins' argument") + if profile_name is None and 'profileName' in kwargs: + profile_name = kwargs['profileName'] + if profile_name is None: + raise TypeError("Missing 'profile_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if content_types_to_compresses is None and 'contentTypesToCompresses' in kwargs: + content_types_to_compresses = kwargs['contentTypesToCompresses'] + if delivery_rules is None and 'deliveryRules' in kwargs: + delivery_rules = kwargs['deliveryRules'] + if geo_filters is None and 'geoFilters' in kwargs: + geo_filters = kwargs['geoFilters'] + if global_delivery_rule is None and 'globalDeliveryRule' in kwargs: + global_delivery_rule = kwargs['globalDeliveryRule'] + if is_compression_enabled is None and 'isCompressionEnabled' in kwargs: + is_compression_enabled = kwargs['isCompressionEnabled'] + if is_http_allowed is None and 'isHttpAllowed' in kwargs: + is_http_allowed = kwargs['isHttpAllowed'] + if is_https_allowed is None and 'isHttpsAllowed' in kwargs: + is_https_allowed = kwargs['isHttpsAllowed'] + if optimization_type is None and 'optimizationType' in kwargs: + optimization_type = kwargs['optimizationType'] + if origin_host_header is None and 'originHostHeader' in kwargs: + origin_host_header = kwargs['originHostHeader'] + if origin_path is None and 'originPath' in kwargs: + origin_path = kwargs['originPath'] + if probe_path is None and 'probePath' in kwargs: + probe_path = kwargs['probePath'] + if querystring_caching_behaviour is None and 'querystringCachingBehaviour' in kwargs: + querystring_caching_behaviour = kwargs['querystringCachingBehaviour'] + + _setter("origins", origins) + _setter("profile_name", profile_name) + _setter("resource_group_name", resource_group_name) if content_types_to_compresses is not None: - pulumi.set(__self__, "content_types_to_compresses", content_types_to_compresses) + _setter("content_types_to_compresses", content_types_to_compresses) if delivery_rules is not None: - pulumi.set(__self__, "delivery_rules", delivery_rules) + _setter("delivery_rules", delivery_rules) if geo_filters is not None: - pulumi.set(__self__, "geo_filters", geo_filters) + _setter("geo_filters", geo_filters) if global_delivery_rule is not None: - pulumi.set(__self__, "global_delivery_rule", global_delivery_rule) + _setter("global_delivery_rule", global_delivery_rule) if is_compression_enabled is not None: - pulumi.set(__self__, "is_compression_enabled", is_compression_enabled) + _setter("is_compression_enabled", is_compression_enabled) if is_http_allowed is not None: - pulumi.set(__self__, "is_http_allowed", is_http_allowed) + _setter("is_http_allowed", is_http_allowed) if is_https_allowed is not None: - pulumi.set(__self__, "is_https_allowed", is_https_allowed) + _setter("is_https_allowed", is_https_allowed) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if optimization_type is not None: - pulumi.set(__self__, "optimization_type", optimization_type) + _setter("optimization_type", optimization_type) if origin_host_header is not None: - pulumi.set(__self__, "origin_host_header", origin_host_header) + _setter("origin_host_header", origin_host_header) if origin_path is not None: - pulumi.set(__self__, "origin_path", origin_path) + _setter("origin_path", origin_path) if probe_path is not None: - pulumi.set(__self__, "probe_path", probe_path) + _setter("probe_path", probe_path) if querystring_caching_behaviour is not None: - pulumi.set(__self__, "querystring_caching_behaviour", querystring_caching_behaviour) + _setter("querystring_caching_behaviour", querystring_caching_behaviour) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -356,44 +435,119 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the CDN Endpoint. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _EndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_types_to_compresses=content_types_to_compresses, + delivery_rules=delivery_rules, + fqdn=fqdn, + geo_filters=geo_filters, + global_delivery_rule=global_delivery_rule, + is_compression_enabled=is_compression_enabled, + is_http_allowed=is_http_allowed, + is_https_allowed=is_https_allowed, + location=location, + name=name, + optimization_type=optimization_type, + origin_host_header=origin_host_header, + origin_path=origin_path, + origins=origins, + probe_path=probe_path, + profile_name=profile_name, + querystring_caching_behaviour=querystring_caching_behaviour, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_types_to_compresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + delivery_rules: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointDeliveryRuleArgs']]]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + geo_filters: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointGeoFilterArgs']]]] = None, + global_delivery_rule: Optional[pulumi.Input['EndpointGlobalDeliveryRuleArgs']] = None, + is_compression_enabled: Optional[pulumi.Input[bool]] = None, + is_http_allowed: Optional[pulumi.Input[bool]] = None, + is_https_allowed: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + optimization_type: Optional[pulumi.Input[str]] = None, + origin_host_header: Optional[pulumi.Input[str]] = None, + origin_path: Optional[pulumi.Input[str]] = None, + origins: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointOriginArgs']]]] = None, + probe_path: Optional[pulumi.Input[str]] = None, + profile_name: Optional[pulumi.Input[str]] = None, + querystring_caching_behaviour: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_types_to_compresses is None and 'contentTypesToCompresses' in kwargs: + content_types_to_compresses = kwargs['contentTypesToCompresses'] + if delivery_rules is None and 'deliveryRules' in kwargs: + delivery_rules = kwargs['deliveryRules'] + if geo_filters is None and 'geoFilters' in kwargs: + geo_filters = kwargs['geoFilters'] + if global_delivery_rule is None and 'globalDeliveryRule' in kwargs: + global_delivery_rule = kwargs['globalDeliveryRule'] + if is_compression_enabled is None and 'isCompressionEnabled' in kwargs: + is_compression_enabled = kwargs['isCompressionEnabled'] + if is_http_allowed is None and 'isHttpAllowed' in kwargs: + is_http_allowed = kwargs['isHttpAllowed'] + if is_https_allowed is None and 'isHttpsAllowed' in kwargs: + is_https_allowed = kwargs['isHttpsAllowed'] + if optimization_type is None and 'optimizationType' in kwargs: + optimization_type = kwargs['optimizationType'] + if origin_host_header is None and 'originHostHeader' in kwargs: + origin_host_header = kwargs['originHostHeader'] + if origin_path is None and 'originPath' in kwargs: + origin_path = kwargs['originPath'] + if probe_path is None and 'probePath' in kwargs: + probe_path = kwargs['probePath'] + if profile_name is None and 'profileName' in kwargs: + profile_name = kwargs['profileName'] + if querystring_caching_behaviour is None and 'querystringCachingBehaviour' in kwargs: + querystring_caching_behaviour = kwargs['querystringCachingBehaviour'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if content_types_to_compresses is not None: - pulumi.set(__self__, "content_types_to_compresses", content_types_to_compresses) + _setter("content_types_to_compresses", content_types_to_compresses) if delivery_rules is not None: - pulumi.set(__self__, "delivery_rules", delivery_rules) + _setter("delivery_rules", delivery_rules) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if geo_filters is not None: - pulumi.set(__self__, "geo_filters", geo_filters) + _setter("geo_filters", geo_filters) if global_delivery_rule is not None: - pulumi.set(__self__, "global_delivery_rule", global_delivery_rule) + _setter("global_delivery_rule", global_delivery_rule) if is_compression_enabled is not None: - pulumi.set(__self__, "is_compression_enabled", is_compression_enabled) + _setter("is_compression_enabled", is_compression_enabled) if is_http_allowed is not None: - pulumi.set(__self__, "is_http_allowed", is_http_allowed) + _setter("is_http_allowed", is_http_allowed) if is_https_allowed is not None: - pulumi.set(__self__, "is_https_allowed", is_https_allowed) + _setter("is_https_allowed", is_https_allowed) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if optimization_type is not None: - pulumi.set(__self__, "optimization_type", optimization_type) + _setter("optimization_type", optimization_type) if origin_host_header is not None: - pulumi.set(__self__, "origin_host_header", origin_host_header) + _setter("origin_host_header", origin_host_header) if origin_path is not None: - pulumi.set(__self__, "origin_path", origin_path) + _setter("origin_path", origin_path) if origins is not None: - pulumi.set(__self__, "origins", origins) + _setter("origins", origins) if probe_path is not None: - pulumi.set(__self__, "probe_path", probe_path) + _setter("probe_path", probe_path) if profile_name is not None: - pulumi.set(__self__, "profile_name", profile_name) + _setter("profile_name", profile_name) if querystring_caching_behaviour is not None: - pulumi.set(__self__, "querystring_caching_behaviour", querystring_caching_behaviour) + _setter("querystring_caching_behaviour", querystring_caching_behaviour) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="contentTypesToCompresses") @@ -749,6 +903,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -784,6 +942,11 @@ def _internal_init(__self__, __props__.__dict__["content_types_to_compresses"] = content_types_to_compresses __props__.__dict__["delivery_rules"] = delivery_rules __props__.__dict__["geo_filters"] = geo_filters + if global_delivery_rule is not None and not isinstance(global_delivery_rule, EndpointGlobalDeliveryRuleArgs): + global_delivery_rule = global_delivery_rule or {} + def _setter(key, value): + global_delivery_rule[key] = value + EndpointGlobalDeliveryRuleArgs._configure(_setter, **global_delivery_rule) __props__.__dict__["global_delivery_rule"] = global_delivery_rule __props__.__dict__["is_compression_enabled"] = is_compression_enabled __props__.__dict__["is_http_allowed"] = is_http_allowed diff --git a/sdk/python/pulumi_azure/cdn/endpoint_custom_domain.py b/sdk/python/pulumi_azure/cdn/endpoint_custom_domain.py index 83a9b7b707..505eea68cd 100644 --- a/sdk/python/pulumi_azure/cdn/endpoint_custom_domain.py +++ b/sdk/python/pulumi_azure/cdn/endpoint_custom_domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,14 +31,45 @@ def __init__(__self__, *, > **NOTE** Only one of `cdn_managed_https` and `user_managed_https` can be specified. """ - pulumi.set(__self__, "cdn_endpoint_id", cdn_endpoint_id) - pulumi.set(__self__, "host_name", host_name) + EndpointCustomDomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_endpoint_id=cdn_endpoint_id, + host_name=host_name, + cdn_managed_https=cdn_managed_https, + name=name, + user_managed_https=user_managed_https, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_endpoint_id: Optional[pulumi.Input[str]] = None, + host_name: Optional[pulumi.Input[str]] = None, + cdn_managed_https: Optional[pulumi.Input['EndpointCustomDomainCdnManagedHttpsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + user_managed_https: Optional[pulumi.Input['EndpointCustomDomainUserManagedHttpsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_endpoint_id is None and 'cdnEndpointId' in kwargs: + cdn_endpoint_id = kwargs['cdnEndpointId'] + if cdn_endpoint_id is None: + raise TypeError("Missing 'cdn_endpoint_id' argument") + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if cdn_managed_https is None and 'cdnManagedHttps' in kwargs: + cdn_managed_https = kwargs['cdnManagedHttps'] + if user_managed_https is None and 'userManagedHttps' in kwargs: + user_managed_https = kwargs['userManagedHttps'] + + _setter("cdn_endpoint_id", cdn_endpoint_id) + _setter("host_name", host_name) if cdn_managed_https is not None: - pulumi.set(__self__, "cdn_managed_https", cdn_managed_https) + _setter("cdn_managed_https", cdn_managed_https) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if user_managed_https is not None: - pulumi.set(__self__, "user_managed_https", user_managed_https) + _setter("user_managed_https", user_managed_https) @property @pulumi.getter(name="cdnEndpointId") @@ -121,16 +152,43 @@ def __init__(__self__, *, > **NOTE** Only one of `cdn_managed_https` and `user_managed_https` can be specified. """ + _EndpointCustomDomainState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_endpoint_id=cdn_endpoint_id, + cdn_managed_https=cdn_managed_https, + host_name=host_name, + name=name, + user_managed_https=user_managed_https, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_endpoint_id: Optional[pulumi.Input[str]] = None, + cdn_managed_https: Optional[pulumi.Input['EndpointCustomDomainCdnManagedHttpsArgs']] = None, + host_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + user_managed_https: Optional[pulumi.Input['EndpointCustomDomainUserManagedHttpsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_endpoint_id is None and 'cdnEndpointId' in kwargs: + cdn_endpoint_id = kwargs['cdnEndpointId'] + if cdn_managed_https is None and 'cdnManagedHttps' in kwargs: + cdn_managed_https = kwargs['cdnManagedHttps'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if user_managed_https is None and 'userManagedHttps' in kwargs: + user_managed_https = kwargs['userManagedHttps'] + if cdn_endpoint_id is not None: - pulumi.set(__self__, "cdn_endpoint_id", cdn_endpoint_id) + _setter("cdn_endpoint_id", cdn_endpoint_id) if cdn_managed_https is not None: - pulumi.set(__self__, "cdn_managed_https", cdn_managed_https) + _setter("cdn_managed_https", cdn_managed_https) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if user_managed_https is not None: - pulumi.set(__self__, "user_managed_https", user_managed_https) + _setter("user_managed_https", user_managed_https) @property @pulumi.getter(name="cdnEndpointId") @@ -326,6 +384,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EndpointCustomDomainArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -348,11 +410,21 @@ def _internal_init(__self__, if cdn_endpoint_id is None and not opts.urn: raise TypeError("Missing required property 'cdn_endpoint_id'") __props__.__dict__["cdn_endpoint_id"] = cdn_endpoint_id + if cdn_managed_https is not None and not isinstance(cdn_managed_https, EndpointCustomDomainCdnManagedHttpsArgs): + cdn_managed_https = cdn_managed_https or {} + def _setter(key, value): + cdn_managed_https[key] = value + EndpointCustomDomainCdnManagedHttpsArgs._configure(_setter, **cdn_managed_https) __props__.__dict__["cdn_managed_https"] = cdn_managed_https if host_name is None and not opts.urn: raise TypeError("Missing required property 'host_name'") __props__.__dict__["host_name"] = host_name __props__.__dict__["name"] = name + if user_managed_https is not None and not isinstance(user_managed_https, EndpointCustomDomainUserManagedHttpsArgs): + user_managed_https = user_managed_https or {} + def _setter(key, value): + user_managed_https[key] = value + EndpointCustomDomainUserManagedHttpsArgs._configure(_setter, **user_managed_https) __props__.__dict__["user_managed_https"] = user_managed_https super(EndpointCustomDomain, __self__).__init__( 'azure:cdn/endpointCustomDomain:EndpointCustomDomain', diff --git a/sdk/python/pulumi_azure/cdn/frontdoor_custom_domain.py b/sdk/python/pulumi_azure/cdn/frontdoor_custom_domain.py index e79ac22022..71ad823a34 100644 --- a/sdk/python/pulumi_azure/cdn/frontdoor_custom_domain.py +++ b/sdk/python/pulumi_azure/cdn/frontdoor_custom_domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,13 +33,44 @@ def __init__(__self__, *, ->**NOTE:** Currently `pre_validated_cdn_frontdoor_custom_domain_id` only supports domains validated by Static Web App. --> :param pulumi.Input[str] name: The name which should be used for this Front Door Custom Domain. Possible values must be between 2 and 260 characters in length, must begin with a letter or number, end with a letter or number and contain only letters, numbers and hyphens. Changing this forces a new Front Door Custom Domain to be created. """ - pulumi.set(__self__, "cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) - pulumi.set(__self__, "host_name", host_name) - pulumi.set(__self__, "tls", tls) + FrontdoorCustomDomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_profile_id=cdn_frontdoor_profile_id, + host_name=host_name, + tls=tls, + dns_zone_id=dns_zone_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_profile_id: Optional[pulumi.Input[str]] = None, + host_name: Optional[pulumi.Input[str]] = None, + tls: Optional[pulumi.Input['FrontdoorCustomDomainTlsArgs']] = None, + dns_zone_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_profile_id is None and 'cdnFrontdoorProfileId' in kwargs: + cdn_frontdoor_profile_id = kwargs['cdnFrontdoorProfileId'] + if cdn_frontdoor_profile_id is None: + raise TypeError("Missing 'cdn_frontdoor_profile_id' argument") + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if tls is None: + raise TypeError("Missing 'tls' argument") + if dns_zone_id is None and 'dnsZoneId' in kwargs: + dns_zone_id = kwargs['dnsZoneId'] + + _setter("cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) + _setter("host_name", host_name) + _setter("tls", tls) if dns_zone_id is not None: - pulumi.set(__self__, "dns_zone_id", dns_zone_id) + _setter("dns_zone_id", dns_zone_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="cdnFrontdoorProfileId") @@ -130,20 +161,53 @@ def __init__(__self__, *, :param pulumi.Input['FrontdoorCustomDomainTlsArgs'] tls: A `tls` block as defined below. :param pulumi.Input[str] validation_token: Challenge used for DNS TXT record or file based validation. """ + _FrontdoorCustomDomainState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_profile_id=cdn_frontdoor_profile_id, + dns_zone_id=dns_zone_id, + expiration_date=expiration_date, + host_name=host_name, + name=name, + tls=tls, + validation_token=validation_token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_profile_id: Optional[pulumi.Input[str]] = None, + dns_zone_id: Optional[pulumi.Input[str]] = None, + expiration_date: Optional[pulumi.Input[str]] = None, + host_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tls: Optional[pulumi.Input['FrontdoorCustomDomainTlsArgs']] = None, + validation_token: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_profile_id is None and 'cdnFrontdoorProfileId' in kwargs: + cdn_frontdoor_profile_id = kwargs['cdnFrontdoorProfileId'] + if dns_zone_id is None and 'dnsZoneId' in kwargs: + dns_zone_id = kwargs['dnsZoneId'] + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if validation_token is None and 'validationToken' in kwargs: + validation_token = kwargs['validationToken'] + if cdn_frontdoor_profile_id is not None: - pulumi.set(__self__, "cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) + _setter("cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) if dns_zone_id is not None: - pulumi.set(__self__, "dns_zone_id", dns_zone_id) + _setter("dns_zone_id", dns_zone_id) if expiration_date is not None: - pulumi.set(__self__, "expiration_date", expiration_date) + _setter("expiration_date", expiration_date) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tls is not None: - pulumi.set(__self__, "tls", tls) + _setter("tls", tls) if validation_token is not None: - pulumi.set(__self__, "validation_token", validation_token) + _setter("validation_token", validation_token) @property @pulumi.getter(name="cdnFrontdoorProfileId") @@ -369,6 +433,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorCustomDomainArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -396,6 +464,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'host_name'") __props__.__dict__["host_name"] = host_name __props__.__dict__["name"] = name + if tls is not None and not isinstance(tls, FrontdoorCustomDomainTlsArgs): + tls = tls or {} + def _setter(key, value): + tls[key] = value + FrontdoorCustomDomainTlsArgs._configure(_setter, **tls) if tls is None and not opts.urn: raise TypeError("Missing required property 'tls'") __props__.__dict__["tls"] = tls diff --git a/sdk/python/pulumi_azure/cdn/frontdoor_custom_domain_association.py b/sdk/python/pulumi_azure/cdn/frontdoor_custom_domain_association.py index 28dc6c174e..2fb605cd62 100644 --- a/sdk/python/pulumi_azure/cdn/frontdoor_custom_domain_association.py +++ b/sdk/python/pulumi_azure/cdn/frontdoor_custom_domain_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FrontdoorCustomDomainAssociationArgs', 'FrontdoorCustomDomainAssociation'] @@ -23,8 +23,29 @@ def __init__(__self__, *, > **NOTE:** This should include all of the Front Door Route resources that the Front Door Custom Domain is associated with. If the list of Front Door Routes is not complete you will receive the service side error `This resource is still associated with a route. Please delete the association with the route first before deleting this resource` when you attempt to `destroy`/`delete` your Front Door Custom Domain. """ - pulumi.set(__self__, "cdn_frontdoor_custom_domain_id", cdn_frontdoor_custom_domain_id) - pulumi.set(__self__, "cdn_frontdoor_route_ids", cdn_frontdoor_route_ids) + FrontdoorCustomDomainAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_custom_domain_id=cdn_frontdoor_custom_domain_id, + cdn_frontdoor_route_ids=cdn_frontdoor_route_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_custom_domain_id: Optional[pulumi.Input[str]] = None, + cdn_frontdoor_route_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_custom_domain_id is None and 'cdnFrontdoorCustomDomainId' in kwargs: + cdn_frontdoor_custom_domain_id = kwargs['cdnFrontdoorCustomDomainId'] + if cdn_frontdoor_custom_domain_id is None: + raise TypeError("Missing 'cdn_frontdoor_custom_domain_id' argument") + if cdn_frontdoor_route_ids is None and 'cdnFrontdoorRouteIds' in kwargs: + cdn_frontdoor_route_ids = kwargs['cdnFrontdoorRouteIds'] + if cdn_frontdoor_route_ids is None: + raise TypeError("Missing 'cdn_frontdoor_route_ids' argument") + + _setter("cdn_frontdoor_custom_domain_id", cdn_frontdoor_custom_domain_id) + _setter("cdn_frontdoor_route_ids", cdn_frontdoor_route_ids) @property @pulumi.getter(name="cdnFrontdoorCustomDomainId") @@ -65,10 +86,27 @@ def __init__(__self__, *, > **NOTE:** This should include all of the Front Door Route resources that the Front Door Custom Domain is associated with. If the list of Front Door Routes is not complete you will receive the service side error `This resource is still associated with a route. Please delete the association with the route first before deleting this resource` when you attempt to `destroy`/`delete` your Front Door Custom Domain. """ + _FrontdoorCustomDomainAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_custom_domain_id=cdn_frontdoor_custom_domain_id, + cdn_frontdoor_route_ids=cdn_frontdoor_route_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_custom_domain_id: Optional[pulumi.Input[str]] = None, + cdn_frontdoor_route_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_custom_domain_id is None and 'cdnFrontdoorCustomDomainId' in kwargs: + cdn_frontdoor_custom_domain_id = kwargs['cdnFrontdoorCustomDomainId'] + if cdn_frontdoor_route_ids is None and 'cdnFrontdoorRouteIds' in kwargs: + cdn_frontdoor_route_ids = kwargs['cdnFrontdoorRouteIds'] + if cdn_frontdoor_custom_domain_id is not None: - pulumi.set(__self__, "cdn_frontdoor_custom_domain_id", cdn_frontdoor_custom_domain_id) + _setter("cdn_frontdoor_custom_domain_id", cdn_frontdoor_custom_domain_id) if cdn_frontdoor_route_ids is not None: - pulumi.set(__self__, "cdn_frontdoor_route_ids", cdn_frontdoor_route_ids) + _setter("cdn_frontdoor_route_ids", cdn_frontdoor_route_ids) @property @pulumi.getter(name="cdnFrontdoorCustomDomainId") @@ -150,6 +188,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorCustomDomainAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cdn/frontdoor_endpoint.py b/sdk/python/pulumi_azure/cdn/frontdoor_endpoint.py index d7ad4eb8dc..7264bdcdc7 100644 --- a/sdk/python/pulumi_azure/cdn/frontdoor_endpoint.py +++ b/sdk/python/pulumi_azure/cdn/frontdoor_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FrontdoorEndpointArgs', 'FrontdoorEndpoint'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Front Door Endpoint. Changing this forces a new Front Door Endpoint to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Specifies a mapping of tags which should be assigned to the Front Door Endpoint. """ - pulumi.set(__self__, "cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) + FrontdoorEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_profile_id=cdn_frontdoor_profile_id, + enabled=enabled, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_profile_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_profile_id is None and 'cdnFrontdoorProfileId' in kwargs: + cdn_frontdoor_profile_id = kwargs['cdnFrontdoorProfileId'] + if cdn_frontdoor_profile_id is None: + raise TypeError("Missing 'cdn_frontdoor_profile_id' argument") + + _setter("cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="cdnFrontdoorProfileId") @@ -98,16 +119,39 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Front Door Endpoint. Changing this forces a new Front Door Endpoint to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Specifies a mapping of tags which should be assigned to the Front Door Endpoint. """ + _FrontdoorEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_profile_id=cdn_frontdoor_profile_id, + enabled=enabled, + host_name=host_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_profile_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + host_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_profile_id is None and 'cdnFrontdoorProfileId' in kwargs: + cdn_frontdoor_profile_id = kwargs['cdnFrontdoorProfileId'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if cdn_frontdoor_profile_id is not None: - pulumi.set(__self__, "cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) + _setter("cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="cdnFrontdoorProfileId") @@ -259,6 +303,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cdn/frontdoor_firewall_policy.py b/sdk/python/pulumi_azure/cdn/frontdoor_firewall_policy.py index 6c64d3e289..870475e8f4 100644 --- a/sdk/python/pulumi_azure/cdn/frontdoor_firewall_policy.py +++ b/sdk/python/pulumi_azure/cdn/frontdoor_firewall_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,25 +45,76 @@ def __init__(__self__, *, :param pulumi.Input[str] redirect_url: If action type is redirect, this field represents redirect URL for the client. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Front Door Firewall Policy. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + FrontdoorFirewallPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + resource_group_name=resource_group_name, + sku_name=sku_name, + custom_block_response_body=custom_block_response_body, + custom_block_response_status_code=custom_block_response_status_code, + custom_rules=custom_rules, + enabled=enabled, + managed_rules=managed_rules, + name=name, + redirect_url=redirect_url, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + custom_block_response_body: Optional[pulumi.Input[str]] = None, + custom_block_response_status_code: Optional[pulumi.Input[int]] = None, + custom_rules: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyCustomRuleArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + managed_rules: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyManagedRuleArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + redirect_url: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if custom_block_response_body is None and 'customBlockResponseBody' in kwargs: + custom_block_response_body = kwargs['customBlockResponseBody'] + if custom_block_response_status_code is None and 'customBlockResponseStatusCode' in kwargs: + custom_block_response_status_code = kwargs['customBlockResponseStatusCode'] + if custom_rules is None and 'customRules' in kwargs: + custom_rules = kwargs['customRules'] + if managed_rules is None and 'managedRules' in kwargs: + managed_rules = kwargs['managedRules'] + if redirect_url is None and 'redirectUrl' in kwargs: + redirect_url = kwargs['redirectUrl'] + + _setter("mode", mode) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if custom_block_response_body is not None: - pulumi.set(__self__, "custom_block_response_body", custom_block_response_body) + _setter("custom_block_response_body", custom_block_response_body) if custom_block_response_status_code is not None: - pulumi.set(__self__, "custom_block_response_status_code", custom_block_response_status_code) + _setter("custom_block_response_status_code", custom_block_response_status_code) if custom_rules is not None: - pulumi.set(__self__, "custom_rules", custom_rules) + _setter("custom_rules", custom_rules) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if managed_rules is not None: - pulumi.set(__self__, "managed_rules", managed_rules) + _setter("managed_rules", managed_rules) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if redirect_url is not None: - pulumi.set(__self__, "redirect_url", redirect_url) + _setter("redirect_url", redirect_url) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -236,30 +287,79 @@ def __init__(__self__, *, > **NOTE:** The `Standard_AzureFrontDoor` Front Door Firewall Policy sku may contain `custom` rules only. The `Premium_AzureFrontDoor` Front Door Firewall Policy skus may contain both `custom` and `managed` rules. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Front Door Firewall Policy. """ + _FrontdoorFirewallPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_block_response_body=custom_block_response_body, + custom_block_response_status_code=custom_block_response_status_code, + custom_rules=custom_rules, + enabled=enabled, + frontend_endpoint_ids=frontend_endpoint_ids, + managed_rules=managed_rules, + mode=mode, + name=name, + redirect_url=redirect_url, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_block_response_body: Optional[pulumi.Input[str]] = None, + custom_block_response_status_code: Optional[pulumi.Input[int]] = None, + custom_rules: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyCustomRuleArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + frontend_endpoint_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + managed_rules: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorFirewallPolicyManagedRuleArgs']]]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + redirect_url: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_block_response_body is None and 'customBlockResponseBody' in kwargs: + custom_block_response_body = kwargs['customBlockResponseBody'] + if custom_block_response_status_code is None and 'customBlockResponseStatusCode' in kwargs: + custom_block_response_status_code = kwargs['customBlockResponseStatusCode'] + if custom_rules is None and 'customRules' in kwargs: + custom_rules = kwargs['customRules'] + if frontend_endpoint_ids is None and 'frontendEndpointIds' in kwargs: + frontend_endpoint_ids = kwargs['frontendEndpointIds'] + if managed_rules is None and 'managedRules' in kwargs: + managed_rules = kwargs['managedRules'] + if redirect_url is None and 'redirectUrl' in kwargs: + redirect_url = kwargs['redirectUrl'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if custom_block_response_body is not None: - pulumi.set(__self__, "custom_block_response_body", custom_block_response_body) + _setter("custom_block_response_body", custom_block_response_body) if custom_block_response_status_code is not None: - pulumi.set(__self__, "custom_block_response_status_code", custom_block_response_status_code) + _setter("custom_block_response_status_code", custom_block_response_status_code) if custom_rules is not None: - pulumi.set(__self__, "custom_rules", custom_rules) + _setter("custom_rules", custom_rules) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if frontend_endpoint_ids is not None: - pulumi.set(__self__, "frontend_endpoint_ids", frontend_endpoint_ids) + _setter("frontend_endpoint_ids", frontend_endpoint_ids) if managed_rules is not None: - pulumi.set(__self__, "managed_rules", managed_rules) + _setter("managed_rules", managed_rules) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if redirect_url is not None: - pulumi.set(__self__, "redirect_url", redirect_url) + _setter("redirect_url", redirect_url) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="customBlockResponseBody") @@ -705,6 +805,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorFirewallPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cdn/frontdoor_origin.py b/sdk/python/pulumi_azure/cdn/frontdoor_origin.py index 19e0323b79..c2f3a0ba1c 100644 --- a/sdk/python/pulumi_azure/cdn/frontdoor_origin.py +++ b/sdk/python/pulumi_azure/cdn/frontdoor_origin.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -50,30 +50,85 @@ def __init__(__self__, *, > **NOTE:** Private Link requires that the Front Door Profile this Origin is hosted within is using the SKU `Premium_AzureFrontDoor` and that the `certificate_name_check_enabled` field is set to `true`. :param pulumi.Input[int] weight: The weight of the origin in a given origin group for load balancing. Must be between `1` and `1000`. Defaults to `500`. """ - pulumi.set(__self__, "cdn_frontdoor_origin_group_id", cdn_frontdoor_origin_group_id) - pulumi.set(__self__, "certificate_name_check_enabled", certificate_name_check_enabled) - pulumi.set(__self__, "host_name", host_name) + FrontdoorOriginArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_origin_group_id=cdn_frontdoor_origin_group_id, + certificate_name_check_enabled=certificate_name_check_enabled, + host_name=host_name, + enabled=enabled, + health_probes_enabled=health_probes_enabled, + http_port=http_port, + https_port=https_port, + name=name, + origin_host_header=origin_host_header, + priority=priority, + private_link=private_link, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_origin_group_id: Optional[pulumi.Input[str]] = None, + certificate_name_check_enabled: Optional[pulumi.Input[bool]] = None, + host_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + health_probes_enabled: Optional[pulumi.Input[bool]] = None, + http_port: Optional[pulumi.Input[int]] = None, + https_port: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + origin_host_header: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + private_link: Optional[pulumi.Input['FrontdoorOriginPrivateLinkArgs']] = None, + weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_origin_group_id is None and 'cdnFrontdoorOriginGroupId' in kwargs: + cdn_frontdoor_origin_group_id = kwargs['cdnFrontdoorOriginGroupId'] + if cdn_frontdoor_origin_group_id is None: + raise TypeError("Missing 'cdn_frontdoor_origin_group_id' argument") + if certificate_name_check_enabled is None and 'certificateNameCheckEnabled' in kwargs: + certificate_name_check_enabled = kwargs['certificateNameCheckEnabled'] + if certificate_name_check_enabled is None: + raise TypeError("Missing 'certificate_name_check_enabled' argument") + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if health_probes_enabled is None and 'healthProbesEnabled' in kwargs: + health_probes_enabled = kwargs['healthProbesEnabled'] + if http_port is None and 'httpPort' in kwargs: + http_port = kwargs['httpPort'] + if https_port is None and 'httpsPort' in kwargs: + https_port = kwargs['httpsPort'] + if origin_host_header is None and 'originHostHeader' in kwargs: + origin_host_header = kwargs['originHostHeader'] + if private_link is None and 'privateLink' in kwargs: + private_link = kwargs['privateLink'] + + _setter("cdn_frontdoor_origin_group_id", cdn_frontdoor_origin_group_id) + _setter("certificate_name_check_enabled", certificate_name_check_enabled) + _setter("host_name", host_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if health_probes_enabled is not None: warnings.warn("""`health_probes_enabled` will be removed in favour of the `enabled` property in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""health_probes_enabled is deprecated: `health_probes_enabled` will be removed in favour of the `enabled` property in version 4.0 of the AzureRM Provider.""") if health_probes_enabled is not None: - pulumi.set(__self__, "health_probes_enabled", health_probes_enabled) + _setter("health_probes_enabled", health_probes_enabled) if http_port is not None: - pulumi.set(__self__, "http_port", http_port) + _setter("http_port", http_port) if https_port is not None: - pulumi.set(__self__, "https_port", https_port) + _setter("https_port", https_port) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if origin_host_header is not None: - pulumi.set(__self__, "origin_host_header", origin_host_header) + _setter("origin_host_header", origin_host_header) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if private_link is not None: - pulumi.set(__self__, "private_link", private_link) + _setter("private_link", private_link) if weight is not None: - pulumi.set(__self__, "weight", weight) + _setter("weight", weight) @property @pulumi.getter(name="cdnFrontdoorOriginGroupId") @@ -265,33 +320,82 @@ def __init__(__self__, *, > **NOTE:** Private Link requires that the Front Door Profile this Origin is hosted within is using the SKU `Premium_AzureFrontDoor` and that the `certificate_name_check_enabled` field is set to `true`. :param pulumi.Input[int] weight: The weight of the origin in a given origin group for load balancing. Must be between `1` and `1000`. Defaults to `500`. """ + _FrontdoorOriginState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_origin_group_id=cdn_frontdoor_origin_group_id, + certificate_name_check_enabled=certificate_name_check_enabled, + enabled=enabled, + health_probes_enabled=health_probes_enabled, + host_name=host_name, + http_port=http_port, + https_port=https_port, + name=name, + origin_host_header=origin_host_header, + priority=priority, + private_link=private_link, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_origin_group_id: Optional[pulumi.Input[str]] = None, + certificate_name_check_enabled: Optional[pulumi.Input[bool]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + health_probes_enabled: Optional[pulumi.Input[bool]] = None, + host_name: Optional[pulumi.Input[str]] = None, + http_port: Optional[pulumi.Input[int]] = None, + https_port: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + origin_host_header: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + private_link: Optional[pulumi.Input['FrontdoorOriginPrivateLinkArgs']] = None, + weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_origin_group_id is None and 'cdnFrontdoorOriginGroupId' in kwargs: + cdn_frontdoor_origin_group_id = kwargs['cdnFrontdoorOriginGroupId'] + if certificate_name_check_enabled is None and 'certificateNameCheckEnabled' in kwargs: + certificate_name_check_enabled = kwargs['certificateNameCheckEnabled'] + if health_probes_enabled is None and 'healthProbesEnabled' in kwargs: + health_probes_enabled = kwargs['healthProbesEnabled'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if http_port is None and 'httpPort' in kwargs: + http_port = kwargs['httpPort'] + if https_port is None and 'httpsPort' in kwargs: + https_port = kwargs['httpsPort'] + if origin_host_header is None and 'originHostHeader' in kwargs: + origin_host_header = kwargs['originHostHeader'] + if private_link is None and 'privateLink' in kwargs: + private_link = kwargs['privateLink'] + if cdn_frontdoor_origin_group_id is not None: - pulumi.set(__self__, "cdn_frontdoor_origin_group_id", cdn_frontdoor_origin_group_id) + _setter("cdn_frontdoor_origin_group_id", cdn_frontdoor_origin_group_id) if certificate_name_check_enabled is not None: - pulumi.set(__self__, "certificate_name_check_enabled", certificate_name_check_enabled) + _setter("certificate_name_check_enabled", certificate_name_check_enabled) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if health_probes_enabled is not None: warnings.warn("""`health_probes_enabled` will be removed in favour of the `enabled` property in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""health_probes_enabled is deprecated: `health_probes_enabled` will be removed in favour of the `enabled` property in version 4.0 of the AzureRM Provider.""") if health_probes_enabled is not None: - pulumi.set(__self__, "health_probes_enabled", health_probes_enabled) + _setter("health_probes_enabled", health_probes_enabled) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if http_port is not None: - pulumi.set(__self__, "http_port", http_port) + _setter("http_port", http_port) if https_port is not None: - pulumi.set(__self__, "https_port", https_port) + _setter("https_port", https_port) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if origin_host_header is not None: - pulumi.set(__self__, "origin_host_header", origin_host_header) + _setter("origin_host_header", origin_host_header) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if private_link is not None: - pulumi.set(__self__, "private_link", private_link) + _setter("private_link", private_link) if weight is not None: - pulumi.set(__self__, "weight", weight) + _setter("weight", weight) @property @pulumi.getter(name="cdnFrontdoorOriginGroupId") @@ -520,6 +624,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorOriginArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -562,6 +670,11 @@ def _internal_init(__self__, __props__.__dict__["name"] = name __props__.__dict__["origin_host_header"] = origin_host_header __props__.__dict__["priority"] = priority + if private_link is not None and not isinstance(private_link, FrontdoorOriginPrivateLinkArgs): + private_link = private_link or {} + def _setter(key, value): + private_link[key] = value + FrontdoorOriginPrivateLinkArgs._configure(_setter, **private_link) __props__.__dict__["private_link"] = private_link __props__.__dict__["weight"] = weight super(FrontdoorOrigin, __self__).__init__( diff --git a/sdk/python/pulumi_azure/cdn/frontdoor_origin_group.py b/sdk/python/pulumi_azure/cdn/frontdoor_origin_group.py index 6156aa9d55..6c1359426d 100644 --- a/sdk/python/pulumi_azure/cdn/frontdoor_origin_group.py +++ b/sdk/python/pulumi_azure/cdn/frontdoor_origin_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,16 +33,51 @@ def __init__(__self__, *, > **NOTE:** This property is currently not used, but will be in the near future. :param pulumi.Input[bool] session_affinity_enabled: Specifies whether session affinity should be enabled on this host. Defaults to `true`. """ - pulumi.set(__self__, "cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) - pulumi.set(__self__, "load_balancing", load_balancing) + FrontdoorOriginGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_profile_id=cdn_frontdoor_profile_id, + load_balancing=load_balancing, + health_probe=health_probe, + name=name, + restore_traffic_time_to_healed_or_new_endpoint_in_minutes=restore_traffic_time_to_healed_or_new_endpoint_in_minutes, + session_affinity_enabled=session_affinity_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_profile_id: Optional[pulumi.Input[str]] = None, + load_balancing: Optional[pulumi.Input['FrontdoorOriginGroupLoadBalancingArgs']] = None, + health_probe: Optional[pulumi.Input['FrontdoorOriginGroupHealthProbeArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + restore_traffic_time_to_healed_or_new_endpoint_in_minutes: Optional[pulumi.Input[int]] = None, + session_affinity_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_profile_id is None and 'cdnFrontdoorProfileId' in kwargs: + cdn_frontdoor_profile_id = kwargs['cdnFrontdoorProfileId'] + if cdn_frontdoor_profile_id is None: + raise TypeError("Missing 'cdn_frontdoor_profile_id' argument") + if load_balancing is None and 'loadBalancing' in kwargs: + load_balancing = kwargs['loadBalancing'] + if load_balancing is None: + raise TypeError("Missing 'load_balancing' argument") + if health_probe is None and 'healthProbe' in kwargs: + health_probe = kwargs['healthProbe'] + if restore_traffic_time_to_healed_or_new_endpoint_in_minutes is None and 'restoreTrafficTimeToHealedOrNewEndpointInMinutes' in kwargs: + restore_traffic_time_to_healed_or_new_endpoint_in_minutes = kwargs['restoreTrafficTimeToHealedOrNewEndpointInMinutes'] + if session_affinity_enabled is None and 'sessionAffinityEnabled' in kwargs: + session_affinity_enabled = kwargs['sessionAffinityEnabled'] + + _setter("cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) + _setter("load_balancing", load_balancing) if health_probe is not None: - pulumi.set(__self__, "health_probe", health_probe) + _setter("health_probe", health_probe) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if restore_traffic_time_to_healed_or_new_endpoint_in_minutes is not None: - pulumi.set(__self__, "restore_traffic_time_to_healed_or_new_endpoint_in_minutes", restore_traffic_time_to_healed_or_new_endpoint_in_minutes) + _setter("restore_traffic_time_to_healed_or_new_endpoint_in_minutes", restore_traffic_time_to_healed_or_new_endpoint_in_minutes) if session_affinity_enabled is not None: - pulumi.set(__self__, "session_affinity_enabled", session_affinity_enabled) + _setter("session_affinity_enabled", session_affinity_enabled) @property @pulumi.getter(name="cdnFrontdoorProfileId") @@ -139,18 +174,49 @@ def __init__(__self__, *, > **NOTE:** This property is currently not used, but will be in the near future. :param pulumi.Input[bool] session_affinity_enabled: Specifies whether session affinity should be enabled on this host. Defaults to `true`. """ + _FrontdoorOriginGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_profile_id=cdn_frontdoor_profile_id, + health_probe=health_probe, + load_balancing=load_balancing, + name=name, + restore_traffic_time_to_healed_or_new_endpoint_in_minutes=restore_traffic_time_to_healed_or_new_endpoint_in_minutes, + session_affinity_enabled=session_affinity_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_profile_id: Optional[pulumi.Input[str]] = None, + health_probe: Optional[pulumi.Input['FrontdoorOriginGroupHealthProbeArgs']] = None, + load_balancing: Optional[pulumi.Input['FrontdoorOriginGroupLoadBalancingArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + restore_traffic_time_to_healed_or_new_endpoint_in_minutes: Optional[pulumi.Input[int]] = None, + session_affinity_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_profile_id is None and 'cdnFrontdoorProfileId' in kwargs: + cdn_frontdoor_profile_id = kwargs['cdnFrontdoorProfileId'] + if health_probe is None and 'healthProbe' in kwargs: + health_probe = kwargs['healthProbe'] + if load_balancing is None and 'loadBalancing' in kwargs: + load_balancing = kwargs['loadBalancing'] + if restore_traffic_time_to_healed_or_new_endpoint_in_minutes is None and 'restoreTrafficTimeToHealedOrNewEndpointInMinutes' in kwargs: + restore_traffic_time_to_healed_or_new_endpoint_in_minutes = kwargs['restoreTrafficTimeToHealedOrNewEndpointInMinutes'] + if session_affinity_enabled is None and 'sessionAffinityEnabled' in kwargs: + session_affinity_enabled = kwargs['sessionAffinityEnabled'] + if cdn_frontdoor_profile_id is not None: - pulumi.set(__self__, "cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) + _setter("cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) if health_probe is not None: - pulumi.set(__self__, "health_probe", health_probe) + _setter("health_probe", health_probe) if load_balancing is not None: - pulumi.set(__self__, "load_balancing", load_balancing) + _setter("load_balancing", load_balancing) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if restore_traffic_time_to_healed_or_new_endpoint_in_minutes is not None: - pulumi.set(__self__, "restore_traffic_time_to_healed_or_new_endpoint_in_minutes", restore_traffic_time_to_healed_or_new_endpoint_in_minutes) + _setter("restore_traffic_time_to_healed_or_new_endpoint_in_minutes", restore_traffic_time_to_healed_or_new_endpoint_in_minutes) if session_affinity_enabled is not None: - pulumi.set(__self__, "session_affinity_enabled", session_affinity_enabled) + _setter("session_affinity_enabled", session_affinity_enabled) @property @pulumi.getter(name="cdnFrontdoorProfileId") @@ -342,6 +408,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorOriginGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -365,7 +435,17 @@ def _internal_init(__self__, if cdn_frontdoor_profile_id is None and not opts.urn: raise TypeError("Missing required property 'cdn_frontdoor_profile_id'") __props__.__dict__["cdn_frontdoor_profile_id"] = cdn_frontdoor_profile_id + if health_probe is not None and not isinstance(health_probe, FrontdoorOriginGroupHealthProbeArgs): + health_probe = health_probe or {} + def _setter(key, value): + health_probe[key] = value + FrontdoorOriginGroupHealthProbeArgs._configure(_setter, **health_probe) __props__.__dict__["health_probe"] = health_probe + if load_balancing is not None and not isinstance(load_balancing, FrontdoorOriginGroupLoadBalancingArgs): + load_balancing = load_balancing or {} + def _setter(key, value): + load_balancing[key] = value + FrontdoorOriginGroupLoadBalancingArgs._configure(_setter, **load_balancing) if load_balancing is None and not opts.urn: raise TypeError("Missing required property 'load_balancing'") __props__.__dict__["load_balancing"] = load_balancing diff --git a/sdk/python/pulumi_azure/cdn/frontdoor_profile.py b/sdk/python/pulumi_azure/cdn/frontdoor_profile.py index 0217b35894..fd36685866 100644 --- a/sdk/python/pulumi_azure/cdn/frontdoor_profile.py +++ b/sdk/python/pulumi_azure/cdn/frontdoor_profile.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FrontdoorProfileArgs', 'FrontdoorProfile'] @@ -27,14 +27,43 @@ def __init__(__self__, *, :param pulumi.Input[int] response_timeout_seconds: Specifies the maximum response timeout in seconds. Possible values are between `16` and `240` seconds (inclusive). Defaults to `120` seconds. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Specifies a mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + FrontdoorProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + name=name, + response_timeout_seconds=response_timeout_seconds, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + response_timeout_seconds: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if response_timeout_seconds is None and 'responseTimeoutSeconds' in kwargs: + response_timeout_seconds = kwargs['responseTimeoutSeconds'] + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if response_timeout_seconds is not None: - pulumi.set(__self__, "response_timeout_seconds", response_timeout_seconds) + _setter("response_timeout_seconds", response_timeout_seconds) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -115,18 +144,47 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_name: Specifies the SKU for this Front Door Profile. Possible values include `Standard_AzureFrontDoor` and `Premium_AzureFrontDoor`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Specifies a mapping of tags to assign to the resource. """ + _FrontdoorProfileState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + resource_guid=resource_guid, + response_timeout_seconds=response_timeout_seconds, + sku_name=sku_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + resource_guid: Optional[pulumi.Input[str]] = None, + response_timeout_seconds: Optional[pulumi.Input[int]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_guid is None and 'resourceGuid' in kwargs: + resource_guid = kwargs['resourceGuid'] + if response_timeout_seconds is None and 'responseTimeoutSeconds' in kwargs: + response_timeout_seconds = kwargs['responseTimeoutSeconds'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if resource_guid is not None: - pulumi.set(__self__, "resource_guid", resource_guid) + _setter("resource_guid", resource_guid) if response_timeout_seconds is not None: - pulumi.set(__self__, "response_timeout_seconds", response_timeout_seconds) + _setter("response_timeout_seconds", response_timeout_seconds) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -288,6 +346,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorProfileArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cdn/frontdoor_route.py b/sdk/python/pulumi_azure/cdn/frontdoor_route.py index 108848f92d..68cec3266e 100644 --- a/sdk/python/pulumi_azure/cdn/frontdoor_route.py +++ b/sdk/python/pulumi_azure/cdn/frontdoor_route.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -53,29 +53,98 @@ def __init__(__self__, *, :param pulumi.Input[bool] link_to_default_domain: Should this Front Door Route be linked to the default endpoint? Possible values include `true` or `false`. Defaults to `true`. :param pulumi.Input[str] name: The name which should be used for this Front Door Route. Valid values must begin with a letter or number, end with a letter or number and may only contain letters, numbers and hyphens with a maximum length of 90 characters. Changing this forces a new Front Door Route to be created. """ - pulumi.set(__self__, "cdn_frontdoor_endpoint_id", cdn_frontdoor_endpoint_id) - pulumi.set(__self__, "cdn_frontdoor_origin_group_id", cdn_frontdoor_origin_group_id) - pulumi.set(__self__, "cdn_frontdoor_origin_ids", cdn_frontdoor_origin_ids) - pulumi.set(__self__, "patterns_to_matches", patterns_to_matches) - pulumi.set(__self__, "supported_protocols", supported_protocols) + FrontdoorRouteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_endpoint_id=cdn_frontdoor_endpoint_id, + cdn_frontdoor_origin_group_id=cdn_frontdoor_origin_group_id, + cdn_frontdoor_origin_ids=cdn_frontdoor_origin_ids, + patterns_to_matches=patterns_to_matches, + supported_protocols=supported_protocols, + cache=cache, + cdn_frontdoor_custom_domain_ids=cdn_frontdoor_custom_domain_ids, + cdn_frontdoor_origin_path=cdn_frontdoor_origin_path, + cdn_frontdoor_rule_set_ids=cdn_frontdoor_rule_set_ids, + enabled=enabled, + forwarding_protocol=forwarding_protocol, + https_redirect_enabled=https_redirect_enabled, + link_to_default_domain=link_to_default_domain, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_endpoint_id: Optional[pulumi.Input[str]] = None, + cdn_frontdoor_origin_group_id: Optional[pulumi.Input[str]] = None, + cdn_frontdoor_origin_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + patterns_to_matches: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + supported_protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cache: Optional[pulumi.Input['FrontdoorRouteCacheArgs']] = None, + cdn_frontdoor_custom_domain_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cdn_frontdoor_origin_path: Optional[pulumi.Input[str]] = None, + cdn_frontdoor_rule_set_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + forwarding_protocol: Optional[pulumi.Input[str]] = None, + https_redirect_enabled: Optional[pulumi.Input[bool]] = None, + link_to_default_domain: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_endpoint_id is None and 'cdnFrontdoorEndpointId' in kwargs: + cdn_frontdoor_endpoint_id = kwargs['cdnFrontdoorEndpointId'] + if cdn_frontdoor_endpoint_id is None: + raise TypeError("Missing 'cdn_frontdoor_endpoint_id' argument") + if cdn_frontdoor_origin_group_id is None and 'cdnFrontdoorOriginGroupId' in kwargs: + cdn_frontdoor_origin_group_id = kwargs['cdnFrontdoorOriginGroupId'] + if cdn_frontdoor_origin_group_id is None: + raise TypeError("Missing 'cdn_frontdoor_origin_group_id' argument") + if cdn_frontdoor_origin_ids is None and 'cdnFrontdoorOriginIds' in kwargs: + cdn_frontdoor_origin_ids = kwargs['cdnFrontdoorOriginIds'] + if cdn_frontdoor_origin_ids is None: + raise TypeError("Missing 'cdn_frontdoor_origin_ids' argument") + if patterns_to_matches is None and 'patternsToMatches' in kwargs: + patterns_to_matches = kwargs['patternsToMatches'] + if patterns_to_matches is None: + raise TypeError("Missing 'patterns_to_matches' argument") + if supported_protocols is None and 'supportedProtocols' in kwargs: + supported_protocols = kwargs['supportedProtocols'] + if supported_protocols is None: + raise TypeError("Missing 'supported_protocols' argument") + if cdn_frontdoor_custom_domain_ids is None and 'cdnFrontdoorCustomDomainIds' in kwargs: + cdn_frontdoor_custom_domain_ids = kwargs['cdnFrontdoorCustomDomainIds'] + if cdn_frontdoor_origin_path is None and 'cdnFrontdoorOriginPath' in kwargs: + cdn_frontdoor_origin_path = kwargs['cdnFrontdoorOriginPath'] + if cdn_frontdoor_rule_set_ids is None and 'cdnFrontdoorRuleSetIds' in kwargs: + cdn_frontdoor_rule_set_ids = kwargs['cdnFrontdoorRuleSetIds'] + if forwarding_protocol is None and 'forwardingProtocol' in kwargs: + forwarding_protocol = kwargs['forwardingProtocol'] + if https_redirect_enabled is None and 'httpsRedirectEnabled' in kwargs: + https_redirect_enabled = kwargs['httpsRedirectEnabled'] + if link_to_default_domain is None and 'linkToDefaultDomain' in kwargs: + link_to_default_domain = kwargs['linkToDefaultDomain'] + + _setter("cdn_frontdoor_endpoint_id", cdn_frontdoor_endpoint_id) + _setter("cdn_frontdoor_origin_group_id", cdn_frontdoor_origin_group_id) + _setter("cdn_frontdoor_origin_ids", cdn_frontdoor_origin_ids) + _setter("patterns_to_matches", patterns_to_matches) + _setter("supported_protocols", supported_protocols) if cache is not None: - pulumi.set(__self__, "cache", cache) + _setter("cache", cache) if cdn_frontdoor_custom_domain_ids is not None: - pulumi.set(__self__, "cdn_frontdoor_custom_domain_ids", cdn_frontdoor_custom_domain_ids) + _setter("cdn_frontdoor_custom_domain_ids", cdn_frontdoor_custom_domain_ids) if cdn_frontdoor_origin_path is not None: - pulumi.set(__self__, "cdn_frontdoor_origin_path", cdn_frontdoor_origin_path) + _setter("cdn_frontdoor_origin_path", cdn_frontdoor_origin_path) if cdn_frontdoor_rule_set_ids is not None: - pulumi.set(__self__, "cdn_frontdoor_rule_set_ids", cdn_frontdoor_rule_set_ids) + _setter("cdn_frontdoor_rule_set_ids", cdn_frontdoor_rule_set_ids) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if forwarding_protocol is not None: - pulumi.set(__self__, "forwarding_protocol", forwarding_protocol) + _setter("forwarding_protocol", forwarding_protocol) if https_redirect_enabled is not None: - pulumi.set(__self__, "https_redirect_enabled", https_redirect_enabled) + _setter("https_redirect_enabled", https_redirect_enabled) if link_to_default_domain is not None: - pulumi.set(__self__, "link_to_default_domain", link_to_default_domain) + _setter("link_to_default_domain", link_to_default_domain) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="cdnFrontdoorEndpointId") @@ -292,34 +361,93 @@ def __init__(__self__, *, > **NOTE:** If `https_redirect_enabled` is set to `true` the `supported_protocols` field must contain both `Http` and `Https` values. """ + _FrontdoorRouteState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache=cache, + cdn_frontdoor_custom_domain_ids=cdn_frontdoor_custom_domain_ids, + cdn_frontdoor_endpoint_id=cdn_frontdoor_endpoint_id, + cdn_frontdoor_origin_group_id=cdn_frontdoor_origin_group_id, + cdn_frontdoor_origin_ids=cdn_frontdoor_origin_ids, + cdn_frontdoor_origin_path=cdn_frontdoor_origin_path, + cdn_frontdoor_rule_set_ids=cdn_frontdoor_rule_set_ids, + enabled=enabled, + forwarding_protocol=forwarding_protocol, + https_redirect_enabled=https_redirect_enabled, + link_to_default_domain=link_to_default_domain, + name=name, + patterns_to_matches=patterns_to_matches, + supported_protocols=supported_protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache: Optional[pulumi.Input['FrontdoorRouteCacheArgs']] = None, + cdn_frontdoor_custom_domain_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cdn_frontdoor_endpoint_id: Optional[pulumi.Input[str]] = None, + cdn_frontdoor_origin_group_id: Optional[pulumi.Input[str]] = None, + cdn_frontdoor_origin_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cdn_frontdoor_origin_path: Optional[pulumi.Input[str]] = None, + cdn_frontdoor_rule_set_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + forwarding_protocol: Optional[pulumi.Input[str]] = None, + https_redirect_enabled: Optional[pulumi.Input[bool]] = None, + link_to_default_domain: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + patterns_to_matches: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + supported_protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_custom_domain_ids is None and 'cdnFrontdoorCustomDomainIds' in kwargs: + cdn_frontdoor_custom_domain_ids = kwargs['cdnFrontdoorCustomDomainIds'] + if cdn_frontdoor_endpoint_id is None and 'cdnFrontdoorEndpointId' in kwargs: + cdn_frontdoor_endpoint_id = kwargs['cdnFrontdoorEndpointId'] + if cdn_frontdoor_origin_group_id is None and 'cdnFrontdoorOriginGroupId' in kwargs: + cdn_frontdoor_origin_group_id = kwargs['cdnFrontdoorOriginGroupId'] + if cdn_frontdoor_origin_ids is None and 'cdnFrontdoorOriginIds' in kwargs: + cdn_frontdoor_origin_ids = kwargs['cdnFrontdoorOriginIds'] + if cdn_frontdoor_origin_path is None and 'cdnFrontdoorOriginPath' in kwargs: + cdn_frontdoor_origin_path = kwargs['cdnFrontdoorOriginPath'] + if cdn_frontdoor_rule_set_ids is None and 'cdnFrontdoorRuleSetIds' in kwargs: + cdn_frontdoor_rule_set_ids = kwargs['cdnFrontdoorRuleSetIds'] + if forwarding_protocol is None and 'forwardingProtocol' in kwargs: + forwarding_protocol = kwargs['forwardingProtocol'] + if https_redirect_enabled is None and 'httpsRedirectEnabled' in kwargs: + https_redirect_enabled = kwargs['httpsRedirectEnabled'] + if link_to_default_domain is None and 'linkToDefaultDomain' in kwargs: + link_to_default_domain = kwargs['linkToDefaultDomain'] + if patterns_to_matches is None and 'patternsToMatches' in kwargs: + patterns_to_matches = kwargs['patternsToMatches'] + if supported_protocols is None and 'supportedProtocols' in kwargs: + supported_protocols = kwargs['supportedProtocols'] + if cache is not None: - pulumi.set(__self__, "cache", cache) + _setter("cache", cache) if cdn_frontdoor_custom_domain_ids is not None: - pulumi.set(__self__, "cdn_frontdoor_custom_domain_ids", cdn_frontdoor_custom_domain_ids) + _setter("cdn_frontdoor_custom_domain_ids", cdn_frontdoor_custom_domain_ids) if cdn_frontdoor_endpoint_id is not None: - pulumi.set(__self__, "cdn_frontdoor_endpoint_id", cdn_frontdoor_endpoint_id) + _setter("cdn_frontdoor_endpoint_id", cdn_frontdoor_endpoint_id) if cdn_frontdoor_origin_group_id is not None: - pulumi.set(__self__, "cdn_frontdoor_origin_group_id", cdn_frontdoor_origin_group_id) + _setter("cdn_frontdoor_origin_group_id", cdn_frontdoor_origin_group_id) if cdn_frontdoor_origin_ids is not None: - pulumi.set(__self__, "cdn_frontdoor_origin_ids", cdn_frontdoor_origin_ids) + _setter("cdn_frontdoor_origin_ids", cdn_frontdoor_origin_ids) if cdn_frontdoor_origin_path is not None: - pulumi.set(__self__, "cdn_frontdoor_origin_path", cdn_frontdoor_origin_path) + _setter("cdn_frontdoor_origin_path", cdn_frontdoor_origin_path) if cdn_frontdoor_rule_set_ids is not None: - pulumi.set(__self__, "cdn_frontdoor_rule_set_ids", cdn_frontdoor_rule_set_ids) + _setter("cdn_frontdoor_rule_set_ids", cdn_frontdoor_rule_set_ids) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if forwarding_protocol is not None: - pulumi.set(__self__, "forwarding_protocol", forwarding_protocol) + _setter("forwarding_protocol", forwarding_protocol) if https_redirect_enabled is not None: - pulumi.set(__self__, "https_redirect_enabled", https_redirect_enabled) + _setter("https_redirect_enabled", https_redirect_enabled) if link_to_default_domain is not None: - pulumi.set(__self__, "link_to_default_domain", link_to_default_domain) + _setter("link_to_default_domain", link_to_default_domain) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if patterns_to_matches is not None: - pulumi.set(__self__, "patterns_to_matches", patterns_to_matches) + _setter("patterns_to_matches", patterns_to_matches) if supported_protocols is not None: - pulumi.set(__self__, "supported_protocols", supported_protocols) + _setter("supported_protocols", supported_protocols) @property @pulumi.getter @@ -577,6 +705,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorRouteArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -605,6 +737,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = FrontdoorRouteArgs.__new__(FrontdoorRouteArgs) + if cache is not None and not isinstance(cache, FrontdoorRouteCacheArgs): + cache = cache or {} + def _setter(key, value): + cache[key] = value + FrontdoorRouteCacheArgs._configure(_setter, **cache) __props__.__dict__["cache"] = cache __props__.__dict__["cdn_frontdoor_custom_domain_ids"] = cdn_frontdoor_custom_domain_ids if cdn_frontdoor_endpoint_id is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/cdn/frontdoor_route_disable_link_to_default_domain.py b/sdk/python/pulumi_azure/cdn/frontdoor_route_disable_link_to_default_domain.py index 2809ef0246..b53d33b57b 100644 --- a/sdk/python/pulumi_azure/cdn/frontdoor_route_disable_link_to_default_domain.py +++ b/sdk/python/pulumi_azure/cdn/frontdoor_route_disable_link_to_default_domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FrontdoorRouteDisableLinkToDefaultDomainArgs', 'FrontdoorRouteDisableLinkToDefaultDomain'] @@ -21,14 +21,35 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] cdn_frontdoor_custom_domain_ids: The resource IDs of the Front Door Custom Domains which are associated with this Front Door Route. :param pulumi.Input[str] cdn_frontdoor_route_id: The resource ID of the Front Door Route where the Link To Default Domain property should be `disabled`. Changing this forces a new Front Door Route Disable Link To Default Domain to be created. """ + FrontdoorRouteDisableLinkToDefaultDomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_custom_domain_ids=cdn_frontdoor_custom_domain_ids, + cdn_frontdoor_route_id=cdn_frontdoor_route_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_custom_domain_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cdn_frontdoor_route_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_custom_domain_ids is None and 'cdnFrontdoorCustomDomainIds' in kwargs: + cdn_frontdoor_custom_domain_ids = kwargs['cdnFrontdoorCustomDomainIds'] + if cdn_frontdoor_custom_domain_ids is None: + raise TypeError("Missing 'cdn_frontdoor_custom_domain_ids' argument") + if cdn_frontdoor_route_id is None and 'cdnFrontdoorRouteId' in kwargs: + cdn_frontdoor_route_id = kwargs['cdnFrontdoorRouteId'] + if cdn_frontdoor_route_id is None: + raise TypeError("Missing 'cdn_frontdoor_route_id' argument") + if cdn_frontdoor_custom_domain_ids is not None: warnings.warn("""the 'cdn_frontdoor_route_disable_link_to_default_domain' resource has been deprecated and will be removed from the 4.0 AzureRM provider. Please use the 'link_to_default_domain' field in the 'cdn_frontdoor_route' resource to control this value""", DeprecationWarning) pulumi.log.warn("""cdn_frontdoor_custom_domain_ids is deprecated: the 'cdn_frontdoor_route_disable_link_to_default_domain' resource has been deprecated and will be removed from the 4.0 AzureRM provider. Please use the 'link_to_default_domain' field in the 'cdn_frontdoor_route' resource to control this value""") - pulumi.set(__self__, "cdn_frontdoor_custom_domain_ids", cdn_frontdoor_custom_domain_ids) + _setter("cdn_frontdoor_custom_domain_ids", cdn_frontdoor_custom_domain_ids) if cdn_frontdoor_route_id is not None: warnings.warn("""the 'cdn_frontdoor_route_disable_link_to_default_domain' resource has been deprecated and will be removed from the 4.0 AzureRM provider. Please use the 'link_to_default_domain' field in the 'cdn_frontdoor_route' resource to control this value""", DeprecationWarning) pulumi.log.warn("""cdn_frontdoor_route_id is deprecated: the 'cdn_frontdoor_route_disable_link_to_default_domain' resource has been deprecated and will be removed from the 4.0 AzureRM provider. Please use the 'link_to_default_domain' field in the 'cdn_frontdoor_route' resource to control this value""") - pulumi.set(__self__, "cdn_frontdoor_route_id", cdn_frontdoor_route_id) + _setter("cdn_frontdoor_route_id", cdn_frontdoor_route_id) @property @pulumi.getter(name="cdnFrontdoorCustomDomainIds") @@ -71,16 +92,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] cdn_frontdoor_custom_domain_ids: The resource IDs of the Front Door Custom Domains which are associated with this Front Door Route. :param pulumi.Input[str] cdn_frontdoor_route_id: The resource ID of the Front Door Route where the Link To Default Domain property should be `disabled`. Changing this forces a new Front Door Route Disable Link To Default Domain to be created. """ + _FrontdoorRouteDisableLinkToDefaultDomainState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_custom_domain_ids=cdn_frontdoor_custom_domain_ids, + cdn_frontdoor_route_id=cdn_frontdoor_route_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_custom_domain_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cdn_frontdoor_route_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_custom_domain_ids is None and 'cdnFrontdoorCustomDomainIds' in kwargs: + cdn_frontdoor_custom_domain_ids = kwargs['cdnFrontdoorCustomDomainIds'] + if cdn_frontdoor_route_id is None and 'cdnFrontdoorRouteId' in kwargs: + cdn_frontdoor_route_id = kwargs['cdnFrontdoorRouteId'] + if cdn_frontdoor_custom_domain_ids is not None: warnings.warn("""the 'cdn_frontdoor_route_disable_link_to_default_domain' resource has been deprecated and will be removed from the 4.0 AzureRM provider. Please use the 'link_to_default_domain' field in the 'cdn_frontdoor_route' resource to control this value""", DeprecationWarning) pulumi.log.warn("""cdn_frontdoor_custom_domain_ids is deprecated: the 'cdn_frontdoor_route_disable_link_to_default_domain' resource has been deprecated and will be removed from the 4.0 AzureRM provider. Please use the 'link_to_default_domain' field in the 'cdn_frontdoor_route' resource to control this value""") if cdn_frontdoor_custom_domain_ids is not None: - pulumi.set(__self__, "cdn_frontdoor_custom_domain_ids", cdn_frontdoor_custom_domain_ids) + _setter("cdn_frontdoor_custom_domain_ids", cdn_frontdoor_custom_domain_ids) if cdn_frontdoor_route_id is not None: warnings.warn("""the 'cdn_frontdoor_route_disable_link_to_default_domain' resource has been deprecated and will be removed from the 4.0 AzureRM provider. Please use the 'link_to_default_domain' field in the 'cdn_frontdoor_route' resource to control this value""", DeprecationWarning) pulumi.log.warn("""cdn_frontdoor_route_id is deprecated: the 'cdn_frontdoor_route_disable_link_to_default_domain' resource has been deprecated and will be removed from the 4.0 AzureRM provider. Please use the 'link_to_default_domain' field in the 'cdn_frontdoor_route' resource to control this value""") if cdn_frontdoor_route_id is not None: - pulumi.set(__self__, "cdn_frontdoor_route_id", cdn_frontdoor_route_id) + _setter("cdn_frontdoor_route_id", cdn_frontdoor_route_id) @property @pulumi.getter(name="cdnFrontdoorCustomDomainIds") @@ -196,6 +234,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorRouteDisableLinkToDefaultDomainArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cdn/frontdoor_rule.py b/sdk/python/pulumi_azure/cdn/frontdoor_rule.py index 72c2bffb51..9c1e765cb1 100644 --- a/sdk/python/pulumi_azure/cdn/frontdoor_rule.py +++ b/sdk/python/pulumi_azure/cdn/frontdoor_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,15 +33,46 @@ def __init__(__self__, *, :param pulumi.Input['FrontdoorRuleConditionsArgs'] conditions: A `conditions` block as defined below. :param pulumi.Input[str] name: The name which should be used for this Front Door Rule. Possible values must be between 1 and 260 characters in length, begin with a letter and may contain only letters and numbers. Changing this forces a new Front Door Rule to be created. """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "cdn_frontdoor_rule_set_id", cdn_frontdoor_rule_set_id) - pulumi.set(__self__, "order", order) + FrontdoorRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + cdn_frontdoor_rule_set_id=cdn_frontdoor_rule_set_id, + order=order, + behavior_on_match=behavior_on_match, + conditions=conditions, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input['FrontdoorRuleActionsArgs']] = None, + cdn_frontdoor_rule_set_id: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + behavior_on_match: Optional[pulumi.Input[str]] = None, + conditions: Optional[pulumi.Input['FrontdoorRuleConditionsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if cdn_frontdoor_rule_set_id is None and 'cdnFrontdoorRuleSetId' in kwargs: + cdn_frontdoor_rule_set_id = kwargs['cdnFrontdoorRuleSetId'] + if cdn_frontdoor_rule_set_id is None: + raise TypeError("Missing 'cdn_frontdoor_rule_set_id' argument") + if order is None: + raise TypeError("Missing 'order' argument") + if behavior_on_match is None and 'behaviorOnMatch' in kwargs: + behavior_on_match = kwargs['behaviorOnMatch'] + + _setter("actions", actions) + _setter("cdn_frontdoor_rule_set_id", cdn_frontdoor_rule_set_id) + _setter("order", order) if behavior_on_match is not None: - pulumi.set(__self__, "behavior_on_match", behavior_on_match) + _setter("behavior_on_match", behavior_on_match) if conditions is not None: - pulumi.set(__self__, "conditions", conditions) + _setter("conditions", conditions) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -140,20 +171,49 @@ def __init__(__self__, *, ->**NOTE:** If the Front Door Rule has an order value of `0` they do not require any conditions and the actions will always be applied. """ + _FrontdoorRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + behavior_on_match=behavior_on_match, + cdn_frontdoor_rule_set_id=cdn_frontdoor_rule_set_id, + cdn_frontdoor_rule_set_name=cdn_frontdoor_rule_set_name, + conditions=conditions, + name=name, + order=order, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input['FrontdoorRuleActionsArgs']] = None, + behavior_on_match: Optional[pulumi.Input[str]] = None, + cdn_frontdoor_rule_set_id: Optional[pulumi.Input[str]] = None, + cdn_frontdoor_rule_set_name: Optional[pulumi.Input[str]] = None, + conditions: Optional[pulumi.Input['FrontdoorRuleConditionsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if behavior_on_match is None and 'behaviorOnMatch' in kwargs: + behavior_on_match = kwargs['behaviorOnMatch'] + if cdn_frontdoor_rule_set_id is None and 'cdnFrontdoorRuleSetId' in kwargs: + cdn_frontdoor_rule_set_id = kwargs['cdnFrontdoorRuleSetId'] + if cdn_frontdoor_rule_set_name is None and 'cdnFrontdoorRuleSetName' in kwargs: + cdn_frontdoor_rule_set_name = kwargs['cdnFrontdoorRuleSetName'] + if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if behavior_on_match is not None: - pulumi.set(__self__, "behavior_on_match", behavior_on_match) + _setter("behavior_on_match", behavior_on_match) if cdn_frontdoor_rule_set_id is not None: - pulumi.set(__self__, "cdn_frontdoor_rule_set_id", cdn_frontdoor_rule_set_id) + _setter("cdn_frontdoor_rule_set_id", cdn_frontdoor_rule_set_id) if cdn_frontdoor_rule_set_name is not None: - pulumi.set(__self__, "cdn_frontdoor_rule_set_name", cdn_frontdoor_rule_set_name) + _setter("cdn_frontdoor_rule_set_name", cdn_frontdoor_rule_set_name) if conditions is not None: - pulumi.set(__self__, "conditions", conditions) + _setter("conditions", conditions) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if order is not None: - pulumi.set(__self__, "order", order) + _setter("order", order) @property @pulumi.getter @@ -549,6 +609,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -569,6 +633,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = FrontdoorRuleArgs.__new__(FrontdoorRuleArgs) + if actions is not None and not isinstance(actions, FrontdoorRuleActionsArgs): + actions = actions or {} + def _setter(key, value): + actions[key] = value + FrontdoorRuleActionsArgs._configure(_setter, **actions) if actions is None and not opts.urn: raise TypeError("Missing required property 'actions'") __props__.__dict__["actions"] = actions @@ -576,6 +645,11 @@ def _internal_init(__self__, if cdn_frontdoor_rule_set_id is None and not opts.urn: raise TypeError("Missing required property 'cdn_frontdoor_rule_set_id'") __props__.__dict__["cdn_frontdoor_rule_set_id"] = cdn_frontdoor_rule_set_id + if conditions is not None and not isinstance(conditions, FrontdoorRuleConditionsArgs): + conditions = conditions or {} + def _setter(key, value): + conditions[key] = value + FrontdoorRuleConditionsArgs._configure(_setter, **conditions) __props__.__dict__["conditions"] = conditions __props__.__dict__["name"] = name if order is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/cdn/frontdoor_rule_set.py b/sdk/python/pulumi_azure/cdn/frontdoor_rule_set.py index 19f2edf7d9..11825c79d2 100644 --- a/sdk/python/pulumi_azure/cdn/frontdoor_rule_set.py +++ b/sdk/python/pulumi_azure/cdn/frontdoor_rule_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FrontdoorRuleSetArgs', 'FrontdoorRuleSet'] @@ -21,9 +21,26 @@ def __init__(__self__, *, :param pulumi.Input[str] cdn_frontdoor_profile_id: The ID of the Front Door Profile. Changing this forces a new Front Door Rule Set to be created. :param pulumi.Input[str] name: The name which should be used for this Front Door Rule Set. Changing this forces a new Front Door Rule Set to be created. """ - pulumi.set(__self__, "cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) + FrontdoorRuleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_profile_id=cdn_frontdoor_profile_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_profile_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_profile_id is None and 'cdnFrontdoorProfileId' in kwargs: + cdn_frontdoor_profile_id = kwargs['cdnFrontdoorProfileId'] + if cdn_frontdoor_profile_id is None: + raise TypeError("Missing 'cdn_frontdoor_profile_id' argument") + + _setter("cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="cdnFrontdoorProfileId") @@ -60,10 +77,25 @@ def __init__(__self__, *, :param pulumi.Input[str] cdn_frontdoor_profile_id: The ID of the Front Door Profile. Changing this forces a new Front Door Rule Set to be created. :param pulumi.Input[str] name: The name which should be used for this Front Door Rule Set. Changing this forces a new Front Door Rule Set to be created. """ + _FrontdoorRuleSetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_profile_id=cdn_frontdoor_profile_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_profile_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_profile_id is None and 'cdnFrontdoorProfileId' in kwargs: + cdn_frontdoor_profile_id = kwargs['cdnFrontdoorProfileId'] + if cdn_frontdoor_profile_id is not None: - pulumi.set(__self__, "cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) + _setter("cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="cdnFrontdoorProfileId") @@ -167,6 +199,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorRuleSetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cdn/frontdoor_secret.py b/sdk/python/pulumi_azure/cdn/frontdoor_secret.py index 08bcbdb5ba..ce5f6fee53 100644 --- a/sdk/python/pulumi_azure/cdn/frontdoor_secret.py +++ b/sdk/python/pulumi_azure/cdn/frontdoor_secret.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -25,10 +25,31 @@ def __init__(__self__, *, :param pulumi.Input['FrontdoorSecretSecretArgs'] secret: A `secret` block as defined below. Changing this forces a new Front Door Secret to be created. :param pulumi.Input[str] name: The name which should be used for this Front Door Secret. Possible values must start with a letter or a number, only contain letters, numbers and hyphens and have a length of between 2 and 260 characters. Changing this forces a new Front Door Secret to be created. """ - pulumi.set(__self__, "cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) - pulumi.set(__self__, "secret", secret) + FrontdoorSecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_profile_id=cdn_frontdoor_profile_id, + secret=secret, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_profile_id: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input['FrontdoorSecretSecretArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_profile_id is None and 'cdnFrontdoorProfileId' in kwargs: + cdn_frontdoor_profile_id = kwargs['cdnFrontdoorProfileId'] + if cdn_frontdoor_profile_id is None: + raise TypeError("Missing 'cdn_frontdoor_profile_id' argument") + if secret is None: + raise TypeError("Missing 'secret' argument") + + _setter("cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) + _setter("secret", secret) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="cdnFrontdoorProfileId") @@ -81,14 +102,35 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Front Door Secret. Possible values must start with a letter or a number, only contain letters, numbers and hyphens and have a length of between 2 and 260 characters. Changing this forces a new Front Door Secret to be created. :param pulumi.Input['FrontdoorSecretSecretArgs'] secret: A `secret` block as defined below. Changing this forces a new Front Door Secret to be created. """ + _FrontdoorSecretState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_profile_id=cdn_frontdoor_profile_id, + cdn_frontdoor_profile_name=cdn_frontdoor_profile_name, + name=name, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_profile_id: Optional[pulumi.Input[str]] = None, + cdn_frontdoor_profile_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input['FrontdoorSecretSecretArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_profile_id is None and 'cdnFrontdoorProfileId' in kwargs: + cdn_frontdoor_profile_id = kwargs['cdnFrontdoorProfileId'] + if cdn_frontdoor_profile_name is None and 'cdnFrontdoorProfileName' in kwargs: + cdn_frontdoor_profile_name = kwargs['cdnFrontdoorProfileName'] + if cdn_frontdoor_profile_id is not None: - pulumi.set(__self__, "cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) + _setter("cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) if cdn_frontdoor_profile_name is not None: - pulumi.set(__self__, "cdn_frontdoor_profile_name", cdn_frontdoor_profile_name) + _setter("cdn_frontdoor_profile_name", cdn_frontdoor_profile_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) @property @pulumi.getter(name="cdnFrontdoorProfileId") @@ -306,6 +348,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorSecretArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -327,6 +373,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'cdn_frontdoor_profile_id'") __props__.__dict__["cdn_frontdoor_profile_id"] = cdn_frontdoor_profile_id __props__.__dict__["name"] = name + if secret is not None and not isinstance(secret, FrontdoorSecretSecretArgs): + secret = secret or {} + def _setter(key, value): + secret[key] = value + FrontdoorSecretSecretArgs._configure(_setter, **secret) if secret is None and not opts.urn: raise TypeError("Missing required property 'secret'") __props__.__dict__["secret"] = secret diff --git a/sdk/python/pulumi_azure/cdn/frontdoor_security_policy.py b/sdk/python/pulumi_azure/cdn/frontdoor_security_policy.py index 8f1d9a6bbf..0022cdfb21 100644 --- a/sdk/python/pulumi_azure/cdn/frontdoor_security_policy.py +++ b/sdk/python/pulumi_azure/cdn/frontdoor_security_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -25,10 +25,33 @@ def __init__(__self__, *, :param pulumi.Input['FrontdoorSecurityPolicySecurityPoliciesArgs'] security_policies: An `security_policies` block as defined below. Changing this forces a new Front Door Security Policy to be created. :param pulumi.Input[str] name: The name which should be used for this Front Door Security Policy. Possible values must not be an empty string. Changing this forces a new Front Door Security Policy to be created. """ - pulumi.set(__self__, "cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) - pulumi.set(__self__, "security_policies", security_policies) + FrontdoorSecurityPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_profile_id=cdn_frontdoor_profile_id, + security_policies=security_policies, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_profile_id: Optional[pulumi.Input[str]] = None, + security_policies: Optional[pulumi.Input['FrontdoorSecurityPolicySecurityPoliciesArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_profile_id is None and 'cdnFrontdoorProfileId' in kwargs: + cdn_frontdoor_profile_id = kwargs['cdnFrontdoorProfileId'] + if cdn_frontdoor_profile_id is None: + raise TypeError("Missing 'cdn_frontdoor_profile_id' argument") + if security_policies is None and 'securityPolicies' in kwargs: + security_policies = kwargs['securityPolicies'] + if security_policies is None: + raise TypeError("Missing 'security_policies' argument") + + _setter("cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) + _setter("security_policies", security_policies) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="cdnFrontdoorProfileId") @@ -79,12 +102,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Front Door Security Policy. Possible values must not be an empty string. Changing this forces a new Front Door Security Policy to be created. :param pulumi.Input['FrontdoorSecurityPolicySecurityPoliciesArgs'] security_policies: An `security_policies` block as defined below. Changing this forces a new Front Door Security Policy to be created. """ + _FrontdoorSecurityPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_profile_id=cdn_frontdoor_profile_id, + name=name, + security_policies=security_policies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_profile_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + security_policies: Optional[pulumi.Input['FrontdoorSecurityPolicySecurityPoliciesArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_profile_id is None and 'cdnFrontdoorProfileId' in kwargs: + cdn_frontdoor_profile_id = kwargs['cdnFrontdoorProfileId'] + if security_policies is None and 'securityPolicies' in kwargs: + security_policies = kwargs['securityPolicies'] + if cdn_frontdoor_profile_id is not None: - pulumi.set(__self__, "cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) + _setter("cdn_frontdoor_profile_id", cdn_frontdoor_profile_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if security_policies is not None: - pulumi.set(__self__, "security_policies", security_policies) + _setter("security_policies", security_policies) @property @pulumi.getter(name="cdnFrontdoorProfileId") @@ -176,6 +218,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorSecurityPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -197,6 +243,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'cdn_frontdoor_profile_id'") __props__.__dict__["cdn_frontdoor_profile_id"] = cdn_frontdoor_profile_id __props__.__dict__["name"] = name + if security_policies is not None and not isinstance(security_policies, FrontdoorSecurityPolicySecurityPoliciesArgs): + security_policies = security_policies or {} + def _setter(key, value): + security_policies[key] = value + FrontdoorSecurityPolicySecurityPoliciesArgs._configure(_setter, **security_policies) if security_policies is None and not opts.urn: raise TypeError("Missing required property 'security_policies'") __props__.__dict__["security_policies"] = security_policies diff --git a/sdk/python/pulumi_azure/cdn/get_frontdoor_custom_domain.py b/sdk/python/pulumi_azure/cdn/get_frontdoor_custom_domain.py index 52cbf99d74..017e49ce87 100644 --- a/sdk/python/pulumi_azure/cdn/get_frontdoor_custom_domain.py +++ b/sdk/python/pulumi_azure/cdn/get_frontdoor_custom_domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/cdn/get_frontdoor_endpoint.py b/sdk/python/pulumi_azure/cdn/get_frontdoor_endpoint.py index 400bad2fc1..55ddd793ab 100644 --- a/sdk/python/pulumi_azure/cdn/get_frontdoor_endpoint.py +++ b/sdk/python/pulumi_azure/cdn/get_frontdoor_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/cdn/get_frontdoor_firewall_policy.py b/sdk/python/pulumi_azure/cdn/get_frontdoor_firewall_policy.py index 1f7054ba6a..6a51ae8dc7 100644 --- a/sdk/python/pulumi_azure/cdn/get_frontdoor_firewall_policy.py +++ b/sdk/python/pulumi_azure/cdn/get_frontdoor_firewall_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/cdn/get_frontdoor_origin_group.py b/sdk/python/pulumi_azure/cdn/get_frontdoor_origin_group.py index 9ad4a1af50..548539dbd8 100644 --- a/sdk/python/pulumi_azure/cdn/get_frontdoor_origin_group.py +++ b/sdk/python/pulumi_azure/cdn/get_frontdoor_origin_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/cdn/get_frontdoor_profile.py b/sdk/python/pulumi_azure/cdn/get_frontdoor_profile.py index 901a4fdf15..8b8f0bfa56 100644 --- a/sdk/python/pulumi_azure/cdn/get_frontdoor_profile.py +++ b/sdk/python/pulumi_azure/cdn/get_frontdoor_profile.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/cdn/get_frontdoor_rule_set.py b/sdk/python/pulumi_azure/cdn/get_frontdoor_rule_set.py index 02ebb7f8a3..9c3b81ea65 100644 --- a/sdk/python/pulumi_azure/cdn/get_frontdoor_rule_set.py +++ b/sdk/python/pulumi_azure/cdn/get_frontdoor_rule_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/cdn/get_frontdoor_secret.py b/sdk/python/pulumi_azure/cdn/get_frontdoor_secret.py index ead98f603c..e7d907f23a 100644 --- a/sdk/python/pulumi_azure/cdn/get_frontdoor_secret.py +++ b/sdk/python/pulumi_azure/cdn/get_frontdoor_secret.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/cdn/get_profile.py b/sdk/python/pulumi_azure/cdn/get_profile.py index c72a0e0f2c..66de132142 100644 --- a/sdk/python/pulumi_azure/cdn/get_profile.py +++ b/sdk/python/pulumi_azure/cdn/get_profile.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/cdn/outputs.py b/sdk/python/pulumi_azure/cdn/outputs.py index 0cefe25f75..1a72169f2e 100644 --- a/sdk/python/pulumi_azure/cdn/outputs.py +++ b/sdk/python/pulumi_azure/cdn/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -127,10 +127,35 @@ def __init__(__self__, *, :param str protocol_type: The type of protocol. Possible values are `ServerNameIndication` and `IPBased`. :param str tls_version: The minimum TLS protocol version that is used for HTTPS. Possible values are `TLS10` (representing TLS 1.0/1.1), `TLS12` (representing TLS 1.2) and `None` (representing no minimums). Defaults to `TLS12`. """ - pulumi.set(__self__, "certificate_type", certificate_type) - pulumi.set(__self__, "protocol_type", protocol_type) + EndpointCustomDomainCdnManagedHttps._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_type=certificate_type, + protocol_type=protocol_type, + tls_version=tls_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_type: Optional[str] = None, + protocol_type: Optional[str] = None, + tls_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_type is None and 'certificateType' in kwargs: + certificate_type = kwargs['certificateType'] + if certificate_type is None: + raise TypeError("Missing 'certificate_type' argument") + if protocol_type is None and 'protocolType' in kwargs: + protocol_type = kwargs['protocolType'] + if protocol_type is None: + raise TypeError("Missing 'protocol_type' argument") + if tls_version is None and 'tlsVersion' in kwargs: + tls_version = kwargs['tlsVersion'] + + _setter("certificate_type", certificate_type) + _setter("protocol_type", protocol_type) if tls_version is not None: - pulumi.set(__self__, "tls_version", tls_version) + _setter("tls_version", tls_version) @property @pulumi.getter(name="certificateType") @@ -191,12 +216,33 @@ def __init__(__self__, *, > **NOTE** Either `key_vault_certificate_id` or `key_vault_secret_id` has to be specified. :param str tls_version: The minimum TLS protocol version that is used for HTTPS. Possible values are `TLS10` (representing TLS 1.0/1.1), `TLS12` (representing TLS 1.2) and `None` (representing no minimums). Defaults to `TLS12`. """ + EndpointCustomDomainUserManagedHttps._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_certificate_id=key_vault_certificate_id, + key_vault_secret_id=key_vault_secret_id, + tls_version=tls_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_certificate_id: Optional[str] = None, + key_vault_secret_id: Optional[str] = None, + tls_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_certificate_id is None and 'keyVaultCertificateId' in kwargs: + key_vault_certificate_id = kwargs['keyVaultCertificateId'] + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + if tls_version is None and 'tlsVersion' in kwargs: + tls_version = kwargs['tlsVersion'] + if key_vault_certificate_id is not None: - pulumi.set(__self__, "key_vault_certificate_id", key_vault_certificate_id) + _setter("key_vault_certificate_id", key_vault_certificate_id) if key_vault_secret_id is not None: - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) + _setter("key_vault_secret_id", key_vault_secret_id) if tls_version is not None: - pulumi.set(__self__, "tls_version", tls_version) + _setter("tls_version", tls_version) @property @pulumi.getter(name="keyVaultCertificateId") @@ -332,48 +378,145 @@ def __init__(__self__, *, :param 'EndpointDeliveryRuleUrlRedirectActionArgs' url_redirect_action: A `url_redirect_action` block as defined below. :param 'EndpointDeliveryRuleUrlRewriteActionArgs' url_rewrite_action: A `url_rewrite_action` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "order", order) + EndpointDeliveryRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + order=order, + cache_expiration_action=cache_expiration_action, + cache_key_query_string_action=cache_key_query_string_action, + cookies_conditions=cookies_conditions, + device_condition=device_condition, + http_version_conditions=http_version_conditions, + modify_request_header_actions=modify_request_header_actions, + modify_response_header_actions=modify_response_header_actions, + post_arg_conditions=post_arg_conditions, + query_string_conditions=query_string_conditions, + remote_address_conditions=remote_address_conditions, + request_body_conditions=request_body_conditions, + request_header_conditions=request_header_conditions, + request_method_condition=request_method_condition, + request_scheme_condition=request_scheme_condition, + request_uri_conditions=request_uri_conditions, + url_file_extension_conditions=url_file_extension_conditions, + url_file_name_conditions=url_file_name_conditions, + url_path_conditions=url_path_conditions, + url_redirect_action=url_redirect_action, + url_rewrite_action=url_rewrite_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + order: Optional[int] = None, + cache_expiration_action: Optional['outputs.EndpointDeliveryRuleCacheExpirationAction'] = None, + cache_key_query_string_action: Optional['outputs.EndpointDeliveryRuleCacheKeyQueryStringAction'] = None, + cookies_conditions: Optional[Sequence['outputs.EndpointDeliveryRuleCookiesCondition']] = None, + device_condition: Optional['outputs.EndpointDeliveryRuleDeviceCondition'] = None, + http_version_conditions: Optional[Sequence['outputs.EndpointDeliveryRuleHttpVersionCondition']] = None, + modify_request_header_actions: Optional[Sequence['outputs.EndpointDeliveryRuleModifyRequestHeaderAction']] = None, + modify_response_header_actions: Optional[Sequence['outputs.EndpointDeliveryRuleModifyResponseHeaderAction']] = None, + post_arg_conditions: Optional[Sequence['outputs.EndpointDeliveryRulePostArgCondition']] = None, + query_string_conditions: Optional[Sequence['outputs.EndpointDeliveryRuleQueryStringCondition']] = None, + remote_address_conditions: Optional[Sequence['outputs.EndpointDeliveryRuleRemoteAddressCondition']] = None, + request_body_conditions: Optional[Sequence['outputs.EndpointDeliveryRuleRequestBodyCondition']] = None, + request_header_conditions: Optional[Sequence['outputs.EndpointDeliveryRuleRequestHeaderCondition']] = None, + request_method_condition: Optional['outputs.EndpointDeliveryRuleRequestMethodCondition'] = None, + request_scheme_condition: Optional['outputs.EndpointDeliveryRuleRequestSchemeCondition'] = None, + request_uri_conditions: Optional[Sequence['outputs.EndpointDeliveryRuleRequestUriCondition']] = None, + url_file_extension_conditions: Optional[Sequence['outputs.EndpointDeliveryRuleUrlFileExtensionCondition']] = None, + url_file_name_conditions: Optional[Sequence['outputs.EndpointDeliveryRuleUrlFileNameCondition']] = None, + url_path_conditions: Optional[Sequence['outputs.EndpointDeliveryRuleUrlPathCondition']] = None, + url_redirect_action: Optional['outputs.EndpointDeliveryRuleUrlRedirectAction'] = None, + url_rewrite_action: Optional['outputs.EndpointDeliveryRuleUrlRewriteAction'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if order is None: + raise TypeError("Missing 'order' argument") + if cache_expiration_action is None and 'cacheExpirationAction' in kwargs: + cache_expiration_action = kwargs['cacheExpirationAction'] + if cache_key_query_string_action is None and 'cacheKeyQueryStringAction' in kwargs: + cache_key_query_string_action = kwargs['cacheKeyQueryStringAction'] + if cookies_conditions is None and 'cookiesConditions' in kwargs: + cookies_conditions = kwargs['cookiesConditions'] + if device_condition is None and 'deviceCondition' in kwargs: + device_condition = kwargs['deviceCondition'] + if http_version_conditions is None and 'httpVersionConditions' in kwargs: + http_version_conditions = kwargs['httpVersionConditions'] + if modify_request_header_actions is None and 'modifyRequestHeaderActions' in kwargs: + modify_request_header_actions = kwargs['modifyRequestHeaderActions'] + if modify_response_header_actions is None and 'modifyResponseHeaderActions' in kwargs: + modify_response_header_actions = kwargs['modifyResponseHeaderActions'] + if post_arg_conditions is None and 'postArgConditions' in kwargs: + post_arg_conditions = kwargs['postArgConditions'] + if query_string_conditions is None and 'queryStringConditions' in kwargs: + query_string_conditions = kwargs['queryStringConditions'] + if remote_address_conditions is None and 'remoteAddressConditions' in kwargs: + remote_address_conditions = kwargs['remoteAddressConditions'] + if request_body_conditions is None and 'requestBodyConditions' in kwargs: + request_body_conditions = kwargs['requestBodyConditions'] + if request_header_conditions is None and 'requestHeaderConditions' in kwargs: + request_header_conditions = kwargs['requestHeaderConditions'] + if request_method_condition is None and 'requestMethodCondition' in kwargs: + request_method_condition = kwargs['requestMethodCondition'] + if request_scheme_condition is None and 'requestSchemeCondition' in kwargs: + request_scheme_condition = kwargs['requestSchemeCondition'] + if request_uri_conditions is None and 'requestUriConditions' in kwargs: + request_uri_conditions = kwargs['requestUriConditions'] + if url_file_extension_conditions is None and 'urlFileExtensionConditions' in kwargs: + url_file_extension_conditions = kwargs['urlFileExtensionConditions'] + if url_file_name_conditions is None and 'urlFileNameConditions' in kwargs: + url_file_name_conditions = kwargs['urlFileNameConditions'] + if url_path_conditions is None and 'urlPathConditions' in kwargs: + url_path_conditions = kwargs['urlPathConditions'] + if url_redirect_action is None and 'urlRedirectAction' in kwargs: + url_redirect_action = kwargs['urlRedirectAction'] + if url_rewrite_action is None and 'urlRewriteAction' in kwargs: + url_rewrite_action = kwargs['urlRewriteAction'] + + _setter("name", name) + _setter("order", order) if cache_expiration_action is not None: - pulumi.set(__self__, "cache_expiration_action", cache_expiration_action) + _setter("cache_expiration_action", cache_expiration_action) if cache_key_query_string_action is not None: - pulumi.set(__self__, "cache_key_query_string_action", cache_key_query_string_action) + _setter("cache_key_query_string_action", cache_key_query_string_action) if cookies_conditions is not None: - pulumi.set(__self__, "cookies_conditions", cookies_conditions) + _setter("cookies_conditions", cookies_conditions) if device_condition is not None: - pulumi.set(__self__, "device_condition", device_condition) + _setter("device_condition", device_condition) if http_version_conditions is not None: - pulumi.set(__self__, "http_version_conditions", http_version_conditions) + _setter("http_version_conditions", http_version_conditions) if modify_request_header_actions is not None: - pulumi.set(__self__, "modify_request_header_actions", modify_request_header_actions) + _setter("modify_request_header_actions", modify_request_header_actions) if modify_response_header_actions is not None: - pulumi.set(__self__, "modify_response_header_actions", modify_response_header_actions) + _setter("modify_response_header_actions", modify_response_header_actions) if post_arg_conditions is not None: - pulumi.set(__self__, "post_arg_conditions", post_arg_conditions) + _setter("post_arg_conditions", post_arg_conditions) if query_string_conditions is not None: - pulumi.set(__self__, "query_string_conditions", query_string_conditions) + _setter("query_string_conditions", query_string_conditions) if remote_address_conditions is not None: - pulumi.set(__self__, "remote_address_conditions", remote_address_conditions) + _setter("remote_address_conditions", remote_address_conditions) if request_body_conditions is not None: - pulumi.set(__self__, "request_body_conditions", request_body_conditions) + _setter("request_body_conditions", request_body_conditions) if request_header_conditions is not None: - pulumi.set(__self__, "request_header_conditions", request_header_conditions) + _setter("request_header_conditions", request_header_conditions) if request_method_condition is not None: - pulumi.set(__self__, "request_method_condition", request_method_condition) + _setter("request_method_condition", request_method_condition) if request_scheme_condition is not None: - pulumi.set(__self__, "request_scheme_condition", request_scheme_condition) + _setter("request_scheme_condition", request_scheme_condition) if request_uri_conditions is not None: - pulumi.set(__self__, "request_uri_conditions", request_uri_conditions) + _setter("request_uri_conditions", request_uri_conditions) if url_file_extension_conditions is not None: - pulumi.set(__self__, "url_file_extension_conditions", url_file_extension_conditions) + _setter("url_file_extension_conditions", url_file_extension_conditions) if url_file_name_conditions is not None: - pulumi.set(__self__, "url_file_name_conditions", url_file_name_conditions) + _setter("url_file_name_conditions", url_file_name_conditions) if url_path_conditions is not None: - pulumi.set(__self__, "url_path_conditions", url_path_conditions) + _setter("url_path_conditions", url_path_conditions) if url_redirect_action is not None: - pulumi.set(__self__, "url_redirect_action", url_redirect_action) + _setter("url_redirect_action", url_redirect_action) if url_rewrite_action is not None: - pulumi.set(__self__, "url_rewrite_action", url_rewrite_action) + _setter("url_rewrite_action", url_rewrite_action) @property @pulumi.getter @@ -561,9 +704,24 @@ def __init__(__self__, *, :param str behavior: The behavior of the cache. Valid values are `BypassCache`, `Override` and `SetIfMissing`. :param str duration: Duration of the cache. Only allowed when `behavior` is set to `Override` or `SetIfMissing`. Format: `[d.]hh:mm:ss` """ - pulumi.set(__self__, "behavior", behavior) + EndpointDeliveryRuleCacheExpirationAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + behavior=behavior, + duration=duration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + behavior: Optional[str] = None, + duration: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if behavior is None: + raise TypeError("Missing 'behavior' argument") + + _setter("behavior", behavior) if duration is not None: - pulumi.set(__self__, "duration", duration) + _setter("duration", duration) @property @pulumi.getter @@ -591,9 +749,24 @@ def __init__(__self__, *, :param str behavior: The behavior of the cache key for query strings. Valid values are `Exclude`, `ExcludeAll`, `Include` and `IncludeAll`. :param str parameters: Comma separated list of parameter values. """ - pulumi.set(__self__, "behavior", behavior) + EndpointDeliveryRuleCacheKeyQueryStringAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + behavior=behavior, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + behavior: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if behavior is None: + raise TypeError("Missing 'behavior' argument") + + _setter("behavior", behavior) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -646,14 +819,41 @@ def __init__(__self__, *, :param bool negate_condition: Defaults to `false`. :param Sequence[str] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + EndpointDeliveryRuleCookiesCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + selector=selector, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + selector: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) + _setter("selector", selector) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -726,11 +926,32 @@ def __init__(__self__, *, :param bool negate_condition: Defaults to `false`. :param str operator: Valid values are `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + EndpointDeliveryRuleDeviceCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -787,11 +1008,32 @@ def __init__(__self__, *, :param bool negate_condition: Defaults to `false`. :param str operator: Valid values are `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + EndpointDeliveryRuleHttpVersionCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -829,10 +1071,29 @@ def __init__(__self__, *, :param str name: The header name. :param str value: The value of the header. Only needed when `action` is set to `Append` or `overwrite`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + EndpointDeliveryRuleModifyRequestHeaderAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -870,10 +1131,29 @@ def __init__(__self__, *, :param str name: The header name. :param str value: The value of the header. Only needed when `action` is set to `Append` or `overwrite`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + EndpointDeliveryRuleModifyResponseHeaderAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -934,14 +1214,41 @@ def __init__(__self__, *, :param bool negate_condition: Defaults to `false`. :param Sequence[str] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + EndpointDeliveryRulePostArgCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + selector=selector, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + selector: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) + _setter("selector", selector) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1016,13 +1323,36 @@ def __init__(__self__, *, :param bool negate_condition: Defaults to `false`. :param Sequence[str] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleQueryStringCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1087,11 +1417,32 @@ def __init__(__self__, *, :param Sequence[str] match_values: List of string values. For `GeoMatch` `operator` this should be a list of country codes (e.g. `US` or `DE`). List of IP address if `operator` equals to `IPMatch`. This is required if `operator` is not `Any`. :param bool negate_condition: Defaults to `false`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleRemoteAddressCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) @property @pulumi.getter @@ -1150,13 +1501,36 @@ def __init__(__self__, *, :param bool negate_condition: Defaults to `false`. :param Sequence[str] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleRequestBodyCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1225,14 +1599,41 @@ def __init__(__self__, *, :param bool negate_condition: Defaults to `false`. :param Sequence[str] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + EndpointDeliveryRuleRequestHeaderCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + selector=selector, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + selector: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) + _setter("selector", selector) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1305,11 +1706,32 @@ def __init__(__self__, *, :param bool negate_condition: Defaults to `false`. :param str operator: Valid values are `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + EndpointDeliveryRuleRequestMethodCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -1366,11 +1788,32 @@ def __init__(__self__, *, :param bool negate_condition: Defaults to `false`. :param str operator: Valid values are `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + EndpointDeliveryRuleRequestSchemeCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -1429,13 +1872,36 @@ def __init__(__self__, *, :param bool negate_condition: Defaults to `false`. :param Sequence[str] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleRequestUriCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1502,13 +1968,36 @@ def __init__(__self__, *, :param bool negate_condition: Defaults to `false`. :param Sequence[str] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleUrlFileExtensionCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1575,13 +2064,36 @@ def __init__(__self__, *, :param bool negate_condition: Defaults to `false`. :param Sequence[str] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleUrlFileNameCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1648,13 +2160,36 @@ def __init__(__self__, *, :param bool negate_condition: Defaults to `false`. :param Sequence[str] transforms: A list of transforms. Valid values are `Lowercase` and `Uppercase`. """ - pulumi.set(__self__, "operator", operator) + EndpointDeliveryRuleUrlPathCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -1725,17 +2260,44 @@ def __init__(__self__, *, :param str protocol: Specifies the protocol part of the URL. Valid values are `MatchRequest`, `Http` and `Https`. :param str query_string: Specifies the query string part of the URL. This value must not start with a `?` or `&` and must be in `=` format separated by `&`. """ - pulumi.set(__self__, "redirect_type", redirect_type) + EndpointDeliveryRuleUrlRedirectAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + redirect_type=redirect_type, + fragment=fragment, + hostname=hostname, + path=path, + protocol=protocol, + query_string=query_string, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + redirect_type: Optional[str] = None, + fragment: Optional[str] = None, + hostname: Optional[str] = None, + path: Optional[str] = None, + protocol: Optional[str] = None, + query_string: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if redirect_type is None and 'redirectType' in kwargs: + redirect_type = kwargs['redirectType'] + if redirect_type is None: + raise TypeError("Missing 'redirect_type' argument") + if query_string is None and 'queryString' in kwargs: + query_string = kwargs['queryString'] + + _setter("redirect_type", redirect_type) if fragment is not None: - pulumi.set(__self__, "fragment", fragment) + _setter("fragment", fragment) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if query_string is not None: - pulumi.set(__self__, "query_string", query_string) + _setter("query_string", query_string) @property @pulumi.getter(name="redirectType") @@ -1816,10 +2378,33 @@ def __init__(__self__, *, :param str source_pattern: This value must start with a `/` and can't be longer than 260 characters. :param bool preserve_unmatched_path: Defaults to `true`. """ - pulumi.set(__self__, "destination", destination) - pulumi.set(__self__, "source_pattern", source_pattern) + EndpointDeliveryRuleUrlRewriteAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination=destination, + source_pattern=source_pattern, + preserve_unmatched_path=preserve_unmatched_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination: Optional[str] = None, + source_pattern: Optional[str] = None, + preserve_unmatched_path: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination is None: + raise TypeError("Missing 'destination' argument") + if source_pattern is None and 'sourcePattern' in kwargs: + source_pattern = kwargs['sourcePattern'] + if source_pattern is None: + raise TypeError("Missing 'source_pattern' argument") + if preserve_unmatched_path is None and 'preserveUnmatchedPath' in kwargs: + preserve_unmatched_path = kwargs['preserveUnmatchedPath'] + + _setter("destination", destination) + _setter("source_pattern", source_pattern) if preserve_unmatched_path is not None: - pulumi.set(__self__, "preserve_unmatched_path", preserve_unmatched_path) + _setter("preserve_unmatched_path", preserve_unmatched_path) @property @pulumi.getter @@ -1876,9 +2461,34 @@ def __init__(__self__, *, :param Sequence[str] country_codes: A List of two letter country codes (e.g. `US`, `GB`) to be associated with this Geo Filter. :param str relative_path: The relative path applicable to geo filter. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "country_codes", country_codes) - pulumi.set(__self__, "relative_path", relative_path) + EndpointGeoFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + country_codes=country_codes, + relative_path=relative_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + country_codes: Optional[Sequence[str]] = None, + relative_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if country_codes is None and 'countryCodes' in kwargs: + country_codes = kwargs['countryCodes'] + if country_codes is None: + raise TypeError("Missing 'country_codes' argument") + if relative_path is None and 'relativePath' in kwargs: + relative_path = kwargs['relativePath'] + if relative_path is None: + raise TypeError("Missing 'relative_path' argument") + + _setter("action", action) + _setter("country_codes", country_codes) + _setter("relative_path", relative_path) @property @pulumi.getter @@ -1949,18 +2559,51 @@ def __init__(__self__, *, :param 'EndpointGlobalDeliveryRuleUrlRedirectActionArgs' url_redirect_action: A `url_redirect_action` block as defined below. :param 'EndpointGlobalDeliveryRuleUrlRewriteActionArgs' url_rewrite_action: A `url_rewrite_action` block as defined below. """ + EndpointGlobalDeliveryRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache_expiration_action=cache_expiration_action, + cache_key_query_string_action=cache_key_query_string_action, + modify_request_header_actions=modify_request_header_actions, + modify_response_header_actions=modify_response_header_actions, + url_redirect_action=url_redirect_action, + url_rewrite_action=url_rewrite_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache_expiration_action: Optional['outputs.EndpointGlobalDeliveryRuleCacheExpirationAction'] = None, + cache_key_query_string_action: Optional['outputs.EndpointGlobalDeliveryRuleCacheKeyQueryStringAction'] = None, + modify_request_header_actions: Optional[Sequence['outputs.EndpointGlobalDeliveryRuleModifyRequestHeaderAction']] = None, + modify_response_header_actions: Optional[Sequence['outputs.EndpointGlobalDeliveryRuleModifyResponseHeaderAction']] = None, + url_redirect_action: Optional['outputs.EndpointGlobalDeliveryRuleUrlRedirectAction'] = None, + url_rewrite_action: Optional['outputs.EndpointGlobalDeliveryRuleUrlRewriteAction'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cache_expiration_action is None and 'cacheExpirationAction' in kwargs: + cache_expiration_action = kwargs['cacheExpirationAction'] + if cache_key_query_string_action is None and 'cacheKeyQueryStringAction' in kwargs: + cache_key_query_string_action = kwargs['cacheKeyQueryStringAction'] + if modify_request_header_actions is None and 'modifyRequestHeaderActions' in kwargs: + modify_request_header_actions = kwargs['modifyRequestHeaderActions'] + if modify_response_header_actions is None and 'modifyResponseHeaderActions' in kwargs: + modify_response_header_actions = kwargs['modifyResponseHeaderActions'] + if url_redirect_action is None and 'urlRedirectAction' in kwargs: + url_redirect_action = kwargs['urlRedirectAction'] + if url_rewrite_action is None and 'urlRewriteAction' in kwargs: + url_rewrite_action = kwargs['urlRewriteAction'] + if cache_expiration_action is not None: - pulumi.set(__self__, "cache_expiration_action", cache_expiration_action) + _setter("cache_expiration_action", cache_expiration_action) if cache_key_query_string_action is not None: - pulumi.set(__self__, "cache_key_query_string_action", cache_key_query_string_action) + _setter("cache_key_query_string_action", cache_key_query_string_action) if modify_request_header_actions is not None: - pulumi.set(__self__, "modify_request_header_actions", modify_request_header_actions) + _setter("modify_request_header_actions", modify_request_header_actions) if modify_response_header_actions is not None: - pulumi.set(__self__, "modify_response_header_actions", modify_response_header_actions) + _setter("modify_response_header_actions", modify_response_header_actions) if url_redirect_action is not None: - pulumi.set(__self__, "url_redirect_action", url_redirect_action) + _setter("url_redirect_action", url_redirect_action) if url_rewrite_action is not None: - pulumi.set(__self__, "url_rewrite_action", url_rewrite_action) + _setter("url_rewrite_action", url_rewrite_action) @property @pulumi.getter(name="cacheExpirationAction") @@ -2020,9 +2663,24 @@ def __init__(__self__, *, :param str behavior: The behavior of the cache. Valid values are `BypassCache`, `Override` and `SetIfMissing`. :param str duration: Duration of the cache. Only allowed when `behavior` is set to `Override` or `SetIfMissing`. Format: `[d.]hh:mm:ss` """ - pulumi.set(__self__, "behavior", behavior) + EndpointGlobalDeliveryRuleCacheExpirationAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + behavior=behavior, + duration=duration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + behavior: Optional[str] = None, + duration: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if behavior is None: + raise TypeError("Missing 'behavior' argument") + + _setter("behavior", behavior) if duration is not None: - pulumi.set(__self__, "duration", duration) + _setter("duration", duration) @property @pulumi.getter @@ -2050,9 +2708,24 @@ def __init__(__self__, *, :param str behavior: The behavior of the cache key for query strings. Valid values are `Exclude`, `ExcludeAll`, `Include` and `IncludeAll`. :param str parameters: Comma separated list of parameter values. """ - pulumi.set(__self__, "behavior", behavior) + EndpointGlobalDeliveryRuleCacheKeyQueryStringAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + behavior=behavior, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + behavior: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if behavior is None: + raise TypeError("Missing 'behavior' argument") + + _setter("behavior", behavior) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -2082,10 +2755,29 @@ def __init__(__self__, *, :param str name: The header name. :param str value: The value of the header. Only needed when `action` is set to `Append` or `overwrite`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + EndpointGlobalDeliveryRuleModifyRequestHeaderAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2123,10 +2815,29 @@ def __init__(__self__, *, :param str name: The header name. :param str value: The value of the header. Only needed when `action` is set to `Append` or `overwrite`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + EndpointGlobalDeliveryRuleModifyResponseHeaderAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2189,17 +2900,44 @@ def __init__(__self__, *, :param str protocol: Specifies the protocol part of the URL. Valid values are `MatchRequest`, `Http` and `Https`. :param str query_string: Specifies the query string part of the URL. This value must not start with a `?` or `&` and must be in `=` format separated by `&`. """ - pulumi.set(__self__, "redirect_type", redirect_type) + EndpointGlobalDeliveryRuleUrlRedirectAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + redirect_type=redirect_type, + fragment=fragment, + hostname=hostname, + path=path, + protocol=protocol, + query_string=query_string, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + redirect_type: Optional[str] = None, + fragment: Optional[str] = None, + hostname: Optional[str] = None, + path: Optional[str] = None, + protocol: Optional[str] = None, + query_string: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if redirect_type is None and 'redirectType' in kwargs: + redirect_type = kwargs['redirectType'] + if redirect_type is None: + raise TypeError("Missing 'redirect_type' argument") + if query_string is None and 'queryString' in kwargs: + query_string = kwargs['queryString'] + + _setter("redirect_type", redirect_type) if fragment is not None: - pulumi.set(__self__, "fragment", fragment) + _setter("fragment", fragment) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if query_string is not None: - pulumi.set(__self__, "query_string", query_string) + _setter("query_string", query_string) @property @pulumi.getter(name="redirectType") @@ -2280,10 +3018,33 @@ def __init__(__self__, *, :param str source_pattern: This value must start with a `/` and can't be longer than 260 characters. :param bool preserve_unmatched_path: Defaults to `true`. """ - pulumi.set(__self__, "destination", destination) - pulumi.set(__self__, "source_pattern", source_pattern) + EndpointGlobalDeliveryRuleUrlRewriteAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination=destination, + source_pattern=source_pattern, + preserve_unmatched_path=preserve_unmatched_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination: Optional[str] = None, + source_pattern: Optional[str] = None, + preserve_unmatched_path: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination is None: + raise TypeError("Missing 'destination' argument") + if source_pattern is None and 'sourcePattern' in kwargs: + source_pattern = kwargs['sourcePattern'] + if source_pattern is None: + raise TypeError("Missing 'source_pattern' argument") + if preserve_unmatched_path is None and 'preserveUnmatchedPath' in kwargs: + preserve_unmatched_path = kwargs['preserveUnmatchedPath'] + + _setter("destination", destination) + _setter("source_pattern", source_pattern) if preserve_unmatched_path is not None: - pulumi.set(__self__, "preserve_unmatched_path", preserve_unmatched_path) + _setter("preserve_unmatched_path", preserve_unmatched_path) @property @pulumi.getter @@ -2344,12 +3105,39 @@ def __init__(__self__, *, :param int http_port: The HTTP port of the origin. Defaults to `80`. Changing this forces a new resource to be created. :param int https_port: The HTTPS port of the origin. Defaults to `443`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "host_name", host_name) - pulumi.set(__self__, "name", name) + EndpointOrigin._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + name=name, + http_port=http_port, + https_port=https_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + name: Optional[str] = None, + http_port: Optional[int] = None, + https_port: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if http_port is None and 'httpPort' in kwargs: + http_port = kwargs['httpPort'] + if https_port is None and 'httpsPort' in kwargs: + https_port = kwargs['httpsPort'] + + _setter("host_name", host_name) + _setter("name", name) if http_port is not None: - pulumi.set(__self__, "http_port", http_port) + _setter("http_port", http_port) if https_port is not None: - pulumi.set(__self__, "https_port", https_port) + _setter("https_port", https_port) @property @pulumi.getter(name="hostName") @@ -2418,12 +3206,33 @@ def __init__(__self__, *, ->**NOTE:** It may take up to 15 minutes for the Front Door Service to validate the state and Domain ownership of the Custom Domain. :param str minimum_tls_version: TLS protocol version that will be used for Https. Possible values include `TLS10` and `TLS12`. Defaults to `TLS12`. """ + FrontdoorCustomDomainTls._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_secret_id=cdn_frontdoor_secret_id, + certificate_type=certificate_type, + minimum_tls_version=minimum_tls_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_secret_id: Optional[str] = None, + certificate_type: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_secret_id is None and 'cdnFrontdoorSecretId' in kwargs: + cdn_frontdoor_secret_id = kwargs['cdnFrontdoorSecretId'] + if certificate_type is None and 'certificateType' in kwargs: + certificate_type = kwargs['certificateType'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if cdn_frontdoor_secret_id is not None: - pulumi.set(__self__, "cdn_frontdoor_secret_id", cdn_frontdoor_secret_id) + _setter("cdn_frontdoor_secret_id", cdn_frontdoor_secret_id) if certificate_type is not None: - pulumi.set(__self__, "certificate_type", certificate_type) + _setter("certificate_type", certificate_type) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) @property @pulumi.getter(name="cdnFrontdoorSecretId") @@ -2494,19 +3303,56 @@ def __init__(__self__, *, :param int rate_limit_duration_in_minutes: The rate limit duration in minutes. Defaults to `1`. :param int rate_limit_threshold: The rate limit threshold. Defaults to `10`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + FrontdoorFirewallPolicyCustomRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + type=type, + enabled=enabled, + match_conditions=match_conditions, + priority=priority, + rate_limit_duration_in_minutes=rate_limit_duration_in_minutes, + rate_limit_threshold=rate_limit_threshold, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + enabled: Optional[bool] = None, + match_conditions: Optional[Sequence['outputs.FrontdoorFirewallPolicyCustomRuleMatchCondition']] = None, + priority: Optional[int] = None, + rate_limit_duration_in_minutes: Optional[int] = None, + rate_limit_threshold: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if match_conditions is None and 'matchConditions' in kwargs: + match_conditions = kwargs['matchConditions'] + if rate_limit_duration_in_minutes is None and 'rateLimitDurationInMinutes' in kwargs: + rate_limit_duration_in_minutes = kwargs['rateLimitDurationInMinutes'] + if rate_limit_threshold is None and 'rateLimitThreshold' in kwargs: + rate_limit_threshold = kwargs['rateLimitThreshold'] + + _setter("action", action) + _setter("name", name) + _setter("type", type) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if match_conditions is not None: - pulumi.set(__self__, "match_conditions", match_conditions) + _setter("match_conditions", match_conditions) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if rate_limit_duration_in_minutes is not None: - pulumi.set(__self__, "rate_limit_duration_in_minutes", rate_limit_duration_in_minutes) + _setter("rate_limit_duration_in_minutes", rate_limit_duration_in_minutes) if rate_limit_threshold is not None: - pulumi.set(__self__, "rate_limit_threshold", rate_limit_threshold) + _setter("rate_limit_threshold", rate_limit_threshold) @property @pulumi.getter @@ -2611,15 +3457,48 @@ def __init__(__self__, *, :param str selector: Match against a specific key if the `match_variable` is `QueryString`, `PostArgs`, `RequestHeader` or `Cookies`. :param Sequence[str] transforms: Up to `5` transforms to apply. Possible values are `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `URLDecode` or `URLEncode`. """ - pulumi.set(__self__, "match_values", match_values) - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) + FrontdoorFirewallPolicyCustomRuleMatchCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + match_variable=match_variable, + operator=operator, + negation_condition=negation_condition, + selector=selector, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + match_variable: Optional[str] = None, + operator: Optional[str] = None, + negation_condition: Optional[bool] = None, + selector: Optional[str] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if negation_condition is None and 'negationCondition' in kwargs: + negation_condition = kwargs['negationCondition'] + + _setter("match_values", match_values) + _setter("match_variable", match_variable) + _setter("operator", operator) if negation_condition is not None: - pulumi.set(__self__, "negation_condition", negation_condition) + _setter("negation_condition", negation_condition) if selector is not None: - pulumi.set(__self__, "selector", selector) + _setter("selector", selector) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="matchValues") @@ -2685,13 +3564,38 @@ def __init__(__self__, *, :param Sequence['FrontdoorFirewallPolicyManagedRuleExclusionArgs'] exclusions: One or more `exclusion` blocks as defined below. :param Sequence['FrontdoorFirewallPolicyManagedRuleOverrideArgs'] overrides: One or more `override` blocks as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "version", version) + FrontdoorFirewallPolicyManagedRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + type=type, + version=version, + exclusions=exclusions, + overrides=overrides, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + type: Optional[str] = None, + version: Optional[str] = None, + exclusions: Optional[Sequence['outputs.FrontdoorFirewallPolicyManagedRuleExclusion']] = None, + overrides: Optional[Sequence['outputs.FrontdoorFirewallPolicyManagedRuleOverride']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("action", action) + _setter("type", type) + _setter("version", version) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) if overrides is not None: - pulumi.set(__self__, "overrides", overrides) + _setter("overrides", overrides) @property @pulumi.getter @@ -2766,9 +3670,32 @@ def __init__(__self__, *, > **NOTE:** `selector` must be set to `*` if `operator` is set to `EqualsAny`. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + FrontdoorFirewallPolicyManagedRuleExclusion._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + operator=operator, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[str] = None, + operator: Optional[str] = None, + selector: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + + _setter("match_variable", match_variable) + _setter("operator", operator) + _setter("selector", selector) @property @pulumi.getter(name="matchVariable") @@ -2827,11 +3754,30 @@ def __init__(__self__, *, :param Sequence['FrontdoorFirewallPolicyManagedRuleOverrideExclusionArgs'] exclusions: One or more `exclusion` blocks as defined below. :param Sequence['FrontdoorFirewallPolicyManagedRuleOverrideRuleArgs'] rules: One or more `rule` blocks as defined below. If none are specified, all of the rules in the group will be disabled. """ - pulumi.set(__self__, "rule_group_name", rule_group_name) + FrontdoorFirewallPolicyManagedRuleOverride._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_group_name=rule_group_name, + exclusions=exclusions, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_group_name: Optional[str] = None, + exclusions: Optional[Sequence['outputs.FrontdoorFirewallPolicyManagedRuleOverrideExclusion']] = None, + rules: Optional[Sequence['outputs.FrontdoorFirewallPolicyManagedRuleOverrideRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_group_name is None and 'ruleGroupName' in kwargs: + rule_group_name = kwargs['ruleGroupName'] + if rule_group_name is None: + raise TypeError("Missing 'rule_group_name' argument") + + _setter("rule_group_name", rule_group_name) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter(name="ruleGroupName") @@ -2890,9 +3836,32 @@ def __init__(__self__, *, > **NOTE:** `selector` must be set to `*` if `operator` is set to `EqualsAny`. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + FrontdoorFirewallPolicyManagedRuleOverrideExclusion._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + operator=operator, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[str] = None, + operator: Optional[str] = None, + selector: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + + _setter("match_variable", match_variable) + _setter("operator", operator) + _setter("selector", selector) @property @pulumi.getter(name="matchVariable") @@ -2955,12 +3924,35 @@ def __init__(__self__, *, :param bool enabled: Is the managed rule override enabled or disabled. Defaults to `false` :param Sequence['FrontdoorFirewallPolicyManagedRuleOverrideRuleExclusionArgs'] exclusions: One or more `exclusion` blocks as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "rule_id", rule_id) + FrontdoorFirewallPolicyManagedRuleOverrideRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + rule_id=rule_id, + enabled=enabled, + exclusions=exclusions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + rule_id: Optional[str] = None, + enabled: Optional[bool] = None, + exclusions: Optional[Sequence['outputs.FrontdoorFirewallPolicyManagedRuleOverrideRuleExclusion']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if rule_id is None and 'ruleId' in kwargs: + rule_id = kwargs['ruleId'] + if rule_id is None: + raise TypeError("Missing 'rule_id' argument") + + _setter("action", action) + _setter("rule_id", rule_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) @property @pulumi.getter @@ -3029,9 +4021,32 @@ def __init__(__self__, *, > **NOTE:** `selector` must be set to `*` if `operator` is set to `EqualsAny`. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + FrontdoorFirewallPolicyManagedRuleOverrideRuleExclusion._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + operator=operator, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[str] = None, + operator: Optional[str] = None, + selector: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + + _setter("match_variable", match_variable) + _setter("operator", operator) + _setter("selector", selector) @property @pulumi.getter(name="matchVariable") @@ -3096,12 +4111,37 @@ def __init__(__self__, *, > **NOTE:** Health probes can only be disabled if there is a single enabled origin in a single enabled origin group. For more information about the `health_probe` settings please see the [product documentation](https://docs.microsoft.com/azure/frontdoor/health-probes). :param str request_type: Specifies the type of health probe request that is made. Possible values are `GET` and `HEAD`. Defaults to `HEAD`. """ - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) - pulumi.set(__self__, "protocol", protocol) + FrontdoorOriginGroupHealthProbe._configure( + lambda key, value: pulumi.set(__self__, key, value), + interval_in_seconds=interval_in_seconds, + protocol=protocol, + path=path, + request_type=request_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + interval_in_seconds: Optional[int] = None, + protocol: Optional[str] = None, + path: Optional[str] = None, + request_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if interval_in_seconds is None: + raise TypeError("Missing 'interval_in_seconds' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if request_type is None and 'requestType' in kwargs: + request_type = kwargs['requestType'] + + _setter("interval_in_seconds", interval_in_seconds) + _setter("protocol", protocol) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if request_type is not None: - pulumi.set(__self__, "request_type", request_type) + _setter("request_type", request_type) @property @pulumi.getter(name="intervalInSeconds") @@ -3170,12 +4210,33 @@ def __init__(__self__, *, :param int sample_size: Specifies the number of samples to consider for load balancing decisions. Possible values are between `0` and `255` (inclusive). Defaults to `4`. :param int successful_samples_required: Specifies the number of samples within the sample period that must succeed. Possible values are between `0` and `255` (inclusive). Defaults to `3`. """ + FrontdoorOriginGroupLoadBalancing._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_latency_in_milliseconds=additional_latency_in_milliseconds, + sample_size=sample_size, + successful_samples_required=successful_samples_required, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_latency_in_milliseconds: Optional[int] = None, + sample_size: Optional[int] = None, + successful_samples_required: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_latency_in_milliseconds is None and 'additionalLatencyInMilliseconds' in kwargs: + additional_latency_in_milliseconds = kwargs['additionalLatencyInMilliseconds'] + if sample_size is None and 'sampleSize' in kwargs: + sample_size = kwargs['sampleSize'] + if successful_samples_required is None and 'successfulSamplesRequired' in kwargs: + successful_samples_required = kwargs['successfulSamplesRequired'] + if additional_latency_in_milliseconds is not None: - pulumi.set(__self__, "additional_latency_in_milliseconds", additional_latency_in_milliseconds) + _setter("additional_latency_in_milliseconds", additional_latency_in_milliseconds) if sample_size is not None: - pulumi.set(__self__, "sample_size", sample_size) + _setter("sample_size", sample_size) if successful_samples_required is not None: - pulumi.set(__self__, "successful_samples_required", successful_samples_required) + _setter("successful_samples_required", successful_samples_required) @property @pulumi.getter(name="additionalLatencyInMilliseconds") @@ -3240,12 +4301,39 @@ def __init__(__self__, *, > **NOTE:** `target_type` cannot be specified when using a Load Balancer as an Origin. """ - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "private_link_target_id", private_link_target_id) + FrontdoorOriginPrivateLink._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + private_link_target_id=private_link_target_id, + request_message=request_message, + target_type=target_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[str] = None, + private_link_target_id: Optional[str] = None, + request_message: Optional[str] = None, + target_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is None: + raise TypeError("Missing 'location' argument") + if private_link_target_id is None and 'privateLinkTargetId' in kwargs: + private_link_target_id = kwargs['privateLinkTargetId'] + if private_link_target_id is None: + raise TypeError("Missing 'private_link_target_id' argument") + if request_message is None and 'requestMessage' in kwargs: + request_message = kwargs['requestMessage'] + if target_type is None and 'targetType' in kwargs: + target_type = kwargs['targetType'] + + _setter("location", location) + _setter("private_link_target_id", private_link_target_id) if request_message is not None: - pulumi.set(__self__, "request_message", request_message) + _setter("request_message", request_message) if target_type is not None: - pulumi.set(__self__, "target_type", target_type) + _setter("target_type", target_type) @property @pulumi.getter @@ -3324,14 +4412,39 @@ def __init__(__self__, *, > **NOTE:** The value of the `query_string_caching_behavior` determines if the `query_strings` field will be used as an include list or an ignore list. :param Sequence[str] query_strings: Query strings to include or ignore. """ + FrontdoorRouteCache._configure( + lambda key, value: pulumi.set(__self__, key, value), + compression_enabled=compression_enabled, + content_types_to_compresses=content_types_to_compresses, + query_string_caching_behavior=query_string_caching_behavior, + query_strings=query_strings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compression_enabled: Optional[bool] = None, + content_types_to_compresses: Optional[Sequence[str]] = None, + query_string_caching_behavior: Optional[str] = None, + query_strings: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compression_enabled is None and 'compressionEnabled' in kwargs: + compression_enabled = kwargs['compressionEnabled'] + if content_types_to_compresses is None and 'contentTypesToCompresses' in kwargs: + content_types_to_compresses = kwargs['contentTypesToCompresses'] + if query_string_caching_behavior is None and 'queryStringCachingBehavior' in kwargs: + query_string_caching_behavior = kwargs['queryStringCachingBehavior'] + if query_strings is None and 'queryStrings' in kwargs: + query_strings = kwargs['queryStrings'] + if compression_enabled is not None: - pulumi.set(__self__, "compression_enabled", compression_enabled) + _setter("compression_enabled", compression_enabled) if content_types_to_compresses is not None: - pulumi.set(__self__, "content_types_to_compresses", content_types_to_compresses) + _setter("content_types_to_compresses", content_types_to_compresses) if query_string_caching_behavior is not None: - pulumi.set(__self__, "query_string_caching_behavior", query_string_caching_behavior) + _setter("query_string_caching_behavior", query_string_caching_behavior) if query_strings is not None: - pulumi.set(__self__, "query_strings", query_strings) + _setter("query_strings", query_strings) @property @pulumi.getter(name="compressionEnabled") @@ -3410,16 +4523,45 @@ def __init__(__self__, *, :param 'FrontdoorRuleActionsUrlRedirectActionArgs' url_redirect_action: A `url_redirect_action` block as defined below. You may **not** have a `url_redirect_action` **and** a `url_rewrite_action` defined in the same `actions` block. :param 'FrontdoorRuleActionsUrlRewriteActionArgs' url_rewrite_action: A `url_rewrite_action` block as defined below. You may **not** have a `url_rewrite_action` **and** a `url_redirect_action` defined in the same `actions` block. """ + FrontdoorRuleActions._configure( + lambda key, value: pulumi.set(__self__, key, value), + request_header_actions=request_header_actions, + response_header_actions=response_header_actions, + route_configuration_override_action=route_configuration_override_action, + url_redirect_action=url_redirect_action, + url_rewrite_action=url_rewrite_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + request_header_actions: Optional[Sequence['outputs.FrontdoorRuleActionsRequestHeaderAction']] = None, + response_header_actions: Optional[Sequence['outputs.FrontdoorRuleActionsResponseHeaderAction']] = None, + route_configuration_override_action: Optional['outputs.FrontdoorRuleActionsRouteConfigurationOverrideAction'] = None, + url_redirect_action: Optional['outputs.FrontdoorRuleActionsUrlRedirectAction'] = None, + url_rewrite_action: Optional['outputs.FrontdoorRuleActionsUrlRewriteAction'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if request_header_actions is None and 'requestHeaderActions' in kwargs: + request_header_actions = kwargs['requestHeaderActions'] + if response_header_actions is None and 'responseHeaderActions' in kwargs: + response_header_actions = kwargs['responseHeaderActions'] + if route_configuration_override_action is None and 'routeConfigurationOverrideAction' in kwargs: + route_configuration_override_action = kwargs['routeConfigurationOverrideAction'] + if url_redirect_action is None and 'urlRedirectAction' in kwargs: + url_redirect_action = kwargs['urlRedirectAction'] + if url_rewrite_action is None and 'urlRewriteAction' in kwargs: + url_rewrite_action = kwargs['urlRewriteAction'] + if request_header_actions is not None: - pulumi.set(__self__, "request_header_actions", request_header_actions) + _setter("request_header_actions", request_header_actions) if response_header_actions is not None: - pulumi.set(__self__, "response_header_actions", response_header_actions) + _setter("response_header_actions", response_header_actions) if route_configuration_override_action is not None: - pulumi.set(__self__, "route_configuration_override_action", route_configuration_override_action) + _setter("route_configuration_override_action", route_configuration_override_action) if url_redirect_action is not None: - pulumi.set(__self__, "url_redirect_action", url_redirect_action) + _setter("url_redirect_action", url_redirect_action) if url_rewrite_action is not None: - pulumi.set(__self__, "url_rewrite_action", url_rewrite_action) + _setter("url_rewrite_action", url_rewrite_action) @property @pulumi.getter(name="requestHeaderActions") @@ -3496,10 +4638,33 @@ def __init__(__self__, *, ->**NOTE:** `value` is required if the `header_action` is set to `Append` or `Overwrite`. """ - pulumi.set(__self__, "header_action", header_action) - pulumi.set(__self__, "header_name", header_name) + FrontdoorRuleActionsRequestHeaderAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_action=header_action, + header_name=header_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_action: Optional[str] = None, + header_name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_action is None and 'headerAction' in kwargs: + header_action = kwargs['headerAction'] + if header_action is None: + raise TypeError("Missing 'header_action' argument") + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + + _setter("header_action", header_action) + _setter("header_name", header_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerAction") @@ -3564,10 +4729,33 @@ def __init__(__self__, *, ->**NOTE:** `value` is required if the `header_action` is set to `Append` or `Overwrite`. """ - pulumi.set(__self__, "header_action", header_action) - pulumi.set(__self__, "header_name", header_name) + FrontdoorRuleActionsResponseHeaderAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_action=header_action, + header_name=header_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_action: Optional[str] = None, + header_name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_action is None and 'headerAction' in kwargs: + header_action = kwargs['headerAction'] + if header_action is None: + raise TypeError("Missing 'header_action' argument") + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + + _setter("header_action", header_action) + _setter("header_name", header_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerAction") @@ -3652,20 +4840,57 @@ def __init__(__self__, *, ->**NOTE:** `query_string_parameters` is a required field when the `query_string_caching_behavior` is set to `IncludeSpecifiedQueryStrings` or `IgnoreSpecifiedQueryStrings`. """ + FrontdoorRuleActionsRouteConfigurationOverrideAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache_behavior=cache_behavior, + cache_duration=cache_duration, + cdn_frontdoor_origin_group_id=cdn_frontdoor_origin_group_id, + compression_enabled=compression_enabled, + forwarding_protocol=forwarding_protocol, + query_string_caching_behavior=query_string_caching_behavior, + query_string_parameters=query_string_parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache_behavior: Optional[str] = None, + cache_duration: Optional[str] = None, + cdn_frontdoor_origin_group_id: Optional[str] = None, + compression_enabled: Optional[bool] = None, + forwarding_protocol: Optional[str] = None, + query_string_caching_behavior: Optional[str] = None, + query_string_parameters: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cache_behavior is None and 'cacheBehavior' in kwargs: + cache_behavior = kwargs['cacheBehavior'] + if cache_duration is None and 'cacheDuration' in kwargs: + cache_duration = kwargs['cacheDuration'] + if cdn_frontdoor_origin_group_id is None and 'cdnFrontdoorOriginGroupId' in kwargs: + cdn_frontdoor_origin_group_id = kwargs['cdnFrontdoorOriginGroupId'] + if compression_enabled is None and 'compressionEnabled' in kwargs: + compression_enabled = kwargs['compressionEnabled'] + if forwarding_protocol is None and 'forwardingProtocol' in kwargs: + forwarding_protocol = kwargs['forwardingProtocol'] + if query_string_caching_behavior is None and 'queryStringCachingBehavior' in kwargs: + query_string_caching_behavior = kwargs['queryStringCachingBehavior'] + if query_string_parameters is None and 'queryStringParameters' in kwargs: + query_string_parameters = kwargs['queryStringParameters'] + if cache_behavior is not None: - pulumi.set(__self__, "cache_behavior", cache_behavior) + _setter("cache_behavior", cache_behavior) if cache_duration is not None: - pulumi.set(__self__, "cache_duration", cache_duration) + _setter("cache_duration", cache_duration) if cdn_frontdoor_origin_group_id is not None: - pulumi.set(__self__, "cdn_frontdoor_origin_group_id", cdn_frontdoor_origin_group_id) + _setter("cdn_frontdoor_origin_group_id", cdn_frontdoor_origin_group_id) if compression_enabled is not None: - pulumi.set(__self__, "compression_enabled", compression_enabled) + _setter("compression_enabled", compression_enabled) if forwarding_protocol is not None: - pulumi.set(__self__, "forwarding_protocol", forwarding_protocol) + _setter("forwarding_protocol", forwarding_protocol) if query_string_caching_behavior is not None: - pulumi.set(__self__, "query_string_caching_behavior", query_string_caching_behavior) + _setter("query_string_caching_behavior", query_string_caching_behavior) if query_string_parameters is not None: - pulumi.set(__self__, "query_string_parameters", query_string_parameters) + _setter("query_string_parameters", query_string_parameters) @property @pulumi.getter(name="cacheBehavior") @@ -3774,16 +4999,53 @@ def __init__(__self__, *, :param str query_string: The query string used in the redirect URL. The value must be in the <key>=<value> or <key>={`action_server_variable`} format and must not include the leading `?`, leave blank to preserve the incoming query string. Maximum allowed length for this field is `2048` characters. Defaults to an empty string. Defaults to `""`. :param str redirect_protocol: The protocol the request will be redirected as. Possible values include `MatchRequest`, `Http` or `Https`. Defaults to `MatchRequest`. """ - pulumi.set(__self__, "destination_hostname", destination_hostname) - pulumi.set(__self__, "redirect_type", redirect_type) + FrontdoorRuleActionsUrlRedirectAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_hostname=destination_hostname, + redirect_type=redirect_type, + destination_fragment=destination_fragment, + destination_path=destination_path, + query_string=query_string, + redirect_protocol=redirect_protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_hostname: Optional[str] = None, + redirect_type: Optional[str] = None, + destination_fragment: Optional[str] = None, + destination_path: Optional[str] = None, + query_string: Optional[str] = None, + redirect_protocol: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_hostname is None and 'destinationHostname' in kwargs: + destination_hostname = kwargs['destinationHostname'] + if destination_hostname is None: + raise TypeError("Missing 'destination_hostname' argument") + if redirect_type is None and 'redirectType' in kwargs: + redirect_type = kwargs['redirectType'] + if redirect_type is None: + raise TypeError("Missing 'redirect_type' argument") + if destination_fragment is None and 'destinationFragment' in kwargs: + destination_fragment = kwargs['destinationFragment'] + if destination_path is None and 'destinationPath' in kwargs: + destination_path = kwargs['destinationPath'] + if query_string is None and 'queryString' in kwargs: + query_string = kwargs['queryString'] + if redirect_protocol is None and 'redirectProtocol' in kwargs: + redirect_protocol = kwargs['redirectProtocol'] + + _setter("destination_hostname", destination_hostname) + _setter("redirect_type", redirect_type) if destination_fragment is not None: - pulumi.set(__self__, "destination_fragment", destination_fragment) + _setter("destination_fragment", destination_fragment) if destination_path is not None: - pulumi.set(__self__, "destination_path", destination_path) + _setter("destination_path", destination_path) if query_string is not None: - pulumi.set(__self__, "query_string", query_string) + _setter("query_string", query_string) if redirect_protocol is not None: - pulumi.set(__self__, "redirect_protocol", redirect_protocol) + _setter("redirect_protocol", redirect_protocol) @property @pulumi.getter(name="destinationHostname") @@ -3864,10 +5126,33 @@ def __init__(__self__, *, :param str source_pattern: The source pattern in the URL path to replace. This uses prefix-based matching. For example, to match all URL paths use a forward slash `"/"` as the source pattern value. :param bool preserve_unmatched_path: Append the remaining path after the source pattern to the new destination path? Possible values `true` or `false`. Defaults to `false`. """ - pulumi.set(__self__, "destination", destination) - pulumi.set(__self__, "source_pattern", source_pattern) + FrontdoorRuleActionsUrlRewriteAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination=destination, + source_pattern=source_pattern, + preserve_unmatched_path=preserve_unmatched_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination: Optional[str] = None, + source_pattern: Optional[str] = None, + preserve_unmatched_path: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination is None: + raise TypeError("Missing 'destination' argument") + if source_pattern is None and 'sourcePattern' in kwargs: + source_pattern = kwargs['sourcePattern'] + if source_pattern is None: + raise TypeError("Missing 'source_pattern' argument") + if preserve_unmatched_path is None and 'preserveUnmatchedPath' in kwargs: + preserve_unmatched_path = kwargs['preserveUnmatchedPath'] + + _setter("destination", destination) + _setter("source_pattern", source_pattern) if preserve_unmatched_path is not None: - pulumi.set(__self__, "preserve_unmatched_path", preserve_unmatched_path) + _setter("preserve_unmatched_path", preserve_unmatched_path) @property @pulumi.getter @@ -3990,44 +5275,129 @@ def __init__(__self__, *, :param Sequence['FrontdoorRuleConditionsUrlFilenameConditionArgs'] url_filename_conditions: A `url_filename_condition` block as defined below. :param Sequence['FrontdoorRuleConditionsUrlPathConditionArgs'] url_path_conditions: A `url_path_condition` block as defined below. """ + FrontdoorRuleConditions._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_port_conditions=client_port_conditions, + cookies_conditions=cookies_conditions, + host_name_conditions=host_name_conditions, + http_version_conditions=http_version_conditions, + is_device_conditions=is_device_conditions, + post_args_conditions=post_args_conditions, + query_string_conditions=query_string_conditions, + remote_address_conditions=remote_address_conditions, + request_body_conditions=request_body_conditions, + request_header_conditions=request_header_conditions, + request_method_conditions=request_method_conditions, + request_scheme_conditions=request_scheme_conditions, + request_uri_conditions=request_uri_conditions, + server_port_conditions=server_port_conditions, + socket_address_conditions=socket_address_conditions, + ssl_protocol_conditions=ssl_protocol_conditions, + url_file_extension_conditions=url_file_extension_conditions, + url_filename_conditions=url_filename_conditions, + url_path_conditions=url_path_conditions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_port_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsClientPortCondition']] = None, + cookies_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsCookiesCondition']] = None, + host_name_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsHostNameCondition']] = None, + http_version_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsHttpVersionCondition']] = None, + is_device_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsIsDeviceCondition']] = None, + post_args_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsPostArgsCondition']] = None, + query_string_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsQueryStringCondition']] = None, + remote_address_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsRemoteAddressCondition']] = None, + request_body_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsRequestBodyCondition']] = None, + request_header_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsRequestHeaderCondition']] = None, + request_method_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsRequestMethodCondition']] = None, + request_scheme_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsRequestSchemeCondition']] = None, + request_uri_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsRequestUriCondition']] = None, + server_port_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsServerPortCondition']] = None, + socket_address_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsSocketAddressCondition']] = None, + ssl_protocol_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsSslProtocolCondition']] = None, + url_file_extension_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsUrlFileExtensionCondition']] = None, + url_filename_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsUrlFilenameCondition']] = None, + url_path_conditions: Optional[Sequence['outputs.FrontdoorRuleConditionsUrlPathCondition']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_port_conditions is None and 'clientPortConditions' in kwargs: + client_port_conditions = kwargs['clientPortConditions'] + if cookies_conditions is None and 'cookiesConditions' in kwargs: + cookies_conditions = kwargs['cookiesConditions'] + if host_name_conditions is None and 'hostNameConditions' in kwargs: + host_name_conditions = kwargs['hostNameConditions'] + if http_version_conditions is None and 'httpVersionConditions' in kwargs: + http_version_conditions = kwargs['httpVersionConditions'] + if is_device_conditions is None and 'isDeviceConditions' in kwargs: + is_device_conditions = kwargs['isDeviceConditions'] + if post_args_conditions is None and 'postArgsConditions' in kwargs: + post_args_conditions = kwargs['postArgsConditions'] + if query_string_conditions is None and 'queryStringConditions' in kwargs: + query_string_conditions = kwargs['queryStringConditions'] + if remote_address_conditions is None and 'remoteAddressConditions' in kwargs: + remote_address_conditions = kwargs['remoteAddressConditions'] + if request_body_conditions is None and 'requestBodyConditions' in kwargs: + request_body_conditions = kwargs['requestBodyConditions'] + if request_header_conditions is None and 'requestHeaderConditions' in kwargs: + request_header_conditions = kwargs['requestHeaderConditions'] + if request_method_conditions is None and 'requestMethodConditions' in kwargs: + request_method_conditions = kwargs['requestMethodConditions'] + if request_scheme_conditions is None and 'requestSchemeConditions' in kwargs: + request_scheme_conditions = kwargs['requestSchemeConditions'] + if request_uri_conditions is None and 'requestUriConditions' in kwargs: + request_uri_conditions = kwargs['requestUriConditions'] + if server_port_conditions is None and 'serverPortConditions' in kwargs: + server_port_conditions = kwargs['serverPortConditions'] + if socket_address_conditions is None and 'socketAddressConditions' in kwargs: + socket_address_conditions = kwargs['socketAddressConditions'] + if ssl_protocol_conditions is None and 'sslProtocolConditions' in kwargs: + ssl_protocol_conditions = kwargs['sslProtocolConditions'] + if url_file_extension_conditions is None and 'urlFileExtensionConditions' in kwargs: + url_file_extension_conditions = kwargs['urlFileExtensionConditions'] + if url_filename_conditions is None and 'urlFilenameConditions' in kwargs: + url_filename_conditions = kwargs['urlFilenameConditions'] + if url_path_conditions is None and 'urlPathConditions' in kwargs: + url_path_conditions = kwargs['urlPathConditions'] + if client_port_conditions is not None: - pulumi.set(__self__, "client_port_conditions", client_port_conditions) + _setter("client_port_conditions", client_port_conditions) if cookies_conditions is not None: - pulumi.set(__self__, "cookies_conditions", cookies_conditions) + _setter("cookies_conditions", cookies_conditions) if host_name_conditions is not None: - pulumi.set(__self__, "host_name_conditions", host_name_conditions) + _setter("host_name_conditions", host_name_conditions) if http_version_conditions is not None: - pulumi.set(__self__, "http_version_conditions", http_version_conditions) + _setter("http_version_conditions", http_version_conditions) if is_device_conditions is not None: - pulumi.set(__self__, "is_device_conditions", is_device_conditions) + _setter("is_device_conditions", is_device_conditions) if post_args_conditions is not None: - pulumi.set(__self__, "post_args_conditions", post_args_conditions) + _setter("post_args_conditions", post_args_conditions) if query_string_conditions is not None: - pulumi.set(__self__, "query_string_conditions", query_string_conditions) + _setter("query_string_conditions", query_string_conditions) if remote_address_conditions is not None: - pulumi.set(__self__, "remote_address_conditions", remote_address_conditions) + _setter("remote_address_conditions", remote_address_conditions) if request_body_conditions is not None: - pulumi.set(__self__, "request_body_conditions", request_body_conditions) + _setter("request_body_conditions", request_body_conditions) if request_header_conditions is not None: - pulumi.set(__self__, "request_header_conditions", request_header_conditions) + _setter("request_header_conditions", request_header_conditions) if request_method_conditions is not None: - pulumi.set(__self__, "request_method_conditions", request_method_conditions) + _setter("request_method_conditions", request_method_conditions) if request_scheme_conditions is not None: - pulumi.set(__self__, "request_scheme_conditions", request_scheme_conditions) + _setter("request_scheme_conditions", request_scheme_conditions) if request_uri_conditions is not None: - pulumi.set(__self__, "request_uri_conditions", request_uri_conditions) + _setter("request_uri_conditions", request_uri_conditions) if server_port_conditions is not None: - pulumi.set(__self__, "server_port_conditions", server_port_conditions) + _setter("server_port_conditions", server_port_conditions) if socket_address_conditions is not None: - pulumi.set(__self__, "socket_address_conditions", socket_address_conditions) + _setter("socket_address_conditions", socket_address_conditions) if ssl_protocol_conditions is not None: - pulumi.set(__self__, "ssl_protocol_conditions", ssl_protocol_conditions) + _setter("ssl_protocol_conditions", ssl_protocol_conditions) if url_file_extension_conditions is not None: - pulumi.set(__self__, "url_file_extension_conditions", url_file_extension_conditions) + _setter("url_file_extension_conditions", url_file_extension_conditions) if url_filename_conditions is not None: - pulumi.set(__self__, "url_filename_conditions", url_filename_conditions) + _setter("url_filename_conditions", url_filename_conditions) if url_path_conditions is not None: - pulumi.set(__self__, "url_path_conditions", url_path_conditions) + _setter("url_path_conditions", url_path_conditions) @property @pulumi.getter(name="clientPortConditions") @@ -4212,11 +5582,32 @@ def __init__(__self__, *, :param Sequence[str] match_values: One or more integer values(e.g. "1") representing the value of the client port to match. If multiple values are specified, they're evaluated using `OR` logic. :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. """ - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsClientPortCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) @property @pulumi.getter @@ -4279,14 +5670,43 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param Sequence[str] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "cookie_name", cookie_name) - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsCookiesCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + cookie_name=cookie_name, + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cookie_name: Optional[str] = None, + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cookie_name is None and 'cookieName' in kwargs: + cookie_name = kwargs['cookieName'] + if cookie_name is None: + raise TypeError("Missing 'cookie_name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("cookie_name", cookie_name) + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="cookieName") @@ -4361,13 +5781,36 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param Sequence[str] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsHostNameCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -4432,11 +5875,32 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param str operator: Possible value `Equal`. Defaults to `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + FrontdoorRuleConditionsHttpVersionCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -4493,12 +5957,31 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param str operator: Possible value `Equal`. Defaults to `Equal`. """ + FrontdoorRuleConditionsIsDeviceCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[str] = None, + negate_condition: Optional[bool] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -4561,14 +6044,43 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param Sequence[str] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "post_args_name", post_args_name) + FrontdoorRuleConditionsPostArgsCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + post_args_name=post_args_name, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + post_args_name: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if post_args_name is None and 'postArgsName' in kwargs: + post_args_name = kwargs['postArgsName'] + if post_args_name is None: + raise TypeError("Missing 'post_args_name' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) + _setter("post_args_name", post_args_name) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -4643,13 +6155,36 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param Sequence[str] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsQueryStringCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -4716,12 +6251,31 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param str operator: The type of the remote address to match. Possible values include `Any`, `GeoMatch` or `IPMatch`. Use the `negate_condition` to specify Not `GeoMatch` or Not `IPMatch`. """ + FrontdoorRuleConditionsRemoteAddressCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -4782,12 +6336,37 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param Sequence[str] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "match_values", match_values) - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsRequestBodyCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + operator=operator, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) + _setter("operator", operator) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="matchValues") @@ -4858,14 +6437,43 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param Sequence[str] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsRequestHeaderCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[str] = None, + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("header_name", header_name) + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="headerName") @@ -4938,11 +6546,32 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param str operator: Possible value `Equal`. Defaults to `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + FrontdoorRuleConditionsRequestMethodCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -4999,12 +6628,31 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param str operator: Possible value `Equal`. Defaults to `Equal`. """ + FrontdoorRuleConditionsRequestSchemeCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[str] = None, + negate_condition: Optional[bool] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -5063,13 +6711,36 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param Sequence[str] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsRequestUriCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -5134,10 +6805,33 @@ def __init__(__self__, *, :param str operator: A Conditional operator. Possible values include `Any`, `Equal`, `Contains`, `BeginsWith`, `EndsWith`, `LessThan`, `LessThanOrEqual`, `GreaterThan`, `GreaterThanOrEqual` or `RegEx`. Details can be found in the `Condition Operator List` below. :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. """ - pulumi.set(__self__, "match_values", match_values) - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsServerPortCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + operator=operator, + negate_condition=negate_condition, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + negate_condition: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) + _setter("operator", operator) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) @property @pulumi.getter(name="matchValues") @@ -5198,12 +6892,31 @@ def __init__(__self__, *, ->**NOTE:** If the value of the `operator` field is set to `IpMatch` then the `match_values` field is also required. """ + FrontdoorRuleConditionsSocketAddressCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -5264,11 +6977,32 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param str operator: Possible value `Equal`. Defaults to `Equal`. """ - pulumi.set(__self__, "match_values", match_values) + FrontdoorRuleConditionsSslProtocolCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + negate_condition=negate_condition, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter(name="matchValues") @@ -5327,12 +7061,37 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param Sequence[str] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "match_values", match_values) - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsUrlFileExtensionCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + operator=operator, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("match_values", match_values) + _setter("operator", operator) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="matchValues") @@ -5401,13 +7160,36 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param Sequence[str] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsUrlFilenameCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -5476,13 +7258,36 @@ def __init__(__self__, *, :param bool negate_condition: If `true` operator becomes the opposite of its value. Possible values `true` or `false`. Defaults to `false`. Details can be found in the `Condition Operator List` below. :param Sequence[str] transforms: A Conditional operator. Possible values include `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `UrlDecode` or `UrlEncode`. Details can be found in the `Condition Transform List` below. """ - pulumi.set(__self__, "operator", operator) + FrontdoorRuleConditionsUrlPathCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + match_values=match_values, + negate_condition=negate_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negate_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter @@ -5541,7 +7346,22 @@ def __init__(__self__, *, """ :param Sequence['FrontdoorSecretSecretCustomerCertificateArgs'] customer_certificates: A `customer_certificate` block as defined below. Changing this forces a new Front Door Secret to be created. """ - pulumi.set(__self__, "customer_certificates", customer_certificates) + FrontdoorSecretSecret._configure( + lambda key, value: pulumi.set(__self__, key, value), + customer_certificates=customer_certificates, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + customer_certificates: Optional[Sequence['outputs.FrontdoorSecretSecretCustomerCertificate']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if customer_certificates is None and 'customerCertificates' in kwargs: + customer_certificates = kwargs['customerCertificates'] + if customer_certificates is None: + raise TypeError("Missing 'customer_certificates' argument") + + _setter("customer_certificates", customer_certificates) @property @pulumi.getter(name="customerCertificates") @@ -5582,9 +7402,28 @@ def __init__(__self__, *, ->**NOTE:** If you would like to use the **latest version** of the Key Vault Certificate use the Key Vault Certificates `versionless_id` attribute as the `key_vault_certificate_id` fields value(e.g. `key_vault_certificate_id = azurerm_key_vault_certificate.example.versionless_id`). :param Sequence[str] subject_alternative_names: One or more `subject alternative names` contained within the key vault certificate. """ - pulumi.set(__self__, "key_vault_certificate_id", key_vault_certificate_id) + FrontdoorSecretSecretCustomerCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_certificate_id=key_vault_certificate_id, + subject_alternative_names=subject_alternative_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_certificate_id: Optional[str] = None, + subject_alternative_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_certificate_id is None and 'keyVaultCertificateId' in kwargs: + key_vault_certificate_id = kwargs['keyVaultCertificateId'] + if key_vault_certificate_id is None: + raise TypeError("Missing 'key_vault_certificate_id' argument") + if subject_alternative_names is None and 'subjectAlternativeNames' in kwargs: + subject_alternative_names = kwargs['subjectAlternativeNames'] + + _setter("key_vault_certificate_id", key_vault_certificate_id) if subject_alternative_names is not None: - pulumi.set(__self__, "subject_alternative_names", subject_alternative_names) + _setter("subject_alternative_names", subject_alternative_names) @property @pulumi.getter(name="keyVaultCertificateId") @@ -5612,7 +7451,20 @@ def __init__(__self__, *, """ :param 'FrontdoorSecurityPolicySecurityPoliciesFirewallArgs' firewall: An `firewall` block as defined below. Changing this forces a new Front Door Security Policy to be created. """ - pulumi.set(__self__, "firewall", firewall) + FrontdoorSecurityPolicySecurityPolicies._configure( + lambda key, value: pulumi.set(__self__, key, value), + firewall=firewall, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + firewall: Optional['outputs.FrontdoorSecurityPolicySecurityPoliciesFirewall'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if firewall is None: + raise TypeError("Missing 'firewall' argument") + + _setter("firewall", firewall) @property @pulumi.getter @@ -5649,8 +7501,27 @@ def __init__(__self__, *, :param 'FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationArgs' association: An `association` block as defined below. Changing this forces a new Front Door Security Policy to be created. :param str cdn_frontdoor_firewall_policy_id: The Resource Id of the Front Door Firewall Policy that should be linked to this Front Door Security Policy. Changing this forces a new Front Door Security Policy to be created. """ - pulumi.set(__self__, "association", association) - pulumi.set(__self__, "cdn_frontdoor_firewall_policy_id", cdn_frontdoor_firewall_policy_id) + FrontdoorSecurityPolicySecurityPoliciesFirewall._configure( + lambda key, value: pulumi.set(__self__, key, value), + association=association, + cdn_frontdoor_firewall_policy_id=cdn_frontdoor_firewall_policy_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + association: Optional['outputs.FrontdoorSecurityPolicySecurityPoliciesFirewallAssociation'] = None, + cdn_frontdoor_firewall_policy_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if association is None: + raise TypeError("Missing 'association' argument") + if cdn_frontdoor_firewall_policy_id is None and 'cdnFrontdoorFirewallPolicyId' in kwargs: + cdn_frontdoor_firewall_policy_id = kwargs['cdnFrontdoorFirewallPolicyId'] + if cdn_frontdoor_firewall_policy_id is None: + raise TypeError("Missing 'cdn_frontdoor_firewall_policy_id' argument") + + _setter("association", association) + _setter("cdn_frontdoor_firewall_policy_id", cdn_frontdoor_firewall_policy_id) @property @pulumi.getter @@ -5695,8 +7566,27 @@ def __init__(__self__, *, :param Sequence['FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationDomainArgs'] domains: One or more `domain` blocks as defined below. Changing this forces a new Front Door Security Policy to be created. :param str patterns_to_match: The list of paths to match for this firewall policy. Possible value includes `/*`. Changing this forces a new Front Door Security Policy to be created. """ - pulumi.set(__self__, "domains", domains) - pulumi.set(__self__, "patterns_to_match", patterns_to_match) + FrontdoorSecurityPolicySecurityPoliciesFirewallAssociation._configure( + lambda key, value: pulumi.set(__self__, key, value), + domains=domains, + patterns_to_match=patterns_to_match, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domains: Optional[Sequence['outputs.FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationDomain']] = None, + patterns_to_match: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domains is None: + raise TypeError("Missing 'domains' argument") + if patterns_to_match is None and 'patternsToMatch' in kwargs: + patterns_to_match = kwargs['patternsToMatch'] + if patterns_to_match is None: + raise TypeError("Missing 'patterns_to_match' argument") + + _setter("domains", domains) + _setter("patterns_to_match", patterns_to_match) @property @pulumi.getter @@ -5741,9 +7631,26 @@ def __init__(__self__, *, :param str cdn_frontdoor_domain_id: The Resource Id of the **Front Door Custom Domain** or **Front Door Endpoint** that should be bound to this Front Door Security Policy. Changing this forces a new Front Door Security Policy to be created. :param bool active: Is the Front Door Custom Domain/Endpoint activated? """ - pulumi.set(__self__, "cdn_frontdoor_domain_id", cdn_frontdoor_domain_id) + FrontdoorSecurityPolicySecurityPoliciesFirewallAssociationDomain._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_domain_id=cdn_frontdoor_domain_id, + active=active, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_domain_id: Optional[str] = None, + active: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_domain_id is None and 'cdnFrontdoorDomainId' in kwargs: + cdn_frontdoor_domain_id = kwargs['cdnFrontdoorDomainId'] + if cdn_frontdoor_domain_id is None: + raise TypeError("Missing 'cdn_frontdoor_domain_id' argument") + + _setter("cdn_frontdoor_domain_id", cdn_frontdoor_domain_id) if active is not None: - pulumi.set(__self__, "active", active) + _setter("active", active) @property @pulumi.getter(name="cdnFrontdoorDomainId") @@ -5773,9 +7680,36 @@ def __init__(__self__, *, :param str certificate_type: The SSL certificate type. :param str minimum_tls_version: The TLS protocol version that will be used for Https connections. """ - pulumi.set(__self__, "cdn_frontdoor_secret_id", cdn_frontdoor_secret_id) - pulumi.set(__self__, "certificate_type", certificate_type) - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + GetFrontdoorCustomDomainTlResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + cdn_frontdoor_secret_id=cdn_frontdoor_secret_id, + certificate_type=certificate_type, + minimum_tls_version=minimum_tls_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cdn_frontdoor_secret_id: Optional[str] = None, + certificate_type: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cdn_frontdoor_secret_id is None and 'cdnFrontdoorSecretId' in kwargs: + cdn_frontdoor_secret_id = kwargs['cdnFrontdoorSecretId'] + if cdn_frontdoor_secret_id is None: + raise TypeError("Missing 'cdn_frontdoor_secret_id' argument") + if certificate_type is None and 'certificateType' in kwargs: + certificate_type = kwargs['certificateType'] + if certificate_type is None: + raise TypeError("Missing 'certificate_type' argument") + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if minimum_tls_version is None: + raise TypeError("Missing 'minimum_tls_version' argument") + + _setter("cdn_frontdoor_secret_id", cdn_frontdoor_secret_id) + _setter("certificate_type", certificate_type) + _setter("minimum_tls_version", minimum_tls_version) @property @pulumi.getter(name="cdnFrontdoorSecretId") @@ -5815,10 +7749,39 @@ def __init__(__self__, *, :param str protocol: Specifies the protocol to use for health probe. :param str request_type: Specifies the type of health probe request that is made. """ - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "request_type", request_type) + GetFrontdoorOriginGroupHealthProbeResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + interval_in_seconds=interval_in_seconds, + path=path, + protocol=protocol, + request_type=request_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + interval_in_seconds: Optional[int] = None, + path: Optional[str] = None, + protocol: Optional[str] = None, + request_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if interval_in_seconds is None: + raise TypeError("Missing 'interval_in_seconds' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if request_type is None and 'requestType' in kwargs: + request_type = kwargs['requestType'] + if request_type is None: + raise TypeError("Missing 'request_type' argument") + + _setter("interval_in_seconds", interval_in_seconds) + _setter("path", path) + _setter("protocol", protocol) + _setter("request_type", request_type) @property @pulumi.getter(name="intervalInSeconds") @@ -5864,9 +7827,36 @@ def __init__(__self__, *, :param int sample_size: Specifies the number of samples to consider for load balancing decisions. :param int successful_samples_required: Specifies the number of samples within the sample period that must succeed. """ - pulumi.set(__self__, "additional_latency_in_milliseconds", additional_latency_in_milliseconds) - pulumi.set(__self__, "sample_size", sample_size) - pulumi.set(__self__, "successful_samples_required", successful_samples_required) + GetFrontdoorOriginGroupLoadBalancingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_latency_in_milliseconds=additional_latency_in_milliseconds, + sample_size=sample_size, + successful_samples_required=successful_samples_required, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_latency_in_milliseconds: Optional[int] = None, + sample_size: Optional[int] = None, + successful_samples_required: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_latency_in_milliseconds is None and 'additionalLatencyInMilliseconds' in kwargs: + additional_latency_in_milliseconds = kwargs['additionalLatencyInMilliseconds'] + if additional_latency_in_milliseconds is None: + raise TypeError("Missing 'additional_latency_in_milliseconds' argument") + if sample_size is None and 'sampleSize' in kwargs: + sample_size = kwargs['sampleSize'] + if sample_size is None: + raise TypeError("Missing 'sample_size' argument") + if successful_samples_required is None and 'successfulSamplesRequired' in kwargs: + successful_samples_required = kwargs['successfulSamplesRequired'] + if successful_samples_required is None: + raise TypeError("Missing 'successful_samples_required' argument") + + _setter("additional_latency_in_milliseconds", additional_latency_in_milliseconds) + _setter("sample_size", sample_size) + _setter("successful_samples_required", successful_samples_required) @property @pulumi.getter(name="additionalLatencyInMilliseconds") @@ -5900,7 +7890,22 @@ def __init__(__self__, *, """ :param Sequence['GetFrontdoorSecretSecretCustomerCertificateArgs'] customer_certificates: A `customer_certificate` block as defined below. """ - pulumi.set(__self__, "customer_certificates", customer_certificates) + GetFrontdoorSecretSecretResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + customer_certificates=customer_certificates, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + customer_certificates: Optional[Sequence['outputs.GetFrontdoorSecretSecretCustomerCertificateResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if customer_certificates is None and 'customerCertificates' in kwargs: + customer_certificates = kwargs['customerCertificates'] + if customer_certificates is None: + raise TypeError("Missing 'customer_certificates' argument") + + _setter("customer_certificates", customer_certificates) @property @pulumi.getter(name="customerCertificates") @@ -5922,9 +7927,36 @@ def __init__(__self__, *, :param str key_vault_certificate_id: The key vault certificate ID. :param Sequence[str] subject_alternative_names: One or more `subject alternative names` contained within the key vault certificate. """ - pulumi.set(__self__, "expiration_date", expiration_date) - pulumi.set(__self__, "key_vault_certificate_id", key_vault_certificate_id) - pulumi.set(__self__, "subject_alternative_names", subject_alternative_names) + GetFrontdoorSecretSecretCustomerCertificateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiration_date=expiration_date, + key_vault_certificate_id=key_vault_certificate_id, + subject_alternative_names=subject_alternative_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiration_date: Optional[str] = None, + key_vault_certificate_id: Optional[str] = None, + subject_alternative_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if expiration_date is None: + raise TypeError("Missing 'expiration_date' argument") + if key_vault_certificate_id is None and 'keyVaultCertificateId' in kwargs: + key_vault_certificate_id = kwargs['keyVaultCertificateId'] + if key_vault_certificate_id is None: + raise TypeError("Missing 'key_vault_certificate_id' argument") + if subject_alternative_names is None and 'subjectAlternativeNames' in kwargs: + subject_alternative_names = kwargs['subjectAlternativeNames'] + if subject_alternative_names is None: + raise TypeError("Missing 'subject_alternative_names' argument") + + _setter("expiration_date", expiration_date) + _setter("key_vault_certificate_id", key_vault_certificate_id) + _setter("subject_alternative_names", subject_alternative_names) @property @pulumi.getter(name="expirationDate") diff --git a/sdk/python/pulumi_azure/cdn/profile.py b/sdk/python/pulumi_azure/cdn/profile.py index 2768250874..a56d66c573 100644 --- a/sdk/python/pulumi_azure/cdn/profile.py +++ b/sdk/python/pulumi_azure/cdn/profile.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ProfileArgs', 'Profile'] @@ -27,14 +27,39 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the CDN Profile. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + ProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -113,16 +138,37 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: The pricing related information of current CDN profile. Accepted values are `Standard_Akamai`, `Standard_ChinaCdn`, `Standard_Microsoft`, `Standard_Verizon` or `Premium_Verizon`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ProfileState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + sku=sku, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -272,6 +318,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProfileArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cognitive/_inputs.py b/sdk/python/pulumi_azure/cognitive/_inputs.py index ab6c2e64f1..8f41d18ce8 100644 --- a/sdk/python/pulumi_azure/cognitive/_inputs.py +++ b/sdk/python/pulumi_azure/cognitive/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -28,9 +28,28 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault Key which should be used to Encrypt the data in this Cognitive Account. :param pulumi.Input[str] identity_client_id: The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there're multiple identities attached to the Cognitive Account. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + AccountCustomerManagedKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + identity_client_id=identity_client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + identity_client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if identity_client_id is None and 'identityClientId' in kwargs: + identity_client_id = kwargs['identityClientId'] + + _setter("key_vault_key_id", key_vault_key_id) if identity_client_id is not None: - pulumi.set(__self__, "identity_client_id", identity_client_id) + _setter("identity_client_id", identity_client_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -72,13 +91,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + AccountIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -142,11 +186,34 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_rules: One or more IP Addresses, or CIDR Blocks which should be able to access the Cognitive Account. :param pulumi.Input[Sequence[pulumi.Input['AccountNetworkAclsVirtualNetworkRuleArgs']]] virtual_network_rules: A `virtual_network_rules` block as defined below. """ - pulumi.set(__self__, "default_action", default_action) + AccountNetworkAclsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + virtual_network_rules=virtual_network_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + virtual_network_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AccountNetworkAclsVirtualNetworkRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if default_action is None: + raise TypeError("Missing 'default_action' argument") + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if virtual_network_rules is None and 'virtualNetworkRules' in kwargs: + virtual_network_rules = kwargs['virtualNetworkRules'] + + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if virtual_network_rules is not None: - pulumi.set(__self__, "virtual_network_rules", virtual_network_rules) + _setter("virtual_network_rules", virtual_network_rules) @property @pulumi.getter(name="defaultAction") @@ -194,9 +261,28 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the subnet which should be able to access this Cognitive Account. :param pulumi.Input[bool] ignore_missing_vnet_service_endpoint: Whether ignore missing vnet service endpoint or not. Default to `false`. """ - pulumi.set(__self__, "subnet_id", subnet_id) + AccountNetworkAclsVirtualNetworkRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[pulumi.Input[str]] = None, + ignore_missing_vnet_service_endpoint: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + + _setter("subnet_id", subnet_id) if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) @property @pulumi.getter(name="subnetId") @@ -232,9 +318,28 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_id: Full resource id of a Microsoft.Storage resource. :param pulumi.Input[str] identity_client_id: The client ID of the managed identity associated with the storage resource. """ - pulumi.set(__self__, "storage_account_id", storage_account_id) + AccountStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_id=storage_account_id, + identity_client_id=identity_client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_id: Optional[pulumi.Input[str]] = None, + identity_client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if identity_client_id is None and 'identityClientId' in kwargs: + identity_client_id = kwargs['identityClientId'] + + _setter("storage_account_id", storage_account_id) if identity_client_id is not None: - pulumi.set(__self__, "identity_client_id", identity_client_id) + _setter("identity_client_id", identity_client_id) @property @pulumi.getter(name="storageAccountId") @@ -272,9 +377,30 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created. :param pulumi.Input[str] version: The version of Cognitive Services Account Deployment model. """ - pulumi.set(__self__, "format", format) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "version", version) + DeploymentModelArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + format=format, + name=name, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + format: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if format is None: + raise TypeError("Missing 'format' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("format", format) + _setter("name", name) + _setter("version", version) @property @pulumi.getter @@ -328,15 +454,36 @@ def __init__(__self__, *, :param pulumi.Input[str] size: The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. Changing this forces a new resource to be created. :param pulumi.Input[str] tier: Possible values are `Free`, `Basic`, `Standard`, `Premium`, `Enterprise`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "type", type) + DeploymentScaleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + capacity=capacity, + family=family, + size=size, + tier=tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + capacity: Optional[pulumi.Input[int]] = None, + family: Optional[pulumi.Input[str]] = None, + size: Optional[pulumi.Input[str]] = None, + tier: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("type", type) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if family is not None: - pulumi.set(__self__, "family", family) + _setter("family", family) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/cognitive/account.py b/sdk/python/pulumi_azure/cognitive/account.py index b4ae2626d8..7857cab275 100644 --- a/sdk/python/pulumi_azure/cognitive/account.py +++ b/sdk/python/pulumi_azure/cognitive/account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -75,49 +75,142 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['AccountStorageArgs']]] storages: A `storage` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "kind", kind) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + AccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kind=kind, + resource_group_name=resource_group_name, + sku_name=sku_name, + custom_question_answering_search_service_id=custom_question_answering_search_service_id, + custom_question_answering_search_service_key=custom_question_answering_search_service_key, + custom_subdomain_name=custom_subdomain_name, + customer_managed_key=customer_managed_key, + dynamic_throttling_enabled=dynamic_throttling_enabled, + fqdns=fqdns, + identity=identity, + local_auth_enabled=local_auth_enabled, + location=location, + metrics_advisor_aad_client_id=metrics_advisor_aad_client_id, + metrics_advisor_aad_tenant_id=metrics_advisor_aad_tenant_id, + metrics_advisor_super_user_name=metrics_advisor_super_user_name, + metrics_advisor_website_name=metrics_advisor_website_name, + name=name, + network_acls=network_acls, + outbound_network_access_restricted=outbound_network_access_restricted, + public_network_access_enabled=public_network_access_enabled, + qna_runtime_endpoint=qna_runtime_endpoint, + storages=storages, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kind: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + custom_question_answering_search_service_id: Optional[pulumi.Input[str]] = None, + custom_question_answering_search_service_key: Optional[pulumi.Input[str]] = None, + custom_subdomain_name: Optional[pulumi.Input[str]] = None, + customer_managed_key: Optional[pulumi.Input['AccountCustomerManagedKeyArgs']] = None, + dynamic_throttling_enabled: Optional[pulumi.Input[bool]] = None, + fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + metrics_advisor_aad_client_id: Optional[pulumi.Input[str]] = None, + metrics_advisor_aad_tenant_id: Optional[pulumi.Input[str]] = None, + metrics_advisor_super_user_name: Optional[pulumi.Input[str]] = None, + metrics_advisor_website_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_acls: Optional[pulumi.Input['AccountNetworkAclsArgs']] = None, + outbound_network_access_restricted: Optional[pulumi.Input[bool]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + qna_runtime_endpoint: Optional[pulumi.Input[str]] = None, + storages: Optional[pulumi.Input[Sequence[pulumi.Input['AccountStorageArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kind is None: + raise TypeError("Missing 'kind' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if custom_question_answering_search_service_id is None and 'customQuestionAnsweringSearchServiceId' in kwargs: + custom_question_answering_search_service_id = kwargs['customQuestionAnsweringSearchServiceId'] + if custom_question_answering_search_service_key is None and 'customQuestionAnsweringSearchServiceKey' in kwargs: + custom_question_answering_search_service_key = kwargs['customQuestionAnsweringSearchServiceKey'] + if custom_subdomain_name is None and 'customSubdomainName' in kwargs: + custom_subdomain_name = kwargs['customSubdomainName'] + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if dynamic_throttling_enabled is None and 'dynamicThrottlingEnabled' in kwargs: + dynamic_throttling_enabled = kwargs['dynamicThrottlingEnabled'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if metrics_advisor_aad_client_id is None and 'metricsAdvisorAadClientId' in kwargs: + metrics_advisor_aad_client_id = kwargs['metricsAdvisorAadClientId'] + if metrics_advisor_aad_tenant_id is None and 'metricsAdvisorAadTenantId' in kwargs: + metrics_advisor_aad_tenant_id = kwargs['metricsAdvisorAadTenantId'] + if metrics_advisor_super_user_name is None and 'metricsAdvisorSuperUserName' in kwargs: + metrics_advisor_super_user_name = kwargs['metricsAdvisorSuperUserName'] + if metrics_advisor_website_name is None and 'metricsAdvisorWebsiteName' in kwargs: + metrics_advisor_website_name = kwargs['metricsAdvisorWebsiteName'] + if network_acls is None and 'networkAcls' in kwargs: + network_acls = kwargs['networkAcls'] + if outbound_network_access_restricted is None and 'outboundNetworkAccessRestricted' in kwargs: + outbound_network_access_restricted = kwargs['outboundNetworkAccessRestricted'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if qna_runtime_endpoint is None and 'qnaRuntimeEndpoint' in kwargs: + qna_runtime_endpoint = kwargs['qnaRuntimeEndpoint'] + + _setter("kind", kind) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if custom_question_answering_search_service_id is not None: - pulumi.set(__self__, "custom_question_answering_search_service_id", custom_question_answering_search_service_id) + _setter("custom_question_answering_search_service_id", custom_question_answering_search_service_id) if custom_question_answering_search_service_key is not None: - pulumi.set(__self__, "custom_question_answering_search_service_key", custom_question_answering_search_service_key) + _setter("custom_question_answering_search_service_key", custom_question_answering_search_service_key) if custom_subdomain_name is not None: - pulumi.set(__self__, "custom_subdomain_name", custom_subdomain_name) + _setter("custom_subdomain_name", custom_subdomain_name) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if dynamic_throttling_enabled is not None: - pulumi.set(__self__, "dynamic_throttling_enabled", dynamic_throttling_enabled) + _setter("dynamic_throttling_enabled", dynamic_throttling_enabled) if fqdns is not None: - pulumi.set(__self__, "fqdns", fqdns) + _setter("fqdns", fqdns) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metrics_advisor_aad_client_id is not None: - pulumi.set(__self__, "metrics_advisor_aad_client_id", metrics_advisor_aad_client_id) + _setter("metrics_advisor_aad_client_id", metrics_advisor_aad_client_id) if metrics_advisor_aad_tenant_id is not None: - pulumi.set(__self__, "metrics_advisor_aad_tenant_id", metrics_advisor_aad_tenant_id) + _setter("metrics_advisor_aad_tenant_id", metrics_advisor_aad_tenant_id) if metrics_advisor_super_user_name is not None: - pulumi.set(__self__, "metrics_advisor_super_user_name", metrics_advisor_super_user_name) + _setter("metrics_advisor_super_user_name", metrics_advisor_super_user_name) if metrics_advisor_website_name is not None: - pulumi.set(__self__, "metrics_advisor_website_name", metrics_advisor_website_name) + _setter("metrics_advisor_website_name", metrics_advisor_website_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_acls is not None: - pulumi.set(__self__, "network_acls", network_acls) + _setter("network_acls", network_acls) if outbound_network_access_restricted is not None: - pulumi.set(__self__, "outbound_network_access_restricted", outbound_network_access_restricted) + _setter("outbound_network_access_restricted", outbound_network_access_restricted) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if qna_runtime_endpoint is not None: - pulumi.set(__self__, "qna_runtime_endpoint", qna_runtime_endpoint) + _setter("qna_runtime_endpoint", qna_runtime_endpoint) if storages is not None: - pulumi.set(__self__, "storages", storages) + _setter("storages", storages) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -474,58 +567,155 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['AccountStorageArgs']]] storages: A `storage` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _AccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_question_answering_search_service_id=custom_question_answering_search_service_id, + custom_question_answering_search_service_key=custom_question_answering_search_service_key, + custom_subdomain_name=custom_subdomain_name, + customer_managed_key=customer_managed_key, + dynamic_throttling_enabled=dynamic_throttling_enabled, + endpoint=endpoint, + fqdns=fqdns, + identity=identity, + kind=kind, + local_auth_enabled=local_auth_enabled, + location=location, + metrics_advisor_aad_client_id=metrics_advisor_aad_client_id, + metrics_advisor_aad_tenant_id=metrics_advisor_aad_tenant_id, + metrics_advisor_super_user_name=metrics_advisor_super_user_name, + metrics_advisor_website_name=metrics_advisor_website_name, + name=name, + network_acls=network_acls, + outbound_network_access_restricted=outbound_network_access_restricted, + primary_access_key=primary_access_key, + public_network_access_enabled=public_network_access_enabled, + qna_runtime_endpoint=qna_runtime_endpoint, + resource_group_name=resource_group_name, + secondary_access_key=secondary_access_key, + sku_name=sku_name, + storages=storages, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_question_answering_search_service_id: Optional[pulumi.Input[str]] = None, + custom_question_answering_search_service_key: Optional[pulumi.Input[str]] = None, + custom_subdomain_name: Optional[pulumi.Input[str]] = None, + customer_managed_key: Optional[pulumi.Input['AccountCustomerManagedKeyArgs']] = None, + dynamic_throttling_enabled: Optional[pulumi.Input[bool]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + kind: Optional[pulumi.Input[str]] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + metrics_advisor_aad_client_id: Optional[pulumi.Input[str]] = None, + metrics_advisor_aad_tenant_id: Optional[pulumi.Input[str]] = None, + metrics_advisor_super_user_name: Optional[pulumi.Input[str]] = None, + metrics_advisor_website_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_acls: Optional[pulumi.Input['AccountNetworkAclsArgs']] = None, + outbound_network_access_restricted: Optional[pulumi.Input[bool]] = None, + primary_access_key: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + qna_runtime_endpoint: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_access_key: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storages: Optional[pulumi.Input[Sequence[pulumi.Input['AccountStorageArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_question_answering_search_service_id is None and 'customQuestionAnsweringSearchServiceId' in kwargs: + custom_question_answering_search_service_id = kwargs['customQuestionAnsweringSearchServiceId'] + if custom_question_answering_search_service_key is None and 'customQuestionAnsweringSearchServiceKey' in kwargs: + custom_question_answering_search_service_key = kwargs['customQuestionAnsweringSearchServiceKey'] + if custom_subdomain_name is None and 'customSubdomainName' in kwargs: + custom_subdomain_name = kwargs['customSubdomainName'] + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if dynamic_throttling_enabled is None and 'dynamicThrottlingEnabled' in kwargs: + dynamic_throttling_enabled = kwargs['dynamicThrottlingEnabled'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if metrics_advisor_aad_client_id is None and 'metricsAdvisorAadClientId' in kwargs: + metrics_advisor_aad_client_id = kwargs['metricsAdvisorAadClientId'] + if metrics_advisor_aad_tenant_id is None and 'metricsAdvisorAadTenantId' in kwargs: + metrics_advisor_aad_tenant_id = kwargs['metricsAdvisorAadTenantId'] + if metrics_advisor_super_user_name is None and 'metricsAdvisorSuperUserName' in kwargs: + metrics_advisor_super_user_name = kwargs['metricsAdvisorSuperUserName'] + if metrics_advisor_website_name is None and 'metricsAdvisorWebsiteName' in kwargs: + metrics_advisor_website_name = kwargs['metricsAdvisorWebsiteName'] + if network_acls is None and 'networkAcls' in kwargs: + network_acls = kwargs['networkAcls'] + if outbound_network_access_restricted is None and 'outboundNetworkAccessRestricted' in kwargs: + outbound_network_access_restricted = kwargs['outboundNetworkAccessRestricted'] + if primary_access_key is None and 'primaryAccessKey' in kwargs: + primary_access_key = kwargs['primaryAccessKey'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if qna_runtime_endpoint is None and 'qnaRuntimeEndpoint' in kwargs: + qna_runtime_endpoint = kwargs['qnaRuntimeEndpoint'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_access_key is None and 'secondaryAccessKey' in kwargs: + secondary_access_key = kwargs['secondaryAccessKey'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if custom_question_answering_search_service_id is not None: - pulumi.set(__self__, "custom_question_answering_search_service_id", custom_question_answering_search_service_id) + _setter("custom_question_answering_search_service_id", custom_question_answering_search_service_id) if custom_question_answering_search_service_key is not None: - pulumi.set(__self__, "custom_question_answering_search_service_key", custom_question_answering_search_service_key) + _setter("custom_question_answering_search_service_key", custom_question_answering_search_service_key) if custom_subdomain_name is not None: - pulumi.set(__self__, "custom_subdomain_name", custom_subdomain_name) + _setter("custom_subdomain_name", custom_subdomain_name) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if dynamic_throttling_enabled is not None: - pulumi.set(__self__, "dynamic_throttling_enabled", dynamic_throttling_enabled) + _setter("dynamic_throttling_enabled", dynamic_throttling_enabled) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if fqdns is not None: - pulumi.set(__self__, "fqdns", fqdns) + _setter("fqdns", fqdns) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metrics_advisor_aad_client_id is not None: - pulumi.set(__self__, "metrics_advisor_aad_client_id", metrics_advisor_aad_client_id) + _setter("metrics_advisor_aad_client_id", metrics_advisor_aad_client_id) if metrics_advisor_aad_tenant_id is not None: - pulumi.set(__self__, "metrics_advisor_aad_tenant_id", metrics_advisor_aad_tenant_id) + _setter("metrics_advisor_aad_tenant_id", metrics_advisor_aad_tenant_id) if metrics_advisor_super_user_name is not None: - pulumi.set(__self__, "metrics_advisor_super_user_name", metrics_advisor_super_user_name) + _setter("metrics_advisor_super_user_name", metrics_advisor_super_user_name) if metrics_advisor_website_name is not None: - pulumi.set(__self__, "metrics_advisor_website_name", metrics_advisor_website_name) + _setter("metrics_advisor_website_name", metrics_advisor_website_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_acls is not None: - pulumi.set(__self__, "network_acls", network_acls) + _setter("network_acls", network_acls) if outbound_network_access_restricted is not None: - pulumi.set(__self__, "outbound_network_access_restricted", outbound_network_access_restricted) + _setter("outbound_network_access_restricted", outbound_network_access_restricted) if primary_access_key is not None: - pulumi.set(__self__, "primary_access_key", primary_access_key) + _setter("primary_access_key", primary_access_key) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if qna_runtime_endpoint is not None: - pulumi.set(__self__, "qna_runtime_endpoint", qna_runtime_endpoint) + _setter("qna_runtime_endpoint", qna_runtime_endpoint) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_access_key is not None: - pulumi.set(__self__, "secondary_access_key", secondary_access_key) + _setter("secondary_access_key", secondary_access_key) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if storages is not None: - pulumi.set(__self__, "storages", storages) + _setter("storages", storages) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="customQuestionAnsweringSearchServiceId") @@ -991,6 +1181,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1031,9 +1225,19 @@ def _internal_init(__self__, __props__.__dict__["custom_question_answering_search_service_id"] = custom_question_answering_search_service_id __props__.__dict__["custom_question_answering_search_service_key"] = None if custom_question_answering_search_service_key is None else pulumi.Output.secret(custom_question_answering_search_service_key) __props__.__dict__["custom_subdomain_name"] = custom_subdomain_name + if customer_managed_key is not None and not isinstance(customer_managed_key, AccountCustomerManagedKeyArgs): + customer_managed_key = customer_managed_key or {} + def _setter(key, value): + customer_managed_key[key] = value + AccountCustomerManagedKeyArgs._configure(_setter, **customer_managed_key) __props__.__dict__["customer_managed_key"] = customer_managed_key __props__.__dict__["dynamic_throttling_enabled"] = dynamic_throttling_enabled __props__.__dict__["fqdns"] = fqdns + if identity is not None and not isinstance(identity, AccountIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + AccountIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity if kind is None and not opts.urn: raise TypeError("Missing required property 'kind'") @@ -1045,6 +1249,11 @@ def _internal_init(__self__, __props__.__dict__["metrics_advisor_super_user_name"] = metrics_advisor_super_user_name __props__.__dict__["metrics_advisor_website_name"] = metrics_advisor_website_name __props__.__dict__["name"] = name + if network_acls is not None and not isinstance(network_acls, AccountNetworkAclsArgs): + network_acls = network_acls or {} + def _setter(key, value): + network_acls[key] = value + AccountNetworkAclsArgs._configure(_setter, **network_acls) __props__.__dict__["network_acls"] = network_acls __props__.__dict__["outbound_network_access_restricted"] = outbound_network_access_restricted __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled diff --git a/sdk/python/pulumi_azure/cognitive/account_customer_managed_key.py b/sdk/python/pulumi_azure/cognitive/account_customer_managed_key.py index ab00b01317..aa8e9d5587 100644 --- a/sdk/python/pulumi_azure/cognitive/account_customer_managed_key.py +++ b/sdk/python/pulumi_azure/cognitive/account_customer_managed_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AccountCustomerManagedKeyInitArgs', 'AccountCustomerManagedKey'] @@ -23,10 +23,35 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault Key which should be used to Encrypt the data in this Cognitive Account. :param pulumi.Input[str] identity_client_id: The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there're multiple identities attached to the Cognitive Account. """ - pulumi.set(__self__, "cognitive_account_id", cognitive_account_id) - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + AccountCustomerManagedKeyInitArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cognitive_account_id=cognitive_account_id, + key_vault_key_id=key_vault_key_id, + identity_client_id=identity_client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cognitive_account_id: Optional[pulumi.Input[str]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + identity_client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cognitive_account_id is None and 'cognitiveAccountId' in kwargs: + cognitive_account_id = kwargs['cognitiveAccountId'] + if cognitive_account_id is None: + raise TypeError("Missing 'cognitive_account_id' argument") + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if identity_client_id is None and 'identityClientId' in kwargs: + identity_client_id = kwargs['identityClientId'] + + _setter("cognitive_account_id", cognitive_account_id) + _setter("key_vault_key_id", key_vault_key_id) if identity_client_id is not None: - pulumi.set(__self__, "identity_client_id", identity_client_id) + _setter("identity_client_id", identity_client_id) @property @pulumi.getter(name="cognitiveAccountId") @@ -77,12 +102,33 @@ def __init__(__self__, *, :param pulumi.Input[str] identity_client_id: The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there're multiple identities attached to the Cognitive Account. :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault Key which should be used to Encrypt the data in this Cognitive Account. """ + _AccountCustomerManagedKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cognitive_account_id=cognitive_account_id, + identity_client_id=identity_client_id, + key_vault_key_id=key_vault_key_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cognitive_account_id: Optional[pulumi.Input[str]] = None, + identity_client_id: Optional[pulumi.Input[str]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cognitive_account_id is None and 'cognitiveAccountId' in kwargs: + cognitive_account_id = kwargs['cognitiveAccountId'] + if identity_client_id is None and 'identityClientId' in kwargs: + identity_client_id = kwargs['identityClientId'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if cognitive_account_id is not None: - pulumi.set(__self__, "cognitive_account_id", cognitive_account_id) + _setter("cognitive_account_id", cognitive_account_id) if identity_client_id is not None: - pulumi.set(__self__, "identity_client_id", identity_client_id) + _setter("identity_client_id", identity_client_id) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) @property @pulumi.getter(name="cognitiveAccountId") @@ -392,6 +438,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountCustomerManagedKeyInitArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cognitive/deployment.py b/sdk/python/pulumi_azure/cognitive/deployment.py index 5df240f96e..bedc458ce3 100644 --- a/sdk/python/pulumi_azure/cognitive/deployment.py +++ b/sdk/python/pulumi_azure/cognitive/deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,13 +29,42 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created. :param pulumi.Input[str] rai_policy_name: The name of RAI policy. """ - pulumi.set(__self__, "cognitive_account_id", cognitive_account_id) - pulumi.set(__self__, "model", model) - pulumi.set(__self__, "scale", scale) + DeploymentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cognitive_account_id=cognitive_account_id, + model=model, + scale=scale, + name=name, + rai_policy_name=rai_policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cognitive_account_id: Optional[pulumi.Input[str]] = None, + model: Optional[pulumi.Input['DeploymentModelArgs']] = None, + scale: Optional[pulumi.Input['DeploymentScaleArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + rai_policy_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cognitive_account_id is None and 'cognitiveAccountId' in kwargs: + cognitive_account_id = kwargs['cognitiveAccountId'] + if cognitive_account_id is None: + raise TypeError("Missing 'cognitive_account_id' argument") + if model is None: + raise TypeError("Missing 'model' argument") + if scale is None: + raise TypeError("Missing 'scale' argument") + if rai_policy_name is None and 'raiPolicyName' in kwargs: + rai_policy_name = kwargs['raiPolicyName'] + + _setter("cognitive_account_id", cognitive_account_id) + _setter("model", model) + _setter("scale", scale) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rai_policy_name is not None: - pulumi.set(__self__, "rai_policy_name", rai_policy_name) + _setter("rai_policy_name", rai_policy_name) @property @pulumi.getter(name="cognitiveAccountId") @@ -114,16 +143,39 @@ def __init__(__self__, *, :param pulumi.Input[str] rai_policy_name: The name of RAI policy. :param pulumi.Input['DeploymentScaleArgs'] scale: A `scale` block as defined below. Changing this forces a new resource to be created. """ + _DeploymentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cognitive_account_id=cognitive_account_id, + model=model, + name=name, + rai_policy_name=rai_policy_name, + scale=scale, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cognitive_account_id: Optional[pulumi.Input[str]] = None, + model: Optional[pulumi.Input['DeploymentModelArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + rai_policy_name: Optional[pulumi.Input[str]] = None, + scale: Optional[pulumi.Input['DeploymentScaleArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cognitive_account_id is None and 'cognitiveAccountId' in kwargs: + cognitive_account_id = kwargs['cognitiveAccountId'] + if rai_policy_name is None and 'raiPolicyName' in kwargs: + rai_policy_name = kwargs['raiPolicyName'] + if cognitive_account_id is not None: - pulumi.set(__self__, "cognitive_account_id", cognitive_account_id) + _setter("cognitive_account_id", cognitive_account_id) if model is not None: - pulumi.set(__self__, "model", model) + _setter("model", model) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rai_policy_name is not None: - pulumi.set(__self__, "rai_policy_name", rai_policy_name) + _setter("rai_policy_name", rai_policy_name) if scale is not None: - pulumi.set(__self__, "scale", scale) + _setter("scale", scale) @property @pulumi.getter(name="cognitiveAccountId") @@ -291,6 +343,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DeploymentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -313,11 +369,21 @@ def _internal_init(__self__, if cognitive_account_id is None and not opts.urn: raise TypeError("Missing required property 'cognitive_account_id'") __props__.__dict__["cognitive_account_id"] = cognitive_account_id + if model is not None and not isinstance(model, DeploymentModelArgs): + model = model or {} + def _setter(key, value): + model[key] = value + DeploymentModelArgs._configure(_setter, **model) if model is None and not opts.urn: raise TypeError("Missing required property 'model'") __props__.__dict__["model"] = model __props__.__dict__["name"] = name __props__.__dict__["rai_policy_name"] = rai_policy_name + if scale is not None and not isinstance(scale, DeploymentScaleArgs): + scale = scale or {} + def _setter(key, value): + scale[key] = value + DeploymentScaleArgs._configure(_setter, **scale) if scale is None and not opts.urn: raise TypeError("Missing required property 'scale'") __props__.__dict__["scale"] = scale diff --git a/sdk/python/pulumi_azure/cognitive/get_account.py b/sdk/python/pulumi_azure/cognitive/get_account.py index 610397c5cf..e59918f3af 100644 --- a/sdk/python/pulumi_azure/cognitive/get_account.py +++ b/sdk/python/pulumi_azure/cognitive/get_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/cognitive/outputs.py b/sdk/python/pulumi_azure/cognitive/outputs.py index 63f09a0c6d..9aa0c93ab9 100644 --- a/sdk/python/pulumi_azure/cognitive/outputs.py +++ b/sdk/python/pulumi_azure/cognitive/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -48,9 +48,28 @@ def __init__(__self__, *, :param str key_vault_key_id: The ID of the Key Vault Key which should be used to Encrypt the data in this Cognitive Account. :param str identity_client_id: The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there're multiple identities attached to the Cognitive Account. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + AccountCustomerManagedKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + identity_client_id=identity_client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[str] = None, + identity_client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if identity_client_id is None and 'identityClientId' in kwargs: + identity_client_id = kwargs['identityClientId'] + + _setter("key_vault_key_id", key_vault_key_id) if identity_client_id is not None: - pulumi.set(__self__, "identity_client_id", identity_client_id) + _setter("identity_client_id", identity_client_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -105,13 +124,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + AccountIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -180,11 +224,34 @@ def __init__(__self__, *, :param Sequence[str] ip_rules: One or more IP Addresses, or CIDR Blocks which should be able to access the Cognitive Account. :param Sequence['AccountNetworkAclsVirtualNetworkRuleArgs'] virtual_network_rules: A `virtual_network_rules` block as defined below. """ - pulumi.set(__self__, "default_action", default_action) + AccountNetworkAcls._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + virtual_network_rules=virtual_network_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[str] = None, + ip_rules: Optional[Sequence[str]] = None, + virtual_network_rules: Optional[Sequence['outputs.AccountNetworkAclsVirtualNetworkRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if default_action is None: + raise TypeError("Missing 'default_action' argument") + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if virtual_network_rules is None and 'virtualNetworkRules' in kwargs: + virtual_network_rules = kwargs['virtualNetworkRules'] + + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if virtual_network_rules is not None: - pulumi.set(__self__, "virtual_network_rules", virtual_network_rules) + _setter("virtual_network_rules", virtual_network_rules) @property @pulumi.getter(name="defaultAction") @@ -239,9 +306,28 @@ def __init__(__self__, *, :param str subnet_id: The ID of the subnet which should be able to access this Cognitive Account. :param bool ignore_missing_vnet_service_endpoint: Whether ignore missing vnet service endpoint or not. Default to `false`. """ - pulumi.set(__self__, "subnet_id", subnet_id) + AccountNetworkAclsVirtualNetworkRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[str] = None, + ignore_missing_vnet_service_endpoint: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + + _setter("subnet_id", subnet_id) if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) @property @pulumi.getter(name="subnetId") @@ -288,9 +374,28 @@ def __init__(__self__, *, :param str storage_account_id: Full resource id of a Microsoft.Storage resource. :param str identity_client_id: The client ID of the managed identity associated with the storage resource. """ - pulumi.set(__self__, "storage_account_id", storage_account_id) + AccountStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_id=storage_account_id, + identity_client_id=identity_client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_id: Optional[str] = None, + identity_client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if identity_client_id is None and 'identityClientId' in kwargs: + identity_client_id = kwargs['identityClientId'] + + _setter("storage_account_id", storage_account_id) if identity_client_id is not None: - pulumi.set(__self__, "identity_client_id", identity_client_id) + _setter("identity_client_id", identity_client_id) @property @pulumi.getter(name="storageAccountId") @@ -320,9 +425,30 @@ def __init__(__self__, *, :param str name: The name of the Cognitive Services Account Deployment model. Changing this forces a new resource to be created. :param str version: The version of Cognitive Services Account Deployment model. """ - pulumi.set(__self__, "format", format) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "version", version) + DeploymentModel._configure( + lambda key, value: pulumi.set(__self__, key, value), + format=format, + name=name, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + format: Optional[str] = None, + name: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if format is None: + raise TypeError("Missing 'format' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("format", format) + _setter("name", name) + _setter("version", version) @property @pulumi.getter @@ -364,15 +490,36 @@ def __init__(__self__, *, :param str size: The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. Changing this forces a new resource to be created. :param str tier: Possible values are `Free`, `Basic`, `Standard`, `Premium`, `Enterprise`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "type", type) + DeploymentScale._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + capacity=capacity, + family=family, + size=size, + tier=tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + capacity: Optional[int] = None, + family: Optional[str] = None, + size: Optional[str] = None, + tier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("type", type) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if family is not None: - pulumi.set(__self__, "family", family) + _setter("family", family) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/communication/email_service.py b/sdk/python/pulumi_azure/communication/email_service.py index c38f10c5e4..60e7def4c2 100644 --- a/sdk/python/pulumi_azure/communication/email_service.py +++ b/sdk/python/pulumi_azure/communication/email_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EmailServiceArgs', 'EmailService'] @@ -25,12 +25,37 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Email Communication Service resource. Changing this forces a new Email Communication Service to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Email Communication Service. """ - pulumi.set(__self__, "data_location", data_location) - pulumi.set(__self__, "resource_group_name", resource_group_name) + EmailServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_location=data_location, + resource_group_name=resource_group_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_location is None and 'dataLocation' in kwargs: + data_location = kwargs['dataLocation'] + if data_location is None: + raise TypeError("Missing 'data_location' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("data_location", data_location) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dataLocation") @@ -95,14 +120,35 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Email Communication Service should exist. Changing this forces a new Email Communication Service to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Email Communication Service. """ + _EmailServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_location=data_location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_location is None and 'dataLocation' in kwargs: + data_location = kwargs['dataLocation'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if data_location is not None: - pulumi.set(__self__, "data_location", data_location) + _setter("data_location", data_location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dataLocation") @@ -232,6 +278,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EmailServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/communication/get_service.py b/sdk/python/pulumi_azure/communication/get_service.py index 0b5c25a5b8..8fcda32f50 100644 --- a/sdk/python/pulumi_azure/communication/get_service.py +++ b/sdk/python/pulumi_azure/communication/get_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/communication/service.py b/sdk/python/pulumi_azure/communication/service.py index ba65d78a14..91c2224f49 100644 --- a/sdk/python/pulumi_azure/communication/service.py +++ b/sdk/python/pulumi_azure/communication/service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServiceArgs', 'Service'] @@ -25,13 +25,36 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Communication Service resource. Changing this forces a new Communication Service to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Communication Service. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + ServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + data_location=data_location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + data_location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if data_location is None and 'dataLocation' in kwargs: + data_location = kwargs['dataLocation'] + + _setter("resource_group_name", resource_group_name) if data_location is not None: - pulumi.set(__self__, "data_location", data_location) + _setter("data_location", data_location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -104,22 +127,59 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_key: The secondary key of the Communication Service. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Communication Service. """ + _ServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_location=data_location, + name=name, + primary_connection_string=primary_connection_string, + primary_key=primary_key, + resource_group_name=resource_group_name, + secondary_connection_string=secondary_connection_string, + secondary_key=secondary_key, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_location is None and 'dataLocation' in kwargs: + data_location = kwargs['dataLocation'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if data_location is not None: - pulumi.set(__self__, "data_location", data_location) + _setter("data_location", data_location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dataLocation") @@ -297,6 +357,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/_inputs.py b/sdk/python/pulumi_azure/compute/_inputs.py index 55d760d9df..c214b2ff5e 100644 --- a/sdk/python/pulumi_azure/compute/_inputs.py +++ b/sdk/python/pulumi_azure/compute/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -189,9 +189,34 @@ def __init__(__self__, *, > **Note:** The Subnet used for the Bastion Host must have the name `AzureBastionSubnet` and the subnet mask must be at least a `/26`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) + BastionHostIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("name", name) + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -241,8 +266,25 @@ def __init__(__self__, *, :param pulumi.Input[int] capacity: Specifies the number of instances to be reserved. It must be a positive `integer` and not exceed the quota in the subscription. :param pulumi.Input[str] name: Name of the sku, such as `Standard_F2`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + CapacityReservationSkuArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("capacity", capacity) + _setter("name", name) @property @pulumi.getter @@ -284,13 +326,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The (Client) ID of the Service Principal. :param pulumi.Input[str] tenant_id: The ID of the Tenant the Service Principal is assigned in. """ - pulumi.set(__self__, "type", type) + DiskEncryptionSetIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -352,8 +419,29 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_url: The URL to the Key Vault Secret which stores the protected settings. :param pulumi.Input[str] source_vault_id: The ID of the source Key Vault. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + ExtensionProtectedSettingsFromKeyVaultArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[pulumi.Input[str]] = None, + source_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -391,10 +479,29 @@ def __init__(__self__, *, :param pulumi.Input[str] remove: The command to remove the Gallery Application. Changing this forces a new resource to be created. :param pulumi.Input[str] update: The command to update the Gallery Application. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "install", install) - pulumi.set(__self__, "remove", remove) + GalleryApplicationVersionManageActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + install=install, + remove=remove, + update=update, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + install: Optional[pulumi.Input[str]] = None, + remove: Optional[pulumi.Input[str]] = None, + update: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if install is None: + raise TypeError("Missing 'install' argument") + if remove is None: + raise TypeError("Missing 'remove' argument") + + _setter("install", install) + _setter("remove", remove) if update is not None: - pulumi.set(__self__, "update", update) + _setter("update", update) @property @pulumi.getter @@ -442,9 +549,28 @@ def __init__(__self__, *, :param pulumi.Input[str] media_link: The Storage Blob URI of the source application package. Changing this forces a new resource to be created. :param pulumi.Input[str] default_configuration_link: The Storage Blob URI of the default configuration. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "media_link", media_link) + GalleryApplicationVersionSourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + media_link=media_link, + default_configuration_link=default_configuration_link, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + media_link: Optional[pulumi.Input[str]] = None, + default_configuration_link: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if media_link is None and 'mediaLink' in kwargs: + media_link = kwargs['mediaLink'] + if media_link is None: + raise TypeError("Missing 'media_link' argument") + if default_configuration_link is None and 'defaultConfigurationLink' in kwargs: + default_configuration_link = kwargs['defaultConfigurationLink'] + + _setter("media_link", media_link) if default_configuration_link is not None: - pulumi.set(__self__, "default_configuration_link", default_configuration_link) + _setter("default_configuration_link", default_configuration_link) @property @pulumi.getter(name="mediaLink") @@ -482,10 +608,33 @@ def __init__(__self__, *, :param pulumi.Input[int] regional_replica_count: The number of replicas of the Gallery Application Version to be created per region. Possible values are between `1` and `10`. :param pulumi.Input[str] storage_account_type: The storage account type for the Gallery Application Version. Possible values are `Standard_LRS`, `Premium_LRS` and `Standard_ZRS`. Defaults to `Standard_LRS`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "regional_replica_count", regional_replica_count) + GalleryApplicationVersionTargetRegionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + regional_replica_count=regional_replica_count, + storage_account_type=storage_account_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + regional_replica_count: Optional[pulumi.Input[int]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if regional_replica_count is None and 'regionalReplicaCount' in kwargs: + regional_replica_count = kwargs['regionalReplicaCount'] + if regional_replica_count is None: + raise TypeError("Missing 'regional_replica_count' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + + _setter("name", name) + _setter("regional_replica_count", regional_replica_count) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) @property @pulumi.getter @@ -539,16 +688,41 @@ def __init__(__self__, *, :param pulumi.Input[str] managed_disk_id: Specifies the ID of the managed disk resource that you want to use to create the image. Changing this forces a new resource to be created. :param pulumi.Input[int] size_gb: Specifies the size of the image to be created. The target size can't be smaller than the source size. """ + ImageDataDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_uri=blob_uri, + caching=caching, + lun=lun, + managed_disk_id=managed_disk_id, + size_gb=size_gb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_uri: Optional[pulumi.Input[str]] = None, + caching: Optional[pulumi.Input[str]] = None, + lun: Optional[pulumi.Input[int]] = None, + managed_disk_id: Optional[pulumi.Input[str]] = None, + size_gb: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_uri is None and 'blobUri' in kwargs: + blob_uri = kwargs['blobUri'] + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if size_gb is None and 'sizeGb' in kwargs: + size_gb = kwargs['sizeGb'] + if blob_uri is not None: - pulumi.set(__self__, "blob_uri", blob_uri) + _setter("blob_uri", blob_uri) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if lun is not None: - pulumi.set(__self__, "lun", lun) + _setter("lun", lun) if managed_disk_id is not None: - pulumi.set(__self__, "managed_disk_id", managed_disk_id) + _setter("managed_disk_id", managed_disk_id) if size_gb is not None: - pulumi.set(__self__, "size_gb", size_gb) + _setter("size_gb", size_gb) @property @pulumi.getter(name="blobUri") @@ -630,20 +804,55 @@ def __init__(__self__, *, :param pulumi.Input[str] os_type: Specifies the type of operating system contained in the virtual machine image. Possible values are: `Windows` or `Linux`. :param pulumi.Input[int] size_gb: Specifies the size of the image to be created. Changing this forces a new resource to be created. """ + ImageOsDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_uri=blob_uri, + caching=caching, + disk_encryption_set_id=disk_encryption_set_id, + managed_disk_id=managed_disk_id, + os_state=os_state, + os_type=os_type, + size_gb=size_gb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_uri: Optional[pulumi.Input[str]] = None, + caching: Optional[pulumi.Input[str]] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + managed_disk_id: Optional[pulumi.Input[str]] = None, + os_state: Optional[pulumi.Input[str]] = None, + os_type: Optional[pulumi.Input[str]] = None, + size_gb: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_uri is None and 'blobUri' in kwargs: + blob_uri = kwargs['blobUri'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if os_state is None and 'osState' in kwargs: + os_state = kwargs['osState'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if size_gb is None and 'sizeGb' in kwargs: + size_gb = kwargs['sizeGb'] + if blob_uri is not None: - pulumi.set(__self__, "blob_uri", blob_uri) + _setter("blob_uri", blob_uri) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if managed_disk_id is not None: - pulumi.set(__self__, "managed_disk_id", managed_disk_id) + _setter("managed_disk_id", managed_disk_id) if os_state is not None: - pulumi.set(__self__, "os_state", os_state) + _setter("os_state", os_state) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if size_gb is not None: - pulumi.set(__self__, "size_gb", size_gb) + _setter("size_gb", size_gb) @property @pulumi.getter(name="blobUri") @@ -737,8 +946,21 @@ def __init__(__self__, *, """ :param pulumi.Input[bool] ultra_ssd_enabled: Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Virtual Machine? Defaults to `false`. """ + LinuxVirtualMachineAdditionalCapabilitiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ultra_ssd_enabled=ultra_ssd_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ultra_ssd_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) @property @pulumi.getter(name="ultraSsdEnabled") @@ -764,8 +986,27 @@ def __init__(__self__, *, > **NOTE:** The Azure VM Agent only allows creating SSH Keys at the path `/home/{username}/.ssh/authorized_keys` - as such this public key will be written to the authorized keys file. """ - pulumi.set(__self__, "public_key", public_key) - pulumi.set(__self__, "username", username) + LinuxVirtualMachineAdminSshKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_key=public_key, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_key: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_key is None and 'publicKey' in kwargs: + public_key = kwargs['publicKey'] + if public_key is None: + raise TypeError("Missing 'public_key' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("public_key", public_key) + _setter("username", username) @property @pulumi.getter(name="publicKey") @@ -803,8 +1044,21 @@ def __init__(__self__, *, > **NOTE:** Passing a null value will utilize a Managed Storage Account to store Boot Diagnostics """ + LinuxVirtualMachineBootDiagnosticsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_uri=storage_account_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_uri is None and 'storageAccountUri' in kwargs: + storage_account_uri = kwargs['storageAccountUri'] + if storage_account_uri is not None: - pulumi.set(__self__, "storage_account_uri", storage_account_uri) + _setter("storage_account_uri", storage_account_uri) @property @pulumi.getter(name="storageAccountUri") @@ -834,13 +1088,36 @@ def __init__(__self__, *, :param pulumi.Input[int] order: Specifies the order in which the packages have to be installed. Possible values are between `0` and `2,147,483,647`. :param pulumi.Input[str] tag: Specifies a passthrough value for more generic context. This field can be any valid `string` value. """ - pulumi.set(__self__, "version_id", version_id) + LinuxVirtualMachineGalleryApplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + version_id=version_id, + configuration_blob_uri=configuration_blob_uri, + order=order, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + version_id: Optional[pulumi.Input[str]] = None, + configuration_blob_uri: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + tag: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if version_id is None and 'versionId' in kwargs: + version_id = kwargs['versionId'] + if version_id is None: + raise TypeError("Missing 'version_id' argument") + if configuration_blob_uri is None and 'configurationBlobUri' in kwargs: + configuration_blob_uri = kwargs['configurationBlobUri'] + + _setter("version_id", version_id) if configuration_blob_uri is not None: - pulumi.set(__self__, "configuration_blob_uri", configuration_blob_uri) + _setter("configuration_blob_uri", configuration_blob_uri) if order is not None: - pulumi.set(__self__, "order", order) + _setter("order", order) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter(name="versionId") @@ -906,13 +1183,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + LinuxVirtualMachineIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1002,22 +1304,67 @@ def __init__(__self__, *, > **NOTE:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "storage_account_type", storage_account_type) + LinuxVirtualMachineOsDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + storage_account_type=storage_account_type, + diff_disk_settings=diff_disk_settings, + disk_encryption_set_id=disk_encryption_set_id, + disk_size_gb=disk_size_gb, + name=name, + secure_vm_disk_encryption_set_id=secure_vm_disk_encryption_set_id, + security_encryption_type=security_encryption_type, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[pulumi.Input[str]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + diff_disk_settings: Optional[pulumi.Input['LinuxVirtualMachineOsDiskDiffDiskSettingsArgs']] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + secure_vm_disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + security_encryption_type: Optional[pulumi.Input[str]] = None, + write_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if diff_disk_settings is None and 'diffDiskSettings' in kwargs: + diff_disk_settings = kwargs['diffDiskSettings'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if secure_vm_disk_encryption_set_id is None and 'secureVmDiskEncryptionSetId' in kwargs: + secure_vm_disk_encryption_set_id = kwargs['secureVmDiskEncryptionSetId'] + if security_encryption_type is None and 'securityEncryptionType' in kwargs: + security_encryption_type = kwargs['securityEncryptionType'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("storage_account_type", storage_account_type) if diff_disk_settings is not None: - pulumi.set(__self__, "diff_disk_settings", diff_disk_settings) + _setter("diff_disk_settings", diff_disk_settings) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if secure_vm_disk_encryption_set_id is not None: - pulumi.set(__self__, "secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) + _setter("secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) if security_encryption_type is not None: - pulumi.set(__self__, "security_encryption_type", security_encryption_type) + _setter("security_encryption_type", security_encryption_type) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -1151,9 +1498,24 @@ def __init__(__self__, *, :param pulumi.Input[str] option: Specifies the Ephemeral Disk Settings for the OS Disk. At this time the only possible value is `Local`. Changing this forces a new resource to be created. :param pulumi.Input[str] placement: Specifies where to store the Ephemeral Disk. Possible values are `CacheDisk` and `ResourceDisk`. Defaults to `CacheDisk`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "option", option) + LinuxVirtualMachineOsDiskDiffDiskSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + option=option, + placement=placement, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + option: Optional[pulumi.Input[str]] = None, + placement: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if option is None: + raise TypeError("Missing 'option' argument") + + _setter("option", option) if placement is not None: - pulumi.set(__self__, "placement", placement) + _setter("placement", placement) @property @pulumi.getter @@ -1191,9 +1553,30 @@ def __init__(__self__, *, :param pulumi.Input[str] product: Specifies the Product of the Marketplace Image this Virtual Machine should be created from. Changing this forces a new resource to be created. :param pulumi.Input[str] publisher: Specifies the Publisher of the Marketplace Image this Virtual Machine should be created from. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + LinuxVirtualMachinePlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + product: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -1239,8 +1622,21 @@ def __init__(__self__, *, """ :param pulumi.Input[bool] ultra_ssd_enabled: Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Virtual Machine Scale Set? Possible values are `true` or `false`. Defaults to `false`. Changing this forces a new resource to be created. """ + LinuxVirtualMachineScaleSetAdditionalCapabilitiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ultra_ssd_enabled=ultra_ssd_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ultra_ssd_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) @property @pulumi.getter(name="ultraSsdEnabled") @@ -1266,8 +1662,27 @@ def __init__(__self__, *, > **NOTE:** The Azure VM Agent only allows creating SSH Keys at the path `/home/{username}/.ssh/authorized_keys` - as such this public key will be added/appended to the authorized keys file. """ - pulumi.set(__self__, "public_key", public_key) - pulumi.set(__self__, "username", username) + LinuxVirtualMachineScaleSetAdminSshKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_key=public_key, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_key: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_key is None and 'publicKey' in kwargs: + public_key = kwargs['publicKey'] + if public_key is None: + raise TypeError("Missing 'public_key' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("public_key", public_key) + _setter("username", username) @property @pulumi.getter(name="publicKey") @@ -1305,9 +1720,26 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Should the automatic instance repair be enabled on this Virtual Machine Scale Set? :param pulumi.Input[str] grace_period: Amount of time (in minutes, between 30 and 90, defaults to 30 minutes) for which automatic repairs will be delayed. The grace period starts right after the VM is found unhealthy. The time duration should be specified in ISO 8601 format. Defaults to `PT30M`. """ - pulumi.set(__self__, "enabled", enabled) + LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + grace_period=grace_period, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + grace_period: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if grace_period is None and 'gracePeriod' in kwargs: + grace_period = kwargs['gracePeriod'] + + _setter("enabled", enabled) if grace_period is not None: - pulumi.set(__self__, "grace_period", grace_period) + _setter("grace_period", grace_period) @property @pulumi.getter @@ -1343,8 +1775,29 @@ def __init__(__self__, *, :param pulumi.Input[bool] disable_automatic_rollback: Should automatic rollbacks be disabled? :param pulumi.Input[bool] enable_automatic_os_upgrade: Should OS Upgrades automatically be applied to Scale Set instances in a rolling fashion when a newer version of the OS Image becomes available? """ - pulumi.set(__self__, "disable_automatic_rollback", disable_automatic_rollback) - pulumi.set(__self__, "enable_automatic_os_upgrade", enable_automatic_os_upgrade) + LinuxVirtualMachineScaleSetAutomaticOsUpgradePolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disable_automatic_rollback=disable_automatic_rollback, + enable_automatic_os_upgrade=enable_automatic_os_upgrade, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disable_automatic_rollback: Optional[pulumi.Input[bool]] = None, + enable_automatic_os_upgrade: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disable_automatic_rollback is None and 'disableAutomaticRollback' in kwargs: + disable_automatic_rollback = kwargs['disableAutomaticRollback'] + if disable_automatic_rollback is None: + raise TypeError("Missing 'disable_automatic_rollback' argument") + if enable_automatic_os_upgrade is None and 'enableAutomaticOsUpgrade' in kwargs: + enable_automatic_os_upgrade = kwargs['enableAutomaticOsUpgrade'] + if enable_automatic_os_upgrade is None: + raise TypeError("Missing 'enable_automatic_os_upgrade' argument") + + _setter("disable_automatic_rollback", disable_automatic_rollback) + _setter("enable_automatic_os_upgrade", enable_automatic_os_upgrade) @property @pulumi.getter(name="disableAutomaticRollback") @@ -1380,8 +1833,21 @@ def __init__(__self__, *, > **NOTE:** Passing a null value will utilize a Managed Storage Account to store Boot Diagnostics. """ + LinuxVirtualMachineScaleSetBootDiagnosticsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_uri=storage_account_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_uri is None and 'storageAccountUri' in kwargs: + storage_account_uri = kwargs['storageAccountUri'] + if storage_account_uri is not None: - pulumi.set(__self__, "storage_account_uri", storage_account_uri) + _setter("storage_account_uri", storage_account_uri) @property @pulumi.getter(name="storageAccountUri") @@ -1431,22 +1897,73 @@ def __init__(__self__, *, > **NOTE:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "disk_size_gb", disk_size_gb) - pulumi.set(__self__, "lun", lun) - pulumi.set(__self__, "storage_account_type", storage_account_type) + LinuxVirtualMachineScaleSetDataDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + disk_size_gb=disk_size_gb, + lun=lun, + storage_account_type=storage_account_type, + create_option=create_option, + disk_encryption_set_id=disk_encryption_set_id, + name=name, + ultra_ssd_disk_iops_read_write=ultra_ssd_disk_iops_read_write, + ultra_ssd_disk_mbps_read_write=ultra_ssd_disk_mbps_read_write, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[pulumi.Input[str]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + lun: Optional[pulumi.Input[int]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + create_option: Optional[pulumi.Input[str]] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + ultra_ssd_disk_iops_read_write: Optional[pulumi.Input[int]] = None, + ultra_ssd_disk_mbps_read_write: Optional[pulumi.Input[int]] = None, + write_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if disk_size_gb is None: + raise TypeError("Missing 'disk_size_gb' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if ultra_ssd_disk_iops_read_write is None and 'ultraSsdDiskIopsReadWrite' in kwargs: + ultra_ssd_disk_iops_read_write = kwargs['ultraSsdDiskIopsReadWrite'] + if ultra_ssd_disk_mbps_read_write is None and 'ultraSsdDiskMbpsReadWrite' in kwargs: + ultra_ssd_disk_mbps_read_write = kwargs['ultraSsdDiskMbpsReadWrite'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("disk_size_gb", disk_size_gb) + _setter("lun", lun) + _setter("storage_account_type", storage_account_type) if create_option is not None: - pulumi.set(__self__, "create_option", create_option) + _setter("create_option", create_option) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if ultra_ssd_disk_iops_read_write is not None: - pulumi.set(__self__, "ultra_ssd_disk_iops_read_write", ultra_ssd_disk_iops_read_write) + _setter("ultra_ssd_disk_iops_read_write", ultra_ssd_disk_iops_read_write) if ultra_ssd_disk_mbps_read_write is not None: - pulumi.set(__self__, "ultra_ssd_disk_mbps_read_write", ultra_ssd_disk_mbps_read_write) + _setter("ultra_ssd_disk_mbps_read_write", ultra_ssd_disk_mbps_read_write) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -1607,24 +2124,77 @@ def __init__(__self__, *, > **NOTE:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_handler_version", type_handler_version) + LinuxVirtualMachineScaleSetExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + publisher=publisher, + type=type, + type_handler_version=type_handler_version, + auto_upgrade_minor_version=auto_upgrade_minor_version, + automatic_upgrade_enabled=automatic_upgrade_enabled, + force_update_tag=force_update_tag, + protected_settings=protected_settings, + protected_settings_from_key_vault=protected_settings_from_key_vault, + provision_after_extensions=provision_after_extensions, + settings=settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + type_handler_version: Optional[pulumi.Input[str]] = None, + auto_upgrade_minor_version: Optional[pulumi.Input[bool]] = None, + automatic_upgrade_enabled: Optional[pulumi.Input[bool]] = None, + force_update_tag: Optional[pulumi.Input[str]] = None, + protected_settings: Optional[pulumi.Input[str]] = None, + protected_settings_from_key_vault: Optional[pulumi.Input['LinuxVirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultArgs']] = None, + provision_after_extensions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + settings: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if type_handler_version is None: + raise TypeError("Missing 'type_handler_version' argument") + if auto_upgrade_minor_version is None and 'autoUpgradeMinorVersion' in kwargs: + auto_upgrade_minor_version = kwargs['autoUpgradeMinorVersion'] + if automatic_upgrade_enabled is None and 'automaticUpgradeEnabled' in kwargs: + automatic_upgrade_enabled = kwargs['automaticUpgradeEnabled'] + if force_update_tag is None and 'forceUpdateTag' in kwargs: + force_update_tag = kwargs['forceUpdateTag'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if protected_settings_from_key_vault is None and 'protectedSettingsFromKeyVault' in kwargs: + protected_settings_from_key_vault = kwargs['protectedSettingsFromKeyVault'] + if provision_after_extensions is None and 'provisionAfterExtensions' in kwargs: + provision_after_extensions = kwargs['provisionAfterExtensions'] + + _setter("name", name) + _setter("publisher", publisher) + _setter("type", type) + _setter("type_handler_version", type_handler_version) if auto_upgrade_minor_version is not None: - pulumi.set(__self__, "auto_upgrade_minor_version", auto_upgrade_minor_version) + _setter("auto_upgrade_minor_version", auto_upgrade_minor_version) if automatic_upgrade_enabled is not None: - pulumi.set(__self__, "automatic_upgrade_enabled", automatic_upgrade_enabled) + _setter("automatic_upgrade_enabled", automatic_upgrade_enabled) if force_update_tag is not None: - pulumi.set(__self__, "force_update_tag", force_update_tag) + _setter("force_update_tag", force_update_tag) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if protected_settings_from_key_vault is not None: - pulumi.set(__self__, "protected_settings_from_key_vault", protected_settings_from_key_vault) + _setter("protected_settings_from_key_vault", protected_settings_from_key_vault) if provision_after_extensions is not None: - pulumi.set(__self__, "provision_after_extensions", provision_after_extensions) + _setter("provision_after_extensions", provision_after_extensions) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) @property @pulumi.getter @@ -1769,8 +2339,29 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_url: The URL to the Key Vault Secret which stores the protected settings. :param pulumi.Input[str] source_vault_id: The ID of the source Key Vault. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + LinuxVirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[pulumi.Input[str]] = None, + source_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -1808,19 +2399,42 @@ def __init__(__self__, *, :param pulumi.Input[int] order: Specifies the order in which the packages have to be installed. Possible values are between `0` and `2,147,483,647`. Changing this forces a new resource to be created. :param pulumi.Input[str] tag: Specifies a passthrough value for more generic context. This field can be any valid `string` value. Changing this forces a new resource to be created. """ + LinuxVirtualMachineScaleSetGalleryApplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + package_reference_id=package_reference_id, + configuration_reference_blob_uri=configuration_reference_blob_uri, + order=order, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + package_reference_id: Optional[pulumi.Input[str]] = None, + configuration_reference_blob_uri: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + tag: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if package_reference_id is None and 'packageReferenceId' in kwargs: + package_reference_id = kwargs['packageReferenceId'] + if package_reference_id is None: + raise TypeError("Missing 'package_reference_id' argument") + if configuration_reference_blob_uri is None and 'configurationReferenceBlobUri' in kwargs: + configuration_reference_blob_uri = kwargs['configurationReferenceBlobUri'] + if package_reference_id is not None: warnings.warn("""`package_reference_id` has been renamed to `version_id` and will be deprecated in 4.0""", DeprecationWarning) pulumi.log.warn("""package_reference_id is deprecated: `package_reference_id` has been renamed to `version_id` and will be deprecated in 4.0""") - pulumi.set(__self__, "package_reference_id", package_reference_id) + _setter("package_reference_id", package_reference_id) if configuration_reference_blob_uri is not None: warnings.warn("""`configuration_reference_blob_uri` has been renamed to `configuration_blob_uri` and will be deprecated in 4.0""", DeprecationWarning) pulumi.log.warn("""configuration_reference_blob_uri is deprecated: `configuration_reference_blob_uri` has been renamed to `configuration_blob_uri` and will be deprecated in 4.0""") if configuration_reference_blob_uri is not None: - pulumi.set(__self__, "configuration_reference_blob_uri", configuration_reference_blob_uri) + _setter("configuration_reference_blob_uri", configuration_reference_blob_uri) if order is not None: - pulumi.set(__self__, "order", order) + _setter("order", order) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter(name="packageReferenceId") @@ -1886,13 +2500,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + LinuxVirtualMachineScaleSetIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1966,18 +2605,55 @@ def __init__(__self__, *, > **NOTE:** If multiple `network_interface` blocks are specified, one must be set to `primary`. """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) + LinuxVirtualMachineScaleSetNetworkInterfaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + name=name, + dns_servers=dns_servers, + enable_accelerated_networking=enable_accelerated_networking, + enable_ip_forwarding=enable_ip_forwarding, + network_security_group_id=network_security_group_id, + primary=primary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enable_accelerated_networking: Optional[pulumi.Input[bool]] = None, + enable_ip_forwarding: Optional[pulumi.Input[bool]] = None, + network_security_group_id: Optional[pulumi.Input[str]] = None, + primary: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if enable_accelerated_networking is None and 'enableAcceleratedNetworking' in kwargs: + enable_accelerated_networking = kwargs['enableAcceleratedNetworking'] + if enable_ip_forwarding is None and 'enableIpForwarding' in kwargs: + enable_ip_forwarding = kwargs['enableIpForwarding'] + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + + _setter("ip_configurations", ip_configurations) + _setter("name", name) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if enable_accelerated_networking is not None: - pulumi.set(__self__, "enable_accelerated_networking", enable_accelerated_networking) + _setter("enable_accelerated_networking", enable_accelerated_networking) if enable_ip_forwarding is not None: - pulumi.set(__self__, "enable_ip_forwarding", enable_ip_forwarding) + _setter("enable_ip_forwarding", enable_ip_forwarding) if network_security_group_id is not None: - pulumi.set(__self__, "network_security_group_id", network_security_group_id) + _setter("network_security_group_id", network_security_group_id) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) @property @pulumi.getter(name="ipConfigurations") @@ -2099,23 +2775,64 @@ def __init__(__self__, *, > `subnet_id` is required if `version` is set to `IPv4`. :param pulumi.Input[str] version: The Internet Protocol Version which should be used for this IP Configuration. Possible values are `IPv4` and `IPv6`. Defaults to `IPv4`. """ - pulumi.set(__self__, "name", name) + LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + application_gateway_backend_address_pool_ids=application_gateway_backend_address_pool_ids, + application_security_group_ids=application_security_group_ids, + load_balancer_backend_address_pool_ids=load_balancer_backend_address_pool_ids, + load_balancer_inbound_nat_rules_ids=load_balancer_inbound_nat_rules_ids, + primary=primary, + public_ip_addresses=public_ip_addresses, + subnet_id=subnet_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + application_gateway_backend_address_pool_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + application_security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + load_balancer_backend_address_pool_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + load_balancer_inbound_nat_rules_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + primary: Optional[pulumi.Input[bool]] = None, + public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressArgs']]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if application_gateway_backend_address_pool_ids is None and 'applicationGatewayBackendAddressPoolIds' in kwargs: + application_gateway_backend_address_pool_ids = kwargs['applicationGatewayBackendAddressPoolIds'] + if application_security_group_ids is None and 'applicationSecurityGroupIds' in kwargs: + application_security_group_ids = kwargs['applicationSecurityGroupIds'] + if load_balancer_backend_address_pool_ids is None and 'loadBalancerBackendAddressPoolIds' in kwargs: + load_balancer_backend_address_pool_ids = kwargs['loadBalancerBackendAddressPoolIds'] + if load_balancer_inbound_nat_rules_ids is None and 'loadBalancerInboundNatRulesIds' in kwargs: + load_balancer_inbound_nat_rules_ids = kwargs['loadBalancerInboundNatRulesIds'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) if application_gateway_backend_address_pool_ids is not None: - pulumi.set(__self__, "application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) + _setter("application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) if application_security_group_ids is not None: - pulumi.set(__self__, "application_security_group_ids", application_security_group_ids) + _setter("application_security_group_ids", application_security_group_ids) if load_balancer_backend_address_pool_ids is not None: - pulumi.set(__self__, "load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) + _setter("load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) if load_balancer_inbound_nat_rules_ids is not None: - pulumi.set(__self__, "load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) + _setter("load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -2255,17 +2972,48 @@ def __init__(__self__, *, > **NOTE:** This functionality is in Preview and must be opted into via `az feature register --namespace Microsoft.Network --name AllowBringYourOwnPublicIpAddress` and then `az provider register -n Microsoft.Network`. :param pulumi.Input[str] version: The Internet Protocol Version which should be used for this public IP address. Possible values are `IPv4` and `IPv6`. Defaults to `IPv4`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + domain_name_label=domain_name_label, + idle_timeout_in_minutes=idle_timeout_in_minutes, + ip_tags=ip_tags, + public_ip_prefix_id=public_ip_prefix_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + domain_name_label: Optional[pulumi.Input[str]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + ip_tags: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTagArgs']]]] = None, + public_ip_prefix_id: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if domain_name_label is None and 'domainNameLabel' in kwargs: + domain_name_label = kwargs['domainNameLabel'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if ip_tags is None and 'ipTags' in kwargs: + ip_tags = kwargs['ipTags'] + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + + _setter("name", name) if domain_name_label is not None: - pulumi.set(__self__, "domain_name_label", domain_name_label) + _setter("domain_name_label", domain_name_label) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if ip_tags is not None: - pulumi.set(__self__, "ip_tags", ip_tags) + _setter("ip_tags", ip_tags) if public_ip_prefix_id is not None: - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) + _setter("public_ip_prefix_id", public_ip_prefix_id) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -2351,8 +3099,25 @@ def __init__(__self__, *, :param pulumi.Input[str] tag: The IP Tag associated with the Public IP, such as `SQL` or `Storage`. Changing this forces a new resource to be created. :param pulumi.Input[str] type: The Type of IP Tag, such as `FirstPartyUsage`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "type", type) + LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + tag=tag, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tag: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag is None: + raise TypeError("Missing 'tag' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("tag", tag) + _setter("type", type) @property @pulumi.getter @@ -2414,20 +3179,63 @@ def __init__(__self__, *, > **NOTE:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "storage_account_type", storage_account_type) + LinuxVirtualMachineScaleSetOsDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + storage_account_type=storage_account_type, + diff_disk_settings=diff_disk_settings, + disk_encryption_set_id=disk_encryption_set_id, + disk_size_gb=disk_size_gb, + secure_vm_disk_encryption_set_id=secure_vm_disk_encryption_set_id, + security_encryption_type=security_encryption_type, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[pulumi.Input[str]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + diff_disk_settings: Optional[pulumi.Input['LinuxVirtualMachineScaleSetOsDiskDiffDiskSettingsArgs']] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + secure_vm_disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + security_encryption_type: Optional[pulumi.Input[str]] = None, + write_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if diff_disk_settings is None and 'diffDiskSettings' in kwargs: + diff_disk_settings = kwargs['diffDiskSettings'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if secure_vm_disk_encryption_set_id is None and 'secureVmDiskEncryptionSetId' in kwargs: + secure_vm_disk_encryption_set_id = kwargs['secureVmDiskEncryptionSetId'] + if security_encryption_type is None and 'securityEncryptionType' in kwargs: + security_encryption_type = kwargs['securityEncryptionType'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("storage_account_type", storage_account_type) if diff_disk_settings is not None: - pulumi.set(__self__, "diff_disk_settings", diff_disk_settings) + _setter("diff_disk_settings", diff_disk_settings) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if secure_vm_disk_encryption_set_id is not None: - pulumi.set(__self__, "secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) + _setter("secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) if security_encryption_type is not None: - pulumi.set(__self__, "security_encryption_type", security_encryption_type) + _setter("security_encryption_type", security_encryption_type) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -2549,9 +3357,24 @@ def __init__(__self__, *, :param pulumi.Input[str] option: Specifies the Ephemeral Disk Settings for the OS Disk. At this time the only possible value is `Local`. Changing this forces a new resource to be created. :param pulumi.Input[str] placement: Specifies where to store the Ephemeral Disk. Possible values are `CacheDisk` and `ResourceDisk`. Defaults to `CacheDisk`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "option", option) + LinuxVirtualMachineScaleSetOsDiskDiffDiskSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + option=option, + placement=placement, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + option: Optional[pulumi.Input[str]] = None, + placement: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if option is None: + raise TypeError("Missing 'option' argument") + + _setter("option", option) if placement is not None: - pulumi.set(__self__, "placement", placement) + _setter("placement", placement) @property @pulumi.getter @@ -2589,9 +3412,30 @@ def __init__(__self__, *, :param pulumi.Input[str] product: Specifies the product of the image from the marketplace. Changing this forces a new resource to be created. :param pulumi.Input[str] publisher: Specifies the publisher of the image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + LinuxVirtualMachineScaleSetPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + product: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -2647,14 +3491,55 @@ def __init__(__self__, *, :param pulumi.Input[bool] cross_zone_upgrades_enabled: Should the Virtual Machine Scale Set ignore the Azure Zone boundaries when constructing upgrade batches? Possible values are `true` or `false`. :param pulumi.Input[bool] prioritize_unhealthy_instances_enabled: Upgrade all unhealthy instances in a scale set before any healthy instances. Possible values are `true` or `false`. """ - pulumi.set(__self__, "max_batch_instance_percent", max_batch_instance_percent) - pulumi.set(__self__, "max_unhealthy_instance_percent", max_unhealthy_instance_percent) - pulumi.set(__self__, "max_unhealthy_upgraded_instance_percent", max_unhealthy_upgraded_instance_percent) - pulumi.set(__self__, "pause_time_between_batches", pause_time_between_batches) + LinuxVirtualMachineScaleSetRollingUpgradePolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_batch_instance_percent=max_batch_instance_percent, + max_unhealthy_instance_percent=max_unhealthy_instance_percent, + max_unhealthy_upgraded_instance_percent=max_unhealthy_upgraded_instance_percent, + pause_time_between_batches=pause_time_between_batches, + cross_zone_upgrades_enabled=cross_zone_upgrades_enabled, + prioritize_unhealthy_instances_enabled=prioritize_unhealthy_instances_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_batch_instance_percent: Optional[pulumi.Input[int]] = None, + max_unhealthy_instance_percent: Optional[pulumi.Input[int]] = None, + max_unhealthy_upgraded_instance_percent: Optional[pulumi.Input[int]] = None, + pause_time_between_batches: Optional[pulumi.Input[str]] = None, + cross_zone_upgrades_enabled: Optional[pulumi.Input[bool]] = None, + prioritize_unhealthy_instances_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_batch_instance_percent is None and 'maxBatchInstancePercent' in kwargs: + max_batch_instance_percent = kwargs['maxBatchInstancePercent'] + if max_batch_instance_percent is None: + raise TypeError("Missing 'max_batch_instance_percent' argument") + if max_unhealthy_instance_percent is None and 'maxUnhealthyInstancePercent' in kwargs: + max_unhealthy_instance_percent = kwargs['maxUnhealthyInstancePercent'] + if max_unhealthy_instance_percent is None: + raise TypeError("Missing 'max_unhealthy_instance_percent' argument") + if max_unhealthy_upgraded_instance_percent is None and 'maxUnhealthyUpgradedInstancePercent' in kwargs: + max_unhealthy_upgraded_instance_percent = kwargs['maxUnhealthyUpgradedInstancePercent'] + if max_unhealthy_upgraded_instance_percent is None: + raise TypeError("Missing 'max_unhealthy_upgraded_instance_percent' argument") + if pause_time_between_batches is None and 'pauseTimeBetweenBatches' in kwargs: + pause_time_between_batches = kwargs['pauseTimeBetweenBatches'] + if pause_time_between_batches is None: + raise TypeError("Missing 'pause_time_between_batches' argument") + if cross_zone_upgrades_enabled is None and 'crossZoneUpgradesEnabled' in kwargs: + cross_zone_upgrades_enabled = kwargs['crossZoneUpgradesEnabled'] + if prioritize_unhealthy_instances_enabled is None and 'prioritizeUnhealthyInstancesEnabled' in kwargs: + prioritize_unhealthy_instances_enabled = kwargs['prioritizeUnhealthyInstancesEnabled'] + + _setter("max_batch_instance_percent", max_batch_instance_percent) + _setter("max_unhealthy_instance_percent", max_unhealthy_instance_percent) + _setter("max_unhealthy_upgraded_instance_percent", max_unhealthy_upgraded_instance_percent) + _setter("pause_time_between_batches", pause_time_between_batches) if cross_zone_upgrades_enabled is not None: - pulumi.set(__self__, "cross_zone_upgrades_enabled", cross_zone_upgrades_enabled) + _setter("cross_zone_upgrades_enabled", cross_zone_upgrades_enabled) if prioritize_unhealthy_instances_enabled is not None: - pulumi.set(__self__, "prioritize_unhealthy_instances_enabled", prioritize_unhealthy_instances_enabled) + _setter("prioritize_unhealthy_instances_enabled", prioritize_unhealthy_instances_enabled) @property @pulumi.getter(name="maxBatchInstancePercent") @@ -2738,10 +3623,25 @@ def __init__(__self__, *, :param pulumi.Input[bool] force_deletion_enabled: Should the virtual machines chosen for removal be force deleted when the virtual machine scale set is being scaled-in? Possible values are `true` or `false`. Defaults to `false`. :param pulumi.Input[str] rule: The scale-in policy rule that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled in. Possible values for the scale-in policy rules are `Default`, `NewestVM` and `OldestVM`, defaults to `Default`. For more information about scale in policy, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-scale-in-policy). """ + LinuxVirtualMachineScaleSetScaleInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + force_deletion_enabled=force_deletion_enabled, + rule=rule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + force_deletion_enabled: Optional[pulumi.Input[bool]] = None, + rule: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if force_deletion_enabled is None and 'forceDeletionEnabled' in kwargs: + force_deletion_enabled = kwargs['forceDeletionEnabled'] + if force_deletion_enabled is not None: - pulumi.set(__self__, "force_deletion_enabled", force_deletion_enabled) + _setter("force_deletion_enabled", force_deletion_enabled) if rule is not None: - pulumi.set(__self__, "rule", rule) + _setter("rule", rule) @property @pulumi.getter(name="forceDeletionEnabled") @@ -2777,8 +3677,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetSecretCertificateArgs']]] certificates: One or more `certificate` blocks as defined above. :param pulumi.Input[str] key_vault_id: The ID of the Key Vault from which all Secrets should be sourced. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "key_vault_id", key_vault_id) + LinuxVirtualMachineScaleSetSecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetSecretCertificateArgs']]]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("certificates", certificates) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -2816,7 +3735,20 @@ def __init__(__self__, *, > **NOTE:** The certificate must have been uploaded/created in PFX format, PEM certificates are not currently supported by Azure. """ - pulumi.set(__self__, "url", url) + LinuxVirtualMachineScaleSetSecretCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("url", url) @property @pulumi.getter @@ -2848,10 +3780,35 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: Specifies the SKU of the image used to create the virtual machines. :param pulumi.Input[str] version: Specifies the version of the image used to create the virtual machines. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + LinuxVirtualMachineScaleSetSourceImageReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -2911,10 +3868,23 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Should the Spot-Try-Restore feature be enabled? The Spot-Try-Restore feature will attempt to automatically restore the evicted Spot Virtual Machine Scale Set VM instances opportunistically based on capacity availability and pricing constraints. Possible values are `true` or `false`. Defaults to `false`. Changing this forces a new resource to be created. :param pulumi.Input[str] timeout: The length of time that the Virtual Machine Scale Set should attempt to restore the Spot VM instances which have been evicted. The time duration should be between `15` minutes and `120` minutes (inclusive). The time duration should be specified in the ISO 8601 format. Defaults to `90` minutes (e.g. `PT1H30M`). Changing this forces a new resource to be created. """ + LinuxVirtualMachineScaleSetSpotRestoreArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + timeout: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -2952,9 +3922,24 @@ def __init__(__self__, *, > **NOTE:** For more information about the terminate notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). """ - pulumi.set(__self__, "enabled", enabled) + LinuxVirtualMachineScaleSetTerminateNotificationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + timeout: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -2994,9 +3979,24 @@ def __init__(__self__, *, > **NOTE:** For more information about the termination notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). """ - pulumi.set(__self__, "enabled", enabled) + LinuxVirtualMachineScaleSetTerminationNotificationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + timeout: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -3034,8 +4034,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineSecretCertificateArgs']]] certificates: One or more `certificate` blocks as defined above. :param pulumi.Input[str] key_vault_id: The ID of the Key Vault from which all Secrets should be sourced. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "key_vault_id", key_vault_id) + LinuxVirtualMachineSecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineSecretCertificateArgs']]]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("certificates", certificates) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -3071,7 +4090,20 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "url", url) + LinuxVirtualMachineSecretCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("url", url) @property @pulumi.getter @@ -3101,10 +4133,35 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: Specifies the SKU of the image used to create the virtual machines. Changing this forces a new resource to be created. :param pulumi.Input[str] version: Specifies the version of the image used to create the virtual machines. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + LinuxVirtualMachineSourceImageReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -3166,9 +4223,24 @@ def __init__(__self__, *, > **NOTE:** For more information about the termination notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). """ - pulumi.set(__self__, "enabled", enabled) + LinuxVirtualMachineTerminationNotificationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + timeout: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -3207,15 +4279,34 @@ def __init__(__self__, *, :param pulumi.Input['ManagedDiskEncryptionSettingsDiskEncryptionKeyArgs'] disk_encryption_key: A `disk_encryption_key` block as defined above. :param pulumi.Input['ManagedDiskEncryptionSettingsKeyEncryptionKeyArgs'] key_encryption_key: A `key_encryption_key` block as defined below. """ + ManagedDiskEncryptionSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_encryption_key=disk_encryption_key, + enabled=enabled, + key_encryption_key=key_encryption_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_encryption_key: Optional[pulumi.Input['ManagedDiskEncryptionSettingsDiskEncryptionKeyArgs']] = None, + enabled: Optional[pulumi.Input[bool]] = None, + key_encryption_key: Optional[pulumi.Input['ManagedDiskEncryptionSettingsKeyEncryptionKeyArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_encryption_key is None and 'diskEncryptionKey' in kwargs: + disk_encryption_key = kwargs['diskEncryptionKey'] + if key_encryption_key is None and 'keyEncryptionKey' in kwargs: + key_encryption_key = kwargs['keyEncryptionKey'] + if disk_encryption_key is not None: - pulumi.set(__self__, "disk_encryption_key", disk_encryption_key) + _setter("disk_encryption_key", disk_encryption_key) if enabled is not None: warnings.warn("""Deprecated, Azure Disk Encryption is now configured directly by `disk_encryption_key` and `key_encryption_key`. To disable Azure Disk Encryption, please remove `encryption_settings` block. To enabled, specify a `encryption_settings` block`""", DeprecationWarning) pulumi.log.warn("""enabled is deprecated: Deprecated, Azure Disk Encryption is now configured directly by `disk_encryption_key` and `key_encryption_key`. To disable Azure Disk Encryption, please remove `encryption_settings` block. To enabled, specify a `encryption_settings` block`""") if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if key_encryption_key is not None: - pulumi.set(__self__, "key_encryption_key", key_encryption_key) + _setter("key_encryption_key", key_encryption_key) @property @pulumi.getter(name="diskEncryptionKey") @@ -3263,8 +4354,29 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_url: The URL to the Key Vault Secret used as the Disk Encryption Key. This can be found as `id` on the `keyvault.Secret` resource. :param pulumi.Input[str] source_vault_id: The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + ManagedDiskEncryptionSettingsDiskEncryptionKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[pulumi.Input[str]] = None, + source_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -3300,8 +4412,29 @@ def __init__(__self__, *, :param pulumi.Input[str] key_url: The URL to the Key Vault Key used as the Key Encryption Key. This can be found as `id` on the `keyvault.Key` resource. :param pulumi.Input[str] source_vault_id: The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. """ - pulumi.set(__self__, "key_url", key_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + ManagedDiskEncryptionSettingsKeyEncryptionKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_url=key_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_url: Optional[pulumi.Input[str]] = None, + source_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_url is None and 'keyUrl' in kwargs: + key_url = kwargs['keyUrl'] + if key_url is None: + raise TypeError("Missing 'key_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("key_url", key_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="keyUrl") @@ -3335,8 +4468,21 @@ def __init__(__self__, *, """ :param pulumi.Input[bool] ultra_ssd_enabled: Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Orchestrated Virtual Machine Scale Set? Defaults to `false`. Changing this forces a new resource to be created. """ + OrchestratedVirtualMachineScaleSetAdditionalCapabilitiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ultra_ssd_enabled=ultra_ssd_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ultra_ssd_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) @property @pulumi.getter(name="ultraSsdEnabled") @@ -3360,9 +4506,26 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Should the automatic instance repair be enabled on this Orchestrated Virtual Machine Scale Set? Possible values are `true` and `false`. :param pulumi.Input[str] grace_period: Amount of time for which automatic repairs will be delayed. The grace period starts right after the VM is found unhealthy. Possible values are between `30` and `90` minutes. Defaults to `30` minutes. The time duration should be specified in `ISO 8601` format (e.g. `PT30M` to `PT90M`). """ - pulumi.set(__self__, "enabled", enabled) + OrchestratedVirtualMachineScaleSetAutomaticInstanceRepairArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + grace_period=grace_period, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + grace_period: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if grace_period is None and 'gracePeriod' in kwargs: + grace_period = kwargs['gracePeriod'] + + _setter("enabled", enabled) if grace_period is not None: - pulumi.set(__self__, "grace_period", grace_period) + _setter("grace_period", grace_period) @property @pulumi.getter @@ -3396,8 +4559,21 @@ def __init__(__self__, *, """ :param pulumi.Input[str] storage_account_uri: The Primary/Secondary Endpoint for the Azure Storage Account which should be used to store Boot Diagnostics, including Console Output and Screenshots from the Hypervisor. By including a `boot_diagnostics` block without passing the `storage_account_uri` field will cause the API to utilize a Managed Storage Account to store the Boot Diagnostics output. """ + OrchestratedVirtualMachineScaleSetBootDiagnosticsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_uri=storage_account_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_uri is None and 'storageAccountUri' in kwargs: + storage_account_uri = kwargs['storageAccountUri'] + if storage_account_uri is not None: - pulumi.set(__self__, "storage_account_uri", storage_account_uri) + _setter("storage_account_uri", storage_account_uri) @property @pulumi.getter(name="storageAccountUri") @@ -3433,20 +4609,69 @@ def __init__(__self__, *, :param pulumi.Input[str] disk_encryption_set_id: The ID of the Disk Encryption Set which should be used to encrypt the Data Disk. Changing this forces a new resource to be created. :param pulumi.Input[bool] write_accelerator_enabled: Specifies if Write Accelerator is enabled on the Data Disk. Defaults to `false`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "disk_size_gb", disk_size_gb) - pulumi.set(__self__, "lun", lun) - pulumi.set(__self__, "storage_account_type", storage_account_type) + OrchestratedVirtualMachineScaleSetDataDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + disk_size_gb=disk_size_gb, + lun=lun, + storage_account_type=storage_account_type, + create_option=create_option, + disk_encryption_set_id=disk_encryption_set_id, + ultra_ssd_disk_iops_read_write=ultra_ssd_disk_iops_read_write, + ultra_ssd_disk_mbps_read_write=ultra_ssd_disk_mbps_read_write, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[pulumi.Input[str]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + lun: Optional[pulumi.Input[int]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + create_option: Optional[pulumi.Input[str]] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + ultra_ssd_disk_iops_read_write: Optional[pulumi.Input[int]] = None, + ultra_ssd_disk_mbps_read_write: Optional[pulumi.Input[int]] = None, + write_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if disk_size_gb is None: + raise TypeError("Missing 'disk_size_gb' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if ultra_ssd_disk_iops_read_write is None and 'ultraSsdDiskIopsReadWrite' in kwargs: + ultra_ssd_disk_iops_read_write = kwargs['ultraSsdDiskIopsReadWrite'] + if ultra_ssd_disk_mbps_read_write is None and 'ultraSsdDiskMbpsReadWrite' in kwargs: + ultra_ssd_disk_mbps_read_write = kwargs['ultraSsdDiskMbpsReadWrite'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("disk_size_gb", disk_size_gb) + _setter("lun", lun) + _setter("storage_account_type", storage_account_type) if create_option is not None: - pulumi.set(__self__, "create_option", create_option) + _setter("create_option", create_option) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if ultra_ssd_disk_iops_read_write is not None: - pulumi.set(__self__, "ultra_ssd_disk_iops_read_write", ultra_ssd_disk_iops_read_write) + _setter("ultra_ssd_disk_iops_read_write", ultra_ssd_disk_iops_read_write) if ultra_ssd_disk_mbps_read_write is not None: - pulumi.set(__self__, "ultra_ssd_disk_mbps_read_write", ultra_ssd_disk_mbps_read_write) + _setter("ultra_ssd_disk_mbps_read_write", ultra_ssd_disk_mbps_read_write) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -3584,24 +4809,77 @@ def __init__(__self__, *, > **Note:** `protected_settings_from_key_vault` cannot be used with `protected_settings` :param pulumi.Input[str] settings: A JSON String which specifies Settings for the Extension. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_handler_version", type_handler_version) + OrchestratedVirtualMachineScaleSetExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + publisher=publisher, + type=type, + type_handler_version=type_handler_version, + auto_upgrade_minor_version_enabled=auto_upgrade_minor_version_enabled, + extensions_to_provision_after_vm_creations=extensions_to_provision_after_vm_creations, + failure_suppression_enabled=failure_suppression_enabled, + force_extension_execution_on_change=force_extension_execution_on_change, + protected_settings=protected_settings, + protected_settings_from_key_vault=protected_settings_from_key_vault, + settings=settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + type_handler_version: Optional[pulumi.Input[str]] = None, + auto_upgrade_minor_version_enabled: Optional[pulumi.Input[bool]] = None, + extensions_to_provision_after_vm_creations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + failure_suppression_enabled: Optional[pulumi.Input[bool]] = None, + force_extension_execution_on_change: Optional[pulumi.Input[str]] = None, + protected_settings: Optional[pulumi.Input[str]] = None, + protected_settings_from_key_vault: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultArgs']] = None, + settings: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if type_handler_version is None: + raise TypeError("Missing 'type_handler_version' argument") + if auto_upgrade_minor_version_enabled is None and 'autoUpgradeMinorVersionEnabled' in kwargs: + auto_upgrade_minor_version_enabled = kwargs['autoUpgradeMinorVersionEnabled'] + if extensions_to_provision_after_vm_creations is None and 'extensionsToProvisionAfterVmCreations' in kwargs: + extensions_to_provision_after_vm_creations = kwargs['extensionsToProvisionAfterVmCreations'] + if failure_suppression_enabled is None and 'failureSuppressionEnabled' in kwargs: + failure_suppression_enabled = kwargs['failureSuppressionEnabled'] + if force_extension_execution_on_change is None and 'forceExtensionExecutionOnChange' in kwargs: + force_extension_execution_on_change = kwargs['forceExtensionExecutionOnChange'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if protected_settings_from_key_vault is None and 'protectedSettingsFromKeyVault' in kwargs: + protected_settings_from_key_vault = kwargs['protectedSettingsFromKeyVault'] + + _setter("name", name) + _setter("publisher", publisher) + _setter("type", type) + _setter("type_handler_version", type_handler_version) if auto_upgrade_minor_version_enabled is not None: - pulumi.set(__self__, "auto_upgrade_minor_version_enabled", auto_upgrade_minor_version_enabled) + _setter("auto_upgrade_minor_version_enabled", auto_upgrade_minor_version_enabled) if extensions_to_provision_after_vm_creations is not None: - pulumi.set(__self__, "extensions_to_provision_after_vm_creations", extensions_to_provision_after_vm_creations) + _setter("extensions_to_provision_after_vm_creations", extensions_to_provision_after_vm_creations) if failure_suppression_enabled is not None: - pulumi.set(__self__, "failure_suppression_enabled", failure_suppression_enabled) + _setter("failure_suppression_enabled", failure_suppression_enabled) if force_extension_execution_on_change is not None: - pulumi.set(__self__, "force_extension_execution_on_change", force_extension_execution_on_change) + _setter("force_extension_execution_on_change", force_extension_execution_on_change) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if protected_settings_from_key_vault is not None: - pulumi.set(__self__, "protected_settings_from_key_vault", protected_settings_from_key_vault) + _setter("protected_settings_from_key_vault", protected_settings_from_key_vault) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) @property @pulumi.getter @@ -3751,8 +5029,29 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_url: The URL to the Key Vault Secret which stores the protected settings. :param pulumi.Input[str] source_vault_id: The ID of the source Key Vault. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + OrchestratedVirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[pulumi.Input[str]] = None, + source_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -3788,8 +5087,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: Specifies a list of User Managed Identity IDs to be assigned to this Orchestrated Windows Virtual Machine Scale Set. :param pulumi.Input[str] type: The type of Managed Identity that should be configured on this Orchestrated Windows Virtual Machine Scale Set. Only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + OrchestratedVirtualMachineScaleSetIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -3837,18 +5155,55 @@ def __init__(__self__, *, > **NOTE:** If multiple `network_interface` blocks are specified, one must be set to `primary`. """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) + OrchestratedVirtualMachineScaleSetNetworkInterfaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + name=name, + dns_servers=dns_servers, + enable_accelerated_networking=enable_accelerated_networking, + enable_ip_forwarding=enable_ip_forwarding, + network_security_group_id=network_security_group_id, + primary=primary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enable_accelerated_networking: Optional[pulumi.Input[bool]] = None, + enable_ip_forwarding: Optional[pulumi.Input[bool]] = None, + network_security_group_id: Optional[pulumi.Input[str]] = None, + primary: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if enable_accelerated_networking is None and 'enableAcceleratedNetworking' in kwargs: + enable_accelerated_networking = kwargs['enableAcceleratedNetworking'] + if enable_ip_forwarding is None and 'enableIpForwarding' in kwargs: + enable_ip_forwarding = kwargs['enableIpForwarding'] + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + + _setter("ip_configurations", ip_configurations) + _setter("name", name) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if enable_accelerated_networking is not None: - pulumi.set(__self__, "enable_accelerated_networking", enable_accelerated_networking) + _setter("enable_accelerated_networking", enable_accelerated_networking) if enable_ip_forwarding is not None: - pulumi.set(__self__, "enable_ip_forwarding", enable_ip_forwarding) + _setter("enable_ip_forwarding", enable_ip_forwarding) if network_security_group_id is not None: - pulumi.set(__self__, "network_security_group_id", network_security_group_id) + _setter("network_security_group_id", network_security_group_id) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) @property @pulumi.getter(name="ipConfigurations") @@ -3964,21 +5319,58 @@ def __init__(__self__, *, > **NOTE:** `subnet_id` is required if version is set to `IPv4`. :param pulumi.Input[str] version: The Internet Protocol Version which should be used for this IP Configuration. Possible values are `IPv4` and `IPv6`. Defaults to `IPv4`. """ - pulumi.set(__self__, "name", name) + OrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + application_gateway_backend_address_pool_ids=application_gateway_backend_address_pool_ids, + application_security_group_ids=application_security_group_ids, + load_balancer_backend_address_pool_ids=load_balancer_backend_address_pool_ids, + primary=primary, + public_ip_addresses=public_ip_addresses, + subnet_id=subnet_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + application_gateway_backend_address_pool_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + application_security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + load_balancer_backend_address_pool_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + primary: Optional[pulumi.Input[bool]] = None, + public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressArgs']]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if application_gateway_backend_address_pool_ids is None and 'applicationGatewayBackendAddressPoolIds' in kwargs: + application_gateway_backend_address_pool_ids = kwargs['applicationGatewayBackendAddressPoolIds'] + if application_security_group_ids is None and 'applicationSecurityGroupIds' in kwargs: + application_security_group_ids = kwargs['applicationSecurityGroupIds'] + if load_balancer_backend_address_pool_ids is None and 'loadBalancerBackendAddressPoolIds' in kwargs: + load_balancer_backend_address_pool_ids = kwargs['loadBalancerBackendAddressPoolIds'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) if application_gateway_backend_address_pool_ids is not None: - pulumi.set(__self__, "application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) + _setter("application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) if application_security_group_ids is not None: - pulumi.set(__self__, "application_security_group_ids", application_security_group_ids) + _setter("application_security_group_ids", application_security_group_ids) if load_balancer_backend_address_pool_ids is not None: - pulumi.set(__self__, "load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) + _setter("load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -4102,19 +5494,54 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_name: Specifies what Public IP Address SKU the Public IP Address should be provisioned as. Possible vaules include `Basic_Regional`, `Basic_Global`, `Standard_Regional` or `Standard_Global`. For more information about Public IP Address SKU's and their capabilities, please see the [product documentation](https://docs.microsoft.com/azure/virtual-network/ip-services/public-ip-addresses#sku). Changing this forces a new resource to be created. :param pulumi.Input[str] version: The Internet Protocol Version which should be used for this public IP address. Possible values are `IPv4` and `IPv6`. Defaults to `IPv4`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + OrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + domain_name_label=domain_name_label, + idle_timeout_in_minutes=idle_timeout_in_minutes, + ip_tags=ip_tags, + public_ip_prefix_id=public_ip_prefix_id, + sku_name=sku_name, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + domain_name_label: Optional[pulumi.Input[str]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + ip_tags: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTagArgs']]]] = None, + public_ip_prefix_id: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if domain_name_label is None and 'domainNameLabel' in kwargs: + domain_name_label = kwargs['domainNameLabel'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if ip_tags is None and 'ipTags' in kwargs: + ip_tags = kwargs['ipTags'] + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + + _setter("name", name) if domain_name_label is not None: - pulumi.set(__self__, "domain_name_label", domain_name_label) + _setter("domain_name_label", domain_name_label) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if ip_tags is not None: - pulumi.set(__self__, "ip_tags", ip_tags) + _setter("ip_tags", ip_tags) if public_ip_prefix_id is not None: - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) + _setter("public_ip_prefix_id", public_ip_prefix_id) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -4210,8 +5637,25 @@ def __init__(__self__, *, :param pulumi.Input[str] tag: The IP Tag associated with the Public IP, such as `SQL` or `Storage`. Changing this forces a new resource to be created. :param pulumi.Input[str] type: The Type of IP Tag, such as `FirstPartyUsage`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "type", type) + OrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + tag=tag, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tag: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag is None: + raise TypeError("Missing 'tag' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("tag", tag) + _setter("type", type) @property @pulumi.getter @@ -4257,16 +5701,51 @@ def __init__(__self__, *, :param pulumi.Input[int] disk_size_gb: The Size of the Internal OS Disk in GB, if you wish to vary from the size used in the image this Virtual Machine Scale Set is sourced from. :param pulumi.Input[bool] write_accelerator_enabled: Specifies if Write Accelerator is enabled on the OS Disk. Defaults to `false`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "storage_account_type", storage_account_type) + OrchestratedVirtualMachineScaleSetOsDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + storage_account_type=storage_account_type, + diff_disk_settings=diff_disk_settings, + disk_encryption_set_id=disk_encryption_set_id, + disk_size_gb=disk_size_gb, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[pulumi.Input[str]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + diff_disk_settings: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetOsDiskDiffDiskSettingsArgs']] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + write_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if diff_disk_settings is None and 'diffDiskSettings' in kwargs: + diff_disk_settings = kwargs['diffDiskSettings'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("storage_account_type", storage_account_type) if diff_disk_settings is not None: - pulumi.set(__self__, "diff_disk_settings", diff_disk_settings) + _setter("diff_disk_settings", diff_disk_settings) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -4352,9 +5831,24 @@ def __init__(__self__, *, :param pulumi.Input[str] option: Specifies the Ephemeral Disk Settings for the OS Disk. At this time the only possible value is `Local`. Changing this forces a new resource to be created. :param pulumi.Input[str] placement: Specifies where to store the Ephemeral Disk. Possible values are `CacheDisk` and `ResourceDisk`. Defaults to `CacheDisk`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "option", option) + OrchestratedVirtualMachineScaleSetOsDiskDiffDiskSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + option=option, + placement=placement, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + option: Optional[pulumi.Input[str]] = None, + placement: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if option is None: + raise TypeError("Missing 'option' argument") + + _setter("option", option) if placement is not None: - pulumi.set(__self__, "placement", placement) + _setter("placement", placement) @property @pulumi.getter @@ -4394,12 +5888,33 @@ def __init__(__self__, *, :param pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationArgs'] linux_configuration: A `linux_configuration` block as documented below. :param pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationArgs'] windows_configuration: A `windows_configuration` block as documented below. """ + OrchestratedVirtualMachineScaleSetOsProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_data=custom_data, + linux_configuration=linux_configuration, + windows_configuration=windows_configuration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_data: Optional[pulumi.Input[str]] = None, + linux_configuration: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationArgs']] = None, + windows_configuration: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + if linux_configuration is None and 'linuxConfiguration' in kwargs: + linux_configuration = kwargs['linuxConfiguration'] + if windows_configuration is None and 'windowsConfiguration' in kwargs: + windows_configuration = kwargs['windowsConfiguration'] + if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) if linux_configuration is not None: - pulumi.set(__self__, "linux_configuration", linux_configuration) + _setter("linux_configuration", linux_configuration) if windows_configuration is not None: - pulumi.set(__self__, "windows_configuration", windows_configuration) + _setter("windows_configuration", windows_configuration) @property @pulumi.getter(name="customData") @@ -4466,23 +5981,68 @@ def __init__(__self__, *, :param pulumi.Input[bool] provision_vm_agent: Should the Azure VM Agent be provisioned on each Virtual Machine in the Scale Set? Defaults to `true`. Changing this value forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationSecretArgs']]] secrets: One or more `secret` blocks as defined below. """ - pulumi.set(__self__, "admin_username", admin_username) + OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + admin_password=admin_password, + admin_ssh_keys=admin_ssh_keys, + computer_name_prefix=computer_name_prefix, + disable_password_authentication=disable_password_authentication, + patch_assessment_mode=patch_assessment_mode, + patch_mode=patch_mode, + provision_vm_agent=provision_vm_agent, + secrets=secrets, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[pulumi.Input[str]] = None, + admin_password: Optional[pulumi.Input[str]] = None, + admin_ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationAdminSshKeyArgs']]]] = None, + computer_name_prefix: Optional[pulumi.Input[str]] = None, + disable_password_authentication: Optional[pulumi.Input[bool]] = None, + patch_assessment_mode: Optional[pulumi.Input[str]] = None, + patch_mode: Optional[pulumi.Input[str]] = None, + provision_vm_agent: Optional[pulumi.Input[bool]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationSecretArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if admin_ssh_keys is None and 'adminSshKeys' in kwargs: + admin_ssh_keys = kwargs['adminSshKeys'] + if computer_name_prefix is None and 'computerNamePrefix' in kwargs: + computer_name_prefix = kwargs['computerNamePrefix'] + if disable_password_authentication is None and 'disablePasswordAuthentication' in kwargs: + disable_password_authentication = kwargs['disablePasswordAuthentication'] + if patch_assessment_mode is None and 'patchAssessmentMode' in kwargs: + patch_assessment_mode = kwargs['patchAssessmentMode'] + if patch_mode is None and 'patchMode' in kwargs: + patch_mode = kwargs['patchMode'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + + _setter("admin_username", admin_username) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if admin_ssh_keys is not None: - pulumi.set(__self__, "admin_ssh_keys", admin_ssh_keys) + _setter("admin_ssh_keys", admin_ssh_keys) if computer_name_prefix is not None: - pulumi.set(__self__, "computer_name_prefix", computer_name_prefix) + _setter("computer_name_prefix", computer_name_prefix) if disable_password_authentication is not None: - pulumi.set(__self__, "disable_password_authentication", disable_password_authentication) + _setter("disable_password_authentication", disable_password_authentication) if patch_assessment_mode is not None: - pulumi.set(__self__, "patch_assessment_mode", patch_assessment_mode) + _setter("patch_assessment_mode", patch_assessment_mode) if patch_mode is not None: - pulumi.set(__self__, "patch_mode", patch_mode) + _setter("patch_mode", patch_mode) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) @property @pulumi.getter(name="adminUsername") @@ -4605,8 +6165,27 @@ def __init__(__self__, *, > **NOTE:** The Azure VM Agent only allows creating SSH Keys at the path `/home/{username}/.ssh/authorized_keys` - as such this public key will be written to the authorized keys file. """ - pulumi.set(__self__, "public_key", public_key) - pulumi.set(__self__, "username", username) + OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationAdminSshKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_key=public_key, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_key: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_key is None and 'publicKey' in kwargs: + public_key = kwargs['publicKey'] + if public_key is None: + raise TypeError("Missing 'public_key' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("public_key", public_key) + _setter("username", username) @property @pulumi.getter(name="publicKey") @@ -4646,8 +6225,27 @@ def __init__(__self__, *, > **NOTE:** The schema of the `certificate` block is slightly different depending on if you are provisioning a `windows_configuration` or a `linux_configuration`. :param pulumi.Input[str] key_vault_id: The ID of the Key Vault from which all Secrets should be sourced. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "key_vault_id", key_vault_id) + OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationSecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationSecretCertificateArgs']]]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("certificates", certificates) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -4685,7 +6283,20 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "url", url) + OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationSecretCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("url", url) @property @pulumi.getter @@ -4732,26 +6343,79 @@ def __init__(__self__, *, :param pulumi.Input[str] timezone: Specifies the time zone of the virtual machine, the possible values are defined [here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). :param pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationWinrmListenerArgs']]] winrm_listeners: One or more `winrm_listener` blocks as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "admin_password", admin_password) - pulumi.set(__self__, "admin_username", admin_username) + OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_password=admin_password, + admin_username=admin_username, + computer_name_prefix=computer_name_prefix, + enable_automatic_updates=enable_automatic_updates, + hotpatching_enabled=hotpatching_enabled, + patch_assessment_mode=patch_assessment_mode, + patch_mode=patch_mode, + provision_vm_agent=provision_vm_agent, + secrets=secrets, + timezone=timezone, + winrm_listeners=winrm_listeners, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_password: Optional[pulumi.Input[str]] = None, + admin_username: Optional[pulumi.Input[str]] = None, + computer_name_prefix: Optional[pulumi.Input[str]] = None, + enable_automatic_updates: Optional[pulumi.Input[bool]] = None, + hotpatching_enabled: Optional[pulumi.Input[bool]] = None, + patch_assessment_mode: Optional[pulumi.Input[str]] = None, + patch_mode: Optional[pulumi.Input[str]] = None, + provision_vm_agent: Optional[pulumi.Input[bool]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationSecretArgs']]]] = None, + timezone: Optional[pulumi.Input[str]] = None, + winrm_listeners: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationWinrmListenerArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if admin_password is None: + raise TypeError("Missing 'admin_password' argument") + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if computer_name_prefix is None and 'computerNamePrefix' in kwargs: + computer_name_prefix = kwargs['computerNamePrefix'] + if enable_automatic_updates is None and 'enableAutomaticUpdates' in kwargs: + enable_automatic_updates = kwargs['enableAutomaticUpdates'] + if hotpatching_enabled is None and 'hotpatchingEnabled' in kwargs: + hotpatching_enabled = kwargs['hotpatchingEnabled'] + if patch_assessment_mode is None and 'patchAssessmentMode' in kwargs: + patch_assessment_mode = kwargs['patchAssessmentMode'] + if patch_mode is None and 'patchMode' in kwargs: + patch_mode = kwargs['patchMode'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if winrm_listeners is None and 'winrmListeners' in kwargs: + winrm_listeners = kwargs['winrmListeners'] + + _setter("admin_password", admin_password) + _setter("admin_username", admin_username) if computer_name_prefix is not None: - pulumi.set(__self__, "computer_name_prefix", computer_name_prefix) + _setter("computer_name_prefix", computer_name_prefix) if enable_automatic_updates is not None: - pulumi.set(__self__, "enable_automatic_updates", enable_automatic_updates) + _setter("enable_automatic_updates", enable_automatic_updates) if hotpatching_enabled is not None: - pulumi.set(__self__, "hotpatching_enabled", hotpatching_enabled) + _setter("hotpatching_enabled", hotpatching_enabled) if patch_assessment_mode is not None: - pulumi.set(__self__, "patch_assessment_mode", patch_assessment_mode) + _setter("patch_assessment_mode", patch_assessment_mode) if patch_mode is not None: - pulumi.set(__self__, "patch_mode", patch_mode) + _setter("patch_mode", patch_mode) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) if winrm_listeners is not None: - pulumi.set(__self__, "winrm_listeners", winrm_listeners) + _setter("winrm_listeners", winrm_listeners) @property @pulumi.getter(name="adminPassword") @@ -4898,8 +6562,27 @@ def __init__(__self__, *, > **NOTE:** The schema of the `certificate` block is slightly different depending on if you are provisioning a `windows_configuration` or a `linux_configuration`. :param pulumi.Input[str] key_vault_id: The ID of the Key Vault from which all Secrets should be sourced. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "key_vault_id", key_vault_id) + OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationSecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationSecretCertificateArgs']]]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("certificates", certificates) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -4939,8 +6622,25 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "store", store) - pulumi.set(__self__, "url", url) + OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationSecretCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + store=store, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + store: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if store is None: + raise TypeError("Missing 'store' argument") + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("store", store) + _setter("url", url) @property @pulumi.getter @@ -4980,9 +6680,26 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "protocol", protocol) + OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationWinrmListenerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + certificate_url=certificate_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[pulumi.Input[str]] = None, + certificate_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + + _setter("protocol", protocol) if certificate_url is not None: - pulumi.set(__self__, "certificate_url", certificate_url) + _setter("certificate_url", certificate_url) @property @pulumi.getter @@ -5022,9 +6739,30 @@ def __init__(__self__, *, :param pulumi.Input[str] product: Specifies the product of the image from the marketplace. Changing this forces a new resource to be created. :param pulumi.Input[str] publisher: Specifies the publisher of the image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + OrchestratedVirtualMachineScaleSetPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + product: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -5072,10 +6810,27 @@ def __init__(__self__, *, :param pulumi.Input[int] base_regular_count: Specifies the base number of VMs of `Regular` priority that will be created before any VMs of priority `Spot` are created. Possible values are integers between `0` and `1000`. Defaults to `0`. :param pulumi.Input[int] regular_percentage_above_base: Specifies the desired percentage of VM instances that are of `Regular` priority after the base count has been reached. Possible values are integers between `0` and `100`. Defaults to `0`. """ + OrchestratedVirtualMachineScaleSetPriorityMixArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + base_regular_count=base_regular_count, + regular_percentage_above_base=regular_percentage_above_base, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + base_regular_count: Optional[pulumi.Input[int]] = None, + regular_percentage_above_base: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if base_regular_count is None and 'baseRegularCount' in kwargs: + base_regular_count = kwargs['baseRegularCount'] + if regular_percentage_above_base is None and 'regularPercentageAboveBase' in kwargs: + regular_percentage_above_base = kwargs['regularPercentageAboveBase'] + if base_regular_count is not None: - pulumi.set(__self__, "base_regular_count", base_regular_count) + _setter("base_regular_count", base_regular_count) if regular_percentage_above_base is not None: - pulumi.set(__self__, "regular_percentage_above_base", regular_percentage_above_base) + _setter("regular_percentage_above_base", regular_percentage_above_base) @property @pulumi.getter(name="baseRegularCount") @@ -5115,10 +6870,35 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: Specifies the SKU of the image used to create the virtual machines. :param pulumi.Input[str] version: Specifies the version of the image used to create the virtual machines. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + OrchestratedVirtualMachineScaleSetSourceImageReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -5178,9 +6958,24 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Should the termination notification be enabled on this Virtual Machine Scale Set? Possible values `true` or `false` :param pulumi.Input[str] timeout: Length of time (in minutes, between `5` and `15`) a notification to be sent to the VM on the instance metadata server till the VM gets deleted. The time duration should be specified in `ISO 8601` format. Defaults to `PT5M`. """ - pulumi.set(__self__, "enabled", enabled) + OrchestratedVirtualMachineScaleSetTerminationNotificationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + timeout: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -5222,15 +7017,44 @@ def __init__(__self__, *, :param pulumi.Input[str] remote_ip_address: The remote IP Address to be filtered on. Specify `127.0.0.1` for a single address entry, `127.0.0.1-127.0.0.255` for a range and `127.0.0.1;127.0.0.5` for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created. :param pulumi.Input[str] remote_port: The remote port to be filtered on. Specify `80` for single port entry, `80-85` for a range and `80;443;` for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "protocol", protocol) + PacketCaptureFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + local_ip_address=local_ip_address, + local_port=local_port, + remote_ip_address=remote_ip_address, + remote_port=remote_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[pulumi.Input[str]] = None, + local_ip_address: Optional[pulumi.Input[str]] = None, + local_port: Optional[pulumi.Input[str]] = None, + remote_ip_address: Optional[pulumi.Input[str]] = None, + remote_port: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if local_ip_address is None and 'localIpAddress' in kwargs: + local_ip_address = kwargs['localIpAddress'] + if local_port is None and 'localPort' in kwargs: + local_port = kwargs['localPort'] + if remote_ip_address is None and 'remoteIpAddress' in kwargs: + remote_ip_address = kwargs['remoteIpAddress'] + if remote_port is None and 'remotePort' in kwargs: + remote_port = kwargs['remotePort'] + + _setter("protocol", protocol) if local_ip_address is not None: - pulumi.set(__self__, "local_ip_address", local_ip_address) + _setter("local_ip_address", local_ip_address) if local_port is not None: - pulumi.set(__self__, "local_port", local_port) + _setter("local_port", local_port) if remote_ip_address is not None: - pulumi.set(__self__, "remote_ip_address", remote_ip_address) + _setter("remote_ip_address", remote_ip_address) if remote_port is not None: - pulumi.set(__self__, "remote_port", remote_port) + _setter("remote_port", remote_port) @property @pulumi.getter @@ -5306,12 +7130,33 @@ def __init__(__self__, *, > **NOTE:** At least one of `file_path` or `storage_account_id` must be specified. :param pulumi.Input[str] storage_path: The URI of the storage path where the packet capture sessions are saved to. """ + PacketCaptureStorageLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_path=file_path, + storage_account_id=storage_account_id, + storage_path=storage_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_path: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_path is None and 'filePath' in kwargs: + file_path = kwargs['filePath'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_path is None and 'storagePath' in kwargs: + storage_path = kwargs['storagePath'] + if file_path is not None: - pulumi.set(__self__, "file_path", file_path) + _setter("file_path", file_path) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if storage_path is not None: - pulumi.set(__self__, "storage_path", storage_path) + _setter("storage_path", storage_path) @property @pulumi.getter(name="filePath") @@ -5361,9 +7206,26 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_uri: Blob endpoint for the storage account to hold the virtual machine's diagnostic files. This must be the root of a storage account, and not a storage container. :param pulumi.Input[bool] enabled: Whether to enable boot diagnostics for the virtual machine. Defaults to `true`. """ - pulumi.set(__self__, "storage_uri", storage_uri) + ScaleSetBootDiagnosticsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_uri=storage_uri, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_uri: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_uri is None and 'storageUri' in kwargs: + storage_uri = kwargs['storageUri'] + if storage_uri is None: + raise TypeError("Missing 'storage_uri' argument") + + _setter("storage_uri", storage_uri) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="storageUri") @@ -5411,18 +7273,59 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] provision_after_extensions: Specifies a dependency array of extensions required to be executed before, the array stores the name of each extension. :param pulumi.Input[str] settings: The settings passed to the extension, these are specified as a JSON object in a string. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_handler_version", type_handler_version) + ScaleSetExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + publisher=publisher, + type=type, + type_handler_version=type_handler_version, + auto_upgrade_minor_version=auto_upgrade_minor_version, + protected_settings=protected_settings, + provision_after_extensions=provision_after_extensions, + settings=settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + type_handler_version: Optional[pulumi.Input[str]] = None, + auto_upgrade_minor_version: Optional[pulumi.Input[bool]] = None, + protected_settings: Optional[pulumi.Input[str]] = None, + provision_after_extensions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + settings: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if type_handler_version is None: + raise TypeError("Missing 'type_handler_version' argument") + if auto_upgrade_minor_version is None and 'autoUpgradeMinorVersion' in kwargs: + auto_upgrade_minor_version = kwargs['autoUpgradeMinorVersion'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if provision_after_extensions is None and 'provisionAfterExtensions' in kwargs: + provision_after_extensions = kwargs['provisionAfterExtensions'] + + _setter("name", name) + _setter("publisher", publisher) + _setter("type", type) + _setter("type_handler_version", type_handler_version) if auto_upgrade_minor_version is not None: - pulumi.set(__self__, "auto_upgrade_minor_version", auto_upgrade_minor_version) + _setter("auto_upgrade_minor_version", auto_upgrade_minor_version) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if provision_after_extensions is not None: - pulumi.set(__self__, "provision_after_extensions", provision_after_extensions) + _setter("provision_after_extensions", provision_after_extensions) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) @property @pulumi.getter @@ -5557,11 +7460,32 @@ def __init__(__self__, *, pulumi.export("principalId", example.identity.principal_id) ``` """ - pulumi.set(__self__, "type", type) + ScaleSetIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) @property @pulumi.getter @@ -5642,17 +7566,56 @@ def __init__(__self__, *, :param pulumi.Input[bool] ip_forwarding: Whether IP forwarding is enabled on this NIC. Defaults to `false`. :param pulumi.Input[str] network_security_group_id: Specifies the identifier for the network security group. """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "primary", primary) + ScaleSetNetworkProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + name=name, + primary=primary, + accelerated_networking=accelerated_networking, + dns_settings=dns_settings, + ip_forwarding=ip_forwarding, + network_security_group_id=network_security_group_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetNetworkProfileIpConfigurationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + primary: Optional[pulumi.Input[bool]] = None, + accelerated_networking: Optional[pulumi.Input[bool]] = None, + dns_settings: Optional[pulumi.Input['ScaleSetNetworkProfileDnsSettingsArgs']] = None, + ip_forwarding: Optional[pulumi.Input[bool]] = None, + network_security_group_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + if accelerated_networking is None and 'acceleratedNetworking' in kwargs: + accelerated_networking = kwargs['acceleratedNetworking'] + if dns_settings is None and 'dnsSettings' in kwargs: + dns_settings = kwargs['dnsSettings'] + if ip_forwarding is None and 'ipForwarding' in kwargs: + ip_forwarding = kwargs['ipForwarding'] + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + + _setter("ip_configurations", ip_configurations) + _setter("name", name) + _setter("primary", primary) if accelerated_networking is not None: - pulumi.set(__self__, "accelerated_networking", accelerated_networking) + _setter("accelerated_networking", accelerated_networking) if dns_settings is not None: - pulumi.set(__self__, "dns_settings", dns_settings) + _setter("dns_settings", dns_settings) if ip_forwarding is not None: - pulumi.set(__self__, "ip_forwarding", ip_forwarding) + _setter("ip_forwarding", ip_forwarding) if network_security_group_id is not None: - pulumi.set(__self__, "network_security_group_id", network_security_group_id) + _setter("network_security_group_id", network_security_group_id) @property @pulumi.getter(name="ipConfigurations") @@ -5746,7 +7709,22 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_servers: Specifies an array of DNS servers. """ - pulumi.set(__self__, "dns_servers", dns_servers) + ScaleSetNetworkProfileDnsSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_servers=dns_servers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if dns_servers is None: + raise TypeError("Missing 'dns_servers' argument") + + _setter("dns_servers", dns_servers) @property @pulumi.getter(name="dnsServers") @@ -5786,19 +7764,62 @@ def __init__(__self__, *, > **NOTE:** When using this field you'll also need to configure a Rule for the Load Balancer, and use a `depends_on` between this resource and the Load Balancer Rule. :param pulumi.Input['ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfigurationArgs'] public_ip_address_configuration: Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration. The public_ip_address_configuration is documented below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "primary", primary) - pulumi.set(__self__, "subnet_id", subnet_id) + ScaleSetNetworkProfileIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + primary=primary, + subnet_id=subnet_id, + application_gateway_backend_address_pool_ids=application_gateway_backend_address_pool_ids, + application_security_group_ids=application_security_group_ids, + load_balancer_backend_address_pool_ids=load_balancer_backend_address_pool_ids, + load_balancer_inbound_nat_rules_ids=load_balancer_inbound_nat_rules_ids, + public_ip_address_configuration=public_ip_address_configuration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + primary: Optional[pulumi.Input[bool]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + application_gateway_backend_address_pool_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + application_security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + load_balancer_backend_address_pool_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + load_balancer_inbound_nat_rules_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + public_ip_address_configuration: Optional[pulumi.Input['ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfigurationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if application_gateway_backend_address_pool_ids is None and 'applicationGatewayBackendAddressPoolIds' in kwargs: + application_gateway_backend_address_pool_ids = kwargs['applicationGatewayBackendAddressPoolIds'] + if application_security_group_ids is None and 'applicationSecurityGroupIds' in kwargs: + application_security_group_ids = kwargs['applicationSecurityGroupIds'] + if load_balancer_backend_address_pool_ids is None and 'loadBalancerBackendAddressPoolIds' in kwargs: + load_balancer_backend_address_pool_ids = kwargs['loadBalancerBackendAddressPoolIds'] + if load_balancer_inbound_nat_rules_ids is None and 'loadBalancerInboundNatRulesIds' in kwargs: + load_balancer_inbound_nat_rules_ids = kwargs['loadBalancerInboundNatRulesIds'] + if public_ip_address_configuration is None and 'publicIpAddressConfiguration' in kwargs: + public_ip_address_configuration = kwargs['publicIpAddressConfiguration'] + + _setter("name", name) + _setter("primary", primary) + _setter("subnet_id", subnet_id) if application_gateway_backend_address_pool_ids is not None: - pulumi.set(__self__, "application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) + _setter("application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) if application_security_group_ids is not None: - pulumi.set(__self__, "application_security_group_ids", application_security_group_ids) + _setter("application_security_group_ids", application_security_group_ids) if load_balancer_backend_address_pool_ids is not None: - pulumi.set(__self__, "load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) + _setter("load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) if load_balancer_inbound_nat_rules_ids is not None: - pulumi.set(__self__, "load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) + _setter("load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) if public_ip_address_configuration is not None: - pulumi.set(__self__, "public_ip_address_configuration", public_ip_address_configuration) + _setter("public_ip_address_configuration", public_ip_address_configuration) @property @pulumi.getter @@ -5912,9 +7933,34 @@ def __init__(__self__, *, :param pulumi.Input[int] idle_timeout: The idle timeout in minutes. This value must be between 4 and 30. :param pulumi.Input[str] name: The name of the public IP address configuration """ - pulumi.set(__self__, "domain_name_label", domain_name_label) - pulumi.set(__self__, "idle_timeout", idle_timeout) - pulumi.set(__self__, "name", name) + ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name_label=domain_name_label, + idle_timeout=idle_timeout, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name_label: Optional[pulumi.Input[str]] = None, + idle_timeout: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name_label is None and 'domainNameLabel' in kwargs: + domain_name_label = kwargs['domainNameLabel'] + if domain_name_label is None: + raise TypeError("Missing 'domain_name_label' argument") + if idle_timeout is None and 'idleTimeout' in kwargs: + idle_timeout = kwargs['idleTimeout'] + if idle_timeout is None: + raise TypeError("Missing 'idle_timeout' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("domain_name_label", domain_name_label) + _setter("idle_timeout", idle_timeout) + _setter("name", name) @property @pulumi.getter(name="domainNameLabel") @@ -5966,12 +8012,41 @@ def __init__(__self__, *, :param pulumi.Input[str] admin_password: Specifies the administrator password to use for all the instances of virtual machines in a scale set. :param pulumi.Input[str] custom_data: Specifies custom data to supply to the machine. On Linux-based systems, this can be used as a cloud-init script. On other systems, this will be copied as a file on disk. Internally, this provider will base64 encode this value before sending it to the API. The maximum length of the binary array is 65535 bytes. """ - pulumi.set(__self__, "admin_username", admin_username) - pulumi.set(__self__, "computer_name_prefix", computer_name_prefix) + ScaleSetOsProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + computer_name_prefix=computer_name_prefix, + admin_password=admin_password, + custom_data=custom_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[pulumi.Input[str]] = None, + computer_name_prefix: Optional[pulumi.Input[str]] = None, + admin_password: Optional[pulumi.Input[str]] = None, + custom_data: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if computer_name_prefix is None and 'computerNamePrefix' in kwargs: + computer_name_prefix = kwargs['computerNamePrefix'] + if computer_name_prefix is None: + raise TypeError("Missing 'computer_name_prefix' argument") + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + + _setter("admin_username", admin_username) + _setter("computer_name_prefix", computer_name_prefix) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) @property @pulumi.getter(name="adminUsername") @@ -6035,10 +8110,27 @@ def __init__(__self__, *, > **NOTE:** At least one `ssh_keys` block is required if `disable_password_authentication` is set to `true`. """ + ScaleSetOsProfileLinuxConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disable_password_authentication=disable_password_authentication, + ssh_keys=ssh_keys, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disable_password_authentication: Optional[pulumi.Input[bool]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetOsProfileLinuxConfigSshKeyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disable_password_authentication is None and 'disablePasswordAuthentication' in kwargs: + disable_password_authentication = kwargs['disablePasswordAuthentication'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if disable_password_authentication is not None: - pulumi.set(__self__, "disable_password_authentication", disable_password_authentication) + _setter("disable_password_authentication", disable_password_authentication) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) @property @pulumi.getter(name="disablePasswordAuthentication") @@ -6084,9 +8176,26 @@ def __init__(__self__, *, > **NOTE:** Rather than defining this in-line you can source this from a local file using the `file` function - for example `key_data = file("~/.ssh/id_rsa.pub")`. """ - pulumi.set(__self__, "path", path) + ScaleSetOsProfileLinuxConfigSshKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + path=path, + key_data=key_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + path: Optional[pulumi.Input[str]] = None, + key_data: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if path is None: + raise TypeError("Missing 'path' argument") + if key_data is None and 'keyData' in kwargs: + key_data = kwargs['keyData'] + + _setter("path", path) if key_data is not None: - pulumi.set(__self__, "key_data", key_data) + _setter("key_data", key_data) @property @pulumi.getter @@ -6128,9 +8237,28 @@ def __init__(__self__, *, :param pulumi.Input[str] source_vault_id: Specifies the key vault to use. :param pulumi.Input[Sequence[pulumi.Input['ScaleSetOsProfileSecretVaultCertificateArgs']]] vault_certificates: (Required, on Windows machines) One or more `vault_certificates` blocks as defined below. """ - pulumi.set(__self__, "source_vault_id", source_vault_id) + ScaleSetOsProfileSecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + source_vault_id=source_vault_id, + vault_certificates=vault_certificates, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + source_vault_id: Optional[pulumi.Input[str]] = None, + vault_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetOsProfileSecretVaultCertificateArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + if vault_certificates is None and 'vaultCertificates' in kwargs: + vault_certificates = kwargs['vaultCertificates'] + + _setter("source_vault_id", source_vault_id) if vault_certificates is not None: - pulumi.set(__self__, "vault_certificates", vault_certificates) + _setter("vault_certificates", vault_certificates) @property @pulumi.getter(name="sourceVaultId") @@ -6166,9 +8294,28 @@ def __init__(__self__, *, :param pulumi.Input[str] certificate_url: It is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be `data`, `dataType` and `password`. :param pulumi.Input[str] certificate_store: (Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to. """ - pulumi.set(__self__, "certificate_url", certificate_url) + ScaleSetOsProfileSecretVaultCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_url=certificate_url, + certificate_store=certificate_store, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_url: Optional[pulumi.Input[str]] = None, + certificate_store: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + if certificate_url is None: + raise TypeError("Missing 'certificate_url' argument") + if certificate_store is None and 'certificateStore' in kwargs: + certificate_store = kwargs['certificateStore'] + + _setter("certificate_url", certificate_url) if certificate_store is not None: - pulumi.set(__self__, "certificate_store", certificate_store) + _setter("certificate_store", certificate_store) @property @pulumi.getter(name="certificateUrl") @@ -6208,14 +8355,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] provision_vm_agent: Indicates whether virtual machine agent should be provisioned on the virtual machines in the scale set. :param pulumi.Input[Sequence[pulumi.Input['ScaleSetOsProfileWindowsConfigWinrmArgs']]] winrms: A collection of WinRM configuration blocks as documented below. """ + ScaleSetOsProfileWindowsConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_unattend_configs=additional_unattend_configs, + enable_automatic_upgrades=enable_automatic_upgrades, + provision_vm_agent=provision_vm_agent, + winrms=winrms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_unattend_configs: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetOsProfileWindowsConfigAdditionalUnattendConfigArgs']]]] = None, + enable_automatic_upgrades: Optional[pulumi.Input[bool]] = None, + provision_vm_agent: Optional[pulumi.Input[bool]] = None, + winrms: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetOsProfileWindowsConfigWinrmArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_unattend_configs is None and 'additionalUnattendConfigs' in kwargs: + additional_unattend_configs = kwargs['additionalUnattendConfigs'] + if enable_automatic_upgrades is None and 'enableAutomaticUpgrades' in kwargs: + enable_automatic_upgrades = kwargs['enableAutomaticUpgrades'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if additional_unattend_configs is not None: - pulumi.set(__self__, "additional_unattend_configs", additional_unattend_configs) + _setter("additional_unattend_configs", additional_unattend_configs) if enable_automatic_upgrades is not None: - pulumi.set(__self__, "enable_automatic_upgrades", enable_automatic_upgrades) + _setter("enable_automatic_upgrades", enable_automatic_upgrades) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if winrms is not None: - pulumi.set(__self__, "winrms", winrms) + _setter("winrms", winrms) @property @pulumi.getter(name="additionalUnattendConfigs") @@ -6279,10 +8449,39 @@ def __init__(__self__, *, :param pulumi.Input[str] pass_: Specifies the name of the pass that the content applies to. The only allowable value is `oobeSystem`. :param pulumi.Input[str] setting_name: Specifies the name of the setting to which the content applies. Possible values are: `FirstLogonCommands` and `AutoLogon`. """ - pulumi.set(__self__, "component", component) - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "pass_", pass_) - pulumi.set(__self__, "setting_name", setting_name) + ScaleSetOsProfileWindowsConfigAdditionalUnattendConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + component=component, + content=content, + pass_=pass_, + setting_name=setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + component: Optional[pulumi.Input[str]] = None, + content: Optional[pulumi.Input[str]] = None, + pass_: Optional[pulumi.Input[str]] = None, + setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if component is None: + raise TypeError("Missing 'component' argument") + if content is None: + raise TypeError("Missing 'content' argument") + if pass_ is None and 'pass' in kwargs: + pass_ = kwargs['pass'] + if pass_ is None: + raise TypeError("Missing 'pass_' argument") + if setting_name is None and 'settingName' in kwargs: + setting_name = kwargs['settingName'] + if setting_name is None: + raise TypeError("Missing 'setting_name' argument") + + _setter("component", component) + _setter("content", content) + _setter("pass_", pass_) + _setter("setting_name", setting_name) @property @pulumi.getter @@ -6342,9 +8541,26 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol: Specifies the protocol of listener :param pulumi.Input[str] certificate_url: Specifies URL of the certificate with which new Virtual Machines is provisioned. """ - pulumi.set(__self__, "protocol", protocol) + ScaleSetOsProfileWindowsConfigWinrmArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + certificate_url=certificate_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[pulumi.Input[str]] = None, + certificate_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + + _setter("protocol", protocol) if certificate_url is not None: - pulumi.set(__self__, "certificate_url", certificate_url) + _setter("certificate_url", certificate_url) @property @pulumi.getter @@ -6386,15 +8602,44 @@ def __init__(__self__, *, :param pulumi.Input[str] remote_ip_address: The remote IP Address to be filtered on. Specify `127.0.0.1` for a single address entry, `127.0.0.1-127.0.0.255` for a range and `127.0.0.1;127.0.0.5` for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created. :param pulumi.Input[str] remote_port: The remote port to be filtered on. Specify `80` for single port entry, `80-85` for a range and `80;443;` for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "protocol", protocol) + ScaleSetPacketCaptureFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + local_ip_address=local_ip_address, + local_port=local_port, + remote_ip_address=remote_ip_address, + remote_port=remote_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[pulumi.Input[str]] = None, + local_ip_address: Optional[pulumi.Input[str]] = None, + local_port: Optional[pulumi.Input[str]] = None, + remote_ip_address: Optional[pulumi.Input[str]] = None, + remote_port: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if local_ip_address is None and 'localIpAddress' in kwargs: + local_ip_address = kwargs['localIpAddress'] + if local_port is None and 'localPort' in kwargs: + local_port = kwargs['localPort'] + if remote_ip_address is None and 'remoteIpAddress' in kwargs: + remote_ip_address = kwargs['remoteIpAddress'] + if remote_port is None and 'remotePort' in kwargs: + remote_port = kwargs['remotePort'] + + _setter("protocol", protocol) if local_ip_address is not None: - pulumi.set(__self__, "local_ip_address", local_ip_address) + _setter("local_ip_address", local_ip_address) if local_port is not None: - pulumi.set(__self__, "local_port", local_port) + _setter("local_port", local_port) if remote_ip_address is not None: - pulumi.set(__self__, "remote_ip_address", remote_ip_address) + _setter("remote_ip_address", remote_ip_address) if remote_port is not None: - pulumi.set(__self__, "remote_port", remote_port) + _setter("remote_port", remote_port) @property @pulumi.getter @@ -6466,10 +8711,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] exclude_instance_ids: A list of Virtual Machine Scale Set instance IDs which should be excluded from running Packet Capture, e.g. `["0", "2"]`. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] include_instance_ids: A list of Virtual Machine Scale Set instance IDs which should be included for Packet Capture, e.g. `["1", "3"]`. Changing this forces a new resource to be created. """ + ScaleSetPacketCaptureMachineScopeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + exclude_instance_ids=exclude_instance_ids, + include_instance_ids=include_instance_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exclude_instance_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + include_instance_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exclude_instance_ids is None and 'excludeInstanceIds' in kwargs: + exclude_instance_ids = kwargs['excludeInstanceIds'] + if include_instance_ids is None and 'includeInstanceIds' in kwargs: + include_instance_ids = kwargs['includeInstanceIds'] + if exclude_instance_ids is not None: - pulumi.set(__self__, "exclude_instance_ids", exclude_instance_ids) + _setter("exclude_instance_ids", exclude_instance_ids) if include_instance_ids is not None: - pulumi.set(__self__, "include_instance_ids", include_instance_ids) + _setter("include_instance_ids", include_instance_ids) @property @pulumi.getter(name="excludeInstanceIds") @@ -6509,12 +8771,33 @@ def __init__(__self__, *, > **NOTE:** At least one of `file_path` or `storage_account_id` must be specified. :param pulumi.Input[str] storage_path: The URI of the storage path where the packet capture sessions are saved to. """ + ScaleSetPacketCaptureStorageLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_path=file_path, + storage_account_id=storage_account_id, + storage_path=storage_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_path: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_path is None and 'filePath' in kwargs: + file_path = kwargs['filePath'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_path is None and 'storagePath' in kwargs: + storage_path = kwargs['storagePath'] + if file_path is not None: - pulumi.set(__self__, "file_path", file_path) + _setter("file_path", file_path) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if storage_path is not None: - pulumi.set(__self__, "storage_path", storage_path) + _setter("storage_path", storage_path) @property @pulumi.getter(name="filePath") @@ -6566,9 +8849,30 @@ def __init__(__self__, *, :param pulumi.Input[str] product: Specifies the product of the image from the marketplace. :param pulumi.Input[str] publisher: Specifies the publisher of the image. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + ScaleSetPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + product: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -6620,14 +8924,39 @@ def __init__(__self__, *, :param pulumi.Input[int] max_unhealthy_upgraded_instance_percent: The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. Defaults to `20`. :param pulumi.Input[str] pause_time_between_batches: The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format for duration (). Defaults to `0` seconds represented as `PT0S`. """ + ScaleSetRollingUpgradePolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_batch_instance_percent=max_batch_instance_percent, + max_unhealthy_instance_percent=max_unhealthy_instance_percent, + max_unhealthy_upgraded_instance_percent=max_unhealthy_upgraded_instance_percent, + pause_time_between_batches=pause_time_between_batches, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_batch_instance_percent: Optional[pulumi.Input[int]] = None, + max_unhealthy_instance_percent: Optional[pulumi.Input[int]] = None, + max_unhealthy_upgraded_instance_percent: Optional[pulumi.Input[int]] = None, + pause_time_between_batches: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_batch_instance_percent is None and 'maxBatchInstancePercent' in kwargs: + max_batch_instance_percent = kwargs['maxBatchInstancePercent'] + if max_unhealthy_instance_percent is None and 'maxUnhealthyInstancePercent' in kwargs: + max_unhealthy_instance_percent = kwargs['maxUnhealthyInstancePercent'] + if max_unhealthy_upgraded_instance_percent is None and 'maxUnhealthyUpgradedInstancePercent' in kwargs: + max_unhealthy_upgraded_instance_percent = kwargs['maxUnhealthyUpgradedInstancePercent'] + if pause_time_between_batches is None and 'pauseTimeBetweenBatches' in kwargs: + pause_time_between_batches = kwargs['pauseTimeBetweenBatches'] + if max_batch_instance_percent is not None: - pulumi.set(__self__, "max_batch_instance_percent", max_batch_instance_percent) + _setter("max_batch_instance_percent", max_batch_instance_percent) if max_unhealthy_instance_percent is not None: - pulumi.set(__self__, "max_unhealthy_instance_percent", max_unhealthy_instance_percent) + _setter("max_unhealthy_instance_percent", max_unhealthy_instance_percent) if max_unhealthy_upgraded_instance_percent is not None: - pulumi.set(__self__, "max_unhealthy_upgraded_instance_percent", max_unhealthy_upgraded_instance_percent) + _setter("max_unhealthy_upgraded_instance_percent", max_unhealthy_upgraded_instance_percent) if pause_time_between_batches is not None: - pulumi.set(__self__, "pause_time_between_batches", pause_time_between_batches) + _setter("pause_time_between_batches", pause_time_between_batches) @property @pulumi.getter(name="maxBatchInstancePercent") @@ -6689,10 +9018,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the size of virtual machines in a scale set. :param pulumi.Input[str] tier: Specifies the tier of virtual machines in a scale set. Possible values, `standard` or `basic`. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + ScaleSetSkuArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + tier=tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + tier: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("capacity", capacity) + _setter("name", name) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) @property @pulumi.getter @@ -6746,14 +9094,43 @@ def __init__(__self__, *, :param pulumi.Input[int] disk_size_gb: Specifies the size of the disk in GB. This element is required when creating an empty disk. :param pulumi.Input[str] managed_disk_type: Specifies the type of managed disk to create. Value must be either `Standard_LRS`, `StandardSSD_LRS` or `Premium_LRS`. """ - pulumi.set(__self__, "create_option", create_option) - pulumi.set(__self__, "lun", lun) + ScaleSetStorageProfileDataDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_option=create_option, + lun=lun, + caching=caching, + disk_size_gb=disk_size_gb, + managed_disk_type=managed_disk_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_option: Optional[pulumi.Input[str]] = None, + lun: Optional[pulumi.Input[int]] = None, + caching: Optional[pulumi.Input[str]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + managed_disk_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if create_option is None: + raise TypeError("Missing 'create_option' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if managed_disk_type is None and 'managedDiskType' in kwargs: + managed_disk_type = kwargs['managedDiskType'] + + _setter("create_option", create_option) + _setter("lun", lun) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if managed_disk_type is not None: - pulumi.set(__self__, "managed_disk_type", managed_disk_type) + _setter("managed_disk_type", managed_disk_type) @property @pulumi.getter(name="createOption") @@ -6831,16 +9208,35 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: Specifies the SKU of the image used to create the virtual machines. :param pulumi.Input[str] version: Specifies the version of the image used to create the virtual machines. """ + ScaleSetStorageProfileImageReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + offer: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if offer is not None: - pulumi.set(__self__, "offer", offer) + _setter("offer", offer) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -6924,19 +9320,52 @@ def __init__(__self__, *, :param pulumi.Input[str] os_type: Specifies the operating system Type, valid values are windows, Linux. :param pulumi.Input[Sequence[pulumi.Input[str]]] vhd_containers: Specifies the VHD URI. Cannot be used when `image` or `managed_disk_type` is specified. """ - pulumi.set(__self__, "create_option", create_option) + ScaleSetStorageProfileOsDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_option=create_option, + caching=caching, + image=image, + managed_disk_type=managed_disk_type, + name=name, + os_type=os_type, + vhd_containers=vhd_containers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_option: Optional[pulumi.Input[str]] = None, + caching: Optional[pulumi.Input[str]] = None, + image: Optional[pulumi.Input[str]] = None, + managed_disk_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + os_type: Optional[pulumi.Input[str]] = None, + vhd_containers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if create_option is None: + raise TypeError("Missing 'create_option' argument") + if managed_disk_type is None and 'managedDiskType' in kwargs: + managed_disk_type = kwargs['managedDiskType'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if vhd_containers is None and 'vhdContainers' in kwargs: + vhd_containers = kwargs['vhdContainers'] + + _setter("create_option", create_option) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if image is not None: - pulumi.set(__self__, "image", image) + _setter("image", image) if managed_disk_type is not None: - pulumi.set(__self__, "managed_disk_type", managed_disk_type) + _setter("managed_disk_type", managed_disk_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if vhd_containers is not None: - pulumi.set(__self__, "vhd_containers", vhd_containers) + _setter("vhd_containers", vhd_containers) @property @pulumi.getter(name="createOption") @@ -7038,9 +9467,26 @@ def __init__(__self__, *, > **NOTE:** `community_gallery` must be set when `permission` is set to `Community`. """ - pulumi.set(__self__, "permission", permission) + SharedImageGallerySharingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + permission=permission, + community_gallery=community_gallery, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + permission: Optional[pulumi.Input[str]] = None, + community_gallery: Optional[pulumi.Input['SharedImageGallerySharingCommunityGalleryArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if permission is None: + raise TypeError("Missing 'permission' argument") + if community_gallery is None and 'communityGallery' in kwargs: + community_gallery = kwargs['communityGallery'] + + _setter("permission", permission) if community_gallery is not None: - pulumi.set(__self__, "community_gallery", community_gallery) + _setter("community_gallery", community_gallery) @property @pulumi.getter @@ -7086,12 +9532,43 @@ def __init__(__self__, *, :param pulumi.Input[str] publisher_uri: URI of the publisher for the Shared Image Gallery. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the Shared Image Gallery. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "eula", eula) - pulumi.set(__self__, "prefix", prefix) - pulumi.set(__self__, "publisher_email", publisher_email) - pulumi.set(__self__, "publisher_uri", publisher_uri) + SharedImageGallerySharingCommunityGalleryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + eula=eula, + prefix=prefix, + publisher_email=publisher_email, + publisher_uri=publisher_uri, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eula: Optional[pulumi.Input[str]] = None, + prefix: Optional[pulumi.Input[str]] = None, + publisher_email: Optional[pulumi.Input[str]] = None, + publisher_uri: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eula is None: + raise TypeError("Missing 'eula' argument") + if prefix is None: + raise TypeError("Missing 'prefix' argument") + if publisher_email is None and 'publisherEmail' in kwargs: + publisher_email = kwargs['publisherEmail'] + if publisher_email is None: + raise TypeError("Missing 'publisher_email' argument") + if publisher_uri is None and 'publisherUri' in kwargs: + publisher_uri = kwargs['publisherUri'] + if publisher_uri is None: + raise TypeError("Missing 'publisher_uri' argument") + + _setter("eula", eula) + _setter("prefix", prefix) + _setter("publisher_email", publisher_email) + _setter("publisher_uri", publisher_uri) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -7165,9 +9642,30 @@ def __init__(__self__, *, :param pulumi.Input[str] publisher: The Publisher Name for this Gallery Image. Changing this forces a new resource to be created. :param pulumi.Input[str] sku: The Name of the SKU for this Gallery Image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) + SharedImageIdentifierArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) @property @pulumi.getter @@ -7217,11 +9715,28 @@ def __init__(__self__, *, :param pulumi.Input[str] product: The Purchase Plan Product for this Gallery Image. Changing this forces a new resource to be created. :param pulumi.Input[str] publisher: The Purchase Plan Publisher for this Gallery Image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + SharedImagePurchasePlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + product: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if product is not None: - pulumi.set(__self__, "product", product) + _setter("product", product) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) @property @pulumi.getter @@ -7275,14 +9790,45 @@ def __init__(__self__, *, :param pulumi.Input[bool] exclude_from_latest_enabled: Specifies whether this Shared Image Version should be excluded when querying for the `latest` version. Defaults to `false`. :param pulumi.Input[str] storage_account_type: The storage account type for the image version. Possible values are `Standard_LRS`, `Premium_LRS` and `Standard_ZRS`. Defaults to `Standard_LRS`. You can store all of your image version replicas in Zone Redundant Storage by specifying `Standard_ZRS`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "regional_replica_count", regional_replica_count) + SharedImageVersionTargetRegionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + regional_replica_count=regional_replica_count, + disk_encryption_set_id=disk_encryption_set_id, + exclude_from_latest_enabled=exclude_from_latest_enabled, + storage_account_type=storage_account_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + regional_replica_count: Optional[pulumi.Input[int]] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + exclude_from_latest_enabled: Optional[pulumi.Input[bool]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if regional_replica_count is None and 'regionalReplicaCount' in kwargs: + regional_replica_count = kwargs['regionalReplicaCount'] + if regional_replica_count is None: + raise TypeError("Missing 'regional_replica_count' argument") + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if exclude_from_latest_enabled is None and 'excludeFromLatestEnabled' in kwargs: + exclude_from_latest_enabled = kwargs['excludeFromLatestEnabled'] + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + + _setter("name", name) + _setter("regional_replica_count", regional_replica_count) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if exclude_from_latest_enabled is not None: - pulumi.set(__self__, "exclude_from_latest_enabled", exclude_from_latest_enabled) + _setter("exclude_from_latest_enabled", exclude_from_latest_enabled) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) @property @pulumi.getter @@ -7355,15 +9901,34 @@ def __init__(__self__, *, :param pulumi.Input['SnapshotEncryptionSettingsDiskEncryptionKeyArgs'] disk_encryption_key: A `disk_encryption_key` block as defined below. :param pulumi.Input['SnapshotEncryptionSettingsKeyEncryptionKeyArgs'] key_encryption_key: A `key_encryption_key` block as defined below. """ + SnapshotEncryptionSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_encryption_key=disk_encryption_key, + enabled=enabled, + key_encryption_key=key_encryption_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_encryption_key: Optional[pulumi.Input['SnapshotEncryptionSettingsDiskEncryptionKeyArgs']] = None, + enabled: Optional[pulumi.Input[bool]] = None, + key_encryption_key: Optional[pulumi.Input['SnapshotEncryptionSettingsKeyEncryptionKeyArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_encryption_key is None and 'diskEncryptionKey' in kwargs: + disk_encryption_key = kwargs['diskEncryptionKey'] + if key_encryption_key is None and 'keyEncryptionKey' in kwargs: + key_encryption_key = kwargs['keyEncryptionKey'] + if disk_encryption_key is not None: - pulumi.set(__self__, "disk_encryption_key", disk_encryption_key) + _setter("disk_encryption_key", disk_encryption_key) if enabled is not None: warnings.warn("""Deprecated, Azure Disk Encryption is now configured directly by `disk_encryption_key` and `key_encryption_key`. To disable Azure Disk Encryption, please remove `encryption_settings` block. To enabled, specify a `encryption_settings` block`""", DeprecationWarning) pulumi.log.warn("""enabled is deprecated: Deprecated, Azure Disk Encryption is now configured directly by `disk_encryption_key` and `key_encryption_key`. To disable Azure Disk Encryption, please remove `encryption_settings` block. To enabled, specify a `encryption_settings` block`""") if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if key_encryption_key is not None: - pulumi.set(__self__, "key_encryption_key", key_encryption_key) + _setter("key_encryption_key", key_encryption_key) @property @pulumi.getter(name="diskEncryptionKey") @@ -7411,8 +9976,29 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_url: The URL to the Key Vault Secret used as the Disk Encryption Key. This can be found as `id` on the `keyvault.Secret` resource. :param pulumi.Input[str] source_vault_id: The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + SnapshotEncryptionSettingsDiskEncryptionKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[pulumi.Input[str]] = None, + source_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -7448,8 +10034,29 @@ def __init__(__self__, *, :param pulumi.Input[str] key_url: The URL to the Key Vault Key used as the Key Encryption Key. This can be found as `id` on the `keyvault.Key` resource. :param pulumi.Input[str] source_vault_id: The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. """ - pulumi.set(__self__, "key_url", key_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + SnapshotEncryptionSettingsKeyEncryptionKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_url=key_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_url: Optional[pulumi.Input[str]] = None, + source_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_url is None and 'keyUrl' in kwargs: + key_url = kwargs['keyUrl'] + if key_url is None: + raise TypeError("Missing 'key_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("key_url", key_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="keyUrl") @@ -7485,7 +10092,22 @@ def __init__(__self__, *, > **Note:** Azure Ultra Disk Storage is only available in a region that support availability zones and can only enabled on the following VM series: `ESv3`, `DSv3`, `FSv3`, `LSv2`, `M` and `Mv2`. For more information see the `Azure Ultra Disk Storage` [product documentation](https://docs.microsoft.com/azure/virtual-machines/windows/disks-enable-ultra-ssd). """ - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + VirtualMachineAdditionalCapabilitiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ultra_ssd_enabled=ultra_ssd_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ultra_ssd_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if ultra_ssd_enabled is None: + raise TypeError("Missing 'ultra_ssd_enabled' argument") + + _setter("ultra_ssd_enabled", ultra_ssd_enabled) @property @pulumi.getter(name="ultraSsdEnabled") @@ -7513,8 +10135,27 @@ def __init__(__self__, *, > **NOTE:** This needs to be the root of a Storage Account and not a Storage Container. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "storage_uri", storage_uri) + VirtualMachineBootDiagnosticsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + storage_uri=storage_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + storage_uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if storage_uri is None and 'storageUri' in kwargs: + storage_uri = kwargs['storageUri'] + if storage_uri is None: + raise TypeError("Missing 'storage_uri' argument") + + _setter("enabled", enabled) + _setter("storage_uri", storage_uri) @property @pulumi.getter @@ -7560,11 +10201,32 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + VirtualMachineIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) @property @pulumi.getter @@ -7624,12 +10286,41 @@ def __init__(__self__, *, > **NOTE:** If using Linux, it may be preferable to use SSH Key authentication (available in the `os_profile_linux_config` block) instead of password authentication. :param pulumi.Input[str] custom_data: Specifies custom data to supply to the machine. On Linux-based systems, this can be used as a cloud-init script. On other systems, this will be copied as a file on disk. Internally, this provider will base64 encode this value before sending it to the API. The maximum length of the binary array is 65535 bytes. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "admin_username", admin_username) - pulumi.set(__self__, "computer_name", computer_name) + VirtualMachineOsProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + computer_name=computer_name, + admin_password=admin_password, + custom_data=custom_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[pulumi.Input[str]] = None, + computer_name: Optional[pulumi.Input[str]] = None, + admin_password: Optional[pulumi.Input[str]] = None, + custom_data: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if computer_name is None and 'computerName' in kwargs: + computer_name = kwargs['computerName'] + if computer_name is None: + raise TypeError("Missing 'computer_name' argument") + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + + _setter("admin_username", admin_username) + _setter("computer_name", computer_name) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) @property @pulumi.getter(name="adminUsername") @@ -7691,9 +10382,28 @@ def __init__(__self__, *, :param pulumi.Input[bool] disable_password_authentication: Specifies whether password authentication should be disabled. If set to `false`, an `admin_password` must be specified. :param pulumi.Input[Sequence[pulumi.Input['VirtualMachineOsProfileLinuxConfigSshKeyArgs']]] ssh_keys: One or more `ssh_keys` blocks as defined below. This field is required if `disable_password_authentication` is set to `true`. """ - pulumi.set(__self__, "disable_password_authentication", disable_password_authentication) + VirtualMachineOsProfileLinuxConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disable_password_authentication=disable_password_authentication, + ssh_keys=ssh_keys, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disable_password_authentication: Optional[pulumi.Input[bool]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineOsProfileLinuxConfigSshKeyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disable_password_authentication is None and 'disablePasswordAuthentication' in kwargs: + disable_password_authentication = kwargs['disablePasswordAuthentication'] + if disable_password_authentication is None: + raise TypeError("Missing 'disable_password_authentication' argument") + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + + _setter("disable_password_authentication", disable_password_authentication) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) @property @pulumi.getter(name="disablePasswordAuthentication") @@ -7733,8 +10443,27 @@ def __init__(__self__, *, > **NOTE:** Due to a limitation in the Azure VM Agent the only allowed `path` is `/home/{username}/.ssh/authorized_keys`. """ - pulumi.set(__self__, "key_data", key_data) - pulumi.set(__self__, "path", path) + VirtualMachineOsProfileLinuxConfigSshKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_data=key_data, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_data: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_data is None and 'keyData' in kwargs: + key_data = kwargs['keyData'] + if key_data is None: + raise TypeError("Missing 'key_data' argument") + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("key_data", key_data) + _setter("path", path) @property @pulumi.getter(name="keyData") @@ -7774,9 +10503,28 @@ def __init__(__self__, *, :param pulumi.Input[str] source_vault_id: Specifies the ID of the Key Vault to use. :param pulumi.Input[Sequence[pulumi.Input['VirtualMachineOsProfileSecretVaultCertificateArgs']]] vault_certificates: One or more `vault_certificates` blocks as defined below. """ - pulumi.set(__self__, "source_vault_id", source_vault_id) + VirtualMachineOsProfileSecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + source_vault_id=source_vault_id, + vault_certificates=vault_certificates, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + source_vault_id: Optional[pulumi.Input[str]] = None, + vault_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineOsProfileSecretVaultCertificateArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + if vault_certificates is None and 'vaultCertificates' in kwargs: + vault_certificates = kwargs['vaultCertificates'] + + _setter("source_vault_id", source_vault_id) if vault_certificates is not None: - pulumi.set(__self__, "vault_certificates", vault_certificates) + _setter("vault_certificates", vault_certificates) @property @pulumi.getter(name="sourceVaultId") @@ -7815,9 +10563,28 @@ def __init__(__self__, *, > **NOTE:** If your certificate is stored in Azure Key Vault - this can be sourced from the `secret_id` property on the `keyvault.Certificate` resource. :param pulumi.Input[str] certificate_store: (Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to, such as `My`. """ - pulumi.set(__self__, "certificate_url", certificate_url) + VirtualMachineOsProfileSecretVaultCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_url=certificate_url, + certificate_store=certificate_store, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_url: Optional[pulumi.Input[str]] = None, + certificate_store: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + if certificate_url is None: + raise TypeError("Missing 'certificate_url' argument") + if certificate_store is None and 'certificateStore' in kwargs: + certificate_store = kwargs['certificateStore'] + + _setter("certificate_url", certificate_url) if certificate_store is not None: - pulumi.set(__self__, "certificate_store", certificate_store) + _setter("certificate_store", certificate_store) @property @pulumi.getter(name="certificateUrl") @@ -7864,16 +10631,41 @@ def __init__(__self__, *, :param pulumi.Input[str] timezone: Specifies the time zone of the virtual machine, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['VirtualMachineOsProfileWindowsConfigWinrmArgs']]] winrms: One or more `winrm` blocks as defined below. """ + VirtualMachineOsProfileWindowsConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_unattend_configs=additional_unattend_configs, + enable_automatic_upgrades=enable_automatic_upgrades, + provision_vm_agent=provision_vm_agent, + timezone=timezone, + winrms=winrms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_unattend_configs: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineOsProfileWindowsConfigAdditionalUnattendConfigArgs']]]] = None, + enable_automatic_upgrades: Optional[pulumi.Input[bool]] = None, + provision_vm_agent: Optional[pulumi.Input[bool]] = None, + timezone: Optional[pulumi.Input[str]] = None, + winrms: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineOsProfileWindowsConfigWinrmArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_unattend_configs is None and 'additionalUnattendConfigs' in kwargs: + additional_unattend_configs = kwargs['additionalUnattendConfigs'] + if enable_automatic_upgrades is None and 'enableAutomaticUpgrades' in kwargs: + enable_automatic_upgrades = kwargs['enableAutomaticUpgrades'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if additional_unattend_configs is not None: - pulumi.set(__self__, "additional_unattend_configs", additional_unattend_configs) + _setter("additional_unattend_configs", additional_unattend_configs) if enable_automatic_upgrades is not None: - pulumi.set(__self__, "enable_automatic_upgrades", enable_automatic_upgrades) + _setter("enable_automatic_upgrades", enable_automatic_upgrades) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) if winrms is not None: - pulumi.set(__self__, "winrms", winrms) + _setter("winrms", winrms) @property @pulumi.getter(name="additionalUnattendConfigs") @@ -7951,10 +10743,39 @@ def __init__(__self__, *, :param pulumi.Input[str] pass_: Specifies the name of the pass that the content applies to. The only allowable value is `oobeSystem`. :param pulumi.Input[str] setting_name: Specifies the name of the setting to which the content applies. Possible values are: `FirstLogonCommands` and `AutoLogon`. """ - pulumi.set(__self__, "component", component) - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "pass_", pass_) - pulumi.set(__self__, "setting_name", setting_name) + VirtualMachineOsProfileWindowsConfigAdditionalUnattendConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + component=component, + content=content, + pass_=pass_, + setting_name=setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + component: Optional[pulumi.Input[str]] = None, + content: Optional[pulumi.Input[str]] = None, + pass_: Optional[pulumi.Input[str]] = None, + setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if component is None: + raise TypeError("Missing 'component' argument") + if content is None: + raise TypeError("Missing 'content' argument") + if pass_ is None and 'pass' in kwargs: + pass_ = kwargs['pass'] + if pass_ is None: + raise TypeError("Missing 'pass_' argument") + if setting_name is None and 'settingName' in kwargs: + setting_name = kwargs['settingName'] + if setting_name is None: + raise TypeError("Missing 'setting_name' argument") + + _setter("component", component) + _setter("content", content) + _setter("pass_", pass_) + _setter("setting_name", setting_name) @property @pulumi.getter @@ -8016,9 +10837,26 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field on the `keyvault.Certificate` resource. """ - pulumi.set(__self__, "protocol", protocol) + VirtualMachineOsProfileWindowsConfigWinrmArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + certificate_url=certificate_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[pulumi.Input[str]] = None, + certificate_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + + _setter("protocol", protocol) if certificate_url is not None: - pulumi.set(__self__, "certificate_url", certificate_url) + _setter("certificate_url", certificate_url) @property @pulumi.getter @@ -8058,9 +10896,30 @@ def __init__(__self__, *, :param pulumi.Input[str] product: Specifies the product of the image from the marketplace. :param pulumi.Input[str] publisher: Specifies the publisher of the image. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + VirtualMachinePlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + product: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -8108,8 +10967,29 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_url: The URL to the Key Vault Secret which stores the protected settings. :param pulumi.Input[str] source_vault_id: The ID of the source Key Vault. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[pulumi.Input[str]] = None, + source_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -8167,21 +11047,66 @@ def __init__(__self__, *, The following properties apply when using Managed Disks: """ - pulumi.set(__self__, "create_option", create_option) - pulumi.set(__self__, "lun", lun) - pulumi.set(__self__, "name", name) + VirtualMachineStorageDataDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_option=create_option, + lun=lun, + name=name, + caching=caching, + disk_size_gb=disk_size_gb, + managed_disk_id=managed_disk_id, + managed_disk_type=managed_disk_type, + vhd_uri=vhd_uri, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_option: Optional[pulumi.Input[str]] = None, + lun: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + caching: Optional[pulumi.Input[str]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + managed_disk_id: Optional[pulumi.Input[str]] = None, + managed_disk_type: Optional[pulumi.Input[str]] = None, + vhd_uri: Optional[pulumi.Input[str]] = None, + write_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if create_option is None: + raise TypeError("Missing 'create_option' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if managed_disk_type is None and 'managedDiskType' in kwargs: + managed_disk_type = kwargs['managedDiskType'] + if vhd_uri is None and 'vhdUri' in kwargs: + vhd_uri = kwargs['vhdUri'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("create_option", create_option) + _setter("lun", lun) + _setter("name", name) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if managed_disk_id is not None: - pulumi.set(__self__, "managed_disk_id", managed_disk_id) + _setter("managed_disk_id", managed_disk_id) if managed_disk_type is not None: - pulumi.set(__self__, "managed_disk_type", managed_disk_type) + _setter("managed_disk_type", managed_disk_type) if vhd_uri is not None: - pulumi.set(__self__, "vhd_uri", vhd_uri) + _setter("vhd_uri", vhd_uri) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter(name="createOption") @@ -8317,16 +11242,35 @@ def __init__(__self__, *, To provision a Custom Image, the following fields are applicable: """ + VirtualMachineStorageImageReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + offer: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if offer is not None: - pulumi.set(__self__, "offer", offer) + _setter("offer", offer) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -8420,24 +11364,73 @@ def __init__(__self__, *, The following properties apply when using Managed Disks: """ - pulumi.set(__self__, "create_option", create_option) - pulumi.set(__self__, "name", name) + VirtualMachineStorageOsDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_option=create_option, + name=name, + caching=caching, + disk_size_gb=disk_size_gb, + image_uri=image_uri, + managed_disk_id=managed_disk_id, + managed_disk_type=managed_disk_type, + os_type=os_type, + vhd_uri=vhd_uri, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_option: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + caching: Optional[pulumi.Input[str]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + image_uri: Optional[pulumi.Input[str]] = None, + managed_disk_id: Optional[pulumi.Input[str]] = None, + managed_disk_type: Optional[pulumi.Input[str]] = None, + os_type: Optional[pulumi.Input[str]] = None, + vhd_uri: Optional[pulumi.Input[str]] = None, + write_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if create_option is None: + raise TypeError("Missing 'create_option' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if image_uri is None and 'imageUri' in kwargs: + image_uri = kwargs['imageUri'] + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if managed_disk_type is None and 'managedDiskType' in kwargs: + managed_disk_type = kwargs['managedDiskType'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if vhd_uri is None and 'vhdUri' in kwargs: + vhd_uri = kwargs['vhdUri'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("create_option", create_option) + _setter("name", name) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if image_uri is not None: - pulumi.set(__self__, "image_uri", image_uri) + _setter("image_uri", image_uri) if managed_disk_id is not None: - pulumi.set(__self__, "managed_disk_id", managed_disk_id) + _setter("managed_disk_id", managed_disk_id) if managed_disk_type is not None: - pulumi.set(__self__, "managed_disk_type", managed_disk_type) + _setter("managed_disk_type", managed_disk_type) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if vhd_uri is not None: - pulumi.set(__self__, "vhd_uri", vhd_uri) + _setter("vhd_uri", vhd_uri) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter(name="createOption") @@ -8571,8 +11564,21 @@ def __init__(__self__, *, """ :param pulumi.Input[bool] ultra_ssd_enabled: Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Virtual Machine? Defaults to `false`. """ + WindowsVirtualMachineAdditionalCapabilitiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ultra_ssd_enabled=ultra_ssd_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ultra_ssd_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) @property @pulumi.getter(name="ultraSsdEnabled") @@ -8596,8 +11602,25 @@ def __init__(__self__, *, :param pulumi.Input[str] content: The XML formatted content that is added to the unattend.xml file for the specified path and component. Changing this forces a new resource to be created. :param pulumi.Input[str] setting: The name of the setting to which the content applies. Possible values are `AutoLogon` and `FirstLogonCommands`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "setting", setting) + WindowsVirtualMachineAdditionalUnattendContentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + setting=setting, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + setting: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if setting is None: + raise TypeError("Missing 'setting' argument") + + _setter("content", content) + _setter("setting", setting) @property @pulumi.getter @@ -8633,8 +11656,21 @@ def __init__(__self__, *, > **NOTE:** Passing a null value will utilize a Managed Storage Account to store Boot Diagnostics. """ + WindowsVirtualMachineBootDiagnosticsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_uri=storage_account_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_uri is None and 'storageAccountUri' in kwargs: + storage_account_uri = kwargs['storageAccountUri'] + if storage_account_uri is not None: - pulumi.set(__self__, "storage_account_uri", storage_account_uri) + _setter("storage_account_uri", storage_account_uri) @property @pulumi.getter(name="storageAccountUri") @@ -8664,13 +11700,36 @@ def __init__(__self__, *, :param pulumi.Input[int] order: Specifies the order in which the packages have to be installed. Possible values are between `0` and `2,147,483,647`. :param pulumi.Input[str] tag: Specifies a passthrough value for more generic context. This field can be any valid `string` value. """ - pulumi.set(__self__, "version_id", version_id) + WindowsVirtualMachineGalleryApplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + version_id=version_id, + configuration_blob_uri=configuration_blob_uri, + order=order, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + version_id: Optional[pulumi.Input[str]] = None, + configuration_blob_uri: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + tag: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if version_id is None and 'versionId' in kwargs: + version_id = kwargs['versionId'] + if version_id is None: + raise TypeError("Missing 'version_id' argument") + if configuration_blob_uri is None and 'configurationBlobUri' in kwargs: + configuration_blob_uri = kwargs['configurationBlobUri'] + + _setter("version_id", version_id) if configuration_blob_uri is not None: - pulumi.set(__self__, "configuration_blob_uri", configuration_blob_uri) + _setter("configuration_blob_uri", configuration_blob_uri) if order is not None: - pulumi.set(__self__, "order", order) + _setter("order", order) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter(name="versionId") @@ -8736,13 +11795,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WindowsVirtualMachineIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -8832,22 +11916,67 @@ def __init__(__self__, *, > **NOTE:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "storage_account_type", storage_account_type) + WindowsVirtualMachineOsDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + storage_account_type=storage_account_type, + diff_disk_settings=diff_disk_settings, + disk_encryption_set_id=disk_encryption_set_id, + disk_size_gb=disk_size_gb, + name=name, + secure_vm_disk_encryption_set_id=secure_vm_disk_encryption_set_id, + security_encryption_type=security_encryption_type, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[pulumi.Input[str]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + diff_disk_settings: Optional[pulumi.Input['WindowsVirtualMachineOsDiskDiffDiskSettingsArgs']] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + secure_vm_disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + security_encryption_type: Optional[pulumi.Input[str]] = None, + write_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if diff_disk_settings is None and 'diffDiskSettings' in kwargs: + diff_disk_settings = kwargs['diffDiskSettings'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if secure_vm_disk_encryption_set_id is None and 'secureVmDiskEncryptionSetId' in kwargs: + secure_vm_disk_encryption_set_id = kwargs['secureVmDiskEncryptionSetId'] + if security_encryption_type is None and 'securityEncryptionType' in kwargs: + security_encryption_type = kwargs['securityEncryptionType'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("storage_account_type", storage_account_type) if diff_disk_settings is not None: - pulumi.set(__self__, "diff_disk_settings", diff_disk_settings) + _setter("diff_disk_settings", diff_disk_settings) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if secure_vm_disk_encryption_set_id is not None: - pulumi.set(__self__, "secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) + _setter("secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) if security_encryption_type is not None: - pulumi.set(__self__, "security_encryption_type", security_encryption_type) + _setter("security_encryption_type", security_encryption_type) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -8981,9 +12110,24 @@ def __init__(__self__, *, :param pulumi.Input[str] option: Specifies the Ephemeral Disk Settings for the OS Disk. At this time the only possible value is `Local`. Changing this forces a new resource to be created. :param pulumi.Input[str] placement: Specifies where to store the Ephemeral Disk. Possible values are `CacheDisk` and `ResourceDisk`. Defaults to `CacheDisk`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "option", option) + WindowsVirtualMachineOsDiskDiffDiskSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + option=option, + placement=placement, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + option: Optional[pulumi.Input[str]] = None, + placement: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if option is None: + raise TypeError("Missing 'option' argument") + + _setter("option", option) if placement is not None: - pulumi.set(__self__, "placement", placement) + _setter("placement", placement) @property @pulumi.getter @@ -9023,9 +12167,30 @@ def __init__(__self__, *, > **NOTE:** If you use the `plan` block with one of Microsoft's marketplace images (e.g. `publisher = "MicrosoftWindowsServer"`). This may prevent the purchase of the offer. An example Azure API error: `The Offer: 'WindowsServer' cannot be purchased by subscription: '12345678-12234-5678-9012-123456789012' as it is not to be sold in market: 'US'. Please choose a subscription which is associated with a different market.` """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + WindowsVirtualMachinePlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + product: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -9073,8 +12238,21 @@ def __init__(__self__, *, """ :param pulumi.Input[bool] ultra_ssd_enabled: Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Virtual Machine Scale Set? Possible values are `true` or `false`. Defaults to `false`. Changing this forces a new resource to be created. """ + WindowsVirtualMachineScaleSetAdditionalCapabilitiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ultra_ssd_enabled=ultra_ssd_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ultra_ssd_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) @property @pulumi.getter(name="ultraSsdEnabled") @@ -9098,8 +12276,25 @@ def __init__(__self__, *, :param pulumi.Input[str] content: The XML formatted content that is added to the unattend.xml file for the specified path and component. Changing this forces a new resource to be created. :param pulumi.Input[str] setting: The name of the setting to which the content applies. Possible values are `AutoLogon` and `FirstLogonCommands`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "setting", setting) + WindowsVirtualMachineScaleSetAdditionalUnattendContentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + setting=setting, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + setting: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if setting is None: + raise TypeError("Missing 'setting' argument") + + _setter("content", content) + _setter("setting", setting) @property @pulumi.getter @@ -9135,9 +12330,26 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Should the automatic instance repair be enabled on this Virtual Machine Scale Set? :param pulumi.Input[str] grace_period: Amount of time (in minutes, between 30 and 90, defaults to 30 minutes) for which automatic repairs will be delayed. The grace period starts right after the VM is found unhealthy. The time duration should be specified in ISO 8601 format. Defaults to `PT30M`. """ - pulumi.set(__self__, "enabled", enabled) + WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + grace_period=grace_period, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + grace_period: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if grace_period is None and 'gracePeriod' in kwargs: + grace_period = kwargs['gracePeriod'] + + _setter("enabled", enabled) if grace_period is not None: - pulumi.set(__self__, "grace_period", grace_period) + _setter("grace_period", grace_period) @property @pulumi.getter @@ -9173,8 +12385,29 @@ def __init__(__self__, *, :param pulumi.Input[bool] disable_automatic_rollback: Should automatic rollbacks be disabled? :param pulumi.Input[bool] enable_automatic_os_upgrade: Should OS Upgrades automatically be applied to Scale Set instances in a rolling fashion when a newer version of the OS Image becomes available? """ - pulumi.set(__self__, "disable_automatic_rollback", disable_automatic_rollback) - pulumi.set(__self__, "enable_automatic_os_upgrade", enable_automatic_os_upgrade) + WindowsVirtualMachineScaleSetAutomaticOsUpgradePolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disable_automatic_rollback=disable_automatic_rollback, + enable_automatic_os_upgrade=enable_automatic_os_upgrade, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disable_automatic_rollback: Optional[pulumi.Input[bool]] = None, + enable_automatic_os_upgrade: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disable_automatic_rollback is None and 'disableAutomaticRollback' in kwargs: + disable_automatic_rollback = kwargs['disableAutomaticRollback'] + if disable_automatic_rollback is None: + raise TypeError("Missing 'disable_automatic_rollback' argument") + if enable_automatic_os_upgrade is None and 'enableAutomaticOsUpgrade' in kwargs: + enable_automatic_os_upgrade = kwargs['enableAutomaticOsUpgrade'] + if enable_automatic_os_upgrade is None: + raise TypeError("Missing 'enable_automatic_os_upgrade' argument") + + _setter("disable_automatic_rollback", disable_automatic_rollback) + _setter("enable_automatic_os_upgrade", enable_automatic_os_upgrade) @property @pulumi.getter(name="disableAutomaticRollback") @@ -9210,8 +12443,21 @@ def __init__(__self__, *, > **NOTE:** Passing a null value will utilize a Managed Storage Account to store Boot Diagnostics """ + WindowsVirtualMachineScaleSetBootDiagnosticsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_uri=storage_account_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_uri is None and 'storageAccountUri' in kwargs: + storage_account_uri = kwargs['storageAccountUri'] + if storage_account_uri is not None: - pulumi.set(__self__, "storage_account_uri", storage_account_uri) + _setter("storage_account_uri", storage_account_uri) @property @pulumi.getter(name="storageAccountUri") @@ -9261,22 +12507,73 @@ def __init__(__self__, *, > **NOTE:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "disk_size_gb", disk_size_gb) - pulumi.set(__self__, "lun", lun) - pulumi.set(__self__, "storage_account_type", storage_account_type) + WindowsVirtualMachineScaleSetDataDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + disk_size_gb=disk_size_gb, + lun=lun, + storage_account_type=storage_account_type, + create_option=create_option, + disk_encryption_set_id=disk_encryption_set_id, + name=name, + ultra_ssd_disk_iops_read_write=ultra_ssd_disk_iops_read_write, + ultra_ssd_disk_mbps_read_write=ultra_ssd_disk_mbps_read_write, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[pulumi.Input[str]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + lun: Optional[pulumi.Input[int]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + create_option: Optional[pulumi.Input[str]] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + ultra_ssd_disk_iops_read_write: Optional[pulumi.Input[int]] = None, + ultra_ssd_disk_mbps_read_write: Optional[pulumi.Input[int]] = None, + write_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if disk_size_gb is None: + raise TypeError("Missing 'disk_size_gb' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if ultra_ssd_disk_iops_read_write is None and 'ultraSsdDiskIopsReadWrite' in kwargs: + ultra_ssd_disk_iops_read_write = kwargs['ultraSsdDiskIopsReadWrite'] + if ultra_ssd_disk_mbps_read_write is None and 'ultraSsdDiskMbpsReadWrite' in kwargs: + ultra_ssd_disk_mbps_read_write = kwargs['ultraSsdDiskMbpsReadWrite'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("disk_size_gb", disk_size_gb) + _setter("lun", lun) + _setter("storage_account_type", storage_account_type) if create_option is not None: - pulumi.set(__self__, "create_option", create_option) + _setter("create_option", create_option) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if ultra_ssd_disk_iops_read_write is not None: - pulumi.set(__self__, "ultra_ssd_disk_iops_read_write", ultra_ssd_disk_iops_read_write) + _setter("ultra_ssd_disk_iops_read_write", ultra_ssd_disk_iops_read_write) if ultra_ssd_disk_mbps_read_write is not None: - pulumi.set(__self__, "ultra_ssd_disk_mbps_read_write", ultra_ssd_disk_mbps_read_write) + _setter("ultra_ssd_disk_mbps_read_write", ultra_ssd_disk_mbps_read_write) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -9437,24 +12734,77 @@ def __init__(__self__, *, > **NOTE:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_handler_version", type_handler_version) + WindowsVirtualMachineScaleSetExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + publisher=publisher, + type=type, + type_handler_version=type_handler_version, + auto_upgrade_minor_version=auto_upgrade_minor_version, + automatic_upgrade_enabled=automatic_upgrade_enabled, + force_update_tag=force_update_tag, + protected_settings=protected_settings, + protected_settings_from_key_vault=protected_settings_from_key_vault, + provision_after_extensions=provision_after_extensions, + settings=settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + type_handler_version: Optional[pulumi.Input[str]] = None, + auto_upgrade_minor_version: Optional[pulumi.Input[bool]] = None, + automatic_upgrade_enabled: Optional[pulumi.Input[bool]] = None, + force_update_tag: Optional[pulumi.Input[str]] = None, + protected_settings: Optional[pulumi.Input[str]] = None, + protected_settings_from_key_vault: Optional[pulumi.Input['WindowsVirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultArgs']] = None, + provision_after_extensions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + settings: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if type_handler_version is None: + raise TypeError("Missing 'type_handler_version' argument") + if auto_upgrade_minor_version is None and 'autoUpgradeMinorVersion' in kwargs: + auto_upgrade_minor_version = kwargs['autoUpgradeMinorVersion'] + if automatic_upgrade_enabled is None and 'automaticUpgradeEnabled' in kwargs: + automatic_upgrade_enabled = kwargs['automaticUpgradeEnabled'] + if force_update_tag is None and 'forceUpdateTag' in kwargs: + force_update_tag = kwargs['forceUpdateTag'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if protected_settings_from_key_vault is None and 'protectedSettingsFromKeyVault' in kwargs: + protected_settings_from_key_vault = kwargs['protectedSettingsFromKeyVault'] + if provision_after_extensions is None and 'provisionAfterExtensions' in kwargs: + provision_after_extensions = kwargs['provisionAfterExtensions'] + + _setter("name", name) + _setter("publisher", publisher) + _setter("type", type) + _setter("type_handler_version", type_handler_version) if auto_upgrade_minor_version is not None: - pulumi.set(__self__, "auto_upgrade_minor_version", auto_upgrade_minor_version) + _setter("auto_upgrade_minor_version", auto_upgrade_minor_version) if automatic_upgrade_enabled is not None: - pulumi.set(__self__, "automatic_upgrade_enabled", automatic_upgrade_enabled) + _setter("automatic_upgrade_enabled", automatic_upgrade_enabled) if force_update_tag is not None: - pulumi.set(__self__, "force_update_tag", force_update_tag) + _setter("force_update_tag", force_update_tag) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if protected_settings_from_key_vault is not None: - pulumi.set(__self__, "protected_settings_from_key_vault", protected_settings_from_key_vault) + _setter("protected_settings_from_key_vault", protected_settings_from_key_vault) if provision_after_extensions is not None: - pulumi.set(__self__, "provision_after_extensions", provision_after_extensions) + _setter("provision_after_extensions", provision_after_extensions) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) @property @pulumi.getter @@ -9599,8 +12949,29 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_url: The URL to the Key Vault Secret which stores the protected settings. :param pulumi.Input[str] source_vault_id: The ID of the source Key Vault. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + WindowsVirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[pulumi.Input[str]] = None, + source_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -9638,19 +13009,42 @@ def __init__(__self__, *, :param pulumi.Input[int] order: Specifies the order in which the packages have to be installed. Possible values are between `0` and `2,147,483,647`. Changing this forces a new resource to be created. :param pulumi.Input[str] tag: Specifies a passthrough value for more generic context. This field can be any valid `string` value. Changing this forces a new resource to be created. """ + WindowsVirtualMachineScaleSetGalleryApplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + package_reference_id=package_reference_id, + configuration_reference_blob_uri=configuration_reference_blob_uri, + order=order, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + package_reference_id: Optional[pulumi.Input[str]] = None, + configuration_reference_blob_uri: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + tag: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if package_reference_id is None and 'packageReferenceId' in kwargs: + package_reference_id = kwargs['packageReferenceId'] + if package_reference_id is None: + raise TypeError("Missing 'package_reference_id' argument") + if configuration_reference_blob_uri is None and 'configurationReferenceBlobUri' in kwargs: + configuration_reference_blob_uri = kwargs['configurationReferenceBlobUri'] + if package_reference_id is not None: warnings.warn("""`package_reference_id` has been renamed to `version_id` and will be deprecated in 4.0""", DeprecationWarning) pulumi.log.warn("""package_reference_id is deprecated: `package_reference_id` has been renamed to `version_id` and will be deprecated in 4.0""") - pulumi.set(__self__, "package_reference_id", package_reference_id) + _setter("package_reference_id", package_reference_id) if configuration_reference_blob_uri is not None: warnings.warn("""`configuration_reference_blob_uri` has been renamed to `configuration_blob_uri` and will be deprecated in 4.0""", DeprecationWarning) pulumi.log.warn("""configuration_reference_blob_uri is deprecated: `configuration_reference_blob_uri` has been renamed to `configuration_blob_uri` and will be deprecated in 4.0""") if configuration_reference_blob_uri is not None: - pulumi.set(__self__, "configuration_reference_blob_uri", configuration_reference_blob_uri) + _setter("configuration_reference_blob_uri", configuration_reference_blob_uri) if order is not None: - pulumi.set(__self__, "order", order) + _setter("order", order) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter(name="packageReferenceId") @@ -9716,13 +13110,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WindowsVirtualMachineScaleSetIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -9796,18 +13215,55 @@ def __init__(__self__, *, > **NOTE:** If multiple `network_interface` blocks are specified, one must be set to `primary`. """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) + WindowsVirtualMachineScaleSetNetworkInterfaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + name=name, + dns_servers=dns_servers, + enable_accelerated_networking=enable_accelerated_networking, + enable_ip_forwarding=enable_ip_forwarding, + network_security_group_id=network_security_group_id, + primary=primary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enable_accelerated_networking: Optional[pulumi.Input[bool]] = None, + enable_ip_forwarding: Optional[pulumi.Input[bool]] = None, + network_security_group_id: Optional[pulumi.Input[str]] = None, + primary: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if enable_accelerated_networking is None and 'enableAcceleratedNetworking' in kwargs: + enable_accelerated_networking = kwargs['enableAcceleratedNetworking'] + if enable_ip_forwarding is None and 'enableIpForwarding' in kwargs: + enable_ip_forwarding = kwargs['enableIpForwarding'] + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + + _setter("ip_configurations", ip_configurations) + _setter("name", name) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if enable_accelerated_networking is not None: - pulumi.set(__self__, "enable_accelerated_networking", enable_accelerated_networking) + _setter("enable_accelerated_networking", enable_accelerated_networking) if enable_ip_forwarding is not None: - pulumi.set(__self__, "enable_ip_forwarding", enable_ip_forwarding) + _setter("enable_ip_forwarding", enable_ip_forwarding) if network_security_group_id is not None: - pulumi.set(__self__, "network_security_group_id", network_security_group_id) + _setter("network_security_group_id", network_security_group_id) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) @property @pulumi.getter(name="ipConfigurations") @@ -9929,23 +13385,64 @@ def __init__(__self__, *, > `subnet_id` is required if `version` is set to `IPv4`. :param pulumi.Input[str] version: The Internet Protocol Version which should be used for this IP Configuration. Possible values are `IPv4` and `IPv6`. Defaults to `IPv4`. """ - pulumi.set(__self__, "name", name) + WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + application_gateway_backend_address_pool_ids=application_gateway_backend_address_pool_ids, + application_security_group_ids=application_security_group_ids, + load_balancer_backend_address_pool_ids=load_balancer_backend_address_pool_ids, + load_balancer_inbound_nat_rules_ids=load_balancer_inbound_nat_rules_ids, + primary=primary, + public_ip_addresses=public_ip_addresses, + subnet_id=subnet_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + application_gateway_backend_address_pool_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + application_security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + load_balancer_backend_address_pool_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + load_balancer_inbound_nat_rules_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + primary: Optional[pulumi.Input[bool]] = None, + public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressArgs']]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if application_gateway_backend_address_pool_ids is None and 'applicationGatewayBackendAddressPoolIds' in kwargs: + application_gateway_backend_address_pool_ids = kwargs['applicationGatewayBackendAddressPoolIds'] + if application_security_group_ids is None and 'applicationSecurityGroupIds' in kwargs: + application_security_group_ids = kwargs['applicationSecurityGroupIds'] + if load_balancer_backend_address_pool_ids is None and 'loadBalancerBackendAddressPoolIds' in kwargs: + load_balancer_backend_address_pool_ids = kwargs['loadBalancerBackendAddressPoolIds'] + if load_balancer_inbound_nat_rules_ids is None and 'loadBalancerInboundNatRulesIds' in kwargs: + load_balancer_inbound_nat_rules_ids = kwargs['loadBalancerInboundNatRulesIds'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) if application_gateway_backend_address_pool_ids is not None: - pulumi.set(__self__, "application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) + _setter("application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) if application_security_group_ids is not None: - pulumi.set(__self__, "application_security_group_ids", application_security_group_ids) + _setter("application_security_group_ids", application_security_group_ids) if load_balancer_backend_address_pool_ids is not None: - pulumi.set(__self__, "load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) + _setter("load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) if load_balancer_inbound_nat_rules_ids is not None: - pulumi.set(__self__, "load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) + _setter("load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -10085,17 +13582,48 @@ def __init__(__self__, *, > **NOTE:** This functionality is in Preview and must be opted into via `az feature register --namespace Microsoft.Network --name AllowBringYourOwnPublicIpAddress` and then `az provider register -n Microsoft.Network`. :param pulumi.Input[str] version: The Internet Protocol Version which should be used for this public IP address. Possible values are `IPv4` and `IPv6`. Defaults to `IPv4`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + domain_name_label=domain_name_label, + idle_timeout_in_minutes=idle_timeout_in_minutes, + ip_tags=ip_tags, + public_ip_prefix_id=public_ip_prefix_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + domain_name_label: Optional[pulumi.Input[str]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + ip_tags: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTagArgs']]]] = None, + public_ip_prefix_id: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if domain_name_label is None and 'domainNameLabel' in kwargs: + domain_name_label = kwargs['domainNameLabel'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if ip_tags is None and 'ipTags' in kwargs: + ip_tags = kwargs['ipTags'] + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + + _setter("name", name) if domain_name_label is not None: - pulumi.set(__self__, "domain_name_label", domain_name_label) + _setter("domain_name_label", domain_name_label) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if ip_tags is not None: - pulumi.set(__self__, "ip_tags", ip_tags) + _setter("ip_tags", ip_tags) if public_ip_prefix_id is not None: - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) + _setter("public_ip_prefix_id", public_ip_prefix_id) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -10181,8 +13709,25 @@ def __init__(__self__, *, :param pulumi.Input[str] tag: The IP Tag associated with the Public IP, such as `SQL` or `Storage`. Changing this forces a new resource to be created. :param pulumi.Input[str] type: The Type of IP Tag, such as `FirstPartyUsage`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "type", type) + WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + tag=tag, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tag: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag is None: + raise TypeError("Missing 'tag' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("tag", tag) + _setter("type", type) @property @pulumi.getter @@ -10244,20 +13789,63 @@ def __init__(__self__, *, > **NOTE:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "storage_account_type", storage_account_type) + WindowsVirtualMachineScaleSetOsDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + storage_account_type=storage_account_type, + diff_disk_settings=diff_disk_settings, + disk_encryption_set_id=disk_encryption_set_id, + disk_size_gb=disk_size_gb, + secure_vm_disk_encryption_set_id=secure_vm_disk_encryption_set_id, + security_encryption_type=security_encryption_type, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[pulumi.Input[str]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + diff_disk_settings: Optional[pulumi.Input['WindowsVirtualMachineScaleSetOsDiskDiffDiskSettingsArgs']] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + secure_vm_disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + security_encryption_type: Optional[pulumi.Input[str]] = None, + write_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if diff_disk_settings is None and 'diffDiskSettings' in kwargs: + diff_disk_settings = kwargs['diffDiskSettings'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if secure_vm_disk_encryption_set_id is None and 'secureVmDiskEncryptionSetId' in kwargs: + secure_vm_disk_encryption_set_id = kwargs['secureVmDiskEncryptionSetId'] + if security_encryption_type is None and 'securityEncryptionType' in kwargs: + security_encryption_type = kwargs['securityEncryptionType'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("storage_account_type", storage_account_type) if diff_disk_settings is not None: - pulumi.set(__self__, "diff_disk_settings", diff_disk_settings) + _setter("diff_disk_settings", diff_disk_settings) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if secure_vm_disk_encryption_set_id is not None: - pulumi.set(__self__, "secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) + _setter("secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) if security_encryption_type is not None: - pulumi.set(__self__, "security_encryption_type", security_encryption_type) + _setter("security_encryption_type", security_encryption_type) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -10379,9 +13967,24 @@ def __init__(__self__, *, :param pulumi.Input[str] option: Specifies the Ephemeral Disk Settings for the OS Disk. At this time the only possible value is `Local`. Changing this forces a new resource to be created. :param pulumi.Input[str] placement: Specifies where to store the Ephemeral Disk. Possible values are `CacheDisk` and `ResourceDisk`. Defaults to `CacheDisk`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "option", option) + WindowsVirtualMachineScaleSetOsDiskDiffDiskSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + option=option, + placement=placement, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + option: Optional[pulumi.Input[str]] = None, + placement: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if option is None: + raise TypeError("Missing 'option' argument") + + _setter("option", option) if placement is not None: - pulumi.set(__self__, "placement", placement) + _setter("placement", placement) @property @pulumi.getter @@ -10419,9 +14022,30 @@ def __init__(__self__, *, :param pulumi.Input[str] product: Specifies the product of the image from the marketplace. Changing this forces a new resource to be created. :param pulumi.Input[str] publisher: Specifies the publisher of the image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + WindowsVirtualMachineScaleSetPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + product: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -10477,14 +14101,55 @@ def __init__(__self__, *, :param pulumi.Input[bool] cross_zone_upgrades_enabled: Should the Virtual Machine Scale Set ignore the Azure Zone boundaries when constructing upgrade batches? Possible values are `true` or `false`. :param pulumi.Input[bool] prioritize_unhealthy_instances_enabled: Upgrade all unhealthy instances in a scale set before any healthy instances. Possible values are `true` or `false`. """ - pulumi.set(__self__, "max_batch_instance_percent", max_batch_instance_percent) - pulumi.set(__self__, "max_unhealthy_instance_percent", max_unhealthy_instance_percent) - pulumi.set(__self__, "max_unhealthy_upgraded_instance_percent", max_unhealthy_upgraded_instance_percent) - pulumi.set(__self__, "pause_time_between_batches", pause_time_between_batches) + WindowsVirtualMachineScaleSetRollingUpgradePolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_batch_instance_percent=max_batch_instance_percent, + max_unhealthy_instance_percent=max_unhealthy_instance_percent, + max_unhealthy_upgraded_instance_percent=max_unhealthy_upgraded_instance_percent, + pause_time_between_batches=pause_time_between_batches, + cross_zone_upgrades_enabled=cross_zone_upgrades_enabled, + prioritize_unhealthy_instances_enabled=prioritize_unhealthy_instances_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_batch_instance_percent: Optional[pulumi.Input[int]] = None, + max_unhealthy_instance_percent: Optional[pulumi.Input[int]] = None, + max_unhealthy_upgraded_instance_percent: Optional[pulumi.Input[int]] = None, + pause_time_between_batches: Optional[pulumi.Input[str]] = None, + cross_zone_upgrades_enabled: Optional[pulumi.Input[bool]] = None, + prioritize_unhealthy_instances_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_batch_instance_percent is None and 'maxBatchInstancePercent' in kwargs: + max_batch_instance_percent = kwargs['maxBatchInstancePercent'] + if max_batch_instance_percent is None: + raise TypeError("Missing 'max_batch_instance_percent' argument") + if max_unhealthy_instance_percent is None and 'maxUnhealthyInstancePercent' in kwargs: + max_unhealthy_instance_percent = kwargs['maxUnhealthyInstancePercent'] + if max_unhealthy_instance_percent is None: + raise TypeError("Missing 'max_unhealthy_instance_percent' argument") + if max_unhealthy_upgraded_instance_percent is None and 'maxUnhealthyUpgradedInstancePercent' in kwargs: + max_unhealthy_upgraded_instance_percent = kwargs['maxUnhealthyUpgradedInstancePercent'] + if max_unhealthy_upgraded_instance_percent is None: + raise TypeError("Missing 'max_unhealthy_upgraded_instance_percent' argument") + if pause_time_between_batches is None and 'pauseTimeBetweenBatches' in kwargs: + pause_time_between_batches = kwargs['pauseTimeBetweenBatches'] + if pause_time_between_batches is None: + raise TypeError("Missing 'pause_time_between_batches' argument") + if cross_zone_upgrades_enabled is None and 'crossZoneUpgradesEnabled' in kwargs: + cross_zone_upgrades_enabled = kwargs['crossZoneUpgradesEnabled'] + if prioritize_unhealthy_instances_enabled is None and 'prioritizeUnhealthyInstancesEnabled' in kwargs: + prioritize_unhealthy_instances_enabled = kwargs['prioritizeUnhealthyInstancesEnabled'] + + _setter("max_batch_instance_percent", max_batch_instance_percent) + _setter("max_unhealthy_instance_percent", max_unhealthy_instance_percent) + _setter("max_unhealthy_upgraded_instance_percent", max_unhealthy_upgraded_instance_percent) + _setter("pause_time_between_batches", pause_time_between_batches) if cross_zone_upgrades_enabled is not None: - pulumi.set(__self__, "cross_zone_upgrades_enabled", cross_zone_upgrades_enabled) + _setter("cross_zone_upgrades_enabled", cross_zone_upgrades_enabled) if prioritize_unhealthy_instances_enabled is not None: - pulumi.set(__self__, "prioritize_unhealthy_instances_enabled", prioritize_unhealthy_instances_enabled) + _setter("prioritize_unhealthy_instances_enabled", prioritize_unhealthy_instances_enabled) @property @pulumi.getter(name="maxBatchInstancePercent") @@ -10568,10 +14233,25 @@ def __init__(__self__, *, :param pulumi.Input[bool] force_deletion_enabled: Should the virtual machines chosen for removal be force deleted when the virtual machine scale set is being scaled-in? Possible values are `true` or `false`. Defaults to `false`. :param pulumi.Input[str] rule: The scale-in policy rule that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled in. Possible values for the scale-in policy rules are `Default`, `NewestVM` and `OldestVM`, defaults to `Default`. For more information about scale in policy, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-scale-in-policy). """ + WindowsVirtualMachineScaleSetScaleInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + force_deletion_enabled=force_deletion_enabled, + rule=rule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + force_deletion_enabled: Optional[pulumi.Input[bool]] = None, + rule: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if force_deletion_enabled is None and 'forceDeletionEnabled' in kwargs: + force_deletion_enabled = kwargs['forceDeletionEnabled'] + if force_deletion_enabled is not None: - pulumi.set(__self__, "force_deletion_enabled", force_deletion_enabled) + _setter("force_deletion_enabled", force_deletion_enabled) if rule is not None: - pulumi.set(__self__, "rule", rule) + _setter("rule", rule) @property @pulumi.getter(name="forceDeletionEnabled") @@ -10607,8 +14287,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetSecretCertificateArgs']]] certificates: One or more `certificate` blocks as defined above. :param pulumi.Input[str] key_vault_id: The ID of the Key Vault from which all Secrets should be sourced. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "key_vault_id", key_vault_id) + WindowsVirtualMachineScaleSetSecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetSecretCertificateArgs']]]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("certificates", certificates) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -10646,8 +14345,25 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "store", store) - pulumi.set(__self__, "url", url) + WindowsVirtualMachineScaleSetSecretCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + store=store, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + store: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if store is None: + raise TypeError("Missing 'store' argument") + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("store", store) + _setter("url", url) @property @pulumi.getter @@ -10689,10 +14405,35 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: Specifies the SKU of the image used to create the virtual machines. :param pulumi.Input[str] version: Specifies the version of the image used to create the virtual machines. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + WindowsVirtualMachineScaleSetSourceImageReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -10752,10 +14493,23 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Should the Spot-Try-Restore feature be enabled? The Spot-Try-Restore feature will attempt to automatically restore the evicted Spot Virtual Machine Scale Set VM instances opportunistically based on capacity availability and pricing constraints. Possible values are `true` or `false`. Defaults to `false`. Changing this forces a new resource to be created. :param pulumi.Input[str] timeout: The length of time that the Virtual Machine Scale Set should attempt to restore the Spot VM instances which have been evicted. The time duration should be between `15` minutes and `120` minutes (inclusive). The time duration should be specified in the ISO 8601 format. Defaults to `90` minutes (e.g. `PT1H30M`). Changing this forces a new resource to be created. """ + WindowsVirtualMachineScaleSetSpotRestoreArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + timeout: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -10793,9 +14547,24 @@ def __init__(__self__, *, > For more information about the terminate notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). """ - pulumi.set(__self__, "enabled", enabled) + WindowsVirtualMachineScaleSetTerminateNotificationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + timeout: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -10835,9 +14604,24 @@ def __init__(__self__, *, > **NOTE:** For more information about the termination notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). """ - pulumi.set(__self__, "enabled", enabled) + WindowsVirtualMachineScaleSetTerminationNotificationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + timeout: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -10877,9 +14661,26 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "protocol", protocol) + WindowsVirtualMachineScaleSetWinrmListenerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + certificate_url=certificate_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[pulumi.Input[str]] = None, + certificate_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + + _setter("protocol", protocol) if certificate_url is not None: - pulumi.set(__self__, "certificate_url", certificate_url) + _setter("certificate_url", certificate_url) @property @pulumi.getter @@ -10917,8 +14718,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineSecretCertificateArgs']]] certificates: One or more `certificate` blocks as defined above. :param pulumi.Input[str] key_vault_id: The ID of the Key Vault from which all Secrets should be sourced. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "key_vault_id", key_vault_id) + WindowsVirtualMachineSecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineSecretCertificateArgs']]]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("certificates", certificates) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -10956,8 +14776,25 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "store", store) - pulumi.set(__self__, "url", url) + WindowsVirtualMachineSecretCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + store=store, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + store: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if store is None: + raise TypeError("Missing 'store' argument") + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("store", store) + _setter("url", url) @property @pulumi.getter @@ -10999,10 +14836,35 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: Specifies the SKU of the image used to create the virtual machines. Changing this forces a new resource to be created. :param pulumi.Input[str] version: Specifies the version of the image used to create the virtual machines. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + WindowsVirtualMachineSourceImageReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -11064,9 +14926,24 @@ def __init__(__self__, *, > **NOTE:** For more information about the termination notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). """ - pulumi.set(__self__, "enabled", enabled) + WindowsVirtualMachineTerminationNotificationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + timeout: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -11104,9 +14981,26 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol: Specifies the protocol of listener. Possible values are `Http` or `Https`. Changing this forces a new resource to be created. :param pulumi.Input[str] certificate_url: The Secret URL of a Key Vault Certificate, which must be specified when `protocol` is set to `Https`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "protocol", protocol) + WindowsVirtualMachineWinrmListenerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + certificate_url=certificate_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[pulumi.Input[str]] = None, + certificate_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + + _setter("protocol", protocol) if certificate_url is not None: - pulumi.set(__self__, "certificate_url", certificate_url) + _setter("certificate_url", certificate_url) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/compute/availability_set.py b/sdk/python/pulumi_azure/compute/availability_set.py index abf06f011a..e363ac8681 100644 --- a/sdk/python/pulumi_azure/compute/availability_set.py +++ b/sdk/python/pulumi_azure/compute/availability_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AvailabilitySetArgs', 'AvailabilitySet'] @@ -37,21 +37,56 @@ def __init__(__self__, *, :param pulumi.Input[str] proximity_placement_group_id: The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + AvailabilitySetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + managed=managed, + name=name, + platform_fault_domain_count=platform_fault_domain_count, + platform_update_domain_count=platform_update_domain_count, + proximity_placement_group_id=proximity_placement_group_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + managed: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + platform_fault_domain_count: Optional[pulumi.Input[int]] = None, + platform_update_domain_count: Optional[pulumi.Input[int]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if platform_fault_domain_count is None and 'platformFaultDomainCount' in kwargs: + platform_fault_domain_count = kwargs['platformFaultDomainCount'] + if platform_update_domain_count is None and 'platformUpdateDomainCount' in kwargs: + platform_update_domain_count = kwargs['platformUpdateDomainCount'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed is not None: - pulumi.set(__self__, "managed", managed) + _setter("managed", managed) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if platform_fault_domain_count is not None: - pulumi.set(__self__, "platform_fault_domain_count", platform_fault_domain_count) + _setter("platform_fault_domain_count", platform_fault_domain_count) if platform_update_domain_count is not None: - pulumi.set(__self__, "platform_update_domain_count", platform_update_domain_count) + _setter("platform_update_domain_count", platform_update_domain_count) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -180,22 +215,55 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the availability set. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _AvailabilitySetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + managed=managed, + name=name, + platform_fault_domain_count=platform_fault_domain_count, + platform_update_domain_count=platform_update_domain_count, + proximity_placement_group_id=proximity_placement_group_id, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + managed: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + platform_fault_domain_count: Optional[pulumi.Input[int]] = None, + platform_update_domain_count: Optional[pulumi.Input[int]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if platform_fault_domain_count is None and 'platformFaultDomainCount' in kwargs: + platform_fault_domain_count = kwargs['platformFaultDomainCount'] + if platform_update_domain_count is None and 'platformUpdateDomainCount' in kwargs: + platform_update_domain_count = kwargs['platformUpdateDomainCount'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed is not None: - pulumi.set(__self__, "managed", managed) + _setter("managed", managed) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if platform_fault_domain_count is not None: - pulumi.set(__self__, "platform_fault_domain_count", platform_fault_domain_count) + _setter("platform_fault_domain_count", platform_fault_domain_count) if platform_update_domain_count is not None: - pulumi.set(__self__, "platform_update_domain_count", platform_update_domain_count) + _setter("platform_update_domain_count", platform_update_domain_count) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -395,6 +463,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AvailabilitySetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/bastion_host.py b/sdk/python/pulumi_azure/compute/bastion_host.py index 9e95505bc7..fdbe831fa1 100644 --- a/sdk/python/pulumi_azure/compute/bastion_host.py +++ b/sdk/python/pulumi_azure/compute/bastion_host.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -55,28 +55,81 @@ def __init__(__self__, *, > **Note:** `tunneling_enabled` is only supported when `sku` is `Standard`. """ - pulumi.set(__self__, "ip_configuration", ip_configuration) - pulumi.set(__self__, "resource_group_name", resource_group_name) + BastionHostArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configuration=ip_configuration, + resource_group_name=resource_group_name, + copy_paste_enabled=copy_paste_enabled, + file_copy_enabled=file_copy_enabled, + ip_connect_enabled=ip_connect_enabled, + location=location, + name=name, + scale_units=scale_units, + shareable_link_enabled=shareable_link_enabled, + sku=sku, + tags=tags, + tunneling_enabled=tunneling_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configuration: Optional[pulumi.Input['BastionHostIpConfigurationArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + copy_paste_enabled: Optional[pulumi.Input[bool]] = None, + file_copy_enabled: Optional[pulumi.Input[bool]] = None, + ip_connect_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + scale_units: Optional[pulumi.Input[int]] = None, + shareable_link_enabled: Optional[pulumi.Input[bool]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tunneling_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configuration is None and 'ipConfiguration' in kwargs: + ip_configuration = kwargs['ipConfiguration'] + if ip_configuration is None: + raise TypeError("Missing 'ip_configuration' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if copy_paste_enabled is None and 'copyPasteEnabled' in kwargs: + copy_paste_enabled = kwargs['copyPasteEnabled'] + if file_copy_enabled is None and 'fileCopyEnabled' in kwargs: + file_copy_enabled = kwargs['fileCopyEnabled'] + if ip_connect_enabled is None and 'ipConnectEnabled' in kwargs: + ip_connect_enabled = kwargs['ipConnectEnabled'] + if scale_units is None and 'scaleUnits' in kwargs: + scale_units = kwargs['scaleUnits'] + if shareable_link_enabled is None and 'shareableLinkEnabled' in kwargs: + shareable_link_enabled = kwargs['shareableLinkEnabled'] + if tunneling_enabled is None and 'tunnelingEnabled' in kwargs: + tunneling_enabled = kwargs['tunnelingEnabled'] + + _setter("ip_configuration", ip_configuration) + _setter("resource_group_name", resource_group_name) if copy_paste_enabled is not None: - pulumi.set(__self__, "copy_paste_enabled", copy_paste_enabled) + _setter("copy_paste_enabled", copy_paste_enabled) if file_copy_enabled is not None: - pulumi.set(__self__, "file_copy_enabled", file_copy_enabled) + _setter("file_copy_enabled", file_copy_enabled) if ip_connect_enabled is not None: - pulumi.set(__self__, "ip_connect_enabled", ip_connect_enabled) + _setter("ip_connect_enabled", ip_connect_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if scale_units is not None: - pulumi.set(__self__, "scale_units", scale_units) + _setter("scale_units", scale_units) if shareable_link_enabled is not None: - pulumi.set(__self__, "shareable_link_enabled", shareable_link_enabled) + _setter("shareable_link_enabled", shareable_link_enabled) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tunneling_enabled is not None: - pulumi.set(__self__, "tunneling_enabled", tunneling_enabled) + _setter("tunneling_enabled", tunneling_enabled) @property @pulumi.getter(name="ipConfiguration") @@ -279,32 +332,85 @@ def __init__(__self__, *, > **Note:** `tunneling_enabled` is only supported when `sku` is `Standard`. """ + _BastionHostState._configure( + lambda key, value: pulumi.set(__self__, key, value), + copy_paste_enabled=copy_paste_enabled, + dns_name=dns_name, + file_copy_enabled=file_copy_enabled, + ip_configuration=ip_configuration, + ip_connect_enabled=ip_connect_enabled, + location=location, + name=name, + resource_group_name=resource_group_name, + scale_units=scale_units, + shareable_link_enabled=shareable_link_enabled, + sku=sku, + tags=tags, + tunneling_enabled=tunneling_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + copy_paste_enabled: Optional[pulumi.Input[bool]] = None, + dns_name: Optional[pulumi.Input[str]] = None, + file_copy_enabled: Optional[pulumi.Input[bool]] = None, + ip_configuration: Optional[pulumi.Input['BastionHostIpConfigurationArgs']] = None, + ip_connect_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scale_units: Optional[pulumi.Input[int]] = None, + shareable_link_enabled: Optional[pulumi.Input[bool]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tunneling_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if copy_paste_enabled is None and 'copyPasteEnabled' in kwargs: + copy_paste_enabled = kwargs['copyPasteEnabled'] + if dns_name is None and 'dnsName' in kwargs: + dns_name = kwargs['dnsName'] + if file_copy_enabled is None and 'fileCopyEnabled' in kwargs: + file_copy_enabled = kwargs['fileCopyEnabled'] + if ip_configuration is None and 'ipConfiguration' in kwargs: + ip_configuration = kwargs['ipConfiguration'] + if ip_connect_enabled is None and 'ipConnectEnabled' in kwargs: + ip_connect_enabled = kwargs['ipConnectEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if scale_units is None and 'scaleUnits' in kwargs: + scale_units = kwargs['scaleUnits'] + if shareable_link_enabled is None and 'shareableLinkEnabled' in kwargs: + shareable_link_enabled = kwargs['shareableLinkEnabled'] + if tunneling_enabled is None and 'tunnelingEnabled' in kwargs: + tunneling_enabled = kwargs['tunnelingEnabled'] + if copy_paste_enabled is not None: - pulumi.set(__self__, "copy_paste_enabled", copy_paste_enabled) + _setter("copy_paste_enabled", copy_paste_enabled) if dns_name is not None: - pulumi.set(__self__, "dns_name", dns_name) + _setter("dns_name", dns_name) if file_copy_enabled is not None: - pulumi.set(__self__, "file_copy_enabled", file_copy_enabled) + _setter("file_copy_enabled", file_copy_enabled) if ip_configuration is not None: - pulumi.set(__self__, "ip_configuration", ip_configuration) + _setter("ip_configuration", ip_configuration) if ip_connect_enabled is not None: - pulumi.set(__self__, "ip_connect_enabled", ip_connect_enabled) + _setter("ip_connect_enabled", ip_connect_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scale_units is not None: - pulumi.set(__self__, "scale_units", scale_units) + _setter("scale_units", scale_units) if shareable_link_enabled is not None: - pulumi.set(__self__, "shareable_link_enabled", shareable_link_enabled) + _setter("shareable_link_enabled", shareable_link_enabled) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tunneling_enabled is not None: - pulumi.set(__self__, "tunneling_enabled", tunneling_enabled) + _setter("tunneling_enabled", tunneling_enabled) @property @pulumi.getter(name="copyPasteEnabled") @@ -622,6 +728,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BastionHostArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -650,6 +760,11 @@ def _internal_init(__self__, __props__.__dict__["copy_paste_enabled"] = copy_paste_enabled __props__.__dict__["file_copy_enabled"] = file_copy_enabled + if ip_configuration is not None and not isinstance(ip_configuration, BastionHostIpConfigurationArgs): + ip_configuration = ip_configuration or {} + def _setter(key, value): + ip_configuration[key] = value + BastionHostIpConfigurationArgs._configure(_setter, **ip_configuration) if ip_configuration is None and not opts.urn: raise TypeError("Missing required property 'ip_configuration'") __props__.__dict__["ip_configuration"] = ip_configuration diff --git a/sdk/python/pulumi_azure/compute/capacity_reservation.py b/sdk/python/pulumi_azure/compute/capacity_reservation.py index c837aba3fc..529b81b49b 100644 --- a/sdk/python/pulumi_azure/compute/capacity_reservation.py +++ b/sdk/python/pulumi_azure/compute/capacity_reservation.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,39 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] zone: Specifies the Availability Zone for this Capacity Reservation. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) - pulumi.set(__self__, "sku", sku) + CapacityReservationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity_reservation_group_id=capacity_reservation_group_id, + sku=sku, + name=name, + tags=tags, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['CapacityReservationSkuArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if capacity_reservation_group_id is None: + raise TypeError("Missing 'capacity_reservation_group_id' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + + _setter("capacity_reservation_group_id", capacity_reservation_group_id) + _setter("sku", sku) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="capacityReservationGroupId") @@ -115,16 +140,37 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] zone: Specifies the Availability Zone for this Capacity Reservation. Changing this forces a new resource to be created. """ + _CapacityReservationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity_reservation_group_id=capacity_reservation_group_id, + name=name, + sku=sku, + tags=tags, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['CapacityReservationSkuArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="capacityReservationGroupId") @@ -280,6 +326,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CapacityReservationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -303,6 +353,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'capacity_reservation_group_id'") __props__.__dict__["capacity_reservation_group_id"] = capacity_reservation_group_id __props__.__dict__["name"] = name + if sku is not None and not isinstance(sku, CapacityReservationSkuArgs): + sku = sku or {} + def _setter(key, value): + sku[key] = value + CapacityReservationSkuArgs._configure(_setter, **sku) if sku is None and not opts.urn: raise TypeError("Missing required property 'sku'") __props__.__dict__["sku"] = sku diff --git a/sdk/python/pulumi_azure/compute/capacity_reservation_group.py b/sdk/python/pulumi_azure/compute/capacity_reservation_group.py index 9fce0ea088..88b113565a 100644 --- a/sdk/python/pulumi_azure/compute/capacity_reservation_group.py +++ b/sdk/python/pulumi_azure/compute/capacity_reservation_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CapacityReservationGroupArgs', 'CapacityReservationGroup'] @@ -27,15 +27,38 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones for this Capacity Reservation Group. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + CapacityReservationGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="resourceGroupName") @@ -114,16 +137,37 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones for this Capacity Reservation Group. Changing this forces a new resource to be created. """ + _CapacityReservationGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -267,6 +311,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CapacityReservationGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/data_disk_attachment.py b/sdk/python/pulumi_azure/compute/data_disk_attachment.py index 32c20c7c51..3b126aefba 100644 --- a/sdk/python/pulumi_azure/compute/data_disk_attachment.py +++ b/sdk/python/pulumi_azure/compute/data_disk_attachment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataDiskAttachmentArgs', 'DataDiskAttachment'] @@ -29,14 +29,51 @@ def __init__(__self__, *, :param pulumi.Input[str] create_option: The Create Option of the Data Disk, such as `Empty` or `Attach`. Defaults to `Attach`. Changing this forces a new resource to be created. :param pulumi.Input[bool] write_accelerator_enabled: Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "lun", lun) - pulumi.set(__self__, "managed_disk_id", managed_disk_id) - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + DataDiskAttachmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + lun=lun, + managed_disk_id=managed_disk_id, + virtual_machine_id=virtual_machine_id, + create_option=create_option, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[pulumi.Input[str]] = None, + lun: Optional[pulumi.Input[int]] = None, + managed_disk_id: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + create_option: Optional[pulumi.Input[str]] = None, + write_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if managed_disk_id is None: + raise TypeError("Missing 'managed_disk_id' argument") + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_id is None: + raise TypeError("Missing 'virtual_machine_id' argument") + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("lun", lun) + _setter("managed_disk_id", managed_disk_id) + _setter("virtual_machine_id", virtual_machine_id) if create_option is not None: - pulumi.set(__self__, "create_option", create_option) + _setter("create_option", create_option) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -129,18 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[str] virtual_machine_id: The ID of the Virtual Machine to which the Data Disk should be attached. Changing this forces a new resource to be created. :param pulumi.Input[bool] write_accelerator_enabled: Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`. """ + _DataDiskAttachmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + create_option=create_option, + lun=lun, + managed_disk_id=managed_disk_id, + virtual_machine_id=virtual_machine_id, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[pulumi.Input[str]] = None, + create_option: Optional[pulumi.Input[str]] = None, + lun: Optional[pulumi.Input[int]] = None, + managed_disk_id: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + write_accelerator_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if create_option is not None: - pulumi.set(__self__, "create_option", create_option) + _setter("create_option", create_option) if lun is not None: - pulumi.set(__self__, "lun", lun) + _setter("lun", lun) if managed_disk_id is not None: - pulumi.set(__self__, "managed_disk_id", managed_disk_id) + _setter("managed_disk_id", managed_disk_id) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -414,6 +480,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataDiskAttachmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/dedicated_host.py b/sdk/python/pulumi_azure/compute/dedicated_host.py index 207673ff69..7f84b0729c 100644 --- a/sdk/python/pulumi_azure/compute/dedicated_host.py +++ b/sdk/python/pulumi_azure/compute/dedicated_host.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DedicatedHostArgs', 'DedicatedHost'] @@ -33,19 +33,60 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of this Dedicated Host. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "dedicated_host_group_id", dedicated_host_group_id) - pulumi.set(__self__, "platform_fault_domain", platform_fault_domain) - pulumi.set(__self__, "sku_name", sku_name) + DedicatedHostArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dedicated_host_group_id=dedicated_host_group_id, + platform_fault_domain=platform_fault_domain, + sku_name=sku_name, + auto_replace_on_failure=auto_replace_on_failure, + license_type=license_type, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dedicated_host_group_id: Optional[pulumi.Input[str]] = None, + platform_fault_domain: Optional[pulumi.Input[int]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + auto_replace_on_failure: Optional[pulumi.Input[bool]] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dedicated_host_group_id is None and 'dedicatedHostGroupId' in kwargs: + dedicated_host_group_id = kwargs['dedicatedHostGroupId'] + if dedicated_host_group_id is None: + raise TypeError("Missing 'dedicated_host_group_id' argument") + if platform_fault_domain is None and 'platformFaultDomain' in kwargs: + platform_fault_domain = kwargs['platformFaultDomain'] + if platform_fault_domain is None: + raise TypeError("Missing 'platform_fault_domain' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if auto_replace_on_failure is None and 'autoReplaceOnFailure' in kwargs: + auto_replace_on_failure = kwargs['autoReplaceOnFailure'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + + _setter("dedicated_host_group_id", dedicated_host_group_id) + _setter("platform_fault_domain", platform_fault_domain) + _setter("sku_name", sku_name) if auto_replace_on_failure is not None: - pulumi.set(__self__, "auto_replace_on_failure", auto_replace_on_failure) + _setter("auto_replace_on_failure", auto_replace_on_failure) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dedicatedHostGroupId") @@ -166,22 +207,57 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_name: Specify the SKU name of the Dedicated Host. Possible values are `DADSv5-Type1`, `DASv4-Type1`, `DASv4-Type2`, `DASv5-Type1`, `DCSv2-Type1`, `DDSv4-Type1`, `DDSv4-Type2`, `DDSv5-Type1`, `DSv3-Type1`, `DSv3-Type2`, `DSv3-Type3`, `DSv3-Type4`, `DSv4-Type1`, `DSv4-Type2`, `DSv5-Type1`, `EADSv5-Type1`, `EASv4-Type1`, `EASv4-Type2`, `EASv5-Type1`, `EDSv4-Type1`, `EDSv4-Type2`, `EDSv5-Type1`, `ESv3-Type1`, `ESv3-Type2`, `ESv3-Type3`, `ESv3-Type4`, `ESv4-Type1`, `ESv4-Type2`, `ESv5-Type1`, `FSv2-Type2`, `FSv2-Type3`, `FSv2-Type4`, `FXmds-Type1`, `LSv2-Type1`, `LSv3-Type1`, `MDMSv2MedMem-Type1`, `MDSv2MedMem-Type1`, `MMSv2MedMem-Type1`, `MS-Type1`, `MSm-Type1`, `MSmv2-Type1`, `MSv2-Type1`, `MSv2MedMem-Type1`, `NVASv4-Type1` and `NVSv3-Type1`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _DedicatedHostState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_replace_on_failure=auto_replace_on_failure, + dedicated_host_group_id=dedicated_host_group_id, + license_type=license_type, + location=location, + name=name, + platform_fault_domain=platform_fault_domain, + sku_name=sku_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_replace_on_failure: Optional[pulumi.Input[bool]] = None, + dedicated_host_group_id: Optional[pulumi.Input[str]] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + platform_fault_domain: Optional[pulumi.Input[int]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_replace_on_failure is None and 'autoReplaceOnFailure' in kwargs: + auto_replace_on_failure = kwargs['autoReplaceOnFailure'] + if dedicated_host_group_id is None and 'dedicatedHostGroupId' in kwargs: + dedicated_host_group_id = kwargs['dedicatedHostGroupId'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if platform_fault_domain is None and 'platformFaultDomain' in kwargs: + platform_fault_domain = kwargs['platformFaultDomain'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if auto_replace_on_failure is not None: - pulumi.set(__self__, "auto_replace_on_failure", auto_replace_on_failure) + _setter("auto_replace_on_failure", auto_replace_on_failure) if dedicated_host_group_id is not None: - pulumi.set(__self__, "dedicated_host_group_id", dedicated_host_group_id) + _setter("dedicated_host_group_id", dedicated_host_group_id) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if platform_fault_domain is not None: - pulumi.set(__self__, "platform_fault_domain", platform_fault_domain) + _setter("platform_fault_domain", platform_fault_domain) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="autoReplaceOnFailure") @@ -379,6 +455,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DedicatedHostArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/dedicated_host_group.py b/sdk/python/pulumi_azure/compute/dedicated_host_group.py index da7417ca47..5dd353e125 100644 --- a/sdk/python/pulumi_azure/compute/dedicated_host_group.py +++ b/sdk/python/pulumi_azure/compute/dedicated_host_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DedicatedHostGroupArgs', 'DedicatedHostGroup'] @@ -31,18 +31,51 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] zone: Specifies the Availability Zone in which this Dedicated Host Group should be located. Changing this forces a new Dedicated Host Group to be created. """ - pulumi.set(__self__, "platform_fault_domain_count", platform_fault_domain_count) - pulumi.set(__self__, "resource_group_name", resource_group_name) + DedicatedHostGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + platform_fault_domain_count=platform_fault_domain_count, + resource_group_name=resource_group_name, + automatic_placement_enabled=automatic_placement_enabled, + location=location, + name=name, + tags=tags, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + platform_fault_domain_count: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + automatic_placement_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if platform_fault_domain_count is None and 'platformFaultDomainCount' in kwargs: + platform_fault_domain_count = kwargs['platformFaultDomainCount'] + if platform_fault_domain_count is None: + raise TypeError("Missing 'platform_fault_domain_count' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if automatic_placement_enabled is None and 'automaticPlacementEnabled' in kwargs: + automatic_placement_enabled = kwargs['automaticPlacementEnabled'] + + _setter("platform_fault_domain_count", platform_fault_domain_count) + _setter("resource_group_name", resource_group_name) if automatic_placement_enabled is not None: - pulumi.set(__self__, "automatic_placement_enabled", automatic_placement_enabled) + _setter("automatic_placement_enabled", automatic_placement_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="platformFaultDomainCount") @@ -149,20 +182,49 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] zone: Specifies the Availability Zone in which this Dedicated Host Group should be located. Changing this forces a new Dedicated Host Group to be created. """ + _DedicatedHostGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automatic_placement_enabled=automatic_placement_enabled, + location=location, + name=name, + platform_fault_domain_count=platform_fault_domain_count, + resource_group_name=resource_group_name, + tags=tags, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automatic_placement_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + platform_fault_domain_count: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automatic_placement_enabled is None and 'automaticPlacementEnabled' in kwargs: + automatic_placement_enabled = kwargs['automaticPlacementEnabled'] + if platform_fault_domain_count is None and 'platformFaultDomainCount' in kwargs: + platform_fault_domain_count = kwargs['platformFaultDomainCount'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automatic_placement_enabled is not None: - pulumi.set(__self__, "automatic_placement_enabled", automatic_placement_enabled) + _setter("automatic_placement_enabled", automatic_placement_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if platform_fault_domain_count is not None: - pulumi.set(__self__, "platform_fault_domain_count", platform_fault_domain_count) + _setter("platform_fault_domain_count", platform_fault_domain_count) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="automaticPlacementEnabled") @@ -336,6 +398,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DedicatedHostGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/disk_access.py b/sdk/python/pulumi_azure/compute/disk_access.py index 3fd789c4ee..c10ed41e4d 100644 --- a/sdk/python/pulumi_azure/compute/disk_access.py +++ b/sdk/python/pulumi_azure/compute/disk_access.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DiskAccessArgs', 'DiskAccess'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Disk Access. Changing this forces a new Disk Access to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Disk Access. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + DiskAccessArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -96,14 +117,33 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Disk Access should exist. Changing this forces a new Disk Access to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Disk Access. """ + _DiskAccessState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -231,6 +271,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DiskAccessArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/disk_encryption_set.py b/sdk/python/pulumi_azure/compute/disk_encryption_set.py index ee05c943f9..89cbeb8d3e 100644 --- a/sdk/python/pulumi_azure/compute/disk_encryption_set.py +++ b/sdk/python/pulumi_azure/compute/disk_encryption_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,21 +41,64 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Disk Encryption Set. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Disk Encryption Set. """ - pulumi.set(__self__, "identity", identity) - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + DiskEncryptionSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity=identity, + key_vault_key_id=key_vault_key_id, + resource_group_name=resource_group_name, + auto_key_rotation_enabled=auto_key_rotation_enabled, + encryption_type=encryption_type, + federated_client_id=federated_client_id, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity: Optional[pulumi.Input['DiskEncryptionSetIdentityArgs']] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + auto_key_rotation_enabled: Optional[pulumi.Input[bool]] = None, + encryption_type: Optional[pulumi.Input[str]] = None, + federated_client_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity is None: + raise TypeError("Missing 'identity' argument") + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if auto_key_rotation_enabled is None and 'autoKeyRotationEnabled' in kwargs: + auto_key_rotation_enabled = kwargs['autoKeyRotationEnabled'] + if encryption_type is None and 'encryptionType' in kwargs: + encryption_type = kwargs['encryptionType'] + if federated_client_id is None and 'federatedClientId' in kwargs: + federated_client_id = kwargs['federatedClientId'] + + _setter("identity", identity) + _setter("key_vault_key_id", key_vault_key_id) + _setter("resource_group_name", resource_group_name) if auto_key_rotation_enabled is not None: - pulumi.set(__self__, "auto_key_rotation_enabled", auto_key_rotation_enabled) + _setter("auto_key_rotation_enabled", auto_key_rotation_enabled) if encryption_type is not None: - pulumi.set(__self__, "encryption_type", encryption_type) + _setter("encryption_type", encryption_type) if federated_client_id is not None: - pulumi.set(__self__, "federated_client_id", federated_client_id) + _setter("federated_client_id", federated_client_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -198,26 +241,67 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group where the Disk Encryption Set should exist. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Disk Encryption Set. """ + _DiskEncryptionSetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_key_rotation_enabled=auto_key_rotation_enabled, + encryption_type=encryption_type, + federated_client_id=federated_client_id, + identity=identity, + key_vault_key_id=key_vault_key_id, + key_vault_key_url=key_vault_key_url, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_key_rotation_enabled: Optional[pulumi.Input[bool]] = None, + encryption_type: Optional[pulumi.Input[str]] = None, + federated_client_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['DiskEncryptionSetIdentityArgs']] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + key_vault_key_url: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_key_rotation_enabled is None and 'autoKeyRotationEnabled' in kwargs: + auto_key_rotation_enabled = kwargs['autoKeyRotationEnabled'] + if encryption_type is None and 'encryptionType' in kwargs: + encryption_type = kwargs['encryptionType'] + if federated_client_id is None and 'federatedClientId' in kwargs: + federated_client_id = kwargs['federatedClientId'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_url is None and 'keyVaultKeyUrl' in kwargs: + key_vault_key_url = kwargs['keyVaultKeyUrl'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if auto_key_rotation_enabled is not None: - pulumi.set(__self__, "auto_key_rotation_enabled", auto_key_rotation_enabled) + _setter("auto_key_rotation_enabled", auto_key_rotation_enabled) if encryption_type is not None: - pulumi.set(__self__, "encryption_type", encryption_type) + _setter("encryption_type", encryption_type) if federated_client_id is not None: - pulumi.set(__self__, "federated_client_id", federated_client_id) + _setter("federated_client_id", federated_client_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if key_vault_key_url is not None: - pulumi.set(__self__, "key_vault_key_url", key_vault_key_url) + _setter("key_vault_key_url", key_vault_key_url) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="autoKeyRotationEnabled") @@ -703,6 +787,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DiskEncryptionSetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -729,6 +817,11 @@ def _internal_init(__self__, __props__.__dict__["auto_key_rotation_enabled"] = auto_key_rotation_enabled __props__.__dict__["encryption_type"] = encryption_type __props__.__dict__["federated_client_id"] = federated_client_id + if identity is not None and not isinstance(identity, DiskEncryptionSetIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + DiskEncryptionSetIdentityArgs._configure(_setter, **identity) if identity is None and not opts.urn: raise TypeError("Missing required property 'identity'") __props__.__dict__["identity"] = identity diff --git a/sdk/python/pulumi_azure/compute/disk_pool.py b/sdk/python/pulumi_azure/compute/disk_pool.py index 5153661ce4..643b165e86 100644 --- a/sdk/python/pulumi_azure/compute/disk_pool.py +++ b/sdk/python/pulumi_azure/compute/disk_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DiskPoolArgs', 'DiskPool'] @@ -31,16 +31,53 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Disk Pool. Changing this forces a new Disk Pool to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Disk Pool. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "subnet_id", subnet_id) - pulumi.set(__self__, "zones", zones) + DiskPoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + subnet_id=subnet_id, + zones=zones, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if zones is None: + raise TypeError("Missing 'zones' argument") + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("subnet_id", subnet_id) + _setter("zones", zones) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -147,20 +184,49 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Disk Pool. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones in which this Disk Pool should be located. Changing this forces a new Disk Pool to be created. """ + _DiskPoolState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + sku_name=sku_name, + subnet_id=subnet_id, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -372,6 +438,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DiskPoolArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/disk_pool_iscsi_target.py b/sdk/python/pulumi_azure/compute/disk_pool_iscsi_target.py index 5999a33a15..c1ab304651 100644 --- a/sdk/python/pulumi_azure/compute/disk_pool_iscsi_target.py +++ b/sdk/python/pulumi_azure/compute/disk_pool_iscsi_target.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DiskPoolIscsiTargetArgs', 'DiskPoolIscsiTarget'] @@ -25,12 +25,39 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the iSCSI Target. The name can only contain lowercase letters, numbers, periods, or hyphens, and length should between [5-223]. Changing this forces a new iSCSI Target to be created. :param pulumi.Input[str] target_iqn: ISCSI Target IQN (iSCSI Qualified Name); example: `iqn.2005-03.org.iscsi:server`. IQN should follow the format `iqn.yyyy-mm..[:xyz]`; supported characters include alphanumeric characters in lower case, hyphen, dot and colon, and the length should between `4` and `223`. Changing this forces a new iSCSI Target to be created. """ - pulumi.set(__self__, "acl_mode", acl_mode) - pulumi.set(__self__, "disks_pool_id", disks_pool_id) + DiskPoolIscsiTargetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + acl_mode=acl_mode, + disks_pool_id=disks_pool_id, + name=name, + target_iqn=target_iqn, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + acl_mode: Optional[pulumi.Input[str]] = None, + disks_pool_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + target_iqn: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if acl_mode is None and 'aclMode' in kwargs: + acl_mode = kwargs['aclMode'] + if acl_mode is None: + raise TypeError("Missing 'acl_mode' argument") + if disks_pool_id is None and 'disksPoolId' in kwargs: + disks_pool_id = kwargs['disksPoolId'] + if disks_pool_id is None: + raise TypeError("Missing 'disks_pool_id' argument") + if target_iqn is None and 'targetIqn' in kwargs: + target_iqn = kwargs['targetIqn'] + + _setter("acl_mode", acl_mode) + _setter("disks_pool_id", disks_pool_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if target_iqn is not None: - pulumi.set(__self__, "target_iqn", target_iqn) + _setter("target_iqn", target_iqn) @property @pulumi.getter(name="aclMode") @@ -99,18 +126,45 @@ def __init__(__self__, *, :param pulumi.Input[int] port: The port used by iSCSI Target portal group. :param pulumi.Input[str] target_iqn: ISCSI Target IQN (iSCSI Qualified Name); example: `iqn.2005-03.org.iscsi:server`. IQN should follow the format `iqn.yyyy-mm..[:xyz]`; supported characters include alphanumeric characters in lower case, hyphen, dot and colon, and the length should between `4` and `223`. Changing this forces a new iSCSI Target to be created. """ + _DiskPoolIscsiTargetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + acl_mode=acl_mode, + disks_pool_id=disks_pool_id, + endpoints=endpoints, + name=name, + port=port, + target_iqn=target_iqn, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + acl_mode: Optional[pulumi.Input[str]] = None, + disks_pool_id: Optional[pulumi.Input[str]] = None, + endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + target_iqn: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if acl_mode is None and 'aclMode' in kwargs: + acl_mode = kwargs['aclMode'] + if disks_pool_id is None and 'disksPoolId' in kwargs: + disks_pool_id = kwargs['disksPoolId'] + if target_iqn is None and 'targetIqn' in kwargs: + target_iqn = kwargs['targetIqn'] + if acl_mode is not None: - pulumi.set(__self__, "acl_mode", acl_mode) + _setter("acl_mode", acl_mode) if disks_pool_id is not None: - pulumi.set(__self__, "disks_pool_id", disks_pool_id) + _setter("disks_pool_id", disks_pool_id) if endpoints is not None: - pulumi.set(__self__, "endpoints", endpoints) + _setter("endpoints", endpoints) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if target_iqn is not None: - pulumi.set(__self__, "target_iqn", target_iqn) + _setter("target_iqn", target_iqn) @property @pulumi.getter(name="aclMode") @@ -366,6 +420,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DiskPoolIscsiTargetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/disk_pool_iscsi_target_lun.py b/sdk/python/pulumi_azure/compute/disk_pool_iscsi_target_lun.py index fdd08b5acc..0667e06285 100644 --- a/sdk/python/pulumi_azure/compute/disk_pool_iscsi_target_lun.py +++ b/sdk/python/pulumi_azure/compute/disk_pool_iscsi_target_lun.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DiskPoolIscsiTargetLunArgs', 'DiskPoolIscsiTargetLun'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] iscsi_target_id: The ID of the iSCSI Target. Changing this forces a new iSCSI Target LUN to be created. :param pulumi.Input[str] name: User defined name for iSCSI LUN. Supported characters include uppercase letters, lowercase letters, numbers, periods, underscores or hyphens. Name should end with an alphanumeric character. The length must be between `1` and `90`. Changing this forces a new iSCSI Target LUN to be created. """ - pulumi.set(__self__, "disk_pool_managed_disk_attachment_id", disk_pool_managed_disk_attachment_id) - pulumi.set(__self__, "iscsi_target_id", iscsi_target_id) + DiskPoolIscsiTargetLunArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_pool_managed_disk_attachment_id=disk_pool_managed_disk_attachment_id, + iscsi_target_id=iscsi_target_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_pool_managed_disk_attachment_id: Optional[pulumi.Input[str]] = None, + iscsi_target_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_pool_managed_disk_attachment_id is None and 'diskPoolManagedDiskAttachmentId' in kwargs: + disk_pool_managed_disk_attachment_id = kwargs['diskPoolManagedDiskAttachmentId'] + if disk_pool_managed_disk_attachment_id is None: + raise TypeError("Missing 'disk_pool_managed_disk_attachment_id' argument") + if iscsi_target_id is None and 'iscsiTargetId' in kwargs: + iscsi_target_id = kwargs['iscsiTargetId'] + if iscsi_target_id is None: + raise TypeError("Missing 'iscsi_target_id' argument") + + _setter("disk_pool_managed_disk_attachment_id", disk_pool_managed_disk_attachment_id) + _setter("iscsi_target_id", iscsi_target_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="diskPoolManagedDiskAttachmentId") @@ -79,14 +102,35 @@ def __init__(__self__, *, :param pulumi.Input[int] lun: The Logical Unit Number of the iSCSI Target LUN. :param pulumi.Input[str] name: User defined name for iSCSI LUN. Supported characters include uppercase letters, lowercase letters, numbers, periods, underscores or hyphens. Name should end with an alphanumeric character. The length must be between `1` and `90`. Changing this forces a new iSCSI Target LUN to be created. """ + _DiskPoolIscsiTargetLunState._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_pool_managed_disk_attachment_id=disk_pool_managed_disk_attachment_id, + iscsi_target_id=iscsi_target_id, + lun=lun, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_pool_managed_disk_attachment_id: Optional[pulumi.Input[str]] = None, + iscsi_target_id: Optional[pulumi.Input[str]] = None, + lun: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_pool_managed_disk_attachment_id is None and 'diskPoolManagedDiskAttachmentId' in kwargs: + disk_pool_managed_disk_attachment_id = kwargs['diskPoolManagedDiskAttachmentId'] + if iscsi_target_id is None and 'iscsiTargetId' in kwargs: + iscsi_target_id = kwargs['iscsiTargetId'] + if disk_pool_managed_disk_attachment_id is not None: - pulumi.set(__self__, "disk_pool_managed_disk_attachment_id", disk_pool_managed_disk_attachment_id) + _setter("disk_pool_managed_disk_attachment_id", disk_pool_managed_disk_attachment_id) if iscsi_target_id is not None: - pulumi.set(__self__, "iscsi_target_id", iscsi_target_id) + _setter("iscsi_target_id", iscsi_target_id) if lun is not None: - pulumi.set(__self__, "lun", lun) + _setter("lun", lun) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="diskPoolManagedDiskAttachmentId") @@ -318,6 +362,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DiskPoolIscsiTargetLunArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/disk_pool_managed_disk_attachment.py b/sdk/python/pulumi_azure/compute/disk_pool_managed_disk_attachment.py index 6704a57b67..d277e1e83a 100644 --- a/sdk/python/pulumi_azure/compute/disk_pool_managed_disk_attachment.py +++ b/sdk/python/pulumi_azure/compute/disk_pool_managed_disk_attachment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DiskPoolManagedDiskAttachmentArgs', 'DiskPoolManagedDiskAttachment'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] disk_pool_id: The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created. :param pulumi.Input[str] managed_disk_id: The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created. """ - pulumi.set(__self__, "disk_pool_id", disk_pool_id) - pulumi.set(__self__, "managed_disk_id", managed_disk_id) + DiskPoolManagedDiskAttachmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_pool_id=disk_pool_id, + managed_disk_id=managed_disk_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_pool_id: Optional[pulumi.Input[str]] = None, + managed_disk_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_pool_id is None and 'diskPoolId' in kwargs: + disk_pool_id = kwargs['diskPoolId'] + if disk_pool_id is None: + raise TypeError("Missing 'disk_pool_id' argument") + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if managed_disk_id is None: + raise TypeError("Missing 'managed_disk_id' argument") + + _setter("disk_pool_id", disk_pool_id) + _setter("managed_disk_id", managed_disk_id) @property @pulumi.getter(name="diskPoolId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] disk_pool_id: The ID of the Disk Pool. Changing this forces a new Disk Pool Managed Disk Attachment to be created. :param pulumi.Input[str] managed_disk_id: The ID of the Managed Disk. Changing this forces a new Disks Pool Managed Disk Attachment to be created. """ + _DiskPoolManagedDiskAttachmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_pool_id=disk_pool_id, + managed_disk_id=managed_disk_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_pool_id: Optional[pulumi.Input[str]] = None, + managed_disk_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_pool_id is None and 'diskPoolId' in kwargs: + disk_pool_id = kwargs['diskPoolId'] + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if disk_pool_id is not None: - pulumi.set(__self__, "disk_pool_id", disk_pool_id) + _setter("disk_pool_id", disk_pool_id) if managed_disk_id is not None: - pulumi.set(__self__, "managed_disk_id", managed_disk_id) + _setter("managed_disk_id", managed_disk_id) @property @pulumi.getter(name="diskPoolId") @@ -268,6 +306,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DiskPoolManagedDiskAttachmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/extension.py b/sdk/python/pulumi_azure/compute/extension.py index 5972137ce4..822d125ca0 100644 --- a/sdk/python/pulumi_azure/compute/extension.py +++ b/sdk/python/pulumi_azure/compute/extension.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,28 +59,87 @@ def __init__(__self__, *, > **Please Note:** Certain VM Extensions require that the keys in the `settings` block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the `JsonADDomainExtension` extension, the keys are expected to be in `TitleCase`.) :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_handler_version", type_handler_version) - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + ExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + publisher=publisher, + type=type, + type_handler_version=type_handler_version, + virtual_machine_id=virtual_machine_id, + auto_upgrade_minor_version=auto_upgrade_minor_version, + automatic_upgrade_enabled=automatic_upgrade_enabled, + failure_suppression_enabled=failure_suppression_enabled, + name=name, + protected_settings=protected_settings, + protected_settings_from_key_vault=protected_settings_from_key_vault, + provision_after_extensions=provision_after_extensions, + settings=settings, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + publisher: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + type_handler_version: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + auto_upgrade_minor_version: Optional[pulumi.Input[bool]] = None, + automatic_upgrade_enabled: Optional[pulumi.Input[bool]] = None, + failure_suppression_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + protected_settings: Optional[pulumi.Input[str]] = None, + protected_settings_from_key_vault: Optional[pulumi.Input['ExtensionProtectedSettingsFromKeyVaultArgs']] = None, + provision_after_extensions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + settings: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if type_handler_version is None: + raise TypeError("Missing 'type_handler_version' argument") + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_id is None: + raise TypeError("Missing 'virtual_machine_id' argument") + if auto_upgrade_minor_version is None and 'autoUpgradeMinorVersion' in kwargs: + auto_upgrade_minor_version = kwargs['autoUpgradeMinorVersion'] + if automatic_upgrade_enabled is None and 'automaticUpgradeEnabled' in kwargs: + automatic_upgrade_enabled = kwargs['automaticUpgradeEnabled'] + if failure_suppression_enabled is None and 'failureSuppressionEnabled' in kwargs: + failure_suppression_enabled = kwargs['failureSuppressionEnabled'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if protected_settings_from_key_vault is None and 'protectedSettingsFromKeyVault' in kwargs: + protected_settings_from_key_vault = kwargs['protectedSettingsFromKeyVault'] + if provision_after_extensions is None and 'provisionAfterExtensions' in kwargs: + provision_after_extensions = kwargs['provisionAfterExtensions'] + + _setter("publisher", publisher) + _setter("type", type) + _setter("type_handler_version", type_handler_version) + _setter("virtual_machine_id", virtual_machine_id) if auto_upgrade_minor_version is not None: - pulumi.set(__self__, "auto_upgrade_minor_version", auto_upgrade_minor_version) + _setter("auto_upgrade_minor_version", auto_upgrade_minor_version) if automatic_upgrade_enabled is not None: - pulumi.set(__self__, "automatic_upgrade_enabled", automatic_upgrade_enabled) + _setter("automatic_upgrade_enabled", automatic_upgrade_enabled) if failure_suppression_enabled is not None: - pulumi.set(__self__, "failure_suppression_enabled", failure_suppression_enabled) + _setter("failure_suppression_enabled", failure_suppression_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if protected_settings_from_key_vault is not None: - pulumi.set(__self__, "protected_settings_from_key_vault", protected_settings_from_key_vault) + _setter("protected_settings_from_key_vault", protected_settings_from_key_vault) if provision_after_extensions is not None: - pulumi.set(__self__, "provision_after_extensions", provision_after_extensions) + _setter("provision_after_extensions", provision_after_extensions) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -299,32 +358,83 @@ def __init__(__self__, *, :param pulumi.Input[str] type_handler_version: Specifies the version of the extension to use, available versions can be found using the Azure CLI. :param pulumi.Input[str] virtual_machine_id: The ID of the Virtual Machine. Changing this forces a new resource to be created """ + _ExtensionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_upgrade_minor_version=auto_upgrade_minor_version, + automatic_upgrade_enabled=automatic_upgrade_enabled, + failure_suppression_enabled=failure_suppression_enabled, + name=name, + protected_settings=protected_settings, + protected_settings_from_key_vault=protected_settings_from_key_vault, + provision_after_extensions=provision_after_extensions, + publisher=publisher, + settings=settings, + tags=tags, + type=type, + type_handler_version=type_handler_version, + virtual_machine_id=virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_upgrade_minor_version: Optional[pulumi.Input[bool]] = None, + automatic_upgrade_enabled: Optional[pulumi.Input[bool]] = None, + failure_suppression_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + protected_settings: Optional[pulumi.Input[str]] = None, + protected_settings_from_key_vault: Optional[pulumi.Input['ExtensionProtectedSettingsFromKeyVaultArgs']] = None, + provision_after_extensions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + publisher: Optional[pulumi.Input[str]] = None, + settings: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + type_handler_version: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_upgrade_minor_version is None and 'autoUpgradeMinorVersion' in kwargs: + auto_upgrade_minor_version = kwargs['autoUpgradeMinorVersion'] + if automatic_upgrade_enabled is None and 'automaticUpgradeEnabled' in kwargs: + automatic_upgrade_enabled = kwargs['automaticUpgradeEnabled'] + if failure_suppression_enabled is None and 'failureSuppressionEnabled' in kwargs: + failure_suppression_enabled = kwargs['failureSuppressionEnabled'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if protected_settings_from_key_vault is None and 'protectedSettingsFromKeyVault' in kwargs: + protected_settings_from_key_vault = kwargs['protectedSettingsFromKeyVault'] + if provision_after_extensions is None and 'provisionAfterExtensions' in kwargs: + provision_after_extensions = kwargs['provisionAfterExtensions'] + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if auto_upgrade_minor_version is not None: - pulumi.set(__self__, "auto_upgrade_minor_version", auto_upgrade_minor_version) + _setter("auto_upgrade_minor_version", auto_upgrade_minor_version) if automatic_upgrade_enabled is not None: - pulumi.set(__self__, "automatic_upgrade_enabled", automatic_upgrade_enabled) + _setter("automatic_upgrade_enabled", automatic_upgrade_enabled) if failure_suppression_enabled is not None: - pulumi.set(__self__, "failure_suppression_enabled", failure_suppression_enabled) + _setter("failure_suppression_enabled", failure_suppression_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if protected_settings_from_key_vault is not None: - pulumi.set(__self__, "protected_settings_from_key_vault", protected_settings_from_key_vault) + _setter("protected_settings_from_key_vault", protected_settings_from_key_vault) if provision_after_extensions is not None: - pulumi.set(__self__, "provision_after_extensions", provision_after_extensions) + _setter("provision_after_extensions", provision_after_extensions) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if type_handler_version is not None: - pulumi.set(__self__, "type_handler_version", type_handler_version) + _setter("type_handler_version", type_handler_version) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) @property @pulumi.getter(name="autoUpgradeMinorVersion") @@ -708,6 +818,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ExtensionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -740,6 +854,11 @@ def _internal_init(__self__, __props__.__dict__["failure_suppression_enabled"] = failure_suppression_enabled __props__.__dict__["name"] = name __props__.__dict__["protected_settings"] = None if protected_settings is None else pulumi.Output.secret(protected_settings) + if protected_settings_from_key_vault is not None and not isinstance(protected_settings_from_key_vault, ExtensionProtectedSettingsFromKeyVaultArgs): + protected_settings_from_key_vault = protected_settings_from_key_vault or {} + def _setter(key, value): + protected_settings_from_key_vault[key] = value + ExtensionProtectedSettingsFromKeyVaultArgs._configure(_setter, **protected_settings_from_key_vault) __props__.__dict__["protected_settings_from_key_vault"] = protected_settings_from_key_vault __props__.__dict__["provision_after_extensions"] = provision_after_extensions if publisher is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/compute/gallery_application.py b/sdk/python/pulumi_azure/compute/gallery_application.py index e683cb8024..3f24e55be2 100644 --- a/sdk/python/pulumi_azure/compute/gallery_application.py +++ b/sdk/python/pulumi_azure/compute/gallery_application.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['GalleryApplicationArgs', 'GalleryApplication'] @@ -37,24 +37,67 @@ def __init__(__self__, *, :param pulumi.Input[str] release_note_uri: The URI containing the Release Notes associated with the Gallery Application. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Gallery Application. """ - pulumi.set(__self__, "gallery_id", gallery_id) - pulumi.set(__self__, "supported_os_type", supported_os_type) + GalleryApplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + gallery_id=gallery_id, + supported_os_type=supported_os_type, + description=description, + end_of_life_date=end_of_life_date, + eula=eula, + location=location, + name=name, + privacy_statement_uri=privacy_statement_uri, + release_note_uri=release_note_uri, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + gallery_id: Optional[pulumi.Input[str]] = None, + supported_os_type: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + end_of_life_date: Optional[pulumi.Input[str]] = None, + eula: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + privacy_statement_uri: Optional[pulumi.Input[str]] = None, + release_note_uri: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if gallery_id is None and 'galleryId' in kwargs: + gallery_id = kwargs['galleryId'] + if gallery_id is None: + raise TypeError("Missing 'gallery_id' argument") + if supported_os_type is None and 'supportedOsType' in kwargs: + supported_os_type = kwargs['supportedOsType'] + if supported_os_type is None: + raise TypeError("Missing 'supported_os_type' argument") + if end_of_life_date is None and 'endOfLifeDate' in kwargs: + end_of_life_date = kwargs['endOfLifeDate'] + if privacy_statement_uri is None and 'privacyStatementUri' in kwargs: + privacy_statement_uri = kwargs['privacyStatementUri'] + if release_note_uri is None and 'releaseNoteUri' in kwargs: + release_note_uri = kwargs['releaseNoteUri'] + + _setter("gallery_id", gallery_id) + _setter("supported_os_type", supported_os_type) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if end_of_life_date is not None: - pulumi.set(__self__, "end_of_life_date", end_of_life_date) + _setter("end_of_life_date", end_of_life_date) if eula is not None: - pulumi.set(__self__, "eula", eula) + _setter("eula", eula) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if privacy_statement_uri is not None: - pulumi.set(__self__, "privacy_statement_uri", privacy_statement_uri) + _setter("privacy_statement_uri", privacy_statement_uri) if release_note_uri is not None: - pulumi.set(__self__, "release_note_uri", release_note_uri) + _setter("release_note_uri", release_note_uri) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="galleryId") @@ -203,26 +246,65 @@ def __init__(__self__, *, :param pulumi.Input[str] supported_os_type: The type of the Operating System supported for the Gallery Application. Possible values are `Linux` and `Windows`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Gallery Application. """ + _GalleryApplicationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + end_of_life_date=end_of_life_date, + eula=eula, + gallery_id=gallery_id, + location=location, + name=name, + privacy_statement_uri=privacy_statement_uri, + release_note_uri=release_note_uri, + supported_os_type=supported_os_type, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + end_of_life_date: Optional[pulumi.Input[str]] = None, + eula: Optional[pulumi.Input[str]] = None, + gallery_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + privacy_statement_uri: Optional[pulumi.Input[str]] = None, + release_note_uri: Optional[pulumi.Input[str]] = None, + supported_os_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_of_life_date is None and 'endOfLifeDate' in kwargs: + end_of_life_date = kwargs['endOfLifeDate'] + if gallery_id is None and 'galleryId' in kwargs: + gallery_id = kwargs['galleryId'] + if privacy_statement_uri is None and 'privacyStatementUri' in kwargs: + privacy_statement_uri = kwargs['privacyStatementUri'] + if release_note_uri is None and 'releaseNoteUri' in kwargs: + release_note_uri = kwargs['releaseNoteUri'] + if supported_os_type is None and 'supportedOsType' in kwargs: + supported_os_type = kwargs['supportedOsType'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if end_of_life_date is not None: - pulumi.set(__self__, "end_of_life_date", end_of_life_date) + _setter("end_of_life_date", end_of_life_date) if eula is not None: - pulumi.set(__self__, "eula", eula) + _setter("eula", eula) if gallery_id is not None: - pulumi.set(__self__, "gallery_id", gallery_id) + _setter("gallery_id", gallery_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if privacy_statement_uri is not None: - pulumi.set(__self__, "privacy_statement_uri", privacy_statement_uri) + _setter("privacy_statement_uri", privacy_statement_uri) if release_note_uri is not None: - pulumi.set(__self__, "release_note_uri", release_note_uri) + _setter("release_note_uri", release_note_uri) if supported_os_type is not None: - pulumi.set(__self__, "supported_os_type", supported_os_type) + _setter("supported_os_type", supported_os_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -444,6 +526,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GalleryApplicationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/gallery_application_version.py b/sdk/python/pulumi_azure/compute/gallery_application_version.py index 36b24268ca..3b6bc4c1cb 100644 --- a/sdk/python/pulumi_azure/compute/gallery_application_version.py +++ b/sdk/python/pulumi_azure/compute/gallery_application_version.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,22 +39,71 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The version name of the Gallery Application Version, such as `1.0.0`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Gallery Application Version. """ - pulumi.set(__self__, "gallery_application_id", gallery_application_id) - pulumi.set(__self__, "manage_action", manage_action) - pulumi.set(__self__, "source", source) - pulumi.set(__self__, "target_regions", target_regions) + GalleryApplicationVersionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + gallery_application_id=gallery_application_id, + manage_action=manage_action, + source=source, + target_regions=target_regions, + enable_health_check=enable_health_check, + end_of_life_date=end_of_life_date, + exclude_from_latest=exclude_from_latest, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + gallery_application_id: Optional[pulumi.Input[str]] = None, + manage_action: Optional[pulumi.Input['GalleryApplicationVersionManageActionArgs']] = None, + source: Optional[pulumi.Input['GalleryApplicationVersionSourceArgs']] = None, + target_regions: Optional[pulumi.Input[Sequence[pulumi.Input['GalleryApplicationVersionTargetRegionArgs']]]] = None, + enable_health_check: Optional[pulumi.Input[bool]] = None, + end_of_life_date: Optional[pulumi.Input[str]] = None, + exclude_from_latest: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if gallery_application_id is None and 'galleryApplicationId' in kwargs: + gallery_application_id = kwargs['galleryApplicationId'] + if gallery_application_id is None: + raise TypeError("Missing 'gallery_application_id' argument") + if manage_action is None and 'manageAction' in kwargs: + manage_action = kwargs['manageAction'] + if manage_action is None: + raise TypeError("Missing 'manage_action' argument") + if source is None: + raise TypeError("Missing 'source' argument") + if target_regions is None and 'targetRegions' in kwargs: + target_regions = kwargs['targetRegions'] + if target_regions is None: + raise TypeError("Missing 'target_regions' argument") + if enable_health_check is None and 'enableHealthCheck' in kwargs: + enable_health_check = kwargs['enableHealthCheck'] + if end_of_life_date is None and 'endOfLifeDate' in kwargs: + end_of_life_date = kwargs['endOfLifeDate'] + if exclude_from_latest is None and 'excludeFromLatest' in kwargs: + exclude_from_latest = kwargs['excludeFromLatest'] + + _setter("gallery_application_id", gallery_application_id) + _setter("manage_action", manage_action) + _setter("source", source) + _setter("target_regions", target_regions) if enable_health_check is not None: - pulumi.set(__self__, "enable_health_check", enable_health_check) + _setter("enable_health_check", enable_health_check) if end_of_life_date is not None: - pulumi.set(__self__, "end_of_life_date", end_of_life_date) + _setter("end_of_life_date", end_of_life_date) if exclude_from_latest is not None: - pulumi.set(__self__, "exclude_from_latest", exclude_from_latest) + _setter("exclude_from_latest", exclude_from_latest) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="galleryApplicationId") @@ -203,26 +252,67 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Gallery Application Version. :param pulumi.Input[Sequence[pulumi.Input['GalleryApplicationVersionTargetRegionArgs']]] target_regions: One or more `target_region` blocks as defined below. """ + _GalleryApplicationVersionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + enable_health_check=enable_health_check, + end_of_life_date=end_of_life_date, + exclude_from_latest=exclude_from_latest, + gallery_application_id=gallery_application_id, + location=location, + manage_action=manage_action, + name=name, + source=source, + tags=tags, + target_regions=target_regions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enable_health_check: Optional[pulumi.Input[bool]] = None, + end_of_life_date: Optional[pulumi.Input[str]] = None, + exclude_from_latest: Optional[pulumi.Input[bool]] = None, + gallery_application_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + manage_action: Optional[pulumi.Input['GalleryApplicationVersionManageActionArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input['GalleryApplicationVersionSourceArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_regions: Optional[pulumi.Input[Sequence[pulumi.Input['GalleryApplicationVersionTargetRegionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enable_health_check is None and 'enableHealthCheck' in kwargs: + enable_health_check = kwargs['enableHealthCheck'] + if end_of_life_date is None and 'endOfLifeDate' in kwargs: + end_of_life_date = kwargs['endOfLifeDate'] + if exclude_from_latest is None and 'excludeFromLatest' in kwargs: + exclude_from_latest = kwargs['excludeFromLatest'] + if gallery_application_id is None and 'galleryApplicationId' in kwargs: + gallery_application_id = kwargs['galleryApplicationId'] + if manage_action is None and 'manageAction' in kwargs: + manage_action = kwargs['manageAction'] + if target_regions is None and 'targetRegions' in kwargs: + target_regions = kwargs['targetRegions'] + if enable_health_check is not None: - pulumi.set(__self__, "enable_health_check", enable_health_check) + _setter("enable_health_check", enable_health_check) if end_of_life_date is not None: - pulumi.set(__self__, "end_of_life_date", end_of_life_date) + _setter("end_of_life_date", end_of_life_date) if exclude_from_latest is not None: - pulumi.set(__self__, "exclude_from_latest", exclude_from_latest) + _setter("exclude_from_latest", exclude_from_latest) if gallery_application_id is not None: - pulumi.set(__self__, "gallery_application_id", gallery_application_id) + _setter("gallery_application_id", gallery_application_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if manage_action is not None: - pulumi.set(__self__, "manage_action", manage_action) + _setter("manage_action", manage_action) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_regions is not None: - pulumi.set(__self__, "target_regions", target_regions) + _setter("target_regions", target_regions) @property @pulumi.getter(name="enableHealthCheck") @@ -498,6 +588,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GalleryApplicationVersionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -529,10 +623,20 @@ def _internal_init(__self__, raise TypeError("Missing required property 'gallery_application_id'") __props__.__dict__["gallery_application_id"] = gallery_application_id __props__.__dict__["location"] = location + if manage_action is not None and not isinstance(manage_action, GalleryApplicationVersionManageActionArgs): + manage_action = manage_action or {} + def _setter(key, value): + manage_action[key] = value + GalleryApplicationVersionManageActionArgs._configure(_setter, **manage_action) if manage_action is None and not opts.urn: raise TypeError("Missing required property 'manage_action'") __props__.__dict__["manage_action"] = manage_action __props__.__dict__["name"] = name + if source is not None and not isinstance(source, GalleryApplicationVersionSourceArgs): + source = source or {} + def _setter(key, value): + source[key] = value + GalleryApplicationVersionSourceArgs._configure(_setter, **source) if source is None and not opts.urn: raise TypeError("Missing required property 'source'") __props__.__dict__["source"] = source diff --git a/sdk/python/pulumi_azure/compute/get_availability_set.py b/sdk/python/pulumi_azure/compute/get_availability_set.py index fa6823ad94..431997ea85 100644 --- a/sdk/python/pulumi_azure/compute/get_availability_set.py +++ b/sdk/python/pulumi_azure/compute/get_availability_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/compute/get_bastion_host.py b/sdk/python/pulumi_azure/compute/get_bastion_host.py index b96afe7873..fbdcc0bc9f 100644 --- a/sdk/python/pulumi_azure/compute/get_bastion_host.py +++ b/sdk/python/pulumi_azure/compute/get_bastion_host.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/compute/get_confidential_ledger.py b/sdk/python/pulumi_azure/compute/get_confidential_ledger.py index e1fed2aa41..20bdf11ad6 100644 --- a/sdk/python/pulumi_azure/compute/get_confidential_ledger.py +++ b/sdk/python/pulumi_azure/compute/get_confidential_ledger.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/compute/get_dedicated_host.py b/sdk/python/pulumi_azure/compute/get_dedicated_host.py index 520d69ac1b..8996a534fb 100644 --- a/sdk/python/pulumi_azure/compute/get_dedicated_host.py +++ b/sdk/python/pulumi_azure/compute/get_dedicated_host.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/compute/get_dedicated_host_group.py b/sdk/python/pulumi_azure/compute/get_dedicated_host_group.py index 9da766eab6..e9437de6c4 100644 --- a/sdk/python/pulumi_azure/compute/get_dedicated_host_group.py +++ b/sdk/python/pulumi_azure/compute/get_dedicated_host_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/compute/get_disk_access.py b/sdk/python/pulumi_azure/compute/get_disk_access.py index 30f54e09d0..dc0dd55e9f 100644 --- a/sdk/python/pulumi_azure/compute/get_disk_access.py +++ b/sdk/python/pulumi_azure/compute/get_disk_access.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/compute/get_disk_encryption_set.py b/sdk/python/pulumi_azure/compute/get_disk_encryption_set.py index 8900b42860..adaad309a1 100644 --- a/sdk/python/pulumi_azure/compute/get_disk_encryption_set.py +++ b/sdk/python/pulumi_azure/compute/get_disk_encryption_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/compute/get_image.py b/sdk/python/pulumi_azure/compute/get_image.py index bfc8fab688..799f369785 100644 --- a/sdk/python/pulumi_azure/compute/get_image.py +++ b/sdk/python/pulumi_azure/compute/get_image.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/compute/get_images.py b/sdk/python/pulumi_azure/compute/get_images.py index 2156648147..9c7c575c06 100644 --- a/sdk/python/pulumi_azure/compute/get_images.py +++ b/sdk/python/pulumi_azure/compute/get_images.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/compute/get_managed_disk.py b/sdk/python/pulumi_azure/compute/get_managed_disk.py index 88ae7e5dff..904bfc5cc8 100644 --- a/sdk/python/pulumi_azure/compute/get_managed_disk.py +++ b/sdk/python/pulumi_azure/compute/get_managed_disk.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/compute/get_orchestrated_virtual_machine_scale_set.py b/sdk/python/pulumi_azure/compute/get_orchestrated_virtual_machine_scale_set.py index 6a64ece84c..ff4eeac53a 100644 --- a/sdk/python/pulumi_azure/compute/get_orchestrated_virtual_machine_scale_set.py +++ b/sdk/python/pulumi_azure/compute/get_orchestrated_virtual_machine_scale_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/compute/get_platform_image.py b/sdk/python/pulumi_azure/compute/get_platform_image.py index f3802c1c94..0a295e3019 100644 --- a/sdk/python/pulumi_azure/compute/get_platform_image.py +++ b/sdk/python/pulumi_azure/compute/get_platform_image.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/compute/get_shared_image.py b/sdk/python/pulumi_azure/compute/get_shared_image.py index 4d60927929..7e01cd8eb6 100644 --- a/sdk/python/pulumi_azure/compute/get_shared_image.py +++ b/sdk/python/pulumi_azure/compute/get_shared_image.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/compute/get_shared_image_gallery.py b/sdk/python/pulumi_azure/compute/get_shared_image_gallery.py index b8b92e0d52..732a530a27 100644 --- a/sdk/python/pulumi_azure/compute/get_shared_image_gallery.py +++ b/sdk/python/pulumi_azure/compute/get_shared_image_gallery.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/compute/get_shared_image_version.py b/sdk/python/pulumi_azure/compute/get_shared_image_version.py index e9639beb5a..732bdcb5c5 100644 --- a/sdk/python/pulumi_azure/compute/get_shared_image_version.py +++ b/sdk/python/pulumi_azure/compute/get_shared_image_version.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/compute/get_shared_image_versions.py b/sdk/python/pulumi_azure/compute/get_shared_image_versions.py index 17e7d91499..ca528dd85b 100644 --- a/sdk/python/pulumi_azure/compute/get_shared_image_versions.py +++ b/sdk/python/pulumi_azure/compute/get_shared_image_versions.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/compute/get_snapshot.py b/sdk/python/pulumi_azure/compute/get_snapshot.py index 7d3aacf032..7145aa4227 100644 --- a/sdk/python/pulumi_azure/compute/get_snapshot.py +++ b/sdk/python/pulumi_azure/compute/get_snapshot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/compute/get_ssh_public_key.py b/sdk/python/pulumi_azure/compute/get_ssh_public_key.py index ea09bf0d8b..ebcb9a553b 100644 --- a/sdk/python/pulumi_azure/compute/get_ssh_public_key.py +++ b/sdk/python/pulumi_azure/compute/get_ssh_public_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/compute/get_virtual_machine.py b/sdk/python/pulumi_azure/compute/get_virtual_machine.py index fe293ae536..2dff170af7 100644 --- a/sdk/python/pulumi_azure/compute/get_virtual_machine.py +++ b/sdk/python/pulumi_azure/compute/get_virtual_machine.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/compute/get_virtual_machine_scale_set.py b/sdk/python/pulumi_azure/compute/get_virtual_machine_scale_set.py index 69b79f595f..a3d04fa126 100644 --- a/sdk/python/pulumi_azure/compute/get_virtual_machine_scale_set.py +++ b/sdk/python/pulumi_azure/compute/get_virtual_machine_scale_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/compute/image.py b/sdk/python/pulumi_azure/compute/image.py index c68e5ce53d..65cb42eab0 100644 --- a/sdk/python/pulumi_azure/compute/image.py +++ b/sdk/python/pulumi_azure/compute/image.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,23 +41,64 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] zone_resilient: Is zone resiliency enabled? Defaults to `false`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + ImageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + data_disks=data_disks, + hyper_v_generation=hyper_v_generation, + location=location, + name=name, + os_disk=os_disk, + source_virtual_machine_id=source_virtual_machine_id, + tags=tags, + zone_resilient=zone_resilient, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['ImageDataDiskArgs']]]] = None, + hyper_v_generation: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + os_disk: Optional[pulumi.Input['ImageOsDiskArgs']] = None, + source_virtual_machine_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_resilient: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if data_disks is None and 'dataDisks' in kwargs: + data_disks = kwargs['dataDisks'] + if hyper_v_generation is None and 'hyperVGeneration' in kwargs: + hyper_v_generation = kwargs['hyperVGeneration'] + if os_disk is None and 'osDisk' in kwargs: + os_disk = kwargs['osDisk'] + if source_virtual_machine_id is None and 'sourceVirtualMachineId' in kwargs: + source_virtual_machine_id = kwargs['sourceVirtualMachineId'] + if zone_resilient is None and 'zoneResilient' in kwargs: + zone_resilient = kwargs['zoneResilient'] + + _setter("resource_group_name", resource_group_name) if data_disks is not None: - pulumi.set(__self__, "data_disks", data_disks) + _setter("data_disks", data_disks) if hyper_v_generation is not None: - pulumi.set(__self__, "hyper_v_generation", hyper_v_generation) + _setter("hyper_v_generation", hyper_v_generation) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_disk is not None: - pulumi.set(__self__, "os_disk", os_disk) + _setter("os_disk", os_disk) if source_virtual_machine_id is not None: - pulumi.set(__self__, "source_virtual_machine_id", source_virtual_machine_id) + _setter("source_virtual_machine_id", source_virtual_machine_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_resilient is not None: - pulumi.set(__self__, "zone_resilient", zone_resilient) + _setter("zone_resilient", zone_resilient) @property @pulumi.getter(name="resourceGroupName") @@ -200,24 +241,63 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] zone_resilient: Is zone resiliency enabled? Defaults to `false`. Changing this forces a new resource to be created. """ + _ImageState._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_disks=data_disks, + hyper_v_generation=hyper_v_generation, + location=location, + name=name, + os_disk=os_disk, + resource_group_name=resource_group_name, + source_virtual_machine_id=source_virtual_machine_id, + tags=tags, + zone_resilient=zone_resilient, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['ImageDataDiskArgs']]]] = None, + hyper_v_generation: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + os_disk: Optional[pulumi.Input['ImageOsDiskArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source_virtual_machine_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_resilient: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_disks is None and 'dataDisks' in kwargs: + data_disks = kwargs['dataDisks'] + if hyper_v_generation is None and 'hyperVGeneration' in kwargs: + hyper_v_generation = kwargs['hyperVGeneration'] + if os_disk is None and 'osDisk' in kwargs: + os_disk = kwargs['osDisk'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if source_virtual_machine_id is None and 'sourceVirtualMachineId' in kwargs: + source_virtual_machine_id = kwargs['sourceVirtualMachineId'] + if zone_resilient is None and 'zoneResilient' in kwargs: + zone_resilient = kwargs['zoneResilient'] + if data_disks is not None: - pulumi.set(__self__, "data_disks", data_disks) + _setter("data_disks", data_disks) if hyper_v_generation is not None: - pulumi.set(__self__, "hyper_v_generation", hyper_v_generation) + _setter("hyper_v_generation", hyper_v_generation) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_disk is not None: - pulumi.set(__self__, "os_disk", os_disk) + _setter("os_disk", os_disk) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if source_virtual_machine_id is not None: - pulumi.set(__self__, "source_virtual_machine_id", source_virtual_machine_id) + _setter("source_virtual_machine_id", source_virtual_machine_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_resilient is not None: - pulumi.set(__self__, "zone_resilient", zone_resilient) + _setter("zone_resilient", zone_resilient) @property @pulumi.getter(name="dataDisks") @@ -397,6 +477,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ImageArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -424,6 +508,11 @@ def _internal_init(__self__, __props__.__dict__["hyper_v_generation"] = hyper_v_generation __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if os_disk is not None and not isinstance(os_disk, ImageOsDiskArgs): + os_disk = os_disk or {} + def _setter(key, value): + os_disk[key] = value + ImageOsDiskArgs._configure(_setter, **os_disk) __props__.__dict__["os_disk"] = os_disk if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") diff --git a/sdk/python/pulumi_azure/compute/linux_virtual_machine.py b/sdk/python/pulumi_azure/compute/linux_virtual_machine.py index 88c125f9d3..01cf8a434a 100644 --- a/sdk/python/pulumi_azure/compute/linux_virtual_machine.py +++ b/sdk/python/pulumi_azure/compute/linux_virtual_machine.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -142,93 +142,278 @@ def __init__(__self__, *, :param pulumi.Input[bool] vtpm_enabled: Specifies whether vTPM should be enabled on the virtual machine. Changing this forces a new resource to be created. :param pulumi.Input[str] zone: Specifies the Availability Zones in which this Linux Virtual Machine should be located. Changing this forces a new Linux Virtual Machine to be created. """ - pulumi.set(__self__, "admin_username", admin_username) - pulumi.set(__self__, "network_interface_ids", network_interface_ids) - pulumi.set(__self__, "os_disk", os_disk) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "size", size) + LinuxVirtualMachineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + network_interface_ids=network_interface_ids, + os_disk=os_disk, + resource_group_name=resource_group_name, + size=size, + additional_capabilities=additional_capabilities, + admin_password=admin_password, + admin_ssh_keys=admin_ssh_keys, + allow_extension_operations=allow_extension_operations, + availability_set_id=availability_set_id, + boot_diagnostics=boot_diagnostics, + bypass_platform_safety_checks_on_user_schedule_enabled=bypass_platform_safety_checks_on_user_schedule_enabled, + capacity_reservation_group_id=capacity_reservation_group_id, + computer_name=computer_name, + custom_data=custom_data, + dedicated_host_group_id=dedicated_host_group_id, + dedicated_host_id=dedicated_host_id, + disable_password_authentication=disable_password_authentication, + edge_zone=edge_zone, + encryption_at_host_enabled=encryption_at_host_enabled, + eviction_policy=eviction_policy, + extensions_time_budget=extensions_time_budget, + gallery_applications=gallery_applications, + identity=identity, + license_type=license_type, + location=location, + max_bid_price=max_bid_price, + name=name, + patch_assessment_mode=patch_assessment_mode, + patch_mode=patch_mode, + plan=plan, + platform_fault_domain=platform_fault_domain, + priority=priority, + provision_vm_agent=provision_vm_agent, + proximity_placement_group_id=proximity_placement_group_id, + reboot_setting=reboot_setting, + secrets=secrets, + secure_boot_enabled=secure_boot_enabled, + source_image_id=source_image_id, + source_image_reference=source_image_reference, + tags=tags, + termination_notification=termination_notification, + user_data=user_data, + virtual_machine_scale_set_id=virtual_machine_scale_set_id, + vtpm_enabled=vtpm_enabled, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[pulumi.Input[str]] = None, + network_interface_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + os_disk: Optional[pulumi.Input['LinuxVirtualMachineOsDiskArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + size: Optional[pulumi.Input[str]] = None, + additional_capabilities: Optional[pulumi.Input['LinuxVirtualMachineAdditionalCapabilitiesArgs']] = None, + admin_password: Optional[pulumi.Input[str]] = None, + admin_ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineAdminSshKeyArgs']]]] = None, + allow_extension_operations: Optional[pulumi.Input[bool]] = None, + availability_set_id: Optional[pulumi.Input[str]] = None, + boot_diagnostics: Optional[pulumi.Input['LinuxVirtualMachineBootDiagnosticsArgs']] = None, + bypass_platform_safety_checks_on_user_schedule_enabled: Optional[pulumi.Input[bool]] = None, + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + computer_name: Optional[pulumi.Input[str]] = None, + custom_data: Optional[pulumi.Input[str]] = None, + dedicated_host_group_id: Optional[pulumi.Input[str]] = None, + dedicated_host_id: Optional[pulumi.Input[str]] = None, + disable_password_authentication: Optional[pulumi.Input[bool]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + extensions_time_budget: Optional[pulumi.Input[str]] = None, + gallery_applications: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineGalleryApplicationArgs']]]] = None, + identity: Optional[pulumi.Input['LinuxVirtualMachineIdentityArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_bid_price: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + patch_assessment_mode: Optional[pulumi.Input[str]] = None, + patch_mode: Optional[pulumi.Input[str]] = None, + plan: Optional[pulumi.Input['LinuxVirtualMachinePlanArgs']] = None, + platform_fault_domain: Optional[pulumi.Input[int]] = None, + priority: Optional[pulumi.Input[str]] = None, + provision_vm_agent: Optional[pulumi.Input[bool]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + reboot_setting: Optional[pulumi.Input[str]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineSecretArgs']]]] = None, + secure_boot_enabled: Optional[pulumi.Input[bool]] = None, + source_image_id: Optional[pulumi.Input[str]] = None, + source_image_reference: Optional[pulumi.Input['LinuxVirtualMachineSourceImageReferenceArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + termination_notification: Optional[pulumi.Input['LinuxVirtualMachineTerminationNotificationArgs']] = None, + user_data: Optional[pulumi.Input[str]] = None, + virtual_machine_scale_set_id: Optional[pulumi.Input[str]] = None, + vtpm_enabled: Optional[pulumi.Input[bool]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if network_interface_ids is None and 'networkInterfaceIds' in kwargs: + network_interface_ids = kwargs['networkInterfaceIds'] + if network_interface_ids is None: + raise TypeError("Missing 'network_interface_ids' argument") + if os_disk is None and 'osDisk' in kwargs: + os_disk = kwargs['osDisk'] + if os_disk is None: + raise TypeError("Missing 'os_disk' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if size is None: + raise TypeError("Missing 'size' argument") + if additional_capabilities is None and 'additionalCapabilities' in kwargs: + additional_capabilities = kwargs['additionalCapabilities'] + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if admin_ssh_keys is None and 'adminSshKeys' in kwargs: + admin_ssh_keys = kwargs['adminSshKeys'] + if allow_extension_operations is None and 'allowExtensionOperations' in kwargs: + allow_extension_operations = kwargs['allowExtensionOperations'] + if availability_set_id is None and 'availabilitySetId' in kwargs: + availability_set_id = kwargs['availabilitySetId'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if bypass_platform_safety_checks_on_user_schedule_enabled is None and 'bypassPlatformSafetyChecksOnUserScheduleEnabled' in kwargs: + bypass_platform_safety_checks_on_user_schedule_enabled = kwargs['bypassPlatformSafetyChecksOnUserScheduleEnabled'] + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if computer_name is None and 'computerName' in kwargs: + computer_name = kwargs['computerName'] + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + if dedicated_host_group_id is None and 'dedicatedHostGroupId' in kwargs: + dedicated_host_group_id = kwargs['dedicatedHostGroupId'] + if dedicated_host_id is None and 'dedicatedHostId' in kwargs: + dedicated_host_id = kwargs['dedicatedHostId'] + if disable_password_authentication is None and 'disablePasswordAuthentication' in kwargs: + disable_password_authentication = kwargs['disablePasswordAuthentication'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if extensions_time_budget is None and 'extensionsTimeBudget' in kwargs: + extensions_time_budget = kwargs['extensionsTimeBudget'] + if gallery_applications is None and 'galleryApplications' in kwargs: + gallery_applications = kwargs['galleryApplications'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_bid_price is None and 'maxBidPrice' in kwargs: + max_bid_price = kwargs['maxBidPrice'] + if patch_assessment_mode is None and 'patchAssessmentMode' in kwargs: + patch_assessment_mode = kwargs['patchAssessmentMode'] + if patch_mode is None and 'patchMode' in kwargs: + patch_mode = kwargs['patchMode'] + if platform_fault_domain is None and 'platformFaultDomain' in kwargs: + platform_fault_domain = kwargs['platformFaultDomain'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if reboot_setting is None and 'rebootSetting' in kwargs: + reboot_setting = kwargs['rebootSetting'] + if secure_boot_enabled is None and 'secureBootEnabled' in kwargs: + secure_boot_enabled = kwargs['secureBootEnabled'] + if source_image_id is None and 'sourceImageId' in kwargs: + source_image_id = kwargs['sourceImageId'] + if source_image_reference is None and 'sourceImageReference' in kwargs: + source_image_reference = kwargs['sourceImageReference'] + if termination_notification is None and 'terminationNotification' in kwargs: + termination_notification = kwargs['terminationNotification'] + if user_data is None and 'userData' in kwargs: + user_data = kwargs['userData'] + if virtual_machine_scale_set_id is None and 'virtualMachineScaleSetId' in kwargs: + virtual_machine_scale_set_id = kwargs['virtualMachineScaleSetId'] + if vtpm_enabled is None and 'vtpmEnabled' in kwargs: + vtpm_enabled = kwargs['vtpmEnabled'] + + _setter("admin_username", admin_username) + _setter("network_interface_ids", network_interface_ids) + _setter("os_disk", os_disk) + _setter("resource_group_name", resource_group_name) + _setter("size", size) if additional_capabilities is not None: - pulumi.set(__self__, "additional_capabilities", additional_capabilities) + _setter("additional_capabilities", additional_capabilities) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if admin_ssh_keys is not None: - pulumi.set(__self__, "admin_ssh_keys", admin_ssh_keys) + _setter("admin_ssh_keys", admin_ssh_keys) if allow_extension_operations is not None: - pulumi.set(__self__, "allow_extension_operations", allow_extension_operations) + _setter("allow_extension_operations", allow_extension_operations) if availability_set_id is not None: - pulumi.set(__self__, "availability_set_id", availability_set_id) + _setter("availability_set_id", availability_set_id) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if bypass_platform_safety_checks_on_user_schedule_enabled is not None: - pulumi.set(__self__, "bypass_platform_safety_checks_on_user_schedule_enabled", bypass_platform_safety_checks_on_user_schedule_enabled) + _setter("bypass_platform_safety_checks_on_user_schedule_enabled", bypass_platform_safety_checks_on_user_schedule_enabled) if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if computer_name is not None: - pulumi.set(__self__, "computer_name", computer_name) + _setter("computer_name", computer_name) if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) if dedicated_host_group_id is not None: - pulumi.set(__self__, "dedicated_host_group_id", dedicated_host_group_id) + _setter("dedicated_host_group_id", dedicated_host_group_id) if dedicated_host_id is not None: - pulumi.set(__self__, "dedicated_host_id", dedicated_host_id) + _setter("dedicated_host_id", dedicated_host_id) if disable_password_authentication is not None: - pulumi.set(__self__, "disable_password_authentication", disable_password_authentication) + _setter("disable_password_authentication", disable_password_authentication) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if extensions_time_budget is not None: - pulumi.set(__self__, "extensions_time_budget", extensions_time_budget) + _setter("extensions_time_budget", extensions_time_budget) if gallery_applications is not None: - pulumi.set(__self__, "gallery_applications", gallery_applications) + _setter("gallery_applications", gallery_applications) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_bid_price is not None: - pulumi.set(__self__, "max_bid_price", max_bid_price) + _setter("max_bid_price", max_bid_price) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if patch_assessment_mode is not None: - pulumi.set(__self__, "patch_assessment_mode", patch_assessment_mode) + _setter("patch_assessment_mode", patch_assessment_mode) if patch_mode is not None: - pulumi.set(__self__, "patch_mode", patch_mode) + _setter("patch_mode", patch_mode) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if platform_fault_domain is not None: - pulumi.set(__self__, "platform_fault_domain", platform_fault_domain) + _setter("platform_fault_domain", platform_fault_domain) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if reboot_setting is not None: - pulumi.set(__self__, "reboot_setting", reboot_setting) + _setter("reboot_setting", reboot_setting) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) if secure_boot_enabled is not None: - pulumi.set(__self__, "secure_boot_enabled", secure_boot_enabled) + _setter("secure_boot_enabled", secure_boot_enabled) if source_image_id is not None: - pulumi.set(__self__, "source_image_id", source_image_id) + _setter("source_image_id", source_image_id) if source_image_reference is not None: - pulumi.set(__self__, "source_image_reference", source_image_reference) + _setter("source_image_reference", source_image_reference) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if termination_notification is not None: - pulumi.set(__self__, "termination_notification", termination_notification) + _setter("termination_notification", termination_notification) if user_data is not None: - pulumi.set(__self__, "user_data", user_data) + _setter("user_data", user_data) if virtual_machine_scale_set_id is not None: - pulumi.set(__self__, "virtual_machine_scale_set_id", virtual_machine_scale_set_id) + _setter("virtual_machine_scale_set_id", virtual_machine_scale_set_id) if vtpm_enabled is not None: - pulumi.set(__self__, "vtpm_enabled", vtpm_enabled) + _setter("vtpm_enabled", vtpm_enabled) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="adminUsername") @@ -953,108 +1138,303 @@ def __init__(__self__, *, :param pulumi.Input[bool] vtpm_enabled: Specifies whether vTPM should be enabled on the virtual machine. Changing this forces a new resource to be created. :param pulumi.Input[str] zone: Specifies the Availability Zones in which this Linux Virtual Machine should be located. Changing this forces a new Linux Virtual Machine to be created. """ + _LinuxVirtualMachineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_capabilities=additional_capabilities, + admin_password=admin_password, + admin_ssh_keys=admin_ssh_keys, + admin_username=admin_username, + allow_extension_operations=allow_extension_operations, + availability_set_id=availability_set_id, + boot_diagnostics=boot_diagnostics, + bypass_platform_safety_checks_on_user_schedule_enabled=bypass_platform_safety_checks_on_user_schedule_enabled, + capacity_reservation_group_id=capacity_reservation_group_id, + computer_name=computer_name, + custom_data=custom_data, + dedicated_host_group_id=dedicated_host_group_id, + dedicated_host_id=dedicated_host_id, + disable_password_authentication=disable_password_authentication, + edge_zone=edge_zone, + encryption_at_host_enabled=encryption_at_host_enabled, + eviction_policy=eviction_policy, + extensions_time_budget=extensions_time_budget, + gallery_applications=gallery_applications, + identity=identity, + license_type=license_type, + location=location, + max_bid_price=max_bid_price, + name=name, + network_interface_ids=network_interface_ids, + os_disk=os_disk, + patch_assessment_mode=patch_assessment_mode, + patch_mode=patch_mode, + plan=plan, + platform_fault_domain=platform_fault_domain, + priority=priority, + private_ip_address=private_ip_address, + private_ip_addresses=private_ip_addresses, + provision_vm_agent=provision_vm_agent, + proximity_placement_group_id=proximity_placement_group_id, + public_ip_address=public_ip_address, + public_ip_addresses=public_ip_addresses, + reboot_setting=reboot_setting, + resource_group_name=resource_group_name, + secrets=secrets, + secure_boot_enabled=secure_boot_enabled, + size=size, + source_image_id=source_image_id, + source_image_reference=source_image_reference, + tags=tags, + termination_notification=termination_notification, + user_data=user_data, + virtual_machine_id=virtual_machine_id, + virtual_machine_scale_set_id=virtual_machine_scale_set_id, + vtpm_enabled=vtpm_enabled, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_capabilities: Optional[pulumi.Input['LinuxVirtualMachineAdditionalCapabilitiesArgs']] = None, + admin_password: Optional[pulumi.Input[str]] = None, + admin_ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineAdminSshKeyArgs']]]] = None, + admin_username: Optional[pulumi.Input[str]] = None, + allow_extension_operations: Optional[pulumi.Input[bool]] = None, + availability_set_id: Optional[pulumi.Input[str]] = None, + boot_diagnostics: Optional[pulumi.Input['LinuxVirtualMachineBootDiagnosticsArgs']] = None, + bypass_platform_safety_checks_on_user_schedule_enabled: Optional[pulumi.Input[bool]] = None, + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + computer_name: Optional[pulumi.Input[str]] = None, + custom_data: Optional[pulumi.Input[str]] = None, + dedicated_host_group_id: Optional[pulumi.Input[str]] = None, + dedicated_host_id: Optional[pulumi.Input[str]] = None, + disable_password_authentication: Optional[pulumi.Input[bool]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + extensions_time_budget: Optional[pulumi.Input[str]] = None, + gallery_applications: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineGalleryApplicationArgs']]]] = None, + identity: Optional[pulumi.Input['LinuxVirtualMachineIdentityArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_bid_price: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + network_interface_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + os_disk: Optional[pulumi.Input['LinuxVirtualMachineOsDiskArgs']] = None, + patch_assessment_mode: Optional[pulumi.Input[str]] = None, + patch_mode: Optional[pulumi.Input[str]] = None, + plan: Optional[pulumi.Input['LinuxVirtualMachinePlanArgs']] = None, + platform_fault_domain: Optional[pulumi.Input[int]] = None, + priority: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + private_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + provision_vm_agent: Optional[pulumi.Input[bool]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + public_ip_address: Optional[pulumi.Input[str]] = None, + public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + reboot_setting: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineSecretArgs']]]] = None, + secure_boot_enabled: Optional[pulumi.Input[bool]] = None, + size: Optional[pulumi.Input[str]] = None, + source_image_id: Optional[pulumi.Input[str]] = None, + source_image_reference: Optional[pulumi.Input['LinuxVirtualMachineSourceImageReferenceArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + termination_notification: Optional[pulumi.Input['LinuxVirtualMachineTerminationNotificationArgs']] = None, + user_data: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + virtual_machine_scale_set_id: Optional[pulumi.Input[str]] = None, + vtpm_enabled: Optional[pulumi.Input[bool]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_capabilities is None and 'additionalCapabilities' in kwargs: + additional_capabilities = kwargs['additionalCapabilities'] + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if admin_ssh_keys is None and 'adminSshKeys' in kwargs: + admin_ssh_keys = kwargs['adminSshKeys'] + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if allow_extension_operations is None and 'allowExtensionOperations' in kwargs: + allow_extension_operations = kwargs['allowExtensionOperations'] + if availability_set_id is None and 'availabilitySetId' in kwargs: + availability_set_id = kwargs['availabilitySetId'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if bypass_platform_safety_checks_on_user_schedule_enabled is None and 'bypassPlatformSafetyChecksOnUserScheduleEnabled' in kwargs: + bypass_platform_safety_checks_on_user_schedule_enabled = kwargs['bypassPlatformSafetyChecksOnUserScheduleEnabled'] + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if computer_name is None and 'computerName' in kwargs: + computer_name = kwargs['computerName'] + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + if dedicated_host_group_id is None and 'dedicatedHostGroupId' in kwargs: + dedicated_host_group_id = kwargs['dedicatedHostGroupId'] + if dedicated_host_id is None and 'dedicatedHostId' in kwargs: + dedicated_host_id = kwargs['dedicatedHostId'] + if disable_password_authentication is None and 'disablePasswordAuthentication' in kwargs: + disable_password_authentication = kwargs['disablePasswordAuthentication'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if extensions_time_budget is None and 'extensionsTimeBudget' in kwargs: + extensions_time_budget = kwargs['extensionsTimeBudget'] + if gallery_applications is None and 'galleryApplications' in kwargs: + gallery_applications = kwargs['galleryApplications'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_bid_price is None and 'maxBidPrice' in kwargs: + max_bid_price = kwargs['maxBidPrice'] + if network_interface_ids is None and 'networkInterfaceIds' in kwargs: + network_interface_ids = kwargs['networkInterfaceIds'] + if os_disk is None and 'osDisk' in kwargs: + os_disk = kwargs['osDisk'] + if patch_assessment_mode is None and 'patchAssessmentMode' in kwargs: + patch_assessment_mode = kwargs['patchAssessmentMode'] + if patch_mode is None and 'patchMode' in kwargs: + patch_mode = kwargs['patchMode'] + if platform_fault_domain is None and 'platformFaultDomain' in kwargs: + platform_fault_domain = kwargs['platformFaultDomain'] + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_addresses is None and 'privateIpAddresses' in kwargs: + private_ip_addresses = kwargs['privateIpAddresses'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if public_ip_address is None and 'publicIpAddress' in kwargs: + public_ip_address = kwargs['publicIpAddress'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if reboot_setting is None and 'rebootSetting' in kwargs: + reboot_setting = kwargs['rebootSetting'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secure_boot_enabled is None and 'secureBootEnabled' in kwargs: + secure_boot_enabled = kwargs['secureBootEnabled'] + if source_image_id is None and 'sourceImageId' in kwargs: + source_image_id = kwargs['sourceImageId'] + if source_image_reference is None and 'sourceImageReference' in kwargs: + source_image_reference = kwargs['sourceImageReference'] + if termination_notification is None and 'terminationNotification' in kwargs: + termination_notification = kwargs['terminationNotification'] + if user_data is None and 'userData' in kwargs: + user_data = kwargs['userData'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_scale_set_id is None and 'virtualMachineScaleSetId' in kwargs: + virtual_machine_scale_set_id = kwargs['virtualMachineScaleSetId'] + if vtpm_enabled is None and 'vtpmEnabled' in kwargs: + vtpm_enabled = kwargs['vtpmEnabled'] + if additional_capabilities is not None: - pulumi.set(__self__, "additional_capabilities", additional_capabilities) + _setter("additional_capabilities", additional_capabilities) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if admin_ssh_keys is not None: - pulumi.set(__self__, "admin_ssh_keys", admin_ssh_keys) + _setter("admin_ssh_keys", admin_ssh_keys) if admin_username is not None: - pulumi.set(__self__, "admin_username", admin_username) + _setter("admin_username", admin_username) if allow_extension_operations is not None: - pulumi.set(__self__, "allow_extension_operations", allow_extension_operations) + _setter("allow_extension_operations", allow_extension_operations) if availability_set_id is not None: - pulumi.set(__self__, "availability_set_id", availability_set_id) + _setter("availability_set_id", availability_set_id) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if bypass_platform_safety_checks_on_user_schedule_enabled is not None: - pulumi.set(__self__, "bypass_platform_safety_checks_on_user_schedule_enabled", bypass_platform_safety_checks_on_user_schedule_enabled) + _setter("bypass_platform_safety_checks_on_user_schedule_enabled", bypass_platform_safety_checks_on_user_schedule_enabled) if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if computer_name is not None: - pulumi.set(__self__, "computer_name", computer_name) + _setter("computer_name", computer_name) if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) if dedicated_host_group_id is not None: - pulumi.set(__self__, "dedicated_host_group_id", dedicated_host_group_id) + _setter("dedicated_host_group_id", dedicated_host_group_id) if dedicated_host_id is not None: - pulumi.set(__self__, "dedicated_host_id", dedicated_host_id) + _setter("dedicated_host_id", dedicated_host_id) if disable_password_authentication is not None: - pulumi.set(__self__, "disable_password_authentication", disable_password_authentication) + _setter("disable_password_authentication", disable_password_authentication) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if extensions_time_budget is not None: - pulumi.set(__self__, "extensions_time_budget", extensions_time_budget) + _setter("extensions_time_budget", extensions_time_budget) if gallery_applications is not None: - pulumi.set(__self__, "gallery_applications", gallery_applications) + _setter("gallery_applications", gallery_applications) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_bid_price is not None: - pulumi.set(__self__, "max_bid_price", max_bid_price) + _setter("max_bid_price", max_bid_price) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_interface_ids is not None: - pulumi.set(__self__, "network_interface_ids", network_interface_ids) + _setter("network_interface_ids", network_interface_ids) if os_disk is not None: - pulumi.set(__self__, "os_disk", os_disk) + _setter("os_disk", os_disk) if patch_assessment_mode is not None: - pulumi.set(__self__, "patch_assessment_mode", patch_assessment_mode) + _setter("patch_assessment_mode", patch_assessment_mode) if patch_mode is not None: - pulumi.set(__self__, "patch_mode", patch_mode) + _setter("patch_mode", patch_mode) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if platform_fault_domain is not None: - pulumi.set(__self__, "platform_fault_domain", platform_fault_domain) + _setter("platform_fault_domain", platform_fault_domain) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_addresses is not None: - pulumi.set(__self__, "private_ip_addresses", private_ip_addresses) + _setter("private_ip_addresses", private_ip_addresses) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if public_ip_address is not None: - pulumi.set(__self__, "public_ip_address", public_ip_address) + _setter("public_ip_address", public_ip_address) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if reboot_setting is not None: - pulumi.set(__self__, "reboot_setting", reboot_setting) + _setter("reboot_setting", reboot_setting) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) if secure_boot_enabled is not None: - pulumi.set(__self__, "secure_boot_enabled", secure_boot_enabled) + _setter("secure_boot_enabled", secure_boot_enabled) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if source_image_id is not None: - pulumi.set(__self__, "source_image_id", source_image_id) + _setter("source_image_id", source_image_id) if source_image_reference is not None: - pulumi.set(__self__, "source_image_reference", source_image_reference) + _setter("source_image_reference", source_image_reference) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if termination_notification is not None: - pulumi.set(__self__, "termination_notification", termination_notification) + _setter("termination_notification", termination_notification) if user_data is not None: - pulumi.set(__self__, "user_data", user_data) + _setter("user_data", user_data) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) if virtual_machine_scale_set_id is not None: - pulumi.set(__self__, "virtual_machine_scale_set_id", virtual_machine_scale_set_id) + _setter("virtual_machine_scale_set_id", virtual_machine_scale_set_id) if vtpm_enabled is not None: - pulumi.set(__self__, "vtpm_enabled", vtpm_enabled) + _setter("vtpm_enabled", vtpm_enabled) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="additionalCapabilities") @@ -1988,6 +2368,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinuxVirtualMachineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -2048,6 +2432,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = LinuxVirtualMachineArgs.__new__(LinuxVirtualMachineArgs) + if additional_capabilities is not None and not isinstance(additional_capabilities, LinuxVirtualMachineAdditionalCapabilitiesArgs): + additional_capabilities = additional_capabilities or {} + def _setter(key, value): + additional_capabilities[key] = value + LinuxVirtualMachineAdditionalCapabilitiesArgs._configure(_setter, **additional_capabilities) __props__.__dict__["additional_capabilities"] = additional_capabilities __props__.__dict__["admin_password"] = None if admin_password is None else pulumi.Output.secret(admin_password) __props__.__dict__["admin_ssh_keys"] = admin_ssh_keys @@ -2056,6 +2445,11 @@ def _internal_init(__self__, __props__.__dict__["admin_username"] = admin_username __props__.__dict__["allow_extension_operations"] = allow_extension_operations __props__.__dict__["availability_set_id"] = availability_set_id + if boot_diagnostics is not None and not isinstance(boot_diagnostics, LinuxVirtualMachineBootDiagnosticsArgs): + boot_diagnostics = boot_diagnostics or {} + def _setter(key, value): + boot_diagnostics[key] = value + LinuxVirtualMachineBootDiagnosticsArgs._configure(_setter, **boot_diagnostics) __props__.__dict__["boot_diagnostics"] = boot_diagnostics __props__.__dict__["bypass_platform_safety_checks_on_user_schedule_enabled"] = bypass_platform_safety_checks_on_user_schedule_enabled __props__.__dict__["capacity_reservation_group_id"] = capacity_reservation_group_id @@ -2069,6 +2463,11 @@ def _internal_init(__self__, __props__.__dict__["eviction_policy"] = eviction_policy __props__.__dict__["extensions_time_budget"] = extensions_time_budget __props__.__dict__["gallery_applications"] = gallery_applications + if identity is not None and not isinstance(identity, LinuxVirtualMachineIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + LinuxVirtualMachineIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["license_type"] = license_type __props__.__dict__["location"] = location @@ -2077,11 +2476,21 @@ def _internal_init(__self__, if network_interface_ids is None and not opts.urn: raise TypeError("Missing required property 'network_interface_ids'") __props__.__dict__["network_interface_ids"] = network_interface_ids + if os_disk is not None and not isinstance(os_disk, LinuxVirtualMachineOsDiskArgs): + os_disk = os_disk or {} + def _setter(key, value): + os_disk[key] = value + LinuxVirtualMachineOsDiskArgs._configure(_setter, **os_disk) if os_disk is None and not opts.urn: raise TypeError("Missing required property 'os_disk'") __props__.__dict__["os_disk"] = os_disk __props__.__dict__["patch_assessment_mode"] = patch_assessment_mode __props__.__dict__["patch_mode"] = patch_mode + if plan is not None and not isinstance(plan, LinuxVirtualMachinePlanArgs): + plan = plan or {} + def _setter(key, value): + plan[key] = value + LinuxVirtualMachinePlanArgs._configure(_setter, **plan) __props__.__dict__["plan"] = plan __props__.__dict__["platform_fault_domain"] = platform_fault_domain __props__.__dict__["priority"] = priority @@ -2097,8 +2506,18 @@ def _internal_init(__self__, raise TypeError("Missing required property 'size'") __props__.__dict__["size"] = size __props__.__dict__["source_image_id"] = source_image_id + if source_image_reference is not None and not isinstance(source_image_reference, LinuxVirtualMachineSourceImageReferenceArgs): + source_image_reference = source_image_reference or {} + def _setter(key, value): + source_image_reference[key] = value + LinuxVirtualMachineSourceImageReferenceArgs._configure(_setter, **source_image_reference) __props__.__dict__["source_image_reference"] = source_image_reference __props__.__dict__["tags"] = tags + if termination_notification is not None and not isinstance(termination_notification, LinuxVirtualMachineTerminationNotificationArgs): + termination_notification = termination_notification or {} + def _setter(key, value): + termination_notification[key] = value + LinuxVirtualMachineTerminationNotificationArgs._configure(_setter, **termination_notification) __props__.__dict__["termination_notification"] = termination_notification __props__.__dict__["user_data"] = user_data __props__.__dict__["virtual_machine_scale_set_id"] = virtual_machine_scale_set_id diff --git a/sdk/python/pulumi_azure/compute/linux_virtual_machine_scale_set.py b/sdk/python/pulumi_azure/compute/linux_virtual_machine_scale_set.py index 5b421c90f2..54142ab85a 100644 --- a/sdk/python/pulumi_azure/compute/linux_virtual_machine_scale_set.py +++ b/sdk/python/pulumi_azure/compute/linux_virtual_machine_scale_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -164,120 +164,335 @@ def __init__(__self__, *, > **NOTE:** This can only be set to `true` when one or more `zones` are configured. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones in which this Linux Virtual Machine Scale Set should be located. Changing this forces a new Linux Virtual Machine Scale Set to be created. """ - pulumi.set(__self__, "admin_username", admin_username) - pulumi.set(__self__, "network_interfaces", network_interfaces) - pulumi.set(__self__, "os_disk", os_disk) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + LinuxVirtualMachineScaleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + network_interfaces=network_interfaces, + os_disk=os_disk, + resource_group_name=resource_group_name, + sku=sku, + additional_capabilities=additional_capabilities, + admin_password=admin_password, + admin_ssh_keys=admin_ssh_keys, + automatic_instance_repair=automatic_instance_repair, + automatic_os_upgrade_policy=automatic_os_upgrade_policy, + boot_diagnostics=boot_diagnostics, + capacity_reservation_group_id=capacity_reservation_group_id, + computer_name_prefix=computer_name_prefix, + custom_data=custom_data, + data_disks=data_disks, + disable_password_authentication=disable_password_authentication, + do_not_run_extensions_on_overprovisioned_machines=do_not_run_extensions_on_overprovisioned_machines, + edge_zone=edge_zone, + encryption_at_host_enabled=encryption_at_host_enabled, + eviction_policy=eviction_policy, + extension_operations_enabled=extension_operations_enabled, + extensions=extensions, + extensions_time_budget=extensions_time_budget, + gallery_application=gallery_application, + gallery_applications=gallery_applications, + health_probe_id=health_probe_id, + host_group_id=host_group_id, + identity=identity, + instances=instances, + location=location, + max_bid_price=max_bid_price, + name=name, + overprovision=overprovision, + plan=plan, + platform_fault_domain_count=platform_fault_domain_count, + priority=priority, + provision_vm_agent=provision_vm_agent, + proximity_placement_group_id=proximity_placement_group_id, + rolling_upgrade_policy=rolling_upgrade_policy, + scale_in=scale_in, + scale_in_policy=scale_in_policy, + secrets=secrets, + secure_boot_enabled=secure_boot_enabled, + single_placement_group=single_placement_group, + source_image_id=source_image_id, + source_image_reference=source_image_reference, + spot_restore=spot_restore, + tags=tags, + terminate_notification=terminate_notification, + termination_notification=termination_notification, + upgrade_mode=upgrade_mode, + user_data=user_data, + vtpm_enabled=vtpm_enabled, + zone_balance=zone_balance, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[pulumi.Input[str]] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetNetworkInterfaceArgs']]]] = None, + os_disk: Optional[pulumi.Input['LinuxVirtualMachineScaleSetOsDiskArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + additional_capabilities: Optional[pulumi.Input['LinuxVirtualMachineScaleSetAdditionalCapabilitiesArgs']] = None, + admin_password: Optional[pulumi.Input[str]] = None, + admin_ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetAdminSshKeyArgs']]]] = None, + automatic_instance_repair: Optional[pulumi.Input['LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs']] = None, + automatic_os_upgrade_policy: Optional[pulumi.Input['LinuxVirtualMachineScaleSetAutomaticOsUpgradePolicyArgs']] = None, + boot_diagnostics: Optional[pulumi.Input['LinuxVirtualMachineScaleSetBootDiagnosticsArgs']] = None, + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + computer_name_prefix: Optional[pulumi.Input[str]] = None, + custom_data: Optional[pulumi.Input[str]] = None, + data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetDataDiskArgs']]]] = None, + disable_password_authentication: Optional[pulumi.Input[bool]] = None, + do_not_run_extensions_on_overprovisioned_machines: Optional[pulumi.Input[bool]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + extension_operations_enabled: Optional[pulumi.Input[bool]] = None, + extensions: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetExtensionArgs']]]] = None, + extensions_time_budget: Optional[pulumi.Input[str]] = None, + gallery_application: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetGalleryApplicationArgs']]]] = None, + gallery_applications: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetGalleryApplicationArgs']]]] = None, + health_probe_id: Optional[pulumi.Input[str]] = None, + host_group_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['LinuxVirtualMachineScaleSetIdentityArgs']] = None, + instances: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + max_bid_price: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + overprovision: Optional[pulumi.Input[bool]] = None, + plan: Optional[pulumi.Input['LinuxVirtualMachineScaleSetPlanArgs']] = None, + platform_fault_domain_count: Optional[pulumi.Input[int]] = None, + priority: Optional[pulumi.Input[str]] = None, + provision_vm_agent: Optional[pulumi.Input[bool]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + rolling_upgrade_policy: Optional[pulumi.Input['LinuxVirtualMachineScaleSetRollingUpgradePolicyArgs']] = None, + scale_in: Optional[pulumi.Input['LinuxVirtualMachineScaleSetScaleInArgs']] = None, + scale_in_policy: Optional[pulumi.Input[str]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetSecretArgs']]]] = None, + secure_boot_enabled: Optional[pulumi.Input[bool]] = None, + single_placement_group: Optional[pulumi.Input[bool]] = None, + source_image_id: Optional[pulumi.Input[str]] = None, + source_image_reference: Optional[pulumi.Input['LinuxVirtualMachineScaleSetSourceImageReferenceArgs']] = None, + spot_restore: Optional[pulumi.Input['LinuxVirtualMachineScaleSetSpotRestoreArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + terminate_notification: Optional[pulumi.Input['LinuxVirtualMachineScaleSetTerminateNotificationArgs']] = None, + termination_notification: Optional[pulumi.Input['LinuxVirtualMachineScaleSetTerminationNotificationArgs']] = None, + upgrade_mode: Optional[pulumi.Input[str]] = None, + user_data: Optional[pulumi.Input[str]] = None, + vtpm_enabled: Optional[pulumi.Input[bool]] = None, + zone_balance: Optional[pulumi.Input[bool]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if network_interfaces is None: + raise TypeError("Missing 'network_interfaces' argument") + if os_disk is None and 'osDisk' in kwargs: + os_disk = kwargs['osDisk'] + if os_disk is None: + raise TypeError("Missing 'os_disk' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if additional_capabilities is None and 'additionalCapabilities' in kwargs: + additional_capabilities = kwargs['additionalCapabilities'] + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if admin_ssh_keys is None and 'adminSshKeys' in kwargs: + admin_ssh_keys = kwargs['adminSshKeys'] + if automatic_instance_repair is None and 'automaticInstanceRepair' in kwargs: + automatic_instance_repair = kwargs['automaticInstanceRepair'] + if automatic_os_upgrade_policy is None and 'automaticOsUpgradePolicy' in kwargs: + automatic_os_upgrade_policy = kwargs['automaticOsUpgradePolicy'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if computer_name_prefix is None and 'computerNamePrefix' in kwargs: + computer_name_prefix = kwargs['computerNamePrefix'] + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + if data_disks is None and 'dataDisks' in kwargs: + data_disks = kwargs['dataDisks'] + if disable_password_authentication is None and 'disablePasswordAuthentication' in kwargs: + disable_password_authentication = kwargs['disablePasswordAuthentication'] + if do_not_run_extensions_on_overprovisioned_machines is None and 'doNotRunExtensionsOnOverprovisionedMachines' in kwargs: + do_not_run_extensions_on_overprovisioned_machines = kwargs['doNotRunExtensionsOnOverprovisionedMachines'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if extension_operations_enabled is None and 'extensionOperationsEnabled' in kwargs: + extension_operations_enabled = kwargs['extensionOperationsEnabled'] + if extensions_time_budget is None and 'extensionsTimeBudget' in kwargs: + extensions_time_budget = kwargs['extensionsTimeBudget'] + if gallery_application is None and 'galleryApplication' in kwargs: + gallery_application = kwargs['galleryApplication'] + if gallery_applications is None and 'galleryApplications' in kwargs: + gallery_applications = kwargs['galleryApplications'] + if health_probe_id is None and 'healthProbeId' in kwargs: + health_probe_id = kwargs['healthProbeId'] + if host_group_id is None and 'hostGroupId' in kwargs: + host_group_id = kwargs['hostGroupId'] + if max_bid_price is None and 'maxBidPrice' in kwargs: + max_bid_price = kwargs['maxBidPrice'] + if platform_fault_domain_count is None and 'platformFaultDomainCount' in kwargs: + platform_fault_domain_count = kwargs['platformFaultDomainCount'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if rolling_upgrade_policy is None and 'rollingUpgradePolicy' in kwargs: + rolling_upgrade_policy = kwargs['rollingUpgradePolicy'] + if scale_in is None and 'scaleIn' in kwargs: + scale_in = kwargs['scaleIn'] + if scale_in_policy is None and 'scaleInPolicy' in kwargs: + scale_in_policy = kwargs['scaleInPolicy'] + if secure_boot_enabled is None and 'secureBootEnabled' in kwargs: + secure_boot_enabled = kwargs['secureBootEnabled'] + if single_placement_group is None and 'singlePlacementGroup' in kwargs: + single_placement_group = kwargs['singlePlacementGroup'] + if source_image_id is None and 'sourceImageId' in kwargs: + source_image_id = kwargs['sourceImageId'] + if source_image_reference is None and 'sourceImageReference' in kwargs: + source_image_reference = kwargs['sourceImageReference'] + if spot_restore is None and 'spotRestore' in kwargs: + spot_restore = kwargs['spotRestore'] + if terminate_notification is None and 'terminateNotification' in kwargs: + terminate_notification = kwargs['terminateNotification'] + if termination_notification is None and 'terminationNotification' in kwargs: + termination_notification = kwargs['terminationNotification'] + if upgrade_mode is None and 'upgradeMode' in kwargs: + upgrade_mode = kwargs['upgradeMode'] + if user_data is None and 'userData' in kwargs: + user_data = kwargs['userData'] + if vtpm_enabled is None and 'vtpmEnabled' in kwargs: + vtpm_enabled = kwargs['vtpmEnabled'] + if zone_balance is None and 'zoneBalance' in kwargs: + zone_balance = kwargs['zoneBalance'] + + _setter("admin_username", admin_username) + _setter("network_interfaces", network_interfaces) + _setter("os_disk", os_disk) + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if additional_capabilities is not None: - pulumi.set(__self__, "additional_capabilities", additional_capabilities) + _setter("additional_capabilities", additional_capabilities) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if admin_ssh_keys is not None: - pulumi.set(__self__, "admin_ssh_keys", admin_ssh_keys) + _setter("admin_ssh_keys", admin_ssh_keys) if automatic_instance_repair is not None: - pulumi.set(__self__, "automatic_instance_repair", automatic_instance_repair) + _setter("automatic_instance_repair", automatic_instance_repair) if automatic_os_upgrade_policy is not None: - pulumi.set(__self__, "automatic_os_upgrade_policy", automatic_os_upgrade_policy) + _setter("automatic_os_upgrade_policy", automatic_os_upgrade_policy) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if computer_name_prefix is not None: - pulumi.set(__self__, "computer_name_prefix", computer_name_prefix) + _setter("computer_name_prefix", computer_name_prefix) if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) if data_disks is not None: - pulumi.set(__self__, "data_disks", data_disks) + _setter("data_disks", data_disks) if disable_password_authentication is not None: - pulumi.set(__self__, "disable_password_authentication", disable_password_authentication) + _setter("disable_password_authentication", disable_password_authentication) if do_not_run_extensions_on_overprovisioned_machines is not None: - pulumi.set(__self__, "do_not_run_extensions_on_overprovisioned_machines", do_not_run_extensions_on_overprovisioned_machines) + _setter("do_not_run_extensions_on_overprovisioned_machines", do_not_run_extensions_on_overprovisioned_machines) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if extension_operations_enabled is not None: - pulumi.set(__self__, "extension_operations_enabled", extension_operations_enabled) + _setter("extension_operations_enabled", extension_operations_enabled) if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if extensions_time_budget is not None: - pulumi.set(__self__, "extensions_time_budget", extensions_time_budget) + _setter("extensions_time_budget", extensions_time_budget) if gallery_application is not None: - pulumi.set(__self__, "gallery_application", gallery_application) + _setter("gallery_application", gallery_application) if gallery_applications is not None: warnings.warn("""`gallery_applications` has been renamed to `gallery_application` and will be deprecated in 4.0""", DeprecationWarning) pulumi.log.warn("""gallery_applications is deprecated: `gallery_applications` has been renamed to `gallery_application` and will be deprecated in 4.0""") if gallery_applications is not None: - pulumi.set(__self__, "gallery_applications", gallery_applications) + _setter("gallery_applications", gallery_applications) if health_probe_id is not None: - pulumi.set(__self__, "health_probe_id", health_probe_id) + _setter("health_probe_id", health_probe_id) if host_group_id is not None: - pulumi.set(__self__, "host_group_id", host_group_id) + _setter("host_group_id", host_group_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if instances is not None: - pulumi.set(__self__, "instances", instances) + _setter("instances", instances) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_bid_price is not None: - pulumi.set(__self__, "max_bid_price", max_bid_price) + _setter("max_bid_price", max_bid_price) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if overprovision is not None: - pulumi.set(__self__, "overprovision", overprovision) + _setter("overprovision", overprovision) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if platform_fault_domain_count is not None: - pulumi.set(__self__, "platform_fault_domain_count", platform_fault_domain_count) + _setter("platform_fault_domain_count", platform_fault_domain_count) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if rolling_upgrade_policy is not None: - pulumi.set(__self__, "rolling_upgrade_policy", rolling_upgrade_policy) + _setter("rolling_upgrade_policy", rolling_upgrade_policy) if scale_in is not None: - pulumi.set(__self__, "scale_in", scale_in) + _setter("scale_in", scale_in) if scale_in_policy is not None: warnings.warn("""`scale_in_policy` will be removed in favour of the `scale_in` code block in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""scale_in_policy is deprecated: `scale_in_policy` will be removed in favour of the `scale_in` code block in version 4.0 of the AzureRM Provider.""") if scale_in_policy is not None: - pulumi.set(__self__, "scale_in_policy", scale_in_policy) + _setter("scale_in_policy", scale_in_policy) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) if secure_boot_enabled is not None: - pulumi.set(__self__, "secure_boot_enabled", secure_boot_enabled) + _setter("secure_boot_enabled", secure_boot_enabled) if single_placement_group is not None: - pulumi.set(__self__, "single_placement_group", single_placement_group) + _setter("single_placement_group", single_placement_group) if source_image_id is not None: - pulumi.set(__self__, "source_image_id", source_image_id) + _setter("source_image_id", source_image_id) if source_image_reference is not None: - pulumi.set(__self__, "source_image_reference", source_image_reference) + _setter("source_image_reference", source_image_reference) if spot_restore is not None: - pulumi.set(__self__, "spot_restore", spot_restore) + _setter("spot_restore", spot_restore) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if terminate_notification is not None: warnings.warn("""`terminate_notification` has been renamed to `termination_notification` and will be removed in 4.0.""", DeprecationWarning) pulumi.log.warn("""terminate_notification is deprecated: `terminate_notification` has been renamed to `termination_notification` and will be removed in 4.0.""") if terminate_notification is not None: - pulumi.set(__self__, "terminate_notification", terminate_notification) + _setter("terminate_notification", terminate_notification) if termination_notification is not None: - pulumi.set(__self__, "termination_notification", termination_notification) + _setter("termination_notification", termination_notification) if upgrade_mode is not None: - pulumi.set(__self__, "upgrade_mode", upgrade_mode) + _setter("upgrade_mode", upgrade_mode) if user_data is not None: - pulumi.set(__self__, "user_data", user_data) + _setter("user_data", user_data) if vtpm_enabled is not None: - pulumi.set(__self__, "vtpm_enabled", vtpm_enabled) + _setter("vtpm_enabled", vtpm_enabled) if zone_balance is not None: - pulumi.set(__self__, "zone_balance", zone_balance) + _setter("zone_balance", zone_balance) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="adminUsername") @@ -1131,127 +1346,336 @@ def __init__(__self__, *, > **NOTE:** This can only be set to `true` when one or more `zones` are configured. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones in which this Linux Virtual Machine Scale Set should be located. Changing this forces a new Linux Virtual Machine Scale Set to be created. """ + _LinuxVirtualMachineScaleSetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_capabilities=additional_capabilities, + admin_password=admin_password, + admin_ssh_keys=admin_ssh_keys, + admin_username=admin_username, + automatic_instance_repair=automatic_instance_repair, + automatic_os_upgrade_policy=automatic_os_upgrade_policy, + boot_diagnostics=boot_diagnostics, + capacity_reservation_group_id=capacity_reservation_group_id, + computer_name_prefix=computer_name_prefix, + custom_data=custom_data, + data_disks=data_disks, + disable_password_authentication=disable_password_authentication, + do_not_run_extensions_on_overprovisioned_machines=do_not_run_extensions_on_overprovisioned_machines, + edge_zone=edge_zone, + encryption_at_host_enabled=encryption_at_host_enabled, + eviction_policy=eviction_policy, + extension_operations_enabled=extension_operations_enabled, + extensions=extensions, + extensions_time_budget=extensions_time_budget, + gallery_application=gallery_application, + gallery_applications=gallery_applications, + health_probe_id=health_probe_id, + host_group_id=host_group_id, + identity=identity, + instances=instances, + location=location, + max_bid_price=max_bid_price, + name=name, + network_interfaces=network_interfaces, + os_disk=os_disk, + overprovision=overprovision, + plan=plan, + platform_fault_domain_count=platform_fault_domain_count, + priority=priority, + provision_vm_agent=provision_vm_agent, + proximity_placement_group_id=proximity_placement_group_id, + resource_group_name=resource_group_name, + rolling_upgrade_policy=rolling_upgrade_policy, + scale_in=scale_in, + scale_in_policy=scale_in_policy, + secrets=secrets, + secure_boot_enabled=secure_boot_enabled, + single_placement_group=single_placement_group, + sku=sku, + source_image_id=source_image_id, + source_image_reference=source_image_reference, + spot_restore=spot_restore, + tags=tags, + terminate_notification=terminate_notification, + termination_notification=termination_notification, + unique_id=unique_id, + upgrade_mode=upgrade_mode, + user_data=user_data, + vtpm_enabled=vtpm_enabled, + zone_balance=zone_balance, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_capabilities: Optional[pulumi.Input['LinuxVirtualMachineScaleSetAdditionalCapabilitiesArgs']] = None, + admin_password: Optional[pulumi.Input[str]] = None, + admin_ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetAdminSshKeyArgs']]]] = None, + admin_username: Optional[pulumi.Input[str]] = None, + automatic_instance_repair: Optional[pulumi.Input['LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs']] = None, + automatic_os_upgrade_policy: Optional[pulumi.Input['LinuxVirtualMachineScaleSetAutomaticOsUpgradePolicyArgs']] = None, + boot_diagnostics: Optional[pulumi.Input['LinuxVirtualMachineScaleSetBootDiagnosticsArgs']] = None, + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + computer_name_prefix: Optional[pulumi.Input[str]] = None, + custom_data: Optional[pulumi.Input[str]] = None, + data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetDataDiskArgs']]]] = None, + disable_password_authentication: Optional[pulumi.Input[bool]] = None, + do_not_run_extensions_on_overprovisioned_machines: Optional[pulumi.Input[bool]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + extension_operations_enabled: Optional[pulumi.Input[bool]] = None, + extensions: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetExtensionArgs']]]] = None, + extensions_time_budget: Optional[pulumi.Input[str]] = None, + gallery_application: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetGalleryApplicationArgs']]]] = None, + gallery_applications: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetGalleryApplicationArgs']]]] = None, + health_probe_id: Optional[pulumi.Input[str]] = None, + host_group_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['LinuxVirtualMachineScaleSetIdentityArgs']] = None, + instances: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + max_bid_price: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetNetworkInterfaceArgs']]]] = None, + os_disk: Optional[pulumi.Input['LinuxVirtualMachineScaleSetOsDiskArgs']] = None, + overprovision: Optional[pulumi.Input[bool]] = None, + plan: Optional[pulumi.Input['LinuxVirtualMachineScaleSetPlanArgs']] = None, + platform_fault_domain_count: Optional[pulumi.Input[int]] = None, + priority: Optional[pulumi.Input[str]] = None, + provision_vm_agent: Optional[pulumi.Input[bool]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rolling_upgrade_policy: Optional[pulumi.Input['LinuxVirtualMachineScaleSetRollingUpgradePolicyArgs']] = None, + scale_in: Optional[pulumi.Input['LinuxVirtualMachineScaleSetScaleInArgs']] = None, + scale_in_policy: Optional[pulumi.Input[str]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineScaleSetSecretArgs']]]] = None, + secure_boot_enabled: Optional[pulumi.Input[bool]] = None, + single_placement_group: Optional[pulumi.Input[bool]] = None, + sku: Optional[pulumi.Input[str]] = None, + source_image_id: Optional[pulumi.Input[str]] = None, + source_image_reference: Optional[pulumi.Input['LinuxVirtualMachineScaleSetSourceImageReferenceArgs']] = None, + spot_restore: Optional[pulumi.Input['LinuxVirtualMachineScaleSetSpotRestoreArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + terminate_notification: Optional[pulumi.Input['LinuxVirtualMachineScaleSetTerminateNotificationArgs']] = None, + termination_notification: Optional[pulumi.Input['LinuxVirtualMachineScaleSetTerminationNotificationArgs']] = None, + unique_id: Optional[pulumi.Input[str]] = None, + upgrade_mode: Optional[pulumi.Input[str]] = None, + user_data: Optional[pulumi.Input[str]] = None, + vtpm_enabled: Optional[pulumi.Input[bool]] = None, + zone_balance: Optional[pulumi.Input[bool]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_capabilities is None and 'additionalCapabilities' in kwargs: + additional_capabilities = kwargs['additionalCapabilities'] + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if admin_ssh_keys is None and 'adminSshKeys' in kwargs: + admin_ssh_keys = kwargs['adminSshKeys'] + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if automatic_instance_repair is None and 'automaticInstanceRepair' in kwargs: + automatic_instance_repair = kwargs['automaticInstanceRepair'] + if automatic_os_upgrade_policy is None and 'automaticOsUpgradePolicy' in kwargs: + automatic_os_upgrade_policy = kwargs['automaticOsUpgradePolicy'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if computer_name_prefix is None and 'computerNamePrefix' in kwargs: + computer_name_prefix = kwargs['computerNamePrefix'] + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + if data_disks is None and 'dataDisks' in kwargs: + data_disks = kwargs['dataDisks'] + if disable_password_authentication is None and 'disablePasswordAuthentication' in kwargs: + disable_password_authentication = kwargs['disablePasswordAuthentication'] + if do_not_run_extensions_on_overprovisioned_machines is None and 'doNotRunExtensionsOnOverprovisionedMachines' in kwargs: + do_not_run_extensions_on_overprovisioned_machines = kwargs['doNotRunExtensionsOnOverprovisionedMachines'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if extension_operations_enabled is None and 'extensionOperationsEnabled' in kwargs: + extension_operations_enabled = kwargs['extensionOperationsEnabled'] + if extensions_time_budget is None and 'extensionsTimeBudget' in kwargs: + extensions_time_budget = kwargs['extensionsTimeBudget'] + if gallery_application is None and 'galleryApplication' in kwargs: + gallery_application = kwargs['galleryApplication'] + if gallery_applications is None and 'galleryApplications' in kwargs: + gallery_applications = kwargs['galleryApplications'] + if health_probe_id is None and 'healthProbeId' in kwargs: + health_probe_id = kwargs['healthProbeId'] + if host_group_id is None and 'hostGroupId' in kwargs: + host_group_id = kwargs['hostGroupId'] + if max_bid_price is None and 'maxBidPrice' in kwargs: + max_bid_price = kwargs['maxBidPrice'] + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if os_disk is None and 'osDisk' in kwargs: + os_disk = kwargs['osDisk'] + if platform_fault_domain_count is None and 'platformFaultDomainCount' in kwargs: + platform_fault_domain_count = kwargs['platformFaultDomainCount'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if rolling_upgrade_policy is None and 'rollingUpgradePolicy' in kwargs: + rolling_upgrade_policy = kwargs['rollingUpgradePolicy'] + if scale_in is None and 'scaleIn' in kwargs: + scale_in = kwargs['scaleIn'] + if scale_in_policy is None and 'scaleInPolicy' in kwargs: + scale_in_policy = kwargs['scaleInPolicy'] + if secure_boot_enabled is None and 'secureBootEnabled' in kwargs: + secure_boot_enabled = kwargs['secureBootEnabled'] + if single_placement_group is None and 'singlePlacementGroup' in kwargs: + single_placement_group = kwargs['singlePlacementGroup'] + if source_image_id is None and 'sourceImageId' in kwargs: + source_image_id = kwargs['sourceImageId'] + if source_image_reference is None and 'sourceImageReference' in kwargs: + source_image_reference = kwargs['sourceImageReference'] + if spot_restore is None and 'spotRestore' in kwargs: + spot_restore = kwargs['spotRestore'] + if terminate_notification is None and 'terminateNotification' in kwargs: + terminate_notification = kwargs['terminateNotification'] + if termination_notification is None and 'terminationNotification' in kwargs: + termination_notification = kwargs['terminationNotification'] + if unique_id is None and 'uniqueId' in kwargs: + unique_id = kwargs['uniqueId'] + if upgrade_mode is None and 'upgradeMode' in kwargs: + upgrade_mode = kwargs['upgradeMode'] + if user_data is None and 'userData' in kwargs: + user_data = kwargs['userData'] + if vtpm_enabled is None and 'vtpmEnabled' in kwargs: + vtpm_enabled = kwargs['vtpmEnabled'] + if zone_balance is None and 'zoneBalance' in kwargs: + zone_balance = kwargs['zoneBalance'] + if additional_capabilities is not None: - pulumi.set(__self__, "additional_capabilities", additional_capabilities) + _setter("additional_capabilities", additional_capabilities) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if admin_ssh_keys is not None: - pulumi.set(__self__, "admin_ssh_keys", admin_ssh_keys) + _setter("admin_ssh_keys", admin_ssh_keys) if admin_username is not None: - pulumi.set(__self__, "admin_username", admin_username) + _setter("admin_username", admin_username) if automatic_instance_repair is not None: - pulumi.set(__self__, "automatic_instance_repair", automatic_instance_repair) + _setter("automatic_instance_repair", automatic_instance_repair) if automatic_os_upgrade_policy is not None: - pulumi.set(__self__, "automatic_os_upgrade_policy", automatic_os_upgrade_policy) + _setter("automatic_os_upgrade_policy", automatic_os_upgrade_policy) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if computer_name_prefix is not None: - pulumi.set(__self__, "computer_name_prefix", computer_name_prefix) + _setter("computer_name_prefix", computer_name_prefix) if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) if data_disks is not None: - pulumi.set(__self__, "data_disks", data_disks) + _setter("data_disks", data_disks) if disable_password_authentication is not None: - pulumi.set(__self__, "disable_password_authentication", disable_password_authentication) + _setter("disable_password_authentication", disable_password_authentication) if do_not_run_extensions_on_overprovisioned_machines is not None: - pulumi.set(__self__, "do_not_run_extensions_on_overprovisioned_machines", do_not_run_extensions_on_overprovisioned_machines) + _setter("do_not_run_extensions_on_overprovisioned_machines", do_not_run_extensions_on_overprovisioned_machines) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if extension_operations_enabled is not None: - pulumi.set(__self__, "extension_operations_enabled", extension_operations_enabled) + _setter("extension_operations_enabled", extension_operations_enabled) if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if extensions_time_budget is not None: - pulumi.set(__self__, "extensions_time_budget", extensions_time_budget) + _setter("extensions_time_budget", extensions_time_budget) if gallery_application is not None: - pulumi.set(__self__, "gallery_application", gallery_application) + _setter("gallery_application", gallery_application) if gallery_applications is not None: warnings.warn("""`gallery_applications` has been renamed to `gallery_application` and will be deprecated in 4.0""", DeprecationWarning) pulumi.log.warn("""gallery_applications is deprecated: `gallery_applications` has been renamed to `gallery_application` and will be deprecated in 4.0""") if gallery_applications is not None: - pulumi.set(__self__, "gallery_applications", gallery_applications) + _setter("gallery_applications", gallery_applications) if health_probe_id is not None: - pulumi.set(__self__, "health_probe_id", health_probe_id) + _setter("health_probe_id", health_probe_id) if host_group_id is not None: - pulumi.set(__self__, "host_group_id", host_group_id) + _setter("host_group_id", host_group_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if instances is not None: - pulumi.set(__self__, "instances", instances) + _setter("instances", instances) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_bid_price is not None: - pulumi.set(__self__, "max_bid_price", max_bid_price) + _setter("max_bid_price", max_bid_price) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_interfaces is not None: - pulumi.set(__self__, "network_interfaces", network_interfaces) + _setter("network_interfaces", network_interfaces) if os_disk is not None: - pulumi.set(__self__, "os_disk", os_disk) + _setter("os_disk", os_disk) if overprovision is not None: - pulumi.set(__self__, "overprovision", overprovision) + _setter("overprovision", overprovision) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if platform_fault_domain_count is not None: - pulumi.set(__self__, "platform_fault_domain_count", platform_fault_domain_count) + _setter("platform_fault_domain_count", platform_fault_domain_count) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rolling_upgrade_policy is not None: - pulumi.set(__self__, "rolling_upgrade_policy", rolling_upgrade_policy) + _setter("rolling_upgrade_policy", rolling_upgrade_policy) if scale_in is not None: - pulumi.set(__self__, "scale_in", scale_in) + _setter("scale_in", scale_in) if scale_in_policy is not None: warnings.warn("""`scale_in_policy` will be removed in favour of the `scale_in` code block in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""scale_in_policy is deprecated: `scale_in_policy` will be removed in favour of the `scale_in` code block in version 4.0 of the AzureRM Provider.""") if scale_in_policy is not None: - pulumi.set(__self__, "scale_in_policy", scale_in_policy) + _setter("scale_in_policy", scale_in_policy) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) if secure_boot_enabled is not None: - pulumi.set(__self__, "secure_boot_enabled", secure_boot_enabled) + _setter("secure_boot_enabled", secure_boot_enabled) if single_placement_group is not None: - pulumi.set(__self__, "single_placement_group", single_placement_group) + _setter("single_placement_group", single_placement_group) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if source_image_id is not None: - pulumi.set(__self__, "source_image_id", source_image_id) + _setter("source_image_id", source_image_id) if source_image_reference is not None: - pulumi.set(__self__, "source_image_reference", source_image_reference) + _setter("source_image_reference", source_image_reference) if spot_restore is not None: - pulumi.set(__self__, "spot_restore", spot_restore) + _setter("spot_restore", spot_restore) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if terminate_notification is not None: warnings.warn("""`terminate_notification` has been renamed to `termination_notification` and will be removed in 4.0.""", DeprecationWarning) pulumi.log.warn("""terminate_notification is deprecated: `terminate_notification` has been renamed to `termination_notification` and will be removed in 4.0.""") if terminate_notification is not None: - pulumi.set(__self__, "terminate_notification", terminate_notification) + _setter("terminate_notification", terminate_notification) if termination_notification is not None: - pulumi.set(__self__, "termination_notification", termination_notification) + _setter("termination_notification", termination_notification) if unique_id is not None: - pulumi.set(__self__, "unique_id", unique_id) + _setter("unique_id", unique_id) if upgrade_mode is not None: - pulumi.set(__self__, "upgrade_mode", upgrade_mode) + _setter("upgrade_mode", upgrade_mode) if user_data is not None: - pulumi.set(__self__, "user_data", user_data) + _setter("user_data", user_data) if vtpm_enabled is not None: - pulumi.set(__self__, "vtpm_enabled", vtpm_enabled) + _setter("vtpm_enabled", vtpm_enabled) if zone_balance is not None: - pulumi.set(__self__, "zone_balance", zone_balance) + _setter("zone_balance", zone_balance) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="additionalCapabilities") @@ -2262,6 +2686,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinuxVirtualMachineScaleSetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -2331,14 +2759,34 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = LinuxVirtualMachineScaleSetArgs.__new__(LinuxVirtualMachineScaleSetArgs) + if additional_capabilities is not None and not isinstance(additional_capabilities, LinuxVirtualMachineScaleSetAdditionalCapabilitiesArgs): + additional_capabilities = additional_capabilities or {} + def _setter(key, value): + additional_capabilities[key] = value + LinuxVirtualMachineScaleSetAdditionalCapabilitiesArgs._configure(_setter, **additional_capabilities) __props__.__dict__["additional_capabilities"] = additional_capabilities __props__.__dict__["admin_password"] = None if admin_password is None else pulumi.Output.secret(admin_password) __props__.__dict__["admin_ssh_keys"] = admin_ssh_keys if admin_username is None and not opts.urn: raise TypeError("Missing required property 'admin_username'") __props__.__dict__["admin_username"] = admin_username + if automatic_instance_repair is not None and not isinstance(automatic_instance_repair, LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs): + automatic_instance_repair = automatic_instance_repair or {} + def _setter(key, value): + automatic_instance_repair[key] = value + LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs._configure(_setter, **automatic_instance_repair) __props__.__dict__["automatic_instance_repair"] = automatic_instance_repair + if automatic_os_upgrade_policy is not None and not isinstance(automatic_os_upgrade_policy, LinuxVirtualMachineScaleSetAutomaticOsUpgradePolicyArgs): + automatic_os_upgrade_policy = automatic_os_upgrade_policy or {} + def _setter(key, value): + automatic_os_upgrade_policy[key] = value + LinuxVirtualMachineScaleSetAutomaticOsUpgradePolicyArgs._configure(_setter, **automatic_os_upgrade_policy) __props__.__dict__["automatic_os_upgrade_policy"] = automatic_os_upgrade_policy + if boot_diagnostics is not None and not isinstance(boot_diagnostics, LinuxVirtualMachineScaleSetBootDiagnosticsArgs): + boot_diagnostics = boot_diagnostics or {} + def _setter(key, value): + boot_diagnostics[key] = value + LinuxVirtualMachineScaleSetBootDiagnosticsArgs._configure(_setter, **boot_diagnostics) __props__.__dict__["boot_diagnostics"] = boot_diagnostics __props__.__dict__["capacity_reservation_group_id"] = capacity_reservation_group_id __props__.__dict__["computer_name_prefix"] = computer_name_prefix @@ -2356,6 +2804,11 @@ def _internal_init(__self__, __props__.__dict__["gallery_applications"] = gallery_applications __props__.__dict__["health_probe_id"] = health_probe_id __props__.__dict__["host_group_id"] = host_group_id + if identity is not None and not isinstance(identity, LinuxVirtualMachineScaleSetIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + LinuxVirtualMachineScaleSetIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["instances"] = instances __props__.__dict__["location"] = location @@ -2364,10 +2817,20 @@ def _internal_init(__self__, if network_interfaces is None and not opts.urn: raise TypeError("Missing required property 'network_interfaces'") __props__.__dict__["network_interfaces"] = network_interfaces + if os_disk is not None and not isinstance(os_disk, LinuxVirtualMachineScaleSetOsDiskArgs): + os_disk = os_disk or {} + def _setter(key, value): + os_disk[key] = value + LinuxVirtualMachineScaleSetOsDiskArgs._configure(_setter, **os_disk) if os_disk is None and not opts.urn: raise TypeError("Missing required property 'os_disk'") __props__.__dict__["os_disk"] = os_disk __props__.__dict__["overprovision"] = overprovision + if plan is not None and not isinstance(plan, LinuxVirtualMachineScaleSetPlanArgs): + plan = plan or {} + def _setter(key, value): + plan[key] = value + LinuxVirtualMachineScaleSetPlanArgs._configure(_setter, **plan) __props__.__dict__["plan"] = plan __props__.__dict__["platform_fault_domain_count"] = platform_fault_domain_count __props__.__dict__["priority"] = priority @@ -2376,7 +2839,17 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if rolling_upgrade_policy is not None and not isinstance(rolling_upgrade_policy, LinuxVirtualMachineScaleSetRollingUpgradePolicyArgs): + rolling_upgrade_policy = rolling_upgrade_policy or {} + def _setter(key, value): + rolling_upgrade_policy[key] = value + LinuxVirtualMachineScaleSetRollingUpgradePolicyArgs._configure(_setter, **rolling_upgrade_policy) __props__.__dict__["rolling_upgrade_policy"] = rolling_upgrade_policy + if scale_in is not None and not isinstance(scale_in, LinuxVirtualMachineScaleSetScaleInArgs): + scale_in = scale_in or {} + def _setter(key, value): + scale_in[key] = value + LinuxVirtualMachineScaleSetScaleInArgs._configure(_setter, **scale_in) __props__.__dict__["scale_in"] = scale_in __props__.__dict__["scale_in_policy"] = scale_in_policy __props__.__dict__["secrets"] = secrets @@ -2386,10 +2859,30 @@ def _internal_init(__self__, raise TypeError("Missing required property 'sku'") __props__.__dict__["sku"] = sku __props__.__dict__["source_image_id"] = source_image_id + if source_image_reference is not None and not isinstance(source_image_reference, LinuxVirtualMachineScaleSetSourceImageReferenceArgs): + source_image_reference = source_image_reference or {} + def _setter(key, value): + source_image_reference[key] = value + LinuxVirtualMachineScaleSetSourceImageReferenceArgs._configure(_setter, **source_image_reference) __props__.__dict__["source_image_reference"] = source_image_reference + if spot_restore is not None and not isinstance(spot_restore, LinuxVirtualMachineScaleSetSpotRestoreArgs): + spot_restore = spot_restore or {} + def _setter(key, value): + spot_restore[key] = value + LinuxVirtualMachineScaleSetSpotRestoreArgs._configure(_setter, **spot_restore) __props__.__dict__["spot_restore"] = spot_restore __props__.__dict__["tags"] = tags + if terminate_notification is not None and not isinstance(terminate_notification, LinuxVirtualMachineScaleSetTerminateNotificationArgs): + terminate_notification = terminate_notification or {} + def _setter(key, value): + terminate_notification[key] = value + LinuxVirtualMachineScaleSetTerminateNotificationArgs._configure(_setter, **terminate_notification) __props__.__dict__["terminate_notification"] = terminate_notification + if termination_notification is not None and not isinstance(termination_notification, LinuxVirtualMachineScaleSetTerminationNotificationArgs): + termination_notification = termination_notification or {} + def _setter(key, value): + termination_notification[key] = value + LinuxVirtualMachineScaleSetTerminationNotificationArgs._configure(_setter, **termination_notification) __props__.__dict__["termination_notification"] = termination_notification __props__.__dict__["upgrade_mode"] = upgrade_mode __props__.__dict__["user_data"] = user_data diff --git a/sdk/python/pulumi_azure/compute/managed_disk.py b/sdk/python/pulumi_azure/compute/managed_disk.py index c9785af4e4..f14f5b9c93 100644 --- a/sdk/python/pulumi_azure/compute/managed_disk.py +++ b/sdk/python/pulumi_azure/compute/managed_disk.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -122,73 +122,218 @@ def __init__(__self__, *, > **Note:** Availability Zones are [only supported in select regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). """ - pulumi.set(__self__, "create_option", create_option) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_account_type", storage_account_type) + ManagedDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_option=create_option, + resource_group_name=resource_group_name, + storage_account_type=storage_account_type, + disk_access_id=disk_access_id, + disk_encryption_set_id=disk_encryption_set_id, + disk_iops_read_only=disk_iops_read_only, + disk_iops_read_write=disk_iops_read_write, + disk_mbps_read_only=disk_mbps_read_only, + disk_mbps_read_write=disk_mbps_read_write, + disk_size_gb=disk_size_gb, + edge_zone=edge_zone, + encryption_settings=encryption_settings, + gallery_image_reference_id=gallery_image_reference_id, + hyper_v_generation=hyper_v_generation, + image_reference_id=image_reference_id, + location=location, + logical_sector_size=logical_sector_size, + max_shares=max_shares, + name=name, + network_access_policy=network_access_policy, + on_demand_bursting_enabled=on_demand_bursting_enabled, + optimized_frequent_attach_enabled=optimized_frequent_attach_enabled, + os_type=os_type, + performance_plus_enabled=performance_plus_enabled, + public_network_access_enabled=public_network_access_enabled, + secure_vm_disk_encryption_set_id=secure_vm_disk_encryption_set_id, + security_type=security_type, + source_resource_id=source_resource_id, + source_uri=source_uri, + storage_account_id=storage_account_id, + tags=tags, + tier=tier, + trusted_launch_enabled=trusted_launch_enabled, + upload_size_bytes=upload_size_bytes, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_option: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + disk_access_id: Optional[pulumi.Input[str]] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + disk_iops_read_only: Optional[pulumi.Input[int]] = None, + disk_iops_read_write: Optional[pulumi.Input[int]] = None, + disk_mbps_read_only: Optional[pulumi.Input[int]] = None, + disk_mbps_read_write: Optional[pulumi.Input[int]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + encryption_settings: Optional[pulumi.Input['ManagedDiskEncryptionSettingsArgs']] = None, + gallery_image_reference_id: Optional[pulumi.Input[str]] = None, + hyper_v_generation: Optional[pulumi.Input[str]] = None, + image_reference_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logical_sector_size: Optional[pulumi.Input[int]] = None, + max_shares: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + network_access_policy: Optional[pulumi.Input[str]] = None, + on_demand_bursting_enabled: Optional[pulumi.Input[bool]] = None, + optimized_frequent_attach_enabled: Optional[pulumi.Input[bool]] = None, + os_type: Optional[pulumi.Input[str]] = None, + performance_plus_enabled: Optional[pulumi.Input[bool]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + secure_vm_disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + security_type: Optional[pulumi.Input[str]] = None, + source_resource_id: Optional[pulumi.Input[str]] = None, + source_uri: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tier: Optional[pulumi.Input[str]] = None, + trusted_launch_enabled: Optional[pulumi.Input[bool]] = None, + upload_size_bytes: Optional[pulumi.Input[int]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if create_option is None: + raise TypeError("Missing 'create_option' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if disk_access_id is None and 'diskAccessId' in kwargs: + disk_access_id = kwargs['diskAccessId'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if disk_iops_read_only is None and 'diskIopsReadOnly' in kwargs: + disk_iops_read_only = kwargs['diskIopsReadOnly'] + if disk_iops_read_write is None and 'diskIopsReadWrite' in kwargs: + disk_iops_read_write = kwargs['diskIopsReadWrite'] + if disk_mbps_read_only is None and 'diskMbpsReadOnly' in kwargs: + disk_mbps_read_only = kwargs['diskMbpsReadOnly'] + if disk_mbps_read_write is None and 'diskMbpsReadWrite' in kwargs: + disk_mbps_read_write = kwargs['diskMbpsReadWrite'] + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if encryption_settings is None and 'encryptionSettings' in kwargs: + encryption_settings = kwargs['encryptionSettings'] + if gallery_image_reference_id is None and 'galleryImageReferenceId' in kwargs: + gallery_image_reference_id = kwargs['galleryImageReferenceId'] + if hyper_v_generation is None and 'hyperVGeneration' in kwargs: + hyper_v_generation = kwargs['hyperVGeneration'] + if image_reference_id is None and 'imageReferenceId' in kwargs: + image_reference_id = kwargs['imageReferenceId'] + if logical_sector_size is None and 'logicalSectorSize' in kwargs: + logical_sector_size = kwargs['logicalSectorSize'] + if max_shares is None and 'maxShares' in kwargs: + max_shares = kwargs['maxShares'] + if network_access_policy is None and 'networkAccessPolicy' in kwargs: + network_access_policy = kwargs['networkAccessPolicy'] + if on_demand_bursting_enabled is None and 'onDemandBurstingEnabled' in kwargs: + on_demand_bursting_enabled = kwargs['onDemandBurstingEnabled'] + if optimized_frequent_attach_enabled is None and 'optimizedFrequentAttachEnabled' in kwargs: + optimized_frequent_attach_enabled = kwargs['optimizedFrequentAttachEnabled'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if performance_plus_enabled is None and 'performancePlusEnabled' in kwargs: + performance_plus_enabled = kwargs['performancePlusEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if secure_vm_disk_encryption_set_id is None and 'secureVmDiskEncryptionSetId' in kwargs: + secure_vm_disk_encryption_set_id = kwargs['secureVmDiskEncryptionSetId'] + if security_type is None and 'securityType' in kwargs: + security_type = kwargs['securityType'] + if source_resource_id is None and 'sourceResourceId' in kwargs: + source_resource_id = kwargs['sourceResourceId'] + if source_uri is None and 'sourceUri' in kwargs: + source_uri = kwargs['sourceUri'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if trusted_launch_enabled is None and 'trustedLaunchEnabled' in kwargs: + trusted_launch_enabled = kwargs['trustedLaunchEnabled'] + if upload_size_bytes is None and 'uploadSizeBytes' in kwargs: + upload_size_bytes = kwargs['uploadSizeBytes'] + + _setter("create_option", create_option) + _setter("resource_group_name", resource_group_name) + _setter("storage_account_type", storage_account_type) if disk_access_id is not None: - pulumi.set(__self__, "disk_access_id", disk_access_id) + _setter("disk_access_id", disk_access_id) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if disk_iops_read_only is not None: - pulumi.set(__self__, "disk_iops_read_only", disk_iops_read_only) + _setter("disk_iops_read_only", disk_iops_read_only) if disk_iops_read_write is not None: - pulumi.set(__self__, "disk_iops_read_write", disk_iops_read_write) + _setter("disk_iops_read_write", disk_iops_read_write) if disk_mbps_read_only is not None: - pulumi.set(__self__, "disk_mbps_read_only", disk_mbps_read_only) + _setter("disk_mbps_read_only", disk_mbps_read_only) if disk_mbps_read_write is not None: - pulumi.set(__self__, "disk_mbps_read_write", disk_mbps_read_write) + _setter("disk_mbps_read_write", disk_mbps_read_write) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if encryption_settings is not None: - pulumi.set(__self__, "encryption_settings", encryption_settings) + _setter("encryption_settings", encryption_settings) if gallery_image_reference_id is not None: - pulumi.set(__self__, "gallery_image_reference_id", gallery_image_reference_id) + _setter("gallery_image_reference_id", gallery_image_reference_id) if hyper_v_generation is not None: - pulumi.set(__self__, "hyper_v_generation", hyper_v_generation) + _setter("hyper_v_generation", hyper_v_generation) if image_reference_id is not None: - pulumi.set(__self__, "image_reference_id", image_reference_id) + _setter("image_reference_id", image_reference_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logical_sector_size is not None: - pulumi.set(__self__, "logical_sector_size", logical_sector_size) + _setter("logical_sector_size", logical_sector_size) if max_shares is not None: - pulumi.set(__self__, "max_shares", max_shares) + _setter("max_shares", max_shares) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_access_policy is not None: - pulumi.set(__self__, "network_access_policy", network_access_policy) + _setter("network_access_policy", network_access_policy) if on_demand_bursting_enabled is not None: - pulumi.set(__self__, "on_demand_bursting_enabled", on_demand_bursting_enabled) + _setter("on_demand_bursting_enabled", on_demand_bursting_enabled) if optimized_frequent_attach_enabled is not None: - pulumi.set(__self__, "optimized_frequent_attach_enabled", optimized_frequent_attach_enabled) + _setter("optimized_frequent_attach_enabled", optimized_frequent_attach_enabled) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if performance_plus_enabled is not None: - pulumi.set(__self__, "performance_plus_enabled", performance_plus_enabled) + _setter("performance_plus_enabled", performance_plus_enabled) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if secure_vm_disk_encryption_set_id is not None: - pulumi.set(__self__, "secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) + _setter("secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) if security_type is not None: - pulumi.set(__self__, "security_type", security_type) + _setter("security_type", security_type) if source_resource_id is not None: - pulumi.set(__self__, "source_resource_id", source_resource_id) + _setter("source_resource_id", source_resource_id) if source_uri is not None: - pulumi.set(__self__, "source_uri", source_uri) + _setter("source_uri", source_uri) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) if trusted_launch_enabled is not None: - pulumi.set(__self__, "trusted_launch_enabled", trusted_launch_enabled) + _setter("trusted_launch_enabled", trusted_launch_enabled) if upload_size_bytes is not None: - pulumi.set(__self__, "upload_size_bytes", upload_size_bytes) + _setter("upload_size_bytes", upload_size_bytes) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="createOption") @@ -749,76 +894,215 @@ def __init__(__self__, *, > **Note:** Availability Zones are [only supported in select regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). """ + _ManagedDiskState._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_option=create_option, + disk_access_id=disk_access_id, + disk_encryption_set_id=disk_encryption_set_id, + disk_iops_read_only=disk_iops_read_only, + disk_iops_read_write=disk_iops_read_write, + disk_mbps_read_only=disk_mbps_read_only, + disk_mbps_read_write=disk_mbps_read_write, + disk_size_gb=disk_size_gb, + edge_zone=edge_zone, + encryption_settings=encryption_settings, + gallery_image_reference_id=gallery_image_reference_id, + hyper_v_generation=hyper_v_generation, + image_reference_id=image_reference_id, + location=location, + logical_sector_size=logical_sector_size, + max_shares=max_shares, + name=name, + network_access_policy=network_access_policy, + on_demand_bursting_enabled=on_demand_bursting_enabled, + optimized_frequent_attach_enabled=optimized_frequent_attach_enabled, + os_type=os_type, + performance_plus_enabled=performance_plus_enabled, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + secure_vm_disk_encryption_set_id=secure_vm_disk_encryption_set_id, + security_type=security_type, + source_resource_id=source_resource_id, + source_uri=source_uri, + storage_account_id=storage_account_id, + storage_account_type=storage_account_type, + tags=tags, + tier=tier, + trusted_launch_enabled=trusted_launch_enabled, + upload_size_bytes=upload_size_bytes, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_option: Optional[pulumi.Input[str]] = None, + disk_access_id: Optional[pulumi.Input[str]] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + disk_iops_read_only: Optional[pulumi.Input[int]] = None, + disk_iops_read_write: Optional[pulumi.Input[int]] = None, + disk_mbps_read_only: Optional[pulumi.Input[int]] = None, + disk_mbps_read_write: Optional[pulumi.Input[int]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + encryption_settings: Optional[pulumi.Input['ManagedDiskEncryptionSettingsArgs']] = None, + gallery_image_reference_id: Optional[pulumi.Input[str]] = None, + hyper_v_generation: Optional[pulumi.Input[str]] = None, + image_reference_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logical_sector_size: Optional[pulumi.Input[int]] = None, + max_shares: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + network_access_policy: Optional[pulumi.Input[str]] = None, + on_demand_bursting_enabled: Optional[pulumi.Input[bool]] = None, + optimized_frequent_attach_enabled: Optional[pulumi.Input[bool]] = None, + os_type: Optional[pulumi.Input[str]] = None, + performance_plus_enabled: Optional[pulumi.Input[bool]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secure_vm_disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + security_type: Optional[pulumi.Input[str]] = None, + source_resource_id: Optional[pulumi.Input[str]] = None, + source_uri: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tier: Optional[pulumi.Input[str]] = None, + trusted_launch_enabled: Optional[pulumi.Input[bool]] = None, + upload_size_bytes: Optional[pulumi.Input[int]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if disk_access_id is None and 'diskAccessId' in kwargs: + disk_access_id = kwargs['diskAccessId'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if disk_iops_read_only is None and 'diskIopsReadOnly' in kwargs: + disk_iops_read_only = kwargs['diskIopsReadOnly'] + if disk_iops_read_write is None and 'diskIopsReadWrite' in kwargs: + disk_iops_read_write = kwargs['diskIopsReadWrite'] + if disk_mbps_read_only is None and 'diskMbpsReadOnly' in kwargs: + disk_mbps_read_only = kwargs['diskMbpsReadOnly'] + if disk_mbps_read_write is None and 'diskMbpsReadWrite' in kwargs: + disk_mbps_read_write = kwargs['diskMbpsReadWrite'] + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if encryption_settings is None and 'encryptionSettings' in kwargs: + encryption_settings = kwargs['encryptionSettings'] + if gallery_image_reference_id is None and 'galleryImageReferenceId' in kwargs: + gallery_image_reference_id = kwargs['galleryImageReferenceId'] + if hyper_v_generation is None and 'hyperVGeneration' in kwargs: + hyper_v_generation = kwargs['hyperVGeneration'] + if image_reference_id is None and 'imageReferenceId' in kwargs: + image_reference_id = kwargs['imageReferenceId'] + if logical_sector_size is None and 'logicalSectorSize' in kwargs: + logical_sector_size = kwargs['logicalSectorSize'] + if max_shares is None and 'maxShares' in kwargs: + max_shares = kwargs['maxShares'] + if network_access_policy is None and 'networkAccessPolicy' in kwargs: + network_access_policy = kwargs['networkAccessPolicy'] + if on_demand_bursting_enabled is None and 'onDemandBurstingEnabled' in kwargs: + on_demand_bursting_enabled = kwargs['onDemandBurstingEnabled'] + if optimized_frequent_attach_enabled is None and 'optimizedFrequentAttachEnabled' in kwargs: + optimized_frequent_attach_enabled = kwargs['optimizedFrequentAttachEnabled'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if performance_plus_enabled is None and 'performancePlusEnabled' in kwargs: + performance_plus_enabled = kwargs['performancePlusEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secure_vm_disk_encryption_set_id is None and 'secureVmDiskEncryptionSetId' in kwargs: + secure_vm_disk_encryption_set_id = kwargs['secureVmDiskEncryptionSetId'] + if security_type is None and 'securityType' in kwargs: + security_type = kwargs['securityType'] + if source_resource_id is None and 'sourceResourceId' in kwargs: + source_resource_id = kwargs['sourceResourceId'] + if source_uri is None and 'sourceUri' in kwargs: + source_uri = kwargs['sourceUri'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if trusted_launch_enabled is None and 'trustedLaunchEnabled' in kwargs: + trusted_launch_enabled = kwargs['trustedLaunchEnabled'] + if upload_size_bytes is None and 'uploadSizeBytes' in kwargs: + upload_size_bytes = kwargs['uploadSizeBytes'] + if create_option is not None: - pulumi.set(__self__, "create_option", create_option) + _setter("create_option", create_option) if disk_access_id is not None: - pulumi.set(__self__, "disk_access_id", disk_access_id) + _setter("disk_access_id", disk_access_id) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if disk_iops_read_only is not None: - pulumi.set(__self__, "disk_iops_read_only", disk_iops_read_only) + _setter("disk_iops_read_only", disk_iops_read_only) if disk_iops_read_write is not None: - pulumi.set(__self__, "disk_iops_read_write", disk_iops_read_write) + _setter("disk_iops_read_write", disk_iops_read_write) if disk_mbps_read_only is not None: - pulumi.set(__self__, "disk_mbps_read_only", disk_mbps_read_only) + _setter("disk_mbps_read_only", disk_mbps_read_only) if disk_mbps_read_write is not None: - pulumi.set(__self__, "disk_mbps_read_write", disk_mbps_read_write) + _setter("disk_mbps_read_write", disk_mbps_read_write) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if encryption_settings is not None: - pulumi.set(__self__, "encryption_settings", encryption_settings) + _setter("encryption_settings", encryption_settings) if gallery_image_reference_id is not None: - pulumi.set(__self__, "gallery_image_reference_id", gallery_image_reference_id) + _setter("gallery_image_reference_id", gallery_image_reference_id) if hyper_v_generation is not None: - pulumi.set(__self__, "hyper_v_generation", hyper_v_generation) + _setter("hyper_v_generation", hyper_v_generation) if image_reference_id is not None: - pulumi.set(__self__, "image_reference_id", image_reference_id) + _setter("image_reference_id", image_reference_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logical_sector_size is not None: - pulumi.set(__self__, "logical_sector_size", logical_sector_size) + _setter("logical_sector_size", logical_sector_size) if max_shares is not None: - pulumi.set(__self__, "max_shares", max_shares) + _setter("max_shares", max_shares) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_access_policy is not None: - pulumi.set(__self__, "network_access_policy", network_access_policy) + _setter("network_access_policy", network_access_policy) if on_demand_bursting_enabled is not None: - pulumi.set(__self__, "on_demand_bursting_enabled", on_demand_bursting_enabled) + _setter("on_demand_bursting_enabled", on_demand_bursting_enabled) if optimized_frequent_attach_enabled is not None: - pulumi.set(__self__, "optimized_frequent_attach_enabled", optimized_frequent_attach_enabled) + _setter("optimized_frequent_attach_enabled", optimized_frequent_attach_enabled) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if performance_plus_enabled is not None: - pulumi.set(__self__, "performance_plus_enabled", performance_plus_enabled) + _setter("performance_plus_enabled", performance_plus_enabled) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secure_vm_disk_encryption_set_id is not None: - pulumi.set(__self__, "secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) + _setter("secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) if security_type is not None: - pulumi.set(__self__, "security_type", security_type) + _setter("security_type", security_type) if source_resource_id is not None: - pulumi.set(__self__, "source_resource_id", source_resource_id) + _setter("source_resource_id", source_resource_id) if source_uri is not None: - pulumi.set(__self__, "source_uri", source_uri) + _setter("source_uri", source_uri) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) if trusted_launch_enabled is not None: - pulumi.set(__self__, "trusted_launch_enabled", trusted_launch_enabled) + _setter("trusted_launch_enabled", trusted_launch_enabled) if upload_size_bytes is not None: - pulumi.set(__self__, "upload_size_bytes", upload_size_bytes) + _setter("upload_size_bytes", upload_size_bytes) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="createOption") @@ -1512,6 +1796,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedDiskArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1572,6 +1860,11 @@ def _internal_init(__self__, __props__.__dict__["disk_mbps_read_write"] = disk_mbps_read_write __props__.__dict__["disk_size_gb"] = disk_size_gb __props__.__dict__["edge_zone"] = edge_zone + if encryption_settings is not None and not isinstance(encryption_settings, ManagedDiskEncryptionSettingsArgs): + encryption_settings = encryption_settings or {} + def _setter(key, value): + encryption_settings[key] = value + ManagedDiskEncryptionSettingsArgs._configure(_setter, **encryption_settings) __props__.__dict__["encryption_settings"] = encryption_settings __props__.__dict__["gallery_image_reference_id"] = gallery_image_reference_id __props__.__dict__["hyper_v_generation"] = hyper_v_generation diff --git a/sdk/python/pulumi_azure/compute/managed_disk_sas_token.py b/sdk/python/pulumi_azure/compute/managed_disk_sas_token.py index cc84643026..01ef03f27a 100644 --- a/sdk/python/pulumi_azure/compute/managed_disk_sas_token.py +++ b/sdk/python/pulumi_azure/compute/managed_disk_sas_token.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManagedDiskSasTokenArgs', 'ManagedDiskSasToken'] @@ -26,9 +26,36 @@ def __init__(__self__, *, :param pulumi.Input[int] duration_in_seconds: The duration for which the export should be allowed. Should be between 30 & 4294967295 seconds. Changing this forces a new resource to be created. :param pulumi.Input[str] managed_disk_id: The ID of an existing Managed Disk which should be exported. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "access_level", access_level) - pulumi.set(__self__, "duration_in_seconds", duration_in_seconds) - pulumi.set(__self__, "managed_disk_id", managed_disk_id) + ManagedDiskSasTokenArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_level=access_level, + duration_in_seconds=duration_in_seconds, + managed_disk_id=managed_disk_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_level: Optional[pulumi.Input[str]] = None, + duration_in_seconds: Optional[pulumi.Input[int]] = None, + managed_disk_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_level is None and 'accessLevel' in kwargs: + access_level = kwargs['accessLevel'] + if access_level is None: + raise TypeError("Missing 'access_level' argument") + if duration_in_seconds is None and 'durationInSeconds' in kwargs: + duration_in_seconds = kwargs['durationInSeconds'] + if duration_in_seconds is None: + raise TypeError("Missing 'duration_in_seconds' argument") + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if managed_disk_id is None: + raise TypeError("Missing 'managed_disk_id' argument") + + _setter("access_level", access_level) + _setter("duration_in_seconds", duration_in_seconds) + _setter("managed_disk_id", managed_disk_id) @property @pulumi.getter(name="accessLevel") @@ -87,14 +114,39 @@ def __init__(__self__, *, :param pulumi.Input[str] managed_disk_id: The ID of an existing Managed Disk which should be exported. Changing this forces a new resource to be created. :param pulumi.Input[str] sas_url: The computed Shared Access Signature (SAS) of the Managed Disk. """ + _ManagedDiskSasTokenState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_level=access_level, + duration_in_seconds=duration_in_seconds, + managed_disk_id=managed_disk_id, + sas_url=sas_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_level: Optional[pulumi.Input[str]] = None, + duration_in_seconds: Optional[pulumi.Input[int]] = None, + managed_disk_id: Optional[pulumi.Input[str]] = None, + sas_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_level is None and 'accessLevel' in kwargs: + access_level = kwargs['accessLevel'] + if duration_in_seconds is None and 'durationInSeconds' in kwargs: + duration_in_seconds = kwargs['durationInSeconds'] + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if sas_url is None and 'sasUrl' in kwargs: + sas_url = kwargs['sasUrl'] + if access_level is not None: - pulumi.set(__self__, "access_level", access_level) + _setter("access_level", access_level) if duration_in_seconds is not None: - pulumi.set(__self__, "duration_in_seconds", duration_in_seconds) + _setter("duration_in_seconds", duration_in_seconds) if managed_disk_id is not None: - pulumi.set(__self__, "managed_disk_id", managed_disk_id) + _setter("managed_disk_id", managed_disk_id) if sas_url is not None: - pulumi.set(__self__, "sas_url", sas_url) + _setter("sas_url", sas_url) @property @pulumi.getter(name="accessLevel") @@ -254,6 +306,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedDiskSasTokenArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/orchestrated_virtual_machine_scale_set.py b/sdk/python/pulumi_azure/compute/orchestrated_virtual_machine_scale_set.py index f71a5c4af5..6bee854a32 100644 --- a/sdk/python/pulumi_azure/compute/orchestrated_virtual_machine_scale_set.py +++ b/sdk/python/pulumi_azure/compute/orchestrated_virtual_machine_scale_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -101,72 +101,203 @@ def __init__(__self__, *, > **NOTE:** Due to a limitation of the Azure API at this time only one Availability Zone can be defined. """ - pulumi.set(__self__, "platform_fault_domain_count", platform_fault_domain_count) - pulumi.set(__self__, "resource_group_name", resource_group_name) + OrchestratedVirtualMachineScaleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + platform_fault_domain_count=platform_fault_domain_count, + resource_group_name=resource_group_name, + additional_capabilities=additional_capabilities, + automatic_instance_repair=automatic_instance_repair, + boot_diagnostics=boot_diagnostics, + capacity_reservation_group_id=capacity_reservation_group_id, + data_disks=data_disks, + encryption_at_host_enabled=encryption_at_host_enabled, + eviction_policy=eviction_policy, + extension_operations_enabled=extension_operations_enabled, + extensions=extensions, + extensions_time_budget=extensions_time_budget, + identity=identity, + instances=instances, + license_type=license_type, + location=location, + max_bid_price=max_bid_price, + name=name, + network_interfaces=network_interfaces, + os_disk=os_disk, + os_profile=os_profile, + plan=plan, + priority=priority, + priority_mix=priority_mix, + proximity_placement_group_id=proximity_placement_group_id, + single_placement_group=single_placement_group, + sku_name=sku_name, + source_image_id=source_image_id, + source_image_reference=source_image_reference, + tags=tags, + termination_notification=termination_notification, + user_data_base64=user_data_base64, + zone_balance=zone_balance, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + platform_fault_domain_count: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + additional_capabilities: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetAdditionalCapabilitiesArgs']] = None, + automatic_instance_repair: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetAutomaticInstanceRepairArgs']] = None, + boot_diagnostics: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetBootDiagnosticsArgs']] = None, + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetDataDiskArgs']]]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + extension_operations_enabled: Optional[pulumi.Input[bool]] = None, + extensions: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetExtensionArgs']]]] = None, + extensions_time_budget: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetIdentityArgs']] = None, + instances: Optional[pulumi.Input[int]] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_bid_price: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetNetworkInterfaceArgs']]]] = None, + os_disk: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetOsDiskArgs']] = None, + os_profile: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileArgs']] = None, + plan: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetPlanArgs']] = None, + priority: Optional[pulumi.Input[str]] = None, + priority_mix: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetPriorityMixArgs']] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + single_placement_group: Optional[pulumi.Input[bool]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + source_image_id: Optional[pulumi.Input[str]] = None, + source_image_reference: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetSourceImageReferenceArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + termination_notification: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetTerminationNotificationArgs']] = None, + user_data_base64: Optional[pulumi.Input[str]] = None, + zone_balance: Optional[pulumi.Input[bool]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if platform_fault_domain_count is None and 'platformFaultDomainCount' in kwargs: + platform_fault_domain_count = kwargs['platformFaultDomainCount'] + if platform_fault_domain_count is None: + raise TypeError("Missing 'platform_fault_domain_count' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if additional_capabilities is None and 'additionalCapabilities' in kwargs: + additional_capabilities = kwargs['additionalCapabilities'] + if automatic_instance_repair is None and 'automaticInstanceRepair' in kwargs: + automatic_instance_repair = kwargs['automaticInstanceRepair'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if data_disks is None and 'dataDisks' in kwargs: + data_disks = kwargs['dataDisks'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if extension_operations_enabled is None and 'extensionOperationsEnabled' in kwargs: + extension_operations_enabled = kwargs['extensionOperationsEnabled'] + if extensions_time_budget is None and 'extensionsTimeBudget' in kwargs: + extensions_time_budget = kwargs['extensionsTimeBudget'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_bid_price is None and 'maxBidPrice' in kwargs: + max_bid_price = kwargs['maxBidPrice'] + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if os_disk is None and 'osDisk' in kwargs: + os_disk = kwargs['osDisk'] + if os_profile is None and 'osProfile' in kwargs: + os_profile = kwargs['osProfile'] + if priority_mix is None and 'priorityMix' in kwargs: + priority_mix = kwargs['priorityMix'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if single_placement_group is None and 'singlePlacementGroup' in kwargs: + single_placement_group = kwargs['singlePlacementGroup'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if source_image_id is None and 'sourceImageId' in kwargs: + source_image_id = kwargs['sourceImageId'] + if source_image_reference is None and 'sourceImageReference' in kwargs: + source_image_reference = kwargs['sourceImageReference'] + if termination_notification is None and 'terminationNotification' in kwargs: + termination_notification = kwargs['terminationNotification'] + if user_data_base64 is None and 'userDataBase64' in kwargs: + user_data_base64 = kwargs['userDataBase64'] + if zone_balance is None and 'zoneBalance' in kwargs: + zone_balance = kwargs['zoneBalance'] + + _setter("platform_fault_domain_count", platform_fault_domain_count) + _setter("resource_group_name", resource_group_name) if additional_capabilities is not None: - pulumi.set(__self__, "additional_capabilities", additional_capabilities) + _setter("additional_capabilities", additional_capabilities) if automatic_instance_repair is not None: - pulumi.set(__self__, "automatic_instance_repair", automatic_instance_repair) + _setter("automatic_instance_repair", automatic_instance_repair) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if data_disks is not None: - pulumi.set(__self__, "data_disks", data_disks) + _setter("data_disks", data_disks) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if extension_operations_enabled is not None: - pulumi.set(__self__, "extension_operations_enabled", extension_operations_enabled) + _setter("extension_operations_enabled", extension_operations_enabled) if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if extensions_time_budget is not None: - pulumi.set(__self__, "extensions_time_budget", extensions_time_budget) + _setter("extensions_time_budget", extensions_time_budget) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if instances is not None: - pulumi.set(__self__, "instances", instances) + _setter("instances", instances) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_bid_price is not None: - pulumi.set(__self__, "max_bid_price", max_bid_price) + _setter("max_bid_price", max_bid_price) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_interfaces is not None: - pulumi.set(__self__, "network_interfaces", network_interfaces) + _setter("network_interfaces", network_interfaces) if os_disk is not None: - pulumi.set(__self__, "os_disk", os_disk) + _setter("os_disk", os_disk) if os_profile is not None: - pulumi.set(__self__, "os_profile", os_profile) + _setter("os_profile", os_profile) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if priority_mix is not None: - pulumi.set(__self__, "priority_mix", priority_mix) + _setter("priority_mix", priority_mix) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if single_placement_group is not None: - pulumi.set(__self__, "single_placement_group", single_placement_group) + _setter("single_placement_group", single_placement_group) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if source_image_id is not None: - pulumi.set(__self__, "source_image_id", source_image_id) + _setter("source_image_id", source_image_id) if source_image_reference is not None: - pulumi.set(__self__, "source_image_reference", source_image_reference) + _setter("source_image_reference", source_image_reference) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if termination_notification is not None: - pulumi.set(__self__, "termination_notification", termination_notification) + _setter("termination_notification", termination_notification) if user_data_base64 is not None: - pulumi.set(__self__, "user_data_base64", user_data_base64) + _setter("user_data_base64", user_data_base64) if zone_balance is not None: - pulumi.set(__self__, "zone_balance", zone_balance) + _setter("zone_balance", zone_balance) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="platformFaultDomainCount") @@ -681,76 +812,207 @@ def __init__(__self__, *, > **NOTE:** Due to a limitation of the Azure API at this time only one Availability Zone can be defined. """ + _OrchestratedVirtualMachineScaleSetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_capabilities=additional_capabilities, + automatic_instance_repair=automatic_instance_repair, + boot_diagnostics=boot_diagnostics, + capacity_reservation_group_id=capacity_reservation_group_id, + data_disks=data_disks, + encryption_at_host_enabled=encryption_at_host_enabled, + eviction_policy=eviction_policy, + extension_operations_enabled=extension_operations_enabled, + extensions=extensions, + extensions_time_budget=extensions_time_budget, + identity=identity, + instances=instances, + license_type=license_type, + location=location, + max_bid_price=max_bid_price, + name=name, + network_interfaces=network_interfaces, + os_disk=os_disk, + os_profile=os_profile, + plan=plan, + platform_fault_domain_count=platform_fault_domain_count, + priority=priority, + priority_mix=priority_mix, + proximity_placement_group_id=proximity_placement_group_id, + resource_group_name=resource_group_name, + single_placement_group=single_placement_group, + sku_name=sku_name, + source_image_id=source_image_id, + source_image_reference=source_image_reference, + tags=tags, + termination_notification=termination_notification, + unique_id=unique_id, + user_data_base64=user_data_base64, + zone_balance=zone_balance, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_capabilities: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetAdditionalCapabilitiesArgs']] = None, + automatic_instance_repair: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetAutomaticInstanceRepairArgs']] = None, + boot_diagnostics: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetBootDiagnosticsArgs']] = None, + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetDataDiskArgs']]]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + extension_operations_enabled: Optional[pulumi.Input[bool]] = None, + extensions: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetExtensionArgs']]]] = None, + extensions_time_budget: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetIdentityArgs']] = None, + instances: Optional[pulumi.Input[int]] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_bid_price: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['OrchestratedVirtualMachineScaleSetNetworkInterfaceArgs']]]] = None, + os_disk: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetOsDiskArgs']] = None, + os_profile: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetOsProfileArgs']] = None, + plan: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetPlanArgs']] = None, + platform_fault_domain_count: Optional[pulumi.Input[int]] = None, + priority: Optional[pulumi.Input[str]] = None, + priority_mix: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetPriorityMixArgs']] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + single_placement_group: Optional[pulumi.Input[bool]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + source_image_id: Optional[pulumi.Input[str]] = None, + source_image_reference: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetSourceImageReferenceArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + termination_notification: Optional[pulumi.Input['OrchestratedVirtualMachineScaleSetTerminationNotificationArgs']] = None, + unique_id: Optional[pulumi.Input[str]] = None, + user_data_base64: Optional[pulumi.Input[str]] = None, + zone_balance: Optional[pulumi.Input[bool]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_capabilities is None and 'additionalCapabilities' in kwargs: + additional_capabilities = kwargs['additionalCapabilities'] + if automatic_instance_repair is None and 'automaticInstanceRepair' in kwargs: + automatic_instance_repair = kwargs['automaticInstanceRepair'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if data_disks is None and 'dataDisks' in kwargs: + data_disks = kwargs['dataDisks'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if extension_operations_enabled is None and 'extensionOperationsEnabled' in kwargs: + extension_operations_enabled = kwargs['extensionOperationsEnabled'] + if extensions_time_budget is None and 'extensionsTimeBudget' in kwargs: + extensions_time_budget = kwargs['extensionsTimeBudget'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_bid_price is None and 'maxBidPrice' in kwargs: + max_bid_price = kwargs['maxBidPrice'] + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if os_disk is None and 'osDisk' in kwargs: + os_disk = kwargs['osDisk'] + if os_profile is None and 'osProfile' in kwargs: + os_profile = kwargs['osProfile'] + if platform_fault_domain_count is None and 'platformFaultDomainCount' in kwargs: + platform_fault_domain_count = kwargs['platformFaultDomainCount'] + if priority_mix is None and 'priorityMix' in kwargs: + priority_mix = kwargs['priorityMix'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if single_placement_group is None and 'singlePlacementGroup' in kwargs: + single_placement_group = kwargs['singlePlacementGroup'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if source_image_id is None and 'sourceImageId' in kwargs: + source_image_id = kwargs['sourceImageId'] + if source_image_reference is None and 'sourceImageReference' in kwargs: + source_image_reference = kwargs['sourceImageReference'] + if termination_notification is None and 'terminationNotification' in kwargs: + termination_notification = kwargs['terminationNotification'] + if unique_id is None and 'uniqueId' in kwargs: + unique_id = kwargs['uniqueId'] + if user_data_base64 is None and 'userDataBase64' in kwargs: + user_data_base64 = kwargs['userDataBase64'] + if zone_balance is None and 'zoneBalance' in kwargs: + zone_balance = kwargs['zoneBalance'] + if additional_capabilities is not None: - pulumi.set(__self__, "additional_capabilities", additional_capabilities) + _setter("additional_capabilities", additional_capabilities) if automatic_instance_repair is not None: - pulumi.set(__self__, "automatic_instance_repair", automatic_instance_repair) + _setter("automatic_instance_repair", automatic_instance_repair) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if data_disks is not None: - pulumi.set(__self__, "data_disks", data_disks) + _setter("data_disks", data_disks) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if extension_operations_enabled is not None: - pulumi.set(__self__, "extension_operations_enabled", extension_operations_enabled) + _setter("extension_operations_enabled", extension_operations_enabled) if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if extensions_time_budget is not None: - pulumi.set(__self__, "extensions_time_budget", extensions_time_budget) + _setter("extensions_time_budget", extensions_time_budget) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if instances is not None: - pulumi.set(__self__, "instances", instances) + _setter("instances", instances) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_bid_price is not None: - pulumi.set(__self__, "max_bid_price", max_bid_price) + _setter("max_bid_price", max_bid_price) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_interfaces is not None: - pulumi.set(__self__, "network_interfaces", network_interfaces) + _setter("network_interfaces", network_interfaces) if os_disk is not None: - pulumi.set(__self__, "os_disk", os_disk) + _setter("os_disk", os_disk) if os_profile is not None: - pulumi.set(__self__, "os_profile", os_profile) + _setter("os_profile", os_profile) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if platform_fault_domain_count is not None: - pulumi.set(__self__, "platform_fault_domain_count", platform_fault_domain_count) + _setter("platform_fault_domain_count", platform_fault_domain_count) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if priority_mix is not None: - pulumi.set(__self__, "priority_mix", priority_mix) + _setter("priority_mix", priority_mix) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if single_placement_group is not None: - pulumi.set(__self__, "single_placement_group", single_placement_group) + _setter("single_placement_group", single_placement_group) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if source_image_id is not None: - pulumi.set(__self__, "source_image_id", source_image_id) + _setter("source_image_id", source_image_id) if source_image_reference is not None: - pulumi.set(__self__, "source_image_reference", source_image_reference) + _setter("source_image_reference", source_image_reference) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if termination_notification is not None: - pulumi.set(__self__, "termination_notification", termination_notification) + _setter("termination_notification", termination_notification) if unique_id is not None: - pulumi.set(__self__, "unique_id", unique_id) + _setter("unique_id", unique_id) if user_data_base64 is not None: - pulumi.set(__self__, "user_data_base64", user_data_base64) + _setter("user_data_base64", user_data_base64) if zone_balance is not None: - pulumi.set(__self__, "zone_balance", zone_balance) + _setter("zone_balance", zone_balance) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="additionalCapabilities") @@ -1356,6 +1618,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OrchestratedVirtualMachineScaleSetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1404,8 +1670,23 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = OrchestratedVirtualMachineScaleSetArgs.__new__(OrchestratedVirtualMachineScaleSetArgs) + if additional_capabilities is not None and not isinstance(additional_capabilities, OrchestratedVirtualMachineScaleSetAdditionalCapabilitiesArgs): + additional_capabilities = additional_capabilities or {} + def _setter(key, value): + additional_capabilities[key] = value + OrchestratedVirtualMachineScaleSetAdditionalCapabilitiesArgs._configure(_setter, **additional_capabilities) __props__.__dict__["additional_capabilities"] = additional_capabilities + if automatic_instance_repair is not None and not isinstance(automatic_instance_repair, OrchestratedVirtualMachineScaleSetAutomaticInstanceRepairArgs): + automatic_instance_repair = automatic_instance_repair or {} + def _setter(key, value): + automatic_instance_repair[key] = value + OrchestratedVirtualMachineScaleSetAutomaticInstanceRepairArgs._configure(_setter, **automatic_instance_repair) __props__.__dict__["automatic_instance_repair"] = automatic_instance_repair + if boot_diagnostics is not None and not isinstance(boot_diagnostics, OrchestratedVirtualMachineScaleSetBootDiagnosticsArgs): + boot_diagnostics = boot_diagnostics or {} + def _setter(key, value): + boot_diagnostics[key] = value + OrchestratedVirtualMachineScaleSetBootDiagnosticsArgs._configure(_setter, **boot_diagnostics) __props__.__dict__["boot_diagnostics"] = boot_diagnostics __props__.__dict__["capacity_reservation_group_id"] = capacity_reservation_group_id __props__.__dict__["data_disks"] = data_disks @@ -1414,6 +1695,11 @@ def _internal_init(__self__, __props__.__dict__["extension_operations_enabled"] = extension_operations_enabled __props__.__dict__["extensions"] = extensions __props__.__dict__["extensions_time_budget"] = extensions_time_budget + if identity is not None and not isinstance(identity, OrchestratedVirtualMachineScaleSetIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + OrchestratedVirtualMachineScaleSetIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["instances"] = instances __props__.__dict__["license_type"] = license_type @@ -1421,13 +1707,33 @@ def _internal_init(__self__, __props__.__dict__["max_bid_price"] = max_bid_price __props__.__dict__["name"] = name __props__.__dict__["network_interfaces"] = network_interfaces + if os_disk is not None and not isinstance(os_disk, OrchestratedVirtualMachineScaleSetOsDiskArgs): + os_disk = os_disk or {} + def _setter(key, value): + os_disk[key] = value + OrchestratedVirtualMachineScaleSetOsDiskArgs._configure(_setter, **os_disk) __props__.__dict__["os_disk"] = os_disk + if os_profile is not None and not isinstance(os_profile, OrchestratedVirtualMachineScaleSetOsProfileArgs): + os_profile = os_profile or {} + def _setter(key, value): + os_profile[key] = value + OrchestratedVirtualMachineScaleSetOsProfileArgs._configure(_setter, **os_profile) __props__.__dict__["os_profile"] = os_profile + if plan is not None and not isinstance(plan, OrchestratedVirtualMachineScaleSetPlanArgs): + plan = plan or {} + def _setter(key, value): + plan[key] = value + OrchestratedVirtualMachineScaleSetPlanArgs._configure(_setter, **plan) __props__.__dict__["plan"] = plan if platform_fault_domain_count is None and not opts.urn: raise TypeError("Missing required property 'platform_fault_domain_count'") __props__.__dict__["platform_fault_domain_count"] = platform_fault_domain_count __props__.__dict__["priority"] = priority + if priority_mix is not None and not isinstance(priority_mix, OrchestratedVirtualMachineScaleSetPriorityMixArgs): + priority_mix = priority_mix or {} + def _setter(key, value): + priority_mix[key] = value + OrchestratedVirtualMachineScaleSetPriorityMixArgs._configure(_setter, **priority_mix) __props__.__dict__["priority_mix"] = priority_mix __props__.__dict__["proximity_placement_group_id"] = proximity_placement_group_id if resource_group_name is None and not opts.urn: @@ -1436,8 +1742,18 @@ def _internal_init(__self__, __props__.__dict__["single_placement_group"] = single_placement_group __props__.__dict__["sku_name"] = sku_name __props__.__dict__["source_image_id"] = source_image_id + if source_image_reference is not None and not isinstance(source_image_reference, OrchestratedVirtualMachineScaleSetSourceImageReferenceArgs): + source_image_reference = source_image_reference or {} + def _setter(key, value): + source_image_reference[key] = value + OrchestratedVirtualMachineScaleSetSourceImageReferenceArgs._configure(_setter, **source_image_reference) __props__.__dict__["source_image_reference"] = source_image_reference __props__.__dict__["tags"] = tags + if termination_notification is not None and not isinstance(termination_notification, OrchestratedVirtualMachineScaleSetTerminationNotificationArgs): + termination_notification = termination_notification or {} + def _setter(key, value): + termination_notification[key] = value + OrchestratedVirtualMachineScaleSetTerminationNotificationArgs._configure(_setter, **termination_notification) __props__.__dict__["termination_notification"] = termination_notification __props__.__dict__["user_data_base64"] = None if user_data_base64 is None else pulumi.Output.secret(user_data_base64) __props__.__dict__["zone_balance"] = zone_balance diff --git a/sdk/python/pulumi_azure/compute/outputs.py b/sdk/python/pulumi_azure/compute/outputs.py index 331a32918c..ff999202df 100644 --- a/sdk/python/pulumi_azure/compute/outputs.py +++ b/sdk/python/pulumi_azure/compute/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -241,9 +241,34 @@ def __init__(__self__, *, > **Note:** The Subnet used for the Bastion Host must have the name `AzureBastionSubnet` and the subnet mask must be at least a `/26`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) + BastionHostIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + public_ip_address_id: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("name", name) + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -281,8 +306,25 @@ def __init__(__self__, *, :param int capacity: Specifies the number of instances to be reserved. It must be a positive `integer` and not exceed the quota in the subscription. :param str name: Name of the sku, such as `Standard_F2`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + CapacityReservationSku._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("capacity", capacity) + _setter("name", name) @property @pulumi.getter @@ -337,13 +379,38 @@ def __init__(__self__, *, :param str principal_id: The (Client) ID of the Service Principal. :param str tenant_id: The ID of the Tenant the Service Principal is assigned in. """ - pulumi.set(__self__, "type", type) + DiskEncryptionSetIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -408,8 +475,29 @@ def __init__(__self__, *, :param str secret_url: The URL to the Key Vault Secret which stores the protected settings. :param str source_vault_id: The ID of the source Key Vault. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + ExtensionProtectedSettingsFromKeyVault._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -439,10 +527,29 @@ def __init__(__self__, *, :param str remove: The command to remove the Gallery Application. Changing this forces a new resource to be created. :param str update: The command to update the Gallery Application. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "install", install) - pulumi.set(__self__, "remove", remove) + GalleryApplicationVersionManageAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + install=install, + remove=remove, + update=update, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + install: Optional[str] = None, + remove: Optional[str] = None, + update: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if install is None: + raise TypeError("Missing 'install' argument") + if remove is None: + raise TypeError("Missing 'remove' argument") + + _setter("install", install) + _setter("remove", remove) if update is not None: - pulumi.set(__self__, "update", update) + _setter("update", update) @property @pulumi.getter @@ -497,9 +604,28 @@ def __init__(__self__, *, :param str media_link: The Storage Blob URI of the source application package. Changing this forces a new resource to be created. :param str default_configuration_link: The Storage Blob URI of the default configuration. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "media_link", media_link) + GalleryApplicationVersionSource._configure( + lambda key, value: pulumi.set(__self__, key, value), + media_link=media_link, + default_configuration_link=default_configuration_link, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + media_link: Optional[str] = None, + default_configuration_link: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if media_link is None and 'mediaLink' in kwargs: + media_link = kwargs['mediaLink'] + if media_link is None: + raise TypeError("Missing 'media_link' argument") + if default_configuration_link is None and 'defaultConfigurationLink' in kwargs: + default_configuration_link = kwargs['defaultConfigurationLink'] + + _setter("media_link", media_link) if default_configuration_link is not None: - pulumi.set(__self__, "default_configuration_link", default_configuration_link) + _setter("default_configuration_link", default_configuration_link) @property @pulumi.getter(name="mediaLink") @@ -548,10 +674,33 @@ def __init__(__self__, *, :param int regional_replica_count: The number of replicas of the Gallery Application Version to be created per region. Possible values are between `1` and `10`. :param str storage_account_type: The storage account type for the Gallery Application Version. Possible values are `Standard_LRS`, `Premium_LRS` and `Standard_ZRS`. Defaults to `Standard_LRS`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "regional_replica_count", regional_replica_count) + GalleryApplicationVersionTargetRegion._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + regional_replica_count=regional_replica_count, + storage_account_type=storage_account_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + regional_replica_count: Optional[int] = None, + storage_account_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if regional_replica_count is None and 'regionalReplicaCount' in kwargs: + regional_replica_count = kwargs['regionalReplicaCount'] + if regional_replica_count is None: + raise TypeError("Missing 'regional_replica_count' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + + _setter("name", name) + _setter("regional_replica_count", regional_replica_count) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) @property @pulumi.getter @@ -614,16 +763,41 @@ def __init__(__self__, *, :param str managed_disk_id: Specifies the ID of the managed disk resource that you want to use to create the image. Changing this forces a new resource to be created. :param int size_gb: Specifies the size of the image to be created. The target size can't be smaller than the source size. """ + ImageDataDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_uri=blob_uri, + caching=caching, + lun=lun, + managed_disk_id=managed_disk_id, + size_gb=size_gb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_uri: Optional[str] = None, + caching: Optional[str] = None, + lun: Optional[int] = None, + managed_disk_id: Optional[str] = None, + size_gb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_uri is None and 'blobUri' in kwargs: + blob_uri = kwargs['blobUri'] + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if size_gb is None and 'sizeGb' in kwargs: + size_gb = kwargs['sizeGb'] + if blob_uri is not None: - pulumi.set(__self__, "blob_uri", blob_uri) + _setter("blob_uri", blob_uri) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if lun is not None: - pulumi.set(__self__, "lun", lun) + _setter("lun", lun) if managed_disk_id is not None: - pulumi.set(__self__, "managed_disk_id", managed_disk_id) + _setter("managed_disk_id", managed_disk_id) if size_gb is not None: - pulumi.set(__self__, "size_gb", size_gb) + _setter("size_gb", size_gb) @property @pulumi.getter(name="blobUri") @@ -712,20 +886,55 @@ def __init__(__self__, *, :param str os_type: Specifies the type of operating system contained in the virtual machine image. Possible values are: `Windows` or `Linux`. :param int size_gb: Specifies the size of the image to be created. Changing this forces a new resource to be created. """ + ImageOsDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_uri=blob_uri, + caching=caching, + disk_encryption_set_id=disk_encryption_set_id, + managed_disk_id=managed_disk_id, + os_state=os_state, + os_type=os_type, + size_gb=size_gb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_uri: Optional[str] = None, + caching: Optional[str] = None, + disk_encryption_set_id: Optional[str] = None, + managed_disk_id: Optional[str] = None, + os_state: Optional[str] = None, + os_type: Optional[str] = None, + size_gb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_uri is None and 'blobUri' in kwargs: + blob_uri = kwargs['blobUri'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if os_state is None and 'osState' in kwargs: + os_state = kwargs['osState'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if size_gb is None and 'sizeGb' in kwargs: + size_gb = kwargs['sizeGb'] + if blob_uri is not None: - pulumi.set(__self__, "blob_uri", blob_uri) + _setter("blob_uri", blob_uri) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if managed_disk_id is not None: - pulumi.set(__self__, "managed_disk_id", managed_disk_id) + _setter("managed_disk_id", managed_disk_id) if os_state is not None: - pulumi.set(__self__, "os_state", os_state) + _setter("os_state", os_state) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if size_gb is not None: - pulumi.set(__self__, "size_gb", size_gb) + _setter("size_gb", size_gb) @property @pulumi.getter(name="blobUri") @@ -808,8 +1017,21 @@ def __init__(__self__, *, """ :param bool ultra_ssd_enabled: Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Virtual Machine? Defaults to `false`. """ + LinuxVirtualMachineAdditionalCapabilities._configure( + lambda key, value: pulumi.set(__self__, key, value), + ultra_ssd_enabled=ultra_ssd_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ultra_ssd_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) @property @pulumi.getter(name="ultraSsdEnabled") @@ -848,8 +1070,27 @@ def __init__(__self__, *, > **NOTE:** The Azure VM Agent only allows creating SSH Keys at the path `/home/{username}/.ssh/authorized_keys` - as such this public key will be written to the authorized keys file. """ - pulumi.set(__self__, "public_key", public_key) - pulumi.set(__self__, "username", username) + LinuxVirtualMachineAdminSshKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_key=public_key, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_key: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_key is None and 'publicKey' in kwargs: + public_key = kwargs['publicKey'] + if public_key is None: + raise TypeError("Missing 'public_key' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("public_key", public_key) + _setter("username", username) @property @pulumi.getter(name="publicKey") @@ -896,8 +1137,21 @@ def __init__(__self__, *, > **NOTE:** Passing a null value will utilize a Managed Storage Account to store Boot Diagnostics """ + LinuxVirtualMachineBootDiagnostics._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_uri=storage_account_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_uri: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_uri is None and 'storageAccountUri' in kwargs: + storage_account_uri = kwargs['storageAccountUri'] + if storage_account_uri is not None: - pulumi.set(__self__, "storage_account_uri", storage_account_uri) + _setter("storage_account_uri", storage_account_uri) @property @pulumi.getter(name="storageAccountUri") @@ -942,13 +1196,36 @@ def __init__(__self__, *, :param int order: Specifies the order in which the packages have to be installed. Possible values are between `0` and `2,147,483,647`. :param str tag: Specifies a passthrough value for more generic context. This field can be any valid `string` value. """ - pulumi.set(__self__, "version_id", version_id) + LinuxVirtualMachineGalleryApplication._configure( + lambda key, value: pulumi.set(__self__, key, value), + version_id=version_id, + configuration_blob_uri=configuration_blob_uri, + order=order, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + version_id: Optional[str] = None, + configuration_blob_uri: Optional[str] = None, + order: Optional[int] = None, + tag: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if version_id is None and 'versionId' in kwargs: + version_id = kwargs['versionId'] + if version_id is None: + raise TypeError("Missing 'version_id' argument") + if configuration_blob_uri is None and 'configurationBlobUri' in kwargs: + configuration_blob_uri = kwargs['configurationBlobUri'] + + _setter("version_id", version_id) if configuration_blob_uri is not None: - pulumi.set(__self__, "configuration_blob_uri", configuration_blob_uri) + _setter("configuration_blob_uri", configuration_blob_uri) if order is not None: - pulumi.set(__self__, "order", order) + _setter("order", order) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter(name="versionId") @@ -1019,13 +1296,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + LinuxVirtualMachineIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1128,22 +1430,67 @@ def __init__(__self__, *, > **NOTE:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "storage_account_type", storage_account_type) + LinuxVirtualMachineOsDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + storage_account_type=storage_account_type, + diff_disk_settings=diff_disk_settings, + disk_encryption_set_id=disk_encryption_set_id, + disk_size_gb=disk_size_gb, + name=name, + secure_vm_disk_encryption_set_id=secure_vm_disk_encryption_set_id, + security_encryption_type=security_encryption_type, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[str] = None, + storage_account_type: Optional[str] = None, + diff_disk_settings: Optional['outputs.LinuxVirtualMachineOsDiskDiffDiskSettings'] = None, + disk_encryption_set_id: Optional[str] = None, + disk_size_gb: Optional[int] = None, + name: Optional[str] = None, + secure_vm_disk_encryption_set_id: Optional[str] = None, + security_encryption_type: Optional[str] = None, + write_accelerator_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if diff_disk_settings is None and 'diffDiskSettings' in kwargs: + diff_disk_settings = kwargs['diffDiskSettings'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if secure_vm_disk_encryption_set_id is None and 'secureVmDiskEncryptionSetId' in kwargs: + secure_vm_disk_encryption_set_id = kwargs['secureVmDiskEncryptionSetId'] + if security_encryption_type is None and 'securityEncryptionType' in kwargs: + security_encryption_type = kwargs['securityEncryptionType'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("storage_account_type", storage_account_type) if diff_disk_settings is not None: - pulumi.set(__self__, "diff_disk_settings", diff_disk_settings) + _setter("diff_disk_settings", diff_disk_settings) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if secure_vm_disk_encryption_set_id is not None: - pulumi.set(__self__, "secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) + _setter("secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) if security_encryption_type is not None: - pulumi.set(__self__, "security_encryption_type", security_encryption_type) + _setter("security_encryption_type", security_encryption_type) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -1241,9 +1588,24 @@ def __init__(__self__, *, :param str option: Specifies the Ephemeral Disk Settings for the OS Disk. At this time the only possible value is `Local`. Changing this forces a new resource to be created. :param str placement: Specifies where to store the Ephemeral Disk. Possible values are `CacheDisk` and `ResourceDisk`. Defaults to `CacheDisk`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "option", option) + LinuxVirtualMachineOsDiskDiffDiskSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + option=option, + placement=placement, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + option: Optional[str] = None, + placement: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if option is None: + raise TypeError("Missing 'option' argument") + + _setter("option", option) if placement is not None: - pulumi.set(__self__, "placement", placement) + _setter("placement", placement) @property @pulumi.getter @@ -1273,9 +1635,30 @@ def __init__(__self__, *, :param str product: Specifies the Product of the Marketplace Image this Virtual Machine should be created from. Changing this forces a new resource to be created. :param str publisher: Specifies the Publisher of the Marketplace Image this Virtual Machine should be created from. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + LinuxVirtualMachinePlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + product: Optional[str] = None, + publisher: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -1326,8 +1709,21 @@ def __init__(__self__, *, """ :param bool ultra_ssd_enabled: Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Virtual Machine Scale Set? Possible values are `true` or `false`. Defaults to `false`. Changing this forces a new resource to be created. """ + LinuxVirtualMachineScaleSetAdditionalCapabilities._configure( + lambda key, value: pulumi.set(__self__, key, value), + ultra_ssd_enabled=ultra_ssd_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ultra_ssd_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) @property @pulumi.getter(name="ultraSsdEnabled") @@ -1366,8 +1762,27 @@ def __init__(__self__, *, > **NOTE:** The Azure VM Agent only allows creating SSH Keys at the path `/home/{username}/.ssh/authorized_keys` - as such this public key will be added/appended to the authorized keys file. """ - pulumi.set(__self__, "public_key", public_key) - pulumi.set(__self__, "username", username) + LinuxVirtualMachineScaleSetAdminSshKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_key=public_key, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_key: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_key is None and 'publicKey' in kwargs: + public_key = kwargs['publicKey'] + if public_key is None: + raise TypeError("Missing 'public_key' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("public_key", public_key) + _setter("username", username) @property @pulumi.getter(name="publicKey") @@ -1414,9 +1829,26 @@ def __init__(__self__, *, :param bool enabled: Should the automatic instance repair be enabled on this Virtual Machine Scale Set? :param str grace_period: Amount of time (in minutes, between 30 and 90, defaults to 30 minutes) for which automatic repairs will be delayed. The grace period starts right after the VM is found unhealthy. The time duration should be specified in ISO 8601 format. Defaults to `PT30M`. """ - pulumi.set(__self__, "enabled", enabled) + LinuxVirtualMachineScaleSetAutomaticInstanceRepair._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + grace_period=grace_period, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + grace_period: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if grace_period is None and 'gracePeriod' in kwargs: + grace_period = kwargs['gracePeriod'] + + _setter("enabled", enabled) if grace_period is not None: - pulumi.set(__self__, "grace_period", grace_period) + _setter("grace_period", grace_period) @property @pulumi.getter @@ -1463,8 +1895,29 @@ def __init__(__self__, *, :param bool disable_automatic_rollback: Should automatic rollbacks be disabled? :param bool enable_automatic_os_upgrade: Should OS Upgrades automatically be applied to Scale Set instances in a rolling fashion when a newer version of the OS Image becomes available? """ - pulumi.set(__self__, "disable_automatic_rollback", disable_automatic_rollback) - pulumi.set(__self__, "enable_automatic_os_upgrade", enable_automatic_os_upgrade) + LinuxVirtualMachineScaleSetAutomaticOsUpgradePolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + disable_automatic_rollback=disable_automatic_rollback, + enable_automatic_os_upgrade=enable_automatic_os_upgrade, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disable_automatic_rollback: Optional[bool] = None, + enable_automatic_os_upgrade: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disable_automatic_rollback is None and 'disableAutomaticRollback' in kwargs: + disable_automatic_rollback = kwargs['disableAutomaticRollback'] + if disable_automatic_rollback is None: + raise TypeError("Missing 'disable_automatic_rollback' argument") + if enable_automatic_os_upgrade is None and 'enableAutomaticOsUpgrade' in kwargs: + enable_automatic_os_upgrade = kwargs['enableAutomaticOsUpgrade'] + if enable_automatic_os_upgrade is None: + raise TypeError("Missing 'enable_automatic_os_upgrade' argument") + + _setter("disable_automatic_rollback", disable_automatic_rollback) + _setter("enable_automatic_os_upgrade", enable_automatic_os_upgrade) @property @pulumi.getter(name="disableAutomaticRollback") @@ -1509,8 +1962,21 @@ def __init__(__self__, *, > **NOTE:** Passing a null value will utilize a Managed Storage Account to store Boot Diagnostics. """ + LinuxVirtualMachineScaleSetBootDiagnostics._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_uri=storage_account_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_uri: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_uri is None and 'storageAccountUri' in kwargs: + storage_account_uri = kwargs['storageAccountUri'] + if storage_account_uri is not None: - pulumi.set(__self__, "storage_account_uri", storage_account_uri) + _setter("storage_account_uri", storage_account_uri) @property @pulumi.getter(name="storageAccountUri") @@ -1585,22 +2051,73 @@ def __init__(__self__, *, > **NOTE:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "disk_size_gb", disk_size_gb) - pulumi.set(__self__, "lun", lun) - pulumi.set(__self__, "storage_account_type", storage_account_type) + LinuxVirtualMachineScaleSetDataDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + disk_size_gb=disk_size_gb, + lun=lun, + storage_account_type=storage_account_type, + create_option=create_option, + disk_encryption_set_id=disk_encryption_set_id, + name=name, + ultra_ssd_disk_iops_read_write=ultra_ssd_disk_iops_read_write, + ultra_ssd_disk_mbps_read_write=ultra_ssd_disk_mbps_read_write, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[str] = None, + disk_size_gb: Optional[int] = None, + lun: Optional[int] = None, + storage_account_type: Optional[str] = None, + create_option: Optional[str] = None, + disk_encryption_set_id: Optional[str] = None, + name: Optional[str] = None, + ultra_ssd_disk_iops_read_write: Optional[int] = None, + ultra_ssd_disk_mbps_read_write: Optional[int] = None, + write_accelerator_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if disk_size_gb is None: + raise TypeError("Missing 'disk_size_gb' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if ultra_ssd_disk_iops_read_write is None and 'ultraSsdDiskIopsReadWrite' in kwargs: + ultra_ssd_disk_iops_read_write = kwargs['ultraSsdDiskIopsReadWrite'] + if ultra_ssd_disk_mbps_read_write is None and 'ultraSsdDiskMbpsReadWrite' in kwargs: + ultra_ssd_disk_mbps_read_write = kwargs['ultraSsdDiskMbpsReadWrite'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("disk_size_gb", disk_size_gb) + _setter("lun", lun) + _setter("storage_account_type", storage_account_type) if create_option is not None: - pulumi.set(__self__, "create_option", create_option) + _setter("create_option", create_option) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if ultra_ssd_disk_iops_read_write is not None: - pulumi.set(__self__, "ultra_ssd_disk_iops_read_write", ultra_ssd_disk_iops_read_write) + _setter("ultra_ssd_disk_iops_read_write", ultra_ssd_disk_iops_read_write) if ultra_ssd_disk_mbps_read_write is not None: - pulumi.set(__self__, "ultra_ssd_disk_mbps_read_write", ultra_ssd_disk_mbps_read_write) + _setter("ultra_ssd_disk_mbps_read_write", ultra_ssd_disk_mbps_read_write) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -1750,24 +2267,77 @@ def __init__(__self__, *, > **NOTE:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_handler_version", type_handler_version) + LinuxVirtualMachineScaleSetExtension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + publisher=publisher, + type=type, + type_handler_version=type_handler_version, + auto_upgrade_minor_version=auto_upgrade_minor_version, + automatic_upgrade_enabled=automatic_upgrade_enabled, + force_update_tag=force_update_tag, + protected_settings=protected_settings, + protected_settings_from_key_vault=protected_settings_from_key_vault, + provision_after_extensions=provision_after_extensions, + settings=settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + publisher: Optional[str] = None, + type: Optional[str] = None, + type_handler_version: Optional[str] = None, + auto_upgrade_minor_version: Optional[bool] = None, + automatic_upgrade_enabled: Optional[bool] = None, + force_update_tag: Optional[str] = None, + protected_settings: Optional[str] = None, + protected_settings_from_key_vault: Optional['outputs.LinuxVirtualMachineScaleSetExtensionProtectedSettingsFromKeyVault'] = None, + provision_after_extensions: Optional[Sequence[str]] = None, + settings: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if type_handler_version is None: + raise TypeError("Missing 'type_handler_version' argument") + if auto_upgrade_minor_version is None and 'autoUpgradeMinorVersion' in kwargs: + auto_upgrade_minor_version = kwargs['autoUpgradeMinorVersion'] + if automatic_upgrade_enabled is None and 'automaticUpgradeEnabled' in kwargs: + automatic_upgrade_enabled = kwargs['automaticUpgradeEnabled'] + if force_update_tag is None and 'forceUpdateTag' in kwargs: + force_update_tag = kwargs['forceUpdateTag'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if protected_settings_from_key_vault is None and 'protectedSettingsFromKeyVault' in kwargs: + protected_settings_from_key_vault = kwargs['protectedSettingsFromKeyVault'] + if provision_after_extensions is None and 'provisionAfterExtensions' in kwargs: + provision_after_extensions = kwargs['provisionAfterExtensions'] + + _setter("name", name) + _setter("publisher", publisher) + _setter("type", type) + _setter("type_handler_version", type_handler_version) if auto_upgrade_minor_version is not None: - pulumi.set(__self__, "auto_upgrade_minor_version", auto_upgrade_minor_version) + _setter("auto_upgrade_minor_version", auto_upgrade_minor_version) if automatic_upgrade_enabled is not None: - pulumi.set(__self__, "automatic_upgrade_enabled", automatic_upgrade_enabled) + _setter("automatic_upgrade_enabled", automatic_upgrade_enabled) if force_update_tag is not None: - pulumi.set(__self__, "force_update_tag", force_update_tag) + _setter("force_update_tag", force_update_tag) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if protected_settings_from_key_vault is not None: - pulumi.set(__self__, "protected_settings_from_key_vault", protected_settings_from_key_vault) + _setter("protected_settings_from_key_vault", protected_settings_from_key_vault) if provision_after_extensions is not None: - pulumi.set(__self__, "provision_after_extensions", provision_after_extensions) + _setter("provision_after_extensions", provision_after_extensions) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) @property @pulumi.getter @@ -1887,8 +2457,29 @@ def __init__(__self__, *, :param str secret_url: The URL to the Key Vault Secret which stores the protected settings. :param str source_vault_id: The ID of the source Key Vault. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + LinuxVirtualMachineScaleSetExtensionProtectedSettingsFromKeyVault._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -1937,13 +2528,36 @@ def __init__(__self__, *, :param int order: Specifies the order in which the packages have to be installed. Possible values are between `0` and `2,147,483,647`. Changing this forces a new resource to be created. :param str tag: Specifies a passthrough value for more generic context. This field can be any valid `string` value. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "package_reference_id", package_reference_id) + LinuxVirtualMachineScaleSetGalleryApplication._configure( + lambda key, value: pulumi.set(__self__, key, value), + package_reference_id=package_reference_id, + configuration_reference_blob_uri=configuration_reference_blob_uri, + order=order, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + package_reference_id: Optional[str] = None, + configuration_reference_blob_uri: Optional[str] = None, + order: Optional[int] = None, + tag: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if package_reference_id is None and 'packageReferenceId' in kwargs: + package_reference_id = kwargs['packageReferenceId'] + if package_reference_id is None: + raise TypeError("Missing 'package_reference_id' argument") + if configuration_reference_blob_uri is None and 'configurationReferenceBlobUri' in kwargs: + configuration_reference_blob_uri = kwargs['configurationReferenceBlobUri'] + + _setter("package_reference_id", package_reference_id) if configuration_reference_blob_uri is not None: - pulumi.set(__self__, "configuration_reference_blob_uri", configuration_reference_blob_uri) + _setter("configuration_reference_blob_uri", configuration_reference_blob_uri) if order is not None: - pulumi.set(__self__, "order", order) + _setter("order", order) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter(name="packageReferenceId") @@ -2014,13 +2628,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + LinuxVirtualMachineScaleSetIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -2103,18 +2742,55 @@ def __init__(__self__, *, > **NOTE:** If multiple `network_interface` blocks are specified, one must be set to `primary`. """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) + LinuxVirtualMachineScaleSetNetworkInterface._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + name=name, + dns_servers=dns_servers, + enable_accelerated_networking=enable_accelerated_networking, + enable_ip_forwarding=enable_ip_forwarding, + network_security_group_id=network_security_group_id, + primary=primary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[Sequence['outputs.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfiguration']] = None, + name: Optional[str] = None, + dns_servers: Optional[Sequence[str]] = None, + enable_accelerated_networking: Optional[bool] = None, + enable_ip_forwarding: Optional[bool] = None, + network_security_group_id: Optional[str] = None, + primary: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if enable_accelerated_networking is None and 'enableAcceleratedNetworking' in kwargs: + enable_accelerated_networking = kwargs['enableAcceleratedNetworking'] + if enable_ip_forwarding is None and 'enableIpForwarding' in kwargs: + enable_ip_forwarding = kwargs['enableIpForwarding'] + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + + _setter("ip_configurations", ip_configurations) + _setter("name", name) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if enable_accelerated_networking is not None: - pulumi.set(__self__, "enable_accelerated_networking", enable_accelerated_networking) + _setter("enable_accelerated_networking", enable_accelerated_networking) if enable_ip_forwarding is not None: - pulumi.set(__self__, "enable_ip_forwarding", enable_ip_forwarding) + _setter("enable_ip_forwarding", enable_ip_forwarding) if network_security_group_id is not None: - pulumi.set(__self__, "network_security_group_id", network_security_group_id) + _setter("network_security_group_id", network_security_group_id) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) @property @pulumi.getter(name="ipConfigurations") @@ -2235,23 +2911,64 @@ def __init__(__self__, *, > `subnet_id` is required if `version` is set to `IPv4`. :param str version: The Internet Protocol Version which should be used for this IP Configuration. Possible values are `IPv4` and `IPv6`. Defaults to `IPv4`. """ - pulumi.set(__self__, "name", name) + LinuxVirtualMachineScaleSetNetworkInterfaceIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + application_gateway_backend_address_pool_ids=application_gateway_backend_address_pool_ids, + application_security_group_ids=application_security_group_ids, + load_balancer_backend_address_pool_ids=load_balancer_backend_address_pool_ids, + load_balancer_inbound_nat_rules_ids=load_balancer_inbound_nat_rules_ids, + primary=primary, + public_ip_addresses=public_ip_addresses, + subnet_id=subnet_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + application_gateway_backend_address_pool_ids: Optional[Sequence[str]] = None, + application_security_group_ids: Optional[Sequence[str]] = None, + load_balancer_backend_address_pool_ids: Optional[Sequence[str]] = None, + load_balancer_inbound_nat_rules_ids: Optional[Sequence[str]] = None, + primary: Optional[bool] = None, + public_ip_addresses: Optional[Sequence['outputs.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress']] = None, + subnet_id: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if application_gateway_backend_address_pool_ids is None and 'applicationGatewayBackendAddressPoolIds' in kwargs: + application_gateway_backend_address_pool_ids = kwargs['applicationGatewayBackendAddressPoolIds'] + if application_security_group_ids is None and 'applicationSecurityGroupIds' in kwargs: + application_security_group_ids = kwargs['applicationSecurityGroupIds'] + if load_balancer_backend_address_pool_ids is None and 'loadBalancerBackendAddressPoolIds' in kwargs: + load_balancer_backend_address_pool_ids = kwargs['loadBalancerBackendAddressPoolIds'] + if load_balancer_inbound_nat_rules_ids is None and 'loadBalancerInboundNatRulesIds' in kwargs: + load_balancer_inbound_nat_rules_ids = kwargs['loadBalancerInboundNatRulesIds'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) if application_gateway_backend_address_pool_ids is not None: - pulumi.set(__self__, "application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) + _setter("application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) if application_security_group_ids is not None: - pulumi.set(__self__, "application_security_group_ids", application_security_group_ids) + _setter("application_security_group_ids", application_security_group_ids) if load_balancer_backend_address_pool_ids is not None: - pulumi.set(__self__, "load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) + _setter("load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) if load_balancer_inbound_nat_rules_ids is not None: - pulumi.set(__self__, "load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) + _setter("load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -2378,17 +3095,48 @@ def __init__(__self__, *, > **NOTE:** This functionality is in Preview and must be opted into via `az feature register --namespace Microsoft.Network --name AllowBringYourOwnPublicIpAddress` and then `az provider register -n Microsoft.Network`. :param str version: The Internet Protocol Version which should be used for this public IP address. Possible values are `IPv4` and `IPv6`. Defaults to `IPv4`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + domain_name_label=domain_name_label, + idle_timeout_in_minutes=idle_timeout_in_minutes, + ip_tags=ip_tags, + public_ip_prefix_id=public_ip_prefix_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + domain_name_label: Optional[str] = None, + idle_timeout_in_minutes: Optional[int] = None, + ip_tags: Optional[Sequence['outputs.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTag']] = None, + public_ip_prefix_id: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if domain_name_label is None and 'domainNameLabel' in kwargs: + domain_name_label = kwargs['domainNameLabel'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if ip_tags is None and 'ipTags' in kwargs: + ip_tags = kwargs['ipTags'] + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + + _setter("name", name) if domain_name_label is not None: - pulumi.set(__self__, "domain_name_label", domain_name_label) + _setter("domain_name_label", domain_name_label) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if ip_tags is not None: - pulumi.set(__self__, "ip_tags", ip_tags) + _setter("ip_tags", ip_tags) if public_ip_prefix_id is not None: - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) + _setter("public_ip_prefix_id", public_ip_prefix_id) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -2450,8 +3198,25 @@ def __init__(__self__, *, :param str tag: The IP Tag associated with the Public IP, such as `SQL` or `Storage`. Changing this forces a new resource to be created. :param str type: The Type of IP Tag, such as `FirstPartyUsage`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "type", type) + LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTag._configure( + lambda key, value: pulumi.set(__self__, key, value), + tag=tag, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tag: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag is None: + raise TypeError("Missing 'tag' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("tag", tag) + _setter("type", type) @property @pulumi.getter @@ -2534,20 +3299,63 @@ def __init__(__self__, *, > **NOTE:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "storage_account_type", storage_account_type) + LinuxVirtualMachineScaleSetOsDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + storage_account_type=storage_account_type, + diff_disk_settings=diff_disk_settings, + disk_encryption_set_id=disk_encryption_set_id, + disk_size_gb=disk_size_gb, + secure_vm_disk_encryption_set_id=secure_vm_disk_encryption_set_id, + security_encryption_type=security_encryption_type, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[str] = None, + storage_account_type: Optional[str] = None, + diff_disk_settings: Optional['outputs.LinuxVirtualMachineScaleSetOsDiskDiffDiskSettings'] = None, + disk_encryption_set_id: Optional[str] = None, + disk_size_gb: Optional[int] = None, + secure_vm_disk_encryption_set_id: Optional[str] = None, + security_encryption_type: Optional[str] = None, + write_accelerator_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if diff_disk_settings is None and 'diffDiskSettings' in kwargs: + diff_disk_settings = kwargs['diffDiskSettings'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if secure_vm_disk_encryption_set_id is None and 'secureVmDiskEncryptionSetId' in kwargs: + secure_vm_disk_encryption_set_id = kwargs['secureVmDiskEncryptionSetId'] + if security_encryption_type is None and 'securityEncryptionType' in kwargs: + security_encryption_type = kwargs['securityEncryptionType'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("storage_account_type", storage_account_type) if diff_disk_settings is not None: - pulumi.set(__self__, "diff_disk_settings", diff_disk_settings) + _setter("diff_disk_settings", diff_disk_settings) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if secure_vm_disk_encryption_set_id is not None: - pulumi.set(__self__, "secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) + _setter("secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) if security_encryption_type is not None: - pulumi.set(__self__, "security_encryption_type", security_encryption_type) + _setter("security_encryption_type", security_encryption_type) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -2637,9 +3445,24 @@ def __init__(__self__, *, :param str option: Specifies the Ephemeral Disk Settings for the OS Disk. At this time the only possible value is `Local`. Changing this forces a new resource to be created. :param str placement: Specifies where to store the Ephemeral Disk. Possible values are `CacheDisk` and `ResourceDisk`. Defaults to `CacheDisk`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "option", option) + LinuxVirtualMachineScaleSetOsDiskDiffDiskSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + option=option, + placement=placement, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + option: Optional[str] = None, + placement: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if option is None: + raise TypeError("Missing 'option' argument") + + _setter("option", option) if placement is not None: - pulumi.set(__self__, "placement", placement) + _setter("placement", placement) @property @pulumi.getter @@ -2669,9 +3492,30 @@ def __init__(__self__, *, :param str product: Specifies the product of the image from the marketplace. Changing this forces a new resource to be created. :param str publisher: Specifies the publisher of the image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + LinuxVirtualMachineScaleSetPlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + product: Optional[str] = None, + publisher: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -2742,14 +3586,55 @@ def __init__(__self__, *, :param bool cross_zone_upgrades_enabled: Should the Virtual Machine Scale Set ignore the Azure Zone boundaries when constructing upgrade batches? Possible values are `true` or `false`. :param bool prioritize_unhealthy_instances_enabled: Upgrade all unhealthy instances in a scale set before any healthy instances. Possible values are `true` or `false`. """ - pulumi.set(__self__, "max_batch_instance_percent", max_batch_instance_percent) - pulumi.set(__self__, "max_unhealthy_instance_percent", max_unhealthy_instance_percent) - pulumi.set(__self__, "max_unhealthy_upgraded_instance_percent", max_unhealthy_upgraded_instance_percent) - pulumi.set(__self__, "pause_time_between_batches", pause_time_between_batches) + LinuxVirtualMachineScaleSetRollingUpgradePolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_batch_instance_percent=max_batch_instance_percent, + max_unhealthy_instance_percent=max_unhealthy_instance_percent, + max_unhealthy_upgraded_instance_percent=max_unhealthy_upgraded_instance_percent, + pause_time_between_batches=pause_time_between_batches, + cross_zone_upgrades_enabled=cross_zone_upgrades_enabled, + prioritize_unhealthy_instances_enabled=prioritize_unhealthy_instances_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_batch_instance_percent: Optional[int] = None, + max_unhealthy_instance_percent: Optional[int] = None, + max_unhealthy_upgraded_instance_percent: Optional[int] = None, + pause_time_between_batches: Optional[str] = None, + cross_zone_upgrades_enabled: Optional[bool] = None, + prioritize_unhealthy_instances_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_batch_instance_percent is None and 'maxBatchInstancePercent' in kwargs: + max_batch_instance_percent = kwargs['maxBatchInstancePercent'] + if max_batch_instance_percent is None: + raise TypeError("Missing 'max_batch_instance_percent' argument") + if max_unhealthy_instance_percent is None and 'maxUnhealthyInstancePercent' in kwargs: + max_unhealthy_instance_percent = kwargs['maxUnhealthyInstancePercent'] + if max_unhealthy_instance_percent is None: + raise TypeError("Missing 'max_unhealthy_instance_percent' argument") + if max_unhealthy_upgraded_instance_percent is None and 'maxUnhealthyUpgradedInstancePercent' in kwargs: + max_unhealthy_upgraded_instance_percent = kwargs['maxUnhealthyUpgradedInstancePercent'] + if max_unhealthy_upgraded_instance_percent is None: + raise TypeError("Missing 'max_unhealthy_upgraded_instance_percent' argument") + if pause_time_between_batches is None and 'pauseTimeBetweenBatches' in kwargs: + pause_time_between_batches = kwargs['pauseTimeBetweenBatches'] + if pause_time_between_batches is None: + raise TypeError("Missing 'pause_time_between_batches' argument") + if cross_zone_upgrades_enabled is None and 'crossZoneUpgradesEnabled' in kwargs: + cross_zone_upgrades_enabled = kwargs['crossZoneUpgradesEnabled'] + if prioritize_unhealthy_instances_enabled is None and 'prioritizeUnhealthyInstancesEnabled' in kwargs: + prioritize_unhealthy_instances_enabled = kwargs['prioritizeUnhealthyInstancesEnabled'] + + _setter("max_batch_instance_percent", max_batch_instance_percent) + _setter("max_unhealthy_instance_percent", max_unhealthy_instance_percent) + _setter("max_unhealthy_upgraded_instance_percent", max_unhealthy_upgraded_instance_percent) + _setter("pause_time_between_batches", pause_time_between_batches) if cross_zone_upgrades_enabled is not None: - pulumi.set(__self__, "cross_zone_upgrades_enabled", cross_zone_upgrades_enabled) + _setter("cross_zone_upgrades_enabled", cross_zone_upgrades_enabled) if prioritize_unhealthy_instances_enabled is not None: - pulumi.set(__self__, "prioritize_unhealthy_instances_enabled", prioritize_unhealthy_instances_enabled) + _setter("prioritize_unhealthy_instances_enabled", prioritize_unhealthy_instances_enabled) @property @pulumi.getter(name="maxBatchInstancePercent") @@ -2826,10 +3711,25 @@ def __init__(__self__, *, :param bool force_deletion_enabled: Should the virtual machines chosen for removal be force deleted when the virtual machine scale set is being scaled-in? Possible values are `true` or `false`. Defaults to `false`. :param str rule: The scale-in policy rule that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled in. Possible values for the scale-in policy rules are `Default`, `NewestVM` and `OldestVM`, defaults to `Default`. For more information about scale in policy, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-scale-in-policy). """ + LinuxVirtualMachineScaleSetScaleIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + force_deletion_enabled=force_deletion_enabled, + rule=rule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + force_deletion_enabled: Optional[bool] = None, + rule: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if force_deletion_enabled is None and 'forceDeletionEnabled' in kwargs: + force_deletion_enabled = kwargs['forceDeletionEnabled'] + if force_deletion_enabled is not None: - pulumi.set(__self__, "force_deletion_enabled", force_deletion_enabled) + _setter("force_deletion_enabled", force_deletion_enabled) if rule is not None: - pulumi.set(__self__, "rule", rule) + _setter("rule", rule) @property @pulumi.getter(name="forceDeletionEnabled") @@ -2874,8 +3774,27 @@ def __init__(__self__, *, :param Sequence['LinuxVirtualMachineScaleSetSecretCertificateArgs'] certificates: One or more `certificate` blocks as defined above. :param str key_vault_id: The ID of the Key Vault from which all Secrets should be sourced. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "key_vault_id", key_vault_id) + LinuxVirtualMachineScaleSetSecret._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[Sequence['outputs.LinuxVirtualMachineScaleSetSecretCertificate']] = None, + key_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("certificates", certificates) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -2905,7 +3824,20 @@ def __init__(__self__, *, > **NOTE:** The certificate must have been uploaded/created in PFX format, PEM certificates are not currently supported by Azure. """ - pulumi.set(__self__, "url", url) + LinuxVirtualMachineScaleSetSecretCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("url", url) @property @pulumi.getter @@ -2933,10 +3865,35 @@ def __init__(__self__, *, :param str sku: Specifies the SKU of the image used to create the virtual machines. :param str version: Specifies the version of the image used to create the virtual machines. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + LinuxVirtualMachineScaleSetSourceImageReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -2980,10 +3937,23 @@ def __init__(__self__, *, :param bool enabled: Should the Spot-Try-Restore feature be enabled? The Spot-Try-Restore feature will attempt to automatically restore the evicted Spot Virtual Machine Scale Set VM instances opportunistically based on capacity availability and pricing constraints. Possible values are `true` or `false`. Defaults to `false`. Changing this forces a new resource to be created. :param str timeout: The length of time that the Virtual Machine Scale Set should attempt to restore the Spot VM instances which have been evicted. The time duration should be between `15` minutes and `120` minutes (inclusive). The time duration should be specified in the ISO 8601 format. Defaults to `90` minutes (e.g. `PT1H30M`). Changing this forces a new resource to be created. """ + LinuxVirtualMachineScaleSetSpotRestore._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + timeout: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -3013,9 +3983,24 @@ def __init__(__self__, *, > **NOTE:** For more information about the terminate notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). """ - pulumi.set(__self__, "enabled", enabled) + LinuxVirtualMachineScaleSetTerminateNotification._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + timeout: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -3047,9 +4032,24 @@ def __init__(__self__, *, > **NOTE:** For more information about the termination notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). """ - pulumi.set(__self__, "enabled", enabled) + LinuxVirtualMachineScaleSetTerminationNotification._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + timeout: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -3096,8 +4096,27 @@ def __init__(__self__, *, :param Sequence['LinuxVirtualMachineSecretCertificateArgs'] certificates: One or more `certificate` blocks as defined above. :param str key_vault_id: The ID of the Key Vault from which all Secrets should be sourced. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "key_vault_id", key_vault_id) + LinuxVirtualMachineSecret._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[Sequence['outputs.LinuxVirtualMachineSecretCertificate']] = None, + key_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("certificates", certificates) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -3125,7 +4144,20 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "url", url) + LinuxVirtualMachineSecretCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("url", url) @property @pulumi.getter @@ -3151,10 +4183,35 @@ def __init__(__self__, *, :param str sku: Specifies the SKU of the image used to create the virtual machines. Changing this forces a new resource to be created. :param str version: Specifies the version of the image used to create the virtual machines. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + LinuxVirtualMachineSourceImageReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -3200,9 +4257,24 @@ def __init__(__self__, *, > **NOTE:** For more information about the termination notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). """ - pulumi.set(__self__, "enabled", enabled) + LinuxVirtualMachineTerminationNotification._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + timeout: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -3252,12 +4324,31 @@ def __init__(__self__, *, :param 'ManagedDiskEncryptionSettingsDiskEncryptionKeyArgs' disk_encryption_key: A `disk_encryption_key` block as defined above. :param 'ManagedDiskEncryptionSettingsKeyEncryptionKeyArgs' key_encryption_key: A `key_encryption_key` block as defined below. """ + ManagedDiskEncryptionSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_encryption_key=disk_encryption_key, + enabled=enabled, + key_encryption_key=key_encryption_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_encryption_key: Optional['outputs.ManagedDiskEncryptionSettingsDiskEncryptionKey'] = None, + enabled: Optional[bool] = None, + key_encryption_key: Optional['outputs.ManagedDiskEncryptionSettingsKeyEncryptionKey'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_encryption_key is None and 'diskEncryptionKey' in kwargs: + disk_encryption_key = kwargs['diskEncryptionKey'] + if key_encryption_key is None and 'keyEncryptionKey' in kwargs: + key_encryption_key = kwargs['keyEncryptionKey'] + if disk_encryption_key is not None: - pulumi.set(__self__, "disk_encryption_key", disk_encryption_key) + _setter("disk_encryption_key", disk_encryption_key) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if key_encryption_key is not None: - pulumi.set(__self__, "key_encryption_key", key_encryption_key) + _setter("key_encryption_key", key_encryption_key) @property @pulumi.getter(name="diskEncryptionKey") @@ -3312,8 +4403,29 @@ def __init__(__self__, *, :param str secret_url: The URL to the Key Vault Secret used as the Disk Encryption Key. This can be found as `id` on the `keyvault.Secret` resource. :param str source_vault_id: The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + ManagedDiskEncryptionSettingsDiskEncryptionKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -3360,8 +4472,29 @@ def __init__(__self__, *, :param str key_url: The URL to the Key Vault Key used as the Key Encryption Key. This can be found as `id` on the `keyvault.Key` resource. :param str source_vault_id: The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. """ - pulumi.set(__self__, "key_url", key_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + ManagedDiskEncryptionSettingsKeyEncryptionKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_url=key_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_url is None and 'keyUrl' in kwargs: + key_url = kwargs['keyUrl'] + if key_url is None: + raise TypeError("Missing 'key_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("key_url", key_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="keyUrl") @@ -3404,8 +4537,21 @@ def __init__(__self__, *, """ :param bool ultra_ssd_enabled: Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Orchestrated Virtual Machine Scale Set? Defaults to `false`. Changing this forces a new resource to be created. """ + OrchestratedVirtualMachineScaleSetAdditionalCapabilities._configure( + lambda key, value: pulumi.set(__self__, key, value), + ultra_ssd_enabled=ultra_ssd_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ultra_ssd_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) @property @pulumi.getter(name="ultraSsdEnabled") @@ -3442,9 +4588,26 @@ def __init__(__self__, *, :param bool enabled: Should the automatic instance repair be enabled on this Orchestrated Virtual Machine Scale Set? Possible values are `true` and `false`. :param str grace_period: Amount of time for which automatic repairs will be delayed. The grace period starts right after the VM is found unhealthy. Possible values are between `30` and `90` minutes. Defaults to `30` minutes. The time duration should be specified in `ISO 8601` format (e.g. `PT30M` to `PT90M`). """ - pulumi.set(__self__, "enabled", enabled) + OrchestratedVirtualMachineScaleSetAutomaticInstanceRepair._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + grace_period=grace_period, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + grace_period: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if grace_period is None and 'gracePeriod' in kwargs: + grace_period = kwargs['gracePeriod'] + + _setter("enabled", enabled) if grace_period is not None: - pulumi.set(__self__, "grace_period", grace_period) + _setter("grace_period", grace_period) @property @pulumi.getter @@ -3487,8 +4650,21 @@ def __init__(__self__, *, """ :param str storage_account_uri: The Primary/Secondary Endpoint for the Azure Storage Account which should be used to store Boot Diagnostics, including Console Output and Screenshots from the Hypervisor. By including a `boot_diagnostics` block without passing the `storage_account_uri` field will cause the API to utilize a Managed Storage Account to store the Boot Diagnostics output. """ + OrchestratedVirtualMachineScaleSetBootDiagnostics._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_uri=storage_account_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_uri: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_uri is None and 'storageAccountUri' in kwargs: + storage_account_uri = kwargs['storageAccountUri'] + if storage_account_uri is not None: - pulumi.set(__self__, "storage_account_uri", storage_account_uri) + _setter("storage_account_uri", storage_account_uri) @property @pulumi.getter(name="storageAccountUri") @@ -3549,20 +4725,69 @@ def __init__(__self__, *, :param str disk_encryption_set_id: The ID of the Disk Encryption Set which should be used to encrypt the Data Disk. Changing this forces a new resource to be created. :param bool write_accelerator_enabled: Specifies if Write Accelerator is enabled on the Data Disk. Defaults to `false`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "disk_size_gb", disk_size_gb) - pulumi.set(__self__, "lun", lun) - pulumi.set(__self__, "storage_account_type", storage_account_type) + OrchestratedVirtualMachineScaleSetDataDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + disk_size_gb=disk_size_gb, + lun=lun, + storage_account_type=storage_account_type, + create_option=create_option, + disk_encryption_set_id=disk_encryption_set_id, + ultra_ssd_disk_iops_read_write=ultra_ssd_disk_iops_read_write, + ultra_ssd_disk_mbps_read_write=ultra_ssd_disk_mbps_read_write, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[str] = None, + disk_size_gb: Optional[int] = None, + lun: Optional[int] = None, + storage_account_type: Optional[str] = None, + create_option: Optional[str] = None, + disk_encryption_set_id: Optional[str] = None, + ultra_ssd_disk_iops_read_write: Optional[int] = None, + ultra_ssd_disk_mbps_read_write: Optional[int] = None, + write_accelerator_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if disk_size_gb is None: + raise TypeError("Missing 'disk_size_gb' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if ultra_ssd_disk_iops_read_write is None and 'ultraSsdDiskIopsReadWrite' in kwargs: + ultra_ssd_disk_iops_read_write = kwargs['ultraSsdDiskIopsReadWrite'] + if ultra_ssd_disk_mbps_read_write is None and 'ultraSsdDiskMbpsReadWrite' in kwargs: + ultra_ssd_disk_mbps_read_write = kwargs['ultraSsdDiskMbpsReadWrite'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("disk_size_gb", disk_size_gb) + _setter("lun", lun) + _setter("storage_account_type", storage_account_type) if create_option is not None: - pulumi.set(__self__, "create_option", create_option) + _setter("create_option", create_option) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if ultra_ssd_disk_iops_read_write is not None: - pulumi.set(__self__, "ultra_ssd_disk_iops_read_write", ultra_ssd_disk_iops_read_write) + _setter("ultra_ssd_disk_iops_read_write", ultra_ssd_disk_iops_read_write) if ultra_ssd_disk_mbps_read_write is not None: - pulumi.set(__self__, "ultra_ssd_disk_mbps_read_write", ultra_ssd_disk_mbps_read_write) + _setter("ultra_ssd_disk_mbps_read_write", ultra_ssd_disk_mbps_read_write) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -3693,24 +4918,77 @@ def __init__(__self__, *, > **Note:** `protected_settings_from_key_vault` cannot be used with `protected_settings` :param str settings: A JSON String which specifies Settings for the Extension. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_handler_version", type_handler_version) + OrchestratedVirtualMachineScaleSetExtension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + publisher=publisher, + type=type, + type_handler_version=type_handler_version, + auto_upgrade_minor_version_enabled=auto_upgrade_minor_version_enabled, + extensions_to_provision_after_vm_creations=extensions_to_provision_after_vm_creations, + failure_suppression_enabled=failure_suppression_enabled, + force_extension_execution_on_change=force_extension_execution_on_change, + protected_settings=protected_settings, + protected_settings_from_key_vault=protected_settings_from_key_vault, + settings=settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + publisher: Optional[str] = None, + type: Optional[str] = None, + type_handler_version: Optional[str] = None, + auto_upgrade_minor_version_enabled: Optional[bool] = None, + extensions_to_provision_after_vm_creations: Optional[Sequence[str]] = None, + failure_suppression_enabled: Optional[bool] = None, + force_extension_execution_on_change: Optional[str] = None, + protected_settings: Optional[str] = None, + protected_settings_from_key_vault: Optional['outputs.OrchestratedVirtualMachineScaleSetExtensionProtectedSettingsFromKeyVault'] = None, + settings: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if type_handler_version is None: + raise TypeError("Missing 'type_handler_version' argument") + if auto_upgrade_minor_version_enabled is None and 'autoUpgradeMinorVersionEnabled' in kwargs: + auto_upgrade_minor_version_enabled = kwargs['autoUpgradeMinorVersionEnabled'] + if extensions_to_provision_after_vm_creations is None and 'extensionsToProvisionAfterVmCreations' in kwargs: + extensions_to_provision_after_vm_creations = kwargs['extensionsToProvisionAfterVmCreations'] + if failure_suppression_enabled is None and 'failureSuppressionEnabled' in kwargs: + failure_suppression_enabled = kwargs['failureSuppressionEnabled'] + if force_extension_execution_on_change is None and 'forceExtensionExecutionOnChange' in kwargs: + force_extension_execution_on_change = kwargs['forceExtensionExecutionOnChange'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if protected_settings_from_key_vault is None and 'protectedSettingsFromKeyVault' in kwargs: + protected_settings_from_key_vault = kwargs['protectedSettingsFromKeyVault'] + + _setter("name", name) + _setter("publisher", publisher) + _setter("type", type) + _setter("type_handler_version", type_handler_version) if auto_upgrade_minor_version_enabled is not None: - pulumi.set(__self__, "auto_upgrade_minor_version_enabled", auto_upgrade_minor_version_enabled) + _setter("auto_upgrade_minor_version_enabled", auto_upgrade_minor_version_enabled) if extensions_to_provision_after_vm_creations is not None: - pulumi.set(__self__, "extensions_to_provision_after_vm_creations", extensions_to_provision_after_vm_creations) + _setter("extensions_to_provision_after_vm_creations", extensions_to_provision_after_vm_creations) if failure_suppression_enabled is not None: - pulumi.set(__self__, "failure_suppression_enabled", failure_suppression_enabled) + _setter("failure_suppression_enabled", failure_suppression_enabled) if force_extension_execution_on_change is not None: - pulumi.set(__self__, "force_extension_execution_on_change", force_extension_execution_on_change) + _setter("force_extension_execution_on_change", force_extension_execution_on_change) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if protected_settings_from_key_vault is not None: - pulumi.set(__self__, "protected_settings_from_key_vault", protected_settings_from_key_vault) + _setter("protected_settings_from_key_vault", protected_settings_from_key_vault) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) @property @pulumi.getter @@ -3835,8 +5113,29 @@ def __init__(__self__, *, :param str secret_url: The URL to the Key Vault Secret which stores the protected settings. :param str source_vault_id: The ID of the source Key Vault. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + OrchestratedVirtualMachineScaleSetExtensionProtectedSettingsFromKeyVault._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -3881,8 +5180,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: Specifies a list of User Managed Identity IDs to be assigned to this Orchestrated Windows Virtual Machine Scale Set. :param str type: The type of Managed Identity that should be configured on this Orchestrated Windows Virtual Machine Scale Set. Only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + OrchestratedVirtualMachineScaleSetIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -3947,18 +5265,55 @@ def __init__(__self__, *, > **NOTE:** If multiple `network_interface` blocks are specified, one must be set to `primary`. """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) + OrchestratedVirtualMachineScaleSetNetworkInterface._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + name=name, + dns_servers=dns_servers, + enable_accelerated_networking=enable_accelerated_networking, + enable_ip_forwarding=enable_ip_forwarding, + network_security_group_id=network_security_group_id, + primary=primary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[Sequence['outputs.OrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfiguration']] = None, + name: Optional[str] = None, + dns_servers: Optional[Sequence[str]] = None, + enable_accelerated_networking: Optional[bool] = None, + enable_ip_forwarding: Optional[bool] = None, + network_security_group_id: Optional[str] = None, + primary: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if enable_accelerated_networking is None and 'enableAcceleratedNetworking' in kwargs: + enable_accelerated_networking = kwargs['enableAcceleratedNetworking'] + if enable_ip_forwarding is None and 'enableIpForwarding' in kwargs: + enable_ip_forwarding = kwargs['enableIpForwarding'] + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + + _setter("ip_configurations", ip_configurations) + _setter("name", name) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if enable_accelerated_networking is not None: - pulumi.set(__self__, "enable_accelerated_networking", enable_accelerated_networking) + _setter("enable_accelerated_networking", enable_accelerated_networking) if enable_ip_forwarding is not None: - pulumi.set(__self__, "enable_ip_forwarding", enable_ip_forwarding) + _setter("enable_ip_forwarding", enable_ip_forwarding) if network_security_group_id is not None: - pulumi.set(__self__, "network_security_group_id", network_security_group_id) + _setter("network_security_group_id", network_security_group_id) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) @property @pulumi.getter(name="ipConfigurations") @@ -4071,21 +5426,58 @@ def __init__(__self__, *, > **NOTE:** `subnet_id` is required if version is set to `IPv4`. :param str version: The Internet Protocol Version which should be used for this IP Configuration. Possible values are `IPv4` and `IPv6`. Defaults to `IPv4`. """ - pulumi.set(__self__, "name", name) + OrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + application_gateway_backend_address_pool_ids=application_gateway_backend_address_pool_ids, + application_security_group_ids=application_security_group_ids, + load_balancer_backend_address_pool_ids=load_balancer_backend_address_pool_ids, + primary=primary, + public_ip_addresses=public_ip_addresses, + subnet_id=subnet_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + application_gateway_backend_address_pool_ids: Optional[Sequence[str]] = None, + application_security_group_ids: Optional[Sequence[str]] = None, + load_balancer_backend_address_pool_ids: Optional[Sequence[str]] = None, + primary: Optional[bool] = None, + public_ip_addresses: Optional[Sequence['outputs.OrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress']] = None, + subnet_id: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if application_gateway_backend_address_pool_ids is None and 'applicationGatewayBackendAddressPoolIds' in kwargs: + application_gateway_backend_address_pool_ids = kwargs['applicationGatewayBackendAddressPoolIds'] + if application_security_group_ids is None and 'applicationSecurityGroupIds' in kwargs: + application_security_group_ids = kwargs['applicationSecurityGroupIds'] + if load_balancer_backend_address_pool_ids is None and 'loadBalancerBackendAddressPoolIds' in kwargs: + load_balancer_backend_address_pool_ids = kwargs['loadBalancerBackendAddressPoolIds'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) if application_gateway_backend_address_pool_ids is not None: - pulumi.set(__self__, "application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) + _setter("application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) if application_security_group_ids is not None: - pulumi.set(__self__, "application_security_group_ids", application_security_group_ids) + _setter("application_security_group_ids", application_security_group_ids) if load_balancer_backend_address_pool_ids is not None: - pulumi.set(__self__, "load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) + _setter("load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -4202,19 +5594,54 @@ def __init__(__self__, *, :param str sku_name: Specifies what Public IP Address SKU the Public IP Address should be provisioned as. Possible vaules include `Basic_Regional`, `Basic_Global`, `Standard_Regional` or `Standard_Global`. For more information about Public IP Address SKU's and their capabilities, please see the [product documentation](https://docs.microsoft.com/azure/virtual-network/ip-services/public-ip-addresses#sku). Changing this forces a new resource to be created. :param str version: The Internet Protocol Version which should be used for this public IP address. Possible values are `IPv4` and `IPv6`. Defaults to `IPv4`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + OrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + domain_name_label=domain_name_label, + idle_timeout_in_minutes=idle_timeout_in_minutes, + ip_tags=ip_tags, + public_ip_prefix_id=public_ip_prefix_id, + sku_name=sku_name, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + domain_name_label: Optional[str] = None, + idle_timeout_in_minutes: Optional[int] = None, + ip_tags: Optional[Sequence['outputs.OrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTag']] = None, + public_ip_prefix_id: Optional[str] = None, + sku_name: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if domain_name_label is None and 'domainNameLabel' in kwargs: + domain_name_label = kwargs['domainNameLabel'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if ip_tags is None and 'ipTags' in kwargs: + ip_tags = kwargs['ipTags'] + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + + _setter("name", name) if domain_name_label is not None: - pulumi.set(__self__, "domain_name_label", domain_name_label) + _setter("domain_name_label", domain_name_label) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if ip_tags is not None: - pulumi.set(__self__, "ip_tags", ip_tags) + _setter("ip_tags", ip_tags) if public_ip_prefix_id is not None: - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) + _setter("public_ip_prefix_id", public_ip_prefix_id) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -4282,8 +5709,25 @@ def __init__(__self__, *, :param str tag: The IP Tag associated with the Public IP, such as `SQL` or `Storage`. Changing this forces a new resource to be created. :param str type: The Type of IP Tag, such as `FirstPartyUsage`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "type", type) + OrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTag._configure( + lambda key, value: pulumi.set(__self__, key, value), + tag=tag, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tag: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag is None: + raise TypeError("Missing 'tag' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("tag", tag) + _setter("type", type) @property @pulumi.getter @@ -4346,16 +5790,51 @@ def __init__(__self__, *, :param int disk_size_gb: The Size of the Internal OS Disk in GB, if you wish to vary from the size used in the image this Virtual Machine Scale Set is sourced from. :param bool write_accelerator_enabled: Specifies if Write Accelerator is enabled on the OS Disk. Defaults to `false`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "storage_account_type", storage_account_type) + OrchestratedVirtualMachineScaleSetOsDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + storage_account_type=storage_account_type, + diff_disk_settings=diff_disk_settings, + disk_encryption_set_id=disk_encryption_set_id, + disk_size_gb=disk_size_gb, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[str] = None, + storage_account_type: Optional[str] = None, + diff_disk_settings: Optional['outputs.OrchestratedVirtualMachineScaleSetOsDiskDiffDiskSettings'] = None, + disk_encryption_set_id: Optional[str] = None, + disk_size_gb: Optional[int] = None, + write_accelerator_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if diff_disk_settings is None and 'diffDiskSettings' in kwargs: + diff_disk_settings = kwargs['diffDiskSettings'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("storage_account_type", storage_account_type) if diff_disk_settings is not None: - pulumi.set(__self__, "diff_disk_settings", diff_disk_settings) + _setter("diff_disk_settings", diff_disk_settings) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -4417,9 +5896,24 @@ def __init__(__self__, *, :param str option: Specifies the Ephemeral Disk Settings for the OS Disk. At this time the only possible value is `Local`. Changing this forces a new resource to be created. :param str placement: Specifies where to store the Ephemeral Disk. Possible values are `CacheDisk` and `ResourceDisk`. Defaults to `CacheDisk`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "option", option) + OrchestratedVirtualMachineScaleSetOsDiskDiffDiskSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + option=option, + placement=placement, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + option: Optional[str] = None, + placement: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if option is None: + raise TypeError("Missing 'option' argument") + + _setter("option", option) if placement is not None: - pulumi.set(__self__, "placement", placement) + _setter("placement", placement) @property @pulumi.getter @@ -4472,12 +5966,33 @@ def __init__(__self__, *, :param 'OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationArgs' linux_configuration: A `linux_configuration` block as documented below. :param 'OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationArgs' windows_configuration: A `windows_configuration` block as documented below. """ + OrchestratedVirtualMachineScaleSetOsProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_data=custom_data, + linux_configuration=linux_configuration, + windows_configuration=windows_configuration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_data: Optional[str] = None, + linux_configuration: Optional['outputs.OrchestratedVirtualMachineScaleSetOsProfileLinuxConfiguration'] = None, + windows_configuration: Optional['outputs.OrchestratedVirtualMachineScaleSetOsProfileWindowsConfiguration'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + if linux_configuration is None and 'linuxConfiguration' in kwargs: + linux_configuration = kwargs['linuxConfiguration'] + if windows_configuration is None and 'windowsConfiguration' in kwargs: + windows_configuration = kwargs['windowsConfiguration'] + if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) if linux_configuration is not None: - pulumi.set(__self__, "linux_configuration", linux_configuration) + _setter("linux_configuration", linux_configuration) if windows_configuration is not None: - pulumi.set(__self__, "windows_configuration", windows_configuration) + _setter("windows_configuration", windows_configuration) @property @pulumi.getter(name="customData") @@ -4563,23 +6078,68 @@ def __init__(__self__, *, :param bool provision_vm_agent: Should the Azure VM Agent be provisioned on each Virtual Machine in the Scale Set? Defaults to `true`. Changing this value forces a new resource to be created. :param Sequence['OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationSecretArgs'] secrets: One or more `secret` blocks as defined below. """ - pulumi.set(__self__, "admin_username", admin_username) + OrchestratedVirtualMachineScaleSetOsProfileLinuxConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + admin_password=admin_password, + admin_ssh_keys=admin_ssh_keys, + computer_name_prefix=computer_name_prefix, + disable_password_authentication=disable_password_authentication, + patch_assessment_mode=patch_assessment_mode, + patch_mode=patch_mode, + provision_vm_agent=provision_vm_agent, + secrets=secrets, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[str] = None, + admin_password: Optional[str] = None, + admin_ssh_keys: Optional[Sequence['outputs.OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationAdminSshKey']] = None, + computer_name_prefix: Optional[str] = None, + disable_password_authentication: Optional[bool] = None, + patch_assessment_mode: Optional[str] = None, + patch_mode: Optional[str] = None, + provision_vm_agent: Optional[bool] = None, + secrets: Optional[Sequence['outputs.OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationSecret']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if admin_ssh_keys is None and 'adminSshKeys' in kwargs: + admin_ssh_keys = kwargs['adminSshKeys'] + if computer_name_prefix is None and 'computerNamePrefix' in kwargs: + computer_name_prefix = kwargs['computerNamePrefix'] + if disable_password_authentication is None and 'disablePasswordAuthentication' in kwargs: + disable_password_authentication = kwargs['disablePasswordAuthentication'] + if patch_assessment_mode is None and 'patchAssessmentMode' in kwargs: + patch_assessment_mode = kwargs['patchAssessmentMode'] + if patch_mode is None and 'patchMode' in kwargs: + patch_mode = kwargs['patchMode'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + + _setter("admin_username", admin_username) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if admin_ssh_keys is not None: - pulumi.set(__self__, "admin_ssh_keys", admin_ssh_keys) + _setter("admin_ssh_keys", admin_ssh_keys) if computer_name_prefix is not None: - pulumi.set(__self__, "computer_name_prefix", computer_name_prefix) + _setter("computer_name_prefix", computer_name_prefix) if disable_password_authentication is not None: - pulumi.set(__self__, "disable_password_authentication", disable_password_authentication) + _setter("disable_password_authentication", disable_password_authentication) if patch_assessment_mode is not None: - pulumi.set(__self__, "patch_assessment_mode", patch_assessment_mode) + _setter("patch_assessment_mode", patch_assessment_mode) if patch_mode is not None: - pulumi.set(__self__, "patch_mode", patch_mode) + _setter("patch_mode", patch_mode) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) @property @pulumi.getter(name="adminUsername") @@ -4683,8 +6243,27 @@ def __init__(__self__, *, > **NOTE:** The Azure VM Agent only allows creating SSH Keys at the path `/home/{username}/.ssh/authorized_keys` - as such this public key will be written to the authorized keys file. """ - pulumi.set(__self__, "public_key", public_key) - pulumi.set(__self__, "username", username) + OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationAdminSshKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_key=public_key, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_key: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_key is None and 'publicKey' in kwargs: + public_key = kwargs['publicKey'] + if public_key is None: + raise TypeError("Missing 'public_key' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("public_key", public_key) + _setter("username", username) @property @pulumi.getter(name="publicKey") @@ -4733,8 +6312,27 @@ def __init__(__self__, *, > **NOTE:** The schema of the `certificate` block is slightly different depending on if you are provisioning a `windows_configuration` or a `linux_configuration`. :param str key_vault_id: The ID of the Key Vault from which all Secrets should be sourced. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "key_vault_id", key_vault_id) + OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationSecret._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[Sequence['outputs.OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationSecretCertificate']] = None, + key_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("certificates", certificates) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -4764,7 +6362,20 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "url", url) + OrchestratedVirtualMachineScaleSetOsProfileLinuxConfigurationSecretCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("url", url) @property @pulumi.getter @@ -4840,26 +6451,79 @@ def __init__(__self__, *, :param str timezone: Specifies the time zone of the virtual machine, the possible values are defined [here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). :param Sequence['OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationWinrmListenerArgs'] winrm_listeners: One or more `winrm_listener` blocks as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "admin_password", admin_password) - pulumi.set(__self__, "admin_username", admin_username) + OrchestratedVirtualMachineScaleSetOsProfileWindowsConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_password=admin_password, + admin_username=admin_username, + computer_name_prefix=computer_name_prefix, + enable_automatic_updates=enable_automatic_updates, + hotpatching_enabled=hotpatching_enabled, + patch_assessment_mode=patch_assessment_mode, + patch_mode=patch_mode, + provision_vm_agent=provision_vm_agent, + secrets=secrets, + timezone=timezone, + winrm_listeners=winrm_listeners, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_password: Optional[str] = None, + admin_username: Optional[str] = None, + computer_name_prefix: Optional[str] = None, + enable_automatic_updates: Optional[bool] = None, + hotpatching_enabled: Optional[bool] = None, + patch_assessment_mode: Optional[str] = None, + patch_mode: Optional[str] = None, + provision_vm_agent: Optional[bool] = None, + secrets: Optional[Sequence['outputs.OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationSecret']] = None, + timezone: Optional[str] = None, + winrm_listeners: Optional[Sequence['outputs.OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationWinrmListener']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if admin_password is None: + raise TypeError("Missing 'admin_password' argument") + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if computer_name_prefix is None and 'computerNamePrefix' in kwargs: + computer_name_prefix = kwargs['computerNamePrefix'] + if enable_automatic_updates is None and 'enableAutomaticUpdates' in kwargs: + enable_automatic_updates = kwargs['enableAutomaticUpdates'] + if hotpatching_enabled is None and 'hotpatchingEnabled' in kwargs: + hotpatching_enabled = kwargs['hotpatchingEnabled'] + if patch_assessment_mode is None and 'patchAssessmentMode' in kwargs: + patch_assessment_mode = kwargs['patchAssessmentMode'] + if patch_mode is None and 'patchMode' in kwargs: + patch_mode = kwargs['patchMode'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if winrm_listeners is None and 'winrmListeners' in kwargs: + winrm_listeners = kwargs['winrmListeners'] + + _setter("admin_password", admin_password) + _setter("admin_username", admin_username) if computer_name_prefix is not None: - pulumi.set(__self__, "computer_name_prefix", computer_name_prefix) + _setter("computer_name_prefix", computer_name_prefix) if enable_automatic_updates is not None: - pulumi.set(__self__, "enable_automatic_updates", enable_automatic_updates) + _setter("enable_automatic_updates", enable_automatic_updates) if hotpatching_enabled is not None: - pulumi.set(__self__, "hotpatching_enabled", hotpatching_enabled) + _setter("hotpatching_enabled", hotpatching_enabled) if patch_assessment_mode is not None: - pulumi.set(__self__, "patch_assessment_mode", patch_assessment_mode) + _setter("patch_assessment_mode", patch_assessment_mode) if patch_mode is not None: - pulumi.set(__self__, "patch_mode", patch_mode) + _setter("patch_mode", patch_mode) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) if winrm_listeners is not None: - pulumi.set(__self__, "winrm_listeners", winrm_listeners) + _setter("winrm_listeners", winrm_listeners) @property @pulumi.getter(name="adminPassword") @@ -4979,8 +6643,27 @@ def __init__(__self__, *, > **NOTE:** The schema of the `certificate` block is slightly different depending on if you are provisioning a `windows_configuration` or a `linux_configuration`. :param str key_vault_id: The ID of the Key Vault from which all Secrets should be sourced. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "key_vault_id", key_vault_id) + OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationSecret._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[Sequence['outputs.OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationSecretCertificate']] = None, + key_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("certificates", certificates) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -5012,8 +6695,25 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "store", store) - pulumi.set(__self__, "url", url) + OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationSecretCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + store=store, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + store: Optional[str] = None, + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if store is None: + raise TypeError("Missing 'store' argument") + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("store", store) + _setter("url", url) @property @pulumi.getter @@ -5062,9 +6762,26 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "protocol", protocol) + OrchestratedVirtualMachineScaleSetOsProfileWindowsConfigurationWinrmListener._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + certificate_url=certificate_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[str] = None, + certificate_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + + _setter("protocol", protocol) if certificate_url is not None: - pulumi.set(__self__, "certificate_url", certificate_url) + _setter("certificate_url", certificate_url) @property @pulumi.getter @@ -5096,9 +6813,30 @@ def __init__(__self__, *, :param str product: Specifies the product of the image from the marketplace. Changing this forces a new resource to be created. :param str publisher: Specifies the publisher of the image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + OrchestratedVirtualMachineScaleSetPlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + product: Optional[str] = None, + publisher: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -5153,10 +6891,27 @@ def __init__(__self__, *, :param int base_regular_count: Specifies the base number of VMs of `Regular` priority that will be created before any VMs of priority `Spot` are created. Possible values are integers between `0` and `1000`. Defaults to `0`. :param int regular_percentage_above_base: Specifies the desired percentage of VM instances that are of `Regular` priority after the base count has been reached. Possible values are integers between `0` and `100`. Defaults to `0`. """ + OrchestratedVirtualMachineScaleSetPriorityMix._configure( + lambda key, value: pulumi.set(__self__, key, value), + base_regular_count=base_regular_count, + regular_percentage_above_base=regular_percentage_above_base, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + base_regular_count: Optional[int] = None, + regular_percentage_above_base: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if base_regular_count is None and 'baseRegularCount' in kwargs: + base_regular_count = kwargs['baseRegularCount'] + if regular_percentage_above_base is None and 'regularPercentageAboveBase' in kwargs: + regular_percentage_above_base = kwargs['regularPercentageAboveBase'] + if base_regular_count is not None: - pulumi.set(__self__, "base_regular_count", base_regular_count) + _setter("base_regular_count", base_regular_count) if regular_percentage_above_base is not None: - pulumi.set(__self__, "regular_percentage_above_base", regular_percentage_above_base) + _setter("regular_percentage_above_base", regular_percentage_above_base) @property @pulumi.getter(name="baseRegularCount") @@ -5188,10 +6943,35 @@ def __init__(__self__, *, :param str sku: Specifies the SKU of the image used to create the virtual machines. :param str version: Specifies the version of the image used to create the virtual machines. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + OrchestratedVirtualMachineScaleSetSourceImageReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -5235,9 +7015,24 @@ def __init__(__self__, *, :param bool enabled: Should the termination notification be enabled on this Virtual Machine Scale Set? Possible values `true` or `false` :param str timeout: Length of time (in minutes, between `5` and `15`) a notification to be sent to the VM on the instance metadata server till the VM gets deleted. The time duration should be specified in `ISO 8601` format. Defaults to `PT5M`. """ - pulumi.set(__self__, "enabled", enabled) + OrchestratedVirtualMachineScaleSetTerminationNotification._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + timeout: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -5294,15 +7089,44 @@ def __init__(__self__, *, :param str remote_ip_address: The remote IP Address to be filtered on. Specify `127.0.0.1` for a single address entry, `127.0.0.1-127.0.0.255` for a range and `127.0.0.1;127.0.0.5` for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created. :param str remote_port: The remote port to be filtered on. Specify `80` for single port entry, `80-85` for a range and `80;443;` for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "protocol", protocol) + PacketCaptureFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + local_ip_address=local_ip_address, + local_port=local_port, + remote_ip_address=remote_ip_address, + remote_port=remote_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[str] = None, + local_ip_address: Optional[str] = None, + local_port: Optional[str] = None, + remote_ip_address: Optional[str] = None, + remote_port: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if local_ip_address is None and 'localIpAddress' in kwargs: + local_ip_address = kwargs['localIpAddress'] + if local_port is None and 'localPort' in kwargs: + local_port = kwargs['localPort'] + if remote_ip_address is None and 'remoteIpAddress' in kwargs: + remote_ip_address = kwargs['remoteIpAddress'] + if remote_port is None and 'remotePort' in kwargs: + remote_port = kwargs['remotePort'] + + _setter("protocol", protocol) if local_ip_address is not None: - pulumi.set(__self__, "local_ip_address", local_ip_address) + _setter("local_ip_address", local_ip_address) if local_port is not None: - pulumi.set(__self__, "local_port", local_port) + _setter("local_port", local_port) if remote_ip_address is not None: - pulumi.set(__self__, "remote_ip_address", remote_ip_address) + _setter("remote_ip_address", remote_ip_address) if remote_port is not None: - pulumi.set(__self__, "remote_port", remote_port) + _setter("remote_port", remote_port) @property @pulumi.getter @@ -5379,12 +7203,33 @@ def __init__(__self__, *, > **NOTE:** At least one of `file_path` or `storage_account_id` must be specified. :param str storage_path: The URI of the storage path where the packet capture sessions are saved to. """ + PacketCaptureStorageLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_path=file_path, + storage_account_id=storage_account_id, + storage_path=storage_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_path: Optional[str] = None, + storage_account_id: Optional[str] = None, + storage_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_path is None and 'filePath' in kwargs: + file_path = kwargs['filePath'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_path is None and 'storagePath' in kwargs: + storage_path = kwargs['storagePath'] + if file_path is not None: - pulumi.set(__self__, "file_path", file_path) + _setter("file_path", file_path) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if storage_path is not None: - pulumi.set(__self__, "storage_path", storage_path) + _setter("storage_path", storage_path) @property @pulumi.getter(name="filePath") @@ -5439,9 +7284,26 @@ def __init__(__self__, *, :param str storage_uri: Blob endpoint for the storage account to hold the virtual machine's diagnostic files. This must be the root of a storage account, and not a storage container. :param bool enabled: Whether to enable boot diagnostics for the virtual machine. Defaults to `true`. """ - pulumi.set(__self__, "storage_uri", storage_uri) + ScaleSetBootDiagnostics._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_uri=storage_uri, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_uri: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_uri is None and 'storageUri' in kwargs: + storage_uri = kwargs['storageUri'] + if storage_uri is None: + raise TypeError("Missing 'storage_uri' argument") + + _setter("storage_uri", storage_uri) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="storageUri") @@ -5504,18 +7366,59 @@ def __init__(__self__, *, :param Sequence[str] provision_after_extensions: Specifies a dependency array of extensions required to be executed before, the array stores the name of each extension. :param str settings: The settings passed to the extension, these are specified as a JSON object in a string. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_handler_version", type_handler_version) + ScaleSetExtension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + publisher=publisher, + type=type, + type_handler_version=type_handler_version, + auto_upgrade_minor_version=auto_upgrade_minor_version, + protected_settings=protected_settings, + provision_after_extensions=provision_after_extensions, + settings=settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + publisher: Optional[str] = None, + type: Optional[str] = None, + type_handler_version: Optional[str] = None, + auto_upgrade_minor_version: Optional[bool] = None, + protected_settings: Optional[str] = None, + provision_after_extensions: Optional[Sequence[str]] = None, + settings: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if type_handler_version is None: + raise TypeError("Missing 'type_handler_version' argument") + if auto_upgrade_minor_version is None and 'autoUpgradeMinorVersion' in kwargs: + auto_upgrade_minor_version = kwargs['autoUpgradeMinorVersion'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if provision_after_extensions is None and 'provisionAfterExtensions' in kwargs: + provision_after_extensions = kwargs['provisionAfterExtensions'] + + _setter("name", name) + _setter("publisher", publisher) + _setter("type", type) + _setter("type_handler_version", type_handler_version) if auto_upgrade_minor_version is not None: - pulumi.set(__self__, "auto_upgrade_minor_version", auto_upgrade_minor_version) + _setter("auto_upgrade_minor_version", auto_upgrade_minor_version) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if provision_after_extensions is not None: - pulumi.set(__self__, "provision_after_extensions", provision_after_extensions) + _setter("provision_after_extensions", provision_after_extensions) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) @property @pulumi.getter @@ -5637,11 +7540,32 @@ def __init__(__self__, *, pulumi.export("principalId", example.identity.principal_id) ``` """ - pulumi.set(__self__, "type", type) + ScaleSetIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) @property @pulumi.getter @@ -5735,17 +7659,56 @@ def __init__(__self__, *, :param bool ip_forwarding: Whether IP forwarding is enabled on this NIC. Defaults to `false`. :param str network_security_group_id: Specifies the identifier for the network security group. """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "primary", primary) + ScaleSetNetworkProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + name=name, + primary=primary, + accelerated_networking=accelerated_networking, + dns_settings=dns_settings, + ip_forwarding=ip_forwarding, + network_security_group_id=network_security_group_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[Sequence['outputs.ScaleSetNetworkProfileIpConfiguration']] = None, + name: Optional[str] = None, + primary: Optional[bool] = None, + accelerated_networking: Optional[bool] = None, + dns_settings: Optional['outputs.ScaleSetNetworkProfileDnsSettings'] = None, + ip_forwarding: Optional[bool] = None, + network_security_group_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + if accelerated_networking is None and 'acceleratedNetworking' in kwargs: + accelerated_networking = kwargs['acceleratedNetworking'] + if dns_settings is None and 'dnsSettings' in kwargs: + dns_settings = kwargs['dnsSettings'] + if ip_forwarding is None and 'ipForwarding' in kwargs: + ip_forwarding = kwargs['ipForwarding'] + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + + _setter("ip_configurations", ip_configurations) + _setter("name", name) + _setter("primary", primary) if accelerated_networking is not None: - pulumi.set(__self__, "accelerated_networking", accelerated_networking) + _setter("accelerated_networking", accelerated_networking) if dns_settings is not None: - pulumi.set(__self__, "dns_settings", dns_settings) + _setter("dns_settings", dns_settings) if ip_forwarding is not None: - pulumi.set(__self__, "ip_forwarding", ip_forwarding) + _setter("ip_forwarding", ip_forwarding) if network_security_group_id is not None: - pulumi.set(__self__, "network_security_group_id", network_security_group_id) + _setter("network_security_group_id", network_security_group_id) @property @pulumi.getter(name="ipConfigurations") @@ -5828,7 +7791,22 @@ def __init__(__self__, *, """ :param Sequence[str] dns_servers: Specifies an array of DNS servers. """ - pulumi.set(__self__, "dns_servers", dns_servers) + ScaleSetNetworkProfileDnsSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_servers=dns_servers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_servers: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if dns_servers is None: + raise TypeError("Missing 'dns_servers' argument") + + _setter("dns_servers", dns_servers) @property @pulumi.getter(name="dnsServers") @@ -5891,19 +7869,62 @@ def __init__(__self__, *, > **NOTE:** When using this field you'll also need to configure a Rule for the Load Balancer, and use a `depends_on` between this resource and the Load Balancer Rule. :param 'ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfigurationArgs' public_ip_address_configuration: Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration. The public_ip_address_configuration is documented below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "primary", primary) - pulumi.set(__self__, "subnet_id", subnet_id) + ScaleSetNetworkProfileIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + primary=primary, + subnet_id=subnet_id, + application_gateway_backend_address_pool_ids=application_gateway_backend_address_pool_ids, + application_security_group_ids=application_security_group_ids, + load_balancer_backend_address_pool_ids=load_balancer_backend_address_pool_ids, + load_balancer_inbound_nat_rules_ids=load_balancer_inbound_nat_rules_ids, + public_ip_address_configuration=public_ip_address_configuration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + primary: Optional[bool] = None, + subnet_id: Optional[str] = None, + application_gateway_backend_address_pool_ids: Optional[Sequence[str]] = None, + application_security_group_ids: Optional[Sequence[str]] = None, + load_balancer_backend_address_pool_ids: Optional[Sequence[str]] = None, + load_balancer_inbound_nat_rules_ids: Optional[Sequence[str]] = None, + public_ip_address_configuration: Optional['outputs.ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfiguration'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if application_gateway_backend_address_pool_ids is None and 'applicationGatewayBackendAddressPoolIds' in kwargs: + application_gateway_backend_address_pool_ids = kwargs['applicationGatewayBackendAddressPoolIds'] + if application_security_group_ids is None and 'applicationSecurityGroupIds' in kwargs: + application_security_group_ids = kwargs['applicationSecurityGroupIds'] + if load_balancer_backend_address_pool_ids is None and 'loadBalancerBackendAddressPoolIds' in kwargs: + load_balancer_backend_address_pool_ids = kwargs['loadBalancerBackendAddressPoolIds'] + if load_balancer_inbound_nat_rules_ids is None and 'loadBalancerInboundNatRulesIds' in kwargs: + load_balancer_inbound_nat_rules_ids = kwargs['loadBalancerInboundNatRulesIds'] + if public_ip_address_configuration is None and 'publicIpAddressConfiguration' in kwargs: + public_ip_address_configuration = kwargs['publicIpAddressConfiguration'] + + _setter("name", name) + _setter("primary", primary) + _setter("subnet_id", subnet_id) if application_gateway_backend_address_pool_ids is not None: - pulumi.set(__self__, "application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) + _setter("application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) if application_security_group_ids is not None: - pulumi.set(__self__, "application_security_group_ids", application_security_group_ids) + _setter("application_security_group_ids", application_security_group_ids) if load_balancer_backend_address_pool_ids is not None: - pulumi.set(__self__, "load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) + _setter("load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) if load_balancer_inbound_nat_rules_ids is not None: - pulumi.set(__self__, "load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) + _setter("load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) if public_ip_address_configuration is not None: - pulumi.set(__self__, "public_ip_address_configuration", public_ip_address_configuration) + _setter("public_ip_address_configuration", public_ip_address_configuration) @property @pulumi.getter @@ -6004,9 +8025,34 @@ def __init__(__self__, *, :param int idle_timeout: The idle timeout in minutes. This value must be between 4 and 30. :param str name: The name of the public IP address configuration """ - pulumi.set(__self__, "domain_name_label", domain_name_label) - pulumi.set(__self__, "idle_timeout", idle_timeout) - pulumi.set(__self__, "name", name) + ScaleSetNetworkProfileIpConfigurationPublicIpAddressConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name_label=domain_name_label, + idle_timeout=idle_timeout, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name_label: Optional[str] = None, + idle_timeout: Optional[int] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name_label is None and 'domainNameLabel' in kwargs: + domain_name_label = kwargs['domainNameLabel'] + if domain_name_label is None: + raise TypeError("Missing 'domain_name_label' argument") + if idle_timeout is None and 'idleTimeout' in kwargs: + idle_timeout = kwargs['idleTimeout'] + if idle_timeout is None: + raise TypeError("Missing 'idle_timeout' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("domain_name_label", domain_name_label) + _setter("idle_timeout", idle_timeout) + _setter("name", name) @property @pulumi.getter(name="domainNameLabel") @@ -6069,12 +8115,41 @@ def __init__(__self__, *, :param str admin_password: Specifies the administrator password to use for all the instances of virtual machines in a scale set. :param str custom_data: Specifies custom data to supply to the machine. On Linux-based systems, this can be used as a cloud-init script. On other systems, this will be copied as a file on disk. Internally, this provider will base64 encode this value before sending it to the API. The maximum length of the binary array is 65535 bytes. """ - pulumi.set(__self__, "admin_username", admin_username) - pulumi.set(__self__, "computer_name_prefix", computer_name_prefix) + ScaleSetOsProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + computer_name_prefix=computer_name_prefix, + admin_password=admin_password, + custom_data=custom_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[str] = None, + computer_name_prefix: Optional[str] = None, + admin_password: Optional[str] = None, + custom_data: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if computer_name_prefix is None and 'computerNamePrefix' in kwargs: + computer_name_prefix = kwargs['computerNamePrefix'] + if computer_name_prefix is None: + raise TypeError("Missing 'computer_name_prefix' argument") + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + + _setter("admin_username", admin_username) + _setter("computer_name_prefix", computer_name_prefix) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) @property @pulumi.getter(name="adminUsername") @@ -6141,10 +8216,27 @@ def __init__(__self__, *, > **NOTE:** At least one `ssh_keys` block is required if `disable_password_authentication` is set to `true`. """ + ScaleSetOsProfileLinuxConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + disable_password_authentication=disable_password_authentication, + ssh_keys=ssh_keys, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disable_password_authentication: Optional[bool] = None, + ssh_keys: Optional[Sequence['outputs.ScaleSetOsProfileLinuxConfigSshKey']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disable_password_authentication is None and 'disablePasswordAuthentication' in kwargs: + disable_password_authentication = kwargs['disablePasswordAuthentication'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if disable_password_authentication is not None: - pulumi.set(__self__, "disable_password_authentication", disable_password_authentication) + _setter("disable_password_authentication", disable_password_authentication) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) @property @pulumi.getter(name="disablePasswordAuthentication") @@ -6199,9 +8291,26 @@ def __init__(__self__, *, > **NOTE:** Rather than defining this in-line you can source this from a local file using the `file` function - for example `key_data = file("~/.ssh/id_rsa.pub")`. """ - pulumi.set(__self__, "path", path) + ScaleSetOsProfileLinuxConfigSshKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + path=path, + key_data=key_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + path: Optional[str] = None, + key_data: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if path is None: + raise TypeError("Missing 'path' argument") + if key_data is None and 'keyData' in kwargs: + key_data = kwargs['keyData'] + + _setter("path", path) if key_data is not None: - pulumi.set(__self__, "key_data", key_data) + _setter("key_data", key_data) @property @pulumi.getter @@ -6254,9 +8363,28 @@ def __init__(__self__, *, :param str source_vault_id: Specifies the key vault to use. :param Sequence['ScaleSetOsProfileSecretVaultCertificateArgs'] vault_certificates: (Required, on Windows machines) One or more `vault_certificates` blocks as defined below. """ - pulumi.set(__self__, "source_vault_id", source_vault_id) + ScaleSetOsProfileSecret._configure( + lambda key, value: pulumi.set(__self__, key, value), + source_vault_id=source_vault_id, + vault_certificates=vault_certificates, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + source_vault_id: Optional[str] = None, + vault_certificates: Optional[Sequence['outputs.ScaleSetOsProfileSecretVaultCertificate']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + if vault_certificates is None and 'vaultCertificates' in kwargs: + vault_certificates = kwargs['vaultCertificates'] + + _setter("source_vault_id", source_vault_id) if vault_certificates is not None: - pulumi.set(__self__, "vault_certificates", vault_certificates) + _setter("vault_certificates", vault_certificates) @property @pulumi.getter(name="sourceVaultId") @@ -6303,9 +8431,28 @@ def __init__(__self__, *, :param str certificate_url: It is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be `data`, `dataType` and `password`. :param str certificate_store: (Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to. """ - pulumi.set(__self__, "certificate_url", certificate_url) + ScaleSetOsProfileSecretVaultCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_url=certificate_url, + certificate_store=certificate_store, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_url: Optional[str] = None, + certificate_store: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + if certificate_url is None: + raise TypeError("Missing 'certificate_url' argument") + if certificate_store is None and 'certificateStore' in kwargs: + certificate_store = kwargs['certificateStore'] + + _setter("certificate_url", certificate_url) if certificate_store is not None: - pulumi.set(__self__, "certificate_store", certificate_store) + _setter("certificate_store", certificate_store) @property @pulumi.getter(name="certificateUrl") @@ -6358,14 +8505,37 @@ def __init__(__self__, *, :param bool provision_vm_agent: Indicates whether virtual machine agent should be provisioned on the virtual machines in the scale set. :param Sequence['ScaleSetOsProfileWindowsConfigWinrmArgs'] winrms: A collection of WinRM configuration blocks as documented below. """ + ScaleSetOsProfileWindowsConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_unattend_configs=additional_unattend_configs, + enable_automatic_upgrades=enable_automatic_upgrades, + provision_vm_agent=provision_vm_agent, + winrms=winrms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_unattend_configs: Optional[Sequence['outputs.ScaleSetOsProfileWindowsConfigAdditionalUnattendConfig']] = None, + enable_automatic_upgrades: Optional[bool] = None, + provision_vm_agent: Optional[bool] = None, + winrms: Optional[Sequence['outputs.ScaleSetOsProfileWindowsConfigWinrm']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_unattend_configs is None and 'additionalUnattendConfigs' in kwargs: + additional_unattend_configs = kwargs['additionalUnattendConfigs'] + if enable_automatic_upgrades is None and 'enableAutomaticUpgrades' in kwargs: + enable_automatic_upgrades = kwargs['enableAutomaticUpgrades'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if additional_unattend_configs is not None: - pulumi.set(__self__, "additional_unattend_configs", additional_unattend_configs) + _setter("additional_unattend_configs", additional_unattend_configs) if enable_automatic_upgrades is not None: - pulumi.set(__self__, "enable_automatic_upgrades", enable_automatic_upgrades) + _setter("enable_automatic_upgrades", enable_automatic_upgrades) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if winrms is not None: - pulumi.set(__self__, "winrms", winrms) + _setter("winrms", winrms) @property @pulumi.getter(name="additionalUnattendConfigs") @@ -6432,10 +8602,39 @@ def __init__(__self__, *, :param str pass_: Specifies the name of the pass that the content applies to. The only allowable value is `oobeSystem`. :param str setting_name: Specifies the name of the setting to which the content applies. Possible values are: `FirstLogonCommands` and `AutoLogon`. """ - pulumi.set(__self__, "component", component) - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "pass_", pass_) - pulumi.set(__self__, "setting_name", setting_name) + ScaleSetOsProfileWindowsConfigAdditionalUnattendConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + component=component, + content=content, + pass_=pass_, + setting_name=setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + component: Optional[str] = None, + content: Optional[str] = None, + pass_: Optional[str] = None, + setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if component is None: + raise TypeError("Missing 'component' argument") + if content is None: + raise TypeError("Missing 'content' argument") + if pass_ is None and 'pass' in kwargs: + pass_ = kwargs['pass'] + if pass_ is None: + raise TypeError("Missing 'pass_' argument") + if setting_name is None and 'settingName' in kwargs: + setting_name = kwargs['settingName'] + if setting_name is None: + raise TypeError("Missing 'setting_name' argument") + + _setter("component", component) + _setter("content", content) + _setter("pass_", pass_) + _setter("setting_name", setting_name) @property @pulumi.getter @@ -6496,9 +8695,26 @@ def __init__(__self__, *, :param str protocol: Specifies the protocol of listener :param str certificate_url: Specifies URL of the certificate with which new Virtual Machines is provisioned. """ - pulumi.set(__self__, "protocol", protocol) + ScaleSetOsProfileWindowsConfigWinrm._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + certificate_url=certificate_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[str] = None, + certificate_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + + _setter("protocol", protocol) if certificate_url is not None: - pulumi.set(__self__, "certificate_url", certificate_url) + _setter("certificate_url", certificate_url) @property @pulumi.getter @@ -6555,15 +8771,44 @@ def __init__(__self__, *, :param str remote_ip_address: The remote IP Address to be filtered on. Specify `127.0.0.1` for a single address entry, `127.0.0.1-127.0.0.255` for a range and `127.0.0.1;127.0.0.5` for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created. :param str remote_port: The remote port to be filtered on. Specify `80` for single port entry, `80-85` for a range and `80;443;` for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "protocol", protocol) + ScaleSetPacketCaptureFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + local_ip_address=local_ip_address, + local_port=local_port, + remote_ip_address=remote_ip_address, + remote_port=remote_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[str] = None, + local_ip_address: Optional[str] = None, + local_port: Optional[str] = None, + remote_ip_address: Optional[str] = None, + remote_port: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if local_ip_address is None and 'localIpAddress' in kwargs: + local_ip_address = kwargs['localIpAddress'] + if local_port is None and 'localPort' in kwargs: + local_port = kwargs['localPort'] + if remote_ip_address is None and 'remoteIpAddress' in kwargs: + remote_ip_address = kwargs['remoteIpAddress'] + if remote_port is None and 'remotePort' in kwargs: + remote_port = kwargs['remotePort'] + + _setter("protocol", protocol) if local_ip_address is not None: - pulumi.set(__self__, "local_ip_address", local_ip_address) + _setter("local_ip_address", local_ip_address) if local_port is not None: - pulumi.set(__self__, "local_port", local_port) + _setter("local_port", local_port) if remote_ip_address is not None: - pulumi.set(__self__, "remote_ip_address", remote_ip_address) + _setter("remote_ip_address", remote_ip_address) if remote_port is not None: - pulumi.set(__self__, "remote_port", remote_port) + _setter("remote_port", remote_port) @property @pulumi.getter @@ -6634,10 +8879,27 @@ def __init__(__self__, *, :param Sequence[str] exclude_instance_ids: A list of Virtual Machine Scale Set instance IDs which should be excluded from running Packet Capture, e.g. `["0", "2"]`. Changing this forces a new resource to be created. :param Sequence[str] include_instance_ids: A list of Virtual Machine Scale Set instance IDs which should be included for Packet Capture, e.g. `["1", "3"]`. Changing this forces a new resource to be created. """ + ScaleSetPacketCaptureMachineScope._configure( + lambda key, value: pulumi.set(__self__, key, value), + exclude_instance_ids=exclude_instance_ids, + include_instance_ids=include_instance_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exclude_instance_ids: Optional[Sequence[str]] = None, + include_instance_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exclude_instance_ids is None and 'excludeInstanceIds' in kwargs: + exclude_instance_ids = kwargs['excludeInstanceIds'] + if include_instance_ids is None and 'includeInstanceIds' in kwargs: + include_instance_ids = kwargs['includeInstanceIds'] + if exclude_instance_ids is not None: - pulumi.set(__self__, "exclude_instance_ids", exclude_instance_ids) + _setter("exclude_instance_ids", exclude_instance_ids) if include_instance_ids is not None: - pulumi.set(__self__, "include_instance_ids", include_instance_ids) + _setter("include_instance_ids", include_instance_ids) @property @pulumi.getter(name="excludeInstanceIds") @@ -6690,12 +8952,33 @@ def __init__(__self__, *, > **NOTE:** At least one of `file_path` or `storage_account_id` must be specified. :param str storage_path: The URI of the storage path where the packet capture sessions are saved to. """ + ScaleSetPacketCaptureStorageLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_path=file_path, + storage_account_id=storage_account_id, + storage_path=storage_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_path: Optional[str] = None, + storage_account_id: Optional[str] = None, + storage_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_path is None and 'filePath' in kwargs: + file_path = kwargs['filePath'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_path is None and 'storagePath' in kwargs: + storage_path = kwargs['storagePath'] + if file_path is not None: - pulumi.set(__self__, "file_path", file_path) + _setter("file_path", file_path) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if storage_path is not None: - pulumi.set(__self__, "storage_path", storage_path) + _setter("storage_path", storage_path) @property @pulumi.getter(name="filePath") @@ -6735,9 +9018,30 @@ def __init__(__self__, *, :param str product: Specifies the product of the image from the marketplace. :param str publisher: Specifies the publisher of the image. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + ScaleSetPlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + product: Optional[str] = None, + publisher: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -6800,14 +9104,39 @@ def __init__(__self__, *, :param int max_unhealthy_upgraded_instance_percent: The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. Defaults to `20`. :param str pause_time_between_batches: The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format for duration (). Defaults to `0` seconds represented as `PT0S`. """ + ScaleSetRollingUpgradePolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_batch_instance_percent=max_batch_instance_percent, + max_unhealthy_instance_percent=max_unhealthy_instance_percent, + max_unhealthy_upgraded_instance_percent=max_unhealthy_upgraded_instance_percent, + pause_time_between_batches=pause_time_between_batches, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_batch_instance_percent: Optional[int] = None, + max_unhealthy_instance_percent: Optional[int] = None, + max_unhealthy_upgraded_instance_percent: Optional[int] = None, + pause_time_between_batches: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_batch_instance_percent is None and 'maxBatchInstancePercent' in kwargs: + max_batch_instance_percent = kwargs['maxBatchInstancePercent'] + if max_unhealthy_instance_percent is None and 'maxUnhealthyInstancePercent' in kwargs: + max_unhealthy_instance_percent = kwargs['maxUnhealthyInstancePercent'] + if max_unhealthy_upgraded_instance_percent is None and 'maxUnhealthyUpgradedInstancePercent' in kwargs: + max_unhealthy_upgraded_instance_percent = kwargs['maxUnhealthyUpgradedInstancePercent'] + if pause_time_between_batches is None and 'pauseTimeBetweenBatches' in kwargs: + pause_time_between_batches = kwargs['pauseTimeBetweenBatches'] + if max_batch_instance_percent is not None: - pulumi.set(__self__, "max_batch_instance_percent", max_batch_instance_percent) + _setter("max_batch_instance_percent", max_batch_instance_percent) if max_unhealthy_instance_percent is not None: - pulumi.set(__self__, "max_unhealthy_instance_percent", max_unhealthy_instance_percent) + _setter("max_unhealthy_instance_percent", max_unhealthy_instance_percent) if max_unhealthy_upgraded_instance_percent is not None: - pulumi.set(__self__, "max_unhealthy_upgraded_instance_percent", max_unhealthy_upgraded_instance_percent) + _setter("max_unhealthy_upgraded_instance_percent", max_unhealthy_upgraded_instance_percent) if pause_time_between_batches is not None: - pulumi.set(__self__, "pause_time_between_batches", pause_time_between_batches) + _setter("pause_time_between_batches", pause_time_between_batches) @property @pulumi.getter(name="maxBatchInstancePercent") @@ -6853,10 +9182,29 @@ def __init__(__self__, *, :param str name: Specifies the size of virtual machines in a scale set. :param str tier: Specifies the tier of virtual machines in a scale set. Possible values, `standard` or `basic`. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + ScaleSetSku._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + tier=tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + name: Optional[str] = None, + tier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("capacity", capacity) + _setter("name", name) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) @property @pulumi.getter @@ -6919,14 +9267,43 @@ def __init__(__self__, *, :param int disk_size_gb: Specifies the size of the disk in GB. This element is required when creating an empty disk. :param str managed_disk_type: Specifies the type of managed disk to create. Value must be either `Standard_LRS`, `StandardSSD_LRS` or `Premium_LRS`. """ - pulumi.set(__self__, "create_option", create_option) - pulumi.set(__self__, "lun", lun) + ScaleSetStorageProfileDataDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_option=create_option, + lun=lun, + caching=caching, + disk_size_gb=disk_size_gb, + managed_disk_type=managed_disk_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_option: Optional[str] = None, + lun: Optional[int] = None, + caching: Optional[str] = None, + disk_size_gb: Optional[int] = None, + managed_disk_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if create_option is None: + raise TypeError("Missing 'create_option' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if managed_disk_type is None and 'managedDiskType' in kwargs: + managed_disk_type = kwargs['managedDiskType'] + + _setter("create_option", create_option) + _setter("lun", lun) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if managed_disk_type is not None: - pulumi.set(__self__, "managed_disk_type", managed_disk_type) + _setter("managed_disk_type", managed_disk_type) @property @pulumi.getter(name="createOption") @@ -6984,16 +9361,35 @@ def __init__(__self__, *, :param str sku: Specifies the SKU of the image used to create the virtual machines. :param str version: Specifies the version of the image used to create the virtual machines. """ + ScaleSetStorageProfileImageReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if offer is not None: - pulumi.set(__self__, "offer", offer) + _setter("offer", offer) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -7080,19 +9476,52 @@ def __init__(__self__, *, :param str os_type: Specifies the operating system Type, valid values are windows, Linux. :param Sequence[str] vhd_containers: Specifies the VHD URI. Cannot be used when `image` or `managed_disk_type` is specified. """ - pulumi.set(__self__, "create_option", create_option) + ScaleSetStorageProfileOsDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_option=create_option, + caching=caching, + image=image, + managed_disk_type=managed_disk_type, + name=name, + os_type=os_type, + vhd_containers=vhd_containers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_option: Optional[str] = None, + caching: Optional[str] = None, + image: Optional[str] = None, + managed_disk_type: Optional[str] = None, + name: Optional[str] = None, + os_type: Optional[str] = None, + vhd_containers: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if create_option is None: + raise TypeError("Missing 'create_option' argument") + if managed_disk_type is None and 'managedDiskType' in kwargs: + managed_disk_type = kwargs['managedDiskType'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if vhd_containers is None and 'vhdContainers' in kwargs: + vhd_containers = kwargs['vhdContainers'] + + _setter("create_option", create_option) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if image is not None: - pulumi.set(__self__, "image", image) + _setter("image", image) if managed_disk_type is not None: - pulumi.set(__self__, "managed_disk_type", managed_disk_type) + _setter("managed_disk_type", managed_disk_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if vhd_containers is not None: - pulumi.set(__self__, "vhd_containers", vhd_containers) + _setter("vhd_containers", vhd_containers) @property @pulumi.getter(name="createOption") @@ -7183,9 +9612,26 @@ def __init__(__self__, *, > **NOTE:** `community_gallery` must be set when `permission` is set to `Community`. """ - pulumi.set(__self__, "permission", permission) + SharedImageGallerySharing._configure( + lambda key, value: pulumi.set(__self__, key, value), + permission=permission, + community_gallery=community_gallery, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + permission: Optional[str] = None, + community_gallery: Optional['outputs.SharedImageGallerySharingCommunityGallery'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if permission is None: + raise TypeError("Missing 'permission' argument") + if community_gallery is None and 'communityGallery' in kwargs: + community_gallery = kwargs['communityGallery'] + + _setter("permission", permission) if community_gallery is not None: - pulumi.set(__self__, "community_gallery", community_gallery) + _setter("community_gallery", community_gallery) @property @pulumi.getter @@ -7242,12 +9688,43 @@ def __init__(__self__, *, :param str publisher_uri: URI of the publisher for the Shared Image Gallery. Changing this forces a new resource to be created. :param str name: Specifies the name of the Shared Image Gallery. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "eula", eula) - pulumi.set(__self__, "prefix", prefix) - pulumi.set(__self__, "publisher_email", publisher_email) - pulumi.set(__self__, "publisher_uri", publisher_uri) + SharedImageGallerySharingCommunityGallery._configure( + lambda key, value: pulumi.set(__self__, key, value), + eula=eula, + prefix=prefix, + publisher_email=publisher_email, + publisher_uri=publisher_uri, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eula: Optional[str] = None, + prefix: Optional[str] = None, + publisher_email: Optional[str] = None, + publisher_uri: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eula is None: + raise TypeError("Missing 'eula' argument") + if prefix is None: + raise TypeError("Missing 'prefix' argument") + if publisher_email is None and 'publisherEmail' in kwargs: + publisher_email = kwargs['publisherEmail'] + if publisher_email is None: + raise TypeError("Missing 'publisher_email' argument") + if publisher_uri is None and 'publisherUri' in kwargs: + publisher_uri = kwargs['publisherUri'] + if publisher_uri is None: + raise TypeError("Missing 'publisher_uri' argument") + + _setter("eula", eula) + _setter("prefix", prefix) + _setter("publisher_email", publisher_email) + _setter("publisher_uri", publisher_uri) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -7301,9 +9778,30 @@ def __init__(__self__, *, :param str publisher: The Publisher Name for this Gallery Image. Changing this forces a new resource to be created. :param str sku: The Name of the SKU for this Gallery Image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) + SharedImageIdentifier._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) @property @pulumi.getter @@ -7341,11 +9839,28 @@ def __init__(__self__, *, :param str product: The Purchase Plan Product for this Gallery Image. Changing this forces a new resource to be created. :param str publisher: The Purchase Plan Publisher for this Gallery Image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + SharedImagePurchasePlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + product: Optional[str] = None, + publisher: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if product is not None: - pulumi.set(__self__, "product", product) + _setter("product", product) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) @property @pulumi.getter @@ -7410,14 +9925,45 @@ def __init__(__self__, *, :param bool exclude_from_latest_enabled: Specifies whether this Shared Image Version should be excluded when querying for the `latest` version. Defaults to `false`. :param str storage_account_type: The storage account type for the image version. Possible values are `Standard_LRS`, `Premium_LRS` and `Standard_ZRS`. Defaults to `Standard_LRS`. You can store all of your image version replicas in Zone Redundant Storage by specifying `Standard_ZRS`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "regional_replica_count", regional_replica_count) + SharedImageVersionTargetRegion._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + regional_replica_count=regional_replica_count, + disk_encryption_set_id=disk_encryption_set_id, + exclude_from_latest_enabled=exclude_from_latest_enabled, + storage_account_type=storage_account_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + regional_replica_count: Optional[int] = None, + disk_encryption_set_id: Optional[str] = None, + exclude_from_latest_enabled: Optional[bool] = None, + storage_account_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if regional_replica_count is None and 'regionalReplicaCount' in kwargs: + regional_replica_count = kwargs['regionalReplicaCount'] + if regional_replica_count is None: + raise TypeError("Missing 'regional_replica_count' argument") + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if exclude_from_latest_enabled is None and 'excludeFromLatestEnabled' in kwargs: + exclude_from_latest_enabled = kwargs['excludeFromLatestEnabled'] + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + + _setter("name", name) + _setter("regional_replica_count", regional_replica_count) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if exclude_from_latest_enabled is not None: - pulumi.set(__self__, "exclude_from_latest_enabled", exclude_from_latest_enabled) + _setter("exclude_from_latest_enabled", exclude_from_latest_enabled) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) @property @pulumi.getter @@ -7489,12 +10035,31 @@ def __init__(__self__, *, :param 'SnapshotEncryptionSettingsDiskEncryptionKeyArgs' disk_encryption_key: A `disk_encryption_key` block as defined below. :param 'SnapshotEncryptionSettingsKeyEncryptionKeyArgs' key_encryption_key: A `key_encryption_key` block as defined below. """ + SnapshotEncryptionSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_encryption_key=disk_encryption_key, + enabled=enabled, + key_encryption_key=key_encryption_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_encryption_key: Optional['outputs.SnapshotEncryptionSettingsDiskEncryptionKey'] = None, + enabled: Optional[bool] = None, + key_encryption_key: Optional['outputs.SnapshotEncryptionSettingsKeyEncryptionKey'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_encryption_key is None and 'diskEncryptionKey' in kwargs: + disk_encryption_key = kwargs['diskEncryptionKey'] + if key_encryption_key is None and 'keyEncryptionKey' in kwargs: + key_encryption_key = kwargs['keyEncryptionKey'] + if disk_encryption_key is not None: - pulumi.set(__self__, "disk_encryption_key", disk_encryption_key) + _setter("disk_encryption_key", disk_encryption_key) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if key_encryption_key is not None: - pulumi.set(__self__, "key_encryption_key", key_encryption_key) + _setter("key_encryption_key", key_encryption_key) @property @pulumi.getter(name="diskEncryptionKey") @@ -7549,8 +10114,29 @@ def __init__(__self__, *, :param str secret_url: The URL to the Key Vault Secret used as the Disk Encryption Key. This can be found as `id` on the `keyvault.Secret` resource. :param str source_vault_id: The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + SnapshotEncryptionSettingsDiskEncryptionKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -7597,8 +10183,29 @@ def __init__(__self__, *, :param str key_url: The URL to the Key Vault Key used as the Key Encryption Key. This can be found as `id` on the `keyvault.Key` resource. :param str source_vault_id: The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. """ - pulumi.set(__self__, "key_url", key_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + SnapshotEncryptionSettingsKeyEncryptionKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_url=key_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_url is None and 'keyUrl' in kwargs: + key_url = kwargs['keyUrl'] + if key_url is None: + raise TypeError("Missing 'key_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("key_url", key_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="keyUrl") @@ -7643,7 +10250,22 @@ def __init__(__self__, *, > **Note:** Azure Ultra Disk Storage is only available in a region that support availability zones and can only enabled on the following VM series: `ESv3`, `DSv3`, `FSv3`, `LSv2`, `M` and `Mv2`. For more information see the `Azure Ultra Disk Storage` [product documentation](https://docs.microsoft.com/azure/virtual-machines/windows/disks-enable-ultra-ssd). """ - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + VirtualMachineAdditionalCapabilities._configure( + lambda key, value: pulumi.set(__self__, key, value), + ultra_ssd_enabled=ultra_ssd_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ultra_ssd_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if ultra_ssd_enabled is None: + raise TypeError("Missing 'ultra_ssd_enabled' argument") + + _setter("ultra_ssd_enabled", ultra_ssd_enabled) @property @pulumi.getter(name="ultraSsdEnabled") @@ -7684,8 +10306,27 @@ def __init__(__self__, *, > **NOTE:** This needs to be the root of a Storage Account and not a Storage Container. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "storage_uri", storage_uri) + VirtualMachineBootDiagnostics._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + storage_uri=storage_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + storage_uri: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if storage_uri is None and 'storageUri' in kwargs: + storage_uri = kwargs['storageUri'] + if storage_uri is None: + raise TypeError("Missing 'storage_uri' argument") + + _setter("enabled", enabled) + _setter("storage_uri", storage_uri) @property @pulumi.getter @@ -7742,11 +10383,32 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. :param str principal_id: The Principal ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + VirtualMachineIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) @property @pulumi.getter @@ -7817,12 +10479,41 @@ def __init__(__self__, *, > **NOTE:** If using Linux, it may be preferable to use SSH Key authentication (available in the `os_profile_linux_config` block) instead of password authentication. :param str custom_data: Specifies custom data to supply to the machine. On Linux-based systems, this can be used as a cloud-init script. On other systems, this will be copied as a file on disk. Internally, this provider will base64 encode this value before sending it to the API. The maximum length of the binary array is 65535 bytes. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "admin_username", admin_username) - pulumi.set(__self__, "computer_name", computer_name) + VirtualMachineOsProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + computer_name=computer_name, + admin_password=admin_password, + custom_data=custom_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[str] = None, + computer_name: Optional[str] = None, + admin_password: Optional[str] = None, + custom_data: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if computer_name is None and 'computerName' in kwargs: + computer_name = kwargs['computerName'] + if computer_name is None: + raise TypeError("Missing 'computer_name' argument") + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + + _setter("admin_username", admin_username) + _setter("computer_name", computer_name) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) @property @pulumi.getter(name="adminUsername") @@ -7887,9 +10578,28 @@ def __init__(__self__, *, :param bool disable_password_authentication: Specifies whether password authentication should be disabled. If set to `false`, an `admin_password` must be specified. :param Sequence['VirtualMachineOsProfileLinuxConfigSshKeyArgs'] ssh_keys: One or more `ssh_keys` blocks as defined below. This field is required if `disable_password_authentication` is set to `true`. """ - pulumi.set(__self__, "disable_password_authentication", disable_password_authentication) + VirtualMachineOsProfileLinuxConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + disable_password_authentication=disable_password_authentication, + ssh_keys=ssh_keys, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disable_password_authentication: Optional[bool] = None, + ssh_keys: Optional[Sequence['outputs.VirtualMachineOsProfileLinuxConfigSshKey']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disable_password_authentication is None and 'disablePasswordAuthentication' in kwargs: + disable_password_authentication = kwargs['disablePasswordAuthentication'] + if disable_password_authentication is None: + raise TypeError("Missing 'disable_password_authentication' argument") + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + + _setter("disable_password_authentication", disable_password_authentication) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) @property @pulumi.getter(name="disablePasswordAuthentication") @@ -7938,8 +10648,27 @@ def __init__(__self__, *, > **NOTE:** Due to a limitation in the Azure VM Agent the only allowed `path` is `/home/{username}/.ssh/authorized_keys`. """ - pulumi.set(__self__, "key_data", key_data) - pulumi.set(__self__, "path", path) + VirtualMachineOsProfileLinuxConfigSshKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_data=key_data, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_data: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_data is None and 'keyData' in kwargs: + key_data = kwargs['keyData'] + if key_data is None: + raise TypeError("Missing 'key_data' argument") + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("key_data", key_data) + _setter("path", path) @property @pulumi.getter(name="keyData") @@ -7990,9 +10719,28 @@ def __init__(__self__, *, :param str source_vault_id: Specifies the ID of the Key Vault to use. :param Sequence['VirtualMachineOsProfileSecretVaultCertificateArgs'] vault_certificates: One or more `vault_certificates` blocks as defined below. """ - pulumi.set(__self__, "source_vault_id", source_vault_id) + VirtualMachineOsProfileSecret._configure( + lambda key, value: pulumi.set(__self__, key, value), + source_vault_id=source_vault_id, + vault_certificates=vault_certificates, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + source_vault_id: Optional[str] = None, + vault_certificates: Optional[Sequence['outputs.VirtualMachineOsProfileSecretVaultCertificate']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + if vault_certificates is None and 'vaultCertificates' in kwargs: + vault_certificates = kwargs['vaultCertificates'] + + _setter("source_vault_id", source_vault_id) if vault_certificates is not None: - pulumi.set(__self__, "vault_certificates", vault_certificates) + _setter("vault_certificates", vault_certificates) @property @pulumi.getter(name="sourceVaultId") @@ -8042,9 +10790,28 @@ def __init__(__self__, *, > **NOTE:** If your certificate is stored in Azure Key Vault - this can be sourced from the `secret_id` property on the `keyvault.Certificate` resource. :param str certificate_store: (Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to, such as `My`. """ - pulumi.set(__self__, "certificate_url", certificate_url) + VirtualMachineOsProfileSecretVaultCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_url=certificate_url, + certificate_store=certificate_store, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_url: Optional[str] = None, + certificate_store: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + if certificate_url is None: + raise TypeError("Missing 'certificate_url' argument") + if certificate_store is None and 'certificateStore' in kwargs: + certificate_store = kwargs['certificateStore'] + + _setter("certificate_url", certificate_url) if certificate_store is not None: - pulumi.set(__self__, "certificate_store", certificate_store) + _setter("certificate_store", certificate_store) @property @pulumi.getter(name="certificateUrl") @@ -8104,16 +10871,41 @@ def __init__(__self__, *, :param str timezone: Specifies the time zone of the virtual machine, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Changing this forces a new resource to be created. :param Sequence['VirtualMachineOsProfileWindowsConfigWinrmArgs'] winrms: One or more `winrm` blocks as defined below. """ + VirtualMachineOsProfileWindowsConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_unattend_configs=additional_unattend_configs, + enable_automatic_upgrades=enable_automatic_upgrades, + provision_vm_agent=provision_vm_agent, + timezone=timezone, + winrms=winrms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_unattend_configs: Optional[Sequence['outputs.VirtualMachineOsProfileWindowsConfigAdditionalUnattendConfig']] = None, + enable_automatic_upgrades: Optional[bool] = None, + provision_vm_agent: Optional[bool] = None, + timezone: Optional[str] = None, + winrms: Optional[Sequence['outputs.VirtualMachineOsProfileWindowsConfigWinrm']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_unattend_configs is None and 'additionalUnattendConfigs' in kwargs: + additional_unattend_configs = kwargs['additionalUnattendConfigs'] + if enable_automatic_upgrades is None and 'enableAutomaticUpgrades' in kwargs: + enable_automatic_upgrades = kwargs['enableAutomaticUpgrades'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if additional_unattend_configs is not None: - pulumi.set(__self__, "additional_unattend_configs", additional_unattend_configs) + _setter("additional_unattend_configs", additional_unattend_configs) if enable_automatic_upgrades is not None: - pulumi.set(__self__, "enable_automatic_upgrades", enable_automatic_upgrades) + _setter("enable_automatic_upgrades", enable_automatic_upgrades) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) if winrms is not None: - pulumi.set(__self__, "winrms", winrms) + _setter("winrms", winrms) @property @pulumi.getter(name="additionalUnattendConfigs") @@ -8190,10 +10982,39 @@ def __init__(__self__, *, :param str pass_: Specifies the name of the pass that the content applies to. The only allowable value is `oobeSystem`. :param str setting_name: Specifies the name of the setting to which the content applies. Possible values are: `FirstLogonCommands` and `AutoLogon`. """ - pulumi.set(__self__, "component", component) - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "pass_", pass_) - pulumi.set(__self__, "setting_name", setting_name) + VirtualMachineOsProfileWindowsConfigAdditionalUnattendConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + component=component, + content=content, + pass_=pass_, + setting_name=setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + component: Optional[str] = None, + content: Optional[str] = None, + pass_: Optional[str] = None, + setting_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if component is None: + raise TypeError("Missing 'component' argument") + if content is None: + raise TypeError("Missing 'content' argument") + if pass_ is None and 'pass' in kwargs: + pass_ = kwargs['pass'] + if pass_ is None: + raise TypeError("Missing 'pass_' argument") + if setting_name is None and 'settingName' in kwargs: + setting_name = kwargs['settingName'] + if setting_name is None: + raise TypeError("Missing 'setting_name' argument") + + _setter("component", component) + _setter("content", content) + _setter("pass_", pass_) + _setter("setting_name", setting_name) @property @pulumi.getter @@ -8256,9 +11077,26 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field on the `keyvault.Certificate` resource. """ - pulumi.set(__self__, "protocol", protocol) + VirtualMachineOsProfileWindowsConfigWinrm._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + certificate_url=certificate_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[str] = None, + certificate_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + + _setter("protocol", protocol) if certificate_url is not None: - pulumi.set(__self__, "certificate_url", certificate_url) + _setter("certificate_url", certificate_url) @property @pulumi.getter @@ -8290,9 +11128,30 @@ def __init__(__self__, *, :param str product: Specifies the product of the image from the marketplace. :param str publisher: Specifies the publisher of the image. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + VirtualMachinePlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + product: Optional[str] = None, + publisher: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -8347,8 +11206,29 @@ def __init__(__self__, *, :param str secret_url: The URL to the Key Vault Secret which stores the protected settings. :param str source_vault_id: The ID of the source Key Vault. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVault._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -8425,21 +11305,66 @@ def __init__(__self__, *, The following properties apply when using Managed Disks: """ - pulumi.set(__self__, "create_option", create_option) - pulumi.set(__self__, "lun", lun) - pulumi.set(__self__, "name", name) + VirtualMachineStorageDataDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_option=create_option, + lun=lun, + name=name, + caching=caching, + disk_size_gb=disk_size_gb, + managed_disk_id=managed_disk_id, + managed_disk_type=managed_disk_type, + vhd_uri=vhd_uri, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_option: Optional[str] = None, + lun: Optional[int] = None, + name: Optional[str] = None, + caching: Optional[str] = None, + disk_size_gb: Optional[int] = None, + managed_disk_id: Optional[str] = None, + managed_disk_type: Optional[str] = None, + vhd_uri: Optional[str] = None, + write_accelerator_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if create_option is None: + raise TypeError("Missing 'create_option' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if managed_disk_type is None and 'managedDiskType' in kwargs: + managed_disk_type = kwargs['managedDiskType'] + if vhd_uri is None and 'vhdUri' in kwargs: + vhd_uri = kwargs['vhdUri'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("create_option", create_option) + _setter("lun", lun) + _setter("name", name) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if managed_disk_id is not None: - pulumi.set(__self__, "managed_disk_id", managed_disk_id) + _setter("managed_disk_id", managed_disk_id) if managed_disk_type is not None: - pulumi.set(__self__, "managed_disk_type", managed_disk_type) + _setter("managed_disk_type", managed_disk_type) if vhd_uri is not None: - pulumi.set(__self__, "vhd_uri", vhd_uri) + _setter("vhd_uri", vhd_uri) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter(name="createOption") @@ -8539,16 +11464,35 @@ def __init__(__self__, *, To provision a Custom Image, the following fields are applicable: """ + VirtualMachineStorageImageReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if offer is not None: - pulumi.set(__self__, "offer", offer) + _setter("offer", offer) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -8653,24 +11597,73 @@ def __init__(__self__, *, The following properties apply when using Managed Disks: """ - pulumi.set(__self__, "create_option", create_option) - pulumi.set(__self__, "name", name) + VirtualMachineStorageOsDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_option=create_option, + name=name, + caching=caching, + disk_size_gb=disk_size_gb, + image_uri=image_uri, + managed_disk_id=managed_disk_id, + managed_disk_type=managed_disk_type, + os_type=os_type, + vhd_uri=vhd_uri, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_option: Optional[str] = None, + name: Optional[str] = None, + caching: Optional[str] = None, + disk_size_gb: Optional[int] = None, + image_uri: Optional[str] = None, + managed_disk_id: Optional[str] = None, + managed_disk_type: Optional[str] = None, + os_type: Optional[str] = None, + vhd_uri: Optional[str] = None, + write_accelerator_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if create_option is None: + raise TypeError("Missing 'create_option' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if image_uri is None and 'imageUri' in kwargs: + image_uri = kwargs['imageUri'] + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if managed_disk_type is None and 'managedDiskType' in kwargs: + managed_disk_type = kwargs['managedDiskType'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if vhd_uri is None and 'vhdUri' in kwargs: + vhd_uri = kwargs['vhdUri'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("create_option", create_option) + _setter("name", name) if caching is not None: - pulumi.set(__self__, "caching", caching) + _setter("caching", caching) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if image_uri is not None: - pulumi.set(__self__, "image_uri", image_uri) + _setter("image_uri", image_uri) if managed_disk_id is not None: - pulumi.set(__self__, "managed_disk_id", managed_disk_id) + _setter("managed_disk_id", managed_disk_id) if managed_disk_type is not None: - pulumi.set(__self__, "managed_disk_type", managed_disk_type) + _setter("managed_disk_type", managed_disk_type) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if vhd_uri is not None: - pulumi.set(__self__, "vhd_uri", vhd_uri) + _setter("vhd_uri", vhd_uri) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter(name="createOption") @@ -8781,8 +11774,21 @@ def __init__(__self__, *, """ :param bool ultra_ssd_enabled: Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Virtual Machine? Defaults to `false`. """ + WindowsVirtualMachineAdditionalCapabilities._configure( + lambda key, value: pulumi.set(__self__, key, value), + ultra_ssd_enabled=ultra_ssd_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ultra_ssd_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) @property @pulumi.getter(name="ultraSsdEnabled") @@ -8802,8 +11808,25 @@ def __init__(__self__, *, :param str content: The XML formatted content that is added to the unattend.xml file for the specified path and component. Changing this forces a new resource to be created. :param str setting: The name of the setting to which the content applies. Possible values are `AutoLogon` and `FirstLogonCommands`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "setting", setting) + WindowsVirtualMachineAdditionalUnattendContent._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + setting=setting, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[str] = None, + setting: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if setting is None: + raise TypeError("Missing 'setting' argument") + + _setter("content", content) + _setter("setting", setting) @property @pulumi.getter @@ -8848,8 +11871,21 @@ def __init__(__self__, *, > **NOTE:** Passing a null value will utilize a Managed Storage Account to store Boot Diagnostics. """ + WindowsVirtualMachineBootDiagnostics._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_uri=storage_account_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_uri: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_uri is None and 'storageAccountUri' in kwargs: + storage_account_uri = kwargs['storageAccountUri'] + if storage_account_uri is not None: - pulumi.set(__self__, "storage_account_uri", storage_account_uri) + _setter("storage_account_uri", storage_account_uri) @property @pulumi.getter(name="storageAccountUri") @@ -8894,13 +11930,36 @@ def __init__(__self__, *, :param int order: Specifies the order in which the packages have to be installed. Possible values are between `0` and `2,147,483,647`. :param str tag: Specifies a passthrough value for more generic context. This field can be any valid `string` value. """ - pulumi.set(__self__, "version_id", version_id) + WindowsVirtualMachineGalleryApplication._configure( + lambda key, value: pulumi.set(__self__, key, value), + version_id=version_id, + configuration_blob_uri=configuration_blob_uri, + order=order, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + version_id: Optional[str] = None, + configuration_blob_uri: Optional[str] = None, + order: Optional[int] = None, + tag: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if version_id is None and 'versionId' in kwargs: + version_id = kwargs['versionId'] + if version_id is None: + raise TypeError("Missing 'version_id' argument") + if configuration_blob_uri is None and 'configurationBlobUri' in kwargs: + configuration_blob_uri = kwargs['configurationBlobUri'] + + _setter("version_id", version_id) if configuration_blob_uri is not None: - pulumi.set(__self__, "configuration_blob_uri", configuration_blob_uri) + _setter("configuration_blob_uri", configuration_blob_uri) if order is not None: - pulumi.set(__self__, "order", order) + _setter("order", order) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter(name="versionId") @@ -8971,13 +12030,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WindowsVirtualMachineIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -9080,22 +12164,67 @@ def __init__(__self__, *, > **NOTE:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "storage_account_type", storage_account_type) + WindowsVirtualMachineOsDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + storage_account_type=storage_account_type, + diff_disk_settings=diff_disk_settings, + disk_encryption_set_id=disk_encryption_set_id, + disk_size_gb=disk_size_gb, + name=name, + secure_vm_disk_encryption_set_id=secure_vm_disk_encryption_set_id, + security_encryption_type=security_encryption_type, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[str] = None, + storage_account_type: Optional[str] = None, + diff_disk_settings: Optional['outputs.WindowsVirtualMachineOsDiskDiffDiskSettings'] = None, + disk_encryption_set_id: Optional[str] = None, + disk_size_gb: Optional[int] = None, + name: Optional[str] = None, + secure_vm_disk_encryption_set_id: Optional[str] = None, + security_encryption_type: Optional[str] = None, + write_accelerator_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if diff_disk_settings is None and 'diffDiskSettings' in kwargs: + diff_disk_settings = kwargs['diffDiskSettings'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if secure_vm_disk_encryption_set_id is None and 'secureVmDiskEncryptionSetId' in kwargs: + secure_vm_disk_encryption_set_id = kwargs['secureVmDiskEncryptionSetId'] + if security_encryption_type is None and 'securityEncryptionType' in kwargs: + security_encryption_type = kwargs['securityEncryptionType'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("storage_account_type", storage_account_type) if diff_disk_settings is not None: - pulumi.set(__self__, "diff_disk_settings", diff_disk_settings) + _setter("diff_disk_settings", diff_disk_settings) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if secure_vm_disk_encryption_set_id is not None: - pulumi.set(__self__, "secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) + _setter("secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) if security_encryption_type is not None: - pulumi.set(__self__, "security_encryption_type", security_encryption_type) + _setter("security_encryption_type", security_encryption_type) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -9193,9 +12322,24 @@ def __init__(__self__, *, :param str option: Specifies the Ephemeral Disk Settings for the OS Disk. At this time the only possible value is `Local`. Changing this forces a new resource to be created. :param str placement: Specifies where to store the Ephemeral Disk. Possible values are `CacheDisk` and `ResourceDisk`. Defaults to `CacheDisk`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "option", option) + WindowsVirtualMachineOsDiskDiffDiskSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + option=option, + placement=placement, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + option: Optional[str] = None, + placement: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if option is None: + raise TypeError("Missing 'option' argument") + + _setter("option", option) if placement is not None: - pulumi.set(__self__, "placement", placement) + _setter("placement", placement) @property @pulumi.getter @@ -9227,9 +12371,30 @@ def __init__(__self__, *, > **NOTE:** If you use the `plan` block with one of Microsoft's marketplace images (e.g. `publisher = "MicrosoftWindowsServer"`). This may prevent the purchase of the offer. An example Azure API error: `The Offer: 'WindowsServer' cannot be purchased by subscription: '12345678-12234-5678-9012-123456789012' as it is not to be sold in market: 'US'. Please choose a subscription which is associated with a different market.` """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + WindowsVirtualMachinePlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + product: Optional[str] = None, + publisher: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -9282,8 +12447,21 @@ def __init__(__self__, *, """ :param bool ultra_ssd_enabled: Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Virtual Machine Scale Set? Possible values are `true` or `false`. Defaults to `false`. Changing this forces a new resource to be created. """ + WindowsVirtualMachineScaleSetAdditionalCapabilities._configure( + lambda key, value: pulumi.set(__self__, key, value), + ultra_ssd_enabled=ultra_ssd_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ultra_ssd_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) @property @pulumi.getter(name="ultraSsdEnabled") @@ -9303,8 +12481,25 @@ def __init__(__self__, *, :param str content: The XML formatted content that is added to the unattend.xml file for the specified path and component. Changing this forces a new resource to be created. :param str setting: The name of the setting to which the content applies. Possible values are `AutoLogon` and `FirstLogonCommands`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "setting", setting) + WindowsVirtualMachineScaleSetAdditionalUnattendContent._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + setting=setting, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[str] = None, + setting: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if setting is None: + raise TypeError("Missing 'setting' argument") + + _setter("content", content) + _setter("setting", setting) @property @pulumi.getter @@ -9349,9 +12544,26 @@ def __init__(__self__, *, :param bool enabled: Should the automatic instance repair be enabled on this Virtual Machine Scale Set? :param str grace_period: Amount of time (in minutes, between 30 and 90, defaults to 30 minutes) for which automatic repairs will be delayed. The grace period starts right after the VM is found unhealthy. The time duration should be specified in ISO 8601 format. Defaults to `PT30M`. """ - pulumi.set(__self__, "enabled", enabled) + WindowsVirtualMachineScaleSetAutomaticInstanceRepair._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + grace_period=grace_period, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + grace_period: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if grace_period is None and 'gracePeriod' in kwargs: + grace_period = kwargs['gracePeriod'] + + _setter("enabled", enabled) if grace_period is not None: - pulumi.set(__self__, "grace_period", grace_period) + _setter("grace_period", grace_period) @property @pulumi.getter @@ -9398,8 +12610,29 @@ def __init__(__self__, *, :param bool disable_automatic_rollback: Should automatic rollbacks be disabled? :param bool enable_automatic_os_upgrade: Should OS Upgrades automatically be applied to Scale Set instances in a rolling fashion when a newer version of the OS Image becomes available? """ - pulumi.set(__self__, "disable_automatic_rollback", disable_automatic_rollback) - pulumi.set(__self__, "enable_automatic_os_upgrade", enable_automatic_os_upgrade) + WindowsVirtualMachineScaleSetAutomaticOsUpgradePolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + disable_automatic_rollback=disable_automatic_rollback, + enable_automatic_os_upgrade=enable_automatic_os_upgrade, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disable_automatic_rollback: Optional[bool] = None, + enable_automatic_os_upgrade: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disable_automatic_rollback is None and 'disableAutomaticRollback' in kwargs: + disable_automatic_rollback = kwargs['disableAutomaticRollback'] + if disable_automatic_rollback is None: + raise TypeError("Missing 'disable_automatic_rollback' argument") + if enable_automatic_os_upgrade is None and 'enableAutomaticOsUpgrade' in kwargs: + enable_automatic_os_upgrade = kwargs['enableAutomaticOsUpgrade'] + if enable_automatic_os_upgrade is None: + raise TypeError("Missing 'enable_automatic_os_upgrade' argument") + + _setter("disable_automatic_rollback", disable_automatic_rollback) + _setter("enable_automatic_os_upgrade", enable_automatic_os_upgrade) @property @pulumi.getter(name="disableAutomaticRollback") @@ -9444,8 +12677,21 @@ def __init__(__self__, *, > **NOTE:** Passing a null value will utilize a Managed Storage Account to store Boot Diagnostics """ + WindowsVirtualMachineScaleSetBootDiagnostics._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_uri=storage_account_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_uri: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_uri is None and 'storageAccountUri' in kwargs: + storage_account_uri = kwargs['storageAccountUri'] + if storage_account_uri is not None: - pulumi.set(__self__, "storage_account_uri", storage_account_uri) + _setter("storage_account_uri", storage_account_uri) @property @pulumi.getter(name="storageAccountUri") @@ -9520,22 +12766,73 @@ def __init__(__self__, *, > **NOTE:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "disk_size_gb", disk_size_gb) - pulumi.set(__self__, "lun", lun) - pulumi.set(__self__, "storage_account_type", storage_account_type) + WindowsVirtualMachineScaleSetDataDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + disk_size_gb=disk_size_gb, + lun=lun, + storage_account_type=storage_account_type, + create_option=create_option, + disk_encryption_set_id=disk_encryption_set_id, + name=name, + ultra_ssd_disk_iops_read_write=ultra_ssd_disk_iops_read_write, + ultra_ssd_disk_mbps_read_write=ultra_ssd_disk_mbps_read_write, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[str] = None, + disk_size_gb: Optional[int] = None, + lun: Optional[int] = None, + storage_account_type: Optional[str] = None, + create_option: Optional[str] = None, + disk_encryption_set_id: Optional[str] = None, + name: Optional[str] = None, + ultra_ssd_disk_iops_read_write: Optional[int] = None, + ultra_ssd_disk_mbps_read_write: Optional[int] = None, + write_accelerator_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if disk_size_gb is None: + raise TypeError("Missing 'disk_size_gb' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if ultra_ssd_disk_iops_read_write is None and 'ultraSsdDiskIopsReadWrite' in kwargs: + ultra_ssd_disk_iops_read_write = kwargs['ultraSsdDiskIopsReadWrite'] + if ultra_ssd_disk_mbps_read_write is None and 'ultraSsdDiskMbpsReadWrite' in kwargs: + ultra_ssd_disk_mbps_read_write = kwargs['ultraSsdDiskMbpsReadWrite'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("disk_size_gb", disk_size_gb) + _setter("lun", lun) + _setter("storage_account_type", storage_account_type) if create_option is not None: - pulumi.set(__self__, "create_option", create_option) + _setter("create_option", create_option) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if ultra_ssd_disk_iops_read_write is not None: - pulumi.set(__self__, "ultra_ssd_disk_iops_read_write", ultra_ssd_disk_iops_read_write) + _setter("ultra_ssd_disk_iops_read_write", ultra_ssd_disk_iops_read_write) if ultra_ssd_disk_mbps_read_write is not None: - pulumi.set(__self__, "ultra_ssd_disk_mbps_read_write", ultra_ssd_disk_mbps_read_write) + _setter("ultra_ssd_disk_mbps_read_write", ultra_ssd_disk_mbps_read_write) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -9685,24 +12982,77 @@ def __init__(__self__, *, > **NOTE:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_handler_version", type_handler_version) + WindowsVirtualMachineScaleSetExtension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + publisher=publisher, + type=type, + type_handler_version=type_handler_version, + auto_upgrade_minor_version=auto_upgrade_minor_version, + automatic_upgrade_enabled=automatic_upgrade_enabled, + force_update_tag=force_update_tag, + protected_settings=protected_settings, + protected_settings_from_key_vault=protected_settings_from_key_vault, + provision_after_extensions=provision_after_extensions, + settings=settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + publisher: Optional[str] = None, + type: Optional[str] = None, + type_handler_version: Optional[str] = None, + auto_upgrade_minor_version: Optional[bool] = None, + automatic_upgrade_enabled: Optional[bool] = None, + force_update_tag: Optional[str] = None, + protected_settings: Optional[str] = None, + protected_settings_from_key_vault: Optional['outputs.WindowsVirtualMachineScaleSetExtensionProtectedSettingsFromKeyVault'] = None, + provision_after_extensions: Optional[Sequence[str]] = None, + settings: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if type_handler_version is None: + raise TypeError("Missing 'type_handler_version' argument") + if auto_upgrade_minor_version is None and 'autoUpgradeMinorVersion' in kwargs: + auto_upgrade_minor_version = kwargs['autoUpgradeMinorVersion'] + if automatic_upgrade_enabled is None and 'automaticUpgradeEnabled' in kwargs: + automatic_upgrade_enabled = kwargs['automaticUpgradeEnabled'] + if force_update_tag is None and 'forceUpdateTag' in kwargs: + force_update_tag = kwargs['forceUpdateTag'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if protected_settings_from_key_vault is None and 'protectedSettingsFromKeyVault' in kwargs: + protected_settings_from_key_vault = kwargs['protectedSettingsFromKeyVault'] + if provision_after_extensions is None and 'provisionAfterExtensions' in kwargs: + provision_after_extensions = kwargs['provisionAfterExtensions'] + + _setter("name", name) + _setter("publisher", publisher) + _setter("type", type) + _setter("type_handler_version", type_handler_version) if auto_upgrade_minor_version is not None: - pulumi.set(__self__, "auto_upgrade_minor_version", auto_upgrade_minor_version) + _setter("auto_upgrade_minor_version", auto_upgrade_minor_version) if automatic_upgrade_enabled is not None: - pulumi.set(__self__, "automatic_upgrade_enabled", automatic_upgrade_enabled) + _setter("automatic_upgrade_enabled", automatic_upgrade_enabled) if force_update_tag is not None: - pulumi.set(__self__, "force_update_tag", force_update_tag) + _setter("force_update_tag", force_update_tag) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if protected_settings_from_key_vault is not None: - pulumi.set(__self__, "protected_settings_from_key_vault", protected_settings_from_key_vault) + _setter("protected_settings_from_key_vault", protected_settings_from_key_vault) if provision_after_extensions is not None: - pulumi.set(__self__, "provision_after_extensions", provision_after_extensions) + _setter("provision_after_extensions", provision_after_extensions) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) @property @pulumi.getter @@ -9822,8 +13172,29 @@ def __init__(__self__, *, :param str secret_url: The URL to the Key Vault Secret which stores the protected settings. :param str source_vault_id: The ID of the source Key Vault. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + WindowsVirtualMachineScaleSetExtensionProtectedSettingsFromKeyVault._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -9872,13 +13243,36 @@ def __init__(__self__, *, :param int order: Specifies the order in which the packages have to be installed. Possible values are between `0` and `2,147,483,647`. Changing this forces a new resource to be created. :param str tag: Specifies a passthrough value for more generic context. This field can be any valid `string` value. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "package_reference_id", package_reference_id) + WindowsVirtualMachineScaleSetGalleryApplication._configure( + lambda key, value: pulumi.set(__self__, key, value), + package_reference_id=package_reference_id, + configuration_reference_blob_uri=configuration_reference_blob_uri, + order=order, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + package_reference_id: Optional[str] = None, + configuration_reference_blob_uri: Optional[str] = None, + order: Optional[int] = None, + tag: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if package_reference_id is None and 'packageReferenceId' in kwargs: + package_reference_id = kwargs['packageReferenceId'] + if package_reference_id is None: + raise TypeError("Missing 'package_reference_id' argument") + if configuration_reference_blob_uri is None and 'configurationReferenceBlobUri' in kwargs: + configuration_reference_blob_uri = kwargs['configurationReferenceBlobUri'] + + _setter("package_reference_id", package_reference_id) if configuration_reference_blob_uri is not None: - pulumi.set(__self__, "configuration_reference_blob_uri", configuration_reference_blob_uri) + _setter("configuration_reference_blob_uri", configuration_reference_blob_uri) if order is not None: - pulumi.set(__self__, "order", order) + _setter("order", order) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter(name="packageReferenceId") @@ -9949,13 +13343,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WindowsVirtualMachineScaleSetIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -10038,18 +13457,55 @@ def __init__(__self__, *, > **NOTE:** If multiple `network_interface` blocks are specified, one must be set to `primary`. """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) + WindowsVirtualMachineScaleSetNetworkInterface._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + name=name, + dns_servers=dns_servers, + enable_accelerated_networking=enable_accelerated_networking, + enable_ip_forwarding=enable_ip_forwarding, + network_security_group_id=network_security_group_id, + primary=primary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[Sequence['outputs.WindowsVirtualMachineScaleSetNetworkInterfaceIpConfiguration']] = None, + name: Optional[str] = None, + dns_servers: Optional[Sequence[str]] = None, + enable_accelerated_networking: Optional[bool] = None, + enable_ip_forwarding: Optional[bool] = None, + network_security_group_id: Optional[str] = None, + primary: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if enable_accelerated_networking is None and 'enableAcceleratedNetworking' in kwargs: + enable_accelerated_networking = kwargs['enableAcceleratedNetworking'] + if enable_ip_forwarding is None and 'enableIpForwarding' in kwargs: + enable_ip_forwarding = kwargs['enableIpForwarding'] + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + + _setter("ip_configurations", ip_configurations) + _setter("name", name) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if enable_accelerated_networking is not None: - pulumi.set(__self__, "enable_accelerated_networking", enable_accelerated_networking) + _setter("enable_accelerated_networking", enable_accelerated_networking) if enable_ip_forwarding is not None: - pulumi.set(__self__, "enable_ip_forwarding", enable_ip_forwarding) + _setter("enable_ip_forwarding", enable_ip_forwarding) if network_security_group_id is not None: - pulumi.set(__self__, "network_security_group_id", network_security_group_id) + _setter("network_security_group_id", network_security_group_id) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) @property @pulumi.getter(name="ipConfigurations") @@ -10170,23 +13626,64 @@ def __init__(__self__, *, > `subnet_id` is required if `version` is set to `IPv4`. :param str version: The Internet Protocol Version which should be used for this IP Configuration. Possible values are `IPv4` and `IPv6`. Defaults to `IPv4`. """ - pulumi.set(__self__, "name", name) + WindowsVirtualMachineScaleSetNetworkInterfaceIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + application_gateway_backend_address_pool_ids=application_gateway_backend_address_pool_ids, + application_security_group_ids=application_security_group_ids, + load_balancer_backend_address_pool_ids=load_balancer_backend_address_pool_ids, + load_balancer_inbound_nat_rules_ids=load_balancer_inbound_nat_rules_ids, + primary=primary, + public_ip_addresses=public_ip_addresses, + subnet_id=subnet_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + application_gateway_backend_address_pool_ids: Optional[Sequence[str]] = None, + application_security_group_ids: Optional[Sequence[str]] = None, + load_balancer_backend_address_pool_ids: Optional[Sequence[str]] = None, + load_balancer_inbound_nat_rules_ids: Optional[Sequence[str]] = None, + primary: Optional[bool] = None, + public_ip_addresses: Optional[Sequence['outputs.WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress']] = None, + subnet_id: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if application_gateway_backend_address_pool_ids is None and 'applicationGatewayBackendAddressPoolIds' in kwargs: + application_gateway_backend_address_pool_ids = kwargs['applicationGatewayBackendAddressPoolIds'] + if application_security_group_ids is None and 'applicationSecurityGroupIds' in kwargs: + application_security_group_ids = kwargs['applicationSecurityGroupIds'] + if load_balancer_backend_address_pool_ids is None and 'loadBalancerBackendAddressPoolIds' in kwargs: + load_balancer_backend_address_pool_ids = kwargs['loadBalancerBackendAddressPoolIds'] + if load_balancer_inbound_nat_rules_ids is None and 'loadBalancerInboundNatRulesIds' in kwargs: + load_balancer_inbound_nat_rules_ids = kwargs['loadBalancerInboundNatRulesIds'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) if application_gateway_backend_address_pool_ids is not None: - pulumi.set(__self__, "application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) + _setter("application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) if application_security_group_ids is not None: - pulumi.set(__self__, "application_security_group_ids", application_security_group_ids) + _setter("application_security_group_ids", application_security_group_ids) if load_balancer_backend_address_pool_ids is not None: - pulumi.set(__self__, "load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) + _setter("load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) if load_balancer_inbound_nat_rules_ids is not None: - pulumi.set(__self__, "load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) + _setter("load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -10313,17 +13810,48 @@ def __init__(__self__, *, > **NOTE:** This functionality is in Preview and must be opted into via `az feature register --namespace Microsoft.Network --name AllowBringYourOwnPublicIpAddress` and then `az provider register -n Microsoft.Network`. :param str version: The Internet Protocol Version which should be used for this public IP address. Possible values are `IPv4` and `IPv6`. Defaults to `IPv4`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + domain_name_label=domain_name_label, + idle_timeout_in_minutes=idle_timeout_in_minutes, + ip_tags=ip_tags, + public_ip_prefix_id=public_ip_prefix_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + domain_name_label: Optional[str] = None, + idle_timeout_in_minutes: Optional[int] = None, + ip_tags: Optional[Sequence['outputs.WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTag']] = None, + public_ip_prefix_id: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if domain_name_label is None and 'domainNameLabel' in kwargs: + domain_name_label = kwargs['domainNameLabel'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if ip_tags is None and 'ipTags' in kwargs: + ip_tags = kwargs['ipTags'] + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + + _setter("name", name) if domain_name_label is not None: - pulumi.set(__self__, "domain_name_label", domain_name_label) + _setter("domain_name_label", domain_name_label) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if ip_tags is not None: - pulumi.set(__self__, "ip_tags", ip_tags) + _setter("ip_tags", ip_tags) if public_ip_prefix_id is not None: - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) + _setter("public_ip_prefix_id", public_ip_prefix_id) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -10385,8 +13913,25 @@ def __init__(__self__, *, :param str tag: The IP Tag associated with the Public IP, such as `SQL` or `Storage`. Changing this forces a new resource to be created. :param str type: The Type of IP Tag, such as `FirstPartyUsage`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "type", type) + WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTag._configure( + lambda key, value: pulumi.set(__self__, key, value), + tag=tag, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tag: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag is None: + raise TypeError("Missing 'tag' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("tag", tag) + _setter("type", type) @property @pulumi.getter @@ -10469,20 +14014,63 @@ def __init__(__self__, *, > **NOTE:** This requires that the `storage_account_type` is set to `Premium_LRS` and that `caching` is set to `None`. """ - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "storage_account_type", storage_account_type) + WindowsVirtualMachineScaleSetOsDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + caching=caching, + storage_account_type=storage_account_type, + diff_disk_settings=diff_disk_settings, + disk_encryption_set_id=disk_encryption_set_id, + disk_size_gb=disk_size_gb, + secure_vm_disk_encryption_set_id=secure_vm_disk_encryption_set_id, + security_encryption_type=security_encryption_type, + write_accelerator_enabled=write_accelerator_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + caching: Optional[str] = None, + storage_account_type: Optional[str] = None, + diff_disk_settings: Optional['outputs.WindowsVirtualMachineScaleSetOsDiskDiffDiskSettings'] = None, + disk_encryption_set_id: Optional[str] = None, + disk_size_gb: Optional[int] = None, + secure_vm_disk_encryption_set_id: Optional[str] = None, + security_encryption_type: Optional[str] = None, + write_accelerator_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if caching is None: + raise TypeError("Missing 'caching' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + if diff_disk_settings is None and 'diffDiskSettings' in kwargs: + diff_disk_settings = kwargs['diffDiskSettings'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if secure_vm_disk_encryption_set_id is None and 'secureVmDiskEncryptionSetId' in kwargs: + secure_vm_disk_encryption_set_id = kwargs['secureVmDiskEncryptionSetId'] + if security_encryption_type is None and 'securityEncryptionType' in kwargs: + security_encryption_type = kwargs['securityEncryptionType'] + if write_accelerator_enabled is None and 'writeAcceleratorEnabled' in kwargs: + write_accelerator_enabled = kwargs['writeAcceleratorEnabled'] + + _setter("caching", caching) + _setter("storage_account_type", storage_account_type) if diff_disk_settings is not None: - pulumi.set(__self__, "diff_disk_settings", diff_disk_settings) + _setter("diff_disk_settings", diff_disk_settings) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if secure_vm_disk_encryption_set_id is not None: - pulumi.set(__self__, "secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) + _setter("secure_vm_disk_encryption_set_id", secure_vm_disk_encryption_set_id) if security_encryption_type is not None: - pulumi.set(__self__, "security_encryption_type", security_encryption_type) + _setter("security_encryption_type", security_encryption_type) if write_accelerator_enabled is not None: - pulumi.set(__self__, "write_accelerator_enabled", write_accelerator_enabled) + _setter("write_accelerator_enabled", write_accelerator_enabled) @property @pulumi.getter @@ -10572,9 +14160,24 @@ def __init__(__self__, *, :param str option: Specifies the Ephemeral Disk Settings for the OS Disk. At this time the only possible value is `Local`. Changing this forces a new resource to be created. :param str placement: Specifies where to store the Ephemeral Disk. Possible values are `CacheDisk` and `ResourceDisk`. Defaults to `CacheDisk`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "option", option) + WindowsVirtualMachineScaleSetOsDiskDiffDiskSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + option=option, + placement=placement, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + option: Optional[str] = None, + placement: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if option is None: + raise TypeError("Missing 'option' argument") + + _setter("option", option) if placement is not None: - pulumi.set(__self__, "placement", placement) + _setter("placement", placement) @property @pulumi.getter @@ -10604,9 +14207,30 @@ def __init__(__self__, *, :param str product: Specifies the product of the image from the marketplace. Changing this forces a new resource to be created. :param str publisher: Specifies the publisher of the image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + WindowsVirtualMachineScaleSetPlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + product: Optional[str] = None, + publisher: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -10677,14 +14301,55 @@ def __init__(__self__, *, :param bool cross_zone_upgrades_enabled: Should the Virtual Machine Scale Set ignore the Azure Zone boundaries when constructing upgrade batches? Possible values are `true` or `false`. :param bool prioritize_unhealthy_instances_enabled: Upgrade all unhealthy instances in a scale set before any healthy instances. Possible values are `true` or `false`. """ - pulumi.set(__self__, "max_batch_instance_percent", max_batch_instance_percent) - pulumi.set(__self__, "max_unhealthy_instance_percent", max_unhealthy_instance_percent) - pulumi.set(__self__, "max_unhealthy_upgraded_instance_percent", max_unhealthy_upgraded_instance_percent) - pulumi.set(__self__, "pause_time_between_batches", pause_time_between_batches) + WindowsVirtualMachineScaleSetRollingUpgradePolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_batch_instance_percent=max_batch_instance_percent, + max_unhealthy_instance_percent=max_unhealthy_instance_percent, + max_unhealthy_upgraded_instance_percent=max_unhealthy_upgraded_instance_percent, + pause_time_between_batches=pause_time_between_batches, + cross_zone_upgrades_enabled=cross_zone_upgrades_enabled, + prioritize_unhealthy_instances_enabled=prioritize_unhealthy_instances_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_batch_instance_percent: Optional[int] = None, + max_unhealthy_instance_percent: Optional[int] = None, + max_unhealthy_upgraded_instance_percent: Optional[int] = None, + pause_time_between_batches: Optional[str] = None, + cross_zone_upgrades_enabled: Optional[bool] = None, + prioritize_unhealthy_instances_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_batch_instance_percent is None and 'maxBatchInstancePercent' in kwargs: + max_batch_instance_percent = kwargs['maxBatchInstancePercent'] + if max_batch_instance_percent is None: + raise TypeError("Missing 'max_batch_instance_percent' argument") + if max_unhealthy_instance_percent is None and 'maxUnhealthyInstancePercent' in kwargs: + max_unhealthy_instance_percent = kwargs['maxUnhealthyInstancePercent'] + if max_unhealthy_instance_percent is None: + raise TypeError("Missing 'max_unhealthy_instance_percent' argument") + if max_unhealthy_upgraded_instance_percent is None and 'maxUnhealthyUpgradedInstancePercent' in kwargs: + max_unhealthy_upgraded_instance_percent = kwargs['maxUnhealthyUpgradedInstancePercent'] + if max_unhealthy_upgraded_instance_percent is None: + raise TypeError("Missing 'max_unhealthy_upgraded_instance_percent' argument") + if pause_time_between_batches is None and 'pauseTimeBetweenBatches' in kwargs: + pause_time_between_batches = kwargs['pauseTimeBetweenBatches'] + if pause_time_between_batches is None: + raise TypeError("Missing 'pause_time_between_batches' argument") + if cross_zone_upgrades_enabled is None and 'crossZoneUpgradesEnabled' in kwargs: + cross_zone_upgrades_enabled = kwargs['crossZoneUpgradesEnabled'] + if prioritize_unhealthy_instances_enabled is None and 'prioritizeUnhealthyInstancesEnabled' in kwargs: + prioritize_unhealthy_instances_enabled = kwargs['prioritizeUnhealthyInstancesEnabled'] + + _setter("max_batch_instance_percent", max_batch_instance_percent) + _setter("max_unhealthy_instance_percent", max_unhealthy_instance_percent) + _setter("max_unhealthy_upgraded_instance_percent", max_unhealthy_upgraded_instance_percent) + _setter("pause_time_between_batches", pause_time_between_batches) if cross_zone_upgrades_enabled is not None: - pulumi.set(__self__, "cross_zone_upgrades_enabled", cross_zone_upgrades_enabled) + _setter("cross_zone_upgrades_enabled", cross_zone_upgrades_enabled) if prioritize_unhealthy_instances_enabled is not None: - pulumi.set(__self__, "prioritize_unhealthy_instances_enabled", prioritize_unhealthy_instances_enabled) + _setter("prioritize_unhealthy_instances_enabled", prioritize_unhealthy_instances_enabled) @property @pulumi.getter(name="maxBatchInstancePercent") @@ -10761,10 +14426,25 @@ def __init__(__self__, *, :param bool force_deletion_enabled: Should the virtual machines chosen for removal be force deleted when the virtual machine scale set is being scaled-in? Possible values are `true` or `false`. Defaults to `false`. :param str rule: The scale-in policy rule that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled in. Possible values for the scale-in policy rules are `Default`, `NewestVM` and `OldestVM`, defaults to `Default`. For more information about scale in policy, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-scale-in-policy). """ + WindowsVirtualMachineScaleSetScaleIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + force_deletion_enabled=force_deletion_enabled, + rule=rule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + force_deletion_enabled: Optional[bool] = None, + rule: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if force_deletion_enabled is None and 'forceDeletionEnabled' in kwargs: + force_deletion_enabled = kwargs['forceDeletionEnabled'] + if force_deletion_enabled is not None: - pulumi.set(__self__, "force_deletion_enabled", force_deletion_enabled) + _setter("force_deletion_enabled", force_deletion_enabled) if rule is not None: - pulumi.set(__self__, "rule", rule) + _setter("rule", rule) @property @pulumi.getter(name="forceDeletionEnabled") @@ -10809,8 +14489,27 @@ def __init__(__self__, *, :param Sequence['WindowsVirtualMachineScaleSetSecretCertificateArgs'] certificates: One or more `certificate` blocks as defined above. :param str key_vault_id: The ID of the Key Vault from which all Secrets should be sourced. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "key_vault_id", key_vault_id) + WindowsVirtualMachineScaleSetSecret._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[Sequence['outputs.WindowsVirtualMachineScaleSetSecretCertificate']] = None, + key_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("certificates", certificates) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -10840,8 +14539,25 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "store", store) - pulumi.set(__self__, "url", url) + WindowsVirtualMachineScaleSetSecretCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + store=store, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + store: Optional[str] = None, + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if store is None: + raise TypeError("Missing 'store' argument") + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("store", store) + _setter("url", url) @property @pulumi.getter @@ -10875,10 +14591,35 @@ def __init__(__self__, *, :param str sku: Specifies the SKU of the image used to create the virtual machines. :param str version: Specifies the version of the image used to create the virtual machines. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + WindowsVirtualMachineScaleSetSourceImageReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -10922,10 +14663,23 @@ def __init__(__self__, *, :param bool enabled: Should the Spot-Try-Restore feature be enabled? The Spot-Try-Restore feature will attempt to automatically restore the evicted Spot Virtual Machine Scale Set VM instances opportunistically based on capacity availability and pricing constraints. Possible values are `true` or `false`. Defaults to `false`. Changing this forces a new resource to be created. :param str timeout: The length of time that the Virtual Machine Scale Set should attempt to restore the Spot VM instances which have been evicted. The time duration should be between `15` minutes and `120` minutes (inclusive). The time duration should be specified in the ISO 8601 format. Defaults to `90` minutes (e.g. `PT1H30M`). Changing this forces a new resource to be created. """ + WindowsVirtualMachineScaleSetSpotRestore._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + timeout: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -10955,9 +14709,24 @@ def __init__(__self__, *, > For more information about the terminate notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). """ - pulumi.set(__self__, "enabled", enabled) + WindowsVirtualMachineScaleSetTerminateNotification._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + timeout: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -10989,9 +14758,24 @@ def __init__(__self__, *, > **NOTE:** For more information about the termination notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). """ - pulumi.set(__self__, "enabled", enabled) + WindowsVirtualMachineScaleSetTerminationNotification._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + timeout: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -11040,9 +14824,26 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "protocol", protocol) + WindowsVirtualMachineScaleSetWinrmListener._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + certificate_url=certificate_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[str] = None, + certificate_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + + _setter("protocol", protocol) if certificate_url is not None: - pulumi.set(__self__, "certificate_url", certificate_url) + _setter("certificate_url", certificate_url) @property @pulumi.getter @@ -11089,8 +14890,27 @@ def __init__(__self__, *, :param Sequence['WindowsVirtualMachineSecretCertificateArgs'] certificates: One or more `certificate` blocks as defined above. :param str key_vault_id: The ID of the Key Vault from which all Secrets should be sourced. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "key_vault_id", key_vault_id) + WindowsVirtualMachineSecret._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[Sequence['outputs.WindowsVirtualMachineSecretCertificate']] = None, + key_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("certificates", certificates) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -11120,8 +14940,25 @@ def __init__(__self__, *, > **NOTE:** This can be sourced from the `secret_id` field within the `keyvault.Certificate` Resource. """ - pulumi.set(__self__, "store", store) - pulumi.set(__self__, "url", url) + WindowsVirtualMachineSecretCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + store=store, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + store: Optional[str] = None, + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if store is None: + raise TypeError("Missing 'store' argument") + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("store", store) + _setter("url", url) @property @pulumi.getter @@ -11155,10 +14992,35 @@ def __init__(__self__, *, :param str sku: Specifies the SKU of the image used to create the virtual machines. Changing this forces a new resource to be created. :param str version: Specifies the version of the image used to create the virtual machines. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + WindowsVirtualMachineSourceImageReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -11204,9 +15066,24 @@ def __init__(__self__, *, > **NOTE:** For more information about the termination notification, please [refer to this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-terminate-notification). """ - pulumi.set(__self__, "enabled", enabled) + WindowsVirtualMachineTerminationNotification._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + timeout: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -11253,9 +15130,26 @@ def __init__(__self__, *, :param str protocol: Specifies the protocol of listener. Possible values are `Http` or `Https`. Changing this forces a new resource to be created. :param str certificate_url: The Secret URL of a Key Vault Certificate, which must be specified when `protocol` is set to `Https`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "protocol", protocol) + WindowsVirtualMachineWinrmListener._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + certificate_url=certificate_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[str] = None, + certificate_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if certificate_url is None and 'certificateUrl' in kwargs: + certificate_url = kwargs['certificateUrl'] + + _setter("protocol", protocol) if certificate_url is not None: - pulumi.set(__self__, "certificate_url", certificate_url) + _setter("certificate_url", certificate_url) @property @pulumi.getter @@ -11285,9 +15179,34 @@ def __init__(__self__, *, :param str public_ip_address_id: Reference to a Public IP Address associated to this Bastion Host. :param str subnet_id: Reference to the subnet in which this Bastion Host has been created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) + GetBastionHostIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + public_ip_address_id: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("name", name) + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -11325,9 +15244,36 @@ def __init__(__self__, *, :param str principal_id: The Principal ID of the AzureAD Service Principal. :param str tenant_id: The Tenant ID for this AzureAD Service Principal. """ - pulumi.set(__self__, "ledger_role_name", ledger_role_name) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) + GetConfidentialLedgerAzureadBasedServicePrincipalResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + ledger_role_name=ledger_role_name, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ledger_role_name: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ledger_role_name is None and 'ledgerRoleName' in kwargs: + ledger_role_name = kwargs['ledgerRoleName'] + if ledger_role_name is None: + raise TypeError("Missing 'ledger_role_name' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("ledger_role_name", ledger_role_name) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="ledgerRoleName") @@ -11363,8 +15309,29 @@ def __init__(__self__, *, :param str ledger_role_name: The Ledger Role to grant this Certificate Security Principal. :param str pem_public_key: The public key, in PEM format, of the certificate used by this identity to authenticate with the Confidential Ledger. """ - pulumi.set(__self__, "ledger_role_name", ledger_role_name) - pulumi.set(__self__, "pem_public_key", pem_public_key) + GetConfidentialLedgerCertificateBasedSecurityPrincipalResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + ledger_role_name=ledger_role_name, + pem_public_key=pem_public_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ledger_role_name: Optional[str] = None, + pem_public_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ledger_role_name is None and 'ledgerRoleName' in kwargs: + ledger_role_name = kwargs['ledgerRoleName'] + if ledger_role_name is None: + raise TypeError("Missing 'ledger_role_name' argument") + if pem_public_key is None and 'pemPublicKey' in kwargs: + pem_public_key = kwargs['pemPublicKey'] + if pem_public_key is None: + raise TypeError("Missing 'pem_public_key' argument") + + _setter("ledger_role_name", ledger_role_name) + _setter("pem_public_key", pem_public_key) @property @pulumi.getter(name="ledgerRoleName") @@ -11396,10 +15363,41 @@ def __init__(__self__, *, :param str tenant_id: The ID of the Tenant the Service Principal is assigned in. :param str type: The type of Managed Service Identity that is configured on this Disk Encryption Set. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetDiskEncryptionSetIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -11449,11 +15447,46 @@ def __init__(__self__, *, :param str managed_disk_id: the ID of the Managed Disk used as the Data Disk Image. :param int size_gb: the size of this Data Disk in GB. """ - pulumi.set(__self__, "blob_uri", blob_uri) - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "lun", lun) - pulumi.set(__self__, "managed_disk_id", managed_disk_id) - pulumi.set(__self__, "size_gb", size_gb) + GetImageDataDiskResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_uri=blob_uri, + caching=caching, + lun=lun, + managed_disk_id=managed_disk_id, + size_gb=size_gb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_uri: Optional[str] = None, + caching: Optional[str] = None, + lun: Optional[int] = None, + managed_disk_id: Optional[str] = None, + size_gb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_uri is None and 'blobUri' in kwargs: + blob_uri = kwargs['blobUri'] + if blob_uri is None: + raise TypeError("Missing 'blob_uri' argument") + if caching is None: + raise TypeError("Missing 'caching' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if managed_disk_id is None: + raise TypeError("Missing 'managed_disk_id' argument") + if size_gb is None and 'sizeGb' in kwargs: + size_gb = kwargs['sizeGb'] + if size_gb is None: + raise TypeError("Missing 'size_gb' argument") + + _setter("blob_uri", blob_uri) + _setter("caching", caching) + _setter("lun", lun) + _setter("managed_disk_id", managed_disk_id) + _setter("size_gb", size_gb) @property @pulumi.getter(name="blobUri") @@ -11513,12 +15546,55 @@ def __init__(__self__, *, :param str os_type: the type of Operating System used on the OS Disk. such as `Linux` or `Windows`. :param int size_gb: the size of this Data Disk in GB. """ - pulumi.set(__self__, "blob_uri", blob_uri) - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "managed_disk_id", managed_disk_id) - pulumi.set(__self__, "os_state", os_state) - pulumi.set(__self__, "os_type", os_type) - pulumi.set(__self__, "size_gb", size_gb) + GetImageOsDiskResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_uri=blob_uri, + caching=caching, + managed_disk_id=managed_disk_id, + os_state=os_state, + os_type=os_type, + size_gb=size_gb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_uri: Optional[str] = None, + caching: Optional[str] = None, + managed_disk_id: Optional[str] = None, + os_state: Optional[str] = None, + os_type: Optional[str] = None, + size_gb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_uri is None and 'blobUri' in kwargs: + blob_uri = kwargs['blobUri'] + if blob_uri is None: + raise TypeError("Missing 'blob_uri' argument") + if caching is None: + raise TypeError("Missing 'caching' argument") + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if managed_disk_id is None: + raise TypeError("Missing 'managed_disk_id' argument") + if os_state is None and 'osState' in kwargs: + os_state = kwargs['osState'] + if os_state is None: + raise TypeError("Missing 'os_state' argument") + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if os_type is None: + raise TypeError("Missing 'os_type' argument") + if size_gb is None and 'sizeGb' in kwargs: + size_gb = kwargs['sizeGb'] + if size_gb is None: + raise TypeError("Missing 'size_gb' argument") + + _setter("blob_uri", blob_uri) + _setter("caching", caching) + _setter("managed_disk_id", managed_disk_id) + _setter("os_state", os_state) + _setter("os_type", os_type) + _setter("size_gb", size_gb) @property @pulumi.getter(name="blobUri") @@ -11586,12 +15662,51 @@ def __init__(__self__, *, :param Mapping[str, str] tags: A mapping of tags assigned to the Image. :param bool zone_resilient: Is zone resiliency enabled? """ - pulumi.set(__self__, "data_disks", data_disks) - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "os_disks", os_disks) - pulumi.set(__self__, "tags", tags) - pulumi.set(__self__, "zone_resilient", zone_resilient) + GetImagesImageResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_disks=data_disks, + location=location, + name=name, + os_disks=os_disks, + tags=tags, + zone_resilient=zone_resilient, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_disks: Optional[Sequence['outputs.GetImagesImageDataDiskResult']] = None, + location: Optional[str] = None, + name: Optional[str] = None, + os_disks: Optional[Sequence['outputs.GetImagesImageOsDiskResult']] = None, + tags: Optional[Mapping[str, str]] = None, + zone_resilient: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_disks is None and 'dataDisks' in kwargs: + data_disks = kwargs['dataDisks'] + if data_disks is None: + raise TypeError("Missing 'data_disks' argument") + if location is None: + raise TypeError("Missing 'location' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if os_disks is None and 'osDisks' in kwargs: + os_disks = kwargs['osDisks'] + if os_disks is None: + raise TypeError("Missing 'os_disks' argument") + if tags is None: + raise TypeError("Missing 'tags' argument") + if zone_resilient is None and 'zoneResilient' in kwargs: + zone_resilient = kwargs['zoneResilient'] + if zone_resilient is None: + raise TypeError("Missing 'zone_resilient' argument") + + _setter("data_disks", data_disks) + _setter("location", location) + _setter("name", name) + _setter("os_disks", os_disks) + _setter("tags", tags) + _setter("zone_resilient", zone_resilient) @property @pulumi.getter(name="dataDisks") @@ -11657,11 +15772,46 @@ def __init__(__self__, *, :param str managed_disk_id: the ID of the Managed Disk used as the Data Disk Image. :param int size_gb: the size of this Data Disk in GB. """ - pulumi.set(__self__, "blob_uri", blob_uri) - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "lun", lun) - pulumi.set(__self__, "managed_disk_id", managed_disk_id) - pulumi.set(__self__, "size_gb", size_gb) + GetImagesImageDataDiskResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_uri=blob_uri, + caching=caching, + lun=lun, + managed_disk_id=managed_disk_id, + size_gb=size_gb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_uri: Optional[str] = None, + caching: Optional[str] = None, + lun: Optional[int] = None, + managed_disk_id: Optional[str] = None, + size_gb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_uri is None and 'blobUri' in kwargs: + blob_uri = kwargs['blobUri'] + if blob_uri is None: + raise TypeError("Missing 'blob_uri' argument") + if caching is None: + raise TypeError("Missing 'caching' argument") + if lun is None: + raise TypeError("Missing 'lun' argument") + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if managed_disk_id is None: + raise TypeError("Missing 'managed_disk_id' argument") + if size_gb is None and 'sizeGb' in kwargs: + size_gb = kwargs['sizeGb'] + if size_gb is None: + raise TypeError("Missing 'size_gb' argument") + + _setter("blob_uri", blob_uri) + _setter("caching", caching) + _setter("lun", lun) + _setter("managed_disk_id", managed_disk_id) + _setter("size_gb", size_gb) @property @pulumi.getter(name="blobUri") @@ -11723,13 +15873,62 @@ def __init__(__self__, *, :param str os_type: the type of Operating System used on the OS Disk. :param int size_gb: the size of this Data Disk in GB. """ - pulumi.set(__self__, "blob_uri", blob_uri) - pulumi.set(__self__, "caching", caching) - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) - pulumi.set(__self__, "managed_disk_id", managed_disk_id) - pulumi.set(__self__, "os_state", os_state) - pulumi.set(__self__, "os_type", os_type) - pulumi.set(__self__, "size_gb", size_gb) + GetImagesImageOsDiskResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_uri=blob_uri, + caching=caching, + disk_encryption_set_id=disk_encryption_set_id, + managed_disk_id=managed_disk_id, + os_state=os_state, + os_type=os_type, + size_gb=size_gb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_uri: Optional[str] = None, + caching: Optional[str] = None, + disk_encryption_set_id: Optional[str] = None, + managed_disk_id: Optional[str] = None, + os_state: Optional[str] = None, + os_type: Optional[str] = None, + size_gb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_uri is None and 'blobUri' in kwargs: + blob_uri = kwargs['blobUri'] + if blob_uri is None: + raise TypeError("Missing 'blob_uri' argument") + if caching is None: + raise TypeError("Missing 'caching' argument") + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if disk_encryption_set_id is None: + raise TypeError("Missing 'disk_encryption_set_id' argument") + if managed_disk_id is None and 'managedDiskId' in kwargs: + managed_disk_id = kwargs['managedDiskId'] + if managed_disk_id is None: + raise TypeError("Missing 'managed_disk_id' argument") + if os_state is None and 'osState' in kwargs: + os_state = kwargs['osState'] + if os_state is None: + raise TypeError("Missing 'os_state' argument") + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if os_type is None: + raise TypeError("Missing 'os_type' argument") + if size_gb is None and 'sizeGb' in kwargs: + size_gb = kwargs['sizeGb'] + if size_gb is None: + raise TypeError("Missing 'size_gb' argument") + + _setter("blob_uri", blob_uri) + _setter("caching", caching) + _setter("disk_encryption_set_id", disk_encryption_set_id) + _setter("managed_disk_id", managed_disk_id) + _setter("os_state", os_state) + _setter("os_type", os_type) + _setter("size_gb", size_gb) @property @pulumi.getter(name="blobUri") @@ -11798,9 +15997,34 @@ def __init__(__self__, *, :param Sequence['GetManagedDiskEncryptionSettingDiskEncryptionKeyArgs'] disk_encryption_keys: A `disk_encryption_key` block as defined above. :param Sequence['GetManagedDiskEncryptionSettingKeyEncryptionKeyArgs'] key_encryption_keys: A `key_encryption_key` block as defined below. """ - pulumi.set(__self__, "disk_encryption_keys", disk_encryption_keys) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "key_encryption_keys", key_encryption_keys) + GetManagedDiskEncryptionSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_encryption_keys=disk_encryption_keys, + enabled=enabled, + key_encryption_keys=key_encryption_keys, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_encryption_keys: Optional[Sequence['outputs.GetManagedDiskEncryptionSettingDiskEncryptionKeyResult']] = None, + enabled: Optional[bool] = None, + key_encryption_keys: Optional[Sequence['outputs.GetManagedDiskEncryptionSettingKeyEncryptionKeyResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_encryption_keys is None and 'diskEncryptionKeys' in kwargs: + disk_encryption_keys = kwargs['diskEncryptionKeys'] + if disk_encryption_keys is None: + raise TypeError("Missing 'disk_encryption_keys' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if key_encryption_keys is None and 'keyEncryptionKeys' in kwargs: + key_encryption_keys = kwargs['keyEncryptionKeys'] + if key_encryption_keys is None: + raise TypeError("Missing 'key_encryption_keys' argument") + + _setter("disk_encryption_keys", disk_encryption_keys) + _setter("enabled", enabled) + _setter("key_encryption_keys", key_encryption_keys) @property @pulumi.getter(name="diskEncryptionKeys") @@ -11833,8 +16057,29 @@ def __init__(__self__, *, :param str secret_url: The URL to the Key Vault Secret used as the Disk Encryption Key. :param str source_vault_id: The ID of the source Key Vault. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + GetManagedDiskEncryptionSettingDiskEncryptionKeyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -11862,8 +16107,29 @@ def __init__(__self__, *, :param str key_url: The URL to the Key Vault Key used as the Key Encryption Key. :param str source_vault_id: The ID of the source Key Vault. """ - pulumi.set(__self__, "key_url", key_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + GetManagedDiskEncryptionSettingKeyEncryptionKeyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_url=key_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_url is None and 'keyUrl' in kwargs: + key_url = kwargs['keyUrl'] + if key_url is None: + raise TypeError("Missing 'key_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("key_url", key_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="keyUrl") @@ -11891,8 +16157,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: The list of User Assigned Managed Identity IDs assigned to this Orchestrated Virtual Machine Scale Set. :param str type: The Type of IP Tag. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + GetOrchestratedVirtualMachineScaleSetIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -11930,13 +16215,60 @@ def __init__(__self__, *, :param str network_security_group_id: The identifier for the network security group. :param bool primary: If this ip_configuration is the primary one. """ - pulumi.set(__self__, "accelerated_networking_enabled", accelerated_networking_enabled) - pulumi.set(__self__, "dns_servers", dns_servers) - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "ip_forwarding_enabled", ip_forwarding_enabled) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "network_security_group_id", network_security_group_id) - pulumi.set(__self__, "primary", primary) + GetOrchestratedVirtualMachineScaleSetNetworkInterfaceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + accelerated_networking_enabled=accelerated_networking_enabled, + dns_servers=dns_servers, + ip_configurations=ip_configurations, + ip_forwarding_enabled=ip_forwarding_enabled, + name=name, + network_security_group_id=network_security_group_id, + primary=primary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + accelerated_networking_enabled: Optional[bool] = None, + dns_servers: Optional[Sequence[str]] = None, + ip_configurations: Optional[Sequence['outputs.GetOrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationResult']] = None, + ip_forwarding_enabled: Optional[bool] = None, + name: Optional[str] = None, + network_security_group_id: Optional[str] = None, + primary: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if accelerated_networking_enabled is None and 'acceleratedNetworkingEnabled' in kwargs: + accelerated_networking_enabled = kwargs['acceleratedNetworkingEnabled'] + if accelerated_networking_enabled is None: + raise TypeError("Missing 'accelerated_networking_enabled' argument") + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if dns_servers is None: + raise TypeError("Missing 'dns_servers' argument") + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if ip_forwarding_enabled is None and 'ipForwardingEnabled' in kwargs: + ip_forwarding_enabled = kwargs['ipForwardingEnabled'] + if ip_forwarding_enabled is None: + raise TypeError("Missing 'ip_forwarding_enabled' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + if network_security_group_id is None: + raise TypeError("Missing 'network_security_group_id' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + + _setter("accelerated_networking_enabled", accelerated_networking_enabled) + _setter("dns_servers", dns_servers) + _setter("ip_configurations", ip_configurations) + _setter("ip_forwarding_enabled", ip_forwarding_enabled) + _setter("name", name) + _setter("network_security_group_id", network_security_group_id) + _setter("primary", primary) @property @pulumi.getter(name="acceleratedNetworkingEnabled") @@ -12018,15 +16350,72 @@ def __init__(__self__, *, :param str subnet_id: The the identifier of the subnet. :param str version: The Internet Protocol Version of the public IP address. """ - pulumi.set(__self__, "application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) - pulumi.set(__self__, "application_security_group_ids", application_security_group_ids) - pulumi.set(__self__, "load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) - pulumi.set(__self__, "load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "primary", primary) - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) - pulumi.set(__self__, "subnet_id", subnet_id) - pulumi.set(__self__, "version", version) + GetOrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_gateway_backend_address_pool_ids=application_gateway_backend_address_pool_ids, + application_security_group_ids=application_security_group_ids, + load_balancer_backend_address_pool_ids=load_balancer_backend_address_pool_ids, + load_balancer_inbound_nat_rules_ids=load_balancer_inbound_nat_rules_ids, + name=name, + primary=primary, + public_ip_addresses=public_ip_addresses, + subnet_id=subnet_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_gateway_backend_address_pool_ids: Optional[Sequence[str]] = None, + application_security_group_ids: Optional[Sequence[str]] = None, + load_balancer_backend_address_pool_ids: Optional[Sequence[str]] = None, + load_balancer_inbound_nat_rules_ids: Optional[Sequence[str]] = None, + name: Optional[str] = None, + primary: Optional[bool] = None, + public_ip_addresses: Optional[Sequence['outputs.GetOrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressResult']] = None, + subnet_id: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_gateway_backend_address_pool_ids is None and 'applicationGatewayBackendAddressPoolIds' in kwargs: + application_gateway_backend_address_pool_ids = kwargs['applicationGatewayBackendAddressPoolIds'] + if application_gateway_backend_address_pool_ids is None: + raise TypeError("Missing 'application_gateway_backend_address_pool_ids' argument") + if application_security_group_ids is None and 'applicationSecurityGroupIds' in kwargs: + application_security_group_ids = kwargs['applicationSecurityGroupIds'] + if application_security_group_ids is None: + raise TypeError("Missing 'application_security_group_ids' argument") + if load_balancer_backend_address_pool_ids is None and 'loadBalancerBackendAddressPoolIds' in kwargs: + load_balancer_backend_address_pool_ids = kwargs['loadBalancerBackendAddressPoolIds'] + if load_balancer_backend_address_pool_ids is None: + raise TypeError("Missing 'load_balancer_backend_address_pool_ids' argument") + if load_balancer_inbound_nat_rules_ids is None and 'loadBalancerInboundNatRulesIds' in kwargs: + load_balancer_inbound_nat_rules_ids = kwargs['loadBalancerInboundNatRulesIds'] + if load_balancer_inbound_nat_rules_ids is None: + raise TypeError("Missing 'load_balancer_inbound_nat_rules_ids' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if public_ip_addresses is None: + raise TypeError("Missing 'public_ip_addresses' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) + _setter("application_security_group_ids", application_security_group_ids) + _setter("load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) + _setter("load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) + _setter("name", name) + _setter("primary", primary) + _setter("public_ip_addresses", public_ip_addresses) + _setter("subnet_id", subnet_id) + _setter("version", version) @property @pulumi.getter(name="applicationGatewayBackendAddressPoolIds") @@ -12118,12 +16507,53 @@ def __init__(__self__, *, :param str public_ip_prefix_id: The ID of the public IP prefix. :param str version: The Internet Protocol Version of the public IP address. """ - pulumi.set(__self__, "domain_name_label", domain_name_label) - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) - pulumi.set(__self__, "ip_tags", ip_tags) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) - pulumi.set(__self__, "version", version) + GetOrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name_label=domain_name_label, + idle_timeout_in_minutes=idle_timeout_in_minutes, + ip_tags=ip_tags, + name=name, + public_ip_prefix_id=public_ip_prefix_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name_label: Optional[str] = None, + idle_timeout_in_minutes: Optional[int] = None, + ip_tags: Optional[Sequence['outputs.GetOrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTagResult']] = None, + name: Optional[str] = None, + public_ip_prefix_id: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name_label is None and 'domainNameLabel' in kwargs: + domain_name_label = kwargs['domainNameLabel'] + if domain_name_label is None: + raise TypeError("Missing 'domain_name_label' argument") + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if idle_timeout_in_minutes is None: + raise TypeError("Missing 'idle_timeout_in_minutes' argument") + if ip_tags is None and 'ipTags' in kwargs: + ip_tags = kwargs['ipTags'] + if ip_tags is None: + raise TypeError("Missing 'ip_tags' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + if public_ip_prefix_id is None: + raise TypeError("Missing 'public_ip_prefix_id' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("domain_name_label", domain_name_label) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("ip_tags", ip_tags) + _setter("name", name) + _setter("public_ip_prefix_id", public_ip_prefix_id) + _setter("version", version) @property @pulumi.getter(name="domainNameLabel") @@ -12183,8 +16613,25 @@ def __init__(__self__, *, :param str tag: The IP Tag associated with the Public IP. :param str type: The Type of IP Tag. """ - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "type", type) + GetOrchestratedVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTagResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + tag=tag, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tag: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag is None: + raise TypeError("Missing 'tag' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("tag", tag) + _setter("type", type) @property @pulumi.getter @@ -12214,9 +16661,30 @@ def __init__(__self__, *, :param str publisher: (Optional) The Purchase Plan Publisher for this Gallery Image. :param str sku: The Name of the SKU for this Gallery Image. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) + GetSharedImageIdentifierResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) @property @pulumi.getter @@ -12254,9 +16722,30 @@ def __init__(__self__, *, :param str product: (Optional) The Purchase Plan Product for this Gallery Image. :param str publisher: (Optional) The Purchase Plan Publisher for this Gallery Image. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + GetSharedImagePurchasePlanResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + product: Optional[str] = None, + publisher: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) @property @pulumi.getter @@ -12298,9 +16787,34 @@ def __init__(__self__, *, :param int regional_replica_count: The number of replicas of the Image Version to be created per region. :param str storage_account_type: The storage account type for the image version. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "regional_replica_count", regional_replica_count) - pulumi.set(__self__, "storage_account_type", storage_account_type) + GetSharedImageVersionTargetRegionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + regional_replica_count=regional_replica_count, + storage_account_type=storage_account_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + regional_replica_count: Optional[int] = None, + storage_account_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if regional_replica_count is None and 'regionalReplicaCount' in kwargs: + regional_replica_count = kwargs['regionalReplicaCount'] + if regional_replica_count is None: + raise TypeError("Missing 'regional_replica_count' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + + _setter("name", name) + _setter("regional_replica_count", regional_replica_count) + _setter("storage_account_type", storage_account_type) @property @pulumi.getter @@ -12350,13 +16864,56 @@ def __init__(__self__, *, :param Mapping[str, str] tags: A mapping of tags assigned to the Shared Image. :param Sequence['GetSharedImageVersionsImageTargetRegionArgs'] target_regions: One or more `target_region` blocks as documented below. """ - pulumi.set(__self__, "exclude_from_latest", exclude_from_latest) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "managed_image_id", managed_image_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "tags", tags) - pulumi.set(__self__, "target_regions", target_regions) + GetSharedImageVersionsImageResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + exclude_from_latest=exclude_from_latest, + id=id, + location=location, + managed_image_id=managed_image_id, + name=name, + tags=tags, + target_regions=target_regions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exclude_from_latest: Optional[bool] = None, + id: Optional[str] = None, + location: Optional[str] = None, + managed_image_id: Optional[str] = None, + name: Optional[str] = None, + tags: Optional[Mapping[str, str]] = None, + target_regions: Optional[Sequence['outputs.GetSharedImageVersionsImageTargetRegionResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exclude_from_latest is None and 'excludeFromLatest' in kwargs: + exclude_from_latest = kwargs['excludeFromLatest'] + if exclude_from_latest is None: + raise TypeError("Missing 'exclude_from_latest' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if location is None: + raise TypeError("Missing 'location' argument") + if managed_image_id is None and 'managedImageId' in kwargs: + managed_image_id = kwargs['managedImageId'] + if managed_image_id is None: + raise TypeError("Missing 'managed_image_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if tags is None: + raise TypeError("Missing 'tags' argument") + if target_regions is None and 'targetRegions' in kwargs: + target_regions = kwargs['targetRegions'] + if target_regions is None: + raise TypeError("Missing 'target_regions' argument") + + _setter("exclude_from_latest", exclude_from_latest) + _setter("id", id) + _setter("location", location) + _setter("managed_image_id", managed_image_id) + _setter("name", name) + _setter("tags", tags) + _setter("target_regions", target_regions) @property @pulumi.getter(name="excludeFromLatest") @@ -12426,9 +16983,34 @@ def __init__(__self__, *, :param int regional_replica_count: The number of replicas of the Image Version to be created per region. :param str storage_account_type: The storage account type for the image version. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "regional_replica_count", regional_replica_count) - pulumi.set(__self__, "storage_account_type", storage_account_type) + GetSharedImageVersionsImageTargetRegionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + regional_replica_count=regional_replica_count, + storage_account_type=storage_account_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + regional_replica_count: Optional[int] = None, + storage_account_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if regional_replica_count is None and 'regionalReplicaCount' in kwargs: + regional_replica_count = kwargs['regionalReplicaCount'] + if regional_replica_count is None: + raise TypeError("Missing 'regional_replica_count' argument") + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_account_type is None: + raise TypeError("Missing 'storage_account_type' argument") + + _setter("name", name) + _setter("regional_replica_count", regional_replica_count) + _setter("storage_account_type", storage_account_type) @property @pulumi.getter @@ -12461,9 +17043,34 @@ def __init__(__self__, *, disk_encryption_keys: Sequence['outputs.GetSnapshotEncryptionSettingDiskEncryptionKeyResult'], enabled: bool, key_encryption_keys: Sequence['outputs.GetSnapshotEncryptionSettingKeyEncryptionKeyResult']): - pulumi.set(__self__, "disk_encryption_keys", disk_encryption_keys) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "key_encryption_keys", key_encryption_keys) + GetSnapshotEncryptionSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_encryption_keys=disk_encryption_keys, + enabled=enabled, + key_encryption_keys=key_encryption_keys, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_encryption_keys: Optional[Sequence['outputs.GetSnapshotEncryptionSettingDiskEncryptionKeyResult']] = None, + enabled: Optional[bool] = None, + key_encryption_keys: Optional[Sequence['outputs.GetSnapshotEncryptionSettingKeyEncryptionKeyResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_encryption_keys is None and 'diskEncryptionKeys' in kwargs: + disk_encryption_keys = kwargs['diskEncryptionKeys'] + if disk_encryption_keys is None: + raise TypeError("Missing 'disk_encryption_keys' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if key_encryption_keys is None and 'keyEncryptionKeys' in kwargs: + key_encryption_keys = kwargs['keyEncryptionKeys'] + if key_encryption_keys is None: + raise TypeError("Missing 'key_encryption_keys' argument") + + _setter("disk_encryption_keys", disk_encryption_keys) + _setter("enabled", enabled) + _setter("key_encryption_keys", key_encryption_keys) @property @pulumi.getter(name="diskEncryptionKeys") @@ -12486,8 +17093,29 @@ class GetSnapshotEncryptionSettingDiskEncryptionKeyResult(dict): def __init__(__self__, *, secret_url: str, source_vault_id: str): - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + GetSnapshotEncryptionSettingDiskEncryptionKeyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("secret_url", secret_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="secretUrl") @@ -12505,8 +17133,29 @@ class GetSnapshotEncryptionSettingKeyEncryptionKeyResult(dict): def __init__(__self__, *, key_url: str, source_vault_id: str): - pulumi.set(__self__, "key_url", key_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + GetSnapshotEncryptionSettingKeyEncryptionKeyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_url=key_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_url is None and 'keyUrl' in kwargs: + key_url = kwargs['keyUrl'] + if key_url is None: + raise TypeError("Missing 'key_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("key_url", key_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="keyUrl") @@ -12532,10 +17181,41 @@ def __init__(__self__, *, :param str tenant_id: The ID of the Tenant of the System Managed Service Principal assigned to the Virtual Machine. :param str type: The identity type of the Managed Identity assigned to the Virtual Machine. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetVirtualMachineIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -12583,10 +17263,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Virtual Machine Scale Set. :param str type: The Type of IP Tag. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetVirtualMachineScaleSetIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -12648,17 +17359,88 @@ def __init__(__self__, *, :param str virtual_machine_id: The unique ID of the virtual machine. :param str zone: The zones of the virtual machine. """ - pulumi.set(__self__, "computer_name", computer_name) - pulumi.set(__self__, "instance_id", instance_id) - pulumi.set(__self__, "latest_model_applied", latest_model_applied) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "power_state", power_state) - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "private_ip_addresses", private_ip_addresses) - pulumi.set(__self__, "public_ip_address", public_ip_address) - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) - pulumi.set(__self__, "zone", zone) + GetVirtualMachineScaleSetInstanceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + computer_name=computer_name, + instance_id=instance_id, + latest_model_applied=latest_model_applied, + name=name, + power_state=power_state, + private_ip_address=private_ip_address, + private_ip_addresses=private_ip_addresses, + public_ip_address=public_ip_address, + public_ip_addresses=public_ip_addresses, + virtual_machine_id=virtual_machine_id, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + computer_name: Optional[str] = None, + instance_id: Optional[str] = None, + latest_model_applied: Optional[bool] = None, + name: Optional[str] = None, + power_state: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_addresses: Optional[Sequence[str]] = None, + public_ip_address: Optional[str] = None, + public_ip_addresses: Optional[Sequence[str]] = None, + virtual_machine_id: Optional[str] = None, + zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if computer_name is None and 'computerName' in kwargs: + computer_name = kwargs['computerName'] + if computer_name is None: + raise TypeError("Missing 'computer_name' argument") + if instance_id is None and 'instanceId' in kwargs: + instance_id = kwargs['instanceId'] + if instance_id is None: + raise TypeError("Missing 'instance_id' argument") + if latest_model_applied is None and 'latestModelApplied' in kwargs: + latest_model_applied = kwargs['latestModelApplied'] + if latest_model_applied is None: + raise TypeError("Missing 'latest_model_applied' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if power_state is None and 'powerState' in kwargs: + power_state = kwargs['powerState'] + if power_state is None: + raise TypeError("Missing 'power_state' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if private_ip_addresses is None and 'privateIpAddresses' in kwargs: + private_ip_addresses = kwargs['privateIpAddresses'] + if private_ip_addresses is None: + raise TypeError("Missing 'private_ip_addresses' argument") + if public_ip_address is None and 'publicIpAddress' in kwargs: + public_ip_address = kwargs['publicIpAddress'] + if public_ip_address is None: + raise TypeError("Missing 'public_ip_address' argument") + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if public_ip_addresses is None: + raise TypeError("Missing 'public_ip_addresses' argument") + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_id is None: + raise TypeError("Missing 'virtual_machine_id' argument") + if zone is None: + raise TypeError("Missing 'zone' argument") + + _setter("computer_name", computer_name) + _setter("instance_id", instance_id) + _setter("latest_model_applied", latest_model_applied) + _setter("name", name) + _setter("power_state", power_state) + _setter("private_ip_address", private_ip_address) + _setter("private_ip_addresses", private_ip_addresses) + _setter("public_ip_address", public_ip_address) + _setter("public_ip_addresses", public_ip_addresses) + _setter("virtual_machine_id", virtual_machine_id) + _setter("zone", zone) @property @pulumi.getter(name="computerName") @@ -12768,13 +17550,60 @@ def __init__(__self__, *, :param str network_security_group_id: The identifier for the network security group. :param bool primary: If this ip_configuration is the primary one. """ - pulumi.set(__self__, "dns_servers", dns_servers) - pulumi.set(__self__, "enable_accelerated_networking", enable_accelerated_networking) - pulumi.set(__self__, "enable_ip_forwarding", enable_ip_forwarding) - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "network_security_group_id", network_security_group_id) - pulumi.set(__self__, "primary", primary) + GetVirtualMachineScaleSetNetworkInterfaceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_servers=dns_servers, + enable_accelerated_networking=enable_accelerated_networking, + enable_ip_forwarding=enable_ip_forwarding, + ip_configurations=ip_configurations, + name=name, + network_security_group_id=network_security_group_id, + primary=primary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_servers: Optional[Sequence[str]] = None, + enable_accelerated_networking: Optional[bool] = None, + enable_ip_forwarding: Optional[bool] = None, + ip_configurations: Optional[Sequence['outputs.GetVirtualMachineScaleSetNetworkInterfaceIpConfigurationResult']] = None, + name: Optional[str] = None, + network_security_group_id: Optional[str] = None, + primary: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if dns_servers is None: + raise TypeError("Missing 'dns_servers' argument") + if enable_accelerated_networking is None and 'enableAcceleratedNetworking' in kwargs: + enable_accelerated_networking = kwargs['enableAcceleratedNetworking'] + if enable_accelerated_networking is None: + raise TypeError("Missing 'enable_accelerated_networking' argument") + if enable_ip_forwarding is None and 'enableIpForwarding' in kwargs: + enable_ip_forwarding = kwargs['enableIpForwarding'] + if enable_ip_forwarding is None: + raise TypeError("Missing 'enable_ip_forwarding' argument") + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + if network_security_group_id is None: + raise TypeError("Missing 'network_security_group_id' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + + _setter("dns_servers", dns_servers) + _setter("enable_accelerated_networking", enable_accelerated_networking) + _setter("enable_ip_forwarding", enable_ip_forwarding) + _setter("ip_configurations", ip_configurations) + _setter("name", name) + _setter("network_security_group_id", network_security_group_id) + _setter("primary", primary) @property @pulumi.getter(name="dnsServers") @@ -12856,15 +17685,72 @@ def __init__(__self__, *, :param str subnet_id: The the identifier of the subnet. :param str version: The Internet Protocol Version of the public IP address. """ - pulumi.set(__self__, "application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) - pulumi.set(__self__, "application_security_group_ids", application_security_group_ids) - pulumi.set(__self__, "load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) - pulumi.set(__self__, "load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "primary", primary) - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) - pulumi.set(__self__, "subnet_id", subnet_id) - pulumi.set(__self__, "version", version) + GetVirtualMachineScaleSetNetworkInterfaceIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_gateway_backend_address_pool_ids=application_gateway_backend_address_pool_ids, + application_security_group_ids=application_security_group_ids, + load_balancer_backend_address_pool_ids=load_balancer_backend_address_pool_ids, + load_balancer_inbound_nat_rules_ids=load_balancer_inbound_nat_rules_ids, + name=name, + primary=primary, + public_ip_addresses=public_ip_addresses, + subnet_id=subnet_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_gateway_backend_address_pool_ids: Optional[Sequence[str]] = None, + application_security_group_ids: Optional[Sequence[str]] = None, + load_balancer_backend_address_pool_ids: Optional[Sequence[str]] = None, + load_balancer_inbound_nat_rules_ids: Optional[Sequence[str]] = None, + name: Optional[str] = None, + primary: Optional[bool] = None, + public_ip_addresses: Optional[Sequence['outputs.GetVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressResult']] = None, + subnet_id: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_gateway_backend_address_pool_ids is None and 'applicationGatewayBackendAddressPoolIds' in kwargs: + application_gateway_backend_address_pool_ids = kwargs['applicationGatewayBackendAddressPoolIds'] + if application_gateway_backend_address_pool_ids is None: + raise TypeError("Missing 'application_gateway_backend_address_pool_ids' argument") + if application_security_group_ids is None and 'applicationSecurityGroupIds' in kwargs: + application_security_group_ids = kwargs['applicationSecurityGroupIds'] + if application_security_group_ids is None: + raise TypeError("Missing 'application_security_group_ids' argument") + if load_balancer_backend_address_pool_ids is None and 'loadBalancerBackendAddressPoolIds' in kwargs: + load_balancer_backend_address_pool_ids = kwargs['loadBalancerBackendAddressPoolIds'] + if load_balancer_backend_address_pool_ids is None: + raise TypeError("Missing 'load_balancer_backend_address_pool_ids' argument") + if load_balancer_inbound_nat_rules_ids is None and 'loadBalancerInboundNatRulesIds' in kwargs: + load_balancer_inbound_nat_rules_ids = kwargs['loadBalancerInboundNatRulesIds'] + if load_balancer_inbound_nat_rules_ids is None: + raise TypeError("Missing 'load_balancer_inbound_nat_rules_ids' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if public_ip_addresses is None: + raise TypeError("Missing 'public_ip_addresses' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("application_gateway_backend_address_pool_ids", application_gateway_backend_address_pool_ids) + _setter("application_security_group_ids", application_security_group_ids) + _setter("load_balancer_backend_address_pool_ids", load_balancer_backend_address_pool_ids) + _setter("load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) + _setter("name", name) + _setter("primary", primary) + _setter("public_ip_addresses", public_ip_addresses) + _setter("subnet_id", subnet_id) + _setter("version", version) @property @pulumi.getter(name="applicationGatewayBackendAddressPoolIds") @@ -12956,12 +17842,53 @@ def __init__(__self__, *, :param str public_ip_prefix_id: The ID of the public IP prefix. :param str version: The Internet Protocol Version of the public IP address. """ - pulumi.set(__self__, "domain_name_label", domain_name_label) - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) - pulumi.set(__self__, "ip_tags", ip_tags) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) - pulumi.set(__self__, "version", version) + GetVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name_label=domain_name_label, + idle_timeout_in_minutes=idle_timeout_in_minutes, + ip_tags=ip_tags, + name=name, + public_ip_prefix_id=public_ip_prefix_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name_label: Optional[str] = None, + idle_timeout_in_minutes: Optional[int] = None, + ip_tags: Optional[Sequence['outputs.GetVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTagResult']] = None, + name: Optional[str] = None, + public_ip_prefix_id: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name_label is None and 'domainNameLabel' in kwargs: + domain_name_label = kwargs['domainNameLabel'] + if domain_name_label is None: + raise TypeError("Missing 'domain_name_label' argument") + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if idle_timeout_in_minutes is None: + raise TypeError("Missing 'idle_timeout_in_minutes' argument") + if ip_tags is None and 'ipTags' in kwargs: + ip_tags = kwargs['ipTags'] + if ip_tags is None: + raise TypeError("Missing 'ip_tags' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + if public_ip_prefix_id is None: + raise TypeError("Missing 'public_ip_prefix_id' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("domain_name_label", domain_name_label) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("ip_tags", ip_tags) + _setter("name", name) + _setter("public_ip_prefix_id", public_ip_prefix_id) + _setter("version", version) @property @pulumi.getter(name="domainNameLabel") @@ -13021,8 +17948,25 @@ def __init__(__self__, *, :param str tag: The IP Tag associated with the Public IP. :param str type: The Type of IP Tag. """ - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "type", type) + GetVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTagResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + tag=tag, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tag: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag is None: + raise TypeError("Missing 'tag' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("tag", tag) + _setter("type", type) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/compute/packet_capture.py b/sdk/python/pulumi_azure/compute/packet_capture.py index 07bf24ea9b..cb3febf02b 100644 --- a/sdk/python/pulumi_azure/compute/packet_capture.py +++ b/sdk/python/pulumi_azure/compute/packet_capture.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,19 +35,62 @@ def __init__(__self__, *, :param pulumi.Input[int] maximum_capture_duration_in_seconds: The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name to use for this Network Packet Capture. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "network_watcher_id", network_watcher_id) - pulumi.set(__self__, "storage_location", storage_location) - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + PacketCaptureArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_watcher_id=network_watcher_id, + storage_location=storage_location, + virtual_machine_id=virtual_machine_id, + filters=filters, + maximum_bytes_per_packet=maximum_bytes_per_packet, + maximum_bytes_per_session=maximum_bytes_per_session, + maximum_capture_duration_in_seconds=maximum_capture_duration_in_seconds, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_watcher_id: Optional[pulumi.Input[str]] = None, + storage_location: Optional[pulumi.Input['PacketCaptureStorageLocationArgs']] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + filters: Optional[pulumi.Input[Sequence[pulumi.Input['PacketCaptureFilterArgs']]]] = None, + maximum_bytes_per_packet: Optional[pulumi.Input[int]] = None, + maximum_bytes_per_session: Optional[pulumi.Input[int]] = None, + maximum_capture_duration_in_seconds: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_watcher_id is None and 'networkWatcherId' in kwargs: + network_watcher_id = kwargs['networkWatcherId'] + if network_watcher_id is None: + raise TypeError("Missing 'network_watcher_id' argument") + if storage_location is None and 'storageLocation' in kwargs: + storage_location = kwargs['storageLocation'] + if storage_location is None: + raise TypeError("Missing 'storage_location' argument") + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_id is None: + raise TypeError("Missing 'virtual_machine_id' argument") + if maximum_bytes_per_packet is None and 'maximumBytesPerPacket' in kwargs: + maximum_bytes_per_packet = kwargs['maximumBytesPerPacket'] + if maximum_bytes_per_session is None and 'maximumBytesPerSession' in kwargs: + maximum_bytes_per_session = kwargs['maximumBytesPerSession'] + if maximum_capture_duration_in_seconds is None and 'maximumCaptureDurationInSeconds' in kwargs: + maximum_capture_duration_in_seconds = kwargs['maximumCaptureDurationInSeconds'] + + _setter("network_watcher_id", network_watcher_id) + _setter("storage_location", storage_location) + _setter("virtual_machine_id", virtual_machine_id) if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) if maximum_bytes_per_packet is not None: - pulumi.set(__self__, "maximum_bytes_per_packet", maximum_bytes_per_packet) + _setter("maximum_bytes_per_packet", maximum_bytes_per_packet) if maximum_bytes_per_session is not None: - pulumi.set(__self__, "maximum_bytes_per_session", maximum_bytes_per_session) + _setter("maximum_bytes_per_session", maximum_bytes_per_session) if maximum_capture_duration_in_seconds is not None: - pulumi.set(__self__, "maximum_capture_duration_in_seconds", maximum_capture_duration_in_seconds) + _setter("maximum_capture_duration_in_seconds", maximum_capture_duration_in_seconds) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="networkWatcherId") @@ -168,22 +211,59 @@ def __init__(__self__, *, :param pulumi.Input['PacketCaptureStorageLocationArgs'] storage_location: A `storage_location` block as defined below. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_machine_id: The resource ID of the target Virtual Machine to capture packets from. Changing this forces a new resource to be created. """ + _PacketCaptureState._configure( + lambda key, value: pulumi.set(__self__, key, value), + filters=filters, + maximum_bytes_per_packet=maximum_bytes_per_packet, + maximum_bytes_per_session=maximum_bytes_per_session, + maximum_capture_duration_in_seconds=maximum_capture_duration_in_seconds, + name=name, + network_watcher_id=network_watcher_id, + storage_location=storage_location, + virtual_machine_id=virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filters: Optional[pulumi.Input[Sequence[pulumi.Input['PacketCaptureFilterArgs']]]] = None, + maximum_bytes_per_packet: Optional[pulumi.Input[int]] = None, + maximum_bytes_per_session: Optional[pulumi.Input[int]] = None, + maximum_capture_duration_in_seconds: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + network_watcher_id: Optional[pulumi.Input[str]] = None, + storage_location: Optional[pulumi.Input['PacketCaptureStorageLocationArgs']] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maximum_bytes_per_packet is None and 'maximumBytesPerPacket' in kwargs: + maximum_bytes_per_packet = kwargs['maximumBytesPerPacket'] + if maximum_bytes_per_session is None and 'maximumBytesPerSession' in kwargs: + maximum_bytes_per_session = kwargs['maximumBytesPerSession'] + if maximum_capture_duration_in_seconds is None and 'maximumCaptureDurationInSeconds' in kwargs: + maximum_capture_duration_in_seconds = kwargs['maximumCaptureDurationInSeconds'] + if network_watcher_id is None and 'networkWatcherId' in kwargs: + network_watcher_id = kwargs['networkWatcherId'] + if storage_location is None and 'storageLocation' in kwargs: + storage_location = kwargs['storageLocation'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) if maximum_bytes_per_packet is not None: - pulumi.set(__self__, "maximum_bytes_per_packet", maximum_bytes_per_packet) + _setter("maximum_bytes_per_packet", maximum_bytes_per_packet) if maximum_bytes_per_session is not None: - pulumi.set(__self__, "maximum_bytes_per_session", maximum_bytes_per_session) + _setter("maximum_bytes_per_session", maximum_bytes_per_session) if maximum_capture_duration_in_seconds is not None: - pulumi.set(__self__, "maximum_capture_duration_in_seconds", maximum_capture_duration_in_seconds) + _setter("maximum_capture_duration_in_seconds", maximum_capture_duration_in_seconds) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_watcher_id is not None: - pulumi.set(__self__, "network_watcher_id", network_watcher_id) + _setter("network_watcher_id", network_watcher_id) if storage_location is not None: - pulumi.set(__self__, "storage_location", storage_location) + _setter("storage_location", storage_location) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) @property @pulumi.getter @@ -491,6 +571,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PacketCaptureArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -521,6 +605,11 @@ def _internal_init(__self__, if network_watcher_id is None and not opts.urn: raise TypeError("Missing required property 'network_watcher_id'") __props__.__dict__["network_watcher_id"] = network_watcher_id + if storage_location is not None and not isinstance(storage_location, PacketCaptureStorageLocationArgs): + storage_location = storage_location or {} + def _setter(key, value): + storage_location[key] = value + PacketCaptureStorageLocationArgs._configure(_setter, **storage_location) if storage_location is None and not opts.urn: raise TypeError("Missing required property 'storage_location'") __props__.__dict__["storage_location"] = storage_location diff --git a/sdk/python/pulumi_azure/compute/scale_set.py b/sdk/python/pulumi_azure/compute/scale_set.py index a8952e0e30..4c10838595 100644 --- a/sdk/python/pulumi_azure/compute/scale_set.py +++ b/sdk/python/pulumi_azure/compute/scale_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -79,56 +79,169 @@ def __init__(__self__, *, > **Please Note**: Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). """ - pulumi.set(__self__, "network_profiles", network_profiles) - pulumi.set(__self__, "os_profile", os_profile) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "storage_profile_os_disk", storage_profile_os_disk) - pulumi.set(__self__, "upgrade_policy_mode", upgrade_policy_mode) + ScaleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_profiles=network_profiles, + os_profile=os_profile, + resource_group_name=resource_group_name, + sku=sku, + storage_profile_os_disk=storage_profile_os_disk, + upgrade_policy_mode=upgrade_policy_mode, + automatic_os_upgrade=automatic_os_upgrade, + boot_diagnostics=boot_diagnostics, + eviction_policy=eviction_policy, + extensions=extensions, + health_probe_id=health_probe_id, + identity=identity, + license_type=license_type, + location=location, + name=name, + os_profile_linux_config=os_profile_linux_config, + os_profile_secrets=os_profile_secrets, + os_profile_windows_config=os_profile_windows_config, + overprovision=overprovision, + plan=plan, + priority=priority, + proximity_placement_group_id=proximity_placement_group_id, + rolling_upgrade_policy=rolling_upgrade_policy, + single_placement_group=single_placement_group, + storage_profile_data_disks=storage_profile_data_disks, + storage_profile_image_reference=storage_profile_image_reference, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_profiles: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetNetworkProfileArgs']]]] = None, + os_profile: Optional[pulumi.Input['ScaleSetOsProfileArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['ScaleSetSkuArgs']] = None, + storage_profile_os_disk: Optional[pulumi.Input['ScaleSetStorageProfileOsDiskArgs']] = None, + upgrade_policy_mode: Optional[pulumi.Input[str]] = None, + automatic_os_upgrade: Optional[pulumi.Input[bool]] = None, + boot_diagnostics: Optional[pulumi.Input['ScaleSetBootDiagnosticsArgs']] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + extensions: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetExtensionArgs']]]] = None, + health_probe_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ScaleSetIdentityArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + os_profile_linux_config: Optional[pulumi.Input['ScaleSetOsProfileLinuxConfigArgs']] = None, + os_profile_secrets: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetOsProfileSecretArgs']]]] = None, + os_profile_windows_config: Optional[pulumi.Input['ScaleSetOsProfileWindowsConfigArgs']] = None, + overprovision: Optional[pulumi.Input[bool]] = None, + plan: Optional[pulumi.Input['ScaleSetPlanArgs']] = None, + priority: Optional[pulumi.Input[str]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + rolling_upgrade_policy: Optional[pulumi.Input['ScaleSetRollingUpgradePolicyArgs']] = None, + single_placement_group: Optional[pulumi.Input[bool]] = None, + storage_profile_data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetStorageProfileDataDiskArgs']]]] = None, + storage_profile_image_reference: Optional[pulumi.Input['ScaleSetStorageProfileImageReferenceArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_profiles is None and 'networkProfiles' in kwargs: + network_profiles = kwargs['networkProfiles'] + if network_profiles is None: + raise TypeError("Missing 'network_profiles' argument") + if os_profile is None and 'osProfile' in kwargs: + os_profile = kwargs['osProfile'] + if os_profile is None: + raise TypeError("Missing 'os_profile' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if storage_profile_os_disk is None and 'storageProfileOsDisk' in kwargs: + storage_profile_os_disk = kwargs['storageProfileOsDisk'] + if storage_profile_os_disk is None: + raise TypeError("Missing 'storage_profile_os_disk' argument") + if upgrade_policy_mode is None and 'upgradePolicyMode' in kwargs: + upgrade_policy_mode = kwargs['upgradePolicyMode'] + if upgrade_policy_mode is None: + raise TypeError("Missing 'upgrade_policy_mode' argument") + if automatic_os_upgrade is None and 'automaticOsUpgrade' in kwargs: + automatic_os_upgrade = kwargs['automaticOsUpgrade'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if health_probe_id is None and 'healthProbeId' in kwargs: + health_probe_id = kwargs['healthProbeId'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if os_profile_linux_config is None and 'osProfileLinuxConfig' in kwargs: + os_profile_linux_config = kwargs['osProfileLinuxConfig'] + if os_profile_secrets is None and 'osProfileSecrets' in kwargs: + os_profile_secrets = kwargs['osProfileSecrets'] + if os_profile_windows_config is None and 'osProfileWindowsConfig' in kwargs: + os_profile_windows_config = kwargs['osProfileWindowsConfig'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if rolling_upgrade_policy is None and 'rollingUpgradePolicy' in kwargs: + rolling_upgrade_policy = kwargs['rollingUpgradePolicy'] + if single_placement_group is None and 'singlePlacementGroup' in kwargs: + single_placement_group = kwargs['singlePlacementGroup'] + if storage_profile_data_disks is None and 'storageProfileDataDisks' in kwargs: + storage_profile_data_disks = kwargs['storageProfileDataDisks'] + if storage_profile_image_reference is None and 'storageProfileImageReference' in kwargs: + storage_profile_image_reference = kwargs['storageProfileImageReference'] + + _setter("network_profiles", network_profiles) + _setter("os_profile", os_profile) + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) + _setter("storage_profile_os_disk", storage_profile_os_disk) + _setter("upgrade_policy_mode", upgrade_policy_mode) if automatic_os_upgrade is not None: - pulumi.set(__self__, "automatic_os_upgrade", automatic_os_upgrade) + _setter("automatic_os_upgrade", automatic_os_upgrade) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if health_probe_id is not None: - pulumi.set(__self__, "health_probe_id", health_probe_id) + _setter("health_probe_id", health_probe_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_profile_linux_config is not None: - pulumi.set(__self__, "os_profile_linux_config", os_profile_linux_config) + _setter("os_profile_linux_config", os_profile_linux_config) if os_profile_secrets is not None: - pulumi.set(__self__, "os_profile_secrets", os_profile_secrets) + _setter("os_profile_secrets", os_profile_secrets) if os_profile_windows_config is not None: - pulumi.set(__self__, "os_profile_windows_config", os_profile_windows_config) + _setter("os_profile_windows_config", os_profile_windows_config) if overprovision is not None: - pulumi.set(__self__, "overprovision", overprovision) + _setter("overprovision", overprovision) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if rolling_upgrade_policy is not None: - pulumi.set(__self__, "rolling_upgrade_policy", rolling_upgrade_policy) + _setter("rolling_upgrade_policy", rolling_upgrade_policy) if single_placement_group is not None: - pulumi.set(__self__, "single_placement_group", single_placement_group) + _setter("single_placement_group", single_placement_group) if storage_profile_data_disks is not None: - pulumi.set(__self__, "storage_profile_data_disks", storage_profile_data_disks) + _setter("storage_profile_data_disks", storage_profile_data_disks) if storage_profile_image_reference is not None: - pulumi.set(__self__, "storage_profile_image_reference", storage_profile_image_reference) + _setter("storage_profile_image_reference", storage_profile_image_reference) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="networkProfiles") @@ -537,62 +650,163 @@ def __init__(__self__, *, > **Please Note**: Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). """ + _ScaleSetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automatic_os_upgrade=automatic_os_upgrade, + boot_diagnostics=boot_diagnostics, + eviction_policy=eviction_policy, + extensions=extensions, + health_probe_id=health_probe_id, + identity=identity, + license_type=license_type, + location=location, + name=name, + network_profiles=network_profiles, + os_profile=os_profile, + os_profile_linux_config=os_profile_linux_config, + os_profile_secrets=os_profile_secrets, + os_profile_windows_config=os_profile_windows_config, + overprovision=overprovision, + plan=plan, + priority=priority, + proximity_placement_group_id=proximity_placement_group_id, + resource_group_name=resource_group_name, + rolling_upgrade_policy=rolling_upgrade_policy, + single_placement_group=single_placement_group, + sku=sku, + storage_profile_data_disks=storage_profile_data_disks, + storage_profile_image_reference=storage_profile_image_reference, + storage_profile_os_disk=storage_profile_os_disk, + tags=tags, + upgrade_policy_mode=upgrade_policy_mode, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automatic_os_upgrade: Optional[pulumi.Input[bool]] = None, + boot_diagnostics: Optional[pulumi.Input['ScaleSetBootDiagnosticsArgs']] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + extensions: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetExtensionArgs']]]] = None, + health_probe_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ScaleSetIdentityArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_profiles: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetNetworkProfileArgs']]]] = None, + os_profile: Optional[pulumi.Input['ScaleSetOsProfileArgs']] = None, + os_profile_linux_config: Optional[pulumi.Input['ScaleSetOsProfileLinuxConfigArgs']] = None, + os_profile_secrets: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetOsProfileSecretArgs']]]] = None, + os_profile_windows_config: Optional[pulumi.Input['ScaleSetOsProfileWindowsConfigArgs']] = None, + overprovision: Optional[pulumi.Input[bool]] = None, + plan: Optional[pulumi.Input['ScaleSetPlanArgs']] = None, + priority: Optional[pulumi.Input[str]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rolling_upgrade_policy: Optional[pulumi.Input['ScaleSetRollingUpgradePolicyArgs']] = None, + single_placement_group: Optional[pulumi.Input[bool]] = None, + sku: Optional[pulumi.Input['ScaleSetSkuArgs']] = None, + storage_profile_data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetStorageProfileDataDiskArgs']]]] = None, + storage_profile_image_reference: Optional[pulumi.Input['ScaleSetStorageProfileImageReferenceArgs']] = None, + storage_profile_os_disk: Optional[pulumi.Input['ScaleSetStorageProfileOsDiskArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + upgrade_policy_mode: Optional[pulumi.Input[str]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automatic_os_upgrade is None and 'automaticOsUpgrade' in kwargs: + automatic_os_upgrade = kwargs['automaticOsUpgrade'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if health_probe_id is None and 'healthProbeId' in kwargs: + health_probe_id = kwargs['healthProbeId'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if network_profiles is None and 'networkProfiles' in kwargs: + network_profiles = kwargs['networkProfiles'] + if os_profile is None and 'osProfile' in kwargs: + os_profile = kwargs['osProfile'] + if os_profile_linux_config is None and 'osProfileLinuxConfig' in kwargs: + os_profile_linux_config = kwargs['osProfileLinuxConfig'] + if os_profile_secrets is None and 'osProfileSecrets' in kwargs: + os_profile_secrets = kwargs['osProfileSecrets'] + if os_profile_windows_config is None and 'osProfileWindowsConfig' in kwargs: + os_profile_windows_config = kwargs['osProfileWindowsConfig'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if rolling_upgrade_policy is None and 'rollingUpgradePolicy' in kwargs: + rolling_upgrade_policy = kwargs['rollingUpgradePolicy'] + if single_placement_group is None and 'singlePlacementGroup' in kwargs: + single_placement_group = kwargs['singlePlacementGroup'] + if storage_profile_data_disks is None and 'storageProfileDataDisks' in kwargs: + storage_profile_data_disks = kwargs['storageProfileDataDisks'] + if storage_profile_image_reference is None and 'storageProfileImageReference' in kwargs: + storage_profile_image_reference = kwargs['storageProfileImageReference'] + if storage_profile_os_disk is None and 'storageProfileOsDisk' in kwargs: + storage_profile_os_disk = kwargs['storageProfileOsDisk'] + if upgrade_policy_mode is None and 'upgradePolicyMode' in kwargs: + upgrade_policy_mode = kwargs['upgradePolicyMode'] + if automatic_os_upgrade is not None: - pulumi.set(__self__, "automatic_os_upgrade", automatic_os_upgrade) + _setter("automatic_os_upgrade", automatic_os_upgrade) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if health_probe_id is not None: - pulumi.set(__self__, "health_probe_id", health_probe_id) + _setter("health_probe_id", health_probe_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_profiles is not None: - pulumi.set(__self__, "network_profiles", network_profiles) + _setter("network_profiles", network_profiles) if os_profile is not None: - pulumi.set(__self__, "os_profile", os_profile) + _setter("os_profile", os_profile) if os_profile_linux_config is not None: - pulumi.set(__self__, "os_profile_linux_config", os_profile_linux_config) + _setter("os_profile_linux_config", os_profile_linux_config) if os_profile_secrets is not None: - pulumi.set(__self__, "os_profile_secrets", os_profile_secrets) + _setter("os_profile_secrets", os_profile_secrets) if os_profile_windows_config is not None: - pulumi.set(__self__, "os_profile_windows_config", os_profile_windows_config) + _setter("os_profile_windows_config", os_profile_windows_config) if overprovision is not None: - pulumi.set(__self__, "overprovision", overprovision) + _setter("overprovision", overprovision) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rolling_upgrade_policy is not None: - pulumi.set(__self__, "rolling_upgrade_policy", rolling_upgrade_policy) + _setter("rolling_upgrade_policy", rolling_upgrade_policy) if single_placement_group is not None: - pulumi.set(__self__, "single_placement_group", single_placement_group) + _setter("single_placement_group", single_placement_group) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if storage_profile_data_disks is not None: - pulumi.set(__self__, "storage_profile_data_disks", storage_profile_data_disks) + _setter("storage_profile_data_disks", storage_profile_data_disks) if storage_profile_image_reference is not None: - pulumi.set(__self__, "storage_profile_image_reference", storage_profile_image_reference) + _setter("storage_profile_image_reference", storage_profile_image_reference) if storage_profile_os_disk is not None: - pulumi.set(__self__, "storage_profile_os_disk", storage_profile_os_disk) + _setter("storage_profile_os_disk", storage_profile_os_disk) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if upgrade_policy_mode is not None: - pulumi.set(__self__, "upgrade_policy_mode", upgrade_policy_mode) + _setter("upgrade_policy_mode", upgrade_policy_mode) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="automaticOsUpgrade") @@ -1418,6 +1632,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ScaleSetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1461,10 +1679,20 @@ def _internal_init(__self__, __props__ = ScaleSetArgs.__new__(ScaleSetArgs) __props__.__dict__["automatic_os_upgrade"] = automatic_os_upgrade + if boot_diagnostics is not None and not isinstance(boot_diagnostics, ScaleSetBootDiagnosticsArgs): + boot_diagnostics = boot_diagnostics or {} + def _setter(key, value): + boot_diagnostics[key] = value + ScaleSetBootDiagnosticsArgs._configure(_setter, **boot_diagnostics) __props__.__dict__["boot_diagnostics"] = boot_diagnostics __props__.__dict__["eviction_policy"] = eviction_policy __props__.__dict__["extensions"] = extensions __props__.__dict__["health_probe_id"] = health_probe_id + if identity is not None and not isinstance(identity, ScaleSetIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ScaleSetIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["license_type"] = license_type __props__.__dict__["location"] = location @@ -1472,26 +1700,66 @@ def _internal_init(__self__, if network_profiles is None and not opts.urn: raise TypeError("Missing required property 'network_profiles'") __props__.__dict__["network_profiles"] = network_profiles + if os_profile is not None and not isinstance(os_profile, ScaleSetOsProfileArgs): + os_profile = os_profile or {} + def _setter(key, value): + os_profile[key] = value + ScaleSetOsProfileArgs._configure(_setter, **os_profile) if os_profile is None and not opts.urn: raise TypeError("Missing required property 'os_profile'") __props__.__dict__["os_profile"] = os_profile + if os_profile_linux_config is not None and not isinstance(os_profile_linux_config, ScaleSetOsProfileLinuxConfigArgs): + os_profile_linux_config = os_profile_linux_config or {} + def _setter(key, value): + os_profile_linux_config[key] = value + ScaleSetOsProfileLinuxConfigArgs._configure(_setter, **os_profile_linux_config) __props__.__dict__["os_profile_linux_config"] = os_profile_linux_config __props__.__dict__["os_profile_secrets"] = os_profile_secrets + if os_profile_windows_config is not None and not isinstance(os_profile_windows_config, ScaleSetOsProfileWindowsConfigArgs): + os_profile_windows_config = os_profile_windows_config or {} + def _setter(key, value): + os_profile_windows_config[key] = value + ScaleSetOsProfileWindowsConfigArgs._configure(_setter, **os_profile_windows_config) __props__.__dict__["os_profile_windows_config"] = os_profile_windows_config __props__.__dict__["overprovision"] = overprovision + if plan is not None and not isinstance(plan, ScaleSetPlanArgs): + plan = plan or {} + def _setter(key, value): + plan[key] = value + ScaleSetPlanArgs._configure(_setter, **plan) __props__.__dict__["plan"] = plan __props__.__dict__["priority"] = priority __props__.__dict__["proximity_placement_group_id"] = proximity_placement_group_id if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if rolling_upgrade_policy is not None and not isinstance(rolling_upgrade_policy, ScaleSetRollingUpgradePolicyArgs): + rolling_upgrade_policy = rolling_upgrade_policy or {} + def _setter(key, value): + rolling_upgrade_policy[key] = value + ScaleSetRollingUpgradePolicyArgs._configure(_setter, **rolling_upgrade_policy) __props__.__dict__["rolling_upgrade_policy"] = rolling_upgrade_policy __props__.__dict__["single_placement_group"] = single_placement_group + if sku is not None and not isinstance(sku, ScaleSetSkuArgs): + sku = sku or {} + def _setter(key, value): + sku[key] = value + ScaleSetSkuArgs._configure(_setter, **sku) if sku is None and not opts.urn: raise TypeError("Missing required property 'sku'") __props__.__dict__["sku"] = sku __props__.__dict__["storage_profile_data_disks"] = storage_profile_data_disks + if storage_profile_image_reference is not None and not isinstance(storage_profile_image_reference, ScaleSetStorageProfileImageReferenceArgs): + storage_profile_image_reference = storage_profile_image_reference or {} + def _setter(key, value): + storage_profile_image_reference[key] = value + ScaleSetStorageProfileImageReferenceArgs._configure(_setter, **storage_profile_image_reference) __props__.__dict__["storage_profile_image_reference"] = storage_profile_image_reference + if storage_profile_os_disk is not None and not isinstance(storage_profile_os_disk, ScaleSetStorageProfileOsDiskArgs): + storage_profile_os_disk = storage_profile_os_disk or {} + def _setter(key, value): + storage_profile_os_disk[key] = value + ScaleSetStorageProfileOsDiskArgs._configure(_setter, **storage_profile_os_disk) if storage_profile_os_disk is None and not opts.urn: raise TypeError("Missing required property 'storage_profile_os_disk'") __props__.__dict__["storage_profile_os_disk"] = storage_profile_os_disk diff --git a/sdk/python/pulumi_azure/compute/scale_set_packet_capture.py b/sdk/python/pulumi_azure/compute/scale_set_packet_capture.py index bdab0fe034..68a1fcbeaf 100644 --- a/sdk/python/pulumi_azure/compute/scale_set_packet_capture.py +++ b/sdk/python/pulumi_azure/compute/scale_set_packet_capture.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,21 +37,68 @@ def __init__(__self__, *, :param pulumi.Input[int] maximum_capture_duration_in_seconds: The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name to use for this Network Packet Capture. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "network_watcher_id", network_watcher_id) - pulumi.set(__self__, "storage_location", storage_location) - pulumi.set(__self__, "virtual_machine_scale_set_id", virtual_machine_scale_set_id) + ScaleSetPacketCaptureArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_watcher_id=network_watcher_id, + storage_location=storage_location, + virtual_machine_scale_set_id=virtual_machine_scale_set_id, + filters=filters, + machine_scope=machine_scope, + maximum_bytes_per_packet=maximum_bytes_per_packet, + maximum_bytes_per_session=maximum_bytes_per_session, + maximum_capture_duration_in_seconds=maximum_capture_duration_in_seconds, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_watcher_id: Optional[pulumi.Input[str]] = None, + storage_location: Optional[pulumi.Input['ScaleSetPacketCaptureStorageLocationArgs']] = None, + virtual_machine_scale_set_id: Optional[pulumi.Input[str]] = None, + filters: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetPacketCaptureFilterArgs']]]] = None, + machine_scope: Optional[pulumi.Input['ScaleSetPacketCaptureMachineScopeArgs']] = None, + maximum_bytes_per_packet: Optional[pulumi.Input[int]] = None, + maximum_bytes_per_session: Optional[pulumi.Input[int]] = None, + maximum_capture_duration_in_seconds: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_watcher_id is None and 'networkWatcherId' in kwargs: + network_watcher_id = kwargs['networkWatcherId'] + if network_watcher_id is None: + raise TypeError("Missing 'network_watcher_id' argument") + if storage_location is None and 'storageLocation' in kwargs: + storage_location = kwargs['storageLocation'] + if storage_location is None: + raise TypeError("Missing 'storage_location' argument") + if virtual_machine_scale_set_id is None and 'virtualMachineScaleSetId' in kwargs: + virtual_machine_scale_set_id = kwargs['virtualMachineScaleSetId'] + if virtual_machine_scale_set_id is None: + raise TypeError("Missing 'virtual_machine_scale_set_id' argument") + if machine_scope is None and 'machineScope' in kwargs: + machine_scope = kwargs['machineScope'] + if maximum_bytes_per_packet is None and 'maximumBytesPerPacket' in kwargs: + maximum_bytes_per_packet = kwargs['maximumBytesPerPacket'] + if maximum_bytes_per_session is None and 'maximumBytesPerSession' in kwargs: + maximum_bytes_per_session = kwargs['maximumBytesPerSession'] + if maximum_capture_duration_in_seconds is None and 'maximumCaptureDurationInSeconds' in kwargs: + maximum_capture_duration_in_seconds = kwargs['maximumCaptureDurationInSeconds'] + + _setter("network_watcher_id", network_watcher_id) + _setter("storage_location", storage_location) + _setter("virtual_machine_scale_set_id", virtual_machine_scale_set_id) if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) if machine_scope is not None: - pulumi.set(__self__, "machine_scope", machine_scope) + _setter("machine_scope", machine_scope) if maximum_bytes_per_packet is not None: - pulumi.set(__self__, "maximum_bytes_per_packet", maximum_bytes_per_packet) + _setter("maximum_bytes_per_packet", maximum_bytes_per_packet) if maximum_bytes_per_session is not None: - pulumi.set(__self__, "maximum_bytes_per_session", maximum_bytes_per_session) + _setter("maximum_bytes_per_session", maximum_bytes_per_session) if maximum_capture_duration_in_seconds is not None: - pulumi.set(__self__, "maximum_capture_duration_in_seconds", maximum_capture_duration_in_seconds) + _setter("maximum_capture_duration_in_seconds", maximum_capture_duration_in_seconds) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="networkWatcherId") @@ -186,24 +233,65 @@ def __init__(__self__, *, :param pulumi.Input['ScaleSetPacketCaptureStorageLocationArgs'] storage_location: A `storage_location` block as defined below. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_machine_scale_set_id: The resource ID of the Virtual Machine Scale Set to capture packets from. Changing this forces a new resource to be created. """ + _ScaleSetPacketCaptureState._configure( + lambda key, value: pulumi.set(__self__, key, value), + filters=filters, + machine_scope=machine_scope, + maximum_bytes_per_packet=maximum_bytes_per_packet, + maximum_bytes_per_session=maximum_bytes_per_session, + maximum_capture_duration_in_seconds=maximum_capture_duration_in_seconds, + name=name, + network_watcher_id=network_watcher_id, + storage_location=storage_location, + virtual_machine_scale_set_id=virtual_machine_scale_set_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filters: Optional[pulumi.Input[Sequence[pulumi.Input['ScaleSetPacketCaptureFilterArgs']]]] = None, + machine_scope: Optional[pulumi.Input['ScaleSetPacketCaptureMachineScopeArgs']] = None, + maximum_bytes_per_packet: Optional[pulumi.Input[int]] = None, + maximum_bytes_per_session: Optional[pulumi.Input[int]] = None, + maximum_capture_duration_in_seconds: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + network_watcher_id: Optional[pulumi.Input[str]] = None, + storage_location: Optional[pulumi.Input['ScaleSetPacketCaptureStorageLocationArgs']] = None, + virtual_machine_scale_set_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if machine_scope is None and 'machineScope' in kwargs: + machine_scope = kwargs['machineScope'] + if maximum_bytes_per_packet is None and 'maximumBytesPerPacket' in kwargs: + maximum_bytes_per_packet = kwargs['maximumBytesPerPacket'] + if maximum_bytes_per_session is None and 'maximumBytesPerSession' in kwargs: + maximum_bytes_per_session = kwargs['maximumBytesPerSession'] + if maximum_capture_duration_in_seconds is None and 'maximumCaptureDurationInSeconds' in kwargs: + maximum_capture_duration_in_seconds = kwargs['maximumCaptureDurationInSeconds'] + if network_watcher_id is None and 'networkWatcherId' in kwargs: + network_watcher_id = kwargs['networkWatcherId'] + if storage_location is None and 'storageLocation' in kwargs: + storage_location = kwargs['storageLocation'] + if virtual_machine_scale_set_id is None and 'virtualMachineScaleSetId' in kwargs: + virtual_machine_scale_set_id = kwargs['virtualMachineScaleSetId'] + if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) if machine_scope is not None: - pulumi.set(__self__, "machine_scope", machine_scope) + _setter("machine_scope", machine_scope) if maximum_bytes_per_packet is not None: - pulumi.set(__self__, "maximum_bytes_per_packet", maximum_bytes_per_packet) + _setter("maximum_bytes_per_packet", maximum_bytes_per_packet) if maximum_bytes_per_session is not None: - pulumi.set(__self__, "maximum_bytes_per_session", maximum_bytes_per_session) + _setter("maximum_bytes_per_session", maximum_bytes_per_session) if maximum_capture_duration_in_seconds is not None: - pulumi.set(__self__, "maximum_capture_duration_in_seconds", maximum_capture_duration_in_seconds) + _setter("maximum_capture_duration_in_seconds", maximum_capture_duration_in_seconds) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_watcher_id is not None: - pulumi.set(__self__, "network_watcher_id", network_watcher_id) + _setter("network_watcher_id", network_watcher_id) if storage_location is not None: - pulumi.set(__self__, "storage_location", storage_location) + _setter("storage_location", storage_location) if virtual_machine_scale_set_id is not None: - pulumi.set(__self__, "virtual_machine_scale_set_id", virtual_machine_scale_set_id) + _setter("virtual_machine_scale_set_id", virtual_machine_scale_set_id) @property @pulumi.getter @@ -517,6 +605,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ScaleSetPacketCaptureArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -541,6 +633,11 @@ def _internal_init(__self__, __props__ = ScaleSetPacketCaptureArgs.__new__(ScaleSetPacketCaptureArgs) __props__.__dict__["filters"] = filters + if machine_scope is not None and not isinstance(machine_scope, ScaleSetPacketCaptureMachineScopeArgs): + machine_scope = machine_scope or {} + def _setter(key, value): + machine_scope[key] = value + ScaleSetPacketCaptureMachineScopeArgs._configure(_setter, **machine_scope) __props__.__dict__["machine_scope"] = machine_scope __props__.__dict__["maximum_bytes_per_packet"] = maximum_bytes_per_packet __props__.__dict__["maximum_bytes_per_session"] = maximum_bytes_per_session @@ -549,6 +646,11 @@ def _internal_init(__self__, if network_watcher_id is None and not opts.urn: raise TypeError("Missing required property 'network_watcher_id'") __props__.__dict__["network_watcher_id"] = network_watcher_id + if storage_location is not None and not isinstance(storage_location, ScaleSetPacketCaptureStorageLocationArgs): + storage_location = storage_location or {} + def _setter(key, value): + storage_location[key] = value + ScaleSetPacketCaptureStorageLocationArgs._configure(_setter, **storage_location) if storage_location is None and not opts.urn: raise TypeError("Missing required property 'storage_location'") __props__.__dict__["storage_location"] = storage_location diff --git a/sdk/python/pulumi_azure/compute/shared_image.py b/sdk/python/pulumi_azure/compute/shared_image.py index 9d8009a130..bac34cc150 100644 --- a/sdk/python/pulumi_azure/compute/shared_image.py +++ b/sdk/python/pulumi_azure/compute/shared_image.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -73,52 +73,153 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Shared Image. :param pulumi.Input[bool] trusted_launch_enabled: Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "gallery_name", gallery_name) - pulumi.set(__self__, "identifier", identifier) - pulumi.set(__self__, "os_type", os_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) + SharedImageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + gallery_name=gallery_name, + identifier=identifier, + os_type=os_type, + resource_group_name=resource_group_name, + accelerated_network_support_enabled=accelerated_network_support_enabled, + architecture=architecture, + confidential_vm_enabled=confidential_vm_enabled, + confidential_vm_supported=confidential_vm_supported, + description=description, + disk_types_not_alloweds=disk_types_not_alloweds, + end_of_life_date=end_of_life_date, + eula=eula, + hyper_v_generation=hyper_v_generation, + location=location, + max_recommended_memory_in_gb=max_recommended_memory_in_gb, + max_recommended_vcpu_count=max_recommended_vcpu_count, + min_recommended_memory_in_gb=min_recommended_memory_in_gb, + min_recommended_vcpu_count=min_recommended_vcpu_count, + name=name, + privacy_statement_uri=privacy_statement_uri, + purchase_plan=purchase_plan, + release_note_uri=release_note_uri, + specialized=specialized, + tags=tags, + trusted_launch_enabled=trusted_launch_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + gallery_name: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input['SharedImageIdentifierArgs']] = None, + os_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + accelerated_network_support_enabled: Optional[pulumi.Input[bool]] = None, + architecture: Optional[pulumi.Input[str]] = None, + confidential_vm_enabled: Optional[pulumi.Input[bool]] = None, + confidential_vm_supported: Optional[pulumi.Input[bool]] = None, + description: Optional[pulumi.Input[str]] = None, + disk_types_not_alloweds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + end_of_life_date: Optional[pulumi.Input[str]] = None, + eula: Optional[pulumi.Input[str]] = None, + hyper_v_generation: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_recommended_memory_in_gb: Optional[pulumi.Input[int]] = None, + max_recommended_vcpu_count: Optional[pulumi.Input[int]] = None, + min_recommended_memory_in_gb: Optional[pulumi.Input[int]] = None, + min_recommended_vcpu_count: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + privacy_statement_uri: Optional[pulumi.Input[str]] = None, + purchase_plan: Optional[pulumi.Input['SharedImagePurchasePlanArgs']] = None, + release_note_uri: Optional[pulumi.Input[str]] = None, + specialized: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + trusted_launch_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if gallery_name is None and 'galleryName' in kwargs: + gallery_name = kwargs['galleryName'] + if gallery_name is None: + raise TypeError("Missing 'gallery_name' argument") + if identifier is None: + raise TypeError("Missing 'identifier' argument") + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if os_type is None: + raise TypeError("Missing 'os_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if accelerated_network_support_enabled is None and 'acceleratedNetworkSupportEnabled' in kwargs: + accelerated_network_support_enabled = kwargs['acceleratedNetworkSupportEnabled'] + if confidential_vm_enabled is None and 'confidentialVmEnabled' in kwargs: + confidential_vm_enabled = kwargs['confidentialVmEnabled'] + if confidential_vm_supported is None and 'confidentialVmSupported' in kwargs: + confidential_vm_supported = kwargs['confidentialVmSupported'] + if disk_types_not_alloweds is None and 'diskTypesNotAlloweds' in kwargs: + disk_types_not_alloweds = kwargs['diskTypesNotAlloweds'] + if end_of_life_date is None and 'endOfLifeDate' in kwargs: + end_of_life_date = kwargs['endOfLifeDate'] + if hyper_v_generation is None and 'hyperVGeneration' in kwargs: + hyper_v_generation = kwargs['hyperVGeneration'] + if max_recommended_memory_in_gb is None and 'maxRecommendedMemoryInGb' in kwargs: + max_recommended_memory_in_gb = kwargs['maxRecommendedMemoryInGb'] + if max_recommended_vcpu_count is None and 'maxRecommendedVcpuCount' in kwargs: + max_recommended_vcpu_count = kwargs['maxRecommendedVcpuCount'] + if min_recommended_memory_in_gb is None and 'minRecommendedMemoryInGb' in kwargs: + min_recommended_memory_in_gb = kwargs['minRecommendedMemoryInGb'] + if min_recommended_vcpu_count is None and 'minRecommendedVcpuCount' in kwargs: + min_recommended_vcpu_count = kwargs['minRecommendedVcpuCount'] + if privacy_statement_uri is None and 'privacyStatementUri' in kwargs: + privacy_statement_uri = kwargs['privacyStatementUri'] + if purchase_plan is None and 'purchasePlan' in kwargs: + purchase_plan = kwargs['purchasePlan'] + if release_note_uri is None and 'releaseNoteUri' in kwargs: + release_note_uri = kwargs['releaseNoteUri'] + if trusted_launch_enabled is None and 'trustedLaunchEnabled' in kwargs: + trusted_launch_enabled = kwargs['trustedLaunchEnabled'] + + _setter("gallery_name", gallery_name) + _setter("identifier", identifier) + _setter("os_type", os_type) + _setter("resource_group_name", resource_group_name) if accelerated_network_support_enabled is not None: - pulumi.set(__self__, "accelerated_network_support_enabled", accelerated_network_support_enabled) + _setter("accelerated_network_support_enabled", accelerated_network_support_enabled) if architecture is not None: - pulumi.set(__self__, "architecture", architecture) + _setter("architecture", architecture) if confidential_vm_enabled is not None: - pulumi.set(__self__, "confidential_vm_enabled", confidential_vm_enabled) + _setter("confidential_vm_enabled", confidential_vm_enabled) if confidential_vm_supported is not None: - pulumi.set(__self__, "confidential_vm_supported", confidential_vm_supported) + _setter("confidential_vm_supported", confidential_vm_supported) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if disk_types_not_alloweds is not None: - pulumi.set(__self__, "disk_types_not_alloweds", disk_types_not_alloweds) + _setter("disk_types_not_alloweds", disk_types_not_alloweds) if end_of_life_date is not None: - pulumi.set(__self__, "end_of_life_date", end_of_life_date) + _setter("end_of_life_date", end_of_life_date) if eula is not None: - pulumi.set(__self__, "eula", eula) + _setter("eula", eula) if hyper_v_generation is not None: - pulumi.set(__self__, "hyper_v_generation", hyper_v_generation) + _setter("hyper_v_generation", hyper_v_generation) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_recommended_memory_in_gb is not None: - pulumi.set(__self__, "max_recommended_memory_in_gb", max_recommended_memory_in_gb) + _setter("max_recommended_memory_in_gb", max_recommended_memory_in_gb) if max_recommended_vcpu_count is not None: - pulumi.set(__self__, "max_recommended_vcpu_count", max_recommended_vcpu_count) + _setter("max_recommended_vcpu_count", max_recommended_vcpu_count) if min_recommended_memory_in_gb is not None: - pulumi.set(__self__, "min_recommended_memory_in_gb", min_recommended_memory_in_gb) + _setter("min_recommended_memory_in_gb", min_recommended_memory_in_gb) if min_recommended_vcpu_count is not None: - pulumi.set(__self__, "min_recommended_vcpu_count", min_recommended_vcpu_count) + _setter("min_recommended_vcpu_count", min_recommended_vcpu_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if privacy_statement_uri is not None: - pulumi.set(__self__, "privacy_statement_uri", privacy_statement_uri) + _setter("privacy_statement_uri", privacy_statement_uri) if purchase_plan is not None: - pulumi.set(__self__, "purchase_plan", purchase_plan) + _setter("purchase_plan", purchase_plan) if release_note_uri is not None: - pulumi.set(__self__, "release_note_uri", release_note_uri) + _setter("release_note_uri", release_note_uri) if specialized is not None: - pulumi.set(__self__, "specialized", specialized) + _setter("specialized", specialized) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if trusted_launch_enabled is not None: - pulumi.set(__self__, "trusted_launch_enabled", trusted_launch_enabled) + _setter("trusted_launch_enabled", trusted_launch_enabled) @property @pulumi.getter(name="galleryName") @@ -485,56 +586,149 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Shared Image. :param pulumi.Input[bool] trusted_launch_enabled: Specifies if Trusted Launch has to be enabled for the Virtual Machine created from the Shared Image. Changing this forces a new resource to be created. """ + _SharedImageState._configure( + lambda key, value: pulumi.set(__self__, key, value), + accelerated_network_support_enabled=accelerated_network_support_enabled, + architecture=architecture, + confidential_vm_enabled=confidential_vm_enabled, + confidential_vm_supported=confidential_vm_supported, + description=description, + disk_types_not_alloweds=disk_types_not_alloweds, + end_of_life_date=end_of_life_date, + eula=eula, + gallery_name=gallery_name, + hyper_v_generation=hyper_v_generation, + identifier=identifier, + location=location, + max_recommended_memory_in_gb=max_recommended_memory_in_gb, + max_recommended_vcpu_count=max_recommended_vcpu_count, + min_recommended_memory_in_gb=min_recommended_memory_in_gb, + min_recommended_vcpu_count=min_recommended_vcpu_count, + name=name, + os_type=os_type, + privacy_statement_uri=privacy_statement_uri, + purchase_plan=purchase_plan, + release_note_uri=release_note_uri, + resource_group_name=resource_group_name, + specialized=specialized, + tags=tags, + trusted_launch_enabled=trusted_launch_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + accelerated_network_support_enabled: Optional[pulumi.Input[bool]] = None, + architecture: Optional[pulumi.Input[str]] = None, + confidential_vm_enabled: Optional[pulumi.Input[bool]] = None, + confidential_vm_supported: Optional[pulumi.Input[bool]] = None, + description: Optional[pulumi.Input[str]] = None, + disk_types_not_alloweds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + end_of_life_date: Optional[pulumi.Input[str]] = None, + eula: Optional[pulumi.Input[str]] = None, + gallery_name: Optional[pulumi.Input[str]] = None, + hyper_v_generation: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input['SharedImageIdentifierArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + max_recommended_memory_in_gb: Optional[pulumi.Input[int]] = None, + max_recommended_vcpu_count: Optional[pulumi.Input[int]] = None, + min_recommended_memory_in_gb: Optional[pulumi.Input[int]] = None, + min_recommended_vcpu_count: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + os_type: Optional[pulumi.Input[str]] = None, + privacy_statement_uri: Optional[pulumi.Input[str]] = None, + purchase_plan: Optional[pulumi.Input['SharedImagePurchasePlanArgs']] = None, + release_note_uri: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + specialized: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + trusted_launch_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if accelerated_network_support_enabled is None and 'acceleratedNetworkSupportEnabled' in kwargs: + accelerated_network_support_enabled = kwargs['acceleratedNetworkSupportEnabled'] + if confidential_vm_enabled is None and 'confidentialVmEnabled' in kwargs: + confidential_vm_enabled = kwargs['confidentialVmEnabled'] + if confidential_vm_supported is None and 'confidentialVmSupported' in kwargs: + confidential_vm_supported = kwargs['confidentialVmSupported'] + if disk_types_not_alloweds is None and 'diskTypesNotAlloweds' in kwargs: + disk_types_not_alloweds = kwargs['diskTypesNotAlloweds'] + if end_of_life_date is None and 'endOfLifeDate' in kwargs: + end_of_life_date = kwargs['endOfLifeDate'] + if gallery_name is None and 'galleryName' in kwargs: + gallery_name = kwargs['galleryName'] + if hyper_v_generation is None and 'hyperVGeneration' in kwargs: + hyper_v_generation = kwargs['hyperVGeneration'] + if max_recommended_memory_in_gb is None and 'maxRecommendedMemoryInGb' in kwargs: + max_recommended_memory_in_gb = kwargs['maxRecommendedMemoryInGb'] + if max_recommended_vcpu_count is None and 'maxRecommendedVcpuCount' in kwargs: + max_recommended_vcpu_count = kwargs['maxRecommendedVcpuCount'] + if min_recommended_memory_in_gb is None and 'minRecommendedMemoryInGb' in kwargs: + min_recommended_memory_in_gb = kwargs['minRecommendedMemoryInGb'] + if min_recommended_vcpu_count is None and 'minRecommendedVcpuCount' in kwargs: + min_recommended_vcpu_count = kwargs['minRecommendedVcpuCount'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if privacy_statement_uri is None and 'privacyStatementUri' in kwargs: + privacy_statement_uri = kwargs['privacyStatementUri'] + if purchase_plan is None and 'purchasePlan' in kwargs: + purchase_plan = kwargs['purchasePlan'] + if release_note_uri is None and 'releaseNoteUri' in kwargs: + release_note_uri = kwargs['releaseNoteUri'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if trusted_launch_enabled is None and 'trustedLaunchEnabled' in kwargs: + trusted_launch_enabled = kwargs['trustedLaunchEnabled'] + if accelerated_network_support_enabled is not None: - pulumi.set(__self__, "accelerated_network_support_enabled", accelerated_network_support_enabled) + _setter("accelerated_network_support_enabled", accelerated_network_support_enabled) if architecture is not None: - pulumi.set(__self__, "architecture", architecture) + _setter("architecture", architecture) if confidential_vm_enabled is not None: - pulumi.set(__self__, "confidential_vm_enabled", confidential_vm_enabled) + _setter("confidential_vm_enabled", confidential_vm_enabled) if confidential_vm_supported is not None: - pulumi.set(__self__, "confidential_vm_supported", confidential_vm_supported) + _setter("confidential_vm_supported", confidential_vm_supported) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if disk_types_not_alloweds is not None: - pulumi.set(__self__, "disk_types_not_alloweds", disk_types_not_alloweds) + _setter("disk_types_not_alloweds", disk_types_not_alloweds) if end_of_life_date is not None: - pulumi.set(__self__, "end_of_life_date", end_of_life_date) + _setter("end_of_life_date", end_of_life_date) if eula is not None: - pulumi.set(__self__, "eula", eula) + _setter("eula", eula) if gallery_name is not None: - pulumi.set(__self__, "gallery_name", gallery_name) + _setter("gallery_name", gallery_name) if hyper_v_generation is not None: - pulumi.set(__self__, "hyper_v_generation", hyper_v_generation) + _setter("hyper_v_generation", hyper_v_generation) if identifier is not None: - pulumi.set(__self__, "identifier", identifier) + _setter("identifier", identifier) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_recommended_memory_in_gb is not None: - pulumi.set(__self__, "max_recommended_memory_in_gb", max_recommended_memory_in_gb) + _setter("max_recommended_memory_in_gb", max_recommended_memory_in_gb) if max_recommended_vcpu_count is not None: - pulumi.set(__self__, "max_recommended_vcpu_count", max_recommended_vcpu_count) + _setter("max_recommended_vcpu_count", max_recommended_vcpu_count) if min_recommended_memory_in_gb is not None: - pulumi.set(__self__, "min_recommended_memory_in_gb", min_recommended_memory_in_gb) + _setter("min_recommended_memory_in_gb", min_recommended_memory_in_gb) if min_recommended_vcpu_count is not None: - pulumi.set(__self__, "min_recommended_vcpu_count", min_recommended_vcpu_count) + _setter("min_recommended_vcpu_count", min_recommended_vcpu_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if privacy_statement_uri is not None: - pulumi.set(__self__, "privacy_statement_uri", privacy_statement_uri) + _setter("privacy_statement_uri", privacy_statement_uri) if purchase_plan is not None: - pulumi.set(__self__, "purchase_plan", purchase_plan) + _setter("purchase_plan", purchase_plan) if release_note_uri is not None: - pulumi.set(__self__, "release_note_uri", release_note_uri) + _setter("release_note_uri", release_note_uri) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if specialized is not None: - pulumi.set(__self__, "specialized", specialized) + _setter("specialized", specialized) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if trusted_launch_enabled is not None: - pulumi.set(__self__, "trusted_launch_enabled", trusted_launch_enabled) + _setter("trusted_launch_enabled", trusted_launch_enabled) @property @pulumi.getter(name="acceleratedNetworkSupportEnabled") @@ -996,6 +1190,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SharedImageArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1047,6 +1245,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'gallery_name'") __props__.__dict__["gallery_name"] = gallery_name __props__.__dict__["hyper_v_generation"] = hyper_v_generation + if identifier is not None and not isinstance(identifier, SharedImageIdentifierArgs): + identifier = identifier or {} + def _setter(key, value): + identifier[key] = value + SharedImageIdentifierArgs._configure(_setter, **identifier) if identifier is None and not opts.urn: raise TypeError("Missing required property 'identifier'") __props__.__dict__["identifier"] = identifier @@ -1060,6 +1263,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'os_type'") __props__.__dict__["os_type"] = os_type __props__.__dict__["privacy_statement_uri"] = privacy_statement_uri + if purchase_plan is not None and not isinstance(purchase_plan, SharedImagePurchasePlanArgs): + purchase_plan = purchase_plan or {} + def _setter(key, value): + purchase_plan[key] = value + SharedImagePurchasePlanArgs._configure(_setter, **purchase_plan) __props__.__dict__["purchase_plan"] = purchase_plan __props__.__dict__["release_note_uri"] = release_note_uri if resource_group_name is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/compute/shared_image_gallery.py b/sdk/python/pulumi_azure/compute/shared_image_gallery.py index 90ac14f90f..c18ff3445c 100644 --- a/sdk/python/pulumi_azure/compute/shared_image_gallery.py +++ b/sdk/python/pulumi_azure/compute/shared_image_gallery.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,17 +31,42 @@ def __init__(__self__, *, :param pulumi.Input['SharedImageGallerySharingArgs'] sharing: A `sharing` block as defined below. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Shared Image Gallery. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + SharedImageGalleryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + description=description, + location=location, + name=name, + sharing=sharing, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sharing: Optional[pulumi.Input['SharedImageGallerySharingArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sharing is not None: - pulumi.set(__self__, "sharing", sharing) + _setter("sharing", sharing) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -136,20 +161,47 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Shared Image Gallery. :param pulumi.Input[str] unique_name: The Unique Name for this Shared Image Gallery. """ + _SharedImageGalleryState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + location=location, + name=name, + resource_group_name=resource_group_name, + sharing=sharing, + tags=tags, + unique_name=unique_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sharing: Optional[pulumi.Input['SharedImageGallerySharingArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + unique_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if unique_name is None and 'uniqueName' in kwargs: + unique_name = kwargs['uniqueName'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sharing is not None: - pulumi.set(__self__, "sharing", sharing) + _setter("sharing", sharing) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if unique_name is not None: - pulumi.set(__self__, "unique_name", unique_name) + _setter("unique_name", unique_name) @property @pulumi.getter @@ -329,6 +381,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SharedImageGalleryArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -355,6 +411,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if sharing is not None and not isinstance(sharing, SharedImageGallerySharingArgs): + sharing = sharing or {} + def _setter(key, value): + sharing[key] = value + SharedImageGallerySharingArgs._configure(_setter, **sharing) __props__.__dict__["sharing"] = sharing __props__.__dict__["tags"] = tags __props__.__dict__["unique_name"] = None diff --git a/sdk/python/pulumi_azure/compute/shared_image_version.py b/sdk/python/pulumi_azure/compute/shared_image_version.py index 6565b0c727..b178ef97a4 100644 --- a/sdk/python/pulumi_azure/compute/shared_image_version.py +++ b/sdk/python/pulumi_azure/compute/shared_image_version.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -61,32 +61,103 @@ def __init__(__self__, *, > **NOTE:** `blob_uri` and `storage_account_id` must be specified together :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A collection of tags which should be applied to this resource. """ - pulumi.set(__self__, "gallery_name", gallery_name) - pulumi.set(__self__, "image_name", image_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "target_regions", target_regions) + SharedImageVersionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + gallery_name=gallery_name, + image_name=image_name, + resource_group_name=resource_group_name, + target_regions=target_regions, + blob_uri=blob_uri, + deletion_of_replicated_locations_enabled=deletion_of_replicated_locations_enabled, + end_of_life_date=end_of_life_date, + exclude_from_latest=exclude_from_latest, + location=location, + managed_image_id=managed_image_id, + name=name, + os_disk_snapshot_id=os_disk_snapshot_id, + replication_mode=replication_mode, + storage_account_id=storage_account_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + gallery_name: Optional[pulumi.Input[str]] = None, + image_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + target_regions: Optional[pulumi.Input[Sequence[pulumi.Input['SharedImageVersionTargetRegionArgs']]]] = None, + blob_uri: Optional[pulumi.Input[str]] = None, + deletion_of_replicated_locations_enabled: Optional[pulumi.Input[bool]] = None, + end_of_life_date: Optional[pulumi.Input[str]] = None, + exclude_from_latest: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_image_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + os_disk_snapshot_id: Optional[pulumi.Input[str]] = None, + replication_mode: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if gallery_name is None and 'galleryName' in kwargs: + gallery_name = kwargs['galleryName'] + if gallery_name is None: + raise TypeError("Missing 'gallery_name' argument") + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if image_name is None: + raise TypeError("Missing 'image_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if target_regions is None and 'targetRegions' in kwargs: + target_regions = kwargs['targetRegions'] + if target_regions is None: + raise TypeError("Missing 'target_regions' argument") + if blob_uri is None and 'blobUri' in kwargs: + blob_uri = kwargs['blobUri'] + if deletion_of_replicated_locations_enabled is None and 'deletionOfReplicatedLocationsEnabled' in kwargs: + deletion_of_replicated_locations_enabled = kwargs['deletionOfReplicatedLocationsEnabled'] + if end_of_life_date is None and 'endOfLifeDate' in kwargs: + end_of_life_date = kwargs['endOfLifeDate'] + if exclude_from_latest is None and 'excludeFromLatest' in kwargs: + exclude_from_latest = kwargs['excludeFromLatest'] + if managed_image_id is None and 'managedImageId' in kwargs: + managed_image_id = kwargs['managedImageId'] + if os_disk_snapshot_id is None and 'osDiskSnapshotId' in kwargs: + os_disk_snapshot_id = kwargs['osDiskSnapshotId'] + if replication_mode is None and 'replicationMode' in kwargs: + replication_mode = kwargs['replicationMode'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + + _setter("gallery_name", gallery_name) + _setter("image_name", image_name) + _setter("resource_group_name", resource_group_name) + _setter("target_regions", target_regions) if blob_uri is not None: - pulumi.set(__self__, "blob_uri", blob_uri) + _setter("blob_uri", blob_uri) if deletion_of_replicated_locations_enabled is not None: - pulumi.set(__self__, "deletion_of_replicated_locations_enabled", deletion_of_replicated_locations_enabled) + _setter("deletion_of_replicated_locations_enabled", deletion_of_replicated_locations_enabled) if end_of_life_date is not None: - pulumi.set(__self__, "end_of_life_date", end_of_life_date) + _setter("end_of_life_date", end_of_life_date) if exclude_from_latest is not None: - pulumi.set(__self__, "exclude_from_latest", exclude_from_latest) + _setter("exclude_from_latest", exclude_from_latest) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_image_id is not None: - pulumi.set(__self__, "managed_image_id", managed_image_id) + _setter("managed_image_id", managed_image_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_disk_snapshot_id is not None: - pulumi.set(__self__, "os_disk_snapshot_id", os_disk_snapshot_id) + _setter("os_disk_snapshot_id", os_disk_snapshot_id) if replication_mode is not None: - pulumi.set(__self__, "replication_mode", replication_mode) + _setter("replication_mode", replication_mode) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="galleryName") @@ -329,36 +400,99 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A collection of tags which should be applied to this resource. :param pulumi.Input[Sequence[pulumi.Input['SharedImageVersionTargetRegionArgs']]] target_regions: One or more `target_region` blocks as documented below. """ + _SharedImageVersionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_uri=blob_uri, + deletion_of_replicated_locations_enabled=deletion_of_replicated_locations_enabled, + end_of_life_date=end_of_life_date, + exclude_from_latest=exclude_from_latest, + gallery_name=gallery_name, + image_name=image_name, + location=location, + managed_image_id=managed_image_id, + name=name, + os_disk_snapshot_id=os_disk_snapshot_id, + replication_mode=replication_mode, + resource_group_name=resource_group_name, + storage_account_id=storage_account_id, + tags=tags, + target_regions=target_regions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_uri: Optional[pulumi.Input[str]] = None, + deletion_of_replicated_locations_enabled: Optional[pulumi.Input[bool]] = None, + end_of_life_date: Optional[pulumi.Input[str]] = None, + exclude_from_latest: Optional[pulumi.Input[bool]] = None, + gallery_name: Optional[pulumi.Input[str]] = None, + image_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_image_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + os_disk_snapshot_id: Optional[pulumi.Input[str]] = None, + replication_mode: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_regions: Optional[pulumi.Input[Sequence[pulumi.Input['SharedImageVersionTargetRegionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_uri is None and 'blobUri' in kwargs: + blob_uri = kwargs['blobUri'] + if deletion_of_replicated_locations_enabled is None and 'deletionOfReplicatedLocationsEnabled' in kwargs: + deletion_of_replicated_locations_enabled = kwargs['deletionOfReplicatedLocationsEnabled'] + if end_of_life_date is None and 'endOfLifeDate' in kwargs: + end_of_life_date = kwargs['endOfLifeDate'] + if exclude_from_latest is None and 'excludeFromLatest' in kwargs: + exclude_from_latest = kwargs['excludeFromLatest'] + if gallery_name is None and 'galleryName' in kwargs: + gallery_name = kwargs['galleryName'] + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + if managed_image_id is None and 'managedImageId' in kwargs: + managed_image_id = kwargs['managedImageId'] + if os_disk_snapshot_id is None and 'osDiskSnapshotId' in kwargs: + os_disk_snapshot_id = kwargs['osDiskSnapshotId'] + if replication_mode is None and 'replicationMode' in kwargs: + replication_mode = kwargs['replicationMode'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if target_regions is None and 'targetRegions' in kwargs: + target_regions = kwargs['targetRegions'] + if blob_uri is not None: - pulumi.set(__self__, "blob_uri", blob_uri) + _setter("blob_uri", blob_uri) if deletion_of_replicated_locations_enabled is not None: - pulumi.set(__self__, "deletion_of_replicated_locations_enabled", deletion_of_replicated_locations_enabled) + _setter("deletion_of_replicated_locations_enabled", deletion_of_replicated_locations_enabled) if end_of_life_date is not None: - pulumi.set(__self__, "end_of_life_date", end_of_life_date) + _setter("end_of_life_date", end_of_life_date) if exclude_from_latest is not None: - pulumi.set(__self__, "exclude_from_latest", exclude_from_latest) + _setter("exclude_from_latest", exclude_from_latest) if gallery_name is not None: - pulumi.set(__self__, "gallery_name", gallery_name) + _setter("gallery_name", gallery_name) if image_name is not None: - pulumi.set(__self__, "image_name", image_name) + _setter("image_name", image_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_image_id is not None: - pulumi.set(__self__, "managed_image_id", managed_image_id) + _setter("managed_image_id", managed_image_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_disk_snapshot_id is not None: - pulumi.set(__self__, "os_disk_snapshot_id", os_disk_snapshot_id) + _setter("os_disk_snapshot_id", os_disk_snapshot_id) if replication_mode is not None: - pulumi.set(__self__, "replication_mode", replication_mode) + _setter("replication_mode", replication_mode) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_regions is not None: - pulumi.set(__self__, "target_regions", target_regions) + _setter("target_regions", target_regions) @property @pulumi.getter(name="blobUri") @@ -690,6 +824,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SharedImageVersionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/snapshot.py b/sdk/python/pulumi_azure/compute/snapshot.py index d89a88a245..07a7bcdf90 100644 --- a/sdk/python/pulumi_azure/compute/snapshot.py +++ b/sdk/python/pulumi_azure/compute/snapshot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,26 +45,77 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_id: Specifies the ID of an storage account. Used with `source_uri` to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "create_option", create_option) - pulumi.set(__self__, "resource_group_name", resource_group_name) + SnapshotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_option=create_option, + resource_group_name=resource_group_name, + disk_size_gb=disk_size_gb, + encryption_settings=encryption_settings, + incremental_enabled=incremental_enabled, + location=location, + name=name, + source_resource_id=source_resource_id, + source_uri=source_uri, + storage_account_id=storage_account_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_option: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + encryption_settings: Optional[pulumi.Input['SnapshotEncryptionSettingsArgs']] = None, + incremental_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + source_resource_id: Optional[pulumi.Input[str]] = None, + source_uri: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if create_option is None: + raise TypeError("Missing 'create_option' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if encryption_settings is None and 'encryptionSettings' in kwargs: + encryption_settings = kwargs['encryptionSettings'] + if incremental_enabled is None and 'incrementalEnabled' in kwargs: + incremental_enabled = kwargs['incrementalEnabled'] + if source_resource_id is None and 'sourceResourceId' in kwargs: + source_resource_id = kwargs['sourceResourceId'] + if source_uri is None and 'sourceUri' in kwargs: + source_uri = kwargs['sourceUri'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + + _setter("create_option", create_option) + _setter("resource_group_name", resource_group_name) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if encryption_settings is not None: - pulumi.set(__self__, "encryption_settings", encryption_settings) + _setter("encryption_settings", encryption_settings) if incremental_enabled is not None: - pulumi.set(__self__, "incremental_enabled", incremental_enabled) + _setter("incremental_enabled", incremental_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if source_resource_id is not None: - pulumi.set(__self__, "source_resource_id", source_resource_id) + _setter("source_resource_id", source_resource_id) if source_uri is not None: - pulumi.set(__self__, "source_uri", source_uri) + _setter("source_uri", source_uri) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="createOption") @@ -237,30 +288,81 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] trusted_launch_enabled: Whether Trusted Launch is enabled for the Snapshot. """ + _SnapshotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_option=create_option, + disk_size_gb=disk_size_gb, + encryption_settings=encryption_settings, + incremental_enabled=incremental_enabled, + location=location, + name=name, + resource_group_name=resource_group_name, + source_resource_id=source_resource_id, + source_uri=source_uri, + storage_account_id=storage_account_id, + tags=tags, + trusted_launch_enabled=trusted_launch_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_option: Optional[pulumi.Input[str]] = None, + disk_size_gb: Optional[pulumi.Input[int]] = None, + encryption_settings: Optional[pulumi.Input['SnapshotEncryptionSettingsArgs']] = None, + incremental_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source_resource_id: Optional[pulumi.Input[str]] = None, + source_uri: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + trusted_launch_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if disk_size_gb is None and 'diskSizeGb' in kwargs: + disk_size_gb = kwargs['diskSizeGb'] + if encryption_settings is None and 'encryptionSettings' in kwargs: + encryption_settings = kwargs['encryptionSettings'] + if incremental_enabled is None and 'incrementalEnabled' in kwargs: + incremental_enabled = kwargs['incrementalEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if source_resource_id is None and 'sourceResourceId' in kwargs: + source_resource_id = kwargs['sourceResourceId'] + if source_uri is None and 'sourceUri' in kwargs: + source_uri = kwargs['sourceUri'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if trusted_launch_enabled is None and 'trustedLaunchEnabled' in kwargs: + trusted_launch_enabled = kwargs['trustedLaunchEnabled'] + if create_option is not None: - pulumi.set(__self__, "create_option", create_option) + _setter("create_option", create_option) if disk_size_gb is not None: - pulumi.set(__self__, "disk_size_gb", disk_size_gb) + _setter("disk_size_gb", disk_size_gb) if encryption_settings is not None: - pulumi.set(__self__, "encryption_settings", encryption_settings) + _setter("encryption_settings", encryption_settings) if incremental_enabled is not None: - pulumi.set(__self__, "incremental_enabled", incremental_enabled) + _setter("incremental_enabled", incremental_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if source_resource_id is not None: - pulumi.set(__self__, "source_resource_id", source_resource_id) + _setter("source_resource_id", source_resource_id) if source_uri is not None: - pulumi.set(__self__, "source_uri", source_uri) + _setter("source_uri", source_uri) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if trusted_launch_enabled is not None: - pulumi.set(__self__, "trusted_launch_enabled", trusted_launch_enabled) + _setter("trusted_launch_enabled", trusted_launch_enabled) @property @pulumi.getter(name="createOption") @@ -524,6 +626,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SnapshotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -553,6 +659,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'create_option'") __props__.__dict__["create_option"] = create_option __props__.__dict__["disk_size_gb"] = disk_size_gb + if encryption_settings is not None and not isinstance(encryption_settings, SnapshotEncryptionSettingsArgs): + encryption_settings = encryption_settings or {} + def _setter(key, value): + encryption_settings[key] = value + SnapshotEncryptionSettingsArgs._configure(_setter, **encryption_settings) __props__.__dict__["encryption_settings"] = encryption_settings __props__.__dict__["incremental_enabled"] = incremental_enabled __props__.__dict__["location"] = location diff --git a/sdk/python/pulumi_azure/compute/ssh_public_key.py b/sdk/python/pulumi_azure/compute/ssh_public_key.py index 8269ed8e4a..3cfe7abe6a 100644 --- a/sdk/python/pulumi_azure/compute/ssh_public_key.py +++ b/sdk/python/pulumi_azure/compute/ssh_public_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SshPublicKeyArgs', 'SshPublicKey'] @@ -27,14 +27,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this SSH Public Key. Changing this forces a new SSH Public Key to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the SSH Public Key. """ - pulumi.set(__self__, "public_key", public_key) - pulumi.set(__self__, "resource_group_name", resource_group_name) + SshPublicKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_key=public_key, + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_key is None and 'publicKey' in kwargs: + public_key = kwargs['publicKey'] + if public_key is None: + raise TypeError("Missing 'public_key' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("public_key", public_key) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="publicKey") @@ -113,16 +140,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the SSH Public Key should exist. Changing this forces a new SSH Public Key to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the SSH Public Key. """ + _SshPublicKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + public_key=public_key, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_key is None and 'publicKey' in kwargs: + public_key = kwargs['publicKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_key is not None: - pulumi.set(__self__, "public_key", public_key) + _setter("public_key", public_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -266,6 +316,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SshPublicKeyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/compute/virtual_machine.py b/sdk/python/pulumi_azure/compute/virtual_machine.py index 10cffbffc0..c5abe48d38 100644 --- a/sdk/python/pulumi_azure/compute/virtual_machine.py +++ b/sdk/python/pulumi_azure/compute/virtual_machine.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -77,50 +77,151 @@ def __init__(__self__, *, For more information on the different example configurations, please check out the [Azure documentation](https://docs.microsoft.com/en-gb/rest/api/compute/virtualmachines/createorupdate#examples) """ - pulumi.set(__self__, "network_interface_ids", network_interface_ids) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_os_disk", storage_os_disk) - pulumi.set(__self__, "vm_size", vm_size) + VirtualMachineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_interface_ids=network_interface_ids, + resource_group_name=resource_group_name, + storage_os_disk=storage_os_disk, + vm_size=vm_size, + additional_capabilities=additional_capabilities, + availability_set_id=availability_set_id, + boot_diagnostics=boot_diagnostics, + delete_data_disks_on_termination=delete_data_disks_on_termination, + delete_os_disk_on_termination=delete_os_disk_on_termination, + identity=identity, + license_type=license_type, + location=location, + name=name, + os_profile=os_profile, + os_profile_linux_config=os_profile_linux_config, + os_profile_secrets=os_profile_secrets, + os_profile_windows_config=os_profile_windows_config, + plan=plan, + primary_network_interface_id=primary_network_interface_id, + proximity_placement_group_id=proximity_placement_group_id, + storage_data_disks=storage_data_disks, + storage_image_reference=storage_image_reference, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_interface_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_os_disk: Optional[pulumi.Input['VirtualMachineStorageOsDiskArgs']] = None, + vm_size: Optional[pulumi.Input[str]] = None, + additional_capabilities: Optional[pulumi.Input['VirtualMachineAdditionalCapabilitiesArgs']] = None, + availability_set_id: Optional[pulumi.Input[str]] = None, + boot_diagnostics: Optional[pulumi.Input['VirtualMachineBootDiagnosticsArgs']] = None, + delete_data_disks_on_termination: Optional[pulumi.Input[bool]] = None, + delete_os_disk_on_termination: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['VirtualMachineIdentityArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + os_profile: Optional[pulumi.Input['VirtualMachineOsProfileArgs']] = None, + os_profile_linux_config: Optional[pulumi.Input['VirtualMachineOsProfileLinuxConfigArgs']] = None, + os_profile_secrets: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineOsProfileSecretArgs']]]] = None, + os_profile_windows_config: Optional[pulumi.Input['VirtualMachineOsProfileWindowsConfigArgs']] = None, + plan: Optional[pulumi.Input['VirtualMachinePlanArgs']] = None, + primary_network_interface_id: Optional[pulumi.Input[str]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + storage_data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineStorageDataDiskArgs']]]] = None, + storage_image_reference: Optional[pulumi.Input['VirtualMachineStorageImageReferenceArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_interface_ids is None and 'networkInterfaceIds' in kwargs: + network_interface_ids = kwargs['networkInterfaceIds'] + if network_interface_ids is None: + raise TypeError("Missing 'network_interface_ids' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_os_disk is None and 'storageOsDisk' in kwargs: + storage_os_disk = kwargs['storageOsDisk'] + if storage_os_disk is None: + raise TypeError("Missing 'storage_os_disk' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if additional_capabilities is None and 'additionalCapabilities' in kwargs: + additional_capabilities = kwargs['additionalCapabilities'] + if availability_set_id is None and 'availabilitySetId' in kwargs: + availability_set_id = kwargs['availabilitySetId'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if delete_data_disks_on_termination is None and 'deleteDataDisksOnTermination' in kwargs: + delete_data_disks_on_termination = kwargs['deleteDataDisksOnTermination'] + if delete_os_disk_on_termination is None and 'deleteOsDiskOnTermination' in kwargs: + delete_os_disk_on_termination = kwargs['deleteOsDiskOnTermination'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if os_profile is None and 'osProfile' in kwargs: + os_profile = kwargs['osProfile'] + if os_profile_linux_config is None and 'osProfileLinuxConfig' in kwargs: + os_profile_linux_config = kwargs['osProfileLinuxConfig'] + if os_profile_secrets is None and 'osProfileSecrets' in kwargs: + os_profile_secrets = kwargs['osProfileSecrets'] + if os_profile_windows_config is None and 'osProfileWindowsConfig' in kwargs: + os_profile_windows_config = kwargs['osProfileWindowsConfig'] + if primary_network_interface_id is None and 'primaryNetworkInterfaceId' in kwargs: + primary_network_interface_id = kwargs['primaryNetworkInterfaceId'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if storage_data_disks is None and 'storageDataDisks' in kwargs: + storage_data_disks = kwargs['storageDataDisks'] + if storage_image_reference is None and 'storageImageReference' in kwargs: + storage_image_reference = kwargs['storageImageReference'] + + _setter("network_interface_ids", network_interface_ids) + _setter("resource_group_name", resource_group_name) + _setter("storage_os_disk", storage_os_disk) + _setter("vm_size", vm_size) if additional_capabilities is not None: - pulumi.set(__self__, "additional_capabilities", additional_capabilities) + _setter("additional_capabilities", additional_capabilities) if availability_set_id is not None: - pulumi.set(__self__, "availability_set_id", availability_set_id) + _setter("availability_set_id", availability_set_id) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if delete_data_disks_on_termination is not None: - pulumi.set(__self__, "delete_data_disks_on_termination", delete_data_disks_on_termination) + _setter("delete_data_disks_on_termination", delete_data_disks_on_termination) if delete_os_disk_on_termination is not None: - pulumi.set(__self__, "delete_os_disk_on_termination", delete_os_disk_on_termination) + _setter("delete_os_disk_on_termination", delete_os_disk_on_termination) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if os_profile is not None: - pulumi.set(__self__, "os_profile", os_profile) + _setter("os_profile", os_profile) if os_profile_linux_config is not None: - pulumi.set(__self__, "os_profile_linux_config", os_profile_linux_config) + _setter("os_profile_linux_config", os_profile_linux_config) if os_profile_secrets is not None: - pulumi.set(__self__, "os_profile_secrets", os_profile_secrets) + _setter("os_profile_secrets", os_profile_secrets) if os_profile_windows_config is not None: - pulumi.set(__self__, "os_profile_windows_config", os_profile_windows_config) + _setter("os_profile_windows_config", os_profile_windows_config) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if primary_network_interface_id is not None: - pulumi.set(__self__, "primary_network_interface_id", primary_network_interface_id) + _setter("primary_network_interface_id", primary_network_interface_id) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if storage_data_disks is not None: - pulumi.set(__self__, "storage_data_disks", storage_data_disks) + _setter("storage_data_disks", storage_data_disks) if storage_image_reference is not None: - pulumi.set(__self__, "storage_image_reference", storage_image_reference) + _setter("storage_image_reference", storage_image_reference) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="networkInterfaceIds") @@ -485,54 +586,147 @@ def __init__(__self__, *, For more information on the different example configurations, please check out the [Azure documentation](https://docs.microsoft.com/en-gb/rest/api/compute/virtualmachines/createorupdate#examples) """ + _VirtualMachineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_capabilities=additional_capabilities, + availability_set_id=availability_set_id, + boot_diagnostics=boot_diagnostics, + delete_data_disks_on_termination=delete_data_disks_on_termination, + delete_os_disk_on_termination=delete_os_disk_on_termination, + identity=identity, + license_type=license_type, + location=location, + name=name, + network_interface_ids=network_interface_ids, + os_profile=os_profile, + os_profile_linux_config=os_profile_linux_config, + os_profile_secrets=os_profile_secrets, + os_profile_windows_config=os_profile_windows_config, + plan=plan, + primary_network_interface_id=primary_network_interface_id, + proximity_placement_group_id=proximity_placement_group_id, + resource_group_name=resource_group_name, + storage_data_disks=storage_data_disks, + storage_image_reference=storage_image_reference, + storage_os_disk=storage_os_disk, + tags=tags, + vm_size=vm_size, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_capabilities: Optional[pulumi.Input['VirtualMachineAdditionalCapabilitiesArgs']] = None, + availability_set_id: Optional[pulumi.Input[str]] = None, + boot_diagnostics: Optional[pulumi.Input['VirtualMachineBootDiagnosticsArgs']] = None, + delete_data_disks_on_termination: Optional[pulumi.Input[bool]] = None, + delete_os_disk_on_termination: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['VirtualMachineIdentityArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_interface_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + os_profile: Optional[pulumi.Input['VirtualMachineOsProfileArgs']] = None, + os_profile_linux_config: Optional[pulumi.Input['VirtualMachineOsProfileLinuxConfigArgs']] = None, + os_profile_secrets: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineOsProfileSecretArgs']]]] = None, + os_profile_windows_config: Optional[pulumi.Input['VirtualMachineOsProfileWindowsConfigArgs']] = None, + plan: Optional[pulumi.Input['VirtualMachinePlanArgs']] = None, + primary_network_interface_id: Optional[pulumi.Input[str]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineStorageDataDiskArgs']]]] = None, + storage_image_reference: Optional[pulumi.Input['VirtualMachineStorageImageReferenceArgs']] = None, + storage_os_disk: Optional[pulumi.Input['VirtualMachineStorageOsDiskArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + zones: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_capabilities is None and 'additionalCapabilities' in kwargs: + additional_capabilities = kwargs['additionalCapabilities'] + if availability_set_id is None and 'availabilitySetId' in kwargs: + availability_set_id = kwargs['availabilitySetId'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if delete_data_disks_on_termination is None and 'deleteDataDisksOnTermination' in kwargs: + delete_data_disks_on_termination = kwargs['deleteDataDisksOnTermination'] + if delete_os_disk_on_termination is None and 'deleteOsDiskOnTermination' in kwargs: + delete_os_disk_on_termination = kwargs['deleteOsDiskOnTermination'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if network_interface_ids is None and 'networkInterfaceIds' in kwargs: + network_interface_ids = kwargs['networkInterfaceIds'] + if os_profile is None and 'osProfile' in kwargs: + os_profile = kwargs['osProfile'] + if os_profile_linux_config is None and 'osProfileLinuxConfig' in kwargs: + os_profile_linux_config = kwargs['osProfileLinuxConfig'] + if os_profile_secrets is None and 'osProfileSecrets' in kwargs: + os_profile_secrets = kwargs['osProfileSecrets'] + if os_profile_windows_config is None and 'osProfileWindowsConfig' in kwargs: + os_profile_windows_config = kwargs['osProfileWindowsConfig'] + if primary_network_interface_id is None and 'primaryNetworkInterfaceId' in kwargs: + primary_network_interface_id = kwargs['primaryNetworkInterfaceId'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_data_disks is None and 'storageDataDisks' in kwargs: + storage_data_disks = kwargs['storageDataDisks'] + if storage_image_reference is None and 'storageImageReference' in kwargs: + storage_image_reference = kwargs['storageImageReference'] + if storage_os_disk is None and 'storageOsDisk' in kwargs: + storage_os_disk = kwargs['storageOsDisk'] + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if additional_capabilities is not None: - pulumi.set(__self__, "additional_capabilities", additional_capabilities) + _setter("additional_capabilities", additional_capabilities) if availability_set_id is not None: - pulumi.set(__self__, "availability_set_id", availability_set_id) + _setter("availability_set_id", availability_set_id) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if delete_data_disks_on_termination is not None: - pulumi.set(__self__, "delete_data_disks_on_termination", delete_data_disks_on_termination) + _setter("delete_data_disks_on_termination", delete_data_disks_on_termination) if delete_os_disk_on_termination is not None: - pulumi.set(__self__, "delete_os_disk_on_termination", delete_os_disk_on_termination) + _setter("delete_os_disk_on_termination", delete_os_disk_on_termination) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_interface_ids is not None: - pulumi.set(__self__, "network_interface_ids", network_interface_ids) + _setter("network_interface_ids", network_interface_ids) if os_profile is not None: - pulumi.set(__self__, "os_profile", os_profile) + _setter("os_profile", os_profile) if os_profile_linux_config is not None: - pulumi.set(__self__, "os_profile_linux_config", os_profile_linux_config) + _setter("os_profile_linux_config", os_profile_linux_config) if os_profile_secrets is not None: - pulumi.set(__self__, "os_profile_secrets", os_profile_secrets) + _setter("os_profile_secrets", os_profile_secrets) if os_profile_windows_config is not None: - pulumi.set(__self__, "os_profile_windows_config", os_profile_windows_config) + _setter("os_profile_windows_config", os_profile_windows_config) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if primary_network_interface_id is not None: - pulumi.set(__self__, "primary_network_interface_id", primary_network_interface_id) + _setter("primary_network_interface_id", primary_network_interface_id) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if storage_data_disks is not None: - pulumi.set(__self__, "storage_data_disks", storage_data_disks) + _setter("storage_data_disks", storage_data_disks) if storage_image_reference is not None: - pulumi.set(__self__, "storage_image_reference", storage_image_reference) + _setter("storage_image_reference", storage_image_reference) if storage_os_disk is not None: - pulumi.set(__self__, "storage_os_disk", storage_os_disk) + _setter("storage_os_disk", storage_os_disk) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if vm_size is not None: - pulumi.set(__self__, "vm_size", vm_size) + _setter("vm_size", vm_size) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="additionalCapabilities") @@ -1070,6 +1264,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualMachineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1108,11 +1306,26 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = VirtualMachineArgs.__new__(VirtualMachineArgs) + if additional_capabilities is not None and not isinstance(additional_capabilities, VirtualMachineAdditionalCapabilitiesArgs): + additional_capabilities = additional_capabilities or {} + def _setter(key, value): + additional_capabilities[key] = value + VirtualMachineAdditionalCapabilitiesArgs._configure(_setter, **additional_capabilities) __props__.__dict__["additional_capabilities"] = additional_capabilities __props__.__dict__["availability_set_id"] = availability_set_id + if boot_diagnostics is not None and not isinstance(boot_diagnostics, VirtualMachineBootDiagnosticsArgs): + boot_diagnostics = boot_diagnostics or {} + def _setter(key, value): + boot_diagnostics[key] = value + VirtualMachineBootDiagnosticsArgs._configure(_setter, **boot_diagnostics) __props__.__dict__["boot_diagnostics"] = boot_diagnostics __props__.__dict__["delete_data_disks_on_termination"] = delete_data_disks_on_termination __props__.__dict__["delete_os_disk_on_termination"] = delete_os_disk_on_termination + if identity is not None and not isinstance(identity, VirtualMachineIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + VirtualMachineIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["license_type"] = license_type __props__.__dict__["location"] = location @@ -1120,10 +1333,30 @@ def _internal_init(__self__, if network_interface_ids is None and not opts.urn: raise TypeError("Missing required property 'network_interface_ids'") __props__.__dict__["network_interface_ids"] = network_interface_ids + if os_profile is not None and not isinstance(os_profile, VirtualMachineOsProfileArgs): + os_profile = os_profile or {} + def _setter(key, value): + os_profile[key] = value + VirtualMachineOsProfileArgs._configure(_setter, **os_profile) __props__.__dict__["os_profile"] = os_profile + if os_profile_linux_config is not None and not isinstance(os_profile_linux_config, VirtualMachineOsProfileLinuxConfigArgs): + os_profile_linux_config = os_profile_linux_config or {} + def _setter(key, value): + os_profile_linux_config[key] = value + VirtualMachineOsProfileLinuxConfigArgs._configure(_setter, **os_profile_linux_config) __props__.__dict__["os_profile_linux_config"] = os_profile_linux_config __props__.__dict__["os_profile_secrets"] = os_profile_secrets + if os_profile_windows_config is not None and not isinstance(os_profile_windows_config, VirtualMachineOsProfileWindowsConfigArgs): + os_profile_windows_config = os_profile_windows_config or {} + def _setter(key, value): + os_profile_windows_config[key] = value + VirtualMachineOsProfileWindowsConfigArgs._configure(_setter, **os_profile_windows_config) __props__.__dict__["os_profile_windows_config"] = os_profile_windows_config + if plan is not None and not isinstance(plan, VirtualMachinePlanArgs): + plan = plan or {} + def _setter(key, value): + plan[key] = value + VirtualMachinePlanArgs._configure(_setter, **plan) __props__.__dict__["plan"] = plan __props__.__dict__["primary_network_interface_id"] = primary_network_interface_id __props__.__dict__["proximity_placement_group_id"] = proximity_placement_group_id @@ -1131,7 +1364,17 @@ def _internal_init(__self__, raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["storage_data_disks"] = storage_data_disks + if storage_image_reference is not None and not isinstance(storage_image_reference, VirtualMachineStorageImageReferenceArgs): + storage_image_reference = storage_image_reference or {} + def _setter(key, value): + storage_image_reference[key] = value + VirtualMachineStorageImageReferenceArgs._configure(_setter, **storage_image_reference) __props__.__dict__["storage_image_reference"] = storage_image_reference + if storage_os_disk is not None and not isinstance(storage_os_disk, VirtualMachineStorageOsDiskArgs): + storage_os_disk = storage_os_disk or {} + def _setter(key, value): + storage_os_disk[key] = value + VirtualMachineStorageOsDiskArgs._configure(_setter, **storage_os_disk) if storage_os_disk is None and not opts.urn: raise TypeError("Missing required property 'storage_os_disk'") __props__.__dict__["storage_os_disk"] = storage_os_disk diff --git a/sdk/python/pulumi_azure/compute/virtual_machine_scale_set_extension.py b/sdk/python/pulumi_azure/compute/virtual_machine_scale_set_extension.py index 5a04873a6c..65def816fe 100644 --- a/sdk/python/pulumi_azure/compute/virtual_machine_scale_set_extension.py +++ b/sdk/python/pulumi_azure/compute/virtual_machine_scale_set_extension.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -61,28 +61,89 @@ def __init__(__self__, *, > **NOTE:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. """ - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_handler_version", type_handler_version) - pulumi.set(__self__, "virtual_machine_scale_set_id", virtual_machine_scale_set_id) + VirtualMachineScaleSetExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + publisher=publisher, + type=type, + type_handler_version=type_handler_version, + virtual_machine_scale_set_id=virtual_machine_scale_set_id, + auto_upgrade_minor_version=auto_upgrade_minor_version, + automatic_upgrade_enabled=automatic_upgrade_enabled, + failure_suppression_enabled=failure_suppression_enabled, + force_update_tag=force_update_tag, + name=name, + protected_settings=protected_settings, + protected_settings_from_key_vault=protected_settings_from_key_vault, + provision_after_extensions=provision_after_extensions, + settings=settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + publisher: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + type_handler_version: Optional[pulumi.Input[str]] = None, + virtual_machine_scale_set_id: Optional[pulumi.Input[str]] = None, + auto_upgrade_minor_version: Optional[pulumi.Input[bool]] = None, + automatic_upgrade_enabled: Optional[pulumi.Input[bool]] = None, + failure_suppression_enabled: Optional[pulumi.Input[bool]] = None, + force_update_tag: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + protected_settings: Optional[pulumi.Input[str]] = None, + protected_settings_from_key_vault: Optional[pulumi.Input['VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultArgs']] = None, + provision_after_extensions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + settings: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if type_handler_version is None: + raise TypeError("Missing 'type_handler_version' argument") + if virtual_machine_scale_set_id is None and 'virtualMachineScaleSetId' in kwargs: + virtual_machine_scale_set_id = kwargs['virtualMachineScaleSetId'] + if virtual_machine_scale_set_id is None: + raise TypeError("Missing 'virtual_machine_scale_set_id' argument") + if auto_upgrade_minor_version is None and 'autoUpgradeMinorVersion' in kwargs: + auto_upgrade_minor_version = kwargs['autoUpgradeMinorVersion'] + if automatic_upgrade_enabled is None and 'automaticUpgradeEnabled' in kwargs: + automatic_upgrade_enabled = kwargs['automaticUpgradeEnabled'] + if failure_suppression_enabled is None and 'failureSuppressionEnabled' in kwargs: + failure_suppression_enabled = kwargs['failureSuppressionEnabled'] + if force_update_tag is None and 'forceUpdateTag' in kwargs: + force_update_tag = kwargs['forceUpdateTag'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if protected_settings_from_key_vault is None and 'protectedSettingsFromKeyVault' in kwargs: + protected_settings_from_key_vault = kwargs['protectedSettingsFromKeyVault'] + if provision_after_extensions is None and 'provisionAfterExtensions' in kwargs: + provision_after_extensions = kwargs['provisionAfterExtensions'] + + _setter("publisher", publisher) + _setter("type", type) + _setter("type_handler_version", type_handler_version) + _setter("virtual_machine_scale_set_id", virtual_machine_scale_set_id) if auto_upgrade_minor_version is not None: - pulumi.set(__self__, "auto_upgrade_minor_version", auto_upgrade_minor_version) + _setter("auto_upgrade_minor_version", auto_upgrade_minor_version) if automatic_upgrade_enabled is not None: - pulumi.set(__self__, "automatic_upgrade_enabled", automatic_upgrade_enabled) + _setter("automatic_upgrade_enabled", automatic_upgrade_enabled) if failure_suppression_enabled is not None: - pulumi.set(__self__, "failure_suppression_enabled", failure_suppression_enabled) + _setter("failure_suppression_enabled", failure_suppression_enabled) if force_update_tag is not None: - pulumi.set(__self__, "force_update_tag", force_update_tag) + _setter("force_update_tag", force_update_tag) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if protected_settings_from_key_vault is not None: - pulumi.set(__self__, "protected_settings_from_key_vault", protected_settings_from_key_vault) + _setter("protected_settings_from_key_vault", protected_settings_from_key_vault) if provision_after_extensions is not None: - pulumi.set(__self__, "provision_after_extensions", provision_after_extensions) + _setter("provision_after_extensions", provision_after_extensions) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) @property @pulumi.getter @@ -305,32 +366,85 @@ def __init__(__self__, *, > **NOTE:** This should be the ID from the `compute.LinuxVirtualMachineScaleSet` or `compute.WindowsVirtualMachineScaleSet` resource - when using the older `compute.ScaleSet` resource extensions should instead be defined inline. """ + _VirtualMachineScaleSetExtensionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_upgrade_minor_version=auto_upgrade_minor_version, + automatic_upgrade_enabled=automatic_upgrade_enabled, + failure_suppression_enabled=failure_suppression_enabled, + force_update_tag=force_update_tag, + name=name, + protected_settings=protected_settings, + protected_settings_from_key_vault=protected_settings_from_key_vault, + provision_after_extensions=provision_after_extensions, + publisher=publisher, + settings=settings, + type=type, + type_handler_version=type_handler_version, + virtual_machine_scale_set_id=virtual_machine_scale_set_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_upgrade_minor_version: Optional[pulumi.Input[bool]] = None, + automatic_upgrade_enabled: Optional[pulumi.Input[bool]] = None, + failure_suppression_enabled: Optional[pulumi.Input[bool]] = None, + force_update_tag: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + protected_settings: Optional[pulumi.Input[str]] = None, + protected_settings_from_key_vault: Optional[pulumi.Input['VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultArgs']] = None, + provision_after_extensions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + publisher: Optional[pulumi.Input[str]] = None, + settings: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + type_handler_version: Optional[pulumi.Input[str]] = None, + virtual_machine_scale_set_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_upgrade_minor_version is None and 'autoUpgradeMinorVersion' in kwargs: + auto_upgrade_minor_version = kwargs['autoUpgradeMinorVersion'] + if automatic_upgrade_enabled is None and 'automaticUpgradeEnabled' in kwargs: + automatic_upgrade_enabled = kwargs['automaticUpgradeEnabled'] + if failure_suppression_enabled is None and 'failureSuppressionEnabled' in kwargs: + failure_suppression_enabled = kwargs['failureSuppressionEnabled'] + if force_update_tag is None and 'forceUpdateTag' in kwargs: + force_update_tag = kwargs['forceUpdateTag'] + if protected_settings is None and 'protectedSettings' in kwargs: + protected_settings = kwargs['protectedSettings'] + if protected_settings_from_key_vault is None and 'protectedSettingsFromKeyVault' in kwargs: + protected_settings_from_key_vault = kwargs['protectedSettingsFromKeyVault'] + if provision_after_extensions is None and 'provisionAfterExtensions' in kwargs: + provision_after_extensions = kwargs['provisionAfterExtensions'] + if type_handler_version is None and 'typeHandlerVersion' in kwargs: + type_handler_version = kwargs['typeHandlerVersion'] + if virtual_machine_scale_set_id is None and 'virtualMachineScaleSetId' in kwargs: + virtual_machine_scale_set_id = kwargs['virtualMachineScaleSetId'] + if auto_upgrade_minor_version is not None: - pulumi.set(__self__, "auto_upgrade_minor_version", auto_upgrade_minor_version) + _setter("auto_upgrade_minor_version", auto_upgrade_minor_version) if automatic_upgrade_enabled is not None: - pulumi.set(__self__, "automatic_upgrade_enabled", automatic_upgrade_enabled) + _setter("automatic_upgrade_enabled", automatic_upgrade_enabled) if failure_suppression_enabled is not None: - pulumi.set(__self__, "failure_suppression_enabled", failure_suppression_enabled) + _setter("failure_suppression_enabled", failure_suppression_enabled) if force_update_tag is not None: - pulumi.set(__self__, "force_update_tag", force_update_tag) + _setter("force_update_tag", force_update_tag) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protected_settings is not None: - pulumi.set(__self__, "protected_settings", protected_settings) + _setter("protected_settings", protected_settings) if protected_settings_from_key_vault is not None: - pulumi.set(__self__, "protected_settings_from_key_vault", protected_settings_from_key_vault) + _setter("protected_settings_from_key_vault", protected_settings_from_key_vault) if provision_after_extensions is not None: - pulumi.set(__self__, "provision_after_extensions", provision_after_extensions) + _setter("provision_after_extensions", provision_after_extensions) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if type_handler_version is not None: - pulumi.set(__self__, "type_handler_version", type_handler_version) + _setter("type_handler_version", type_handler_version) if virtual_machine_scale_set_id is not None: - pulumi.set(__self__, "virtual_machine_scale_set_id", virtual_machine_scale_set_id) + _setter("virtual_machine_scale_set_id", virtual_machine_scale_set_id) @property @pulumi.getter(name="autoUpgradeMinorVersion") @@ -678,6 +792,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualMachineScaleSetExtensionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -711,6 +829,11 @@ def _internal_init(__self__, __props__.__dict__["force_update_tag"] = force_update_tag __props__.__dict__["name"] = name __props__.__dict__["protected_settings"] = None if protected_settings is None else pulumi.Output.secret(protected_settings) + if protected_settings_from_key_vault is not None and not isinstance(protected_settings_from_key_vault, VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultArgs): + protected_settings_from_key_vault = protected_settings_from_key_vault or {} + def _setter(key, value): + protected_settings_from_key_vault[key] = value + VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultArgs._configure(_setter, **protected_settings_from_key_vault) __props__.__dict__["protected_settings_from_key_vault"] = protected_settings_from_key_vault __props__.__dict__["provision_after_extensions"] = provision_after_extensions if publisher is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/compute/windows_virtual_machine.py b/sdk/python/pulumi_azure/compute/windows_virtual_machine.py index dbae78dcc8..3322185d86 100644 --- a/sdk/python/pulumi_azure/compute/windows_virtual_machine.py +++ b/sdk/python/pulumi_azure/compute/windows_virtual_machine.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -138,98 +138,295 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineWinrmListenerArgs']]] winrm_listeners: One or more `winrm_listener` blocks as defined below. Changing this forces a new resource to be created. :param pulumi.Input[str] zone: * `zones` - (Optional) Specifies the Availability Zone in which this Windows Virtual Machine should be located. Changing this forces a new Windows Virtual Machine to be created. """ - pulumi.set(__self__, "admin_password", admin_password) - pulumi.set(__self__, "admin_username", admin_username) - pulumi.set(__self__, "network_interface_ids", network_interface_ids) - pulumi.set(__self__, "os_disk", os_disk) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "size", size) + WindowsVirtualMachineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_password=admin_password, + admin_username=admin_username, + network_interface_ids=network_interface_ids, + os_disk=os_disk, + resource_group_name=resource_group_name, + size=size, + additional_capabilities=additional_capabilities, + additional_unattend_contents=additional_unattend_contents, + allow_extension_operations=allow_extension_operations, + availability_set_id=availability_set_id, + boot_diagnostics=boot_diagnostics, + bypass_platform_safety_checks_on_user_schedule_enabled=bypass_platform_safety_checks_on_user_schedule_enabled, + capacity_reservation_group_id=capacity_reservation_group_id, + computer_name=computer_name, + custom_data=custom_data, + dedicated_host_group_id=dedicated_host_group_id, + dedicated_host_id=dedicated_host_id, + edge_zone=edge_zone, + enable_automatic_updates=enable_automatic_updates, + encryption_at_host_enabled=encryption_at_host_enabled, + eviction_policy=eviction_policy, + extensions_time_budget=extensions_time_budget, + gallery_applications=gallery_applications, + hotpatching_enabled=hotpatching_enabled, + identity=identity, + license_type=license_type, + location=location, + max_bid_price=max_bid_price, + name=name, + patch_assessment_mode=patch_assessment_mode, + patch_mode=patch_mode, + plan=plan, + platform_fault_domain=platform_fault_domain, + priority=priority, + provision_vm_agent=provision_vm_agent, + proximity_placement_group_id=proximity_placement_group_id, + reboot_setting=reboot_setting, + secrets=secrets, + secure_boot_enabled=secure_boot_enabled, + source_image_id=source_image_id, + source_image_reference=source_image_reference, + tags=tags, + termination_notification=termination_notification, + timezone=timezone, + user_data=user_data, + virtual_machine_scale_set_id=virtual_machine_scale_set_id, + vtpm_enabled=vtpm_enabled, + winrm_listeners=winrm_listeners, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_password: Optional[pulumi.Input[str]] = None, + admin_username: Optional[pulumi.Input[str]] = None, + network_interface_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + os_disk: Optional[pulumi.Input['WindowsVirtualMachineOsDiskArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + size: Optional[pulumi.Input[str]] = None, + additional_capabilities: Optional[pulumi.Input['WindowsVirtualMachineAdditionalCapabilitiesArgs']] = None, + additional_unattend_contents: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineAdditionalUnattendContentArgs']]]] = None, + allow_extension_operations: Optional[pulumi.Input[bool]] = None, + availability_set_id: Optional[pulumi.Input[str]] = None, + boot_diagnostics: Optional[pulumi.Input['WindowsVirtualMachineBootDiagnosticsArgs']] = None, + bypass_platform_safety_checks_on_user_schedule_enabled: Optional[pulumi.Input[bool]] = None, + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + computer_name: Optional[pulumi.Input[str]] = None, + custom_data: Optional[pulumi.Input[str]] = None, + dedicated_host_group_id: Optional[pulumi.Input[str]] = None, + dedicated_host_id: Optional[pulumi.Input[str]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + enable_automatic_updates: Optional[pulumi.Input[bool]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + extensions_time_budget: Optional[pulumi.Input[str]] = None, + gallery_applications: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineGalleryApplicationArgs']]]] = None, + hotpatching_enabled: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['WindowsVirtualMachineIdentityArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_bid_price: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + patch_assessment_mode: Optional[pulumi.Input[str]] = None, + patch_mode: Optional[pulumi.Input[str]] = None, + plan: Optional[pulumi.Input['WindowsVirtualMachinePlanArgs']] = None, + platform_fault_domain: Optional[pulumi.Input[int]] = None, + priority: Optional[pulumi.Input[str]] = None, + provision_vm_agent: Optional[pulumi.Input[bool]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + reboot_setting: Optional[pulumi.Input[str]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineSecretArgs']]]] = None, + secure_boot_enabled: Optional[pulumi.Input[bool]] = None, + source_image_id: Optional[pulumi.Input[str]] = None, + source_image_reference: Optional[pulumi.Input['WindowsVirtualMachineSourceImageReferenceArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + termination_notification: Optional[pulumi.Input['WindowsVirtualMachineTerminationNotificationArgs']] = None, + timezone: Optional[pulumi.Input[str]] = None, + user_data: Optional[pulumi.Input[str]] = None, + virtual_machine_scale_set_id: Optional[pulumi.Input[str]] = None, + vtpm_enabled: Optional[pulumi.Input[bool]] = None, + winrm_listeners: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineWinrmListenerArgs']]]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if admin_password is None: + raise TypeError("Missing 'admin_password' argument") + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if network_interface_ids is None and 'networkInterfaceIds' in kwargs: + network_interface_ids = kwargs['networkInterfaceIds'] + if network_interface_ids is None: + raise TypeError("Missing 'network_interface_ids' argument") + if os_disk is None and 'osDisk' in kwargs: + os_disk = kwargs['osDisk'] + if os_disk is None: + raise TypeError("Missing 'os_disk' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if size is None: + raise TypeError("Missing 'size' argument") + if additional_capabilities is None and 'additionalCapabilities' in kwargs: + additional_capabilities = kwargs['additionalCapabilities'] + if additional_unattend_contents is None and 'additionalUnattendContents' in kwargs: + additional_unattend_contents = kwargs['additionalUnattendContents'] + if allow_extension_operations is None and 'allowExtensionOperations' in kwargs: + allow_extension_operations = kwargs['allowExtensionOperations'] + if availability_set_id is None and 'availabilitySetId' in kwargs: + availability_set_id = kwargs['availabilitySetId'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if bypass_platform_safety_checks_on_user_schedule_enabled is None and 'bypassPlatformSafetyChecksOnUserScheduleEnabled' in kwargs: + bypass_platform_safety_checks_on_user_schedule_enabled = kwargs['bypassPlatformSafetyChecksOnUserScheduleEnabled'] + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if computer_name is None and 'computerName' in kwargs: + computer_name = kwargs['computerName'] + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + if dedicated_host_group_id is None and 'dedicatedHostGroupId' in kwargs: + dedicated_host_group_id = kwargs['dedicatedHostGroupId'] + if dedicated_host_id is None and 'dedicatedHostId' in kwargs: + dedicated_host_id = kwargs['dedicatedHostId'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if enable_automatic_updates is None and 'enableAutomaticUpdates' in kwargs: + enable_automatic_updates = kwargs['enableAutomaticUpdates'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if extensions_time_budget is None and 'extensionsTimeBudget' in kwargs: + extensions_time_budget = kwargs['extensionsTimeBudget'] + if gallery_applications is None and 'galleryApplications' in kwargs: + gallery_applications = kwargs['galleryApplications'] + if hotpatching_enabled is None and 'hotpatchingEnabled' in kwargs: + hotpatching_enabled = kwargs['hotpatchingEnabled'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_bid_price is None and 'maxBidPrice' in kwargs: + max_bid_price = kwargs['maxBidPrice'] + if patch_assessment_mode is None and 'patchAssessmentMode' in kwargs: + patch_assessment_mode = kwargs['patchAssessmentMode'] + if patch_mode is None and 'patchMode' in kwargs: + patch_mode = kwargs['patchMode'] + if platform_fault_domain is None and 'platformFaultDomain' in kwargs: + platform_fault_domain = kwargs['platformFaultDomain'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if reboot_setting is None and 'rebootSetting' in kwargs: + reboot_setting = kwargs['rebootSetting'] + if secure_boot_enabled is None and 'secureBootEnabled' in kwargs: + secure_boot_enabled = kwargs['secureBootEnabled'] + if source_image_id is None and 'sourceImageId' in kwargs: + source_image_id = kwargs['sourceImageId'] + if source_image_reference is None and 'sourceImageReference' in kwargs: + source_image_reference = kwargs['sourceImageReference'] + if termination_notification is None and 'terminationNotification' in kwargs: + termination_notification = kwargs['terminationNotification'] + if user_data is None and 'userData' in kwargs: + user_data = kwargs['userData'] + if virtual_machine_scale_set_id is None and 'virtualMachineScaleSetId' in kwargs: + virtual_machine_scale_set_id = kwargs['virtualMachineScaleSetId'] + if vtpm_enabled is None and 'vtpmEnabled' in kwargs: + vtpm_enabled = kwargs['vtpmEnabled'] + if winrm_listeners is None and 'winrmListeners' in kwargs: + winrm_listeners = kwargs['winrmListeners'] + + _setter("admin_password", admin_password) + _setter("admin_username", admin_username) + _setter("network_interface_ids", network_interface_ids) + _setter("os_disk", os_disk) + _setter("resource_group_name", resource_group_name) + _setter("size", size) if additional_capabilities is not None: - pulumi.set(__self__, "additional_capabilities", additional_capabilities) + _setter("additional_capabilities", additional_capabilities) if additional_unattend_contents is not None: - pulumi.set(__self__, "additional_unattend_contents", additional_unattend_contents) + _setter("additional_unattend_contents", additional_unattend_contents) if allow_extension_operations is not None: - pulumi.set(__self__, "allow_extension_operations", allow_extension_operations) + _setter("allow_extension_operations", allow_extension_operations) if availability_set_id is not None: - pulumi.set(__self__, "availability_set_id", availability_set_id) + _setter("availability_set_id", availability_set_id) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if bypass_platform_safety_checks_on_user_schedule_enabled is not None: - pulumi.set(__self__, "bypass_platform_safety_checks_on_user_schedule_enabled", bypass_platform_safety_checks_on_user_schedule_enabled) + _setter("bypass_platform_safety_checks_on_user_schedule_enabled", bypass_platform_safety_checks_on_user_schedule_enabled) if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if computer_name is not None: - pulumi.set(__self__, "computer_name", computer_name) + _setter("computer_name", computer_name) if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) if dedicated_host_group_id is not None: - pulumi.set(__self__, "dedicated_host_group_id", dedicated_host_group_id) + _setter("dedicated_host_group_id", dedicated_host_group_id) if dedicated_host_id is not None: - pulumi.set(__self__, "dedicated_host_id", dedicated_host_id) + _setter("dedicated_host_id", dedicated_host_id) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if enable_automatic_updates is not None: - pulumi.set(__self__, "enable_automatic_updates", enable_automatic_updates) + _setter("enable_automatic_updates", enable_automatic_updates) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if extensions_time_budget is not None: - pulumi.set(__self__, "extensions_time_budget", extensions_time_budget) + _setter("extensions_time_budget", extensions_time_budget) if gallery_applications is not None: - pulumi.set(__self__, "gallery_applications", gallery_applications) + _setter("gallery_applications", gallery_applications) if hotpatching_enabled is not None: - pulumi.set(__self__, "hotpatching_enabled", hotpatching_enabled) + _setter("hotpatching_enabled", hotpatching_enabled) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_bid_price is not None: - pulumi.set(__self__, "max_bid_price", max_bid_price) + _setter("max_bid_price", max_bid_price) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if patch_assessment_mode is not None: - pulumi.set(__self__, "patch_assessment_mode", patch_assessment_mode) + _setter("patch_assessment_mode", patch_assessment_mode) if patch_mode is not None: - pulumi.set(__self__, "patch_mode", patch_mode) + _setter("patch_mode", patch_mode) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if platform_fault_domain is not None: - pulumi.set(__self__, "platform_fault_domain", platform_fault_domain) + _setter("platform_fault_domain", platform_fault_domain) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if reboot_setting is not None: - pulumi.set(__self__, "reboot_setting", reboot_setting) + _setter("reboot_setting", reboot_setting) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) if secure_boot_enabled is not None: - pulumi.set(__self__, "secure_boot_enabled", secure_boot_enabled) + _setter("secure_boot_enabled", secure_boot_enabled) if source_image_id is not None: - pulumi.set(__self__, "source_image_id", source_image_id) + _setter("source_image_id", source_image_id) if source_image_reference is not None: - pulumi.set(__self__, "source_image_reference", source_image_reference) + _setter("source_image_reference", source_image_reference) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if termination_notification is not None: - pulumi.set(__self__, "termination_notification", termination_notification) + _setter("termination_notification", termination_notification) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) if user_data is not None: - pulumi.set(__self__, "user_data", user_data) + _setter("user_data", user_data) if virtual_machine_scale_set_id is not None: - pulumi.set(__self__, "virtual_machine_scale_set_id", virtual_machine_scale_set_id) + _setter("virtual_machine_scale_set_id", virtual_machine_scale_set_id) if vtpm_enabled is not None: - pulumi.set(__self__, "vtpm_enabled", vtpm_enabled) + _setter("vtpm_enabled", vtpm_enabled) if winrm_listeners is not None: - pulumi.set(__self__, "winrm_listeners", winrm_listeners) + _setter("winrm_listeners", winrm_listeners) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="adminPassword") @@ -974,114 +1171,319 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineWinrmListenerArgs']]] winrm_listeners: One or more `winrm_listener` blocks as defined below. Changing this forces a new resource to be created. :param pulumi.Input[str] zone: * `zones` - (Optional) Specifies the Availability Zone in which this Windows Virtual Machine should be located. Changing this forces a new Windows Virtual Machine to be created. """ + _WindowsVirtualMachineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_capabilities=additional_capabilities, + additional_unattend_contents=additional_unattend_contents, + admin_password=admin_password, + admin_username=admin_username, + allow_extension_operations=allow_extension_operations, + availability_set_id=availability_set_id, + boot_diagnostics=boot_diagnostics, + bypass_platform_safety_checks_on_user_schedule_enabled=bypass_platform_safety_checks_on_user_schedule_enabled, + capacity_reservation_group_id=capacity_reservation_group_id, + computer_name=computer_name, + custom_data=custom_data, + dedicated_host_group_id=dedicated_host_group_id, + dedicated_host_id=dedicated_host_id, + edge_zone=edge_zone, + enable_automatic_updates=enable_automatic_updates, + encryption_at_host_enabled=encryption_at_host_enabled, + eviction_policy=eviction_policy, + extensions_time_budget=extensions_time_budget, + gallery_applications=gallery_applications, + hotpatching_enabled=hotpatching_enabled, + identity=identity, + license_type=license_type, + location=location, + max_bid_price=max_bid_price, + name=name, + network_interface_ids=network_interface_ids, + os_disk=os_disk, + patch_assessment_mode=patch_assessment_mode, + patch_mode=patch_mode, + plan=plan, + platform_fault_domain=platform_fault_domain, + priority=priority, + private_ip_address=private_ip_address, + private_ip_addresses=private_ip_addresses, + provision_vm_agent=provision_vm_agent, + proximity_placement_group_id=proximity_placement_group_id, + public_ip_address=public_ip_address, + public_ip_addresses=public_ip_addresses, + reboot_setting=reboot_setting, + resource_group_name=resource_group_name, + secrets=secrets, + secure_boot_enabled=secure_boot_enabled, + size=size, + source_image_id=source_image_id, + source_image_reference=source_image_reference, + tags=tags, + termination_notification=termination_notification, + timezone=timezone, + user_data=user_data, + virtual_machine_id=virtual_machine_id, + virtual_machine_scale_set_id=virtual_machine_scale_set_id, + vtpm_enabled=vtpm_enabled, + winrm_listeners=winrm_listeners, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_capabilities: Optional[pulumi.Input['WindowsVirtualMachineAdditionalCapabilitiesArgs']] = None, + additional_unattend_contents: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineAdditionalUnattendContentArgs']]]] = None, + admin_password: Optional[pulumi.Input[str]] = None, + admin_username: Optional[pulumi.Input[str]] = None, + allow_extension_operations: Optional[pulumi.Input[bool]] = None, + availability_set_id: Optional[pulumi.Input[str]] = None, + boot_diagnostics: Optional[pulumi.Input['WindowsVirtualMachineBootDiagnosticsArgs']] = None, + bypass_platform_safety_checks_on_user_schedule_enabled: Optional[pulumi.Input[bool]] = None, + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + computer_name: Optional[pulumi.Input[str]] = None, + custom_data: Optional[pulumi.Input[str]] = None, + dedicated_host_group_id: Optional[pulumi.Input[str]] = None, + dedicated_host_id: Optional[pulumi.Input[str]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + enable_automatic_updates: Optional[pulumi.Input[bool]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + extensions_time_budget: Optional[pulumi.Input[str]] = None, + gallery_applications: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineGalleryApplicationArgs']]]] = None, + hotpatching_enabled: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['WindowsVirtualMachineIdentityArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_bid_price: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + network_interface_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + os_disk: Optional[pulumi.Input['WindowsVirtualMachineOsDiskArgs']] = None, + patch_assessment_mode: Optional[pulumi.Input[str]] = None, + patch_mode: Optional[pulumi.Input[str]] = None, + plan: Optional[pulumi.Input['WindowsVirtualMachinePlanArgs']] = None, + platform_fault_domain: Optional[pulumi.Input[int]] = None, + priority: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + private_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + provision_vm_agent: Optional[pulumi.Input[bool]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + public_ip_address: Optional[pulumi.Input[str]] = None, + public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + reboot_setting: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineSecretArgs']]]] = None, + secure_boot_enabled: Optional[pulumi.Input[bool]] = None, + size: Optional[pulumi.Input[str]] = None, + source_image_id: Optional[pulumi.Input[str]] = None, + source_image_reference: Optional[pulumi.Input['WindowsVirtualMachineSourceImageReferenceArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + termination_notification: Optional[pulumi.Input['WindowsVirtualMachineTerminationNotificationArgs']] = None, + timezone: Optional[pulumi.Input[str]] = None, + user_data: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + virtual_machine_scale_set_id: Optional[pulumi.Input[str]] = None, + vtpm_enabled: Optional[pulumi.Input[bool]] = None, + winrm_listeners: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineWinrmListenerArgs']]]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_capabilities is None and 'additionalCapabilities' in kwargs: + additional_capabilities = kwargs['additionalCapabilities'] + if additional_unattend_contents is None and 'additionalUnattendContents' in kwargs: + additional_unattend_contents = kwargs['additionalUnattendContents'] + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if allow_extension_operations is None and 'allowExtensionOperations' in kwargs: + allow_extension_operations = kwargs['allowExtensionOperations'] + if availability_set_id is None and 'availabilitySetId' in kwargs: + availability_set_id = kwargs['availabilitySetId'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if bypass_platform_safety_checks_on_user_schedule_enabled is None and 'bypassPlatformSafetyChecksOnUserScheduleEnabled' in kwargs: + bypass_platform_safety_checks_on_user_schedule_enabled = kwargs['bypassPlatformSafetyChecksOnUserScheduleEnabled'] + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if computer_name is None and 'computerName' in kwargs: + computer_name = kwargs['computerName'] + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + if dedicated_host_group_id is None and 'dedicatedHostGroupId' in kwargs: + dedicated_host_group_id = kwargs['dedicatedHostGroupId'] + if dedicated_host_id is None and 'dedicatedHostId' in kwargs: + dedicated_host_id = kwargs['dedicatedHostId'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if enable_automatic_updates is None and 'enableAutomaticUpdates' in kwargs: + enable_automatic_updates = kwargs['enableAutomaticUpdates'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if extensions_time_budget is None and 'extensionsTimeBudget' in kwargs: + extensions_time_budget = kwargs['extensionsTimeBudget'] + if gallery_applications is None and 'galleryApplications' in kwargs: + gallery_applications = kwargs['galleryApplications'] + if hotpatching_enabled is None and 'hotpatchingEnabled' in kwargs: + hotpatching_enabled = kwargs['hotpatchingEnabled'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_bid_price is None and 'maxBidPrice' in kwargs: + max_bid_price = kwargs['maxBidPrice'] + if network_interface_ids is None and 'networkInterfaceIds' in kwargs: + network_interface_ids = kwargs['networkInterfaceIds'] + if os_disk is None and 'osDisk' in kwargs: + os_disk = kwargs['osDisk'] + if patch_assessment_mode is None and 'patchAssessmentMode' in kwargs: + patch_assessment_mode = kwargs['patchAssessmentMode'] + if patch_mode is None and 'patchMode' in kwargs: + patch_mode = kwargs['patchMode'] + if platform_fault_domain is None and 'platformFaultDomain' in kwargs: + platform_fault_domain = kwargs['platformFaultDomain'] + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_addresses is None and 'privateIpAddresses' in kwargs: + private_ip_addresses = kwargs['privateIpAddresses'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if public_ip_address is None and 'publicIpAddress' in kwargs: + public_ip_address = kwargs['publicIpAddress'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if reboot_setting is None and 'rebootSetting' in kwargs: + reboot_setting = kwargs['rebootSetting'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secure_boot_enabled is None and 'secureBootEnabled' in kwargs: + secure_boot_enabled = kwargs['secureBootEnabled'] + if source_image_id is None and 'sourceImageId' in kwargs: + source_image_id = kwargs['sourceImageId'] + if source_image_reference is None and 'sourceImageReference' in kwargs: + source_image_reference = kwargs['sourceImageReference'] + if termination_notification is None and 'terminationNotification' in kwargs: + termination_notification = kwargs['terminationNotification'] + if user_data is None and 'userData' in kwargs: + user_data = kwargs['userData'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_scale_set_id is None and 'virtualMachineScaleSetId' in kwargs: + virtual_machine_scale_set_id = kwargs['virtualMachineScaleSetId'] + if vtpm_enabled is None and 'vtpmEnabled' in kwargs: + vtpm_enabled = kwargs['vtpmEnabled'] + if winrm_listeners is None and 'winrmListeners' in kwargs: + winrm_listeners = kwargs['winrmListeners'] + if additional_capabilities is not None: - pulumi.set(__self__, "additional_capabilities", additional_capabilities) + _setter("additional_capabilities", additional_capabilities) if additional_unattend_contents is not None: - pulumi.set(__self__, "additional_unattend_contents", additional_unattend_contents) + _setter("additional_unattend_contents", additional_unattend_contents) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if admin_username is not None: - pulumi.set(__self__, "admin_username", admin_username) + _setter("admin_username", admin_username) if allow_extension_operations is not None: - pulumi.set(__self__, "allow_extension_operations", allow_extension_operations) + _setter("allow_extension_operations", allow_extension_operations) if availability_set_id is not None: - pulumi.set(__self__, "availability_set_id", availability_set_id) + _setter("availability_set_id", availability_set_id) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if bypass_platform_safety_checks_on_user_schedule_enabled is not None: - pulumi.set(__self__, "bypass_platform_safety_checks_on_user_schedule_enabled", bypass_platform_safety_checks_on_user_schedule_enabled) + _setter("bypass_platform_safety_checks_on_user_schedule_enabled", bypass_platform_safety_checks_on_user_schedule_enabled) if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if computer_name is not None: - pulumi.set(__self__, "computer_name", computer_name) + _setter("computer_name", computer_name) if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) if dedicated_host_group_id is not None: - pulumi.set(__self__, "dedicated_host_group_id", dedicated_host_group_id) + _setter("dedicated_host_group_id", dedicated_host_group_id) if dedicated_host_id is not None: - pulumi.set(__self__, "dedicated_host_id", dedicated_host_id) + _setter("dedicated_host_id", dedicated_host_id) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if enable_automatic_updates is not None: - pulumi.set(__self__, "enable_automatic_updates", enable_automatic_updates) + _setter("enable_automatic_updates", enable_automatic_updates) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if extensions_time_budget is not None: - pulumi.set(__self__, "extensions_time_budget", extensions_time_budget) + _setter("extensions_time_budget", extensions_time_budget) if gallery_applications is not None: - pulumi.set(__self__, "gallery_applications", gallery_applications) + _setter("gallery_applications", gallery_applications) if hotpatching_enabled is not None: - pulumi.set(__self__, "hotpatching_enabled", hotpatching_enabled) + _setter("hotpatching_enabled", hotpatching_enabled) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_bid_price is not None: - pulumi.set(__self__, "max_bid_price", max_bid_price) + _setter("max_bid_price", max_bid_price) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_interface_ids is not None: - pulumi.set(__self__, "network_interface_ids", network_interface_ids) + _setter("network_interface_ids", network_interface_ids) if os_disk is not None: - pulumi.set(__self__, "os_disk", os_disk) + _setter("os_disk", os_disk) if patch_assessment_mode is not None: - pulumi.set(__self__, "patch_assessment_mode", patch_assessment_mode) + _setter("patch_assessment_mode", patch_assessment_mode) if patch_mode is not None: - pulumi.set(__self__, "patch_mode", patch_mode) + _setter("patch_mode", patch_mode) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if platform_fault_domain is not None: - pulumi.set(__self__, "platform_fault_domain", platform_fault_domain) + _setter("platform_fault_domain", platform_fault_domain) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_addresses is not None: - pulumi.set(__self__, "private_ip_addresses", private_ip_addresses) + _setter("private_ip_addresses", private_ip_addresses) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if public_ip_address is not None: - pulumi.set(__self__, "public_ip_address", public_ip_address) + _setter("public_ip_address", public_ip_address) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if reboot_setting is not None: - pulumi.set(__self__, "reboot_setting", reboot_setting) + _setter("reboot_setting", reboot_setting) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) if secure_boot_enabled is not None: - pulumi.set(__self__, "secure_boot_enabled", secure_boot_enabled) + _setter("secure_boot_enabled", secure_boot_enabled) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if source_image_id is not None: - pulumi.set(__self__, "source_image_id", source_image_id) + _setter("source_image_id", source_image_id) if source_image_reference is not None: - pulumi.set(__self__, "source_image_reference", source_image_reference) + _setter("source_image_reference", source_image_reference) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if termination_notification is not None: - pulumi.set(__self__, "termination_notification", termination_notification) + _setter("termination_notification", termination_notification) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) if user_data is not None: - pulumi.set(__self__, "user_data", user_data) + _setter("user_data", user_data) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) if virtual_machine_scale_set_id is not None: - pulumi.set(__self__, "virtual_machine_scale_set_id", virtual_machine_scale_set_id) + _setter("virtual_machine_scale_set_id", virtual_machine_scale_set_id) if vtpm_enabled is not None: - pulumi.set(__self__, "vtpm_enabled", vtpm_enabled) + _setter("vtpm_enabled", vtpm_enabled) if winrm_listeners is not None: - pulumi.set(__self__, "winrm_listeners", winrm_listeners) + _setter("winrm_listeners", winrm_listeners) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="additionalCapabilities") @@ -2029,6 +2431,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WindowsVirtualMachineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -2092,6 +2498,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = WindowsVirtualMachineArgs.__new__(WindowsVirtualMachineArgs) + if additional_capabilities is not None and not isinstance(additional_capabilities, WindowsVirtualMachineAdditionalCapabilitiesArgs): + additional_capabilities = additional_capabilities or {} + def _setter(key, value): + additional_capabilities[key] = value + WindowsVirtualMachineAdditionalCapabilitiesArgs._configure(_setter, **additional_capabilities) __props__.__dict__["additional_capabilities"] = additional_capabilities __props__.__dict__["additional_unattend_contents"] = additional_unattend_contents if admin_password is None and not opts.urn: @@ -2102,6 +2513,11 @@ def _internal_init(__self__, __props__.__dict__["admin_username"] = admin_username __props__.__dict__["allow_extension_operations"] = allow_extension_operations __props__.__dict__["availability_set_id"] = availability_set_id + if boot_diagnostics is not None and not isinstance(boot_diagnostics, WindowsVirtualMachineBootDiagnosticsArgs): + boot_diagnostics = boot_diagnostics or {} + def _setter(key, value): + boot_diagnostics[key] = value + WindowsVirtualMachineBootDiagnosticsArgs._configure(_setter, **boot_diagnostics) __props__.__dict__["boot_diagnostics"] = boot_diagnostics __props__.__dict__["bypass_platform_safety_checks_on_user_schedule_enabled"] = bypass_platform_safety_checks_on_user_schedule_enabled __props__.__dict__["capacity_reservation_group_id"] = capacity_reservation_group_id @@ -2116,6 +2532,11 @@ def _internal_init(__self__, __props__.__dict__["extensions_time_budget"] = extensions_time_budget __props__.__dict__["gallery_applications"] = gallery_applications __props__.__dict__["hotpatching_enabled"] = hotpatching_enabled + if identity is not None and not isinstance(identity, WindowsVirtualMachineIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + WindowsVirtualMachineIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["license_type"] = license_type __props__.__dict__["location"] = location @@ -2124,11 +2545,21 @@ def _internal_init(__self__, if network_interface_ids is None and not opts.urn: raise TypeError("Missing required property 'network_interface_ids'") __props__.__dict__["network_interface_ids"] = network_interface_ids + if os_disk is not None and not isinstance(os_disk, WindowsVirtualMachineOsDiskArgs): + os_disk = os_disk or {} + def _setter(key, value): + os_disk[key] = value + WindowsVirtualMachineOsDiskArgs._configure(_setter, **os_disk) if os_disk is None and not opts.urn: raise TypeError("Missing required property 'os_disk'") __props__.__dict__["os_disk"] = os_disk __props__.__dict__["patch_assessment_mode"] = patch_assessment_mode __props__.__dict__["patch_mode"] = patch_mode + if plan is not None and not isinstance(plan, WindowsVirtualMachinePlanArgs): + plan = plan or {} + def _setter(key, value): + plan[key] = value + WindowsVirtualMachinePlanArgs._configure(_setter, **plan) __props__.__dict__["plan"] = plan __props__.__dict__["platform_fault_domain"] = platform_fault_domain __props__.__dict__["priority"] = priority @@ -2144,8 +2575,18 @@ def _internal_init(__self__, raise TypeError("Missing required property 'size'") __props__.__dict__["size"] = size __props__.__dict__["source_image_id"] = source_image_id + if source_image_reference is not None and not isinstance(source_image_reference, WindowsVirtualMachineSourceImageReferenceArgs): + source_image_reference = source_image_reference or {} + def _setter(key, value): + source_image_reference[key] = value + WindowsVirtualMachineSourceImageReferenceArgs._configure(_setter, **source_image_reference) __props__.__dict__["source_image_reference"] = source_image_reference __props__.__dict__["tags"] = tags + if termination_notification is not None and not isinstance(termination_notification, WindowsVirtualMachineTerminationNotificationArgs): + termination_notification = termination_notification or {} + def _setter(key, value): + termination_notification[key] = value + WindowsVirtualMachineTerminationNotificationArgs._configure(_setter, **termination_notification) __props__.__dict__["termination_notification"] = termination_notification __props__.__dict__["timezone"] = timezone __props__.__dict__["user_data"] = user_data diff --git a/sdk/python/pulumi_azure/compute/windows_virtual_machine_scale_set.py b/sdk/python/pulumi_azure/compute/windows_virtual_machine_scale_set.py index 83a7883d4e..269f3f74d5 100644 --- a/sdk/python/pulumi_azure/compute/windows_virtual_machine_scale_set.py +++ b/sdk/python/pulumi_azure/compute/windows_virtual_machine_scale_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -160,124 +160,353 @@ def __init__(__self__, *, > **NOTE:** This can only be set to `true` when one or more `zones` are configured. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones in which this Windows Virtual Machine Scale Set should be located. Changing this forces a new Windows Virtual Machine Scale Set to be created. """ - pulumi.set(__self__, "admin_password", admin_password) - pulumi.set(__self__, "admin_username", admin_username) - pulumi.set(__self__, "instances", instances) - pulumi.set(__self__, "network_interfaces", network_interfaces) - pulumi.set(__self__, "os_disk", os_disk) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + WindowsVirtualMachineScaleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_password=admin_password, + admin_username=admin_username, + instances=instances, + network_interfaces=network_interfaces, + os_disk=os_disk, + resource_group_name=resource_group_name, + sku=sku, + additional_capabilities=additional_capabilities, + additional_unattend_contents=additional_unattend_contents, + automatic_instance_repair=automatic_instance_repair, + automatic_os_upgrade_policy=automatic_os_upgrade_policy, + boot_diagnostics=boot_diagnostics, + capacity_reservation_group_id=capacity_reservation_group_id, + computer_name_prefix=computer_name_prefix, + custom_data=custom_data, + data_disks=data_disks, + do_not_run_extensions_on_overprovisioned_machines=do_not_run_extensions_on_overprovisioned_machines, + edge_zone=edge_zone, + enable_automatic_updates=enable_automatic_updates, + encryption_at_host_enabled=encryption_at_host_enabled, + eviction_policy=eviction_policy, + extension_operations_enabled=extension_operations_enabled, + extensions=extensions, + extensions_time_budget=extensions_time_budget, + gallery_application=gallery_application, + gallery_applications=gallery_applications, + health_probe_id=health_probe_id, + host_group_id=host_group_id, + identity=identity, + license_type=license_type, + location=location, + max_bid_price=max_bid_price, + name=name, + overprovision=overprovision, + plan=plan, + platform_fault_domain_count=platform_fault_domain_count, + priority=priority, + provision_vm_agent=provision_vm_agent, + proximity_placement_group_id=proximity_placement_group_id, + rolling_upgrade_policy=rolling_upgrade_policy, + scale_in=scale_in, + scale_in_policy=scale_in_policy, + secrets=secrets, + secure_boot_enabled=secure_boot_enabled, + single_placement_group=single_placement_group, + source_image_id=source_image_id, + source_image_reference=source_image_reference, + spot_restore=spot_restore, + tags=tags, + terminate_notification=terminate_notification, + termination_notification=termination_notification, + timezone=timezone, + upgrade_mode=upgrade_mode, + user_data=user_data, + vtpm_enabled=vtpm_enabled, + winrm_listeners=winrm_listeners, + zone_balance=zone_balance, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_password: Optional[pulumi.Input[str]] = None, + admin_username: Optional[pulumi.Input[str]] = None, + instances: Optional[pulumi.Input[int]] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetNetworkInterfaceArgs']]]] = None, + os_disk: Optional[pulumi.Input['WindowsVirtualMachineScaleSetOsDiskArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + additional_capabilities: Optional[pulumi.Input['WindowsVirtualMachineScaleSetAdditionalCapabilitiesArgs']] = None, + additional_unattend_contents: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetAdditionalUnattendContentArgs']]]] = None, + automatic_instance_repair: Optional[pulumi.Input['WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs']] = None, + automatic_os_upgrade_policy: Optional[pulumi.Input['WindowsVirtualMachineScaleSetAutomaticOsUpgradePolicyArgs']] = None, + boot_diagnostics: Optional[pulumi.Input['WindowsVirtualMachineScaleSetBootDiagnosticsArgs']] = None, + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + computer_name_prefix: Optional[pulumi.Input[str]] = None, + custom_data: Optional[pulumi.Input[str]] = None, + data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetDataDiskArgs']]]] = None, + do_not_run_extensions_on_overprovisioned_machines: Optional[pulumi.Input[bool]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + enable_automatic_updates: Optional[pulumi.Input[bool]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + extension_operations_enabled: Optional[pulumi.Input[bool]] = None, + extensions: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetExtensionArgs']]]] = None, + extensions_time_budget: Optional[pulumi.Input[str]] = None, + gallery_application: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetGalleryApplicationArgs']]]] = None, + gallery_applications: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetGalleryApplicationArgs']]]] = None, + health_probe_id: Optional[pulumi.Input[str]] = None, + host_group_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['WindowsVirtualMachineScaleSetIdentityArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_bid_price: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + overprovision: Optional[pulumi.Input[bool]] = None, + plan: Optional[pulumi.Input['WindowsVirtualMachineScaleSetPlanArgs']] = None, + platform_fault_domain_count: Optional[pulumi.Input[int]] = None, + priority: Optional[pulumi.Input[str]] = None, + provision_vm_agent: Optional[pulumi.Input[bool]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + rolling_upgrade_policy: Optional[pulumi.Input['WindowsVirtualMachineScaleSetRollingUpgradePolicyArgs']] = None, + scale_in: Optional[pulumi.Input['WindowsVirtualMachineScaleSetScaleInArgs']] = None, + scale_in_policy: Optional[pulumi.Input[str]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetSecretArgs']]]] = None, + secure_boot_enabled: Optional[pulumi.Input[bool]] = None, + single_placement_group: Optional[pulumi.Input[bool]] = None, + source_image_id: Optional[pulumi.Input[str]] = None, + source_image_reference: Optional[pulumi.Input['WindowsVirtualMachineScaleSetSourceImageReferenceArgs']] = None, + spot_restore: Optional[pulumi.Input['WindowsVirtualMachineScaleSetSpotRestoreArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + terminate_notification: Optional[pulumi.Input['WindowsVirtualMachineScaleSetTerminateNotificationArgs']] = None, + termination_notification: Optional[pulumi.Input['WindowsVirtualMachineScaleSetTerminationNotificationArgs']] = None, + timezone: Optional[pulumi.Input[str]] = None, + upgrade_mode: Optional[pulumi.Input[str]] = None, + user_data: Optional[pulumi.Input[str]] = None, + vtpm_enabled: Optional[pulumi.Input[bool]] = None, + winrm_listeners: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetWinrmListenerArgs']]]] = None, + zone_balance: Optional[pulumi.Input[bool]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if admin_password is None: + raise TypeError("Missing 'admin_password' argument") + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if instances is None: + raise TypeError("Missing 'instances' argument") + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if network_interfaces is None: + raise TypeError("Missing 'network_interfaces' argument") + if os_disk is None and 'osDisk' in kwargs: + os_disk = kwargs['osDisk'] + if os_disk is None: + raise TypeError("Missing 'os_disk' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if additional_capabilities is None and 'additionalCapabilities' in kwargs: + additional_capabilities = kwargs['additionalCapabilities'] + if additional_unattend_contents is None and 'additionalUnattendContents' in kwargs: + additional_unattend_contents = kwargs['additionalUnattendContents'] + if automatic_instance_repair is None and 'automaticInstanceRepair' in kwargs: + automatic_instance_repair = kwargs['automaticInstanceRepair'] + if automatic_os_upgrade_policy is None and 'automaticOsUpgradePolicy' in kwargs: + automatic_os_upgrade_policy = kwargs['automaticOsUpgradePolicy'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if computer_name_prefix is None and 'computerNamePrefix' in kwargs: + computer_name_prefix = kwargs['computerNamePrefix'] + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + if data_disks is None and 'dataDisks' in kwargs: + data_disks = kwargs['dataDisks'] + if do_not_run_extensions_on_overprovisioned_machines is None and 'doNotRunExtensionsOnOverprovisionedMachines' in kwargs: + do_not_run_extensions_on_overprovisioned_machines = kwargs['doNotRunExtensionsOnOverprovisionedMachines'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if enable_automatic_updates is None and 'enableAutomaticUpdates' in kwargs: + enable_automatic_updates = kwargs['enableAutomaticUpdates'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if extension_operations_enabled is None and 'extensionOperationsEnabled' in kwargs: + extension_operations_enabled = kwargs['extensionOperationsEnabled'] + if extensions_time_budget is None and 'extensionsTimeBudget' in kwargs: + extensions_time_budget = kwargs['extensionsTimeBudget'] + if gallery_application is None and 'galleryApplication' in kwargs: + gallery_application = kwargs['galleryApplication'] + if gallery_applications is None and 'galleryApplications' in kwargs: + gallery_applications = kwargs['galleryApplications'] + if health_probe_id is None and 'healthProbeId' in kwargs: + health_probe_id = kwargs['healthProbeId'] + if host_group_id is None and 'hostGroupId' in kwargs: + host_group_id = kwargs['hostGroupId'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_bid_price is None and 'maxBidPrice' in kwargs: + max_bid_price = kwargs['maxBidPrice'] + if platform_fault_domain_count is None and 'platformFaultDomainCount' in kwargs: + platform_fault_domain_count = kwargs['platformFaultDomainCount'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if rolling_upgrade_policy is None and 'rollingUpgradePolicy' in kwargs: + rolling_upgrade_policy = kwargs['rollingUpgradePolicy'] + if scale_in is None and 'scaleIn' in kwargs: + scale_in = kwargs['scaleIn'] + if scale_in_policy is None and 'scaleInPolicy' in kwargs: + scale_in_policy = kwargs['scaleInPolicy'] + if secure_boot_enabled is None and 'secureBootEnabled' in kwargs: + secure_boot_enabled = kwargs['secureBootEnabled'] + if single_placement_group is None and 'singlePlacementGroup' in kwargs: + single_placement_group = kwargs['singlePlacementGroup'] + if source_image_id is None and 'sourceImageId' in kwargs: + source_image_id = kwargs['sourceImageId'] + if source_image_reference is None and 'sourceImageReference' in kwargs: + source_image_reference = kwargs['sourceImageReference'] + if spot_restore is None and 'spotRestore' in kwargs: + spot_restore = kwargs['spotRestore'] + if terminate_notification is None and 'terminateNotification' in kwargs: + terminate_notification = kwargs['terminateNotification'] + if termination_notification is None and 'terminationNotification' in kwargs: + termination_notification = kwargs['terminationNotification'] + if upgrade_mode is None and 'upgradeMode' in kwargs: + upgrade_mode = kwargs['upgradeMode'] + if user_data is None and 'userData' in kwargs: + user_data = kwargs['userData'] + if vtpm_enabled is None and 'vtpmEnabled' in kwargs: + vtpm_enabled = kwargs['vtpmEnabled'] + if winrm_listeners is None and 'winrmListeners' in kwargs: + winrm_listeners = kwargs['winrmListeners'] + if zone_balance is None and 'zoneBalance' in kwargs: + zone_balance = kwargs['zoneBalance'] + + _setter("admin_password", admin_password) + _setter("admin_username", admin_username) + _setter("instances", instances) + _setter("network_interfaces", network_interfaces) + _setter("os_disk", os_disk) + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if additional_capabilities is not None: - pulumi.set(__self__, "additional_capabilities", additional_capabilities) + _setter("additional_capabilities", additional_capabilities) if additional_unattend_contents is not None: - pulumi.set(__self__, "additional_unattend_contents", additional_unattend_contents) + _setter("additional_unattend_contents", additional_unattend_contents) if automatic_instance_repair is not None: - pulumi.set(__self__, "automatic_instance_repair", automatic_instance_repair) + _setter("automatic_instance_repair", automatic_instance_repair) if automatic_os_upgrade_policy is not None: - pulumi.set(__self__, "automatic_os_upgrade_policy", automatic_os_upgrade_policy) + _setter("automatic_os_upgrade_policy", automatic_os_upgrade_policy) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if computer_name_prefix is not None: - pulumi.set(__self__, "computer_name_prefix", computer_name_prefix) + _setter("computer_name_prefix", computer_name_prefix) if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) if data_disks is not None: - pulumi.set(__self__, "data_disks", data_disks) + _setter("data_disks", data_disks) if do_not_run_extensions_on_overprovisioned_machines is not None: - pulumi.set(__self__, "do_not_run_extensions_on_overprovisioned_machines", do_not_run_extensions_on_overprovisioned_machines) + _setter("do_not_run_extensions_on_overprovisioned_machines", do_not_run_extensions_on_overprovisioned_machines) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if enable_automatic_updates is not None: - pulumi.set(__self__, "enable_automatic_updates", enable_automatic_updates) + _setter("enable_automatic_updates", enable_automatic_updates) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if extension_operations_enabled is not None: - pulumi.set(__self__, "extension_operations_enabled", extension_operations_enabled) + _setter("extension_operations_enabled", extension_operations_enabled) if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if extensions_time_budget is not None: - pulumi.set(__self__, "extensions_time_budget", extensions_time_budget) + _setter("extensions_time_budget", extensions_time_budget) if gallery_application is not None: - pulumi.set(__self__, "gallery_application", gallery_application) + _setter("gallery_application", gallery_application) if gallery_applications is not None: warnings.warn("""`gallery_applications` has been renamed to `gallery_application` and will be deprecated in 4.0""", DeprecationWarning) pulumi.log.warn("""gallery_applications is deprecated: `gallery_applications` has been renamed to `gallery_application` and will be deprecated in 4.0""") if gallery_applications is not None: - pulumi.set(__self__, "gallery_applications", gallery_applications) + _setter("gallery_applications", gallery_applications) if health_probe_id is not None: - pulumi.set(__self__, "health_probe_id", health_probe_id) + _setter("health_probe_id", health_probe_id) if host_group_id is not None: - pulumi.set(__self__, "host_group_id", host_group_id) + _setter("host_group_id", host_group_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_bid_price is not None: - pulumi.set(__self__, "max_bid_price", max_bid_price) + _setter("max_bid_price", max_bid_price) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if overprovision is not None: - pulumi.set(__self__, "overprovision", overprovision) + _setter("overprovision", overprovision) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if platform_fault_domain_count is not None: - pulumi.set(__self__, "platform_fault_domain_count", platform_fault_domain_count) + _setter("platform_fault_domain_count", platform_fault_domain_count) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if rolling_upgrade_policy is not None: - pulumi.set(__self__, "rolling_upgrade_policy", rolling_upgrade_policy) + _setter("rolling_upgrade_policy", rolling_upgrade_policy) if scale_in is not None: - pulumi.set(__self__, "scale_in", scale_in) + _setter("scale_in", scale_in) if scale_in_policy is not None: warnings.warn("""`scale_in_policy` will be removed in favour of the `scale_in` code block in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""scale_in_policy is deprecated: `scale_in_policy` will be removed in favour of the `scale_in` code block in version 4.0 of the AzureRM Provider.""") if scale_in_policy is not None: - pulumi.set(__self__, "scale_in_policy", scale_in_policy) + _setter("scale_in_policy", scale_in_policy) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) if secure_boot_enabled is not None: - pulumi.set(__self__, "secure_boot_enabled", secure_boot_enabled) + _setter("secure_boot_enabled", secure_boot_enabled) if single_placement_group is not None: - pulumi.set(__self__, "single_placement_group", single_placement_group) + _setter("single_placement_group", single_placement_group) if source_image_id is not None: - pulumi.set(__self__, "source_image_id", source_image_id) + _setter("source_image_id", source_image_id) if source_image_reference is not None: - pulumi.set(__self__, "source_image_reference", source_image_reference) + _setter("source_image_reference", source_image_reference) if spot_restore is not None: - pulumi.set(__self__, "spot_restore", spot_restore) + _setter("spot_restore", spot_restore) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if terminate_notification is not None: warnings.warn("""`terminate_notification` has been renamed to `termination_notification` and will be removed in 4.0.""", DeprecationWarning) pulumi.log.warn("""terminate_notification is deprecated: `terminate_notification` has been renamed to `termination_notification` and will be removed in 4.0.""") if terminate_notification is not None: - pulumi.set(__self__, "terminate_notification", terminate_notification) + _setter("terminate_notification", terminate_notification) if termination_notification is not None: - pulumi.set(__self__, "termination_notification", termination_notification) + _setter("termination_notification", termination_notification) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) if upgrade_mode is not None: - pulumi.set(__self__, "upgrade_mode", upgrade_mode) + _setter("upgrade_mode", upgrade_mode) if user_data is not None: - pulumi.set(__self__, "user_data", user_data) + _setter("user_data", user_data) if vtpm_enabled is not None: - pulumi.set(__self__, "vtpm_enabled", vtpm_enabled) + _setter("vtpm_enabled", vtpm_enabled) if winrm_listeners is not None: - pulumi.set(__self__, "winrm_listeners", winrm_listeners) + _setter("winrm_listeners", winrm_listeners) if zone_balance is not None: - pulumi.set(__self__, "zone_balance", zone_balance) + _setter("zone_balance", zone_balance) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="adminPassword") @@ -1153,133 +1382,352 @@ def __init__(__self__, *, > **NOTE:** This can only be set to `true` when one or more `zones` are configured. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones in which this Windows Virtual Machine Scale Set should be located. Changing this forces a new Windows Virtual Machine Scale Set to be created. """ + _WindowsVirtualMachineScaleSetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_capabilities=additional_capabilities, + additional_unattend_contents=additional_unattend_contents, + admin_password=admin_password, + admin_username=admin_username, + automatic_instance_repair=automatic_instance_repair, + automatic_os_upgrade_policy=automatic_os_upgrade_policy, + boot_diagnostics=boot_diagnostics, + capacity_reservation_group_id=capacity_reservation_group_id, + computer_name_prefix=computer_name_prefix, + custom_data=custom_data, + data_disks=data_disks, + do_not_run_extensions_on_overprovisioned_machines=do_not_run_extensions_on_overprovisioned_machines, + edge_zone=edge_zone, + enable_automatic_updates=enable_automatic_updates, + encryption_at_host_enabled=encryption_at_host_enabled, + eviction_policy=eviction_policy, + extension_operations_enabled=extension_operations_enabled, + extensions=extensions, + extensions_time_budget=extensions_time_budget, + gallery_application=gallery_application, + gallery_applications=gallery_applications, + health_probe_id=health_probe_id, + host_group_id=host_group_id, + identity=identity, + instances=instances, + license_type=license_type, + location=location, + max_bid_price=max_bid_price, + name=name, + network_interfaces=network_interfaces, + os_disk=os_disk, + overprovision=overprovision, + plan=plan, + platform_fault_domain_count=platform_fault_domain_count, + priority=priority, + provision_vm_agent=provision_vm_agent, + proximity_placement_group_id=proximity_placement_group_id, + resource_group_name=resource_group_name, + rolling_upgrade_policy=rolling_upgrade_policy, + scale_in=scale_in, + scale_in_policy=scale_in_policy, + secrets=secrets, + secure_boot_enabled=secure_boot_enabled, + single_placement_group=single_placement_group, + sku=sku, + source_image_id=source_image_id, + source_image_reference=source_image_reference, + spot_restore=spot_restore, + tags=tags, + terminate_notification=terminate_notification, + termination_notification=termination_notification, + timezone=timezone, + unique_id=unique_id, + upgrade_mode=upgrade_mode, + user_data=user_data, + vtpm_enabled=vtpm_enabled, + winrm_listeners=winrm_listeners, + zone_balance=zone_balance, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_capabilities: Optional[pulumi.Input['WindowsVirtualMachineScaleSetAdditionalCapabilitiesArgs']] = None, + additional_unattend_contents: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetAdditionalUnattendContentArgs']]]] = None, + admin_password: Optional[pulumi.Input[str]] = None, + admin_username: Optional[pulumi.Input[str]] = None, + automatic_instance_repair: Optional[pulumi.Input['WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs']] = None, + automatic_os_upgrade_policy: Optional[pulumi.Input['WindowsVirtualMachineScaleSetAutomaticOsUpgradePolicyArgs']] = None, + boot_diagnostics: Optional[pulumi.Input['WindowsVirtualMachineScaleSetBootDiagnosticsArgs']] = None, + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + computer_name_prefix: Optional[pulumi.Input[str]] = None, + custom_data: Optional[pulumi.Input[str]] = None, + data_disks: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetDataDiskArgs']]]] = None, + do_not_run_extensions_on_overprovisioned_machines: Optional[pulumi.Input[bool]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + enable_automatic_updates: Optional[pulumi.Input[bool]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + extension_operations_enabled: Optional[pulumi.Input[bool]] = None, + extensions: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetExtensionArgs']]]] = None, + extensions_time_budget: Optional[pulumi.Input[str]] = None, + gallery_application: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetGalleryApplicationArgs']]]] = None, + gallery_applications: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetGalleryApplicationArgs']]]] = None, + health_probe_id: Optional[pulumi.Input[str]] = None, + host_group_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['WindowsVirtualMachineScaleSetIdentityArgs']] = None, + instances: Optional[pulumi.Input[int]] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_bid_price: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetNetworkInterfaceArgs']]]] = None, + os_disk: Optional[pulumi.Input['WindowsVirtualMachineScaleSetOsDiskArgs']] = None, + overprovision: Optional[pulumi.Input[bool]] = None, + plan: Optional[pulumi.Input['WindowsVirtualMachineScaleSetPlanArgs']] = None, + platform_fault_domain_count: Optional[pulumi.Input[int]] = None, + priority: Optional[pulumi.Input[str]] = None, + provision_vm_agent: Optional[pulumi.Input[bool]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rolling_upgrade_policy: Optional[pulumi.Input['WindowsVirtualMachineScaleSetRollingUpgradePolicyArgs']] = None, + scale_in: Optional[pulumi.Input['WindowsVirtualMachineScaleSetScaleInArgs']] = None, + scale_in_policy: Optional[pulumi.Input[str]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetSecretArgs']]]] = None, + secure_boot_enabled: Optional[pulumi.Input[bool]] = None, + single_placement_group: Optional[pulumi.Input[bool]] = None, + sku: Optional[pulumi.Input[str]] = None, + source_image_id: Optional[pulumi.Input[str]] = None, + source_image_reference: Optional[pulumi.Input['WindowsVirtualMachineScaleSetSourceImageReferenceArgs']] = None, + spot_restore: Optional[pulumi.Input['WindowsVirtualMachineScaleSetSpotRestoreArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + terminate_notification: Optional[pulumi.Input['WindowsVirtualMachineScaleSetTerminateNotificationArgs']] = None, + termination_notification: Optional[pulumi.Input['WindowsVirtualMachineScaleSetTerminationNotificationArgs']] = None, + timezone: Optional[pulumi.Input[str]] = None, + unique_id: Optional[pulumi.Input[str]] = None, + upgrade_mode: Optional[pulumi.Input[str]] = None, + user_data: Optional[pulumi.Input[str]] = None, + vtpm_enabled: Optional[pulumi.Input[bool]] = None, + winrm_listeners: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineScaleSetWinrmListenerArgs']]]] = None, + zone_balance: Optional[pulumi.Input[bool]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_capabilities is None and 'additionalCapabilities' in kwargs: + additional_capabilities = kwargs['additionalCapabilities'] + if additional_unattend_contents is None and 'additionalUnattendContents' in kwargs: + additional_unattend_contents = kwargs['additionalUnattendContents'] + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if automatic_instance_repair is None and 'automaticInstanceRepair' in kwargs: + automatic_instance_repair = kwargs['automaticInstanceRepair'] + if automatic_os_upgrade_policy is None and 'automaticOsUpgradePolicy' in kwargs: + automatic_os_upgrade_policy = kwargs['automaticOsUpgradePolicy'] + if boot_diagnostics is None and 'bootDiagnostics' in kwargs: + boot_diagnostics = kwargs['bootDiagnostics'] + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if computer_name_prefix is None and 'computerNamePrefix' in kwargs: + computer_name_prefix = kwargs['computerNamePrefix'] + if custom_data is None and 'customData' in kwargs: + custom_data = kwargs['customData'] + if data_disks is None and 'dataDisks' in kwargs: + data_disks = kwargs['dataDisks'] + if do_not_run_extensions_on_overprovisioned_machines is None and 'doNotRunExtensionsOnOverprovisionedMachines' in kwargs: + do_not_run_extensions_on_overprovisioned_machines = kwargs['doNotRunExtensionsOnOverprovisionedMachines'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if enable_automatic_updates is None and 'enableAutomaticUpdates' in kwargs: + enable_automatic_updates = kwargs['enableAutomaticUpdates'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if extension_operations_enabled is None and 'extensionOperationsEnabled' in kwargs: + extension_operations_enabled = kwargs['extensionOperationsEnabled'] + if extensions_time_budget is None and 'extensionsTimeBudget' in kwargs: + extensions_time_budget = kwargs['extensionsTimeBudget'] + if gallery_application is None and 'galleryApplication' in kwargs: + gallery_application = kwargs['galleryApplication'] + if gallery_applications is None and 'galleryApplications' in kwargs: + gallery_applications = kwargs['galleryApplications'] + if health_probe_id is None and 'healthProbeId' in kwargs: + health_probe_id = kwargs['healthProbeId'] + if host_group_id is None and 'hostGroupId' in kwargs: + host_group_id = kwargs['hostGroupId'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_bid_price is None and 'maxBidPrice' in kwargs: + max_bid_price = kwargs['maxBidPrice'] + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if os_disk is None and 'osDisk' in kwargs: + os_disk = kwargs['osDisk'] + if platform_fault_domain_count is None and 'platformFaultDomainCount' in kwargs: + platform_fault_domain_count = kwargs['platformFaultDomainCount'] + if provision_vm_agent is None and 'provisionVmAgent' in kwargs: + provision_vm_agent = kwargs['provisionVmAgent'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if rolling_upgrade_policy is None and 'rollingUpgradePolicy' in kwargs: + rolling_upgrade_policy = kwargs['rollingUpgradePolicy'] + if scale_in is None and 'scaleIn' in kwargs: + scale_in = kwargs['scaleIn'] + if scale_in_policy is None and 'scaleInPolicy' in kwargs: + scale_in_policy = kwargs['scaleInPolicy'] + if secure_boot_enabled is None and 'secureBootEnabled' in kwargs: + secure_boot_enabled = kwargs['secureBootEnabled'] + if single_placement_group is None and 'singlePlacementGroup' in kwargs: + single_placement_group = kwargs['singlePlacementGroup'] + if source_image_id is None and 'sourceImageId' in kwargs: + source_image_id = kwargs['sourceImageId'] + if source_image_reference is None and 'sourceImageReference' in kwargs: + source_image_reference = kwargs['sourceImageReference'] + if spot_restore is None and 'spotRestore' in kwargs: + spot_restore = kwargs['spotRestore'] + if terminate_notification is None and 'terminateNotification' in kwargs: + terminate_notification = kwargs['terminateNotification'] + if termination_notification is None and 'terminationNotification' in kwargs: + termination_notification = kwargs['terminationNotification'] + if unique_id is None and 'uniqueId' in kwargs: + unique_id = kwargs['uniqueId'] + if upgrade_mode is None and 'upgradeMode' in kwargs: + upgrade_mode = kwargs['upgradeMode'] + if user_data is None and 'userData' in kwargs: + user_data = kwargs['userData'] + if vtpm_enabled is None and 'vtpmEnabled' in kwargs: + vtpm_enabled = kwargs['vtpmEnabled'] + if winrm_listeners is None and 'winrmListeners' in kwargs: + winrm_listeners = kwargs['winrmListeners'] + if zone_balance is None and 'zoneBalance' in kwargs: + zone_balance = kwargs['zoneBalance'] + if additional_capabilities is not None: - pulumi.set(__self__, "additional_capabilities", additional_capabilities) + _setter("additional_capabilities", additional_capabilities) if additional_unattend_contents is not None: - pulumi.set(__self__, "additional_unattend_contents", additional_unattend_contents) + _setter("additional_unattend_contents", additional_unattend_contents) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if admin_username is not None: - pulumi.set(__self__, "admin_username", admin_username) + _setter("admin_username", admin_username) if automatic_instance_repair is not None: - pulumi.set(__self__, "automatic_instance_repair", automatic_instance_repair) + _setter("automatic_instance_repair", automatic_instance_repair) if automatic_os_upgrade_policy is not None: - pulumi.set(__self__, "automatic_os_upgrade_policy", automatic_os_upgrade_policy) + _setter("automatic_os_upgrade_policy", automatic_os_upgrade_policy) if boot_diagnostics is not None: - pulumi.set(__self__, "boot_diagnostics", boot_diagnostics) + _setter("boot_diagnostics", boot_diagnostics) if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if computer_name_prefix is not None: - pulumi.set(__self__, "computer_name_prefix", computer_name_prefix) + _setter("computer_name_prefix", computer_name_prefix) if custom_data is not None: - pulumi.set(__self__, "custom_data", custom_data) + _setter("custom_data", custom_data) if data_disks is not None: - pulumi.set(__self__, "data_disks", data_disks) + _setter("data_disks", data_disks) if do_not_run_extensions_on_overprovisioned_machines is not None: - pulumi.set(__self__, "do_not_run_extensions_on_overprovisioned_machines", do_not_run_extensions_on_overprovisioned_machines) + _setter("do_not_run_extensions_on_overprovisioned_machines", do_not_run_extensions_on_overprovisioned_machines) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if enable_automatic_updates is not None: - pulumi.set(__self__, "enable_automatic_updates", enable_automatic_updates) + _setter("enable_automatic_updates", enable_automatic_updates) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if extension_operations_enabled is not None: - pulumi.set(__self__, "extension_operations_enabled", extension_operations_enabled) + _setter("extension_operations_enabled", extension_operations_enabled) if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if extensions_time_budget is not None: - pulumi.set(__self__, "extensions_time_budget", extensions_time_budget) + _setter("extensions_time_budget", extensions_time_budget) if gallery_application is not None: - pulumi.set(__self__, "gallery_application", gallery_application) + _setter("gallery_application", gallery_application) if gallery_applications is not None: warnings.warn("""`gallery_applications` has been renamed to `gallery_application` and will be deprecated in 4.0""", DeprecationWarning) pulumi.log.warn("""gallery_applications is deprecated: `gallery_applications` has been renamed to `gallery_application` and will be deprecated in 4.0""") if gallery_applications is not None: - pulumi.set(__self__, "gallery_applications", gallery_applications) + _setter("gallery_applications", gallery_applications) if health_probe_id is not None: - pulumi.set(__self__, "health_probe_id", health_probe_id) + _setter("health_probe_id", health_probe_id) if host_group_id is not None: - pulumi.set(__self__, "host_group_id", host_group_id) + _setter("host_group_id", host_group_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if instances is not None: - pulumi.set(__self__, "instances", instances) + _setter("instances", instances) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_bid_price is not None: - pulumi.set(__self__, "max_bid_price", max_bid_price) + _setter("max_bid_price", max_bid_price) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_interfaces is not None: - pulumi.set(__self__, "network_interfaces", network_interfaces) + _setter("network_interfaces", network_interfaces) if os_disk is not None: - pulumi.set(__self__, "os_disk", os_disk) + _setter("os_disk", os_disk) if overprovision is not None: - pulumi.set(__self__, "overprovision", overprovision) + _setter("overprovision", overprovision) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if platform_fault_domain_count is not None: - pulumi.set(__self__, "platform_fault_domain_count", platform_fault_domain_count) + _setter("platform_fault_domain_count", platform_fault_domain_count) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if provision_vm_agent is not None: - pulumi.set(__self__, "provision_vm_agent", provision_vm_agent) + _setter("provision_vm_agent", provision_vm_agent) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rolling_upgrade_policy is not None: - pulumi.set(__self__, "rolling_upgrade_policy", rolling_upgrade_policy) + _setter("rolling_upgrade_policy", rolling_upgrade_policy) if scale_in is not None: - pulumi.set(__self__, "scale_in", scale_in) + _setter("scale_in", scale_in) if scale_in_policy is not None: warnings.warn("""`scale_in_policy` will be removed in favour of the `scale_in` code block in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""scale_in_policy is deprecated: `scale_in_policy` will be removed in favour of the `scale_in` code block in version 4.0 of the AzureRM Provider.""") if scale_in_policy is not None: - pulumi.set(__self__, "scale_in_policy", scale_in_policy) + _setter("scale_in_policy", scale_in_policy) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) if secure_boot_enabled is not None: - pulumi.set(__self__, "secure_boot_enabled", secure_boot_enabled) + _setter("secure_boot_enabled", secure_boot_enabled) if single_placement_group is not None: - pulumi.set(__self__, "single_placement_group", single_placement_group) + _setter("single_placement_group", single_placement_group) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if source_image_id is not None: - pulumi.set(__self__, "source_image_id", source_image_id) + _setter("source_image_id", source_image_id) if source_image_reference is not None: - pulumi.set(__self__, "source_image_reference", source_image_reference) + _setter("source_image_reference", source_image_reference) if spot_restore is not None: - pulumi.set(__self__, "spot_restore", spot_restore) + _setter("spot_restore", spot_restore) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if terminate_notification is not None: warnings.warn("""`terminate_notification` has been renamed to `termination_notification` and will be removed in 4.0.""", DeprecationWarning) pulumi.log.warn("""terminate_notification is deprecated: `terminate_notification` has been renamed to `termination_notification` and will be removed in 4.0.""") if terminate_notification is not None: - pulumi.set(__self__, "terminate_notification", terminate_notification) + _setter("terminate_notification", terminate_notification) if termination_notification is not None: - pulumi.set(__self__, "termination_notification", termination_notification) + _setter("termination_notification", termination_notification) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) if unique_id is not None: - pulumi.set(__self__, "unique_id", unique_id) + _setter("unique_id", unique_id) if upgrade_mode is not None: - pulumi.set(__self__, "upgrade_mode", upgrade_mode) + _setter("upgrade_mode", upgrade_mode) if user_data is not None: - pulumi.set(__self__, "user_data", user_data) + _setter("user_data", user_data) if vtpm_enabled is not None: - pulumi.set(__self__, "vtpm_enabled", vtpm_enabled) + _setter("vtpm_enabled", vtpm_enabled) if winrm_listeners is not None: - pulumi.set(__self__, "winrm_listeners", winrm_listeners) + _setter("winrm_listeners", winrm_listeners) if zone_balance is not None: - pulumi.set(__self__, "zone_balance", zone_balance) + _setter("zone_balance", zone_balance) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="additionalCapabilities") @@ -2312,6 +2760,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WindowsVirtualMachineScaleSetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -2384,6 +2836,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = WindowsVirtualMachineScaleSetArgs.__new__(WindowsVirtualMachineScaleSetArgs) + if additional_capabilities is not None and not isinstance(additional_capabilities, WindowsVirtualMachineScaleSetAdditionalCapabilitiesArgs): + additional_capabilities = additional_capabilities or {} + def _setter(key, value): + additional_capabilities[key] = value + WindowsVirtualMachineScaleSetAdditionalCapabilitiesArgs._configure(_setter, **additional_capabilities) __props__.__dict__["additional_capabilities"] = additional_capabilities __props__.__dict__["additional_unattend_contents"] = additional_unattend_contents if admin_password is None and not opts.urn: @@ -2392,8 +2849,23 @@ def _internal_init(__self__, if admin_username is None and not opts.urn: raise TypeError("Missing required property 'admin_username'") __props__.__dict__["admin_username"] = admin_username + if automatic_instance_repair is not None and not isinstance(automatic_instance_repair, WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs): + automatic_instance_repair = automatic_instance_repair or {} + def _setter(key, value): + automatic_instance_repair[key] = value + WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs._configure(_setter, **automatic_instance_repair) __props__.__dict__["automatic_instance_repair"] = automatic_instance_repair + if automatic_os_upgrade_policy is not None and not isinstance(automatic_os_upgrade_policy, WindowsVirtualMachineScaleSetAutomaticOsUpgradePolicyArgs): + automatic_os_upgrade_policy = automatic_os_upgrade_policy or {} + def _setter(key, value): + automatic_os_upgrade_policy[key] = value + WindowsVirtualMachineScaleSetAutomaticOsUpgradePolicyArgs._configure(_setter, **automatic_os_upgrade_policy) __props__.__dict__["automatic_os_upgrade_policy"] = automatic_os_upgrade_policy + if boot_diagnostics is not None and not isinstance(boot_diagnostics, WindowsVirtualMachineScaleSetBootDiagnosticsArgs): + boot_diagnostics = boot_diagnostics or {} + def _setter(key, value): + boot_diagnostics[key] = value + WindowsVirtualMachineScaleSetBootDiagnosticsArgs._configure(_setter, **boot_diagnostics) __props__.__dict__["boot_diagnostics"] = boot_diagnostics __props__.__dict__["capacity_reservation_group_id"] = capacity_reservation_group_id __props__.__dict__["computer_name_prefix"] = computer_name_prefix @@ -2411,6 +2883,11 @@ def _internal_init(__self__, __props__.__dict__["gallery_applications"] = gallery_applications __props__.__dict__["health_probe_id"] = health_probe_id __props__.__dict__["host_group_id"] = host_group_id + if identity is not None and not isinstance(identity, WindowsVirtualMachineScaleSetIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + WindowsVirtualMachineScaleSetIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity if instances is None and not opts.urn: raise TypeError("Missing required property 'instances'") @@ -2422,10 +2899,20 @@ def _internal_init(__self__, if network_interfaces is None and not opts.urn: raise TypeError("Missing required property 'network_interfaces'") __props__.__dict__["network_interfaces"] = network_interfaces + if os_disk is not None and not isinstance(os_disk, WindowsVirtualMachineScaleSetOsDiskArgs): + os_disk = os_disk or {} + def _setter(key, value): + os_disk[key] = value + WindowsVirtualMachineScaleSetOsDiskArgs._configure(_setter, **os_disk) if os_disk is None and not opts.urn: raise TypeError("Missing required property 'os_disk'") __props__.__dict__["os_disk"] = os_disk __props__.__dict__["overprovision"] = overprovision + if plan is not None and not isinstance(plan, WindowsVirtualMachineScaleSetPlanArgs): + plan = plan or {} + def _setter(key, value): + plan[key] = value + WindowsVirtualMachineScaleSetPlanArgs._configure(_setter, **plan) __props__.__dict__["plan"] = plan __props__.__dict__["platform_fault_domain_count"] = platform_fault_domain_count __props__.__dict__["priority"] = priority @@ -2434,7 +2921,17 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if rolling_upgrade_policy is not None and not isinstance(rolling_upgrade_policy, WindowsVirtualMachineScaleSetRollingUpgradePolicyArgs): + rolling_upgrade_policy = rolling_upgrade_policy or {} + def _setter(key, value): + rolling_upgrade_policy[key] = value + WindowsVirtualMachineScaleSetRollingUpgradePolicyArgs._configure(_setter, **rolling_upgrade_policy) __props__.__dict__["rolling_upgrade_policy"] = rolling_upgrade_policy + if scale_in is not None and not isinstance(scale_in, WindowsVirtualMachineScaleSetScaleInArgs): + scale_in = scale_in or {} + def _setter(key, value): + scale_in[key] = value + WindowsVirtualMachineScaleSetScaleInArgs._configure(_setter, **scale_in) __props__.__dict__["scale_in"] = scale_in __props__.__dict__["scale_in_policy"] = scale_in_policy __props__.__dict__["secrets"] = secrets @@ -2444,10 +2941,30 @@ def _internal_init(__self__, raise TypeError("Missing required property 'sku'") __props__.__dict__["sku"] = sku __props__.__dict__["source_image_id"] = source_image_id + if source_image_reference is not None and not isinstance(source_image_reference, WindowsVirtualMachineScaleSetSourceImageReferenceArgs): + source_image_reference = source_image_reference or {} + def _setter(key, value): + source_image_reference[key] = value + WindowsVirtualMachineScaleSetSourceImageReferenceArgs._configure(_setter, **source_image_reference) __props__.__dict__["source_image_reference"] = source_image_reference + if spot_restore is not None and not isinstance(spot_restore, WindowsVirtualMachineScaleSetSpotRestoreArgs): + spot_restore = spot_restore or {} + def _setter(key, value): + spot_restore[key] = value + WindowsVirtualMachineScaleSetSpotRestoreArgs._configure(_setter, **spot_restore) __props__.__dict__["spot_restore"] = spot_restore __props__.__dict__["tags"] = tags + if terminate_notification is not None and not isinstance(terminate_notification, WindowsVirtualMachineScaleSetTerminateNotificationArgs): + terminate_notification = terminate_notification or {} + def _setter(key, value): + terminate_notification[key] = value + WindowsVirtualMachineScaleSetTerminateNotificationArgs._configure(_setter, **terminate_notification) __props__.__dict__["terminate_notification"] = terminate_notification + if termination_notification is not None and not isinstance(termination_notification, WindowsVirtualMachineScaleSetTerminationNotificationArgs): + termination_notification = termination_notification or {} + def _setter(key, value): + termination_notification[key] = value + WindowsVirtualMachineScaleSetTerminationNotificationArgs._configure(_setter, **termination_notification) __props__.__dict__["termination_notification"] = termination_notification __props__.__dict__["timezone"] = timezone __props__.__dict__["upgrade_mode"] = upgrade_mode diff --git a/sdk/python/pulumi_azure/confidentialledger/_inputs.py b/sdk/python/pulumi_azure/confidentialledger/_inputs.py index 45f1f2536b..123c1c7a6e 100644 --- a/sdk/python/pulumi_azure/confidentialledger/_inputs.py +++ b/sdk/python/pulumi_azure/confidentialledger/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -25,9 +25,36 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: Specifies the Principal ID of the AzureAD Service Principal. :param pulumi.Input[str] tenant_id: Specifies the Tenant ID for this AzureAD Service Principal. """ - pulumi.set(__self__, "ledger_role_name", ledger_role_name) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) + LedgerAzureadBasedServicePrincipalArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ledger_role_name=ledger_role_name, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ledger_role_name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ledger_role_name is None and 'ledgerRoleName' in kwargs: + ledger_role_name = kwargs['ledgerRoleName'] + if ledger_role_name is None: + raise TypeError("Missing 'ledger_role_name' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("ledger_role_name", ledger_role_name) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="ledgerRoleName") @@ -75,8 +102,29 @@ def __init__(__self__, *, :param pulumi.Input[str] ledger_role_name: Specifies the Ledger Role to grant this Certificate Security Principal. Possible values are `Administrator`, `Contributor` and `Reader`. :param pulumi.Input[str] pem_public_key: The public key, in PEM format, of the certificate used by this identity to authenticate with the Confidential Ledger. """ - pulumi.set(__self__, "ledger_role_name", ledger_role_name) - pulumi.set(__self__, "pem_public_key", pem_public_key) + LedgerCertificateBasedSecurityPrincipalArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ledger_role_name=ledger_role_name, + pem_public_key=pem_public_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ledger_role_name: Optional[pulumi.Input[str]] = None, + pem_public_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ledger_role_name is None and 'ledgerRoleName' in kwargs: + ledger_role_name = kwargs['ledgerRoleName'] + if ledger_role_name is None: + raise TypeError("Missing 'ledger_role_name' argument") + if pem_public_key is None and 'pemPublicKey' in kwargs: + pem_public_key = kwargs['pemPublicKey'] + if pem_public_key is None: + raise TypeError("Missing 'pem_public_key' argument") + + _setter("ledger_role_name", ledger_role_name) + _setter("pem_public_key", pem_public_key) @property @pulumi.getter(name="ledgerRoleName") diff --git a/sdk/python/pulumi_azure/confidentialledger/ledger.py b/sdk/python/pulumi_azure/confidentialledger/ledger.py index ff82b1b280..305c75ea83 100644 --- a/sdk/python/pulumi_azure/confidentialledger/ledger.py +++ b/sdk/python/pulumi_azure/confidentialledger/ledger.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,54 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Confidential Ledger. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Confidential Ledger. """ - pulumi.set(__self__, "azuread_based_service_principals", azuread_based_service_principals) - pulumi.set(__self__, "ledger_type", ledger_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) + LedgerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azuread_based_service_principals=azuread_based_service_principals, + ledger_type=ledger_type, + resource_group_name=resource_group_name, + certificate_based_security_principals=certificate_based_security_principals, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azuread_based_service_principals: Optional[pulumi.Input[Sequence[pulumi.Input['LedgerAzureadBasedServicePrincipalArgs']]]] = None, + ledger_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + certificate_based_security_principals: Optional[pulumi.Input[Sequence[pulumi.Input['LedgerCertificateBasedSecurityPrincipalArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azuread_based_service_principals is None and 'azureadBasedServicePrincipals' in kwargs: + azuread_based_service_principals = kwargs['azureadBasedServicePrincipals'] + if azuread_based_service_principals is None: + raise TypeError("Missing 'azuread_based_service_principals' argument") + if ledger_type is None and 'ledgerType' in kwargs: + ledger_type = kwargs['ledgerType'] + if ledger_type is None: + raise TypeError("Missing 'ledger_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if certificate_based_security_principals is None and 'certificateBasedSecurityPrincipals' in kwargs: + certificate_based_security_principals = kwargs['certificateBasedSecurityPrincipals'] + + _setter("azuread_based_service_principals", azuread_based_service_principals) + _setter("ledger_type", ledger_type) + _setter("resource_group_name", resource_group_name) if certificate_based_security_principals is not None: - pulumi.set(__self__, "certificate_based_security_principals", certificate_based_security_principals) + _setter("certificate_based_security_principals", certificate_based_security_principals) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="azureadBasedServicePrincipals") @@ -154,24 +191,63 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Confidential Ledger exists. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Confidential Ledger. """ + _LedgerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + azuread_based_service_principals=azuread_based_service_principals, + certificate_based_security_principals=certificate_based_security_principals, + identity_service_endpoint=identity_service_endpoint, + ledger_endpoint=ledger_endpoint, + ledger_type=ledger_type, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azuread_based_service_principals: Optional[pulumi.Input[Sequence[pulumi.Input['LedgerAzureadBasedServicePrincipalArgs']]]] = None, + certificate_based_security_principals: Optional[pulumi.Input[Sequence[pulumi.Input['LedgerCertificateBasedSecurityPrincipalArgs']]]] = None, + identity_service_endpoint: Optional[pulumi.Input[str]] = None, + ledger_endpoint: Optional[pulumi.Input[str]] = None, + ledger_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azuread_based_service_principals is None and 'azureadBasedServicePrincipals' in kwargs: + azuread_based_service_principals = kwargs['azureadBasedServicePrincipals'] + if certificate_based_security_principals is None and 'certificateBasedSecurityPrincipals' in kwargs: + certificate_based_security_principals = kwargs['certificateBasedSecurityPrincipals'] + if identity_service_endpoint is None and 'identityServiceEndpoint' in kwargs: + identity_service_endpoint = kwargs['identityServiceEndpoint'] + if ledger_endpoint is None and 'ledgerEndpoint' in kwargs: + ledger_endpoint = kwargs['ledgerEndpoint'] + if ledger_type is None and 'ledgerType' in kwargs: + ledger_type = kwargs['ledgerType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if azuread_based_service_principals is not None: - pulumi.set(__self__, "azuread_based_service_principals", azuread_based_service_principals) + _setter("azuread_based_service_principals", azuread_based_service_principals) if certificate_based_security_principals is not None: - pulumi.set(__self__, "certificate_based_security_principals", certificate_based_security_principals) + _setter("certificate_based_security_principals", certificate_based_security_principals) if identity_service_endpoint is not None: - pulumi.set(__self__, "identity_service_endpoint", identity_service_endpoint) + _setter("identity_service_endpoint", identity_service_endpoint) if ledger_endpoint is not None: - pulumi.set(__self__, "ledger_endpoint", ledger_endpoint) + _setter("ledger_endpoint", ledger_endpoint) if ledger_type is not None: - pulumi.set(__self__, "ledger_type", ledger_type) + _setter("ledger_type", ledger_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="azureadBasedServicePrincipals") @@ -381,6 +457,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LedgerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/confidentialledger/outputs.py b/sdk/python/pulumi_azure/confidentialledger/outputs.py index c86caa7396..82c3b6318a 100644 --- a/sdk/python/pulumi_azure/confidentialledger/outputs.py +++ b/sdk/python/pulumi_azure/confidentialledger/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -46,9 +46,36 @@ def __init__(__self__, *, :param str principal_id: Specifies the Principal ID of the AzureAD Service Principal. :param str tenant_id: Specifies the Tenant ID for this AzureAD Service Principal. """ - pulumi.set(__self__, "ledger_role_name", ledger_role_name) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) + LedgerAzureadBasedServicePrincipal._configure( + lambda key, value: pulumi.set(__self__, key, value), + ledger_role_name=ledger_role_name, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ledger_role_name: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ledger_role_name is None and 'ledgerRoleName' in kwargs: + ledger_role_name = kwargs['ledgerRoleName'] + if ledger_role_name is None: + raise TypeError("Missing 'ledger_role_name' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("ledger_role_name", ledger_role_name) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="ledgerRoleName") @@ -103,8 +130,29 @@ def __init__(__self__, *, :param str ledger_role_name: Specifies the Ledger Role to grant this Certificate Security Principal. Possible values are `Administrator`, `Contributor` and `Reader`. :param str pem_public_key: The public key, in PEM format, of the certificate used by this identity to authenticate with the Confidential Ledger. """ - pulumi.set(__self__, "ledger_role_name", ledger_role_name) - pulumi.set(__self__, "pem_public_key", pem_public_key) + LedgerCertificateBasedSecurityPrincipal._configure( + lambda key, value: pulumi.set(__self__, key, value), + ledger_role_name=ledger_role_name, + pem_public_key=pem_public_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ledger_role_name: Optional[str] = None, + pem_public_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ledger_role_name is None and 'ledgerRoleName' in kwargs: + ledger_role_name = kwargs['ledgerRoleName'] + if ledger_role_name is None: + raise TypeError("Missing 'ledger_role_name' argument") + if pem_public_key is None and 'pemPublicKey' in kwargs: + pem_public_key = kwargs['pemPublicKey'] + if pem_public_key is None: + raise TypeError("Missing 'pem_public_key' argument") + + _setter("ledger_role_name", ledger_role_name) + _setter("pem_public_key", pem_public_key) @property @pulumi.getter(name="ledgerRoleName") diff --git a/sdk/python/pulumi_azure/config/__init__.pyi b/sdk/python/pulumi_azure/config/__init__.pyi index 514842f6ba..2adbd54400 100644 --- a/sdk/python/pulumi_azure/config/__init__.pyi +++ b/sdk/python/pulumi_azure/config/__init__.pyi @@ -6,7 +6,7 @@ import copy import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/config/outputs.py b/sdk/python/pulumi_azure/config/outputs.py index 9e9c0547e3..f9170d203d 100644 --- a/sdk/python/pulumi_azure/config/outputs.py +++ b/sdk/python/pulumi_azure/config/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -41,30 +41,85 @@ def __init__(__self__, *, template_deployment: Optional['outputs.FeaturesTemplateDeployment'] = None, virtual_machine: Optional['outputs.FeaturesVirtualMachine'] = None, virtual_machine_scale_set: Optional['outputs.FeaturesVirtualMachineScaleSet'] = None): + Features._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_management=api_management, + app_configuration=app_configuration, + application_insights=application_insights, + cognitive_account=cognitive_account, + key_vault=key_vault, + log_analytics_workspace=log_analytics_workspace, + managed_disk=managed_disk, + resource_group=resource_group, + subscription=subscription, + template_deployment=template_deployment, + virtual_machine=virtual_machine, + virtual_machine_scale_set=virtual_machine_scale_set, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_management: Optional['outputs.FeaturesApiManagement'] = None, + app_configuration: Optional['outputs.FeaturesAppConfiguration'] = None, + application_insights: Optional['outputs.FeaturesApplicationInsights'] = None, + cognitive_account: Optional['outputs.FeaturesCognitiveAccount'] = None, + key_vault: Optional['outputs.FeaturesKeyVault'] = None, + log_analytics_workspace: Optional['outputs.FeaturesLogAnalyticsWorkspace'] = None, + managed_disk: Optional['outputs.FeaturesManagedDisk'] = None, + resource_group: Optional['outputs.FeaturesResourceGroup'] = None, + subscription: Optional['outputs.FeaturesSubscription'] = None, + template_deployment: Optional['outputs.FeaturesTemplateDeployment'] = None, + virtual_machine: Optional['outputs.FeaturesVirtualMachine'] = None, + virtual_machine_scale_set: Optional['outputs.FeaturesVirtualMachineScaleSet'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_management is None and 'apiManagement' in kwargs: + api_management = kwargs['apiManagement'] + if app_configuration is None and 'appConfiguration' in kwargs: + app_configuration = kwargs['appConfiguration'] + if application_insights is None and 'applicationInsights' in kwargs: + application_insights = kwargs['applicationInsights'] + if cognitive_account is None and 'cognitiveAccount' in kwargs: + cognitive_account = kwargs['cognitiveAccount'] + if key_vault is None and 'keyVault' in kwargs: + key_vault = kwargs['keyVault'] + if log_analytics_workspace is None and 'logAnalyticsWorkspace' in kwargs: + log_analytics_workspace = kwargs['logAnalyticsWorkspace'] + if managed_disk is None and 'managedDisk' in kwargs: + managed_disk = kwargs['managedDisk'] + if resource_group is None and 'resourceGroup' in kwargs: + resource_group = kwargs['resourceGroup'] + if template_deployment is None and 'templateDeployment' in kwargs: + template_deployment = kwargs['templateDeployment'] + if virtual_machine is None and 'virtualMachine' in kwargs: + virtual_machine = kwargs['virtualMachine'] + if virtual_machine_scale_set is None and 'virtualMachineScaleSet' in kwargs: + virtual_machine_scale_set = kwargs['virtualMachineScaleSet'] + if api_management is not None: - pulumi.set(__self__, "api_management", api_management) + _setter("api_management", api_management) if app_configuration is not None: - pulumi.set(__self__, "app_configuration", app_configuration) + _setter("app_configuration", app_configuration) if application_insights is not None: - pulumi.set(__self__, "application_insights", application_insights) + _setter("application_insights", application_insights) if cognitive_account is not None: - pulumi.set(__self__, "cognitive_account", cognitive_account) + _setter("cognitive_account", cognitive_account) if key_vault is not None: - pulumi.set(__self__, "key_vault", key_vault) + _setter("key_vault", key_vault) if log_analytics_workspace is not None: - pulumi.set(__self__, "log_analytics_workspace", log_analytics_workspace) + _setter("log_analytics_workspace", log_analytics_workspace) if managed_disk is not None: - pulumi.set(__self__, "managed_disk", managed_disk) + _setter("managed_disk", managed_disk) if resource_group is not None: - pulumi.set(__self__, "resource_group", resource_group) + _setter("resource_group", resource_group) if subscription is not None: - pulumi.set(__self__, "subscription", subscription) + _setter("subscription", subscription) if template_deployment is not None: - pulumi.set(__self__, "template_deployment", template_deployment) + _setter("template_deployment", template_deployment) if virtual_machine is not None: - pulumi.set(__self__, "virtual_machine", virtual_machine) + _setter("virtual_machine", virtual_machine) if virtual_machine_scale_set is not None: - pulumi.set(__self__, "virtual_machine_scale_set", virtual_machine_scale_set) + _setter("virtual_machine_scale_set", virtual_machine_scale_set) @property @pulumi.getter(name="apiManagement") @@ -132,10 +187,27 @@ class FeaturesApiManagement(dict): def __init__(__self__, *, purge_soft_delete_on_destroy: Optional[bool] = None, recover_soft_deleted: Optional[bool] = None): + FeaturesApiManagement._configure( + lambda key, value: pulumi.set(__self__, key, value), + purge_soft_delete_on_destroy=purge_soft_delete_on_destroy, + recover_soft_deleted=recover_soft_deleted, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + purge_soft_delete_on_destroy: Optional[bool] = None, + recover_soft_deleted: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if purge_soft_delete_on_destroy is None and 'purgeSoftDeleteOnDestroy' in kwargs: + purge_soft_delete_on_destroy = kwargs['purgeSoftDeleteOnDestroy'] + if recover_soft_deleted is None and 'recoverSoftDeleted' in kwargs: + recover_soft_deleted = kwargs['recoverSoftDeleted'] + if purge_soft_delete_on_destroy is not None: - pulumi.set(__self__, "purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) + _setter("purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) if recover_soft_deleted is not None: - pulumi.set(__self__, "recover_soft_deleted", recover_soft_deleted) + _setter("recover_soft_deleted", recover_soft_deleted) @property @pulumi.getter(name="purgeSoftDeleteOnDestroy") @@ -153,10 +225,27 @@ class FeaturesAppConfiguration(dict): def __init__(__self__, *, purge_soft_delete_on_destroy: Optional[bool] = None, recover_soft_deleted: Optional[bool] = None): + FeaturesAppConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + purge_soft_delete_on_destroy=purge_soft_delete_on_destroy, + recover_soft_deleted=recover_soft_deleted, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + purge_soft_delete_on_destroy: Optional[bool] = None, + recover_soft_deleted: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if purge_soft_delete_on_destroy is None and 'purgeSoftDeleteOnDestroy' in kwargs: + purge_soft_delete_on_destroy = kwargs['purgeSoftDeleteOnDestroy'] + if recover_soft_deleted is None and 'recoverSoftDeleted' in kwargs: + recover_soft_deleted = kwargs['recoverSoftDeleted'] + if purge_soft_delete_on_destroy is not None: - pulumi.set(__self__, "purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) + _setter("purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) if recover_soft_deleted is not None: - pulumi.set(__self__, "recover_soft_deleted", recover_soft_deleted) + _setter("recover_soft_deleted", recover_soft_deleted) @property @pulumi.getter(name="purgeSoftDeleteOnDestroy") @@ -173,8 +262,21 @@ def recover_soft_deleted(self) -> Optional[bool]: class FeaturesApplicationInsights(dict): def __init__(__self__, *, disable_generated_rule: Optional[bool] = None): + FeaturesApplicationInsights._configure( + lambda key, value: pulumi.set(__self__, key, value), + disable_generated_rule=disable_generated_rule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disable_generated_rule: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disable_generated_rule is None and 'disableGeneratedRule' in kwargs: + disable_generated_rule = kwargs['disableGeneratedRule'] + if disable_generated_rule is not None: - pulumi.set(__self__, "disable_generated_rule", disable_generated_rule) + _setter("disable_generated_rule", disable_generated_rule) @property @pulumi.getter(name="disableGeneratedRule") @@ -186,8 +288,21 @@ def disable_generated_rule(self) -> Optional[bool]: class FeaturesCognitiveAccount(dict): def __init__(__self__, *, purge_soft_delete_on_destroy: Optional[bool] = None): + FeaturesCognitiveAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + purge_soft_delete_on_destroy=purge_soft_delete_on_destroy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + purge_soft_delete_on_destroy: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if purge_soft_delete_on_destroy is None and 'purgeSoftDeleteOnDestroy' in kwargs: + purge_soft_delete_on_destroy = kwargs['purgeSoftDeleteOnDestroy'] + if purge_soft_delete_on_destroy is not None: - pulumi.set(__self__, "purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) + _setter("purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) @property @pulumi.getter(name="purgeSoftDeleteOnDestroy") @@ -207,24 +322,69 @@ def __init__(__self__, *, recover_soft_deleted_key_vaults: Optional[bool] = None, recover_soft_deleted_keys: Optional[bool] = None, recover_soft_deleted_secrets: Optional[bool] = None): + FeaturesKeyVault._configure( + lambda key, value: pulumi.set(__self__, key, value), + purge_soft_delete_on_destroy=purge_soft_delete_on_destroy, + purge_soft_deleted_certificates_on_destroy=purge_soft_deleted_certificates_on_destroy, + purge_soft_deleted_hardware_security_modules_on_destroy=purge_soft_deleted_hardware_security_modules_on_destroy, + purge_soft_deleted_keys_on_destroy=purge_soft_deleted_keys_on_destroy, + purge_soft_deleted_secrets_on_destroy=purge_soft_deleted_secrets_on_destroy, + recover_soft_deleted_certificates=recover_soft_deleted_certificates, + recover_soft_deleted_key_vaults=recover_soft_deleted_key_vaults, + recover_soft_deleted_keys=recover_soft_deleted_keys, + recover_soft_deleted_secrets=recover_soft_deleted_secrets, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + purge_soft_delete_on_destroy: Optional[bool] = None, + purge_soft_deleted_certificates_on_destroy: Optional[bool] = None, + purge_soft_deleted_hardware_security_modules_on_destroy: Optional[bool] = None, + purge_soft_deleted_keys_on_destroy: Optional[bool] = None, + purge_soft_deleted_secrets_on_destroy: Optional[bool] = None, + recover_soft_deleted_certificates: Optional[bool] = None, + recover_soft_deleted_key_vaults: Optional[bool] = None, + recover_soft_deleted_keys: Optional[bool] = None, + recover_soft_deleted_secrets: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if purge_soft_delete_on_destroy is None and 'purgeSoftDeleteOnDestroy' in kwargs: + purge_soft_delete_on_destroy = kwargs['purgeSoftDeleteOnDestroy'] + if purge_soft_deleted_certificates_on_destroy is None and 'purgeSoftDeletedCertificatesOnDestroy' in kwargs: + purge_soft_deleted_certificates_on_destroy = kwargs['purgeSoftDeletedCertificatesOnDestroy'] + if purge_soft_deleted_hardware_security_modules_on_destroy is None and 'purgeSoftDeletedHardwareSecurityModulesOnDestroy' in kwargs: + purge_soft_deleted_hardware_security_modules_on_destroy = kwargs['purgeSoftDeletedHardwareSecurityModulesOnDestroy'] + if purge_soft_deleted_keys_on_destroy is None and 'purgeSoftDeletedKeysOnDestroy' in kwargs: + purge_soft_deleted_keys_on_destroy = kwargs['purgeSoftDeletedKeysOnDestroy'] + if purge_soft_deleted_secrets_on_destroy is None and 'purgeSoftDeletedSecretsOnDestroy' in kwargs: + purge_soft_deleted_secrets_on_destroy = kwargs['purgeSoftDeletedSecretsOnDestroy'] + if recover_soft_deleted_certificates is None and 'recoverSoftDeletedCertificates' in kwargs: + recover_soft_deleted_certificates = kwargs['recoverSoftDeletedCertificates'] + if recover_soft_deleted_key_vaults is None and 'recoverSoftDeletedKeyVaults' in kwargs: + recover_soft_deleted_key_vaults = kwargs['recoverSoftDeletedKeyVaults'] + if recover_soft_deleted_keys is None and 'recoverSoftDeletedKeys' in kwargs: + recover_soft_deleted_keys = kwargs['recoverSoftDeletedKeys'] + if recover_soft_deleted_secrets is None and 'recoverSoftDeletedSecrets' in kwargs: + recover_soft_deleted_secrets = kwargs['recoverSoftDeletedSecrets'] + if purge_soft_delete_on_destroy is not None: - pulumi.set(__self__, "purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) + _setter("purge_soft_delete_on_destroy", purge_soft_delete_on_destroy) if purge_soft_deleted_certificates_on_destroy is not None: - pulumi.set(__self__, "purge_soft_deleted_certificates_on_destroy", purge_soft_deleted_certificates_on_destroy) + _setter("purge_soft_deleted_certificates_on_destroy", purge_soft_deleted_certificates_on_destroy) if purge_soft_deleted_hardware_security_modules_on_destroy is not None: - pulumi.set(__self__, "purge_soft_deleted_hardware_security_modules_on_destroy", purge_soft_deleted_hardware_security_modules_on_destroy) + _setter("purge_soft_deleted_hardware_security_modules_on_destroy", purge_soft_deleted_hardware_security_modules_on_destroy) if purge_soft_deleted_keys_on_destroy is not None: - pulumi.set(__self__, "purge_soft_deleted_keys_on_destroy", purge_soft_deleted_keys_on_destroy) + _setter("purge_soft_deleted_keys_on_destroy", purge_soft_deleted_keys_on_destroy) if purge_soft_deleted_secrets_on_destroy is not None: - pulumi.set(__self__, "purge_soft_deleted_secrets_on_destroy", purge_soft_deleted_secrets_on_destroy) + _setter("purge_soft_deleted_secrets_on_destroy", purge_soft_deleted_secrets_on_destroy) if recover_soft_deleted_certificates is not None: - pulumi.set(__self__, "recover_soft_deleted_certificates", recover_soft_deleted_certificates) + _setter("recover_soft_deleted_certificates", recover_soft_deleted_certificates) if recover_soft_deleted_key_vaults is not None: - pulumi.set(__self__, "recover_soft_deleted_key_vaults", recover_soft_deleted_key_vaults) + _setter("recover_soft_deleted_key_vaults", recover_soft_deleted_key_vaults) if recover_soft_deleted_keys is not None: - pulumi.set(__self__, "recover_soft_deleted_keys", recover_soft_deleted_keys) + _setter("recover_soft_deleted_keys", recover_soft_deleted_keys) if recover_soft_deleted_secrets is not None: - pulumi.set(__self__, "recover_soft_deleted_secrets", recover_soft_deleted_secrets) + _setter("recover_soft_deleted_secrets", recover_soft_deleted_secrets) @property @pulumi.getter(name="purgeSoftDeleteOnDestroy") @@ -276,8 +436,21 @@ def recover_soft_deleted_secrets(self) -> Optional[bool]: class FeaturesLogAnalyticsWorkspace(dict): def __init__(__self__, *, permanently_delete_on_destroy: Optional[bool] = None): + FeaturesLogAnalyticsWorkspace._configure( + lambda key, value: pulumi.set(__self__, key, value), + permanently_delete_on_destroy=permanently_delete_on_destroy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + permanently_delete_on_destroy: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if permanently_delete_on_destroy is None and 'permanentlyDeleteOnDestroy' in kwargs: + permanently_delete_on_destroy = kwargs['permanentlyDeleteOnDestroy'] + if permanently_delete_on_destroy is not None: - pulumi.set(__self__, "permanently_delete_on_destroy", permanently_delete_on_destroy) + _setter("permanently_delete_on_destroy", permanently_delete_on_destroy) @property @pulumi.getter(name="permanentlyDeleteOnDestroy") @@ -289,8 +462,21 @@ def permanently_delete_on_destroy(self) -> Optional[bool]: class FeaturesManagedDisk(dict): def __init__(__self__, *, expand_without_downtime: Optional[bool] = None): + FeaturesManagedDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + expand_without_downtime=expand_without_downtime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expand_without_downtime: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expand_without_downtime is None and 'expandWithoutDowntime' in kwargs: + expand_without_downtime = kwargs['expandWithoutDowntime'] + if expand_without_downtime is not None: - pulumi.set(__self__, "expand_without_downtime", expand_without_downtime) + _setter("expand_without_downtime", expand_without_downtime) @property @pulumi.getter(name="expandWithoutDowntime") @@ -302,8 +488,21 @@ def expand_without_downtime(self) -> Optional[bool]: class FeaturesResourceGroup(dict): def __init__(__self__, *, prevent_deletion_if_contains_resources: Optional[bool] = None): + FeaturesResourceGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + prevent_deletion_if_contains_resources=prevent_deletion_if_contains_resources, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + prevent_deletion_if_contains_resources: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if prevent_deletion_if_contains_resources is None and 'preventDeletionIfContainsResources' in kwargs: + prevent_deletion_if_contains_resources = kwargs['preventDeletionIfContainsResources'] + if prevent_deletion_if_contains_resources is not None: - pulumi.set(__self__, "prevent_deletion_if_contains_resources", prevent_deletion_if_contains_resources) + _setter("prevent_deletion_if_contains_resources", prevent_deletion_if_contains_resources) @property @pulumi.getter(name="preventDeletionIfContainsResources") @@ -315,8 +514,21 @@ def prevent_deletion_if_contains_resources(self) -> Optional[bool]: class FeaturesSubscription(dict): def __init__(__self__, *, prevent_cancellation_on_destroy: Optional[bool] = None): + FeaturesSubscription._configure( + lambda key, value: pulumi.set(__self__, key, value), + prevent_cancellation_on_destroy=prevent_cancellation_on_destroy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + prevent_cancellation_on_destroy: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if prevent_cancellation_on_destroy is None and 'preventCancellationOnDestroy' in kwargs: + prevent_cancellation_on_destroy = kwargs['preventCancellationOnDestroy'] + if prevent_cancellation_on_destroy is not None: - pulumi.set(__self__, "prevent_cancellation_on_destroy", prevent_cancellation_on_destroy) + _setter("prevent_cancellation_on_destroy", prevent_cancellation_on_destroy) @property @pulumi.getter(name="preventCancellationOnDestroy") @@ -328,7 +540,22 @@ def prevent_cancellation_on_destroy(self) -> Optional[bool]: class FeaturesTemplateDeployment(dict): def __init__(__self__, *, delete_nested_items_during_deletion: bool): - pulumi.set(__self__, "delete_nested_items_during_deletion", delete_nested_items_during_deletion) + FeaturesTemplateDeployment._configure( + lambda key, value: pulumi.set(__self__, key, value), + delete_nested_items_during_deletion=delete_nested_items_during_deletion, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + delete_nested_items_during_deletion: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if delete_nested_items_during_deletion is None and 'deleteNestedItemsDuringDeletion' in kwargs: + delete_nested_items_during_deletion = kwargs['deleteNestedItemsDuringDeletion'] + if delete_nested_items_during_deletion is None: + raise TypeError("Missing 'delete_nested_items_during_deletion' argument") + + _setter("delete_nested_items_during_deletion", delete_nested_items_during_deletion) @property @pulumi.getter(name="deleteNestedItemsDuringDeletion") @@ -342,12 +569,33 @@ def __init__(__self__, *, delete_os_disk_on_deletion: Optional[bool] = None, graceful_shutdown: Optional[bool] = None, skip_shutdown_and_force_delete: Optional[bool] = None): + FeaturesVirtualMachine._configure( + lambda key, value: pulumi.set(__self__, key, value), + delete_os_disk_on_deletion=delete_os_disk_on_deletion, + graceful_shutdown=graceful_shutdown, + skip_shutdown_and_force_delete=skip_shutdown_and_force_delete, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + delete_os_disk_on_deletion: Optional[bool] = None, + graceful_shutdown: Optional[bool] = None, + skip_shutdown_and_force_delete: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if delete_os_disk_on_deletion is None and 'deleteOsDiskOnDeletion' in kwargs: + delete_os_disk_on_deletion = kwargs['deleteOsDiskOnDeletion'] + if graceful_shutdown is None and 'gracefulShutdown' in kwargs: + graceful_shutdown = kwargs['gracefulShutdown'] + if skip_shutdown_and_force_delete is None and 'skipShutdownAndForceDelete' in kwargs: + skip_shutdown_and_force_delete = kwargs['skipShutdownAndForceDelete'] + if delete_os_disk_on_deletion is not None: - pulumi.set(__self__, "delete_os_disk_on_deletion", delete_os_disk_on_deletion) + _setter("delete_os_disk_on_deletion", delete_os_disk_on_deletion) if graceful_shutdown is not None: - pulumi.set(__self__, "graceful_shutdown", graceful_shutdown) + _setter("graceful_shutdown", graceful_shutdown) if skip_shutdown_and_force_delete is not None: - pulumi.set(__self__, "skip_shutdown_and_force_delete", skip_shutdown_and_force_delete) + _setter("skip_shutdown_and_force_delete", skip_shutdown_and_force_delete) @property @pulumi.getter(name="deleteOsDiskOnDeletion") @@ -371,12 +619,33 @@ def __init__(__self__, *, force_delete: Optional[bool] = None, roll_instances_when_required: Optional[bool] = None, scale_to_zero_before_deletion: Optional[bool] = None): + FeaturesVirtualMachineScaleSet._configure( + lambda key, value: pulumi.set(__self__, key, value), + force_delete=force_delete, + roll_instances_when_required=roll_instances_when_required, + scale_to_zero_before_deletion=scale_to_zero_before_deletion, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + force_delete: Optional[bool] = None, + roll_instances_when_required: Optional[bool] = None, + scale_to_zero_before_deletion: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if force_delete is None and 'forceDelete' in kwargs: + force_delete = kwargs['forceDelete'] + if roll_instances_when_required is None and 'rollInstancesWhenRequired' in kwargs: + roll_instances_when_required = kwargs['rollInstancesWhenRequired'] + if scale_to_zero_before_deletion is None and 'scaleToZeroBeforeDeletion' in kwargs: + scale_to_zero_before_deletion = kwargs['scaleToZeroBeforeDeletion'] + if force_delete is not None: - pulumi.set(__self__, "force_delete", force_delete) + _setter("force_delete", force_delete) if roll_instances_when_required is not None: - pulumi.set(__self__, "roll_instances_when_required", roll_instances_when_required) + _setter("roll_instances_when_required", roll_instances_when_required) if scale_to_zero_before_deletion is not None: - pulumi.set(__self__, "scale_to_zero_before_deletion", scale_to_zero_before_deletion) + _setter("scale_to_zero_before_deletion", scale_to_zero_before_deletion) @property @pulumi.getter(name="forceDelete") diff --git a/sdk/python/pulumi_azure/config/vars.py b/sdk/python/pulumi_azure/config/vars.py index c87dabb6a1..4b394b9b73 100644 --- a/sdk/python/pulumi_azure/config/vars.py +++ b/sdk/python/pulumi_azure/config/vars.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/connections/api_connection.py b/sdk/python/pulumi_azure/connections/api_connection.py index 9546825d4e..a8cb8c49ed 100644 --- a/sdk/python/pulumi_azure/connections/api_connection.py +++ b/sdk/python/pulumi_azure/connections/api_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApiConnectionArgs', 'ApiConnection'] @@ -28,16 +28,49 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Name which should be used for this API Connection. Changing this forces a new API Connection to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the API Connection. """ - pulumi.set(__self__, "managed_api_id", managed_api_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ApiConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_api_id=managed_api_id, + resource_group_name=resource_group_name, + display_name=display_name, + name=name, + parameter_values=parameter_values, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_api_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameter_values: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_api_id is None and 'managedApiId' in kwargs: + managed_api_id = kwargs['managedApiId'] + if managed_api_id is None: + raise TypeError("Missing 'managed_api_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if parameter_values is None and 'parameterValues' in kwargs: + parameter_values = kwargs['parameterValues'] + + _setter("managed_api_id", managed_api_id) + _setter("resource_group_name", resource_group_name) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameter_values is not None: - pulumi.set(__self__, "parameter_values", parameter_values) + _setter("parameter_values", parameter_values) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="managedApiId") @@ -126,18 +159,47 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where this API Connection should exist. Changing this forces a new API Connection to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the API Connection. """ + _ApiConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + managed_api_id=managed_api_id, + name=name, + parameter_values=parameter_values, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + managed_api_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameter_values: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if managed_api_id is None and 'managedApiId' in kwargs: + managed_api_id = kwargs['managedApiId'] + if parameter_values is None and 'parameterValues' in kwargs: + parameter_values = kwargs['parameterValues'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if managed_api_id is not None: - pulumi.set(__self__, "managed_api_id", managed_api_id) + _setter("managed_api_id", managed_api_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameter_values is not None: - pulumi.set(__self__, "parameter_values", parameter_values) + _setter("parameter_values", parameter_values) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="displayName") @@ -317,6 +379,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApiConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/connections/get_managed_api.py b/sdk/python/pulumi_azure/connections/get_managed_api.py index 963f1c7afc..ee75b991b9 100644 --- a/sdk/python/pulumi_azure/connections/get_managed_api.py +++ b/sdk/python/pulumi_azure/connections/get_managed_api.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/consumption/_inputs.py b/sdk/python/pulumi_azure/consumption/_inputs.py index 153d3706ea..0fc1917a45 100644 --- a/sdk/python/pulumi_azure/consumption/_inputs.py +++ b/sdk/python/pulumi_azure/consumption/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -47,15 +47,32 @@ def __init__(__self__, *, :param pulumi.Input['BudgetManagementGroupFilterNotArgs'] not_: A `not` block as defined below to filter the budget on. This is deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. :param pulumi.Input[Sequence[pulumi.Input['BudgetManagementGroupFilterTagArgs']]] tags: One or more `tag` blocks as defined below to filter the budget on. """ + BudgetManagementGroupFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimensions=dimensions, + not_=not_, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimensions: Optional[pulumi.Input[Sequence[pulumi.Input['BudgetManagementGroupFilterDimensionArgs']]]] = None, + not_: Optional[pulumi.Input['BudgetManagementGroupFilterNotArgs']] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input['BudgetManagementGroupFilterTagArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ is None and 'not' in kwargs: + not_ = kwargs['not'] + if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if not_ is not None: warnings.warn("""This property has been deprecated as the API no longer supports it and will be removed in version 4.0 of the provider.""", DeprecationWarning) pulumi.log.warn("""not_ is deprecated: This property has been deprecated as the API no longer supports it and will be removed in version 4.0 of the provider.""") if not_ is not None: - pulumi.set(__self__, "not_", not_) + _setter("not_", not_) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -108,10 +125,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values for the column. :param pulumi.Input[str] operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetManagementGroupFilterDimensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -159,10 +195,23 @@ def __init__(__self__, *, :param pulumi.Input['BudgetManagementGroupFilterNotDimensionArgs'] dimension: One `dimension` block as defined below to filter the budget on. Conflicts with `tag`. :param pulumi.Input['BudgetManagementGroupFilterNotTagArgs'] tag: One `tag` block as defined below to filter the budget on. Conflicts with `dimension`. """ + BudgetManagementGroupFilterNotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimension=dimension, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimension: Optional[pulumi.Input['BudgetManagementGroupFilterNotDimensionArgs']] = None, + tag: Optional[pulumi.Input['BudgetManagementGroupFilterNotTagArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dimension is not None: - pulumi.set(__self__, "dimension", dimension) + _setter("dimension", dimension) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter @@ -200,10 +249,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values for the column. :param pulumi.Input[str] operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetManagementGroupFilterNotDimensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -253,10 +321,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values for the tag. :param pulumi.Input[str] operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetManagementGroupFilterNotTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -306,10 +393,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values for the tag. :param pulumi.Input[str] operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetManagementGroupFilterTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -363,13 +469,42 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Should the notification be enabled? Defaults to `true`. :param pulumi.Input[str] threshold_type: The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are `Actual` and `Forecasted`. Default is `Actual`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "contact_emails", contact_emails) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + BudgetManagementGroupNotificationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + contact_emails=contact_emails, + operator=operator, + threshold=threshold, + enabled=enabled, + threshold_type=threshold_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contact_emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + threshold: Optional[pulumi.Input[int]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + threshold_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if contact_emails is None and 'contactEmails' in kwargs: + contact_emails = kwargs['contactEmails'] + if contact_emails is None: + raise TypeError("Missing 'contact_emails' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if threshold_type is None and 'thresholdType' in kwargs: + threshold_type = kwargs['thresholdType'] + + _setter("contact_emails", contact_emails) + _setter("operator", operator) + _setter("threshold", threshold) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if threshold_type is not None: - pulumi.set(__self__, "threshold_type", threshold_type) + _setter("threshold_type", threshold_type) @property @pulumi.getter(name="contactEmails") @@ -441,9 +576,28 @@ def __init__(__self__, *, :param pulumi.Input[str] start_date: The start date for the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. Changing this forces a new resource to be created. :param pulumi.Input[str] end_date: The end date for the budget. If not set this will be 10 years after the start date. """ - pulumi.set(__self__, "start_date", start_date) + BudgetManagementGroupTimePeriodArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + start_date=start_date, + end_date=end_date, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + start_date: Optional[pulumi.Input[str]] = None, + end_date: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if start_date is None: + raise TypeError("Missing 'start_date' argument") + if end_date is None and 'endDate' in kwargs: + end_date = kwargs['endDate'] + + _setter("start_date", start_date) if end_date is not None: - pulumi.set(__self__, "end_date", end_date) + _setter("end_date", end_date) @property @pulumi.getter(name="startDate") @@ -481,15 +635,32 @@ def __init__(__self__, *, :param pulumi.Input['BudgetResourceGroupFilterNotArgs'] not_: A `not` block as defined below to filter the budget on. This is deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. :param pulumi.Input[Sequence[pulumi.Input['BudgetResourceGroupFilterTagArgs']]] tags: One or more `tag` blocks as defined below to filter the budget on. """ + BudgetResourceGroupFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimensions=dimensions, + not_=not_, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimensions: Optional[pulumi.Input[Sequence[pulumi.Input['BudgetResourceGroupFilterDimensionArgs']]]] = None, + not_: Optional[pulumi.Input['BudgetResourceGroupFilterNotArgs']] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input['BudgetResourceGroupFilterTagArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ is None and 'not' in kwargs: + not_ = kwargs['not'] + if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if not_ is not None: warnings.warn("""This property has been deprecated as the API no longer supports it and will be removed in version 4.0 of the provider.""", DeprecationWarning) pulumi.log.warn("""not_ is deprecated: This property has been deprecated as the API no longer supports it and will be removed in version 4.0 of the provider.""") if not_ is not None: - pulumi.set(__self__, "not_", not_) + _setter("not_", not_) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -542,10 +713,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values for the column. :param pulumi.Input[str] operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetResourceGroupFilterDimensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -593,10 +783,23 @@ def __init__(__self__, *, :param pulumi.Input['BudgetResourceGroupFilterNotDimensionArgs'] dimension: One `dimension` block as defined below to filter the budget on. Conflicts with `tag`. :param pulumi.Input['BudgetResourceGroupFilterNotTagArgs'] tag: One `tag` block as defined below to filter the budget on. Conflicts with `dimension`. """ + BudgetResourceGroupFilterNotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimension=dimension, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimension: Optional[pulumi.Input['BudgetResourceGroupFilterNotDimensionArgs']] = None, + tag: Optional[pulumi.Input['BudgetResourceGroupFilterNotTagArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dimension is not None: - pulumi.set(__self__, "dimension", dimension) + _setter("dimension", dimension) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter @@ -634,10 +837,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values for the column. :param pulumi.Input[str] operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetResourceGroupFilterNotDimensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -687,10 +909,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values for the tag. :param pulumi.Input[str] operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetResourceGroupFilterNotTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -740,10 +981,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values for the tag. :param pulumi.Input[str] operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetResourceGroupFilterTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -803,18 +1063,53 @@ def __init__(__self__, *, > **NOTE:** A `notification` block cannot have all of `contact_emails`, `contact_roles`, and `contact_groups` empty. This means that at least one of the three must be specified. :param pulumi.Input[str] threshold_type: The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are `Actual` and `Forecasted`. Default is `Actual`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + BudgetResourceGroupNotificationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + threshold=threshold, + contact_emails=contact_emails, + contact_groups=contact_groups, + contact_roles=contact_roles, + enabled=enabled, + threshold_type=threshold_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + threshold: Optional[pulumi.Input[int]] = None, + contact_emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + contact_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + contact_roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + threshold_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if contact_emails is None and 'contactEmails' in kwargs: + contact_emails = kwargs['contactEmails'] + if contact_groups is None and 'contactGroups' in kwargs: + contact_groups = kwargs['contactGroups'] + if contact_roles is None and 'contactRoles' in kwargs: + contact_roles = kwargs['contactRoles'] + if threshold_type is None and 'thresholdType' in kwargs: + threshold_type = kwargs['thresholdType'] + + _setter("operator", operator) + _setter("threshold", threshold) if contact_emails is not None: - pulumi.set(__self__, "contact_emails", contact_emails) + _setter("contact_emails", contact_emails) if contact_groups is not None: - pulumi.set(__self__, "contact_groups", contact_groups) + _setter("contact_groups", contact_groups) if contact_roles is not None: - pulumi.set(__self__, "contact_roles", contact_roles) + _setter("contact_roles", contact_roles) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if threshold_type is not None: - pulumi.set(__self__, "threshold_type", threshold_type) + _setter("threshold_type", threshold_type) @property @pulumi.getter @@ -912,9 +1207,28 @@ def __init__(__self__, *, :param pulumi.Input[str] start_date: The start date for the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. Changing this forces a new Resource Group Consumption Budget to be created. :param pulumi.Input[str] end_date: The end date for the budget. If not set this will be 10 years after the start date. """ - pulumi.set(__self__, "start_date", start_date) + BudgetResourceGroupTimePeriodArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + start_date=start_date, + end_date=end_date, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + start_date: Optional[pulumi.Input[str]] = None, + end_date: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if start_date is None: + raise TypeError("Missing 'start_date' argument") + if end_date is None and 'endDate' in kwargs: + end_date = kwargs['endDate'] + + _setter("start_date", start_date) if end_date is not None: - pulumi.set(__self__, "end_date", end_date) + _setter("end_date", end_date) @property @pulumi.getter(name="startDate") @@ -952,15 +1266,32 @@ def __init__(__self__, *, :param pulumi.Input['BudgetSubscriptionFilterNotArgs'] not_: A `not` block as defined below to filter the budget on. This is deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. :param pulumi.Input[Sequence[pulumi.Input['BudgetSubscriptionFilterTagArgs']]] tags: One or more `tag` blocks as defined below to filter the budget on. """ + BudgetSubscriptionFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimensions=dimensions, + not_=not_, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimensions: Optional[pulumi.Input[Sequence[pulumi.Input['BudgetSubscriptionFilterDimensionArgs']]]] = None, + not_: Optional[pulumi.Input['BudgetSubscriptionFilterNotArgs']] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input['BudgetSubscriptionFilterTagArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ is None and 'not' in kwargs: + not_ = kwargs['not'] + if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if not_ is not None: warnings.warn("""This property has been deprecated as the API no longer supports it and will be removed in version 4.0 of the provider.""", DeprecationWarning) pulumi.log.warn("""not_ is deprecated: This property has been deprecated as the API no longer supports it and will be removed in version 4.0 of the provider.""") if not_ is not None: - pulumi.set(__self__, "not_", not_) + _setter("not_", not_) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -1013,10 +1344,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values for the column. :param pulumi.Input[str] operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetSubscriptionFilterDimensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -1064,10 +1414,23 @@ def __init__(__self__, *, :param pulumi.Input['BudgetSubscriptionFilterNotDimensionArgs'] dimension: One `dimension` block as defined below to filter the budget on. Conflicts with `tag`. :param pulumi.Input['BudgetSubscriptionFilterNotTagArgs'] tag: One `tag` block as defined below to filter the budget on. Conflicts with `dimension`. """ + BudgetSubscriptionFilterNotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimension=dimension, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimension: Optional[pulumi.Input['BudgetSubscriptionFilterNotDimensionArgs']] = None, + tag: Optional[pulumi.Input['BudgetSubscriptionFilterNotTagArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dimension is not None: - pulumi.set(__self__, "dimension", dimension) + _setter("dimension", dimension) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter @@ -1105,10 +1468,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values for the column. :param pulumi.Input[str] operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetSubscriptionFilterNotDimensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -1158,10 +1540,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values for the tag. :param pulumi.Input[str] operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetSubscriptionFilterNotTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -1211,10 +1612,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values for the tag. :param pulumi.Input[str] operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetSubscriptionFilterTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -1274,18 +1694,53 @@ def __init__(__self__, *, > **NOTE:** A `notification` block cannot have all of `contact_emails`, `contact_roles`, and `contact_groups` empty. This means that at least one of the three must be specified. :param pulumi.Input[str] threshold_type: The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are `Actual` and `Forecasted`. Default is `Actual`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + BudgetSubscriptionNotificationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + threshold=threshold, + contact_emails=contact_emails, + contact_groups=contact_groups, + contact_roles=contact_roles, + enabled=enabled, + threshold_type=threshold_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + threshold: Optional[pulumi.Input[int]] = None, + contact_emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + contact_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + contact_roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + threshold_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if contact_emails is None and 'contactEmails' in kwargs: + contact_emails = kwargs['contactEmails'] + if contact_groups is None and 'contactGroups' in kwargs: + contact_groups = kwargs['contactGroups'] + if contact_roles is None and 'contactRoles' in kwargs: + contact_roles = kwargs['contactRoles'] + if threshold_type is None and 'thresholdType' in kwargs: + threshold_type = kwargs['thresholdType'] + + _setter("operator", operator) + _setter("threshold", threshold) if contact_emails is not None: - pulumi.set(__self__, "contact_emails", contact_emails) + _setter("contact_emails", contact_emails) if contact_groups is not None: - pulumi.set(__self__, "contact_groups", contact_groups) + _setter("contact_groups", contact_groups) if contact_roles is not None: - pulumi.set(__self__, "contact_roles", contact_roles) + _setter("contact_roles", contact_roles) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if threshold_type is not None: - pulumi.set(__self__, "threshold_type", threshold_type) + _setter("threshold_type", threshold_type) @property @pulumi.getter @@ -1383,9 +1838,28 @@ def __init__(__self__, *, :param pulumi.Input[str] start_date: The start date for the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. Changing this forces a new Subscription Consumption Budget to be created. :param pulumi.Input[str] end_date: The end date for the budget. If not set this will be 10 years after the start date. """ - pulumi.set(__self__, "start_date", start_date) + BudgetSubscriptionTimePeriodArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + start_date=start_date, + end_date=end_date, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + start_date: Optional[pulumi.Input[str]] = None, + end_date: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if start_date is None: + raise TypeError("Missing 'start_date' argument") + if end_date is None and 'endDate' in kwargs: + end_date = kwargs['endDate'] + + _setter("start_date", start_date) if end_date is not None: - pulumi.set(__self__, "end_date", end_date) + _setter("end_date", end_date) @property @pulumi.getter(name="startDate") diff --git a/sdk/python/pulumi_azure/consumption/budget_management_group.py b/sdk/python/pulumi_azure/consumption/budget_management_group.py index 84c9d86b90..8bd82421da 100644 --- a/sdk/python/pulumi_azure/consumption/budget_management_group.py +++ b/sdk/python/pulumi_azure/consumption/budget_management_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,18 +35,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Management Group Consumption Budget. Changing this forces a new resource to be created. :param pulumi.Input[str] time_grain: The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "amount", amount) - pulumi.set(__self__, "management_group_id", management_group_id) - pulumi.set(__self__, "notifications", notifications) - pulumi.set(__self__, "time_period", time_period) + BudgetManagementGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + amount=amount, + management_group_id=management_group_id, + notifications=notifications, + time_period=time_period, + etag=etag, + filter=filter, + name=name, + time_grain=time_grain, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + amount: Optional[pulumi.Input[float]] = None, + management_group_id: Optional[pulumi.Input[str]] = None, + notifications: Optional[pulumi.Input[Sequence[pulumi.Input['BudgetManagementGroupNotificationArgs']]]] = None, + time_period: Optional[pulumi.Input['BudgetManagementGroupTimePeriodArgs']] = None, + etag: Optional[pulumi.Input[str]] = None, + filter: Optional[pulumi.Input['BudgetManagementGroupFilterArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + time_grain: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if amount is None: + raise TypeError("Missing 'amount' argument") + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if management_group_id is None: + raise TypeError("Missing 'management_group_id' argument") + if notifications is None: + raise TypeError("Missing 'notifications' argument") + if time_period is None and 'timePeriod' in kwargs: + time_period = kwargs['timePeriod'] + if time_period is None: + raise TypeError("Missing 'time_period' argument") + if time_grain is None and 'timeGrain' in kwargs: + time_grain = kwargs['timeGrain'] + + _setter("amount", amount) + _setter("management_group_id", management_group_id) + _setter("notifications", notifications) + _setter("time_period", time_period) if etag is not None: - pulumi.set(__self__, "etag", etag) + _setter("etag", etag) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if time_grain is not None: - pulumi.set(__self__, "time_grain", time_grain) + _setter("time_grain", time_grain) @property @pulumi.getter @@ -167,22 +206,53 @@ def __init__(__self__, *, :param pulumi.Input[str] time_grain: The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. :param pulumi.Input['BudgetManagementGroupTimePeriodArgs'] time_period: A `time_period` block as defined below. """ + _BudgetManagementGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + amount=amount, + etag=etag, + filter=filter, + management_group_id=management_group_id, + name=name, + notifications=notifications, + time_grain=time_grain, + time_period=time_period, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + amount: Optional[pulumi.Input[float]] = None, + etag: Optional[pulumi.Input[str]] = None, + filter: Optional[pulumi.Input['BudgetManagementGroupFilterArgs']] = None, + management_group_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notifications: Optional[pulumi.Input[Sequence[pulumi.Input['BudgetManagementGroupNotificationArgs']]]] = None, + time_grain: Optional[pulumi.Input[str]] = None, + time_period: Optional[pulumi.Input['BudgetManagementGroupTimePeriodArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if time_grain is None and 'timeGrain' in kwargs: + time_grain = kwargs['timeGrain'] + if time_period is None and 'timePeriod' in kwargs: + time_period = kwargs['timePeriod'] + if amount is not None: - pulumi.set(__self__, "amount", amount) + _setter("amount", amount) if etag is not None: - pulumi.set(__self__, "etag", etag) + _setter("etag", etag) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) if management_group_id is not None: - pulumi.set(__self__, "management_group_id", management_group_id) + _setter("management_group_id", management_group_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notifications is not None: - pulumi.set(__self__, "notifications", notifications) + _setter("notifications", notifications) if time_grain is not None: - pulumi.set(__self__, "time_grain", time_grain) + _setter("time_grain", time_grain) if time_period is not None: - pulumi.set(__self__, "time_period", time_period) + _setter("time_period", time_period) @property @pulumi.getter @@ -448,6 +518,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BudgetManagementGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -474,6 +548,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'amount'") __props__.__dict__["amount"] = amount __props__.__dict__["etag"] = etag + if filter is not None and not isinstance(filter, BudgetManagementGroupFilterArgs): + filter = filter or {} + def _setter(key, value): + filter[key] = value + BudgetManagementGroupFilterArgs._configure(_setter, **filter) __props__.__dict__["filter"] = filter if management_group_id is None and not opts.urn: raise TypeError("Missing required property 'management_group_id'") @@ -483,6 +562,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'notifications'") __props__.__dict__["notifications"] = notifications __props__.__dict__["time_grain"] = time_grain + if time_period is not None and not isinstance(time_period, BudgetManagementGroupTimePeriodArgs): + time_period = time_period or {} + def _setter(key, value): + time_period[key] = value + BudgetManagementGroupTimePeriodArgs._configure(_setter, **time_period) if time_period is None and not opts.urn: raise TypeError("Missing required property 'time_period'") __props__.__dict__["time_period"] = time_period diff --git a/sdk/python/pulumi_azure/consumption/budget_resource_group.py b/sdk/python/pulumi_azure/consumption/budget_resource_group.py index 6fb0239195..41cd1b0b1b 100644 --- a/sdk/python/pulumi_azure/consumption/budget_resource_group.py +++ b/sdk/python/pulumi_azure/consumption/budget_resource_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,18 +35,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Resource Group Consumption Budget. Changing this forces a new Resource Group Consumption Budget to be created. :param pulumi.Input[str] time_grain: The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "amount", amount) - pulumi.set(__self__, "notifications", notifications) - pulumi.set(__self__, "resource_group_id", resource_group_id) - pulumi.set(__self__, "time_period", time_period) + BudgetResourceGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + amount=amount, + notifications=notifications, + resource_group_id=resource_group_id, + time_period=time_period, + etag=etag, + filter=filter, + name=name, + time_grain=time_grain, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + amount: Optional[pulumi.Input[float]] = None, + notifications: Optional[pulumi.Input[Sequence[pulumi.Input['BudgetResourceGroupNotificationArgs']]]] = None, + resource_group_id: Optional[pulumi.Input[str]] = None, + time_period: Optional[pulumi.Input['BudgetResourceGroupTimePeriodArgs']] = None, + etag: Optional[pulumi.Input[str]] = None, + filter: Optional[pulumi.Input['BudgetResourceGroupFilterArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + time_grain: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if amount is None: + raise TypeError("Missing 'amount' argument") + if notifications is None: + raise TypeError("Missing 'notifications' argument") + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if resource_group_id is None: + raise TypeError("Missing 'resource_group_id' argument") + if time_period is None and 'timePeriod' in kwargs: + time_period = kwargs['timePeriod'] + if time_period is None: + raise TypeError("Missing 'time_period' argument") + if time_grain is None and 'timeGrain' in kwargs: + time_grain = kwargs['timeGrain'] + + _setter("amount", amount) + _setter("notifications", notifications) + _setter("resource_group_id", resource_group_id) + _setter("time_period", time_period) if etag is not None: - pulumi.set(__self__, "etag", etag) + _setter("etag", etag) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if time_grain is not None: - pulumi.set(__self__, "time_grain", time_grain) + _setter("time_grain", time_grain) @property @pulumi.getter @@ -167,22 +206,53 @@ def __init__(__self__, *, :param pulumi.Input[str] time_grain: The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. :param pulumi.Input['BudgetResourceGroupTimePeriodArgs'] time_period: A `time_period` block as defined below. """ + _BudgetResourceGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + amount=amount, + etag=etag, + filter=filter, + name=name, + notifications=notifications, + resource_group_id=resource_group_id, + time_grain=time_grain, + time_period=time_period, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + amount: Optional[pulumi.Input[float]] = None, + etag: Optional[pulumi.Input[str]] = None, + filter: Optional[pulumi.Input['BudgetResourceGroupFilterArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + notifications: Optional[pulumi.Input[Sequence[pulumi.Input['BudgetResourceGroupNotificationArgs']]]] = None, + resource_group_id: Optional[pulumi.Input[str]] = None, + time_grain: Optional[pulumi.Input[str]] = None, + time_period: Optional[pulumi.Input['BudgetResourceGroupTimePeriodArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if time_grain is None and 'timeGrain' in kwargs: + time_grain = kwargs['timeGrain'] + if time_period is None and 'timePeriod' in kwargs: + time_period = kwargs['timePeriod'] + if amount is not None: - pulumi.set(__self__, "amount", amount) + _setter("amount", amount) if etag is not None: - pulumi.set(__self__, "etag", etag) + _setter("etag", etag) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notifications is not None: - pulumi.set(__self__, "notifications", notifications) + _setter("notifications", notifications) if resource_group_id is not None: - pulumi.set(__self__, "resource_group_id", resource_group_id) + _setter("resource_group_id", resource_group_id) if time_grain is not None: - pulumi.set(__self__, "time_grain", time_grain) + _setter("time_grain", time_grain) if time_period is not None: - pulumi.set(__self__, "time_period", time_period) + _setter("time_period", time_period) @property @pulumi.getter @@ -456,6 +526,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BudgetResourceGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -482,6 +556,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'amount'") __props__.__dict__["amount"] = amount __props__.__dict__["etag"] = etag + if filter is not None and not isinstance(filter, BudgetResourceGroupFilterArgs): + filter = filter or {} + def _setter(key, value): + filter[key] = value + BudgetResourceGroupFilterArgs._configure(_setter, **filter) __props__.__dict__["filter"] = filter __props__.__dict__["name"] = name if notifications is None and not opts.urn: @@ -491,6 +570,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'resource_group_id'") __props__.__dict__["resource_group_id"] = resource_group_id __props__.__dict__["time_grain"] = time_grain + if time_period is not None and not isinstance(time_period, BudgetResourceGroupTimePeriodArgs): + time_period = time_period or {} + def _setter(key, value): + time_period[key] = value + BudgetResourceGroupTimePeriodArgs._configure(_setter, **time_period) if time_period is None and not opts.urn: raise TypeError("Missing required property 'time_period'") __props__.__dict__["time_period"] = time_period diff --git a/sdk/python/pulumi_azure/consumption/budget_subscription.py b/sdk/python/pulumi_azure/consumption/budget_subscription.py index a64106fd9a..97ecd12306 100644 --- a/sdk/python/pulumi_azure/consumption/budget_subscription.py +++ b/sdk/python/pulumi_azure/consumption/budget_subscription.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,18 +37,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created. :param pulumi.Input[str] time_grain: The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "amount", amount) - pulumi.set(__self__, "notifications", notifications) - pulumi.set(__self__, "subscription_id", subscription_id) - pulumi.set(__self__, "time_period", time_period) + BudgetSubscriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + amount=amount, + notifications=notifications, + subscription_id=subscription_id, + time_period=time_period, + etag=etag, + filter=filter, + name=name, + time_grain=time_grain, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + amount: Optional[pulumi.Input[float]] = None, + notifications: Optional[pulumi.Input[Sequence[pulumi.Input['BudgetSubscriptionNotificationArgs']]]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + time_period: Optional[pulumi.Input['BudgetSubscriptionTimePeriodArgs']] = None, + etag: Optional[pulumi.Input[str]] = None, + filter: Optional[pulumi.Input['BudgetSubscriptionFilterArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + time_grain: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if amount is None: + raise TypeError("Missing 'amount' argument") + if notifications is None: + raise TypeError("Missing 'notifications' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + if time_period is None and 'timePeriod' in kwargs: + time_period = kwargs['timePeriod'] + if time_period is None: + raise TypeError("Missing 'time_period' argument") + if time_grain is None and 'timeGrain' in kwargs: + time_grain = kwargs['timeGrain'] + + _setter("amount", amount) + _setter("notifications", notifications) + _setter("subscription_id", subscription_id) + _setter("time_period", time_period) if etag is not None: - pulumi.set(__self__, "etag", etag) + _setter("etag", etag) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if time_grain is not None: - pulumi.set(__self__, "time_grain", time_grain) + _setter("time_grain", time_grain) @property @pulumi.getter @@ -173,22 +212,53 @@ def __init__(__self__, *, :param pulumi.Input[str] time_grain: The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of `BillingAnnual`, `BillingMonth`, `BillingQuarter`, `Annually`, `Monthly` and `Quarterly`. Defaults to `Monthly`. Changing this forces a new resource to be created. :param pulumi.Input['BudgetSubscriptionTimePeriodArgs'] time_period: A `time_period` block as defined below. """ + _BudgetSubscriptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + amount=amount, + etag=etag, + filter=filter, + name=name, + notifications=notifications, + subscription_id=subscription_id, + time_grain=time_grain, + time_period=time_period, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + amount: Optional[pulumi.Input[float]] = None, + etag: Optional[pulumi.Input[str]] = None, + filter: Optional[pulumi.Input['BudgetSubscriptionFilterArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + notifications: Optional[pulumi.Input[Sequence[pulumi.Input['BudgetSubscriptionNotificationArgs']]]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + time_grain: Optional[pulumi.Input[str]] = None, + time_period: Optional[pulumi.Input['BudgetSubscriptionTimePeriodArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if time_grain is None and 'timeGrain' in kwargs: + time_grain = kwargs['timeGrain'] + if time_period is None and 'timePeriod' in kwargs: + time_period = kwargs['timePeriod'] + if amount is not None: - pulumi.set(__self__, "amount", amount) + _setter("amount", amount) if etag is not None: - pulumi.set(__self__, "etag", etag) + _setter("etag", etag) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notifications is not None: - pulumi.set(__self__, "notifications", notifications) + _setter("notifications", notifications) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) if time_grain is not None: - pulumi.set(__self__, "time_grain", time_grain) + _setter("time_grain", time_grain) if time_period is not None: - pulumi.set(__self__, "time_period", time_period) + _setter("time_period", time_period) @property @pulumi.getter @@ -468,6 +538,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BudgetSubscriptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -494,6 +568,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'amount'") __props__.__dict__["amount"] = amount __props__.__dict__["etag"] = etag + if filter is not None and not isinstance(filter, BudgetSubscriptionFilterArgs): + filter = filter or {} + def _setter(key, value): + filter[key] = value + BudgetSubscriptionFilterArgs._configure(_setter, **filter) __props__.__dict__["filter"] = filter __props__.__dict__["name"] = name if notifications is None and not opts.urn: @@ -503,6 +582,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'subscription_id'") __props__.__dict__["subscription_id"] = subscription_id __props__.__dict__["time_grain"] = time_grain + if time_period is not None and not isinstance(time_period, BudgetSubscriptionTimePeriodArgs): + time_period = time_period or {} + def _setter(key, value): + time_period[key] = value + BudgetSubscriptionTimePeriodArgs._configure(_setter, **time_period) if time_period is None and not opts.urn: raise TypeError("Missing required property 'time_period'") __props__.__dict__["time_period"] = time_period diff --git a/sdk/python/pulumi_azure/consumption/get_budget_resource_group.py b/sdk/python/pulumi_azure/consumption/get_budget_resource_group.py index 60852321e0..3cfe735d2e 100644 --- a/sdk/python/pulumi_azure/consumption/get_budget_resource_group.py +++ b/sdk/python/pulumi_azure/consumption/get_budget_resource_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/consumption/get_budget_subscription.py b/sdk/python/pulumi_azure/consumption/get_budget_subscription.py index feb9b471ff..188e4ba998 100644 --- a/sdk/python/pulumi_azure/consumption/get_budget_subscription.py +++ b/sdk/python/pulumi_azure/consumption/get_budget_subscription.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/consumption/outputs.py b/sdk/python/pulumi_azure/consumption/outputs.py index 14a994927d..dfc6e5ab72 100644 --- a/sdk/python/pulumi_azure/consumption/outputs.py +++ b/sdk/python/pulumi_azure/consumption/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -81,12 +81,29 @@ def __init__(__self__, *, :param 'BudgetManagementGroupFilterNotArgs' not_: A `not` block as defined below to filter the budget on. This is deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. :param Sequence['BudgetManagementGroupFilterTagArgs'] tags: One or more `tag` blocks as defined below to filter the budget on. """ + BudgetManagementGroupFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimensions=dimensions, + not_=not_, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimensions: Optional[Sequence['outputs.BudgetManagementGroupFilterDimension']] = None, + not_: Optional['outputs.BudgetManagementGroupFilterNot'] = None, + tags: Optional[Sequence['outputs.BudgetManagementGroupFilterTag']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ is None and 'not' in kwargs: + not_ = kwargs['not'] + if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if not_ is not None: - pulumi.set(__self__, "not_", not_) + _setter("not_", not_) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -127,10 +144,29 @@ def __init__(__self__, *, :param Sequence[str] values: Specifies a list of values for the column. :param str operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetManagementGroupFilterDimension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -166,10 +202,23 @@ def __init__(__self__, *, :param 'BudgetManagementGroupFilterNotDimensionArgs' dimension: One `dimension` block as defined below to filter the budget on. Conflicts with `tag`. :param 'BudgetManagementGroupFilterNotTagArgs' tag: One `tag` block as defined below to filter the budget on. Conflicts with `dimension`. """ + BudgetManagementGroupFilterNot._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimension=dimension, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimension: Optional['outputs.BudgetManagementGroupFilterNotDimension'] = None, + tag: Optional['outputs.BudgetManagementGroupFilterNotTag'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dimension is not None: - pulumi.set(__self__, "dimension", dimension) + _setter("dimension", dimension) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter @@ -199,10 +248,29 @@ def __init__(__self__, *, :param Sequence[str] values: Specifies a list of values for the column. :param str operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetManagementGroupFilterNotDimension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -240,10 +308,29 @@ def __init__(__self__, *, :param Sequence[str] values: Specifies a list of values for the tag. :param str operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetManagementGroupFilterNotTag._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -281,10 +368,29 @@ def __init__(__self__, *, :param Sequence[str] values: Specifies a list of values for the tag. :param str operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetManagementGroupFilterTag._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -345,13 +451,42 @@ def __init__(__self__, *, :param bool enabled: Should the notification be enabled? Defaults to `true`. :param str threshold_type: The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are `Actual` and `Forecasted`. Default is `Actual`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "contact_emails", contact_emails) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + BudgetManagementGroupNotification._configure( + lambda key, value: pulumi.set(__self__, key, value), + contact_emails=contact_emails, + operator=operator, + threshold=threshold, + enabled=enabled, + threshold_type=threshold_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contact_emails: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + threshold: Optional[int] = None, + enabled: Optional[bool] = None, + threshold_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if contact_emails is None and 'contactEmails' in kwargs: + contact_emails = kwargs['contactEmails'] + if contact_emails is None: + raise TypeError("Missing 'contact_emails' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if threshold_type is None and 'thresholdType' in kwargs: + threshold_type = kwargs['thresholdType'] + + _setter("contact_emails", contact_emails) + _setter("operator", operator) + _setter("threshold", threshold) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if threshold_type is not None: - pulumi.set(__self__, "threshold_type", threshold_type) + _setter("threshold_type", threshold_type) @property @pulumi.getter(name="contactEmails") @@ -422,9 +557,28 @@ def __init__(__self__, *, :param str start_date: The start date for the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. Changing this forces a new resource to be created. :param str end_date: The end date for the budget. If not set this will be 10 years after the start date. """ - pulumi.set(__self__, "start_date", start_date) + BudgetManagementGroupTimePeriod._configure( + lambda key, value: pulumi.set(__self__, key, value), + start_date=start_date, + end_date=end_date, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + start_date: Optional[str] = None, + end_date: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if start_date is None: + raise TypeError("Missing 'start_date' argument") + if end_date is None and 'endDate' in kwargs: + end_date = kwargs['endDate'] + + _setter("start_date", start_date) if end_date is not None: - pulumi.set(__self__, "end_date", end_date) + _setter("end_date", end_date) @property @pulumi.getter(name="startDate") @@ -471,12 +625,29 @@ def __init__(__self__, *, :param 'BudgetResourceGroupFilterNotArgs' not_: A `not` block as defined below to filter the budget on. This is deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. :param Sequence['BudgetResourceGroupFilterTagArgs'] tags: One or more `tag` blocks as defined below to filter the budget on. """ + BudgetResourceGroupFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimensions=dimensions, + not_=not_, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimensions: Optional[Sequence['outputs.BudgetResourceGroupFilterDimension']] = None, + not_: Optional['outputs.BudgetResourceGroupFilterNot'] = None, + tags: Optional[Sequence['outputs.BudgetResourceGroupFilterTag']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ is None and 'not' in kwargs: + not_ = kwargs['not'] + if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if not_ is not None: - pulumi.set(__self__, "not_", not_) + _setter("not_", not_) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -517,10 +688,29 @@ def __init__(__self__, *, :param Sequence[str] values: Specifies a list of values for the column. :param str operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetResourceGroupFilterDimension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -556,10 +746,23 @@ def __init__(__self__, *, :param 'BudgetResourceGroupFilterNotDimensionArgs' dimension: One `dimension` block as defined below to filter the budget on. Conflicts with `tag`. :param 'BudgetResourceGroupFilterNotTagArgs' tag: One `tag` block as defined below to filter the budget on. Conflicts with `dimension`. """ + BudgetResourceGroupFilterNot._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimension=dimension, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimension: Optional['outputs.BudgetResourceGroupFilterNotDimension'] = None, + tag: Optional['outputs.BudgetResourceGroupFilterNotTag'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dimension is not None: - pulumi.set(__self__, "dimension", dimension) + _setter("dimension", dimension) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter @@ -589,10 +792,29 @@ def __init__(__self__, *, :param Sequence[str] values: Specifies a list of values for the column. :param str operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetResourceGroupFilterNotDimension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -630,10 +852,29 @@ def __init__(__self__, *, :param Sequence[str] values: Specifies a list of values for the tag. :param str operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetResourceGroupFilterNotTag._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -671,10 +912,29 @@ def __init__(__self__, *, :param Sequence[str] values: Specifies a list of values for the tag. :param str operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetResourceGroupFilterTag._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -745,18 +1005,53 @@ def __init__(__self__, *, > **NOTE:** A `notification` block cannot have all of `contact_emails`, `contact_roles`, and `contact_groups` empty. This means that at least one of the three must be specified. :param str threshold_type: The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are `Actual` and `Forecasted`. Default is `Actual`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + BudgetResourceGroupNotification._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + threshold=threshold, + contact_emails=contact_emails, + contact_groups=contact_groups, + contact_roles=contact_roles, + enabled=enabled, + threshold_type=threshold_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + threshold: Optional[int] = None, + contact_emails: Optional[Sequence[str]] = None, + contact_groups: Optional[Sequence[str]] = None, + contact_roles: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + threshold_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if contact_emails is None and 'contactEmails' in kwargs: + contact_emails = kwargs['contactEmails'] + if contact_groups is None and 'contactGroups' in kwargs: + contact_groups = kwargs['contactGroups'] + if contact_roles is None and 'contactRoles' in kwargs: + contact_roles = kwargs['contactRoles'] + if threshold_type is None and 'thresholdType' in kwargs: + threshold_type = kwargs['thresholdType'] + + _setter("operator", operator) + _setter("threshold", threshold) if contact_emails is not None: - pulumi.set(__self__, "contact_emails", contact_emails) + _setter("contact_emails", contact_emails) if contact_groups is not None: - pulumi.set(__self__, "contact_groups", contact_groups) + _setter("contact_groups", contact_groups) if contact_roles is not None: - pulumi.set(__self__, "contact_roles", contact_roles) + _setter("contact_roles", contact_roles) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if threshold_type is not None: - pulumi.set(__self__, "threshold_type", threshold_type) + _setter("threshold_type", threshold_type) @property @pulumi.getter @@ -845,9 +1140,28 @@ def __init__(__self__, *, :param str start_date: The start date for the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. Changing this forces a new Resource Group Consumption Budget to be created. :param str end_date: The end date for the budget. If not set this will be 10 years after the start date. """ - pulumi.set(__self__, "start_date", start_date) + BudgetResourceGroupTimePeriod._configure( + lambda key, value: pulumi.set(__self__, key, value), + start_date=start_date, + end_date=end_date, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + start_date: Optional[str] = None, + end_date: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if start_date is None: + raise TypeError("Missing 'start_date' argument") + if end_date is None and 'endDate' in kwargs: + end_date = kwargs['endDate'] + + _setter("start_date", start_date) if end_date is not None: - pulumi.set(__self__, "end_date", end_date) + _setter("end_date", end_date) @property @pulumi.getter(name="startDate") @@ -894,12 +1208,29 @@ def __init__(__self__, *, :param 'BudgetSubscriptionFilterNotArgs' not_: A `not` block as defined below to filter the budget on. This is deprecated as the API no longer supports it and will be removed in version 4.0 of the provider. :param Sequence['BudgetSubscriptionFilterTagArgs'] tags: One or more `tag` blocks as defined below to filter the budget on. """ + BudgetSubscriptionFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimensions=dimensions, + not_=not_, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimensions: Optional[Sequence['outputs.BudgetSubscriptionFilterDimension']] = None, + not_: Optional['outputs.BudgetSubscriptionFilterNot'] = None, + tags: Optional[Sequence['outputs.BudgetSubscriptionFilterTag']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ is None and 'not' in kwargs: + not_ = kwargs['not'] + if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if not_ is not None: - pulumi.set(__self__, "not_", not_) + _setter("not_", not_) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -940,10 +1271,29 @@ def __init__(__self__, *, :param Sequence[str] values: Specifies a list of values for the column. :param str operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetSubscriptionFilterDimension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -979,10 +1329,23 @@ def __init__(__self__, *, :param 'BudgetSubscriptionFilterNotDimensionArgs' dimension: One `dimension` block as defined below to filter the budget on. Conflicts with `tag`. :param 'BudgetSubscriptionFilterNotTagArgs' tag: One `tag` block as defined below to filter the budget on. Conflicts with `dimension`. """ + BudgetSubscriptionFilterNot._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimension=dimension, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimension: Optional['outputs.BudgetSubscriptionFilterNotDimension'] = None, + tag: Optional['outputs.BudgetSubscriptionFilterNotTag'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dimension is not None: - pulumi.set(__self__, "dimension", dimension) + _setter("dimension", dimension) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter @@ -1012,10 +1375,29 @@ def __init__(__self__, *, :param Sequence[str] values: Specifies a list of values for the column. :param str operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetSubscriptionFilterNotDimension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -1053,10 +1435,29 @@ def __init__(__self__, *, :param Sequence[str] values: Specifies a list of values for the tag. :param str operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetSubscriptionFilterNotTag._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -1094,10 +1495,29 @@ def __init__(__self__, *, :param Sequence[str] values: Specifies a list of values for the tag. :param str operator: The operator to use for comparison. The allowed values are `In`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + BudgetSubscriptionFilterTag._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -1168,18 +1588,53 @@ def __init__(__self__, *, > **NOTE:** A `notification` block cannot have all of `contact_emails`, `contact_roles`, and `contact_groups` empty. This means that at least one of the three must be specified. :param str threshold_type: The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are `Actual` and `Forecasted`. Default is `Actual`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + BudgetSubscriptionNotification._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + threshold=threshold, + contact_emails=contact_emails, + contact_groups=contact_groups, + contact_roles=contact_roles, + enabled=enabled, + threshold_type=threshold_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + threshold: Optional[int] = None, + contact_emails: Optional[Sequence[str]] = None, + contact_groups: Optional[Sequence[str]] = None, + contact_roles: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + threshold_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if contact_emails is None and 'contactEmails' in kwargs: + contact_emails = kwargs['contactEmails'] + if contact_groups is None and 'contactGroups' in kwargs: + contact_groups = kwargs['contactGroups'] + if contact_roles is None and 'contactRoles' in kwargs: + contact_roles = kwargs['contactRoles'] + if threshold_type is None and 'thresholdType' in kwargs: + threshold_type = kwargs['thresholdType'] + + _setter("operator", operator) + _setter("threshold", threshold) if contact_emails is not None: - pulumi.set(__self__, "contact_emails", contact_emails) + _setter("contact_emails", contact_emails) if contact_groups is not None: - pulumi.set(__self__, "contact_groups", contact_groups) + _setter("contact_groups", contact_groups) if contact_roles is not None: - pulumi.set(__self__, "contact_roles", contact_roles) + _setter("contact_roles", contact_roles) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if threshold_type is not None: - pulumi.set(__self__, "threshold_type", threshold_type) + _setter("threshold_type", threshold_type) @property @pulumi.getter @@ -1268,9 +1723,28 @@ def __init__(__self__, *, :param str start_date: The start date for the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. Changing this forces a new Subscription Consumption Budget to be created. :param str end_date: The end date for the budget. If not set this will be 10 years after the start date. """ - pulumi.set(__self__, "start_date", start_date) + BudgetSubscriptionTimePeriod._configure( + lambda key, value: pulumi.set(__self__, key, value), + start_date=start_date, + end_date=end_date, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + start_date: Optional[str] = None, + end_date: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if start_date is None: + raise TypeError("Missing 'start_date' argument") + if end_date is None and 'endDate' in kwargs: + end_date = kwargs['endDate'] + + _setter("start_date", start_date) if end_date is not None: - pulumi.set(__self__, "end_date", end_date) + _setter("end_date", end_date) @property @pulumi.getter(name="startDate") @@ -1300,9 +1774,30 @@ def __init__(__self__, *, :param Sequence['GetBudgetResourceGroupFilterNotArgs'] nots: A `not` block as defined below. :param Sequence['GetBudgetResourceGroupFilterTagArgs'] tags: A `tag` block as defined below. """ - pulumi.set(__self__, "dimensions", dimensions) - pulumi.set(__self__, "nots", nots) - pulumi.set(__self__, "tags", tags) + GetBudgetResourceGroupFilterResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimensions=dimensions, + nots=nots, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimensions: Optional[Sequence['outputs.GetBudgetResourceGroupFilterDimensionResult']] = None, + nots: Optional[Sequence['outputs.GetBudgetResourceGroupFilterNotResult']] = None, + tags: Optional[Sequence['outputs.GetBudgetResourceGroupFilterTagResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dimensions is None: + raise TypeError("Missing 'dimensions' argument") + if nots is None: + raise TypeError("Missing 'nots' argument") + if tags is None: + raise TypeError("Missing 'tags' argument") + + _setter("dimensions", dimensions) + _setter("nots", nots) + _setter("tags", tags) @property @pulumi.getter @@ -1340,9 +1835,30 @@ def __init__(__self__, *, :param str operator: The operator used for comparison. :param Sequence[str] values: A list of values for the tag. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + GetBudgetResourceGroupFilterDimensionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1378,8 +1894,25 @@ def __init__(__self__, *, :param Sequence['GetBudgetResourceGroupFilterNotDimensionArgs'] dimensions: A `dimension` block as defined below. :param Sequence['GetBudgetResourceGroupFilterNotTagArgs'] tags: A `tag` block as defined below. """ - pulumi.set(__self__, "dimensions", dimensions) - pulumi.set(__self__, "tags", tags) + GetBudgetResourceGroupFilterNotResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimensions=dimensions, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimensions: Optional[Sequence['outputs.GetBudgetResourceGroupFilterNotDimensionResult']] = None, + tags: Optional[Sequence['outputs.GetBudgetResourceGroupFilterNotTagResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dimensions is None: + raise TypeError("Missing 'dimensions' argument") + if tags is None: + raise TypeError("Missing 'tags' argument") + + _setter("dimensions", dimensions) + _setter("tags", tags) @property @pulumi.getter @@ -1409,9 +1942,30 @@ def __init__(__self__, *, :param str operator: The operator used for comparison. :param Sequence[str] values: A list of values for the tag. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + GetBudgetResourceGroupFilterNotDimensionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1449,9 +2003,30 @@ def __init__(__self__, *, :param str operator: The operator used for comparison. :param Sequence[str] values: A list of values for the tag. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + GetBudgetResourceGroupFilterNotTagResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1489,9 +2064,30 @@ def __init__(__self__, *, :param str operator: The operator used for comparison. :param Sequence[str] values: A list of values for the tag. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + GetBudgetResourceGroupFilterTagResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1536,13 +2132,58 @@ def __init__(__self__, *, :param str operator: The operator used for comparison. :param int threshold: Threshold value associated with the notification. """ - pulumi.set(__self__, "contact_emails", contact_emails) - pulumi.set(__self__, "contact_groups", contact_groups) - pulumi.set(__self__, "contact_roles", contact_roles) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) - pulumi.set(__self__, "threshold_type", threshold_type) + GetBudgetResourceGroupNotificationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + contact_emails=contact_emails, + contact_groups=contact_groups, + contact_roles=contact_roles, + enabled=enabled, + operator=operator, + threshold=threshold, + threshold_type=threshold_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contact_emails: Optional[Sequence[str]] = None, + contact_groups: Optional[Sequence[str]] = None, + contact_roles: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + operator: Optional[str] = None, + threshold: Optional[int] = None, + threshold_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if contact_emails is None and 'contactEmails' in kwargs: + contact_emails = kwargs['contactEmails'] + if contact_emails is None: + raise TypeError("Missing 'contact_emails' argument") + if contact_groups is None and 'contactGroups' in kwargs: + contact_groups = kwargs['contactGroups'] + if contact_groups is None: + raise TypeError("Missing 'contact_groups' argument") + if contact_roles is None and 'contactRoles' in kwargs: + contact_roles = kwargs['contactRoles'] + if contact_roles is None: + raise TypeError("Missing 'contact_roles' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if threshold_type is None and 'thresholdType' in kwargs: + threshold_type = kwargs['thresholdType'] + if threshold_type is None: + raise TypeError("Missing 'threshold_type' argument") + + _setter("contact_emails", contact_emails) + _setter("contact_groups", contact_groups) + _setter("contact_roles", contact_roles) + _setter("enabled", enabled) + _setter("operator", operator) + _setter("threshold", threshold) + _setter("threshold_type", threshold_type) @property @pulumi.getter(name="contactEmails") @@ -1607,8 +2248,29 @@ def __init__(__self__, *, :param str end_date: The end date for the budget. :param str start_date: The start date for the budget. """ - pulumi.set(__self__, "end_date", end_date) - pulumi.set(__self__, "start_date", start_date) + GetBudgetResourceGroupTimePeriodResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_date=end_date, + start_date=start_date, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_date: Optional[str] = None, + start_date: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_date is None and 'endDate' in kwargs: + end_date = kwargs['endDate'] + if end_date is None: + raise TypeError("Missing 'end_date' argument") + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if start_date is None: + raise TypeError("Missing 'start_date' argument") + + _setter("end_date", end_date) + _setter("start_date", start_date) @property @pulumi.getter(name="endDate") @@ -1638,9 +2300,30 @@ def __init__(__self__, *, :param Sequence['GetBudgetSubscriptionFilterNotArgs'] nots: A `not` block as defined below. :param Sequence['GetBudgetSubscriptionFilterTagArgs'] tags: A `tag` block as defined below. """ - pulumi.set(__self__, "dimensions", dimensions) - pulumi.set(__self__, "nots", nots) - pulumi.set(__self__, "tags", tags) + GetBudgetSubscriptionFilterResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimensions=dimensions, + nots=nots, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimensions: Optional[Sequence['outputs.GetBudgetSubscriptionFilterDimensionResult']] = None, + nots: Optional[Sequence['outputs.GetBudgetSubscriptionFilterNotResult']] = None, + tags: Optional[Sequence['outputs.GetBudgetSubscriptionFilterTagResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dimensions is None: + raise TypeError("Missing 'dimensions' argument") + if nots is None: + raise TypeError("Missing 'nots' argument") + if tags is None: + raise TypeError("Missing 'tags' argument") + + _setter("dimensions", dimensions) + _setter("nots", nots) + _setter("tags", tags) @property @pulumi.getter @@ -1678,9 +2361,30 @@ def __init__(__self__, *, :param str operator: The operator to used for comparison. :param Sequence[str] values: A list of values for the tag. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + GetBudgetSubscriptionFilterDimensionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1716,8 +2420,25 @@ def __init__(__self__, *, :param Sequence['GetBudgetSubscriptionFilterNotDimensionArgs'] dimensions: A `dimension` block as defined above. :param Sequence['GetBudgetSubscriptionFilterNotTagArgs'] tags: A `tag` block as defined below. """ - pulumi.set(__self__, "dimensions", dimensions) - pulumi.set(__self__, "tags", tags) + GetBudgetSubscriptionFilterNotResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimensions=dimensions, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimensions: Optional[Sequence['outputs.GetBudgetSubscriptionFilterNotDimensionResult']] = None, + tags: Optional[Sequence['outputs.GetBudgetSubscriptionFilterNotTagResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dimensions is None: + raise TypeError("Missing 'dimensions' argument") + if tags is None: + raise TypeError("Missing 'tags' argument") + + _setter("dimensions", dimensions) + _setter("tags", tags) @property @pulumi.getter @@ -1747,9 +2468,30 @@ def __init__(__self__, *, :param str operator: The operator to used for comparison. :param Sequence[str] values: A list of values for the tag. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + GetBudgetSubscriptionFilterNotDimensionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1787,9 +2529,30 @@ def __init__(__self__, *, :param str operator: The operator to used for comparison. :param Sequence[str] values: A list of values for the tag. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + GetBudgetSubscriptionFilterNotTagResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1827,9 +2590,30 @@ def __init__(__self__, *, :param str operator: The operator to used for comparison. :param Sequence[str] values: A list of values for the tag. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + GetBudgetSubscriptionFilterTagResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1874,13 +2658,58 @@ def __init__(__self__, *, :param str operator: The operator to used for comparison. :param int threshold: Threshold value associated with the notification. """ - pulumi.set(__self__, "contact_emails", contact_emails) - pulumi.set(__self__, "contact_groups", contact_groups) - pulumi.set(__self__, "contact_roles", contact_roles) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) - pulumi.set(__self__, "threshold_type", threshold_type) + GetBudgetSubscriptionNotificationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + contact_emails=contact_emails, + contact_groups=contact_groups, + contact_roles=contact_roles, + enabled=enabled, + operator=operator, + threshold=threshold, + threshold_type=threshold_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contact_emails: Optional[Sequence[str]] = None, + contact_groups: Optional[Sequence[str]] = None, + contact_roles: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + operator: Optional[str] = None, + threshold: Optional[int] = None, + threshold_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if contact_emails is None and 'contactEmails' in kwargs: + contact_emails = kwargs['contactEmails'] + if contact_emails is None: + raise TypeError("Missing 'contact_emails' argument") + if contact_groups is None and 'contactGroups' in kwargs: + contact_groups = kwargs['contactGroups'] + if contact_groups is None: + raise TypeError("Missing 'contact_groups' argument") + if contact_roles is None and 'contactRoles' in kwargs: + contact_roles = kwargs['contactRoles'] + if contact_roles is None: + raise TypeError("Missing 'contact_roles' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if threshold_type is None and 'thresholdType' in kwargs: + threshold_type = kwargs['thresholdType'] + if threshold_type is None: + raise TypeError("Missing 'threshold_type' argument") + + _setter("contact_emails", contact_emails) + _setter("contact_groups", contact_groups) + _setter("contact_roles", contact_roles) + _setter("enabled", enabled) + _setter("operator", operator) + _setter("threshold", threshold) + _setter("threshold_type", threshold_type) @property @pulumi.getter(name="contactEmails") @@ -1945,8 +2774,29 @@ def __init__(__self__, *, :param str end_date: The end date for the budget. :param str start_date: The start date for the budget. """ - pulumi.set(__self__, "end_date", end_date) - pulumi.set(__self__, "start_date", start_date) + GetBudgetSubscriptionTimePeriodResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_date=end_date, + start_date=start_date, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_date: Optional[str] = None, + start_date: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_date is None and 'endDate' in kwargs: + end_date = kwargs['endDate'] + if end_date is None: + raise TypeError("Missing 'end_date' argument") + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if start_date is None: + raise TypeError("Missing 'start_date' argument") + + _setter("end_date", end_date) + _setter("start_date", start_date) @property @pulumi.getter(name="endDate") diff --git a/sdk/python/pulumi_azure/containerapp/_inputs.py b/sdk/python/pulumi_azure/containerapp/_inputs.py index ec07172445..8bb6e2e556 100644 --- a/sdk/python/pulumi_azure/containerapp/_inputs.py +++ b/sdk/python/pulumi_azure/containerapp/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -51,11 +51,34 @@ def __init__(__self__, *, :param pulumi.Input[int] app_port: The port which the application is listening on. This is the same as the `ingress` port. :param pulumi.Input[str] app_protocol: The protocol for the app. Possible values include `http` and `grpc`. Defaults to `http`. """ - pulumi.set(__self__, "app_id", app_id) + AppDaprArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_port=app_port, + app_protocol=app_protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[pulumi.Input[str]] = None, + app_port: Optional[pulumi.Input[int]] = None, + app_protocol: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_port is None and 'appPort' in kwargs: + app_port = kwargs['appPort'] + if app_protocol is None and 'appProtocol' in kwargs: + app_protocol = kwargs['appProtocol'] + + _setter("app_id", app_id) if app_port is not None: - pulumi.set(__self__, "app_port", app_port) + _setter("app_port", app_port) if app_protocol is not None: - pulumi.set(__self__, "app_protocol", app_protocol) + _setter("app_protocol", app_protocol) @property @pulumi.getter(name="appId") @@ -105,13 +128,38 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of managed identity to assign. Possible values are `SystemAssigned`, `UserAssigned`, and `SystemAssigned, UserAssigned` (to enable both). :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: A list of one or more Resource IDs for User Assigned Managed identities to assign. Required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. """ - pulumi.set(__self__, "type", type) + AppIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -181,20 +229,61 @@ def __init__(__self__, *, :param pulumi.Input[str] fqdn: The FQDN of the ingress. :param pulumi.Input[str] transport: The transport method for the Ingress. Possible values include `auto`, `http`, `http2` and `tcp`. Defaults to `auto` """ - pulumi.set(__self__, "target_port", target_port) - pulumi.set(__self__, "traffic_weights", traffic_weights) + AppIngressArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_port=target_port, + traffic_weights=traffic_weights, + allow_insecure_connections=allow_insecure_connections, + custom_domain=custom_domain, + exposed_port=exposed_port, + external_enabled=external_enabled, + fqdn=fqdn, + transport=transport, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_port: Optional[pulumi.Input[int]] = None, + traffic_weights: Optional[pulumi.Input[Sequence[pulumi.Input['AppIngressTrafficWeightArgs']]]] = None, + allow_insecure_connections: Optional[pulumi.Input[bool]] = None, + custom_domain: Optional[pulumi.Input['AppIngressCustomDomainArgs']] = None, + exposed_port: Optional[pulumi.Input[int]] = None, + external_enabled: Optional[pulumi.Input[bool]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + transport: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_port is None and 'targetPort' in kwargs: + target_port = kwargs['targetPort'] + if target_port is None: + raise TypeError("Missing 'target_port' argument") + if traffic_weights is None and 'trafficWeights' in kwargs: + traffic_weights = kwargs['trafficWeights'] + if traffic_weights is None: + raise TypeError("Missing 'traffic_weights' argument") + if allow_insecure_connections is None and 'allowInsecureConnections' in kwargs: + allow_insecure_connections = kwargs['allowInsecureConnections'] + if custom_domain is None and 'customDomain' in kwargs: + custom_domain = kwargs['customDomain'] + if exposed_port is None and 'exposedPort' in kwargs: + exposed_port = kwargs['exposedPort'] + if external_enabled is None and 'externalEnabled' in kwargs: + external_enabled = kwargs['externalEnabled'] + + _setter("target_port", target_port) + _setter("traffic_weights", traffic_weights) if allow_insecure_connections is not None: - pulumi.set(__self__, "allow_insecure_connections", allow_insecure_connections) + _setter("allow_insecure_connections", allow_insecure_connections) if custom_domain is not None: - pulumi.set(__self__, "custom_domain", custom_domain) + _setter("custom_domain", custom_domain) if exposed_port is not None: - pulumi.set(__self__, "exposed_port", exposed_port) + _setter("exposed_port", exposed_port) if external_enabled is not None: - pulumi.set(__self__, "external_enabled", external_enabled) + _setter("external_enabled", external_enabled) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if transport is not None: - pulumi.set(__self__, "transport", transport) + _setter("transport", transport) @property @pulumi.getter(name="targetPort") @@ -308,10 +397,33 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The hostname of the Certificate. Must be the CN or a named SAN in the certificate. :param pulumi.Input[str] certificate_binding_type: The Binding type. Possible values include `Disabled` and `SniEnabled`. Defaults to `Disabled`. """ - pulumi.set(__self__, "certificate_id", certificate_id) - pulumi.set(__self__, "name", name) + AppIngressCustomDomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_id=certificate_id, + name=name, + certificate_binding_type=certificate_binding_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + certificate_binding_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_id is None and 'certificateId' in kwargs: + certificate_id = kwargs['certificateId'] + if certificate_id is None: + raise TypeError("Missing 'certificate_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if certificate_binding_type is None and 'certificateBindingType' in kwargs: + certificate_binding_type = kwargs['certificateBindingType'] + + _setter("certificate_id", certificate_id) + _setter("name", name) if certificate_binding_type is not None: - pulumi.set(__self__, "certificate_binding_type", certificate_binding_type) + _setter("certificate_binding_type", certificate_binding_type) @property @pulumi.getter(name="certificateId") @@ -365,13 +477,36 @@ def __init__(__self__, *, :param pulumi.Input[bool] latest_revision: This traffic Weight relates to the latest stable Container Revision. :param pulumi.Input[str] revision_suffix: The suffix string to which this `traffic_weight` applies. """ - pulumi.set(__self__, "percentage", percentage) + AppIngressTrafficWeightArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + percentage=percentage, + label=label, + latest_revision=latest_revision, + revision_suffix=revision_suffix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + percentage: Optional[pulumi.Input[int]] = None, + label: Optional[pulumi.Input[str]] = None, + latest_revision: Optional[pulumi.Input[bool]] = None, + revision_suffix: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if percentage is None: + raise TypeError("Missing 'percentage' argument") + if latest_revision is None and 'latestRevision' in kwargs: + latest_revision = kwargs['latestRevision'] + if revision_suffix is None and 'revisionSuffix' in kwargs: + revision_suffix = kwargs['revisionSuffix'] + + _setter("percentage", percentage) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if latest_revision is not None: - pulumi.set(__self__, "latest_revision", latest_revision) + _setter("latest_revision", latest_revision) if revision_suffix is not None: - pulumi.set(__self__, "revision_suffix", revision_suffix) + _setter("revision_suffix", revision_suffix) @property @pulumi.getter @@ -439,13 +574,34 @@ def __init__(__self__, *, :param pulumi.Input[str] password_secret_name: The name of the Secret Reference containing the password value for this user on the Container Registry, `username` must also be supplied. :param pulumi.Input[str] username: The username to use for this Container Registry, `password_secret_name` must also be supplied.. """ - pulumi.set(__self__, "server", server) + AppRegistryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + server=server, + identity=identity, + password_secret_name=password_secret_name, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input[str]] = None, + password_secret_name: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server is None: + raise TypeError("Missing 'server' argument") + if password_secret_name is None and 'passwordSecretName' in kwargs: + password_secret_name = kwargs['passwordSecretName'] + + _setter("server", server) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if password_secret_name is not None: - pulumi.set(__self__, "password_secret_name", password_secret_name) + _setter("password_secret_name", password_secret_name) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -509,8 +665,25 @@ def __init__(__self__, *, !> **Note:** Secrets cannot be removed from the service once added, attempting to do so will result in an error. Their values may be zeroed, i.e. set to `""`, but the named secret must persist. This is due to a technical limitation on the service which causes the service to become unmanageable. See [this issue](https://github.com/microsoft/azure-container-apps/issues/395) for more details. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AppSecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -562,23 +735,66 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['AppTemplateTcpScaleRuleArgs']]] tcp_scale_rules: One or more `tcp_scale_rule` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['AppTemplateVolumeArgs']]] volumes: A `volume` block as detailed below. """ - pulumi.set(__self__, "containers", containers) + AppTemplateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + containers=containers, + azure_queue_scale_rules=azure_queue_scale_rules, + custom_scale_rules=custom_scale_rules, + http_scale_rules=http_scale_rules, + max_replicas=max_replicas, + min_replicas=min_replicas, + revision_suffix=revision_suffix, + tcp_scale_rules=tcp_scale_rules, + volumes=volumes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + containers: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateContainerArgs']]]] = None, + azure_queue_scale_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateAzureQueueScaleRuleArgs']]]] = None, + custom_scale_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateCustomScaleRuleArgs']]]] = None, + http_scale_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateHttpScaleRuleArgs']]]] = None, + max_replicas: Optional[pulumi.Input[int]] = None, + min_replicas: Optional[pulumi.Input[int]] = None, + revision_suffix: Optional[pulumi.Input[str]] = None, + tcp_scale_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateTcpScaleRuleArgs']]]] = None, + volumes: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateVolumeArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if containers is None: + raise TypeError("Missing 'containers' argument") + if azure_queue_scale_rules is None and 'azureQueueScaleRules' in kwargs: + azure_queue_scale_rules = kwargs['azureQueueScaleRules'] + if custom_scale_rules is None and 'customScaleRules' in kwargs: + custom_scale_rules = kwargs['customScaleRules'] + if http_scale_rules is None and 'httpScaleRules' in kwargs: + http_scale_rules = kwargs['httpScaleRules'] + if max_replicas is None and 'maxReplicas' in kwargs: + max_replicas = kwargs['maxReplicas'] + if min_replicas is None and 'minReplicas' in kwargs: + min_replicas = kwargs['minReplicas'] + if revision_suffix is None and 'revisionSuffix' in kwargs: + revision_suffix = kwargs['revisionSuffix'] + if tcp_scale_rules is None and 'tcpScaleRules' in kwargs: + tcp_scale_rules = kwargs['tcpScaleRules'] + + _setter("containers", containers) if azure_queue_scale_rules is not None: - pulumi.set(__self__, "azure_queue_scale_rules", azure_queue_scale_rules) + _setter("azure_queue_scale_rules", azure_queue_scale_rules) if custom_scale_rules is not None: - pulumi.set(__self__, "custom_scale_rules", custom_scale_rules) + _setter("custom_scale_rules", custom_scale_rules) if http_scale_rules is not None: - pulumi.set(__self__, "http_scale_rules", http_scale_rules) + _setter("http_scale_rules", http_scale_rules) if max_replicas is not None: - pulumi.set(__self__, "max_replicas", max_replicas) + _setter("max_replicas", max_replicas) if min_replicas is not None: - pulumi.set(__self__, "min_replicas", min_replicas) + _setter("min_replicas", min_replicas) if revision_suffix is not None: - pulumi.set(__self__, "revision_suffix", revision_suffix) + _setter("revision_suffix", revision_suffix) if tcp_scale_rules is not None: - pulumi.set(__self__, "tcp_scale_rules", tcp_scale_rules) + _setter("tcp_scale_rules", tcp_scale_rules) if volumes is not None: - pulumi.set(__self__, "volumes", volumes) + _setter("volumes", volumes) @property @pulumi.getter @@ -702,10 +918,39 @@ def __init__(__self__, *, :param pulumi.Input[int] queue_length: The value of the length of the queue to trigger scaling actions. :param pulumi.Input[str] queue_name: The name of the Azure Queue """ - pulumi.set(__self__, "authentications", authentications) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "queue_length", queue_length) - pulumi.set(__self__, "queue_name", queue_name) + AppTemplateAzureQueueScaleRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentications=authentications, + name=name, + queue_length=queue_length, + queue_name=queue_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentications: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateAzureQueueScaleRuleAuthenticationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + queue_length: Optional[pulumi.Input[int]] = None, + queue_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentications is None: + raise TypeError("Missing 'authentications' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if queue_length is None and 'queueLength' in kwargs: + queue_length = kwargs['queueLength'] + if queue_length is None: + raise TypeError("Missing 'queue_length' argument") + if queue_name is None and 'queueName' in kwargs: + queue_name = kwargs['queueName'] + if queue_name is None: + raise TypeError("Missing 'queue_name' argument") + + _setter("authentications", authentications) + _setter("name", name) + _setter("queue_length", queue_length) + _setter("queue_name", queue_name) @property @pulumi.getter @@ -765,8 +1010,29 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_name: The name of the Container App Secret to use for this Scale Rule Authentication. :param pulumi.Input[str] trigger_parameter: The Trigger Parameter name to use the supply the value retrieved from the `secret_name`. """ - pulumi.set(__self__, "secret_name", secret_name) - pulumi.set(__self__, "trigger_parameter", trigger_parameter) + AppTemplateAzureQueueScaleRuleAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_name=secret_name, + trigger_parameter=trigger_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_name: Optional[pulumi.Input[str]] = None, + trigger_parameter: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if trigger_parameter is None and 'triggerParameter' in kwargs: + trigger_parameter = kwargs['triggerParameter'] + if trigger_parameter is None: + raise TypeError("Missing 'trigger_parameter' argument") + + _setter("secret_name", secret_name) + _setter("trigger_parameter", trigger_parameter) @property @pulumi.getter(name="secretName") @@ -828,26 +1094,77 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['AppTemplateContainerStartupProbeArgs']]] startup_probes: A `startup_probe` block as detailed below. :param pulumi.Input[Sequence[pulumi.Input['AppTemplateContainerVolumeMountArgs']]] volume_mounts: A `volume_mounts` block as detailed below. """ - pulumi.set(__self__, "cpu", cpu) - pulumi.set(__self__, "image", image) - pulumi.set(__self__, "memory", memory) - pulumi.set(__self__, "name", name) + AppTemplateContainerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + image=image, + memory=memory, + name=name, + args=args, + commands=commands, + envs=envs, + ephemeral_storage=ephemeral_storage, + liveness_probes=liveness_probes, + readiness_probes=readiness_probes, + startup_probes=startup_probes, + volume_mounts=volume_mounts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[pulumi.Input[float]] = None, + image: Optional[pulumi.Input[str]] = None, + memory: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + args: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + commands: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + envs: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateContainerEnvArgs']]]] = None, + ephemeral_storage: Optional[pulumi.Input[str]] = None, + liveness_probes: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateContainerLivenessProbeArgs']]]] = None, + readiness_probes: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateContainerReadinessProbeArgs']]]] = None, + startup_probes: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateContainerStartupProbeArgs']]]] = None, + volume_mounts: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateContainerVolumeMountArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is None: + raise TypeError("Missing 'cpu' argument") + if image is None: + raise TypeError("Missing 'image' argument") + if memory is None: + raise TypeError("Missing 'memory' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if ephemeral_storage is None and 'ephemeralStorage' in kwargs: + ephemeral_storage = kwargs['ephemeralStorage'] + if liveness_probes is None and 'livenessProbes' in kwargs: + liveness_probes = kwargs['livenessProbes'] + if readiness_probes is None and 'readinessProbes' in kwargs: + readiness_probes = kwargs['readinessProbes'] + if startup_probes is None and 'startupProbes' in kwargs: + startup_probes = kwargs['startupProbes'] + if volume_mounts is None and 'volumeMounts' in kwargs: + volume_mounts = kwargs['volumeMounts'] + + _setter("cpu", cpu) + _setter("image", image) + _setter("memory", memory) + _setter("name", name) if args is not None: - pulumi.set(__self__, "args", args) + _setter("args", args) if commands is not None: - pulumi.set(__self__, "commands", commands) + _setter("commands", commands) if envs is not None: - pulumi.set(__self__, "envs", envs) + _setter("envs", envs) if ephemeral_storage is not None: - pulumi.set(__self__, "ephemeral_storage", ephemeral_storage) + _setter("ephemeral_storage", ephemeral_storage) if liveness_probes is not None: - pulumi.set(__self__, "liveness_probes", liveness_probes) + _setter("liveness_probes", liveness_probes) if readiness_probes is not None: - pulumi.set(__self__, "readiness_probes", readiness_probes) + _setter("readiness_probes", readiness_probes) if startup_probes is not None: - pulumi.set(__self__, "startup_probes", startup_probes) + _setter("startup_probes", startup_probes) if volume_mounts is not None: - pulumi.set(__self__, "volume_mounts", volume_mounts) + _setter("volume_mounts", volume_mounts) @property @pulumi.getter @@ -1013,11 +1330,30 @@ def __init__(__self__, *, > **NOTE:** This value is ignored if `secret_name` is used """ - pulumi.set(__self__, "name", name) + AppTemplateContainerEnvArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + secret_name=secret_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + + _setter("name", name) if secret_name is not None: - pulumi.set(__self__, "secret_name", secret_name) + _setter("secret_name", secret_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -1083,24 +1419,65 @@ def __init__(__self__, *, :param pulumi.Input[int] termination_grace_period_seconds: The time in seconds after the container is sent the termination signal before the process if forcibly killed. :param pulumi.Input[int] timeout: Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "transport", transport) + AppTemplateContainerLivenessProbeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + transport=transport, + failure_count_threshold=failure_count_threshold, + headers=headers, + host=host, + initial_delay=initial_delay, + interval_seconds=interval_seconds, + path=path, + termination_grace_period_seconds=termination_grace_period_seconds, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + transport: Optional[pulumi.Input[str]] = None, + failure_count_threshold: Optional[pulumi.Input[int]] = None, + headers: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateContainerLivenessProbeHeaderArgs']]]] = None, + host: Optional[pulumi.Input[str]] = None, + initial_delay: Optional[pulumi.Input[int]] = None, + interval_seconds: Optional[pulumi.Input[int]] = None, + path: Optional[pulumi.Input[str]] = None, + termination_grace_period_seconds: Optional[pulumi.Input[int]] = None, + timeout: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if transport is None: + raise TypeError("Missing 'transport' argument") + if failure_count_threshold is None and 'failureCountThreshold' in kwargs: + failure_count_threshold = kwargs['failureCountThreshold'] + if initial_delay is None and 'initialDelay' in kwargs: + initial_delay = kwargs['initialDelay'] + if interval_seconds is None and 'intervalSeconds' in kwargs: + interval_seconds = kwargs['intervalSeconds'] + if termination_grace_period_seconds is None and 'terminationGracePeriodSeconds' in kwargs: + termination_grace_period_seconds = kwargs['terminationGracePeriodSeconds'] + + _setter("port", port) + _setter("transport", transport) if failure_count_threshold is not None: - pulumi.set(__self__, "failure_count_threshold", failure_count_threshold) + _setter("failure_count_threshold", failure_count_threshold) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if initial_delay is not None: - pulumi.set(__self__, "initial_delay", initial_delay) + _setter("initial_delay", initial_delay) if interval_seconds is not None: - pulumi.set(__self__, "interval_seconds", interval_seconds) + _setter("interval_seconds", interval_seconds) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if termination_grace_period_seconds is not None: - pulumi.set(__self__, "termination_grace_period_seconds", termination_grace_period_seconds) + _setter("termination_grace_period_seconds", termination_grace_period_seconds) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -1232,8 +1609,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The HTTP Header Name. :param pulumi.Input[str] value: The HTTP Header value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AppTemplateContainerLivenessProbeHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1283,22 +1677,59 @@ def __init__(__self__, *, :param pulumi.Input[int] success_count_threshold: The number of consecutive successful responses required to consider this probe as successful. Possible values are between `1` and `10`. Defaults to `3`. :param pulumi.Input[int] timeout: Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "transport", transport) + AppTemplateContainerReadinessProbeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + transport=transport, + failure_count_threshold=failure_count_threshold, + headers=headers, + host=host, + interval_seconds=interval_seconds, + path=path, + success_count_threshold=success_count_threshold, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + transport: Optional[pulumi.Input[str]] = None, + failure_count_threshold: Optional[pulumi.Input[int]] = None, + headers: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateContainerReadinessProbeHeaderArgs']]]] = None, + host: Optional[pulumi.Input[str]] = None, + interval_seconds: Optional[pulumi.Input[int]] = None, + path: Optional[pulumi.Input[str]] = None, + success_count_threshold: Optional[pulumi.Input[int]] = None, + timeout: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if transport is None: + raise TypeError("Missing 'transport' argument") + if failure_count_threshold is None and 'failureCountThreshold' in kwargs: + failure_count_threshold = kwargs['failureCountThreshold'] + if interval_seconds is None and 'intervalSeconds' in kwargs: + interval_seconds = kwargs['intervalSeconds'] + if success_count_threshold is None and 'successCountThreshold' in kwargs: + success_count_threshold = kwargs['successCountThreshold'] + + _setter("port", port) + _setter("transport", transport) if failure_count_threshold is not None: - pulumi.set(__self__, "failure_count_threshold", failure_count_threshold) + _setter("failure_count_threshold", failure_count_threshold) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if interval_seconds is not None: - pulumi.set(__self__, "interval_seconds", interval_seconds) + _setter("interval_seconds", interval_seconds) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if success_count_threshold is not None: - pulumi.set(__self__, "success_count_threshold", success_count_threshold) + _setter("success_count_threshold", success_count_threshold) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -1418,8 +1849,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The HTTP Header Name. :param pulumi.Input[str] value: The HTTP Header value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AppTemplateContainerReadinessProbeHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1469,22 +1917,59 @@ def __init__(__self__, *, :param pulumi.Input[int] termination_grace_period_seconds: The time in seconds after the container is sent the termination signal before the process if forcibly killed. :param pulumi.Input[int] timeout: Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "transport", transport) + AppTemplateContainerStartupProbeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + transport=transport, + failure_count_threshold=failure_count_threshold, + headers=headers, + host=host, + interval_seconds=interval_seconds, + path=path, + termination_grace_period_seconds=termination_grace_period_seconds, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + transport: Optional[pulumi.Input[str]] = None, + failure_count_threshold: Optional[pulumi.Input[int]] = None, + headers: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateContainerStartupProbeHeaderArgs']]]] = None, + host: Optional[pulumi.Input[str]] = None, + interval_seconds: Optional[pulumi.Input[int]] = None, + path: Optional[pulumi.Input[str]] = None, + termination_grace_period_seconds: Optional[pulumi.Input[int]] = None, + timeout: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if transport is None: + raise TypeError("Missing 'transport' argument") + if failure_count_threshold is None and 'failureCountThreshold' in kwargs: + failure_count_threshold = kwargs['failureCountThreshold'] + if interval_seconds is None and 'intervalSeconds' in kwargs: + interval_seconds = kwargs['intervalSeconds'] + if termination_grace_period_seconds is None and 'terminationGracePeriodSeconds' in kwargs: + termination_grace_period_seconds = kwargs['terminationGracePeriodSeconds'] + + _setter("port", port) + _setter("transport", transport) if failure_count_threshold is not None: - pulumi.set(__self__, "failure_count_threshold", failure_count_threshold) + _setter("failure_count_threshold", failure_count_threshold) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if interval_seconds is not None: - pulumi.set(__self__, "interval_seconds", interval_seconds) + _setter("interval_seconds", interval_seconds) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if termination_grace_period_seconds is not None: - pulumi.set(__self__, "termination_grace_period_seconds", termination_grace_period_seconds) + _setter("termination_grace_period_seconds", termination_grace_period_seconds) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -1604,8 +2089,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The HTTP Header Name. :param pulumi.Input[str] value: The HTTP Header value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AppTemplateContainerStartupProbeHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1641,8 +2143,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Volume to be mounted in the container. :param pulumi.Input[str] path: The path in the container at which to mount this volume. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "path", path) + AppTemplateContainerVolumeMountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("name", name) + _setter("path", path) @property @pulumi.getter @@ -1682,11 +2201,36 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Scaling Rule :param pulumi.Input[Sequence[pulumi.Input['AppTemplateCustomScaleRuleAuthenticationArgs']]] authentications: Zero or more `authentication` blocks as defined below. """ - pulumi.set(__self__, "custom_rule_type", custom_rule_type) - pulumi.set(__self__, "metadata", metadata) - pulumi.set(__self__, "name", name) + AppTemplateCustomScaleRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_rule_type=custom_rule_type, + metadata=metadata, + name=name, + authentications=authentications, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_rule_type: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + authentications: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateCustomScaleRuleAuthenticationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_rule_type is None and 'customRuleType' in kwargs: + custom_rule_type = kwargs['customRuleType'] + if custom_rule_type is None: + raise TypeError("Missing 'custom_rule_type' argument") + if metadata is None: + raise TypeError("Missing 'metadata' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("custom_rule_type", custom_rule_type) + _setter("metadata", metadata) + _setter("name", name) if authentications is not None: - pulumi.set(__self__, "authentications", authentications) + _setter("authentications", authentications) @property @pulumi.getter(name="customRuleType") @@ -1746,8 +2290,29 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_name: The name of the Container App Secret to use for this Scale Rule Authentication. :param pulumi.Input[str] trigger_parameter: The Trigger Parameter name to use the supply the value retrieved from the `secret_name`. """ - pulumi.set(__self__, "secret_name", secret_name) - pulumi.set(__self__, "trigger_parameter", trigger_parameter) + AppTemplateCustomScaleRuleAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_name=secret_name, + trigger_parameter=trigger_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_name: Optional[pulumi.Input[str]] = None, + trigger_parameter: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if trigger_parameter is None and 'triggerParameter' in kwargs: + trigger_parameter = kwargs['triggerParameter'] + if trigger_parameter is None: + raise TypeError("Missing 'trigger_parameter' argument") + + _setter("secret_name", secret_name) + _setter("trigger_parameter", trigger_parameter) @property @pulumi.getter(name="secretName") @@ -1785,10 +2350,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Scaling Rule :param pulumi.Input[Sequence[pulumi.Input['AppTemplateHttpScaleRuleAuthenticationArgs']]] authentications: Zero or more `authentication` blocks as defined below. """ - pulumi.set(__self__, "concurrent_requests", concurrent_requests) - pulumi.set(__self__, "name", name) + AppTemplateHttpScaleRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + concurrent_requests=concurrent_requests, + name=name, + authentications=authentications, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + concurrent_requests: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + authentications: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateHttpScaleRuleAuthenticationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if concurrent_requests is None and 'concurrentRequests' in kwargs: + concurrent_requests = kwargs['concurrentRequests'] + if concurrent_requests is None: + raise TypeError("Missing 'concurrent_requests' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("concurrent_requests", concurrent_requests) + _setter("name", name) if authentications is not None: - pulumi.set(__self__, "authentications", authentications) + _setter("authentications", authentications) @property @pulumi.getter(name="concurrentRequests") @@ -1836,9 +2422,28 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_name: The name of the Container App Secret to use for this Scale Rule Authentication. :param pulumi.Input[str] trigger_parameter: The Trigger Parameter name to use the supply the value retrieved from the `secret_name`. """ - pulumi.set(__self__, "secret_name", secret_name) + AppTemplateHttpScaleRuleAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_name=secret_name, + trigger_parameter=trigger_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_name: Optional[pulumi.Input[str]] = None, + trigger_parameter: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if trigger_parameter is None and 'triggerParameter' in kwargs: + trigger_parameter = kwargs['triggerParameter'] + + _setter("secret_name", secret_name) if trigger_parameter is not None: - pulumi.set(__self__, "trigger_parameter", trigger_parameter) + _setter("trigger_parameter", trigger_parameter) @property @pulumi.getter(name="secretName") @@ -1876,10 +2481,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Scaling Rule :param pulumi.Input[Sequence[pulumi.Input['AppTemplateTcpScaleRuleAuthenticationArgs']]] authentications: Zero or more `authentication` blocks as defined below. """ - pulumi.set(__self__, "concurrent_requests", concurrent_requests) - pulumi.set(__self__, "name", name) + AppTemplateTcpScaleRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + concurrent_requests=concurrent_requests, + name=name, + authentications=authentications, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + concurrent_requests: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + authentications: Optional[pulumi.Input[Sequence[pulumi.Input['AppTemplateTcpScaleRuleAuthenticationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if concurrent_requests is None and 'concurrentRequests' in kwargs: + concurrent_requests = kwargs['concurrentRequests'] + if concurrent_requests is None: + raise TypeError("Missing 'concurrent_requests' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("concurrent_requests", concurrent_requests) + _setter("name", name) if authentications is not None: - pulumi.set(__self__, "authentications", authentications) + _setter("authentications", authentications) @property @pulumi.getter(name="concurrentRequests") @@ -1927,9 +2553,28 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_name: The name of the Container App Secret to use for this Scale Rule Authentication. :param pulumi.Input[str] trigger_parameter: The Trigger Parameter name to use the supply the value retrieved from the `secret_name`. """ - pulumi.set(__self__, "secret_name", secret_name) + AppTemplateTcpScaleRuleAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_name=secret_name, + trigger_parameter=trigger_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_name: Optional[pulumi.Input[str]] = None, + trigger_parameter: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if trigger_parameter is None and 'triggerParameter' in kwargs: + trigger_parameter = kwargs['triggerParameter'] + + _setter("secret_name", secret_name) if trigger_parameter is not None: - pulumi.set(__self__, "trigger_parameter", trigger_parameter) + _setter("trigger_parameter", trigger_parameter) @property @pulumi.getter(name="secretName") @@ -1967,11 +2612,32 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_name: The name of the `AzureFile` storage. :param pulumi.Input[str] storage_type: The type of storage volume. Possible values include `AzureFile` and `EmptyDir`. Defaults to `EmptyDir`. """ - pulumi.set(__self__, "name", name) + AppTemplateVolumeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + storage_name=storage_name, + storage_type=storage_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + storage_name: Optional[pulumi.Input[str]] = None, + storage_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if storage_name is None and 'storageName' in kwargs: + storage_name = kwargs['storageName'] + if storage_type is None and 'storageType' in kwargs: + storage_type = kwargs['storageType'] + + _setter("name", name) if storage_name is not None: - pulumi.set(__self__, "storage_name", storage_name) + _setter("storage_name", storage_name) if storage_type is not None: - pulumi.set(__self__, "storage_type", storage_type) + _setter("storage_type", storage_type) @property @pulumi.getter @@ -2021,11 +2687,30 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_name: The name of a secret specified in the `secrets` block that contains the value for this metadata configuration item. :param pulumi.Input[str] value: The value for this metadata configuration item. """ - pulumi.set(__self__, "name", name) + EnvironmentDaprComponentMetadataArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + secret_name=secret_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + + _setter("name", name) if secret_name is not None: - pulumi.set(__self__, "secret_name", secret_name) + _setter("secret_name", secret_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2073,8 +2758,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Secret name. :param pulumi.Input[str] value: The value for this secret. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + EnvironmentDaprComponentSecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/containerapp/app.py b/sdk/python/pulumi_azure/containerapp/app.py index faad5c99ce..2305896023 100644 --- a/sdk/python/pulumi_azure/containerapp/app.py +++ b/sdk/python/pulumi_azure/containerapp/app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,24 +41,69 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['AppSecretArgs']]] secrets: One or more `secret` block as detailed below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Container App. """ - pulumi.set(__self__, "container_app_environment_id", container_app_environment_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "revision_mode", revision_mode) - pulumi.set(__self__, "template", template) + AppArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_app_environment_id=container_app_environment_id, + resource_group_name=resource_group_name, + revision_mode=revision_mode, + template=template, + dapr=dapr, + identity=identity, + ingress=ingress, + name=name, + registries=registries, + secrets=secrets, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_app_environment_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + revision_mode: Optional[pulumi.Input[str]] = None, + template: Optional[pulumi.Input['AppTemplateArgs']] = None, + dapr: Optional[pulumi.Input['AppDaprArgs']] = None, + identity: Optional[pulumi.Input['AppIdentityArgs']] = None, + ingress: Optional[pulumi.Input['AppIngressArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + registries: Optional[pulumi.Input[Sequence[pulumi.Input['AppRegistryArgs']]]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['AppSecretArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_app_environment_id is None and 'containerAppEnvironmentId' in kwargs: + container_app_environment_id = kwargs['containerAppEnvironmentId'] + if container_app_environment_id is None: + raise TypeError("Missing 'container_app_environment_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if revision_mode is None and 'revisionMode' in kwargs: + revision_mode = kwargs['revisionMode'] + if revision_mode is None: + raise TypeError("Missing 'revision_mode' argument") + if template is None: + raise TypeError("Missing 'template' argument") + + _setter("container_app_environment_id", container_app_environment_id) + _setter("resource_group_name", resource_group_name) + _setter("revision_mode", revision_mode) + _setter("template", template) if dapr is not None: - pulumi.set(__self__, "dapr", dapr) + _setter("dapr", dapr) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if ingress is not None: - pulumi.set(__self__, "ingress", ingress) + _setter("ingress", ingress) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if registries is not None: - pulumi.set(__self__, "registries", registries) + _setter("registries", registries) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="containerAppEnvironmentId") @@ -231,38 +276,93 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Container App. :param pulumi.Input['AppTemplateArgs'] template: A `template` block as detailed below. """ + _AppState._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_app_environment_id=container_app_environment_id, + custom_domain_verification_id=custom_domain_verification_id, + dapr=dapr, + identity=identity, + ingress=ingress, + latest_revision_fqdn=latest_revision_fqdn, + latest_revision_name=latest_revision_name, + location=location, + name=name, + outbound_ip_addresses=outbound_ip_addresses, + registries=registries, + resource_group_name=resource_group_name, + revision_mode=revision_mode, + secrets=secrets, + tags=tags, + template=template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_app_environment_id: Optional[pulumi.Input[str]] = None, + custom_domain_verification_id: Optional[pulumi.Input[str]] = None, + dapr: Optional[pulumi.Input['AppDaprArgs']] = None, + identity: Optional[pulumi.Input['AppIdentityArgs']] = None, + ingress: Optional[pulumi.Input['AppIngressArgs']] = None, + latest_revision_fqdn: Optional[pulumi.Input[str]] = None, + latest_revision_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + registries: Optional[pulumi.Input[Sequence[pulumi.Input['AppRegistryArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + revision_mode: Optional[pulumi.Input[str]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['AppSecretArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + template: Optional[pulumi.Input['AppTemplateArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_app_environment_id is None and 'containerAppEnvironmentId' in kwargs: + container_app_environment_id = kwargs['containerAppEnvironmentId'] + if custom_domain_verification_id is None and 'customDomainVerificationId' in kwargs: + custom_domain_verification_id = kwargs['customDomainVerificationId'] + if latest_revision_fqdn is None and 'latestRevisionFqdn' in kwargs: + latest_revision_fqdn = kwargs['latestRevisionFqdn'] + if latest_revision_name is None and 'latestRevisionName' in kwargs: + latest_revision_name = kwargs['latestRevisionName'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if revision_mode is None and 'revisionMode' in kwargs: + revision_mode = kwargs['revisionMode'] + if container_app_environment_id is not None: - pulumi.set(__self__, "container_app_environment_id", container_app_environment_id) + _setter("container_app_environment_id", container_app_environment_id) if custom_domain_verification_id is not None: - pulumi.set(__self__, "custom_domain_verification_id", custom_domain_verification_id) + _setter("custom_domain_verification_id", custom_domain_verification_id) if dapr is not None: - pulumi.set(__self__, "dapr", dapr) + _setter("dapr", dapr) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if ingress is not None: - pulumi.set(__self__, "ingress", ingress) + _setter("ingress", ingress) if latest_revision_fqdn is not None: - pulumi.set(__self__, "latest_revision_fqdn", latest_revision_fqdn) + _setter("latest_revision_fqdn", latest_revision_fqdn) if latest_revision_name is not None: - pulumi.set(__self__, "latest_revision_name", latest_revision_name) + _setter("latest_revision_name", latest_revision_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if registries is not None: - pulumi.set(__self__, "registries", registries) + _setter("registries", registries) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if revision_mode is not None: - pulumi.set(__self__, "revision_mode", revision_mode) + _setter("revision_mode", revision_mode) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if template is not None: - pulumi.set(__self__, "template", template) + _setter("template", template) @property @pulumi.getter(name="containerAppEnvironmentId") @@ -586,6 +686,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AppArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -614,8 +718,23 @@ def _internal_init(__self__, if container_app_environment_id is None and not opts.urn: raise TypeError("Missing required property 'container_app_environment_id'") __props__.__dict__["container_app_environment_id"] = container_app_environment_id + if dapr is not None and not isinstance(dapr, AppDaprArgs): + dapr = dapr or {} + def _setter(key, value): + dapr[key] = value + AppDaprArgs._configure(_setter, **dapr) __props__.__dict__["dapr"] = dapr + if identity is not None and not isinstance(identity, AppIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + AppIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity + if ingress is not None and not isinstance(ingress, AppIngressArgs): + ingress = ingress or {} + def _setter(key, value): + ingress[key] = value + AppIngressArgs._configure(_setter, **ingress) __props__.__dict__["ingress"] = ingress __props__.__dict__["name"] = name __props__.__dict__["registries"] = registries @@ -627,6 +746,11 @@ def _internal_init(__self__, __props__.__dict__["revision_mode"] = revision_mode __props__.__dict__["secrets"] = None if secrets is None else pulumi.Output.secret(secrets) __props__.__dict__["tags"] = tags + if template is not None and not isinstance(template, AppTemplateArgs): + template = template or {} + def _setter(key, value): + template[key] = value + AppTemplateArgs._configure(_setter, **template) if template is None and not opts.urn: raise TypeError("Missing required property 'template'") __props__.__dict__["template"] = template diff --git a/sdk/python/pulumi_azure/containerapp/environment.py b/sdk/python/pulumi_azure/containerapp/environment.py index 150eb28022..4744878204 100644 --- a/sdk/python/pulumi_azure/containerapp/environment.py +++ b/sdk/python/pulumi_azure/containerapp/environment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EnvironmentArgs', 'Environment'] @@ -41,23 +41,64 @@ def __init__(__self__, *, > **Note:** can only be set to `true` if `infrastructure_subnet_id` is specified. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + EnvironmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + dapr_application_insights_connection_string=dapr_application_insights_connection_string, + infrastructure_subnet_id=infrastructure_subnet_id, + internal_load_balancer_enabled=internal_load_balancer_enabled, + location=location, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tags=tags, + zone_redundancy_enabled=zone_redundancy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + dapr_application_insights_connection_string: Optional[pulumi.Input[str]] = None, + infrastructure_subnet_id: Optional[pulumi.Input[str]] = None, + internal_load_balancer_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundancy_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if dapr_application_insights_connection_string is None and 'daprApplicationInsightsConnectionString' in kwargs: + dapr_application_insights_connection_string = kwargs['daprApplicationInsightsConnectionString'] + if infrastructure_subnet_id is None and 'infrastructureSubnetId' in kwargs: + infrastructure_subnet_id = kwargs['infrastructureSubnetId'] + if internal_load_balancer_enabled is None and 'internalLoadBalancerEnabled' in kwargs: + internal_load_balancer_enabled = kwargs['internalLoadBalancerEnabled'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if zone_redundancy_enabled is None and 'zoneRedundancyEnabled' in kwargs: + zone_redundancy_enabled = kwargs['zoneRedundancyEnabled'] + + _setter("resource_group_name", resource_group_name) if dapr_application_insights_connection_string is not None: - pulumi.set(__self__, "dapr_application_insights_connection_string", dapr_application_insights_connection_string) + _setter("dapr_application_insights_connection_string", dapr_application_insights_connection_string) if infrastructure_subnet_id is not None: - pulumi.set(__self__, "infrastructure_subnet_id", infrastructure_subnet_id) + _setter("infrastructure_subnet_id", infrastructure_subnet_id) if internal_load_balancer_enabled is not None: - pulumi.set(__self__, "internal_load_balancer_enabled", internal_load_balancer_enabled) + _setter("internal_load_balancer_enabled", internal_load_balancer_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundancy_enabled is not None: - pulumi.set(__self__, "zone_redundancy_enabled", zone_redundancy_enabled) + _setter("zone_redundancy_enabled", zone_redundancy_enabled) @property @pulumi.getter(name="resourceGroupName") @@ -214,34 +255,93 @@ def __init__(__self__, *, > **Note:** can only be set to `true` if `infrastructure_subnet_id` is specified. """ + _EnvironmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dapr_application_insights_connection_string=dapr_application_insights_connection_string, + default_domain=default_domain, + docker_bridge_cidr=docker_bridge_cidr, + infrastructure_subnet_id=infrastructure_subnet_id, + internal_load_balancer_enabled=internal_load_balancer_enabled, + location=location, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + platform_reserved_cidr=platform_reserved_cidr, + platform_reserved_dns_ip_address=platform_reserved_dns_ip_address, + resource_group_name=resource_group_name, + static_ip_address=static_ip_address, + tags=tags, + zone_redundancy_enabled=zone_redundancy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dapr_application_insights_connection_string: Optional[pulumi.Input[str]] = None, + default_domain: Optional[pulumi.Input[str]] = None, + docker_bridge_cidr: Optional[pulumi.Input[str]] = None, + infrastructure_subnet_id: Optional[pulumi.Input[str]] = None, + internal_load_balancer_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + platform_reserved_cidr: Optional[pulumi.Input[str]] = None, + platform_reserved_dns_ip_address: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + static_ip_address: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundancy_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dapr_application_insights_connection_string is None and 'daprApplicationInsightsConnectionString' in kwargs: + dapr_application_insights_connection_string = kwargs['daprApplicationInsightsConnectionString'] + if default_domain is None and 'defaultDomain' in kwargs: + default_domain = kwargs['defaultDomain'] + if docker_bridge_cidr is None and 'dockerBridgeCidr' in kwargs: + docker_bridge_cidr = kwargs['dockerBridgeCidr'] + if infrastructure_subnet_id is None and 'infrastructureSubnetId' in kwargs: + infrastructure_subnet_id = kwargs['infrastructureSubnetId'] + if internal_load_balancer_enabled is None and 'internalLoadBalancerEnabled' in kwargs: + internal_load_balancer_enabled = kwargs['internalLoadBalancerEnabled'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if platform_reserved_cidr is None and 'platformReservedCidr' in kwargs: + platform_reserved_cidr = kwargs['platformReservedCidr'] + if platform_reserved_dns_ip_address is None and 'platformReservedDnsIpAddress' in kwargs: + platform_reserved_dns_ip_address = kwargs['platformReservedDnsIpAddress'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if static_ip_address is None and 'staticIpAddress' in kwargs: + static_ip_address = kwargs['staticIpAddress'] + if zone_redundancy_enabled is None and 'zoneRedundancyEnabled' in kwargs: + zone_redundancy_enabled = kwargs['zoneRedundancyEnabled'] + if dapr_application_insights_connection_string is not None: - pulumi.set(__self__, "dapr_application_insights_connection_string", dapr_application_insights_connection_string) + _setter("dapr_application_insights_connection_string", dapr_application_insights_connection_string) if default_domain is not None: - pulumi.set(__self__, "default_domain", default_domain) + _setter("default_domain", default_domain) if docker_bridge_cidr is not None: - pulumi.set(__self__, "docker_bridge_cidr", docker_bridge_cidr) + _setter("docker_bridge_cidr", docker_bridge_cidr) if infrastructure_subnet_id is not None: - pulumi.set(__self__, "infrastructure_subnet_id", infrastructure_subnet_id) + _setter("infrastructure_subnet_id", infrastructure_subnet_id) if internal_load_balancer_enabled is not None: - pulumi.set(__self__, "internal_load_balancer_enabled", internal_load_balancer_enabled) + _setter("internal_load_balancer_enabled", internal_load_balancer_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if platform_reserved_cidr is not None: - pulumi.set(__self__, "platform_reserved_cidr", platform_reserved_cidr) + _setter("platform_reserved_cidr", platform_reserved_cidr) if platform_reserved_dns_ip_address is not None: - pulumi.set(__self__, "platform_reserved_dns_ip_address", platform_reserved_dns_ip_address) + _setter("platform_reserved_dns_ip_address", platform_reserved_dns_ip_address) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if static_ip_address is not None: - pulumi.set(__self__, "static_ip_address", static_ip_address) + _setter("static_ip_address", static_ip_address) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundancy_enabled is not None: - pulumi.set(__self__, "zone_redundancy_enabled", zone_redundancy_enabled) + _setter("zone_redundancy_enabled", zone_redundancy_enabled) @property @pulumi.getter(name="daprApplicationInsightsConnectionString") @@ -525,6 +625,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EnvironmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/containerapp/environment_certificate.py b/sdk/python/pulumi_azure/containerapp/environment_certificate.py index 12e3465907..32c74ea74d 100644 --- a/sdk/python/pulumi_azure/containerapp/environment_certificate.py +++ b/sdk/python/pulumi_azure/containerapp/environment_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EnvironmentCertificateArgs', 'EnvironmentCertificate'] @@ -27,13 +27,44 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Container Apps Environment Certificate. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "certificate_blob_base64", certificate_blob_base64) - pulumi.set(__self__, "certificate_password", certificate_password) - pulumi.set(__self__, "container_app_environment_id", container_app_environment_id) + EnvironmentCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_blob_base64=certificate_blob_base64, + certificate_password=certificate_password, + container_app_environment_id=container_app_environment_id, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_blob_base64: Optional[pulumi.Input[str]] = None, + certificate_password: Optional[pulumi.Input[str]] = None, + container_app_environment_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_blob_base64 is None and 'certificateBlobBase64' in kwargs: + certificate_blob_base64 = kwargs['certificateBlobBase64'] + if certificate_blob_base64 is None: + raise TypeError("Missing 'certificate_blob_base64' argument") + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if certificate_password is None: + raise TypeError("Missing 'certificate_password' argument") + if container_app_environment_id is None and 'containerAppEnvironmentId' in kwargs: + container_app_environment_id = kwargs['containerAppEnvironmentId'] + if container_app_environment_id is None: + raise TypeError("Missing 'container_app_environment_id' argument") + + _setter("certificate_blob_base64", certificate_blob_base64) + _setter("certificate_password", certificate_password) + _setter("container_app_environment_id", container_app_environment_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="certificateBlobBase64") @@ -122,26 +153,67 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] thumbprint: The Thumbprint of the Certificate. """ + _EnvironmentCertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_blob_base64=certificate_blob_base64, + certificate_password=certificate_password, + container_app_environment_id=container_app_environment_id, + expiration_date=expiration_date, + issue_date=issue_date, + issuer=issuer, + name=name, + subject_name=subject_name, + tags=tags, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_blob_base64: Optional[pulumi.Input[str]] = None, + certificate_password: Optional[pulumi.Input[str]] = None, + container_app_environment_id: Optional[pulumi.Input[str]] = None, + expiration_date: Optional[pulumi.Input[str]] = None, + issue_date: Optional[pulumi.Input[str]] = None, + issuer: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + subject_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_blob_base64 is None and 'certificateBlobBase64' in kwargs: + certificate_blob_base64 = kwargs['certificateBlobBase64'] + if certificate_password is None and 'certificatePassword' in kwargs: + certificate_password = kwargs['certificatePassword'] + if container_app_environment_id is None and 'containerAppEnvironmentId' in kwargs: + container_app_environment_id = kwargs['containerAppEnvironmentId'] + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if issue_date is None and 'issueDate' in kwargs: + issue_date = kwargs['issueDate'] + if subject_name is None and 'subjectName' in kwargs: + subject_name = kwargs['subjectName'] + if certificate_blob_base64 is not None: - pulumi.set(__self__, "certificate_blob_base64", certificate_blob_base64) + _setter("certificate_blob_base64", certificate_blob_base64) if certificate_password is not None: - pulumi.set(__self__, "certificate_password", certificate_password) + _setter("certificate_password", certificate_password) if container_app_environment_id is not None: - pulumi.set(__self__, "container_app_environment_id", container_app_environment_id) + _setter("container_app_environment_id", container_app_environment_id) if expiration_date is not None: - pulumi.set(__self__, "expiration_date", expiration_date) + _setter("expiration_date", expiration_date) if issue_date is not None: - pulumi.set(__self__, "issue_date", issue_date) + _setter("issue_date", issue_date) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subject_name is not None: - pulumi.set(__self__, "subject_name", subject_name) + _setter("subject_name", subject_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="certificateBlobBase64") @@ -321,6 +393,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EnvironmentCertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/containerapp/environment_dapr_component.py b/sdk/python/pulumi_azure/containerapp/environment_dapr_component.py index 33ac593306..1cb1ab934b 100644 --- a/sdk/python/pulumi_azure/containerapp/environment_dapr_component.py +++ b/sdk/python/pulumi_azure/containerapp/environment_dapr_component.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,21 +39,62 @@ def __init__(__self__, *, > **NOTE:** See the official docs for more information at https://learn.microsoft.com/en-us/azure/container-apps/dapr-overview?tabs=bicep1%2Cyaml#component-scopes :param pulumi.Input[Sequence[pulumi.Input['EnvironmentDaprComponentSecretArgs']]] secrets: A `secret` block as detailed below. """ - pulumi.set(__self__, "component_type", component_type) - pulumi.set(__self__, "container_app_environment_id", container_app_environment_id) - pulumi.set(__self__, "version", version) + EnvironmentDaprComponentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + component_type=component_type, + container_app_environment_id=container_app_environment_id, + version=version, + ignore_errors=ignore_errors, + init_timeout=init_timeout, + metadatas=metadatas, + name=name, + scopes=scopes, + secrets=secrets, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + component_type: Optional[pulumi.Input[str]] = None, + container_app_environment_id: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + ignore_errors: Optional[pulumi.Input[bool]] = None, + init_timeout: Optional[pulumi.Input[str]] = None, + metadatas: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentDaprComponentMetadataArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentDaprComponentSecretArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if component_type is None and 'componentType' in kwargs: + component_type = kwargs['componentType'] + if component_type is None: + raise TypeError("Missing 'component_type' argument") + if container_app_environment_id is None and 'containerAppEnvironmentId' in kwargs: + container_app_environment_id = kwargs['containerAppEnvironmentId'] + if container_app_environment_id is None: + raise TypeError("Missing 'container_app_environment_id' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if ignore_errors is None and 'ignoreErrors' in kwargs: + ignore_errors = kwargs['ignoreErrors'] + if init_timeout is None and 'initTimeout' in kwargs: + init_timeout = kwargs['initTimeout'] + + _setter("component_type", component_type) + _setter("container_app_environment_id", container_app_environment_id) + _setter("version", version) if ignore_errors is not None: - pulumi.set(__self__, "ignore_errors", ignore_errors) + _setter("ignore_errors", ignore_errors) if init_timeout is not None: - pulumi.set(__self__, "init_timeout", init_timeout) + _setter("init_timeout", init_timeout) if metadatas is not None: - pulumi.set(__self__, "metadatas", metadatas) + _setter("metadatas", metadatas) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) @property @pulumi.getter(name="componentType") @@ -192,24 +233,59 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['EnvironmentDaprComponentSecretArgs']]] secrets: A `secret` block as detailed below. :param pulumi.Input[str] version: The version of the component. """ + _EnvironmentDaprComponentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + component_type=component_type, + container_app_environment_id=container_app_environment_id, + ignore_errors=ignore_errors, + init_timeout=init_timeout, + metadatas=metadatas, + name=name, + scopes=scopes, + secrets=secrets, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + component_type: Optional[pulumi.Input[str]] = None, + container_app_environment_id: Optional[pulumi.Input[str]] = None, + ignore_errors: Optional[pulumi.Input[bool]] = None, + init_timeout: Optional[pulumi.Input[str]] = None, + metadatas: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentDaprComponentMetadataArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + secrets: Optional[pulumi.Input[Sequence[pulumi.Input['EnvironmentDaprComponentSecretArgs']]]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if component_type is None and 'componentType' in kwargs: + component_type = kwargs['componentType'] + if container_app_environment_id is None and 'containerAppEnvironmentId' in kwargs: + container_app_environment_id = kwargs['containerAppEnvironmentId'] + if ignore_errors is None and 'ignoreErrors' in kwargs: + ignore_errors = kwargs['ignoreErrors'] + if init_timeout is None and 'initTimeout' in kwargs: + init_timeout = kwargs['initTimeout'] + if component_type is not None: - pulumi.set(__self__, "component_type", component_type) + _setter("component_type", component_type) if container_app_environment_id is not None: - pulumi.set(__self__, "container_app_environment_id", container_app_environment_id) + _setter("container_app_environment_id", container_app_environment_id) if ignore_errors is not None: - pulumi.set(__self__, "ignore_errors", ignore_errors) + _setter("ignore_errors", ignore_errors) if init_timeout is not None: - pulumi.set(__self__, "init_timeout", init_timeout) + _setter("init_timeout", init_timeout) if metadatas is not None: - pulumi.set(__self__, "metadatas", metadatas) + _setter("metadatas", metadatas) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if secrets is not None: - pulumi.set(__self__, "secrets", secrets) + _setter("secrets", secrets) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="componentType") @@ -433,6 +509,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EnvironmentDaprComponentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/containerapp/environment_storage.py b/sdk/python/pulumi_azure/containerapp/environment_storage.py index c35fe877a0..9803e7e81a 100644 --- a/sdk/python/pulumi_azure/containerapp/environment_storage.py +++ b/sdk/python/pulumi_azure/containerapp/environment_storage.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EnvironmentStorageArgs', 'EnvironmentStorage'] @@ -29,13 +29,54 @@ def __init__(__self__, *, :param pulumi.Input[str] share_name: The name of the Azure Storage Share to use. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name for this Container App Environment Storage. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "access_key", access_key) - pulumi.set(__self__, "access_mode", access_mode) - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "container_app_environment_id", container_app_environment_id) - pulumi.set(__self__, "share_name", share_name) + EnvironmentStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + access_mode=access_mode, + account_name=account_name, + container_app_environment_id=container_app_environment_id, + share_name=share_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[pulumi.Input[str]] = None, + access_mode: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + container_app_environment_id: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_key is None: + raise TypeError("Missing 'access_key' argument") + if access_mode is None and 'accessMode' in kwargs: + access_mode = kwargs['accessMode'] + if access_mode is None: + raise TypeError("Missing 'access_mode' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if container_app_environment_id is None and 'containerAppEnvironmentId' in kwargs: + container_app_environment_id = kwargs['containerAppEnvironmentId'] + if container_app_environment_id is None: + raise TypeError("Missing 'container_app_environment_id' argument") + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + + _setter("access_key", access_key) + _setter("access_mode", access_mode) + _setter("account_name", account_name) + _setter("container_app_environment_id", container_app_environment_id) + _setter("share_name", share_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="accessKey") @@ -128,18 +169,49 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for this Container App Environment Storage. Changing this forces a new resource to be created. :param pulumi.Input[str] share_name: The name of the Azure Storage Share to use. Changing this forces a new resource to be created. """ + _EnvironmentStorageState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key=access_key, + access_mode=access_mode, + account_name=account_name, + container_app_environment_id=container_app_environment_id, + name=name, + share_name=share_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key: Optional[pulumi.Input[str]] = None, + access_mode: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + container_app_environment_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if access_mode is None and 'accessMode' in kwargs: + access_mode = kwargs['accessMode'] + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if container_app_environment_id is None and 'containerAppEnvironmentId' in kwargs: + container_app_environment_id = kwargs['containerAppEnvironmentId'] + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if access_key is not None: - pulumi.set(__self__, "access_key", access_key) + _setter("access_key", access_key) if access_mode is not None: - pulumi.set(__self__, "access_mode", access_mode) + _setter("access_mode", access_mode) if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if container_app_environment_id is not None: - pulumi.set(__self__, "container_app_environment_id", container_app_environment_id) + _setter("container_app_environment_id", container_app_environment_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if share_name is not None: - pulumi.set(__self__, "share_name", share_name) + _setter("share_name", share_name) @property @pulumi.getter(name="accessKey") @@ -337,6 +409,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EnvironmentStorageArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/containerapp/get_app.py b/sdk/python/pulumi_azure/containerapp/get_app.py index 27ca540db2..d7c9bef2f7 100644 --- a/sdk/python/pulumi_azure/containerapp/get_app.py +++ b/sdk/python/pulumi_azure/containerapp/get_app.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/containerapp/get_environment.py b/sdk/python/pulumi_azure/containerapp/get_environment.py index c7a1b5fca8..1e4b4a3bfc 100644 --- a/sdk/python/pulumi_azure/containerapp/get_environment.py +++ b/sdk/python/pulumi_azure/containerapp/get_environment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/containerapp/get_environment_certificate.py b/sdk/python/pulumi_azure/containerapp/get_environment_certificate.py index 0e8c95e467..a732202fe1 100644 --- a/sdk/python/pulumi_azure/containerapp/get_environment_certificate.py +++ b/sdk/python/pulumi_azure/containerapp/get_environment_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/containerapp/outputs.py b/sdk/python/pulumi_azure/containerapp/outputs.py index afb17f1513..50fba1fb52 100644 --- a/sdk/python/pulumi_azure/containerapp/outputs.py +++ b/sdk/python/pulumi_azure/containerapp/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -99,11 +99,34 @@ def __init__(__self__, *, :param int app_port: The port which the application is listening on. This is the same as the `ingress` port. :param str app_protocol: The protocol for the app. Possible values include `http` and `grpc`. Defaults to `http`. """ - pulumi.set(__self__, "app_id", app_id) + AppDapr._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_port=app_port, + app_protocol=app_protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_port: Optional[int] = None, + app_protocol: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_port is None and 'appPort' in kwargs: + app_port = kwargs['appPort'] + if app_protocol is None and 'appProtocol' in kwargs: + app_protocol = kwargs['appProtocol'] + + _setter("app_id", app_id) if app_port is not None: - pulumi.set(__self__, "app_port", app_port) + _setter("app_port", app_port) if app_protocol is not None: - pulumi.set(__self__, "app_protocol", app_protocol) + _setter("app_protocol", app_protocol) @property @pulumi.getter(name="appId") @@ -162,13 +185,38 @@ def __init__(__self__, *, :param str type: The type of managed identity to assign. Possible values are `SystemAssigned`, `UserAssigned`, and `SystemAssigned, UserAssigned` (to enable both). :param Sequence[str] identity_ids: A list of one or more Resource IDs for User Assigned Managed identities to assign. Required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. """ - pulumi.set(__self__, "type", type) + AppIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -249,20 +297,61 @@ def __init__(__self__, *, :param str fqdn: The FQDN of the ingress. :param str transport: The transport method for the Ingress. Possible values include `auto`, `http`, `http2` and `tcp`. Defaults to `auto` """ - pulumi.set(__self__, "target_port", target_port) - pulumi.set(__self__, "traffic_weights", traffic_weights) + AppIngress._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_port=target_port, + traffic_weights=traffic_weights, + allow_insecure_connections=allow_insecure_connections, + custom_domain=custom_domain, + exposed_port=exposed_port, + external_enabled=external_enabled, + fqdn=fqdn, + transport=transport, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_port: Optional[int] = None, + traffic_weights: Optional[Sequence['outputs.AppIngressTrafficWeight']] = None, + allow_insecure_connections: Optional[bool] = None, + custom_domain: Optional['outputs.AppIngressCustomDomain'] = None, + exposed_port: Optional[int] = None, + external_enabled: Optional[bool] = None, + fqdn: Optional[str] = None, + transport: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_port is None and 'targetPort' in kwargs: + target_port = kwargs['targetPort'] + if target_port is None: + raise TypeError("Missing 'target_port' argument") + if traffic_weights is None and 'trafficWeights' in kwargs: + traffic_weights = kwargs['trafficWeights'] + if traffic_weights is None: + raise TypeError("Missing 'traffic_weights' argument") + if allow_insecure_connections is None and 'allowInsecureConnections' in kwargs: + allow_insecure_connections = kwargs['allowInsecureConnections'] + if custom_domain is None and 'customDomain' in kwargs: + custom_domain = kwargs['customDomain'] + if exposed_port is None and 'exposedPort' in kwargs: + exposed_port = kwargs['exposedPort'] + if external_enabled is None and 'externalEnabled' in kwargs: + external_enabled = kwargs['externalEnabled'] + + _setter("target_port", target_port) + _setter("traffic_weights", traffic_weights) if allow_insecure_connections is not None: - pulumi.set(__self__, "allow_insecure_connections", allow_insecure_connections) + _setter("allow_insecure_connections", allow_insecure_connections) if custom_domain is not None: - pulumi.set(__self__, "custom_domain", custom_domain) + _setter("custom_domain", custom_domain) if exposed_port is not None: - pulumi.set(__self__, "exposed_port", exposed_port) + _setter("exposed_port", exposed_port) if external_enabled is not None: - pulumi.set(__self__, "external_enabled", external_enabled) + _setter("external_enabled", external_enabled) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if transport is not None: - pulumi.set(__self__, "transport", transport) + _setter("transport", transport) @property @pulumi.getter(name="targetPort") @@ -363,10 +452,33 @@ def __init__(__self__, *, :param str name: The hostname of the Certificate. Must be the CN or a named SAN in the certificate. :param str certificate_binding_type: The Binding type. Possible values include `Disabled` and `SniEnabled`. Defaults to `Disabled`. """ - pulumi.set(__self__, "certificate_id", certificate_id) - pulumi.set(__self__, "name", name) + AppIngressCustomDomain._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_id=certificate_id, + name=name, + certificate_binding_type=certificate_binding_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_id: Optional[str] = None, + name: Optional[str] = None, + certificate_binding_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_id is None and 'certificateId' in kwargs: + certificate_id = kwargs['certificateId'] + if certificate_id is None: + raise TypeError("Missing 'certificate_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if certificate_binding_type is None and 'certificateBindingType' in kwargs: + certificate_binding_type = kwargs['certificateBindingType'] + + _setter("certificate_id", certificate_id) + _setter("name", name) if certificate_binding_type is not None: - pulumi.set(__self__, "certificate_binding_type", certificate_binding_type) + _setter("certificate_binding_type", certificate_binding_type) @property @pulumi.getter(name="certificateId") @@ -427,13 +539,36 @@ def __init__(__self__, *, :param bool latest_revision: This traffic Weight relates to the latest stable Container Revision. :param str revision_suffix: The suffix string to which this `traffic_weight` applies. """ - pulumi.set(__self__, "percentage", percentage) + AppIngressTrafficWeight._configure( + lambda key, value: pulumi.set(__self__, key, value), + percentage=percentage, + label=label, + latest_revision=latest_revision, + revision_suffix=revision_suffix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + percentage: Optional[int] = None, + label: Optional[str] = None, + latest_revision: Optional[bool] = None, + revision_suffix: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if percentage is None: + raise TypeError("Missing 'percentage' argument") + if latest_revision is None and 'latestRevision' in kwargs: + latest_revision = kwargs['latestRevision'] + if revision_suffix is None and 'revisionSuffix' in kwargs: + revision_suffix = kwargs['revisionSuffix'] + + _setter("percentage", percentage) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if latest_revision is not None: - pulumi.set(__self__, "latest_revision", latest_revision) + _setter("latest_revision", latest_revision) if revision_suffix is not None: - pulumi.set(__self__, "revision_suffix", revision_suffix) + _setter("revision_suffix", revision_suffix) @property @pulumi.getter @@ -502,13 +637,34 @@ def __init__(__self__, *, :param str password_secret_name: The name of the Secret Reference containing the password value for this user on the Container Registry, `username` must also be supplied. :param str username: The username to use for this Container Registry, `password_secret_name` must also be supplied.. """ - pulumi.set(__self__, "server", server) + AppRegistry._configure( + lambda key, value: pulumi.set(__self__, key, value), + server=server, + identity=identity, + password_secret_name=password_secret_name, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server: Optional[str] = None, + identity: Optional[str] = None, + password_secret_name: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server is None: + raise TypeError("Missing 'server' argument") + if password_secret_name is None and 'passwordSecretName' in kwargs: + password_secret_name = kwargs['passwordSecretName'] + + _setter("server", server) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if password_secret_name is not None: - pulumi.set(__self__, "password_secret_name", password_secret_name) + _setter("password_secret_name", password_secret_name) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -556,8 +712,25 @@ def __init__(__self__, *, !> **Note:** Secrets cannot be removed from the service once added, attempting to do so will result in an error. Their values may be zeroed, i.e. set to `""`, but the named secret must persist. This is due to a technical limitation on the service which causes the service to become unmanageable. See [this issue](https://github.com/microsoft/azure-container-apps/issues/395) for more details. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AppSecret._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -630,23 +803,66 @@ def __init__(__self__, *, :param Sequence['AppTemplateTcpScaleRuleArgs'] tcp_scale_rules: One or more `tcp_scale_rule` blocks as defined below. :param Sequence['AppTemplateVolumeArgs'] volumes: A `volume` block as detailed below. """ - pulumi.set(__self__, "containers", containers) + AppTemplate._configure( + lambda key, value: pulumi.set(__self__, key, value), + containers=containers, + azure_queue_scale_rules=azure_queue_scale_rules, + custom_scale_rules=custom_scale_rules, + http_scale_rules=http_scale_rules, + max_replicas=max_replicas, + min_replicas=min_replicas, + revision_suffix=revision_suffix, + tcp_scale_rules=tcp_scale_rules, + volumes=volumes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + containers: Optional[Sequence['outputs.AppTemplateContainer']] = None, + azure_queue_scale_rules: Optional[Sequence['outputs.AppTemplateAzureQueueScaleRule']] = None, + custom_scale_rules: Optional[Sequence['outputs.AppTemplateCustomScaleRule']] = None, + http_scale_rules: Optional[Sequence['outputs.AppTemplateHttpScaleRule']] = None, + max_replicas: Optional[int] = None, + min_replicas: Optional[int] = None, + revision_suffix: Optional[str] = None, + tcp_scale_rules: Optional[Sequence['outputs.AppTemplateTcpScaleRule']] = None, + volumes: Optional[Sequence['outputs.AppTemplateVolume']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if containers is None: + raise TypeError("Missing 'containers' argument") + if azure_queue_scale_rules is None and 'azureQueueScaleRules' in kwargs: + azure_queue_scale_rules = kwargs['azureQueueScaleRules'] + if custom_scale_rules is None and 'customScaleRules' in kwargs: + custom_scale_rules = kwargs['customScaleRules'] + if http_scale_rules is None and 'httpScaleRules' in kwargs: + http_scale_rules = kwargs['httpScaleRules'] + if max_replicas is None and 'maxReplicas' in kwargs: + max_replicas = kwargs['maxReplicas'] + if min_replicas is None and 'minReplicas' in kwargs: + min_replicas = kwargs['minReplicas'] + if revision_suffix is None and 'revisionSuffix' in kwargs: + revision_suffix = kwargs['revisionSuffix'] + if tcp_scale_rules is None and 'tcpScaleRules' in kwargs: + tcp_scale_rules = kwargs['tcpScaleRules'] + + _setter("containers", containers) if azure_queue_scale_rules is not None: - pulumi.set(__self__, "azure_queue_scale_rules", azure_queue_scale_rules) + _setter("azure_queue_scale_rules", azure_queue_scale_rules) if custom_scale_rules is not None: - pulumi.set(__self__, "custom_scale_rules", custom_scale_rules) + _setter("custom_scale_rules", custom_scale_rules) if http_scale_rules is not None: - pulumi.set(__self__, "http_scale_rules", http_scale_rules) + _setter("http_scale_rules", http_scale_rules) if max_replicas is not None: - pulumi.set(__self__, "max_replicas", max_replicas) + _setter("max_replicas", max_replicas) if min_replicas is not None: - pulumi.set(__self__, "min_replicas", min_replicas) + _setter("min_replicas", min_replicas) if revision_suffix is not None: - pulumi.set(__self__, "revision_suffix", revision_suffix) + _setter("revision_suffix", revision_suffix) if tcp_scale_rules is not None: - pulumi.set(__self__, "tcp_scale_rules", tcp_scale_rules) + _setter("tcp_scale_rules", tcp_scale_rules) if volumes is not None: - pulumi.set(__self__, "volumes", volumes) + _setter("volumes", volumes) @property @pulumi.getter @@ -753,10 +969,39 @@ def __init__(__self__, *, :param int queue_length: The value of the length of the queue to trigger scaling actions. :param str queue_name: The name of the Azure Queue """ - pulumi.set(__self__, "authentications", authentications) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "queue_length", queue_length) - pulumi.set(__self__, "queue_name", queue_name) + AppTemplateAzureQueueScaleRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentications=authentications, + name=name, + queue_length=queue_length, + queue_name=queue_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentications: Optional[Sequence['outputs.AppTemplateAzureQueueScaleRuleAuthentication']] = None, + name: Optional[str] = None, + queue_length: Optional[int] = None, + queue_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentications is None: + raise TypeError("Missing 'authentications' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if queue_length is None and 'queueLength' in kwargs: + queue_length = kwargs['queueLength'] + if queue_length is None: + raise TypeError("Missing 'queue_length' argument") + if queue_name is None and 'queueName' in kwargs: + queue_name = kwargs['queueName'] + if queue_name is None: + raise TypeError("Missing 'queue_name' argument") + + _setter("authentications", authentications) + _setter("name", name) + _setter("queue_length", queue_length) + _setter("queue_name", queue_name) @property @pulumi.getter @@ -819,8 +1064,29 @@ def __init__(__self__, *, :param str secret_name: The name of the Container App Secret to use for this Scale Rule Authentication. :param str trigger_parameter: The Trigger Parameter name to use the supply the value retrieved from the `secret_name`. """ - pulumi.set(__self__, "secret_name", secret_name) - pulumi.set(__self__, "trigger_parameter", trigger_parameter) + AppTemplateAzureQueueScaleRuleAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_name=secret_name, + trigger_parameter=trigger_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_name: Optional[str] = None, + trigger_parameter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if trigger_parameter is None and 'triggerParameter' in kwargs: + trigger_parameter = kwargs['triggerParameter'] + if trigger_parameter is None: + raise TypeError("Missing 'trigger_parameter' argument") + + _setter("secret_name", secret_name) + _setter("trigger_parameter", trigger_parameter) @property @pulumi.getter(name="secretName") @@ -899,26 +1165,77 @@ def __init__(__self__, *, :param Sequence['AppTemplateContainerStartupProbeArgs'] startup_probes: A `startup_probe` block as detailed below. :param Sequence['AppTemplateContainerVolumeMountArgs'] volume_mounts: A `volume_mounts` block as detailed below. """ - pulumi.set(__self__, "cpu", cpu) - pulumi.set(__self__, "image", image) - pulumi.set(__self__, "memory", memory) - pulumi.set(__self__, "name", name) + AppTemplateContainer._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + image=image, + memory=memory, + name=name, + args=args, + commands=commands, + envs=envs, + ephemeral_storage=ephemeral_storage, + liveness_probes=liveness_probes, + readiness_probes=readiness_probes, + startup_probes=startup_probes, + volume_mounts=volume_mounts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[float] = None, + image: Optional[str] = None, + memory: Optional[str] = None, + name: Optional[str] = None, + args: Optional[Sequence[str]] = None, + commands: Optional[Sequence[str]] = None, + envs: Optional[Sequence['outputs.AppTemplateContainerEnv']] = None, + ephemeral_storage: Optional[str] = None, + liveness_probes: Optional[Sequence['outputs.AppTemplateContainerLivenessProbe']] = None, + readiness_probes: Optional[Sequence['outputs.AppTemplateContainerReadinessProbe']] = None, + startup_probes: Optional[Sequence['outputs.AppTemplateContainerStartupProbe']] = None, + volume_mounts: Optional[Sequence['outputs.AppTemplateContainerVolumeMount']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is None: + raise TypeError("Missing 'cpu' argument") + if image is None: + raise TypeError("Missing 'image' argument") + if memory is None: + raise TypeError("Missing 'memory' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if ephemeral_storage is None and 'ephemeralStorage' in kwargs: + ephemeral_storage = kwargs['ephemeralStorage'] + if liveness_probes is None and 'livenessProbes' in kwargs: + liveness_probes = kwargs['livenessProbes'] + if readiness_probes is None and 'readinessProbes' in kwargs: + readiness_probes = kwargs['readinessProbes'] + if startup_probes is None and 'startupProbes' in kwargs: + startup_probes = kwargs['startupProbes'] + if volume_mounts is None and 'volumeMounts' in kwargs: + volume_mounts = kwargs['volumeMounts'] + + _setter("cpu", cpu) + _setter("image", image) + _setter("memory", memory) + _setter("name", name) if args is not None: - pulumi.set(__self__, "args", args) + _setter("args", args) if commands is not None: - pulumi.set(__self__, "commands", commands) + _setter("commands", commands) if envs is not None: - pulumi.set(__self__, "envs", envs) + _setter("envs", envs) if ephemeral_storage is not None: - pulumi.set(__self__, "ephemeral_storage", ephemeral_storage) + _setter("ephemeral_storage", ephemeral_storage) if liveness_probes is not None: - pulumi.set(__self__, "liveness_probes", liveness_probes) + _setter("liveness_probes", liveness_probes) if readiness_probes is not None: - pulumi.set(__self__, "readiness_probes", readiness_probes) + _setter("readiness_probes", readiness_probes) if startup_probes is not None: - pulumi.set(__self__, "startup_probes", startup_probes) + _setter("startup_probes", startup_probes) if volume_mounts is not None: - pulumi.set(__self__, "volume_mounts", volume_mounts) + _setter("volume_mounts", volume_mounts) @property @pulumi.getter @@ -1053,11 +1370,30 @@ def __init__(__self__, *, > **NOTE:** This value is ignored if `secret_name` is used """ - pulumi.set(__self__, "name", name) + AppTemplateContainerEnv._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + secret_name=secret_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + secret_name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + + _setter("name", name) if secret_name is not None: - pulumi.set(__self__, "secret_name", secret_name) + _setter("secret_name", secret_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -1134,24 +1470,65 @@ def __init__(__self__, *, :param int termination_grace_period_seconds: The time in seconds after the container is sent the termination signal before the process if forcibly killed. :param int timeout: Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "transport", transport) + AppTemplateContainerLivenessProbe._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + transport=transport, + failure_count_threshold=failure_count_threshold, + headers=headers, + host=host, + initial_delay=initial_delay, + interval_seconds=interval_seconds, + path=path, + termination_grace_period_seconds=termination_grace_period_seconds, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + transport: Optional[str] = None, + failure_count_threshold: Optional[int] = None, + headers: Optional[Sequence['outputs.AppTemplateContainerLivenessProbeHeader']] = None, + host: Optional[str] = None, + initial_delay: Optional[int] = None, + interval_seconds: Optional[int] = None, + path: Optional[str] = None, + termination_grace_period_seconds: Optional[int] = None, + timeout: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if transport is None: + raise TypeError("Missing 'transport' argument") + if failure_count_threshold is None and 'failureCountThreshold' in kwargs: + failure_count_threshold = kwargs['failureCountThreshold'] + if initial_delay is None and 'initialDelay' in kwargs: + initial_delay = kwargs['initialDelay'] + if interval_seconds is None and 'intervalSeconds' in kwargs: + interval_seconds = kwargs['intervalSeconds'] + if termination_grace_period_seconds is None and 'terminationGracePeriodSeconds' in kwargs: + termination_grace_period_seconds = kwargs['terminationGracePeriodSeconds'] + + _setter("port", port) + _setter("transport", transport) if failure_count_threshold is not None: - pulumi.set(__self__, "failure_count_threshold", failure_count_threshold) + _setter("failure_count_threshold", failure_count_threshold) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if initial_delay is not None: - pulumi.set(__self__, "initial_delay", initial_delay) + _setter("initial_delay", initial_delay) if interval_seconds is not None: - pulumi.set(__self__, "interval_seconds", interval_seconds) + _setter("interval_seconds", interval_seconds) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if termination_grace_period_seconds is not None: - pulumi.set(__self__, "termination_grace_period_seconds", termination_grace_period_seconds) + _setter("termination_grace_period_seconds", termination_grace_period_seconds) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -1243,8 +1620,25 @@ def __init__(__self__, *, :param str name: The HTTP Header Name. :param str value: The HTTP Header value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AppTemplateContainerLivenessProbeHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1307,22 +1701,59 @@ def __init__(__self__, *, :param int success_count_threshold: The number of consecutive successful responses required to consider this probe as successful. Possible values are between `1` and `10`. Defaults to `3`. :param int timeout: Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "transport", transport) + AppTemplateContainerReadinessProbe._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + transport=transport, + failure_count_threshold=failure_count_threshold, + headers=headers, + host=host, + interval_seconds=interval_seconds, + path=path, + success_count_threshold=success_count_threshold, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + transport: Optional[str] = None, + failure_count_threshold: Optional[int] = None, + headers: Optional[Sequence['outputs.AppTemplateContainerReadinessProbeHeader']] = None, + host: Optional[str] = None, + interval_seconds: Optional[int] = None, + path: Optional[str] = None, + success_count_threshold: Optional[int] = None, + timeout: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if transport is None: + raise TypeError("Missing 'transport' argument") + if failure_count_threshold is None and 'failureCountThreshold' in kwargs: + failure_count_threshold = kwargs['failureCountThreshold'] + if interval_seconds is None and 'intervalSeconds' in kwargs: + interval_seconds = kwargs['intervalSeconds'] + if success_count_threshold is None and 'successCountThreshold' in kwargs: + success_count_threshold = kwargs['successCountThreshold'] + + _setter("port", port) + _setter("transport", transport) if failure_count_threshold is not None: - pulumi.set(__self__, "failure_count_threshold", failure_count_threshold) + _setter("failure_count_threshold", failure_count_threshold) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if interval_seconds is not None: - pulumi.set(__self__, "interval_seconds", interval_seconds) + _setter("interval_seconds", interval_seconds) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if success_count_threshold is not None: - pulumi.set(__self__, "success_count_threshold", success_count_threshold) + _setter("success_count_threshold", success_count_threshold) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -1406,8 +1837,25 @@ def __init__(__self__, *, :param str name: The HTTP Header Name. :param str value: The HTTP Header value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AppTemplateContainerReadinessProbeHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1470,22 +1918,59 @@ def __init__(__self__, *, :param int termination_grace_period_seconds: The time in seconds after the container is sent the termination signal before the process if forcibly killed. :param int timeout: Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "transport", transport) + AppTemplateContainerStartupProbe._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + transport=transport, + failure_count_threshold=failure_count_threshold, + headers=headers, + host=host, + interval_seconds=interval_seconds, + path=path, + termination_grace_period_seconds=termination_grace_period_seconds, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + transport: Optional[str] = None, + failure_count_threshold: Optional[int] = None, + headers: Optional[Sequence['outputs.AppTemplateContainerStartupProbeHeader']] = None, + host: Optional[str] = None, + interval_seconds: Optional[int] = None, + path: Optional[str] = None, + termination_grace_period_seconds: Optional[int] = None, + timeout: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if transport is None: + raise TypeError("Missing 'transport' argument") + if failure_count_threshold is None and 'failureCountThreshold' in kwargs: + failure_count_threshold = kwargs['failureCountThreshold'] + if interval_seconds is None and 'intervalSeconds' in kwargs: + interval_seconds = kwargs['intervalSeconds'] + if termination_grace_period_seconds is None and 'terminationGracePeriodSeconds' in kwargs: + termination_grace_period_seconds = kwargs['terminationGracePeriodSeconds'] + + _setter("port", port) + _setter("transport", transport) if failure_count_threshold is not None: - pulumi.set(__self__, "failure_count_threshold", failure_count_threshold) + _setter("failure_count_threshold", failure_count_threshold) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if interval_seconds is not None: - pulumi.set(__self__, "interval_seconds", interval_seconds) + _setter("interval_seconds", interval_seconds) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if termination_grace_period_seconds is not None: - pulumi.set(__self__, "termination_grace_period_seconds", termination_grace_period_seconds) + _setter("termination_grace_period_seconds", termination_grace_period_seconds) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter @@ -1569,8 +2054,25 @@ def __init__(__self__, *, :param str name: The HTTP Header Name. :param str value: The HTTP Header value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AppTemplateContainerStartupProbeHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1598,8 +2100,25 @@ def __init__(__self__, *, :param str name: The name of the Volume to be mounted in the container. :param str path: The path in the container at which to mount this volume. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "path", path) + AppTemplateContainerVolumeMount._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("name", name) + _setter("path", path) @property @pulumi.getter @@ -1648,11 +2167,36 @@ def __init__(__self__, *, :param str name: The name of the Scaling Rule :param Sequence['AppTemplateCustomScaleRuleAuthenticationArgs'] authentications: Zero or more `authentication` blocks as defined below. """ - pulumi.set(__self__, "custom_rule_type", custom_rule_type) - pulumi.set(__self__, "metadata", metadata) - pulumi.set(__self__, "name", name) + AppTemplateCustomScaleRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_rule_type=custom_rule_type, + metadata=metadata, + name=name, + authentications=authentications, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_rule_type: Optional[str] = None, + metadata: Optional[Mapping[str, str]] = None, + name: Optional[str] = None, + authentications: Optional[Sequence['outputs.AppTemplateCustomScaleRuleAuthentication']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_rule_type is None and 'customRuleType' in kwargs: + custom_rule_type = kwargs['customRuleType'] + if custom_rule_type is None: + raise TypeError("Missing 'custom_rule_type' argument") + if metadata is None: + raise TypeError("Missing 'metadata' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("custom_rule_type", custom_rule_type) + _setter("metadata", metadata) + _setter("name", name) if authentications is not None: - pulumi.set(__self__, "authentications", authentications) + _setter("authentications", authentications) @property @pulumi.getter(name="customRuleType") @@ -1715,8 +2259,29 @@ def __init__(__self__, *, :param str secret_name: The name of the Container App Secret to use for this Scale Rule Authentication. :param str trigger_parameter: The Trigger Parameter name to use the supply the value retrieved from the `secret_name`. """ - pulumi.set(__self__, "secret_name", secret_name) - pulumi.set(__self__, "trigger_parameter", trigger_parameter) + AppTemplateCustomScaleRuleAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_name=secret_name, + trigger_parameter=trigger_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_name: Optional[str] = None, + trigger_parameter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if trigger_parameter is None and 'triggerParameter' in kwargs: + trigger_parameter = kwargs['triggerParameter'] + if trigger_parameter is None: + raise TypeError("Missing 'trigger_parameter' argument") + + _setter("secret_name", secret_name) + _setter("trigger_parameter", trigger_parameter) @property @pulumi.getter(name="secretName") @@ -1763,10 +2328,31 @@ def __init__(__self__, *, :param str name: The name of the Scaling Rule :param Sequence['AppTemplateHttpScaleRuleAuthenticationArgs'] authentications: Zero or more `authentication` blocks as defined below. """ - pulumi.set(__self__, "concurrent_requests", concurrent_requests) - pulumi.set(__self__, "name", name) + AppTemplateHttpScaleRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + concurrent_requests=concurrent_requests, + name=name, + authentications=authentications, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + concurrent_requests: Optional[str] = None, + name: Optional[str] = None, + authentications: Optional[Sequence['outputs.AppTemplateHttpScaleRuleAuthentication']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if concurrent_requests is None and 'concurrentRequests' in kwargs: + concurrent_requests = kwargs['concurrentRequests'] + if concurrent_requests is None: + raise TypeError("Missing 'concurrent_requests' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("concurrent_requests", concurrent_requests) + _setter("name", name) if authentications is not None: - pulumi.set(__self__, "authentications", authentications) + _setter("authentications", authentications) @property @pulumi.getter(name="concurrentRequests") @@ -1821,9 +2407,28 @@ def __init__(__self__, *, :param str secret_name: The name of the Container App Secret to use for this Scale Rule Authentication. :param str trigger_parameter: The Trigger Parameter name to use the supply the value retrieved from the `secret_name`. """ - pulumi.set(__self__, "secret_name", secret_name) + AppTemplateHttpScaleRuleAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_name=secret_name, + trigger_parameter=trigger_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_name: Optional[str] = None, + trigger_parameter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if trigger_parameter is None and 'triggerParameter' in kwargs: + trigger_parameter = kwargs['triggerParameter'] + + _setter("secret_name", secret_name) if trigger_parameter is not None: - pulumi.set(__self__, "trigger_parameter", trigger_parameter) + _setter("trigger_parameter", trigger_parameter) @property @pulumi.getter(name="secretName") @@ -1870,10 +2475,31 @@ def __init__(__self__, *, :param str name: The name of the Scaling Rule :param Sequence['AppTemplateTcpScaleRuleAuthenticationArgs'] authentications: Zero or more `authentication` blocks as defined below. """ - pulumi.set(__self__, "concurrent_requests", concurrent_requests) - pulumi.set(__self__, "name", name) + AppTemplateTcpScaleRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + concurrent_requests=concurrent_requests, + name=name, + authentications=authentications, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + concurrent_requests: Optional[str] = None, + name: Optional[str] = None, + authentications: Optional[Sequence['outputs.AppTemplateTcpScaleRuleAuthentication']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if concurrent_requests is None and 'concurrentRequests' in kwargs: + concurrent_requests = kwargs['concurrentRequests'] + if concurrent_requests is None: + raise TypeError("Missing 'concurrent_requests' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("concurrent_requests", concurrent_requests) + _setter("name", name) if authentications is not None: - pulumi.set(__self__, "authentications", authentications) + _setter("authentications", authentications) @property @pulumi.getter(name="concurrentRequests") @@ -1928,9 +2554,28 @@ def __init__(__self__, *, :param str secret_name: The name of the Container App Secret to use for this Scale Rule Authentication. :param str trigger_parameter: The Trigger Parameter name to use the supply the value retrieved from the `secret_name`. """ - pulumi.set(__self__, "secret_name", secret_name) + AppTemplateTcpScaleRuleAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_name=secret_name, + trigger_parameter=trigger_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_name: Optional[str] = None, + trigger_parameter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if trigger_parameter is None and 'triggerParameter' in kwargs: + trigger_parameter = kwargs['triggerParameter'] + + _setter("secret_name", secret_name) if trigger_parameter is not None: - pulumi.set(__self__, "trigger_parameter", trigger_parameter) + _setter("trigger_parameter", trigger_parameter) @property @pulumi.getter(name="secretName") @@ -1979,11 +2624,32 @@ def __init__(__self__, *, :param str storage_name: The name of the `AzureFile` storage. :param str storage_type: The type of storage volume. Possible values include `AzureFile` and `EmptyDir`. Defaults to `EmptyDir`. """ - pulumi.set(__self__, "name", name) + AppTemplateVolume._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + storage_name=storage_name, + storage_type=storage_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + storage_name: Optional[str] = None, + storage_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if storage_name is None and 'storageName' in kwargs: + storage_name = kwargs['storageName'] + if storage_type is None and 'storageType' in kwargs: + storage_type = kwargs['storageType'] + + _setter("name", name) if storage_name is not None: - pulumi.set(__self__, "storage_name", storage_name) + _setter("storage_name", storage_name) if storage_type is not None: - pulumi.set(__self__, "storage_type", storage_type) + _setter("storage_type", storage_type) @property @pulumi.getter @@ -2038,11 +2704,30 @@ def __init__(__self__, *, :param str secret_name: The name of a secret specified in the `secrets` block that contains the value for this metadata configuration item. :param str value: The value for this metadata configuration item. """ - pulumi.set(__self__, "name", name) + EnvironmentDaprComponentMetadata._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + secret_name=secret_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + secret_name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + + _setter("name", name) if secret_name is not None: - pulumi.set(__self__, "secret_name", secret_name) + _setter("secret_name", secret_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -2078,8 +2763,25 @@ def __init__(__self__, *, :param str name: The Secret name. :param str value: The value for this secret. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + EnvironmentDaprComponentSecret._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -2109,9 +2811,36 @@ def __init__(__self__, *, :param int app_port: The port which the application is listening on. This is the same as the `ingress` port. :param str app_protocol: The protocol for the app. Possible values include `http` and `grpc`. Defaults to `http`. """ - pulumi.set(__self__, "app_id", app_id) - pulumi.set(__self__, "app_port", app_port) - pulumi.set(__self__, "app_protocol", app_protocol) + GetAppDaprResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_id=app_id, + app_port=app_port, + app_protocol=app_protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_id: Optional[str] = None, + app_port: Optional[int] = None, + app_protocol: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_id is None and 'appId' in kwargs: + app_id = kwargs['appId'] + if app_id is None: + raise TypeError("Missing 'app_id' argument") + if app_port is None and 'appPort' in kwargs: + app_port = kwargs['appPort'] + if app_port is None: + raise TypeError("Missing 'app_port' argument") + if app_protocol is None and 'appProtocol' in kwargs: + app_protocol = kwargs['appProtocol'] + if app_protocol is None: + raise TypeError("Missing 'app_protocol' argument") + + _setter("app_id", app_id) + _setter("app_port", app_port) + _setter("app_protocol", app_protocol) @property @pulumi.getter(name="appId") @@ -2149,10 +2878,41 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: A list of one or more Resource IDs for User Assigned Managed identities to assign. Required when `type` is set to `UserAssigned`. :param str type: The type of managed identity to assign. Possible values are `UserAssigned` and `SystemAssigned` """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetAppIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -2201,14 +2961,67 @@ def __init__(__self__, *, :param Sequence['GetAppIngressTrafficWeightArgs'] traffic_weights: A `traffic_weight` block as detailed below. :param str transport: The transport method for the Ingress. Possible values include `auto`, `http`, and `http2`. Defaults to `auto` """ - pulumi.set(__self__, "allow_insecure_connections", allow_insecure_connections) - pulumi.set(__self__, "custom_domains", custom_domains) - pulumi.set(__self__, "exposed_port", exposed_port) - pulumi.set(__self__, "external_enabled", external_enabled) - pulumi.set(__self__, "fqdn", fqdn) - pulumi.set(__self__, "target_port", target_port) - pulumi.set(__self__, "traffic_weights", traffic_weights) - pulumi.set(__self__, "transport", transport) + GetAppIngressResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_insecure_connections=allow_insecure_connections, + custom_domains=custom_domains, + exposed_port=exposed_port, + external_enabled=external_enabled, + fqdn=fqdn, + target_port=target_port, + traffic_weights=traffic_weights, + transport=transport, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_insecure_connections: Optional[bool] = None, + custom_domains: Optional[Sequence['outputs.GetAppIngressCustomDomainResult']] = None, + exposed_port: Optional[int] = None, + external_enabled: Optional[bool] = None, + fqdn: Optional[str] = None, + target_port: Optional[int] = None, + traffic_weights: Optional[Sequence['outputs.GetAppIngressTrafficWeightResult']] = None, + transport: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_insecure_connections is None and 'allowInsecureConnections' in kwargs: + allow_insecure_connections = kwargs['allowInsecureConnections'] + if allow_insecure_connections is None: + raise TypeError("Missing 'allow_insecure_connections' argument") + if custom_domains is None and 'customDomains' in kwargs: + custom_domains = kwargs['customDomains'] + if custom_domains is None: + raise TypeError("Missing 'custom_domains' argument") + if exposed_port is None and 'exposedPort' in kwargs: + exposed_port = kwargs['exposedPort'] + if exposed_port is None: + raise TypeError("Missing 'exposed_port' argument") + if external_enabled is None and 'externalEnabled' in kwargs: + external_enabled = kwargs['externalEnabled'] + if external_enabled is None: + raise TypeError("Missing 'external_enabled' argument") + if fqdn is None: + raise TypeError("Missing 'fqdn' argument") + if target_port is None and 'targetPort' in kwargs: + target_port = kwargs['targetPort'] + if target_port is None: + raise TypeError("Missing 'target_port' argument") + if traffic_weights is None and 'trafficWeights' in kwargs: + traffic_weights = kwargs['trafficWeights'] + if traffic_weights is None: + raise TypeError("Missing 'traffic_weights' argument") + if transport is None: + raise TypeError("Missing 'transport' argument") + + _setter("allow_insecure_connections", allow_insecure_connections) + _setter("custom_domains", custom_domains) + _setter("exposed_port", exposed_port) + _setter("external_enabled", external_enabled) + _setter("fqdn", fqdn) + _setter("target_port", target_port) + _setter("traffic_weights", traffic_weights) + _setter("transport", transport) @property @pulumi.getter(name="allowInsecureConnections") @@ -2283,9 +3096,34 @@ def __init__(__self__, *, :param str certificate_id: The ID of the Container App Environment Certificate. :param str name: The name of the Container App. """ - pulumi.set(__self__, "certificate_binding_type", certificate_binding_type) - pulumi.set(__self__, "certificate_id", certificate_id) - pulumi.set(__self__, "name", name) + GetAppIngressCustomDomainResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_binding_type=certificate_binding_type, + certificate_id=certificate_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_binding_type: Optional[str] = None, + certificate_id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_binding_type is None and 'certificateBindingType' in kwargs: + certificate_binding_type = kwargs['certificateBindingType'] + if certificate_binding_type is None: + raise TypeError("Missing 'certificate_binding_type' argument") + if certificate_id is None and 'certificateId' in kwargs: + certificate_id = kwargs['certificateId'] + if certificate_id is None: + raise TypeError("Missing 'certificate_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("certificate_binding_type", certificate_binding_type) + _setter("certificate_id", certificate_id) + _setter("name", name) @property @pulumi.getter(name="certificateBindingType") @@ -2325,10 +3163,39 @@ def __init__(__self__, *, :param int percentage: The percentage of traffic which should be sent this revision. :param str revision_suffix: The suffix string to which this `traffic_weight` applies. """ - pulumi.set(__self__, "label", label) - pulumi.set(__self__, "latest_revision", latest_revision) - pulumi.set(__self__, "percentage", percentage) - pulumi.set(__self__, "revision_suffix", revision_suffix) + GetAppIngressTrafficWeightResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + latest_revision=latest_revision, + percentage=percentage, + revision_suffix=revision_suffix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[str] = None, + latest_revision: Optional[bool] = None, + percentage: Optional[int] = None, + revision_suffix: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if label is None: + raise TypeError("Missing 'label' argument") + if latest_revision is None and 'latestRevision' in kwargs: + latest_revision = kwargs['latestRevision'] + if latest_revision is None: + raise TypeError("Missing 'latest_revision' argument") + if percentage is None: + raise TypeError("Missing 'percentage' argument") + if revision_suffix is None and 'revisionSuffix' in kwargs: + revision_suffix = kwargs['revisionSuffix'] + if revision_suffix is None: + raise TypeError("Missing 'revision_suffix' argument") + + _setter("label", label) + _setter("latest_revision", latest_revision) + _setter("percentage", percentage) + _setter("revision_suffix", revision_suffix) @property @pulumi.getter @@ -2376,10 +3243,37 @@ def __init__(__self__, *, :param str server: The hostname for the Container Registry. :param str username: The username to use for this Container Registry, `password_secret_name` must also be supplied.. """ - pulumi.set(__self__, "identity", identity) - pulumi.set(__self__, "password_secret_name", password_secret_name) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + GetAppRegistryResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity=identity, + password_secret_name=password_secret_name, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity: Optional[str] = None, + password_secret_name: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity is None: + raise TypeError("Missing 'identity' argument") + if password_secret_name is None and 'passwordSecretName' in kwargs: + password_secret_name = kwargs['passwordSecretName'] + if password_secret_name is None: + raise TypeError("Missing 'password_secret_name' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("identity", identity) + _setter("password_secret_name", password_secret_name) + _setter("server", server) + _setter("username", username) @property @pulumi.getter @@ -2423,8 +3317,25 @@ def __init__(__self__, *, :param str name: The name of the Container App. :param str value: The HTTP Header value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetAppSecretResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -2462,16 +3373,73 @@ def __init__(__self__, *, :param str revision_suffix: The suffix string to which this `traffic_weight` applies. :param Sequence['GetAppTemplateVolumeArgs'] volumes: A `volume` block as detailed below. """ - pulumi.set(__self__, "azure_queue_scale_rules", azure_queue_scale_rules) - pulumi.set(__self__, "containers", containers) - pulumi.set(__self__, "http_scale_rules", http_scale_rules) - pulumi.set(__self__, "max_replicas", max_replicas) - pulumi.set(__self__, "min_replicas", min_replicas) - pulumi.set(__self__, "revision_suffix", revision_suffix) - pulumi.set(__self__, "tcp_scale_rules", tcp_scale_rules) - pulumi.set(__self__, "volumes", volumes) + GetAppTemplateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_queue_scale_rules=azure_queue_scale_rules, + containers=containers, + http_scale_rules=http_scale_rules, + max_replicas=max_replicas, + min_replicas=min_replicas, + revision_suffix=revision_suffix, + tcp_scale_rules=tcp_scale_rules, + volumes=volumes, + custom_scale_rules=custom_scale_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_queue_scale_rules: Optional[Sequence['outputs.GetAppTemplateAzureQueueScaleRuleResult']] = None, + containers: Optional[Sequence['outputs.GetAppTemplateContainerResult']] = None, + http_scale_rules: Optional[Sequence['outputs.GetAppTemplateHttpScaleRuleResult']] = None, + max_replicas: Optional[int] = None, + min_replicas: Optional[int] = None, + revision_suffix: Optional[str] = None, + tcp_scale_rules: Optional[Sequence['outputs.GetAppTemplateTcpScaleRuleResult']] = None, + volumes: Optional[Sequence['outputs.GetAppTemplateVolumeResult']] = None, + custom_scale_rules: Optional[Sequence['outputs.GetAppTemplateCustomScaleRuleResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_queue_scale_rules is None and 'azureQueueScaleRules' in kwargs: + azure_queue_scale_rules = kwargs['azureQueueScaleRules'] + if azure_queue_scale_rules is None: + raise TypeError("Missing 'azure_queue_scale_rules' argument") + if containers is None: + raise TypeError("Missing 'containers' argument") + if http_scale_rules is None and 'httpScaleRules' in kwargs: + http_scale_rules = kwargs['httpScaleRules'] + if http_scale_rules is None: + raise TypeError("Missing 'http_scale_rules' argument") + if max_replicas is None and 'maxReplicas' in kwargs: + max_replicas = kwargs['maxReplicas'] + if max_replicas is None: + raise TypeError("Missing 'max_replicas' argument") + if min_replicas is None and 'minReplicas' in kwargs: + min_replicas = kwargs['minReplicas'] + if min_replicas is None: + raise TypeError("Missing 'min_replicas' argument") + if revision_suffix is None and 'revisionSuffix' in kwargs: + revision_suffix = kwargs['revisionSuffix'] + if revision_suffix is None: + raise TypeError("Missing 'revision_suffix' argument") + if tcp_scale_rules is None and 'tcpScaleRules' in kwargs: + tcp_scale_rules = kwargs['tcpScaleRules'] + if tcp_scale_rules is None: + raise TypeError("Missing 'tcp_scale_rules' argument") + if volumes is None: + raise TypeError("Missing 'volumes' argument") + if custom_scale_rules is None and 'customScaleRules' in kwargs: + custom_scale_rules = kwargs['customScaleRules'] + + _setter("azure_queue_scale_rules", azure_queue_scale_rules) + _setter("containers", containers) + _setter("http_scale_rules", http_scale_rules) + _setter("max_replicas", max_replicas) + _setter("min_replicas", min_replicas) + _setter("revision_suffix", revision_suffix) + _setter("tcp_scale_rules", tcp_scale_rules) + _setter("volumes", volumes) if custom_scale_rules is not None: - pulumi.set(__self__, "custom_scale_rules", custom_scale_rules) + _setter("custom_scale_rules", custom_scale_rules) @property @pulumi.getter(name="azureQueueScaleRules") @@ -2544,10 +3512,39 @@ def __init__(__self__, *, """ :param str name: The name of the Container App. """ - pulumi.set(__self__, "authentications", authentications) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "queue_length", queue_length) - pulumi.set(__self__, "queue_name", queue_name) + GetAppTemplateAzureQueueScaleRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentications=authentications, + name=name, + queue_length=queue_length, + queue_name=queue_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentications: Optional[Sequence['outputs.GetAppTemplateAzureQueueScaleRuleAuthenticationResult']] = None, + name: Optional[str] = None, + queue_length: Optional[int] = None, + queue_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentications is None: + raise TypeError("Missing 'authentications' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if queue_length is None and 'queueLength' in kwargs: + queue_length = kwargs['queueLength'] + if queue_length is None: + raise TypeError("Missing 'queue_length' argument") + if queue_name is None and 'queueName' in kwargs: + queue_name = kwargs['queueName'] + if queue_name is None: + raise TypeError("Missing 'queue_name' argument") + + _setter("authentications", authentications) + _setter("name", name) + _setter("queue_length", queue_length) + _setter("queue_name", queue_name) @property @pulumi.getter @@ -2581,8 +3578,29 @@ def __init__(__self__, *, """ :param str secret_name: The name of the secret that contains the value for this environment variable. """ - pulumi.set(__self__, "secret_name", secret_name) - pulumi.set(__self__, "trigger_parameter", trigger_parameter) + GetAppTemplateAzureQueueScaleRuleAuthenticationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_name=secret_name, + trigger_parameter=trigger_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_name: Optional[str] = None, + trigger_parameter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if trigger_parameter is None and 'triggerParameter' in kwargs: + trigger_parameter = kwargs['triggerParameter'] + if trigger_parameter is None: + raise TypeError("Missing 'trigger_parameter' argument") + + _setter("secret_name", secret_name) + _setter("trigger_parameter", trigger_parameter) @property @pulumi.getter(name="secretName") @@ -2627,18 +3645,85 @@ def __init__(__self__, *, :param Sequence['GetAppTemplateContainerStartupProbeArgs'] startup_probes: A `startup_probe` block as detailed below. :param Sequence['GetAppTemplateContainerVolumeMountArgs'] volume_mounts: A `volume_mounts` block as detailed below. """ - pulumi.set(__self__, "args", args) - pulumi.set(__self__, "commands", commands) - pulumi.set(__self__, "cpu", cpu) - pulumi.set(__self__, "envs", envs) - pulumi.set(__self__, "ephemeral_storage", ephemeral_storage) - pulumi.set(__self__, "image", image) - pulumi.set(__self__, "liveness_probes", liveness_probes) - pulumi.set(__self__, "memory", memory) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "readiness_probes", readiness_probes) - pulumi.set(__self__, "startup_probes", startup_probes) - pulumi.set(__self__, "volume_mounts", volume_mounts) + GetAppTemplateContainerResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + args=args, + commands=commands, + cpu=cpu, + envs=envs, + ephemeral_storage=ephemeral_storage, + image=image, + liveness_probes=liveness_probes, + memory=memory, + name=name, + readiness_probes=readiness_probes, + startup_probes=startup_probes, + volume_mounts=volume_mounts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + args: Optional[Sequence[str]] = None, + commands: Optional[Sequence[str]] = None, + cpu: Optional[float] = None, + envs: Optional[Sequence['outputs.GetAppTemplateContainerEnvResult']] = None, + ephemeral_storage: Optional[str] = None, + image: Optional[str] = None, + liveness_probes: Optional[Sequence['outputs.GetAppTemplateContainerLivenessProbeResult']] = None, + memory: Optional[str] = None, + name: Optional[str] = None, + readiness_probes: Optional[Sequence['outputs.GetAppTemplateContainerReadinessProbeResult']] = None, + startup_probes: Optional[Sequence['outputs.GetAppTemplateContainerStartupProbeResult']] = None, + volume_mounts: Optional[Sequence['outputs.GetAppTemplateContainerVolumeMountResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if args is None: + raise TypeError("Missing 'args' argument") + if commands is None: + raise TypeError("Missing 'commands' argument") + if cpu is None: + raise TypeError("Missing 'cpu' argument") + if envs is None: + raise TypeError("Missing 'envs' argument") + if ephemeral_storage is None and 'ephemeralStorage' in kwargs: + ephemeral_storage = kwargs['ephemeralStorage'] + if ephemeral_storage is None: + raise TypeError("Missing 'ephemeral_storage' argument") + if image is None: + raise TypeError("Missing 'image' argument") + if liveness_probes is None and 'livenessProbes' in kwargs: + liveness_probes = kwargs['livenessProbes'] + if liveness_probes is None: + raise TypeError("Missing 'liveness_probes' argument") + if memory is None: + raise TypeError("Missing 'memory' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if readiness_probes is None and 'readinessProbes' in kwargs: + readiness_probes = kwargs['readinessProbes'] + if readiness_probes is None: + raise TypeError("Missing 'readiness_probes' argument") + if startup_probes is None and 'startupProbes' in kwargs: + startup_probes = kwargs['startupProbes'] + if startup_probes is None: + raise TypeError("Missing 'startup_probes' argument") + if volume_mounts is None and 'volumeMounts' in kwargs: + volume_mounts = kwargs['volumeMounts'] + if volume_mounts is None: + raise TypeError("Missing 'volume_mounts' argument") + + _setter("args", args) + _setter("commands", commands) + _setter("cpu", cpu) + _setter("envs", envs) + _setter("ephemeral_storage", ephemeral_storage) + _setter("image", image) + _setter("liveness_probes", liveness_probes) + _setter("memory", memory) + _setter("name", name) + _setter("readiness_probes", readiness_probes) + _setter("startup_probes", startup_probes) + _setter("volume_mounts", volume_mounts) @property @pulumi.getter @@ -2748,9 +3833,32 @@ def __init__(__self__, *, :param str secret_name: The name of the secret that contains the value for this environment variable. :param str value: The HTTP Header value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "secret_name", secret_name) - pulumi.set(__self__, "value", value) + GetAppTemplateContainerEnvResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + secret_name=secret_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + secret_name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("secret_name", secret_name) + _setter("value", value) @property @pulumi.getter @@ -2802,16 +3910,73 @@ def __init__(__self__, *, :param int timeout: Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`. :param str transport: The transport method for the Ingress. Possible values include `auto`, `http`, and `http2`. Defaults to `auto` """ - pulumi.set(__self__, "failure_count_threshold", failure_count_threshold) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "host", host) - pulumi.set(__self__, "initial_delay", initial_delay) - pulumi.set(__self__, "interval_seconds", interval_seconds) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "termination_grace_period_seconds", termination_grace_period_seconds) - pulumi.set(__self__, "timeout", timeout) - pulumi.set(__self__, "transport", transport) + GetAppTemplateContainerLivenessProbeResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + failure_count_threshold=failure_count_threshold, + headers=headers, + host=host, + initial_delay=initial_delay, + interval_seconds=interval_seconds, + path=path, + port=port, + termination_grace_period_seconds=termination_grace_period_seconds, + timeout=timeout, + transport=transport, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + failure_count_threshold: Optional[int] = None, + headers: Optional[Sequence['outputs.GetAppTemplateContainerLivenessProbeHeaderResult']] = None, + host: Optional[str] = None, + initial_delay: Optional[int] = None, + interval_seconds: Optional[int] = None, + path: Optional[str] = None, + port: Optional[int] = None, + termination_grace_period_seconds: Optional[int] = None, + timeout: Optional[int] = None, + transport: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failure_count_threshold is None and 'failureCountThreshold' in kwargs: + failure_count_threshold = kwargs['failureCountThreshold'] + if failure_count_threshold is None: + raise TypeError("Missing 'failure_count_threshold' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if host is None: + raise TypeError("Missing 'host' argument") + if initial_delay is None and 'initialDelay' in kwargs: + initial_delay = kwargs['initialDelay'] + if initial_delay is None: + raise TypeError("Missing 'initial_delay' argument") + if interval_seconds is None and 'intervalSeconds' in kwargs: + interval_seconds = kwargs['intervalSeconds'] + if interval_seconds is None: + raise TypeError("Missing 'interval_seconds' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if termination_grace_period_seconds is None and 'terminationGracePeriodSeconds' in kwargs: + termination_grace_period_seconds = kwargs['terminationGracePeriodSeconds'] + if termination_grace_period_seconds is None: + raise TypeError("Missing 'termination_grace_period_seconds' argument") + if timeout is None: + raise TypeError("Missing 'timeout' argument") + if transport is None: + raise TypeError("Missing 'transport' argument") + + _setter("failure_count_threshold", failure_count_threshold) + _setter("headers", headers) + _setter("host", host) + _setter("initial_delay", initial_delay) + _setter("interval_seconds", interval_seconds) + _setter("path", path) + _setter("port", port) + _setter("termination_grace_period_seconds", termination_grace_period_seconds) + _setter("timeout", timeout) + _setter("transport", transport) @property @pulumi.getter(name="failureCountThreshold") @@ -2903,8 +4068,25 @@ def __init__(__self__, *, :param str name: The name of the Container App. :param str value: The HTTP Header value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetAppTemplateContainerLivenessProbeHeaderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -2946,15 +4128,66 @@ def __init__(__self__, *, :param int timeout: Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`. :param str transport: The transport method for the Ingress. Possible values include `auto`, `http`, and `http2`. Defaults to `auto` """ - pulumi.set(__self__, "failure_count_threshold", failure_count_threshold) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "host", host) - pulumi.set(__self__, "interval_seconds", interval_seconds) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "success_count_threshold", success_count_threshold) - pulumi.set(__self__, "timeout", timeout) - pulumi.set(__self__, "transport", transport) + GetAppTemplateContainerReadinessProbeResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + failure_count_threshold=failure_count_threshold, + headers=headers, + host=host, + interval_seconds=interval_seconds, + path=path, + port=port, + success_count_threshold=success_count_threshold, + timeout=timeout, + transport=transport, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + failure_count_threshold: Optional[int] = None, + headers: Optional[Sequence['outputs.GetAppTemplateContainerReadinessProbeHeaderResult']] = None, + host: Optional[str] = None, + interval_seconds: Optional[int] = None, + path: Optional[str] = None, + port: Optional[int] = None, + success_count_threshold: Optional[int] = None, + timeout: Optional[int] = None, + transport: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failure_count_threshold is None and 'failureCountThreshold' in kwargs: + failure_count_threshold = kwargs['failureCountThreshold'] + if failure_count_threshold is None: + raise TypeError("Missing 'failure_count_threshold' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if host is None: + raise TypeError("Missing 'host' argument") + if interval_seconds is None and 'intervalSeconds' in kwargs: + interval_seconds = kwargs['intervalSeconds'] + if interval_seconds is None: + raise TypeError("Missing 'interval_seconds' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if success_count_threshold is None and 'successCountThreshold' in kwargs: + success_count_threshold = kwargs['successCountThreshold'] + if success_count_threshold is None: + raise TypeError("Missing 'success_count_threshold' argument") + if timeout is None: + raise TypeError("Missing 'timeout' argument") + if transport is None: + raise TypeError("Missing 'transport' argument") + + _setter("failure_count_threshold", failure_count_threshold) + _setter("headers", headers) + _setter("host", host) + _setter("interval_seconds", interval_seconds) + _setter("path", path) + _setter("port", port) + _setter("success_count_threshold", success_count_threshold) + _setter("timeout", timeout) + _setter("transport", transport) @property @pulumi.getter(name="failureCountThreshold") @@ -3038,8 +4271,25 @@ def __init__(__self__, *, :param str name: The name of the Container App. :param str value: The HTTP Header value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetAppTemplateContainerReadinessProbeHeaderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -3081,15 +4331,66 @@ def __init__(__self__, *, :param int timeout: Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`. :param str transport: The transport method for the Ingress. Possible values include `auto`, `http`, and `http2`. Defaults to `auto` """ - pulumi.set(__self__, "failure_count_threshold", failure_count_threshold) - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "host", host) - pulumi.set(__self__, "interval_seconds", interval_seconds) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "termination_grace_period_seconds", termination_grace_period_seconds) - pulumi.set(__self__, "timeout", timeout) - pulumi.set(__self__, "transport", transport) + GetAppTemplateContainerStartupProbeResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + failure_count_threshold=failure_count_threshold, + headers=headers, + host=host, + interval_seconds=interval_seconds, + path=path, + port=port, + termination_grace_period_seconds=termination_grace_period_seconds, + timeout=timeout, + transport=transport, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + failure_count_threshold: Optional[int] = None, + headers: Optional[Sequence['outputs.GetAppTemplateContainerStartupProbeHeaderResult']] = None, + host: Optional[str] = None, + interval_seconds: Optional[int] = None, + path: Optional[str] = None, + port: Optional[int] = None, + termination_grace_period_seconds: Optional[int] = None, + timeout: Optional[int] = None, + transport: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failure_count_threshold is None and 'failureCountThreshold' in kwargs: + failure_count_threshold = kwargs['failureCountThreshold'] + if failure_count_threshold is None: + raise TypeError("Missing 'failure_count_threshold' argument") + if headers is None: + raise TypeError("Missing 'headers' argument") + if host is None: + raise TypeError("Missing 'host' argument") + if interval_seconds is None and 'intervalSeconds' in kwargs: + interval_seconds = kwargs['intervalSeconds'] + if interval_seconds is None: + raise TypeError("Missing 'interval_seconds' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if termination_grace_period_seconds is None and 'terminationGracePeriodSeconds' in kwargs: + termination_grace_period_seconds = kwargs['terminationGracePeriodSeconds'] + if termination_grace_period_seconds is None: + raise TypeError("Missing 'termination_grace_period_seconds' argument") + if timeout is None: + raise TypeError("Missing 'timeout' argument") + if transport is None: + raise TypeError("Missing 'transport' argument") + + _setter("failure_count_threshold", failure_count_threshold) + _setter("headers", headers) + _setter("host", host) + _setter("interval_seconds", interval_seconds) + _setter("path", path) + _setter("port", port) + _setter("termination_grace_period_seconds", termination_grace_period_seconds) + _setter("timeout", timeout) + _setter("transport", transport) @property @pulumi.getter(name="failureCountThreshold") @@ -3173,8 +4474,25 @@ def __init__(__self__, *, :param str name: The name of the Container App. :param str value: The HTTP Header value. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetAppTemplateContainerStartupProbeHeaderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -3202,8 +4520,25 @@ def __init__(__self__, *, :param str name: The name of the Container App. :param str path: The path in the container at which to mount this volume. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "path", path) + GetAppTemplateContainerVolumeMountResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("name", name) + _setter("path", path) @property @pulumi.getter @@ -3232,10 +4567,37 @@ def __init__(__self__, *, """ :param str name: The name of the Container App. """ - pulumi.set(__self__, "authentications", authentications) - pulumi.set(__self__, "custom_rule_type", custom_rule_type) - pulumi.set(__self__, "metadata", metadata) - pulumi.set(__self__, "name", name) + GetAppTemplateCustomScaleRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentications=authentications, + custom_rule_type=custom_rule_type, + metadata=metadata, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentications: Optional[Sequence['outputs.GetAppTemplateCustomScaleRuleAuthenticationResult']] = None, + custom_rule_type: Optional[str] = None, + metadata: Optional[Mapping[str, str]] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentications is None: + raise TypeError("Missing 'authentications' argument") + if custom_rule_type is None and 'customRuleType' in kwargs: + custom_rule_type = kwargs['customRuleType'] + if custom_rule_type is None: + raise TypeError("Missing 'custom_rule_type' argument") + if metadata is None: + raise TypeError("Missing 'metadata' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("authentications", authentications) + _setter("custom_rule_type", custom_rule_type) + _setter("metadata", metadata) + _setter("name", name) @property @pulumi.getter @@ -3269,8 +4631,29 @@ def __init__(__self__, *, """ :param str secret_name: The name of the secret that contains the value for this environment variable. """ - pulumi.set(__self__, "secret_name", secret_name) - pulumi.set(__self__, "trigger_parameter", trigger_parameter) + GetAppTemplateCustomScaleRuleAuthenticationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_name=secret_name, + trigger_parameter=trigger_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_name: Optional[str] = None, + trigger_parameter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if trigger_parameter is None and 'triggerParameter' in kwargs: + trigger_parameter = kwargs['triggerParameter'] + if trigger_parameter is None: + raise TypeError("Missing 'trigger_parameter' argument") + + _setter("secret_name", secret_name) + _setter("trigger_parameter", trigger_parameter) @property @pulumi.getter(name="secretName") @@ -3295,9 +4678,32 @@ def __init__(__self__, *, """ :param str name: The name of the Container App. """ - pulumi.set(__self__, "authentications", authentications) - pulumi.set(__self__, "concurrent_requests", concurrent_requests) - pulumi.set(__self__, "name", name) + GetAppTemplateHttpScaleRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentications=authentications, + concurrent_requests=concurrent_requests, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentications: Optional[Sequence['outputs.GetAppTemplateHttpScaleRuleAuthenticationResult']] = None, + concurrent_requests: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentications is None: + raise TypeError("Missing 'authentications' argument") + if concurrent_requests is None and 'concurrentRequests' in kwargs: + concurrent_requests = kwargs['concurrentRequests'] + if concurrent_requests is None: + raise TypeError("Missing 'concurrent_requests' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("authentications", authentications) + _setter("concurrent_requests", concurrent_requests) + _setter("name", name) @property @pulumi.getter @@ -3326,8 +4732,29 @@ def __init__(__self__, *, """ :param str secret_name: The name of the secret that contains the value for this environment variable. """ - pulumi.set(__self__, "secret_name", secret_name) - pulumi.set(__self__, "trigger_parameter", trigger_parameter) + GetAppTemplateHttpScaleRuleAuthenticationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_name=secret_name, + trigger_parameter=trigger_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_name: Optional[str] = None, + trigger_parameter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if trigger_parameter is None and 'triggerParameter' in kwargs: + trigger_parameter = kwargs['triggerParameter'] + if trigger_parameter is None: + raise TypeError("Missing 'trigger_parameter' argument") + + _setter("secret_name", secret_name) + _setter("trigger_parameter", trigger_parameter) @property @pulumi.getter(name="secretName") @@ -3352,9 +4779,32 @@ def __init__(__self__, *, """ :param str name: The name of the Container App. """ - pulumi.set(__self__, "authentications", authentications) - pulumi.set(__self__, "concurrent_requests", concurrent_requests) - pulumi.set(__self__, "name", name) + GetAppTemplateTcpScaleRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentications=authentications, + concurrent_requests=concurrent_requests, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentications: Optional[Sequence['outputs.GetAppTemplateTcpScaleRuleAuthenticationResult']] = None, + concurrent_requests: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentications is None: + raise TypeError("Missing 'authentications' argument") + if concurrent_requests is None and 'concurrentRequests' in kwargs: + concurrent_requests = kwargs['concurrentRequests'] + if concurrent_requests is None: + raise TypeError("Missing 'concurrent_requests' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("authentications", authentications) + _setter("concurrent_requests", concurrent_requests) + _setter("name", name) @property @pulumi.getter @@ -3383,8 +4833,29 @@ def __init__(__self__, *, """ :param str secret_name: The name of the secret that contains the value for this environment variable. """ - pulumi.set(__self__, "secret_name", secret_name) - pulumi.set(__self__, "trigger_parameter", trigger_parameter) + GetAppTemplateTcpScaleRuleAuthenticationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_name=secret_name, + trigger_parameter=trigger_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_name: Optional[str] = None, + trigger_parameter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if trigger_parameter is None and 'triggerParameter' in kwargs: + trigger_parameter = kwargs['triggerParameter'] + if trigger_parameter is None: + raise TypeError("Missing 'trigger_parameter' argument") + + _setter("secret_name", secret_name) + _setter("trigger_parameter", trigger_parameter) @property @pulumi.getter(name="secretName") @@ -3411,9 +4882,34 @@ def __init__(__self__, *, :param str storage_name: The name of the `AzureFile` storage. :param str storage_type: The type of storage volume. Possible values include `AzureFile` and `EmptyDir`. Defaults to `EmptyDir`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "storage_name", storage_name) - pulumi.set(__self__, "storage_type", storage_type) + GetAppTemplateVolumeResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + storage_name=storage_name, + storage_type=storage_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + storage_name: Optional[str] = None, + storage_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if storage_name is None and 'storageName' in kwargs: + storage_name = kwargs['storageName'] + if storage_name is None: + raise TypeError("Missing 'storage_name' argument") + if storage_type is None and 'storageType' in kwargs: + storage_type = kwargs['storageType'] + if storage_type is None: + raise TypeError("Missing 'storage_type' argument") + + _setter("name", name) + _setter("storage_name", storage_name) + _setter("storage_type", storage_type) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/containerservice/_inputs.py b/sdk/python/pulumi_azure/containerservice/_inputs.py index 4df1fbf81c..91abb50615 100644 --- a/sdk/python/pulumi_azure/containerservice/_inputs.py +++ b/sdk/python/pulumi_azure/containerservice/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -133,12 +133,33 @@ def __init__(__self__, *, > **NOTE:** One of either `tag` or `digest` can be specified. :param pulumi.Input[str] tag: The tag of the artifact that wants to be subscribed for the Connected Registry. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + ConnectedRegistryNotificationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + digest=digest, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + digest: Optional[pulumi.Input[str]] = None, + tag: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if digest is not None: - pulumi.set(__self__, "digest", digest) + _setter("digest", digest) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter @@ -212,21 +233,64 @@ def __init__(__self__, *, :param pulumi.Input[int] sync_interval_in_seconds: Specifies the interval at which to re-reconcile the cluster Azure Blob source with the remote. :param pulumi.Input[int] timeout_in_seconds: Specifies the maximum time to attempt to reconcile the cluster Azure Blob source with the remote. """ - pulumi.set(__self__, "container_id", container_id) + FluxConfigurationBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + account_key=account_key, + local_auth_reference=local_auth_reference, + managed_identity=managed_identity, + sas_token=sas_token, + service_principal=service_principal, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[pulumi.Input[str]] = None, + account_key: Optional[pulumi.Input[str]] = None, + local_auth_reference: Optional[pulumi.Input[str]] = None, + managed_identity: Optional[pulumi.Input['FluxConfigurationBlobStorageManagedIdentityArgs']] = None, + sas_token: Optional[pulumi.Input[str]] = None, + service_principal: Optional[pulumi.Input['FluxConfigurationBlobStorageServicePrincipalArgs']] = None, + sync_interval_in_seconds: Optional[pulumi.Input[int]] = None, + timeout_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if local_auth_reference is None and 'localAuthReference' in kwargs: + local_auth_reference = kwargs['localAuthReference'] + if managed_identity is None and 'managedIdentity' in kwargs: + managed_identity = kwargs['managedIdentity'] + if sas_token is None and 'sasToken' in kwargs: + sas_token = kwargs['sasToken'] + if service_principal is None and 'servicePrincipal' in kwargs: + service_principal = kwargs['servicePrincipal'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + + _setter("container_id", container_id) if account_key is not None: - pulumi.set(__self__, "account_key", account_key) + _setter("account_key", account_key) if local_auth_reference is not None: - pulumi.set(__self__, "local_auth_reference", local_auth_reference) + _setter("local_auth_reference", local_auth_reference) if managed_identity is not None: - pulumi.set(__self__, "managed_identity", managed_identity) + _setter("managed_identity", managed_identity) if sas_token is not None: - pulumi.set(__self__, "sas_token", sas_token) + _setter("sas_token", sas_token) if service_principal is not None: - pulumi.set(__self__, "service_principal", service_principal) + _setter("service_principal", service_principal) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) @property @pulumi.getter(name="containerId") @@ -332,7 +396,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] client_id: Specifies the client ID for authenticating a Managed Identity. """ - pulumi.set(__self__, "client_id", client_id) + FluxConfigurationBlobStorageManagedIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -364,16 +443,53 @@ def __init__(__self__, *, :param pulumi.Input[bool] client_certificate_send_chain: Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the client certificate. :param pulumi.Input[str] client_secret: Specifies the client secret for authenticating a Service Principal. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_id", tenant_id) + FluxConfigurationBlobStorageServicePrincipalArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_id=tenant_id, + client_certificate_base64=client_certificate_base64, + client_certificate_password=client_certificate_password, + client_certificate_send_chain=client_certificate_send_chain, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + client_certificate_base64: Optional[pulumi.Input[str]] = None, + client_certificate_password: Optional[pulumi.Input[str]] = None, + client_certificate_send_chain: Optional[pulumi.Input[bool]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if client_certificate_base64 is None and 'clientCertificateBase64' in kwargs: + client_certificate_base64 = kwargs['clientCertificateBase64'] + if client_certificate_password is None and 'clientCertificatePassword' in kwargs: + client_certificate_password = kwargs['clientCertificatePassword'] + if client_certificate_send_chain is None and 'clientCertificateSendChain' in kwargs: + client_certificate_send_chain = kwargs['clientCertificateSendChain'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + + _setter("client_id", client_id) + _setter("tenant_id", tenant_id) if client_certificate_base64 is not None: - pulumi.set(__self__, "client_certificate_base64", client_certificate_base64) + _setter("client_certificate_base64", client_certificate_base64) if client_certificate_password is not None: - pulumi.set(__self__, "client_certificate_password", client_certificate_password) + _setter("client_certificate_password", client_certificate_password) if client_certificate_send_chain is not None: - pulumi.set(__self__, "client_certificate_send_chain", client_certificate_send_chain) + _setter("client_certificate_send_chain", client_certificate_send_chain) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -469,20 +585,63 @@ def __init__(__self__, *, :param pulumi.Input[int] timeout_in_seconds: Specifies the maximum time to attempt to reconcile the cluster git repository source with the remote. Defaults to `600`. :param pulumi.Input[bool] tls_enabled: Specify whether to communicate with a bucket using TLS is enabled. Defaults to `true`. """ - pulumi.set(__self__, "bucket_name", bucket_name) - pulumi.set(__self__, "url", url) + FluxConfigurationBucketArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bucket_name=bucket_name, + url=url, + access_key=access_key, + local_auth_reference=local_auth_reference, + secret_key_base64=secret_key_base64, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + tls_enabled=tls_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bucket_name: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + access_key: Optional[pulumi.Input[str]] = None, + local_auth_reference: Optional[pulumi.Input[str]] = None, + secret_key_base64: Optional[pulumi.Input[str]] = None, + sync_interval_in_seconds: Optional[pulumi.Input[int]] = None, + timeout_in_seconds: Optional[pulumi.Input[int]] = None, + tls_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bucket_name is None and 'bucketName' in kwargs: + bucket_name = kwargs['bucketName'] + if bucket_name is None: + raise TypeError("Missing 'bucket_name' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if local_auth_reference is None and 'localAuthReference' in kwargs: + local_auth_reference = kwargs['localAuthReference'] + if secret_key_base64 is None and 'secretKeyBase64' in kwargs: + secret_key_base64 = kwargs['secretKeyBase64'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + if tls_enabled is None and 'tlsEnabled' in kwargs: + tls_enabled = kwargs['tlsEnabled'] + + _setter("bucket_name", bucket_name) + _setter("url", url) if access_key is not None: - pulumi.set(__self__, "access_key", access_key) + _setter("access_key", access_key) if local_auth_reference is not None: - pulumi.set(__self__, "local_auth_reference", local_auth_reference) + _setter("local_auth_reference", local_auth_reference) if secret_key_base64 is not None: - pulumi.set(__self__, "secret_key_base64", secret_key_base64) + _setter("secret_key_base64", secret_key_base64) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) if tls_enabled is not None: - pulumi.set(__self__, "tls_enabled", tls_enabled) + _setter("tls_enabled", tls_enabled) @property @pulumi.getter(name="bucketName") @@ -608,25 +767,82 @@ def __init__(__self__, *, :param pulumi.Input[int] sync_interval_in_seconds: Specifies the interval at which to re-reconcile the cluster git repository source with the remote. Defaults to `600`. :param pulumi.Input[int] timeout_in_seconds: Specifies the maximum time to attempt to reconcile the cluster git repository source with the remote. Defaults to `600`. """ - pulumi.set(__self__, "reference_type", reference_type) - pulumi.set(__self__, "reference_value", reference_value) - pulumi.set(__self__, "url", url) + FluxConfigurationGitRepositoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + reference_type=reference_type, + reference_value=reference_value, + url=url, + https_ca_cert_base64=https_ca_cert_base64, + https_key_base64=https_key_base64, + https_user=https_user, + local_auth_reference=local_auth_reference, + ssh_known_hosts_base64=ssh_known_hosts_base64, + ssh_private_key_base64=ssh_private_key_base64, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + reference_type: Optional[pulumi.Input[str]] = None, + reference_value: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + https_ca_cert_base64: Optional[pulumi.Input[str]] = None, + https_key_base64: Optional[pulumi.Input[str]] = None, + https_user: Optional[pulumi.Input[str]] = None, + local_auth_reference: Optional[pulumi.Input[str]] = None, + ssh_known_hosts_base64: Optional[pulumi.Input[str]] = None, + ssh_private_key_base64: Optional[pulumi.Input[str]] = None, + sync_interval_in_seconds: Optional[pulumi.Input[int]] = None, + timeout_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if reference_type is None and 'referenceType' in kwargs: + reference_type = kwargs['referenceType'] + if reference_type is None: + raise TypeError("Missing 'reference_type' argument") + if reference_value is None and 'referenceValue' in kwargs: + reference_value = kwargs['referenceValue'] + if reference_value is None: + raise TypeError("Missing 'reference_value' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if https_ca_cert_base64 is None and 'httpsCaCertBase64' in kwargs: + https_ca_cert_base64 = kwargs['httpsCaCertBase64'] + if https_key_base64 is None and 'httpsKeyBase64' in kwargs: + https_key_base64 = kwargs['httpsKeyBase64'] + if https_user is None and 'httpsUser' in kwargs: + https_user = kwargs['httpsUser'] + if local_auth_reference is None and 'localAuthReference' in kwargs: + local_auth_reference = kwargs['localAuthReference'] + if ssh_known_hosts_base64 is None and 'sshKnownHostsBase64' in kwargs: + ssh_known_hosts_base64 = kwargs['sshKnownHostsBase64'] + if ssh_private_key_base64 is None and 'sshPrivateKeyBase64' in kwargs: + ssh_private_key_base64 = kwargs['sshPrivateKeyBase64'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + + _setter("reference_type", reference_type) + _setter("reference_value", reference_value) + _setter("url", url) if https_ca_cert_base64 is not None: - pulumi.set(__self__, "https_ca_cert_base64", https_ca_cert_base64) + _setter("https_ca_cert_base64", https_ca_cert_base64) if https_key_base64 is not None: - pulumi.set(__self__, "https_key_base64", https_key_base64) + _setter("https_key_base64", https_key_base64) if https_user is not None: - pulumi.set(__self__, "https_user", https_user) + _setter("https_user", https_user) if local_auth_reference is not None: - pulumi.set(__self__, "local_auth_reference", local_auth_reference) + _setter("local_auth_reference", local_auth_reference) if ssh_known_hosts_base64 is not None: - pulumi.set(__self__, "ssh_known_hosts_base64", ssh_known_hosts_base64) + _setter("ssh_known_hosts_base64", ssh_known_hosts_base64) if ssh_private_key_base64 is not None: - pulumi.set(__self__, "ssh_private_key_base64", ssh_private_key_base64) + _setter("ssh_private_key_base64", ssh_private_key_base64) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) @property @pulumi.getter(name="referenceType") @@ -782,21 +998,60 @@ def __init__(__self__, *, :param pulumi.Input[int] sync_interval_in_seconds: The interval at which to re-reconcile the kustomization on the cluster. Defaults to `600`. :param pulumi.Input[int] timeout_in_seconds: The maximum time to attempt to reconcile the kustomization on the cluster. Defaults to `600`. """ - pulumi.set(__self__, "name", name) + FluxConfigurationKustomizationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + depends_ons=depends_ons, + garbage_collection_enabled=garbage_collection_enabled, + path=path, + recreating_enabled=recreating_enabled, + retry_interval_in_seconds=retry_interval_in_seconds, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + depends_ons: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + garbage_collection_enabled: Optional[pulumi.Input[bool]] = None, + path: Optional[pulumi.Input[str]] = None, + recreating_enabled: Optional[pulumi.Input[bool]] = None, + retry_interval_in_seconds: Optional[pulumi.Input[int]] = None, + sync_interval_in_seconds: Optional[pulumi.Input[int]] = None, + timeout_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if depends_ons is None and 'dependsOns' in kwargs: + depends_ons = kwargs['dependsOns'] + if garbage_collection_enabled is None and 'garbageCollectionEnabled' in kwargs: + garbage_collection_enabled = kwargs['garbageCollectionEnabled'] + if recreating_enabled is None and 'recreatingEnabled' in kwargs: + recreating_enabled = kwargs['recreatingEnabled'] + if retry_interval_in_seconds is None and 'retryIntervalInSeconds' in kwargs: + retry_interval_in_seconds = kwargs['retryIntervalInSeconds'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + + _setter("name", name) if depends_ons is not None: - pulumi.set(__self__, "depends_ons", depends_ons) + _setter("depends_ons", depends_ons) if garbage_collection_enabled is not None: - pulumi.set(__self__, "garbage_collection_enabled", garbage_collection_enabled) + _setter("garbage_collection_enabled", garbage_collection_enabled) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if recreating_enabled is not None: - pulumi.set(__self__, "recreating_enabled", recreating_enabled) + _setter("recreating_enabled", recreating_enabled) if retry_interval_in_seconds is not None: - pulumi.set(__self__, "retry_interval_in_seconds", retry_interval_in_seconds) + _setter("retry_interval_in_seconds", retry_interval_in_seconds) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) @property @pulumi.getter @@ -934,34 +1189,97 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['GroupContainerSecurityArgs']]] securities: The definition of the security context for this container as documented in the `security` block below. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['GroupContainerVolumeArgs']]] volumes: The definition of a volume mount for this container as documented in the `volume` block below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cpu", cpu) - pulumi.set(__self__, "image", image) - pulumi.set(__self__, "memory", memory) - pulumi.set(__self__, "name", name) + GroupContainerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + image=image, + memory=memory, + name=name, + commands=commands, + cpu_limit=cpu_limit, + environment_variables=environment_variables, + gpu=gpu, + gpu_limit=gpu_limit, + liveness_probe=liveness_probe, + memory_limit=memory_limit, + ports=ports, + readiness_probe=readiness_probe, + secure_environment_variables=secure_environment_variables, + securities=securities, + volumes=volumes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[pulumi.Input[float]] = None, + image: Optional[pulumi.Input[str]] = None, + memory: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + commands: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cpu_limit: Optional[pulumi.Input[float]] = None, + environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + gpu: Optional[pulumi.Input['GroupContainerGpuArgs']] = None, + gpu_limit: Optional[pulumi.Input['GroupContainerGpuLimitArgs']] = None, + liveness_probe: Optional[pulumi.Input['GroupContainerLivenessProbeArgs']] = None, + memory_limit: Optional[pulumi.Input[float]] = None, + ports: Optional[pulumi.Input[Sequence[pulumi.Input['GroupContainerPortArgs']]]] = None, + readiness_probe: Optional[pulumi.Input['GroupContainerReadinessProbeArgs']] = None, + secure_environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + securities: Optional[pulumi.Input[Sequence[pulumi.Input['GroupContainerSecurityArgs']]]] = None, + volumes: Optional[pulumi.Input[Sequence[pulumi.Input['GroupContainerVolumeArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is None: + raise TypeError("Missing 'cpu' argument") + if image is None: + raise TypeError("Missing 'image' argument") + if memory is None: + raise TypeError("Missing 'memory' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if cpu_limit is None and 'cpuLimit' in kwargs: + cpu_limit = kwargs['cpuLimit'] + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if gpu_limit is None and 'gpuLimit' in kwargs: + gpu_limit = kwargs['gpuLimit'] + if liveness_probe is None and 'livenessProbe' in kwargs: + liveness_probe = kwargs['livenessProbe'] + if memory_limit is None and 'memoryLimit' in kwargs: + memory_limit = kwargs['memoryLimit'] + if readiness_probe is None and 'readinessProbe' in kwargs: + readiness_probe = kwargs['readinessProbe'] + if secure_environment_variables is None and 'secureEnvironmentVariables' in kwargs: + secure_environment_variables = kwargs['secureEnvironmentVariables'] + + _setter("cpu", cpu) + _setter("image", image) + _setter("memory", memory) + _setter("name", name) if commands is not None: - pulumi.set(__self__, "commands", commands) + _setter("commands", commands) if cpu_limit is not None: - pulumi.set(__self__, "cpu_limit", cpu_limit) + _setter("cpu_limit", cpu_limit) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if gpu is not None: - pulumi.set(__self__, "gpu", gpu) + _setter("gpu", gpu) if gpu_limit is not None: - pulumi.set(__self__, "gpu_limit", gpu_limit) + _setter("gpu_limit", gpu_limit) if liveness_probe is not None: - pulumi.set(__self__, "liveness_probe", liveness_probe) + _setter("liveness_probe", liveness_probe) if memory_limit is not None: - pulumi.set(__self__, "memory_limit", memory_limit) + _setter("memory_limit", memory_limit) if ports is not None: - pulumi.set(__self__, "ports", ports) + _setter("ports", ports) if readiness_probe is not None: - pulumi.set(__self__, "readiness_probe", readiness_probe) + _setter("readiness_probe", readiness_probe) if secure_environment_variables is not None: - pulumi.set(__self__, "secure_environment_variables", secure_environment_variables) + _setter("secure_environment_variables", secure_environment_variables) if securities is not None: - pulumi.set(__self__, "securities", securities) + _setter("securities", securities) if volumes is not None: - pulumi.set(__self__, "volumes", volumes) + _setter("volumes", volumes) @property @pulumi.getter @@ -1167,10 +1485,23 @@ def __init__(__self__, *, :param pulumi.Input[int] count: The number of GPUs which should be assigned to this container. Allowed values are `1`, `2`, or `4`. Changing this forces a new resource to be created. :param pulumi.Input[str] sku: The SKU which should be used for the GPU. Possible values are `K80`, `P100`, or `V100`. Changing this forces a new resource to be created. """ + GroupContainerGpuArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + sku=sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + sku: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is not None: - pulumi.set(__self__, "count", count) + _setter("count", count) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) @property @pulumi.getter @@ -1206,10 +1537,23 @@ def __init__(__self__, *, :param pulumi.Input[int] count: The upper limit of the number of GPUs which should be assigned to this container. :param pulumi.Input[str] sku: The allowed SKU which should be used for the GPU. Possible values are `K80`, `P100`, or `V100`. """ + GroupContainerGpuLimitArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + sku=sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + sku: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is not None: - pulumi.set(__self__, "count", count) + _setter("count", count) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) @property @pulumi.getter @@ -1255,20 +1599,55 @@ def __init__(__self__, *, :param pulumi.Input[int] success_threshold: Minimum consecutive successes for the probe to be considered successful after having failed. The default value is `1` and the minimum value is `1`. Changing this forces a new resource to be created. :param pulumi.Input[int] timeout_seconds: Number of seconds after which the probe times out. The default value is `1` and the minimum value is `1`. Changing this forces a new resource to be created. """ + GroupContainerLivenessProbeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + execs=execs, + failure_threshold=failure_threshold, + http_gets=http_gets, + initial_delay_seconds=initial_delay_seconds, + period_seconds=period_seconds, + success_threshold=success_threshold, + timeout_seconds=timeout_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + execs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + failure_threshold: Optional[pulumi.Input[int]] = None, + http_gets: Optional[pulumi.Input[Sequence[pulumi.Input['GroupContainerLivenessProbeHttpGetArgs']]]] = None, + initial_delay_seconds: Optional[pulumi.Input[int]] = None, + period_seconds: Optional[pulumi.Input[int]] = None, + success_threshold: Optional[pulumi.Input[int]] = None, + timeout_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failure_threshold is None and 'failureThreshold' in kwargs: + failure_threshold = kwargs['failureThreshold'] + if http_gets is None and 'httpGets' in kwargs: + http_gets = kwargs['httpGets'] + if initial_delay_seconds is None and 'initialDelaySeconds' in kwargs: + initial_delay_seconds = kwargs['initialDelaySeconds'] + if period_seconds is None and 'periodSeconds' in kwargs: + period_seconds = kwargs['periodSeconds'] + if success_threshold is None and 'successThreshold' in kwargs: + success_threshold = kwargs['successThreshold'] + if timeout_seconds is None and 'timeoutSeconds' in kwargs: + timeout_seconds = kwargs['timeoutSeconds'] + if execs is not None: - pulumi.set(__self__, "execs", execs) + _setter("execs", execs) if failure_threshold is not None: - pulumi.set(__self__, "failure_threshold", failure_threshold) + _setter("failure_threshold", failure_threshold) if http_gets is not None: - pulumi.set(__self__, "http_gets", http_gets) + _setter("http_gets", http_gets) if initial_delay_seconds is not None: - pulumi.set(__self__, "initial_delay_seconds", initial_delay_seconds) + _setter("initial_delay_seconds", initial_delay_seconds) if period_seconds is not None: - pulumi.set(__self__, "period_seconds", period_seconds) + _setter("period_seconds", period_seconds) if success_threshold is not None: - pulumi.set(__self__, "success_threshold", success_threshold) + _setter("success_threshold", success_threshold) if timeout_seconds is not None: - pulumi.set(__self__, "timeout_seconds", timeout_seconds) + _setter("timeout_seconds", timeout_seconds) @property @pulumi.getter @@ -1368,14 +1747,33 @@ def __init__(__self__, *, :param pulumi.Input[int] port: Number of the port to access on the container. Changing this forces a new resource to be created. :param pulumi.Input[str] scheme: Scheme to use for connecting to the host. Possible values are `Http` and `Https`. Changing this forces a new resource to be created. """ + GroupContainerLivenessProbeHttpGetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + http_headers=http_headers, + path=path, + port=port, + scheme=scheme, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + http_headers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + path: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + scheme: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if http_headers is None and 'httpHeaders' in kwargs: + http_headers = kwargs['httpHeaders'] + if http_headers is not None: - pulumi.set(__self__, "http_headers", http_headers) + _setter("http_headers", http_headers) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if scheme is not None: - pulumi.set(__self__, "scheme", scheme) + _setter("scheme", scheme) @property @pulumi.getter(name="httpHeaders") @@ -1437,10 +1835,23 @@ def __init__(__self__, *, > **Note:** Omitting these blocks will default the exposed ports on the group to all ports on all containers defined in the `container` blocks of this group. """ + GroupContainerPortArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + protocol=protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) @property @pulumi.getter @@ -1488,20 +1899,55 @@ def __init__(__self__, *, :param pulumi.Input[int] success_threshold: Minimum consecutive successes for the probe to be considered successful after having failed. The default value is `1` and the minimum value is `1`. Changing this forces a new resource to be created. :param pulumi.Input[int] timeout_seconds: Number of seconds after which the probe times out. The default value is `1` and the minimum value is `1`. Changing this forces a new resource to be created. """ + GroupContainerReadinessProbeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + execs=execs, + failure_threshold=failure_threshold, + http_gets=http_gets, + initial_delay_seconds=initial_delay_seconds, + period_seconds=period_seconds, + success_threshold=success_threshold, + timeout_seconds=timeout_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + execs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + failure_threshold: Optional[pulumi.Input[int]] = None, + http_gets: Optional[pulumi.Input[Sequence[pulumi.Input['GroupContainerReadinessProbeHttpGetArgs']]]] = None, + initial_delay_seconds: Optional[pulumi.Input[int]] = None, + period_seconds: Optional[pulumi.Input[int]] = None, + success_threshold: Optional[pulumi.Input[int]] = None, + timeout_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failure_threshold is None and 'failureThreshold' in kwargs: + failure_threshold = kwargs['failureThreshold'] + if http_gets is None and 'httpGets' in kwargs: + http_gets = kwargs['httpGets'] + if initial_delay_seconds is None and 'initialDelaySeconds' in kwargs: + initial_delay_seconds = kwargs['initialDelaySeconds'] + if period_seconds is None and 'periodSeconds' in kwargs: + period_seconds = kwargs['periodSeconds'] + if success_threshold is None and 'successThreshold' in kwargs: + success_threshold = kwargs['successThreshold'] + if timeout_seconds is None and 'timeoutSeconds' in kwargs: + timeout_seconds = kwargs['timeoutSeconds'] + if execs is not None: - pulumi.set(__self__, "execs", execs) + _setter("execs", execs) if failure_threshold is not None: - pulumi.set(__self__, "failure_threshold", failure_threshold) + _setter("failure_threshold", failure_threshold) if http_gets is not None: - pulumi.set(__self__, "http_gets", http_gets) + _setter("http_gets", http_gets) if initial_delay_seconds is not None: - pulumi.set(__self__, "initial_delay_seconds", initial_delay_seconds) + _setter("initial_delay_seconds", initial_delay_seconds) if period_seconds is not None: - pulumi.set(__self__, "period_seconds", period_seconds) + _setter("period_seconds", period_seconds) if success_threshold is not None: - pulumi.set(__self__, "success_threshold", success_threshold) + _setter("success_threshold", success_threshold) if timeout_seconds is not None: - pulumi.set(__self__, "timeout_seconds", timeout_seconds) + _setter("timeout_seconds", timeout_seconds) @property @pulumi.getter @@ -1601,14 +2047,33 @@ def __init__(__self__, *, :param pulumi.Input[int] port: Number of the port to access on the container. Changing this forces a new resource to be created. :param pulumi.Input[str] scheme: Scheme to use for connecting to the host. Possible values are `Http` and `Https`. Changing this forces a new resource to be created. """ + GroupContainerReadinessProbeHttpGetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + http_headers=http_headers, + path=path, + port=port, + scheme=scheme, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + http_headers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + path: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + scheme: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if http_headers is None and 'httpHeaders' in kwargs: + http_headers = kwargs['httpHeaders'] + if http_headers is not None: - pulumi.set(__self__, "http_headers", http_headers) + _setter("http_headers", http_headers) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if scheme is not None: - pulumi.set(__self__, "scheme", scheme) + _setter("scheme", scheme) @property @pulumi.getter(name="httpHeaders") @@ -1668,7 +2133,22 @@ def __init__(__self__, *, > **NOTE:** Currently, this only applies when the `os_type` is `Linux` and the `sku` is `Confidential`. """ - pulumi.set(__self__, "privilege_enabled", privilege_enabled) + GroupContainerSecurityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + privilege_enabled=privilege_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + privilege_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if privilege_enabled is None and 'privilegeEnabled' in kwargs: + privilege_enabled = kwargs['privilegeEnabled'] + if privilege_enabled is None: + raise TypeError("Missing 'privilege_enabled' argument") + + _setter("privilege_enabled", privilege_enabled) @property @pulumi.getter(name="privilegeEnabled") @@ -1714,22 +2194,67 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_key: The access key for the Azure Storage account specified as above. Changing this forces a new resource to be created. :param pulumi.Input[str] storage_account_name: The Azure storage account from which the volume is to be mounted. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "mount_path", mount_path) - pulumi.set(__self__, "name", name) + GroupContainerVolumeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mount_path=mount_path, + name=name, + empty_dir=empty_dir, + git_repo=git_repo, + read_only=read_only, + secret=secret, + share_name=share_name, + storage_account_key=storage_account_key, + storage_account_name=storage_account_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mount_path: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + empty_dir: Optional[pulumi.Input[bool]] = None, + git_repo: Optional[pulumi.Input['GroupContainerVolumeGitRepoArgs']] = None, + read_only: Optional[pulumi.Input[bool]] = None, + secret: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + share_name: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + if mount_path is None: + raise TypeError("Missing 'mount_path' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if empty_dir is None and 'emptyDir' in kwargs: + empty_dir = kwargs['emptyDir'] + if git_repo is None and 'gitRepo' in kwargs: + git_repo = kwargs['gitRepo'] + if read_only is None and 'readOnly' in kwargs: + read_only = kwargs['readOnly'] + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + + _setter("mount_path", mount_path) + _setter("name", name) if empty_dir is not None: - pulumi.set(__self__, "empty_dir", empty_dir) + _setter("empty_dir", empty_dir) if git_repo is not None: - pulumi.set(__self__, "git_repo", git_repo) + _setter("git_repo", git_repo) if read_only is not None: - pulumi.set(__self__, "read_only", read_only) + _setter("read_only", read_only) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if share_name is not None: - pulumi.set(__self__, "share_name", share_name) + _setter("share_name", share_name) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) @property @pulumi.getter(name="mountPath") @@ -1857,11 +2382,28 @@ def __init__(__self__, *, :param pulumi.Input[str] directory: Specifies the directory into which the repository should be cloned. Changing this forces a new resource to be created. :param pulumi.Input[str] revision: Specifies the commit hash of the revision to be cloned. If unspecified, the HEAD revision is cloned. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "url", url) + GroupContainerVolumeGitRepoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + directory=directory, + revision=revision, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[pulumi.Input[str]] = None, + directory: Optional[pulumi.Input[str]] = None, + revision: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("url", url) if directory is not None: - pulumi.set(__self__, "directory", directory) + _setter("directory", directory) if revision is not None: - pulumi.set(__self__, "revision", revision) + _setter("revision", revision) @property @pulumi.getter @@ -1907,7 +2449,22 @@ def __init__(__self__, *, """ :param pulumi.Input['GroupDiagnosticsLogAnalyticsArgs'] log_analytics: A `log_analytics` block as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "log_analytics", log_analytics) + GroupDiagnosticsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics=log_analytics, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics: Optional[pulumi.Input['GroupDiagnosticsLogAnalyticsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics is None and 'logAnalytics' in kwargs: + log_analytics = kwargs['logAnalytics'] + if log_analytics is None: + raise TypeError("Missing 'log_analytics' argument") + + _setter("log_analytics", log_analytics) @property @pulumi.getter(name="logAnalytics") @@ -1935,12 +2492,39 @@ def __init__(__self__, *, :param pulumi.Input[str] log_type: The log type which should be used. Possible values are `ContainerInsights` and `ContainerInstanceLogs`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] metadata: Any metadata required for Log Analytics. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "workspace_id", workspace_id) - pulumi.set(__self__, "workspace_key", workspace_key) + GroupDiagnosticsLogAnalyticsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + workspace_id=workspace_id, + workspace_key=workspace_key, + log_type=log_type, + metadata=metadata, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + workspace_id: Optional[pulumi.Input[str]] = None, + workspace_key: Optional[pulumi.Input[str]] = None, + log_type: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if workspace_key is None and 'workspaceKey' in kwargs: + workspace_key = kwargs['workspaceKey'] + if workspace_key is None: + raise TypeError("Missing 'workspace_key' argument") + if log_type is None and 'logType' in kwargs: + log_type = kwargs['logType'] + + _setter("workspace_id", workspace_id) + _setter("workspace_key", workspace_key) if log_type is not None: - pulumi.set(__self__, "log_type", log_type) + _setter("log_type", log_type) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) @property @pulumi.getter(name="workspaceId") @@ -2002,11 +2586,30 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] options: A list of [resolver configuration options](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] search_domains: A list of search domains that DNS requests will search along. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "nameservers", nameservers) + GroupDnsConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + nameservers=nameservers, + options=options, + search_domains=search_domains, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + nameservers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + options: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + search_domains: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if nameservers is None: + raise TypeError("Missing 'nameservers' argument") + if search_domains is None and 'searchDomains' in kwargs: + search_domains = kwargs['searchDomains'] + + _setter("nameservers", nameservers) if options is not None: - pulumi.set(__self__, "options", options) + _setter("options", options) if search_domains is not None: - pulumi.set(__self__, "search_domains", search_domains) + _setter("search_domains", search_domains) @property @pulumi.getter @@ -2056,10 +2659,23 @@ def __init__(__self__, *, > **Note:** Removing all `exposed_port` blocks requires setting `exposed_port = []`. """ + GroupExposedPortArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + protocol=protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) @property @pulumi.getter @@ -2107,13 +2723,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + GroupIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -2183,13 +2824,34 @@ def __init__(__self__, *, :param pulumi.Input[str] user_assigned_identity_id: The identity ID for the private registry. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The username with which to connect to the registry. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "server", server) + GroupImageRegistryCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + server=server, + password=password, + user_assigned_identity_id=user_assigned_identity_id, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server is None: + raise TypeError("Missing 'server' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + + _setter("server", server) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -2259,18 +2921,49 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['GroupInitContainerSecurityArgs']]] securities: The definition of the security context for this container as documented in the `security` block below. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['GroupInitContainerVolumeArgs']]] volumes: The definition of a volume mount for this container as documented in the `volume` block below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "image", image) - pulumi.set(__self__, "name", name) + GroupInitContainerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + image=image, + name=name, + commands=commands, + environment_variables=environment_variables, + secure_environment_variables=secure_environment_variables, + securities=securities, + volumes=volumes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + commands: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + secure_environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + securities: Optional[pulumi.Input[Sequence[pulumi.Input['GroupInitContainerSecurityArgs']]]] = None, + volumes: Optional[pulumi.Input[Sequence[pulumi.Input['GroupInitContainerVolumeArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image is None: + raise TypeError("Missing 'image' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if secure_environment_variables is None and 'secureEnvironmentVariables' in kwargs: + secure_environment_variables = kwargs['secureEnvironmentVariables'] + + _setter("image", image) + _setter("name", name) if commands is not None: - pulumi.set(__self__, "commands", commands) + _setter("commands", commands) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if secure_environment_variables is not None: - pulumi.set(__self__, "secure_environment_variables", secure_environment_variables) + _setter("secure_environment_variables", secure_environment_variables) if securities is not None: - pulumi.set(__self__, "securities", securities) + _setter("securities", securities) if volumes is not None: - pulumi.set(__self__, "volumes", volumes) + _setter("volumes", volumes) @property @pulumi.getter @@ -2366,7 +3059,22 @@ def __init__(__self__, *, > **NOTE:** Currently, this only applies when the `os_type` is `Linux` and the `sku` is `Confidential`. """ - pulumi.set(__self__, "privilege_enabled", privilege_enabled) + GroupInitContainerSecurityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + privilege_enabled=privilege_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + privilege_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if privilege_enabled is None and 'privilegeEnabled' in kwargs: + privilege_enabled = kwargs['privilegeEnabled'] + if privilege_enabled is None: + raise TypeError("Missing 'privilege_enabled' argument") + + _setter("privilege_enabled", privilege_enabled) @property @pulumi.getter(name="privilegeEnabled") @@ -2412,22 +3120,67 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_key: The access key for the Azure Storage account specified as above. Changing this forces a new resource to be created. :param pulumi.Input[str] storage_account_name: The Azure storage account from which the volume is to be mounted. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "mount_path", mount_path) - pulumi.set(__self__, "name", name) + GroupInitContainerVolumeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mount_path=mount_path, + name=name, + empty_dir=empty_dir, + git_repo=git_repo, + read_only=read_only, + secret=secret, + share_name=share_name, + storage_account_key=storage_account_key, + storage_account_name=storage_account_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mount_path: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + empty_dir: Optional[pulumi.Input[bool]] = None, + git_repo: Optional[pulumi.Input['GroupInitContainerVolumeGitRepoArgs']] = None, + read_only: Optional[pulumi.Input[bool]] = None, + secret: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + share_name: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + if mount_path is None: + raise TypeError("Missing 'mount_path' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if empty_dir is None and 'emptyDir' in kwargs: + empty_dir = kwargs['emptyDir'] + if git_repo is None and 'gitRepo' in kwargs: + git_repo = kwargs['gitRepo'] + if read_only is None and 'readOnly' in kwargs: + read_only = kwargs['readOnly'] + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + + _setter("mount_path", mount_path) + _setter("name", name) if empty_dir is not None: - pulumi.set(__self__, "empty_dir", empty_dir) + _setter("empty_dir", empty_dir) if git_repo is not None: - pulumi.set(__self__, "git_repo", git_repo) + _setter("git_repo", git_repo) if read_only is not None: - pulumi.set(__self__, "read_only", read_only) + _setter("read_only", read_only) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if share_name is not None: - pulumi.set(__self__, "share_name", share_name) + _setter("share_name", share_name) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) @property @pulumi.getter(name="mountPath") @@ -2555,11 +3308,28 @@ def __init__(__self__, *, :param pulumi.Input[str] directory: Specifies the directory into which the repository should be cloned. Changing this forces a new resource to be created. :param pulumi.Input[str] revision: Specifies the commit hash of the revision to be cloned. If unspecified, the HEAD revision is cloned. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "url", url) + GroupInitContainerVolumeGitRepoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + directory=directory, + revision=revision, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[pulumi.Input[str]] = None, + directory: Optional[pulumi.Input[str]] = None, + revision: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("url", url) if directory is not None: - pulumi.set(__self__, "directory", directory) + _setter("directory", directory) if revision is not None: - pulumi.set(__self__, "revision", revision) + _setter("revision", revision) @property @pulumi.getter @@ -2624,9 +3394,28 @@ def __init__(__self__, *, ``` :param pulumi.Input[Sequence[pulumi.Input['KubernetesClusterAciConnectorLinuxConnectorIdentityArgs']]] connector_identities: A `connector_identity` block is exported. The exported attributes are defined below. """ - pulumi.set(__self__, "subnet_name", subnet_name) + KubernetesClusterAciConnectorLinuxArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_name=subnet_name, + connector_identities=connector_identities, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_name: Optional[pulumi.Input[str]] = None, + connector_identities: Optional[pulumi.Input[Sequence[pulumi.Input['KubernetesClusterAciConnectorLinuxConnectorIdentityArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_name is None and 'subnetName' in kwargs: + subnet_name = kwargs['subnetName'] + if subnet_name is None: + raise TypeError("Missing 'subnet_name' argument") + if connector_identities is None and 'connectorIdentities' in kwargs: + connector_identities = kwargs['connectorIdentities'] + + _setter("subnet_name", subnet_name) if connector_identities is not None: - pulumi.set(__self__, "connector_identities", connector_identities) + _setter("connector_identities", connector_identities) @property @pulumi.getter(name="subnetName") @@ -2683,12 +3472,33 @@ def __init__(__self__, *, > **Note:** When `kubelet_identity` is enabled - The `type` field in the `identity` block must be set to `UserAssigned` and `identity_ids` must be set. """ + KubernetesClusterAciConnectorLinuxConnectorIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -2742,12 +3552,33 @@ def __init__(__self__, *, > **Note:** This requires that the Preview Feature `Microsoft.ContainerService/EnableAPIServerVnetIntegrationPreview` is enabled and the Resource Provider is re-registered, see [the documentation](https://learn.microsoft.com/en-us/azure/aks/api-server-vnet-integration#register-the-enableapiservervnetintegrationpreview-preview-feature) for more information. """ + KubernetesClusterApiServerAccessProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorized_ip_ranges=authorized_ip_ranges, + subnet_id=subnet_id, + vnet_integration_enabled=vnet_integration_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorized_ip_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + vnet_integration_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorized_ip_ranges is None and 'authorizedIpRanges' in kwargs: + authorized_ip_ranges = kwargs['authorizedIpRanges'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if vnet_integration_enabled is None and 'vnetIntegrationEnabled' in kwargs: + vnet_integration_enabled = kwargs['vnetIntegrationEnabled'] + if authorized_ip_ranges is not None: - pulumi.set(__self__, "authorized_ip_ranges", authorized_ip_ranges) + _setter("authorized_ip_ranges", authorized_ip_ranges) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if vnet_integration_enabled is not None: - pulumi.set(__self__, "vnet_integration_enabled", vnet_integration_enabled) + _setter("vnet_integration_enabled", vnet_integration_enabled) @property @pulumi.getter(name="authorizedIpRanges") @@ -2827,40 +3658,115 @@ def __init__(__self__, *, :param pulumi.Input[bool] skip_nodes_with_local_storage: If `true` cluster autoscaler will never delete nodes with pods with local storage, for example, EmptyDir or HostPath. Defaults to `true`. :param pulumi.Input[bool] skip_nodes_with_system_pods: If `true` cluster autoscaler will never delete nodes with pods from kube-system (except for DaemonSet or mirror pods). Defaults to `true`. """ + KubernetesClusterAutoScalerProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + balance_similar_node_groups=balance_similar_node_groups, + empty_bulk_delete_max=empty_bulk_delete_max, + expander=expander, + max_graceful_termination_sec=max_graceful_termination_sec, + max_node_provisioning_time=max_node_provisioning_time, + max_unready_nodes=max_unready_nodes, + max_unready_percentage=max_unready_percentage, + new_pod_scale_up_delay=new_pod_scale_up_delay, + scale_down_delay_after_add=scale_down_delay_after_add, + scale_down_delay_after_delete=scale_down_delay_after_delete, + scale_down_delay_after_failure=scale_down_delay_after_failure, + scale_down_unneeded=scale_down_unneeded, + scale_down_unready=scale_down_unready, + scale_down_utilization_threshold=scale_down_utilization_threshold, + scan_interval=scan_interval, + skip_nodes_with_local_storage=skip_nodes_with_local_storage, + skip_nodes_with_system_pods=skip_nodes_with_system_pods, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + balance_similar_node_groups: Optional[pulumi.Input[bool]] = None, + empty_bulk_delete_max: Optional[pulumi.Input[str]] = None, + expander: Optional[pulumi.Input[str]] = None, + max_graceful_termination_sec: Optional[pulumi.Input[str]] = None, + max_node_provisioning_time: Optional[pulumi.Input[str]] = None, + max_unready_nodes: Optional[pulumi.Input[int]] = None, + max_unready_percentage: Optional[pulumi.Input[float]] = None, + new_pod_scale_up_delay: Optional[pulumi.Input[str]] = None, + scale_down_delay_after_add: Optional[pulumi.Input[str]] = None, + scale_down_delay_after_delete: Optional[pulumi.Input[str]] = None, + scale_down_delay_after_failure: Optional[pulumi.Input[str]] = None, + scale_down_unneeded: Optional[pulumi.Input[str]] = None, + scale_down_unready: Optional[pulumi.Input[str]] = None, + scale_down_utilization_threshold: Optional[pulumi.Input[str]] = None, + scan_interval: Optional[pulumi.Input[str]] = None, + skip_nodes_with_local_storage: Optional[pulumi.Input[bool]] = None, + skip_nodes_with_system_pods: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if balance_similar_node_groups is None and 'balanceSimilarNodeGroups' in kwargs: + balance_similar_node_groups = kwargs['balanceSimilarNodeGroups'] + if empty_bulk_delete_max is None and 'emptyBulkDeleteMax' in kwargs: + empty_bulk_delete_max = kwargs['emptyBulkDeleteMax'] + if max_graceful_termination_sec is None and 'maxGracefulTerminationSec' in kwargs: + max_graceful_termination_sec = kwargs['maxGracefulTerminationSec'] + if max_node_provisioning_time is None and 'maxNodeProvisioningTime' in kwargs: + max_node_provisioning_time = kwargs['maxNodeProvisioningTime'] + if max_unready_nodes is None and 'maxUnreadyNodes' in kwargs: + max_unready_nodes = kwargs['maxUnreadyNodes'] + if max_unready_percentage is None and 'maxUnreadyPercentage' in kwargs: + max_unready_percentage = kwargs['maxUnreadyPercentage'] + if new_pod_scale_up_delay is None and 'newPodScaleUpDelay' in kwargs: + new_pod_scale_up_delay = kwargs['newPodScaleUpDelay'] + if scale_down_delay_after_add is None and 'scaleDownDelayAfterAdd' in kwargs: + scale_down_delay_after_add = kwargs['scaleDownDelayAfterAdd'] + if scale_down_delay_after_delete is None and 'scaleDownDelayAfterDelete' in kwargs: + scale_down_delay_after_delete = kwargs['scaleDownDelayAfterDelete'] + if scale_down_delay_after_failure is None and 'scaleDownDelayAfterFailure' in kwargs: + scale_down_delay_after_failure = kwargs['scaleDownDelayAfterFailure'] + if scale_down_unneeded is None and 'scaleDownUnneeded' in kwargs: + scale_down_unneeded = kwargs['scaleDownUnneeded'] + if scale_down_unready is None and 'scaleDownUnready' in kwargs: + scale_down_unready = kwargs['scaleDownUnready'] + if scale_down_utilization_threshold is None and 'scaleDownUtilizationThreshold' in kwargs: + scale_down_utilization_threshold = kwargs['scaleDownUtilizationThreshold'] + if scan_interval is None and 'scanInterval' in kwargs: + scan_interval = kwargs['scanInterval'] + if skip_nodes_with_local_storage is None and 'skipNodesWithLocalStorage' in kwargs: + skip_nodes_with_local_storage = kwargs['skipNodesWithLocalStorage'] + if skip_nodes_with_system_pods is None and 'skipNodesWithSystemPods' in kwargs: + skip_nodes_with_system_pods = kwargs['skipNodesWithSystemPods'] + if balance_similar_node_groups is not None: - pulumi.set(__self__, "balance_similar_node_groups", balance_similar_node_groups) + _setter("balance_similar_node_groups", balance_similar_node_groups) if empty_bulk_delete_max is not None: - pulumi.set(__self__, "empty_bulk_delete_max", empty_bulk_delete_max) + _setter("empty_bulk_delete_max", empty_bulk_delete_max) if expander is not None: - pulumi.set(__self__, "expander", expander) + _setter("expander", expander) if max_graceful_termination_sec is not None: - pulumi.set(__self__, "max_graceful_termination_sec", max_graceful_termination_sec) + _setter("max_graceful_termination_sec", max_graceful_termination_sec) if max_node_provisioning_time is not None: - pulumi.set(__self__, "max_node_provisioning_time", max_node_provisioning_time) + _setter("max_node_provisioning_time", max_node_provisioning_time) if max_unready_nodes is not None: - pulumi.set(__self__, "max_unready_nodes", max_unready_nodes) + _setter("max_unready_nodes", max_unready_nodes) if max_unready_percentage is not None: - pulumi.set(__self__, "max_unready_percentage", max_unready_percentage) + _setter("max_unready_percentage", max_unready_percentage) if new_pod_scale_up_delay is not None: - pulumi.set(__self__, "new_pod_scale_up_delay", new_pod_scale_up_delay) + _setter("new_pod_scale_up_delay", new_pod_scale_up_delay) if scale_down_delay_after_add is not None: - pulumi.set(__self__, "scale_down_delay_after_add", scale_down_delay_after_add) + _setter("scale_down_delay_after_add", scale_down_delay_after_add) if scale_down_delay_after_delete is not None: - pulumi.set(__self__, "scale_down_delay_after_delete", scale_down_delay_after_delete) + _setter("scale_down_delay_after_delete", scale_down_delay_after_delete) if scale_down_delay_after_failure is not None: - pulumi.set(__self__, "scale_down_delay_after_failure", scale_down_delay_after_failure) + _setter("scale_down_delay_after_failure", scale_down_delay_after_failure) if scale_down_unneeded is not None: - pulumi.set(__self__, "scale_down_unneeded", scale_down_unneeded) + _setter("scale_down_unneeded", scale_down_unneeded) if scale_down_unready is not None: - pulumi.set(__self__, "scale_down_unready", scale_down_unready) + _setter("scale_down_unready", scale_down_unready) if scale_down_utilization_threshold is not None: - pulumi.set(__self__, "scale_down_utilization_threshold", scale_down_utilization_threshold) + _setter("scale_down_utilization_threshold", scale_down_utilization_threshold) if scan_interval is not None: - pulumi.set(__self__, "scan_interval", scan_interval) + _setter("scan_interval", scan_interval) if skip_nodes_with_local_storage is not None: - pulumi.set(__self__, "skip_nodes_with_local_storage", skip_nodes_with_local_storage) + _setter("skip_nodes_with_local_storage", skip_nodes_with_local_storage) if skip_nodes_with_system_pods is not None: - pulumi.set(__self__, "skip_nodes_with_system_pods", skip_nodes_with_system_pods) + _setter("skip_nodes_with_system_pods", skip_nodes_with_system_pods) @property @pulumi.getter(name="balanceSimilarNodeGroups") @@ -3086,20 +3992,55 @@ def __init__(__self__, *, :param pulumi.Input[str] server_app_secret: The Server Secret of an Azure Active Directory Application. :param pulumi.Input[str] tenant_id: The Tenant ID used for Azure Active Directory Application. If this isn't specified the Tenant ID of the current Subscription is used. """ + KubernetesClusterAzureActiveDirectoryRoleBasedAccessControlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_group_object_ids=admin_group_object_ids, + azure_rbac_enabled=azure_rbac_enabled, + client_app_id=client_app_id, + managed=managed, + server_app_id=server_app_id, + server_app_secret=server_app_secret, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_group_object_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + azure_rbac_enabled: Optional[pulumi.Input[bool]] = None, + client_app_id: Optional[pulumi.Input[str]] = None, + managed: Optional[pulumi.Input[bool]] = None, + server_app_id: Optional[pulumi.Input[str]] = None, + server_app_secret: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_group_object_ids is None and 'adminGroupObjectIds' in kwargs: + admin_group_object_ids = kwargs['adminGroupObjectIds'] + if azure_rbac_enabled is None and 'azureRbacEnabled' in kwargs: + azure_rbac_enabled = kwargs['azureRbacEnabled'] + if client_app_id is None and 'clientAppId' in kwargs: + client_app_id = kwargs['clientAppId'] + if server_app_id is None and 'serverAppId' in kwargs: + server_app_id = kwargs['serverAppId'] + if server_app_secret is None and 'serverAppSecret' in kwargs: + server_app_secret = kwargs['serverAppSecret'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if admin_group_object_ids is not None: - pulumi.set(__self__, "admin_group_object_ids", admin_group_object_ids) + _setter("admin_group_object_ids", admin_group_object_ids) if azure_rbac_enabled is not None: - pulumi.set(__self__, "azure_rbac_enabled", azure_rbac_enabled) + _setter("azure_rbac_enabled", azure_rbac_enabled) if client_app_id is not None: - pulumi.set(__self__, "client_app_id", client_app_id) + _setter("client_app_id", client_app_id) if managed is not None: - pulumi.set(__self__, "managed", managed) + _setter("managed", managed) if server_app_id is not None: - pulumi.set(__self__, "server_app_id", server_app_id) + _setter("server_app_id", server_app_id) if server_app_secret is not None: - pulumi.set(__self__, "server_app_secret", server_app_secret) + _setter("server_app_secret", server_app_secret) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="adminGroupObjectIds") @@ -3193,7 +4134,22 @@ def __init__(__self__, *, """ :param pulumi.Input[bool] sgx_quote_helper_enabled: Should the SGX quote helper be enabled? """ - pulumi.set(__self__, "sgx_quote_helper_enabled", sgx_quote_helper_enabled) + KubernetesClusterConfidentialComputingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + sgx_quote_helper_enabled=sgx_quote_helper_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sgx_quote_helper_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sgx_quote_helper_enabled is None and 'sgxQuoteHelperEnabled' in kwargs: + sgx_quote_helper_enabled = kwargs['sgxQuoteHelperEnabled'] + if sgx_quote_helper_enabled is None: + raise TypeError("Missing 'sgx_quote_helper_enabled' argument") + + _setter("sgx_quote_helper_enabled", sgx_quote_helper_enabled) @property @pulumi.getter(name="sgxQuoteHelperEnabled") @@ -3309,80 +4265,237 @@ def __init__(__self__, *, > **Note:** This requires that the `type` is set to `VirtualMachineScaleSets` and that `load_balancer_sku` is set to `standard`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "vm_size", vm_size) + KubernetesClusterDefaultNodePoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + vm_size=vm_size, + capacity_reservation_group_id=capacity_reservation_group_id, + custom_ca_trust_enabled=custom_ca_trust_enabled, + enable_auto_scaling=enable_auto_scaling, + enable_host_encryption=enable_host_encryption, + enable_node_public_ip=enable_node_public_ip, + fips_enabled=fips_enabled, + host_group_id=host_group_id, + kubelet_config=kubelet_config, + kubelet_disk_type=kubelet_disk_type, + linux_os_config=linux_os_config, + max_count=max_count, + max_pods=max_pods, + message_of_the_day=message_of_the_day, + min_count=min_count, + node_count=node_count, + node_labels=node_labels, + node_network_profile=node_network_profile, + node_public_ip_prefix_id=node_public_ip_prefix_id, + node_taints=node_taints, + only_critical_addons_enabled=only_critical_addons_enabled, + orchestrator_version=orchestrator_version, + os_disk_size_gb=os_disk_size_gb, + os_disk_type=os_disk_type, + os_sku=os_sku, + pod_subnet_id=pod_subnet_id, + proximity_placement_group_id=proximity_placement_group_id, + scale_down_mode=scale_down_mode, + snapshot_id=snapshot_id, + tags=tags, + temporary_name_for_rotation=temporary_name_for_rotation, + type=type, + ultra_ssd_enabled=ultra_ssd_enabled, + upgrade_settings=upgrade_settings, + vnet_subnet_id=vnet_subnet_id, + workload_runtime=workload_runtime, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + custom_ca_trust_enabled: Optional[pulumi.Input[bool]] = None, + enable_auto_scaling: Optional[pulumi.Input[bool]] = None, + enable_host_encryption: Optional[pulumi.Input[bool]] = None, + enable_node_public_ip: Optional[pulumi.Input[bool]] = None, + fips_enabled: Optional[pulumi.Input[bool]] = None, + host_group_id: Optional[pulumi.Input[str]] = None, + kubelet_config: Optional[pulumi.Input['KubernetesClusterDefaultNodePoolKubeletConfigArgs']] = None, + kubelet_disk_type: Optional[pulumi.Input[str]] = None, + linux_os_config: Optional[pulumi.Input['KubernetesClusterDefaultNodePoolLinuxOsConfigArgs']] = None, + max_count: Optional[pulumi.Input[int]] = None, + max_pods: Optional[pulumi.Input[int]] = None, + message_of_the_day: Optional[pulumi.Input[str]] = None, + min_count: Optional[pulumi.Input[int]] = None, + node_count: Optional[pulumi.Input[int]] = None, + node_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + node_network_profile: Optional[pulumi.Input['KubernetesClusterDefaultNodePoolNodeNetworkProfileArgs']] = None, + node_public_ip_prefix_id: Optional[pulumi.Input[str]] = None, + node_taints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + only_critical_addons_enabled: Optional[pulumi.Input[bool]] = None, + orchestrator_version: Optional[pulumi.Input[str]] = None, + os_disk_size_gb: Optional[pulumi.Input[int]] = None, + os_disk_type: Optional[pulumi.Input[str]] = None, + os_sku: Optional[pulumi.Input[str]] = None, + pod_subnet_id: Optional[pulumi.Input[str]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + scale_down_mode: Optional[pulumi.Input[str]] = None, + snapshot_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + temporary_name_for_rotation: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + ultra_ssd_enabled: Optional[pulumi.Input[bool]] = None, + upgrade_settings: Optional[pulumi.Input['KubernetesClusterDefaultNodePoolUpgradeSettingsArgs']] = None, + vnet_subnet_id: Optional[pulumi.Input[str]] = None, + workload_runtime: Optional[pulumi.Input[str]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if custom_ca_trust_enabled is None and 'customCaTrustEnabled' in kwargs: + custom_ca_trust_enabled = kwargs['customCaTrustEnabled'] + if enable_auto_scaling is None and 'enableAutoScaling' in kwargs: + enable_auto_scaling = kwargs['enableAutoScaling'] + if enable_host_encryption is None and 'enableHostEncryption' in kwargs: + enable_host_encryption = kwargs['enableHostEncryption'] + if enable_node_public_ip is None and 'enableNodePublicIp' in kwargs: + enable_node_public_ip = kwargs['enableNodePublicIp'] + if fips_enabled is None and 'fipsEnabled' in kwargs: + fips_enabled = kwargs['fipsEnabled'] + if host_group_id is None and 'hostGroupId' in kwargs: + host_group_id = kwargs['hostGroupId'] + if kubelet_config is None and 'kubeletConfig' in kwargs: + kubelet_config = kwargs['kubeletConfig'] + if kubelet_disk_type is None and 'kubeletDiskType' in kwargs: + kubelet_disk_type = kwargs['kubeletDiskType'] + if linux_os_config is None and 'linuxOsConfig' in kwargs: + linux_os_config = kwargs['linuxOsConfig'] + if max_count is None and 'maxCount' in kwargs: + max_count = kwargs['maxCount'] + if max_pods is None and 'maxPods' in kwargs: + max_pods = kwargs['maxPods'] + if message_of_the_day is None and 'messageOfTheDay' in kwargs: + message_of_the_day = kwargs['messageOfTheDay'] + if min_count is None and 'minCount' in kwargs: + min_count = kwargs['minCount'] + if node_count is None and 'nodeCount' in kwargs: + node_count = kwargs['nodeCount'] + if node_labels is None and 'nodeLabels' in kwargs: + node_labels = kwargs['nodeLabels'] + if node_network_profile is None and 'nodeNetworkProfile' in kwargs: + node_network_profile = kwargs['nodeNetworkProfile'] + if node_public_ip_prefix_id is None and 'nodePublicIpPrefixId' in kwargs: + node_public_ip_prefix_id = kwargs['nodePublicIpPrefixId'] + if node_taints is None and 'nodeTaints' in kwargs: + node_taints = kwargs['nodeTaints'] + if only_critical_addons_enabled is None and 'onlyCriticalAddonsEnabled' in kwargs: + only_critical_addons_enabled = kwargs['onlyCriticalAddonsEnabled'] + if orchestrator_version is None and 'orchestratorVersion' in kwargs: + orchestrator_version = kwargs['orchestratorVersion'] + if os_disk_size_gb is None and 'osDiskSizeGb' in kwargs: + os_disk_size_gb = kwargs['osDiskSizeGb'] + if os_disk_type is None and 'osDiskType' in kwargs: + os_disk_type = kwargs['osDiskType'] + if os_sku is None and 'osSku' in kwargs: + os_sku = kwargs['osSku'] + if pod_subnet_id is None and 'podSubnetId' in kwargs: + pod_subnet_id = kwargs['podSubnetId'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if scale_down_mode is None and 'scaleDownMode' in kwargs: + scale_down_mode = kwargs['scaleDownMode'] + if snapshot_id is None and 'snapshotId' in kwargs: + snapshot_id = kwargs['snapshotId'] + if temporary_name_for_rotation is None and 'temporaryNameForRotation' in kwargs: + temporary_name_for_rotation = kwargs['temporaryNameForRotation'] + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if upgrade_settings is None and 'upgradeSettings' in kwargs: + upgrade_settings = kwargs['upgradeSettings'] + if vnet_subnet_id is None and 'vnetSubnetId' in kwargs: + vnet_subnet_id = kwargs['vnetSubnetId'] + if workload_runtime is None and 'workloadRuntime' in kwargs: + workload_runtime = kwargs['workloadRuntime'] + + _setter("name", name) + _setter("vm_size", vm_size) if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if custom_ca_trust_enabled is not None: - pulumi.set(__self__, "custom_ca_trust_enabled", custom_ca_trust_enabled) + _setter("custom_ca_trust_enabled", custom_ca_trust_enabled) if enable_auto_scaling is not None: - pulumi.set(__self__, "enable_auto_scaling", enable_auto_scaling) + _setter("enable_auto_scaling", enable_auto_scaling) if enable_host_encryption is not None: - pulumi.set(__self__, "enable_host_encryption", enable_host_encryption) + _setter("enable_host_encryption", enable_host_encryption) if enable_node_public_ip is not None: - pulumi.set(__self__, "enable_node_public_ip", enable_node_public_ip) + _setter("enable_node_public_ip", enable_node_public_ip) if fips_enabled is not None: - pulumi.set(__self__, "fips_enabled", fips_enabled) + _setter("fips_enabled", fips_enabled) if host_group_id is not None: - pulumi.set(__self__, "host_group_id", host_group_id) + _setter("host_group_id", host_group_id) if kubelet_config is not None: - pulumi.set(__self__, "kubelet_config", kubelet_config) + _setter("kubelet_config", kubelet_config) if kubelet_disk_type is not None: - pulumi.set(__self__, "kubelet_disk_type", kubelet_disk_type) + _setter("kubelet_disk_type", kubelet_disk_type) if linux_os_config is not None: - pulumi.set(__self__, "linux_os_config", linux_os_config) + _setter("linux_os_config", linux_os_config) if max_count is not None: - pulumi.set(__self__, "max_count", max_count) + _setter("max_count", max_count) if max_pods is not None: - pulumi.set(__self__, "max_pods", max_pods) + _setter("max_pods", max_pods) if message_of_the_day is not None: - pulumi.set(__self__, "message_of_the_day", message_of_the_day) + _setter("message_of_the_day", message_of_the_day) if min_count is not None: - pulumi.set(__self__, "min_count", min_count) + _setter("min_count", min_count) if node_count is not None: - pulumi.set(__self__, "node_count", node_count) + _setter("node_count", node_count) if node_labels is not None: - pulumi.set(__self__, "node_labels", node_labels) + _setter("node_labels", node_labels) if node_network_profile is not None: - pulumi.set(__self__, "node_network_profile", node_network_profile) + _setter("node_network_profile", node_network_profile) if node_public_ip_prefix_id is not None: - pulumi.set(__self__, "node_public_ip_prefix_id", node_public_ip_prefix_id) + _setter("node_public_ip_prefix_id", node_public_ip_prefix_id) if node_taints is not None: - pulumi.set(__self__, "node_taints", node_taints) + _setter("node_taints", node_taints) if only_critical_addons_enabled is not None: - pulumi.set(__self__, "only_critical_addons_enabled", only_critical_addons_enabled) + _setter("only_critical_addons_enabled", only_critical_addons_enabled) if orchestrator_version is not None: - pulumi.set(__self__, "orchestrator_version", orchestrator_version) + _setter("orchestrator_version", orchestrator_version) if os_disk_size_gb is not None: - pulumi.set(__self__, "os_disk_size_gb", os_disk_size_gb) + _setter("os_disk_size_gb", os_disk_size_gb) if os_disk_type is not None: - pulumi.set(__self__, "os_disk_type", os_disk_type) + _setter("os_disk_type", os_disk_type) if os_sku is not None: - pulumi.set(__self__, "os_sku", os_sku) + _setter("os_sku", os_sku) if pod_subnet_id is not None: - pulumi.set(__self__, "pod_subnet_id", pod_subnet_id) + _setter("pod_subnet_id", pod_subnet_id) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if scale_down_mode is not None: - pulumi.set(__self__, "scale_down_mode", scale_down_mode) + _setter("scale_down_mode", scale_down_mode) if snapshot_id is not None: - pulumi.set(__self__, "snapshot_id", snapshot_id) + _setter("snapshot_id", snapshot_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if temporary_name_for_rotation is not None: - pulumi.set(__self__, "temporary_name_for_rotation", temporary_name_for_rotation) + _setter("temporary_name_for_rotation", temporary_name_for_rotation) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) if upgrade_settings is not None: - pulumi.set(__self__, "upgrade_settings", upgrade_settings) + _setter("upgrade_settings", upgrade_settings) if vnet_subnet_id is not None: - pulumi.set(__self__, "vnet_subnet_id", vnet_subnet_id) + _setter("vnet_subnet_id", vnet_subnet_id) if workload_runtime is not None: - pulumi.set(__self__, "workload_runtime", workload_runtime) + _setter("workload_runtime", workload_runtime) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -3886,26 +4999,75 @@ def __init__(__self__, *, :param pulumi.Input[int] pod_max_pid: Specifies the maximum number of processes per pod. Changing this forces a new resource to be created. :param pulumi.Input[str] topology_manager_policy: Specifies the Topology Manager policy to use. Possible values are `none`, `best-effort`, `restricted` or `single-numa-node`. Changing this forces a new resource to be created. """ + KubernetesClusterDefaultNodePoolKubeletConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_unsafe_sysctls=allowed_unsafe_sysctls, + container_log_max_line=container_log_max_line, + container_log_max_size_mb=container_log_max_size_mb, + cpu_cfs_quota_enabled=cpu_cfs_quota_enabled, + cpu_cfs_quota_period=cpu_cfs_quota_period, + cpu_manager_policy=cpu_manager_policy, + image_gc_high_threshold=image_gc_high_threshold, + image_gc_low_threshold=image_gc_low_threshold, + pod_max_pid=pod_max_pid, + topology_manager_policy=topology_manager_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_unsafe_sysctls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + container_log_max_line: Optional[pulumi.Input[int]] = None, + container_log_max_size_mb: Optional[pulumi.Input[int]] = None, + cpu_cfs_quota_enabled: Optional[pulumi.Input[bool]] = None, + cpu_cfs_quota_period: Optional[pulumi.Input[str]] = None, + cpu_manager_policy: Optional[pulumi.Input[str]] = None, + image_gc_high_threshold: Optional[pulumi.Input[int]] = None, + image_gc_low_threshold: Optional[pulumi.Input[int]] = None, + pod_max_pid: Optional[pulumi.Input[int]] = None, + topology_manager_policy: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_unsafe_sysctls is None and 'allowedUnsafeSysctls' in kwargs: + allowed_unsafe_sysctls = kwargs['allowedUnsafeSysctls'] + if container_log_max_line is None and 'containerLogMaxLine' in kwargs: + container_log_max_line = kwargs['containerLogMaxLine'] + if container_log_max_size_mb is None and 'containerLogMaxSizeMb' in kwargs: + container_log_max_size_mb = kwargs['containerLogMaxSizeMb'] + if cpu_cfs_quota_enabled is None and 'cpuCfsQuotaEnabled' in kwargs: + cpu_cfs_quota_enabled = kwargs['cpuCfsQuotaEnabled'] + if cpu_cfs_quota_period is None and 'cpuCfsQuotaPeriod' in kwargs: + cpu_cfs_quota_period = kwargs['cpuCfsQuotaPeriod'] + if cpu_manager_policy is None and 'cpuManagerPolicy' in kwargs: + cpu_manager_policy = kwargs['cpuManagerPolicy'] + if image_gc_high_threshold is None and 'imageGcHighThreshold' in kwargs: + image_gc_high_threshold = kwargs['imageGcHighThreshold'] + if image_gc_low_threshold is None and 'imageGcLowThreshold' in kwargs: + image_gc_low_threshold = kwargs['imageGcLowThreshold'] + if pod_max_pid is None and 'podMaxPid' in kwargs: + pod_max_pid = kwargs['podMaxPid'] + if topology_manager_policy is None and 'topologyManagerPolicy' in kwargs: + topology_manager_policy = kwargs['topologyManagerPolicy'] + if allowed_unsafe_sysctls is not None: - pulumi.set(__self__, "allowed_unsafe_sysctls", allowed_unsafe_sysctls) + _setter("allowed_unsafe_sysctls", allowed_unsafe_sysctls) if container_log_max_line is not None: - pulumi.set(__self__, "container_log_max_line", container_log_max_line) + _setter("container_log_max_line", container_log_max_line) if container_log_max_size_mb is not None: - pulumi.set(__self__, "container_log_max_size_mb", container_log_max_size_mb) + _setter("container_log_max_size_mb", container_log_max_size_mb) if cpu_cfs_quota_enabled is not None: - pulumi.set(__self__, "cpu_cfs_quota_enabled", cpu_cfs_quota_enabled) + _setter("cpu_cfs_quota_enabled", cpu_cfs_quota_enabled) if cpu_cfs_quota_period is not None: - pulumi.set(__self__, "cpu_cfs_quota_period", cpu_cfs_quota_period) + _setter("cpu_cfs_quota_period", cpu_cfs_quota_period) if cpu_manager_policy is not None: - pulumi.set(__self__, "cpu_manager_policy", cpu_manager_policy) + _setter("cpu_manager_policy", cpu_manager_policy) if image_gc_high_threshold is not None: - pulumi.set(__self__, "image_gc_high_threshold", image_gc_high_threshold) + _setter("image_gc_high_threshold", image_gc_high_threshold) if image_gc_low_threshold is not None: - pulumi.set(__self__, "image_gc_low_threshold", image_gc_low_threshold) + _setter("image_gc_low_threshold", image_gc_low_threshold) if pod_max_pid is not None: - pulumi.set(__self__, "pod_max_pid", pod_max_pid) + _setter("pod_max_pid", pod_max_pid) if topology_manager_policy is not None: - pulumi.set(__self__, "topology_manager_policy", topology_manager_policy) + _setter("topology_manager_policy", topology_manager_policy) @property @pulumi.getter(name="allowedUnsafeSysctls") @@ -4041,14 +5203,39 @@ def __init__(__self__, *, :param pulumi.Input[str] transparent_huge_page_defrag: specifies the defrag configuration for Transparent Huge Page. Possible values are `always`, `defer`, `defer+madvise`, `madvise` and `never`. Changing this forces a new resource to be created. :param pulumi.Input[str] transparent_huge_page_enabled: Specifies the Transparent Huge Page enabled configuration. Possible values are `always`, `madvise` and `never`. Changing this forces a new resource to be created. """ + KubernetesClusterDefaultNodePoolLinuxOsConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + swap_file_size_mb=swap_file_size_mb, + sysctl_config=sysctl_config, + transparent_huge_page_defrag=transparent_huge_page_defrag, + transparent_huge_page_enabled=transparent_huge_page_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + swap_file_size_mb: Optional[pulumi.Input[int]] = None, + sysctl_config: Optional[pulumi.Input['KubernetesClusterDefaultNodePoolLinuxOsConfigSysctlConfigArgs']] = None, + transparent_huge_page_defrag: Optional[pulumi.Input[str]] = None, + transparent_huge_page_enabled: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if swap_file_size_mb is None and 'swapFileSizeMb' in kwargs: + swap_file_size_mb = kwargs['swapFileSizeMb'] + if sysctl_config is None and 'sysctlConfig' in kwargs: + sysctl_config = kwargs['sysctlConfig'] + if transparent_huge_page_defrag is None and 'transparentHugePageDefrag' in kwargs: + transparent_huge_page_defrag = kwargs['transparentHugePageDefrag'] + if transparent_huge_page_enabled is None and 'transparentHugePageEnabled' in kwargs: + transparent_huge_page_enabled = kwargs['transparentHugePageEnabled'] + if swap_file_size_mb is not None: - pulumi.set(__self__, "swap_file_size_mb", swap_file_size_mb) + _setter("swap_file_size_mb", swap_file_size_mb) if sysctl_config is not None: - pulumi.set(__self__, "sysctl_config", sysctl_config) + _setter("sysctl_config", sysctl_config) if transparent_huge_page_defrag is not None: - pulumi.set(__self__, "transparent_huge_page_defrag", transparent_huge_page_defrag) + _setter("transparent_huge_page_defrag", transparent_huge_page_defrag) if transparent_huge_page_enabled is not None: - pulumi.set(__self__, "transparent_huge_page_enabled", transparent_huge_page_enabled) + _setter("transparent_huge_page_enabled", transparent_huge_page_enabled) @property @pulumi.getter(name="swapFileSizeMb") @@ -4162,64 +5349,189 @@ def __init__(__self__, *, :param pulumi.Input[int] vm_swappiness: The sysctl setting vm.swappiness. Must be between `0` and `100`. Changing this forces a new resource to be created. :param pulumi.Input[int] vm_vfs_cache_pressure: The sysctl setting vm.vfs_cache_pressure. Must be between `0` and `100`. Changing this forces a new resource to be created. """ + KubernetesClusterDefaultNodePoolLinuxOsConfigSysctlConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fs_aio_max_nr=fs_aio_max_nr, + fs_file_max=fs_file_max, + fs_inotify_max_user_watches=fs_inotify_max_user_watches, + fs_nr_open=fs_nr_open, + kernel_threads_max=kernel_threads_max, + net_core_netdev_max_backlog=net_core_netdev_max_backlog, + net_core_optmem_max=net_core_optmem_max, + net_core_rmem_default=net_core_rmem_default, + net_core_rmem_max=net_core_rmem_max, + net_core_somaxconn=net_core_somaxconn, + net_core_wmem_default=net_core_wmem_default, + net_core_wmem_max=net_core_wmem_max, + net_ipv4_ip_local_port_range_max=net_ipv4_ip_local_port_range_max, + net_ipv4_ip_local_port_range_min=net_ipv4_ip_local_port_range_min, + net_ipv4_neigh_default_gc_thresh1=net_ipv4_neigh_default_gc_thresh1, + net_ipv4_neigh_default_gc_thresh2=net_ipv4_neigh_default_gc_thresh2, + net_ipv4_neigh_default_gc_thresh3=net_ipv4_neigh_default_gc_thresh3, + net_ipv4_tcp_fin_timeout=net_ipv4_tcp_fin_timeout, + net_ipv4_tcp_keepalive_intvl=net_ipv4_tcp_keepalive_intvl, + net_ipv4_tcp_keepalive_probes=net_ipv4_tcp_keepalive_probes, + net_ipv4_tcp_keepalive_time=net_ipv4_tcp_keepalive_time, + net_ipv4_tcp_max_syn_backlog=net_ipv4_tcp_max_syn_backlog, + net_ipv4_tcp_max_tw_buckets=net_ipv4_tcp_max_tw_buckets, + net_ipv4_tcp_tw_reuse=net_ipv4_tcp_tw_reuse, + net_netfilter_nf_conntrack_buckets=net_netfilter_nf_conntrack_buckets, + net_netfilter_nf_conntrack_max=net_netfilter_nf_conntrack_max, + vm_max_map_count=vm_max_map_count, + vm_swappiness=vm_swappiness, + vm_vfs_cache_pressure=vm_vfs_cache_pressure, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fs_aio_max_nr: Optional[pulumi.Input[int]] = None, + fs_file_max: Optional[pulumi.Input[int]] = None, + fs_inotify_max_user_watches: Optional[pulumi.Input[int]] = None, + fs_nr_open: Optional[pulumi.Input[int]] = None, + kernel_threads_max: Optional[pulumi.Input[int]] = None, + net_core_netdev_max_backlog: Optional[pulumi.Input[int]] = None, + net_core_optmem_max: Optional[pulumi.Input[int]] = None, + net_core_rmem_default: Optional[pulumi.Input[int]] = None, + net_core_rmem_max: Optional[pulumi.Input[int]] = None, + net_core_somaxconn: Optional[pulumi.Input[int]] = None, + net_core_wmem_default: Optional[pulumi.Input[int]] = None, + net_core_wmem_max: Optional[pulumi.Input[int]] = None, + net_ipv4_ip_local_port_range_max: Optional[pulumi.Input[int]] = None, + net_ipv4_ip_local_port_range_min: Optional[pulumi.Input[int]] = None, + net_ipv4_neigh_default_gc_thresh1: Optional[pulumi.Input[int]] = None, + net_ipv4_neigh_default_gc_thresh2: Optional[pulumi.Input[int]] = None, + net_ipv4_neigh_default_gc_thresh3: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_fin_timeout: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_keepalive_intvl: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_keepalive_probes: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_keepalive_time: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_max_syn_backlog: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_max_tw_buckets: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_tw_reuse: Optional[pulumi.Input[bool]] = None, + net_netfilter_nf_conntrack_buckets: Optional[pulumi.Input[int]] = None, + net_netfilter_nf_conntrack_max: Optional[pulumi.Input[int]] = None, + vm_max_map_count: Optional[pulumi.Input[int]] = None, + vm_swappiness: Optional[pulumi.Input[int]] = None, + vm_vfs_cache_pressure: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fs_aio_max_nr is None and 'fsAioMaxNr' in kwargs: + fs_aio_max_nr = kwargs['fsAioMaxNr'] + if fs_file_max is None and 'fsFileMax' in kwargs: + fs_file_max = kwargs['fsFileMax'] + if fs_inotify_max_user_watches is None and 'fsInotifyMaxUserWatches' in kwargs: + fs_inotify_max_user_watches = kwargs['fsInotifyMaxUserWatches'] + if fs_nr_open is None and 'fsNrOpen' in kwargs: + fs_nr_open = kwargs['fsNrOpen'] + if kernel_threads_max is None and 'kernelThreadsMax' in kwargs: + kernel_threads_max = kwargs['kernelThreadsMax'] + if net_core_netdev_max_backlog is None and 'netCoreNetdevMaxBacklog' in kwargs: + net_core_netdev_max_backlog = kwargs['netCoreNetdevMaxBacklog'] + if net_core_optmem_max is None and 'netCoreOptmemMax' in kwargs: + net_core_optmem_max = kwargs['netCoreOptmemMax'] + if net_core_rmem_default is None and 'netCoreRmemDefault' in kwargs: + net_core_rmem_default = kwargs['netCoreRmemDefault'] + if net_core_rmem_max is None and 'netCoreRmemMax' in kwargs: + net_core_rmem_max = kwargs['netCoreRmemMax'] + if net_core_somaxconn is None and 'netCoreSomaxconn' in kwargs: + net_core_somaxconn = kwargs['netCoreSomaxconn'] + if net_core_wmem_default is None and 'netCoreWmemDefault' in kwargs: + net_core_wmem_default = kwargs['netCoreWmemDefault'] + if net_core_wmem_max is None and 'netCoreWmemMax' in kwargs: + net_core_wmem_max = kwargs['netCoreWmemMax'] + if net_ipv4_ip_local_port_range_max is None and 'netIpv4IpLocalPortRangeMax' in kwargs: + net_ipv4_ip_local_port_range_max = kwargs['netIpv4IpLocalPortRangeMax'] + if net_ipv4_ip_local_port_range_min is None and 'netIpv4IpLocalPortRangeMin' in kwargs: + net_ipv4_ip_local_port_range_min = kwargs['netIpv4IpLocalPortRangeMin'] + if net_ipv4_neigh_default_gc_thresh1 is None and 'netIpv4NeighDefaultGcThresh1' in kwargs: + net_ipv4_neigh_default_gc_thresh1 = kwargs['netIpv4NeighDefaultGcThresh1'] + if net_ipv4_neigh_default_gc_thresh2 is None and 'netIpv4NeighDefaultGcThresh2' in kwargs: + net_ipv4_neigh_default_gc_thresh2 = kwargs['netIpv4NeighDefaultGcThresh2'] + if net_ipv4_neigh_default_gc_thresh3 is None and 'netIpv4NeighDefaultGcThresh3' in kwargs: + net_ipv4_neigh_default_gc_thresh3 = kwargs['netIpv4NeighDefaultGcThresh3'] + if net_ipv4_tcp_fin_timeout is None and 'netIpv4TcpFinTimeout' in kwargs: + net_ipv4_tcp_fin_timeout = kwargs['netIpv4TcpFinTimeout'] + if net_ipv4_tcp_keepalive_intvl is None and 'netIpv4TcpKeepaliveIntvl' in kwargs: + net_ipv4_tcp_keepalive_intvl = kwargs['netIpv4TcpKeepaliveIntvl'] + if net_ipv4_tcp_keepalive_probes is None and 'netIpv4TcpKeepaliveProbes' in kwargs: + net_ipv4_tcp_keepalive_probes = kwargs['netIpv4TcpKeepaliveProbes'] + if net_ipv4_tcp_keepalive_time is None and 'netIpv4TcpKeepaliveTime' in kwargs: + net_ipv4_tcp_keepalive_time = kwargs['netIpv4TcpKeepaliveTime'] + if net_ipv4_tcp_max_syn_backlog is None and 'netIpv4TcpMaxSynBacklog' in kwargs: + net_ipv4_tcp_max_syn_backlog = kwargs['netIpv4TcpMaxSynBacklog'] + if net_ipv4_tcp_max_tw_buckets is None and 'netIpv4TcpMaxTwBuckets' in kwargs: + net_ipv4_tcp_max_tw_buckets = kwargs['netIpv4TcpMaxTwBuckets'] + if net_ipv4_tcp_tw_reuse is None and 'netIpv4TcpTwReuse' in kwargs: + net_ipv4_tcp_tw_reuse = kwargs['netIpv4TcpTwReuse'] + if net_netfilter_nf_conntrack_buckets is None and 'netNetfilterNfConntrackBuckets' in kwargs: + net_netfilter_nf_conntrack_buckets = kwargs['netNetfilterNfConntrackBuckets'] + if net_netfilter_nf_conntrack_max is None and 'netNetfilterNfConntrackMax' in kwargs: + net_netfilter_nf_conntrack_max = kwargs['netNetfilterNfConntrackMax'] + if vm_max_map_count is None and 'vmMaxMapCount' in kwargs: + vm_max_map_count = kwargs['vmMaxMapCount'] + if vm_swappiness is None and 'vmSwappiness' in kwargs: + vm_swappiness = kwargs['vmSwappiness'] + if vm_vfs_cache_pressure is None and 'vmVfsCachePressure' in kwargs: + vm_vfs_cache_pressure = kwargs['vmVfsCachePressure'] + if fs_aio_max_nr is not None: - pulumi.set(__self__, "fs_aio_max_nr", fs_aio_max_nr) + _setter("fs_aio_max_nr", fs_aio_max_nr) if fs_file_max is not None: - pulumi.set(__self__, "fs_file_max", fs_file_max) + _setter("fs_file_max", fs_file_max) if fs_inotify_max_user_watches is not None: - pulumi.set(__self__, "fs_inotify_max_user_watches", fs_inotify_max_user_watches) + _setter("fs_inotify_max_user_watches", fs_inotify_max_user_watches) if fs_nr_open is not None: - pulumi.set(__self__, "fs_nr_open", fs_nr_open) + _setter("fs_nr_open", fs_nr_open) if kernel_threads_max is not None: - pulumi.set(__self__, "kernel_threads_max", kernel_threads_max) + _setter("kernel_threads_max", kernel_threads_max) if net_core_netdev_max_backlog is not None: - pulumi.set(__self__, "net_core_netdev_max_backlog", net_core_netdev_max_backlog) + _setter("net_core_netdev_max_backlog", net_core_netdev_max_backlog) if net_core_optmem_max is not None: - pulumi.set(__self__, "net_core_optmem_max", net_core_optmem_max) + _setter("net_core_optmem_max", net_core_optmem_max) if net_core_rmem_default is not None: - pulumi.set(__self__, "net_core_rmem_default", net_core_rmem_default) + _setter("net_core_rmem_default", net_core_rmem_default) if net_core_rmem_max is not None: - pulumi.set(__self__, "net_core_rmem_max", net_core_rmem_max) + _setter("net_core_rmem_max", net_core_rmem_max) if net_core_somaxconn is not None: - pulumi.set(__self__, "net_core_somaxconn", net_core_somaxconn) + _setter("net_core_somaxconn", net_core_somaxconn) if net_core_wmem_default is not None: - pulumi.set(__self__, "net_core_wmem_default", net_core_wmem_default) + _setter("net_core_wmem_default", net_core_wmem_default) if net_core_wmem_max is not None: - pulumi.set(__self__, "net_core_wmem_max", net_core_wmem_max) + _setter("net_core_wmem_max", net_core_wmem_max) if net_ipv4_ip_local_port_range_max is not None: - pulumi.set(__self__, "net_ipv4_ip_local_port_range_max", net_ipv4_ip_local_port_range_max) + _setter("net_ipv4_ip_local_port_range_max", net_ipv4_ip_local_port_range_max) if net_ipv4_ip_local_port_range_min is not None: - pulumi.set(__self__, "net_ipv4_ip_local_port_range_min", net_ipv4_ip_local_port_range_min) + _setter("net_ipv4_ip_local_port_range_min", net_ipv4_ip_local_port_range_min) if net_ipv4_neigh_default_gc_thresh1 is not None: - pulumi.set(__self__, "net_ipv4_neigh_default_gc_thresh1", net_ipv4_neigh_default_gc_thresh1) + _setter("net_ipv4_neigh_default_gc_thresh1", net_ipv4_neigh_default_gc_thresh1) if net_ipv4_neigh_default_gc_thresh2 is not None: - pulumi.set(__self__, "net_ipv4_neigh_default_gc_thresh2", net_ipv4_neigh_default_gc_thresh2) + _setter("net_ipv4_neigh_default_gc_thresh2", net_ipv4_neigh_default_gc_thresh2) if net_ipv4_neigh_default_gc_thresh3 is not None: - pulumi.set(__self__, "net_ipv4_neigh_default_gc_thresh3", net_ipv4_neigh_default_gc_thresh3) + _setter("net_ipv4_neigh_default_gc_thresh3", net_ipv4_neigh_default_gc_thresh3) if net_ipv4_tcp_fin_timeout is not None: - pulumi.set(__self__, "net_ipv4_tcp_fin_timeout", net_ipv4_tcp_fin_timeout) + _setter("net_ipv4_tcp_fin_timeout", net_ipv4_tcp_fin_timeout) if net_ipv4_tcp_keepalive_intvl is not None: - pulumi.set(__self__, "net_ipv4_tcp_keepalive_intvl", net_ipv4_tcp_keepalive_intvl) + _setter("net_ipv4_tcp_keepalive_intvl", net_ipv4_tcp_keepalive_intvl) if net_ipv4_tcp_keepalive_probes is not None: - pulumi.set(__self__, "net_ipv4_tcp_keepalive_probes", net_ipv4_tcp_keepalive_probes) + _setter("net_ipv4_tcp_keepalive_probes", net_ipv4_tcp_keepalive_probes) if net_ipv4_tcp_keepalive_time is not None: - pulumi.set(__self__, "net_ipv4_tcp_keepalive_time", net_ipv4_tcp_keepalive_time) + _setter("net_ipv4_tcp_keepalive_time", net_ipv4_tcp_keepalive_time) if net_ipv4_tcp_max_syn_backlog is not None: - pulumi.set(__self__, "net_ipv4_tcp_max_syn_backlog", net_ipv4_tcp_max_syn_backlog) + _setter("net_ipv4_tcp_max_syn_backlog", net_ipv4_tcp_max_syn_backlog) if net_ipv4_tcp_max_tw_buckets is not None: - pulumi.set(__self__, "net_ipv4_tcp_max_tw_buckets", net_ipv4_tcp_max_tw_buckets) + _setter("net_ipv4_tcp_max_tw_buckets", net_ipv4_tcp_max_tw_buckets) if net_ipv4_tcp_tw_reuse is not None: - pulumi.set(__self__, "net_ipv4_tcp_tw_reuse", net_ipv4_tcp_tw_reuse) + _setter("net_ipv4_tcp_tw_reuse", net_ipv4_tcp_tw_reuse) if net_netfilter_nf_conntrack_buckets is not None: - pulumi.set(__self__, "net_netfilter_nf_conntrack_buckets", net_netfilter_nf_conntrack_buckets) + _setter("net_netfilter_nf_conntrack_buckets", net_netfilter_nf_conntrack_buckets) if net_netfilter_nf_conntrack_max is not None: - pulumi.set(__self__, "net_netfilter_nf_conntrack_max", net_netfilter_nf_conntrack_max) + _setter("net_netfilter_nf_conntrack_max", net_netfilter_nf_conntrack_max) if vm_max_map_count is not None: - pulumi.set(__self__, "vm_max_map_count", vm_max_map_count) + _setter("vm_max_map_count", vm_max_map_count) if vm_swappiness is not None: - pulumi.set(__self__, "vm_swappiness", vm_swappiness) + _setter("vm_swappiness", vm_swappiness) if vm_vfs_cache_pressure is not None: - pulumi.set(__self__, "vm_vfs_cache_pressure", vm_vfs_cache_pressure) + _setter("vm_vfs_cache_pressure", vm_vfs_cache_pressure) @property @pulumi.getter(name="fsAioMaxNr") @@ -4579,8 +5891,21 @@ def __init__(__self__, *, > **Note:** This requires that the Preview Feature `Microsoft.ContainerService/NodePublicIPTagsPreview` is enabled and the Resource Provider is re-registered, see [the documentation](https://learn.microsoft.com/en-us/azure/aks/use-node-public-ips#use-public-ip-tags-on-node-public-ips-preview) for more information. """ + KubernetesClusterDefaultNodePoolNodeNetworkProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + node_public_ip_tags=node_public_ip_tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + node_public_ip_tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if node_public_ip_tags is None and 'nodePublicIpTags' in kwargs: + node_public_ip_tags = kwargs['nodePublicIpTags'] + if node_public_ip_tags is not None: - pulumi.set(__self__, "node_public_ip_tags", node_public_ip_tags) + _setter("node_public_ip_tags", node_public_ip_tags) @property @pulumi.getter(name="nodePublicIpTags") @@ -4606,7 +5931,22 @@ def __init__(__self__, *, > **Note:** If a percentage is provided, the number of surge nodes is calculated from the `node_count` value on the current cluster. Node surge can allow a cluster to have more nodes than `max_count` during an upgrade. Ensure that your cluster has enough [IP space](https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade) during an upgrade. """ - pulumi.set(__self__, "max_surge", max_surge) + KubernetesClusterDefaultNodePoolUpgradeSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_surge=max_surge, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_surge: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_surge is None and 'maxSurge' in kwargs: + max_surge = kwargs['maxSurge'] + if max_surge is None: + raise TypeError("Missing 'max_surge' argument") + + _setter("max_surge", max_surge) @property @pulumi.getter(name="maxSurge") @@ -4634,12 +5974,31 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The tenant ID of resource. :param pulumi.Input[str] type: The identity type. """ + KubernetesClusterExtensionAksAssignedIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="principalId") @@ -4695,13 +6054,40 @@ def __init__(__self__, *, > **NOTE:** When `plan` is specified, legal terms must be accepted for this item on this subscription before creating the Kubernetes Cluster Extension. The `marketplace.Agreement` resource or AZ CLI tool can be used to do this. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + KubernetesClusterExtensionPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + promotion_code=promotion_code, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + product: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + promotion_code: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if promotion_code is None and 'promotionCode' in kwargs: + promotion_code = kwargs['promotionCode'] + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) if promotion_code is not None: - pulumi.set(__self__, "promotion_code", promotion_code) + _setter("promotion_code", promotion_code) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -4778,14 +6164,39 @@ def __init__(__self__, *, :param pulumi.Input[str] https_proxy: The proxy address to be used when communicating over HTTPS. :param pulumi.Input[str] trusted_ca: The base64 encoded alternative CA certificate content in PEM format. """ + KubernetesClusterHttpProxyConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + http_proxy=http_proxy, + https_proxy=https_proxy, + no_proxies=no_proxies, + trusted_ca=trusted_ca, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + http_proxy: Optional[pulumi.Input[str]] = None, + https_proxy: Optional[pulumi.Input[str]] = None, + no_proxies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + trusted_ca: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if http_proxy is None and 'httpProxy' in kwargs: + http_proxy = kwargs['httpProxy'] + if https_proxy is None and 'httpsProxy' in kwargs: + https_proxy = kwargs['httpsProxy'] + if no_proxies is None and 'noProxies' in kwargs: + no_proxies = kwargs['noProxies'] + if trusted_ca is None and 'trustedCa' in kwargs: + trusted_ca = kwargs['trustedCa'] + if http_proxy is not None: - pulumi.set(__self__, "http_proxy", http_proxy) + _setter("http_proxy", http_proxy) if https_proxy is not None: - pulumi.set(__self__, "https_proxy", https_proxy) + _setter("https_proxy", https_proxy) if no_proxies is not None: - pulumi.set(__self__, "no_proxies", no_proxies) + _setter("no_proxies", no_proxies) if trusted_ca is not None: - pulumi.set(__self__, "trusted_ca", trusted_ca) + _setter("trusted_ca", trusted_ca) @property @pulumi.getter(name="httpProxy") @@ -4848,13 +6259,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID used for Azure Active Directory Application. If this isn't specified the Tenant ID of the current Subscription is used. """ - pulumi.set(__self__, "type", type) + KubernetesClusterIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -4928,18 +6364,51 @@ def __init__(__self__, *, > **Note:** If specifying `ingress_application_gateway` in conjunction with `only_critical_addons_enabled`, the AGIC pod will fail to start. A separate `containerservice.KubernetesClusterNodePool` is required to run the AGIC pod successfully. This is because AGIC is classed as a "non-critical addon". """ + KubernetesClusterIngressApplicationGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + effective_gateway_id=effective_gateway_id, + gateway_id=gateway_id, + gateway_name=gateway_name, + ingress_application_gateway_identities=ingress_application_gateway_identities, + subnet_cidr=subnet_cidr, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + effective_gateway_id: Optional[pulumi.Input[str]] = None, + gateway_id: Optional[pulumi.Input[str]] = None, + gateway_name: Optional[pulumi.Input[str]] = None, + ingress_application_gateway_identities: Optional[pulumi.Input[Sequence[pulumi.Input['KubernetesClusterIngressApplicationGatewayIngressApplicationGatewayIdentityArgs']]]] = None, + subnet_cidr: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if effective_gateway_id is None and 'effectiveGatewayId' in kwargs: + effective_gateway_id = kwargs['effectiveGatewayId'] + if gateway_id is None and 'gatewayId' in kwargs: + gateway_id = kwargs['gatewayId'] + if gateway_name is None and 'gatewayName' in kwargs: + gateway_name = kwargs['gatewayName'] + if ingress_application_gateway_identities is None and 'ingressApplicationGatewayIdentities' in kwargs: + ingress_application_gateway_identities = kwargs['ingressApplicationGatewayIdentities'] + if subnet_cidr is None and 'subnetCidr' in kwargs: + subnet_cidr = kwargs['subnetCidr'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if effective_gateway_id is not None: - pulumi.set(__self__, "effective_gateway_id", effective_gateway_id) + _setter("effective_gateway_id", effective_gateway_id) if gateway_id is not None: - pulumi.set(__self__, "gateway_id", gateway_id) + _setter("gateway_id", gateway_id) if gateway_name is not None: - pulumi.set(__self__, "gateway_name", gateway_name) + _setter("gateway_name", gateway_name) if ingress_application_gateway_identities is not None: - pulumi.set(__self__, "ingress_application_gateway_identities", ingress_application_gateway_identities) + _setter("ingress_application_gateway_identities", ingress_application_gateway_identities) if subnet_cidr is not None: - pulumi.set(__self__, "subnet_cidr", subnet_cidr) + _setter("subnet_cidr", subnet_cidr) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="effectiveGatewayId") @@ -5031,12 +6500,33 @@ def __init__(__self__, *, > **Note:** When `kubelet_identity` is enabled - The `type` field in the `identity` block must be set to `UserAssigned` and `identity_ids` must be set. """ + KubernetesClusterIngressApplicationGatewayIngressApplicationGatewayIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -5086,9 +6576,28 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: Identifier of Azure Key Vault key. See [key identifier format](https://learn.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key identifier. When `enabled` is `false`, leave the field empty. :param pulumi.Input[str] key_vault_network_access: Network access of the key vault Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables private link. The default value is `Public`. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + KubernetesClusterKeyManagementServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + key_vault_network_access=key_vault_network_access, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + key_vault_network_access: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if key_vault_network_access is None and 'keyVaultNetworkAccess' in kwargs: + key_vault_network_access = kwargs['keyVaultNetworkAccess'] + + _setter("key_vault_key_id", key_vault_key_id) if key_vault_network_access is not None: - pulumi.set(__self__, "key_vault_network_access", key_vault_network_access) + _setter("key_vault_network_access", key_vault_network_access) @property @pulumi.getter(name="keyVaultKeyId") @@ -5128,12 +6637,33 @@ def __init__(__self__, *, > **Note:** To enable`key_vault_secrets_provider` either `secret_rotation_enabled` or `secret_rotation_interval` must be specified. """ + KubernetesClusterKeyVaultSecretsProviderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_identities=secret_identities, + secret_rotation_enabled=secret_rotation_enabled, + secret_rotation_interval=secret_rotation_interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_identities: Optional[pulumi.Input[Sequence[pulumi.Input['KubernetesClusterKeyVaultSecretsProviderSecretIdentityArgs']]]] = None, + secret_rotation_enabled: Optional[pulumi.Input[bool]] = None, + secret_rotation_interval: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_identities is None and 'secretIdentities' in kwargs: + secret_identities = kwargs['secretIdentities'] + if secret_rotation_enabled is None and 'secretRotationEnabled' in kwargs: + secret_rotation_enabled = kwargs['secretRotationEnabled'] + if secret_rotation_interval is None and 'secretRotationInterval' in kwargs: + secret_rotation_interval = kwargs['secretRotationInterval'] + if secret_identities is not None: - pulumi.set(__self__, "secret_identities", secret_identities) + _setter("secret_identities", secret_identities) if secret_rotation_enabled is not None: - pulumi.set(__self__, "secret_rotation_enabled", secret_rotation_enabled) + _setter("secret_rotation_enabled", secret_rotation_enabled) if secret_rotation_interval is not None: - pulumi.set(__self__, "secret_rotation_interval", secret_rotation_interval) + _setter("secret_rotation_interval", secret_rotation_interval) @property @pulumi.getter(name="secretIdentities") @@ -5187,12 +6717,33 @@ def __init__(__self__, *, > **Note:** When `kubelet_identity` is enabled - The `type` field in the `identity` block must be set to `UserAssigned` and `identity_ids` must be set. """ + KubernetesClusterKeyVaultSecretsProviderSecretIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -5250,18 +6801,45 @@ def __init__(__self__, *, :param pulumi.Input[str] password: A password or token used to authenticate to the Kubernetes cluster. :param pulumi.Input[str] username: A username used to authenticate to the Kubernetes cluster. """ + KubernetesClusterKubeAdminConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_certificate=client_certificate, + client_key=client_key, + cluster_ca_certificate=cluster_ca_certificate, + host=host, + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_certificate: Optional[pulumi.Input[str]] = None, + client_key: Optional[pulumi.Input[str]] = None, + cluster_ca_certificate: Optional[pulumi.Input[str]] = None, + host: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_certificate is None and 'clientCertificate' in kwargs: + client_certificate = kwargs['clientCertificate'] + if client_key is None and 'clientKey' in kwargs: + client_key = kwargs['clientKey'] + if cluster_ca_certificate is None and 'clusterCaCertificate' in kwargs: + cluster_ca_certificate = kwargs['clusterCaCertificate'] + if client_certificate is not None: - pulumi.set(__self__, "client_certificate", client_certificate) + _setter("client_certificate", client_certificate) if client_key is not None: - pulumi.set(__self__, "client_key", client_key) + _setter("client_key", client_key) if cluster_ca_certificate is not None: - pulumi.set(__self__, "cluster_ca_certificate", cluster_ca_certificate) + _setter("cluster_ca_certificate", cluster_ca_certificate) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="clientCertificate") @@ -5353,18 +6931,45 @@ def __init__(__self__, *, :param pulumi.Input[str] password: A password or token used to authenticate to the Kubernetes cluster. :param pulumi.Input[str] username: A username used to authenticate to the Kubernetes cluster. """ + KubernetesClusterKubeConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_certificate=client_certificate, + client_key=client_key, + cluster_ca_certificate=cluster_ca_certificate, + host=host, + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_certificate: Optional[pulumi.Input[str]] = None, + client_key: Optional[pulumi.Input[str]] = None, + cluster_ca_certificate: Optional[pulumi.Input[str]] = None, + host: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_certificate is None and 'clientCertificate' in kwargs: + client_certificate = kwargs['clientCertificate'] + if client_key is None and 'clientKey' in kwargs: + client_key = kwargs['clientKey'] + if cluster_ca_certificate is None and 'clusterCaCertificate' in kwargs: + cluster_ca_certificate = kwargs['clusterCaCertificate'] + if client_certificate is not None: - pulumi.set(__self__, "client_certificate", client_certificate) + _setter("client_certificate", client_certificate) if client_key is not None: - pulumi.set(__self__, "client_key", client_key) + _setter("client_key", client_key) if cluster_ca_certificate is not None: - pulumi.set(__self__, "cluster_ca_certificate", cluster_ca_certificate) + _setter("cluster_ca_certificate", cluster_ca_certificate) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="clientCertificate") @@ -5452,12 +7057,33 @@ def __init__(__self__, *, > **Note:** When `kubelet_identity` is enabled - The `type` field in the `identity` block must be set to `UserAssigned` and `identity_ids` must be set. """ + KubernetesClusterKubeletIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -5507,8 +7133,29 @@ def __init__(__self__, *, :param pulumi.Input[str] admin_username: The Admin Username for the Cluster. Changing this forces a new resource to be created. :param pulumi.Input['KubernetesClusterLinuxProfileSshKeyArgs'] ssh_key: An `ssh_key` block. Only one is currently allowed. Changing this will update the key on all node pools. More information can be found in [the documentation](https://learn.microsoft.com/en-us/azure/aks/node-access#update-ssh-key-on-an-existing-aks-cluster-preview). """ - pulumi.set(__self__, "admin_username", admin_username) - pulumi.set(__self__, "ssh_key", ssh_key) + KubernetesClusterLinuxProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + ssh_key=ssh_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[pulumi.Input[str]] = None, + ssh_key: Optional[pulumi.Input['KubernetesClusterLinuxProfileSshKeyArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if ssh_key is None and 'sshKey' in kwargs: + ssh_key = kwargs['sshKey'] + if ssh_key is None: + raise TypeError("Missing 'ssh_key' argument") + + _setter("admin_username", admin_username) + _setter("ssh_key", ssh_key) @property @pulumi.getter(name="adminUsername") @@ -5542,7 +7189,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] key_data: The Public SSH Key used to access the cluster. """ - pulumi.set(__self__, "key_data", key_data) + KubernetesClusterLinuxProfileSshKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_data=key_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_data: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_data is None and 'keyData' in kwargs: + key_data = kwargs['keyData'] + if key_data is None: + raise TypeError("Missing 'key_data' argument") + + _setter("key_data", key_data) @property @pulumi.getter(name="keyData") @@ -5566,10 +7228,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['KubernetesClusterMaintenanceWindowAllowedArgs']]] alloweds: One or more `allowed` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['KubernetesClusterMaintenanceWindowNotAllowedArgs']]] not_alloweds: One or more `not_allowed` block as defined below. """ + KubernetesClusterMaintenanceWindowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + alloweds=alloweds, + not_alloweds=not_alloweds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alloweds: Optional[pulumi.Input[Sequence[pulumi.Input['KubernetesClusterMaintenanceWindowAllowedArgs']]]] = None, + not_alloweds: Optional[pulumi.Input[Sequence[pulumi.Input['KubernetesClusterMaintenanceWindowNotAllowedArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_alloweds is None and 'notAlloweds' in kwargs: + not_alloweds = kwargs['notAlloweds'] + if alloweds is not None: - pulumi.set(__self__, "alloweds", alloweds) + _setter("alloweds", alloweds) if not_alloweds is not None: - pulumi.set(__self__, "not_alloweds", not_alloweds) + _setter("not_alloweds", not_alloweds) @property @pulumi.getter @@ -5605,8 +7282,25 @@ def __init__(__self__, *, :param pulumi.Input[str] day: A day in a week. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. :param pulumi.Input[Sequence[pulumi.Input[int]]] hours: An array of hour slots in a day. For example, specifying `1` will allow maintenance from 1:00am to 2:00am. Specifying `1`, `2` will allow maintenance from 1:00am to 3:00m. Possible values are between `0` and `23`. """ - pulumi.set(__self__, "day", day) - pulumi.set(__self__, "hours", hours) + KubernetesClusterMaintenanceWindowAllowedArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + day=day, + hours=hours, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day: Optional[pulumi.Input[str]] = None, + hours: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day is None: + raise TypeError("Missing 'day' argument") + if hours is None: + raise TypeError("Missing 'hours' argument") + + _setter("day", day) + _setter("hours", hours) @property @pulumi.getter @@ -5658,23 +7352,72 @@ def __init__(__self__, *, :param pulumi.Input[str] week_index: The week in the month used for the maintenance run. Options are `First`, `Second`, `Third`, `Fourth`, and `Last`. Required in combination with relative monthly frequency. """ - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "interval", interval) + KubernetesClusterMaintenanceWindowAutoUpgradeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration=duration, + frequency=frequency, + interval=interval, + day_of_month=day_of_month, + day_of_week=day_of_week, + not_alloweds=not_alloweds, + start_date=start_date, + start_time=start_time, + utc_offset=utc_offset, + week_index=week_index, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration: Optional[pulumi.Input[int]] = None, + frequency: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[int]] = None, + day_of_month: Optional[pulumi.Input[int]] = None, + day_of_week: Optional[pulumi.Input[str]] = None, + not_alloweds: Optional[pulumi.Input[Sequence[pulumi.Input['KubernetesClusterMaintenanceWindowAutoUpgradeNotAllowedArgs']]]] = None, + start_date: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + utc_offset: Optional[pulumi.Input[str]] = None, + week_index: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration is None: + raise TypeError("Missing 'duration' argument") + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if day_of_month is None and 'dayOfMonth' in kwargs: + day_of_month = kwargs['dayOfMonth'] + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if not_alloweds is None and 'notAlloweds' in kwargs: + not_alloweds = kwargs['notAlloweds'] + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if utc_offset is None and 'utcOffset' in kwargs: + utc_offset = kwargs['utcOffset'] + if week_index is None and 'weekIndex' in kwargs: + week_index = kwargs['weekIndex'] + + _setter("duration", duration) + _setter("frequency", frequency) + _setter("interval", interval) if day_of_month is not None: - pulumi.set(__self__, "day_of_month", day_of_month) + _setter("day_of_month", day_of_month) if day_of_week is not None: - pulumi.set(__self__, "day_of_week", day_of_week) + _setter("day_of_week", day_of_week) if not_alloweds is not None: - pulumi.set(__self__, "not_alloweds", not_alloweds) + _setter("not_alloweds", not_alloweds) if start_date is not None: - pulumi.set(__self__, "start_date", start_date) + _setter("start_date", start_date) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if utc_offset is not None: - pulumi.set(__self__, "utc_offset", utc_offset) + _setter("utc_offset", utc_offset) if week_index is not None: - pulumi.set(__self__, "week_index", week_index) + _setter("week_index", week_index) @property @pulumi.getter @@ -5804,8 +7547,25 @@ def __init__(__self__, *, :param pulumi.Input[str] end: The end of a time span, formatted as an RFC3339 string. :param pulumi.Input[str] start: The start of a time span, formatted as an RFC3339 string. """ - pulumi.set(__self__, "end", end) - pulumi.set(__self__, "start", start) + KubernetesClusterMaintenanceWindowAutoUpgradeNotAllowedArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end=end, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end: Optional[pulumi.Input[str]] = None, + start: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end is None: + raise TypeError("Missing 'end' argument") + if start is None: + raise TypeError("Missing 'start' argument") + + _setter("end", end) + _setter("start", start) @property @pulumi.getter @@ -5856,23 +7616,72 @@ def __init__(__self__, *, :param pulumi.Input[str] utc_offset: Used to determine the timezone for cluster maintenance. :param pulumi.Input[str] week_index: The week in the month used for the maintenance run. Options are `First`, `Second`, `Third`, `Fourth`, and `Last`. """ - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "interval", interval) + KubernetesClusterMaintenanceWindowNodeOsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration=duration, + frequency=frequency, + interval=interval, + day_of_month=day_of_month, + day_of_week=day_of_week, + not_alloweds=not_alloweds, + start_date=start_date, + start_time=start_time, + utc_offset=utc_offset, + week_index=week_index, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration: Optional[pulumi.Input[int]] = None, + frequency: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[int]] = None, + day_of_month: Optional[pulumi.Input[int]] = None, + day_of_week: Optional[pulumi.Input[str]] = None, + not_alloweds: Optional[pulumi.Input[Sequence[pulumi.Input['KubernetesClusterMaintenanceWindowNodeOsNotAllowedArgs']]]] = None, + start_date: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + utc_offset: Optional[pulumi.Input[str]] = None, + week_index: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration is None: + raise TypeError("Missing 'duration' argument") + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if day_of_month is None and 'dayOfMonth' in kwargs: + day_of_month = kwargs['dayOfMonth'] + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if not_alloweds is None and 'notAlloweds' in kwargs: + not_alloweds = kwargs['notAlloweds'] + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if utc_offset is None and 'utcOffset' in kwargs: + utc_offset = kwargs['utcOffset'] + if week_index is None and 'weekIndex' in kwargs: + week_index = kwargs['weekIndex'] + + _setter("duration", duration) + _setter("frequency", frequency) + _setter("interval", interval) if day_of_month is not None: - pulumi.set(__self__, "day_of_month", day_of_month) + _setter("day_of_month", day_of_month) if day_of_week is not None: - pulumi.set(__self__, "day_of_week", day_of_week) + _setter("day_of_week", day_of_week) if not_alloweds is not None: - pulumi.set(__self__, "not_alloweds", not_alloweds) + _setter("not_alloweds", not_alloweds) if start_date is not None: - pulumi.set(__self__, "start_date", start_date) + _setter("start_date", start_date) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if utc_offset is not None: - pulumi.set(__self__, "utc_offset", utc_offset) + _setter("utc_offset", utc_offset) if week_index is not None: - pulumi.set(__self__, "week_index", week_index) + _setter("week_index", week_index) @property @pulumi.getter @@ -6001,8 +7810,25 @@ def __init__(__self__, *, :param pulumi.Input[str] end: The end of a time span, formatted as an RFC3339 string. :param pulumi.Input[str] start: The start of a time span, formatted as an RFC3339 string. """ - pulumi.set(__self__, "end", end) - pulumi.set(__self__, "start", start) + KubernetesClusterMaintenanceWindowNodeOsNotAllowedArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end=end, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end: Optional[pulumi.Input[str]] = None, + start: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end is None: + raise TypeError("Missing 'end' argument") + if start is None: + raise TypeError("Missing 'start' argument") + + _setter("end", end) + _setter("start", start) @property @pulumi.getter @@ -6038,8 +7864,25 @@ def __init__(__self__, *, :param pulumi.Input[str] end: The end of a time span, formatted as an RFC3339 string. :param pulumi.Input[str] start: The start of a time span, formatted as an RFC3339 string. """ - pulumi.set(__self__, "end", end) - pulumi.set(__self__, "start", start) + KubernetesClusterMaintenanceWindowNotAllowedArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end=end, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end: Optional[pulumi.Input[str]] = None, + start: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end is None: + raise TypeError("Missing 'end' argument") + if start is None: + raise TypeError("Missing 'start' argument") + + _setter("end", end) + _setter("start", start) @property @pulumi.getter @@ -6073,7 +7916,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] log_analytics_workspace_id: Specifies the ID of the Log Analytics Workspace where the audit logs collected by Microsoft Defender should be sent to. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + KubernetesClusterMicrosoftDefenderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -6097,10 +7955,27 @@ def __init__(__self__, *, :param pulumi.Input[str] annotations_allowed: Specifies a comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric. :param pulumi.Input[str] labels_allowed: Specifies a Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric. """ + KubernetesClusterMonitorMetricsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + annotations_allowed=annotations_allowed, + labels_allowed=labels_allowed, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + annotations_allowed: Optional[pulumi.Input[str]] = None, + labels_allowed: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if annotations_allowed is None and 'annotationsAllowed' in kwargs: + annotations_allowed = kwargs['annotationsAllowed'] + if labels_allowed is None and 'labelsAllowed' in kwargs: + labels_allowed = kwargs['labelsAllowed'] + if annotations_allowed is not None: - pulumi.set(__self__, "annotations_allowed", annotations_allowed) + _setter("annotations_allowed", annotations_allowed) if labels_allowed is not None: - pulumi.set(__self__, "labels_allowed", labels_allowed) + _setter("labels_allowed", labels_allowed) @property @pulumi.getter(name="annotationsAllowed") @@ -6190,40 +8065,115 @@ def __init__(__self__, *, > **Note:** This range should not be used by any network element on or connected to this VNet. Service address CIDR must be smaller than /12. `docker_bridge_cidr`, `dns_service_ip` and `service_cidr` should all be empty or all should be set. """ - pulumi.set(__self__, "network_plugin", network_plugin) + KubernetesClusterNetworkProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_plugin=network_plugin, + dns_service_ip=dns_service_ip, + docker_bridge_cidr=docker_bridge_cidr, + ebpf_data_plane=ebpf_data_plane, + ip_versions=ip_versions, + load_balancer_profile=load_balancer_profile, + load_balancer_sku=load_balancer_sku, + nat_gateway_profile=nat_gateway_profile, + network_mode=network_mode, + network_plugin_mode=network_plugin_mode, + network_policy=network_policy, + outbound_type=outbound_type, + pod_cidr=pod_cidr, + pod_cidrs=pod_cidrs, + service_cidr=service_cidr, + service_cidrs=service_cidrs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_plugin: Optional[pulumi.Input[str]] = None, + dns_service_ip: Optional[pulumi.Input[str]] = None, + docker_bridge_cidr: Optional[pulumi.Input[str]] = None, + ebpf_data_plane: Optional[pulumi.Input[str]] = None, + ip_versions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + load_balancer_profile: Optional[pulumi.Input['KubernetesClusterNetworkProfileLoadBalancerProfileArgs']] = None, + load_balancer_sku: Optional[pulumi.Input[str]] = None, + nat_gateway_profile: Optional[pulumi.Input['KubernetesClusterNetworkProfileNatGatewayProfileArgs']] = None, + network_mode: Optional[pulumi.Input[str]] = None, + network_plugin_mode: Optional[pulumi.Input[str]] = None, + network_policy: Optional[pulumi.Input[str]] = None, + outbound_type: Optional[pulumi.Input[str]] = None, + pod_cidr: Optional[pulumi.Input[str]] = None, + pod_cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + service_cidr: Optional[pulumi.Input[str]] = None, + service_cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_plugin is None and 'networkPlugin' in kwargs: + network_plugin = kwargs['networkPlugin'] + if network_plugin is None: + raise TypeError("Missing 'network_plugin' argument") + if dns_service_ip is None and 'dnsServiceIp' in kwargs: + dns_service_ip = kwargs['dnsServiceIp'] + if docker_bridge_cidr is None and 'dockerBridgeCidr' in kwargs: + docker_bridge_cidr = kwargs['dockerBridgeCidr'] + if ebpf_data_plane is None and 'ebpfDataPlane' in kwargs: + ebpf_data_plane = kwargs['ebpfDataPlane'] + if ip_versions is None and 'ipVersions' in kwargs: + ip_versions = kwargs['ipVersions'] + if load_balancer_profile is None and 'loadBalancerProfile' in kwargs: + load_balancer_profile = kwargs['loadBalancerProfile'] + if load_balancer_sku is None and 'loadBalancerSku' in kwargs: + load_balancer_sku = kwargs['loadBalancerSku'] + if nat_gateway_profile is None and 'natGatewayProfile' in kwargs: + nat_gateway_profile = kwargs['natGatewayProfile'] + if network_mode is None and 'networkMode' in kwargs: + network_mode = kwargs['networkMode'] + if network_plugin_mode is None and 'networkPluginMode' in kwargs: + network_plugin_mode = kwargs['networkPluginMode'] + if network_policy is None and 'networkPolicy' in kwargs: + network_policy = kwargs['networkPolicy'] + if outbound_type is None and 'outboundType' in kwargs: + outbound_type = kwargs['outboundType'] + if pod_cidr is None and 'podCidr' in kwargs: + pod_cidr = kwargs['podCidr'] + if pod_cidrs is None and 'podCidrs' in kwargs: + pod_cidrs = kwargs['podCidrs'] + if service_cidr is None and 'serviceCidr' in kwargs: + service_cidr = kwargs['serviceCidr'] + if service_cidrs is None and 'serviceCidrs' in kwargs: + service_cidrs = kwargs['serviceCidrs'] + + _setter("network_plugin", network_plugin) if dns_service_ip is not None: - pulumi.set(__self__, "dns_service_ip", dns_service_ip) + _setter("dns_service_ip", dns_service_ip) if docker_bridge_cidr is not None: warnings.warn("""`docker_bridge_cidr` has been deprecated as the API no longer supports it and will be removed in version 4.0 of the provider.""", DeprecationWarning) pulumi.log.warn("""docker_bridge_cidr is deprecated: `docker_bridge_cidr` has been deprecated as the API no longer supports it and will be removed in version 4.0 of the provider.""") if docker_bridge_cidr is not None: - pulumi.set(__self__, "docker_bridge_cidr", docker_bridge_cidr) + _setter("docker_bridge_cidr", docker_bridge_cidr) if ebpf_data_plane is not None: - pulumi.set(__self__, "ebpf_data_plane", ebpf_data_plane) + _setter("ebpf_data_plane", ebpf_data_plane) if ip_versions is not None: - pulumi.set(__self__, "ip_versions", ip_versions) + _setter("ip_versions", ip_versions) if load_balancer_profile is not None: - pulumi.set(__self__, "load_balancer_profile", load_balancer_profile) + _setter("load_balancer_profile", load_balancer_profile) if load_balancer_sku is not None: - pulumi.set(__self__, "load_balancer_sku", load_balancer_sku) + _setter("load_balancer_sku", load_balancer_sku) if nat_gateway_profile is not None: - pulumi.set(__self__, "nat_gateway_profile", nat_gateway_profile) + _setter("nat_gateway_profile", nat_gateway_profile) if network_mode is not None: - pulumi.set(__self__, "network_mode", network_mode) + _setter("network_mode", network_mode) if network_plugin_mode is not None: - pulumi.set(__self__, "network_plugin_mode", network_plugin_mode) + _setter("network_plugin_mode", network_plugin_mode) if network_policy is not None: - pulumi.set(__self__, "network_policy", network_policy) + _setter("network_policy", network_policy) if outbound_type is not None: - pulumi.set(__self__, "outbound_type", outbound_type) + _setter("outbound_type", outbound_type) if pod_cidr is not None: - pulumi.set(__self__, "pod_cidr", pod_cidr) + _setter("pod_cidr", pod_cidr) if pod_cidrs is not None: - pulumi.set(__self__, "pod_cidrs", pod_cidrs) + _setter("pod_cidrs", pod_cidrs) if service_cidr is not None: - pulumi.set(__self__, "service_cidr", service_cidr) + _setter("service_cidr", service_cidr) if service_cidrs is not None: - pulumi.set(__self__, "service_cidrs", service_cidrs) + _setter("service_cidrs", service_cidrs) @property @pulumi.getter(name="networkPlugin") @@ -6472,20 +8422,57 @@ def __init__(__self__, *, > **Note:** Set `outbound_ip_prefix_ids` to an empty slice `[]` in order to unlink it from the cluster. Unlinking a `outbound_ip_prefix_ids` will revert the load balancing for the cluster back to a managed one. :param pulumi.Input[int] outbound_ports_allocated: Number of desired SNAT port for each VM in the clusters load balancer. Must be between `0` and `64000` inclusive. Defaults to `0`. """ + KubernetesClusterNetworkProfileLoadBalancerProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + effective_outbound_ips=effective_outbound_ips, + idle_timeout_in_minutes=idle_timeout_in_minutes, + managed_outbound_ip_count=managed_outbound_ip_count, + managed_outbound_ipv6_count=managed_outbound_ipv6_count, + outbound_ip_address_ids=outbound_ip_address_ids, + outbound_ip_prefix_ids=outbound_ip_prefix_ids, + outbound_ports_allocated=outbound_ports_allocated, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + effective_outbound_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + managed_outbound_ip_count: Optional[pulumi.Input[int]] = None, + managed_outbound_ipv6_count: Optional[pulumi.Input[int]] = None, + outbound_ip_address_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + outbound_ip_prefix_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + outbound_ports_allocated: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if effective_outbound_ips is None and 'effectiveOutboundIps' in kwargs: + effective_outbound_ips = kwargs['effectiveOutboundIps'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if managed_outbound_ip_count is None and 'managedOutboundIpCount' in kwargs: + managed_outbound_ip_count = kwargs['managedOutboundIpCount'] + if managed_outbound_ipv6_count is None and 'managedOutboundIpv6Count' in kwargs: + managed_outbound_ipv6_count = kwargs['managedOutboundIpv6Count'] + if outbound_ip_address_ids is None and 'outboundIpAddressIds' in kwargs: + outbound_ip_address_ids = kwargs['outboundIpAddressIds'] + if outbound_ip_prefix_ids is None and 'outboundIpPrefixIds' in kwargs: + outbound_ip_prefix_ids = kwargs['outboundIpPrefixIds'] + if outbound_ports_allocated is None and 'outboundPortsAllocated' in kwargs: + outbound_ports_allocated = kwargs['outboundPortsAllocated'] + if effective_outbound_ips is not None: - pulumi.set(__self__, "effective_outbound_ips", effective_outbound_ips) + _setter("effective_outbound_ips", effective_outbound_ips) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if managed_outbound_ip_count is not None: - pulumi.set(__self__, "managed_outbound_ip_count", managed_outbound_ip_count) + _setter("managed_outbound_ip_count", managed_outbound_ip_count) if managed_outbound_ipv6_count is not None: - pulumi.set(__self__, "managed_outbound_ipv6_count", managed_outbound_ipv6_count) + _setter("managed_outbound_ipv6_count", managed_outbound_ipv6_count) if outbound_ip_address_ids is not None: - pulumi.set(__self__, "outbound_ip_address_ids", outbound_ip_address_ids) + _setter("outbound_ip_address_ids", outbound_ip_address_ids) if outbound_ip_prefix_ids is not None: - pulumi.set(__self__, "outbound_ip_prefix_ids", outbound_ip_prefix_ids) + _setter("outbound_ip_prefix_ids", outbound_ip_prefix_ids) if outbound_ports_allocated is not None: - pulumi.set(__self__, "outbound_ports_allocated", outbound_ports_allocated) + _setter("outbound_ports_allocated", outbound_ports_allocated) @property @pulumi.getter(name="effectiveOutboundIps") @@ -6589,12 +8576,33 @@ def __init__(__self__, *, :param pulumi.Input[int] idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes for the cluster load balancer. Must be between `4` and `120` inclusive. Defaults to `4`. :param pulumi.Input[int] managed_outbound_ip_count: Count of desired managed outbound IPs for the cluster load balancer. Must be between `1` and `100` inclusive. """ + KubernetesClusterNetworkProfileNatGatewayProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + effective_outbound_ips=effective_outbound_ips, + idle_timeout_in_minutes=idle_timeout_in_minutes, + managed_outbound_ip_count=managed_outbound_ip_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + effective_outbound_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + managed_outbound_ip_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if effective_outbound_ips is None and 'effectiveOutboundIps' in kwargs: + effective_outbound_ips = kwargs['effectiveOutboundIps'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if managed_outbound_ip_count is None and 'managedOutboundIpCount' in kwargs: + managed_outbound_ip_count = kwargs['managedOutboundIpCount'] + if effective_outbound_ips is not None: - pulumi.set(__self__, "effective_outbound_ips", effective_outbound_ips) + _setter("effective_outbound_ips", effective_outbound_ips) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if managed_outbound_ip_count is not None: - pulumi.set(__self__, "managed_outbound_ip_count", managed_outbound_ip_count) + _setter("managed_outbound_ip_count", managed_outbound_ip_count) @property @pulumi.getter(name="effectiveOutboundIps") @@ -6658,26 +8666,75 @@ def __init__(__self__, *, :param pulumi.Input[int] pod_max_pid: Specifies the maximum number of processes per pod. Changing this forces a new resource to be created. :param pulumi.Input[str] topology_manager_policy: Specifies the Topology Manager policy to use. Possible values are `none`, `best-effort`, `restricted` or `single-numa-node`. Changing this forces a new resource to be created. """ + KubernetesClusterNodePoolKubeletConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_unsafe_sysctls=allowed_unsafe_sysctls, + container_log_max_line=container_log_max_line, + container_log_max_size_mb=container_log_max_size_mb, + cpu_cfs_quota_enabled=cpu_cfs_quota_enabled, + cpu_cfs_quota_period=cpu_cfs_quota_period, + cpu_manager_policy=cpu_manager_policy, + image_gc_high_threshold=image_gc_high_threshold, + image_gc_low_threshold=image_gc_low_threshold, + pod_max_pid=pod_max_pid, + topology_manager_policy=topology_manager_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_unsafe_sysctls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + container_log_max_line: Optional[pulumi.Input[int]] = None, + container_log_max_size_mb: Optional[pulumi.Input[int]] = None, + cpu_cfs_quota_enabled: Optional[pulumi.Input[bool]] = None, + cpu_cfs_quota_period: Optional[pulumi.Input[str]] = None, + cpu_manager_policy: Optional[pulumi.Input[str]] = None, + image_gc_high_threshold: Optional[pulumi.Input[int]] = None, + image_gc_low_threshold: Optional[pulumi.Input[int]] = None, + pod_max_pid: Optional[pulumi.Input[int]] = None, + topology_manager_policy: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_unsafe_sysctls is None and 'allowedUnsafeSysctls' in kwargs: + allowed_unsafe_sysctls = kwargs['allowedUnsafeSysctls'] + if container_log_max_line is None and 'containerLogMaxLine' in kwargs: + container_log_max_line = kwargs['containerLogMaxLine'] + if container_log_max_size_mb is None and 'containerLogMaxSizeMb' in kwargs: + container_log_max_size_mb = kwargs['containerLogMaxSizeMb'] + if cpu_cfs_quota_enabled is None and 'cpuCfsQuotaEnabled' in kwargs: + cpu_cfs_quota_enabled = kwargs['cpuCfsQuotaEnabled'] + if cpu_cfs_quota_period is None and 'cpuCfsQuotaPeriod' in kwargs: + cpu_cfs_quota_period = kwargs['cpuCfsQuotaPeriod'] + if cpu_manager_policy is None and 'cpuManagerPolicy' in kwargs: + cpu_manager_policy = kwargs['cpuManagerPolicy'] + if image_gc_high_threshold is None and 'imageGcHighThreshold' in kwargs: + image_gc_high_threshold = kwargs['imageGcHighThreshold'] + if image_gc_low_threshold is None and 'imageGcLowThreshold' in kwargs: + image_gc_low_threshold = kwargs['imageGcLowThreshold'] + if pod_max_pid is None and 'podMaxPid' in kwargs: + pod_max_pid = kwargs['podMaxPid'] + if topology_manager_policy is None and 'topologyManagerPolicy' in kwargs: + topology_manager_policy = kwargs['topologyManagerPolicy'] + if allowed_unsafe_sysctls is not None: - pulumi.set(__self__, "allowed_unsafe_sysctls", allowed_unsafe_sysctls) + _setter("allowed_unsafe_sysctls", allowed_unsafe_sysctls) if container_log_max_line is not None: - pulumi.set(__self__, "container_log_max_line", container_log_max_line) + _setter("container_log_max_line", container_log_max_line) if container_log_max_size_mb is not None: - pulumi.set(__self__, "container_log_max_size_mb", container_log_max_size_mb) + _setter("container_log_max_size_mb", container_log_max_size_mb) if cpu_cfs_quota_enabled is not None: - pulumi.set(__self__, "cpu_cfs_quota_enabled", cpu_cfs_quota_enabled) + _setter("cpu_cfs_quota_enabled", cpu_cfs_quota_enabled) if cpu_cfs_quota_period is not None: - pulumi.set(__self__, "cpu_cfs_quota_period", cpu_cfs_quota_period) + _setter("cpu_cfs_quota_period", cpu_cfs_quota_period) if cpu_manager_policy is not None: - pulumi.set(__self__, "cpu_manager_policy", cpu_manager_policy) + _setter("cpu_manager_policy", cpu_manager_policy) if image_gc_high_threshold is not None: - pulumi.set(__self__, "image_gc_high_threshold", image_gc_high_threshold) + _setter("image_gc_high_threshold", image_gc_high_threshold) if image_gc_low_threshold is not None: - pulumi.set(__self__, "image_gc_low_threshold", image_gc_low_threshold) + _setter("image_gc_low_threshold", image_gc_low_threshold) if pod_max_pid is not None: - pulumi.set(__self__, "pod_max_pid", pod_max_pid) + _setter("pod_max_pid", pod_max_pid) if topology_manager_policy is not None: - pulumi.set(__self__, "topology_manager_policy", topology_manager_policy) + _setter("topology_manager_policy", topology_manager_policy) @property @pulumi.getter(name="allowedUnsafeSysctls") @@ -6813,14 +8870,39 @@ def __init__(__self__, *, :param pulumi.Input[str] transparent_huge_page_defrag: specifies the defrag configuration for Transparent Huge Page. Possible values are `always`, `defer`, `defer+madvise`, `madvise` and `never`. Changing this forces a new resource to be created. :param pulumi.Input[str] transparent_huge_page_enabled: Specifies the Transparent Huge Page enabled configuration. Possible values are `always`, `madvise` and `never`. Changing this forces a new resource to be created. """ + KubernetesClusterNodePoolLinuxOsConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + swap_file_size_mb=swap_file_size_mb, + sysctl_config=sysctl_config, + transparent_huge_page_defrag=transparent_huge_page_defrag, + transparent_huge_page_enabled=transparent_huge_page_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + swap_file_size_mb: Optional[pulumi.Input[int]] = None, + sysctl_config: Optional[pulumi.Input['KubernetesClusterNodePoolLinuxOsConfigSysctlConfigArgs']] = None, + transparent_huge_page_defrag: Optional[pulumi.Input[str]] = None, + transparent_huge_page_enabled: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if swap_file_size_mb is None and 'swapFileSizeMb' in kwargs: + swap_file_size_mb = kwargs['swapFileSizeMb'] + if sysctl_config is None and 'sysctlConfig' in kwargs: + sysctl_config = kwargs['sysctlConfig'] + if transparent_huge_page_defrag is None and 'transparentHugePageDefrag' in kwargs: + transparent_huge_page_defrag = kwargs['transparentHugePageDefrag'] + if transparent_huge_page_enabled is None and 'transparentHugePageEnabled' in kwargs: + transparent_huge_page_enabled = kwargs['transparentHugePageEnabled'] + if swap_file_size_mb is not None: - pulumi.set(__self__, "swap_file_size_mb", swap_file_size_mb) + _setter("swap_file_size_mb", swap_file_size_mb) if sysctl_config is not None: - pulumi.set(__self__, "sysctl_config", sysctl_config) + _setter("sysctl_config", sysctl_config) if transparent_huge_page_defrag is not None: - pulumi.set(__self__, "transparent_huge_page_defrag", transparent_huge_page_defrag) + _setter("transparent_huge_page_defrag", transparent_huge_page_defrag) if transparent_huge_page_enabled is not None: - pulumi.set(__self__, "transparent_huge_page_enabled", transparent_huge_page_enabled) + _setter("transparent_huge_page_enabled", transparent_huge_page_enabled) @property @pulumi.getter(name="swapFileSizeMb") @@ -6934,64 +9016,189 @@ def __init__(__self__, *, :param pulumi.Input[int] vm_swappiness: The sysctl setting vm.swappiness. Must be between `0` and `100`. Changing this forces a new resource to be created. :param pulumi.Input[int] vm_vfs_cache_pressure: The sysctl setting vm.vfs_cache_pressure. Must be between `0` and `100`. Changing this forces a new resource to be created. """ + KubernetesClusterNodePoolLinuxOsConfigSysctlConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fs_aio_max_nr=fs_aio_max_nr, + fs_file_max=fs_file_max, + fs_inotify_max_user_watches=fs_inotify_max_user_watches, + fs_nr_open=fs_nr_open, + kernel_threads_max=kernel_threads_max, + net_core_netdev_max_backlog=net_core_netdev_max_backlog, + net_core_optmem_max=net_core_optmem_max, + net_core_rmem_default=net_core_rmem_default, + net_core_rmem_max=net_core_rmem_max, + net_core_somaxconn=net_core_somaxconn, + net_core_wmem_default=net_core_wmem_default, + net_core_wmem_max=net_core_wmem_max, + net_ipv4_ip_local_port_range_max=net_ipv4_ip_local_port_range_max, + net_ipv4_ip_local_port_range_min=net_ipv4_ip_local_port_range_min, + net_ipv4_neigh_default_gc_thresh1=net_ipv4_neigh_default_gc_thresh1, + net_ipv4_neigh_default_gc_thresh2=net_ipv4_neigh_default_gc_thresh2, + net_ipv4_neigh_default_gc_thresh3=net_ipv4_neigh_default_gc_thresh3, + net_ipv4_tcp_fin_timeout=net_ipv4_tcp_fin_timeout, + net_ipv4_tcp_keepalive_intvl=net_ipv4_tcp_keepalive_intvl, + net_ipv4_tcp_keepalive_probes=net_ipv4_tcp_keepalive_probes, + net_ipv4_tcp_keepalive_time=net_ipv4_tcp_keepalive_time, + net_ipv4_tcp_max_syn_backlog=net_ipv4_tcp_max_syn_backlog, + net_ipv4_tcp_max_tw_buckets=net_ipv4_tcp_max_tw_buckets, + net_ipv4_tcp_tw_reuse=net_ipv4_tcp_tw_reuse, + net_netfilter_nf_conntrack_buckets=net_netfilter_nf_conntrack_buckets, + net_netfilter_nf_conntrack_max=net_netfilter_nf_conntrack_max, + vm_max_map_count=vm_max_map_count, + vm_swappiness=vm_swappiness, + vm_vfs_cache_pressure=vm_vfs_cache_pressure, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fs_aio_max_nr: Optional[pulumi.Input[int]] = None, + fs_file_max: Optional[pulumi.Input[int]] = None, + fs_inotify_max_user_watches: Optional[pulumi.Input[int]] = None, + fs_nr_open: Optional[pulumi.Input[int]] = None, + kernel_threads_max: Optional[pulumi.Input[int]] = None, + net_core_netdev_max_backlog: Optional[pulumi.Input[int]] = None, + net_core_optmem_max: Optional[pulumi.Input[int]] = None, + net_core_rmem_default: Optional[pulumi.Input[int]] = None, + net_core_rmem_max: Optional[pulumi.Input[int]] = None, + net_core_somaxconn: Optional[pulumi.Input[int]] = None, + net_core_wmem_default: Optional[pulumi.Input[int]] = None, + net_core_wmem_max: Optional[pulumi.Input[int]] = None, + net_ipv4_ip_local_port_range_max: Optional[pulumi.Input[int]] = None, + net_ipv4_ip_local_port_range_min: Optional[pulumi.Input[int]] = None, + net_ipv4_neigh_default_gc_thresh1: Optional[pulumi.Input[int]] = None, + net_ipv4_neigh_default_gc_thresh2: Optional[pulumi.Input[int]] = None, + net_ipv4_neigh_default_gc_thresh3: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_fin_timeout: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_keepalive_intvl: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_keepalive_probes: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_keepalive_time: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_max_syn_backlog: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_max_tw_buckets: Optional[pulumi.Input[int]] = None, + net_ipv4_tcp_tw_reuse: Optional[pulumi.Input[bool]] = None, + net_netfilter_nf_conntrack_buckets: Optional[pulumi.Input[int]] = None, + net_netfilter_nf_conntrack_max: Optional[pulumi.Input[int]] = None, + vm_max_map_count: Optional[pulumi.Input[int]] = None, + vm_swappiness: Optional[pulumi.Input[int]] = None, + vm_vfs_cache_pressure: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fs_aio_max_nr is None and 'fsAioMaxNr' in kwargs: + fs_aio_max_nr = kwargs['fsAioMaxNr'] + if fs_file_max is None and 'fsFileMax' in kwargs: + fs_file_max = kwargs['fsFileMax'] + if fs_inotify_max_user_watches is None and 'fsInotifyMaxUserWatches' in kwargs: + fs_inotify_max_user_watches = kwargs['fsInotifyMaxUserWatches'] + if fs_nr_open is None and 'fsNrOpen' in kwargs: + fs_nr_open = kwargs['fsNrOpen'] + if kernel_threads_max is None and 'kernelThreadsMax' in kwargs: + kernel_threads_max = kwargs['kernelThreadsMax'] + if net_core_netdev_max_backlog is None and 'netCoreNetdevMaxBacklog' in kwargs: + net_core_netdev_max_backlog = kwargs['netCoreNetdevMaxBacklog'] + if net_core_optmem_max is None and 'netCoreOptmemMax' in kwargs: + net_core_optmem_max = kwargs['netCoreOptmemMax'] + if net_core_rmem_default is None and 'netCoreRmemDefault' in kwargs: + net_core_rmem_default = kwargs['netCoreRmemDefault'] + if net_core_rmem_max is None and 'netCoreRmemMax' in kwargs: + net_core_rmem_max = kwargs['netCoreRmemMax'] + if net_core_somaxconn is None and 'netCoreSomaxconn' in kwargs: + net_core_somaxconn = kwargs['netCoreSomaxconn'] + if net_core_wmem_default is None and 'netCoreWmemDefault' in kwargs: + net_core_wmem_default = kwargs['netCoreWmemDefault'] + if net_core_wmem_max is None and 'netCoreWmemMax' in kwargs: + net_core_wmem_max = kwargs['netCoreWmemMax'] + if net_ipv4_ip_local_port_range_max is None and 'netIpv4IpLocalPortRangeMax' in kwargs: + net_ipv4_ip_local_port_range_max = kwargs['netIpv4IpLocalPortRangeMax'] + if net_ipv4_ip_local_port_range_min is None and 'netIpv4IpLocalPortRangeMin' in kwargs: + net_ipv4_ip_local_port_range_min = kwargs['netIpv4IpLocalPortRangeMin'] + if net_ipv4_neigh_default_gc_thresh1 is None and 'netIpv4NeighDefaultGcThresh1' in kwargs: + net_ipv4_neigh_default_gc_thresh1 = kwargs['netIpv4NeighDefaultGcThresh1'] + if net_ipv4_neigh_default_gc_thresh2 is None and 'netIpv4NeighDefaultGcThresh2' in kwargs: + net_ipv4_neigh_default_gc_thresh2 = kwargs['netIpv4NeighDefaultGcThresh2'] + if net_ipv4_neigh_default_gc_thresh3 is None and 'netIpv4NeighDefaultGcThresh3' in kwargs: + net_ipv4_neigh_default_gc_thresh3 = kwargs['netIpv4NeighDefaultGcThresh3'] + if net_ipv4_tcp_fin_timeout is None and 'netIpv4TcpFinTimeout' in kwargs: + net_ipv4_tcp_fin_timeout = kwargs['netIpv4TcpFinTimeout'] + if net_ipv4_tcp_keepalive_intvl is None and 'netIpv4TcpKeepaliveIntvl' in kwargs: + net_ipv4_tcp_keepalive_intvl = kwargs['netIpv4TcpKeepaliveIntvl'] + if net_ipv4_tcp_keepalive_probes is None and 'netIpv4TcpKeepaliveProbes' in kwargs: + net_ipv4_tcp_keepalive_probes = kwargs['netIpv4TcpKeepaliveProbes'] + if net_ipv4_tcp_keepalive_time is None and 'netIpv4TcpKeepaliveTime' in kwargs: + net_ipv4_tcp_keepalive_time = kwargs['netIpv4TcpKeepaliveTime'] + if net_ipv4_tcp_max_syn_backlog is None and 'netIpv4TcpMaxSynBacklog' in kwargs: + net_ipv4_tcp_max_syn_backlog = kwargs['netIpv4TcpMaxSynBacklog'] + if net_ipv4_tcp_max_tw_buckets is None and 'netIpv4TcpMaxTwBuckets' in kwargs: + net_ipv4_tcp_max_tw_buckets = kwargs['netIpv4TcpMaxTwBuckets'] + if net_ipv4_tcp_tw_reuse is None and 'netIpv4TcpTwReuse' in kwargs: + net_ipv4_tcp_tw_reuse = kwargs['netIpv4TcpTwReuse'] + if net_netfilter_nf_conntrack_buckets is None and 'netNetfilterNfConntrackBuckets' in kwargs: + net_netfilter_nf_conntrack_buckets = kwargs['netNetfilterNfConntrackBuckets'] + if net_netfilter_nf_conntrack_max is None and 'netNetfilterNfConntrackMax' in kwargs: + net_netfilter_nf_conntrack_max = kwargs['netNetfilterNfConntrackMax'] + if vm_max_map_count is None and 'vmMaxMapCount' in kwargs: + vm_max_map_count = kwargs['vmMaxMapCount'] + if vm_swappiness is None and 'vmSwappiness' in kwargs: + vm_swappiness = kwargs['vmSwappiness'] + if vm_vfs_cache_pressure is None and 'vmVfsCachePressure' in kwargs: + vm_vfs_cache_pressure = kwargs['vmVfsCachePressure'] + if fs_aio_max_nr is not None: - pulumi.set(__self__, "fs_aio_max_nr", fs_aio_max_nr) + _setter("fs_aio_max_nr", fs_aio_max_nr) if fs_file_max is not None: - pulumi.set(__self__, "fs_file_max", fs_file_max) + _setter("fs_file_max", fs_file_max) if fs_inotify_max_user_watches is not None: - pulumi.set(__self__, "fs_inotify_max_user_watches", fs_inotify_max_user_watches) + _setter("fs_inotify_max_user_watches", fs_inotify_max_user_watches) if fs_nr_open is not None: - pulumi.set(__self__, "fs_nr_open", fs_nr_open) + _setter("fs_nr_open", fs_nr_open) if kernel_threads_max is not None: - pulumi.set(__self__, "kernel_threads_max", kernel_threads_max) + _setter("kernel_threads_max", kernel_threads_max) if net_core_netdev_max_backlog is not None: - pulumi.set(__self__, "net_core_netdev_max_backlog", net_core_netdev_max_backlog) + _setter("net_core_netdev_max_backlog", net_core_netdev_max_backlog) if net_core_optmem_max is not None: - pulumi.set(__self__, "net_core_optmem_max", net_core_optmem_max) + _setter("net_core_optmem_max", net_core_optmem_max) if net_core_rmem_default is not None: - pulumi.set(__self__, "net_core_rmem_default", net_core_rmem_default) + _setter("net_core_rmem_default", net_core_rmem_default) if net_core_rmem_max is not None: - pulumi.set(__self__, "net_core_rmem_max", net_core_rmem_max) + _setter("net_core_rmem_max", net_core_rmem_max) if net_core_somaxconn is not None: - pulumi.set(__self__, "net_core_somaxconn", net_core_somaxconn) + _setter("net_core_somaxconn", net_core_somaxconn) if net_core_wmem_default is not None: - pulumi.set(__self__, "net_core_wmem_default", net_core_wmem_default) + _setter("net_core_wmem_default", net_core_wmem_default) if net_core_wmem_max is not None: - pulumi.set(__self__, "net_core_wmem_max", net_core_wmem_max) + _setter("net_core_wmem_max", net_core_wmem_max) if net_ipv4_ip_local_port_range_max is not None: - pulumi.set(__self__, "net_ipv4_ip_local_port_range_max", net_ipv4_ip_local_port_range_max) + _setter("net_ipv4_ip_local_port_range_max", net_ipv4_ip_local_port_range_max) if net_ipv4_ip_local_port_range_min is not None: - pulumi.set(__self__, "net_ipv4_ip_local_port_range_min", net_ipv4_ip_local_port_range_min) + _setter("net_ipv4_ip_local_port_range_min", net_ipv4_ip_local_port_range_min) if net_ipv4_neigh_default_gc_thresh1 is not None: - pulumi.set(__self__, "net_ipv4_neigh_default_gc_thresh1", net_ipv4_neigh_default_gc_thresh1) + _setter("net_ipv4_neigh_default_gc_thresh1", net_ipv4_neigh_default_gc_thresh1) if net_ipv4_neigh_default_gc_thresh2 is not None: - pulumi.set(__self__, "net_ipv4_neigh_default_gc_thresh2", net_ipv4_neigh_default_gc_thresh2) + _setter("net_ipv4_neigh_default_gc_thresh2", net_ipv4_neigh_default_gc_thresh2) if net_ipv4_neigh_default_gc_thresh3 is not None: - pulumi.set(__self__, "net_ipv4_neigh_default_gc_thresh3", net_ipv4_neigh_default_gc_thresh3) + _setter("net_ipv4_neigh_default_gc_thresh3", net_ipv4_neigh_default_gc_thresh3) if net_ipv4_tcp_fin_timeout is not None: - pulumi.set(__self__, "net_ipv4_tcp_fin_timeout", net_ipv4_tcp_fin_timeout) + _setter("net_ipv4_tcp_fin_timeout", net_ipv4_tcp_fin_timeout) if net_ipv4_tcp_keepalive_intvl is not None: - pulumi.set(__self__, "net_ipv4_tcp_keepalive_intvl", net_ipv4_tcp_keepalive_intvl) + _setter("net_ipv4_tcp_keepalive_intvl", net_ipv4_tcp_keepalive_intvl) if net_ipv4_tcp_keepalive_probes is not None: - pulumi.set(__self__, "net_ipv4_tcp_keepalive_probes", net_ipv4_tcp_keepalive_probes) + _setter("net_ipv4_tcp_keepalive_probes", net_ipv4_tcp_keepalive_probes) if net_ipv4_tcp_keepalive_time is not None: - pulumi.set(__self__, "net_ipv4_tcp_keepalive_time", net_ipv4_tcp_keepalive_time) + _setter("net_ipv4_tcp_keepalive_time", net_ipv4_tcp_keepalive_time) if net_ipv4_tcp_max_syn_backlog is not None: - pulumi.set(__self__, "net_ipv4_tcp_max_syn_backlog", net_ipv4_tcp_max_syn_backlog) + _setter("net_ipv4_tcp_max_syn_backlog", net_ipv4_tcp_max_syn_backlog) if net_ipv4_tcp_max_tw_buckets is not None: - pulumi.set(__self__, "net_ipv4_tcp_max_tw_buckets", net_ipv4_tcp_max_tw_buckets) + _setter("net_ipv4_tcp_max_tw_buckets", net_ipv4_tcp_max_tw_buckets) if net_ipv4_tcp_tw_reuse is not None: - pulumi.set(__self__, "net_ipv4_tcp_tw_reuse", net_ipv4_tcp_tw_reuse) + _setter("net_ipv4_tcp_tw_reuse", net_ipv4_tcp_tw_reuse) if net_netfilter_nf_conntrack_buckets is not None: - pulumi.set(__self__, "net_netfilter_nf_conntrack_buckets", net_netfilter_nf_conntrack_buckets) + _setter("net_netfilter_nf_conntrack_buckets", net_netfilter_nf_conntrack_buckets) if net_netfilter_nf_conntrack_max is not None: - pulumi.set(__self__, "net_netfilter_nf_conntrack_max", net_netfilter_nf_conntrack_max) + _setter("net_netfilter_nf_conntrack_max", net_netfilter_nf_conntrack_max) if vm_max_map_count is not None: - pulumi.set(__self__, "vm_max_map_count", vm_max_map_count) + _setter("vm_max_map_count", vm_max_map_count) if vm_swappiness is not None: - pulumi.set(__self__, "vm_swappiness", vm_swappiness) + _setter("vm_swappiness", vm_swappiness) if vm_vfs_cache_pressure is not None: - pulumi.set(__self__, "vm_vfs_cache_pressure", vm_vfs_cache_pressure) + _setter("vm_vfs_cache_pressure", vm_vfs_cache_pressure) @property @pulumi.getter(name="fsAioMaxNr") @@ -7351,8 +9558,21 @@ def __init__(__self__, *, > **Note:** This requires that the Preview Feature `Microsoft.ContainerService/NodePublicIPTagsPreview` is enabled and the Resource Provider is re-registered, see [the documentation](https://learn.microsoft.com/azure/aks/use-node-public-ips#use-public-ip-tags-on-node-public-ips-preview) for more information. """ + KubernetesClusterNodePoolNodeNetworkProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + node_public_ip_tags=node_public_ip_tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + node_public_ip_tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if node_public_ip_tags is None and 'nodePublicIpTags' in kwargs: + node_public_ip_tags = kwargs['nodePublicIpTags'] + if node_public_ip_tags is not None: - pulumi.set(__self__, "node_public_ip_tags", node_public_ip_tags) + _setter("node_public_ip_tags", node_public_ip_tags) @property @pulumi.getter(name="nodePublicIpTags") @@ -7376,7 +9596,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] max_surge: The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade. """ - pulumi.set(__self__, "max_surge", max_surge) + KubernetesClusterNodePoolUpgradeSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_surge=max_surge, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_surge: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_surge is None and 'maxSurge' in kwargs: + max_surge = kwargs['maxSurge'] + if max_surge is None: + raise TypeError("Missing 'max_surge' argument") + + _setter("max_surge", max_surge) @property @pulumi.getter(name="maxSurge") @@ -7400,8 +9635,21 @@ def __init__(__self__, *, > **Note:** If a percentage is provided, the number of surge nodes is calculated from the current node count on the cluster. Node surge can allow a cluster to have more nodes than `max_count` during an upgrade. Ensure that your cluster has enough [IP space](https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade) during an upgrade. """ + KubernetesClusterNodePoolWindowsProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + outbound_nat_enabled=outbound_nat_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + outbound_nat_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if outbound_nat_enabled is None and 'outboundNatEnabled' in kwargs: + outbound_nat_enabled = kwargs['outboundNatEnabled'] + if outbound_nat_enabled is not None: - pulumi.set(__self__, "outbound_nat_enabled", outbound_nat_enabled) + _setter("outbound_nat_enabled", outbound_nat_enabled) @property @pulumi.getter(name="outboundNatEnabled") @@ -7429,11 +9677,34 @@ def __init__(__self__, *, :param pulumi.Input[bool] msi_auth_for_monitoring_enabled: Is managed identity authentication for monitoring enabled? :param pulumi.Input[Sequence[pulumi.Input['KubernetesClusterOmsAgentOmsAgentIdentityArgs']]] oms_agent_identities: An `oms_agent_identity` block is exported. The exported attributes are defined below. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + KubernetesClusterOmsAgentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + msi_auth_for_monitoring_enabled=msi_auth_for_monitoring_enabled, + oms_agent_identities=oms_agent_identities, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + msi_auth_for_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + oms_agent_identities: Optional[pulumi.Input[Sequence[pulumi.Input['KubernetesClusterOmsAgentOmsAgentIdentityArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if msi_auth_for_monitoring_enabled is None and 'msiAuthForMonitoringEnabled' in kwargs: + msi_auth_for_monitoring_enabled = kwargs['msiAuthForMonitoringEnabled'] + if oms_agent_identities is None and 'omsAgentIdentities' in kwargs: + oms_agent_identities = kwargs['omsAgentIdentities'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if msi_auth_for_monitoring_enabled is not None: - pulumi.set(__self__, "msi_auth_for_monitoring_enabled", msi_auth_for_monitoring_enabled) + _setter("msi_auth_for_monitoring_enabled", msi_auth_for_monitoring_enabled) if oms_agent_identities is not None: - pulumi.set(__self__, "oms_agent_identities", oms_agent_identities) + _setter("oms_agent_identities", oms_agent_identities) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -7485,12 +9756,33 @@ def __init__(__self__, *, > **Note:** When `kubelet_identity` is enabled - The `type` field in the `identity` block must be set to `UserAssigned` and `identity_ids` must be set. """ + KubernetesClusterOmsAgentOmsAgentIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -7546,11 +9838,32 @@ def __init__(__self__, *, > **NOTE:** Currently only one Internal Ingress Gateway and one External Ingress Gateway are allowed per cluster :param pulumi.Input[bool] internal_ingress_gateway_enabled: Is Istio Internal Ingress Gateway enabled? """ - pulumi.set(__self__, "mode", mode) + KubernetesClusterServiceMeshProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + external_ingress_gateway_enabled=external_ingress_gateway_enabled, + internal_ingress_gateway_enabled=internal_ingress_gateway_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + external_ingress_gateway_enabled: Optional[pulumi.Input[bool]] = None, + internal_ingress_gateway_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if external_ingress_gateway_enabled is None and 'externalIngressGatewayEnabled' in kwargs: + external_ingress_gateway_enabled = kwargs['externalIngressGatewayEnabled'] + if internal_ingress_gateway_enabled is None and 'internalIngressGatewayEnabled' in kwargs: + internal_ingress_gateway_enabled = kwargs['internalIngressGatewayEnabled'] + + _setter("mode", mode) if external_ingress_gateway_enabled is not None: - pulumi.set(__self__, "external_ingress_gateway_enabled", external_ingress_gateway_enabled) + _setter("external_ingress_gateway_enabled", external_ingress_gateway_enabled) if internal_ingress_gateway_enabled is not None: - pulumi.set(__self__, "internal_ingress_gateway_enabled", internal_ingress_gateway_enabled) + _setter("internal_ingress_gateway_enabled", internal_ingress_gateway_enabled) @property @pulumi.getter @@ -7602,8 +9915,29 @@ def __init__(__self__, *, :param pulumi.Input[str] client_id: The Client ID for the Service Principal. :param pulumi.Input[str] client_secret: The Client Secret for the Service Principal. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + KubernetesClusterServicePrincipalArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -7647,16 +9981,45 @@ def __init__(__self__, *, :param pulumi.Input[bool] file_driver_enabled: Is the File CSI driver enabled? Defaults to `true`. :param pulumi.Input[bool] snapshot_controller_enabled: Is the Snapshot Controller enabled? Defaults to `true`. """ + KubernetesClusterStorageProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_driver_enabled=blob_driver_enabled, + disk_driver_enabled=disk_driver_enabled, + disk_driver_version=disk_driver_version, + file_driver_enabled=file_driver_enabled, + snapshot_controller_enabled=snapshot_controller_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_driver_enabled: Optional[pulumi.Input[bool]] = None, + disk_driver_enabled: Optional[pulumi.Input[bool]] = None, + disk_driver_version: Optional[pulumi.Input[str]] = None, + file_driver_enabled: Optional[pulumi.Input[bool]] = None, + snapshot_controller_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_driver_enabled is None and 'blobDriverEnabled' in kwargs: + blob_driver_enabled = kwargs['blobDriverEnabled'] + if disk_driver_enabled is None and 'diskDriverEnabled' in kwargs: + disk_driver_enabled = kwargs['diskDriverEnabled'] + if disk_driver_version is None and 'diskDriverVersion' in kwargs: + disk_driver_version = kwargs['diskDriverVersion'] + if file_driver_enabled is None and 'fileDriverEnabled' in kwargs: + file_driver_enabled = kwargs['fileDriverEnabled'] + if snapshot_controller_enabled is None and 'snapshotControllerEnabled' in kwargs: + snapshot_controller_enabled = kwargs['snapshotControllerEnabled'] + if blob_driver_enabled is not None: - pulumi.set(__self__, "blob_driver_enabled", blob_driver_enabled) + _setter("blob_driver_enabled", blob_driver_enabled) if disk_driver_enabled is not None: - pulumi.set(__self__, "disk_driver_enabled", disk_driver_enabled) + _setter("disk_driver_enabled", disk_driver_enabled) if disk_driver_version is not None: - pulumi.set(__self__, "disk_driver_version", disk_driver_version) + _setter("disk_driver_version", disk_driver_version) if file_driver_enabled is not None: - pulumi.set(__self__, "file_driver_enabled", file_driver_enabled) + _setter("file_driver_enabled", file_driver_enabled) if snapshot_controller_enabled is not None: - pulumi.set(__self__, "snapshot_controller_enabled", snapshot_controller_enabled) + _setter("snapshot_controller_enabled", snapshot_controller_enabled) @property @pulumi.getter(name="blobDriverEnabled") @@ -7730,9 +10093,28 @@ def __init__(__self__, *, :param pulumi.Input[str] dns_zone_id: Specifies the ID of the DNS Zone in which DNS entries are created for applications deployed to the cluster when Web App Routing is enabled. For Bring-Your-Own DNS zones this property should be set to an empty string `""`. :param pulumi.Input[Sequence[pulumi.Input['KubernetesClusterWebAppRoutingWebAppRoutingIdentityArgs']]] web_app_routing_identities: A `web_app_routing_identity` block is exported. The exported attributes are defined below. """ - pulumi.set(__self__, "dns_zone_id", dns_zone_id) + KubernetesClusterWebAppRoutingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_zone_id=dns_zone_id, + web_app_routing_identities=web_app_routing_identities, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_zone_id: Optional[pulumi.Input[str]] = None, + web_app_routing_identities: Optional[pulumi.Input[Sequence[pulumi.Input['KubernetesClusterWebAppRoutingWebAppRoutingIdentityArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_zone_id is None and 'dnsZoneId' in kwargs: + dns_zone_id = kwargs['dnsZoneId'] + if dns_zone_id is None: + raise TypeError("Missing 'dns_zone_id' argument") + if web_app_routing_identities is None and 'webAppRoutingIdentities' in kwargs: + web_app_routing_identities = kwargs['webAppRoutingIdentities'] + + _setter("dns_zone_id", dns_zone_id) if web_app_routing_identities is not None: - pulumi.set(__self__, "web_app_routing_identities", web_app_routing_identities) + _setter("web_app_routing_identities", web_app_routing_identities) @property @pulumi.getter(name="dnsZoneId") @@ -7772,12 +10154,33 @@ def __init__(__self__, *, > **Note:** When `kubelet_identity` is enabled - The `type` field in the `identity` block must be set to `UserAssigned` and `identity_ids` must be set. """ + KubernetesClusterWebAppRoutingWebAppRoutingIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -7831,13 +10234,36 @@ def __init__(__self__, *, :param pulumi.Input['KubernetesClusterWindowsProfileGmsaArgs'] gmsa: A `gmsa` block as defined below. :param pulumi.Input[str] license: Specifies the type of on-premise license which should be used for Node Pool Windows Virtual Machine. At this time the only possible value is `Windows_Server`. """ - pulumi.set(__self__, "admin_username", admin_username) + KubernetesClusterWindowsProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + admin_password=admin_password, + gmsa=gmsa, + license=license, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[pulumi.Input[str]] = None, + admin_password: Optional[pulumi.Input[str]] = None, + gmsa: Optional[pulumi.Input['KubernetesClusterWindowsProfileGmsaArgs']] = None, + license: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + + _setter("admin_username", admin_username) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if gmsa is not None: - pulumi.set(__self__, "gmsa", gmsa) + _setter("gmsa", gmsa) if license is not None: - pulumi.set(__self__, "license", license) + _setter("license", license) @property @pulumi.getter(name="adminUsername") @@ -7899,8 +10325,29 @@ def __init__(__self__, *, > **Note:** The properties `dns_server` and `root_domain` must both either be set or unset, i.e. empty. """ - pulumi.set(__self__, "dns_server", dns_server) - pulumi.set(__self__, "root_domain", root_domain) + KubernetesClusterWindowsProfileGmsaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_server=dns_server, + root_domain=root_domain, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_server: Optional[pulumi.Input[str]] = None, + root_domain: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_server is None and 'dnsServer' in kwargs: + dns_server = kwargs['dnsServer'] + if dns_server is None: + raise TypeError("Missing 'dns_server' argument") + if root_domain is None and 'rootDomain' in kwargs: + root_domain = kwargs['rootDomain'] + if root_domain is None: + raise TypeError("Missing 'root_domain' argument") + + _setter("dns_server", dns_server) + _setter("root_domain", root_domain) @property @pulumi.getter(name="dnsServer") @@ -7946,14 +10393,39 @@ def __init__(__self__, *, > **Note:** This requires that the Preview Feature `Microsoft.ContainerService/AKS-VPAPreview` is enabled and the Resource Provider is re-registered, see the documentation for more information. :param pulumi.Input[str] vertical_pod_autoscaler_update_mode: How the autoscaler applies changes to pod resources. """ + KubernetesClusterWorkloadAutoscalerProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + keda_enabled=keda_enabled, + vertical_pod_autoscaler_controlled_values=vertical_pod_autoscaler_controlled_values, + vertical_pod_autoscaler_enabled=vertical_pod_autoscaler_enabled, + vertical_pod_autoscaler_update_mode=vertical_pod_autoscaler_update_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + keda_enabled: Optional[pulumi.Input[bool]] = None, + vertical_pod_autoscaler_controlled_values: Optional[pulumi.Input[str]] = None, + vertical_pod_autoscaler_enabled: Optional[pulumi.Input[bool]] = None, + vertical_pod_autoscaler_update_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if keda_enabled is None and 'kedaEnabled' in kwargs: + keda_enabled = kwargs['kedaEnabled'] + if vertical_pod_autoscaler_controlled_values is None and 'verticalPodAutoscalerControlledValues' in kwargs: + vertical_pod_autoscaler_controlled_values = kwargs['verticalPodAutoscalerControlledValues'] + if vertical_pod_autoscaler_enabled is None and 'verticalPodAutoscalerEnabled' in kwargs: + vertical_pod_autoscaler_enabled = kwargs['verticalPodAutoscalerEnabled'] + if vertical_pod_autoscaler_update_mode is None and 'verticalPodAutoscalerUpdateMode' in kwargs: + vertical_pod_autoscaler_update_mode = kwargs['verticalPodAutoscalerUpdateMode'] + if keda_enabled is not None: - pulumi.set(__self__, "keda_enabled", keda_enabled) + _setter("keda_enabled", keda_enabled) if vertical_pod_autoscaler_controlled_values is not None: - pulumi.set(__self__, "vertical_pod_autoscaler_controlled_values", vertical_pod_autoscaler_controlled_values) + _setter("vertical_pod_autoscaler_controlled_values", vertical_pod_autoscaler_controlled_values) if vertical_pod_autoscaler_enabled is not None: - pulumi.set(__self__, "vertical_pod_autoscaler_enabled", vertical_pod_autoscaler_enabled) + _setter("vertical_pod_autoscaler_enabled", vertical_pod_autoscaler_enabled) if vertical_pod_autoscaler_update_mode is not None: - pulumi.set(__self__, "vertical_pod_autoscaler_update_mode", vertical_pod_autoscaler_update_mode) + _setter("vertical_pod_autoscaler_update_mode", vertical_pod_autoscaler_update_mode) @property @pulumi.getter(name="kedaEnabled") @@ -8014,11 +10486,32 @@ def __init__(__self__, *, dns_prefix: pulumi.Input[str], fqdn: Optional[pulumi.Input[str]] = None, kubernetes_version: Optional[pulumi.Input[str]] = None): - pulumi.set(__self__, "dns_prefix", dns_prefix) + KubernetesFleetManagerHubProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_prefix=dns_prefix, + fqdn=fqdn, + kubernetes_version=kubernetes_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_prefix: Optional[pulumi.Input[str]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + kubernetes_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_prefix is None and 'dnsPrefix' in kwargs: + dns_prefix = kwargs['dnsPrefix'] + if dns_prefix is None: + raise TypeError("Missing 'dns_prefix' argument") + if kubernetes_version is None and 'kubernetesVersion' in kwargs: + kubernetes_version = kwargs['kubernetesVersion'] + + _setter("dns_prefix", dns_prefix) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if kubernetes_version is not None: - pulumi.set(__self__, "kubernetes_version", kubernetes_version) + _setter("kubernetes_version", kubernetes_version) @property @pulumi.getter(name="dnsPrefix") @@ -8061,10 +10554,33 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault Key. :param pulumi.Input[bool] enabled: Boolean value that indicates whether encryption is enabled. """ - pulumi.set(__self__, "identity_client_id", identity_client_id) - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + RegistryEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_client_id=identity_client_id, + key_vault_key_id=key_vault_key_id, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_client_id: Optional[pulumi.Input[str]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_client_id is None and 'identityClientId' in kwargs: + identity_client_id = kwargs['identityClientId'] + if identity_client_id is None: + raise TypeError("Missing 'identity_client_id' argument") + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + + _setter("identity_client_id", identity_client_id) + _setter("key_vault_key_id", key_vault_key_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="identityClientId") @@ -8120,13 +10636,36 @@ def __init__(__self__, *, > **NOTE:** Changing the `zone_redundancy_enabled` forces the a underlying replication to be created. """ - pulumi.set(__self__, "location", location) + RegistryGeoreplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + regional_endpoint_enabled=regional_endpoint_enabled, + tags=tags, + zone_redundancy_enabled=zone_redundancy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + regional_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundancy_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is None: + raise TypeError("Missing 'location' argument") + if regional_endpoint_enabled is None and 'regionalEndpointEnabled' in kwargs: + regional_endpoint_enabled = kwargs['regionalEndpointEnabled'] + if zone_redundancy_enabled is None and 'zoneRedundancyEnabled' in kwargs: + zone_redundancy_enabled = kwargs['zoneRedundancyEnabled'] + + _setter("location", location) if regional_endpoint_enabled is not None: - pulumi.set(__self__, "regional_endpoint_enabled", regional_endpoint_enabled) + _setter("regional_endpoint_enabled", regional_endpoint_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundancy_enabled is not None: - pulumi.set(__self__, "zone_redundancy_enabled", zone_redundancy_enabled) + _setter("zone_redundancy_enabled", zone_redundancy_enabled) @property @pulumi.getter @@ -8194,13 +10733,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + RegistryIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -8268,12 +10832,33 @@ def __init__(__self__, *, > **NOTE:** Azure automatically configures Network Rules - to remove these you'll need to specify an `network_rule_set` block with `default_action` set to `Deny`. """ + RegistryNetworkRuleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + virtual_networks=virtual_networks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryNetworkRuleSetIpRuleArgs']]]] = None, + virtual_networks: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryNetworkRuleSetVirtualNetworkArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if virtual_networks is None and 'virtualNetworks' in kwargs: + virtual_networks = kwargs['virtualNetworks'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if virtual_networks is not None: - pulumi.set(__self__, "virtual_networks", virtual_networks) + _setter("virtual_networks", virtual_networks) @property @pulumi.getter(name="defaultAction") @@ -8325,8 +10910,27 @@ def __init__(__self__, *, :param pulumi.Input[str] action: The behaviour for requests matching this rule. At this time the only supported value is `Allow` :param pulumi.Input[str] ip_range: The CIDR block from which requests will match the rule. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "ip_range", ip_range) + RegistryNetworkRuleSetIpRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + ip_range=ip_range, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + ip_range: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if ip_range is None and 'ipRange' in kwargs: + ip_range = kwargs['ipRange'] + if ip_range is None: + raise TypeError("Missing 'ip_range' argument") + + _setter("action", action) + _setter("ip_range", ip_range) @property @pulumi.getter @@ -8362,8 +10966,27 @@ def __init__(__self__, *, :param pulumi.Input[str] action: The behaviour for requests matching this rule. At this time the only supported value is `Allow` :param pulumi.Input[str] subnet_id: The subnet id from which requests will match the rule. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "subnet_id", subnet_id) + RegistryNetworkRuleSetVirtualNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("action", action) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -8399,10 +11022,23 @@ def __init__(__self__, *, :param pulumi.Input[int] days: The number of days to retain an untagged manifest after which it gets purged. Default is `7`. :param pulumi.Input[bool] enabled: Boolean value that indicates whether the policy is enabled. """ + RegistryRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[pulumi.Input[int]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -8436,7 +11072,20 @@ def __init__(__self__, *, """ :param pulumi.Input[int] cpu: The number of cores required for the Container Registry Task. """ - pulumi.set(__self__, "cpu", cpu) + RegistryTaskAgentSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is None: + raise TypeError("Missing 'cpu' argument") + + _setter("cpu", cpu) @property @pulumi.getter @@ -8466,14 +11115,41 @@ def __init__(__self__, *, :param pulumi.Input[str] update_trigger_endpoint: The endpoint URL for receiving the trigger. :param pulumi.Input[str] update_trigger_payload_type: Type of payload body for the trigger. Possible values are `Default` and `Token`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + RegistryTaskBaseImageTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + enabled=enabled, + update_trigger_endpoint=update_trigger_endpoint, + update_trigger_payload_type=update_trigger_payload_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + update_trigger_endpoint: Optional[pulumi.Input[str]] = None, + update_trigger_payload_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if update_trigger_endpoint is None and 'updateTriggerEndpoint' in kwargs: + update_trigger_endpoint = kwargs['updateTriggerEndpoint'] + if update_trigger_payload_type is None and 'updateTriggerPayloadType' in kwargs: + update_trigger_payload_type = kwargs['updateTriggerPayloadType'] + + _setter("name", name) + _setter("type", type) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if update_trigger_endpoint is not None: - pulumi.set(__self__, "update_trigger_endpoint", update_trigger_endpoint) + _setter("update_trigger_endpoint", update_trigger_endpoint) if update_trigger_payload_type is not None: - pulumi.set(__self__, "update_trigger_payload_type", update_trigger_payload_type) + _setter("update_trigger_payload_type", update_trigger_payload_type) @property @pulumi.getter @@ -8559,21 +11235,68 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] secret_arguments: Specifies a map of *secret* arguments to be used when executing this step. :param pulumi.Input[str] target: The name of the target build stage for the docker build. """ - pulumi.set(__self__, "context_access_token", context_access_token) - pulumi.set(__self__, "context_path", context_path) - pulumi.set(__self__, "dockerfile_path", dockerfile_path) + RegistryTaskDockerStepArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + context_access_token=context_access_token, + context_path=context_path, + dockerfile_path=dockerfile_path, + arguments=arguments, + cache_enabled=cache_enabled, + image_names=image_names, + push_enabled=push_enabled, + secret_arguments=secret_arguments, + target=target, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + context_access_token: Optional[pulumi.Input[str]] = None, + context_path: Optional[pulumi.Input[str]] = None, + dockerfile_path: Optional[pulumi.Input[str]] = None, + arguments: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + cache_enabled: Optional[pulumi.Input[bool]] = None, + image_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + push_enabled: Optional[pulumi.Input[bool]] = None, + secret_arguments: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if context_access_token is None and 'contextAccessToken' in kwargs: + context_access_token = kwargs['contextAccessToken'] + if context_access_token is None: + raise TypeError("Missing 'context_access_token' argument") + if context_path is None and 'contextPath' in kwargs: + context_path = kwargs['contextPath'] + if context_path is None: + raise TypeError("Missing 'context_path' argument") + if dockerfile_path is None and 'dockerfilePath' in kwargs: + dockerfile_path = kwargs['dockerfilePath'] + if dockerfile_path is None: + raise TypeError("Missing 'dockerfile_path' argument") + if cache_enabled is None and 'cacheEnabled' in kwargs: + cache_enabled = kwargs['cacheEnabled'] + if image_names is None and 'imageNames' in kwargs: + image_names = kwargs['imageNames'] + if push_enabled is None and 'pushEnabled' in kwargs: + push_enabled = kwargs['pushEnabled'] + if secret_arguments is None and 'secretArguments' in kwargs: + secret_arguments = kwargs['secretArguments'] + + _setter("context_access_token", context_access_token) + _setter("context_path", context_path) + _setter("dockerfile_path", dockerfile_path) if arguments is not None: - pulumi.set(__self__, "arguments", arguments) + _setter("arguments", arguments) if cache_enabled is not None: - pulumi.set(__self__, "cache_enabled", cache_enabled) + _setter("cache_enabled", cache_enabled) if image_names is not None: - pulumi.set(__self__, "image_names", image_names) + _setter("image_names", image_names) if push_enabled is not None: - pulumi.set(__self__, "push_enabled", push_enabled) + _setter("push_enabled", push_enabled) if secret_arguments is not None: - pulumi.set(__self__, "secret_arguments", secret_arguments) + _setter("secret_arguments", secret_arguments) if target is not None: - pulumi.set(__self__, "target", target) + _setter("target", target) @property @pulumi.getter(name="contextAccessToken") @@ -8701,17 +11424,50 @@ def __init__(__self__, *, :param pulumi.Input[str] value_content: The (optionally base64 encoded) content of the build parameters. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] values: Specifies a map of values that can be passed when running a task. """ - pulumi.set(__self__, "task_content", task_content) + RegistryTaskEncodedStepArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + task_content=task_content, + context_access_token=context_access_token, + context_path=context_path, + secret_values=secret_values, + value_content=value_content, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + task_content: Optional[pulumi.Input[str]] = None, + context_access_token: Optional[pulumi.Input[str]] = None, + context_path: Optional[pulumi.Input[str]] = None, + secret_values: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + value_content: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if task_content is None and 'taskContent' in kwargs: + task_content = kwargs['taskContent'] + if task_content is None: + raise TypeError("Missing 'task_content' argument") + if context_access_token is None and 'contextAccessToken' in kwargs: + context_access_token = kwargs['contextAccessToken'] + if context_path is None and 'contextPath' in kwargs: + context_path = kwargs['contextPath'] + if secret_values is None and 'secretValues' in kwargs: + secret_values = kwargs['secretValues'] + if value_content is None and 'valueContent' in kwargs: + value_content = kwargs['valueContent'] + + _setter("task_content", task_content) if context_access_token is not None: - pulumi.set(__self__, "context_access_token", context_access_token) + _setter("context_access_token", context_access_token) if context_path is not None: - pulumi.set(__self__, "context_path", context_path) + _setter("context_path", context_path) if secret_values is not None: - pulumi.set(__self__, "secret_values", secret_values) + _setter("secret_values", secret_values) if value_content is not None: - pulumi.set(__self__, "value_content", value_content) + _setter("value_content", value_content) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter(name="taskContent") @@ -8803,17 +11559,50 @@ def __init__(__self__, *, :param pulumi.Input[str] value_file_path: The parameters file path relative to the source context. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] values: Specifies a map of values that can be passed when running a task. """ - pulumi.set(__self__, "task_file_path", task_file_path) + RegistryTaskFileStepArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + task_file_path=task_file_path, + context_access_token=context_access_token, + context_path=context_path, + secret_values=secret_values, + value_file_path=value_file_path, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + task_file_path: Optional[pulumi.Input[str]] = None, + context_access_token: Optional[pulumi.Input[str]] = None, + context_path: Optional[pulumi.Input[str]] = None, + secret_values: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + value_file_path: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if task_file_path is None and 'taskFilePath' in kwargs: + task_file_path = kwargs['taskFilePath'] + if task_file_path is None: + raise TypeError("Missing 'task_file_path' argument") + if context_access_token is None and 'contextAccessToken' in kwargs: + context_access_token = kwargs['contextAccessToken'] + if context_path is None and 'contextPath' in kwargs: + context_path = kwargs['contextPath'] + if secret_values is None and 'secretValues' in kwargs: + secret_values = kwargs['secretValues'] + if value_file_path is None and 'valueFilePath' in kwargs: + value_file_path = kwargs['valueFilePath'] + + _setter("task_file_path", task_file_path) if context_access_token is not None: - pulumi.set(__self__, "context_access_token", context_access_token) + _setter("context_access_token", context_access_token) if context_path is not None: - pulumi.set(__self__, "context_path", context_path) + _setter("context_path", context_path) if secret_values is not None: - pulumi.set(__self__, "secret_values", secret_values) + _setter("secret_values", secret_values) if value_file_path is not None: - pulumi.set(__self__, "value_file_path", value_file_path) + _setter("value_file_path", value_file_path) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter(name="taskFilePath") @@ -8903,13 +11692,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + RegistryTaskIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -8973,11 +11787,28 @@ def __init__(__self__, *, :param pulumi.Input[str] architecture: The OS architecture. Possible values are `amd64`, `x86`, `386`, `arm` and `arm64`. :param pulumi.Input[str] variant: The variant of the CPU. Possible values are `v6`, `v7`, `v8`. """ - pulumi.set(__self__, "os", os) + RegistryTaskPlatformArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + os=os, + architecture=architecture, + variant=variant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + os: Optional[pulumi.Input[str]] = None, + architecture: Optional[pulumi.Input[str]] = None, + variant: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if os is None: + raise TypeError("Missing 'os' argument") + + _setter("os", os) if architecture is not None: - pulumi.set(__self__, "architecture", architecture) + _setter("architecture", architecture) if variant is not None: - pulumi.set(__self__, "variant", variant) + _setter("variant", variant) @property @pulumi.getter @@ -9025,10 +11856,23 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['RegistryTaskRegistryCredentialCustomArgs']]] customs: One or more `custom` blocks as defined above. :param pulumi.Input['RegistryTaskRegistryCredentialSourceArgs'] source: One `source` block as defined below. """ + RegistryTaskRegistryCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + customs=customs, + source=source, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + customs: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryTaskRegistryCredentialCustomArgs']]]] = None, + source: Optional[pulumi.Input['RegistryTaskRegistryCredentialSourceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if customs is not None: - pulumi.set(__self__, "customs", customs) + _setter("customs", customs) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) @property @pulumi.getter @@ -9068,13 +11912,34 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password for logging into the custom Container Registry. It can be either a plain text of password, or a Keyvault Secret ID. :param pulumi.Input[str] username: The username for logging into the custom Container Registry. It can be either a plain text of username, or a Keyvault Secret ID. """ - pulumi.set(__self__, "login_server", login_server) + RegistryTaskRegistryCredentialCustomArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login_server=login_server, + identity=identity, + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login_server: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login_server is None and 'loginServer' in kwargs: + login_server = kwargs['loginServer'] + if login_server is None: + raise TypeError("Missing 'login_server' argument") + + _setter("login_server", login_server) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="loginServer") @@ -9132,7 +11997,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] login_mode: The login mode for the source registry. Possible values are `None` and `Default`. """ - pulumi.set(__self__, "login_mode", login_mode) + RegistryTaskRegistryCredentialSourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login_mode=login_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login_mode is None and 'loginMode' in kwargs: + login_mode = kwargs['loginMode'] + if login_mode is None: + raise TypeError("Missing 'login_mode' argument") + + _setter("login_mode", login_mode) @property @pulumi.getter(name="loginMode") @@ -9166,16 +12046,51 @@ def __init__(__self__, *, :param pulumi.Input[str] branch: The branch name of the source code. :param pulumi.Input[bool] enabled: Should the trigger be enabled? Defaults to `true`. """ - pulumi.set(__self__, "events", events) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "repository_url", repository_url) - pulumi.set(__self__, "source_type", source_type) + RegistryTaskSourceTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + events=events, + name=name, + repository_url=repository_url, + source_type=source_type, + authentication=authentication, + branch=branch, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + events: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + repository_url: Optional[pulumi.Input[str]] = None, + source_type: Optional[pulumi.Input[str]] = None, + authentication: Optional[pulumi.Input['RegistryTaskSourceTriggerAuthenticationArgs']] = None, + branch: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if events is None: + raise TypeError("Missing 'events' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if repository_url is None and 'repositoryUrl' in kwargs: + repository_url = kwargs['repositoryUrl'] + if repository_url is None: + raise TypeError("Missing 'repository_url' argument") + if source_type is None and 'sourceType' in kwargs: + source_type = kwargs['sourceType'] + if source_type is None: + raise TypeError("Missing 'source_type' argument") + + _setter("events", events) + _setter("name", name) + _setter("repository_url", repository_url) + _setter("source_type", source_type) if authentication is not None: - pulumi.set(__self__, "authentication", authentication) + _setter("authentication", authentication) if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -9277,14 +12192,43 @@ def __init__(__self__, *, :param pulumi.Input[str] refresh_token: The refresh token used to refresh the access token. :param pulumi.Input[str] scope: The scope of the access token. """ - pulumi.set(__self__, "token", token) - pulumi.set(__self__, "token_type", token_type) + RegistryTaskSourceTriggerAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + token=token, + token_type=token_type, + expire_in_seconds=expire_in_seconds, + refresh_token=refresh_token, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + token: Optional[pulumi.Input[str]] = None, + token_type: Optional[pulumi.Input[str]] = None, + expire_in_seconds: Optional[pulumi.Input[int]] = None, + refresh_token: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if token is None: + raise TypeError("Missing 'token' argument") + if token_type is None and 'tokenType' in kwargs: + token_type = kwargs['tokenType'] + if token_type is None: + raise TypeError("Missing 'token_type' argument") + if expire_in_seconds is None and 'expireInSeconds' in kwargs: + expire_in_seconds = kwargs['expireInSeconds'] + if refresh_token is None and 'refreshToken' in kwargs: + refresh_token = kwargs['refreshToken'] + + _setter("token", token) + _setter("token_type", token_type) if expire_in_seconds is not None: - pulumi.set(__self__, "expire_in_seconds", expire_in_seconds) + _setter("expire_in_seconds", expire_in_seconds) if refresh_token is not None: - pulumi.set(__self__, "refresh_token", refresh_token) + _setter("refresh_token", refresh_token) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter @@ -9358,10 +12302,29 @@ def __init__(__self__, *, :param pulumi.Input[str] schedule: The CRON expression for the task schedule. :param pulumi.Input[bool] enabled: Should the trigger be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) + RegistryTaskTimerTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + + _setter("name", name) + _setter("schedule", schedule) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -9407,8 +12370,19 @@ def __init__(__self__, *, """ :param pulumi.Input[bool] enabled: Boolean value that indicates whether the policy is enabled. """ + RegistryTrustPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -9432,10 +12406,23 @@ def __init__(__self__, *, :param pulumi.Input[str] expiry: The expiration date of the password in RFC3339 format. Changing this forces a new resource to be created. :param pulumi.Input[str] value: The value of the password (Sensitive). """ + TokenPasswordPassword1Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiry=expiry, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiry: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -9471,10 +12458,23 @@ def __init__(__self__, *, :param pulumi.Input[str] expiry: The expiration date of the password in RFC3339 format. Changing this forces a new resource to be created. :param pulumi.Input[str] value: The value of the password (Sensitive). """ + TokenPasswordPassword2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiry=expiry, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiry: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/containerservice/cluster_trusted_access_role_binding.py b/sdk/python/pulumi_azure/containerservice/cluster_trusted_access_role_binding.py index cc451f0d2f..e10192ba84 100644 --- a/sdk/python/pulumi_azure/containerservice/cluster_trusted_access_role_binding.py +++ b/sdk/python/pulumi_azure/containerservice/cluster_trusted_access_role_binding.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ClusterTrustedAccessRoleBindingArgs', 'ClusterTrustedAccessRoleBinding'] @@ -25,11 +25,38 @@ def __init__(__self__, *, :param pulumi.Input[str] source_resource_id: The ARM resource ID of source resource that trusted access is configured for. Changing this forces a new Kubernetes Cluster Trusted Access Role Binding to be created. :param pulumi.Input[str] name: Specifies the name of this Kubernetes Cluster Trusted Access Role Binding. Changing this forces a new Kubernetes Cluster Trusted Access Role Binding to be created. """ - pulumi.set(__self__, "kubernetes_cluster_id", kubernetes_cluster_id) - pulumi.set(__self__, "roles", roles) - pulumi.set(__self__, "source_resource_id", source_resource_id) + ClusterTrustedAccessRoleBindingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kubernetes_cluster_id=kubernetes_cluster_id, + roles=roles, + source_resource_id=source_resource_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kubernetes_cluster_id: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_resource_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kubernetes_cluster_id is None and 'kubernetesClusterId' in kwargs: + kubernetes_cluster_id = kwargs['kubernetesClusterId'] + if kubernetes_cluster_id is None: + raise TypeError("Missing 'kubernetes_cluster_id' argument") + if roles is None: + raise TypeError("Missing 'roles' argument") + if source_resource_id is None and 'sourceResourceId' in kwargs: + source_resource_id = kwargs['sourceResourceId'] + if source_resource_id is None: + raise TypeError("Missing 'source_resource_id' argument") + + _setter("kubernetes_cluster_id", kubernetes_cluster_id) + _setter("roles", roles) + _setter("source_resource_id", source_resource_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="kubernetesClusterId") @@ -94,14 +121,35 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: A list of roles to bind, each item is a resource type qualified role name. :param pulumi.Input[str] source_resource_id: The ARM resource ID of source resource that trusted access is configured for. Changing this forces a new Kubernetes Cluster Trusted Access Role Binding to be created. """ + _ClusterTrustedAccessRoleBindingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + kubernetes_cluster_id=kubernetes_cluster_id, + name=name, + roles=roles, + source_resource_id=source_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kubernetes_cluster_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kubernetes_cluster_id is None and 'kubernetesClusterId' in kwargs: + kubernetes_cluster_id = kwargs['kubernetesClusterId'] + if source_resource_id is None and 'sourceResourceId' in kwargs: + source_resource_id = kwargs['sourceResourceId'] + if kubernetes_cluster_id is not None: - pulumi.set(__self__, "kubernetes_cluster_id", kubernetes_cluster_id) + _setter("kubernetes_cluster_id", kubernetes_cluster_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if roles is not None: - pulumi.set(__self__, "roles", roles) + _setter("roles", roles) if source_resource_id is not None: - pulumi.set(__self__, "source_resource_id", source_resource_id) + _setter("source_resource_id", source_resource_id) @property @pulumi.getter(name="kubernetesClusterId") @@ -329,6 +377,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ClusterTrustedAccessRoleBindingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/containerservice/connected_registry.py b/sdk/python/pulumi_azure/containerservice/connected_registry.py index ea113ff306..158fbb8a23 100644 --- a/sdk/python/pulumi_azure/containerservice/connected_registry.py +++ b/sdk/python/pulumi_azure/containerservice/connected_registry.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,28 +45,83 @@ def __init__(__self__, *, :param pulumi.Input[str] sync_schedule: The cron expression indicating the schedule that the Connected Registry will sync with its parent. Defaults to `* * * * *`. :param pulumi.Input[str] sync_window: The time window (in form of ISO8601) during which sync is enabled for each schedule occurrence. Allowed range is from `PT3H` to `P7D`. """ - pulumi.set(__self__, "container_registry_id", container_registry_id) - pulumi.set(__self__, "sync_token_id", sync_token_id) + ConnectedRegistryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_registry_id=container_registry_id, + sync_token_id=sync_token_id, + audit_log_enabled=audit_log_enabled, + client_token_ids=client_token_ids, + log_level=log_level, + mode=mode, + name=name, + notifications=notifications, + parent_registry_id=parent_registry_id, + sync_message_ttl=sync_message_ttl, + sync_schedule=sync_schedule, + sync_window=sync_window, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_registry_id: Optional[pulumi.Input[str]] = None, + sync_token_id: Optional[pulumi.Input[str]] = None, + audit_log_enabled: Optional[pulumi.Input[bool]] = None, + client_token_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + log_level: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notifications: Optional[pulumi.Input[Sequence[pulumi.Input['ConnectedRegistryNotificationArgs']]]] = None, + parent_registry_id: Optional[pulumi.Input[str]] = None, + sync_message_ttl: Optional[pulumi.Input[str]] = None, + sync_schedule: Optional[pulumi.Input[str]] = None, + sync_window: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_registry_id is None and 'containerRegistryId' in kwargs: + container_registry_id = kwargs['containerRegistryId'] + if container_registry_id is None: + raise TypeError("Missing 'container_registry_id' argument") + if sync_token_id is None and 'syncTokenId' in kwargs: + sync_token_id = kwargs['syncTokenId'] + if sync_token_id is None: + raise TypeError("Missing 'sync_token_id' argument") + if audit_log_enabled is None and 'auditLogEnabled' in kwargs: + audit_log_enabled = kwargs['auditLogEnabled'] + if client_token_ids is None and 'clientTokenIds' in kwargs: + client_token_ids = kwargs['clientTokenIds'] + if log_level is None and 'logLevel' in kwargs: + log_level = kwargs['logLevel'] + if parent_registry_id is None and 'parentRegistryId' in kwargs: + parent_registry_id = kwargs['parentRegistryId'] + if sync_message_ttl is None and 'syncMessageTtl' in kwargs: + sync_message_ttl = kwargs['syncMessageTtl'] + if sync_schedule is None and 'syncSchedule' in kwargs: + sync_schedule = kwargs['syncSchedule'] + if sync_window is None and 'syncWindow' in kwargs: + sync_window = kwargs['syncWindow'] + + _setter("container_registry_id", container_registry_id) + _setter("sync_token_id", sync_token_id) if audit_log_enabled is not None: - pulumi.set(__self__, "audit_log_enabled", audit_log_enabled) + _setter("audit_log_enabled", audit_log_enabled) if client_token_ids is not None: - pulumi.set(__self__, "client_token_ids", client_token_ids) + _setter("client_token_ids", client_token_ids) if log_level is not None: - pulumi.set(__self__, "log_level", log_level) + _setter("log_level", log_level) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notifications is not None: - pulumi.set(__self__, "notifications", notifications) + _setter("notifications", notifications) if parent_registry_id is not None: - pulumi.set(__self__, "parent_registry_id", parent_registry_id) + _setter("parent_registry_id", parent_registry_id) if sync_message_ttl is not None: - pulumi.set(__self__, "sync_message_ttl", sync_message_ttl) + _setter("sync_message_ttl", sync_message_ttl) if sync_schedule is not None: - pulumi.set(__self__, "sync_schedule", sync_schedule) + _setter("sync_schedule", sync_schedule) if sync_window is not None: - pulumi.set(__self__, "sync_window", sync_window) + _setter("sync_window", sync_window) @property @pulumi.getter(name="containerRegistryId") @@ -247,30 +302,81 @@ def __init__(__self__, *, :param pulumi.Input[str] sync_token_id: The ID of the Container Registry Token which is used for synchronizing the Connected Registry. Changing this forces a new Container Connected Registry to be created. :param pulumi.Input[str] sync_window: The time window (in form of ISO8601) during which sync is enabled for each schedule occurrence. Allowed range is from `PT3H` to `P7D`. """ + _ConnectedRegistryState._configure( + lambda key, value: pulumi.set(__self__, key, value), + audit_log_enabled=audit_log_enabled, + client_token_ids=client_token_ids, + container_registry_id=container_registry_id, + log_level=log_level, + mode=mode, + name=name, + notifications=notifications, + parent_registry_id=parent_registry_id, + sync_message_ttl=sync_message_ttl, + sync_schedule=sync_schedule, + sync_token_id=sync_token_id, + sync_window=sync_window, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audit_log_enabled: Optional[pulumi.Input[bool]] = None, + client_token_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + container_registry_id: Optional[pulumi.Input[str]] = None, + log_level: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notifications: Optional[pulumi.Input[Sequence[pulumi.Input['ConnectedRegistryNotificationArgs']]]] = None, + parent_registry_id: Optional[pulumi.Input[str]] = None, + sync_message_ttl: Optional[pulumi.Input[str]] = None, + sync_schedule: Optional[pulumi.Input[str]] = None, + sync_token_id: Optional[pulumi.Input[str]] = None, + sync_window: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audit_log_enabled is None and 'auditLogEnabled' in kwargs: + audit_log_enabled = kwargs['auditLogEnabled'] + if client_token_ids is None and 'clientTokenIds' in kwargs: + client_token_ids = kwargs['clientTokenIds'] + if container_registry_id is None and 'containerRegistryId' in kwargs: + container_registry_id = kwargs['containerRegistryId'] + if log_level is None and 'logLevel' in kwargs: + log_level = kwargs['logLevel'] + if parent_registry_id is None and 'parentRegistryId' in kwargs: + parent_registry_id = kwargs['parentRegistryId'] + if sync_message_ttl is None and 'syncMessageTtl' in kwargs: + sync_message_ttl = kwargs['syncMessageTtl'] + if sync_schedule is None and 'syncSchedule' in kwargs: + sync_schedule = kwargs['syncSchedule'] + if sync_token_id is None and 'syncTokenId' in kwargs: + sync_token_id = kwargs['syncTokenId'] + if sync_window is None and 'syncWindow' in kwargs: + sync_window = kwargs['syncWindow'] + if audit_log_enabled is not None: - pulumi.set(__self__, "audit_log_enabled", audit_log_enabled) + _setter("audit_log_enabled", audit_log_enabled) if client_token_ids is not None: - pulumi.set(__self__, "client_token_ids", client_token_ids) + _setter("client_token_ids", client_token_ids) if container_registry_id is not None: - pulumi.set(__self__, "container_registry_id", container_registry_id) + _setter("container_registry_id", container_registry_id) if log_level is not None: - pulumi.set(__self__, "log_level", log_level) + _setter("log_level", log_level) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notifications is not None: - pulumi.set(__self__, "notifications", notifications) + _setter("notifications", notifications) if parent_registry_id is not None: - pulumi.set(__self__, "parent_registry_id", parent_registry_id) + _setter("parent_registry_id", parent_registry_id) if sync_message_ttl is not None: - pulumi.set(__self__, "sync_message_ttl", sync_message_ttl) + _setter("sync_message_ttl", sync_message_ttl) if sync_schedule is not None: - pulumi.set(__self__, "sync_schedule", sync_schedule) + _setter("sync_schedule", sync_schedule) if sync_token_id is not None: - pulumi.set(__self__, "sync_token_id", sync_token_id) + _setter("sync_token_id", sync_token_id) if sync_window is not None: - pulumi.set(__self__, "sync_window", sync_window) + _setter("sync_window", sync_window) @property @pulumi.getter(name="auditLogEnabled") @@ -562,6 +668,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConnectedRegistryArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/containerservice/flux_configuration.py b/sdk/python/pulumi_azure/containerservice/flux_configuration.py index f09345e7a3..7fe1e97d17 100644 --- a/sdk/python/pulumi_azure/containerservice/flux_configuration.py +++ b/sdk/python/pulumi_azure/containerservice/flux_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,21 +37,62 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Kubernetes Flux Configuration. Changing this forces a new Kubernetes Flux Configuration to be created. :param pulumi.Input[str] scope: Specifies the scope at which the operator will be installed. Possible values are `cluster` and `namespace`. Defaults to `namespace`. Changing this forces a new Kubernetes Flux Configuration to be created. """ - pulumi.set(__self__, "cluster_id", cluster_id) - pulumi.set(__self__, "kustomizations", kustomizations) - pulumi.set(__self__, "namespace", namespace) + FluxConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + kustomizations=kustomizations, + namespace=namespace, + blob_storage=blob_storage, + bucket=bucket, + continuous_reconciliation_enabled=continuous_reconciliation_enabled, + git_repository=git_repository, + name=name, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + kustomizations: Optional[pulumi.Input[Sequence[pulumi.Input['FluxConfigurationKustomizationArgs']]]] = None, + namespace: Optional[pulumi.Input[str]] = None, + blob_storage: Optional[pulumi.Input['FluxConfigurationBlobStorageArgs']] = None, + bucket: Optional[pulumi.Input['FluxConfigurationBucketArgs']] = None, + continuous_reconciliation_enabled: Optional[pulumi.Input[bool]] = None, + git_repository: Optional[pulumi.Input['FluxConfigurationGitRepositoryArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if cluster_id is None: + raise TypeError("Missing 'cluster_id' argument") + if kustomizations is None: + raise TypeError("Missing 'kustomizations' argument") + if namespace is None: + raise TypeError("Missing 'namespace' argument") + if blob_storage is None and 'blobStorage' in kwargs: + blob_storage = kwargs['blobStorage'] + if continuous_reconciliation_enabled is None and 'continuousReconciliationEnabled' in kwargs: + continuous_reconciliation_enabled = kwargs['continuousReconciliationEnabled'] + if git_repository is None and 'gitRepository' in kwargs: + git_repository = kwargs['gitRepository'] + + _setter("cluster_id", cluster_id) + _setter("kustomizations", kustomizations) + _setter("namespace", namespace) if blob_storage is not None: - pulumi.set(__self__, "blob_storage", blob_storage) + _setter("blob_storage", blob_storage) if bucket is not None: - pulumi.set(__self__, "bucket", bucket) + _setter("bucket", bucket) if continuous_reconciliation_enabled is not None: - pulumi.set(__self__, "continuous_reconciliation_enabled", continuous_reconciliation_enabled) + _setter("continuous_reconciliation_enabled", continuous_reconciliation_enabled) if git_repository is not None: - pulumi.set(__self__, "git_repository", git_repository) + _setter("git_repository", git_repository) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="clusterId") @@ -186,24 +227,59 @@ def __init__(__self__, *, :param pulumi.Input[str] namespace: Specifies the namespace to which this configuration is installed to. Changing this forces a new Kubernetes Flux Configuration to be created. :param pulumi.Input[str] scope: Specifies the scope at which the operator will be installed. Possible values are `cluster` and `namespace`. Defaults to `namespace`. Changing this forces a new Kubernetes Flux Configuration to be created. """ + _FluxConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_storage=blob_storage, + bucket=bucket, + cluster_id=cluster_id, + continuous_reconciliation_enabled=continuous_reconciliation_enabled, + git_repository=git_repository, + kustomizations=kustomizations, + name=name, + namespace=namespace, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_storage: Optional[pulumi.Input['FluxConfigurationBlobStorageArgs']] = None, + bucket: Optional[pulumi.Input['FluxConfigurationBucketArgs']] = None, + cluster_id: Optional[pulumi.Input[str]] = None, + continuous_reconciliation_enabled: Optional[pulumi.Input[bool]] = None, + git_repository: Optional[pulumi.Input['FluxConfigurationGitRepositoryArgs']] = None, + kustomizations: Optional[pulumi.Input[Sequence[pulumi.Input['FluxConfigurationKustomizationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_storage is None and 'blobStorage' in kwargs: + blob_storage = kwargs['blobStorage'] + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if continuous_reconciliation_enabled is None and 'continuousReconciliationEnabled' in kwargs: + continuous_reconciliation_enabled = kwargs['continuousReconciliationEnabled'] + if git_repository is None and 'gitRepository' in kwargs: + git_repository = kwargs['gitRepository'] + if blob_storage is not None: - pulumi.set(__self__, "blob_storage", blob_storage) + _setter("blob_storage", blob_storage) if bucket is not None: - pulumi.set(__self__, "bucket", bucket) + _setter("bucket", bucket) if cluster_id is not None: - pulumi.set(__self__, "cluster_id", cluster_id) + _setter("cluster_id", cluster_id) if continuous_reconciliation_enabled is not None: - pulumi.set(__self__, "continuous_reconciliation_enabled", continuous_reconciliation_enabled) + _setter("continuous_reconciliation_enabled", continuous_reconciliation_enabled) if git_repository is not None: - pulumi.set(__self__, "git_repository", git_repository) + _setter("git_repository", git_repository) if kustomizations is not None: - pulumi.set(__self__, "kustomizations", kustomizations) + _setter("kustomizations", kustomizations) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace is not None: - pulumi.set(__self__, "namespace", namespace) + _setter("namespace", namespace) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="blobStorage") @@ -451,6 +527,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FluxConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -474,12 +554,27 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = FluxConfigurationArgs.__new__(FluxConfigurationArgs) + if blob_storage is not None and not isinstance(blob_storage, FluxConfigurationBlobStorageArgs): + blob_storage = blob_storage or {} + def _setter(key, value): + blob_storage[key] = value + FluxConfigurationBlobStorageArgs._configure(_setter, **blob_storage) __props__.__dict__["blob_storage"] = blob_storage + if bucket is not None and not isinstance(bucket, FluxConfigurationBucketArgs): + bucket = bucket or {} + def _setter(key, value): + bucket[key] = value + FluxConfigurationBucketArgs._configure(_setter, **bucket) __props__.__dict__["bucket"] = bucket if cluster_id is None and not opts.urn: raise TypeError("Missing required property 'cluster_id'") __props__.__dict__["cluster_id"] = cluster_id __props__.__dict__["continuous_reconciliation_enabled"] = continuous_reconciliation_enabled + if git_repository is not None and not isinstance(git_repository, FluxConfigurationGitRepositoryArgs): + git_repository = git_repository or {} + def _setter(key, value): + git_repository[key] = value + FluxConfigurationGitRepositoryArgs._configure(_setter, **git_repository) __props__.__dict__["git_repository"] = git_repository if kustomizations is None and not opts.urn: raise TypeError("Missing required property 'kustomizations'") diff --git a/sdk/python/pulumi_azure/containerservice/get_cluster_node_pool.py b/sdk/python/pulumi_azure/containerservice/get_cluster_node_pool.py index 5486470573..5dd7ab5b64 100644 --- a/sdk/python/pulumi_azure/containerservice/get_cluster_node_pool.py +++ b/sdk/python/pulumi_azure/containerservice/get_cluster_node_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/containerservice/get_group.py b/sdk/python/pulumi_azure/containerservice/get_group.py index 20865b3014..e1617cf661 100644 --- a/sdk/python/pulumi_azure/containerservice/get_group.py +++ b/sdk/python/pulumi_azure/containerservice/get_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/containerservice/get_kubernetes_cluster.py b/sdk/python/pulumi_azure/containerservice/get_kubernetes_cluster.py index 2f93090b0d..65bdc653f6 100644 --- a/sdk/python/pulumi_azure/containerservice/get_kubernetes_cluster.py +++ b/sdk/python/pulumi_azure/containerservice/get_kubernetes_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/containerservice/get_kubernetes_node_pool_snapshot.py b/sdk/python/pulumi_azure/containerservice/get_kubernetes_node_pool_snapshot.py index dd6c217824..af5b8097a7 100644 --- a/sdk/python/pulumi_azure/containerservice/get_kubernetes_node_pool_snapshot.py +++ b/sdk/python/pulumi_azure/containerservice/get_kubernetes_node_pool_snapshot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/containerservice/get_kubernetes_service_versions.py b/sdk/python/pulumi_azure/containerservice/get_kubernetes_service_versions.py index 08f88b4741..e93567842a 100644 --- a/sdk/python/pulumi_azure/containerservice/get_kubernetes_service_versions.py +++ b/sdk/python/pulumi_azure/containerservice/get_kubernetes_service_versions.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/containerservice/get_registry.py b/sdk/python/pulumi_azure/containerservice/get_registry.py index 0b8579c2f7..cf988047c2 100644 --- a/sdk/python/pulumi_azure/containerservice/get_registry.py +++ b/sdk/python/pulumi_azure/containerservice/get_registry.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/containerservice/get_registry_scope_map.py b/sdk/python/pulumi_azure/containerservice/get_registry_scope_map.py index 4501c38242..e02d971dca 100644 --- a/sdk/python/pulumi_azure/containerservice/get_registry_scope_map.py +++ b/sdk/python/pulumi_azure/containerservice/get_registry_scope_map.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/containerservice/get_registry_token.py b/sdk/python/pulumi_azure/containerservice/get_registry_token.py index 9061ecfaa7..2baa4a530d 100644 --- a/sdk/python/pulumi_azure/containerservice/get_registry_token.py +++ b/sdk/python/pulumi_azure/containerservice/get_registry_token.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/containerservice/group.py b/sdk/python/pulumi_azure/containerservice/group.py index fa8b841d11..c5be4fd826 100644 --- a/sdk/python/pulumi_azure/containerservice/group.py +++ b/sdk/python/pulumi_azure/containerservice/group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -70,50 +70,137 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: A list of Availability Zones in which this Container Group is located. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "containers", containers) - pulumi.set(__self__, "os_type", os_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) + GroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + containers=containers, + os_type=os_type, + resource_group_name=resource_group_name, + diagnostics=diagnostics, + dns_config=dns_config, + dns_name_label=dns_name_label, + dns_name_label_reuse_policy=dns_name_label_reuse_policy, + exposed_ports=exposed_ports, + identity=identity, + image_registry_credentials=image_registry_credentials, + init_containers=init_containers, + ip_address_type=ip_address_type, + key_vault_key_id=key_vault_key_id, + key_vault_user_assigned_identity_id=key_vault_user_assigned_identity_id, + location=location, + name=name, + network_profile_id=network_profile_id, + restart_policy=restart_policy, + sku=sku, + subnet_ids=subnet_ids, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + containers: Optional[pulumi.Input[Sequence[pulumi.Input['GroupContainerArgs']]]] = None, + os_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + diagnostics: Optional[pulumi.Input['GroupDiagnosticsArgs']] = None, + dns_config: Optional[pulumi.Input['GroupDnsConfigArgs']] = None, + dns_name_label: Optional[pulumi.Input[str]] = None, + dns_name_label_reuse_policy: Optional[pulumi.Input[str]] = None, + exposed_ports: Optional[pulumi.Input[Sequence[pulumi.Input['GroupExposedPortArgs']]]] = None, + identity: Optional[pulumi.Input['GroupIdentityArgs']] = None, + image_registry_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['GroupImageRegistryCredentialArgs']]]] = None, + init_containers: Optional[pulumi.Input[Sequence[pulumi.Input['GroupInitContainerArgs']]]] = None, + ip_address_type: Optional[pulumi.Input[str]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + key_vault_user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_profile_id: Optional[pulumi.Input[str]] = None, + restart_policy: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + subnet_ids: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if containers is None: + raise TypeError("Missing 'containers' argument") + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if os_type is None: + raise TypeError("Missing 'os_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if dns_config is None and 'dnsConfig' in kwargs: + dns_config = kwargs['dnsConfig'] + if dns_name_label is None and 'dnsNameLabel' in kwargs: + dns_name_label = kwargs['dnsNameLabel'] + if dns_name_label_reuse_policy is None and 'dnsNameLabelReusePolicy' in kwargs: + dns_name_label_reuse_policy = kwargs['dnsNameLabelReusePolicy'] + if exposed_ports is None and 'exposedPorts' in kwargs: + exposed_ports = kwargs['exposedPorts'] + if image_registry_credentials is None and 'imageRegistryCredentials' in kwargs: + image_registry_credentials = kwargs['imageRegistryCredentials'] + if init_containers is None and 'initContainers' in kwargs: + init_containers = kwargs['initContainers'] + if ip_address_type is None and 'ipAddressType' in kwargs: + ip_address_type = kwargs['ipAddressType'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_user_assigned_identity_id is None and 'keyVaultUserAssignedIdentityId' in kwargs: + key_vault_user_assigned_identity_id = kwargs['keyVaultUserAssignedIdentityId'] + if network_profile_id is None and 'networkProfileId' in kwargs: + network_profile_id = kwargs['networkProfileId'] + if restart_policy is None and 'restartPolicy' in kwargs: + restart_policy = kwargs['restartPolicy'] + if subnet_ids is None and 'subnetIds' in kwargs: + subnet_ids = kwargs['subnetIds'] + + _setter("containers", containers) + _setter("os_type", os_type) + _setter("resource_group_name", resource_group_name) if diagnostics is not None: - pulumi.set(__self__, "diagnostics", diagnostics) + _setter("diagnostics", diagnostics) if dns_config is not None: - pulumi.set(__self__, "dns_config", dns_config) + _setter("dns_config", dns_config) if dns_name_label is not None: - pulumi.set(__self__, "dns_name_label", dns_name_label) + _setter("dns_name_label", dns_name_label) if dns_name_label_reuse_policy is not None: - pulumi.set(__self__, "dns_name_label_reuse_policy", dns_name_label_reuse_policy) + _setter("dns_name_label_reuse_policy", dns_name_label_reuse_policy) if exposed_ports is not None: - pulumi.set(__self__, "exposed_ports", exposed_ports) + _setter("exposed_ports", exposed_ports) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if image_registry_credentials is not None: - pulumi.set(__self__, "image_registry_credentials", image_registry_credentials) + _setter("image_registry_credentials", image_registry_credentials) if init_containers is not None: - pulumi.set(__self__, "init_containers", init_containers) + _setter("init_containers", init_containers) if ip_address_type is not None: - pulumi.set(__self__, "ip_address_type", ip_address_type) + _setter("ip_address_type", ip_address_type) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if key_vault_user_assigned_identity_id is not None: - pulumi.set(__self__, "key_vault_user_assigned_identity_id", key_vault_user_assigned_identity_id) + _setter("key_vault_user_assigned_identity_id", key_vault_user_assigned_identity_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_profile_id is not None: warnings.warn("""the 'network_profile_id' has been removed from the latest versions of the container instance API and has been deprecated. It no longer functions and will be removed from the 4.0 AzureRM provider. Please use the 'subnet_ids' field instead""", DeprecationWarning) pulumi.log.warn("""network_profile_id is deprecated: the 'network_profile_id' has been removed from the latest versions of the container instance API and has been deprecated. It no longer functions and will be removed from the 4.0 AzureRM provider. Please use the 'subnet_ids' field instead""") if network_profile_id is not None: - pulumi.set(__self__, "network_profile_id", network_profile_id) + _setter("network_profile_id", network_profile_id) if restart_policy is not None: - pulumi.set(__self__, "restart_policy", restart_policy) + _setter("restart_policy", restart_policy) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if subnet_ids is not None: - pulumi.set(__self__, "subnet_ids", subnet_ids) + _setter("subnet_ids", subnet_ids) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -449,57 +536,144 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: A list of Availability Zones in which this Container Group is located. Changing this forces a new resource to be created. """ + _GroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + containers=containers, + diagnostics=diagnostics, + dns_config=dns_config, + dns_name_label=dns_name_label, + dns_name_label_reuse_policy=dns_name_label_reuse_policy, + exposed_ports=exposed_ports, + fqdn=fqdn, + identity=identity, + image_registry_credentials=image_registry_credentials, + init_containers=init_containers, + ip_address=ip_address, + ip_address_type=ip_address_type, + key_vault_key_id=key_vault_key_id, + key_vault_user_assigned_identity_id=key_vault_user_assigned_identity_id, + location=location, + name=name, + network_profile_id=network_profile_id, + os_type=os_type, + resource_group_name=resource_group_name, + restart_policy=restart_policy, + sku=sku, + subnet_ids=subnet_ids, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + containers: Optional[pulumi.Input[Sequence[pulumi.Input['GroupContainerArgs']]]] = None, + diagnostics: Optional[pulumi.Input['GroupDiagnosticsArgs']] = None, + dns_config: Optional[pulumi.Input['GroupDnsConfigArgs']] = None, + dns_name_label: Optional[pulumi.Input[str]] = None, + dns_name_label_reuse_policy: Optional[pulumi.Input[str]] = None, + exposed_ports: Optional[pulumi.Input[Sequence[pulumi.Input['GroupExposedPortArgs']]]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['GroupIdentityArgs']] = None, + image_registry_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['GroupImageRegistryCredentialArgs']]]] = None, + init_containers: Optional[pulumi.Input[Sequence[pulumi.Input['GroupInitContainerArgs']]]] = None, + ip_address: Optional[pulumi.Input[str]] = None, + ip_address_type: Optional[pulumi.Input[str]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + key_vault_user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_profile_id: Optional[pulumi.Input[str]] = None, + os_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + restart_policy: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + subnet_ids: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_config is None and 'dnsConfig' in kwargs: + dns_config = kwargs['dnsConfig'] + if dns_name_label is None and 'dnsNameLabel' in kwargs: + dns_name_label = kwargs['dnsNameLabel'] + if dns_name_label_reuse_policy is None and 'dnsNameLabelReusePolicy' in kwargs: + dns_name_label_reuse_policy = kwargs['dnsNameLabelReusePolicy'] + if exposed_ports is None and 'exposedPorts' in kwargs: + exposed_ports = kwargs['exposedPorts'] + if image_registry_credentials is None and 'imageRegistryCredentials' in kwargs: + image_registry_credentials = kwargs['imageRegistryCredentials'] + if init_containers is None and 'initContainers' in kwargs: + init_containers = kwargs['initContainers'] + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address_type is None and 'ipAddressType' in kwargs: + ip_address_type = kwargs['ipAddressType'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_user_assigned_identity_id is None and 'keyVaultUserAssignedIdentityId' in kwargs: + key_vault_user_assigned_identity_id = kwargs['keyVaultUserAssignedIdentityId'] + if network_profile_id is None and 'networkProfileId' in kwargs: + network_profile_id = kwargs['networkProfileId'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if restart_policy is None and 'restartPolicy' in kwargs: + restart_policy = kwargs['restartPolicy'] + if subnet_ids is None and 'subnetIds' in kwargs: + subnet_ids = kwargs['subnetIds'] + if containers is not None: - pulumi.set(__self__, "containers", containers) + _setter("containers", containers) if diagnostics is not None: - pulumi.set(__self__, "diagnostics", diagnostics) + _setter("diagnostics", diagnostics) if dns_config is not None: - pulumi.set(__self__, "dns_config", dns_config) + _setter("dns_config", dns_config) if dns_name_label is not None: - pulumi.set(__self__, "dns_name_label", dns_name_label) + _setter("dns_name_label", dns_name_label) if dns_name_label_reuse_policy is not None: - pulumi.set(__self__, "dns_name_label_reuse_policy", dns_name_label_reuse_policy) + _setter("dns_name_label_reuse_policy", dns_name_label_reuse_policy) if exposed_ports is not None: - pulumi.set(__self__, "exposed_ports", exposed_ports) + _setter("exposed_ports", exposed_ports) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if image_registry_credentials is not None: - pulumi.set(__self__, "image_registry_credentials", image_registry_credentials) + _setter("image_registry_credentials", image_registry_credentials) if init_containers is not None: - pulumi.set(__self__, "init_containers", init_containers) + _setter("init_containers", init_containers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if ip_address_type is not None: - pulumi.set(__self__, "ip_address_type", ip_address_type) + _setter("ip_address_type", ip_address_type) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if key_vault_user_assigned_identity_id is not None: - pulumi.set(__self__, "key_vault_user_assigned_identity_id", key_vault_user_assigned_identity_id) + _setter("key_vault_user_assigned_identity_id", key_vault_user_assigned_identity_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_profile_id is not None: warnings.warn("""the 'network_profile_id' has been removed from the latest versions of the container instance API and has been deprecated. It no longer functions and will be removed from the 4.0 AzureRM provider. Please use the 'subnet_ids' field instead""", DeprecationWarning) pulumi.log.warn("""network_profile_id is deprecated: the 'network_profile_id' has been removed from the latest versions of the container instance API and has been deprecated. It no longer functions and will be removed from the 4.0 AzureRM provider. Please use the 'subnet_ids' field instead""") if network_profile_id is not None: - pulumi.set(__self__, "network_profile_id", network_profile_id) + _setter("network_profile_id", network_profile_id) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if restart_policy is not None: - pulumi.set(__self__, "restart_policy", restart_policy) + _setter("restart_policy", restart_policy) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if subnet_ids is not None: - pulumi.set(__self__, "subnet_ids", subnet_ids) + _setter("subnet_ids", subnet_ids) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -976,6 +1150,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1015,11 +1193,26 @@ def _internal_init(__self__, if containers is None and not opts.urn: raise TypeError("Missing required property 'containers'") __props__.__dict__["containers"] = containers + if diagnostics is not None and not isinstance(diagnostics, GroupDiagnosticsArgs): + diagnostics = diagnostics or {} + def _setter(key, value): + diagnostics[key] = value + GroupDiagnosticsArgs._configure(_setter, **diagnostics) __props__.__dict__["diagnostics"] = diagnostics + if dns_config is not None and not isinstance(dns_config, GroupDnsConfigArgs): + dns_config = dns_config or {} + def _setter(key, value): + dns_config[key] = value + GroupDnsConfigArgs._configure(_setter, **dns_config) __props__.__dict__["dns_config"] = dns_config __props__.__dict__["dns_name_label"] = dns_name_label __props__.__dict__["dns_name_label_reuse_policy"] = dns_name_label_reuse_policy __props__.__dict__["exposed_ports"] = exposed_ports + if identity is not None and not isinstance(identity, GroupIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + GroupIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["image_registry_credentials"] = image_registry_credentials __props__.__dict__["init_containers"] = init_containers diff --git a/sdk/python/pulumi_azure/containerservice/kubernetes_cluster.py b/sdk/python/pulumi_azure/containerservice/kubernetes_cluster.py index 90a04559a4..581e2aef80 100644 --- a/sdk/python/pulumi_azure/containerservice/kubernetes_cluster.py +++ b/sdk/python/pulumi_azure/containerservice/kubernetes_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -197,125 +197,354 @@ def __init__(__self__, *, > **Note:** Enabling this option will allocate Workload Identity resources to the `kube-system` namespace in Kubernetes. If you wish to customize the deployment of Workload Identity, you can refer to [the documentation on Azure AD Workload Identity.](https://azure.github.io/azure-workload-identity/docs/installation/mutating-admission-webhook.html) The documentation provides guidance on how to install the mutating admission webhook, which allows for the customization of Workload Identity deployment. """ - pulumi.set(__self__, "default_node_pool", default_node_pool) - pulumi.set(__self__, "resource_group_name", resource_group_name) + KubernetesClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_node_pool=default_node_pool, + resource_group_name=resource_group_name, + aci_connector_linux=aci_connector_linux, + api_server_access_profile=api_server_access_profile, + api_server_authorized_ip_ranges=api_server_authorized_ip_ranges, + auto_scaler_profile=auto_scaler_profile, + automatic_channel_upgrade=automatic_channel_upgrade, + azure_active_directory_role_based_access_control=azure_active_directory_role_based_access_control, + azure_policy_enabled=azure_policy_enabled, + confidential_computing=confidential_computing, + custom_ca_trust_certificates_base64s=custom_ca_trust_certificates_base64s, + disk_encryption_set_id=disk_encryption_set_id, + dns_prefix=dns_prefix, + dns_prefix_private_cluster=dns_prefix_private_cluster, + edge_zone=edge_zone, + enable_pod_security_policy=enable_pod_security_policy, + http_application_routing_enabled=http_application_routing_enabled, + http_proxy_config=http_proxy_config, + identity=identity, + image_cleaner_enabled=image_cleaner_enabled, + image_cleaner_interval_hours=image_cleaner_interval_hours, + ingress_application_gateway=ingress_application_gateway, + key_management_service=key_management_service, + key_vault_secrets_provider=key_vault_secrets_provider, + kubelet_identity=kubelet_identity, + kubernetes_version=kubernetes_version, + linux_profile=linux_profile, + local_account_disabled=local_account_disabled, + location=location, + maintenance_window=maintenance_window, + maintenance_window_auto_upgrade=maintenance_window_auto_upgrade, + maintenance_window_node_os=maintenance_window_node_os, + microsoft_defender=microsoft_defender, + monitor_metrics=monitor_metrics, + name=name, + network_profile=network_profile, + node_os_channel_upgrade=node_os_channel_upgrade, + node_resource_group=node_resource_group, + oidc_issuer_enabled=oidc_issuer_enabled, + oms_agent=oms_agent, + open_service_mesh_enabled=open_service_mesh_enabled, + private_cluster_enabled=private_cluster_enabled, + private_cluster_public_fqdn_enabled=private_cluster_public_fqdn_enabled, + private_dns_zone_id=private_dns_zone_id, + public_network_access_enabled=public_network_access_enabled, + role_based_access_control_enabled=role_based_access_control_enabled, + run_command_enabled=run_command_enabled, + service_mesh_profile=service_mesh_profile, + service_principal=service_principal, + sku_tier=sku_tier, + storage_profile=storage_profile, + tags=tags, + web_app_routing=web_app_routing, + windows_profile=windows_profile, + workload_autoscaler_profile=workload_autoscaler_profile, + workload_identity_enabled=workload_identity_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_node_pool: Optional[pulumi.Input['KubernetesClusterDefaultNodePoolArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + aci_connector_linux: Optional[pulumi.Input['KubernetesClusterAciConnectorLinuxArgs']] = None, + api_server_access_profile: Optional[pulumi.Input['KubernetesClusterApiServerAccessProfileArgs']] = None, + api_server_authorized_ip_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + auto_scaler_profile: Optional[pulumi.Input['KubernetesClusterAutoScalerProfileArgs']] = None, + automatic_channel_upgrade: Optional[pulumi.Input[str]] = None, + azure_active_directory_role_based_access_control: Optional[pulumi.Input['KubernetesClusterAzureActiveDirectoryRoleBasedAccessControlArgs']] = None, + azure_policy_enabled: Optional[pulumi.Input[bool]] = None, + confidential_computing: Optional[pulumi.Input['KubernetesClusterConfidentialComputingArgs']] = None, + custom_ca_trust_certificates_base64s: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + dns_prefix: Optional[pulumi.Input[str]] = None, + dns_prefix_private_cluster: Optional[pulumi.Input[str]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + enable_pod_security_policy: Optional[pulumi.Input[bool]] = None, + http_application_routing_enabled: Optional[pulumi.Input[bool]] = None, + http_proxy_config: Optional[pulumi.Input['KubernetesClusterHttpProxyConfigArgs']] = None, + identity: Optional[pulumi.Input['KubernetesClusterIdentityArgs']] = None, + image_cleaner_enabled: Optional[pulumi.Input[bool]] = None, + image_cleaner_interval_hours: Optional[pulumi.Input[int]] = None, + ingress_application_gateway: Optional[pulumi.Input['KubernetesClusterIngressApplicationGatewayArgs']] = None, + key_management_service: Optional[pulumi.Input['KubernetesClusterKeyManagementServiceArgs']] = None, + key_vault_secrets_provider: Optional[pulumi.Input['KubernetesClusterKeyVaultSecretsProviderArgs']] = None, + kubelet_identity: Optional[pulumi.Input['KubernetesClusterKubeletIdentityArgs']] = None, + kubernetes_version: Optional[pulumi.Input[str]] = None, + linux_profile: Optional[pulumi.Input['KubernetesClusterLinuxProfileArgs']] = None, + local_account_disabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_window: Optional[pulumi.Input['KubernetesClusterMaintenanceWindowArgs']] = None, + maintenance_window_auto_upgrade: Optional[pulumi.Input['KubernetesClusterMaintenanceWindowAutoUpgradeArgs']] = None, + maintenance_window_node_os: Optional[pulumi.Input['KubernetesClusterMaintenanceWindowNodeOsArgs']] = None, + microsoft_defender: Optional[pulumi.Input['KubernetesClusterMicrosoftDefenderArgs']] = None, + monitor_metrics: Optional[pulumi.Input['KubernetesClusterMonitorMetricsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network_profile: Optional[pulumi.Input['KubernetesClusterNetworkProfileArgs']] = None, + node_os_channel_upgrade: Optional[pulumi.Input[str]] = None, + node_resource_group: Optional[pulumi.Input[str]] = None, + oidc_issuer_enabled: Optional[pulumi.Input[bool]] = None, + oms_agent: Optional[pulumi.Input['KubernetesClusterOmsAgentArgs']] = None, + open_service_mesh_enabled: Optional[pulumi.Input[bool]] = None, + private_cluster_enabled: Optional[pulumi.Input[bool]] = None, + private_cluster_public_fqdn_enabled: Optional[pulumi.Input[bool]] = None, + private_dns_zone_id: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + role_based_access_control_enabled: Optional[pulumi.Input[bool]] = None, + run_command_enabled: Optional[pulumi.Input[bool]] = None, + service_mesh_profile: Optional[pulumi.Input['KubernetesClusterServiceMeshProfileArgs']] = None, + service_principal: Optional[pulumi.Input['KubernetesClusterServicePrincipalArgs']] = None, + sku_tier: Optional[pulumi.Input[str]] = None, + storage_profile: Optional[pulumi.Input['KubernetesClusterStorageProfileArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + web_app_routing: Optional[pulumi.Input['KubernetesClusterWebAppRoutingArgs']] = None, + windows_profile: Optional[pulumi.Input['KubernetesClusterWindowsProfileArgs']] = None, + workload_autoscaler_profile: Optional[pulumi.Input['KubernetesClusterWorkloadAutoscalerProfileArgs']] = None, + workload_identity_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_node_pool is None and 'defaultNodePool' in kwargs: + default_node_pool = kwargs['defaultNodePool'] + if default_node_pool is None: + raise TypeError("Missing 'default_node_pool' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if aci_connector_linux is None and 'aciConnectorLinux' in kwargs: + aci_connector_linux = kwargs['aciConnectorLinux'] + if api_server_access_profile is None and 'apiServerAccessProfile' in kwargs: + api_server_access_profile = kwargs['apiServerAccessProfile'] + if api_server_authorized_ip_ranges is None and 'apiServerAuthorizedIpRanges' in kwargs: + api_server_authorized_ip_ranges = kwargs['apiServerAuthorizedIpRanges'] + if auto_scaler_profile is None and 'autoScalerProfile' in kwargs: + auto_scaler_profile = kwargs['autoScalerProfile'] + if automatic_channel_upgrade is None and 'automaticChannelUpgrade' in kwargs: + automatic_channel_upgrade = kwargs['automaticChannelUpgrade'] + if azure_active_directory_role_based_access_control is None and 'azureActiveDirectoryRoleBasedAccessControl' in kwargs: + azure_active_directory_role_based_access_control = kwargs['azureActiveDirectoryRoleBasedAccessControl'] + if azure_policy_enabled is None and 'azurePolicyEnabled' in kwargs: + azure_policy_enabled = kwargs['azurePolicyEnabled'] + if confidential_computing is None and 'confidentialComputing' in kwargs: + confidential_computing = kwargs['confidentialComputing'] + if custom_ca_trust_certificates_base64s is None and 'customCaTrustCertificatesBase64s' in kwargs: + custom_ca_trust_certificates_base64s = kwargs['customCaTrustCertificatesBase64s'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if dns_prefix is None and 'dnsPrefix' in kwargs: + dns_prefix = kwargs['dnsPrefix'] + if dns_prefix_private_cluster is None and 'dnsPrefixPrivateCluster' in kwargs: + dns_prefix_private_cluster = kwargs['dnsPrefixPrivateCluster'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if enable_pod_security_policy is None and 'enablePodSecurityPolicy' in kwargs: + enable_pod_security_policy = kwargs['enablePodSecurityPolicy'] + if http_application_routing_enabled is None and 'httpApplicationRoutingEnabled' in kwargs: + http_application_routing_enabled = kwargs['httpApplicationRoutingEnabled'] + if http_proxy_config is None and 'httpProxyConfig' in kwargs: + http_proxy_config = kwargs['httpProxyConfig'] + if image_cleaner_enabled is None and 'imageCleanerEnabled' in kwargs: + image_cleaner_enabled = kwargs['imageCleanerEnabled'] + if image_cleaner_interval_hours is None and 'imageCleanerIntervalHours' in kwargs: + image_cleaner_interval_hours = kwargs['imageCleanerIntervalHours'] + if ingress_application_gateway is None and 'ingressApplicationGateway' in kwargs: + ingress_application_gateway = kwargs['ingressApplicationGateway'] + if key_management_service is None and 'keyManagementService' in kwargs: + key_management_service = kwargs['keyManagementService'] + if key_vault_secrets_provider is None and 'keyVaultSecretsProvider' in kwargs: + key_vault_secrets_provider = kwargs['keyVaultSecretsProvider'] + if kubelet_identity is None and 'kubeletIdentity' in kwargs: + kubelet_identity = kwargs['kubeletIdentity'] + if kubernetes_version is None and 'kubernetesVersion' in kwargs: + kubernetes_version = kwargs['kubernetesVersion'] + if linux_profile is None and 'linuxProfile' in kwargs: + linux_profile = kwargs['linuxProfile'] + if local_account_disabled is None and 'localAccountDisabled' in kwargs: + local_account_disabled = kwargs['localAccountDisabled'] + if maintenance_window is None and 'maintenanceWindow' in kwargs: + maintenance_window = kwargs['maintenanceWindow'] + if maintenance_window_auto_upgrade is None and 'maintenanceWindowAutoUpgrade' in kwargs: + maintenance_window_auto_upgrade = kwargs['maintenanceWindowAutoUpgrade'] + if maintenance_window_node_os is None and 'maintenanceWindowNodeOs' in kwargs: + maintenance_window_node_os = kwargs['maintenanceWindowNodeOs'] + if microsoft_defender is None and 'microsoftDefender' in kwargs: + microsoft_defender = kwargs['microsoftDefender'] + if monitor_metrics is None and 'monitorMetrics' in kwargs: + monitor_metrics = kwargs['monitorMetrics'] + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if node_os_channel_upgrade is None and 'nodeOsChannelUpgrade' in kwargs: + node_os_channel_upgrade = kwargs['nodeOsChannelUpgrade'] + if node_resource_group is None and 'nodeResourceGroup' in kwargs: + node_resource_group = kwargs['nodeResourceGroup'] + if oidc_issuer_enabled is None and 'oidcIssuerEnabled' in kwargs: + oidc_issuer_enabled = kwargs['oidcIssuerEnabled'] + if oms_agent is None and 'omsAgent' in kwargs: + oms_agent = kwargs['omsAgent'] + if open_service_mesh_enabled is None and 'openServiceMeshEnabled' in kwargs: + open_service_mesh_enabled = kwargs['openServiceMeshEnabled'] + if private_cluster_enabled is None and 'privateClusterEnabled' in kwargs: + private_cluster_enabled = kwargs['privateClusterEnabled'] + if private_cluster_public_fqdn_enabled is None and 'privateClusterPublicFqdnEnabled' in kwargs: + private_cluster_public_fqdn_enabled = kwargs['privateClusterPublicFqdnEnabled'] + if private_dns_zone_id is None and 'privateDnsZoneId' in kwargs: + private_dns_zone_id = kwargs['privateDnsZoneId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if role_based_access_control_enabled is None and 'roleBasedAccessControlEnabled' in kwargs: + role_based_access_control_enabled = kwargs['roleBasedAccessControlEnabled'] + if run_command_enabled is None and 'runCommandEnabled' in kwargs: + run_command_enabled = kwargs['runCommandEnabled'] + if service_mesh_profile is None and 'serviceMeshProfile' in kwargs: + service_mesh_profile = kwargs['serviceMeshProfile'] + if service_principal is None and 'servicePrincipal' in kwargs: + service_principal = kwargs['servicePrincipal'] + if sku_tier is None and 'skuTier' in kwargs: + sku_tier = kwargs['skuTier'] + if storage_profile is None and 'storageProfile' in kwargs: + storage_profile = kwargs['storageProfile'] + if web_app_routing is None and 'webAppRouting' in kwargs: + web_app_routing = kwargs['webAppRouting'] + if windows_profile is None and 'windowsProfile' in kwargs: + windows_profile = kwargs['windowsProfile'] + if workload_autoscaler_profile is None and 'workloadAutoscalerProfile' in kwargs: + workload_autoscaler_profile = kwargs['workloadAutoscalerProfile'] + if workload_identity_enabled is None and 'workloadIdentityEnabled' in kwargs: + workload_identity_enabled = kwargs['workloadIdentityEnabled'] + + _setter("default_node_pool", default_node_pool) + _setter("resource_group_name", resource_group_name) if aci_connector_linux is not None: - pulumi.set(__self__, "aci_connector_linux", aci_connector_linux) + _setter("aci_connector_linux", aci_connector_linux) if api_server_access_profile is not None: - pulumi.set(__self__, "api_server_access_profile", api_server_access_profile) + _setter("api_server_access_profile", api_server_access_profile) if api_server_authorized_ip_ranges is not None: warnings.warn("""This property has been renamed to `authorized_ip_ranges` within the `api_server_access_profile` block and will be removed in v4.0 of the provider""", DeprecationWarning) pulumi.log.warn("""api_server_authorized_ip_ranges is deprecated: This property has been renamed to `authorized_ip_ranges` within the `api_server_access_profile` block and will be removed in v4.0 of the provider""") if api_server_authorized_ip_ranges is not None: - pulumi.set(__self__, "api_server_authorized_ip_ranges", api_server_authorized_ip_ranges) + _setter("api_server_authorized_ip_ranges", api_server_authorized_ip_ranges) if auto_scaler_profile is not None: - pulumi.set(__self__, "auto_scaler_profile", auto_scaler_profile) + _setter("auto_scaler_profile", auto_scaler_profile) if automatic_channel_upgrade is not None: - pulumi.set(__self__, "automatic_channel_upgrade", automatic_channel_upgrade) + _setter("automatic_channel_upgrade", automatic_channel_upgrade) if azure_active_directory_role_based_access_control is not None: - pulumi.set(__self__, "azure_active_directory_role_based_access_control", azure_active_directory_role_based_access_control) + _setter("azure_active_directory_role_based_access_control", azure_active_directory_role_based_access_control) if azure_policy_enabled is not None: - pulumi.set(__self__, "azure_policy_enabled", azure_policy_enabled) + _setter("azure_policy_enabled", azure_policy_enabled) if confidential_computing is not None: - pulumi.set(__self__, "confidential_computing", confidential_computing) + _setter("confidential_computing", confidential_computing) if custom_ca_trust_certificates_base64s is not None: - pulumi.set(__self__, "custom_ca_trust_certificates_base64s", custom_ca_trust_certificates_base64s) + _setter("custom_ca_trust_certificates_base64s", custom_ca_trust_certificates_base64s) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if dns_prefix is not None: - pulumi.set(__self__, "dns_prefix", dns_prefix) + _setter("dns_prefix", dns_prefix) if dns_prefix_private_cluster is not None: - pulumi.set(__self__, "dns_prefix_private_cluster", dns_prefix_private_cluster) + _setter("dns_prefix_private_cluster", dns_prefix_private_cluster) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if enable_pod_security_policy is not None: warnings.warn("""The AKS API has removed support for this field on 2020-10-15 and is no longer possible to configure this the Pod Security Policy.""", DeprecationWarning) pulumi.log.warn("""enable_pod_security_policy is deprecated: The AKS API has removed support for this field on 2020-10-15 and is no longer possible to configure this the Pod Security Policy.""") if enable_pod_security_policy is not None: - pulumi.set(__self__, "enable_pod_security_policy", enable_pod_security_policy) + _setter("enable_pod_security_policy", enable_pod_security_policy) if http_application_routing_enabled is not None: - pulumi.set(__self__, "http_application_routing_enabled", http_application_routing_enabled) + _setter("http_application_routing_enabled", http_application_routing_enabled) if http_proxy_config is not None: - pulumi.set(__self__, "http_proxy_config", http_proxy_config) + _setter("http_proxy_config", http_proxy_config) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if image_cleaner_enabled is not None: - pulumi.set(__self__, "image_cleaner_enabled", image_cleaner_enabled) + _setter("image_cleaner_enabled", image_cleaner_enabled) if image_cleaner_interval_hours is not None: - pulumi.set(__self__, "image_cleaner_interval_hours", image_cleaner_interval_hours) + _setter("image_cleaner_interval_hours", image_cleaner_interval_hours) if ingress_application_gateway is not None: - pulumi.set(__self__, "ingress_application_gateway", ingress_application_gateway) + _setter("ingress_application_gateway", ingress_application_gateway) if key_management_service is not None: - pulumi.set(__self__, "key_management_service", key_management_service) + _setter("key_management_service", key_management_service) if key_vault_secrets_provider is not None: - pulumi.set(__self__, "key_vault_secrets_provider", key_vault_secrets_provider) + _setter("key_vault_secrets_provider", key_vault_secrets_provider) if kubelet_identity is not None: - pulumi.set(__self__, "kubelet_identity", kubelet_identity) + _setter("kubelet_identity", kubelet_identity) if kubernetes_version is not None: - pulumi.set(__self__, "kubernetes_version", kubernetes_version) + _setter("kubernetes_version", kubernetes_version) if linux_profile is not None: - pulumi.set(__self__, "linux_profile", linux_profile) + _setter("linux_profile", linux_profile) if local_account_disabled is not None: - pulumi.set(__self__, "local_account_disabled", local_account_disabled) + _setter("local_account_disabled", local_account_disabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_window is not None: - pulumi.set(__self__, "maintenance_window", maintenance_window) + _setter("maintenance_window", maintenance_window) if maintenance_window_auto_upgrade is not None: - pulumi.set(__self__, "maintenance_window_auto_upgrade", maintenance_window_auto_upgrade) + _setter("maintenance_window_auto_upgrade", maintenance_window_auto_upgrade) if maintenance_window_node_os is not None: - pulumi.set(__self__, "maintenance_window_node_os", maintenance_window_node_os) + _setter("maintenance_window_node_os", maintenance_window_node_os) if microsoft_defender is not None: - pulumi.set(__self__, "microsoft_defender", microsoft_defender) + _setter("microsoft_defender", microsoft_defender) if monitor_metrics is not None: - pulumi.set(__self__, "monitor_metrics", monitor_metrics) + _setter("monitor_metrics", monitor_metrics) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_profile is not None: - pulumi.set(__self__, "network_profile", network_profile) + _setter("network_profile", network_profile) if node_os_channel_upgrade is not None: - pulumi.set(__self__, "node_os_channel_upgrade", node_os_channel_upgrade) + _setter("node_os_channel_upgrade", node_os_channel_upgrade) if node_resource_group is not None: - pulumi.set(__self__, "node_resource_group", node_resource_group) + _setter("node_resource_group", node_resource_group) if oidc_issuer_enabled is not None: - pulumi.set(__self__, "oidc_issuer_enabled", oidc_issuer_enabled) + _setter("oidc_issuer_enabled", oidc_issuer_enabled) if oms_agent is not None: - pulumi.set(__self__, "oms_agent", oms_agent) + _setter("oms_agent", oms_agent) if open_service_mesh_enabled is not None: - pulumi.set(__self__, "open_service_mesh_enabled", open_service_mesh_enabled) + _setter("open_service_mesh_enabled", open_service_mesh_enabled) if private_cluster_enabled is not None: - pulumi.set(__self__, "private_cluster_enabled", private_cluster_enabled) + _setter("private_cluster_enabled", private_cluster_enabled) if private_cluster_public_fqdn_enabled is not None: - pulumi.set(__self__, "private_cluster_public_fqdn_enabled", private_cluster_public_fqdn_enabled) + _setter("private_cluster_public_fqdn_enabled", private_cluster_public_fqdn_enabled) if private_dns_zone_id is not None: - pulumi.set(__self__, "private_dns_zone_id", private_dns_zone_id) + _setter("private_dns_zone_id", private_dns_zone_id) if public_network_access_enabled is not None: warnings.warn("""`public_network_access_enabled` is currently not functional and is not be passed to the API""", DeprecationWarning) pulumi.log.warn("""public_network_access_enabled is deprecated: `public_network_access_enabled` is currently not functional and is not be passed to the API""") if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if role_based_access_control_enabled is not None: - pulumi.set(__self__, "role_based_access_control_enabled", role_based_access_control_enabled) + _setter("role_based_access_control_enabled", role_based_access_control_enabled) if run_command_enabled is not None: - pulumi.set(__self__, "run_command_enabled", run_command_enabled) + _setter("run_command_enabled", run_command_enabled) if service_mesh_profile is not None: - pulumi.set(__self__, "service_mesh_profile", service_mesh_profile) + _setter("service_mesh_profile", service_mesh_profile) if service_principal is not None: - pulumi.set(__self__, "service_principal", service_principal) + _setter("service_principal", service_principal) if sku_tier is not None: - pulumi.set(__self__, "sku_tier", sku_tier) + _setter("sku_tier", sku_tier) if storage_profile is not None: - pulumi.set(__self__, "storage_profile", storage_profile) + _setter("storage_profile", storage_profile) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if web_app_routing is not None: - pulumi.set(__self__, "web_app_routing", web_app_routing) + _setter("web_app_routing", web_app_routing) if windows_profile is not None: - pulumi.set(__self__, "windows_profile", windows_profile) + _setter("windows_profile", windows_profile) if workload_autoscaler_profile is not None: - pulumi.set(__self__, "workload_autoscaler_profile", workload_autoscaler_profile) + _setter("workload_autoscaler_profile", workload_autoscaler_profile) if workload_identity_enabled is not None: - pulumi.set(__self__, "workload_identity_enabled", workload_identity_enabled) + _setter("workload_identity_enabled", workload_identity_enabled) @property @pulumi.getter(name="defaultNodePool") @@ -1265,147 +1494,410 @@ def __init__(__self__, *, > **Note:** Enabling this option will allocate Workload Identity resources to the `kube-system` namespace in Kubernetes. If you wish to customize the deployment of Workload Identity, you can refer to [the documentation on Azure AD Workload Identity.](https://azure.github.io/azure-workload-identity/docs/installation/mutating-admission-webhook.html) The documentation provides guidance on how to install the mutating admission webhook, which allows for the customization of Workload Identity deployment. """ + _KubernetesClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + aci_connector_linux=aci_connector_linux, + api_server_access_profile=api_server_access_profile, + api_server_authorized_ip_ranges=api_server_authorized_ip_ranges, + auto_scaler_profile=auto_scaler_profile, + automatic_channel_upgrade=automatic_channel_upgrade, + azure_active_directory_role_based_access_control=azure_active_directory_role_based_access_control, + azure_policy_enabled=azure_policy_enabled, + confidential_computing=confidential_computing, + custom_ca_trust_certificates_base64s=custom_ca_trust_certificates_base64s, + default_node_pool=default_node_pool, + disk_encryption_set_id=disk_encryption_set_id, + dns_prefix=dns_prefix, + dns_prefix_private_cluster=dns_prefix_private_cluster, + edge_zone=edge_zone, + enable_pod_security_policy=enable_pod_security_policy, + fqdn=fqdn, + http_application_routing_enabled=http_application_routing_enabled, + http_application_routing_zone_name=http_application_routing_zone_name, + http_proxy_config=http_proxy_config, + identity=identity, + image_cleaner_enabled=image_cleaner_enabled, + image_cleaner_interval_hours=image_cleaner_interval_hours, + ingress_application_gateway=ingress_application_gateway, + key_management_service=key_management_service, + key_vault_secrets_provider=key_vault_secrets_provider, + kube_admin_config_raw=kube_admin_config_raw, + kube_admin_configs=kube_admin_configs, + kube_config_raw=kube_config_raw, + kube_configs=kube_configs, + kubelet_identity=kubelet_identity, + kubernetes_version=kubernetes_version, + linux_profile=linux_profile, + local_account_disabled=local_account_disabled, + location=location, + maintenance_window=maintenance_window, + maintenance_window_auto_upgrade=maintenance_window_auto_upgrade, + maintenance_window_node_os=maintenance_window_node_os, + microsoft_defender=microsoft_defender, + monitor_metrics=monitor_metrics, + name=name, + network_profile=network_profile, + node_os_channel_upgrade=node_os_channel_upgrade, + node_resource_group=node_resource_group, + node_resource_group_id=node_resource_group_id, + oidc_issuer_enabled=oidc_issuer_enabled, + oidc_issuer_url=oidc_issuer_url, + oms_agent=oms_agent, + open_service_mesh_enabled=open_service_mesh_enabled, + portal_fqdn=portal_fqdn, + private_cluster_enabled=private_cluster_enabled, + private_cluster_public_fqdn_enabled=private_cluster_public_fqdn_enabled, + private_dns_zone_id=private_dns_zone_id, + private_fqdn=private_fqdn, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + role_based_access_control_enabled=role_based_access_control_enabled, + run_command_enabled=run_command_enabled, + service_mesh_profile=service_mesh_profile, + service_principal=service_principal, + sku_tier=sku_tier, + storage_profile=storage_profile, + tags=tags, + web_app_routing=web_app_routing, + windows_profile=windows_profile, + workload_autoscaler_profile=workload_autoscaler_profile, + workload_identity_enabled=workload_identity_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aci_connector_linux: Optional[pulumi.Input['KubernetesClusterAciConnectorLinuxArgs']] = None, + api_server_access_profile: Optional[pulumi.Input['KubernetesClusterApiServerAccessProfileArgs']] = None, + api_server_authorized_ip_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + auto_scaler_profile: Optional[pulumi.Input['KubernetesClusterAutoScalerProfileArgs']] = None, + automatic_channel_upgrade: Optional[pulumi.Input[str]] = None, + azure_active_directory_role_based_access_control: Optional[pulumi.Input['KubernetesClusterAzureActiveDirectoryRoleBasedAccessControlArgs']] = None, + azure_policy_enabled: Optional[pulumi.Input[bool]] = None, + confidential_computing: Optional[pulumi.Input['KubernetesClusterConfidentialComputingArgs']] = None, + custom_ca_trust_certificates_base64s: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_node_pool: Optional[pulumi.Input['KubernetesClusterDefaultNodePoolArgs']] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + dns_prefix: Optional[pulumi.Input[str]] = None, + dns_prefix_private_cluster: Optional[pulumi.Input[str]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + enable_pod_security_policy: Optional[pulumi.Input[bool]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + http_application_routing_enabled: Optional[pulumi.Input[bool]] = None, + http_application_routing_zone_name: Optional[pulumi.Input[str]] = None, + http_proxy_config: Optional[pulumi.Input['KubernetesClusterHttpProxyConfigArgs']] = None, + identity: Optional[pulumi.Input['KubernetesClusterIdentityArgs']] = None, + image_cleaner_enabled: Optional[pulumi.Input[bool]] = None, + image_cleaner_interval_hours: Optional[pulumi.Input[int]] = None, + ingress_application_gateway: Optional[pulumi.Input['KubernetesClusterIngressApplicationGatewayArgs']] = None, + key_management_service: Optional[pulumi.Input['KubernetesClusterKeyManagementServiceArgs']] = None, + key_vault_secrets_provider: Optional[pulumi.Input['KubernetesClusterKeyVaultSecretsProviderArgs']] = None, + kube_admin_config_raw: Optional[pulumi.Input[str]] = None, + kube_admin_configs: Optional[pulumi.Input[Sequence[pulumi.Input['KubernetesClusterKubeAdminConfigArgs']]]] = None, + kube_config_raw: Optional[pulumi.Input[str]] = None, + kube_configs: Optional[pulumi.Input[Sequence[pulumi.Input['KubernetesClusterKubeConfigArgs']]]] = None, + kubelet_identity: Optional[pulumi.Input['KubernetesClusterKubeletIdentityArgs']] = None, + kubernetes_version: Optional[pulumi.Input[str]] = None, + linux_profile: Optional[pulumi.Input['KubernetesClusterLinuxProfileArgs']] = None, + local_account_disabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_window: Optional[pulumi.Input['KubernetesClusterMaintenanceWindowArgs']] = None, + maintenance_window_auto_upgrade: Optional[pulumi.Input['KubernetesClusterMaintenanceWindowAutoUpgradeArgs']] = None, + maintenance_window_node_os: Optional[pulumi.Input['KubernetesClusterMaintenanceWindowNodeOsArgs']] = None, + microsoft_defender: Optional[pulumi.Input['KubernetesClusterMicrosoftDefenderArgs']] = None, + monitor_metrics: Optional[pulumi.Input['KubernetesClusterMonitorMetricsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network_profile: Optional[pulumi.Input['KubernetesClusterNetworkProfileArgs']] = None, + node_os_channel_upgrade: Optional[pulumi.Input[str]] = None, + node_resource_group: Optional[pulumi.Input[str]] = None, + node_resource_group_id: Optional[pulumi.Input[str]] = None, + oidc_issuer_enabled: Optional[pulumi.Input[bool]] = None, + oidc_issuer_url: Optional[pulumi.Input[str]] = None, + oms_agent: Optional[pulumi.Input['KubernetesClusterOmsAgentArgs']] = None, + open_service_mesh_enabled: Optional[pulumi.Input[bool]] = None, + portal_fqdn: Optional[pulumi.Input[str]] = None, + private_cluster_enabled: Optional[pulumi.Input[bool]] = None, + private_cluster_public_fqdn_enabled: Optional[pulumi.Input[bool]] = None, + private_dns_zone_id: Optional[pulumi.Input[str]] = None, + private_fqdn: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + role_based_access_control_enabled: Optional[pulumi.Input[bool]] = None, + run_command_enabled: Optional[pulumi.Input[bool]] = None, + service_mesh_profile: Optional[pulumi.Input['KubernetesClusterServiceMeshProfileArgs']] = None, + service_principal: Optional[pulumi.Input['KubernetesClusterServicePrincipalArgs']] = None, + sku_tier: Optional[pulumi.Input[str]] = None, + storage_profile: Optional[pulumi.Input['KubernetesClusterStorageProfileArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + web_app_routing: Optional[pulumi.Input['KubernetesClusterWebAppRoutingArgs']] = None, + windows_profile: Optional[pulumi.Input['KubernetesClusterWindowsProfileArgs']] = None, + workload_autoscaler_profile: Optional[pulumi.Input['KubernetesClusterWorkloadAutoscalerProfileArgs']] = None, + workload_identity_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aci_connector_linux is None and 'aciConnectorLinux' in kwargs: + aci_connector_linux = kwargs['aciConnectorLinux'] + if api_server_access_profile is None and 'apiServerAccessProfile' in kwargs: + api_server_access_profile = kwargs['apiServerAccessProfile'] + if api_server_authorized_ip_ranges is None and 'apiServerAuthorizedIpRanges' in kwargs: + api_server_authorized_ip_ranges = kwargs['apiServerAuthorizedIpRanges'] + if auto_scaler_profile is None and 'autoScalerProfile' in kwargs: + auto_scaler_profile = kwargs['autoScalerProfile'] + if automatic_channel_upgrade is None and 'automaticChannelUpgrade' in kwargs: + automatic_channel_upgrade = kwargs['automaticChannelUpgrade'] + if azure_active_directory_role_based_access_control is None and 'azureActiveDirectoryRoleBasedAccessControl' in kwargs: + azure_active_directory_role_based_access_control = kwargs['azureActiveDirectoryRoleBasedAccessControl'] + if azure_policy_enabled is None and 'azurePolicyEnabled' in kwargs: + azure_policy_enabled = kwargs['azurePolicyEnabled'] + if confidential_computing is None and 'confidentialComputing' in kwargs: + confidential_computing = kwargs['confidentialComputing'] + if custom_ca_trust_certificates_base64s is None and 'customCaTrustCertificatesBase64s' in kwargs: + custom_ca_trust_certificates_base64s = kwargs['customCaTrustCertificatesBase64s'] + if default_node_pool is None and 'defaultNodePool' in kwargs: + default_node_pool = kwargs['defaultNodePool'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if dns_prefix is None and 'dnsPrefix' in kwargs: + dns_prefix = kwargs['dnsPrefix'] + if dns_prefix_private_cluster is None and 'dnsPrefixPrivateCluster' in kwargs: + dns_prefix_private_cluster = kwargs['dnsPrefixPrivateCluster'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if enable_pod_security_policy is None and 'enablePodSecurityPolicy' in kwargs: + enable_pod_security_policy = kwargs['enablePodSecurityPolicy'] + if http_application_routing_enabled is None and 'httpApplicationRoutingEnabled' in kwargs: + http_application_routing_enabled = kwargs['httpApplicationRoutingEnabled'] + if http_application_routing_zone_name is None and 'httpApplicationRoutingZoneName' in kwargs: + http_application_routing_zone_name = kwargs['httpApplicationRoutingZoneName'] + if http_proxy_config is None and 'httpProxyConfig' in kwargs: + http_proxy_config = kwargs['httpProxyConfig'] + if image_cleaner_enabled is None and 'imageCleanerEnabled' in kwargs: + image_cleaner_enabled = kwargs['imageCleanerEnabled'] + if image_cleaner_interval_hours is None and 'imageCleanerIntervalHours' in kwargs: + image_cleaner_interval_hours = kwargs['imageCleanerIntervalHours'] + if ingress_application_gateway is None and 'ingressApplicationGateway' in kwargs: + ingress_application_gateway = kwargs['ingressApplicationGateway'] + if key_management_service is None and 'keyManagementService' in kwargs: + key_management_service = kwargs['keyManagementService'] + if key_vault_secrets_provider is None and 'keyVaultSecretsProvider' in kwargs: + key_vault_secrets_provider = kwargs['keyVaultSecretsProvider'] + if kube_admin_config_raw is None and 'kubeAdminConfigRaw' in kwargs: + kube_admin_config_raw = kwargs['kubeAdminConfigRaw'] + if kube_admin_configs is None and 'kubeAdminConfigs' in kwargs: + kube_admin_configs = kwargs['kubeAdminConfigs'] + if kube_config_raw is None and 'kubeConfigRaw' in kwargs: + kube_config_raw = kwargs['kubeConfigRaw'] + if kube_configs is None and 'kubeConfigs' in kwargs: + kube_configs = kwargs['kubeConfigs'] + if kubelet_identity is None and 'kubeletIdentity' in kwargs: + kubelet_identity = kwargs['kubeletIdentity'] + if kubernetes_version is None and 'kubernetesVersion' in kwargs: + kubernetes_version = kwargs['kubernetesVersion'] + if linux_profile is None and 'linuxProfile' in kwargs: + linux_profile = kwargs['linuxProfile'] + if local_account_disabled is None and 'localAccountDisabled' in kwargs: + local_account_disabled = kwargs['localAccountDisabled'] + if maintenance_window is None and 'maintenanceWindow' in kwargs: + maintenance_window = kwargs['maintenanceWindow'] + if maintenance_window_auto_upgrade is None and 'maintenanceWindowAutoUpgrade' in kwargs: + maintenance_window_auto_upgrade = kwargs['maintenanceWindowAutoUpgrade'] + if maintenance_window_node_os is None and 'maintenanceWindowNodeOs' in kwargs: + maintenance_window_node_os = kwargs['maintenanceWindowNodeOs'] + if microsoft_defender is None and 'microsoftDefender' in kwargs: + microsoft_defender = kwargs['microsoftDefender'] + if monitor_metrics is None and 'monitorMetrics' in kwargs: + monitor_metrics = kwargs['monitorMetrics'] + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if node_os_channel_upgrade is None and 'nodeOsChannelUpgrade' in kwargs: + node_os_channel_upgrade = kwargs['nodeOsChannelUpgrade'] + if node_resource_group is None and 'nodeResourceGroup' in kwargs: + node_resource_group = kwargs['nodeResourceGroup'] + if node_resource_group_id is None and 'nodeResourceGroupId' in kwargs: + node_resource_group_id = kwargs['nodeResourceGroupId'] + if oidc_issuer_enabled is None and 'oidcIssuerEnabled' in kwargs: + oidc_issuer_enabled = kwargs['oidcIssuerEnabled'] + if oidc_issuer_url is None and 'oidcIssuerUrl' in kwargs: + oidc_issuer_url = kwargs['oidcIssuerUrl'] + if oms_agent is None and 'omsAgent' in kwargs: + oms_agent = kwargs['omsAgent'] + if open_service_mesh_enabled is None and 'openServiceMeshEnabled' in kwargs: + open_service_mesh_enabled = kwargs['openServiceMeshEnabled'] + if portal_fqdn is None and 'portalFqdn' in kwargs: + portal_fqdn = kwargs['portalFqdn'] + if private_cluster_enabled is None and 'privateClusterEnabled' in kwargs: + private_cluster_enabled = kwargs['privateClusterEnabled'] + if private_cluster_public_fqdn_enabled is None and 'privateClusterPublicFqdnEnabled' in kwargs: + private_cluster_public_fqdn_enabled = kwargs['privateClusterPublicFqdnEnabled'] + if private_dns_zone_id is None and 'privateDnsZoneId' in kwargs: + private_dns_zone_id = kwargs['privateDnsZoneId'] + if private_fqdn is None and 'privateFqdn' in kwargs: + private_fqdn = kwargs['privateFqdn'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if role_based_access_control_enabled is None and 'roleBasedAccessControlEnabled' in kwargs: + role_based_access_control_enabled = kwargs['roleBasedAccessControlEnabled'] + if run_command_enabled is None and 'runCommandEnabled' in kwargs: + run_command_enabled = kwargs['runCommandEnabled'] + if service_mesh_profile is None and 'serviceMeshProfile' in kwargs: + service_mesh_profile = kwargs['serviceMeshProfile'] + if service_principal is None and 'servicePrincipal' in kwargs: + service_principal = kwargs['servicePrincipal'] + if sku_tier is None and 'skuTier' in kwargs: + sku_tier = kwargs['skuTier'] + if storage_profile is None and 'storageProfile' in kwargs: + storage_profile = kwargs['storageProfile'] + if web_app_routing is None and 'webAppRouting' in kwargs: + web_app_routing = kwargs['webAppRouting'] + if windows_profile is None and 'windowsProfile' in kwargs: + windows_profile = kwargs['windowsProfile'] + if workload_autoscaler_profile is None and 'workloadAutoscalerProfile' in kwargs: + workload_autoscaler_profile = kwargs['workloadAutoscalerProfile'] + if workload_identity_enabled is None and 'workloadIdentityEnabled' in kwargs: + workload_identity_enabled = kwargs['workloadIdentityEnabled'] + if aci_connector_linux is not None: - pulumi.set(__self__, "aci_connector_linux", aci_connector_linux) + _setter("aci_connector_linux", aci_connector_linux) if api_server_access_profile is not None: - pulumi.set(__self__, "api_server_access_profile", api_server_access_profile) + _setter("api_server_access_profile", api_server_access_profile) if api_server_authorized_ip_ranges is not None: warnings.warn("""This property has been renamed to `authorized_ip_ranges` within the `api_server_access_profile` block and will be removed in v4.0 of the provider""", DeprecationWarning) pulumi.log.warn("""api_server_authorized_ip_ranges is deprecated: This property has been renamed to `authorized_ip_ranges` within the `api_server_access_profile` block and will be removed in v4.0 of the provider""") if api_server_authorized_ip_ranges is not None: - pulumi.set(__self__, "api_server_authorized_ip_ranges", api_server_authorized_ip_ranges) + _setter("api_server_authorized_ip_ranges", api_server_authorized_ip_ranges) if auto_scaler_profile is not None: - pulumi.set(__self__, "auto_scaler_profile", auto_scaler_profile) + _setter("auto_scaler_profile", auto_scaler_profile) if automatic_channel_upgrade is not None: - pulumi.set(__self__, "automatic_channel_upgrade", automatic_channel_upgrade) + _setter("automatic_channel_upgrade", automatic_channel_upgrade) if azure_active_directory_role_based_access_control is not None: - pulumi.set(__self__, "azure_active_directory_role_based_access_control", azure_active_directory_role_based_access_control) + _setter("azure_active_directory_role_based_access_control", azure_active_directory_role_based_access_control) if azure_policy_enabled is not None: - pulumi.set(__self__, "azure_policy_enabled", azure_policy_enabled) + _setter("azure_policy_enabled", azure_policy_enabled) if confidential_computing is not None: - pulumi.set(__self__, "confidential_computing", confidential_computing) + _setter("confidential_computing", confidential_computing) if custom_ca_trust_certificates_base64s is not None: - pulumi.set(__self__, "custom_ca_trust_certificates_base64s", custom_ca_trust_certificates_base64s) + _setter("custom_ca_trust_certificates_base64s", custom_ca_trust_certificates_base64s) if default_node_pool is not None: - pulumi.set(__self__, "default_node_pool", default_node_pool) + _setter("default_node_pool", default_node_pool) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if dns_prefix is not None: - pulumi.set(__self__, "dns_prefix", dns_prefix) + _setter("dns_prefix", dns_prefix) if dns_prefix_private_cluster is not None: - pulumi.set(__self__, "dns_prefix_private_cluster", dns_prefix_private_cluster) + _setter("dns_prefix_private_cluster", dns_prefix_private_cluster) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if enable_pod_security_policy is not None: warnings.warn("""The AKS API has removed support for this field on 2020-10-15 and is no longer possible to configure this the Pod Security Policy.""", DeprecationWarning) pulumi.log.warn("""enable_pod_security_policy is deprecated: The AKS API has removed support for this field on 2020-10-15 and is no longer possible to configure this the Pod Security Policy.""") if enable_pod_security_policy is not None: - pulumi.set(__self__, "enable_pod_security_policy", enable_pod_security_policy) + _setter("enable_pod_security_policy", enable_pod_security_policy) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if http_application_routing_enabled is not None: - pulumi.set(__self__, "http_application_routing_enabled", http_application_routing_enabled) + _setter("http_application_routing_enabled", http_application_routing_enabled) if http_application_routing_zone_name is not None: - pulumi.set(__self__, "http_application_routing_zone_name", http_application_routing_zone_name) + _setter("http_application_routing_zone_name", http_application_routing_zone_name) if http_proxy_config is not None: - pulumi.set(__self__, "http_proxy_config", http_proxy_config) + _setter("http_proxy_config", http_proxy_config) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if image_cleaner_enabled is not None: - pulumi.set(__self__, "image_cleaner_enabled", image_cleaner_enabled) + _setter("image_cleaner_enabled", image_cleaner_enabled) if image_cleaner_interval_hours is not None: - pulumi.set(__self__, "image_cleaner_interval_hours", image_cleaner_interval_hours) + _setter("image_cleaner_interval_hours", image_cleaner_interval_hours) if ingress_application_gateway is not None: - pulumi.set(__self__, "ingress_application_gateway", ingress_application_gateway) + _setter("ingress_application_gateway", ingress_application_gateway) if key_management_service is not None: - pulumi.set(__self__, "key_management_service", key_management_service) + _setter("key_management_service", key_management_service) if key_vault_secrets_provider is not None: - pulumi.set(__self__, "key_vault_secrets_provider", key_vault_secrets_provider) + _setter("key_vault_secrets_provider", key_vault_secrets_provider) if kube_admin_config_raw is not None: - pulumi.set(__self__, "kube_admin_config_raw", kube_admin_config_raw) + _setter("kube_admin_config_raw", kube_admin_config_raw) if kube_admin_configs is not None: - pulumi.set(__self__, "kube_admin_configs", kube_admin_configs) + _setter("kube_admin_configs", kube_admin_configs) if kube_config_raw is not None: - pulumi.set(__self__, "kube_config_raw", kube_config_raw) + _setter("kube_config_raw", kube_config_raw) if kube_configs is not None: - pulumi.set(__self__, "kube_configs", kube_configs) + _setter("kube_configs", kube_configs) if kubelet_identity is not None: - pulumi.set(__self__, "kubelet_identity", kubelet_identity) + _setter("kubelet_identity", kubelet_identity) if kubernetes_version is not None: - pulumi.set(__self__, "kubernetes_version", kubernetes_version) + _setter("kubernetes_version", kubernetes_version) if linux_profile is not None: - pulumi.set(__self__, "linux_profile", linux_profile) + _setter("linux_profile", linux_profile) if local_account_disabled is not None: - pulumi.set(__self__, "local_account_disabled", local_account_disabled) + _setter("local_account_disabled", local_account_disabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_window is not None: - pulumi.set(__self__, "maintenance_window", maintenance_window) + _setter("maintenance_window", maintenance_window) if maintenance_window_auto_upgrade is not None: - pulumi.set(__self__, "maintenance_window_auto_upgrade", maintenance_window_auto_upgrade) + _setter("maintenance_window_auto_upgrade", maintenance_window_auto_upgrade) if maintenance_window_node_os is not None: - pulumi.set(__self__, "maintenance_window_node_os", maintenance_window_node_os) + _setter("maintenance_window_node_os", maintenance_window_node_os) if microsoft_defender is not None: - pulumi.set(__self__, "microsoft_defender", microsoft_defender) + _setter("microsoft_defender", microsoft_defender) if monitor_metrics is not None: - pulumi.set(__self__, "monitor_metrics", monitor_metrics) + _setter("monitor_metrics", monitor_metrics) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_profile is not None: - pulumi.set(__self__, "network_profile", network_profile) + _setter("network_profile", network_profile) if node_os_channel_upgrade is not None: - pulumi.set(__self__, "node_os_channel_upgrade", node_os_channel_upgrade) + _setter("node_os_channel_upgrade", node_os_channel_upgrade) if node_resource_group is not None: - pulumi.set(__self__, "node_resource_group", node_resource_group) + _setter("node_resource_group", node_resource_group) if node_resource_group_id is not None: - pulumi.set(__self__, "node_resource_group_id", node_resource_group_id) + _setter("node_resource_group_id", node_resource_group_id) if oidc_issuer_enabled is not None: - pulumi.set(__self__, "oidc_issuer_enabled", oidc_issuer_enabled) + _setter("oidc_issuer_enabled", oidc_issuer_enabled) if oidc_issuer_url is not None: - pulumi.set(__self__, "oidc_issuer_url", oidc_issuer_url) + _setter("oidc_issuer_url", oidc_issuer_url) if oms_agent is not None: - pulumi.set(__self__, "oms_agent", oms_agent) + _setter("oms_agent", oms_agent) if open_service_mesh_enabled is not None: - pulumi.set(__self__, "open_service_mesh_enabled", open_service_mesh_enabled) + _setter("open_service_mesh_enabled", open_service_mesh_enabled) if portal_fqdn is not None: - pulumi.set(__self__, "portal_fqdn", portal_fqdn) + _setter("portal_fqdn", portal_fqdn) if private_cluster_enabled is not None: - pulumi.set(__self__, "private_cluster_enabled", private_cluster_enabled) + _setter("private_cluster_enabled", private_cluster_enabled) if private_cluster_public_fqdn_enabled is not None: - pulumi.set(__self__, "private_cluster_public_fqdn_enabled", private_cluster_public_fqdn_enabled) + _setter("private_cluster_public_fqdn_enabled", private_cluster_public_fqdn_enabled) if private_dns_zone_id is not None: - pulumi.set(__self__, "private_dns_zone_id", private_dns_zone_id) + _setter("private_dns_zone_id", private_dns_zone_id) if private_fqdn is not None: - pulumi.set(__self__, "private_fqdn", private_fqdn) + _setter("private_fqdn", private_fqdn) if public_network_access_enabled is not None: warnings.warn("""`public_network_access_enabled` is currently not functional and is not be passed to the API""", DeprecationWarning) pulumi.log.warn("""public_network_access_enabled is deprecated: `public_network_access_enabled` is currently not functional and is not be passed to the API""") if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if role_based_access_control_enabled is not None: - pulumi.set(__self__, "role_based_access_control_enabled", role_based_access_control_enabled) + _setter("role_based_access_control_enabled", role_based_access_control_enabled) if run_command_enabled is not None: - pulumi.set(__self__, "run_command_enabled", run_command_enabled) + _setter("run_command_enabled", run_command_enabled) if service_mesh_profile is not None: - pulumi.set(__self__, "service_mesh_profile", service_mesh_profile) + _setter("service_mesh_profile", service_mesh_profile) if service_principal is not None: - pulumi.set(__self__, "service_principal", service_principal) + _setter("service_principal", service_principal) if sku_tier is not None: - pulumi.set(__self__, "sku_tier", sku_tier) + _setter("sku_tier", sku_tier) if storage_profile is not None: - pulumi.set(__self__, "storage_profile", storage_profile) + _setter("storage_profile", storage_profile) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if web_app_routing is not None: - pulumi.set(__self__, "web_app_routing", web_app_routing) + _setter("web_app_routing", web_app_routing) if windows_profile is not None: - pulumi.set(__self__, "windows_profile", windows_profile) + _setter("windows_profile", windows_profile) if workload_autoscaler_profile is not None: - pulumi.set(__self__, "workload_autoscaler_profile", workload_autoscaler_profile) + _setter("workload_autoscaler_profile", workload_autoscaler_profile) if workload_identity_enabled is not None: - pulumi.set(__self__, "workload_identity_enabled", workload_identity_enabled) + _setter("workload_identity_enabled", workload_identity_enabled) @property @pulumi.getter(name="aciConnectorLinux") @@ -2552,6 +3044,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + KubernetesClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -2622,15 +3118,45 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = KubernetesClusterArgs.__new__(KubernetesClusterArgs) + if aci_connector_linux is not None and not isinstance(aci_connector_linux, KubernetesClusterAciConnectorLinuxArgs): + aci_connector_linux = aci_connector_linux or {} + def _setter(key, value): + aci_connector_linux[key] = value + KubernetesClusterAciConnectorLinuxArgs._configure(_setter, **aci_connector_linux) __props__.__dict__["aci_connector_linux"] = aci_connector_linux + if api_server_access_profile is not None and not isinstance(api_server_access_profile, KubernetesClusterApiServerAccessProfileArgs): + api_server_access_profile = api_server_access_profile or {} + def _setter(key, value): + api_server_access_profile[key] = value + KubernetesClusterApiServerAccessProfileArgs._configure(_setter, **api_server_access_profile) __props__.__dict__["api_server_access_profile"] = api_server_access_profile __props__.__dict__["api_server_authorized_ip_ranges"] = api_server_authorized_ip_ranges + if auto_scaler_profile is not None and not isinstance(auto_scaler_profile, KubernetesClusterAutoScalerProfileArgs): + auto_scaler_profile = auto_scaler_profile or {} + def _setter(key, value): + auto_scaler_profile[key] = value + KubernetesClusterAutoScalerProfileArgs._configure(_setter, **auto_scaler_profile) __props__.__dict__["auto_scaler_profile"] = auto_scaler_profile __props__.__dict__["automatic_channel_upgrade"] = automatic_channel_upgrade + if azure_active_directory_role_based_access_control is not None and not isinstance(azure_active_directory_role_based_access_control, KubernetesClusterAzureActiveDirectoryRoleBasedAccessControlArgs): + azure_active_directory_role_based_access_control = azure_active_directory_role_based_access_control or {} + def _setter(key, value): + azure_active_directory_role_based_access_control[key] = value + KubernetesClusterAzureActiveDirectoryRoleBasedAccessControlArgs._configure(_setter, **azure_active_directory_role_based_access_control) __props__.__dict__["azure_active_directory_role_based_access_control"] = azure_active_directory_role_based_access_control __props__.__dict__["azure_policy_enabled"] = azure_policy_enabled + if confidential_computing is not None and not isinstance(confidential_computing, KubernetesClusterConfidentialComputingArgs): + confidential_computing = confidential_computing or {} + def _setter(key, value): + confidential_computing[key] = value + KubernetesClusterConfidentialComputingArgs._configure(_setter, **confidential_computing) __props__.__dict__["confidential_computing"] = confidential_computing __props__.__dict__["custom_ca_trust_certificates_base64s"] = custom_ca_trust_certificates_base64s + if default_node_pool is not None and not isinstance(default_node_pool, KubernetesClusterDefaultNodePoolArgs): + default_node_pool = default_node_pool or {} + def _setter(key, value): + default_node_pool[key] = value + KubernetesClusterDefaultNodePoolArgs._configure(_setter, **default_node_pool) if default_node_pool is None and not opts.urn: raise TypeError("Missing required property 'default_node_pool'") __props__.__dict__["default_node_pool"] = default_node_pool @@ -2640,28 +3166,98 @@ def _internal_init(__self__, __props__.__dict__["edge_zone"] = edge_zone __props__.__dict__["enable_pod_security_policy"] = enable_pod_security_policy __props__.__dict__["http_application_routing_enabled"] = http_application_routing_enabled + if http_proxy_config is not None and not isinstance(http_proxy_config, KubernetesClusterHttpProxyConfigArgs): + http_proxy_config = http_proxy_config or {} + def _setter(key, value): + http_proxy_config[key] = value + KubernetesClusterHttpProxyConfigArgs._configure(_setter, **http_proxy_config) __props__.__dict__["http_proxy_config"] = http_proxy_config + if identity is not None and not isinstance(identity, KubernetesClusterIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + KubernetesClusterIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["image_cleaner_enabled"] = image_cleaner_enabled __props__.__dict__["image_cleaner_interval_hours"] = image_cleaner_interval_hours + if ingress_application_gateway is not None and not isinstance(ingress_application_gateway, KubernetesClusterIngressApplicationGatewayArgs): + ingress_application_gateway = ingress_application_gateway or {} + def _setter(key, value): + ingress_application_gateway[key] = value + KubernetesClusterIngressApplicationGatewayArgs._configure(_setter, **ingress_application_gateway) __props__.__dict__["ingress_application_gateway"] = ingress_application_gateway + if key_management_service is not None and not isinstance(key_management_service, KubernetesClusterKeyManagementServiceArgs): + key_management_service = key_management_service or {} + def _setter(key, value): + key_management_service[key] = value + KubernetesClusterKeyManagementServiceArgs._configure(_setter, **key_management_service) __props__.__dict__["key_management_service"] = key_management_service + if key_vault_secrets_provider is not None and not isinstance(key_vault_secrets_provider, KubernetesClusterKeyVaultSecretsProviderArgs): + key_vault_secrets_provider = key_vault_secrets_provider or {} + def _setter(key, value): + key_vault_secrets_provider[key] = value + KubernetesClusterKeyVaultSecretsProviderArgs._configure(_setter, **key_vault_secrets_provider) __props__.__dict__["key_vault_secrets_provider"] = key_vault_secrets_provider + if kubelet_identity is not None and not isinstance(kubelet_identity, KubernetesClusterKubeletIdentityArgs): + kubelet_identity = kubelet_identity or {} + def _setter(key, value): + kubelet_identity[key] = value + KubernetesClusterKubeletIdentityArgs._configure(_setter, **kubelet_identity) __props__.__dict__["kubelet_identity"] = kubelet_identity __props__.__dict__["kubernetes_version"] = kubernetes_version + if linux_profile is not None and not isinstance(linux_profile, KubernetesClusterLinuxProfileArgs): + linux_profile = linux_profile or {} + def _setter(key, value): + linux_profile[key] = value + KubernetesClusterLinuxProfileArgs._configure(_setter, **linux_profile) __props__.__dict__["linux_profile"] = linux_profile __props__.__dict__["local_account_disabled"] = local_account_disabled __props__.__dict__["location"] = location + if maintenance_window is not None and not isinstance(maintenance_window, KubernetesClusterMaintenanceWindowArgs): + maintenance_window = maintenance_window or {} + def _setter(key, value): + maintenance_window[key] = value + KubernetesClusterMaintenanceWindowArgs._configure(_setter, **maintenance_window) __props__.__dict__["maintenance_window"] = maintenance_window + if maintenance_window_auto_upgrade is not None and not isinstance(maintenance_window_auto_upgrade, KubernetesClusterMaintenanceWindowAutoUpgradeArgs): + maintenance_window_auto_upgrade = maintenance_window_auto_upgrade or {} + def _setter(key, value): + maintenance_window_auto_upgrade[key] = value + KubernetesClusterMaintenanceWindowAutoUpgradeArgs._configure(_setter, **maintenance_window_auto_upgrade) __props__.__dict__["maintenance_window_auto_upgrade"] = maintenance_window_auto_upgrade + if maintenance_window_node_os is not None and not isinstance(maintenance_window_node_os, KubernetesClusterMaintenanceWindowNodeOsArgs): + maintenance_window_node_os = maintenance_window_node_os or {} + def _setter(key, value): + maintenance_window_node_os[key] = value + KubernetesClusterMaintenanceWindowNodeOsArgs._configure(_setter, **maintenance_window_node_os) __props__.__dict__["maintenance_window_node_os"] = maintenance_window_node_os + if microsoft_defender is not None and not isinstance(microsoft_defender, KubernetesClusterMicrosoftDefenderArgs): + microsoft_defender = microsoft_defender or {} + def _setter(key, value): + microsoft_defender[key] = value + KubernetesClusterMicrosoftDefenderArgs._configure(_setter, **microsoft_defender) __props__.__dict__["microsoft_defender"] = microsoft_defender + if monitor_metrics is not None and not isinstance(monitor_metrics, KubernetesClusterMonitorMetricsArgs): + monitor_metrics = monitor_metrics or {} + def _setter(key, value): + monitor_metrics[key] = value + KubernetesClusterMonitorMetricsArgs._configure(_setter, **monitor_metrics) __props__.__dict__["monitor_metrics"] = monitor_metrics __props__.__dict__["name"] = name + if network_profile is not None and not isinstance(network_profile, KubernetesClusterNetworkProfileArgs): + network_profile = network_profile or {} + def _setter(key, value): + network_profile[key] = value + KubernetesClusterNetworkProfileArgs._configure(_setter, **network_profile) __props__.__dict__["network_profile"] = network_profile __props__.__dict__["node_os_channel_upgrade"] = node_os_channel_upgrade __props__.__dict__["node_resource_group"] = node_resource_group __props__.__dict__["oidc_issuer_enabled"] = oidc_issuer_enabled + if oms_agent is not None and not isinstance(oms_agent, KubernetesClusterOmsAgentArgs): + oms_agent = oms_agent or {} + def _setter(key, value): + oms_agent[key] = value + KubernetesClusterOmsAgentArgs._configure(_setter, **oms_agent) __props__.__dict__["oms_agent"] = oms_agent __props__.__dict__["open_service_mesh_enabled"] = open_service_mesh_enabled __props__.__dict__["private_cluster_enabled"] = private_cluster_enabled @@ -2673,13 +3269,43 @@ def _internal_init(__self__, __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["role_based_access_control_enabled"] = role_based_access_control_enabled __props__.__dict__["run_command_enabled"] = run_command_enabled + if service_mesh_profile is not None and not isinstance(service_mesh_profile, KubernetesClusterServiceMeshProfileArgs): + service_mesh_profile = service_mesh_profile or {} + def _setter(key, value): + service_mesh_profile[key] = value + KubernetesClusterServiceMeshProfileArgs._configure(_setter, **service_mesh_profile) __props__.__dict__["service_mesh_profile"] = service_mesh_profile + if service_principal is not None and not isinstance(service_principal, KubernetesClusterServicePrincipalArgs): + service_principal = service_principal or {} + def _setter(key, value): + service_principal[key] = value + KubernetesClusterServicePrincipalArgs._configure(_setter, **service_principal) __props__.__dict__["service_principal"] = service_principal __props__.__dict__["sku_tier"] = sku_tier + if storage_profile is not None and not isinstance(storage_profile, KubernetesClusterStorageProfileArgs): + storage_profile = storage_profile or {} + def _setter(key, value): + storage_profile[key] = value + KubernetesClusterStorageProfileArgs._configure(_setter, **storage_profile) __props__.__dict__["storage_profile"] = storage_profile __props__.__dict__["tags"] = tags + if web_app_routing is not None and not isinstance(web_app_routing, KubernetesClusterWebAppRoutingArgs): + web_app_routing = web_app_routing or {} + def _setter(key, value): + web_app_routing[key] = value + KubernetesClusterWebAppRoutingArgs._configure(_setter, **web_app_routing) __props__.__dict__["web_app_routing"] = web_app_routing + if windows_profile is not None and not isinstance(windows_profile, KubernetesClusterWindowsProfileArgs): + windows_profile = windows_profile or {} + def _setter(key, value): + windows_profile[key] = value + KubernetesClusterWindowsProfileArgs._configure(_setter, **windows_profile) __props__.__dict__["windows_profile"] = windows_profile + if workload_autoscaler_profile is not None and not isinstance(workload_autoscaler_profile, KubernetesClusterWorkloadAutoscalerProfileArgs): + workload_autoscaler_profile = workload_autoscaler_profile or {} + def _setter(key, value): + workload_autoscaler_profile[key] = value + KubernetesClusterWorkloadAutoscalerProfileArgs._configure(_setter, **workload_autoscaler_profile) __props__.__dict__["workload_autoscaler_profile"] = workload_autoscaler_profile __props__.__dict__["workload_identity_enabled"] = workload_identity_enabled __props__.__dict__["fqdn"] = None diff --git a/sdk/python/pulumi_azure/containerservice/kubernetes_cluster_extension.py b/sdk/python/pulumi_azure/containerservice/kubernetes_cluster_extension.py index a1559af67d..fc3a8833da 100644 --- a/sdk/python/pulumi_azure/containerservice/kubernetes_cluster_extension.py +++ b/sdk/python/pulumi_azure/containerservice/kubernetes_cluster_extension.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,24 +39,71 @@ def __init__(__self__, *, :param pulumi.Input[str] target_namespace: Namespace where the extension will be created for a namespace scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Kubernetes Cluster Extension to be created. :param pulumi.Input[str] version: User-specified version that the extension should pin to. If it is not set, Azure will use the latest version and auto upgrade it. Changing this forces a new Kubernetes Cluster Extension to be created. """ - pulumi.set(__self__, "cluster_id", cluster_id) - pulumi.set(__self__, "extension_type", extension_type) + KubernetesClusterExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + extension_type=extension_type, + configuration_protected_settings=configuration_protected_settings, + configuration_settings=configuration_settings, + name=name, + plan=plan, + release_namespace=release_namespace, + release_train=release_train, + target_namespace=target_namespace, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + extension_type: Optional[pulumi.Input[str]] = None, + configuration_protected_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + configuration_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + plan: Optional[pulumi.Input['KubernetesClusterExtensionPlanArgs']] = None, + release_namespace: Optional[pulumi.Input[str]] = None, + release_train: Optional[pulumi.Input[str]] = None, + target_namespace: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if cluster_id is None: + raise TypeError("Missing 'cluster_id' argument") + if extension_type is None and 'extensionType' in kwargs: + extension_type = kwargs['extensionType'] + if extension_type is None: + raise TypeError("Missing 'extension_type' argument") + if configuration_protected_settings is None and 'configurationProtectedSettings' in kwargs: + configuration_protected_settings = kwargs['configurationProtectedSettings'] + if configuration_settings is None and 'configurationSettings' in kwargs: + configuration_settings = kwargs['configurationSettings'] + if release_namespace is None and 'releaseNamespace' in kwargs: + release_namespace = kwargs['releaseNamespace'] + if release_train is None and 'releaseTrain' in kwargs: + release_train = kwargs['releaseTrain'] + if target_namespace is None and 'targetNamespace' in kwargs: + target_namespace = kwargs['targetNamespace'] + + _setter("cluster_id", cluster_id) + _setter("extension_type", extension_type) if configuration_protected_settings is not None: - pulumi.set(__self__, "configuration_protected_settings", configuration_protected_settings) + _setter("configuration_protected_settings", configuration_protected_settings) if configuration_settings is not None: - pulumi.set(__self__, "configuration_settings", configuration_settings) + _setter("configuration_settings", configuration_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if release_namespace is not None: - pulumi.set(__self__, "release_namespace", release_namespace) + _setter("release_namespace", release_namespace) if release_train is not None: - pulumi.set(__self__, "release_train", release_train) + _setter("release_train", release_train) if target_namespace is not None: - pulumi.set(__self__, "target_namespace", target_namespace) + _setter("target_namespace", target_namespace) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="clusterId") @@ -209,30 +256,81 @@ def __init__(__self__, *, :param pulumi.Input[str] target_namespace: Namespace where the extension will be created for a namespace scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Kubernetes Cluster Extension to be created. :param pulumi.Input[str] version: User-specified version that the extension should pin to. If it is not set, Azure will use the latest version and auto upgrade it. Changing this forces a new Kubernetes Cluster Extension to be created. """ + _KubernetesClusterExtensionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + aks_assigned_identities=aks_assigned_identities, + cluster_id=cluster_id, + configuration_protected_settings=configuration_protected_settings, + configuration_settings=configuration_settings, + current_version=current_version, + extension_type=extension_type, + name=name, + plan=plan, + release_namespace=release_namespace, + release_train=release_train, + target_namespace=target_namespace, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aks_assigned_identities: Optional[pulumi.Input[Sequence[pulumi.Input['KubernetesClusterExtensionAksAssignedIdentityArgs']]]] = None, + cluster_id: Optional[pulumi.Input[str]] = None, + configuration_protected_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + configuration_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + current_version: Optional[pulumi.Input[str]] = None, + extension_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + plan: Optional[pulumi.Input['KubernetesClusterExtensionPlanArgs']] = None, + release_namespace: Optional[pulumi.Input[str]] = None, + release_train: Optional[pulumi.Input[str]] = None, + target_namespace: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aks_assigned_identities is None and 'aksAssignedIdentities' in kwargs: + aks_assigned_identities = kwargs['aksAssignedIdentities'] + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if configuration_protected_settings is None and 'configurationProtectedSettings' in kwargs: + configuration_protected_settings = kwargs['configurationProtectedSettings'] + if configuration_settings is None and 'configurationSettings' in kwargs: + configuration_settings = kwargs['configurationSettings'] + if current_version is None and 'currentVersion' in kwargs: + current_version = kwargs['currentVersion'] + if extension_type is None and 'extensionType' in kwargs: + extension_type = kwargs['extensionType'] + if release_namespace is None and 'releaseNamespace' in kwargs: + release_namespace = kwargs['releaseNamespace'] + if release_train is None and 'releaseTrain' in kwargs: + release_train = kwargs['releaseTrain'] + if target_namespace is None and 'targetNamespace' in kwargs: + target_namespace = kwargs['targetNamespace'] + if aks_assigned_identities is not None: - pulumi.set(__self__, "aks_assigned_identities", aks_assigned_identities) + _setter("aks_assigned_identities", aks_assigned_identities) if cluster_id is not None: - pulumi.set(__self__, "cluster_id", cluster_id) + _setter("cluster_id", cluster_id) if configuration_protected_settings is not None: - pulumi.set(__self__, "configuration_protected_settings", configuration_protected_settings) + _setter("configuration_protected_settings", configuration_protected_settings) if configuration_settings is not None: - pulumi.set(__self__, "configuration_settings", configuration_settings) + _setter("configuration_settings", configuration_settings) if current_version is not None: - pulumi.set(__self__, "current_version", current_version) + _setter("current_version", current_version) if extension_type is not None: - pulumi.set(__self__, "extension_type", extension_type) + _setter("extension_type", extension_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if release_namespace is not None: - pulumi.set(__self__, "release_namespace", release_namespace) + _setter("release_namespace", release_namespace) if release_train is not None: - pulumi.set(__self__, "release_train", release_train) + _setter("release_train", release_train) if target_namespace is not None: - pulumi.set(__self__, "target_namespace", target_namespace) + _setter("target_namespace", target_namespace) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="aksAssignedIdentities") @@ -494,6 +592,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + KubernetesClusterExtensionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -527,6 +629,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'extension_type'") __props__.__dict__["extension_type"] = extension_type __props__.__dict__["name"] = name + if plan is not None and not isinstance(plan, KubernetesClusterExtensionPlanArgs): + plan = plan or {} + def _setter(key, value): + plan[key] = value + KubernetesClusterExtensionPlanArgs._configure(_setter, **plan) __props__.__dict__["plan"] = plan __props__.__dict__["release_namespace"] = release_namespace __props__.__dict__["release_train"] = release_train diff --git a/sdk/python/pulumi_azure/containerservice/kubernetes_cluster_node_pool.py b/sdk/python/pulumi_azure/containerservice/kubernetes_cluster_node_pool.py index 769a51bebd..2d9888cfc3 100644 --- a/sdk/python/pulumi_azure/containerservice/kubernetes_cluster_node_pool.py +++ b/sdk/python/pulumi_azure/containerservice/kubernetes_cluster_node_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -129,88 +129,259 @@ def __init__(__self__, *, > **Note:** Pod Sandboxing / KataVM Isolation node pools are in Public Preview - more information and details on how to opt into the preview can be found in [this article](https://learn.microsoft.com/azure/aks/use-pod-sandboxing) :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones in which this Kubernetes Cluster Node Pool should be located. Changing this forces a new Kubernetes Cluster Node Pool to be created. """ - pulumi.set(__self__, "kubernetes_cluster_id", kubernetes_cluster_id) - pulumi.set(__self__, "vm_size", vm_size) + KubernetesClusterNodePoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kubernetes_cluster_id=kubernetes_cluster_id, + vm_size=vm_size, + capacity_reservation_group_id=capacity_reservation_group_id, + custom_ca_trust_enabled=custom_ca_trust_enabled, + enable_auto_scaling=enable_auto_scaling, + enable_host_encryption=enable_host_encryption, + enable_node_public_ip=enable_node_public_ip, + eviction_policy=eviction_policy, + fips_enabled=fips_enabled, + host_group_id=host_group_id, + kubelet_config=kubelet_config, + kubelet_disk_type=kubelet_disk_type, + linux_os_config=linux_os_config, + max_count=max_count, + max_pods=max_pods, + message_of_the_day=message_of_the_day, + min_count=min_count, + mode=mode, + name=name, + node_count=node_count, + node_labels=node_labels, + node_network_profile=node_network_profile, + node_public_ip_prefix_id=node_public_ip_prefix_id, + node_taints=node_taints, + orchestrator_version=orchestrator_version, + os_disk_size_gb=os_disk_size_gb, + os_disk_type=os_disk_type, + os_sku=os_sku, + os_type=os_type, + pod_subnet_id=pod_subnet_id, + priority=priority, + proximity_placement_group_id=proximity_placement_group_id, + scale_down_mode=scale_down_mode, + snapshot_id=snapshot_id, + spot_max_price=spot_max_price, + tags=tags, + ultra_ssd_enabled=ultra_ssd_enabled, + upgrade_settings=upgrade_settings, + vnet_subnet_id=vnet_subnet_id, + windows_profile=windows_profile, + workload_runtime=workload_runtime, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kubernetes_cluster_id: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + custom_ca_trust_enabled: Optional[pulumi.Input[bool]] = None, + enable_auto_scaling: Optional[pulumi.Input[bool]] = None, + enable_host_encryption: Optional[pulumi.Input[bool]] = None, + enable_node_public_ip: Optional[pulumi.Input[bool]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + fips_enabled: Optional[pulumi.Input[bool]] = None, + host_group_id: Optional[pulumi.Input[str]] = None, + kubelet_config: Optional[pulumi.Input['KubernetesClusterNodePoolKubeletConfigArgs']] = None, + kubelet_disk_type: Optional[pulumi.Input[str]] = None, + linux_os_config: Optional[pulumi.Input['KubernetesClusterNodePoolLinuxOsConfigArgs']] = None, + max_count: Optional[pulumi.Input[int]] = None, + max_pods: Optional[pulumi.Input[int]] = None, + message_of_the_day: Optional[pulumi.Input[str]] = None, + min_count: Optional[pulumi.Input[int]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_count: Optional[pulumi.Input[int]] = None, + node_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + node_network_profile: Optional[pulumi.Input['KubernetesClusterNodePoolNodeNetworkProfileArgs']] = None, + node_public_ip_prefix_id: Optional[pulumi.Input[str]] = None, + node_taints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + orchestrator_version: Optional[pulumi.Input[str]] = None, + os_disk_size_gb: Optional[pulumi.Input[int]] = None, + os_disk_type: Optional[pulumi.Input[str]] = None, + os_sku: Optional[pulumi.Input[str]] = None, + os_type: Optional[pulumi.Input[str]] = None, + pod_subnet_id: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[str]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + scale_down_mode: Optional[pulumi.Input[str]] = None, + snapshot_id: Optional[pulumi.Input[str]] = None, + spot_max_price: Optional[pulumi.Input[float]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ultra_ssd_enabled: Optional[pulumi.Input[bool]] = None, + upgrade_settings: Optional[pulumi.Input['KubernetesClusterNodePoolUpgradeSettingsArgs']] = None, + vnet_subnet_id: Optional[pulumi.Input[str]] = None, + windows_profile: Optional[pulumi.Input['KubernetesClusterNodePoolWindowsProfileArgs']] = None, + workload_runtime: Optional[pulumi.Input[str]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kubernetes_cluster_id is None and 'kubernetesClusterId' in kwargs: + kubernetes_cluster_id = kwargs['kubernetesClusterId'] + if kubernetes_cluster_id is None: + raise TypeError("Missing 'kubernetes_cluster_id' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if custom_ca_trust_enabled is None and 'customCaTrustEnabled' in kwargs: + custom_ca_trust_enabled = kwargs['customCaTrustEnabled'] + if enable_auto_scaling is None and 'enableAutoScaling' in kwargs: + enable_auto_scaling = kwargs['enableAutoScaling'] + if enable_host_encryption is None and 'enableHostEncryption' in kwargs: + enable_host_encryption = kwargs['enableHostEncryption'] + if enable_node_public_ip is None and 'enableNodePublicIp' in kwargs: + enable_node_public_ip = kwargs['enableNodePublicIp'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if fips_enabled is None and 'fipsEnabled' in kwargs: + fips_enabled = kwargs['fipsEnabled'] + if host_group_id is None and 'hostGroupId' in kwargs: + host_group_id = kwargs['hostGroupId'] + if kubelet_config is None and 'kubeletConfig' in kwargs: + kubelet_config = kwargs['kubeletConfig'] + if kubelet_disk_type is None and 'kubeletDiskType' in kwargs: + kubelet_disk_type = kwargs['kubeletDiskType'] + if linux_os_config is None and 'linuxOsConfig' in kwargs: + linux_os_config = kwargs['linuxOsConfig'] + if max_count is None and 'maxCount' in kwargs: + max_count = kwargs['maxCount'] + if max_pods is None and 'maxPods' in kwargs: + max_pods = kwargs['maxPods'] + if message_of_the_day is None and 'messageOfTheDay' in kwargs: + message_of_the_day = kwargs['messageOfTheDay'] + if min_count is None and 'minCount' in kwargs: + min_count = kwargs['minCount'] + if node_count is None and 'nodeCount' in kwargs: + node_count = kwargs['nodeCount'] + if node_labels is None and 'nodeLabels' in kwargs: + node_labels = kwargs['nodeLabels'] + if node_network_profile is None and 'nodeNetworkProfile' in kwargs: + node_network_profile = kwargs['nodeNetworkProfile'] + if node_public_ip_prefix_id is None and 'nodePublicIpPrefixId' in kwargs: + node_public_ip_prefix_id = kwargs['nodePublicIpPrefixId'] + if node_taints is None and 'nodeTaints' in kwargs: + node_taints = kwargs['nodeTaints'] + if orchestrator_version is None and 'orchestratorVersion' in kwargs: + orchestrator_version = kwargs['orchestratorVersion'] + if os_disk_size_gb is None and 'osDiskSizeGb' in kwargs: + os_disk_size_gb = kwargs['osDiskSizeGb'] + if os_disk_type is None and 'osDiskType' in kwargs: + os_disk_type = kwargs['osDiskType'] + if os_sku is None and 'osSku' in kwargs: + os_sku = kwargs['osSku'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if pod_subnet_id is None and 'podSubnetId' in kwargs: + pod_subnet_id = kwargs['podSubnetId'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if scale_down_mode is None and 'scaleDownMode' in kwargs: + scale_down_mode = kwargs['scaleDownMode'] + if snapshot_id is None and 'snapshotId' in kwargs: + snapshot_id = kwargs['snapshotId'] + if spot_max_price is None and 'spotMaxPrice' in kwargs: + spot_max_price = kwargs['spotMaxPrice'] + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if upgrade_settings is None and 'upgradeSettings' in kwargs: + upgrade_settings = kwargs['upgradeSettings'] + if vnet_subnet_id is None and 'vnetSubnetId' in kwargs: + vnet_subnet_id = kwargs['vnetSubnetId'] + if windows_profile is None and 'windowsProfile' in kwargs: + windows_profile = kwargs['windowsProfile'] + if workload_runtime is None and 'workloadRuntime' in kwargs: + workload_runtime = kwargs['workloadRuntime'] + + _setter("kubernetes_cluster_id", kubernetes_cluster_id) + _setter("vm_size", vm_size) if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if custom_ca_trust_enabled is not None: - pulumi.set(__self__, "custom_ca_trust_enabled", custom_ca_trust_enabled) + _setter("custom_ca_trust_enabled", custom_ca_trust_enabled) if enable_auto_scaling is not None: - pulumi.set(__self__, "enable_auto_scaling", enable_auto_scaling) + _setter("enable_auto_scaling", enable_auto_scaling) if enable_host_encryption is not None: - pulumi.set(__self__, "enable_host_encryption", enable_host_encryption) + _setter("enable_host_encryption", enable_host_encryption) if enable_node_public_ip is not None: - pulumi.set(__self__, "enable_node_public_ip", enable_node_public_ip) + _setter("enable_node_public_ip", enable_node_public_ip) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if fips_enabled is not None: - pulumi.set(__self__, "fips_enabled", fips_enabled) + _setter("fips_enabled", fips_enabled) if host_group_id is not None: - pulumi.set(__self__, "host_group_id", host_group_id) + _setter("host_group_id", host_group_id) if kubelet_config is not None: - pulumi.set(__self__, "kubelet_config", kubelet_config) + _setter("kubelet_config", kubelet_config) if kubelet_disk_type is not None: - pulumi.set(__self__, "kubelet_disk_type", kubelet_disk_type) + _setter("kubelet_disk_type", kubelet_disk_type) if linux_os_config is not None: - pulumi.set(__self__, "linux_os_config", linux_os_config) + _setter("linux_os_config", linux_os_config) if max_count is not None: - pulumi.set(__self__, "max_count", max_count) + _setter("max_count", max_count) if max_pods is not None: - pulumi.set(__self__, "max_pods", max_pods) + _setter("max_pods", max_pods) if message_of_the_day is not None: - pulumi.set(__self__, "message_of_the_day", message_of_the_day) + _setter("message_of_the_day", message_of_the_day) if min_count is not None: - pulumi.set(__self__, "min_count", min_count) + _setter("min_count", min_count) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_count is not None: - pulumi.set(__self__, "node_count", node_count) + _setter("node_count", node_count) if node_labels is not None: - pulumi.set(__self__, "node_labels", node_labels) + _setter("node_labels", node_labels) if node_network_profile is not None: - pulumi.set(__self__, "node_network_profile", node_network_profile) + _setter("node_network_profile", node_network_profile) if node_public_ip_prefix_id is not None: - pulumi.set(__self__, "node_public_ip_prefix_id", node_public_ip_prefix_id) + _setter("node_public_ip_prefix_id", node_public_ip_prefix_id) if node_taints is not None: - pulumi.set(__self__, "node_taints", node_taints) + _setter("node_taints", node_taints) if orchestrator_version is not None: - pulumi.set(__self__, "orchestrator_version", orchestrator_version) + _setter("orchestrator_version", orchestrator_version) if os_disk_size_gb is not None: - pulumi.set(__self__, "os_disk_size_gb", os_disk_size_gb) + _setter("os_disk_size_gb", os_disk_size_gb) if os_disk_type is not None: - pulumi.set(__self__, "os_disk_type", os_disk_type) + _setter("os_disk_type", os_disk_type) if os_sku is not None: - pulumi.set(__self__, "os_sku", os_sku) + _setter("os_sku", os_sku) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if pod_subnet_id is not None: - pulumi.set(__self__, "pod_subnet_id", pod_subnet_id) + _setter("pod_subnet_id", pod_subnet_id) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if scale_down_mode is not None: - pulumi.set(__self__, "scale_down_mode", scale_down_mode) + _setter("scale_down_mode", scale_down_mode) if snapshot_id is not None: - pulumi.set(__self__, "snapshot_id", snapshot_id) + _setter("snapshot_id", snapshot_id) if spot_max_price is not None: - pulumi.set(__self__, "spot_max_price", spot_max_price) + _setter("spot_max_price", spot_max_price) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) if upgrade_settings is not None: - pulumi.set(__self__, "upgrade_settings", upgrade_settings) + _setter("upgrade_settings", upgrade_settings) if vnet_subnet_id is not None: - pulumi.set(__self__, "vnet_subnet_id", vnet_subnet_id) + _setter("vnet_subnet_id", vnet_subnet_id) if windows_profile is not None: - pulumi.set(__self__, "windows_profile", windows_profile) + _setter("windows_profile", windows_profile) if workload_runtime is not None: - pulumi.set(__self__, "workload_runtime", workload_runtime) + _setter("workload_runtime", workload_runtime) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="kubernetesClusterId") @@ -859,90 +1030,257 @@ def __init__(__self__, *, > **Note:** Pod Sandboxing / KataVM Isolation node pools are in Public Preview - more information and details on how to opt into the preview can be found in [this article](https://learn.microsoft.com/azure/aks/use-pod-sandboxing) :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones in which this Kubernetes Cluster Node Pool should be located. Changing this forces a new Kubernetes Cluster Node Pool to be created. """ + _KubernetesClusterNodePoolState._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity_reservation_group_id=capacity_reservation_group_id, + custom_ca_trust_enabled=custom_ca_trust_enabled, + enable_auto_scaling=enable_auto_scaling, + enable_host_encryption=enable_host_encryption, + enable_node_public_ip=enable_node_public_ip, + eviction_policy=eviction_policy, + fips_enabled=fips_enabled, + host_group_id=host_group_id, + kubelet_config=kubelet_config, + kubelet_disk_type=kubelet_disk_type, + kubernetes_cluster_id=kubernetes_cluster_id, + linux_os_config=linux_os_config, + max_count=max_count, + max_pods=max_pods, + message_of_the_day=message_of_the_day, + min_count=min_count, + mode=mode, + name=name, + node_count=node_count, + node_labels=node_labels, + node_network_profile=node_network_profile, + node_public_ip_prefix_id=node_public_ip_prefix_id, + node_taints=node_taints, + orchestrator_version=orchestrator_version, + os_disk_size_gb=os_disk_size_gb, + os_disk_type=os_disk_type, + os_sku=os_sku, + os_type=os_type, + pod_subnet_id=pod_subnet_id, + priority=priority, + proximity_placement_group_id=proximity_placement_group_id, + scale_down_mode=scale_down_mode, + snapshot_id=snapshot_id, + spot_max_price=spot_max_price, + tags=tags, + ultra_ssd_enabled=ultra_ssd_enabled, + upgrade_settings=upgrade_settings, + vm_size=vm_size, + vnet_subnet_id=vnet_subnet_id, + windows_profile=windows_profile, + workload_runtime=workload_runtime, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + custom_ca_trust_enabled: Optional[pulumi.Input[bool]] = None, + enable_auto_scaling: Optional[pulumi.Input[bool]] = None, + enable_host_encryption: Optional[pulumi.Input[bool]] = None, + enable_node_public_ip: Optional[pulumi.Input[bool]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + fips_enabled: Optional[pulumi.Input[bool]] = None, + host_group_id: Optional[pulumi.Input[str]] = None, + kubelet_config: Optional[pulumi.Input['KubernetesClusterNodePoolKubeletConfigArgs']] = None, + kubelet_disk_type: Optional[pulumi.Input[str]] = None, + kubernetes_cluster_id: Optional[pulumi.Input[str]] = None, + linux_os_config: Optional[pulumi.Input['KubernetesClusterNodePoolLinuxOsConfigArgs']] = None, + max_count: Optional[pulumi.Input[int]] = None, + max_pods: Optional[pulumi.Input[int]] = None, + message_of_the_day: Optional[pulumi.Input[str]] = None, + min_count: Optional[pulumi.Input[int]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_count: Optional[pulumi.Input[int]] = None, + node_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + node_network_profile: Optional[pulumi.Input['KubernetesClusterNodePoolNodeNetworkProfileArgs']] = None, + node_public_ip_prefix_id: Optional[pulumi.Input[str]] = None, + node_taints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + orchestrator_version: Optional[pulumi.Input[str]] = None, + os_disk_size_gb: Optional[pulumi.Input[int]] = None, + os_disk_type: Optional[pulumi.Input[str]] = None, + os_sku: Optional[pulumi.Input[str]] = None, + os_type: Optional[pulumi.Input[str]] = None, + pod_subnet_id: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[str]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + scale_down_mode: Optional[pulumi.Input[str]] = None, + snapshot_id: Optional[pulumi.Input[str]] = None, + spot_max_price: Optional[pulumi.Input[float]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ultra_ssd_enabled: Optional[pulumi.Input[bool]] = None, + upgrade_settings: Optional[pulumi.Input['KubernetesClusterNodePoolUpgradeSettingsArgs']] = None, + vm_size: Optional[pulumi.Input[str]] = None, + vnet_subnet_id: Optional[pulumi.Input[str]] = None, + windows_profile: Optional[pulumi.Input['KubernetesClusterNodePoolWindowsProfileArgs']] = None, + workload_runtime: Optional[pulumi.Input[str]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if custom_ca_trust_enabled is None and 'customCaTrustEnabled' in kwargs: + custom_ca_trust_enabled = kwargs['customCaTrustEnabled'] + if enable_auto_scaling is None and 'enableAutoScaling' in kwargs: + enable_auto_scaling = kwargs['enableAutoScaling'] + if enable_host_encryption is None and 'enableHostEncryption' in kwargs: + enable_host_encryption = kwargs['enableHostEncryption'] + if enable_node_public_ip is None and 'enableNodePublicIp' in kwargs: + enable_node_public_ip = kwargs['enableNodePublicIp'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if fips_enabled is None and 'fipsEnabled' in kwargs: + fips_enabled = kwargs['fipsEnabled'] + if host_group_id is None and 'hostGroupId' in kwargs: + host_group_id = kwargs['hostGroupId'] + if kubelet_config is None and 'kubeletConfig' in kwargs: + kubelet_config = kwargs['kubeletConfig'] + if kubelet_disk_type is None and 'kubeletDiskType' in kwargs: + kubelet_disk_type = kwargs['kubeletDiskType'] + if kubernetes_cluster_id is None and 'kubernetesClusterId' in kwargs: + kubernetes_cluster_id = kwargs['kubernetesClusterId'] + if linux_os_config is None and 'linuxOsConfig' in kwargs: + linux_os_config = kwargs['linuxOsConfig'] + if max_count is None and 'maxCount' in kwargs: + max_count = kwargs['maxCount'] + if max_pods is None and 'maxPods' in kwargs: + max_pods = kwargs['maxPods'] + if message_of_the_day is None and 'messageOfTheDay' in kwargs: + message_of_the_day = kwargs['messageOfTheDay'] + if min_count is None and 'minCount' in kwargs: + min_count = kwargs['minCount'] + if node_count is None and 'nodeCount' in kwargs: + node_count = kwargs['nodeCount'] + if node_labels is None and 'nodeLabels' in kwargs: + node_labels = kwargs['nodeLabels'] + if node_network_profile is None and 'nodeNetworkProfile' in kwargs: + node_network_profile = kwargs['nodeNetworkProfile'] + if node_public_ip_prefix_id is None and 'nodePublicIpPrefixId' in kwargs: + node_public_ip_prefix_id = kwargs['nodePublicIpPrefixId'] + if node_taints is None and 'nodeTaints' in kwargs: + node_taints = kwargs['nodeTaints'] + if orchestrator_version is None and 'orchestratorVersion' in kwargs: + orchestrator_version = kwargs['orchestratorVersion'] + if os_disk_size_gb is None and 'osDiskSizeGb' in kwargs: + os_disk_size_gb = kwargs['osDiskSizeGb'] + if os_disk_type is None and 'osDiskType' in kwargs: + os_disk_type = kwargs['osDiskType'] + if os_sku is None and 'osSku' in kwargs: + os_sku = kwargs['osSku'] + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if pod_subnet_id is None and 'podSubnetId' in kwargs: + pod_subnet_id = kwargs['podSubnetId'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if scale_down_mode is None and 'scaleDownMode' in kwargs: + scale_down_mode = kwargs['scaleDownMode'] + if snapshot_id is None and 'snapshotId' in kwargs: + snapshot_id = kwargs['snapshotId'] + if spot_max_price is None and 'spotMaxPrice' in kwargs: + spot_max_price = kwargs['spotMaxPrice'] + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if upgrade_settings is None and 'upgradeSettings' in kwargs: + upgrade_settings = kwargs['upgradeSettings'] + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vnet_subnet_id is None and 'vnetSubnetId' in kwargs: + vnet_subnet_id = kwargs['vnetSubnetId'] + if windows_profile is None and 'windowsProfile' in kwargs: + windows_profile = kwargs['windowsProfile'] + if workload_runtime is None and 'workloadRuntime' in kwargs: + workload_runtime = kwargs['workloadRuntime'] + if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if custom_ca_trust_enabled is not None: - pulumi.set(__self__, "custom_ca_trust_enabled", custom_ca_trust_enabled) + _setter("custom_ca_trust_enabled", custom_ca_trust_enabled) if enable_auto_scaling is not None: - pulumi.set(__self__, "enable_auto_scaling", enable_auto_scaling) + _setter("enable_auto_scaling", enable_auto_scaling) if enable_host_encryption is not None: - pulumi.set(__self__, "enable_host_encryption", enable_host_encryption) + _setter("enable_host_encryption", enable_host_encryption) if enable_node_public_ip is not None: - pulumi.set(__self__, "enable_node_public_ip", enable_node_public_ip) + _setter("enable_node_public_ip", enable_node_public_ip) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if fips_enabled is not None: - pulumi.set(__self__, "fips_enabled", fips_enabled) + _setter("fips_enabled", fips_enabled) if host_group_id is not None: - pulumi.set(__self__, "host_group_id", host_group_id) + _setter("host_group_id", host_group_id) if kubelet_config is not None: - pulumi.set(__self__, "kubelet_config", kubelet_config) + _setter("kubelet_config", kubelet_config) if kubelet_disk_type is not None: - pulumi.set(__self__, "kubelet_disk_type", kubelet_disk_type) + _setter("kubelet_disk_type", kubelet_disk_type) if kubernetes_cluster_id is not None: - pulumi.set(__self__, "kubernetes_cluster_id", kubernetes_cluster_id) + _setter("kubernetes_cluster_id", kubernetes_cluster_id) if linux_os_config is not None: - pulumi.set(__self__, "linux_os_config", linux_os_config) + _setter("linux_os_config", linux_os_config) if max_count is not None: - pulumi.set(__self__, "max_count", max_count) + _setter("max_count", max_count) if max_pods is not None: - pulumi.set(__self__, "max_pods", max_pods) + _setter("max_pods", max_pods) if message_of_the_day is not None: - pulumi.set(__self__, "message_of_the_day", message_of_the_day) + _setter("message_of_the_day", message_of_the_day) if min_count is not None: - pulumi.set(__self__, "min_count", min_count) + _setter("min_count", min_count) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_count is not None: - pulumi.set(__self__, "node_count", node_count) + _setter("node_count", node_count) if node_labels is not None: - pulumi.set(__self__, "node_labels", node_labels) + _setter("node_labels", node_labels) if node_network_profile is not None: - pulumi.set(__self__, "node_network_profile", node_network_profile) + _setter("node_network_profile", node_network_profile) if node_public_ip_prefix_id is not None: - pulumi.set(__self__, "node_public_ip_prefix_id", node_public_ip_prefix_id) + _setter("node_public_ip_prefix_id", node_public_ip_prefix_id) if node_taints is not None: - pulumi.set(__self__, "node_taints", node_taints) + _setter("node_taints", node_taints) if orchestrator_version is not None: - pulumi.set(__self__, "orchestrator_version", orchestrator_version) + _setter("orchestrator_version", orchestrator_version) if os_disk_size_gb is not None: - pulumi.set(__self__, "os_disk_size_gb", os_disk_size_gb) + _setter("os_disk_size_gb", os_disk_size_gb) if os_disk_type is not None: - pulumi.set(__self__, "os_disk_type", os_disk_type) + _setter("os_disk_type", os_disk_type) if os_sku is not None: - pulumi.set(__self__, "os_sku", os_sku) + _setter("os_sku", os_sku) if os_type is not None: - pulumi.set(__self__, "os_type", os_type) + _setter("os_type", os_type) if pod_subnet_id is not None: - pulumi.set(__self__, "pod_subnet_id", pod_subnet_id) + _setter("pod_subnet_id", pod_subnet_id) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if scale_down_mode is not None: - pulumi.set(__self__, "scale_down_mode", scale_down_mode) + _setter("scale_down_mode", scale_down_mode) if snapshot_id is not None: - pulumi.set(__self__, "snapshot_id", snapshot_id) + _setter("snapshot_id", snapshot_id) if spot_max_price is not None: - pulumi.set(__self__, "spot_max_price", spot_max_price) + _setter("spot_max_price", spot_max_price) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) if upgrade_settings is not None: - pulumi.set(__self__, "upgrade_settings", upgrade_settings) + _setter("upgrade_settings", upgrade_settings) if vm_size is not None: - pulumi.set(__self__, "vm_size", vm_size) + _setter("vm_size", vm_size) if vnet_subnet_id is not None: - pulumi.set(__self__, "vnet_subnet_id", vnet_subnet_id) + _setter("vnet_subnet_id", vnet_subnet_id) if windows_profile is not None: - pulumi.set(__self__, "windows_profile", windows_profile) + _setter("windows_profile", windows_profile) if workload_runtime is not None: - pulumi.set(__self__, "workload_runtime", workload_runtime) + _setter("workload_runtime", workload_runtime) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="capacityReservationGroupId") @@ -1698,6 +2036,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + KubernetesClusterNodePoolArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1762,11 +2104,21 @@ def _internal_init(__self__, __props__.__dict__["eviction_policy"] = eviction_policy __props__.__dict__["fips_enabled"] = fips_enabled __props__.__dict__["host_group_id"] = host_group_id + if kubelet_config is not None and not isinstance(kubelet_config, KubernetesClusterNodePoolKubeletConfigArgs): + kubelet_config = kubelet_config or {} + def _setter(key, value): + kubelet_config[key] = value + KubernetesClusterNodePoolKubeletConfigArgs._configure(_setter, **kubelet_config) __props__.__dict__["kubelet_config"] = kubelet_config __props__.__dict__["kubelet_disk_type"] = kubelet_disk_type if kubernetes_cluster_id is None and not opts.urn: raise TypeError("Missing required property 'kubernetes_cluster_id'") __props__.__dict__["kubernetes_cluster_id"] = kubernetes_cluster_id + if linux_os_config is not None and not isinstance(linux_os_config, KubernetesClusterNodePoolLinuxOsConfigArgs): + linux_os_config = linux_os_config or {} + def _setter(key, value): + linux_os_config[key] = value + KubernetesClusterNodePoolLinuxOsConfigArgs._configure(_setter, **linux_os_config) __props__.__dict__["linux_os_config"] = linux_os_config __props__.__dict__["max_count"] = max_count __props__.__dict__["max_pods"] = max_pods @@ -1776,6 +2128,11 @@ def _internal_init(__self__, __props__.__dict__["name"] = name __props__.__dict__["node_count"] = node_count __props__.__dict__["node_labels"] = node_labels + if node_network_profile is not None and not isinstance(node_network_profile, KubernetesClusterNodePoolNodeNetworkProfileArgs): + node_network_profile = node_network_profile or {} + def _setter(key, value): + node_network_profile[key] = value + KubernetesClusterNodePoolNodeNetworkProfileArgs._configure(_setter, **node_network_profile) __props__.__dict__["node_network_profile"] = node_network_profile __props__.__dict__["node_public_ip_prefix_id"] = node_public_ip_prefix_id __props__.__dict__["node_taints"] = node_taints @@ -1792,11 +2149,21 @@ def _internal_init(__self__, __props__.__dict__["spot_max_price"] = spot_max_price __props__.__dict__["tags"] = tags __props__.__dict__["ultra_ssd_enabled"] = ultra_ssd_enabled + if upgrade_settings is not None and not isinstance(upgrade_settings, KubernetesClusterNodePoolUpgradeSettingsArgs): + upgrade_settings = upgrade_settings or {} + def _setter(key, value): + upgrade_settings[key] = value + KubernetesClusterNodePoolUpgradeSettingsArgs._configure(_setter, **upgrade_settings) __props__.__dict__["upgrade_settings"] = upgrade_settings if vm_size is None and not opts.urn: raise TypeError("Missing required property 'vm_size'") __props__.__dict__["vm_size"] = vm_size __props__.__dict__["vnet_subnet_id"] = vnet_subnet_id + if windows_profile is not None and not isinstance(windows_profile, KubernetesClusterNodePoolWindowsProfileArgs): + windows_profile = windows_profile or {} + def _setter(key, value): + windows_profile[key] = value + KubernetesClusterNodePoolWindowsProfileArgs._configure(_setter, **windows_profile) __props__.__dict__["windows_profile"] = windows_profile __props__.__dict__["workload_runtime"] = workload_runtime __props__.__dict__["zones"] = zones diff --git a/sdk/python/pulumi_azure/containerservice/kubernetes_fleet_manager.py b/sdk/python/pulumi_azure/containerservice/kubernetes_fleet_manager.py index 78d2aea373..85fb75f872 100644 --- a/sdk/python/pulumi_azure/containerservice/kubernetes_fleet_manager.py +++ b/sdk/python/pulumi_azure/containerservice/kubernetes_fleet_manager.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,15 +29,40 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of this Kubernetes Fleet Manager. Changing this forces a new Kubernetes Fleet Manager to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Kubernetes Fleet Manager. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + KubernetesFleetManagerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + hub_profile=hub_profile, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + hub_profile: Optional[pulumi.Input['KubernetesFleetManagerHubProfileArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if hub_profile is None and 'hubProfile' in kwargs: + hub_profile = kwargs['hubProfile'] + + _setter("resource_group_name", resource_group_name) if hub_profile is not None: - pulumi.set(__self__, "hub_profile", hub_profile) + _setter("hub_profile", hub_profile) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -116,16 +141,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group within which this Kubernetes Fleet Manager should exist. Changing this forces a new Kubernetes Fleet Manager to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Kubernetes Fleet Manager. """ + _KubernetesFleetManagerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + hub_profile=hub_profile, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hub_profile: Optional[pulumi.Input['KubernetesFleetManagerHubProfileArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hub_profile is None and 'hubProfile' in kwargs: + hub_profile = kwargs['hubProfile'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if hub_profile is not None: - pulumi.set(__self__, "hub_profile", hub_profile) + _setter("hub_profile", hub_profile) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="hubProfile") @@ -307,6 +355,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + KubernetesFleetManagerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -326,6 +378,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = KubernetesFleetManagerArgs.__new__(KubernetesFleetManagerArgs) + if hub_profile is not None and not isinstance(hub_profile, KubernetesFleetManagerHubProfileArgs): + hub_profile = hub_profile or {} + def _setter(key, value): + hub_profile[key] = value + KubernetesFleetManagerHubProfileArgs._configure(_setter, **hub_profile) __props__.__dict__["hub_profile"] = hub_profile __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/containerservice/outputs.py b/sdk/python/pulumi_azure/containerservice/outputs.py index 7d2cc35888..a17e5d91b2 100644 --- a/sdk/python/pulumi_azure/containerservice/outputs.py +++ b/sdk/python/pulumi_azure/containerservice/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -159,12 +159,33 @@ def __init__(__self__, *, > **NOTE:** One of either `tag` or `digest` can be specified. :param str tag: The tag of the artifact that wants to be subscribed for the Connected Registry. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + ConnectedRegistryNotification._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + digest=digest, + tag=tag, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + digest: Optional[str] = None, + tag: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if digest is not None: - pulumi.set(__self__, "digest", digest) + _setter("digest", digest) if tag is not None: - pulumi.set(__self__, "tag", tag) + _setter("tag", tag) @property @pulumi.getter @@ -253,21 +274,64 @@ def __init__(__self__, *, :param int sync_interval_in_seconds: Specifies the interval at which to re-reconcile the cluster Azure Blob source with the remote. :param int timeout_in_seconds: Specifies the maximum time to attempt to reconcile the cluster Azure Blob source with the remote. """ - pulumi.set(__self__, "container_id", container_id) + FluxConfigurationBlobStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + account_key=account_key, + local_auth_reference=local_auth_reference, + managed_identity=managed_identity, + sas_token=sas_token, + service_principal=service_principal, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[str] = None, + account_key: Optional[str] = None, + local_auth_reference: Optional[str] = None, + managed_identity: Optional['outputs.FluxConfigurationBlobStorageManagedIdentity'] = None, + sas_token: Optional[str] = None, + service_principal: Optional['outputs.FluxConfigurationBlobStorageServicePrincipal'] = None, + sync_interval_in_seconds: Optional[int] = None, + timeout_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if local_auth_reference is None and 'localAuthReference' in kwargs: + local_auth_reference = kwargs['localAuthReference'] + if managed_identity is None and 'managedIdentity' in kwargs: + managed_identity = kwargs['managedIdentity'] + if sas_token is None and 'sasToken' in kwargs: + sas_token = kwargs['sasToken'] + if service_principal is None and 'servicePrincipal' in kwargs: + service_principal = kwargs['servicePrincipal'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + + _setter("container_id", container_id) if account_key is not None: - pulumi.set(__self__, "account_key", account_key) + _setter("account_key", account_key) if local_auth_reference is not None: - pulumi.set(__self__, "local_auth_reference", local_auth_reference) + _setter("local_auth_reference", local_auth_reference) if managed_identity is not None: - pulumi.set(__self__, "managed_identity", managed_identity) + _setter("managed_identity", managed_identity) if sas_token is not None: - pulumi.set(__self__, "sas_token", sas_token) + _setter("sas_token", sas_token) if service_principal is not None: - pulumi.set(__self__, "service_principal", service_principal) + _setter("service_principal", service_principal) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) @property @pulumi.getter(name="containerId") @@ -358,7 +422,22 @@ def __init__(__self__, *, """ :param str client_id: Specifies the client ID for authenticating a Managed Identity. """ - pulumi.set(__self__, "client_id", client_id) + FluxConfigurationBlobStorageManagedIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -413,16 +492,53 @@ def __init__(__self__, *, :param bool client_certificate_send_chain: Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the client certificate. :param str client_secret: Specifies the client secret for authenticating a Service Principal. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "tenant_id", tenant_id) + FluxConfigurationBlobStorageServicePrincipal._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + tenant_id=tenant_id, + client_certificate_base64=client_certificate_base64, + client_certificate_password=client_certificate_password, + client_certificate_send_chain=client_certificate_send_chain, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + tenant_id: Optional[str] = None, + client_certificate_base64: Optional[str] = None, + client_certificate_password: Optional[str] = None, + client_certificate_send_chain: Optional[bool] = None, + client_secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if client_certificate_base64 is None and 'clientCertificateBase64' in kwargs: + client_certificate_base64 = kwargs['clientCertificateBase64'] + if client_certificate_password is None and 'clientCertificatePassword' in kwargs: + client_certificate_password = kwargs['clientCertificatePassword'] + if client_certificate_send_chain is None and 'clientCertificateSendChain' in kwargs: + client_certificate_send_chain = kwargs['clientCertificateSendChain'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + + _setter("client_id", client_id) + _setter("tenant_id", tenant_id) if client_certificate_base64 is not None: - pulumi.set(__self__, "client_certificate_base64", client_certificate_base64) + _setter("client_certificate_base64", client_certificate_base64) if client_certificate_password is not None: - pulumi.set(__self__, "client_certificate_password", client_certificate_password) + _setter("client_certificate_password", client_certificate_password) if client_certificate_send_chain is not None: - pulumi.set(__self__, "client_certificate_send_chain", client_certificate_send_chain) + _setter("client_certificate_send_chain", client_certificate_send_chain) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -523,20 +639,63 @@ def __init__(__self__, *, :param int timeout_in_seconds: Specifies the maximum time to attempt to reconcile the cluster git repository source with the remote. Defaults to `600`. :param bool tls_enabled: Specify whether to communicate with a bucket using TLS is enabled. Defaults to `true`. """ - pulumi.set(__self__, "bucket_name", bucket_name) - pulumi.set(__self__, "url", url) + FluxConfigurationBucket._configure( + lambda key, value: pulumi.set(__self__, key, value), + bucket_name=bucket_name, + url=url, + access_key=access_key, + local_auth_reference=local_auth_reference, + secret_key_base64=secret_key_base64, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + tls_enabled=tls_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bucket_name: Optional[str] = None, + url: Optional[str] = None, + access_key: Optional[str] = None, + local_auth_reference: Optional[str] = None, + secret_key_base64: Optional[str] = None, + sync_interval_in_seconds: Optional[int] = None, + timeout_in_seconds: Optional[int] = None, + tls_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bucket_name is None and 'bucketName' in kwargs: + bucket_name = kwargs['bucketName'] + if bucket_name is None: + raise TypeError("Missing 'bucket_name' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if access_key is None and 'accessKey' in kwargs: + access_key = kwargs['accessKey'] + if local_auth_reference is None and 'localAuthReference' in kwargs: + local_auth_reference = kwargs['localAuthReference'] + if secret_key_base64 is None and 'secretKeyBase64' in kwargs: + secret_key_base64 = kwargs['secretKeyBase64'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + if tls_enabled is None and 'tlsEnabled' in kwargs: + tls_enabled = kwargs['tlsEnabled'] + + _setter("bucket_name", bucket_name) + _setter("url", url) if access_key is not None: - pulumi.set(__self__, "access_key", access_key) + _setter("access_key", access_key) if local_auth_reference is not None: - pulumi.set(__self__, "local_auth_reference", local_auth_reference) + _setter("local_auth_reference", local_auth_reference) if secret_key_base64 is not None: - pulumi.set(__self__, "secret_key_base64", secret_key_base64) + _setter("secret_key_base64", secret_key_base64) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) if tls_enabled is not None: - pulumi.set(__self__, "tls_enabled", tls_enabled) + _setter("tls_enabled", tls_enabled) @property @pulumi.getter(name="bucketName") @@ -665,25 +824,82 @@ def __init__(__self__, *, :param int sync_interval_in_seconds: Specifies the interval at which to re-reconcile the cluster git repository source with the remote. Defaults to `600`. :param int timeout_in_seconds: Specifies the maximum time to attempt to reconcile the cluster git repository source with the remote. Defaults to `600`. """ - pulumi.set(__self__, "reference_type", reference_type) - pulumi.set(__self__, "reference_value", reference_value) - pulumi.set(__self__, "url", url) + FluxConfigurationGitRepository._configure( + lambda key, value: pulumi.set(__self__, key, value), + reference_type=reference_type, + reference_value=reference_value, + url=url, + https_ca_cert_base64=https_ca_cert_base64, + https_key_base64=https_key_base64, + https_user=https_user, + local_auth_reference=local_auth_reference, + ssh_known_hosts_base64=ssh_known_hosts_base64, + ssh_private_key_base64=ssh_private_key_base64, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + reference_type: Optional[str] = None, + reference_value: Optional[str] = None, + url: Optional[str] = None, + https_ca_cert_base64: Optional[str] = None, + https_key_base64: Optional[str] = None, + https_user: Optional[str] = None, + local_auth_reference: Optional[str] = None, + ssh_known_hosts_base64: Optional[str] = None, + ssh_private_key_base64: Optional[str] = None, + sync_interval_in_seconds: Optional[int] = None, + timeout_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if reference_type is None and 'referenceType' in kwargs: + reference_type = kwargs['referenceType'] + if reference_type is None: + raise TypeError("Missing 'reference_type' argument") + if reference_value is None and 'referenceValue' in kwargs: + reference_value = kwargs['referenceValue'] + if reference_value is None: + raise TypeError("Missing 'reference_value' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if https_ca_cert_base64 is None and 'httpsCaCertBase64' in kwargs: + https_ca_cert_base64 = kwargs['httpsCaCertBase64'] + if https_key_base64 is None and 'httpsKeyBase64' in kwargs: + https_key_base64 = kwargs['httpsKeyBase64'] + if https_user is None and 'httpsUser' in kwargs: + https_user = kwargs['httpsUser'] + if local_auth_reference is None and 'localAuthReference' in kwargs: + local_auth_reference = kwargs['localAuthReference'] + if ssh_known_hosts_base64 is None and 'sshKnownHostsBase64' in kwargs: + ssh_known_hosts_base64 = kwargs['sshKnownHostsBase64'] + if ssh_private_key_base64 is None and 'sshPrivateKeyBase64' in kwargs: + ssh_private_key_base64 = kwargs['sshPrivateKeyBase64'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + + _setter("reference_type", reference_type) + _setter("reference_value", reference_value) + _setter("url", url) if https_ca_cert_base64 is not None: - pulumi.set(__self__, "https_ca_cert_base64", https_ca_cert_base64) + _setter("https_ca_cert_base64", https_ca_cert_base64) if https_key_base64 is not None: - pulumi.set(__self__, "https_key_base64", https_key_base64) + _setter("https_key_base64", https_key_base64) if https_user is not None: - pulumi.set(__self__, "https_user", https_user) + _setter("https_user", https_user) if local_auth_reference is not None: - pulumi.set(__self__, "local_auth_reference", local_auth_reference) + _setter("local_auth_reference", local_auth_reference) if ssh_known_hosts_base64 is not None: - pulumi.set(__self__, "ssh_known_hosts_base64", ssh_known_hosts_base64) + _setter("ssh_known_hosts_base64", ssh_known_hosts_base64) if ssh_private_key_base64 is not None: - pulumi.set(__self__, "ssh_private_key_base64", ssh_private_key_base64) + _setter("ssh_private_key_base64", ssh_private_key_base64) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) @property @pulumi.getter(name="referenceType") @@ -822,21 +1038,60 @@ def __init__(__self__, *, :param int sync_interval_in_seconds: The interval at which to re-reconcile the kustomization on the cluster. Defaults to `600`. :param int timeout_in_seconds: The maximum time to attempt to reconcile the kustomization on the cluster. Defaults to `600`. """ - pulumi.set(__self__, "name", name) + FluxConfigurationKustomization._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + depends_ons=depends_ons, + garbage_collection_enabled=garbage_collection_enabled, + path=path, + recreating_enabled=recreating_enabled, + retry_interval_in_seconds=retry_interval_in_seconds, + sync_interval_in_seconds=sync_interval_in_seconds, + timeout_in_seconds=timeout_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + depends_ons: Optional[Sequence[str]] = None, + garbage_collection_enabled: Optional[bool] = None, + path: Optional[str] = None, + recreating_enabled: Optional[bool] = None, + retry_interval_in_seconds: Optional[int] = None, + sync_interval_in_seconds: Optional[int] = None, + timeout_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if depends_ons is None and 'dependsOns' in kwargs: + depends_ons = kwargs['dependsOns'] + if garbage_collection_enabled is None and 'garbageCollectionEnabled' in kwargs: + garbage_collection_enabled = kwargs['garbageCollectionEnabled'] + if recreating_enabled is None and 'recreatingEnabled' in kwargs: + recreating_enabled = kwargs['recreatingEnabled'] + if retry_interval_in_seconds is None and 'retryIntervalInSeconds' in kwargs: + retry_interval_in_seconds = kwargs['retryIntervalInSeconds'] + if sync_interval_in_seconds is None and 'syncIntervalInSeconds' in kwargs: + sync_interval_in_seconds = kwargs['syncIntervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + + _setter("name", name) if depends_ons is not None: - pulumi.set(__self__, "depends_ons", depends_ons) + _setter("depends_ons", depends_ons) if garbage_collection_enabled is not None: - pulumi.set(__self__, "garbage_collection_enabled", garbage_collection_enabled) + _setter("garbage_collection_enabled", garbage_collection_enabled) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if recreating_enabled is not None: - pulumi.set(__self__, "recreating_enabled", recreating_enabled) + _setter("recreating_enabled", recreating_enabled) if retry_interval_in_seconds is not None: - pulumi.set(__self__, "retry_interval_in_seconds", retry_interval_in_seconds) + _setter("retry_interval_in_seconds", retry_interval_in_seconds) if sync_interval_in_seconds is not None: - pulumi.set(__self__, "sync_interval_in_seconds", sync_interval_in_seconds) + _setter("sync_interval_in_seconds", sync_interval_in_seconds) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) @property @pulumi.getter @@ -971,34 +1226,97 @@ def __init__(__self__, *, :param Sequence['GroupContainerSecurityArgs'] securities: The definition of the security context for this container as documented in the `security` block below. Changing this forces a new resource to be created. :param Sequence['GroupContainerVolumeArgs'] volumes: The definition of a volume mount for this container as documented in the `volume` block below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cpu", cpu) - pulumi.set(__self__, "image", image) - pulumi.set(__self__, "memory", memory) - pulumi.set(__self__, "name", name) + GroupContainer._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + image=image, + memory=memory, + name=name, + commands=commands, + cpu_limit=cpu_limit, + environment_variables=environment_variables, + gpu=gpu, + gpu_limit=gpu_limit, + liveness_probe=liveness_probe, + memory_limit=memory_limit, + ports=ports, + readiness_probe=readiness_probe, + secure_environment_variables=secure_environment_variables, + securities=securities, + volumes=volumes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[float] = None, + image: Optional[str] = None, + memory: Optional[float] = None, + name: Optional[str] = None, + commands: Optional[Sequence[str]] = None, + cpu_limit: Optional[float] = None, + environment_variables: Optional[Mapping[str, str]] = None, + gpu: Optional['outputs.GroupContainerGpu'] = None, + gpu_limit: Optional['outputs.GroupContainerGpuLimit'] = None, + liveness_probe: Optional['outputs.GroupContainerLivenessProbe'] = None, + memory_limit: Optional[float] = None, + ports: Optional[Sequence['outputs.GroupContainerPort']] = None, + readiness_probe: Optional['outputs.GroupContainerReadinessProbe'] = None, + secure_environment_variables: Optional[Mapping[str, str]] = None, + securities: Optional[Sequence['outputs.GroupContainerSecurity']] = None, + volumes: Optional[Sequence['outputs.GroupContainerVolume']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is None: + raise TypeError("Missing 'cpu' argument") + if image is None: + raise TypeError("Missing 'image' argument") + if memory is None: + raise TypeError("Missing 'memory' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if cpu_limit is None and 'cpuLimit' in kwargs: + cpu_limit = kwargs['cpuLimit'] + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if gpu_limit is None and 'gpuLimit' in kwargs: + gpu_limit = kwargs['gpuLimit'] + if liveness_probe is None and 'livenessProbe' in kwargs: + liveness_probe = kwargs['livenessProbe'] + if memory_limit is None and 'memoryLimit' in kwargs: + memory_limit = kwargs['memoryLimit'] + if readiness_probe is None and 'readinessProbe' in kwargs: + readiness_probe = kwargs['readinessProbe'] + if secure_environment_variables is None and 'secureEnvironmentVariables' in kwargs: + secure_environment_variables = kwargs['secureEnvironmentVariables'] + + _setter("cpu", cpu) + _setter("image", image) + _setter("memory", memory) + _setter("name", name) if commands is not None: - pulumi.set(__self__, "commands", commands) + _setter("commands", commands) if cpu_limit is not None: - pulumi.set(__self__, "cpu_limit", cpu_limit) + _setter("cpu_limit", cpu_limit) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if gpu is not None: - pulumi.set(__self__, "gpu", gpu) + _setter("gpu", gpu) if gpu_limit is not None: - pulumi.set(__self__, "gpu_limit", gpu_limit) + _setter("gpu_limit", gpu_limit) if liveness_probe is not None: - pulumi.set(__self__, "liveness_probe", liveness_probe) + _setter("liveness_probe", liveness_probe) if memory_limit is not None: - pulumi.set(__self__, "memory_limit", memory_limit) + _setter("memory_limit", memory_limit) if ports is not None: - pulumi.set(__self__, "ports", ports) + _setter("ports", ports) if readiness_probe is not None: - pulumi.set(__self__, "readiness_probe", readiness_probe) + _setter("readiness_probe", readiness_probe) if secure_environment_variables is not None: - pulumi.set(__self__, "secure_environment_variables", secure_environment_variables) + _setter("secure_environment_variables", secure_environment_variables) if securities is not None: - pulumi.set(__self__, "securities", securities) + _setter("securities", securities) if volumes is not None: - pulumi.set(__self__, "volumes", volumes) + _setter("volumes", volumes) @property @pulumi.getter @@ -1140,10 +1458,23 @@ def __init__(__self__, *, :param int count: The number of GPUs which should be assigned to this container. Allowed values are `1`, `2`, or `4`. Changing this forces a new resource to be created. :param str sku: The SKU which should be used for the GPU. Possible values are `K80`, `P100`, or `V100`. Changing this forces a new resource to be created. """ + GroupContainerGpu._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + sku=sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + sku: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is not None: - pulumi.set(__self__, "count", count) + _setter("count", count) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) @property @pulumi.getter @@ -1171,10 +1502,23 @@ def __init__(__self__, *, :param int count: The upper limit of the number of GPUs which should be assigned to this container. :param str sku: The allowed SKU which should be used for the GPU. Possible values are `K80`, `P100`, or `V100`. """ + GroupContainerGpuLimit._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + sku=sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + sku: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is not None: - pulumi.set(__self__, "count", count) + _setter("count", count) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) @property @pulumi.getter @@ -1239,20 +1583,55 @@ def __init__(__self__, *, :param int success_threshold: Minimum consecutive successes for the probe to be considered successful after having failed. The default value is `1` and the minimum value is `1`. Changing this forces a new resource to be created. :param int timeout_seconds: Number of seconds after which the probe times out. The default value is `1` and the minimum value is `1`. Changing this forces a new resource to be created. """ + GroupContainerLivenessProbe._configure( + lambda key, value: pulumi.set(__self__, key, value), + execs=execs, + failure_threshold=failure_threshold, + http_gets=http_gets, + initial_delay_seconds=initial_delay_seconds, + period_seconds=period_seconds, + success_threshold=success_threshold, + timeout_seconds=timeout_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + execs: Optional[Sequence[str]] = None, + failure_threshold: Optional[int] = None, + http_gets: Optional[Sequence['outputs.GroupContainerLivenessProbeHttpGet']] = None, + initial_delay_seconds: Optional[int] = None, + period_seconds: Optional[int] = None, + success_threshold: Optional[int] = None, + timeout_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failure_threshold is None and 'failureThreshold' in kwargs: + failure_threshold = kwargs['failureThreshold'] + if http_gets is None and 'httpGets' in kwargs: + http_gets = kwargs['httpGets'] + if initial_delay_seconds is None and 'initialDelaySeconds' in kwargs: + initial_delay_seconds = kwargs['initialDelaySeconds'] + if period_seconds is None and 'periodSeconds' in kwargs: + period_seconds = kwargs['periodSeconds'] + if success_threshold is None and 'successThreshold' in kwargs: + success_threshold = kwargs['successThreshold'] + if timeout_seconds is None and 'timeoutSeconds' in kwargs: + timeout_seconds = kwargs['timeoutSeconds'] + if execs is not None: - pulumi.set(__self__, "execs", execs) + _setter("execs", execs) if failure_threshold is not None: - pulumi.set(__self__, "failure_threshold", failure_threshold) + _setter("failure_threshold", failure_threshold) if http_gets is not None: - pulumi.set(__self__, "http_gets", http_gets) + _setter("http_gets", http_gets) if initial_delay_seconds is not None: - pulumi.set(__self__, "initial_delay_seconds", initial_delay_seconds) + _setter("initial_delay_seconds", initial_delay_seconds) if period_seconds is not None: - pulumi.set(__self__, "period_seconds", period_seconds) + _setter("period_seconds", period_seconds) if success_threshold is not None: - pulumi.set(__self__, "success_threshold", success_threshold) + _setter("success_threshold", success_threshold) if timeout_seconds is not None: - pulumi.set(__self__, "timeout_seconds", timeout_seconds) + _setter("timeout_seconds", timeout_seconds) @property @pulumi.getter @@ -1341,14 +1720,33 @@ def __init__(__self__, *, :param int port: Number of the port to access on the container. Changing this forces a new resource to be created. :param str scheme: Scheme to use for connecting to the host. Possible values are `Http` and `Https`. Changing this forces a new resource to be created. """ + GroupContainerLivenessProbeHttpGet._configure( + lambda key, value: pulumi.set(__self__, key, value), + http_headers=http_headers, + path=path, + port=port, + scheme=scheme, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + http_headers: Optional[Mapping[str, str]] = None, + path: Optional[str] = None, + port: Optional[int] = None, + scheme: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if http_headers is None and 'httpHeaders' in kwargs: + http_headers = kwargs['httpHeaders'] + if http_headers is not None: - pulumi.set(__self__, "http_headers", http_headers) + _setter("http_headers", http_headers) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if scheme is not None: - pulumi.set(__self__, "scheme", scheme) + _setter("scheme", scheme) @property @pulumi.getter(name="httpHeaders") @@ -1394,10 +1792,23 @@ def __init__(__self__, *, > **Note:** Omitting these blocks will default the exposed ports on the group to all ports on all containers defined in the `container` blocks of this group. """ + GroupContainerPort._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + protocol=protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + protocol: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) @property @pulumi.getter @@ -1464,20 +1875,55 @@ def __init__(__self__, *, :param int success_threshold: Minimum consecutive successes for the probe to be considered successful after having failed. The default value is `1` and the minimum value is `1`. Changing this forces a new resource to be created. :param int timeout_seconds: Number of seconds after which the probe times out. The default value is `1` and the minimum value is `1`. Changing this forces a new resource to be created. """ + GroupContainerReadinessProbe._configure( + lambda key, value: pulumi.set(__self__, key, value), + execs=execs, + failure_threshold=failure_threshold, + http_gets=http_gets, + initial_delay_seconds=initial_delay_seconds, + period_seconds=period_seconds, + success_threshold=success_threshold, + timeout_seconds=timeout_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + execs: Optional[Sequence[str]] = None, + failure_threshold: Optional[int] = None, + http_gets: Optional[Sequence['outputs.GroupContainerReadinessProbeHttpGet']] = None, + initial_delay_seconds: Optional[int] = None, + period_seconds: Optional[int] = None, + success_threshold: Optional[int] = None, + timeout_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failure_threshold is None and 'failureThreshold' in kwargs: + failure_threshold = kwargs['failureThreshold'] + if http_gets is None and 'httpGets' in kwargs: + http_gets = kwargs['httpGets'] + if initial_delay_seconds is None and 'initialDelaySeconds' in kwargs: + initial_delay_seconds = kwargs['initialDelaySeconds'] + if period_seconds is None and 'periodSeconds' in kwargs: + period_seconds = kwargs['periodSeconds'] + if success_threshold is None and 'successThreshold' in kwargs: + success_threshold = kwargs['successThreshold'] + if timeout_seconds is None and 'timeoutSeconds' in kwargs: + timeout_seconds = kwargs['timeoutSeconds'] + if execs is not None: - pulumi.set(__self__, "execs", execs) + _setter("execs", execs) if failure_threshold is not None: - pulumi.set(__self__, "failure_threshold", failure_threshold) + _setter("failure_threshold", failure_threshold) if http_gets is not None: - pulumi.set(__self__, "http_gets", http_gets) + _setter("http_gets", http_gets) if initial_delay_seconds is not None: - pulumi.set(__self__, "initial_delay_seconds", initial_delay_seconds) + _setter("initial_delay_seconds", initial_delay_seconds) if period_seconds is not None: - pulumi.set(__self__, "period_seconds", period_seconds) + _setter("period_seconds", period_seconds) if success_threshold is not None: - pulumi.set(__self__, "success_threshold", success_threshold) + _setter("success_threshold", success_threshold) if timeout_seconds is not None: - pulumi.set(__self__, "timeout_seconds", timeout_seconds) + _setter("timeout_seconds", timeout_seconds) @property @pulumi.getter @@ -1566,14 +2012,33 @@ def __init__(__self__, *, :param int port: Number of the port to access on the container. Changing this forces a new resource to be created. :param str scheme: Scheme to use for connecting to the host. Possible values are `Http` and `Https`. Changing this forces a new resource to be created. """ + GroupContainerReadinessProbeHttpGet._configure( + lambda key, value: pulumi.set(__self__, key, value), + http_headers=http_headers, + path=path, + port=port, + scheme=scheme, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + http_headers: Optional[Mapping[str, str]] = None, + path: Optional[str] = None, + port: Optional[int] = None, + scheme: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if http_headers is None and 'httpHeaders' in kwargs: + http_headers = kwargs['httpHeaders'] + if http_headers is not None: - pulumi.set(__self__, "http_headers", http_headers) + _setter("http_headers", http_headers) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if scheme is not None: - pulumi.set(__self__, "scheme", scheme) + _setter("scheme", scheme) @property @pulumi.getter(name="httpHeaders") @@ -1634,7 +2099,22 @@ def __init__(__self__, *, > **NOTE:** Currently, this only applies when the `os_type` is `Linux` and the `sku` is `Confidential`. """ - pulumi.set(__self__, "privilege_enabled", privilege_enabled) + GroupContainerSecurity._configure( + lambda key, value: pulumi.set(__self__, key, value), + privilege_enabled=privilege_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + privilege_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if privilege_enabled is None and 'privilegeEnabled' in kwargs: + privilege_enabled = kwargs['privilegeEnabled'] + if privilege_enabled is None: + raise TypeError("Missing 'privilege_enabled' argument") + + _setter("privilege_enabled", privilege_enabled) @property @pulumi.getter(name="privilegeEnabled") @@ -1705,22 +2185,67 @@ def __init__(__self__, *, :param str storage_account_key: The access key for the Azure Storage account specified as above. Changing this forces a new resource to be created. :param str storage_account_name: The Azure storage account from which the volume is to be mounted. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "mount_path", mount_path) - pulumi.set(__self__, "name", name) + GroupContainerVolume._configure( + lambda key, value: pulumi.set(__self__, key, value), + mount_path=mount_path, + name=name, + empty_dir=empty_dir, + git_repo=git_repo, + read_only=read_only, + secret=secret, + share_name=share_name, + storage_account_key=storage_account_key, + storage_account_name=storage_account_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mount_path: Optional[str] = None, + name: Optional[str] = None, + empty_dir: Optional[bool] = None, + git_repo: Optional['outputs.GroupContainerVolumeGitRepo'] = None, + read_only: Optional[bool] = None, + secret: Optional[Mapping[str, str]] = None, + share_name: Optional[str] = None, + storage_account_key: Optional[str] = None, + storage_account_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + if mount_path is None: + raise TypeError("Missing 'mount_path' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if empty_dir is None and 'emptyDir' in kwargs: + empty_dir = kwargs['emptyDir'] + if git_repo is None and 'gitRepo' in kwargs: + git_repo = kwargs['gitRepo'] + if read_only is None and 'readOnly' in kwargs: + read_only = kwargs['readOnly'] + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + + _setter("mount_path", mount_path) + _setter("name", name) if empty_dir is not None: - pulumi.set(__self__, "empty_dir", empty_dir) + _setter("empty_dir", empty_dir) if git_repo is not None: - pulumi.set(__self__, "git_repo", git_repo) + _setter("git_repo", git_repo) if read_only is not None: - pulumi.set(__self__, "read_only", read_only) + _setter("read_only", read_only) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if share_name is not None: - pulumi.set(__self__, "share_name", share_name) + _setter("share_name", share_name) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) @property @pulumi.getter(name="mountPath") @@ -1812,11 +2337,28 @@ def __init__(__self__, *, :param str directory: Specifies the directory into which the repository should be cloned. Changing this forces a new resource to be created. :param str revision: Specifies the commit hash of the revision to be cloned. If unspecified, the HEAD revision is cloned. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "url", url) + GroupContainerVolumeGitRepo._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + directory=directory, + revision=revision, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[str] = None, + directory: Optional[str] = None, + revision: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("url", url) if directory is not None: - pulumi.set(__self__, "directory", directory) + _setter("directory", directory) if revision is not None: - pulumi.set(__self__, "revision", revision) + _setter("revision", revision) @property @pulumi.getter @@ -1867,7 +2409,22 @@ def __init__(__self__, *, """ :param 'GroupDiagnosticsLogAnalyticsArgs' log_analytics: A `log_analytics` block as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "log_analytics", log_analytics) + GroupDiagnostics._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics=log_analytics, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics: Optional['outputs.GroupDiagnosticsLogAnalytics'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics is None and 'logAnalytics' in kwargs: + log_analytics = kwargs['logAnalytics'] + if log_analytics is None: + raise TypeError("Missing 'log_analytics' argument") + + _setter("log_analytics", log_analytics) @property @pulumi.getter(name="logAnalytics") @@ -1912,12 +2469,39 @@ def __init__(__self__, *, :param str log_type: The log type which should be used. Possible values are `ContainerInsights` and `ContainerInstanceLogs`. Changing this forces a new resource to be created. :param Mapping[str, str] metadata: Any metadata required for Log Analytics. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "workspace_id", workspace_id) - pulumi.set(__self__, "workspace_key", workspace_key) + GroupDiagnosticsLogAnalytics._configure( + lambda key, value: pulumi.set(__self__, key, value), + workspace_id=workspace_id, + workspace_key=workspace_key, + log_type=log_type, + metadata=metadata, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + workspace_id: Optional[str] = None, + workspace_key: Optional[str] = None, + log_type: Optional[str] = None, + metadata: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if workspace_key is None and 'workspaceKey' in kwargs: + workspace_key = kwargs['workspaceKey'] + if workspace_key is None: + raise TypeError("Missing 'workspace_key' argument") + if log_type is None and 'logType' in kwargs: + log_type = kwargs['logType'] + + _setter("workspace_id", workspace_id) + _setter("workspace_key", workspace_key) if log_type is not None: - pulumi.set(__self__, "log_type", log_type) + _setter("log_type", log_type) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) @property @pulumi.getter(name="workspaceId") @@ -1980,11 +2564,30 @@ def __init__(__self__, *, :param Sequence[str] options: A list of [resolver configuration options](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). Changing this forces a new resource to be created. :param Sequence[str] search_domains: A list of search domains that DNS requests will search along. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "nameservers", nameservers) + GroupDnsConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + nameservers=nameservers, + options=options, + search_domains=search_domains, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + nameservers: Optional[Sequence[str]] = None, + options: Optional[Sequence[str]] = None, + search_domains: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if nameservers is None: + raise TypeError("Missing 'nameservers' argument") + if search_domains is None and 'searchDomains' in kwargs: + search_domains = kwargs['searchDomains'] + + _setter("nameservers", nameservers) if options is not None: - pulumi.set(__self__, "options", options) + _setter("options", options) if search_domains is not None: - pulumi.set(__self__, "search_domains", search_domains) + _setter("search_domains", search_domains) @property @pulumi.getter @@ -2022,10 +2625,23 @@ def __init__(__self__, *, > **Note:** Removing all `exposed_port` blocks requires setting `exposed_port = []`. """ + GroupExposedPort._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + protocol=protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + protocol: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) @property @pulumi.getter @@ -2086,13 +2702,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + GroupIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -2163,13 +2804,34 @@ def __init__(__self__, *, :param str user_assigned_identity_id: The identity ID for the private registry. Changing this forces a new resource to be created. :param str username: The username with which to connect to the registry. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "server", server) + GroupImageRegistryCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + server=server, + password=password, + user_assigned_identity_id=user_assigned_identity_id, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server: Optional[str] = None, + password: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server is None: + raise TypeError("Missing 'server' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + + _setter("server", server) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -2242,18 +2904,49 @@ def __init__(__self__, *, :param Sequence['GroupInitContainerSecurityArgs'] securities: The definition of the security context for this container as documented in the `security` block below. Changing this forces a new resource to be created. :param Sequence['GroupInitContainerVolumeArgs'] volumes: The definition of a volume mount for this container as documented in the `volume` block below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "image", image) - pulumi.set(__self__, "name", name) + GroupInitContainer._configure( + lambda key, value: pulumi.set(__self__, key, value), + image=image, + name=name, + commands=commands, + environment_variables=environment_variables, + secure_environment_variables=secure_environment_variables, + securities=securities, + volumes=volumes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + image: Optional[str] = None, + name: Optional[str] = None, + commands: Optional[Sequence[str]] = None, + environment_variables: Optional[Mapping[str, str]] = None, + secure_environment_variables: Optional[Mapping[str, str]] = None, + securities: Optional[Sequence['outputs.GroupInitContainerSecurity']] = None, + volumes: Optional[Sequence['outputs.GroupInitContainerVolume']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if image is None: + raise TypeError("Missing 'image' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if secure_environment_variables is None and 'secureEnvironmentVariables' in kwargs: + secure_environment_variables = kwargs['secureEnvironmentVariables'] + + _setter("image", image) + _setter("name", name) if commands is not None: - pulumi.set(__self__, "commands", commands) + _setter("commands", commands) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if secure_environment_variables is not None: - pulumi.set(__self__, "secure_environment_variables", secure_environment_variables) + _setter("secure_environment_variables", secure_environment_variables) if securities is not None: - pulumi.set(__self__, "securities", securities) + _setter("securities", securities) if volumes is not None: - pulumi.set(__self__, "volumes", volumes) + _setter("volumes", volumes) @property @pulumi.getter @@ -2338,7 +3031,22 @@ def __init__(__self__, *, > **NOTE:** Currently, this only applies when the `os_type` is `Linux` and the `sku` is `Confidential`. """ - pulumi.set(__self__, "privilege_enabled", privilege_enabled) + GroupInitContainerSecurity._configure( + lambda key, value: pulumi.set(__self__, key, value), + privilege_enabled=privilege_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + privilege_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if privilege_enabled is None and 'privilegeEnabled' in kwargs: + privilege_enabled = kwargs['privilegeEnabled'] + if privilege_enabled is None: + raise TypeError("Missing 'privilege_enabled' argument") + + _setter("privilege_enabled", privilege_enabled) @property @pulumi.getter(name="privilegeEnabled") @@ -2409,22 +3117,67 @@ def __init__(__self__, *, :param str storage_account_key: The access key for the Azure Storage account specified as above. Changing this forces a new resource to be created. :param str storage_account_name: The Azure storage account from which the volume is to be mounted. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "mount_path", mount_path) - pulumi.set(__self__, "name", name) + GroupInitContainerVolume._configure( + lambda key, value: pulumi.set(__self__, key, value), + mount_path=mount_path, + name=name, + empty_dir=empty_dir, + git_repo=git_repo, + read_only=read_only, + secret=secret, + share_name=share_name, + storage_account_key=storage_account_key, + storage_account_name=storage_account_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mount_path: Optional[str] = None, + name: Optional[str] = None, + empty_dir: Optional[bool] = None, + git_repo: Optional['outputs.GroupInitContainerVolumeGitRepo'] = None, + read_only: Optional[bool] = None, + secret: Optional[Mapping[str, str]] = None, + share_name: Optional[str] = None, + storage_account_key: Optional[str] = None, + storage_account_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mount_path is None and 'mountPath' in kwargs: + mount_path = kwargs['mountPath'] + if mount_path is None: + raise TypeError("Missing 'mount_path' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if empty_dir is None and 'emptyDir' in kwargs: + empty_dir = kwargs['emptyDir'] + if git_repo is None and 'gitRepo' in kwargs: + git_repo = kwargs['gitRepo'] + if read_only is None and 'readOnly' in kwargs: + read_only = kwargs['readOnly'] + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + + _setter("mount_path", mount_path) + _setter("name", name) if empty_dir is not None: - pulumi.set(__self__, "empty_dir", empty_dir) + _setter("empty_dir", empty_dir) if git_repo is not None: - pulumi.set(__self__, "git_repo", git_repo) + _setter("git_repo", git_repo) if read_only is not None: - pulumi.set(__self__, "read_only", read_only) + _setter("read_only", read_only) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if share_name is not None: - pulumi.set(__self__, "share_name", share_name) + _setter("share_name", share_name) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) @property @pulumi.getter(name="mountPath") @@ -2516,11 +3269,28 @@ def __init__(__self__, *, :param str directory: Specifies the directory into which the repository should be cloned. Changing this forces a new resource to be created. :param str revision: Specifies the commit hash of the revision to be cloned. If unspecified, the HEAD revision is cloned. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "url", url) + GroupInitContainerVolumeGitRepo._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + directory=directory, + revision=revision, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[str] = None, + directory: Optional[str] = None, + revision: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("url", url) if directory is not None: - pulumi.set(__self__, "directory", directory) + _setter("directory", directory) if revision is not None: - pulumi.set(__self__, "revision", revision) + _setter("revision", revision) @property @pulumi.getter @@ -2592,9 +3362,28 @@ def __init__(__self__, *, ``` :param Sequence['KubernetesClusterAciConnectorLinuxConnectorIdentityArgs'] connector_identities: A `connector_identity` block is exported. The exported attributes are defined below. """ - pulumi.set(__self__, "subnet_name", subnet_name) + KubernetesClusterAciConnectorLinux._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_name=subnet_name, + connector_identities=connector_identities, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_name: Optional[str] = None, + connector_identities: Optional[Sequence['outputs.KubernetesClusterAciConnectorLinuxConnectorIdentity']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_name is None and 'subnetName' in kwargs: + subnet_name = kwargs['subnetName'] + if subnet_name is None: + raise TypeError("Missing 'subnet_name' argument") + if connector_identities is None and 'connectorIdentities' in kwargs: + connector_identities = kwargs['connectorIdentities'] + + _setter("subnet_name", subnet_name) if connector_identities is not None: - pulumi.set(__self__, "connector_identities", connector_identities) + _setter("connector_identities", connector_identities) @property @pulumi.getter(name="subnetName") @@ -2664,12 +3453,33 @@ def __init__(__self__, *, > **Note:** When `kubelet_identity` is enabled - The `type` field in the `identity` block must be set to `UserAssigned` and `identity_ids` must be set. """ + KubernetesClusterAciConnectorLinuxConnectorIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + object_id: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -2732,12 +3542,33 @@ def __init__(__self__, *, > **Note:** This requires that the Preview Feature `Microsoft.ContainerService/EnableAPIServerVnetIntegrationPreview` is enabled and the Resource Provider is re-registered, see [the documentation](https://learn.microsoft.com/en-us/azure/aks/api-server-vnet-integration#register-the-enableapiservervnetintegrationpreview-preview-feature) for more information. """ + KubernetesClusterApiServerAccessProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorized_ip_ranges=authorized_ip_ranges, + subnet_id=subnet_id, + vnet_integration_enabled=vnet_integration_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorized_ip_ranges: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + vnet_integration_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorized_ip_ranges is None and 'authorizedIpRanges' in kwargs: + authorized_ip_ranges = kwargs['authorizedIpRanges'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if vnet_integration_enabled is None and 'vnetIntegrationEnabled' in kwargs: + vnet_integration_enabled = kwargs['vnetIntegrationEnabled'] + if authorized_ip_ranges is not None: - pulumi.set(__self__, "authorized_ip_ranges", authorized_ip_ranges) + _setter("authorized_ip_ranges", authorized_ip_ranges) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if vnet_integration_enabled is not None: - pulumi.set(__self__, "vnet_integration_enabled", vnet_integration_enabled) + _setter("vnet_integration_enabled", vnet_integration_enabled) @property @pulumi.getter(name="authorizedIpRanges") @@ -2852,40 +3683,115 @@ def __init__(__self__, *, :param bool skip_nodes_with_local_storage: If `true` cluster autoscaler will never delete nodes with pods with local storage, for example, EmptyDir or HostPath. Defaults to `true`. :param bool skip_nodes_with_system_pods: If `true` cluster autoscaler will never delete nodes with pods from kube-system (except for DaemonSet or mirror pods). Defaults to `true`. """ + KubernetesClusterAutoScalerProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + balance_similar_node_groups=balance_similar_node_groups, + empty_bulk_delete_max=empty_bulk_delete_max, + expander=expander, + max_graceful_termination_sec=max_graceful_termination_sec, + max_node_provisioning_time=max_node_provisioning_time, + max_unready_nodes=max_unready_nodes, + max_unready_percentage=max_unready_percentage, + new_pod_scale_up_delay=new_pod_scale_up_delay, + scale_down_delay_after_add=scale_down_delay_after_add, + scale_down_delay_after_delete=scale_down_delay_after_delete, + scale_down_delay_after_failure=scale_down_delay_after_failure, + scale_down_unneeded=scale_down_unneeded, + scale_down_unready=scale_down_unready, + scale_down_utilization_threshold=scale_down_utilization_threshold, + scan_interval=scan_interval, + skip_nodes_with_local_storage=skip_nodes_with_local_storage, + skip_nodes_with_system_pods=skip_nodes_with_system_pods, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + balance_similar_node_groups: Optional[bool] = None, + empty_bulk_delete_max: Optional[str] = None, + expander: Optional[str] = None, + max_graceful_termination_sec: Optional[str] = None, + max_node_provisioning_time: Optional[str] = None, + max_unready_nodes: Optional[int] = None, + max_unready_percentage: Optional[float] = None, + new_pod_scale_up_delay: Optional[str] = None, + scale_down_delay_after_add: Optional[str] = None, + scale_down_delay_after_delete: Optional[str] = None, + scale_down_delay_after_failure: Optional[str] = None, + scale_down_unneeded: Optional[str] = None, + scale_down_unready: Optional[str] = None, + scale_down_utilization_threshold: Optional[str] = None, + scan_interval: Optional[str] = None, + skip_nodes_with_local_storage: Optional[bool] = None, + skip_nodes_with_system_pods: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if balance_similar_node_groups is None and 'balanceSimilarNodeGroups' in kwargs: + balance_similar_node_groups = kwargs['balanceSimilarNodeGroups'] + if empty_bulk_delete_max is None and 'emptyBulkDeleteMax' in kwargs: + empty_bulk_delete_max = kwargs['emptyBulkDeleteMax'] + if max_graceful_termination_sec is None and 'maxGracefulTerminationSec' in kwargs: + max_graceful_termination_sec = kwargs['maxGracefulTerminationSec'] + if max_node_provisioning_time is None and 'maxNodeProvisioningTime' in kwargs: + max_node_provisioning_time = kwargs['maxNodeProvisioningTime'] + if max_unready_nodes is None and 'maxUnreadyNodes' in kwargs: + max_unready_nodes = kwargs['maxUnreadyNodes'] + if max_unready_percentage is None and 'maxUnreadyPercentage' in kwargs: + max_unready_percentage = kwargs['maxUnreadyPercentage'] + if new_pod_scale_up_delay is None and 'newPodScaleUpDelay' in kwargs: + new_pod_scale_up_delay = kwargs['newPodScaleUpDelay'] + if scale_down_delay_after_add is None and 'scaleDownDelayAfterAdd' in kwargs: + scale_down_delay_after_add = kwargs['scaleDownDelayAfterAdd'] + if scale_down_delay_after_delete is None and 'scaleDownDelayAfterDelete' in kwargs: + scale_down_delay_after_delete = kwargs['scaleDownDelayAfterDelete'] + if scale_down_delay_after_failure is None and 'scaleDownDelayAfterFailure' in kwargs: + scale_down_delay_after_failure = kwargs['scaleDownDelayAfterFailure'] + if scale_down_unneeded is None and 'scaleDownUnneeded' in kwargs: + scale_down_unneeded = kwargs['scaleDownUnneeded'] + if scale_down_unready is None and 'scaleDownUnready' in kwargs: + scale_down_unready = kwargs['scaleDownUnready'] + if scale_down_utilization_threshold is None and 'scaleDownUtilizationThreshold' in kwargs: + scale_down_utilization_threshold = kwargs['scaleDownUtilizationThreshold'] + if scan_interval is None and 'scanInterval' in kwargs: + scan_interval = kwargs['scanInterval'] + if skip_nodes_with_local_storage is None and 'skipNodesWithLocalStorage' in kwargs: + skip_nodes_with_local_storage = kwargs['skipNodesWithLocalStorage'] + if skip_nodes_with_system_pods is None and 'skipNodesWithSystemPods' in kwargs: + skip_nodes_with_system_pods = kwargs['skipNodesWithSystemPods'] + if balance_similar_node_groups is not None: - pulumi.set(__self__, "balance_similar_node_groups", balance_similar_node_groups) + _setter("balance_similar_node_groups", balance_similar_node_groups) if empty_bulk_delete_max is not None: - pulumi.set(__self__, "empty_bulk_delete_max", empty_bulk_delete_max) + _setter("empty_bulk_delete_max", empty_bulk_delete_max) if expander is not None: - pulumi.set(__self__, "expander", expander) + _setter("expander", expander) if max_graceful_termination_sec is not None: - pulumi.set(__self__, "max_graceful_termination_sec", max_graceful_termination_sec) + _setter("max_graceful_termination_sec", max_graceful_termination_sec) if max_node_provisioning_time is not None: - pulumi.set(__self__, "max_node_provisioning_time", max_node_provisioning_time) + _setter("max_node_provisioning_time", max_node_provisioning_time) if max_unready_nodes is not None: - pulumi.set(__self__, "max_unready_nodes", max_unready_nodes) + _setter("max_unready_nodes", max_unready_nodes) if max_unready_percentage is not None: - pulumi.set(__self__, "max_unready_percentage", max_unready_percentage) + _setter("max_unready_percentage", max_unready_percentage) if new_pod_scale_up_delay is not None: - pulumi.set(__self__, "new_pod_scale_up_delay", new_pod_scale_up_delay) + _setter("new_pod_scale_up_delay", new_pod_scale_up_delay) if scale_down_delay_after_add is not None: - pulumi.set(__self__, "scale_down_delay_after_add", scale_down_delay_after_add) + _setter("scale_down_delay_after_add", scale_down_delay_after_add) if scale_down_delay_after_delete is not None: - pulumi.set(__self__, "scale_down_delay_after_delete", scale_down_delay_after_delete) + _setter("scale_down_delay_after_delete", scale_down_delay_after_delete) if scale_down_delay_after_failure is not None: - pulumi.set(__self__, "scale_down_delay_after_failure", scale_down_delay_after_failure) + _setter("scale_down_delay_after_failure", scale_down_delay_after_failure) if scale_down_unneeded is not None: - pulumi.set(__self__, "scale_down_unneeded", scale_down_unneeded) + _setter("scale_down_unneeded", scale_down_unneeded) if scale_down_unready is not None: - pulumi.set(__self__, "scale_down_unready", scale_down_unready) + _setter("scale_down_unready", scale_down_unready) if scale_down_utilization_threshold is not None: - pulumi.set(__self__, "scale_down_utilization_threshold", scale_down_utilization_threshold) + _setter("scale_down_utilization_threshold", scale_down_utilization_threshold) if scan_interval is not None: - pulumi.set(__self__, "scan_interval", scan_interval) + _setter("scan_interval", scan_interval) if skip_nodes_with_local_storage is not None: - pulumi.set(__self__, "skip_nodes_with_local_storage", skip_nodes_with_local_storage) + _setter("skip_nodes_with_local_storage", skip_nodes_with_local_storage) if skip_nodes_with_system_pods is not None: - pulumi.set(__self__, "skip_nodes_with_system_pods", skip_nodes_with_system_pods) + _setter("skip_nodes_with_system_pods", skip_nodes_with_system_pods) @property @pulumi.getter(name="balanceSimilarNodeGroups") @@ -3070,20 +3976,55 @@ def __init__(__self__, *, :param str server_app_secret: The Server Secret of an Azure Active Directory Application. :param str tenant_id: The Tenant ID used for Azure Active Directory Application. If this isn't specified the Tenant ID of the current Subscription is used. """ + KubernetesClusterAzureActiveDirectoryRoleBasedAccessControl._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_group_object_ids=admin_group_object_ids, + azure_rbac_enabled=azure_rbac_enabled, + client_app_id=client_app_id, + managed=managed, + server_app_id=server_app_id, + server_app_secret=server_app_secret, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_group_object_ids: Optional[Sequence[str]] = None, + azure_rbac_enabled: Optional[bool] = None, + client_app_id: Optional[str] = None, + managed: Optional[bool] = None, + server_app_id: Optional[str] = None, + server_app_secret: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_group_object_ids is None and 'adminGroupObjectIds' in kwargs: + admin_group_object_ids = kwargs['adminGroupObjectIds'] + if azure_rbac_enabled is None and 'azureRbacEnabled' in kwargs: + azure_rbac_enabled = kwargs['azureRbacEnabled'] + if client_app_id is None and 'clientAppId' in kwargs: + client_app_id = kwargs['clientAppId'] + if server_app_id is None and 'serverAppId' in kwargs: + server_app_id = kwargs['serverAppId'] + if server_app_secret is None and 'serverAppSecret' in kwargs: + server_app_secret = kwargs['serverAppSecret'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if admin_group_object_ids is not None: - pulumi.set(__self__, "admin_group_object_ids", admin_group_object_ids) + _setter("admin_group_object_ids", admin_group_object_ids) if azure_rbac_enabled is not None: - pulumi.set(__self__, "azure_rbac_enabled", azure_rbac_enabled) + _setter("azure_rbac_enabled", azure_rbac_enabled) if client_app_id is not None: - pulumi.set(__self__, "client_app_id", client_app_id) + _setter("client_app_id", client_app_id) if managed is not None: - pulumi.set(__self__, "managed", managed) + _setter("managed", managed) if server_app_id is not None: - pulumi.set(__self__, "server_app_id", server_app_id) + _setter("server_app_id", server_app_id) if server_app_secret is not None: - pulumi.set(__self__, "server_app_secret", server_app_secret) + _setter("server_app_secret", server_app_secret) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="adminGroupObjectIds") @@ -3166,7 +4107,22 @@ def __init__(__self__, *, """ :param bool sgx_quote_helper_enabled: Should the SGX quote helper be enabled? """ - pulumi.set(__self__, "sgx_quote_helper_enabled", sgx_quote_helper_enabled) + KubernetesClusterConfidentialComputing._configure( + lambda key, value: pulumi.set(__self__, key, value), + sgx_quote_helper_enabled=sgx_quote_helper_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sgx_quote_helper_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sgx_quote_helper_enabled is None and 'sgxQuoteHelperEnabled' in kwargs: + sgx_quote_helper_enabled = kwargs['sgxQuoteHelperEnabled'] + if sgx_quote_helper_enabled is None: + raise TypeError("Missing 'sgx_quote_helper_enabled' argument") + + _setter("sgx_quote_helper_enabled", sgx_quote_helper_enabled) @property @pulumi.getter(name="sgxQuoteHelperEnabled") @@ -3361,80 +4317,237 @@ def __init__(__self__, *, > **Note:** This requires that the `type` is set to `VirtualMachineScaleSets` and that `load_balancer_sku` is set to `standard`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "vm_size", vm_size) + KubernetesClusterDefaultNodePool._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + vm_size=vm_size, + capacity_reservation_group_id=capacity_reservation_group_id, + custom_ca_trust_enabled=custom_ca_trust_enabled, + enable_auto_scaling=enable_auto_scaling, + enable_host_encryption=enable_host_encryption, + enable_node_public_ip=enable_node_public_ip, + fips_enabled=fips_enabled, + host_group_id=host_group_id, + kubelet_config=kubelet_config, + kubelet_disk_type=kubelet_disk_type, + linux_os_config=linux_os_config, + max_count=max_count, + max_pods=max_pods, + message_of_the_day=message_of_the_day, + min_count=min_count, + node_count=node_count, + node_labels=node_labels, + node_network_profile=node_network_profile, + node_public_ip_prefix_id=node_public_ip_prefix_id, + node_taints=node_taints, + only_critical_addons_enabled=only_critical_addons_enabled, + orchestrator_version=orchestrator_version, + os_disk_size_gb=os_disk_size_gb, + os_disk_type=os_disk_type, + os_sku=os_sku, + pod_subnet_id=pod_subnet_id, + proximity_placement_group_id=proximity_placement_group_id, + scale_down_mode=scale_down_mode, + snapshot_id=snapshot_id, + tags=tags, + temporary_name_for_rotation=temporary_name_for_rotation, + type=type, + ultra_ssd_enabled=ultra_ssd_enabled, + upgrade_settings=upgrade_settings, + vnet_subnet_id=vnet_subnet_id, + workload_runtime=workload_runtime, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + vm_size: Optional[str] = None, + capacity_reservation_group_id: Optional[str] = None, + custom_ca_trust_enabled: Optional[bool] = None, + enable_auto_scaling: Optional[bool] = None, + enable_host_encryption: Optional[bool] = None, + enable_node_public_ip: Optional[bool] = None, + fips_enabled: Optional[bool] = None, + host_group_id: Optional[str] = None, + kubelet_config: Optional['outputs.KubernetesClusterDefaultNodePoolKubeletConfig'] = None, + kubelet_disk_type: Optional[str] = None, + linux_os_config: Optional['outputs.KubernetesClusterDefaultNodePoolLinuxOsConfig'] = None, + max_count: Optional[int] = None, + max_pods: Optional[int] = None, + message_of_the_day: Optional[str] = None, + min_count: Optional[int] = None, + node_count: Optional[int] = None, + node_labels: Optional[Mapping[str, str]] = None, + node_network_profile: Optional['outputs.KubernetesClusterDefaultNodePoolNodeNetworkProfile'] = None, + node_public_ip_prefix_id: Optional[str] = None, + node_taints: Optional[Sequence[str]] = None, + only_critical_addons_enabled: Optional[bool] = None, + orchestrator_version: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[str] = None, + os_sku: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + proximity_placement_group_id: Optional[str] = None, + scale_down_mode: Optional[str] = None, + snapshot_id: Optional[str] = None, + tags: Optional[Mapping[str, str]] = None, + temporary_name_for_rotation: Optional[str] = None, + type: Optional[str] = None, + ultra_ssd_enabled: Optional[bool] = None, + upgrade_settings: Optional['outputs.KubernetesClusterDefaultNodePoolUpgradeSettings'] = None, + vnet_subnet_id: Optional[str] = None, + workload_runtime: Optional[str] = None, + zones: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if capacity_reservation_group_id is None and 'capacityReservationGroupId' in kwargs: + capacity_reservation_group_id = kwargs['capacityReservationGroupId'] + if custom_ca_trust_enabled is None and 'customCaTrustEnabled' in kwargs: + custom_ca_trust_enabled = kwargs['customCaTrustEnabled'] + if enable_auto_scaling is None and 'enableAutoScaling' in kwargs: + enable_auto_scaling = kwargs['enableAutoScaling'] + if enable_host_encryption is None and 'enableHostEncryption' in kwargs: + enable_host_encryption = kwargs['enableHostEncryption'] + if enable_node_public_ip is None and 'enableNodePublicIp' in kwargs: + enable_node_public_ip = kwargs['enableNodePublicIp'] + if fips_enabled is None and 'fipsEnabled' in kwargs: + fips_enabled = kwargs['fipsEnabled'] + if host_group_id is None and 'hostGroupId' in kwargs: + host_group_id = kwargs['hostGroupId'] + if kubelet_config is None and 'kubeletConfig' in kwargs: + kubelet_config = kwargs['kubeletConfig'] + if kubelet_disk_type is None and 'kubeletDiskType' in kwargs: + kubelet_disk_type = kwargs['kubeletDiskType'] + if linux_os_config is None and 'linuxOsConfig' in kwargs: + linux_os_config = kwargs['linuxOsConfig'] + if max_count is None and 'maxCount' in kwargs: + max_count = kwargs['maxCount'] + if max_pods is None and 'maxPods' in kwargs: + max_pods = kwargs['maxPods'] + if message_of_the_day is None and 'messageOfTheDay' in kwargs: + message_of_the_day = kwargs['messageOfTheDay'] + if min_count is None and 'minCount' in kwargs: + min_count = kwargs['minCount'] + if node_count is None and 'nodeCount' in kwargs: + node_count = kwargs['nodeCount'] + if node_labels is None and 'nodeLabels' in kwargs: + node_labels = kwargs['nodeLabels'] + if node_network_profile is None and 'nodeNetworkProfile' in kwargs: + node_network_profile = kwargs['nodeNetworkProfile'] + if node_public_ip_prefix_id is None and 'nodePublicIpPrefixId' in kwargs: + node_public_ip_prefix_id = kwargs['nodePublicIpPrefixId'] + if node_taints is None and 'nodeTaints' in kwargs: + node_taints = kwargs['nodeTaints'] + if only_critical_addons_enabled is None and 'onlyCriticalAddonsEnabled' in kwargs: + only_critical_addons_enabled = kwargs['onlyCriticalAddonsEnabled'] + if orchestrator_version is None and 'orchestratorVersion' in kwargs: + orchestrator_version = kwargs['orchestratorVersion'] + if os_disk_size_gb is None and 'osDiskSizeGb' in kwargs: + os_disk_size_gb = kwargs['osDiskSizeGb'] + if os_disk_type is None and 'osDiskType' in kwargs: + os_disk_type = kwargs['osDiskType'] + if os_sku is None and 'osSku' in kwargs: + os_sku = kwargs['osSku'] + if pod_subnet_id is None and 'podSubnetId' in kwargs: + pod_subnet_id = kwargs['podSubnetId'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if scale_down_mode is None and 'scaleDownMode' in kwargs: + scale_down_mode = kwargs['scaleDownMode'] + if snapshot_id is None and 'snapshotId' in kwargs: + snapshot_id = kwargs['snapshotId'] + if temporary_name_for_rotation is None and 'temporaryNameForRotation' in kwargs: + temporary_name_for_rotation = kwargs['temporaryNameForRotation'] + if ultra_ssd_enabled is None and 'ultraSsdEnabled' in kwargs: + ultra_ssd_enabled = kwargs['ultraSsdEnabled'] + if upgrade_settings is None and 'upgradeSettings' in kwargs: + upgrade_settings = kwargs['upgradeSettings'] + if vnet_subnet_id is None and 'vnetSubnetId' in kwargs: + vnet_subnet_id = kwargs['vnetSubnetId'] + if workload_runtime is None and 'workloadRuntime' in kwargs: + workload_runtime = kwargs['workloadRuntime'] + + _setter("name", name) + _setter("vm_size", vm_size) if capacity_reservation_group_id is not None: - pulumi.set(__self__, "capacity_reservation_group_id", capacity_reservation_group_id) + _setter("capacity_reservation_group_id", capacity_reservation_group_id) if custom_ca_trust_enabled is not None: - pulumi.set(__self__, "custom_ca_trust_enabled", custom_ca_trust_enabled) + _setter("custom_ca_trust_enabled", custom_ca_trust_enabled) if enable_auto_scaling is not None: - pulumi.set(__self__, "enable_auto_scaling", enable_auto_scaling) + _setter("enable_auto_scaling", enable_auto_scaling) if enable_host_encryption is not None: - pulumi.set(__self__, "enable_host_encryption", enable_host_encryption) + _setter("enable_host_encryption", enable_host_encryption) if enable_node_public_ip is not None: - pulumi.set(__self__, "enable_node_public_ip", enable_node_public_ip) + _setter("enable_node_public_ip", enable_node_public_ip) if fips_enabled is not None: - pulumi.set(__self__, "fips_enabled", fips_enabled) + _setter("fips_enabled", fips_enabled) if host_group_id is not None: - pulumi.set(__self__, "host_group_id", host_group_id) + _setter("host_group_id", host_group_id) if kubelet_config is not None: - pulumi.set(__self__, "kubelet_config", kubelet_config) + _setter("kubelet_config", kubelet_config) if kubelet_disk_type is not None: - pulumi.set(__self__, "kubelet_disk_type", kubelet_disk_type) + _setter("kubelet_disk_type", kubelet_disk_type) if linux_os_config is not None: - pulumi.set(__self__, "linux_os_config", linux_os_config) + _setter("linux_os_config", linux_os_config) if max_count is not None: - pulumi.set(__self__, "max_count", max_count) + _setter("max_count", max_count) if max_pods is not None: - pulumi.set(__self__, "max_pods", max_pods) + _setter("max_pods", max_pods) if message_of_the_day is not None: - pulumi.set(__self__, "message_of_the_day", message_of_the_day) + _setter("message_of_the_day", message_of_the_day) if min_count is not None: - pulumi.set(__self__, "min_count", min_count) + _setter("min_count", min_count) if node_count is not None: - pulumi.set(__self__, "node_count", node_count) + _setter("node_count", node_count) if node_labels is not None: - pulumi.set(__self__, "node_labels", node_labels) + _setter("node_labels", node_labels) if node_network_profile is not None: - pulumi.set(__self__, "node_network_profile", node_network_profile) + _setter("node_network_profile", node_network_profile) if node_public_ip_prefix_id is not None: - pulumi.set(__self__, "node_public_ip_prefix_id", node_public_ip_prefix_id) + _setter("node_public_ip_prefix_id", node_public_ip_prefix_id) if node_taints is not None: - pulumi.set(__self__, "node_taints", node_taints) + _setter("node_taints", node_taints) if only_critical_addons_enabled is not None: - pulumi.set(__self__, "only_critical_addons_enabled", only_critical_addons_enabled) + _setter("only_critical_addons_enabled", only_critical_addons_enabled) if orchestrator_version is not None: - pulumi.set(__self__, "orchestrator_version", orchestrator_version) + _setter("orchestrator_version", orchestrator_version) if os_disk_size_gb is not None: - pulumi.set(__self__, "os_disk_size_gb", os_disk_size_gb) + _setter("os_disk_size_gb", os_disk_size_gb) if os_disk_type is not None: - pulumi.set(__self__, "os_disk_type", os_disk_type) + _setter("os_disk_type", os_disk_type) if os_sku is not None: - pulumi.set(__self__, "os_sku", os_sku) + _setter("os_sku", os_sku) if pod_subnet_id is not None: - pulumi.set(__self__, "pod_subnet_id", pod_subnet_id) + _setter("pod_subnet_id", pod_subnet_id) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if scale_down_mode is not None: - pulumi.set(__self__, "scale_down_mode", scale_down_mode) + _setter("scale_down_mode", scale_down_mode) if snapshot_id is not None: - pulumi.set(__self__, "snapshot_id", snapshot_id) + _setter("snapshot_id", snapshot_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if temporary_name_for_rotation is not None: - pulumi.set(__self__, "temporary_name_for_rotation", temporary_name_for_rotation) + _setter("temporary_name_for_rotation", temporary_name_for_rotation) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if ultra_ssd_enabled is not None: - pulumi.set(__self__, "ultra_ssd_enabled", ultra_ssd_enabled) + _setter("ultra_ssd_enabled", ultra_ssd_enabled) if upgrade_settings is not None: - pulumi.set(__self__, "upgrade_settings", upgrade_settings) + _setter("upgrade_settings", upgrade_settings) if vnet_subnet_id is not None: - pulumi.set(__self__, "vnet_subnet_id", vnet_subnet_id) + _setter("vnet_subnet_id", vnet_subnet_id) if workload_runtime is not None: - pulumi.set(__self__, "workload_runtime", workload_runtime) + _setter("workload_runtime", workload_runtime) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -3821,26 +4934,75 @@ def __init__(__self__, *, :param int pod_max_pid: Specifies the maximum number of processes per pod. Changing this forces a new resource to be created. :param str topology_manager_policy: Specifies the Topology Manager policy to use. Possible values are `none`, `best-effort`, `restricted` or `single-numa-node`. Changing this forces a new resource to be created. """ + KubernetesClusterDefaultNodePoolKubeletConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_unsafe_sysctls=allowed_unsafe_sysctls, + container_log_max_line=container_log_max_line, + container_log_max_size_mb=container_log_max_size_mb, + cpu_cfs_quota_enabled=cpu_cfs_quota_enabled, + cpu_cfs_quota_period=cpu_cfs_quota_period, + cpu_manager_policy=cpu_manager_policy, + image_gc_high_threshold=image_gc_high_threshold, + image_gc_low_threshold=image_gc_low_threshold, + pod_max_pid=pod_max_pid, + topology_manager_policy=topology_manager_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_unsafe_sysctls: Optional[Sequence[str]] = None, + container_log_max_line: Optional[int] = None, + container_log_max_size_mb: Optional[int] = None, + cpu_cfs_quota_enabled: Optional[bool] = None, + cpu_cfs_quota_period: Optional[str] = None, + cpu_manager_policy: Optional[str] = None, + image_gc_high_threshold: Optional[int] = None, + image_gc_low_threshold: Optional[int] = None, + pod_max_pid: Optional[int] = None, + topology_manager_policy: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_unsafe_sysctls is None and 'allowedUnsafeSysctls' in kwargs: + allowed_unsafe_sysctls = kwargs['allowedUnsafeSysctls'] + if container_log_max_line is None and 'containerLogMaxLine' in kwargs: + container_log_max_line = kwargs['containerLogMaxLine'] + if container_log_max_size_mb is None and 'containerLogMaxSizeMb' in kwargs: + container_log_max_size_mb = kwargs['containerLogMaxSizeMb'] + if cpu_cfs_quota_enabled is None and 'cpuCfsQuotaEnabled' in kwargs: + cpu_cfs_quota_enabled = kwargs['cpuCfsQuotaEnabled'] + if cpu_cfs_quota_period is None and 'cpuCfsQuotaPeriod' in kwargs: + cpu_cfs_quota_period = kwargs['cpuCfsQuotaPeriod'] + if cpu_manager_policy is None and 'cpuManagerPolicy' in kwargs: + cpu_manager_policy = kwargs['cpuManagerPolicy'] + if image_gc_high_threshold is None and 'imageGcHighThreshold' in kwargs: + image_gc_high_threshold = kwargs['imageGcHighThreshold'] + if image_gc_low_threshold is None and 'imageGcLowThreshold' in kwargs: + image_gc_low_threshold = kwargs['imageGcLowThreshold'] + if pod_max_pid is None and 'podMaxPid' in kwargs: + pod_max_pid = kwargs['podMaxPid'] + if topology_manager_policy is None and 'topologyManagerPolicy' in kwargs: + topology_manager_policy = kwargs['topologyManagerPolicy'] + if allowed_unsafe_sysctls is not None: - pulumi.set(__self__, "allowed_unsafe_sysctls", allowed_unsafe_sysctls) + _setter("allowed_unsafe_sysctls", allowed_unsafe_sysctls) if container_log_max_line is not None: - pulumi.set(__self__, "container_log_max_line", container_log_max_line) + _setter("container_log_max_line", container_log_max_line) if container_log_max_size_mb is not None: - pulumi.set(__self__, "container_log_max_size_mb", container_log_max_size_mb) + _setter("container_log_max_size_mb", container_log_max_size_mb) if cpu_cfs_quota_enabled is not None: - pulumi.set(__self__, "cpu_cfs_quota_enabled", cpu_cfs_quota_enabled) + _setter("cpu_cfs_quota_enabled", cpu_cfs_quota_enabled) if cpu_cfs_quota_period is not None: - pulumi.set(__self__, "cpu_cfs_quota_period", cpu_cfs_quota_period) + _setter("cpu_cfs_quota_period", cpu_cfs_quota_period) if cpu_manager_policy is not None: - pulumi.set(__self__, "cpu_manager_policy", cpu_manager_policy) + _setter("cpu_manager_policy", cpu_manager_policy) if image_gc_high_threshold is not None: - pulumi.set(__self__, "image_gc_high_threshold", image_gc_high_threshold) + _setter("image_gc_high_threshold", image_gc_high_threshold) if image_gc_low_threshold is not None: - pulumi.set(__self__, "image_gc_low_threshold", image_gc_low_threshold) + _setter("image_gc_low_threshold", image_gc_low_threshold) if pod_max_pid is not None: - pulumi.set(__self__, "pod_max_pid", pod_max_pid) + _setter("pod_max_pid", pod_max_pid) if topology_manager_policy is not None: - pulumi.set(__self__, "topology_manager_policy", topology_manager_policy) + _setter("topology_manager_policy", topology_manager_policy) @property @pulumi.getter(name="allowedUnsafeSysctls") @@ -3959,14 +5121,39 @@ def __init__(__self__, *, :param str transparent_huge_page_defrag: specifies the defrag configuration for Transparent Huge Page. Possible values are `always`, `defer`, `defer+madvise`, `madvise` and `never`. Changing this forces a new resource to be created. :param str transparent_huge_page_enabled: Specifies the Transparent Huge Page enabled configuration. Possible values are `always`, `madvise` and `never`. Changing this forces a new resource to be created. """ + KubernetesClusterDefaultNodePoolLinuxOsConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + swap_file_size_mb=swap_file_size_mb, + sysctl_config=sysctl_config, + transparent_huge_page_defrag=transparent_huge_page_defrag, + transparent_huge_page_enabled=transparent_huge_page_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + swap_file_size_mb: Optional[int] = None, + sysctl_config: Optional['outputs.KubernetesClusterDefaultNodePoolLinuxOsConfigSysctlConfig'] = None, + transparent_huge_page_defrag: Optional[str] = None, + transparent_huge_page_enabled: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if swap_file_size_mb is None and 'swapFileSizeMb' in kwargs: + swap_file_size_mb = kwargs['swapFileSizeMb'] + if sysctl_config is None and 'sysctlConfig' in kwargs: + sysctl_config = kwargs['sysctlConfig'] + if transparent_huge_page_defrag is None and 'transparentHugePageDefrag' in kwargs: + transparent_huge_page_defrag = kwargs['transparentHugePageDefrag'] + if transparent_huge_page_enabled is None and 'transparentHugePageEnabled' in kwargs: + transparent_huge_page_enabled = kwargs['transparentHugePageEnabled'] + if swap_file_size_mb is not None: - pulumi.set(__self__, "swap_file_size_mb", swap_file_size_mb) + _setter("swap_file_size_mb", swap_file_size_mb) if sysctl_config is not None: - pulumi.set(__self__, "sysctl_config", sysctl_config) + _setter("sysctl_config", sysctl_config) if transparent_huge_page_defrag is not None: - pulumi.set(__self__, "transparent_huge_page_defrag", transparent_huge_page_defrag) + _setter("transparent_huge_page_defrag", transparent_huge_page_defrag) if transparent_huge_page_enabled is not None: - pulumi.set(__self__, "transparent_huge_page_enabled", transparent_huge_page_enabled) + _setter("transparent_huge_page_enabled", transparent_huge_page_enabled) @property @pulumi.getter(name="swapFileSizeMb") @@ -4137,64 +5324,189 @@ def __init__(__self__, *, :param int vm_swappiness: The sysctl setting vm.swappiness. Must be between `0` and `100`. Changing this forces a new resource to be created. :param int vm_vfs_cache_pressure: The sysctl setting vm.vfs_cache_pressure. Must be between `0` and `100`. Changing this forces a new resource to be created. """ + KubernetesClusterDefaultNodePoolLinuxOsConfigSysctlConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + fs_aio_max_nr=fs_aio_max_nr, + fs_file_max=fs_file_max, + fs_inotify_max_user_watches=fs_inotify_max_user_watches, + fs_nr_open=fs_nr_open, + kernel_threads_max=kernel_threads_max, + net_core_netdev_max_backlog=net_core_netdev_max_backlog, + net_core_optmem_max=net_core_optmem_max, + net_core_rmem_default=net_core_rmem_default, + net_core_rmem_max=net_core_rmem_max, + net_core_somaxconn=net_core_somaxconn, + net_core_wmem_default=net_core_wmem_default, + net_core_wmem_max=net_core_wmem_max, + net_ipv4_ip_local_port_range_max=net_ipv4_ip_local_port_range_max, + net_ipv4_ip_local_port_range_min=net_ipv4_ip_local_port_range_min, + net_ipv4_neigh_default_gc_thresh1=net_ipv4_neigh_default_gc_thresh1, + net_ipv4_neigh_default_gc_thresh2=net_ipv4_neigh_default_gc_thresh2, + net_ipv4_neigh_default_gc_thresh3=net_ipv4_neigh_default_gc_thresh3, + net_ipv4_tcp_fin_timeout=net_ipv4_tcp_fin_timeout, + net_ipv4_tcp_keepalive_intvl=net_ipv4_tcp_keepalive_intvl, + net_ipv4_tcp_keepalive_probes=net_ipv4_tcp_keepalive_probes, + net_ipv4_tcp_keepalive_time=net_ipv4_tcp_keepalive_time, + net_ipv4_tcp_max_syn_backlog=net_ipv4_tcp_max_syn_backlog, + net_ipv4_tcp_max_tw_buckets=net_ipv4_tcp_max_tw_buckets, + net_ipv4_tcp_tw_reuse=net_ipv4_tcp_tw_reuse, + net_netfilter_nf_conntrack_buckets=net_netfilter_nf_conntrack_buckets, + net_netfilter_nf_conntrack_max=net_netfilter_nf_conntrack_max, + vm_max_map_count=vm_max_map_count, + vm_swappiness=vm_swappiness, + vm_vfs_cache_pressure=vm_vfs_cache_pressure, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fs_aio_max_nr: Optional[int] = None, + fs_file_max: Optional[int] = None, + fs_inotify_max_user_watches: Optional[int] = None, + fs_nr_open: Optional[int] = None, + kernel_threads_max: Optional[int] = None, + net_core_netdev_max_backlog: Optional[int] = None, + net_core_optmem_max: Optional[int] = None, + net_core_rmem_default: Optional[int] = None, + net_core_rmem_max: Optional[int] = None, + net_core_somaxconn: Optional[int] = None, + net_core_wmem_default: Optional[int] = None, + net_core_wmem_max: Optional[int] = None, + net_ipv4_ip_local_port_range_max: Optional[int] = None, + net_ipv4_ip_local_port_range_min: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh1: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh2: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh3: Optional[int] = None, + net_ipv4_tcp_fin_timeout: Optional[int] = None, + net_ipv4_tcp_keepalive_intvl: Optional[int] = None, + net_ipv4_tcp_keepalive_probes: Optional[int] = None, + net_ipv4_tcp_keepalive_time: Optional[int] = None, + net_ipv4_tcp_max_syn_backlog: Optional[int] = None, + net_ipv4_tcp_max_tw_buckets: Optional[int] = None, + net_ipv4_tcp_tw_reuse: Optional[bool] = None, + net_netfilter_nf_conntrack_buckets: Optional[int] = None, + net_netfilter_nf_conntrack_max: Optional[int] = None, + vm_max_map_count: Optional[int] = None, + vm_swappiness: Optional[int] = None, + vm_vfs_cache_pressure: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fs_aio_max_nr is None and 'fsAioMaxNr' in kwargs: + fs_aio_max_nr = kwargs['fsAioMaxNr'] + if fs_file_max is None and 'fsFileMax' in kwargs: + fs_file_max = kwargs['fsFileMax'] + if fs_inotify_max_user_watches is None and 'fsInotifyMaxUserWatches' in kwargs: + fs_inotify_max_user_watches = kwargs['fsInotifyMaxUserWatches'] + if fs_nr_open is None and 'fsNrOpen' in kwargs: + fs_nr_open = kwargs['fsNrOpen'] + if kernel_threads_max is None and 'kernelThreadsMax' in kwargs: + kernel_threads_max = kwargs['kernelThreadsMax'] + if net_core_netdev_max_backlog is None and 'netCoreNetdevMaxBacklog' in kwargs: + net_core_netdev_max_backlog = kwargs['netCoreNetdevMaxBacklog'] + if net_core_optmem_max is None and 'netCoreOptmemMax' in kwargs: + net_core_optmem_max = kwargs['netCoreOptmemMax'] + if net_core_rmem_default is None and 'netCoreRmemDefault' in kwargs: + net_core_rmem_default = kwargs['netCoreRmemDefault'] + if net_core_rmem_max is None and 'netCoreRmemMax' in kwargs: + net_core_rmem_max = kwargs['netCoreRmemMax'] + if net_core_somaxconn is None and 'netCoreSomaxconn' in kwargs: + net_core_somaxconn = kwargs['netCoreSomaxconn'] + if net_core_wmem_default is None and 'netCoreWmemDefault' in kwargs: + net_core_wmem_default = kwargs['netCoreWmemDefault'] + if net_core_wmem_max is None and 'netCoreWmemMax' in kwargs: + net_core_wmem_max = kwargs['netCoreWmemMax'] + if net_ipv4_ip_local_port_range_max is None and 'netIpv4IpLocalPortRangeMax' in kwargs: + net_ipv4_ip_local_port_range_max = kwargs['netIpv4IpLocalPortRangeMax'] + if net_ipv4_ip_local_port_range_min is None and 'netIpv4IpLocalPortRangeMin' in kwargs: + net_ipv4_ip_local_port_range_min = kwargs['netIpv4IpLocalPortRangeMin'] + if net_ipv4_neigh_default_gc_thresh1 is None and 'netIpv4NeighDefaultGcThresh1' in kwargs: + net_ipv4_neigh_default_gc_thresh1 = kwargs['netIpv4NeighDefaultGcThresh1'] + if net_ipv4_neigh_default_gc_thresh2 is None and 'netIpv4NeighDefaultGcThresh2' in kwargs: + net_ipv4_neigh_default_gc_thresh2 = kwargs['netIpv4NeighDefaultGcThresh2'] + if net_ipv4_neigh_default_gc_thresh3 is None and 'netIpv4NeighDefaultGcThresh3' in kwargs: + net_ipv4_neigh_default_gc_thresh3 = kwargs['netIpv4NeighDefaultGcThresh3'] + if net_ipv4_tcp_fin_timeout is None and 'netIpv4TcpFinTimeout' in kwargs: + net_ipv4_tcp_fin_timeout = kwargs['netIpv4TcpFinTimeout'] + if net_ipv4_tcp_keepalive_intvl is None and 'netIpv4TcpKeepaliveIntvl' in kwargs: + net_ipv4_tcp_keepalive_intvl = kwargs['netIpv4TcpKeepaliveIntvl'] + if net_ipv4_tcp_keepalive_probes is None and 'netIpv4TcpKeepaliveProbes' in kwargs: + net_ipv4_tcp_keepalive_probes = kwargs['netIpv4TcpKeepaliveProbes'] + if net_ipv4_tcp_keepalive_time is None and 'netIpv4TcpKeepaliveTime' in kwargs: + net_ipv4_tcp_keepalive_time = kwargs['netIpv4TcpKeepaliveTime'] + if net_ipv4_tcp_max_syn_backlog is None and 'netIpv4TcpMaxSynBacklog' in kwargs: + net_ipv4_tcp_max_syn_backlog = kwargs['netIpv4TcpMaxSynBacklog'] + if net_ipv4_tcp_max_tw_buckets is None and 'netIpv4TcpMaxTwBuckets' in kwargs: + net_ipv4_tcp_max_tw_buckets = kwargs['netIpv4TcpMaxTwBuckets'] + if net_ipv4_tcp_tw_reuse is None and 'netIpv4TcpTwReuse' in kwargs: + net_ipv4_tcp_tw_reuse = kwargs['netIpv4TcpTwReuse'] + if net_netfilter_nf_conntrack_buckets is None and 'netNetfilterNfConntrackBuckets' in kwargs: + net_netfilter_nf_conntrack_buckets = kwargs['netNetfilterNfConntrackBuckets'] + if net_netfilter_nf_conntrack_max is None and 'netNetfilterNfConntrackMax' in kwargs: + net_netfilter_nf_conntrack_max = kwargs['netNetfilterNfConntrackMax'] + if vm_max_map_count is None and 'vmMaxMapCount' in kwargs: + vm_max_map_count = kwargs['vmMaxMapCount'] + if vm_swappiness is None and 'vmSwappiness' in kwargs: + vm_swappiness = kwargs['vmSwappiness'] + if vm_vfs_cache_pressure is None and 'vmVfsCachePressure' in kwargs: + vm_vfs_cache_pressure = kwargs['vmVfsCachePressure'] + if fs_aio_max_nr is not None: - pulumi.set(__self__, "fs_aio_max_nr", fs_aio_max_nr) + _setter("fs_aio_max_nr", fs_aio_max_nr) if fs_file_max is not None: - pulumi.set(__self__, "fs_file_max", fs_file_max) + _setter("fs_file_max", fs_file_max) if fs_inotify_max_user_watches is not None: - pulumi.set(__self__, "fs_inotify_max_user_watches", fs_inotify_max_user_watches) + _setter("fs_inotify_max_user_watches", fs_inotify_max_user_watches) if fs_nr_open is not None: - pulumi.set(__self__, "fs_nr_open", fs_nr_open) + _setter("fs_nr_open", fs_nr_open) if kernel_threads_max is not None: - pulumi.set(__self__, "kernel_threads_max", kernel_threads_max) + _setter("kernel_threads_max", kernel_threads_max) if net_core_netdev_max_backlog is not None: - pulumi.set(__self__, "net_core_netdev_max_backlog", net_core_netdev_max_backlog) + _setter("net_core_netdev_max_backlog", net_core_netdev_max_backlog) if net_core_optmem_max is not None: - pulumi.set(__self__, "net_core_optmem_max", net_core_optmem_max) + _setter("net_core_optmem_max", net_core_optmem_max) if net_core_rmem_default is not None: - pulumi.set(__self__, "net_core_rmem_default", net_core_rmem_default) + _setter("net_core_rmem_default", net_core_rmem_default) if net_core_rmem_max is not None: - pulumi.set(__self__, "net_core_rmem_max", net_core_rmem_max) + _setter("net_core_rmem_max", net_core_rmem_max) if net_core_somaxconn is not None: - pulumi.set(__self__, "net_core_somaxconn", net_core_somaxconn) + _setter("net_core_somaxconn", net_core_somaxconn) if net_core_wmem_default is not None: - pulumi.set(__self__, "net_core_wmem_default", net_core_wmem_default) + _setter("net_core_wmem_default", net_core_wmem_default) if net_core_wmem_max is not None: - pulumi.set(__self__, "net_core_wmem_max", net_core_wmem_max) + _setter("net_core_wmem_max", net_core_wmem_max) if net_ipv4_ip_local_port_range_max is not None: - pulumi.set(__self__, "net_ipv4_ip_local_port_range_max", net_ipv4_ip_local_port_range_max) + _setter("net_ipv4_ip_local_port_range_max", net_ipv4_ip_local_port_range_max) if net_ipv4_ip_local_port_range_min is not None: - pulumi.set(__self__, "net_ipv4_ip_local_port_range_min", net_ipv4_ip_local_port_range_min) + _setter("net_ipv4_ip_local_port_range_min", net_ipv4_ip_local_port_range_min) if net_ipv4_neigh_default_gc_thresh1 is not None: - pulumi.set(__self__, "net_ipv4_neigh_default_gc_thresh1", net_ipv4_neigh_default_gc_thresh1) + _setter("net_ipv4_neigh_default_gc_thresh1", net_ipv4_neigh_default_gc_thresh1) if net_ipv4_neigh_default_gc_thresh2 is not None: - pulumi.set(__self__, "net_ipv4_neigh_default_gc_thresh2", net_ipv4_neigh_default_gc_thresh2) + _setter("net_ipv4_neigh_default_gc_thresh2", net_ipv4_neigh_default_gc_thresh2) if net_ipv4_neigh_default_gc_thresh3 is not None: - pulumi.set(__self__, "net_ipv4_neigh_default_gc_thresh3", net_ipv4_neigh_default_gc_thresh3) + _setter("net_ipv4_neigh_default_gc_thresh3", net_ipv4_neigh_default_gc_thresh3) if net_ipv4_tcp_fin_timeout is not None: - pulumi.set(__self__, "net_ipv4_tcp_fin_timeout", net_ipv4_tcp_fin_timeout) + _setter("net_ipv4_tcp_fin_timeout", net_ipv4_tcp_fin_timeout) if net_ipv4_tcp_keepalive_intvl is not None: - pulumi.set(__self__, "net_ipv4_tcp_keepalive_intvl", net_ipv4_tcp_keepalive_intvl) + _setter("net_ipv4_tcp_keepalive_intvl", net_ipv4_tcp_keepalive_intvl) if net_ipv4_tcp_keepalive_probes is not None: - pulumi.set(__self__, "net_ipv4_tcp_keepalive_probes", net_ipv4_tcp_keepalive_probes) + _setter("net_ipv4_tcp_keepalive_probes", net_ipv4_tcp_keepalive_probes) if net_ipv4_tcp_keepalive_time is not None: - pulumi.set(__self__, "net_ipv4_tcp_keepalive_time", net_ipv4_tcp_keepalive_time) + _setter("net_ipv4_tcp_keepalive_time", net_ipv4_tcp_keepalive_time) if net_ipv4_tcp_max_syn_backlog is not None: - pulumi.set(__self__, "net_ipv4_tcp_max_syn_backlog", net_ipv4_tcp_max_syn_backlog) + _setter("net_ipv4_tcp_max_syn_backlog", net_ipv4_tcp_max_syn_backlog) if net_ipv4_tcp_max_tw_buckets is not None: - pulumi.set(__self__, "net_ipv4_tcp_max_tw_buckets", net_ipv4_tcp_max_tw_buckets) + _setter("net_ipv4_tcp_max_tw_buckets", net_ipv4_tcp_max_tw_buckets) if net_ipv4_tcp_tw_reuse is not None: - pulumi.set(__self__, "net_ipv4_tcp_tw_reuse", net_ipv4_tcp_tw_reuse) + _setter("net_ipv4_tcp_tw_reuse", net_ipv4_tcp_tw_reuse) if net_netfilter_nf_conntrack_buckets is not None: - pulumi.set(__self__, "net_netfilter_nf_conntrack_buckets", net_netfilter_nf_conntrack_buckets) + _setter("net_netfilter_nf_conntrack_buckets", net_netfilter_nf_conntrack_buckets) if net_netfilter_nf_conntrack_max is not None: - pulumi.set(__self__, "net_netfilter_nf_conntrack_max", net_netfilter_nf_conntrack_max) + _setter("net_netfilter_nf_conntrack_max", net_netfilter_nf_conntrack_max) if vm_max_map_count is not None: - pulumi.set(__self__, "vm_max_map_count", vm_max_map_count) + _setter("vm_max_map_count", vm_max_map_count) if vm_swappiness is not None: - pulumi.set(__self__, "vm_swappiness", vm_swappiness) + _setter("vm_swappiness", vm_swappiness) if vm_vfs_cache_pressure is not None: - pulumi.set(__self__, "vm_vfs_cache_pressure", vm_vfs_cache_pressure) + _setter("vm_vfs_cache_pressure", vm_vfs_cache_pressure) @property @pulumi.getter(name="fsAioMaxNr") @@ -4455,8 +5767,21 @@ def __init__(__self__, *, > **Note:** This requires that the Preview Feature `Microsoft.ContainerService/NodePublicIPTagsPreview` is enabled and the Resource Provider is re-registered, see [the documentation](https://learn.microsoft.com/en-us/azure/aks/use-node-public-ips#use-public-ip-tags-on-node-public-ips-preview) for more information. """ + KubernetesClusterDefaultNodePoolNodeNetworkProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + node_public_ip_tags=node_public_ip_tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + node_public_ip_tags: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if node_public_ip_tags is None and 'nodePublicIpTags' in kwargs: + node_public_ip_tags = kwargs['nodePublicIpTags'] + if node_public_ip_tags is not None: - pulumi.set(__self__, "node_public_ip_tags", node_public_ip_tags) + _setter("node_public_ip_tags", node_public_ip_tags) @property @pulumi.getter(name="nodePublicIpTags") @@ -4495,7 +5820,22 @@ def __init__(__self__, *, > **Note:** If a percentage is provided, the number of surge nodes is calculated from the `node_count` value on the current cluster. Node surge can allow a cluster to have more nodes than `max_count` during an upgrade. Ensure that your cluster has enough [IP space](https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade) during an upgrade. """ - pulumi.set(__self__, "max_surge", max_surge) + KubernetesClusterDefaultNodePoolUpgradeSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_surge=max_surge, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_surge: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_surge is None and 'maxSurge' in kwargs: + max_surge = kwargs['maxSurge'] + if max_surge is None: + raise TypeError("Missing 'max_surge' argument") + + _setter("max_surge", max_surge) @property @pulumi.getter(name="maxSurge") @@ -4538,12 +5878,31 @@ def __init__(__self__, *, :param str tenant_id: The tenant ID of resource. :param str type: The identity type. """ + KubernetesClusterExtensionAksAssignedIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="principalId") @@ -4604,13 +5963,40 @@ def __init__(__self__, *, > **NOTE:** When `plan` is specified, legal terms must be accepted for this item on this subscription before creating the Kubernetes Cluster Extension. The `marketplace.Agreement` resource or AZ CLI tool can be used to do this. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + KubernetesClusterExtensionPlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + promotion_code=promotion_code, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + product: Optional[str] = None, + publisher: Optional[str] = None, + promotion_code: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if promotion_code is None and 'promotionCode' in kwargs: + promotion_code = kwargs['promotionCode'] + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) if promotion_code is not None: - pulumi.set(__self__, "promotion_code", promotion_code) + _setter("promotion_code", promotion_code) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -4690,14 +6076,39 @@ def __init__(__self__, *, :param str https_proxy: The proxy address to be used when communicating over HTTPS. :param str trusted_ca: The base64 encoded alternative CA certificate content in PEM format. """ + KubernetesClusterHttpProxyConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + http_proxy=http_proxy, + https_proxy=https_proxy, + no_proxies=no_proxies, + trusted_ca=trusted_ca, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + http_proxy: Optional[str] = None, + https_proxy: Optional[str] = None, + no_proxies: Optional[Sequence[str]] = None, + trusted_ca: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if http_proxy is None and 'httpProxy' in kwargs: + http_proxy = kwargs['httpProxy'] + if https_proxy is None and 'httpsProxy' in kwargs: + https_proxy = kwargs['httpsProxy'] + if no_proxies is None and 'noProxies' in kwargs: + no_proxies = kwargs['noProxies'] + if trusted_ca is None and 'trustedCa' in kwargs: + trusted_ca = kwargs['trustedCa'] + if http_proxy is not None: - pulumi.set(__self__, "http_proxy", http_proxy) + _setter("http_proxy", http_proxy) if https_proxy is not None: - pulumi.set(__self__, "https_proxy", https_proxy) + _setter("https_proxy", https_proxy) if no_proxies is not None: - pulumi.set(__self__, "no_proxies", no_proxies) + _setter("no_proxies", no_proxies) if trusted_ca is not None: - pulumi.set(__self__, "trusted_ca", trusted_ca) + _setter("trusted_ca", trusted_ca) @property @pulumi.getter(name="httpProxy") @@ -4765,13 +6176,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID used for Azure Active Directory Application. If this isn't specified the Tenant ID of the current Subscription is used. """ - pulumi.set(__self__, "type", type) + KubernetesClusterIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -4856,18 +6292,51 @@ def __init__(__self__, *, > **Note:** If specifying `ingress_application_gateway` in conjunction with `only_critical_addons_enabled`, the AGIC pod will fail to start. A separate `containerservice.KubernetesClusterNodePool` is required to run the AGIC pod successfully. This is because AGIC is classed as a "non-critical addon". """ + KubernetesClusterIngressApplicationGateway._configure( + lambda key, value: pulumi.set(__self__, key, value), + effective_gateway_id=effective_gateway_id, + gateway_id=gateway_id, + gateway_name=gateway_name, + ingress_application_gateway_identities=ingress_application_gateway_identities, + subnet_cidr=subnet_cidr, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + effective_gateway_id: Optional[str] = None, + gateway_id: Optional[str] = None, + gateway_name: Optional[str] = None, + ingress_application_gateway_identities: Optional[Sequence['outputs.KubernetesClusterIngressApplicationGatewayIngressApplicationGatewayIdentity']] = None, + subnet_cidr: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if effective_gateway_id is None and 'effectiveGatewayId' in kwargs: + effective_gateway_id = kwargs['effectiveGatewayId'] + if gateway_id is None and 'gatewayId' in kwargs: + gateway_id = kwargs['gatewayId'] + if gateway_name is None and 'gatewayName' in kwargs: + gateway_name = kwargs['gatewayName'] + if ingress_application_gateway_identities is None and 'ingressApplicationGatewayIdentities' in kwargs: + ingress_application_gateway_identities = kwargs['ingressApplicationGatewayIdentities'] + if subnet_cidr is None and 'subnetCidr' in kwargs: + subnet_cidr = kwargs['subnetCidr'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if effective_gateway_id is not None: - pulumi.set(__self__, "effective_gateway_id", effective_gateway_id) + _setter("effective_gateway_id", effective_gateway_id) if gateway_id is not None: - pulumi.set(__self__, "gateway_id", gateway_id) + _setter("gateway_id", gateway_id) if gateway_name is not None: - pulumi.set(__self__, "gateway_name", gateway_name) + _setter("gateway_name", gateway_name) if ingress_application_gateway_identities is not None: - pulumi.set(__self__, "ingress_application_gateway_identities", ingress_application_gateway_identities) + _setter("ingress_application_gateway_identities", ingress_application_gateway_identities) if subnet_cidr is not None: - pulumi.set(__self__, "subnet_cidr", subnet_cidr) + _setter("subnet_cidr", subnet_cidr) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="effectiveGatewayId") @@ -4956,12 +6425,33 @@ def __init__(__self__, *, > **Note:** When `kubelet_identity` is enabled - The `type` field in the `identity` block must be set to `UserAssigned` and `identity_ids` must be set. """ + KubernetesClusterIngressApplicationGatewayIngressApplicationGatewayIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + object_id: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -5018,9 +6508,28 @@ def __init__(__self__, *, :param str key_vault_key_id: Identifier of Azure Key Vault key. See [key identifier format](https://learn.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key identifier. When `enabled` is `false`, leave the field empty. :param str key_vault_network_access: Network access of the key vault Network access of key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables private link. The default value is `Public`. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + KubernetesClusterKeyManagementService._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + key_vault_network_access=key_vault_network_access, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[str] = None, + key_vault_network_access: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if key_vault_network_access is None and 'keyVaultNetworkAccess' in kwargs: + key_vault_network_access = kwargs['keyVaultNetworkAccess'] + + _setter("key_vault_key_id", key_vault_key_id) if key_vault_network_access is not None: - pulumi.set(__self__, "key_vault_network_access", key_vault_network_access) + _setter("key_vault_network_access", key_vault_network_access) @property @pulumi.getter(name="keyVaultKeyId") @@ -5073,12 +6582,33 @@ def __init__(__self__, *, > **Note:** To enable`key_vault_secrets_provider` either `secret_rotation_enabled` or `secret_rotation_interval` must be specified. """ + KubernetesClusterKeyVaultSecretsProvider._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_identities=secret_identities, + secret_rotation_enabled=secret_rotation_enabled, + secret_rotation_interval=secret_rotation_interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_identities: Optional[Sequence['outputs.KubernetesClusterKeyVaultSecretsProviderSecretIdentity']] = None, + secret_rotation_enabled: Optional[bool] = None, + secret_rotation_interval: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_identities is None and 'secretIdentities' in kwargs: + secret_identities = kwargs['secretIdentities'] + if secret_rotation_enabled is None and 'secretRotationEnabled' in kwargs: + secret_rotation_enabled = kwargs['secretRotationEnabled'] + if secret_rotation_interval is None and 'secretRotationInterval' in kwargs: + secret_rotation_interval = kwargs['secretRotationInterval'] + if secret_identities is not None: - pulumi.set(__self__, "secret_identities", secret_identities) + _setter("secret_identities", secret_identities) if secret_rotation_enabled is not None: - pulumi.set(__self__, "secret_rotation_enabled", secret_rotation_enabled) + _setter("secret_rotation_enabled", secret_rotation_enabled) if secret_rotation_interval is not None: - pulumi.set(__self__, "secret_rotation_interval", secret_rotation_interval) + _setter("secret_rotation_interval", secret_rotation_interval) @property @pulumi.getter(name="secretIdentities") @@ -5141,12 +6671,33 @@ def __init__(__self__, *, > **Note:** When `kubelet_identity` is enabled - The `type` field in the `identity` block must be set to `UserAssigned` and `identity_ids` must be set. """ + KubernetesClusterKeyVaultSecretsProviderSecretIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + object_id: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -5213,18 +6764,45 @@ def __init__(__self__, *, :param str password: A password or token used to authenticate to the Kubernetes cluster. :param str username: A username used to authenticate to the Kubernetes cluster. """ + KubernetesClusterKubeAdminConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_certificate=client_certificate, + client_key=client_key, + cluster_ca_certificate=cluster_ca_certificate, + host=host, + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_certificate: Optional[str] = None, + client_key: Optional[str] = None, + cluster_ca_certificate: Optional[str] = None, + host: Optional[str] = None, + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_certificate is None and 'clientCertificate' in kwargs: + client_certificate = kwargs['clientCertificate'] + if client_key is None and 'clientKey' in kwargs: + client_key = kwargs['clientKey'] + if cluster_ca_certificate is None and 'clusterCaCertificate' in kwargs: + cluster_ca_certificate = kwargs['clusterCaCertificate'] + if client_certificate is not None: - pulumi.set(__self__, "client_certificate", client_certificate) + _setter("client_certificate", client_certificate) if client_key is not None: - pulumi.set(__self__, "client_key", client_key) + _setter("client_key", client_key) if cluster_ca_certificate is not None: - pulumi.set(__self__, "cluster_ca_certificate", cluster_ca_certificate) + _setter("cluster_ca_certificate", cluster_ca_certificate) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="clientCertificate") @@ -5313,18 +6891,45 @@ def __init__(__self__, *, :param str password: A password or token used to authenticate to the Kubernetes cluster. :param str username: A username used to authenticate to the Kubernetes cluster. """ + KubernetesClusterKubeConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_certificate=client_certificate, + client_key=client_key, + cluster_ca_certificate=cluster_ca_certificate, + host=host, + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_certificate: Optional[str] = None, + client_key: Optional[str] = None, + cluster_ca_certificate: Optional[str] = None, + host: Optional[str] = None, + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_certificate is None and 'clientCertificate' in kwargs: + client_certificate = kwargs['clientCertificate'] + if client_key is None and 'clientKey' in kwargs: + client_key = kwargs['clientKey'] + if cluster_ca_certificate is None and 'clusterCaCertificate' in kwargs: + cluster_ca_certificate = kwargs['clusterCaCertificate'] + if client_certificate is not None: - pulumi.set(__self__, "client_certificate", client_certificate) + _setter("client_certificate", client_certificate) if client_key is not None: - pulumi.set(__self__, "client_key", client_key) + _setter("client_key", client_key) if cluster_ca_certificate is not None: - pulumi.set(__self__, "cluster_ca_certificate", cluster_ca_certificate) + _setter("cluster_ca_certificate", cluster_ca_certificate) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="clientCertificate") @@ -5409,12 +7014,33 @@ def __init__(__self__, *, > **Note:** When `kubelet_identity` is enabled - The `type` field in the `identity` block must be set to `UserAssigned` and `identity_ids` must be set. """ + KubernetesClusterKubeletIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + object_id: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -5471,8 +7097,29 @@ def __init__(__self__, *, :param str admin_username: The Admin Username for the Cluster. Changing this forces a new resource to be created. :param 'KubernetesClusterLinuxProfileSshKeyArgs' ssh_key: An `ssh_key` block. Only one is currently allowed. Changing this will update the key on all node pools. More information can be found in [the documentation](https://learn.microsoft.com/en-us/azure/aks/node-access#update-ssh-key-on-an-existing-aks-cluster-preview). """ - pulumi.set(__self__, "admin_username", admin_username) - pulumi.set(__self__, "ssh_key", ssh_key) + KubernetesClusterLinuxProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + ssh_key=ssh_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[str] = None, + ssh_key: Optional['outputs.KubernetesClusterLinuxProfileSshKey'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if ssh_key is None and 'sshKey' in kwargs: + ssh_key = kwargs['sshKey'] + if ssh_key is None: + raise TypeError("Missing 'ssh_key' argument") + + _setter("admin_username", admin_username) + _setter("ssh_key", ssh_key) @property @pulumi.getter(name="adminUsername") @@ -5515,7 +7162,22 @@ def __init__(__self__, *, """ :param str key_data: The Public SSH Key used to access the cluster. """ - pulumi.set(__self__, "key_data", key_data) + KubernetesClusterLinuxProfileSshKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_data=key_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_data: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_data is None and 'keyData' in kwargs: + key_data = kwargs['keyData'] + if key_data is None: + raise TypeError("Missing 'key_data' argument") + + _setter("key_data", key_data) @property @pulumi.getter(name="keyData") @@ -5552,10 +7214,25 @@ def __init__(__self__, *, :param Sequence['KubernetesClusterMaintenanceWindowAllowedArgs'] alloweds: One or more `allowed` blocks as defined below. :param Sequence['KubernetesClusterMaintenanceWindowNotAllowedArgs'] not_alloweds: One or more `not_allowed` block as defined below. """ + KubernetesClusterMaintenanceWindow._configure( + lambda key, value: pulumi.set(__self__, key, value), + alloweds=alloweds, + not_alloweds=not_alloweds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alloweds: Optional[Sequence['outputs.KubernetesClusterMaintenanceWindowAllowed']] = None, + not_alloweds: Optional[Sequence['outputs.KubernetesClusterMaintenanceWindowNotAllowed']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_alloweds is None and 'notAlloweds' in kwargs: + not_alloweds = kwargs['notAlloweds'] + if alloweds is not None: - pulumi.set(__self__, "alloweds", alloweds) + _setter("alloweds", alloweds) if not_alloweds is not None: - pulumi.set(__self__, "not_alloweds", not_alloweds) + _setter("not_alloweds", not_alloweds) @property @pulumi.getter @@ -5583,8 +7260,25 @@ def __init__(__self__, *, :param str day: A day in a week. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. :param Sequence[int] hours: An array of hour slots in a day. For example, specifying `1` will allow maintenance from 1:00am to 2:00am. Specifying `1`, `2` will allow maintenance from 1:00am to 3:00m. Possible values are between `0` and `23`. """ - pulumi.set(__self__, "day", day) - pulumi.set(__self__, "hours", hours) + KubernetesClusterMaintenanceWindowAllowed._configure( + lambda key, value: pulumi.set(__self__, key, value), + day=day, + hours=hours, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day: Optional[str] = None, + hours: Optional[Sequence[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day is None: + raise TypeError("Missing 'day' argument") + if hours is None: + raise TypeError("Missing 'hours' argument") + + _setter("day", day) + _setter("hours", hours) @property @pulumi.getter @@ -5657,23 +7351,72 @@ def __init__(__self__, *, :param str week_index: The week in the month used for the maintenance run. Options are `First`, `Second`, `Third`, `Fourth`, and `Last`. Required in combination with relative monthly frequency. """ - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "interval", interval) + KubernetesClusterMaintenanceWindowAutoUpgrade._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration=duration, + frequency=frequency, + interval=interval, + day_of_month=day_of_month, + day_of_week=day_of_week, + not_alloweds=not_alloweds, + start_date=start_date, + start_time=start_time, + utc_offset=utc_offset, + week_index=week_index, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration: Optional[int] = None, + frequency: Optional[str] = None, + interval: Optional[int] = None, + day_of_month: Optional[int] = None, + day_of_week: Optional[str] = None, + not_alloweds: Optional[Sequence['outputs.KubernetesClusterMaintenanceWindowAutoUpgradeNotAllowed']] = None, + start_date: Optional[str] = None, + start_time: Optional[str] = None, + utc_offset: Optional[str] = None, + week_index: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration is None: + raise TypeError("Missing 'duration' argument") + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if day_of_month is None and 'dayOfMonth' in kwargs: + day_of_month = kwargs['dayOfMonth'] + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if not_alloweds is None and 'notAlloweds' in kwargs: + not_alloweds = kwargs['notAlloweds'] + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if utc_offset is None and 'utcOffset' in kwargs: + utc_offset = kwargs['utcOffset'] + if week_index is None and 'weekIndex' in kwargs: + week_index = kwargs['weekIndex'] + + _setter("duration", duration) + _setter("frequency", frequency) + _setter("interval", interval) if day_of_month is not None: - pulumi.set(__self__, "day_of_month", day_of_month) + _setter("day_of_month", day_of_month) if day_of_week is not None: - pulumi.set(__self__, "day_of_week", day_of_week) + _setter("day_of_week", day_of_week) if not_alloweds is not None: - pulumi.set(__self__, "not_alloweds", not_alloweds) + _setter("not_alloweds", not_alloweds) if start_date is not None: - pulumi.set(__self__, "start_date", start_date) + _setter("start_date", start_date) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if utc_offset is not None: - pulumi.set(__self__, "utc_offset", utc_offset) + _setter("utc_offset", utc_offset) if week_index is not None: - pulumi.set(__self__, "week_index", week_index) + _setter("week_index", week_index) @property @pulumi.getter @@ -5763,8 +7506,25 @@ def __init__(__self__, *, :param str end: The end of a time span, formatted as an RFC3339 string. :param str start: The start of a time span, formatted as an RFC3339 string. """ - pulumi.set(__self__, "end", end) - pulumi.set(__self__, "start", start) + KubernetesClusterMaintenanceWindowAutoUpgradeNotAllowed._configure( + lambda key, value: pulumi.set(__self__, key, value), + end=end, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end: Optional[str] = None, + start: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end is None: + raise TypeError("Missing 'end' argument") + if start is None: + raise TypeError("Missing 'start' argument") + + _setter("end", end) + _setter("start", start) @property @pulumi.getter @@ -5836,23 +7596,72 @@ def __init__(__self__, *, :param str utc_offset: Used to determine the timezone for cluster maintenance. :param str week_index: The week in the month used for the maintenance run. Options are `First`, `Second`, `Third`, `Fourth`, and `Last`. """ - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "interval", interval) + KubernetesClusterMaintenanceWindowNodeOs._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration=duration, + frequency=frequency, + interval=interval, + day_of_month=day_of_month, + day_of_week=day_of_week, + not_alloweds=not_alloweds, + start_date=start_date, + start_time=start_time, + utc_offset=utc_offset, + week_index=week_index, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration: Optional[int] = None, + frequency: Optional[str] = None, + interval: Optional[int] = None, + day_of_month: Optional[int] = None, + day_of_week: Optional[str] = None, + not_alloweds: Optional[Sequence['outputs.KubernetesClusterMaintenanceWindowNodeOsNotAllowed']] = None, + start_date: Optional[str] = None, + start_time: Optional[str] = None, + utc_offset: Optional[str] = None, + week_index: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration is None: + raise TypeError("Missing 'duration' argument") + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if day_of_month is None and 'dayOfMonth' in kwargs: + day_of_month = kwargs['dayOfMonth'] + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if not_alloweds is None and 'notAlloweds' in kwargs: + not_alloweds = kwargs['notAlloweds'] + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if utc_offset is None and 'utcOffset' in kwargs: + utc_offset = kwargs['utcOffset'] + if week_index is None and 'weekIndex' in kwargs: + week_index = kwargs['weekIndex'] + + _setter("duration", duration) + _setter("frequency", frequency) + _setter("interval", interval) if day_of_month is not None: - pulumi.set(__self__, "day_of_month", day_of_month) + _setter("day_of_month", day_of_month) if day_of_week is not None: - pulumi.set(__self__, "day_of_week", day_of_week) + _setter("day_of_week", day_of_week) if not_alloweds is not None: - pulumi.set(__self__, "not_alloweds", not_alloweds) + _setter("not_alloweds", not_alloweds) if start_date is not None: - pulumi.set(__self__, "start_date", start_date) + _setter("start_date", start_date) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if utc_offset is not None: - pulumi.set(__self__, "utc_offset", utc_offset) + _setter("utc_offset", utc_offset) if week_index is not None: - pulumi.set(__self__, "week_index", week_index) + _setter("week_index", week_index) @property @pulumi.getter @@ -5941,8 +7750,25 @@ def __init__(__self__, *, :param str end: The end of a time span, formatted as an RFC3339 string. :param str start: The start of a time span, formatted as an RFC3339 string. """ - pulumi.set(__self__, "end", end) - pulumi.set(__self__, "start", start) + KubernetesClusterMaintenanceWindowNodeOsNotAllowed._configure( + lambda key, value: pulumi.set(__self__, key, value), + end=end, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end: Optional[str] = None, + start: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end is None: + raise TypeError("Missing 'end' argument") + if start is None: + raise TypeError("Missing 'start' argument") + + _setter("end", end) + _setter("start", start) @property @pulumi.getter @@ -5970,8 +7796,25 @@ def __init__(__self__, *, :param str end: The end of a time span, formatted as an RFC3339 string. :param str start: The start of a time span, formatted as an RFC3339 string. """ - pulumi.set(__self__, "end", end) - pulumi.set(__self__, "start", start) + KubernetesClusterMaintenanceWindowNotAllowed._configure( + lambda key, value: pulumi.set(__self__, key, value), + end=end, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end: Optional[str] = None, + start: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end is None: + raise TypeError("Missing 'end' argument") + if start is None: + raise TypeError("Missing 'start' argument") + + _setter("end", end) + _setter("start", start) @property @pulumi.getter @@ -6014,7 +7857,22 @@ def __init__(__self__, *, """ :param str log_analytics_workspace_id: Specifies the ID of the Log Analytics Workspace where the audit logs collected by Microsoft Defender should be sent to. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + KubernetesClusterMicrosoftDefender._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -6053,10 +7911,27 @@ def __init__(__self__, *, :param str annotations_allowed: Specifies a comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric. :param str labels_allowed: Specifies a Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric. """ + KubernetesClusterMonitorMetrics._configure( + lambda key, value: pulumi.set(__self__, key, value), + annotations_allowed=annotations_allowed, + labels_allowed=labels_allowed, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + annotations_allowed: Optional[str] = None, + labels_allowed: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if annotations_allowed is None and 'annotationsAllowed' in kwargs: + annotations_allowed = kwargs['annotationsAllowed'] + if labels_allowed is None and 'labelsAllowed' in kwargs: + labels_allowed = kwargs['labelsAllowed'] + if annotations_allowed is not None: - pulumi.set(__self__, "annotations_allowed", annotations_allowed) + _setter("annotations_allowed", annotations_allowed) if labels_allowed is not None: - pulumi.set(__self__, "labels_allowed", labels_allowed) + _setter("labels_allowed", labels_allowed) @property @pulumi.getter(name="annotationsAllowed") @@ -6185,37 +8060,112 @@ def __init__(__self__, *, > **Note:** This range should not be used by any network element on or connected to this VNet. Service address CIDR must be smaller than /12. `docker_bridge_cidr`, `dns_service_ip` and `service_cidr` should all be empty or all should be set. """ - pulumi.set(__self__, "network_plugin", network_plugin) + KubernetesClusterNetworkProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_plugin=network_plugin, + dns_service_ip=dns_service_ip, + docker_bridge_cidr=docker_bridge_cidr, + ebpf_data_plane=ebpf_data_plane, + ip_versions=ip_versions, + load_balancer_profile=load_balancer_profile, + load_balancer_sku=load_balancer_sku, + nat_gateway_profile=nat_gateway_profile, + network_mode=network_mode, + network_plugin_mode=network_plugin_mode, + network_policy=network_policy, + outbound_type=outbound_type, + pod_cidr=pod_cidr, + pod_cidrs=pod_cidrs, + service_cidr=service_cidr, + service_cidrs=service_cidrs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_plugin: Optional[str] = None, + dns_service_ip: Optional[str] = None, + docker_bridge_cidr: Optional[str] = None, + ebpf_data_plane: Optional[str] = None, + ip_versions: Optional[Sequence[str]] = None, + load_balancer_profile: Optional['outputs.KubernetesClusterNetworkProfileLoadBalancerProfile'] = None, + load_balancer_sku: Optional[str] = None, + nat_gateway_profile: Optional['outputs.KubernetesClusterNetworkProfileNatGatewayProfile'] = None, + network_mode: Optional[str] = None, + network_plugin_mode: Optional[str] = None, + network_policy: Optional[str] = None, + outbound_type: Optional[str] = None, + pod_cidr: Optional[str] = None, + pod_cidrs: Optional[Sequence[str]] = None, + service_cidr: Optional[str] = None, + service_cidrs: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_plugin is None and 'networkPlugin' in kwargs: + network_plugin = kwargs['networkPlugin'] + if network_plugin is None: + raise TypeError("Missing 'network_plugin' argument") + if dns_service_ip is None and 'dnsServiceIp' in kwargs: + dns_service_ip = kwargs['dnsServiceIp'] + if docker_bridge_cidr is None and 'dockerBridgeCidr' in kwargs: + docker_bridge_cidr = kwargs['dockerBridgeCidr'] + if ebpf_data_plane is None and 'ebpfDataPlane' in kwargs: + ebpf_data_plane = kwargs['ebpfDataPlane'] + if ip_versions is None and 'ipVersions' in kwargs: + ip_versions = kwargs['ipVersions'] + if load_balancer_profile is None and 'loadBalancerProfile' in kwargs: + load_balancer_profile = kwargs['loadBalancerProfile'] + if load_balancer_sku is None and 'loadBalancerSku' in kwargs: + load_balancer_sku = kwargs['loadBalancerSku'] + if nat_gateway_profile is None and 'natGatewayProfile' in kwargs: + nat_gateway_profile = kwargs['natGatewayProfile'] + if network_mode is None and 'networkMode' in kwargs: + network_mode = kwargs['networkMode'] + if network_plugin_mode is None and 'networkPluginMode' in kwargs: + network_plugin_mode = kwargs['networkPluginMode'] + if network_policy is None and 'networkPolicy' in kwargs: + network_policy = kwargs['networkPolicy'] + if outbound_type is None and 'outboundType' in kwargs: + outbound_type = kwargs['outboundType'] + if pod_cidr is None and 'podCidr' in kwargs: + pod_cidr = kwargs['podCidr'] + if pod_cidrs is None and 'podCidrs' in kwargs: + pod_cidrs = kwargs['podCidrs'] + if service_cidr is None and 'serviceCidr' in kwargs: + service_cidr = kwargs['serviceCidr'] + if service_cidrs is None and 'serviceCidrs' in kwargs: + service_cidrs = kwargs['serviceCidrs'] + + _setter("network_plugin", network_plugin) if dns_service_ip is not None: - pulumi.set(__self__, "dns_service_ip", dns_service_ip) + _setter("dns_service_ip", dns_service_ip) if docker_bridge_cidr is not None: - pulumi.set(__self__, "docker_bridge_cidr", docker_bridge_cidr) + _setter("docker_bridge_cidr", docker_bridge_cidr) if ebpf_data_plane is not None: - pulumi.set(__self__, "ebpf_data_plane", ebpf_data_plane) + _setter("ebpf_data_plane", ebpf_data_plane) if ip_versions is not None: - pulumi.set(__self__, "ip_versions", ip_versions) + _setter("ip_versions", ip_versions) if load_balancer_profile is not None: - pulumi.set(__self__, "load_balancer_profile", load_balancer_profile) + _setter("load_balancer_profile", load_balancer_profile) if load_balancer_sku is not None: - pulumi.set(__self__, "load_balancer_sku", load_balancer_sku) + _setter("load_balancer_sku", load_balancer_sku) if nat_gateway_profile is not None: - pulumi.set(__self__, "nat_gateway_profile", nat_gateway_profile) + _setter("nat_gateway_profile", nat_gateway_profile) if network_mode is not None: - pulumi.set(__self__, "network_mode", network_mode) + _setter("network_mode", network_mode) if network_plugin_mode is not None: - pulumi.set(__self__, "network_plugin_mode", network_plugin_mode) + _setter("network_plugin_mode", network_plugin_mode) if network_policy is not None: - pulumi.set(__self__, "network_policy", network_policy) + _setter("network_policy", network_policy) if outbound_type is not None: - pulumi.set(__self__, "outbound_type", outbound_type) + _setter("outbound_type", outbound_type) if pod_cidr is not None: - pulumi.set(__self__, "pod_cidr", pod_cidr) + _setter("pod_cidr", pod_cidr) if pod_cidrs is not None: - pulumi.set(__self__, "pod_cidrs", pod_cidrs) + _setter("pod_cidrs", pod_cidrs) if service_cidr is not None: - pulumi.set(__self__, "service_cidr", service_cidr) + _setter("service_cidr", service_cidr) if service_cidrs is not None: - pulumi.set(__self__, "service_cidrs", service_cidrs) + _setter("service_cidrs", service_cidrs) @property @pulumi.getter(name="networkPlugin") @@ -6429,20 +8379,57 @@ def __init__(__self__, *, > **Note:** Set `outbound_ip_prefix_ids` to an empty slice `[]` in order to unlink it from the cluster. Unlinking a `outbound_ip_prefix_ids` will revert the load balancing for the cluster back to a managed one. :param int outbound_ports_allocated: Number of desired SNAT port for each VM in the clusters load balancer. Must be between `0` and `64000` inclusive. Defaults to `0`. """ + KubernetesClusterNetworkProfileLoadBalancerProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + effective_outbound_ips=effective_outbound_ips, + idle_timeout_in_minutes=idle_timeout_in_minutes, + managed_outbound_ip_count=managed_outbound_ip_count, + managed_outbound_ipv6_count=managed_outbound_ipv6_count, + outbound_ip_address_ids=outbound_ip_address_ids, + outbound_ip_prefix_ids=outbound_ip_prefix_ids, + outbound_ports_allocated=outbound_ports_allocated, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + effective_outbound_ips: Optional[Sequence[str]] = None, + idle_timeout_in_minutes: Optional[int] = None, + managed_outbound_ip_count: Optional[int] = None, + managed_outbound_ipv6_count: Optional[int] = None, + outbound_ip_address_ids: Optional[Sequence[str]] = None, + outbound_ip_prefix_ids: Optional[Sequence[str]] = None, + outbound_ports_allocated: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if effective_outbound_ips is None and 'effectiveOutboundIps' in kwargs: + effective_outbound_ips = kwargs['effectiveOutboundIps'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if managed_outbound_ip_count is None and 'managedOutboundIpCount' in kwargs: + managed_outbound_ip_count = kwargs['managedOutboundIpCount'] + if managed_outbound_ipv6_count is None and 'managedOutboundIpv6Count' in kwargs: + managed_outbound_ipv6_count = kwargs['managedOutboundIpv6Count'] + if outbound_ip_address_ids is None and 'outboundIpAddressIds' in kwargs: + outbound_ip_address_ids = kwargs['outboundIpAddressIds'] + if outbound_ip_prefix_ids is None and 'outboundIpPrefixIds' in kwargs: + outbound_ip_prefix_ids = kwargs['outboundIpPrefixIds'] + if outbound_ports_allocated is None and 'outboundPortsAllocated' in kwargs: + outbound_ports_allocated = kwargs['outboundPortsAllocated'] + if effective_outbound_ips is not None: - pulumi.set(__self__, "effective_outbound_ips", effective_outbound_ips) + _setter("effective_outbound_ips", effective_outbound_ips) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if managed_outbound_ip_count is not None: - pulumi.set(__self__, "managed_outbound_ip_count", managed_outbound_ip_count) + _setter("managed_outbound_ip_count", managed_outbound_ip_count) if managed_outbound_ipv6_count is not None: - pulumi.set(__self__, "managed_outbound_ipv6_count", managed_outbound_ipv6_count) + _setter("managed_outbound_ipv6_count", managed_outbound_ipv6_count) if outbound_ip_address_ids is not None: - pulumi.set(__self__, "outbound_ip_address_ids", outbound_ip_address_ids) + _setter("outbound_ip_address_ids", outbound_ip_address_ids) if outbound_ip_prefix_ids is not None: - pulumi.set(__self__, "outbound_ip_prefix_ids", outbound_ip_prefix_ids) + _setter("outbound_ip_prefix_ids", outbound_ip_prefix_ids) if outbound_ports_allocated is not None: - pulumi.set(__self__, "outbound_ports_allocated", outbound_ports_allocated) + _setter("outbound_ports_allocated", outbound_ports_allocated) @property @pulumi.getter(name="effectiveOutboundIps") @@ -6539,12 +8526,33 @@ def __init__(__self__, *, :param int idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes for the cluster load balancer. Must be between `4` and `120` inclusive. Defaults to `4`. :param int managed_outbound_ip_count: Count of desired managed outbound IPs for the cluster load balancer. Must be between `1` and `100` inclusive. """ + KubernetesClusterNetworkProfileNatGatewayProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + effective_outbound_ips=effective_outbound_ips, + idle_timeout_in_minutes=idle_timeout_in_minutes, + managed_outbound_ip_count=managed_outbound_ip_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + effective_outbound_ips: Optional[Sequence[str]] = None, + idle_timeout_in_minutes: Optional[int] = None, + managed_outbound_ip_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if effective_outbound_ips is None and 'effectiveOutboundIps' in kwargs: + effective_outbound_ips = kwargs['effectiveOutboundIps'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if managed_outbound_ip_count is None and 'managedOutboundIpCount' in kwargs: + managed_outbound_ip_count = kwargs['managedOutboundIpCount'] + if effective_outbound_ips is not None: - pulumi.set(__self__, "effective_outbound_ips", effective_outbound_ips) + _setter("effective_outbound_ips", effective_outbound_ips) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if managed_outbound_ip_count is not None: - pulumi.set(__self__, "managed_outbound_ip_count", managed_outbound_ip_count) + _setter("managed_outbound_ip_count", managed_outbound_ip_count) @property @pulumi.getter(name="effectiveOutboundIps") @@ -6631,26 +8639,75 @@ def __init__(__self__, *, :param int pod_max_pid: Specifies the maximum number of processes per pod. Changing this forces a new resource to be created. :param str topology_manager_policy: Specifies the Topology Manager policy to use. Possible values are `none`, `best-effort`, `restricted` or `single-numa-node`. Changing this forces a new resource to be created. """ + KubernetesClusterNodePoolKubeletConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_unsafe_sysctls=allowed_unsafe_sysctls, + container_log_max_line=container_log_max_line, + container_log_max_size_mb=container_log_max_size_mb, + cpu_cfs_quota_enabled=cpu_cfs_quota_enabled, + cpu_cfs_quota_period=cpu_cfs_quota_period, + cpu_manager_policy=cpu_manager_policy, + image_gc_high_threshold=image_gc_high_threshold, + image_gc_low_threshold=image_gc_low_threshold, + pod_max_pid=pod_max_pid, + topology_manager_policy=topology_manager_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_unsafe_sysctls: Optional[Sequence[str]] = None, + container_log_max_line: Optional[int] = None, + container_log_max_size_mb: Optional[int] = None, + cpu_cfs_quota_enabled: Optional[bool] = None, + cpu_cfs_quota_period: Optional[str] = None, + cpu_manager_policy: Optional[str] = None, + image_gc_high_threshold: Optional[int] = None, + image_gc_low_threshold: Optional[int] = None, + pod_max_pid: Optional[int] = None, + topology_manager_policy: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_unsafe_sysctls is None and 'allowedUnsafeSysctls' in kwargs: + allowed_unsafe_sysctls = kwargs['allowedUnsafeSysctls'] + if container_log_max_line is None and 'containerLogMaxLine' in kwargs: + container_log_max_line = kwargs['containerLogMaxLine'] + if container_log_max_size_mb is None and 'containerLogMaxSizeMb' in kwargs: + container_log_max_size_mb = kwargs['containerLogMaxSizeMb'] + if cpu_cfs_quota_enabled is None and 'cpuCfsQuotaEnabled' in kwargs: + cpu_cfs_quota_enabled = kwargs['cpuCfsQuotaEnabled'] + if cpu_cfs_quota_period is None and 'cpuCfsQuotaPeriod' in kwargs: + cpu_cfs_quota_period = kwargs['cpuCfsQuotaPeriod'] + if cpu_manager_policy is None and 'cpuManagerPolicy' in kwargs: + cpu_manager_policy = kwargs['cpuManagerPolicy'] + if image_gc_high_threshold is None and 'imageGcHighThreshold' in kwargs: + image_gc_high_threshold = kwargs['imageGcHighThreshold'] + if image_gc_low_threshold is None and 'imageGcLowThreshold' in kwargs: + image_gc_low_threshold = kwargs['imageGcLowThreshold'] + if pod_max_pid is None and 'podMaxPid' in kwargs: + pod_max_pid = kwargs['podMaxPid'] + if topology_manager_policy is None and 'topologyManagerPolicy' in kwargs: + topology_manager_policy = kwargs['topologyManagerPolicy'] + if allowed_unsafe_sysctls is not None: - pulumi.set(__self__, "allowed_unsafe_sysctls", allowed_unsafe_sysctls) + _setter("allowed_unsafe_sysctls", allowed_unsafe_sysctls) if container_log_max_line is not None: - pulumi.set(__self__, "container_log_max_line", container_log_max_line) + _setter("container_log_max_line", container_log_max_line) if container_log_max_size_mb is not None: - pulumi.set(__self__, "container_log_max_size_mb", container_log_max_size_mb) + _setter("container_log_max_size_mb", container_log_max_size_mb) if cpu_cfs_quota_enabled is not None: - pulumi.set(__self__, "cpu_cfs_quota_enabled", cpu_cfs_quota_enabled) + _setter("cpu_cfs_quota_enabled", cpu_cfs_quota_enabled) if cpu_cfs_quota_period is not None: - pulumi.set(__self__, "cpu_cfs_quota_period", cpu_cfs_quota_period) + _setter("cpu_cfs_quota_period", cpu_cfs_quota_period) if cpu_manager_policy is not None: - pulumi.set(__self__, "cpu_manager_policy", cpu_manager_policy) + _setter("cpu_manager_policy", cpu_manager_policy) if image_gc_high_threshold is not None: - pulumi.set(__self__, "image_gc_high_threshold", image_gc_high_threshold) + _setter("image_gc_high_threshold", image_gc_high_threshold) if image_gc_low_threshold is not None: - pulumi.set(__self__, "image_gc_low_threshold", image_gc_low_threshold) + _setter("image_gc_low_threshold", image_gc_low_threshold) if pod_max_pid is not None: - pulumi.set(__self__, "pod_max_pid", pod_max_pid) + _setter("pod_max_pid", pod_max_pid) if topology_manager_policy is not None: - pulumi.set(__self__, "topology_manager_policy", topology_manager_policy) + _setter("topology_manager_policy", topology_manager_policy) @property @pulumi.getter(name="allowedUnsafeSysctls") @@ -6769,14 +8826,39 @@ def __init__(__self__, *, :param str transparent_huge_page_defrag: specifies the defrag configuration for Transparent Huge Page. Possible values are `always`, `defer`, `defer+madvise`, `madvise` and `never`. Changing this forces a new resource to be created. :param str transparent_huge_page_enabled: Specifies the Transparent Huge Page enabled configuration. Possible values are `always`, `madvise` and `never`. Changing this forces a new resource to be created. """ + KubernetesClusterNodePoolLinuxOsConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + swap_file_size_mb=swap_file_size_mb, + sysctl_config=sysctl_config, + transparent_huge_page_defrag=transparent_huge_page_defrag, + transparent_huge_page_enabled=transparent_huge_page_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + swap_file_size_mb: Optional[int] = None, + sysctl_config: Optional['outputs.KubernetesClusterNodePoolLinuxOsConfigSysctlConfig'] = None, + transparent_huge_page_defrag: Optional[str] = None, + transparent_huge_page_enabled: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if swap_file_size_mb is None and 'swapFileSizeMb' in kwargs: + swap_file_size_mb = kwargs['swapFileSizeMb'] + if sysctl_config is None and 'sysctlConfig' in kwargs: + sysctl_config = kwargs['sysctlConfig'] + if transparent_huge_page_defrag is None and 'transparentHugePageDefrag' in kwargs: + transparent_huge_page_defrag = kwargs['transparentHugePageDefrag'] + if transparent_huge_page_enabled is None and 'transparentHugePageEnabled' in kwargs: + transparent_huge_page_enabled = kwargs['transparentHugePageEnabled'] + if swap_file_size_mb is not None: - pulumi.set(__self__, "swap_file_size_mb", swap_file_size_mb) + _setter("swap_file_size_mb", swap_file_size_mb) if sysctl_config is not None: - pulumi.set(__self__, "sysctl_config", sysctl_config) + _setter("sysctl_config", sysctl_config) if transparent_huge_page_defrag is not None: - pulumi.set(__self__, "transparent_huge_page_defrag", transparent_huge_page_defrag) + _setter("transparent_huge_page_defrag", transparent_huge_page_defrag) if transparent_huge_page_enabled is not None: - pulumi.set(__self__, "transparent_huge_page_enabled", transparent_huge_page_enabled) + _setter("transparent_huge_page_enabled", transparent_huge_page_enabled) @property @pulumi.getter(name="swapFileSizeMb") @@ -6947,64 +9029,189 @@ def __init__(__self__, *, :param int vm_swappiness: The sysctl setting vm.swappiness. Must be between `0` and `100`. Changing this forces a new resource to be created. :param int vm_vfs_cache_pressure: The sysctl setting vm.vfs_cache_pressure. Must be between `0` and `100`. Changing this forces a new resource to be created. """ + KubernetesClusterNodePoolLinuxOsConfigSysctlConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + fs_aio_max_nr=fs_aio_max_nr, + fs_file_max=fs_file_max, + fs_inotify_max_user_watches=fs_inotify_max_user_watches, + fs_nr_open=fs_nr_open, + kernel_threads_max=kernel_threads_max, + net_core_netdev_max_backlog=net_core_netdev_max_backlog, + net_core_optmem_max=net_core_optmem_max, + net_core_rmem_default=net_core_rmem_default, + net_core_rmem_max=net_core_rmem_max, + net_core_somaxconn=net_core_somaxconn, + net_core_wmem_default=net_core_wmem_default, + net_core_wmem_max=net_core_wmem_max, + net_ipv4_ip_local_port_range_max=net_ipv4_ip_local_port_range_max, + net_ipv4_ip_local_port_range_min=net_ipv4_ip_local_port_range_min, + net_ipv4_neigh_default_gc_thresh1=net_ipv4_neigh_default_gc_thresh1, + net_ipv4_neigh_default_gc_thresh2=net_ipv4_neigh_default_gc_thresh2, + net_ipv4_neigh_default_gc_thresh3=net_ipv4_neigh_default_gc_thresh3, + net_ipv4_tcp_fin_timeout=net_ipv4_tcp_fin_timeout, + net_ipv4_tcp_keepalive_intvl=net_ipv4_tcp_keepalive_intvl, + net_ipv4_tcp_keepalive_probes=net_ipv4_tcp_keepalive_probes, + net_ipv4_tcp_keepalive_time=net_ipv4_tcp_keepalive_time, + net_ipv4_tcp_max_syn_backlog=net_ipv4_tcp_max_syn_backlog, + net_ipv4_tcp_max_tw_buckets=net_ipv4_tcp_max_tw_buckets, + net_ipv4_tcp_tw_reuse=net_ipv4_tcp_tw_reuse, + net_netfilter_nf_conntrack_buckets=net_netfilter_nf_conntrack_buckets, + net_netfilter_nf_conntrack_max=net_netfilter_nf_conntrack_max, + vm_max_map_count=vm_max_map_count, + vm_swappiness=vm_swappiness, + vm_vfs_cache_pressure=vm_vfs_cache_pressure, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fs_aio_max_nr: Optional[int] = None, + fs_file_max: Optional[int] = None, + fs_inotify_max_user_watches: Optional[int] = None, + fs_nr_open: Optional[int] = None, + kernel_threads_max: Optional[int] = None, + net_core_netdev_max_backlog: Optional[int] = None, + net_core_optmem_max: Optional[int] = None, + net_core_rmem_default: Optional[int] = None, + net_core_rmem_max: Optional[int] = None, + net_core_somaxconn: Optional[int] = None, + net_core_wmem_default: Optional[int] = None, + net_core_wmem_max: Optional[int] = None, + net_ipv4_ip_local_port_range_max: Optional[int] = None, + net_ipv4_ip_local_port_range_min: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh1: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh2: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh3: Optional[int] = None, + net_ipv4_tcp_fin_timeout: Optional[int] = None, + net_ipv4_tcp_keepalive_intvl: Optional[int] = None, + net_ipv4_tcp_keepalive_probes: Optional[int] = None, + net_ipv4_tcp_keepalive_time: Optional[int] = None, + net_ipv4_tcp_max_syn_backlog: Optional[int] = None, + net_ipv4_tcp_max_tw_buckets: Optional[int] = None, + net_ipv4_tcp_tw_reuse: Optional[bool] = None, + net_netfilter_nf_conntrack_buckets: Optional[int] = None, + net_netfilter_nf_conntrack_max: Optional[int] = None, + vm_max_map_count: Optional[int] = None, + vm_swappiness: Optional[int] = None, + vm_vfs_cache_pressure: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fs_aio_max_nr is None and 'fsAioMaxNr' in kwargs: + fs_aio_max_nr = kwargs['fsAioMaxNr'] + if fs_file_max is None and 'fsFileMax' in kwargs: + fs_file_max = kwargs['fsFileMax'] + if fs_inotify_max_user_watches is None and 'fsInotifyMaxUserWatches' in kwargs: + fs_inotify_max_user_watches = kwargs['fsInotifyMaxUserWatches'] + if fs_nr_open is None and 'fsNrOpen' in kwargs: + fs_nr_open = kwargs['fsNrOpen'] + if kernel_threads_max is None and 'kernelThreadsMax' in kwargs: + kernel_threads_max = kwargs['kernelThreadsMax'] + if net_core_netdev_max_backlog is None and 'netCoreNetdevMaxBacklog' in kwargs: + net_core_netdev_max_backlog = kwargs['netCoreNetdevMaxBacklog'] + if net_core_optmem_max is None and 'netCoreOptmemMax' in kwargs: + net_core_optmem_max = kwargs['netCoreOptmemMax'] + if net_core_rmem_default is None and 'netCoreRmemDefault' in kwargs: + net_core_rmem_default = kwargs['netCoreRmemDefault'] + if net_core_rmem_max is None and 'netCoreRmemMax' in kwargs: + net_core_rmem_max = kwargs['netCoreRmemMax'] + if net_core_somaxconn is None and 'netCoreSomaxconn' in kwargs: + net_core_somaxconn = kwargs['netCoreSomaxconn'] + if net_core_wmem_default is None and 'netCoreWmemDefault' in kwargs: + net_core_wmem_default = kwargs['netCoreWmemDefault'] + if net_core_wmem_max is None and 'netCoreWmemMax' in kwargs: + net_core_wmem_max = kwargs['netCoreWmemMax'] + if net_ipv4_ip_local_port_range_max is None and 'netIpv4IpLocalPortRangeMax' in kwargs: + net_ipv4_ip_local_port_range_max = kwargs['netIpv4IpLocalPortRangeMax'] + if net_ipv4_ip_local_port_range_min is None and 'netIpv4IpLocalPortRangeMin' in kwargs: + net_ipv4_ip_local_port_range_min = kwargs['netIpv4IpLocalPortRangeMin'] + if net_ipv4_neigh_default_gc_thresh1 is None and 'netIpv4NeighDefaultGcThresh1' in kwargs: + net_ipv4_neigh_default_gc_thresh1 = kwargs['netIpv4NeighDefaultGcThresh1'] + if net_ipv4_neigh_default_gc_thresh2 is None and 'netIpv4NeighDefaultGcThresh2' in kwargs: + net_ipv4_neigh_default_gc_thresh2 = kwargs['netIpv4NeighDefaultGcThresh2'] + if net_ipv4_neigh_default_gc_thresh3 is None and 'netIpv4NeighDefaultGcThresh3' in kwargs: + net_ipv4_neigh_default_gc_thresh3 = kwargs['netIpv4NeighDefaultGcThresh3'] + if net_ipv4_tcp_fin_timeout is None and 'netIpv4TcpFinTimeout' in kwargs: + net_ipv4_tcp_fin_timeout = kwargs['netIpv4TcpFinTimeout'] + if net_ipv4_tcp_keepalive_intvl is None and 'netIpv4TcpKeepaliveIntvl' in kwargs: + net_ipv4_tcp_keepalive_intvl = kwargs['netIpv4TcpKeepaliveIntvl'] + if net_ipv4_tcp_keepalive_probes is None and 'netIpv4TcpKeepaliveProbes' in kwargs: + net_ipv4_tcp_keepalive_probes = kwargs['netIpv4TcpKeepaliveProbes'] + if net_ipv4_tcp_keepalive_time is None and 'netIpv4TcpKeepaliveTime' in kwargs: + net_ipv4_tcp_keepalive_time = kwargs['netIpv4TcpKeepaliveTime'] + if net_ipv4_tcp_max_syn_backlog is None and 'netIpv4TcpMaxSynBacklog' in kwargs: + net_ipv4_tcp_max_syn_backlog = kwargs['netIpv4TcpMaxSynBacklog'] + if net_ipv4_tcp_max_tw_buckets is None and 'netIpv4TcpMaxTwBuckets' in kwargs: + net_ipv4_tcp_max_tw_buckets = kwargs['netIpv4TcpMaxTwBuckets'] + if net_ipv4_tcp_tw_reuse is None and 'netIpv4TcpTwReuse' in kwargs: + net_ipv4_tcp_tw_reuse = kwargs['netIpv4TcpTwReuse'] + if net_netfilter_nf_conntrack_buckets is None and 'netNetfilterNfConntrackBuckets' in kwargs: + net_netfilter_nf_conntrack_buckets = kwargs['netNetfilterNfConntrackBuckets'] + if net_netfilter_nf_conntrack_max is None and 'netNetfilterNfConntrackMax' in kwargs: + net_netfilter_nf_conntrack_max = kwargs['netNetfilterNfConntrackMax'] + if vm_max_map_count is None and 'vmMaxMapCount' in kwargs: + vm_max_map_count = kwargs['vmMaxMapCount'] + if vm_swappiness is None and 'vmSwappiness' in kwargs: + vm_swappiness = kwargs['vmSwappiness'] + if vm_vfs_cache_pressure is None and 'vmVfsCachePressure' in kwargs: + vm_vfs_cache_pressure = kwargs['vmVfsCachePressure'] + if fs_aio_max_nr is not None: - pulumi.set(__self__, "fs_aio_max_nr", fs_aio_max_nr) + _setter("fs_aio_max_nr", fs_aio_max_nr) if fs_file_max is not None: - pulumi.set(__self__, "fs_file_max", fs_file_max) + _setter("fs_file_max", fs_file_max) if fs_inotify_max_user_watches is not None: - pulumi.set(__self__, "fs_inotify_max_user_watches", fs_inotify_max_user_watches) + _setter("fs_inotify_max_user_watches", fs_inotify_max_user_watches) if fs_nr_open is not None: - pulumi.set(__self__, "fs_nr_open", fs_nr_open) + _setter("fs_nr_open", fs_nr_open) if kernel_threads_max is not None: - pulumi.set(__self__, "kernel_threads_max", kernel_threads_max) + _setter("kernel_threads_max", kernel_threads_max) if net_core_netdev_max_backlog is not None: - pulumi.set(__self__, "net_core_netdev_max_backlog", net_core_netdev_max_backlog) + _setter("net_core_netdev_max_backlog", net_core_netdev_max_backlog) if net_core_optmem_max is not None: - pulumi.set(__self__, "net_core_optmem_max", net_core_optmem_max) + _setter("net_core_optmem_max", net_core_optmem_max) if net_core_rmem_default is not None: - pulumi.set(__self__, "net_core_rmem_default", net_core_rmem_default) + _setter("net_core_rmem_default", net_core_rmem_default) if net_core_rmem_max is not None: - pulumi.set(__self__, "net_core_rmem_max", net_core_rmem_max) + _setter("net_core_rmem_max", net_core_rmem_max) if net_core_somaxconn is not None: - pulumi.set(__self__, "net_core_somaxconn", net_core_somaxconn) + _setter("net_core_somaxconn", net_core_somaxconn) if net_core_wmem_default is not None: - pulumi.set(__self__, "net_core_wmem_default", net_core_wmem_default) + _setter("net_core_wmem_default", net_core_wmem_default) if net_core_wmem_max is not None: - pulumi.set(__self__, "net_core_wmem_max", net_core_wmem_max) + _setter("net_core_wmem_max", net_core_wmem_max) if net_ipv4_ip_local_port_range_max is not None: - pulumi.set(__self__, "net_ipv4_ip_local_port_range_max", net_ipv4_ip_local_port_range_max) + _setter("net_ipv4_ip_local_port_range_max", net_ipv4_ip_local_port_range_max) if net_ipv4_ip_local_port_range_min is not None: - pulumi.set(__self__, "net_ipv4_ip_local_port_range_min", net_ipv4_ip_local_port_range_min) + _setter("net_ipv4_ip_local_port_range_min", net_ipv4_ip_local_port_range_min) if net_ipv4_neigh_default_gc_thresh1 is not None: - pulumi.set(__self__, "net_ipv4_neigh_default_gc_thresh1", net_ipv4_neigh_default_gc_thresh1) + _setter("net_ipv4_neigh_default_gc_thresh1", net_ipv4_neigh_default_gc_thresh1) if net_ipv4_neigh_default_gc_thresh2 is not None: - pulumi.set(__self__, "net_ipv4_neigh_default_gc_thresh2", net_ipv4_neigh_default_gc_thresh2) + _setter("net_ipv4_neigh_default_gc_thresh2", net_ipv4_neigh_default_gc_thresh2) if net_ipv4_neigh_default_gc_thresh3 is not None: - pulumi.set(__self__, "net_ipv4_neigh_default_gc_thresh3", net_ipv4_neigh_default_gc_thresh3) + _setter("net_ipv4_neigh_default_gc_thresh3", net_ipv4_neigh_default_gc_thresh3) if net_ipv4_tcp_fin_timeout is not None: - pulumi.set(__self__, "net_ipv4_tcp_fin_timeout", net_ipv4_tcp_fin_timeout) + _setter("net_ipv4_tcp_fin_timeout", net_ipv4_tcp_fin_timeout) if net_ipv4_tcp_keepalive_intvl is not None: - pulumi.set(__self__, "net_ipv4_tcp_keepalive_intvl", net_ipv4_tcp_keepalive_intvl) + _setter("net_ipv4_tcp_keepalive_intvl", net_ipv4_tcp_keepalive_intvl) if net_ipv4_tcp_keepalive_probes is not None: - pulumi.set(__self__, "net_ipv4_tcp_keepalive_probes", net_ipv4_tcp_keepalive_probes) + _setter("net_ipv4_tcp_keepalive_probes", net_ipv4_tcp_keepalive_probes) if net_ipv4_tcp_keepalive_time is not None: - pulumi.set(__self__, "net_ipv4_tcp_keepalive_time", net_ipv4_tcp_keepalive_time) + _setter("net_ipv4_tcp_keepalive_time", net_ipv4_tcp_keepalive_time) if net_ipv4_tcp_max_syn_backlog is not None: - pulumi.set(__self__, "net_ipv4_tcp_max_syn_backlog", net_ipv4_tcp_max_syn_backlog) + _setter("net_ipv4_tcp_max_syn_backlog", net_ipv4_tcp_max_syn_backlog) if net_ipv4_tcp_max_tw_buckets is not None: - pulumi.set(__self__, "net_ipv4_tcp_max_tw_buckets", net_ipv4_tcp_max_tw_buckets) + _setter("net_ipv4_tcp_max_tw_buckets", net_ipv4_tcp_max_tw_buckets) if net_ipv4_tcp_tw_reuse is not None: - pulumi.set(__self__, "net_ipv4_tcp_tw_reuse", net_ipv4_tcp_tw_reuse) + _setter("net_ipv4_tcp_tw_reuse", net_ipv4_tcp_tw_reuse) if net_netfilter_nf_conntrack_buckets is not None: - pulumi.set(__self__, "net_netfilter_nf_conntrack_buckets", net_netfilter_nf_conntrack_buckets) + _setter("net_netfilter_nf_conntrack_buckets", net_netfilter_nf_conntrack_buckets) if net_netfilter_nf_conntrack_max is not None: - pulumi.set(__self__, "net_netfilter_nf_conntrack_max", net_netfilter_nf_conntrack_max) + _setter("net_netfilter_nf_conntrack_max", net_netfilter_nf_conntrack_max) if vm_max_map_count is not None: - pulumi.set(__self__, "vm_max_map_count", vm_max_map_count) + _setter("vm_max_map_count", vm_max_map_count) if vm_swappiness is not None: - pulumi.set(__self__, "vm_swappiness", vm_swappiness) + _setter("vm_swappiness", vm_swappiness) if vm_vfs_cache_pressure is not None: - pulumi.set(__self__, "vm_vfs_cache_pressure", vm_vfs_cache_pressure) + _setter("vm_vfs_cache_pressure", vm_vfs_cache_pressure) @property @pulumi.getter(name="fsAioMaxNr") @@ -7265,8 +9472,21 @@ def __init__(__self__, *, > **Note:** This requires that the Preview Feature `Microsoft.ContainerService/NodePublicIPTagsPreview` is enabled and the Resource Provider is re-registered, see [the documentation](https://learn.microsoft.com/azure/aks/use-node-public-ips#use-public-ip-tags-on-node-public-ips-preview) for more information. """ + KubernetesClusterNodePoolNodeNetworkProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + node_public_ip_tags=node_public_ip_tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + node_public_ip_tags: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if node_public_ip_tags is None and 'nodePublicIpTags' in kwargs: + node_public_ip_tags = kwargs['nodePublicIpTags'] + if node_public_ip_tags is not None: - pulumi.set(__self__, "node_public_ip_tags", node_public_ip_tags) + _setter("node_public_ip_tags", node_public_ip_tags) @property @pulumi.getter(name="nodePublicIpTags") @@ -7303,7 +9523,22 @@ def __init__(__self__, *, """ :param str max_surge: The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade. """ - pulumi.set(__self__, "max_surge", max_surge) + KubernetesClusterNodePoolUpgradeSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_surge=max_surge, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_surge: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_surge is None and 'maxSurge' in kwargs: + max_surge = kwargs['maxSurge'] + if max_surge is None: + raise TypeError("Missing 'max_surge' argument") + + _setter("max_surge", max_surge) @property @pulumi.getter(name="maxSurge") @@ -7340,8 +9575,21 @@ def __init__(__self__, *, > **Note:** If a percentage is provided, the number of surge nodes is calculated from the current node count on the cluster. Node surge can allow a cluster to have more nodes than `max_count` during an upgrade. Ensure that your cluster has enough [IP space](https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade) during an upgrade. """ + KubernetesClusterNodePoolWindowsProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + outbound_nat_enabled=outbound_nat_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + outbound_nat_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if outbound_nat_enabled is None and 'outboundNatEnabled' in kwargs: + outbound_nat_enabled = kwargs['outboundNatEnabled'] + if outbound_nat_enabled is not None: - pulumi.set(__self__, "outbound_nat_enabled", outbound_nat_enabled) + _setter("outbound_nat_enabled", outbound_nat_enabled) @property @pulumi.getter(name="outboundNatEnabled") @@ -7386,11 +9634,34 @@ def __init__(__self__, *, :param bool msi_auth_for_monitoring_enabled: Is managed identity authentication for monitoring enabled? :param Sequence['KubernetesClusterOmsAgentOmsAgentIdentityArgs'] oms_agent_identities: An `oms_agent_identity` block is exported. The exported attributes are defined below. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + KubernetesClusterOmsAgent._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + msi_auth_for_monitoring_enabled=msi_auth_for_monitoring_enabled, + oms_agent_identities=oms_agent_identities, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + msi_auth_for_monitoring_enabled: Optional[bool] = None, + oms_agent_identities: Optional[Sequence['outputs.KubernetesClusterOmsAgentOmsAgentIdentity']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if msi_auth_for_monitoring_enabled is None and 'msiAuthForMonitoringEnabled' in kwargs: + msi_auth_for_monitoring_enabled = kwargs['msiAuthForMonitoringEnabled'] + if oms_agent_identities is None and 'omsAgentIdentities' in kwargs: + oms_agent_identities = kwargs['omsAgentIdentities'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if msi_auth_for_monitoring_enabled is not None: - pulumi.set(__self__, "msi_auth_for_monitoring_enabled", msi_auth_for_monitoring_enabled) + _setter("msi_auth_for_monitoring_enabled", msi_auth_for_monitoring_enabled) if oms_agent_identities is not None: - pulumi.set(__self__, "oms_agent_identities", oms_agent_identities) + _setter("oms_agent_identities", oms_agent_identities) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -7451,12 +9722,33 @@ def __init__(__self__, *, > **Note:** When `kubelet_identity` is enabled - The `type` field in the `identity` block must be set to `UserAssigned` and `identity_ids` must be set. """ + KubernetesClusterOmsAgentOmsAgentIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + object_id: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -7519,11 +9811,32 @@ def __init__(__self__, *, > **NOTE:** Currently only one Internal Ingress Gateway and one External Ingress Gateway are allowed per cluster :param bool internal_ingress_gateway_enabled: Is Istio Internal Ingress Gateway enabled? """ - pulumi.set(__self__, "mode", mode) + KubernetesClusterServiceMeshProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + external_ingress_gateway_enabled=external_ingress_gateway_enabled, + internal_ingress_gateway_enabled=internal_ingress_gateway_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + external_ingress_gateway_enabled: Optional[bool] = None, + internal_ingress_gateway_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if external_ingress_gateway_enabled is None and 'externalIngressGatewayEnabled' in kwargs: + external_ingress_gateway_enabled = kwargs['externalIngressGatewayEnabled'] + if internal_ingress_gateway_enabled is None and 'internalIngressGatewayEnabled' in kwargs: + internal_ingress_gateway_enabled = kwargs['internalIngressGatewayEnabled'] + + _setter("mode", mode) if external_ingress_gateway_enabled is not None: - pulumi.set(__self__, "external_ingress_gateway_enabled", external_ingress_gateway_enabled) + _setter("external_ingress_gateway_enabled", external_ingress_gateway_enabled) if internal_ingress_gateway_enabled is not None: - pulumi.set(__self__, "internal_ingress_gateway_enabled", internal_ingress_gateway_enabled) + _setter("internal_ingress_gateway_enabled", internal_ingress_gateway_enabled) @property @pulumi.getter @@ -7582,8 +9895,29 @@ def __init__(__self__, *, :param str client_id: The Client ID for the Service Principal. :param str client_secret: The Client Secret for the Service Principal. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "client_secret", client_secret) + KubernetesClusterServicePrincipal._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + client_secret=client_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret is None: + raise TypeError("Missing 'client_secret' argument") + + _setter("client_id", client_id) + _setter("client_secret", client_secret) @property @pulumi.getter(name="clientId") @@ -7644,16 +9978,45 @@ def __init__(__self__, *, :param bool file_driver_enabled: Is the File CSI driver enabled? Defaults to `true`. :param bool snapshot_controller_enabled: Is the Snapshot Controller enabled? Defaults to `true`. """ + KubernetesClusterStorageProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_driver_enabled=blob_driver_enabled, + disk_driver_enabled=disk_driver_enabled, + disk_driver_version=disk_driver_version, + file_driver_enabled=file_driver_enabled, + snapshot_controller_enabled=snapshot_controller_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_driver_enabled: Optional[bool] = None, + disk_driver_enabled: Optional[bool] = None, + disk_driver_version: Optional[str] = None, + file_driver_enabled: Optional[bool] = None, + snapshot_controller_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_driver_enabled is None and 'blobDriverEnabled' in kwargs: + blob_driver_enabled = kwargs['blobDriverEnabled'] + if disk_driver_enabled is None and 'diskDriverEnabled' in kwargs: + disk_driver_enabled = kwargs['diskDriverEnabled'] + if disk_driver_version is None and 'diskDriverVersion' in kwargs: + disk_driver_version = kwargs['diskDriverVersion'] + if file_driver_enabled is None and 'fileDriverEnabled' in kwargs: + file_driver_enabled = kwargs['fileDriverEnabled'] + if snapshot_controller_enabled is None and 'snapshotControllerEnabled' in kwargs: + snapshot_controller_enabled = kwargs['snapshotControllerEnabled'] + if blob_driver_enabled is not None: - pulumi.set(__self__, "blob_driver_enabled", blob_driver_enabled) + _setter("blob_driver_enabled", blob_driver_enabled) if disk_driver_enabled is not None: - pulumi.set(__self__, "disk_driver_enabled", disk_driver_enabled) + _setter("disk_driver_enabled", disk_driver_enabled) if disk_driver_version is not None: - pulumi.set(__self__, "disk_driver_version", disk_driver_version) + _setter("disk_driver_version", disk_driver_version) if file_driver_enabled is not None: - pulumi.set(__self__, "file_driver_enabled", file_driver_enabled) + _setter("file_driver_enabled", file_driver_enabled) if snapshot_controller_enabled is not None: - pulumi.set(__self__, "snapshot_controller_enabled", snapshot_controller_enabled) + _setter("snapshot_controller_enabled", snapshot_controller_enabled) @property @pulumi.getter(name="blobDriverEnabled") @@ -7726,9 +10089,28 @@ def __init__(__self__, *, :param str dns_zone_id: Specifies the ID of the DNS Zone in which DNS entries are created for applications deployed to the cluster when Web App Routing is enabled. For Bring-Your-Own DNS zones this property should be set to an empty string `""`. :param Sequence['KubernetesClusterWebAppRoutingWebAppRoutingIdentityArgs'] web_app_routing_identities: A `web_app_routing_identity` block is exported. The exported attributes are defined below. """ - pulumi.set(__self__, "dns_zone_id", dns_zone_id) + KubernetesClusterWebAppRouting._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_zone_id=dns_zone_id, + web_app_routing_identities=web_app_routing_identities, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_zone_id: Optional[str] = None, + web_app_routing_identities: Optional[Sequence['outputs.KubernetesClusterWebAppRoutingWebAppRoutingIdentity']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_zone_id is None and 'dnsZoneId' in kwargs: + dns_zone_id = kwargs['dnsZoneId'] + if dns_zone_id is None: + raise TypeError("Missing 'dns_zone_id' argument") + if web_app_routing_identities is None and 'webAppRoutingIdentities' in kwargs: + web_app_routing_identities = kwargs['webAppRoutingIdentities'] + + _setter("dns_zone_id", dns_zone_id) if web_app_routing_identities is not None: - pulumi.set(__self__, "web_app_routing_identities", web_app_routing_identities) + _setter("web_app_routing_identities", web_app_routing_identities) @property @pulumi.getter(name="dnsZoneId") @@ -7781,12 +10163,33 @@ def __init__(__self__, *, > **Note:** When `kubelet_identity` is enabled - The `type` field in the `identity` block must be set to `UserAssigned` and `identity_ids` must be set. """ + KubernetesClusterWebAppRoutingWebAppRoutingIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + object_id: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -7847,13 +10250,36 @@ def __init__(__self__, *, :param 'KubernetesClusterWindowsProfileGmsaArgs' gmsa: A `gmsa` block as defined below. :param str license: Specifies the type of on-premise license which should be used for Node Pool Windows Virtual Machine. At this time the only possible value is `Windows_Server`. """ - pulumi.set(__self__, "admin_username", admin_username) + KubernetesClusterWindowsProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + admin_password=admin_password, + gmsa=gmsa, + license=license, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[str] = None, + admin_password: Optional[str] = None, + gmsa: Optional['outputs.KubernetesClusterWindowsProfileGmsa'] = None, + license: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + + _setter("admin_username", admin_username) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if gmsa is not None: - pulumi.set(__self__, "gmsa", gmsa) + _setter("gmsa", gmsa) if license is not None: - pulumi.set(__self__, "license", license) + _setter("license", license) @property @pulumi.getter(name="adminUsername") @@ -7918,8 +10344,29 @@ def __init__(__self__, *, > **Note:** The properties `dns_server` and `root_domain` must both either be set or unset, i.e. empty. """ - pulumi.set(__self__, "dns_server", dns_server) - pulumi.set(__self__, "root_domain", root_domain) + KubernetesClusterWindowsProfileGmsa._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_server=dns_server, + root_domain=root_domain, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_server: Optional[str] = None, + root_domain: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_server is None and 'dnsServer' in kwargs: + dns_server = kwargs['dnsServer'] + if dns_server is None: + raise TypeError("Missing 'dns_server' argument") + if root_domain is None and 'rootDomain' in kwargs: + root_domain = kwargs['rootDomain'] + if root_domain is None: + raise TypeError("Missing 'root_domain' argument") + + _setter("dns_server", dns_server) + _setter("root_domain", root_domain) @property @pulumi.getter(name="dnsServer") @@ -7980,14 +10427,39 @@ def __init__(__self__, *, > **Note:** This requires that the Preview Feature `Microsoft.ContainerService/AKS-VPAPreview` is enabled and the Resource Provider is re-registered, see the documentation for more information. :param str vertical_pod_autoscaler_update_mode: How the autoscaler applies changes to pod resources. """ + KubernetesClusterWorkloadAutoscalerProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + keda_enabled=keda_enabled, + vertical_pod_autoscaler_controlled_values=vertical_pod_autoscaler_controlled_values, + vertical_pod_autoscaler_enabled=vertical_pod_autoscaler_enabled, + vertical_pod_autoscaler_update_mode=vertical_pod_autoscaler_update_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + keda_enabled: Optional[bool] = None, + vertical_pod_autoscaler_controlled_values: Optional[str] = None, + vertical_pod_autoscaler_enabled: Optional[bool] = None, + vertical_pod_autoscaler_update_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if keda_enabled is None and 'kedaEnabled' in kwargs: + keda_enabled = kwargs['kedaEnabled'] + if vertical_pod_autoscaler_controlled_values is None and 'verticalPodAutoscalerControlledValues' in kwargs: + vertical_pod_autoscaler_controlled_values = kwargs['verticalPodAutoscalerControlledValues'] + if vertical_pod_autoscaler_enabled is None and 'verticalPodAutoscalerEnabled' in kwargs: + vertical_pod_autoscaler_enabled = kwargs['verticalPodAutoscalerEnabled'] + if vertical_pod_autoscaler_update_mode is None and 'verticalPodAutoscalerUpdateMode' in kwargs: + vertical_pod_autoscaler_update_mode = kwargs['verticalPodAutoscalerUpdateMode'] + if keda_enabled is not None: - pulumi.set(__self__, "keda_enabled", keda_enabled) + _setter("keda_enabled", keda_enabled) if vertical_pod_autoscaler_controlled_values is not None: - pulumi.set(__self__, "vertical_pod_autoscaler_controlled_values", vertical_pod_autoscaler_controlled_values) + _setter("vertical_pod_autoscaler_controlled_values", vertical_pod_autoscaler_controlled_values) if vertical_pod_autoscaler_enabled is not None: - pulumi.set(__self__, "vertical_pod_autoscaler_enabled", vertical_pod_autoscaler_enabled) + _setter("vertical_pod_autoscaler_enabled", vertical_pod_autoscaler_enabled) if vertical_pod_autoscaler_update_mode is not None: - pulumi.set(__self__, "vertical_pod_autoscaler_update_mode", vertical_pod_autoscaler_update_mode) + _setter("vertical_pod_autoscaler_update_mode", vertical_pod_autoscaler_update_mode) @property @pulumi.getter(name="kedaEnabled") @@ -8051,11 +10523,32 @@ def __init__(__self__, *, dns_prefix: str, fqdn: Optional[str] = None, kubernetes_version: Optional[str] = None): - pulumi.set(__self__, "dns_prefix", dns_prefix) + KubernetesFleetManagerHubProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_prefix=dns_prefix, + fqdn=fqdn, + kubernetes_version=kubernetes_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_prefix: Optional[str] = None, + fqdn: Optional[str] = None, + kubernetes_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_prefix is None and 'dnsPrefix' in kwargs: + dns_prefix = kwargs['dnsPrefix'] + if dns_prefix is None: + raise TypeError("Missing 'dns_prefix' argument") + if kubernetes_version is None and 'kubernetesVersion' in kwargs: + kubernetes_version = kwargs['kubernetesVersion'] + + _setter("dns_prefix", dns_prefix) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if kubernetes_version is not None: - pulumi.set(__self__, "kubernetes_version", kubernetes_version) + _setter("kubernetes_version", kubernetes_version) @property @pulumi.getter(name="dnsPrefix") @@ -8105,10 +10598,33 @@ def __init__(__self__, *, :param str key_vault_key_id: The ID of the Key Vault Key. :param bool enabled: Boolean value that indicates whether encryption is enabled. """ - pulumi.set(__self__, "identity_client_id", identity_client_id) - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + RegistryEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_client_id=identity_client_id, + key_vault_key_id=key_vault_key_id, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_client_id: Optional[str] = None, + key_vault_key_id: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_client_id is None and 'identityClientId' in kwargs: + identity_client_id = kwargs['identityClientId'] + if identity_client_id is None: + raise TypeError("Missing 'identity_client_id' argument") + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + + _setter("identity_client_id", identity_client_id) + _setter("key_vault_key_id", key_vault_key_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="identityClientId") @@ -8171,13 +10687,36 @@ def __init__(__self__, *, > **NOTE:** Changing the `zone_redundancy_enabled` forces the a underlying replication to be created. """ - pulumi.set(__self__, "location", location) + RegistryGeoreplication._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + regional_endpoint_enabled=regional_endpoint_enabled, + tags=tags, + zone_redundancy_enabled=zone_redundancy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[str] = None, + regional_endpoint_enabled: Optional[bool] = None, + tags: Optional[Mapping[str, str]] = None, + zone_redundancy_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is None: + raise TypeError("Missing 'location' argument") + if regional_endpoint_enabled is None and 'regionalEndpointEnabled' in kwargs: + regional_endpoint_enabled = kwargs['regionalEndpointEnabled'] + if zone_redundancy_enabled is None and 'zoneRedundancyEnabled' in kwargs: + zone_redundancy_enabled = kwargs['zoneRedundancyEnabled'] + + _setter("location", location) if regional_endpoint_enabled is not None: - pulumi.set(__self__, "regional_endpoint_enabled", regional_endpoint_enabled) + _setter("regional_endpoint_enabled", regional_endpoint_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundancy_enabled is not None: - pulumi.set(__self__, "zone_redundancy_enabled", zone_redundancy_enabled) + _setter("zone_redundancy_enabled", zone_redundancy_enabled) @property @pulumi.getter @@ -8250,13 +10789,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + RegistryIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -8329,12 +10893,33 @@ def __init__(__self__, *, > **NOTE:** Azure automatically configures Network Rules - to remove these you'll need to specify an `network_rule_set` block with `default_action` set to `Deny`. """ + RegistryNetworkRuleSet._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + virtual_networks=virtual_networks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[str] = None, + ip_rules: Optional[Sequence['outputs.RegistryNetworkRuleSetIpRule']] = None, + virtual_networks: Optional[Sequence['outputs.RegistryNetworkRuleSetVirtualNetwork']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if virtual_networks is None and 'virtualNetworks' in kwargs: + virtual_networks = kwargs['virtualNetworks'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if virtual_networks is not None: - pulumi.set(__self__, "virtual_networks", virtual_networks) + _setter("virtual_networks", virtual_networks) @property @pulumi.getter(name="defaultAction") @@ -8391,8 +10976,27 @@ def __init__(__self__, *, :param str action: The behaviour for requests matching this rule. At this time the only supported value is `Allow` :param str ip_range: The CIDR block from which requests will match the rule. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "ip_range", ip_range) + RegistryNetworkRuleSetIpRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + ip_range=ip_range, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + ip_range: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if ip_range is None and 'ipRange' in kwargs: + ip_range = kwargs['ipRange'] + if ip_range is None: + raise TypeError("Missing 'ip_range' argument") + + _setter("action", action) + _setter("ip_range", ip_range) @property @pulumi.getter @@ -8437,8 +11041,27 @@ def __init__(__self__, *, :param str action: The behaviour for requests matching this rule. At this time the only supported value is `Allow` :param str subnet_id: The subnet id from which requests will match the rule. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "subnet_id", subnet_id) + RegistryNetworkRuleSetVirtualNetwork._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("action", action) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -8466,10 +11089,23 @@ def __init__(__self__, *, :param int days: The number of days to retain an untagged manifest after which it gets purged. Default is `7`. :param bool enabled: Boolean value that indicates whether the policy is enabled. """ + RegistryRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[int] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -8495,7 +11131,20 @@ def __init__(__self__, *, """ :param int cpu: The number of cores required for the Container Registry Task. """ - pulumi.set(__self__, "cpu", cpu) + RegistryTaskAgentSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu=cpu, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu is None: + raise TypeError("Missing 'cpu' argument") + + _setter("cpu", cpu) @property @pulumi.getter @@ -8540,14 +11189,41 @@ def __init__(__self__, *, :param str update_trigger_endpoint: The endpoint URL for receiving the trigger. :param str update_trigger_payload_type: Type of payload body for the trigger. Possible values are `Default` and `Token`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + RegistryTaskBaseImageTrigger._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + enabled=enabled, + update_trigger_endpoint=update_trigger_endpoint, + update_trigger_payload_type=update_trigger_payload_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + enabled: Optional[bool] = None, + update_trigger_endpoint: Optional[str] = None, + update_trigger_payload_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if update_trigger_endpoint is None and 'updateTriggerEndpoint' in kwargs: + update_trigger_endpoint = kwargs['updateTriggerEndpoint'] + if update_trigger_payload_type is None and 'updateTriggerPayloadType' in kwargs: + update_trigger_payload_type = kwargs['updateTriggerPayloadType'] + + _setter("name", name) + _setter("type", type) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if update_trigger_endpoint is not None: - pulumi.set(__self__, "update_trigger_endpoint", update_trigger_endpoint) + _setter("update_trigger_endpoint", update_trigger_endpoint) if update_trigger_payload_type is not None: - pulumi.set(__self__, "update_trigger_payload_type", update_trigger_payload_type) + _setter("update_trigger_payload_type", update_trigger_payload_type) @property @pulumi.getter @@ -8642,21 +11318,68 @@ def __init__(__self__, *, :param Mapping[str, str] secret_arguments: Specifies a map of *secret* arguments to be used when executing this step. :param str target: The name of the target build stage for the docker build. """ - pulumi.set(__self__, "context_access_token", context_access_token) - pulumi.set(__self__, "context_path", context_path) - pulumi.set(__self__, "dockerfile_path", dockerfile_path) + RegistryTaskDockerStep._configure( + lambda key, value: pulumi.set(__self__, key, value), + context_access_token=context_access_token, + context_path=context_path, + dockerfile_path=dockerfile_path, + arguments=arguments, + cache_enabled=cache_enabled, + image_names=image_names, + push_enabled=push_enabled, + secret_arguments=secret_arguments, + target=target, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + context_access_token: Optional[str] = None, + context_path: Optional[str] = None, + dockerfile_path: Optional[str] = None, + arguments: Optional[Mapping[str, str]] = None, + cache_enabled: Optional[bool] = None, + image_names: Optional[Sequence[str]] = None, + push_enabled: Optional[bool] = None, + secret_arguments: Optional[Mapping[str, str]] = None, + target: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if context_access_token is None and 'contextAccessToken' in kwargs: + context_access_token = kwargs['contextAccessToken'] + if context_access_token is None: + raise TypeError("Missing 'context_access_token' argument") + if context_path is None and 'contextPath' in kwargs: + context_path = kwargs['contextPath'] + if context_path is None: + raise TypeError("Missing 'context_path' argument") + if dockerfile_path is None and 'dockerfilePath' in kwargs: + dockerfile_path = kwargs['dockerfilePath'] + if dockerfile_path is None: + raise TypeError("Missing 'dockerfile_path' argument") + if cache_enabled is None and 'cacheEnabled' in kwargs: + cache_enabled = kwargs['cacheEnabled'] + if image_names is None and 'imageNames' in kwargs: + image_names = kwargs['imageNames'] + if push_enabled is None and 'pushEnabled' in kwargs: + push_enabled = kwargs['pushEnabled'] + if secret_arguments is None and 'secretArguments' in kwargs: + secret_arguments = kwargs['secretArguments'] + + _setter("context_access_token", context_access_token) + _setter("context_path", context_path) + _setter("dockerfile_path", dockerfile_path) if arguments is not None: - pulumi.set(__self__, "arguments", arguments) + _setter("arguments", arguments) if cache_enabled is not None: - pulumi.set(__self__, "cache_enabled", cache_enabled) + _setter("cache_enabled", cache_enabled) if image_names is not None: - pulumi.set(__self__, "image_names", image_names) + _setter("image_names", image_names) if push_enabled is not None: - pulumi.set(__self__, "push_enabled", push_enabled) + _setter("push_enabled", push_enabled) if secret_arguments is not None: - pulumi.set(__self__, "secret_arguments", secret_arguments) + _setter("secret_arguments", secret_arguments) if target is not None: - pulumi.set(__self__, "target", target) + _setter("target", target) @property @pulumi.getter(name="contextAccessToken") @@ -8773,17 +11496,50 @@ def __init__(__self__, *, :param str value_content: The (optionally base64 encoded) content of the build parameters. :param Mapping[str, str] values: Specifies a map of values that can be passed when running a task. """ - pulumi.set(__self__, "task_content", task_content) + RegistryTaskEncodedStep._configure( + lambda key, value: pulumi.set(__self__, key, value), + task_content=task_content, + context_access_token=context_access_token, + context_path=context_path, + secret_values=secret_values, + value_content=value_content, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + task_content: Optional[str] = None, + context_access_token: Optional[str] = None, + context_path: Optional[str] = None, + secret_values: Optional[Mapping[str, str]] = None, + value_content: Optional[str] = None, + values: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if task_content is None and 'taskContent' in kwargs: + task_content = kwargs['taskContent'] + if task_content is None: + raise TypeError("Missing 'task_content' argument") + if context_access_token is None and 'contextAccessToken' in kwargs: + context_access_token = kwargs['contextAccessToken'] + if context_path is None and 'contextPath' in kwargs: + context_path = kwargs['contextPath'] + if secret_values is None and 'secretValues' in kwargs: + secret_values = kwargs['secretValues'] + if value_content is None and 'valueContent' in kwargs: + value_content = kwargs['valueContent'] + + _setter("task_content", task_content) if context_access_token is not None: - pulumi.set(__self__, "context_access_token", context_access_token) + _setter("context_access_token", context_access_token) if context_path is not None: - pulumi.set(__self__, "context_path", context_path) + _setter("context_path", context_path) if secret_values is not None: - pulumi.set(__self__, "secret_values", secret_values) + _setter("secret_values", secret_values) if value_content is not None: - pulumi.set(__self__, "value_content", value_content) + _setter("value_content", value_content) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter(name="taskContent") @@ -8876,17 +11632,50 @@ def __init__(__self__, *, :param str value_file_path: The parameters file path relative to the source context. :param Mapping[str, str] values: Specifies a map of values that can be passed when running a task. """ - pulumi.set(__self__, "task_file_path", task_file_path) + RegistryTaskFileStep._configure( + lambda key, value: pulumi.set(__self__, key, value), + task_file_path=task_file_path, + context_access_token=context_access_token, + context_path=context_path, + secret_values=secret_values, + value_file_path=value_file_path, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + task_file_path: Optional[str] = None, + context_access_token: Optional[str] = None, + context_path: Optional[str] = None, + secret_values: Optional[Mapping[str, str]] = None, + value_file_path: Optional[str] = None, + values: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if task_file_path is None and 'taskFilePath' in kwargs: + task_file_path = kwargs['taskFilePath'] + if task_file_path is None: + raise TypeError("Missing 'task_file_path' argument") + if context_access_token is None and 'contextAccessToken' in kwargs: + context_access_token = kwargs['contextAccessToken'] + if context_path is None and 'contextPath' in kwargs: + context_path = kwargs['contextPath'] + if secret_values is None and 'secretValues' in kwargs: + secret_values = kwargs['secretValues'] + if value_file_path is None and 'valueFilePath' in kwargs: + value_file_path = kwargs['valueFilePath'] + + _setter("task_file_path", task_file_path) if context_access_token is not None: - pulumi.set(__self__, "context_access_token", context_access_token) + _setter("context_access_token", context_access_token) if context_path is not None: - pulumi.set(__self__, "context_path", context_path) + _setter("context_path", context_path) if secret_values is not None: - pulumi.set(__self__, "secret_values", secret_values) + _setter("secret_values", secret_values) if value_file_path is not None: - pulumi.set(__self__, "value_file_path", value_file_path) + _setter("value_file_path", value_file_path) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter(name="taskFilePath") @@ -8973,13 +11762,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + RegistryTaskIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -9027,11 +11841,28 @@ def __init__(__self__, *, :param str architecture: The OS architecture. Possible values are `amd64`, `x86`, `386`, `arm` and `arm64`. :param str variant: The variant of the CPU. Possible values are `v6`, `v7`, `v8`. """ - pulumi.set(__self__, "os", os) + RegistryTaskPlatform._configure( + lambda key, value: pulumi.set(__self__, key, value), + os=os, + architecture=architecture, + variant=variant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + os: Optional[str] = None, + architecture: Optional[str] = None, + variant: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if os is None: + raise TypeError("Missing 'os' argument") + + _setter("os", os) if architecture is not None: - pulumi.set(__self__, "architecture", architecture) + _setter("architecture", architecture) if variant is not None: - pulumi.set(__self__, "variant", variant) + _setter("variant", variant) @property @pulumi.getter @@ -9067,10 +11898,23 @@ def __init__(__self__, *, :param Sequence['RegistryTaskRegistryCredentialCustomArgs'] customs: One or more `custom` blocks as defined above. :param 'RegistryTaskRegistryCredentialSourceArgs' source: One `source` block as defined below. """ + RegistryTaskRegistryCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + customs=customs, + source=source, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + customs: Optional[Sequence['outputs.RegistryTaskRegistryCredentialCustom']] = None, + source: Optional['outputs.RegistryTaskRegistryCredentialSource'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if customs is not None: - pulumi.set(__self__, "customs", customs) + _setter("customs", customs) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) @property @pulumi.getter @@ -9119,13 +11963,34 @@ def __init__(__self__, *, :param str password: The password for logging into the custom Container Registry. It can be either a plain text of password, or a Keyvault Secret ID. :param str username: The username for logging into the custom Container Registry. It can be either a plain text of username, or a Keyvault Secret ID. """ - pulumi.set(__self__, "login_server", login_server) + RegistryTaskRegistryCredentialCustom._configure( + lambda key, value: pulumi.set(__self__, key, value), + login_server=login_server, + identity=identity, + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login_server: Optional[str] = None, + identity: Optional[str] = None, + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login_server is None and 'loginServer' in kwargs: + login_server = kwargs['loginServer'] + if login_server is None: + raise TypeError("Missing 'login_server' argument") + + _setter("login_server", login_server) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="loginServer") @@ -9184,7 +12049,22 @@ def __init__(__self__, *, """ :param str login_mode: The login mode for the source registry. Possible values are `None` and `Default`. """ - pulumi.set(__self__, "login_mode", login_mode) + RegistryTaskRegistryCredentialSource._configure( + lambda key, value: pulumi.set(__self__, key, value), + login_mode=login_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login_mode is None and 'loginMode' in kwargs: + login_mode = kwargs['loginMode'] + if login_mode is None: + raise TypeError("Missing 'login_mode' argument") + + _setter("login_mode", login_mode) @property @pulumi.getter(name="loginMode") @@ -9233,16 +12113,51 @@ def __init__(__self__, *, :param str branch: The branch name of the source code. :param bool enabled: Should the trigger be enabled? Defaults to `true`. """ - pulumi.set(__self__, "events", events) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "repository_url", repository_url) - pulumi.set(__self__, "source_type", source_type) + RegistryTaskSourceTrigger._configure( + lambda key, value: pulumi.set(__self__, key, value), + events=events, + name=name, + repository_url=repository_url, + source_type=source_type, + authentication=authentication, + branch=branch, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + events: Optional[Sequence[str]] = None, + name: Optional[str] = None, + repository_url: Optional[str] = None, + source_type: Optional[str] = None, + authentication: Optional['outputs.RegistryTaskSourceTriggerAuthentication'] = None, + branch: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if events is None: + raise TypeError("Missing 'events' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if repository_url is None and 'repositoryUrl' in kwargs: + repository_url = kwargs['repositoryUrl'] + if repository_url is None: + raise TypeError("Missing 'repository_url' argument") + if source_type is None and 'sourceType' in kwargs: + source_type = kwargs['sourceType'] + if source_type is None: + raise TypeError("Missing 'source_type' argument") + + _setter("events", events) + _setter("name", name) + _setter("repository_url", repository_url) + _setter("source_type", source_type) if authentication is not None: - pulumi.set(__self__, "authentication", authentication) + _setter("authentication", authentication) if branch is not None: - pulumi.set(__self__, "branch", branch) + _setter("branch", branch) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -9337,14 +12252,43 @@ def __init__(__self__, *, :param str refresh_token: The refresh token used to refresh the access token. :param str scope: The scope of the access token. """ - pulumi.set(__self__, "token", token) - pulumi.set(__self__, "token_type", token_type) + RegistryTaskSourceTriggerAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + token=token, + token_type=token_type, + expire_in_seconds=expire_in_seconds, + refresh_token=refresh_token, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + token: Optional[str] = None, + token_type: Optional[str] = None, + expire_in_seconds: Optional[int] = None, + refresh_token: Optional[str] = None, + scope: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if token is None: + raise TypeError("Missing 'token' argument") + if token_type is None and 'tokenType' in kwargs: + token_type = kwargs['tokenType'] + if token_type is None: + raise TypeError("Missing 'token_type' argument") + if expire_in_seconds is None and 'expireInSeconds' in kwargs: + expire_in_seconds = kwargs['expireInSeconds'] + if refresh_token is None and 'refreshToken' in kwargs: + refresh_token = kwargs['refreshToken'] + + _setter("token", token) + _setter("token_type", token_type) if expire_in_seconds is not None: - pulumi.set(__self__, "expire_in_seconds", expire_in_seconds) + _setter("expire_in_seconds", expire_in_seconds) if refresh_token is not None: - pulumi.set(__self__, "refresh_token", refresh_token) + _setter("refresh_token", refresh_token) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter @@ -9398,10 +12342,29 @@ def __init__(__self__, *, :param str schedule: The CRON expression for the task schedule. :param bool enabled: Should the trigger be enabled? Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) + RegistryTaskTimerTrigger._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + schedule=schedule, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + schedule: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + + _setter("name", name) + _setter("schedule", schedule) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -9435,8 +12398,19 @@ def __init__(__self__, *, """ :param bool enabled: Boolean value that indicates whether the policy is enabled. """ + RegistryTrustPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -9456,10 +12430,23 @@ def __init__(__self__, *, :param str expiry: The expiration date of the password in RFC3339 format. Changing this forces a new resource to be created. :param str value: The value of the password (Sensitive). """ + TokenPasswordPassword1._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiry=expiry, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiry: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -9487,10 +12474,23 @@ def __init__(__self__, *, :param str expiry: The expiration date of the password in RFC3339 format. Changing this forces a new resource to be created. :param str value: The value of the password (Sensitive). """ + TokenPasswordPassword2._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiry=expiry, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiry: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -9516,7 +12516,22 @@ def __init__(__self__, *, """ :param str max_surge: The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade. """ - pulumi.set(__self__, "max_surge", max_surge) + GetClusterNodePoolUpgradeSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_surge=max_surge, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_surge: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_surge is None and 'maxSurge' in kwargs: + max_surge = kwargs['maxSurge'] + if max_surge is None: + raise TypeError("Missing 'max_surge' argument") + + _setter("max_surge", max_surge) @property @pulumi.getter(name="maxSurge") @@ -9540,10 +12555,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Container Group. :param str type: Type of Managed Service Identity configured on this Container Group. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetGroupIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -9585,7 +12631,22 @@ def __init__(__self__, *, """ :param str subnet_name: The subnet name for the virtual nodes to run. """ - pulumi.set(__self__, "subnet_name", subnet_name) + GetKubernetesClusterAciConnectorLinuxResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_name=subnet_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_name is None and 'subnetName' in kwargs: + subnet_name = kwargs['subnetName'] + if subnet_name is None: + raise TypeError("Missing 'subnet_name' argument") + + _setter("subnet_name", subnet_name) @property @pulumi.getter(name="subnetName") @@ -9637,25 +12698,138 @@ def __init__(__self__, *, :param str vnet_subnet_id: The ID of the Subnet where the Agents in the Pool are provisioned. :param Sequence[str] zones: A list of Availability Zones in which this Kubernetes Cluster is located. """ - pulumi.set(__self__, "count", count) - pulumi.set(__self__, "enable_auto_scaling", enable_auto_scaling) - pulumi.set(__self__, "enable_node_public_ip", enable_node_public_ip) - pulumi.set(__self__, "max_count", max_count) - pulumi.set(__self__, "max_pods", max_pods) - pulumi.set(__self__, "min_count", min_count) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "node_labels", node_labels) - pulumi.set(__self__, "node_public_ip_prefix_id", node_public_ip_prefix_id) - pulumi.set(__self__, "node_taints", node_taints) - pulumi.set(__self__, "orchestrator_version", orchestrator_version) - pulumi.set(__self__, "os_disk_size_gb", os_disk_size_gb) - pulumi.set(__self__, "os_type", os_type) - pulumi.set(__self__, "tags", tags) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "upgrade_settings", upgrade_settings) - pulumi.set(__self__, "vm_size", vm_size) - pulumi.set(__self__, "vnet_subnet_id", vnet_subnet_id) - pulumi.set(__self__, "zones", zones) + GetKubernetesClusterAgentPoolProfileResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + enable_auto_scaling=enable_auto_scaling, + enable_node_public_ip=enable_node_public_ip, + max_count=max_count, + max_pods=max_pods, + min_count=min_count, + name=name, + node_labels=node_labels, + node_public_ip_prefix_id=node_public_ip_prefix_id, + node_taints=node_taints, + orchestrator_version=orchestrator_version, + os_disk_size_gb=os_disk_size_gb, + os_type=os_type, + tags=tags, + type=type, + upgrade_settings=upgrade_settings, + vm_size=vm_size, + vnet_subnet_id=vnet_subnet_id, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + enable_node_public_ip: Optional[bool] = None, + max_count: Optional[int] = None, + max_pods: Optional[int] = None, + min_count: Optional[int] = None, + name: Optional[str] = None, + node_labels: Optional[Mapping[str, str]] = None, + node_public_ip_prefix_id: Optional[str] = None, + node_taints: Optional[Sequence[str]] = None, + orchestrator_version: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_type: Optional[str] = None, + tags: Optional[Mapping[str, str]] = None, + type: Optional[str] = None, + upgrade_settings: Optional[Sequence['outputs.GetKubernetesClusterAgentPoolProfileUpgradeSettingResult']] = None, + vm_size: Optional[str] = None, + vnet_subnet_id: Optional[str] = None, + zones: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + if enable_auto_scaling is None and 'enableAutoScaling' in kwargs: + enable_auto_scaling = kwargs['enableAutoScaling'] + if enable_auto_scaling is None: + raise TypeError("Missing 'enable_auto_scaling' argument") + if enable_node_public_ip is None and 'enableNodePublicIp' in kwargs: + enable_node_public_ip = kwargs['enableNodePublicIp'] + if enable_node_public_ip is None: + raise TypeError("Missing 'enable_node_public_ip' argument") + if max_count is None and 'maxCount' in kwargs: + max_count = kwargs['maxCount'] + if max_count is None: + raise TypeError("Missing 'max_count' argument") + if max_pods is None and 'maxPods' in kwargs: + max_pods = kwargs['maxPods'] + if max_pods is None: + raise TypeError("Missing 'max_pods' argument") + if min_count is None and 'minCount' in kwargs: + min_count = kwargs['minCount'] + if min_count is None: + raise TypeError("Missing 'min_count' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if node_labels is None and 'nodeLabels' in kwargs: + node_labels = kwargs['nodeLabels'] + if node_labels is None: + raise TypeError("Missing 'node_labels' argument") + if node_public_ip_prefix_id is None and 'nodePublicIpPrefixId' in kwargs: + node_public_ip_prefix_id = kwargs['nodePublicIpPrefixId'] + if node_public_ip_prefix_id is None: + raise TypeError("Missing 'node_public_ip_prefix_id' argument") + if node_taints is None and 'nodeTaints' in kwargs: + node_taints = kwargs['nodeTaints'] + if node_taints is None: + raise TypeError("Missing 'node_taints' argument") + if orchestrator_version is None and 'orchestratorVersion' in kwargs: + orchestrator_version = kwargs['orchestratorVersion'] + if orchestrator_version is None: + raise TypeError("Missing 'orchestrator_version' argument") + if os_disk_size_gb is None and 'osDiskSizeGb' in kwargs: + os_disk_size_gb = kwargs['osDiskSizeGb'] + if os_disk_size_gb is None: + raise TypeError("Missing 'os_disk_size_gb' argument") + if os_type is None and 'osType' in kwargs: + os_type = kwargs['osType'] + if os_type is None: + raise TypeError("Missing 'os_type' argument") + if tags is None: + raise TypeError("Missing 'tags' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if upgrade_settings is None and 'upgradeSettings' in kwargs: + upgrade_settings = kwargs['upgradeSettings'] + if upgrade_settings is None: + raise TypeError("Missing 'upgrade_settings' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if vnet_subnet_id is None and 'vnetSubnetId' in kwargs: + vnet_subnet_id = kwargs['vnetSubnetId'] + if vnet_subnet_id is None: + raise TypeError("Missing 'vnet_subnet_id' argument") + if zones is None: + raise TypeError("Missing 'zones' argument") + + _setter("count", count) + _setter("enable_auto_scaling", enable_auto_scaling) + _setter("enable_node_public_ip", enable_node_public_ip) + _setter("max_count", max_count) + _setter("max_pods", max_pods) + _setter("min_count", min_count) + _setter("name", name) + _setter("node_labels", node_labels) + _setter("node_public_ip_prefix_id", node_public_ip_prefix_id) + _setter("node_taints", node_taints) + _setter("orchestrator_version", orchestrator_version) + _setter("os_disk_size_gb", os_disk_size_gb) + _setter("os_type", os_type) + _setter("tags", tags) + _setter("type", type) + _setter("upgrade_settings", upgrade_settings) + _setter("vm_size", vm_size) + _setter("vnet_subnet_id", vnet_subnet_id) + _setter("zones", zones) @property @pulumi.getter @@ -9811,7 +12985,22 @@ def __init__(__self__, *, """ :param str max_surge: The maximum number or percentage of nodes that will be added to the Node Pool size during an upgrade. """ - pulumi.set(__self__, "max_surge", max_surge) + GetKubernetesClusterAgentPoolProfileUpgradeSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_surge=max_surge, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_surge: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_surge is None and 'maxSurge' in kwargs: + max_surge = kwargs['maxSurge'] + if max_surge is None: + raise TypeError("Missing 'max_surge' argument") + + _setter("max_surge", max_surge) @property @pulumi.getter(name="maxSurge") @@ -9839,12 +13028,55 @@ def __init__(__self__, *, :param str server_app_id: The Server ID of an Azure Active Directory Application. :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Kubernetes Cluster. """ - pulumi.set(__self__, "admin_group_object_ids", admin_group_object_ids) - pulumi.set(__self__, "azure_rbac_enabled", azure_rbac_enabled) - pulumi.set(__self__, "client_app_id", client_app_id) - pulumi.set(__self__, "managed", managed) - pulumi.set(__self__, "server_app_id", server_app_id) - pulumi.set(__self__, "tenant_id", tenant_id) + GetKubernetesClusterAzureActiveDirectoryRoleBasedAccessControlResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_group_object_ids=admin_group_object_ids, + azure_rbac_enabled=azure_rbac_enabled, + client_app_id=client_app_id, + managed=managed, + server_app_id=server_app_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_group_object_ids: Optional[Sequence[str]] = None, + azure_rbac_enabled: Optional[bool] = None, + client_app_id: Optional[str] = None, + managed: Optional[bool] = None, + server_app_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_group_object_ids is None and 'adminGroupObjectIds' in kwargs: + admin_group_object_ids = kwargs['adminGroupObjectIds'] + if admin_group_object_ids is None: + raise TypeError("Missing 'admin_group_object_ids' argument") + if azure_rbac_enabled is None and 'azureRbacEnabled' in kwargs: + azure_rbac_enabled = kwargs['azureRbacEnabled'] + if azure_rbac_enabled is None: + raise TypeError("Missing 'azure_rbac_enabled' argument") + if client_app_id is None and 'clientAppId' in kwargs: + client_app_id = kwargs['clientAppId'] + if client_app_id is None: + raise TypeError("Missing 'client_app_id' argument") + if managed is None: + raise TypeError("Missing 'managed' argument") + if server_app_id is None and 'serverAppId' in kwargs: + server_app_id = kwargs['serverAppId'] + if server_app_id is None: + raise TypeError("Missing 'server_app_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("admin_group_object_ids", admin_group_object_ids) + _setter("azure_rbac_enabled", azure_rbac_enabled) + _setter("client_app_id", client_app_id) + _setter("managed", managed) + _setter("server_app_id", server_app_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="adminGroupObjectIds") @@ -9908,10 +13140,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Kubernetes Cluster. :param str type: The type of Managed Service Identity that is configured on this Kubernetes Cluster. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetKubernetesClusterIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -9962,12 +13225,57 @@ def __init__(__self__, *, :param str subnet_cidr: The subnet CIDR used to create an Application Gateway, which in turn will be integrated with the ingress controller of this Kubernetes Cluster. This attribute is only set when `subnet_cidr` is specified when configuring the `ingress_application_gateway` addon. :param str subnet_id: The ID of the subnet on which to create an Application Gateway, which in turn will be integrated with the ingress controller of this Kubernetes Cluster. This attribute is only set when `subnet_id` is specified when configuring the `ingress_application_gateway` addon. """ - pulumi.set(__self__, "effective_gateway_id", effective_gateway_id) - pulumi.set(__self__, "gateway_id", gateway_id) - pulumi.set(__self__, "gateway_name", gateway_name) - pulumi.set(__self__, "ingress_application_gateway_identities", ingress_application_gateway_identities) - pulumi.set(__self__, "subnet_cidr", subnet_cidr) - pulumi.set(__self__, "subnet_id", subnet_id) + GetKubernetesClusterIngressApplicationGatewayResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + effective_gateway_id=effective_gateway_id, + gateway_id=gateway_id, + gateway_name=gateway_name, + ingress_application_gateway_identities=ingress_application_gateway_identities, + subnet_cidr=subnet_cidr, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + effective_gateway_id: Optional[str] = None, + gateway_id: Optional[str] = None, + gateway_name: Optional[str] = None, + ingress_application_gateway_identities: Optional[Sequence['outputs.GetKubernetesClusterIngressApplicationGatewayIngressApplicationGatewayIdentityResult']] = None, + subnet_cidr: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if effective_gateway_id is None and 'effectiveGatewayId' in kwargs: + effective_gateway_id = kwargs['effectiveGatewayId'] + if effective_gateway_id is None: + raise TypeError("Missing 'effective_gateway_id' argument") + if gateway_id is None and 'gatewayId' in kwargs: + gateway_id = kwargs['gatewayId'] + if gateway_id is None: + raise TypeError("Missing 'gateway_id' argument") + if gateway_name is None and 'gatewayName' in kwargs: + gateway_name = kwargs['gatewayName'] + if gateway_name is None: + raise TypeError("Missing 'gateway_name' argument") + if ingress_application_gateway_identities is None and 'ingressApplicationGatewayIdentities' in kwargs: + ingress_application_gateway_identities = kwargs['ingressApplicationGatewayIdentities'] + if ingress_application_gateway_identities is None: + raise TypeError("Missing 'ingress_application_gateway_identities' argument") + if subnet_cidr is None and 'subnetCidr' in kwargs: + subnet_cidr = kwargs['subnetCidr'] + if subnet_cidr is None: + raise TypeError("Missing 'subnet_cidr' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("effective_gateway_id", effective_gateway_id) + _setter("gateway_id", gateway_id) + _setter("gateway_name", gateway_name) + _setter("ingress_application_gateway_identities", ingress_application_gateway_identities) + _setter("subnet_cidr", subnet_cidr) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="effectiveGatewayId") @@ -10026,9 +13334,36 @@ def __init__(__self__, *, :param str object_id: The Object ID of the user-defined Managed Identity assigned to the Kubelets. :param str user_assigned_identity_id: The ID of the User Assigned Identity assigned to the Kubelets. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + GetKubernetesClusterIngressApplicationGatewayIngressApplicationGatewayIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + object_id: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_assigned_identity_id is None: + raise TypeError("Missing 'user_assigned_identity_id' argument") + + _setter("client_id", client_id) + _setter("object_id", object_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -10064,8 +13399,29 @@ def __init__(__self__, *, :param str key_vault_key_id: Identifier of Azure Key Vault key. See [key identifier format](https://learn.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) for more details. :param str key_vault_network_access: Network access of the key vault. The possible values are `Public` and `Private`. `Public` means the key vault allows public access from all networks. `Private` means the key vault disables public access and enables private link. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) - pulumi.set(__self__, "key_vault_network_access", key_vault_network_access) + GetKubernetesClusterKeyManagementServiceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + key_vault_network_access=key_vault_network_access, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[str] = None, + key_vault_network_access: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if key_vault_network_access is None and 'keyVaultNetworkAccess' in kwargs: + key_vault_network_access = kwargs['keyVaultNetworkAccess'] + if key_vault_network_access is None: + raise TypeError("Missing 'key_vault_network_access' argument") + + _setter("key_vault_key_id", key_vault_key_id) + _setter("key_vault_network_access", key_vault_network_access) @property @pulumi.getter(name="keyVaultKeyId") @@ -10095,9 +13451,36 @@ def __init__(__self__, *, :param bool secret_rotation_enabled: Is secret rotation enabled? :param str secret_rotation_interval: The interval to poll for secret rotation. """ - pulumi.set(__self__, "secret_identities", secret_identities) - pulumi.set(__self__, "secret_rotation_enabled", secret_rotation_enabled) - pulumi.set(__self__, "secret_rotation_interval", secret_rotation_interval) + GetKubernetesClusterKeyVaultSecretsProviderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_identities=secret_identities, + secret_rotation_enabled=secret_rotation_enabled, + secret_rotation_interval=secret_rotation_interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_identities: Optional[Sequence['outputs.GetKubernetesClusterKeyVaultSecretsProviderSecretIdentityResult']] = None, + secret_rotation_enabled: Optional[bool] = None, + secret_rotation_interval: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_identities is None and 'secretIdentities' in kwargs: + secret_identities = kwargs['secretIdentities'] + if secret_identities is None: + raise TypeError("Missing 'secret_identities' argument") + if secret_rotation_enabled is None and 'secretRotationEnabled' in kwargs: + secret_rotation_enabled = kwargs['secretRotationEnabled'] + if secret_rotation_enabled is None: + raise TypeError("Missing 'secret_rotation_enabled' argument") + if secret_rotation_interval is None and 'secretRotationInterval' in kwargs: + secret_rotation_interval = kwargs['secretRotationInterval'] + if secret_rotation_interval is None: + raise TypeError("Missing 'secret_rotation_interval' argument") + + _setter("secret_identities", secret_identities) + _setter("secret_rotation_enabled", secret_rotation_enabled) + _setter("secret_rotation_interval", secret_rotation_interval) @property @pulumi.getter(name="secretIdentities") @@ -10135,9 +13518,36 @@ def __init__(__self__, *, :param str object_id: The Object ID of the user-defined Managed Identity assigned to the Kubelets. :param str user_assigned_identity_id: The ID of the User Assigned Identity assigned to the Kubelets. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + GetKubernetesClusterKeyVaultSecretsProviderSecretIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + object_id: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_assigned_identity_id is None: + raise TypeError("Missing 'user_assigned_identity_id' argument") + + _setter("client_id", client_id) + _setter("object_id", object_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -10181,12 +13591,51 @@ def __init__(__self__, *, :param str password: A password or token used to authenticate to the Kubernetes cluster. :param str username: A username used to authenticate to the Kubernetes cluster. """ - pulumi.set(__self__, "client_certificate", client_certificate) - pulumi.set(__self__, "client_key", client_key) - pulumi.set(__self__, "cluster_ca_certificate", cluster_ca_certificate) - pulumi.set(__self__, "host", host) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + GetKubernetesClusterKubeAdminConfigResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_certificate=client_certificate, + client_key=client_key, + cluster_ca_certificate=cluster_ca_certificate, + host=host, + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_certificate: Optional[str] = None, + client_key: Optional[str] = None, + cluster_ca_certificate: Optional[str] = None, + host: Optional[str] = None, + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_certificate is None and 'clientCertificate' in kwargs: + client_certificate = kwargs['clientCertificate'] + if client_certificate is None: + raise TypeError("Missing 'client_certificate' argument") + if client_key is None and 'clientKey' in kwargs: + client_key = kwargs['clientKey'] + if client_key is None: + raise TypeError("Missing 'client_key' argument") + if cluster_ca_certificate is None and 'clusterCaCertificate' in kwargs: + cluster_ca_certificate = kwargs['clusterCaCertificate'] + if cluster_ca_certificate is None: + raise TypeError("Missing 'cluster_ca_certificate' argument") + if host is None: + raise TypeError("Missing 'host' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("client_certificate", client_certificate) + _setter("client_key", client_key) + _setter("cluster_ca_certificate", cluster_ca_certificate) + _setter("host", host) + _setter("password", password) + _setter("username", username) @property @pulumi.getter(name="clientCertificate") @@ -10254,12 +13703,51 @@ def __init__(__self__, *, :param str password: A password or token used to authenticate to the Kubernetes cluster. :param str username: A username used to authenticate to the Kubernetes cluster. """ - pulumi.set(__self__, "client_certificate", client_certificate) - pulumi.set(__self__, "client_key", client_key) - pulumi.set(__self__, "cluster_ca_certificate", cluster_ca_certificate) - pulumi.set(__self__, "host", host) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + GetKubernetesClusterKubeConfigResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_certificate=client_certificate, + client_key=client_key, + cluster_ca_certificate=cluster_ca_certificate, + host=host, + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_certificate: Optional[str] = None, + client_key: Optional[str] = None, + cluster_ca_certificate: Optional[str] = None, + host: Optional[str] = None, + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_certificate is None and 'clientCertificate' in kwargs: + client_certificate = kwargs['clientCertificate'] + if client_certificate is None: + raise TypeError("Missing 'client_certificate' argument") + if client_key is None and 'clientKey' in kwargs: + client_key = kwargs['clientKey'] + if client_key is None: + raise TypeError("Missing 'client_key' argument") + if cluster_ca_certificate is None and 'clusterCaCertificate' in kwargs: + cluster_ca_certificate = kwargs['clusterCaCertificate'] + if cluster_ca_certificate is None: + raise TypeError("Missing 'cluster_ca_certificate' argument") + if host is None: + raise TypeError("Missing 'host' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("client_certificate", client_certificate) + _setter("client_key", client_key) + _setter("cluster_ca_certificate", cluster_ca_certificate) + _setter("host", host) + _setter("password", password) + _setter("username", username) @property @pulumi.getter(name="clientCertificate") @@ -10321,9 +13809,36 @@ def __init__(__self__, *, :param str object_id: The Object ID of the user-defined Managed Identity assigned to the Kubelets. :param str user_assigned_identity_id: The ID of the User Assigned Identity assigned to the Kubelets. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + GetKubernetesClusterKubeletIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + object_id: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_assigned_identity_id is None: + raise TypeError("Missing 'user_assigned_identity_id' argument") + + _setter("client_id", client_id) + _setter("object_id", object_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -10359,8 +13874,29 @@ def __init__(__self__, *, :param str admin_username: The username associated with the administrator account of the Windows VMs. :param Sequence['GetKubernetesClusterLinuxProfileSshKeyArgs'] ssh_keys: An `ssh_key` block as defined below. """ - pulumi.set(__self__, "admin_username", admin_username) - pulumi.set(__self__, "ssh_keys", ssh_keys) + GetKubernetesClusterLinuxProfileResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + ssh_keys=ssh_keys, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[str] = None, + ssh_keys: Optional[Sequence['outputs.GetKubernetesClusterLinuxProfileSshKeyResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if ssh_keys is None: + raise TypeError("Missing 'ssh_keys' argument") + + _setter("admin_username", admin_username) + _setter("ssh_keys", ssh_keys) @property @pulumi.getter(name="adminUsername") @@ -10386,7 +13922,22 @@ def __init__(__self__, *, """ :param str key_data: The Public SSH Key used to access the cluster. """ - pulumi.set(__self__, "key_data", key_data) + GetKubernetesClusterLinuxProfileSshKeyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_data=key_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_data: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_data is None and 'keyData' in kwargs: + key_data = kwargs['keyData'] + if key_data is None: + raise TypeError("Missing 'key_data' argument") + + _setter("key_data", key_data) @property @pulumi.getter(name="keyData") @@ -10404,7 +13955,22 @@ def __init__(__self__, *, """ :param str log_analytics_workspace_id: The ID of the Log Analytics Workspace to which the OMS Agent should send data. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + GetKubernetesClusterMicrosoftDefenderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -10433,13 +13999,64 @@ def __init__(__self__, *, :param str pod_cidr: The CIDR used for pod IP addresses. :param str service_cidr: Network range used by the Kubernetes service. """ - pulumi.set(__self__, "dns_service_ip", dns_service_ip) - pulumi.set(__self__, "docker_bridge_cidr", docker_bridge_cidr) - pulumi.set(__self__, "load_balancer_sku", load_balancer_sku) - pulumi.set(__self__, "network_plugin", network_plugin) - pulumi.set(__self__, "network_policy", network_policy) - pulumi.set(__self__, "pod_cidr", pod_cidr) - pulumi.set(__self__, "service_cidr", service_cidr) + GetKubernetesClusterNetworkProfileResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_service_ip=dns_service_ip, + docker_bridge_cidr=docker_bridge_cidr, + load_balancer_sku=load_balancer_sku, + network_plugin=network_plugin, + network_policy=network_policy, + pod_cidr=pod_cidr, + service_cidr=service_cidr, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_service_ip: Optional[str] = None, + docker_bridge_cidr: Optional[str] = None, + load_balancer_sku: Optional[str] = None, + network_plugin: Optional[str] = None, + network_policy: Optional[str] = None, + pod_cidr: Optional[str] = None, + service_cidr: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_service_ip is None and 'dnsServiceIp' in kwargs: + dns_service_ip = kwargs['dnsServiceIp'] + if dns_service_ip is None: + raise TypeError("Missing 'dns_service_ip' argument") + if docker_bridge_cidr is None and 'dockerBridgeCidr' in kwargs: + docker_bridge_cidr = kwargs['dockerBridgeCidr'] + if docker_bridge_cidr is None: + raise TypeError("Missing 'docker_bridge_cidr' argument") + if load_balancer_sku is None and 'loadBalancerSku' in kwargs: + load_balancer_sku = kwargs['loadBalancerSku'] + if load_balancer_sku is None: + raise TypeError("Missing 'load_balancer_sku' argument") + if network_plugin is None and 'networkPlugin' in kwargs: + network_plugin = kwargs['networkPlugin'] + if network_plugin is None: + raise TypeError("Missing 'network_plugin' argument") + if network_policy is None and 'networkPolicy' in kwargs: + network_policy = kwargs['networkPolicy'] + if network_policy is None: + raise TypeError("Missing 'network_policy' argument") + if pod_cidr is None and 'podCidr' in kwargs: + pod_cidr = kwargs['podCidr'] + if pod_cidr is None: + raise TypeError("Missing 'pod_cidr' argument") + if service_cidr is None and 'serviceCidr' in kwargs: + service_cidr = kwargs['serviceCidr'] + if service_cidr is None: + raise TypeError("Missing 'service_cidr' argument") + + _setter("dns_service_ip", dns_service_ip) + _setter("docker_bridge_cidr", docker_bridge_cidr) + _setter("load_balancer_sku", load_balancer_sku) + _setter("network_plugin", network_plugin) + _setter("network_policy", network_policy) + _setter("pod_cidr", pod_cidr) + _setter("service_cidr", service_cidr) @property @pulumi.getter(name="dnsServiceIp") @@ -10506,9 +14123,36 @@ def __init__(__self__, *, :param bool msi_auth_for_monitoring_enabled: Is managed identity authentication for monitoring enabled? :param Sequence['GetKubernetesClusterOmsAgentOmsAgentIdentityArgs'] oms_agent_identities: An `oms_agent_identity` block as defined below. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "msi_auth_for_monitoring_enabled", msi_auth_for_monitoring_enabled) - pulumi.set(__self__, "oms_agent_identities", oms_agent_identities) + GetKubernetesClusterOmsAgentResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + msi_auth_for_monitoring_enabled=msi_auth_for_monitoring_enabled, + oms_agent_identities=oms_agent_identities, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + msi_auth_for_monitoring_enabled: Optional[bool] = None, + oms_agent_identities: Optional[Sequence['outputs.GetKubernetesClusterOmsAgentOmsAgentIdentityResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if msi_auth_for_monitoring_enabled is None and 'msiAuthForMonitoringEnabled' in kwargs: + msi_auth_for_monitoring_enabled = kwargs['msiAuthForMonitoringEnabled'] + if msi_auth_for_monitoring_enabled is None: + raise TypeError("Missing 'msi_auth_for_monitoring_enabled' argument") + if oms_agent_identities is None and 'omsAgentIdentities' in kwargs: + oms_agent_identities = kwargs['omsAgentIdentities'] + if oms_agent_identities is None: + raise TypeError("Missing 'oms_agent_identities' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("msi_auth_for_monitoring_enabled", msi_auth_for_monitoring_enabled) + _setter("oms_agent_identities", oms_agent_identities) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -10546,9 +14190,36 @@ def __init__(__self__, *, :param str object_id: The Object ID of the user-defined Managed Identity assigned to the Kubelets. :param str user_assigned_identity_id: The ID of the User Assigned Identity assigned to the Kubelets. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + GetKubernetesClusterOmsAgentOmsAgentIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + object_id=object_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + object_id: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_assigned_identity_id is None: + raise TypeError("Missing 'user_assigned_identity_id' argument") + + _setter("client_id", client_id) + _setter("object_id", object_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="clientId") @@ -10586,9 +14257,34 @@ def __init__(__self__, *, :param bool internal_ingress_gateway_enabled: Is Istio Internal Ingress Gateway enabled? :param str mode: The mode of the service mesh. """ - pulumi.set(__self__, "external_ingress_gateway_enabled", external_ingress_gateway_enabled) - pulumi.set(__self__, "internal_ingress_gateway_enabled", internal_ingress_gateway_enabled) - pulumi.set(__self__, "mode", mode) + GetKubernetesClusterServiceMeshProfileResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + external_ingress_gateway_enabled=external_ingress_gateway_enabled, + internal_ingress_gateway_enabled=internal_ingress_gateway_enabled, + mode=mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + external_ingress_gateway_enabled: Optional[bool] = None, + internal_ingress_gateway_enabled: Optional[bool] = None, + mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if external_ingress_gateway_enabled is None and 'externalIngressGatewayEnabled' in kwargs: + external_ingress_gateway_enabled = kwargs['externalIngressGatewayEnabled'] + if external_ingress_gateway_enabled is None: + raise TypeError("Missing 'external_ingress_gateway_enabled' argument") + if internal_ingress_gateway_enabled is None and 'internalIngressGatewayEnabled' in kwargs: + internal_ingress_gateway_enabled = kwargs['internalIngressGatewayEnabled'] + if internal_ingress_gateway_enabled is None: + raise TypeError("Missing 'internal_ingress_gateway_enabled' argument") + if mode is None: + raise TypeError("Missing 'mode' argument") + + _setter("external_ingress_gateway_enabled", external_ingress_gateway_enabled) + _setter("internal_ingress_gateway_enabled", internal_ingress_gateway_enabled) + _setter("mode", mode) @property @pulumi.getter(name="externalIngressGatewayEnabled") @@ -10622,7 +14318,22 @@ def __init__(__self__, *, """ :param str client_id: The Client ID of the user-defined Managed Identity assigned to the Kubelets. """ - pulumi.set(__self__, "client_id", client_id) + GetKubernetesClusterServicePrincipalResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + + _setter("client_id", client_id) @property @pulumi.getter(name="clientId") @@ -10648,11 +14359,50 @@ def __init__(__self__, *, :param bool file_driver_enabled: Is the File CSI driver enabled? :param bool snapshot_controller_enabled: Is the Snapshot Controller enabled? """ - pulumi.set(__self__, "blob_driver_enabled", blob_driver_enabled) - pulumi.set(__self__, "disk_driver_enabled", disk_driver_enabled) - pulumi.set(__self__, "disk_driver_version", disk_driver_version) - pulumi.set(__self__, "file_driver_enabled", file_driver_enabled) - pulumi.set(__self__, "snapshot_controller_enabled", snapshot_controller_enabled) + GetKubernetesClusterStorageProfileResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_driver_enabled=blob_driver_enabled, + disk_driver_enabled=disk_driver_enabled, + disk_driver_version=disk_driver_version, + file_driver_enabled=file_driver_enabled, + snapshot_controller_enabled=snapshot_controller_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_driver_enabled: Optional[bool] = None, + disk_driver_enabled: Optional[bool] = None, + disk_driver_version: Optional[str] = None, + file_driver_enabled: Optional[bool] = None, + snapshot_controller_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_driver_enabled is None and 'blobDriverEnabled' in kwargs: + blob_driver_enabled = kwargs['blobDriverEnabled'] + if blob_driver_enabled is None: + raise TypeError("Missing 'blob_driver_enabled' argument") + if disk_driver_enabled is None and 'diskDriverEnabled' in kwargs: + disk_driver_enabled = kwargs['diskDriverEnabled'] + if disk_driver_enabled is None: + raise TypeError("Missing 'disk_driver_enabled' argument") + if disk_driver_version is None and 'diskDriverVersion' in kwargs: + disk_driver_version = kwargs['diskDriverVersion'] + if disk_driver_version is None: + raise TypeError("Missing 'disk_driver_version' argument") + if file_driver_enabled is None and 'fileDriverEnabled' in kwargs: + file_driver_enabled = kwargs['fileDriverEnabled'] + if file_driver_enabled is None: + raise TypeError("Missing 'file_driver_enabled' argument") + if snapshot_controller_enabled is None and 'snapshotControllerEnabled' in kwargs: + snapshot_controller_enabled = kwargs['snapshotControllerEnabled'] + if snapshot_controller_enabled is None: + raise TypeError("Missing 'snapshot_controller_enabled' argument") + + _setter("blob_driver_enabled", blob_driver_enabled) + _setter("disk_driver_enabled", disk_driver_enabled) + _setter("disk_driver_version", disk_driver_version) + _setter("file_driver_enabled", file_driver_enabled) + _setter("snapshot_controller_enabled", snapshot_controller_enabled) @property @pulumi.getter(name="blobDriverEnabled") @@ -10702,7 +14452,22 @@ def __init__(__self__, *, """ :param str admin_username: The username associated with the administrator account of the Windows VMs. """ - pulumi.set(__self__, "admin_username", admin_username) + GetKubernetesClusterWindowsProfileResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + + _setter("admin_username", admin_username) @property @pulumi.getter(name="adminUsername") diff --git a/sdk/python/pulumi_azure/containerservice/registry.py b/sdk/python/pulumi_azure/containerservice/registry.py index cdb7f3eb31..ab10b8a3bc 100644 --- a/sdk/python/pulumi_azure/containerservice/registry.py +++ b/sdk/python/pulumi_azure/containerservice/registry.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -65,42 +65,117 @@ def __init__(__self__, *, :param pulumi.Input['RegistryTrustPolicyArgs'] trust_policy: A `trust_policy` block as documented below. :param pulumi.Input[bool] zone_redundancy_enabled: Whether zone redundancy is enabled for this Container Registry? Changing this forces a new resource to be created. Defaults to `false`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + RegistryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + admin_enabled=admin_enabled, + anonymous_pull_enabled=anonymous_pull_enabled, + data_endpoint_enabled=data_endpoint_enabled, + encryption=encryption, + export_policy_enabled=export_policy_enabled, + georeplications=georeplications, + identity=identity, + location=location, + name=name, + network_rule_bypass_option=network_rule_bypass_option, + network_rule_set=network_rule_set, + public_network_access_enabled=public_network_access_enabled, + quarantine_policy_enabled=quarantine_policy_enabled, + retention_policy=retention_policy, + tags=tags, + trust_policy=trust_policy, + zone_redundancy_enabled=zone_redundancy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + admin_enabled: Optional[pulumi.Input[bool]] = None, + anonymous_pull_enabled: Optional[pulumi.Input[bool]] = None, + data_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + encryption: Optional[pulumi.Input['RegistryEncryptionArgs']] = None, + export_policy_enabled: Optional[pulumi.Input[bool]] = None, + georeplications: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryGeoreplicationArgs']]]] = None, + identity: Optional[pulumi.Input['RegistryIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_rule_bypass_option: Optional[pulumi.Input[str]] = None, + network_rule_set: Optional[pulumi.Input['RegistryNetworkRuleSetArgs']] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + quarantine_policy_enabled: Optional[pulumi.Input[bool]] = None, + retention_policy: Optional[pulumi.Input['RegistryRetentionPolicyArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + trust_policy: Optional[pulumi.Input['RegistryTrustPolicyArgs']] = None, + zone_redundancy_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if admin_enabled is None and 'adminEnabled' in kwargs: + admin_enabled = kwargs['adminEnabled'] + if anonymous_pull_enabled is None and 'anonymousPullEnabled' in kwargs: + anonymous_pull_enabled = kwargs['anonymousPullEnabled'] + if data_endpoint_enabled is None and 'dataEndpointEnabled' in kwargs: + data_endpoint_enabled = kwargs['dataEndpointEnabled'] + if export_policy_enabled is None and 'exportPolicyEnabled' in kwargs: + export_policy_enabled = kwargs['exportPolicyEnabled'] + if network_rule_bypass_option is None and 'networkRuleBypassOption' in kwargs: + network_rule_bypass_option = kwargs['networkRuleBypassOption'] + if network_rule_set is None and 'networkRuleSet' in kwargs: + network_rule_set = kwargs['networkRuleSet'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if quarantine_policy_enabled is None and 'quarantinePolicyEnabled' in kwargs: + quarantine_policy_enabled = kwargs['quarantinePolicyEnabled'] + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if trust_policy is None and 'trustPolicy' in kwargs: + trust_policy = kwargs['trustPolicy'] + if zone_redundancy_enabled is None and 'zoneRedundancyEnabled' in kwargs: + zone_redundancy_enabled = kwargs['zoneRedundancyEnabled'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if admin_enabled is not None: - pulumi.set(__self__, "admin_enabled", admin_enabled) + _setter("admin_enabled", admin_enabled) if anonymous_pull_enabled is not None: - pulumi.set(__self__, "anonymous_pull_enabled", anonymous_pull_enabled) + _setter("anonymous_pull_enabled", anonymous_pull_enabled) if data_endpoint_enabled is not None: - pulumi.set(__self__, "data_endpoint_enabled", data_endpoint_enabled) + _setter("data_endpoint_enabled", data_endpoint_enabled) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if export_policy_enabled is not None: - pulumi.set(__self__, "export_policy_enabled", export_policy_enabled) + _setter("export_policy_enabled", export_policy_enabled) if georeplications is not None: - pulumi.set(__self__, "georeplications", georeplications) + _setter("georeplications", georeplications) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_rule_bypass_option is not None: - pulumi.set(__self__, "network_rule_bypass_option", network_rule_bypass_option) + _setter("network_rule_bypass_option", network_rule_bypass_option) if network_rule_set is not None: - pulumi.set(__self__, "network_rule_set", network_rule_set) + _setter("network_rule_set", network_rule_set) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if quarantine_policy_enabled is not None: - pulumi.set(__self__, "quarantine_policy_enabled", quarantine_policy_enabled) + _setter("quarantine_policy_enabled", quarantine_policy_enabled) if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if trust_policy is not None: - pulumi.set(__self__, "trust_policy", trust_policy) + _setter("trust_policy", trust_policy) if zone_redundancy_enabled is not None: - pulumi.set(__self__, "zone_redundancy_enabled", zone_redundancy_enabled) + _setter("zone_redundancy_enabled", zone_redundancy_enabled) @property @pulumi.getter(name="resourceGroupName") @@ -397,50 +472,133 @@ def __init__(__self__, *, :param pulumi.Input['RegistryTrustPolicyArgs'] trust_policy: A `trust_policy` block as documented below. :param pulumi.Input[bool] zone_redundancy_enabled: Whether zone redundancy is enabled for this Container Registry? Changing this forces a new resource to be created. Defaults to `false`. """ + _RegistryState._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_enabled=admin_enabled, + admin_password=admin_password, + admin_username=admin_username, + anonymous_pull_enabled=anonymous_pull_enabled, + data_endpoint_enabled=data_endpoint_enabled, + encryption=encryption, + export_policy_enabled=export_policy_enabled, + georeplications=georeplications, + identity=identity, + location=location, + login_server=login_server, + name=name, + network_rule_bypass_option=network_rule_bypass_option, + network_rule_set=network_rule_set, + public_network_access_enabled=public_network_access_enabled, + quarantine_policy_enabled=quarantine_policy_enabled, + resource_group_name=resource_group_name, + retention_policy=retention_policy, + sku=sku, + tags=tags, + trust_policy=trust_policy, + zone_redundancy_enabled=zone_redundancy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_enabled: Optional[pulumi.Input[bool]] = None, + admin_password: Optional[pulumi.Input[str]] = None, + admin_username: Optional[pulumi.Input[str]] = None, + anonymous_pull_enabled: Optional[pulumi.Input[bool]] = None, + data_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + encryption: Optional[pulumi.Input['RegistryEncryptionArgs']] = None, + export_policy_enabled: Optional[pulumi.Input[bool]] = None, + georeplications: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryGeoreplicationArgs']]]] = None, + identity: Optional[pulumi.Input['RegistryIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + login_server: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_rule_bypass_option: Optional[pulumi.Input[str]] = None, + network_rule_set: Optional[pulumi.Input['RegistryNetworkRuleSetArgs']] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + quarantine_policy_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_policy: Optional[pulumi.Input['RegistryRetentionPolicyArgs']] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + trust_policy: Optional[pulumi.Input['RegistryTrustPolicyArgs']] = None, + zone_redundancy_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_enabled is None and 'adminEnabled' in kwargs: + admin_enabled = kwargs['adminEnabled'] + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if anonymous_pull_enabled is None and 'anonymousPullEnabled' in kwargs: + anonymous_pull_enabled = kwargs['anonymousPullEnabled'] + if data_endpoint_enabled is None and 'dataEndpointEnabled' in kwargs: + data_endpoint_enabled = kwargs['dataEndpointEnabled'] + if export_policy_enabled is None and 'exportPolicyEnabled' in kwargs: + export_policy_enabled = kwargs['exportPolicyEnabled'] + if login_server is None and 'loginServer' in kwargs: + login_server = kwargs['loginServer'] + if network_rule_bypass_option is None and 'networkRuleBypassOption' in kwargs: + network_rule_bypass_option = kwargs['networkRuleBypassOption'] + if network_rule_set is None and 'networkRuleSet' in kwargs: + network_rule_set = kwargs['networkRuleSet'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if quarantine_policy_enabled is None and 'quarantinePolicyEnabled' in kwargs: + quarantine_policy_enabled = kwargs['quarantinePolicyEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if trust_policy is None and 'trustPolicy' in kwargs: + trust_policy = kwargs['trustPolicy'] + if zone_redundancy_enabled is None and 'zoneRedundancyEnabled' in kwargs: + zone_redundancy_enabled = kwargs['zoneRedundancyEnabled'] + if admin_enabled is not None: - pulumi.set(__self__, "admin_enabled", admin_enabled) + _setter("admin_enabled", admin_enabled) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if admin_username is not None: - pulumi.set(__self__, "admin_username", admin_username) + _setter("admin_username", admin_username) if anonymous_pull_enabled is not None: - pulumi.set(__self__, "anonymous_pull_enabled", anonymous_pull_enabled) + _setter("anonymous_pull_enabled", anonymous_pull_enabled) if data_endpoint_enabled is not None: - pulumi.set(__self__, "data_endpoint_enabled", data_endpoint_enabled) + _setter("data_endpoint_enabled", data_endpoint_enabled) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if export_policy_enabled is not None: - pulumi.set(__self__, "export_policy_enabled", export_policy_enabled) + _setter("export_policy_enabled", export_policy_enabled) if georeplications is not None: - pulumi.set(__self__, "georeplications", georeplications) + _setter("georeplications", georeplications) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if login_server is not None: - pulumi.set(__self__, "login_server", login_server) + _setter("login_server", login_server) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_rule_bypass_option is not None: - pulumi.set(__self__, "network_rule_bypass_option", network_rule_bypass_option) + _setter("network_rule_bypass_option", network_rule_bypass_option) if network_rule_set is not None: - pulumi.set(__self__, "network_rule_set", network_rule_set) + _setter("network_rule_set", network_rule_set) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if quarantine_policy_enabled is not None: - pulumi.set(__self__, "quarantine_policy_enabled", quarantine_policy_enabled) + _setter("quarantine_policy_enabled", quarantine_policy_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if trust_policy is not None: - pulumi.set(__self__, "trust_policy", trust_policy) + _setter("trust_policy", trust_policy) if zone_redundancy_enabled is not None: - pulumi.set(__self__, "zone_redundancy_enabled", zone_redundancy_enabled) + _setter("zone_redundancy_enabled", zone_redundancy_enabled) @property @pulumi.getter(name="adminEnabled") @@ -976,6 +1134,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RegistryArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1012,24 +1174,49 @@ def _internal_init(__self__, __props__.__dict__["admin_enabled"] = admin_enabled __props__.__dict__["anonymous_pull_enabled"] = anonymous_pull_enabled __props__.__dict__["data_endpoint_enabled"] = data_endpoint_enabled + if encryption is not None and not isinstance(encryption, RegistryEncryptionArgs): + encryption = encryption or {} + def _setter(key, value): + encryption[key] = value + RegistryEncryptionArgs._configure(_setter, **encryption) __props__.__dict__["encryption"] = encryption __props__.__dict__["export_policy_enabled"] = export_policy_enabled __props__.__dict__["georeplications"] = georeplications + if identity is not None and not isinstance(identity, RegistryIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + RegistryIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name __props__.__dict__["network_rule_bypass_option"] = network_rule_bypass_option + if network_rule_set is not None and not isinstance(network_rule_set, RegistryNetworkRuleSetArgs): + network_rule_set = network_rule_set or {} + def _setter(key, value): + network_rule_set[key] = value + RegistryNetworkRuleSetArgs._configure(_setter, **network_rule_set) __props__.__dict__["network_rule_set"] = network_rule_set __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled __props__.__dict__["quarantine_policy_enabled"] = quarantine_policy_enabled if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if retention_policy is not None and not isinstance(retention_policy, RegistryRetentionPolicyArgs): + retention_policy = retention_policy or {} + def _setter(key, value): + retention_policy[key] = value + RegistryRetentionPolicyArgs._configure(_setter, **retention_policy) __props__.__dict__["retention_policy"] = retention_policy if sku is None and not opts.urn: raise TypeError("Missing required property 'sku'") __props__.__dict__["sku"] = sku __props__.__dict__["tags"] = tags + if trust_policy is not None and not isinstance(trust_policy, RegistryTrustPolicyArgs): + trust_policy = trust_policy or {} + def _setter(key, value): + trust_policy[key] = value + RegistryTrustPolicyArgs._configure(_setter, **trust_policy) __props__.__dict__["trust_policy"] = trust_policy __props__.__dict__["zone_redundancy_enabled"] = zone_redundancy_enabled __props__.__dict__["admin_password"] = None diff --git a/sdk/python/pulumi_azure/containerservice/registry_agent_pool.py b/sdk/python/pulumi_azure/containerservice/registry_agent_pool.py index 4d08e5d89b..c801f52425 100644 --- a/sdk/python/pulumi_azure/containerservice/registry_agent_pool.py +++ b/sdk/python/pulumi_azure/containerservice/registry_agent_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RegistryAgentPoolArgs', 'RegistryAgentPool'] @@ -33,20 +33,57 @@ def __init__(__self__, *, :param pulumi.Input[str] tier: Sets the VM your agent pool will run on. Valid values are: `S1` (2 vCPUs, 3 GiB RAM), `S2` (4 vCPUs, 8 GiB RAM), `S3` (8 vCPUs, 16 GiB RAM) or `I6` (64 vCPUs, 216 GiB RAM, Isolated). Defaults to `S1`. Changing this forces a new Azure Container Registry Agent Pool to be created. :param pulumi.Input[str] virtual_network_subnet_id: The ID of the Virtual Network Subnet Resource where the agent machines will be running. Changing this forces a new Azure Container Registry Agent Pool to be created. """ - pulumi.set(__self__, "container_registry_name", container_registry_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + RegistryAgentPoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_registry_name=container_registry_name, + resource_group_name=resource_group_name, + instance_count=instance_count, + location=location, + name=name, + tags=tags, + tier=tier, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_registry_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tier: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_registry_name is None and 'containerRegistryName' in kwargs: + container_registry_name = kwargs['containerRegistryName'] + if container_registry_name is None: + raise TypeError("Missing 'container_registry_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + + _setter("container_registry_name", container_registry_name) + _setter("resource_group_name", resource_group_name) if instance_count is not None: - pulumi.set(__self__, "instance_count", instance_count) + _setter("instance_count", instance_count) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter(name="containerRegistryName") @@ -167,22 +204,55 @@ def __init__(__self__, *, :param pulumi.Input[str] tier: Sets the VM your agent pool will run on. Valid values are: `S1` (2 vCPUs, 3 GiB RAM), `S2` (4 vCPUs, 8 GiB RAM), `S3` (8 vCPUs, 16 GiB RAM) or `I6` (64 vCPUs, 216 GiB RAM, Isolated). Defaults to `S1`. Changing this forces a new Azure Container Registry Agent Pool to be created. :param pulumi.Input[str] virtual_network_subnet_id: The ID of the Virtual Network Subnet Resource where the agent machines will be running. Changing this forces a new Azure Container Registry Agent Pool to be created. """ + _RegistryAgentPoolState._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_registry_name=container_registry_name, + instance_count=instance_count, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + tier=tier, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_registry_name: Optional[pulumi.Input[str]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tier: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_registry_name is None and 'containerRegistryName' in kwargs: + container_registry_name = kwargs['containerRegistryName'] + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if container_registry_name is not None: - pulumi.set(__self__, "container_registry_name", container_registry_name) + _setter("container_registry_name", container_registry_name) if instance_count is not None: - pulumi.set(__self__, "instance_count", instance_count) + _setter("instance_count", instance_count) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter(name="containerRegistryName") @@ -378,6 +448,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RegistryAgentPoolArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/containerservice/registry_scope_map.py b/sdk/python/pulumi_azure/containerservice/registry_scope_map.py index 3244c7ef6e..5d97bb1a48 100644 --- a/sdk/python/pulumi_azure/containerservice/registry_scope_map.py +++ b/sdk/python/pulumi_azure/containerservice/registry_scope_map.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RegistryScopeMapArgs', 'RegistryScopeMap'] @@ -27,13 +27,42 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the Container Registry. :param pulumi.Input[str] name: Specifies the name of the scope map. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "container_registry_name", container_registry_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + RegistryScopeMapArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + container_registry_name=container_registry_name, + resource_group_name=resource_group_name, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + container_registry_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if container_registry_name is None and 'containerRegistryName' in kwargs: + container_registry_name = kwargs['containerRegistryName'] + if container_registry_name is None: + raise TypeError("Missing 'container_registry_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("actions", actions) + _setter("container_registry_name", container_registry_name) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -112,16 +141,39 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the scope map. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created. """ + _RegistryScopeMapState._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + container_registry_name=container_registry_name, + description=description, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + container_registry_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_registry_name is None and 'containerRegistryName' in kwargs: + container_registry_name = kwargs['containerRegistryName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if container_registry_name is not None: - pulumi.set(__self__, "container_registry_name", container_registry_name) + _setter("container_registry_name", container_registry_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter @@ -295,6 +347,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RegistryScopeMapArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/containerservice/registry_task.py b/sdk/python/pulumi_azure/containerservice/registry_task.py index 966a1e1d2a..8c5a576ff3 100644 --- a/sdk/python/pulumi_azure/containerservice/registry_task.py +++ b/sdk/python/pulumi_azure/containerservice/registry_task.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,41 +59,114 @@ def __init__(__self__, *, :param pulumi.Input[int] timeout_in_seconds: The timeout of this Container Registry Task in seconds. The valid range lies from 300 to 28800. Defaults to `3600`. :param pulumi.Input[Sequence[pulumi.Input['RegistryTaskTimerTriggerArgs']]] timer_triggers: One or more `timer_trigger` blocks as defined below. """ - pulumi.set(__self__, "container_registry_id", container_registry_id) + RegistryTaskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_registry_id=container_registry_id, + agent_pool_name=agent_pool_name, + agent_setting=agent_setting, + base_image_trigger=base_image_trigger, + docker_step=docker_step, + enabled=enabled, + encoded_step=encoded_step, + file_step=file_step, + identity=identity, + is_system_task=is_system_task, + log_template=log_template, + name=name, + platform=platform, + registry_credential=registry_credential, + source_triggers=source_triggers, + tags=tags, + timeout_in_seconds=timeout_in_seconds, + timer_triggers=timer_triggers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_registry_id: Optional[pulumi.Input[str]] = None, + agent_pool_name: Optional[pulumi.Input[str]] = None, + agent_setting: Optional[pulumi.Input['RegistryTaskAgentSettingArgs']] = None, + base_image_trigger: Optional[pulumi.Input['RegistryTaskBaseImageTriggerArgs']] = None, + docker_step: Optional[pulumi.Input['RegistryTaskDockerStepArgs']] = None, + enabled: Optional[pulumi.Input[bool]] = None, + encoded_step: Optional[pulumi.Input['RegistryTaskEncodedStepArgs']] = None, + file_step: Optional[pulumi.Input['RegistryTaskFileStepArgs']] = None, + identity: Optional[pulumi.Input['RegistryTaskIdentityArgs']] = None, + is_system_task: Optional[pulumi.Input[bool]] = None, + log_template: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + platform: Optional[pulumi.Input['RegistryTaskPlatformArgs']] = None, + registry_credential: Optional[pulumi.Input['RegistryTaskRegistryCredentialArgs']] = None, + source_triggers: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryTaskSourceTriggerArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timeout_in_seconds: Optional[pulumi.Input[int]] = None, + timer_triggers: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryTaskTimerTriggerArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_registry_id is None and 'containerRegistryId' in kwargs: + container_registry_id = kwargs['containerRegistryId'] + if container_registry_id is None: + raise TypeError("Missing 'container_registry_id' argument") + if agent_pool_name is None and 'agentPoolName' in kwargs: + agent_pool_name = kwargs['agentPoolName'] + if agent_setting is None and 'agentSetting' in kwargs: + agent_setting = kwargs['agentSetting'] + if base_image_trigger is None and 'baseImageTrigger' in kwargs: + base_image_trigger = kwargs['baseImageTrigger'] + if docker_step is None and 'dockerStep' in kwargs: + docker_step = kwargs['dockerStep'] + if encoded_step is None and 'encodedStep' in kwargs: + encoded_step = kwargs['encodedStep'] + if file_step is None and 'fileStep' in kwargs: + file_step = kwargs['fileStep'] + if is_system_task is None and 'isSystemTask' in kwargs: + is_system_task = kwargs['isSystemTask'] + if log_template is None and 'logTemplate' in kwargs: + log_template = kwargs['logTemplate'] + if registry_credential is None and 'registryCredential' in kwargs: + registry_credential = kwargs['registryCredential'] + if source_triggers is None and 'sourceTriggers' in kwargs: + source_triggers = kwargs['sourceTriggers'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + if timer_triggers is None and 'timerTriggers' in kwargs: + timer_triggers = kwargs['timerTriggers'] + + _setter("container_registry_id", container_registry_id) if agent_pool_name is not None: - pulumi.set(__self__, "agent_pool_name", agent_pool_name) + _setter("agent_pool_name", agent_pool_name) if agent_setting is not None: - pulumi.set(__self__, "agent_setting", agent_setting) + _setter("agent_setting", agent_setting) if base_image_trigger is not None: - pulumi.set(__self__, "base_image_trigger", base_image_trigger) + _setter("base_image_trigger", base_image_trigger) if docker_step is not None: - pulumi.set(__self__, "docker_step", docker_step) + _setter("docker_step", docker_step) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if encoded_step is not None: - pulumi.set(__self__, "encoded_step", encoded_step) + _setter("encoded_step", encoded_step) if file_step is not None: - pulumi.set(__self__, "file_step", file_step) + _setter("file_step", file_step) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if is_system_task is not None: - pulumi.set(__self__, "is_system_task", is_system_task) + _setter("is_system_task", is_system_task) if log_template is not None: - pulumi.set(__self__, "log_template", log_template) + _setter("log_template", log_template) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if platform is not None: - pulumi.set(__self__, "platform", platform) + _setter("platform", platform) if registry_credential is not None: - pulumi.set(__self__, "registry_credential", registry_credential) + _setter("registry_credential", registry_credential) if source_triggers is not None: - pulumi.set(__self__, "source_triggers", source_triggers) + _setter("source_triggers", source_triggers) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) if timer_triggers is not None: - pulumi.set(__self__, "timer_triggers", timer_triggers) + _setter("timer_triggers", timer_triggers) @property @pulumi.getter(name="containerRegistryId") @@ -362,42 +435,113 @@ def __init__(__self__, *, :param pulumi.Input[int] timeout_in_seconds: The timeout of this Container Registry Task in seconds. The valid range lies from 300 to 28800. Defaults to `3600`. :param pulumi.Input[Sequence[pulumi.Input['RegistryTaskTimerTriggerArgs']]] timer_triggers: One or more `timer_trigger` blocks as defined below. """ + _RegistryTaskState._configure( + lambda key, value: pulumi.set(__self__, key, value), + agent_pool_name=agent_pool_name, + agent_setting=agent_setting, + base_image_trigger=base_image_trigger, + container_registry_id=container_registry_id, + docker_step=docker_step, + enabled=enabled, + encoded_step=encoded_step, + file_step=file_step, + identity=identity, + is_system_task=is_system_task, + log_template=log_template, + name=name, + platform=platform, + registry_credential=registry_credential, + source_triggers=source_triggers, + tags=tags, + timeout_in_seconds=timeout_in_seconds, + timer_triggers=timer_triggers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + agent_pool_name: Optional[pulumi.Input[str]] = None, + agent_setting: Optional[pulumi.Input['RegistryTaskAgentSettingArgs']] = None, + base_image_trigger: Optional[pulumi.Input['RegistryTaskBaseImageTriggerArgs']] = None, + container_registry_id: Optional[pulumi.Input[str]] = None, + docker_step: Optional[pulumi.Input['RegistryTaskDockerStepArgs']] = None, + enabled: Optional[pulumi.Input[bool]] = None, + encoded_step: Optional[pulumi.Input['RegistryTaskEncodedStepArgs']] = None, + file_step: Optional[pulumi.Input['RegistryTaskFileStepArgs']] = None, + identity: Optional[pulumi.Input['RegistryTaskIdentityArgs']] = None, + is_system_task: Optional[pulumi.Input[bool]] = None, + log_template: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + platform: Optional[pulumi.Input['RegistryTaskPlatformArgs']] = None, + registry_credential: Optional[pulumi.Input['RegistryTaskRegistryCredentialArgs']] = None, + source_triggers: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryTaskSourceTriggerArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timeout_in_seconds: Optional[pulumi.Input[int]] = None, + timer_triggers: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryTaskTimerTriggerArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if agent_pool_name is None and 'agentPoolName' in kwargs: + agent_pool_name = kwargs['agentPoolName'] + if agent_setting is None and 'agentSetting' in kwargs: + agent_setting = kwargs['agentSetting'] + if base_image_trigger is None and 'baseImageTrigger' in kwargs: + base_image_trigger = kwargs['baseImageTrigger'] + if container_registry_id is None and 'containerRegistryId' in kwargs: + container_registry_id = kwargs['containerRegistryId'] + if docker_step is None and 'dockerStep' in kwargs: + docker_step = kwargs['dockerStep'] + if encoded_step is None and 'encodedStep' in kwargs: + encoded_step = kwargs['encodedStep'] + if file_step is None and 'fileStep' in kwargs: + file_step = kwargs['fileStep'] + if is_system_task is None and 'isSystemTask' in kwargs: + is_system_task = kwargs['isSystemTask'] + if log_template is None and 'logTemplate' in kwargs: + log_template = kwargs['logTemplate'] + if registry_credential is None and 'registryCredential' in kwargs: + registry_credential = kwargs['registryCredential'] + if source_triggers is None and 'sourceTriggers' in kwargs: + source_triggers = kwargs['sourceTriggers'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + if timer_triggers is None and 'timerTriggers' in kwargs: + timer_triggers = kwargs['timerTriggers'] + if agent_pool_name is not None: - pulumi.set(__self__, "agent_pool_name", agent_pool_name) + _setter("agent_pool_name", agent_pool_name) if agent_setting is not None: - pulumi.set(__self__, "agent_setting", agent_setting) + _setter("agent_setting", agent_setting) if base_image_trigger is not None: - pulumi.set(__self__, "base_image_trigger", base_image_trigger) + _setter("base_image_trigger", base_image_trigger) if container_registry_id is not None: - pulumi.set(__self__, "container_registry_id", container_registry_id) + _setter("container_registry_id", container_registry_id) if docker_step is not None: - pulumi.set(__self__, "docker_step", docker_step) + _setter("docker_step", docker_step) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if encoded_step is not None: - pulumi.set(__self__, "encoded_step", encoded_step) + _setter("encoded_step", encoded_step) if file_step is not None: - pulumi.set(__self__, "file_step", file_step) + _setter("file_step", file_step) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if is_system_task is not None: - pulumi.set(__self__, "is_system_task", is_system_task) + _setter("is_system_task", is_system_task) if log_template is not None: - pulumi.set(__self__, "log_template", log_template) + _setter("log_template", log_template) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if platform is not None: - pulumi.set(__self__, "platform", platform) + _setter("platform", platform) if registry_credential is not None: - pulumi.set(__self__, "registry_credential", registry_credential) + _setter("registry_credential", registry_credential) if source_triggers is not None: - pulumi.set(__self__, "source_triggers", source_triggers) + _setter("source_triggers", source_triggers) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) if timer_triggers is not None: - pulumi.set(__self__, "timer_triggers", timer_triggers) + _setter("timer_triggers", timer_triggers) @property @pulumi.getter(name="agentPoolName") @@ -755,6 +899,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RegistryTaskArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -788,20 +936,60 @@ def _internal_init(__self__, __props__ = RegistryTaskArgs.__new__(RegistryTaskArgs) __props__.__dict__["agent_pool_name"] = agent_pool_name + if agent_setting is not None and not isinstance(agent_setting, RegistryTaskAgentSettingArgs): + agent_setting = agent_setting or {} + def _setter(key, value): + agent_setting[key] = value + RegistryTaskAgentSettingArgs._configure(_setter, **agent_setting) __props__.__dict__["agent_setting"] = agent_setting + if base_image_trigger is not None and not isinstance(base_image_trigger, RegistryTaskBaseImageTriggerArgs): + base_image_trigger = base_image_trigger or {} + def _setter(key, value): + base_image_trigger[key] = value + RegistryTaskBaseImageTriggerArgs._configure(_setter, **base_image_trigger) __props__.__dict__["base_image_trigger"] = base_image_trigger if container_registry_id is None and not opts.urn: raise TypeError("Missing required property 'container_registry_id'") __props__.__dict__["container_registry_id"] = container_registry_id + if docker_step is not None and not isinstance(docker_step, RegistryTaskDockerStepArgs): + docker_step = docker_step or {} + def _setter(key, value): + docker_step[key] = value + RegistryTaskDockerStepArgs._configure(_setter, **docker_step) __props__.__dict__["docker_step"] = docker_step __props__.__dict__["enabled"] = enabled + if encoded_step is not None and not isinstance(encoded_step, RegistryTaskEncodedStepArgs): + encoded_step = encoded_step or {} + def _setter(key, value): + encoded_step[key] = value + RegistryTaskEncodedStepArgs._configure(_setter, **encoded_step) __props__.__dict__["encoded_step"] = encoded_step + if file_step is not None and not isinstance(file_step, RegistryTaskFileStepArgs): + file_step = file_step or {} + def _setter(key, value): + file_step[key] = value + RegistryTaskFileStepArgs._configure(_setter, **file_step) __props__.__dict__["file_step"] = file_step + if identity is not None and not isinstance(identity, RegistryTaskIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + RegistryTaskIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["is_system_task"] = is_system_task __props__.__dict__["log_template"] = log_template __props__.__dict__["name"] = name + if platform is not None and not isinstance(platform, RegistryTaskPlatformArgs): + platform = platform or {} + def _setter(key, value): + platform[key] = value + RegistryTaskPlatformArgs._configure(_setter, **platform) __props__.__dict__["platform"] = platform + if registry_credential is not None and not isinstance(registry_credential, RegistryTaskRegistryCredentialArgs): + registry_credential = registry_credential or {} + def _setter(key, value): + registry_credential[key] = value + RegistryTaskRegistryCredentialArgs._configure(_setter, **registry_credential) __props__.__dict__["registry_credential"] = registry_credential __props__.__dict__["source_triggers"] = source_triggers __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/containerservice/registry_task_schedule_run_now.py b/sdk/python/pulumi_azure/containerservice/registry_task_schedule_run_now.py index 6913c5b816..3001d90989 100644 --- a/sdk/python/pulumi_azure/containerservice/registry_task_schedule_run_now.py +++ b/sdk/python/pulumi_azure/containerservice/registry_task_schedule_run_now.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RegistryTaskScheduleRunNowArgs', 'RegistryTaskScheduleRunNow'] @@ -19,7 +19,22 @@ def __init__(__self__, *, The set of arguments for constructing a RegistryTaskScheduleRunNow resource. :param pulumi.Input[str] container_registry_task_id: The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created. """ - pulumi.set(__self__, "container_registry_task_id", container_registry_task_id) + RegistryTaskScheduleRunNowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_registry_task_id=container_registry_task_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_registry_task_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_registry_task_id is None and 'containerRegistryTaskId' in kwargs: + container_registry_task_id = kwargs['containerRegistryTaskId'] + if container_registry_task_id is None: + raise TypeError("Missing 'container_registry_task_id' argument") + + _setter("container_registry_task_id", container_registry_task_id) @property @pulumi.getter(name="containerRegistryTaskId") @@ -42,8 +57,21 @@ def __init__(__self__, *, Input properties used for looking up and filtering RegistryTaskScheduleRunNow resources. :param pulumi.Input[str] container_registry_task_id: The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created. """ + _RegistryTaskScheduleRunNowState._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_registry_task_id=container_registry_task_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_registry_task_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_registry_task_id is None and 'containerRegistryTaskId' in kwargs: + container_registry_task_id = kwargs['containerRegistryTaskId'] + if container_registry_task_id is not None: - pulumi.set(__self__, "container_registry_task_id", container_registry_task_id) + _setter("container_registry_task_id", container_registry_task_id) @property @pulumi.getter(name="containerRegistryTaskId") @@ -141,6 +169,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RegistryTaskScheduleRunNowArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/containerservice/registry_token.py b/sdk/python/pulumi_azure/containerservice/registry_token.py index 9b20965951..e19345250b 100644 --- a/sdk/python/pulumi_azure/containerservice/registry_token.py +++ b/sdk/python/pulumi_azure/containerservice/registry_token.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RegistryTokenArgs', 'RegistryToken'] @@ -27,13 +27,44 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Should the Container Registry token be enabled? Defaults to `true`. :param pulumi.Input[str] name: Specifies the name of the token. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "container_registry_name", container_registry_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scope_map_id", scope_map_id) + RegistryTokenArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_registry_name=container_registry_name, + resource_group_name=resource_group_name, + scope_map_id=scope_map_id, + enabled=enabled, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_registry_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scope_map_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_registry_name is None and 'containerRegistryName' in kwargs: + container_registry_name = kwargs['containerRegistryName'] + if container_registry_name is None: + raise TypeError("Missing 'container_registry_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scope_map_id is None and 'scopeMapId' in kwargs: + scope_map_id = kwargs['scopeMapId'] + if scope_map_id is None: + raise TypeError("Missing 'scope_map_id' argument") + + _setter("container_registry_name", container_registry_name) + _setter("resource_group_name", resource_group_name) + _setter("scope_map_id", scope_map_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="containerRegistryName") @@ -112,16 +143,41 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created. :param pulumi.Input[str] scope_map_id: The ID of the Container Registry Scope Map associated with the token. """ + _RegistryTokenState._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_registry_name=container_registry_name, + enabled=enabled, + name=name, + resource_group_name=resource_group_name, + scope_map_id=scope_map_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_registry_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scope_map_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_registry_name is None and 'containerRegistryName' in kwargs: + container_registry_name = kwargs['containerRegistryName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if scope_map_id is None and 'scopeMapId' in kwargs: + scope_map_id = kwargs['scopeMapId'] + if container_registry_name is not None: - pulumi.set(__self__, "container_registry_name", container_registry_name) + _setter("container_registry_name", container_registry_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scope_map_id is not None: - pulumi.set(__self__, "scope_map_id", scope_map_id) + _setter("scope_map_id", scope_map_id) @property @pulumi.getter(name="containerRegistryName") @@ -303,6 +359,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RegistryTokenArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/containerservice/registry_webhook.py b/sdk/python/pulumi_azure/containerservice/registry_webhook.py index f7536e5977..9f18fbd5f5 100644 --- a/sdk/python/pulumi_azure/containerservice/registry_webhook.py +++ b/sdk/python/pulumi_azure/containerservice/registry_webhook.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RegistryWebhookArgs', 'RegistryWebhook'] @@ -37,22 +37,67 @@ def __init__(__self__, *, :param pulumi.Input[str] status: Specifies if this Webhook triggers notifications or not. Valid values: `enabled` and `disabled`. Default is `enabled`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "registry_name", registry_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "service_uri", service_uri) + RegistryWebhookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + registry_name=registry_name, + resource_group_name=resource_group_name, + service_uri=service_uri, + custom_headers=custom_headers, + location=location, + name=name, + scope=scope, + status=status, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + registry_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_uri: Optional[pulumi.Input[str]] = None, + custom_headers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if registry_name is None and 'registryName' in kwargs: + registry_name = kwargs['registryName'] + if registry_name is None: + raise TypeError("Missing 'registry_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if service_uri is None and 'serviceUri' in kwargs: + service_uri = kwargs['serviceUri'] + if service_uri is None: + raise TypeError("Missing 'service_uri' argument") + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + + _setter("actions", actions) + _setter("registry_name", registry_name) + _setter("resource_group_name", resource_group_name) + _setter("service_uri", service_uri) if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -201,26 +246,63 @@ def __init__(__self__, *, :param pulumi.Input[str] status: Specifies if this Webhook triggers notifications or not. Valid values: `enabled` and `disabled`. Default is `enabled`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _RegistryWebhookState._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + custom_headers=custom_headers, + location=location, + name=name, + registry_name=registry_name, + resource_group_name=resource_group_name, + scope=scope, + service_uri=service_uri, + status=status, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + custom_headers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + registry_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + service_uri: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + if registry_name is None and 'registryName' in kwargs: + registry_name = kwargs['registryName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_uri is None and 'serviceUri' in kwargs: + service_uri = kwargs['serviceUri'] + if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if registry_name is not None: - pulumi.set(__self__, "registry_name", registry_name) + _setter("registry_name", registry_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if service_uri is not None: - pulumi.set(__self__, "service_uri", service_uri) + _setter("service_uri", service_uri) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -460,6 +542,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RegistryWebhookArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/containerservice/registry_webook.py b/sdk/python/pulumi_azure/containerservice/registry_webook.py index 99025cbd09..56aa2528ed 100644 --- a/sdk/python/pulumi_azure/containerservice/registry_webook.py +++ b/sdk/python/pulumi_azure/containerservice/registry_webook.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RegistryWebookArgs', 'RegistryWebook'] @@ -37,22 +37,67 @@ def __init__(__self__, *, :param pulumi.Input[str] status: Specifies if this Webhook triggers notifications or not. Valid values: `enabled` and `disabled`. Default is `enabled`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "registry_name", registry_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "service_uri", service_uri) + RegistryWebookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + registry_name=registry_name, + resource_group_name=resource_group_name, + service_uri=service_uri, + custom_headers=custom_headers, + location=location, + name=name, + scope=scope, + status=status, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + registry_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_uri: Optional[pulumi.Input[str]] = None, + custom_headers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if registry_name is None and 'registryName' in kwargs: + registry_name = kwargs['registryName'] + if registry_name is None: + raise TypeError("Missing 'registry_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if service_uri is None and 'serviceUri' in kwargs: + service_uri = kwargs['serviceUri'] + if service_uri is None: + raise TypeError("Missing 'service_uri' argument") + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + + _setter("actions", actions) + _setter("registry_name", registry_name) + _setter("resource_group_name", resource_group_name) + _setter("service_uri", service_uri) if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -201,26 +246,63 @@ def __init__(__self__, *, :param pulumi.Input[str] status: Specifies if this Webhook triggers notifications or not. Valid values: `enabled` and `disabled`. Default is `enabled`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _RegistryWebookState._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + custom_headers=custom_headers, + location=location, + name=name, + registry_name=registry_name, + resource_group_name=resource_group_name, + scope=scope, + service_uri=service_uri, + status=status, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + custom_headers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + registry_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + service_uri: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + if registry_name is None and 'registryName' in kwargs: + registry_name = kwargs['registryName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_uri is None and 'serviceUri' in kwargs: + service_uri = kwargs['serviceUri'] + if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if registry_name is not None: - pulumi.set(__self__, "registry_name", registry_name) + _setter("registry_name", registry_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if service_uri is not None: - pulumi.set(__self__, "service_uri", service_uri) + _setter("service_uri", service_uri) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -465,6 +547,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RegistryWebookArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/containerservice/token_password.py b/sdk/python/pulumi_azure/containerservice/token_password.py index a1fab30254..dc941304a2 100644 --- a/sdk/python/pulumi_azure/containerservice/token_password.py +++ b/sdk/python/pulumi_azure/containerservice/token_password.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -25,10 +25,31 @@ def __init__(__self__, *, :param pulumi.Input['TokenPasswordPassword1Args'] password1: One `password` block as defined below. :param pulumi.Input['TokenPasswordPassword2Args'] password2: One `password` block as defined below. """ - pulumi.set(__self__, "container_registry_token_id", container_registry_token_id) - pulumi.set(__self__, "password1", password1) + TokenPasswordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_registry_token_id=container_registry_token_id, + password1=password1, + password2=password2, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_registry_token_id: Optional[pulumi.Input[str]] = None, + password1: Optional[pulumi.Input['TokenPasswordPassword1Args']] = None, + password2: Optional[pulumi.Input['TokenPasswordPassword2Args']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_registry_token_id is None and 'containerRegistryTokenId' in kwargs: + container_registry_token_id = kwargs['containerRegistryTokenId'] + if container_registry_token_id is None: + raise TypeError("Missing 'container_registry_token_id' argument") + if password1 is None: + raise TypeError("Missing 'password1' argument") + + _setter("container_registry_token_id", container_registry_token_id) + _setter("password1", password1) if password2 is not None: - pulumi.set(__self__, "password2", password2) + _setter("password2", password2) @property @pulumi.getter(name="containerRegistryTokenId") @@ -79,12 +100,29 @@ def __init__(__self__, *, :param pulumi.Input['TokenPasswordPassword1Args'] password1: One `password` block as defined below. :param pulumi.Input['TokenPasswordPassword2Args'] password2: One `password` block as defined below. """ + _TokenPasswordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_registry_token_id=container_registry_token_id, + password1=password1, + password2=password2, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_registry_token_id: Optional[pulumi.Input[str]] = None, + password1: Optional[pulumi.Input['TokenPasswordPassword1Args']] = None, + password2: Optional[pulumi.Input['TokenPasswordPassword2Args']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_registry_token_id is None and 'containerRegistryTokenId' in kwargs: + container_registry_token_id = kwargs['containerRegistryTokenId'] + if container_registry_token_id is not None: - pulumi.set(__self__, "container_registry_token_id", container_registry_token_id) + _setter("container_registry_token_id", container_registry_token_id) if password1 is not None: - pulumi.set(__self__, "password1", password1) + _setter("password1", password1) if password2 is not None: - pulumi.set(__self__, "password2", password2) + _setter("password2", password2) @property @pulumi.getter(name="containerRegistryTokenId") @@ -176,6 +214,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TokenPasswordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -196,9 +238,19 @@ def _internal_init(__self__, if container_registry_token_id is None and not opts.urn: raise TypeError("Missing required property 'container_registry_token_id'") __props__.__dict__["container_registry_token_id"] = container_registry_token_id + if password1 is not None and not isinstance(password1, TokenPasswordPassword1Args): + password1 = password1 or {} + def _setter(key, value): + password1[key] = value + TokenPasswordPassword1Args._configure(_setter, **password1) if password1 is None and not opts.urn: raise TypeError("Missing required property 'password1'") __props__.__dict__["password1"] = password1 + if password2 is not None and not isinstance(password2, TokenPasswordPassword2Args): + password2 = password2 or {} + def _setter(key, value): + password2[key] = value + TokenPasswordPassword2Args._configure(_setter, **password2) __props__.__dict__["password2"] = password2 super(TokenPassword, __self__).__init__( 'azure:containerservice/tokenPassword:TokenPassword', diff --git a/sdk/python/pulumi_azure/core/_inputs.py b/sdk/python/pulumi_azure/core/_inputs.py index 1934d397f9..bcd52837bd 100644 --- a/sdk/python/pulumi_azure/core/_inputs.py +++ b/sdk/python/pulumi_azure/core/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -67,8 +67,25 @@ def __init__(__self__, *, :param pulumi.Input[str] endpoint: Specifies the endpoint of the action. :param pulumi.Input[str] name: Specifies the name of the action. """ - pulumi.set(__self__, "endpoint", endpoint) - pulumi.set(__self__, "name", name) + CustomProviderActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint=endpoint, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint is None: + raise TypeError("Missing 'endpoint' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("endpoint", endpoint) + _setter("name", name) @property @pulumi.getter @@ -106,10 +123,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the route definition. :param pulumi.Input[str] routing_type: The routing type that is supported for the resource request. Valid values are `Proxy` and `Proxy,Cache`. This value defaults to `ResourceTypeRoutingProxy`. """ - pulumi.set(__self__, "endpoint", endpoint) - pulumi.set(__self__, "name", name) + CustomProviderResourceTypeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint=endpoint, + name=name, + routing_type=routing_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + routing_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint is None: + raise TypeError("Missing 'endpoint' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if routing_type is None and 'routingType' in kwargs: + routing_type = kwargs['routingType'] + + _setter("endpoint", endpoint) + _setter("name", name) if routing_type is not None: - pulumi.set(__self__, "routing_type", routing_type) + _setter("routing_type", routing_type) @property @pulumi.getter @@ -155,7 +193,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] specification: The endpoint where the validation specification is located. """ - pulumi.set(__self__, "specification", specification) + CustomProviderValidationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + specification=specification, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + specification: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if specification is None: + raise TypeError("Missing 'specification' argument") + + _setter("specification", specification) @property @pulumi.getter @@ -177,8 +228,21 @@ def __init__(__self__, *, """ :param pulumi.Input[str] container_group_name: Container group name, if not specified then the name will get auto-generated. For more information, please refer to the [Container Configuration](https://learn.microsoft.com/en-us/rest/api/resources/deployment-scripts/create?tabs=HTTP#containerconfiguration) documentation. """ + ResourceDeploymentScriptAzureCliContainerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_group_name=container_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_group_name is None and 'containerGroupName' in kwargs: + container_group_name = kwargs['containerGroupName'] + if container_group_name is not None: - pulumi.set(__self__, "container_group_name", container_group_name) + _setter("container_group_name", container_group_name) @property @pulumi.getter(name="containerGroupName") @@ -204,11 +268,30 @@ def __init__(__self__, *, :param pulumi.Input[str] secure_value: Specifies the value of the secure environment variable. :param pulumi.Input[str] value: Specifies the value of the environment variable. """ - pulumi.set(__self__, "name", name) + ResourceDeploymentScriptAzureCliEnvironmentVariableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + secure_value=secure_value, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + secure_value: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if secure_value is None and 'secureValue' in kwargs: + secure_value = kwargs['secureValue'] + + _setter("name", name) if secure_value is not None: - pulumi.set(__self__, "secure_value", secure_value) + _setter("secure_value", secure_value) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -256,8 +339,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: Specifies the list of user-assigned managed identity IDs associated with the resource. Changing this forces a new resource to be created. :param pulumi.Input[str] type: Type of the managed identity. The only possible value is `UserAssigned`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + ResourceDeploymentScriptAzureCliIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -293,8 +395,25 @@ def __init__(__self__, *, :param pulumi.Input[str] key: Specifies the storage account access key. :param pulumi.Input[str] name: Specifies the storage account name. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "name", name) + ResourceDeploymentScriptAzureCliStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("key", key) + _setter("name", name) @property @pulumi.getter @@ -328,8 +447,21 @@ def __init__(__self__, *, """ :param pulumi.Input[str] container_group_name: Container group name, if not specified then the name will get auto-generated. For more information, please refer to the [Container Configuration](https://learn.microsoft.com/en-us/rest/api/resources/deployment-scripts/create?tabs=HTTP#containerconfiguration) documentation. """ + ResourceDeploymentScriptPowerShellContainerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_group_name=container_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_group_name is None and 'containerGroupName' in kwargs: + container_group_name = kwargs['containerGroupName'] + if container_group_name is not None: - pulumi.set(__self__, "container_group_name", container_group_name) + _setter("container_group_name", container_group_name) @property @pulumi.getter(name="containerGroupName") @@ -355,11 +487,30 @@ def __init__(__self__, *, :param pulumi.Input[str] secure_value: Specifies the value of the secure environment variable. :param pulumi.Input[str] value: Specifies the value of the environment variable. """ - pulumi.set(__self__, "name", name) + ResourceDeploymentScriptPowerShellEnvironmentVariableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + secure_value=secure_value, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + secure_value: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if secure_value is None and 'secureValue' in kwargs: + secure_value = kwargs['secureValue'] + + _setter("name", name) if secure_value is not None: - pulumi.set(__self__, "secure_value", secure_value) + _setter("secure_value", secure_value) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -407,8 +558,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: Specifies the list of user-assigned managed identity IDs associated with the resource. Changing this forces a new resource to be created. :param pulumi.Input[str] type: Type of the managed identity. The only possible value is `UserAssigned`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + ResourceDeploymentScriptPowerShellIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -444,8 +614,25 @@ def __init__(__self__, *, :param pulumi.Input[str] key: Specifies the storage account access key. :param pulumi.Input[str] name: Specifies the storage account name. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "name", name) + ResourceDeploymentScriptPowerShellStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("key", key) + _setter("name", name) @property @pulumi.getter @@ -481,8 +668,27 @@ def __init__(__self__, *, :param pulumi.Input[str] time_frame: The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: `WeekToDate`, `MonthToDate`, `BillingMonthToDate`, `TheLast7Days`, `TheLastMonth`, `TheLastBillingMonth`, `Custom`. :param pulumi.Input[str] type: The type of the query. Possible values are `ActualCost`, `AmortizedCost` and `Usage`. """ - pulumi.set(__self__, "time_frame", time_frame) - pulumi.set(__self__, "type", type) + ResourceGroupCostManagementExportExportDataOptionsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + time_frame=time_frame, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time_frame: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time_frame is None and 'timeFrame' in kwargs: + time_frame = kwargs['timeFrame'] + if time_frame is None: + raise TypeError("Missing 'time_frame' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("time_frame", time_frame) + _setter("type", type) @property @pulumi.getter(name="timeFrame") @@ -520,8 +726,29 @@ def __init__(__self__, *, > **Note:** The Resource Manager ID of a Storage Container is exposed via the `resource_manager_id` attribute of the `storage.Container` resource. """ - pulumi.set(__self__, "container_id", container_id) - pulumi.set(__self__, "root_folder_path", root_folder_path) + ResourceGroupCostManagementExportExportDataStorageLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + root_folder_path=root_folder_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[pulumi.Input[str]] = None, + root_folder_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if root_folder_path is None and 'rootFolderPath' in kwargs: + root_folder_path = kwargs['rootFolderPath'] + if root_folder_path is None: + raise TypeError("Missing 'root_folder_path' argument") + + _setter("container_id", container_id) + _setter("root_folder_path", root_folder_path) @property @pulumi.getter(name="containerId") @@ -563,12 +790,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ResourceGroupCostManagementViewDatasetGroupingArgs']]] groupings: One or more `grouping` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['ResourceGroupCostManagementViewDatasetSortingArgs']]] sortings: One or more `sorting` blocks as defined below, containing the order by expression to be used in the report """ - pulumi.set(__self__, "aggregations", aggregations) - pulumi.set(__self__, "granularity", granularity) + ResourceGroupCostManagementViewDatasetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aggregations=aggregations, + granularity=granularity, + groupings=groupings, + sortings=sortings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aggregations: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupCostManagementViewDatasetAggregationArgs']]]] = None, + granularity: Optional[pulumi.Input[str]] = None, + groupings: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupCostManagementViewDatasetGroupingArgs']]]] = None, + sortings: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupCostManagementViewDatasetSortingArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aggregations is None: + raise TypeError("Missing 'aggregations' argument") + if granularity is None: + raise TypeError("Missing 'granularity' argument") + + _setter("aggregations", aggregations) + _setter("granularity", granularity) if groupings is not None: - pulumi.set(__self__, "groupings", groupings) + _setter("groupings", groupings) if sortings is not None: - pulumi.set(__self__, "sortings", sortings) + _setter("sortings", sortings) @property @pulumi.getter @@ -628,8 +876,27 @@ def __init__(__self__, *, :param pulumi.Input[str] column_name: The name of the column to aggregate. Changing this forces a new Cost Management View for a Resource Group to be created. :param pulumi.Input[str] name: The name which should be used for this aggregation. Changing this forces a new Cost Management View for a Resource Group to be created. """ - pulumi.set(__self__, "column_name", column_name) - pulumi.set(__self__, "name", name) + ResourceGroupCostManagementViewDatasetAggregationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + column_name=column_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + column_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if column_name is None and 'columnName' in kwargs: + column_name = kwargs['columnName'] + if column_name is None: + raise TypeError("Missing 'column_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("column_name", column_name) + _setter("name", name) @property @pulumi.getter(name="columnName") @@ -665,8 +932,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the column to group. :param pulumi.Input[str] type: The type of the column. Possible values are `Dimension` and `TagKey`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ResourceGroupCostManagementViewDatasetGroupingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -702,8 +986,25 @@ def __init__(__self__, *, :param pulumi.Input[str] direction: Direction of sort. Possible values are `Ascending` and `Descending`. :param pulumi.Input[str] name: The name of the column to sort. """ - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) + ResourceGroupCostManagementViewDatasetSortingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + direction=direction, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + direction: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("direction", direction) + _setter("name", name) @property @pulumi.getter @@ -737,7 +1038,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] type: KPI type. Possible values are `Budget` and `Forecast`. """ - pulumi.set(__self__, "type", type) + ResourceGroupCostManagementViewKpiArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("type", type) @property @pulumi.getter @@ -761,8 +1075,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the column which should be used for this sub-view in the Cost Analysis UI. :param pulumi.Input[str] type: The data type to show in this sub-view. Possible values are `Dimension` and `TagKey`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ResourceGroupCostManagementViewPivotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -804,13 +1135,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID of the Policy Assignment for this Resource Group. :param pulumi.Input[str] tenant_id: The Tenant ID of the Policy Assignment for this Resource Group. """ - pulumi.set(__self__, "type", type) + ResourceGroupPolicyAssignmentIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -872,9 +1228,26 @@ def __init__(__self__, *, :param pulumi.Input[str] content: The non-compliance message text. When assigning policy sets (initiatives), unless `policy_definition_reference_id` is specified then this message will be the default for all policies. :param pulumi.Input[str] policy_definition_reference_id: When assigning policy sets (initiatives), this is the ID of the policy definition that the non-compliance message applies to. """ - pulumi.set(__self__, "content", content) + ResourceGroupPolicyAssignmentNonComplianceMessageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + policy_definition_reference_id=policy_definition_reference_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + policy_definition_reference_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + + _setter("content", content) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) @property @pulumi.getter @@ -910,9 +1283,24 @@ def __init__(__self__, *, :param pulumi.Input[str] value: Specifies the value to override the policy property. Possible values for `policyEffect` override listed [policy effects](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects). :param pulumi.Input[Sequence[pulumi.Input['ResourceGroupPolicyAssignmentOverrideSelectorArgs']]] selectors: One or more `override_selector` as defined below. """ - pulumi.set(__self__, "value", value) + ResourceGroupPolicyAssignmentOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + selectors=selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[pulumi.Input[str]] = None, + selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupPolicyAssignmentOverrideSelectorArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) if selectors is not None: - pulumi.set(__self__, "selectors", selectors) + _setter("selectors", selectors) @property @pulumi.getter @@ -950,12 +1338,29 @@ def __init__(__self__, *, :param pulumi.Input[str] kind: Specifies which characteristic will narrow down the set of evaluated resources. Possible values are `resourceLocation`, `resourceType` and `resourceWithoutLocation`. :param pulumi.Input[Sequence[pulumi.Input[str]]] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ + ResourceGroupPolicyAssignmentOverrideSelectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ins=ins, + kind=kind, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + kind: Optional[pulumi.Input[str]] = None, + not_ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter @@ -1003,9 +1408,24 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ResourceGroupPolicyAssignmentResourceSelectorSelectorArgs']]] selectors: One or more `resource_selector` block as defined below. :param pulumi.Input[str] name: Specifies a name for the resource selector. """ - pulumi.set(__self__, "selectors", selectors) + ResourceGroupPolicyAssignmentResourceSelectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + selectors=selectors, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupPolicyAssignmentResourceSelectorSelectorArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if selectors is None: + raise TypeError("Missing 'selectors' argument") + + _setter("selectors", selectors) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -1043,11 +1463,30 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] ins: Specify the list of policy reference id values to filter in. Cannot be used with `not_in`. :param pulumi.Input[Sequence[pulumi.Input[str]]] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ - pulumi.set(__self__, "kind", kind) + ResourceGroupPolicyAssignmentResourceSelectorSelectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kind=kind, + ins=ins, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kind: Optional[pulumi.Input[str]] = None, + ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + not_ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kind is None: + raise TypeError("Missing 'kind' argument") + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + + _setter("kind", kind) if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter @@ -1101,13 +1540,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID of the Policy Assignment for this Resource. :param pulumi.Input[str] tenant_id: The Tenant ID of the Policy Assignment for this Resource. """ - pulumi.set(__self__, "type", type) + ResourcePolicyAssignmentIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1169,9 +1633,26 @@ def __init__(__self__, *, :param pulumi.Input[str] content: The non-compliance message text. When assigning policy sets (initiatives), unless `policy_definition_reference_id` is specified then this message will be the default for all policies. :param pulumi.Input[str] policy_definition_reference_id: When assigning policy sets (initiatives), this is the ID of the policy definition that the non-compliance message applies to. """ - pulumi.set(__self__, "content", content) + ResourcePolicyAssignmentNonComplianceMessageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + policy_definition_reference_id=policy_definition_reference_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + policy_definition_reference_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + + _setter("content", content) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) @property @pulumi.getter @@ -1207,9 +1688,24 @@ def __init__(__self__, *, :param pulumi.Input[str] value: Specifies the value to override the policy property. Possible values for `policyEffect` override listed [policy effects](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects). :param pulumi.Input[Sequence[pulumi.Input['ResourcePolicyAssignmentOverrideSelectorArgs']]] selectors: One or more `override_selector` as defined below. """ - pulumi.set(__self__, "value", value) + ResourcePolicyAssignmentOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + selectors=selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[pulumi.Input[str]] = None, + selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ResourcePolicyAssignmentOverrideSelectorArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) if selectors is not None: - pulumi.set(__self__, "selectors", selectors) + _setter("selectors", selectors) @property @pulumi.getter @@ -1247,12 +1743,29 @@ def __init__(__self__, *, :param pulumi.Input[str] kind: Specifies which characteristic will narrow down the set of evaluated resources. Possible values are `resourceLocation`, `resourceType` and `resourceWithoutLocation`. :param pulumi.Input[Sequence[pulumi.Input[str]]] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ + ResourcePolicyAssignmentOverrideSelectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ins=ins, + kind=kind, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + kind: Optional[pulumi.Input[str]] = None, + not_ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter @@ -1300,9 +1813,24 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ResourcePolicyAssignmentResourceSelectorSelectorArgs']]] selectors: One or more `resource_selector` block as defined below. :param pulumi.Input[str] name: Specifies a name for the resource selector. """ - pulumi.set(__self__, "selectors", selectors) + ResourcePolicyAssignmentResourceSelectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + selectors=selectors, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ResourcePolicyAssignmentResourceSelectorSelectorArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if selectors is None: + raise TypeError("Missing 'selectors' argument") + + _setter("selectors", selectors) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -1340,11 +1868,30 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] ins: Specify the list of policy reference id values to filter in. Cannot be used with `not_in`. :param pulumi.Input[Sequence[pulumi.Input[str]]] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ - pulumi.set(__self__, "kind", kind) + ResourcePolicyAssignmentResourceSelectorSelectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kind=kind, + ins=ins, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kind: Optional[pulumi.Input[str]] = None, + ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + not_ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kind is None: + raise TypeError("Missing 'kind' argument") + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + + _setter("kind", kind) if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter @@ -1391,8 +1938,25 @@ def __init__(__self__, *, """ :param pulumi.Input[bool] registered: Should this feature be Registered or Unregistered? """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "registered", registered) + ResourceProviderRegistrationFeatureArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + registered=registered, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + registered: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if registered is None: + raise TypeError("Missing 'registered' argument") + + _setter("name", name) + _setter("registered", registered) @property @pulumi.getter @@ -1425,8 +1989,27 @@ def __init__(__self__, *, :param pulumi.Input[str] time_frame: The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: `WeekToDate`, `MonthToDate`, `BillingMonthToDate`, `TheLast7Days`, `TheLastMonth`, `TheLastBillingMonth`, `Custom`. :param pulumi.Input[str] type: The type of the query. Possible values are `ActualCost`, `AmortizedCost` and `Usage`. """ - pulumi.set(__self__, "time_frame", time_frame) - pulumi.set(__self__, "type", type) + SubscriptionCostManagementExportExportDataOptionsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + time_frame=time_frame, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time_frame: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time_frame is None and 'timeFrame' in kwargs: + time_frame = kwargs['timeFrame'] + if time_frame is None: + raise TypeError("Missing 'time_frame' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("time_frame", time_frame) + _setter("type", type) @property @pulumi.getter(name="timeFrame") @@ -1464,8 +2047,29 @@ def __init__(__self__, *, > **Note:** The Resource Manager ID of a Storage Container is exposed via the `resource_manager_id` attribute of the `storage.Container` resource. """ - pulumi.set(__self__, "container_id", container_id) - pulumi.set(__self__, "root_folder_path", root_folder_path) + SubscriptionCostManagementExportExportDataStorageLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + root_folder_path=root_folder_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[pulumi.Input[str]] = None, + root_folder_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if root_folder_path is None and 'rootFolderPath' in kwargs: + root_folder_path = kwargs['rootFolderPath'] + if root_folder_path is None: + raise TypeError("Missing 'root_folder_path' argument") + + _setter("container_id", container_id) + _setter("root_folder_path", root_folder_path) @property @pulumi.getter(name="containerId") @@ -1507,12 +2111,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['SubscriptionCostManagementViewDatasetGroupingArgs']]] groupings: One or more `grouping` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['SubscriptionCostManagementViewDatasetSortingArgs']]] sortings: One or more `sorting` blocks as defined below, containing the order by expression to be used in the report """ - pulumi.set(__self__, "aggregations", aggregations) - pulumi.set(__self__, "granularity", granularity) + SubscriptionCostManagementViewDatasetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aggregations=aggregations, + granularity=granularity, + groupings=groupings, + sortings=sortings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aggregations: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionCostManagementViewDatasetAggregationArgs']]]] = None, + granularity: Optional[pulumi.Input[str]] = None, + groupings: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionCostManagementViewDatasetGroupingArgs']]]] = None, + sortings: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionCostManagementViewDatasetSortingArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aggregations is None: + raise TypeError("Missing 'aggregations' argument") + if granularity is None: + raise TypeError("Missing 'granularity' argument") + + _setter("aggregations", aggregations) + _setter("granularity", granularity) if groupings is not None: - pulumi.set(__self__, "groupings", groupings) + _setter("groupings", groupings) if sortings is not None: - pulumi.set(__self__, "sortings", sortings) + _setter("sortings", sortings) @property @pulumi.getter @@ -1572,8 +2197,27 @@ def __init__(__self__, *, :param pulumi.Input[str] column_name: The name of the column to aggregate. Changing this forces a new Cost Management View for a Subscription to be created. :param pulumi.Input[str] name: The name which should be used for this aggregation. Changing this forces a new Cost Management View for a Subscription to be created. """ - pulumi.set(__self__, "column_name", column_name) - pulumi.set(__self__, "name", name) + SubscriptionCostManagementViewDatasetAggregationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + column_name=column_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + column_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if column_name is None and 'columnName' in kwargs: + column_name = kwargs['columnName'] + if column_name is None: + raise TypeError("Missing 'column_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("column_name", column_name) + _setter("name", name) @property @pulumi.getter(name="columnName") @@ -1609,8 +2253,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the column to group. :param pulumi.Input[str] type: The type of the column. Possible values are `Dimension` and `TagKey`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + SubscriptionCostManagementViewDatasetGroupingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -1646,8 +2307,25 @@ def __init__(__self__, *, :param pulumi.Input[str] direction: Direction of sort. Possible values are `Ascending` and `Descending`. :param pulumi.Input[str] name: The name of the column to sort. """ - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) + SubscriptionCostManagementViewDatasetSortingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + direction=direction, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + direction: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("direction", direction) + _setter("name", name) @property @pulumi.getter @@ -1681,7 +2359,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] type: KPI type. Possible values are `Budget` and `Forecast`. """ - pulumi.set(__self__, "type", type) + SubscriptionCostManagementViewKpiArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("type", type) @property @pulumi.getter @@ -1705,8 +2396,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the column which should be used for this sub-view in the Cost Analysis UI. :param pulumi.Input[str] type: The data type to show in this sub-view. Possible values are `Dimension` and `TagKey`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + SubscriptionCostManagementViewPivotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -1748,13 +2456,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID of the Policy Assignment for this Subscription. :param pulumi.Input[str] tenant_id: The Tenant ID of the Policy Assignment for this Subscription. """ - pulumi.set(__self__, "type", type) + SubscriptionPolicyAssignmentIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1816,9 +2549,26 @@ def __init__(__self__, *, :param pulumi.Input[str] content: The non-compliance message text. When assigning policy sets (initiatives), unless `policy_definition_reference_id` is specified then this message will be the default for all policies. :param pulumi.Input[str] policy_definition_reference_id: When assigning policy sets (initiatives), this is the ID of the policy definition that the non-compliance message applies to. """ - pulumi.set(__self__, "content", content) + SubscriptionPolicyAssignmentNonComplianceMessageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + policy_definition_reference_id=policy_definition_reference_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + policy_definition_reference_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + + _setter("content", content) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) @property @pulumi.getter @@ -1854,9 +2604,24 @@ def __init__(__self__, *, :param pulumi.Input[str] value: Specifies the value to override the policy property. Possible values for `policyEffect` override listed [policy effects](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects). :param pulumi.Input[Sequence[pulumi.Input['SubscriptionPolicyAssignmentOverrideSelectorArgs']]] selectors: One or more `override_selector` as defined below. """ - pulumi.set(__self__, "value", value) + SubscriptionPolicyAssignmentOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + selectors=selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[pulumi.Input[str]] = None, + selectors: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionPolicyAssignmentOverrideSelectorArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) if selectors is not None: - pulumi.set(__self__, "selectors", selectors) + _setter("selectors", selectors) @property @pulumi.getter @@ -1894,12 +2659,29 @@ def __init__(__self__, *, :param pulumi.Input[str] kind: Specifies which characteristic will narrow down the set of evaluated resources. Possible values are `resourceLocation`, `resourceType` and `resourceWithoutLocation`. :param pulumi.Input[Sequence[pulumi.Input[str]]] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ + SubscriptionPolicyAssignmentOverrideSelectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ins=ins, + kind=kind, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + kind: Optional[pulumi.Input[str]] = None, + not_ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter @@ -1947,9 +2729,24 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['SubscriptionPolicyAssignmentResourceSelectorSelectorArgs']]] selectors: One or more `resource_selector` block as defined below. :param pulumi.Input[str] name: Specifies a name for the resource selector. """ - pulumi.set(__self__, "selectors", selectors) + SubscriptionPolicyAssignmentResourceSelectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + selectors=selectors, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + selectors: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionPolicyAssignmentResourceSelectorSelectorArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if selectors is None: + raise TypeError("Missing 'selectors' argument") + + _setter("selectors", selectors) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -1987,11 +2784,30 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] ins: Specify the list of policy reference id values to filter in. Cannot be used with `not_in`. :param pulumi.Input[Sequence[pulumi.Input[str]]] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ - pulumi.set(__self__, "kind", kind) + SubscriptionPolicyAssignmentResourceSelectorSelectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kind=kind, + ins=ins, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kind: Optional[pulumi.Input[str]] = None, + ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + not_ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kind is None: + raise TypeError("Missing 'kind' argument") + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + + _setter("kind", kind) if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/core/custom_provider.py b/sdk/python/pulumi_azure/core/custom_provider.py index 3c7a07f7c2..a22a60c443 100644 --- a/sdk/python/pulumi_azure/core/custom_provider.py +++ b/sdk/python/pulumi_azure/core/custom_provider.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,19 +33,48 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['CustomProviderValidationArgs']]] validations: Any number of `validation` block as defined below. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + CustomProviderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + actions=actions, + location=location, + name=name, + resource_types=resource_types, + tags=tags, + validations=validations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + actions: Optional[pulumi.Input[Sequence[pulumi.Input['CustomProviderActionArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_types: Optional[pulumi.Input[Sequence[pulumi.Input['CustomProviderResourceTypeArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + validations: Optional[pulumi.Input[Sequence[pulumi.Input['CustomProviderValidationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if resource_types is None and 'resourceTypes' in kwargs: + resource_types = kwargs['resourceTypes'] + + _setter("resource_group_name", resource_group_name) if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_types is not None: - pulumi.set(__self__, "resource_types", resource_types) + _setter("resource_types", resource_types) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if validations is not None: - pulumi.set(__self__, "validations", validations) + _setter("validations", validations) @property @pulumi.getter(name="resourceGroupName") @@ -152,20 +181,47 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['CustomProviderValidationArgs']]] validations: Any number of `validation` block as defined below. """ + _CustomProviderState._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + location=location, + name=name, + resource_group_name=resource_group_name, + resource_types=resource_types, + tags=tags, + validations=validations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input['CustomProviderActionArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + resource_types: Optional[pulumi.Input[Sequence[pulumi.Input['CustomProviderResourceTypeArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + validations: Optional[pulumi.Input[Sequence[pulumi.Input['CustomProviderValidationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_types is None and 'resourceTypes' in kwargs: + resource_types = kwargs['resourceTypes'] + if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if resource_types is not None: - pulumi.set(__self__, "resource_types", resource_types) + _setter("resource_types", resource_types) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if validations is not None: - pulumi.set(__self__, "validations", validations) + _setter("validations", validations) @property @pulumi.getter @@ -345,6 +401,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CustomProviderArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/get_client_config.py b/sdk/python/pulumi_azure/core/get_client_config.py index 59b28a0761..ddca84806f 100644 --- a/sdk/python/pulumi_azure/core/get_client_config.py +++ b/sdk/python/pulumi_azure/core/get_client_config.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/core/get_extended_locations.py b/sdk/python/pulumi_azure/core/get_extended_locations.py index 803c392187..c945d32522 100644 --- a/sdk/python/pulumi_azure/core/get_extended_locations.py +++ b/sdk/python/pulumi_azure/core/get_extended_locations.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/core/get_resource_group.py b/sdk/python/pulumi_azure/core/get_resource_group.py index 4b6ee8daa9..ab9af9f46e 100644 --- a/sdk/python/pulumi_azure/core/get_resource_group.py +++ b/sdk/python/pulumi_azure/core/get_resource_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/core/get_resource_group_template_deployment.py b/sdk/python/pulumi_azure/core/get_resource_group_template_deployment.py index e2215a13e3..c03a258c40 100644 --- a/sdk/python/pulumi_azure/core/get_resource_group_template_deployment.py +++ b/sdk/python/pulumi_azure/core/get_resource_group_template_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/core/get_resources.py b/sdk/python/pulumi_azure/core/get_resources.py index 905d411c2a..ceb44725fc 100644 --- a/sdk/python/pulumi_azure/core/get_resources.py +++ b/sdk/python/pulumi_azure/core/get_resources.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/core/get_subscription.py b/sdk/python/pulumi_azure/core/get_subscription.py index 510a6cbd70..4b8f070757 100644 --- a/sdk/python/pulumi_azure/core/get_subscription.py +++ b/sdk/python/pulumi_azure/core/get_subscription.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/core/get_subscription_template_deployment.py b/sdk/python/pulumi_azure/core/get_subscription_template_deployment.py index b0af60c758..5b23339c51 100644 --- a/sdk/python/pulumi_azure/core/get_subscription_template_deployment.py +++ b/sdk/python/pulumi_azure/core/get_subscription_template_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/core/get_subscriptions.py b/sdk/python/pulumi_azure/core/get_subscriptions.py index 694a9e24c7..1d211fe0e8 100644 --- a/sdk/python/pulumi_azure/core/get_subscriptions.py +++ b/sdk/python/pulumi_azure/core/get_subscriptions.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/core/get_template_spec_version.py b/sdk/python/pulumi_azure/core/get_template_spec_version.py index 2946ed1fb6..b4ed2875d5 100644 --- a/sdk/python/pulumi_azure/core/get_template_spec_version.py +++ b/sdk/python/pulumi_azure/core/get_template_spec_version.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/core/get_tenant_template_deployment.py b/sdk/python/pulumi_azure/core/get_tenant_template_deployment.py index a736bf2033..687b063a9a 100644 --- a/sdk/python/pulumi_azure/core/get_tenant_template_deployment.py +++ b/sdk/python/pulumi_azure/core/get_tenant_template_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/core/get_user_assigned_identity.py b/sdk/python/pulumi_azure/core/get_user_assigned_identity.py index d5c5964497..65dc4fa131 100644 --- a/sdk/python/pulumi_azure/core/get_user_assigned_identity.py +++ b/sdk/python/pulumi_azure/core/get_user_assigned_identity.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/core/outputs.py b/sdk/python/pulumi_azure/core/outputs.py index aac8e874d8..a4b1e82f64 100644 --- a/sdk/python/pulumi_azure/core/outputs.py +++ b/sdk/python/pulumi_azure/core/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -70,8 +70,25 @@ def __init__(__self__, *, :param str endpoint: Specifies the endpoint of the action. :param str name: Specifies the name of the action. """ - pulumi.set(__self__, "endpoint", endpoint) - pulumi.set(__self__, "name", name) + CustomProviderAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint=endpoint, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint is None: + raise TypeError("Missing 'endpoint' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("endpoint", endpoint) + _setter("name", name) @property @pulumi.getter @@ -118,10 +135,31 @@ def __init__(__self__, *, :param str name: Specifies the name of the route definition. :param str routing_type: The routing type that is supported for the resource request. Valid values are `Proxy` and `Proxy,Cache`. This value defaults to `ResourceTypeRoutingProxy`. """ - pulumi.set(__self__, "endpoint", endpoint) - pulumi.set(__self__, "name", name) + CustomProviderResourceType._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint=endpoint, + name=name, + routing_type=routing_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint: Optional[str] = None, + name: Optional[str] = None, + routing_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint is None: + raise TypeError("Missing 'endpoint' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if routing_type is None and 'routingType' in kwargs: + routing_type = kwargs['routingType'] + + _setter("endpoint", endpoint) + _setter("name", name) if routing_type is not None: - pulumi.set(__self__, "routing_type", routing_type) + _setter("routing_type", routing_type) @property @pulumi.getter @@ -155,7 +193,20 @@ def __init__(__self__, *, """ :param str specification: The endpoint where the validation specification is located. """ - pulumi.set(__self__, "specification", specification) + CustomProviderValidation._configure( + lambda key, value: pulumi.set(__self__, key, value), + specification=specification, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + specification: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if specification is None: + raise TypeError("Missing 'specification' argument") + + _setter("specification", specification) @property @pulumi.getter @@ -190,8 +241,21 @@ def __init__(__self__, *, """ :param str container_group_name: Container group name, if not specified then the name will get auto-generated. For more information, please refer to the [Container Configuration](https://learn.microsoft.com/en-us/rest/api/resources/deployment-scripts/create?tabs=HTTP#containerconfiguration) documentation. """ + ResourceDeploymentScriptAzureCliContainer._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_group_name=container_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_group_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_group_name is None and 'containerGroupName' in kwargs: + container_group_name = kwargs['containerGroupName'] + if container_group_name is not None: - pulumi.set(__self__, "container_group_name", container_group_name) + _setter("container_group_name", container_group_name) @property @pulumi.getter(name="containerGroupName") @@ -230,11 +294,30 @@ def __init__(__self__, *, :param str secure_value: Specifies the value of the secure environment variable. :param str value: Specifies the value of the environment variable. """ - pulumi.set(__self__, "name", name) + ResourceDeploymentScriptAzureCliEnvironmentVariable._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + secure_value=secure_value, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + secure_value: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if secure_value is None and 'secureValue' in kwargs: + secure_value = kwargs['secureValue'] + + _setter("name", name) if secure_value is not None: - pulumi.set(__self__, "secure_value", secure_value) + _setter("secure_value", secure_value) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -287,8 +370,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: Specifies the list of user-assigned managed identity IDs associated with the resource. Changing this forces a new resource to be created. :param str type: Type of the managed identity. The only possible value is `UserAssigned`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + ResourceDeploymentScriptAzureCliIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -316,8 +418,25 @@ def __init__(__self__, *, :param str key: Specifies the storage account access key. :param str name: Specifies the storage account name. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "name", name) + ResourceDeploymentScriptAzureCliStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("key", key) + _setter("name", name) @property @pulumi.getter @@ -360,8 +479,21 @@ def __init__(__self__, *, """ :param str container_group_name: Container group name, if not specified then the name will get auto-generated. For more information, please refer to the [Container Configuration](https://learn.microsoft.com/en-us/rest/api/resources/deployment-scripts/create?tabs=HTTP#containerconfiguration) documentation. """ + ResourceDeploymentScriptPowerShellContainer._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_group_name=container_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_group_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_group_name is None and 'containerGroupName' in kwargs: + container_group_name = kwargs['containerGroupName'] + if container_group_name is not None: - pulumi.set(__self__, "container_group_name", container_group_name) + _setter("container_group_name", container_group_name) @property @pulumi.getter(name="containerGroupName") @@ -400,11 +532,30 @@ def __init__(__self__, *, :param str secure_value: Specifies the value of the secure environment variable. :param str value: Specifies the value of the environment variable. """ - pulumi.set(__self__, "name", name) + ResourceDeploymentScriptPowerShellEnvironmentVariable._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + secure_value=secure_value, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + secure_value: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if secure_value is None and 'secureValue' in kwargs: + secure_value = kwargs['secureValue'] + + _setter("name", name) if secure_value is not None: - pulumi.set(__self__, "secure_value", secure_value) + _setter("secure_value", secure_value) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -457,8 +608,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: Specifies the list of user-assigned managed identity IDs associated with the resource. Changing this forces a new resource to be created. :param str type: Type of the managed identity. The only possible value is `UserAssigned`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + ResourceDeploymentScriptPowerShellIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -486,8 +656,25 @@ def __init__(__self__, *, :param str key: Specifies the storage account access key. :param str name: Specifies the storage account name. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "name", name) + ResourceDeploymentScriptPowerShellStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("key", key) + _setter("name", name) @property @pulumi.getter @@ -532,8 +719,27 @@ def __init__(__self__, *, :param str time_frame: The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: `WeekToDate`, `MonthToDate`, `BillingMonthToDate`, `TheLast7Days`, `TheLastMonth`, `TheLastBillingMonth`, `Custom`. :param str type: The type of the query. Possible values are `ActualCost`, `AmortizedCost` and `Usage`. """ - pulumi.set(__self__, "time_frame", time_frame) - pulumi.set(__self__, "type", type) + ResourceGroupCostManagementExportExportDataOptions._configure( + lambda key, value: pulumi.set(__self__, key, value), + time_frame=time_frame, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time_frame: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time_frame is None and 'timeFrame' in kwargs: + time_frame = kwargs['timeFrame'] + if time_frame is None: + raise TypeError("Missing 'time_frame' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("time_frame", time_frame) + _setter("type", type) @property @pulumi.getter(name="timeFrame") @@ -582,8 +788,29 @@ def __init__(__self__, *, > **Note:** The Resource Manager ID of a Storage Container is exposed via the `resource_manager_id` attribute of the `storage.Container` resource. """ - pulumi.set(__self__, "container_id", container_id) - pulumi.set(__self__, "root_folder_path", root_folder_path) + ResourceGroupCostManagementExportExportDataStorageLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + root_folder_path=root_folder_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[str] = None, + root_folder_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if root_folder_path is None and 'rootFolderPath' in kwargs: + root_folder_path = kwargs['rootFolderPath'] + if root_folder_path is None: + raise TypeError("Missing 'root_folder_path' argument") + + _setter("container_id", container_id) + _setter("root_folder_path", root_folder_path) @property @pulumi.getter(name="containerId") @@ -617,12 +844,33 @@ def __init__(__self__, *, :param Sequence['ResourceGroupCostManagementViewDatasetGroupingArgs'] groupings: One or more `grouping` blocks as defined below. :param Sequence['ResourceGroupCostManagementViewDatasetSortingArgs'] sortings: One or more `sorting` blocks as defined below, containing the order by expression to be used in the report """ - pulumi.set(__self__, "aggregations", aggregations) - pulumi.set(__self__, "granularity", granularity) + ResourceGroupCostManagementViewDataset._configure( + lambda key, value: pulumi.set(__self__, key, value), + aggregations=aggregations, + granularity=granularity, + groupings=groupings, + sortings=sortings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aggregations: Optional[Sequence['outputs.ResourceGroupCostManagementViewDatasetAggregation']] = None, + granularity: Optional[str] = None, + groupings: Optional[Sequence['outputs.ResourceGroupCostManagementViewDatasetGrouping']] = None, + sortings: Optional[Sequence['outputs.ResourceGroupCostManagementViewDatasetSorting']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aggregations is None: + raise TypeError("Missing 'aggregations' argument") + if granularity is None: + raise TypeError("Missing 'granularity' argument") + + _setter("aggregations", aggregations) + _setter("granularity", granularity) if groupings is not None: - pulumi.set(__self__, "groupings", groupings) + _setter("groupings", groupings) if sortings is not None: - pulumi.set(__self__, "sortings", sortings) + _setter("sortings", sortings) @property @pulumi.getter @@ -683,8 +931,27 @@ def __init__(__self__, *, :param str column_name: The name of the column to aggregate. Changing this forces a new Cost Management View for a Resource Group to be created. :param str name: The name which should be used for this aggregation. Changing this forces a new Cost Management View for a Resource Group to be created. """ - pulumi.set(__self__, "column_name", column_name) - pulumi.set(__self__, "name", name) + ResourceGroupCostManagementViewDatasetAggregation._configure( + lambda key, value: pulumi.set(__self__, key, value), + column_name=column_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + column_name: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if column_name is None and 'columnName' in kwargs: + column_name = kwargs['columnName'] + if column_name is None: + raise TypeError("Missing 'column_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("column_name", column_name) + _setter("name", name) @property @pulumi.getter(name="columnName") @@ -712,8 +979,25 @@ def __init__(__self__, *, :param str name: The name of the column to group. :param str type: The type of the column. Possible values are `Dimension` and `TagKey`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ResourceGroupCostManagementViewDatasetGrouping._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -741,8 +1025,25 @@ def __init__(__self__, *, :param str direction: Direction of sort. Possible values are `Ascending` and `Descending`. :param str name: The name of the column to sort. """ - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) + ResourceGroupCostManagementViewDatasetSorting._configure( + lambda key, value: pulumi.set(__self__, key, value), + direction=direction, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + direction: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("direction", direction) + _setter("name", name) @property @pulumi.getter @@ -768,7 +1069,20 @@ def __init__(__self__, *, """ :param str type: KPI type. Possible values are `Budget` and `Forecast`. """ - pulumi.set(__self__, "type", type) + ResourceGroupCostManagementViewKpi._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("type", type) @property @pulumi.getter @@ -788,8 +1102,25 @@ def __init__(__self__, *, :param str name: The name of the column which should be used for this sub-view in the Cost Analysis UI. :param str type: The data type to show in this sub-view. Possible values are `Dimension` and `TagKey`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ResourceGroupCostManagementViewPivot._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -844,13 +1175,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID of the Policy Assignment for this Resource Group. :param str tenant_id: The Tenant ID of the Policy Assignment for this Resource Group. """ - pulumi.set(__self__, "type", type) + ResourceGroupPolicyAssignmentIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -913,9 +1269,26 @@ def __init__(__self__, *, :param str content: The non-compliance message text. When assigning policy sets (initiatives), unless `policy_definition_reference_id` is specified then this message will be the default for all policies. :param str policy_definition_reference_id: When assigning policy sets (initiatives), this is the ID of the policy definition that the non-compliance message applies to. """ - pulumi.set(__self__, "content", content) + ResourceGroupPolicyAssignmentNonComplianceMessage._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + policy_definition_reference_id=policy_definition_reference_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[str] = None, + policy_definition_reference_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + + _setter("content", content) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) @property @pulumi.getter @@ -943,9 +1316,24 @@ def __init__(__self__, *, :param str value: Specifies the value to override the policy property. Possible values for `policyEffect` override listed [policy effects](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects). :param Sequence['ResourceGroupPolicyAssignmentOverrideSelectorArgs'] selectors: One or more `override_selector` as defined below. """ - pulumi.set(__self__, "value", value) + ResourceGroupPolicyAssignmentOverride._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + selectors=selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[str] = None, + selectors: Optional[Sequence['outputs.ResourceGroupPolicyAssignmentOverrideSelector']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) if selectors is not None: - pulumi.set(__self__, "selectors", selectors) + _setter("selectors", selectors) @property @pulumi.getter @@ -992,12 +1380,29 @@ def __init__(__self__, *, :param str kind: Specifies which characteristic will narrow down the set of evaluated resources. Possible values are `resourceLocation`, `resourceType` and `resourceWithoutLocation`. :param Sequence[str] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ + ResourceGroupPolicyAssignmentOverrideSelector._configure( + lambda key, value: pulumi.set(__self__, key, value), + ins=ins, + kind=kind, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ins: Optional[Sequence[str]] = None, + kind: Optional[str] = None, + not_ins: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter @@ -1033,9 +1438,24 @@ def __init__(__self__, *, :param Sequence['ResourceGroupPolicyAssignmentResourceSelectorSelectorArgs'] selectors: One or more `resource_selector` block as defined below. :param str name: Specifies a name for the resource selector. """ - pulumi.set(__self__, "selectors", selectors) + ResourceGroupPolicyAssignmentResourceSelector._configure( + lambda key, value: pulumi.set(__self__, key, value), + selectors=selectors, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + selectors: Optional[Sequence['outputs.ResourceGroupPolicyAssignmentResourceSelectorSelector']] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if selectors is None: + raise TypeError("Missing 'selectors' argument") + + _setter("selectors", selectors) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -1082,11 +1502,30 @@ def __init__(__self__, *, :param Sequence[str] ins: Specify the list of policy reference id values to filter in. Cannot be used with `not_in`. :param Sequence[str] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ - pulumi.set(__self__, "kind", kind) + ResourceGroupPolicyAssignmentResourceSelectorSelector._configure( + lambda key, value: pulumi.set(__self__, key, value), + kind=kind, + ins=ins, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kind: Optional[str] = None, + ins: Optional[Sequence[str]] = None, + not_ins: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kind is None: + raise TypeError("Missing 'kind' argument") + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + + _setter("kind", kind) if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter @@ -1149,13 +1588,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID of the Policy Assignment for this Resource. :param str tenant_id: The Tenant ID of the Policy Assignment for this Resource. """ - pulumi.set(__self__, "type", type) + ResourcePolicyAssignmentIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1218,9 +1682,26 @@ def __init__(__self__, *, :param str content: The non-compliance message text. When assigning policy sets (initiatives), unless `policy_definition_reference_id` is specified then this message will be the default for all policies. :param str policy_definition_reference_id: When assigning policy sets (initiatives), this is the ID of the policy definition that the non-compliance message applies to. """ - pulumi.set(__self__, "content", content) + ResourcePolicyAssignmentNonComplianceMessage._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + policy_definition_reference_id=policy_definition_reference_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[str] = None, + policy_definition_reference_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + + _setter("content", content) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) @property @pulumi.getter @@ -1248,9 +1729,24 @@ def __init__(__self__, *, :param str value: Specifies the value to override the policy property. Possible values for `policyEffect` override listed [policy effects](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects). :param Sequence['ResourcePolicyAssignmentOverrideSelectorArgs'] selectors: One or more `override_selector` as defined below. """ - pulumi.set(__self__, "value", value) + ResourcePolicyAssignmentOverride._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + selectors=selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[str] = None, + selectors: Optional[Sequence['outputs.ResourcePolicyAssignmentOverrideSelector']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) if selectors is not None: - pulumi.set(__self__, "selectors", selectors) + _setter("selectors", selectors) @property @pulumi.getter @@ -1297,12 +1793,29 @@ def __init__(__self__, *, :param str kind: Specifies which characteristic will narrow down the set of evaluated resources. Possible values are `resourceLocation`, `resourceType` and `resourceWithoutLocation`. :param Sequence[str] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ + ResourcePolicyAssignmentOverrideSelector._configure( + lambda key, value: pulumi.set(__self__, key, value), + ins=ins, + kind=kind, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ins: Optional[Sequence[str]] = None, + kind: Optional[str] = None, + not_ins: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter @@ -1338,9 +1851,24 @@ def __init__(__self__, *, :param Sequence['ResourcePolicyAssignmentResourceSelectorSelectorArgs'] selectors: One or more `resource_selector` block as defined below. :param str name: Specifies a name for the resource selector. """ - pulumi.set(__self__, "selectors", selectors) + ResourcePolicyAssignmentResourceSelector._configure( + lambda key, value: pulumi.set(__self__, key, value), + selectors=selectors, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + selectors: Optional[Sequence['outputs.ResourcePolicyAssignmentResourceSelectorSelector']] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if selectors is None: + raise TypeError("Missing 'selectors' argument") + + _setter("selectors", selectors) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -1387,11 +1915,30 @@ def __init__(__self__, *, :param Sequence[str] ins: Specify the list of policy reference id values to filter in. Cannot be used with `not_in`. :param Sequence[str] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ - pulumi.set(__self__, "kind", kind) + ResourcePolicyAssignmentResourceSelectorSelector._configure( + lambda key, value: pulumi.set(__self__, key, value), + kind=kind, + ins=ins, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kind: Optional[str] = None, + ins: Optional[Sequence[str]] = None, + not_ins: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kind is None: + raise TypeError("Missing 'kind' argument") + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + + _setter("kind", kind) if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter @@ -1426,8 +1973,25 @@ def __init__(__self__, *, """ :param bool registered: Should this feature be Registered or Unregistered? """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "registered", registered) + ResourceProviderRegistrationFeature._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + registered=registered, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + registered: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if registered is None: + raise TypeError("Missing 'registered' argument") + + _setter("name", name) + _setter("registered", registered) @property @pulumi.getter @@ -1469,8 +2033,27 @@ def __init__(__self__, *, :param str time_frame: The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: `WeekToDate`, `MonthToDate`, `BillingMonthToDate`, `TheLast7Days`, `TheLastMonth`, `TheLastBillingMonth`, `Custom`. :param str type: The type of the query. Possible values are `ActualCost`, `AmortizedCost` and `Usage`. """ - pulumi.set(__self__, "time_frame", time_frame) - pulumi.set(__self__, "type", type) + SubscriptionCostManagementExportExportDataOptions._configure( + lambda key, value: pulumi.set(__self__, key, value), + time_frame=time_frame, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time_frame: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time_frame is None and 'timeFrame' in kwargs: + time_frame = kwargs['timeFrame'] + if time_frame is None: + raise TypeError("Missing 'time_frame' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("time_frame", time_frame) + _setter("type", type) @property @pulumi.getter(name="timeFrame") @@ -1519,8 +2102,29 @@ def __init__(__self__, *, > **Note:** The Resource Manager ID of a Storage Container is exposed via the `resource_manager_id` attribute of the `storage.Container` resource. """ - pulumi.set(__self__, "container_id", container_id) - pulumi.set(__self__, "root_folder_path", root_folder_path) + SubscriptionCostManagementExportExportDataStorageLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + root_folder_path=root_folder_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[str] = None, + root_folder_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if root_folder_path is None and 'rootFolderPath' in kwargs: + root_folder_path = kwargs['rootFolderPath'] + if root_folder_path is None: + raise TypeError("Missing 'root_folder_path' argument") + + _setter("container_id", container_id) + _setter("root_folder_path", root_folder_path) @property @pulumi.getter(name="containerId") @@ -1554,12 +2158,33 @@ def __init__(__self__, *, :param Sequence['SubscriptionCostManagementViewDatasetGroupingArgs'] groupings: One or more `grouping` blocks as defined below. :param Sequence['SubscriptionCostManagementViewDatasetSortingArgs'] sortings: One or more `sorting` blocks as defined below, containing the order by expression to be used in the report """ - pulumi.set(__self__, "aggregations", aggregations) - pulumi.set(__self__, "granularity", granularity) + SubscriptionCostManagementViewDataset._configure( + lambda key, value: pulumi.set(__self__, key, value), + aggregations=aggregations, + granularity=granularity, + groupings=groupings, + sortings=sortings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aggregations: Optional[Sequence['outputs.SubscriptionCostManagementViewDatasetAggregation']] = None, + granularity: Optional[str] = None, + groupings: Optional[Sequence['outputs.SubscriptionCostManagementViewDatasetGrouping']] = None, + sortings: Optional[Sequence['outputs.SubscriptionCostManagementViewDatasetSorting']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aggregations is None: + raise TypeError("Missing 'aggregations' argument") + if granularity is None: + raise TypeError("Missing 'granularity' argument") + + _setter("aggregations", aggregations) + _setter("granularity", granularity) if groupings is not None: - pulumi.set(__self__, "groupings", groupings) + _setter("groupings", groupings) if sortings is not None: - pulumi.set(__self__, "sortings", sortings) + _setter("sortings", sortings) @property @pulumi.getter @@ -1620,8 +2245,27 @@ def __init__(__self__, *, :param str column_name: The name of the column to aggregate. Changing this forces a new Cost Management View for a Subscription to be created. :param str name: The name which should be used for this aggregation. Changing this forces a new Cost Management View for a Subscription to be created. """ - pulumi.set(__self__, "column_name", column_name) - pulumi.set(__self__, "name", name) + SubscriptionCostManagementViewDatasetAggregation._configure( + lambda key, value: pulumi.set(__self__, key, value), + column_name=column_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + column_name: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if column_name is None and 'columnName' in kwargs: + column_name = kwargs['columnName'] + if column_name is None: + raise TypeError("Missing 'column_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("column_name", column_name) + _setter("name", name) @property @pulumi.getter(name="columnName") @@ -1649,8 +2293,25 @@ def __init__(__self__, *, :param str name: The name of the column to group. :param str type: The type of the column. Possible values are `Dimension` and `TagKey`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + SubscriptionCostManagementViewDatasetGrouping._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -1678,8 +2339,25 @@ def __init__(__self__, *, :param str direction: Direction of sort. Possible values are `Ascending` and `Descending`. :param str name: The name of the column to sort. """ - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) + SubscriptionCostManagementViewDatasetSorting._configure( + lambda key, value: pulumi.set(__self__, key, value), + direction=direction, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + direction: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("direction", direction) + _setter("name", name) @property @pulumi.getter @@ -1705,7 +2383,20 @@ def __init__(__self__, *, """ :param str type: KPI type. Possible values are `Budget` and `Forecast`. """ - pulumi.set(__self__, "type", type) + SubscriptionCostManagementViewKpi._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("type", type) @property @pulumi.getter @@ -1725,8 +2416,25 @@ def __init__(__self__, *, :param str name: The name of the column which should be used for this sub-view in the Cost Analysis UI. :param str type: The data type to show in this sub-view. Possible values are `Dimension` and `TagKey`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + SubscriptionCostManagementViewPivot._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -1781,13 +2489,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID of the Policy Assignment for this Subscription. :param str tenant_id: The Tenant ID of the Policy Assignment for this Subscription. """ - pulumi.set(__self__, "type", type) + SubscriptionPolicyAssignmentIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1850,9 +2583,26 @@ def __init__(__self__, *, :param str content: The non-compliance message text. When assigning policy sets (initiatives), unless `policy_definition_reference_id` is specified then this message will be the default for all policies. :param str policy_definition_reference_id: When assigning policy sets (initiatives), this is the ID of the policy definition that the non-compliance message applies to. """ - pulumi.set(__self__, "content", content) + SubscriptionPolicyAssignmentNonComplianceMessage._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + policy_definition_reference_id=policy_definition_reference_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[str] = None, + policy_definition_reference_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + + _setter("content", content) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) @property @pulumi.getter @@ -1880,9 +2630,24 @@ def __init__(__self__, *, :param str value: Specifies the value to override the policy property. Possible values for `policyEffect` override listed [policy effects](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects). :param Sequence['SubscriptionPolicyAssignmentOverrideSelectorArgs'] selectors: One or more `override_selector` as defined below. """ - pulumi.set(__self__, "value", value) + SubscriptionPolicyAssignmentOverride._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + selectors=selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[str] = None, + selectors: Optional[Sequence['outputs.SubscriptionPolicyAssignmentOverrideSelector']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) if selectors is not None: - pulumi.set(__self__, "selectors", selectors) + _setter("selectors", selectors) @property @pulumi.getter @@ -1929,12 +2694,29 @@ def __init__(__self__, *, :param str kind: Specifies which characteristic will narrow down the set of evaluated resources. Possible values are `resourceLocation`, `resourceType` and `resourceWithoutLocation`. :param Sequence[str] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ + SubscriptionPolicyAssignmentOverrideSelector._configure( + lambda key, value: pulumi.set(__self__, key, value), + ins=ins, + kind=kind, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ins: Optional[Sequence[str]] = None, + kind: Optional[str] = None, + not_ins: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter @@ -1970,9 +2752,24 @@ def __init__(__self__, *, :param Sequence['SubscriptionPolicyAssignmentResourceSelectorSelectorArgs'] selectors: One or more `resource_selector` block as defined below. :param str name: Specifies a name for the resource selector. """ - pulumi.set(__self__, "selectors", selectors) + SubscriptionPolicyAssignmentResourceSelector._configure( + lambda key, value: pulumi.set(__self__, key, value), + selectors=selectors, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + selectors: Optional[Sequence['outputs.SubscriptionPolicyAssignmentResourceSelectorSelector']] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if selectors is None: + raise TypeError("Missing 'selectors' argument") + + _setter("selectors", selectors) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -2019,11 +2816,30 @@ def __init__(__self__, *, :param Sequence[str] ins: Specify the list of policy reference id values to filter in. Cannot be used with `not_in`. :param Sequence[str] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ - pulumi.set(__self__, "kind", kind) + SubscriptionPolicyAssignmentResourceSelectorSelector._configure( + lambda key, value: pulumi.set(__self__, key, value), + kind=kind, + ins=ins, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kind: Optional[str] = None, + ins: Optional[Sequence[str]] = None, + not_ins: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kind is None: + raise TypeError("Missing 'kind' argument") + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + + _setter("kind", kind) if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter @@ -2067,12 +2883,47 @@ def __init__(__self__, *, :param Mapping[str, str] tags: A map of tags assigned to this Resource. :param str type: The Resource Type of the Resources you want to list (e.g. `Microsoft.Network/virtualNetworks`). A full list of available Resource Types can be found [here](https://docs.microsoft.com/azure/azure-resource-manager/azure-services-resource-providers). """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "tags", tags) - pulumi.set(__self__, "type", type) + GetResourcesResourceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + location: Optional[str] = None, + name: Optional[str] = None, + resource_group_name: Optional[str] = None, + tags: Optional[Mapping[str, str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if location is None: + raise TypeError("Missing 'location' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if tags is None: + raise TypeError("Missing 'tags' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("id", id) + _setter("location", location) + _setter("name", name) + _setter("resource_group_name", resource_group_name) + _setter("tags", tags) + _setter("type", type) @property @pulumi.getter @@ -2146,15 +2997,72 @@ def __init__(__self__, *, :param Mapping[str, str] tags: A mapping of tags assigned to the resource. :param str tenant_id: The subscription tenant ID. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "location_placement_id", location_placement_id) - pulumi.set(__self__, "quota_id", quota_id) - pulumi.set(__self__, "spending_limit", spending_limit) - pulumi.set(__self__, "state", state) - pulumi.set(__self__, "subscription_id", subscription_id) - pulumi.set(__self__, "tags", tags) - pulumi.set(__self__, "tenant_id", tenant_id) + GetSubscriptionsSubscriptionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + id=id, + location_placement_id=location_placement_id, + quota_id=quota_id, + spending_limit=spending_limit, + state=state, + subscription_id=subscription_id, + tags=tags, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[str] = None, + id: Optional[str] = None, + location_placement_id: Optional[str] = None, + quota_id: Optional[str] = None, + spending_limit: Optional[str] = None, + state: Optional[str] = None, + subscription_id: Optional[str] = None, + tags: Optional[Mapping[str, str]] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if location_placement_id is None and 'locationPlacementId' in kwargs: + location_placement_id = kwargs['locationPlacementId'] + if location_placement_id is None: + raise TypeError("Missing 'location_placement_id' argument") + if quota_id is None and 'quotaId' in kwargs: + quota_id = kwargs['quotaId'] + if quota_id is None: + raise TypeError("Missing 'quota_id' argument") + if spending_limit is None and 'spendingLimit' in kwargs: + spending_limit = kwargs['spendingLimit'] + if spending_limit is None: + raise TypeError("Missing 'spending_limit' argument") + if state is None: + raise TypeError("Missing 'state' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + if tags is None: + raise TypeError("Missing 'tags' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("display_name", display_name) + _setter("id", id) + _setter("location_placement_id", location_placement_id) + _setter("quota_id", quota_id) + _setter("spending_limit", spending_limit) + _setter("state", state) + _setter("subscription_id", subscription_id) + _setter("tags", tags) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="displayName") diff --git a/sdk/python/pulumi_azure/core/portal_tenant_configuration.py b/sdk/python/pulumi_azure/core/portal_tenant_configuration.py index 91866d49d7..849a2f09b9 100644 --- a/sdk/python/pulumi_azure/core/portal_tenant_configuration.py +++ b/sdk/python/pulumi_azure/core/portal_tenant_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PortalTenantConfigurationArgs', 'PortalTenantConfiguration'] @@ -21,7 +21,22 @@ def __init__(__self__, *, > **Note:** When `private_markdown_storage_enforced` is set to `true`, only external storage configuration (URI) is allowed for Markdown tiles. Inline content configuration will be prohibited. """ - pulumi.set(__self__, "private_markdown_storage_enforced", private_markdown_storage_enforced) + PortalTenantConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_markdown_storage_enforced=private_markdown_storage_enforced, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_markdown_storage_enforced: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_markdown_storage_enforced is None and 'privateMarkdownStorageEnforced' in kwargs: + private_markdown_storage_enforced = kwargs['privateMarkdownStorageEnforced'] + if private_markdown_storage_enforced is None: + raise TypeError("Missing 'private_markdown_storage_enforced' argument") + + _setter("private_markdown_storage_enforced", private_markdown_storage_enforced) @property @pulumi.getter(name="privateMarkdownStorageEnforced") @@ -48,8 +63,21 @@ def __init__(__self__, *, > **Note:** When `private_markdown_storage_enforced` is set to `true`, only external storage configuration (URI) is allowed for Markdown tiles. Inline content configuration will be prohibited. """ + _PortalTenantConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_markdown_storage_enforced=private_markdown_storage_enforced, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_markdown_storage_enforced: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_markdown_storage_enforced is None and 'privateMarkdownStorageEnforced' in kwargs: + private_markdown_storage_enforced = kwargs['privateMarkdownStorageEnforced'] + if private_markdown_storage_enforced is not None: - pulumi.set(__self__, "private_markdown_storage_enforced", private_markdown_storage_enforced) + _setter("private_markdown_storage_enforced", private_markdown_storage_enforced) @property @pulumi.getter(name="privateMarkdownStorageEnforced") @@ -151,6 +179,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PortalTenantConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/resource_deployment_script_azure_cli.py b/sdk/python/pulumi_azure/core/resource_deployment_script_azure_cli.py index 4a2fd67848..06a2c6fa37 100644 --- a/sdk/python/pulumi_azure/core/resource_deployment_script_azure_cli.py +++ b/sdk/python/pulumi_azure/core/resource_deployment_script_azure_cli.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -53,37 +53,106 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Resource Deployment Script. :param pulumi.Input[str] timeout: Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "retention_interval", retention_interval) - pulumi.set(__self__, "version", version) + ResourceDeploymentScriptAzureCliArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + retention_interval=retention_interval, + version=version, + cleanup_preference=cleanup_preference, + command_line=command_line, + container=container, + environment_variables=environment_variables, + force_update_tag=force_update_tag, + identity=identity, + location=location, + name=name, + primary_script_uri=primary_script_uri, + script_content=script_content, + storage_account=storage_account, + supporting_script_uris=supporting_script_uris, + tags=tags, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_interval: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + cleanup_preference: Optional[pulumi.Input[str]] = None, + command_line: Optional[pulumi.Input[str]] = None, + container: Optional[pulumi.Input['ResourceDeploymentScriptAzureCliContainerArgs']] = None, + environment_variables: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceDeploymentScriptAzureCliEnvironmentVariableArgs']]]] = None, + force_update_tag: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ResourceDeploymentScriptAzureCliIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_script_uri: Optional[pulumi.Input[str]] = None, + script_content: Optional[pulumi.Input[str]] = None, + storage_account: Optional[pulumi.Input['ResourceDeploymentScriptAzureCliStorageAccountArgs']] = None, + supporting_script_uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timeout: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if retention_interval is None and 'retentionInterval' in kwargs: + retention_interval = kwargs['retentionInterval'] + if retention_interval is None: + raise TypeError("Missing 'retention_interval' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if cleanup_preference is None and 'cleanupPreference' in kwargs: + cleanup_preference = kwargs['cleanupPreference'] + if command_line is None and 'commandLine' in kwargs: + command_line = kwargs['commandLine'] + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if force_update_tag is None and 'forceUpdateTag' in kwargs: + force_update_tag = kwargs['forceUpdateTag'] + if primary_script_uri is None and 'primaryScriptUri' in kwargs: + primary_script_uri = kwargs['primaryScriptUri'] + if script_content is None and 'scriptContent' in kwargs: + script_content = kwargs['scriptContent'] + if storage_account is None and 'storageAccount' in kwargs: + storage_account = kwargs['storageAccount'] + if supporting_script_uris is None and 'supportingScriptUris' in kwargs: + supporting_script_uris = kwargs['supportingScriptUris'] + + _setter("resource_group_name", resource_group_name) + _setter("retention_interval", retention_interval) + _setter("version", version) if cleanup_preference is not None: - pulumi.set(__self__, "cleanup_preference", cleanup_preference) + _setter("cleanup_preference", cleanup_preference) if command_line is not None: - pulumi.set(__self__, "command_line", command_line) + _setter("command_line", command_line) if container is not None: - pulumi.set(__self__, "container", container) + _setter("container", container) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if force_update_tag is not None: - pulumi.set(__self__, "force_update_tag", force_update_tag) + _setter("force_update_tag", force_update_tag) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_script_uri is not None: - pulumi.set(__self__, "primary_script_uri", primary_script_uri) + _setter("primary_script_uri", primary_script_uri) if script_content is not None: - pulumi.set(__self__, "script_content", script_content) + _setter("script_content", script_content) if storage_account is not None: - pulumi.set(__self__, "storage_account", storage_account) + _setter("storage_account", storage_account) if supporting_script_uris is not None: - pulumi.set(__self__, "supporting_script_uris", supporting_script_uris) + _setter("supporting_script_uris", supporting_script_uris) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter(name="resourceGroupName") @@ -332,42 +401,107 @@ def __init__(__self__, *, :param pulumi.Input[str] timeout: Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. :param pulumi.Input[str] version: Specifies the version of the Azure CLI that should be used in the format `X.Y.Z` (e.g. `2.30.0`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-cli/tags/list). Changing this forces a new Resource Deployment Script to be created. """ + _ResourceDeploymentScriptAzureCliState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cleanup_preference=cleanup_preference, + command_line=command_line, + container=container, + environment_variables=environment_variables, + force_update_tag=force_update_tag, + identity=identity, + location=location, + name=name, + outputs=outputs, + primary_script_uri=primary_script_uri, + resource_group_name=resource_group_name, + retention_interval=retention_interval, + script_content=script_content, + storage_account=storage_account, + supporting_script_uris=supporting_script_uris, + tags=tags, + timeout=timeout, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cleanup_preference: Optional[pulumi.Input[str]] = None, + command_line: Optional[pulumi.Input[str]] = None, + container: Optional[pulumi.Input['ResourceDeploymentScriptAzureCliContainerArgs']] = None, + environment_variables: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceDeploymentScriptAzureCliEnvironmentVariableArgs']]]] = None, + force_update_tag: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ResourceDeploymentScriptAzureCliIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outputs: Optional[pulumi.Input[str]] = None, + primary_script_uri: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_interval: Optional[pulumi.Input[str]] = None, + script_content: Optional[pulumi.Input[str]] = None, + storage_account: Optional[pulumi.Input['ResourceDeploymentScriptAzureCliStorageAccountArgs']] = None, + supporting_script_uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timeout: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cleanup_preference is None and 'cleanupPreference' in kwargs: + cleanup_preference = kwargs['cleanupPreference'] + if command_line is None and 'commandLine' in kwargs: + command_line = kwargs['commandLine'] + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if force_update_tag is None and 'forceUpdateTag' in kwargs: + force_update_tag = kwargs['forceUpdateTag'] + if primary_script_uri is None and 'primaryScriptUri' in kwargs: + primary_script_uri = kwargs['primaryScriptUri'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retention_interval is None and 'retentionInterval' in kwargs: + retention_interval = kwargs['retentionInterval'] + if script_content is None and 'scriptContent' in kwargs: + script_content = kwargs['scriptContent'] + if storage_account is None and 'storageAccount' in kwargs: + storage_account = kwargs['storageAccount'] + if supporting_script_uris is None and 'supportingScriptUris' in kwargs: + supporting_script_uris = kwargs['supportingScriptUris'] + if cleanup_preference is not None: - pulumi.set(__self__, "cleanup_preference", cleanup_preference) + _setter("cleanup_preference", cleanup_preference) if command_line is not None: - pulumi.set(__self__, "command_line", command_line) + _setter("command_line", command_line) if container is not None: - pulumi.set(__self__, "container", container) + _setter("container", container) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if force_update_tag is not None: - pulumi.set(__self__, "force_update_tag", force_update_tag) + _setter("force_update_tag", force_update_tag) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outputs is not None: - pulumi.set(__self__, "outputs", outputs) + _setter("outputs", outputs) if primary_script_uri is not None: - pulumi.set(__self__, "primary_script_uri", primary_script_uri) + _setter("primary_script_uri", primary_script_uri) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retention_interval is not None: - pulumi.set(__self__, "retention_interval", retention_interval) + _setter("retention_interval", retention_interval) if script_content is not None: - pulumi.set(__self__, "script_content", script_content) + _setter("script_content", script_content) if storage_account is not None: - pulumi.set(__self__, "storage_account", storage_account) + _setter("storage_account", storage_account) if supporting_script_uris is not None: - pulumi.set(__self__, "supporting_script_uris", supporting_script_uris) + _setter("supporting_script_uris", supporting_script_uris) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="cleanupPreference") @@ -725,6 +859,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourceDeploymentScriptAzureCliArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -758,9 +896,19 @@ def _internal_init(__self__, __props__.__dict__["cleanup_preference"] = cleanup_preference __props__.__dict__["command_line"] = command_line + if container is not None and not isinstance(container, ResourceDeploymentScriptAzureCliContainerArgs): + container = container or {} + def _setter(key, value): + container[key] = value + ResourceDeploymentScriptAzureCliContainerArgs._configure(_setter, **container) __props__.__dict__["container"] = container __props__.__dict__["environment_variables"] = environment_variables __props__.__dict__["force_update_tag"] = force_update_tag + if identity is not None and not isinstance(identity, ResourceDeploymentScriptAzureCliIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ResourceDeploymentScriptAzureCliIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name @@ -772,6 +920,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'retention_interval'") __props__.__dict__["retention_interval"] = retention_interval __props__.__dict__["script_content"] = script_content + if storage_account is not None and not isinstance(storage_account, ResourceDeploymentScriptAzureCliStorageAccountArgs): + storage_account = storage_account or {} + def _setter(key, value): + storage_account[key] = value + ResourceDeploymentScriptAzureCliStorageAccountArgs._configure(_setter, **storage_account) __props__.__dict__["storage_account"] = storage_account __props__.__dict__["supporting_script_uris"] = supporting_script_uris __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/core/resource_deployment_script_power_shell.py b/sdk/python/pulumi_azure/core/resource_deployment_script_power_shell.py index db23f8298d..30ad4b23e5 100644 --- a/sdk/python/pulumi_azure/core/resource_deployment_script_power_shell.py +++ b/sdk/python/pulumi_azure/core/resource_deployment_script_power_shell.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -53,37 +53,106 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Resource Deployment Script. :param pulumi.Input[str] timeout: Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "retention_interval", retention_interval) - pulumi.set(__self__, "version", version) + ResourceDeploymentScriptPowerShellArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + retention_interval=retention_interval, + version=version, + cleanup_preference=cleanup_preference, + command_line=command_line, + container=container, + environment_variables=environment_variables, + force_update_tag=force_update_tag, + identity=identity, + location=location, + name=name, + primary_script_uri=primary_script_uri, + script_content=script_content, + storage_account=storage_account, + supporting_script_uris=supporting_script_uris, + tags=tags, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_interval: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + cleanup_preference: Optional[pulumi.Input[str]] = None, + command_line: Optional[pulumi.Input[str]] = None, + container: Optional[pulumi.Input['ResourceDeploymentScriptPowerShellContainerArgs']] = None, + environment_variables: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceDeploymentScriptPowerShellEnvironmentVariableArgs']]]] = None, + force_update_tag: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ResourceDeploymentScriptPowerShellIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_script_uri: Optional[pulumi.Input[str]] = None, + script_content: Optional[pulumi.Input[str]] = None, + storage_account: Optional[pulumi.Input['ResourceDeploymentScriptPowerShellStorageAccountArgs']] = None, + supporting_script_uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timeout: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if retention_interval is None and 'retentionInterval' in kwargs: + retention_interval = kwargs['retentionInterval'] + if retention_interval is None: + raise TypeError("Missing 'retention_interval' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if cleanup_preference is None and 'cleanupPreference' in kwargs: + cleanup_preference = kwargs['cleanupPreference'] + if command_line is None and 'commandLine' in kwargs: + command_line = kwargs['commandLine'] + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if force_update_tag is None and 'forceUpdateTag' in kwargs: + force_update_tag = kwargs['forceUpdateTag'] + if primary_script_uri is None and 'primaryScriptUri' in kwargs: + primary_script_uri = kwargs['primaryScriptUri'] + if script_content is None and 'scriptContent' in kwargs: + script_content = kwargs['scriptContent'] + if storage_account is None and 'storageAccount' in kwargs: + storage_account = kwargs['storageAccount'] + if supporting_script_uris is None and 'supportingScriptUris' in kwargs: + supporting_script_uris = kwargs['supportingScriptUris'] + + _setter("resource_group_name", resource_group_name) + _setter("retention_interval", retention_interval) + _setter("version", version) if cleanup_preference is not None: - pulumi.set(__self__, "cleanup_preference", cleanup_preference) + _setter("cleanup_preference", cleanup_preference) if command_line is not None: - pulumi.set(__self__, "command_line", command_line) + _setter("command_line", command_line) if container is not None: - pulumi.set(__self__, "container", container) + _setter("container", container) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if force_update_tag is not None: - pulumi.set(__self__, "force_update_tag", force_update_tag) + _setter("force_update_tag", force_update_tag) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_script_uri is not None: - pulumi.set(__self__, "primary_script_uri", primary_script_uri) + _setter("primary_script_uri", primary_script_uri) if script_content is not None: - pulumi.set(__self__, "script_content", script_content) + _setter("script_content", script_content) if storage_account is not None: - pulumi.set(__self__, "storage_account", storage_account) + _setter("storage_account", storage_account) if supporting_script_uris is not None: - pulumi.set(__self__, "supporting_script_uris", supporting_script_uris) + _setter("supporting_script_uris", supporting_script_uris) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter(name="resourceGroupName") @@ -332,42 +401,107 @@ def __init__(__self__, *, :param pulumi.Input[str] timeout: Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created. :param pulumi.Input[str] version: Specifies the version of the Azure PowerShell that should be used in the format `X.Y` (e.g. `9.7`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-powershell/tags/list). Changing this forces a new Resource Deployment Script to be created. """ + _ResourceDeploymentScriptPowerShellState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cleanup_preference=cleanup_preference, + command_line=command_line, + container=container, + environment_variables=environment_variables, + force_update_tag=force_update_tag, + identity=identity, + location=location, + name=name, + outputs=outputs, + primary_script_uri=primary_script_uri, + resource_group_name=resource_group_name, + retention_interval=retention_interval, + script_content=script_content, + storage_account=storage_account, + supporting_script_uris=supporting_script_uris, + tags=tags, + timeout=timeout, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cleanup_preference: Optional[pulumi.Input[str]] = None, + command_line: Optional[pulumi.Input[str]] = None, + container: Optional[pulumi.Input['ResourceDeploymentScriptPowerShellContainerArgs']] = None, + environment_variables: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceDeploymentScriptPowerShellEnvironmentVariableArgs']]]] = None, + force_update_tag: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ResourceDeploymentScriptPowerShellIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outputs: Optional[pulumi.Input[str]] = None, + primary_script_uri: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_interval: Optional[pulumi.Input[str]] = None, + script_content: Optional[pulumi.Input[str]] = None, + storage_account: Optional[pulumi.Input['ResourceDeploymentScriptPowerShellStorageAccountArgs']] = None, + supporting_script_uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timeout: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cleanup_preference is None and 'cleanupPreference' in kwargs: + cleanup_preference = kwargs['cleanupPreference'] + if command_line is None and 'commandLine' in kwargs: + command_line = kwargs['commandLine'] + if environment_variables is None and 'environmentVariables' in kwargs: + environment_variables = kwargs['environmentVariables'] + if force_update_tag is None and 'forceUpdateTag' in kwargs: + force_update_tag = kwargs['forceUpdateTag'] + if primary_script_uri is None and 'primaryScriptUri' in kwargs: + primary_script_uri = kwargs['primaryScriptUri'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retention_interval is None and 'retentionInterval' in kwargs: + retention_interval = kwargs['retentionInterval'] + if script_content is None and 'scriptContent' in kwargs: + script_content = kwargs['scriptContent'] + if storage_account is None and 'storageAccount' in kwargs: + storage_account = kwargs['storageAccount'] + if supporting_script_uris is None and 'supportingScriptUris' in kwargs: + supporting_script_uris = kwargs['supportingScriptUris'] + if cleanup_preference is not None: - pulumi.set(__self__, "cleanup_preference", cleanup_preference) + _setter("cleanup_preference", cleanup_preference) if command_line is not None: - pulumi.set(__self__, "command_line", command_line) + _setter("command_line", command_line) if container is not None: - pulumi.set(__self__, "container", container) + _setter("container", container) if environment_variables is not None: - pulumi.set(__self__, "environment_variables", environment_variables) + _setter("environment_variables", environment_variables) if force_update_tag is not None: - pulumi.set(__self__, "force_update_tag", force_update_tag) + _setter("force_update_tag", force_update_tag) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outputs is not None: - pulumi.set(__self__, "outputs", outputs) + _setter("outputs", outputs) if primary_script_uri is not None: - pulumi.set(__self__, "primary_script_uri", primary_script_uri) + _setter("primary_script_uri", primary_script_uri) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retention_interval is not None: - pulumi.set(__self__, "retention_interval", retention_interval) + _setter("retention_interval", retention_interval) if script_content is not None: - pulumi.set(__self__, "script_content", script_content) + _setter("script_content", script_content) if storage_account is not None: - pulumi.set(__self__, "storage_account", storage_account) + _setter("storage_account", storage_account) if supporting_script_uris is not None: - pulumi.set(__self__, "supporting_script_uris", supporting_script_uris) + _setter("supporting_script_uris", supporting_script_uris) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="cleanupPreference") @@ -735,6 +869,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourceDeploymentScriptPowerShellArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -768,9 +906,19 @@ def _internal_init(__self__, __props__.__dict__["cleanup_preference"] = cleanup_preference __props__.__dict__["command_line"] = command_line + if container is not None and not isinstance(container, ResourceDeploymentScriptPowerShellContainerArgs): + container = container or {} + def _setter(key, value): + container[key] = value + ResourceDeploymentScriptPowerShellContainerArgs._configure(_setter, **container) __props__.__dict__["container"] = container __props__.__dict__["environment_variables"] = environment_variables __props__.__dict__["force_update_tag"] = force_update_tag + if identity is not None and not isinstance(identity, ResourceDeploymentScriptPowerShellIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ResourceDeploymentScriptPowerShellIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name @@ -782,6 +930,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'retention_interval'") __props__.__dict__["retention_interval"] = retention_interval __props__.__dict__["script_content"] = script_content + if storage_account is not None and not isinstance(storage_account, ResourceDeploymentScriptPowerShellStorageAccountArgs): + storage_account = storage_account or {} + def _setter(key, value): + storage_account[key] = value + ResourceDeploymentScriptPowerShellStorageAccountArgs._configure(_setter, **storage_account) __props__.__dict__["storage_account"] = storage_account __props__.__dict__["supporting_script_uris"] = supporting_script_uris __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/core/resource_group.py b/sdk/python/pulumi_azure/core/resource_group.py index 30ff181426..faa69ee076 100644 --- a/sdk/python/pulumi_azure/core/resource_group.py +++ b/sdk/python/pulumi_azure/core/resource_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ResourceGroupArgs', 'ResourceGroup'] @@ -25,14 +25,33 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Resource Group. """ + ResourceGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + managed_by=managed_by, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + managed_by: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_by is None and 'managedBy' in kwargs: + managed_by = kwargs['managedBy'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_by is not None: - pulumi.set(__self__, "managed_by", managed_by) + _setter("managed_by", managed_by) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -97,14 +116,33 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Resource Group. """ + _ResourceGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + managed_by=managed_by, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + managed_by: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_by is None and 'managedBy' in kwargs: + managed_by = kwargs['managedBy'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_by is not None: - pulumi.set(__self__, "managed_by", managed_by) + _setter("managed_by", managed_by) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -224,6 +262,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourceGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/resource_group_cost_management_export.py b/sdk/python/pulumi_azure/core/resource_group_cost_management_export.py index d692d501d8..dc4f4f851a 100644 --- a/sdk/python/pulumi_azure/core/resource_group_cost_management_export.py +++ b/sdk/python/pulumi_azure/core/resource_group_cost_management_export.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,16 +35,65 @@ def __init__(__self__, *, :param pulumi.Input[bool] active: Is the cost management export active? Default is `true`. :param pulumi.Input[str] name: Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "export_data_options", export_data_options) - pulumi.set(__self__, "export_data_storage_location", export_data_storage_location) - pulumi.set(__self__, "recurrence_period_end_date", recurrence_period_end_date) - pulumi.set(__self__, "recurrence_period_start_date", recurrence_period_start_date) - pulumi.set(__self__, "recurrence_type", recurrence_type) - pulumi.set(__self__, "resource_group_id", resource_group_id) + ResourceGroupCostManagementExportArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + export_data_options=export_data_options, + export_data_storage_location=export_data_storage_location, + recurrence_period_end_date=recurrence_period_end_date, + recurrence_period_start_date=recurrence_period_start_date, + recurrence_type=recurrence_type, + resource_group_id=resource_group_id, + active=active, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + export_data_options: Optional[pulumi.Input['ResourceGroupCostManagementExportExportDataOptionsArgs']] = None, + export_data_storage_location: Optional[pulumi.Input['ResourceGroupCostManagementExportExportDataStorageLocationArgs']] = None, + recurrence_period_end_date: Optional[pulumi.Input[str]] = None, + recurrence_period_start_date: Optional[pulumi.Input[str]] = None, + recurrence_type: Optional[pulumi.Input[str]] = None, + resource_group_id: Optional[pulumi.Input[str]] = None, + active: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if export_data_options is None and 'exportDataOptions' in kwargs: + export_data_options = kwargs['exportDataOptions'] + if export_data_options is None: + raise TypeError("Missing 'export_data_options' argument") + if export_data_storage_location is None and 'exportDataStorageLocation' in kwargs: + export_data_storage_location = kwargs['exportDataStorageLocation'] + if export_data_storage_location is None: + raise TypeError("Missing 'export_data_storage_location' argument") + if recurrence_period_end_date is None and 'recurrencePeriodEndDate' in kwargs: + recurrence_period_end_date = kwargs['recurrencePeriodEndDate'] + if recurrence_period_end_date is None: + raise TypeError("Missing 'recurrence_period_end_date' argument") + if recurrence_period_start_date is None and 'recurrencePeriodStartDate' in kwargs: + recurrence_period_start_date = kwargs['recurrencePeriodStartDate'] + if recurrence_period_start_date is None: + raise TypeError("Missing 'recurrence_period_start_date' argument") + if recurrence_type is None and 'recurrenceType' in kwargs: + recurrence_type = kwargs['recurrenceType'] + if recurrence_type is None: + raise TypeError("Missing 'recurrence_type' argument") + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if resource_group_id is None: + raise TypeError("Missing 'resource_group_id' argument") + + _setter("export_data_options", export_data_options) + _setter("export_data_storage_location", export_data_storage_location) + _setter("recurrence_period_end_date", recurrence_period_end_date) + _setter("recurrence_period_start_date", recurrence_period_start_date) + _setter("recurrence_type", recurrence_type) + _setter("resource_group_id", resource_group_id) if active is not None: - pulumi.set(__self__, "active", active) + _setter("active", active) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="exportDataOptions") @@ -165,22 +214,59 @@ def __init__(__self__, *, :param pulumi.Input[str] recurrence_type: How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. :param pulumi.Input[str] resource_group_id: The id of the resource group on which to create an export. Changing this forces a new resource to be created. """ + _ResourceGroupCostManagementExportState._configure( + lambda key, value: pulumi.set(__self__, key, value), + active=active, + export_data_options=export_data_options, + export_data_storage_location=export_data_storage_location, + name=name, + recurrence_period_end_date=recurrence_period_end_date, + recurrence_period_start_date=recurrence_period_start_date, + recurrence_type=recurrence_type, + resource_group_id=resource_group_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active: Optional[pulumi.Input[bool]] = None, + export_data_options: Optional[pulumi.Input['ResourceGroupCostManagementExportExportDataOptionsArgs']] = None, + export_data_storage_location: Optional[pulumi.Input['ResourceGroupCostManagementExportExportDataStorageLocationArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + recurrence_period_end_date: Optional[pulumi.Input[str]] = None, + recurrence_period_start_date: Optional[pulumi.Input[str]] = None, + recurrence_type: Optional[pulumi.Input[str]] = None, + resource_group_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if export_data_options is None and 'exportDataOptions' in kwargs: + export_data_options = kwargs['exportDataOptions'] + if export_data_storage_location is None and 'exportDataStorageLocation' in kwargs: + export_data_storage_location = kwargs['exportDataStorageLocation'] + if recurrence_period_end_date is None and 'recurrencePeriodEndDate' in kwargs: + recurrence_period_end_date = kwargs['recurrencePeriodEndDate'] + if recurrence_period_start_date is None and 'recurrencePeriodStartDate' in kwargs: + recurrence_period_start_date = kwargs['recurrencePeriodStartDate'] + if recurrence_type is None and 'recurrenceType' in kwargs: + recurrence_type = kwargs['recurrenceType'] + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if active is not None: - pulumi.set(__self__, "active", active) + _setter("active", active) if export_data_options is not None: - pulumi.set(__self__, "export_data_options", export_data_options) + _setter("export_data_options", export_data_options) if export_data_storage_location is not None: - pulumi.set(__self__, "export_data_storage_location", export_data_storage_location) + _setter("export_data_storage_location", export_data_storage_location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recurrence_period_end_date is not None: - pulumi.set(__self__, "recurrence_period_end_date", recurrence_period_end_date) + _setter("recurrence_period_end_date", recurrence_period_end_date) if recurrence_period_start_date is not None: - pulumi.set(__self__, "recurrence_period_start_date", recurrence_period_start_date) + _setter("recurrence_period_start_date", recurrence_period_start_date) if recurrence_type is not None: - pulumi.set(__self__, "recurrence_type", recurrence_type) + _setter("recurrence_type", recurrence_type) if resource_group_id is not None: - pulumi.set(__self__, "resource_group_id", resource_group_id) + _setter("resource_group_id", resource_group_id) @property @pulumi.getter @@ -398,6 +484,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourceGroupCostManagementExportArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -421,9 +511,19 @@ def _internal_init(__self__, __props__ = ResourceGroupCostManagementExportArgs.__new__(ResourceGroupCostManagementExportArgs) __props__.__dict__["active"] = active + if export_data_options is not None and not isinstance(export_data_options, ResourceGroupCostManagementExportExportDataOptionsArgs): + export_data_options = export_data_options or {} + def _setter(key, value): + export_data_options[key] = value + ResourceGroupCostManagementExportExportDataOptionsArgs._configure(_setter, **export_data_options) if export_data_options is None and not opts.urn: raise TypeError("Missing required property 'export_data_options'") __props__.__dict__["export_data_options"] = export_data_options + if export_data_storage_location is not None and not isinstance(export_data_storage_location, ResourceGroupCostManagementExportExportDataStorageLocationArgs): + export_data_storage_location = export_data_storage_location or {} + def _setter(key, value): + export_data_storage_location[key] = value + ResourceGroupCostManagementExportExportDataStorageLocationArgs._configure(_setter, **export_data_storage_location) if export_data_storage_location is None and not opts.urn: raise TypeError("Missing required property 'export_data_storage_location'") __props__.__dict__["export_data_storage_location"] = export_data_storage_location diff --git a/sdk/python/pulumi_azure/core/resource_group_cost_management_view.py b/sdk/python/pulumi_azure/core/resource_group_cost_management_view.py index ba209e4e52..0e8da37a31 100644 --- a/sdk/python/pulumi_azure/core/resource_group_cost_management_view.py +++ b/sdk/python/pulumi_azure/core/resource_group_cost_management_view.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,19 +39,70 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Cost Management View for a Resource Group. Changing this forces a new Cost Management View for a Resource Group to be created. :param pulumi.Input[Sequence[pulumi.Input['ResourceGroupCostManagementViewPivotArgs']]] pivots: One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. """ - pulumi.set(__self__, "accumulated", accumulated) - pulumi.set(__self__, "chart_type", chart_type) - pulumi.set(__self__, "dataset", dataset) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "report_type", report_type) - pulumi.set(__self__, "resource_group_id", resource_group_id) - pulumi.set(__self__, "timeframe", timeframe) + ResourceGroupCostManagementViewArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + accumulated=accumulated, + chart_type=chart_type, + dataset=dataset, + display_name=display_name, + report_type=report_type, + resource_group_id=resource_group_id, + timeframe=timeframe, + kpis=kpis, + name=name, + pivots=pivots, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + accumulated: Optional[pulumi.Input[bool]] = None, + chart_type: Optional[pulumi.Input[str]] = None, + dataset: Optional[pulumi.Input['ResourceGroupCostManagementViewDatasetArgs']] = None, + display_name: Optional[pulumi.Input[str]] = None, + report_type: Optional[pulumi.Input[str]] = None, + resource_group_id: Optional[pulumi.Input[str]] = None, + timeframe: Optional[pulumi.Input[str]] = None, + kpis: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupCostManagementViewKpiArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + pivots: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupCostManagementViewPivotArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if accumulated is None: + raise TypeError("Missing 'accumulated' argument") + if chart_type is None and 'chartType' in kwargs: + chart_type = kwargs['chartType'] + if chart_type is None: + raise TypeError("Missing 'chart_type' argument") + if dataset is None: + raise TypeError("Missing 'dataset' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if report_type is None and 'reportType' in kwargs: + report_type = kwargs['reportType'] + if report_type is None: + raise TypeError("Missing 'report_type' argument") + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if resource_group_id is None: + raise TypeError("Missing 'resource_group_id' argument") + if timeframe is None: + raise TypeError("Missing 'timeframe' argument") + + _setter("accumulated", accumulated) + _setter("chart_type", chart_type) + _setter("dataset", dataset) + _setter("display_name", display_name) + _setter("report_type", report_type) + _setter("resource_group_id", resource_group_id) + _setter("timeframe", timeframe) if kpis is not None: - pulumi.set(__self__, "kpis", kpis) + _setter("kpis", kpis) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pivots is not None: - pulumi.set(__self__, "pivots", pivots) + _setter("pivots", pivots) @property @pulumi.getter @@ -200,26 +251,63 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_id: The ID of the Resource Group this View is scoped to. Changing this forces a new Cost Management View for a Resource Group to be created. :param pulumi.Input[str] timeframe: The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. """ + _ResourceGroupCostManagementViewState._configure( + lambda key, value: pulumi.set(__self__, key, value), + accumulated=accumulated, + chart_type=chart_type, + dataset=dataset, + display_name=display_name, + kpis=kpis, + name=name, + pivots=pivots, + report_type=report_type, + resource_group_id=resource_group_id, + timeframe=timeframe, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + accumulated: Optional[pulumi.Input[bool]] = None, + chart_type: Optional[pulumi.Input[str]] = None, + dataset: Optional[pulumi.Input['ResourceGroupCostManagementViewDatasetArgs']] = None, + display_name: Optional[pulumi.Input[str]] = None, + kpis: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupCostManagementViewKpiArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + pivots: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupCostManagementViewPivotArgs']]]] = None, + report_type: Optional[pulumi.Input[str]] = None, + resource_group_id: Optional[pulumi.Input[str]] = None, + timeframe: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if chart_type is None and 'chartType' in kwargs: + chart_type = kwargs['chartType'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if report_type is None and 'reportType' in kwargs: + report_type = kwargs['reportType'] + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if accumulated is not None: - pulumi.set(__self__, "accumulated", accumulated) + _setter("accumulated", accumulated) if chart_type is not None: - pulumi.set(__self__, "chart_type", chart_type) + _setter("chart_type", chart_type) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if kpis is not None: - pulumi.set(__self__, "kpis", kpis) + _setter("kpis", kpis) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pivots is not None: - pulumi.set(__self__, "pivots", pivots) + _setter("pivots", pivots) if report_type is not None: - pulumi.set(__self__, "report_type", report_type) + _setter("report_type", report_type) if resource_group_id is not None: - pulumi.set(__self__, "resource_group_id", resource_group_id) + _setter("resource_group_id", resource_group_id) if timeframe is not None: - pulumi.set(__self__, "timeframe", timeframe) + _setter("timeframe", timeframe) @property @pulumi.getter @@ -455,6 +543,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourceGroupCostManagementViewArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -485,6 +577,11 @@ def _internal_init(__self__, if chart_type is None and not opts.urn: raise TypeError("Missing required property 'chart_type'") __props__.__dict__["chart_type"] = chart_type + if dataset is not None and not isinstance(dataset, ResourceGroupCostManagementViewDatasetArgs): + dataset = dataset or {} + def _setter(key, value): + dataset[key] = value + ResourceGroupCostManagementViewDatasetArgs._configure(_setter, **dataset) if dataset is None and not opts.urn: raise TypeError("Missing required property 'dataset'") __props__.__dict__["dataset"] = dataset diff --git a/sdk/python/pulumi_azure/core/resource_group_policy_assignment.py b/sdk/python/pulumi_azure/core/resource_group_policy_assignment.py index db489505da..cf91bdb9f1 100644 --- a/sdk/python/pulumi_azure/core/resource_group_policy_assignment.py +++ b/sdk/python/pulumi_azure/core/resource_group_policy_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,32 +49,85 @@ def __init__(__self__, *, :param pulumi.Input[str] parameters: A JSON mapping of any Parameters for this Policy. :param pulumi.Input[Sequence[pulumi.Input['ResourceGroupPolicyAssignmentResourceSelectorArgs']]] resource_selectors: One or more `resource_selectors` blocks as defined below to filter polices by resource properties. """ - pulumi.set(__self__, "policy_definition_id", policy_definition_id) - pulumi.set(__self__, "resource_group_id", resource_group_id) + ResourceGroupPolicyAssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy_definition_id=policy_definition_id, + resource_group_id=resource_group_id, + description=description, + display_name=display_name, + enforce=enforce, + identity=identity, + location=location, + metadata=metadata, + name=name, + non_compliance_messages=non_compliance_messages, + not_scopes=not_scopes, + overrides=overrides, + parameters=parameters, + resource_selectors=resource_selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy_definition_id: Optional[pulumi.Input[str]] = None, + resource_group_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enforce: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['ResourceGroupPolicyAssignmentIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + non_compliance_messages: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupPolicyAssignmentNonComplianceMessageArgs']]]] = None, + not_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + overrides: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupPolicyAssignmentOverrideArgs']]]] = None, + parameters: Optional[pulumi.Input[str]] = None, + resource_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupPolicyAssignmentResourceSelectorArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_id is None: + raise TypeError("Missing 'policy_definition_id' argument") + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if resource_group_id is None: + raise TypeError("Missing 'resource_group_id' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if non_compliance_messages is None and 'nonComplianceMessages' in kwargs: + non_compliance_messages = kwargs['nonComplianceMessages'] + if not_scopes is None and 'notScopes' in kwargs: + not_scopes = kwargs['notScopes'] + if resource_selectors is None and 'resourceSelectors' in kwargs: + resource_selectors = kwargs['resourceSelectors'] + + _setter("policy_definition_id", policy_definition_id) + _setter("resource_group_id", resource_group_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enforce is not None: - pulumi.set(__self__, "enforce", enforce) + _setter("enforce", enforce) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if non_compliance_messages is not None: - pulumi.set(__self__, "non_compliance_messages", non_compliance_messages) + _setter("non_compliance_messages", non_compliance_messages) if not_scopes is not None: - pulumi.set(__self__, "not_scopes", not_scopes) + _setter("not_scopes", not_scopes) if overrides is not None: - pulumi.set(__self__, "overrides", overrides) + _setter("overrides", overrides) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if resource_selectors is not None: - pulumi.set(__self__, "resource_selectors", resource_selectors) + _setter("resource_selectors", resource_selectors) @property @pulumi.getter(name="policyDefinitionId") @@ -283,34 +336,83 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_id: The ID of the Resource Group where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. :param pulumi.Input[Sequence[pulumi.Input['ResourceGroupPolicyAssignmentResourceSelectorArgs']]] resource_selectors: One or more `resource_selectors` blocks as defined below to filter polices by resource properties. """ + _ResourceGroupPolicyAssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + display_name=display_name, + enforce=enforce, + identity=identity, + location=location, + metadata=metadata, + name=name, + non_compliance_messages=non_compliance_messages, + not_scopes=not_scopes, + overrides=overrides, + parameters=parameters, + policy_definition_id=policy_definition_id, + resource_group_id=resource_group_id, + resource_selectors=resource_selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enforce: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['ResourceGroupPolicyAssignmentIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + non_compliance_messages: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupPolicyAssignmentNonComplianceMessageArgs']]]] = None, + not_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + overrides: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupPolicyAssignmentOverrideArgs']]]] = None, + parameters: Optional[pulumi.Input[str]] = None, + policy_definition_id: Optional[pulumi.Input[str]] = None, + resource_group_id: Optional[pulumi.Input[str]] = None, + resource_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceGroupPolicyAssignmentResourceSelectorArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if non_compliance_messages is None and 'nonComplianceMessages' in kwargs: + non_compliance_messages = kwargs['nonComplianceMessages'] + if not_scopes is None and 'notScopes' in kwargs: + not_scopes = kwargs['notScopes'] + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if resource_selectors is None and 'resourceSelectors' in kwargs: + resource_selectors = kwargs['resourceSelectors'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enforce is not None: - pulumi.set(__self__, "enforce", enforce) + _setter("enforce", enforce) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if non_compliance_messages is not None: - pulumi.set(__self__, "non_compliance_messages", non_compliance_messages) + _setter("non_compliance_messages", non_compliance_messages) if not_scopes is not None: - pulumi.set(__self__, "not_scopes", not_scopes) + _setter("not_scopes", not_scopes) if overrides is not None: - pulumi.set(__self__, "overrides", overrides) + _setter("overrides", overrides) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if policy_definition_id is not None: - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + _setter("policy_definition_id", policy_definition_id) if resource_group_id is not None: - pulumi.set(__self__, "resource_group_id", resource_group_id) + _setter("resource_group_id", resource_group_id) if resource_selectors is not None: - pulumi.set(__self__, "resource_selectors", resource_selectors) + _setter("resource_selectors", resource_selectors) @property @pulumi.getter @@ -634,6 +736,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourceGroupPolicyAssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -665,6 +771,11 @@ def _internal_init(__self__, __props__.__dict__["description"] = description __props__.__dict__["display_name"] = display_name __props__.__dict__["enforce"] = enforce + if identity is not None and not isinstance(identity, ResourceGroupPolicyAssignmentIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ResourceGroupPolicyAssignmentIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["metadata"] = metadata diff --git a/sdk/python/pulumi_azure/core/resource_group_policy_exemption.py b/sdk/python/pulumi_azure/core/resource_group_policy_exemption.py index 1eb73f3119..38c1e2718c 100644 --- a/sdk/python/pulumi_azure/core/resource_group_policy_exemption.py +++ b/sdk/python/pulumi_azure/core/resource_group_policy_exemption.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ResourceGroupPolicyExemptionArgs', 'ResourceGroupPolicyExemption'] @@ -35,21 +35,66 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Policy Exemption. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] policy_definition_reference_ids: The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. """ - pulumi.set(__self__, "exemption_category", exemption_category) - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) - pulumi.set(__self__, "resource_group_id", resource_group_id) + ResourceGroupPolicyExemptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + exemption_category=exemption_category, + policy_assignment_id=policy_assignment_id, + resource_group_id=resource_group_id, + description=description, + display_name=display_name, + expires_on=expires_on, + metadata=metadata, + name=name, + policy_definition_reference_ids=policy_definition_reference_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exemption_category: Optional[pulumi.Input[str]] = None, + policy_assignment_id: Optional[pulumi.Input[str]] = None, + resource_group_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + expires_on: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_definition_reference_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exemption_category is None and 'exemptionCategory' in kwargs: + exemption_category = kwargs['exemptionCategory'] + if exemption_category is None: + raise TypeError("Missing 'exemption_category' argument") + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_assignment_id is None: + raise TypeError("Missing 'policy_assignment_id' argument") + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if resource_group_id is None: + raise TypeError("Missing 'resource_group_id' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if expires_on is None and 'expiresOn' in kwargs: + expires_on = kwargs['expiresOn'] + if policy_definition_reference_ids is None and 'policyDefinitionReferenceIds' in kwargs: + policy_definition_reference_ids = kwargs['policyDefinitionReferenceIds'] + + _setter("exemption_category", exemption_category) + _setter("policy_assignment_id", policy_assignment_id) + _setter("resource_group_id", resource_group_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if expires_on is not None: - pulumi.set(__self__, "expires_on", expires_on) + _setter("expires_on", expires_on) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_definition_reference_ids is not None: - pulumi.set(__self__, "policy_definition_reference_ids", policy_definition_reference_ids) + _setter("policy_definition_reference_ids", policy_definition_reference_ids) @property @pulumi.getter(name="exemptionCategory") @@ -184,24 +229,63 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] policy_definition_reference_ids: The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. :param pulumi.Input[str] resource_group_id: The Resource Group ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. """ + _ResourceGroupPolicyExemptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + display_name=display_name, + exemption_category=exemption_category, + expires_on=expires_on, + metadata=metadata, + name=name, + policy_assignment_id=policy_assignment_id, + policy_definition_reference_ids=policy_definition_reference_ids, + resource_group_id=resource_group_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + exemption_category: Optional[pulumi.Input[str]] = None, + expires_on: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_assignment_id: Optional[pulumi.Input[str]] = None, + policy_definition_reference_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if exemption_category is None and 'exemptionCategory' in kwargs: + exemption_category = kwargs['exemptionCategory'] + if expires_on is None and 'expiresOn' in kwargs: + expires_on = kwargs['expiresOn'] + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_definition_reference_ids is None and 'policyDefinitionReferenceIds' in kwargs: + policy_definition_reference_ids = kwargs['policyDefinitionReferenceIds'] + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if exemption_category is not None: - pulumi.set(__self__, "exemption_category", exemption_category) + _setter("exemption_category", exemption_category) if expires_on is not None: - pulumi.set(__self__, "expires_on", expires_on) + _setter("expires_on", expires_on) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_assignment_id is not None: - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) + _setter("policy_assignment_id", policy_assignment_id) if policy_definition_reference_ids is not None: - pulumi.set(__self__, "policy_definition_reference_ids", policy_definition_reference_ids) + _setter("policy_definition_reference_ids", policy_definition_reference_ids) if resource_group_id is not None: - pulumi.set(__self__, "resource_group_id", resource_group_id) + _setter("resource_group_id", resource_group_id) @property @pulumi.getter @@ -423,6 +507,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourceGroupPolicyExemptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/resource_group_policy_remediation.py b/sdk/python/pulumi_azure/core/resource_group_policy_remediation.py index 686fe26d2d..ee07ebd597 100644 --- a/sdk/python/pulumi_azure/core/resource_group_policy_remediation.py +++ b/sdk/python/pulumi_azure/core/resource_group_policy_remediation.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ResourceGroupPolicyRemediationArgs', 'ResourceGroupPolicyRemediation'] @@ -27,27 +27,78 @@ def __init__(__self__, *, """ The set of arguments for constructing a ResourceGroupPolicyRemediation resource. """ - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) - pulumi.set(__self__, "resource_group_id", resource_group_id) + ResourceGroupPolicyRemediationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy_assignment_id=policy_assignment_id, + resource_group_id=resource_group_id, + failure_percentage=failure_percentage, + location_filters=location_filters, + name=name, + parallel_deployments=parallel_deployments, + policy_definition_id=policy_definition_id, + policy_definition_reference_id=policy_definition_reference_id, + resource_count=resource_count, + resource_discovery_mode=resource_discovery_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy_assignment_id: Optional[pulumi.Input[str]] = None, + resource_group_id: Optional[pulumi.Input[str]] = None, + failure_percentage: Optional[pulumi.Input[float]] = None, + location_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + parallel_deployments: Optional[pulumi.Input[int]] = None, + policy_definition_id: Optional[pulumi.Input[str]] = None, + policy_definition_reference_id: Optional[pulumi.Input[str]] = None, + resource_count: Optional[pulumi.Input[int]] = None, + resource_discovery_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_assignment_id is None: + raise TypeError("Missing 'policy_assignment_id' argument") + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if resource_group_id is None: + raise TypeError("Missing 'resource_group_id' argument") + if failure_percentage is None and 'failurePercentage' in kwargs: + failure_percentage = kwargs['failurePercentage'] + if location_filters is None and 'locationFilters' in kwargs: + location_filters = kwargs['locationFilters'] + if parallel_deployments is None and 'parallelDeployments' in kwargs: + parallel_deployments = kwargs['parallelDeployments'] + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + if resource_count is None and 'resourceCount' in kwargs: + resource_count = kwargs['resourceCount'] + if resource_discovery_mode is None and 'resourceDiscoveryMode' in kwargs: + resource_discovery_mode = kwargs['resourceDiscoveryMode'] + + _setter("policy_assignment_id", policy_assignment_id) + _setter("resource_group_id", resource_group_id) if failure_percentage is not None: - pulumi.set(__self__, "failure_percentage", failure_percentage) + _setter("failure_percentage", failure_percentage) if location_filters is not None: - pulumi.set(__self__, "location_filters", location_filters) + _setter("location_filters", location_filters) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parallel_deployments is not None: - pulumi.set(__self__, "parallel_deployments", parallel_deployments) + _setter("parallel_deployments", parallel_deployments) if policy_definition_id is not None: warnings.warn("""`policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""", DeprecationWarning) pulumi.log.warn("""policy_definition_id is deprecated: `policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""") if policy_definition_id is not None: - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + _setter("policy_definition_id", policy_definition_id) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) if resource_count is not None: - pulumi.set(__self__, "resource_count", resource_count) + _setter("resource_count", resource_count) if resource_discovery_mode is not None: - pulumi.set(__self__, "resource_discovery_mode", resource_discovery_mode) + _setter("resource_discovery_mode", resource_discovery_mode) @property @pulumi.getter(name="policyAssignmentId") @@ -159,29 +210,76 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering ResourceGroupPolicyRemediation resources. """ + _ResourceGroupPolicyRemediationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + failure_percentage=failure_percentage, + location_filters=location_filters, + name=name, + parallel_deployments=parallel_deployments, + policy_assignment_id=policy_assignment_id, + policy_definition_id=policy_definition_id, + policy_definition_reference_id=policy_definition_reference_id, + resource_count=resource_count, + resource_discovery_mode=resource_discovery_mode, + resource_group_id=resource_group_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + failure_percentage: Optional[pulumi.Input[float]] = None, + location_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + parallel_deployments: Optional[pulumi.Input[int]] = None, + policy_assignment_id: Optional[pulumi.Input[str]] = None, + policy_definition_id: Optional[pulumi.Input[str]] = None, + policy_definition_reference_id: Optional[pulumi.Input[str]] = None, + resource_count: Optional[pulumi.Input[int]] = None, + resource_discovery_mode: Optional[pulumi.Input[str]] = None, + resource_group_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failure_percentage is None and 'failurePercentage' in kwargs: + failure_percentage = kwargs['failurePercentage'] + if location_filters is None and 'locationFilters' in kwargs: + location_filters = kwargs['locationFilters'] + if parallel_deployments is None and 'parallelDeployments' in kwargs: + parallel_deployments = kwargs['parallelDeployments'] + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + if resource_count is None and 'resourceCount' in kwargs: + resource_count = kwargs['resourceCount'] + if resource_discovery_mode is None and 'resourceDiscoveryMode' in kwargs: + resource_discovery_mode = kwargs['resourceDiscoveryMode'] + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if failure_percentage is not None: - pulumi.set(__self__, "failure_percentage", failure_percentage) + _setter("failure_percentage", failure_percentage) if location_filters is not None: - pulumi.set(__self__, "location_filters", location_filters) + _setter("location_filters", location_filters) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parallel_deployments is not None: - pulumi.set(__self__, "parallel_deployments", parallel_deployments) + _setter("parallel_deployments", parallel_deployments) if policy_assignment_id is not None: - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) + _setter("policy_assignment_id", policy_assignment_id) if policy_definition_id is not None: warnings.warn("""`policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""", DeprecationWarning) pulumi.log.warn("""policy_definition_id is deprecated: `policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""") if policy_definition_id is not None: - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + _setter("policy_definition_id", policy_definition_id) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) if resource_count is not None: - pulumi.set(__self__, "resource_count", resource_count) + _setter("resource_count", resource_count) if resource_discovery_mode is not None: - pulumi.set(__self__, "resource_discovery_mode", resource_discovery_mode) + _setter("resource_discovery_mode", resource_discovery_mode) if resource_group_id is not None: - pulumi.set(__self__, "resource_group_id", resource_group_id) + _setter("resource_group_id", resource_group_id) @property @pulumi.getter(name="failurePercentage") @@ -316,6 +414,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourceGroupPolicyRemediationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/resource_group_template_deployment.py b/sdk/python/pulumi_azure/core/resource_group_template_deployment.py index 17bfed56a5..d51e451a52 100644 --- a/sdk/python/pulumi_azure/core/resource_group_template_deployment.py +++ b/sdk/python/pulumi_azure/core/resource_group_template_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ResourceGroupTemplateDeploymentArgs', 'ResourceGroupTemplateDeployment'] @@ -37,20 +37,61 @@ def __init__(__self__, *, :param pulumi.Input[str] template_content: The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`. :param pulumi.Input[str] template_spec_version_id: The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`. """ - pulumi.set(__self__, "deployment_mode", deployment_mode) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ResourceGroupTemplateDeploymentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + deployment_mode=deployment_mode, + resource_group_name=resource_group_name, + debug_level=debug_level, + name=name, + parameters_content=parameters_content, + tags=tags, + template_content=template_content, + template_spec_version_id=template_spec_version_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + deployment_mode: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + debug_level: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters_content: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + template_content: Optional[pulumi.Input[str]] = None, + template_spec_version_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if deployment_mode is None and 'deploymentMode' in kwargs: + deployment_mode = kwargs['deploymentMode'] + if deployment_mode is None: + raise TypeError("Missing 'deployment_mode' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if debug_level is None and 'debugLevel' in kwargs: + debug_level = kwargs['debugLevel'] + if parameters_content is None and 'parametersContent' in kwargs: + parameters_content = kwargs['parametersContent'] + if template_content is None and 'templateContent' in kwargs: + template_content = kwargs['templateContent'] + if template_spec_version_id is None and 'templateSpecVersionId' in kwargs: + template_spec_version_id = kwargs['templateSpecVersionId'] + + _setter("deployment_mode", deployment_mode) + _setter("resource_group_name", resource_group_name) if debug_level is not None: - pulumi.set(__self__, "debug_level", debug_level) + _setter("debug_level", debug_level) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters_content is not None: - pulumi.set(__self__, "parameters_content", parameters_content) + _setter("parameters_content", parameters_content) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if template_content is not None: - pulumi.set(__self__, "template_content", template_content) + _setter("template_content", template_content) if template_spec_version_id is not None: - pulumi.set(__self__, "template_spec_version_id", template_spec_version_id) + _setter("template_spec_version_id", template_spec_version_id) @property @pulumi.getter(name="deploymentMode") @@ -181,24 +222,65 @@ def __init__(__self__, *, :param pulumi.Input[str] template_content: The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`. :param pulumi.Input[str] template_spec_version_id: The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`. """ + _ResourceGroupTemplateDeploymentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + debug_level=debug_level, + deployment_mode=deployment_mode, + name=name, + output_content=output_content, + parameters_content=parameters_content, + resource_group_name=resource_group_name, + tags=tags, + template_content=template_content, + template_spec_version_id=template_spec_version_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + debug_level: Optional[pulumi.Input[str]] = None, + deployment_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + output_content: Optional[pulumi.Input[str]] = None, + parameters_content: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + template_content: Optional[pulumi.Input[str]] = None, + template_spec_version_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if debug_level is None and 'debugLevel' in kwargs: + debug_level = kwargs['debugLevel'] + if deployment_mode is None and 'deploymentMode' in kwargs: + deployment_mode = kwargs['deploymentMode'] + if output_content is None and 'outputContent' in kwargs: + output_content = kwargs['outputContent'] + if parameters_content is None and 'parametersContent' in kwargs: + parameters_content = kwargs['parametersContent'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if template_content is None and 'templateContent' in kwargs: + template_content = kwargs['templateContent'] + if template_spec_version_id is None and 'templateSpecVersionId' in kwargs: + template_spec_version_id = kwargs['templateSpecVersionId'] + if debug_level is not None: - pulumi.set(__self__, "debug_level", debug_level) + _setter("debug_level", debug_level) if deployment_mode is not None: - pulumi.set(__self__, "deployment_mode", deployment_mode) + _setter("deployment_mode", deployment_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if output_content is not None: - pulumi.set(__self__, "output_content", output_content) + _setter("output_content", output_content) if parameters_content is not None: - pulumi.set(__self__, "parameters_content", parameters_content) + _setter("parameters_content", parameters_content) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if template_content is not None: - pulumi.set(__self__, "template_content", template_content) + _setter("template_content", template_content) if template_spec_version_id is not None: - pulumi.set(__self__, "template_spec_version_id", template_spec_version_id) + _setter("template_spec_version_id", template_spec_version_id) @property @pulumi.getter(name="debugLevel") @@ -384,6 +466,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourceGroupTemplateDeploymentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/resource_policy_assignment.py b/sdk/python/pulumi_azure/core/resource_policy_assignment.py index 5cc47789e2..c9bee3e959 100644 --- a/sdk/python/pulumi_azure/core/resource_policy_assignment.py +++ b/sdk/python/pulumi_azure/core/resource_policy_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -51,32 +51,85 @@ def __init__(__self__, *, :param pulumi.Input[str] parameters: A JSON mapping of any Parameters for this Policy. :param pulumi.Input[Sequence[pulumi.Input['ResourcePolicyAssignmentResourceSelectorArgs']]] resource_selectors: One or more `resource_selectors` blocks as defined below to filter polices by resource properties. """ - pulumi.set(__self__, "policy_definition_id", policy_definition_id) - pulumi.set(__self__, "resource_id", resource_id) + ResourcePolicyAssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy_definition_id=policy_definition_id, + resource_id=resource_id, + description=description, + display_name=display_name, + enforce=enforce, + identity=identity, + location=location, + metadata=metadata, + name=name, + non_compliance_messages=non_compliance_messages, + not_scopes=not_scopes, + overrides=overrides, + parameters=parameters, + resource_selectors=resource_selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy_definition_id: Optional[pulumi.Input[str]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enforce: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['ResourcePolicyAssignmentIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + non_compliance_messages: Optional[pulumi.Input[Sequence[pulumi.Input['ResourcePolicyAssignmentNonComplianceMessageArgs']]]] = None, + not_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + overrides: Optional[pulumi.Input[Sequence[pulumi.Input['ResourcePolicyAssignmentOverrideArgs']]]] = None, + parameters: Optional[pulumi.Input[str]] = None, + resource_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ResourcePolicyAssignmentResourceSelectorArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_id is None: + raise TypeError("Missing 'policy_definition_id' argument") + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if non_compliance_messages is None and 'nonComplianceMessages' in kwargs: + non_compliance_messages = kwargs['nonComplianceMessages'] + if not_scopes is None and 'notScopes' in kwargs: + not_scopes = kwargs['notScopes'] + if resource_selectors is None and 'resourceSelectors' in kwargs: + resource_selectors = kwargs['resourceSelectors'] + + _setter("policy_definition_id", policy_definition_id) + _setter("resource_id", resource_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enforce is not None: - pulumi.set(__self__, "enforce", enforce) + _setter("enforce", enforce) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if non_compliance_messages is not None: - pulumi.set(__self__, "non_compliance_messages", non_compliance_messages) + _setter("non_compliance_messages", non_compliance_messages) if not_scopes is not None: - pulumi.set(__self__, "not_scopes", not_scopes) + _setter("not_scopes", not_scopes) if overrides is not None: - pulumi.set(__self__, "overrides", overrides) + _setter("overrides", overrides) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if resource_selectors is not None: - pulumi.set(__self__, "resource_selectors", resource_selectors) + _setter("resource_selectors", resource_selectors) @property @pulumi.getter(name="policyDefinitionId") @@ -289,34 +342,83 @@ def __init__(__self__, *, > To create a Policy Assignment at a Management Group use the `management.GroupPolicyAssignment` resource, for a Resource Group use the `core.ResourceGroupPolicyAssignment` and for a Subscription use the `core.SubscriptionPolicyAssignment` resource. :param pulumi.Input[Sequence[pulumi.Input['ResourcePolicyAssignmentResourceSelectorArgs']]] resource_selectors: One or more `resource_selectors` blocks as defined below to filter polices by resource properties. """ + _ResourcePolicyAssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + display_name=display_name, + enforce=enforce, + identity=identity, + location=location, + metadata=metadata, + name=name, + non_compliance_messages=non_compliance_messages, + not_scopes=not_scopes, + overrides=overrides, + parameters=parameters, + policy_definition_id=policy_definition_id, + resource_id=resource_id, + resource_selectors=resource_selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enforce: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['ResourcePolicyAssignmentIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + non_compliance_messages: Optional[pulumi.Input[Sequence[pulumi.Input['ResourcePolicyAssignmentNonComplianceMessageArgs']]]] = None, + not_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + overrides: Optional[pulumi.Input[Sequence[pulumi.Input['ResourcePolicyAssignmentOverrideArgs']]]] = None, + parameters: Optional[pulumi.Input[str]] = None, + policy_definition_id: Optional[pulumi.Input[str]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + resource_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ResourcePolicyAssignmentResourceSelectorArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if non_compliance_messages is None and 'nonComplianceMessages' in kwargs: + non_compliance_messages = kwargs['nonComplianceMessages'] + if not_scopes is None and 'notScopes' in kwargs: + not_scopes = kwargs['notScopes'] + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_selectors is None and 'resourceSelectors' in kwargs: + resource_selectors = kwargs['resourceSelectors'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enforce is not None: - pulumi.set(__self__, "enforce", enforce) + _setter("enforce", enforce) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if non_compliance_messages is not None: - pulumi.set(__self__, "non_compliance_messages", non_compliance_messages) + _setter("non_compliance_messages", non_compliance_messages) if not_scopes is not None: - pulumi.set(__self__, "not_scopes", not_scopes) + _setter("not_scopes", not_scopes) if overrides is not None: - pulumi.set(__self__, "overrides", overrides) + _setter("overrides", overrides) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if policy_definition_id is not None: - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + _setter("policy_definition_id", policy_definition_id) if resource_id is not None: - pulumi.set(__self__, "resource_id", resource_id) + _setter("resource_id", resource_id) if resource_selectors is not None: - pulumi.set(__self__, "resource_selectors", resource_selectors) + _setter("resource_selectors", resource_selectors) @property @pulumi.getter @@ -632,6 +734,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourcePolicyAssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -663,6 +769,11 @@ def _internal_init(__self__, __props__.__dict__["description"] = description __props__.__dict__["display_name"] = display_name __props__.__dict__["enforce"] = enforce + if identity is not None and not isinstance(identity, ResourcePolicyAssignmentIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ResourcePolicyAssignmentIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["metadata"] = metadata diff --git a/sdk/python/pulumi_azure/core/resource_policy_exemption.py b/sdk/python/pulumi_azure/core/resource_policy_exemption.py index d012e0e9a9..1ac0300065 100644 --- a/sdk/python/pulumi_azure/core/resource_policy_exemption.py +++ b/sdk/python/pulumi_azure/core/resource_policy_exemption.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ResourcePolicyExemptionArgs', 'ResourcePolicyExemption'] @@ -35,21 +35,66 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Policy Exemption. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] policy_definition_reference_ids: The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. """ - pulumi.set(__self__, "exemption_category", exemption_category) - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) - pulumi.set(__self__, "resource_id", resource_id) + ResourcePolicyExemptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + exemption_category=exemption_category, + policy_assignment_id=policy_assignment_id, + resource_id=resource_id, + description=description, + display_name=display_name, + expires_on=expires_on, + metadata=metadata, + name=name, + policy_definition_reference_ids=policy_definition_reference_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exemption_category: Optional[pulumi.Input[str]] = None, + policy_assignment_id: Optional[pulumi.Input[str]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + expires_on: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_definition_reference_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exemption_category is None and 'exemptionCategory' in kwargs: + exemption_category = kwargs['exemptionCategory'] + if exemption_category is None: + raise TypeError("Missing 'exemption_category' argument") + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_assignment_id is None: + raise TypeError("Missing 'policy_assignment_id' argument") + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if expires_on is None and 'expiresOn' in kwargs: + expires_on = kwargs['expiresOn'] + if policy_definition_reference_ids is None and 'policyDefinitionReferenceIds' in kwargs: + policy_definition_reference_ids = kwargs['policyDefinitionReferenceIds'] + + _setter("exemption_category", exemption_category) + _setter("policy_assignment_id", policy_assignment_id) + _setter("resource_id", resource_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if expires_on is not None: - pulumi.set(__self__, "expires_on", expires_on) + _setter("expires_on", expires_on) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_definition_reference_ids is not None: - pulumi.set(__self__, "policy_definition_reference_ids", policy_definition_reference_ids) + _setter("policy_definition_reference_ids", policy_definition_reference_ids) @property @pulumi.getter(name="exemptionCategory") @@ -184,24 +229,63 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] policy_definition_reference_ids: The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. :param pulumi.Input[str] resource_id: The Resource ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. """ + _ResourcePolicyExemptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + display_name=display_name, + exemption_category=exemption_category, + expires_on=expires_on, + metadata=metadata, + name=name, + policy_assignment_id=policy_assignment_id, + policy_definition_reference_ids=policy_definition_reference_ids, + resource_id=resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + exemption_category: Optional[pulumi.Input[str]] = None, + expires_on: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_assignment_id: Optional[pulumi.Input[str]] = None, + policy_definition_reference_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if exemption_category is None and 'exemptionCategory' in kwargs: + exemption_category = kwargs['exemptionCategory'] + if expires_on is None and 'expiresOn' in kwargs: + expires_on = kwargs['expiresOn'] + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_definition_reference_ids is None and 'policyDefinitionReferenceIds' in kwargs: + policy_definition_reference_ids = kwargs['policyDefinitionReferenceIds'] + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if exemption_category is not None: - pulumi.set(__self__, "exemption_category", exemption_category) + _setter("exemption_category", exemption_category) if expires_on is not None: - pulumi.set(__self__, "expires_on", expires_on) + _setter("expires_on", expires_on) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_assignment_id is not None: - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) + _setter("policy_assignment_id", policy_assignment_id) if policy_definition_reference_ids is not None: - pulumi.set(__self__, "policy_definition_reference_ids", policy_definition_reference_ids) + _setter("policy_definition_reference_ids", policy_definition_reference_ids) if resource_id is not None: - pulumi.set(__self__, "resource_id", resource_id) + _setter("resource_id", resource_id) @property @pulumi.getter @@ -427,6 +511,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourcePolicyExemptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/resource_policy_remediation.py b/sdk/python/pulumi_azure/core/resource_policy_remediation.py index 081317310b..01c90a9b7f 100644 --- a/sdk/python/pulumi_azure/core/resource_policy_remediation.py +++ b/sdk/python/pulumi_azure/core/resource_policy_remediation.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ResourcePolicyRemediationArgs', 'ResourcePolicyRemediation'] @@ -27,27 +27,78 @@ def __init__(__self__, *, """ The set of arguments for constructing a ResourcePolicyRemediation resource. """ - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) - pulumi.set(__self__, "resource_id", resource_id) + ResourcePolicyRemediationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy_assignment_id=policy_assignment_id, + resource_id=resource_id, + failure_percentage=failure_percentage, + location_filters=location_filters, + name=name, + parallel_deployments=parallel_deployments, + policy_definition_id=policy_definition_id, + policy_definition_reference_id=policy_definition_reference_id, + resource_count=resource_count, + resource_discovery_mode=resource_discovery_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy_assignment_id: Optional[pulumi.Input[str]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + failure_percentage: Optional[pulumi.Input[float]] = None, + location_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + parallel_deployments: Optional[pulumi.Input[int]] = None, + policy_definition_id: Optional[pulumi.Input[str]] = None, + policy_definition_reference_id: Optional[pulumi.Input[str]] = None, + resource_count: Optional[pulumi.Input[int]] = None, + resource_discovery_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_assignment_id is None: + raise TypeError("Missing 'policy_assignment_id' argument") + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + if failure_percentage is None and 'failurePercentage' in kwargs: + failure_percentage = kwargs['failurePercentage'] + if location_filters is None and 'locationFilters' in kwargs: + location_filters = kwargs['locationFilters'] + if parallel_deployments is None and 'parallelDeployments' in kwargs: + parallel_deployments = kwargs['parallelDeployments'] + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + if resource_count is None and 'resourceCount' in kwargs: + resource_count = kwargs['resourceCount'] + if resource_discovery_mode is None and 'resourceDiscoveryMode' in kwargs: + resource_discovery_mode = kwargs['resourceDiscoveryMode'] + + _setter("policy_assignment_id", policy_assignment_id) + _setter("resource_id", resource_id) if failure_percentage is not None: - pulumi.set(__self__, "failure_percentage", failure_percentage) + _setter("failure_percentage", failure_percentage) if location_filters is not None: - pulumi.set(__self__, "location_filters", location_filters) + _setter("location_filters", location_filters) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parallel_deployments is not None: - pulumi.set(__self__, "parallel_deployments", parallel_deployments) + _setter("parallel_deployments", parallel_deployments) if policy_definition_id is not None: warnings.warn("""`policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""", DeprecationWarning) pulumi.log.warn("""policy_definition_id is deprecated: `policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""") if policy_definition_id is not None: - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + _setter("policy_definition_id", policy_definition_id) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) if resource_count is not None: - pulumi.set(__self__, "resource_count", resource_count) + _setter("resource_count", resource_count) if resource_discovery_mode is not None: - pulumi.set(__self__, "resource_discovery_mode", resource_discovery_mode) + _setter("resource_discovery_mode", resource_discovery_mode) @property @pulumi.getter(name="policyAssignmentId") @@ -159,29 +210,76 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering ResourcePolicyRemediation resources. """ + _ResourcePolicyRemediationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + failure_percentage=failure_percentage, + location_filters=location_filters, + name=name, + parallel_deployments=parallel_deployments, + policy_assignment_id=policy_assignment_id, + policy_definition_id=policy_definition_id, + policy_definition_reference_id=policy_definition_reference_id, + resource_count=resource_count, + resource_discovery_mode=resource_discovery_mode, + resource_id=resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + failure_percentage: Optional[pulumi.Input[float]] = None, + location_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + parallel_deployments: Optional[pulumi.Input[int]] = None, + policy_assignment_id: Optional[pulumi.Input[str]] = None, + policy_definition_id: Optional[pulumi.Input[str]] = None, + policy_definition_reference_id: Optional[pulumi.Input[str]] = None, + resource_count: Optional[pulumi.Input[int]] = None, + resource_discovery_mode: Optional[pulumi.Input[str]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failure_percentage is None and 'failurePercentage' in kwargs: + failure_percentage = kwargs['failurePercentage'] + if location_filters is None and 'locationFilters' in kwargs: + location_filters = kwargs['locationFilters'] + if parallel_deployments is None and 'parallelDeployments' in kwargs: + parallel_deployments = kwargs['parallelDeployments'] + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + if resource_count is None and 'resourceCount' in kwargs: + resource_count = kwargs['resourceCount'] + if resource_discovery_mode is None and 'resourceDiscoveryMode' in kwargs: + resource_discovery_mode = kwargs['resourceDiscoveryMode'] + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if failure_percentage is not None: - pulumi.set(__self__, "failure_percentage", failure_percentage) + _setter("failure_percentage", failure_percentage) if location_filters is not None: - pulumi.set(__self__, "location_filters", location_filters) + _setter("location_filters", location_filters) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parallel_deployments is not None: - pulumi.set(__self__, "parallel_deployments", parallel_deployments) + _setter("parallel_deployments", parallel_deployments) if policy_assignment_id is not None: - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) + _setter("policy_assignment_id", policy_assignment_id) if policy_definition_id is not None: warnings.warn("""`policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""", DeprecationWarning) pulumi.log.warn("""policy_definition_id is deprecated: `policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""") if policy_definition_id is not None: - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + _setter("policy_definition_id", policy_definition_id) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) if resource_count is not None: - pulumi.set(__self__, "resource_count", resource_count) + _setter("resource_count", resource_count) if resource_discovery_mode is not None: - pulumi.set(__self__, "resource_discovery_mode", resource_discovery_mode) + _setter("resource_discovery_mode", resource_discovery_mode) if resource_id is not None: - pulumi.set(__self__, "resource_id", resource_id) + _setter("resource_id", resource_id) @property @pulumi.getter(name="failurePercentage") @@ -316,6 +414,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourcePolicyRemediationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/resource_provider_registration.py b/sdk/python/pulumi_azure/core/resource_provider_registration.py index dd1acd3901..9d6cb2b09b 100644 --- a/sdk/python/pulumi_azure/core/resource_provider_registration.py +++ b/sdk/python/pulumi_azure/core/resource_provider_registration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -22,10 +22,23 @@ def __init__(__self__, *, The set of arguments for constructing a ResourceProviderRegistration resource. :param pulumi.Input[str] name: The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. """ + ResourceProviderRegistrationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + features=features, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + features: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceProviderRegistrationFeatureArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if features is not None: - pulumi.set(__self__, "features", features) + _setter("features", features) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -58,10 +71,23 @@ def __init__(__self__, *, Input properties used for looking up and filtering ResourceProviderRegistration resources. :param pulumi.Input[str] name: The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. """ + _ResourceProviderRegistrationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + features=features, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + features: Optional[pulumi.Input[Sequence[pulumi.Input['ResourceProviderRegistrationFeatureArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if features is not None: - pulumi.set(__self__, "features", features) + _setter("features", features) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -187,6 +213,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourceProviderRegistrationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/subscription.py b/sdk/python/pulumi_azure/core/subscription.py index 967c3e180d..8117449628 100644 --- a/sdk/python/pulumi_azure/core/subscription.py +++ b/sdk/python/pulumi_azure/core/subscription.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SubscriptionArgs', 'Subscription'] @@ -33,17 +33,46 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Subscription. :param pulumi.Input[str] workload: The workload type of the Subscription. Possible values are `Production` (default) and `DevTest`. Changing this forces a new Subscription to be created. """ - pulumi.set(__self__, "subscription_name", subscription_name) + SubscriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subscription_name=subscription_name, + alias=alias, + billing_scope_id=billing_scope_id, + subscription_id=subscription_id, + tags=tags, + workload=workload, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subscription_name: Optional[pulumi.Input[str]] = None, + alias: Optional[pulumi.Input[str]] = None, + billing_scope_id: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workload: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subscription_name is None and 'subscriptionName' in kwargs: + subscription_name = kwargs['subscriptionName'] + if subscription_name is None: + raise TypeError("Missing 'subscription_name' argument") + if billing_scope_id is None and 'billingScopeId' in kwargs: + billing_scope_id = kwargs['billingScopeId'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + + _setter("subscription_name", subscription_name) if alias is not None: - pulumi.set(__self__, "alias", alias) + _setter("alias", alias) if billing_scope_id is not None: - pulumi.set(__self__, "billing_scope_id", billing_scope_id) + _setter("billing_scope_id", billing_scope_id) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if workload is not None: - pulumi.set(__self__, "workload", workload) + _setter("workload", workload) @property @pulumi.getter(name="subscriptionName") @@ -146,20 +175,51 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The ID of the Tenant to which the subscription belongs. :param pulumi.Input[str] workload: The workload type of the Subscription. Possible values are `Production` (default) and `DevTest`. Changing this forces a new Subscription to be created. """ + _SubscriptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alias=alias, + billing_scope_id=billing_scope_id, + subscription_id=subscription_id, + subscription_name=subscription_name, + tags=tags, + tenant_id=tenant_id, + workload=workload, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alias: Optional[pulumi.Input[str]] = None, + billing_scope_id: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + subscription_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + workload: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if billing_scope_id is None and 'billingScopeId' in kwargs: + billing_scope_id = kwargs['billingScopeId'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_name is None and 'subscriptionName' in kwargs: + subscription_name = kwargs['subscriptionName'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if alias is not None: - pulumi.set(__self__, "alias", alias) + _setter("alias", alias) if billing_scope_id is not None: - pulumi.set(__self__, "billing_scope_id", billing_scope_id) + _setter("billing_scope_id", billing_scope_id) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) if subscription_name is not None: - pulumi.set(__self__, "subscription_name", subscription_name) + _setter("subscription_name", subscription_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if workload is not None: - pulumi.set(__self__, "workload", workload) + _setter("workload", workload) @property @pulumi.getter @@ -413,6 +473,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubscriptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/subscription_cost_management_export.py b/sdk/python/pulumi_azure/core/subscription_cost_management_export.py index 511b942c01..5f28672131 100644 --- a/sdk/python/pulumi_azure/core/subscription_cost_management_export.py +++ b/sdk/python/pulumi_azure/core/subscription_cost_management_export.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,16 +35,65 @@ def __init__(__self__, *, :param pulumi.Input[bool] active: Is the cost management export active? Default is `true`. :param pulumi.Input[str] name: Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "export_data_options", export_data_options) - pulumi.set(__self__, "export_data_storage_location", export_data_storage_location) - pulumi.set(__self__, "recurrence_period_end_date", recurrence_period_end_date) - pulumi.set(__self__, "recurrence_period_start_date", recurrence_period_start_date) - pulumi.set(__self__, "recurrence_type", recurrence_type) - pulumi.set(__self__, "subscription_id", subscription_id) + SubscriptionCostManagementExportArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + export_data_options=export_data_options, + export_data_storage_location=export_data_storage_location, + recurrence_period_end_date=recurrence_period_end_date, + recurrence_period_start_date=recurrence_period_start_date, + recurrence_type=recurrence_type, + subscription_id=subscription_id, + active=active, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + export_data_options: Optional[pulumi.Input['SubscriptionCostManagementExportExportDataOptionsArgs']] = None, + export_data_storage_location: Optional[pulumi.Input['SubscriptionCostManagementExportExportDataStorageLocationArgs']] = None, + recurrence_period_end_date: Optional[pulumi.Input[str]] = None, + recurrence_period_start_date: Optional[pulumi.Input[str]] = None, + recurrence_type: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + active: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if export_data_options is None and 'exportDataOptions' in kwargs: + export_data_options = kwargs['exportDataOptions'] + if export_data_options is None: + raise TypeError("Missing 'export_data_options' argument") + if export_data_storage_location is None and 'exportDataStorageLocation' in kwargs: + export_data_storage_location = kwargs['exportDataStorageLocation'] + if export_data_storage_location is None: + raise TypeError("Missing 'export_data_storage_location' argument") + if recurrence_period_end_date is None and 'recurrencePeriodEndDate' in kwargs: + recurrence_period_end_date = kwargs['recurrencePeriodEndDate'] + if recurrence_period_end_date is None: + raise TypeError("Missing 'recurrence_period_end_date' argument") + if recurrence_period_start_date is None and 'recurrencePeriodStartDate' in kwargs: + recurrence_period_start_date = kwargs['recurrencePeriodStartDate'] + if recurrence_period_start_date is None: + raise TypeError("Missing 'recurrence_period_start_date' argument") + if recurrence_type is None and 'recurrenceType' in kwargs: + recurrence_type = kwargs['recurrenceType'] + if recurrence_type is None: + raise TypeError("Missing 'recurrence_type' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + + _setter("export_data_options", export_data_options) + _setter("export_data_storage_location", export_data_storage_location) + _setter("recurrence_period_end_date", recurrence_period_end_date) + _setter("recurrence_period_start_date", recurrence_period_start_date) + _setter("recurrence_type", recurrence_type) + _setter("subscription_id", subscription_id) if active is not None: - pulumi.set(__self__, "active", active) + _setter("active", active) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="exportDataOptions") @@ -165,22 +214,59 @@ def __init__(__self__, *, :param pulumi.Input[str] recurrence_type: How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. :param pulumi.Input[str] subscription_id: The id of the subscription on which to create an export. Changing this forces a new resource to be created. """ + _SubscriptionCostManagementExportState._configure( + lambda key, value: pulumi.set(__self__, key, value), + active=active, + export_data_options=export_data_options, + export_data_storage_location=export_data_storage_location, + name=name, + recurrence_period_end_date=recurrence_period_end_date, + recurrence_period_start_date=recurrence_period_start_date, + recurrence_type=recurrence_type, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active: Optional[pulumi.Input[bool]] = None, + export_data_options: Optional[pulumi.Input['SubscriptionCostManagementExportExportDataOptionsArgs']] = None, + export_data_storage_location: Optional[pulumi.Input['SubscriptionCostManagementExportExportDataStorageLocationArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + recurrence_period_end_date: Optional[pulumi.Input[str]] = None, + recurrence_period_start_date: Optional[pulumi.Input[str]] = None, + recurrence_type: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if export_data_options is None and 'exportDataOptions' in kwargs: + export_data_options = kwargs['exportDataOptions'] + if export_data_storage_location is None and 'exportDataStorageLocation' in kwargs: + export_data_storage_location = kwargs['exportDataStorageLocation'] + if recurrence_period_end_date is None and 'recurrencePeriodEndDate' in kwargs: + recurrence_period_end_date = kwargs['recurrencePeriodEndDate'] + if recurrence_period_start_date is None and 'recurrencePeriodStartDate' in kwargs: + recurrence_period_start_date = kwargs['recurrencePeriodStartDate'] + if recurrence_type is None and 'recurrenceType' in kwargs: + recurrence_type = kwargs['recurrenceType'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if active is not None: - pulumi.set(__self__, "active", active) + _setter("active", active) if export_data_options is not None: - pulumi.set(__self__, "export_data_options", export_data_options) + _setter("export_data_options", export_data_options) if export_data_storage_location is not None: - pulumi.set(__self__, "export_data_storage_location", export_data_storage_location) + _setter("export_data_storage_location", export_data_storage_location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recurrence_period_end_date is not None: - pulumi.set(__self__, "recurrence_period_end_date", recurrence_period_end_date) + _setter("recurrence_period_end_date", recurrence_period_end_date) if recurrence_period_start_date is not None: - pulumi.set(__self__, "recurrence_period_start_date", recurrence_period_start_date) + _setter("recurrence_period_start_date", recurrence_period_start_date) if recurrence_type is not None: - pulumi.set(__self__, "recurrence_type", recurrence_type) + _setter("recurrence_type", recurrence_type) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -400,6 +486,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubscriptionCostManagementExportArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -423,9 +513,19 @@ def _internal_init(__self__, __props__ = SubscriptionCostManagementExportArgs.__new__(SubscriptionCostManagementExportArgs) __props__.__dict__["active"] = active + if export_data_options is not None and not isinstance(export_data_options, SubscriptionCostManagementExportExportDataOptionsArgs): + export_data_options = export_data_options or {} + def _setter(key, value): + export_data_options[key] = value + SubscriptionCostManagementExportExportDataOptionsArgs._configure(_setter, **export_data_options) if export_data_options is None and not opts.urn: raise TypeError("Missing required property 'export_data_options'") __props__.__dict__["export_data_options"] = export_data_options + if export_data_storage_location is not None and not isinstance(export_data_storage_location, SubscriptionCostManagementExportExportDataStorageLocationArgs): + export_data_storage_location = export_data_storage_location or {} + def _setter(key, value): + export_data_storage_location[key] = value + SubscriptionCostManagementExportExportDataStorageLocationArgs._configure(_setter, **export_data_storage_location) if export_data_storage_location is None and not opts.urn: raise TypeError("Missing required property 'export_data_storage_location'") __props__.__dict__["export_data_storage_location"] = export_data_storage_location diff --git a/sdk/python/pulumi_azure/core/subscription_cost_management_view.py b/sdk/python/pulumi_azure/core/subscription_cost_management_view.py index 4bcb094ea2..40e7f3cda9 100644 --- a/sdk/python/pulumi_azure/core/subscription_cost_management_view.py +++ b/sdk/python/pulumi_azure/core/subscription_cost_management_view.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,19 +39,70 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Cost Management View for a Subscription. Changing this forces a new Cost Management View for a Subscription to be created. :param pulumi.Input[Sequence[pulumi.Input['SubscriptionCostManagementViewPivotArgs']]] pivots: One or more `pivot` blocks as defined below, containing the configuration of 3 sub-views in the Cost Analysis UI. Non table views should have three pivots. """ - pulumi.set(__self__, "accumulated", accumulated) - pulumi.set(__self__, "chart_type", chart_type) - pulumi.set(__self__, "dataset", dataset) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "report_type", report_type) - pulumi.set(__self__, "subscription_id", subscription_id) - pulumi.set(__self__, "timeframe", timeframe) + SubscriptionCostManagementViewArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + accumulated=accumulated, + chart_type=chart_type, + dataset=dataset, + display_name=display_name, + report_type=report_type, + subscription_id=subscription_id, + timeframe=timeframe, + kpis=kpis, + name=name, + pivots=pivots, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + accumulated: Optional[pulumi.Input[bool]] = None, + chart_type: Optional[pulumi.Input[str]] = None, + dataset: Optional[pulumi.Input['SubscriptionCostManagementViewDatasetArgs']] = None, + display_name: Optional[pulumi.Input[str]] = None, + report_type: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + timeframe: Optional[pulumi.Input[str]] = None, + kpis: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionCostManagementViewKpiArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + pivots: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionCostManagementViewPivotArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if accumulated is None: + raise TypeError("Missing 'accumulated' argument") + if chart_type is None and 'chartType' in kwargs: + chart_type = kwargs['chartType'] + if chart_type is None: + raise TypeError("Missing 'chart_type' argument") + if dataset is None: + raise TypeError("Missing 'dataset' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if report_type is None and 'reportType' in kwargs: + report_type = kwargs['reportType'] + if report_type is None: + raise TypeError("Missing 'report_type' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + if timeframe is None: + raise TypeError("Missing 'timeframe' argument") + + _setter("accumulated", accumulated) + _setter("chart_type", chart_type) + _setter("dataset", dataset) + _setter("display_name", display_name) + _setter("report_type", report_type) + _setter("subscription_id", subscription_id) + _setter("timeframe", timeframe) if kpis is not None: - pulumi.set(__self__, "kpis", kpis) + _setter("kpis", kpis) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pivots is not None: - pulumi.set(__self__, "pivots", pivots) + _setter("pivots", pivots) @property @pulumi.getter @@ -200,26 +251,63 @@ def __init__(__self__, *, :param pulumi.Input[str] subscription_id: The ID of the Subscription this View is scoped to. Changing this forces a new Cost Management View for a Subscription to be created. :param pulumi.Input[str] timeframe: The time frame for pulling data for the report. Possible values are `Custom`, `MonthToDate`, `WeekToDate` and `YearToDate`. """ + _SubscriptionCostManagementViewState._configure( + lambda key, value: pulumi.set(__self__, key, value), + accumulated=accumulated, + chart_type=chart_type, + dataset=dataset, + display_name=display_name, + kpis=kpis, + name=name, + pivots=pivots, + report_type=report_type, + subscription_id=subscription_id, + timeframe=timeframe, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + accumulated: Optional[pulumi.Input[bool]] = None, + chart_type: Optional[pulumi.Input[str]] = None, + dataset: Optional[pulumi.Input['SubscriptionCostManagementViewDatasetArgs']] = None, + display_name: Optional[pulumi.Input[str]] = None, + kpis: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionCostManagementViewKpiArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + pivots: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionCostManagementViewPivotArgs']]]] = None, + report_type: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + timeframe: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if chart_type is None and 'chartType' in kwargs: + chart_type = kwargs['chartType'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if report_type is None and 'reportType' in kwargs: + report_type = kwargs['reportType'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if accumulated is not None: - pulumi.set(__self__, "accumulated", accumulated) + _setter("accumulated", accumulated) if chart_type is not None: - pulumi.set(__self__, "chart_type", chart_type) + _setter("chart_type", chart_type) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if kpis is not None: - pulumi.set(__self__, "kpis", kpis) + _setter("kpis", kpis) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pivots is not None: - pulumi.set(__self__, "pivots", pivots) + _setter("pivots", pivots) if report_type is not None: - pulumi.set(__self__, "report_type", report_type) + _setter("report_type", report_type) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) if timeframe is not None: - pulumi.set(__self__, "timeframe", timeframe) + _setter("timeframe", timeframe) @property @pulumi.getter @@ -453,6 +541,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubscriptionCostManagementViewArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -483,6 +575,11 @@ def _internal_init(__self__, if chart_type is None and not opts.urn: raise TypeError("Missing required property 'chart_type'") __props__.__dict__["chart_type"] = chart_type + if dataset is not None and not isinstance(dataset, SubscriptionCostManagementViewDatasetArgs): + dataset = dataset or {} + def _setter(key, value): + dataset[key] = value + SubscriptionCostManagementViewDatasetArgs._configure(_setter, **dataset) if dataset is None and not opts.urn: raise TypeError("Missing required property 'dataset'") __props__.__dict__["dataset"] = dataset diff --git a/sdk/python/pulumi_azure/core/subscription_policy_assignment.py b/sdk/python/pulumi_azure/core/subscription_policy_assignment.py index 57551d6b59..4fb6aad216 100644 --- a/sdk/python/pulumi_azure/core/subscription_policy_assignment.py +++ b/sdk/python/pulumi_azure/core/subscription_policy_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,32 +49,85 @@ def __init__(__self__, *, :param pulumi.Input[str] parameters: A JSON mapping of any Parameters for this Policy. :param pulumi.Input[Sequence[pulumi.Input['SubscriptionPolicyAssignmentResourceSelectorArgs']]] resource_selectors: One or more `resource_selectors` blocks as defined below to filter polices by resource properties. """ - pulumi.set(__self__, "policy_definition_id", policy_definition_id) - pulumi.set(__self__, "subscription_id", subscription_id) + SubscriptionPolicyAssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy_definition_id=policy_definition_id, + subscription_id=subscription_id, + description=description, + display_name=display_name, + enforce=enforce, + identity=identity, + location=location, + metadata=metadata, + name=name, + non_compliance_messages=non_compliance_messages, + not_scopes=not_scopes, + overrides=overrides, + parameters=parameters, + resource_selectors=resource_selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy_definition_id: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enforce: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['SubscriptionPolicyAssignmentIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + non_compliance_messages: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionPolicyAssignmentNonComplianceMessageArgs']]]] = None, + not_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + overrides: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionPolicyAssignmentOverrideArgs']]]] = None, + parameters: Optional[pulumi.Input[str]] = None, + resource_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionPolicyAssignmentResourceSelectorArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_id is None: + raise TypeError("Missing 'policy_definition_id' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if non_compliance_messages is None and 'nonComplianceMessages' in kwargs: + non_compliance_messages = kwargs['nonComplianceMessages'] + if not_scopes is None and 'notScopes' in kwargs: + not_scopes = kwargs['notScopes'] + if resource_selectors is None and 'resourceSelectors' in kwargs: + resource_selectors = kwargs['resourceSelectors'] + + _setter("policy_definition_id", policy_definition_id) + _setter("subscription_id", subscription_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enforce is not None: - pulumi.set(__self__, "enforce", enforce) + _setter("enforce", enforce) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if non_compliance_messages is not None: - pulumi.set(__self__, "non_compliance_messages", non_compliance_messages) + _setter("non_compliance_messages", non_compliance_messages) if not_scopes is not None: - pulumi.set(__self__, "not_scopes", not_scopes) + _setter("not_scopes", not_scopes) if overrides is not None: - pulumi.set(__self__, "overrides", overrides) + _setter("overrides", overrides) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if resource_selectors is not None: - pulumi.set(__self__, "resource_selectors", resource_selectors) + _setter("resource_selectors", resource_selectors) @property @pulumi.getter(name="policyDefinitionId") @@ -283,34 +336,83 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['SubscriptionPolicyAssignmentResourceSelectorArgs']]] resource_selectors: One or more `resource_selectors` blocks as defined below to filter polices by resource properties. :param pulumi.Input[str] subscription_id: The ID of the Subscription where this Policy Assignment should be created. Changing this forces a new Policy Assignment to be created. """ + _SubscriptionPolicyAssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + display_name=display_name, + enforce=enforce, + identity=identity, + location=location, + metadata=metadata, + name=name, + non_compliance_messages=non_compliance_messages, + not_scopes=not_scopes, + overrides=overrides, + parameters=parameters, + policy_definition_id=policy_definition_id, + resource_selectors=resource_selectors, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enforce: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['SubscriptionPolicyAssignmentIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + non_compliance_messages: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionPolicyAssignmentNonComplianceMessageArgs']]]] = None, + not_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + overrides: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionPolicyAssignmentOverrideArgs']]]] = None, + parameters: Optional[pulumi.Input[str]] = None, + policy_definition_id: Optional[pulumi.Input[str]] = None, + resource_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionPolicyAssignmentResourceSelectorArgs']]]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if non_compliance_messages is None and 'nonComplianceMessages' in kwargs: + non_compliance_messages = kwargs['nonComplianceMessages'] + if not_scopes is None and 'notScopes' in kwargs: + not_scopes = kwargs['notScopes'] + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if resource_selectors is None and 'resourceSelectors' in kwargs: + resource_selectors = kwargs['resourceSelectors'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enforce is not None: - pulumi.set(__self__, "enforce", enforce) + _setter("enforce", enforce) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if non_compliance_messages is not None: - pulumi.set(__self__, "non_compliance_messages", non_compliance_messages) + _setter("non_compliance_messages", non_compliance_messages) if not_scopes is not None: - pulumi.set(__self__, "not_scopes", not_scopes) + _setter("not_scopes", not_scopes) if overrides is not None: - pulumi.set(__self__, "overrides", overrides) + _setter("overrides", overrides) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if policy_definition_id is not None: - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + _setter("policy_definition_id", policy_definition_id) if resource_selectors is not None: - pulumi.set(__self__, "resource_selectors", resource_selectors) + _setter("resource_selectors", resource_selectors) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -616,6 +718,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubscriptionPolicyAssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -647,6 +753,11 @@ def _internal_init(__self__, __props__.__dict__["description"] = description __props__.__dict__["display_name"] = display_name __props__.__dict__["enforce"] = enforce + if identity is not None and not isinstance(identity, SubscriptionPolicyAssignmentIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + SubscriptionPolicyAssignmentIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["metadata"] = metadata diff --git a/sdk/python/pulumi_azure/core/subscription_policy_exemption.py b/sdk/python/pulumi_azure/core/subscription_policy_exemption.py index 0d08de2651..ae944547d6 100644 --- a/sdk/python/pulumi_azure/core/subscription_policy_exemption.py +++ b/sdk/python/pulumi_azure/core/subscription_policy_exemption.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SubscriptionPolicyExemptionArgs', 'SubscriptionPolicyExemption'] @@ -35,21 +35,66 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Policy Exemption. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] policy_definition_reference_ids: The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. """ - pulumi.set(__self__, "exemption_category", exemption_category) - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) - pulumi.set(__self__, "subscription_id", subscription_id) + SubscriptionPolicyExemptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + exemption_category=exemption_category, + policy_assignment_id=policy_assignment_id, + subscription_id=subscription_id, + description=description, + display_name=display_name, + expires_on=expires_on, + metadata=metadata, + name=name, + policy_definition_reference_ids=policy_definition_reference_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exemption_category: Optional[pulumi.Input[str]] = None, + policy_assignment_id: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + expires_on: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_definition_reference_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exemption_category is None and 'exemptionCategory' in kwargs: + exemption_category = kwargs['exemptionCategory'] + if exemption_category is None: + raise TypeError("Missing 'exemption_category' argument") + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_assignment_id is None: + raise TypeError("Missing 'policy_assignment_id' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if expires_on is None and 'expiresOn' in kwargs: + expires_on = kwargs['expiresOn'] + if policy_definition_reference_ids is None and 'policyDefinitionReferenceIds' in kwargs: + policy_definition_reference_ids = kwargs['policyDefinitionReferenceIds'] + + _setter("exemption_category", exemption_category) + _setter("policy_assignment_id", policy_assignment_id) + _setter("subscription_id", subscription_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if expires_on is not None: - pulumi.set(__self__, "expires_on", expires_on) + _setter("expires_on", expires_on) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_definition_reference_ids is not None: - pulumi.set(__self__, "policy_definition_reference_ids", policy_definition_reference_ids) + _setter("policy_definition_reference_ids", policy_definition_reference_ids) @property @pulumi.getter(name="exemptionCategory") @@ -184,24 +229,63 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] policy_definition_reference_ids: The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. :param pulumi.Input[str] subscription_id: The Subscription ID where the Policy Exemption should be applied. Changing this forces a new resource to be created. """ + _SubscriptionPolicyExemptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + display_name=display_name, + exemption_category=exemption_category, + expires_on=expires_on, + metadata=metadata, + name=name, + policy_assignment_id=policy_assignment_id, + policy_definition_reference_ids=policy_definition_reference_ids, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + exemption_category: Optional[pulumi.Input[str]] = None, + expires_on: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_assignment_id: Optional[pulumi.Input[str]] = None, + policy_definition_reference_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if exemption_category is None and 'exemptionCategory' in kwargs: + exemption_category = kwargs['exemptionCategory'] + if expires_on is None and 'expiresOn' in kwargs: + expires_on = kwargs['expiresOn'] + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_definition_reference_ids is None and 'policyDefinitionReferenceIds' in kwargs: + policy_definition_reference_ids = kwargs['policyDefinitionReferenceIds'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if exemption_category is not None: - pulumi.set(__self__, "exemption_category", exemption_category) + _setter("exemption_category", exemption_category) if expires_on is not None: - pulumi.set(__self__, "expires_on", expires_on) + _setter("expires_on", expires_on) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_assignment_id is not None: - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) + _setter("policy_assignment_id", policy_assignment_id) if policy_definition_reference_ids is not None: - pulumi.set(__self__, "policy_definition_reference_ids", policy_definition_reference_ids) + _setter("policy_definition_reference_ids", policy_definition_reference_ids) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -419,6 +503,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubscriptionPolicyExemptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/subscription_policy_remediation.py b/sdk/python/pulumi_azure/core/subscription_policy_remediation.py index 43270fc9a9..fd04319fea 100644 --- a/sdk/python/pulumi_azure/core/subscription_policy_remediation.py +++ b/sdk/python/pulumi_azure/core/subscription_policy_remediation.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SubscriptionPolicyRemediationArgs', 'SubscriptionPolicyRemediation'] @@ -27,27 +27,78 @@ def __init__(__self__, *, """ The set of arguments for constructing a SubscriptionPolicyRemediation resource. """ - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) - pulumi.set(__self__, "subscription_id", subscription_id) + SubscriptionPolicyRemediationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy_assignment_id=policy_assignment_id, + subscription_id=subscription_id, + failure_percentage=failure_percentage, + location_filters=location_filters, + name=name, + parallel_deployments=parallel_deployments, + policy_definition_id=policy_definition_id, + policy_definition_reference_id=policy_definition_reference_id, + resource_count=resource_count, + resource_discovery_mode=resource_discovery_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy_assignment_id: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + failure_percentage: Optional[pulumi.Input[float]] = None, + location_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + parallel_deployments: Optional[pulumi.Input[int]] = None, + policy_definition_id: Optional[pulumi.Input[str]] = None, + policy_definition_reference_id: Optional[pulumi.Input[str]] = None, + resource_count: Optional[pulumi.Input[int]] = None, + resource_discovery_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_assignment_id is None: + raise TypeError("Missing 'policy_assignment_id' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + if failure_percentage is None and 'failurePercentage' in kwargs: + failure_percentage = kwargs['failurePercentage'] + if location_filters is None and 'locationFilters' in kwargs: + location_filters = kwargs['locationFilters'] + if parallel_deployments is None and 'parallelDeployments' in kwargs: + parallel_deployments = kwargs['parallelDeployments'] + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + if resource_count is None and 'resourceCount' in kwargs: + resource_count = kwargs['resourceCount'] + if resource_discovery_mode is None and 'resourceDiscoveryMode' in kwargs: + resource_discovery_mode = kwargs['resourceDiscoveryMode'] + + _setter("policy_assignment_id", policy_assignment_id) + _setter("subscription_id", subscription_id) if failure_percentage is not None: - pulumi.set(__self__, "failure_percentage", failure_percentage) + _setter("failure_percentage", failure_percentage) if location_filters is not None: - pulumi.set(__self__, "location_filters", location_filters) + _setter("location_filters", location_filters) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parallel_deployments is not None: - pulumi.set(__self__, "parallel_deployments", parallel_deployments) + _setter("parallel_deployments", parallel_deployments) if policy_definition_id is not None: warnings.warn("""`policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""", DeprecationWarning) pulumi.log.warn("""policy_definition_id is deprecated: `policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""") if policy_definition_id is not None: - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + _setter("policy_definition_id", policy_definition_id) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) if resource_count is not None: - pulumi.set(__self__, "resource_count", resource_count) + _setter("resource_count", resource_count) if resource_discovery_mode is not None: - pulumi.set(__self__, "resource_discovery_mode", resource_discovery_mode) + _setter("resource_discovery_mode", resource_discovery_mode) @property @pulumi.getter(name="policyAssignmentId") @@ -159,29 +210,76 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering SubscriptionPolicyRemediation resources. """ + _SubscriptionPolicyRemediationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + failure_percentage=failure_percentage, + location_filters=location_filters, + name=name, + parallel_deployments=parallel_deployments, + policy_assignment_id=policy_assignment_id, + policy_definition_id=policy_definition_id, + policy_definition_reference_id=policy_definition_reference_id, + resource_count=resource_count, + resource_discovery_mode=resource_discovery_mode, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + failure_percentage: Optional[pulumi.Input[float]] = None, + location_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + parallel_deployments: Optional[pulumi.Input[int]] = None, + policy_assignment_id: Optional[pulumi.Input[str]] = None, + policy_definition_id: Optional[pulumi.Input[str]] = None, + policy_definition_reference_id: Optional[pulumi.Input[str]] = None, + resource_count: Optional[pulumi.Input[int]] = None, + resource_discovery_mode: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failure_percentage is None and 'failurePercentage' in kwargs: + failure_percentage = kwargs['failurePercentage'] + if location_filters is None and 'locationFilters' in kwargs: + location_filters = kwargs['locationFilters'] + if parallel_deployments is None and 'parallelDeployments' in kwargs: + parallel_deployments = kwargs['parallelDeployments'] + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + if resource_count is None and 'resourceCount' in kwargs: + resource_count = kwargs['resourceCount'] + if resource_discovery_mode is None and 'resourceDiscoveryMode' in kwargs: + resource_discovery_mode = kwargs['resourceDiscoveryMode'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if failure_percentage is not None: - pulumi.set(__self__, "failure_percentage", failure_percentage) + _setter("failure_percentage", failure_percentage) if location_filters is not None: - pulumi.set(__self__, "location_filters", location_filters) + _setter("location_filters", location_filters) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parallel_deployments is not None: - pulumi.set(__self__, "parallel_deployments", parallel_deployments) + _setter("parallel_deployments", parallel_deployments) if policy_assignment_id is not None: - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) + _setter("policy_assignment_id", policy_assignment_id) if policy_definition_id is not None: warnings.warn("""`policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""", DeprecationWarning) pulumi.log.warn("""policy_definition_id is deprecated: `policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""") if policy_definition_id is not None: - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + _setter("policy_definition_id", policy_definition_id) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) if resource_count is not None: - pulumi.set(__self__, "resource_count", resource_count) + _setter("resource_count", resource_count) if resource_discovery_mode is not None: - pulumi.set(__self__, "resource_discovery_mode", resource_discovery_mode) + _setter("resource_discovery_mode", resource_discovery_mode) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter(name="failurePercentage") @@ -316,6 +414,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubscriptionPolicyRemediationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/subscription_template_deployment.py b/sdk/python/pulumi_azure/core/subscription_template_deployment.py index 134b420aa1..15c6810e6a 100644 --- a/sdk/python/pulumi_azure/core/subscription_template_deployment.py +++ b/sdk/python/pulumi_azure/core/subscription_template_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SubscriptionTemplateDeploymentArgs', 'SubscriptionTemplateDeployment'] @@ -31,20 +31,51 @@ def __init__(__self__, *, :param pulumi.Input[str] template_content: The contents of the ARM Template which should be deployed into this Subscription. :param pulumi.Input[str] template_spec_version_id: The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with `template_content`. """ + SubscriptionTemplateDeploymentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + debug_level=debug_level, + location=location, + name=name, + parameters_content=parameters_content, + tags=tags, + template_content=template_content, + template_spec_version_id=template_spec_version_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + debug_level: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters_content: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + template_content: Optional[pulumi.Input[str]] = None, + template_spec_version_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if debug_level is None and 'debugLevel' in kwargs: + debug_level = kwargs['debugLevel'] + if parameters_content is None and 'parametersContent' in kwargs: + parameters_content = kwargs['parametersContent'] + if template_content is None and 'templateContent' in kwargs: + template_content = kwargs['templateContent'] + if template_spec_version_id is None and 'templateSpecVersionId' in kwargs: + template_spec_version_id = kwargs['templateSpecVersionId'] + if debug_level is not None: - pulumi.set(__self__, "debug_level", debug_level) + _setter("debug_level", debug_level) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters_content is not None: - pulumi.set(__self__, "parameters_content", parameters_content) + _setter("parameters_content", parameters_content) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if template_content is not None: - pulumi.set(__self__, "template_content", template_content) + _setter("template_content", template_content) if template_spec_version_id is not None: - pulumi.set(__self__, "template_spec_version_id", template_spec_version_id) + _setter("template_spec_version_id", template_spec_version_id) @property @pulumi.getter(name="debugLevel") @@ -153,22 +184,57 @@ def __init__(__self__, *, :param pulumi.Input[str] template_content: The contents of the ARM Template which should be deployed into this Subscription. :param pulumi.Input[str] template_spec_version_id: The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with `template_content`. """ + _SubscriptionTemplateDeploymentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + debug_level=debug_level, + location=location, + name=name, + output_content=output_content, + parameters_content=parameters_content, + tags=tags, + template_content=template_content, + template_spec_version_id=template_spec_version_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + debug_level: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + output_content: Optional[pulumi.Input[str]] = None, + parameters_content: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + template_content: Optional[pulumi.Input[str]] = None, + template_spec_version_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if debug_level is None and 'debugLevel' in kwargs: + debug_level = kwargs['debugLevel'] + if output_content is None and 'outputContent' in kwargs: + output_content = kwargs['outputContent'] + if parameters_content is None and 'parametersContent' in kwargs: + parameters_content = kwargs['parametersContent'] + if template_content is None and 'templateContent' in kwargs: + template_content = kwargs['templateContent'] + if template_spec_version_id is None and 'templateSpecVersionId' in kwargs: + template_spec_version_id = kwargs['templateSpecVersionId'] + if debug_level is not None: - pulumi.set(__self__, "debug_level", debug_level) + _setter("debug_level", debug_level) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if output_content is not None: - pulumi.set(__self__, "output_content", output_content) + _setter("output_content", output_content) if parameters_content is not None: - pulumi.set(__self__, "parameters_content", parameters_content) + _setter("parameters_content", parameters_content) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if template_content is not None: - pulumi.set(__self__, "template_content", template_content) + _setter("template_content", template_content) if template_spec_version_id is not None: - pulumi.set(__self__, "template_spec_version_id", template_spec_version_id) + _setter("template_spec_version_id", template_spec_version_id) @property @pulumi.getter(name="debugLevel") @@ -382,6 +448,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubscriptionTemplateDeploymentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/template_deployment.py b/sdk/python/pulumi_azure/core/template_deployment.py index 5abd1988dd..2418f5f3d1 100644 --- a/sdk/python/pulumi_azure/core/template_deployment.py +++ b/sdk/python/pulumi_azure/core/template_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TemplateDeploymentArgs', 'TemplateDeployment'] @@ -31,16 +31,49 @@ def __init__(__self__, *, :param pulumi.Input[str] parameters_body: Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references :param pulumi.Input[str] template_body: Specifies the JSON definition for the template. """ - pulumi.set(__self__, "deployment_mode", deployment_mode) - pulumi.set(__self__, "resource_group_name", resource_group_name) + TemplateDeploymentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + deployment_mode=deployment_mode, + resource_group_name=resource_group_name, + name=name, + parameters=parameters, + parameters_body=parameters_body, + template_body=template_body, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + deployment_mode: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + parameters_body: Optional[pulumi.Input[str]] = None, + template_body: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if deployment_mode is None and 'deploymentMode' in kwargs: + deployment_mode = kwargs['deploymentMode'] + if deployment_mode is None: + raise TypeError("Missing 'deployment_mode' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if parameters_body is None and 'parametersBody' in kwargs: + parameters_body = kwargs['parametersBody'] + if template_body is None and 'templateBody' in kwargs: + template_body = kwargs['templateBody'] + + _setter("deployment_mode", deployment_mode) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if parameters_body is not None: - pulumi.set(__self__, "parameters_body", parameters_body) + _setter("parameters_body", parameters_body) if template_body is not None: - pulumi.set(__self__, "template_body", template_body) + _setter("template_body", template_body) @property @pulumi.getter(name="deploymentMode") @@ -139,20 +172,51 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the template deployment. Changing this forces a new resource to be created. :param pulumi.Input[str] template_body: Specifies the JSON definition for the template. """ + _TemplateDeploymentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + deployment_mode=deployment_mode, + name=name, + outputs=outputs, + parameters=parameters, + parameters_body=parameters_body, + resource_group_name=resource_group_name, + template_body=template_body, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + deployment_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outputs: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + parameters_body: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + template_body: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if deployment_mode is None and 'deploymentMode' in kwargs: + deployment_mode = kwargs['deploymentMode'] + if parameters_body is None and 'parametersBody' in kwargs: + parameters_body = kwargs['parametersBody'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if template_body is None and 'templateBody' in kwargs: + template_body = kwargs['templateBody'] + if deployment_mode is not None: - pulumi.set(__self__, "deployment_mode", deployment_mode) + _setter("deployment_mode", deployment_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outputs is not None: - pulumi.set(__self__, "outputs", outputs) + _setter("outputs", outputs) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if parameters_body is not None: - pulumi.set(__self__, "parameters_body", parameters_body) + _setter("parameters_body", parameters_body) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if template_body is not None: - pulumi.set(__self__, "template_body", template_body) + _setter("template_body", template_body) @property @pulumi.getter(name="deploymentMode") @@ -448,6 +512,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TemplateDeploymentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/core/tenant_template_deployment.py b/sdk/python/pulumi_azure/core/tenant_template_deployment.py index 244566a710..3a9239077b 100644 --- a/sdk/python/pulumi_azure/core/tenant_template_deployment.py +++ b/sdk/python/pulumi_azure/core/tenant_template_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TenantTemplateDeploymentArgs', 'TenantTemplateDeployment'] @@ -31,20 +31,51 @@ def __init__(__self__, *, :param pulumi.Input[str] template_content: The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`. :param pulumi.Input[str] template_spec_version_id: The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`. """ + TenantTemplateDeploymentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + debug_level=debug_level, + location=location, + name=name, + parameters_content=parameters_content, + tags=tags, + template_content=template_content, + template_spec_version_id=template_spec_version_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + debug_level: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters_content: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + template_content: Optional[pulumi.Input[str]] = None, + template_spec_version_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if debug_level is None and 'debugLevel' in kwargs: + debug_level = kwargs['debugLevel'] + if parameters_content is None and 'parametersContent' in kwargs: + parameters_content = kwargs['parametersContent'] + if template_content is None and 'templateContent' in kwargs: + template_content = kwargs['templateContent'] + if template_spec_version_id is None and 'templateSpecVersionId' in kwargs: + template_spec_version_id = kwargs['templateSpecVersionId'] + if debug_level is not None: - pulumi.set(__self__, "debug_level", debug_level) + _setter("debug_level", debug_level) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters_content is not None: - pulumi.set(__self__, "parameters_content", parameters_content) + _setter("parameters_content", parameters_content) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if template_content is not None: - pulumi.set(__self__, "template_content", template_content) + _setter("template_content", template_content) if template_spec_version_id is not None: - pulumi.set(__self__, "template_spec_version_id", template_spec_version_id) + _setter("template_spec_version_id", template_spec_version_id) @property @pulumi.getter(name="debugLevel") @@ -153,22 +184,57 @@ def __init__(__self__, *, :param pulumi.Input[str] template_content: The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`. :param pulumi.Input[str] template_spec_version_id: The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`. """ + _TenantTemplateDeploymentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + debug_level=debug_level, + location=location, + name=name, + output_content=output_content, + parameters_content=parameters_content, + tags=tags, + template_content=template_content, + template_spec_version_id=template_spec_version_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + debug_level: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + output_content: Optional[pulumi.Input[str]] = None, + parameters_content: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + template_content: Optional[pulumi.Input[str]] = None, + template_spec_version_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if debug_level is None and 'debugLevel' in kwargs: + debug_level = kwargs['debugLevel'] + if output_content is None and 'outputContent' in kwargs: + output_content = kwargs['outputContent'] + if parameters_content is None and 'parametersContent' in kwargs: + parameters_content = kwargs['parametersContent'] + if template_content is None and 'templateContent' in kwargs: + template_content = kwargs['templateContent'] + if template_spec_version_id is None and 'templateSpecVersionId' in kwargs: + template_spec_version_id = kwargs['templateSpecVersionId'] + if debug_level is not None: - pulumi.set(__self__, "debug_level", debug_level) + _setter("debug_level", debug_level) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if output_content is not None: - pulumi.set(__self__, "output_content", output_content) + _setter("output_content", output_content) if parameters_content is not None: - pulumi.set(__self__, "parameters_content", parameters_content) + _setter("parameters_content", parameters_content) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if template_content is not None: - pulumi.set(__self__, "template_content", template_content) + _setter("template_content", template_content) if template_spec_version_id is not None: - pulumi.set(__self__, "template_spec_version_id", template_spec_version_id) + _setter("template_spec_version_id", template_spec_version_id) @property @pulumi.getter(name="debugLevel") @@ -352,6 +418,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TenantTemplateDeploymentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/_inputs.py b/sdk/python/pulumi_azure/cosmosdb/_inputs.py index 7acd274288..429219863d 100644 --- a/sdk/python/pulumi_azure/cosmosdb/_inputs.py +++ b/sdk/python/pulumi_azure/cosmosdb/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -64,7 +64,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] schema_type: The schema type of the Analytical Storage for this Cosmos DB account. Possible values are `FullFidelity` and `WellDefined`. """ - pulumi.set(__self__, "schema_type", schema_type) + AccountAnalyticalStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + schema_type=schema_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schema_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schema_type is None and 'schemaType' in kwargs: + schema_type = kwargs['schemaType'] + if schema_type is None: + raise TypeError("Missing 'schema_type' argument") + + _setter("schema_type", schema_type) @property @pulumi.getter(name="schemaType") @@ -92,13 +107,38 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_in_hours: The time in hours that each backup is retained. This is configurable only when `type` is `Periodic`. Possible values are between 8 and 720. :param pulumi.Input[str] storage_redundancy: The storage redundancy is used to indicate the type of backup residency. This is configurable only when `type` is `Periodic`. Possible values are `Geo`, `Local` and `Zone`. """ - pulumi.set(__self__, "type", type) + AccountBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + interval_in_minutes=interval_in_minutes, + retention_in_hours=retention_in_hours, + storage_redundancy=storage_redundancy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + interval_in_minutes: Optional[pulumi.Input[int]] = None, + retention_in_hours: Optional[pulumi.Input[int]] = None, + storage_redundancy: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if interval_in_minutes is None and 'intervalInMinutes' in kwargs: + interval_in_minutes = kwargs['intervalInMinutes'] + if retention_in_hours is None and 'retentionInHours' in kwargs: + retention_in_hours = kwargs['retentionInHours'] + if storage_redundancy is None and 'storageRedundancy' in kwargs: + storage_redundancy = kwargs['storageRedundancy'] + + _setter("type", type) if interval_in_minutes is not None: - pulumi.set(__self__, "interval_in_minutes", interval_in_minutes) + _setter("interval_in_minutes", interval_in_minutes) if retention_in_hours is not None: - pulumi.set(__self__, "retention_in_hours", retention_in_hours) + _setter("retention_in_hours", retention_in_hours) if storage_redundancy is not None: - pulumi.set(__self__, "storage_redundancy", storage_redundancy) + _setter("storage_redundancy", storage_redundancy) @property @pulumi.getter @@ -156,7 +196,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] name: Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + AccountCapabilityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -178,7 +231,22 @@ def __init__(__self__, *, """ :param pulumi.Input[int] total_throughput_limit: The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least `-1`. `-1` means no limit. """ - pulumi.set(__self__, "total_throughput_limit", total_throughput_limit) + AccountCapacityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + total_throughput_limit=total_throughput_limit, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + total_throughput_limit: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if total_throughput_limit is None and 'totalThroughputLimit' in kwargs: + total_throughput_limit = kwargs['totalThroughputLimit'] + if total_throughput_limit is None: + raise TypeError("Missing 'total_throughput_limit' argument") + + _setter("total_throughput_limit", total_throughput_limit) @property @pulumi.getter(name="totalThroughputLimit") @@ -206,11 +274,34 @@ def __init__(__self__, *, > **Note:** `max_interval_in_seconds` and `max_staleness_prefix` can only be set to custom values when `consistency_level` is set to `BoundedStaleness` - otherwise they will return the default values shown above. """ - pulumi.set(__self__, "consistency_level", consistency_level) + AccountConsistencyPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consistency_level=consistency_level, + max_interval_in_seconds=max_interval_in_seconds, + max_staleness_prefix=max_staleness_prefix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consistency_level: Optional[pulumi.Input[str]] = None, + max_interval_in_seconds: Optional[pulumi.Input[int]] = None, + max_staleness_prefix: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consistency_level is None and 'consistencyLevel' in kwargs: + consistency_level = kwargs['consistencyLevel'] + if consistency_level is None: + raise TypeError("Missing 'consistency_level' argument") + if max_interval_in_seconds is None and 'maxIntervalInSeconds' in kwargs: + max_interval_in_seconds = kwargs['maxIntervalInSeconds'] + if max_staleness_prefix is None and 'maxStalenessPrefix' in kwargs: + max_staleness_prefix = kwargs['maxStalenessPrefix'] + + _setter("consistency_level", consistency_level) if max_interval_in_seconds is not None: - pulumi.set(__self__, "max_interval_in_seconds", max_interval_in_seconds) + _setter("max_interval_in_seconds", max_interval_in_seconds) if max_staleness_prefix is not None: - pulumi.set(__self__, "max_staleness_prefix", max_staleness_prefix) + _setter("max_staleness_prefix", max_staleness_prefix) @property @pulumi.getter(name="consistencyLevel") @@ -266,12 +357,49 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] exposed_headers: A list of response headers that are exposed to CORS clients. :param pulumi.Input[int] max_age_in_seconds: The number of seconds the client should cache a preflight response. Possible values are between `1` and `2147483647`. """ - pulumi.set(__self__, "allowed_headers", allowed_headers) - pulumi.set(__self__, "allowed_methods", allowed_methods) - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "exposed_headers", exposed_headers) + AccountCorsRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + exposed_headers=exposed_headers, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + exposed_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + max_age_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_headers is None: + raise TypeError("Missing 'allowed_headers' argument") + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_methods is None: + raise TypeError("Missing 'allowed_methods' argument") + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if exposed_headers is None and 'exposedHeaders' in kwargs: + exposed_headers = kwargs['exposedHeaders'] + if exposed_headers is None: + raise TypeError("Missing 'exposed_headers' argument") + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + + _setter("allowed_headers", allowed_headers) + _setter("allowed_methods", allowed_methods) + _setter("allowed_origins", allowed_origins) + _setter("exposed_headers", exposed_headers) if max_age_in_seconds is not None: - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowedHeaders") @@ -347,12 +475,37 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the virtual network subnet. :param pulumi.Input[bool] zone_redundant: Should zone redundancy be enabled for this region? Defaults to `false`. """ - pulumi.set(__self__, "failover_priority", failover_priority) - pulumi.set(__self__, "location", location) + AccountGeoLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + failover_priority=failover_priority, + location=location, + id=id, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + failover_priority: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failover_priority is None and 'failoverPriority' in kwargs: + failover_priority = kwargs['failoverPriority'] + if failover_priority is None: + raise TypeError("Missing 'failover_priority' argument") + if location is None: + raise TypeError("Missing 'location' argument") + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + + _setter("failover_priority", failover_priority) + _setter("location", location) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="failoverPriority") @@ -416,13 +569,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + AccountIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -486,10 +664,33 @@ def __init__(__self__, *, > **NOTE:** Any database account with `Continuous` type (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved by `cosmosdb_get_restorable_database_accounts`. :param pulumi.Input[Sequence[pulumi.Input['AccountRestoreDatabaseArgs']]] databases: A `database` block as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "restore_timestamp_in_utc", restore_timestamp_in_utc) - pulumi.set(__self__, "source_cosmosdb_account_id", source_cosmosdb_account_id) + AccountRestoreArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + restore_timestamp_in_utc=restore_timestamp_in_utc, + source_cosmosdb_account_id=source_cosmosdb_account_id, + databases=databases, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + restore_timestamp_in_utc: Optional[pulumi.Input[str]] = None, + source_cosmosdb_account_id: Optional[pulumi.Input[str]] = None, + databases: Optional[pulumi.Input[Sequence[pulumi.Input['AccountRestoreDatabaseArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if restore_timestamp_in_utc is None and 'restoreTimestampInUtc' in kwargs: + restore_timestamp_in_utc = kwargs['restoreTimestampInUtc'] + if restore_timestamp_in_utc is None: + raise TypeError("Missing 'restore_timestamp_in_utc' argument") + if source_cosmosdb_account_id is None and 'sourceCosmosdbAccountId' in kwargs: + source_cosmosdb_account_id = kwargs['sourceCosmosdbAccountId'] + if source_cosmosdb_account_id is None: + raise TypeError("Missing 'source_cosmosdb_account_id' argument") + + _setter("restore_timestamp_in_utc", restore_timestamp_in_utc) + _setter("source_cosmosdb_account_id", source_cosmosdb_account_id) if databases is not None: - pulumi.set(__self__, "databases", databases) + _setter("databases", databases) @property @pulumi.getter(name="restoreTimestampInUtc") @@ -539,9 +740,26 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The database name for the restore request. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] collection_names: A list of the collection names for the restore request. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + AccountRestoreDatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + collection_names=collection_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + collection_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if collection_names is None and 'collectionNames' in kwargs: + collection_names = kwargs['collectionNames'] + + _setter("name", name) if collection_names is not None: - pulumi.set(__self__, "collection_names", collection_names) + _setter("collection_names", collection_names) @property @pulumi.getter @@ -577,9 +795,26 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the virtual network subnet. :param pulumi.Input[bool] ignore_missing_vnet_service_endpoint: If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to `false`. """ - pulumi.set(__self__, "id", id) + AccountVirtualNetworkRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + ignore_missing_vnet_service_endpoint: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + + _setter("id", id) if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) @property @pulumi.getter @@ -615,11 +850,32 @@ def __init__(__self__, *, """ :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that should be configured on this Cassandra Cluster. The only possible value is `SystemAssigned`. """ - pulumi.set(__self__, "type", type) + CassandraClusterIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -659,8 +915,21 @@ def __init__(__self__, *, """ :param pulumi.Input[int] max_throughput: The maximum throughput of the Cassandra KeySpace (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + CassandraKeyspaceAutoscaleSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -682,8 +951,21 @@ def __init__(__self__, *, """ :param pulumi.Input[int] max_throughput: The maximum throughput of the Cassandra Table (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + CassandraTableAutoscaleSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -709,10 +991,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['CassandraTableSchemaPartitionKeyArgs']]] partition_keys: One or more `partition_key` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['CassandraTableSchemaClusterKeyArgs']]] cluster_keys: One or more `cluster_key` blocks as defined below. """ - pulumi.set(__self__, "columns", columns) - pulumi.set(__self__, "partition_keys", partition_keys) + CassandraTableSchemaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + columns=columns, + partition_keys=partition_keys, + cluster_keys=cluster_keys, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + columns: Optional[pulumi.Input[Sequence[pulumi.Input['CassandraTableSchemaColumnArgs']]]] = None, + partition_keys: Optional[pulumi.Input[Sequence[pulumi.Input['CassandraTableSchemaPartitionKeyArgs']]]] = None, + cluster_keys: Optional[pulumi.Input[Sequence[pulumi.Input['CassandraTableSchemaClusterKeyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if columns is None: + raise TypeError("Missing 'columns' argument") + if partition_keys is None and 'partitionKeys' in kwargs: + partition_keys = kwargs['partitionKeys'] + if partition_keys is None: + raise TypeError("Missing 'partition_keys' argument") + if cluster_keys is None and 'clusterKeys' in kwargs: + cluster_keys = kwargs['clusterKeys'] + + _setter("columns", columns) + _setter("partition_keys", partition_keys) if cluster_keys is not None: - pulumi.set(__self__, "cluster_keys", cluster_keys) + _setter("cluster_keys", cluster_keys) @property @pulumi.getter @@ -760,8 +1065,27 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Name of the cluster key to be created. :param pulumi.Input[str] order_by: Order of the key. Currently supported values are `Asc` and `Desc`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "order_by", order_by) + CassandraTableSchemaClusterKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + order_by=order_by, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + order_by: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if order_by is None and 'orderBy' in kwargs: + order_by = kwargs['orderBy'] + if order_by is None: + raise TypeError("Missing 'order_by' argument") + + _setter("name", name) + _setter("order_by", order_by) @property @pulumi.getter @@ -797,8 +1121,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Name of the column to be created. :param pulumi.Input[str] type: Type of the column to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + CassandraTableSchemaColumnArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -832,7 +1173,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] name: Name of the column to partition by. """ - pulumi.set(__self__, "name", name) + CassandraTableSchemaPartitionKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -854,8 +1208,21 @@ def __init__(__self__, *, """ :param pulumi.Input[int] max_throughput: The maximum throughput of the Gremlin database (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + GremlinDatabaseAutoscaleSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -877,8 +1244,21 @@ def __init__(__self__, *, """ :param pulumi.Input[int] max_throughput: The maximum throughput of the Gremlin graph (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + GremlinGraphAutoscaleSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -904,11 +1284,32 @@ def __init__(__self__, *, :param pulumi.Input[str] conflict_resolution_path: The conflict resolution path in the case of LastWriterWins mode. :param pulumi.Input[str] conflict_resolution_procedure: The procedure to resolve conflicts in the case of custom mode. """ - pulumi.set(__self__, "mode", mode) + GremlinGraphConflictResolutionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + conflict_resolution_path=conflict_resolution_path, + conflict_resolution_procedure=conflict_resolution_procedure, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + conflict_resolution_path: Optional[pulumi.Input[str]] = None, + conflict_resolution_procedure: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if conflict_resolution_path is None and 'conflictResolutionPath' in kwargs: + conflict_resolution_path = kwargs['conflictResolutionPath'] + if conflict_resolution_procedure is None and 'conflictResolutionProcedure' in kwargs: + conflict_resolution_procedure = kwargs['conflictResolutionProcedure'] + + _setter("mode", mode) if conflict_resolution_path is not None: - pulumi.set(__self__, "conflict_resolution_path", conflict_resolution_path) + _setter("conflict_resolution_path", conflict_resolution_path) if conflict_resolution_procedure is not None: - pulumi.set(__self__, "conflict_resolution_procedure", conflict_resolution_procedure) + _setter("conflict_resolution_procedure", conflict_resolution_procedure) @property @pulumi.getter @@ -964,17 +1365,50 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] included_paths: List of paths to include in the indexing. Required if `indexing_mode` is `Consistent` or `Lazy`. :param pulumi.Input[Sequence[pulumi.Input['GremlinGraphIndexPolicySpatialIndexArgs']]] spatial_indices: One or more `spatial_index` blocks as defined below. """ - pulumi.set(__self__, "indexing_mode", indexing_mode) + GremlinGraphIndexPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + indexing_mode=indexing_mode, + automatic=automatic, + composite_indices=composite_indices, + excluded_paths=excluded_paths, + included_paths=included_paths, + spatial_indices=spatial_indices, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + indexing_mode: Optional[pulumi.Input[str]] = None, + automatic: Optional[pulumi.Input[bool]] = None, + composite_indices: Optional[pulumi.Input[Sequence[pulumi.Input['GremlinGraphIndexPolicyCompositeIndexArgs']]]] = None, + excluded_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + included_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + spatial_indices: Optional[pulumi.Input[Sequence[pulumi.Input['GremlinGraphIndexPolicySpatialIndexArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if indexing_mode is None and 'indexingMode' in kwargs: + indexing_mode = kwargs['indexingMode'] + if indexing_mode is None: + raise TypeError("Missing 'indexing_mode' argument") + if composite_indices is None and 'compositeIndices' in kwargs: + composite_indices = kwargs['compositeIndices'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if included_paths is None and 'includedPaths' in kwargs: + included_paths = kwargs['includedPaths'] + if spatial_indices is None and 'spatialIndices' in kwargs: + spatial_indices = kwargs['spatialIndices'] + + _setter("indexing_mode", indexing_mode) if automatic is not None: - pulumi.set(__self__, "automatic", automatic) + _setter("automatic", automatic) if composite_indices is not None: - pulumi.set(__self__, "composite_indices", composite_indices) + _setter("composite_indices", composite_indices) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if included_paths is not None: - pulumi.set(__self__, "included_paths", included_paths) + _setter("included_paths", included_paths) if spatial_indices is not None: - pulumi.set(__self__, "spatial_indices", spatial_indices) + _setter("spatial_indices", spatial_indices) @property @pulumi.getter(name="indexingMode") @@ -1056,7 +1490,20 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input['GremlinGraphIndexPolicyCompositeIndexIndexArgs']]] indices: One or more `index` blocks as defined below. """ - pulumi.set(__self__, "indices", indices) + GremlinGraphIndexPolicyCompositeIndexArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + indices=indices, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + indices: Optional[pulumi.Input[Sequence[pulumi.Input['GremlinGraphIndexPolicyCompositeIndexIndexArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if indices is None: + raise TypeError("Missing 'indices' argument") + + _setter("indices", indices) @property @pulumi.getter @@ -1080,8 +1527,25 @@ def __init__(__self__, *, :param pulumi.Input[str] order: Order of the index. Possible values are `Ascending` or `Descending`. :param pulumi.Input[str] path: Path for which the indexing behaviour applies to. """ - pulumi.set(__self__, "order", order) - pulumi.set(__self__, "path", path) + GremlinGraphIndexPolicyCompositeIndexIndexArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + order=order, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + order: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if order is None: + raise TypeError("Missing 'order' argument") + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("order", order) + _setter("path", path) @property @pulumi.getter @@ -1116,9 +1580,24 @@ def __init__(__self__, *, """ :param pulumi.Input[str] path: Path for which the indexing behaviour applies to. According to the service design, all spatial types including `LineString`, `MultiPolygon`, `Point`, and `Polygon` will be applied to the path. """ - pulumi.set(__self__, "path", path) + GremlinGraphIndexPolicySpatialIndexArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + path=path, + types=types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + path: Optional[pulumi.Input[str]] = None, + types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("path", path) if types is not None: - pulumi.set(__self__, "types", types) + _setter("types", types) @property @pulumi.getter @@ -1149,7 +1628,20 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] paths: A list of paths to use for this unique key. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "paths", paths) + GremlinGraphUniqueKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + paths=paths, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if paths is None: + raise TypeError("Missing 'paths' argument") + + _setter("paths", paths) @property @pulumi.getter @@ -1171,8 +1663,21 @@ def __init__(__self__, *, """ :param pulumi.Input[int] max_throughput: The maximum throughput of the MongoDB collection (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + MongoCollectionAutoscaleSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -1198,9 +1703,24 @@ def __init__(__self__, *, > **Note:** An index with an "_id" key must be specified. """ - pulumi.set(__self__, "keys", keys) + MongoCollectionIndexArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + keys=keys, + unique=unique, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + unique: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if keys is None: + raise TypeError("Missing 'keys' argument") + + _setter("keys", keys) if unique is not None: - pulumi.set(__self__, "unique", unique) + _setter("unique", unique) @property @pulumi.getter @@ -1240,10 +1760,23 @@ def __init__(__self__, *, > **Note:** An index with an "_id" key must be specified. """ + MongoCollectionSystemIndexArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + keys=keys, + unique=unique, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + unique: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if keys is not None: - pulumi.set(__self__, "keys", keys) + _setter("keys", keys) if unique is not None: - pulumi.set(__self__, "unique", unique) + _setter("unique", unique) @property @pulumi.getter @@ -1279,8 +1812,21 @@ def __init__(__self__, *, """ :param pulumi.Input[int] max_throughput: The maximum throughput of the MongoDB database (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + MongoDatabaseAutoscaleSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -1304,8 +1850,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] actions: A list of actions that are allowed. :param pulumi.Input['MongoRoleDefinitionPrivilegeResourceArgs'] resource: A `resource` block as defined below. """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "resource", resource) + MongoRoleDefinitionPrivilegeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + resource=resource, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource: Optional[pulumi.Input['MongoRoleDefinitionPrivilegeResourceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if resource is None: + raise TypeError("Missing 'resource' argument") + + _setter("actions", actions) + _setter("resource", resource) @property @pulumi.getter @@ -1341,10 +1904,27 @@ def __init__(__self__, *, :param pulumi.Input[str] collection_name: The name of the Mongo DB Collection that the Role Definition is applied. :param pulumi.Input[str] db_name: The name of the Mongo DB that the Role Definition is applied. """ + MongoRoleDefinitionPrivilegeResourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + collection_name=collection_name, + db_name=db_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + collection_name: Optional[pulumi.Input[str]] = None, + db_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if collection_name is None and 'collectionName' in kwargs: + collection_name = kwargs['collectionName'] + if db_name is None and 'dbName' in kwargs: + db_name = kwargs['dbName'] + if collection_name is not None: - pulumi.set(__self__, "collection_name", collection_name) + _setter("collection_name", collection_name) if db_name is not None: - pulumi.set(__self__, "db_name", db_name) + _setter("db_name", db_name) @property @pulumi.getter(name="collectionName") @@ -1382,12 +1962,33 @@ def __init__(__self__, *, :param pulumi.Input[int] start_hour: The start hour for maintenance window. Defaults to `0`. :param pulumi.Input[int] start_minute: The start minute for maintenance window. Defaults to `0`. """ + PostgresqlClusterMaintenanceWindowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + start_hour=start_hour, + start_minute=start_minute, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[pulumi.Input[int]] = None, + start_hour: Optional[pulumi.Input[int]] = None, + start_minute: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if start_hour is None and 'startHour' in kwargs: + start_hour = kwargs['startHour'] + if start_minute is None and 'startMinute' in kwargs: + start_minute = kwargs['startMinute'] + if day_of_week is not None: - pulumi.set(__self__, "day_of_week", day_of_week) + _setter("day_of_week", day_of_week) if start_hour is not None: - pulumi.set(__self__, "start_hour", start_hour) + _setter("start_hour", start_hour) if start_minute is not None: - pulumi.set(__self__, "start_minute", start_minute) + _setter("start_minute", start_minute) @property @pulumi.getter(name="dayOfWeek") @@ -1433,8 +2034,21 @@ def __init__(__self__, *, """ :param pulumi.Input[int] max_throughput: The maximum throughput of the SQL container (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + SqlContainerAutoscaleSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -1460,11 +2074,32 @@ def __init__(__self__, *, :param pulumi.Input[str] conflict_resolution_path: The conflict resolution path in the case of `LastWriterWins` mode. :param pulumi.Input[str] conflict_resolution_procedure: The procedure to resolve conflicts in the case of `Custom` mode. """ - pulumi.set(__self__, "mode", mode) + SqlContainerConflictResolutionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + conflict_resolution_path=conflict_resolution_path, + conflict_resolution_procedure=conflict_resolution_procedure, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + conflict_resolution_path: Optional[pulumi.Input[str]] = None, + conflict_resolution_procedure: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if conflict_resolution_path is None and 'conflictResolutionPath' in kwargs: + conflict_resolution_path = kwargs['conflictResolutionPath'] + if conflict_resolution_procedure is None and 'conflictResolutionProcedure' in kwargs: + conflict_resolution_procedure = kwargs['conflictResolutionProcedure'] + + _setter("mode", mode) if conflict_resolution_path is not None: - pulumi.set(__self__, "conflict_resolution_path", conflict_resolution_path) + _setter("conflict_resolution_path", conflict_resolution_path) if conflict_resolution_procedure is not None: - pulumi.set(__self__, "conflict_resolution_procedure", conflict_resolution_procedure) + _setter("conflict_resolution_procedure", conflict_resolution_procedure) @property @pulumi.getter @@ -1518,16 +2153,45 @@ def __init__(__self__, *, :param pulumi.Input[str] indexing_mode: Indicates the indexing mode. Possible values include: `consistent` and `none`. Defaults to `consistent`. :param pulumi.Input[Sequence[pulumi.Input['SqlContainerIndexingPolicySpatialIndexArgs']]] spatial_indices: One or more `spatial_index` blocks as defined below. """ + SqlContainerIndexingPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + composite_indices=composite_indices, + excluded_paths=excluded_paths, + included_paths=included_paths, + indexing_mode=indexing_mode, + spatial_indices=spatial_indices, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + composite_indices: Optional[pulumi.Input[Sequence[pulumi.Input['SqlContainerIndexingPolicyCompositeIndexArgs']]]] = None, + excluded_paths: Optional[pulumi.Input[Sequence[pulumi.Input['SqlContainerIndexingPolicyExcludedPathArgs']]]] = None, + included_paths: Optional[pulumi.Input[Sequence[pulumi.Input['SqlContainerIndexingPolicyIncludedPathArgs']]]] = None, + indexing_mode: Optional[pulumi.Input[str]] = None, + spatial_indices: Optional[pulumi.Input[Sequence[pulumi.Input['SqlContainerIndexingPolicySpatialIndexArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if composite_indices is None and 'compositeIndices' in kwargs: + composite_indices = kwargs['compositeIndices'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if included_paths is None and 'includedPaths' in kwargs: + included_paths = kwargs['includedPaths'] + if indexing_mode is None and 'indexingMode' in kwargs: + indexing_mode = kwargs['indexingMode'] + if spatial_indices is None and 'spatialIndices' in kwargs: + spatial_indices = kwargs['spatialIndices'] + if composite_indices is not None: - pulumi.set(__self__, "composite_indices", composite_indices) + _setter("composite_indices", composite_indices) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if included_paths is not None: - pulumi.set(__self__, "included_paths", included_paths) + _setter("included_paths", included_paths) if indexing_mode is not None: - pulumi.set(__self__, "indexing_mode", indexing_mode) + _setter("indexing_mode", indexing_mode) if spatial_indices is not None: - pulumi.set(__self__, "spatial_indices", spatial_indices) + _setter("spatial_indices", spatial_indices) @property @pulumi.getter(name="compositeIndices") @@ -1597,7 +2261,20 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input['SqlContainerIndexingPolicyCompositeIndexIndexArgs']]] indices: One or more `index` blocks as defined below. """ - pulumi.set(__self__, "indices", indices) + SqlContainerIndexingPolicyCompositeIndexArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + indices=indices, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + indices: Optional[pulumi.Input[Sequence[pulumi.Input['SqlContainerIndexingPolicyCompositeIndexIndexArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if indices is None: + raise TypeError("Missing 'indices' argument") + + _setter("indices", indices) @property @pulumi.getter @@ -1621,8 +2298,25 @@ def __init__(__self__, *, :param pulumi.Input[str] order: Order of the index. Possible values are `Ascending` or `Descending`. :param pulumi.Input[str] path: Path for which the indexing behaviour applies to. """ - pulumi.set(__self__, "order", order) - pulumi.set(__self__, "path", path) + SqlContainerIndexingPolicyCompositeIndexIndexArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + order=order, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + order: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if order is None: + raise TypeError("Missing 'order' argument") + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("order", order) + _setter("path", path) @property @pulumi.getter @@ -1656,7 +2350,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] path: Path that is excluded from indexing. """ - pulumi.set(__self__, "path", path) + SqlContainerIndexingPolicyExcludedPathArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("path", path) @property @pulumi.getter @@ -1678,7 +2385,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] path: Path for which the indexing behaviour applies to. """ - pulumi.set(__self__, "path", path) + SqlContainerIndexingPolicyIncludedPathArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("path", path) @property @pulumi.getter @@ -1702,9 +2422,24 @@ def __init__(__self__, *, :param pulumi.Input[str] path: Path for which the indexing behaviour applies to. According to the service design, all spatial types including `LineString`, `MultiPolygon`, `Point`, and `Polygon` will be applied to the path. :param pulumi.Input[Sequence[pulumi.Input[str]]] types: A set of spatial types of the path. """ - pulumi.set(__self__, "path", path) + SqlContainerIndexingPolicySpatialIndexArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + path=path, + types=types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + path: Optional[pulumi.Input[str]] = None, + types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("path", path) if types is not None: - pulumi.set(__self__, "types", types) + _setter("types", types) @property @pulumi.getter @@ -1738,7 +2473,20 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] paths: A list of paths to use for this unique key. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "paths", paths) + SqlContainerUniqueKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + paths=paths, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if paths is None: + raise TypeError("Missing 'paths' argument") + + _setter("paths", paths) @property @pulumi.getter @@ -1760,8 +2508,21 @@ def __init__(__self__, *, """ :param pulumi.Input[int] max_throughput: The maximum throughput of the SQL database (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + SqlDatabaseAutoscaleSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -1783,7 +2544,22 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] data_actions: A list of data actions that are allowed for the Cosmos DB SQL Role Definition. """ - pulumi.set(__self__, "data_actions", data_actions) + SqlRoleDefinitionPermissionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_actions=data_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_actions is None and 'dataActions' in kwargs: + data_actions = kwargs['dataActions'] + if data_actions is None: + raise TypeError("Missing 'data_actions' argument") + + _setter("data_actions", data_actions) @property @pulumi.getter(name="dataActions") @@ -1805,8 +2581,21 @@ def __init__(__self__, *, """ :param pulumi.Input[int] max_throughput: The maximum throughput of the Table (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + TableAutoscaleSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") diff --git a/sdk/python/pulumi_azure/cosmosdb/account.py b/sdk/python/pulumi_azure/cosmosdb/account.py index c838d19b6f..3e1fef62d5 100644 --- a/sdk/python/pulumi_azure/cosmosdb/account.py +++ b/sdk/python/pulumi_azure/cosmosdb/account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -93,64 +93,187 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[Sequence[pulumi.Input['AccountVirtualNetworkRuleArgs']]] virtual_network_rules: Specifies a `virtual_network_rules` resource, used to define which subnets are allowed to access this CosmosDB account. """ - pulumi.set(__self__, "consistency_policy", consistency_policy) - pulumi.set(__self__, "geo_locations", geo_locations) - pulumi.set(__self__, "offer_type", offer_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) + AccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consistency_policy=consistency_policy, + geo_locations=geo_locations, + offer_type=offer_type, + resource_group_name=resource_group_name, + access_key_metadata_writes_enabled=access_key_metadata_writes_enabled, + analytical_storage=analytical_storage, + analytical_storage_enabled=analytical_storage_enabled, + backup=backup, + capabilities=capabilities, + capacity=capacity, + cors_rule=cors_rule, + create_mode=create_mode, + default_identity_type=default_identity_type, + enable_automatic_failover=enable_automatic_failover, + enable_free_tier=enable_free_tier, + enable_multiple_write_locations=enable_multiple_write_locations, + identity=identity, + ip_range_filter=ip_range_filter, + is_virtual_network_filter_enabled=is_virtual_network_filter_enabled, + key_vault_key_id=key_vault_key_id, + kind=kind, + local_authentication_disabled=local_authentication_disabled, + location=location, + mongo_server_version=mongo_server_version, + name=name, + network_acl_bypass_for_azure_services=network_acl_bypass_for_azure_services, + network_acl_bypass_ids=network_acl_bypass_ids, + public_network_access_enabled=public_network_access_enabled, + restore=restore, + tags=tags, + virtual_network_rules=virtual_network_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consistency_policy: Optional[pulumi.Input['AccountConsistencyPolicyArgs']] = None, + geo_locations: Optional[pulumi.Input[Sequence[pulumi.Input['AccountGeoLocationArgs']]]] = None, + offer_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + access_key_metadata_writes_enabled: Optional[pulumi.Input[bool]] = None, + analytical_storage: Optional[pulumi.Input['AccountAnalyticalStorageArgs']] = None, + analytical_storage_enabled: Optional[pulumi.Input[bool]] = None, + backup: Optional[pulumi.Input['AccountBackupArgs']] = None, + capabilities: Optional[pulumi.Input[Sequence[pulumi.Input['AccountCapabilityArgs']]]] = None, + capacity: Optional[pulumi.Input['AccountCapacityArgs']] = None, + cors_rule: Optional[pulumi.Input['AccountCorsRuleArgs']] = None, + create_mode: Optional[pulumi.Input[str]] = None, + default_identity_type: Optional[pulumi.Input[str]] = None, + enable_automatic_failover: Optional[pulumi.Input[bool]] = None, + enable_free_tier: Optional[pulumi.Input[bool]] = None, + enable_multiple_write_locations: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + ip_range_filter: Optional[pulumi.Input[str]] = None, + is_virtual_network_filter_enabled: Optional[pulumi.Input[bool]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + local_authentication_disabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + mongo_server_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_acl_bypass_for_azure_services: Optional[pulumi.Input[bool]] = None, + network_acl_bypass_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + restore: Optional[pulumi.Input['AccountRestoreArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AccountVirtualNetworkRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consistency_policy is None and 'consistencyPolicy' in kwargs: + consistency_policy = kwargs['consistencyPolicy'] + if consistency_policy is None: + raise TypeError("Missing 'consistency_policy' argument") + if geo_locations is None and 'geoLocations' in kwargs: + geo_locations = kwargs['geoLocations'] + if geo_locations is None: + raise TypeError("Missing 'geo_locations' argument") + if offer_type is None and 'offerType' in kwargs: + offer_type = kwargs['offerType'] + if offer_type is None: + raise TypeError("Missing 'offer_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if access_key_metadata_writes_enabled is None and 'accessKeyMetadataWritesEnabled' in kwargs: + access_key_metadata_writes_enabled = kwargs['accessKeyMetadataWritesEnabled'] + if analytical_storage is None and 'analyticalStorage' in kwargs: + analytical_storage = kwargs['analyticalStorage'] + if analytical_storage_enabled is None and 'analyticalStorageEnabled' in kwargs: + analytical_storage_enabled = kwargs['analyticalStorageEnabled'] + if cors_rule is None and 'corsRule' in kwargs: + cors_rule = kwargs['corsRule'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if default_identity_type is None and 'defaultIdentityType' in kwargs: + default_identity_type = kwargs['defaultIdentityType'] + if enable_automatic_failover is None and 'enableAutomaticFailover' in kwargs: + enable_automatic_failover = kwargs['enableAutomaticFailover'] + if enable_free_tier is None and 'enableFreeTier' in kwargs: + enable_free_tier = kwargs['enableFreeTier'] + if enable_multiple_write_locations is None and 'enableMultipleWriteLocations' in kwargs: + enable_multiple_write_locations = kwargs['enableMultipleWriteLocations'] + if ip_range_filter is None and 'ipRangeFilter' in kwargs: + ip_range_filter = kwargs['ipRangeFilter'] + if is_virtual_network_filter_enabled is None and 'isVirtualNetworkFilterEnabled' in kwargs: + is_virtual_network_filter_enabled = kwargs['isVirtualNetworkFilterEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if local_authentication_disabled is None and 'localAuthenticationDisabled' in kwargs: + local_authentication_disabled = kwargs['localAuthenticationDisabled'] + if mongo_server_version is None and 'mongoServerVersion' in kwargs: + mongo_server_version = kwargs['mongoServerVersion'] + if network_acl_bypass_for_azure_services is None and 'networkAclBypassForAzureServices' in kwargs: + network_acl_bypass_for_azure_services = kwargs['networkAclBypassForAzureServices'] + if network_acl_bypass_ids is None and 'networkAclBypassIds' in kwargs: + network_acl_bypass_ids = kwargs['networkAclBypassIds'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if virtual_network_rules is None and 'virtualNetworkRules' in kwargs: + virtual_network_rules = kwargs['virtualNetworkRules'] + + _setter("consistency_policy", consistency_policy) + _setter("geo_locations", geo_locations) + _setter("offer_type", offer_type) + _setter("resource_group_name", resource_group_name) if access_key_metadata_writes_enabled is not None: - pulumi.set(__self__, "access_key_metadata_writes_enabled", access_key_metadata_writes_enabled) + _setter("access_key_metadata_writes_enabled", access_key_metadata_writes_enabled) if analytical_storage is not None: - pulumi.set(__self__, "analytical_storage", analytical_storage) + _setter("analytical_storage", analytical_storage) if analytical_storage_enabled is not None: - pulumi.set(__self__, "analytical_storage_enabled", analytical_storage_enabled) + _setter("analytical_storage_enabled", analytical_storage_enabled) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if capabilities is not None: - pulumi.set(__self__, "capabilities", capabilities) + _setter("capabilities", capabilities) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if cors_rule is not None: - pulumi.set(__self__, "cors_rule", cors_rule) + _setter("cors_rule", cors_rule) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if default_identity_type is not None: - pulumi.set(__self__, "default_identity_type", default_identity_type) + _setter("default_identity_type", default_identity_type) if enable_automatic_failover is not None: - pulumi.set(__self__, "enable_automatic_failover", enable_automatic_failover) + _setter("enable_automatic_failover", enable_automatic_failover) if enable_free_tier is not None: - pulumi.set(__self__, "enable_free_tier", enable_free_tier) + _setter("enable_free_tier", enable_free_tier) if enable_multiple_write_locations is not None: - pulumi.set(__self__, "enable_multiple_write_locations", enable_multiple_write_locations) + _setter("enable_multiple_write_locations", enable_multiple_write_locations) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if ip_range_filter is not None: - pulumi.set(__self__, "ip_range_filter", ip_range_filter) + _setter("ip_range_filter", ip_range_filter) if is_virtual_network_filter_enabled is not None: - pulumi.set(__self__, "is_virtual_network_filter_enabled", is_virtual_network_filter_enabled) + _setter("is_virtual_network_filter_enabled", is_virtual_network_filter_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if local_authentication_disabled is not None: - pulumi.set(__self__, "local_authentication_disabled", local_authentication_disabled) + _setter("local_authentication_disabled", local_authentication_disabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mongo_server_version is not None: - pulumi.set(__self__, "mongo_server_version", mongo_server_version) + _setter("mongo_server_version", mongo_server_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_acl_bypass_for_azure_services is not None: - pulumi.set(__self__, "network_acl_bypass_for_azure_services", network_acl_bypass_for_azure_services) + _setter("network_acl_bypass_for_azure_services", network_acl_bypass_for_azure_services) if network_acl_bypass_ids is not None: - pulumi.set(__self__, "network_acl_bypass_ids", network_acl_bypass_ids) + _setter("network_acl_bypass_ids", network_acl_bypass_ids) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if restore is not None: - pulumi.set(__self__, "restore", restore) + _setter("restore", restore) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_rules is not None: - pulumi.set(__self__, "virtual_network_rules", virtual_network_rules) + _setter("virtual_network_rules", virtual_network_rules) @property @pulumi.getter(name="consistencyPolicy") @@ -649,100 +772,277 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['AccountVirtualNetworkRuleArgs']]] virtual_network_rules: Specifies a `virtual_network_rules` resource, used to define which subnets are allowed to access this CosmosDB account. :param pulumi.Input[Sequence[pulumi.Input[str]]] write_endpoints: A list of write endpoints available for this CosmosDB account. """ + _AccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_key_metadata_writes_enabled=access_key_metadata_writes_enabled, + analytical_storage=analytical_storage, + analytical_storage_enabled=analytical_storage_enabled, + backup=backup, + capabilities=capabilities, + capacity=capacity, + connection_strings=connection_strings, + consistency_policy=consistency_policy, + cors_rule=cors_rule, + create_mode=create_mode, + default_identity_type=default_identity_type, + enable_automatic_failover=enable_automatic_failover, + enable_free_tier=enable_free_tier, + enable_multiple_write_locations=enable_multiple_write_locations, + endpoint=endpoint, + geo_locations=geo_locations, + identity=identity, + ip_range_filter=ip_range_filter, + is_virtual_network_filter_enabled=is_virtual_network_filter_enabled, + key_vault_key_id=key_vault_key_id, + kind=kind, + local_authentication_disabled=local_authentication_disabled, + location=location, + mongo_server_version=mongo_server_version, + name=name, + network_acl_bypass_for_azure_services=network_acl_bypass_for_azure_services, + network_acl_bypass_ids=network_acl_bypass_ids, + offer_type=offer_type, + primary_key=primary_key, + primary_mongodb_connection_string=primary_mongodb_connection_string, + primary_readonly_key=primary_readonly_key, + primary_readonly_mongodb_connection_string=primary_readonly_mongodb_connection_string, + primary_readonly_sql_connection_string=primary_readonly_sql_connection_string, + primary_sql_connection_string=primary_sql_connection_string, + public_network_access_enabled=public_network_access_enabled, + read_endpoints=read_endpoints, + resource_group_name=resource_group_name, + restore=restore, + secondary_key=secondary_key, + secondary_mongodb_connection_string=secondary_mongodb_connection_string, + secondary_readonly_key=secondary_readonly_key, + secondary_readonly_mongodb_connection_string=secondary_readonly_mongodb_connection_string, + secondary_readonly_sql_connection_string=secondary_readonly_sql_connection_string, + secondary_sql_connection_string=secondary_sql_connection_string, + tags=tags, + virtual_network_rules=virtual_network_rules, + write_endpoints=write_endpoints, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_key_metadata_writes_enabled: Optional[pulumi.Input[bool]] = None, + analytical_storage: Optional[pulumi.Input['AccountAnalyticalStorageArgs']] = None, + analytical_storage_enabled: Optional[pulumi.Input[bool]] = None, + backup: Optional[pulumi.Input['AccountBackupArgs']] = None, + capabilities: Optional[pulumi.Input[Sequence[pulumi.Input['AccountCapabilityArgs']]]] = None, + capacity: Optional[pulumi.Input['AccountCapacityArgs']] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + consistency_policy: Optional[pulumi.Input['AccountConsistencyPolicyArgs']] = None, + cors_rule: Optional[pulumi.Input['AccountCorsRuleArgs']] = None, + create_mode: Optional[pulumi.Input[str]] = None, + default_identity_type: Optional[pulumi.Input[str]] = None, + enable_automatic_failover: Optional[pulumi.Input[bool]] = None, + enable_free_tier: Optional[pulumi.Input[bool]] = None, + enable_multiple_write_locations: Optional[pulumi.Input[bool]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + geo_locations: Optional[pulumi.Input[Sequence[pulumi.Input['AccountGeoLocationArgs']]]] = None, + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + ip_range_filter: Optional[pulumi.Input[str]] = None, + is_virtual_network_filter_enabled: Optional[pulumi.Input[bool]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + local_authentication_disabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + mongo_server_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_acl_bypass_for_azure_services: Optional[pulumi.Input[bool]] = None, + network_acl_bypass_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + offer_type: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + primary_mongodb_connection_string: Optional[pulumi.Input[str]] = None, + primary_readonly_key: Optional[pulumi.Input[str]] = None, + primary_readonly_mongodb_connection_string: Optional[pulumi.Input[str]] = None, + primary_readonly_sql_connection_string: Optional[pulumi.Input[str]] = None, + primary_sql_connection_string: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + read_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + restore: Optional[pulumi.Input['AccountRestoreArgs']] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + secondary_mongodb_connection_string: Optional[pulumi.Input[str]] = None, + secondary_readonly_key: Optional[pulumi.Input[str]] = None, + secondary_readonly_mongodb_connection_string: Optional[pulumi.Input[str]] = None, + secondary_readonly_sql_connection_string: Optional[pulumi.Input[str]] = None, + secondary_sql_connection_string: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AccountVirtualNetworkRuleArgs']]]] = None, + write_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_key_metadata_writes_enabled is None and 'accessKeyMetadataWritesEnabled' in kwargs: + access_key_metadata_writes_enabled = kwargs['accessKeyMetadataWritesEnabled'] + if analytical_storage is None and 'analyticalStorage' in kwargs: + analytical_storage = kwargs['analyticalStorage'] + if analytical_storage_enabled is None and 'analyticalStorageEnabled' in kwargs: + analytical_storage_enabled = kwargs['analyticalStorageEnabled'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if consistency_policy is None and 'consistencyPolicy' in kwargs: + consistency_policy = kwargs['consistencyPolicy'] + if cors_rule is None and 'corsRule' in kwargs: + cors_rule = kwargs['corsRule'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if default_identity_type is None and 'defaultIdentityType' in kwargs: + default_identity_type = kwargs['defaultIdentityType'] + if enable_automatic_failover is None and 'enableAutomaticFailover' in kwargs: + enable_automatic_failover = kwargs['enableAutomaticFailover'] + if enable_free_tier is None and 'enableFreeTier' in kwargs: + enable_free_tier = kwargs['enableFreeTier'] + if enable_multiple_write_locations is None and 'enableMultipleWriteLocations' in kwargs: + enable_multiple_write_locations = kwargs['enableMultipleWriteLocations'] + if geo_locations is None and 'geoLocations' in kwargs: + geo_locations = kwargs['geoLocations'] + if ip_range_filter is None and 'ipRangeFilter' in kwargs: + ip_range_filter = kwargs['ipRangeFilter'] + if is_virtual_network_filter_enabled is None and 'isVirtualNetworkFilterEnabled' in kwargs: + is_virtual_network_filter_enabled = kwargs['isVirtualNetworkFilterEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if local_authentication_disabled is None and 'localAuthenticationDisabled' in kwargs: + local_authentication_disabled = kwargs['localAuthenticationDisabled'] + if mongo_server_version is None and 'mongoServerVersion' in kwargs: + mongo_server_version = kwargs['mongoServerVersion'] + if network_acl_bypass_for_azure_services is None and 'networkAclBypassForAzureServices' in kwargs: + network_acl_bypass_for_azure_services = kwargs['networkAclBypassForAzureServices'] + if network_acl_bypass_ids is None and 'networkAclBypassIds' in kwargs: + network_acl_bypass_ids = kwargs['networkAclBypassIds'] + if offer_type is None and 'offerType' in kwargs: + offer_type = kwargs['offerType'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_mongodb_connection_string is None and 'primaryMongodbConnectionString' in kwargs: + primary_mongodb_connection_string = kwargs['primaryMongodbConnectionString'] + if primary_readonly_key is None and 'primaryReadonlyKey' in kwargs: + primary_readonly_key = kwargs['primaryReadonlyKey'] + if primary_readonly_mongodb_connection_string is None and 'primaryReadonlyMongodbConnectionString' in kwargs: + primary_readonly_mongodb_connection_string = kwargs['primaryReadonlyMongodbConnectionString'] + if primary_readonly_sql_connection_string is None and 'primaryReadonlySqlConnectionString' in kwargs: + primary_readonly_sql_connection_string = kwargs['primaryReadonlySqlConnectionString'] + if primary_sql_connection_string is None and 'primarySqlConnectionString' in kwargs: + primary_sql_connection_string = kwargs['primarySqlConnectionString'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if read_endpoints is None and 'readEndpoints' in kwargs: + read_endpoints = kwargs['readEndpoints'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if secondary_mongodb_connection_string is None and 'secondaryMongodbConnectionString' in kwargs: + secondary_mongodb_connection_string = kwargs['secondaryMongodbConnectionString'] + if secondary_readonly_key is None and 'secondaryReadonlyKey' in kwargs: + secondary_readonly_key = kwargs['secondaryReadonlyKey'] + if secondary_readonly_mongodb_connection_string is None and 'secondaryReadonlyMongodbConnectionString' in kwargs: + secondary_readonly_mongodb_connection_string = kwargs['secondaryReadonlyMongodbConnectionString'] + if secondary_readonly_sql_connection_string is None and 'secondaryReadonlySqlConnectionString' in kwargs: + secondary_readonly_sql_connection_string = kwargs['secondaryReadonlySqlConnectionString'] + if secondary_sql_connection_string is None and 'secondarySqlConnectionString' in kwargs: + secondary_sql_connection_string = kwargs['secondarySqlConnectionString'] + if virtual_network_rules is None and 'virtualNetworkRules' in kwargs: + virtual_network_rules = kwargs['virtualNetworkRules'] + if write_endpoints is None and 'writeEndpoints' in kwargs: + write_endpoints = kwargs['writeEndpoints'] + if access_key_metadata_writes_enabled is not None: - pulumi.set(__self__, "access_key_metadata_writes_enabled", access_key_metadata_writes_enabled) + _setter("access_key_metadata_writes_enabled", access_key_metadata_writes_enabled) if analytical_storage is not None: - pulumi.set(__self__, "analytical_storage", analytical_storage) + _setter("analytical_storage", analytical_storage) if analytical_storage_enabled is not None: - pulumi.set(__self__, "analytical_storage_enabled", analytical_storage_enabled) + _setter("analytical_storage_enabled", analytical_storage_enabled) if backup is not None: - pulumi.set(__self__, "backup", backup) + _setter("backup", backup) if capabilities is not None: - pulumi.set(__self__, "capabilities", capabilities) + _setter("capabilities", capabilities) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if consistency_policy is not None: - pulumi.set(__self__, "consistency_policy", consistency_policy) + _setter("consistency_policy", consistency_policy) if cors_rule is not None: - pulumi.set(__self__, "cors_rule", cors_rule) + _setter("cors_rule", cors_rule) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if default_identity_type is not None: - pulumi.set(__self__, "default_identity_type", default_identity_type) + _setter("default_identity_type", default_identity_type) if enable_automatic_failover is not None: - pulumi.set(__self__, "enable_automatic_failover", enable_automatic_failover) + _setter("enable_automatic_failover", enable_automatic_failover) if enable_free_tier is not None: - pulumi.set(__self__, "enable_free_tier", enable_free_tier) + _setter("enable_free_tier", enable_free_tier) if enable_multiple_write_locations is not None: - pulumi.set(__self__, "enable_multiple_write_locations", enable_multiple_write_locations) + _setter("enable_multiple_write_locations", enable_multiple_write_locations) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if geo_locations is not None: - pulumi.set(__self__, "geo_locations", geo_locations) + _setter("geo_locations", geo_locations) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if ip_range_filter is not None: - pulumi.set(__self__, "ip_range_filter", ip_range_filter) + _setter("ip_range_filter", ip_range_filter) if is_virtual_network_filter_enabled is not None: - pulumi.set(__self__, "is_virtual_network_filter_enabled", is_virtual_network_filter_enabled) + _setter("is_virtual_network_filter_enabled", is_virtual_network_filter_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if local_authentication_disabled is not None: - pulumi.set(__self__, "local_authentication_disabled", local_authentication_disabled) + _setter("local_authentication_disabled", local_authentication_disabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mongo_server_version is not None: - pulumi.set(__self__, "mongo_server_version", mongo_server_version) + _setter("mongo_server_version", mongo_server_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_acl_bypass_for_azure_services is not None: - pulumi.set(__self__, "network_acl_bypass_for_azure_services", network_acl_bypass_for_azure_services) + _setter("network_acl_bypass_for_azure_services", network_acl_bypass_for_azure_services) if network_acl_bypass_ids is not None: - pulumi.set(__self__, "network_acl_bypass_ids", network_acl_bypass_ids) + _setter("network_acl_bypass_ids", network_acl_bypass_ids) if offer_type is not None: - pulumi.set(__self__, "offer_type", offer_type) + _setter("offer_type", offer_type) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if primary_mongodb_connection_string is not None: - pulumi.set(__self__, "primary_mongodb_connection_string", primary_mongodb_connection_string) + _setter("primary_mongodb_connection_string", primary_mongodb_connection_string) if primary_readonly_key is not None: - pulumi.set(__self__, "primary_readonly_key", primary_readonly_key) + _setter("primary_readonly_key", primary_readonly_key) if primary_readonly_mongodb_connection_string is not None: - pulumi.set(__self__, "primary_readonly_mongodb_connection_string", primary_readonly_mongodb_connection_string) + _setter("primary_readonly_mongodb_connection_string", primary_readonly_mongodb_connection_string) if primary_readonly_sql_connection_string is not None: - pulumi.set(__self__, "primary_readonly_sql_connection_string", primary_readonly_sql_connection_string) + _setter("primary_readonly_sql_connection_string", primary_readonly_sql_connection_string) if primary_sql_connection_string is not None: - pulumi.set(__self__, "primary_sql_connection_string", primary_sql_connection_string) + _setter("primary_sql_connection_string", primary_sql_connection_string) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if read_endpoints is not None: - pulumi.set(__self__, "read_endpoints", read_endpoints) + _setter("read_endpoints", read_endpoints) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if restore is not None: - pulumi.set(__self__, "restore", restore) + _setter("restore", restore) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if secondary_mongodb_connection_string is not None: - pulumi.set(__self__, "secondary_mongodb_connection_string", secondary_mongodb_connection_string) + _setter("secondary_mongodb_connection_string", secondary_mongodb_connection_string) if secondary_readonly_key is not None: - pulumi.set(__self__, "secondary_readonly_key", secondary_readonly_key) + _setter("secondary_readonly_key", secondary_readonly_key) if secondary_readonly_mongodb_connection_string is not None: - pulumi.set(__self__, "secondary_readonly_mongodb_connection_string", secondary_readonly_mongodb_connection_string) + _setter("secondary_readonly_mongodb_connection_string", secondary_readonly_mongodb_connection_string) if secondary_readonly_sql_connection_string is not None: - pulumi.set(__self__, "secondary_readonly_sql_connection_string", secondary_readonly_sql_connection_string) + _setter("secondary_readonly_sql_connection_string", secondary_readonly_sql_connection_string) if secondary_sql_connection_string is not None: - pulumi.set(__self__, "secondary_sql_connection_string", secondary_sql_connection_string) + _setter("secondary_sql_connection_string", secondary_sql_connection_string) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_rules is not None: - pulumi.set(__self__, "virtual_network_rules", virtual_network_rules) + _setter("virtual_network_rules", virtual_network_rules) if write_endpoints is not None: - pulumi.set(__self__, "write_endpoints", write_endpoints) + _setter("write_endpoints", write_endpoints) @property @pulumi.getter(name="accessKeyMetadataWritesEnabled") @@ -1538,6 +1838,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1584,14 +1888,39 @@ def _internal_init(__self__, __props__ = AccountArgs.__new__(AccountArgs) __props__.__dict__["access_key_metadata_writes_enabled"] = access_key_metadata_writes_enabled + if analytical_storage is not None and not isinstance(analytical_storage, AccountAnalyticalStorageArgs): + analytical_storage = analytical_storage or {} + def _setter(key, value): + analytical_storage[key] = value + AccountAnalyticalStorageArgs._configure(_setter, **analytical_storage) __props__.__dict__["analytical_storage"] = analytical_storage __props__.__dict__["analytical_storage_enabled"] = analytical_storage_enabled + if backup is not None and not isinstance(backup, AccountBackupArgs): + backup = backup or {} + def _setter(key, value): + backup[key] = value + AccountBackupArgs._configure(_setter, **backup) __props__.__dict__["backup"] = backup __props__.__dict__["capabilities"] = capabilities + if capacity is not None and not isinstance(capacity, AccountCapacityArgs): + capacity = capacity or {} + def _setter(key, value): + capacity[key] = value + AccountCapacityArgs._configure(_setter, **capacity) __props__.__dict__["capacity"] = capacity + if consistency_policy is not None and not isinstance(consistency_policy, AccountConsistencyPolicyArgs): + consistency_policy = consistency_policy or {} + def _setter(key, value): + consistency_policy[key] = value + AccountConsistencyPolicyArgs._configure(_setter, **consistency_policy) if consistency_policy is None and not opts.urn: raise TypeError("Missing required property 'consistency_policy'") __props__.__dict__["consistency_policy"] = consistency_policy + if cors_rule is not None and not isinstance(cors_rule, AccountCorsRuleArgs): + cors_rule = cors_rule or {} + def _setter(key, value): + cors_rule[key] = value + AccountCorsRuleArgs._configure(_setter, **cors_rule) __props__.__dict__["cors_rule"] = cors_rule __props__.__dict__["create_mode"] = create_mode __props__.__dict__["default_identity_type"] = default_identity_type @@ -1601,6 +1930,11 @@ def _internal_init(__self__, if geo_locations is None and not opts.urn: raise TypeError("Missing required property 'geo_locations'") __props__.__dict__["geo_locations"] = geo_locations + if identity is not None and not isinstance(identity, AccountIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + AccountIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["ip_range_filter"] = ip_range_filter __props__.__dict__["is_virtual_network_filter_enabled"] = is_virtual_network_filter_enabled @@ -1619,6 +1953,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if restore is not None and not isinstance(restore, AccountRestoreArgs): + restore = restore or {} + def _setter(key, value): + restore[key] = value + AccountRestoreArgs._configure(_setter, **restore) __props__.__dict__["restore"] = restore __props__.__dict__["tags"] = tags __props__.__dict__["virtual_network_rules"] = virtual_network_rules diff --git a/sdk/python/pulumi_azure/cosmosdb/cassandra_cluster.py b/sdk/python/pulumi_azure/cosmosdb/cassandra_cluster.py index faa93f9355..0cb650f90f 100644 --- a/sdk/python/pulumi_azure/cosmosdb/cassandra_cluster.py +++ b/sdk/python/pulumi_azure/cosmosdb/cassandra_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,31 +49,92 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource. :param pulumi.Input[str] version: The version of Cassandra what the Cluster converges to run. Possible values are `3.11` and `4.0`. Defaults to `3.11`. Changing this forces a new Cassandra Cluster to be created. """ - pulumi.set(__self__, "default_admin_password", default_admin_password) - pulumi.set(__self__, "delegated_management_subnet_id", delegated_management_subnet_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + CassandraClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_admin_password=default_admin_password, + delegated_management_subnet_id=delegated_management_subnet_id, + resource_group_name=resource_group_name, + authentication_method=authentication_method, + client_certificate_pems=client_certificate_pems, + external_gossip_certificate_pems=external_gossip_certificate_pems, + external_seed_node_ip_addresses=external_seed_node_ip_addresses, + hours_between_backups=hours_between_backups, + identity=identity, + location=location, + name=name, + repair_enabled=repair_enabled, + tags=tags, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_admin_password: Optional[pulumi.Input[str]] = None, + delegated_management_subnet_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + authentication_method: Optional[pulumi.Input[str]] = None, + client_certificate_pems: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + external_gossip_certificate_pems: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + external_seed_node_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + hours_between_backups: Optional[pulumi.Input[int]] = None, + identity: Optional[pulumi.Input['CassandraClusterIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + repair_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_admin_password is None and 'defaultAdminPassword' in kwargs: + default_admin_password = kwargs['defaultAdminPassword'] + if default_admin_password is None: + raise TypeError("Missing 'default_admin_password' argument") + if delegated_management_subnet_id is None and 'delegatedManagementSubnetId' in kwargs: + delegated_management_subnet_id = kwargs['delegatedManagementSubnetId'] + if delegated_management_subnet_id is None: + raise TypeError("Missing 'delegated_management_subnet_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if authentication_method is None and 'authenticationMethod' in kwargs: + authentication_method = kwargs['authenticationMethod'] + if client_certificate_pems is None and 'clientCertificatePems' in kwargs: + client_certificate_pems = kwargs['clientCertificatePems'] + if external_gossip_certificate_pems is None and 'externalGossipCertificatePems' in kwargs: + external_gossip_certificate_pems = kwargs['externalGossipCertificatePems'] + if external_seed_node_ip_addresses is None and 'externalSeedNodeIpAddresses' in kwargs: + external_seed_node_ip_addresses = kwargs['externalSeedNodeIpAddresses'] + if hours_between_backups is None and 'hoursBetweenBackups' in kwargs: + hours_between_backups = kwargs['hoursBetweenBackups'] + if repair_enabled is None and 'repairEnabled' in kwargs: + repair_enabled = kwargs['repairEnabled'] + + _setter("default_admin_password", default_admin_password) + _setter("delegated_management_subnet_id", delegated_management_subnet_id) + _setter("resource_group_name", resource_group_name) if authentication_method is not None: - pulumi.set(__self__, "authentication_method", authentication_method) + _setter("authentication_method", authentication_method) if client_certificate_pems is not None: - pulumi.set(__self__, "client_certificate_pems", client_certificate_pems) + _setter("client_certificate_pems", client_certificate_pems) if external_gossip_certificate_pems is not None: - pulumi.set(__self__, "external_gossip_certificate_pems", external_gossip_certificate_pems) + _setter("external_gossip_certificate_pems", external_gossip_certificate_pems) if external_seed_node_ip_addresses is not None: - pulumi.set(__self__, "external_seed_node_ip_addresses", external_seed_node_ip_addresses) + _setter("external_seed_node_ip_addresses", external_seed_node_ip_addresses) if hours_between_backups is not None: - pulumi.set(__self__, "hours_between_backups", hours_between_backups) + _setter("hours_between_backups", hours_between_backups) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if repair_enabled is not None: - pulumi.set(__self__, "repair_enabled", repair_enabled) + _setter("repair_enabled", repair_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="defaultAdminPassword") @@ -282,34 +343,89 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource. :param pulumi.Input[str] version: The version of Cassandra what the Cluster converges to run. Possible values are `3.11` and `4.0`. Defaults to `3.11`. Changing this forces a new Cassandra Cluster to be created. """ + _CassandraClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_method=authentication_method, + client_certificate_pems=client_certificate_pems, + default_admin_password=default_admin_password, + delegated_management_subnet_id=delegated_management_subnet_id, + external_gossip_certificate_pems=external_gossip_certificate_pems, + external_seed_node_ip_addresses=external_seed_node_ip_addresses, + hours_between_backups=hours_between_backups, + identity=identity, + location=location, + name=name, + repair_enabled=repair_enabled, + resource_group_name=resource_group_name, + tags=tags, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_method: Optional[pulumi.Input[str]] = None, + client_certificate_pems: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_admin_password: Optional[pulumi.Input[str]] = None, + delegated_management_subnet_id: Optional[pulumi.Input[str]] = None, + external_gossip_certificate_pems: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + external_seed_node_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + hours_between_backups: Optional[pulumi.Input[int]] = None, + identity: Optional[pulumi.Input['CassandraClusterIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + repair_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_method is None and 'authenticationMethod' in kwargs: + authentication_method = kwargs['authenticationMethod'] + if client_certificate_pems is None and 'clientCertificatePems' in kwargs: + client_certificate_pems = kwargs['clientCertificatePems'] + if default_admin_password is None and 'defaultAdminPassword' in kwargs: + default_admin_password = kwargs['defaultAdminPassword'] + if delegated_management_subnet_id is None and 'delegatedManagementSubnetId' in kwargs: + delegated_management_subnet_id = kwargs['delegatedManagementSubnetId'] + if external_gossip_certificate_pems is None and 'externalGossipCertificatePems' in kwargs: + external_gossip_certificate_pems = kwargs['externalGossipCertificatePems'] + if external_seed_node_ip_addresses is None and 'externalSeedNodeIpAddresses' in kwargs: + external_seed_node_ip_addresses = kwargs['externalSeedNodeIpAddresses'] + if hours_between_backups is None and 'hoursBetweenBackups' in kwargs: + hours_between_backups = kwargs['hoursBetweenBackups'] + if repair_enabled is None and 'repairEnabled' in kwargs: + repair_enabled = kwargs['repairEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if authentication_method is not None: - pulumi.set(__self__, "authentication_method", authentication_method) + _setter("authentication_method", authentication_method) if client_certificate_pems is not None: - pulumi.set(__self__, "client_certificate_pems", client_certificate_pems) + _setter("client_certificate_pems", client_certificate_pems) if default_admin_password is not None: - pulumi.set(__self__, "default_admin_password", default_admin_password) + _setter("default_admin_password", default_admin_password) if delegated_management_subnet_id is not None: - pulumi.set(__self__, "delegated_management_subnet_id", delegated_management_subnet_id) + _setter("delegated_management_subnet_id", delegated_management_subnet_id) if external_gossip_certificate_pems is not None: - pulumi.set(__self__, "external_gossip_certificate_pems", external_gossip_certificate_pems) + _setter("external_gossip_certificate_pems", external_gossip_certificate_pems) if external_seed_node_ip_addresses is not None: - pulumi.set(__self__, "external_seed_node_ip_addresses", external_seed_node_ip_addresses) + _setter("external_seed_node_ip_addresses", external_seed_node_ip_addresses) if hours_between_backups is not None: - pulumi.set(__self__, "hours_between_backups", hours_between_backups) + _setter("hours_between_backups", hours_between_backups) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if repair_enabled is not None: - pulumi.set(__self__, "repair_enabled", repair_enabled) + _setter("repair_enabled", repair_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="authenticationMethod") @@ -629,6 +745,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CassandraClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -668,6 +788,11 @@ def _internal_init(__self__, __props__.__dict__["external_gossip_certificate_pems"] = external_gossip_certificate_pems __props__.__dict__["external_seed_node_ip_addresses"] = external_seed_node_ip_addresses __props__.__dict__["hours_between_backups"] = hours_between_backups + if identity is not None and not isinstance(identity, CassandraClusterIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + CassandraClusterIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/cosmosdb/cassandra_datacenter.py b/sdk/python/pulumi_azure/cosmosdb/cassandra_datacenter.py index 6e517b30a5..37c1d24b01 100644 --- a/sdk/python/pulumi_azure/cosmosdb/cassandra_datacenter.py +++ b/sdk/python/pulumi_azure/cosmosdb/cassandra_datacenter.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CassandraDatacenterArgs', 'CassandraDatacenter'] @@ -43,28 +43,85 @@ def __init__(__self__, *, > **NOTE:** In v4.0 of the provider the `sku_name` will have a default value of `Standard_E16s_v5`. """ - pulumi.set(__self__, "cassandra_cluster_id", cassandra_cluster_id) - pulumi.set(__self__, "delegated_management_subnet_id", delegated_management_subnet_id) + CassandraDatacenterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cassandra_cluster_id=cassandra_cluster_id, + delegated_management_subnet_id=delegated_management_subnet_id, + availability_zones_enabled=availability_zones_enabled, + backup_storage_customer_key_uri=backup_storage_customer_key_uri, + base64_encoded_yaml_fragment=base64_encoded_yaml_fragment, + disk_count=disk_count, + disk_sku=disk_sku, + location=location, + managed_disk_customer_key_uri=managed_disk_customer_key_uri, + name=name, + node_count=node_count, + sku_name=sku_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cassandra_cluster_id: Optional[pulumi.Input[str]] = None, + delegated_management_subnet_id: Optional[pulumi.Input[str]] = None, + availability_zones_enabled: Optional[pulumi.Input[bool]] = None, + backup_storage_customer_key_uri: Optional[pulumi.Input[str]] = None, + base64_encoded_yaml_fragment: Optional[pulumi.Input[str]] = None, + disk_count: Optional[pulumi.Input[int]] = None, + disk_sku: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_disk_customer_key_uri: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_count: Optional[pulumi.Input[int]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cassandra_cluster_id is None and 'cassandraClusterId' in kwargs: + cassandra_cluster_id = kwargs['cassandraClusterId'] + if cassandra_cluster_id is None: + raise TypeError("Missing 'cassandra_cluster_id' argument") + if delegated_management_subnet_id is None and 'delegatedManagementSubnetId' in kwargs: + delegated_management_subnet_id = kwargs['delegatedManagementSubnetId'] + if delegated_management_subnet_id is None: + raise TypeError("Missing 'delegated_management_subnet_id' argument") + if availability_zones_enabled is None and 'availabilityZonesEnabled' in kwargs: + availability_zones_enabled = kwargs['availabilityZonesEnabled'] + if backup_storage_customer_key_uri is None and 'backupStorageCustomerKeyUri' in kwargs: + backup_storage_customer_key_uri = kwargs['backupStorageCustomerKeyUri'] + if base64_encoded_yaml_fragment is None and 'base64EncodedYamlFragment' in kwargs: + base64_encoded_yaml_fragment = kwargs['base64EncodedYamlFragment'] + if disk_count is None and 'diskCount' in kwargs: + disk_count = kwargs['diskCount'] + if disk_sku is None and 'diskSku' in kwargs: + disk_sku = kwargs['diskSku'] + if managed_disk_customer_key_uri is None and 'managedDiskCustomerKeyUri' in kwargs: + managed_disk_customer_key_uri = kwargs['managedDiskCustomerKeyUri'] + if node_count is None and 'nodeCount' in kwargs: + node_count = kwargs['nodeCount'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + + _setter("cassandra_cluster_id", cassandra_cluster_id) + _setter("delegated_management_subnet_id", delegated_management_subnet_id) if availability_zones_enabled is not None: - pulumi.set(__self__, "availability_zones_enabled", availability_zones_enabled) + _setter("availability_zones_enabled", availability_zones_enabled) if backup_storage_customer_key_uri is not None: - pulumi.set(__self__, "backup_storage_customer_key_uri", backup_storage_customer_key_uri) + _setter("backup_storage_customer_key_uri", backup_storage_customer_key_uri) if base64_encoded_yaml_fragment is not None: - pulumi.set(__self__, "base64_encoded_yaml_fragment", base64_encoded_yaml_fragment) + _setter("base64_encoded_yaml_fragment", base64_encoded_yaml_fragment) if disk_count is not None: - pulumi.set(__self__, "disk_count", disk_count) + _setter("disk_count", disk_count) if disk_sku is not None: - pulumi.set(__self__, "disk_sku", disk_sku) + _setter("disk_sku", disk_sku) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_disk_customer_key_uri is not None: - pulumi.set(__self__, "managed_disk_customer_key_uri", managed_disk_customer_key_uri) + _setter("managed_disk_customer_key_uri", managed_disk_customer_key_uri) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_count is not None: - pulumi.set(__self__, "node_count", node_count) + _setter("node_count", node_count) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) @property @pulumi.getter(name="cassandraClusterId") @@ -245,30 +302,83 @@ def __init__(__self__, *, > **NOTE:** In v4.0 of the provider the `sku_name` will have a default value of `Standard_E16s_v5`. """ + _CassandraDatacenterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + availability_zones_enabled=availability_zones_enabled, + backup_storage_customer_key_uri=backup_storage_customer_key_uri, + base64_encoded_yaml_fragment=base64_encoded_yaml_fragment, + cassandra_cluster_id=cassandra_cluster_id, + delegated_management_subnet_id=delegated_management_subnet_id, + disk_count=disk_count, + disk_sku=disk_sku, + location=location, + managed_disk_customer_key_uri=managed_disk_customer_key_uri, + name=name, + node_count=node_count, + sku_name=sku_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + availability_zones_enabled: Optional[pulumi.Input[bool]] = None, + backup_storage_customer_key_uri: Optional[pulumi.Input[str]] = None, + base64_encoded_yaml_fragment: Optional[pulumi.Input[str]] = None, + cassandra_cluster_id: Optional[pulumi.Input[str]] = None, + delegated_management_subnet_id: Optional[pulumi.Input[str]] = None, + disk_count: Optional[pulumi.Input[int]] = None, + disk_sku: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_disk_customer_key_uri: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_count: Optional[pulumi.Input[int]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if availability_zones_enabled is None and 'availabilityZonesEnabled' in kwargs: + availability_zones_enabled = kwargs['availabilityZonesEnabled'] + if backup_storage_customer_key_uri is None and 'backupStorageCustomerKeyUri' in kwargs: + backup_storage_customer_key_uri = kwargs['backupStorageCustomerKeyUri'] + if base64_encoded_yaml_fragment is None and 'base64EncodedYamlFragment' in kwargs: + base64_encoded_yaml_fragment = kwargs['base64EncodedYamlFragment'] + if cassandra_cluster_id is None and 'cassandraClusterId' in kwargs: + cassandra_cluster_id = kwargs['cassandraClusterId'] + if delegated_management_subnet_id is None and 'delegatedManagementSubnetId' in kwargs: + delegated_management_subnet_id = kwargs['delegatedManagementSubnetId'] + if disk_count is None and 'diskCount' in kwargs: + disk_count = kwargs['diskCount'] + if disk_sku is None and 'diskSku' in kwargs: + disk_sku = kwargs['diskSku'] + if managed_disk_customer_key_uri is None and 'managedDiskCustomerKeyUri' in kwargs: + managed_disk_customer_key_uri = kwargs['managedDiskCustomerKeyUri'] + if node_count is None and 'nodeCount' in kwargs: + node_count = kwargs['nodeCount'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if availability_zones_enabled is not None: - pulumi.set(__self__, "availability_zones_enabled", availability_zones_enabled) + _setter("availability_zones_enabled", availability_zones_enabled) if backup_storage_customer_key_uri is not None: - pulumi.set(__self__, "backup_storage_customer_key_uri", backup_storage_customer_key_uri) + _setter("backup_storage_customer_key_uri", backup_storage_customer_key_uri) if base64_encoded_yaml_fragment is not None: - pulumi.set(__self__, "base64_encoded_yaml_fragment", base64_encoded_yaml_fragment) + _setter("base64_encoded_yaml_fragment", base64_encoded_yaml_fragment) if cassandra_cluster_id is not None: - pulumi.set(__self__, "cassandra_cluster_id", cassandra_cluster_id) + _setter("cassandra_cluster_id", cassandra_cluster_id) if delegated_management_subnet_id is not None: - pulumi.set(__self__, "delegated_management_subnet_id", delegated_management_subnet_id) + _setter("delegated_management_subnet_id", delegated_management_subnet_id) if disk_count is not None: - pulumi.set(__self__, "disk_count", disk_count) + _setter("disk_count", disk_count) if disk_sku is not None: - pulumi.set(__self__, "disk_sku", disk_sku) + _setter("disk_sku", disk_sku) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_disk_customer_key_uri is not None: - pulumi.set(__self__, "managed_disk_customer_key_uri", managed_disk_customer_key_uri) + _setter("managed_disk_customer_key_uri", managed_disk_customer_key_uri) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_count is not None: - pulumi.set(__self__, "node_count", node_count) + _setter("node_count", node_count) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) @property @pulumi.getter(name="availabilityZonesEnabled") @@ -576,6 +686,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CassandraDatacenterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/cassandra_keyspace.py b/sdk/python/pulumi_azure/cosmosdb/cassandra_keyspace.py index b207211cd6..803cf9478e 100644 --- a/sdk/python/pulumi_azure/cosmosdb/cassandra_keyspace.py +++ b/sdk/python/pulumi_azure/cosmosdb/cassandra_keyspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,14 +31,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Cosmos DB Cassandra KeySpace. Changing this forces a new resource to be created. :param pulumi.Input[int] throughput: The throughput of Cassandra KeySpace (RU/s). Must be set in increments of `100`. The minimum value is `400`. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + CassandraKeyspaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + resource_group_name=resource_group_name, + autoscale_settings=autoscale_settings, + name=name, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + autoscale_settings: Optional[pulumi.Input['CassandraKeyspaceAutoscaleSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + + _setter("account_name", account_name) + _setter("resource_group_name", resource_group_name) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="accountName") @@ -121,16 +150,41 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Cosmos DB Cassandra KeySpace is created. Changing this forces a new resource to be created. :param pulumi.Input[int] throughput: The throughput of Cassandra KeySpace (RU/s). Must be set in increments of `100`. The minimum value is `400`. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply. """ + _CassandraKeyspaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + autoscale_settings=autoscale_settings, + name=name, + resource_group_name=resource_group_name, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + autoscale_settings: Optional[pulumi.Input['CassandraKeyspaceAutoscaleSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="accountName") @@ -308,6 +362,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CassandraKeyspaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -330,6 +388,11 @@ def _internal_init(__self__, if account_name is None and not opts.urn: raise TypeError("Missing required property 'account_name'") __props__.__dict__["account_name"] = account_name + if autoscale_settings is not None and not isinstance(autoscale_settings, CassandraKeyspaceAutoscaleSettingsArgs): + autoscale_settings = autoscale_settings or {} + def _setter(key, value): + autoscale_settings[key] = value + CassandraKeyspaceAutoscaleSettingsArgs._configure(_setter, **autoscale_settings) __props__.__dict__["autoscale_settings"] = autoscale_settings __props__.__dict__["name"] = name if resource_group_name is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/cosmosdb/cassandra_table.py b/sdk/python/pulumi_azure/cosmosdb/cassandra_table.py index 3db8f3b871..50b9261c49 100644 --- a/sdk/python/pulumi_azure/cosmosdb/cassandra_table.py +++ b/sdk/python/pulumi_azure/cosmosdb/cassandra_table.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,18 +33,53 @@ def __init__(__self__, *, :param pulumi.Input[int] default_ttl: Time to live of the Cosmos DB Cassandra table. Possible values are at least `-1`. `-1` means the Cassandra table never expires. :param pulumi.Input[str] name: Specifies the name of the Cosmos DB Cassandra Table. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cassandra_keyspace_id", cassandra_keyspace_id) - pulumi.set(__self__, "schema", schema) + CassandraTableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cassandra_keyspace_id=cassandra_keyspace_id, + schema=schema, + analytical_storage_ttl=analytical_storage_ttl, + autoscale_settings=autoscale_settings, + default_ttl=default_ttl, + name=name, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cassandra_keyspace_id: Optional[pulumi.Input[str]] = None, + schema: Optional[pulumi.Input['CassandraTableSchemaArgs']] = None, + analytical_storage_ttl: Optional[pulumi.Input[int]] = None, + autoscale_settings: Optional[pulumi.Input['CassandraTableAutoscaleSettingsArgs']] = None, + default_ttl: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cassandra_keyspace_id is None and 'cassandraKeyspaceId' in kwargs: + cassandra_keyspace_id = kwargs['cassandraKeyspaceId'] + if cassandra_keyspace_id is None: + raise TypeError("Missing 'cassandra_keyspace_id' argument") + if schema is None: + raise TypeError("Missing 'schema' argument") + if analytical_storage_ttl is None and 'analyticalStorageTtl' in kwargs: + analytical_storage_ttl = kwargs['analyticalStorageTtl'] + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + if default_ttl is None and 'defaultTtl' in kwargs: + default_ttl = kwargs['defaultTtl'] + + _setter("cassandra_keyspace_id", cassandra_keyspace_id) + _setter("schema", schema) if analytical_storage_ttl is not None: - pulumi.set(__self__, "analytical_storage_ttl", analytical_storage_ttl) + _setter("analytical_storage_ttl", analytical_storage_ttl) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if default_ttl is not None: - pulumi.set(__self__, "default_ttl", default_ttl) + _setter("default_ttl", default_ttl) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="cassandraKeyspaceId") @@ -147,20 +182,51 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Cosmos DB Cassandra Table. Changing this forces a new resource to be created. :param pulumi.Input['CassandraTableSchemaArgs'] schema: A `schema` block as defined below. """ + _CassandraTableState._configure( + lambda key, value: pulumi.set(__self__, key, value), + analytical_storage_ttl=analytical_storage_ttl, + autoscale_settings=autoscale_settings, + cassandra_keyspace_id=cassandra_keyspace_id, + default_ttl=default_ttl, + name=name, + schema=schema, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + analytical_storage_ttl: Optional[pulumi.Input[int]] = None, + autoscale_settings: Optional[pulumi.Input['CassandraTableAutoscaleSettingsArgs']] = None, + cassandra_keyspace_id: Optional[pulumi.Input[str]] = None, + default_ttl: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + schema: Optional[pulumi.Input['CassandraTableSchemaArgs']] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if analytical_storage_ttl is None and 'analyticalStorageTtl' in kwargs: + analytical_storage_ttl = kwargs['analyticalStorageTtl'] + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + if cassandra_keyspace_id is None and 'cassandraKeyspaceId' in kwargs: + cassandra_keyspace_id = kwargs['cassandraKeyspaceId'] + if default_ttl is None and 'defaultTtl' in kwargs: + default_ttl = kwargs['defaultTtl'] + if analytical_storage_ttl is not None: - pulumi.set(__self__, "analytical_storage_ttl", analytical_storage_ttl) + _setter("analytical_storage_ttl", analytical_storage_ttl) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if cassandra_keyspace_id is not None: - pulumi.set(__self__, "cassandra_keyspace_id", cassandra_keyspace_id) + _setter("cassandra_keyspace_id", cassandra_keyspace_id) if default_ttl is not None: - pulumi.set(__self__, "default_ttl", default_ttl) + _setter("default_ttl", default_ttl) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if schema is not None: - pulumi.set(__self__, "schema", schema) + _setter("schema", schema) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="analyticalStorageTtl") @@ -392,6 +458,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CassandraTableArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -414,12 +484,22 @@ def _internal_init(__self__, __props__ = CassandraTableArgs.__new__(CassandraTableArgs) __props__.__dict__["analytical_storage_ttl"] = analytical_storage_ttl + if autoscale_settings is not None and not isinstance(autoscale_settings, CassandraTableAutoscaleSettingsArgs): + autoscale_settings = autoscale_settings or {} + def _setter(key, value): + autoscale_settings[key] = value + CassandraTableAutoscaleSettingsArgs._configure(_setter, **autoscale_settings) __props__.__dict__["autoscale_settings"] = autoscale_settings if cassandra_keyspace_id is None and not opts.urn: raise TypeError("Missing required property 'cassandra_keyspace_id'") __props__.__dict__["cassandra_keyspace_id"] = cassandra_keyspace_id __props__.__dict__["default_ttl"] = default_ttl __props__.__dict__["name"] = name + if schema is not None and not isinstance(schema, CassandraTableSchemaArgs): + schema = schema or {} + def _setter(key, value): + schema[key] = value + CassandraTableSchemaArgs._configure(_setter, **schema) if schema is None and not opts.urn: raise TypeError("Missing required property 'schema'") __props__.__dict__["schema"] = schema diff --git a/sdk/python/pulumi_azure/cosmosdb/get_account.py b/sdk/python/pulumi_azure/cosmosdb/get_account.py index 8c66b42967..456fffd588 100644 --- a/sdk/python/pulumi_azure/cosmosdb/get_account.py +++ b/sdk/python/pulumi_azure/cosmosdb/get_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/cosmosdb/get_mongo_database.py b/sdk/python/pulumi_azure/cosmosdb/get_mongo_database.py index c526324066..c7cf78b951 100644 --- a/sdk/python/pulumi_azure/cosmosdb/get_mongo_database.py +++ b/sdk/python/pulumi_azure/cosmosdb/get_mongo_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/cosmosdb/get_restorable_database_accounts.py b/sdk/python/pulumi_azure/cosmosdb/get_restorable_database_accounts.py index 8217edbcb6..60a08f6773 100644 --- a/sdk/python/pulumi_azure/cosmosdb/get_restorable_database_accounts.py +++ b/sdk/python/pulumi_azure/cosmosdb/get_restorable_database_accounts.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/cosmosdb/get_sql_database.py b/sdk/python/pulumi_azure/cosmosdb/get_sql_database.py index 9fe5ab1101..5fa79d8c54 100644 --- a/sdk/python/pulumi_azure/cosmosdb/get_sql_database.py +++ b/sdk/python/pulumi_azure/cosmosdb/get_sql_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/cosmosdb/get_sql_role_definition.py b/sdk/python/pulumi_azure/cosmosdb/get_sql_role_definition.py index 55f58e2b95..fdab55ce88 100644 --- a/sdk/python/pulumi_azure/cosmosdb/get_sql_role_definition.py +++ b/sdk/python/pulumi_azure/cosmosdb/get_sql_role_definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/cosmosdb/gremlin_database.py b/sdk/python/pulumi_azure/cosmosdb/gremlin_database.py index d6e17e22f7..4626d16c37 100644 --- a/sdk/python/pulumi_azure/cosmosdb/gremlin_database.py +++ b/sdk/python/pulumi_azure/cosmosdb/gremlin_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,14 +33,43 @@ def __init__(__self__, *, > **Note:** throughput has a maximum value of `1000000` unless a higher limit is requested via Azure Support """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + GremlinDatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + resource_group_name=resource_group_name, + autoscale_settings=autoscale_settings, + name=name, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + autoscale_settings: Optional[pulumi.Input['GremlinDatabaseAutoscaleSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + + _setter("account_name", account_name) + _setter("resource_group_name", resource_group_name) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="accountName") @@ -127,16 +156,41 @@ def __init__(__self__, *, > **Note:** throughput has a maximum value of `1000000` unless a higher limit is requested via Azure Support """ + _GremlinDatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + autoscale_settings=autoscale_settings, + name=name, + resource_group_name=resource_group_name, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + autoscale_settings: Optional[pulumi.Input['GremlinDatabaseAutoscaleSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="accountName") @@ -292,6 +346,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GremlinDatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -314,6 +372,11 @@ def _internal_init(__self__, if account_name is None and not opts.urn: raise TypeError("Missing required property 'account_name'") __props__.__dict__["account_name"] = account_name + if autoscale_settings is not None and not isinstance(autoscale_settings, GremlinDatabaseAutoscaleSettingsArgs): + autoscale_settings = autoscale_settings or {} + def _setter(key, value): + autoscale_settings[key] = value + GremlinDatabaseAutoscaleSettingsArgs._configure(_setter, **autoscale_settings) __props__.__dict__["autoscale_settings"] = autoscale_settings __props__.__dict__["name"] = name if resource_group_name is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/cosmosdb/gremlin_graph.py b/sdk/python/pulumi_azure/cosmosdb/gremlin_graph.py index e716ac7740..3e6c764576 100644 --- a/sdk/python/pulumi_azure/cosmosdb/gremlin_graph.py +++ b/sdk/python/pulumi_azure/cosmosdb/gremlin_graph.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -46,28 +46,93 @@ def __init__(__self__, *, :param pulumi.Input[int] throughput: The throughput of the Gremlin graph (RU/s). Must be set in increments of `100`. The minimum value is `400`. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. :param pulumi.Input[Sequence[pulumi.Input['GremlinGraphUniqueKeyArgs']]] unique_keys: One or more `unique_key` blocks as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "partition_key_path", partition_key_path) - pulumi.set(__self__, "resource_group_name", resource_group_name) + GremlinGraphArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + database_name=database_name, + partition_key_path=partition_key_path, + resource_group_name=resource_group_name, + analytical_storage_ttl=analytical_storage_ttl, + autoscale_settings=autoscale_settings, + conflict_resolution_policy=conflict_resolution_policy, + default_ttl=default_ttl, + index_policy=index_policy, + name=name, + partition_key_version=partition_key_version, + throughput=throughput, + unique_keys=unique_keys, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + partition_key_path: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + analytical_storage_ttl: Optional[pulumi.Input[int]] = None, + autoscale_settings: Optional[pulumi.Input['GremlinGraphAutoscaleSettingsArgs']] = None, + conflict_resolution_policy: Optional[pulumi.Input['GremlinGraphConflictResolutionPolicyArgs']] = None, + default_ttl: Optional[pulumi.Input[int]] = None, + index_policy: Optional[pulumi.Input['GremlinGraphIndexPolicyArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key_version: Optional[pulumi.Input[int]] = None, + throughput: Optional[pulumi.Input[int]] = None, + unique_keys: Optional[pulumi.Input[Sequence[pulumi.Input['GremlinGraphUniqueKeyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if partition_key_path is None and 'partitionKeyPath' in kwargs: + partition_key_path = kwargs['partitionKeyPath'] + if partition_key_path is None: + raise TypeError("Missing 'partition_key_path' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if analytical_storage_ttl is None and 'analyticalStorageTtl' in kwargs: + analytical_storage_ttl = kwargs['analyticalStorageTtl'] + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + if conflict_resolution_policy is None and 'conflictResolutionPolicy' in kwargs: + conflict_resolution_policy = kwargs['conflictResolutionPolicy'] + if default_ttl is None and 'defaultTtl' in kwargs: + default_ttl = kwargs['defaultTtl'] + if index_policy is None and 'indexPolicy' in kwargs: + index_policy = kwargs['indexPolicy'] + if partition_key_version is None and 'partitionKeyVersion' in kwargs: + partition_key_version = kwargs['partitionKeyVersion'] + if unique_keys is None and 'uniqueKeys' in kwargs: + unique_keys = kwargs['uniqueKeys'] + + _setter("account_name", account_name) + _setter("database_name", database_name) + _setter("partition_key_path", partition_key_path) + _setter("resource_group_name", resource_group_name) if analytical_storage_ttl is not None: - pulumi.set(__self__, "analytical_storage_ttl", analytical_storage_ttl) + _setter("analytical_storage_ttl", analytical_storage_ttl) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if conflict_resolution_policy is not None: - pulumi.set(__self__, "conflict_resolution_policy", conflict_resolution_policy) + _setter("conflict_resolution_policy", conflict_resolution_policy) if default_ttl is not None: - pulumi.set(__self__, "default_ttl", default_ttl) + _setter("default_ttl", default_ttl) if index_policy is not None: - pulumi.set(__self__, "index_policy", index_policy) + _setter("index_policy", index_policy) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key_version is not None: - pulumi.set(__self__, "partition_key_version", partition_key_version) + _setter("partition_key_version", partition_key_version) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) if unique_keys is not None: - pulumi.set(__self__, "unique_keys", unique_keys) + _setter("unique_keys", unique_keys) @property @pulumi.getter(name="accountName") @@ -258,32 +323,89 @@ def __init__(__self__, *, :param pulumi.Input[int] throughput: The throughput of the Gremlin graph (RU/s). Must be set in increments of `100`. The minimum value is `400`. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. :param pulumi.Input[Sequence[pulumi.Input['GremlinGraphUniqueKeyArgs']]] unique_keys: One or more `unique_key` blocks as defined below. Changing this forces a new resource to be created. """ + _GremlinGraphState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + analytical_storage_ttl=analytical_storage_ttl, + autoscale_settings=autoscale_settings, + conflict_resolution_policy=conflict_resolution_policy, + database_name=database_name, + default_ttl=default_ttl, + index_policy=index_policy, + name=name, + partition_key_path=partition_key_path, + partition_key_version=partition_key_version, + resource_group_name=resource_group_name, + throughput=throughput, + unique_keys=unique_keys, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + analytical_storage_ttl: Optional[pulumi.Input[int]] = None, + autoscale_settings: Optional[pulumi.Input['GremlinGraphAutoscaleSettingsArgs']] = None, + conflict_resolution_policy: Optional[pulumi.Input['GremlinGraphConflictResolutionPolicyArgs']] = None, + database_name: Optional[pulumi.Input[str]] = None, + default_ttl: Optional[pulumi.Input[int]] = None, + index_policy: Optional[pulumi.Input['GremlinGraphIndexPolicyArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key_path: Optional[pulumi.Input[str]] = None, + partition_key_version: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + unique_keys: Optional[pulumi.Input[Sequence[pulumi.Input['GremlinGraphUniqueKeyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if analytical_storage_ttl is None and 'analyticalStorageTtl' in kwargs: + analytical_storage_ttl = kwargs['analyticalStorageTtl'] + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + if conflict_resolution_policy is None and 'conflictResolutionPolicy' in kwargs: + conflict_resolution_policy = kwargs['conflictResolutionPolicy'] + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if default_ttl is None and 'defaultTtl' in kwargs: + default_ttl = kwargs['defaultTtl'] + if index_policy is None and 'indexPolicy' in kwargs: + index_policy = kwargs['indexPolicy'] + if partition_key_path is None and 'partitionKeyPath' in kwargs: + partition_key_path = kwargs['partitionKeyPath'] + if partition_key_version is None and 'partitionKeyVersion' in kwargs: + partition_key_version = kwargs['partitionKeyVersion'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if unique_keys is None and 'uniqueKeys' in kwargs: + unique_keys = kwargs['uniqueKeys'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if analytical_storage_ttl is not None: - pulumi.set(__self__, "analytical_storage_ttl", analytical_storage_ttl) + _setter("analytical_storage_ttl", analytical_storage_ttl) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if conflict_resolution_policy is not None: - pulumi.set(__self__, "conflict_resolution_policy", conflict_resolution_policy) + _setter("conflict_resolution_policy", conflict_resolution_policy) if database_name is not None: - pulumi.set(__self__, "database_name", database_name) + _setter("database_name", database_name) if default_ttl is not None: - pulumi.set(__self__, "default_ttl", default_ttl) + _setter("default_ttl", default_ttl) if index_policy is not None: - pulumi.set(__self__, "index_policy", index_policy) + _setter("index_policy", index_policy) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key_path is not None: - pulumi.set(__self__, "partition_key_path", partition_key_path) + _setter("partition_key_path", partition_key_path) if partition_key_version is not None: - pulumi.set(__self__, "partition_key_version", partition_key_version) + _setter("partition_key_version", partition_key_version) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) if unique_keys is not None: - pulumi.set(__self__, "unique_keys", unique_keys) + _setter("unique_keys", unique_keys) @property @pulumi.getter(name="accountName") @@ -589,6 +711,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GremlinGraphArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -620,12 +746,27 @@ def _internal_init(__self__, raise TypeError("Missing required property 'account_name'") __props__.__dict__["account_name"] = account_name __props__.__dict__["analytical_storage_ttl"] = analytical_storage_ttl + if autoscale_settings is not None and not isinstance(autoscale_settings, GremlinGraphAutoscaleSettingsArgs): + autoscale_settings = autoscale_settings or {} + def _setter(key, value): + autoscale_settings[key] = value + GremlinGraphAutoscaleSettingsArgs._configure(_setter, **autoscale_settings) __props__.__dict__["autoscale_settings"] = autoscale_settings + if conflict_resolution_policy is not None and not isinstance(conflict_resolution_policy, GremlinGraphConflictResolutionPolicyArgs): + conflict_resolution_policy = conflict_resolution_policy or {} + def _setter(key, value): + conflict_resolution_policy[key] = value + GremlinGraphConflictResolutionPolicyArgs._configure(_setter, **conflict_resolution_policy) __props__.__dict__["conflict_resolution_policy"] = conflict_resolution_policy if database_name is None and not opts.urn: raise TypeError("Missing required property 'database_name'") __props__.__dict__["database_name"] = database_name __props__.__dict__["default_ttl"] = default_ttl + if index_policy is not None and not isinstance(index_policy, GremlinGraphIndexPolicyArgs): + index_policy = index_policy or {} + def _setter(key, value): + index_policy[key] = value + GremlinGraphIndexPolicyArgs._configure(_setter, **index_policy) __props__.__dict__["index_policy"] = index_policy __props__.__dict__["name"] = name if partition_key_path is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/cosmosdb/mongo_collection.py b/sdk/python/pulumi_azure/cosmosdb/mongo_collection.py index 32e42a5e26..6401d0d928 100644 --- a/sdk/python/pulumi_azure/cosmosdb/mongo_collection.py +++ b/sdk/python/pulumi_azure/cosmosdb/mongo_collection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,23 +37,72 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Cosmos DB Mongo Collection. Changing this forces a new resource to be created. :param pulumi.Input[str] shard_key: The name of the key to partition on for sharding. There must not be any other unique index keys. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + MongoCollectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + database_name=database_name, + resource_group_name=resource_group_name, + analytical_storage_ttl=analytical_storage_ttl, + autoscale_settings=autoscale_settings, + default_ttl_seconds=default_ttl_seconds, + indices=indices, + name=name, + shard_key=shard_key, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + analytical_storage_ttl: Optional[pulumi.Input[int]] = None, + autoscale_settings: Optional[pulumi.Input['MongoCollectionAutoscaleSettingsArgs']] = None, + default_ttl_seconds: Optional[pulumi.Input[int]] = None, + indices: Optional[pulumi.Input[Sequence[pulumi.Input['MongoCollectionIndexArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + shard_key: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if analytical_storage_ttl is None and 'analyticalStorageTtl' in kwargs: + analytical_storage_ttl = kwargs['analyticalStorageTtl'] + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + if default_ttl_seconds is None and 'defaultTtlSeconds' in kwargs: + default_ttl_seconds = kwargs['defaultTtlSeconds'] + if shard_key is None and 'shardKey' in kwargs: + shard_key = kwargs['shardKey'] + + _setter("account_name", account_name) + _setter("database_name", database_name) + _setter("resource_group_name", resource_group_name) if analytical_storage_ttl is not None: - pulumi.set(__self__, "analytical_storage_ttl", analytical_storage_ttl) + _setter("analytical_storage_ttl", analytical_storage_ttl) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if default_ttl_seconds is not None: - pulumi.set(__self__, "default_ttl_seconds", default_ttl_seconds) + _setter("default_ttl_seconds", default_ttl_seconds) if indices is not None: - pulumi.set(__self__, "indices", indices) + _setter("indices", indices) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if shard_key is not None: - pulumi.set(__self__, "shard_key", shard_key) + _setter("shard_key", shard_key) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="accountName") @@ -196,28 +245,75 @@ def __init__(__self__, *, :param pulumi.Input[str] shard_key: The name of the key to partition on for sharding. There must not be any other unique index keys. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['MongoCollectionSystemIndexArgs']]] system_indexes: One or more `system_indexes` blocks as defined below. """ + _MongoCollectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + analytical_storage_ttl=analytical_storage_ttl, + autoscale_settings=autoscale_settings, + database_name=database_name, + default_ttl_seconds=default_ttl_seconds, + indices=indices, + name=name, + resource_group_name=resource_group_name, + shard_key=shard_key, + system_indexes=system_indexes, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + analytical_storage_ttl: Optional[pulumi.Input[int]] = None, + autoscale_settings: Optional[pulumi.Input['MongoCollectionAutoscaleSettingsArgs']] = None, + database_name: Optional[pulumi.Input[str]] = None, + default_ttl_seconds: Optional[pulumi.Input[int]] = None, + indices: Optional[pulumi.Input[Sequence[pulumi.Input['MongoCollectionIndexArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + shard_key: Optional[pulumi.Input[str]] = None, + system_indexes: Optional[pulumi.Input[Sequence[pulumi.Input['MongoCollectionSystemIndexArgs']]]] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if analytical_storage_ttl is None and 'analyticalStorageTtl' in kwargs: + analytical_storage_ttl = kwargs['analyticalStorageTtl'] + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if default_ttl_seconds is None and 'defaultTtlSeconds' in kwargs: + default_ttl_seconds = kwargs['defaultTtlSeconds'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if shard_key is None and 'shardKey' in kwargs: + shard_key = kwargs['shardKey'] + if system_indexes is None and 'systemIndexes' in kwargs: + system_indexes = kwargs['systemIndexes'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if analytical_storage_ttl is not None: - pulumi.set(__self__, "analytical_storage_ttl", analytical_storage_ttl) + _setter("analytical_storage_ttl", analytical_storage_ttl) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if database_name is not None: - pulumi.set(__self__, "database_name", database_name) + _setter("database_name", database_name) if default_ttl_seconds is not None: - pulumi.set(__self__, "default_ttl_seconds", default_ttl_seconds) + _setter("default_ttl_seconds", default_ttl_seconds) if indices is not None: - pulumi.set(__self__, "indices", indices) + _setter("indices", indices) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if shard_key is not None: - pulumi.set(__self__, "shard_key", shard_key) + _setter("shard_key", shard_key) if system_indexes is not None: - pulumi.set(__self__, "system_indexes", system_indexes) + _setter("system_indexes", system_indexes) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="accountName") @@ -459,6 +555,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MongoCollectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -487,6 +587,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'account_name'") __props__.__dict__["account_name"] = account_name __props__.__dict__["analytical_storage_ttl"] = analytical_storage_ttl + if autoscale_settings is not None and not isinstance(autoscale_settings, MongoCollectionAutoscaleSettingsArgs): + autoscale_settings = autoscale_settings or {} + def _setter(key, value): + autoscale_settings[key] = value + MongoCollectionAutoscaleSettingsArgs._configure(_setter, **autoscale_settings) __props__.__dict__["autoscale_settings"] = autoscale_settings if database_name is None and not opts.urn: raise TypeError("Missing required property 'database_name'") diff --git a/sdk/python/pulumi_azure/cosmosdb/mongo_database.py b/sdk/python/pulumi_azure/cosmosdb/mongo_database.py index f2d8bb67fd..30252d5acb 100644 --- a/sdk/python/pulumi_azure/cosmosdb/mongo_database.py +++ b/sdk/python/pulumi_azure/cosmosdb/mongo_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,14 +33,43 @@ def __init__(__self__, *, > **Note:** throughput has a maximum value of `1000000` unless a higher limit is requested via Azure Support. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + MongoDatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + resource_group_name=resource_group_name, + autoscale_settings=autoscale_settings, + name=name, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + autoscale_settings: Optional[pulumi.Input['MongoDatabaseAutoscaleSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + + _setter("account_name", account_name) + _setter("resource_group_name", resource_group_name) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="accountName") @@ -127,16 +156,41 @@ def __init__(__self__, *, > **Note:** throughput has a maximum value of `1000000` unless a higher limit is requested via Azure Support. """ + _MongoDatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + autoscale_settings=autoscale_settings, + name=name, + resource_group_name=resource_group_name, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + autoscale_settings: Optional[pulumi.Input['MongoDatabaseAutoscaleSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="accountName") @@ -292,6 +346,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MongoDatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -314,6 +372,11 @@ def _internal_init(__self__, if account_name is None and not opts.urn: raise TypeError("Missing required property 'account_name'") __props__.__dict__["account_name"] = account_name + if autoscale_settings is not None and not isinstance(autoscale_settings, MongoDatabaseAutoscaleSettingsArgs): + autoscale_settings = autoscale_settings or {} + def _setter(key, value): + autoscale_settings[key] = value + MongoDatabaseAutoscaleSettingsArgs._configure(_setter, **autoscale_settings) __props__.__dict__["autoscale_settings"] = autoscale_settings __props__.__dict__["name"] = name if resource_group_name is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/cosmosdb/mongo_role_definition.py b/sdk/python/pulumi_azure/cosmosdb/mongo_role_definition.py index 9c98cc14d0..8998c4150f 100644 --- a/sdk/python/pulumi_azure/cosmosdb/mongo_role_definition.py +++ b/sdk/python/pulumi_azure/cosmosdb/mongo_role_definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,12 +29,39 @@ def __init__(__self__, *, > **Note:** The role that needs to be inherited should exist in the Mongo DB of `cosmos_mongo_database_id`. :param pulumi.Input[Sequence[pulumi.Input['MongoRoleDefinitionPrivilegeArgs']]] privileges: A `privilege` block as defined below. """ - pulumi.set(__self__, "cosmos_mongo_database_id", cosmos_mongo_database_id) - pulumi.set(__self__, "role_name", role_name) + MongoRoleDefinitionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cosmos_mongo_database_id=cosmos_mongo_database_id, + role_name=role_name, + inherited_role_names=inherited_role_names, + privileges=privileges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cosmos_mongo_database_id: Optional[pulumi.Input[str]] = None, + role_name: Optional[pulumi.Input[str]] = None, + inherited_role_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + privileges: Optional[pulumi.Input[Sequence[pulumi.Input['MongoRoleDefinitionPrivilegeArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cosmos_mongo_database_id is None and 'cosmosMongoDatabaseId' in kwargs: + cosmos_mongo_database_id = kwargs['cosmosMongoDatabaseId'] + if cosmos_mongo_database_id is None: + raise TypeError("Missing 'cosmos_mongo_database_id' argument") + if role_name is None and 'roleName' in kwargs: + role_name = kwargs['roleName'] + if role_name is None: + raise TypeError("Missing 'role_name' argument") + if inherited_role_names is None and 'inheritedRoleNames' in kwargs: + inherited_role_names = kwargs['inheritedRoleNames'] + + _setter("cosmos_mongo_database_id", cosmos_mongo_database_id) + _setter("role_name", role_name) if inherited_role_names is not None: - pulumi.set(__self__, "inherited_role_names", inherited_role_names) + _setter("inherited_role_names", inherited_role_names) if privileges is not None: - pulumi.set(__self__, "privileges", privileges) + _setter("privileges", privileges) @property @pulumi.getter(name="cosmosMongoDatabaseId") @@ -103,14 +130,37 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['MongoRoleDefinitionPrivilegeArgs']]] privileges: A `privilege` block as defined below. :param pulumi.Input[str] role_name: The user-friendly name for the Mongo Role Definition. It must be unique for the database account. Changing this forces a new resource to be created. """ + _MongoRoleDefinitionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cosmos_mongo_database_id=cosmos_mongo_database_id, + inherited_role_names=inherited_role_names, + privileges=privileges, + role_name=role_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cosmos_mongo_database_id: Optional[pulumi.Input[str]] = None, + inherited_role_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + privileges: Optional[pulumi.Input[Sequence[pulumi.Input['MongoRoleDefinitionPrivilegeArgs']]]] = None, + role_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cosmos_mongo_database_id is None and 'cosmosMongoDatabaseId' in kwargs: + cosmos_mongo_database_id = kwargs['cosmosMongoDatabaseId'] + if inherited_role_names is None and 'inheritedRoleNames' in kwargs: + inherited_role_names = kwargs['inheritedRoleNames'] + if role_name is None and 'roleName' in kwargs: + role_name = kwargs['roleName'] + if cosmos_mongo_database_id is not None: - pulumi.set(__self__, "cosmos_mongo_database_id", cosmos_mongo_database_id) + _setter("cosmos_mongo_database_id", cosmos_mongo_database_id) if inherited_role_names is not None: - pulumi.set(__self__, "inherited_role_names", inherited_role_names) + _setter("inherited_role_names", inherited_role_names) if privileges is not None: - pulumi.set(__self__, "privileges", privileges) + _setter("privileges", privileges) if role_name is not None: - pulumi.set(__self__, "role_name", role_name) + _setter("role_name", role_name) @property @pulumi.getter(name="cosmosMongoDatabaseId") @@ -290,6 +340,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MongoRoleDefinitionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/mongo_user_definition.py b/sdk/python/pulumi_azure/cosmosdb/mongo_user_definition.py index c160c3a07f..38e39119e1 100644 --- a/sdk/python/pulumi_azure/cosmosdb/mongo_user_definition.py +++ b/sdk/python/pulumi_azure/cosmosdb/mongo_user_definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['MongoUserDefinitionArgs', 'MongoUserDefinition'] @@ -27,11 +27,38 @@ def __init__(__self__, *, > **Note:** The role that needs to be inherited should exist in the Mongo DB of `cosmos_mongo_database_id`. """ - pulumi.set(__self__, "cosmos_mongo_database_id", cosmos_mongo_database_id) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + MongoUserDefinitionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cosmos_mongo_database_id=cosmos_mongo_database_id, + password=password, + username=username, + inherited_role_names=inherited_role_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cosmos_mongo_database_id: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + inherited_role_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cosmos_mongo_database_id is None and 'cosmosMongoDatabaseId' in kwargs: + cosmos_mongo_database_id = kwargs['cosmosMongoDatabaseId'] + if cosmos_mongo_database_id is None: + raise TypeError("Missing 'cosmos_mongo_database_id' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if inherited_role_names is None and 'inheritedRoleNames' in kwargs: + inherited_role_names = kwargs['inheritedRoleNames'] + + _setter("cosmos_mongo_database_id", cosmos_mongo_database_id) + _setter("password", password) + _setter("username", username) if inherited_role_names is not None: - pulumi.set(__self__, "inherited_role_names", inherited_role_names) + _setter("inherited_role_names", inherited_role_names) @property @pulumi.getter(name="cosmosMongoDatabaseId") @@ -100,14 +127,35 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password for the Mongo User Definition. :param pulumi.Input[str] username: The username for the Mongo User Definition. Changing this forces a new resource to be created. """ + _MongoUserDefinitionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cosmos_mongo_database_id=cosmos_mongo_database_id, + inherited_role_names=inherited_role_names, + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cosmos_mongo_database_id: Optional[pulumi.Input[str]] = None, + inherited_role_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cosmos_mongo_database_id is None and 'cosmosMongoDatabaseId' in kwargs: + cosmos_mongo_database_id = kwargs['cosmosMongoDatabaseId'] + if inherited_role_names is None and 'inheritedRoleNames' in kwargs: + inherited_role_names = kwargs['inheritedRoleNames'] + if cosmos_mongo_database_id is not None: - pulumi.set(__self__, "cosmos_mongo_database_id", cosmos_mongo_database_id) + _setter("cosmos_mongo_database_id", cosmos_mongo_database_id) if inherited_role_names is not None: - pulumi.set(__self__, "inherited_role_names", inherited_role_names) + _setter("inherited_role_names", inherited_role_names) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="cosmosMongoDatabaseId") @@ -289,6 +337,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MongoUserDefinitionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/notebook_workspace.py b/sdk/python/pulumi_azure/cosmosdb/notebook_workspace.py index bc0da3bb31..0aea309dd7 100644 --- a/sdk/python/pulumi_azure/cosmosdb/notebook_workspace.py +++ b/sdk/python/pulumi_azure/cosmosdb/notebook_workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NotebookWorkspaceArgs', 'NotebookWorkspace'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created. :param pulumi.Input[str] name: The name which should be used for this SQL Notebook Workspace. Possible value is `default`. Changing this forces a new SQL Notebook Workspace to be created. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + NotebookWorkspaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + resource_group_name=resource_group_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("account_name", account_name) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="accountName") @@ -79,14 +102,37 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created. :param pulumi.Input[str] server_endpoint: Specifies the endpoint of Notebook server. """ + _NotebookWorkspaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + name=name, + resource_group_name=resource_group_name, + server_endpoint=server_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_endpoint is None and 'serverEndpoint' in kwargs: + server_endpoint = kwargs['serverEndpoint'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_endpoint is not None: - pulumi.set(__self__, "server_endpoint", server_endpoint) + _setter("server_endpoint", server_endpoint) @property @pulumi.getter(name="accountName") @@ -250,6 +296,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NotebookWorkspaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/outputs.py b/sdk/python/pulumi_azure/cosmosdb/outputs.py index 1de610b23c..36e65c83a1 100644 --- a/sdk/python/pulumi_azure/cosmosdb/outputs.py +++ b/sdk/python/pulumi_azure/cosmosdb/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -90,7 +90,22 @@ def __init__(__self__, *, """ :param str schema_type: The schema type of the Analytical Storage for this Cosmos DB account. Possible values are `FullFidelity` and `WellDefined`. """ - pulumi.set(__self__, "schema_type", schema_type) + AccountAnalyticalStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + schema_type=schema_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schema_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schema_type is None and 'schemaType' in kwargs: + schema_type = kwargs['schemaType'] + if schema_type is None: + raise TypeError("Missing 'schema_type' argument") + + _setter("schema_type", schema_type) @property @pulumi.getter(name="schemaType") @@ -135,13 +150,38 @@ def __init__(__self__, *, :param int retention_in_hours: The time in hours that each backup is retained. This is configurable only when `type` is `Periodic`. Possible values are between 8 and 720. :param str storage_redundancy: The storage redundancy is used to indicate the type of backup residency. This is configurable only when `type` is `Periodic`. Possible values are `Geo`, `Local` and `Zone`. """ - pulumi.set(__self__, "type", type) + AccountBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + interval_in_minutes=interval_in_minutes, + retention_in_hours=retention_in_hours, + storage_redundancy=storage_redundancy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + interval_in_minutes: Optional[int] = None, + retention_in_hours: Optional[int] = None, + storage_redundancy: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if interval_in_minutes is None and 'intervalInMinutes' in kwargs: + interval_in_minutes = kwargs['intervalInMinutes'] + if retention_in_hours is None and 'retentionInHours' in kwargs: + retention_in_hours = kwargs['retentionInHours'] + if storage_redundancy is None and 'storageRedundancy' in kwargs: + storage_redundancy = kwargs['storageRedundancy'] + + _setter("type", type) if interval_in_minutes is not None: - pulumi.set(__self__, "interval_in_minutes", interval_in_minutes) + _setter("interval_in_minutes", interval_in_minutes) if retention_in_hours is not None: - pulumi.set(__self__, "retention_in_hours", retention_in_hours) + _setter("retention_in_hours", retention_in_hours) if storage_redundancy is not None: - pulumi.set(__self__, "storage_redundancy", storage_redundancy) + _setter("storage_redundancy", storage_redundancy) @property @pulumi.getter @@ -183,7 +223,20 @@ def __init__(__self__, *, """ :param str name: Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + AccountCapability._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -218,7 +271,22 @@ def __init__(__self__, *, """ :param int total_throughput_limit: The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least `-1`. `-1` means no limit. """ - pulumi.set(__self__, "total_throughput_limit", total_throughput_limit) + AccountCapacity._configure( + lambda key, value: pulumi.set(__self__, key, value), + total_throughput_limit=total_throughput_limit, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + total_throughput_limit: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if total_throughput_limit is None and 'totalThroughputLimit' in kwargs: + total_throughput_limit = kwargs['totalThroughputLimit'] + if total_throughput_limit is None: + raise TypeError("Missing 'total_throughput_limit' argument") + + _setter("total_throughput_limit", total_throughput_limit) @property @pulumi.getter(name="totalThroughputLimit") @@ -263,11 +331,34 @@ def __init__(__self__, *, > **Note:** `max_interval_in_seconds` and `max_staleness_prefix` can only be set to custom values when `consistency_level` is set to `BoundedStaleness` - otherwise they will return the default values shown above. """ - pulumi.set(__self__, "consistency_level", consistency_level) + AccountConsistencyPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + consistency_level=consistency_level, + max_interval_in_seconds=max_interval_in_seconds, + max_staleness_prefix=max_staleness_prefix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consistency_level: Optional[str] = None, + max_interval_in_seconds: Optional[int] = None, + max_staleness_prefix: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consistency_level is None and 'consistencyLevel' in kwargs: + consistency_level = kwargs['consistencyLevel'] + if consistency_level is None: + raise TypeError("Missing 'consistency_level' argument") + if max_interval_in_seconds is None and 'maxIntervalInSeconds' in kwargs: + max_interval_in_seconds = kwargs['maxIntervalInSeconds'] + if max_staleness_prefix is None and 'maxStalenessPrefix' in kwargs: + max_staleness_prefix = kwargs['maxStalenessPrefix'] + + _setter("consistency_level", consistency_level) if max_interval_in_seconds is not None: - pulumi.set(__self__, "max_interval_in_seconds", max_interval_in_seconds) + _setter("max_interval_in_seconds", max_interval_in_seconds) if max_staleness_prefix is not None: - pulumi.set(__self__, "max_staleness_prefix", max_staleness_prefix) + _setter("max_staleness_prefix", max_staleness_prefix) @property @pulumi.getter(name="consistencyLevel") @@ -336,12 +427,49 @@ def __init__(__self__, *, :param Sequence[str] exposed_headers: A list of response headers that are exposed to CORS clients. :param int max_age_in_seconds: The number of seconds the client should cache a preflight response. Possible values are between `1` and `2147483647`. """ - pulumi.set(__self__, "allowed_headers", allowed_headers) - pulumi.set(__self__, "allowed_methods", allowed_methods) - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "exposed_headers", exposed_headers) + AccountCorsRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + exposed_headers=exposed_headers, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_headers: Optional[Sequence[str]] = None, + allowed_methods: Optional[Sequence[str]] = None, + allowed_origins: Optional[Sequence[str]] = None, + exposed_headers: Optional[Sequence[str]] = None, + max_age_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_headers is None: + raise TypeError("Missing 'allowed_headers' argument") + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_methods is None: + raise TypeError("Missing 'allowed_methods' argument") + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if exposed_headers is None and 'exposedHeaders' in kwargs: + exposed_headers = kwargs['exposedHeaders'] + if exposed_headers is None: + raise TypeError("Missing 'exposed_headers' argument") + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + + _setter("allowed_headers", allowed_headers) + _setter("allowed_methods", allowed_methods) + _setter("allowed_origins", allowed_origins) + _setter("exposed_headers", exposed_headers) if max_age_in_seconds is not None: - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowedHeaders") @@ -416,12 +544,37 @@ def __init__(__self__, *, :param str id: The ID of the virtual network subnet. :param bool zone_redundant: Should zone redundancy be enabled for this region? Defaults to `false`. """ - pulumi.set(__self__, "failover_priority", failover_priority) - pulumi.set(__self__, "location", location) + AccountGeoLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + failover_priority=failover_priority, + location=location, + id=id, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + failover_priority: Optional[int] = None, + location: Optional[str] = None, + id: Optional[str] = None, + zone_redundant: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failover_priority is None and 'failoverPriority' in kwargs: + failover_priority = kwargs['failoverPriority'] + if failover_priority is None: + raise TypeError("Missing 'failover_priority' argument") + if location is None: + raise TypeError("Missing 'location' argument") + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + + _setter("failover_priority", failover_priority) + _setter("location", location) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="failoverPriority") @@ -490,13 +643,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + AccountIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -563,10 +741,33 @@ def __init__(__self__, *, > **NOTE:** Any database account with `Continuous` type (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved by `cosmosdb_get_restorable_database_accounts`. :param Sequence['AccountRestoreDatabaseArgs'] databases: A `database` block as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "restore_timestamp_in_utc", restore_timestamp_in_utc) - pulumi.set(__self__, "source_cosmosdb_account_id", source_cosmosdb_account_id) + AccountRestore._configure( + lambda key, value: pulumi.set(__self__, key, value), + restore_timestamp_in_utc=restore_timestamp_in_utc, + source_cosmosdb_account_id=source_cosmosdb_account_id, + databases=databases, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + restore_timestamp_in_utc: Optional[str] = None, + source_cosmosdb_account_id: Optional[str] = None, + databases: Optional[Sequence['outputs.AccountRestoreDatabase']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if restore_timestamp_in_utc is None and 'restoreTimestampInUtc' in kwargs: + restore_timestamp_in_utc = kwargs['restoreTimestampInUtc'] + if restore_timestamp_in_utc is None: + raise TypeError("Missing 'restore_timestamp_in_utc' argument") + if source_cosmosdb_account_id is None and 'sourceCosmosdbAccountId' in kwargs: + source_cosmosdb_account_id = kwargs['sourceCosmosdbAccountId'] + if source_cosmosdb_account_id is None: + raise TypeError("Missing 'source_cosmosdb_account_id' argument") + + _setter("restore_timestamp_in_utc", restore_timestamp_in_utc) + _setter("source_cosmosdb_account_id", source_cosmosdb_account_id) if databases is not None: - pulumi.set(__self__, "databases", databases) + _setter("databases", databases) @property @pulumi.getter(name="restoreTimestampInUtc") @@ -621,9 +822,26 @@ def __init__(__self__, *, :param str name: The database name for the restore request. Changing this forces a new resource to be created. :param Sequence[str] collection_names: A list of the collection names for the restore request. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + AccountRestoreDatabase._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + collection_names=collection_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + collection_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if collection_names is None and 'collectionNames' in kwargs: + collection_names = kwargs['collectionNames'] + + _setter("name", name) if collection_names is not None: - pulumi.set(__self__, "collection_names", collection_names) + _setter("collection_names", collection_names) @property @pulumi.getter @@ -668,9 +886,26 @@ def __init__(__self__, *, :param str id: The ID of the virtual network subnet. :param bool ignore_missing_vnet_service_endpoint: If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to `false`. """ - pulumi.set(__self__, "id", id) + AccountVirtualNetworkRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + ignore_missing_vnet_service_endpoint: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + + _setter("id", id) if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) @property @pulumi.getter @@ -717,11 +952,32 @@ def __init__(__self__, *, """ :param str type: Specifies the type of Managed Service Identity that should be configured on this Cassandra Cluster. The only possible value is `SystemAssigned`. """ - pulumi.set(__self__, "type", type) + CassandraClusterIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -766,8 +1022,21 @@ def __init__(__self__, *, """ :param int max_throughput: The maximum throughput of the Cassandra KeySpace (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + CassandraKeyspaceAutoscaleSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -802,8 +1071,21 @@ def __init__(__self__, *, """ :param int max_throughput: The maximum throughput of the Cassandra Table (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + CassandraTableAutoscaleSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -844,10 +1126,33 @@ def __init__(__self__, *, :param Sequence['CassandraTableSchemaPartitionKeyArgs'] partition_keys: One or more `partition_key` blocks as defined below. :param Sequence['CassandraTableSchemaClusterKeyArgs'] cluster_keys: One or more `cluster_key` blocks as defined below. """ - pulumi.set(__self__, "columns", columns) - pulumi.set(__self__, "partition_keys", partition_keys) + CassandraTableSchema._configure( + lambda key, value: pulumi.set(__self__, key, value), + columns=columns, + partition_keys=partition_keys, + cluster_keys=cluster_keys, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + columns: Optional[Sequence['outputs.CassandraTableSchemaColumn']] = None, + partition_keys: Optional[Sequence['outputs.CassandraTableSchemaPartitionKey']] = None, + cluster_keys: Optional[Sequence['outputs.CassandraTableSchemaClusterKey']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if columns is None: + raise TypeError("Missing 'columns' argument") + if partition_keys is None and 'partitionKeys' in kwargs: + partition_keys = kwargs['partitionKeys'] + if partition_keys is None: + raise TypeError("Missing 'partition_keys' argument") + if cluster_keys is None and 'clusterKeys' in kwargs: + cluster_keys = kwargs['clusterKeys'] + + _setter("columns", columns) + _setter("partition_keys", partition_keys) if cluster_keys is not None: - pulumi.set(__self__, "cluster_keys", cluster_keys) + _setter("cluster_keys", cluster_keys) @property @pulumi.getter @@ -900,8 +1205,27 @@ def __init__(__self__, *, :param str name: Name of the cluster key to be created. :param str order_by: Order of the key. Currently supported values are `Asc` and `Desc`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "order_by", order_by) + CassandraTableSchemaClusterKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + order_by=order_by, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + order_by: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if order_by is None and 'orderBy' in kwargs: + order_by = kwargs['orderBy'] + if order_by is None: + raise TypeError("Missing 'order_by' argument") + + _setter("name", name) + _setter("order_by", order_by) @property @pulumi.getter @@ -929,8 +1253,25 @@ def __init__(__self__, *, :param str name: Name of the column to be created. :param str type: Type of the column to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + CassandraTableSchemaColumn._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -956,7 +1297,20 @@ def __init__(__self__, *, """ :param str name: Name of the column to partition by. """ - pulumi.set(__self__, "name", name) + CassandraTableSchemaPartitionKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -991,8 +1345,21 @@ def __init__(__self__, *, """ :param int max_throughput: The maximum throughput of the Gremlin database (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + GremlinDatabaseAutoscaleSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -1027,8 +1394,21 @@ def __init__(__self__, *, """ :param int max_throughput: The maximum throughput of the Gremlin graph (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + GremlinGraphAutoscaleSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -1069,11 +1449,32 @@ def __init__(__self__, *, :param str conflict_resolution_path: The conflict resolution path in the case of LastWriterWins mode. :param str conflict_resolution_procedure: The procedure to resolve conflicts in the case of custom mode. """ - pulumi.set(__self__, "mode", mode) + GremlinGraphConflictResolutionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + conflict_resolution_path=conflict_resolution_path, + conflict_resolution_procedure=conflict_resolution_procedure, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + conflict_resolution_path: Optional[str] = None, + conflict_resolution_procedure: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if conflict_resolution_path is None and 'conflictResolutionPath' in kwargs: + conflict_resolution_path = kwargs['conflictResolutionPath'] + if conflict_resolution_procedure is None and 'conflictResolutionProcedure' in kwargs: + conflict_resolution_procedure = kwargs['conflictResolutionProcedure'] + + _setter("mode", mode) if conflict_resolution_path is not None: - pulumi.set(__self__, "conflict_resolution_path", conflict_resolution_path) + _setter("conflict_resolution_path", conflict_resolution_path) if conflict_resolution_procedure is not None: - pulumi.set(__self__, "conflict_resolution_procedure", conflict_resolution_procedure) + _setter("conflict_resolution_procedure", conflict_resolution_procedure) @property @pulumi.getter @@ -1142,17 +1543,50 @@ def __init__(__self__, *, :param Sequence[str] included_paths: List of paths to include in the indexing. Required if `indexing_mode` is `Consistent` or `Lazy`. :param Sequence['GremlinGraphIndexPolicySpatialIndexArgs'] spatial_indices: One or more `spatial_index` blocks as defined below. """ - pulumi.set(__self__, "indexing_mode", indexing_mode) + GremlinGraphIndexPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + indexing_mode=indexing_mode, + automatic=automatic, + composite_indices=composite_indices, + excluded_paths=excluded_paths, + included_paths=included_paths, + spatial_indices=spatial_indices, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + indexing_mode: Optional[str] = None, + automatic: Optional[bool] = None, + composite_indices: Optional[Sequence['outputs.GremlinGraphIndexPolicyCompositeIndex']] = None, + excluded_paths: Optional[Sequence[str]] = None, + included_paths: Optional[Sequence[str]] = None, + spatial_indices: Optional[Sequence['outputs.GremlinGraphIndexPolicySpatialIndex']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if indexing_mode is None and 'indexingMode' in kwargs: + indexing_mode = kwargs['indexingMode'] + if indexing_mode is None: + raise TypeError("Missing 'indexing_mode' argument") + if composite_indices is None and 'compositeIndices' in kwargs: + composite_indices = kwargs['compositeIndices'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if included_paths is None and 'includedPaths' in kwargs: + included_paths = kwargs['includedPaths'] + if spatial_indices is None and 'spatialIndices' in kwargs: + spatial_indices = kwargs['spatialIndices'] + + _setter("indexing_mode", indexing_mode) if automatic is not None: - pulumi.set(__self__, "automatic", automatic) + _setter("automatic", automatic) if composite_indices is not None: - pulumi.set(__self__, "composite_indices", composite_indices) + _setter("composite_indices", composite_indices) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if included_paths is not None: - pulumi.set(__self__, "included_paths", included_paths) + _setter("included_paths", included_paths) if spatial_indices is not None: - pulumi.set(__self__, "spatial_indices", spatial_indices) + _setter("spatial_indices", spatial_indices) @property @pulumi.getter(name="indexingMode") @@ -1210,7 +1644,20 @@ def __init__(__self__, *, """ :param Sequence['GremlinGraphIndexPolicyCompositeIndexIndexArgs'] indices: One or more `index` blocks as defined below. """ - pulumi.set(__self__, "indices", indices) + GremlinGraphIndexPolicyCompositeIndex._configure( + lambda key, value: pulumi.set(__self__, key, value), + indices=indices, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + indices: Optional[Sequence['outputs.GremlinGraphIndexPolicyCompositeIndexIndex']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if indices is None: + raise TypeError("Missing 'indices' argument") + + _setter("indices", indices) @property @pulumi.getter @@ -1230,8 +1677,25 @@ def __init__(__self__, *, :param str order: Order of the index. Possible values are `Ascending` or `Descending`. :param str path: Path for which the indexing behaviour applies to. """ - pulumi.set(__self__, "order", order) - pulumi.set(__self__, "path", path) + GremlinGraphIndexPolicyCompositeIndexIndex._configure( + lambda key, value: pulumi.set(__self__, key, value), + order=order, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + order: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if order is None: + raise TypeError("Missing 'order' argument") + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("order", order) + _setter("path", path) @property @pulumi.getter @@ -1258,9 +1722,24 @@ def __init__(__self__, *, """ :param str path: Path for which the indexing behaviour applies to. According to the service design, all spatial types including `LineString`, `MultiPolygon`, `Point`, and `Polygon` will be applied to the path. """ - pulumi.set(__self__, "path", path) + GremlinGraphIndexPolicySpatialIndex._configure( + lambda key, value: pulumi.set(__self__, key, value), + path=path, + types=types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + path: Optional[str] = None, + types: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("path", path) if types is not None: - pulumi.set(__self__, "types", types) + _setter("types", types) @property @pulumi.getter @@ -1283,7 +1762,20 @@ def __init__(__self__, *, """ :param Sequence[str] paths: A list of paths to use for this unique key. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "paths", paths) + GremlinGraphUniqueKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + paths=paths, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + paths: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if paths is None: + raise TypeError("Missing 'paths' argument") + + _setter("paths", paths) @property @pulumi.getter @@ -1318,8 +1810,21 @@ def __init__(__self__, *, """ :param int max_throughput: The maximum throughput of the MongoDB collection (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + MongoCollectionAutoscaleSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -1341,9 +1846,24 @@ def __init__(__self__, *, > **Note:** An index with an "_id" key must be specified. """ - pulumi.set(__self__, "keys", keys) + MongoCollectionIndex._configure( + lambda key, value: pulumi.set(__self__, key, value), + keys=keys, + unique=unique, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + keys: Optional[Sequence[str]] = None, + unique: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if keys is None: + raise TypeError("Missing 'keys' argument") + + _setter("keys", keys) if unique is not None: - pulumi.set(__self__, "unique", unique) + _setter("unique", unique) @property @pulumi.getter @@ -1375,10 +1895,23 @@ def __init__(__self__, *, > **Note:** An index with an "_id" key must be specified. """ + MongoCollectionSystemIndex._configure( + lambda key, value: pulumi.set(__self__, key, value), + keys=keys, + unique=unique, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + keys: Optional[Sequence[str]] = None, + unique: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if keys is not None: - pulumi.set(__self__, "keys", keys) + _setter("keys", keys) if unique is not None: - pulumi.set(__self__, "unique", unique) + _setter("unique", unique) @property @pulumi.getter @@ -1423,8 +1956,21 @@ def __init__(__self__, *, """ :param int max_throughput: The maximum throughput of the MongoDB database (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + MongoDatabaseAutoscaleSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -1444,8 +1990,25 @@ def __init__(__self__, *, :param Sequence[str] actions: A list of actions that are allowed. :param 'MongoRoleDefinitionPrivilegeResourceArgs' resource: A `resource` block as defined below. """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "resource", resource) + MongoRoleDefinitionPrivilege._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + resource=resource, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[Sequence[str]] = None, + resource: Optional['outputs.MongoRoleDefinitionPrivilegeResource'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if resource is None: + raise TypeError("Missing 'resource' argument") + + _setter("actions", actions) + _setter("resource", resource) @property @pulumi.getter @@ -1492,10 +2055,27 @@ def __init__(__self__, *, :param str collection_name: The name of the Mongo DB Collection that the Role Definition is applied. :param str db_name: The name of the Mongo DB that the Role Definition is applied. """ + MongoRoleDefinitionPrivilegeResource._configure( + lambda key, value: pulumi.set(__self__, key, value), + collection_name=collection_name, + db_name=db_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + collection_name: Optional[str] = None, + db_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if collection_name is None and 'collectionName' in kwargs: + collection_name = kwargs['collectionName'] + if db_name is None and 'dbName' in kwargs: + db_name = kwargs['dbName'] + if collection_name is not None: - pulumi.set(__self__, "collection_name", collection_name) + _setter("collection_name", collection_name) if db_name is not None: - pulumi.set(__self__, "db_name", db_name) + _setter("db_name", db_name) @property @pulumi.getter(name="collectionName") @@ -1546,12 +2126,33 @@ def __init__(__self__, *, :param int start_hour: The start hour for maintenance window. Defaults to `0`. :param int start_minute: The start minute for maintenance window. Defaults to `0`. """ + PostgresqlClusterMaintenanceWindow._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + start_hour=start_hour, + start_minute=start_minute, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[int] = None, + start_hour: Optional[int] = None, + start_minute: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if start_hour is None and 'startHour' in kwargs: + start_hour = kwargs['startHour'] + if start_minute is None and 'startMinute' in kwargs: + start_minute = kwargs['startMinute'] + if day_of_week is not None: - pulumi.set(__self__, "day_of_week", day_of_week) + _setter("day_of_week", day_of_week) if start_hour is not None: - pulumi.set(__self__, "start_hour", start_hour) + _setter("start_hour", start_hour) if start_minute is not None: - pulumi.set(__self__, "start_minute", start_minute) + _setter("start_minute", start_minute) @property @pulumi.getter(name="dayOfWeek") @@ -1602,8 +2203,21 @@ def __init__(__self__, *, """ :param int max_throughput: The maximum throughput of the SQL container (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + SqlContainerAutoscaleSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -1644,11 +2258,32 @@ def __init__(__self__, *, :param str conflict_resolution_path: The conflict resolution path in the case of `LastWriterWins` mode. :param str conflict_resolution_procedure: The procedure to resolve conflicts in the case of `Custom` mode. """ - pulumi.set(__self__, "mode", mode) + SqlContainerConflictResolutionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + conflict_resolution_path=conflict_resolution_path, + conflict_resolution_procedure=conflict_resolution_procedure, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + conflict_resolution_path: Optional[str] = None, + conflict_resolution_procedure: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if conflict_resolution_path is None and 'conflictResolutionPath' in kwargs: + conflict_resolution_path = kwargs['conflictResolutionPath'] + if conflict_resolution_procedure is None and 'conflictResolutionProcedure' in kwargs: + conflict_resolution_procedure = kwargs['conflictResolutionProcedure'] + + _setter("mode", mode) if conflict_resolution_path is not None: - pulumi.set(__self__, "conflict_resolution_path", conflict_resolution_path) + _setter("conflict_resolution_path", conflict_resolution_path) if conflict_resolution_procedure is not None: - pulumi.set(__self__, "conflict_resolution_procedure", conflict_resolution_procedure) + _setter("conflict_resolution_procedure", conflict_resolution_procedure) @property @pulumi.getter @@ -1715,16 +2350,45 @@ def __init__(__self__, *, :param str indexing_mode: Indicates the indexing mode. Possible values include: `consistent` and `none`. Defaults to `consistent`. :param Sequence['SqlContainerIndexingPolicySpatialIndexArgs'] spatial_indices: One or more `spatial_index` blocks as defined below. """ + SqlContainerIndexingPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + composite_indices=composite_indices, + excluded_paths=excluded_paths, + included_paths=included_paths, + indexing_mode=indexing_mode, + spatial_indices=spatial_indices, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + composite_indices: Optional[Sequence['outputs.SqlContainerIndexingPolicyCompositeIndex']] = None, + excluded_paths: Optional[Sequence['outputs.SqlContainerIndexingPolicyExcludedPath']] = None, + included_paths: Optional[Sequence['outputs.SqlContainerIndexingPolicyIncludedPath']] = None, + indexing_mode: Optional[str] = None, + spatial_indices: Optional[Sequence['outputs.SqlContainerIndexingPolicySpatialIndex']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if composite_indices is None and 'compositeIndices' in kwargs: + composite_indices = kwargs['compositeIndices'] + if excluded_paths is None and 'excludedPaths' in kwargs: + excluded_paths = kwargs['excludedPaths'] + if included_paths is None and 'includedPaths' in kwargs: + included_paths = kwargs['includedPaths'] + if indexing_mode is None and 'indexingMode' in kwargs: + indexing_mode = kwargs['indexingMode'] + if spatial_indices is None and 'spatialIndices' in kwargs: + spatial_indices = kwargs['spatialIndices'] + if composite_indices is not None: - pulumi.set(__self__, "composite_indices", composite_indices) + _setter("composite_indices", composite_indices) if excluded_paths is not None: - pulumi.set(__self__, "excluded_paths", excluded_paths) + _setter("excluded_paths", excluded_paths) if included_paths is not None: - pulumi.set(__self__, "included_paths", included_paths) + _setter("included_paths", included_paths) if indexing_mode is not None: - pulumi.set(__self__, "indexing_mode", indexing_mode) + _setter("indexing_mode", indexing_mode) if spatial_indices is not None: - pulumi.set(__self__, "spatial_indices", spatial_indices) + _setter("spatial_indices", spatial_indices) @property @pulumi.getter(name="compositeIndices") @@ -1774,7 +2438,20 @@ def __init__(__self__, *, """ :param Sequence['SqlContainerIndexingPolicyCompositeIndexIndexArgs'] indices: One or more `index` blocks as defined below. """ - pulumi.set(__self__, "indices", indices) + SqlContainerIndexingPolicyCompositeIndex._configure( + lambda key, value: pulumi.set(__self__, key, value), + indices=indices, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + indices: Optional[Sequence['outputs.SqlContainerIndexingPolicyCompositeIndexIndex']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if indices is None: + raise TypeError("Missing 'indices' argument") + + _setter("indices", indices) @property @pulumi.getter @@ -1794,8 +2471,25 @@ def __init__(__self__, *, :param str order: Order of the index. Possible values are `Ascending` or `Descending`. :param str path: Path for which the indexing behaviour applies to. """ - pulumi.set(__self__, "order", order) - pulumi.set(__self__, "path", path) + SqlContainerIndexingPolicyCompositeIndexIndex._configure( + lambda key, value: pulumi.set(__self__, key, value), + order=order, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + order: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if order is None: + raise TypeError("Missing 'order' argument") + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("order", order) + _setter("path", path) @property @pulumi.getter @@ -1821,7 +2515,20 @@ def __init__(__self__, *, """ :param str path: Path that is excluded from indexing. """ - pulumi.set(__self__, "path", path) + SqlContainerIndexingPolicyExcludedPath._configure( + lambda key, value: pulumi.set(__self__, key, value), + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("path", path) @property @pulumi.getter @@ -1839,7 +2546,20 @@ def __init__(__self__, *, """ :param str path: Path for which the indexing behaviour applies to. """ - pulumi.set(__self__, "path", path) + SqlContainerIndexingPolicyIncludedPath._configure( + lambda key, value: pulumi.set(__self__, key, value), + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("path", path) @property @pulumi.getter @@ -1859,9 +2579,24 @@ def __init__(__self__, *, :param str path: Path for which the indexing behaviour applies to. According to the service design, all spatial types including `LineString`, `MultiPolygon`, `Point`, and `Polygon` will be applied to the path. :param Sequence[str] types: A set of spatial types of the path. """ - pulumi.set(__self__, "path", path) + SqlContainerIndexingPolicySpatialIndex._configure( + lambda key, value: pulumi.set(__self__, key, value), + path=path, + types=types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + path: Optional[str] = None, + types: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if path is None: + raise TypeError("Missing 'path' argument") + + _setter("path", path) if types is not None: - pulumi.set(__self__, "types", types) + _setter("types", types) @property @pulumi.getter @@ -1887,7 +2622,20 @@ def __init__(__self__, *, """ :param Sequence[str] paths: A list of paths to use for this unique key. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "paths", paths) + SqlContainerUniqueKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + paths=paths, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + paths: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if paths is None: + raise TypeError("Missing 'paths' argument") + + _setter("paths", paths) @property @pulumi.getter @@ -1922,8 +2670,21 @@ def __init__(__self__, *, """ :param int max_throughput: The maximum throughput of the SQL database (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + SqlDatabaseAutoscaleSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -1958,7 +2719,22 @@ def __init__(__self__, *, """ :param Sequence[str] data_actions: A list of data actions that are allowed for the Cosmos DB SQL Role Definition. """ - pulumi.set(__self__, "data_actions", data_actions) + SqlRoleDefinitionPermission._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_actions=data_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_actions: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_actions is None and 'dataActions' in kwargs: + data_actions = kwargs['dataActions'] + if data_actions is None: + raise TypeError("Missing 'data_actions' argument") + + _setter("data_actions", data_actions) @property @pulumi.getter(name="dataActions") @@ -1993,8 +2769,21 @@ def __init__(__self__, *, """ :param int max_throughput: The maximum throughput of the Table (RU/s). Must be between `1,000` and `1,000,000`. Must be set in increments of `1,000`. Conflicts with `throughput`. """ + TableAutoscaleSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is not None: - pulumi.set(__self__, "max_throughput", max_throughput) + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -2012,7 +2801,20 @@ def __init__(__self__, *, """ :param str name: Specifies the name of the CosmosDB Account. """ - pulumi.set(__self__, "name", name) + GetAccountCapabilityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -2034,9 +2836,36 @@ def __init__(__self__, *, :param int max_interval_in_seconds: The amount of staleness (in seconds) tolerated when the consistency level is Bounded Staleness. :param int max_staleness_prefix: The number of stale requests tolerated when the consistency level is Bounded Staleness. """ - pulumi.set(__self__, "consistency_level", consistency_level) - pulumi.set(__self__, "max_interval_in_seconds", max_interval_in_seconds) - pulumi.set(__self__, "max_staleness_prefix", max_staleness_prefix) + GetAccountConsistencyPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + consistency_level=consistency_level, + max_interval_in_seconds=max_interval_in_seconds, + max_staleness_prefix=max_staleness_prefix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consistency_level: Optional[str] = None, + max_interval_in_seconds: Optional[int] = None, + max_staleness_prefix: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consistency_level is None and 'consistencyLevel' in kwargs: + consistency_level = kwargs['consistencyLevel'] + if consistency_level is None: + raise TypeError("Missing 'consistency_level' argument") + if max_interval_in_seconds is None and 'maxIntervalInSeconds' in kwargs: + max_interval_in_seconds = kwargs['maxIntervalInSeconds'] + if max_interval_in_seconds is None: + raise TypeError("Missing 'max_interval_in_seconds' argument") + if max_staleness_prefix is None and 'maxStalenessPrefix' in kwargs: + max_staleness_prefix = kwargs['maxStalenessPrefix'] + if max_staleness_prefix is None: + raise TypeError("Missing 'max_staleness_prefix' argument") + + _setter("consistency_level", consistency_level) + _setter("max_interval_in_seconds", max_interval_in_seconds) + _setter("max_staleness_prefix", max_staleness_prefix) @property @pulumi.getter(name="consistencyLevel") @@ -2073,9 +2902,32 @@ def __init__(__self__, *, :param str id: The ID of the virtual network subnet. :param str location: The name of the Azure region hosting replicated data. """ - pulumi.set(__self__, "failover_priority", failover_priority) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "location", location) + GetAccountGeoLocationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + failover_priority=failover_priority, + id=id, + location=location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + failover_priority: Optional[int] = None, + id: Optional[str] = None, + location: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failover_priority is None and 'failoverPriority' in kwargs: + failover_priority = kwargs['failoverPriority'] + if failover_priority is None: + raise TypeError("Missing 'failover_priority' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if location is None: + raise TypeError("Missing 'location' argument") + + _setter("failover_priority", failover_priority) + _setter("id", id) + _setter("location", location) @property @pulumi.getter(name="failoverPriority") @@ -2106,7 +2958,20 @@ def __init__(__self__, *, """ :param str id: The ID of the virtual network subnet. """ - pulumi.set(__self__, "id", id) + GetAccountVirtualNetworkRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("id", id) @property @pulumi.getter @@ -2132,11 +2997,48 @@ def __init__(__self__, *, :param str id: The ID of the Cosmos DB Restorable Database Account. :param Sequence['GetRestorableDatabaseAccountsAccountRestorableLocationArgs'] restorable_locations: One or more `restorable_locations` blocks as defined below. """ - pulumi.set(__self__, "api_type", api_type) - pulumi.set(__self__, "creation_time", creation_time) - pulumi.set(__self__, "deletion_time", deletion_time) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "restorable_locations", restorable_locations) + GetRestorableDatabaseAccountsAccountResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_type=api_type, + creation_time=creation_time, + deletion_time=deletion_time, + id=id, + restorable_locations=restorable_locations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_type: Optional[str] = None, + creation_time: Optional[str] = None, + deletion_time: Optional[str] = None, + id: Optional[str] = None, + restorable_locations: Optional[Sequence['outputs.GetRestorableDatabaseAccountsAccountRestorableLocationResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_type is None and 'apiType' in kwargs: + api_type = kwargs['apiType'] + if api_type is None: + raise TypeError("Missing 'api_type' argument") + if creation_time is None and 'creationTime' in kwargs: + creation_time = kwargs['creationTime'] + if creation_time is None: + raise TypeError("Missing 'creation_time' argument") + if deletion_time is None and 'deletionTime' in kwargs: + deletion_time = kwargs['deletionTime'] + if deletion_time is None: + raise TypeError("Missing 'deletion_time' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if restorable_locations is None and 'restorableLocations' in kwargs: + restorable_locations = kwargs['restorableLocations'] + if restorable_locations is None: + raise TypeError("Missing 'restorable_locations' argument") + + _setter("api_type", api_type) + _setter("creation_time", creation_time) + _setter("deletion_time", deletion_time) + _setter("id", id) + _setter("restorable_locations", restorable_locations) @property @pulumi.getter(name="apiType") @@ -2192,10 +3094,41 @@ def __init__(__self__, *, :param str location: The location where the Cosmos DB Database Account. :param str regional_database_account_instance_id: The instance ID of the regional Cosmos DB Restorable Database Account. """ - pulumi.set(__self__, "creation_time", creation_time) - pulumi.set(__self__, "deletion_time", deletion_time) - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "regional_database_account_instance_id", regional_database_account_instance_id) + GetRestorableDatabaseAccountsAccountRestorableLocationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + creation_time=creation_time, + deletion_time=deletion_time, + location=location, + regional_database_account_instance_id=regional_database_account_instance_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + creation_time: Optional[str] = None, + deletion_time: Optional[str] = None, + location: Optional[str] = None, + regional_database_account_instance_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if creation_time is None and 'creationTime' in kwargs: + creation_time = kwargs['creationTime'] + if creation_time is None: + raise TypeError("Missing 'creation_time' argument") + if deletion_time is None and 'deletionTime' in kwargs: + deletion_time = kwargs['deletionTime'] + if deletion_time is None: + raise TypeError("Missing 'deletion_time' argument") + if location is None: + raise TypeError("Missing 'location' argument") + if regional_database_account_instance_id is None and 'regionalDatabaseAccountInstanceId' in kwargs: + regional_database_account_instance_id = kwargs['regionalDatabaseAccountInstanceId'] + if regional_database_account_instance_id is None: + raise TypeError("Missing 'regional_database_account_instance_id' argument") + + _setter("creation_time", creation_time) + _setter("deletion_time", deletion_time) + _setter("location", location) + _setter("regional_database_account_instance_id", regional_database_account_instance_id) @property @pulumi.getter(name="creationTime") @@ -2237,7 +3170,22 @@ def __init__(__self__, *, """ :param int max_throughput: The maximum throughput of the SQL database (RU/s). """ - pulumi.set(__self__, "max_throughput", max_throughput) + GetSqlDatabaseAutoscaleSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_throughput=max_throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_throughput: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_throughput is None and 'maxThroughput' in kwargs: + max_throughput = kwargs['maxThroughput'] + if max_throughput is None: + raise TypeError("Missing 'max_throughput' argument") + + _setter("max_throughput", max_throughput) @property @pulumi.getter(name="maxThroughput") @@ -2255,7 +3203,22 @@ def __init__(__self__, *, """ :param Sequence[str] data_actions: A list of data actions that are allowed for the Cosmos DB SQL Role Definition. """ - pulumi.set(__self__, "data_actions", data_actions) + GetSqlRoleDefinitionPermissionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_actions=data_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_actions: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_actions is None and 'dataActions' in kwargs: + data_actions = kwargs['dataActions'] + if data_actions is None: + raise TypeError("Missing 'data_actions' argument") + + _setter("data_actions", data_actions) @property @pulumi.getter(name="dataActions") diff --git a/sdk/python/pulumi_azure/cosmosdb/postgresql_cluster.py b/sdk/python/pulumi_azure/cosmosdb/postgresql_cluster.py index 2287c0f041..262804c069 100644 --- a/sdk/python/pulumi_azure/cosmosdb/postgresql_cluster.py +++ b/sdk/python/pulumi_azure/cosmosdb/postgresql_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -67,48 +67,151 @@ def __init__(__self__, *, :param pulumi.Input[str] sql_version: The major PostgreSQL version on the Azure Cosmos DB for PostgreSQL cluster. Possible values are `11`, `12`, `13`, `14`, `15` and `16`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Azure Cosmos DB for PostgreSQL Cluster. """ - pulumi.set(__self__, "coordinator_storage_quota_in_mb", coordinator_storage_quota_in_mb) - pulumi.set(__self__, "coordinator_vcore_count", coordinator_vcore_count) - pulumi.set(__self__, "node_count", node_count) - pulumi.set(__self__, "resource_group_name", resource_group_name) + PostgresqlClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + coordinator_storage_quota_in_mb=coordinator_storage_quota_in_mb, + coordinator_vcore_count=coordinator_vcore_count, + node_count=node_count, + resource_group_name=resource_group_name, + administrator_login_password=administrator_login_password, + citus_version=citus_version, + coordinator_public_ip_access_enabled=coordinator_public_ip_access_enabled, + coordinator_server_edition=coordinator_server_edition, + ha_enabled=ha_enabled, + location=location, + maintenance_window=maintenance_window, + name=name, + node_public_ip_access_enabled=node_public_ip_access_enabled, + node_server_edition=node_server_edition, + node_storage_quota_in_mb=node_storage_quota_in_mb, + node_vcores=node_vcores, + point_in_time_in_utc=point_in_time_in_utc, + preferred_primary_zone=preferred_primary_zone, + shards_on_coordinator_enabled=shards_on_coordinator_enabled, + source_location=source_location, + source_resource_id=source_resource_id, + sql_version=sql_version, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + coordinator_storage_quota_in_mb: Optional[pulumi.Input[int]] = None, + coordinator_vcore_count: Optional[pulumi.Input[int]] = None, + node_count: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + citus_version: Optional[pulumi.Input[str]] = None, + coordinator_public_ip_access_enabled: Optional[pulumi.Input[bool]] = None, + coordinator_server_edition: Optional[pulumi.Input[str]] = None, + ha_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_window: Optional[pulumi.Input['PostgresqlClusterMaintenanceWindowArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + node_public_ip_access_enabled: Optional[pulumi.Input[bool]] = None, + node_server_edition: Optional[pulumi.Input[str]] = None, + node_storage_quota_in_mb: Optional[pulumi.Input[int]] = None, + node_vcores: Optional[pulumi.Input[int]] = None, + point_in_time_in_utc: Optional[pulumi.Input[str]] = None, + preferred_primary_zone: Optional[pulumi.Input[str]] = None, + shards_on_coordinator_enabled: Optional[pulumi.Input[bool]] = None, + source_location: Optional[pulumi.Input[str]] = None, + source_resource_id: Optional[pulumi.Input[str]] = None, + sql_version: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if coordinator_storage_quota_in_mb is None and 'coordinatorStorageQuotaInMb' in kwargs: + coordinator_storage_quota_in_mb = kwargs['coordinatorStorageQuotaInMb'] + if coordinator_storage_quota_in_mb is None: + raise TypeError("Missing 'coordinator_storage_quota_in_mb' argument") + if coordinator_vcore_count is None and 'coordinatorVcoreCount' in kwargs: + coordinator_vcore_count = kwargs['coordinatorVcoreCount'] + if coordinator_vcore_count is None: + raise TypeError("Missing 'coordinator_vcore_count' argument") + if node_count is None and 'nodeCount' in kwargs: + node_count = kwargs['nodeCount'] + if node_count is None: + raise TypeError("Missing 'node_count' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if citus_version is None and 'citusVersion' in kwargs: + citus_version = kwargs['citusVersion'] + if coordinator_public_ip_access_enabled is None and 'coordinatorPublicIpAccessEnabled' in kwargs: + coordinator_public_ip_access_enabled = kwargs['coordinatorPublicIpAccessEnabled'] + if coordinator_server_edition is None and 'coordinatorServerEdition' in kwargs: + coordinator_server_edition = kwargs['coordinatorServerEdition'] + if ha_enabled is None and 'haEnabled' in kwargs: + ha_enabled = kwargs['haEnabled'] + if maintenance_window is None and 'maintenanceWindow' in kwargs: + maintenance_window = kwargs['maintenanceWindow'] + if node_public_ip_access_enabled is None and 'nodePublicIpAccessEnabled' in kwargs: + node_public_ip_access_enabled = kwargs['nodePublicIpAccessEnabled'] + if node_server_edition is None and 'nodeServerEdition' in kwargs: + node_server_edition = kwargs['nodeServerEdition'] + if node_storage_quota_in_mb is None and 'nodeStorageQuotaInMb' in kwargs: + node_storage_quota_in_mb = kwargs['nodeStorageQuotaInMb'] + if node_vcores is None and 'nodeVcores' in kwargs: + node_vcores = kwargs['nodeVcores'] + if point_in_time_in_utc is None and 'pointInTimeInUtc' in kwargs: + point_in_time_in_utc = kwargs['pointInTimeInUtc'] + if preferred_primary_zone is None and 'preferredPrimaryZone' in kwargs: + preferred_primary_zone = kwargs['preferredPrimaryZone'] + if shards_on_coordinator_enabled is None and 'shardsOnCoordinatorEnabled' in kwargs: + shards_on_coordinator_enabled = kwargs['shardsOnCoordinatorEnabled'] + if source_location is None and 'sourceLocation' in kwargs: + source_location = kwargs['sourceLocation'] + if source_resource_id is None and 'sourceResourceId' in kwargs: + source_resource_id = kwargs['sourceResourceId'] + if sql_version is None and 'sqlVersion' in kwargs: + sql_version = kwargs['sqlVersion'] + + _setter("coordinator_storage_quota_in_mb", coordinator_storage_quota_in_mb) + _setter("coordinator_vcore_count", coordinator_vcore_count) + _setter("node_count", node_count) + _setter("resource_group_name", resource_group_name) if administrator_login_password is not None: - pulumi.set(__self__, "administrator_login_password", administrator_login_password) + _setter("administrator_login_password", administrator_login_password) if citus_version is not None: - pulumi.set(__self__, "citus_version", citus_version) + _setter("citus_version", citus_version) if coordinator_public_ip_access_enabled is not None: - pulumi.set(__self__, "coordinator_public_ip_access_enabled", coordinator_public_ip_access_enabled) + _setter("coordinator_public_ip_access_enabled", coordinator_public_ip_access_enabled) if coordinator_server_edition is not None: - pulumi.set(__self__, "coordinator_server_edition", coordinator_server_edition) + _setter("coordinator_server_edition", coordinator_server_edition) if ha_enabled is not None: - pulumi.set(__self__, "ha_enabled", ha_enabled) + _setter("ha_enabled", ha_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_window is not None: - pulumi.set(__self__, "maintenance_window", maintenance_window) + _setter("maintenance_window", maintenance_window) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_public_ip_access_enabled is not None: - pulumi.set(__self__, "node_public_ip_access_enabled", node_public_ip_access_enabled) + _setter("node_public_ip_access_enabled", node_public_ip_access_enabled) if node_server_edition is not None: - pulumi.set(__self__, "node_server_edition", node_server_edition) + _setter("node_server_edition", node_server_edition) if node_storage_quota_in_mb is not None: - pulumi.set(__self__, "node_storage_quota_in_mb", node_storage_quota_in_mb) + _setter("node_storage_quota_in_mb", node_storage_quota_in_mb) if node_vcores is not None: - pulumi.set(__self__, "node_vcores", node_vcores) + _setter("node_vcores", node_vcores) if point_in_time_in_utc is not None: - pulumi.set(__self__, "point_in_time_in_utc", point_in_time_in_utc) + _setter("point_in_time_in_utc", point_in_time_in_utc) if preferred_primary_zone is not None: - pulumi.set(__self__, "preferred_primary_zone", preferred_primary_zone) + _setter("preferred_primary_zone", preferred_primary_zone) if shards_on_coordinator_enabled is not None: - pulumi.set(__self__, "shards_on_coordinator_enabled", shards_on_coordinator_enabled) + _setter("shards_on_coordinator_enabled", shards_on_coordinator_enabled) if source_location is not None: - pulumi.set(__self__, "source_location", source_location) + _setter("source_location", source_location) if source_resource_id is not None: - pulumi.set(__self__, "source_resource_id", source_resource_id) + _setter("source_resource_id", source_resource_id) if sql_version is not None: - pulumi.set(__self__, "sql_version", sql_version) + _setter("sql_version", sql_version) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="coordinatorStorageQuotaInMb") @@ -445,54 +548,153 @@ def __init__(__self__, *, :param pulumi.Input[str] sql_version: The major PostgreSQL version on the Azure Cosmos DB for PostgreSQL cluster. Possible values are `11`, `12`, `13`, `14`, `15` and `16`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Azure Cosmos DB for PostgreSQL Cluster. """ + _PostgresqlClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login_password=administrator_login_password, + citus_version=citus_version, + coordinator_public_ip_access_enabled=coordinator_public_ip_access_enabled, + coordinator_server_edition=coordinator_server_edition, + coordinator_storage_quota_in_mb=coordinator_storage_quota_in_mb, + coordinator_vcore_count=coordinator_vcore_count, + earliest_restore_time=earliest_restore_time, + ha_enabled=ha_enabled, + location=location, + maintenance_window=maintenance_window, + name=name, + node_count=node_count, + node_public_ip_access_enabled=node_public_ip_access_enabled, + node_server_edition=node_server_edition, + node_storage_quota_in_mb=node_storage_quota_in_mb, + node_vcores=node_vcores, + point_in_time_in_utc=point_in_time_in_utc, + preferred_primary_zone=preferred_primary_zone, + resource_group_name=resource_group_name, + shards_on_coordinator_enabled=shards_on_coordinator_enabled, + source_location=source_location, + source_resource_id=source_resource_id, + sql_version=sql_version, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login_password: Optional[pulumi.Input[str]] = None, + citus_version: Optional[pulumi.Input[str]] = None, + coordinator_public_ip_access_enabled: Optional[pulumi.Input[bool]] = None, + coordinator_server_edition: Optional[pulumi.Input[str]] = None, + coordinator_storage_quota_in_mb: Optional[pulumi.Input[int]] = None, + coordinator_vcore_count: Optional[pulumi.Input[int]] = None, + earliest_restore_time: Optional[pulumi.Input[str]] = None, + ha_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_window: Optional[pulumi.Input['PostgresqlClusterMaintenanceWindowArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + node_count: Optional[pulumi.Input[int]] = None, + node_public_ip_access_enabled: Optional[pulumi.Input[bool]] = None, + node_server_edition: Optional[pulumi.Input[str]] = None, + node_storage_quota_in_mb: Optional[pulumi.Input[int]] = None, + node_vcores: Optional[pulumi.Input[int]] = None, + point_in_time_in_utc: Optional[pulumi.Input[str]] = None, + preferred_primary_zone: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + shards_on_coordinator_enabled: Optional[pulumi.Input[bool]] = None, + source_location: Optional[pulumi.Input[str]] = None, + source_resource_id: Optional[pulumi.Input[str]] = None, + sql_version: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if citus_version is None and 'citusVersion' in kwargs: + citus_version = kwargs['citusVersion'] + if coordinator_public_ip_access_enabled is None and 'coordinatorPublicIpAccessEnabled' in kwargs: + coordinator_public_ip_access_enabled = kwargs['coordinatorPublicIpAccessEnabled'] + if coordinator_server_edition is None and 'coordinatorServerEdition' in kwargs: + coordinator_server_edition = kwargs['coordinatorServerEdition'] + if coordinator_storage_quota_in_mb is None and 'coordinatorStorageQuotaInMb' in kwargs: + coordinator_storage_quota_in_mb = kwargs['coordinatorStorageQuotaInMb'] + if coordinator_vcore_count is None and 'coordinatorVcoreCount' in kwargs: + coordinator_vcore_count = kwargs['coordinatorVcoreCount'] + if earliest_restore_time is None and 'earliestRestoreTime' in kwargs: + earliest_restore_time = kwargs['earliestRestoreTime'] + if ha_enabled is None and 'haEnabled' in kwargs: + ha_enabled = kwargs['haEnabled'] + if maintenance_window is None and 'maintenanceWindow' in kwargs: + maintenance_window = kwargs['maintenanceWindow'] + if node_count is None and 'nodeCount' in kwargs: + node_count = kwargs['nodeCount'] + if node_public_ip_access_enabled is None and 'nodePublicIpAccessEnabled' in kwargs: + node_public_ip_access_enabled = kwargs['nodePublicIpAccessEnabled'] + if node_server_edition is None and 'nodeServerEdition' in kwargs: + node_server_edition = kwargs['nodeServerEdition'] + if node_storage_quota_in_mb is None and 'nodeStorageQuotaInMb' in kwargs: + node_storage_quota_in_mb = kwargs['nodeStorageQuotaInMb'] + if node_vcores is None and 'nodeVcores' in kwargs: + node_vcores = kwargs['nodeVcores'] + if point_in_time_in_utc is None and 'pointInTimeInUtc' in kwargs: + point_in_time_in_utc = kwargs['pointInTimeInUtc'] + if preferred_primary_zone is None and 'preferredPrimaryZone' in kwargs: + preferred_primary_zone = kwargs['preferredPrimaryZone'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if shards_on_coordinator_enabled is None and 'shardsOnCoordinatorEnabled' in kwargs: + shards_on_coordinator_enabled = kwargs['shardsOnCoordinatorEnabled'] + if source_location is None and 'sourceLocation' in kwargs: + source_location = kwargs['sourceLocation'] + if source_resource_id is None and 'sourceResourceId' in kwargs: + source_resource_id = kwargs['sourceResourceId'] + if sql_version is None and 'sqlVersion' in kwargs: + sql_version = kwargs['sqlVersion'] + if administrator_login_password is not None: - pulumi.set(__self__, "administrator_login_password", administrator_login_password) + _setter("administrator_login_password", administrator_login_password) if citus_version is not None: - pulumi.set(__self__, "citus_version", citus_version) + _setter("citus_version", citus_version) if coordinator_public_ip_access_enabled is not None: - pulumi.set(__self__, "coordinator_public_ip_access_enabled", coordinator_public_ip_access_enabled) + _setter("coordinator_public_ip_access_enabled", coordinator_public_ip_access_enabled) if coordinator_server_edition is not None: - pulumi.set(__self__, "coordinator_server_edition", coordinator_server_edition) + _setter("coordinator_server_edition", coordinator_server_edition) if coordinator_storage_quota_in_mb is not None: - pulumi.set(__self__, "coordinator_storage_quota_in_mb", coordinator_storage_quota_in_mb) + _setter("coordinator_storage_quota_in_mb", coordinator_storage_quota_in_mb) if coordinator_vcore_count is not None: - pulumi.set(__self__, "coordinator_vcore_count", coordinator_vcore_count) + _setter("coordinator_vcore_count", coordinator_vcore_count) if earliest_restore_time is not None: - pulumi.set(__self__, "earliest_restore_time", earliest_restore_time) + _setter("earliest_restore_time", earliest_restore_time) if ha_enabled is not None: - pulumi.set(__self__, "ha_enabled", ha_enabled) + _setter("ha_enabled", ha_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_window is not None: - pulumi.set(__self__, "maintenance_window", maintenance_window) + _setter("maintenance_window", maintenance_window) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_count is not None: - pulumi.set(__self__, "node_count", node_count) + _setter("node_count", node_count) if node_public_ip_access_enabled is not None: - pulumi.set(__self__, "node_public_ip_access_enabled", node_public_ip_access_enabled) + _setter("node_public_ip_access_enabled", node_public_ip_access_enabled) if node_server_edition is not None: - pulumi.set(__self__, "node_server_edition", node_server_edition) + _setter("node_server_edition", node_server_edition) if node_storage_quota_in_mb is not None: - pulumi.set(__self__, "node_storage_quota_in_mb", node_storage_quota_in_mb) + _setter("node_storage_quota_in_mb", node_storage_quota_in_mb) if node_vcores is not None: - pulumi.set(__self__, "node_vcores", node_vcores) + _setter("node_vcores", node_vcores) if point_in_time_in_utc is not None: - pulumi.set(__self__, "point_in_time_in_utc", point_in_time_in_utc) + _setter("point_in_time_in_utc", point_in_time_in_utc) if preferred_primary_zone is not None: - pulumi.set(__self__, "preferred_primary_zone", preferred_primary_zone) + _setter("preferred_primary_zone", preferred_primary_zone) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if shards_on_coordinator_enabled is not None: - pulumi.set(__self__, "shards_on_coordinator_enabled", shards_on_coordinator_enabled) + _setter("shards_on_coordinator_enabled", shards_on_coordinator_enabled) if source_location is not None: - pulumi.set(__self__, "source_location", source_location) + _setter("source_location", source_location) if source_resource_id is not None: - pulumi.set(__self__, "source_resource_id", source_resource_id) + _setter("source_resource_id", source_resource_id) if sql_version is not None: - pulumi.set(__self__, "sql_version", sql_version) + _setter("sql_version", sql_version) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="administratorLoginPassword") @@ -912,6 +1114,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PostgresqlClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -961,6 +1167,11 @@ def _internal_init(__self__, __props__.__dict__["coordinator_vcore_count"] = coordinator_vcore_count __props__.__dict__["ha_enabled"] = ha_enabled __props__.__dict__["location"] = location + if maintenance_window is not None and not isinstance(maintenance_window, PostgresqlClusterMaintenanceWindowArgs): + maintenance_window = maintenance_window or {} + def _setter(key, value): + maintenance_window[key] = value + PostgresqlClusterMaintenanceWindowArgs._configure(_setter, **maintenance_window) __props__.__dict__["maintenance_window"] = maintenance_window __props__.__dict__["name"] = name if node_count is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/cosmosdb/postgresql_coordinator_configuration.py b/sdk/python/pulumi_azure/cosmosdb/postgresql_coordinator_configuration.py index e89e306c24..278f5dd671 100644 --- a/sdk/python/pulumi_azure/cosmosdb/postgresql_coordinator_configuration.py +++ b/sdk/python/pulumi_azure/cosmosdb/postgresql_coordinator_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PostgresqlCoordinatorConfigurationArgs', 'PostgresqlCoordinatorConfiguration'] @@ -23,10 +23,31 @@ def __init__(__self__, *, :param pulumi.Input[str] value: The value of the Coordinator Configuration on Azure Cosmos DB for PostgreSQL Cluster. :param pulumi.Input[str] name: The name of the Coordinator Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cluster_id", cluster_id) - pulumi.set(__self__, "value", value) + PostgresqlCoordinatorConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + value=value, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if cluster_id is None: + raise TypeError("Missing 'cluster_id' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("cluster_id", cluster_id) + _setter("value", value) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="clusterId") @@ -77,12 +98,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Coordinator Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created. :param pulumi.Input[str] value: The value of the Coordinator Configuration on Azure Cosmos DB for PostgreSQL Cluster. """ + _PostgresqlCoordinatorConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if cluster_id is not None: - pulumi.set(__self__, "cluster_id", cluster_id) + _setter("cluster_id", cluster_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="clusterId") @@ -216,6 +254,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PostgresqlCoordinatorConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/postgresql_firewall_rule.py b/sdk/python/pulumi_azure/cosmosdb/postgresql_firewall_rule.py index 1f91581770..3bd554f513 100644 --- a/sdk/python/pulumi_azure/cosmosdb/postgresql_firewall_rule.py +++ b/sdk/python/pulumi_azure/cosmosdb/postgresql_firewall_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PostgresqlFirewallRuleArgs', 'PostgresqlFirewallRule'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] start_ip_address: The start IP address of the Azure Cosmos DB for PostgreSQL Firewall Rule. :param pulumi.Input[str] name: The name which should be used for the Azure Cosmos DB for PostgreSQL Firewall Rule. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cluster_id", cluster_id) - pulumi.set(__self__, "end_ip_address", end_ip_address) - pulumi.set(__self__, "start_ip_address", start_ip_address) + PostgresqlFirewallRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + end_ip_address=end_ip_address, + start_ip_address=start_ip_address, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + end_ip_address: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if cluster_id is None: + raise TypeError("Missing 'cluster_id' argument") + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if end_ip_address is None: + raise TypeError("Missing 'end_ip_address' argument") + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if start_ip_address is None: + raise TypeError("Missing 'start_ip_address' argument") + + _setter("cluster_id", cluster_id) + _setter("end_ip_address", end_ip_address) + _setter("start_ip_address", start_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="clusterId") @@ -94,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for the Azure Cosmos DB for PostgreSQL Firewall Rule. Changing this forces a new resource to be created. :param pulumi.Input[str] start_ip_address: The start IP address of the Azure Cosmos DB for PostgreSQL Firewall Rule. """ + _PostgresqlFirewallRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + end_ip_address=end_ip_address, + name=name, + start_ip_address=start_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + end_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if cluster_id is not None: - pulumi.set(__self__, "cluster_id", cluster_id) + _setter("cluster_id", cluster_id) if end_ip_address is not None: - pulumi.set(__self__, "end_ip_address", end_ip_address) + _setter("end_ip_address", end_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if start_ip_address is not None: - pulumi.set(__self__, "start_ip_address", start_ip_address) + _setter("start_ip_address", start_ip_address) @property @pulumi.getter(name="clusterId") @@ -247,6 +299,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PostgresqlFirewallRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/postgresql_node_configuration.py b/sdk/python/pulumi_azure/cosmosdb/postgresql_node_configuration.py index 29ec54ab4a..840cce8df0 100644 --- a/sdk/python/pulumi_azure/cosmosdb/postgresql_node_configuration.py +++ b/sdk/python/pulumi_azure/cosmosdb/postgresql_node_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PostgresqlNodeConfigurationArgs', 'PostgresqlNodeConfiguration'] @@ -23,10 +23,31 @@ def __init__(__self__, *, :param pulumi.Input[str] value: The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. :param pulumi.Input[str] name: The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cluster_id", cluster_id) - pulumi.set(__self__, "value", value) + PostgresqlNodeConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + value=value, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if cluster_id is None: + raise TypeError("Missing 'cluster_id' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("cluster_id", cluster_id) + _setter("value", value) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="clusterId") @@ -77,12 +98,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. Changing this forces a new resource to be created. :param pulumi.Input[str] value: The value of the Node Configuration on Azure Cosmos DB for PostgreSQL Cluster. """ + _PostgresqlNodeConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if cluster_id is not None: - pulumi.set(__self__, "cluster_id", cluster_id) + _setter("cluster_id", cluster_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="clusterId") @@ -216,6 +254,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PostgresqlNodeConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/postgresql_role.py b/sdk/python/pulumi_azure/cosmosdb/postgresql_role.py index 04db429622..0273503485 100644 --- a/sdk/python/pulumi_azure/cosmosdb/postgresql_role.py +++ b/sdk/python/pulumi_azure/cosmosdb/postgresql_role.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PostgresqlRoleArgs', 'PostgresqlRole'] @@ -23,10 +23,31 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password of the Azure Cosmos DB for PostgreSQL Role. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name which should be used for this Azure Cosmos DB for PostgreSQL Role. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cluster_id", cluster_id) - pulumi.set(__self__, "password", password) + PostgresqlRoleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + password=password, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if cluster_id is None: + raise TypeError("Missing 'cluster_id' argument") + if password is None: + raise TypeError("Missing 'password' argument") + + _setter("cluster_id", cluster_id) + _setter("password", password) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="clusterId") @@ -77,12 +98,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Azure Cosmos DB for PostgreSQL Role. Changing this forces a new resource to be created. :param pulumi.Input[str] password: The password of the Azure Cosmos DB for PostgreSQL Role. Changing this forces a new resource to be created. """ + _PostgresqlRoleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + name=name, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if cluster_id is not None: - pulumi.set(__self__, "cluster_id", cluster_id) + _setter("cluster_id", cluster_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter(name="clusterId") @@ -212,6 +250,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PostgresqlRoleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/sql_container.py b/sdk/python/pulumi_azure/cosmosdb/sql_container.py index 83d3f83480..f09c1781e5 100644 --- a/sdk/python/pulumi_azure/cosmosdb/sql_container.py +++ b/sdk/python/pulumi_azure/cosmosdb/sql_container.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,28 +47,93 @@ def __init__(__self__, *, :param pulumi.Input[int] throughput: The throughput of SQL container (RU/s). Must be set in increments of `100`. The minimum value is `400`. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply. :param pulumi.Input[Sequence[pulumi.Input['SqlContainerUniqueKeyArgs']]] unique_keys: One or more `unique_key` blocks as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "partition_key_path", partition_key_path) - pulumi.set(__self__, "resource_group_name", resource_group_name) + SqlContainerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + database_name=database_name, + partition_key_path=partition_key_path, + resource_group_name=resource_group_name, + analytical_storage_ttl=analytical_storage_ttl, + autoscale_settings=autoscale_settings, + conflict_resolution_policy=conflict_resolution_policy, + default_ttl=default_ttl, + indexing_policy=indexing_policy, + name=name, + partition_key_version=partition_key_version, + throughput=throughput, + unique_keys=unique_keys, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + partition_key_path: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + analytical_storage_ttl: Optional[pulumi.Input[int]] = None, + autoscale_settings: Optional[pulumi.Input['SqlContainerAutoscaleSettingsArgs']] = None, + conflict_resolution_policy: Optional[pulumi.Input['SqlContainerConflictResolutionPolicyArgs']] = None, + default_ttl: Optional[pulumi.Input[int]] = None, + indexing_policy: Optional[pulumi.Input['SqlContainerIndexingPolicyArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key_version: Optional[pulumi.Input[int]] = None, + throughput: Optional[pulumi.Input[int]] = None, + unique_keys: Optional[pulumi.Input[Sequence[pulumi.Input['SqlContainerUniqueKeyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if partition_key_path is None and 'partitionKeyPath' in kwargs: + partition_key_path = kwargs['partitionKeyPath'] + if partition_key_path is None: + raise TypeError("Missing 'partition_key_path' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if analytical_storage_ttl is None and 'analyticalStorageTtl' in kwargs: + analytical_storage_ttl = kwargs['analyticalStorageTtl'] + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + if conflict_resolution_policy is None and 'conflictResolutionPolicy' in kwargs: + conflict_resolution_policy = kwargs['conflictResolutionPolicy'] + if default_ttl is None and 'defaultTtl' in kwargs: + default_ttl = kwargs['defaultTtl'] + if indexing_policy is None and 'indexingPolicy' in kwargs: + indexing_policy = kwargs['indexingPolicy'] + if partition_key_version is None and 'partitionKeyVersion' in kwargs: + partition_key_version = kwargs['partitionKeyVersion'] + if unique_keys is None and 'uniqueKeys' in kwargs: + unique_keys = kwargs['uniqueKeys'] + + _setter("account_name", account_name) + _setter("database_name", database_name) + _setter("partition_key_path", partition_key_path) + _setter("resource_group_name", resource_group_name) if analytical_storage_ttl is not None: - pulumi.set(__self__, "analytical_storage_ttl", analytical_storage_ttl) + _setter("analytical_storage_ttl", analytical_storage_ttl) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if conflict_resolution_policy is not None: - pulumi.set(__self__, "conflict_resolution_policy", conflict_resolution_policy) + _setter("conflict_resolution_policy", conflict_resolution_policy) if default_ttl is not None: - pulumi.set(__self__, "default_ttl", default_ttl) + _setter("default_ttl", default_ttl) if indexing_policy is not None: - pulumi.set(__self__, "indexing_policy", indexing_policy) + _setter("indexing_policy", indexing_policy) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key_version is not None: - pulumi.set(__self__, "partition_key_version", partition_key_version) + _setter("partition_key_version", partition_key_version) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) if unique_keys is not None: - pulumi.set(__self__, "unique_keys", unique_keys) + _setter("unique_keys", unique_keys) @property @pulumi.getter(name="accountName") @@ -263,32 +328,89 @@ def __init__(__self__, *, :param pulumi.Input[int] throughput: The throughput of SQL container (RU/s). Must be set in increments of `100`. The minimum value is `400`. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply. :param pulumi.Input[Sequence[pulumi.Input['SqlContainerUniqueKeyArgs']]] unique_keys: One or more `unique_key` blocks as defined below. Changing this forces a new resource to be created. """ + _SqlContainerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + analytical_storage_ttl=analytical_storage_ttl, + autoscale_settings=autoscale_settings, + conflict_resolution_policy=conflict_resolution_policy, + database_name=database_name, + default_ttl=default_ttl, + indexing_policy=indexing_policy, + name=name, + partition_key_path=partition_key_path, + partition_key_version=partition_key_version, + resource_group_name=resource_group_name, + throughput=throughput, + unique_keys=unique_keys, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + analytical_storage_ttl: Optional[pulumi.Input[int]] = None, + autoscale_settings: Optional[pulumi.Input['SqlContainerAutoscaleSettingsArgs']] = None, + conflict_resolution_policy: Optional[pulumi.Input['SqlContainerConflictResolutionPolicyArgs']] = None, + database_name: Optional[pulumi.Input[str]] = None, + default_ttl: Optional[pulumi.Input[int]] = None, + indexing_policy: Optional[pulumi.Input['SqlContainerIndexingPolicyArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key_path: Optional[pulumi.Input[str]] = None, + partition_key_version: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + unique_keys: Optional[pulumi.Input[Sequence[pulumi.Input['SqlContainerUniqueKeyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if analytical_storage_ttl is None and 'analyticalStorageTtl' in kwargs: + analytical_storage_ttl = kwargs['analyticalStorageTtl'] + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + if conflict_resolution_policy is None and 'conflictResolutionPolicy' in kwargs: + conflict_resolution_policy = kwargs['conflictResolutionPolicy'] + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if default_ttl is None and 'defaultTtl' in kwargs: + default_ttl = kwargs['defaultTtl'] + if indexing_policy is None and 'indexingPolicy' in kwargs: + indexing_policy = kwargs['indexingPolicy'] + if partition_key_path is None and 'partitionKeyPath' in kwargs: + partition_key_path = kwargs['partitionKeyPath'] + if partition_key_version is None and 'partitionKeyVersion' in kwargs: + partition_key_version = kwargs['partitionKeyVersion'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if unique_keys is None and 'uniqueKeys' in kwargs: + unique_keys = kwargs['uniqueKeys'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if analytical_storage_ttl is not None: - pulumi.set(__self__, "analytical_storage_ttl", analytical_storage_ttl) + _setter("analytical_storage_ttl", analytical_storage_ttl) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if conflict_resolution_policy is not None: - pulumi.set(__self__, "conflict_resolution_policy", conflict_resolution_policy) + _setter("conflict_resolution_policy", conflict_resolution_policy) if database_name is not None: - pulumi.set(__self__, "database_name", database_name) + _setter("database_name", database_name) if default_ttl is not None: - pulumi.set(__self__, "default_ttl", default_ttl) + _setter("default_ttl", default_ttl) if indexing_policy is not None: - pulumi.set(__self__, "indexing_policy", indexing_policy) + _setter("indexing_policy", indexing_policy) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key_path is not None: - pulumi.set(__self__, "partition_key_path", partition_key_path) + _setter("partition_key_path", partition_key_path) if partition_key_version is not None: - pulumi.set(__self__, "partition_key_version", partition_key_version) + _setter("partition_key_version", partition_key_version) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) if unique_keys is not None: - pulumi.set(__self__, "unique_keys", unique_keys) + _setter("unique_keys", unique_keys) @property @pulumi.getter(name="accountName") @@ -604,6 +726,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlContainerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -635,12 +761,27 @@ def _internal_init(__self__, raise TypeError("Missing required property 'account_name'") __props__.__dict__["account_name"] = account_name __props__.__dict__["analytical_storage_ttl"] = analytical_storage_ttl + if autoscale_settings is not None and not isinstance(autoscale_settings, SqlContainerAutoscaleSettingsArgs): + autoscale_settings = autoscale_settings or {} + def _setter(key, value): + autoscale_settings[key] = value + SqlContainerAutoscaleSettingsArgs._configure(_setter, **autoscale_settings) __props__.__dict__["autoscale_settings"] = autoscale_settings + if conflict_resolution_policy is not None and not isinstance(conflict_resolution_policy, SqlContainerConflictResolutionPolicyArgs): + conflict_resolution_policy = conflict_resolution_policy or {} + def _setter(key, value): + conflict_resolution_policy[key] = value + SqlContainerConflictResolutionPolicyArgs._configure(_setter, **conflict_resolution_policy) __props__.__dict__["conflict_resolution_policy"] = conflict_resolution_policy if database_name is None and not opts.urn: raise TypeError("Missing required property 'database_name'") __props__.__dict__["database_name"] = database_name __props__.__dict__["default_ttl"] = default_ttl + if indexing_policy is not None and not isinstance(indexing_policy, SqlContainerIndexingPolicyArgs): + indexing_policy = indexing_policy or {} + def _setter(key, value): + indexing_policy[key] = value + SqlContainerIndexingPolicyArgs._configure(_setter, **indexing_policy) __props__.__dict__["indexing_policy"] = indexing_policy __props__.__dict__["name"] = name if partition_key_path is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/cosmosdb/sql_database.py b/sdk/python/pulumi_azure/cosmosdb/sql_database.py index bfc2dac29a..01f6f30bb8 100644 --- a/sdk/python/pulumi_azure/cosmosdb/sql_database.py +++ b/sdk/python/pulumi_azure/cosmosdb/sql_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -30,14 +30,43 @@ def __init__(__self__, *, > **Note:** Switching between autoscale and manual throughput is not supported via this provider and must be completed via the Azure Portal and refreshed. :param pulumi.Input[str] name: Specifies the name of the Cosmos DB SQL Database. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + SqlDatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + resource_group_name=resource_group_name, + autoscale_settings=autoscale_settings, + name=name, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + autoscale_settings: Optional[pulumi.Input['SqlDatabaseAutoscaleSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + + _setter("account_name", account_name) + _setter("resource_group_name", resource_group_name) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="accountName") @@ -116,16 +145,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Cosmos DB SQL Database. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. """ + _SqlDatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + autoscale_settings=autoscale_settings, + name=name, + resource_group_name=resource_group_name, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + autoscale_settings: Optional[pulumi.Input['SqlDatabaseAutoscaleSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="accountName") @@ -273,6 +327,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlDatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -295,6 +353,11 @@ def _internal_init(__self__, if account_name is None and not opts.urn: raise TypeError("Missing required property 'account_name'") __props__.__dict__["account_name"] = account_name + if autoscale_settings is not None and not isinstance(autoscale_settings, SqlDatabaseAutoscaleSettingsArgs): + autoscale_settings = autoscale_settings or {} + def _setter(key, value): + autoscale_settings[key] = value + SqlDatabaseAutoscaleSettingsArgs._configure(_setter, **autoscale_settings) __props__.__dict__["autoscale_settings"] = autoscale_settings __props__.__dict__["name"] = name if resource_group_name is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/cosmosdb/sql_dedicated_gateway.py b/sdk/python/pulumi_azure/cosmosdb/sql_dedicated_gateway.py index 7c832fd661..f1f88b9a2f 100644 --- a/sdk/python/pulumi_azure/cosmosdb/sql_dedicated_gateway.py +++ b/sdk/python/pulumi_azure/cosmosdb/sql_dedicated_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SqlDedicatedGatewayArgs', 'SqlDedicatedGateway'] @@ -23,9 +23,36 @@ def __init__(__self__, *, :param pulumi.Input[int] instance_count: The instance count for the CosmosDB SQL Dedicated Gateway. Possible value is between `1` and `5`. :param pulumi.Input[str] instance_size: The instance size for the CosmosDB SQL Dedicated Gateway. Changing this forces a new resource to be created. Possible values are `Cosmos.D4s`, `Cosmos.D8s` and `Cosmos.D16s`. """ - pulumi.set(__self__, "cosmosdb_account_id", cosmosdb_account_id) - pulumi.set(__self__, "instance_count", instance_count) - pulumi.set(__self__, "instance_size", instance_size) + SqlDedicatedGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cosmosdb_account_id=cosmosdb_account_id, + instance_count=instance_count, + instance_size=instance_size, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cosmosdb_account_id: Optional[pulumi.Input[str]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + instance_size: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cosmosdb_account_id is None and 'cosmosdbAccountId' in kwargs: + cosmosdb_account_id = kwargs['cosmosdbAccountId'] + if cosmosdb_account_id is None: + raise TypeError("Missing 'cosmosdb_account_id' argument") + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if instance_count is None: + raise TypeError("Missing 'instance_count' argument") + if instance_size is None and 'instanceSize' in kwargs: + instance_size = kwargs['instanceSize'] + if instance_size is None: + raise TypeError("Missing 'instance_size' argument") + + _setter("cosmosdb_account_id", cosmosdb_account_id) + _setter("instance_count", instance_count) + _setter("instance_size", instance_size) @property @pulumi.getter(name="cosmosdbAccountId") @@ -76,12 +103,33 @@ def __init__(__self__, *, :param pulumi.Input[int] instance_count: The instance count for the CosmosDB SQL Dedicated Gateway. Possible value is between `1` and `5`. :param pulumi.Input[str] instance_size: The instance size for the CosmosDB SQL Dedicated Gateway. Changing this forces a new resource to be created. Possible values are `Cosmos.D4s`, `Cosmos.D8s` and `Cosmos.D16s`. """ + _SqlDedicatedGatewayState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cosmosdb_account_id=cosmosdb_account_id, + instance_count=instance_count, + instance_size=instance_size, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cosmosdb_account_id: Optional[pulumi.Input[str]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + instance_size: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cosmosdb_account_id is None and 'cosmosdbAccountId' in kwargs: + cosmosdb_account_id = kwargs['cosmosdbAccountId'] + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if instance_size is None and 'instanceSize' in kwargs: + instance_size = kwargs['instanceSize'] + if cosmosdb_account_id is not None: - pulumi.set(__self__, "cosmosdb_account_id", cosmosdb_account_id) + _setter("cosmosdb_account_id", cosmosdb_account_id) if instance_count is not None: - pulumi.set(__self__, "instance_count", instance_count) + _setter("instance_count", instance_count) if instance_size is not None: - pulumi.set(__self__, "instance_size", instance_size) + _setter("instance_size", instance_size) @property @pulumi.getter(name="cosmosdbAccountId") @@ -223,6 +271,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlDedicatedGatewayArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/sql_function.py b/sdk/python/pulumi_azure/cosmosdb/sql_function.py index 7d82dd43d7..42a7ea649d 100644 --- a/sdk/python/pulumi_azure/cosmosdb/sql_function.py +++ b/sdk/python/pulumi_azure/cosmosdb/sql_function.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SqlFunctionArgs', 'SqlFunction'] @@ -23,10 +23,31 @@ def __init__(__self__, *, :param pulumi.Input[str] container_id: The id of the Cosmos DB SQL Container to create the SQL User Defined Function within. Changing this forces a new SQL User Defined Function to be created. :param pulumi.Input[str] name: The name which should be used for this SQL User Defined Function. Changing this forces a new SQL User Defined Function to be created. """ - pulumi.set(__self__, "body", body) - pulumi.set(__self__, "container_id", container_id) + SqlFunctionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + body=body, + container_id=container_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body: Optional[pulumi.Input[str]] = None, + container_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body is None: + raise TypeError("Missing 'body' argument") + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + + _setter("body", body) + _setter("container_id", container_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -77,12 +98,29 @@ def __init__(__self__, *, :param pulumi.Input[str] container_id: The id of the Cosmos DB SQL Container to create the SQL User Defined Function within. Changing this forces a new SQL User Defined Function to be created. :param pulumi.Input[str] name: The name which should be used for this SQL User Defined Function. Changing this forces a new SQL User Defined Function to be created. """ + _SqlFunctionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + body=body, + container_id=container_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body: Optional[pulumi.Input[str]] = None, + container_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if body is not None: - pulumi.set(__self__, "body", body) + _setter("body", body) if container_id is not None: - pulumi.set(__self__, "container_id", container_id) + _setter("container_id", container_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -218,6 +256,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlFunctionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/sql_role_assignment.py b/sdk/python/pulumi_azure/cosmosdb/sql_role_assignment.py index 962f203e24..4a1b6acc37 100644 --- a/sdk/python/pulumi_azure/cosmosdb/sql_role_assignment.py +++ b/sdk/python/pulumi_azure/cosmosdb/sql_role_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SqlRoleAssignmentArgs', 'SqlRoleAssignment'] @@ -29,13 +29,52 @@ def __init__(__self__, *, :param pulumi.Input[str] scope: The data plane resource path for which access is being granted through this Cosmos DB SQL Role Assignment. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The GUID as the name of the Cosmos DB SQL Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "role_definition_id", role_definition_id) - pulumi.set(__self__, "scope", scope) + SqlRoleAssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + principal_id=principal_id, + resource_group_name=resource_group_name, + role_definition_id=role_definition_id, + scope=scope, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_id is None: + raise TypeError("Missing 'role_definition_id' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + + _setter("account_name", account_name) + _setter("principal_id", principal_id) + _setter("resource_group_name", resource_group_name) + _setter("role_definition_id", role_definition_id) + _setter("scope", scope) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="accountName") @@ -128,18 +167,47 @@ def __init__(__self__, *, :param pulumi.Input[str] role_definition_id: The resource ID of the Cosmos DB SQL Role Definition. :param pulumi.Input[str] scope: The data plane resource path for which access is being granted through this Cosmos DB SQL Role Assignment. Changing this forces a new resource to be created. """ + _SqlRoleAssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + name=name, + principal_id=principal_id, + resource_group_name=resource_group_name, + role_definition_id=role_definition_id, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="accountName") @@ -345,6 +413,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlRoleAssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/sql_role_definition.py b/sdk/python/pulumi_azure/cosmosdb/sql_role_definition.py index 8f04b2536f..78d5b13036 100644 --- a/sdk/python/pulumi_azure/cosmosdb/sql_role_definition.py +++ b/sdk/python/pulumi_azure/cosmosdb/sql_role_definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,16 +35,55 @@ def __init__(__self__, *, :param pulumi.Input[str] role_definition_id: The GUID as the name of the Cosmos DB SQL Role Definition - one will be generated if not specified. Changing this forces a new resource to be created. :param pulumi.Input[str] type: The type of the Cosmos DB SQL Role Definition. Possible values are `BuiltInRole` and `CustomRole`. Defaults to `CustomRole`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "assignable_scopes", assignable_scopes) - pulumi.set(__self__, "permissions", permissions) - pulumi.set(__self__, "resource_group_name", resource_group_name) + SqlRoleDefinitionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + assignable_scopes=assignable_scopes, + permissions=permissions, + resource_group_name=resource_group_name, + name=name, + role_definition_id=role_definition_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + assignable_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + permissions: Optional[pulumi.Input[Sequence[pulumi.Input['SqlRoleDefinitionPermissionArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if assignable_scopes is None and 'assignableScopes' in kwargs: + assignable_scopes = kwargs['assignableScopes'] + if assignable_scopes is None: + raise TypeError("Missing 'assignable_scopes' argument") + if permissions is None: + raise TypeError("Missing 'permissions' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + + _setter("account_name", account_name) + _setter("assignable_scopes", assignable_scopes) + _setter("permissions", permissions) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="accountName") @@ -155,20 +194,51 @@ def __init__(__self__, *, :param pulumi.Input[str] role_definition_id: The GUID as the name of the Cosmos DB SQL Role Definition - one will be generated if not specified. Changing this forces a new resource to be created. :param pulumi.Input[str] type: The type of the Cosmos DB SQL Role Definition. Possible values are `BuiltInRole` and `CustomRole`. Defaults to `CustomRole`. Changing this forces a new resource to be created. """ + _SqlRoleDefinitionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + assignable_scopes=assignable_scopes, + name=name, + permissions=permissions, + resource_group_name=resource_group_name, + role_definition_id=role_definition_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + assignable_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[Sequence[pulumi.Input['SqlRoleDefinitionPermissionArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if assignable_scopes is None and 'assignableScopes' in kwargs: + assignable_scopes = kwargs['assignableScopes'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if assignable_scopes is not None: - pulumi.set(__self__, "assignable_scopes", assignable_scopes) + _setter("assignable_scopes", assignable_scopes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if permissions is not None: - pulumi.set(__self__, "permissions", permissions) + _setter("permissions", permissions) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="accountName") @@ -380,6 +450,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlRoleDefinitionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/sql_stored_procedure.py b/sdk/python/pulumi_azure/cosmosdb/sql_stored_procedure.py index 4eeca582bb..9ea191fea6 100644 --- a/sdk/python/pulumi_azure/cosmosdb/sql_stored_procedure.py +++ b/sdk/python/pulumi_azure/cosmosdb/sql_stored_procedure.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SqlStoredProcedureArgs', 'SqlStoredProcedure'] @@ -29,13 +29,52 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the Cosmos DB SQL Stored Procedure. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "body", body) - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + SqlStoredProcedureArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + body=body, + container_name=container_name, + database_name=database_name, + resource_group_name=resource_group_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + body: Optional[pulumi.Input[str]] = None, + container_name: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if body is None: + raise TypeError("Missing 'body' argument") + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("account_name", account_name) + _setter("body", body) + _setter("container_name", container_name) + _setter("database_name", database_name) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="accountName") @@ -128,18 +167,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Cosmos DB SQL Stored Procedure. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. """ + _SqlStoredProcedureState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + body=body, + container_name=container_name, + database_name=database_name, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + body: Optional[pulumi.Input[str]] = None, + container_name: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if body is not None: - pulumi.set(__self__, "body", body) + _setter("body", body) if container_name is not None: - pulumi.set(__self__, "container_name", container_name) + _setter("container_name", container_name) if database_name is not None: - pulumi.set(__self__, "database_name", database_name) + _setter("database_name", database_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="accountName") @@ -323,6 +391,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlStoredProcedureArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/sql_trigger.py b/sdk/python/pulumi_azure/cosmosdb/sql_trigger.py index 47a53269eb..3205a2a666 100644 --- a/sdk/python/pulumi_azure/cosmosdb/sql_trigger.py +++ b/sdk/python/pulumi_azure/cosmosdb/sql_trigger.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SqlTriggerArgs', 'SqlTrigger'] @@ -27,12 +27,41 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Type of the Trigger. Possible values are `Pre` and `Post`. :param pulumi.Input[str] name: The name which should be used for this SQL Trigger. Changing this forces a new SQL Trigger to be created. """ - pulumi.set(__self__, "body", body) - pulumi.set(__self__, "container_id", container_id) - pulumi.set(__self__, "operation", operation) - pulumi.set(__self__, "type", type) + SqlTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + body=body, + container_id=container_id, + operation=operation, + type=type, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body: Optional[pulumi.Input[str]] = None, + container_id: Optional[pulumi.Input[str]] = None, + operation: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body is None: + raise TypeError("Missing 'body' argument") + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if operation is None: + raise TypeError("Missing 'operation' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("body", body) + _setter("container_id", container_id) + _setter("operation", operation) + _setter("type", type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -111,16 +140,37 @@ def __init__(__self__, *, :param pulumi.Input[str] operation: The operation the trigger is associated with. Possible values are `All`, `Create`, `Update`, `Delete` and `Replace`. :param pulumi.Input[str] type: Type of the Trigger. Possible values are `Pre` and `Post`. """ + _SqlTriggerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + body=body, + container_id=container_id, + name=name, + operation=operation, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body: Optional[pulumi.Input[str]] = None, + container_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + operation: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if body is not None: - pulumi.set(__self__, "body", body) + _setter("body", body) if container_id is not None: - pulumi.set(__self__, "container_id", container_id) + _setter("container_id", container_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if operation is not None: - pulumi.set(__self__, "operation", operation) + _setter("operation", operation) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -288,6 +338,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlTriggerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/cosmosdb/table.py b/sdk/python/pulumi_azure/cosmosdb/table.py index 5a3398ac5a..692b4bb461 100644 --- a/sdk/python/pulumi_azure/cosmosdb/table.py +++ b/sdk/python/pulumi_azure/cosmosdb/table.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,14 +33,43 @@ def __init__(__self__, *, > **Note:** throughput has a maximum value of `1000000` unless a higher limit is requested via Azure Support """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + TableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + resource_group_name=resource_group_name, + autoscale_settings=autoscale_settings, + name=name, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + autoscale_settings: Optional[pulumi.Input['TableAutoscaleSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + + _setter("account_name", account_name) + _setter("resource_group_name", resource_group_name) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="accountName") @@ -127,16 +156,41 @@ def __init__(__self__, *, > **Note:** throughput has a maximum value of `1000000` unless a higher limit is requested via Azure Support """ + _TableState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + autoscale_settings=autoscale_settings, + name=name, + resource_group_name=resource_group_name, + throughput=throughput, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + autoscale_settings: Optional[pulumi.Input['TableAutoscaleSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + throughput: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if autoscale_settings is None and 'autoscaleSettings' in kwargs: + autoscale_settings = kwargs['autoscaleSettings'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if autoscale_settings is not None: - pulumi.set(__self__, "autoscale_settings", autoscale_settings) + _setter("autoscale_settings", autoscale_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if throughput is not None: - pulumi.set(__self__, "throughput", throughput) + _setter("throughput", throughput) @property @pulumi.getter(name="accountName") @@ -292,6 +346,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TableArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -314,6 +372,11 @@ def _internal_init(__self__, if account_name is None and not opts.urn: raise TypeError("Missing required property 'account_name'") __props__.__dict__["account_name"] = account_name + if autoscale_settings is not None and not isinstance(autoscale_settings, TableAutoscaleSettingsArgs): + autoscale_settings = autoscale_settings or {} + def _setter(key, value): + autoscale_settings[key] = value + TableAutoscaleSettingsArgs._configure(_setter, **autoscale_settings) __props__.__dict__["autoscale_settings"] = autoscale_settings __props__.__dict__["name"] = name if resource_group_name is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/costmanagement/anomaly_alert.py b/sdk/python/pulumi_azure/costmanagement/anomaly_alert.py index b076beab76..6402c556e5 100644 --- a/sdk/python/pulumi_azure/costmanagement/anomaly_alert.py +++ b/sdk/python/pulumi_azure/costmanagement/anomaly_alert.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AnomalyAlertArgs', 'AnomalyAlert'] @@ -27,13 +27,44 @@ def __init__(__self__, *, :param pulumi.Input[str] message: The message of the Cost Anomaly Alert. Maximum length of the message is 250. :param pulumi.Input[str] name: The name which should be used for this Cost Anomaly Alert. Changing this forces a new resource to be created. The name can contain only lowercase letters, numbers and hyphens. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "email_addresses", email_addresses) - pulumi.set(__self__, "email_subject", email_subject) + AnomalyAlertArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + email_addresses=email_addresses, + email_subject=email_subject, + message=message, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_subject: Optional[pulumi.Input[str]] = None, + message: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if email_addresses is None: + raise TypeError("Missing 'email_addresses' argument") + if email_subject is None and 'emailSubject' in kwargs: + email_subject = kwargs['emailSubject'] + if email_subject is None: + raise TypeError("Missing 'email_subject' argument") + + _setter("display_name", display_name) + _setter("email_addresses", email_addresses) + _setter("email_subject", email_subject) if message is not None: - pulumi.set(__self__, "message", message) + _setter("message", message) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="displayName") @@ -112,16 +143,41 @@ def __init__(__self__, *, :param pulumi.Input[str] message: The message of the Cost Anomaly Alert. Maximum length of the message is 250. :param pulumi.Input[str] name: The name which should be used for this Cost Anomaly Alert. Changing this forces a new resource to be created. The name can contain only lowercase letters, numbers and hyphens. """ + _AnomalyAlertState._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + email_addresses=email_addresses, + email_subject=email_subject, + message=message, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_subject: Optional[pulumi.Input[str]] = None, + message: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if email_subject is None and 'emailSubject' in kwargs: + email_subject = kwargs['emailSubject'] + if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if email_subject is not None: - pulumi.set(__self__, "email_subject", email_subject) + _setter("email_subject", email_subject) if message is not None: - pulumi.set(__self__, "message", message) + _setter("message", message) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="displayName") @@ -265,6 +321,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AnomalyAlertArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/costmanagement/scheduled_action.py b/sdk/python/pulumi_azure/costmanagement/scheduled_action.py index 2d7f18b4a3..59879bab49 100644 --- a/sdk/python/pulumi_azure/costmanagement/scheduled_action.py +++ b/sdk/python/pulumi_azure/costmanagement/scheduled_action.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ScheduledActionArgs', 'ScheduledAction'] @@ -45,26 +45,101 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Azure Cost Management Scheduled Action. Changing this forces a new Azure Cost Management Scheduled Action to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] weeks_of_months: Specifies a list of weeks in which cost analysis data will be emailed. This property is applicable when `frequency` is `Monthly` and used in combination with `days_of_week`. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "email_address_sender", email_address_sender) - pulumi.set(__self__, "email_addresses", email_addresses) - pulumi.set(__self__, "email_subject", email_subject) - pulumi.set(__self__, "end_date", end_date) - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "start_date", start_date) - pulumi.set(__self__, "view_id", view_id) + ScheduledActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + email_address_sender=email_address_sender, + email_addresses=email_addresses, + email_subject=email_subject, + end_date=end_date, + frequency=frequency, + start_date=start_date, + view_id=view_id, + day_of_month=day_of_month, + days_of_weeks=days_of_weeks, + hour_of_day=hour_of_day, + message=message, + name=name, + weeks_of_months=weeks_of_months, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + email_address_sender: Optional[pulumi.Input[str]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_subject: Optional[pulumi.Input[str]] = None, + end_date: Optional[pulumi.Input[str]] = None, + frequency: Optional[pulumi.Input[str]] = None, + start_date: Optional[pulumi.Input[str]] = None, + view_id: Optional[pulumi.Input[str]] = None, + day_of_month: Optional[pulumi.Input[int]] = None, + days_of_weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + hour_of_day: Optional[pulumi.Input[int]] = None, + message: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + weeks_of_months: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if email_address_sender is None and 'emailAddressSender' in kwargs: + email_address_sender = kwargs['emailAddressSender'] + if email_address_sender is None: + raise TypeError("Missing 'email_address_sender' argument") + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if email_addresses is None: + raise TypeError("Missing 'email_addresses' argument") + if email_subject is None and 'emailSubject' in kwargs: + email_subject = kwargs['emailSubject'] + if email_subject is None: + raise TypeError("Missing 'email_subject' argument") + if end_date is None and 'endDate' in kwargs: + end_date = kwargs['endDate'] + if end_date is None: + raise TypeError("Missing 'end_date' argument") + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if start_date is None: + raise TypeError("Missing 'start_date' argument") + if view_id is None and 'viewId' in kwargs: + view_id = kwargs['viewId'] + if view_id is None: + raise TypeError("Missing 'view_id' argument") + if day_of_month is None and 'dayOfMonth' in kwargs: + day_of_month = kwargs['dayOfMonth'] + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if hour_of_day is None and 'hourOfDay' in kwargs: + hour_of_day = kwargs['hourOfDay'] + if weeks_of_months is None and 'weeksOfMonths' in kwargs: + weeks_of_months = kwargs['weeksOfMonths'] + + _setter("display_name", display_name) + _setter("email_address_sender", email_address_sender) + _setter("email_addresses", email_addresses) + _setter("email_subject", email_subject) + _setter("end_date", end_date) + _setter("frequency", frequency) + _setter("start_date", start_date) + _setter("view_id", view_id) if day_of_month is not None: - pulumi.set(__self__, "day_of_month", day_of_month) + _setter("day_of_month", day_of_month) if days_of_weeks is not None: - pulumi.set(__self__, "days_of_weeks", days_of_weeks) + _setter("days_of_weeks", days_of_weeks) if hour_of_day is not None: - pulumi.set(__self__, "hour_of_day", hour_of_day) + _setter("hour_of_day", hour_of_day) if message is not None: - pulumi.set(__self__, "message", message) + _setter("message", message) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if weeks_of_months is not None: - pulumi.set(__self__, "weeks_of_months", weeks_of_months) + _setter("weeks_of_months", weeks_of_months) @property @pulumi.getter(name="displayName") @@ -269,34 +344,93 @@ def __init__(__self__, *, :param pulumi.Input[str] view_id: The ID of the Cost Management View that is used by the Scheduled Action. :param pulumi.Input[Sequence[pulumi.Input[str]]] weeks_of_months: Specifies a list of weeks in which cost analysis data will be emailed. This property is applicable when `frequency` is `Monthly` and used in combination with `days_of_week`. """ + _ScheduledActionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_month=day_of_month, + days_of_weeks=days_of_weeks, + display_name=display_name, + email_address_sender=email_address_sender, + email_addresses=email_addresses, + email_subject=email_subject, + end_date=end_date, + frequency=frequency, + hour_of_day=hour_of_day, + message=message, + name=name, + start_date=start_date, + view_id=view_id, + weeks_of_months=weeks_of_months, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_month: Optional[pulumi.Input[int]] = None, + days_of_weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + display_name: Optional[pulumi.Input[str]] = None, + email_address_sender: Optional[pulumi.Input[str]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_subject: Optional[pulumi.Input[str]] = None, + end_date: Optional[pulumi.Input[str]] = None, + frequency: Optional[pulumi.Input[str]] = None, + hour_of_day: Optional[pulumi.Input[int]] = None, + message: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + start_date: Optional[pulumi.Input[str]] = None, + view_id: Optional[pulumi.Input[str]] = None, + weeks_of_months: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_month is None and 'dayOfMonth' in kwargs: + day_of_month = kwargs['dayOfMonth'] + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if email_address_sender is None and 'emailAddressSender' in kwargs: + email_address_sender = kwargs['emailAddressSender'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if email_subject is None and 'emailSubject' in kwargs: + email_subject = kwargs['emailSubject'] + if end_date is None and 'endDate' in kwargs: + end_date = kwargs['endDate'] + if hour_of_day is None and 'hourOfDay' in kwargs: + hour_of_day = kwargs['hourOfDay'] + if start_date is None and 'startDate' in kwargs: + start_date = kwargs['startDate'] + if view_id is None and 'viewId' in kwargs: + view_id = kwargs['viewId'] + if weeks_of_months is None and 'weeksOfMonths' in kwargs: + weeks_of_months = kwargs['weeksOfMonths'] + if day_of_month is not None: - pulumi.set(__self__, "day_of_month", day_of_month) + _setter("day_of_month", day_of_month) if days_of_weeks is not None: - pulumi.set(__self__, "days_of_weeks", days_of_weeks) + _setter("days_of_weeks", days_of_weeks) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if email_address_sender is not None: - pulumi.set(__self__, "email_address_sender", email_address_sender) + _setter("email_address_sender", email_address_sender) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if email_subject is not None: - pulumi.set(__self__, "email_subject", email_subject) + _setter("email_subject", email_subject) if end_date is not None: - pulumi.set(__self__, "end_date", end_date) + _setter("end_date", end_date) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if hour_of_day is not None: - pulumi.set(__self__, "hour_of_day", hour_of_day) + _setter("hour_of_day", hour_of_day) if message is not None: - pulumi.set(__self__, "message", message) + _setter("message", message) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if start_date is not None: - pulumi.set(__self__, "start_date", start_date) + _setter("start_date", start_date) if view_id is not None: - pulumi.set(__self__, "view_id", view_id) + _setter("view_id", view_id) if weeks_of_months is not None: - pulumi.set(__self__, "weeks_of_months", weeks_of_months) + _setter("weeks_of_months", weeks_of_months) @property @pulumi.getter(name="dayOfMonth") @@ -578,6 +712,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ScheduledActionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/customip/prefix.py b/sdk/python/pulumi_azure/customip/prefix.py index c7998451a9..3d3f5bf92b 100644 --- a/sdk/python/pulumi_azure/customip/prefix.py +++ b/sdk/python/pulumi_azure/customip/prefix.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PrefixArgs', 'Prefix'] @@ -45,26 +45,73 @@ def __init__(__self__, *, > **Note:** In regions with [availability zones](https://docs.microsoft.com/en-us/azure/availability-zones/az-overview), the Custom IP Prefix must be specified as either `Zone-redundant` or assigned to a specific zone. It can't be created with no zone specified in these regions. All IPs from the prefix must have the same zonal properties. """ - pulumi.set(__self__, "cidr", cidr) - pulumi.set(__self__, "resource_group_name", resource_group_name) + PrefixArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cidr=cidr, + resource_group_name=resource_group_name, + commissioning_enabled=commissioning_enabled, + internet_advertising_disabled=internet_advertising_disabled, + location=location, + name=name, + parent_custom_ip_prefix_id=parent_custom_ip_prefix_id, + roa_validity_end_date=roa_validity_end_date, + tags=tags, + wan_validation_signed_message=wan_validation_signed_message, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cidr: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + commissioning_enabled: Optional[pulumi.Input[bool]] = None, + internet_advertising_disabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parent_custom_ip_prefix_id: Optional[pulumi.Input[str]] = None, + roa_validity_end_date: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + wan_validation_signed_message: Optional[pulumi.Input[str]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cidr is None: + raise TypeError("Missing 'cidr' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if commissioning_enabled is None and 'commissioningEnabled' in kwargs: + commissioning_enabled = kwargs['commissioningEnabled'] + if internet_advertising_disabled is None and 'internetAdvertisingDisabled' in kwargs: + internet_advertising_disabled = kwargs['internetAdvertisingDisabled'] + if parent_custom_ip_prefix_id is None and 'parentCustomIpPrefixId' in kwargs: + parent_custom_ip_prefix_id = kwargs['parentCustomIpPrefixId'] + if roa_validity_end_date is None and 'roaValidityEndDate' in kwargs: + roa_validity_end_date = kwargs['roaValidityEndDate'] + if wan_validation_signed_message is None and 'wanValidationSignedMessage' in kwargs: + wan_validation_signed_message = kwargs['wanValidationSignedMessage'] + + _setter("cidr", cidr) + _setter("resource_group_name", resource_group_name) if commissioning_enabled is not None: - pulumi.set(__self__, "commissioning_enabled", commissioning_enabled) + _setter("commissioning_enabled", commissioning_enabled) if internet_advertising_disabled is not None: - pulumi.set(__self__, "internet_advertising_disabled", internet_advertising_disabled) + _setter("internet_advertising_disabled", internet_advertising_disabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parent_custom_ip_prefix_id is not None: - pulumi.set(__self__, "parent_custom_ip_prefix_id", parent_custom_ip_prefix_id) + _setter("parent_custom_ip_prefix_id", parent_custom_ip_prefix_id) if roa_validity_end_date is not None: - pulumi.set(__self__, "roa_validity_end_date", roa_validity_end_date) + _setter("roa_validity_end_date", roa_validity_end_date) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if wan_validation_signed_message is not None: - pulumi.set(__self__, "wan_validation_signed_message", wan_validation_signed_message) + _setter("wan_validation_signed_message", wan_validation_signed_message) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -239,28 +286,71 @@ def __init__(__self__, *, > **Note:** In regions with [availability zones](https://docs.microsoft.com/en-us/azure/availability-zones/az-overview), the Custom IP Prefix must be specified as either `Zone-redundant` or assigned to a specific zone. It can't be created with no zone specified in these regions. All IPs from the prefix must have the same zonal properties. """ + _PrefixState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cidr=cidr, + commissioning_enabled=commissioning_enabled, + internet_advertising_disabled=internet_advertising_disabled, + location=location, + name=name, + parent_custom_ip_prefix_id=parent_custom_ip_prefix_id, + resource_group_name=resource_group_name, + roa_validity_end_date=roa_validity_end_date, + tags=tags, + wan_validation_signed_message=wan_validation_signed_message, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cidr: Optional[pulumi.Input[str]] = None, + commissioning_enabled: Optional[pulumi.Input[bool]] = None, + internet_advertising_disabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parent_custom_ip_prefix_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + roa_validity_end_date: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + wan_validation_signed_message: Optional[pulumi.Input[str]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if commissioning_enabled is None and 'commissioningEnabled' in kwargs: + commissioning_enabled = kwargs['commissioningEnabled'] + if internet_advertising_disabled is None and 'internetAdvertisingDisabled' in kwargs: + internet_advertising_disabled = kwargs['internetAdvertisingDisabled'] + if parent_custom_ip_prefix_id is None and 'parentCustomIpPrefixId' in kwargs: + parent_custom_ip_prefix_id = kwargs['parentCustomIpPrefixId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if roa_validity_end_date is None and 'roaValidityEndDate' in kwargs: + roa_validity_end_date = kwargs['roaValidityEndDate'] + if wan_validation_signed_message is None and 'wanValidationSignedMessage' in kwargs: + wan_validation_signed_message = kwargs['wanValidationSignedMessage'] + if cidr is not None: - pulumi.set(__self__, "cidr", cidr) + _setter("cidr", cidr) if commissioning_enabled is not None: - pulumi.set(__self__, "commissioning_enabled", commissioning_enabled) + _setter("commissioning_enabled", commissioning_enabled) if internet_advertising_disabled is not None: - pulumi.set(__self__, "internet_advertising_disabled", internet_advertising_disabled) + _setter("internet_advertising_disabled", internet_advertising_disabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parent_custom_ip_prefix_id is not None: - pulumi.set(__self__, "parent_custom_ip_prefix_id", parent_custom_ip_prefix_id) + _setter("parent_custom_ip_prefix_id", parent_custom_ip_prefix_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if roa_validity_end_date is not None: - pulumi.set(__self__, "roa_validity_end_date", roa_validity_end_date) + _setter("roa_validity_end_date", roa_validity_end_date) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if wan_validation_signed_message is not None: - pulumi.set(__self__, "wan_validation_signed_message", wan_validation_signed_message) + _setter("wan_validation_signed_message", wan_validation_signed_message) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -476,6 +566,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PrefixArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dashboard/_inputs.py b/sdk/python/pulumi_azure/dashboard/_inputs.py index 138251f43a..0effc4bac6 100644 --- a/sdk/python/pulumi_azure/dashboard/_inputs.py +++ b/sdk/python/pulumi_azure/dashboard/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -21,7 +21,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] resource_id: Specifies the resource ID of the connected Azure Monitor Workspace. """ - pulumi.set(__self__, "resource_id", resource_id) + GrafanaAzureMonitorWorkspaceIntegrationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_id=resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + + _setter("resource_id", resource_id) @property @pulumi.getter(name="resourceId") @@ -49,13 +64,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + GrafanaIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/dashboard/azurerm_portal_dashboard.py b/sdk/python/pulumi_azure/dashboard/azurerm_portal_dashboard.py index 219393649a..a66f0025a1 100644 --- a/sdk/python/pulumi_azure/dashboard/azurerm_portal_dashboard.py +++ b/sdk/python/pulumi_azure/dashboard/azurerm_portal_dashboard.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/dashboard/dashboard.py b/sdk/python/pulumi_azure/dashboard/dashboard.py index be76825c13..297e868892 100644 --- a/sdk/python/pulumi_azure/dashboard/dashboard.py +++ b/sdk/python/pulumi_azure/dashboard/dashboard.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DashboardArgs', 'Dashboard'] @@ -29,15 +29,40 @@ def __init__(__self__, *, > **Note**: You can specify a tag with the key `hidden-title` to set a more user-friendly title for this Dashboard. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + DashboardArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + dashboard_properties=dashboard_properties, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + dashboard_properties: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if dashboard_properties is None and 'dashboardProperties' in kwargs: + dashboard_properties = kwargs['dashboardProperties'] + + _setter("resource_group_name", resource_group_name) if dashboard_properties is not None: - pulumi.set(__self__, "dashboard_properties", dashboard_properties) + _setter("dashboard_properties", dashboard_properties) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -120,16 +145,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _DashboardState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dashboard_properties=dashboard_properties, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dashboard_properties: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dashboard_properties is None and 'dashboardProperties' in kwargs: + dashboard_properties = kwargs['dashboardProperties'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if dashboard_properties is not None: - pulumi.set(__self__, "dashboard_properties", dashboard_properties) + _setter("dashboard_properties", dashboard_properties) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dashboardProperties") @@ -536,6 +584,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DashboardArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dashboard/grafana.py b/sdk/python/pulumi_azure/dashboard/grafana.py index ebfc342ee7..5ab965665f 100644 --- a/sdk/python/pulumi_azure/dashboard/grafana.py +++ b/sdk/python/pulumi_azure/dashboard/grafana.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,29 +43,78 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Dashboard Grafana. :param pulumi.Input[bool] zone_redundancy_enabled: Whether to enable the zone redundancy setting of the Grafana instance. Defaults to `false`. Changing this forces a new Dashboard Grafana to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + GrafanaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + api_key_enabled=api_key_enabled, + auto_generated_domain_name_label_scope=auto_generated_domain_name_label_scope, + azure_monitor_workspace_integrations=azure_monitor_workspace_integrations, + deterministic_outbound_ip_enabled=deterministic_outbound_ip_enabled, + identity=identity, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + sku=sku, + tags=tags, + zone_redundancy_enabled=zone_redundancy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + api_key_enabled: Optional[pulumi.Input[bool]] = None, + auto_generated_domain_name_label_scope: Optional[pulumi.Input[str]] = None, + azure_monitor_workspace_integrations: Optional[pulumi.Input[Sequence[pulumi.Input['GrafanaAzureMonitorWorkspaceIntegrationArgs']]]] = None, + deterministic_outbound_ip_enabled: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['GrafanaIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundancy_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if api_key_enabled is None and 'apiKeyEnabled' in kwargs: + api_key_enabled = kwargs['apiKeyEnabled'] + if auto_generated_domain_name_label_scope is None and 'autoGeneratedDomainNameLabelScope' in kwargs: + auto_generated_domain_name_label_scope = kwargs['autoGeneratedDomainNameLabelScope'] + if azure_monitor_workspace_integrations is None and 'azureMonitorWorkspaceIntegrations' in kwargs: + azure_monitor_workspace_integrations = kwargs['azureMonitorWorkspaceIntegrations'] + if deterministic_outbound_ip_enabled is None and 'deterministicOutboundIpEnabled' in kwargs: + deterministic_outbound_ip_enabled = kwargs['deterministicOutboundIpEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if zone_redundancy_enabled is None and 'zoneRedundancyEnabled' in kwargs: + zone_redundancy_enabled = kwargs['zoneRedundancyEnabled'] + + _setter("resource_group_name", resource_group_name) if api_key_enabled is not None: - pulumi.set(__self__, "api_key_enabled", api_key_enabled) + _setter("api_key_enabled", api_key_enabled) if auto_generated_domain_name_label_scope is not None: - pulumi.set(__self__, "auto_generated_domain_name_label_scope", auto_generated_domain_name_label_scope) + _setter("auto_generated_domain_name_label_scope", auto_generated_domain_name_label_scope) if azure_monitor_workspace_integrations is not None: - pulumi.set(__self__, "azure_monitor_workspace_integrations", azure_monitor_workspace_integrations) + _setter("azure_monitor_workspace_integrations", azure_monitor_workspace_integrations) if deterministic_outbound_ip_enabled is not None: - pulumi.set(__self__, "deterministic_outbound_ip_enabled", deterministic_outbound_ip_enabled) + _setter("deterministic_outbound_ip_enabled", deterministic_outbound_ip_enabled) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundancy_enabled is not None: - pulumi.set(__self__, "zone_redundancy_enabled", zone_redundancy_enabled) + _setter("zone_redundancy_enabled", zone_redundancy_enabled) @property @pulumi.getter(name="resourceGroupName") @@ -248,36 +297,93 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Dashboard Grafana. :param pulumi.Input[bool] zone_redundancy_enabled: Whether to enable the zone redundancy setting of the Grafana instance. Defaults to `false`. Changing this forces a new Dashboard Grafana to be created. """ + _GrafanaState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_key_enabled=api_key_enabled, + auto_generated_domain_name_label_scope=auto_generated_domain_name_label_scope, + azure_monitor_workspace_integrations=azure_monitor_workspace_integrations, + deterministic_outbound_ip_enabled=deterministic_outbound_ip_enabled, + endpoint=endpoint, + grafana_version=grafana_version, + identity=identity, + location=location, + name=name, + outbound_ips=outbound_ips, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + sku=sku, + tags=tags, + zone_redundancy_enabled=zone_redundancy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_key_enabled: Optional[pulumi.Input[bool]] = None, + auto_generated_domain_name_label_scope: Optional[pulumi.Input[str]] = None, + azure_monitor_workspace_integrations: Optional[pulumi.Input[Sequence[pulumi.Input['GrafanaAzureMonitorWorkspaceIntegrationArgs']]]] = None, + deterministic_outbound_ip_enabled: Optional[pulumi.Input[bool]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + grafana_version: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['GrafanaIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundancy_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_key_enabled is None and 'apiKeyEnabled' in kwargs: + api_key_enabled = kwargs['apiKeyEnabled'] + if auto_generated_domain_name_label_scope is None and 'autoGeneratedDomainNameLabelScope' in kwargs: + auto_generated_domain_name_label_scope = kwargs['autoGeneratedDomainNameLabelScope'] + if azure_monitor_workspace_integrations is None and 'azureMonitorWorkspaceIntegrations' in kwargs: + azure_monitor_workspace_integrations = kwargs['azureMonitorWorkspaceIntegrations'] + if deterministic_outbound_ip_enabled is None and 'deterministicOutboundIpEnabled' in kwargs: + deterministic_outbound_ip_enabled = kwargs['deterministicOutboundIpEnabled'] + if grafana_version is None and 'grafanaVersion' in kwargs: + grafana_version = kwargs['grafanaVersion'] + if outbound_ips is None and 'outboundIps' in kwargs: + outbound_ips = kwargs['outboundIps'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_redundancy_enabled is None and 'zoneRedundancyEnabled' in kwargs: + zone_redundancy_enabled = kwargs['zoneRedundancyEnabled'] + if api_key_enabled is not None: - pulumi.set(__self__, "api_key_enabled", api_key_enabled) + _setter("api_key_enabled", api_key_enabled) if auto_generated_domain_name_label_scope is not None: - pulumi.set(__self__, "auto_generated_domain_name_label_scope", auto_generated_domain_name_label_scope) + _setter("auto_generated_domain_name_label_scope", auto_generated_domain_name_label_scope) if azure_monitor_workspace_integrations is not None: - pulumi.set(__self__, "azure_monitor_workspace_integrations", azure_monitor_workspace_integrations) + _setter("azure_monitor_workspace_integrations", azure_monitor_workspace_integrations) if deterministic_outbound_ip_enabled is not None: - pulumi.set(__self__, "deterministic_outbound_ip_enabled", deterministic_outbound_ip_enabled) + _setter("deterministic_outbound_ip_enabled", deterministic_outbound_ip_enabled) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if grafana_version is not None: - pulumi.set(__self__, "grafana_version", grafana_version) + _setter("grafana_version", grafana_version) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_ips is not None: - pulumi.set(__self__, "outbound_ips", outbound_ips) + _setter("outbound_ips", outbound_ips) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundancy_enabled is not None: - pulumi.set(__self__, "zone_redundancy_enabled", zone_redundancy_enabled) + _setter("zone_redundancy_enabled", zone_redundancy_enabled) @property @pulumi.getter(name="apiKeyEnabled") @@ -573,6 +679,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GrafanaArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -603,6 +713,11 @@ def _internal_init(__self__, __props__.__dict__["auto_generated_domain_name_label_scope"] = auto_generated_domain_name_label_scope __props__.__dict__["azure_monitor_workspace_integrations"] = azure_monitor_workspace_integrations __props__.__dict__["deterministic_outbound_ip_enabled"] = deterministic_outbound_ip_enabled + if identity is not None and not isinstance(identity, GrafanaIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + GrafanaIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/dashboard/outputs.py b/sdk/python/pulumi_azure/dashboard/outputs.py index 7253d3beb0..1a1e8bd0fa 100644 --- a/sdk/python/pulumi_azure/dashboard/outputs.py +++ b/sdk/python/pulumi_azure/dashboard/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -38,7 +38,22 @@ def __init__(__self__, *, """ :param str resource_id: Specifies the resource ID of the connected Azure Monitor Workspace. """ - pulumi.set(__self__, "resource_id", resource_id) + GrafanaAzureMonitorWorkspaceIntegration._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_id=resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + + _setter("resource_id", resource_id) @property @pulumi.getter(name="resourceId") @@ -83,13 +98,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + GrafanaIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/databasemigration/get_project.py b/sdk/python/pulumi_azure/databasemigration/get_project.py index 5746e74ecb..31affbbd78 100644 --- a/sdk/python/pulumi_azure/databasemigration/get_project.py +++ b/sdk/python/pulumi_azure/databasemigration/get_project.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/databasemigration/get_service.py b/sdk/python/pulumi_azure/databasemigration/get_service.py index 1f3b186152..c2e370ba83 100644 --- a/sdk/python/pulumi_azure/databasemigration/get_service.py +++ b/sdk/python/pulumi_azure/databasemigration/get_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/databasemigration/project.py b/sdk/python/pulumi_azure/databasemigration/project.py index 70e46c5485..d6fb9cfaf1 100644 --- a/sdk/python/pulumi_azure/databasemigration/project.py +++ b/sdk/python/pulumi_azure/databasemigration/project.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ProjectArgs', 'Project'] @@ -31,16 +31,55 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specify the name of the database migration project. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assigned to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "service_name", service_name) - pulumi.set(__self__, "source_platform", source_platform) - pulumi.set(__self__, "target_platform", target_platform) + ProjectArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + service_name=service_name, + source_platform=source_platform, + target_platform=target_platform, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + service_name: Optional[pulumi.Input[str]] = None, + source_platform: Optional[pulumi.Input[str]] = None, + target_platform: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if service_name is None and 'serviceName' in kwargs: + service_name = kwargs['serviceName'] + if service_name is None: + raise TypeError("Missing 'service_name' argument") + if source_platform is None and 'sourcePlatform' in kwargs: + source_platform = kwargs['sourcePlatform'] + if source_platform is None: + raise TypeError("Missing 'source_platform' argument") + if target_platform is None and 'targetPlatform' in kwargs: + target_platform = kwargs['targetPlatform'] + if target_platform is None: + raise TypeError("Missing 'target_platform' argument") + + _setter("resource_group_name", resource_group_name) + _setter("service_name", service_name) + _setter("source_platform", source_platform) + _setter("target_platform", target_platform) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -147,20 +186,51 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assigned to the resource. :param pulumi.Input[str] target_platform: The platform type of the migration target. Currently only support: `SQLDB`(Azure SQL Database). Changing this forces a new resource to be created. """ + _ProjectState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + service_name=service_name, + source_platform=source_platform, + tags=tags, + target_platform=target_platform, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_name: Optional[pulumi.Input[str]] = None, + source_platform: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_platform: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_name is None and 'serviceName' in kwargs: + service_name = kwargs['serviceName'] + if source_platform is None and 'sourcePlatform' in kwargs: + source_platform = kwargs['sourcePlatform'] + if target_platform is None and 'targetPlatform' in kwargs: + target_platform = kwargs['targetPlatform'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_name is not None: - pulumi.set(__self__, "service_name", service_name) + _setter("service_name", service_name) if source_platform is not None: - pulumi.set(__self__, "source_platform", source_platform) + _setter("source_platform", source_platform) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_platform is not None: - pulumi.set(__self__, "target_platform", target_platform) + _setter("target_platform", target_platform) @property @pulumi.getter @@ -368,6 +438,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProjectArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/databasemigration/service.py b/sdk/python/pulumi_azure/databasemigration/service.py index 375c8c483e..e49a3cc277 100644 --- a/sdk/python/pulumi_azure/databasemigration/service.py +++ b/sdk/python/pulumi_azure/databasemigration/service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServiceArgs', 'Service'] @@ -29,15 +29,48 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specify the name of the database migration service. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assigned to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "subnet_id", subnet_id) + ServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + subnet_id=subnet_id, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("subnet_id", subnet_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -130,18 +163,45 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assigned to the resource. """ + _ServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + sku_name=sku_name, + subnet_id=subnet_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -323,6 +383,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/databoxedge/_inputs.py b/sdk/python/pulumi_azure/databoxedge/_inputs.py index 8a2dec2c48..4f1aee60a0 100644 --- a/sdk/python/pulumi_azure/databoxedge/_inputs.py +++ b/sdk/python/pulumi_azure/databoxedge/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -46,28 +46,71 @@ def __init__(__self__, *, :param pulumi.Input[str] time_zone: The Data Box Edge/Gateway device timezone. :param pulumi.Input[str] type: The type of the Data Box Edge/Gateway device. """ + DeviceDevicePropertyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + configured_role_types=configured_role_types, + culture=culture, + hcs_version=hcs_version, + model=model, + node_count=node_count, + serial_number=serial_number, + software_version=software_version, + status=status, + time_zone=time_zone, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + configured_role_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + culture: Optional[pulumi.Input[str]] = None, + hcs_version: Optional[pulumi.Input[str]] = None, + model: Optional[pulumi.Input[str]] = None, + node_count: Optional[pulumi.Input[int]] = None, + serial_number: Optional[pulumi.Input[str]] = None, + software_version: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + time_zone: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if configured_role_types is None and 'configuredRoleTypes' in kwargs: + configured_role_types = kwargs['configuredRoleTypes'] + if hcs_version is None and 'hcsVersion' in kwargs: + hcs_version = kwargs['hcsVersion'] + if node_count is None and 'nodeCount' in kwargs: + node_count = kwargs['nodeCount'] + if serial_number is None and 'serialNumber' in kwargs: + serial_number = kwargs['serialNumber'] + if software_version is None and 'softwareVersion' in kwargs: + software_version = kwargs['softwareVersion'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if configured_role_types is not None: - pulumi.set(__self__, "configured_role_types", configured_role_types) + _setter("configured_role_types", configured_role_types) if culture is not None: - pulumi.set(__self__, "culture", culture) + _setter("culture", culture) if hcs_version is not None: - pulumi.set(__self__, "hcs_version", hcs_version) + _setter("hcs_version", hcs_version) if model is not None: - pulumi.set(__self__, "model", model) + _setter("model", model) if node_count is not None: - pulumi.set(__self__, "node_count", node_count) + _setter("node_count", node_count) if serial_number is not None: - pulumi.set(__self__, "serial_number", serial_number) + _setter("serial_number", serial_number) if software_version is not None: - pulumi.set(__self__, "software_version", software_version) + _setter("software_version", software_version) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -215,10 +258,39 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The contact person name. Changing this forces a new Databox Edge Order to be created. :param pulumi.Input[str] phone_number: The phone number. Changing this forces a new Databox Edge Order to be created. """ - pulumi.set(__self__, "company_name", company_name) - pulumi.set(__self__, "emails", emails) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "phone_number", phone_number) + OrderContactArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + company_name=company_name, + emails=emails, + name=name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + company_name: Optional[pulumi.Input[str]] = None, + emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + phone_number: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if company_name is None and 'companyName' in kwargs: + company_name = kwargs['companyName'] + if company_name is None: + raise TypeError("Missing 'company_name' argument") + if emails is None: + raise TypeError("Missing 'emails' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("company_name", company_name) + _setter("emails", emails) + _setter("name", name) + _setter("phone_number", phone_number) @property @pulumi.getter(name="companyName") @@ -282,14 +354,39 @@ def __init__(__self__, *, :param pulumi.Input[str] tracking_id: The ID of the tracking. :param pulumi.Input[str] tracking_url: Tracking URL of the shipment. """ + OrderReturnTrackingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + carrier_name=carrier_name, + serial_number=serial_number, + tracking_id=tracking_id, + tracking_url=tracking_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + carrier_name: Optional[pulumi.Input[str]] = None, + serial_number: Optional[pulumi.Input[str]] = None, + tracking_id: Optional[pulumi.Input[str]] = None, + tracking_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if carrier_name is None and 'carrierName' in kwargs: + carrier_name = kwargs['carrierName'] + if serial_number is None and 'serialNumber' in kwargs: + serial_number = kwargs['serialNumber'] + if tracking_id is None and 'trackingId' in kwargs: + tracking_id = kwargs['trackingId'] + if tracking_url is None and 'trackingUrl' in kwargs: + tracking_url = kwargs['trackingUrl'] + if carrier_name is not None: - pulumi.set(__self__, "carrier_name", carrier_name) + _setter("carrier_name", carrier_name) if serial_number is not None: - pulumi.set(__self__, "serial_number", serial_number) + _setter("serial_number", serial_number) if tracking_id is not None: - pulumi.set(__self__, "tracking_id", tracking_id) + _setter("tracking_id", tracking_id) if tracking_url is not None: - pulumi.set(__self__, "tracking_url", tracking_url) + _setter("tracking_url", tracking_url) @property @pulumi.getter(name="carrierName") @@ -355,11 +452,42 @@ def __init__(__self__, *, :param pulumi.Input[str] postal_code: The postal code. Changing this forces a new Databox Edge Order to be created. :param pulumi.Input[str] state: The name of the state to ship the Databox Edge Device to. Changing this forces a new Databox Edge Order to be created. """ - pulumi.set(__self__, "addresses", addresses) - pulumi.set(__self__, "city", city) - pulumi.set(__self__, "country", country) - pulumi.set(__self__, "postal_code", postal_code) - pulumi.set(__self__, "state", state) + OrderShipmentAddressArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + addresses=addresses, + city=city, + country=country, + postal_code=postal_code, + state=state, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + city: Optional[pulumi.Input[str]] = None, + country: Optional[pulumi.Input[str]] = None, + postal_code: Optional[pulumi.Input[str]] = None, + state: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if addresses is None: + raise TypeError("Missing 'addresses' argument") + if city is None: + raise TypeError("Missing 'city' argument") + if country is None: + raise TypeError("Missing 'country' argument") + if postal_code is None and 'postalCode' in kwargs: + postal_code = kwargs['postalCode'] + if postal_code is None: + raise TypeError("Missing 'postal_code' argument") + if state is None: + raise TypeError("Missing 'state' argument") + + _setter("addresses", addresses) + _setter("city", city) + _setter("country", country) + _setter("postal_code", postal_code) + _setter("state", state) @property @pulumi.getter @@ -433,12 +561,31 @@ def __init__(__self__, *, :param pulumi.Input[str] comments: Comments related to this status change. :param pulumi.Input[str] last_update: Time of status update. """ + OrderShipmentHistoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_details=additional_details, + comments=comments, + last_update=last_update, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_details: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + comments: Optional[pulumi.Input[str]] = None, + last_update: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_details is None and 'additionalDetails' in kwargs: + additional_details = kwargs['additionalDetails'] + if last_update is None and 'lastUpdate' in kwargs: + last_update = kwargs['lastUpdate'] + if additional_details is not None: - pulumi.set(__self__, "additional_details", additional_details) + _setter("additional_details", additional_details) if comments is not None: - pulumi.set(__self__, "comments", comments) + _setter("comments", comments) if last_update is not None: - pulumi.set(__self__, "last_update", last_update) + _setter("last_update", last_update) @property @pulumi.getter(name="additionalDetails") @@ -490,14 +637,39 @@ def __init__(__self__, *, :param pulumi.Input[str] tracking_id: The ID of the tracking. :param pulumi.Input[str] tracking_url: Tracking URL of the shipment. """ + OrderShipmentTrackingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + carrier_name=carrier_name, + serial_number=serial_number, + tracking_id=tracking_id, + tracking_url=tracking_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + carrier_name: Optional[pulumi.Input[str]] = None, + serial_number: Optional[pulumi.Input[str]] = None, + tracking_id: Optional[pulumi.Input[str]] = None, + tracking_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if carrier_name is None and 'carrierName' in kwargs: + carrier_name = kwargs['carrierName'] + if serial_number is None and 'serialNumber' in kwargs: + serial_number = kwargs['serialNumber'] + if tracking_id is None and 'trackingId' in kwargs: + tracking_id = kwargs['trackingId'] + if tracking_url is None and 'trackingUrl' in kwargs: + tracking_url = kwargs['trackingUrl'] + if carrier_name is not None: - pulumi.set(__self__, "carrier_name", carrier_name) + _setter("carrier_name", carrier_name) if serial_number is not None: - pulumi.set(__self__, "serial_number", serial_number) + _setter("serial_number", serial_number) if tracking_id is not None: - pulumi.set(__self__, "tracking_id", tracking_id) + _setter("tracking_id", tracking_id) if tracking_url is not None: - pulumi.set(__self__, "tracking_url", tracking_url) + _setter("tracking_url", tracking_url) @property @pulumi.getter(name="carrierName") @@ -561,14 +733,35 @@ def __init__(__self__, *, :param pulumi.Input[str] info: The current status of the order. Possible values include `Untracked`, `AwaitingFulfilment`, `AwaitingPreparation`, `AwaitingShipment`, `Shipped`, `Arriving`, `Delivered`, `ReplacementRequested`, `LostDevice`, `Declined`, `ReturnInitiated`, `AwaitingReturnShipment`, `ShippedBack` or `CollectedAtMicrosoft`. :param pulumi.Input[str] last_update: Time of status update. """ + OrderStatusArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_details=additional_details, + comments=comments, + info=info, + last_update=last_update, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_details: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + comments: Optional[pulumi.Input[str]] = None, + info: Optional[pulumi.Input[str]] = None, + last_update: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_details is None and 'additionalDetails' in kwargs: + additional_details = kwargs['additionalDetails'] + if last_update is None and 'lastUpdate' in kwargs: + last_update = kwargs['lastUpdate'] + if additional_details is not None: - pulumi.set(__self__, "additional_details", additional_details) + _setter("additional_details", additional_details) if comments is not None: - pulumi.set(__self__, "comments", comments) + _setter("comments", comments) if info is not None: - pulumi.set(__self__, "info", info) + _setter("info", info) if last_update is not None: - pulumi.set(__self__, "last_update", last_update) + _setter("last_update", last_update) @property @pulumi.getter(name="additionalDetails") diff --git a/sdk/python/pulumi_azure/databoxedge/device.py b/sdk/python/pulumi_azure/databoxedge/device.py index f1791bad98..9fabd53a3a 100644 --- a/sdk/python/pulumi_azure/databoxedge/device.py +++ b/sdk/python/pulumi_azure/databoxedge/device.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Databox Edge Device. Changing this forces a new Databox Edge Device to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Databox Edge Device. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + DeviceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -117,18 +144,45 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_name: The `sku_name` is comprised of two segments separated by a hyphen (e.g. `TEA_1Node_UPS_Heater-Standard`). The first segment of the `sku_name` defines the `name` of the SKU, possible values are `Gateway`, `EdgeMR_Mini`, `EdgeP_Base`, `EdgeP_High`, `EdgePR_Base`, `EdgePR_Base_UPS`, `GPU`, `RCA_Large`, `RCA_Small`, `RDC`, `TCA_Large`, `TCA_Small`, `TDC`, `TEA_1Node`, `TEA_1Node_UPS`, `TEA_1Node_Heater`, `TEA_1Node_UPS_Heater`, `TEA_4Node_Heater`, `TEA_4Node_UPS_Heater` or `TMA`. The second segment defines the `tier` of the `sku_name`, possible values are `Standard`. For more information see the product documentation. Changing this forces a new Databox Edge Device to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Databox Edge Device. """ + _DeviceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + device_properties=device_properties, + location=location, + name=name, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + device_properties: Optional[pulumi.Input[Sequence[pulumi.Input['DeviceDevicePropertyArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if device_properties is None and 'deviceProperties' in kwargs: + device_properties = kwargs['deviceProperties'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if device_properties is not None: - pulumi.set(__self__, "device_properties", device_properties) + _setter("device_properties", device_properties) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="deviceProperties") @@ -286,6 +340,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DeviceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/databoxedge/get_device.py b/sdk/python/pulumi_azure/databoxedge/get_device.py index c27b05531a..54098e07c0 100644 --- a/sdk/python/pulumi_azure/databoxedge/get_device.py +++ b/sdk/python/pulumi_azure/databoxedge/get_device.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/databoxedge/order.py b/sdk/python/pulumi_azure/databoxedge/order.py index 8e9aeae7e9..5bf3e11593 100644 --- a/sdk/python/pulumi_azure/databoxedge/order.py +++ b/sdk/python/pulumi_azure/databoxedge/order.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,10 +27,41 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Databox Edge Order should exist. Changing this forces a new Databox Edge Order to be created. :param pulumi.Input['OrderShipmentAddressArgs'] shipment_address: A `shipment_address` block as defined below. """ - pulumi.set(__self__, "contact", contact) - pulumi.set(__self__, "device_name", device_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "shipment_address", shipment_address) + OrderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + contact=contact, + device_name=device_name, + resource_group_name=resource_group_name, + shipment_address=shipment_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contact: Optional[pulumi.Input['OrderContactArgs']] = None, + device_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + shipment_address: Optional[pulumi.Input['OrderShipmentAddressArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if contact is None: + raise TypeError("Missing 'contact' argument") + if device_name is None and 'deviceName' in kwargs: + device_name = kwargs['deviceName'] + if device_name is None: + raise TypeError("Missing 'device_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if shipment_address is None and 'shipmentAddress' in kwargs: + shipment_address = kwargs['shipmentAddress'] + if shipment_address is None: + raise TypeError("Missing 'shipment_address' argument") + + _setter("contact", contact) + _setter("device_name", device_name) + _setter("resource_group_name", resource_group_name) + _setter("shipment_address", shipment_address) @property @pulumi.getter @@ -107,26 +138,69 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['OrderShipmentTrackingArgs']]] shipment_trackings: Tracking information for the package delivered to the customer whether it has an original or a replacement device. A `shipment_tracking` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['OrderStatusArgs']]] statuses: The current status of the order. A `status` block as defined below. """ + _OrderState._configure( + lambda key, value: pulumi.set(__self__, key, value), + contact=contact, + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + return_trackings=return_trackings, + serial_number=serial_number, + shipment_address=shipment_address, + shipment_histories=shipment_histories, + shipment_trackings=shipment_trackings, + statuses=statuses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contact: Optional[pulumi.Input['OrderContactArgs']] = None, + device_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + return_trackings: Optional[pulumi.Input[Sequence[pulumi.Input['OrderReturnTrackingArgs']]]] = None, + serial_number: Optional[pulumi.Input[str]] = None, + shipment_address: Optional[pulumi.Input['OrderShipmentAddressArgs']] = None, + shipment_histories: Optional[pulumi.Input[Sequence[pulumi.Input['OrderShipmentHistoryArgs']]]] = None, + shipment_trackings: Optional[pulumi.Input[Sequence[pulumi.Input['OrderShipmentTrackingArgs']]]] = None, + statuses: Optional[pulumi.Input[Sequence[pulumi.Input['OrderStatusArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if device_name is None and 'deviceName' in kwargs: + device_name = kwargs['deviceName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if return_trackings is None and 'returnTrackings' in kwargs: + return_trackings = kwargs['returnTrackings'] + if serial_number is None and 'serialNumber' in kwargs: + serial_number = kwargs['serialNumber'] + if shipment_address is None and 'shipmentAddress' in kwargs: + shipment_address = kwargs['shipmentAddress'] + if shipment_histories is None and 'shipmentHistories' in kwargs: + shipment_histories = kwargs['shipmentHistories'] + if shipment_trackings is None and 'shipmentTrackings' in kwargs: + shipment_trackings = kwargs['shipmentTrackings'] + if contact is not None: - pulumi.set(__self__, "contact", contact) + _setter("contact", contact) if device_name is not None: - pulumi.set(__self__, "device_name", device_name) + _setter("device_name", device_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if return_trackings is not None: - pulumi.set(__self__, "return_trackings", return_trackings) + _setter("return_trackings", return_trackings) if serial_number is not None: - pulumi.set(__self__, "serial_number", serial_number) + _setter("serial_number", serial_number) if shipment_address is not None: - pulumi.set(__self__, "shipment_address", shipment_address) + _setter("shipment_address", shipment_address) if shipment_histories is not None: - pulumi.set(__self__, "shipment_histories", shipment_histories) + _setter("shipment_histories", shipment_histories) if shipment_trackings is not None: - pulumi.set(__self__, "shipment_trackings", shipment_trackings) + _setter("shipment_trackings", shipment_trackings) if statuses is not None: - pulumi.set(__self__, "statuses", statuses) + _setter("statuses", statuses) @property @pulumi.getter @@ -366,6 +440,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OrderArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -384,6 +462,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = OrderArgs.__new__(OrderArgs) + if contact is not None and not isinstance(contact, OrderContactArgs): + contact = contact or {} + def _setter(key, value): + contact[key] = value + OrderContactArgs._configure(_setter, **contact) if contact is None and not opts.urn: raise TypeError("Missing required property 'contact'") __props__.__dict__["contact"] = contact @@ -393,6 +476,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if shipment_address is not None and not isinstance(shipment_address, OrderShipmentAddressArgs): + shipment_address = shipment_address or {} + def _setter(key, value): + shipment_address[key] = value + OrderShipmentAddressArgs._configure(_setter, **shipment_address) if shipment_address is None and not opts.urn: raise TypeError("Missing required property 'shipment_address'") __props__.__dict__["shipment_address"] = shipment_address diff --git a/sdk/python/pulumi_azure/databoxedge/outputs.py b/sdk/python/pulumi_azure/databoxedge/outputs.py index 3da97b1730..01f6cc37fc 100644 --- a/sdk/python/pulumi_azure/databoxedge/outputs.py +++ b/sdk/python/pulumi_azure/databoxedge/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -74,28 +74,71 @@ def __init__(__self__, *, :param str time_zone: The Data Box Edge/Gateway device timezone. :param str type: The type of the Data Box Edge/Gateway device. """ + DeviceDeviceProperty._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + configured_role_types=configured_role_types, + culture=culture, + hcs_version=hcs_version, + model=model, + node_count=node_count, + serial_number=serial_number, + software_version=software_version, + status=status, + time_zone=time_zone, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + configured_role_types: Optional[Sequence[str]] = None, + culture: Optional[str] = None, + hcs_version: Optional[str] = None, + model: Optional[str] = None, + node_count: Optional[int] = None, + serial_number: Optional[str] = None, + software_version: Optional[str] = None, + status: Optional[str] = None, + time_zone: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if configured_role_types is None and 'configuredRoleTypes' in kwargs: + configured_role_types = kwargs['configuredRoleTypes'] + if hcs_version is None and 'hcsVersion' in kwargs: + hcs_version = kwargs['hcsVersion'] + if node_count is None and 'nodeCount' in kwargs: + node_count = kwargs['nodeCount'] + if serial_number is None and 'serialNumber' in kwargs: + serial_number = kwargs['serialNumber'] + if software_version is None and 'softwareVersion' in kwargs: + software_version = kwargs['softwareVersion'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if configured_role_types is not None: - pulumi.set(__self__, "configured_role_types", configured_role_types) + _setter("configured_role_types", configured_role_types) if culture is not None: - pulumi.set(__self__, "culture", culture) + _setter("culture", culture) if hcs_version is not None: - pulumi.set(__self__, "hcs_version", hcs_version) + _setter("hcs_version", hcs_version) if model is not None: - pulumi.set(__self__, "model", model) + _setter("model", model) if node_count is not None: - pulumi.set(__self__, "node_count", node_count) + _setter("node_count", node_count) if serial_number is not None: - pulumi.set(__self__, "serial_number", serial_number) + _setter("serial_number", serial_number) if software_version is not None: - pulumi.set(__self__, "software_version", software_version) + _setter("software_version", software_version) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -218,10 +261,39 @@ def __init__(__self__, *, :param str name: The contact person name. Changing this forces a new Databox Edge Order to be created. :param str phone_number: The phone number. Changing this forces a new Databox Edge Order to be created. """ - pulumi.set(__self__, "company_name", company_name) - pulumi.set(__self__, "emails", emails) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "phone_number", phone_number) + OrderContact._configure( + lambda key, value: pulumi.set(__self__, key, value), + company_name=company_name, + emails=emails, + name=name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + company_name: Optional[str] = None, + emails: Optional[Sequence[str]] = None, + name: Optional[str] = None, + phone_number: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if company_name is None and 'companyName' in kwargs: + company_name = kwargs['companyName'] + if company_name is None: + raise TypeError("Missing 'company_name' argument") + if emails is None: + raise TypeError("Missing 'emails' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("company_name", company_name) + _setter("emails", emails) + _setter("name", name) + _setter("phone_number", phone_number) @property @pulumi.getter(name="companyName") @@ -292,14 +364,39 @@ def __init__(__self__, *, :param str tracking_id: The ID of the tracking. :param str tracking_url: Tracking URL of the shipment. """ + OrderReturnTracking._configure( + lambda key, value: pulumi.set(__self__, key, value), + carrier_name=carrier_name, + serial_number=serial_number, + tracking_id=tracking_id, + tracking_url=tracking_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + carrier_name: Optional[str] = None, + serial_number: Optional[str] = None, + tracking_id: Optional[str] = None, + tracking_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if carrier_name is None and 'carrierName' in kwargs: + carrier_name = kwargs['carrierName'] + if serial_number is None and 'serialNumber' in kwargs: + serial_number = kwargs['serialNumber'] + if tracking_id is None and 'trackingId' in kwargs: + tracking_id = kwargs['trackingId'] + if tracking_url is None and 'trackingUrl' in kwargs: + tracking_url = kwargs['trackingUrl'] + if carrier_name is not None: - pulumi.set(__self__, "carrier_name", carrier_name) + _setter("carrier_name", carrier_name) if serial_number is not None: - pulumi.set(__self__, "serial_number", serial_number) + _setter("serial_number", serial_number) if tracking_id is not None: - pulumi.set(__self__, "tracking_id", tracking_id) + _setter("tracking_id", tracking_id) if tracking_url is not None: - pulumi.set(__self__, "tracking_url", tracking_url) + _setter("tracking_url", tracking_url) @property @pulumi.getter(name="carrierName") @@ -366,11 +463,42 @@ def __init__(__self__, *, :param str postal_code: The postal code. Changing this forces a new Databox Edge Order to be created. :param str state: The name of the state to ship the Databox Edge Device to. Changing this forces a new Databox Edge Order to be created. """ - pulumi.set(__self__, "addresses", addresses) - pulumi.set(__self__, "city", city) - pulumi.set(__self__, "country", country) - pulumi.set(__self__, "postal_code", postal_code) - pulumi.set(__self__, "state", state) + OrderShipmentAddress._configure( + lambda key, value: pulumi.set(__self__, key, value), + addresses=addresses, + city=city, + country=country, + postal_code=postal_code, + state=state, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + addresses: Optional[Sequence[str]] = None, + city: Optional[str] = None, + country: Optional[str] = None, + postal_code: Optional[str] = None, + state: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if addresses is None: + raise TypeError("Missing 'addresses' argument") + if city is None: + raise TypeError("Missing 'city' argument") + if country is None: + raise TypeError("Missing 'country' argument") + if postal_code is None and 'postalCode' in kwargs: + postal_code = kwargs['postalCode'] + if postal_code is None: + raise TypeError("Missing 'postal_code' argument") + if state is None: + raise TypeError("Missing 'state' argument") + + _setter("addresses", addresses) + _setter("city", city) + _setter("country", country) + _setter("postal_code", postal_code) + _setter("state", state) @property @pulumi.getter @@ -443,12 +571,31 @@ def __init__(__self__, *, :param str comments: Comments related to this status change. :param str last_update: Time of status update. """ + OrderShipmentHistory._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_details=additional_details, + comments=comments, + last_update=last_update, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_details: Optional[Mapping[str, str]] = None, + comments: Optional[str] = None, + last_update: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_details is None and 'additionalDetails' in kwargs: + additional_details = kwargs['additionalDetails'] + if last_update is None and 'lastUpdate' in kwargs: + last_update = kwargs['lastUpdate'] + if additional_details is not None: - pulumi.set(__self__, "additional_details", additional_details) + _setter("additional_details", additional_details) if comments is not None: - pulumi.set(__self__, "comments", comments) + _setter("comments", comments) if last_update is not None: - pulumi.set(__self__, "last_update", last_update) + _setter("last_update", last_update) @property @pulumi.getter(name="additionalDetails") @@ -511,14 +658,39 @@ def __init__(__self__, *, :param str tracking_id: The ID of the tracking. :param str tracking_url: Tracking URL of the shipment. """ + OrderShipmentTracking._configure( + lambda key, value: pulumi.set(__self__, key, value), + carrier_name=carrier_name, + serial_number=serial_number, + tracking_id=tracking_id, + tracking_url=tracking_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + carrier_name: Optional[str] = None, + serial_number: Optional[str] = None, + tracking_id: Optional[str] = None, + tracking_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if carrier_name is None and 'carrierName' in kwargs: + carrier_name = kwargs['carrierName'] + if serial_number is None and 'serialNumber' in kwargs: + serial_number = kwargs['serialNumber'] + if tracking_id is None and 'trackingId' in kwargs: + tracking_id = kwargs['trackingId'] + if tracking_url is None and 'trackingUrl' in kwargs: + tracking_url = kwargs['trackingUrl'] + if carrier_name is not None: - pulumi.set(__self__, "carrier_name", carrier_name) + _setter("carrier_name", carrier_name) if serial_number is not None: - pulumi.set(__self__, "serial_number", serial_number) + _setter("serial_number", serial_number) if tracking_id is not None: - pulumi.set(__self__, "tracking_id", tracking_id) + _setter("tracking_id", tracking_id) if tracking_url is not None: - pulumi.set(__self__, "tracking_url", tracking_url) + _setter("tracking_url", tracking_url) @property @pulumi.getter(name="carrierName") @@ -585,14 +757,35 @@ def __init__(__self__, *, :param str info: The current status of the order. Possible values include `Untracked`, `AwaitingFulfilment`, `AwaitingPreparation`, `AwaitingShipment`, `Shipped`, `Arriving`, `Delivered`, `ReplacementRequested`, `LostDevice`, `Declined`, `ReturnInitiated`, `AwaitingReturnShipment`, `ShippedBack` or `CollectedAtMicrosoft`. :param str last_update: Time of status update. """ + OrderStatus._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_details=additional_details, + comments=comments, + info=info, + last_update=last_update, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_details: Optional[Mapping[str, str]] = None, + comments: Optional[str] = None, + info: Optional[str] = None, + last_update: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_details is None and 'additionalDetails' in kwargs: + additional_details = kwargs['additionalDetails'] + if last_update is None and 'lastUpdate' in kwargs: + last_update = kwargs['lastUpdate'] + if additional_details is not None: - pulumi.set(__self__, "additional_details", additional_details) + _setter("additional_details", additional_details) if comments is not None: - pulumi.set(__self__, "comments", comments) + _setter("comments", comments) if info is not None: - pulumi.set(__self__, "info", info) + _setter("info", info) if last_update is not None: - pulumi.set(__self__, "last_update", last_update) + _setter("last_update", last_update) @property @pulumi.getter(name="additionalDetails") @@ -654,17 +847,82 @@ def __init__(__self__, *, :param str time_zone: The Data Box Edge/Gateway device timezone. :param str type: The type of the Data Box Edge/Gateway device. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "configured_role_types", configured_role_types) - pulumi.set(__self__, "culture", culture) - pulumi.set(__self__, "hcs_version", hcs_version) - pulumi.set(__self__, "model", model) - pulumi.set(__self__, "node_count", node_count) - pulumi.set(__self__, "serial_number", serial_number) - pulumi.set(__self__, "software_version", software_version) - pulumi.set(__self__, "status", status) - pulumi.set(__self__, "time_zone", time_zone) - pulumi.set(__self__, "type", type) + GetDeviceDevicePropertyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + configured_role_types=configured_role_types, + culture=culture, + hcs_version=hcs_version, + model=model, + node_count=node_count, + serial_number=serial_number, + software_version=software_version, + status=status, + time_zone=time_zone, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + configured_role_types: Optional[Sequence[str]] = None, + culture: Optional[str] = None, + hcs_version: Optional[str] = None, + model: Optional[str] = None, + node_count: Optional[int] = None, + serial_number: Optional[str] = None, + software_version: Optional[str] = None, + status: Optional[str] = None, + time_zone: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if configured_role_types is None and 'configuredRoleTypes' in kwargs: + configured_role_types = kwargs['configuredRoleTypes'] + if configured_role_types is None: + raise TypeError("Missing 'configured_role_types' argument") + if culture is None: + raise TypeError("Missing 'culture' argument") + if hcs_version is None and 'hcsVersion' in kwargs: + hcs_version = kwargs['hcsVersion'] + if hcs_version is None: + raise TypeError("Missing 'hcs_version' argument") + if model is None: + raise TypeError("Missing 'model' argument") + if node_count is None and 'nodeCount' in kwargs: + node_count = kwargs['nodeCount'] + if node_count is None: + raise TypeError("Missing 'node_count' argument") + if serial_number is None and 'serialNumber' in kwargs: + serial_number = kwargs['serialNumber'] + if serial_number is None: + raise TypeError("Missing 'serial_number' argument") + if software_version is None and 'softwareVersion' in kwargs: + software_version = kwargs['softwareVersion'] + if software_version is None: + raise TypeError("Missing 'software_version' argument") + if status is None: + raise TypeError("Missing 'status' argument") + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if time_zone is None: + raise TypeError("Missing 'time_zone' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("capacity", capacity) + _setter("configured_role_types", configured_role_types) + _setter("culture", culture) + _setter("hcs_version", hcs_version) + _setter("model", model) + _setter("node_count", node_count) + _setter("serial_number", serial_number) + _setter("software_version", software_version) + _setter("status", status) + _setter("time_zone", time_zone) + _setter("type", type) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/databricks/_inputs.py b/sdk/python/pulumi_azure/databricks/_inputs.py index 74a17f2796..d945794ba8 100644 --- a/sdk/python/pulumi_azure/databricks/_inputs.py +++ b/sdk/python/pulumi_azure/databricks/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -31,13 +31,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID of the System Assigned Managed Service Identity that is configured on this Access Connector. :param pulumi.Input[str] tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Access Connector. """ - pulumi.set(__self__, "type", type) + AccessConnectorIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -123,30 +148,87 @@ def __init__(__self__, *, > **NOTE** Databricks requires that a network security group is associated with the `public` and `private` subnets when a `virtual_network_id` has been defined. Both `public` and `private` subnets must be delegated to `Microsoft.Databricks/workspaces`. For more information about subnet delegation see the [product documentation](https://docs.microsoft.com/azure/virtual-network/subnet-delegation-overview). """ + WorkspaceCustomParametersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + machine_learning_workspace_id=machine_learning_workspace_id, + nat_gateway_name=nat_gateway_name, + no_public_ip=no_public_ip, + private_subnet_name=private_subnet_name, + private_subnet_network_security_group_association_id=private_subnet_network_security_group_association_id, + public_ip_name=public_ip_name, + public_subnet_name=public_subnet_name, + public_subnet_network_security_group_association_id=public_subnet_network_security_group_association_id, + storage_account_name=storage_account_name, + storage_account_sku_name=storage_account_sku_name, + virtual_network_id=virtual_network_id, + vnet_address_prefix=vnet_address_prefix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + machine_learning_workspace_id: Optional[pulumi.Input[str]] = None, + nat_gateway_name: Optional[pulumi.Input[str]] = None, + no_public_ip: Optional[pulumi.Input[bool]] = None, + private_subnet_name: Optional[pulumi.Input[str]] = None, + private_subnet_network_security_group_association_id: Optional[pulumi.Input[str]] = None, + public_ip_name: Optional[pulumi.Input[str]] = None, + public_subnet_name: Optional[pulumi.Input[str]] = None, + public_subnet_network_security_group_association_id: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_account_sku_name: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + vnet_address_prefix: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if machine_learning_workspace_id is None and 'machineLearningWorkspaceId' in kwargs: + machine_learning_workspace_id = kwargs['machineLearningWorkspaceId'] + if nat_gateway_name is None and 'natGatewayName' in kwargs: + nat_gateway_name = kwargs['natGatewayName'] + if no_public_ip is None and 'noPublicIp' in kwargs: + no_public_ip = kwargs['noPublicIp'] + if private_subnet_name is None and 'privateSubnetName' in kwargs: + private_subnet_name = kwargs['privateSubnetName'] + if private_subnet_network_security_group_association_id is None and 'privateSubnetNetworkSecurityGroupAssociationId' in kwargs: + private_subnet_network_security_group_association_id = kwargs['privateSubnetNetworkSecurityGroupAssociationId'] + if public_ip_name is None and 'publicIpName' in kwargs: + public_ip_name = kwargs['publicIpName'] + if public_subnet_name is None and 'publicSubnetName' in kwargs: + public_subnet_name = kwargs['publicSubnetName'] + if public_subnet_network_security_group_association_id is None and 'publicSubnetNetworkSecurityGroupAssociationId' in kwargs: + public_subnet_network_security_group_association_id = kwargs['publicSubnetNetworkSecurityGroupAssociationId'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_sku_name is None and 'storageAccountSkuName' in kwargs: + storage_account_sku_name = kwargs['storageAccountSkuName'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if vnet_address_prefix is None and 'vnetAddressPrefix' in kwargs: + vnet_address_prefix = kwargs['vnetAddressPrefix'] + if machine_learning_workspace_id is not None: - pulumi.set(__self__, "machine_learning_workspace_id", machine_learning_workspace_id) + _setter("machine_learning_workspace_id", machine_learning_workspace_id) if nat_gateway_name is not None: - pulumi.set(__self__, "nat_gateway_name", nat_gateway_name) + _setter("nat_gateway_name", nat_gateway_name) if no_public_ip is not None: - pulumi.set(__self__, "no_public_ip", no_public_ip) + _setter("no_public_ip", no_public_ip) if private_subnet_name is not None: - pulumi.set(__self__, "private_subnet_name", private_subnet_name) + _setter("private_subnet_name", private_subnet_name) if private_subnet_network_security_group_association_id is not None: - pulumi.set(__self__, "private_subnet_network_security_group_association_id", private_subnet_network_security_group_association_id) + _setter("private_subnet_network_security_group_association_id", private_subnet_network_security_group_association_id) if public_ip_name is not None: - pulumi.set(__self__, "public_ip_name", public_ip_name) + _setter("public_ip_name", public_ip_name) if public_subnet_name is not None: - pulumi.set(__self__, "public_subnet_name", public_subnet_name) + _setter("public_subnet_name", public_subnet_name) if public_subnet_network_security_group_association_id is not None: - pulumi.set(__self__, "public_subnet_network_security_group_association_id", public_subnet_network_security_group_association_id) + _setter("public_subnet_network_security_group_association_id", public_subnet_network_security_group_association_id) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_account_sku_name is not None: - pulumi.set(__self__, "storage_account_sku_name", storage_account_sku_name) + _setter("storage_account_sku_name", storage_account_sku_name) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) if vnet_address_prefix is not None: - pulumi.set(__self__, "vnet_address_prefix", vnet_address_prefix) + _setter("vnet_address_prefix", vnet_address_prefix) @property @pulumi.getter(name="machineLearningWorkspaceId") @@ -308,12 +390,31 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The UUID of the tenant where the internal databricks storage account was created. :param pulumi.Input[str] type: The type of the internal databricks storage account. """ + WorkspaceManagedDiskIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="principalId") @@ -363,12 +464,31 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The UUID of the tenant where the internal databricks storage account was created. :param pulumi.Input[str] type: The type of the internal databricks storage account. """ + WorkspaceStorageAccountIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="principalId") diff --git a/sdk/python/pulumi_azure/databricks/access_connector.py b/sdk/python/pulumi_azure/databricks/access_connector.py index f2afb3e861..eed3e403bc 100644 --- a/sdk/python/pulumi_azure/databricks/access_connector.py +++ b/sdk/python/pulumi_azure/databricks/access_connector.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,15 +29,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Databricks Access Connector resource. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + AccessConnectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + identity=identity, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['AccessConnectorIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -116,16 +139,37 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the Databricks Access Connector should exist. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _AccessConnectorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity=identity, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity: Optional[pulumi.Input['AccessConnectorIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -281,6 +325,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccessConnectorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -300,6 +348,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = AccessConnectorArgs.__new__(AccessConnectorArgs) + if identity is not None and not isinstance(identity, AccessConnectorIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + AccessConnectorIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/databricks/get_workspace.py b/sdk/python/pulumi_azure/databricks/get_workspace.py index 053a501eb6..78e71f5c0f 100644 --- a/sdk/python/pulumi_azure/databricks/get_workspace.py +++ b/sdk/python/pulumi_azure/databricks/get_workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/databricks/get_workspace_private_endpoint_connection.py b/sdk/python/pulumi_azure/databricks/get_workspace_private_endpoint_connection.py index ff7baa54d4..505c82a66e 100644 --- a/sdk/python/pulumi_azure/databricks/get_workspace_private_endpoint_connection.py +++ b/sdk/python/pulumi_azure/databricks/get_workspace_private_endpoint_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/databricks/outputs.py b/sdk/python/pulumi_azure/databricks/outputs.py index 3e92df40ae..62910dd758 100644 --- a/sdk/python/pulumi_azure/databricks/outputs.py +++ b/sdk/python/pulumi_azure/databricks/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -55,13 +55,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID of the System Assigned Managed Service Identity that is configured on this Access Connector. :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Access Connector. """ - pulumi.set(__self__, "type", type) + AccessConnectorIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -170,30 +195,87 @@ def __init__(__self__, *, > **NOTE** Databricks requires that a network security group is associated with the `public` and `private` subnets when a `virtual_network_id` has been defined. Both `public` and `private` subnets must be delegated to `Microsoft.Databricks/workspaces`. For more information about subnet delegation see the [product documentation](https://docs.microsoft.com/azure/virtual-network/subnet-delegation-overview). """ + WorkspaceCustomParameters._configure( + lambda key, value: pulumi.set(__self__, key, value), + machine_learning_workspace_id=machine_learning_workspace_id, + nat_gateway_name=nat_gateway_name, + no_public_ip=no_public_ip, + private_subnet_name=private_subnet_name, + private_subnet_network_security_group_association_id=private_subnet_network_security_group_association_id, + public_ip_name=public_ip_name, + public_subnet_name=public_subnet_name, + public_subnet_network_security_group_association_id=public_subnet_network_security_group_association_id, + storage_account_name=storage_account_name, + storage_account_sku_name=storage_account_sku_name, + virtual_network_id=virtual_network_id, + vnet_address_prefix=vnet_address_prefix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + machine_learning_workspace_id: Optional[str] = None, + nat_gateway_name: Optional[str] = None, + no_public_ip: Optional[bool] = None, + private_subnet_name: Optional[str] = None, + private_subnet_network_security_group_association_id: Optional[str] = None, + public_ip_name: Optional[str] = None, + public_subnet_name: Optional[str] = None, + public_subnet_network_security_group_association_id: Optional[str] = None, + storage_account_name: Optional[str] = None, + storage_account_sku_name: Optional[str] = None, + virtual_network_id: Optional[str] = None, + vnet_address_prefix: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if machine_learning_workspace_id is None and 'machineLearningWorkspaceId' in kwargs: + machine_learning_workspace_id = kwargs['machineLearningWorkspaceId'] + if nat_gateway_name is None and 'natGatewayName' in kwargs: + nat_gateway_name = kwargs['natGatewayName'] + if no_public_ip is None and 'noPublicIp' in kwargs: + no_public_ip = kwargs['noPublicIp'] + if private_subnet_name is None and 'privateSubnetName' in kwargs: + private_subnet_name = kwargs['privateSubnetName'] + if private_subnet_network_security_group_association_id is None and 'privateSubnetNetworkSecurityGroupAssociationId' in kwargs: + private_subnet_network_security_group_association_id = kwargs['privateSubnetNetworkSecurityGroupAssociationId'] + if public_ip_name is None and 'publicIpName' in kwargs: + public_ip_name = kwargs['publicIpName'] + if public_subnet_name is None and 'publicSubnetName' in kwargs: + public_subnet_name = kwargs['publicSubnetName'] + if public_subnet_network_security_group_association_id is None and 'publicSubnetNetworkSecurityGroupAssociationId' in kwargs: + public_subnet_network_security_group_association_id = kwargs['publicSubnetNetworkSecurityGroupAssociationId'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_sku_name is None and 'storageAccountSkuName' in kwargs: + storage_account_sku_name = kwargs['storageAccountSkuName'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if vnet_address_prefix is None and 'vnetAddressPrefix' in kwargs: + vnet_address_prefix = kwargs['vnetAddressPrefix'] + if machine_learning_workspace_id is not None: - pulumi.set(__self__, "machine_learning_workspace_id", machine_learning_workspace_id) + _setter("machine_learning_workspace_id", machine_learning_workspace_id) if nat_gateway_name is not None: - pulumi.set(__self__, "nat_gateway_name", nat_gateway_name) + _setter("nat_gateway_name", nat_gateway_name) if no_public_ip is not None: - pulumi.set(__self__, "no_public_ip", no_public_ip) + _setter("no_public_ip", no_public_ip) if private_subnet_name is not None: - pulumi.set(__self__, "private_subnet_name", private_subnet_name) + _setter("private_subnet_name", private_subnet_name) if private_subnet_network_security_group_association_id is not None: - pulumi.set(__self__, "private_subnet_network_security_group_association_id", private_subnet_network_security_group_association_id) + _setter("private_subnet_network_security_group_association_id", private_subnet_network_security_group_association_id) if public_ip_name is not None: - pulumi.set(__self__, "public_ip_name", public_ip_name) + _setter("public_ip_name", public_ip_name) if public_subnet_name is not None: - pulumi.set(__self__, "public_subnet_name", public_subnet_name) + _setter("public_subnet_name", public_subnet_name) if public_subnet_network_security_group_association_id is not None: - pulumi.set(__self__, "public_subnet_network_security_group_association_id", public_subnet_network_security_group_association_id) + _setter("public_subnet_network_security_group_association_id", public_subnet_network_security_group_association_id) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_account_sku_name is not None: - pulumi.set(__self__, "storage_account_sku_name", storage_account_sku_name) + _setter("storage_account_sku_name", storage_account_sku_name) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) if vnet_address_prefix is not None: - pulumi.set(__self__, "vnet_address_prefix", vnet_address_prefix) + _setter("vnet_address_prefix", vnet_address_prefix) @property @pulumi.getter(name="machineLearningWorkspaceId") @@ -326,12 +408,31 @@ def __init__(__self__, *, :param str tenant_id: The UUID of the tenant where the internal databricks storage account was created. :param str type: The type of the internal databricks storage account. """ + WorkspaceManagedDiskIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="principalId") @@ -388,12 +489,31 @@ def __init__(__self__, *, :param str tenant_id: The UUID of the tenant where the internal databricks storage account was created. :param str type: The type of the internal databricks storage account. """ + WorkspaceStorageAccountIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="principalId") @@ -431,9 +551,34 @@ def __init__(__self__, *, :param str tenant_id: The UUID of the tenant where the internal databricks storage account was created. :param str type: The type of the internal databricks storage account. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetWorkspaceManagedDiskIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="principalId") @@ -475,11 +620,44 @@ def __init__(__self__, *, :param str status: The status of a private endpoint connection. Possible values are `Pending`, `Approved`, `Rejected` or `Disconnected`. :param str workspace_private_endpoint_id: The Databricks Workspace resource ID for the private link endpoint. """ - pulumi.set(__self__, "action_required", action_required) - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "status", status) - pulumi.set(__self__, "workspace_private_endpoint_id", workspace_private_endpoint_id) + GetWorkspacePrivateEndpointConnectionConnectionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_required=action_required, + description=description, + name=name, + status=status, + workspace_private_endpoint_id=workspace_private_endpoint_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_required: Optional[str] = None, + description: Optional[str] = None, + name: Optional[str] = None, + status: Optional[str] = None, + workspace_private_endpoint_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_required is None and 'actionRequired' in kwargs: + action_required = kwargs['actionRequired'] + if action_required is None: + raise TypeError("Missing 'action_required' argument") + if description is None: + raise TypeError("Missing 'description' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if status is None: + raise TypeError("Missing 'status' argument") + if workspace_private_endpoint_id is None and 'workspacePrivateEndpointId' in kwargs: + workspace_private_endpoint_id = kwargs['workspacePrivateEndpointId'] + if workspace_private_endpoint_id is None: + raise TypeError("Missing 'workspace_private_endpoint_id' argument") + + _setter("action_required", action_required) + _setter("description", description) + _setter("name", name) + _setter("status", status) + _setter("workspace_private_endpoint_id", workspace_private_endpoint_id) @property @pulumi.getter(name="actionRequired") @@ -533,9 +711,34 @@ def __init__(__self__, *, :param str tenant_id: The UUID of the tenant where the internal databricks storage account was created. :param str type: The type of the internal databricks storage account. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetWorkspaceStorageAccountIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="principalId") diff --git a/sdk/python/pulumi_azure/databricks/virtual_network_peering.py b/sdk/python/pulumi_azure/databricks/virtual_network_peering.py index 2487ebc19f..e828afc63c 100644 --- a/sdk/python/pulumi_azure/databricks/virtual_network_peering.py +++ b/sdk/python/pulumi_azure/databricks/virtual_network_peering.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VirtualNetworkPeeringArgs', 'VirtualNetworkPeering'] @@ -39,20 +39,71 @@ def __init__(__self__, *, > **NOTE:** If the `use_remote_gateways` is set to `true`, and `allow_gateway_transit` on the remote peering is also `true`, the virtual network will use the gateways of the remote virtual network for transit. Only one peering can have this flag set to `true`. `use_remote_gateways` cannot be set if the virtual network already has a gateway. """ - pulumi.set(__self__, "remote_address_space_prefixes", remote_address_space_prefixes) - pulumi.set(__self__, "remote_virtual_network_id", remote_virtual_network_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "workspace_id", workspace_id) + VirtualNetworkPeeringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + remote_address_space_prefixes=remote_address_space_prefixes, + remote_virtual_network_id=remote_virtual_network_id, + resource_group_name=resource_group_name, + workspace_id=workspace_id, + allow_forwarded_traffic=allow_forwarded_traffic, + allow_gateway_transit=allow_gateway_transit, + allow_virtual_network_access=allow_virtual_network_access, + name=name, + use_remote_gateways=use_remote_gateways, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + remote_address_space_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + remote_virtual_network_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + allow_forwarded_traffic: Optional[pulumi.Input[bool]] = None, + allow_gateway_transit: Optional[pulumi.Input[bool]] = None, + allow_virtual_network_access: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + use_remote_gateways: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if remote_address_space_prefixes is None and 'remoteAddressSpacePrefixes' in kwargs: + remote_address_space_prefixes = kwargs['remoteAddressSpacePrefixes'] + if remote_address_space_prefixes is None: + raise TypeError("Missing 'remote_address_space_prefixes' argument") + if remote_virtual_network_id is None and 'remoteVirtualNetworkId' in kwargs: + remote_virtual_network_id = kwargs['remoteVirtualNetworkId'] + if remote_virtual_network_id is None: + raise TypeError("Missing 'remote_virtual_network_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if allow_forwarded_traffic is None and 'allowForwardedTraffic' in kwargs: + allow_forwarded_traffic = kwargs['allowForwardedTraffic'] + if allow_gateway_transit is None and 'allowGatewayTransit' in kwargs: + allow_gateway_transit = kwargs['allowGatewayTransit'] + if allow_virtual_network_access is None and 'allowVirtualNetworkAccess' in kwargs: + allow_virtual_network_access = kwargs['allowVirtualNetworkAccess'] + if use_remote_gateways is None and 'useRemoteGateways' in kwargs: + use_remote_gateways = kwargs['useRemoteGateways'] + + _setter("remote_address_space_prefixes", remote_address_space_prefixes) + _setter("remote_virtual_network_id", remote_virtual_network_id) + _setter("resource_group_name", resource_group_name) + _setter("workspace_id", workspace_id) if allow_forwarded_traffic is not None: - pulumi.set(__self__, "allow_forwarded_traffic", allow_forwarded_traffic) + _setter("allow_forwarded_traffic", allow_forwarded_traffic) if allow_gateway_transit is not None: - pulumi.set(__self__, "allow_gateway_transit", allow_gateway_transit) + _setter("allow_gateway_transit", allow_gateway_transit) if allow_virtual_network_access is not None: - pulumi.set(__self__, "allow_virtual_network_access", allow_virtual_network_access) + _setter("allow_virtual_network_access", allow_virtual_network_access) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if use_remote_gateways is not None: - pulumi.set(__self__, "use_remote_gateways", use_remote_gateways) + _setter("use_remote_gateways", use_remote_gateways) @property @pulumi.getter(name="remoteAddressSpacePrefixes") @@ -201,28 +252,79 @@ def __init__(__self__, *, > **NOTE:** The `virtual_network_id` field is the value you must supply to the `network.VirtualNetworkPeering` resources `remote_virtual_network_id` field to successfully peer the Databricks Virtual Network with the remote virtual network. :param pulumi.Input[str] workspace_id: The ID of the Databricks Workspace that this Databricks Virtual Network Peering is bound. Changing this forces a new resource to be created. """ + _VirtualNetworkPeeringState._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_space_prefixes=address_space_prefixes, + allow_forwarded_traffic=allow_forwarded_traffic, + allow_gateway_transit=allow_gateway_transit, + allow_virtual_network_access=allow_virtual_network_access, + name=name, + remote_address_space_prefixes=remote_address_space_prefixes, + remote_virtual_network_id=remote_virtual_network_id, + resource_group_name=resource_group_name, + use_remote_gateways=use_remote_gateways, + virtual_network_id=virtual_network_id, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_space_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allow_forwarded_traffic: Optional[pulumi.Input[bool]] = None, + allow_gateway_transit: Optional[pulumi.Input[bool]] = None, + allow_virtual_network_access: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + remote_address_space_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + remote_virtual_network_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + use_remote_gateways: Optional[pulumi.Input[bool]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_space_prefixes is None and 'addressSpacePrefixes' in kwargs: + address_space_prefixes = kwargs['addressSpacePrefixes'] + if allow_forwarded_traffic is None and 'allowForwardedTraffic' in kwargs: + allow_forwarded_traffic = kwargs['allowForwardedTraffic'] + if allow_gateway_transit is None and 'allowGatewayTransit' in kwargs: + allow_gateway_transit = kwargs['allowGatewayTransit'] + if allow_virtual_network_access is None and 'allowVirtualNetworkAccess' in kwargs: + allow_virtual_network_access = kwargs['allowVirtualNetworkAccess'] + if remote_address_space_prefixes is None and 'remoteAddressSpacePrefixes' in kwargs: + remote_address_space_prefixes = kwargs['remoteAddressSpacePrefixes'] + if remote_virtual_network_id is None and 'remoteVirtualNetworkId' in kwargs: + remote_virtual_network_id = kwargs['remoteVirtualNetworkId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if use_remote_gateways is None and 'useRemoteGateways' in kwargs: + use_remote_gateways = kwargs['useRemoteGateways'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if address_space_prefixes is not None: - pulumi.set(__self__, "address_space_prefixes", address_space_prefixes) + _setter("address_space_prefixes", address_space_prefixes) if allow_forwarded_traffic is not None: - pulumi.set(__self__, "allow_forwarded_traffic", allow_forwarded_traffic) + _setter("allow_forwarded_traffic", allow_forwarded_traffic) if allow_gateway_transit is not None: - pulumi.set(__self__, "allow_gateway_transit", allow_gateway_transit) + _setter("allow_gateway_transit", allow_gateway_transit) if allow_virtual_network_access is not None: - pulumi.set(__self__, "allow_virtual_network_access", allow_virtual_network_access) + _setter("allow_virtual_network_access", allow_virtual_network_access) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if remote_address_space_prefixes is not None: - pulumi.set(__self__, "remote_address_space_prefixes", remote_address_space_prefixes) + _setter("remote_address_space_prefixes", remote_address_space_prefixes) if remote_virtual_network_id is not None: - pulumi.set(__self__, "remote_virtual_network_id", remote_virtual_network_id) + _setter("remote_virtual_network_id", remote_virtual_network_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if use_remote_gateways is not None: - pulumi.set(__self__, "use_remote_gateways", use_remote_gateways) + _setter("use_remote_gateways", use_remote_gateways) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="addressSpacePrefixes") @@ -488,6 +590,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkPeeringArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/databricks/workspace.py b/sdk/python/pulumi_azure/databricks/workspace.py index d90205d241..79f09c1217 100644 --- a/sdk/python/pulumi_azure/databricks/workspace.py +++ b/sdk/python/pulumi_azure/databricks/workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -53,34 +53,99 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Allow public access for accessing workspace. Set value to `false` to access workspace only via private link endpoint. Possible values include `true` or `false`. Defaults to `true`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + WorkspaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + custom_parameters=custom_parameters, + customer_managed_key_enabled=customer_managed_key_enabled, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + load_balancer_backend_address_pool_id=load_balancer_backend_address_pool_id, + location=location, + managed_disk_cmk_key_vault_key_id=managed_disk_cmk_key_vault_key_id, + managed_disk_cmk_rotation_to_latest_version_enabled=managed_disk_cmk_rotation_to_latest_version_enabled, + managed_resource_group_name=managed_resource_group_name, + managed_services_cmk_key_vault_key_id=managed_services_cmk_key_vault_key_id, + name=name, + network_security_group_rules_required=network_security_group_rules_required, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + custom_parameters: Optional[pulumi.Input['WorkspaceCustomParametersArgs']] = None, + customer_managed_key_enabled: Optional[pulumi.Input[bool]] = None, + infrastructure_encryption_enabled: Optional[pulumi.Input[bool]] = None, + load_balancer_backend_address_pool_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_disk_cmk_key_vault_key_id: Optional[pulumi.Input[str]] = None, + managed_disk_cmk_rotation_to_latest_version_enabled: Optional[pulumi.Input[bool]] = None, + managed_resource_group_name: Optional[pulumi.Input[str]] = None, + managed_services_cmk_key_vault_key_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_security_group_rules_required: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if custom_parameters is None and 'customParameters' in kwargs: + custom_parameters = kwargs['customParameters'] + if customer_managed_key_enabled is None and 'customerManagedKeyEnabled' in kwargs: + customer_managed_key_enabled = kwargs['customerManagedKeyEnabled'] + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + if load_balancer_backend_address_pool_id is None and 'loadBalancerBackendAddressPoolId' in kwargs: + load_balancer_backend_address_pool_id = kwargs['loadBalancerBackendAddressPoolId'] + if managed_disk_cmk_key_vault_key_id is None and 'managedDiskCmkKeyVaultKeyId' in kwargs: + managed_disk_cmk_key_vault_key_id = kwargs['managedDiskCmkKeyVaultKeyId'] + if managed_disk_cmk_rotation_to_latest_version_enabled is None and 'managedDiskCmkRotationToLatestVersionEnabled' in kwargs: + managed_disk_cmk_rotation_to_latest_version_enabled = kwargs['managedDiskCmkRotationToLatestVersionEnabled'] + if managed_resource_group_name is None and 'managedResourceGroupName' in kwargs: + managed_resource_group_name = kwargs['managedResourceGroupName'] + if managed_services_cmk_key_vault_key_id is None and 'managedServicesCmkKeyVaultKeyId' in kwargs: + managed_services_cmk_key_vault_key_id = kwargs['managedServicesCmkKeyVaultKeyId'] + if network_security_group_rules_required is None and 'networkSecurityGroupRulesRequired' in kwargs: + network_security_group_rules_required = kwargs['networkSecurityGroupRulesRequired'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if custom_parameters is not None: - pulumi.set(__self__, "custom_parameters", custom_parameters) + _setter("custom_parameters", custom_parameters) if customer_managed_key_enabled is not None: - pulumi.set(__self__, "customer_managed_key_enabled", customer_managed_key_enabled) + _setter("customer_managed_key_enabled", customer_managed_key_enabled) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) if load_balancer_backend_address_pool_id is not None: - pulumi.set(__self__, "load_balancer_backend_address_pool_id", load_balancer_backend_address_pool_id) + _setter("load_balancer_backend_address_pool_id", load_balancer_backend_address_pool_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_disk_cmk_key_vault_key_id is not None: - pulumi.set(__self__, "managed_disk_cmk_key_vault_key_id", managed_disk_cmk_key_vault_key_id) + _setter("managed_disk_cmk_key_vault_key_id", managed_disk_cmk_key_vault_key_id) if managed_disk_cmk_rotation_to_latest_version_enabled is not None: - pulumi.set(__self__, "managed_disk_cmk_rotation_to_latest_version_enabled", managed_disk_cmk_rotation_to_latest_version_enabled) + _setter("managed_disk_cmk_rotation_to_latest_version_enabled", managed_disk_cmk_rotation_to_latest_version_enabled) if managed_resource_group_name is not None: - pulumi.set(__self__, "managed_resource_group_name", managed_resource_group_name) + _setter("managed_resource_group_name", managed_resource_group_name) if managed_services_cmk_key_vault_key_id is not None: - pulumi.set(__self__, "managed_services_cmk_key_vault_key_id", managed_services_cmk_key_vault_key_id) + _setter("managed_services_cmk_key_vault_key_id", managed_services_cmk_key_vault_key_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_security_group_rules_required is not None: - pulumi.set(__self__, "network_security_group_rules_required", network_security_group_rules_required) + _setter("network_security_group_rules_required", network_security_group_rules_required) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -319,48 +384,133 @@ def __init__(__self__, *, :param pulumi.Input[str] workspace_id: The unique identifier of the databricks workspace in Databricks control plane. :param pulumi.Input[str] workspace_url: The workspace URL which is of the format 'adb-{workspaceId}.{random}.azuredatabricks.net' """ + _WorkspaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_parameters=custom_parameters, + customer_managed_key_enabled=customer_managed_key_enabled, + disk_encryption_set_id=disk_encryption_set_id, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + load_balancer_backend_address_pool_id=load_balancer_backend_address_pool_id, + location=location, + managed_disk_cmk_key_vault_key_id=managed_disk_cmk_key_vault_key_id, + managed_disk_cmk_rotation_to_latest_version_enabled=managed_disk_cmk_rotation_to_latest_version_enabled, + managed_disk_identities=managed_disk_identities, + managed_resource_group_id=managed_resource_group_id, + managed_resource_group_name=managed_resource_group_name, + managed_services_cmk_key_vault_key_id=managed_services_cmk_key_vault_key_id, + name=name, + network_security_group_rules_required=network_security_group_rules_required, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + sku=sku, + storage_account_identities=storage_account_identities, + tags=tags, + workspace_id=workspace_id, + workspace_url=workspace_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_parameters: Optional[pulumi.Input['WorkspaceCustomParametersArgs']] = None, + customer_managed_key_enabled: Optional[pulumi.Input[bool]] = None, + disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + infrastructure_encryption_enabled: Optional[pulumi.Input[bool]] = None, + load_balancer_backend_address_pool_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_disk_cmk_key_vault_key_id: Optional[pulumi.Input[str]] = None, + managed_disk_cmk_rotation_to_latest_version_enabled: Optional[pulumi.Input[bool]] = None, + managed_disk_identities: Optional[pulumi.Input[Sequence[pulumi.Input['WorkspaceManagedDiskIdentityArgs']]]] = None, + managed_resource_group_id: Optional[pulumi.Input[str]] = None, + managed_resource_group_name: Optional[pulumi.Input[str]] = None, + managed_services_cmk_key_vault_key_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_security_group_rules_required: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + storage_account_identities: Optional[pulumi.Input[Sequence[pulumi.Input['WorkspaceStorageAccountIdentityArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + workspace_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_parameters is None and 'customParameters' in kwargs: + custom_parameters = kwargs['customParameters'] + if customer_managed_key_enabled is None and 'customerManagedKeyEnabled' in kwargs: + customer_managed_key_enabled = kwargs['customerManagedKeyEnabled'] + if disk_encryption_set_id is None and 'diskEncryptionSetId' in kwargs: + disk_encryption_set_id = kwargs['diskEncryptionSetId'] + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + if load_balancer_backend_address_pool_id is None and 'loadBalancerBackendAddressPoolId' in kwargs: + load_balancer_backend_address_pool_id = kwargs['loadBalancerBackendAddressPoolId'] + if managed_disk_cmk_key_vault_key_id is None and 'managedDiskCmkKeyVaultKeyId' in kwargs: + managed_disk_cmk_key_vault_key_id = kwargs['managedDiskCmkKeyVaultKeyId'] + if managed_disk_cmk_rotation_to_latest_version_enabled is None and 'managedDiskCmkRotationToLatestVersionEnabled' in kwargs: + managed_disk_cmk_rotation_to_latest_version_enabled = kwargs['managedDiskCmkRotationToLatestVersionEnabled'] + if managed_disk_identities is None and 'managedDiskIdentities' in kwargs: + managed_disk_identities = kwargs['managedDiskIdentities'] + if managed_resource_group_id is None and 'managedResourceGroupId' in kwargs: + managed_resource_group_id = kwargs['managedResourceGroupId'] + if managed_resource_group_name is None and 'managedResourceGroupName' in kwargs: + managed_resource_group_name = kwargs['managedResourceGroupName'] + if managed_services_cmk_key_vault_key_id is None and 'managedServicesCmkKeyVaultKeyId' in kwargs: + managed_services_cmk_key_vault_key_id = kwargs['managedServicesCmkKeyVaultKeyId'] + if network_security_group_rules_required is None and 'networkSecurityGroupRulesRequired' in kwargs: + network_security_group_rules_required = kwargs['networkSecurityGroupRulesRequired'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_account_identities is None and 'storageAccountIdentities' in kwargs: + storage_account_identities = kwargs['storageAccountIdentities'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_url is None and 'workspaceUrl' in kwargs: + workspace_url = kwargs['workspaceUrl'] + if custom_parameters is not None: - pulumi.set(__self__, "custom_parameters", custom_parameters) + _setter("custom_parameters", custom_parameters) if customer_managed_key_enabled is not None: - pulumi.set(__self__, "customer_managed_key_enabled", customer_managed_key_enabled) + _setter("customer_managed_key_enabled", customer_managed_key_enabled) if disk_encryption_set_id is not None: - pulumi.set(__self__, "disk_encryption_set_id", disk_encryption_set_id) + _setter("disk_encryption_set_id", disk_encryption_set_id) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) if load_balancer_backend_address_pool_id is not None: - pulumi.set(__self__, "load_balancer_backend_address_pool_id", load_balancer_backend_address_pool_id) + _setter("load_balancer_backend_address_pool_id", load_balancer_backend_address_pool_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_disk_cmk_key_vault_key_id is not None: - pulumi.set(__self__, "managed_disk_cmk_key_vault_key_id", managed_disk_cmk_key_vault_key_id) + _setter("managed_disk_cmk_key_vault_key_id", managed_disk_cmk_key_vault_key_id) if managed_disk_cmk_rotation_to_latest_version_enabled is not None: - pulumi.set(__self__, "managed_disk_cmk_rotation_to_latest_version_enabled", managed_disk_cmk_rotation_to_latest_version_enabled) + _setter("managed_disk_cmk_rotation_to_latest_version_enabled", managed_disk_cmk_rotation_to_latest_version_enabled) if managed_disk_identities is not None: - pulumi.set(__self__, "managed_disk_identities", managed_disk_identities) + _setter("managed_disk_identities", managed_disk_identities) if managed_resource_group_id is not None: - pulumi.set(__self__, "managed_resource_group_id", managed_resource_group_id) + _setter("managed_resource_group_id", managed_resource_group_id) if managed_resource_group_name is not None: - pulumi.set(__self__, "managed_resource_group_name", managed_resource_group_name) + _setter("managed_resource_group_name", managed_resource_group_name) if managed_services_cmk_key_vault_key_id is not None: - pulumi.set(__self__, "managed_services_cmk_key_vault_key_id", managed_services_cmk_key_vault_key_id) + _setter("managed_services_cmk_key_vault_key_id", managed_services_cmk_key_vault_key_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_security_group_rules_required is not None: - pulumi.set(__self__, "network_security_group_rules_required", network_security_group_rules_required) + _setter("network_security_group_rules_required", network_security_group_rules_required) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if storage_account_identities is not None: - pulumi.set(__self__, "storage_account_identities", storage_account_identities) + _setter("storage_account_identities", storage_account_identities) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) if workspace_url is not None: - pulumi.set(__self__, "workspace_url", workspace_url) + _setter("workspace_url", workspace_url) @property @pulumi.getter(name="customParameters") @@ -696,6 +846,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -725,6 +879,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = WorkspaceArgs.__new__(WorkspaceArgs) + if custom_parameters is not None and not isinstance(custom_parameters, WorkspaceCustomParametersArgs): + custom_parameters = custom_parameters or {} + def _setter(key, value): + custom_parameters[key] = value + WorkspaceCustomParametersArgs._configure(_setter, **custom_parameters) __props__.__dict__["custom_parameters"] = custom_parameters __props__.__dict__["customer_managed_key_enabled"] = customer_managed_key_enabled __props__.__dict__["infrastructure_encryption_enabled"] = infrastructure_encryption_enabled diff --git a/sdk/python/pulumi_azure/databricks/workspace_customer_managed_key.py b/sdk/python/pulumi_azure/databricks/workspace_customer_managed_key.py index f9b4ddd958..481233b75a 100644 --- a/sdk/python/pulumi_azure/databricks/workspace_customer_managed_key.py +++ b/sdk/python/pulumi_azure/databricks/workspace_customer_managed_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WorkspaceCustomerManagedKeyArgs', 'WorkspaceCustomerManagedKey'] @@ -21,11 +21,32 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault. :param pulumi.Input[str] workspace_id: The ID of the Databricks Workspace.. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + WorkspaceCustomerManagedKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + + _setter("key_vault_key_id", key_vault_key_id) if workspace_id is not None: warnings.warn("""this resource has been deprecated in favour of the `azurerm_databricks_workspace_root_dbfs_customer_managed_key` resource and will be removed from the v4.0 azurerm provider.""", DeprecationWarning) pulumi.log.warn("""workspace_id is deprecated: this resource has been deprecated in favour of the `azurerm_databricks_workspace_root_dbfs_customer_managed_key` resource and will be removed from the v4.0 azurerm provider.""") - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -65,13 +86,30 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault. :param pulumi.Input[str] workspace_id: The ID of the Databricks Workspace.. """ + _WorkspaceCustomerManagedKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if workspace_id is not None: warnings.warn("""this resource has been deprecated in favour of the `azurerm_databricks_workspace_root_dbfs_customer_managed_key` resource and will be removed from the v4.0 azurerm provider.""", DeprecationWarning) pulumi.log.warn("""workspace_id is deprecated: this resource has been deprecated in favour of the `azurerm_databricks_workspace_root_dbfs_customer_managed_key` resource and will be removed from the v4.0 azurerm provider.""") if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -148,6 +186,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceCustomerManagedKeyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/databricks/workspace_root_dbfs_customer_managed_key.py b/sdk/python/pulumi_azure/databricks/workspace_root_dbfs_customer_managed_key.py index b312999979..2d3ad959a4 100644 --- a/sdk/python/pulumi_azure/databricks/workspace_root_dbfs_customer_managed_key.py +++ b/sdk/python/pulumi_azure/databricks/workspace_root_dbfs_customer_managed_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WorkspaceRootDbfsCustomerManagedKeyArgs', 'WorkspaceRootDbfsCustomerManagedKey'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The resource ID of the Key Vault Key to be used. :param pulumi.Input[str] workspace_id: The resource ID of the Databricks Workspace. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) - pulumi.set(__self__, "workspace_id", workspace_id) + WorkspaceRootDbfsCustomerManagedKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + + _setter("key_vault_key_id", key_vault_key_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The resource ID of the Key Vault Key to be used. :param pulumi.Input[str] workspace_id: The resource ID of the Databricks Workspace. """ + _WorkspaceRootDbfsCustomerManagedKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -136,6 +174,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceRootDbfsCustomerManagedKeyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datadog/_inputs.py b/sdk/python/pulumi_azure/datadog/_inputs.py index b108ab00b9..6dcedaa945 100644 --- a/sdk/python/pulumi_azure/datadog/_inputs.py +++ b/sdk/python/pulumi_azure/datadog/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -40,20 +40,61 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. :param pulumi.Input[str] redirect_uri: The redirect uri for linking. Changing this forces a new Datadog Monitor to be created. """ - pulumi.set(__self__, "api_key", api_key) - pulumi.set(__self__, "application_key", application_key) + MonitorDatadogOrganizationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_key=api_key, + application_key=application_key, + enterprise_app_id=enterprise_app_id, + id=id, + linking_auth_code=linking_auth_code, + linking_client_id=linking_client_id, + name=name, + redirect_uri=redirect_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_key: Optional[pulumi.Input[str]] = None, + application_key: Optional[pulumi.Input[str]] = None, + enterprise_app_id: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + linking_auth_code: Optional[pulumi.Input[str]] = None, + linking_client_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + redirect_uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_key is None and 'apiKey' in kwargs: + api_key = kwargs['apiKey'] + if api_key is None: + raise TypeError("Missing 'api_key' argument") + if application_key is None and 'applicationKey' in kwargs: + application_key = kwargs['applicationKey'] + if application_key is None: + raise TypeError("Missing 'application_key' argument") + if enterprise_app_id is None and 'enterpriseAppId' in kwargs: + enterprise_app_id = kwargs['enterpriseAppId'] + if linking_auth_code is None and 'linkingAuthCode' in kwargs: + linking_auth_code = kwargs['linkingAuthCode'] + if linking_client_id is None and 'linkingClientId' in kwargs: + linking_client_id = kwargs['linkingClientId'] + if redirect_uri is None and 'redirectUri' in kwargs: + redirect_uri = kwargs['redirectUri'] + + _setter("api_key", api_key) + _setter("application_key", application_key) if enterprise_app_id is not None: - pulumi.set(__self__, "enterprise_app_id", enterprise_app_id) + _setter("enterprise_app_id", enterprise_app_id) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if linking_auth_code is not None: - pulumi.set(__self__, "linking_auth_code", linking_auth_code) + _setter("linking_auth_code", linking_auth_code) if linking_client_id is not None: - pulumi.set(__self__, "linking_client_id", linking_client_id) + _setter("linking_client_id", linking_client_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if redirect_uri is not None: - pulumi.set(__self__, "redirect_uri", redirect_uri) + _setter("redirect_uri", redirect_uri) @property @pulumi.getter(name="apiKey") @@ -165,11 +206,32 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Identity of this Datadog Monitor. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Identity of this Datadog Monitor. """ - pulumi.set(__self__, "type", type) + MonitorIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -225,14 +287,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] resource_log_enabled: Whether Azure resource logs should be sent for the Monitor resource? :param pulumi.Input[bool] subscription_log_enabled: Whether Azure subscription logs should be sent for the Monitor resource? """ + MonitorTagRuleLogArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aad_log_enabled=aad_log_enabled, + filters=filters, + resource_log_enabled=resource_log_enabled, + subscription_log_enabled=subscription_log_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aad_log_enabled: Optional[pulumi.Input[bool]] = None, + filters: Optional[pulumi.Input[Sequence[pulumi.Input['MonitorTagRuleLogFilterArgs']]]] = None, + resource_log_enabled: Optional[pulumi.Input[bool]] = None, + subscription_log_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aad_log_enabled is None and 'aadLogEnabled' in kwargs: + aad_log_enabled = kwargs['aadLogEnabled'] + if resource_log_enabled is None and 'resourceLogEnabled' in kwargs: + resource_log_enabled = kwargs['resourceLogEnabled'] + if subscription_log_enabled is None and 'subscriptionLogEnabled' in kwargs: + subscription_log_enabled = kwargs['subscriptionLogEnabled'] + if aad_log_enabled is not None: - pulumi.set(__self__, "aad_log_enabled", aad_log_enabled) + _setter("aad_log_enabled", aad_log_enabled) if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) if resource_log_enabled is not None: - pulumi.set(__self__, "resource_log_enabled", resource_log_enabled) + _setter("resource_log_enabled", resource_log_enabled) if subscription_log_enabled is not None: - pulumi.set(__self__, "subscription_log_enabled", subscription_log_enabled) + _setter("subscription_log_enabled", subscription_log_enabled) @property @pulumi.getter(name="aadLogEnabled") @@ -296,9 +381,30 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Name of the Tag. :param pulumi.Input[str] value: Value of the Tag. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + MonitorTagRuleLogFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("action", action) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -346,8 +452,19 @@ def __init__(__self__, *, > **NOTE:** 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. """ + MonitorTagRuleMetricArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filters=filters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filters: Optional[pulumi.Input[Sequence[pulumi.Input['MonitorTagRuleMetricFilterArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) @property @pulumi.getter @@ -375,9 +492,30 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Name of the Tag. :param pulumi.Input[str] value: Value of the Tag. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + MonitorTagRuleMetricFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("action", action) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -427,10 +565,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this user_info. Changing this forces a new resource to be created. :param pulumi.Input[str] phone_number: Phone number of the user used by Datadog for contacting them if needed. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "email", email) - pulumi.set(__self__, "name", name) + MonitorUserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + name=name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + phone_number: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + + _setter("email", email) + _setter("name", name) if phone_number is not None: - pulumi.set(__self__, "phone_number", phone_number) + _setter("phone_number", phone_number) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/datadog/monitor.py b/sdk/python/pulumi_azure/datadog/monitor.py index 239f7e1724..4674121888 100644 --- a/sdk/python/pulumi_azure/datadog/monitor.py +++ b/sdk/python/pulumi_azure/datadog/monitor.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,20 +37,63 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Datadog Monitor. """ - pulumi.set(__self__, "datadog_organization", datadog_organization) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "user", user) + MonitorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + datadog_organization=datadog_organization, + resource_group_name=resource_group_name, + sku_name=sku_name, + user=user, + identity=identity, + location=location, + monitoring_enabled=monitoring_enabled, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datadog_organization: Optional[pulumi.Input['MonitorDatadogOrganizationArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + user: Optional[pulumi.Input['MonitorUserArgs']] = None, + identity: Optional[pulumi.Input['MonitorIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + monitoring_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datadog_organization is None and 'datadogOrganization' in kwargs: + datadog_organization = kwargs['datadogOrganization'] + if datadog_organization is None: + raise TypeError("Missing 'datadog_organization' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if user is None: + raise TypeError("Missing 'user' argument") + if monitoring_enabled is None and 'monitoringEnabled' in kwargs: + monitoring_enabled = kwargs['monitoringEnabled'] + + _setter("datadog_organization", datadog_organization) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("user", user) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if monitoring_enabled is not None: - pulumi.set(__self__, "monitoring_enabled", monitoring_enabled) + _setter("monitoring_enabled", monitoring_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="datadogOrganization") @@ -187,26 +230,65 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Datadog Monitor. :param pulumi.Input['MonitorUserArgs'] user: A `user` block as defined below. """ + _MonitorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + datadog_organization=datadog_organization, + identity=identity, + location=location, + marketplace_subscription_status=marketplace_subscription_status, + monitoring_enabled=monitoring_enabled, + name=name, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + user=user, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datadog_organization: Optional[pulumi.Input['MonitorDatadogOrganizationArgs']] = None, + identity: Optional[pulumi.Input['MonitorIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + marketplace_subscription_status: Optional[pulumi.Input[str]] = None, + monitoring_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + user: Optional[pulumi.Input['MonitorUserArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datadog_organization is None and 'datadogOrganization' in kwargs: + datadog_organization = kwargs['datadogOrganization'] + if marketplace_subscription_status is None and 'marketplaceSubscriptionStatus' in kwargs: + marketplace_subscription_status = kwargs['marketplaceSubscriptionStatus'] + if monitoring_enabled is None and 'monitoringEnabled' in kwargs: + monitoring_enabled = kwargs['monitoringEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if datadog_organization is not None: - pulumi.set(__self__, "datadog_organization", datadog_organization) + _setter("datadog_organization", datadog_organization) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if marketplace_subscription_status is not None: - pulumi.set(__self__, "marketplace_subscription_status", marketplace_subscription_status) + _setter("marketplace_subscription_status", marketplace_subscription_status) if monitoring_enabled is not None: - pulumi.set(__self__, "monitoring_enabled", monitoring_enabled) + _setter("monitoring_enabled", monitoring_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if user is not None: - pulumi.set(__self__, "user", user) + _setter("user", user) @property @pulumi.getter(name="datadogOrganization") @@ -478,6 +560,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MonitorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -501,9 +587,19 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = MonitorArgs.__new__(MonitorArgs) + if datadog_organization is not None and not isinstance(datadog_organization, MonitorDatadogOrganizationArgs): + datadog_organization = datadog_organization or {} + def _setter(key, value): + datadog_organization[key] = value + MonitorDatadogOrganizationArgs._configure(_setter, **datadog_organization) if datadog_organization is None and not opts.urn: raise TypeError("Missing required property 'datadog_organization'") __props__.__dict__["datadog_organization"] = datadog_organization + if identity is not None and not isinstance(identity, MonitorIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + MonitorIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["monitoring_enabled"] = monitoring_enabled @@ -515,6 +611,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'sku_name'") __props__.__dict__["sku_name"] = sku_name __props__.__dict__["tags"] = tags + if user is not None and not isinstance(user, MonitorUserArgs): + user = user or {} + def _setter(key, value): + user[key] = value + MonitorUserArgs._configure(_setter, **user) if user is None and not opts.urn: raise TypeError("Missing required property 'user'") __props__.__dict__["user"] = user diff --git a/sdk/python/pulumi_azure/datadog/monitor_sso_configuration.py b/sdk/python/pulumi_azure/datadog/monitor_sso_configuration.py index b936a37c70..61342d2094 100644 --- a/sdk/python/pulumi_azure/datadog/monitor_sso_configuration.py +++ b/sdk/python/pulumi_azure/datadog/monitor_sso_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['MonitorSsoConfigurationArgs', 'MonitorSsoConfiguration'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] single_sign_on_enabled: The state of SingleSignOn configuration. :param pulumi.Input[str] name: The name of the SingleSignOn configuration. Defaults to `default`. """ - pulumi.set(__self__, "datadog_monitor_id", datadog_monitor_id) - pulumi.set(__self__, "enterprise_application_id", enterprise_application_id) - pulumi.set(__self__, "single_sign_on_enabled", single_sign_on_enabled) + MonitorSsoConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + datadog_monitor_id=datadog_monitor_id, + enterprise_application_id=enterprise_application_id, + single_sign_on_enabled=single_sign_on_enabled, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datadog_monitor_id: Optional[pulumi.Input[str]] = None, + enterprise_application_id: Optional[pulumi.Input[str]] = None, + single_sign_on_enabled: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datadog_monitor_id is None and 'datadogMonitorId' in kwargs: + datadog_monitor_id = kwargs['datadogMonitorId'] + if datadog_monitor_id is None: + raise TypeError("Missing 'datadog_monitor_id' argument") + if enterprise_application_id is None and 'enterpriseApplicationId' in kwargs: + enterprise_application_id = kwargs['enterpriseApplicationId'] + if enterprise_application_id is None: + raise TypeError("Missing 'enterprise_application_id' argument") + if single_sign_on_enabled is None and 'singleSignOnEnabled' in kwargs: + single_sign_on_enabled = kwargs['singleSignOnEnabled'] + if single_sign_on_enabled is None: + raise TypeError("Missing 'single_sign_on_enabled' argument") + + _setter("datadog_monitor_id", datadog_monitor_id) + _setter("enterprise_application_id", enterprise_application_id) + _setter("single_sign_on_enabled", single_sign_on_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="datadogMonitorId") @@ -96,16 +125,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the SingleSignOn configuration. Defaults to `default`. :param pulumi.Input[str] single_sign_on_enabled: The state of SingleSignOn configuration. """ + _MonitorSsoConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + datadog_monitor_id=datadog_monitor_id, + enterprise_application_id=enterprise_application_id, + login_url=login_url, + name=name, + single_sign_on_enabled=single_sign_on_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datadog_monitor_id: Optional[pulumi.Input[str]] = None, + enterprise_application_id: Optional[pulumi.Input[str]] = None, + login_url: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + single_sign_on_enabled: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datadog_monitor_id is None and 'datadogMonitorId' in kwargs: + datadog_monitor_id = kwargs['datadogMonitorId'] + if enterprise_application_id is None and 'enterpriseApplicationId' in kwargs: + enterprise_application_id = kwargs['enterpriseApplicationId'] + if login_url is None and 'loginUrl' in kwargs: + login_url = kwargs['loginUrl'] + if single_sign_on_enabled is None and 'singleSignOnEnabled' in kwargs: + single_sign_on_enabled = kwargs['singleSignOnEnabled'] + if datadog_monitor_id is not None: - pulumi.set(__self__, "datadog_monitor_id", datadog_monitor_id) + _setter("datadog_monitor_id", datadog_monitor_id) if enterprise_application_id is not None: - pulumi.set(__self__, "enterprise_application_id", enterprise_application_id) + _setter("enterprise_application_id", enterprise_application_id) if login_url is not None: - pulumi.set(__self__, "login_url", login_url) + _setter("login_url", login_url) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if single_sign_on_enabled is not None: - pulumi.set(__self__, "single_sign_on_enabled", single_sign_on_enabled) + _setter("single_sign_on_enabled", single_sign_on_enabled) @property @pulumi.getter(name="datadogMonitorId") @@ -279,6 +335,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MonitorSsoConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datadog/monitor_tag_rule.py b/sdk/python/pulumi_azure/datadog/monitor_tag_rule.py index 742e04d573..4aadd26d49 100644 --- a/sdk/python/pulumi_azure/datadog/monitor_tag_rule.py +++ b/sdk/python/pulumi_azure/datadog/monitor_tag_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,13 +27,34 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['MonitorTagRuleMetricArgs']]] metrics: A `metric` block as defined below. :param pulumi.Input[str] name: The name of the Tag Rules configuration. The allowed value is `default`. It defaults to `default`. """ - pulumi.set(__self__, "datadog_monitor_id", datadog_monitor_id) + MonitorTagRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + datadog_monitor_id=datadog_monitor_id, + logs=logs, + metrics=metrics, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datadog_monitor_id: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input[Sequence[pulumi.Input['MonitorTagRuleLogArgs']]]] = None, + metrics: Optional[pulumi.Input[Sequence[pulumi.Input['MonitorTagRuleMetricArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datadog_monitor_id is None and 'datadogMonitorId' in kwargs: + datadog_monitor_id = kwargs['datadogMonitorId'] + if datadog_monitor_id is None: + raise TypeError("Missing 'datadog_monitor_id' argument") + + _setter("datadog_monitor_id", datadog_monitor_id) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if metrics is not None: - pulumi.set(__self__, "metrics", metrics) + _setter("metrics", metrics) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="datadogMonitorId") @@ -98,14 +119,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['MonitorTagRuleMetricArgs']]] metrics: A `metric` block as defined below. :param pulumi.Input[str] name: The name of the Tag Rules configuration. The allowed value is `default`. It defaults to `default`. """ + _MonitorTagRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + datadog_monitor_id=datadog_monitor_id, + logs=logs, + metrics=metrics, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datadog_monitor_id: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input[Sequence[pulumi.Input['MonitorTagRuleLogArgs']]]] = None, + metrics: Optional[pulumi.Input[Sequence[pulumi.Input['MonitorTagRuleMetricArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datadog_monitor_id is None and 'datadogMonitorId' in kwargs: + datadog_monitor_id = kwargs['datadogMonitorId'] + if datadog_monitor_id is not None: - pulumi.set(__self__, "datadog_monitor_id", datadog_monitor_id) + _setter("datadog_monitor_id", datadog_monitor_id) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if metrics is not None: - pulumi.set(__self__, "metrics", metrics) + _setter("metrics", metrics) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="datadogMonitorId") @@ -283,6 +323,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MonitorTagRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datadog/outputs.py b/sdk/python/pulumi_azure/datadog/outputs.py index 4ea75a2842..4ce0824551 100644 --- a/sdk/python/pulumi_azure/datadog/outputs.py +++ b/sdk/python/pulumi_azure/datadog/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -68,20 +68,61 @@ def __init__(__self__, *, :param str name: The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. :param str redirect_uri: The redirect uri for linking. Changing this forces a new Datadog Monitor to be created. """ - pulumi.set(__self__, "api_key", api_key) - pulumi.set(__self__, "application_key", application_key) + MonitorDatadogOrganization._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_key=api_key, + application_key=application_key, + enterprise_app_id=enterprise_app_id, + id=id, + linking_auth_code=linking_auth_code, + linking_client_id=linking_client_id, + name=name, + redirect_uri=redirect_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_key: Optional[str] = None, + application_key: Optional[str] = None, + enterprise_app_id: Optional[str] = None, + id: Optional[str] = None, + linking_auth_code: Optional[str] = None, + linking_client_id: Optional[str] = None, + name: Optional[str] = None, + redirect_uri: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_key is None and 'apiKey' in kwargs: + api_key = kwargs['apiKey'] + if api_key is None: + raise TypeError("Missing 'api_key' argument") + if application_key is None and 'applicationKey' in kwargs: + application_key = kwargs['applicationKey'] + if application_key is None: + raise TypeError("Missing 'application_key' argument") + if enterprise_app_id is None and 'enterpriseAppId' in kwargs: + enterprise_app_id = kwargs['enterpriseAppId'] + if linking_auth_code is None and 'linkingAuthCode' in kwargs: + linking_auth_code = kwargs['linkingAuthCode'] + if linking_client_id is None and 'linkingClientId' in kwargs: + linking_client_id = kwargs['linkingClientId'] + if redirect_uri is None and 'redirectUri' in kwargs: + redirect_uri = kwargs['redirectUri'] + + _setter("api_key", api_key) + _setter("application_key", application_key) if enterprise_app_id is not None: - pulumi.set(__self__, "enterprise_app_id", enterprise_app_id) + _setter("enterprise_app_id", enterprise_app_id) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if linking_auth_code is not None: - pulumi.set(__self__, "linking_auth_code", linking_auth_code) + _setter("linking_auth_code", linking_auth_code) if linking_client_id is not None: - pulumi.set(__self__, "linking_client_id", linking_client_id) + _setter("linking_client_id", linking_client_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if redirect_uri is not None: - pulumi.set(__self__, "redirect_uri", redirect_uri) + _setter("redirect_uri", redirect_uri) @property @pulumi.getter(name="apiKey") @@ -180,11 +221,32 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Identity of this Datadog Monitor. :param str tenant_id: The Tenant ID for the Service Principal associated with the Identity of this Datadog Monitor. """ - pulumi.set(__self__, "type", type) + MonitorIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -249,14 +311,37 @@ def __init__(__self__, *, :param bool resource_log_enabled: Whether Azure resource logs should be sent for the Monitor resource? :param bool subscription_log_enabled: Whether Azure subscription logs should be sent for the Monitor resource? """ + MonitorTagRuleLog._configure( + lambda key, value: pulumi.set(__self__, key, value), + aad_log_enabled=aad_log_enabled, + filters=filters, + resource_log_enabled=resource_log_enabled, + subscription_log_enabled=subscription_log_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aad_log_enabled: Optional[bool] = None, + filters: Optional[Sequence['outputs.MonitorTagRuleLogFilter']] = None, + resource_log_enabled: Optional[bool] = None, + subscription_log_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aad_log_enabled is None and 'aadLogEnabled' in kwargs: + aad_log_enabled = kwargs['aadLogEnabled'] + if resource_log_enabled is None and 'resourceLogEnabled' in kwargs: + resource_log_enabled = kwargs['resourceLogEnabled'] + if subscription_log_enabled is None and 'subscriptionLogEnabled' in kwargs: + subscription_log_enabled = kwargs['subscriptionLogEnabled'] + if aad_log_enabled is not None: - pulumi.set(__self__, "aad_log_enabled", aad_log_enabled) + _setter("aad_log_enabled", aad_log_enabled) if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) if resource_log_enabled is not None: - pulumi.set(__self__, "resource_log_enabled", resource_log_enabled) + _setter("resource_log_enabled", resource_log_enabled) if subscription_log_enabled is not None: - pulumi.set(__self__, "subscription_log_enabled", subscription_log_enabled) + _setter("subscription_log_enabled", subscription_log_enabled) @property @pulumi.getter(name="aadLogEnabled") @@ -304,9 +389,30 @@ def __init__(__self__, *, :param str name: Name of the Tag. :param str value: Value of the Tag. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + MonitorTagRuleLogFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("action", action) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -342,8 +448,19 @@ def __init__(__self__, *, > **NOTE:** 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. """ + MonitorTagRuleMetric._configure( + lambda key, value: pulumi.set(__self__, key, value), + filters=filters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filters: Optional[Sequence['outputs.MonitorTagRuleMetricFilter']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) @property @pulumi.getter @@ -367,9 +484,30 @@ def __init__(__self__, *, :param str name: Name of the Tag. :param str value: Value of the Tag. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + MonitorTagRuleMetricFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("action", action) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -424,10 +562,31 @@ def __init__(__self__, *, :param str name: The name which should be used for this user_info. Changing this forces a new resource to be created. :param str phone_number: Phone number of the user used by Datadog for contacting them if needed. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "email", email) - pulumi.set(__self__, "name", name) + MonitorUser._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + name=name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[str] = None, + name: Optional[str] = None, + phone_number: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + + _setter("email", email) + _setter("name", name) if phone_number is not None: - pulumi.set(__self__, "phone_number", phone_number) + _setter("phone_number", phone_number) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/datafactory/_inputs.py b/sdk/python/pulumi_azure/datafactory/_inputs.py index ae7ad04374..a2f91d22ff 100644 --- a/sdk/python/pulumi_azure/datafactory/_inputs.py +++ b/sdk/python/pulumi_azure/datafactory/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -120,9 +120,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Data Factory Linked Service. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + CustomDatasetLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -168,19 +183,50 @@ def __init__(__self__, *, :param pulumi.Input['DataFlowSinkRejectedLinkedServiceArgs'] rejected_linked_service: A `rejected_linked_service` block as defined below. :param pulumi.Input['DataFlowSinkSchemaLinkedServiceArgs'] schema_linked_service: A `schema_linked_service` block as defined below. """ - pulumi.set(__self__, "name", name) + DataFlowSinkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset=dataset, + description=description, + flowlet=flowlet, + linked_service=linked_service, + rejected_linked_service=rejected_linked_service, + schema_linked_service=schema_linked_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + dataset: Optional[pulumi.Input['DataFlowSinkDatasetArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + flowlet: Optional[pulumi.Input['DataFlowSinkFlowletArgs']] = None, + linked_service: Optional[pulumi.Input['DataFlowSinkLinkedServiceArgs']] = None, + rejected_linked_service: Optional[pulumi.Input['DataFlowSinkRejectedLinkedServiceArgs']] = None, + schema_linked_service: Optional[pulumi.Input['DataFlowSinkSchemaLinkedServiceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + if rejected_linked_service is None and 'rejectedLinkedService' in kwargs: + rejected_linked_service = kwargs['rejectedLinkedService'] + if schema_linked_service is None and 'schemaLinkedService' in kwargs: + schema_linked_service = kwargs['schemaLinkedService'] + + _setter("name", name) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if flowlet is not None: - pulumi.set(__self__, "flowlet", flowlet) + _setter("flowlet", flowlet) if linked_service is not None: - pulumi.set(__self__, "linked_service", linked_service) + _setter("linked_service", linked_service) if rejected_linked_service is not None: - pulumi.set(__self__, "rejected_linked_service", rejected_linked_service) + _setter("rejected_linked_service", rejected_linked_service) if schema_linked_service is not None: - pulumi.set(__self__, "schema_linked_service", schema_linked_service) + _setter("schema_linked_service", schema_linked_service) @property @pulumi.getter @@ -276,9 +322,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Dataset. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory dataset. """ - pulumi.set(__self__, "name", name) + DataFlowSinkDatasetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -316,11 +377,30 @@ def __init__(__self__, *, :param pulumi.Input[str] dataset_parameters: Specifies the reference data flow parameters from dataset. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Flowlet. """ - pulumi.set(__self__, "name", name) + DataFlowSinkFlowletArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset_parameters=dataset_parameters, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + dataset_parameters: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if dataset_parameters is None and 'datasetParameters' in kwargs: + dataset_parameters = kwargs['datasetParameters'] + + _setter("name", name) if dataset_parameters is not None: - pulumi.set(__self__, "dataset_parameters", dataset_parameters) + _setter("dataset_parameters", dataset_parameters) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -368,9 +448,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowSinkLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -406,9 +501,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service with schema. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowSinkRejectedLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -444,9 +554,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service with schema. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowSinkSchemaLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -492,19 +617,50 @@ def __init__(__self__, *, :param pulumi.Input['DataFlowSourceRejectedLinkedServiceArgs'] rejected_linked_service: A `rejected_linked_service` block as defined below. :param pulumi.Input['DataFlowSourceSchemaLinkedServiceArgs'] schema_linked_service: A `schema_linked_service` block as defined below. """ - pulumi.set(__self__, "name", name) + DataFlowSourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset=dataset, + description=description, + flowlet=flowlet, + linked_service=linked_service, + rejected_linked_service=rejected_linked_service, + schema_linked_service=schema_linked_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + dataset: Optional[pulumi.Input['DataFlowSourceDatasetArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + flowlet: Optional[pulumi.Input['DataFlowSourceFlowletArgs']] = None, + linked_service: Optional[pulumi.Input['DataFlowSourceLinkedServiceArgs']] = None, + rejected_linked_service: Optional[pulumi.Input['DataFlowSourceRejectedLinkedServiceArgs']] = None, + schema_linked_service: Optional[pulumi.Input['DataFlowSourceSchemaLinkedServiceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + if rejected_linked_service is None and 'rejectedLinkedService' in kwargs: + rejected_linked_service = kwargs['rejectedLinkedService'] + if schema_linked_service is None and 'schemaLinkedService' in kwargs: + schema_linked_service = kwargs['schemaLinkedService'] + + _setter("name", name) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if flowlet is not None: - pulumi.set(__self__, "flowlet", flowlet) + _setter("flowlet", flowlet) if linked_service is not None: - pulumi.set(__self__, "linked_service", linked_service) + _setter("linked_service", linked_service) if rejected_linked_service is not None: - pulumi.set(__self__, "rejected_linked_service", rejected_linked_service) + _setter("rejected_linked_service", rejected_linked_service) if schema_linked_service is not None: - pulumi.set(__self__, "schema_linked_service", schema_linked_service) + _setter("schema_linked_service", schema_linked_service) @property @pulumi.getter @@ -600,9 +756,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Dataset. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory dataset. """ - pulumi.set(__self__, "name", name) + DataFlowSourceDatasetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -640,11 +811,30 @@ def __init__(__self__, *, :param pulumi.Input[str] dataset_parameters: Specifies the reference data flow parameters from dataset. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Flowlet. """ - pulumi.set(__self__, "name", name) + DataFlowSourceFlowletArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset_parameters=dataset_parameters, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + dataset_parameters: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if dataset_parameters is None and 'datasetParameters' in kwargs: + dataset_parameters = kwargs['datasetParameters'] + + _setter("name", name) if dataset_parameters is not None: - pulumi.set(__self__, "dataset_parameters", dataset_parameters) + _setter("dataset_parameters", dataset_parameters) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -692,9 +882,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowSourceLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -730,9 +935,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service with schema. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowSourceRejectedLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -768,9 +988,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service with schema. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowSourceSchemaLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -812,15 +1047,38 @@ def __init__(__self__, *, :param pulumi.Input['DataFlowTransformationFlowletArgs'] flowlet: A `flowlet` block as defined below. :param pulumi.Input['DataFlowTransformationLinkedServiceArgs'] linked_service: A `linked_service` block as defined below. """ - pulumi.set(__self__, "name", name) + DataFlowTransformationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset=dataset, + description=description, + flowlet=flowlet, + linked_service=linked_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + dataset: Optional[pulumi.Input['DataFlowTransformationDatasetArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + flowlet: Optional[pulumi.Input['DataFlowTransformationFlowletArgs']] = None, + linked_service: Optional[pulumi.Input['DataFlowTransformationLinkedServiceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + + _setter("name", name) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if flowlet is not None: - pulumi.set(__self__, "flowlet", flowlet) + _setter("flowlet", flowlet) if linked_service is not None: - pulumi.set(__self__, "linked_service", linked_service) + _setter("linked_service", linked_service) @property @pulumi.getter @@ -892,9 +1150,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Dataset. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory dataset. """ - pulumi.set(__self__, "name", name) + DataFlowTransformationDatasetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -932,11 +1205,30 @@ def __init__(__self__, *, :param pulumi.Input[str] dataset_parameters: Specifies the reference data flow parameters from dataset. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Flowlet. """ - pulumi.set(__self__, "name", name) + DataFlowTransformationFlowletArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset_parameters=dataset_parameters, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + dataset_parameters: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if dataset_parameters is None and 'datasetParameters' in kwargs: + dataset_parameters = kwargs['datasetParameters'] + + _setter("name", name) if dataset_parameters is not None: - pulumi.set(__self__, "dataset_parameters", dataset_parameters) + _setter("dataset_parameters", dataset_parameters) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -984,9 +1276,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowTransformationLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -1024,11 +1331,28 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the column. :param pulumi.Input[str] type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetAzureBlobSchemaColumnArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -1078,11 +1402,28 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the column. :param pulumi.Input[str] type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetAzureSqlTableSchemaColumnArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -1138,17 +1479,46 @@ def __init__(__self__, *, :param pulumi.Input[str] filename: The filename of the file in the blob container. :param pulumi.Input[str] path: The folder path to the file in the blob container. """ - pulumi.set(__self__, "container", container) + DatasetBinaryAzureBlobStorageLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container=container, + dynamic_container_enabled=dynamic_container_enabled, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + filename=filename, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container: Optional[pulumi.Input[str]] = None, + dynamic_container_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_filename_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_path_enabled: Optional[pulumi.Input[bool]] = None, + filename: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container is None: + raise TypeError("Missing 'container' argument") + if dynamic_container_enabled is None and 'dynamicContainerEnabled' in kwargs: + dynamic_container_enabled = kwargs['dynamicContainerEnabled'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("container", container) if dynamic_container_enabled is not None: - pulumi.set(__self__, "dynamic_container_enabled", dynamic_container_enabled) + _setter("dynamic_container_enabled", dynamic_container_enabled) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if filename is not None: - pulumi.set(__self__, "filename", filename) + _setter("filename", filename) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -1232,9 +1602,24 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of compression used during transport. Possible values are `BZip2`, `Deflate`, `GZip`, `Tar`, `TarGZip` and `ZipDeflate`. :param pulumi.Input[str] level: The level of compression. Possible values are `Fastest` and `Optimal`. """ - pulumi.set(__self__, "type", type) + DatasetBinaryCompressionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + level=level, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + level: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("type", type) if level is not None: - pulumi.set(__self__, "level", level) + _setter("level", level) @property @pulumi.getter @@ -1276,13 +1661,44 @@ def __init__(__self__, *, :param pulumi.Input[bool] dynamic_filename_enabled: Is the `filename` using dynamic expression, function or system variables? Defaults to `false`. :param pulumi.Input[bool] dynamic_path_enabled: Is the `path` using dynamic expression, function or system variables? Defaults to `false`. """ - pulumi.set(__self__, "filename", filename) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "relative_url", relative_url) + DatasetBinaryHttpServerLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename=filename, + path=path, + relative_url=relative_url, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + relative_url: Optional[pulumi.Input[str]] = None, + dynamic_filename_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_path_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename is None: + raise TypeError("Missing 'filename' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if relative_url is None and 'relativeUrl' in kwargs: + relative_url = kwargs['relativeUrl'] + if relative_url is None: + raise TypeError("Missing 'relative_url' argument") + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("filename", filename) + _setter("path", path) + _setter("relative_url", relative_url) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) @property @pulumi.getter @@ -1358,12 +1774,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] dynamic_filename_enabled: Is the `filename` using dynamic expression, function or system variables? Defaults to `false`. :param pulumi.Input[bool] dynamic_path_enabled: Is the `path` using dynamic expression, function or system variables? Defaults to `false`. """ - pulumi.set(__self__, "filename", filename) - pulumi.set(__self__, "path", path) + DatasetBinarySftpServerLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename=filename, + path=path, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + dynamic_filename_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_path_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename is None: + raise TypeError("Missing 'filename' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("filename", filename) + _setter("path", path) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) @property @pulumi.getter @@ -1425,11 +1866,28 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the column. :param pulumi.Input[str] type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetCosmosDBApiSchemaColumnArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -1485,18 +1943,47 @@ def __init__(__self__, *, :param pulumi.Input[str] filename: The filename of the file. :param pulumi.Input[str] path: The folder path to the file. """ + DatasetDelimitedTextAzureBlobFsLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dynamic_file_system_enabled=dynamic_file_system_enabled, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + file_system=file_system, + filename=filename, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dynamic_file_system_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_filename_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_path_enabled: Optional[pulumi.Input[bool]] = None, + file_system: Optional[pulumi.Input[str]] = None, + filename: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dynamic_file_system_enabled is None and 'dynamicFileSystemEnabled' in kwargs: + dynamic_file_system_enabled = kwargs['dynamicFileSystemEnabled'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if dynamic_file_system_enabled is not None: - pulumi.set(__self__, "dynamic_file_system_enabled", dynamic_file_system_enabled) + _setter("dynamic_file_system_enabled", dynamic_file_system_enabled) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) if filename is not None: - pulumi.set(__self__, "filename", filename) + _setter("filename", filename) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter(name="dynamicFileSystemEnabled") @@ -1588,17 +2075,46 @@ def __init__(__self__, *, :param pulumi.Input[str] filename: The filename of the file. :param pulumi.Input[str] path: The folder path to the file. This can be an empty string. """ - pulumi.set(__self__, "container", container) + DatasetDelimitedTextAzureBlobStorageLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container=container, + dynamic_container_enabled=dynamic_container_enabled, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + filename=filename, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container: Optional[pulumi.Input[str]] = None, + dynamic_container_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_filename_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_path_enabled: Optional[pulumi.Input[bool]] = None, + filename: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container is None: + raise TypeError("Missing 'container' argument") + if dynamic_container_enabled is None and 'dynamicContainerEnabled' in kwargs: + dynamic_container_enabled = kwargs['dynamicContainerEnabled'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("container", container) if dynamic_container_enabled is not None: - pulumi.set(__self__, "dynamic_container_enabled", dynamic_container_enabled) + _setter("dynamic_container_enabled", dynamic_container_enabled) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if filename is not None: - pulumi.set(__self__, "filename", filename) + _setter("filename", filename) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -1688,13 +2204,44 @@ def __init__(__self__, *, :param pulumi.Input[bool] dynamic_filename_enabled: Is the `filename` using dynamic expression, function or system variables? Defaults to `false`. :param pulumi.Input[bool] dynamic_path_enabled: Is the `path` using dynamic expression, function or system variables? Defaults to `false`. """ - pulumi.set(__self__, "filename", filename) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "relative_url", relative_url) + DatasetDelimitedTextHttpServerLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename=filename, + path=path, + relative_url=relative_url, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + relative_url: Optional[pulumi.Input[str]] = None, + dynamic_filename_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_path_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename is None: + raise TypeError("Missing 'filename' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if relative_url is None and 'relativeUrl' in kwargs: + relative_url = kwargs['relativeUrl'] + if relative_url is None: + raise TypeError("Missing 'relative_url' argument") + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("filename", filename) + _setter("path", path) + _setter("relative_url", relative_url) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) @property @pulumi.getter @@ -1768,11 +2315,28 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the column. :param pulumi.Input[str] type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetDelimitedTextSchemaColumnArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -1822,11 +2386,28 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the column. :param pulumi.Input[str] type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetHttpSchemaColumnArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -1882,15 +2463,48 @@ def __init__(__self__, *, :param pulumi.Input[bool] dynamic_filename_enabled: Is the `filename` using dynamic expression, function or system variables? Defaults to `false`. :param pulumi.Input[bool] dynamic_path_enabled: Is the `path` using dynamic expression, function or system variables? Defaults to `false`. """ - pulumi.set(__self__, "container", container) - pulumi.set(__self__, "filename", filename) - pulumi.set(__self__, "path", path) + DatasetJsonAzureBlobStorageLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container=container, + filename=filename, + path=path, + dynamic_container_enabled=dynamic_container_enabled, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container: Optional[pulumi.Input[str]] = None, + filename: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + dynamic_container_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_filename_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_path_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container is None: + raise TypeError("Missing 'container' argument") + if filename is None: + raise TypeError("Missing 'filename' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if dynamic_container_enabled is None and 'dynamicContainerEnabled' in kwargs: + dynamic_container_enabled = kwargs['dynamicContainerEnabled'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("container", container) + _setter("filename", filename) + _setter("path", path) if dynamic_container_enabled is not None: - pulumi.set(__self__, "dynamic_container_enabled", dynamic_container_enabled) + _setter("dynamic_container_enabled", dynamic_container_enabled) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) @property @pulumi.getter @@ -1980,13 +2594,44 @@ def __init__(__self__, *, :param pulumi.Input[bool] dynamic_filename_enabled: Is the `filename` using dynamic expression, function or system variables? Defaults to `false`. :param pulumi.Input[bool] dynamic_path_enabled: Is the `path` using dynamic expression, function or system variables? Defaults to `false`. """ - pulumi.set(__self__, "filename", filename) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "relative_url", relative_url) + DatasetJsonHttpServerLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename=filename, + path=path, + relative_url=relative_url, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + relative_url: Optional[pulumi.Input[str]] = None, + dynamic_filename_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_path_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename is None: + raise TypeError("Missing 'filename' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if relative_url is None and 'relativeUrl' in kwargs: + relative_url = kwargs['relativeUrl'] + if relative_url is None: + raise TypeError("Missing 'relative_url' argument") + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("filename", filename) + _setter("path", path) + _setter("relative_url", relative_url) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) @property @pulumi.getter @@ -2060,11 +2705,28 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the column. :param pulumi.Input[str] type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetJsonSchemaColumnArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -2114,11 +2776,28 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the column. :param pulumi.Input[str] type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetMysqlSchemaColumnArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -2174,18 +2853,47 @@ def __init__(__self__, *, :param pulumi.Input[str] filename: The filename of the file on the Azure Data Lake Storage Account. :param pulumi.Input[str] path: The folder path to the file on the Azure Data Lake Storage Account. """ + DatasetParquetAzureBlobFsLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dynamic_file_system_enabled=dynamic_file_system_enabled, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + file_system=file_system, + filename=filename, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dynamic_file_system_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_filename_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_path_enabled: Optional[pulumi.Input[bool]] = None, + file_system: Optional[pulumi.Input[str]] = None, + filename: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dynamic_file_system_enabled is None and 'dynamicFileSystemEnabled' in kwargs: + dynamic_file_system_enabled = kwargs['dynamicFileSystemEnabled'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if dynamic_file_system_enabled is not None: - pulumi.set(__self__, "dynamic_file_system_enabled", dynamic_file_system_enabled) + _setter("dynamic_file_system_enabled", dynamic_file_system_enabled) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) if filename is not None: - pulumi.set(__self__, "filename", filename) + _setter("filename", filename) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter(name="dynamicFileSystemEnabled") @@ -2277,17 +2985,46 @@ def __init__(__self__, *, :param pulumi.Input[str] filename: The filename of the file on the Azure Blob Storage Account. :param pulumi.Input[str] path: The folder path to the file on the Azure Blob Storage Account. """ - pulumi.set(__self__, "container", container) + DatasetParquetAzureBlobStorageLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container=container, + dynamic_container_enabled=dynamic_container_enabled, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + filename=filename, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container: Optional[pulumi.Input[str]] = None, + dynamic_container_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_filename_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_path_enabled: Optional[pulumi.Input[bool]] = None, + filename: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container is None: + raise TypeError("Missing 'container' argument") + if dynamic_container_enabled is None and 'dynamicContainerEnabled' in kwargs: + dynamic_container_enabled = kwargs['dynamicContainerEnabled'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("container", container) if dynamic_container_enabled is not None: - pulumi.set(__self__, "dynamic_container_enabled", dynamic_container_enabled) + _setter("dynamic_container_enabled", dynamic_container_enabled) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if filename is not None: - pulumi.set(__self__, "filename", filename) + _setter("filename", filename) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -2377,14 +3114,43 @@ def __init__(__self__, *, :param pulumi.Input[bool] dynamic_path_enabled: Is the `path` using dynamic expression, function or system variables? Defaults to `false`. :param pulumi.Input[str] path: The folder path to the file on the web server. """ - pulumi.set(__self__, "filename", filename) - pulumi.set(__self__, "relative_url", relative_url) + DatasetParquetHttpServerLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename=filename, + relative_url=relative_url, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename: Optional[pulumi.Input[str]] = None, + relative_url: Optional[pulumi.Input[str]] = None, + dynamic_filename_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_path_enabled: Optional[pulumi.Input[bool]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename is None: + raise TypeError("Missing 'filename' argument") + if relative_url is None and 'relativeUrl' in kwargs: + relative_url = kwargs['relativeUrl'] + if relative_url is None: + raise TypeError("Missing 'relative_url' argument") + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("filename", filename) + _setter("relative_url", relative_url) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -2458,11 +3224,28 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the column. :param pulumi.Input[str] type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetParquetSchemaColumnArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -2512,11 +3295,28 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the column. :param pulumi.Input[str] type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetPostgresqlSchemaColumnArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -2568,13 +3368,32 @@ def __init__(__self__, *, :param pulumi.Input[int] scale: The number of digits allowed to the right of the decimal point. :param pulumi.Input[str] type: Type of the column. Valid values are `NUMBER`, `DECIMAL`, `NUMERIC`, `INT`, `INTEGER`, `BIGINT`, `SMALLINT`, `FLOAT``FLOAT4`, `FLOAT8`, `DOUBLE`, `DOUBLE PRECISION`, `REAL`, `VARCHAR`, `CHAR`, `CHARACTER`, `STRING`, `TEXT`, `BINARY`, `VARBINARY`, `BOOLEAN`, `DATE`, `DATETIME`, `TIME`, `TIMESTAMP`, `TIMESTAMP_LTZ`, `TIMESTAMP_NTZ`, `TIMESTAMP_TZ`, `VARIANT`, `OBJECT`, `ARRAY`, `GEOGRAPHY`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetSnowflakeSchemaColumnArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + precision=precision, + scale=scale, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + precision: Optional[pulumi.Input[int]] = None, + scale: Optional[pulumi.Input[int]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if precision is not None: - pulumi.set(__self__, "precision", precision) + _setter("precision", precision) if scale is not None: - pulumi.set(__self__, "scale", scale) + _setter("scale", scale) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -2636,11 +3455,28 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the column. :param pulumi.Input[str] type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetSqlServerTableSchemaColumnArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -2698,13 +3534,56 @@ def __init__(__self__, *, > **Note:** You must log in to the Data Factory management UI to complete the authentication to the GitHub repository. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "branch_name", branch_name) - pulumi.set(__self__, "git_url", git_url) - pulumi.set(__self__, "repository_name", repository_name) - pulumi.set(__self__, "root_folder", root_folder) + FactoryGithubConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + branch_name=branch_name, + git_url=git_url, + repository_name=repository_name, + root_folder=root_folder, + publishing_enabled=publishing_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + branch_name: Optional[pulumi.Input[str]] = None, + git_url: Optional[pulumi.Input[str]] = None, + repository_name: Optional[pulumi.Input[str]] = None, + root_folder: Optional[pulumi.Input[str]] = None, + publishing_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if branch_name is None and 'branchName' in kwargs: + branch_name = kwargs['branchName'] + if branch_name is None: + raise TypeError("Missing 'branch_name' argument") + if git_url is None and 'gitUrl' in kwargs: + git_url = kwargs['gitUrl'] + if git_url is None: + raise TypeError("Missing 'git_url' argument") + if repository_name is None and 'repositoryName' in kwargs: + repository_name = kwargs['repositoryName'] + if repository_name is None: + raise TypeError("Missing 'repository_name' argument") + if root_folder is None and 'rootFolder' in kwargs: + root_folder = kwargs['rootFolder'] + if root_folder is None: + raise TypeError("Missing 'root_folder' argument") + if publishing_enabled is None and 'publishingEnabled' in kwargs: + publishing_enabled = kwargs['publishingEnabled'] + + _setter("account_name", account_name) + _setter("branch_name", branch_name) + _setter("git_url", git_url) + _setter("repository_name", repository_name) + _setter("root_folder", root_folder) if publishing_enabled is not None: - pulumi.set(__self__, "publishing_enabled", publishing_enabled) + _setter("publishing_enabled", publishing_enabled) @property @pulumi.getter(name="accountName") @@ -2794,9 +3673,30 @@ def __init__(__self__, *, > **Note:** For type `Array` and `Object` it is recommended to use `jsonencode()` for the value """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + FactoryGlobalParameterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -2852,13 +3752,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: Specifies the Tenant ID associated with the VSTS account. """ - pulumi.set(__self__, "type", type) + FactoryIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -2930,14 +3855,63 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: Specifies the Tenant ID associated with the VSTS account. :param pulumi.Input[bool] publishing_enabled: Is automated publishing enabled? Defaults to `false`. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "branch_name", branch_name) - pulumi.set(__self__, "project_name", project_name) - pulumi.set(__self__, "repository_name", repository_name) - pulumi.set(__self__, "root_folder", root_folder) - pulumi.set(__self__, "tenant_id", tenant_id) + FactoryVstsConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + branch_name=branch_name, + project_name=project_name, + repository_name=repository_name, + root_folder=root_folder, + tenant_id=tenant_id, + publishing_enabled=publishing_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + branch_name: Optional[pulumi.Input[str]] = None, + project_name: Optional[pulumi.Input[str]] = None, + repository_name: Optional[pulumi.Input[str]] = None, + root_folder: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + publishing_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if branch_name is None and 'branchName' in kwargs: + branch_name = kwargs['branchName'] + if branch_name is None: + raise TypeError("Missing 'branch_name' argument") + if project_name is None and 'projectName' in kwargs: + project_name = kwargs['projectName'] + if project_name is None: + raise TypeError("Missing 'project_name' argument") + if repository_name is None and 'repositoryName' in kwargs: + repository_name = kwargs['repositoryName'] + if repository_name is None: + raise TypeError("Missing 'repository_name' argument") + if root_folder is None and 'rootFolder' in kwargs: + root_folder = kwargs['rootFolder'] + if root_folder is None: + raise TypeError("Missing 'root_folder' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if publishing_enabled is None and 'publishingEnabled' in kwargs: + publishing_enabled = kwargs['publishingEnabled'] + + _setter("account_name", account_name) + _setter("branch_name", branch_name) + _setter("project_name", project_name) + _setter("repository_name", repository_name) + _setter("root_folder", root_folder) + _setter("tenant_id", tenant_id) if publishing_enabled is not None: - pulumi.set(__self__, "publishing_enabled", publishing_enabled) + _setter("publishing_enabled", publishing_enabled) @property @pulumi.getter(name="accountName") @@ -3043,19 +4017,50 @@ def __init__(__self__, *, :param pulumi.Input['FlowletDataFlowSinkRejectedLinkedServiceArgs'] rejected_linked_service: A `rejected_linked_service` block as defined below. :param pulumi.Input['FlowletDataFlowSinkSchemaLinkedServiceArgs'] schema_linked_service: A `schema_linked_service` block as defined below. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSinkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset=dataset, + description=description, + flowlet=flowlet, + linked_service=linked_service, + rejected_linked_service=rejected_linked_service, + schema_linked_service=schema_linked_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + dataset: Optional[pulumi.Input['FlowletDataFlowSinkDatasetArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + flowlet: Optional[pulumi.Input['FlowletDataFlowSinkFlowletArgs']] = None, + linked_service: Optional[pulumi.Input['FlowletDataFlowSinkLinkedServiceArgs']] = None, + rejected_linked_service: Optional[pulumi.Input['FlowletDataFlowSinkRejectedLinkedServiceArgs']] = None, + schema_linked_service: Optional[pulumi.Input['FlowletDataFlowSinkSchemaLinkedServiceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + if rejected_linked_service is None and 'rejectedLinkedService' in kwargs: + rejected_linked_service = kwargs['rejectedLinkedService'] + if schema_linked_service is None and 'schemaLinkedService' in kwargs: + schema_linked_service = kwargs['schemaLinkedService'] + + _setter("name", name) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if flowlet is not None: - pulumi.set(__self__, "flowlet", flowlet) + _setter("flowlet", flowlet) if linked_service is not None: - pulumi.set(__self__, "linked_service", linked_service) + _setter("linked_service", linked_service) if rejected_linked_service is not None: - pulumi.set(__self__, "rejected_linked_service", rejected_linked_service) + _setter("rejected_linked_service", rejected_linked_service) if schema_linked_service is not None: - pulumi.set(__self__, "schema_linked_service", schema_linked_service) + _setter("schema_linked_service", schema_linked_service) @property @pulumi.getter @@ -3151,9 +4156,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Dataset. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory dataset. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSinkDatasetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3191,11 +4211,30 @@ def __init__(__self__, *, :param pulumi.Input[str] dataset_parameters: Specifies the reference data flow parameters from dataset. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Flowlet. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSinkFlowletArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset_parameters=dataset_parameters, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + dataset_parameters: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if dataset_parameters is None and 'datasetParameters' in kwargs: + dataset_parameters = kwargs['datasetParameters'] + + _setter("name", name) if dataset_parameters is not None: - pulumi.set(__self__, "dataset_parameters", dataset_parameters) + _setter("dataset_parameters", dataset_parameters) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3243,9 +4282,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSinkLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3281,9 +4335,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service with schema. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSinkRejectedLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3319,9 +4388,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service with schema. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSinkSchemaLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3367,19 +4451,50 @@ def __init__(__self__, *, :param pulumi.Input['FlowletDataFlowSourceRejectedLinkedServiceArgs'] rejected_linked_service: A `rejected_linked_service` block as defined below. :param pulumi.Input['FlowletDataFlowSourceSchemaLinkedServiceArgs'] schema_linked_service: A `schema_linked_service` block as defined below. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset=dataset, + description=description, + flowlet=flowlet, + linked_service=linked_service, + rejected_linked_service=rejected_linked_service, + schema_linked_service=schema_linked_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + dataset: Optional[pulumi.Input['FlowletDataFlowSourceDatasetArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + flowlet: Optional[pulumi.Input['FlowletDataFlowSourceFlowletArgs']] = None, + linked_service: Optional[pulumi.Input['FlowletDataFlowSourceLinkedServiceArgs']] = None, + rejected_linked_service: Optional[pulumi.Input['FlowletDataFlowSourceRejectedLinkedServiceArgs']] = None, + schema_linked_service: Optional[pulumi.Input['FlowletDataFlowSourceSchemaLinkedServiceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + if rejected_linked_service is None and 'rejectedLinkedService' in kwargs: + rejected_linked_service = kwargs['rejectedLinkedService'] + if schema_linked_service is None and 'schemaLinkedService' in kwargs: + schema_linked_service = kwargs['schemaLinkedService'] + + _setter("name", name) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if flowlet is not None: - pulumi.set(__self__, "flowlet", flowlet) + _setter("flowlet", flowlet) if linked_service is not None: - pulumi.set(__self__, "linked_service", linked_service) + _setter("linked_service", linked_service) if rejected_linked_service is not None: - pulumi.set(__self__, "rejected_linked_service", rejected_linked_service) + _setter("rejected_linked_service", rejected_linked_service) if schema_linked_service is not None: - pulumi.set(__self__, "schema_linked_service", schema_linked_service) + _setter("schema_linked_service", schema_linked_service) @property @pulumi.getter @@ -3475,9 +4590,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Dataset. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory dataset. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSourceDatasetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3515,11 +4645,30 @@ def __init__(__self__, *, :param pulumi.Input[str] dataset_parameters: Specifies the reference data flow parameters from dataset. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Flowlet. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSourceFlowletArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset_parameters=dataset_parameters, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + dataset_parameters: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if dataset_parameters is None and 'datasetParameters' in kwargs: + dataset_parameters = kwargs['datasetParameters'] + + _setter("name", name) if dataset_parameters is not None: - pulumi.set(__self__, "dataset_parameters", dataset_parameters) + _setter("dataset_parameters", dataset_parameters) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3567,9 +4716,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSourceLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3605,9 +4769,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service with schema. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSourceRejectedLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3643,9 +4822,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service with schema. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSourceSchemaLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3687,15 +4881,38 @@ def __init__(__self__, *, :param pulumi.Input['FlowletDataFlowTransformationFlowletArgs'] flowlet: A `flowlet` block as defined below. :param pulumi.Input['FlowletDataFlowTransformationLinkedServiceArgs'] linked_service: A `linked_service` block as defined below. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowTransformationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset=dataset, + description=description, + flowlet=flowlet, + linked_service=linked_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + dataset: Optional[pulumi.Input['FlowletDataFlowTransformationDatasetArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + flowlet: Optional[pulumi.Input['FlowletDataFlowTransformationFlowletArgs']] = None, + linked_service: Optional[pulumi.Input['FlowletDataFlowTransformationLinkedServiceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + + _setter("name", name) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if flowlet is not None: - pulumi.set(__self__, "flowlet", flowlet) + _setter("flowlet", flowlet) if linked_service is not None: - pulumi.set(__self__, "linked_service", linked_service) + _setter("linked_service", linked_service) @property @pulumi.getter @@ -3767,9 +4984,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Dataset. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory dataset. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowTransformationDatasetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3807,11 +5039,30 @@ def __init__(__self__, *, :param pulumi.Input[str] dataset_parameters: Specifies the reference data flow parameters from dataset. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Flowlet. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowTransformationFlowletArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset_parameters=dataset_parameters, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + dataset_parameters: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if dataset_parameters is None and 'datasetParameters' in kwargs: + dataset_parameters = kwargs['datasetParameters'] + + _setter("name", name) if dataset_parameters is not None: - pulumi.set(__self__, "dataset_parameters", dataset_parameters) + _setter("dataset_parameters", dataset_parameters) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3859,9 +5110,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name for the Data Factory Linked Service. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowTransformationLinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3901,13 +5167,40 @@ def __init__(__self__, *, :param pulumi.Input[str] administrator_password: Administrator login password for the SQL Server. :param pulumi.Input[str] pricing_tier: Pricing tier for the database that will be created for the SSIS catalog. Valid values are: `Basic`, `Standard`, `Premium` and `PremiumRS`. """ - pulumi.set(__self__, "server_endpoint", server_endpoint) + IntegrationRuntimeManagedCatalogInfoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + server_endpoint=server_endpoint, + administrator_login=administrator_login, + administrator_password=administrator_password, + pricing_tier=pricing_tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server_endpoint: Optional[pulumi.Input[str]] = None, + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_password: Optional[pulumi.Input[str]] = None, + pricing_tier: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_endpoint is None and 'serverEndpoint' in kwargs: + server_endpoint = kwargs['serverEndpoint'] + if server_endpoint is None: + raise TypeError("Missing 'server_endpoint' argument") + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_password is None and 'administratorPassword' in kwargs: + administrator_password = kwargs['administratorPassword'] + if pricing_tier is None and 'pricingTier' in kwargs: + pricing_tier = kwargs['pricingTier'] + + _setter("server_endpoint", server_endpoint) if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_password is not None: - pulumi.set(__self__, "administrator_password", administrator_password) + _setter("administrator_password", administrator_password) if pricing_tier is not None: - pulumi.set(__self__, "pricing_tier", pricing_tier) + _setter("pricing_tier", pricing_tier) @property @pulumi.getter(name="serverEndpoint") @@ -3967,8 +5260,29 @@ def __init__(__self__, *, :param pulumi.Input[str] blob_container_uri: The blob endpoint for the container which contains a custom setup script that will be run on every node on startup. See [https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup](https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup) for more information. :param pulumi.Input[str] sas_token: A container SAS token that gives access to the files. See [https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup](https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup) for more information. """ - pulumi.set(__self__, "blob_container_uri", blob_container_uri) - pulumi.set(__self__, "sas_token", sas_token) + IntegrationRuntimeManagedCustomSetupScriptArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_container_uri=blob_container_uri, + sas_token=sas_token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_container_uri: Optional[pulumi.Input[str]] = None, + sas_token: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_container_uri is None and 'blobContainerUri' in kwargs: + blob_container_uri = kwargs['blobContainerUri'] + if blob_container_uri is None: + raise TypeError("Missing 'blob_container_uri' argument") + if sas_token is None and 'sasToken' in kwargs: + sas_token = kwargs['sasToken'] + if sas_token is None: + raise TypeError("Missing 'sas_token' argument") + + _setter("blob_container_uri", blob_container_uri) + _setter("sas_token", sas_token) @property @pulumi.getter(name="blobContainerUri") @@ -4004,8 +5318,29 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_name: Name of the subnet to which the nodes of the Managed Integration Runtime will be added. :param pulumi.Input[str] vnet_id: ID of the virtual network to which the nodes of the Managed Integration Runtime will be added. """ - pulumi.set(__self__, "subnet_name", subnet_name) - pulumi.set(__self__, "vnet_id", vnet_id) + IntegrationRuntimeManagedVnetIntegrationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_name=subnet_name, + vnet_id=vnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_name: Optional[pulumi.Input[str]] = None, + vnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_name is None and 'subnetName' in kwargs: + subnet_name = kwargs['subnetName'] + if subnet_name is None: + raise TypeError("Missing 'subnet_name' argument") + if vnet_id is None and 'vnetId' in kwargs: + vnet_id = kwargs['vnetId'] + if vnet_id is None: + raise TypeError("Missing 'vnet_id' argument") + + _setter("subnet_name", subnet_name) + _setter("vnet_id", vnet_id) @property @pulumi.getter(name="subnetName") @@ -4043,7 +5378,22 @@ def __init__(__self__, *, For more information on the configuration, please check out the [Azure documentation](https://docs.microsoft.com/rest/api/datafactory/integrationruntimes/createorupdate#linkedintegrationruntimerbacauthorization) """ - pulumi.set(__self__, "resource_id", resource_id) + IntegrationRuntimeSelfHostedRbacAuthorizationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_id=resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + + _setter("resource_id", resource_id) @property @pulumi.getter(name="resourceId") @@ -4079,17 +5429,52 @@ def __init__(__self__, *, :param pulumi.Input[str] elastic_pool_name: The name of SQL elastic pool where the database will be created for the SSIS catalog. Mutually exclusive with `pricing_tier`. :param pulumi.Input[str] pricing_tier: Pricing tier for the database that will be created for the SSIS catalog. Valid values are: `Basic`, `S0`, `S1`, `S2`, `S3`, `S4`, `S6`, `S7`, `S9`, `S12`, `P1`, `P2`, `P4`, `P6`, `P11`, `P15`, `GP_S_Gen5_1`, `GP_S_Gen5_2`, `GP_S_Gen5_4`, `GP_S_Gen5_6`, `GP_S_Gen5_8`, `GP_S_Gen5_10`, `GP_S_Gen5_12`, `GP_S_Gen5_14`, `GP_S_Gen5_16`, `GP_S_Gen5_18`, `GP_S_Gen5_20`, `GP_S_Gen5_24`, `GP_S_Gen5_32`, `GP_S_Gen5_40`, `GP_Gen5_2`, `GP_Gen5_4`, `GP_Gen5_6`, `GP_Gen5_8`, `GP_Gen5_10`, `GP_Gen5_12`, `GP_Gen5_14`, `GP_Gen5_16`, `GP_Gen5_18`, `GP_Gen5_20`, `GP_Gen5_24`, `GP_Gen5_32`, `GP_Gen5_40`, `GP_Gen5_80`, `BC_Gen5_2`, `BC_Gen5_4`, `BC_Gen5_6`, `BC_Gen5_8`, `BC_Gen5_10`, `BC_Gen5_12`, `BC_Gen5_14`, `BC_Gen5_16`, `BC_Gen5_18`, `BC_Gen5_20`, `BC_Gen5_24`, `BC_Gen5_32`, `BC_Gen5_40`, `BC_Gen5_80`, `HS_Gen5_2`, `HS_Gen5_4`, `HS_Gen5_6`, `HS_Gen5_8`, `HS_Gen5_10`, `HS_Gen5_12`, `HS_Gen5_14`, `HS_Gen5_16`, `HS_Gen5_18`, `HS_Gen5_20`, `HS_Gen5_24`, `HS_Gen5_32`, `HS_Gen5_40` and `HS_Gen5_80`. Mutually exclusive with `elastic_pool_name`. """ - pulumi.set(__self__, "server_endpoint", server_endpoint) + IntegrationRuntimeSsisCatalogInfoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + server_endpoint=server_endpoint, + administrator_login=administrator_login, + administrator_password=administrator_password, + dual_standby_pair_name=dual_standby_pair_name, + elastic_pool_name=elastic_pool_name, + pricing_tier=pricing_tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server_endpoint: Optional[pulumi.Input[str]] = None, + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_password: Optional[pulumi.Input[str]] = None, + dual_standby_pair_name: Optional[pulumi.Input[str]] = None, + elastic_pool_name: Optional[pulumi.Input[str]] = None, + pricing_tier: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_endpoint is None and 'serverEndpoint' in kwargs: + server_endpoint = kwargs['serverEndpoint'] + if server_endpoint is None: + raise TypeError("Missing 'server_endpoint' argument") + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_password is None and 'administratorPassword' in kwargs: + administrator_password = kwargs['administratorPassword'] + if dual_standby_pair_name is None and 'dualStandbyPairName' in kwargs: + dual_standby_pair_name = kwargs['dualStandbyPairName'] + if elastic_pool_name is None and 'elasticPoolName' in kwargs: + elastic_pool_name = kwargs['elasticPoolName'] + if pricing_tier is None and 'pricingTier' in kwargs: + pricing_tier = kwargs['pricingTier'] + + _setter("server_endpoint", server_endpoint) if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_password is not None: - pulumi.set(__self__, "administrator_password", administrator_password) + _setter("administrator_password", administrator_password) if dual_standby_pair_name is not None: - pulumi.set(__self__, "dual_standby_pair_name", dual_standby_pair_name) + _setter("dual_standby_pair_name", dual_standby_pair_name) if elastic_pool_name is not None: - pulumi.set(__self__, "elastic_pool_name", elastic_pool_name) + _setter("elastic_pool_name", elastic_pool_name) if pricing_tier is not None: - pulumi.set(__self__, "pricing_tier", pricing_tier) + _setter("pricing_tier", pricing_tier) @property @pulumi.getter(name="serverEndpoint") @@ -4173,8 +5558,29 @@ def __init__(__self__, *, :param pulumi.Input[str] blob_container_uri: The blob endpoint for the container which contains a custom setup script that will be run on every node on startup. See [https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup](https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup) for more information. :param pulumi.Input[str] sas_token: A container SAS token that gives access to the files. See [https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup](https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup) for more information. """ - pulumi.set(__self__, "blob_container_uri", blob_container_uri) - pulumi.set(__self__, "sas_token", sas_token) + IntegrationRuntimeSsisCustomSetupScriptArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_container_uri=blob_container_uri, + sas_token=sas_token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_container_uri: Optional[pulumi.Input[str]] = None, + sas_token: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_container_uri is None and 'blobContainerUri' in kwargs: + blob_container_uri = kwargs['blobContainerUri'] + if blob_container_uri is None: + raise TypeError("Missing 'blob_container_uri' argument") + if sas_token is None and 'sasToken' in kwargs: + sas_token = kwargs['sasToken'] + if sas_token is None: + raise TypeError("Missing 'sas_token' argument") + + _setter("blob_container_uri", blob_container_uri) + _setter("sas_token", sas_token) @property @pulumi.getter(name="blobContainerUri") @@ -4216,14 +5622,35 @@ def __init__(__self__, *, > **NOTE** At least one of `env`, `powershell_version`, `component` and `command_key` should be specified. """ + IntegrationRuntimeSsisExpressCustomSetupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + command_keys=command_keys, + components=components, + environment=environment, + powershell_version=powershell_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + command_keys: Optional[pulumi.Input[Sequence[pulumi.Input['IntegrationRuntimeSsisExpressCustomSetupCommandKeyArgs']]]] = None, + components: Optional[pulumi.Input[Sequence[pulumi.Input['IntegrationRuntimeSsisExpressCustomSetupComponentArgs']]]] = None, + environment: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + powershell_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if command_keys is None and 'commandKeys' in kwargs: + command_keys = kwargs['commandKeys'] + if powershell_version is None and 'powershellVersion' in kwargs: + powershell_version = kwargs['powershellVersion'] + if command_keys is not None: - pulumi.set(__self__, "command_keys", command_keys) + _setter("command_keys", command_keys) if components is not None: - pulumi.set(__self__, "components", components) + _setter("components", components) if environment is not None: - pulumi.set(__self__, "environment", environment) + _setter("environment", environment) if powershell_version is not None: - pulumi.set(__self__, "powershell_version", powershell_version) + _setter("powershell_version", powershell_version) @property @pulumi.getter(name="commandKeys") @@ -4289,12 +5716,39 @@ def __init__(__self__, *, :param pulumi.Input['IntegrationRuntimeSsisExpressCustomSetupCommandKeyKeyVaultPasswordArgs'] key_vault_password: A `key_vault_secret_reference` block as defined below. :param pulumi.Input[str] password: The password for the target device. """ - pulumi.set(__self__, "target_name", target_name) - pulumi.set(__self__, "user_name", user_name) + IntegrationRuntimeSsisExpressCustomSetupCommandKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_name=target_name, + user_name=user_name, + key_vault_password=key_vault_password, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_name: Optional[pulumi.Input[str]] = None, + user_name: Optional[pulumi.Input[str]] = None, + key_vault_password: Optional[pulumi.Input['IntegrationRuntimeSsisExpressCustomSetupCommandKeyKeyVaultPasswordArgs']] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_name is None and 'targetName' in kwargs: + target_name = kwargs['targetName'] + if target_name is None: + raise TypeError("Missing 'target_name' argument") + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + if user_name is None: + raise TypeError("Missing 'user_name' argument") + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + + _setter("target_name", target_name) + _setter("user_name", user_name) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter(name="targetName") @@ -4358,12 +5812,39 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Key Vault Data Factory Linked Service. :param pulumi.Input[str] secret_version: Specifies the secret version in Azure Key Vault. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + IntegrationRuntimeSsisExpressCustomSetupCommandKeyKeyVaultPasswordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + parameters=parameters, + secret_version=secret_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + secret_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if secret_version is None and 'secretVersion' in kwargs: + secret_version = kwargs['secretVersion'] + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if secret_version is not None: - pulumi.set(__self__, "secret_version", secret_version) + _setter("secret_version", secret_version) @property @pulumi.getter(name="linkedServiceName") @@ -4425,11 +5906,30 @@ def __init__(__self__, *, :param pulumi.Input['IntegrationRuntimeSsisExpressCustomSetupComponentKeyVaultLicenseArgs'] key_vault_license: A `key_vault_secret_reference` block as defined below. :param pulumi.Input[str] license: The license used for the Component. """ - pulumi.set(__self__, "name", name) + IntegrationRuntimeSsisExpressCustomSetupComponentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + key_vault_license=key_vault_license, + license=license, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + key_vault_license: Optional[pulumi.Input['IntegrationRuntimeSsisExpressCustomSetupComponentKeyVaultLicenseArgs']] = None, + license: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if key_vault_license is None and 'keyVaultLicense' in kwargs: + key_vault_license = kwargs['keyVaultLicense'] + + _setter("name", name) if key_vault_license is not None: - pulumi.set(__self__, "key_vault_license", key_vault_license) + _setter("key_vault_license", key_vault_license) if license is not None: - pulumi.set(__self__, "license", license) + _setter("license", license) @property @pulumi.getter @@ -4481,12 +5981,39 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Key Vault Data Factory Linked Service. :param pulumi.Input[str] secret_version: Specifies the secret version in Azure Key Vault. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + IntegrationRuntimeSsisExpressCustomSetupComponentKeyVaultLicenseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + parameters=parameters, + secret_version=secret_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + secret_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if secret_version is None and 'secretVersion' in kwargs: + secret_version = kwargs['secretVersion'] + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if secret_version is not None: - pulumi.set(__self__, "secret_version", secret_version) + _setter("secret_version", secret_version) @property @pulumi.getter(name="linkedServiceName") @@ -4544,7 +6071,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] subnet_id: id of the subnet to which the nodes of the Azure-SSIS Integration Runtime will be added. """ - pulumi.set(__self__, "subnet_id", subnet_id) + IntegrationRuntimeSsisExpressVnetIntegrationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="subnetId") @@ -4568,8 +6110,27 @@ def __init__(__self__, *, :param pulumi.Input[str] linked_service_name: Name of the Linked Service to associate with the packages. :param pulumi.Input[str] name: Name of the package store. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "name", name) + IntegrationRuntimeSsisPackageStoreArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("name", name) @property @pulumi.getter(name="linkedServiceName") @@ -4607,10 +6168,33 @@ def __init__(__self__, *, :param pulumi.Input[str] staging_storage_linked_service_name: Name of Azure Blob Storage linked service to reference the staging data store to be used when moving data between self-hosted and Azure-SSIS integration runtimes. :param pulumi.Input[str] path: The path in the data store to be used when moving data between Self-Hosted and Azure-SSIS Integration Runtimes. """ - pulumi.set(__self__, "self_hosted_integration_runtime_name", self_hosted_integration_runtime_name) - pulumi.set(__self__, "staging_storage_linked_service_name", staging_storage_linked_service_name) + IntegrationRuntimeSsisProxyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + self_hosted_integration_runtime_name=self_hosted_integration_runtime_name, + staging_storage_linked_service_name=staging_storage_linked_service_name, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + self_hosted_integration_runtime_name: Optional[pulumi.Input[str]] = None, + staging_storage_linked_service_name: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if self_hosted_integration_runtime_name is None and 'selfHostedIntegrationRuntimeName' in kwargs: + self_hosted_integration_runtime_name = kwargs['selfHostedIntegrationRuntimeName'] + if self_hosted_integration_runtime_name is None: + raise TypeError("Missing 'self_hosted_integration_runtime_name' argument") + if staging_storage_linked_service_name is None and 'stagingStorageLinkedServiceName' in kwargs: + staging_storage_linked_service_name = kwargs['stagingStorageLinkedServiceName'] + if staging_storage_linked_service_name is None: + raise TypeError("Missing 'staging_storage_linked_service_name' argument") + + _setter("self_hosted_integration_runtime_name", self_hosted_integration_runtime_name) + _setter("staging_storage_linked_service_name", staging_storage_linked_service_name) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter(name="selfHostedIntegrationRuntimeName") @@ -4664,14 +6248,39 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_name: Name of the subnet to which the nodes of the Azure-SSIS Integration Runtime will be added. :param pulumi.Input[str] vnet_id: ID of the virtual network to which the nodes of the Azure-SSIS Integration Runtime will be added. """ + IntegrationRuntimeSsisVnetIntegrationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_ips=public_ips, + subnet_id=subnet_id, + subnet_name=subnet_name, + vnet_id=vnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + subnet_name: Optional[pulumi.Input[str]] = None, + vnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_ips is None and 'publicIps' in kwargs: + public_ips = kwargs['publicIps'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_name is None and 'subnetName' in kwargs: + subnet_name = kwargs['subnetName'] + if vnet_id is None and 'vnetId' in kwargs: + vnet_id = kwargs['vnetId'] + if public_ips is not None: - pulumi.set(__self__, "public_ips", public_ips) + _setter("public_ips", public_ips) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if subnet_name is not None: - pulumi.set(__self__, "subnet_name", subnet_name) + _setter("subnet_name", subnet_name) if vnet_id is not None: - pulumi.set(__self__, "vnet_id", vnet_id) + _setter("vnet_id", vnet_id) @property @pulumi.getter(name="publicIps") @@ -4733,9 +6342,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The integration runtime reference to associate with the Data Factory Linked Service. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the integration runtime. """ - pulumi.set(__self__, "name", name) + LinkedCustomServiceIntegrationRuntimeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -4771,8 +6395,29 @@ def __init__(__self__, *, :param pulumi.Input[str] linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param pulumi.Input[str] secret_name: Specifies the secret name in Azure Key Vault that stores the SAS token. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureBlobStorageKeyVaultSasTokenArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -4808,8 +6453,29 @@ def __init__(__self__, *, :param pulumi.Input[str] linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param pulumi.Input[str] secret_name: Specifies the secret name in Azure Key Vault that stores the Service Principal key. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureBlobStorageServicePrincipalLinkedKeyVaultKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -4849,12 +6515,41 @@ def __init__(__self__, *, :param pulumi.Input[int] max_number_of_workers: The max number of worker nodes. Set this value if you want to enable autoscaling between the `min_number_of_workers` and this value. Omit this value to use a fixed number of workers defined in the `min_number_of_workers` property. :param pulumi.Input[int] min_number_of_workers: The minimum number of worker nodes. Defaults to `1`. """ - pulumi.set(__self__, "cluster_version", cluster_version) - pulumi.set(__self__, "instance_pool_id", instance_pool_id) + LinkedServiceAzureDatabricksInstancePoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + instance_pool_id=instance_pool_id, + max_number_of_workers=max_number_of_workers, + min_number_of_workers=min_number_of_workers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[pulumi.Input[str]] = None, + instance_pool_id: Optional[pulumi.Input[str]] = None, + max_number_of_workers: Optional[pulumi.Input[int]] = None, + min_number_of_workers: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if cluster_version is None: + raise TypeError("Missing 'cluster_version' argument") + if instance_pool_id is None and 'instancePoolId' in kwargs: + instance_pool_id = kwargs['instancePoolId'] + if instance_pool_id is None: + raise TypeError("Missing 'instance_pool_id' argument") + if max_number_of_workers is None and 'maxNumberOfWorkers' in kwargs: + max_number_of_workers = kwargs['maxNumberOfWorkers'] + if min_number_of_workers is None and 'minNumberOfWorkers' in kwargs: + min_number_of_workers = kwargs['minNumberOfWorkers'] + + _setter("cluster_version", cluster_version) + _setter("instance_pool_id", instance_pool_id) if max_number_of_workers is not None: - pulumi.set(__self__, "max_number_of_workers", max_number_of_workers) + _setter("max_number_of_workers", max_number_of_workers) if min_number_of_workers is not None: - pulumi.set(__self__, "min_number_of_workers", min_number_of_workers) + _setter("min_number_of_workers", min_number_of_workers) @property @pulumi.getter(name="clusterVersion") @@ -4914,8 +6609,29 @@ def __init__(__self__, *, :param pulumi.Input[str] linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param pulumi.Input[str] secret_name: Specifies the secret name in Azure Key Vault that stores ADB access token. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureDatabricksKeyVaultPasswordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -4967,24 +6683,77 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] spark_config: User-specified Spark configuration variables key-value pairs. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] spark_environment_variables: User-specified Spark environment variables key-value pairs. """ - pulumi.set(__self__, "cluster_version", cluster_version) - pulumi.set(__self__, "node_type", node_type) + LinkedServiceAzureDatabricksNewClusterConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + node_type=node_type, + custom_tags=custom_tags, + driver_node_type=driver_node_type, + init_scripts=init_scripts, + log_destination=log_destination, + max_number_of_workers=max_number_of_workers, + min_number_of_workers=min_number_of_workers, + spark_config=spark_config, + spark_environment_variables=spark_environment_variables, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[pulumi.Input[str]] = None, + node_type: Optional[pulumi.Input[str]] = None, + custom_tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + driver_node_type: Optional[pulumi.Input[str]] = None, + init_scripts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + log_destination: Optional[pulumi.Input[str]] = None, + max_number_of_workers: Optional[pulumi.Input[int]] = None, + min_number_of_workers: Optional[pulumi.Input[int]] = None, + spark_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + spark_environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if cluster_version is None: + raise TypeError("Missing 'cluster_version' argument") + if node_type is None and 'nodeType' in kwargs: + node_type = kwargs['nodeType'] + if node_type is None: + raise TypeError("Missing 'node_type' argument") + if custom_tags is None and 'customTags' in kwargs: + custom_tags = kwargs['customTags'] + if driver_node_type is None and 'driverNodeType' in kwargs: + driver_node_type = kwargs['driverNodeType'] + if init_scripts is None and 'initScripts' in kwargs: + init_scripts = kwargs['initScripts'] + if log_destination is None and 'logDestination' in kwargs: + log_destination = kwargs['logDestination'] + if max_number_of_workers is None and 'maxNumberOfWorkers' in kwargs: + max_number_of_workers = kwargs['maxNumberOfWorkers'] + if min_number_of_workers is None and 'minNumberOfWorkers' in kwargs: + min_number_of_workers = kwargs['minNumberOfWorkers'] + if spark_config is None and 'sparkConfig' in kwargs: + spark_config = kwargs['sparkConfig'] + if spark_environment_variables is None and 'sparkEnvironmentVariables' in kwargs: + spark_environment_variables = kwargs['sparkEnvironmentVariables'] + + _setter("cluster_version", cluster_version) + _setter("node_type", node_type) if custom_tags is not None: - pulumi.set(__self__, "custom_tags", custom_tags) + _setter("custom_tags", custom_tags) if driver_node_type is not None: - pulumi.set(__self__, "driver_node_type", driver_node_type) + _setter("driver_node_type", driver_node_type) if init_scripts is not None: - pulumi.set(__self__, "init_scripts", init_scripts) + _setter("init_scripts", init_scripts) if log_destination is not None: - pulumi.set(__self__, "log_destination", log_destination) + _setter("log_destination", log_destination) if max_number_of_workers is not None: - pulumi.set(__self__, "max_number_of_workers", max_number_of_workers) + _setter("max_number_of_workers", max_number_of_workers) if min_number_of_workers is not None: - pulumi.set(__self__, "min_number_of_workers", min_number_of_workers) + _setter("min_number_of_workers", min_number_of_workers) if spark_config is not None: - pulumi.set(__self__, "spark_config", spark_config) + _setter("spark_config", spark_config) if spark_environment_variables is not None: - pulumi.set(__self__, "spark_environment_variables", spark_environment_variables) + _setter("spark_environment_variables", spark_environment_variables) @property @pulumi.getter(name="clusterVersion") @@ -5116,8 +6885,29 @@ def __init__(__self__, *, :param pulumi.Input[str] linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param pulumi.Input[str] secret_name: Specifies the secret name in Azure Key Vault that stores Azure File Storage password. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureFileStorageKeyVaultPasswordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5153,8 +6943,29 @@ def __init__(__self__, *, :param pulumi.Input[str] linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param pulumi.Input[str] secret_name: Specifies the secret name in Azure Key Vault that stores the system key of the Azure Function. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureFunctionKeyVaultKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5190,8 +7001,29 @@ def __init__(__self__, *, :param pulumi.Input[str] linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param pulumi.Input[str] secret_name: Specifies the secret name in Azure Key Vault that stores SQL Server connection string. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureSqlDatabaseKeyVaultConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5227,8 +7059,29 @@ def __init__(__self__, *, :param pulumi.Input[str] linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param pulumi.Input[str] secret_name: Specifies the secret name in Azure Key Vault that stores SQL Server password. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureSqlDatabaseKeyVaultPasswordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5264,8 +7117,25 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password associated with the username, which can be used to authenticate to the OData endpoint. :param pulumi.Input[str] username: The username which can be used to authenticate to the OData endpoint. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + LinkedServiceOdataBasicAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -5301,8 +7171,25 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password associated with the username, which can be used to authenticate to the ODBC endpoint. :param pulumi.Input[str] username: The username which can be used to authenticate to the ODBC endpoint. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + LinkedServiceOdbcBasicAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -5338,8 +7225,29 @@ def __init__(__self__, *, :param pulumi.Input[str] linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param pulumi.Input[str] secret_name: Specifies the secret name in Azure Key Vault that stores Snowflake password. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceSnowflakeKeyVaultPasswordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5375,8 +7283,29 @@ def __init__(__self__, *, :param pulumi.Input[str] linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param pulumi.Input[str] secret_name: Specifies the secret name in Azure Key Vault that stores SQL Server connection string. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceSqlServerKeyVaultConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5412,8 +7341,29 @@ def __init__(__self__, *, :param pulumi.Input[str] linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param pulumi.Input[str] secret_name: Specifies the secret name in Azure Key Vault that stores SQL Server password. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceSqlServerKeyVaultPasswordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5449,8 +7399,29 @@ def __init__(__self__, *, :param pulumi.Input[str] linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param pulumi.Input[str] secret_name: Specifies the secret name in Azure Key Vault that stores Synapse password. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceSynapseKeyVaultPasswordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[pulumi.Input[str]] = None, + secret_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5486,9 +7457,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Data Factory Pipeline name that the trigger will act on. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: The Data Factory Pipeline parameters that the trigger will act on. """ - pulumi.set(__self__, "name", name) + TriggerBlobEventPipelineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -5524,9 +7510,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Data Factory Pipeline name that the trigger will act on. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: The Data Factory Pipeline parameters that the trigger will act on. """ - pulumi.set(__self__, "name", name) + TriggerCustomEventPipelineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -5562,9 +7563,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Reference pipeline name. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: The pipeline parameters that the trigger will act upon. """ - pulumi.set(__self__, "name", name) + TriggerSchedulePipelineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -5606,16 +7622,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[int]]] minutes: Minutes of the hour on which the trigger is scheduled. :param pulumi.Input[Sequence[pulumi.Input['TriggerScheduleScheduleMonthlyArgs']]] monthlies: A `monthly` block as documented below, which specifies the days of the month on which the trigger is scheduled. The value can be specified only with a monthly frequency. """ + TriggerScheduleScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_months=days_of_months, + days_of_weeks=days_of_weeks, + hours=hours, + minutes=minutes, + monthlies=monthlies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_months: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + days_of_weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + hours: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + minutes: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + monthlies: Optional[pulumi.Input[Sequence[pulumi.Input['TriggerScheduleScheduleMonthlyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_months is None and 'daysOfMonths' in kwargs: + days_of_months = kwargs['daysOfMonths'] + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if days_of_months is not None: - pulumi.set(__self__, "days_of_months", days_of_months) + _setter("days_of_months", days_of_months) if days_of_weeks is not None: - pulumi.set(__self__, "days_of_weeks", days_of_weeks) + _setter("days_of_weeks", days_of_weeks) if hours is not None: - pulumi.set(__self__, "hours", hours) + _setter("hours", hours) if minutes is not None: - pulumi.set(__self__, "minutes", minutes) + _setter("minutes", minutes) if monthlies is not None: - pulumi.set(__self__, "monthlies", monthlies) + _setter("monthlies", monthlies) @property @pulumi.getter(name="daysOfMonths") @@ -5687,9 +7726,24 @@ def __init__(__self__, *, :param pulumi.Input[str] weekday: The day of the week on which the trigger runs. For example, a `monthly` property with a `weekday` value of `Sunday` means every Sunday of the month. :param pulumi.Input[int] week: The occurrence of the specified day during the month. For example, a `monthly` property with `weekday` and `week` values of `Sunday, -1` means the last Sunday of the month. """ - pulumi.set(__self__, "weekday", weekday) + TriggerScheduleScheduleMonthlyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + weekday=weekday, + week=week, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + weekday: Optional[pulumi.Input[str]] = None, + week: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if weekday is None: + raise TypeError("Missing 'weekday' argument") + + _setter("weekday", weekday) if week is not None: - pulumi.set(__self__, "week", week) + _setter("week", week) @property @pulumi.getter @@ -5725,9 +7779,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Data Factory Pipeline name that the trigger will act on. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: The Data Factory Pipeline parameters that the trigger will act on. """ - pulumi.set(__self__, "name", name) + TriggerTumblingWindowPipelineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -5763,9 +7832,24 @@ def __init__(__self__, *, :param pulumi.Input[int] count: The maximum retry attempts if the pipeline run failed. :param pulumi.Input[int] interval: The Interval in seconds between each retry if the pipeline run failed. Defaults to `30`. """ - pulumi.set(__self__, "count", count) + TriggerTumblingWindowRetryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[pulumi.Input[int]] = None, + interval: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + + _setter("count", count) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) @property @pulumi.getter @@ -5803,12 +7887,29 @@ def __init__(__self__, *, :param pulumi.Input[str] size: The size of the dependency tumbling window. Must be in Timespan format (hh:mm:ss). :param pulumi.Input[str] trigger_name: The dependency trigger name. If not specified, it will use self dependency. """ + TriggerTumblingWindowTriggerDependencyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + offset=offset, + size=size, + trigger_name=trigger_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offset: Optional[pulumi.Input[str]] = None, + size: Optional[pulumi.Input[str]] = None, + trigger_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if trigger_name is None and 'triggerName' in kwargs: + trigger_name = kwargs['triggerName'] + if offset is not None: - pulumi.set(__self__, "offset", offset) + _setter("offset", offset) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if trigger_name is not None: - pulumi.set(__self__, "trigger_name", trigger_name) + _setter("trigger_name", trigger_name) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/datafactory/custom_dataset.py b/sdk/python/pulumi_azure/datafactory/custom_dataset.py index 97502ca2e9..28bd3fc5b5 100644 --- a/sdk/python/pulumi_azure/datafactory/custom_dataset.py +++ b/sdk/python/pulumi_azure/datafactory/custom_dataset.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,24 +41,73 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Dataset. :param pulumi.Input[str] schema_json: A JSON object that contains the schema of the Data Factory Dataset. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "linked_service", linked_service) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_properties_json", type_properties_json) + CustomDatasetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + linked_service=linked_service, + type=type, + type_properties_json=type_properties_json, + additional_properties=additional_properties, + annotations=annotations, + description=description, + folder=folder, + name=name, + parameters=parameters, + schema_json=schema_json, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + linked_service: Optional[pulumi.Input['CustomDatasetLinkedServiceArgs']] = None, + type: Optional[pulumi.Input[str]] = None, + type_properties_json: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_json: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + if linked_service is None: + raise TypeError("Missing 'linked_service' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_properties_json is None and 'typePropertiesJson' in kwargs: + type_properties_json = kwargs['typePropertiesJson'] + if type_properties_json is None: + raise TypeError("Missing 'type_properties_json' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if schema_json is None and 'schemaJson' in kwargs: + schema_json = kwargs['schemaJson'] + + _setter("data_factory_id", data_factory_id) + _setter("linked_service", linked_service) + _setter("type", type) + _setter("type_properties_json", type_properties_json) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_json is not None: - pulumi.set(__self__, "schema_json", schema_json) + _setter("schema_json", schema_json) @property @pulumi.getter(name="dataFactoryId") @@ -221,28 +270,69 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of dataset that will be associated with Data Factory. Changing this forces a new resource to be created. :param pulumi.Input[str] type_properties_json: A JSON object that contains the properties of the Data Factory Dataset. """ + _CustomDatasetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + folder=folder, + linked_service=linked_service, + name=name, + parameters=parameters, + schema_json=schema_json, + type=type, + type_properties_json=type_properties_json, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + linked_service: Optional[pulumi.Input['CustomDatasetLinkedServiceArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_json: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + type_properties_json: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + if schema_json is None and 'schemaJson' in kwargs: + schema_json = kwargs['schemaJson'] + if type_properties_json is None and 'typePropertiesJson' in kwargs: + type_properties_json = kwargs['typePropertiesJson'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if linked_service is not None: - pulumi.set(__self__, "linked_service", linked_service) + _setter("linked_service", linked_service) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_json is not None: - pulumi.set(__self__, "schema_json", schema_json) + _setter("schema_json", schema_json) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if type_properties_json is not None: - pulumi.set(__self__, "type_properties_json", type_properties_json) + _setter("type_properties_json", type_properties_json) @property @pulumi.getter(name="additionalProperties") @@ -616,6 +706,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CustomDatasetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -648,6 +742,11 @@ def _internal_init(__self__, __props__.__dict__["data_factory_id"] = data_factory_id __props__.__dict__["description"] = description __props__.__dict__["folder"] = folder + if linked_service is not None and not isinstance(linked_service, CustomDatasetLinkedServiceArgs): + linked_service = linked_service or {} + def _setter(key, value): + linked_service[key] = value + CustomDatasetLinkedServiceArgs._configure(_setter, **linked_service) if linked_service is None and not opts.urn: raise TypeError("Missing required property 'linked_service'") __props__.__dict__["linked_service"] = linked_service diff --git a/sdk/python/pulumi_azure/datafactory/data_flow.py b/sdk/python/pulumi_azure/datafactory/data_flow.py index 2476b73156..a566334459 100644 --- a/sdk/python/pulumi_azure/datafactory/data_flow.py +++ b/sdk/python/pulumi_azure/datafactory/data_flow.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,23 +39,62 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] script_lines: The script lines for the Data Factory Data Flow. :param pulumi.Input[Sequence[pulumi.Input['DataFlowTransformationArgs']]] transformations: One or more `transformation` blocks as defined below. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "sinks", sinks) - pulumi.set(__self__, "sources", sources) + DataFlowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + sinks=sinks, + sources=sources, + annotations=annotations, + description=description, + folder=folder, + name=name, + script=script, + script_lines=script_lines, + transformations=transformations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + sinks: Optional[pulumi.Input[Sequence[pulumi.Input['DataFlowSinkArgs']]]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input['DataFlowSourceArgs']]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + script: Optional[pulumi.Input[str]] = None, + script_lines: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + transformations: Optional[pulumi.Input[Sequence[pulumi.Input['DataFlowTransformationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if sinks is None: + raise TypeError("Missing 'sinks' argument") + if sources is None: + raise TypeError("Missing 'sources' argument") + if script_lines is None and 'scriptLines' in kwargs: + script_lines = kwargs['scriptLines'] + + _setter("data_factory_id", data_factory_id) + _setter("sinks", sinks) + _setter("sources", sources) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if script is not None: - pulumi.set(__self__, "script", script) + _setter("script", script) if script_lines is not None: - pulumi.set(__self__, "script_lines", script_lines) + _setter("script_lines", script_lines) if transformations is not None: - pulumi.set(__self__, "transformations", transformations) + _setter("transformations", transformations) @property @pulumi.getter(name="dataFactoryId") @@ -204,26 +243,59 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DataFlowSourceArgs']]] sources: One or more `source` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['DataFlowTransformationArgs']]] transformations: One or more `transformation` blocks as defined below. """ + _DataFlowState._configure( + lambda key, value: pulumi.set(__self__, key, value), + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + folder=folder, + name=name, + script=script, + script_lines=script_lines, + sinks=sinks, + sources=sources, + transformations=transformations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + script: Optional[pulumi.Input[str]] = None, + script_lines: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sinks: Optional[pulumi.Input[Sequence[pulumi.Input['DataFlowSinkArgs']]]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input['DataFlowSourceArgs']]]] = None, + transformations: Optional[pulumi.Input[Sequence[pulumi.Input['DataFlowTransformationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if script_lines is None and 'scriptLines' in kwargs: + script_lines = kwargs['scriptLines'] + if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if script is not None: - pulumi.set(__self__, "script", script) + _setter("script", script) if script_lines is not None: - pulumi.set(__self__, "script_lines", script_lines) + _setter("script_lines", script_lines) if sinks is not None: - pulumi.set(__self__, "sinks", sinks) + _setter("sinks", sinks) if sources is not None: - pulumi.set(__self__, "sources", sources) + _setter("sources", sources) if transformations is not None: - pulumi.set(__self__, "transformations", transformations) + _setter("transformations", transformations) @property @pulumi.getter @@ -677,6 +749,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataFlowArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/dataset_azure_blob.py b/sdk/python/pulumi_azure/datafactory/dataset_azure_blob.py index fde85a082f..1b8b874b63 100644 --- a/sdk/python/pulumi_azure/datafactory/dataset_azure_blob.py +++ b/sdk/python/pulumi_azure/datafactory/dataset_azure_blob.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,30 +47,81 @@ def __init__(__self__, *, :param pulumi.Input[str] path: The path of the Azure Blob. :param pulumi.Input[Sequence[pulumi.Input['DatasetAzureBlobSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "linked_service_name", linked_service_name) + DatasetAzureBlobArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + linked_service_name=linked_service_name, + additional_properties=additional_properties, + annotations=annotations, + description=description, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + filename=filename, + folder=folder, + name=name, + parameters=parameters, + path=path, + schema_columns=schema_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + dynamic_filename_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_path_enabled: Optional[pulumi.Input[bool]] = None, + filename: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + path: Optional[pulumi.Input[str]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetAzureBlobSchemaColumnArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + + _setter("data_factory_id", data_factory_id) + _setter("linked_service_name", linked_service_name) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if filename is not None: - pulumi.set(__self__, "filename", filename) + _setter("filename", filename) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) @property @pulumi.getter(name="dataFactoryId") @@ -265,32 +316,79 @@ def __init__(__self__, *, :param pulumi.Input[str] path: The path of the Azure Blob. :param pulumi.Input[Sequence[pulumi.Input['DatasetAzureBlobSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. """ + _DatasetAzureBlobState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + filename=filename, + folder=folder, + linked_service_name=linked_service_name, + name=name, + parameters=parameters, + path=path, + schema_columns=schema_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + dynamic_filename_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_path_enabled: Optional[pulumi.Input[bool]] = None, + filename: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + path: Optional[pulumi.Input[str]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetAzureBlobSchemaColumnArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if filename is not None: - pulumi.set(__self__, "filename", filename) + _setter("filename", filename) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if linked_service_name is not None: - pulumi.set(__self__, "linked_service_name", linked_service_name) + _setter("linked_service_name", linked_service_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) @property @pulumi.getter(name="additionalProperties") @@ -570,6 +668,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetAzureBlobArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/dataset_azure_sql_table.py b/sdk/python/pulumi_azure/datafactory/dataset_azure_sql_table.py index 69a0ef3073..cf877e6f99 100644 --- a/sdk/python/pulumi_azure/datafactory/dataset_azure_sql_table.py +++ b/sdk/python/pulumi_azure/datafactory/dataset_azure_sql_table.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,26 +41,69 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DatasetAzureSqlTableSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. :param pulumi.Input[str] table: The table name of the table in the Azure SQL Database. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "linked_service_id", linked_service_id) + DatasetAzureSqlTableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + linked_service_id=linked_service_id, + additional_properties=additional_properties, + annotations=annotations, + description=description, + folder=folder, + name=name, + parameters=parameters, + schema=schema, + schema_columns=schema_columns, + table=table, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + linked_service_id: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema: Optional[pulumi.Input[str]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetAzureSqlTableSchemaColumnArgs']]]] = None, + table: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if linked_service_id is None and 'linkedServiceId' in kwargs: + linked_service_id = kwargs['linkedServiceId'] + if linked_service_id is None: + raise TypeError("Missing 'linked_service_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + + _setter("data_factory_id", data_factory_id) + _setter("linked_service_id", linked_service_id) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema is not None: - pulumi.set(__self__, "schema", schema) + _setter("schema", schema) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) if table is not None: - pulumi.set(__self__, "table", table) + _setter("table", table) @property @pulumi.getter(name="dataFactoryId") @@ -223,28 +266,67 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DatasetAzureSqlTableSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. :param pulumi.Input[str] table: The table name of the table in the Azure SQL Database. """ + _DatasetAzureSqlTableState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + folder=folder, + linked_service_id=linked_service_id, + name=name, + parameters=parameters, + schema=schema, + schema_columns=schema_columns, + table=table, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + linked_service_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema: Optional[pulumi.Input[str]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetAzureSqlTableSchemaColumnArgs']]]] = None, + table: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if linked_service_id is None and 'linkedServiceId' in kwargs: + linked_service_id = kwargs['linkedServiceId'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if linked_service_id is not None: - pulumi.set(__self__, "linked_service_id", linked_service_id) + _setter("linked_service_id", linked_service_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema is not None: - pulumi.set(__self__, "schema", schema) + _setter("schema", schema) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) if table is not None: - pulumi.set(__self__, "table", table) + _setter("table", table) @property @pulumi.getter(name="additionalProperties") @@ -484,6 +566,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetAzureSqlTableArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/dataset_binary.py b/sdk/python/pulumi_azure/datafactory/dataset_binary.py index 13b16f3d82..2a0de8c788 100644 --- a/sdk/python/pulumi_azure/datafactory/dataset_binary.py +++ b/sdk/python/pulumi_azure/datafactory/dataset_binary.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,28 +45,77 @@ def __init__(__self__, *, The following supported locations for a Binary Dataset. One of these should be specified: :param pulumi.Input['DatasetBinarySftpServerLocationArgs'] sftp_server_location: A `sftp_server_location` block as defined below. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "linked_service_name", linked_service_name) + DatasetBinaryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + linked_service_name=linked_service_name, + additional_properties=additional_properties, + annotations=annotations, + azure_blob_storage_location=azure_blob_storage_location, + compression=compression, + description=description, + folder=folder, + http_server_location=http_server_location, + name=name, + parameters=parameters, + sftp_server_location=sftp_server_location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + azure_blob_storage_location: Optional[pulumi.Input['DatasetBinaryAzureBlobStorageLocationArgs']] = None, + compression: Optional[pulumi.Input['DatasetBinaryCompressionArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + http_server_location: Optional[pulumi.Input['DatasetBinaryHttpServerLocationArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + sftp_server_location: Optional[pulumi.Input['DatasetBinarySftpServerLocationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if azure_blob_storage_location is None and 'azureBlobStorageLocation' in kwargs: + azure_blob_storage_location = kwargs['azureBlobStorageLocation'] + if http_server_location is None and 'httpServerLocation' in kwargs: + http_server_location = kwargs['httpServerLocation'] + if sftp_server_location is None and 'sftpServerLocation' in kwargs: + sftp_server_location = kwargs['sftpServerLocation'] + + _setter("data_factory_id", data_factory_id) + _setter("linked_service_name", linked_service_name) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if azure_blob_storage_location is not None: - pulumi.set(__self__, "azure_blob_storage_location", azure_blob_storage_location) + _setter("azure_blob_storage_location", azure_blob_storage_location) if compression is not None: - pulumi.set(__self__, "compression", compression) + _setter("compression", compression) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if http_server_location is not None: - pulumi.set(__self__, "http_server_location", http_server_location) + _setter("http_server_location", http_server_location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if sftp_server_location is not None: - pulumi.set(__self__, "sftp_server_location", sftp_server_location) + _setter("sftp_server_location", sftp_server_location) @property @pulumi.getter(name="dataFactoryId") @@ -247,30 +296,75 @@ def __init__(__self__, *, The following supported locations for a Binary Dataset. One of these should be specified: :param pulumi.Input['DatasetBinarySftpServerLocationArgs'] sftp_server_location: A `sftp_server_location` block as defined below. """ + _DatasetBinaryState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + azure_blob_storage_location=azure_blob_storage_location, + compression=compression, + data_factory_id=data_factory_id, + description=description, + folder=folder, + http_server_location=http_server_location, + linked_service_name=linked_service_name, + name=name, + parameters=parameters, + sftp_server_location=sftp_server_location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + azure_blob_storage_location: Optional[pulumi.Input['DatasetBinaryAzureBlobStorageLocationArgs']] = None, + compression: Optional[pulumi.Input['DatasetBinaryCompressionArgs']] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + http_server_location: Optional[pulumi.Input['DatasetBinaryHttpServerLocationArgs']] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + sftp_server_location: Optional[pulumi.Input['DatasetBinarySftpServerLocationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if azure_blob_storage_location is None and 'azureBlobStorageLocation' in kwargs: + azure_blob_storage_location = kwargs['azureBlobStorageLocation'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if http_server_location is None and 'httpServerLocation' in kwargs: + http_server_location = kwargs['httpServerLocation'] + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if sftp_server_location is None and 'sftpServerLocation' in kwargs: + sftp_server_location = kwargs['sftpServerLocation'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if azure_blob_storage_location is not None: - pulumi.set(__self__, "azure_blob_storage_location", azure_blob_storage_location) + _setter("azure_blob_storage_location", azure_blob_storage_location) if compression is not None: - pulumi.set(__self__, "compression", compression) + _setter("compression", compression) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if http_server_location is not None: - pulumi.set(__self__, "http_server_location", http_server_location) + _setter("http_server_location", http_server_location) if linked_service_name is not None: - pulumi.set(__self__, "linked_service_name", linked_service_name) + _setter("linked_service_name", linked_service_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if sftp_server_location is not None: - pulumi.set(__self__, "sftp_server_location", sftp_server_location) + _setter("sftp_server_location", sftp_server_location) @property @pulumi.getter(name="additionalProperties") @@ -544,6 +638,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetBinaryArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -572,19 +670,39 @@ def _internal_init(__self__, __props__.__dict__["additional_properties"] = additional_properties __props__.__dict__["annotations"] = annotations + if azure_blob_storage_location is not None and not isinstance(azure_blob_storage_location, DatasetBinaryAzureBlobStorageLocationArgs): + azure_blob_storage_location = azure_blob_storage_location or {} + def _setter(key, value): + azure_blob_storage_location[key] = value + DatasetBinaryAzureBlobStorageLocationArgs._configure(_setter, **azure_blob_storage_location) __props__.__dict__["azure_blob_storage_location"] = azure_blob_storage_location + if compression is not None and not isinstance(compression, DatasetBinaryCompressionArgs): + compression = compression or {} + def _setter(key, value): + compression[key] = value + DatasetBinaryCompressionArgs._configure(_setter, **compression) __props__.__dict__["compression"] = compression if data_factory_id is None and not opts.urn: raise TypeError("Missing required property 'data_factory_id'") __props__.__dict__["data_factory_id"] = data_factory_id __props__.__dict__["description"] = description __props__.__dict__["folder"] = folder + if http_server_location is not None and not isinstance(http_server_location, DatasetBinaryHttpServerLocationArgs): + http_server_location = http_server_location or {} + def _setter(key, value): + http_server_location[key] = value + DatasetBinaryHttpServerLocationArgs._configure(_setter, **http_server_location) __props__.__dict__["http_server_location"] = http_server_location if linked_service_name is None and not opts.urn: raise TypeError("Missing required property 'linked_service_name'") __props__.__dict__["linked_service_name"] = linked_service_name __props__.__dict__["name"] = name __props__.__dict__["parameters"] = parameters + if sftp_server_location is not None and not isinstance(sftp_server_location, DatasetBinarySftpServerLocationArgs): + sftp_server_location = sftp_server_location or {} + def _setter(key, value): + sftp_server_location[key] = value + DatasetBinarySftpServerLocationArgs._configure(_setter, **sftp_server_location) __props__.__dict__["sftp_server_location"] = sftp_server_location super(DatasetBinary, __self__).__init__( 'azure:datafactory/datasetBinary:DatasetBinary', diff --git a/sdk/python/pulumi_azure/datafactory/dataset_cosmos_db_api.py b/sdk/python/pulumi_azure/datafactory/dataset_cosmos_db_api.py index 9185a05848..8b238e52d7 100644 --- a/sdk/python/pulumi_azure/datafactory/dataset_cosmos_db_api.py +++ b/sdk/python/pulumi_azure/datafactory/dataset_cosmos_db_api.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,24 +41,67 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Dataset. :param pulumi.Input[Sequence[pulumi.Input['DatasetCosmosDBApiSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "linked_service_name", linked_service_name) + DatasetCosmosDBApiArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + linked_service_name=linked_service_name, + additional_properties=additional_properties, + annotations=annotations, + collection_name=collection_name, + description=description, + folder=folder, + name=name, + parameters=parameters, + schema_columns=schema_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + collection_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetCosmosDBApiSchemaColumnArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if collection_name is None and 'collectionName' in kwargs: + collection_name = kwargs['collectionName'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + + _setter("data_factory_id", data_factory_id) + _setter("linked_service_name", linked_service_name) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if collection_name is not None: - pulumi.set(__self__, "collection_name", collection_name) + _setter("collection_name", collection_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) @property @pulumi.getter(name="dataFactoryId") @@ -211,26 +254,65 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Dataset. :param pulumi.Input[Sequence[pulumi.Input['DatasetCosmosDBApiSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. """ + _DatasetCosmosDBApiState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + collection_name=collection_name, + data_factory_id=data_factory_id, + description=description, + folder=folder, + linked_service_name=linked_service_name, + name=name, + parameters=parameters, + schema_columns=schema_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + collection_name: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetCosmosDBApiSchemaColumnArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if collection_name is None and 'collectionName' in kwargs: + collection_name = kwargs['collectionName'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if collection_name is not None: - pulumi.set(__self__, "collection_name", collection_name) + _setter("collection_name", collection_name) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if linked_service_name is not None: - pulumi.set(__self__, "linked_service_name", linked_service_name) + _setter("linked_service_name", linked_service_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) @property @pulumi.getter(name="additionalProperties") @@ -468,6 +550,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetCosmosDBApiArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/dataset_delimited_text.py b/sdk/python/pulumi_azure/datafactory/dataset_delimited_text.py index 7173af47e2..12cd3ce705 100644 --- a/sdk/python/pulumi_azure/datafactory/dataset_delimited_text.py +++ b/sdk/python/pulumi_azure/datafactory/dataset_delimited_text.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -65,46 +65,131 @@ def __init__(__self__, *, :param pulumi.Input[str] row_delimiter: The row delimiter. Defaults to any of the following values on read: `\\r\\n`, `\\r`, `\\n`, and `\\n` or `\\r\\n` on write by mapping data flow and Copy activity respectively. :param pulumi.Input[Sequence[pulumi.Input['DatasetDelimitedTextSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "linked_service_name", linked_service_name) + DatasetDelimitedTextArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + linked_service_name=linked_service_name, + additional_properties=additional_properties, + annotations=annotations, + azure_blob_fs_location=azure_blob_fs_location, + azure_blob_storage_location=azure_blob_storage_location, + column_delimiter=column_delimiter, + compression_codec=compression_codec, + compression_level=compression_level, + description=description, + encoding=encoding, + escape_character=escape_character, + first_row_as_header=first_row_as_header, + folder=folder, + http_server_location=http_server_location, + name=name, + null_value=null_value, + parameters=parameters, + quote_character=quote_character, + row_delimiter=row_delimiter, + schema_columns=schema_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + azure_blob_fs_location: Optional[pulumi.Input['DatasetDelimitedTextAzureBlobFsLocationArgs']] = None, + azure_blob_storage_location: Optional[pulumi.Input['DatasetDelimitedTextAzureBlobStorageLocationArgs']] = None, + column_delimiter: Optional[pulumi.Input[str]] = None, + compression_codec: Optional[pulumi.Input[str]] = None, + compression_level: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + escape_character: Optional[pulumi.Input[str]] = None, + first_row_as_header: Optional[pulumi.Input[bool]] = None, + folder: Optional[pulumi.Input[str]] = None, + http_server_location: Optional[pulumi.Input['DatasetDelimitedTextHttpServerLocationArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + null_value: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + quote_character: Optional[pulumi.Input[str]] = None, + row_delimiter: Optional[pulumi.Input[str]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetDelimitedTextSchemaColumnArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if azure_blob_fs_location is None and 'azureBlobFsLocation' in kwargs: + azure_blob_fs_location = kwargs['azureBlobFsLocation'] + if azure_blob_storage_location is None and 'azureBlobStorageLocation' in kwargs: + azure_blob_storage_location = kwargs['azureBlobStorageLocation'] + if column_delimiter is None and 'columnDelimiter' in kwargs: + column_delimiter = kwargs['columnDelimiter'] + if compression_codec is None and 'compressionCodec' in kwargs: + compression_codec = kwargs['compressionCodec'] + if compression_level is None and 'compressionLevel' in kwargs: + compression_level = kwargs['compressionLevel'] + if escape_character is None and 'escapeCharacter' in kwargs: + escape_character = kwargs['escapeCharacter'] + if first_row_as_header is None and 'firstRowAsHeader' in kwargs: + first_row_as_header = kwargs['firstRowAsHeader'] + if http_server_location is None and 'httpServerLocation' in kwargs: + http_server_location = kwargs['httpServerLocation'] + if null_value is None and 'nullValue' in kwargs: + null_value = kwargs['nullValue'] + if quote_character is None and 'quoteCharacter' in kwargs: + quote_character = kwargs['quoteCharacter'] + if row_delimiter is None and 'rowDelimiter' in kwargs: + row_delimiter = kwargs['rowDelimiter'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + + _setter("data_factory_id", data_factory_id) + _setter("linked_service_name", linked_service_name) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if azure_blob_fs_location is not None: - pulumi.set(__self__, "azure_blob_fs_location", azure_blob_fs_location) + _setter("azure_blob_fs_location", azure_blob_fs_location) if azure_blob_storage_location is not None: - pulumi.set(__self__, "azure_blob_storage_location", azure_blob_storage_location) + _setter("azure_blob_storage_location", azure_blob_storage_location) if column_delimiter is not None: - pulumi.set(__self__, "column_delimiter", column_delimiter) + _setter("column_delimiter", column_delimiter) if compression_codec is not None: - pulumi.set(__self__, "compression_codec", compression_codec) + _setter("compression_codec", compression_codec) if compression_level is not None: - pulumi.set(__self__, "compression_level", compression_level) + _setter("compression_level", compression_level) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if escape_character is not None: - pulumi.set(__self__, "escape_character", escape_character) + _setter("escape_character", escape_character) if first_row_as_header is not None: - pulumi.set(__self__, "first_row_as_header", first_row_as_header) + _setter("first_row_as_header", first_row_as_header) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if http_server_location is not None: - pulumi.set(__self__, "http_server_location", http_server_location) + _setter("http_server_location", http_server_location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if null_value is not None: - pulumi.set(__self__, "null_value", null_value) + _setter("null_value", null_value) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if quote_character is not None: - pulumi.set(__self__, "quote_character", quote_character) + _setter("quote_character", quote_character) if row_delimiter is not None: - pulumi.set(__self__, "row_delimiter", row_delimiter) + _setter("row_delimiter", row_delimiter) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) @property @pulumi.getter(name="dataFactoryId") @@ -415,48 +500,129 @@ def __init__(__self__, *, :param pulumi.Input[str] row_delimiter: The row delimiter. Defaults to any of the following values on read: `\\r\\n`, `\\r`, `\\n`, and `\\n` or `\\r\\n` on write by mapping data flow and Copy activity respectively. :param pulumi.Input[Sequence[pulumi.Input['DatasetDelimitedTextSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. """ + _DatasetDelimitedTextState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + azure_blob_fs_location=azure_blob_fs_location, + azure_blob_storage_location=azure_blob_storage_location, + column_delimiter=column_delimiter, + compression_codec=compression_codec, + compression_level=compression_level, + data_factory_id=data_factory_id, + description=description, + encoding=encoding, + escape_character=escape_character, + first_row_as_header=first_row_as_header, + folder=folder, + http_server_location=http_server_location, + linked_service_name=linked_service_name, + name=name, + null_value=null_value, + parameters=parameters, + quote_character=quote_character, + row_delimiter=row_delimiter, + schema_columns=schema_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + azure_blob_fs_location: Optional[pulumi.Input['DatasetDelimitedTextAzureBlobFsLocationArgs']] = None, + azure_blob_storage_location: Optional[pulumi.Input['DatasetDelimitedTextAzureBlobStorageLocationArgs']] = None, + column_delimiter: Optional[pulumi.Input[str]] = None, + compression_codec: Optional[pulumi.Input[str]] = None, + compression_level: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + escape_character: Optional[pulumi.Input[str]] = None, + first_row_as_header: Optional[pulumi.Input[bool]] = None, + folder: Optional[pulumi.Input[str]] = None, + http_server_location: Optional[pulumi.Input['DatasetDelimitedTextHttpServerLocationArgs']] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + null_value: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + quote_character: Optional[pulumi.Input[str]] = None, + row_delimiter: Optional[pulumi.Input[str]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetDelimitedTextSchemaColumnArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if azure_blob_fs_location is None and 'azureBlobFsLocation' in kwargs: + azure_blob_fs_location = kwargs['azureBlobFsLocation'] + if azure_blob_storage_location is None and 'azureBlobStorageLocation' in kwargs: + azure_blob_storage_location = kwargs['azureBlobStorageLocation'] + if column_delimiter is None and 'columnDelimiter' in kwargs: + column_delimiter = kwargs['columnDelimiter'] + if compression_codec is None and 'compressionCodec' in kwargs: + compression_codec = kwargs['compressionCodec'] + if compression_level is None and 'compressionLevel' in kwargs: + compression_level = kwargs['compressionLevel'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if escape_character is None and 'escapeCharacter' in kwargs: + escape_character = kwargs['escapeCharacter'] + if first_row_as_header is None and 'firstRowAsHeader' in kwargs: + first_row_as_header = kwargs['firstRowAsHeader'] + if http_server_location is None and 'httpServerLocation' in kwargs: + http_server_location = kwargs['httpServerLocation'] + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if null_value is None and 'nullValue' in kwargs: + null_value = kwargs['nullValue'] + if quote_character is None and 'quoteCharacter' in kwargs: + quote_character = kwargs['quoteCharacter'] + if row_delimiter is None and 'rowDelimiter' in kwargs: + row_delimiter = kwargs['rowDelimiter'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if azure_blob_fs_location is not None: - pulumi.set(__self__, "azure_blob_fs_location", azure_blob_fs_location) + _setter("azure_blob_fs_location", azure_blob_fs_location) if azure_blob_storage_location is not None: - pulumi.set(__self__, "azure_blob_storage_location", azure_blob_storage_location) + _setter("azure_blob_storage_location", azure_blob_storage_location) if column_delimiter is not None: - pulumi.set(__self__, "column_delimiter", column_delimiter) + _setter("column_delimiter", column_delimiter) if compression_codec is not None: - pulumi.set(__self__, "compression_codec", compression_codec) + _setter("compression_codec", compression_codec) if compression_level is not None: - pulumi.set(__self__, "compression_level", compression_level) + _setter("compression_level", compression_level) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if escape_character is not None: - pulumi.set(__self__, "escape_character", escape_character) + _setter("escape_character", escape_character) if first_row_as_header is not None: - pulumi.set(__self__, "first_row_as_header", first_row_as_header) + _setter("first_row_as_header", first_row_as_header) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if http_server_location is not None: - pulumi.set(__self__, "http_server_location", http_server_location) + _setter("http_server_location", http_server_location) if linked_service_name is not None: - pulumi.set(__self__, "linked_service_name", linked_service_name) + _setter("linked_service_name", linked_service_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if null_value is not None: - pulumi.set(__self__, "null_value", null_value) + _setter("null_value", null_value) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if quote_character is not None: - pulumi.set(__self__, "quote_character", quote_character) + _setter("quote_character", quote_character) if row_delimiter is not None: - pulumi.set(__self__, "row_delimiter", row_delimiter) + _setter("row_delimiter", row_delimiter) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) @property @pulumi.getter(name="additionalProperties") @@ -870,6 +1036,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetDelimitedTextArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -907,7 +1077,17 @@ def _internal_init(__self__, __props__.__dict__["additional_properties"] = additional_properties __props__.__dict__["annotations"] = annotations + if azure_blob_fs_location is not None and not isinstance(azure_blob_fs_location, DatasetDelimitedTextAzureBlobFsLocationArgs): + azure_blob_fs_location = azure_blob_fs_location or {} + def _setter(key, value): + azure_blob_fs_location[key] = value + DatasetDelimitedTextAzureBlobFsLocationArgs._configure(_setter, **azure_blob_fs_location) __props__.__dict__["azure_blob_fs_location"] = azure_blob_fs_location + if azure_blob_storage_location is not None and not isinstance(azure_blob_storage_location, DatasetDelimitedTextAzureBlobStorageLocationArgs): + azure_blob_storage_location = azure_blob_storage_location or {} + def _setter(key, value): + azure_blob_storage_location[key] = value + DatasetDelimitedTextAzureBlobStorageLocationArgs._configure(_setter, **azure_blob_storage_location) __props__.__dict__["azure_blob_storage_location"] = azure_blob_storage_location __props__.__dict__["column_delimiter"] = column_delimiter __props__.__dict__["compression_codec"] = compression_codec @@ -920,6 +1100,11 @@ def _internal_init(__self__, __props__.__dict__["escape_character"] = escape_character __props__.__dict__["first_row_as_header"] = first_row_as_header __props__.__dict__["folder"] = folder + if http_server_location is not None and not isinstance(http_server_location, DatasetDelimitedTextHttpServerLocationArgs): + http_server_location = http_server_location or {} + def _setter(key, value): + http_server_location[key] = value + DatasetDelimitedTextHttpServerLocationArgs._configure(_setter, **http_server_location) __props__.__dict__["http_server_location"] = http_server_location if linked_service_name is None and not opts.urn: raise TypeError("Missing required property 'linked_service_name'") diff --git a/sdk/python/pulumi_azure/datafactory/dataset_http.py b/sdk/python/pulumi_azure/datafactory/dataset_http.py index 3d58c1083a..1e787a0f9c 100644 --- a/sdk/python/pulumi_azure/datafactory/dataset_http.py +++ b/sdk/python/pulumi_azure/datafactory/dataset_http.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,28 +45,79 @@ def __init__(__self__, *, :param pulumi.Input[str] request_method: The HTTP method for the HTTP request. (e.g. GET, POST) :param pulumi.Input[Sequence[pulumi.Input['DatasetHttpSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "linked_service_name", linked_service_name) + DatasetHttpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + linked_service_name=linked_service_name, + additional_properties=additional_properties, + annotations=annotations, + description=description, + folder=folder, + name=name, + parameters=parameters, + relative_url=relative_url, + request_body=request_body, + request_method=request_method, + schema_columns=schema_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + relative_url: Optional[pulumi.Input[str]] = None, + request_body: Optional[pulumi.Input[str]] = None, + request_method: Optional[pulumi.Input[str]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetHttpSchemaColumnArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if relative_url is None and 'relativeUrl' in kwargs: + relative_url = kwargs['relativeUrl'] + if request_body is None and 'requestBody' in kwargs: + request_body = kwargs['requestBody'] + if request_method is None and 'requestMethod' in kwargs: + request_method = kwargs['requestMethod'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + + _setter("data_factory_id", data_factory_id) + _setter("linked_service_name", linked_service_name) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if relative_url is not None: - pulumi.set(__self__, "relative_url", relative_url) + _setter("relative_url", relative_url) if request_body is not None: - pulumi.set(__self__, "request_body", request_body) + _setter("request_body", request_body) if request_method is not None: - pulumi.set(__self__, "request_method", request_method) + _setter("request_method", request_method) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) @property @pulumi.getter(name="dataFactoryId") @@ -247,30 +298,77 @@ def __init__(__self__, *, :param pulumi.Input[str] request_method: The HTTP method for the HTTP request. (e.g. GET, POST) :param pulumi.Input[Sequence[pulumi.Input['DatasetHttpSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. """ + _DatasetHttpState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + folder=folder, + linked_service_name=linked_service_name, + name=name, + parameters=parameters, + relative_url=relative_url, + request_body=request_body, + request_method=request_method, + schema_columns=schema_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + relative_url: Optional[pulumi.Input[str]] = None, + request_body: Optional[pulumi.Input[str]] = None, + request_method: Optional[pulumi.Input[str]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetHttpSchemaColumnArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if relative_url is None and 'relativeUrl' in kwargs: + relative_url = kwargs['relativeUrl'] + if request_body is None and 'requestBody' in kwargs: + request_body = kwargs['requestBody'] + if request_method is None and 'requestMethod' in kwargs: + request_method = kwargs['requestMethod'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if linked_service_name is not None: - pulumi.set(__self__, "linked_service_name", linked_service_name) + _setter("linked_service_name", linked_service_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if relative_url is not None: - pulumi.set(__self__, "relative_url", relative_url) + _setter("relative_url", relative_url) if request_body is not None: - pulumi.set(__self__, "request_body", request_body) + _setter("request_body", request_body) if request_method is not None: - pulumi.set(__self__, "request_method", request_method) + _setter("request_method", request_method) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) @property @pulumi.getter(name="additionalProperties") @@ -536,6 +634,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetHttpArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/dataset_json.py b/sdk/python/pulumi_azure/datafactory/dataset_json.py index 1f22e95435..600270d5de 100644 --- a/sdk/python/pulumi_azure/datafactory/dataset_json.py +++ b/sdk/python/pulumi_azure/datafactory/dataset_json.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,28 +47,77 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Dataset. :param pulumi.Input[Sequence[pulumi.Input['DatasetJsonSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "linked_service_name", linked_service_name) + DatasetJsonArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + linked_service_name=linked_service_name, + additional_properties=additional_properties, + annotations=annotations, + azure_blob_storage_location=azure_blob_storage_location, + description=description, + encoding=encoding, + folder=folder, + http_server_location=http_server_location, + name=name, + parameters=parameters, + schema_columns=schema_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + azure_blob_storage_location: Optional[pulumi.Input['DatasetJsonAzureBlobStorageLocationArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + http_server_location: Optional[pulumi.Input['DatasetJsonHttpServerLocationArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetJsonSchemaColumnArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if azure_blob_storage_location is None and 'azureBlobStorageLocation' in kwargs: + azure_blob_storage_location = kwargs['azureBlobStorageLocation'] + if http_server_location is None and 'httpServerLocation' in kwargs: + http_server_location = kwargs['httpServerLocation'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + + _setter("data_factory_id", data_factory_id) + _setter("linked_service_name", linked_service_name) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if azure_blob_storage_location is not None: - pulumi.set(__self__, "azure_blob_storage_location", azure_blob_storage_location) + _setter("azure_blob_storage_location", azure_blob_storage_location) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if http_server_location is not None: - pulumi.set(__self__, "http_server_location", http_server_location) + _setter("http_server_location", http_server_location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) @property @pulumi.getter(name="dataFactoryId") @@ -253,30 +302,75 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Dataset. :param pulumi.Input[Sequence[pulumi.Input['DatasetJsonSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. """ + _DatasetJsonState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + azure_blob_storage_location=azure_blob_storage_location, + data_factory_id=data_factory_id, + description=description, + encoding=encoding, + folder=folder, + http_server_location=http_server_location, + linked_service_name=linked_service_name, + name=name, + parameters=parameters, + schema_columns=schema_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + azure_blob_storage_location: Optional[pulumi.Input['DatasetJsonAzureBlobStorageLocationArgs']] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + http_server_location: Optional[pulumi.Input['DatasetJsonHttpServerLocationArgs']] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetJsonSchemaColumnArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if azure_blob_storage_location is None and 'azureBlobStorageLocation' in kwargs: + azure_blob_storage_location = kwargs['azureBlobStorageLocation'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if http_server_location is None and 'httpServerLocation' in kwargs: + http_server_location = kwargs['httpServerLocation'] + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if azure_blob_storage_location is not None: - pulumi.set(__self__, "azure_blob_storage_location", azure_blob_storage_location) + _setter("azure_blob_storage_location", azure_blob_storage_location) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if http_server_location is not None: - pulumi.set(__self__, "http_server_location", http_server_location) + _setter("http_server_location", http_server_location) if linked_service_name is not None: - pulumi.set(__self__, "linked_service_name", linked_service_name) + _setter("linked_service_name", linked_service_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) @property @pulumi.getter(name="additionalProperties") @@ -552,6 +646,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetJsonArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -580,6 +678,11 @@ def _internal_init(__self__, __props__.__dict__["additional_properties"] = additional_properties __props__.__dict__["annotations"] = annotations + if azure_blob_storage_location is not None and not isinstance(azure_blob_storage_location, DatasetJsonAzureBlobStorageLocationArgs): + azure_blob_storage_location = azure_blob_storage_location or {} + def _setter(key, value): + azure_blob_storage_location[key] = value + DatasetJsonAzureBlobStorageLocationArgs._configure(_setter, **azure_blob_storage_location) __props__.__dict__["azure_blob_storage_location"] = azure_blob_storage_location if data_factory_id is None and not opts.urn: raise TypeError("Missing required property 'data_factory_id'") @@ -587,6 +690,11 @@ def _internal_init(__self__, __props__.__dict__["description"] = description __props__.__dict__["encoding"] = encoding __props__.__dict__["folder"] = folder + if http_server_location is not None and not isinstance(http_server_location, DatasetJsonHttpServerLocationArgs): + http_server_location = http_server_location or {} + def _setter(key, value): + http_server_location[key] = value + DatasetJsonHttpServerLocationArgs._configure(_setter, **http_server_location) __props__.__dict__["http_server_location"] = http_server_location if linked_service_name is None and not opts.urn: raise TypeError("Missing required property 'linked_service_name'") diff --git a/sdk/python/pulumi_azure/datafactory/dataset_mysql.py b/sdk/python/pulumi_azure/datafactory/dataset_mysql.py index defaf3f051..381050ed60 100644 --- a/sdk/python/pulumi_azure/datafactory/dataset_mysql.py +++ b/sdk/python/pulumi_azure/datafactory/dataset_mysql.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,24 +41,67 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DatasetMysqlSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. :param pulumi.Input[str] table_name: The table name of the Data Factory Dataset MySQL. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "linked_service_name", linked_service_name) + DatasetMysqlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + linked_service_name=linked_service_name, + additional_properties=additional_properties, + annotations=annotations, + description=description, + folder=folder, + name=name, + parameters=parameters, + schema_columns=schema_columns, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetMysqlSchemaColumnArgs']]]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + + _setter("data_factory_id", data_factory_id) + _setter("linked_service_name", linked_service_name) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="dataFactoryId") @@ -211,26 +254,65 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DatasetMysqlSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. :param pulumi.Input[str] table_name: The table name of the Data Factory Dataset MySQL. """ + _DatasetMysqlState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + folder=folder, + linked_service_name=linked_service_name, + name=name, + parameters=parameters, + schema_columns=schema_columns, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetMysqlSchemaColumnArgs']]]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if linked_service_name is not None: - pulumi.set(__self__, "linked_service_name", linked_service_name) + _setter("linked_service_name", linked_service_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="additionalProperties") @@ -460,6 +542,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetMysqlArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/dataset_parquet.py b/sdk/python/pulumi_azure/datafactory/dataset_parquet.py index 26831b71e8..ceabe86806 100644 --- a/sdk/python/pulumi_azure/datafactory/dataset_parquet.py +++ b/sdk/python/pulumi_azure/datafactory/dataset_parquet.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -51,32 +51,91 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Dataset. :param pulumi.Input[Sequence[pulumi.Input['DatasetParquetSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "linked_service_name", linked_service_name) + DatasetParquetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + linked_service_name=linked_service_name, + additional_properties=additional_properties, + annotations=annotations, + azure_blob_fs_location=azure_blob_fs_location, + azure_blob_storage_location=azure_blob_storage_location, + compression_codec=compression_codec, + compression_level=compression_level, + description=description, + folder=folder, + http_server_location=http_server_location, + name=name, + parameters=parameters, + schema_columns=schema_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + azure_blob_fs_location: Optional[pulumi.Input['DatasetParquetAzureBlobFsLocationArgs']] = None, + azure_blob_storage_location: Optional[pulumi.Input['DatasetParquetAzureBlobStorageLocationArgs']] = None, + compression_codec: Optional[pulumi.Input[str]] = None, + compression_level: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + http_server_location: Optional[pulumi.Input['DatasetParquetHttpServerLocationArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetParquetSchemaColumnArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if azure_blob_fs_location is None and 'azureBlobFsLocation' in kwargs: + azure_blob_fs_location = kwargs['azureBlobFsLocation'] + if azure_blob_storage_location is None and 'azureBlobStorageLocation' in kwargs: + azure_blob_storage_location = kwargs['azureBlobStorageLocation'] + if compression_codec is None and 'compressionCodec' in kwargs: + compression_codec = kwargs['compressionCodec'] + if compression_level is None and 'compressionLevel' in kwargs: + compression_level = kwargs['compressionLevel'] + if http_server_location is None and 'httpServerLocation' in kwargs: + http_server_location = kwargs['httpServerLocation'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + + _setter("data_factory_id", data_factory_id) + _setter("linked_service_name", linked_service_name) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if azure_blob_fs_location is not None: - pulumi.set(__self__, "azure_blob_fs_location", azure_blob_fs_location) + _setter("azure_blob_fs_location", azure_blob_fs_location) if azure_blob_storage_location is not None: - pulumi.set(__self__, "azure_blob_storage_location", azure_blob_storage_location) + _setter("azure_blob_storage_location", azure_blob_storage_location) if compression_codec is not None: - pulumi.set(__self__, "compression_codec", compression_codec) + _setter("compression_codec", compression_codec) if compression_level is not None: - pulumi.set(__self__, "compression_level", compression_level) + _setter("compression_level", compression_level) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if http_server_location is not None: - pulumi.set(__self__, "http_server_location", http_server_location) + _setter("http_server_location", http_server_location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) @property @pulumi.getter(name="dataFactoryId") @@ -289,34 +348,89 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Dataset. :param pulumi.Input[Sequence[pulumi.Input['DatasetParquetSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. """ + _DatasetParquetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + azure_blob_fs_location=azure_blob_fs_location, + azure_blob_storage_location=azure_blob_storage_location, + compression_codec=compression_codec, + compression_level=compression_level, + data_factory_id=data_factory_id, + description=description, + folder=folder, + http_server_location=http_server_location, + linked_service_name=linked_service_name, + name=name, + parameters=parameters, + schema_columns=schema_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + azure_blob_fs_location: Optional[pulumi.Input['DatasetParquetAzureBlobFsLocationArgs']] = None, + azure_blob_storage_location: Optional[pulumi.Input['DatasetParquetAzureBlobStorageLocationArgs']] = None, + compression_codec: Optional[pulumi.Input[str]] = None, + compression_level: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + http_server_location: Optional[pulumi.Input['DatasetParquetHttpServerLocationArgs']] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetParquetSchemaColumnArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if azure_blob_fs_location is None and 'azureBlobFsLocation' in kwargs: + azure_blob_fs_location = kwargs['azureBlobFsLocation'] + if azure_blob_storage_location is None and 'azureBlobStorageLocation' in kwargs: + azure_blob_storage_location = kwargs['azureBlobStorageLocation'] + if compression_codec is None and 'compressionCodec' in kwargs: + compression_codec = kwargs['compressionCodec'] + if compression_level is None and 'compressionLevel' in kwargs: + compression_level = kwargs['compressionLevel'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if http_server_location is None and 'httpServerLocation' in kwargs: + http_server_location = kwargs['httpServerLocation'] + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if azure_blob_fs_location is not None: - pulumi.set(__self__, "azure_blob_fs_location", azure_blob_fs_location) + _setter("azure_blob_fs_location", azure_blob_fs_location) if azure_blob_storage_location is not None: - pulumi.set(__self__, "azure_blob_storage_location", azure_blob_storage_location) + _setter("azure_blob_storage_location", azure_blob_storage_location) if compression_codec is not None: - pulumi.set(__self__, "compression_codec", compression_codec) + _setter("compression_codec", compression_codec) if compression_level is not None: - pulumi.set(__self__, "compression_level", compression_level) + _setter("compression_level", compression_level) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if http_server_location is not None: - pulumi.set(__self__, "http_server_location", http_server_location) + _setter("http_server_location", http_server_location) if linked_service_name is not None: - pulumi.set(__self__, "linked_service_name", linked_service_name) + _setter("linked_service_name", linked_service_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) @property @pulumi.getter(name="additionalProperties") @@ -618,6 +732,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetParquetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -648,7 +766,17 @@ def _internal_init(__self__, __props__.__dict__["additional_properties"] = additional_properties __props__.__dict__["annotations"] = annotations + if azure_blob_fs_location is not None and not isinstance(azure_blob_fs_location, DatasetParquetAzureBlobFsLocationArgs): + azure_blob_fs_location = azure_blob_fs_location or {} + def _setter(key, value): + azure_blob_fs_location[key] = value + DatasetParquetAzureBlobFsLocationArgs._configure(_setter, **azure_blob_fs_location) __props__.__dict__["azure_blob_fs_location"] = azure_blob_fs_location + if azure_blob_storage_location is not None and not isinstance(azure_blob_storage_location, DatasetParquetAzureBlobStorageLocationArgs): + azure_blob_storage_location = azure_blob_storage_location or {} + def _setter(key, value): + azure_blob_storage_location[key] = value + DatasetParquetAzureBlobStorageLocationArgs._configure(_setter, **azure_blob_storage_location) __props__.__dict__["azure_blob_storage_location"] = azure_blob_storage_location __props__.__dict__["compression_codec"] = compression_codec __props__.__dict__["compression_level"] = compression_level @@ -657,6 +785,11 @@ def _internal_init(__self__, __props__.__dict__["data_factory_id"] = data_factory_id __props__.__dict__["description"] = description __props__.__dict__["folder"] = folder + if http_server_location is not None and not isinstance(http_server_location, DatasetParquetHttpServerLocationArgs): + http_server_location = http_server_location or {} + def _setter(key, value): + http_server_location[key] = value + DatasetParquetHttpServerLocationArgs._configure(_setter, **http_server_location) __props__.__dict__["http_server_location"] = http_server_location if linked_service_name is None and not opts.urn: raise TypeError("Missing required property 'linked_service_name'") diff --git a/sdk/python/pulumi_azure/datafactory/dataset_postgresql.py b/sdk/python/pulumi_azure/datafactory/dataset_postgresql.py index 1fe2162883..8727083a91 100644 --- a/sdk/python/pulumi_azure/datafactory/dataset_postgresql.py +++ b/sdk/python/pulumi_azure/datafactory/dataset_postgresql.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,24 +39,67 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DatasetPostgresqlSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. :param pulumi.Input[str] table_name: The table name of the Data Factory Dataset PostgreSQL. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "linked_service_name", linked_service_name) + DatasetPostgresqlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + linked_service_name=linked_service_name, + additional_properties=additional_properties, + annotations=annotations, + description=description, + folder=folder, + name=name, + parameters=parameters, + schema_columns=schema_columns, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetPostgresqlSchemaColumnArgs']]]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + + _setter("data_factory_id", data_factory_id) + _setter("linked_service_name", linked_service_name) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="dataFactoryId") @@ -205,26 +248,65 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DatasetPostgresqlSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. :param pulumi.Input[str] table_name: The table name of the Data Factory Dataset PostgreSQL. """ + _DatasetPostgresqlState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + folder=folder, + linked_service_name=linked_service_name, + name=name, + parameters=parameters, + schema_columns=schema_columns, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetPostgresqlSchemaColumnArgs']]]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if linked_service_name is not None: - pulumi.set(__self__, "linked_service_name", linked_service_name) + _setter("linked_service_name", linked_service_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="additionalProperties") @@ -450,6 +532,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetPostgresqlArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/dataset_snowflake.py b/sdk/python/pulumi_azure/datafactory/dataset_snowflake.py index bfaf7dd5ec..baf6b72905 100644 --- a/sdk/python/pulumi_azure/datafactory/dataset_snowflake.py +++ b/sdk/python/pulumi_azure/datafactory/dataset_snowflake.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,26 +41,73 @@ def __init__(__self__, *, :param pulumi.Input[str] schema_name: The schema name of the Data Factory Dataset Snowflake. :param pulumi.Input[str] table_name: The table name of the Data Factory Dataset Snowflake. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "linked_service_name", linked_service_name) + DatasetSnowflakeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + linked_service_name=linked_service_name, + additional_properties=additional_properties, + annotations=annotations, + description=description, + folder=folder, + name=name, + parameters=parameters, + schema_columns=schema_columns, + schema_name=schema_name, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetSnowflakeSchemaColumnArgs']]]] = None, + schema_name: Optional[pulumi.Input[str]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if schema_name is None and 'schemaName' in kwargs: + schema_name = kwargs['schemaName'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + + _setter("data_factory_id", data_factory_id) + _setter("linked_service_name", linked_service_name) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) if schema_name is not None: - pulumi.set(__self__, "schema_name", schema_name) + _setter("schema_name", schema_name) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="dataFactoryId") @@ -223,28 +270,71 @@ def __init__(__self__, *, :param pulumi.Input[str] schema_name: The schema name of the Data Factory Dataset Snowflake. :param pulumi.Input[str] table_name: The table name of the Data Factory Dataset Snowflake. """ + _DatasetSnowflakeState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + folder=folder, + linked_service_name=linked_service_name, + name=name, + parameters=parameters, + schema_columns=schema_columns, + schema_name=schema_name, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetSnowflakeSchemaColumnArgs']]]] = None, + schema_name: Optional[pulumi.Input[str]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if schema_name is None and 'schemaName' in kwargs: + schema_name = kwargs['schemaName'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if linked_service_name is not None: - pulumi.set(__self__, "linked_service_name", linked_service_name) + _setter("linked_service_name", linked_service_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) if schema_name is not None: - pulumi.set(__self__, "schema_name", schema_name) + _setter("schema_name", schema_name) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="additionalProperties") @@ -492,6 +582,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetSnowflakeArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/dataset_sql_server_table.py b/sdk/python/pulumi_azure/datafactory/dataset_sql_server_table.py index 1359ebffbe..6814220f79 100644 --- a/sdk/python/pulumi_azure/datafactory/dataset_sql_server_table.py +++ b/sdk/python/pulumi_azure/datafactory/dataset_sql_server_table.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,24 +39,67 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DatasetSqlServerTableSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. :param pulumi.Input[str] table_name: The table name of the Data Factory Dataset SQL Server Table. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "linked_service_name", linked_service_name) + DatasetSqlServerTableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + linked_service_name=linked_service_name, + additional_properties=additional_properties, + annotations=annotations, + description=description, + folder=folder, + name=name, + parameters=parameters, + schema_columns=schema_columns, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetSqlServerTableSchemaColumnArgs']]]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + + _setter("data_factory_id", data_factory_id) + _setter("linked_service_name", linked_service_name) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="dataFactoryId") @@ -205,26 +248,65 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DatasetSqlServerTableSchemaColumnArgs']]] schema_columns: A `schema_column` block as defined below. :param pulumi.Input[str] table_name: The table name of the Data Factory Dataset SQL Server Table. """ + _DatasetSqlServerTableState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + folder=folder, + linked_service_name=linked_service_name, + name=name, + parameters=parameters, + schema_columns=schema_columns, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + linked_service_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + schema_columns: Optional[pulumi.Input[Sequence[pulumi.Input['DatasetSqlServerTableSchemaColumnArgs']]]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if schema_columns is None and 'schemaColumns' in kwargs: + schema_columns = kwargs['schemaColumns'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if linked_service_name is not None: - pulumi.set(__self__, "linked_service_name", linked_service_name) + _setter("linked_service_name", linked_service_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if schema_columns is not None: - pulumi.set(__self__, "schema_columns", schema_columns) + _setter("schema_columns", schema_columns) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="additionalProperties") @@ -450,6 +532,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetSqlServerTableArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/factory.py b/sdk/python/pulumi_azure/datafactory/factory.py index 6d5d31f54c..f713414a67 100644 --- a/sdk/python/pulumi_azure/datafactory/factory.py +++ b/sdk/python/pulumi_azure/datafactory/factory.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,31 +45,86 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input['FactoryVstsConfigurationArgs'] vsts_configuration: A `vsts_configuration` block as defined below. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + FactoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + customer_managed_key_id=customer_managed_key_id, + customer_managed_key_identity_id=customer_managed_key_identity_id, + github_configuration=github_configuration, + global_parameters=global_parameters, + identity=identity, + location=location, + managed_virtual_network_enabled=managed_virtual_network_enabled, + name=name, + public_network_enabled=public_network_enabled, + purview_id=purview_id, + tags=tags, + vsts_configuration=vsts_configuration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + customer_managed_key_id: Optional[pulumi.Input[str]] = None, + customer_managed_key_identity_id: Optional[pulumi.Input[str]] = None, + github_configuration: Optional[pulumi.Input['FactoryGithubConfigurationArgs']] = None, + global_parameters: Optional[pulumi.Input[Sequence[pulumi.Input['FactoryGlobalParameterArgs']]]] = None, + identity: Optional[pulumi.Input['FactoryIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + managed_virtual_network_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_enabled: Optional[pulumi.Input[bool]] = None, + purview_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + vsts_configuration: Optional[pulumi.Input['FactoryVstsConfigurationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if customer_managed_key_id is None and 'customerManagedKeyId' in kwargs: + customer_managed_key_id = kwargs['customerManagedKeyId'] + if customer_managed_key_identity_id is None and 'customerManagedKeyIdentityId' in kwargs: + customer_managed_key_identity_id = kwargs['customerManagedKeyIdentityId'] + if github_configuration is None and 'githubConfiguration' in kwargs: + github_configuration = kwargs['githubConfiguration'] + if global_parameters is None and 'globalParameters' in kwargs: + global_parameters = kwargs['globalParameters'] + if managed_virtual_network_enabled is None and 'managedVirtualNetworkEnabled' in kwargs: + managed_virtual_network_enabled = kwargs['managedVirtualNetworkEnabled'] + if public_network_enabled is None and 'publicNetworkEnabled' in kwargs: + public_network_enabled = kwargs['publicNetworkEnabled'] + if purview_id is None and 'purviewId' in kwargs: + purview_id = kwargs['purviewId'] + if vsts_configuration is None and 'vstsConfiguration' in kwargs: + vsts_configuration = kwargs['vstsConfiguration'] + + _setter("resource_group_name", resource_group_name) if customer_managed_key_id is not None: - pulumi.set(__self__, "customer_managed_key_id", customer_managed_key_id) + _setter("customer_managed_key_id", customer_managed_key_id) if customer_managed_key_identity_id is not None: - pulumi.set(__self__, "customer_managed_key_identity_id", customer_managed_key_identity_id) + _setter("customer_managed_key_identity_id", customer_managed_key_identity_id) if github_configuration is not None: - pulumi.set(__self__, "github_configuration", github_configuration) + _setter("github_configuration", github_configuration) if global_parameters is not None: - pulumi.set(__self__, "global_parameters", global_parameters) + _setter("global_parameters", global_parameters) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_virtual_network_enabled is not None: - pulumi.set(__self__, "managed_virtual_network_enabled", managed_virtual_network_enabled) + _setter("managed_virtual_network_enabled", managed_virtual_network_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_enabled is not None: - pulumi.set(__self__, "public_network_enabled", public_network_enabled) + _setter("public_network_enabled", public_network_enabled) if purview_id is not None: - pulumi.set(__self__, "purview_id", purview_id) + _setter("purview_id", purview_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if vsts_configuration is not None: - pulumi.set(__self__, "vsts_configuration", vsts_configuration) + _setter("vsts_configuration", vsts_configuration) @property @pulumi.getter(name="resourceGroupName") @@ -260,32 +315,85 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input['FactoryVstsConfigurationArgs'] vsts_configuration: A `vsts_configuration` block as defined below. """ + _FactoryState._configure( + lambda key, value: pulumi.set(__self__, key, value), + customer_managed_key_id=customer_managed_key_id, + customer_managed_key_identity_id=customer_managed_key_identity_id, + github_configuration=github_configuration, + global_parameters=global_parameters, + identity=identity, + location=location, + managed_virtual_network_enabled=managed_virtual_network_enabled, + name=name, + public_network_enabled=public_network_enabled, + purview_id=purview_id, + resource_group_name=resource_group_name, + tags=tags, + vsts_configuration=vsts_configuration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + customer_managed_key_id: Optional[pulumi.Input[str]] = None, + customer_managed_key_identity_id: Optional[pulumi.Input[str]] = None, + github_configuration: Optional[pulumi.Input['FactoryGithubConfigurationArgs']] = None, + global_parameters: Optional[pulumi.Input[Sequence[pulumi.Input['FactoryGlobalParameterArgs']]]] = None, + identity: Optional[pulumi.Input['FactoryIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + managed_virtual_network_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_enabled: Optional[pulumi.Input[bool]] = None, + purview_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + vsts_configuration: Optional[pulumi.Input['FactoryVstsConfigurationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if customer_managed_key_id is None and 'customerManagedKeyId' in kwargs: + customer_managed_key_id = kwargs['customerManagedKeyId'] + if customer_managed_key_identity_id is None and 'customerManagedKeyIdentityId' in kwargs: + customer_managed_key_identity_id = kwargs['customerManagedKeyIdentityId'] + if github_configuration is None and 'githubConfiguration' in kwargs: + github_configuration = kwargs['githubConfiguration'] + if global_parameters is None and 'globalParameters' in kwargs: + global_parameters = kwargs['globalParameters'] + if managed_virtual_network_enabled is None and 'managedVirtualNetworkEnabled' in kwargs: + managed_virtual_network_enabled = kwargs['managedVirtualNetworkEnabled'] + if public_network_enabled is None and 'publicNetworkEnabled' in kwargs: + public_network_enabled = kwargs['publicNetworkEnabled'] + if purview_id is None and 'purviewId' in kwargs: + purview_id = kwargs['purviewId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if vsts_configuration is None and 'vstsConfiguration' in kwargs: + vsts_configuration = kwargs['vstsConfiguration'] + if customer_managed_key_id is not None: - pulumi.set(__self__, "customer_managed_key_id", customer_managed_key_id) + _setter("customer_managed_key_id", customer_managed_key_id) if customer_managed_key_identity_id is not None: - pulumi.set(__self__, "customer_managed_key_identity_id", customer_managed_key_identity_id) + _setter("customer_managed_key_identity_id", customer_managed_key_identity_id) if github_configuration is not None: - pulumi.set(__self__, "github_configuration", github_configuration) + _setter("github_configuration", github_configuration) if global_parameters is not None: - pulumi.set(__self__, "global_parameters", global_parameters) + _setter("global_parameters", global_parameters) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_virtual_network_enabled is not None: - pulumi.set(__self__, "managed_virtual_network_enabled", managed_virtual_network_enabled) + _setter("managed_virtual_network_enabled", managed_virtual_network_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_enabled is not None: - pulumi.set(__self__, "public_network_enabled", public_network_enabled) + _setter("public_network_enabled", public_network_enabled) if purview_id is not None: - pulumi.set(__self__, "purview_id", purview_id) + _setter("purview_id", purview_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if vsts_configuration is not None: - pulumi.set(__self__, "vsts_configuration", vsts_configuration) + _setter("vsts_configuration", vsts_configuration) @property @pulumi.getter(name="customerManagedKeyId") @@ -541,6 +649,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FactoryArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -570,8 +682,18 @@ def _internal_init(__self__, __props__.__dict__["customer_managed_key_id"] = customer_managed_key_id __props__.__dict__["customer_managed_key_identity_id"] = customer_managed_key_identity_id + if github_configuration is not None and not isinstance(github_configuration, FactoryGithubConfigurationArgs): + github_configuration = github_configuration or {} + def _setter(key, value): + github_configuration[key] = value + FactoryGithubConfigurationArgs._configure(_setter, **github_configuration) __props__.__dict__["github_configuration"] = github_configuration __props__.__dict__["global_parameters"] = global_parameters + if identity is not None and not isinstance(identity, FactoryIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + FactoryIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["managed_virtual_network_enabled"] = managed_virtual_network_enabled @@ -582,6 +704,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["tags"] = tags + if vsts_configuration is not None and not isinstance(vsts_configuration, FactoryVstsConfigurationArgs): + vsts_configuration = vsts_configuration or {} + def _setter(key, value): + vsts_configuration[key] = value + FactoryVstsConfigurationArgs._configure(_setter, **vsts_configuration) __props__.__dict__["vsts_configuration"] = vsts_configuration super(Factory, __self__).__init__( 'azure:datafactory/factory:Factory', diff --git a/sdk/python/pulumi_azure/datafactory/flowlet_data_flow.py b/sdk/python/pulumi_azure/datafactory/flowlet_data_flow.py index fc24803a38..d353df3efe 100644 --- a/sdk/python/pulumi_azure/datafactory/flowlet_data_flow.py +++ b/sdk/python/pulumi_azure/datafactory/flowlet_data_flow.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,23 +39,62 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] script_lines: The script lines for the Data Factory Flowlet Data Flow. :param pulumi.Input[Sequence[pulumi.Input['FlowletDataFlowTransformationArgs']]] transformations: One or more `transformation` blocks as defined below. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "sinks", sinks) - pulumi.set(__self__, "sources", sources) + FlowletDataFlowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + sinks=sinks, + sources=sources, + annotations=annotations, + description=description, + folder=folder, + name=name, + script=script, + script_lines=script_lines, + transformations=transformations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + sinks: Optional[pulumi.Input[Sequence[pulumi.Input['FlowletDataFlowSinkArgs']]]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input['FlowletDataFlowSourceArgs']]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + script: Optional[pulumi.Input[str]] = None, + script_lines: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + transformations: Optional[pulumi.Input[Sequence[pulumi.Input['FlowletDataFlowTransformationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if sinks is None: + raise TypeError("Missing 'sinks' argument") + if sources is None: + raise TypeError("Missing 'sources' argument") + if script_lines is None and 'scriptLines' in kwargs: + script_lines = kwargs['scriptLines'] + + _setter("data_factory_id", data_factory_id) + _setter("sinks", sinks) + _setter("sources", sources) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if script is not None: - pulumi.set(__self__, "script", script) + _setter("script", script) if script_lines is not None: - pulumi.set(__self__, "script_lines", script_lines) + _setter("script_lines", script_lines) if transformations is not None: - pulumi.set(__self__, "transformations", transformations) + _setter("transformations", transformations) @property @pulumi.getter(name="dataFactoryId") @@ -204,26 +243,59 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FlowletDataFlowSourceArgs']]] sources: One or more `source` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['FlowletDataFlowTransformationArgs']]] transformations: One or more `transformation` blocks as defined below. """ + _FlowletDataFlowState._configure( + lambda key, value: pulumi.set(__self__, key, value), + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + folder=folder, + name=name, + script=script, + script_lines=script_lines, + sinks=sinks, + sources=sources, + transformations=transformations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + script: Optional[pulumi.Input[str]] = None, + script_lines: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sinks: Optional[pulumi.Input[Sequence[pulumi.Input['FlowletDataFlowSinkArgs']]]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input['FlowletDataFlowSourceArgs']]]] = None, + transformations: Optional[pulumi.Input[Sequence[pulumi.Input['FlowletDataFlowTransformationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if script_lines is None and 'scriptLines' in kwargs: + script_lines = kwargs['scriptLines'] + if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if script is not None: - pulumi.set(__self__, "script", script) + _setter("script", script) if script_lines is not None: - pulumi.set(__self__, "script_lines", script_lines) + _setter("script_lines", script_lines) if sinks is not None: - pulumi.set(__self__, "sinks", sinks) + _setter("sinks", sinks) if sources is not None: - pulumi.set(__self__, "sources", sources) + _setter("sources", sources) if transformations is not None: - pulumi.set(__self__, "transformations", transformations) + _setter("transformations", transformations) @property @pulumi.getter @@ -665,6 +737,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FlowletDataFlowArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/get_factory.py b/sdk/python/pulumi_azure/datafactory/get_factory.py index fc553084d8..55076ebcd7 100644 --- a/sdk/python/pulumi_azure/datafactory/get_factory.py +++ b/sdk/python/pulumi_azure/datafactory/get_factory.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/datafactory/integration_runtime_managed.py b/sdk/python/pulumi_azure/datafactory/integration_runtime_managed.py index fd88acde35..2b663319ca 100644 --- a/sdk/python/pulumi_azure/datafactory/integration_runtime_managed.py +++ b/sdk/python/pulumi_azure/datafactory/integration_runtime_managed.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,28 +43,81 @@ def __init__(__self__, *, :param pulumi.Input[int] number_of_nodes: Number of nodes for the Managed Integration Runtime. Max is `10`. Defaults to `1`. :param pulumi.Input['IntegrationRuntimeManagedVnetIntegrationArgs'] vnet_integration: A `vnet_integration` block as defined below. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "node_size", node_size) + IntegrationRuntimeManagedArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + node_size=node_size, + catalog_info=catalog_info, + custom_setup_script=custom_setup_script, + description=description, + edition=edition, + license_type=license_type, + location=location, + max_parallel_executions_per_node=max_parallel_executions_per_node, + name=name, + number_of_nodes=number_of_nodes, + vnet_integration=vnet_integration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + node_size: Optional[pulumi.Input[str]] = None, + catalog_info: Optional[pulumi.Input['IntegrationRuntimeManagedCatalogInfoArgs']] = None, + custom_setup_script: Optional[pulumi.Input['IntegrationRuntimeManagedCustomSetupScriptArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + edition: Optional[pulumi.Input[str]] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_parallel_executions_per_node: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + number_of_nodes: Optional[pulumi.Input[int]] = None, + vnet_integration: Optional[pulumi.Input['IntegrationRuntimeManagedVnetIntegrationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if node_size is None and 'nodeSize' in kwargs: + node_size = kwargs['nodeSize'] + if node_size is None: + raise TypeError("Missing 'node_size' argument") + if catalog_info is None and 'catalogInfo' in kwargs: + catalog_info = kwargs['catalogInfo'] + if custom_setup_script is None and 'customSetupScript' in kwargs: + custom_setup_script = kwargs['customSetupScript'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_parallel_executions_per_node is None and 'maxParallelExecutionsPerNode' in kwargs: + max_parallel_executions_per_node = kwargs['maxParallelExecutionsPerNode'] + if number_of_nodes is None and 'numberOfNodes' in kwargs: + number_of_nodes = kwargs['numberOfNodes'] + if vnet_integration is None and 'vnetIntegration' in kwargs: + vnet_integration = kwargs['vnetIntegration'] + + _setter("data_factory_id", data_factory_id) + _setter("node_size", node_size) if catalog_info is not None: - pulumi.set(__self__, "catalog_info", catalog_info) + _setter("catalog_info", catalog_info) if custom_setup_script is not None: - pulumi.set(__self__, "custom_setup_script", custom_setup_script) + _setter("custom_setup_script", custom_setup_script) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if edition is not None: - pulumi.set(__self__, "edition", edition) + _setter("edition", edition) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_parallel_executions_per_node is not None: - pulumi.set(__self__, "max_parallel_executions_per_node", max_parallel_executions_per_node) + _setter("max_parallel_executions_per_node", max_parallel_executions_per_node) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if number_of_nodes is not None: - pulumi.set(__self__, "number_of_nodes", number_of_nodes) + _setter("number_of_nodes", number_of_nodes) if vnet_integration is not None: - pulumi.set(__self__, "vnet_integration", vnet_integration) + _setter("vnet_integration", vnet_integration) @property @pulumi.getter(name="dataFactoryId") @@ -241,30 +294,79 @@ def __init__(__self__, *, :param pulumi.Input[int] number_of_nodes: Number of nodes for the Managed Integration Runtime. Max is `10`. Defaults to `1`. :param pulumi.Input['IntegrationRuntimeManagedVnetIntegrationArgs'] vnet_integration: A `vnet_integration` block as defined below. """ + _IntegrationRuntimeManagedState._configure( + lambda key, value: pulumi.set(__self__, key, value), + catalog_info=catalog_info, + custom_setup_script=custom_setup_script, + data_factory_id=data_factory_id, + description=description, + edition=edition, + license_type=license_type, + location=location, + max_parallel_executions_per_node=max_parallel_executions_per_node, + name=name, + node_size=node_size, + number_of_nodes=number_of_nodes, + vnet_integration=vnet_integration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + catalog_info: Optional[pulumi.Input['IntegrationRuntimeManagedCatalogInfoArgs']] = None, + custom_setup_script: Optional[pulumi.Input['IntegrationRuntimeManagedCustomSetupScriptArgs']] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + edition: Optional[pulumi.Input[str]] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_parallel_executions_per_node: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + node_size: Optional[pulumi.Input[str]] = None, + number_of_nodes: Optional[pulumi.Input[int]] = None, + vnet_integration: Optional[pulumi.Input['IntegrationRuntimeManagedVnetIntegrationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if catalog_info is None and 'catalogInfo' in kwargs: + catalog_info = kwargs['catalogInfo'] + if custom_setup_script is None and 'customSetupScript' in kwargs: + custom_setup_script = kwargs['customSetupScript'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_parallel_executions_per_node is None and 'maxParallelExecutionsPerNode' in kwargs: + max_parallel_executions_per_node = kwargs['maxParallelExecutionsPerNode'] + if node_size is None and 'nodeSize' in kwargs: + node_size = kwargs['nodeSize'] + if number_of_nodes is None and 'numberOfNodes' in kwargs: + number_of_nodes = kwargs['numberOfNodes'] + if vnet_integration is None and 'vnetIntegration' in kwargs: + vnet_integration = kwargs['vnetIntegration'] + if catalog_info is not None: - pulumi.set(__self__, "catalog_info", catalog_info) + _setter("catalog_info", catalog_info) if custom_setup_script is not None: - pulumi.set(__self__, "custom_setup_script", custom_setup_script) + _setter("custom_setup_script", custom_setup_script) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if edition is not None: - pulumi.set(__self__, "edition", edition) + _setter("edition", edition) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_parallel_executions_per_node is not None: - pulumi.set(__self__, "max_parallel_executions_per_node", max_parallel_executions_per_node) + _setter("max_parallel_executions_per_node", max_parallel_executions_per_node) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_size is not None: - pulumi.set(__self__, "node_size", node_size) + _setter("node_size", node_size) if number_of_nodes is not None: - pulumi.set(__self__, "number_of_nodes", number_of_nodes) + _setter("number_of_nodes", number_of_nodes) if vnet_integration is not None: - pulumi.set(__self__, "vnet_integration", vnet_integration) + _setter("vnet_integration", vnet_integration) @property @pulumi.getter(name="catalogInfo") @@ -518,6 +620,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationRuntimeManagedArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -544,7 +650,17 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = IntegrationRuntimeManagedArgs.__new__(IntegrationRuntimeManagedArgs) + if catalog_info is not None and not isinstance(catalog_info, IntegrationRuntimeManagedCatalogInfoArgs): + catalog_info = catalog_info or {} + def _setter(key, value): + catalog_info[key] = value + IntegrationRuntimeManagedCatalogInfoArgs._configure(_setter, **catalog_info) __props__.__dict__["catalog_info"] = catalog_info + if custom_setup_script is not None and not isinstance(custom_setup_script, IntegrationRuntimeManagedCustomSetupScriptArgs): + custom_setup_script = custom_setup_script or {} + def _setter(key, value): + custom_setup_script[key] = value + IntegrationRuntimeManagedCustomSetupScriptArgs._configure(_setter, **custom_setup_script) __props__.__dict__["custom_setup_script"] = custom_setup_script if data_factory_id is None and not opts.urn: raise TypeError("Missing required property 'data_factory_id'") @@ -559,6 +675,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'node_size'") __props__.__dict__["node_size"] = node_size __props__.__dict__["number_of_nodes"] = number_of_nodes + if vnet_integration is not None and not isinstance(vnet_integration, IntegrationRuntimeManagedVnetIntegrationArgs): + vnet_integration = vnet_integration or {} + def _setter(key, value): + vnet_integration[key] = value + IntegrationRuntimeManagedVnetIntegrationArgs._configure(_setter, **vnet_integration) __props__.__dict__["vnet_integration"] = vnet_integration super(IntegrationRuntimeManaged, __self__).__init__( 'azure:datafactory/integrationRuntimeManaged:IntegrationRuntimeManaged', diff --git a/sdk/python/pulumi_azure/datafactory/integration_runtime_rule.py b/sdk/python/pulumi_azure/datafactory/integration_runtime_rule.py index 50f686bfd3..bd85e9b9bf 100644 --- a/sdk/python/pulumi_azure/datafactory/integration_runtime_rule.py +++ b/sdk/python/pulumi_azure/datafactory/integration_runtime_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IntegrationRuntimeRuleArgs', 'IntegrationRuntimeRule'] @@ -35,23 +35,64 @@ def __init__(__self__, *, :param pulumi.Input[int] time_to_live_min: Time to live (in minutes) setting of the cluster which will execute data flow job. Defaults to `0`. :param pulumi.Input[bool] virtual_network_enabled: Is Integration Runtime compute provisioned within Managed Virtual Network? Changing this forces a new resource to be created. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) + IntegrationRuntimeRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + cleanup_enabled=cleanup_enabled, + compute_type=compute_type, + core_count=core_count, + description=description, + location=location, + name=name, + time_to_live_min=time_to_live_min, + virtual_network_enabled=virtual_network_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + cleanup_enabled: Optional[pulumi.Input[bool]] = None, + compute_type: Optional[pulumi.Input[str]] = None, + core_count: Optional[pulumi.Input[int]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + time_to_live_min: Optional[pulumi.Input[int]] = None, + virtual_network_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if cleanup_enabled is None and 'cleanupEnabled' in kwargs: + cleanup_enabled = kwargs['cleanupEnabled'] + if compute_type is None and 'computeType' in kwargs: + compute_type = kwargs['computeType'] + if core_count is None and 'coreCount' in kwargs: + core_count = kwargs['coreCount'] + if time_to_live_min is None and 'timeToLiveMin' in kwargs: + time_to_live_min = kwargs['timeToLiveMin'] + if virtual_network_enabled is None and 'virtualNetworkEnabled' in kwargs: + virtual_network_enabled = kwargs['virtualNetworkEnabled'] + + _setter("data_factory_id", data_factory_id) if cleanup_enabled is not None: - pulumi.set(__self__, "cleanup_enabled", cleanup_enabled) + _setter("cleanup_enabled", cleanup_enabled) if compute_type is not None: - pulumi.set(__self__, "compute_type", compute_type) + _setter("compute_type", compute_type) if core_count is not None: - pulumi.set(__self__, "core_count", core_count) + _setter("core_count", core_count) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if time_to_live_min is not None: - pulumi.set(__self__, "time_to_live_min", time_to_live_min) + _setter("time_to_live_min", time_to_live_min) if virtual_network_enabled is not None: - pulumi.set(__self__, "virtual_network_enabled", virtual_network_enabled) + _setter("virtual_network_enabled", virtual_network_enabled) @property @pulumi.getter(name="dataFactoryId") @@ -186,24 +227,63 @@ def __init__(__self__, *, :param pulumi.Input[int] time_to_live_min: Time to live (in minutes) setting of the cluster which will execute data flow job. Defaults to `0`. :param pulumi.Input[bool] virtual_network_enabled: Is Integration Runtime compute provisioned within Managed Virtual Network? Changing this forces a new resource to be created. """ + _IntegrationRuntimeRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cleanup_enabled=cleanup_enabled, + compute_type=compute_type, + core_count=core_count, + data_factory_id=data_factory_id, + description=description, + location=location, + name=name, + time_to_live_min=time_to_live_min, + virtual_network_enabled=virtual_network_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cleanup_enabled: Optional[pulumi.Input[bool]] = None, + compute_type: Optional[pulumi.Input[str]] = None, + core_count: Optional[pulumi.Input[int]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + time_to_live_min: Optional[pulumi.Input[int]] = None, + virtual_network_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cleanup_enabled is None and 'cleanupEnabled' in kwargs: + cleanup_enabled = kwargs['cleanupEnabled'] + if compute_type is None and 'computeType' in kwargs: + compute_type = kwargs['computeType'] + if core_count is None and 'coreCount' in kwargs: + core_count = kwargs['coreCount'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if time_to_live_min is None and 'timeToLiveMin' in kwargs: + time_to_live_min = kwargs['timeToLiveMin'] + if virtual_network_enabled is None and 'virtualNetworkEnabled' in kwargs: + virtual_network_enabled = kwargs['virtualNetworkEnabled'] + if cleanup_enabled is not None: - pulumi.set(__self__, "cleanup_enabled", cleanup_enabled) + _setter("cleanup_enabled", cleanup_enabled) if compute_type is not None: - pulumi.set(__self__, "compute_type", compute_type) + _setter("compute_type", compute_type) if core_count is not None: - pulumi.set(__self__, "core_count", core_count) + _setter("core_count", core_count) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if time_to_live_min is not None: - pulumi.set(__self__, "time_to_live_min", time_to_live_min) + _setter("time_to_live_min", time_to_live_min) if virtual_network_enabled is not None: - pulumi.set(__self__, "virtual_network_enabled", virtual_network_enabled) + _setter("virtual_network_enabled", virtual_network_enabled) @property @pulumi.getter(name="cleanupEnabled") @@ -409,6 +489,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationRuntimeRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/integration_runtime_self_hosted.py b/sdk/python/pulumi_azure/datafactory/integration_runtime_self_hosted.py index 3c87e8d5c2..2246ec6078 100644 --- a/sdk/python/pulumi_azure/datafactory/integration_runtime_self_hosted.py +++ b/sdk/python/pulumi_azure/datafactory/integration_runtime_self_hosted.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,13 +27,36 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Data Factory. Changing this forces a new Data Factory Self-hosted Integration Runtime to be created. :param pulumi.Input[Sequence[pulumi.Input['IntegrationRuntimeSelfHostedRbacAuthorizationArgs']]] rbac_authorizations: A `rbac_authorization` block as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) + IntegrationRuntimeSelfHostedArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + description=description, + name=name, + rbac_authorizations=rbac_authorizations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rbac_authorizations: Optional[pulumi.Input[Sequence[pulumi.Input['IntegrationRuntimeSelfHostedRbacAuthorizationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if rbac_authorizations is None and 'rbacAuthorizations' in kwargs: + rbac_authorizations = kwargs['rbacAuthorizations'] + + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rbac_authorizations is not None: - pulumi.set(__self__, "rbac_authorizations", rbac_authorizations) + _setter("rbac_authorizations", rbac_authorizations) @property @pulumi.getter(name="dataFactoryId") @@ -102,18 +125,47 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['IntegrationRuntimeSelfHostedRbacAuthorizationArgs']]] rbac_authorizations: A `rbac_authorization` block as defined below. Changing this forces a new resource to be created. :param pulumi.Input[str] secondary_authorization_key: The secondary integration runtime authentication key. """ + _IntegrationRuntimeSelfHostedState._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + description=description, + name=name, + primary_authorization_key=primary_authorization_key, + rbac_authorizations=rbac_authorizations, + secondary_authorization_key=secondary_authorization_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_authorization_key: Optional[pulumi.Input[str]] = None, + rbac_authorizations: Optional[pulumi.Input[Sequence[pulumi.Input['IntegrationRuntimeSelfHostedRbacAuthorizationArgs']]]] = None, + secondary_authorization_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if primary_authorization_key is None and 'primaryAuthorizationKey' in kwargs: + primary_authorization_key = kwargs['primaryAuthorizationKey'] + if rbac_authorizations is None and 'rbacAuthorizations' in kwargs: + rbac_authorizations = kwargs['rbacAuthorizations'] + if secondary_authorization_key is None and 'secondaryAuthorizationKey' in kwargs: + secondary_authorization_key = kwargs['secondaryAuthorizationKey'] + if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_authorization_key is not None: - pulumi.set(__self__, "primary_authorization_key", primary_authorization_key) + _setter("primary_authorization_key", primary_authorization_key) if rbac_authorizations is not None: - pulumi.set(__self__, "rbac_authorizations", rbac_authorizations) + _setter("rbac_authorizations", rbac_authorizations) if secondary_authorization_key is not None: - pulumi.set(__self__, "secondary_authorization_key", secondary_authorization_key) + _setter("secondary_authorization_key", secondary_authorization_key) @property @pulumi.getter(name="dataFactoryId") @@ -269,6 +321,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationRuntimeSelfHostedArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/integration_runtime_ssis.py b/sdk/python/pulumi_azure/datafactory/integration_runtime_ssis.py index 5d7426e846..10c1e0fcc3 100644 --- a/sdk/python/pulumi_azure/datafactory/integration_runtime_ssis.py +++ b/sdk/python/pulumi_azure/datafactory/integration_runtime_ssis.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -51,36 +51,103 @@ def __init__(__self__, *, :param pulumi.Input['IntegrationRuntimeSsisProxyArgs'] proxy: A `proxy` block as defined below. :param pulumi.Input['IntegrationRuntimeSsisVnetIntegrationArgs'] vnet_integration: A `vnet_integration` block as defined below. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "node_size", node_size) + IntegrationRuntimeSsisArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + node_size=node_size, + catalog_info=catalog_info, + custom_setup_script=custom_setup_script, + description=description, + edition=edition, + express_custom_setup=express_custom_setup, + express_vnet_integration=express_vnet_integration, + license_type=license_type, + location=location, + max_parallel_executions_per_node=max_parallel_executions_per_node, + name=name, + number_of_nodes=number_of_nodes, + package_stores=package_stores, + proxy=proxy, + vnet_integration=vnet_integration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + node_size: Optional[pulumi.Input[str]] = None, + catalog_info: Optional[pulumi.Input['IntegrationRuntimeSsisCatalogInfoArgs']] = None, + custom_setup_script: Optional[pulumi.Input['IntegrationRuntimeSsisCustomSetupScriptArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + edition: Optional[pulumi.Input[str]] = None, + express_custom_setup: Optional[pulumi.Input['IntegrationRuntimeSsisExpressCustomSetupArgs']] = None, + express_vnet_integration: Optional[pulumi.Input['IntegrationRuntimeSsisExpressVnetIntegrationArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_parallel_executions_per_node: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + number_of_nodes: Optional[pulumi.Input[int]] = None, + package_stores: Optional[pulumi.Input[Sequence[pulumi.Input['IntegrationRuntimeSsisPackageStoreArgs']]]] = None, + proxy: Optional[pulumi.Input['IntegrationRuntimeSsisProxyArgs']] = None, + vnet_integration: Optional[pulumi.Input['IntegrationRuntimeSsisVnetIntegrationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if node_size is None and 'nodeSize' in kwargs: + node_size = kwargs['nodeSize'] + if node_size is None: + raise TypeError("Missing 'node_size' argument") + if catalog_info is None and 'catalogInfo' in kwargs: + catalog_info = kwargs['catalogInfo'] + if custom_setup_script is None and 'customSetupScript' in kwargs: + custom_setup_script = kwargs['customSetupScript'] + if express_custom_setup is None and 'expressCustomSetup' in kwargs: + express_custom_setup = kwargs['expressCustomSetup'] + if express_vnet_integration is None and 'expressVnetIntegration' in kwargs: + express_vnet_integration = kwargs['expressVnetIntegration'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_parallel_executions_per_node is None and 'maxParallelExecutionsPerNode' in kwargs: + max_parallel_executions_per_node = kwargs['maxParallelExecutionsPerNode'] + if number_of_nodes is None and 'numberOfNodes' in kwargs: + number_of_nodes = kwargs['numberOfNodes'] + if package_stores is None and 'packageStores' in kwargs: + package_stores = kwargs['packageStores'] + if vnet_integration is None and 'vnetIntegration' in kwargs: + vnet_integration = kwargs['vnetIntegration'] + + _setter("data_factory_id", data_factory_id) + _setter("node_size", node_size) if catalog_info is not None: - pulumi.set(__self__, "catalog_info", catalog_info) + _setter("catalog_info", catalog_info) if custom_setup_script is not None: - pulumi.set(__self__, "custom_setup_script", custom_setup_script) + _setter("custom_setup_script", custom_setup_script) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if edition is not None: - pulumi.set(__self__, "edition", edition) + _setter("edition", edition) if express_custom_setup is not None: - pulumi.set(__self__, "express_custom_setup", express_custom_setup) + _setter("express_custom_setup", express_custom_setup) if express_vnet_integration is not None: - pulumi.set(__self__, "express_vnet_integration", express_vnet_integration) + _setter("express_vnet_integration", express_vnet_integration) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_parallel_executions_per_node is not None: - pulumi.set(__self__, "max_parallel_executions_per_node", max_parallel_executions_per_node) + _setter("max_parallel_executions_per_node", max_parallel_executions_per_node) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if number_of_nodes is not None: - pulumi.set(__self__, "number_of_nodes", number_of_nodes) + _setter("number_of_nodes", number_of_nodes) if package_stores is not None: - pulumi.set(__self__, "package_stores", package_stores) + _setter("package_stores", package_stores) if proxy is not None: - pulumi.set(__self__, "proxy", proxy) + _setter("proxy", proxy) if vnet_integration is not None: - pulumi.set(__self__, "vnet_integration", vnet_integration) + _setter("vnet_integration", vnet_integration) @property @pulumi.getter(name="dataFactoryId") @@ -313,38 +380,101 @@ def __init__(__self__, *, :param pulumi.Input['IntegrationRuntimeSsisProxyArgs'] proxy: A `proxy` block as defined below. :param pulumi.Input['IntegrationRuntimeSsisVnetIntegrationArgs'] vnet_integration: A `vnet_integration` block as defined below. """ + _IntegrationRuntimeSsisState._configure( + lambda key, value: pulumi.set(__self__, key, value), + catalog_info=catalog_info, + custom_setup_script=custom_setup_script, + data_factory_id=data_factory_id, + description=description, + edition=edition, + express_custom_setup=express_custom_setup, + express_vnet_integration=express_vnet_integration, + license_type=license_type, + location=location, + max_parallel_executions_per_node=max_parallel_executions_per_node, + name=name, + node_size=node_size, + number_of_nodes=number_of_nodes, + package_stores=package_stores, + proxy=proxy, + vnet_integration=vnet_integration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + catalog_info: Optional[pulumi.Input['IntegrationRuntimeSsisCatalogInfoArgs']] = None, + custom_setup_script: Optional[pulumi.Input['IntegrationRuntimeSsisCustomSetupScriptArgs']] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + edition: Optional[pulumi.Input[str]] = None, + express_custom_setup: Optional[pulumi.Input['IntegrationRuntimeSsisExpressCustomSetupArgs']] = None, + express_vnet_integration: Optional[pulumi.Input['IntegrationRuntimeSsisExpressVnetIntegrationArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_parallel_executions_per_node: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + node_size: Optional[pulumi.Input[str]] = None, + number_of_nodes: Optional[pulumi.Input[int]] = None, + package_stores: Optional[pulumi.Input[Sequence[pulumi.Input['IntegrationRuntimeSsisPackageStoreArgs']]]] = None, + proxy: Optional[pulumi.Input['IntegrationRuntimeSsisProxyArgs']] = None, + vnet_integration: Optional[pulumi.Input['IntegrationRuntimeSsisVnetIntegrationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if catalog_info is None and 'catalogInfo' in kwargs: + catalog_info = kwargs['catalogInfo'] + if custom_setup_script is None and 'customSetupScript' in kwargs: + custom_setup_script = kwargs['customSetupScript'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if express_custom_setup is None and 'expressCustomSetup' in kwargs: + express_custom_setup = kwargs['expressCustomSetup'] + if express_vnet_integration is None and 'expressVnetIntegration' in kwargs: + express_vnet_integration = kwargs['expressVnetIntegration'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if max_parallel_executions_per_node is None and 'maxParallelExecutionsPerNode' in kwargs: + max_parallel_executions_per_node = kwargs['maxParallelExecutionsPerNode'] + if node_size is None and 'nodeSize' in kwargs: + node_size = kwargs['nodeSize'] + if number_of_nodes is None and 'numberOfNodes' in kwargs: + number_of_nodes = kwargs['numberOfNodes'] + if package_stores is None and 'packageStores' in kwargs: + package_stores = kwargs['packageStores'] + if vnet_integration is None and 'vnetIntegration' in kwargs: + vnet_integration = kwargs['vnetIntegration'] + if catalog_info is not None: - pulumi.set(__self__, "catalog_info", catalog_info) + _setter("catalog_info", catalog_info) if custom_setup_script is not None: - pulumi.set(__self__, "custom_setup_script", custom_setup_script) + _setter("custom_setup_script", custom_setup_script) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if edition is not None: - pulumi.set(__self__, "edition", edition) + _setter("edition", edition) if express_custom_setup is not None: - pulumi.set(__self__, "express_custom_setup", express_custom_setup) + _setter("express_custom_setup", express_custom_setup) if express_vnet_integration is not None: - pulumi.set(__self__, "express_vnet_integration", express_vnet_integration) + _setter("express_vnet_integration", express_vnet_integration) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_parallel_executions_per_node is not None: - pulumi.set(__self__, "max_parallel_executions_per_node", max_parallel_executions_per_node) + _setter("max_parallel_executions_per_node", max_parallel_executions_per_node) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_size is not None: - pulumi.set(__self__, "node_size", node_size) + _setter("node_size", node_size) if number_of_nodes is not None: - pulumi.set(__self__, "number_of_nodes", number_of_nodes) + _setter("number_of_nodes", number_of_nodes) if package_stores is not None: - pulumi.set(__self__, "package_stores", package_stores) + _setter("package_stores", package_stores) if proxy is not None: - pulumi.set(__self__, "proxy", proxy) + _setter("proxy", proxy) if vnet_integration is not None: - pulumi.set(__self__, "vnet_integration", vnet_integration) + _setter("vnet_integration", vnet_integration) @property @pulumi.getter(name="catalogInfo") @@ -650,6 +780,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationRuntimeSsisArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -680,14 +814,34 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = IntegrationRuntimeSsisArgs.__new__(IntegrationRuntimeSsisArgs) + if catalog_info is not None and not isinstance(catalog_info, IntegrationRuntimeSsisCatalogInfoArgs): + catalog_info = catalog_info or {} + def _setter(key, value): + catalog_info[key] = value + IntegrationRuntimeSsisCatalogInfoArgs._configure(_setter, **catalog_info) __props__.__dict__["catalog_info"] = catalog_info + if custom_setup_script is not None and not isinstance(custom_setup_script, IntegrationRuntimeSsisCustomSetupScriptArgs): + custom_setup_script = custom_setup_script or {} + def _setter(key, value): + custom_setup_script[key] = value + IntegrationRuntimeSsisCustomSetupScriptArgs._configure(_setter, **custom_setup_script) __props__.__dict__["custom_setup_script"] = custom_setup_script if data_factory_id is None and not opts.urn: raise TypeError("Missing required property 'data_factory_id'") __props__.__dict__["data_factory_id"] = data_factory_id __props__.__dict__["description"] = description __props__.__dict__["edition"] = edition + if express_custom_setup is not None and not isinstance(express_custom_setup, IntegrationRuntimeSsisExpressCustomSetupArgs): + express_custom_setup = express_custom_setup or {} + def _setter(key, value): + express_custom_setup[key] = value + IntegrationRuntimeSsisExpressCustomSetupArgs._configure(_setter, **express_custom_setup) __props__.__dict__["express_custom_setup"] = express_custom_setup + if express_vnet_integration is not None and not isinstance(express_vnet_integration, IntegrationRuntimeSsisExpressVnetIntegrationArgs): + express_vnet_integration = express_vnet_integration or {} + def _setter(key, value): + express_vnet_integration[key] = value + IntegrationRuntimeSsisExpressVnetIntegrationArgs._configure(_setter, **express_vnet_integration) __props__.__dict__["express_vnet_integration"] = express_vnet_integration __props__.__dict__["license_type"] = license_type __props__.__dict__["location"] = location @@ -698,7 +852,17 @@ def _internal_init(__self__, __props__.__dict__["node_size"] = node_size __props__.__dict__["number_of_nodes"] = number_of_nodes __props__.__dict__["package_stores"] = package_stores + if proxy is not None and not isinstance(proxy, IntegrationRuntimeSsisProxyArgs): + proxy = proxy or {} + def _setter(key, value): + proxy[key] = value + IntegrationRuntimeSsisProxyArgs._configure(_setter, **proxy) __props__.__dict__["proxy"] = proxy + if vnet_integration is not None and not isinstance(vnet_integration, IntegrationRuntimeSsisVnetIntegrationArgs): + vnet_integration = vnet_integration or {} + def _setter(key, value): + vnet_integration[key] = value + IntegrationRuntimeSsisVnetIntegrationArgs._configure(_setter, **vnet_integration) __props__.__dict__["vnet_integration"] = vnet_integration super(IntegrationRuntimeSsis, __self__).__init__( 'azure:datafactory/integrationRuntimeSsis:IntegrationRuntimeSsis', diff --git a/sdk/python/pulumi_azure/datafactory/linked_custom_service.py b/sdk/python/pulumi_azure/datafactory/linked_custom_service.py index e68fc68af3..fbe7bee750 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_custom_service.py +++ b/sdk/python/pulumi_azure/datafactory/linked_custom_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,21 +37,62 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_properties_json", type_properties_json) + LinkedCustomServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + type=type, + type_properties_json=type_properties_json, + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime=integration_runtime, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + type_properties_json: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime: Optional[pulumi.Input['LinkedCustomServiceIntegrationRuntimeArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_properties_json is None and 'typePropertiesJson' in kwargs: + type_properties_json = kwargs['typePropertiesJson'] + if type_properties_json is None: + raise TypeError("Missing 'type_properties_json' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime is None and 'integrationRuntime' in kwargs: + integration_runtime = kwargs['integrationRuntime'] + + _setter("data_factory_id", data_factory_id) + _setter("type", type) + _setter("type_properties_json", type_properties_json) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime is not None: - pulumi.set(__self__, "integration_runtime", integration_runtime) + _setter("integration_runtime", integration_runtime) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="dataFactoryId") @@ -186,24 +227,59 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of data stores that will be connected to Data Factory. For full list of supported data stores, please refer to [Azure Data Factory connector](https://docs.microsoft.com/azure/data-factory/connector-overview). Changing this forces a new resource to be created. :param pulumi.Input[str] type_properties_json: A JSON object that contains the properties of the Data Factory Linked Service. """ + _LinkedCustomServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + integration_runtime=integration_runtime, + name=name, + parameters=parameters, + type=type, + type_properties_json=type_properties_json, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime: Optional[pulumi.Input['LinkedCustomServiceIntegrationRuntimeArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + type_properties_json: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime is None and 'integrationRuntime' in kwargs: + integration_runtime = kwargs['integrationRuntime'] + if type_properties_json is None and 'typePropertiesJson' in kwargs: + type_properties_json = kwargs['typePropertiesJson'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime is not None: - pulumi.set(__self__, "integration_runtime", integration_runtime) + _setter("integration_runtime", integration_runtime) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if type_properties_json is not None: - pulumi.set(__self__, "type_properties_json", type_properties_json) + _setter("type_properties_json", type_properties_json) @property @pulumi.getter(name="additionalProperties") @@ -455,6 +531,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedCustomServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -484,6 +564,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'data_factory_id'") __props__.__dict__["data_factory_id"] = data_factory_id __props__.__dict__["description"] = description + if integration_runtime is not None and not isinstance(integration_runtime, LinkedCustomServiceIntegrationRuntimeArgs): + integration_runtime = integration_runtime or {} + def _setter(key, value): + integration_runtime[key] = value + LinkedCustomServiceIntegrationRuntimeArgs._configure(_setter, **integration_runtime) __props__.__dict__["integration_runtime"] = integration_runtime __props__.__dict__["name"] = name __props__.__dict__["parameters"] = parameters diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_azure_blob_storage.py b/sdk/python/pulumi_azure/datafactory/linked_service_azure_blob_storage.py index d9ffbe157a..5da0744f53 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_azure_blob_storage.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_azure_blob_storage.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,41 +59,116 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The tenant id or name in which to authenticate against the Azure Blob Storage account. :param pulumi.Input[bool] use_managed_identity: Whether to use the Data Factory's managed identity to authenticate against the Azure Blob Storage account. Incompatible with `service_principal_id` and `service_principal_key`. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) + LinkedServiceAzureBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + connection_string_insecure=connection_string_insecure, + description=description, + integration_runtime_name=integration_runtime_name, + key_vault_sas_token=key_vault_sas_token, + name=name, + parameters=parameters, + sas_uri=sas_uri, + service_endpoint=service_endpoint, + service_principal_id=service_principal_id, + service_principal_key=service_principal_key, + service_principal_linked_key_vault_key=service_principal_linked_key_vault_key, + storage_kind=storage_kind, + tenant_id=tenant_id, + use_managed_identity=use_managed_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + connection_string_insecure: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_sas_token: Optional[pulumi.Input['LinkedServiceAzureBlobStorageKeyVaultSasTokenArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + sas_uri: Optional[pulumi.Input[str]] = None, + service_endpoint: Optional[pulumi.Input[str]] = None, + service_principal_id: Optional[pulumi.Input[str]] = None, + service_principal_key: Optional[pulumi.Input[str]] = None, + service_principal_linked_key_vault_key: Optional[pulumi.Input['LinkedServiceAzureBlobStorageServicePrincipalLinkedKeyVaultKeyArgs']] = None, + storage_kind: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + use_managed_identity: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string_insecure is None and 'connectionStringInsecure' in kwargs: + connection_string_insecure = kwargs['connectionStringInsecure'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_sas_token is None and 'keyVaultSasToken' in kwargs: + key_vault_sas_token = kwargs['keyVaultSasToken'] + if sas_uri is None and 'sasUri' in kwargs: + sas_uri = kwargs['sasUri'] + if service_endpoint is None and 'serviceEndpoint' in kwargs: + service_endpoint = kwargs['serviceEndpoint'] + if service_principal_id is None and 'servicePrincipalId' in kwargs: + service_principal_id = kwargs['servicePrincipalId'] + if service_principal_key is None and 'servicePrincipalKey' in kwargs: + service_principal_key = kwargs['servicePrincipalKey'] + if service_principal_linked_key_vault_key is None and 'servicePrincipalLinkedKeyVaultKey' in kwargs: + service_principal_linked_key_vault_key = kwargs['servicePrincipalLinkedKeyVaultKey'] + if storage_kind is None and 'storageKind' in kwargs: + storage_kind = kwargs['storageKind'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if use_managed_identity is None and 'useManagedIdentity' in kwargs: + use_managed_identity = kwargs['useManagedIdentity'] + + _setter("data_factory_id", data_factory_id) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if connection_string_insecure is not None: - pulumi.set(__self__, "connection_string_insecure", connection_string_insecure) + _setter("connection_string_insecure", connection_string_insecure) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_sas_token is not None: - pulumi.set(__self__, "key_vault_sas_token", key_vault_sas_token) + _setter("key_vault_sas_token", key_vault_sas_token) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if sas_uri is not None: - pulumi.set(__self__, "sas_uri", sas_uri) + _setter("sas_uri", sas_uri) if service_endpoint is not None: - pulumi.set(__self__, "service_endpoint", service_endpoint) + _setter("service_endpoint", service_endpoint) if service_principal_id is not None: - pulumi.set(__self__, "service_principal_id", service_principal_id) + _setter("service_principal_id", service_principal_id) if service_principal_key is not None: - pulumi.set(__self__, "service_principal_key", service_principal_key) + _setter("service_principal_key", service_principal_key) if service_principal_linked_key_vault_key is not None: - pulumi.set(__self__, "service_principal_linked_key_vault_key", service_principal_linked_key_vault_key) + _setter("service_principal_linked_key_vault_key", service_principal_linked_key_vault_key) if storage_kind is not None: - pulumi.set(__self__, "storage_kind", storage_kind) + _setter("storage_kind", storage_kind) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if use_managed_identity is not None: - pulumi.set(__self__, "use_managed_identity", use_managed_identity) + _setter("use_managed_identity", use_managed_identity) @property @pulumi.getter(name="dataFactoryId") @@ -362,42 +437,115 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The tenant id or name in which to authenticate against the Azure Blob Storage account. :param pulumi.Input[bool] use_managed_identity: Whether to use the Data Factory's managed identity to authenticate against the Azure Blob Storage account. Incompatible with `service_principal_id` and `service_principal_key`. """ + _LinkedServiceAzureBlobStorageState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + connection_string_insecure=connection_string_insecure, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + key_vault_sas_token=key_vault_sas_token, + name=name, + parameters=parameters, + sas_uri=sas_uri, + service_endpoint=service_endpoint, + service_principal_id=service_principal_id, + service_principal_key=service_principal_key, + service_principal_linked_key_vault_key=service_principal_linked_key_vault_key, + storage_kind=storage_kind, + tenant_id=tenant_id, + use_managed_identity=use_managed_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + connection_string_insecure: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_sas_token: Optional[pulumi.Input['LinkedServiceAzureBlobStorageKeyVaultSasTokenArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + sas_uri: Optional[pulumi.Input[str]] = None, + service_endpoint: Optional[pulumi.Input[str]] = None, + service_principal_id: Optional[pulumi.Input[str]] = None, + service_principal_key: Optional[pulumi.Input[str]] = None, + service_principal_linked_key_vault_key: Optional[pulumi.Input['LinkedServiceAzureBlobStorageServicePrincipalLinkedKeyVaultKeyArgs']] = None, + storage_kind: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + use_managed_identity: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string_insecure is None and 'connectionStringInsecure' in kwargs: + connection_string_insecure = kwargs['connectionStringInsecure'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_sas_token is None and 'keyVaultSasToken' in kwargs: + key_vault_sas_token = kwargs['keyVaultSasToken'] + if sas_uri is None and 'sasUri' in kwargs: + sas_uri = kwargs['sasUri'] + if service_endpoint is None and 'serviceEndpoint' in kwargs: + service_endpoint = kwargs['serviceEndpoint'] + if service_principal_id is None and 'servicePrincipalId' in kwargs: + service_principal_id = kwargs['servicePrincipalId'] + if service_principal_key is None and 'servicePrincipalKey' in kwargs: + service_principal_key = kwargs['servicePrincipalKey'] + if service_principal_linked_key_vault_key is None and 'servicePrincipalLinkedKeyVaultKey' in kwargs: + service_principal_linked_key_vault_key = kwargs['servicePrincipalLinkedKeyVaultKey'] + if storage_kind is None and 'storageKind' in kwargs: + storage_kind = kwargs['storageKind'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if use_managed_identity is None and 'useManagedIdentity' in kwargs: + use_managed_identity = kwargs['useManagedIdentity'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if connection_string_insecure is not None: - pulumi.set(__self__, "connection_string_insecure", connection_string_insecure) + _setter("connection_string_insecure", connection_string_insecure) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_sas_token is not None: - pulumi.set(__self__, "key_vault_sas_token", key_vault_sas_token) + _setter("key_vault_sas_token", key_vault_sas_token) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if sas_uri is not None: - pulumi.set(__self__, "sas_uri", sas_uri) + _setter("sas_uri", sas_uri) if service_endpoint is not None: - pulumi.set(__self__, "service_endpoint", service_endpoint) + _setter("service_endpoint", service_endpoint) if service_principal_id is not None: - pulumi.set(__self__, "service_principal_id", service_principal_id) + _setter("service_principal_id", service_principal_id) if service_principal_key is not None: - pulumi.set(__self__, "service_principal_key", service_principal_key) + _setter("service_principal_key", service_principal_key) if service_principal_linked_key_vault_key is not None: - pulumi.set(__self__, "service_principal_linked_key_vault_key", service_principal_linked_key_vault_key) + _setter("service_principal_linked_key_vault_key", service_principal_linked_key_vault_key) if storage_kind is not None: - pulumi.set(__self__, "storage_kind", storage_kind) + _setter("storage_kind", storage_kind) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if use_managed_identity is not None: - pulumi.set(__self__, "use_managed_identity", use_managed_identity) + _setter("use_managed_identity", use_managed_identity) @property @pulumi.getter(name="additionalProperties") @@ -813,6 +961,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceAzureBlobStorageArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -854,6 +1006,11 @@ def _internal_init(__self__, __props__.__dict__["data_factory_id"] = data_factory_id __props__.__dict__["description"] = description __props__.__dict__["integration_runtime_name"] = integration_runtime_name + if key_vault_sas_token is not None and not isinstance(key_vault_sas_token, LinkedServiceAzureBlobStorageKeyVaultSasTokenArgs): + key_vault_sas_token = key_vault_sas_token or {} + def _setter(key, value): + key_vault_sas_token[key] = value + LinkedServiceAzureBlobStorageKeyVaultSasTokenArgs._configure(_setter, **key_vault_sas_token) __props__.__dict__["key_vault_sas_token"] = key_vault_sas_token __props__.__dict__["name"] = name __props__.__dict__["parameters"] = parameters @@ -861,6 +1018,11 @@ def _internal_init(__self__, __props__.__dict__["service_endpoint"] = None if service_endpoint is None else pulumi.Output.secret(service_endpoint) __props__.__dict__["service_principal_id"] = service_principal_id __props__.__dict__["service_principal_key"] = service_principal_key + if service_principal_linked_key_vault_key is not None and not isinstance(service_principal_linked_key_vault_key, LinkedServiceAzureBlobStorageServicePrincipalLinkedKeyVaultKeyArgs): + service_principal_linked_key_vault_key = service_principal_linked_key_vault_key or {} + def _setter(key, value): + service_principal_linked_key_vault_key[key] = value + LinkedServiceAzureBlobStorageServicePrincipalLinkedKeyVaultKeyArgs._configure(_setter, **service_principal_linked_key_vault_key) __props__.__dict__["service_principal_linked_key_vault_key"] = service_principal_linked_key_vault_key __props__.__dict__["storage_kind"] = storage_kind __props__.__dict__["tenant_id"] = tenant_id diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_azure_databricks.py b/sdk/python/pulumi_azure/datafactory/linked_service_azure_databricks.py index 215454a325..4e475729dd 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_azure_databricks.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_azure_databricks.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,32 +47,93 @@ def __init__(__self__, *, :param pulumi.Input['LinkedServiceAzureDatabricksNewClusterConfigArgs'] new_cluster_config: Creates new clusters within the linked ADB instance as defined in the `new_cluster_config` block below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "adb_domain", adb_domain) - pulumi.set(__self__, "data_factory_id", data_factory_id) + LinkedServiceAzureDatabricksArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + adb_domain=adb_domain, + data_factory_id=data_factory_id, + access_token=access_token, + additional_properties=additional_properties, + annotations=annotations, + description=description, + existing_cluster_id=existing_cluster_id, + instance_pool=instance_pool, + integration_runtime_name=integration_runtime_name, + key_vault_password=key_vault_password, + msi_work_space_resource_id=msi_work_space_resource_id, + name=name, + new_cluster_config=new_cluster_config, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + adb_domain: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + access_token: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + existing_cluster_id: Optional[pulumi.Input[str]] = None, + instance_pool: Optional[pulumi.Input['LinkedServiceAzureDatabricksInstancePoolArgs']] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_password: Optional[pulumi.Input['LinkedServiceAzureDatabricksKeyVaultPasswordArgs']] = None, + msi_work_space_resource_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + new_cluster_config: Optional[pulumi.Input['LinkedServiceAzureDatabricksNewClusterConfigArgs']] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if adb_domain is None and 'adbDomain' in kwargs: + adb_domain = kwargs['adbDomain'] + if adb_domain is None: + raise TypeError("Missing 'adb_domain' argument") + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if access_token is None and 'accessToken' in kwargs: + access_token = kwargs['accessToken'] + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if existing_cluster_id is None and 'existingClusterId' in kwargs: + existing_cluster_id = kwargs['existingClusterId'] + if instance_pool is None and 'instancePool' in kwargs: + instance_pool = kwargs['instancePool'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + if msi_work_space_resource_id is None and 'msiWorkSpaceResourceId' in kwargs: + msi_work_space_resource_id = kwargs['msiWorkSpaceResourceId'] + if new_cluster_config is None and 'newClusterConfig' in kwargs: + new_cluster_config = kwargs['newClusterConfig'] + + _setter("adb_domain", adb_domain) + _setter("data_factory_id", data_factory_id) if access_token is not None: - pulumi.set(__self__, "access_token", access_token) + _setter("access_token", access_token) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if existing_cluster_id is not None: - pulumi.set(__self__, "existing_cluster_id", existing_cluster_id) + _setter("existing_cluster_id", existing_cluster_id) if instance_pool is not None: - pulumi.set(__self__, "instance_pool", instance_pool) + _setter("instance_pool", instance_pool) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if msi_work_space_resource_id is not None: - pulumi.set(__self__, "msi_work_space_resource_id", msi_work_space_resource_id) + _setter("msi_work_space_resource_id", msi_work_space_resource_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if new_cluster_config is not None: - pulumi.set(__self__, "new_cluster_config", new_cluster_config) + _setter("new_cluster_config", new_cluster_config) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="adbDomain") @@ -277,34 +338,91 @@ def __init__(__self__, *, :param pulumi.Input['LinkedServiceAzureDatabricksNewClusterConfigArgs'] new_cluster_config: Creates new clusters within the linked ADB instance as defined in the `new_cluster_config` block below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ + _LinkedServiceAzureDatabricksState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_token=access_token, + adb_domain=adb_domain, + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + existing_cluster_id=existing_cluster_id, + instance_pool=instance_pool, + integration_runtime_name=integration_runtime_name, + key_vault_password=key_vault_password, + msi_work_space_resource_id=msi_work_space_resource_id, + name=name, + new_cluster_config=new_cluster_config, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_token: Optional[pulumi.Input[str]] = None, + adb_domain: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + existing_cluster_id: Optional[pulumi.Input[str]] = None, + instance_pool: Optional[pulumi.Input['LinkedServiceAzureDatabricksInstancePoolArgs']] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_password: Optional[pulumi.Input['LinkedServiceAzureDatabricksKeyVaultPasswordArgs']] = None, + msi_work_space_resource_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + new_cluster_config: Optional[pulumi.Input['LinkedServiceAzureDatabricksNewClusterConfigArgs']] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_token is None and 'accessToken' in kwargs: + access_token = kwargs['accessToken'] + if adb_domain is None and 'adbDomain' in kwargs: + adb_domain = kwargs['adbDomain'] + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if existing_cluster_id is None and 'existingClusterId' in kwargs: + existing_cluster_id = kwargs['existingClusterId'] + if instance_pool is None and 'instancePool' in kwargs: + instance_pool = kwargs['instancePool'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + if msi_work_space_resource_id is None and 'msiWorkSpaceResourceId' in kwargs: + msi_work_space_resource_id = kwargs['msiWorkSpaceResourceId'] + if new_cluster_config is None and 'newClusterConfig' in kwargs: + new_cluster_config = kwargs['newClusterConfig'] + if access_token is not None: - pulumi.set(__self__, "access_token", access_token) + _setter("access_token", access_token) if adb_domain is not None: - pulumi.set(__self__, "adb_domain", adb_domain) + _setter("adb_domain", adb_domain) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if existing_cluster_id is not None: - pulumi.set(__self__, "existing_cluster_id", existing_cluster_id) + _setter("existing_cluster_id", existing_cluster_id) if instance_pool is not None: - pulumi.set(__self__, "instance_pool", instance_pool) + _setter("instance_pool", instance_pool) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if msi_work_space_resource_id is not None: - pulumi.set(__self__, "msi_work_space_resource_id", msi_work_space_resource_id) + _setter("msi_work_space_resource_id", msi_work_space_resource_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if new_cluster_config is not None: - pulumi.set(__self__, "new_cluster_config", new_cluster_config) + _setter("new_cluster_config", new_cluster_config) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="accessToken") @@ -698,6 +816,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceAzureDatabricksArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -737,11 +859,26 @@ def _internal_init(__self__, __props__.__dict__["data_factory_id"] = data_factory_id __props__.__dict__["description"] = description __props__.__dict__["existing_cluster_id"] = existing_cluster_id + if instance_pool is not None and not isinstance(instance_pool, LinkedServiceAzureDatabricksInstancePoolArgs): + instance_pool = instance_pool or {} + def _setter(key, value): + instance_pool[key] = value + LinkedServiceAzureDatabricksInstancePoolArgs._configure(_setter, **instance_pool) __props__.__dict__["instance_pool"] = instance_pool __props__.__dict__["integration_runtime_name"] = integration_runtime_name + if key_vault_password is not None and not isinstance(key_vault_password, LinkedServiceAzureDatabricksKeyVaultPasswordArgs): + key_vault_password = key_vault_password or {} + def _setter(key, value): + key_vault_password[key] = value + LinkedServiceAzureDatabricksKeyVaultPasswordArgs._configure(_setter, **key_vault_password) __props__.__dict__["key_vault_password"] = key_vault_password __props__.__dict__["msi_work_space_resource_id"] = msi_work_space_resource_id __props__.__dict__["name"] = name + if new_cluster_config is not None and not isinstance(new_cluster_config, LinkedServiceAzureDatabricksNewClusterConfigArgs): + new_cluster_config = new_cluster_config or {} + def _setter(key, value): + new_cluster_config[key] = value + LinkedServiceAzureDatabricksNewClusterConfigArgs._configure(_setter, **new_cluster_config) __props__.__dict__["new_cluster_config"] = new_cluster_config __props__.__dict__["parameters"] = parameters secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["accessToken"]) diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_azure_file_storage.py b/sdk/python/pulumi_azure/datafactory/linked_service_azure_file_storage.py index cf1d01935e..b26844205e 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_azure_file_storage.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_azure_file_storage.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,30 +47,83 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password to log in the server. :param pulumi.Input[str] user_id: The user ID to log in the server. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "data_factory_id", data_factory_id) + LinkedServiceAzureFileStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + data_factory_id=data_factory_id, + additional_properties=additional_properties, + annotations=annotations, + description=description, + file_share=file_share, + host=host, + integration_runtime_name=integration_runtime_name, + key_vault_password=key_vault_password, + name=name, + parameters=parameters, + password=password, + user_id=user_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + file_share: Optional[pulumi.Input[str]] = None, + host: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_password: Optional[pulumi.Input['LinkedServiceAzureFileStorageKeyVaultPasswordArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + password: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if file_share is None and 'fileShare' in kwargs: + file_share = kwargs['fileShare'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + if user_id is None and 'userId' in kwargs: + user_id = kwargs['userId'] + + _setter("connection_string", connection_string) + _setter("data_factory_id", data_factory_id) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if file_share is not None: - pulumi.set(__self__, "file_share", file_share) + _setter("file_share", file_share) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if user_id is not None: - pulumi.set(__self__, "user_id", user_id) + _setter("user_id", user_id) @property @pulumi.getter(name="connectionString") @@ -265,32 +318,81 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password to log in the server. :param pulumi.Input[str] user_id: The user ID to log in the server. """ + _LinkedServiceAzureFileStorageState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + data_factory_id=data_factory_id, + description=description, + file_share=file_share, + host=host, + integration_runtime_name=integration_runtime_name, + key_vault_password=key_vault_password, + name=name, + parameters=parameters, + password=password, + user_id=user_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + file_share: Optional[pulumi.Input[str]] = None, + host: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_password: Optional[pulumi.Input['LinkedServiceAzureFileStorageKeyVaultPasswordArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + password: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if file_share is None and 'fileShare' in kwargs: + file_share = kwargs['fileShare'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + if user_id is None and 'userId' in kwargs: + user_id = kwargs['userId'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if file_share is not None: - pulumi.set(__self__, "file_share", file_share) + _setter("file_share", file_share) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if user_id is not None: - pulumi.set(__self__, "user_id", user_id) + _setter("user_id", user_id) @property @pulumi.getter(name="additionalProperties") @@ -560,6 +662,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceAzureFileStorageArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -599,6 +705,11 @@ def _internal_init(__self__, __props__.__dict__["file_share"] = file_share __props__.__dict__["host"] = host __props__.__dict__["integration_runtime_name"] = integration_runtime_name + if key_vault_password is not None and not isinstance(key_vault_password, LinkedServiceAzureFileStorageKeyVaultPasswordArgs): + key_vault_password = key_vault_password or {} + def _setter(key, value): + key_vault_password[key] = value + LinkedServiceAzureFileStorageKeyVaultPasswordArgs._configure(_setter, **key_vault_password) __props__.__dict__["key_vault_password"] = key_vault_password __props__.__dict__["name"] = name __props__.__dict__["parameters"] = parameters diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_azure_function.py b/sdk/python/pulumi_azure/datafactory/linked_service_azure_function.py index b99eafad46..bb856c60db 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_azure_function.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_azure_function.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,24 +41,65 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "url", url) + LinkedServiceAzureFunctionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + url=url, + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime_name=integration_runtime_name, + key=key, + key_vault_key=key_vault_key, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key: Optional[pulumi.Input[str]] = None, + key_vault_key: Optional[pulumi.Input['LinkedServiceAzureFunctionKeyVaultKeyArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_key is None and 'keyVaultKey' in kwargs: + key_vault_key = kwargs['keyVaultKey'] + + _setter("data_factory_id", data_factory_id) + _setter("url", url) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if key_vault_key is not None: - pulumi.set(__self__, "key_vault_key", key_vault_key) + _setter("key_vault_key", key_vault_key) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="dataFactoryId") @@ -211,26 +252,63 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. :param pulumi.Input[str] url: The url of the Azure Function. """ + _LinkedServiceAzureFunctionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + key=key, + key_vault_key=key_vault_key, + name=name, + parameters=parameters, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key: Optional[pulumi.Input[str]] = None, + key_vault_key: Optional[pulumi.Input['LinkedServiceAzureFunctionKeyVaultKeyArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_key is None and 'keyVaultKey' in kwargs: + key_vault_key = kwargs['keyVaultKey'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if key_vault_key is not None: - pulumi.set(__self__, "key_vault_key", key_vault_key) + _setter("key_vault_key", key_vault_key) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="additionalProperties") @@ -460,6 +538,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceAzureFunctionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -492,6 +574,11 @@ def _internal_init(__self__, __props__.__dict__["description"] = description __props__.__dict__["integration_runtime_name"] = integration_runtime_name __props__.__dict__["key"] = None if key is None else pulumi.Output.secret(key) + if key_vault_key is not None and not isinstance(key_vault_key, LinkedServiceAzureFunctionKeyVaultKeyArgs): + key_vault_key = key_vault_key or {} + def _setter(key, value): + key_vault_key[key] = value + LinkedServiceAzureFunctionKeyVaultKeyArgs._configure(_setter, **key_vault_key) __props__.__dict__["key_vault_key"] = key_vault_key __props__.__dict__["name"] = name __props__.__dict__["parameters"] = parameters diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_azure_search.py b/sdk/python/pulumi_azure/datafactory/linked_service_azure_search.py index 098374c912..4572195d24 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_azure_search.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_azure_search.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedServiceAzureSearchArgs', 'LinkedServiceAzureSearch'] @@ -37,21 +37,62 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "search_service_key", search_service_key) - pulumi.set(__self__, "url", url) + LinkedServiceAzureSearchArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + search_service_key=search_service_key, + url=url, + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + search_service_key: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if search_service_key is None and 'searchServiceKey' in kwargs: + search_service_key = kwargs['searchServiceKey'] + if search_service_key is None: + raise TypeError("Missing 'search_service_key' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + + _setter("data_factory_id", data_factory_id) + _setter("search_service_key", search_service_key) + _setter("url", url) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="dataFactoryId") @@ -192,26 +233,65 @@ def __init__(__self__, *, :param pulumi.Input[str] search_service_key: The key of the Azure Search Service. :param pulumi.Input[str] url: The URL of the Search Service endpoint (e.g. ). """ + _LinkedServiceAzureSearchState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + encrypted_credential=encrypted_credential, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + search_service_key=search_service_key, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encrypted_credential: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + search_service_key: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if encrypted_credential is None and 'encryptedCredential' in kwargs: + encrypted_credential = kwargs['encryptedCredential'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if search_service_key is None and 'searchServiceKey' in kwargs: + search_service_key = kwargs['searchServiceKey'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encrypted_credential is not None: - pulumi.set(__self__, "encrypted_credential", encrypted_credential) + _setter("encrypted_credential", encrypted_credential) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if search_service_key is not None: - pulumi.set(__self__, "search_service_key", search_service_key) + _setter("search_service_key", search_service_key) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="additionalProperties") @@ -403,6 +483,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceAzureSearchArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_azure_sql_database.py b/sdk/python/pulumi_azure/datafactory/linked_service_azure_sql_database.py index eb24291f9f..3ed0a56e84 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_azure_sql_database.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_azure_sql_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,33 +47,92 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The tenant id or name in which to authenticate against the Azure SQL Database. :param pulumi.Input[bool] use_managed_identity: Whether to use the Data Factory's managed identity to authenticate against the Azure SQL Database. Incompatible with `service_principal_id` and `service_principal_key` """ - pulumi.set(__self__, "data_factory_id", data_factory_id) + LinkedServiceAzureSqlDatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + description=description, + integration_runtime_name=integration_runtime_name, + key_vault_connection_string=key_vault_connection_string, + key_vault_password=key_vault_password, + name=name, + parameters=parameters, + service_principal_id=service_principal_id, + service_principal_key=service_principal_key, + tenant_id=tenant_id, + use_managed_identity=use_managed_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_connection_string: Optional[pulumi.Input['LinkedServiceAzureSqlDatabaseKeyVaultConnectionStringArgs']] = None, + key_vault_password: Optional[pulumi.Input['LinkedServiceAzureSqlDatabaseKeyVaultPasswordArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + service_principal_id: Optional[pulumi.Input[str]] = None, + service_principal_key: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + use_managed_identity: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_connection_string is None and 'keyVaultConnectionString' in kwargs: + key_vault_connection_string = kwargs['keyVaultConnectionString'] + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + if service_principal_id is None and 'servicePrincipalId' in kwargs: + service_principal_id = kwargs['servicePrincipalId'] + if service_principal_key is None and 'servicePrincipalKey' in kwargs: + service_principal_key = kwargs['servicePrincipalKey'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if use_managed_identity is None and 'useManagedIdentity' in kwargs: + use_managed_identity = kwargs['useManagedIdentity'] + + _setter("data_factory_id", data_factory_id) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_connection_string is not None: - pulumi.set(__self__, "key_vault_connection_string", key_vault_connection_string) + _setter("key_vault_connection_string", key_vault_connection_string) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if service_principal_id is not None: - pulumi.set(__self__, "service_principal_id", service_principal_id) + _setter("service_principal_id", service_principal_id) if service_principal_key is not None: - pulumi.set(__self__, "service_principal_key", service_principal_key) + _setter("service_principal_key", service_principal_key) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if use_managed_identity is not None: - pulumi.set(__self__, "use_managed_identity", use_managed_identity) + _setter("use_managed_identity", use_managed_identity) @property @pulumi.getter(name="dataFactoryId") @@ -278,34 +337,91 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The tenant id or name in which to authenticate against the Azure SQL Database. :param pulumi.Input[bool] use_managed_identity: Whether to use the Data Factory's managed identity to authenticate against the Azure SQL Database. Incompatible with `service_principal_id` and `service_principal_key` """ + _LinkedServiceAzureSqlDatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + key_vault_connection_string=key_vault_connection_string, + key_vault_password=key_vault_password, + name=name, + parameters=parameters, + service_principal_id=service_principal_id, + service_principal_key=service_principal_key, + tenant_id=tenant_id, + use_managed_identity=use_managed_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_connection_string: Optional[pulumi.Input['LinkedServiceAzureSqlDatabaseKeyVaultConnectionStringArgs']] = None, + key_vault_password: Optional[pulumi.Input['LinkedServiceAzureSqlDatabaseKeyVaultPasswordArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + service_principal_id: Optional[pulumi.Input[str]] = None, + service_principal_key: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + use_managed_identity: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_connection_string is None and 'keyVaultConnectionString' in kwargs: + key_vault_connection_string = kwargs['keyVaultConnectionString'] + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + if service_principal_id is None and 'servicePrincipalId' in kwargs: + service_principal_id = kwargs['servicePrincipalId'] + if service_principal_key is None and 'servicePrincipalKey' in kwargs: + service_principal_key = kwargs['servicePrincipalKey'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if use_managed_identity is None and 'useManagedIdentity' in kwargs: + use_managed_identity = kwargs['useManagedIdentity'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_connection_string is not None: - pulumi.set(__self__, "key_vault_connection_string", key_vault_connection_string) + _setter("key_vault_connection_string", key_vault_connection_string) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if service_principal_id is not None: - pulumi.set(__self__, "service_principal_id", service_principal_id) + _setter("service_principal_id", service_principal_id) if service_principal_key is not None: - pulumi.set(__self__, "service_principal_key", service_principal_key) + _setter("service_principal_key", service_principal_key) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if use_managed_identity is not None: - pulumi.set(__self__, "use_managed_identity", use_managed_identity) + _setter("use_managed_identity", use_managed_identity) @property @pulumi.getter(name="additionalProperties") @@ -581,6 +697,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceAzureSqlDatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -617,7 +737,17 @@ def _internal_init(__self__, __props__.__dict__["data_factory_id"] = data_factory_id __props__.__dict__["description"] = description __props__.__dict__["integration_runtime_name"] = integration_runtime_name + if key_vault_connection_string is not None and not isinstance(key_vault_connection_string, LinkedServiceAzureSqlDatabaseKeyVaultConnectionStringArgs): + key_vault_connection_string = key_vault_connection_string or {} + def _setter(key, value): + key_vault_connection_string[key] = value + LinkedServiceAzureSqlDatabaseKeyVaultConnectionStringArgs._configure(_setter, **key_vault_connection_string) __props__.__dict__["key_vault_connection_string"] = key_vault_connection_string + if key_vault_password is not None and not isinstance(key_vault_password, LinkedServiceAzureSqlDatabaseKeyVaultPasswordArgs): + key_vault_password = key_vault_password or {} + def _setter(key, value): + key_vault_password[key] = value + LinkedServiceAzureSqlDatabaseKeyVaultPasswordArgs._configure(_setter, **key_vault_password) __props__.__dict__["key_vault_password"] = key_vault_password __props__.__dict__["name"] = name __props__.__dict__["parameters"] = parameters diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_azure_table_storage.py b/sdk/python/pulumi_azure/datafactory/linked_service_azure_table_storage.py index 44b55164a9..7d00c889b9 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_azure_table_storage.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_azure_table_storage.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedServiceAzureTableStorageArgs', 'LinkedServiceAzureTableStorage'] @@ -35,20 +35,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "data_factory_id", data_factory_id) + LinkedServiceAzureTableStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + data_factory_id=data_factory_id, + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + + _setter("connection_string", connection_string) + _setter("data_factory_id", data_factory_id) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="connectionString") @@ -173,22 +210,55 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ + _LinkedServiceAzureTableStorageState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="additionalProperties") @@ -388,6 +458,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceAzureTableStorageArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_cosmos_db.py b/sdk/python/pulumi_azure/datafactory/linked_service_cosmos_db.py index a4fe0fa7a6..7d7abe6e4e 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_cosmos_db.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_cosmos_db.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedServiceCosmosDbArgs', 'LinkedServiceCosmosDb'] @@ -41,27 +41,72 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) + LinkedServiceCosmosDbArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + account_endpoint=account_endpoint, + account_key=account_key, + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + database=database, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + account_endpoint: Optional[pulumi.Input[str]] = None, + account_key: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + database: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if account_endpoint is None and 'accountEndpoint' in kwargs: + account_endpoint = kwargs['accountEndpoint'] + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + + _setter("data_factory_id", data_factory_id) if account_endpoint is not None: - pulumi.set(__self__, "account_endpoint", account_endpoint) + _setter("account_endpoint", account_endpoint) if account_key is not None: - pulumi.set(__self__, "account_key", account_key) + _setter("account_key", account_key) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if database is not None: - pulumi.set(__self__, "database", database) + _setter("database", database) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="dataFactoryId") @@ -228,28 +273,71 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ + _LinkedServiceCosmosDbState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_endpoint=account_endpoint, + account_key=account_key, + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + data_factory_id=data_factory_id, + database=database, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_endpoint: Optional[pulumi.Input[str]] = None, + account_key: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + database: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_endpoint is None and 'accountEndpoint' in kwargs: + account_endpoint = kwargs['accountEndpoint'] + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if account_endpoint is not None: - pulumi.set(__self__, "account_endpoint", account_endpoint) + _setter("account_endpoint", account_endpoint) if account_key is not None: - pulumi.set(__self__, "account_key", account_key) + _setter("account_key", account_key) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if database is not None: - pulumi.set(__self__, "database", database) + _setter("database", database) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="accountEndpoint") @@ -495,6 +583,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceCosmosDbArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_cosmos_db_mongo_api.py b/sdk/python/pulumi_azure/datafactory/linked_service_cosmos_db_mongo_api.py index cb5ee31fef..f098471af1 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_cosmos_db_mongo_api.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_cosmos_db_mongo_api.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedServiceCosmosDbMongoApiArgs', 'LinkedServiceCosmosDbMongoApi'] @@ -39,25 +39,66 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. :param pulumi.Input[bool] server_version_is32_or_higher: Whether API server version is 3.2 or higher. Defaults to `false`. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) + LinkedServiceCosmosDbMongoApiArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + database=database, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + server_version_is32_or_higher=server_version_is32_or_higher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + database: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + server_version_is32_or_higher: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if server_version_is32_or_higher is None and 'serverVersionIs32OrHigher' in kwargs: + server_version_is32_or_higher = kwargs['serverVersionIs32OrHigher'] + + _setter("data_factory_id", data_factory_id) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if database is not None: - pulumi.set(__self__, "database", database) + _setter("database", database) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if server_version_is32_or_higher is not None: - pulumi.set(__self__, "server_version_is32_or_higher", server_version_is32_or_higher) + _setter("server_version_is32_or_higher", server_version_is32_or_higher) @property @pulumi.getter(name="dataFactoryId") @@ -210,26 +251,65 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. :param pulumi.Input[bool] server_version_is32_or_higher: Whether API server version is 3.2 or higher. Defaults to `false`. """ + _LinkedServiceCosmosDbMongoApiState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + data_factory_id=data_factory_id, + database=database, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + server_version_is32_or_higher=server_version_is32_or_higher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + database: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + server_version_is32_or_higher: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if server_version_is32_or_higher is None and 'serverVersionIs32OrHigher' in kwargs: + server_version_is32_or_higher = kwargs['serverVersionIs32OrHigher'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if database is not None: - pulumi.set(__self__, "database", database) + _setter("database", database) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if server_version_is32_or_higher is not None: - pulumi.set(__self__, "server_version_is32_or_higher", server_version_is32_or_higher) + _setter("server_version_is32_or_higher", server_version_is32_or_higher) @property @pulumi.getter(name="additionalProperties") @@ -459,6 +539,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceCosmosDbMongoApiArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_data_lake_storage_gen2.py b/sdk/python/pulumi_azure/datafactory/linked_service_data_lake_storage_gen2.py index 089084b93a..6c04f84a34 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_data_lake_storage_gen2.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_data_lake_storage_gen2.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedServiceDataLakeStorageGen2Args', 'LinkedServiceDataLakeStorageGen2'] @@ -49,30 +49,83 @@ def __init__(__self__, *, > **NOTE** If `service_principal_id` is used, `service_principal_key` and `tenant` are also required. :param pulumi.Input[bool] use_managed_identity: Whether to use the Data Factory's managed identity to authenticate against the Azure Data Lake Storage Gen2 account. Incompatible with `service_principal_id`, `service_principal_key`, `tenant` and `storage_account_key`. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "url", url) + LinkedServiceDataLakeStorageGen2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + url=url, + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + service_principal_id=service_principal_id, + service_principal_key=service_principal_key, + storage_account_key=storage_account_key, + tenant=tenant, + use_managed_identity=use_managed_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + service_principal_id: Optional[pulumi.Input[str]] = None, + service_principal_key: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + tenant: Optional[pulumi.Input[str]] = None, + use_managed_identity: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if service_principal_id is None and 'servicePrincipalId' in kwargs: + service_principal_id = kwargs['servicePrincipalId'] + if service_principal_key is None and 'servicePrincipalKey' in kwargs: + service_principal_key = kwargs['servicePrincipalKey'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if use_managed_identity is None and 'useManagedIdentity' in kwargs: + use_managed_identity = kwargs['useManagedIdentity'] + + _setter("data_factory_id", data_factory_id) + _setter("url", url) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if service_principal_id is not None: - pulumi.set(__self__, "service_principal_id", service_principal_id) + _setter("service_principal_id", service_principal_id) if service_principal_key is not None: - pulumi.set(__self__, "service_principal_key", service_principal_key) + _setter("service_principal_key", service_principal_key) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) if tenant is not None: - pulumi.set(__self__, "tenant", tenant) + _setter("tenant", tenant) if use_managed_identity is not None: - pulumi.set(__self__, "use_managed_identity", use_managed_identity) + _setter("use_managed_identity", use_managed_identity) @property @pulumi.getter(name="dataFactoryId") @@ -275,32 +328,81 @@ def __init__(__self__, *, > **NOTE** Users should specify only one of the following three authentication strategies: storage account key, managed identity, service principal. :param pulumi.Input[bool] use_managed_identity: Whether to use the Data Factory's managed identity to authenticate against the Azure Data Lake Storage Gen2 account. Incompatible with `service_principal_id`, `service_principal_key`, `tenant` and `storage_account_key`. """ + _LinkedServiceDataLakeStorageGen2State._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + service_principal_id=service_principal_id, + service_principal_key=service_principal_key, + storage_account_key=storage_account_key, + tenant=tenant, + url=url, + use_managed_identity=use_managed_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + service_principal_id: Optional[pulumi.Input[str]] = None, + service_principal_key: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + tenant: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + use_managed_identity: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if service_principal_id is None and 'servicePrincipalId' in kwargs: + service_principal_id = kwargs['servicePrincipalId'] + if service_principal_key is None and 'servicePrincipalKey' in kwargs: + service_principal_key = kwargs['servicePrincipalKey'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if use_managed_identity is None and 'useManagedIdentity' in kwargs: + use_managed_identity = kwargs['useManagedIdentity'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if service_principal_id is not None: - pulumi.set(__self__, "service_principal_id", service_principal_id) + _setter("service_principal_id", service_principal_id) if service_principal_key is not None: - pulumi.set(__self__, "service_principal_key", service_principal_key) + _setter("service_principal_key", service_principal_key) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) if tenant is not None: - pulumi.set(__self__, "tenant", tenant) + _setter("tenant", tenant) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) if use_managed_identity is not None: - pulumi.set(__self__, "use_managed_identity", use_managed_identity) + _setter("use_managed_identity", use_managed_identity) @property @pulumi.getter(name="additionalProperties") @@ -582,6 +684,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceDataLakeStorageGen2Args._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_key_vault.py b/sdk/python/pulumi_azure/datafactory/linked_service_key_vault.py index 13c1a0b64b..845adac6ff 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_key_vault.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_key_vault.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedServiceKeyVaultArgs', 'LinkedServiceKeyVault'] @@ -33,20 +33,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service Key Vault. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service Key Vault. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "key_vault_id", key_vault_id) + LinkedServiceKeyVaultArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + key_vault_id=key_vault_id, + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + + _setter("data_factory_id", data_factory_id) + _setter("key_vault_id", key_vault_id) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="dataFactoryId") @@ -167,22 +204,55 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service Key Vault. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service Key Vault. """ + _LinkedServiceKeyVaultState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + key_vault_id=key_vault_id, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="additionalProperties") @@ -386,6 +456,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceKeyVaultArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_kusto.py b/sdk/python/pulumi_azure/datafactory/linked_service_kusto.py index 57d19e77ef..f014216223 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_kusto.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_kusto.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedServiceKustoArgs', 'LinkedServiceKusto'] @@ -49,29 +49,86 @@ def __init__(__self__, *, > **NOTE** One of Managed Identity authentication and Service Principal authentication must be set. :param pulumi.Input[bool] use_managed_identity: Whether to use the Data Factory's managed identity to authenticate against the Kusto Database. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "kusto_database_name", kusto_database_name) - pulumi.set(__self__, "kusto_endpoint", kusto_endpoint) + LinkedServiceKustoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + kusto_database_name=kusto_database_name, + kusto_endpoint=kusto_endpoint, + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + service_principal_id=service_principal_id, + service_principal_key=service_principal_key, + tenant=tenant, + use_managed_identity=use_managed_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + kusto_database_name: Optional[pulumi.Input[str]] = None, + kusto_endpoint: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + service_principal_id: Optional[pulumi.Input[str]] = None, + service_principal_key: Optional[pulumi.Input[str]] = None, + tenant: Optional[pulumi.Input[str]] = None, + use_managed_identity: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if kusto_database_name is None and 'kustoDatabaseName' in kwargs: + kusto_database_name = kwargs['kustoDatabaseName'] + if kusto_database_name is None: + raise TypeError("Missing 'kusto_database_name' argument") + if kusto_endpoint is None and 'kustoEndpoint' in kwargs: + kusto_endpoint = kwargs['kustoEndpoint'] + if kusto_endpoint is None: + raise TypeError("Missing 'kusto_endpoint' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if service_principal_id is None and 'servicePrincipalId' in kwargs: + service_principal_id = kwargs['servicePrincipalId'] + if service_principal_key is None and 'servicePrincipalKey' in kwargs: + service_principal_key = kwargs['servicePrincipalKey'] + if use_managed_identity is None and 'useManagedIdentity' in kwargs: + use_managed_identity = kwargs['useManagedIdentity'] + + _setter("data_factory_id", data_factory_id) + _setter("kusto_database_name", kusto_database_name) + _setter("kusto_endpoint", kusto_endpoint) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if service_principal_id is not None: - pulumi.set(__self__, "service_principal_id", service_principal_id) + _setter("service_principal_id", service_principal_id) if service_principal_key is not None: - pulumi.set(__self__, "service_principal_key", service_principal_key) + _setter("service_principal_key", service_principal_key) if tenant is not None: - pulumi.set(__self__, "tenant", tenant) + _setter("tenant", tenant) if use_managed_identity is not None: - pulumi.set(__self__, "use_managed_identity", use_managed_identity) + _setter("use_managed_identity", use_managed_identity) @property @pulumi.getter(name="dataFactoryId") @@ -274,32 +331,83 @@ def __init__(__self__, *, > **NOTE** One of Managed Identity authentication and Service Principal authentication must be set. :param pulumi.Input[bool] use_managed_identity: Whether to use the Data Factory's managed identity to authenticate against the Kusto Database. """ + _LinkedServiceKustoState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + kusto_database_name=kusto_database_name, + kusto_endpoint=kusto_endpoint, + name=name, + parameters=parameters, + service_principal_id=service_principal_id, + service_principal_key=service_principal_key, + tenant=tenant, + use_managed_identity=use_managed_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + kusto_database_name: Optional[pulumi.Input[str]] = None, + kusto_endpoint: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + service_principal_id: Optional[pulumi.Input[str]] = None, + service_principal_key: Optional[pulumi.Input[str]] = None, + tenant: Optional[pulumi.Input[str]] = None, + use_managed_identity: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if kusto_database_name is None and 'kustoDatabaseName' in kwargs: + kusto_database_name = kwargs['kustoDatabaseName'] + if kusto_endpoint is None and 'kustoEndpoint' in kwargs: + kusto_endpoint = kwargs['kustoEndpoint'] + if service_principal_id is None and 'servicePrincipalId' in kwargs: + service_principal_id = kwargs['servicePrincipalId'] + if service_principal_key is None and 'servicePrincipalKey' in kwargs: + service_principal_key = kwargs['servicePrincipalKey'] + if use_managed_identity is None and 'useManagedIdentity' in kwargs: + use_managed_identity = kwargs['useManagedIdentity'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if kusto_database_name is not None: - pulumi.set(__self__, "kusto_database_name", kusto_database_name) + _setter("kusto_database_name", kusto_database_name) if kusto_endpoint is not None: - pulumi.set(__self__, "kusto_endpoint", kusto_endpoint) + _setter("kusto_endpoint", kusto_endpoint) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if service_principal_id is not None: - pulumi.set(__self__, "service_principal_id", service_principal_id) + _setter("service_principal_id", service_principal_id) if service_principal_key is not None: - pulumi.set(__self__, "service_principal_key", service_principal_key) + _setter("service_principal_key", service_principal_key) if tenant is not None: - pulumi.set(__self__, "tenant", tenant) + _setter("tenant", tenant) if use_managed_identity is not None: - pulumi.set(__self__, "use_managed_identity", use_managed_identity) + _setter("use_managed_identity", use_managed_identity) @property @pulumi.getter(name="additionalProperties") @@ -621,6 +729,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceKustoArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_mysql.py b/sdk/python/pulumi_azure/datafactory/linked_service_mysql.py index 6db854020e..1337dadfa4 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_mysql.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_mysql.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedServiceMysqlArgs', 'LinkedServiceMysql'] @@ -33,20 +33,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service MySQL. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service MySQL. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "data_factory_id", data_factory_id) + LinkedServiceMysqlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + data_factory_id=data_factory_id, + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + + _setter("connection_string", connection_string) + _setter("data_factory_id", data_factory_id) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="connectionString") @@ -167,22 +204,55 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service MySQL. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service MySQL. """ + _LinkedServiceMysqlState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="additionalProperties") @@ -374,6 +444,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceMysqlArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_odata.py b/sdk/python/pulumi_azure/datafactory/linked_service_odata.py index d053f50c56..ad49f69c27 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_odata.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_odata.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,22 +37,61 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service OData. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service OData. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "url", url) + LinkedServiceOdataArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + url=url, + additional_properties=additional_properties, + annotations=annotations, + basic_authentication=basic_authentication, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + basic_authentication: Optional[pulumi.Input['LinkedServiceOdataBasicAuthenticationArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if basic_authentication is None and 'basicAuthentication' in kwargs: + basic_authentication = kwargs['basicAuthentication'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + + _setter("data_factory_id", data_factory_id) + _setter("url", url) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if basic_authentication is not None: - pulumi.set(__self__, "basic_authentication", basic_authentication) + _setter("basic_authentication", basic_authentication) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="dataFactoryId") @@ -187,24 +226,59 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service OData. :param pulumi.Input[str] url: The URL of the OData service endpoint. """ + _LinkedServiceOdataState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + basic_authentication=basic_authentication, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + basic_authentication: Optional[pulumi.Input['LinkedServiceOdataBasicAuthenticationArgs']] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if basic_authentication is None and 'basicAuthentication' in kwargs: + basic_authentication = kwargs['basicAuthentication'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if basic_authentication is not None: - pulumi.set(__self__, "basic_authentication", basic_authentication) + _setter("basic_authentication", basic_authentication) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="additionalProperties") @@ -428,6 +502,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceOdataArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -453,6 +531,11 @@ def _internal_init(__self__, __props__.__dict__["additional_properties"] = additional_properties __props__.__dict__["annotations"] = annotations + if basic_authentication is not None and not isinstance(basic_authentication, LinkedServiceOdataBasicAuthenticationArgs): + basic_authentication = basic_authentication or {} + def _setter(key, value): + basic_authentication[key] = value + LinkedServiceOdataBasicAuthenticationArgs._configure(_setter, **basic_authentication) __props__.__dict__["basic_authentication"] = basic_authentication if data_factory_id is None and not opts.urn: raise TypeError("Missing required property 'data_factory_id'") diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_odbc.py b/sdk/python/pulumi_azure/datafactory/linked_service_odbc.py index a0da69a375..8fbed15cfc 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_odbc.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_odbc.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,22 +37,63 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service ODBC. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service ODBC. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "data_factory_id", data_factory_id) + LinkedServiceOdbcArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + data_factory_id=data_factory_id, + additional_properties=additional_properties, + annotations=annotations, + basic_authentication=basic_authentication, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + basic_authentication: Optional[pulumi.Input['LinkedServiceOdbcBasicAuthenticationArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if basic_authentication is None and 'basicAuthentication' in kwargs: + basic_authentication = kwargs['basicAuthentication'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + + _setter("connection_string", connection_string) + _setter("data_factory_id", data_factory_id) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if basic_authentication is not None: - pulumi.set(__self__, "basic_authentication", basic_authentication) + _setter("basic_authentication", basic_authentication) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="connectionString") @@ -187,24 +228,61 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service ODBC. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service ODBC. """ + _LinkedServiceOdbcState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + basic_authentication=basic_authentication, + connection_string=connection_string, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + basic_authentication: Optional[pulumi.Input['LinkedServiceOdbcBasicAuthenticationArgs']] = None, + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if basic_authentication is None and 'basicAuthentication' in kwargs: + basic_authentication = kwargs['basicAuthentication'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if basic_authentication is not None: - pulumi.set(__self__, "basic_authentication", basic_authentication) + _setter("basic_authentication", basic_authentication) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="additionalProperties") @@ -428,6 +506,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceOdbcArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -453,6 +535,11 @@ def _internal_init(__self__, __props__.__dict__["additional_properties"] = additional_properties __props__.__dict__["annotations"] = annotations + if basic_authentication is not None and not isinstance(basic_authentication, LinkedServiceOdbcBasicAuthenticationArgs): + basic_authentication = basic_authentication or {} + def _setter(key, value): + basic_authentication[key] = value + LinkedServiceOdbcBasicAuthenticationArgs._configure(_setter, **basic_authentication) __props__.__dict__["basic_authentication"] = basic_authentication if connection_string is None and not opts.urn: raise TypeError("Missing required property 'connection_string'") diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_postgresql.py b/sdk/python/pulumi_azure/datafactory/linked_service_postgresql.py index 99cd969e35..e5f02e0c3c 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_postgresql.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_postgresql.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedServicePostgresqlArgs', 'LinkedServicePostgresql'] @@ -33,20 +33,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service PostgreSQL. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service PostgreSQL. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "data_factory_id", data_factory_id) + LinkedServicePostgresqlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + data_factory_id=data_factory_id, + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + + _setter("connection_string", connection_string) + _setter("data_factory_id", data_factory_id) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="connectionString") @@ -167,22 +204,55 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service PostgreSQL. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service PostgreSQL. """ + _LinkedServicePostgresqlState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="additionalProperties") @@ -374,6 +444,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServicePostgresqlArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_sftp.py b/sdk/python/pulumi_azure/datafactory/linked_service_sftp.py index 0860e364c1..baec41248d 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_sftp.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_sftp.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedServiceSftpArgs', 'LinkedServiceSftp'] @@ -47,28 +47,89 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. :param pulumi.Input[bool] skip_host_key_validation: Whether to validate host key fingerprint while connecting. If set to `false`, `host_key_fingerprint` must also be set. """ - pulumi.set(__self__, "authentication_type", authentication_type) - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "host", host) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "username", username) + LinkedServiceSftpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_type=authentication_type, + data_factory_id=data_factory_id, + host=host, + password=password, + port=port, + username=username, + additional_properties=additional_properties, + annotations=annotations, + description=description, + host_key_fingerprint=host_key_fingerprint, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + skip_host_key_validation=skip_host_key_validation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_type: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + host: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + username: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + host_key_fingerprint: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + skip_host_key_validation: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if authentication_type is None: + raise TypeError("Missing 'authentication_type' argument") + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if host is None: + raise TypeError("Missing 'host' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if host_key_fingerprint is None and 'hostKeyFingerprint' in kwargs: + host_key_fingerprint = kwargs['hostKeyFingerprint'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if skip_host_key_validation is None and 'skipHostKeyValidation' in kwargs: + skip_host_key_validation = kwargs['skipHostKeyValidation'] + + _setter("authentication_type", authentication_type) + _setter("data_factory_id", data_factory_id) + _setter("host", host) + _setter("password", password) + _setter("port", port) + _setter("username", username) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if host_key_fingerprint is not None: - pulumi.set(__self__, "host_key_fingerprint", host_key_fingerprint) + _setter("host_key_fingerprint", host_key_fingerprint) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if skip_host_key_validation is not None: - pulumi.set(__self__, "skip_host_key_validation", skip_host_key_validation) + _setter("skip_host_key_validation", skip_host_key_validation) @property @pulumi.getter(name="authenticationType") @@ -277,34 +338,83 @@ def __init__(__self__, *, :param pulumi.Input[bool] skip_host_key_validation: Whether to validate host key fingerprint while connecting. If set to `false`, `host_key_fingerprint` must also be set. :param pulumi.Input[str] username: The username used to log on to the SFTP server. """ + _LinkedServiceSftpState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + authentication_type=authentication_type, + data_factory_id=data_factory_id, + description=description, + host=host, + host_key_fingerprint=host_key_fingerprint, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + password=password, + port=port, + skip_host_key_validation=skip_host_key_validation, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + authentication_type: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + host: Optional[pulumi.Input[str]] = None, + host_key_fingerprint: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + password: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + skip_host_key_validation: Optional[pulumi.Input[bool]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if host_key_fingerprint is None and 'hostKeyFingerprint' in kwargs: + host_key_fingerprint = kwargs['hostKeyFingerprint'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if skip_host_key_validation is None and 'skipHostKeyValidation' in kwargs: + skip_host_key_validation = kwargs['skipHostKeyValidation'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if host_key_fingerprint is not None: - pulumi.set(__self__, "host_key_fingerprint", host_key_fingerprint) + _setter("host_key_fingerprint", host_key_fingerprint) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if skip_host_key_validation is not None: - pulumi.set(__self__, "skip_host_key_validation", skip_host_key_validation) + _setter("skip_host_key_validation", skip_host_key_validation) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="additionalProperties") @@ -592,6 +702,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceSftpArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_snowflake.py b/sdk/python/pulumi_azure/datafactory/linked_service_snowflake.py index b8227b88c4..7ccb534d1c 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_snowflake.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_snowflake.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,22 +37,63 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "data_factory_id", data_factory_id) + LinkedServiceSnowflakeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + data_factory_id=data_factory_id, + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime_name=integration_runtime_name, + key_vault_password=key_vault_password, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_password: Optional[pulumi.Input['LinkedServiceSnowflakeKeyVaultPasswordArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + + _setter("connection_string", connection_string) + _setter("data_factory_id", data_factory_id) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="connectionString") @@ -187,24 +228,61 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service. """ + _LinkedServiceSnowflakeState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + key_vault_password=key_vault_password, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_password: Optional[pulumi.Input['LinkedServiceSnowflakeKeyVaultPasswordArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="additionalProperties") @@ -464,6 +542,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceSnowflakeArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -497,6 +579,11 @@ def _internal_init(__self__, __props__.__dict__["data_factory_id"] = data_factory_id __props__.__dict__["description"] = description __props__.__dict__["integration_runtime_name"] = integration_runtime_name + if key_vault_password is not None and not isinstance(key_vault_password, LinkedServiceSnowflakeKeyVaultPasswordArgs): + key_vault_password = key_vault_password or {} + def _setter(key, value): + key_vault_password[key] = value + LinkedServiceSnowflakeKeyVaultPasswordArgs._configure(_setter, **key_vault_password) __props__.__dict__["key_vault_password"] = key_vault_password __props__.__dict__["name"] = name __props__.__dict__["parameters"] = parameters diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_sql_server.py b/sdk/python/pulumi_azure/datafactory/linked_service_sql_server.py index 085f6b3687..5fe408b398 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_sql_server.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_sql_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,27 +41,74 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service SQL Server. :param pulumi.Input[str] user_name: The on-premises Windows authentication user name. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) + LinkedServiceSqlServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + description=description, + integration_runtime_name=integration_runtime_name, + key_vault_connection_string=key_vault_connection_string, + key_vault_password=key_vault_password, + name=name, + parameters=parameters, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_connection_string: Optional[pulumi.Input['LinkedServiceSqlServerKeyVaultConnectionStringArgs']] = None, + key_vault_password: Optional[pulumi.Input['LinkedServiceSqlServerKeyVaultPasswordArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + user_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_connection_string is None and 'keyVaultConnectionString' in kwargs: + key_vault_connection_string = kwargs['keyVaultConnectionString'] + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + + _setter("data_factory_id", data_factory_id) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_connection_string is not None: - pulumi.set(__self__, "key_vault_connection_string", key_vault_connection_string) + _setter("key_vault_connection_string", key_vault_connection_string) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if user_name is not None: - pulumi.set(__self__, "user_name", user_name) + _setter("user_name", user_name) @property @pulumi.getter(name="dataFactoryId") @@ -224,28 +271,73 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service SQL Server. :param pulumi.Input[str] user_name: The on-premises Windows authentication user name. """ + _LinkedServiceSqlServerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + key_vault_connection_string=key_vault_connection_string, + key_vault_password=key_vault_password, + name=name, + parameters=parameters, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_connection_string: Optional[pulumi.Input['LinkedServiceSqlServerKeyVaultConnectionStringArgs']] = None, + key_vault_password: Optional[pulumi.Input['LinkedServiceSqlServerKeyVaultPasswordArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + user_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_connection_string is None and 'keyVaultConnectionString' in kwargs: + key_vault_connection_string = kwargs['keyVaultConnectionString'] + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_connection_string is not None: - pulumi.set(__self__, "key_vault_connection_string", key_vault_connection_string) + _setter("key_vault_connection_string", key_vault_connection_string) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if user_name is not None: - pulumi.set(__self__, "user_name", user_name) + _setter("user_name", user_name) @property @pulumi.getter(name="additionalProperties") @@ -533,6 +625,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceSqlServerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -566,7 +662,17 @@ def _internal_init(__self__, __props__.__dict__["data_factory_id"] = data_factory_id __props__.__dict__["description"] = description __props__.__dict__["integration_runtime_name"] = integration_runtime_name + if key_vault_connection_string is not None and not isinstance(key_vault_connection_string, LinkedServiceSqlServerKeyVaultConnectionStringArgs): + key_vault_connection_string = key_vault_connection_string or {} + def _setter(key, value): + key_vault_connection_string[key] = value + LinkedServiceSqlServerKeyVaultConnectionStringArgs._configure(_setter, **key_vault_connection_string) __props__.__dict__["key_vault_connection_string"] = key_vault_connection_string + if key_vault_password is not None and not isinstance(key_vault_password, LinkedServiceSqlServerKeyVaultPasswordArgs): + key_vault_password = key_vault_password or {} + def _setter(key, value): + key_vault_password[key] = value + LinkedServiceSqlServerKeyVaultPasswordArgs._configure(_setter, **key_vault_password) __props__.__dict__["key_vault_password"] = key_vault_password __props__.__dict__["name"] = name __props__.__dict__["parameters"] = parameters diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_synapse.py b/sdk/python/pulumi_azure/datafactory/linked_service_synapse.py index cf63f71284..e59b90bd61 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_synapse.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_synapse.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,22 +39,63 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service Synapse. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service Synapse. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "data_factory_id", data_factory_id) + LinkedServiceSynapseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + data_factory_id=data_factory_id, + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime_name=integration_runtime_name, + key_vault_password=key_vault_password, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_password: Optional[pulumi.Input['LinkedServiceSynapseKeyVaultPasswordArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + + _setter("connection_string", connection_string) + _setter("data_factory_id", data_factory_id) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="connectionString") @@ -193,24 +234,61 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Data Factory Linked Service Synapse. Changing this forces a new resource to be created. Must be unique within a data factory. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Linked Service Synapse. """ + _LinkedServiceSynapseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + connection_string=connection_string, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + key_vault_password=key_vault_password, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + key_vault_password: Optional[pulumi.Input['LinkedServiceSynapseKeyVaultPasswordArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="additionalProperties") @@ -474,6 +552,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceSynapseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -507,6 +589,11 @@ def _internal_init(__self__, __props__.__dict__["data_factory_id"] = data_factory_id __props__.__dict__["description"] = description __props__.__dict__["integration_runtime_name"] = integration_runtime_name + if key_vault_password is not None and not isinstance(key_vault_password, LinkedServiceSynapseKeyVaultPasswordArgs): + key_vault_password = key_vault_password or {} + def _setter(key, value): + key_vault_password[key] = value + LinkedServiceSynapseKeyVaultPasswordArgs._configure(_setter, **key_vault_password) __props__.__dict__["key_vault_password"] = key_vault_password __props__.__dict__["name"] = name __props__.__dict__["parameters"] = parameters diff --git a/sdk/python/pulumi_azure/datafactory/linked_service_web.py b/sdk/python/pulumi_azure/datafactory/linked_service_web.py index e3b614a859..1948240d13 100644 --- a/sdk/python/pulumi_azure/datafactory/linked_service_web.py +++ b/sdk/python/pulumi_azure/datafactory/linked_service_web.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedServiceWebArgs', 'LinkedServiceWeb'] @@ -41,25 +41,70 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password for Basic authentication. Required if `authentication_type` sets to `Basic`. :param pulumi.Input[str] username: The username for Basic authentication. Required if `authentication_type` sets to `Basic`. """ - pulumi.set(__self__, "authentication_type", authentication_type) - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "url", url) + LinkedServiceWebArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_type=authentication_type, + data_factory_id=data_factory_id, + url=url, + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_type: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if authentication_type is None: + raise TypeError("Missing 'authentication_type' argument") + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if url is None: + raise TypeError("Missing 'url' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + + _setter("authentication_type", authentication_type) + _setter("data_factory_id", data_factory_id) + _setter("url", url) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="authenticationType") @@ -226,28 +271,67 @@ def __init__(__self__, *, :param pulumi.Input[str] url: The URL of the web service endpoint (e.g. ). :param pulumi.Input[str] username: The username for Basic authentication. Required if `authentication_type` sets to `Basic`. """ + _LinkedServiceWebState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + authentication_type=authentication_type, + data_factory_id=data_factory_id, + description=description, + integration_runtime_name=integration_runtime_name, + name=name, + parameters=parameters, + password=password, + url=url, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + authentication_type: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + password: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if integration_runtime_name is None and 'integrationRuntimeName' in kwargs: + integration_runtime_name = kwargs['integrationRuntimeName'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime_name is not None: - pulumi.set(__self__, "integration_runtime_name", integration_runtime_name) + _setter("integration_runtime_name", integration_runtime_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="additionalProperties") @@ -487,6 +571,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceWebArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/managed_private_endpoint.py b/sdk/python/pulumi_azure/datafactory/managed_private_endpoint.py index 3848ffa922..e6c69dc6de 100644 --- a/sdk/python/pulumi_azure/datafactory/managed_private_endpoint.py +++ b/sdk/python/pulumi_azure/datafactory/managed_private_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManagedPrivateEndpointArgs', 'ManagedPrivateEndpoint'] @@ -29,14 +29,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created. :param pulumi.Input[str] subresource_name: Specifies the sub resource name which the Data Factory Private Endpoint is able to connect to. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "target_resource_id", target_resource_id) + ManagedPrivateEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + target_resource_id=target_resource_id, + fqdns=fqdns, + name=name, + subresource_name=subresource_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + subresource_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + if subresource_name is None and 'subresourceName' in kwargs: + subresource_name = kwargs['subresourceName'] + + _setter("data_factory_id", data_factory_id) + _setter("target_resource_id", target_resource_id) if fqdns is not None: - pulumi.set(__self__, "fqdns", fqdns) + _setter("fqdns", fqdns) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subresource_name is not None: - pulumi.set(__self__, "subresource_name", subresource_name) + _setter("subresource_name", subresource_name) @property @pulumi.getter(name="dataFactoryId") @@ -119,16 +148,41 @@ def __init__(__self__, *, :param pulumi.Input[str] subresource_name: Specifies the sub resource name which the Data Factory Private Endpoint is able to connect to. Changing this forces a new resource to be created. :param pulumi.Input[str] target_resource_id: The ID of the Private Link Enabled Remote Resource which this Data Factory Private Endpoint should be connected to. Changing this forces a new resource to be created. """ + _ManagedPrivateEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + fqdns=fqdns, + name=name, + subresource_name=subresource_name, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + subresource_name: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if subresource_name is None and 'subresourceName' in kwargs: + subresource_name = kwargs['subresourceName'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if fqdns is not None: - pulumi.set(__self__, "fqdns", fqdns) + _setter("fqdns", fqdns) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subresource_name is not None: - pulumi.set(__self__, "subresource_name", subresource_name) + _setter("subresource_name", subresource_name) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter(name="dataFactoryId") @@ -298,6 +352,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedPrivateEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/outputs.py b/sdk/python/pulumi_azure/datafactory/outputs.py index 3048e7fca9..fa28c9c612 100644 --- a/sdk/python/pulumi_azure/datafactory/outputs.py +++ b/sdk/python/pulumi_azure/datafactory/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -124,9 +124,24 @@ def __init__(__self__, *, :param str name: The name of the Data Factory Linked Service. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + CustomDatasetLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -185,19 +200,50 @@ def __init__(__self__, *, :param 'DataFlowSinkRejectedLinkedServiceArgs' rejected_linked_service: A `rejected_linked_service` block as defined below. :param 'DataFlowSinkSchemaLinkedServiceArgs' schema_linked_service: A `schema_linked_service` block as defined below. """ - pulumi.set(__self__, "name", name) + DataFlowSink._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset=dataset, + description=description, + flowlet=flowlet, + linked_service=linked_service, + rejected_linked_service=rejected_linked_service, + schema_linked_service=schema_linked_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + dataset: Optional['outputs.DataFlowSinkDataset'] = None, + description: Optional[str] = None, + flowlet: Optional['outputs.DataFlowSinkFlowlet'] = None, + linked_service: Optional['outputs.DataFlowSinkLinkedService'] = None, + rejected_linked_service: Optional['outputs.DataFlowSinkRejectedLinkedService'] = None, + schema_linked_service: Optional['outputs.DataFlowSinkSchemaLinkedService'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + if rejected_linked_service is None and 'rejectedLinkedService' in kwargs: + rejected_linked_service = kwargs['rejectedLinkedService'] + if schema_linked_service is None and 'schemaLinkedService' in kwargs: + schema_linked_service = kwargs['schemaLinkedService'] + + _setter("name", name) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if flowlet is not None: - pulumi.set(__self__, "flowlet", flowlet) + _setter("flowlet", flowlet) if linked_service is not None: - pulumi.set(__self__, "linked_service", linked_service) + _setter("linked_service", linked_service) if rejected_linked_service is not None: - pulumi.set(__self__, "rejected_linked_service", rejected_linked_service) + _setter("rejected_linked_service", rejected_linked_service) if schema_linked_service is not None: - pulumi.set(__self__, "schema_linked_service", schema_linked_service) + _setter("schema_linked_service", schema_linked_service) @property @pulumi.getter @@ -265,9 +311,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Dataset. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory dataset. """ - pulumi.set(__self__, "name", name) + DataFlowSinkDataset._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -314,11 +375,30 @@ def __init__(__self__, *, :param str dataset_parameters: Specifies the reference data flow parameters from dataset. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Flowlet. """ - pulumi.set(__self__, "name", name) + DataFlowSinkFlowlet._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset_parameters=dataset_parameters, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + dataset_parameters: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if dataset_parameters is None and 'datasetParameters' in kwargs: + dataset_parameters = kwargs['datasetParameters'] + + _setter("name", name) if dataset_parameters is not None: - pulumi.set(__self__, "dataset_parameters", dataset_parameters) + _setter("dataset_parameters", dataset_parameters) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -354,9 +434,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowSinkLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -384,9 +479,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service with schema. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowSinkRejectedLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -414,9 +524,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service with schema. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowSinkSchemaLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -475,19 +600,50 @@ def __init__(__self__, *, :param 'DataFlowSourceRejectedLinkedServiceArgs' rejected_linked_service: A `rejected_linked_service` block as defined below. :param 'DataFlowSourceSchemaLinkedServiceArgs' schema_linked_service: A `schema_linked_service` block as defined below. """ - pulumi.set(__self__, "name", name) + DataFlowSource._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset=dataset, + description=description, + flowlet=flowlet, + linked_service=linked_service, + rejected_linked_service=rejected_linked_service, + schema_linked_service=schema_linked_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + dataset: Optional['outputs.DataFlowSourceDataset'] = None, + description: Optional[str] = None, + flowlet: Optional['outputs.DataFlowSourceFlowlet'] = None, + linked_service: Optional['outputs.DataFlowSourceLinkedService'] = None, + rejected_linked_service: Optional['outputs.DataFlowSourceRejectedLinkedService'] = None, + schema_linked_service: Optional['outputs.DataFlowSourceSchemaLinkedService'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + if rejected_linked_service is None and 'rejectedLinkedService' in kwargs: + rejected_linked_service = kwargs['rejectedLinkedService'] + if schema_linked_service is None and 'schemaLinkedService' in kwargs: + schema_linked_service = kwargs['schemaLinkedService'] + + _setter("name", name) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if flowlet is not None: - pulumi.set(__self__, "flowlet", flowlet) + _setter("flowlet", flowlet) if linked_service is not None: - pulumi.set(__self__, "linked_service", linked_service) + _setter("linked_service", linked_service) if rejected_linked_service is not None: - pulumi.set(__self__, "rejected_linked_service", rejected_linked_service) + _setter("rejected_linked_service", rejected_linked_service) if schema_linked_service is not None: - pulumi.set(__self__, "schema_linked_service", schema_linked_service) + _setter("schema_linked_service", schema_linked_service) @property @pulumi.getter @@ -555,9 +711,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Dataset. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory dataset. """ - pulumi.set(__self__, "name", name) + DataFlowSourceDataset._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -604,11 +775,30 @@ def __init__(__self__, *, :param str dataset_parameters: Specifies the reference data flow parameters from dataset. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Flowlet. """ - pulumi.set(__self__, "name", name) + DataFlowSourceFlowlet._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset_parameters=dataset_parameters, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + dataset_parameters: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if dataset_parameters is None and 'datasetParameters' in kwargs: + dataset_parameters = kwargs['datasetParameters'] + + _setter("name", name) if dataset_parameters is not None: - pulumi.set(__self__, "dataset_parameters", dataset_parameters) + _setter("dataset_parameters", dataset_parameters) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -644,9 +834,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowSourceLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -674,9 +879,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service with schema. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowSourceRejectedLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -704,9 +924,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service with schema. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowSourceSchemaLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -757,15 +992,38 @@ def __init__(__self__, *, :param 'DataFlowTransformationFlowletArgs' flowlet: A `flowlet` block as defined below. :param 'DataFlowTransformationLinkedServiceArgs' linked_service: A `linked_service` block as defined below. """ - pulumi.set(__self__, "name", name) + DataFlowTransformation._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset=dataset, + description=description, + flowlet=flowlet, + linked_service=linked_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + dataset: Optional['outputs.DataFlowTransformationDataset'] = None, + description: Optional[str] = None, + flowlet: Optional['outputs.DataFlowTransformationFlowlet'] = None, + linked_service: Optional['outputs.DataFlowTransformationLinkedService'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + + _setter("name", name) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if flowlet is not None: - pulumi.set(__self__, "flowlet", flowlet) + _setter("flowlet", flowlet) if linked_service is not None: - pulumi.set(__self__, "linked_service", linked_service) + _setter("linked_service", linked_service) @property @pulumi.getter @@ -817,9 +1075,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Dataset. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory dataset. """ - pulumi.set(__self__, "name", name) + DataFlowTransformationDataset._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -866,11 +1139,30 @@ def __init__(__self__, *, :param str dataset_parameters: Specifies the reference data flow parameters from dataset. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Flowlet. """ - pulumi.set(__self__, "name", name) + DataFlowTransformationFlowlet._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset_parameters=dataset_parameters, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + dataset_parameters: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if dataset_parameters is None and 'datasetParameters' in kwargs: + dataset_parameters = kwargs['datasetParameters'] + + _setter("name", name) if dataset_parameters is not None: - pulumi.set(__self__, "dataset_parameters", dataset_parameters) + _setter("dataset_parameters", dataset_parameters) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -906,9 +1198,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + DataFlowTransformationLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -938,11 +1245,28 @@ def __init__(__self__, *, :param str description: The description of the column. :param str type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetAzureBlobSchemaColumn._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -980,11 +1304,28 @@ def __init__(__self__, *, :param str description: The description of the column. :param str type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetAzureSqlTableSchemaColumn._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -1049,17 +1390,46 @@ def __init__(__self__, *, :param str filename: The filename of the file in the blob container. :param str path: The folder path to the file in the blob container. """ - pulumi.set(__self__, "container", container) + DatasetBinaryAzureBlobStorageLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + container=container, + dynamic_container_enabled=dynamic_container_enabled, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + filename=filename, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container: Optional[str] = None, + dynamic_container_enabled: Optional[bool] = None, + dynamic_filename_enabled: Optional[bool] = None, + dynamic_path_enabled: Optional[bool] = None, + filename: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container is None: + raise TypeError("Missing 'container' argument") + if dynamic_container_enabled is None and 'dynamicContainerEnabled' in kwargs: + dynamic_container_enabled = kwargs['dynamicContainerEnabled'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("container", container) if dynamic_container_enabled is not None: - pulumi.set(__self__, "dynamic_container_enabled", dynamic_container_enabled) + _setter("dynamic_container_enabled", dynamic_container_enabled) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if filename is not None: - pulumi.set(__self__, "filename", filename) + _setter("filename", filename) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -1119,9 +1489,24 @@ def __init__(__self__, *, :param str type: The type of compression used during transport. Possible values are `BZip2`, `Deflate`, `GZip`, `Tar`, `TarGZip` and `ZipDeflate`. :param str level: The level of compression. Possible values are `Fastest` and `Optimal`. """ - pulumi.set(__self__, "type", type) + DatasetBinaryCompression._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + level=level, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + level: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("type", type) if level is not None: - pulumi.set(__self__, "level", level) + _setter("level", level) @property @pulumi.getter @@ -1176,13 +1561,44 @@ def __init__(__self__, *, :param bool dynamic_filename_enabled: Is the `filename` using dynamic expression, function or system variables? Defaults to `false`. :param bool dynamic_path_enabled: Is the `path` using dynamic expression, function or system variables? Defaults to `false`. """ - pulumi.set(__self__, "filename", filename) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "relative_url", relative_url) + DatasetBinaryHttpServerLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename=filename, + path=path, + relative_url=relative_url, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename: Optional[str] = None, + path: Optional[str] = None, + relative_url: Optional[str] = None, + dynamic_filename_enabled: Optional[bool] = None, + dynamic_path_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename is None: + raise TypeError("Missing 'filename' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if relative_url is None and 'relativeUrl' in kwargs: + relative_url = kwargs['relativeUrl'] + if relative_url is None: + raise TypeError("Missing 'relative_url' argument") + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("filename", filename) + _setter("path", path) + _setter("relative_url", relative_url) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) @property @pulumi.getter @@ -1257,12 +1673,37 @@ def __init__(__self__, *, :param bool dynamic_filename_enabled: Is the `filename` using dynamic expression, function or system variables? Defaults to `false`. :param bool dynamic_path_enabled: Is the `path` using dynamic expression, function or system variables? Defaults to `false`. """ - pulumi.set(__self__, "filename", filename) - pulumi.set(__self__, "path", path) + DatasetBinarySftpServerLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename=filename, + path=path, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename: Optional[str] = None, + path: Optional[str] = None, + dynamic_filename_enabled: Optional[bool] = None, + dynamic_path_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename is None: + raise TypeError("Missing 'filename' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("filename", filename) + _setter("path", path) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) @property @pulumi.getter @@ -1308,11 +1749,28 @@ def __init__(__self__, *, :param str description: The description of the column. :param str type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetCosmosDBApiSchemaColumn._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -1379,18 +1837,47 @@ def __init__(__self__, *, :param str filename: The filename of the file. :param str path: The folder path to the file. """ + DatasetDelimitedTextAzureBlobFsLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + dynamic_file_system_enabled=dynamic_file_system_enabled, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + file_system=file_system, + filename=filename, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dynamic_file_system_enabled: Optional[bool] = None, + dynamic_filename_enabled: Optional[bool] = None, + dynamic_path_enabled: Optional[bool] = None, + file_system: Optional[str] = None, + filename: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dynamic_file_system_enabled is None and 'dynamicFileSystemEnabled' in kwargs: + dynamic_file_system_enabled = kwargs['dynamicFileSystemEnabled'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if dynamic_file_system_enabled is not None: - pulumi.set(__self__, "dynamic_file_system_enabled", dynamic_file_system_enabled) + _setter("dynamic_file_system_enabled", dynamic_file_system_enabled) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) if filename is not None: - pulumi.set(__self__, "filename", filename) + _setter("filename", filename) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter(name="dynamicFileSystemEnabled") @@ -1479,17 +1966,46 @@ def __init__(__self__, *, :param str filename: The filename of the file. :param str path: The folder path to the file. This can be an empty string. """ - pulumi.set(__self__, "container", container) + DatasetDelimitedTextAzureBlobStorageLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + container=container, + dynamic_container_enabled=dynamic_container_enabled, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + filename=filename, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container: Optional[str] = None, + dynamic_container_enabled: Optional[bool] = None, + dynamic_filename_enabled: Optional[bool] = None, + dynamic_path_enabled: Optional[bool] = None, + filename: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container is None: + raise TypeError("Missing 'container' argument") + if dynamic_container_enabled is None and 'dynamicContainerEnabled' in kwargs: + dynamic_container_enabled = kwargs['dynamicContainerEnabled'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("container", container) if dynamic_container_enabled is not None: - pulumi.set(__self__, "dynamic_container_enabled", dynamic_container_enabled) + _setter("dynamic_container_enabled", dynamic_container_enabled) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if filename is not None: - pulumi.set(__self__, "filename", filename) + _setter("filename", filename) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -1576,13 +2092,44 @@ def __init__(__self__, *, :param bool dynamic_filename_enabled: Is the `filename` using dynamic expression, function or system variables? Defaults to `false`. :param bool dynamic_path_enabled: Is the `path` using dynamic expression, function or system variables? Defaults to `false`. """ - pulumi.set(__self__, "filename", filename) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "relative_url", relative_url) + DatasetDelimitedTextHttpServerLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename=filename, + path=path, + relative_url=relative_url, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename: Optional[str] = None, + path: Optional[str] = None, + relative_url: Optional[str] = None, + dynamic_filename_enabled: Optional[bool] = None, + dynamic_path_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename is None: + raise TypeError("Missing 'filename' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if relative_url is None and 'relativeUrl' in kwargs: + relative_url = kwargs['relativeUrl'] + if relative_url is None: + raise TypeError("Missing 'relative_url' argument") + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("filename", filename) + _setter("path", path) + _setter("relative_url", relative_url) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) @property @pulumi.getter @@ -1636,11 +2183,28 @@ def __init__(__self__, *, :param str description: The description of the column. :param str type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetDelimitedTextSchemaColumn._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -1678,11 +2242,28 @@ def __init__(__self__, *, :param str description: The description of the column. :param str type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetHttpSchemaColumn._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -1747,15 +2328,48 @@ def __init__(__self__, *, :param bool dynamic_filename_enabled: Is the `filename` using dynamic expression, function or system variables? Defaults to `false`. :param bool dynamic_path_enabled: Is the `path` using dynamic expression, function or system variables? Defaults to `false`. """ - pulumi.set(__self__, "container", container) - pulumi.set(__self__, "filename", filename) - pulumi.set(__self__, "path", path) + DatasetJsonAzureBlobStorageLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + container=container, + filename=filename, + path=path, + dynamic_container_enabled=dynamic_container_enabled, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container: Optional[str] = None, + filename: Optional[str] = None, + path: Optional[str] = None, + dynamic_container_enabled: Optional[bool] = None, + dynamic_filename_enabled: Optional[bool] = None, + dynamic_path_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container is None: + raise TypeError("Missing 'container' argument") + if filename is None: + raise TypeError("Missing 'filename' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if dynamic_container_enabled is None and 'dynamicContainerEnabled' in kwargs: + dynamic_container_enabled = kwargs['dynamicContainerEnabled'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("container", container) + _setter("filename", filename) + _setter("path", path) if dynamic_container_enabled is not None: - pulumi.set(__self__, "dynamic_container_enabled", dynamic_container_enabled) + _setter("dynamic_container_enabled", dynamic_container_enabled) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) @property @pulumi.getter @@ -1842,13 +2456,44 @@ def __init__(__self__, *, :param bool dynamic_filename_enabled: Is the `filename` using dynamic expression, function or system variables? Defaults to `false`. :param bool dynamic_path_enabled: Is the `path` using dynamic expression, function or system variables? Defaults to `false`. """ - pulumi.set(__self__, "filename", filename) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "relative_url", relative_url) + DatasetJsonHttpServerLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename=filename, + path=path, + relative_url=relative_url, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename: Optional[str] = None, + path: Optional[str] = None, + relative_url: Optional[str] = None, + dynamic_filename_enabled: Optional[bool] = None, + dynamic_path_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename is None: + raise TypeError("Missing 'filename' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if relative_url is None and 'relativeUrl' in kwargs: + relative_url = kwargs['relativeUrl'] + if relative_url is None: + raise TypeError("Missing 'relative_url' argument") + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("filename", filename) + _setter("path", path) + _setter("relative_url", relative_url) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) @property @pulumi.getter @@ -1902,11 +2547,28 @@ def __init__(__self__, *, :param str description: The description of the column. :param str type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetJsonSchemaColumn._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -1944,11 +2606,28 @@ def __init__(__self__, *, :param str description: The description of the column. :param str type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetMysqlSchemaColumn._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -2015,18 +2694,47 @@ def __init__(__self__, *, :param str filename: The filename of the file on the Azure Data Lake Storage Account. :param str path: The folder path to the file on the Azure Data Lake Storage Account. """ + DatasetParquetAzureBlobFsLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + dynamic_file_system_enabled=dynamic_file_system_enabled, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + file_system=file_system, + filename=filename, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dynamic_file_system_enabled: Optional[bool] = None, + dynamic_filename_enabled: Optional[bool] = None, + dynamic_path_enabled: Optional[bool] = None, + file_system: Optional[str] = None, + filename: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dynamic_file_system_enabled is None and 'dynamicFileSystemEnabled' in kwargs: + dynamic_file_system_enabled = kwargs['dynamicFileSystemEnabled'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + if file_system is None and 'fileSystem' in kwargs: + file_system = kwargs['fileSystem'] + if dynamic_file_system_enabled is not None: - pulumi.set(__self__, "dynamic_file_system_enabled", dynamic_file_system_enabled) + _setter("dynamic_file_system_enabled", dynamic_file_system_enabled) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if file_system is not None: - pulumi.set(__self__, "file_system", file_system) + _setter("file_system", file_system) if filename is not None: - pulumi.set(__self__, "filename", filename) + _setter("filename", filename) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter(name="dynamicFileSystemEnabled") @@ -2115,17 +2823,46 @@ def __init__(__self__, *, :param str filename: The filename of the file on the Azure Blob Storage Account. :param str path: The folder path to the file on the Azure Blob Storage Account. """ - pulumi.set(__self__, "container", container) + DatasetParquetAzureBlobStorageLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + container=container, + dynamic_container_enabled=dynamic_container_enabled, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + filename=filename, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container: Optional[str] = None, + dynamic_container_enabled: Optional[bool] = None, + dynamic_filename_enabled: Optional[bool] = None, + dynamic_path_enabled: Optional[bool] = None, + filename: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container is None: + raise TypeError("Missing 'container' argument") + if dynamic_container_enabled is None and 'dynamicContainerEnabled' in kwargs: + dynamic_container_enabled = kwargs['dynamicContainerEnabled'] + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("container", container) if dynamic_container_enabled is not None: - pulumi.set(__self__, "dynamic_container_enabled", dynamic_container_enabled) + _setter("dynamic_container_enabled", dynamic_container_enabled) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if filename is not None: - pulumi.set(__self__, "filename", filename) + _setter("filename", filename) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -2212,14 +2949,43 @@ def __init__(__self__, *, :param bool dynamic_path_enabled: Is the `path` using dynamic expression, function or system variables? Defaults to `false`. :param str path: The folder path to the file on the web server. """ - pulumi.set(__self__, "filename", filename) - pulumi.set(__self__, "relative_url", relative_url) + DatasetParquetHttpServerLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename=filename, + relative_url=relative_url, + dynamic_filename_enabled=dynamic_filename_enabled, + dynamic_path_enabled=dynamic_path_enabled, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename: Optional[str] = None, + relative_url: Optional[str] = None, + dynamic_filename_enabled: Optional[bool] = None, + dynamic_path_enabled: Optional[bool] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename is None: + raise TypeError("Missing 'filename' argument") + if relative_url is None and 'relativeUrl' in kwargs: + relative_url = kwargs['relativeUrl'] + if relative_url is None: + raise TypeError("Missing 'relative_url' argument") + if dynamic_filename_enabled is None and 'dynamicFilenameEnabled' in kwargs: + dynamic_filename_enabled = kwargs['dynamicFilenameEnabled'] + if dynamic_path_enabled is None and 'dynamicPathEnabled' in kwargs: + dynamic_path_enabled = kwargs['dynamicPathEnabled'] + + _setter("filename", filename) + _setter("relative_url", relative_url) if dynamic_filename_enabled is not None: - pulumi.set(__self__, "dynamic_filename_enabled", dynamic_filename_enabled) + _setter("dynamic_filename_enabled", dynamic_filename_enabled) if dynamic_path_enabled is not None: - pulumi.set(__self__, "dynamic_path_enabled", dynamic_path_enabled) + _setter("dynamic_path_enabled", dynamic_path_enabled) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter @@ -2273,11 +3039,28 @@ def __init__(__self__, *, :param str description: The description of the column. :param str type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetParquetSchemaColumn._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -2315,11 +3098,28 @@ def __init__(__self__, *, :param str description: The description of the column. :param str type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetPostgresqlSchemaColumn._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -2359,13 +3159,32 @@ def __init__(__self__, *, :param int scale: The number of digits allowed to the right of the decimal point. :param str type: Type of the column. Valid values are `NUMBER`, `DECIMAL`, `NUMERIC`, `INT`, `INTEGER`, `BIGINT`, `SMALLINT`, `FLOAT``FLOAT4`, `FLOAT8`, `DOUBLE`, `DOUBLE PRECISION`, `REAL`, `VARCHAR`, `CHAR`, `CHARACTER`, `STRING`, `TEXT`, `BINARY`, `VARBINARY`, `BOOLEAN`, `DATE`, `DATETIME`, `TIME`, `TIMESTAMP`, `TIMESTAMP_LTZ`, `TIMESTAMP_NTZ`, `TIMESTAMP_TZ`, `VARIANT`, `OBJECT`, `ARRAY`, `GEOGRAPHY`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetSnowflakeSchemaColumn._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + precision=precision, + scale=scale, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + precision: Optional[int] = None, + scale: Optional[int] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if precision is not None: - pulumi.set(__self__, "precision", precision) + _setter("precision", precision) if scale is not None: - pulumi.set(__self__, "scale", scale) + _setter("scale", scale) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -2411,11 +3230,28 @@ def __init__(__self__, *, :param str description: The description of the column. :param str type: Type of the column. Valid values are `Byte`, `Byte[]`, `Boolean`, `Date`, `DateTime`,`DateTimeOffset`, `Decimal`, `Double`, `Guid`, `Int16`, `Int32`, `Int64`, `Single`, `String`, `TimeSpan`. Please note these values are case sensitive. """ - pulumi.set(__self__, "name", name) + DatasetSqlServerTableSchemaColumn._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -2488,13 +3324,56 @@ def __init__(__self__, *, > **Note:** You must log in to the Data Factory management UI to complete the authentication to the GitHub repository. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "branch_name", branch_name) - pulumi.set(__self__, "git_url", git_url) - pulumi.set(__self__, "repository_name", repository_name) - pulumi.set(__self__, "root_folder", root_folder) + FactoryGithubConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + branch_name=branch_name, + git_url=git_url, + repository_name=repository_name, + root_folder=root_folder, + publishing_enabled=publishing_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[str] = None, + branch_name: Optional[str] = None, + git_url: Optional[str] = None, + repository_name: Optional[str] = None, + root_folder: Optional[str] = None, + publishing_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if branch_name is None and 'branchName' in kwargs: + branch_name = kwargs['branchName'] + if branch_name is None: + raise TypeError("Missing 'branch_name' argument") + if git_url is None and 'gitUrl' in kwargs: + git_url = kwargs['gitUrl'] + if git_url is None: + raise TypeError("Missing 'git_url' argument") + if repository_name is None and 'repositoryName' in kwargs: + repository_name = kwargs['repositoryName'] + if repository_name is None: + raise TypeError("Missing 'repository_name' argument") + if root_folder is None and 'rootFolder' in kwargs: + root_folder = kwargs['rootFolder'] + if root_folder is None: + raise TypeError("Missing 'root_folder' argument") + if publishing_enabled is None and 'publishingEnabled' in kwargs: + publishing_enabled = kwargs['publishingEnabled'] + + _setter("account_name", account_name) + _setter("branch_name", branch_name) + _setter("git_url", git_url) + _setter("repository_name", repository_name) + _setter("root_folder", root_folder) if publishing_enabled is not None: - pulumi.set(__self__, "publishing_enabled", publishing_enabled) + _setter("publishing_enabled", publishing_enabled) @property @pulumi.getter(name="accountName") @@ -2560,9 +3439,30 @@ def __init__(__self__, *, > **Note:** For type `Array` and `Object` it is recommended to use `jsonencode()` for the value """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + FactoryGlobalParameter._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -2627,13 +3527,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: Specifies the Tenant ID associated with the VSTS account. """ - pulumi.set(__self__, "type", type) + FactoryIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -2718,14 +3643,63 @@ def __init__(__self__, *, :param str tenant_id: Specifies the Tenant ID associated with the VSTS account. :param bool publishing_enabled: Is automated publishing enabled? Defaults to `false`. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "branch_name", branch_name) - pulumi.set(__self__, "project_name", project_name) - pulumi.set(__self__, "repository_name", repository_name) - pulumi.set(__self__, "root_folder", root_folder) - pulumi.set(__self__, "tenant_id", tenant_id) + FactoryVstsConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + branch_name=branch_name, + project_name=project_name, + repository_name=repository_name, + root_folder=root_folder, + tenant_id=tenant_id, + publishing_enabled=publishing_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[str] = None, + branch_name: Optional[str] = None, + project_name: Optional[str] = None, + repository_name: Optional[str] = None, + root_folder: Optional[str] = None, + tenant_id: Optional[str] = None, + publishing_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if branch_name is None and 'branchName' in kwargs: + branch_name = kwargs['branchName'] + if branch_name is None: + raise TypeError("Missing 'branch_name' argument") + if project_name is None and 'projectName' in kwargs: + project_name = kwargs['projectName'] + if project_name is None: + raise TypeError("Missing 'project_name' argument") + if repository_name is None and 'repositoryName' in kwargs: + repository_name = kwargs['repositoryName'] + if repository_name is None: + raise TypeError("Missing 'repository_name' argument") + if root_folder is None and 'rootFolder' in kwargs: + root_folder = kwargs['rootFolder'] + if root_folder is None: + raise TypeError("Missing 'root_folder' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if publishing_enabled is None and 'publishingEnabled' in kwargs: + publishing_enabled = kwargs['publishingEnabled'] + + _setter("account_name", account_name) + _setter("branch_name", branch_name) + _setter("project_name", project_name) + _setter("repository_name", repository_name) + _setter("root_folder", root_folder) + _setter("tenant_id", tenant_id) if publishing_enabled is not None: - pulumi.set(__self__, "publishing_enabled", publishing_enabled) + _setter("publishing_enabled", publishing_enabled) @property @pulumi.getter(name="accountName") @@ -2824,19 +3798,50 @@ def __init__(__self__, *, :param 'FlowletDataFlowSinkRejectedLinkedServiceArgs' rejected_linked_service: A `rejected_linked_service` block as defined below. :param 'FlowletDataFlowSinkSchemaLinkedServiceArgs' schema_linked_service: A `schema_linked_service` block as defined below. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSink._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset=dataset, + description=description, + flowlet=flowlet, + linked_service=linked_service, + rejected_linked_service=rejected_linked_service, + schema_linked_service=schema_linked_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + dataset: Optional['outputs.FlowletDataFlowSinkDataset'] = None, + description: Optional[str] = None, + flowlet: Optional['outputs.FlowletDataFlowSinkFlowlet'] = None, + linked_service: Optional['outputs.FlowletDataFlowSinkLinkedService'] = None, + rejected_linked_service: Optional['outputs.FlowletDataFlowSinkRejectedLinkedService'] = None, + schema_linked_service: Optional['outputs.FlowletDataFlowSinkSchemaLinkedService'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + if rejected_linked_service is None and 'rejectedLinkedService' in kwargs: + rejected_linked_service = kwargs['rejectedLinkedService'] + if schema_linked_service is None and 'schemaLinkedService' in kwargs: + schema_linked_service = kwargs['schemaLinkedService'] + + _setter("name", name) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if flowlet is not None: - pulumi.set(__self__, "flowlet", flowlet) + _setter("flowlet", flowlet) if linked_service is not None: - pulumi.set(__self__, "linked_service", linked_service) + _setter("linked_service", linked_service) if rejected_linked_service is not None: - pulumi.set(__self__, "rejected_linked_service", rejected_linked_service) + _setter("rejected_linked_service", rejected_linked_service) if schema_linked_service is not None: - pulumi.set(__self__, "schema_linked_service", schema_linked_service) + _setter("schema_linked_service", schema_linked_service) @property @pulumi.getter @@ -2904,9 +3909,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Dataset. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory dataset. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSinkDataset._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -2953,11 +3973,30 @@ def __init__(__self__, *, :param str dataset_parameters: Specifies the reference data flow parameters from dataset. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Flowlet. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSinkFlowlet._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset_parameters=dataset_parameters, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + dataset_parameters: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if dataset_parameters is None and 'datasetParameters' in kwargs: + dataset_parameters = kwargs['datasetParameters'] + + _setter("name", name) if dataset_parameters is not None: - pulumi.set(__self__, "dataset_parameters", dataset_parameters) + _setter("dataset_parameters", dataset_parameters) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -2993,9 +4032,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSinkLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3023,9 +4077,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service with schema. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSinkRejectedLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3053,9 +4122,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service with schema. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSinkSchemaLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3114,19 +4198,50 @@ def __init__(__self__, *, :param 'FlowletDataFlowSourceRejectedLinkedServiceArgs' rejected_linked_service: A `rejected_linked_service` block as defined below. :param 'FlowletDataFlowSourceSchemaLinkedServiceArgs' schema_linked_service: A `schema_linked_service` block as defined below. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSource._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset=dataset, + description=description, + flowlet=flowlet, + linked_service=linked_service, + rejected_linked_service=rejected_linked_service, + schema_linked_service=schema_linked_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + dataset: Optional['outputs.FlowletDataFlowSourceDataset'] = None, + description: Optional[str] = None, + flowlet: Optional['outputs.FlowletDataFlowSourceFlowlet'] = None, + linked_service: Optional['outputs.FlowletDataFlowSourceLinkedService'] = None, + rejected_linked_service: Optional['outputs.FlowletDataFlowSourceRejectedLinkedService'] = None, + schema_linked_service: Optional['outputs.FlowletDataFlowSourceSchemaLinkedService'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + if rejected_linked_service is None and 'rejectedLinkedService' in kwargs: + rejected_linked_service = kwargs['rejectedLinkedService'] + if schema_linked_service is None and 'schemaLinkedService' in kwargs: + schema_linked_service = kwargs['schemaLinkedService'] + + _setter("name", name) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if flowlet is not None: - pulumi.set(__self__, "flowlet", flowlet) + _setter("flowlet", flowlet) if linked_service is not None: - pulumi.set(__self__, "linked_service", linked_service) + _setter("linked_service", linked_service) if rejected_linked_service is not None: - pulumi.set(__self__, "rejected_linked_service", rejected_linked_service) + _setter("rejected_linked_service", rejected_linked_service) if schema_linked_service is not None: - pulumi.set(__self__, "schema_linked_service", schema_linked_service) + _setter("schema_linked_service", schema_linked_service) @property @pulumi.getter @@ -3194,9 +4309,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Dataset. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory dataset. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSourceDataset._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3243,11 +4373,30 @@ def __init__(__self__, *, :param str dataset_parameters: Specifies the reference data flow parameters from dataset. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Flowlet. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSourceFlowlet._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset_parameters=dataset_parameters, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + dataset_parameters: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if dataset_parameters is None and 'datasetParameters' in kwargs: + dataset_parameters = kwargs['datasetParameters'] + + _setter("name", name) if dataset_parameters is not None: - pulumi.set(__self__, "dataset_parameters", dataset_parameters) + _setter("dataset_parameters", dataset_parameters) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3283,9 +4432,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSourceLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3313,9 +4477,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service with schema. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSourceRejectedLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3343,9 +4522,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service with schema. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowSourceSchemaLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3396,15 +4590,38 @@ def __init__(__self__, *, :param 'FlowletDataFlowTransformationFlowletArgs' flowlet: A `flowlet` block as defined below. :param 'FlowletDataFlowTransformationLinkedServiceArgs' linked_service: A `linked_service` block as defined below. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowTransformation._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset=dataset, + description=description, + flowlet=flowlet, + linked_service=linked_service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + dataset: Optional['outputs.FlowletDataFlowTransformationDataset'] = None, + description: Optional[str] = None, + flowlet: Optional['outputs.FlowletDataFlowTransformationFlowlet'] = None, + linked_service: Optional['outputs.FlowletDataFlowTransformationLinkedService'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if linked_service is None and 'linkedService' in kwargs: + linked_service = kwargs['linkedService'] + + _setter("name", name) if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if flowlet is not None: - pulumi.set(__self__, "flowlet", flowlet) + _setter("flowlet", flowlet) if linked_service is not None: - pulumi.set(__self__, "linked_service", linked_service) + _setter("linked_service", linked_service) @property @pulumi.getter @@ -3456,9 +4673,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Dataset. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory dataset. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowTransformationDataset._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3505,11 +4737,30 @@ def __init__(__self__, *, :param str dataset_parameters: Specifies the reference data flow parameters from dataset. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Flowlet. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowTransformationFlowlet._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + dataset_parameters=dataset_parameters, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + dataset_parameters: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if dataset_parameters is None and 'datasetParameters' in kwargs: + dataset_parameters = kwargs['datasetParameters'] + + _setter("name", name) if dataset_parameters is not None: - pulumi.set(__self__, "dataset_parameters", dataset_parameters) + _setter("dataset_parameters", dataset_parameters) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3545,9 +4796,24 @@ def __init__(__self__, *, :param str name: The name for the Data Factory Linked Service. :param Mapping[str, str] parameters: A map of parameters to associate with the Data Factory Linked Service. """ - pulumi.set(__self__, "name", name) + FlowletDataFlowTransformationLinkedService._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3602,13 +4868,40 @@ def __init__(__self__, *, :param str administrator_password: Administrator login password for the SQL Server. :param str pricing_tier: Pricing tier for the database that will be created for the SSIS catalog. Valid values are: `Basic`, `Standard`, `Premium` and `PremiumRS`. """ - pulumi.set(__self__, "server_endpoint", server_endpoint) + IntegrationRuntimeManagedCatalogInfo._configure( + lambda key, value: pulumi.set(__self__, key, value), + server_endpoint=server_endpoint, + administrator_login=administrator_login, + administrator_password=administrator_password, + pricing_tier=pricing_tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server_endpoint: Optional[str] = None, + administrator_login: Optional[str] = None, + administrator_password: Optional[str] = None, + pricing_tier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_endpoint is None and 'serverEndpoint' in kwargs: + server_endpoint = kwargs['serverEndpoint'] + if server_endpoint is None: + raise TypeError("Missing 'server_endpoint' argument") + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_password is None and 'administratorPassword' in kwargs: + administrator_password = kwargs['administratorPassword'] + if pricing_tier is None and 'pricingTier' in kwargs: + pricing_tier = kwargs['pricingTier'] + + _setter("server_endpoint", server_endpoint) if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_password is not None: - pulumi.set(__self__, "administrator_password", administrator_password) + _setter("administrator_password", administrator_password) if pricing_tier is not None: - pulumi.set(__self__, "pricing_tier", pricing_tier) + _setter("pricing_tier", pricing_tier) @property @pulumi.getter(name="serverEndpoint") @@ -3671,8 +4964,29 @@ def __init__(__self__, *, :param str blob_container_uri: The blob endpoint for the container which contains a custom setup script that will be run on every node on startup. See [https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup](https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup) for more information. :param str sas_token: A container SAS token that gives access to the files. See [https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup](https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup) for more information. """ - pulumi.set(__self__, "blob_container_uri", blob_container_uri) - pulumi.set(__self__, "sas_token", sas_token) + IntegrationRuntimeManagedCustomSetupScript._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_container_uri=blob_container_uri, + sas_token=sas_token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_container_uri: Optional[str] = None, + sas_token: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_container_uri is None and 'blobContainerUri' in kwargs: + blob_container_uri = kwargs['blobContainerUri'] + if blob_container_uri is None: + raise TypeError("Missing 'blob_container_uri' argument") + if sas_token is None and 'sasToken' in kwargs: + sas_token = kwargs['sasToken'] + if sas_token is None: + raise TypeError("Missing 'sas_token' argument") + + _setter("blob_container_uri", blob_container_uri) + _setter("sas_token", sas_token) @property @pulumi.getter(name="blobContainerUri") @@ -3719,8 +5033,29 @@ def __init__(__self__, *, :param str subnet_name: Name of the subnet to which the nodes of the Managed Integration Runtime will be added. :param str vnet_id: ID of the virtual network to which the nodes of the Managed Integration Runtime will be added. """ - pulumi.set(__self__, "subnet_name", subnet_name) - pulumi.set(__self__, "vnet_id", vnet_id) + IntegrationRuntimeManagedVnetIntegration._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_name=subnet_name, + vnet_id=vnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_name: Optional[str] = None, + vnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_name is None and 'subnetName' in kwargs: + subnet_name = kwargs['subnetName'] + if subnet_name is None: + raise TypeError("Missing 'subnet_name' argument") + if vnet_id is None and 'vnetId' in kwargs: + vnet_id = kwargs['vnetId'] + if vnet_id is None: + raise TypeError("Missing 'vnet_id' argument") + + _setter("subnet_name", subnet_name) + _setter("vnet_id", vnet_id) @property @pulumi.getter(name="subnetName") @@ -3767,7 +5102,22 @@ def __init__(__self__, *, For more information on the configuration, please check out the [Azure documentation](https://docs.microsoft.com/rest/api/datafactory/integrationruntimes/createorupdate#linkedintegrationruntimerbacauthorization) """ - pulumi.set(__self__, "resource_id", resource_id) + IntegrationRuntimeSelfHostedRbacAuthorization._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_id=resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + + _setter("resource_id", resource_id) @property @pulumi.getter(name="resourceId") @@ -3826,17 +5176,52 @@ def __init__(__self__, *, :param str elastic_pool_name: The name of SQL elastic pool where the database will be created for the SSIS catalog. Mutually exclusive with `pricing_tier`. :param str pricing_tier: Pricing tier for the database that will be created for the SSIS catalog. Valid values are: `Basic`, `S0`, `S1`, `S2`, `S3`, `S4`, `S6`, `S7`, `S9`, `S12`, `P1`, `P2`, `P4`, `P6`, `P11`, `P15`, `GP_S_Gen5_1`, `GP_S_Gen5_2`, `GP_S_Gen5_4`, `GP_S_Gen5_6`, `GP_S_Gen5_8`, `GP_S_Gen5_10`, `GP_S_Gen5_12`, `GP_S_Gen5_14`, `GP_S_Gen5_16`, `GP_S_Gen5_18`, `GP_S_Gen5_20`, `GP_S_Gen5_24`, `GP_S_Gen5_32`, `GP_S_Gen5_40`, `GP_Gen5_2`, `GP_Gen5_4`, `GP_Gen5_6`, `GP_Gen5_8`, `GP_Gen5_10`, `GP_Gen5_12`, `GP_Gen5_14`, `GP_Gen5_16`, `GP_Gen5_18`, `GP_Gen5_20`, `GP_Gen5_24`, `GP_Gen5_32`, `GP_Gen5_40`, `GP_Gen5_80`, `BC_Gen5_2`, `BC_Gen5_4`, `BC_Gen5_6`, `BC_Gen5_8`, `BC_Gen5_10`, `BC_Gen5_12`, `BC_Gen5_14`, `BC_Gen5_16`, `BC_Gen5_18`, `BC_Gen5_20`, `BC_Gen5_24`, `BC_Gen5_32`, `BC_Gen5_40`, `BC_Gen5_80`, `HS_Gen5_2`, `HS_Gen5_4`, `HS_Gen5_6`, `HS_Gen5_8`, `HS_Gen5_10`, `HS_Gen5_12`, `HS_Gen5_14`, `HS_Gen5_16`, `HS_Gen5_18`, `HS_Gen5_20`, `HS_Gen5_24`, `HS_Gen5_32`, `HS_Gen5_40` and `HS_Gen5_80`. Mutually exclusive with `elastic_pool_name`. """ - pulumi.set(__self__, "server_endpoint", server_endpoint) + IntegrationRuntimeSsisCatalogInfo._configure( + lambda key, value: pulumi.set(__self__, key, value), + server_endpoint=server_endpoint, + administrator_login=administrator_login, + administrator_password=administrator_password, + dual_standby_pair_name=dual_standby_pair_name, + elastic_pool_name=elastic_pool_name, + pricing_tier=pricing_tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server_endpoint: Optional[str] = None, + administrator_login: Optional[str] = None, + administrator_password: Optional[str] = None, + dual_standby_pair_name: Optional[str] = None, + elastic_pool_name: Optional[str] = None, + pricing_tier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_endpoint is None and 'serverEndpoint' in kwargs: + server_endpoint = kwargs['serverEndpoint'] + if server_endpoint is None: + raise TypeError("Missing 'server_endpoint' argument") + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_password is None and 'administratorPassword' in kwargs: + administrator_password = kwargs['administratorPassword'] + if dual_standby_pair_name is None and 'dualStandbyPairName' in kwargs: + dual_standby_pair_name = kwargs['dualStandbyPairName'] + if elastic_pool_name is None and 'elasticPoolName' in kwargs: + elastic_pool_name = kwargs['elasticPoolName'] + if pricing_tier is None and 'pricingTier' in kwargs: + pricing_tier = kwargs['pricingTier'] + + _setter("server_endpoint", server_endpoint) if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_password is not None: - pulumi.set(__self__, "administrator_password", administrator_password) + _setter("administrator_password", administrator_password) if dual_standby_pair_name is not None: - pulumi.set(__self__, "dual_standby_pair_name", dual_standby_pair_name) + _setter("dual_standby_pair_name", dual_standby_pair_name) if elastic_pool_name is not None: - pulumi.set(__self__, "elastic_pool_name", elastic_pool_name) + _setter("elastic_pool_name", elastic_pool_name) if pricing_tier is not None: - pulumi.set(__self__, "pricing_tier", pricing_tier) + _setter("pricing_tier", pricing_tier) @property @pulumi.getter(name="serverEndpoint") @@ -3915,8 +5300,29 @@ def __init__(__self__, *, :param str blob_container_uri: The blob endpoint for the container which contains a custom setup script that will be run on every node on startup. See [https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup](https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup) for more information. :param str sas_token: A container SAS token that gives access to the files. See [https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup](https://docs.microsoft.com/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup) for more information. """ - pulumi.set(__self__, "blob_container_uri", blob_container_uri) - pulumi.set(__self__, "sas_token", sas_token) + IntegrationRuntimeSsisCustomSetupScript._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_container_uri=blob_container_uri, + sas_token=sas_token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_container_uri: Optional[str] = None, + sas_token: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_container_uri is None and 'blobContainerUri' in kwargs: + blob_container_uri = kwargs['blobContainerUri'] + if blob_container_uri is None: + raise TypeError("Missing 'blob_container_uri' argument") + if sas_token is None and 'sasToken' in kwargs: + sas_token = kwargs['sasToken'] + if sas_token is None: + raise TypeError("Missing 'sas_token' argument") + + _setter("blob_container_uri", blob_container_uri) + _setter("sas_token", sas_token) @property @pulumi.getter(name="blobContainerUri") @@ -3969,14 +5375,35 @@ def __init__(__self__, *, > **NOTE** At least one of `env`, `powershell_version`, `component` and `command_key` should be specified. """ + IntegrationRuntimeSsisExpressCustomSetup._configure( + lambda key, value: pulumi.set(__self__, key, value), + command_keys=command_keys, + components=components, + environment=environment, + powershell_version=powershell_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + command_keys: Optional[Sequence['outputs.IntegrationRuntimeSsisExpressCustomSetupCommandKey']] = None, + components: Optional[Sequence['outputs.IntegrationRuntimeSsisExpressCustomSetupComponent']] = None, + environment: Optional[Mapping[str, str]] = None, + powershell_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if command_keys is None and 'commandKeys' in kwargs: + command_keys = kwargs['commandKeys'] + if powershell_version is None and 'powershellVersion' in kwargs: + powershell_version = kwargs['powershellVersion'] + if command_keys is not None: - pulumi.set(__self__, "command_keys", command_keys) + _setter("command_keys", command_keys) if components is not None: - pulumi.set(__self__, "components", components) + _setter("components", components) if environment is not None: - pulumi.set(__self__, "environment", environment) + _setter("environment", environment) if powershell_version is not None: - pulumi.set(__self__, "powershell_version", powershell_version) + _setter("powershell_version", powershell_version) @property @pulumi.getter(name="commandKeys") @@ -4047,12 +5474,39 @@ def __init__(__self__, *, :param 'IntegrationRuntimeSsisExpressCustomSetupCommandKeyKeyVaultPasswordArgs' key_vault_password: A `key_vault_secret_reference` block as defined below. :param str password: The password for the target device. """ - pulumi.set(__self__, "target_name", target_name) - pulumi.set(__self__, "user_name", user_name) + IntegrationRuntimeSsisExpressCustomSetupCommandKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_name=target_name, + user_name=user_name, + key_vault_password=key_vault_password, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_name: Optional[str] = None, + user_name: Optional[str] = None, + key_vault_password: Optional['outputs.IntegrationRuntimeSsisExpressCustomSetupCommandKeyKeyVaultPassword'] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_name is None and 'targetName' in kwargs: + target_name = kwargs['targetName'] + if target_name is None: + raise TypeError("Missing 'target_name' argument") + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + if user_name is None: + raise TypeError("Missing 'user_name' argument") + if key_vault_password is None and 'keyVaultPassword' in kwargs: + key_vault_password = kwargs['keyVaultPassword'] + + _setter("target_name", target_name) + _setter("user_name", user_name) if key_vault_password is not None: - pulumi.set(__self__, "key_vault_password", key_vault_password) + _setter("key_vault_password", key_vault_password) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter(name="targetName") @@ -4121,12 +5575,39 @@ def __init__(__self__, *, :param Mapping[str, str] parameters: A map of parameters to associate with the Key Vault Data Factory Linked Service. :param str secret_version: Specifies the secret version in Azure Key Vault. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + IntegrationRuntimeSsisExpressCustomSetupCommandKeyKeyVaultPassword._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + parameters=parameters, + secret_version=secret_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + secret_name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + secret_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if secret_version is None and 'secretVersion' in kwargs: + secret_version = kwargs['secretVersion'] + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if secret_version is not None: - pulumi.set(__self__, "secret_version", secret_version) + _setter("secret_version", secret_version) @property @pulumi.getter(name="linkedServiceName") @@ -4189,11 +5670,30 @@ def __init__(__self__, *, :param 'IntegrationRuntimeSsisExpressCustomSetupComponentKeyVaultLicenseArgs' key_vault_license: A `key_vault_secret_reference` block as defined below. :param str license: The license used for the Component. """ - pulumi.set(__self__, "name", name) + IntegrationRuntimeSsisExpressCustomSetupComponent._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + key_vault_license=key_vault_license, + license=license, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + key_vault_license: Optional['outputs.IntegrationRuntimeSsisExpressCustomSetupComponentKeyVaultLicense'] = None, + license: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if key_vault_license is None and 'keyVaultLicense' in kwargs: + key_vault_license = kwargs['keyVaultLicense'] + + _setter("name", name) if key_vault_license is not None: - pulumi.set(__self__, "key_vault_license", key_vault_license) + _setter("key_vault_license", key_vault_license) if license is not None: - pulumi.set(__self__, "license", license) + _setter("license", license) @property @pulumi.getter @@ -4254,12 +5754,39 @@ def __init__(__self__, *, :param Mapping[str, str] parameters: A map of parameters to associate with the Key Vault Data Factory Linked Service. :param str secret_version: Specifies the secret version in Azure Key Vault. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + IntegrationRuntimeSsisExpressCustomSetupComponentKeyVaultLicense._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + parameters=parameters, + secret_version=secret_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + secret_name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + secret_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + if secret_version is None and 'secretVersion' in kwargs: + secret_version = kwargs['secretVersion'] + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if secret_version is not None: - pulumi.set(__self__, "secret_version", secret_version) + _setter("secret_version", secret_version) @property @pulumi.getter(name="linkedServiceName") @@ -4318,7 +5845,22 @@ def __init__(__self__, *, """ :param str subnet_id: id of the subnet to which the nodes of the Azure-SSIS Integration Runtime will be added. """ - pulumi.set(__self__, "subnet_id", subnet_id) + IntegrationRuntimeSsisExpressVnetIntegration._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="subnetId") @@ -4355,8 +5897,27 @@ def __init__(__self__, *, :param str linked_service_name: Name of the Linked Service to associate with the packages. :param str name: Name of the package store. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "name", name) + IntegrationRuntimeSsisPackageStore._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("name", name) @property @pulumi.getter(name="linkedServiceName") @@ -4405,10 +5966,33 @@ def __init__(__self__, *, :param str staging_storage_linked_service_name: Name of Azure Blob Storage linked service to reference the staging data store to be used when moving data between self-hosted and Azure-SSIS integration runtimes. :param str path: The path in the data store to be used when moving data between Self-Hosted and Azure-SSIS Integration Runtimes. """ - pulumi.set(__self__, "self_hosted_integration_runtime_name", self_hosted_integration_runtime_name) - pulumi.set(__self__, "staging_storage_linked_service_name", staging_storage_linked_service_name) + IntegrationRuntimeSsisProxy._configure( + lambda key, value: pulumi.set(__self__, key, value), + self_hosted_integration_runtime_name=self_hosted_integration_runtime_name, + staging_storage_linked_service_name=staging_storage_linked_service_name, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + self_hosted_integration_runtime_name: Optional[str] = None, + staging_storage_linked_service_name: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if self_hosted_integration_runtime_name is None and 'selfHostedIntegrationRuntimeName' in kwargs: + self_hosted_integration_runtime_name = kwargs['selfHostedIntegrationRuntimeName'] + if self_hosted_integration_runtime_name is None: + raise TypeError("Missing 'self_hosted_integration_runtime_name' argument") + if staging_storage_linked_service_name is None and 'stagingStorageLinkedServiceName' in kwargs: + staging_storage_linked_service_name = kwargs['stagingStorageLinkedServiceName'] + if staging_storage_linked_service_name is None: + raise TypeError("Missing 'staging_storage_linked_service_name' argument") + + _setter("self_hosted_integration_runtime_name", self_hosted_integration_runtime_name) + _setter("staging_storage_linked_service_name", staging_storage_linked_service_name) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter(name="selfHostedIntegrationRuntimeName") @@ -4473,14 +6057,39 @@ def __init__(__self__, *, :param str subnet_name: Name of the subnet to which the nodes of the Azure-SSIS Integration Runtime will be added. :param str vnet_id: ID of the virtual network to which the nodes of the Azure-SSIS Integration Runtime will be added. """ + IntegrationRuntimeSsisVnetIntegration._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_ips=public_ips, + subnet_id=subnet_id, + subnet_name=subnet_name, + vnet_id=vnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_ips: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + subnet_name: Optional[str] = None, + vnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_ips is None and 'publicIps' in kwargs: + public_ips = kwargs['publicIps'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_name is None and 'subnetName' in kwargs: + subnet_name = kwargs['subnetName'] + if vnet_id is None and 'vnetId' in kwargs: + vnet_id = kwargs['vnetId'] + if public_ips is not None: - pulumi.set(__self__, "public_ips", public_ips) + _setter("public_ips", public_ips) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if subnet_name is not None: - pulumi.set(__self__, "subnet_name", subnet_name) + _setter("subnet_name", subnet_name) if vnet_id is not None: - pulumi.set(__self__, "vnet_id", vnet_id) + _setter("vnet_id", vnet_id) @property @pulumi.getter(name="publicIps") @@ -4526,9 +6135,24 @@ def __init__(__self__, *, :param str name: The integration runtime reference to associate with the Data Factory Linked Service. :param Mapping[str, str] parameters: A map of parameters to associate with the integration runtime. """ - pulumi.set(__self__, "name", name) + LinkedCustomServiceIntegrationRuntime._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -4575,8 +6199,29 @@ def __init__(__self__, *, :param str linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param str secret_name: Specifies the secret name in Azure Key Vault that stores the SAS token. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureBlobStorageKeyVaultSasToken._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + secret_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -4623,8 +6268,29 @@ def __init__(__self__, *, :param str linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param str secret_name: Specifies the secret name in Azure Key Vault that stores the Service Principal key. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureBlobStorageServicePrincipalLinkedKeyVaultKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + secret_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -4679,12 +6345,41 @@ def __init__(__self__, *, :param int max_number_of_workers: The max number of worker nodes. Set this value if you want to enable autoscaling between the `min_number_of_workers` and this value. Omit this value to use a fixed number of workers defined in the `min_number_of_workers` property. :param int min_number_of_workers: The minimum number of worker nodes. Defaults to `1`. """ - pulumi.set(__self__, "cluster_version", cluster_version) - pulumi.set(__self__, "instance_pool_id", instance_pool_id) + LinkedServiceAzureDatabricksInstancePool._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + instance_pool_id=instance_pool_id, + max_number_of_workers=max_number_of_workers, + min_number_of_workers=min_number_of_workers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[str] = None, + instance_pool_id: Optional[str] = None, + max_number_of_workers: Optional[int] = None, + min_number_of_workers: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if cluster_version is None: + raise TypeError("Missing 'cluster_version' argument") + if instance_pool_id is None and 'instancePoolId' in kwargs: + instance_pool_id = kwargs['instancePoolId'] + if instance_pool_id is None: + raise TypeError("Missing 'instance_pool_id' argument") + if max_number_of_workers is None and 'maxNumberOfWorkers' in kwargs: + max_number_of_workers = kwargs['maxNumberOfWorkers'] + if min_number_of_workers is None and 'minNumberOfWorkers' in kwargs: + min_number_of_workers = kwargs['minNumberOfWorkers'] + + _setter("cluster_version", cluster_version) + _setter("instance_pool_id", instance_pool_id) if max_number_of_workers is not None: - pulumi.set(__self__, "max_number_of_workers", max_number_of_workers) + _setter("max_number_of_workers", max_number_of_workers) if min_number_of_workers is not None: - pulumi.set(__self__, "min_number_of_workers", min_number_of_workers) + _setter("min_number_of_workers", min_number_of_workers) @property @pulumi.getter(name="clusterVersion") @@ -4747,8 +6442,29 @@ def __init__(__self__, *, :param str linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param str secret_name: Specifies the secret name in Azure Key Vault that stores ADB access token. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureDatabricksKeyVaultPassword._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + secret_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -4827,24 +6543,77 @@ def __init__(__self__, *, :param Mapping[str, str] spark_config: User-specified Spark configuration variables key-value pairs. :param Mapping[str, str] spark_environment_variables: User-specified Spark environment variables key-value pairs. """ - pulumi.set(__self__, "cluster_version", cluster_version) - pulumi.set(__self__, "node_type", node_type) + LinkedServiceAzureDatabricksNewClusterConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + node_type=node_type, + custom_tags=custom_tags, + driver_node_type=driver_node_type, + init_scripts=init_scripts, + log_destination=log_destination, + max_number_of_workers=max_number_of_workers, + min_number_of_workers=min_number_of_workers, + spark_config=spark_config, + spark_environment_variables=spark_environment_variables, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[str] = None, + node_type: Optional[str] = None, + custom_tags: Optional[Mapping[str, str]] = None, + driver_node_type: Optional[str] = None, + init_scripts: Optional[Sequence[str]] = None, + log_destination: Optional[str] = None, + max_number_of_workers: Optional[int] = None, + min_number_of_workers: Optional[int] = None, + spark_config: Optional[Mapping[str, str]] = None, + spark_environment_variables: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if cluster_version is None: + raise TypeError("Missing 'cluster_version' argument") + if node_type is None and 'nodeType' in kwargs: + node_type = kwargs['nodeType'] + if node_type is None: + raise TypeError("Missing 'node_type' argument") + if custom_tags is None and 'customTags' in kwargs: + custom_tags = kwargs['customTags'] + if driver_node_type is None and 'driverNodeType' in kwargs: + driver_node_type = kwargs['driverNodeType'] + if init_scripts is None and 'initScripts' in kwargs: + init_scripts = kwargs['initScripts'] + if log_destination is None and 'logDestination' in kwargs: + log_destination = kwargs['logDestination'] + if max_number_of_workers is None and 'maxNumberOfWorkers' in kwargs: + max_number_of_workers = kwargs['maxNumberOfWorkers'] + if min_number_of_workers is None and 'minNumberOfWorkers' in kwargs: + min_number_of_workers = kwargs['minNumberOfWorkers'] + if spark_config is None and 'sparkConfig' in kwargs: + spark_config = kwargs['sparkConfig'] + if spark_environment_variables is None and 'sparkEnvironmentVariables' in kwargs: + spark_environment_variables = kwargs['sparkEnvironmentVariables'] + + _setter("cluster_version", cluster_version) + _setter("node_type", node_type) if custom_tags is not None: - pulumi.set(__self__, "custom_tags", custom_tags) + _setter("custom_tags", custom_tags) if driver_node_type is not None: - pulumi.set(__self__, "driver_node_type", driver_node_type) + _setter("driver_node_type", driver_node_type) if init_scripts is not None: - pulumi.set(__self__, "init_scripts", init_scripts) + _setter("init_scripts", init_scripts) if log_destination is not None: - pulumi.set(__self__, "log_destination", log_destination) + _setter("log_destination", log_destination) if max_number_of_workers is not None: - pulumi.set(__self__, "max_number_of_workers", max_number_of_workers) + _setter("max_number_of_workers", max_number_of_workers) if min_number_of_workers is not None: - pulumi.set(__self__, "min_number_of_workers", min_number_of_workers) + _setter("min_number_of_workers", min_number_of_workers) if spark_config is not None: - pulumi.set(__self__, "spark_config", spark_config) + _setter("spark_config", spark_config) if spark_environment_variables is not None: - pulumi.set(__self__, "spark_environment_variables", spark_environment_variables) + _setter("spark_environment_variables", spark_environment_variables) @property @pulumi.getter(name="clusterVersion") @@ -4955,8 +6724,29 @@ def __init__(__self__, *, :param str linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param str secret_name: Specifies the secret name in Azure Key Vault that stores Azure File Storage password. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureFileStorageKeyVaultPassword._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + secret_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5003,8 +6793,29 @@ def __init__(__self__, *, :param str linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param str secret_name: Specifies the secret name in Azure Key Vault that stores the system key of the Azure Function. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureFunctionKeyVaultKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + secret_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5051,8 +6862,29 @@ def __init__(__self__, *, :param str linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param str secret_name: Specifies the secret name in Azure Key Vault that stores SQL Server connection string. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureSqlDatabaseKeyVaultConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + secret_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5099,8 +6931,29 @@ def __init__(__self__, *, :param str linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param str secret_name: Specifies the secret name in Azure Key Vault that stores SQL Server password. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceAzureSqlDatabaseKeyVaultPassword._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + secret_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5128,8 +6981,25 @@ def __init__(__self__, *, :param str password: The password associated with the username, which can be used to authenticate to the OData endpoint. :param str username: The username which can be used to authenticate to the OData endpoint. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + LinkedServiceOdataBasicAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -5157,8 +7027,25 @@ def __init__(__self__, *, :param str password: The password associated with the username, which can be used to authenticate to the ODBC endpoint. :param str username: The username which can be used to authenticate to the ODBC endpoint. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + LinkedServiceOdbcBasicAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -5205,8 +7092,29 @@ def __init__(__self__, *, :param str linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param str secret_name: Specifies the secret name in Azure Key Vault that stores Snowflake password. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceSnowflakeKeyVaultPassword._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + secret_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5253,8 +7161,29 @@ def __init__(__self__, *, :param str linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param str secret_name: Specifies the secret name in Azure Key Vault that stores SQL Server connection string. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceSqlServerKeyVaultConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + secret_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5301,8 +7230,29 @@ def __init__(__self__, *, :param str linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param str secret_name: Specifies the secret name in Azure Key Vault that stores SQL Server password. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceSqlServerKeyVaultPassword._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + secret_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5349,8 +7299,29 @@ def __init__(__self__, *, :param str linked_service_name: Specifies the name of an existing Key Vault Data Factory Linked Service. :param str secret_name: Specifies the secret name in Azure Key Vault that stores Synapse password. """ - pulumi.set(__self__, "linked_service_name", linked_service_name) - pulumi.set(__self__, "secret_name", secret_name) + LinkedServiceSynapseKeyVaultPassword._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_service_name=linked_service_name, + secret_name=secret_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_service_name: Optional[str] = None, + secret_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_service_name is None and 'linkedServiceName' in kwargs: + linked_service_name = kwargs['linkedServiceName'] + if linked_service_name is None: + raise TypeError("Missing 'linked_service_name' argument") + if secret_name is None and 'secretName' in kwargs: + secret_name = kwargs['secretName'] + if secret_name is None: + raise TypeError("Missing 'secret_name' argument") + + _setter("linked_service_name", linked_service_name) + _setter("secret_name", secret_name) @property @pulumi.getter(name="linkedServiceName") @@ -5378,9 +7349,24 @@ def __init__(__self__, *, :param str name: The Data Factory Pipeline name that the trigger will act on. :param Mapping[str, str] parameters: The Data Factory Pipeline parameters that the trigger will act on. """ - pulumi.set(__self__, "name", name) + TriggerBlobEventPipeline._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -5408,9 +7394,24 @@ def __init__(__self__, *, :param str name: The Data Factory Pipeline name that the trigger will act on. :param Mapping[str, str] parameters: The Data Factory Pipeline parameters that the trigger will act on. """ - pulumi.set(__self__, "name", name) + TriggerCustomEventPipeline._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -5438,9 +7439,24 @@ def __init__(__self__, *, :param str name: Reference pipeline name. :param Mapping[str, str] parameters: The pipeline parameters that the trigger will act upon. """ - pulumi.set(__self__, "name", name) + TriggerSchedulePipeline._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -5493,16 +7509,39 @@ def __init__(__self__, *, :param Sequence[int] minutes: Minutes of the hour on which the trigger is scheduled. :param Sequence['TriggerScheduleScheduleMonthlyArgs'] monthlies: A `monthly` block as documented below, which specifies the days of the month on which the trigger is scheduled. The value can be specified only with a monthly frequency. """ + TriggerScheduleSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_months=days_of_months, + days_of_weeks=days_of_weeks, + hours=hours, + minutes=minutes, + monthlies=monthlies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_months: Optional[Sequence[int]] = None, + days_of_weeks: Optional[Sequence[str]] = None, + hours: Optional[Sequence[int]] = None, + minutes: Optional[Sequence[int]] = None, + monthlies: Optional[Sequence['outputs.TriggerScheduleScheduleMonthly']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_months is None and 'daysOfMonths' in kwargs: + days_of_months = kwargs['daysOfMonths'] + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if days_of_months is not None: - pulumi.set(__self__, "days_of_months", days_of_months) + _setter("days_of_months", days_of_months) if days_of_weeks is not None: - pulumi.set(__self__, "days_of_weeks", days_of_weeks) + _setter("days_of_weeks", days_of_weeks) if hours is not None: - pulumi.set(__self__, "hours", hours) + _setter("hours", hours) if minutes is not None: - pulumi.set(__self__, "minutes", minutes) + _setter("minutes", minutes) if monthlies is not None: - pulumi.set(__self__, "monthlies", monthlies) + _setter("monthlies", monthlies) @property @pulumi.getter(name="daysOfMonths") @@ -5554,9 +7593,24 @@ def __init__(__self__, *, :param str weekday: The day of the week on which the trigger runs. For example, a `monthly` property with a `weekday` value of `Sunday` means every Sunday of the month. :param int week: The occurrence of the specified day during the month. For example, a `monthly` property with `weekday` and `week` values of `Sunday, -1` means the last Sunday of the month. """ - pulumi.set(__self__, "weekday", weekday) + TriggerScheduleScheduleMonthly._configure( + lambda key, value: pulumi.set(__self__, key, value), + weekday=weekday, + week=week, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + weekday: Optional[str] = None, + week: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if weekday is None: + raise TypeError("Missing 'weekday' argument") + + _setter("weekday", weekday) if week is not None: - pulumi.set(__self__, "week", week) + _setter("week", week) @property @pulumi.getter @@ -5584,9 +7638,24 @@ def __init__(__self__, *, :param str name: The Data Factory Pipeline name that the trigger will act on. :param Mapping[str, str] parameters: The Data Factory Pipeline parameters that the trigger will act on. """ - pulumi.set(__self__, "name", name) + TriggerTumblingWindowPipeline._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -5614,9 +7683,24 @@ def __init__(__self__, *, :param int count: The maximum retry attempts if the pipeline run failed. :param int interval: The Interval in seconds between each retry if the pipeline run failed. Defaults to `30`. """ - pulumi.set(__self__, "count", count) + TriggerTumblingWindowRetry._configure( + lambda key, value: pulumi.set(__self__, key, value), + count=count, + interval=interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + count: Optional[int] = None, + interval: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if count is None: + raise TypeError("Missing 'count' argument") + + _setter("count", count) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) @property @pulumi.getter @@ -5663,12 +7747,29 @@ def __init__(__self__, *, :param str size: The size of the dependency tumbling window. Must be in Timespan format (hh:mm:ss). :param str trigger_name: The dependency trigger name. If not specified, it will use self dependency. """ + TriggerTumblingWindowTriggerDependency._configure( + lambda key, value: pulumi.set(__self__, key, value), + offset=offset, + size=size, + trigger_name=trigger_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offset: Optional[str] = None, + size: Optional[str] = None, + trigger_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if trigger_name is None and 'triggerName' in kwargs: + trigger_name = kwargs['triggerName'] + if offset is not None: - pulumi.set(__self__, "offset", offset) + _setter("offset", offset) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if trigger_name is not None: - pulumi.set(__self__, "trigger_name", trigger_name) + _setter("trigger_name", trigger_name) @property @pulumi.getter @@ -5710,11 +7811,50 @@ def __init__(__self__, *, :param str repository_name: The name of the git repository. :param str root_folder: The root folder within the repository. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "branch_name", branch_name) - pulumi.set(__self__, "git_url", git_url) - pulumi.set(__self__, "repository_name", repository_name) - pulumi.set(__self__, "root_folder", root_folder) + GetFactoryGithubConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + branch_name=branch_name, + git_url=git_url, + repository_name=repository_name, + root_folder=root_folder, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[str] = None, + branch_name: Optional[str] = None, + git_url: Optional[str] = None, + repository_name: Optional[str] = None, + root_folder: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if branch_name is None and 'branchName' in kwargs: + branch_name = kwargs['branchName'] + if branch_name is None: + raise TypeError("Missing 'branch_name' argument") + if git_url is None and 'gitUrl' in kwargs: + git_url = kwargs['gitUrl'] + if git_url is None: + raise TypeError("Missing 'git_url' argument") + if repository_name is None and 'repositoryName' in kwargs: + repository_name = kwargs['repositoryName'] + if repository_name is None: + raise TypeError("Missing 'repository_name' argument") + if root_folder is None and 'rootFolder' in kwargs: + root_folder = kwargs['rootFolder'] + if root_folder is None: + raise TypeError("Missing 'root_folder' argument") + + _setter("account_name", account_name) + _setter("branch_name", branch_name) + _setter("git_url", git_url) + _setter("repository_name", repository_name) + _setter("root_folder", root_folder) @property @pulumi.getter(name="accountName") @@ -5770,10 +7910,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID associated with the VSTS account. :param str type: The type of Managed Service Identity that is configured on this Data Factory. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetFactoryIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -5825,12 +7996,57 @@ def __init__(__self__, *, :param str root_folder: The root folder within the repository. :param str tenant_id: The Tenant ID associated with the VSTS account. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "branch_name", branch_name) - pulumi.set(__self__, "project_name", project_name) - pulumi.set(__self__, "repository_name", repository_name) - pulumi.set(__self__, "root_folder", root_folder) - pulumi.set(__self__, "tenant_id", tenant_id) + GetFactoryVstsConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + branch_name=branch_name, + project_name=project_name, + repository_name=repository_name, + root_folder=root_folder, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[str] = None, + branch_name: Optional[str] = None, + project_name: Optional[str] = None, + repository_name: Optional[str] = None, + root_folder: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if branch_name is None and 'branchName' in kwargs: + branch_name = kwargs['branchName'] + if branch_name is None: + raise TypeError("Missing 'branch_name' argument") + if project_name is None and 'projectName' in kwargs: + project_name = kwargs['projectName'] + if project_name is None: + raise TypeError("Missing 'project_name' argument") + if repository_name is None and 'repositoryName' in kwargs: + repository_name = kwargs['repositoryName'] + if repository_name is None: + raise TypeError("Missing 'repository_name' argument") + if root_folder is None and 'rootFolder' in kwargs: + root_folder = kwargs['rootFolder'] + if root_folder is None: + raise TypeError("Missing 'root_folder' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("account_name", account_name) + _setter("branch_name", branch_name) + _setter("project_name", project_name) + _setter("repository_name", repository_name) + _setter("root_folder", root_folder) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="accountName") diff --git a/sdk/python/pulumi_azure/datafactory/pipeline.py b/sdk/python/pulumi_azure/datafactory/pipeline.py index 99594a7802..e40d0b0a7c 100644 --- a/sdk/python/pulumi_azure/datafactory/pipeline.py +++ b/sdk/python/pulumi_azure/datafactory/pipeline.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PipelineArgs', 'Pipeline'] @@ -37,25 +37,62 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Pipeline. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] variables: A map of variables to associate with the Data Factory Pipeline. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) + PipelineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + activities_json=activities_json, + annotations=annotations, + concurrency=concurrency, + description=description, + folder=folder, + moniter_metrics_after_duration=moniter_metrics_after_duration, + name=name, + parameters=parameters, + variables=variables, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + activities_json: Optional[pulumi.Input[str]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + concurrency: Optional[pulumi.Input[int]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + moniter_metrics_after_duration: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if activities_json is None and 'activitiesJson' in kwargs: + activities_json = kwargs['activitiesJson'] + if moniter_metrics_after_duration is None and 'moniterMetricsAfterDuration' in kwargs: + moniter_metrics_after_duration = kwargs['moniterMetricsAfterDuration'] + + _setter("data_factory_id", data_factory_id) if activities_json is not None: - pulumi.set(__self__, "activities_json", activities_json) + _setter("activities_json", activities_json) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if concurrency is not None: - pulumi.set(__self__, "concurrency", concurrency) + _setter("concurrency", concurrency) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if moniter_metrics_after_duration is not None: - pulumi.set(__self__, "moniter_metrics_after_duration", moniter_metrics_after_duration) + _setter("moniter_metrics_after_duration", moniter_metrics_after_duration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if variables is not None: - pulumi.set(__self__, "variables", variables) + _setter("variables", variables) @property @pulumi.getter(name="dataFactoryId") @@ -204,26 +241,61 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Data Factory Pipeline. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] variables: A map of variables to associate with the Data Factory Pipeline. """ + _PipelineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + activities_json=activities_json, + annotations=annotations, + concurrency=concurrency, + data_factory_id=data_factory_id, + description=description, + folder=folder, + moniter_metrics_after_duration=moniter_metrics_after_duration, + name=name, + parameters=parameters, + variables=variables, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + activities_json: Optional[pulumi.Input[str]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + concurrency: Optional[pulumi.Input[int]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + moniter_metrics_after_duration: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if activities_json is None and 'activitiesJson' in kwargs: + activities_json = kwargs['activitiesJson'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if moniter_metrics_after_duration is None and 'moniterMetricsAfterDuration' in kwargs: + moniter_metrics_after_duration = kwargs['moniterMetricsAfterDuration'] + if activities_json is not None: - pulumi.set(__self__, "activities_json", activities_json) + _setter("activities_json", activities_json) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if concurrency is not None: - pulumi.set(__self__, "concurrency", concurrency) + _setter("concurrency", concurrency) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if moniter_metrics_after_duration is not None: - pulumi.set(__self__, "moniter_metrics_after_duration", moniter_metrics_after_duration) + _setter("moniter_metrics_after_duration", moniter_metrics_after_duration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if variables is not None: - pulumi.set(__self__, "variables", variables) + _setter("variables", variables) @property @pulumi.getter(name="activitiesJson") @@ -489,6 +561,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PipelineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/trigger_blob_event.py b/sdk/python/pulumi_azure/datafactory/trigger_blob_event.py index b451041c9e..3d0d919bf2 100644 --- a/sdk/python/pulumi_azure/datafactory/trigger_blob_event.py +++ b/sdk/python/pulumi_azure/datafactory/trigger_blob_event.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,26 +45,79 @@ def __init__(__self__, *, :param pulumi.Input[bool] ignore_empty_blobs: are blobs with zero bytes ignored? :param pulumi.Input[str] name: Specifies the name of the Data Factory Blob Event Trigger. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "events", events) - pulumi.set(__self__, "pipelines", pipelines) - pulumi.set(__self__, "storage_account_id", storage_account_id) + TriggerBlobEventArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + events=events, + pipelines=pipelines, + storage_account_id=storage_account_id, + activated=activated, + additional_properties=additional_properties, + annotations=annotations, + blob_path_begins_with=blob_path_begins_with, + blob_path_ends_with=blob_path_ends_with, + description=description, + ignore_empty_blobs=ignore_empty_blobs, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + events: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + pipelines: Optional[pulumi.Input[Sequence[pulumi.Input['TriggerBlobEventPipelineArgs']]]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + activated: Optional[pulumi.Input[bool]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + blob_path_begins_with: Optional[pulumi.Input[str]] = None, + blob_path_ends_with: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + ignore_empty_blobs: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if events is None: + raise TypeError("Missing 'events' argument") + if pipelines is None: + raise TypeError("Missing 'pipelines' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if blob_path_begins_with is None and 'blobPathBeginsWith' in kwargs: + blob_path_begins_with = kwargs['blobPathBeginsWith'] + if blob_path_ends_with is None and 'blobPathEndsWith' in kwargs: + blob_path_ends_with = kwargs['blobPathEndsWith'] + if ignore_empty_blobs is None and 'ignoreEmptyBlobs' in kwargs: + ignore_empty_blobs = kwargs['ignoreEmptyBlobs'] + + _setter("data_factory_id", data_factory_id) + _setter("events", events) + _setter("pipelines", pipelines) + _setter("storage_account_id", storage_account_id) if activated is not None: - pulumi.set(__self__, "activated", activated) + _setter("activated", activated) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if blob_path_begins_with is not None: - pulumi.set(__self__, "blob_path_begins_with", blob_path_begins_with) + _setter("blob_path_begins_with", blob_path_begins_with) if blob_path_ends_with is not None: - pulumi.set(__self__, "blob_path_ends_with", blob_path_ends_with) + _setter("blob_path_ends_with", blob_path_ends_with) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if ignore_empty_blobs is not None: - pulumi.set(__self__, "ignore_empty_blobs", ignore_empty_blobs) + _setter("ignore_empty_blobs", ignore_empty_blobs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="dataFactoryId") @@ -245,30 +298,75 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['TriggerBlobEventPipelineArgs']]] pipelines: One or more `pipeline` blocks as defined below. :param pulumi.Input[str] storage_account_id: The ID of Storage Account in which blob event will be listened. Changing this forces a new resource. """ + _TriggerBlobEventState._configure( + lambda key, value: pulumi.set(__self__, key, value), + activated=activated, + additional_properties=additional_properties, + annotations=annotations, + blob_path_begins_with=blob_path_begins_with, + blob_path_ends_with=blob_path_ends_with, + data_factory_id=data_factory_id, + description=description, + events=events, + ignore_empty_blobs=ignore_empty_blobs, + name=name, + pipelines=pipelines, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + activated: Optional[pulumi.Input[bool]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + blob_path_begins_with: Optional[pulumi.Input[str]] = None, + blob_path_ends_with: Optional[pulumi.Input[str]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + events: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ignore_empty_blobs: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + pipelines: Optional[pulumi.Input[Sequence[pulumi.Input['TriggerBlobEventPipelineArgs']]]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if blob_path_begins_with is None and 'blobPathBeginsWith' in kwargs: + blob_path_begins_with = kwargs['blobPathBeginsWith'] + if blob_path_ends_with is None and 'blobPathEndsWith' in kwargs: + blob_path_ends_with = kwargs['blobPathEndsWith'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if ignore_empty_blobs is None and 'ignoreEmptyBlobs' in kwargs: + ignore_empty_blobs = kwargs['ignoreEmptyBlobs'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if activated is not None: - pulumi.set(__self__, "activated", activated) + _setter("activated", activated) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if blob_path_begins_with is not None: - pulumi.set(__self__, "blob_path_begins_with", blob_path_begins_with) + _setter("blob_path_begins_with", blob_path_begins_with) if blob_path_ends_with is not None: - pulumi.set(__self__, "blob_path_ends_with", blob_path_ends_with) + _setter("blob_path_ends_with", blob_path_ends_with) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if events is not None: - pulumi.set(__self__, "events", events) + _setter("events", events) if ignore_empty_blobs is not None: - pulumi.set(__self__, "ignore_empty_blobs", ignore_empty_blobs) + _setter("ignore_empty_blobs", ignore_empty_blobs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pipelines is not None: - pulumi.set(__self__, "pipelines", pipelines) + _setter("pipelines", pipelines) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter @@ -578,6 +676,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TriggerBlobEventArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/trigger_custom_event.py b/sdk/python/pulumi_azure/datafactory/trigger_custom_event.py index 91be73ba1a..4d06a5176c 100644 --- a/sdk/python/pulumi_azure/datafactory/trigger_custom_event.py +++ b/sdk/python/pulumi_azure/datafactory/trigger_custom_event.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,24 +43,73 @@ def __init__(__self__, *, > **Note:** At least one of `subject_begins_with` and `subject_ends_with` must be set. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "eventgrid_topic_id", eventgrid_topic_id) - pulumi.set(__self__, "events", events) - pulumi.set(__self__, "pipelines", pipelines) + TriggerCustomEventArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + eventgrid_topic_id=eventgrid_topic_id, + events=events, + pipelines=pipelines, + activated=activated, + additional_properties=additional_properties, + annotations=annotations, + description=description, + name=name, + subject_begins_with=subject_begins_with, + subject_ends_with=subject_ends_with, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + eventgrid_topic_id: Optional[pulumi.Input[str]] = None, + events: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + pipelines: Optional[pulumi.Input[Sequence[pulumi.Input['TriggerCustomEventPipelineArgs']]]] = None, + activated: Optional[pulumi.Input[bool]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + subject_begins_with: Optional[pulumi.Input[str]] = None, + subject_ends_with: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if eventgrid_topic_id is None and 'eventgridTopicId' in kwargs: + eventgrid_topic_id = kwargs['eventgridTopicId'] + if eventgrid_topic_id is None: + raise TypeError("Missing 'eventgrid_topic_id' argument") + if events is None: + raise TypeError("Missing 'events' argument") + if pipelines is None: + raise TypeError("Missing 'pipelines' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if subject_begins_with is None and 'subjectBeginsWith' in kwargs: + subject_begins_with = kwargs['subjectBeginsWith'] + if subject_ends_with is None and 'subjectEndsWith' in kwargs: + subject_ends_with = kwargs['subjectEndsWith'] + + _setter("data_factory_id", data_factory_id) + _setter("eventgrid_topic_id", eventgrid_topic_id) + _setter("events", events) + _setter("pipelines", pipelines) if activated is not None: - pulumi.set(__self__, "activated", activated) + _setter("activated", activated) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subject_begins_with is not None: - pulumi.set(__self__, "subject_begins_with", subject_begins_with) + _setter("subject_begins_with", subject_begins_with) if subject_ends_with is not None: - pulumi.set(__self__, "subject_ends_with", subject_ends_with) + _setter("subject_ends_with", subject_ends_with) @property @pulumi.getter(name="dataFactoryId") @@ -227,28 +276,69 @@ def __init__(__self__, *, > **Note:** At least one of `subject_begins_with` and `subject_ends_with` must be set. """ + _TriggerCustomEventState._configure( + lambda key, value: pulumi.set(__self__, key, value), + activated=activated, + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + eventgrid_topic_id=eventgrid_topic_id, + events=events, + name=name, + pipelines=pipelines, + subject_begins_with=subject_begins_with, + subject_ends_with=subject_ends_with, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + activated: Optional[pulumi.Input[bool]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + eventgrid_topic_id: Optional[pulumi.Input[str]] = None, + events: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + pipelines: Optional[pulumi.Input[Sequence[pulumi.Input['TriggerCustomEventPipelineArgs']]]] = None, + subject_begins_with: Optional[pulumi.Input[str]] = None, + subject_ends_with: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if eventgrid_topic_id is None and 'eventgridTopicId' in kwargs: + eventgrid_topic_id = kwargs['eventgridTopicId'] + if subject_begins_with is None and 'subjectBeginsWith' in kwargs: + subject_begins_with = kwargs['subjectBeginsWith'] + if subject_ends_with is None and 'subjectEndsWith' in kwargs: + subject_ends_with = kwargs['subjectEndsWith'] + if activated is not None: - pulumi.set(__self__, "activated", activated) + _setter("activated", activated) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if eventgrid_topic_id is not None: - pulumi.set(__self__, "eventgrid_topic_id", eventgrid_topic_id) + _setter("eventgrid_topic_id", eventgrid_topic_id) if events is not None: - pulumi.set(__self__, "events", events) + _setter("events", events) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pipelines is not None: - pulumi.set(__self__, "pipelines", pipelines) + _setter("pipelines", pipelines) if subject_begins_with is not None: - pulumi.set(__self__, "subject_begins_with", subject_begins_with) + _setter("subject_begins_with", subject_begins_with) if subject_ends_with is not None: - pulumi.set(__self__, "subject_ends_with", subject_ends_with) + _setter("subject_ends_with", subject_ends_with) @property @pulumi.getter @@ -538,6 +628,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TriggerCustomEventArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datafactory/trigger_schedule.py b/sdk/python/pulumi_azure/datafactory/trigger_schedule.py index 8b24484a21..5a9b72b907 100644 --- a/sdk/python/pulumi_azure/datafactory/trigger_schedule.py +++ b/sdk/python/pulumi_azure/datafactory/trigger_schedule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,33 +47,84 @@ def __init__(__self__, *, :param pulumi.Input[str] start_time: The time the Schedule Trigger will start. This defaults to the current time. The time will be represented in UTC. :param pulumi.Input[str] time_zone: The timezone of the start/end time. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) + TriggerScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + activated=activated, + annotations=annotations, + description=description, + end_time=end_time, + frequency=frequency, + interval=interval, + name=name, + pipeline_name=pipeline_name, + pipeline_parameters=pipeline_parameters, + pipelines=pipelines, + schedule=schedule, + start_time=start_time, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + activated: Optional[pulumi.Input[bool]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + end_time: Optional[pulumi.Input[str]] = None, + frequency: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + pipeline_name: Optional[pulumi.Input[str]] = None, + pipeline_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + pipelines: Optional[pulumi.Input[Sequence[pulumi.Input['TriggerSchedulePipelineArgs']]]] = None, + schedule: Optional[pulumi.Input['TriggerScheduleScheduleArgs']] = None, + start_time: Optional[pulumi.Input[str]] = None, + time_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if pipeline_name is None and 'pipelineName' in kwargs: + pipeline_name = kwargs['pipelineName'] + if pipeline_parameters is None and 'pipelineParameters' in kwargs: + pipeline_parameters = kwargs['pipelineParameters'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + + _setter("data_factory_id", data_factory_id) if activated is not None: - pulumi.set(__self__, "activated", activated) + _setter("activated", activated) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pipeline_name is not None: - pulumi.set(__self__, "pipeline_name", pipeline_name) + _setter("pipeline_name", pipeline_name) if pipeline_parameters is not None: - pulumi.set(__self__, "pipeline_parameters", pipeline_parameters) + _setter("pipeline_parameters", pipeline_parameters) if pipelines is not None: - pulumi.set(__self__, "pipelines", pipelines) + _setter("pipelines", pipelines) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter(name="dataFactoryId") @@ -278,34 +329,83 @@ def __init__(__self__, *, :param pulumi.Input[str] start_time: The time the Schedule Trigger will start. This defaults to the current time. The time will be represented in UTC. :param pulumi.Input[str] time_zone: The timezone of the start/end time. """ + _TriggerScheduleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + activated=activated, + annotations=annotations, + data_factory_id=data_factory_id, + description=description, + end_time=end_time, + frequency=frequency, + interval=interval, + name=name, + pipeline_name=pipeline_name, + pipeline_parameters=pipeline_parameters, + pipelines=pipelines, + schedule=schedule, + start_time=start_time, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + activated: Optional[pulumi.Input[bool]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + end_time: Optional[pulumi.Input[str]] = None, + frequency: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + pipeline_name: Optional[pulumi.Input[str]] = None, + pipeline_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + pipelines: Optional[pulumi.Input[Sequence[pulumi.Input['TriggerSchedulePipelineArgs']]]] = None, + schedule: Optional[pulumi.Input['TriggerScheduleScheduleArgs']] = None, + start_time: Optional[pulumi.Input[str]] = None, + time_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if pipeline_name is None and 'pipelineName' in kwargs: + pipeline_name = kwargs['pipelineName'] + if pipeline_parameters is None and 'pipelineParameters' in kwargs: + pipeline_parameters = kwargs['pipelineParameters'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if activated is not None: - pulumi.set(__self__, "activated", activated) + _setter("activated", activated) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pipeline_name is not None: - pulumi.set(__self__, "pipeline_name", pipeline_name) + _setter("pipeline_name", pipeline_name) if pipeline_parameters is not None: - pulumi.set(__self__, "pipeline_parameters", pipeline_parameters) + _setter("pipeline_parameters", pipeline_parameters) if pipelines is not None: - pulumi.set(__self__, "pipelines", pipelines) + _setter("pipelines", pipelines) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter @@ -587,6 +687,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TriggerScheduleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -628,6 +732,11 @@ def _internal_init(__self__, __props__.__dict__["pipeline_name"] = pipeline_name __props__.__dict__["pipeline_parameters"] = pipeline_parameters __props__.__dict__["pipelines"] = pipelines + if schedule is not None and not isinstance(schedule, TriggerScheduleScheduleArgs): + schedule = schedule or {} + def _setter(key, value): + schedule[key] = value + TriggerScheduleScheduleArgs._configure(_setter, **schedule) __props__.__dict__["schedule"] = schedule __props__.__dict__["start_time"] = start_time __props__.__dict__["time_zone"] = time_zone diff --git a/sdk/python/pulumi_azure/datafactory/trigger_tumbling_window.py b/sdk/python/pulumi_azure/datafactory/trigger_tumbling_window.py index a3140981ba..4f32a35126 100644 --- a/sdk/python/pulumi_azure/datafactory/trigger_tumbling_window.py +++ b/sdk/python/pulumi_azure/datafactory/trigger_tumbling_window.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,31 +49,92 @@ def __init__(__self__, *, :param pulumi.Input['TriggerTumblingWindowRetryArgs'] retry: A `retry` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['TriggerTumblingWindowTriggerDependencyArgs']]] trigger_dependencies: One or more `trigger_dependency` block as defined below. """ - pulumi.set(__self__, "data_factory_id", data_factory_id) - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "pipeline", pipeline) - pulumi.set(__self__, "start_time", start_time) + TriggerTumblingWindowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_factory_id=data_factory_id, + frequency=frequency, + interval=interval, + pipeline=pipeline, + start_time=start_time, + activated=activated, + additional_properties=additional_properties, + annotations=annotations, + delay=delay, + description=description, + end_time=end_time, + max_concurrency=max_concurrency, + name=name, + retry=retry, + trigger_dependencies=trigger_dependencies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_factory_id: Optional[pulumi.Input[str]] = None, + frequency: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[int]] = None, + pipeline: Optional[pulumi.Input['TriggerTumblingWindowPipelineArgs']] = None, + start_time: Optional[pulumi.Input[str]] = None, + activated: Optional[pulumi.Input[bool]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + delay: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + end_time: Optional[pulumi.Input[str]] = None, + max_concurrency: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + retry: Optional[pulumi.Input['TriggerTumblingWindowRetryArgs']] = None, + trigger_dependencies: Optional[pulumi.Input[Sequence[pulumi.Input['TriggerTumblingWindowTriggerDependencyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if data_factory_id is None: + raise TypeError("Missing 'data_factory_id' argument") + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if pipeline is None: + raise TypeError("Missing 'pipeline' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if max_concurrency is None and 'maxConcurrency' in kwargs: + max_concurrency = kwargs['maxConcurrency'] + if trigger_dependencies is None and 'triggerDependencies' in kwargs: + trigger_dependencies = kwargs['triggerDependencies'] + + _setter("data_factory_id", data_factory_id) + _setter("frequency", frequency) + _setter("interval", interval) + _setter("pipeline", pipeline) + _setter("start_time", start_time) if activated is not None: - pulumi.set(__self__, "activated", activated) + _setter("activated", activated) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if delay is not None: - pulumi.set(__self__, "delay", delay) + _setter("delay", delay) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if max_concurrency is not None: - pulumi.set(__self__, "max_concurrency", max_concurrency) + _setter("max_concurrency", max_concurrency) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retry is not None: - pulumi.set(__self__, "retry", retry) + _setter("retry", retry) if trigger_dependencies is not None: - pulumi.set(__self__, "trigger_dependencies", trigger_dependencies) + _setter("trigger_dependencies", trigger_dependencies) @property @pulumi.getter(name="dataFactoryId") @@ -292,36 +353,87 @@ def __init__(__self__, *, :param pulumi.Input[str] start_time: Specifies the start time of Tumbling Window, formatted as an RFC3339 string. Changing this forces a new resource. :param pulumi.Input[Sequence[pulumi.Input['TriggerTumblingWindowTriggerDependencyArgs']]] trigger_dependencies: One or more `trigger_dependency` block as defined below. """ + _TriggerTumblingWindowState._configure( + lambda key, value: pulumi.set(__self__, key, value), + activated=activated, + additional_properties=additional_properties, + annotations=annotations, + data_factory_id=data_factory_id, + delay=delay, + description=description, + end_time=end_time, + frequency=frequency, + interval=interval, + max_concurrency=max_concurrency, + name=name, + pipeline=pipeline, + retry=retry, + start_time=start_time, + trigger_dependencies=trigger_dependencies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + activated: Optional[pulumi.Input[bool]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_factory_id: Optional[pulumi.Input[str]] = None, + delay: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + end_time: Optional[pulumi.Input[str]] = None, + frequency: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[int]] = None, + max_concurrency: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + pipeline: Optional[pulumi.Input['TriggerTumblingWindowPipelineArgs']] = None, + retry: Optional[pulumi.Input['TriggerTumblingWindowRetryArgs']] = None, + start_time: Optional[pulumi.Input[str]] = None, + trigger_dependencies: Optional[pulumi.Input[Sequence[pulumi.Input['TriggerTumblingWindowTriggerDependencyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if data_factory_id is None and 'dataFactoryId' in kwargs: + data_factory_id = kwargs['dataFactoryId'] + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if max_concurrency is None and 'maxConcurrency' in kwargs: + max_concurrency = kwargs['maxConcurrency'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if trigger_dependencies is None and 'triggerDependencies' in kwargs: + trigger_dependencies = kwargs['triggerDependencies'] + if activated is not None: - pulumi.set(__self__, "activated", activated) + _setter("activated", activated) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if data_factory_id is not None: - pulumi.set(__self__, "data_factory_id", data_factory_id) + _setter("data_factory_id", data_factory_id) if delay is not None: - pulumi.set(__self__, "delay", delay) + _setter("delay", delay) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) if max_concurrency is not None: - pulumi.set(__self__, "max_concurrency", max_concurrency) + _setter("max_concurrency", max_concurrency) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pipeline is not None: - pulumi.set(__self__, "pipeline", pipeline) + _setter("pipeline", pipeline) if retry is not None: - pulumi.set(__self__, "retry", retry) + _setter("retry", retry) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if trigger_dependencies is not None: - pulumi.set(__self__, "trigger_dependencies", trigger_dependencies) + _setter("trigger_dependencies", trigger_dependencies) @property @pulumi.getter @@ -669,6 +781,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TriggerTumblingWindowArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -715,9 +831,19 @@ def _internal_init(__self__, __props__.__dict__["interval"] = interval __props__.__dict__["max_concurrency"] = max_concurrency __props__.__dict__["name"] = name + if pipeline is not None and not isinstance(pipeline, TriggerTumblingWindowPipelineArgs): + pipeline = pipeline or {} + def _setter(key, value): + pipeline[key] = value + TriggerTumblingWindowPipelineArgs._configure(_setter, **pipeline) if pipeline is None and not opts.urn: raise TypeError("Missing required property 'pipeline'") __props__.__dict__["pipeline"] = pipeline + if retry is not None and not isinstance(retry, TriggerTumblingWindowRetryArgs): + retry = retry or {} + def _setter(key, value): + retry[key] = value + TriggerTumblingWindowRetryArgs._configure(_setter, **retry) __props__.__dict__["retry"] = retry if start_time is None and not opts.urn: raise TypeError("Missing required property 'start_time'") diff --git a/sdk/python/pulumi_azure/dataprotection/_inputs.py b/sdk/python/pulumi_azure/dataprotection/_inputs.py index 454d11b4fe..344a23f9cf 100644 --- a/sdk/python/pulumi_azure/dataprotection/_inputs.py +++ b/sdk/python/pulumi_azure/dataprotection/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -30,10 +30,35 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this retention rule. Changing this forces a new Backup Policy Disk to be created. :param pulumi.Input[int] priority: Retention Tag priority. Changing this forces a new Backup Policy Disk to be created. """ - pulumi.set(__self__, "criteria", criteria) - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) + BackupPolicyDiskRetentionRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + criteria=criteria, + duration=duration, + name=name, + priority=priority, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + criteria: Optional[pulumi.Input['BackupPolicyDiskRetentionRuleCriteriaArgs']] = None, + duration: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if criteria is None: + raise TypeError("Missing 'criteria' argument") + if duration is None: + raise TypeError("Missing 'duration' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + + _setter("criteria", criteria) + _setter("duration", duration) + _setter("name", name) + _setter("priority", priority) @property @pulumi.getter @@ -91,8 +116,21 @@ def __init__(__self__, *, """ :param pulumi.Input[str] absolute_criteria: Possible values are `FirstOfDay` and `FirstOfWeek`. Changing this forces a new Backup Policy Disk to be created. """ + BackupPolicyDiskRetentionRuleCriteriaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + absolute_criteria=absolute_criteria, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + absolute_criteria: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if absolute_criteria is None and 'absoluteCriteria' in kwargs: + absolute_criteria = kwargs['absoluteCriteria'] + if absolute_criteria is not None: - pulumi.set(__self__, "absolute_criteria", absolute_criteria) + _setter("absolute_criteria", absolute_criteria) @property @pulumi.getter(name="absoluteCriteria") @@ -120,10 +158,35 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this retention rule. Changing this forces a new Backup Policy PostgreSQL to be created. :param pulumi.Input[int] priority: Specifies the priority of the rule. The priority number must be unique for each rule. The lower the priority number, the higher the priority of the rule. Changing this forces a new Backup Policy PostgreSQL to be created. """ - pulumi.set(__self__, "criteria", criteria) - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) + BackupPolicyPostgresqlRetentionRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + criteria=criteria, + duration=duration, + name=name, + priority=priority, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + criteria: Optional[pulumi.Input['BackupPolicyPostgresqlRetentionRuleCriteriaArgs']] = None, + duration: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if criteria is None: + raise TypeError("Missing 'criteria' argument") + if duration is None: + raise TypeError("Missing 'duration' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + + _setter("criteria", criteria) + _setter("duration", duration) + _setter("name", name) + _setter("priority", priority) @property @pulumi.getter @@ -189,16 +252,45 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scheduled_backup_times: Specifies a list of backup times for backup in the `RFC3339` format. Changing this forces a new Backup Policy PostgreSQL to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] weeks_of_months: Possible values are `First`, `Second`, `Third`, `Fourth` and `Last`. Changing this forces a new Backup Policy PostgreSQL to be created. """ + BackupPolicyPostgresqlRetentionRuleCriteriaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + absolute_criteria=absolute_criteria, + days_of_weeks=days_of_weeks, + months_of_years=months_of_years, + scheduled_backup_times=scheduled_backup_times, + weeks_of_months=weeks_of_months, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + absolute_criteria: Optional[pulumi.Input[str]] = None, + days_of_weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + months_of_years: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + scheduled_backup_times: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + weeks_of_months: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if absolute_criteria is None and 'absoluteCriteria' in kwargs: + absolute_criteria = kwargs['absoluteCriteria'] + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if months_of_years is None and 'monthsOfYears' in kwargs: + months_of_years = kwargs['monthsOfYears'] + if scheduled_backup_times is None and 'scheduledBackupTimes' in kwargs: + scheduled_backup_times = kwargs['scheduledBackupTimes'] + if weeks_of_months is None and 'weeksOfMonths' in kwargs: + weeks_of_months = kwargs['weeksOfMonths'] + if absolute_criteria is not None: - pulumi.set(__self__, "absolute_criteria", absolute_criteria) + _setter("absolute_criteria", absolute_criteria) if days_of_weeks is not None: - pulumi.set(__self__, "days_of_weeks", days_of_weeks) + _setter("days_of_weeks", days_of_weeks) if months_of_years is not None: - pulumi.set(__self__, "months_of_years", months_of_years) + _setter("months_of_years", months_of_years) if scheduled_backup_times is not None: - pulumi.set(__self__, "scheduled_backup_times", scheduled_backup_times) + _setter("scheduled_backup_times", scheduled_backup_times) if weeks_of_months is not None: - pulumi.set(__self__, "weeks_of_months", weeks_of_months) + _setter("weeks_of_months", weeks_of_months) @property @pulumi.getter(name="absoluteCriteria") @@ -272,11 +364,32 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Identity of this Backup Vault. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Identity of this Backup Vault. """ - pulumi.set(__self__, "type", type) + BackupVaultIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/dataprotection/backup_instance_blog_storage.py b/sdk/python/pulumi_azure/dataprotection/backup_instance_blog_storage.py index 10fe9ec8f4..ebbb311adf 100644 --- a/sdk/python/pulumi_azure/dataprotection/backup_instance_blog_storage.py +++ b/sdk/python/pulumi_azure/dataprotection/backup_instance_blog_storage.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['BackupInstanceBlogStorageArgs', 'BackupInstanceBlogStorage'] @@ -27,13 +27,44 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created. :param pulumi.Input[str] name: The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created. """ - pulumi.set(__self__, "backup_policy_id", backup_policy_id) - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "vault_id", vault_id) + BackupInstanceBlogStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup_policy_id=backup_policy_id, + storage_account_id=storage_account_id, + vault_id=vault_id, + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup_policy_id: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_policy_id is None and 'backupPolicyId' in kwargs: + backup_policy_id = kwargs['backupPolicyId'] + if backup_policy_id is None: + raise TypeError("Missing 'backup_policy_id' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if vault_id is None: + raise TypeError("Missing 'vault_id' argument") + + _setter("backup_policy_id", backup_policy_id) + _setter("storage_account_id", storage_account_id) + _setter("vault_id", vault_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="backupPolicyId") @@ -112,16 +143,41 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_id: The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created. :param pulumi.Input[str] vault_id: The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created. """ + _BackupInstanceBlogStorageState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup_policy_id=backup_policy_id, + location=location, + name=name, + storage_account_id=storage_account_id, + vault_id=vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup_policy_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_policy_id is None and 'backupPolicyId' in kwargs: + backup_policy_id = kwargs['backupPolicyId'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if backup_policy_id is not None: - pulumi.set(__self__, "backup_policy_id", backup_policy_id) + _setter("backup_policy_id", backup_policy_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if vault_id is not None: - pulumi.set(__self__, "vault_id", vault_id) + _setter("vault_id", vault_id) @property @pulumi.getter(name="backupPolicyId") @@ -311,6 +367,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BackupInstanceBlogStorageArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dataprotection/backup_instance_disk.py b/sdk/python/pulumi_azure/dataprotection/backup_instance_disk.py index 4c0d5e9c24..4783e556df 100644 --- a/sdk/python/pulumi_azure/dataprotection/backup_instance_disk.py +++ b/sdk/python/pulumi_azure/dataprotection/backup_instance_disk.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['BackupInstanceDiskArgs', 'BackupInstanceDisk'] @@ -29,14 +29,51 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The Azure Region where the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created. :param pulumi.Input[str] name: The name which should be used for this Backup Instance Disk. Changing this forces a new Backup Instance Disk to be created. """ - pulumi.set(__self__, "backup_policy_id", backup_policy_id) - pulumi.set(__self__, "disk_id", disk_id) - pulumi.set(__self__, "snapshot_resource_group_name", snapshot_resource_group_name) - pulumi.set(__self__, "vault_id", vault_id) + BackupInstanceDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup_policy_id=backup_policy_id, + disk_id=disk_id, + snapshot_resource_group_name=snapshot_resource_group_name, + vault_id=vault_id, + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup_policy_id: Optional[pulumi.Input[str]] = None, + disk_id: Optional[pulumi.Input[str]] = None, + snapshot_resource_group_name: Optional[pulumi.Input[str]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_policy_id is None and 'backupPolicyId' in kwargs: + backup_policy_id = kwargs['backupPolicyId'] + if backup_policy_id is None: + raise TypeError("Missing 'backup_policy_id' argument") + if disk_id is None and 'diskId' in kwargs: + disk_id = kwargs['diskId'] + if disk_id is None: + raise TypeError("Missing 'disk_id' argument") + if snapshot_resource_group_name is None and 'snapshotResourceGroupName' in kwargs: + snapshot_resource_group_name = kwargs['snapshotResourceGroupName'] + if snapshot_resource_group_name is None: + raise TypeError("Missing 'snapshot_resource_group_name' argument") + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if vault_id is None: + raise TypeError("Missing 'vault_id' argument") + + _setter("backup_policy_id", backup_policy_id) + _setter("disk_id", disk_id) + _setter("snapshot_resource_group_name", snapshot_resource_group_name) + _setter("vault_id", vault_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="backupPolicyId") @@ -129,18 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[str] snapshot_resource_group_name: The name of the Resource Group where snapshots are stored. Changing this forces a new Backup Instance Disk to be created. :param pulumi.Input[str] vault_id: The ID of the Backup Vault within which the Backup Instance Disk should exist. Changing this forces a new Backup Instance Disk to be created. """ + _BackupInstanceDiskState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup_policy_id=backup_policy_id, + disk_id=disk_id, + location=location, + name=name, + snapshot_resource_group_name=snapshot_resource_group_name, + vault_id=vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup_policy_id: Optional[pulumi.Input[str]] = None, + disk_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + snapshot_resource_group_name: Optional[pulumi.Input[str]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_policy_id is None and 'backupPolicyId' in kwargs: + backup_policy_id = kwargs['backupPolicyId'] + if disk_id is None and 'diskId' in kwargs: + disk_id = kwargs['diskId'] + if snapshot_resource_group_name is None and 'snapshotResourceGroupName' in kwargs: + snapshot_resource_group_name = kwargs['snapshotResourceGroupName'] + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if backup_policy_id is not None: - pulumi.set(__self__, "backup_policy_id", backup_policy_id) + _setter("backup_policy_id", backup_policy_id) if disk_id is not None: - pulumi.set(__self__, "disk_id", disk_id) + _setter("disk_id", disk_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if snapshot_resource_group_name is not None: - pulumi.set(__self__, "snapshot_resource_group_name", snapshot_resource_group_name) + _setter("snapshot_resource_group_name", snapshot_resource_group_name) if vault_id is not None: - pulumi.set(__self__, "vault_id", vault_id) + _setter("vault_id", vault_id) @property @pulumi.getter(name="backupPolicyId") @@ -356,6 +422,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BackupInstanceDiskArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dataprotection/backup_instance_postgresql.py b/sdk/python/pulumi_azure/dataprotection/backup_instance_postgresql.py index 8398930d0e..14aa498ed7 100644 --- a/sdk/python/pulumi_azure/dataprotection/backup_instance_postgresql.py +++ b/sdk/python/pulumi_azure/dataprotection/backup_instance_postgresql.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['BackupInstancePostgresqlArgs', 'BackupInstancePostgresql'] @@ -29,15 +29,50 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The location of the source database. Changing this forces a new Backup Instance PostgreSQL to be created. :param pulumi.Input[str] name: The name which should be used for this Backup Instance PostgreSQL. Changing this forces a new Backup Instance PostgreSQL to be created. """ - pulumi.set(__self__, "backup_policy_id", backup_policy_id) - pulumi.set(__self__, "database_id", database_id) - pulumi.set(__self__, "vault_id", vault_id) + BackupInstancePostgresqlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup_policy_id=backup_policy_id, + database_id=database_id, + vault_id=vault_id, + database_credential_key_vault_secret_id=database_credential_key_vault_secret_id, + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup_policy_id: Optional[pulumi.Input[str]] = None, + database_id: Optional[pulumi.Input[str]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + database_credential_key_vault_secret_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_policy_id is None and 'backupPolicyId' in kwargs: + backup_policy_id = kwargs['backupPolicyId'] + if backup_policy_id is None: + raise TypeError("Missing 'backup_policy_id' argument") + if database_id is None and 'databaseId' in kwargs: + database_id = kwargs['databaseId'] + if database_id is None: + raise TypeError("Missing 'database_id' argument") + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if vault_id is None: + raise TypeError("Missing 'vault_id' argument") + if database_credential_key_vault_secret_id is None and 'databaseCredentialKeyVaultSecretId' in kwargs: + database_credential_key_vault_secret_id = kwargs['databaseCredentialKeyVaultSecretId'] + + _setter("backup_policy_id", backup_policy_id) + _setter("database_id", database_id) + _setter("vault_id", vault_id) if database_credential_key_vault_secret_id is not None: - pulumi.set(__self__, "database_credential_key_vault_secret_id", database_credential_key_vault_secret_id) + _setter("database_credential_key_vault_secret_id", database_credential_key_vault_secret_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="backupPolicyId") @@ -130,18 +165,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Backup Instance PostgreSQL. Changing this forces a new Backup Instance PostgreSQL to be created. :param pulumi.Input[str] vault_id: The ID of the Backup Vault within which the PostgreSQL Backup Instance should exist. Changing this forces a new Backup Instance PostgreSQL to be created. """ + _BackupInstancePostgresqlState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup_policy_id=backup_policy_id, + database_credential_key_vault_secret_id=database_credential_key_vault_secret_id, + database_id=database_id, + location=location, + name=name, + vault_id=vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup_policy_id: Optional[pulumi.Input[str]] = None, + database_credential_key_vault_secret_id: Optional[pulumi.Input[str]] = None, + database_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_policy_id is None and 'backupPolicyId' in kwargs: + backup_policy_id = kwargs['backupPolicyId'] + if database_credential_key_vault_secret_id is None and 'databaseCredentialKeyVaultSecretId' in kwargs: + database_credential_key_vault_secret_id = kwargs['databaseCredentialKeyVaultSecretId'] + if database_id is None and 'databaseId' in kwargs: + database_id = kwargs['databaseId'] + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if backup_policy_id is not None: - pulumi.set(__self__, "backup_policy_id", backup_policy_id) + _setter("backup_policy_id", backup_policy_id) if database_credential_key_vault_secret_id is not None: - pulumi.set(__self__, "database_credential_key_vault_secret_id", database_credential_key_vault_secret_id) + _setter("database_credential_key_vault_secret_id", database_credential_key_vault_secret_id) if database_id is not None: - pulumi.set(__self__, "database_id", database_id) + _setter("database_id", database_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if vault_id is not None: - pulumi.set(__self__, "vault_id", vault_id) + _setter("vault_id", vault_id) @property @pulumi.getter(name="backupPolicyId") @@ -471,6 +535,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BackupInstancePostgresqlArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dataprotection/backup_policy_blob_storage.py b/sdk/python/pulumi_azure/dataprotection/backup_policy_blob_storage.py index 527a376bf5..14c013f6b0 100644 --- a/sdk/python/pulumi_azure/dataprotection/backup_policy_blob_storage.py +++ b/sdk/python/pulumi_azure/dataprotection/backup_policy_blob_storage.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['BackupPolicyBlobStorageArgs', 'BackupPolicyBlobStorage'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] vault_id: The ID of the Backup Vault within which the Backup Policy Blob Storage should exist. Changing this forces a new Backup Policy Blob Storage to be created. :param pulumi.Input[str] name: The name which should be used for this Backup Policy Blob Storage. Changing this forces a new Backup Policy Blob Storage to be created. """ - pulumi.set(__self__, "retention_duration", retention_duration) - pulumi.set(__self__, "vault_id", vault_id) + BackupPolicyBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_duration=retention_duration, + vault_id=vault_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_duration: Optional[pulumi.Input[str]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_duration is None and 'retentionDuration' in kwargs: + retention_duration = kwargs['retentionDuration'] + if retention_duration is None: + raise TypeError("Missing 'retention_duration' argument") + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if vault_id is None: + raise TypeError("Missing 'vault_id' argument") + + _setter("retention_duration", retention_duration) + _setter("vault_id", vault_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="retentionDuration") @@ -77,12 +100,31 @@ def __init__(__self__, *, :param pulumi.Input[str] retention_duration: Duration of deletion after given timespan. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created. :param pulumi.Input[str] vault_id: The ID of the Backup Vault within which the Backup Policy Blob Storage should exist. Changing this forces a new Backup Policy Blob Storage to be created. """ + _BackupPolicyBlobStorageState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + retention_duration=retention_duration, + vault_id=vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + retention_duration: Optional[pulumi.Input[str]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_duration is None and 'retentionDuration' in kwargs: + retention_duration = kwargs['retentionDuration'] + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retention_duration is not None: - pulumi.set(__self__, "retention_duration", retention_duration) + _setter("retention_duration", retention_duration) if vault_id is not None: - pulumi.set(__self__, "vault_id", vault_id) + _setter("vault_id", vault_id) @property @pulumi.getter @@ -208,6 +250,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BackupPolicyBlobStorageArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dataprotection/backup_policy_disk.py b/sdk/python/pulumi_azure/dataprotection/backup_policy_disk.py index dfdce1357d..593284a3ee 100644 --- a/sdk/python/pulumi_azure/dataprotection/backup_policy_disk.py +++ b/sdk/python/pulumi_azure/dataprotection/backup_policy_disk.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,13 +29,46 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Backup Policy Disk. Changing this forces a new Backup Policy Disk to be created. :param pulumi.Input[Sequence[pulumi.Input['BackupPolicyDiskRetentionRuleArgs']]] retention_rules: One or more `retention_rule` blocks as defined below. Changing this forces a new Backup Policy Disk to be created. """ - pulumi.set(__self__, "backup_repeating_time_intervals", backup_repeating_time_intervals) - pulumi.set(__self__, "default_retention_duration", default_retention_duration) - pulumi.set(__self__, "vault_id", vault_id) + BackupPolicyDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup_repeating_time_intervals=backup_repeating_time_intervals, + default_retention_duration=default_retention_duration, + vault_id=vault_id, + name=name, + retention_rules=retention_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup_repeating_time_intervals: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_retention_duration: Optional[pulumi.Input[str]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + retention_rules: Optional[pulumi.Input[Sequence[pulumi.Input['BackupPolicyDiskRetentionRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_repeating_time_intervals is None and 'backupRepeatingTimeIntervals' in kwargs: + backup_repeating_time_intervals = kwargs['backupRepeatingTimeIntervals'] + if backup_repeating_time_intervals is None: + raise TypeError("Missing 'backup_repeating_time_intervals' argument") + if default_retention_duration is None and 'defaultRetentionDuration' in kwargs: + default_retention_duration = kwargs['defaultRetentionDuration'] + if default_retention_duration is None: + raise TypeError("Missing 'default_retention_duration' argument") + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if vault_id is None: + raise TypeError("Missing 'vault_id' argument") + if retention_rules is None and 'retentionRules' in kwargs: + retention_rules = kwargs['retentionRules'] + + _setter("backup_repeating_time_intervals", backup_repeating_time_intervals) + _setter("default_retention_duration", default_retention_duration) + _setter("vault_id", vault_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retention_rules is not None: - pulumi.set(__self__, "retention_rules", retention_rules) + _setter("retention_rules", retention_rules) @property @pulumi.getter(name="backupRepeatingTimeIntervals") @@ -114,16 +147,43 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['BackupPolicyDiskRetentionRuleArgs']]] retention_rules: One or more `retention_rule` blocks as defined below. Changing this forces a new Backup Policy Disk to be created. :param pulumi.Input[str] vault_id: The ID of the Backup Vault within which the Backup Policy Disk should exist. Changing this forces a new Backup Policy Disk to be created. """ + _BackupPolicyDiskState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup_repeating_time_intervals=backup_repeating_time_intervals, + default_retention_duration=default_retention_duration, + name=name, + retention_rules=retention_rules, + vault_id=vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup_repeating_time_intervals: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_retention_duration: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + retention_rules: Optional[pulumi.Input[Sequence[pulumi.Input['BackupPolicyDiskRetentionRuleArgs']]]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_repeating_time_intervals is None and 'backupRepeatingTimeIntervals' in kwargs: + backup_repeating_time_intervals = kwargs['backupRepeatingTimeIntervals'] + if default_retention_duration is None and 'defaultRetentionDuration' in kwargs: + default_retention_duration = kwargs['defaultRetentionDuration'] + if retention_rules is None and 'retentionRules' in kwargs: + retention_rules = kwargs['retentionRules'] + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if backup_repeating_time_intervals is not None: - pulumi.set(__self__, "backup_repeating_time_intervals", backup_repeating_time_intervals) + _setter("backup_repeating_time_intervals", backup_repeating_time_intervals) if default_retention_duration is not None: - pulumi.set(__self__, "default_retention_duration", default_retention_duration) + _setter("default_retention_duration", default_retention_duration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retention_rules is not None: - pulumi.set(__self__, "retention_rules", retention_rules) + _setter("retention_rules", retention_rules) if vault_id is not None: - pulumi.set(__self__, "vault_id", vault_id) + _setter("vault_id", vault_id) @property @pulumi.getter(name="backupRepeatingTimeIntervals") @@ -315,6 +375,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BackupPolicyDiskArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dataprotection/backup_policy_postgresql.py b/sdk/python/pulumi_azure/dataprotection/backup_policy_postgresql.py index 70979b1951..97c4206dcc 100644 --- a/sdk/python/pulumi_azure/dataprotection/backup_policy_postgresql.py +++ b/sdk/python/pulumi_azure/dataprotection/backup_policy_postgresql.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,14 +31,53 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Backup Policy PostgreSQL. Changing this forces a new Backup Policy PostgreSQL to be created. :param pulumi.Input[Sequence[pulumi.Input['BackupPolicyPostgresqlRetentionRuleArgs']]] retention_rules: One or more `retention_rule` blocks as defined below. Changing this forces a new Backup Policy PostgreSQL to be created. """ - pulumi.set(__self__, "backup_repeating_time_intervals", backup_repeating_time_intervals) - pulumi.set(__self__, "default_retention_duration", default_retention_duration) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "vault_name", vault_name) + BackupPolicyPostgresqlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup_repeating_time_intervals=backup_repeating_time_intervals, + default_retention_duration=default_retention_duration, + resource_group_name=resource_group_name, + vault_name=vault_name, + name=name, + retention_rules=retention_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup_repeating_time_intervals: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_retention_duration: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + vault_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + retention_rules: Optional[pulumi.Input[Sequence[pulumi.Input['BackupPolicyPostgresqlRetentionRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_repeating_time_intervals is None and 'backupRepeatingTimeIntervals' in kwargs: + backup_repeating_time_intervals = kwargs['backupRepeatingTimeIntervals'] + if backup_repeating_time_intervals is None: + raise TypeError("Missing 'backup_repeating_time_intervals' argument") + if default_retention_duration is None and 'defaultRetentionDuration' in kwargs: + default_retention_duration = kwargs['defaultRetentionDuration'] + if default_retention_duration is None: + raise TypeError("Missing 'default_retention_duration' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if vault_name is None and 'vaultName' in kwargs: + vault_name = kwargs['vaultName'] + if vault_name is None: + raise TypeError("Missing 'vault_name' argument") + if retention_rules is None and 'retentionRules' in kwargs: + retention_rules = kwargs['retentionRules'] + + _setter("backup_repeating_time_intervals", backup_repeating_time_intervals) + _setter("default_retention_duration", default_retention_duration) + _setter("resource_group_name", resource_group_name) + _setter("vault_name", vault_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retention_rules is not None: - pulumi.set(__self__, "retention_rules", retention_rules) + _setter("retention_rules", retention_rules) @property @pulumi.getter(name="backupRepeatingTimeIntervals") @@ -131,18 +170,49 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['BackupPolicyPostgresqlRetentionRuleArgs']]] retention_rules: One or more `retention_rule` blocks as defined below. Changing this forces a new Backup Policy PostgreSQL to be created. :param pulumi.Input[str] vault_name: The name of the Backup Vault where the Backup Policy PostgreSQL should exist. Changing this forces a new Backup Policy PostgreSQL to be created. """ + _BackupPolicyPostgresqlState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backup_repeating_time_intervals=backup_repeating_time_intervals, + default_retention_duration=default_retention_duration, + name=name, + resource_group_name=resource_group_name, + retention_rules=retention_rules, + vault_name=vault_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backup_repeating_time_intervals: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_retention_duration: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_rules: Optional[pulumi.Input[Sequence[pulumi.Input['BackupPolicyPostgresqlRetentionRuleArgs']]]] = None, + vault_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_repeating_time_intervals is None and 'backupRepeatingTimeIntervals' in kwargs: + backup_repeating_time_intervals = kwargs['backupRepeatingTimeIntervals'] + if default_retention_duration is None and 'defaultRetentionDuration' in kwargs: + default_retention_duration = kwargs['defaultRetentionDuration'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retention_rules is None and 'retentionRules' in kwargs: + retention_rules = kwargs['retentionRules'] + if vault_name is None and 'vaultName' in kwargs: + vault_name = kwargs['vaultName'] + if backup_repeating_time_intervals is not None: - pulumi.set(__self__, "backup_repeating_time_intervals", backup_repeating_time_intervals) + _setter("backup_repeating_time_intervals", backup_repeating_time_intervals) if default_retention_duration is not None: - pulumi.set(__self__, "default_retention_duration", default_retention_duration) + _setter("default_retention_duration", default_retention_duration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retention_rules is not None: - pulumi.set(__self__, "retention_rules", retention_rules) + _setter("retention_rules", retention_rules) if vault_name is not None: - pulumi.set(__self__, "vault_name", vault_name) + _setter("vault_name", vault_name) @property @pulumi.getter(name="backupRepeatingTimeIntervals") @@ -378,6 +448,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BackupPolicyPostgresqlArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dataprotection/backup_vault.py b/sdk/python/pulumi_azure/dataprotection/backup_vault.py index 7b57d2837f..dd78259ee5 100644 --- a/sdk/python/pulumi_azure/dataprotection/backup_vault.py +++ b/sdk/python/pulumi_azure/dataprotection/backup_vault.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,50 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Backup Vault. Changing this forces a new Backup Vault to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Backup Vault. """ - pulumi.set(__self__, "datastore_type", datastore_type) - pulumi.set(__self__, "redundancy", redundancy) - pulumi.set(__self__, "resource_group_name", resource_group_name) + BackupVaultArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + datastore_type=datastore_type, + redundancy=redundancy, + resource_group_name=resource_group_name, + identity=identity, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datastore_type: Optional[pulumi.Input[str]] = None, + redundancy: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['BackupVaultIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datastore_type is None and 'datastoreType' in kwargs: + datastore_type = kwargs['datastoreType'] + if datastore_type is None: + raise TypeError("Missing 'datastore_type' argument") + if redundancy is None: + raise TypeError("Missing 'redundancy' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("datastore_type", datastore_type) + _setter("redundancy", redundancy) + _setter("resource_group_name", resource_group_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="datastoreType") @@ -150,20 +183,47 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Backup Vault should exist. Changing this forces a new Backup Vault to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Backup Vault. """ + _BackupVaultState._configure( + lambda key, value: pulumi.set(__self__, key, value), + datastore_type=datastore_type, + identity=identity, + location=location, + name=name, + redundancy=redundancy, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datastore_type: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['BackupVaultIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + redundancy: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datastore_type is None and 'datastoreType' in kwargs: + datastore_type = kwargs['datastoreType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if datastore_type is not None: - pulumi.set(__self__, "datastore_type", datastore_type) + _setter("datastore_type", datastore_type) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if redundancy is not None: - pulumi.set(__self__, "redundancy", redundancy) + _setter("redundancy", redundancy) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="datastoreType") @@ -339,6 +399,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BackupVaultArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -363,6 +427,11 @@ def _internal_init(__self__, if datastore_type is None and not opts.urn: raise TypeError("Missing required property 'datastore_type'") __props__.__dict__["datastore_type"] = datastore_type + if identity is not None and not isinstance(identity, BackupVaultIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + BackupVaultIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/dataprotection/get_backup_vault.py b/sdk/python/pulumi_azure/dataprotection/get_backup_vault.py index 4af9712fa6..21f985211c 100644 --- a/sdk/python/pulumi_azure/dataprotection/get_backup_vault.py +++ b/sdk/python/pulumi_azure/dataprotection/get_backup_vault.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/dataprotection/outputs.py b/sdk/python/pulumi_azure/dataprotection/outputs.py index 727f175bb7..a716798bd5 100644 --- a/sdk/python/pulumi_azure/dataprotection/outputs.py +++ b/sdk/python/pulumi_azure/dataprotection/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -32,10 +32,35 @@ def __init__(__self__, *, :param str name: The name which should be used for this retention rule. Changing this forces a new Backup Policy Disk to be created. :param int priority: Retention Tag priority. Changing this forces a new Backup Policy Disk to be created. """ - pulumi.set(__self__, "criteria", criteria) - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) + BackupPolicyDiskRetentionRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + criteria=criteria, + duration=duration, + name=name, + priority=priority, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + criteria: Optional['outputs.BackupPolicyDiskRetentionRuleCriteria'] = None, + duration: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if criteria is None: + raise TypeError("Missing 'criteria' argument") + if duration is None: + raise TypeError("Missing 'duration' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + + _setter("criteria", criteria) + _setter("duration", duration) + _setter("name", name) + _setter("priority", priority) @property @pulumi.getter @@ -94,8 +119,21 @@ def __init__(__self__, *, """ :param str absolute_criteria: Possible values are `FirstOfDay` and `FirstOfWeek`. Changing this forces a new Backup Policy Disk to be created. """ + BackupPolicyDiskRetentionRuleCriteria._configure( + lambda key, value: pulumi.set(__self__, key, value), + absolute_criteria=absolute_criteria, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + absolute_criteria: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if absolute_criteria is None and 'absoluteCriteria' in kwargs: + absolute_criteria = kwargs['absoluteCriteria'] + if absolute_criteria is not None: - pulumi.set(__self__, "absolute_criteria", absolute_criteria) + _setter("absolute_criteria", absolute_criteria) @property @pulumi.getter(name="absoluteCriteria") @@ -119,10 +157,35 @@ def __init__(__self__, *, :param str name: The name which should be used for this retention rule. Changing this forces a new Backup Policy PostgreSQL to be created. :param int priority: Specifies the priority of the rule. The priority number must be unique for each rule. The lower the priority number, the higher the priority of the rule. Changing this forces a new Backup Policy PostgreSQL to be created. """ - pulumi.set(__self__, "criteria", criteria) - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) + BackupPolicyPostgresqlRetentionRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + criteria=criteria, + duration=duration, + name=name, + priority=priority, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + criteria: Optional['outputs.BackupPolicyPostgresqlRetentionRuleCriteria'] = None, + duration: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if criteria is None: + raise TypeError("Missing 'criteria' argument") + if duration is None: + raise TypeError("Missing 'duration' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + + _setter("criteria", criteria) + _setter("duration", duration) + _setter("name", name) + _setter("priority", priority) @property @pulumi.getter @@ -197,16 +260,45 @@ def __init__(__self__, *, :param Sequence[str] scheduled_backup_times: Specifies a list of backup times for backup in the `RFC3339` format. Changing this forces a new Backup Policy PostgreSQL to be created. :param Sequence[str] weeks_of_months: Possible values are `First`, `Second`, `Third`, `Fourth` and `Last`. Changing this forces a new Backup Policy PostgreSQL to be created. """ + BackupPolicyPostgresqlRetentionRuleCriteria._configure( + lambda key, value: pulumi.set(__self__, key, value), + absolute_criteria=absolute_criteria, + days_of_weeks=days_of_weeks, + months_of_years=months_of_years, + scheduled_backup_times=scheduled_backup_times, + weeks_of_months=weeks_of_months, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + absolute_criteria: Optional[str] = None, + days_of_weeks: Optional[Sequence[str]] = None, + months_of_years: Optional[Sequence[str]] = None, + scheduled_backup_times: Optional[Sequence[str]] = None, + weeks_of_months: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if absolute_criteria is None and 'absoluteCriteria' in kwargs: + absolute_criteria = kwargs['absoluteCriteria'] + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if months_of_years is None and 'monthsOfYears' in kwargs: + months_of_years = kwargs['monthsOfYears'] + if scheduled_backup_times is None and 'scheduledBackupTimes' in kwargs: + scheduled_backup_times = kwargs['scheduledBackupTimes'] + if weeks_of_months is None and 'weeksOfMonths' in kwargs: + weeks_of_months = kwargs['weeksOfMonths'] + if absolute_criteria is not None: - pulumi.set(__self__, "absolute_criteria", absolute_criteria) + _setter("absolute_criteria", absolute_criteria) if days_of_weeks is not None: - pulumi.set(__self__, "days_of_weeks", days_of_weeks) + _setter("days_of_weeks", days_of_weeks) if months_of_years is not None: - pulumi.set(__self__, "months_of_years", months_of_years) + _setter("months_of_years", months_of_years) if scheduled_backup_times is not None: - pulumi.set(__self__, "scheduled_backup_times", scheduled_backup_times) + _setter("scheduled_backup_times", scheduled_backup_times) if weeks_of_months is not None: - pulumi.set(__self__, "weeks_of_months", weeks_of_months) + _setter("weeks_of_months", weeks_of_months) @property @pulumi.getter(name="absoluteCriteria") @@ -279,11 +371,32 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Identity of this Backup Vault. :param str tenant_id: The Tenant ID for the Service Principal associated with the Identity of this Backup Vault. """ - pulumi.set(__self__, "type", type) + BackupVaultIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -321,9 +434,34 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Backup Vault. :param str type: The type of Managed Service Identity that is configured on this Backup Vault. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetBackupVaultIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="principalId") diff --git a/sdk/python/pulumi_azure/dataprotection/resource_guard.py b/sdk/python/pulumi_azure/dataprotection/resource_guard.py index 7451c11970..d5213b6516 100644 --- a/sdk/python/pulumi_azure/dataprotection/resource_guard.py +++ b/sdk/python/pulumi_azure/dataprotection/resource_guard.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ResourceGuardArgs', 'ResourceGuard'] @@ -27,15 +27,40 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Resource Guard. :param pulumi.Input[Sequence[pulumi.Input[str]]] vault_critical_operation_exclusion_lists: A list of the critical operations which are not protected by this Resource Guard. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + ResourceGuardArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + vault_critical_operation_exclusion_lists=vault_critical_operation_exclusion_lists, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + vault_critical_operation_exclusion_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if vault_critical_operation_exclusion_lists is None and 'vaultCriticalOperationExclusionLists' in kwargs: + vault_critical_operation_exclusion_lists = kwargs['vaultCriticalOperationExclusionLists'] + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if vault_critical_operation_exclusion_lists is not None: - pulumi.set(__self__, "vault_critical_operation_exclusion_lists", vault_critical_operation_exclusion_lists) + _setter("vault_critical_operation_exclusion_lists", vault_critical_operation_exclusion_lists) @property @pulumi.getter(name="resourceGroupName") @@ -114,16 +139,39 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Resource Guard. :param pulumi.Input[Sequence[pulumi.Input[str]]] vault_critical_operation_exclusion_lists: A list of the critical operations which are not protected by this Resource Guard. """ + _ResourceGuardState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + vault_critical_operation_exclusion_lists=vault_critical_operation_exclusion_lists, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + vault_critical_operation_exclusion_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if vault_critical_operation_exclusion_lists is None and 'vaultCriticalOperationExclusionLists' in kwargs: + vault_critical_operation_exclusion_lists = kwargs['vaultCriticalOperationExclusionLists'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if vault_critical_operation_exclusion_lists is not None: - pulumi.set(__self__, "vault_critical_operation_exclusion_lists", vault_critical_operation_exclusion_lists) + _setter("vault_critical_operation_exclusion_lists", vault_critical_operation_exclusion_lists) @property @pulumi.getter @@ -267,6 +315,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourceGuardArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datashare/_inputs.py b/sdk/python/pulumi_azure/datashare/_inputs.py index eeb4326139..4626bfd509 100644 --- a/sdk/python/pulumi_azure/datashare/_inputs.py +++ b/sdk/python/pulumi_azure/datashare/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -28,11 +28,32 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Identity of this Data Share Account. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Identity of this Data Share Account. """ - pulumi.set(__self__, "type", type) + AccountIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -84,9 +105,34 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The resource group name of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created. :param pulumi.Input[str] subscription_id: The subscription id of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "subscription_id", subscription_id) + DatasetBlobStorageStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + + _setter("name", name) + _setter("resource_group_name", resource_group_name) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -136,9 +182,32 @@ def __init__(__self__, *, :param pulumi.Input[str] recurrence: The interval of the synchronization with the source data. Possible values are `Hour` and `Day`. :param pulumi.Input[str] start_time: The synchronization with the source data's start time. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "recurrence", recurrence) - pulumi.set(__self__, "start_time", start_time) + ShareSnapshotScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + recurrence=recurrence, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + recurrence: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if recurrence is None: + raise TypeError("Missing 'recurrence' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + + _setter("name", name) + _setter("recurrence", recurrence) + _setter("start_time", start_time) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/datashare/account.py b/sdk/python/pulumi_azure/datashare/account.py index e4a2b09591..65f3778afe 100644 --- a/sdk/python/pulumi_azure/datashare/account.py +++ b/sdk/python/pulumi_azure/datashare/account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,39 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Data Share Account. Changing this forces a new Data Share Account to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Data Share Account. """ - pulumi.set(__self__, "identity", identity) - pulumi.set(__self__, "resource_group_name", resource_group_name) + AccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity=identity, + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity is None: + raise TypeError("Missing 'identity' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("identity", identity) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -115,16 +140,37 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Data Share Account should exist. Changing this forces a new Data Share Account to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Data Share Account. """ + _AccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity=identity, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -280,6 +326,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -299,6 +349,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = AccountArgs.__new__(AccountArgs) + if identity is not None and not isinstance(identity, AccountIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + AccountIdentityArgs._configure(_setter, **identity) if identity is None and not opts.urn: raise TypeError("Missing required property 'identity'") __props__.__dict__["identity"] = identity diff --git a/sdk/python/pulumi_azure/datashare/dataset_blob_storage.py b/sdk/python/pulumi_azure/datashare/dataset_blob_storage.py index 61eca9880e..bbd86eb264 100644 --- a/sdk/python/pulumi_azure/datashare/dataset_blob_storage.py +++ b/sdk/python/pulumi_azure/datashare/dataset_blob_storage.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,15 +31,52 @@ def __init__(__self__, *, :param pulumi.Input[str] folder_path: The path of the folder in the storage container to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created. :param pulumi.Input[str] name: The name which should be used for this Data Share Blob Storage Dataset. Changing this forces a new Data Share Blob Storage Dataset to be created. """ - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "data_share_id", data_share_id) - pulumi.set(__self__, "storage_account", storage_account) + DatasetBlobStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + data_share_id=data_share_id, + storage_account=storage_account, + file_path=file_path, + folder_path=folder_path, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[pulumi.Input[str]] = None, + data_share_id: Optional[pulumi.Input[str]] = None, + storage_account: Optional[pulumi.Input['DatasetBlobStorageStorageAccountArgs']] = None, + file_path: Optional[pulumi.Input[str]] = None, + folder_path: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if data_share_id is None and 'dataShareId' in kwargs: + data_share_id = kwargs['dataShareId'] + if data_share_id is None: + raise TypeError("Missing 'data_share_id' argument") + if storage_account is None and 'storageAccount' in kwargs: + storage_account = kwargs['storageAccount'] + if storage_account is None: + raise TypeError("Missing 'storage_account' argument") + if file_path is None and 'filePath' in kwargs: + file_path = kwargs['filePath'] + if folder_path is None and 'folderPath' in kwargs: + folder_path = kwargs['folderPath'] + + _setter("container_name", container_name) + _setter("data_share_id", data_share_id) + _setter("storage_account", storage_account) if file_path is not None: - pulumi.set(__self__, "file_path", file_path) + _setter("file_path", file_path) if folder_path is not None: - pulumi.set(__self__, "folder_path", folder_path) + _setter("folder_path", folder_path) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="containerName") @@ -134,20 +171,55 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Data Share Blob Storage Dataset. Changing this forces a new Data Share Blob Storage Dataset to be created. :param pulumi.Input['DatasetBlobStorageStorageAccountArgs'] storage_account: A `storage_account` block as defined below. Changing this forces a new resource to be created. """ + _DatasetBlobStorageState._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + data_share_id=data_share_id, + display_name=display_name, + file_path=file_path, + folder_path=folder_path, + name=name, + storage_account=storage_account, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[pulumi.Input[str]] = None, + data_share_id: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + file_path: Optional[pulumi.Input[str]] = None, + folder_path: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account: Optional[pulumi.Input['DatasetBlobStorageStorageAccountArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if data_share_id is None and 'dataShareId' in kwargs: + data_share_id = kwargs['dataShareId'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if file_path is None and 'filePath' in kwargs: + file_path = kwargs['filePath'] + if folder_path is None and 'folderPath' in kwargs: + folder_path = kwargs['folderPath'] + if storage_account is None and 'storageAccount' in kwargs: + storage_account = kwargs['storageAccount'] + if container_name is not None: - pulumi.set(__self__, "container_name", container_name) + _setter("container_name", container_name) if data_share_id is not None: - pulumi.set(__self__, "data_share_id", data_share_id) + _setter("data_share_id", data_share_id) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if file_path is not None: - pulumi.set(__self__, "file_path", file_path) + _setter("file_path", file_path) if folder_path is not None: - pulumi.set(__self__, "folder_path", folder_path) + _setter("folder_path", folder_path) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_account is not None: - pulumi.set(__self__, "storage_account", storage_account) + _setter("storage_account", storage_account) @property @pulumi.getter(name="containerName") @@ -377,6 +449,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetBlobStorageArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -406,6 +482,11 @@ def _internal_init(__self__, __props__.__dict__["file_path"] = file_path __props__.__dict__["folder_path"] = folder_path __props__.__dict__["name"] = name + if storage_account is not None and not isinstance(storage_account, DatasetBlobStorageStorageAccountArgs): + storage_account = storage_account or {} + def _setter(key, value): + storage_account[key] = value + DatasetBlobStorageStorageAccountArgs._configure(_setter, **storage_account) if storage_account is None and not opts.urn: raise TypeError("Missing required property 'storage_account'") __props__.__dict__["storage_account"] = storage_account diff --git a/sdk/python/pulumi_azure/datashare/dataset_data_lake_gen2.py b/sdk/python/pulumi_azure/datashare/dataset_data_lake_gen2.py index 8a9bbcf5ff..1e1a783685 100644 --- a/sdk/python/pulumi_azure/datashare/dataset_data_lake_gen2.py +++ b/sdk/python/pulumi_azure/datashare/dataset_data_lake_gen2.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DatasetDataLakeGen2Args', 'DatasetDataLakeGen2'] @@ -29,15 +29,52 @@ def __init__(__self__, *, :param pulumi.Input[str] folder_path: The folder path in the data lake file system to be shared with the receiver. Conflicts with `file_path` Changing this forces a new Data Share Data Lake Gen2 Dataset to be created. :param pulumi.Input[str] name: The name which should be used for this Data Share Data Lake Gen2 Dataset. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created. """ - pulumi.set(__self__, "file_system_name", file_system_name) - pulumi.set(__self__, "share_id", share_id) - pulumi.set(__self__, "storage_account_id", storage_account_id) + DatasetDataLakeGen2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_system_name=file_system_name, + share_id=share_id, + storage_account_id=storage_account_id, + file_path=file_path, + folder_path=folder_path, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_system_name: Optional[pulumi.Input[str]] = None, + share_id: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + file_path: Optional[pulumi.Input[str]] = None, + folder_path: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_system_name is None and 'fileSystemName' in kwargs: + file_system_name = kwargs['fileSystemName'] + if file_system_name is None: + raise TypeError("Missing 'file_system_name' argument") + if share_id is None and 'shareId' in kwargs: + share_id = kwargs['shareId'] + if share_id is None: + raise TypeError("Missing 'share_id' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if file_path is None and 'filePath' in kwargs: + file_path = kwargs['filePath'] + if folder_path is None and 'folderPath' in kwargs: + folder_path = kwargs['folderPath'] + + _setter("file_system_name", file_system_name) + _setter("share_id", share_id) + _setter("storage_account_id", storage_account_id) if file_path is not None: - pulumi.set(__self__, "file_path", file_path) + _setter("file_path", file_path) if folder_path is not None: - pulumi.set(__self__, "folder_path", folder_path) + _setter("folder_path", folder_path) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="fileSystemName") @@ -132,20 +169,55 @@ def __init__(__self__, *, :param pulumi.Input[str] share_id: The resource ID of the Data Share where this Data Share Data Lake Gen2 Dataset should be created. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created. :param pulumi.Input[str] storage_account_id: The resource id of the storage account of the data lake file system to be shared with the receiver. Changing this forces a new Data Share Data Lake Gen2 Dataset to be created. """ + _DatasetDataLakeGen2State._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + file_path=file_path, + file_system_name=file_system_name, + folder_path=folder_path, + name=name, + share_id=share_id, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + file_path: Optional[pulumi.Input[str]] = None, + file_system_name: Optional[pulumi.Input[str]] = None, + folder_path: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_id: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if file_path is None and 'filePath' in kwargs: + file_path = kwargs['filePath'] + if file_system_name is None and 'fileSystemName' in kwargs: + file_system_name = kwargs['fileSystemName'] + if folder_path is None and 'folderPath' in kwargs: + folder_path = kwargs['folderPath'] + if share_id is None and 'shareId' in kwargs: + share_id = kwargs['shareId'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if file_path is not None: - pulumi.set(__self__, "file_path", file_path) + _setter("file_path", file_path) if file_system_name is not None: - pulumi.set(__self__, "file_system_name", file_system_name) + _setter("file_system_name", file_system_name) if folder_path is not None: - pulumi.set(__self__, "folder_path", folder_path) + _setter("folder_path", folder_path) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if share_id is not None: - pulumi.set(__self__, "share_id", share_id) + _setter("share_id", share_id) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="displayName") @@ -365,6 +437,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetDataLakeGen2Args._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datashare/dataset_kusto_cluster.py b/sdk/python/pulumi_azure/datashare/dataset_kusto_cluster.py index ce7b669fcf..f3373cae96 100644 --- a/sdk/python/pulumi_azure/datashare/dataset_kusto_cluster.py +++ b/sdk/python/pulumi_azure/datashare/dataset_kusto_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DatasetKustoClusterArgs', 'DatasetKustoCluster'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] share_id: The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created. :param pulumi.Input[str] name: The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created. """ - pulumi.set(__self__, "kusto_cluster_id", kusto_cluster_id) - pulumi.set(__self__, "share_id", share_id) + DatasetKustoClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kusto_cluster_id=kusto_cluster_id, + share_id=share_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kusto_cluster_id: Optional[pulumi.Input[str]] = None, + share_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kusto_cluster_id is None and 'kustoClusterId' in kwargs: + kusto_cluster_id = kwargs['kustoClusterId'] + if kusto_cluster_id is None: + raise TypeError("Missing 'kusto_cluster_id' argument") + if share_id is None and 'shareId' in kwargs: + share_id = kwargs['shareId'] + if share_id is None: + raise TypeError("Missing 'share_id' argument") + + _setter("kusto_cluster_id", kusto_cluster_id) + _setter("share_id", share_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="kustoClusterId") @@ -81,16 +104,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created. :param pulumi.Input[str] share_id: The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created. """ + _DatasetKustoClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + kusto_cluster_id=kusto_cluster_id, + kusto_cluster_location=kusto_cluster_location, + name=name, + share_id=share_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + kusto_cluster_id: Optional[pulumi.Input[str]] = None, + kusto_cluster_location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if kusto_cluster_id is None and 'kustoClusterId' in kwargs: + kusto_cluster_id = kwargs['kustoClusterId'] + if kusto_cluster_location is None and 'kustoClusterLocation' in kwargs: + kusto_cluster_location = kwargs['kustoClusterLocation'] + if share_id is None and 'shareId' in kwargs: + share_id = kwargs['shareId'] + if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if kusto_cluster_id is not None: - pulumi.set(__self__, "kusto_cluster_id", kusto_cluster_id) + _setter("kusto_cluster_id", kusto_cluster_id) if kusto_cluster_location is not None: - pulumi.set(__self__, "kusto_cluster_location", kusto_cluster_location) + _setter("kusto_cluster_location", kusto_cluster_location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if share_id is not None: - pulumi.set(__self__, "share_id", share_id) + _setter("share_id", share_id) @property @pulumi.getter(name="displayName") @@ -272,6 +322,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetKustoClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datashare/dataset_kusto_database.py b/sdk/python/pulumi_azure/datashare/dataset_kusto_database.py index 90f9c24e22..b55e71bdee 100644 --- a/sdk/python/pulumi_azure/datashare/dataset_kusto_database.py +++ b/sdk/python/pulumi_azure/datashare/dataset_kusto_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DatasetKustoDatabaseArgs', 'DatasetKustoDatabase'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] share_id: The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created. :param pulumi.Input[str] name: The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created. """ - pulumi.set(__self__, "kusto_database_id", kusto_database_id) - pulumi.set(__self__, "share_id", share_id) + DatasetKustoDatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kusto_database_id=kusto_database_id, + share_id=share_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kusto_database_id: Optional[pulumi.Input[str]] = None, + share_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kusto_database_id is None and 'kustoDatabaseId' in kwargs: + kusto_database_id = kwargs['kustoDatabaseId'] + if kusto_database_id is None: + raise TypeError("Missing 'kusto_database_id' argument") + if share_id is None and 'shareId' in kwargs: + share_id = kwargs['shareId'] + if share_id is None: + raise TypeError("Missing 'share_id' argument") + + _setter("kusto_database_id", kusto_database_id) + _setter("share_id", share_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="kustoDatabaseId") @@ -81,16 +104,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created. :param pulumi.Input[str] share_id: The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created. """ + _DatasetKustoDatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + kusto_cluster_location=kusto_cluster_location, + kusto_database_id=kusto_database_id, + name=name, + share_id=share_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + kusto_cluster_location: Optional[pulumi.Input[str]] = None, + kusto_database_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + share_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if kusto_cluster_location is None and 'kustoClusterLocation' in kwargs: + kusto_cluster_location = kwargs['kustoClusterLocation'] + if kusto_database_id is None and 'kustoDatabaseId' in kwargs: + kusto_database_id = kwargs['kustoDatabaseId'] + if share_id is None and 'shareId' in kwargs: + share_id = kwargs['shareId'] + if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if kusto_cluster_location is not None: - pulumi.set(__self__, "kusto_cluster_location", kusto_cluster_location) + _setter("kusto_cluster_location", kusto_cluster_location) if kusto_database_id is not None: - pulumi.set(__self__, "kusto_database_id", kusto_database_id) + _setter("kusto_database_id", kusto_database_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if share_id is not None: - pulumi.set(__self__, "share_id", share_id) + _setter("share_id", share_id) @property @pulumi.getter(name="displayName") @@ -280,6 +330,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatasetKustoDatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/datashare/get_account.py b/sdk/python/pulumi_azure/datashare/get_account.py index 29f698cc11..cee881f19e 100644 --- a/sdk/python/pulumi_azure/datashare/get_account.py +++ b/sdk/python/pulumi_azure/datashare/get_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/datashare/get_dataset_blob_storage.py b/sdk/python/pulumi_azure/datashare/get_dataset_blob_storage.py index 0203f40b59..618895b199 100644 --- a/sdk/python/pulumi_azure/datashare/get_dataset_blob_storage.py +++ b/sdk/python/pulumi_azure/datashare/get_dataset_blob_storage.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/datashare/get_dataset_data_lake_gen2.py b/sdk/python/pulumi_azure/datashare/get_dataset_data_lake_gen2.py index 9bb67467c5..6502ece00e 100644 --- a/sdk/python/pulumi_azure/datashare/get_dataset_data_lake_gen2.py +++ b/sdk/python/pulumi_azure/datashare/get_dataset_data_lake_gen2.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/datashare/get_dataset_kusto_cluster.py b/sdk/python/pulumi_azure/datashare/get_dataset_kusto_cluster.py index d0424dafeb..32754cfa90 100644 --- a/sdk/python/pulumi_azure/datashare/get_dataset_kusto_cluster.py +++ b/sdk/python/pulumi_azure/datashare/get_dataset_kusto_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/datashare/get_dataset_kusto_database.py b/sdk/python/pulumi_azure/datashare/get_dataset_kusto_database.py index b73dd3b104..feefabe698 100644 --- a/sdk/python/pulumi_azure/datashare/get_dataset_kusto_database.py +++ b/sdk/python/pulumi_azure/datashare/get_dataset_kusto_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/datashare/get_share.py b/sdk/python/pulumi_azure/datashare/get_share.py index 36f6314116..3da7f2c2fa 100644 --- a/sdk/python/pulumi_azure/datashare/get_share.py +++ b/sdk/python/pulumi_azure/datashare/get_share.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/datashare/outputs.py b/sdk/python/pulumi_azure/datashare/outputs.py index 44e1068cb0..1547b0694a 100644 --- a/sdk/python/pulumi_azure/datashare/outputs.py +++ b/sdk/python/pulumi_azure/datashare/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -50,11 +50,32 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Identity of this Data Share Account. :param str tenant_id: The Tenant ID for the Service Principal associated with the Identity of this Data Share Account. """ - pulumi.set(__self__, "type", type) + AccountIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -113,9 +134,34 @@ def __init__(__self__, *, :param str resource_group_name: The resource group name of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created. :param str subscription_id: The subscription id of the storage account to be shared with the receiver. Changing this forces a new Data Share Blob Storage Dataset to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "subscription_id", subscription_id) + DatasetBlobStorageStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + resource_group_name: Optional[str] = None, + subscription_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + + _setter("name", name) + _setter("resource_group_name", resource_group_name) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -170,9 +216,32 @@ def __init__(__self__, *, :param str recurrence: The interval of the synchronization with the source data. Possible values are `Hour` and `Day`. :param str start_time: The synchronization with the source data's start time. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "recurrence", recurrence) - pulumi.set(__self__, "start_time", start_time) + ShareSnapshotSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + recurrence=recurrence, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + recurrence: Optional[str] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if recurrence is None: + raise TypeError("Missing 'recurrence' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + + _setter("name", name) + _setter("recurrence", recurrence) + _setter("start_time", start_time) @property @pulumi.getter @@ -210,9 +279,34 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID associated with this Managed Service Identity. :param str type: The identity type of this Managed Service Identity. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetAccountIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="principalId") @@ -250,9 +344,34 @@ def __init__(__self__, *, :param str resource_group_name: The resource group name of the storage account to be shared with the receiver. :param str subscription_id: The subscription id of the storage account to be shared with the receiver. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "subscription_id", subscription_id) + GetDatasetBlobStorageStorageAccountResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + resource_group_name: Optional[str] = None, + subscription_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + + _setter("name", name) + _setter("resource_group_name", resource_group_name) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -290,9 +409,32 @@ def __init__(__self__, *, :param str recurrence: The interval of the synchronization with the source data. :param str start_time: The synchronization with the source data's start time. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "recurrence", recurrence) - pulumi.set(__self__, "start_time", start_time) + GetShareSnapshotScheduleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + recurrence=recurrence, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + recurrence: Optional[str] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if recurrence is None: + raise TypeError("Missing 'recurrence' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + + _setter("name", name) + _setter("recurrence", recurrence) + _setter("start_time", start_time) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/datashare/share.py b/sdk/python/pulumi_azure/datashare/share.py index f44717e52d..c1dc394ac9 100644 --- a/sdk/python/pulumi_azure/datashare/share.py +++ b/sdk/python/pulumi_azure/datashare/share.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,16 +31,45 @@ def __init__(__self__, *, :param pulumi.Input['ShareSnapshotScheduleArgs'] snapshot_schedule: A `snapshot_schedule` block as defined below. :param pulumi.Input[str] terms: The terms of the Data Share. """ - pulumi.set(__self__, "account_id", account_id) - pulumi.set(__self__, "kind", kind) + ShareArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_id=account_id, + kind=kind, + description=description, + name=name, + snapshot_schedule=snapshot_schedule, + terms=terms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + snapshot_schedule: Optional[pulumi.Input['ShareSnapshotScheduleArgs']] = None, + terms: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_id is None and 'accountId' in kwargs: + account_id = kwargs['accountId'] + if account_id is None: + raise TypeError("Missing 'account_id' argument") + if kind is None: + raise TypeError("Missing 'kind' argument") + if snapshot_schedule is None and 'snapshotSchedule' in kwargs: + snapshot_schedule = kwargs['snapshotSchedule'] + + _setter("account_id", account_id) + _setter("kind", kind) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if snapshot_schedule is not None: - pulumi.set(__self__, "snapshot_schedule", snapshot_schedule) + _setter("snapshot_schedule", snapshot_schedule) if terms is not None: - pulumi.set(__self__, "terms", terms) + _setter("terms", terms) @property @pulumi.getter(name="accountId") @@ -133,18 +162,43 @@ def __init__(__self__, *, :param pulumi.Input['ShareSnapshotScheduleArgs'] snapshot_schedule: A `snapshot_schedule` block as defined below. :param pulumi.Input[str] terms: The terms of the Data Share. """ + _ShareState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_id=account_id, + description=description, + kind=kind, + name=name, + snapshot_schedule=snapshot_schedule, + terms=terms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + snapshot_schedule: Optional[pulumi.Input['ShareSnapshotScheduleArgs']] = None, + terms: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_id is None and 'accountId' in kwargs: + account_id = kwargs['accountId'] + if snapshot_schedule is None and 'snapshotSchedule' in kwargs: + snapshot_schedule = kwargs['snapshotSchedule'] + if account_id is not None: - pulumi.set(__self__, "account_id", account_id) + _setter("account_id", account_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if snapshot_schedule is not None: - pulumi.set(__self__, "snapshot_schedule", snapshot_schedule) + _setter("snapshot_schedule", snapshot_schedule) if terms is not None: - pulumi.set(__self__, "terms", terms) + _setter("terms", terms) @property @pulumi.getter(name="accountId") @@ -334,6 +388,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ShareArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -362,6 +420,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'kind'") __props__.__dict__["kind"] = kind __props__.__dict__["name"] = name + if snapshot_schedule is not None and not isinstance(snapshot_schedule, ShareSnapshotScheduleArgs): + snapshot_schedule = snapshot_schedule or {} + def _setter(key, value): + snapshot_schedule[key] = value + ShareSnapshotScheduleArgs._configure(_setter, **snapshot_schedule) __props__.__dict__["snapshot_schedule"] = snapshot_schedule __props__.__dict__["terms"] = terms super(Share, __self__).__init__( diff --git a/sdk/python/pulumi_azure/desktopvirtualization/_inputs.py b/sdk/python/pulumi_azure/desktopvirtualization/_inputs.py index d9567232df..a3790376f9 100644 --- a/sdk/python/pulumi_azure/desktopvirtualization/_inputs.py +++ b/sdk/python/pulumi_azure/desktopvirtualization/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -31,14 +31,33 @@ def __init__(__self__, *, :param pulumi.Input[str] timezone: Specifies the time zone in which the agent update schedule will apply, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). If `use_session_host_timezone` is enabled then it will override this setting. Default is `UTC` :param pulumi.Input[bool] use_session_host_timezone: Specifies whether scheduled agent updates should be applied based on the timezone of the affected session host. If configured then this setting overrides `timezone`. Default is `false`. """ + HostPoolScheduledAgentUpdatesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + schedules=schedules, + timezone=timezone, + use_session_host_timezone=use_session_host_timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + schedules: Optional[pulumi.Input[Sequence[pulumi.Input['HostPoolScheduledAgentUpdatesScheduleArgs']]]] = None, + timezone: Optional[pulumi.Input[str]] = None, + use_session_host_timezone: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if use_session_host_timezone is None and 'useSessionHostTimezone' in kwargs: + use_session_host_timezone = kwargs['useSessionHostTimezone'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if schedules is not None: - pulumi.set(__self__, "schedules", schedules) + _setter("schedules", schedules) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) if use_session_host_timezone is not None: - pulumi.set(__self__, "use_session_host_timezone", use_session_host_timezone) + _setter("use_session_host_timezone", use_session_host_timezone) @property @pulumi.getter @@ -100,8 +119,29 @@ def __init__(__self__, *, :param pulumi.Input[str] day_of_week: The day of the week on which agent updates should be performed. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, and `Sunday` :param pulumi.Input[int] hour_of_day: The hour of day the update window should start. The update is a 2 hour period following the hour provided. The value should be provided as a number between 0 and 23, with 0 being midnight and 23 being 11pm. A leading zero should not be used. """ - pulumi.set(__self__, "day_of_week", day_of_week) - pulumi.set(__self__, "hour_of_day", hour_of_day) + HostPoolScheduledAgentUpdatesScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + hour_of_day=hour_of_day, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[pulumi.Input[str]] = None, + hour_of_day: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if day_of_week is None: + raise TypeError("Missing 'day_of_week' argument") + if hour_of_day is None and 'hourOfDay' in kwargs: + hour_of_day = kwargs['hourOfDay'] + if hour_of_day is None: + raise TypeError("Missing 'hour_of_day' argument") + + _setter("day_of_week", day_of_week) + _setter("hour_of_day", hour_of_day) @property @pulumi.getter(name="dayOfWeek") @@ -137,8 +177,29 @@ def __init__(__self__, *, :param pulumi.Input[str] hostpool_id: The ID of the HostPool to assign the Scaling Plan to. :param pulumi.Input[bool] scaling_plan_enabled: Specifies if the scaling plan is enabled or disabled for the HostPool. """ - pulumi.set(__self__, "hostpool_id", hostpool_id) - pulumi.set(__self__, "scaling_plan_enabled", scaling_plan_enabled) + ScalingPlanHostPoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + hostpool_id=hostpool_id, + scaling_plan_enabled=scaling_plan_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hostpool_id: Optional[pulumi.Input[str]] = None, + scaling_plan_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hostpool_id is None and 'hostpoolId' in kwargs: + hostpool_id = kwargs['hostpoolId'] + if hostpool_id is None: + raise TypeError("Missing 'hostpool_id' argument") + if scaling_plan_enabled is None and 'scalingPlanEnabled' in kwargs: + scaling_plan_enabled = kwargs['scalingPlanEnabled'] + if scaling_plan_enabled is None: + raise TypeError("Missing 'scaling_plan_enabled' argument") + + _setter("hostpool_id", hostpool_id) + _setter("scaling_plan_enabled", scaling_plan_enabled) @property @pulumi.getter(name="hostpoolId") @@ -206,26 +267,137 @@ def __init__(__self__, *, :param pulumi.Input[int] ramp_up_capacity_threshold_percent: This is the value of percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-up and peak hours. For example, if capacity threshold is specified as `60%` and your total host pool capacity is `100` sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of `60` sessions. :param pulumi.Input[int] ramp_up_minimum_hosts_percent: Specifies the minimum percentage of session host virtual machines to start during ramp-up for peak hours. For example, if Minimum percentage of hosts is specified as `10%` and total number of session hosts in your host pool is `10`, autoscale will ensure a minimum of `1` session host is available to take user connections. """ - pulumi.set(__self__, "days_of_weeks", days_of_weeks) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "off_peak_load_balancing_algorithm", off_peak_load_balancing_algorithm) - pulumi.set(__self__, "off_peak_start_time", off_peak_start_time) - pulumi.set(__self__, "peak_load_balancing_algorithm", peak_load_balancing_algorithm) - pulumi.set(__self__, "peak_start_time", peak_start_time) - pulumi.set(__self__, "ramp_down_capacity_threshold_percent", ramp_down_capacity_threshold_percent) - pulumi.set(__self__, "ramp_down_force_logoff_users", ramp_down_force_logoff_users) - pulumi.set(__self__, "ramp_down_load_balancing_algorithm", ramp_down_load_balancing_algorithm) - pulumi.set(__self__, "ramp_down_minimum_hosts_percent", ramp_down_minimum_hosts_percent) - pulumi.set(__self__, "ramp_down_notification_message", ramp_down_notification_message) - pulumi.set(__self__, "ramp_down_start_time", ramp_down_start_time) - pulumi.set(__self__, "ramp_down_stop_hosts_when", ramp_down_stop_hosts_when) - pulumi.set(__self__, "ramp_down_wait_time_minutes", ramp_down_wait_time_minutes) - pulumi.set(__self__, "ramp_up_load_balancing_algorithm", ramp_up_load_balancing_algorithm) - pulumi.set(__self__, "ramp_up_start_time", ramp_up_start_time) + ScalingPlanScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_weeks=days_of_weeks, + name=name, + off_peak_load_balancing_algorithm=off_peak_load_balancing_algorithm, + off_peak_start_time=off_peak_start_time, + peak_load_balancing_algorithm=peak_load_balancing_algorithm, + peak_start_time=peak_start_time, + ramp_down_capacity_threshold_percent=ramp_down_capacity_threshold_percent, + ramp_down_force_logoff_users=ramp_down_force_logoff_users, + ramp_down_load_balancing_algorithm=ramp_down_load_balancing_algorithm, + ramp_down_minimum_hosts_percent=ramp_down_minimum_hosts_percent, + ramp_down_notification_message=ramp_down_notification_message, + ramp_down_start_time=ramp_down_start_time, + ramp_down_stop_hosts_when=ramp_down_stop_hosts_when, + ramp_down_wait_time_minutes=ramp_down_wait_time_minutes, + ramp_up_load_balancing_algorithm=ramp_up_load_balancing_algorithm, + ramp_up_start_time=ramp_up_start_time, + ramp_up_capacity_threshold_percent=ramp_up_capacity_threshold_percent, + ramp_up_minimum_hosts_percent=ramp_up_minimum_hosts_percent, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + off_peak_load_balancing_algorithm: Optional[pulumi.Input[str]] = None, + off_peak_start_time: Optional[pulumi.Input[str]] = None, + peak_load_balancing_algorithm: Optional[pulumi.Input[str]] = None, + peak_start_time: Optional[pulumi.Input[str]] = None, + ramp_down_capacity_threshold_percent: Optional[pulumi.Input[int]] = None, + ramp_down_force_logoff_users: Optional[pulumi.Input[bool]] = None, + ramp_down_load_balancing_algorithm: Optional[pulumi.Input[str]] = None, + ramp_down_minimum_hosts_percent: Optional[pulumi.Input[int]] = None, + ramp_down_notification_message: Optional[pulumi.Input[str]] = None, + ramp_down_start_time: Optional[pulumi.Input[str]] = None, + ramp_down_stop_hosts_when: Optional[pulumi.Input[str]] = None, + ramp_down_wait_time_minutes: Optional[pulumi.Input[int]] = None, + ramp_up_load_balancing_algorithm: Optional[pulumi.Input[str]] = None, + ramp_up_start_time: Optional[pulumi.Input[str]] = None, + ramp_up_capacity_threshold_percent: Optional[pulumi.Input[int]] = None, + ramp_up_minimum_hosts_percent: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if days_of_weeks is None: + raise TypeError("Missing 'days_of_weeks' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if off_peak_load_balancing_algorithm is None and 'offPeakLoadBalancingAlgorithm' in kwargs: + off_peak_load_balancing_algorithm = kwargs['offPeakLoadBalancingAlgorithm'] + if off_peak_load_balancing_algorithm is None: + raise TypeError("Missing 'off_peak_load_balancing_algorithm' argument") + if off_peak_start_time is None and 'offPeakStartTime' in kwargs: + off_peak_start_time = kwargs['offPeakStartTime'] + if off_peak_start_time is None: + raise TypeError("Missing 'off_peak_start_time' argument") + if peak_load_balancing_algorithm is None and 'peakLoadBalancingAlgorithm' in kwargs: + peak_load_balancing_algorithm = kwargs['peakLoadBalancingAlgorithm'] + if peak_load_balancing_algorithm is None: + raise TypeError("Missing 'peak_load_balancing_algorithm' argument") + if peak_start_time is None and 'peakStartTime' in kwargs: + peak_start_time = kwargs['peakStartTime'] + if peak_start_time is None: + raise TypeError("Missing 'peak_start_time' argument") + if ramp_down_capacity_threshold_percent is None and 'rampDownCapacityThresholdPercent' in kwargs: + ramp_down_capacity_threshold_percent = kwargs['rampDownCapacityThresholdPercent'] + if ramp_down_capacity_threshold_percent is None: + raise TypeError("Missing 'ramp_down_capacity_threshold_percent' argument") + if ramp_down_force_logoff_users is None and 'rampDownForceLogoffUsers' in kwargs: + ramp_down_force_logoff_users = kwargs['rampDownForceLogoffUsers'] + if ramp_down_force_logoff_users is None: + raise TypeError("Missing 'ramp_down_force_logoff_users' argument") + if ramp_down_load_balancing_algorithm is None and 'rampDownLoadBalancingAlgorithm' in kwargs: + ramp_down_load_balancing_algorithm = kwargs['rampDownLoadBalancingAlgorithm'] + if ramp_down_load_balancing_algorithm is None: + raise TypeError("Missing 'ramp_down_load_balancing_algorithm' argument") + if ramp_down_minimum_hosts_percent is None and 'rampDownMinimumHostsPercent' in kwargs: + ramp_down_minimum_hosts_percent = kwargs['rampDownMinimumHostsPercent'] + if ramp_down_minimum_hosts_percent is None: + raise TypeError("Missing 'ramp_down_minimum_hosts_percent' argument") + if ramp_down_notification_message is None and 'rampDownNotificationMessage' in kwargs: + ramp_down_notification_message = kwargs['rampDownNotificationMessage'] + if ramp_down_notification_message is None: + raise TypeError("Missing 'ramp_down_notification_message' argument") + if ramp_down_start_time is None and 'rampDownStartTime' in kwargs: + ramp_down_start_time = kwargs['rampDownStartTime'] + if ramp_down_start_time is None: + raise TypeError("Missing 'ramp_down_start_time' argument") + if ramp_down_stop_hosts_when is None and 'rampDownStopHostsWhen' in kwargs: + ramp_down_stop_hosts_when = kwargs['rampDownStopHostsWhen'] + if ramp_down_stop_hosts_when is None: + raise TypeError("Missing 'ramp_down_stop_hosts_when' argument") + if ramp_down_wait_time_minutes is None and 'rampDownWaitTimeMinutes' in kwargs: + ramp_down_wait_time_minutes = kwargs['rampDownWaitTimeMinutes'] + if ramp_down_wait_time_minutes is None: + raise TypeError("Missing 'ramp_down_wait_time_minutes' argument") + if ramp_up_load_balancing_algorithm is None and 'rampUpLoadBalancingAlgorithm' in kwargs: + ramp_up_load_balancing_algorithm = kwargs['rampUpLoadBalancingAlgorithm'] + if ramp_up_load_balancing_algorithm is None: + raise TypeError("Missing 'ramp_up_load_balancing_algorithm' argument") + if ramp_up_start_time is None and 'rampUpStartTime' in kwargs: + ramp_up_start_time = kwargs['rampUpStartTime'] + if ramp_up_start_time is None: + raise TypeError("Missing 'ramp_up_start_time' argument") + if ramp_up_capacity_threshold_percent is None and 'rampUpCapacityThresholdPercent' in kwargs: + ramp_up_capacity_threshold_percent = kwargs['rampUpCapacityThresholdPercent'] + if ramp_up_minimum_hosts_percent is None and 'rampUpMinimumHostsPercent' in kwargs: + ramp_up_minimum_hosts_percent = kwargs['rampUpMinimumHostsPercent'] + + _setter("days_of_weeks", days_of_weeks) + _setter("name", name) + _setter("off_peak_load_balancing_algorithm", off_peak_load_balancing_algorithm) + _setter("off_peak_start_time", off_peak_start_time) + _setter("peak_load_balancing_algorithm", peak_load_balancing_algorithm) + _setter("peak_start_time", peak_start_time) + _setter("ramp_down_capacity_threshold_percent", ramp_down_capacity_threshold_percent) + _setter("ramp_down_force_logoff_users", ramp_down_force_logoff_users) + _setter("ramp_down_load_balancing_algorithm", ramp_down_load_balancing_algorithm) + _setter("ramp_down_minimum_hosts_percent", ramp_down_minimum_hosts_percent) + _setter("ramp_down_notification_message", ramp_down_notification_message) + _setter("ramp_down_start_time", ramp_down_start_time) + _setter("ramp_down_stop_hosts_when", ramp_down_stop_hosts_when) + _setter("ramp_down_wait_time_minutes", ramp_down_wait_time_minutes) + _setter("ramp_up_load_balancing_algorithm", ramp_up_load_balancing_algorithm) + _setter("ramp_up_start_time", ramp_up_start_time) if ramp_up_capacity_threshold_percent is not None: - pulumi.set(__self__, "ramp_up_capacity_threshold_percent", ramp_up_capacity_threshold_percent) + _setter("ramp_up_capacity_threshold_percent", ramp_up_capacity_threshold_percent) if ramp_up_minimum_hosts_percent is not None: - pulumi.set(__self__, "ramp_up_minimum_hosts_percent", ramp_up_minimum_hosts_percent) + _setter("ramp_up_minimum_hosts_percent", ramp_up_minimum_hosts_percent) @property @pulumi.getter(name="daysOfWeeks") diff --git a/sdk/python/pulumi_azure/desktopvirtualization/application.py b/sdk/python/pulumi_azure/desktopvirtualization/application.py index b134dd516a..9b12cb6672 100644 --- a/sdk/python/pulumi_azure/desktopvirtualization/application.py +++ b/sdk/python/pulumi_azure/desktopvirtualization/application.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApplicationArgs', 'Application'] @@ -37,23 +37,72 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Virtual Desktop Application. Changing the name forces a new resource to be created. :param pulumi.Input[bool] show_in_portal: Specifies whether to show the RemoteApp program in the RD Web Access server. """ - pulumi.set(__self__, "application_group_id", application_group_id) - pulumi.set(__self__, "command_line_argument_policy", command_line_argument_policy) - pulumi.set(__self__, "path", path) + ApplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_group_id=application_group_id, + command_line_argument_policy=command_line_argument_policy, + path=path, + command_line_arguments=command_line_arguments, + description=description, + friendly_name=friendly_name, + icon_index=icon_index, + icon_path=icon_path, + name=name, + show_in_portal=show_in_portal, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_group_id: Optional[pulumi.Input[str]] = None, + command_line_argument_policy: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + command_line_arguments: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + icon_index: Optional[pulumi.Input[int]] = None, + icon_path: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + show_in_portal: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_group_id is None and 'applicationGroupId' in kwargs: + application_group_id = kwargs['applicationGroupId'] + if application_group_id is None: + raise TypeError("Missing 'application_group_id' argument") + if command_line_argument_policy is None and 'commandLineArgumentPolicy' in kwargs: + command_line_argument_policy = kwargs['commandLineArgumentPolicy'] + if command_line_argument_policy is None: + raise TypeError("Missing 'command_line_argument_policy' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if command_line_arguments is None and 'commandLineArguments' in kwargs: + command_line_arguments = kwargs['commandLineArguments'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if icon_index is None and 'iconIndex' in kwargs: + icon_index = kwargs['iconIndex'] + if icon_path is None and 'iconPath' in kwargs: + icon_path = kwargs['iconPath'] + if show_in_portal is None and 'showInPortal' in kwargs: + show_in_portal = kwargs['showInPortal'] + + _setter("application_group_id", application_group_id) + _setter("command_line_argument_policy", command_line_argument_policy) + _setter("path", path) if command_line_arguments is not None: - pulumi.set(__self__, "command_line_arguments", command_line_arguments) + _setter("command_line_arguments", command_line_arguments) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if icon_index is not None: - pulumi.set(__self__, "icon_index", icon_index) + _setter("icon_index", icon_index) if icon_path is not None: - pulumi.set(__self__, "icon_path", icon_path) + _setter("icon_path", icon_path) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if show_in_portal is not None: - pulumi.set(__self__, "show_in_portal", show_in_portal) + _setter("show_in_portal", show_in_portal) @property @pulumi.getter(name="applicationGroupId") @@ -202,26 +251,69 @@ def __init__(__self__, *, :param pulumi.Input[str] path: The file path location of the app on the Virtual Desktop OS. :param pulumi.Input[bool] show_in_portal: Specifies whether to show the RemoteApp program in the RD Web Access server. """ + _ApplicationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_group_id=application_group_id, + command_line_argument_policy=command_line_argument_policy, + command_line_arguments=command_line_arguments, + description=description, + friendly_name=friendly_name, + icon_index=icon_index, + icon_path=icon_path, + name=name, + path=path, + show_in_portal=show_in_portal, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_group_id: Optional[pulumi.Input[str]] = None, + command_line_argument_policy: Optional[pulumi.Input[str]] = None, + command_line_arguments: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + icon_index: Optional[pulumi.Input[int]] = None, + icon_path: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + show_in_portal: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_group_id is None and 'applicationGroupId' in kwargs: + application_group_id = kwargs['applicationGroupId'] + if command_line_argument_policy is None and 'commandLineArgumentPolicy' in kwargs: + command_line_argument_policy = kwargs['commandLineArgumentPolicy'] + if command_line_arguments is None and 'commandLineArguments' in kwargs: + command_line_arguments = kwargs['commandLineArguments'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if icon_index is None and 'iconIndex' in kwargs: + icon_index = kwargs['iconIndex'] + if icon_path is None and 'iconPath' in kwargs: + icon_path = kwargs['iconPath'] + if show_in_portal is None and 'showInPortal' in kwargs: + show_in_portal = kwargs['showInPortal'] + if application_group_id is not None: - pulumi.set(__self__, "application_group_id", application_group_id) + _setter("application_group_id", application_group_id) if command_line_argument_policy is not None: - pulumi.set(__self__, "command_line_argument_policy", command_line_argument_policy) + _setter("command_line_argument_policy", command_line_argument_policy) if command_line_arguments is not None: - pulumi.set(__self__, "command_line_arguments", command_line_arguments) + _setter("command_line_arguments", command_line_arguments) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if icon_index is not None: - pulumi.set(__self__, "icon_index", icon_index) + _setter("icon_index", icon_index) if icon_path is not None: - pulumi.set(__self__, "icon_path", icon_path) + _setter("icon_path", icon_path) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if show_in_portal is not None: - pulumi.set(__self__, "show_in_portal", show_in_portal) + _setter("show_in_portal", show_in_portal) @property @pulumi.getter(name="applicationGroupId") @@ -485,6 +577,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApplicationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/desktopvirtualization/application_group.py b/sdk/python/pulumi_azure/desktopvirtualization/application_group.py index cbf8a01064..2e1faa74bb 100644 --- a/sdk/python/pulumi_azure/desktopvirtualization/application_group.py +++ b/sdk/python/pulumi_azure/desktopvirtualization/application_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApplicationGroupArgs', 'ApplicationGroup'] @@ -35,21 +35,62 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Virtual Desktop Application Group. Changing the name forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "host_pool_id", host_pool_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "type", type) + ApplicationGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_pool_id=host_pool_id, + resource_group_name=resource_group_name, + type=type, + default_desktop_display_name=default_desktop_display_name, + description=description, + friendly_name=friendly_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_pool_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + default_desktop_display_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_pool_id is None and 'hostPoolId' in kwargs: + host_pool_id = kwargs['hostPoolId'] + if host_pool_id is None: + raise TypeError("Missing 'host_pool_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if default_desktop_display_name is None and 'defaultDesktopDisplayName' in kwargs: + default_desktop_display_name = kwargs['defaultDesktopDisplayName'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + + _setter("host_pool_id", host_pool_id) + _setter("resource_group_name", resource_group_name) + _setter("type", type) if default_desktop_display_name is not None: - pulumi.set(__self__, "default_desktop_display_name", default_desktop_display_name) + _setter("default_desktop_display_name", default_desktop_display_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="hostPoolId") @@ -184,24 +225,59 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] type: Type of Virtual Desktop Application Group. Valid options are `RemoteApp` or `Desktop` application groups. Changing this forces a new resource to be created. """ + _ApplicationGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_desktop_display_name=default_desktop_display_name, + description=description, + friendly_name=friendly_name, + host_pool_id=host_pool_id, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_desktop_display_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + host_pool_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_desktop_display_name is None and 'defaultDesktopDisplayName' in kwargs: + default_desktop_display_name = kwargs['defaultDesktopDisplayName'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if host_pool_id is None and 'hostPoolId' in kwargs: + host_pool_id = kwargs['hostPoolId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if default_desktop_display_name is not None: - pulumi.set(__self__, "default_desktop_display_name", default_desktop_display_name) + _setter("default_desktop_display_name", default_desktop_display_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if host_pool_id is not None: - pulumi.set(__self__, "host_pool_id", host_pool_id) + _setter("host_pool_id", host_pool_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="defaultDesktopDisplayName") @@ -445,6 +521,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApplicationGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/desktopvirtualization/get_host_pool.py b/sdk/python/pulumi_azure/desktopvirtualization/get_host_pool.py index c4866ac71a..51cbf9aa8c 100644 --- a/sdk/python/pulumi_azure/desktopvirtualization/get_host_pool.py +++ b/sdk/python/pulumi_azure/desktopvirtualization/get_host_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/desktopvirtualization/get_host_pool_registration_info.py b/sdk/python/pulumi_azure/desktopvirtualization/get_host_pool_registration_info.py index 3f3b095a91..c02dc935b4 100644 --- a/sdk/python/pulumi_azure/desktopvirtualization/get_host_pool_registration_info.py +++ b/sdk/python/pulumi_azure/desktopvirtualization/get_host_pool_registration_info.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['GetHostPoolRegistrationInfoArgs', 'GetHostPoolRegistrationInfo'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] expiration_date: A valid `RFC3339Time` for the expiration of the token.. :param pulumi.Input[str] hostpool_id: The ID of the Virtual Desktop Host Pool to link the Registration Info to. Changing this forces a new Registration Info resource to be created. Only a single virtual_desktop_host_pool_registration_info resource should be associated with a given hostpool. Assigning multiple resources will produce inconsistent results. """ - pulumi.set(__self__, "expiration_date", expiration_date) - pulumi.set(__self__, "hostpool_id", hostpool_id) + GetHostPoolRegistrationInfoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiration_date=expiration_date, + hostpool_id=hostpool_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiration_date: Optional[pulumi.Input[str]] = None, + hostpool_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if expiration_date is None: + raise TypeError("Missing 'expiration_date' argument") + if hostpool_id is None and 'hostpoolId' in kwargs: + hostpool_id = kwargs['hostpoolId'] + if hostpool_id is None: + raise TypeError("Missing 'hostpool_id' argument") + + _setter("expiration_date", expiration_date) + _setter("hostpool_id", hostpool_id) @property @pulumi.getter(name="expirationDate") @@ -61,12 +82,31 @@ def __init__(__self__, *, :param pulumi.Input[str] hostpool_id: The ID of the Virtual Desktop Host Pool to link the Registration Info to. Changing this forces a new Registration Info resource to be created. Only a single virtual_desktop_host_pool_registration_info resource should be associated with a given hostpool. Assigning multiple resources will produce inconsistent results. :param pulumi.Input[str] token: The registration token generated by the Virtual Desktop Host Pool for registration of session hosts. """ + _GetHostPoolRegistrationInfoState._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiration_date=expiration_date, + hostpool_id=hostpool_id, + token=token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiration_date: Optional[pulumi.Input[str]] = None, + hostpool_id: Optional[pulumi.Input[str]] = None, + token: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if hostpool_id is None and 'hostpoolId' in kwargs: + hostpool_id = kwargs['hostpoolId'] + if expiration_date is not None: - pulumi.set(__self__, "expiration_date", expiration_date) + _setter("expiration_date", expiration_date) if hostpool_id is not None: - pulumi.set(__self__, "hostpool_id", hostpool_id) + _setter("hostpool_id", hostpool_id) if token is not None: - pulumi.set(__self__, "token", token) + _setter("token", token) @property @pulumi.getter(name="expirationDate") @@ -192,6 +232,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GetHostPoolRegistrationInfoArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/desktopvirtualization/host_pool.py b/sdk/python/pulumi_azure/desktopvirtualization/host_pool.py index dd4ea7d12f..6962303bd2 100644 --- a/sdk/python/pulumi_azure/desktopvirtualization/host_pool.py +++ b/sdk/python/pulumi_azure/desktopvirtualization/host_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -54,33 +54,98 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] validate_environment: Allows you to test service changes before they are deployed to production. Defaults to `false`. """ - pulumi.set(__self__, "load_balancer_type", load_balancer_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "type", type) + HostPoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + load_balancer_type=load_balancer_type, + resource_group_name=resource_group_name, + type=type, + custom_rdp_properties=custom_rdp_properties, + description=description, + friendly_name=friendly_name, + location=location, + maximum_sessions_allowed=maximum_sessions_allowed, + name=name, + personal_desktop_assignment_type=personal_desktop_assignment_type, + preferred_app_group_type=preferred_app_group_type, + scheduled_agent_updates=scheduled_agent_updates, + start_vm_on_connect=start_vm_on_connect, + tags=tags, + validate_environment=validate_environment, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + load_balancer_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + custom_rdp_properties: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + maximum_sessions_allowed: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + personal_desktop_assignment_type: Optional[pulumi.Input[str]] = None, + preferred_app_group_type: Optional[pulumi.Input[str]] = None, + scheduled_agent_updates: Optional[pulumi.Input['HostPoolScheduledAgentUpdatesArgs']] = None, + start_vm_on_connect: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + validate_environment: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if load_balancer_type is None and 'loadBalancerType' in kwargs: + load_balancer_type = kwargs['loadBalancerType'] + if load_balancer_type is None: + raise TypeError("Missing 'load_balancer_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if custom_rdp_properties is None and 'customRdpProperties' in kwargs: + custom_rdp_properties = kwargs['customRdpProperties'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if maximum_sessions_allowed is None and 'maximumSessionsAllowed' in kwargs: + maximum_sessions_allowed = kwargs['maximumSessionsAllowed'] + if personal_desktop_assignment_type is None and 'personalDesktopAssignmentType' in kwargs: + personal_desktop_assignment_type = kwargs['personalDesktopAssignmentType'] + if preferred_app_group_type is None and 'preferredAppGroupType' in kwargs: + preferred_app_group_type = kwargs['preferredAppGroupType'] + if scheduled_agent_updates is None and 'scheduledAgentUpdates' in kwargs: + scheduled_agent_updates = kwargs['scheduledAgentUpdates'] + if start_vm_on_connect is None and 'startVmOnConnect' in kwargs: + start_vm_on_connect = kwargs['startVmOnConnect'] + if validate_environment is None and 'validateEnvironment' in kwargs: + validate_environment = kwargs['validateEnvironment'] + + _setter("load_balancer_type", load_balancer_type) + _setter("resource_group_name", resource_group_name) + _setter("type", type) if custom_rdp_properties is not None: - pulumi.set(__self__, "custom_rdp_properties", custom_rdp_properties) + _setter("custom_rdp_properties", custom_rdp_properties) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maximum_sessions_allowed is not None: - pulumi.set(__self__, "maximum_sessions_allowed", maximum_sessions_allowed) + _setter("maximum_sessions_allowed", maximum_sessions_allowed) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if personal_desktop_assignment_type is not None: - pulumi.set(__self__, "personal_desktop_assignment_type", personal_desktop_assignment_type) + _setter("personal_desktop_assignment_type", personal_desktop_assignment_type) if preferred_app_group_type is not None: - pulumi.set(__self__, "preferred_app_group_type", preferred_app_group_type) + _setter("preferred_app_group_type", preferred_app_group_type) if scheduled_agent_updates is not None: - pulumi.set(__self__, "scheduled_agent_updates", scheduled_agent_updates) + _setter("scheduled_agent_updates", scheduled_agent_updates) if start_vm_on_connect is not None: - pulumi.set(__self__, "start_vm_on_connect", start_vm_on_connect) + _setter("start_vm_on_connect", start_vm_on_connect) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if validate_environment is not None: - pulumi.set(__self__, "validate_environment", validate_environment) + _setter("validate_environment", validate_environment) @property @pulumi.getter(name="loadBalancerType") @@ -309,36 +374,95 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of the Virtual Desktop Host Pool. Valid options are `Personal` or `Pooled`. Changing the type forces a new resource to be created. :param pulumi.Input[bool] validate_environment: Allows you to test service changes before they are deployed to production. Defaults to `false`. """ + _HostPoolState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_rdp_properties=custom_rdp_properties, + description=description, + friendly_name=friendly_name, + load_balancer_type=load_balancer_type, + location=location, + maximum_sessions_allowed=maximum_sessions_allowed, + name=name, + personal_desktop_assignment_type=personal_desktop_assignment_type, + preferred_app_group_type=preferred_app_group_type, + resource_group_name=resource_group_name, + scheduled_agent_updates=scheduled_agent_updates, + start_vm_on_connect=start_vm_on_connect, + tags=tags, + type=type, + validate_environment=validate_environment, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_rdp_properties: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + load_balancer_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + maximum_sessions_allowed: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + personal_desktop_assignment_type: Optional[pulumi.Input[str]] = None, + preferred_app_group_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scheduled_agent_updates: Optional[pulumi.Input['HostPoolScheduledAgentUpdatesArgs']] = None, + start_vm_on_connect: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + validate_environment: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_rdp_properties is None and 'customRdpProperties' in kwargs: + custom_rdp_properties = kwargs['customRdpProperties'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if load_balancer_type is None and 'loadBalancerType' in kwargs: + load_balancer_type = kwargs['loadBalancerType'] + if maximum_sessions_allowed is None and 'maximumSessionsAllowed' in kwargs: + maximum_sessions_allowed = kwargs['maximumSessionsAllowed'] + if personal_desktop_assignment_type is None and 'personalDesktopAssignmentType' in kwargs: + personal_desktop_assignment_type = kwargs['personalDesktopAssignmentType'] + if preferred_app_group_type is None and 'preferredAppGroupType' in kwargs: + preferred_app_group_type = kwargs['preferredAppGroupType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if scheduled_agent_updates is None and 'scheduledAgentUpdates' in kwargs: + scheduled_agent_updates = kwargs['scheduledAgentUpdates'] + if start_vm_on_connect is None and 'startVmOnConnect' in kwargs: + start_vm_on_connect = kwargs['startVmOnConnect'] + if validate_environment is None and 'validateEnvironment' in kwargs: + validate_environment = kwargs['validateEnvironment'] + if custom_rdp_properties is not None: - pulumi.set(__self__, "custom_rdp_properties", custom_rdp_properties) + _setter("custom_rdp_properties", custom_rdp_properties) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if load_balancer_type is not None: - pulumi.set(__self__, "load_balancer_type", load_balancer_type) + _setter("load_balancer_type", load_balancer_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maximum_sessions_allowed is not None: - pulumi.set(__self__, "maximum_sessions_allowed", maximum_sessions_allowed) + _setter("maximum_sessions_allowed", maximum_sessions_allowed) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if personal_desktop_assignment_type is not None: - pulumi.set(__self__, "personal_desktop_assignment_type", personal_desktop_assignment_type) + _setter("personal_desktop_assignment_type", personal_desktop_assignment_type) if preferred_app_group_type is not None: - pulumi.set(__self__, "preferred_app_group_type", preferred_app_group_type) + _setter("preferred_app_group_type", preferred_app_group_type) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scheduled_agent_updates is not None: - pulumi.set(__self__, "scheduled_agent_updates", scheduled_agent_updates) + _setter("scheduled_agent_updates", scheduled_agent_updates) if start_vm_on_connect is not None: - pulumi.set(__self__, "start_vm_on_connect", start_vm_on_connect) + _setter("start_vm_on_connect", start_vm_on_connect) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if validate_environment is not None: - pulumi.set(__self__, "validate_environment", validate_environment) + _setter("validate_environment", validate_environment) @property @pulumi.getter(name="customRdpProperties") @@ -662,6 +786,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HostPoolArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -705,6 +833,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if scheduled_agent_updates is not None and not isinstance(scheduled_agent_updates, HostPoolScheduledAgentUpdatesArgs): + scheduled_agent_updates = scheduled_agent_updates or {} + def _setter(key, value): + scheduled_agent_updates[key] = value + HostPoolScheduledAgentUpdatesArgs._configure(_setter, **scheduled_agent_updates) __props__.__dict__["scheduled_agent_updates"] = scheduled_agent_updates __props__.__dict__["start_vm_on_connect"] = start_vm_on_connect __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/desktopvirtualization/outputs.py b/sdk/python/pulumi_azure/desktopvirtualization/outputs.py index a31d2bafa5..b405839c98 100644 --- a/sdk/python/pulumi_azure/desktopvirtualization/outputs.py +++ b/sdk/python/pulumi_azure/desktopvirtualization/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -51,14 +51,33 @@ def __init__(__self__, *, :param str timezone: Specifies the time zone in which the agent update schedule will apply, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). If `use_session_host_timezone` is enabled then it will override this setting. Default is `UTC` :param bool use_session_host_timezone: Specifies whether scheduled agent updates should be applied based on the timezone of the affected session host. If configured then this setting overrides `timezone`. Default is `false`. """ + HostPoolScheduledAgentUpdates._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + schedules=schedules, + timezone=timezone, + use_session_host_timezone=use_session_host_timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + schedules: Optional[Sequence['outputs.HostPoolScheduledAgentUpdatesSchedule']] = None, + timezone: Optional[str] = None, + use_session_host_timezone: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if use_session_host_timezone is None and 'useSessionHostTimezone' in kwargs: + use_session_host_timezone = kwargs['useSessionHostTimezone'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if schedules is not None: - pulumi.set(__self__, "schedules", schedules) + _setter("schedules", schedules) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) if use_session_host_timezone is not None: - pulumi.set(__self__, "use_session_host_timezone", use_session_host_timezone) + _setter("use_session_host_timezone", use_session_host_timezone) @property @pulumi.getter @@ -123,8 +142,29 @@ def __init__(__self__, *, :param str day_of_week: The day of the week on which agent updates should be performed. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, and `Sunday` :param int hour_of_day: The hour of day the update window should start. The update is a 2 hour period following the hour provided. The value should be provided as a number between 0 and 23, with 0 being midnight and 23 being 11pm. A leading zero should not be used. """ - pulumi.set(__self__, "day_of_week", day_of_week) - pulumi.set(__self__, "hour_of_day", hour_of_day) + HostPoolScheduledAgentUpdatesSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + hour_of_day=hour_of_day, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[str] = None, + hour_of_day: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if day_of_week is None: + raise TypeError("Missing 'day_of_week' argument") + if hour_of_day is None and 'hourOfDay' in kwargs: + hour_of_day = kwargs['hourOfDay'] + if hour_of_day is None: + raise TypeError("Missing 'hour_of_day' argument") + + _setter("day_of_week", day_of_week) + _setter("hour_of_day", hour_of_day) @property @pulumi.getter(name="dayOfWeek") @@ -171,8 +211,29 @@ def __init__(__self__, *, :param str hostpool_id: The ID of the HostPool to assign the Scaling Plan to. :param bool scaling_plan_enabled: Specifies if the scaling plan is enabled or disabled for the HostPool. """ - pulumi.set(__self__, "hostpool_id", hostpool_id) - pulumi.set(__self__, "scaling_plan_enabled", scaling_plan_enabled) + ScalingPlanHostPool._configure( + lambda key, value: pulumi.set(__self__, key, value), + hostpool_id=hostpool_id, + scaling_plan_enabled=scaling_plan_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hostpool_id: Optional[str] = None, + scaling_plan_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hostpool_id is None and 'hostpoolId' in kwargs: + hostpool_id = kwargs['hostpoolId'] + if hostpool_id is None: + raise TypeError("Missing 'hostpool_id' argument") + if scaling_plan_enabled is None and 'scalingPlanEnabled' in kwargs: + scaling_plan_enabled = kwargs['scalingPlanEnabled'] + if scaling_plan_enabled is None: + raise TypeError("Missing 'scaling_plan_enabled' argument") + + _setter("hostpool_id", hostpool_id) + _setter("scaling_plan_enabled", scaling_plan_enabled) @property @pulumi.getter(name="hostpoolId") @@ -281,26 +342,137 @@ def __init__(__self__, *, :param int ramp_up_capacity_threshold_percent: This is the value of percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-up and peak hours. For example, if capacity threshold is specified as `60%` and your total host pool capacity is `100` sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of `60` sessions. :param int ramp_up_minimum_hosts_percent: Specifies the minimum percentage of session host virtual machines to start during ramp-up for peak hours. For example, if Minimum percentage of hosts is specified as `10%` and total number of session hosts in your host pool is `10`, autoscale will ensure a minimum of `1` session host is available to take user connections. """ - pulumi.set(__self__, "days_of_weeks", days_of_weeks) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "off_peak_load_balancing_algorithm", off_peak_load_balancing_algorithm) - pulumi.set(__self__, "off_peak_start_time", off_peak_start_time) - pulumi.set(__self__, "peak_load_balancing_algorithm", peak_load_balancing_algorithm) - pulumi.set(__self__, "peak_start_time", peak_start_time) - pulumi.set(__self__, "ramp_down_capacity_threshold_percent", ramp_down_capacity_threshold_percent) - pulumi.set(__self__, "ramp_down_force_logoff_users", ramp_down_force_logoff_users) - pulumi.set(__self__, "ramp_down_load_balancing_algorithm", ramp_down_load_balancing_algorithm) - pulumi.set(__self__, "ramp_down_minimum_hosts_percent", ramp_down_minimum_hosts_percent) - pulumi.set(__self__, "ramp_down_notification_message", ramp_down_notification_message) - pulumi.set(__self__, "ramp_down_start_time", ramp_down_start_time) - pulumi.set(__self__, "ramp_down_stop_hosts_when", ramp_down_stop_hosts_when) - pulumi.set(__self__, "ramp_down_wait_time_minutes", ramp_down_wait_time_minutes) - pulumi.set(__self__, "ramp_up_load_balancing_algorithm", ramp_up_load_balancing_algorithm) - pulumi.set(__self__, "ramp_up_start_time", ramp_up_start_time) + ScalingPlanSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_weeks=days_of_weeks, + name=name, + off_peak_load_balancing_algorithm=off_peak_load_balancing_algorithm, + off_peak_start_time=off_peak_start_time, + peak_load_balancing_algorithm=peak_load_balancing_algorithm, + peak_start_time=peak_start_time, + ramp_down_capacity_threshold_percent=ramp_down_capacity_threshold_percent, + ramp_down_force_logoff_users=ramp_down_force_logoff_users, + ramp_down_load_balancing_algorithm=ramp_down_load_balancing_algorithm, + ramp_down_minimum_hosts_percent=ramp_down_minimum_hosts_percent, + ramp_down_notification_message=ramp_down_notification_message, + ramp_down_start_time=ramp_down_start_time, + ramp_down_stop_hosts_when=ramp_down_stop_hosts_when, + ramp_down_wait_time_minutes=ramp_down_wait_time_minutes, + ramp_up_load_balancing_algorithm=ramp_up_load_balancing_algorithm, + ramp_up_start_time=ramp_up_start_time, + ramp_up_capacity_threshold_percent=ramp_up_capacity_threshold_percent, + ramp_up_minimum_hosts_percent=ramp_up_minimum_hosts_percent, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_weeks: Optional[Sequence[str]] = None, + name: Optional[str] = None, + off_peak_load_balancing_algorithm: Optional[str] = None, + off_peak_start_time: Optional[str] = None, + peak_load_balancing_algorithm: Optional[str] = None, + peak_start_time: Optional[str] = None, + ramp_down_capacity_threshold_percent: Optional[int] = None, + ramp_down_force_logoff_users: Optional[bool] = None, + ramp_down_load_balancing_algorithm: Optional[str] = None, + ramp_down_minimum_hosts_percent: Optional[int] = None, + ramp_down_notification_message: Optional[str] = None, + ramp_down_start_time: Optional[str] = None, + ramp_down_stop_hosts_when: Optional[str] = None, + ramp_down_wait_time_minutes: Optional[int] = None, + ramp_up_load_balancing_algorithm: Optional[str] = None, + ramp_up_start_time: Optional[str] = None, + ramp_up_capacity_threshold_percent: Optional[int] = None, + ramp_up_minimum_hosts_percent: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if days_of_weeks is None: + raise TypeError("Missing 'days_of_weeks' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if off_peak_load_balancing_algorithm is None and 'offPeakLoadBalancingAlgorithm' in kwargs: + off_peak_load_balancing_algorithm = kwargs['offPeakLoadBalancingAlgorithm'] + if off_peak_load_balancing_algorithm is None: + raise TypeError("Missing 'off_peak_load_balancing_algorithm' argument") + if off_peak_start_time is None and 'offPeakStartTime' in kwargs: + off_peak_start_time = kwargs['offPeakStartTime'] + if off_peak_start_time is None: + raise TypeError("Missing 'off_peak_start_time' argument") + if peak_load_balancing_algorithm is None and 'peakLoadBalancingAlgorithm' in kwargs: + peak_load_balancing_algorithm = kwargs['peakLoadBalancingAlgorithm'] + if peak_load_balancing_algorithm is None: + raise TypeError("Missing 'peak_load_balancing_algorithm' argument") + if peak_start_time is None and 'peakStartTime' in kwargs: + peak_start_time = kwargs['peakStartTime'] + if peak_start_time is None: + raise TypeError("Missing 'peak_start_time' argument") + if ramp_down_capacity_threshold_percent is None and 'rampDownCapacityThresholdPercent' in kwargs: + ramp_down_capacity_threshold_percent = kwargs['rampDownCapacityThresholdPercent'] + if ramp_down_capacity_threshold_percent is None: + raise TypeError("Missing 'ramp_down_capacity_threshold_percent' argument") + if ramp_down_force_logoff_users is None and 'rampDownForceLogoffUsers' in kwargs: + ramp_down_force_logoff_users = kwargs['rampDownForceLogoffUsers'] + if ramp_down_force_logoff_users is None: + raise TypeError("Missing 'ramp_down_force_logoff_users' argument") + if ramp_down_load_balancing_algorithm is None and 'rampDownLoadBalancingAlgorithm' in kwargs: + ramp_down_load_balancing_algorithm = kwargs['rampDownLoadBalancingAlgorithm'] + if ramp_down_load_balancing_algorithm is None: + raise TypeError("Missing 'ramp_down_load_balancing_algorithm' argument") + if ramp_down_minimum_hosts_percent is None and 'rampDownMinimumHostsPercent' in kwargs: + ramp_down_minimum_hosts_percent = kwargs['rampDownMinimumHostsPercent'] + if ramp_down_minimum_hosts_percent is None: + raise TypeError("Missing 'ramp_down_minimum_hosts_percent' argument") + if ramp_down_notification_message is None and 'rampDownNotificationMessage' in kwargs: + ramp_down_notification_message = kwargs['rampDownNotificationMessage'] + if ramp_down_notification_message is None: + raise TypeError("Missing 'ramp_down_notification_message' argument") + if ramp_down_start_time is None and 'rampDownStartTime' in kwargs: + ramp_down_start_time = kwargs['rampDownStartTime'] + if ramp_down_start_time is None: + raise TypeError("Missing 'ramp_down_start_time' argument") + if ramp_down_stop_hosts_when is None and 'rampDownStopHostsWhen' in kwargs: + ramp_down_stop_hosts_when = kwargs['rampDownStopHostsWhen'] + if ramp_down_stop_hosts_when is None: + raise TypeError("Missing 'ramp_down_stop_hosts_when' argument") + if ramp_down_wait_time_minutes is None and 'rampDownWaitTimeMinutes' in kwargs: + ramp_down_wait_time_minutes = kwargs['rampDownWaitTimeMinutes'] + if ramp_down_wait_time_minutes is None: + raise TypeError("Missing 'ramp_down_wait_time_minutes' argument") + if ramp_up_load_balancing_algorithm is None and 'rampUpLoadBalancingAlgorithm' in kwargs: + ramp_up_load_balancing_algorithm = kwargs['rampUpLoadBalancingAlgorithm'] + if ramp_up_load_balancing_algorithm is None: + raise TypeError("Missing 'ramp_up_load_balancing_algorithm' argument") + if ramp_up_start_time is None and 'rampUpStartTime' in kwargs: + ramp_up_start_time = kwargs['rampUpStartTime'] + if ramp_up_start_time is None: + raise TypeError("Missing 'ramp_up_start_time' argument") + if ramp_up_capacity_threshold_percent is None and 'rampUpCapacityThresholdPercent' in kwargs: + ramp_up_capacity_threshold_percent = kwargs['rampUpCapacityThresholdPercent'] + if ramp_up_minimum_hosts_percent is None and 'rampUpMinimumHostsPercent' in kwargs: + ramp_up_minimum_hosts_percent = kwargs['rampUpMinimumHostsPercent'] + + _setter("days_of_weeks", days_of_weeks) + _setter("name", name) + _setter("off_peak_load_balancing_algorithm", off_peak_load_balancing_algorithm) + _setter("off_peak_start_time", off_peak_start_time) + _setter("peak_load_balancing_algorithm", peak_load_balancing_algorithm) + _setter("peak_start_time", peak_start_time) + _setter("ramp_down_capacity_threshold_percent", ramp_down_capacity_threshold_percent) + _setter("ramp_down_force_logoff_users", ramp_down_force_logoff_users) + _setter("ramp_down_load_balancing_algorithm", ramp_down_load_balancing_algorithm) + _setter("ramp_down_minimum_hosts_percent", ramp_down_minimum_hosts_percent) + _setter("ramp_down_notification_message", ramp_down_notification_message) + _setter("ramp_down_start_time", ramp_down_start_time) + _setter("ramp_down_stop_hosts_when", ramp_down_stop_hosts_when) + _setter("ramp_down_wait_time_minutes", ramp_down_wait_time_minutes) + _setter("ramp_up_load_balancing_algorithm", ramp_up_load_balancing_algorithm) + _setter("ramp_up_start_time", ramp_up_start_time) if ramp_up_capacity_threshold_percent is not None: - pulumi.set(__self__, "ramp_up_capacity_threshold_percent", ramp_up_capacity_threshold_percent) + _setter("ramp_up_capacity_threshold_percent", ramp_up_capacity_threshold_percent) if ramp_up_minimum_hosts_percent is not None: - pulumi.set(__self__, "ramp_up_minimum_hosts_percent", ramp_up_minimum_hosts_percent) + _setter("ramp_up_minimum_hosts_percent", ramp_up_minimum_hosts_percent) @property @pulumi.getter(name="daysOfWeeks") @@ -460,10 +632,37 @@ def __init__(__self__, *, :param str timezone: The time zone in which the agent update schedule will apply. :param bool use_session_host_timezone: Specifies whether scheduled agent updates should be applied based on the timezone of the affected session host. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "timezone", timezone) - pulumi.set(__self__, "use_session_host_timezone", use_session_host_timezone) + GetHostPoolScheduledAgentUpdateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + schedules=schedules, + timezone=timezone, + use_session_host_timezone=use_session_host_timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + schedules: Optional[Sequence['outputs.GetHostPoolScheduledAgentUpdateScheduleResult']] = None, + timezone: Optional[str] = None, + use_session_host_timezone: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if timezone is None: + raise TypeError("Missing 'timezone' argument") + if use_session_host_timezone is None and 'useSessionHostTimezone' in kwargs: + use_session_host_timezone = kwargs['useSessionHostTimezone'] + if use_session_host_timezone is None: + raise TypeError("Missing 'use_session_host_timezone' argument") + + _setter("enabled", enabled) + _setter("schedules", schedules) + _setter("timezone", timezone) + _setter("use_session_host_timezone", use_session_host_timezone) @property @pulumi.getter @@ -507,8 +706,29 @@ def __init__(__self__, *, :param str day_of_week: The day of the week on which agent updates should be performed. :param int hour_of_day: The hour of day the update window should start. """ - pulumi.set(__self__, "day_of_week", day_of_week) - pulumi.set(__self__, "hour_of_day", hour_of_day) + GetHostPoolScheduledAgentUpdateScheduleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + hour_of_day=hour_of_day, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[str] = None, + hour_of_day: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if day_of_week is None: + raise TypeError("Missing 'day_of_week' argument") + if hour_of_day is None and 'hourOfDay' in kwargs: + hour_of_day = kwargs['hourOfDay'] + if hour_of_day is None: + raise TypeError("Missing 'hour_of_day' argument") + + _setter("day_of_week", day_of_week) + _setter("hour_of_day", hour_of_day) @property @pulumi.getter(name="dayOfWeek") diff --git a/sdk/python/pulumi_azure/desktopvirtualization/scaling_plan.py b/sdk/python/pulumi_azure/desktopvirtualization/scaling_plan.py index c7f49de596..de2f042cad 100644 --- a/sdk/python/pulumi_azure/desktopvirtualization/scaling_plan.py +++ b/sdk/python/pulumi_azure/desktopvirtualization/scaling_plan.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,23 +39,68 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan . """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "time_zone", time_zone) + ScalingPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + schedules=schedules, + time_zone=time_zone, + description=description, + exclusion_tag=exclusion_tag, + friendly_name=friendly_name, + host_pools=host_pools, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + schedules: Optional[pulumi.Input[Sequence[pulumi.Input['ScalingPlanScheduleArgs']]]] = None, + time_zone: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + exclusion_tag: Optional[pulumi.Input[str]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + host_pools: Optional[pulumi.Input[Sequence[pulumi.Input['ScalingPlanHostPoolArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if time_zone is None: + raise TypeError("Missing 'time_zone' argument") + if exclusion_tag is None and 'exclusionTag' in kwargs: + exclusion_tag = kwargs['exclusionTag'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if host_pools is None and 'hostPools' in kwargs: + host_pools = kwargs['hostPools'] + + _setter("resource_group_name", resource_group_name) + _setter("schedules", schedules) + _setter("time_zone", time_zone) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if exclusion_tag is not None: - pulumi.set(__self__, "exclusion_tag", exclusion_tag) + _setter("exclusion_tag", exclusion_tag) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if host_pools is not None: - pulumi.set(__self__, "host_pools", host_pools) + _setter("host_pools", host_pools) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -204,26 +249,65 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan . :param pulumi.Input[str] time_zone: Specifies the Time Zone which should be used by the Scaling Plan for time based events, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). """ + _ScalingPlanState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + exclusion_tag=exclusion_tag, + friendly_name=friendly_name, + host_pools=host_pools, + location=location, + name=name, + resource_group_name=resource_group_name, + schedules=schedules, + tags=tags, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + exclusion_tag: Optional[pulumi.Input[str]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + host_pools: Optional[pulumi.Input[Sequence[pulumi.Input['ScalingPlanHostPoolArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + schedules: Optional[pulumi.Input[Sequence[pulumi.Input['ScalingPlanScheduleArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + time_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exclusion_tag is None and 'exclusionTag' in kwargs: + exclusion_tag = kwargs['exclusionTag'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if host_pools is None and 'hostPools' in kwargs: + host_pools = kwargs['hostPools'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if exclusion_tag is not None: - pulumi.set(__self__, "exclusion_tag", exclusion_tag) + _setter("exclusion_tag", exclusion_tag) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if host_pools is not None: - pulumi.set(__self__, "host_pools", host_pools) + _setter("host_pools", host_pools) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if schedules is not None: - pulumi.set(__self__, "schedules", schedules) + _setter("schedules", schedules) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter @@ -593,6 +677,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ScalingPlanArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/desktopvirtualization/workspace.py b/sdk/python/pulumi_azure/desktopvirtualization/workspace.py index 3a98e79894..b4b2efcf6b 100644 --- a/sdk/python/pulumi_azure/desktopvirtualization/workspace.py +++ b/sdk/python/pulumi_azure/desktopvirtualization/workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WorkspaceArgs', 'Workspace'] @@ -31,19 +31,50 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether public network access is allowed for this Virtual Desktop Workspace. Defaults to `true`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + WorkspaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + description=description, + friendly_name=friendly_name, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -150,20 +181,49 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Virtual Desktop Workspace. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _WorkspaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + friendly_name=friendly_name, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -339,6 +399,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/desktopvirtualization/workspace_application_group_association.py b/sdk/python/pulumi_azure/desktopvirtualization/workspace_application_group_association.py index a72cab4478..e93261309d 100644 --- a/sdk/python/pulumi_azure/desktopvirtualization/workspace_application_group_association.py +++ b/sdk/python/pulumi_azure/desktopvirtualization/workspace_application_group_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WorkspaceApplicationGroupAssociationArgs', 'WorkspaceApplicationGroupAssociation'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] application_group_id: The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created. :param pulumi.Input[str] workspace_id: The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "application_group_id", application_group_id) - pulumi.set(__self__, "workspace_id", workspace_id) + WorkspaceApplicationGroupAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_group_id=application_group_id, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_group_id: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_group_id is None and 'applicationGroupId' in kwargs: + application_group_id = kwargs['applicationGroupId'] + if application_group_id is None: + raise TypeError("Missing 'application_group_id' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + + _setter("application_group_id", application_group_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="applicationGroupId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] application_group_id: The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created. :param pulumi.Input[str] workspace_id: The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created. """ + _WorkspaceApplicationGroupAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_group_id=application_group_id, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_group_id: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_group_id is None and 'applicationGroupId' in kwargs: + application_group_id = kwargs['applicationGroupId'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if application_group_id is not None: - pulumi.set(__self__, "application_group_id", application_group_id) + _setter("application_group_id", application_group_id) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="applicationGroupId") @@ -190,6 +228,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceApplicationGroupAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/devcenter/_inputs.py b/sdk/python/pulumi_azure/devcenter/_inputs.py index 7deca0a838..2e808d8f4f 100644 --- a/sdk/python/pulumi_azure/devcenter/_inputs.py +++ b/sdk/python/pulumi_azure/devcenter/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -20,13 +20,38 @@ def __init__(__self__, *, identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, principal_id: Optional[pulumi.Input[str]] = None, tenant_id: Optional[pulumi.Input[str]] = None): - pulumi.set(__self__, "type", type) + DevCenterIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/devcenter/dev_center.py b/sdk/python/pulumi_azure/devcenter/dev_center.py index 9f269171a3..e1833dfe0a 100644 --- a/sdk/python/pulumi_azure/devcenter/dev_center.py +++ b/sdk/python/pulumi_azure/devcenter/dev_center.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,15 +29,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of this Dev Center. Changing this forces a new Dev Center to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Dev Center. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + DevCenterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + identity=identity, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['DevCenterIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -118,18 +141,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group within which this Dev Center should exist. Changing this forces a new Dev Center to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Dev Center. """ + _DevCenterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dev_center_uri=dev_center_uri, + identity=identity, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dev_center_uri: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['DevCenterIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dev_center_uri is None and 'devCenterUri' in kwargs: + dev_center_uri = kwargs['devCenterUri'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if dev_center_uri is not None: - pulumi.set(__self__, "dev_center_uri", dev_center_uri) + _setter("dev_center_uri", dev_center_uri) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="devCenterUri") @@ -325,6 +373,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DevCenterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -344,6 +396,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = DevCenterArgs.__new__(DevCenterArgs) + if identity is not None and not isinstance(identity, DevCenterIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + DevCenterIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/devcenter/outputs.py b/sdk/python/pulumi_azure/devcenter/outputs.py index e21c284f37..38ac6f615a 100644 --- a/sdk/python/pulumi_azure/devcenter/outputs.py +++ b/sdk/python/pulumi_azure/devcenter/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -41,13 +41,38 @@ def __init__(__self__, *, identity_ids: Optional[Sequence[str]] = None, principal_id: Optional[str] = None, tenant_id: Optional[str] = None): - pulumi.set(__self__, "type", type) + DevCenterIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/devcenter/project.py b/sdk/python/pulumi_azure/devcenter/project.py index 08955662c3..b60316f1e5 100644 --- a/sdk/python/pulumi_azure/devcenter/project.py +++ b/sdk/python/pulumi_azure/devcenter/project.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ProjectArgs', 'Project'] @@ -31,18 +31,51 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of this Dev Center Project. Changing this forces a new Dev Center Project to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Dev Center Project. """ - pulumi.set(__self__, "dev_center_id", dev_center_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ProjectArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dev_center_id=dev_center_id, + resource_group_name=resource_group_name, + description=description, + location=location, + maximum_dev_boxes_per_user=maximum_dev_boxes_per_user, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dev_center_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + maximum_dev_boxes_per_user: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dev_center_id is None and 'devCenterId' in kwargs: + dev_center_id = kwargs['devCenterId'] + if dev_center_id is None: + raise TypeError("Missing 'dev_center_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if maximum_dev_boxes_per_user is None and 'maximumDevBoxesPerUser' in kwargs: + maximum_dev_boxes_per_user = kwargs['maximumDevBoxesPerUser'] + + _setter("dev_center_id", dev_center_id) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maximum_dev_boxes_per_user is not None: - pulumi.set(__self__, "maximum_dev_boxes_per_user", maximum_dev_boxes_per_user) + _setter("maximum_dev_boxes_per_user", maximum_dev_boxes_per_user) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="devCenterId") @@ -151,22 +184,55 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group within which this Dev Center Project should exist. Changing this forces a new Dev Center Project to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Dev Center Project. """ + _ProjectState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + dev_center_id=dev_center_id, + dev_center_uri=dev_center_uri, + location=location, + maximum_dev_boxes_per_user=maximum_dev_boxes_per_user, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + dev_center_id: Optional[pulumi.Input[str]] = None, + dev_center_uri: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + maximum_dev_boxes_per_user: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dev_center_id is None and 'devCenterId' in kwargs: + dev_center_id = kwargs['devCenterId'] + if dev_center_uri is None and 'devCenterUri' in kwargs: + dev_center_uri = kwargs['devCenterUri'] + if maximum_dev_boxes_per_user is None and 'maximumDevBoxesPerUser' in kwargs: + maximum_dev_boxes_per_user = kwargs['maximumDevBoxesPerUser'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if dev_center_id is not None: - pulumi.set(__self__, "dev_center_id", dev_center_id) + _setter("dev_center_id", dev_center_id) if dev_center_uri is not None: - pulumi.set(__self__, "dev_center_uri", dev_center_uri) + _setter("dev_center_uri", dev_center_uri) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maximum_dev_boxes_per_user is not None: - pulumi.set(__self__, "maximum_dev_boxes_per_user", maximum_dev_boxes_per_user) + _setter("maximum_dev_boxes_per_user", maximum_dev_boxes_per_user) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -372,6 +438,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProjectArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/devtest/_inputs.py b/sdk/python/pulumi_azure/devtest/_inputs.py index 925b96d752..4da44388dc 100644 --- a/sdk/python/pulumi_azure/devtest/_inputs.py +++ b/sdk/python/pulumi_azure/devtest/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -35,13 +35,36 @@ def __init__(__self__, *, :param pulumi.Input[int] time_in_minutes: Time in minutes between 15 and 120 before a shutdown event at which a notification will be sent. Defaults to `30`. :param pulumi.Input[str] webhook_url: The webhook URL to which the notification will be sent. """ - pulumi.set(__self__, "enabled", enabled) + GlobalVMShutdownScheduleNotificationSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + email=email, + time_in_minutes=time_in_minutes, + webhook_url=webhook_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + email: Optional[pulumi.Input[str]] = None, + time_in_minutes: Optional[pulumi.Input[int]] = None, + webhook_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if time_in_minutes is None and 'timeInMinutes' in kwargs: + time_in_minutes = kwargs['timeInMinutes'] + if webhook_url is None and 'webhookUrl' in kwargs: + webhook_url = kwargs['webhookUrl'] + + _setter("enabled", enabled) if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if time_in_minutes is not None: - pulumi.set(__self__, "time_in_minutes", time_in_minutes) + _setter("time_in_minutes", time_in_minutes) if webhook_url is not None: - pulumi.set(__self__, "webhook_url", webhook_url) + _setter("webhook_url", webhook_url) @property @pulumi.getter @@ -105,10 +128,35 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: The SKU of the Gallery Image. Changing this forces a new resource to be created. :param pulumi.Input[str] version: The Version of the Gallery Image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + LinuxVirtualMachineGalleryImageReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -170,10 +218,33 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol: The Protocol used for this NAT Rule. Possible values are `Tcp` and `Udp`. :param pulumi.Input[int] frontend_port: The frontend port associated with this Inbound NAT Rule. """ - pulumi.set(__self__, "backend_port", backend_port) - pulumi.set(__self__, "protocol", protocol) + LinuxVirtualMachineInboundNatRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + protocol=protocol, + frontend_port=frontend_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + frontend_port: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if backend_port is None: + raise TypeError("Missing 'backend_port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if frontend_port is None and 'frontendPort' in kwargs: + frontend_port = kwargs['frontendPort'] + + _setter("backend_port", backend_port) + _setter("protocol", protocol) if frontend_port is not None: - pulumi.set(__self__, "frontend_port", frontend_port) + _setter("frontend_port", frontend_port) @property @pulumi.getter(name="backendPort") @@ -219,7 +290,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] time: The time each day when the schedule takes effect. """ - pulumi.set(__self__, "time", time) + ScheduleDailyRecurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + time=time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time is None: + raise TypeError("Missing 'time' argument") + + _setter("time", time) @property @pulumi.getter @@ -241,7 +325,20 @@ def __init__(__self__, *, """ :param pulumi.Input[int] minute: Minutes of the hour the schedule will run. """ - pulumi.set(__self__, "minute", minute) + ScheduleHourlyRecurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + minute=minute, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + minute: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if minute is None: + raise TypeError("Missing 'minute' argument") + + _setter("minute", minute) @property @pulumi.getter @@ -267,12 +364,31 @@ def __init__(__self__, *, :param pulumi.Input[int] time_in_minutes: Time in minutes before event at which notification will be sent. :param pulumi.Input[str] webhook_url: The webhook URL to which the notification will be sent. """ + ScheduleNotificationSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + status=status, + time_in_minutes=time_in_minutes, + webhook_url=webhook_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + status: Optional[pulumi.Input[str]] = None, + time_in_minutes: Optional[pulumi.Input[int]] = None, + webhook_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time_in_minutes is None and 'timeInMinutes' in kwargs: + time_in_minutes = kwargs['timeInMinutes'] + if webhook_url is None and 'webhookUrl' in kwargs: + webhook_url = kwargs['webhookUrl'] + if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if time_in_minutes is not None: - pulumi.set(__self__, "time_in_minutes", time_in_minutes) + _setter("time_in_minutes", time_in_minutes) if webhook_url is not None: - pulumi.set(__self__, "webhook_url", webhook_url) + _setter("webhook_url", webhook_url) @property @pulumi.getter @@ -320,9 +436,26 @@ def __init__(__self__, *, :param pulumi.Input[str] time: The time when the schedule takes effect. :param pulumi.Input[Sequence[pulumi.Input[str]]] week_days: A list of days that this schedule takes effect . Possible values include `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`. """ - pulumi.set(__self__, "time", time) + ScheduleWeeklyRecurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + time=time, + week_days=week_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time: Optional[pulumi.Input[str]] = None, + week_days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time is None: + raise TypeError("Missing 'time' argument") + if week_days is None and 'weekDays' in kwargs: + week_days = kwargs['weekDays'] + + _setter("time", time) if week_days is not None: - pulumi.set(__self__, "week_days", week_days) + _setter("week_days", week_days) @property @pulumi.getter @@ -360,12 +493,31 @@ def __init__(__self__, *, :param pulumi.Input[str] use_in_virtual_machine_creation: Can this subnet be used for creating Virtual Machines? Possible values are `Allow`, `Default` and `Deny`. :param pulumi.Input[str] use_public_ip_address: Can Virtual Machines in this Subnet use Public IP Addresses? Possible values are `Allow`, `Default` and `Deny`. """ + VirtualNetworkSubnetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + use_in_virtual_machine_creation=use_in_virtual_machine_creation, + use_public_ip_address=use_public_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + use_in_virtual_machine_creation: Optional[pulumi.Input[str]] = None, + use_public_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if use_in_virtual_machine_creation is None and 'useInVirtualMachineCreation' in kwargs: + use_in_virtual_machine_creation = kwargs['useInVirtualMachineCreation'] + if use_public_ip_address is None and 'usePublicIpAddress' in kwargs: + use_public_ip_address = kwargs['usePublicIpAddress'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if use_in_virtual_machine_creation is not None: - pulumi.set(__self__, "use_in_virtual_machine_creation", use_in_virtual_machine_creation) + _setter("use_in_virtual_machine_creation", use_in_virtual_machine_creation) if use_public_ip_address is not None: - pulumi.set(__self__, "use_public_ip_address", use_public_ip_address) + _setter("use_public_ip_address", use_public_ip_address) @property @pulumi.getter @@ -417,10 +569,35 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: The SKU of the Gallery Image. Changing this forces a new resource to be created. :param pulumi.Input[str] version: The Version of the Gallery Image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + WindowsVirtualMachineGalleryImageReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -482,10 +659,33 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol: The Protocol used for this NAT Rule. Possible values are `Tcp` and `Udp`. :param pulumi.Input[int] frontend_port: The frontend port associated with this Inbound NAT Rule. """ - pulumi.set(__self__, "backend_port", backend_port) - pulumi.set(__self__, "protocol", protocol) + WindowsVirtualMachineInboundNatRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + protocol=protocol, + frontend_port=frontend_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + frontend_port: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if backend_port is None: + raise TypeError("Missing 'backend_port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if frontend_port is None and 'frontendPort' in kwargs: + frontend_port = kwargs['frontendPort'] + + _setter("backend_port", backend_port) + _setter("protocol", protocol) if frontend_port is not None: - pulumi.set(__self__, "frontend_port", frontend_port) + _setter("frontend_port", frontend_port) @property @pulumi.getter(name="backendPort") diff --git a/sdk/python/pulumi_azure/devtest/get_lab.py b/sdk/python/pulumi_azure/devtest/get_lab.py index b7f8690eda..e952c8442b 100644 --- a/sdk/python/pulumi_azure/devtest/get_lab.py +++ b/sdk/python/pulumi_azure/devtest/get_lab.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/devtest/get_virtual_network.py b/sdk/python/pulumi_azure/devtest/get_virtual_network.py index 5cb5ee0975..f4f2490815 100644 --- a/sdk/python/pulumi_azure/devtest/get_virtual_network.py +++ b/sdk/python/pulumi_azure/devtest/get_virtual_network.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/devtest/global_vm_shutdown_schedule.py b/sdk/python/pulumi_azure/devtest/global_vm_shutdown_schedule.py index e60d970810..63ee6e20b8 100644 --- a/sdk/python/pulumi_azure/devtest/global_vm_shutdown_schedule.py +++ b/sdk/python/pulumi_azure/devtest/global_vm_shutdown_schedule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,16 +33,53 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The location where the schedule is created. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "daily_recurrence_time", daily_recurrence_time) - pulumi.set(__self__, "notification_settings", notification_settings) - pulumi.set(__self__, "timezone", timezone) - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + GlobalVMShutdownScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + daily_recurrence_time=daily_recurrence_time, + notification_settings=notification_settings, + timezone=timezone, + virtual_machine_id=virtual_machine_id, + enabled=enabled, + location=location, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + daily_recurrence_time: Optional[pulumi.Input[str]] = None, + notification_settings: Optional[pulumi.Input['GlobalVMShutdownScheduleNotificationSettingsArgs']] = None, + timezone: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if daily_recurrence_time is None and 'dailyRecurrenceTime' in kwargs: + daily_recurrence_time = kwargs['dailyRecurrenceTime'] + if daily_recurrence_time is None: + raise TypeError("Missing 'daily_recurrence_time' argument") + if notification_settings is None and 'notificationSettings' in kwargs: + notification_settings = kwargs['notificationSettings'] + if notification_settings is None: + raise TypeError("Missing 'notification_settings' argument") + if timezone is None: + raise TypeError("Missing 'timezone' argument") + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_id is None: + raise TypeError("Missing 'virtual_machine_id' argument") + + _setter("daily_recurrence_time", daily_recurrence_time) + _setter("notification_settings", notification_settings) + _setter("timezone", timezone) + _setter("virtual_machine_id", virtual_machine_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dailyRecurrenceTime") @@ -149,20 +186,49 @@ def __init__(__self__, *, :param pulumi.Input[str] timezone: The time zone ID (e.g. Pacific Standard time). Refer to this guide for a [full list of accepted time zone names](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). :param pulumi.Input[str] virtual_machine_id: The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created. """ + _GlobalVMShutdownScheduleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + daily_recurrence_time=daily_recurrence_time, + enabled=enabled, + location=location, + notification_settings=notification_settings, + tags=tags, + timezone=timezone, + virtual_machine_id=virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + daily_recurrence_time: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + notification_settings: Optional[pulumi.Input['GlobalVMShutdownScheduleNotificationSettingsArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timezone: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if daily_recurrence_time is None and 'dailyRecurrenceTime' in kwargs: + daily_recurrence_time = kwargs['dailyRecurrenceTime'] + if notification_settings is None and 'notificationSettings' in kwargs: + notification_settings = kwargs['notificationSettings'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if daily_recurrence_time is not None: - pulumi.set(__self__, "daily_recurrence_time", daily_recurrence_time) + _setter("daily_recurrence_time", daily_recurrence_time) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if notification_settings is not None: - pulumi.set(__self__, "notification_settings", notification_settings) + _setter("notification_settings", notification_settings) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) @property @pulumi.getter(name="dailyRecurrenceTime") @@ -428,6 +494,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GlobalVMShutdownScheduleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -454,6 +524,11 @@ def _internal_init(__self__, __props__.__dict__["daily_recurrence_time"] = daily_recurrence_time __props__.__dict__["enabled"] = enabled __props__.__dict__["location"] = location + if notification_settings is not None and not isinstance(notification_settings, GlobalVMShutdownScheduleNotificationSettingsArgs): + notification_settings = notification_settings or {} + def _setter(key, value): + notification_settings[key] = value + GlobalVMShutdownScheduleNotificationSettingsArgs._configure(_setter, **notification_settings) if notification_settings is None and not opts.urn: raise TypeError("Missing required property 'notification_settings'") __props__.__dict__["notification_settings"] = notification_settings diff --git a/sdk/python/pulumi_azure/devtest/lab.py b/sdk/python/pulumi_azure/devtest/lab.py index eaaaacb52a..abb1989ae5 100644 --- a/sdk/python/pulumi_azure/devtest/lab.py +++ b/sdk/python/pulumi_azure/devtest/lab.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LabArgs', 'Lab'] @@ -29,18 +29,43 @@ def __init__(__self__, *, > **Note:** `storage_type` has been deprecated as the API no longer supports it and will be removed in Version 4.0 of the provider. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + LabArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + storage_type=storage_type, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_type is None and 'storageType' in kwargs: + storage_type = kwargs['storageType'] + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_type is not None: warnings.warn("""`storage_type` is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0.""", DeprecationWarning) pulumi.log.warn("""storage_type is deprecated: `storage_type` is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0.""") if storage_type is not None: - pulumi.set(__self__, "storage_type", storage_type) + _setter("storage_type", storage_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -138,31 +163,78 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] unique_identifier: The unique immutable identifier of the Dev Test Lab. """ + _LabState._configure( + lambda key, value: pulumi.set(__self__, key, value), + artifacts_storage_account_id=artifacts_storage_account_id, + default_premium_storage_account_id=default_premium_storage_account_id, + default_storage_account_id=default_storage_account_id, + key_vault_id=key_vault_id, + location=location, + name=name, + premium_data_disk_storage_account_id=premium_data_disk_storage_account_id, + resource_group_name=resource_group_name, + storage_type=storage_type, + tags=tags, + unique_identifier=unique_identifier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + artifacts_storage_account_id: Optional[pulumi.Input[str]] = None, + default_premium_storage_account_id: Optional[pulumi.Input[str]] = None, + default_storage_account_id: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + premium_data_disk_storage_account_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + unique_identifier: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if artifacts_storage_account_id is None and 'artifactsStorageAccountId' in kwargs: + artifacts_storage_account_id = kwargs['artifactsStorageAccountId'] + if default_premium_storage_account_id is None and 'defaultPremiumStorageAccountId' in kwargs: + default_premium_storage_account_id = kwargs['defaultPremiumStorageAccountId'] + if default_storage_account_id is None and 'defaultStorageAccountId' in kwargs: + default_storage_account_id = kwargs['defaultStorageAccountId'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if premium_data_disk_storage_account_id is None and 'premiumDataDiskStorageAccountId' in kwargs: + premium_data_disk_storage_account_id = kwargs['premiumDataDiskStorageAccountId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_type is None and 'storageType' in kwargs: + storage_type = kwargs['storageType'] + if unique_identifier is None and 'uniqueIdentifier' in kwargs: + unique_identifier = kwargs['uniqueIdentifier'] + if artifacts_storage_account_id is not None: - pulumi.set(__self__, "artifacts_storage_account_id", artifacts_storage_account_id) + _setter("artifacts_storage_account_id", artifacts_storage_account_id) if default_premium_storage_account_id is not None: - pulumi.set(__self__, "default_premium_storage_account_id", default_premium_storage_account_id) + _setter("default_premium_storage_account_id", default_premium_storage_account_id) if default_storage_account_id is not None: - pulumi.set(__self__, "default_storage_account_id", default_storage_account_id) + _setter("default_storage_account_id", default_storage_account_id) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if premium_data_disk_storage_account_id is not None: - pulumi.set(__self__, "premium_data_disk_storage_account_id", premium_data_disk_storage_account_id) + _setter("premium_data_disk_storage_account_id", premium_data_disk_storage_account_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if storage_type is not None: warnings.warn("""`storage_type` is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0.""", DeprecationWarning) pulumi.log.warn("""storage_type is deprecated: `storage_type` is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0.""") if storage_type is not None: - pulumi.set(__self__, "storage_type", storage_type) + _setter("storage_type", storage_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if unique_identifier is not None: - pulumi.set(__self__, "unique_identifier", unique_identifier) + _setter("unique_identifier", unique_identifier) @property @pulumi.getter(name="artifactsStorageAccountId") @@ -391,6 +463,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LabArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/devtest/linux_virtual_machine.py b/sdk/python/pulumi_azure/devtest/linux_virtual_machine.py index fc2128c0c0..245331db47 100644 --- a/sdk/python/pulumi_azure/devtest/linux_virtual_machine.py +++ b/sdk/python/pulumi_azure/devtest/linux_virtual_machine.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,32 +59,111 @@ def __init__(__self__, *, > **NOTE:** One or either `password` or `ssh_key` must be specified. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "gallery_image_reference", gallery_image_reference) - pulumi.set(__self__, "lab_name", lab_name) - pulumi.set(__self__, "lab_subnet_name", lab_subnet_name) - pulumi.set(__self__, "lab_virtual_network_id", lab_virtual_network_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "size", size) - pulumi.set(__self__, "storage_type", storage_type) - pulumi.set(__self__, "username", username) + LinuxVirtualMachineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + gallery_image_reference=gallery_image_reference, + lab_name=lab_name, + lab_subnet_name=lab_subnet_name, + lab_virtual_network_id=lab_virtual_network_id, + resource_group_name=resource_group_name, + size=size, + storage_type=storage_type, + username=username, + allow_claim=allow_claim, + disallow_public_ip_address=disallow_public_ip_address, + inbound_nat_rules=inbound_nat_rules, + location=location, + name=name, + notes=notes, + password=password, + ssh_key=ssh_key, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + gallery_image_reference: Optional[pulumi.Input['LinuxVirtualMachineGalleryImageReferenceArgs']] = None, + lab_name: Optional[pulumi.Input[str]] = None, + lab_subnet_name: Optional[pulumi.Input[str]] = None, + lab_virtual_network_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + size: Optional[pulumi.Input[str]] = None, + storage_type: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + allow_claim: Optional[pulumi.Input[bool]] = None, + disallow_public_ip_address: Optional[pulumi.Input[bool]] = None, + inbound_nat_rules: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineInboundNatRuleArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + ssh_key: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if gallery_image_reference is None and 'galleryImageReference' in kwargs: + gallery_image_reference = kwargs['galleryImageReference'] + if gallery_image_reference is None: + raise TypeError("Missing 'gallery_image_reference' argument") + if lab_name is None and 'labName' in kwargs: + lab_name = kwargs['labName'] + if lab_name is None: + raise TypeError("Missing 'lab_name' argument") + if lab_subnet_name is None and 'labSubnetName' in kwargs: + lab_subnet_name = kwargs['labSubnetName'] + if lab_subnet_name is None: + raise TypeError("Missing 'lab_subnet_name' argument") + if lab_virtual_network_id is None and 'labVirtualNetworkId' in kwargs: + lab_virtual_network_id = kwargs['labVirtualNetworkId'] + if lab_virtual_network_id is None: + raise TypeError("Missing 'lab_virtual_network_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if size is None: + raise TypeError("Missing 'size' argument") + if storage_type is None and 'storageType' in kwargs: + storage_type = kwargs['storageType'] + if storage_type is None: + raise TypeError("Missing 'storage_type' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if allow_claim is None and 'allowClaim' in kwargs: + allow_claim = kwargs['allowClaim'] + if disallow_public_ip_address is None and 'disallowPublicIpAddress' in kwargs: + disallow_public_ip_address = kwargs['disallowPublicIpAddress'] + if inbound_nat_rules is None and 'inboundNatRules' in kwargs: + inbound_nat_rules = kwargs['inboundNatRules'] + if ssh_key is None and 'sshKey' in kwargs: + ssh_key = kwargs['sshKey'] + + _setter("gallery_image_reference", gallery_image_reference) + _setter("lab_name", lab_name) + _setter("lab_subnet_name", lab_subnet_name) + _setter("lab_virtual_network_id", lab_virtual_network_id) + _setter("resource_group_name", resource_group_name) + _setter("size", size) + _setter("storage_type", storage_type) + _setter("username", username) if allow_claim is not None: - pulumi.set(__self__, "allow_claim", allow_claim) + _setter("allow_claim", allow_claim) if disallow_public_ip_address is not None: - pulumi.set(__self__, "disallow_public_ip_address", disallow_public_ip_address) + _setter("disallow_public_ip_address", disallow_public_ip_address) if inbound_nat_rules is not None: - pulumi.set(__self__, "inbound_nat_rules", inbound_nat_rules) + _setter("inbound_nat_rules", inbound_nat_rules) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if ssh_key is not None: - pulumi.set(__self__, "ssh_key", ssh_key) + _setter("ssh_key", ssh_key) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="galleryImageReference") @@ -347,44 +426,113 @@ def __init__(__self__, *, :param pulumi.Input[str] unique_identifier: The unique immutable identifier of the Virtual Machine. :param pulumi.Input[str] username: The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created. """ + _LinuxVirtualMachineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_claim=allow_claim, + disallow_public_ip_address=disallow_public_ip_address, + fqdn=fqdn, + gallery_image_reference=gallery_image_reference, + inbound_nat_rules=inbound_nat_rules, + lab_name=lab_name, + lab_subnet_name=lab_subnet_name, + lab_virtual_network_id=lab_virtual_network_id, + location=location, + name=name, + notes=notes, + password=password, + resource_group_name=resource_group_name, + size=size, + ssh_key=ssh_key, + storage_type=storage_type, + tags=tags, + unique_identifier=unique_identifier, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_claim: Optional[pulumi.Input[bool]] = None, + disallow_public_ip_address: Optional[pulumi.Input[bool]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + gallery_image_reference: Optional[pulumi.Input['LinuxVirtualMachineGalleryImageReferenceArgs']] = None, + inbound_nat_rules: Optional[pulumi.Input[Sequence[pulumi.Input['LinuxVirtualMachineInboundNatRuleArgs']]]] = None, + lab_name: Optional[pulumi.Input[str]] = None, + lab_subnet_name: Optional[pulumi.Input[str]] = None, + lab_virtual_network_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + size: Optional[pulumi.Input[str]] = None, + ssh_key: Optional[pulumi.Input[str]] = None, + storage_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + unique_identifier: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_claim is None and 'allowClaim' in kwargs: + allow_claim = kwargs['allowClaim'] + if disallow_public_ip_address is None and 'disallowPublicIpAddress' in kwargs: + disallow_public_ip_address = kwargs['disallowPublicIpAddress'] + if gallery_image_reference is None and 'galleryImageReference' in kwargs: + gallery_image_reference = kwargs['galleryImageReference'] + if inbound_nat_rules is None and 'inboundNatRules' in kwargs: + inbound_nat_rules = kwargs['inboundNatRules'] + if lab_name is None and 'labName' in kwargs: + lab_name = kwargs['labName'] + if lab_subnet_name is None and 'labSubnetName' in kwargs: + lab_subnet_name = kwargs['labSubnetName'] + if lab_virtual_network_id is None and 'labVirtualNetworkId' in kwargs: + lab_virtual_network_id = kwargs['labVirtualNetworkId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if ssh_key is None and 'sshKey' in kwargs: + ssh_key = kwargs['sshKey'] + if storage_type is None and 'storageType' in kwargs: + storage_type = kwargs['storageType'] + if unique_identifier is None and 'uniqueIdentifier' in kwargs: + unique_identifier = kwargs['uniqueIdentifier'] + if allow_claim is not None: - pulumi.set(__self__, "allow_claim", allow_claim) + _setter("allow_claim", allow_claim) if disallow_public_ip_address is not None: - pulumi.set(__self__, "disallow_public_ip_address", disallow_public_ip_address) + _setter("disallow_public_ip_address", disallow_public_ip_address) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if gallery_image_reference is not None: - pulumi.set(__self__, "gallery_image_reference", gallery_image_reference) + _setter("gallery_image_reference", gallery_image_reference) if inbound_nat_rules is not None: - pulumi.set(__self__, "inbound_nat_rules", inbound_nat_rules) + _setter("inbound_nat_rules", inbound_nat_rules) if lab_name is not None: - pulumi.set(__self__, "lab_name", lab_name) + _setter("lab_name", lab_name) if lab_subnet_name is not None: - pulumi.set(__self__, "lab_subnet_name", lab_subnet_name) + _setter("lab_subnet_name", lab_subnet_name) if lab_virtual_network_id is not None: - pulumi.set(__self__, "lab_virtual_network_id", lab_virtual_network_id) + _setter("lab_virtual_network_id", lab_virtual_network_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if ssh_key is not None: - pulumi.set(__self__, "ssh_key", ssh_key) + _setter("ssh_key", ssh_key) if storage_type is not None: - pulumi.set(__self__, "storage_type", storage_type) + _setter("storage_type", storage_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if unique_identifier is not None: - pulumi.set(__self__, "unique_identifier", unique_identifier) + _setter("unique_identifier", unique_identifier) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="allowClaim") @@ -786,6 +934,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinuxVirtualMachineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -819,6 +971,11 @@ def _internal_init(__self__, __props__.__dict__["allow_claim"] = allow_claim __props__.__dict__["disallow_public_ip_address"] = disallow_public_ip_address + if gallery_image_reference is not None and not isinstance(gallery_image_reference, LinuxVirtualMachineGalleryImageReferenceArgs): + gallery_image_reference = gallery_image_reference or {} + def _setter(key, value): + gallery_image_reference[key] = value + LinuxVirtualMachineGalleryImageReferenceArgs._configure(_setter, **gallery_image_reference) if gallery_image_reference is None and not opts.urn: raise TypeError("Missing required property 'gallery_image_reference'") __props__.__dict__["gallery_image_reference"] = gallery_image_reference diff --git a/sdk/python/pulumi_azure/devtest/outputs.py b/sdk/python/pulumi_azure/devtest/outputs.py index 7183eeb068..ff351f6bd1 100644 --- a/sdk/python/pulumi_azure/devtest/outputs.py +++ b/sdk/python/pulumi_azure/devtest/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -56,13 +56,36 @@ def __init__(__self__, *, :param int time_in_minutes: Time in minutes between 15 and 120 before a shutdown event at which a notification will be sent. Defaults to `30`. :param str webhook_url: The webhook URL to which the notification will be sent. """ - pulumi.set(__self__, "enabled", enabled) + GlobalVMShutdownScheduleNotificationSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + email=email, + time_in_minutes=time_in_minutes, + webhook_url=webhook_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + email: Optional[str] = None, + time_in_minutes: Optional[int] = None, + webhook_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if time_in_minutes is None and 'timeInMinutes' in kwargs: + time_in_minutes = kwargs['timeInMinutes'] + if webhook_url is None and 'webhookUrl' in kwargs: + webhook_url = kwargs['webhookUrl'] + + _setter("enabled", enabled) if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if time_in_minutes is not None: - pulumi.set(__self__, "time_in_minutes", time_in_minutes) + _setter("time_in_minutes", time_in_minutes) if webhook_url is not None: - pulumi.set(__self__, "webhook_url", webhook_url) + _setter("webhook_url", webhook_url) @property @pulumi.getter @@ -110,10 +133,35 @@ def __init__(__self__, *, :param str sku: The SKU of the Gallery Image. Changing this forces a new resource to be created. :param str version: The Version of the Gallery Image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + LinuxVirtualMachineGalleryImageReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -178,10 +226,33 @@ def __init__(__self__, *, :param str protocol: The Protocol used for this NAT Rule. Possible values are `Tcp` and `Udp`. :param int frontend_port: The frontend port associated with this Inbound NAT Rule. """ - pulumi.set(__self__, "backend_port", backend_port) - pulumi.set(__self__, "protocol", protocol) + LinuxVirtualMachineInboundNatRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + protocol=protocol, + frontend_port=frontend_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[int] = None, + protocol: Optional[str] = None, + frontend_port: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if backend_port is None: + raise TypeError("Missing 'backend_port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if frontend_port is None and 'frontendPort' in kwargs: + frontend_port = kwargs['frontendPort'] + + _setter("backend_port", backend_port) + _setter("protocol", protocol) if frontend_port is not None: - pulumi.set(__self__, "frontend_port", frontend_port) + _setter("frontend_port", frontend_port) @property @pulumi.getter(name="backendPort") @@ -215,7 +286,20 @@ def __init__(__self__, *, """ :param str time: The time each day when the schedule takes effect. """ - pulumi.set(__self__, "time", time) + ScheduleDailyRecurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + time=time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time is None: + raise TypeError("Missing 'time' argument") + + _setter("time", time) @property @pulumi.getter @@ -233,7 +317,20 @@ def __init__(__self__, *, """ :param int minute: Minutes of the hour the schedule will run. """ - pulumi.set(__self__, "minute", minute) + ScheduleHourlyRecurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + minute=minute, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + minute: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if minute is None: + raise TypeError("Missing 'minute' argument") + + _setter("minute", minute) @property @pulumi.getter @@ -274,12 +371,31 @@ def __init__(__self__, *, :param int time_in_minutes: Time in minutes before event at which notification will be sent. :param str webhook_url: The webhook URL to which the notification will be sent. """ + ScheduleNotificationSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + status=status, + time_in_minutes=time_in_minutes, + webhook_url=webhook_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + status: Optional[str] = None, + time_in_minutes: Optional[int] = None, + webhook_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time_in_minutes is None and 'timeInMinutes' in kwargs: + time_in_minutes = kwargs['timeInMinutes'] + if webhook_url is None and 'webhookUrl' in kwargs: + webhook_url = kwargs['webhookUrl'] + if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if time_in_minutes is not None: - pulumi.set(__self__, "time_in_minutes", time_in_minutes) + _setter("time_in_minutes", time_in_minutes) if webhook_url is not None: - pulumi.set(__self__, "webhook_url", webhook_url) + _setter("webhook_url", webhook_url) @property @pulumi.getter @@ -332,9 +448,26 @@ def __init__(__self__, *, :param str time: The time when the schedule takes effect. :param Sequence[str] week_days: A list of days that this schedule takes effect . Possible values include `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`. """ - pulumi.set(__self__, "time", time) + ScheduleWeeklyRecurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + time=time, + week_days=week_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time: Optional[str] = None, + week_days: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time is None: + raise TypeError("Missing 'time' argument") + if week_days is None and 'weekDays' in kwargs: + week_days = kwargs['weekDays'] + + _setter("time", time) if week_days is not None: - pulumi.set(__self__, "week_days", week_days) + _setter("week_days", week_days) @property @pulumi.getter @@ -383,12 +516,31 @@ def __init__(__self__, *, :param str use_in_virtual_machine_creation: Can this subnet be used for creating Virtual Machines? Possible values are `Allow`, `Default` and `Deny`. :param str use_public_ip_address: Can Virtual Machines in this Subnet use Public IP Addresses? Possible values are `Allow`, `Default` and `Deny`. """ + VirtualNetworkSubnet._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + use_in_virtual_machine_creation=use_in_virtual_machine_creation, + use_public_ip_address=use_public_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + use_in_virtual_machine_creation: Optional[str] = None, + use_public_ip_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if use_in_virtual_machine_creation is None and 'useInVirtualMachineCreation' in kwargs: + use_in_virtual_machine_creation = kwargs['useInVirtualMachineCreation'] + if use_public_ip_address is None and 'usePublicIpAddress' in kwargs: + use_public_ip_address = kwargs['usePublicIpAddress'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if use_in_virtual_machine_creation is not None: - pulumi.set(__self__, "use_in_virtual_machine_creation", use_in_virtual_machine_creation) + _setter("use_in_virtual_machine_creation", use_in_virtual_machine_creation) if use_public_ip_address is not None: - pulumi.set(__self__, "use_public_ip_address", use_public_ip_address) + _setter("use_public_ip_address", use_public_ip_address) @property @pulumi.getter @@ -428,10 +580,35 @@ def __init__(__self__, *, :param str sku: The SKU of the Gallery Image. Changing this forces a new resource to be created. :param str version: The Version of the Gallery Image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "version", version) + WindowsVirtualMachineGalleryImageReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("offer", offer) + _setter("publisher", publisher) + _setter("sku", sku) + _setter("version", version) @property @pulumi.getter @@ -496,10 +673,33 @@ def __init__(__self__, *, :param str protocol: The Protocol used for this NAT Rule. Possible values are `Tcp` and `Udp`. :param int frontend_port: The frontend port associated with this Inbound NAT Rule. """ - pulumi.set(__self__, "backend_port", backend_port) - pulumi.set(__self__, "protocol", protocol) + WindowsVirtualMachineInboundNatRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + protocol=protocol, + frontend_port=frontend_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[int] = None, + protocol: Optional[str] = None, + frontend_port: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if backend_port is None: + raise TypeError("Missing 'backend_port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if frontend_port is None and 'frontendPort' in kwargs: + frontend_port = kwargs['frontendPort'] + + _setter("backend_port", backend_port) + _setter("protocol", protocol) if frontend_port is not None: - pulumi.set(__self__, "frontend_port", frontend_port) + _setter("frontend_port", frontend_port) @property @pulumi.getter(name="backendPort") @@ -537,9 +737,36 @@ def __init__(__self__, *, :param str lab_subnet_name: The name of the subnet. :param str resource_id: The resource identifier for the subnet. """ - pulumi.set(__self__, "allow_public_ip", allow_public_ip) - pulumi.set(__self__, "lab_subnet_name", lab_subnet_name) - pulumi.set(__self__, "resource_id", resource_id) + GetVirtualNetworkAllowedSubnetResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_public_ip=allow_public_ip, + lab_subnet_name=lab_subnet_name, + resource_id=resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_public_ip: Optional[str] = None, + lab_subnet_name: Optional[str] = None, + resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_public_ip is None and 'allowPublicIp' in kwargs: + allow_public_ip = kwargs['allowPublicIp'] + if allow_public_ip is None: + raise TypeError("Missing 'allow_public_ip' argument") + if lab_subnet_name is None and 'labSubnetName' in kwargs: + lab_subnet_name = kwargs['labSubnetName'] + if lab_subnet_name is None: + raise TypeError("Missing 'lab_subnet_name' argument") + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + + _setter("allow_public_ip", allow_public_ip) + _setter("lab_subnet_name", lab_subnet_name) + _setter("resource_id", resource_id) @property @pulumi.getter(name="allowPublicIp") @@ -580,11 +807,50 @@ def __init__(__self__, *, :param str use_in_vm_creation_permission: Indicates if the subnet can be used for VM creation. Possible values are `Allow`, `Default` and `Deny`. :param str virtual_network_pool_name: The virtual network pool associated with this subnet. """ - pulumi.set(__self__, "lab_subnet_name", lab_subnet_name) - pulumi.set(__self__, "resource_id", resource_id) - pulumi.set(__self__, "use_in_vm_creation_permission", use_in_vm_creation_permission) - pulumi.set(__self__, "use_public_ip_address_permission", use_public_ip_address_permission) - pulumi.set(__self__, "virtual_network_pool_name", virtual_network_pool_name) + GetVirtualNetworkSubnetOverrideResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + lab_subnet_name=lab_subnet_name, + resource_id=resource_id, + use_in_vm_creation_permission=use_in_vm_creation_permission, + use_public_ip_address_permission=use_public_ip_address_permission, + virtual_network_pool_name=virtual_network_pool_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + lab_subnet_name: Optional[str] = None, + resource_id: Optional[str] = None, + use_in_vm_creation_permission: Optional[str] = None, + use_public_ip_address_permission: Optional[str] = None, + virtual_network_pool_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lab_subnet_name is None and 'labSubnetName' in kwargs: + lab_subnet_name = kwargs['labSubnetName'] + if lab_subnet_name is None: + raise TypeError("Missing 'lab_subnet_name' argument") + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + if use_in_vm_creation_permission is None and 'useInVmCreationPermission' in kwargs: + use_in_vm_creation_permission = kwargs['useInVmCreationPermission'] + if use_in_vm_creation_permission is None: + raise TypeError("Missing 'use_in_vm_creation_permission' argument") + if use_public_ip_address_permission is None and 'usePublicIpAddressPermission' in kwargs: + use_public_ip_address_permission = kwargs['usePublicIpAddressPermission'] + if use_public_ip_address_permission is None: + raise TypeError("Missing 'use_public_ip_address_permission' argument") + if virtual_network_pool_name is None and 'virtualNetworkPoolName' in kwargs: + virtual_network_pool_name = kwargs['virtualNetworkPoolName'] + if virtual_network_pool_name is None: + raise TypeError("Missing 'virtual_network_pool_name' argument") + + _setter("lab_subnet_name", lab_subnet_name) + _setter("resource_id", resource_id) + _setter("use_in_vm_creation_permission", use_in_vm_creation_permission) + _setter("use_public_ip_address_permission", use_public_ip_address_permission) + _setter("virtual_network_pool_name", virtual_network_pool_name) @property @pulumi.getter(name="labSubnetName") diff --git a/sdk/python/pulumi_azure/devtest/policy.py b/sdk/python/pulumi_azure/devtest/policy.py index 84a09b0deb..574ad34974 100644 --- a/sdk/python/pulumi_azure/devtest/policy.py +++ b/sdk/python/pulumi_azure/devtest/policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PolicyArgs', 'Policy'] @@ -35,19 +35,66 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Dev Test Policy. Possible values are `GalleryImage`, `LabPremiumVmCount`, `LabTargetCost`, `LabVmCount`, `LabVmSize`, `UserOwnedLabPremiumVmCount`, `UserOwnedLabVmCount` and `UserOwnedLabVmCountInSubnet`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "evaluator_type", evaluator_type) - pulumi.set(__self__, "lab_name", lab_name) - pulumi.set(__self__, "policy_set_name", policy_set_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "threshold", threshold) + PolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + evaluator_type=evaluator_type, + lab_name=lab_name, + policy_set_name=policy_set_name, + resource_group_name=resource_group_name, + threshold=threshold, + description=description, + fact_data=fact_data, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + evaluator_type: Optional[pulumi.Input[str]] = None, + lab_name: Optional[pulumi.Input[str]] = None, + policy_set_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + threshold: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + fact_data: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if evaluator_type is None and 'evaluatorType' in kwargs: + evaluator_type = kwargs['evaluatorType'] + if evaluator_type is None: + raise TypeError("Missing 'evaluator_type' argument") + if lab_name is None and 'labName' in kwargs: + lab_name = kwargs['labName'] + if lab_name is None: + raise TypeError("Missing 'lab_name' argument") + if policy_set_name is None and 'policySetName' in kwargs: + policy_set_name = kwargs['policySetName'] + if policy_set_name is None: + raise TypeError("Missing 'policy_set_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if fact_data is None and 'factData' in kwargs: + fact_data = kwargs['factData'] + + _setter("evaluator_type", evaluator_type) + _setter("lab_name", lab_name) + _setter("policy_set_name", policy_set_name) + _setter("resource_group_name", resource_group_name) + _setter("threshold", threshold) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if fact_data is not None: - pulumi.set(__self__, "fact_data", fact_data) + _setter("fact_data", fact_data) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="evaluatorType") @@ -182,24 +229,61 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] threshold: The Threshold for this Policy. """ + _PolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + evaluator_type=evaluator_type, + fact_data=fact_data, + lab_name=lab_name, + name=name, + policy_set_name=policy_set_name, + resource_group_name=resource_group_name, + tags=tags, + threshold=threshold, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + evaluator_type: Optional[pulumi.Input[str]] = None, + fact_data: Optional[pulumi.Input[str]] = None, + lab_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_set_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threshold: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if evaluator_type is None and 'evaluatorType' in kwargs: + evaluator_type = kwargs['evaluatorType'] + if fact_data is None and 'factData' in kwargs: + fact_data = kwargs['factData'] + if lab_name is None and 'labName' in kwargs: + lab_name = kwargs['labName'] + if policy_set_name is None and 'policySetName' in kwargs: + policy_set_name = kwargs['policySetName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if evaluator_type is not None: - pulumi.set(__self__, "evaluator_type", evaluator_type) + _setter("evaluator_type", evaluator_type) if fact_data is not None: - pulumi.set(__self__, "fact_data", fact_data) + _setter("fact_data", fact_data) if lab_name is not None: - pulumi.set(__self__, "lab_name", lab_name) + _setter("lab_name", lab_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_set_name is not None: - pulumi.set(__self__, "policy_set_name", policy_set_name) + _setter("policy_set_name", policy_set_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threshold is not None: - pulumi.set(__self__, "threshold", threshold) + _setter("threshold", threshold) @property @pulumi.getter @@ -425,6 +509,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/devtest/schedule.py b/sdk/python/pulumi_azure/devtest/schedule.py index c7cb716d06..73578c101f 100644 --- a/sdk/python/pulumi_azure/devtest/schedule.py +++ b/sdk/python/pulumi_azure/devtest/schedule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,25 +43,84 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input['ScheduleWeeklyRecurrenceArgs'] weekly_recurrence: The properties of a weekly schedule. If the schedule occurs only some days of the week, specify the weekly recurrence. A `weekly_recurrence` block as defined below. """ - pulumi.set(__self__, "lab_name", lab_name) - pulumi.set(__self__, "notification_settings", notification_settings) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "task_type", task_type) - pulumi.set(__self__, "time_zone_id", time_zone_id) + ScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + lab_name=lab_name, + notification_settings=notification_settings, + resource_group_name=resource_group_name, + task_type=task_type, + time_zone_id=time_zone_id, + daily_recurrence=daily_recurrence, + hourly_recurrence=hourly_recurrence, + location=location, + name=name, + status=status, + tags=tags, + weekly_recurrence=weekly_recurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + lab_name: Optional[pulumi.Input[str]] = None, + notification_settings: Optional[pulumi.Input['ScheduleNotificationSettingsArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + task_type: Optional[pulumi.Input[str]] = None, + time_zone_id: Optional[pulumi.Input[str]] = None, + daily_recurrence: Optional[pulumi.Input['ScheduleDailyRecurrenceArgs']] = None, + hourly_recurrence: Optional[pulumi.Input['ScheduleHourlyRecurrenceArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + weekly_recurrence: Optional[pulumi.Input['ScheduleWeeklyRecurrenceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lab_name is None and 'labName' in kwargs: + lab_name = kwargs['labName'] + if lab_name is None: + raise TypeError("Missing 'lab_name' argument") + if notification_settings is None and 'notificationSettings' in kwargs: + notification_settings = kwargs['notificationSettings'] + if notification_settings is None: + raise TypeError("Missing 'notification_settings' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if task_type is None and 'taskType' in kwargs: + task_type = kwargs['taskType'] + if task_type is None: + raise TypeError("Missing 'task_type' argument") + if time_zone_id is None and 'timeZoneId' in kwargs: + time_zone_id = kwargs['timeZoneId'] + if time_zone_id is None: + raise TypeError("Missing 'time_zone_id' argument") + if daily_recurrence is None and 'dailyRecurrence' in kwargs: + daily_recurrence = kwargs['dailyRecurrence'] + if hourly_recurrence is None and 'hourlyRecurrence' in kwargs: + hourly_recurrence = kwargs['hourlyRecurrence'] + if weekly_recurrence is None and 'weeklyRecurrence' in kwargs: + weekly_recurrence = kwargs['weeklyRecurrence'] + + _setter("lab_name", lab_name) + _setter("notification_settings", notification_settings) + _setter("resource_group_name", resource_group_name) + _setter("task_type", task_type) + _setter("time_zone_id", time_zone_id) if daily_recurrence is not None: - pulumi.set(__self__, "daily_recurrence", daily_recurrence) + _setter("daily_recurrence", daily_recurrence) if hourly_recurrence is not None: - pulumi.set(__self__, "hourly_recurrence", hourly_recurrence) + _setter("hourly_recurrence", hourly_recurrence) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if weekly_recurrence is not None: - pulumi.set(__self__, "weekly_recurrence", weekly_recurrence) + _setter("weekly_recurrence", weekly_recurrence) @property @pulumi.getter(name="labName") @@ -238,30 +297,79 @@ def __init__(__self__, *, :param pulumi.Input[str] time_zone_id: The time zone ID (e.g. Pacific Standard time). :param pulumi.Input['ScheduleWeeklyRecurrenceArgs'] weekly_recurrence: The properties of a weekly schedule. If the schedule occurs only some days of the week, specify the weekly recurrence. A `weekly_recurrence` block as defined below. """ + _ScheduleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + daily_recurrence=daily_recurrence, + hourly_recurrence=hourly_recurrence, + lab_name=lab_name, + location=location, + name=name, + notification_settings=notification_settings, + resource_group_name=resource_group_name, + status=status, + tags=tags, + task_type=task_type, + time_zone_id=time_zone_id, + weekly_recurrence=weekly_recurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + daily_recurrence: Optional[pulumi.Input['ScheduleDailyRecurrenceArgs']] = None, + hourly_recurrence: Optional[pulumi.Input['ScheduleHourlyRecurrenceArgs']] = None, + lab_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notification_settings: Optional[pulumi.Input['ScheduleNotificationSettingsArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + task_type: Optional[pulumi.Input[str]] = None, + time_zone_id: Optional[pulumi.Input[str]] = None, + weekly_recurrence: Optional[pulumi.Input['ScheduleWeeklyRecurrenceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if daily_recurrence is None and 'dailyRecurrence' in kwargs: + daily_recurrence = kwargs['dailyRecurrence'] + if hourly_recurrence is None and 'hourlyRecurrence' in kwargs: + hourly_recurrence = kwargs['hourlyRecurrence'] + if lab_name is None and 'labName' in kwargs: + lab_name = kwargs['labName'] + if notification_settings is None and 'notificationSettings' in kwargs: + notification_settings = kwargs['notificationSettings'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if task_type is None and 'taskType' in kwargs: + task_type = kwargs['taskType'] + if time_zone_id is None and 'timeZoneId' in kwargs: + time_zone_id = kwargs['timeZoneId'] + if weekly_recurrence is None and 'weeklyRecurrence' in kwargs: + weekly_recurrence = kwargs['weeklyRecurrence'] + if daily_recurrence is not None: - pulumi.set(__self__, "daily_recurrence", daily_recurrence) + _setter("daily_recurrence", daily_recurrence) if hourly_recurrence is not None: - pulumi.set(__self__, "hourly_recurrence", hourly_recurrence) + _setter("hourly_recurrence", hourly_recurrence) if lab_name is not None: - pulumi.set(__self__, "lab_name", lab_name) + _setter("lab_name", lab_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notification_settings is not None: - pulumi.set(__self__, "notification_settings", notification_settings) + _setter("notification_settings", notification_settings) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if task_type is not None: - pulumi.set(__self__, "task_type", task_type) + _setter("task_type", task_type) if time_zone_id is not None: - pulumi.set(__self__, "time_zone_id", time_zone_id) + _setter("time_zone_id", time_zone_id) if weekly_recurrence is not None: - pulumi.set(__self__, "weekly_recurrence", weekly_recurrence) + _setter("weekly_recurrence", weekly_recurrence) @property @pulumi.getter(name="dailyRecurrence") @@ -537,6 +645,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ScheduleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -563,13 +675,28 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ScheduleArgs.__new__(ScheduleArgs) + if daily_recurrence is not None and not isinstance(daily_recurrence, ScheduleDailyRecurrenceArgs): + daily_recurrence = daily_recurrence or {} + def _setter(key, value): + daily_recurrence[key] = value + ScheduleDailyRecurrenceArgs._configure(_setter, **daily_recurrence) __props__.__dict__["daily_recurrence"] = daily_recurrence + if hourly_recurrence is not None and not isinstance(hourly_recurrence, ScheduleHourlyRecurrenceArgs): + hourly_recurrence = hourly_recurrence or {} + def _setter(key, value): + hourly_recurrence[key] = value + ScheduleHourlyRecurrenceArgs._configure(_setter, **hourly_recurrence) __props__.__dict__["hourly_recurrence"] = hourly_recurrence if lab_name is None and not opts.urn: raise TypeError("Missing required property 'lab_name'") __props__.__dict__["lab_name"] = lab_name __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if notification_settings is not None and not isinstance(notification_settings, ScheduleNotificationSettingsArgs): + notification_settings = notification_settings or {} + def _setter(key, value): + notification_settings[key] = value + ScheduleNotificationSettingsArgs._configure(_setter, **notification_settings) if notification_settings is None and not opts.urn: raise TypeError("Missing required property 'notification_settings'") __props__.__dict__["notification_settings"] = notification_settings @@ -584,6 +711,11 @@ def _internal_init(__self__, if time_zone_id is None and not opts.urn: raise TypeError("Missing required property 'time_zone_id'") __props__.__dict__["time_zone_id"] = time_zone_id + if weekly_recurrence is not None and not isinstance(weekly_recurrence, ScheduleWeeklyRecurrenceArgs): + weekly_recurrence = weekly_recurrence or {} + def _setter(key, value): + weekly_recurrence[key] = value + ScheduleWeeklyRecurrenceArgs._configure(_setter, **weekly_recurrence) __props__.__dict__["weekly_recurrence"] = weekly_recurrence super(Schedule, __self__).__init__( 'azure:devtest/schedule:Schedule', diff --git a/sdk/python/pulumi_azure/devtest/virtual_network.py b/sdk/python/pulumi_azure/devtest/virtual_network.py index afa39a03bf..1568c3ad43 100644 --- a/sdk/python/pulumi_azure/devtest/virtual_network.py +++ b/sdk/python/pulumi_azure/devtest/virtual_network.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,16 +31,45 @@ def __init__(__self__, *, :param pulumi.Input['VirtualNetworkSubnetArgs'] subnet: A `subnet` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "lab_name", lab_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + VirtualNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + lab_name=lab_name, + resource_group_name=resource_group_name, + description=description, + name=name, + subnet=subnet, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + lab_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + subnet: Optional[pulumi.Input['VirtualNetworkSubnetArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lab_name is None and 'labName' in kwargs: + lab_name = kwargs['labName'] + if lab_name is None: + raise TypeError("Missing 'lab_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("lab_name", lab_name) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subnet is not None: - pulumi.set(__self__, "subnet", subnet) + _setter("subnet", subnet) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="labName") @@ -135,20 +164,49 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] unique_identifier: The unique immutable identifier of the Dev Test Virtual Network. """ + _VirtualNetworkState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + lab_name=lab_name, + name=name, + resource_group_name=resource_group_name, + subnet=subnet, + tags=tags, + unique_identifier=unique_identifier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + lab_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subnet: Optional[pulumi.Input['VirtualNetworkSubnetArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + unique_identifier: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lab_name is None and 'labName' in kwargs: + lab_name = kwargs['labName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if unique_identifier is None and 'uniqueIdentifier' in kwargs: + unique_identifier = kwargs['uniqueIdentifier'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if lab_name is not None: - pulumi.set(__self__, "lab_name", lab_name) + _setter("lab_name", lab_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if subnet is not None: - pulumi.set(__self__, "subnet", subnet) + _setter("subnet", subnet) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if unique_identifier is not None: - pulumi.set(__self__, "unique_identifier", unique_identifier) + _setter("unique_identifier", unique_identifier) @property @pulumi.getter @@ -338,6 +396,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -366,6 +428,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if subnet is not None and not isinstance(subnet, VirtualNetworkSubnetArgs): + subnet = subnet or {} + def _setter(key, value): + subnet[key] = value + VirtualNetworkSubnetArgs._configure(_setter, **subnet) __props__.__dict__["subnet"] = subnet __props__.__dict__["tags"] = tags __props__.__dict__["unique_identifier"] = None diff --git a/sdk/python/pulumi_azure/devtest/windows_virtual_machine.py b/sdk/python/pulumi_azure/devtest/windows_virtual_machine.py index 7dd0dcb2a7..20a21d7f27 100644 --- a/sdk/python/pulumi_azure/devtest/windows_virtual_machine.py +++ b/sdk/python/pulumi_azure/devtest/windows_virtual_machine.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -55,29 +55,106 @@ def __init__(__self__, *, :param pulumi.Input[str] notes: Any notes about the Virtual Machine. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "gallery_image_reference", gallery_image_reference) - pulumi.set(__self__, "lab_name", lab_name) - pulumi.set(__self__, "lab_subnet_name", lab_subnet_name) - pulumi.set(__self__, "lab_virtual_network_id", lab_virtual_network_id) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "size", size) - pulumi.set(__self__, "storage_type", storage_type) - pulumi.set(__self__, "username", username) + WindowsVirtualMachineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + gallery_image_reference=gallery_image_reference, + lab_name=lab_name, + lab_subnet_name=lab_subnet_name, + lab_virtual_network_id=lab_virtual_network_id, + password=password, + resource_group_name=resource_group_name, + size=size, + storage_type=storage_type, + username=username, + allow_claim=allow_claim, + disallow_public_ip_address=disallow_public_ip_address, + inbound_nat_rules=inbound_nat_rules, + location=location, + name=name, + notes=notes, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + gallery_image_reference: Optional[pulumi.Input['WindowsVirtualMachineGalleryImageReferenceArgs']] = None, + lab_name: Optional[pulumi.Input[str]] = None, + lab_subnet_name: Optional[pulumi.Input[str]] = None, + lab_virtual_network_id: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + size: Optional[pulumi.Input[str]] = None, + storage_type: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + allow_claim: Optional[pulumi.Input[bool]] = None, + disallow_public_ip_address: Optional[pulumi.Input[bool]] = None, + inbound_nat_rules: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineInboundNatRuleArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if gallery_image_reference is None and 'galleryImageReference' in kwargs: + gallery_image_reference = kwargs['galleryImageReference'] + if gallery_image_reference is None: + raise TypeError("Missing 'gallery_image_reference' argument") + if lab_name is None and 'labName' in kwargs: + lab_name = kwargs['labName'] + if lab_name is None: + raise TypeError("Missing 'lab_name' argument") + if lab_subnet_name is None and 'labSubnetName' in kwargs: + lab_subnet_name = kwargs['labSubnetName'] + if lab_subnet_name is None: + raise TypeError("Missing 'lab_subnet_name' argument") + if lab_virtual_network_id is None and 'labVirtualNetworkId' in kwargs: + lab_virtual_network_id = kwargs['labVirtualNetworkId'] + if lab_virtual_network_id is None: + raise TypeError("Missing 'lab_virtual_network_id' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if size is None: + raise TypeError("Missing 'size' argument") + if storage_type is None and 'storageType' in kwargs: + storage_type = kwargs['storageType'] + if storage_type is None: + raise TypeError("Missing 'storage_type' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if allow_claim is None and 'allowClaim' in kwargs: + allow_claim = kwargs['allowClaim'] + if disallow_public_ip_address is None and 'disallowPublicIpAddress' in kwargs: + disallow_public_ip_address = kwargs['disallowPublicIpAddress'] + if inbound_nat_rules is None and 'inboundNatRules' in kwargs: + inbound_nat_rules = kwargs['inboundNatRules'] + + _setter("gallery_image_reference", gallery_image_reference) + _setter("lab_name", lab_name) + _setter("lab_subnet_name", lab_subnet_name) + _setter("lab_virtual_network_id", lab_virtual_network_id) + _setter("password", password) + _setter("resource_group_name", resource_group_name) + _setter("size", size) + _setter("storage_type", storage_type) + _setter("username", username) if allow_claim is not None: - pulumi.set(__self__, "allow_claim", allow_claim) + _setter("allow_claim", allow_claim) if disallow_public_ip_address is not None: - pulumi.set(__self__, "disallow_public_ip_address", disallow_public_ip_address) + _setter("disallow_public_ip_address", disallow_public_ip_address) if inbound_nat_rules is not None: - pulumi.set(__self__, "inbound_nat_rules", inbound_nat_rules) + _setter("inbound_nat_rules", inbound_nat_rules) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="galleryImageReference") @@ -322,42 +399,107 @@ def __init__(__self__, *, :param pulumi.Input[str] unique_identifier: The unique immutable identifier of the Virtual Machine. :param pulumi.Input[str] username: The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created. """ + _WindowsVirtualMachineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_claim=allow_claim, + disallow_public_ip_address=disallow_public_ip_address, + fqdn=fqdn, + gallery_image_reference=gallery_image_reference, + inbound_nat_rules=inbound_nat_rules, + lab_name=lab_name, + lab_subnet_name=lab_subnet_name, + lab_virtual_network_id=lab_virtual_network_id, + location=location, + name=name, + notes=notes, + password=password, + resource_group_name=resource_group_name, + size=size, + storage_type=storage_type, + tags=tags, + unique_identifier=unique_identifier, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_claim: Optional[pulumi.Input[bool]] = None, + disallow_public_ip_address: Optional[pulumi.Input[bool]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + gallery_image_reference: Optional[pulumi.Input['WindowsVirtualMachineGalleryImageReferenceArgs']] = None, + inbound_nat_rules: Optional[pulumi.Input[Sequence[pulumi.Input['WindowsVirtualMachineInboundNatRuleArgs']]]] = None, + lab_name: Optional[pulumi.Input[str]] = None, + lab_subnet_name: Optional[pulumi.Input[str]] = None, + lab_virtual_network_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + size: Optional[pulumi.Input[str]] = None, + storage_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + unique_identifier: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_claim is None and 'allowClaim' in kwargs: + allow_claim = kwargs['allowClaim'] + if disallow_public_ip_address is None and 'disallowPublicIpAddress' in kwargs: + disallow_public_ip_address = kwargs['disallowPublicIpAddress'] + if gallery_image_reference is None and 'galleryImageReference' in kwargs: + gallery_image_reference = kwargs['galleryImageReference'] + if inbound_nat_rules is None and 'inboundNatRules' in kwargs: + inbound_nat_rules = kwargs['inboundNatRules'] + if lab_name is None and 'labName' in kwargs: + lab_name = kwargs['labName'] + if lab_subnet_name is None and 'labSubnetName' in kwargs: + lab_subnet_name = kwargs['labSubnetName'] + if lab_virtual_network_id is None and 'labVirtualNetworkId' in kwargs: + lab_virtual_network_id = kwargs['labVirtualNetworkId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_type is None and 'storageType' in kwargs: + storage_type = kwargs['storageType'] + if unique_identifier is None and 'uniqueIdentifier' in kwargs: + unique_identifier = kwargs['uniqueIdentifier'] + if allow_claim is not None: - pulumi.set(__self__, "allow_claim", allow_claim) + _setter("allow_claim", allow_claim) if disallow_public_ip_address is not None: - pulumi.set(__self__, "disallow_public_ip_address", disallow_public_ip_address) + _setter("disallow_public_ip_address", disallow_public_ip_address) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if gallery_image_reference is not None: - pulumi.set(__self__, "gallery_image_reference", gallery_image_reference) + _setter("gallery_image_reference", gallery_image_reference) if inbound_nat_rules is not None: - pulumi.set(__self__, "inbound_nat_rules", inbound_nat_rules) + _setter("inbound_nat_rules", inbound_nat_rules) if lab_name is not None: - pulumi.set(__self__, "lab_name", lab_name) + _setter("lab_name", lab_name) if lab_subnet_name is not None: - pulumi.set(__self__, "lab_subnet_name", lab_subnet_name) + _setter("lab_subnet_name", lab_subnet_name) if lab_virtual_network_id is not None: - pulumi.set(__self__, "lab_virtual_network_id", lab_virtual_network_id) + _setter("lab_virtual_network_id", lab_virtual_network_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if storage_type is not None: - pulumi.set(__self__, "storage_type", storage_type) + _setter("storage_type", storage_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if unique_identifier is not None: - pulumi.set(__self__, "unique_identifier", unique_identifier) + _setter("unique_identifier", unique_identifier) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="allowClaim") @@ -741,6 +883,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WindowsVirtualMachineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -773,6 +919,11 @@ def _internal_init(__self__, __props__.__dict__["allow_claim"] = allow_claim __props__.__dict__["disallow_public_ip_address"] = disallow_public_ip_address + if gallery_image_reference is not None and not isinstance(gallery_image_reference, WindowsVirtualMachineGalleryImageReferenceArgs): + gallery_image_reference = gallery_image_reference or {} + def _setter(key, value): + gallery_image_reference[key] = value + WindowsVirtualMachineGalleryImageReferenceArgs._configure(_setter, **gallery_image_reference) if gallery_image_reference is None and not opts.urn: raise TypeError("Missing required property 'gallery_image_reference'") __props__.__dict__["gallery_image_reference"] = gallery_image_reference diff --git a/sdk/python/pulumi_azure/digitaltwins/_inputs.py b/sdk/python/pulumi_azure/digitaltwins/_inputs.py index e5f008a42d..488a4c21f1 100644 --- a/sdk/python/pulumi_azure/digitaltwins/_inputs.py +++ b/sdk/python/pulumi_azure/digitaltwins/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -28,13 +28,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + InstanceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/digitaltwins/endpoint_event_grid.py b/sdk/python/pulumi_azure/digitaltwins/endpoint_event_grid.py index f5eaa1d68b..be19ea4272 100644 --- a/sdk/python/pulumi_azure/digitaltwins/endpoint_event_grid.py +++ b/sdk/python/pulumi_azure/digitaltwins/endpoint_event_grid.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EndpointEventGridArgs', 'EndpointEventGrid'] @@ -29,14 +29,53 @@ def __init__(__self__, *, :param pulumi.Input[str] dead_letter_storage_secret: The storage secret of the dead-lettering, whose format is `https://.blob.core.windows.net/?`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account. :param pulumi.Input[str] name: The name which should be used for this Digital Twins Eventgrid Endpoint. Changing this forces a new Digital Twins Eventgrid Endpoint to be created. """ - pulumi.set(__self__, "digital_twins_id", digital_twins_id) - pulumi.set(__self__, "eventgrid_topic_endpoint", eventgrid_topic_endpoint) - pulumi.set(__self__, "eventgrid_topic_primary_access_key", eventgrid_topic_primary_access_key) - pulumi.set(__self__, "eventgrid_topic_secondary_access_key", eventgrid_topic_secondary_access_key) + EndpointEventGridArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + digital_twins_id=digital_twins_id, + eventgrid_topic_endpoint=eventgrid_topic_endpoint, + eventgrid_topic_primary_access_key=eventgrid_topic_primary_access_key, + eventgrid_topic_secondary_access_key=eventgrid_topic_secondary_access_key, + dead_letter_storage_secret=dead_letter_storage_secret, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + digital_twins_id: Optional[pulumi.Input[str]] = None, + eventgrid_topic_endpoint: Optional[pulumi.Input[str]] = None, + eventgrid_topic_primary_access_key: Optional[pulumi.Input[str]] = None, + eventgrid_topic_secondary_access_key: Optional[pulumi.Input[str]] = None, + dead_letter_storage_secret: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if digital_twins_id is None and 'digitalTwinsId' in kwargs: + digital_twins_id = kwargs['digitalTwinsId'] + if digital_twins_id is None: + raise TypeError("Missing 'digital_twins_id' argument") + if eventgrid_topic_endpoint is None and 'eventgridTopicEndpoint' in kwargs: + eventgrid_topic_endpoint = kwargs['eventgridTopicEndpoint'] + if eventgrid_topic_endpoint is None: + raise TypeError("Missing 'eventgrid_topic_endpoint' argument") + if eventgrid_topic_primary_access_key is None and 'eventgridTopicPrimaryAccessKey' in kwargs: + eventgrid_topic_primary_access_key = kwargs['eventgridTopicPrimaryAccessKey'] + if eventgrid_topic_primary_access_key is None: + raise TypeError("Missing 'eventgrid_topic_primary_access_key' argument") + if eventgrid_topic_secondary_access_key is None and 'eventgridTopicSecondaryAccessKey' in kwargs: + eventgrid_topic_secondary_access_key = kwargs['eventgridTopicSecondaryAccessKey'] + if eventgrid_topic_secondary_access_key is None: + raise TypeError("Missing 'eventgrid_topic_secondary_access_key' argument") + if dead_letter_storage_secret is None and 'deadLetterStorageSecret' in kwargs: + dead_letter_storage_secret = kwargs['deadLetterStorageSecret'] + + _setter("digital_twins_id", digital_twins_id) + _setter("eventgrid_topic_endpoint", eventgrid_topic_endpoint) + _setter("eventgrid_topic_primary_access_key", eventgrid_topic_primary_access_key) + _setter("eventgrid_topic_secondary_access_key", eventgrid_topic_secondary_access_key) if dead_letter_storage_secret is not None: - pulumi.set(__self__, "dead_letter_storage_secret", dead_letter_storage_secret) + _setter("dead_letter_storage_secret", dead_letter_storage_secret) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="digitalTwinsId") @@ -129,18 +168,49 @@ def __init__(__self__, *, :param pulumi.Input[str] eventgrid_topic_secondary_access_key: The secondary access key of the Event Grid Topic. :param pulumi.Input[str] name: The name which should be used for this Digital Twins Eventgrid Endpoint. Changing this forces a new Digital Twins Eventgrid Endpoint to be created. """ + _EndpointEventGridState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dead_letter_storage_secret=dead_letter_storage_secret, + digital_twins_id=digital_twins_id, + eventgrid_topic_endpoint=eventgrid_topic_endpoint, + eventgrid_topic_primary_access_key=eventgrid_topic_primary_access_key, + eventgrid_topic_secondary_access_key=eventgrid_topic_secondary_access_key, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dead_letter_storage_secret: Optional[pulumi.Input[str]] = None, + digital_twins_id: Optional[pulumi.Input[str]] = None, + eventgrid_topic_endpoint: Optional[pulumi.Input[str]] = None, + eventgrid_topic_primary_access_key: Optional[pulumi.Input[str]] = None, + eventgrid_topic_secondary_access_key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dead_letter_storage_secret is None and 'deadLetterStorageSecret' in kwargs: + dead_letter_storage_secret = kwargs['deadLetterStorageSecret'] + if digital_twins_id is None and 'digitalTwinsId' in kwargs: + digital_twins_id = kwargs['digitalTwinsId'] + if eventgrid_topic_endpoint is None and 'eventgridTopicEndpoint' in kwargs: + eventgrid_topic_endpoint = kwargs['eventgridTopicEndpoint'] + if eventgrid_topic_primary_access_key is None and 'eventgridTopicPrimaryAccessKey' in kwargs: + eventgrid_topic_primary_access_key = kwargs['eventgridTopicPrimaryAccessKey'] + if eventgrid_topic_secondary_access_key is None and 'eventgridTopicSecondaryAccessKey' in kwargs: + eventgrid_topic_secondary_access_key = kwargs['eventgridTopicSecondaryAccessKey'] + if dead_letter_storage_secret is not None: - pulumi.set(__self__, "dead_letter_storage_secret", dead_letter_storage_secret) + _setter("dead_letter_storage_secret", dead_letter_storage_secret) if digital_twins_id is not None: - pulumi.set(__self__, "digital_twins_id", digital_twins_id) + _setter("digital_twins_id", digital_twins_id) if eventgrid_topic_endpoint is not None: - pulumi.set(__self__, "eventgrid_topic_endpoint", eventgrid_topic_endpoint) + _setter("eventgrid_topic_endpoint", eventgrid_topic_endpoint) if eventgrid_topic_primary_access_key is not None: - pulumi.set(__self__, "eventgrid_topic_primary_access_key", eventgrid_topic_primary_access_key) + _setter("eventgrid_topic_primary_access_key", eventgrid_topic_primary_access_key) if eventgrid_topic_secondary_access_key is not None: - pulumi.set(__self__, "eventgrid_topic_secondary_access_key", eventgrid_topic_secondary_access_key) + _setter("eventgrid_topic_secondary_access_key", eventgrid_topic_secondary_access_key) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="deadLetterStorageSecret") @@ -314,6 +384,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EndpointEventGridArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/digitaltwins/endpoint_event_hub.py b/sdk/python/pulumi_azure/digitaltwins/endpoint_event_hub.py index 1d2d3201f5..3451938df6 100644 --- a/sdk/python/pulumi_azure/digitaltwins/endpoint_event_hub.py +++ b/sdk/python/pulumi_azure/digitaltwins/endpoint_event_hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EndpointEventHubArgs', 'EndpointEventHub'] @@ -27,13 +27,46 @@ def __init__(__self__, *, :param pulumi.Input[str] dead_letter_storage_secret: The storage secret of the dead-lettering, whose format is `https://.blob.core.windows.net/?`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account. :param pulumi.Input[str] name: The name which should be used for this Digital Twins Event Hub Endpoint. Changing this forces a new Digital Twins Event Hub Endpoint to be created. """ - pulumi.set(__self__, "digital_twins_id", digital_twins_id) - pulumi.set(__self__, "eventhub_primary_connection_string", eventhub_primary_connection_string) - pulumi.set(__self__, "eventhub_secondary_connection_string", eventhub_secondary_connection_string) + EndpointEventHubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + digital_twins_id=digital_twins_id, + eventhub_primary_connection_string=eventhub_primary_connection_string, + eventhub_secondary_connection_string=eventhub_secondary_connection_string, + dead_letter_storage_secret=dead_letter_storage_secret, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + digital_twins_id: Optional[pulumi.Input[str]] = None, + eventhub_primary_connection_string: Optional[pulumi.Input[str]] = None, + eventhub_secondary_connection_string: Optional[pulumi.Input[str]] = None, + dead_letter_storage_secret: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if digital_twins_id is None and 'digitalTwinsId' in kwargs: + digital_twins_id = kwargs['digitalTwinsId'] + if digital_twins_id is None: + raise TypeError("Missing 'digital_twins_id' argument") + if eventhub_primary_connection_string is None and 'eventhubPrimaryConnectionString' in kwargs: + eventhub_primary_connection_string = kwargs['eventhubPrimaryConnectionString'] + if eventhub_primary_connection_string is None: + raise TypeError("Missing 'eventhub_primary_connection_string' argument") + if eventhub_secondary_connection_string is None and 'eventhubSecondaryConnectionString' in kwargs: + eventhub_secondary_connection_string = kwargs['eventhubSecondaryConnectionString'] + if eventhub_secondary_connection_string is None: + raise TypeError("Missing 'eventhub_secondary_connection_string' argument") + if dead_letter_storage_secret is None and 'deadLetterStorageSecret' in kwargs: + dead_letter_storage_secret = kwargs['deadLetterStorageSecret'] + + _setter("digital_twins_id", digital_twins_id) + _setter("eventhub_primary_connection_string", eventhub_primary_connection_string) + _setter("eventhub_secondary_connection_string", eventhub_secondary_connection_string) if dead_letter_storage_secret is not None: - pulumi.set(__self__, "dead_letter_storage_secret", dead_letter_storage_secret) + _setter("dead_letter_storage_secret", dead_letter_storage_secret) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="digitalTwinsId") @@ -112,16 +145,43 @@ def __init__(__self__, *, :param pulumi.Input[str] eventhub_secondary_connection_string: The secondary connection string of the Event Hub Authorization Rule with a minimum of `send` permission. :param pulumi.Input[str] name: The name which should be used for this Digital Twins Event Hub Endpoint. Changing this forces a new Digital Twins Event Hub Endpoint to be created. """ + _EndpointEventHubState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dead_letter_storage_secret=dead_letter_storage_secret, + digital_twins_id=digital_twins_id, + eventhub_primary_connection_string=eventhub_primary_connection_string, + eventhub_secondary_connection_string=eventhub_secondary_connection_string, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dead_letter_storage_secret: Optional[pulumi.Input[str]] = None, + digital_twins_id: Optional[pulumi.Input[str]] = None, + eventhub_primary_connection_string: Optional[pulumi.Input[str]] = None, + eventhub_secondary_connection_string: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dead_letter_storage_secret is None and 'deadLetterStorageSecret' in kwargs: + dead_letter_storage_secret = kwargs['deadLetterStorageSecret'] + if digital_twins_id is None and 'digitalTwinsId' in kwargs: + digital_twins_id = kwargs['digitalTwinsId'] + if eventhub_primary_connection_string is None and 'eventhubPrimaryConnectionString' in kwargs: + eventhub_primary_connection_string = kwargs['eventhubPrimaryConnectionString'] + if eventhub_secondary_connection_string is None and 'eventhubSecondaryConnectionString' in kwargs: + eventhub_secondary_connection_string = kwargs['eventhubSecondaryConnectionString'] + if dead_letter_storage_secret is not None: - pulumi.set(__self__, "dead_letter_storage_secret", dead_letter_storage_secret) + _setter("dead_letter_storage_secret", dead_letter_storage_secret) if digital_twins_id is not None: - pulumi.set(__self__, "digital_twins_id", digital_twins_id) + _setter("digital_twins_id", digital_twins_id) if eventhub_primary_connection_string is not None: - pulumi.set(__self__, "eventhub_primary_connection_string", eventhub_primary_connection_string) + _setter("eventhub_primary_connection_string", eventhub_primary_connection_string) if eventhub_secondary_connection_string is not None: - pulumi.set(__self__, "eventhub_secondary_connection_string", eventhub_secondary_connection_string) + _setter("eventhub_secondary_connection_string", eventhub_secondary_connection_string) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="deadLetterStorageSecret") @@ -305,6 +365,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EndpointEventHubArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/digitaltwins/endpoint_servicebus.py b/sdk/python/pulumi_azure/digitaltwins/endpoint_servicebus.py index ce485a6008..fc9e76dd5f 100644 --- a/sdk/python/pulumi_azure/digitaltwins/endpoint_servicebus.py +++ b/sdk/python/pulumi_azure/digitaltwins/endpoint_servicebus.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EndpointServicebusArgs', 'EndpointServicebus'] @@ -27,13 +27,46 @@ def __init__(__self__, *, :param pulumi.Input[str] dead_letter_storage_secret: The storage secret of the dead-lettering, whose format is `https://.blob.core.windows.net/?`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account. :param pulumi.Input[str] name: The name which should be used for this Digital Twins Service Bus Endpoint. Changing this forces a new Digital Twins Service Bus Endpoint to be created. """ - pulumi.set(__self__, "digital_twins_id", digital_twins_id) - pulumi.set(__self__, "servicebus_primary_connection_string", servicebus_primary_connection_string) - pulumi.set(__self__, "servicebus_secondary_connection_string", servicebus_secondary_connection_string) + EndpointServicebusArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + digital_twins_id=digital_twins_id, + servicebus_primary_connection_string=servicebus_primary_connection_string, + servicebus_secondary_connection_string=servicebus_secondary_connection_string, + dead_letter_storage_secret=dead_letter_storage_secret, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + digital_twins_id: Optional[pulumi.Input[str]] = None, + servicebus_primary_connection_string: Optional[pulumi.Input[str]] = None, + servicebus_secondary_connection_string: Optional[pulumi.Input[str]] = None, + dead_letter_storage_secret: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if digital_twins_id is None and 'digitalTwinsId' in kwargs: + digital_twins_id = kwargs['digitalTwinsId'] + if digital_twins_id is None: + raise TypeError("Missing 'digital_twins_id' argument") + if servicebus_primary_connection_string is None and 'servicebusPrimaryConnectionString' in kwargs: + servicebus_primary_connection_string = kwargs['servicebusPrimaryConnectionString'] + if servicebus_primary_connection_string is None: + raise TypeError("Missing 'servicebus_primary_connection_string' argument") + if servicebus_secondary_connection_string is None and 'servicebusSecondaryConnectionString' in kwargs: + servicebus_secondary_connection_string = kwargs['servicebusSecondaryConnectionString'] + if servicebus_secondary_connection_string is None: + raise TypeError("Missing 'servicebus_secondary_connection_string' argument") + if dead_letter_storage_secret is None and 'deadLetterStorageSecret' in kwargs: + dead_letter_storage_secret = kwargs['deadLetterStorageSecret'] + + _setter("digital_twins_id", digital_twins_id) + _setter("servicebus_primary_connection_string", servicebus_primary_connection_string) + _setter("servicebus_secondary_connection_string", servicebus_secondary_connection_string) if dead_letter_storage_secret is not None: - pulumi.set(__self__, "dead_letter_storage_secret", dead_letter_storage_secret) + _setter("dead_letter_storage_secret", dead_letter_storage_secret) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="digitalTwinsId") @@ -112,16 +145,43 @@ def __init__(__self__, *, :param pulumi.Input[str] servicebus_primary_connection_string: The primary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission. . :param pulumi.Input[str] servicebus_secondary_connection_string: The secondary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission. """ + _EndpointServicebusState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dead_letter_storage_secret=dead_letter_storage_secret, + digital_twins_id=digital_twins_id, + name=name, + servicebus_primary_connection_string=servicebus_primary_connection_string, + servicebus_secondary_connection_string=servicebus_secondary_connection_string, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dead_letter_storage_secret: Optional[pulumi.Input[str]] = None, + digital_twins_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + servicebus_primary_connection_string: Optional[pulumi.Input[str]] = None, + servicebus_secondary_connection_string: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dead_letter_storage_secret is None and 'deadLetterStorageSecret' in kwargs: + dead_letter_storage_secret = kwargs['deadLetterStorageSecret'] + if digital_twins_id is None and 'digitalTwinsId' in kwargs: + digital_twins_id = kwargs['digitalTwinsId'] + if servicebus_primary_connection_string is None and 'servicebusPrimaryConnectionString' in kwargs: + servicebus_primary_connection_string = kwargs['servicebusPrimaryConnectionString'] + if servicebus_secondary_connection_string is None and 'servicebusSecondaryConnectionString' in kwargs: + servicebus_secondary_connection_string = kwargs['servicebusSecondaryConnectionString'] + if dead_letter_storage_secret is not None: - pulumi.set(__self__, "dead_letter_storage_secret", dead_letter_storage_secret) + _setter("dead_letter_storage_secret", dead_letter_storage_secret) if digital_twins_id is not None: - pulumi.set(__self__, "digital_twins_id", digital_twins_id) + _setter("digital_twins_id", digital_twins_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if servicebus_primary_connection_string is not None: - pulumi.set(__self__, "servicebus_primary_connection_string", servicebus_primary_connection_string) + _setter("servicebus_primary_connection_string", servicebus_primary_connection_string) if servicebus_secondary_connection_string is not None: - pulumi.set(__self__, "servicebus_secondary_connection_string", servicebus_secondary_connection_string) + _setter("servicebus_secondary_connection_string", servicebus_secondary_connection_string) @property @pulumi.getter(name="deadLetterStorageSecret") @@ -293,6 +353,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EndpointServicebusArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/digitaltwins/get_instance.py b/sdk/python/pulumi_azure/digitaltwins/get_instance.py index b11d5cc4db..48b9c9acf3 100644 --- a/sdk/python/pulumi_azure/digitaltwins/get_instance.py +++ b/sdk/python/pulumi_azure/digitaltwins/get_instance.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/digitaltwins/instance.py b/sdk/python/pulumi_azure/digitaltwins/instance.py index 94bb5b5519..f450fcca25 100644 --- a/sdk/python/pulumi_azure/digitaltwins/instance.py +++ b/sdk/python/pulumi_azure/digitaltwins/instance.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,15 +29,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Digital Twins instance. Changing this forces a new Digital Twins instance to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Digital Twins instance. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + InstanceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + identity=identity, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['InstanceIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -118,18 +141,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Digital Twins instance should exist. Changing this forces a new Digital Twins instance to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Digital Twins instance. """ + _InstanceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + identity=identity, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['InstanceIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="hostName") @@ -291,6 +339,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + InstanceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -310,6 +362,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = InstanceArgs.__new__(InstanceArgs) + if identity is not None and not isinstance(identity, InstanceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + InstanceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/digitaltwins/outputs.py b/sdk/python/pulumi_azure/digitaltwins/outputs.py index 3dea00970b..390021933c 100644 --- a/sdk/python/pulumi_azure/digitaltwins/outputs.py +++ b/sdk/python/pulumi_azure/digitaltwins/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -49,13 +49,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + InstanceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/digitaltwins/time_series_database_connection.py b/sdk/python/pulumi_azure/digitaltwins/time_series_database_connection.py index 86b60d5708..34660ab555 100644 --- a/sdk/python/pulumi_azure/digitaltwins/time_series_database_connection.py +++ b/sdk/python/pulumi_azure/digitaltwins/time_series_database_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TimeSeriesDatabaseConnectionArgs', 'TimeSeriesDatabaseConnection'] @@ -37,19 +37,80 @@ def __init__(__self__, *, :param pulumi.Input[str] kusto_table_name: Name of the Kusto Table. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name which should be used for this Digital Twins Time Series Database Connection. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "digital_twins_id", digital_twins_id) - pulumi.set(__self__, "eventhub_name", eventhub_name) - pulumi.set(__self__, "eventhub_namespace_endpoint_uri", eventhub_namespace_endpoint_uri) - pulumi.set(__self__, "eventhub_namespace_id", eventhub_namespace_id) - pulumi.set(__self__, "kusto_cluster_id", kusto_cluster_id) - pulumi.set(__self__, "kusto_cluster_uri", kusto_cluster_uri) - pulumi.set(__self__, "kusto_database_name", kusto_database_name) + TimeSeriesDatabaseConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + digital_twins_id=digital_twins_id, + eventhub_name=eventhub_name, + eventhub_namespace_endpoint_uri=eventhub_namespace_endpoint_uri, + eventhub_namespace_id=eventhub_namespace_id, + kusto_cluster_id=kusto_cluster_id, + kusto_cluster_uri=kusto_cluster_uri, + kusto_database_name=kusto_database_name, + eventhub_consumer_group_name=eventhub_consumer_group_name, + kusto_table_name=kusto_table_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + digital_twins_id: Optional[pulumi.Input[str]] = None, + eventhub_name: Optional[pulumi.Input[str]] = None, + eventhub_namespace_endpoint_uri: Optional[pulumi.Input[str]] = None, + eventhub_namespace_id: Optional[pulumi.Input[str]] = None, + kusto_cluster_id: Optional[pulumi.Input[str]] = None, + kusto_cluster_uri: Optional[pulumi.Input[str]] = None, + kusto_database_name: Optional[pulumi.Input[str]] = None, + eventhub_consumer_group_name: Optional[pulumi.Input[str]] = None, + kusto_table_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if digital_twins_id is None and 'digitalTwinsId' in kwargs: + digital_twins_id = kwargs['digitalTwinsId'] + if digital_twins_id is None: + raise TypeError("Missing 'digital_twins_id' argument") + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_name is None: + raise TypeError("Missing 'eventhub_name' argument") + if eventhub_namespace_endpoint_uri is None and 'eventhubNamespaceEndpointUri' in kwargs: + eventhub_namespace_endpoint_uri = kwargs['eventhubNamespaceEndpointUri'] + if eventhub_namespace_endpoint_uri is None: + raise TypeError("Missing 'eventhub_namespace_endpoint_uri' argument") + if eventhub_namespace_id is None and 'eventhubNamespaceId' in kwargs: + eventhub_namespace_id = kwargs['eventhubNamespaceId'] + if eventhub_namespace_id is None: + raise TypeError("Missing 'eventhub_namespace_id' argument") + if kusto_cluster_id is None and 'kustoClusterId' in kwargs: + kusto_cluster_id = kwargs['kustoClusterId'] + if kusto_cluster_id is None: + raise TypeError("Missing 'kusto_cluster_id' argument") + if kusto_cluster_uri is None and 'kustoClusterUri' in kwargs: + kusto_cluster_uri = kwargs['kustoClusterUri'] + if kusto_cluster_uri is None: + raise TypeError("Missing 'kusto_cluster_uri' argument") + if kusto_database_name is None and 'kustoDatabaseName' in kwargs: + kusto_database_name = kwargs['kustoDatabaseName'] + if kusto_database_name is None: + raise TypeError("Missing 'kusto_database_name' argument") + if eventhub_consumer_group_name is None and 'eventhubConsumerGroupName' in kwargs: + eventhub_consumer_group_name = kwargs['eventhubConsumerGroupName'] + if kusto_table_name is None and 'kustoTableName' in kwargs: + kusto_table_name = kwargs['kustoTableName'] + + _setter("digital_twins_id", digital_twins_id) + _setter("eventhub_name", eventhub_name) + _setter("eventhub_namespace_endpoint_uri", eventhub_namespace_endpoint_uri) + _setter("eventhub_namespace_id", eventhub_namespace_id) + _setter("kusto_cluster_id", kusto_cluster_id) + _setter("kusto_cluster_uri", kusto_cluster_uri) + _setter("kusto_database_name", kusto_database_name) if eventhub_consumer_group_name is not None: - pulumi.set(__self__, "eventhub_consumer_group_name", eventhub_consumer_group_name) + _setter("eventhub_consumer_group_name", eventhub_consumer_group_name) if kusto_table_name is not None: - pulumi.set(__self__, "kusto_table_name", kusto_table_name) + _setter("kusto_table_name", kusto_table_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="digitalTwinsId") @@ -198,26 +259,73 @@ def __init__(__self__, *, :param pulumi.Input[str] kusto_table_name: Name of the Kusto Table. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name which should be used for this Digital Twins Time Series Database Connection. Changing this forces a new resource to be created. """ + _TimeSeriesDatabaseConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + digital_twins_id=digital_twins_id, + eventhub_consumer_group_name=eventhub_consumer_group_name, + eventhub_name=eventhub_name, + eventhub_namespace_endpoint_uri=eventhub_namespace_endpoint_uri, + eventhub_namespace_id=eventhub_namespace_id, + kusto_cluster_id=kusto_cluster_id, + kusto_cluster_uri=kusto_cluster_uri, + kusto_database_name=kusto_database_name, + kusto_table_name=kusto_table_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + digital_twins_id: Optional[pulumi.Input[str]] = None, + eventhub_consumer_group_name: Optional[pulumi.Input[str]] = None, + eventhub_name: Optional[pulumi.Input[str]] = None, + eventhub_namespace_endpoint_uri: Optional[pulumi.Input[str]] = None, + eventhub_namespace_id: Optional[pulumi.Input[str]] = None, + kusto_cluster_id: Optional[pulumi.Input[str]] = None, + kusto_cluster_uri: Optional[pulumi.Input[str]] = None, + kusto_database_name: Optional[pulumi.Input[str]] = None, + kusto_table_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if digital_twins_id is None and 'digitalTwinsId' in kwargs: + digital_twins_id = kwargs['digitalTwinsId'] + if eventhub_consumer_group_name is None and 'eventhubConsumerGroupName' in kwargs: + eventhub_consumer_group_name = kwargs['eventhubConsumerGroupName'] + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_namespace_endpoint_uri is None and 'eventhubNamespaceEndpointUri' in kwargs: + eventhub_namespace_endpoint_uri = kwargs['eventhubNamespaceEndpointUri'] + if eventhub_namespace_id is None and 'eventhubNamespaceId' in kwargs: + eventhub_namespace_id = kwargs['eventhubNamespaceId'] + if kusto_cluster_id is None and 'kustoClusterId' in kwargs: + kusto_cluster_id = kwargs['kustoClusterId'] + if kusto_cluster_uri is None and 'kustoClusterUri' in kwargs: + kusto_cluster_uri = kwargs['kustoClusterUri'] + if kusto_database_name is None and 'kustoDatabaseName' in kwargs: + kusto_database_name = kwargs['kustoDatabaseName'] + if kusto_table_name is None and 'kustoTableName' in kwargs: + kusto_table_name = kwargs['kustoTableName'] + if digital_twins_id is not None: - pulumi.set(__self__, "digital_twins_id", digital_twins_id) + _setter("digital_twins_id", digital_twins_id) if eventhub_consumer_group_name is not None: - pulumi.set(__self__, "eventhub_consumer_group_name", eventhub_consumer_group_name) + _setter("eventhub_consumer_group_name", eventhub_consumer_group_name) if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if eventhub_namespace_endpoint_uri is not None: - pulumi.set(__self__, "eventhub_namespace_endpoint_uri", eventhub_namespace_endpoint_uri) + _setter("eventhub_namespace_endpoint_uri", eventhub_namespace_endpoint_uri) if eventhub_namespace_id is not None: - pulumi.set(__self__, "eventhub_namespace_id", eventhub_namespace_id) + _setter("eventhub_namespace_id", eventhub_namespace_id) if kusto_cluster_id is not None: - pulumi.set(__self__, "kusto_cluster_id", kusto_cluster_id) + _setter("kusto_cluster_id", kusto_cluster_id) if kusto_cluster_uri is not None: - pulumi.set(__self__, "kusto_cluster_uri", kusto_cluster_uri) + _setter("kusto_cluster_uri", kusto_cluster_uri) if kusto_database_name is not None: - pulumi.set(__self__, "kusto_database_name", kusto_database_name) + _setter("kusto_database_name", kusto_database_name) if kusto_table_name is not None: - pulumi.set(__self__, "kusto_table_name", kusto_table_name) + _setter("kusto_table_name", kusto_table_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="digitalTwinsId") @@ -547,6 +655,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TimeSeriesDatabaseConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dns/_inputs.py b/sdk/python/pulumi_azure/dns/_inputs.py index 2a7aeb9d35..c4f50ff1da 100644 --- a/sdk/python/pulumi_azure/dns/_inputs.py +++ b/sdk/python/pulumi_azure/dns/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -28,9 +28,30 @@ def __init__(__self__, *, :param pulumi.Input[str] tag: A property tag, options are `issue`, `issuewild` and `iodef`. :param pulumi.Input[str] value: A property value such as a registrar domain. """ - pulumi.set(__self__, "flags", flags) - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "value", value) + CaaRecordRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + flags=flags, + tag=tag, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + flags: Optional[pulumi.Input[int]] = None, + tag: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if flags is None: + raise TypeError("Missing 'flags' argument") + if tag is None: + raise TypeError("Missing 'tag' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("flags", flags) + _setter("tag", tag) + _setter("value", value) @property @pulumi.getter @@ -78,8 +99,25 @@ def __init__(__self__, *, :param pulumi.Input[str] exchange: The mail server responsible for the domain covered by the MX record. :param pulumi.Input[str] preference: String representing the "preference” value of the MX records. Records with lower preference value take priority. """ - pulumi.set(__self__, "exchange", exchange) - pulumi.set(__self__, "preference", preference) + MxRecordRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + exchange=exchange, + preference=preference, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exchange: Optional[pulumi.Input[str]] = None, + preference: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exchange is None: + raise TypeError("Missing 'exchange' argument") + if preference is None: + raise TypeError("Missing 'preference' argument") + + _setter("exchange", exchange) + _setter("preference", preference) @property @pulumi.getter @@ -119,10 +157,35 @@ def __init__(__self__, *, :param pulumi.Input[str] target: FQDN of the service. :param pulumi.Input[int] weight: Weight of the SRV record. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "target", target) - pulumi.set(__self__, "weight", weight) + SrvRecordRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + priority=priority, + target=target, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + priority: Optional[pulumi.Input[int]] = None, + target: Optional[pulumi.Input[str]] = None, + weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if target is None: + raise TypeError("Missing 'target' argument") + if weight is None: + raise TypeError("Missing 'weight' argument") + + _setter("port", port) + _setter("priority", priority) + _setter("target", target) + _setter("weight", weight) @property @pulumi.getter @@ -180,7 +243,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] value: The value of the record. Max length: 1024 characters """ - pulumi.set(__self__, "value", value) + TxtRecordRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) @property @pulumi.getter @@ -219,25 +295,68 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Record Set. :param pulumi.Input[int] ttl: The Time To Live of the SOA Record in seconds. Defaults to `3600`. """ - pulumi.set(__self__, "email", email) + ZoneSoaRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + expire_time=expire_time, + fqdn=fqdn, + host_name=host_name, + minimum_ttl=minimum_ttl, + refresh_time=refresh_time, + retry_time=retry_time, + serial_number=serial_number, + tags=tags, + ttl=ttl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input[str]] = None, + expire_time: Optional[pulumi.Input[int]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + host_name: Optional[pulumi.Input[str]] = None, + minimum_ttl: Optional[pulumi.Input[int]] = None, + refresh_time: Optional[pulumi.Input[int]] = None, + retry_time: Optional[pulumi.Input[int]] = None, + serial_number: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + if expire_time is None and 'expireTime' in kwargs: + expire_time = kwargs['expireTime'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if minimum_ttl is None and 'minimumTtl' in kwargs: + minimum_ttl = kwargs['minimumTtl'] + if refresh_time is None and 'refreshTime' in kwargs: + refresh_time = kwargs['refreshTime'] + if retry_time is None and 'retryTime' in kwargs: + retry_time = kwargs['retryTime'] + if serial_number is None and 'serialNumber' in kwargs: + serial_number = kwargs['serialNumber'] + + _setter("email", email) if expire_time is not None: - pulumi.set(__self__, "expire_time", expire_time) + _setter("expire_time", expire_time) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if minimum_ttl is not None: - pulumi.set(__self__, "minimum_ttl", minimum_ttl) + _setter("minimum_ttl", minimum_ttl) if refresh_time is not None: - pulumi.set(__self__, "refresh_time", refresh_time) + _setter("refresh_time", refresh_time) if retry_time is not None: - pulumi.set(__self__, "retry_time", retry_time) + _setter("retry_time", retry_time) if serial_number is not None: - pulumi.set(__self__, "serial_number", serial_number) + _setter("serial_number", serial_number) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/dns/a_record.py b/sdk/python/pulumi_azure/dns/a_record.py index 13e61ab392..3ec0091993 100644 --- a/sdk/python/pulumi_azure/dns/a_record.py +++ b/sdk/python/pulumi_azure/dns/a_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ARecordArgs', 'ARecord'] @@ -35,17 +35,52 @@ def __init__(__self__, *, > **Note:** either `records` OR `target_resource_id` must be specified, but not both. :param pulumi.Input[str] target_resource_id: The Azure resource id of the target object. Conflicts with `records`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + ARecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + records=records, + tags=tags, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter(name="resourceGroupName") @@ -162,22 +197,53 @@ def __init__(__self__, *, > **Note:** The `zone_name` should be the name of resource `dns.Zone` instead of `privatedns.Zone`. """ + _ARecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + target_resource_id=target_resource_id, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -409,6 +475,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ARecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dns/aaaa_record.py b/sdk/python/pulumi_azure/dns/aaaa_record.py index 56cbeea2ba..21e32a5a8d 100644 --- a/sdk/python/pulumi_azure/dns/aaaa_record.py +++ b/sdk/python/pulumi_azure/dns/aaaa_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AaaaRecordArgs', 'AaaaRecord'] @@ -33,17 +33,52 @@ def __init__(__self__, *, > **Note:** either `records` OR `target_resource_id` must be specified, but not both. :param pulumi.Input[str] target_resource_id: The Azure resource id of the target object. Conflicts with `records`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + AaaaRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + records=records, + tags=tags, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter(name="resourceGroupName") @@ -156,22 +191,53 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _AaaaRecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + target_resource_id=target_resource_id, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -399,6 +465,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AaaaRecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dns/c_name_record.py b/sdk/python/pulumi_azure/dns/c_name_record.py index 821ebd9e67..9a53cbdcee 100644 --- a/sdk/python/pulumi_azure/dns/c_name_record.py +++ b/sdk/python/pulumi_azure/dns/c_name_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CNameRecordArgs', 'CNameRecord'] @@ -33,17 +33,52 @@ def __init__(__self__, *, > **Note:** either `record` OR `target_resource_id` must be specified, but not both. :param pulumi.Input[str] target_resource_id: The Azure resource id of the target object. Conflicts with `record`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + CNameRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + record=record, + tags=tags, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + record: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if record is not None: - pulumi.set(__self__, "record", record) + _setter("record", record) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter(name="resourceGroupName") @@ -156,22 +191,53 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _CNameRecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + record=record, + resource_group_name=resource_group_name, + tags=tags, + target_resource_id=target_resource_id, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + record: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if record is not None: - pulumi.set(__self__, "record", record) + _setter("record", record) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -399,6 +465,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CNameRecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dns/caa_record.py b/sdk/python/pulumi_azure/dns/caa_record.py index 4bb83e4ec9..de610c7217 100644 --- a/sdk/python/pulumi_azure/dns/caa_record.py +++ b/sdk/python/pulumi_azure/dns/caa_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,14 +31,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the DNS CAA Record. If you are creating the record in the apex of the zone use `"@"` as the name. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "records", records) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + CaaRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + records=records, + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + records: Optional[pulumi.Input[Sequence[pulumi.Input['CaaRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if records is None: + raise TypeError("Missing 'records' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + + _setter("records", records) + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -133,20 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _CaaRecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input['CaaRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -366,6 +426,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CaaRecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dns/get_a_record.py b/sdk/python/pulumi_azure/dns/get_a_record.py index ead609c711..c8a21b053a 100644 --- a/sdk/python/pulumi_azure/dns/get_a_record.py +++ b/sdk/python/pulumi_azure/dns/get_a_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/dns/get_aaaa_record.py b/sdk/python/pulumi_azure/dns/get_aaaa_record.py index e7f3d9bfbc..b64ddcfb10 100644 --- a/sdk/python/pulumi_azure/dns/get_aaaa_record.py +++ b/sdk/python/pulumi_azure/dns/get_aaaa_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/dns/get_caa_record.py b/sdk/python/pulumi_azure/dns/get_caa_record.py index 2c160e6074..a98b9367bf 100644 --- a/sdk/python/pulumi_azure/dns/get_caa_record.py +++ b/sdk/python/pulumi_azure/dns/get_caa_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/dns/get_cname_record.py b/sdk/python/pulumi_azure/dns/get_cname_record.py index 54752d0162..0f6b34d412 100644 --- a/sdk/python/pulumi_azure/dns/get_cname_record.py +++ b/sdk/python/pulumi_azure/dns/get_cname_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/dns/get_mx_record.py b/sdk/python/pulumi_azure/dns/get_mx_record.py index 4cf082cec1..e6f2fba6d5 100644 --- a/sdk/python/pulumi_azure/dns/get_mx_record.py +++ b/sdk/python/pulumi_azure/dns/get_mx_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/dns/get_ns_record.py b/sdk/python/pulumi_azure/dns/get_ns_record.py index 33920be2cb..94e2e913ea 100644 --- a/sdk/python/pulumi_azure/dns/get_ns_record.py +++ b/sdk/python/pulumi_azure/dns/get_ns_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/dns/get_ptr_record.py b/sdk/python/pulumi_azure/dns/get_ptr_record.py index 923e98e095..6e2de226d6 100644 --- a/sdk/python/pulumi_azure/dns/get_ptr_record.py +++ b/sdk/python/pulumi_azure/dns/get_ptr_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/dns/get_soa_record.py b/sdk/python/pulumi_azure/dns/get_soa_record.py index 8aa0ff13e8..70a366eeb8 100644 --- a/sdk/python/pulumi_azure/dns/get_soa_record.py +++ b/sdk/python/pulumi_azure/dns/get_soa_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/dns/get_srv_record.py b/sdk/python/pulumi_azure/dns/get_srv_record.py index ab7976f90e..155cc8ee7a 100644 --- a/sdk/python/pulumi_azure/dns/get_srv_record.py +++ b/sdk/python/pulumi_azure/dns/get_srv_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/dns/get_txt_record.py b/sdk/python/pulumi_azure/dns/get_txt_record.py index 363d5642d8..996ece8fd5 100644 --- a/sdk/python/pulumi_azure/dns/get_txt_record.py +++ b/sdk/python/pulumi_azure/dns/get_txt_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/dns/get_zone.py b/sdk/python/pulumi_azure/dns/get_zone.py index b7a29a6326..8e84c3efba 100644 --- a/sdk/python/pulumi_azure/dns/get_zone.py +++ b/sdk/python/pulumi_azure/dns/get_zone.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/dns/mx_record.py b/sdk/python/pulumi_azure/dns/mx_record.py index 1d387ec7bf..00e9e9c803 100644 --- a/sdk/python/pulumi_azure/dns/mx_record.py +++ b/sdk/python/pulumi_azure/dns/mx_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,14 +31,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the DNS MX Record. Defaults to `@` (root). Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "records", records) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + MxRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + records=records, + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + records: Optional[pulumi.Input[Sequence[pulumi.Input['MxRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if records is None: + raise TypeError("Missing 'records' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + + _setter("records", records) + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -133,20 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _MxRecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input['MxRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -342,6 +402,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MxRecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dns/ns_record.py b/sdk/python/pulumi_azure/dns/ns_record.py index 2e32c194ef..a9a0f1121b 100644 --- a/sdk/python/pulumi_azure/dns/ns_record.py +++ b/sdk/python/pulumi_azure/dns/ns_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NsRecordArgs', 'NsRecord'] @@ -29,14 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the DNS NS Record. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "records", records) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + NsRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + records=records, + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if records is None: + raise TypeError("Missing 'records' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + + _setter("records", records) + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -131,20 +164,47 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _NsRecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -328,6 +388,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NsRecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dns/outputs.py b/sdk/python/pulumi_azure/dns/outputs.py index 7776c72024..3b418b8962 100644 --- a/sdk/python/pulumi_azure/dns/outputs.py +++ b/sdk/python/pulumi_azure/dns/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -32,9 +32,30 @@ def __init__(__self__, *, :param str tag: A property tag, options are `issue`, `issuewild` and `iodef`. :param str value: A property value such as a registrar domain. """ - pulumi.set(__self__, "flags", flags) - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "value", value) + CaaRecordRecord._configure( + lambda key, value: pulumi.set(__self__, key, value), + flags=flags, + tag=tag, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + flags: Optional[int] = None, + tag: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if flags is None: + raise TypeError("Missing 'flags' argument") + if tag is None: + raise TypeError("Missing 'tag' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("flags", flags) + _setter("tag", tag) + _setter("value", value) @property @pulumi.getter @@ -70,8 +91,25 @@ def __init__(__self__, *, :param str exchange: The mail server responsible for the domain covered by the MX record. :param str preference: String representing the "preference” value of the MX records. Records with lower preference value take priority. """ - pulumi.set(__self__, "exchange", exchange) - pulumi.set(__self__, "preference", preference) + MxRecordRecord._configure( + lambda key, value: pulumi.set(__self__, key, value), + exchange=exchange, + preference=preference, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exchange: Optional[str] = None, + preference: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exchange is None: + raise TypeError("Missing 'exchange' argument") + if preference is None: + raise TypeError("Missing 'preference' argument") + + _setter("exchange", exchange) + _setter("preference", preference) @property @pulumi.getter @@ -103,10 +141,35 @@ def __init__(__self__, *, :param str target: FQDN of the service. :param int weight: Weight of the SRV record. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "target", target) - pulumi.set(__self__, "weight", weight) + SrvRecordRecord._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + priority=priority, + target=target, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + priority: Optional[int] = None, + target: Optional[str] = None, + weight: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if target is None: + raise TypeError("Missing 'target' argument") + if weight is None: + raise TypeError("Missing 'weight' argument") + + _setter("port", port) + _setter("priority", priority) + _setter("target", target) + _setter("weight", weight) @property @pulumi.getter @@ -148,7 +211,20 @@ def __init__(__self__, *, """ :param str value: The value of the record. Max length: 1024 characters """ - pulumi.set(__self__, "value", value) + TxtRecordRecord._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) @property @pulumi.getter @@ -210,25 +286,68 @@ def __init__(__self__, *, :param Mapping[str, str] tags: A mapping of tags to assign to the Record Set. :param int ttl: The Time To Live of the SOA Record in seconds. Defaults to `3600`. """ - pulumi.set(__self__, "email", email) + ZoneSoaRecord._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + expire_time=expire_time, + fqdn=fqdn, + host_name=host_name, + minimum_ttl=minimum_ttl, + refresh_time=refresh_time, + retry_time=retry_time, + serial_number=serial_number, + tags=tags, + ttl=ttl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[str] = None, + expire_time: Optional[int] = None, + fqdn: Optional[str] = None, + host_name: Optional[str] = None, + minimum_ttl: Optional[int] = None, + refresh_time: Optional[int] = None, + retry_time: Optional[int] = None, + serial_number: Optional[int] = None, + tags: Optional[Mapping[str, str]] = None, + ttl: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + if expire_time is None and 'expireTime' in kwargs: + expire_time = kwargs['expireTime'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if minimum_ttl is None and 'minimumTtl' in kwargs: + minimum_ttl = kwargs['minimumTtl'] + if refresh_time is None and 'refreshTime' in kwargs: + refresh_time = kwargs['refreshTime'] + if retry_time is None and 'retryTime' in kwargs: + retry_time = kwargs['retryTime'] + if serial_number is None and 'serialNumber' in kwargs: + serial_number = kwargs['serialNumber'] + + _setter("email", email) if expire_time is not None: - pulumi.set(__self__, "expire_time", expire_time) + _setter("expire_time", expire_time) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if minimum_ttl is not None: - pulumi.set(__self__, "minimum_ttl", minimum_ttl) + _setter("minimum_ttl", minimum_ttl) if refresh_time is not None: - pulumi.set(__self__, "refresh_time", refresh_time) + _setter("refresh_time", refresh_time) if retry_time is not None: - pulumi.set(__self__, "retry_time", retry_time) + _setter("retry_time", retry_time) if serial_number is not None: - pulumi.set(__self__, "serial_number", serial_number) + _setter("serial_number", serial_number) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) @property @pulumi.getter @@ -319,9 +438,30 @@ def __init__(__self__, *, :param str tag: A property tag, options are `issue`, `issuewild` and `iodef`. :param str value: A property value such as a registrar domain. """ - pulumi.set(__self__, "flags", flags) - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "value", value) + GetCAARecordRecordResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + flags=flags, + tag=tag, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + flags: Optional[int] = None, + tag: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if flags is None: + raise TypeError("Missing 'flags' argument") + if tag is None: + raise TypeError("Missing 'tag' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("flags", flags) + _setter("tag", tag) + _setter("value", value) @property @pulumi.getter @@ -357,8 +497,25 @@ def __init__(__self__, *, :param str exchange: The mail server responsible for the domain covered by the MX record. :param str preference: String representing the "preference” value of the MX records. Records with lower preference value take priority. """ - pulumi.set(__self__, "exchange", exchange) - pulumi.set(__self__, "preference", preference) + GetMxRecordRecordResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + exchange=exchange, + preference=preference, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exchange: Optional[str] = None, + preference: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exchange is None: + raise TypeError("Missing 'exchange' argument") + if preference is None: + raise TypeError("Missing 'preference' argument") + + _setter("exchange", exchange) + _setter("preference", preference) @property @pulumi.getter @@ -390,10 +547,35 @@ def __init__(__self__, *, :param str target: FQDN of the service. :param int weight: Weight of the SRV record. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "target", target) - pulumi.set(__self__, "weight", weight) + GetSrvRecordRecordResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + priority=priority, + target=target, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + priority: Optional[int] = None, + target: Optional[str] = None, + weight: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if target is None: + raise TypeError("Missing 'target' argument") + if weight is None: + raise TypeError("Missing 'weight' argument") + + _setter("port", port) + _setter("priority", priority) + _setter("target", target) + _setter("weight", weight) @property @pulumi.getter @@ -435,7 +617,20 @@ def __init__(__self__, *, """ :param str value: The value of the record. Max length: 1024 characters """ - pulumi.set(__self__, "value", value) + GetTxtRecordRecordResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/dns/ptr_record.py b/sdk/python/pulumi_azure/dns/ptr_record.py index e8feffd3cb..0d1e661e06 100644 --- a/sdk/python/pulumi_azure/dns/ptr_record.py +++ b/sdk/python/pulumi_azure/dns/ptr_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PtrRecordArgs', 'PtrRecord'] @@ -29,14 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the DNS PTR Record. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "records", records) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + PtrRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + records=records, + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if records is None: + raise TypeError("Missing 'records' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + + _setter("records", records) + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -131,20 +164,47 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _PtrRecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -316,6 +376,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PtrRecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dns/srv_record.py b/sdk/python/pulumi_azure/dns/srv_record.py index 943025900f..15d301b0c8 100644 --- a/sdk/python/pulumi_azure/dns/srv_record.py +++ b/sdk/python/pulumi_azure/dns/srv_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,14 +31,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the DNS SRV Record. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "records", records) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + SrvRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + records=records, + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + records: Optional[pulumi.Input[Sequence[pulumi.Input['SrvRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if records is None: + raise TypeError("Missing 'records' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + + _setter("records", records) + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -133,20 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _SrvRecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input['SrvRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -334,6 +394,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SrvRecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dns/txt_record.py b/sdk/python/pulumi_azure/dns/txt_record.py index 842aebc06c..091ff3f88d 100644 --- a/sdk/python/pulumi_azure/dns/txt_record.py +++ b/sdk/python/pulumi_azure/dns/txt_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,14 +31,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the DNS TXT Record. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "records", records) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + TxtRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + records=records, + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + records: Optional[pulumi.Input[Sequence[pulumi.Input['TxtRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if records is None: + raise TypeError("Missing 'records' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + + _setter("records", records) + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -133,20 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _TxtRecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input['TxtRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -338,6 +398,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TxtRecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/dns/zone.py b/sdk/python/pulumi_azure/dns/zone.py index ef8b2a26db..dbb5cb02ba 100644 --- a/sdk/python/pulumi_azure/dns/zone.py +++ b/sdk/python/pulumi_azure/dns/zone.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,13 +27,36 @@ def __init__(__self__, *, :param pulumi.Input['ZoneSoaRecordArgs'] soa_record: An `soa_record` block as defined below. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + ZoneArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + name=name, + soa_record=soa_record, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + soa_record: Optional[pulumi.Input['ZoneSoaRecordArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if soa_record is None and 'soaRecord' in kwargs: + soa_record = kwargs['soaRecord'] + + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if soa_record is not None: - pulumi.set(__self__, "soa_record", soa_record) + _setter("soa_record", soa_record) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -104,20 +127,53 @@ def __init__(__self__, *, :param pulumi.Input['ZoneSoaRecordArgs'] soa_record: An `soa_record` block as defined below. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ZoneState._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_number_of_record_sets=max_number_of_record_sets, + name=name, + name_servers=name_servers, + number_of_record_sets=number_of_record_sets, + resource_group_name=resource_group_name, + soa_record=soa_record, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_number_of_record_sets: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + name_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + number_of_record_sets: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + soa_record: Optional[pulumi.Input['ZoneSoaRecordArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_number_of_record_sets is None and 'maxNumberOfRecordSets' in kwargs: + max_number_of_record_sets = kwargs['maxNumberOfRecordSets'] + if name_servers is None and 'nameServers' in kwargs: + name_servers = kwargs['nameServers'] + if number_of_record_sets is None and 'numberOfRecordSets' in kwargs: + number_of_record_sets = kwargs['numberOfRecordSets'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if soa_record is None and 'soaRecord' in kwargs: + soa_record = kwargs['soaRecord'] + if max_number_of_record_sets is not None: - pulumi.set(__self__, "max_number_of_record_sets", max_number_of_record_sets) + _setter("max_number_of_record_sets", max_number_of_record_sets) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if name_servers is not None: - pulumi.set(__self__, "name_servers", name_servers) + _setter("name_servers", name_servers) if number_of_record_sets is not None: - pulumi.set(__self__, "number_of_record_sets", number_of_record_sets) + _setter("number_of_record_sets", number_of_record_sets) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if soa_record is not None: - pulumi.set(__self__, "soa_record", soa_record) + _setter("soa_record", soa_record) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="maxNumberOfRecordSets") @@ -279,6 +335,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ZoneArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -301,6 +361,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if soa_record is not None and not isinstance(soa_record, ZoneSoaRecordArgs): + soa_record = soa_record or {} + def _setter(key, value): + soa_record[key] = value + ZoneSoaRecordArgs._configure(_setter, **soa_record) __props__.__dict__["soa_record"] = soa_record __props__.__dict__["tags"] = tags __props__.__dict__["max_number_of_record_sets"] = None diff --git a/sdk/python/pulumi_azure/domainservices/_inputs.py b/sdk/python/pulumi_azure/domainservices/_inputs.py index 692bf04e10..6980ac20f8 100644 --- a/sdk/python/pulumi_azure/domainservices/_inputs.py +++ b/sdk/python/pulumi_azure/domainservices/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -33,17 +33,48 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The Azure location where the Domain Service exists. Changing this forces a new resource to be created. :param pulumi.Input[str] service_status: The current service status for the initial replica set. """ - pulumi.set(__self__, "subnet_id", subnet_id) + ServiceInitialReplicaSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + domain_controller_ip_addresses=domain_controller_ip_addresses, + external_access_ip_address=external_access_ip_address, + id=id, + location=location, + service_status=service_status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[pulumi.Input[str]] = None, + domain_controller_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + external_access_ip_address: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + service_status: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if domain_controller_ip_addresses is None and 'domainControllerIpAddresses' in kwargs: + domain_controller_ip_addresses = kwargs['domainControllerIpAddresses'] + if external_access_ip_address is None and 'externalAccessIpAddress' in kwargs: + external_access_ip_address = kwargs['externalAccessIpAddress'] + if service_status is None and 'serviceStatus' in kwargs: + service_status = kwargs['serviceStatus'] + + _setter("subnet_id", subnet_id) if domain_controller_ip_addresses is not None: - pulumi.set(__self__, "domain_controller_ip_addresses", domain_controller_ip_addresses) + _setter("domain_controller_ip_addresses", domain_controller_ip_addresses) if external_access_ip_address is not None: - pulumi.set(__self__, "external_access_ip_address", external_access_ip_address) + _setter("external_access_ip_address", external_access_ip_address) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if service_status is not None: - pulumi.set(__self__, "service_status", service_status) + _setter("service_status", service_status) @property @pulumi.getter(name="subnetId") @@ -129,12 +160,33 @@ def __init__(__self__, *, :param pulumi.Input[bool] notify_dc_admins: Whether to notify members of the _AAD DC Administrators_ group when there are alerts in the managed domain. :param pulumi.Input[bool] notify_global_admins: Whether to notify all Global Administrators when there are alerts in the managed domain. """ + ServiceNotificationsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_recipients=additional_recipients, + notify_dc_admins=notify_dc_admins, + notify_global_admins=notify_global_admins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_recipients: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + notify_dc_admins: Optional[pulumi.Input[bool]] = None, + notify_global_admins: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_recipients is None and 'additionalRecipients' in kwargs: + additional_recipients = kwargs['additionalRecipients'] + if notify_dc_admins is None and 'notifyDcAdmins' in kwargs: + notify_dc_admins = kwargs['notifyDcAdmins'] + if notify_global_admins is None and 'notifyGlobalAdmins' in kwargs: + notify_global_admins = kwargs['notifyGlobalAdmins'] + if additional_recipients is not None: - pulumi.set(__self__, "additional_recipients", additional_recipients) + _setter("additional_recipients", additional_recipients) if notify_dc_admins is not None: - pulumi.set(__self__, "notify_dc_admins", notify_dc_admins) + _setter("notify_dc_admins", notify_dc_admins) if notify_global_admins is not None: - pulumi.set(__self__, "notify_global_admins", notify_global_admins) + _setter("notify_global_admins", notify_global_admins) @property @pulumi.getter(name="additionalRecipients") @@ -192,17 +244,58 @@ def __init__(__self__, *, :param pulumi.Input[bool] external_access_enabled: Whether to enable external access to LDAPS over the Internet. Defaults to `false`. :param pulumi.Input[str] public_certificate: The public certificate. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "pfx_certificate", pfx_certificate) - pulumi.set(__self__, "pfx_certificate_password", pfx_certificate_password) + ServiceSecureLdapArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + pfx_certificate=pfx_certificate, + pfx_certificate_password=pfx_certificate_password, + certificate_expiry=certificate_expiry, + certificate_thumbprint=certificate_thumbprint, + external_access_enabled=external_access_enabled, + public_certificate=public_certificate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + pfx_certificate: Optional[pulumi.Input[str]] = None, + pfx_certificate_password: Optional[pulumi.Input[str]] = None, + certificate_expiry: Optional[pulumi.Input[str]] = None, + certificate_thumbprint: Optional[pulumi.Input[str]] = None, + external_access_enabled: Optional[pulumi.Input[bool]] = None, + public_certificate: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if pfx_certificate is None and 'pfxCertificate' in kwargs: + pfx_certificate = kwargs['pfxCertificate'] + if pfx_certificate is None: + raise TypeError("Missing 'pfx_certificate' argument") + if pfx_certificate_password is None and 'pfxCertificatePassword' in kwargs: + pfx_certificate_password = kwargs['pfxCertificatePassword'] + if pfx_certificate_password is None: + raise TypeError("Missing 'pfx_certificate_password' argument") + if certificate_expiry is None and 'certificateExpiry' in kwargs: + certificate_expiry = kwargs['certificateExpiry'] + if certificate_thumbprint is None and 'certificateThumbprint' in kwargs: + certificate_thumbprint = kwargs['certificateThumbprint'] + if external_access_enabled is None and 'externalAccessEnabled' in kwargs: + external_access_enabled = kwargs['externalAccessEnabled'] + if public_certificate is None and 'publicCertificate' in kwargs: + public_certificate = kwargs['publicCertificate'] + + _setter("enabled", enabled) + _setter("pfx_certificate", pfx_certificate) + _setter("pfx_certificate_password", pfx_certificate_password) if certificate_expiry is not None: - pulumi.set(__self__, "certificate_expiry", certificate_expiry) + _setter("certificate_expiry", certificate_expiry) if certificate_thumbprint is not None: - pulumi.set(__self__, "certificate_thumbprint", certificate_thumbprint) + _setter("certificate_thumbprint", certificate_thumbprint) if external_access_enabled is not None: - pulumi.set(__self__, "external_access_enabled", external_access_enabled) + _setter("external_access_enabled", external_access_enabled) if public_certificate is not None: - pulumi.set(__self__, "public_certificate", public_certificate) + _setter("public_certificate", public_certificate) @property @pulumi.getter @@ -308,20 +401,57 @@ def __init__(__self__, *, :param pulumi.Input[bool] sync_on_prem_passwords: Whether to synchronize on-premises password hashes to the managed domain. Defaults to `false`. :param pulumi.Input[bool] tls_v1_enabled: Whether to enable legacy TLS v1 support. Defaults to `false`. """ + ServiceSecurityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kerberos_armoring_enabled=kerberos_armoring_enabled, + kerberos_rc4_encryption_enabled=kerberos_rc4_encryption_enabled, + ntlm_v1_enabled=ntlm_v1_enabled, + sync_kerberos_passwords=sync_kerberos_passwords, + sync_ntlm_passwords=sync_ntlm_passwords, + sync_on_prem_passwords=sync_on_prem_passwords, + tls_v1_enabled=tls_v1_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kerberos_armoring_enabled: Optional[pulumi.Input[bool]] = None, + kerberos_rc4_encryption_enabled: Optional[pulumi.Input[bool]] = None, + ntlm_v1_enabled: Optional[pulumi.Input[bool]] = None, + sync_kerberos_passwords: Optional[pulumi.Input[bool]] = None, + sync_ntlm_passwords: Optional[pulumi.Input[bool]] = None, + sync_on_prem_passwords: Optional[pulumi.Input[bool]] = None, + tls_v1_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kerberos_armoring_enabled is None and 'kerberosArmoringEnabled' in kwargs: + kerberos_armoring_enabled = kwargs['kerberosArmoringEnabled'] + if kerberos_rc4_encryption_enabled is None and 'kerberosRc4EncryptionEnabled' in kwargs: + kerberos_rc4_encryption_enabled = kwargs['kerberosRc4EncryptionEnabled'] + if ntlm_v1_enabled is None and 'ntlmV1Enabled' in kwargs: + ntlm_v1_enabled = kwargs['ntlmV1Enabled'] + if sync_kerberos_passwords is None and 'syncKerberosPasswords' in kwargs: + sync_kerberos_passwords = kwargs['syncKerberosPasswords'] + if sync_ntlm_passwords is None and 'syncNtlmPasswords' in kwargs: + sync_ntlm_passwords = kwargs['syncNtlmPasswords'] + if sync_on_prem_passwords is None and 'syncOnPremPasswords' in kwargs: + sync_on_prem_passwords = kwargs['syncOnPremPasswords'] + if tls_v1_enabled is None and 'tlsV1Enabled' in kwargs: + tls_v1_enabled = kwargs['tlsV1Enabled'] + if kerberos_armoring_enabled is not None: - pulumi.set(__self__, "kerberos_armoring_enabled", kerberos_armoring_enabled) + _setter("kerberos_armoring_enabled", kerberos_armoring_enabled) if kerberos_rc4_encryption_enabled is not None: - pulumi.set(__self__, "kerberos_rc4_encryption_enabled", kerberos_rc4_encryption_enabled) + _setter("kerberos_rc4_encryption_enabled", kerberos_rc4_encryption_enabled) if ntlm_v1_enabled is not None: - pulumi.set(__self__, "ntlm_v1_enabled", ntlm_v1_enabled) + _setter("ntlm_v1_enabled", ntlm_v1_enabled) if sync_kerberos_passwords is not None: - pulumi.set(__self__, "sync_kerberos_passwords", sync_kerberos_passwords) + _setter("sync_kerberos_passwords", sync_kerberos_passwords) if sync_ntlm_passwords is not None: - pulumi.set(__self__, "sync_ntlm_passwords", sync_ntlm_passwords) + _setter("sync_ntlm_passwords", sync_ntlm_passwords) if sync_on_prem_passwords is not None: - pulumi.set(__self__, "sync_on_prem_passwords", sync_on_prem_passwords) + _setter("sync_on_prem_passwords", sync_on_prem_passwords) if tls_v1_enabled is not None: - pulumi.set(__self__, "tls_v1_enabled", tls_v1_enabled) + _setter("tls_v1_enabled", tls_v1_enabled) @property @pulumi.getter(name="kerberosArmoringEnabled") diff --git a/sdk/python/pulumi_azure/domainservices/get_service.py b/sdk/python/pulumi_azure/domainservices/get_service.py index 86ab8d6fb7..9cda151812 100644 --- a/sdk/python/pulumi_azure/domainservices/get_service.py +++ b/sdk/python/pulumi_azure/domainservices/get_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/domainservices/outputs.py b/sdk/python/pulumi_azure/domainservices/outputs.py index 148c4041f0..84146e6578 100644 --- a/sdk/python/pulumi_azure/domainservices/outputs.py +++ b/sdk/python/pulumi_azure/domainservices/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -60,17 +60,48 @@ def __init__(__self__, *, :param str location: The Azure location where the Domain Service exists. Changing this forces a new resource to be created. :param str service_status: The current service status for the initial replica set. """ - pulumi.set(__self__, "subnet_id", subnet_id) + ServiceInitialReplicaSet._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + domain_controller_ip_addresses=domain_controller_ip_addresses, + external_access_ip_address=external_access_ip_address, + id=id, + location=location, + service_status=service_status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[str] = None, + domain_controller_ip_addresses: Optional[Sequence[str]] = None, + external_access_ip_address: Optional[str] = None, + id: Optional[str] = None, + location: Optional[str] = None, + service_status: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if domain_controller_ip_addresses is None and 'domainControllerIpAddresses' in kwargs: + domain_controller_ip_addresses = kwargs['domainControllerIpAddresses'] + if external_access_ip_address is None and 'externalAccessIpAddress' in kwargs: + external_access_ip_address = kwargs['externalAccessIpAddress'] + if service_status is None and 'serviceStatus' in kwargs: + service_status = kwargs['serviceStatus'] + + _setter("subnet_id", subnet_id) if domain_controller_ip_addresses is not None: - pulumi.set(__self__, "domain_controller_ip_addresses", domain_controller_ip_addresses) + _setter("domain_controller_ip_addresses", domain_controller_ip_addresses) if external_access_ip_address is not None: - pulumi.set(__self__, "external_access_ip_address", external_access_ip_address) + _setter("external_access_ip_address", external_access_ip_address) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if service_status is not None: - pulumi.set(__self__, "service_status", service_status) + _setter("service_status", service_status) @property @pulumi.getter(name="subnetId") @@ -153,12 +184,33 @@ def __init__(__self__, *, :param bool notify_dc_admins: Whether to notify members of the _AAD DC Administrators_ group when there are alerts in the managed domain. :param bool notify_global_admins: Whether to notify all Global Administrators when there are alerts in the managed domain. """ + ServiceNotifications._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_recipients=additional_recipients, + notify_dc_admins=notify_dc_admins, + notify_global_admins=notify_global_admins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_recipients: Optional[Sequence[str]] = None, + notify_dc_admins: Optional[bool] = None, + notify_global_admins: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_recipients is None and 'additionalRecipients' in kwargs: + additional_recipients = kwargs['additionalRecipients'] + if notify_dc_admins is None and 'notifyDcAdmins' in kwargs: + notify_dc_admins = kwargs['notifyDcAdmins'] + if notify_global_admins is None and 'notifyGlobalAdmins' in kwargs: + notify_global_admins = kwargs['notifyGlobalAdmins'] + if additional_recipients is not None: - pulumi.set(__self__, "additional_recipients", additional_recipients) + _setter("additional_recipients", additional_recipients) if notify_dc_admins is not None: - pulumi.set(__self__, "notify_dc_admins", notify_dc_admins) + _setter("notify_dc_admins", notify_dc_admins) if notify_global_admins is not None: - pulumi.set(__self__, "notify_global_admins", notify_global_admins) + _setter("notify_global_admins", notify_global_admins) @property @pulumi.getter(name="additionalRecipients") @@ -231,17 +283,58 @@ def __init__(__self__, *, :param bool external_access_enabled: Whether to enable external access to LDAPS over the Internet. Defaults to `false`. :param str public_certificate: The public certificate. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "pfx_certificate", pfx_certificate) - pulumi.set(__self__, "pfx_certificate_password", pfx_certificate_password) + ServiceSecureLdap._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + pfx_certificate=pfx_certificate, + pfx_certificate_password=pfx_certificate_password, + certificate_expiry=certificate_expiry, + certificate_thumbprint=certificate_thumbprint, + external_access_enabled=external_access_enabled, + public_certificate=public_certificate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + pfx_certificate: Optional[str] = None, + pfx_certificate_password: Optional[str] = None, + certificate_expiry: Optional[str] = None, + certificate_thumbprint: Optional[str] = None, + external_access_enabled: Optional[bool] = None, + public_certificate: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if pfx_certificate is None and 'pfxCertificate' in kwargs: + pfx_certificate = kwargs['pfxCertificate'] + if pfx_certificate is None: + raise TypeError("Missing 'pfx_certificate' argument") + if pfx_certificate_password is None and 'pfxCertificatePassword' in kwargs: + pfx_certificate_password = kwargs['pfxCertificatePassword'] + if pfx_certificate_password is None: + raise TypeError("Missing 'pfx_certificate_password' argument") + if certificate_expiry is None and 'certificateExpiry' in kwargs: + certificate_expiry = kwargs['certificateExpiry'] + if certificate_thumbprint is None and 'certificateThumbprint' in kwargs: + certificate_thumbprint = kwargs['certificateThumbprint'] + if external_access_enabled is None and 'externalAccessEnabled' in kwargs: + external_access_enabled = kwargs['externalAccessEnabled'] + if public_certificate is None and 'publicCertificate' in kwargs: + public_certificate = kwargs['publicCertificate'] + + _setter("enabled", enabled) + _setter("pfx_certificate", pfx_certificate) + _setter("pfx_certificate_password", pfx_certificate_password) if certificate_expiry is not None: - pulumi.set(__self__, "certificate_expiry", certificate_expiry) + _setter("certificate_expiry", certificate_expiry) if certificate_thumbprint is not None: - pulumi.set(__self__, "certificate_thumbprint", certificate_thumbprint) + _setter("certificate_thumbprint", certificate_thumbprint) if external_access_enabled is not None: - pulumi.set(__self__, "external_access_enabled", external_access_enabled) + _setter("external_access_enabled", external_access_enabled) if public_certificate is not None: - pulumi.set(__self__, "public_certificate", public_certificate) + _setter("public_certificate", public_certificate) @property @pulumi.getter @@ -348,20 +441,57 @@ def __init__(__self__, *, :param bool sync_on_prem_passwords: Whether to synchronize on-premises password hashes to the managed domain. Defaults to `false`. :param bool tls_v1_enabled: Whether to enable legacy TLS v1 support. Defaults to `false`. """ + ServiceSecurity._configure( + lambda key, value: pulumi.set(__self__, key, value), + kerberos_armoring_enabled=kerberos_armoring_enabled, + kerberos_rc4_encryption_enabled=kerberos_rc4_encryption_enabled, + ntlm_v1_enabled=ntlm_v1_enabled, + sync_kerberos_passwords=sync_kerberos_passwords, + sync_ntlm_passwords=sync_ntlm_passwords, + sync_on_prem_passwords=sync_on_prem_passwords, + tls_v1_enabled=tls_v1_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kerberos_armoring_enabled: Optional[bool] = None, + kerberos_rc4_encryption_enabled: Optional[bool] = None, + ntlm_v1_enabled: Optional[bool] = None, + sync_kerberos_passwords: Optional[bool] = None, + sync_ntlm_passwords: Optional[bool] = None, + sync_on_prem_passwords: Optional[bool] = None, + tls_v1_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kerberos_armoring_enabled is None and 'kerberosArmoringEnabled' in kwargs: + kerberos_armoring_enabled = kwargs['kerberosArmoringEnabled'] + if kerberos_rc4_encryption_enabled is None and 'kerberosRc4EncryptionEnabled' in kwargs: + kerberos_rc4_encryption_enabled = kwargs['kerberosRc4EncryptionEnabled'] + if ntlm_v1_enabled is None and 'ntlmV1Enabled' in kwargs: + ntlm_v1_enabled = kwargs['ntlmV1Enabled'] + if sync_kerberos_passwords is None and 'syncKerberosPasswords' in kwargs: + sync_kerberos_passwords = kwargs['syncKerberosPasswords'] + if sync_ntlm_passwords is None and 'syncNtlmPasswords' in kwargs: + sync_ntlm_passwords = kwargs['syncNtlmPasswords'] + if sync_on_prem_passwords is None and 'syncOnPremPasswords' in kwargs: + sync_on_prem_passwords = kwargs['syncOnPremPasswords'] + if tls_v1_enabled is None and 'tlsV1Enabled' in kwargs: + tls_v1_enabled = kwargs['tlsV1Enabled'] + if kerberos_armoring_enabled is not None: - pulumi.set(__self__, "kerberos_armoring_enabled", kerberos_armoring_enabled) + _setter("kerberos_armoring_enabled", kerberos_armoring_enabled) if kerberos_rc4_encryption_enabled is not None: - pulumi.set(__self__, "kerberos_rc4_encryption_enabled", kerberos_rc4_encryption_enabled) + _setter("kerberos_rc4_encryption_enabled", kerberos_rc4_encryption_enabled) if ntlm_v1_enabled is not None: - pulumi.set(__self__, "ntlm_v1_enabled", ntlm_v1_enabled) + _setter("ntlm_v1_enabled", ntlm_v1_enabled) if sync_kerberos_passwords is not None: - pulumi.set(__self__, "sync_kerberos_passwords", sync_kerberos_passwords) + _setter("sync_kerberos_passwords", sync_kerberos_passwords) if sync_ntlm_passwords is not None: - pulumi.set(__self__, "sync_ntlm_passwords", sync_ntlm_passwords) + _setter("sync_ntlm_passwords", sync_ntlm_passwords) if sync_on_prem_passwords is not None: - pulumi.set(__self__, "sync_on_prem_passwords", sync_on_prem_passwords) + _setter("sync_on_prem_passwords", sync_on_prem_passwords) if tls_v1_enabled is not None: - pulumi.set(__self__, "tls_v1_enabled", tls_v1_enabled) + _setter("tls_v1_enabled", tls_v1_enabled) @property @pulumi.getter(name="kerberosArmoringEnabled") @@ -431,9 +561,36 @@ def __init__(__self__, *, :param bool notify_dc_admins: Whethermembers of the _AAD DC Administrators_ group are notified when there are alerts in the managed domain. :param bool notify_global_admins: Whether all Global Administrators are notified when there are alerts in the managed domain. """ - pulumi.set(__self__, "additional_recipients", additional_recipients) - pulumi.set(__self__, "notify_dc_admins", notify_dc_admins) - pulumi.set(__self__, "notify_global_admins", notify_global_admins) + GetServiceNotificationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_recipients=additional_recipients, + notify_dc_admins=notify_dc_admins, + notify_global_admins=notify_global_admins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_recipients: Optional[Sequence[str]] = None, + notify_dc_admins: Optional[bool] = None, + notify_global_admins: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_recipients is None and 'additionalRecipients' in kwargs: + additional_recipients = kwargs['additionalRecipients'] + if additional_recipients is None: + raise TypeError("Missing 'additional_recipients' argument") + if notify_dc_admins is None and 'notifyDcAdmins' in kwargs: + notify_dc_admins = kwargs['notifyDcAdmins'] + if notify_dc_admins is None: + raise TypeError("Missing 'notify_dc_admins' argument") + if notify_global_admins is None and 'notifyGlobalAdmins' in kwargs: + notify_global_admins = kwargs['notifyGlobalAdmins'] + if notify_global_admins is None: + raise TypeError("Missing 'notify_global_admins' argument") + + _setter("additional_recipients", additional_recipients) + _setter("notify_dc_admins", notify_dc_admins) + _setter("notify_global_admins", notify_global_admins) @property @pulumi.getter(name="additionalRecipients") @@ -477,12 +634,53 @@ def __init__(__self__, *, :param str service_status: The current service status for the replica set. :param str subnet_id: The ID of the subnet in which the replica set resides. """ - pulumi.set(__self__, "domain_controller_ip_addresses", domain_controller_ip_addresses) - pulumi.set(__self__, "external_access_ip_address", external_access_ip_address) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "service_status", service_status) - pulumi.set(__self__, "subnet_id", subnet_id) + GetServiceReplicaSetResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_controller_ip_addresses=domain_controller_ip_addresses, + external_access_ip_address=external_access_ip_address, + id=id, + location=location, + service_status=service_status, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_controller_ip_addresses: Optional[Sequence[str]] = None, + external_access_ip_address: Optional[str] = None, + id: Optional[str] = None, + location: Optional[str] = None, + service_status: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_controller_ip_addresses is None and 'domainControllerIpAddresses' in kwargs: + domain_controller_ip_addresses = kwargs['domainControllerIpAddresses'] + if domain_controller_ip_addresses is None: + raise TypeError("Missing 'domain_controller_ip_addresses' argument") + if external_access_ip_address is None and 'externalAccessIpAddress' in kwargs: + external_access_ip_address = kwargs['externalAccessIpAddress'] + if external_access_ip_address is None: + raise TypeError("Missing 'external_access_ip_address' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if location is None: + raise TypeError("Missing 'location' argument") + if service_status is None and 'serviceStatus' in kwargs: + service_status = kwargs['serviceStatus'] + if service_status is None: + raise TypeError("Missing 'service_status' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("domain_controller_ip_addresses", domain_controller_ip_addresses) + _setter("external_access_ip_address", external_access_ip_address) + _setter("id", id) + _setter("location", location) + _setter("service_status", service_status) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="domainControllerIpAddresses") @@ -545,11 +743,48 @@ def __init__(__self__, *, :param bool enabled: Whether secure LDAP is enabled for the managed domain. :param bool external_access_enabled: Whether external access to LDAPS over the Internet, is enabled. """ - pulumi.set(__self__, "certificate_expiry", certificate_expiry) - pulumi.set(__self__, "certificate_thumbprint", certificate_thumbprint) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "external_access_enabled", external_access_enabled) - pulumi.set(__self__, "public_certificate", public_certificate) + GetServiceSecureLdapResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_expiry=certificate_expiry, + certificate_thumbprint=certificate_thumbprint, + enabled=enabled, + external_access_enabled=external_access_enabled, + public_certificate=public_certificate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_expiry: Optional[str] = None, + certificate_thumbprint: Optional[str] = None, + enabled: Optional[bool] = None, + external_access_enabled: Optional[bool] = None, + public_certificate: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_expiry is None and 'certificateExpiry' in kwargs: + certificate_expiry = kwargs['certificateExpiry'] + if certificate_expiry is None: + raise TypeError("Missing 'certificate_expiry' argument") + if certificate_thumbprint is None and 'certificateThumbprint' in kwargs: + certificate_thumbprint = kwargs['certificateThumbprint'] + if certificate_thumbprint is None: + raise TypeError("Missing 'certificate_thumbprint' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if external_access_enabled is None and 'externalAccessEnabled' in kwargs: + external_access_enabled = kwargs['externalAccessEnabled'] + if external_access_enabled is None: + raise TypeError("Missing 'external_access_enabled' argument") + if public_certificate is None and 'publicCertificate' in kwargs: + public_certificate = kwargs['publicCertificate'] + if public_certificate is None: + raise TypeError("Missing 'public_certificate' argument") + + _setter("certificate_expiry", certificate_expiry) + _setter("certificate_thumbprint", certificate_thumbprint) + _setter("enabled", enabled) + _setter("external_access_enabled", external_access_enabled) + _setter("public_certificate", public_certificate) @property @pulumi.getter(name="certificateExpiry") @@ -602,13 +837,64 @@ def __init__(__self__, *, :param bool sync_on_prem_passwords: Whether on-premises password hashes are synchronized to the managed domain. :param bool tls_v1_enabled: Whether legacy TLS v1 support is enabled. """ - pulumi.set(__self__, "kerberos_armoring_enabled", kerberos_armoring_enabled) - pulumi.set(__self__, "kerberos_rc4_encryption_enabled", kerberos_rc4_encryption_enabled) - pulumi.set(__self__, "ntlm_v1_enabled", ntlm_v1_enabled) - pulumi.set(__self__, "sync_kerberos_passwords", sync_kerberos_passwords) - pulumi.set(__self__, "sync_ntlm_passwords", sync_ntlm_passwords) - pulumi.set(__self__, "sync_on_prem_passwords", sync_on_prem_passwords) - pulumi.set(__self__, "tls_v1_enabled", tls_v1_enabled) + GetServiceSecurityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + kerberos_armoring_enabled=kerberos_armoring_enabled, + kerberos_rc4_encryption_enabled=kerberos_rc4_encryption_enabled, + ntlm_v1_enabled=ntlm_v1_enabled, + sync_kerberos_passwords=sync_kerberos_passwords, + sync_ntlm_passwords=sync_ntlm_passwords, + sync_on_prem_passwords=sync_on_prem_passwords, + tls_v1_enabled=tls_v1_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kerberos_armoring_enabled: Optional[bool] = None, + kerberos_rc4_encryption_enabled: Optional[bool] = None, + ntlm_v1_enabled: Optional[bool] = None, + sync_kerberos_passwords: Optional[bool] = None, + sync_ntlm_passwords: Optional[bool] = None, + sync_on_prem_passwords: Optional[bool] = None, + tls_v1_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kerberos_armoring_enabled is None and 'kerberosArmoringEnabled' in kwargs: + kerberos_armoring_enabled = kwargs['kerberosArmoringEnabled'] + if kerberos_armoring_enabled is None: + raise TypeError("Missing 'kerberos_armoring_enabled' argument") + if kerberos_rc4_encryption_enabled is None and 'kerberosRc4EncryptionEnabled' in kwargs: + kerberos_rc4_encryption_enabled = kwargs['kerberosRc4EncryptionEnabled'] + if kerberos_rc4_encryption_enabled is None: + raise TypeError("Missing 'kerberos_rc4_encryption_enabled' argument") + if ntlm_v1_enabled is None and 'ntlmV1Enabled' in kwargs: + ntlm_v1_enabled = kwargs['ntlmV1Enabled'] + if ntlm_v1_enabled is None: + raise TypeError("Missing 'ntlm_v1_enabled' argument") + if sync_kerberos_passwords is None and 'syncKerberosPasswords' in kwargs: + sync_kerberos_passwords = kwargs['syncKerberosPasswords'] + if sync_kerberos_passwords is None: + raise TypeError("Missing 'sync_kerberos_passwords' argument") + if sync_ntlm_passwords is None and 'syncNtlmPasswords' in kwargs: + sync_ntlm_passwords = kwargs['syncNtlmPasswords'] + if sync_ntlm_passwords is None: + raise TypeError("Missing 'sync_ntlm_passwords' argument") + if sync_on_prem_passwords is None and 'syncOnPremPasswords' in kwargs: + sync_on_prem_passwords = kwargs['syncOnPremPasswords'] + if sync_on_prem_passwords is None: + raise TypeError("Missing 'sync_on_prem_passwords' argument") + if tls_v1_enabled is None and 'tlsV1Enabled' in kwargs: + tls_v1_enabled = kwargs['tlsV1Enabled'] + if tls_v1_enabled is None: + raise TypeError("Missing 'tls_v1_enabled' argument") + + _setter("kerberos_armoring_enabled", kerberos_armoring_enabled) + _setter("kerberos_rc4_encryption_enabled", kerberos_rc4_encryption_enabled) + _setter("ntlm_v1_enabled", ntlm_v1_enabled) + _setter("sync_kerberos_passwords", sync_kerberos_passwords) + _setter("sync_ntlm_passwords", sync_ntlm_passwords) + _setter("sync_on_prem_passwords", sync_on_prem_passwords) + _setter("tls_v1_enabled", tls_v1_enabled) @property @pulumi.getter(name="kerberosArmoringEnabled") diff --git a/sdk/python/pulumi_azure/domainservices/replica_set.py b/sdk/python/pulumi_azure/domainservices/replica_set.py index bd694459d8..3f4518f99f 100644 --- a/sdk/python/pulumi_azure/domainservices/replica_set.py +++ b/sdk/python/pulumi_azure/domainservices/replica_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ReplicaSetArgs', 'ReplicaSet'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the subnet in which to place this Replica Set. Changing this forces a new resource to be created. :param pulumi.Input[str] location: The Azure location where this Replica Set should exist. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "domain_service_id", domain_service_id) - pulumi.set(__self__, "subnet_id", subnet_id) + ReplicaSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_service_id=domain_service_id, + subnet_id=subnet_id, + location=location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_service_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_service_id is None and 'domainServiceId' in kwargs: + domain_service_id = kwargs['domainServiceId'] + if domain_service_id is None: + raise TypeError("Missing 'domain_service_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("domain_service_id", domain_service_id) + _setter("subnet_id", subnet_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) @property @pulumi.getter(name="domainServiceId") @@ -83,18 +106,49 @@ def __init__(__self__, *, :param pulumi.Input[str] service_status: The current service status for the replica set. :param pulumi.Input[str] subnet_id: The ID of the subnet in which to place this Replica Set. Changing this forces a new resource to be created. """ + _ReplicaSetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_controller_ip_addresses=domain_controller_ip_addresses, + domain_service_id=domain_service_id, + external_access_ip_address=external_access_ip_address, + location=location, + service_status=service_status, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_controller_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + domain_service_id: Optional[pulumi.Input[str]] = None, + external_access_ip_address: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + service_status: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_controller_ip_addresses is None and 'domainControllerIpAddresses' in kwargs: + domain_controller_ip_addresses = kwargs['domainControllerIpAddresses'] + if domain_service_id is None and 'domainServiceId' in kwargs: + domain_service_id = kwargs['domainServiceId'] + if external_access_ip_address is None and 'externalAccessIpAddress' in kwargs: + external_access_ip_address = kwargs['externalAccessIpAddress'] + if service_status is None and 'serviceStatus' in kwargs: + service_status = kwargs['serviceStatus'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if domain_controller_ip_addresses is not None: - pulumi.set(__self__, "domain_controller_ip_addresses", domain_controller_ip_addresses) + _setter("domain_controller_ip_addresses", domain_controller_ip_addresses) if domain_service_id is not None: - pulumi.set(__self__, "domain_service_id", domain_service_id) + _setter("domain_service_id", domain_service_id) if external_access_ip_address is not None: - pulumi.set(__self__, "external_access_ip_address", external_access_ip_address) + _setter("external_access_ip_address", external_access_ip_address) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if service_status is not None: - pulumi.set(__self__, "service_status", service_status) + _setter("service_status", service_status) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="domainControllerIpAddresses") @@ -626,6 +680,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ReplicaSetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/domainservices/service.py b/sdk/python/pulumi_azure/domainservices/service.py index 406fbfdd65..59b8d9dbe9 100644 --- a/sdk/python/pulumi_azure/domainservices/service.py +++ b/sdk/python/pulumi_azure/domainservices/service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,26 +43,79 @@ def __init__(__self__, *, :param pulumi.Input['ServiceSecurityArgs'] security: A `security` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource. """ - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "initial_replica_set", initial_replica_set) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + ServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name=domain_name, + initial_replica_set=initial_replica_set, + resource_group_name=resource_group_name, + sku=sku, + domain_configuration_type=domain_configuration_type, + filtered_sync_enabled=filtered_sync_enabled, + location=location, + name=name, + notifications=notifications, + secure_ldap=secure_ldap, + security=security, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name: Optional[pulumi.Input[str]] = None, + initial_replica_set: Optional[pulumi.Input['ServiceInitialReplicaSetArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + domain_configuration_type: Optional[pulumi.Input[str]] = None, + filtered_sync_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notifications: Optional[pulumi.Input['ServiceNotificationsArgs']] = None, + secure_ldap: Optional[pulumi.Input['ServiceSecureLdapArgs']] = None, + security: Optional[pulumi.Input['ServiceSecurityArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if initial_replica_set is None and 'initialReplicaSet' in kwargs: + initial_replica_set = kwargs['initialReplicaSet'] + if initial_replica_set is None: + raise TypeError("Missing 'initial_replica_set' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if domain_configuration_type is None and 'domainConfigurationType' in kwargs: + domain_configuration_type = kwargs['domainConfigurationType'] + if filtered_sync_enabled is None and 'filteredSyncEnabled' in kwargs: + filtered_sync_enabled = kwargs['filteredSyncEnabled'] + if secure_ldap is None and 'secureLdap' in kwargs: + secure_ldap = kwargs['secureLdap'] + + _setter("domain_name", domain_name) + _setter("initial_replica_set", initial_replica_set) + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if domain_configuration_type is not None: - pulumi.set(__self__, "domain_configuration_type", domain_configuration_type) + _setter("domain_configuration_type", domain_configuration_type) if filtered_sync_enabled is not None: - pulumi.set(__self__, "filtered_sync_enabled", filtered_sync_enabled) + _setter("filtered_sync_enabled", filtered_sync_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notifications is not None: - pulumi.set(__self__, "notifications", notifications) + _setter("notifications", notifications) if secure_ldap is not None: - pulumi.set(__self__, "secure_ldap", secure_ldap) + _setter("secure_ldap", secure_ldap) if security is not None: - pulumi.set(__self__, "security", security) + _setter("security", security) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="domainName") @@ -246,40 +299,103 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: The SKU to use when provisioning the Domain Service resource. One of `Standard`, `Enterprise` or `Premium`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource. """ + _ServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + deployment_id=deployment_id, + domain_configuration_type=domain_configuration_type, + domain_name=domain_name, + filtered_sync_enabled=filtered_sync_enabled, + initial_replica_set=initial_replica_set, + location=location, + name=name, + notifications=notifications, + resource_group_name=resource_group_name, + resource_id=resource_id, + secure_ldap=secure_ldap, + security=security, + sku=sku, + sync_owner=sync_owner, + tags=tags, + tenant_id=tenant_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + deployment_id: Optional[pulumi.Input[str]] = None, + domain_configuration_type: Optional[pulumi.Input[str]] = None, + domain_name: Optional[pulumi.Input[str]] = None, + filtered_sync_enabled: Optional[pulumi.Input[bool]] = None, + initial_replica_set: Optional[pulumi.Input['ServiceInitialReplicaSetArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notifications: Optional[pulumi.Input['ServiceNotificationsArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + secure_ldap: Optional[pulumi.Input['ServiceSecureLdapArgs']] = None, + security: Optional[pulumi.Input['ServiceSecurityArgs']] = None, + sku: Optional[pulumi.Input[str]] = None, + sync_owner: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if deployment_id is None and 'deploymentId' in kwargs: + deployment_id = kwargs['deploymentId'] + if domain_configuration_type is None and 'domainConfigurationType' in kwargs: + domain_configuration_type = kwargs['domainConfigurationType'] + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if filtered_sync_enabled is None and 'filteredSyncEnabled' in kwargs: + filtered_sync_enabled = kwargs['filteredSyncEnabled'] + if initial_replica_set is None and 'initialReplicaSet' in kwargs: + initial_replica_set = kwargs['initialReplicaSet'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if secure_ldap is None and 'secureLdap' in kwargs: + secure_ldap = kwargs['secureLdap'] + if sync_owner is None and 'syncOwner' in kwargs: + sync_owner = kwargs['syncOwner'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if deployment_id is not None: - pulumi.set(__self__, "deployment_id", deployment_id) + _setter("deployment_id", deployment_id) if domain_configuration_type is not None: - pulumi.set(__self__, "domain_configuration_type", domain_configuration_type) + _setter("domain_configuration_type", domain_configuration_type) if domain_name is not None: - pulumi.set(__self__, "domain_name", domain_name) + _setter("domain_name", domain_name) if filtered_sync_enabled is not None: - pulumi.set(__self__, "filtered_sync_enabled", filtered_sync_enabled) + _setter("filtered_sync_enabled", filtered_sync_enabled) if initial_replica_set is not None: - pulumi.set(__self__, "initial_replica_set", initial_replica_set) + _setter("initial_replica_set", initial_replica_set) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notifications is not None: - pulumi.set(__self__, "notifications", notifications) + _setter("notifications", notifications) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if resource_id is not None: - pulumi.set(__self__, "resource_id", resource_id) + _setter("resource_id", resource_id) if secure_ldap is not None: - pulumi.set(__self__, "secure_ldap", secure_ldap) + _setter("secure_ldap", secure_ldap) if security is not None: - pulumi.set(__self__, "security", security) + _setter("security", security) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if sync_owner is not None: - pulumi.set(__self__, "sync_owner", sync_owner) + _setter("sync_owner", sync_owner) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="deploymentId") @@ -768,6 +884,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -799,16 +919,36 @@ def _internal_init(__self__, raise TypeError("Missing required property 'domain_name'") __props__.__dict__["domain_name"] = domain_name __props__.__dict__["filtered_sync_enabled"] = filtered_sync_enabled + if initial_replica_set is not None and not isinstance(initial_replica_set, ServiceInitialReplicaSetArgs): + initial_replica_set = initial_replica_set or {} + def _setter(key, value): + initial_replica_set[key] = value + ServiceInitialReplicaSetArgs._configure(_setter, **initial_replica_set) if initial_replica_set is None and not opts.urn: raise TypeError("Missing required property 'initial_replica_set'") __props__.__dict__["initial_replica_set"] = initial_replica_set __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if notifications is not None and not isinstance(notifications, ServiceNotificationsArgs): + notifications = notifications or {} + def _setter(key, value): + notifications[key] = value + ServiceNotificationsArgs._configure(_setter, **notifications) __props__.__dict__["notifications"] = notifications if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if secure_ldap is not None and not isinstance(secure_ldap, ServiceSecureLdapArgs): + secure_ldap = secure_ldap or {} + def _setter(key, value): + secure_ldap[key] = value + ServiceSecureLdapArgs._configure(_setter, **secure_ldap) __props__.__dict__["secure_ldap"] = secure_ldap + if security is not None and not isinstance(security, ServiceSecurityArgs): + security = security or {} + def _setter(key, value): + security[key] = value + ServiceSecurityArgs._configure(_setter, **security) __props__.__dict__["security"] = security if sku is None and not opts.urn: raise TypeError("Missing required property 'sku'") diff --git a/sdk/python/pulumi_azure/domainservices/service_trust.py b/sdk/python/pulumi_azure/domainservices/service_trust.py index d434f1c3b6..dc33185ffd 100644 --- a/sdk/python/pulumi_azure/domainservices/service_trust.py +++ b/sdk/python/pulumi_azure/domainservices/service_trust.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServiceTrustArgs', 'ServiceTrust'] @@ -27,12 +27,45 @@ def __init__(__self__, *, :param pulumi.Input[str] trusted_domain_fqdn: The FQDN of the on-premise Active Directory Domain Service. :param pulumi.Input[str] name: The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created. """ - pulumi.set(__self__, "domain_service_id", domain_service_id) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "trusted_domain_dns_ips", trusted_domain_dns_ips) - pulumi.set(__self__, "trusted_domain_fqdn", trusted_domain_fqdn) + ServiceTrustArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_service_id=domain_service_id, + password=password, + trusted_domain_dns_ips=trusted_domain_dns_ips, + trusted_domain_fqdn=trusted_domain_fqdn, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_service_id: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + trusted_domain_dns_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + trusted_domain_fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_service_id is None and 'domainServiceId' in kwargs: + domain_service_id = kwargs['domainServiceId'] + if domain_service_id is None: + raise TypeError("Missing 'domain_service_id' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if trusted_domain_dns_ips is None and 'trustedDomainDnsIps' in kwargs: + trusted_domain_dns_ips = kwargs['trustedDomainDnsIps'] + if trusted_domain_dns_ips is None: + raise TypeError("Missing 'trusted_domain_dns_ips' argument") + if trusted_domain_fqdn is None and 'trustedDomainFqdn' in kwargs: + trusted_domain_fqdn = kwargs['trustedDomainFqdn'] + if trusted_domain_fqdn is None: + raise TypeError("Missing 'trusted_domain_fqdn' argument") + + _setter("domain_service_id", domain_service_id) + _setter("password", password) + _setter("trusted_domain_dns_ips", trusted_domain_dns_ips) + _setter("trusted_domain_fqdn", trusted_domain_fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="domainServiceId") @@ -111,16 +144,41 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] trusted_domain_dns_ips: Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service. :param pulumi.Input[str] trusted_domain_fqdn: The FQDN of the on-premise Active Directory Domain Service. """ + _ServiceTrustState._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_service_id=domain_service_id, + name=name, + password=password, + trusted_domain_dns_ips=trusted_domain_dns_ips, + trusted_domain_fqdn=trusted_domain_fqdn, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_service_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + trusted_domain_dns_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + trusted_domain_fqdn: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_service_id is None and 'domainServiceId' in kwargs: + domain_service_id = kwargs['domainServiceId'] + if trusted_domain_dns_ips is None and 'trustedDomainDnsIps' in kwargs: + trusted_domain_dns_ips = kwargs['trustedDomainDnsIps'] + if trusted_domain_fqdn is None and 'trustedDomainFqdn' in kwargs: + trusted_domain_fqdn = kwargs['trustedDomainFqdn'] + if domain_service_id is not None: - pulumi.set(__self__, "domain_service_id", domain_service_id) + _setter("domain_service_id", domain_service_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if trusted_domain_dns_ips is not None: - pulumi.set(__self__, "trusted_domain_dns_ips", trusted_domain_dns_ips) + _setter("trusted_domain_dns_ips", trusted_domain_dns_ips) if trusted_domain_fqdn is not None: - pulumi.set(__self__, "trusted_domain_fqdn", trusted_domain_fqdn) + _setter("trusted_domain_fqdn", trusted_domain_fqdn) @property @pulumi.getter(name="domainServiceId") @@ -276,6 +334,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceTrustArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/elasticcloud/_inputs.py b/sdk/python/pulumi_azure/elasticcloud/_inputs.py index 5aba1501ed..f85f4e435e 100644 --- a/sdk/python/pulumi_azure/elasticcloud/_inputs.py +++ b/sdk/python/pulumi_azure/elasticcloud/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -29,14 +29,39 @@ def __init__(__self__, *, :param pulumi.Input[bool] send_azuread_logs: Specifies if the AzureAD Logs should be sent to the Elasticsearch cluster. Defaults to `false`. :param pulumi.Input[bool] send_subscription_logs: Specifies if the Azure Subscription Logs should be sent to the Elasticsearch cluster. Defaults to `false`. """ + ElasticsearchLogsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filtering_tags=filtering_tags, + send_activity_logs=send_activity_logs, + send_azuread_logs=send_azuread_logs, + send_subscription_logs=send_subscription_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filtering_tags: Optional[pulumi.Input[Sequence[pulumi.Input['ElasticsearchLogsFilteringTagArgs']]]] = None, + send_activity_logs: Optional[pulumi.Input[bool]] = None, + send_azuread_logs: Optional[pulumi.Input[bool]] = None, + send_subscription_logs: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filtering_tags is None and 'filteringTags' in kwargs: + filtering_tags = kwargs['filteringTags'] + if send_activity_logs is None and 'sendActivityLogs' in kwargs: + send_activity_logs = kwargs['sendActivityLogs'] + if send_azuread_logs is None and 'sendAzureadLogs' in kwargs: + send_azuread_logs = kwargs['sendAzureadLogs'] + if send_subscription_logs is None and 'sendSubscriptionLogs' in kwargs: + send_subscription_logs = kwargs['sendSubscriptionLogs'] + if filtering_tags is not None: - pulumi.set(__self__, "filtering_tags", filtering_tags) + _setter("filtering_tags", filtering_tags) if send_activity_logs is not None: - pulumi.set(__self__, "send_activity_logs", send_activity_logs) + _setter("send_activity_logs", send_activity_logs) if send_azuread_logs is not None: - pulumi.set(__self__, "send_azuread_logs", send_azuread_logs) + _setter("send_azuread_logs", send_azuread_logs) if send_subscription_logs is not None: - pulumi.set(__self__, "send_subscription_logs", send_subscription_logs) + _setter("send_subscription_logs", send_subscription_logs) @property @pulumi.getter(name="filteringTags") @@ -98,9 +123,30 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name (key) of the Tag which should be filtered. :param pulumi.Input[str] value: Specifies the value of the Tag which should be filtered. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + ElasticsearchLogsFilteringTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("action", action) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -152,10 +198,43 @@ def __init__(__self__, *, :param bool send_azuread_logs: Should the AzureAD Logs should be sent to the Elasticsearch cluster? :param bool send_subscription_logs: Should the Azure Subscription Logs should be sent to the Elasticsearch cluster? """ - pulumi.set(__self__, "filtering_tags", filtering_tags) - pulumi.set(__self__, "send_activity_logs", send_activity_logs) - pulumi.set(__self__, "send_azuread_logs", send_azuread_logs) - pulumi.set(__self__, "send_subscription_logs", send_subscription_logs) + GetElasticsearchLogArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filtering_tags=filtering_tags, + send_activity_logs=send_activity_logs, + send_azuread_logs=send_azuread_logs, + send_subscription_logs=send_subscription_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filtering_tags: Optional[Sequence['GetElasticsearchLogFilteringTagArgs']] = None, + send_activity_logs: Optional[bool] = None, + send_azuread_logs: Optional[bool] = None, + send_subscription_logs: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filtering_tags is None and 'filteringTags' in kwargs: + filtering_tags = kwargs['filteringTags'] + if filtering_tags is None: + raise TypeError("Missing 'filtering_tags' argument") + if send_activity_logs is None and 'sendActivityLogs' in kwargs: + send_activity_logs = kwargs['sendActivityLogs'] + if send_activity_logs is None: + raise TypeError("Missing 'send_activity_logs' argument") + if send_azuread_logs is None and 'sendAzureadLogs' in kwargs: + send_azuread_logs = kwargs['sendAzureadLogs'] + if send_azuread_logs is None: + raise TypeError("Missing 'send_azuread_logs' argument") + if send_subscription_logs is None and 'sendSubscriptionLogs' in kwargs: + send_subscription_logs = kwargs['sendSubscriptionLogs'] + if send_subscription_logs is None: + raise TypeError("Missing 'send_subscription_logs' argument") + + _setter("filtering_tags", filtering_tags) + _setter("send_activity_logs", send_activity_logs) + _setter("send_azuread_logs", send_azuread_logs) + _setter("send_subscription_logs", send_subscription_logs) @property @pulumi.getter(name="filteringTags") @@ -217,9 +296,30 @@ def __init__(__self__, *, :param str name: The name of the Elasticsearch resource. :param str value: The value of the Tag which should be filtered. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetElasticsearchLogFilteringTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("action", action) + _setter("name", name) + _setter("value", value) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/elasticcloud/elasticsearch.py b/sdk/python/pulumi_azure/elasticcloud/elasticsearch.py index 659d4c6c02..ed3008754e 100644 --- a/sdk/python/pulumi_azure/elasticcloud/elasticsearch.py +++ b/sdk/python/pulumi_azure/elasticcloud/elasticsearch.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,19 +35,58 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Elasticsearch resource. Changing this forces a new Elasticsearch to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Elasticsearch resource. """ - pulumi.set(__self__, "elastic_cloud_email_address", elastic_cloud_email_address) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + ElasticsearchArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + elastic_cloud_email_address=elastic_cloud_email_address, + resource_group_name=resource_group_name, + sku_name=sku_name, + location=location, + logs=logs, + monitoring_enabled=monitoring_enabled, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + elastic_cloud_email_address: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['ElasticsearchLogsArgs']] = None, + monitoring_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if elastic_cloud_email_address is None and 'elasticCloudEmailAddress' in kwargs: + elastic_cloud_email_address = kwargs['elasticCloudEmailAddress'] + if elastic_cloud_email_address is None: + raise TypeError("Missing 'elastic_cloud_email_address' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if monitoring_enabled is None and 'monitoringEnabled' in kwargs: + monitoring_enabled = kwargs['monitoringEnabled'] + + _setter("elastic_cloud_email_address", elastic_cloud_email_address) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if monitoring_enabled is not None: - pulumi.set(__self__, "monitoring_enabled", monitoring_enabled) + _setter("monitoring_enabled", monitoring_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="elasticCloudEmailAddress") @@ -180,34 +219,91 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_name: Specifies the name of the SKU for this Elasticsearch. Changing this forces a new Elasticsearch to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Elasticsearch resource. """ + _ElasticsearchState._configure( + lambda key, value: pulumi.set(__self__, key, value), + elastic_cloud_deployment_id=elastic_cloud_deployment_id, + elastic_cloud_email_address=elastic_cloud_email_address, + elastic_cloud_sso_default_url=elastic_cloud_sso_default_url, + elastic_cloud_user_id=elastic_cloud_user_id, + elasticsearch_service_url=elasticsearch_service_url, + kibana_service_url=kibana_service_url, + kibana_sso_uri=kibana_sso_uri, + location=location, + logs=logs, + monitoring_enabled=monitoring_enabled, + name=name, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + elastic_cloud_deployment_id: Optional[pulumi.Input[str]] = None, + elastic_cloud_email_address: Optional[pulumi.Input[str]] = None, + elastic_cloud_sso_default_url: Optional[pulumi.Input[str]] = None, + elastic_cloud_user_id: Optional[pulumi.Input[str]] = None, + elasticsearch_service_url: Optional[pulumi.Input[str]] = None, + kibana_service_url: Optional[pulumi.Input[str]] = None, + kibana_sso_uri: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input['ElasticsearchLogsArgs']] = None, + monitoring_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if elastic_cloud_deployment_id is None and 'elasticCloudDeploymentId' in kwargs: + elastic_cloud_deployment_id = kwargs['elasticCloudDeploymentId'] + if elastic_cloud_email_address is None and 'elasticCloudEmailAddress' in kwargs: + elastic_cloud_email_address = kwargs['elasticCloudEmailAddress'] + if elastic_cloud_sso_default_url is None and 'elasticCloudSsoDefaultUrl' in kwargs: + elastic_cloud_sso_default_url = kwargs['elasticCloudSsoDefaultUrl'] + if elastic_cloud_user_id is None and 'elasticCloudUserId' in kwargs: + elastic_cloud_user_id = kwargs['elasticCloudUserId'] + if elasticsearch_service_url is None and 'elasticsearchServiceUrl' in kwargs: + elasticsearch_service_url = kwargs['elasticsearchServiceUrl'] + if kibana_service_url is None and 'kibanaServiceUrl' in kwargs: + kibana_service_url = kwargs['kibanaServiceUrl'] + if kibana_sso_uri is None and 'kibanaSsoUri' in kwargs: + kibana_sso_uri = kwargs['kibanaSsoUri'] + if monitoring_enabled is None and 'monitoringEnabled' in kwargs: + monitoring_enabled = kwargs['monitoringEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if elastic_cloud_deployment_id is not None: - pulumi.set(__self__, "elastic_cloud_deployment_id", elastic_cloud_deployment_id) + _setter("elastic_cloud_deployment_id", elastic_cloud_deployment_id) if elastic_cloud_email_address is not None: - pulumi.set(__self__, "elastic_cloud_email_address", elastic_cloud_email_address) + _setter("elastic_cloud_email_address", elastic_cloud_email_address) if elastic_cloud_sso_default_url is not None: - pulumi.set(__self__, "elastic_cloud_sso_default_url", elastic_cloud_sso_default_url) + _setter("elastic_cloud_sso_default_url", elastic_cloud_sso_default_url) if elastic_cloud_user_id is not None: - pulumi.set(__self__, "elastic_cloud_user_id", elastic_cloud_user_id) + _setter("elastic_cloud_user_id", elastic_cloud_user_id) if elasticsearch_service_url is not None: - pulumi.set(__self__, "elasticsearch_service_url", elasticsearch_service_url) + _setter("elasticsearch_service_url", elasticsearch_service_url) if kibana_service_url is not None: - pulumi.set(__self__, "kibana_service_url", kibana_service_url) + _setter("kibana_service_url", kibana_service_url) if kibana_sso_uri is not None: - pulumi.set(__self__, "kibana_sso_uri", kibana_sso_uri) + _setter("kibana_sso_uri", kibana_sso_uri) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if monitoring_enabled is not None: - pulumi.set(__self__, "monitoring_enabled", monitoring_enabled) + _setter("monitoring_enabled", monitoring_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="elasticCloudDeploymentId") @@ -469,6 +565,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ElasticsearchArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -495,6 +595,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'elastic_cloud_email_address'") __props__.__dict__["elastic_cloud_email_address"] = elastic_cloud_email_address __props__.__dict__["location"] = location + if logs is not None and not isinstance(logs, ElasticsearchLogsArgs): + logs = logs or {} + def _setter(key, value): + logs[key] = value + ElasticsearchLogsArgs._configure(_setter, **logs) __props__.__dict__["logs"] = logs __props__.__dict__["monitoring_enabled"] = monitoring_enabled __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/elasticcloud/get_elasticsearch.py b/sdk/python/pulumi_azure/elasticcloud/get_elasticsearch.py index 210ed3b126..92e541b892 100644 --- a/sdk/python/pulumi_azure/elasticcloud/get_elasticsearch.py +++ b/sdk/python/pulumi_azure/elasticcloud/get_elasticsearch.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * diff --git a/sdk/python/pulumi_azure/elasticcloud/outputs.py b/sdk/python/pulumi_azure/elasticcloud/outputs.py index 2a6b73c39d..514ab71174 100644 --- a/sdk/python/pulumi_azure/elasticcloud/outputs.py +++ b/sdk/python/pulumi_azure/elasticcloud/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -53,14 +53,39 @@ def __init__(__self__, *, :param bool send_azuread_logs: Specifies if the AzureAD Logs should be sent to the Elasticsearch cluster. Defaults to `false`. :param bool send_subscription_logs: Specifies if the Azure Subscription Logs should be sent to the Elasticsearch cluster. Defaults to `false`. """ + ElasticsearchLogs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filtering_tags=filtering_tags, + send_activity_logs=send_activity_logs, + send_azuread_logs=send_azuread_logs, + send_subscription_logs=send_subscription_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filtering_tags: Optional[Sequence['outputs.ElasticsearchLogsFilteringTag']] = None, + send_activity_logs: Optional[bool] = None, + send_azuread_logs: Optional[bool] = None, + send_subscription_logs: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filtering_tags is None and 'filteringTags' in kwargs: + filtering_tags = kwargs['filteringTags'] + if send_activity_logs is None and 'sendActivityLogs' in kwargs: + send_activity_logs = kwargs['sendActivityLogs'] + if send_azuread_logs is None and 'sendAzureadLogs' in kwargs: + send_azuread_logs = kwargs['sendAzureadLogs'] + if send_subscription_logs is None and 'sendSubscriptionLogs' in kwargs: + send_subscription_logs = kwargs['sendSubscriptionLogs'] + if filtering_tags is not None: - pulumi.set(__self__, "filtering_tags", filtering_tags) + _setter("filtering_tags", filtering_tags) if send_activity_logs is not None: - pulumi.set(__self__, "send_activity_logs", send_activity_logs) + _setter("send_activity_logs", send_activity_logs) if send_azuread_logs is not None: - pulumi.set(__self__, "send_azuread_logs", send_azuread_logs) + _setter("send_azuread_logs", send_azuread_logs) if send_subscription_logs is not None: - pulumi.set(__self__, "send_subscription_logs", send_subscription_logs) + _setter("send_subscription_logs", send_subscription_logs) @property @pulumi.getter(name="filteringTags") @@ -106,9 +131,30 @@ def __init__(__self__, *, :param str name: Specifies the name (key) of the Tag which should be filtered. :param str value: Specifies the value of the Tag which should be filtered. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + ElasticsearchLogsFilteringTag._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("action", action) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -148,10 +194,43 @@ def __init__(__self__, *, :param bool send_azuread_logs: Should the AzureAD Logs should be sent to the Elasticsearch cluster? :param bool send_subscription_logs: Should the Azure Subscription Logs should be sent to the Elasticsearch cluster? """ - pulumi.set(__self__, "filtering_tags", filtering_tags) - pulumi.set(__self__, "send_activity_logs", send_activity_logs) - pulumi.set(__self__, "send_azuread_logs", send_azuread_logs) - pulumi.set(__self__, "send_subscription_logs", send_subscription_logs) + GetElasticsearchLogResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + filtering_tags=filtering_tags, + send_activity_logs=send_activity_logs, + send_azuread_logs=send_azuread_logs, + send_subscription_logs=send_subscription_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filtering_tags: Optional[Sequence['outputs.GetElasticsearchLogFilteringTagResult']] = None, + send_activity_logs: Optional[bool] = None, + send_azuread_logs: Optional[bool] = None, + send_subscription_logs: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filtering_tags is None and 'filteringTags' in kwargs: + filtering_tags = kwargs['filteringTags'] + if filtering_tags is None: + raise TypeError("Missing 'filtering_tags' argument") + if send_activity_logs is None and 'sendActivityLogs' in kwargs: + send_activity_logs = kwargs['sendActivityLogs'] + if send_activity_logs is None: + raise TypeError("Missing 'send_activity_logs' argument") + if send_azuread_logs is None and 'sendAzureadLogs' in kwargs: + send_azuread_logs = kwargs['sendAzureadLogs'] + if send_azuread_logs is None: + raise TypeError("Missing 'send_azuread_logs' argument") + if send_subscription_logs is None and 'sendSubscriptionLogs' in kwargs: + send_subscription_logs = kwargs['sendSubscriptionLogs'] + if send_subscription_logs is None: + raise TypeError("Missing 'send_subscription_logs' argument") + + _setter("filtering_tags", filtering_tags) + _setter("send_activity_logs", send_activity_logs) + _setter("send_azuread_logs", send_azuread_logs) + _setter("send_subscription_logs", send_subscription_logs) @property @pulumi.getter(name="filteringTags") @@ -197,9 +276,30 @@ def __init__(__self__, *, :param str name: The name of the Elasticsearch resource. :param str value: The value of the Tag which should be filtered. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetElasticsearchLogFilteringTagResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("action", action) + _setter("name", name) + _setter("value", value) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/eventgrid/_inputs.py b/sdk/python/pulumi_azure/eventgrid/_inputs.py index e43245fd84..a6db4b062c 100644 --- a/sdk/python/pulumi_azure/eventgrid/_inputs.py +++ b/sdk/python/pulumi_azure/eventgrid/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -96,13 +96,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + DomainIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -166,9 +191,26 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_mask: The IP mask (CIDR) to match on. :param pulumi.Input[str] action: The action to take when the rule is matched. Possible values are `Allow`. """ - pulumi.set(__self__, "ip_mask", ip_mask) + DomainInboundIpRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[pulumi.Input[str]] = None, + action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + + _setter("ip_mask", ip_mask) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipMask") @@ -206,12 +248,31 @@ def __init__(__self__, *, :param pulumi.Input[str] event_type: Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param pulumi.Input[str] subject: Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + DomainInputMappingDefaultValuesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_type=event_type, + subject=subject, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[pulumi.Input[str]] = None, + event_type: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) @property @pulumi.getter(name="dataVersion") @@ -267,18 +328,45 @@ def __init__(__self__, *, :param pulumi.Input[str] subject: Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param pulumi.Input[str] topic: Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + DomainInputMappingFieldsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_time=event_time, + event_type=event_type, + id=id, + subject=subject, + topic=topic, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[pulumi.Input[str]] = None, + event_time: Optional[pulumi.Input[str]] = None, + event_type: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + topic: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_time is None and 'eventTime' in kwargs: + event_time = kwargs['eventTime'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_time is not None: - pulumi.set(__self__, "event_time", event_time) + _setter("event_time", event_time) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if topic is not None: - pulumi.set(__self__, "topic", topic) + _setter("topic", topic) @property @pulumi.getter(name="dataVersion") @@ -398,44 +486,129 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringNotEndsWithArgs']]] string_not_ends_withs: Compares a value of an event using multiple string values. :param pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringNotInArgs']]] string_not_ins: Compares a value of an event using multiple string values. """ + EventSubscriptionAdvancedFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bool_equals=bool_equals, + is_not_nulls=is_not_nulls, + is_null_or_undefineds=is_null_or_undefineds, + number_greater_than_or_equals=number_greater_than_or_equals, + number_greater_thans=number_greater_thans, + number_in_ranges=number_in_ranges, + number_ins=number_ins, + number_less_than_or_equals=number_less_than_or_equals, + number_less_thans=number_less_thans, + number_not_in_ranges=number_not_in_ranges, + number_not_ins=number_not_ins, + string_begins_withs=string_begins_withs, + string_contains=string_contains, + string_ends_withs=string_ends_withs, + string_ins=string_ins, + string_not_begins_withs=string_not_begins_withs, + string_not_contains=string_not_contains, + string_not_ends_withs=string_not_ends_withs, + string_not_ins=string_not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bool_equals: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterBoolEqualArgs']]]] = None, + is_not_nulls: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterIsNotNullArgs']]]] = None, + is_null_or_undefineds: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterIsNullOrUndefinedArgs']]]] = None, + number_greater_than_or_equals: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberGreaterThanOrEqualArgs']]]] = None, + number_greater_thans: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberGreaterThanArgs']]]] = None, + number_in_ranges: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberInRangeArgs']]]] = None, + number_ins: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberInArgs']]]] = None, + number_less_than_or_equals: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberLessThanOrEqualArgs']]]] = None, + number_less_thans: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberLessThanArgs']]]] = None, + number_not_in_ranges: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberNotInRangeArgs']]]] = None, + number_not_ins: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberNotInArgs']]]] = None, + string_begins_withs: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringBeginsWithArgs']]]] = None, + string_contains: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringContainArgs']]]] = None, + string_ends_withs: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringEndsWithArgs']]]] = None, + string_ins: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringInArgs']]]] = None, + string_not_begins_withs: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringNotBeginsWithArgs']]]] = None, + string_not_contains: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringNotContainArgs']]]] = None, + string_not_ends_withs: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringNotEndsWithArgs']]]] = None, + string_not_ins: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringNotInArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bool_equals is None and 'boolEquals' in kwargs: + bool_equals = kwargs['boolEquals'] + if is_not_nulls is None and 'isNotNulls' in kwargs: + is_not_nulls = kwargs['isNotNulls'] + if is_null_or_undefineds is None and 'isNullOrUndefineds' in kwargs: + is_null_or_undefineds = kwargs['isNullOrUndefineds'] + if number_greater_than_or_equals is None and 'numberGreaterThanOrEquals' in kwargs: + number_greater_than_or_equals = kwargs['numberGreaterThanOrEquals'] + if number_greater_thans is None and 'numberGreaterThans' in kwargs: + number_greater_thans = kwargs['numberGreaterThans'] + if number_in_ranges is None and 'numberInRanges' in kwargs: + number_in_ranges = kwargs['numberInRanges'] + if number_ins is None and 'numberIns' in kwargs: + number_ins = kwargs['numberIns'] + if number_less_than_or_equals is None and 'numberLessThanOrEquals' in kwargs: + number_less_than_or_equals = kwargs['numberLessThanOrEquals'] + if number_less_thans is None and 'numberLessThans' in kwargs: + number_less_thans = kwargs['numberLessThans'] + if number_not_in_ranges is None and 'numberNotInRanges' in kwargs: + number_not_in_ranges = kwargs['numberNotInRanges'] + if number_not_ins is None and 'numberNotIns' in kwargs: + number_not_ins = kwargs['numberNotIns'] + if string_begins_withs is None and 'stringBeginsWiths' in kwargs: + string_begins_withs = kwargs['stringBeginsWiths'] + if string_contains is None and 'stringContains' in kwargs: + string_contains = kwargs['stringContains'] + if string_ends_withs is None and 'stringEndsWiths' in kwargs: + string_ends_withs = kwargs['stringEndsWiths'] + if string_ins is None and 'stringIns' in kwargs: + string_ins = kwargs['stringIns'] + if string_not_begins_withs is None and 'stringNotBeginsWiths' in kwargs: + string_not_begins_withs = kwargs['stringNotBeginsWiths'] + if string_not_contains is None and 'stringNotContains' in kwargs: + string_not_contains = kwargs['stringNotContains'] + if string_not_ends_withs is None and 'stringNotEndsWiths' in kwargs: + string_not_ends_withs = kwargs['stringNotEndsWiths'] + if string_not_ins is None and 'stringNotIns' in kwargs: + string_not_ins = kwargs['stringNotIns'] + if bool_equals is not None: - pulumi.set(__self__, "bool_equals", bool_equals) + _setter("bool_equals", bool_equals) if is_not_nulls is not None: - pulumi.set(__self__, "is_not_nulls", is_not_nulls) + _setter("is_not_nulls", is_not_nulls) if is_null_or_undefineds is not None: - pulumi.set(__self__, "is_null_or_undefineds", is_null_or_undefineds) + _setter("is_null_or_undefineds", is_null_or_undefineds) if number_greater_than_or_equals is not None: - pulumi.set(__self__, "number_greater_than_or_equals", number_greater_than_or_equals) + _setter("number_greater_than_or_equals", number_greater_than_or_equals) if number_greater_thans is not None: - pulumi.set(__self__, "number_greater_thans", number_greater_thans) + _setter("number_greater_thans", number_greater_thans) if number_in_ranges is not None: - pulumi.set(__self__, "number_in_ranges", number_in_ranges) + _setter("number_in_ranges", number_in_ranges) if number_ins is not None: - pulumi.set(__self__, "number_ins", number_ins) + _setter("number_ins", number_ins) if number_less_than_or_equals is not None: - pulumi.set(__self__, "number_less_than_or_equals", number_less_than_or_equals) + _setter("number_less_than_or_equals", number_less_than_or_equals) if number_less_thans is not None: - pulumi.set(__self__, "number_less_thans", number_less_thans) + _setter("number_less_thans", number_less_thans) if number_not_in_ranges is not None: - pulumi.set(__self__, "number_not_in_ranges", number_not_in_ranges) + _setter("number_not_in_ranges", number_not_in_ranges) if number_not_ins is not None: - pulumi.set(__self__, "number_not_ins", number_not_ins) + _setter("number_not_ins", number_not_ins) if string_begins_withs is not None: - pulumi.set(__self__, "string_begins_withs", string_begins_withs) + _setter("string_begins_withs", string_begins_withs) if string_contains is not None: - pulumi.set(__self__, "string_contains", string_contains) + _setter("string_contains", string_contains) if string_ends_withs is not None: - pulumi.set(__self__, "string_ends_withs", string_ends_withs) + _setter("string_ends_withs", string_ends_withs) if string_ins is not None: - pulumi.set(__self__, "string_ins", string_ins) + _setter("string_ins", string_ins) if string_not_begins_withs is not None: - pulumi.set(__self__, "string_not_begins_withs", string_not_begins_withs) + _setter("string_not_begins_withs", string_not_begins_withs) if string_not_contains is not None: - pulumi.set(__self__, "string_not_contains", string_not_contains) + _setter("string_not_contains", string_not_contains) if string_not_ends_withs is not None: - pulumi.set(__self__, "string_not_ends_withs", string_not_ends_withs) + _setter("string_not_ends_withs", string_not_ends_withs) if string_not_ins is not None: - pulumi.set(__self__, "string_not_ins", string_not_ins) + _setter("string_not_ins", string_not_ins) @property @pulumi.getter(name="boolEquals") @@ -679,8 +852,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterBoolEqualArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -716,7 +906,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] key: Specifies the field within the event data that you want to use for filtering. Type of the field can be a number, boolean, or string. """ - pulumi.set(__self__, "key", key) + EventSubscriptionAdvancedFilterIsNotNullArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) @property @pulumi.getter @@ -738,7 +941,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] key: Specifies the field within the event data that you want to use for filtering. Type of the field can be a number, boolean, or string. """ - pulumi.set(__self__, "key", key) + EventSubscriptionAdvancedFilterIsNullOrUndefinedArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) @property @pulumi.getter @@ -764,8 +980,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberGreaterThanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -805,8 +1038,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberGreaterThanOrEqualArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -846,8 +1096,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -887,8 +1154,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberInRangeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[float]]]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -928,8 +1212,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberLessThanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -969,8 +1270,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberLessThanOrEqualArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -1010,8 +1328,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberNotInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1051,8 +1386,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberNotInRangeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[float]]]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1092,8 +1444,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringBeginsWithArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1133,8 +1502,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringContainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1174,8 +1560,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringEndsWithArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1215,8 +1618,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1256,8 +1676,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotBeginsWithArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1297,8 +1734,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotContainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1338,8 +1792,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotEndsWithArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1379,8 +1850,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1420,11 +1908,34 @@ def __init__(__self__, *, :param pulumi.Input[int] max_events_per_batch: Maximum number of events per batch. :param pulumi.Input[int] preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. """ - pulumi.set(__self__, "function_id", function_id) + EventSubscriptionAzureFunctionEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_id=function_id, + max_events_per_batch=max_events_per_batch, + preferred_batch_size_in_kilobytes=preferred_batch_size_in_kilobytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_id: Optional[pulumi.Input[str]] = None, + max_events_per_batch: Optional[pulumi.Input[int]] = None, + preferred_batch_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_id is None and 'functionId' in kwargs: + function_id = kwargs['functionId'] + if function_id is None: + raise TypeError("Missing 'function_id' argument") + if max_events_per_batch is None and 'maxEventsPerBatch' in kwargs: + max_events_per_batch = kwargs['maxEventsPerBatch'] + if preferred_batch_size_in_kilobytes is None and 'preferredBatchSizeInKilobytes' in kwargs: + preferred_batch_size_in_kilobytes = kwargs['preferredBatchSizeInKilobytes'] + + _setter("function_id", function_id) if max_events_per_batch is not None: - pulumi.set(__self__, "max_events_per_batch", max_events_per_batch) + _setter("max_events_per_batch", max_events_per_batch) if preferred_batch_size_in_kilobytes is not None: - pulumi.set(__self__, "preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) + _setter("preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) @property @pulumi.getter(name="functionId") @@ -1472,9 +1983,26 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that is used for dead lettering. Allowed value is `SystemAssigned`, `UserAssigned`. :param pulumi.Input[str] user_assigned_identity: The user identity associated with the resource. """ - pulumi.set(__self__, "type", type) + EventSubscriptionDeadLetterIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + user_assigned_identity=user_assigned_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + user_assigned_identity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if user_assigned_identity is None and 'userAssignedIdentity' in kwargs: + user_assigned_identity = kwargs['userAssignedIdentity'] + + _setter("type", type) if user_assigned_identity is not None: - pulumi.set(__self__, "user_assigned_identity", user_assigned_identity) + _setter("user_assigned_identity", user_assigned_identity) @property @pulumi.getter @@ -1510,9 +2038,26 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that is used for event delivery. Allowed value is `SystemAssigned`, `UserAssigned`. :param pulumi.Input[str] user_assigned_identity: The user identity associated with the resource. """ - pulumi.set(__self__, "type", type) + EventSubscriptionDeliveryIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + user_assigned_identity=user_assigned_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + user_assigned_identity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if user_assigned_identity is None and 'userAssignedIdentity' in kwargs: + user_assigned_identity = kwargs['userAssignedIdentity'] + + _setter("type", type) if user_assigned_identity is not None: - pulumi.set(__self__, "user_assigned_identity", user_assigned_identity) + _setter("user_assigned_identity", user_assigned_identity) @property @pulumi.getter @@ -1554,14 +2099,41 @@ def __init__(__self__, *, :param pulumi.Input[str] source_field: If the `type` is `Dynamic`, then provide the payload field to be used as the value. Valid source fields differ by subscription type. :param pulumi.Input[str] value: If the `type` is `Static`, then provide the value to use """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "type", type) + EventSubscriptionDeliveryPropertyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + type=type, + secret=secret, + source_field=source_field, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[bool]] = None, + source_field: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if source_field is None and 'sourceField' in kwargs: + source_field = kwargs['sourceField'] + + _setter("header_name", header_name) + _setter("type", type) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if source_field is not None: - pulumi.set(__self__, "source_field", source_field) + _setter("source_field", source_field) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerName") @@ -1633,8 +2205,29 @@ def __init__(__self__, *, :param pulumi.Input[int] event_time_to_live: Specifies the time to live (in minutes) for events. Supported range is `1` to `1440`. See [official documentation](https://docs.microsoft.com/azure/event-grid/manage-event-delivery#set-retry-policy) for more details. :param pulumi.Input[int] max_delivery_attempts: Specifies the maximum number of delivery retry attempts for events. """ - pulumi.set(__self__, "event_time_to_live", event_time_to_live) - pulumi.set(__self__, "max_delivery_attempts", max_delivery_attempts) + EventSubscriptionRetryPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_time_to_live=event_time_to_live, + max_delivery_attempts=max_delivery_attempts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_time_to_live: Optional[pulumi.Input[int]] = None, + max_delivery_attempts: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_time_to_live is None and 'eventTimeToLive' in kwargs: + event_time_to_live = kwargs['eventTimeToLive'] + if event_time_to_live is None: + raise TypeError("Missing 'event_time_to_live' argument") + if max_delivery_attempts is None and 'maxDeliveryAttempts' in kwargs: + max_delivery_attempts = kwargs['maxDeliveryAttempts'] + if max_delivery_attempts is None: + raise TypeError("Missing 'max_delivery_attempts' argument") + + _setter("event_time_to_live", event_time_to_live) + _setter("max_delivery_attempts", max_delivery_attempts) @property @pulumi.getter(name="eventTimeToLive") @@ -1670,8 +2263,29 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_id: Specifies the id of the storage account id where the storage blob is located. :param pulumi.Input[str] storage_blob_container_name: Specifies the name of the Storage blob container that is the destination of the deadletter events. """ - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "storage_blob_container_name", storage_blob_container_name) + EventSubscriptionStorageBlobDeadLetterDestinationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_id=storage_account_id, + storage_blob_container_name=storage_blob_container_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_blob_container_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if storage_blob_container_name is None and 'storageBlobContainerName' in kwargs: + storage_blob_container_name = kwargs['storageBlobContainerName'] + if storage_blob_container_name is None: + raise TypeError("Missing 'storage_blob_container_name' argument") + + _setter("storage_account_id", storage_account_id) + _setter("storage_blob_container_name", storage_blob_container_name) @property @pulumi.getter(name="storageAccountId") @@ -1709,10 +2323,35 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_id: Specifies the id of the storage account id where the storage queue is located. :param pulumi.Input[int] queue_message_time_to_live_in_seconds: Storage queue message time to live in seconds. """ - pulumi.set(__self__, "queue_name", queue_name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + EventSubscriptionStorageQueueEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + queue_name=queue_name, + storage_account_id=storage_account_id, + queue_message_time_to_live_in_seconds=queue_message_time_to_live_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + queue_name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + queue_message_time_to_live_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if queue_name is None and 'queueName' in kwargs: + queue_name = kwargs['queueName'] + if queue_name is None: + raise TypeError("Missing 'queue_name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if queue_message_time_to_live_in_seconds is None and 'queueMessageTimeToLiveInSeconds' in kwargs: + queue_message_time_to_live_in_seconds = kwargs['queueMessageTimeToLiveInSeconds'] + + _setter("queue_name", queue_name) + _setter("storage_account_id", storage_account_id) if queue_message_time_to_live_in_seconds is not None: - pulumi.set(__self__, "queue_message_time_to_live_in_seconds", queue_message_time_to_live_in_seconds) + _setter("queue_message_time_to_live_in_seconds", queue_message_time_to_live_in_seconds) @property @pulumi.getter(name="queueName") @@ -1762,12 +2401,33 @@ def __init__(__self__, *, :param pulumi.Input[str] subject_begins_with: A string to filter events for an event subscription based on a resource path prefix. :param pulumi.Input[str] subject_ends_with: A string to filter events for an event subscription based on a resource path suffix. """ + EventSubscriptionSubjectFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + case_sensitive=case_sensitive, + subject_begins_with=subject_begins_with, + subject_ends_with=subject_ends_with, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + case_sensitive: Optional[pulumi.Input[bool]] = None, + subject_begins_with: Optional[pulumi.Input[str]] = None, + subject_ends_with: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if case_sensitive is None and 'caseSensitive' in kwargs: + case_sensitive = kwargs['caseSensitive'] + if subject_begins_with is None and 'subjectBeginsWith' in kwargs: + subject_begins_with = kwargs['subjectBeginsWith'] + if subject_ends_with is None and 'subjectEndsWith' in kwargs: + subject_ends_with = kwargs['subjectEndsWith'] + if case_sensitive is not None: - pulumi.set(__self__, "case_sensitive", case_sensitive) + _setter("case_sensitive", case_sensitive) if subject_begins_with is not None: - pulumi.set(__self__, "subject_begins_with", subject_begins_with) + _setter("subject_begins_with", subject_begins_with) if subject_ends_with is not None: - pulumi.set(__self__, "subject_ends_with", subject_ends_with) + _setter("subject_ends_with", subject_ends_with) @property @pulumi.getter(name="caseSensitive") @@ -1823,17 +2483,50 @@ def __init__(__self__, *, :param pulumi.Input[int] max_events_per_batch: Maximum number of events per batch. :param pulumi.Input[int] preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. """ - pulumi.set(__self__, "url", url) + EventSubscriptionWebhookEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + active_directory_app_id_or_uri=active_directory_app_id_or_uri, + active_directory_tenant_id=active_directory_tenant_id, + base_url=base_url, + max_events_per_batch=max_events_per_batch, + preferred_batch_size_in_kilobytes=preferred_batch_size_in_kilobytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[pulumi.Input[str]] = None, + active_directory_app_id_or_uri: Optional[pulumi.Input[str]] = None, + active_directory_tenant_id: Optional[pulumi.Input[str]] = None, + base_url: Optional[pulumi.Input[str]] = None, + max_events_per_batch: Optional[pulumi.Input[int]] = None, + preferred_batch_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + if active_directory_app_id_or_uri is None and 'activeDirectoryAppIdOrUri' in kwargs: + active_directory_app_id_or_uri = kwargs['activeDirectoryAppIdOrUri'] + if active_directory_tenant_id is None and 'activeDirectoryTenantId' in kwargs: + active_directory_tenant_id = kwargs['activeDirectoryTenantId'] + if base_url is None and 'baseUrl' in kwargs: + base_url = kwargs['baseUrl'] + if max_events_per_batch is None and 'maxEventsPerBatch' in kwargs: + max_events_per_batch = kwargs['maxEventsPerBatch'] + if preferred_batch_size_in_kilobytes is None and 'preferredBatchSizeInKilobytes' in kwargs: + preferred_batch_size_in_kilobytes = kwargs['preferredBatchSizeInKilobytes'] + + _setter("url", url) if active_directory_app_id_or_uri is not None: - pulumi.set(__self__, "active_directory_app_id_or_uri", active_directory_app_id_or_uri) + _setter("active_directory_app_id_or_uri", active_directory_app_id_or_uri) if active_directory_tenant_id is not None: - pulumi.set(__self__, "active_directory_tenant_id", active_directory_tenant_id) + _setter("active_directory_tenant_id", active_directory_tenant_id) if base_url is not None: - pulumi.set(__self__, "base_url", base_url) + _setter("base_url", base_url) if max_events_per_batch is not None: - pulumi.set(__self__, "max_events_per_batch", max_events_per_batch) + _setter("max_events_per_batch", max_events_per_batch) if preferred_batch_size_in_kilobytes is not None: - pulumi.set(__self__, "preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) + _setter("preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) @property @pulumi.getter @@ -1953,44 +2646,129 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterStringNotEndsWithArgs']]] string_not_ends_withs: Compares a value of an event using multiple string values. :param pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterStringNotInArgs']]] string_not_ins: Compares a value of an event using multiple string values. """ + SystemTopicEventSubscriptionAdvancedFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bool_equals=bool_equals, + is_not_nulls=is_not_nulls, + is_null_or_undefineds=is_null_or_undefineds, + number_greater_than_or_equals=number_greater_than_or_equals, + number_greater_thans=number_greater_thans, + number_in_ranges=number_in_ranges, + number_ins=number_ins, + number_less_than_or_equals=number_less_than_or_equals, + number_less_thans=number_less_thans, + number_not_in_ranges=number_not_in_ranges, + number_not_ins=number_not_ins, + string_begins_withs=string_begins_withs, + string_contains=string_contains, + string_ends_withs=string_ends_withs, + string_ins=string_ins, + string_not_begins_withs=string_not_begins_withs, + string_not_contains=string_not_contains, + string_not_ends_withs=string_not_ends_withs, + string_not_ins=string_not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bool_equals: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterBoolEqualArgs']]]] = None, + is_not_nulls: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterIsNotNullArgs']]]] = None, + is_null_or_undefineds: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterIsNullOrUndefinedArgs']]]] = None, + number_greater_than_or_equals: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterNumberGreaterThanOrEqualArgs']]]] = None, + number_greater_thans: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterNumberGreaterThanArgs']]]] = None, + number_in_ranges: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterNumberInRangeArgs']]]] = None, + number_ins: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterNumberInArgs']]]] = None, + number_less_than_or_equals: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterNumberLessThanOrEqualArgs']]]] = None, + number_less_thans: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterNumberLessThanArgs']]]] = None, + number_not_in_ranges: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterNumberNotInRangeArgs']]]] = None, + number_not_ins: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterNumberNotInArgs']]]] = None, + string_begins_withs: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterStringBeginsWithArgs']]]] = None, + string_contains: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterStringContainArgs']]]] = None, + string_ends_withs: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterStringEndsWithArgs']]]] = None, + string_ins: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterStringInArgs']]]] = None, + string_not_begins_withs: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterStringNotBeginsWithArgs']]]] = None, + string_not_contains: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterStringNotContainArgs']]]] = None, + string_not_ends_withs: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterStringNotEndsWithArgs']]]] = None, + string_not_ins: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterStringNotInArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bool_equals is None and 'boolEquals' in kwargs: + bool_equals = kwargs['boolEquals'] + if is_not_nulls is None and 'isNotNulls' in kwargs: + is_not_nulls = kwargs['isNotNulls'] + if is_null_or_undefineds is None and 'isNullOrUndefineds' in kwargs: + is_null_or_undefineds = kwargs['isNullOrUndefineds'] + if number_greater_than_or_equals is None and 'numberGreaterThanOrEquals' in kwargs: + number_greater_than_or_equals = kwargs['numberGreaterThanOrEquals'] + if number_greater_thans is None and 'numberGreaterThans' in kwargs: + number_greater_thans = kwargs['numberGreaterThans'] + if number_in_ranges is None and 'numberInRanges' in kwargs: + number_in_ranges = kwargs['numberInRanges'] + if number_ins is None and 'numberIns' in kwargs: + number_ins = kwargs['numberIns'] + if number_less_than_or_equals is None and 'numberLessThanOrEquals' in kwargs: + number_less_than_or_equals = kwargs['numberLessThanOrEquals'] + if number_less_thans is None and 'numberLessThans' in kwargs: + number_less_thans = kwargs['numberLessThans'] + if number_not_in_ranges is None and 'numberNotInRanges' in kwargs: + number_not_in_ranges = kwargs['numberNotInRanges'] + if number_not_ins is None and 'numberNotIns' in kwargs: + number_not_ins = kwargs['numberNotIns'] + if string_begins_withs is None and 'stringBeginsWiths' in kwargs: + string_begins_withs = kwargs['stringBeginsWiths'] + if string_contains is None and 'stringContains' in kwargs: + string_contains = kwargs['stringContains'] + if string_ends_withs is None and 'stringEndsWiths' in kwargs: + string_ends_withs = kwargs['stringEndsWiths'] + if string_ins is None and 'stringIns' in kwargs: + string_ins = kwargs['stringIns'] + if string_not_begins_withs is None and 'stringNotBeginsWiths' in kwargs: + string_not_begins_withs = kwargs['stringNotBeginsWiths'] + if string_not_contains is None and 'stringNotContains' in kwargs: + string_not_contains = kwargs['stringNotContains'] + if string_not_ends_withs is None and 'stringNotEndsWiths' in kwargs: + string_not_ends_withs = kwargs['stringNotEndsWiths'] + if string_not_ins is None and 'stringNotIns' in kwargs: + string_not_ins = kwargs['stringNotIns'] + if bool_equals is not None: - pulumi.set(__self__, "bool_equals", bool_equals) + _setter("bool_equals", bool_equals) if is_not_nulls is not None: - pulumi.set(__self__, "is_not_nulls", is_not_nulls) + _setter("is_not_nulls", is_not_nulls) if is_null_or_undefineds is not None: - pulumi.set(__self__, "is_null_or_undefineds", is_null_or_undefineds) + _setter("is_null_or_undefineds", is_null_or_undefineds) if number_greater_than_or_equals is not None: - pulumi.set(__self__, "number_greater_than_or_equals", number_greater_than_or_equals) + _setter("number_greater_than_or_equals", number_greater_than_or_equals) if number_greater_thans is not None: - pulumi.set(__self__, "number_greater_thans", number_greater_thans) + _setter("number_greater_thans", number_greater_thans) if number_in_ranges is not None: - pulumi.set(__self__, "number_in_ranges", number_in_ranges) + _setter("number_in_ranges", number_in_ranges) if number_ins is not None: - pulumi.set(__self__, "number_ins", number_ins) + _setter("number_ins", number_ins) if number_less_than_or_equals is not None: - pulumi.set(__self__, "number_less_than_or_equals", number_less_than_or_equals) + _setter("number_less_than_or_equals", number_less_than_or_equals) if number_less_thans is not None: - pulumi.set(__self__, "number_less_thans", number_less_thans) + _setter("number_less_thans", number_less_thans) if number_not_in_ranges is not None: - pulumi.set(__self__, "number_not_in_ranges", number_not_in_ranges) + _setter("number_not_in_ranges", number_not_in_ranges) if number_not_ins is not None: - pulumi.set(__self__, "number_not_ins", number_not_ins) + _setter("number_not_ins", number_not_ins) if string_begins_withs is not None: - pulumi.set(__self__, "string_begins_withs", string_begins_withs) + _setter("string_begins_withs", string_begins_withs) if string_contains is not None: - pulumi.set(__self__, "string_contains", string_contains) + _setter("string_contains", string_contains) if string_ends_withs is not None: - pulumi.set(__self__, "string_ends_withs", string_ends_withs) + _setter("string_ends_withs", string_ends_withs) if string_ins is not None: - pulumi.set(__self__, "string_ins", string_ins) + _setter("string_ins", string_ins) if string_not_begins_withs is not None: - pulumi.set(__self__, "string_not_begins_withs", string_not_begins_withs) + _setter("string_not_begins_withs", string_not_begins_withs) if string_not_contains is not None: - pulumi.set(__self__, "string_not_contains", string_not_contains) + _setter("string_not_contains", string_not_contains) if string_not_ends_withs is not None: - pulumi.set(__self__, "string_not_ends_withs", string_not_ends_withs) + _setter("string_not_ends_withs", string_not_ends_withs) if string_not_ins is not None: - pulumi.set(__self__, "string_not_ins", string_not_ins) + _setter("string_not_ins", string_not_ins) @property @pulumi.getter(name="boolEquals") @@ -2234,8 +3012,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + SystemTopicEventSubscriptionAdvancedFilterBoolEqualArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -2271,7 +3066,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] key: Specifies the field within the event data that you want to use for filtering. Type of the field can be a number, boolean, or string. """ - pulumi.set(__self__, "key", key) + SystemTopicEventSubscriptionAdvancedFilterIsNotNullArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) @property @pulumi.getter @@ -2293,7 +3101,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] key: Specifies the field within the event data that you want to use for filtering. Type of the field can be a number, boolean, or string. """ - pulumi.set(__self__, "key", key) + SystemTopicEventSubscriptionAdvancedFilterIsNullOrUndefinedArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) @property @pulumi.getter @@ -2319,8 +3140,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + SystemTopicEventSubscriptionAdvancedFilterNumberGreaterThanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -2360,8 +3198,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + SystemTopicEventSubscriptionAdvancedFilterNumberGreaterThanOrEqualArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -2401,8 +3256,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterNumberInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2442,8 +3314,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterNumberInRangeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[float]]]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2483,8 +3372,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + SystemTopicEventSubscriptionAdvancedFilterNumberLessThanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -2524,8 +3430,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + SystemTopicEventSubscriptionAdvancedFilterNumberLessThanOrEqualArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -2565,8 +3488,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterNumberNotInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2606,8 +3546,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterNumberNotInRangeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[float]]]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2647,8 +3604,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringBeginsWithArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2688,8 +3662,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringContainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2729,8 +3720,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringEndsWithArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2770,8 +3778,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2811,8 +3836,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringNotBeginsWithArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2852,8 +3894,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringNotContainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2893,8 +3952,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringNotEndsWithArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2934,8 +4010,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringNotInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2975,11 +4068,34 @@ def __init__(__self__, *, :param pulumi.Input[int] max_events_per_batch: Maximum number of events per batch. :param pulumi.Input[int] preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. """ - pulumi.set(__self__, "function_id", function_id) + SystemTopicEventSubscriptionAzureFunctionEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_id=function_id, + max_events_per_batch=max_events_per_batch, + preferred_batch_size_in_kilobytes=preferred_batch_size_in_kilobytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_id: Optional[pulumi.Input[str]] = None, + max_events_per_batch: Optional[pulumi.Input[int]] = None, + preferred_batch_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_id is None and 'functionId' in kwargs: + function_id = kwargs['functionId'] + if function_id is None: + raise TypeError("Missing 'function_id' argument") + if max_events_per_batch is None and 'maxEventsPerBatch' in kwargs: + max_events_per_batch = kwargs['maxEventsPerBatch'] + if preferred_batch_size_in_kilobytes is None and 'preferredBatchSizeInKilobytes' in kwargs: + preferred_batch_size_in_kilobytes = kwargs['preferredBatchSizeInKilobytes'] + + _setter("function_id", function_id) if max_events_per_batch is not None: - pulumi.set(__self__, "max_events_per_batch", max_events_per_batch) + _setter("max_events_per_batch", max_events_per_batch) if preferred_batch_size_in_kilobytes is not None: - pulumi.set(__self__, "preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) + _setter("preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) @property @pulumi.getter(name="functionId") @@ -3027,9 +4143,26 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that is used for dead lettering. Allowed value is `SystemAssigned`, `UserAssigned`. :param pulumi.Input[str] user_assigned_identity: The user identity associated with the resource. """ - pulumi.set(__self__, "type", type) + SystemTopicEventSubscriptionDeadLetterIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + user_assigned_identity=user_assigned_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + user_assigned_identity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if user_assigned_identity is None and 'userAssignedIdentity' in kwargs: + user_assigned_identity = kwargs['userAssignedIdentity'] + + _setter("type", type) if user_assigned_identity is not None: - pulumi.set(__self__, "user_assigned_identity", user_assigned_identity) + _setter("user_assigned_identity", user_assigned_identity) @property @pulumi.getter @@ -3065,9 +4198,26 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that is used for event delivery. Allowed value is `SystemAssigned`, `UserAssigned`. :param pulumi.Input[str] user_assigned_identity: The user identity associated with the resource. """ - pulumi.set(__self__, "type", type) + SystemTopicEventSubscriptionDeliveryIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + user_assigned_identity=user_assigned_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + user_assigned_identity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if user_assigned_identity is None and 'userAssignedIdentity' in kwargs: + user_assigned_identity = kwargs['userAssignedIdentity'] + + _setter("type", type) if user_assigned_identity is not None: - pulumi.set(__self__, "user_assigned_identity", user_assigned_identity) + _setter("user_assigned_identity", user_assigned_identity) @property @pulumi.getter @@ -3109,14 +4259,41 @@ def __init__(__self__, *, :param pulumi.Input[str] source_field: If the `type` is `Dynamic`, then provide the payload field to be used as the value. Valid source fields differ by subscription type. :param pulumi.Input[str] value: If the `type` is `Static`, then provide the value to use. """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "type", type) + SystemTopicEventSubscriptionDeliveryPropertyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + type=type, + secret=secret, + source_field=source_field, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[bool]] = None, + source_field: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if source_field is None and 'sourceField' in kwargs: + source_field = kwargs['sourceField'] + + _setter("header_name", header_name) + _setter("type", type) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if source_field is not None: - pulumi.set(__self__, "source_field", source_field) + _setter("source_field", source_field) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerName") @@ -3188,8 +4365,29 @@ def __init__(__self__, *, :param pulumi.Input[int] event_time_to_live: Specifies the time to live (in minutes) for events. Supported range is `1` to `1440`. See [official documentation](https://docs.microsoft.com/azure/event-grid/manage-event-delivery#set-retry-policy) for more details. :param pulumi.Input[int] max_delivery_attempts: Specifies the maximum number of delivery retry attempts for events. """ - pulumi.set(__self__, "event_time_to_live", event_time_to_live) - pulumi.set(__self__, "max_delivery_attempts", max_delivery_attempts) + SystemTopicEventSubscriptionRetryPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_time_to_live=event_time_to_live, + max_delivery_attempts=max_delivery_attempts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_time_to_live: Optional[pulumi.Input[int]] = None, + max_delivery_attempts: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_time_to_live is None and 'eventTimeToLive' in kwargs: + event_time_to_live = kwargs['eventTimeToLive'] + if event_time_to_live is None: + raise TypeError("Missing 'event_time_to_live' argument") + if max_delivery_attempts is None and 'maxDeliveryAttempts' in kwargs: + max_delivery_attempts = kwargs['maxDeliveryAttempts'] + if max_delivery_attempts is None: + raise TypeError("Missing 'max_delivery_attempts' argument") + + _setter("event_time_to_live", event_time_to_live) + _setter("max_delivery_attempts", max_delivery_attempts) @property @pulumi.getter(name="eventTimeToLive") @@ -3225,8 +4423,29 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_id: Specifies the id of the storage account id where the storage blob is located. :param pulumi.Input[str] storage_blob_container_name: Specifies the name of the Storage blob container that is the destination of the deadletter events. """ - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "storage_blob_container_name", storage_blob_container_name) + SystemTopicEventSubscriptionStorageBlobDeadLetterDestinationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_id=storage_account_id, + storage_blob_container_name=storage_blob_container_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_blob_container_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if storage_blob_container_name is None and 'storageBlobContainerName' in kwargs: + storage_blob_container_name = kwargs['storageBlobContainerName'] + if storage_blob_container_name is None: + raise TypeError("Missing 'storage_blob_container_name' argument") + + _setter("storage_account_id", storage_account_id) + _setter("storage_blob_container_name", storage_blob_container_name) @property @pulumi.getter(name="storageAccountId") @@ -3264,10 +4483,35 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_id: Specifies the id of the storage account id where the storage queue is located. :param pulumi.Input[int] queue_message_time_to_live_in_seconds: Storage queue message time to live in seconds. """ - pulumi.set(__self__, "queue_name", queue_name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + SystemTopicEventSubscriptionStorageQueueEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + queue_name=queue_name, + storage_account_id=storage_account_id, + queue_message_time_to_live_in_seconds=queue_message_time_to_live_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + queue_name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + queue_message_time_to_live_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if queue_name is None and 'queueName' in kwargs: + queue_name = kwargs['queueName'] + if queue_name is None: + raise TypeError("Missing 'queue_name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if queue_message_time_to_live_in_seconds is None and 'queueMessageTimeToLiveInSeconds' in kwargs: + queue_message_time_to_live_in_seconds = kwargs['queueMessageTimeToLiveInSeconds'] + + _setter("queue_name", queue_name) + _setter("storage_account_id", storage_account_id) if queue_message_time_to_live_in_seconds is not None: - pulumi.set(__self__, "queue_message_time_to_live_in_seconds", queue_message_time_to_live_in_seconds) + _setter("queue_message_time_to_live_in_seconds", queue_message_time_to_live_in_seconds) @property @pulumi.getter(name="queueName") @@ -3317,12 +4561,33 @@ def __init__(__self__, *, :param pulumi.Input[str] subject_begins_with: A string to filter events for an event subscription based on a resource path prefix. :param pulumi.Input[str] subject_ends_with: A string to filter events for an event subscription based on a resource path suffix. """ + SystemTopicEventSubscriptionSubjectFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + case_sensitive=case_sensitive, + subject_begins_with=subject_begins_with, + subject_ends_with=subject_ends_with, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + case_sensitive: Optional[pulumi.Input[bool]] = None, + subject_begins_with: Optional[pulumi.Input[str]] = None, + subject_ends_with: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if case_sensitive is None and 'caseSensitive' in kwargs: + case_sensitive = kwargs['caseSensitive'] + if subject_begins_with is None and 'subjectBeginsWith' in kwargs: + subject_begins_with = kwargs['subjectBeginsWith'] + if subject_ends_with is None and 'subjectEndsWith' in kwargs: + subject_ends_with = kwargs['subjectEndsWith'] + if case_sensitive is not None: - pulumi.set(__self__, "case_sensitive", case_sensitive) + _setter("case_sensitive", case_sensitive) if subject_begins_with is not None: - pulumi.set(__self__, "subject_begins_with", subject_begins_with) + _setter("subject_begins_with", subject_begins_with) if subject_ends_with is not None: - pulumi.set(__self__, "subject_ends_with", subject_ends_with) + _setter("subject_ends_with", subject_ends_with) @property @pulumi.getter(name="caseSensitive") @@ -3378,17 +4643,50 @@ def __init__(__self__, *, :param pulumi.Input[int] max_events_per_batch: Maximum number of events per batch. :param pulumi.Input[int] preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. """ - pulumi.set(__self__, "url", url) + SystemTopicEventSubscriptionWebhookEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + active_directory_app_id_or_uri=active_directory_app_id_or_uri, + active_directory_tenant_id=active_directory_tenant_id, + base_url=base_url, + max_events_per_batch=max_events_per_batch, + preferred_batch_size_in_kilobytes=preferred_batch_size_in_kilobytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[pulumi.Input[str]] = None, + active_directory_app_id_or_uri: Optional[pulumi.Input[str]] = None, + active_directory_tenant_id: Optional[pulumi.Input[str]] = None, + base_url: Optional[pulumi.Input[str]] = None, + max_events_per_batch: Optional[pulumi.Input[int]] = None, + preferred_batch_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + if active_directory_app_id_or_uri is None and 'activeDirectoryAppIdOrUri' in kwargs: + active_directory_app_id_or_uri = kwargs['activeDirectoryAppIdOrUri'] + if active_directory_tenant_id is None and 'activeDirectoryTenantId' in kwargs: + active_directory_tenant_id = kwargs['activeDirectoryTenantId'] + if base_url is None and 'baseUrl' in kwargs: + base_url = kwargs['baseUrl'] + if max_events_per_batch is None and 'maxEventsPerBatch' in kwargs: + max_events_per_batch = kwargs['maxEventsPerBatch'] + if preferred_batch_size_in_kilobytes is None and 'preferredBatchSizeInKilobytes' in kwargs: + preferred_batch_size_in_kilobytes = kwargs['preferredBatchSizeInKilobytes'] + + _setter("url", url) if active_directory_app_id_or_uri is not None: - pulumi.set(__self__, "active_directory_app_id_or_uri", active_directory_app_id_or_uri) + _setter("active_directory_app_id_or_uri", active_directory_app_id_or_uri) if active_directory_tenant_id is not None: - pulumi.set(__self__, "active_directory_tenant_id", active_directory_tenant_id) + _setter("active_directory_tenant_id", active_directory_tenant_id) if base_url is not None: - pulumi.set(__self__, "base_url", base_url) + _setter("base_url", base_url) if max_events_per_batch is not None: - pulumi.set(__self__, "max_events_per_batch", max_events_per_batch) + _setter("max_events_per_batch", max_events_per_batch) if preferred_batch_size_in_kilobytes is not None: - pulumi.set(__self__, "preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) + _setter("preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) @property @pulumi.getter @@ -3480,13 +4778,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + SystemTopicIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -3558,13 +4881,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + TopicIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -3628,9 +4976,26 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_mask: The IP mask (CIDR) to match on. :param pulumi.Input[str] action: The action to take when the rule is matched. Possible values are `Allow`. """ - pulumi.set(__self__, "ip_mask", ip_mask) + TopicInboundIpRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[pulumi.Input[str]] = None, + action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + + _setter("ip_mask", ip_mask) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipMask") @@ -3668,12 +5033,31 @@ def __init__(__self__, *, :param pulumi.Input[str] event_type: Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param pulumi.Input[str] subject: Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + TopicInputMappingDefaultValuesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_type=event_type, + subject=subject, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[pulumi.Input[str]] = None, + event_type: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) @property @pulumi.getter(name="dataVersion") @@ -3729,18 +5113,45 @@ def __init__(__self__, *, :param pulumi.Input[str] subject: Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param pulumi.Input[str] topic: Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + TopicInputMappingFieldsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_time=event_time, + event_type=event_type, + id=id, + subject=subject, + topic=topic, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[pulumi.Input[str]] = None, + event_time: Optional[pulumi.Input[str]] = None, + event_type: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + topic: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_time is None and 'eventTime' in kwargs: + event_time = kwargs['eventTime'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_time is not None: - pulumi.set(__self__, "event_time", event_time) + _setter("event_time", event_time) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if topic is not None: - pulumi.set(__self__, "topic", topic) + _setter("topic", topic) @property @pulumi.getter(name="dataVersion") diff --git a/sdk/python/pulumi_azure/eventgrid/domain.py b/sdk/python/pulumi_azure/eventgrid/domain.py index d4ca8f55c8..2177c8e914 100644 --- a/sdk/python/pulumi_azure/eventgrid/domain.py +++ b/sdk/python/pulumi_azure/eventgrid/domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,31 +45,86 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether or not public network access is allowed for this server. Defaults to `true`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + DomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + auto_create_topic_with_first_subscription=auto_create_topic_with_first_subscription, + auto_delete_topic_with_last_subscription=auto_delete_topic_with_last_subscription, + identity=identity, + inbound_ip_rules=inbound_ip_rules, + input_mapping_default_values=input_mapping_default_values, + input_mapping_fields=input_mapping_fields, + input_schema=input_schema, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + auto_create_topic_with_first_subscription: Optional[pulumi.Input[bool]] = None, + auto_delete_topic_with_last_subscription: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['DomainIdentityArgs']] = None, + inbound_ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['DomainInboundIpRuleArgs']]]] = None, + input_mapping_default_values: Optional[pulumi.Input['DomainInputMappingDefaultValuesArgs']] = None, + input_mapping_fields: Optional[pulumi.Input['DomainInputMappingFieldsArgs']] = None, + input_schema: Optional[pulumi.Input[str]] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if auto_create_topic_with_first_subscription is None and 'autoCreateTopicWithFirstSubscription' in kwargs: + auto_create_topic_with_first_subscription = kwargs['autoCreateTopicWithFirstSubscription'] + if auto_delete_topic_with_last_subscription is None and 'autoDeleteTopicWithLastSubscription' in kwargs: + auto_delete_topic_with_last_subscription = kwargs['autoDeleteTopicWithLastSubscription'] + if inbound_ip_rules is None and 'inboundIpRules' in kwargs: + inbound_ip_rules = kwargs['inboundIpRules'] + if input_mapping_default_values is None and 'inputMappingDefaultValues' in kwargs: + input_mapping_default_values = kwargs['inputMappingDefaultValues'] + if input_mapping_fields is None and 'inputMappingFields' in kwargs: + input_mapping_fields = kwargs['inputMappingFields'] + if input_schema is None and 'inputSchema' in kwargs: + input_schema = kwargs['inputSchema'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) if auto_create_topic_with_first_subscription is not None: - pulumi.set(__self__, "auto_create_topic_with_first_subscription", auto_create_topic_with_first_subscription) + _setter("auto_create_topic_with_first_subscription", auto_create_topic_with_first_subscription) if auto_delete_topic_with_last_subscription is not None: - pulumi.set(__self__, "auto_delete_topic_with_last_subscription", auto_delete_topic_with_last_subscription) + _setter("auto_delete_topic_with_last_subscription", auto_delete_topic_with_last_subscription) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if inbound_ip_rules is not None: - pulumi.set(__self__, "inbound_ip_rules", inbound_ip_rules) + _setter("inbound_ip_rules", inbound_ip_rules) if input_mapping_default_values is not None: - pulumi.set(__self__, "input_mapping_default_values", input_mapping_default_values) + _setter("input_mapping_default_values", input_mapping_default_values) if input_mapping_fields is not None: - pulumi.set(__self__, "input_mapping_fields", input_mapping_fields) + _setter("input_mapping_fields", input_mapping_fields) if input_schema is not None: - pulumi.set(__self__, "input_schema", input_schema) + _setter("input_schema", input_schema) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -266,38 +321,101 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_access_key: The Secondary Shared Access Key associated with the EventGrid Domain. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _DomainState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_create_topic_with_first_subscription=auto_create_topic_with_first_subscription, + auto_delete_topic_with_last_subscription=auto_delete_topic_with_last_subscription, + endpoint=endpoint, + identity=identity, + inbound_ip_rules=inbound_ip_rules, + input_mapping_default_values=input_mapping_default_values, + input_mapping_fields=input_mapping_fields, + input_schema=input_schema, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + primary_access_key=primary_access_key, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + secondary_access_key=secondary_access_key, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_create_topic_with_first_subscription: Optional[pulumi.Input[bool]] = None, + auto_delete_topic_with_last_subscription: Optional[pulumi.Input[bool]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['DomainIdentityArgs']] = None, + inbound_ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['DomainInboundIpRuleArgs']]]] = None, + input_mapping_default_values: Optional[pulumi.Input['DomainInputMappingDefaultValuesArgs']] = None, + input_mapping_fields: Optional[pulumi.Input['DomainInputMappingFieldsArgs']] = None, + input_schema: Optional[pulumi.Input[str]] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_access_key: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_access_key: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_create_topic_with_first_subscription is None and 'autoCreateTopicWithFirstSubscription' in kwargs: + auto_create_topic_with_first_subscription = kwargs['autoCreateTopicWithFirstSubscription'] + if auto_delete_topic_with_last_subscription is None and 'autoDeleteTopicWithLastSubscription' in kwargs: + auto_delete_topic_with_last_subscription = kwargs['autoDeleteTopicWithLastSubscription'] + if inbound_ip_rules is None and 'inboundIpRules' in kwargs: + inbound_ip_rules = kwargs['inboundIpRules'] + if input_mapping_default_values is None and 'inputMappingDefaultValues' in kwargs: + input_mapping_default_values = kwargs['inputMappingDefaultValues'] + if input_mapping_fields is None and 'inputMappingFields' in kwargs: + input_mapping_fields = kwargs['inputMappingFields'] + if input_schema is None and 'inputSchema' in kwargs: + input_schema = kwargs['inputSchema'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if primary_access_key is None and 'primaryAccessKey' in kwargs: + primary_access_key = kwargs['primaryAccessKey'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_access_key is None and 'secondaryAccessKey' in kwargs: + secondary_access_key = kwargs['secondaryAccessKey'] + if auto_create_topic_with_first_subscription is not None: - pulumi.set(__self__, "auto_create_topic_with_first_subscription", auto_create_topic_with_first_subscription) + _setter("auto_create_topic_with_first_subscription", auto_create_topic_with_first_subscription) if auto_delete_topic_with_last_subscription is not None: - pulumi.set(__self__, "auto_delete_topic_with_last_subscription", auto_delete_topic_with_last_subscription) + _setter("auto_delete_topic_with_last_subscription", auto_delete_topic_with_last_subscription) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if inbound_ip_rules is not None: - pulumi.set(__self__, "inbound_ip_rules", inbound_ip_rules) + _setter("inbound_ip_rules", inbound_ip_rules) if input_mapping_default_values is not None: - pulumi.set(__self__, "input_mapping_default_values", input_mapping_default_values) + _setter("input_mapping_default_values", input_mapping_default_values) if input_mapping_fields is not None: - pulumi.set(__self__, "input_mapping_fields", input_mapping_fields) + _setter("input_mapping_fields", input_mapping_fields) if input_schema is not None: - pulumi.set(__self__, "input_schema", input_schema) + _setter("input_schema", input_schema) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_access_key is not None: - pulumi.set(__self__, "primary_access_key", primary_access_key) + _setter("primary_access_key", primary_access_key) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_access_key is not None: - pulumi.set(__self__, "secondary_access_key", secondary_access_key) + _setter("secondary_access_key", secondary_access_key) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="autoCreateTopicWithFirstSubscription") @@ -595,6 +713,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DomainArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -624,9 +746,24 @@ def _internal_init(__self__, __props__.__dict__["auto_create_topic_with_first_subscription"] = auto_create_topic_with_first_subscription __props__.__dict__["auto_delete_topic_with_last_subscription"] = auto_delete_topic_with_last_subscription + if identity is not None and not isinstance(identity, DomainIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + DomainIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["inbound_ip_rules"] = inbound_ip_rules + if input_mapping_default_values is not None and not isinstance(input_mapping_default_values, DomainInputMappingDefaultValuesArgs): + input_mapping_default_values = input_mapping_default_values or {} + def _setter(key, value): + input_mapping_default_values[key] = value + DomainInputMappingDefaultValuesArgs._configure(_setter, **input_mapping_default_values) __props__.__dict__["input_mapping_default_values"] = input_mapping_default_values + if input_mapping_fields is not None and not isinstance(input_mapping_fields, DomainInputMappingFieldsArgs): + input_mapping_fields = input_mapping_fields or {} + def _setter(key, value): + input_mapping_fields[key] = value + DomainInputMappingFieldsArgs._configure(_setter, **input_mapping_fields) __props__.__dict__["input_mapping_fields"] = input_mapping_fields __props__.__dict__["input_schema"] = input_schema __props__.__dict__["local_auth_enabled"] = local_auth_enabled diff --git a/sdk/python/pulumi_azure/eventgrid/domain_topic.py b/sdk/python/pulumi_azure/eventgrid/domain_topic.py index 186f579198..ad085f80d6 100644 --- a/sdk/python/pulumi_azure/eventgrid/domain_topic.py +++ b/sdk/python/pulumi_azure/eventgrid/domain_topic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DomainTopicArgs', 'DomainTopic'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the EventGrid Domain Topic resource. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + DomainTopicArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name=domain_name, + resource_group_name=resource_group_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("domain_name", domain_name) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="domainName") @@ -77,12 +100,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the EventGrid Domain Topic resource. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created. """ + _DomainTopicState._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name=domain_name, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if domain_name is not None: - pulumi.set(__self__, "domain_name", domain_name) + _setter("domain_name", domain_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="domainName") @@ -210,6 +252,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DomainTopicArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventgrid/event_subscription.py b/sdk/python/pulumi_azure/eventgrid/event_subscription.py index e854a6b1a9..b72965924b 100644 --- a/sdk/python/pulumi_azure/eventgrid/event_subscription.py +++ b/sdk/python/pulumi_azure/eventgrid/event_subscription.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -65,47 +65,136 @@ def __init__(__self__, *, > **NOTE:** One of `eventhub_endpoint_id`, `hybrid_connection_endpoint_id`, `service_bus_queue_endpoint_id`, `service_bus_topic_endpoint_id`, `storage_queue_endpoint`, `webhook_endpoint` or `azure_function_endpoint` must be specified. """ - pulumi.set(__self__, "scope", scope) + EventSubscriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + scope=scope, + advanced_filter=advanced_filter, + advanced_filtering_on_arrays_enabled=advanced_filtering_on_arrays_enabled, + azure_function_endpoint=azure_function_endpoint, + dead_letter_identity=dead_letter_identity, + delivery_identity=delivery_identity, + delivery_properties=delivery_properties, + event_delivery_schema=event_delivery_schema, + eventhub_endpoint_id=eventhub_endpoint_id, + expiration_time_utc=expiration_time_utc, + hybrid_connection_endpoint_id=hybrid_connection_endpoint_id, + included_event_types=included_event_types, + labels=labels, + name=name, + retry_policy=retry_policy, + service_bus_queue_endpoint_id=service_bus_queue_endpoint_id, + service_bus_topic_endpoint_id=service_bus_topic_endpoint_id, + storage_blob_dead_letter_destination=storage_blob_dead_letter_destination, + storage_queue_endpoint=storage_queue_endpoint, + subject_filter=subject_filter, + webhook_endpoint=webhook_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + scope: Optional[pulumi.Input[str]] = None, + advanced_filter: Optional[pulumi.Input['EventSubscriptionAdvancedFilterArgs']] = None, + advanced_filtering_on_arrays_enabled: Optional[pulumi.Input[bool]] = None, + azure_function_endpoint: Optional[pulumi.Input['EventSubscriptionAzureFunctionEndpointArgs']] = None, + dead_letter_identity: Optional[pulumi.Input['EventSubscriptionDeadLetterIdentityArgs']] = None, + delivery_identity: Optional[pulumi.Input['EventSubscriptionDeliveryIdentityArgs']] = None, + delivery_properties: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionDeliveryPropertyArgs']]]] = None, + event_delivery_schema: Optional[pulumi.Input[str]] = None, + eventhub_endpoint_id: Optional[pulumi.Input[str]] = None, + expiration_time_utc: Optional[pulumi.Input[str]] = None, + hybrid_connection_endpoint_id: Optional[pulumi.Input[str]] = None, + included_event_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + retry_policy: Optional[pulumi.Input['EventSubscriptionRetryPolicyArgs']] = None, + service_bus_queue_endpoint_id: Optional[pulumi.Input[str]] = None, + service_bus_topic_endpoint_id: Optional[pulumi.Input[str]] = None, + storage_blob_dead_letter_destination: Optional[pulumi.Input['EventSubscriptionStorageBlobDeadLetterDestinationArgs']] = None, + storage_queue_endpoint: Optional[pulumi.Input['EventSubscriptionStorageQueueEndpointArgs']] = None, + subject_filter: Optional[pulumi.Input['EventSubscriptionSubjectFilterArgs']] = None, + webhook_endpoint: Optional[pulumi.Input['EventSubscriptionWebhookEndpointArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if scope is None: + raise TypeError("Missing 'scope' argument") + if advanced_filter is None and 'advancedFilter' in kwargs: + advanced_filter = kwargs['advancedFilter'] + if advanced_filtering_on_arrays_enabled is None and 'advancedFilteringOnArraysEnabled' in kwargs: + advanced_filtering_on_arrays_enabled = kwargs['advancedFilteringOnArraysEnabled'] + if azure_function_endpoint is None and 'azureFunctionEndpoint' in kwargs: + azure_function_endpoint = kwargs['azureFunctionEndpoint'] + if dead_letter_identity is None and 'deadLetterIdentity' in kwargs: + dead_letter_identity = kwargs['deadLetterIdentity'] + if delivery_identity is None and 'deliveryIdentity' in kwargs: + delivery_identity = kwargs['deliveryIdentity'] + if delivery_properties is None and 'deliveryProperties' in kwargs: + delivery_properties = kwargs['deliveryProperties'] + if event_delivery_schema is None and 'eventDeliverySchema' in kwargs: + event_delivery_schema = kwargs['eventDeliverySchema'] + if eventhub_endpoint_id is None and 'eventhubEndpointId' in kwargs: + eventhub_endpoint_id = kwargs['eventhubEndpointId'] + if expiration_time_utc is None and 'expirationTimeUtc' in kwargs: + expiration_time_utc = kwargs['expirationTimeUtc'] + if hybrid_connection_endpoint_id is None and 'hybridConnectionEndpointId' in kwargs: + hybrid_connection_endpoint_id = kwargs['hybridConnectionEndpointId'] + if included_event_types is None and 'includedEventTypes' in kwargs: + included_event_types = kwargs['includedEventTypes'] + if retry_policy is None and 'retryPolicy' in kwargs: + retry_policy = kwargs['retryPolicy'] + if service_bus_queue_endpoint_id is None and 'serviceBusQueueEndpointId' in kwargs: + service_bus_queue_endpoint_id = kwargs['serviceBusQueueEndpointId'] + if service_bus_topic_endpoint_id is None and 'serviceBusTopicEndpointId' in kwargs: + service_bus_topic_endpoint_id = kwargs['serviceBusTopicEndpointId'] + if storage_blob_dead_letter_destination is None and 'storageBlobDeadLetterDestination' in kwargs: + storage_blob_dead_letter_destination = kwargs['storageBlobDeadLetterDestination'] + if storage_queue_endpoint is None and 'storageQueueEndpoint' in kwargs: + storage_queue_endpoint = kwargs['storageQueueEndpoint'] + if subject_filter is None and 'subjectFilter' in kwargs: + subject_filter = kwargs['subjectFilter'] + if webhook_endpoint is None and 'webhookEndpoint' in kwargs: + webhook_endpoint = kwargs['webhookEndpoint'] + + _setter("scope", scope) if advanced_filter is not None: - pulumi.set(__self__, "advanced_filter", advanced_filter) + _setter("advanced_filter", advanced_filter) if advanced_filtering_on_arrays_enabled is not None: - pulumi.set(__self__, "advanced_filtering_on_arrays_enabled", advanced_filtering_on_arrays_enabled) + _setter("advanced_filtering_on_arrays_enabled", advanced_filtering_on_arrays_enabled) if azure_function_endpoint is not None: - pulumi.set(__self__, "azure_function_endpoint", azure_function_endpoint) + _setter("azure_function_endpoint", azure_function_endpoint) if dead_letter_identity is not None: - pulumi.set(__self__, "dead_letter_identity", dead_letter_identity) + _setter("dead_letter_identity", dead_letter_identity) if delivery_identity is not None: - pulumi.set(__self__, "delivery_identity", delivery_identity) + _setter("delivery_identity", delivery_identity) if delivery_properties is not None: - pulumi.set(__self__, "delivery_properties", delivery_properties) + _setter("delivery_properties", delivery_properties) if event_delivery_schema is not None: - pulumi.set(__self__, "event_delivery_schema", event_delivery_schema) + _setter("event_delivery_schema", event_delivery_schema) if eventhub_endpoint_id is not None: - pulumi.set(__self__, "eventhub_endpoint_id", eventhub_endpoint_id) + _setter("eventhub_endpoint_id", eventhub_endpoint_id) if expiration_time_utc is not None: - pulumi.set(__self__, "expiration_time_utc", expiration_time_utc) + _setter("expiration_time_utc", expiration_time_utc) if hybrid_connection_endpoint_id is not None: - pulumi.set(__self__, "hybrid_connection_endpoint_id", hybrid_connection_endpoint_id) + _setter("hybrid_connection_endpoint_id", hybrid_connection_endpoint_id) if included_event_types is not None: - pulumi.set(__self__, "included_event_types", included_event_types) + _setter("included_event_types", included_event_types) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retry_policy is not None: - pulumi.set(__self__, "retry_policy", retry_policy) + _setter("retry_policy", retry_policy) if service_bus_queue_endpoint_id is not None: - pulumi.set(__self__, "service_bus_queue_endpoint_id", service_bus_queue_endpoint_id) + _setter("service_bus_queue_endpoint_id", service_bus_queue_endpoint_id) if service_bus_topic_endpoint_id is not None: - pulumi.set(__self__, "service_bus_topic_endpoint_id", service_bus_topic_endpoint_id) + _setter("service_bus_topic_endpoint_id", service_bus_topic_endpoint_id) if storage_blob_dead_letter_destination is not None: - pulumi.set(__self__, "storage_blob_dead_letter_destination", storage_blob_dead_letter_destination) + _setter("storage_blob_dead_letter_destination", storage_blob_dead_letter_destination) if storage_queue_endpoint is not None: - pulumi.set(__self__, "storage_queue_endpoint", storage_queue_endpoint) + _setter("storage_queue_endpoint", storage_queue_endpoint) if subject_filter is not None: - pulumi.set(__self__, "subject_filter", subject_filter) + _setter("subject_filter", subject_filter) if webhook_endpoint is not None: - pulumi.set(__self__, "webhook_endpoint", webhook_endpoint) + _setter("webhook_endpoint", webhook_endpoint) @property @pulumi.getter @@ -416,48 +505,135 @@ def __init__(__self__, *, > **NOTE:** One of `eventhub_endpoint_id`, `hybrid_connection_endpoint_id`, `service_bus_queue_endpoint_id`, `service_bus_topic_endpoint_id`, `storage_queue_endpoint`, `webhook_endpoint` or `azure_function_endpoint` must be specified. """ + _EventSubscriptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + advanced_filter=advanced_filter, + advanced_filtering_on_arrays_enabled=advanced_filtering_on_arrays_enabled, + azure_function_endpoint=azure_function_endpoint, + dead_letter_identity=dead_letter_identity, + delivery_identity=delivery_identity, + delivery_properties=delivery_properties, + event_delivery_schema=event_delivery_schema, + eventhub_endpoint_id=eventhub_endpoint_id, + expiration_time_utc=expiration_time_utc, + hybrid_connection_endpoint_id=hybrid_connection_endpoint_id, + included_event_types=included_event_types, + labels=labels, + name=name, + retry_policy=retry_policy, + scope=scope, + service_bus_queue_endpoint_id=service_bus_queue_endpoint_id, + service_bus_topic_endpoint_id=service_bus_topic_endpoint_id, + storage_blob_dead_letter_destination=storage_blob_dead_letter_destination, + storage_queue_endpoint=storage_queue_endpoint, + subject_filter=subject_filter, + webhook_endpoint=webhook_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + advanced_filter: Optional[pulumi.Input['EventSubscriptionAdvancedFilterArgs']] = None, + advanced_filtering_on_arrays_enabled: Optional[pulumi.Input[bool]] = None, + azure_function_endpoint: Optional[pulumi.Input['EventSubscriptionAzureFunctionEndpointArgs']] = None, + dead_letter_identity: Optional[pulumi.Input['EventSubscriptionDeadLetterIdentityArgs']] = None, + delivery_identity: Optional[pulumi.Input['EventSubscriptionDeliveryIdentityArgs']] = None, + delivery_properties: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionDeliveryPropertyArgs']]]] = None, + event_delivery_schema: Optional[pulumi.Input[str]] = None, + eventhub_endpoint_id: Optional[pulumi.Input[str]] = None, + expiration_time_utc: Optional[pulumi.Input[str]] = None, + hybrid_connection_endpoint_id: Optional[pulumi.Input[str]] = None, + included_event_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + retry_policy: Optional[pulumi.Input['EventSubscriptionRetryPolicyArgs']] = None, + scope: Optional[pulumi.Input[str]] = None, + service_bus_queue_endpoint_id: Optional[pulumi.Input[str]] = None, + service_bus_topic_endpoint_id: Optional[pulumi.Input[str]] = None, + storage_blob_dead_letter_destination: Optional[pulumi.Input['EventSubscriptionStorageBlobDeadLetterDestinationArgs']] = None, + storage_queue_endpoint: Optional[pulumi.Input['EventSubscriptionStorageQueueEndpointArgs']] = None, + subject_filter: Optional[pulumi.Input['EventSubscriptionSubjectFilterArgs']] = None, + webhook_endpoint: Optional[pulumi.Input['EventSubscriptionWebhookEndpointArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if advanced_filter is None and 'advancedFilter' in kwargs: + advanced_filter = kwargs['advancedFilter'] + if advanced_filtering_on_arrays_enabled is None and 'advancedFilteringOnArraysEnabled' in kwargs: + advanced_filtering_on_arrays_enabled = kwargs['advancedFilteringOnArraysEnabled'] + if azure_function_endpoint is None and 'azureFunctionEndpoint' in kwargs: + azure_function_endpoint = kwargs['azureFunctionEndpoint'] + if dead_letter_identity is None and 'deadLetterIdentity' in kwargs: + dead_letter_identity = kwargs['deadLetterIdentity'] + if delivery_identity is None and 'deliveryIdentity' in kwargs: + delivery_identity = kwargs['deliveryIdentity'] + if delivery_properties is None and 'deliveryProperties' in kwargs: + delivery_properties = kwargs['deliveryProperties'] + if event_delivery_schema is None and 'eventDeliverySchema' in kwargs: + event_delivery_schema = kwargs['eventDeliverySchema'] + if eventhub_endpoint_id is None and 'eventhubEndpointId' in kwargs: + eventhub_endpoint_id = kwargs['eventhubEndpointId'] + if expiration_time_utc is None and 'expirationTimeUtc' in kwargs: + expiration_time_utc = kwargs['expirationTimeUtc'] + if hybrid_connection_endpoint_id is None and 'hybridConnectionEndpointId' in kwargs: + hybrid_connection_endpoint_id = kwargs['hybridConnectionEndpointId'] + if included_event_types is None and 'includedEventTypes' in kwargs: + included_event_types = kwargs['includedEventTypes'] + if retry_policy is None and 'retryPolicy' in kwargs: + retry_policy = kwargs['retryPolicy'] + if service_bus_queue_endpoint_id is None and 'serviceBusQueueEndpointId' in kwargs: + service_bus_queue_endpoint_id = kwargs['serviceBusQueueEndpointId'] + if service_bus_topic_endpoint_id is None and 'serviceBusTopicEndpointId' in kwargs: + service_bus_topic_endpoint_id = kwargs['serviceBusTopicEndpointId'] + if storage_blob_dead_letter_destination is None and 'storageBlobDeadLetterDestination' in kwargs: + storage_blob_dead_letter_destination = kwargs['storageBlobDeadLetterDestination'] + if storage_queue_endpoint is None and 'storageQueueEndpoint' in kwargs: + storage_queue_endpoint = kwargs['storageQueueEndpoint'] + if subject_filter is None and 'subjectFilter' in kwargs: + subject_filter = kwargs['subjectFilter'] + if webhook_endpoint is None and 'webhookEndpoint' in kwargs: + webhook_endpoint = kwargs['webhookEndpoint'] + if advanced_filter is not None: - pulumi.set(__self__, "advanced_filter", advanced_filter) + _setter("advanced_filter", advanced_filter) if advanced_filtering_on_arrays_enabled is not None: - pulumi.set(__self__, "advanced_filtering_on_arrays_enabled", advanced_filtering_on_arrays_enabled) + _setter("advanced_filtering_on_arrays_enabled", advanced_filtering_on_arrays_enabled) if azure_function_endpoint is not None: - pulumi.set(__self__, "azure_function_endpoint", azure_function_endpoint) + _setter("azure_function_endpoint", azure_function_endpoint) if dead_letter_identity is not None: - pulumi.set(__self__, "dead_letter_identity", dead_letter_identity) + _setter("dead_letter_identity", dead_letter_identity) if delivery_identity is not None: - pulumi.set(__self__, "delivery_identity", delivery_identity) + _setter("delivery_identity", delivery_identity) if delivery_properties is not None: - pulumi.set(__self__, "delivery_properties", delivery_properties) + _setter("delivery_properties", delivery_properties) if event_delivery_schema is not None: - pulumi.set(__self__, "event_delivery_schema", event_delivery_schema) + _setter("event_delivery_schema", event_delivery_schema) if eventhub_endpoint_id is not None: - pulumi.set(__self__, "eventhub_endpoint_id", eventhub_endpoint_id) + _setter("eventhub_endpoint_id", eventhub_endpoint_id) if expiration_time_utc is not None: - pulumi.set(__self__, "expiration_time_utc", expiration_time_utc) + _setter("expiration_time_utc", expiration_time_utc) if hybrid_connection_endpoint_id is not None: - pulumi.set(__self__, "hybrid_connection_endpoint_id", hybrid_connection_endpoint_id) + _setter("hybrid_connection_endpoint_id", hybrid_connection_endpoint_id) if included_event_types is not None: - pulumi.set(__self__, "included_event_types", included_event_types) + _setter("included_event_types", included_event_types) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retry_policy is not None: - pulumi.set(__self__, "retry_policy", retry_policy) + _setter("retry_policy", retry_policy) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if service_bus_queue_endpoint_id is not None: - pulumi.set(__self__, "service_bus_queue_endpoint_id", service_bus_queue_endpoint_id) + _setter("service_bus_queue_endpoint_id", service_bus_queue_endpoint_id) if service_bus_topic_endpoint_id is not None: - pulumi.set(__self__, "service_bus_topic_endpoint_id", service_bus_topic_endpoint_id) + _setter("service_bus_topic_endpoint_id", service_bus_topic_endpoint_id) if storage_blob_dead_letter_destination is not None: - pulumi.set(__self__, "storage_blob_dead_letter_destination", storage_blob_dead_letter_destination) + _setter("storage_blob_dead_letter_destination", storage_blob_dead_letter_destination) if storage_queue_endpoint is not None: - pulumi.set(__self__, "storage_queue_endpoint", storage_queue_endpoint) + _setter("storage_queue_endpoint", storage_queue_endpoint) if subject_filter is not None: - pulumi.set(__self__, "subject_filter", subject_filter) + _setter("subject_filter", subject_filter) if webhook_endpoint is not None: - pulumi.set(__self__, "webhook_endpoint", webhook_endpoint) + _setter("webhook_endpoint", webhook_endpoint) @property @pulumi.getter(name="advancedFilter") @@ -857,6 +1033,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EventSubscriptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -892,10 +1072,30 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = EventSubscriptionArgs.__new__(EventSubscriptionArgs) + if advanced_filter is not None and not isinstance(advanced_filter, EventSubscriptionAdvancedFilterArgs): + advanced_filter = advanced_filter or {} + def _setter(key, value): + advanced_filter[key] = value + EventSubscriptionAdvancedFilterArgs._configure(_setter, **advanced_filter) __props__.__dict__["advanced_filter"] = advanced_filter __props__.__dict__["advanced_filtering_on_arrays_enabled"] = advanced_filtering_on_arrays_enabled + if azure_function_endpoint is not None and not isinstance(azure_function_endpoint, EventSubscriptionAzureFunctionEndpointArgs): + azure_function_endpoint = azure_function_endpoint or {} + def _setter(key, value): + azure_function_endpoint[key] = value + EventSubscriptionAzureFunctionEndpointArgs._configure(_setter, **azure_function_endpoint) __props__.__dict__["azure_function_endpoint"] = azure_function_endpoint + if dead_letter_identity is not None and not isinstance(dead_letter_identity, EventSubscriptionDeadLetterIdentityArgs): + dead_letter_identity = dead_letter_identity or {} + def _setter(key, value): + dead_letter_identity[key] = value + EventSubscriptionDeadLetterIdentityArgs._configure(_setter, **dead_letter_identity) __props__.__dict__["dead_letter_identity"] = dead_letter_identity + if delivery_identity is not None and not isinstance(delivery_identity, EventSubscriptionDeliveryIdentityArgs): + delivery_identity = delivery_identity or {} + def _setter(key, value): + delivery_identity[key] = value + EventSubscriptionDeliveryIdentityArgs._configure(_setter, **delivery_identity) __props__.__dict__["delivery_identity"] = delivery_identity __props__.__dict__["delivery_properties"] = delivery_properties __props__.__dict__["event_delivery_schema"] = event_delivery_schema @@ -905,15 +1105,40 @@ def _internal_init(__self__, __props__.__dict__["included_event_types"] = included_event_types __props__.__dict__["labels"] = labels __props__.__dict__["name"] = name + if retry_policy is not None and not isinstance(retry_policy, EventSubscriptionRetryPolicyArgs): + retry_policy = retry_policy or {} + def _setter(key, value): + retry_policy[key] = value + EventSubscriptionRetryPolicyArgs._configure(_setter, **retry_policy) __props__.__dict__["retry_policy"] = retry_policy if scope is None and not opts.urn: raise TypeError("Missing required property 'scope'") __props__.__dict__["scope"] = scope __props__.__dict__["service_bus_queue_endpoint_id"] = service_bus_queue_endpoint_id __props__.__dict__["service_bus_topic_endpoint_id"] = service_bus_topic_endpoint_id + if storage_blob_dead_letter_destination is not None and not isinstance(storage_blob_dead_letter_destination, EventSubscriptionStorageBlobDeadLetterDestinationArgs): + storage_blob_dead_letter_destination = storage_blob_dead_letter_destination or {} + def _setter(key, value): + storage_blob_dead_letter_destination[key] = value + EventSubscriptionStorageBlobDeadLetterDestinationArgs._configure(_setter, **storage_blob_dead_letter_destination) __props__.__dict__["storage_blob_dead_letter_destination"] = storage_blob_dead_letter_destination + if storage_queue_endpoint is not None and not isinstance(storage_queue_endpoint, EventSubscriptionStorageQueueEndpointArgs): + storage_queue_endpoint = storage_queue_endpoint or {} + def _setter(key, value): + storage_queue_endpoint[key] = value + EventSubscriptionStorageQueueEndpointArgs._configure(_setter, **storage_queue_endpoint) __props__.__dict__["storage_queue_endpoint"] = storage_queue_endpoint + if subject_filter is not None and not isinstance(subject_filter, EventSubscriptionSubjectFilterArgs): + subject_filter = subject_filter or {} + def _setter(key, value): + subject_filter[key] = value + EventSubscriptionSubjectFilterArgs._configure(_setter, **subject_filter) __props__.__dict__["subject_filter"] = subject_filter + if webhook_endpoint is not None and not isinstance(webhook_endpoint, EventSubscriptionWebhookEndpointArgs): + webhook_endpoint = webhook_endpoint or {} + def _setter(key, value): + webhook_endpoint[key] = value + EventSubscriptionWebhookEndpointArgs._configure(_setter, **webhook_endpoint) __props__.__dict__["webhook_endpoint"] = webhook_endpoint alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="azure:eventhub/eventSubscription:EventSubscription")]) opts = pulumi.ResourceOptions.merge(opts, alias_opts) diff --git a/sdk/python/pulumi_azure/eventgrid/get_domain.py b/sdk/python/pulumi_azure/eventgrid/get_domain.py index d01bcd5820..1487f08b75 100644 --- a/sdk/python/pulumi_azure/eventgrid/get_domain.py +++ b/sdk/python/pulumi_azure/eventgrid/get_domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/eventgrid/get_domain_topic.py b/sdk/python/pulumi_azure/eventgrid/get_domain_topic.py index c33f5ba7d6..d71c36ed04 100644 --- a/sdk/python/pulumi_azure/eventgrid/get_domain_topic.py +++ b/sdk/python/pulumi_azure/eventgrid/get_domain_topic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/eventgrid/get_system_topic.py b/sdk/python/pulumi_azure/eventgrid/get_system_topic.py index 6163f9db53..1d78b4dcee 100644 --- a/sdk/python/pulumi_azure/eventgrid/get_system_topic.py +++ b/sdk/python/pulumi_azure/eventgrid/get_system_topic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/eventgrid/get_topic.py b/sdk/python/pulumi_azure/eventgrid/get_topic.py index cbbf42e7fb..8431f2a504 100644 --- a/sdk/python/pulumi_azure/eventgrid/get_topic.py +++ b/sdk/python/pulumi_azure/eventgrid/get_topic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/eventgrid/outputs.py b/sdk/python/pulumi_azure/eventgrid/outputs.py index fec7a52a70..bc543531af 100644 --- a/sdk/python/pulumi_azure/eventgrid/outputs.py +++ b/sdk/python/pulumi_azure/eventgrid/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -123,13 +123,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + DomainIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -194,9 +219,26 @@ def __init__(__self__, *, :param str ip_mask: The IP mask (CIDR) to match on. :param str action: The action to take when the rule is matched. Possible values are `Allow`. """ - pulumi.set(__self__, "ip_mask", ip_mask) + DomainInboundIpRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[str] = None, + action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + + _setter("ip_mask", ip_mask) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipMask") @@ -245,12 +287,31 @@ def __init__(__self__, *, :param str event_type: Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param str subject: Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + DomainInputMappingDefaultValues._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_type=event_type, + subject=subject, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[str] = None, + event_type: Optional[str] = None, + subject: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) @property @pulumi.getter(name="dataVersion") @@ -315,18 +376,45 @@ def __init__(__self__, *, :param str subject: Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param str topic: Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + DomainInputMappingFields._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_time=event_time, + event_type=event_type, + id=id, + subject=subject, + topic=topic, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[str] = None, + event_time: Optional[str] = None, + event_type: Optional[str] = None, + id: Optional[str] = None, + subject: Optional[str] = None, + topic: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_time is None and 'eventTime' in kwargs: + event_time = kwargs['eventTime'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_time is not None: - pulumi.set(__self__, "event_time", event_time) + _setter("event_time", event_time) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if topic is not None: - pulumi.set(__self__, "topic", topic) + _setter("topic", topic) @property @pulumi.getter(name="dataVersion") @@ -475,44 +563,129 @@ def __init__(__self__, *, :param Sequence['EventSubscriptionAdvancedFilterStringNotEndsWithArgs'] string_not_ends_withs: Compares a value of an event using multiple string values. :param Sequence['EventSubscriptionAdvancedFilterStringNotInArgs'] string_not_ins: Compares a value of an event using multiple string values. """ + EventSubscriptionAdvancedFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + bool_equals=bool_equals, + is_not_nulls=is_not_nulls, + is_null_or_undefineds=is_null_or_undefineds, + number_greater_than_or_equals=number_greater_than_or_equals, + number_greater_thans=number_greater_thans, + number_in_ranges=number_in_ranges, + number_ins=number_ins, + number_less_than_or_equals=number_less_than_or_equals, + number_less_thans=number_less_thans, + number_not_in_ranges=number_not_in_ranges, + number_not_ins=number_not_ins, + string_begins_withs=string_begins_withs, + string_contains=string_contains, + string_ends_withs=string_ends_withs, + string_ins=string_ins, + string_not_begins_withs=string_not_begins_withs, + string_not_contains=string_not_contains, + string_not_ends_withs=string_not_ends_withs, + string_not_ins=string_not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bool_equals: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterBoolEqual']] = None, + is_not_nulls: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterIsNotNull']] = None, + is_null_or_undefineds: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterIsNullOrUndefined']] = None, + number_greater_than_or_equals: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberGreaterThanOrEqual']] = None, + number_greater_thans: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberGreaterThan']] = None, + number_in_ranges: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberInRange']] = None, + number_ins: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberIn']] = None, + number_less_than_or_equals: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberLessThanOrEqual']] = None, + number_less_thans: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberLessThan']] = None, + number_not_in_ranges: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberNotInRange']] = None, + number_not_ins: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberNotIn']] = None, + string_begins_withs: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringBeginsWith']] = None, + string_contains: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringContain']] = None, + string_ends_withs: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringEndsWith']] = None, + string_ins: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringIn']] = None, + string_not_begins_withs: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringNotBeginsWith']] = None, + string_not_contains: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringNotContain']] = None, + string_not_ends_withs: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringNotEndsWith']] = None, + string_not_ins: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringNotIn']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bool_equals is None and 'boolEquals' in kwargs: + bool_equals = kwargs['boolEquals'] + if is_not_nulls is None and 'isNotNulls' in kwargs: + is_not_nulls = kwargs['isNotNulls'] + if is_null_or_undefineds is None and 'isNullOrUndefineds' in kwargs: + is_null_or_undefineds = kwargs['isNullOrUndefineds'] + if number_greater_than_or_equals is None and 'numberGreaterThanOrEquals' in kwargs: + number_greater_than_or_equals = kwargs['numberGreaterThanOrEquals'] + if number_greater_thans is None and 'numberGreaterThans' in kwargs: + number_greater_thans = kwargs['numberGreaterThans'] + if number_in_ranges is None and 'numberInRanges' in kwargs: + number_in_ranges = kwargs['numberInRanges'] + if number_ins is None and 'numberIns' in kwargs: + number_ins = kwargs['numberIns'] + if number_less_than_or_equals is None and 'numberLessThanOrEquals' in kwargs: + number_less_than_or_equals = kwargs['numberLessThanOrEquals'] + if number_less_thans is None and 'numberLessThans' in kwargs: + number_less_thans = kwargs['numberLessThans'] + if number_not_in_ranges is None and 'numberNotInRanges' in kwargs: + number_not_in_ranges = kwargs['numberNotInRanges'] + if number_not_ins is None and 'numberNotIns' in kwargs: + number_not_ins = kwargs['numberNotIns'] + if string_begins_withs is None and 'stringBeginsWiths' in kwargs: + string_begins_withs = kwargs['stringBeginsWiths'] + if string_contains is None and 'stringContains' in kwargs: + string_contains = kwargs['stringContains'] + if string_ends_withs is None and 'stringEndsWiths' in kwargs: + string_ends_withs = kwargs['stringEndsWiths'] + if string_ins is None and 'stringIns' in kwargs: + string_ins = kwargs['stringIns'] + if string_not_begins_withs is None and 'stringNotBeginsWiths' in kwargs: + string_not_begins_withs = kwargs['stringNotBeginsWiths'] + if string_not_contains is None and 'stringNotContains' in kwargs: + string_not_contains = kwargs['stringNotContains'] + if string_not_ends_withs is None and 'stringNotEndsWiths' in kwargs: + string_not_ends_withs = kwargs['stringNotEndsWiths'] + if string_not_ins is None and 'stringNotIns' in kwargs: + string_not_ins = kwargs['stringNotIns'] + if bool_equals is not None: - pulumi.set(__self__, "bool_equals", bool_equals) + _setter("bool_equals", bool_equals) if is_not_nulls is not None: - pulumi.set(__self__, "is_not_nulls", is_not_nulls) + _setter("is_not_nulls", is_not_nulls) if is_null_or_undefineds is not None: - pulumi.set(__self__, "is_null_or_undefineds", is_null_or_undefineds) + _setter("is_null_or_undefineds", is_null_or_undefineds) if number_greater_than_or_equals is not None: - pulumi.set(__self__, "number_greater_than_or_equals", number_greater_than_or_equals) + _setter("number_greater_than_or_equals", number_greater_than_or_equals) if number_greater_thans is not None: - pulumi.set(__self__, "number_greater_thans", number_greater_thans) + _setter("number_greater_thans", number_greater_thans) if number_in_ranges is not None: - pulumi.set(__self__, "number_in_ranges", number_in_ranges) + _setter("number_in_ranges", number_in_ranges) if number_ins is not None: - pulumi.set(__self__, "number_ins", number_ins) + _setter("number_ins", number_ins) if number_less_than_or_equals is not None: - pulumi.set(__self__, "number_less_than_or_equals", number_less_than_or_equals) + _setter("number_less_than_or_equals", number_less_than_or_equals) if number_less_thans is not None: - pulumi.set(__self__, "number_less_thans", number_less_thans) + _setter("number_less_thans", number_less_thans) if number_not_in_ranges is not None: - pulumi.set(__self__, "number_not_in_ranges", number_not_in_ranges) + _setter("number_not_in_ranges", number_not_in_ranges) if number_not_ins is not None: - pulumi.set(__self__, "number_not_ins", number_not_ins) + _setter("number_not_ins", number_not_ins) if string_begins_withs is not None: - pulumi.set(__self__, "string_begins_withs", string_begins_withs) + _setter("string_begins_withs", string_begins_withs) if string_contains is not None: - pulumi.set(__self__, "string_contains", string_contains) + _setter("string_contains", string_contains) if string_ends_withs is not None: - pulumi.set(__self__, "string_ends_withs", string_ends_withs) + _setter("string_ends_withs", string_ends_withs) if string_ins is not None: - pulumi.set(__self__, "string_ins", string_ins) + _setter("string_ins", string_ins) if string_not_begins_withs is not None: - pulumi.set(__self__, "string_not_begins_withs", string_not_begins_withs) + _setter("string_not_begins_withs", string_not_begins_withs) if string_not_contains is not None: - pulumi.set(__self__, "string_not_contains", string_not_contains) + _setter("string_not_contains", string_not_contains) if string_not_ends_withs is not None: - pulumi.set(__self__, "string_not_ends_withs", string_not_ends_withs) + _setter("string_not_ends_withs", string_not_ends_withs) if string_not_ins is not None: - pulumi.set(__self__, "string_not_ins", string_not_ins) + _setter("string_not_ins", string_not_ins) @property @pulumi.getter(name="boolEquals") @@ -680,8 +853,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterBoolEqual._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -709,7 +899,20 @@ def __init__(__self__, *, """ :param str key: Specifies the field within the event data that you want to use for filtering. Type of the field can be a number, boolean, or string. """ - pulumi.set(__self__, "key", key) + EventSubscriptionAdvancedFilterIsNotNull._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) @property @pulumi.getter @@ -727,7 +930,20 @@ def __init__(__self__, *, """ :param str key: Specifies the field within the event data that you want to use for filtering. Type of the field can be a number, boolean, or string. """ - pulumi.set(__self__, "key", key) + EventSubscriptionAdvancedFilterIsNullOrUndefined._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) @property @pulumi.getter @@ -749,8 +965,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberGreaterThan._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -782,8 +1015,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberGreaterThanOrEqual._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -815,8 +1065,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -848,8 +1115,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberInRange._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[Sequence[float]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -881,8 +1165,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberLessThan._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -914,8 +1215,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberLessThanOrEqual._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -947,8 +1265,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberNotIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -980,8 +1315,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberNotInRange._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[Sequence[float]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1013,8 +1365,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringBeginsWith._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1046,8 +1415,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringContain._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1079,8 +1465,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringEndsWith._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1112,8 +1515,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1145,8 +1565,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotBeginsWith._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1178,8 +1615,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotContain._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1211,8 +1665,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotEndsWith._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1244,8 +1715,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1298,11 +1786,34 @@ def __init__(__self__, *, :param int max_events_per_batch: Maximum number of events per batch. :param int preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. """ - pulumi.set(__self__, "function_id", function_id) + EventSubscriptionAzureFunctionEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_id=function_id, + max_events_per_batch=max_events_per_batch, + preferred_batch_size_in_kilobytes=preferred_batch_size_in_kilobytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_id: Optional[str] = None, + max_events_per_batch: Optional[int] = None, + preferred_batch_size_in_kilobytes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_id is None and 'functionId' in kwargs: + function_id = kwargs['functionId'] + if function_id is None: + raise TypeError("Missing 'function_id' argument") + if max_events_per_batch is None and 'maxEventsPerBatch' in kwargs: + max_events_per_batch = kwargs['maxEventsPerBatch'] + if preferred_batch_size_in_kilobytes is None and 'preferredBatchSizeInKilobytes' in kwargs: + preferred_batch_size_in_kilobytes = kwargs['preferredBatchSizeInKilobytes'] + + _setter("function_id", function_id) if max_events_per_batch is not None: - pulumi.set(__self__, "max_events_per_batch", max_events_per_batch) + _setter("max_events_per_batch", max_events_per_batch) if preferred_batch_size_in_kilobytes is not None: - pulumi.set(__self__, "preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) + _setter("preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) @property @pulumi.getter(name="functionId") @@ -1355,9 +1866,26 @@ def __init__(__self__, *, :param str type: Specifies the type of Managed Service Identity that is used for dead lettering. Allowed value is `SystemAssigned`, `UserAssigned`. :param str user_assigned_identity: The user identity associated with the resource. """ - pulumi.set(__self__, "type", type) + EventSubscriptionDeadLetterIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + user_assigned_identity=user_assigned_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + user_assigned_identity: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if user_assigned_identity is None and 'userAssignedIdentity' in kwargs: + user_assigned_identity = kwargs['userAssignedIdentity'] + + _setter("type", type) if user_assigned_identity is not None: - pulumi.set(__self__, "user_assigned_identity", user_assigned_identity) + _setter("user_assigned_identity", user_assigned_identity) @property @pulumi.getter @@ -1402,9 +1930,26 @@ def __init__(__self__, *, :param str type: Specifies the type of Managed Service Identity that is used for event delivery. Allowed value is `SystemAssigned`, `UserAssigned`. :param str user_assigned_identity: The user identity associated with the resource. """ - pulumi.set(__self__, "type", type) + EventSubscriptionDeliveryIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + user_assigned_identity=user_assigned_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + user_assigned_identity: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if user_assigned_identity is None and 'userAssignedIdentity' in kwargs: + user_assigned_identity = kwargs['userAssignedIdentity'] + + _setter("type", type) if user_assigned_identity is not None: - pulumi.set(__self__, "user_assigned_identity", user_assigned_identity) + _setter("user_assigned_identity", user_assigned_identity) @property @pulumi.getter @@ -1457,14 +2002,41 @@ def __init__(__self__, *, :param str source_field: If the `type` is `Dynamic`, then provide the payload field to be used as the value. Valid source fields differ by subscription type. :param str value: If the `type` is `Static`, then provide the value to use """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "type", type) + EventSubscriptionDeliveryProperty._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + type=type, + secret=secret, + source_field=source_field, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[str] = None, + type: Optional[str] = None, + secret: Optional[bool] = None, + source_field: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if source_field is None and 'sourceField' in kwargs: + source_field = kwargs['sourceField'] + + _setter("header_name", header_name) + _setter("type", type) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if source_field is not None: - pulumi.set(__self__, "source_field", source_field) + _setter("source_field", source_field) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerName") @@ -1535,8 +2107,29 @@ def __init__(__self__, *, :param int event_time_to_live: Specifies the time to live (in minutes) for events. Supported range is `1` to `1440`. See [official documentation](https://docs.microsoft.com/azure/event-grid/manage-event-delivery#set-retry-policy) for more details. :param int max_delivery_attempts: Specifies the maximum number of delivery retry attempts for events. """ - pulumi.set(__self__, "event_time_to_live", event_time_to_live) - pulumi.set(__self__, "max_delivery_attempts", max_delivery_attempts) + EventSubscriptionRetryPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_time_to_live=event_time_to_live, + max_delivery_attempts=max_delivery_attempts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_time_to_live: Optional[int] = None, + max_delivery_attempts: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_time_to_live is None and 'eventTimeToLive' in kwargs: + event_time_to_live = kwargs['eventTimeToLive'] + if event_time_to_live is None: + raise TypeError("Missing 'event_time_to_live' argument") + if max_delivery_attempts is None and 'maxDeliveryAttempts' in kwargs: + max_delivery_attempts = kwargs['maxDeliveryAttempts'] + if max_delivery_attempts is None: + raise TypeError("Missing 'max_delivery_attempts' argument") + + _setter("event_time_to_live", event_time_to_live) + _setter("max_delivery_attempts", max_delivery_attempts) @property @pulumi.getter(name="eventTimeToLive") @@ -1583,8 +2176,29 @@ def __init__(__self__, *, :param str storage_account_id: Specifies the id of the storage account id where the storage blob is located. :param str storage_blob_container_name: Specifies the name of the Storage blob container that is the destination of the deadletter events. """ - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "storage_blob_container_name", storage_blob_container_name) + EventSubscriptionStorageBlobDeadLetterDestination._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_id=storage_account_id, + storage_blob_container_name=storage_blob_container_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_id: Optional[str] = None, + storage_blob_container_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if storage_blob_container_name is None and 'storageBlobContainerName' in kwargs: + storage_blob_container_name = kwargs['storageBlobContainerName'] + if storage_blob_container_name is None: + raise TypeError("Missing 'storage_blob_container_name' argument") + + _setter("storage_account_id", storage_account_id) + _setter("storage_blob_container_name", storage_blob_container_name) @property @pulumi.getter(name="storageAccountId") @@ -1635,10 +2249,35 @@ def __init__(__self__, *, :param str storage_account_id: Specifies the id of the storage account id where the storage queue is located. :param int queue_message_time_to_live_in_seconds: Storage queue message time to live in seconds. """ - pulumi.set(__self__, "queue_name", queue_name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + EventSubscriptionStorageQueueEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + queue_name=queue_name, + storage_account_id=storage_account_id, + queue_message_time_to_live_in_seconds=queue_message_time_to_live_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + queue_name: Optional[str] = None, + storage_account_id: Optional[str] = None, + queue_message_time_to_live_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if queue_name is None and 'queueName' in kwargs: + queue_name = kwargs['queueName'] + if queue_name is None: + raise TypeError("Missing 'queue_name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if queue_message_time_to_live_in_seconds is None and 'queueMessageTimeToLiveInSeconds' in kwargs: + queue_message_time_to_live_in_seconds = kwargs['queueMessageTimeToLiveInSeconds'] + + _setter("queue_name", queue_name) + _setter("storage_account_id", storage_account_id) if queue_message_time_to_live_in_seconds is not None: - pulumi.set(__self__, "queue_message_time_to_live_in_seconds", queue_message_time_to_live_in_seconds) + _setter("queue_message_time_to_live_in_seconds", queue_message_time_to_live_in_seconds) @property @pulumi.getter(name="queueName") @@ -1697,12 +2336,33 @@ def __init__(__self__, *, :param str subject_begins_with: A string to filter events for an event subscription based on a resource path prefix. :param str subject_ends_with: A string to filter events for an event subscription based on a resource path suffix. """ + EventSubscriptionSubjectFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + case_sensitive=case_sensitive, + subject_begins_with=subject_begins_with, + subject_ends_with=subject_ends_with, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + case_sensitive: Optional[bool] = None, + subject_begins_with: Optional[str] = None, + subject_ends_with: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if case_sensitive is None and 'caseSensitive' in kwargs: + case_sensitive = kwargs['caseSensitive'] + if subject_begins_with is None and 'subjectBeginsWith' in kwargs: + subject_begins_with = kwargs['subjectBeginsWith'] + if subject_ends_with is None and 'subjectEndsWith' in kwargs: + subject_ends_with = kwargs['subjectEndsWith'] + if case_sensitive is not None: - pulumi.set(__self__, "case_sensitive", case_sensitive) + _setter("case_sensitive", case_sensitive) if subject_begins_with is not None: - pulumi.set(__self__, "subject_begins_with", subject_begins_with) + _setter("subject_begins_with", subject_begins_with) if subject_ends_with is not None: - pulumi.set(__self__, "subject_ends_with", subject_ends_with) + _setter("subject_ends_with", subject_ends_with) @property @pulumi.getter(name="caseSensitive") @@ -1771,17 +2431,50 @@ def __init__(__self__, *, :param int max_events_per_batch: Maximum number of events per batch. :param int preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. """ - pulumi.set(__self__, "url", url) + EventSubscriptionWebhookEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + active_directory_app_id_or_uri=active_directory_app_id_or_uri, + active_directory_tenant_id=active_directory_tenant_id, + base_url=base_url, + max_events_per_batch=max_events_per_batch, + preferred_batch_size_in_kilobytes=preferred_batch_size_in_kilobytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[str] = None, + active_directory_app_id_or_uri: Optional[str] = None, + active_directory_tenant_id: Optional[str] = None, + base_url: Optional[str] = None, + max_events_per_batch: Optional[int] = None, + preferred_batch_size_in_kilobytes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + if active_directory_app_id_or_uri is None and 'activeDirectoryAppIdOrUri' in kwargs: + active_directory_app_id_or_uri = kwargs['activeDirectoryAppIdOrUri'] + if active_directory_tenant_id is None and 'activeDirectoryTenantId' in kwargs: + active_directory_tenant_id = kwargs['activeDirectoryTenantId'] + if base_url is None and 'baseUrl' in kwargs: + base_url = kwargs['baseUrl'] + if max_events_per_batch is None and 'maxEventsPerBatch' in kwargs: + max_events_per_batch = kwargs['maxEventsPerBatch'] + if preferred_batch_size_in_kilobytes is None and 'preferredBatchSizeInKilobytes' in kwargs: + preferred_batch_size_in_kilobytes = kwargs['preferredBatchSizeInKilobytes'] + + _setter("url", url) if active_directory_app_id_or_uri is not None: - pulumi.set(__self__, "active_directory_app_id_or_uri", active_directory_app_id_or_uri) + _setter("active_directory_app_id_or_uri", active_directory_app_id_or_uri) if active_directory_tenant_id is not None: - pulumi.set(__self__, "active_directory_tenant_id", active_directory_tenant_id) + _setter("active_directory_tenant_id", active_directory_tenant_id) if base_url is not None: - pulumi.set(__self__, "base_url", base_url) + _setter("base_url", base_url) if max_events_per_batch is not None: - pulumi.set(__self__, "max_events_per_batch", max_events_per_batch) + _setter("max_events_per_batch", max_events_per_batch) if preferred_batch_size_in_kilobytes is not None: - pulumi.set(__self__, "preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) + _setter("preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) @property @pulumi.getter @@ -1930,44 +2623,129 @@ def __init__(__self__, *, :param Sequence['SystemTopicEventSubscriptionAdvancedFilterStringNotEndsWithArgs'] string_not_ends_withs: Compares a value of an event using multiple string values. :param Sequence['SystemTopicEventSubscriptionAdvancedFilterStringNotInArgs'] string_not_ins: Compares a value of an event using multiple string values. """ + SystemTopicEventSubscriptionAdvancedFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + bool_equals=bool_equals, + is_not_nulls=is_not_nulls, + is_null_or_undefineds=is_null_or_undefineds, + number_greater_than_or_equals=number_greater_than_or_equals, + number_greater_thans=number_greater_thans, + number_in_ranges=number_in_ranges, + number_ins=number_ins, + number_less_than_or_equals=number_less_than_or_equals, + number_less_thans=number_less_thans, + number_not_in_ranges=number_not_in_ranges, + number_not_ins=number_not_ins, + string_begins_withs=string_begins_withs, + string_contains=string_contains, + string_ends_withs=string_ends_withs, + string_ins=string_ins, + string_not_begins_withs=string_not_begins_withs, + string_not_contains=string_not_contains, + string_not_ends_withs=string_not_ends_withs, + string_not_ins=string_not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bool_equals: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterBoolEqual']] = None, + is_not_nulls: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterIsNotNull']] = None, + is_null_or_undefineds: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterIsNullOrUndefined']] = None, + number_greater_than_or_equals: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterNumberGreaterThanOrEqual']] = None, + number_greater_thans: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterNumberGreaterThan']] = None, + number_in_ranges: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterNumberInRange']] = None, + number_ins: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterNumberIn']] = None, + number_less_than_or_equals: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterNumberLessThanOrEqual']] = None, + number_less_thans: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterNumberLessThan']] = None, + number_not_in_ranges: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterNumberNotInRange']] = None, + number_not_ins: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterNumberNotIn']] = None, + string_begins_withs: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterStringBeginsWith']] = None, + string_contains: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterStringContain']] = None, + string_ends_withs: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterStringEndsWith']] = None, + string_ins: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterStringIn']] = None, + string_not_begins_withs: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterStringNotBeginsWith']] = None, + string_not_contains: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterStringNotContain']] = None, + string_not_ends_withs: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterStringNotEndsWith']] = None, + string_not_ins: Optional[Sequence['outputs.SystemTopicEventSubscriptionAdvancedFilterStringNotIn']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bool_equals is None and 'boolEquals' in kwargs: + bool_equals = kwargs['boolEquals'] + if is_not_nulls is None and 'isNotNulls' in kwargs: + is_not_nulls = kwargs['isNotNulls'] + if is_null_or_undefineds is None and 'isNullOrUndefineds' in kwargs: + is_null_or_undefineds = kwargs['isNullOrUndefineds'] + if number_greater_than_or_equals is None and 'numberGreaterThanOrEquals' in kwargs: + number_greater_than_or_equals = kwargs['numberGreaterThanOrEquals'] + if number_greater_thans is None and 'numberGreaterThans' in kwargs: + number_greater_thans = kwargs['numberGreaterThans'] + if number_in_ranges is None and 'numberInRanges' in kwargs: + number_in_ranges = kwargs['numberInRanges'] + if number_ins is None and 'numberIns' in kwargs: + number_ins = kwargs['numberIns'] + if number_less_than_or_equals is None and 'numberLessThanOrEquals' in kwargs: + number_less_than_or_equals = kwargs['numberLessThanOrEquals'] + if number_less_thans is None and 'numberLessThans' in kwargs: + number_less_thans = kwargs['numberLessThans'] + if number_not_in_ranges is None and 'numberNotInRanges' in kwargs: + number_not_in_ranges = kwargs['numberNotInRanges'] + if number_not_ins is None and 'numberNotIns' in kwargs: + number_not_ins = kwargs['numberNotIns'] + if string_begins_withs is None and 'stringBeginsWiths' in kwargs: + string_begins_withs = kwargs['stringBeginsWiths'] + if string_contains is None and 'stringContains' in kwargs: + string_contains = kwargs['stringContains'] + if string_ends_withs is None and 'stringEndsWiths' in kwargs: + string_ends_withs = kwargs['stringEndsWiths'] + if string_ins is None and 'stringIns' in kwargs: + string_ins = kwargs['stringIns'] + if string_not_begins_withs is None and 'stringNotBeginsWiths' in kwargs: + string_not_begins_withs = kwargs['stringNotBeginsWiths'] + if string_not_contains is None and 'stringNotContains' in kwargs: + string_not_contains = kwargs['stringNotContains'] + if string_not_ends_withs is None and 'stringNotEndsWiths' in kwargs: + string_not_ends_withs = kwargs['stringNotEndsWiths'] + if string_not_ins is None and 'stringNotIns' in kwargs: + string_not_ins = kwargs['stringNotIns'] + if bool_equals is not None: - pulumi.set(__self__, "bool_equals", bool_equals) + _setter("bool_equals", bool_equals) if is_not_nulls is not None: - pulumi.set(__self__, "is_not_nulls", is_not_nulls) + _setter("is_not_nulls", is_not_nulls) if is_null_or_undefineds is not None: - pulumi.set(__self__, "is_null_or_undefineds", is_null_or_undefineds) + _setter("is_null_or_undefineds", is_null_or_undefineds) if number_greater_than_or_equals is not None: - pulumi.set(__self__, "number_greater_than_or_equals", number_greater_than_or_equals) + _setter("number_greater_than_or_equals", number_greater_than_or_equals) if number_greater_thans is not None: - pulumi.set(__self__, "number_greater_thans", number_greater_thans) + _setter("number_greater_thans", number_greater_thans) if number_in_ranges is not None: - pulumi.set(__self__, "number_in_ranges", number_in_ranges) + _setter("number_in_ranges", number_in_ranges) if number_ins is not None: - pulumi.set(__self__, "number_ins", number_ins) + _setter("number_ins", number_ins) if number_less_than_or_equals is not None: - pulumi.set(__self__, "number_less_than_or_equals", number_less_than_or_equals) + _setter("number_less_than_or_equals", number_less_than_or_equals) if number_less_thans is not None: - pulumi.set(__self__, "number_less_thans", number_less_thans) + _setter("number_less_thans", number_less_thans) if number_not_in_ranges is not None: - pulumi.set(__self__, "number_not_in_ranges", number_not_in_ranges) + _setter("number_not_in_ranges", number_not_in_ranges) if number_not_ins is not None: - pulumi.set(__self__, "number_not_ins", number_not_ins) + _setter("number_not_ins", number_not_ins) if string_begins_withs is not None: - pulumi.set(__self__, "string_begins_withs", string_begins_withs) + _setter("string_begins_withs", string_begins_withs) if string_contains is not None: - pulumi.set(__self__, "string_contains", string_contains) + _setter("string_contains", string_contains) if string_ends_withs is not None: - pulumi.set(__self__, "string_ends_withs", string_ends_withs) + _setter("string_ends_withs", string_ends_withs) if string_ins is not None: - pulumi.set(__self__, "string_ins", string_ins) + _setter("string_ins", string_ins) if string_not_begins_withs is not None: - pulumi.set(__self__, "string_not_begins_withs", string_not_begins_withs) + _setter("string_not_begins_withs", string_not_begins_withs) if string_not_contains is not None: - pulumi.set(__self__, "string_not_contains", string_not_contains) + _setter("string_not_contains", string_not_contains) if string_not_ends_withs is not None: - pulumi.set(__self__, "string_not_ends_withs", string_not_ends_withs) + _setter("string_not_ends_withs", string_not_ends_withs) if string_not_ins is not None: - pulumi.set(__self__, "string_not_ins", string_not_ins) + _setter("string_not_ins", string_not_ins) @property @pulumi.getter(name="boolEquals") @@ -2135,8 +2913,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + SystemTopicEventSubscriptionAdvancedFilterBoolEqual._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -2164,7 +2959,20 @@ def __init__(__self__, *, """ :param str key: Specifies the field within the event data that you want to use for filtering. Type of the field can be a number, boolean, or string. """ - pulumi.set(__self__, "key", key) + SystemTopicEventSubscriptionAdvancedFilterIsNotNull._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) @property @pulumi.getter @@ -2182,7 +2990,20 @@ def __init__(__self__, *, """ :param str key: Specifies the field within the event data that you want to use for filtering. Type of the field can be a number, boolean, or string. """ - pulumi.set(__self__, "key", key) + SystemTopicEventSubscriptionAdvancedFilterIsNullOrUndefined._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) @property @pulumi.getter @@ -2204,8 +3025,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + SystemTopicEventSubscriptionAdvancedFilterNumberGreaterThan._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -2237,8 +3075,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + SystemTopicEventSubscriptionAdvancedFilterNumberGreaterThanOrEqual._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -2270,8 +3125,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterNumberIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2303,8 +3175,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterNumberInRange._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[Sequence[float]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2336,8 +3225,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + SystemTopicEventSubscriptionAdvancedFilterNumberLessThan._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -2369,8 +3275,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + SystemTopicEventSubscriptionAdvancedFilterNumberLessThanOrEqual._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -2402,8 +3325,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterNumberNotIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2435,8 +3375,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterNumberNotInRange._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[Sequence[float]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2468,8 +3425,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringBeginsWith._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2501,8 +3475,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringContain._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2534,8 +3525,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringEndsWith._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2567,8 +3575,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2600,8 +3625,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringNotBeginsWith._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2633,8 +3675,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringNotContain._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2666,8 +3725,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringNotEndsWith._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2699,8 +3775,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + SystemTopicEventSubscriptionAdvancedFilterStringNotIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2753,11 +3846,34 @@ def __init__(__self__, *, :param int max_events_per_batch: Maximum number of events per batch. :param int preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. """ - pulumi.set(__self__, "function_id", function_id) + SystemTopicEventSubscriptionAzureFunctionEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_id=function_id, + max_events_per_batch=max_events_per_batch, + preferred_batch_size_in_kilobytes=preferred_batch_size_in_kilobytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_id: Optional[str] = None, + max_events_per_batch: Optional[int] = None, + preferred_batch_size_in_kilobytes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_id is None and 'functionId' in kwargs: + function_id = kwargs['functionId'] + if function_id is None: + raise TypeError("Missing 'function_id' argument") + if max_events_per_batch is None and 'maxEventsPerBatch' in kwargs: + max_events_per_batch = kwargs['maxEventsPerBatch'] + if preferred_batch_size_in_kilobytes is None and 'preferredBatchSizeInKilobytes' in kwargs: + preferred_batch_size_in_kilobytes = kwargs['preferredBatchSizeInKilobytes'] + + _setter("function_id", function_id) if max_events_per_batch is not None: - pulumi.set(__self__, "max_events_per_batch", max_events_per_batch) + _setter("max_events_per_batch", max_events_per_batch) if preferred_batch_size_in_kilobytes is not None: - pulumi.set(__self__, "preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) + _setter("preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) @property @pulumi.getter(name="functionId") @@ -2810,9 +3926,26 @@ def __init__(__self__, *, :param str type: Specifies the type of Managed Service Identity that is used for dead lettering. Allowed value is `SystemAssigned`, `UserAssigned`. :param str user_assigned_identity: The user identity associated with the resource. """ - pulumi.set(__self__, "type", type) + SystemTopicEventSubscriptionDeadLetterIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + user_assigned_identity=user_assigned_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + user_assigned_identity: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if user_assigned_identity is None and 'userAssignedIdentity' in kwargs: + user_assigned_identity = kwargs['userAssignedIdentity'] + + _setter("type", type) if user_assigned_identity is not None: - pulumi.set(__self__, "user_assigned_identity", user_assigned_identity) + _setter("user_assigned_identity", user_assigned_identity) @property @pulumi.getter @@ -2857,9 +3990,26 @@ def __init__(__self__, *, :param str type: Specifies the type of Managed Service Identity that is used for event delivery. Allowed value is `SystemAssigned`, `UserAssigned`. :param str user_assigned_identity: The user identity associated with the resource. """ - pulumi.set(__self__, "type", type) + SystemTopicEventSubscriptionDeliveryIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + user_assigned_identity=user_assigned_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + user_assigned_identity: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if user_assigned_identity is None and 'userAssignedIdentity' in kwargs: + user_assigned_identity = kwargs['userAssignedIdentity'] + + _setter("type", type) if user_assigned_identity is not None: - pulumi.set(__self__, "user_assigned_identity", user_assigned_identity) + _setter("user_assigned_identity", user_assigned_identity) @property @pulumi.getter @@ -2912,14 +4062,41 @@ def __init__(__self__, *, :param str source_field: If the `type` is `Dynamic`, then provide the payload field to be used as the value. Valid source fields differ by subscription type. :param str value: If the `type` is `Static`, then provide the value to use. """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "type", type) + SystemTopicEventSubscriptionDeliveryProperty._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + type=type, + secret=secret, + source_field=source_field, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[str] = None, + type: Optional[str] = None, + secret: Optional[bool] = None, + source_field: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if source_field is None and 'sourceField' in kwargs: + source_field = kwargs['sourceField'] + + _setter("header_name", header_name) + _setter("type", type) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if source_field is not None: - pulumi.set(__self__, "source_field", source_field) + _setter("source_field", source_field) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerName") @@ -2990,8 +4167,29 @@ def __init__(__self__, *, :param int event_time_to_live: Specifies the time to live (in minutes) for events. Supported range is `1` to `1440`. See [official documentation](https://docs.microsoft.com/azure/event-grid/manage-event-delivery#set-retry-policy) for more details. :param int max_delivery_attempts: Specifies the maximum number of delivery retry attempts for events. """ - pulumi.set(__self__, "event_time_to_live", event_time_to_live) - pulumi.set(__self__, "max_delivery_attempts", max_delivery_attempts) + SystemTopicEventSubscriptionRetryPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_time_to_live=event_time_to_live, + max_delivery_attempts=max_delivery_attempts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_time_to_live: Optional[int] = None, + max_delivery_attempts: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_time_to_live is None and 'eventTimeToLive' in kwargs: + event_time_to_live = kwargs['eventTimeToLive'] + if event_time_to_live is None: + raise TypeError("Missing 'event_time_to_live' argument") + if max_delivery_attempts is None and 'maxDeliveryAttempts' in kwargs: + max_delivery_attempts = kwargs['maxDeliveryAttempts'] + if max_delivery_attempts is None: + raise TypeError("Missing 'max_delivery_attempts' argument") + + _setter("event_time_to_live", event_time_to_live) + _setter("max_delivery_attempts", max_delivery_attempts) @property @pulumi.getter(name="eventTimeToLive") @@ -3038,8 +4236,29 @@ def __init__(__self__, *, :param str storage_account_id: Specifies the id of the storage account id where the storage blob is located. :param str storage_blob_container_name: Specifies the name of the Storage blob container that is the destination of the deadletter events. """ - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "storage_blob_container_name", storage_blob_container_name) + SystemTopicEventSubscriptionStorageBlobDeadLetterDestination._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_id=storage_account_id, + storage_blob_container_name=storage_blob_container_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_id: Optional[str] = None, + storage_blob_container_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if storage_blob_container_name is None and 'storageBlobContainerName' in kwargs: + storage_blob_container_name = kwargs['storageBlobContainerName'] + if storage_blob_container_name is None: + raise TypeError("Missing 'storage_blob_container_name' argument") + + _setter("storage_account_id", storage_account_id) + _setter("storage_blob_container_name", storage_blob_container_name) @property @pulumi.getter(name="storageAccountId") @@ -3090,10 +4309,35 @@ def __init__(__self__, *, :param str storage_account_id: Specifies the id of the storage account id where the storage queue is located. :param int queue_message_time_to_live_in_seconds: Storage queue message time to live in seconds. """ - pulumi.set(__self__, "queue_name", queue_name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + SystemTopicEventSubscriptionStorageQueueEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + queue_name=queue_name, + storage_account_id=storage_account_id, + queue_message_time_to_live_in_seconds=queue_message_time_to_live_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + queue_name: Optional[str] = None, + storage_account_id: Optional[str] = None, + queue_message_time_to_live_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if queue_name is None and 'queueName' in kwargs: + queue_name = kwargs['queueName'] + if queue_name is None: + raise TypeError("Missing 'queue_name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if queue_message_time_to_live_in_seconds is None and 'queueMessageTimeToLiveInSeconds' in kwargs: + queue_message_time_to_live_in_seconds = kwargs['queueMessageTimeToLiveInSeconds'] + + _setter("queue_name", queue_name) + _setter("storage_account_id", storage_account_id) if queue_message_time_to_live_in_seconds is not None: - pulumi.set(__self__, "queue_message_time_to_live_in_seconds", queue_message_time_to_live_in_seconds) + _setter("queue_message_time_to_live_in_seconds", queue_message_time_to_live_in_seconds) @property @pulumi.getter(name="queueName") @@ -3152,12 +4396,33 @@ def __init__(__self__, *, :param str subject_begins_with: A string to filter events for an event subscription based on a resource path prefix. :param str subject_ends_with: A string to filter events for an event subscription based on a resource path suffix. """ + SystemTopicEventSubscriptionSubjectFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + case_sensitive=case_sensitive, + subject_begins_with=subject_begins_with, + subject_ends_with=subject_ends_with, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + case_sensitive: Optional[bool] = None, + subject_begins_with: Optional[str] = None, + subject_ends_with: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if case_sensitive is None and 'caseSensitive' in kwargs: + case_sensitive = kwargs['caseSensitive'] + if subject_begins_with is None and 'subjectBeginsWith' in kwargs: + subject_begins_with = kwargs['subjectBeginsWith'] + if subject_ends_with is None and 'subjectEndsWith' in kwargs: + subject_ends_with = kwargs['subjectEndsWith'] + if case_sensitive is not None: - pulumi.set(__self__, "case_sensitive", case_sensitive) + _setter("case_sensitive", case_sensitive) if subject_begins_with is not None: - pulumi.set(__self__, "subject_begins_with", subject_begins_with) + _setter("subject_begins_with", subject_begins_with) if subject_ends_with is not None: - pulumi.set(__self__, "subject_ends_with", subject_ends_with) + _setter("subject_ends_with", subject_ends_with) @property @pulumi.getter(name="caseSensitive") @@ -3226,17 +4491,50 @@ def __init__(__self__, *, :param int max_events_per_batch: Maximum number of events per batch. :param int preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. """ - pulumi.set(__self__, "url", url) + SystemTopicEventSubscriptionWebhookEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + active_directory_app_id_or_uri=active_directory_app_id_or_uri, + active_directory_tenant_id=active_directory_tenant_id, + base_url=base_url, + max_events_per_batch=max_events_per_batch, + preferred_batch_size_in_kilobytes=preferred_batch_size_in_kilobytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[str] = None, + active_directory_app_id_or_uri: Optional[str] = None, + active_directory_tenant_id: Optional[str] = None, + base_url: Optional[str] = None, + max_events_per_batch: Optional[int] = None, + preferred_batch_size_in_kilobytes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + if active_directory_app_id_or_uri is None and 'activeDirectoryAppIdOrUri' in kwargs: + active_directory_app_id_or_uri = kwargs['activeDirectoryAppIdOrUri'] + if active_directory_tenant_id is None and 'activeDirectoryTenantId' in kwargs: + active_directory_tenant_id = kwargs['activeDirectoryTenantId'] + if base_url is None and 'baseUrl' in kwargs: + base_url = kwargs['baseUrl'] + if max_events_per_batch is None and 'maxEventsPerBatch' in kwargs: + max_events_per_batch = kwargs['maxEventsPerBatch'] + if preferred_batch_size_in_kilobytes is None and 'preferredBatchSizeInKilobytes' in kwargs: + preferred_batch_size_in_kilobytes = kwargs['preferredBatchSizeInKilobytes'] + + _setter("url", url) if active_directory_app_id_or_uri is not None: - pulumi.set(__self__, "active_directory_app_id_or_uri", active_directory_app_id_or_uri) + _setter("active_directory_app_id_or_uri", active_directory_app_id_or_uri) if active_directory_tenant_id is not None: - pulumi.set(__self__, "active_directory_tenant_id", active_directory_tenant_id) + _setter("active_directory_tenant_id", active_directory_tenant_id) if base_url is not None: - pulumi.set(__self__, "base_url", base_url) + _setter("base_url", base_url) if max_events_per_batch is not None: - pulumi.set(__self__, "max_events_per_batch", max_events_per_batch) + _setter("max_events_per_batch", max_events_per_batch) if preferred_batch_size_in_kilobytes is not None: - pulumi.set(__self__, "preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) + _setter("preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) @property @pulumi.getter @@ -3325,13 +4623,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + SystemTopicIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -3408,13 +4731,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + TopicIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -3479,9 +4827,26 @@ def __init__(__self__, *, :param str ip_mask: The IP mask (CIDR) to match on. :param str action: The action to take when the rule is matched. Possible values are `Allow`. """ - pulumi.set(__self__, "ip_mask", ip_mask) + TopicInboundIpRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[str] = None, + action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + + _setter("ip_mask", ip_mask) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipMask") @@ -3530,12 +4895,31 @@ def __init__(__self__, *, :param str event_type: Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param str subject: Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + TopicInputMappingDefaultValues._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_type=event_type, + subject=subject, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[str] = None, + event_type: Optional[str] = None, + subject: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) @property @pulumi.getter(name="dataVersion") @@ -3600,18 +4984,45 @@ def __init__(__self__, *, :param str subject: Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param str topic: Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + TopicInputMappingFields._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_time=event_time, + event_type=event_type, + id=id, + subject=subject, + topic=topic, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[str] = None, + event_time: Optional[str] = None, + event_type: Optional[str] = None, + id: Optional[str] = None, + subject: Optional[str] = None, + topic: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_time is None and 'eventTime' in kwargs: + event_time = kwargs['eventTime'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_time is not None: - pulumi.set(__self__, "event_time", event_time) + _setter("event_time", event_time) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if topic is not None: - pulumi.set(__self__, "topic", topic) + _setter("topic", topic) @property @pulumi.getter(name="dataVersion") @@ -3675,10 +5086,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity. :param str type: The type of Managed Service Identity that is configured on this EventGrid Domain. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetDomainIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -3722,8 +5164,27 @@ def __init__(__self__, *, :param str action: The action to take when the rule is matched. Possible values are `Allow`. :param str ip_mask: The IP mask (CIDR) to match on. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "ip_mask", ip_mask) + GetDomainInboundIpRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + ip_mask=ip_mask, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + ip_mask: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + + _setter("action", action) + _setter("ip_mask", ip_mask) @property @pulumi.getter @@ -3753,9 +5214,34 @@ def __init__(__self__, *, :param str event_type: Specifies the default event type of the EventGrid Event associated with the domain. :param str subject: Specifies the default subject of the EventGrid Event associated with the domain. """ - pulumi.set(__self__, "data_version", data_version) - pulumi.set(__self__, "event_type", event_type) - pulumi.set(__self__, "subject", subject) + GetDomainInputMappingDefaultValueResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_type=event_type, + subject=subject, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[str] = None, + event_type: Optional[str] = None, + subject: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if data_version is None: + raise TypeError("Missing 'data_version' argument") + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if event_type is None: + raise TypeError("Missing 'event_type' argument") + if subject is None: + raise TypeError("Missing 'subject' argument") + + _setter("data_version", data_version) + _setter("event_type", event_type) + _setter("subject", subject) @property @pulumi.getter(name="dataVersion") @@ -3799,12 +5285,51 @@ def __init__(__self__, *, :param str subject: Specifies the default subject of the EventGrid Event associated with the domain. :param str topic: Specifies the topic of the EventGrid Event associated with the domain. """ - pulumi.set(__self__, "data_version", data_version) - pulumi.set(__self__, "event_time", event_time) - pulumi.set(__self__, "event_type", event_type) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "subject", subject) - pulumi.set(__self__, "topic", topic) + GetDomainInputMappingFieldResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_time=event_time, + event_type=event_type, + id=id, + subject=subject, + topic=topic, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[str] = None, + event_time: Optional[str] = None, + event_type: Optional[str] = None, + id: Optional[str] = None, + subject: Optional[str] = None, + topic: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if data_version is None: + raise TypeError("Missing 'data_version' argument") + if event_time is None and 'eventTime' in kwargs: + event_time = kwargs['eventTime'] + if event_time is None: + raise TypeError("Missing 'event_time' argument") + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if event_type is None: + raise TypeError("Missing 'event_type' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if subject is None: + raise TypeError("Missing 'subject' argument") + if topic is None: + raise TypeError("Missing 'topic' argument") + + _setter("data_version", data_version) + _setter("event_time", event_time) + _setter("event_type", event_type) + _setter("id", id) + _setter("subject", subject) + _setter("topic", topic) @property @pulumi.getter(name="dataVersion") @@ -3868,10 +5393,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Event Grid System Topic. :param str type: The type of Managed Service Identity that is configured on this Event Grid System Topic. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetSystemTopicIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") diff --git a/sdk/python/pulumi_azure/eventgrid/system_topic.py b/sdk/python/pulumi_azure/eventgrid/system_topic.py index 15a8e53fba..e3fe2be9e0 100644 --- a/sdk/python/pulumi_azure/eventgrid/system_topic.py +++ b/sdk/python/pulumi_azure/eventgrid/system_topic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,17 +37,52 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Event Grid System Topic. Changing this forces a new Event Grid System Topic to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Event Grid System Topic. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "source_arm_resource_id", source_arm_resource_id) - pulumi.set(__self__, "topic_type", topic_type) + SystemTopicArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + source_arm_resource_id=source_arm_resource_id, + topic_type=topic_type, + identity=identity, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + source_arm_resource_id: Optional[pulumi.Input[str]] = None, + topic_type: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['SystemTopicIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if source_arm_resource_id is None and 'sourceArmResourceId' in kwargs: + source_arm_resource_id = kwargs['sourceArmResourceId'] + if source_arm_resource_id is None: + raise TypeError("Missing 'source_arm_resource_id' argument") + if topic_type is None and 'topicType' in kwargs: + topic_type = kwargs['topicType'] + if topic_type is None: + raise TypeError("Missing 'topic_type' argument") + + _setter("resource_group_name", resource_group_name) + _setter("source_arm_resource_id", source_arm_resource_id) + _setter("topic_type", topic_type) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -164,22 +199,55 @@ def __init__(__self__, *, > **NOTE:** You can use Azure CLI to get a full list of the available topic types: `az eventgrid topic-type list --output json | grep -w id` """ + _SystemTopicState._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity=identity, + location=location, + metric_arm_resource_id=metric_arm_resource_id, + name=name, + resource_group_name=resource_group_name, + source_arm_resource_id=source_arm_resource_id, + tags=tags, + topic_type=topic_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity: Optional[pulumi.Input['SystemTopicIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + metric_arm_resource_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source_arm_resource_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + topic_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if metric_arm_resource_id is None and 'metricArmResourceId' in kwargs: + metric_arm_resource_id = kwargs['metricArmResourceId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if source_arm_resource_id is None and 'sourceArmResourceId' in kwargs: + source_arm_resource_id = kwargs['sourceArmResourceId'] + if topic_type is None and 'topicType' in kwargs: + topic_type = kwargs['topicType'] + if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metric_arm_resource_id is not None: - pulumi.set(__self__, "metric_arm_resource_id", metric_arm_resource_id) + _setter("metric_arm_resource_id", metric_arm_resource_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if source_arm_resource_id is not None: - pulumi.set(__self__, "source_arm_resource_id", source_arm_resource_id) + _setter("source_arm_resource_id", source_arm_resource_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if topic_type is not None: - pulumi.set(__self__, "topic_type", topic_type) + _setter("topic_type", topic_type) @property @pulumi.getter @@ -391,6 +459,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SystemTopicArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -412,6 +484,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = SystemTopicArgs.__new__(SystemTopicArgs) + if identity is not None and not isinstance(identity, SystemTopicIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + SystemTopicIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/eventgrid/system_topic_event_subscription.py b/sdk/python/pulumi_azure/eventgrid/system_topic_event_subscription.py index 53546518ed..31ec548cb7 100644 --- a/sdk/python/pulumi_azure/eventgrid/system_topic_event_subscription.py +++ b/sdk/python/pulumi_azure/eventgrid/system_topic_event_subscription.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -67,48 +67,145 @@ def __init__(__self__, *, > **NOTE:** One of `azure_function_endpoint`, `eventhub_endpoint_id`, `hybrid_connection_endpoint`, `hybrid_connection_endpoint_id`, `service_bus_queue_endpoint_id`, `service_bus_topic_endpoint_id`, `storage_queue_endpoint` or `webhook_endpoint` must be specified. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "system_topic", system_topic) + SystemTopicEventSubscriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + system_topic=system_topic, + advanced_filter=advanced_filter, + advanced_filtering_on_arrays_enabled=advanced_filtering_on_arrays_enabled, + azure_function_endpoint=azure_function_endpoint, + dead_letter_identity=dead_letter_identity, + delivery_identity=delivery_identity, + delivery_properties=delivery_properties, + event_delivery_schema=event_delivery_schema, + eventhub_endpoint_id=eventhub_endpoint_id, + expiration_time_utc=expiration_time_utc, + hybrid_connection_endpoint_id=hybrid_connection_endpoint_id, + included_event_types=included_event_types, + labels=labels, + name=name, + retry_policy=retry_policy, + service_bus_queue_endpoint_id=service_bus_queue_endpoint_id, + service_bus_topic_endpoint_id=service_bus_topic_endpoint_id, + storage_blob_dead_letter_destination=storage_blob_dead_letter_destination, + storage_queue_endpoint=storage_queue_endpoint, + subject_filter=subject_filter, + webhook_endpoint=webhook_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + system_topic: Optional[pulumi.Input[str]] = None, + advanced_filter: Optional[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterArgs']] = None, + advanced_filtering_on_arrays_enabled: Optional[pulumi.Input[bool]] = None, + azure_function_endpoint: Optional[pulumi.Input['SystemTopicEventSubscriptionAzureFunctionEndpointArgs']] = None, + dead_letter_identity: Optional[pulumi.Input['SystemTopicEventSubscriptionDeadLetterIdentityArgs']] = None, + delivery_identity: Optional[pulumi.Input['SystemTopicEventSubscriptionDeliveryIdentityArgs']] = None, + delivery_properties: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionDeliveryPropertyArgs']]]] = None, + event_delivery_schema: Optional[pulumi.Input[str]] = None, + eventhub_endpoint_id: Optional[pulumi.Input[str]] = None, + expiration_time_utc: Optional[pulumi.Input[str]] = None, + hybrid_connection_endpoint_id: Optional[pulumi.Input[str]] = None, + included_event_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + retry_policy: Optional[pulumi.Input['SystemTopicEventSubscriptionRetryPolicyArgs']] = None, + service_bus_queue_endpoint_id: Optional[pulumi.Input[str]] = None, + service_bus_topic_endpoint_id: Optional[pulumi.Input[str]] = None, + storage_blob_dead_letter_destination: Optional[pulumi.Input['SystemTopicEventSubscriptionStorageBlobDeadLetterDestinationArgs']] = None, + storage_queue_endpoint: Optional[pulumi.Input['SystemTopicEventSubscriptionStorageQueueEndpointArgs']] = None, + subject_filter: Optional[pulumi.Input['SystemTopicEventSubscriptionSubjectFilterArgs']] = None, + webhook_endpoint: Optional[pulumi.Input['SystemTopicEventSubscriptionWebhookEndpointArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if system_topic is None and 'systemTopic' in kwargs: + system_topic = kwargs['systemTopic'] + if system_topic is None: + raise TypeError("Missing 'system_topic' argument") + if advanced_filter is None and 'advancedFilter' in kwargs: + advanced_filter = kwargs['advancedFilter'] + if advanced_filtering_on_arrays_enabled is None and 'advancedFilteringOnArraysEnabled' in kwargs: + advanced_filtering_on_arrays_enabled = kwargs['advancedFilteringOnArraysEnabled'] + if azure_function_endpoint is None and 'azureFunctionEndpoint' in kwargs: + azure_function_endpoint = kwargs['azureFunctionEndpoint'] + if dead_letter_identity is None and 'deadLetterIdentity' in kwargs: + dead_letter_identity = kwargs['deadLetterIdentity'] + if delivery_identity is None and 'deliveryIdentity' in kwargs: + delivery_identity = kwargs['deliveryIdentity'] + if delivery_properties is None and 'deliveryProperties' in kwargs: + delivery_properties = kwargs['deliveryProperties'] + if event_delivery_schema is None and 'eventDeliverySchema' in kwargs: + event_delivery_schema = kwargs['eventDeliverySchema'] + if eventhub_endpoint_id is None and 'eventhubEndpointId' in kwargs: + eventhub_endpoint_id = kwargs['eventhubEndpointId'] + if expiration_time_utc is None and 'expirationTimeUtc' in kwargs: + expiration_time_utc = kwargs['expirationTimeUtc'] + if hybrid_connection_endpoint_id is None and 'hybridConnectionEndpointId' in kwargs: + hybrid_connection_endpoint_id = kwargs['hybridConnectionEndpointId'] + if included_event_types is None and 'includedEventTypes' in kwargs: + included_event_types = kwargs['includedEventTypes'] + if retry_policy is None and 'retryPolicy' in kwargs: + retry_policy = kwargs['retryPolicy'] + if service_bus_queue_endpoint_id is None and 'serviceBusQueueEndpointId' in kwargs: + service_bus_queue_endpoint_id = kwargs['serviceBusQueueEndpointId'] + if service_bus_topic_endpoint_id is None and 'serviceBusTopicEndpointId' in kwargs: + service_bus_topic_endpoint_id = kwargs['serviceBusTopicEndpointId'] + if storage_blob_dead_letter_destination is None and 'storageBlobDeadLetterDestination' in kwargs: + storage_blob_dead_letter_destination = kwargs['storageBlobDeadLetterDestination'] + if storage_queue_endpoint is None and 'storageQueueEndpoint' in kwargs: + storage_queue_endpoint = kwargs['storageQueueEndpoint'] + if subject_filter is None and 'subjectFilter' in kwargs: + subject_filter = kwargs['subjectFilter'] + if webhook_endpoint is None and 'webhookEndpoint' in kwargs: + webhook_endpoint = kwargs['webhookEndpoint'] + + _setter("resource_group_name", resource_group_name) + _setter("system_topic", system_topic) if advanced_filter is not None: - pulumi.set(__self__, "advanced_filter", advanced_filter) + _setter("advanced_filter", advanced_filter) if advanced_filtering_on_arrays_enabled is not None: - pulumi.set(__self__, "advanced_filtering_on_arrays_enabled", advanced_filtering_on_arrays_enabled) + _setter("advanced_filtering_on_arrays_enabled", advanced_filtering_on_arrays_enabled) if azure_function_endpoint is not None: - pulumi.set(__self__, "azure_function_endpoint", azure_function_endpoint) + _setter("azure_function_endpoint", azure_function_endpoint) if dead_letter_identity is not None: - pulumi.set(__self__, "dead_letter_identity", dead_letter_identity) + _setter("dead_letter_identity", dead_letter_identity) if delivery_identity is not None: - pulumi.set(__self__, "delivery_identity", delivery_identity) + _setter("delivery_identity", delivery_identity) if delivery_properties is not None: - pulumi.set(__self__, "delivery_properties", delivery_properties) + _setter("delivery_properties", delivery_properties) if event_delivery_schema is not None: - pulumi.set(__self__, "event_delivery_schema", event_delivery_schema) + _setter("event_delivery_schema", event_delivery_schema) if eventhub_endpoint_id is not None: - pulumi.set(__self__, "eventhub_endpoint_id", eventhub_endpoint_id) + _setter("eventhub_endpoint_id", eventhub_endpoint_id) if expiration_time_utc is not None: - pulumi.set(__self__, "expiration_time_utc", expiration_time_utc) + _setter("expiration_time_utc", expiration_time_utc) if hybrid_connection_endpoint_id is not None: - pulumi.set(__self__, "hybrid_connection_endpoint_id", hybrid_connection_endpoint_id) + _setter("hybrid_connection_endpoint_id", hybrid_connection_endpoint_id) if included_event_types is not None: - pulumi.set(__self__, "included_event_types", included_event_types) + _setter("included_event_types", included_event_types) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retry_policy is not None: - pulumi.set(__self__, "retry_policy", retry_policy) + _setter("retry_policy", retry_policy) if service_bus_queue_endpoint_id is not None: - pulumi.set(__self__, "service_bus_queue_endpoint_id", service_bus_queue_endpoint_id) + _setter("service_bus_queue_endpoint_id", service_bus_queue_endpoint_id) if service_bus_topic_endpoint_id is not None: - pulumi.set(__self__, "service_bus_topic_endpoint_id", service_bus_topic_endpoint_id) + _setter("service_bus_topic_endpoint_id", service_bus_topic_endpoint_id) if storage_blob_dead_letter_destination is not None: - pulumi.set(__self__, "storage_blob_dead_letter_destination", storage_blob_dead_letter_destination) + _setter("storage_blob_dead_letter_destination", storage_blob_dead_letter_destination) if storage_queue_endpoint is not None: - pulumi.set(__self__, "storage_queue_endpoint", storage_queue_endpoint) + _setter("storage_queue_endpoint", storage_queue_endpoint) if subject_filter is not None: - pulumi.set(__self__, "subject_filter", subject_filter) + _setter("subject_filter", subject_filter) if webhook_endpoint is not None: - pulumi.set(__self__, "webhook_endpoint", webhook_endpoint) + _setter("webhook_endpoint", webhook_endpoint) @property @pulumi.getter(name="resourceGroupName") @@ -433,50 +530,143 @@ def __init__(__self__, *, > **NOTE:** One of `azure_function_endpoint`, `eventhub_endpoint_id`, `hybrid_connection_endpoint`, `hybrid_connection_endpoint_id`, `service_bus_queue_endpoint_id`, `service_bus_topic_endpoint_id`, `storage_queue_endpoint` or `webhook_endpoint` must be specified. """ + _SystemTopicEventSubscriptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + advanced_filter=advanced_filter, + advanced_filtering_on_arrays_enabled=advanced_filtering_on_arrays_enabled, + azure_function_endpoint=azure_function_endpoint, + dead_letter_identity=dead_letter_identity, + delivery_identity=delivery_identity, + delivery_properties=delivery_properties, + event_delivery_schema=event_delivery_schema, + eventhub_endpoint_id=eventhub_endpoint_id, + expiration_time_utc=expiration_time_utc, + hybrid_connection_endpoint_id=hybrid_connection_endpoint_id, + included_event_types=included_event_types, + labels=labels, + name=name, + resource_group_name=resource_group_name, + retry_policy=retry_policy, + service_bus_queue_endpoint_id=service_bus_queue_endpoint_id, + service_bus_topic_endpoint_id=service_bus_topic_endpoint_id, + storage_blob_dead_letter_destination=storage_blob_dead_letter_destination, + storage_queue_endpoint=storage_queue_endpoint, + subject_filter=subject_filter, + system_topic=system_topic, + webhook_endpoint=webhook_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + advanced_filter: Optional[pulumi.Input['SystemTopicEventSubscriptionAdvancedFilterArgs']] = None, + advanced_filtering_on_arrays_enabled: Optional[pulumi.Input[bool]] = None, + azure_function_endpoint: Optional[pulumi.Input['SystemTopicEventSubscriptionAzureFunctionEndpointArgs']] = None, + dead_letter_identity: Optional[pulumi.Input['SystemTopicEventSubscriptionDeadLetterIdentityArgs']] = None, + delivery_identity: Optional[pulumi.Input['SystemTopicEventSubscriptionDeliveryIdentityArgs']] = None, + delivery_properties: Optional[pulumi.Input[Sequence[pulumi.Input['SystemTopicEventSubscriptionDeliveryPropertyArgs']]]] = None, + event_delivery_schema: Optional[pulumi.Input[str]] = None, + eventhub_endpoint_id: Optional[pulumi.Input[str]] = None, + expiration_time_utc: Optional[pulumi.Input[str]] = None, + hybrid_connection_endpoint_id: Optional[pulumi.Input[str]] = None, + included_event_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retry_policy: Optional[pulumi.Input['SystemTopicEventSubscriptionRetryPolicyArgs']] = None, + service_bus_queue_endpoint_id: Optional[pulumi.Input[str]] = None, + service_bus_topic_endpoint_id: Optional[pulumi.Input[str]] = None, + storage_blob_dead_letter_destination: Optional[pulumi.Input['SystemTopicEventSubscriptionStorageBlobDeadLetterDestinationArgs']] = None, + storage_queue_endpoint: Optional[pulumi.Input['SystemTopicEventSubscriptionStorageQueueEndpointArgs']] = None, + subject_filter: Optional[pulumi.Input['SystemTopicEventSubscriptionSubjectFilterArgs']] = None, + system_topic: Optional[pulumi.Input[str]] = None, + webhook_endpoint: Optional[pulumi.Input['SystemTopicEventSubscriptionWebhookEndpointArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if advanced_filter is None and 'advancedFilter' in kwargs: + advanced_filter = kwargs['advancedFilter'] + if advanced_filtering_on_arrays_enabled is None and 'advancedFilteringOnArraysEnabled' in kwargs: + advanced_filtering_on_arrays_enabled = kwargs['advancedFilteringOnArraysEnabled'] + if azure_function_endpoint is None and 'azureFunctionEndpoint' in kwargs: + azure_function_endpoint = kwargs['azureFunctionEndpoint'] + if dead_letter_identity is None and 'deadLetterIdentity' in kwargs: + dead_letter_identity = kwargs['deadLetterIdentity'] + if delivery_identity is None and 'deliveryIdentity' in kwargs: + delivery_identity = kwargs['deliveryIdentity'] + if delivery_properties is None and 'deliveryProperties' in kwargs: + delivery_properties = kwargs['deliveryProperties'] + if event_delivery_schema is None and 'eventDeliverySchema' in kwargs: + event_delivery_schema = kwargs['eventDeliverySchema'] + if eventhub_endpoint_id is None and 'eventhubEndpointId' in kwargs: + eventhub_endpoint_id = kwargs['eventhubEndpointId'] + if expiration_time_utc is None and 'expirationTimeUtc' in kwargs: + expiration_time_utc = kwargs['expirationTimeUtc'] + if hybrid_connection_endpoint_id is None and 'hybridConnectionEndpointId' in kwargs: + hybrid_connection_endpoint_id = kwargs['hybridConnectionEndpointId'] + if included_event_types is None and 'includedEventTypes' in kwargs: + included_event_types = kwargs['includedEventTypes'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retry_policy is None and 'retryPolicy' in kwargs: + retry_policy = kwargs['retryPolicy'] + if service_bus_queue_endpoint_id is None and 'serviceBusQueueEndpointId' in kwargs: + service_bus_queue_endpoint_id = kwargs['serviceBusQueueEndpointId'] + if service_bus_topic_endpoint_id is None and 'serviceBusTopicEndpointId' in kwargs: + service_bus_topic_endpoint_id = kwargs['serviceBusTopicEndpointId'] + if storage_blob_dead_letter_destination is None and 'storageBlobDeadLetterDestination' in kwargs: + storage_blob_dead_letter_destination = kwargs['storageBlobDeadLetterDestination'] + if storage_queue_endpoint is None and 'storageQueueEndpoint' in kwargs: + storage_queue_endpoint = kwargs['storageQueueEndpoint'] + if subject_filter is None and 'subjectFilter' in kwargs: + subject_filter = kwargs['subjectFilter'] + if system_topic is None and 'systemTopic' in kwargs: + system_topic = kwargs['systemTopic'] + if webhook_endpoint is None and 'webhookEndpoint' in kwargs: + webhook_endpoint = kwargs['webhookEndpoint'] + if advanced_filter is not None: - pulumi.set(__self__, "advanced_filter", advanced_filter) + _setter("advanced_filter", advanced_filter) if advanced_filtering_on_arrays_enabled is not None: - pulumi.set(__self__, "advanced_filtering_on_arrays_enabled", advanced_filtering_on_arrays_enabled) + _setter("advanced_filtering_on_arrays_enabled", advanced_filtering_on_arrays_enabled) if azure_function_endpoint is not None: - pulumi.set(__self__, "azure_function_endpoint", azure_function_endpoint) + _setter("azure_function_endpoint", azure_function_endpoint) if dead_letter_identity is not None: - pulumi.set(__self__, "dead_letter_identity", dead_letter_identity) + _setter("dead_letter_identity", dead_letter_identity) if delivery_identity is not None: - pulumi.set(__self__, "delivery_identity", delivery_identity) + _setter("delivery_identity", delivery_identity) if delivery_properties is not None: - pulumi.set(__self__, "delivery_properties", delivery_properties) + _setter("delivery_properties", delivery_properties) if event_delivery_schema is not None: - pulumi.set(__self__, "event_delivery_schema", event_delivery_schema) + _setter("event_delivery_schema", event_delivery_schema) if eventhub_endpoint_id is not None: - pulumi.set(__self__, "eventhub_endpoint_id", eventhub_endpoint_id) + _setter("eventhub_endpoint_id", eventhub_endpoint_id) if expiration_time_utc is not None: - pulumi.set(__self__, "expiration_time_utc", expiration_time_utc) + _setter("expiration_time_utc", expiration_time_utc) if hybrid_connection_endpoint_id is not None: - pulumi.set(__self__, "hybrid_connection_endpoint_id", hybrid_connection_endpoint_id) + _setter("hybrid_connection_endpoint_id", hybrid_connection_endpoint_id) if included_event_types is not None: - pulumi.set(__self__, "included_event_types", included_event_types) + _setter("included_event_types", included_event_types) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retry_policy is not None: - pulumi.set(__self__, "retry_policy", retry_policy) + _setter("retry_policy", retry_policy) if service_bus_queue_endpoint_id is not None: - pulumi.set(__self__, "service_bus_queue_endpoint_id", service_bus_queue_endpoint_id) + _setter("service_bus_queue_endpoint_id", service_bus_queue_endpoint_id) if service_bus_topic_endpoint_id is not None: - pulumi.set(__self__, "service_bus_topic_endpoint_id", service_bus_topic_endpoint_id) + _setter("service_bus_topic_endpoint_id", service_bus_topic_endpoint_id) if storage_blob_dead_letter_destination is not None: - pulumi.set(__self__, "storage_blob_dead_letter_destination", storage_blob_dead_letter_destination) + _setter("storage_blob_dead_letter_destination", storage_blob_dead_letter_destination) if storage_queue_endpoint is not None: - pulumi.set(__self__, "storage_queue_endpoint", storage_queue_endpoint) + _setter("storage_queue_endpoint", storage_queue_endpoint) if subject_filter is not None: - pulumi.set(__self__, "subject_filter", subject_filter) + _setter("subject_filter", subject_filter) if system_topic is not None: - pulumi.set(__self__, "system_topic", system_topic) + _setter("system_topic", system_topic) if webhook_endpoint is not None: - pulumi.set(__self__, "webhook_endpoint", webhook_endpoint) + _setter("webhook_endpoint", webhook_endpoint) @property @pulumi.getter(name="advancedFilter") @@ -902,6 +1092,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SystemTopicEventSubscriptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -938,10 +1132,30 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = SystemTopicEventSubscriptionArgs.__new__(SystemTopicEventSubscriptionArgs) + if advanced_filter is not None and not isinstance(advanced_filter, SystemTopicEventSubscriptionAdvancedFilterArgs): + advanced_filter = advanced_filter or {} + def _setter(key, value): + advanced_filter[key] = value + SystemTopicEventSubscriptionAdvancedFilterArgs._configure(_setter, **advanced_filter) __props__.__dict__["advanced_filter"] = advanced_filter __props__.__dict__["advanced_filtering_on_arrays_enabled"] = advanced_filtering_on_arrays_enabled + if azure_function_endpoint is not None and not isinstance(azure_function_endpoint, SystemTopicEventSubscriptionAzureFunctionEndpointArgs): + azure_function_endpoint = azure_function_endpoint or {} + def _setter(key, value): + azure_function_endpoint[key] = value + SystemTopicEventSubscriptionAzureFunctionEndpointArgs._configure(_setter, **azure_function_endpoint) __props__.__dict__["azure_function_endpoint"] = azure_function_endpoint + if dead_letter_identity is not None and not isinstance(dead_letter_identity, SystemTopicEventSubscriptionDeadLetterIdentityArgs): + dead_letter_identity = dead_letter_identity or {} + def _setter(key, value): + dead_letter_identity[key] = value + SystemTopicEventSubscriptionDeadLetterIdentityArgs._configure(_setter, **dead_letter_identity) __props__.__dict__["dead_letter_identity"] = dead_letter_identity + if delivery_identity is not None and not isinstance(delivery_identity, SystemTopicEventSubscriptionDeliveryIdentityArgs): + delivery_identity = delivery_identity or {} + def _setter(key, value): + delivery_identity[key] = value + SystemTopicEventSubscriptionDeliveryIdentityArgs._configure(_setter, **delivery_identity) __props__.__dict__["delivery_identity"] = delivery_identity __props__.__dict__["delivery_properties"] = delivery_properties __props__.__dict__["event_delivery_schema"] = event_delivery_schema @@ -954,15 +1168,40 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if retry_policy is not None and not isinstance(retry_policy, SystemTopicEventSubscriptionRetryPolicyArgs): + retry_policy = retry_policy or {} + def _setter(key, value): + retry_policy[key] = value + SystemTopicEventSubscriptionRetryPolicyArgs._configure(_setter, **retry_policy) __props__.__dict__["retry_policy"] = retry_policy __props__.__dict__["service_bus_queue_endpoint_id"] = service_bus_queue_endpoint_id __props__.__dict__["service_bus_topic_endpoint_id"] = service_bus_topic_endpoint_id + if storage_blob_dead_letter_destination is not None and not isinstance(storage_blob_dead_letter_destination, SystemTopicEventSubscriptionStorageBlobDeadLetterDestinationArgs): + storage_blob_dead_letter_destination = storage_blob_dead_letter_destination or {} + def _setter(key, value): + storage_blob_dead_letter_destination[key] = value + SystemTopicEventSubscriptionStorageBlobDeadLetterDestinationArgs._configure(_setter, **storage_blob_dead_letter_destination) __props__.__dict__["storage_blob_dead_letter_destination"] = storage_blob_dead_letter_destination + if storage_queue_endpoint is not None and not isinstance(storage_queue_endpoint, SystemTopicEventSubscriptionStorageQueueEndpointArgs): + storage_queue_endpoint = storage_queue_endpoint or {} + def _setter(key, value): + storage_queue_endpoint[key] = value + SystemTopicEventSubscriptionStorageQueueEndpointArgs._configure(_setter, **storage_queue_endpoint) __props__.__dict__["storage_queue_endpoint"] = storage_queue_endpoint + if subject_filter is not None and not isinstance(subject_filter, SystemTopicEventSubscriptionSubjectFilterArgs): + subject_filter = subject_filter or {} + def _setter(key, value): + subject_filter[key] = value + SystemTopicEventSubscriptionSubjectFilterArgs._configure(_setter, **subject_filter) __props__.__dict__["subject_filter"] = subject_filter if system_topic is None and not opts.urn: raise TypeError("Missing required property 'system_topic'") __props__.__dict__["system_topic"] = system_topic + if webhook_endpoint is not None and not isinstance(webhook_endpoint, SystemTopicEventSubscriptionWebhookEndpointArgs): + webhook_endpoint = webhook_endpoint or {} + def _setter(key, value): + webhook_endpoint[key] = value + SystemTopicEventSubscriptionWebhookEndpointArgs._configure(_setter, **webhook_endpoint) __props__.__dict__["webhook_endpoint"] = webhook_endpoint super(SystemTopicEventSubscription, __self__).__init__( 'azure:eventgrid/systemTopicEventSubscription:SystemTopicEventSubscription', diff --git a/sdk/python/pulumi_azure/eventgrid/topic.py b/sdk/python/pulumi_azure/eventgrid/topic.py index c35ae429b8..09751bdc80 100644 --- a/sdk/python/pulumi_azure/eventgrid/topic.py +++ b/sdk/python/pulumi_azure/eventgrid/topic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,27 +41,74 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether or not public network access is allowed for this server. Defaults to `true`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + TopicArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + identity=identity, + inbound_ip_rules=inbound_ip_rules, + input_mapping_default_values=input_mapping_default_values, + input_mapping_fields=input_mapping_fields, + input_schema=input_schema, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['TopicIdentityArgs']] = None, + inbound_ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['TopicInboundIpRuleArgs']]]] = None, + input_mapping_default_values: Optional[pulumi.Input['TopicInputMappingDefaultValuesArgs']] = None, + input_mapping_fields: Optional[pulumi.Input['TopicInputMappingFieldsArgs']] = None, + input_schema: Optional[pulumi.Input[str]] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if inbound_ip_rules is None and 'inboundIpRules' in kwargs: + inbound_ip_rules = kwargs['inboundIpRules'] + if input_mapping_default_values is None and 'inputMappingDefaultValues' in kwargs: + input_mapping_default_values = kwargs['inputMappingDefaultValues'] + if input_mapping_fields is None and 'inputMappingFields' in kwargs: + input_mapping_fields = kwargs['inputMappingFields'] + if input_schema is None and 'inputSchema' in kwargs: + input_schema = kwargs['inputSchema'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if inbound_ip_rules is not None: - pulumi.set(__self__, "inbound_ip_rules", inbound_ip_rules) + _setter("inbound_ip_rules", inbound_ip_rules) if input_mapping_default_values is not None: - pulumi.set(__self__, "input_mapping_default_values", input_mapping_default_values) + _setter("input_mapping_default_values", input_mapping_default_values) if input_mapping_fields is not None: - pulumi.set(__self__, "input_mapping_fields", input_mapping_fields) + _setter("input_mapping_fields", input_mapping_fields) if input_schema is not None: - pulumi.set(__self__, "input_schema", input_schema) + _setter("input_schema", input_schema) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -230,34 +277,89 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_access_key: The Secondary Shared Access Key associated with the EventGrid Topic. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _TopicState._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint=endpoint, + identity=identity, + inbound_ip_rules=inbound_ip_rules, + input_mapping_default_values=input_mapping_default_values, + input_mapping_fields=input_mapping_fields, + input_schema=input_schema, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + primary_access_key=primary_access_key, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + secondary_access_key=secondary_access_key, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['TopicIdentityArgs']] = None, + inbound_ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['TopicInboundIpRuleArgs']]]] = None, + input_mapping_default_values: Optional[pulumi.Input['TopicInputMappingDefaultValuesArgs']] = None, + input_mapping_fields: Optional[pulumi.Input['TopicInputMappingFieldsArgs']] = None, + input_schema: Optional[pulumi.Input[str]] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_access_key: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_access_key: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if inbound_ip_rules is None and 'inboundIpRules' in kwargs: + inbound_ip_rules = kwargs['inboundIpRules'] + if input_mapping_default_values is None and 'inputMappingDefaultValues' in kwargs: + input_mapping_default_values = kwargs['inputMappingDefaultValues'] + if input_mapping_fields is None and 'inputMappingFields' in kwargs: + input_mapping_fields = kwargs['inputMappingFields'] + if input_schema is None and 'inputSchema' in kwargs: + input_schema = kwargs['inputSchema'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if primary_access_key is None and 'primaryAccessKey' in kwargs: + primary_access_key = kwargs['primaryAccessKey'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_access_key is None and 'secondaryAccessKey' in kwargs: + secondary_access_key = kwargs['secondaryAccessKey'] + if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if inbound_ip_rules is not None: - pulumi.set(__self__, "inbound_ip_rules", inbound_ip_rules) + _setter("inbound_ip_rules", inbound_ip_rules) if input_mapping_default_values is not None: - pulumi.set(__self__, "input_mapping_default_values", input_mapping_default_values) + _setter("input_mapping_default_values", input_mapping_default_values) if input_mapping_fields is not None: - pulumi.set(__self__, "input_mapping_fields", input_mapping_fields) + _setter("input_mapping_fields", input_mapping_fields) if input_schema is not None: - pulumi.set(__self__, "input_schema", input_schema) + _setter("input_schema", input_schema) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_access_key is not None: - pulumi.set(__self__, "primary_access_key", primary_access_key) + _setter("primary_access_key", primary_access_key) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_access_key is not None: - pulumi.set(__self__, "secondary_access_key", secondary_access_key) + _setter("secondary_access_key", secondary_access_key) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -531,6 +633,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TopicArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -556,9 +662,24 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = TopicArgs.__new__(TopicArgs) + if identity is not None and not isinstance(identity, TopicIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + TopicIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["inbound_ip_rules"] = inbound_ip_rules + if input_mapping_default_values is not None and not isinstance(input_mapping_default_values, TopicInputMappingDefaultValuesArgs): + input_mapping_default_values = input_mapping_default_values or {} + def _setter(key, value): + input_mapping_default_values[key] = value + TopicInputMappingDefaultValuesArgs._configure(_setter, **input_mapping_default_values) __props__.__dict__["input_mapping_default_values"] = input_mapping_default_values + if input_mapping_fields is not None and not isinstance(input_mapping_fields, TopicInputMappingFieldsArgs): + input_mapping_fields = input_mapping_fields or {} + def _setter(key, value): + input_mapping_fields[key] = value + TopicInputMappingFieldsArgs._configure(_setter, **input_mapping_fields) __props__.__dict__["input_mapping_fields"] = input_mapping_fields __props__.__dict__["input_schema"] = input_schema __props__.__dict__["local_auth_enabled"] = local_auth_enabled diff --git a/sdk/python/pulumi_azure/eventhub/_inputs.py b/sdk/python/pulumi_azure/eventhub/_inputs.py index 7424a152a5..8384c8edd9 100644 --- a/sdk/python/pulumi_azure/eventhub/_inputs.py +++ b/sdk/python/pulumi_azure/eventhub/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -78,13 +78,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + DomainIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -148,9 +173,26 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_mask: The IP mask (CIDR) to match on. :param pulumi.Input[str] action: The action to take when the rule is matched. Possible values are `Allow`. """ - pulumi.set(__self__, "ip_mask", ip_mask) + DomainInboundIpRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[pulumi.Input[str]] = None, + action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + + _setter("ip_mask", ip_mask) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipMask") @@ -188,12 +230,31 @@ def __init__(__self__, *, :param pulumi.Input[str] event_type: Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param pulumi.Input[str] subject: Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + DomainInputMappingDefaultValuesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_type=event_type, + subject=subject, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[pulumi.Input[str]] = None, + event_type: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) @property @pulumi.getter(name="dataVersion") @@ -249,18 +310,45 @@ def __init__(__self__, *, :param pulumi.Input[str] subject: Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param pulumi.Input[str] topic: Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + DomainInputMappingFieldsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_time=event_time, + event_type=event_type, + id=id, + subject=subject, + topic=topic, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[pulumi.Input[str]] = None, + event_time: Optional[pulumi.Input[str]] = None, + event_type: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + topic: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_time is None and 'eventTime' in kwargs: + event_time = kwargs['eventTime'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_time is not None: - pulumi.set(__self__, "event_time", event_time) + _setter("event_time", event_time) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if topic is not None: - pulumi.set(__self__, "topic", topic) + _setter("topic", topic) @property @pulumi.getter(name="dataVersion") @@ -352,13 +440,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + EventGridTopicIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -422,9 +535,26 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_mask: The IP mask (CIDR) to match on. :param pulumi.Input[str] action: The action to take when the rule is matched. Possible values are `Allow`. """ - pulumi.set(__self__, "ip_mask", ip_mask) + EventGridTopicInboundIpRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[pulumi.Input[str]] = None, + action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + + _setter("ip_mask", ip_mask) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipMask") @@ -462,12 +592,31 @@ def __init__(__self__, *, :param pulumi.Input[str] event_type: Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param pulumi.Input[str] subject: Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + EventGridTopicInputMappingDefaultValuesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_type=event_type, + subject=subject, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[pulumi.Input[str]] = None, + event_type: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) @property @pulumi.getter(name="dataVersion") @@ -523,18 +672,45 @@ def __init__(__self__, *, :param pulumi.Input[str] subject: Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param pulumi.Input[str] topic: Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + EventGridTopicInputMappingFieldsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_time=event_time, + event_type=event_type, + id=id, + subject=subject, + topic=topic, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[pulumi.Input[str]] = None, + event_time: Optional[pulumi.Input[str]] = None, + event_type: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + subject: Optional[pulumi.Input[str]] = None, + topic: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_time is None and 'eventTime' in kwargs: + event_time = kwargs['eventTime'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_time is not None: - pulumi.set(__self__, "event_time", event_time) + _setter("event_time", event_time) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if topic is not None: - pulumi.set(__self__, "topic", topic) + _setter("topic", topic) @property @pulumi.getter(name="dataVersion") @@ -626,15 +802,48 @@ def __init__(__self__, *, :param pulumi.Input[int] size_limit_in_bytes: Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between `10485760` and `524288000` bytes. Defaults to `314572800` bytes. :param pulumi.Input[bool] skip_empty_archives: Specifies if empty files should not be emitted if no events occur during the Capture time window. Defaults to `false`. """ - pulumi.set(__self__, "destination", destination) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "encoding", encoding) + EventHubCaptureDescriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination=destination, + enabled=enabled, + encoding=encoding, + interval_in_seconds=interval_in_seconds, + size_limit_in_bytes=size_limit_in_bytes, + skip_empty_archives=skip_empty_archives, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination: Optional[pulumi.Input['EventHubCaptureDescriptionDestinationArgs']] = None, + enabled: Optional[pulumi.Input[bool]] = None, + encoding: Optional[pulumi.Input[str]] = None, + interval_in_seconds: Optional[pulumi.Input[int]] = None, + size_limit_in_bytes: Optional[pulumi.Input[int]] = None, + skip_empty_archives: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination is None: + raise TypeError("Missing 'destination' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if encoding is None: + raise TypeError("Missing 'encoding' argument") + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if size_limit_in_bytes is None and 'sizeLimitInBytes' in kwargs: + size_limit_in_bytes = kwargs['sizeLimitInBytes'] + if skip_empty_archives is None and 'skipEmptyArchives' in kwargs: + skip_empty_archives = kwargs['skipEmptyArchives'] + + _setter("destination", destination) + _setter("enabled", enabled) + _setter("encoding", encoding) if interval_in_seconds is not None: - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) + _setter("interval_in_seconds", interval_in_seconds) if size_limit_in_bytes is not None: - pulumi.set(__self__, "size_limit_in_bytes", size_limit_in_bytes) + _setter("size_limit_in_bytes", size_limit_in_bytes) if skip_empty_archives is not None: - pulumi.set(__self__, "skip_empty_archives", skip_empty_archives) + _setter("skip_empty_archives", skip_empty_archives) @property @pulumi.getter @@ -724,10 +933,41 @@ def __init__(__self__, *, > At this time it's only possible to Capture EventHub messages to Blob Storage. There's [a Feature Request for the Azure SDK to add support for Capturing messages to Azure Data Lake here](https://github.com/Azure/azure-rest-api-specs/issues/2255). :param pulumi.Input[str] storage_account_id: The ID of the Blob Storage Account where messages should be archived. """ - pulumi.set(__self__, "archive_name_format", archive_name_format) - pulumi.set(__self__, "blob_container_name", blob_container_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + EventHubCaptureDescriptionDestinationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + archive_name_format=archive_name_format, + blob_container_name=blob_container_name, + name=name, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + archive_name_format: Optional[pulumi.Input[str]] = None, + blob_container_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if archive_name_format is None and 'archiveNameFormat' in kwargs: + archive_name_format = kwargs['archiveNameFormat'] + if archive_name_format is None: + raise TypeError("Missing 'archive_name_format' argument") + if blob_container_name is None and 'blobContainerName' in kwargs: + blob_container_name = kwargs['blobContainerName'] + if blob_container_name is None: + raise TypeError("Missing 'blob_container_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + + _setter("archive_name_format", archive_name_format) + _setter("blob_container_name", blob_container_name) + _setter("name", name) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="archiveNameFormat") @@ -797,13 +1037,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + EventHubNamespaceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -875,15 +1140,46 @@ def __init__(__self__, *, :param pulumi.Input[bool] trusted_service_access_enabled: Whether Trusted Microsoft Services are allowed to bypass firewall. :param pulumi.Input[Sequence[pulumi.Input['EventHubNamespaceNetworkRulesetsVirtualNetworkRuleArgs']]] virtual_network_rules: One or more `virtual_network_rule` blocks as defined below. """ - pulumi.set(__self__, "default_action", default_action) + EventHubNamespaceNetworkRulesetsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + public_network_access_enabled=public_network_access_enabled, + trusted_service_access_enabled=trusted_service_access_enabled, + virtual_network_rules=virtual_network_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['EventHubNamespaceNetworkRulesetsIpRuleArgs']]]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + trusted_service_access_enabled: Optional[pulumi.Input[bool]] = None, + virtual_network_rules: Optional[pulumi.Input[Sequence[pulumi.Input['EventHubNamespaceNetworkRulesetsVirtualNetworkRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if default_action is None: + raise TypeError("Missing 'default_action' argument") + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if trusted_service_access_enabled is None and 'trustedServiceAccessEnabled' in kwargs: + trusted_service_access_enabled = kwargs['trustedServiceAccessEnabled'] + if virtual_network_rules is None and 'virtualNetworkRules' in kwargs: + virtual_network_rules = kwargs['virtualNetworkRules'] + + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if trusted_service_access_enabled is not None: - pulumi.set(__self__, "trusted_service_access_enabled", trusted_service_access_enabled) + _setter("trusted_service_access_enabled", trusted_service_access_enabled) if virtual_network_rules is not None: - pulumi.set(__self__, "virtual_network_rules", virtual_network_rules) + _setter("virtual_network_rules", virtual_network_rules) @property @pulumi.getter(name="defaultAction") @@ -957,9 +1253,26 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_mask: The IP mask to match on. :param pulumi.Input[str] action: The action to take when the rule is matched. Possible values are `Allow`. """ - pulumi.set(__self__, "ip_mask", ip_mask) + EventHubNamespaceNetworkRulesetsIpRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[pulumi.Input[str]] = None, + action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + + _setter("ip_mask", ip_mask) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipMask") @@ -995,9 +1308,28 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The id of the subnet to match on. :param pulumi.Input[bool] ignore_missing_virtual_network_service_endpoint: Are missing virtual network service endpoints ignored? """ - pulumi.set(__self__, "subnet_id", subnet_id) + EventHubNamespaceNetworkRulesetsVirtualNetworkRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ignore_missing_virtual_network_service_endpoint=ignore_missing_virtual_network_service_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[pulumi.Input[str]] = None, + ignore_missing_virtual_network_service_endpoint: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if ignore_missing_virtual_network_service_endpoint is None and 'ignoreMissingVirtualNetworkServiceEndpoint' in kwargs: + ignore_missing_virtual_network_service_endpoint = kwargs['ignoreMissingVirtualNetworkServiceEndpoint'] + + _setter("subnet_id", subnet_id) if ignore_missing_virtual_network_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_virtual_network_service_endpoint", ignore_missing_virtual_network_service_endpoint) + _setter("ignore_missing_virtual_network_service_endpoint", ignore_missing_virtual_network_service_endpoint) @property @pulumi.getter(name="subnetId") @@ -1069,44 +1401,129 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringNotEndsWithArgs']]] string_not_ends_withs: Compares a value of an event using multiple string values. :param pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringNotInArgs']]] string_not_ins: Compares a value of an event using multiple string values. """ + EventSubscriptionAdvancedFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bool_equals=bool_equals, + is_not_nulls=is_not_nulls, + is_null_or_undefineds=is_null_or_undefineds, + number_greater_than_or_equals=number_greater_than_or_equals, + number_greater_thans=number_greater_thans, + number_in_ranges=number_in_ranges, + number_ins=number_ins, + number_less_than_or_equals=number_less_than_or_equals, + number_less_thans=number_less_thans, + number_not_in_ranges=number_not_in_ranges, + number_not_ins=number_not_ins, + string_begins_withs=string_begins_withs, + string_contains=string_contains, + string_ends_withs=string_ends_withs, + string_ins=string_ins, + string_not_begins_withs=string_not_begins_withs, + string_not_contains=string_not_contains, + string_not_ends_withs=string_not_ends_withs, + string_not_ins=string_not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bool_equals: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterBoolEqualArgs']]]] = None, + is_not_nulls: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterIsNotNullArgs']]]] = None, + is_null_or_undefineds: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterIsNullOrUndefinedArgs']]]] = None, + number_greater_than_or_equals: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberGreaterThanOrEqualArgs']]]] = None, + number_greater_thans: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberGreaterThanArgs']]]] = None, + number_in_ranges: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberInRangeArgs']]]] = None, + number_ins: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberInArgs']]]] = None, + number_less_than_or_equals: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberLessThanOrEqualArgs']]]] = None, + number_less_thans: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberLessThanArgs']]]] = None, + number_not_in_ranges: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberNotInRangeArgs']]]] = None, + number_not_ins: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterNumberNotInArgs']]]] = None, + string_begins_withs: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringBeginsWithArgs']]]] = None, + string_contains: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringContainArgs']]]] = None, + string_ends_withs: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringEndsWithArgs']]]] = None, + string_ins: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringInArgs']]]] = None, + string_not_begins_withs: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringNotBeginsWithArgs']]]] = None, + string_not_contains: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringNotContainArgs']]]] = None, + string_not_ends_withs: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringNotEndsWithArgs']]]] = None, + string_not_ins: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionAdvancedFilterStringNotInArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bool_equals is None and 'boolEquals' in kwargs: + bool_equals = kwargs['boolEquals'] + if is_not_nulls is None and 'isNotNulls' in kwargs: + is_not_nulls = kwargs['isNotNulls'] + if is_null_or_undefineds is None and 'isNullOrUndefineds' in kwargs: + is_null_or_undefineds = kwargs['isNullOrUndefineds'] + if number_greater_than_or_equals is None and 'numberGreaterThanOrEquals' in kwargs: + number_greater_than_or_equals = kwargs['numberGreaterThanOrEquals'] + if number_greater_thans is None and 'numberGreaterThans' in kwargs: + number_greater_thans = kwargs['numberGreaterThans'] + if number_in_ranges is None and 'numberInRanges' in kwargs: + number_in_ranges = kwargs['numberInRanges'] + if number_ins is None and 'numberIns' in kwargs: + number_ins = kwargs['numberIns'] + if number_less_than_or_equals is None and 'numberLessThanOrEquals' in kwargs: + number_less_than_or_equals = kwargs['numberLessThanOrEquals'] + if number_less_thans is None and 'numberLessThans' in kwargs: + number_less_thans = kwargs['numberLessThans'] + if number_not_in_ranges is None and 'numberNotInRanges' in kwargs: + number_not_in_ranges = kwargs['numberNotInRanges'] + if number_not_ins is None and 'numberNotIns' in kwargs: + number_not_ins = kwargs['numberNotIns'] + if string_begins_withs is None and 'stringBeginsWiths' in kwargs: + string_begins_withs = kwargs['stringBeginsWiths'] + if string_contains is None and 'stringContains' in kwargs: + string_contains = kwargs['stringContains'] + if string_ends_withs is None and 'stringEndsWiths' in kwargs: + string_ends_withs = kwargs['stringEndsWiths'] + if string_ins is None and 'stringIns' in kwargs: + string_ins = kwargs['stringIns'] + if string_not_begins_withs is None and 'stringNotBeginsWiths' in kwargs: + string_not_begins_withs = kwargs['stringNotBeginsWiths'] + if string_not_contains is None and 'stringNotContains' in kwargs: + string_not_contains = kwargs['stringNotContains'] + if string_not_ends_withs is None and 'stringNotEndsWiths' in kwargs: + string_not_ends_withs = kwargs['stringNotEndsWiths'] + if string_not_ins is None and 'stringNotIns' in kwargs: + string_not_ins = kwargs['stringNotIns'] + if bool_equals is not None: - pulumi.set(__self__, "bool_equals", bool_equals) + _setter("bool_equals", bool_equals) if is_not_nulls is not None: - pulumi.set(__self__, "is_not_nulls", is_not_nulls) + _setter("is_not_nulls", is_not_nulls) if is_null_or_undefineds is not None: - pulumi.set(__self__, "is_null_or_undefineds", is_null_or_undefineds) + _setter("is_null_or_undefineds", is_null_or_undefineds) if number_greater_than_or_equals is not None: - pulumi.set(__self__, "number_greater_than_or_equals", number_greater_than_or_equals) + _setter("number_greater_than_or_equals", number_greater_than_or_equals) if number_greater_thans is not None: - pulumi.set(__self__, "number_greater_thans", number_greater_thans) + _setter("number_greater_thans", number_greater_thans) if number_in_ranges is not None: - pulumi.set(__self__, "number_in_ranges", number_in_ranges) + _setter("number_in_ranges", number_in_ranges) if number_ins is not None: - pulumi.set(__self__, "number_ins", number_ins) + _setter("number_ins", number_ins) if number_less_than_or_equals is not None: - pulumi.set(__self__, "number_less_than_or_equals", number_less_than_or_equals) + _setter("number_less_than_or_equals", number_less_than_or_equals) if number_less_thans is not None: - pulumi.set(__self__, "number_less_thans", number_less_thans) + _setter("number_less_thans", number_less_thans) if number_not_in_ranges is not None: - pulumi.set(__self__, "number_not_in_ranges", number_not_in_ranges) + _setter("number_not_in_ranges", number_not_in_ranges) if number_not_ins is not None: - pulumi.set(__self__, "number_not_ins", number_not_ins) + _setter("number_not_ins", number_not_ins) if string_begins_withs is not None: - pulumi.set(__self__, "string_begins_withs", string_begins_withs) + _setter("string_begins_withs", string_begins_withs) if string_contains is not None: - pulumi.set(__self__, "string_contains", string_contains) + _setter("string_contains", string_contains) if string_ends_withs is not None: - pulumi.set(__self__, "string_ends_withs", string_ends_withs) + _setter("string_ends_withs", string_ends_withs) if string_ins is not None: - pulumi.set(__self__, "string_ins", string_ins) + _setter("string_ins", string_ins) if string_not_begins_withs is not None: - pulumi.set(__self__, "string_not_begins_withs", string_not_begins_withs) + _setter("string_not_begins_withs", string_not_begins_withs) if string_not_contains is not None: - pulumi.set(__self__, "string_not_contains", string_not_contains) + _setter("string_not_contains", string_not_contains) if string_not_ends_withs is not None: - pulumi.set(__self__, "string_not_ends_withs", string_not_ends_withs) + _setter("string_not_ends_withs", string_not_ends_withs) if string_not_ins is not None: - pulumi.set(__self__, "string_not_ins", string_not_ins) + _setter("string_not_ins", string_not_ins) @property @pulumi.getter(name="boolEquals") @@ -1350,8 +1767,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterBoolEqualArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -1387,7 +1821,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] key: Specifies the field within the event data that you want to use for filtering. Type of the field can be a number, boolean, or string. """ - pulumi.set(__self__, "key", key) + EventSubscriptionAdvancedFilterIsNotNullArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) @property @pulumi.getter @@ -1409,7 +1856,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] key: Specifies the field within the event data that you want to use for filtering. Type of the field can be a number, boolean, or string. """ - pulumi.set(__self__, "key", key) + EventSubscriptionAdvancedFilterIsNullOrUndefinedArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) @property @pulumi.getter @@ -1435,8 +1895,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberGreaterThanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -1476,8 +1953,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberGreaterThanOrEqualArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -1517,8 +2011,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1558,8 +2069,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberInRangeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[float]]]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1599,8 +2127,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberLessThanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -1640,8 +2185,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberLessThanOrEqualArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -1681,8 +2243,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberNotInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1722,8 +2301,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberNotInRangeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[float]]]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1763,8 +2359,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringBeginsWithArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1804,8 +2417,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringContainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1845,8 +2475,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringEndsWithArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1886,8 +2533,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1927,8 +2591,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotBeginsWithArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1968,8 +2649,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotContainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2009,8 +2707,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotEndsWithArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2050,8 +2765,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2091,11 +2823,34 @@ def __init__(__self__, *, :param pulumi.Input[int] max_events_per_batch: Maximum number of events per batch. :param pulumi.Input[int] preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. """ - pulumi.set(__self__, "function_id", function_id) + EventSubscriptionAzureFunctionEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_id=function_id, + max_events_per_batch=max_events_per_batch, + preferred_batch_size_in_kilobytes=preferred_batch_size_in_kilobytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_id: Optional[pulumi.Input[str]] = None, + max_events_per_batch: Optional[pulumi.Input[int]] = None, + preferred_batch_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_id is None and 'functionId' in kwargs: + function_id = kwargs['functionId'] + if function_id is None: + raise TypeError("Missing 'function_id' argument") + if max_events_per_batch is None and 'maxEventsPerBatch' in kwargs: + max_events_per_batch = kwargs['maxEventsPerBatch'] + if preferred_batch_size_in_kilobytes is None and 'preferredBatchSizeInKilobytes' in kwargs: + preferred_batch_size_in_kilobytes = kwargs['preferredBatchSizeInKilobytes'] + + _setter("function_id", function_id) if max_events_per_batch is not None: - pulumi.set(__self__, "max_events_per_batch", max_events_per_batch) + _setter("max_events_per_batch", max_events_per_batch) if preferred_batch_size_in_kilobytes is not None: - pulumi.set(__self__, "preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) + _setter("preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) @property @pulumi.getter(name="functionId") @@ -2143,9 +2898,26 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that is used for dead lettering. Allowed value is `SystemAssigned`, `UserAssigned`. :param pulumi.Input[str] user_assigned_identity: The user identity associated with the resource. """ - pulumi.set(__self__, "type", type) + EventSubscriptionDeadLetterIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + user_assigned_identity=user_assigned_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + user_assigned_identity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if user_assigned_identity is None and 'userAssignedIdentity' in kwargs: + user_assigned_identity = kwargs['userAssignedIdentity'] + + _setter("type", type) if user_assigned_identity is not None: - pulumi.set(__self__, "user_assigned_identity", user_assigned_identity) + _setter("user_assigned_identity", user_assigned_identity) @property @pulumi.getter @@ -2181,9 +2953,26 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that is used for event delivery. Allowed value is `SystemAssigned`, `UserAssigned`. :param pulumi.Input[str] user_assigned_identity: The user identity associated with the resource. """ - pulumi.set(__self__, "type", type) + EventSubscriptionDeliveryIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + user_assigned_identity=user_assigned_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + user_assigned_identity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if user_assigned_identity is None and 'userAssignedIdentity' in kwargs: + user_assigned_identity = kwargs['userAssignedIdentity'] + + _setter("type", type) if user_assigned_identity is not None: - pulumi.set(__self__, "user_assigned_identity", user_assigned_identity) + _setter("user_assigned_identity", user_assigned_identity) @property @pulumi.getter @@ -2225,14 +3014,41 @@ def __init__(__self__, *, :param pulumi.Input[str] source_field: If the `type` is `Dynamic`, then provide the payload field to be used as the value. Valid source fields differ by subscription type. :param pulumi.Input[str] value: If the `type` is `Static`, then provide the value to use """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "type", type) + EventSubscriptionDeliveryPropertyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + type=type, + secret=secret, + source_field=source_field, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[bool]] = None, + source_field: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if source_field is None and 'sourceField' in kwargs: + source_field = kwargs['sourceField'] + + _setter("header_name", header_name) + _setter("type", type) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if source_field is not None: - pulumi.set(__self__, "source_field", source_field) + _setter("source_field", source_field) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerName") @@ -2304,8 +3120,29 @@ def __init__(__self__, *, :param pulumi.Input[int] event_time_to_live: Specifies the time to live (in minutes) for events. Supported range is `1` to `1440`. See [official documentation](https://docs.microsoft.com/azure/event-grid/manage-event-delivery#set-retry-policy) for more details. :param pulumi.Input[int] max_delivery_attempts: Specifies the maximum number of delivery retry attempts for events. """ - pulumi.set(__self__, "event_time_to_live", event_time_to_live) - pulumi.set(__self__, "max_delivery_attempts", max_delivery_attempts) + EventSubscriptionRetryPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_time_to_live=event_time_to_live, + max_delivery_attempts=max_delivery_attempts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_time_to_live: Optional[pulumi.Input[int]] = None, + max_delivery_attempts: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_time_to_live is None and 'eventTimeToLive' in kwargs: + event_time_to_live = kwargs['eventTimeToLive'] + if event_time_to_live is None: + raise TypeError("Missing 'event_time_to_live' argument") + if max_delivery_attempts is None and 'maxDeliveryAttempts' in kwargs: + max_delivery_attempts = kwargs['maxDeliveryAttempts'] + if max_delivery_attempts is None: + raise TypeError("Missing 'max_delivery_attempts' argument") + + _setter("event_time_to_live", event_time_to_live) + _setter("max_delivery_attempts", max_delivery_attempts) @property @pulumi.getter(name="eventTimeToLive") @@ -2341,8 +3178,29 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_id: Specifies the id of the storage account id where the storage blob is located. :param pulumi.Input[str] storage_blob_container_name: Specifies the name of the Storage blob container that is the destination of the deadletter events. """ - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "storage_blob_container_name", storage_blob_container_name) + EventSubscriptionStorageBlobDeadLetterDestinationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_id=storage_account_id, + storage_blob_container_name=storage_blob_container_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_blob_container_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if storage_blob_container_name is None and 'storageBlobContainerName' in kwargs: + storage_blob_container_name = kwargs['storageBlobContainerName'] + if storage_blob_container_name is None: + raise TypeError("Missing 'storage_blob_container_name' argument") + + _setter("storage_account_id", storage_account_id) + _setter("storage_blob_container_name", storage_blob_container_name) @property @pulumi.getter(name="storageAccountId") @@ -2380,10 +3238,35 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_id: Specifies the id of the storage account id where the storage queue is located. :param pulumi.Input[int] queue_message_time_to_live_in_seconds: Storage queue message time to live in seconds. """ - pulumi.set(__self__, "queue_name", queue_name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + EventSubscriptionStorageQueueEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + queue_name=queue_name, + storage_account_id=storage_account_id, + queue_message_time_to_live_in_seconds=queue_message_time_to_live_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + queue_name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + queue_message_time_to_live_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if queue_name is None and 'queueName' in kwargs: + queue_name = kwargs['queueName'] + if queue_name is None: + raise TypeError("Missing 'queue_name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if queue_message_time_to_live_in_seconds is None and 'queueMessageTimeToLiveInSeconds' in kwargs: + queue_message_time_to_live_in_seconds = kwargs['queueMessageTimeToLiveInSeconds'] + + _setter("queue_name", queue_name) + _setter("storage_account_id", storage_account_id) if queue_message_time_to_live_in_seconds is not None: - pulumi.set(__self__, "queue_message_time_to_live_in_seconds", queue_message_time_to_live_in_seconds) + _setter("queue_message_time_to_live_in_seconds", queue_message_time_to_live_in_seconds) @property @pulumi.getter(name="queueName") @@ -2433,12 +3316,33 @@ def __init__(__self__, *, :param pulumi.Input[str] subject_begins_with: A string to filter events for an event subscription based on a resource path prefix. :param pulumi.Input[str] subject_ends_with: A string to filter events for an event subscription based on a resource path suffix. """ + EventSubscriptionSubjectFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + case_sensitive=case_sensitive, + subject_begins_with=subject_begins_with, + subject_ends_with=subject_ends_with, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + case_sensitive: Optional[pulumi.Input[bool]] = None, + subject_begins_with: Optional[pulumi.Input[str]] = None, + subject_ends_with: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if case_sensitive is None and 'caseSensitive' in kwargs: + case_sensitive = kwargs['caseSensitive'] + if subject_begins_with is None and 'subjectBeginsWith' in kwargs: + subject_begins_with = kwargs['subjectBeginsWith'] + if subject_ends_with is None and 'subjectEndsWith' in kwargs: + subject_ends_with = kwargs['subjectEndsWith'] + if case_sensitive is not None: - pulumi.set(__self__, "case_sensitive", case_sensitive) + _setter("case_sensitive", case_sensitive) if subject_begins_with is not None: - pulumi.set(__self__, "subject_begins_with", subject_begins_with) + _setter("subject_begins_with", subject_begins_with) if subject_ends_with is not None: - pulumi.set(__self__, "subject_ends_with", subject_ends_with) + _setter("subject_ends_with", subject_ends_with) @property @pulumi.getter(name="caseSensitive") @@ -2494,17 +3398,50 @@ def __init__(__self__, *, :param pulumi.Input[int] max_events_per_batch: Maximum number of events per batch. :param pulumi.Input[int] preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. """ - pulumi.set(__self__, "url", url) + EventSubscriptionWebhookEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + active_directory_app_id_or_uri=active_directory_app_id_or_uri, + active_directory_tenant_id=active_directory_tenant_id, + base_url=base_url, + max_events_per_batch=max_events_per_batch, + preferred_batch_size_in_kilobytes=preferred_batch_size_in_kilobytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[pulumi.Input[str]] = None, + active_directory_app_id_or_uri: Optional[pulumi.Input[str]] = None, + active_directory_tenant_id: Optional[pulumi.Input[str]] = None, + base_url: Optional[pulumi.Input[str]] = None, + max_events_per_batch: Optional[pulumi.Input[int]] = None, + preferred_batch_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + if active_directory_app_id_or_uri is None and 'activeDirectoryAppIdOrUri' in kwargs: + active_directory_app_id_or_uri = kwargs['activeDirectoryAppIdOrUri'] + if active_directory_tenant_id is None and 'activeDirectoryTenantId' in kwargs: + active_directory_tenant_id = kwargs['activeDirectoryTenantId'] + if base_url is None and 'baseUrl' in kwargs: + base_url = kwargs['baseUrl'] + if max_events_per_batch is None and 'maxEventsPerBatch' in kwargs: + max_events_per_batch = kwargs['maxEventsPerBatch'] + if preferred_batch_size_in_kilobytes is None and 'preferredBatchSizeInKilobytes' in kwargs: + preferred_batch_size_in_kilobytes = kwargs['preferredBatchSizeInKilobytes'] + + _setter("url", url) if active_directory_app_id_or_uri is not None: - pulumi.set(__self__, "active_directory_app_id_or_uri", active_directory_app_id_or_uri) + _setter("active_directory_app_id_or_uri", active_directory_app_id_or_uri) if active_directory_tenant_id is not None: - pulumi.set(__self__, "active_directory_tenant_id", active_directory_tenant_id) + _setter("active_directory_tenant_id", active_directory_tenant_id) if base_url is not None: - pulumi.set(__self__, "base_url", base_url) + _setter("base_url", base_url) if max_events_per_batch is not None: - pulumi.set(__self__, "max_events_per_batch", max_events_per_batch) + _setter("max_events_per_batch", max_events_per_batch) if preferred_batch_size_in_kilobytes is not None: - pulumi.set(__self__, "preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) + _setter("preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) @property @pulumi.getter @@ -2590,10 +3527,35 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault Key which should be used to Encrypt the data in this ServiceBus Namespace. :param pulumi.Input[bool] infrastructure_encryption_enabled: Used to specify whether enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created. """ - pulumi.set(__self__, "identity_id", identity_id) - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + NamespaceCustomerManagedKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_id=identity_id, + key_vault_key_id=key_vault_key_id, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_id: Optional[pulumi.Input[str]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + infrastructure_encryption_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if identity_id is None: + raise TypeError("Missing 'identity_id' argument") + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + + _setter("identity_id", identity_id) + _setter("key_vault_key_id", key_vault_key_id) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) @property @pulumi.getter(name="identityId") @@ -2647,13 +3609,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this ServiceBus Namespace. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this ServiceBus Namespace. """ - pulumi.set(__self__, "type", type) + NamespaceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -2721,16 +3708,45 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`. :param pulumi.Input[bool] trusted_services_allowed: Are Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration? See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md) """ + NamespaceNetworkRuleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + network_rules=network_rules, + public_network_access_enabled=public_network_access_enabled, + trusted_services_allowed=trusted_services_allowed, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + network_rules: Optional[pulumi.Input[Sequence[pulumi.Input['NamespaceNetworkRuleSetNetworkRuleArgs']]]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + trusted_services_allowed: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if network_rules is None and 'networkRules' in kwargs: + network_rules = kwargs['networkRules'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if trusted_services_allowed is None and 'trustedServicesAllowed' in kwargs: + trusted_services_allowed = kwargs['trustedServicesAllowed'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if network_rules is not None: - pulumi.set(__self__, "network_rules", network_rules) + _setter("network_rules", network_rules) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if trusted_services_allowed is not None: - pulumi.set(__self__, "trusted_services_allowed", trusted_services_allowed) + _setter("trusted_services_allowed", trusted_services_allowed) @property @pulumi.getter(name="defaultAction") @@ -2802,9 +3818,28 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The Subnet ID which should be able to access this ServiceBus Namespace. :param pulumi.Input[bool] ignore_missing_vnet_service_endpoint: Should the ServiceBus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to `false`. """ - pulumi.set(__self__, "subnet_id", subnet_id) + NamespaceNetworkRuleSetNetworkRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[pulumi.Input[str]] = None, + ignore_missing_vnet_service_endpoint: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + + _setter("subnet_id", subnet_id) if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) @property @pulumi.getter(name="subnetId") @@ -2844,12 +3879,33 @@ def __init__(__self__, *, :param pulumi.Input[bool] is_client_scoped_subscription_durable: Whether the client scoped subscription is durable. This property can only be controlled from the application side. :param pulumi.Input[bool] is_client_scoped_subscription_shareable: Whether the client scoped subscription is shareable. Defaults to `true` Changing this forces a new resource to be created. """ + SubscriptionClientScopedSubscriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + is_client_scoped_subscription_durable=is_client_scoped_subscription_durable, + is_client_scoped_subscription_shareable=is_client_scoped_subscription_shareable, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + is_client_scoped_subscription_durable: Optional[pulumi.Input[bool]] = None, + is_client_scoped_subscription_shareable: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if is_client_scoped_subscription_durable is None and 'isClientScopedSubscriptionDurable' in kwargs: + is_client_scoped_subscription_durable = kwargs['isClientScopedSubscriptionDurable'] + if is_client_scoped_subscription_shareable is None and 'isClientScopedSubscriptionShareable' in kwargs: + is_client_scoped_subscription_shareable = kwargs['isClientScopedSubscriptionShareable'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if is_client_scoped_subscription_durable is not None: - pulumi.set(__self__, "is_client_scoped_subscription_durable", is_client_scoped_subscription_durable) + _setter("is_client_scoped_subscription_durable", is_client_scoped_subscription_durable) if is_client_scoped_subscription_shareable is not None: - pulumi.set(__self__, "is_client_scoped_subscription_shareable", is_client_scoped_subscription_shareable) + _setter("is_client_scoped_subscription_shareable", is_client_scoped_subscription_shareable) @property @pulumi.getter(name="clientId") @@ -2915,24 +3971,63 @@ def __init__(__self__, *, :param pulumi.Input[str] session_id: Session identifier. :param pulumi.Input[str] to: Address to send to. """ + SubscriptionRuleCorrelationFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + correlation_id=correlation_id, + label=label, + message_id=message_id, + properties=properties, + reply_to=reply_to, + reply_to_session_id=reply_to_session_id, + session_id=session_id, + to=to, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[pulumi.Input[str]] = None, + correlation_id: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + message_id: Optional[pulumi.Input[str]] = None, + properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + reply_to: Optional[pulumi.Input[str]] = None, + reply_to_session_id: Optional[pulumi.Input[str]] = None, + session_id: Optional[pulumi.Input[str]] = None, + to: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if correlation_id is None and 'correlationId' in kwargs: + correlation_id = kwargs['correlationId'] + if message_id is None and 'messageId' in kwargs: + message_id = kwargs['messageId'] + if reply_to is None and 'replyTo' in kwargs: + reply_to = kwargs['replyTo'] + if reply_to_session_id is None and 'replyToSessionId' in kwargs: + reply_to_session_id = kwargs['replyToSessionId'] + if session_id is None and 'sessionId' in kwargs: + session_id = kwargs['sessionId'] + if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if correlation_id is not None: - pulumi.set(__self__, "correlation_id", correlation_id) + _setter("correlation_id", correlation_id) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if message_id is not None: - pulumi.set(__self__, "message_id", message_id) + _setter("message_id", message_id) if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) if reply_to is not None: - pulumi.set(__self__, "reply_to", reply_to) + _setter("reply_to", reply_to) if reply_to_session_id is not None: - pulumi.set(__self__, "reply_to_session_id", reply_to_session_id) + _setter("reply_to_session_id", reply_to_session_id) if session_id is not None: - pulumi.set(__self__, "session_id", session_id) + _setter("session_id", session_id) if to is not None: - pulumi.set(__self__, "to", to) + _setter("to", to) @property @pulumi.getter(name="contentType") diff --git a/sdk/python/pulumi_azure/eventhub/authorization_rule.py b/sdk/python/pulumi_azure/eventhub/authorization_rule.py index 22f7db3c1a..e6f31fb1fd 100644 --- a/sdk/python/pulumi_azure/eventhub/authorization_rule.py +++ b/sdk/python/pulumi_azure/eventhub/authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AuthorizationRuleArgs', 'AuthorizationRule'] @@ -33,17 +33,52 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created. :param pulumi.Input[bool] send: Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`. """ - pulumi.set(__self__, "eventhub_name", eventhub_name) - pulumi.set(__self__, "namespace_name", namespace_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + AuthorizationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_name=eventhub_name, + namespace_name=namespace_name, + resource_group_name=resource_group_name, + listen=listen, + manage=manage, + name=name, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_name is None: + raise TypeError("Missing 'eventhub_name' argument") + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if namespace_name is None: + raise TypeError("Missing 'namespace_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("eventhub_name", eventhub_name) + _setter("namespace_name", namespace_name) + _setter("resource_group_name", resource_group_name) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="eventhubName") @@ -166,32 +201,85 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_key: The Secondary Key for the Event Hubs Authorization Rule. :param pulumi.Input[bool] send: Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`. """ + _AuthorizationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_name=eventhub_name, + listen=listen, + manage=manage, + name=name, + namespace_name=namespace_name, + primary_connection_string=primary_connection_string, + primary_connection_string_alias=primary_connection_string_alias, + primary_key=primary_key, + resource_group_name=resource_group_name, + secondary_connection_string=secondary_connection_string, + secondary_connection_string_alias=secondary_connection_string_alias, + secondary_key=secondary_key, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_name: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_connection_string_alias: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_connection_string_alias: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_connection_string_alias is None and 'primaryConnectionStringAlias' in kwargs: + primary_connection_string_alias = kwargs['primaryConnectionStringAlias'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_connection_string_alias is None and 'secondaryConnectionStringAlias' in kwargs: + secondary_connection_string_alias = kwargs['secondaryConnectionStringAlias'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_connection_string_alias is not None: - pulumi.set(__self__, "primary_connection_string_alias", primary_connection_string_alias) + _setter("primary_connection_string_alias", primary_connection_string_alias) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_connection_string_alias is not None: - pulumi.set(__self__, "secondary_connection_string_alias", secondary_connection_string_alias) + _setter("secondary_connection_string_alias", secondary_connection_string_alias) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="eventhubName") @@ -473,6 +561,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AuthorizationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventhub/cluster.py b/sdk/python/pulumi_azure/eventhub/cluster.py index 506d756f29..a5cd5dbbc6 100644 --- a/sdk/python/pulumi_azure/eventhub/cluster.py +++ b/sdk/python/pulumi_azure/eventhub/cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ClusterArgs', 'Cluster'] @@ -27,14 +27,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the EventHub Cluster resource. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + ClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -113,16 +140,39 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_name: The SKU name of the EventHub Cluster. The only supported value at this time is `Dedicated_1`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -268,6 +318,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventhub/consumer_group.py b/sdk/python/pulumi_azure/eventhub/consumer_group.py index a8ccc19509..150fb58ed5 100644 --- a/sdk/python/pulumi_azure/eventhub/consumer_group.py +++ b/sdk/python/pulumi_azure/eventhub/consumer_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ConsumerGroupArgs', 'ConsumerGroup'] @@ -27,13 +27,46 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created. :param pulumi.Input[str] user_metadata: Specifies the user metadata. """ - pulumi.set(__self__, "eventhub_name", eventhub_name) - pulumi.set(__self__, "namespace_name", namespace_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ConsumerGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_name=eventhub_name, + namespace_name=namespace_name, + resource_group_name=resource_group_name, + name=name, + user_metadata=user_metadata, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + user_metadata: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_name is None: + raise TypeError("Missing 'eventhub_name' argument") + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if namespace_name is None: + raise TypeError("Missing 'namespace_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if user_metadata is None and 'userMetadata' in kwargs: + user_metadata = kwargs['userMetadata'] + + _setter("eventhub_name", eventhub_name) + _setter("namespace_name", namespace_name) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if user_metadata is not None: - pulumi.set(__self__, "user_metadata", user_metadata) + _setter("user_metadata", user_metadata) @property @pulumi.getter(name="eventhubName") @@ -112,16 +145,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created. :param pulumi.Input[str] user_metadata: Specifies the user metadata. """ + _ConsumerGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_name=eventhub_name, + name=name, + namespace_name=namespace_name, + resource_group_name=resource_group_name, + user_metadata=user_metadata, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + user_metadata: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if user_metadata is None and 'userMetadata' in kwargs: + user_metadata = kwargs['userMetadata'] + if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if user_metadata is not None: - pulumi.set(__self__, "user_metadata", user_metadata) + _setter("user_metadata", user_metadata) @property @pulumi.getter(name="eventhubName") @@ -295,6 +355,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConsumerGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventhub/domain.py b/sdk/python/pulumi_azure/eventhub/domain.py index e2d753a89b..53ef46e743 100644 --- a/sdk/python/pulumi_azure/eventhub/domain.py +++ b/sdk/python/pulumi_azure/eventhub/domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,31 +45,86 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether or not public network access is allowed for this server. Defaults to `true`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + DomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + auto_create_topic_with_first_subscription=auto_create_topic_with_first_subscription, + auto_delete_topic_with_last_subscription=auto_delete_topic_with_last_subscription, + identity=identity, + inbound_ip_rules=inbound_ip_rules, + input_mapping_default_values=input_mapping_default_values, + input_mapping_fields=input_mapping_fields, + input_schema=input_schema, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + auto_create_topic_with_first_subscription: Optional[pulumi.Input[bool]] = None, + auto_delete_topic_with_last_subscription: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['DomainIdentityArgs']] = None, + inbound_ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['DomainInboundIpRuleArgs']]]] = None, + input_mapping_default_values: Optional[pulumi.Input['DomainInputMappingDefaultValuesArgs']] = None, + input_mapping_fields: Optional[pulumi.Input['DomainInputMappingFieldsArgs']] = None, + input_schema: Optional[pulumi.Input[str]] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if auto_create_topic_with_first_subscription is None and 'autoCreateTopicWithFirstSubscription' in kwargs: + auto_create_topic_with_first_subscription = kwargs['autoCreateTopicWithFirstSubscription'] + if auto_delete_topic_with_last_subscription is None and 'autoDeleteTopicWithLastSubscription' in kwargs: + auto_delete_topic_with_last_subscription = kwargs['autoDeleteTopicWithLastSubscription'] + if inbound_ip_rules is None and 'inboundIpRules' in kwargs: + inbound_ip_rules = kwargs['inboundIpRules'] + if input_mapping_default_values is None and 'inputMappingDefaultValues' in kwargs: + input_mapping_default_values = kwargs['inputMappingDefaultValues'] + if input_mapping_fields is None and 'inputMappingFields' in kwargs: + input_mapping_fields = kwargs['inputMappingFields'] + if input_schema is None and 'inputSchema' in kwargs: + input_schema = kwargs['inputSchema'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) if auto_create_topic_with_first_subscription is not None: - pulumi.set(__self__, "auto_create_topic_with_first_subscription", auto_create_topic_with_first_subscription) + _setter("auto_create_topic_with_first_subscription", auto_create_topic_with_first_subscription) if auto_delete_topic_with_last_subscription is not None: - pulumi.set(__self__, "auto_delete_topic_with_last_subscription", auto_delete_topic_with_last_subscription) + _setter("auto_delete_topic_with_last_subscription", auto_delete_topic_with_last_subscription) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if inbound_ip_rules is not None: - pulumi.set(__self__, "inbound_ip_rules", inbound_ip_rules) + _setter("inbound_ip_rules", inbound_ip_rules) if input_mapping_default_values is not None: - pulumi.set(__self__, "input_mapping_default_values", input_mapping_default_values) + _setter("input_mapping_default_values", input_mapping_default_values) if input_mapping_fields is not None: - pulumi.set(__self__, "input_mapping_fields", input_mapping_fields) + _setter("input_mapping_fields", input_mapping_fields) if input_schema is not None: - pulumi.set(__self__, "input_schema", input_schema) + _setter("input_schema", input_schema) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -266,38 +321,101 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_access_key: The Secondary Shared Access Key associated with the EventGrid Domain. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _DomainState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_create_topic_with_first_subscription=auto_create_topic_with_first_subscription, + auto_delete_topic_with_last_subscription=auto_delete_topic_with_last_subscription, + endpoint=endpoint, + identity=identity, + inbound_ip_rules=inbound_ip_rules, + input_mapping_default_values=input_mapping_default_values, + input_mapping_fields=input_mapping_fields, + input_schema=input_schema, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + primary_access_key=primary_access_key, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + secondary_access_key=secondary_access_key, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_create_topic_with_first_subscription: Optional[pulumi.Input[bool]] = None, + auto_delete_topic_with_last_subscription: Optional[pulumi.Input[bool]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['DomainIdentityArgs']] = None, + inbound_ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['DomainInboundIpRuleArgs']]]] = None, + input_mapping_default_values: Optional[pulumi.Input['DomainInputMappingDefaultValuesArgs']] = None, + input_mapping_fields: Optional[pulumi.Input['DomainInputMappingFieldsArgs']] = None, + input_schema: Optional[pulumi.Input[str]] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_access_key: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_access_key: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_create_topic_with_first_subscription is None and 'autoCreateTopicWithFirstSubscription' in kwargs: + auto_create_topic_with_first_subscription = kwargs['autoCreateTopicWithFirstSubscription'] + if auto_delete_topic_with_last_subscription is None and 'autoDeleteTopicWithLastSubscription' in kwargs: + auto_delete_topic_with_last_subscription = kwargs['autoDeleteTopicWithLastSubscription'] + if inbound_ip_rules is None and 'inboundIpRules' in kwargs: + inbound_ip_rules = kwargs['inboundIpRules'] + if input_mapping_default_values is None and 'inputMappingDefaultValues' in kwargs: + input_mapping_default_values = kwargs['inputMappingDefaultValues'] + if input_mapping_fields is None and 'inputMappingFields' in kwargs: + input_mapping_fields = kwargs['inputMappingFields'] + if input_schema is None and 'inputSchema' in kwargs: + input_schema = kwargs['inputSchema'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if primary_access_key is None and 'primaryAccessKey' in kwargs: + primary_access_key = kwargs['primaryAccessKey'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_access_key is None and 'secondaryAccessKey' in kwargs: + secondary_access_key = kwargs['secondaryAccessKey'] + if auto_create_topic_with_first_subscription is not None: - pulumi.set(__self__, "auto_create_topic_with_first_subscription", auto_create_topic_with_first_subscription) + _setter("auto_create_topic_with_first_subscription", auto_create_topic_with_first_subscription) if auto_delete_topic_with_last_subscription is not None: - pulumi.set(__self__, "auto_delete_topic_with_last_subscription", auto_delete_topic_with_last_subscription) + _setter("auto_delete_topic_with_last_subscription", auto_delete_topic_with_last_subscription) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if inbound_ip_rules is not None: - pulumi.set(__self__, "inbound_ip_rules", inbound_ip_rules) + _setter("inbound_ip_rules", inbound_ip_rules) if input_mapping_default_values is not None: - pulumi.set(__self__, "input_mapping_default_values", input_mapping_default_values) + _setter("input_mapping_default_values", input_mapping_default_values) if input_mapping_fields is not None: - pulumi.set(__self__, "input_mapping_fields", input_mapping_fields) + _setter("input_mapping_fields", input_mapping_fields) if input_schema is not None: - pulumi.set(__self__, "input_schema", input_schema) + _setter("input_schema", input_schema) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_access_key is not None: - pulumi.set(__self__, "primary_access_key", primary_access_key) + _setter("primary_access_key", primary_access_key) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_access_key is not None: - pulumi.set(__self__, "secondary_access_key", secondary_access_key) + _setter("secondary_access_key", secondary_access_key) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="autoCreateTopicWithFirstSubscription") @@ -600,6 +718,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DomainArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -630,9 +752,24 @@ def _internal_init(__self__, __props__.__dict__["auto_create_topic_with_first_subscription"] = auto_create_topic_with_first_subscription __props__.__dict__["auto_delete_topic_with_last_subscription"] = auto_delete_topic_with_last_subscription + if identity is not None and not isinstance(identity, DomainIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + DomainIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["inbound_ip_rules"] = inbound_ip_rules + if input_mapping_default_values is not None and not isinstance(input_mapping_default_values, DomainInputMappingDefaultValuesArgs): + input_mapping_default_values = input_mapping_default_values or {} + def _setter(key, value): + input_mapping_default_values[key] = value + DomainInputMappingDefaultValuesArgs._configure(_setter, **input_mapping_default_values) __props__.__dict__["input_mapping_default_values"] = input_mapping_default_values + if input_mapping_fields is not None and not isinstance(input_mapping_fields, DomainInputMappingFieldsArgs): + input_mapping_fields = input_mapping_fields or {} + def _setter(key, value): + input_mapping_fields[key] = value + DomainInputMappingFieldsArgs._configure(_setter, **input_mapping_fields) __props__.__dict__["input_mapping_fields"] = input_mapping_fields __props__.__dict__["input_schema"] = input_schema __props__.__dict__["local_auth_enabled"] = local_auth_enabled diff --git a/sdk/python/pulumi_azure/eventhub/event_grid_topic.py b/sdk/python/pulumi_azure/eventhub/event_grid_topic.py index bc13996ed7..03a7716afc 100644 --- a/sdk/python/pulumi_azure/eventhub/event_grid_topic.py +++ b/sdk/python/pulumi_azure/eventhub/event_grid_topic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,27 +41,74 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether or not public network access is allowed for this server. Defaults to `true`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + EventGridTopicArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + identity=identity, + inbound_ip_rules=inbound_ip_rules, + input_mapping_default_values=input_mapping_default_values, + input_mapping_fields=input_mapping_fields, + input_schema=input_schema, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['EventGridTopicIdentityArgs']] = None, + inbound_ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['EventGridTopicInboundIpRuleArgs']]]] = None, + input_mapping_default_values: Optional[pulumi.Input['EventGridTopicInputMappingDefaultValuesArgs']] = None, + input_mapping_fields: Optional[pulumi.Input['EventGridTopicInputMappingFieldsArgs']] = None, + input_schema: Optional[pulumi.Input[str]] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if inbound_ip_rules is None and 'inboundIpRules' in kwargs: + inbound_ip_rules = kwargs['inboundIpRules'] + if input_mapping_default_values is None and 'inputMappingDefaultValues' in kwargs: + input_mapping_default_values = kwargs['inputMappingDefaultValues'] + if input_mapping_fields is None and 'inputMappingFields' in kwargs: + input_mapping_fields = kwargs['inputMappingFields'] + if input_schema is None and 'inputSchema' in kwargs: + input_schema = kwargs['inputSchema'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if inbound_ip_rules is not None: - pulumi.set(__self__, "inbound_ip_rules", inbound_ip_rules) + _setter("inbound_ip_rules", inbound_ip_rules) if input_mapping_default_values is not None: - pulumi.set(__self__, "input_mapping_default_values", input_mapping_default_values) + _setter("input_mapping_default_values", input_mapping_default_values) if input_mapping_fields is not None: - pulumi.set(__self__, "input_mapping_fields", input_mapping_fields) + _setter("input_mapping_fields", input_mapping_fields) if input_schema is not None: - pulumi.set(__self__, "input_schema", input_schema) + _setter("input_schema", input_schema) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -230,34 +277,89 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_access_key: The Secondary Shared Access Key associated with the EventGrid Topic. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _EventGridTopicState._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint=endpoint, + identity=identity, + inbound_ip_rules=inbound_ip_rules, + input_mapping_default_values=input_mapping_default_values, + input_mapping_fields=input_mapping_fields, + input_schema=input_schema, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + primary_access_key=primary_access_key, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + secondary_access_key=secondary_access_key, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['EventGridTopicIdentityArgs']] = None, + inbound_ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['EventGridTopicInboundIpRuleArgs']]]] = None, + input_mapping_default_values: Optional[pulumi.Input['EventGridTopicInputMappingDefaultValuesArgs']] = None, + input_mapping_fields: Optional[pulumi.Input['EventGridTopicInputMappingFieldsArgs']] = None, + input_schema: Optional[pulumi.Input[str]] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_access_key: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_access_key: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if inbound_ip_rules is None and 'inboundIpRules' in kwargs: + inbound_ip_rules = kwargs['inboundIpRules'] + if input_mapping_default_values is None and 'inputMappingDefaultValues' in kwargs: + input_mapping_default_values = kwargs['inputMappingDefaultValues'] + if input_mapping_fields is None and 'inputMappingFields' in kwargs: + input_mapping_fields = kwargs['inputMappingFields'] + if input_schema is None and 'inputSchema' in kwargs: + input_schema = kwargs['inputSchema'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if primary_access_key is None and 'primaryAccessKey' in kwargs: + primary_access_key = kwargs['primaryAccessKey'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_access_key is None and 'secondaryAccessKey' in kwargs: + secondary_access_key = kwargs['secondaryAccessKey'] + if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if inbound_ip_rules is not None: - pulumi.set(__self__, "inbound_ip_rules", inbound_ip_rules) + _setter("inbound_ip_rules", inbound_ip_rules) if input_mapping_default_values is not None: - pulumi.set(__self__, "input_mapping_default_values", input_mapping_default_values) + _setter("input_mapping_default_values", input_mapping_default_values) if input_mapping_fields is not None: - pulumi.set(__self__, "input_mapping_fields", input_mapping_fields) + _setter("input_mapping_fields", input_mapping_fields) if input_schema is not None: - pulumi.set(__self__, "input_schema", input_schema) + _setter("input_schema", input_schema) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_access_key is not None: - pulumi.set(__self__, "primary_access_key", primary_access_key) + _setter("primary_access_key", primary_access_key) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_access_key is not None: - pulumi.set(__self__, "secondary_access_key", secondary_access_key) + _setter("secondary_access_key", secondary_access_key) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -536,6 +638,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EventGridTopicArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -562,9 +668,24 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = EventGridTopicArgs.__new__(EventGridTopicArgs) + if identity is not None and not isinstance(identity, EventGridTopicIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + EventGridTopicIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["inbound_ip_rules"] = inbound_ip_rules + if input_mapping_default_values is not None and not isinstance(input_mapping_default_values, EventGridTopicInputMappingDefaultValuesArgs): + input_mapping_default_values = input_mapping_default_values or {} + def _setter(key, value): + input_mapping_default_values[key] = value + EventGridTopicInputMappingDefaultValuesArgs._configure(_setter, **input_mapping_default_values) __props__.__dict__["input_mapping_default_values"] = input_mapping_default_values + if input_mapping_fields is not None and not isinstance(input_mapping_fields, EventGridTopicInputMappingFieldsArgs): + input_mapping_fields = input_mapping_fields or {} + def _setter(key, value): + input_mapping_fields[key] = value + EventGridTopicInputMappingFieldsArgs._configure(_setter, **input_mapping_fields) __props__.__dict__["input_mapping_fields"] = input_mapping_fields __props__.__dict__["input_schema"] = input_schema __props__.__dict__["local_auth_enabled"] = local_auth_enabled diff --git a/sdk/python/pulumi_azure/eventhub/event_hub.py b/sdk/python/pulumi_azure/eventhub/event_hub.py index b59f98adad..d00a82a501 100644 --- a/sdk/python/pulumi_azure/eventhub/event_hub.py +++ b/sdk/python/pulumi_azure/eventhub/event_hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,16 +39,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the EventHub resource. Changing this forces a new resource to be created. :param pulumi.Input[str] status: Specifies the status of the Event Hub resource. Possible values are `Active`, `Disabled` and `SendDisabled`. Defaults to `Active`. """ - pulumi.set(__self__, "message_retention", message_retention) - pulumi.set(__self__, "namespace_name", namespace_name) - pulumi.set(__self__, "partition_count", partition_count) - pulumi.set(__self__, "resource_group_name", resource_group_name) + EventHubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + message_retention=message_retention, + namespace_name=namespace_name, + partition_count=partition_count, + resource_group_name=resource_group_name, + capture_description=capture_description, + name=name, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + message_retention: Optional[pulumi.Input[int]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + partition_count: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + capture_description: Optional[pulumi.Input['EventHubCaptureDescriptionArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if message_retention is None and 'messageRetention' in kwargs: + message_retention = kwargs['messageRetention'] + if message_retention is None: + raise TypeError("Missing 'message_retention' argument") + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if namespace_name is None: + raise TypeError("Missing 'namespace_name' argument") + if partition_count is None and 'partitionCount' in kwargs: + partition_count = kwargs['partitionCount'] + if partition_count is None: + raise TypeError("Missing 'partition_count' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if capture_description is None and 'captureDescription' in kwargs: + capture_description = kwargs['captureDescription'] + + _setter("message_retention", message_retention) + _setter("namespace_name", namespace_name) + _setter("partition_count", partition_count) + _setter("resource_group_name", resource_group_name) if capture_description is not None: - pulumi.set(__self__, "capture_description", capture_description) + _setter("capture_description", capture_description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) @property @pulumi.getter(name="messageRetention") @@ -169,22 +210,59 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the EventHub's parent Namespace exists. Changing this forces a new resource to be created. :param pulumi.Input[str] status: Specifies the status of the Event Hub resource. Possible values are `Active`, `Disabled` and `SendDisabled`. Defaults to `Active`. """ + _EventHubState._configure( + lambda key, value: pulumi.set(__self__, key, value), + capture_description=capture_description, + message_retention=message_retention, + name=name, + namespace_name=namespace_name, + partition_count=partition_count, + partition_ids=partition_ids, + resource_group_name=resource_group_name, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capture_description: Optional[pulumi.Input['EventHubCaptureDescriptionArgs']] = None, + message_retention: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + partition_count: Optional[pulumi.Input[int]] = None, + partition_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capture_description is None and 'captureDescription' in kwargs: + capture_description = kwargs['captureDescription'] + if message_retention is None and 'messageRetention' in kwargs: + message_retention = kwargs['messageRetention'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if partition_count is None and 'partitionCount' in kwargs: + partition_count = kwargs['partitionCount'] + if partition_ids is None and 'partitionIds' in kwargs: + partition_ids = kwargs['partitionIds'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if capture_description is not None: - pulumi.set(__self__, "capture_description", capture_description) + _setter("capture_description", capture_description) if message_retention is not None: - pulumi.set(__self__, "message_retention", message_retention) + _setter("message_retention", message_retention) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if partition_count is not None: - pulumi.set(__self__, "partition_count", partition_count) + _setter("partition_count", partition_count) if partition_ids is not None: - pulumi.set(__self__, "partition_ids", partition_ids) + _setter("partition_ids", partition_ids) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) @property @pulumi.getter(name="captureDescription") @@ -400,6 +478,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EventHubArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -421,6 +503,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = EventHubArgs.__new__(EventHubArgs) + if capture_description is not None and not isinstance(capture_description, EventHubCaptureDescriptionArgs): + capture_description = capture_description or {} + def _setter(key, value): + capture_description[key] = value + EventHubCaptureDescriptionArgs._configure(_setter, **capture_description) __props__.__dict__["capture_description"] = capture_description if message_retention is None and not opts.urn: raise TypeError("Missing required property 'message_retention'") diff --git a/sdk/python/pulumi_azure/eventhub/event_hub_authorization_rule.py b/sdk/python/pulumi_azure/eventhub/event_hub_authorization_rule.py index 0b88b70a3e..584b08125e 100644 --- a/sdk/python/pulumi_azure/eventhub/event_hub_authorization_rule.py +++ b/sdk/python/pulumi_azure/eventhub/event_hub_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EventHubAuthorizationRuleArgs', 'EventHubAuthorizationRule'] @@ -33,17 +33,52 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created. :param pulumi.Input[bool] send: Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`. """ - pulumi.set(__self__, "eventhub_name", eventhub_name) - pulumi.set(__self__, "namespace_name", namespace_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + EventHubAuthorizationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_name=eventhub_name, + namespace_name=namespace_name, + resource_group_name=resource_group_name, + listen=listen, + manage=manage, + name=name, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_name is None: + raise TypeError("Missing 'eventhub_name' argument") + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if namespace_name is None: + raise TypeError("Missing 'namespace_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("eventhub_name", eventhub_name) + _setter("namespace_name", namespace_name) + _setter("resource_group_name", resource_group_name) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="eventhubName") @@ -166,32 +201,85 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_key: The Secondary Key for the Event Hubs Authorization Rule. :param pulumi.Input[bool] send: Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`. """ + _EventHubAuthorizationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_name=eventhub_name, + listen=listen, + manage=manage, + name=name, + namespace_name=namespace_name, + primary_connection_string=primary_connection_string, + primary_connection_string_alias=primary_connection_string_alias, + primary_key=primary_key, + resource_group_name=resource_group_name, + secondary_connection_string=secondary_connection_string, + secondary_connection_string_alias=secondary_connection_string_alias, + secondary_key=secondary_key, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_name: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_connection_string_alias: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_connection_string_alias: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_connection_string_alias is None and 'primaryConnectionStringAlias' in kwargs: + primary_connection_string_alias = kwargs['primaryConnectionStringAlias'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_connection_string_alias is None and 'secondaryConnectionStringAlias' in kwargs: + secondary_connection_string_alias = kwargs['secondaryConnectionStringAlias'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_connection_string_alias is not None: - pulumi.set(__self__, "primary_connection_string_alias", primary_connection_string_alias) + _setter("primary_connection_string_alias", primary_connection_string_alias) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_connection_string_alias is not None: - pulumi.set(__self__, "secondary_connection_string_alias", secondary_connection_string_alias) + _setter("secondary_connection_string_alias", secondary_connection_string_alias) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="eventhubName") @@ -478,6 +566,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EventHubAuthorizationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventhub/event_hub_consumer_group.py b/sdk/python/pulumi_azure/eventhub/event_hub_consumer_group.py index 55239a6a31..ef93ad8e0c 100644 --- a/sdk/python/pulumi_azure/eventhub/event_hub_consumer_group.py +++ b/sdk/python/pulumi_azure/eventhub/event_hub_consumer_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EventHubConsumerGroupArgs', 'EventHubConsumerGroup'] @@ -27,13 +27,46 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created. :param pulumi.Input[str] user_metadata: Specifies the user metadata. """ - pulumi.set(__self__, "eventhub_name", eventhub_name) - pulumi.set(__self__, "namespace_name", namespace_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + EventHubConsumerGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_name=eventhub_name, + namespace_name=namespace_name, + resource_group_name=resource_group_name, + name=name, + user_metadata=user_metadata, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + user_metadata: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_name is None: + raise TypeError("Missing 'eventhub_name' argument") + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if namespace_name is None: + raise TypeError("Missing 'namespace_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if user_metadata is None and 'userMetadata' in kwargs: + user_metadata = kwargs['userMetadata'] + + _setter("eventhub_name", eventhub_name) + _setter("namespace_name", namespace_name) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if user_metadata is not None: - pulumi.set(__self__, "user_metadata", user_metadata) + _setter("user_metadata", user_metadata) @property @pulumi.getter(name="eventhubName") @@ -112,16 +145,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created. :param pulumi.Input[str] user_metadata: Specifies the user metadata. """ + _EventHubConsumerGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_name=eventhub_name, + name=name, + namespace_name=namespace_name, + resource_group_name=resource_group_name, + user_metadata=user_metadata, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + user_metadata: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if user_metadata is None and 'userMetadata' in kwargs: + user_metadata = kwargs['userMetadata'] + if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if user_metadata is not None: - pulumi.set(__self__, "user_metadata", user_metadata) + _setter("user_metadata", user_metadata) @property @pulumi.getter(name="eventhubName") @@ -300,6 +360,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EventHubConsumerGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventhub/event_hub_namespace.py b/sdk/python/pulumi_azure/eventhub/event_hub_namespace.py index 72f3571520..9516ce9144 100644 --- a/sdk/python/pulumi_azure/eventhub/event_hub_namespace.py +++ b/sdk/python/pulumi_azure/eventhub/event_hub_namespace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -51,34 +51,95 @@ def __init__(__self__, *, > **Note:** For eventhub premium namespace, `zone_redundant` is computed by api based on the availability zone feature in each region. User's input will be overridden. Please explicitly sets the property to `true` when creating the premium namespace in a region that supports availability zone since the default value is `false` in 3.0 provider. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + EventHubNamespaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + auto_inflate_enabled=auto_inflate_enabled, + capacity=capacity, + dedicated_cluster_id=dedicated_cluster_id, + identity=identity, + local_authentication_enabled=local_authentication_enabled, + location=location, + maximum_throughput_units=maximum_throughput_units, + minimum_tls_version=minimum_tls_version, + name=name, + network_rulesets=network_rulesets, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + auto_inflate_enabled: Optional[pulumi.Input[bool]] = None, + capacity: Optional[pulumi.Input[int]] = None, + dedicated_cluster_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['EventHubNamespaceIdentityArgs']] = None, + local_authentication_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + maximum_throughput_units: Optional[pulumi.Input[int]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_rulesets: Optional[pulumi.Input['EventHubNamespaceNetworkRulesetsArgs']] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if auto_inflate_enabled is None and 'autoInflateEnabled' in kwargs: + auto_inflate_enabled = kwargs['autoInflateEnabled'] + if dedicated_cluster_id is None and 'dedicatedClusterId' in kwargs: + dedicated_cluster_id = kwargs['dedicatedClusterId'] + if local_authentication_enabled is None and 'localAuthenticationEnabled' in kwargs: + local_authentication_enabled = kwargs['localAuthenticationEnabled'] + if maximum_throughput_units is None and 'maximumThroughputUnits' in kwargs: + maximum_throughput_units = kwargs['maximumThroughputUnits'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if network_rulesets is None and 'networkRulesets' in kwargs: + network_rulesets = kwargs['networkRulesets'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if auto_inflate_enabled is not None: - pulumi.set(__self__, "auto_inflate_enabled", auto_inflate_enabled) + _setter("auto_inflate_enabled", auto_inflate_enabled) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if dedicated_cluster_id is not None: - pulumi.set(__self__, "dedicated_cluster_id", dedicated_cluster_id) + _setter("dedicated_cluster_id", dedicated_cluster_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_authentication_enabled is not None: - pulumi.set(__self__, "local_authentication_enabled", local_authentication_enabled) + _setter("local_authentication_enabled", local_authentication_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maximum_throughput_units is not None: - pulumi.set(__self__, "maximum_throughput_units", maximum_throughput_units) + _setter("maximum_throughput_units", maximum_throughput_units) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_rulesets is not None: - pulumi.set(__self__, "network_rulesets", network_rulesets) + _setter("network_rulesets", network_rulesets) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="resourceGroupName") @@ -313,48 +374,129 @@ def __init__(__self__, *, > **Note:** For eventhub premium namespace, `zone_redundant` is computed by api based on the availability zone feature in each region. User's input will be overridden. Please explicitly sets the property to `true` when creating the premium namespace in a region that supports availability zone since the default value is `false` in 3.0 provider. """ + _EventHubNamespaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_inflate_enabled=auto_inflate_enabled, + capacity=capacity, + dedicated_cluster_id=dedicated_cluster_id, + default_primary_connection_string=default_primary_connection_string, + default_primary_connection_string_alias=default_primary_connection_string_alias, + default_primary_key=default_primary_key, + default_secondary_connection_string=default_secondary_connection_string, + default_secondary_connection_string_alias=default_secondary_connection_string_alias, + default_secondary_key=default_secondary_key, + identity=identity, + local_authentication_enabled=local_authentication_enabled, + location=location, + maximum_throughput_units=maximum_throughput_units, + minimum_tls_version=minimum_tls_version, + name=name, + network_rulesets=network_rulesets, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + sku=sku, + tags=tags, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_inflate_enabled: Optional[pulumi.Input[bool]] = None, + capacity: Optional[pulumi.Input[int]] = None, + dedicated_cluster_id: Optional[pulumi.Input[str]] = None, + default_primary_connection_string: Optional[pulumi.Input[str]] = None, + default_primary_connection_string_alias: Optional[pulumi.Input[str]] = None, + default_primary_key: Optional[pulumi.Input[str]] = None, + default_secondary_connection_string: Optional[pulumi.Input[str]] = None, + default_secondary_connection_string_alias: Optional[pulumi.Input[str]] = None, + default_secondary_key: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['EventHubNamespaceIdentityArgs']] = None, + local_authentication_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + maximum_throughput_units: Optional[pulumi.Input[int]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_rulesets: Optional[pulumi.Input['EventHubNamespaceNetworkRulesetsArgs']] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_inflate_enabled is None and 'autoInflateEnabled' in kwargs: + auto_inflate_enabled = kwargs['autoInflateEnabled'] + if dedicated_cluster_id is None and 'dedicatedClusterId' in kwargs: + dedicated_cluster_id = kwargs['dedicatedClusterId'] + if default_primary_connection_string is None and 'defaultPrimaryConnectionString' in kwargs: + default_primary_connection_string = kwargs['defaultPrimaryConnectionString'] + if default_primary_connection_string_alias is None and 'defaultPrimaryConnectionStringAlias' in kwargs: + default_primary_connection_string_alias = kwargs['defaultPrimaryConnectionStringAlias'] + if default_primary_key is None and 'defaultPrimaryKey' in kwargs: + default_primary_key = kwargs['defaultPrimaryKey'] + if default_secondary_connection_string is None and 'defaultSecondaryConnectionString' in kwargs: + default_secondary_connection_string = kwargs['defaultSecondaryConnectionString'] + if default_secondary_connection_string_alias is None and 'defaultSecondaryConnectionStringAlias' in kwargs: + default_secondary_connection_string_alias = kwargs['defaultSecondaryConnectionStringAlias'] + if default_secondary_key is None and 'defaultSecondaryKey' in kwargs: + default_secondary_key = kwargs['defaultSecondaryKey'] + if local_authentication_enabled is None and 'localAuthenticationEnabled' in kwargs: + local_authentication_enabled = kwargs['localAuthenticationEnabled'] + if maximum_throughput_units is None and 'maximumThroughputUnits' in kwargs: + maximum_throughput_units = kwargs['maximumThroughputUnits'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if network_rulesets is None and 'networkRulesets' in kwargs: + network_rulesets = kwargs['networkRulesets'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + if auto_inflate_enabled is not None: - pulumi.set(__self__, "auto_inflate_enabled", auto_inflate_enabled) + _setter("auto_inflate_enabled", auto_inflate_enabled) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if dedicated_cluster_id is not None: - pulumi.set(__self__, "dedicated_cluster_id", dedicated_cluster_id) + _setter("dedicated_cluster_id", dedicated_cluster_id) if default_primary_connection_string is not None: - pulumi.set(__self__, "default_primary_connection_string", default_primary_connection_string) + _setter("default_primary_connection_string", default_primary_connection_string) if default_primary_connection_string_alias is not None: - pulumi.set(__self__, "default_primary_connection_string_alias", default_primary_connection_string_alias) + _setter("default_primary_connection_string_alias", default_primary_connection_string_alias) if default_primary_key is not None: - pulumi.set(__self__, "default_primary_key", default_primary_key) + _setter("default_primary_key", default_primary_key) if default_secondary_connection_string is not None: - pulumi.set(__self__, "default_secondary_connection_string", default_secondary_connection_string) + _setter("default_secondary_connection_string", default_secondary_connection_string) if default_secondary_connection_string_alias is not None: - pulumi.set(__self__, "default_secondary_connection_string_alias", default_secondary_connection_string_alias) + _setter("default_secondary_connection_string_alias", default_secondary_connection_string_alias) if default_secondary_key is not None: - pulumi.set(__self__, "default_secondary_key", default_secondary_key) + _setter("default_secondary_key", default_secondary_key) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_authentication_enabled is not None: - pulumi.set(__self__, "local_authentication_enabled", local_authentication_enabled) + _setter("local_authentication_enabled", local_authentication_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maximum_throughput_units is not None: - pulumi.set(__self__, "maximum_throughput_units", maximum_throughput_units) + _setter("maximum_throughput_units", maximum_throughput_units) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_rulesets is not None: - pulumi.set(__self__, "network_rulesets", network_rulesets) + _setter("network_rulesets", network_rulesets) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="autoInflateEnabled") @@ -724,6 +866,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EventHubNamespaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -756,12 +902,22 @@ def _internal_init(__self__, __props__.__dict__["auto_inflate_enabled"] = auto_inflate_enabled __props__.__dict__["capacity"] = capacity __props__.__dict__["dedicated_cluster_id"] = dedicated_cluster_id + if identity is not None and not isinstance(identity, EventHubNamespaceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + EventHubNamespaceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["local_authentication_enabled"] = local_authentication_enabled __props__.__dict__["location"] = location __props__.__dict__["maximum_throughput_units"] = maximum_throughput_units __props__.__dict__["minimum_tls_version"] = minimum_tls_version __props__.__dict__["name"] = name + if network_rulesets is not None and not isinstance(network_rulesets, EventHubNamespaceNetworkRulesetsArgs): + network_rulesets = network_rulesets or {} + def _setter(key, value): + network_rulesets[key] = value + EventHubNamespaceNetworkRulesetsArgs._configure(_setter, **network_rulesets) __props__.__dict__["network_rulesets"] = network_rulesets __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled if resource_group_name is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/eventhub/event_hub_namespace_authorization_rule.py b/sdk/python/pulumi_azure/eventhub/event_hub_namespace_authorization_rule.py index 98a775b555..484c183f5b 100644 --- a/sdk/python/pulumi_azure/eventhub/event_hub_namespace_authorization_rule.py +++ b/sdk/python/pulumi_azure/eventhub/event_hub_namespace_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EventHubNamespaceAuthorizationRuleArgs', 'EventHubNamespaceAuthorizationRule'] @@ -31,16 +31,45 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Authorization Rule. Changing this forces a new resource to be created. :param pulumi.Input[bool] send: Grants send access to this this Authorization Rule. Defaults to `false`. """ - pulumi.set(__self__, "namespace_name", namespace_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + EventHubNamespaceAuthorizationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_name=namespace_name, + resource_group_name=resource_group_name, + listen=listen, + manage=manage, + name=name, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if namespace_name is None: + raise TypeError("Missing 'namespace_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("namespace_name", namespace_name) + _setter("resource_group_name", resource_group_name) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="namespaceName") @@ -149,30 +178,79 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_key: The Secondary Key for the Authorization Rule. :param pulumi.Input[bool] send: Grants send access to this this Authorization Rule. Defaults to `false`. """ + _EventHubNamespaceAuthorizationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + listen=listen, + manage=manage, + name=name, + namespace_name=namespace_name, + primary_connection_string=primary_connection_string, + primary_connection_string_alias=primary_connection_string_alias, + primary_key=primary_key, + resource_group_name=resource_group_name, + secondary_connection_string=secondary_connection_string, + secondary_connection_string_alias=secondary_connection_string_alias, + secondary_key=secondary_key, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_connection_string_alias: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_connection_string_alias: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_connection_string_alias is None and 'primaryConnectionStringAlias' in kwargs: + primary_connection_string_alias = kwargs['primaryConnectionStringAlias'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_connection_string_alias is None and 'secondaryConnectionStringAlias' in kwargs: + secondary_connection_string_alias = kwargs['secondaryConnectionStringAlias'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_connection_string_alias is not None: - pulumi.set(__self__, "primary_connection_string_alias", primary_connection_string_alias) + _setter("primary_connection_string_alias", primary_connection_string_alias) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_connection_string_alias is not None: - pulumi.set(__self__, "secondary_connection_string_alias", secondary_connection_string_alias) + _setter("secondary_connection_string_alias", secondary_connection_string_alias) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter @@ -428,6 +506,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EventHubNamespaceAuthorizationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventhub/event_subscription.py b/sdk/python/pulumi_azure/eventhub/event_subscription.py index b10e41b2b0..6dbd767a50 100644 --- a/sdk/python/pulumi_azure/eventhub/event_subscription.py +++ b/sdk/python/pulumi_azure/eventhub/event_subscription.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -65,47 +65,136 @@ def __init__(__self__, *, > **NOTE:** One of `eventhub_endpoint_id`, `hybrid_connection_endpoint_id`, `service_bus_queue_endpoint_id`, `service_bus_topic_endpoint_id`, `storage_queue_endpoint`, `webhook_endpoint` or `azure_function_endpoint` must be specified. """ - pulumi.set(__self__, "scope", scope) + EventSubscriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + scope=scope, + advanced_filter=advanced_filter, + advanced_filtering_on_arrays_enabled=advanced_filtering_on_arrays_enabled, + azure_function_endpoint=azure_function_endpoint, + dead_letter_identity=dead_letter_identity, + delivery_identity=delivery_identity, + delivery_properties=delivery_properties, + event_delivery_schema=event_delivery_schema, + eventhub_endpoint_id=eventhub_endpoint_id, + expiration_time_utc=expiration_time_utc, + hybrid_connection_endpoint_id=hybrid_connection_endpoint_id, + included_event_types=included_event_types, + labels=labels, + name=name, + retry_policy=retry_policy, + service_bus_queue_endpoint_id=service_bus_queue_endpoint_id, + service_bus_topic_endpoint_id=service_bus_topic_endpoint_id, + storage_blob_dead_letter_destination=storage_blob_dead_letter_destination, + storage_queue_endpoint=storage_queue_endpoint, + subject_filter=subject_filter, + webhook_endpoint=webhook_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + scope: Optional[pulumi.Input[str]] = None, + advanced_filter: Optional[pulumi.Input['EventSubscriptionAdvancedFilterArgs']] = None, + advanced_filtering_on_arrays_enabled: Optional[pulumi.Input[bool]] = None, + azure_function_endpoint: Optional[pulumi.Input['EventSubscriptionAzureFunctionEndpointArgs']] = None, + dead_letter_identity: Optional[pulumi.Input['EventSubscriptionDeadLetterIdentityArgs']] = None, + delivery_identity: Optional[pulumi.Input['EventSubscriptionDeliveryIdentityArgs']] = None, + delivery_properties: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionDeliveryPropertyArgs']]]] = None, + event_delivery_schema: Optional[pulumi.Input[str]] = None, + eventhub_endpoint_id: Optional[pulumi.Input[str]] = None, + expiration_time_utc: Optional[pulumi.Input[str]] = None, + hybrid_connection_endpoint_id: Optional[pulumi.Input[str]] = None, + included_event_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + retry_policy: Optional[pulumi.Input['EventSubscriptionRetryPolicyArgs']] = None, + service_bus_queue_endpoint_id: Optional[pulumi.Input[str]] = None, + service_bus_topic_endpoint_id: Optional[pulumi.Input[str]] = None, + storage_blob_dead_letter_destination: Optional[pulumi.Input['EventSubscriptionStorageBlobDeadLetterDestinationArgs']] = None, + storage_queue_endpoint: Optional[pulumi.Input['EventSubscriptionStorageQueueEndpointArgs']] = None, + subject_filter: Optional[pulumi.Input['EventSubscriptionSubjectFilterArgs']] = None, + webhook_endpoint: Optional[pulumi.Input['EventSubscriptionWebhookEndpointArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if scope is None: + raise TypeError("Missing 'scope' argument") + if advanced_filter is None and 'advancedFilter' in kwargs: + advanced_filter = kwargs['advancedFilter'] + if advanced_filtering_on_arrays_enabled is None and 'advancedFilteringOnArraysEnabled' in kwargs: + advanced_filtering_on_arrays_enabled = kwargs['advancedFilteringOnArraysEnabled'] + if azure_function_endpoint is None and 'azureFunctionEndpoint' in kwargs: + azure_function_endpoint = kwargs['azureFunctionEndpoint'] + if dead_letter_identity is None and 'deadLetterIdentity' in kwargs: + dead_letter_identity = kwargs['deadLetterIdentity'] + if delivery_identity is None and 'deliveryIdentity' in kwargs: + delivery_identity = kwargs['deliveryIdentity'] + if delivery_properties is None and 'deliveryProperties' in kwargs: + delivery_properties = kwargs['deliveryProperties'] + if event_delivery_schema is None and 'eventDeliverySchema' in kwargs: + event_delivery_schema = kwargs['eventDeliverySchema'] + if eventhub_endpoint_id is None and 'eventhubEndpointId' in kwargs: + eventhub_endpoint_id = kwargs['eventhubEndpointId'] + if expiration_time_utc is None and 'expirationTimeUtc' in kwargs: + expiration_time_utc = kwargs['expirationTimeUtc'] + if hybrid_connection_endpoint_id is None and 'hybridConnectionEndpointId' in kwargs: + hybrid_connection_endpoint_id = kwargs['hybridConnectionEndpointId'] + if included_event_types is None and 'includedEventTypes' in kwargs: + included_event_types = kwargs['includedEventTypes'] + if retry_policy is None and 'retryPolicy' in kwargs: + retry_policy = kwargs['retryPolicy'] + if service_bus_queue_endpoint_id is None and 'serviceBusQueueEndpointId' in kwargs: + service_bus_queue_endpoint_id = kwargs['serviceBusQueueEndpointId'] + if service_bus_topic_endpoint_id is None and 'serviceBusTopicEndpointId' in kwargs: + service_bus_topic_endpoint_id = kwargs['serviceBusTopicEndpointId'] + if storage_blob_dead_letter_destination is None and 'storageBlobDeadLetterDestination' in kwargs: + storage_blob_dead_letter_destination = kwargs['storageBlobDeadLetterDestination'] + if storage_queue_endpoint is None and 'storageQueueEndpoint' in kwargs: + storage_queue_endpoint = kwargs['storageQueueEndpoint'] + if subject_filter is None and 'subjectFilter' in kwargs: + subject_filter = kwargs['subjectFilter'] + if webhook_endpoint is None and 'webhookEndpoint' in kwargs: + webhook_endpoint = kwargs['webhookEndpoint'] + + _setter("scope", scope) if advanced_filter is not None: - pulumi.set(__self__, "advanced_filter", advanced_filter) + _setter("advanced_filter", advanced_filter) if advanced_filtering_on_arrays_enabled is not None: - pulumi.set(__self__, "advanced_filtering_on_arrays_enabled", advanced_filtering_on_arrays_enabled) + _setter("advanced_filtering_on_arrays_enabled", advanced_filtering_on_arrays_enabled) if azure_function_endpoint is not None: - pulumi.set(__self__, "azure_function_endpoint", azure_function_endpoint) + _setter("azure_function_endpoint", azure_function_endpoint) if dead_letter_identity is not None: - pulumi.set(__self__, "dead_letter_identity", dead_letter_identity) + _setter("dead_letter_identity", dead_letter_identity) if delivery_identity is not None: - pulumi.set(__self__, "delivery_identity", delivery_identity) + _setter("delivery_identity", delivery_identity) if delivery_properties is not None: - pulumi.set(__self__, "delivery_properties", delivery_properties) + _setter("delivery_properties", delivery_properties) if event_delivery_schema is not None: - pulumi.set(__self__, "event_delivery_schema", event_delivery_schema) + _setter("event_delivery_schema", event_delivery_schema) if eventhub_endpoint_id is not None: - pulumi.set(__self__, "eventhub_endpoint_id", eventhub_endpoint_id) + _setter("eventhub_endpoint_id", eventhub_endpoint_id) if expiration_time_utc is not None: - pulumi.set(__self__, "expiration_time_utc", expiration_time_utc) + _setter("expiration_time_utc", expiration_time_utc) if hybrid_connection_endpoint_id is not None: - pulumi.set(__self__, "hybrid_connection_endpoint_id", hybrid_connection_endpoint_id) + _setter("hybrid_connection_endpoint_id", hybrid_connection_endpoint_id) if included_event_types is not None: - pulumi.set(__self__, "included_event_types", included_event_types) + _setter("included_event_types", included_event_types) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retry_policy is not None: - pulumi.set(__self__, "retry_policy", retry_policy) + _setter("retry_policy", retry_policy) if service_bus_queue_endpoint_id is not None: - pulumi.set(__self__, "service_bus_queue_endpoint_id", service_bus_queue_endpoint_id) + _setter("service_bus_queue_endpoint_id", service_bus_queue_endpoint_id) if service_bus_topic_endpoint_id is not None: - pulumi.set(__self__, "service_bus_topic_endpoint_id", service_bus_topic_endpoint_id) + _setter("service_bus_topic_endpoint_id", service_bus_topic_endpoint_id) if storage_blob_dead_letter_destination is not None: - pulumi.set(__self__, "storage_blob_dead_letter_destination", storage_blob_dead_letter_destination) + _setter("storage_blob_dead_letter_destination", storage_blob_dead_letter_destination) if storage_queue_endpoint is not None: - pulumi.set(__self__, "storage_queue_endpoint", storage_queue_endpoint) + _setter("storage_queue_endpoint", storage_queue_endpoint) if subject_filter is not None: - pulumi.set(__self__, "subject_filter", subject_filter) + _setter("subject_filter", subject_filter) if webhook_endpoint is not None: - pulumi.set(__self__, "webhook_endpoint", webhook_endpoint) + _setter("webhook_endpoint", webhook_endpoint) @property @pulumi.getter @@ -416,48 +505,135 @@ def __init__(__self__, *, > **NOTE:** One of `eventhub_endpoint_id`, `hybrid_connection_endpoint_id`, `service_bus_queue_endpoint_id`, `service_bus_topic_endpoint_id`, `storage_queue_endpoint`, `webhook_endpoint` or `azure_function_endpoint` must be specified. """ + _EventSubscriptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + advanced_filter=advanced_filter, + advanced_filtering_on_arrays_enabled=advanced_filtering_on_arrays_enabled, + azure_function_endpoint=azure_function_endpoint, + dead_letter_identity=dead_letter_identity, + delivery_identity=delivery_identity, + delivery_properties=delivery_properties, + event_delivery_schema=event_delivery_schema, + eventhub_endpoint_id=eventhub_endpoint_id, + expiration_time_utc=expiration_time_utc, + hybrid_connection_endpoint_id=hybrid_connection_endpoint_id, + included_event_types=included_event_types, + labels=labels, + name=name, + retry_policy=retry_policy, + scope=scope, + service_bus_queue_endpoint_id=service_bus_queue_endpoint_id, + service_bus_topic_endpoint_id=service_bus_topic_endpoint_id, + storage_blob_dead_letter_destination=storage_blob_dead_letter_destination, + storage_queue_endpoint=storage_queue_endpoint, + subject_filter=subject_filter, + webhook_endpoint=webhook_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + advanced_filter: Optional[pulumi.Input['EventSubscriptionAdvancedFilterArgs']] = None, + advanced_filtering_on_arrays_enabled: Optional[pulumi.Input[bool]] = None, + azure_function_endpoint: Optional[pulumi.Input['EventSubscriptionAzureFunctionEndpointArgs']] = None, + dead_letter_identity: Optional[pulumi.Input['EventSubscriptionDeadLetterIdentityArgs']] = None, + delivery_identity: Optional[pulumi.Input['EventSubscriptionDeliveryIdentityArgs']] = None, + delivery_properties: Optional[pulumi.Input[Sequence[pulumi.Input['EventSubscriptionDeliveryPropertyArgs']]]] = None, + event_delivery_schema: Optional[pulumi.Input[str]] = None, + eventhub_endpoint_id: Optional[pulumi.Input[str]] = None, + expiration_time_utc: Optional[pulumi.Input[str]] = None, + hybrid_connection_endpoint_id: Optional[pulumi.Input[str]] = None, + included_event_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + retry_policy: Optional[pulumi.Input['EventSubscriptionRetryPolicyArgs']] = None, + scope: Optional[pulumi.Input[str]] = None, + service_bus_queue_endpoint_id: Optional[pulumi.Input[str]] = None, + service_bus_topic_endpoint_id: Optional[pulumi.Input[str]] = None, + storage_blob_dead_letter_destination: Optional[pulumi.Input['EventSubscriptionStorageBlobDeadLetterDestinationArgs']] = None, + storage_queue_endpoint: Optional[pulumi.Input['EventSubscriptionStorageQueueEndpointArgs']] = None, + subject_filter: Optional[pulumi.Input['EventSubscriptionSubjectFilterArgs']] = None, + webhook_endpoint: Optional[pulumi.Input['EventSubscriptionWebhookEndpointArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if advanced_filter is None and 'advancedFilter' in kwargs: + advanced_filter = kwargs['advancedFilter'] + if advanced_filtering_on_arrays_enabled is None and 'advancedFilteringOnArraysEnabled' in kwargs: + advanced_filtering_on_arrays_enabled = kwargs['advancedFilteringOnArraysEnabled'] + if azure_function_endpoint is None and 'azureFunctionEndpoint' in kwargs: + azure_function_endpoint = kwargs['azureFunctionEndpoint'] + if dead_letter_identity is None and 'deadLetterIdentity' in kwargs: + dead_letter_identity = kwargs['deadLetterIdentity'] + if delivery_identity is None and 'deliveryIdentity' in kwargs: + delivery_identity = kwargs['deliveryIdentity'] + if delivery_properties is None and 'deliveryProperties' in kwargs: + delivery_properties = kwargs['deliveryProperties'] + if event_delivery_schema is None and 'eventDeliverySchema' in kwargs: + event_delivery_schema = kwargs['eventDeliverySchema'] + if eventhub_endpoint_id is None and 'eventhubEndpointId' in kwargs: + eventhub_endpoint_id = kwargs['eventhubEndpointId'] + if expiration_time_utc is None and 'expirationTimeUtc' in kwargs: + expiration_time_utc = kwargs['expirationTimeUtc'] + if hybrid_connection_endpoint_id is None and 'hybridConnectionEndpointId' in kwargs: + hybrid_connection_endpoint_id = kwargs['hybridConnectionEndpointId'] + if included_event_types is None and 'includedEventTypes' in kwargs: + included_event_types = kwargs['includedEventTypes'] + if retry_policy is None and 'retryPolicy' in kwargs: + retry_policy = kwargs['retryPolicy'] + if service_bus_queue_endpoint_id is None and 'serviceBusQueueEndpointId' in kwargs: + service_bus_queue_endpoint_id = kwargs['serviceBusQueueEndpointId'] + if service_bus_topic_endpoint_id is None and 'serviceBusTopicEndpointId' in kwargs: + service_bus_topic_endpoint_id = kwargs['serviceBusTopicEndpointId'] + if storage_blob_dead_letter_destination is None and 'storageBlobDeadLetterDestination' in kwargs: + storage_blob_dead_letter_destination = kwargs['storageBlobDeadLetterDestination'] + if storage_queue_endpoint is None and 'storageQueueEndpoint' in kwargs: + storage_queue_endpoint = kwargs['storageQueueEndpoint'] + if subject_filter is None and 'subjectFilter' in kwargs: + subject_filter = kwargs['subjectFilter'] + if webhook_endpoint is None and 'webhookEndpoint' in kwargs: + webhook_endpoint = kwargs['webhookEndpoint'] + if advanced_filter is not None: - pulumi.set(__self__, "advanced_filter", advanced_filter) + _setter("advanced_filter", advanced_filter) if advanced_filtering_on_arrays_enabled is not None: - pulumi.set(__self__, "advanced_filtering_on_arrays_enabled", advanced_filtering_on_arrays_enabled) + _setter("advanced_filtering_on_arrays_enabled", advanced_filtering_on_arrays_enabled) if azure_function_endpoint is not None: - pulumi.set(__self__, "azure_function_endpoint", azure_function_endpoint) + _setter("azure_function_endpoint", azure_function_endpoint) if dead_letter_identity is not None: - pulumi.set(__self__, "dead_letter_identity", dead_letter_identity) + _setter("dead_letter_identity", dead_letter_identity) if delivery_identity is not None: - pulumi.set(__self__, "delivery_identity", delivery_identity) + _setter("delivery_identity", delivery_identity) if delivery_properties is not None: - pulumi.set(__self__, "delivery_properties", delivery_properties) + _setter("delivery_properties", delivery_properties) if event_delivery_schema is not None: - pulumi.set(__self__, "event_delivery_schema", event_delivery_schema) + _setter("event_delivery_schema", event_delivery_schema) if eventhub_endpoint_id is not None: - pulumi.set(__self__, "eventhub_endpoint_id", eventhub_endpoint_id) + _setter("eventhub_endpoint_id", eventhub_endpoint_id) if expiration_time_utc is not None: - pulumi.set(__self__, "expiration_time_utc", expiration_time_utc) + _setter("expiration_time_utc", expiration_time_utc) if hybrid_connection_endpoint_id is not None: - pulumi.set(__self__, "hybrid_connection_endpoint_id", hybrid_connection_endpoint_id) + _setter("hybrid_connection_endpoint_id", hybrid_connection_endpoint_id) if included_event_types is not None: - pulumi.set(__self__, "included_event_types", included_event_types) + _setter("included_event_types", included_event_types) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retry_policy is not None: - pulumi.set(__self__, "retry_policy", retry_policy) + _setter("retry_policy", retry_policy) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if service_bus_queue_endpoint_id is not None: - pulumi.set(__self__, "service_bus_queue_endpoint_id", service_bus_queue_endpoint_id) + _setter("service_bus_queue_endpoint_id", service_bus_queue_endpoint_id) if service_bus_topic_endpoint_id is not None: - pulumi.set(__self__, "service_bus_topic_endpoint_id", service_bus_topic_endpoint_id) + _setter("service_bus_topic_endpoint_id", service_bus_topic_endpoint_id) if storage_blob_dead_letter_destination is not None: - pulumi.set(__self__, "storage_blob_dead_letter_destination", storage_blob_dead_letter_destination) + _setter("storage_blob_dead_letter_destination", storage_blob_dead_letter_destination) if storage_queue_endpoint is not None: - pulumi.set(__self__, "storage_queue_endpoint", storage_queue_endpoint) + _setter("storage_queue_endpoint", storage_queue_endpoint) if subject_filter is not None: - pulumi.set(__self__, "subject_filter", subject_filter) + _setter("subject_filter", subject_filter) if webhook_endpoint is not None: - pulumi.set(__self__, "webhook_endpoint", webhook_endpoint) + _setter("webhook_endpoint", webhook_endpoint) @property @pulumi.getter(name="advancedFilter") @@ -862,6 +1038,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EventSubscriptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -898,10 +1078,30 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = EventSubscriptionArgs.__new__(EventSubscriptionArgs) + if advanced_filter is not None and not isinstance(advanced_filter, EventSubscriptionAdvancedFilterArgs): + advanced_filter = advanced_filter or {} + def _setter(key, value): + advanced_filter[key] = value + EventSubscriptionAdvancedFilterArgs._configure(_setter, **advanced_filter) __props__.__dict__["advanced_filter"] = advanced_filter __props__.__dict__["advanced_filtering_on_arrays_enabled"] = advanced_filtering_on_arrays_enabled + if azure_function_endpoint is not None and not isinstance(azure_function_endpoint, EventSubscriptionAzureFunctionEndpointArgs): + azure_function_endpoint = azure_function_endpoint or {} + def _setter(key, value): + azure_function_endpoint[key] = value + EventSubscriptionAzureFunctionEndpointArgs._configure(_setter, **azure_function_endpoint) __props__.__dict__["azure_function_endpoint"] = azure_function_endpoint + if dead_letter_identity is not None and not isinstance(dead_letter_identity, EventSubscriptionDeadLetterIdentityArgs): + dead_letter_identity = dead_letter_identity or {} + def _setter(key, value): + dead_letter_identity[key] = value + EventSubscriptionDeadLetterIdentityArgs._configure(_setter, **dead_letter_identity) __props__.__dict__["dead_letter_identity"] = dead_letter_identity + if delivery_identity is not None and not isinstance(delivery_identity, EventSubscriptionDeliveryIdentityArgs): + delivery_identity = delivery_identity or {} + def _setter(key, value): + delivery_identity[key] = value + EventSubscriptionDeliveryIdentityArgs._configure(_setter, **delivery_identity) __props__.__dict__["delivery_identity"] = delivery_identity __props__.__dict__["delivery_properties"] = delivery_properties __props__.__dict__["event_delivery_schema"] = event_delivery_schema @@ -911,15 +1111,40 @@ def _internal_init(__self__, __props__.__dict__["included_event_types"] = included_event_types __props__.__dict__["labels"] = labels __props__.__dict__["name"] = name + if retry_policy is not None and not isinstance(retry_policy, EventSubscriptionRetryPolicyArgs): + retry_policy = retry_policy or {} + def _setter(key, value): + retry_policy[key] = value + EventSubscriptionRetryPolicyArgs._configure(_setter, **retry_policy) __props__.__dict__["retry_policy"] = retry_policy if scope is None and not opts.urn: raise TypeError("Missing required property 'scope'") __props__.__dict__["scope"] = scope __props__.__dict__["service_bus_queue_endpoint_id"] = service_bus_queue_endpoint_id __props__.__dict__["service_bus_topic_endpoint_id"] = service_bus_topic_endpoint_id + if storage_blob_dead_letter_destination is not None and not isinstance(storage_blob_dead_letter_destination, EventSubscriptionStorageBlobDeadLetterDestinationArgs): + storage_blob_dead_letter_destination = storage_blob_dead_letter_destination or {} + def _setter(key, value): + storage_blob_dead_letter_destination[key] = value + EventSubscriptionStorageBlobDeadLetterDestinationArgs._configure(_setter, **storage_blob_dead_letter_destination) __props__.__dict__["storage_blob_dead_letter_destination"] = storage_blob_dead_letter_destination + if storage_queue_endpoint is not None and not isinstance(storage_queue_endpoint, EventSubscriptionStorageQueueEndpointArgs): + storage_queue_endpoint = storage_queue_endpoint or {} + def _setter(key, value): + storage_queue_endpoint[key] = value + EventSubscriptionStorageQueueEndpointArgs._configure(_setter, **storage_queue_endpoint) __props__.__dict__["storage_queue_endpoint"] = storage_queue_endpoint + if subject_filter is not None and not isinstance(subject_filter, EventSubscriptionSubjectFilterArgs): + subject_filter = subject_filter or {} + def _setter(key, value): + subject_filter[key] = value + EventSubscriptionSubjectFilterArgs._configure(_setter, **subject_filter) __props__.__dict__["subject_filter"] = subject_filter + if webhook_endpoint is not None and not isinstance(webhook_endpoint, EventSubscriptionWebhookEndpointArgs): + webhook_endpoint = webhook_endpoint or {} + def _setter(key, value): + webhook_endpoint[key] = value + EventSubscriptionWebhookEndpointArgs._configure(_setter, **webhook_endpoint) __props__.__dict__["webhook_endpoint"] = webhook_endpoint super(EventSubscription, __self__).__init__( 'azure:eventhub/eventSubscription:EventSubscription', diff --git a/sdk/python/pulumi_azure/eventhub/eventhub_namespace_disaster_recovery_config.py b/sdk/python/pulumi_azure/eventhub/eventhub_namespace_disaster_recovery_config.py index b5779ebae8..237c5fa3a4 100644 --- a/sdk/python/pulumi_azure/eventhub/eventhub_namespace_disaster_recovery_config.py +++ b/sdk/python/pulumi_azure/eventhub/eventhub_namespace_disaster_recovery_config.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EventhubNamespaceDisasterRecoveryConfigArgs', 'EventhubNamespaceDisasterRecoveryConfig'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "namespace_name", namespace_name) - pulumi.set(__self__, "partner_namespace_id", partner_namespace_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + EventhubNamespaceDisasterRecoveryConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_name=namespace_name, + partner_namespace_id=partner_namespace_id, + resource_group_name=resource_group_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_name: Optional[pulumi.Input[str]] = None, + partner_namespace_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if namespace_name is None: + raise TypeError("Missing 'namespace_name' argument") + if partner_namespace_id is None and 'partnerNamespaceId' in kwargs: + partner_namespace_id = kwargs['partnerNamespaceId'] + if partner_namespace_id is None: + raise TypeError("Missing 'partner_namespace_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("namespace_name", namespace_name) + _setter("partner_namespace_id", partner_namespace_id) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="namespaceName") @@ -94,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[str] partner_namespace_id: The ID of the EventHub Namespace to replicate to. :param pulumi.Input[str] resource_group_name: The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created. """ + _EventhubNamespaceDisasterRecoveryConfigState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + namespace_name=namespace_name, + partner_namespace_id=partner_namespace_id, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + partner_namespace_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if partner_namespace_id is None and 'partnerNamespaceId' in kwargs: + partner_namespace_id = kwargs['partnerNamespaceId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if partner_namespace_id is not None: - pulumi.set(__self__, "partner_namespace_id", partner_namespace_id) + _setter("partner_namespace_id", partner_namespace_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter @@ -249,6 +301,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EventhubNamespaceDisasterRecoveryConfigArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventhub/get_authorization_rule.py b/sdk/python/pulumi_azure/eventhub/get_authorization_rule.py index d360382264..26557f4fac 100644 --- a/sdk/python/pulumi_azure/eventhub/get_authorization_rule.py +++ b/sdk/python/pulumi_azure/eventhub/get_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/eventhub/get_cluster.py b/sdk/python/pulumi_azure/eventhub/get_cluster.py index de3b3cf70d..6220ade2c3 100644 --- a/sdk/python/pulumi_azure/eventhub/get_cluster.py +++ b/sdk/python/pulumi_azure/eventhub/get_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/eventhub/get_consume_group.py b/sdk/python/pulumi_azure/eventhub/get_consume_group.py index 938cbf317b..a19a15b96f 100644 --- a/sdk/python/pulumi_azure/eventhub/get_consume_group.py +++ b/sdk/python/pulumi_azure/eventhub/get_consume_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/eventhub/get_event_hub.py b/sdk/python/pulumi_azure/eventhub/get_event_hub.py index 694c262314..526448355d 100644 --- a/sdk/python/pulumi_azure/eventhub/get_event_hub.py +++ b/sdk/python/pulumi_azure/eventhub/get_event_hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/eventhub/get_eventhub_namespace.py b/sdk/python/pulumi_azure/eventhub/get_eventhub_namespace.py index b21391ecbd..fc9d020f36 100644 --- a/sdk/python/pulumi_azure/eventhub/get_eventhub_namespace.py +++ b/sdk/python/pulumi_azure/eventhub/get_eventhub_namespace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/eventhub/get_namespace.py b/sdk/python/pulumi_azure/eventhub/get_namespace.py index 9c1d8666d7..0344f8fcb3 100644 --- a/sdk/python/pulumi_azure/eventhub/get_namespace.py +++ b/sdk/python/pulumi_azure/eventhub/get_namespace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/eventhub/get_namespace_authorization_rule.py b/sdk/python/pulumi_azure/eventhub/get_namespace_authorization_rule.py index 276ed4dd9d..aa9321acec 100644 --- a/sdk/python/pulumi_azure/eventhub/get_namespace_authorization_rule.py +++ b/sdk/python/pulumi_azure/eventhub/get_namespace_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/eventhub/get_sas.py b/sdk/python/pulumi_azure/eventhub/get_sas.py index 15f954f422..09a39b073a 100644 --- a/sdk/python/pulumi_azure/eventhub/get_sas.py +++ b/sdk/python/pulumi_azure/eventhub/get_sas.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/eventhub/get_service_bus_namespace.py b/sdk/python/pulumi_azure/eventhub/get_service_bus_namespace.py index 0294f63cdb..444a44bd23 100644 --- a/sdk/python/pulumi_azure/eventhub/get_service_bus_namespace.py +++ b/sdk/python/pulumi_azure/eventhub/get_service_bus_namespace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/eventhub/namespace.py b/sdk/python/pulumi_azure/eventhub/namespace.py index 4679ea7af0..a37c85545a 100644 --- a/sdk/python/pulumi_azure/eventhub/namespace.py +++ b/sdk/python/pulumi_azure/eventhub/namespace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -46,30 +46,83 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] zone_redundant: Whether or not this resource is zone redundant. `sku` needs to be `Premium`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + NamespaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + capacity=capacity, + customer_managed_key=customer_managed_key, + identity=identity, + local_auth_enabled=local_auth_enabled, + location=location, + minimum_tls_version=minimum_tls_version, + name=name, + network_rule_set=network_rule_set, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + capacity: Optional[pulumi.Input[int]] = None, + customer_managed_key: Optional[pulumi.Input['NamespaceCustomerManagedKeyArgs']] = None, + identity: Optional[pulumi.Input['NamespaceIdentityArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_rule_set: Optional[pulumi.Input['NamespaceNetworkRuleSetArgs']] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if network_rule_set is None and 'networkRuleSet' in kwargs: + network_rule_set = kwargs['networkRuleSet'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_rule_set is not None: - pulumi.set(__self__, "network_rule_set", network_rule_set) + _setter("network_rule_set", network_rule_set) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="resourceGroupName") @@ -272,42 +325,109 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] zone_redundant: Whether or not this resource is zone redundant. `sku` needs to be `Premium`. Changing this forces a new resource to be created. """ + _NamespaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + customer_managed_key=customer_managed_key, + default_primary_connection_string=default_primary_connection_string, + default_primary_key=default_primary_key, + default_secondary_connection_string=default_secondary_connection_string, + default_secondary_key=default_secondary_key, + endpoint=endpoint, + identity=identity, + local_auth_enabled=local_auth_enabled, + location=location, + minimum_tls_version=minimum_tls_version, + name=name, + network_rule_set=network_rule_set, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + sku=sku, + tags=tags, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + customer_managed_key: Optional[pulumi.Input['NamespaceCustomerManagedKeyArgs']] = None, + default_primary_connection_string: Optional[pulumi.Input[str]] = None, + default_primary_key: Optional[pulumi.Input[str]] = None, + default_secondary_connection_string: Optional[pulumi.Input[str]] = None, + default_secondary_key: Optional[pulumi.Input[str]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['NamespaceIdentityArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_rule_set: Optional[pulumi.Input['NamespaceNetworkRuleSetArgs']] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if default_primary_connection_string is None and 'defaultPrimaryConnectionString' in kwargs: + default_primary_connection_string = kwargs['defaultPrimaryConnectionString'] + if default_primary_key is None and 'defaultPrimaryKey' in kwargs: + default_primary_key = kwargs['defaultPrimaryKey'] + if default_secondary_connection_string is None and 'defaultSecondaryConnectionString' in kwargs: + default_secondary_connection_string = kwargs['defaultSecondaryConnectionString'] + if default_secondary_key is None and 'defaultSecondaryKey' in kwargs: + default_secondary_key = kwargs['defaultSecondaryKey'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if network_rule_set is None and 'networkRuleSet' in kwargs: + network_rule_set = kwargs['networkRuleSet'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if default_primary_connection_string is not None: - pulumi.set(__self__, "default_primary_connection_string", default_primary_connection_string) + _setter("default_primary_connection_string", default_primary_connection_string) if default_primary_key is not None: - pulumi.set(__self__, "default_primary_key", default_primary_key) + _setter("default_primary_key", default_primary_key) if default_secondary_connection_string is not None: - pulumi.set(__self__, "default_secondary_connection_string", default_secondary_connection_string) + _setter("default_secondary_connection_string", default_secondary_connection_string) if default_secondary_key is not None: - pulumi.set(__self__, "default_secondary_key", default_secondary_key) + _setter("default_secondary_key", default_secondary_key) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_rule_set is not None: - pulumi.set(__self__, "network_rule_set", network_rule_set) + _setter("network_rule_set", network_rule_set) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter @@ -638,6 +758,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NamespaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -667,12 +791,27 @@ def _internal_init(__self__, __props__ = NamespaceArgs.__new__(NamespaceArgs) __props__.__dict__["capacity"] = capacity + if customer_managed_key is not None and not isinstance(customer_managed_key, NamespaceCustomerManagedKeyArgs): + customer_managed_key = customer_managed_key or {} + def _setter(key, value): + customer_managed_key[key] = value + NamespaceCustomerManagedKeyArgs._configure(_setter, **customer_managed_key) __props__.__dict__["customer_managed_key"] = customer_managed_key + if identity is not None and not isinstance(identity, NamespaceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + NamespaceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["local_auth_enabled"] = local_auth_enabled __props__.__dict__["location"] = location __props__.__dict__["minimum_tls_version"] = minimum_tls_version __props__.__dict__["name"] = name + if network_rule_set is not None and not isinstance(network_rule_set, NamespaceNetworkRuleSetArgs): + network_rule_set = network_rule_set or {} + def _setter(key, value): + network_rule_set[key] = value + NamespaceNetworkRuleSetArgs._configure(_setter, **network_rule_set) __props__.__dict__["network_rule_set"] = network_rule_set __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled if resource_group_name is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/eventhub/namespace_authorization_rule.py b/sdk/python/pulumi_azure/eventhub/namespace_authorization_rule.py index ae2823406a..c857f9649e 100644 --- a/sdk/python/pulumi_azure/eventhub/namespace_authorization_rule.py +++ b/sdk/python/pulumi_azure/eventhub/namespace_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NamespaceAuthorizationRuleArgs', 'NamespaceAuthorizationRule'] @@ -29,15 +29,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created. :param pulumi.Input[bool] send: Grants send access to this this Authorization Rule. Defaults to `false`. """ - pulumi.set(__self__, "namespace_id", namespace_id) + NamespaceAuthorizationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_id=namespace_id, + listen=listen, + manage=manage, + name=name, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_id: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if namespace_id is None: + raise TypeError("Missing 'namespace_id' argument") + + _setter("namespace_id", namespace_id) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="namespaceId") @@ -132,28 +155,73 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_key: The Secondary Key for the ServiceBus Namespace authorization Rule. :param pulumi.Input[bool] send: Grants send access to this this Authorization Rule. Defaults to `false`. """ + _NamespaceAuthorizationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + listen=listen, + manage=manage, + name=name, + namespace_id=namespace_id, + primary_connection_string=primary_connection_string, + primary_connection_string_alias=primary_connection_string_alias, + primary_key=primary_key, + secondary_connection_string=secondary_connection_string, + secondary_connection_string_alias=secondary_connection_string_alias, + secondary_key=secondary_key, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_id: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_connection_string_alias: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_connection_string_alias: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_connection_string_alias is None and 'primaryConnectionStringAlias' in kwargs: + primary_connection_string_alias = kwargs['primaryConnectionStringAlias'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_connection_string_alias is None and 'secondaryConnectionStringAlias' in kwargs: + secondary_connection_string_alias = kwargs['secondaryConnectionStringAlias'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_id is not None: - pulumi.set(__self__, "namespace_id", namespace_id) + _setter("namespace_id", namespace_id) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_connection_string_alias is not None: - pulumi.set(__self__, "primary_connection_string_alias", primary_connection_string_alias) + _setter("primary_connection_string_alias", primary_connection_string_alias) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_connection_string_alias is not None: - pulumi.set(__self__, "secondary_connection_string_alias", secondary_connection_string_alias) + _setter("secondary_connection_string_alias", secondary_connection_string_alias) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter @@ -396,6 +464,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NamespaceAuthorizationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventhub/namespace_customer_managed_key.py b/sdk/python/pulumi_azure/eventhub/namespace_customer_managed_key.py index 876e5b2c8a..b7325548af 100644 --- a/sdk/python/pulumi_azure/eventhub/namespace_customer_managed_key.py +++ b/sdk/python/pulumi_azure/eventhub/namespace_customer_managed_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NamespaceCustomerManagedKeyInitArgs', 'NamespaceCustomerManagedKey'] @@ -29,12 +29,41 @@ def __init__(__self__, *, > **Note:** If using `user_assigned_identity_id`, make sure to assign the identity the appropriate permissions to access the Key Vault key. Failure to grant `Get, UnwrapKey, and WrapKey` will cause this resource to fail to apply. """ - pulumi.set(__self__, "eventhub_namespace_id", eventhub_namespace_id) - pulumi.set(__self__, "key_vault_key_ids", key_vault_key_ids) + NamespaceCustomerManagedKeyInitArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_namespace_id=eventhub_namespace_id, + key_vault_key_ids=key_vault_key_ids, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_namespace_id: Optional[pulumi.Input[str]] = None, + key_vault_key_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + infrastructure_encryption_enabled: Optional[pulumi.Input[bool]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_namespace_id is None and 'eventhubNamespaceId' in kwargs: + eventhub_namespace_id = kwargs['eventhubNamespaceId'] + if eventhub_namespace_id is None: + raise TypeError("Missing 'eventhub_namespace_id' argument") + if key_vault_key_ids is None and 'keyVaultKeyIds' in kwargs: + key_vault_key_ids = kwargs['keyVaultKeyIds'] + if key_vault_key_ids is None: + raise TypeError("Missing 'key_vault_key_ids' argument") + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + + _setter("eventhub_namespace_id", eventhub_namespace_id) + _setter("key_vault_key_ids", key_vault_key_ids) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="eventhubNamespaceId") @@ -107,14 +136,39 @@ def __init__(__self__, *, > **Note:** If using `user_assigned_identity_id`, make sure to assign the identity the appropriate permissions to access the Key Vault key. Failure to grant `Get, UnwrapKey, and WrapKey` will cause this resource to fail to apply. """ + _NamespaceCustomerManagedKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_namespace_id=eventhub_namespace_id, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + key_vault_key_ids=key_vault_key_ids, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_namespace_id: Optional[pulumi.Input[str]] = None, + infrastructure_encryption_enabled: Optional[pulumi.Input[bool]] = None, + key_vault_key_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_namespace_id is None and 'eventhubNamespaceId' in kwargs: + eventhub_namespace_id = kwargs['eventhubNamespaceId'] + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + if key_vault_key_ids is None and 'keyVaultKeyIds' in kwargs: + key_vault_key_ids = kwargs['keyVaultKeyIds'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if eventhub_namespace_id is not None: - pulumi.set(__self__, "eventhub_namespace_id", eventhub_namespace_id) + _setter("eventhub_namespace_id", eventhub_namespace_id) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) if key_vault_key_ids is not None: - pulumi.set(__self__, "key_vault_key_ids", key_vault_key_ids) + _setter("key_vault_key_ids", key_vault_key_ids) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="eventhubNamespaceId") @@ -518,6 +572,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NamespaceCustomerManagedKeyInitArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventhub/namespace_schema_group.py b/sdk/python/pulumi_azure/eventhub/namespace_schema_group.py index 50d763d778..07675f2ca1 100644 --- a/sdk/python/pulumi_azure/eventhub/namespace_schema_group.py +++ b/sdk/python/pulumi_azure/eventhub/namespace_schema_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NamespaceSchemaGroupArgs', 'NamespaceSchemaGroup'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] schema_type: Specifies the Type of this schema group. Possible values are `Avro`, `Unknown`. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of this schema group. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "namespace_id", namespace_id) - pulumi.set(__self__, "schema_compatibility", schema_compatibility) - pulumi.set(__self__, "schema_type", schema_type) + NamespaceSchemaGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_id=namespace_id, + schema_compatibility=schema_compatibility, + schema_type=schema_type, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_id: Optional[pulumi.Input[str]] = None, + schema_compatibility: Optional[pulumi.Input[str]] = None, + schema_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if namespace_id is None: + raise TypeError("Missing 'namespace_id' argument") + if schema_compatibility is None and 'schemaCompatibility' in kwargs: + schema_compatibility = kwargs['schemaCompatibility'] + if schema_compatibility is None: + raise TypeError("Missing 'schema_compatibility' argument") + if schema_type is None and 'schemaType' in kwargs: + schema_type = kwargs['schemaType'] + if schema_type is None: + raise TypeError("Missing 'schema_type' argument") + + _setter("namespace_id", namespace_id) + _setter("schema_compatibility", schema_compatibility) + _setter("schema_type", schema_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="namespaceId") @@ -94,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[str] schema_compatibility: Specifies the compatibility of this schema group. Possible values are `None`, `Backward`, `Forward`. Changing this forces a new resource to be created. :param pulumi.Input[str] schema_type: Specifies the Type of this schema group. Possible values are `Avro`, `Unknown`. Changing this forces a new resource to be created. """ + _NamespaceSchemaGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + namespace_id=namespace_id, + schema_compatibility=schema_compatibility, + schema_type=schema_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + namespace_id: Optional[pulumi.Input[str]] = None, + schema_compatibility: Optional[pulumi.Input[str]] = None, + schema_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if schema_compatibility is None and 'schemaCompatibility' in kwargs: + schema_compatibility = kwargs['schemaCompatibility'] + if schema_type is None and 'schemaType' in kwargs: + schema_type = kwargs['schemaType'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_id is not None: - pulumi.set(__self__, "namespace_id", namespace_id) + _setter("namespace_id", namespace_id) if schema_compatibility is not None: - pulumi.set(__self__, "schema_compatibility", schema_compatibility) + _setter("schema_compatibility", schema_compatibility) if schema_type is not None: - pulumi.set(__self__, "schema_type", schema_type) + _setter("schema_type", schema_type) @property @pulumi.getter @@ -237,6 +289,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NamespaceSchemaGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventhub/outputs.py b/sdk/python/pulumi_azure/eventhub/outputs.py index b07bc9577e..9de127c6fc 100644 --- a/sdk/python/pulumi_azure/eventhub/outputs.py +++ b/sdk/python/pulumi_azure/eventhub/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -100,13 +100,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + DomainIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -171,9 +196,26 @@ def __init__(__self__, *, :param str ip_mask: The IP mask (CIDR) to match on. :param str action: The action to take when the rule is matched. Possible values are `Allow`. """ - pulumi.set(__self__, "ip_mask", ip_mask) + DomainInboundIpRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[str] = None, + action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + + _setter("ip_mask", ip_mask) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipMask") @@ -222,12 +264,31 @@ def __init__(__self__, *, :param str event_type: Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param str subject: Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + DomainInputMappingDefaultValues._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_type=event_type, + subject=subject, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[str] = None, + event_type: Optional[str] = None, + subject: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) @property @pulumi.getter(name="dataVersion") @@ -292,18 +353,45 @@ def __init__(__self__, *, :param str subject: Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param str topic: Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + DomainInputMappingFields._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_time=event_time, + event_type=event_type, + id=id, + subject=subject, + topic=topic, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[str] = None, + event_time: Optional[str] = None, + event_type: Optional[str] = None, + id: Optional[str] = None, + subject: Optional[str] = None, + topic: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_time is None and 'eventTime' in kwargs: + event_time = kwargs['eventTime'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_time is not None: - pulumi.set(__self__, "event_time", event_time) + _setter("event_time", event_time) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if topic is not None: - pulumi.set(__self__, "topic", topic) + _setter("topic", topic) @property @pulumi.getter(name="dataVersion") @@ -392,13 +480,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + EventGridTopicIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -463,9 +576,26 @@ def __init__(__self__, *, :param str ip_mask: The IP mask (CIDR) to match on. :param str action: The action to take when the rule is matched. Possible values are `Allow`. """ - pulumi.set(__self__, "ip_mask", ip_mask) + EventGridTopicInboundIpRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[str] = None, + action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + + _setter("ip_mask", ip_mask) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipMask") @@ -514,12 +644,31 @@ def __init__(__self__, *, :param str event_type: Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param str subject: Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + EventGridTopicInputMappingDefaultValues._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_type=event_type, + subject=subject, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[str] = None, + event_type: Optional[str] = None, + subject: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) @property @pulumi.getter(name="dataVersion") @@ -584,18 +733,45 @@ def __init__(__self__, *, :param str subject: Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. :param str topic: Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. """ + EventGridTopicInputMappingFields._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_version=data_version, + event_time=event_time, + event_type=event_type, + id=id, + subject=subject, + topic=topic, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_version: Optional[str] = None, + event_time: Optional[str] = None, + event_type: Optional[str] = None, + id: Optional[str] = None, + subject: Optional[str] = None, + topic: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_version is None and 'dataVersion' in kwargs: + data_version = kwargs['dataVersion'] + if event_time is None and 'eventTime' in kwargs: + event_time = kwargs['eventTime'] + if event_type is None and 'eventType' in kwargs: + event_type = kwargs['eventType'] + if data_version is not None: - pulumi.set(__self__, "data_version", data_version) + _setter("data_version", data_version) if event_time is not None: - pulumi.set(__self__, "event_time", event_time) + _setter("event_time", event_time) if event_type is not None: - pulumi.set(__self__, "event_type", event_type) + _setter("event_type", event_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if subject is not None: - pulumi.set(__self__, "subject", subject) + _setter("subject", subject) if topic is not None: - pulumi.set(__self__, "topic", topic) + _setter("topic", topic) @property @pulumi.getter(name="dataVersion") @@ -684,15 +860,48 @@ def __init__(__self__, *, :param int size_limit_in_bytes: Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between `10485760` and `524288000` bytes. Defaults to `314572800` bytes. :param bool skip_empty_archives: Specifies if empty files should not be emitted if no events occur during the Capture time window. Defaults to `false`. """ - pulumi.set(__self__, "destination", destination) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "encoding", encoding) + EventHubCaptureDescription._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination=destination, + enabled=enabled, + encoding=encoding, + interval_in_seconds=interval_in_seconds, + size_limit_in_bytes=size_limit_in_bytes, + skip_empty_archives=skip_empty_archives, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination: Optional['outputs.EventHubCaptureDescriptionDestination'] = None, + enabled: Optional[bool] = None, + encoding: Optional[str] = None, + interval_in_seconds: Optional[int] = None, + size_limit_in_bytes: Optional[int] = None, + skip_empty_archives: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination is None: + raise TypeError("Missing 'destination' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if encoding is None: + raise TypeError("Missing 'encoding' argument") + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if size_limit_in_bytes is None and 'sizeLimitInBytes' in kwargs: + size_limit_in_bytes = kwargs['sizeLimitInBytes'] + if skip_empty_archives is None and 'skipEmptyArchives' in kwargs: + skip_empty_archives = kwargs['skipEmptyArchives'] + + _setter("destination", destination) + _setter("enabled", enabled) + _setter("encoding", encoding) if interval_in_seconds is not None: - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) + _setter("interval_in_seconds", interval_in_seconds) if size_limit_in_bytes is not None: - pulumi.set(__self__, "size_limit_in_bytes", size_limit_in_bytes) + _setter("size_limit_in_bytes", size_limit_in_bytes) if skip_empty_archives is not None: - pulumi.set(__self__, "skip_empty_archives", skip_empty_archives) + _setter("skip_empty_archives", skip_empty_archives) @property @pulumi.getter @@ -779,10 +988,41 @@ def __init__(__self__, *, > At this time it's only possible to Capture EventHub messages to Blob Storage. There's [a Feature Request for the Azure SDK to add support for Capturing messages to Azure Data Lake here](https://github.com/Azure/azure-rest-api-specs/issues/2255). :param str storage_account_id: The ID of the Blob Storage Account where messages should be archived. """ - pulumi.set(__self__, "archive_name_format", archive_name_format) - pulumi.set(__self__, "blob_container_name", blob_container_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + EventHubCaptureDescriptionDestination._configure( + lambda key, value: pulumi.set(__self__, key, value), + archive_name_format=archive_name_format, + blob_container_name=blob_container_name, + name=name, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + archive_name_format: Optional[str] = None, + blob_container_name: Optional[str] = None, + name: Optional[str] = None, + storage_account_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if archive_name_format is None and 'archiveNameFormat' in kwargs: + archive_name_format = kwargs['archiveNameFormat'] + if archive_name_format is None: + raise TypeError("Missing 'archive_name_format' argument") + if blob_container_name is None and 'blobContainerName' in kwargs: + blob_container_name = kwargs['blobContainerName'] + if blob_container_name is None: + raise TypeError("Missing 'blob_container_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + + _setter("archive_name_format", archive_name_format) + _setter("blob_container_name", blob_container_name) + _setter("name", name) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="archiveNameFormat") @@ -857,13 +1097,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + EventHubNamespaceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -944,15 +1209,46 @@ def __init__(__self__, *, :param bool trusted_service_access_enabled: Whether Trusted Microsoft Services are allowed to bypass firewall. :param Sequence['EventHubNamespaceNetworkRulesetsVirtualNetworkRuleArgs'] virtual_network_rules: One or more `virtual_network_rule` blocks as defined below. """ - pulumi.set(__self__, "default_action", default_action) + EventHubNamespaceNetworkRulesets._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + public_network_access_enabled=public_network_access_enabled, + trusted_service_access_enabled=trusted_service_access_enabled, + virtual_network_rules=virtual_network_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[str] = None, + ip_rules: Optional[Sequence['outputs.EventHubNamespaceNetworkRulesetsIpRule']] = None, + public_network_access_enabled: Optional[bool] = None, + trusted_service_access_enabled: Optional[bool] = None, + virtual_network_rules: Optional[Sequence['outputs.EventHubNamespaceNetworkRulesetsVirtualNetworkRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if default_action is None: + raise TypeError("Missing 'default_action' argument") + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if trusted_service_access_enabled is None and 'trustedServiceAccessEnabled' in kwargs: + trusted_service_access_enabled = kwargs['trustedServiceAccessEnabled'] + if virtual_network_rules is None and 'virtualNetworkRules' in kwargs: + virtual_network_rules = kwargs['virtualNetworkRules'] + + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if trusted_service_access_enabled is not None: - pulumi.set(__self__, "trusted_service_access_enabled", trusted_service_access_enabled) + _setter("trusted_service_access_enabled", trusted_service_access_enabled) if virtual_network_rules is not None: - pulumi.set(__self__, "virtual_network_rules", virtual_network_rules) + _setter("virtual_network_rules", virtual_network_rules) @property @pulumi.getter(name="defaultAction") @@ -1023,9 +1319,26 @@ def __init__(__self__, *, :param str ip_mask: The IP mask to match on. :param str action: The action to take when the rule is matched. Possible values are `Allow`. """ - pulumi.set(__self__, "ip_mask", ip_mask) + EventHubNamespaceNetworkRulesetsIpRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[str] = None, + action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + + _setter("ip_mask", ip_mask) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipMask") @@ -1072,9 +1385,28 @@ def __init__(__self__, *, :param str subnet_id: The id of the subnet to match on. :param bool ignore_missing_virtual_network_service_endpoint: Are missing virtual network service endpoints ignored? """ - pulumi.set(__self__, "subnet_id", subnet_id) + EventHubNamespaceNetworkRulesetsVirtualNetworkRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ignore_missing_virtual_network_service_endpoint=ignore_missing_virtual_network_service_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[str] = None, + ignore_missing_virtual_network_service_endpoint: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if ignore_missing_virtual_network_service_endpoint is None and 'ignoreMissingVirtualNetworkServiceEndpoint' in kwargs: + ignore_missing_virtual_network_service_endpoint = kwargs['ignoreMissingVirtualNetworkServiceEndpoint'] + + _setter("subnet_id", subnet_id) if ignore_missing_virtual_network_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_virtual_network_service_endpoint", ignore_missing_virtual_network_service_endpoint) + _setter("ignore_missing_virtual_network_service_endpoint", ignore_missing_virtual_network_service_endpoint) @property @pulumi.getter(name="subnetId") @@ -1191,44 +1523,129 @@ def __init__(__self__, *, :param Sequence['EventSubscriptionAdvancedFilterStringNotEndsWithArgs'] string_not_ends_withs: Compares a value of an event using multiple string values. :param Sequence['EventSubscriptionAdvancedFilterStringNotInArgs'] string_not_ins: Compares a value of an event using multiple string values. """ + EventSubscriptionAdvancedFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + bool_equals=bool_equals, + is_not_nulls=is_not_nulls, + is_null_or_undefineds=is_null_or_undefineds, + number_greater_than_or_equals=number_greater_than_or_equals, + number_greater_thans=number_greater_thans, + number_in_ranges=number_in_ranges, + number_ins=number_ins, + number_less_than_or_equals=number_less_than_or_equals, + number_less_thans=number_less_thans, + number_not_in_ranges=number_not_in_ranges, + number_not_ins=number_not_ins, + string_begins_withs=string_begins_withs, + string_contains=string_contains, + string_ends_withs=string_ends_withs, + string_ins=string_ins, + string_not_begins_withs=string_not_begins_withs, + string_not_contains=string_not_contains, + string_not_ends_withs=string_not_ends_withs, + string_not_ins=string_not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bool_equals: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterBoolEqual']] = None, + is_not_nulls: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterIsNotNull']] = None, + is_null_or_undefineds: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterIsNullOrUndefined']] = None, + number_greater_than_or_equals: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberGreaterThanOrEqual']] = None, + number_greater_thans: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberGreaterThan']] = None, + number_in_ranges: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberInRange']] = None, + number_ins: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberIn']] = None, + number_less_than_or_equals: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberLessThanOrEqual']] = None, + number_less_thans: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberLessThan']] = None, + number_not_in_ranges: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberNotInRange']] = None, + number_not_ins: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterNumberNotIn']] = None, + string_begins_withs: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringBeginsWith']] = None, + string_contains: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringContain']] = None, + string_ends_withs: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringEndsWith']] = None, + string_ins: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringIn']] = None, + string_not_begins_withs: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringNotBeginsWith']] = None, + string_not_contains: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringNotContain']] = None, + string_not_ends_withs: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringNotEndsWith']] = None, + string_not_ins: Optional[Sequence['outputs.EventSubscriptionAdvancedFilterStringNotIn']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bool_equals is None and 'boolEquals' in kwargs: + bool_equals = kwargs['boolEquals'] + if is_not_nulls is None and 'isNotNulls' in kwargs: + is_not_nulls = kwargs['isNotNulls'] + if is_null_or_undefineds is None and 'isNullOrUndefineds' in kwargs: + is_null_or_undefineds = kwargs['isNullOrUndefineds'] + if number_greater_than_or_equals is None and 'numberGreaterThanOrEquals' in kwargs: + number_greater_than_or_equals = kwargs['numberGreaterThanOrEquals'] + if number_greater_thans is None and 'numberGreaterThans' in kwargs: + number_greater_thans = kwargs['numberGreaterThans'] + if number_in_ranges is None and 'numberInRanges' in kwargs: + number_in_ranges = kwargs['numberInRanges'] + if number_ins is None and 'numberIns' in kwargs: + number_ins = kwargs['numberIns'] + if number_less_than_or_equals is None and 'numberLessThanOrEquals' in kwargs: + number_less_than_or_equals = kwargs['numberLessThanOrEquals'] + if number_less_thans is None and 'numberLessThans' in kwargs: + number_less_thans = kwargs['numberLessThans'] + if number_not_in_ranges is None and 'numberNotInRanges' in kwargs: + number_not_in_ranges = kwargs['numberNotInRanges'] + if number_not_ins is None and 'numberNotIns' in kwargs: + number_not_ins = kwargs['numberNotIns'] + if string_begins_withs is None and 'stringBeginsWiths' in kwargs: + string_begins_withs = kwargs['stringBeginsWiths'] + if string_contains is None and 'stringContains' in kwargs: + string_contains = kwargs['stringContains'] + if string_ends_withs is None and 'stringEndsWiths' in kwargs: + string_ends_withs = kwargs['stringEndsWiths'] + if string_ins is None and 'stringIns' in kwargs: + string_ins = kwargs['stringIns'] + if string_not_begins_withs is None and 'stringNotBeginsWiths' in kwargs: + string_not_begins_withs = kwargs['stringNotBeginsWiths'] + if string_not_contains is None and 'stringNotContains' in kwargs: + string_not_contains = kwargs['stringNotContains'] + if string_not_ends_withs is None and 'stringNotEndsWiths' in kwargs: + string_not_ends_withs = kwargs['stringNotEndsWiths'] + if string_not_ins is None and 'stringNotIns' in kwargs: + string_not_ins = kwargs['stringNotIns'] + if bool_equals is not None: - pulumi.set(__self__, "bool_equals", bool_equals) + _setter("bool_equals", bool_equals) if is_not_nulls is not None: - pulumi.set(__self__, "is_not_nulls", is_not_nulls) + _setter("is_not_nulls", is_not_nulls) if is_null_or_undefineds is not None: - pulumi.set(__self__, "is_null_or_undefineds", is_null_or_undefineds) + _setter("is_null_or_undefineds", is_null_or_undefineds) if number_greater_than_or_equals is not None: - pulumi.set(__self__, "number_greater_than_or_equals", number_greater_than_or_equals) + _setter("number_greater_than_or_equals", number_greater_than_or_equals) if number_greater_thans is not None: - pulumi.set(__self__, "number_greater_thans", number_greater_thans) + _setter("number_greater_thans", number_greater_thans) if number_in_ranges is not None: - pulumi.set(__self__, "number_in_ranges", number_in_ranges) + _setter("number_in_ranges", number_in_ranges) if number_ins is not None: - pulumi.set(__self__, "number_ins", number_ins) + _setter("number_ins", number_ins) if number_less_than_or_equals is not None: - pulumi.set(__self__, "number_less_than_or_equals", number_less_than_or_equals) + _setter("number_less_than_or_equals", number_less_than_or_equals) if number_less_thans is not None: - pulumi.set(__self__, "number_less_thans", number_less_thans) + _setter("number_less_thans", number_less_thans) if number_not_in_ranges is not None: - pulumi.set(__self__, "number_not_in_ranges", number_not_in_ranges) + _setter("number_not_in_ranges", number_not_in_ranges) if number_not_ins is not None: - pulumi.set(__self__, "number_not_ins", number_not_ins) + _setter("number_not_ins", number_not_ins) if string_begins_withs is not None: - pulumi.set(__self__, "string_begins_withs", string_begins_withs) + _setter("string_begins_withs", string_begins_withs) if string_contains is not None: - pulumi.set(__self__, "string_contains", string_contains) + _setter("string_contains", string_contains) if string_ends_withs is not None: - pulumi.set(__self__, "string_ends_withs", string_ends_withs) + _setter("string_ends_withs", string_ends_withs) if string_ins is not None: - pulumi.set(__self__, "string_ins", string_ins) + _setter("string_ins", string_ins) if string_not_begins_withs is not None: - pulumi.set(__self__, "string_not_begins_withs", string_not_begins_withs) + _setter("string_not_begins_withs", string_not_begins_withs) if string_not_contains is not None: - pulumi.set(__self__, "string_not_contains", string_not_contains) + _setter("string_not_contains", string_not_contains) if string_not_ends_withs is not None: - pulumi.set(__self__, "string_not_ends_withs", string_not_ends_withs) + _setter("string_not_ends_withs", string_not_ends_withs) if string_not_ins is not None: - pulumi.set(__self__, "string_not_ins", string_not_ins) + _setter("string_not_ins", string_not_ins) @property @pulumi.getter(name="boolEquals") @@ -1396,8 +1813,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterBoolEqual._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -1425,7 +1859,20 @@ def __init__(__self__, *, """ :param str key: Specifies the field within the event data that you want to use for filtering. Type of the field can be a number, boolean, or string. """ - pulumi.set(__self__, "key", key) + EventSubscriptionAdvancedFilterIsNotNull._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) @property @pulumi.getter @@ -1443,7 +1890,20 @@ def __init__(__self__, *, """ :param str key: Specifies the field within the event data that you want to use for filtering. Type of the field can be a number, boolean, or string. """ - pulumi.set(__self__, "key", key) + EventSubscriptionAdvancedFilterIsNullOrUndefined._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) @property @pulumi.getter @@ -1465,8 +1925,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberGreaterThan._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -1498,8 +1975,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberGreaterThanOrEqual._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -1531,8 +2025,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1564,8 +2075,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberInRange._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[Sequence[float]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1597,8 +2125,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberLessThan._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -1630,8 +2175,25 @@ def __init__(__self__, *, OR """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + EventSubscriptionAdvancedFilterNumberLessThanOrEqual._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + value: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("key", key) + _setter("value", value) @property @pulumi.getter @@ -1663,8 +2225,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberNotIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1696,8 +2275,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterNumberNotInRange._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[Sequence[float]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1729,8 +2325,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringBeginsWith._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1762,8 +2375,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringContain._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1795,8 +2425,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringEndsWith._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1828,8 +2475,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1861,8 +2525,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotBeginsWith._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1894,8 +2575,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotContain._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1927,8 +2625,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotEndsWith._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -1960,8 +2675,25 @@ def __init__(__self__, *, > **NOTE:** A maximum of total number of advanced filter values allowed on event subscription is 25. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "values", values) + EventSubscriptionAdvancedFilterStringNotIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("key", key) + _setter("values", values) @property @pulumi.getter @@ -2014,11 +2746,34 @@ def __init__(__self__, *, :param int max_events_per_batch: Maximum number of events per batch. :param int preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. """ - pulumi.set(__self__, "function_id", function_id) + EventSubscriptionAzureFunctionEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_id=function_id, + max_events_per_batch=max_events_per_batch, + preferred_batch_size_in_kilobytes=preferred_batch_size_in_kilobytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_id: Optional[str] = None, + max_events_per_batch: Optional[int] = None, + preferred_batch_size_in_kilobytes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_id is None and 'functionId' in kwargs: + function_id = kwargs['functionId'] + if function_id is None: + raise TypeError("Missing 'function_id' argument") + if max_events_per_batch is None and 'maxEventsPerBatch' in kwargs: + max_events_per_batch = kwargs['maxEventsPerBatch'] + if preferred_batch_size_in_kilobytes is None and 'preferredBatchSizeInKilobytes' in kwargs: + preferred_batch_size_in_kilobytes = kwargs['preferredBatchSizeInKilobytes'] + + _setter("function_id", function_id) if max_events_per_batch is not None: - pulumi.set(__self__, "max_events_per_batch", max_events_per_batch) + _setter("max_events_per_batch", max_events_per_batch) if preferred_batch_size_in_kilobytes is not None: - pulumi.set(__self__, "preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) + _setter("preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) @property @pulumi.getter(name="functionId") @@ -2071,9 +2826,26 @@ def __init__(__self__, *, :param str type: Specifies the type of Managed Service Identity that is used for dead lettering. Allowed value is `SystemAssigned`, `UserAssigned`. :param str user_assigned_identity: The user identity associated with the resource. """ - pulumi.set(__self__, "type", type) + EventSubscriptionDeadLetterIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + user_assigned_identity=user_assigned_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + user_assigned_identity: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if user_assigned_identity is None and 'userAssignedIdentity' in kwargs: + user_assigned_identity = kwargs['userAssignedIdentity'] + + _setter("type", type) if user_assigned_identity is not None: - pulumi.set(__self__, "user_assigned_identity", user_assigned_identity) + _setter("user_assigned_identity", user_assigned_identity) @property @pulumi.getter @@ -2118,9 +2890,26 @@ def __init__(__self__, *, :param str type: Specifies the type of Managed Service Identity that is used for event delivery. Allowed value is `SystemAssigned`, `UserAssigned`. :param str user_assigned_identity: The user identity associated with the resource. """ - pulumi.set(__self__, "type", type) + EventSubscriptionDeliveryIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + user_assigned_identity=user_assigned_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + user_assigned_identity: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if user_assigned_identity is None and 'userAssignedIdentity' in kwargs: + user_assigned_identity = kwargs['userAssignedIdentity'] + + _setter("type", type) if user_assigned_identity is not None: - pulumi.set(__self__, "user_assigned_identity", user_assigned_identity) + _setter("user_assigned_identity", user_assigned_identity) @property @pulumi.getter @@ -2173,14 +2962,41 @@ def __init__(__self__, *, :param str source_field: If the `type` is `Dynamic`, then provide the payload field to be used as the value. Valid source fields differ by subscription type. :param str value: If the `type` is `Static`, then provide the value to use """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "type", type) + EventSubscriptionDeliveryProperty._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + type=type, + secret=secret, + source_field=source_field, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[str] = None, + type: Optional[str] = None, + secret: Optional[bool] = None, + source_field: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if source_field is None and 'sourceField' in kwargs: + source_field = kwargs['sourceField'] + + _setter("header_name", header_name) + _setter("type", type) if secret is not None: - pulumi.set(__self__, "secret", secret) + _setter("secret", secret) if source_field is not None: - pulumi.set(__self__, "source_field", source_field) + _setter("source_field", source_field) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerName") @@ -2251,8 +3067,29 @@ def __init__(__self__, *, :param int event_time_to_live: Specifies the time to live (in minutes) for events. Supported range is `1` to `1440`. See [official documentation](https://docs.microsoft.com/azure/event-grid/manage-event-delivery#set-retry-policy) for more details. :param int max_delivery_attempts: Specifies the maximum number of delivery retry attempts for events. """ - pulumi.set(__self__, "event_time_to_live", event_time_to_live) - pulumi.set(__self__, "max_delivery_attempts", max_delivery_attempts) + EventSubscriptionRetryPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_time_to_live=event_time_to_live, + max_delivery_attempts=max_delivery_attempts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_time_to_live: Optional[int] = None, + max_delivery_attempts: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_time_to_live is None and 'eventTimeToLive' in kwargs: + event_time_to_live = kwargs['eventTimeToLive'] + if event_time_to_live is None: + raise TypeError("Missing 'event_time_to_live' argument") + if max_delivery_attempts is None and 'maxDeliveryAttempts' in kwargs: + max_delivery_attempts = kwargs['maxDeliveryAttempts'] + if max_delivery_attempts is None: + raise TypeError("Missing 'max_delivery_attempts' argument") + + _setter("event_time_to_live", event_time_to_live) + _setter("max_delivery_attempts", max_delivery_attempts) @property @pulumi.getter(name="eventTimeToLive") @@ -2299,8 +3136,29 @@ def __init__(__self__, *, :param str storage_account_id: Specifies the id of the storage account id where the storage blob is located. :param str storage_blob_container_name: Specifies the name of the Storage blob container that is the destination of the deadletter events. """ - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "storage_blob_container_name", storage_blob_container_name) + EventSubscriptionStorageBlobDeadLetterDestination._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_id=storage_account_id, + storage_blob_container_name=storage_blob_container_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_id: Optional[str] = None, + storage_blob_container_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if storage_blob_container_name is None and 'storageBlobContainerName' in kwargs: + storage_blob_container_name = kwargs['storageBlobContainerName'] + if storage_blob_container_name is None: + raise TypeError("Missing 'storage_blob_container_name' argument") + + _setter("storage_account_id", storage_account_id) + _setter("storage_blob_container_name", storage_blob_container_name) @property @pulumi.getter(name="storageAccountId") @@ -2351,10 +3209,35 @@ def __init__(__self__, *, :param str storage_account_id: Specifies the id of the storage account id where the storage queue is located. :param int queue_message_time_to_live_in_seconds: Storage queue message time to live in seconds. """ - pulumi.set(__self__, "queue_name", queue_name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + EventSubscriptionStorageQueueEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + queue_name=queue_name, + storage_account_id=storage_account_id, + queue_message_time_to_live_in_seconds=queue_message_time_to_live_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + queue_name: Optional[str] = None, + storage_account_id: Optional[str] = None, + queue_message_time_to_live_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if queue_name is None and 'queueName' in kwargs: + queue_name = kwargs['queueName'] + if queue_name is None: + raise TypeError("Missing 'queue_name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if queue_message_time_to_live_in_seconds is None and 'queueMessageTimeToLiveInSeconds' in kwargs: + queue_message_time_to_live_in_seconds = kwargs['queueMessageTimeToLiveInSeconds'] + + _setter("queue_name", queue_name) + _setter("storage_account_id", storage_account_id) if queue_message_time_to_live_in_seconds is not None: - pulumi.set(__self__, "queue_message_time_to_live_in_seconds", queue_message_time_to_live_in_seconds) + _setter("queue_message_time_to_live_in_seconds", queue_message_time_to_live_in_seconds) @property @pulumi.getter(name="queueName") @@ -2413,12 +3296,33 @@ def __init__(__self__, *, :param str subject_begins_with: A string to filter events for an event subscription based on a resource path prefix. :param str subject_ends_with: A string to filter events for an event subscription based on a resource path suffix. """ + EventSubscriptionSubjectFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + case_sensitive=case_sensitive, + subject_begins_with=subject_begins_with, + subject_ends_with=subject_ends_with, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + case_sensitive: Optional[bool] = None, + subject_begins_with: Optional[str] = None, + subject_ends_with: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if case_sensitive is None and 'caseSensitive' in kwargs: + case_sensitive = kwargs['caseSensitive'] + if subject_begins_with is None and 'subjectBeginsWith' in kwargs: + subject_begins_with = kwargs['subjectBeginsWith'] + if subject_ends_with is None and 'subjectEndsWith' in kwargs: + subject_ends_with = kwargs['subjectEndsWith'] + if case_sensitive is not None: - pulumi.set(__self__, "case_sensitive", case_sensitive) + _setter("case_sensitive", case_sensitive) if subject_begins_with is not None: - pulumi.set(__self__, "subject_begins_with", subject_begins_with) + _setter("subject_begins_with", subject_begins_with) if subject_ends_with is not None: - pulumi.set(__self__, "subject_ends_with", subject_ends_with) + _setter("subject_ends_with", subject_ends_with) @property @pulumi.getter(name="caseSensitive") @@ -2487,17 +3391,50 @@ def __init__(__self__, *, :param int max_events_per_batch: Maximum number of events per batch. :param int preferred_batch_size_in_kilobytes: Preferred batch size in Kilobytes. """ - pulumi.set(__self__, "url", url) + EventSubscriptionWebhookEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + url=url, + active_directory_app_id_or_uri=active_directory_app_id_or_uri, + active_directory_tenant_id=active_directory_tenant_id, + base_url=base_url, + max_events_per_batch=max_events_per_batch, + preferred_batch_size_in_kilobytes=preferred_batch_size_in_kilobytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url: Optional[str] = None, + active_directory_app_id_or_uri: Optional[str] = None, + active_directory_tenant_id: Optional[str] = None, + base_url: Optional[str] = None, + max_events_per_batch: Optional[int] = None, + preferred_batch_size_in_kilobytes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url is None: + raise TypeError("Missing 'url' argument") + if active_directory_app_id_or_uri is None and 'activeDirectoryAppIdOrUri' in kwargs: + active_directory_app_id_or_uri = kwargs['activeDirectoryAppIdOrUri'] + if active_directory_tenant_id is None and 'activeDirectoryTenantId' in kwargs: + active_directory_tenant_id = kwargs['activeDirectoryTenantId'] + if base_url is None and 'baseUrl' in kwargs: + base_url = kwargs['baseUrl'] + if max_events_per_batch is None and 'maxEventsPerBatch' in kwargs: + max_events_per_batch = kwargs['maxEventsPerBatch'] + if preferred_batch_size_in_kilobytes is None and 'preferredBatchSizeInKilobytes' in kwargs: + preferred_batch_size_in_kilobytes = kwargs['preferredBatchSizeInKilobytes'] + + _setter("url", url) if active_directory_app_id_or_uri is not None: - pulumi.set(__self__, "active_directory_app_id_or_uri", active_directory_app_id_or_uri) + _setter("active_directory_app_id_or_uri", active_directory_app_id_or_uri) if active_directory_tenant_id is not None: - pulumi.set(__self__, "active_directory_tenant_id", active_directory_tenant_id) + _setter("active_directory_tenant_id", active_directory_tenant_id) if base_url is not None: - pulumi.set(__self__, "base_url", base_url) + _setter("base_url", base_url) if max_events_per_batch is not None: - pulumi.set(__self__, "max_events_per_batch", max_events_per_batch) + _setter("max_events_per_batch", max_events_per_batch) if preferred_batch_size_in_kilobytes is not None: - pulumi.set(__self__, "preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) + _setter("preferred_batch_size_in_kilobytes", preferred_batch_size_in_kilobytes) @property @pulumi.getter @@ -2580,10 +3517,35 @@ def __init__(__self__, *, :param str key_vault_key_id: The ID of the Key Vault Key which should be used to Encrypt the data in this ServiceBus Namespace. :param bool infrastructure_encryption_enabled: Used to specify whether enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created. """ - pulumi.set(__self__, "identity_id", identity_id) - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + NamespaceCustomerManagedKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_id=identity_id, + key_vault_key_id=key_vault_key_id, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_id: Optional[str] = None, + key_vault_key_id: Optional[str] = None, + infrastructure_encryption_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if identity_id is None: + raise TypeError("Missing 'identity_id' argument") + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + + _setter("identity_id", identity_id) + _setter("key_vault_key_id", key_vault_key_id) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) @property @pulumi.getter(name="identityId") @@ -2646,13 +3608,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this ServiceBus Namespace. :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this ServiceBus Namespace. """ - pulumi.set(__self__, "type", type) + NamespaceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -2729,16 +3716,45 @@ def __init__(__self__, *, :param bool public_network_access_enabled: Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`. :param bool trusted_services_allowed: Are Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration? See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md) """ + NamespaceNetworkRuleSet._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + network_rules=network_rules, + public_network_access_enabled=public_network_access_enabled, + trusted_services_allowed=trusted_services_allowed, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[str] = None, + ip_rules: Optional[Sequence[str]] = None, + network_rules: Optional[Sequence['outputs.NamespaceNetworkRuleSetNetworkRule']] = None, + public_network_access_enabled: Optional[bool] = None, + trusted_services_allowed: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if network_rules is None and 'networkRules' in kwargs: + network_rules = kwargs['networkRules'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if trusted_services_allowed is None and 'trustedServicesAllowed' in kwargs: + trusted_services_allowed = kwargs['trustedServicesAllowed'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if network_rules is not None: - pulumi.set(__self__, "network_rules", network_rules) + _setter("network_rules", network_rules) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if trusted_services_allowed is not None: - pulumi.set(__self__, "trusted_services_allowed", trusted_services_allowed) + _setter("trusted_services_allowed", trusted_services_allowed) @property @pulumi.getter(name="defaultAction") @@ -2809,9 +3825,28 @@ def __init__(__self__, *, :param str subnet_id: The Subnet ID which should be able to access this ServiceBus Namespace. :param bool ignore_missing_vnet_service_endpoint: Should the ServiceBus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to `false`. """ - pulumi.set(__self__, "subnet_id", subnet_id) + NamespaceNetworkRuleSetNetworkRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[str] = None, + ignore_missing_vnet_service_endpoint: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + + _setter("subnet_id", subnet_id) if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) @property @pulumi.getter(name="subnetId") @@ -2864,12 +3899,33 @@ def __init__(__self__, *, :param bool is_client_scoped_subscription_durable: Whether the client scoped subscription is durable. This property can only be controlled from the application side. :param bool is_client_scoped_subscription_shareable: Whether the client scoped subscription is shareable. Defaults to `true` Changing this forces a new resource to be created. """ + SubscriptionClientScopedSubscription._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + is_client_scoped_subscription_durable=is_client_scoped_subscription_durable, + is_client_scoped_subscription_shareable=is_client_scoped_subscription_shareable, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + is_client_scoped_subscription_durable: Optional[bool] = None, + is_client_scoped_subscription_shareable: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if is_client_scoped_subscription_durable is None and 'isClientScopedSubscriptionDurable' in kwargs: + is_client_scoped_subscription_durable = kwargs['isClientScopedSubscriptionDurable'] + if is_client_scoped_subscription_shareable is None and 'isClientScopedSubscriptionShareable' in kwargs: + is_client_scoped_subscription_shareable = kwargs['isClientScopedSubscriptionShareable'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if is_client_scoped_subscription_durable is not None: - pulumi.set(__self__, "is_client_scoped_subscription_durable", is_client_scoped_subscription_durable) + _setter("is_client_scoped_subscription_durable", is_client_scoped_subscription_durable) if is_client_scoped_subscription_shareable is not None: - pulumi.set(__self__, "is_client_scoped_subscription_shareable", is_client_scoped_subscription_shareable) + _setter("is_client_scoped_subscription_shareable", is_client_scoped_subscription_shareable) @property @pulumi.getter(name="clientId") @@ -2950,24 +4006,63 @@ def __init__(__self__, *, :param str session_id: Session identifier. :param str to: Address to send to. """ + SubscriptionRuleCorrelationFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + correlation_id=correlation_id, + label=label, + message_id=message_id, + properties=properties, + reply_to=reply_to, + reply_to_session_id=reply_to_session_id, + session_id=session_id, + to=to, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[str] = None, + correlation_id: Optional[str] = None, + label: Optional[str] = None, + message_id: Optional[str] = None, + properties: Optional[Mapping[str, str]] = None, + reply_to: Optional[str] = None, + reply_to_session_id: Optional[str] = None, + session_id: Optional[str] = None, + to: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if correlation_id is None and 'correlationId' in kwargs: + correlation_id = kwargs['correlationId'] + if message_id is None and 'messageId' in kwargs: + message_id = kwargs['messageId'] + if reply_to is None and 'replyTo' in kwargs: + reply_to = kwargs['replyTo'] + if reply_to_session_id is None and 'replyToSessionId' in kwargs: + reply_to_session_id = kwargs['replyToSessionId'] + if session_id is None and 'sessionId' in kwargs: + session_id = kwargs['sessionId'] + if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if correlation_id is not None: - pulumi.set(__self__, "correlation_id", correlation_id) + _setter("correlation_id", correlation_id) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if message_id is not None: - pulumi.set(__self__, "message_id", message_id) + _setter("message_id", message_id) if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) if reply_to is not None: - pulumi.set(__self__, "reply_to", reply_to) + _setter("reply_to", reply_to) if reply_to_session_id is not None: - pulumi.set(__self__, "reply_to_session_id", reply_to_session_id) + _setter("reply_to_session_id", reply_to_session_id) if session_id is not None: - pulumi.set(__self__, "session_id", session_id) + _setter("session_id", session_id) if to is not None: - pulumi.set(__self__, "to", to) + _setter("to", to) @property @pulumi.getter(name="contentType") diff --git a/sdk/python/pulumi_azure/eventhub/queue.py b/sdk/python/pulumi_azure/eventhub/queue.py index eae2b1a1f6..e882596074 100644 --- a/sdk/python/pulumi_azure/eventhub/queue.py +++ b/sdk/python/pulumi_azure/eventhub/queue.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['QueueArgs', 'Queue'] @@ -57,41 +57,120 @@ def __init__(__self__, *, :param pulumi.Input[bool] requires_session: Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`. :param pulumi.Input[str] status: The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`. """ - pulumi.set(__self__, "namespace_id", namespace_id) + QueueArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_id=namespace_id, + auto_delete_on_idle=auto_delete_on_idle, + dead_lettering_on_message_expiration=dead_lettering_on_message_expiration, + default_message_ttl=default_message_ttl, + duplicate_detection_history_time_window=duplicate_detection_history_time_window, + enable_batched_operations=enable_batched_operations, + enable_express=enable_express, + enable_partitioning=enable_partitioning, + forward_dead_lettered_messages_to=forward_dead_lettered_messages_to, + forward_to=forward_to, + lock_duration=lock_duration, + max_delivery_count=max_delivery_count, + max_message_size_in_kilobytes=max_message_size_in_kilobytes, + max_size_in_megabytes=max_size_in_megabytes, + name=name, + requires_duplicate_detection=requires_duplicate_detection, + requires_session=requires_session, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_id: Optional[pulumi.Input[str]] = None, + auto_delete_on_idle: Optional[pulumi.Input[str]] = None, + dead_lettering_on_message_expiration: Optional[pulumi.Input[bool]] = None, + default_message_ttl: Optional[pulumi.Input[str]] = None, + duplicate_detection_history_time_window: Optional[pulumi.Input[str]] = None, + enable_batched_operations: Optional[pulumi.Input[bool]] = None, + enable_express: Optional[pulumi.Input[bool]] = None, + enable_partitioning: Optional[pulumi.Input[bool]] = None, + forward_dead_lettered_messages_to: Optional[pulumi.Input[str]] = None, + forward_to: Optional[pulumi.Input[str]] = None, + lock_duration: Optional[pulumi.Input[str]] = None, + max_delivery_count: Optional[pulumi.Input[int]] = None, + max_message_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + max_size_in_megabytes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + requires_duplicate_detection: Optional[pulumi.Input[bool]] = None, + requires_session: Optional[pulumi.Input[bool]] = None, + status: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if namespace_id is None: + raise TypeError("Missing 'namespace_id' argument") + if auto_delete_on_idle is None and 'autoDeleteOnIdle' in kwargs: + auto_delete_on_idle = kwargs['autoDeleteOnIdle'] + if dead_lettering_on_message_expiration is None and 'deadLetteringOnMessageExpiration' in kwargs: + dead_lettering_on_message_expiration = kwargs['deadLetteringOnMessageExpiration'] + if default_message_ttl is None and 'defaultMessageTtl' in kwargs: + default_message_ttl = kwargs['defaultMessageTtl'] + if duplicate_detection_history_time_window is None and 'duplicateDetectionHistoryTimeWindow' in kwargs: + duplicate_detection_history_time_window = kwargs['duplicateDetectionHistoryTimeWindow'] + if enable_batched_operations is None and 'enableBatchedOperations' in kwargs: + enable_batched_operations = kwargs['enableBatchedOperations'] + if enable_express is None and 'enableExpress' in kwargs: + enable_express = kwargs['enableExpress'] + if enable_partitioning is None and 'enablePartitioning' in kwargs: + enable_partitioning = kwargs['enablePartitioning'] + if forward_dead_lettered_messages_to is None and 'forwardDeadLetteredMessagesTo' in kwargs: + forward_dead_lettered_messages_to = kwargs['forwardDeadLetteredMessagesTo'] + if forward_to is None and 'forwardTo' in kwargs: + forward_to = kwargs['forwardTo'] + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if max_message_size_in_kilobytes is None and 'maxMessageSizeInKilobytes' in kwargs: + max_message_size_in_kilobytes = kwargs['maxMessageSizeInKilobytes'] + if max_size_in_megabytes is None and 'maxSizeInMegabytes' in kwargs: + max_size_in_megabytes = kwargs['maxSizeInMegabytes'] + if requires_duplicate_detection is None and 'requiresDuplicateDetection' in kwargs: + requires_duplicate_detection = kwargs['requiresDuplicateDetection'] + if requires_session is None and 'requiresSession' in kwargs: + requires_session = kwargs['requiresSession'] + + _setter("namespace_id", namespace_id) if auto_delete_on_idle is not None: - pulumi.set(__self__, "auto_delete_on_idle", auto_delete_on_idle) + _setter("auto_delete_on_idle", auto_delete_on_idle) if dead_lettering_on_message_expiration is not None: - pulumi.set(__self__, "dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) + _setter("dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) if default_message_ttl is not None: - pulumi.set(__self__, "default_message_ttl", default_message_ttl) + _setter("default_message_ttl", default_message_ttl) if duplicate_detection_history_time_window is not None: - pulumi.set(__self__, "duplicate_detection_history_time_window", duplicate_detection_history_time_window) + _setter("duplicate_detection_history_time_window", duplicate_detection_history_time_window) if enable_batched_operations is not None: - pulumi.set(__self__, "enable_batched_operations", enable_batched_operations) + _setter("enable_batched_operations", enable_batched_operations) if enable_express is not None: - pulumi.set(__self__, "enable_express", enable_express) + _setter("enable_express", enable_express) if enable_partitioning is not None: - pulumi.set(__self__, "enable_partitioning", enable_partitioning) + _setter("enable_partitioning", enable_partitioning) if forward_dead_lettered_messages_to is not None: - pulumi.set(__self__, "forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) + _setter("forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) if forward_to is not None: - pulumi.set(__self__, "forward_to", forward_to) + _setter("forward_to", forward_to) if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) if max_message_size_in_kilobytes is not None: - pulumi.set(__self__, "max_message_size_in_kilobytes", max_message_size_in_kilobytes) + _setter("max_message_size_in_kilobytes", max_message_size_in_kilobytes) if max_size_in_megabytes is not None: - pulumi.set(__self__, "max_size_in_megabytes", max_size_in_megabytes) + _setter("max_size_in_megabytes", max_size_in_megabytes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if requires_duplicate_detection is not None: - pulumi.set(__self__, "requires_duplicate_detection", requires_duplicate_detection) + _setter("requires_duplicate_detection", requires_duplicate_detection) if requires_session is not None: - pulumi.set(__self__, "requires_session", requires_session) + _setter("requires_session", requires_session) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) @property @pulumi.getter(name="namespaceId") @@ -362,46 +441,131 @@ def __init__(__self__, *, :param pulumi.Input[bool] requires_session: Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`. :param pulumi.Input[str] status: The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`. """ + _QueueState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_delete_on_idle=auto_delete_on_idle, + dead_lettering_on_message_expiration=dead_lettering_on_message_expiration, + default_message_ttl=default_message_ttl, + duplicate_detection_history_time_window=duplicate_detection_history_time_window, + enable_batched_operations=enable_batched_operations, + enable_express=enable_express, + enable_partitioning=enable_partitioning, + forward_dead_lettered_messages_to=forward_dead_lettered_messages_to, + forward_to=forward_to, + lock_duration=lock_duration, + max_delivery_count=max_delivery_count, + max_message_size_in_kilobytes=max_message_size_in_kilobytes, + max_size_in_megabytes=max_size_in_megabytes, + name=name, + namespace_id=namespace_id, + namespace_name=namespace_name, + requires_duplicate_detection=requires_duplicate_detection, + requires_session=requires_session, + resource_group_name=resource_group_name, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_delete_on_idle: Optional[pulumi.Input[str]] = None, + dead_lettering_on_message_expiration: Optional[pulumi.Input[bool]] = None, + default_message_ttl: Optional[pulumi.Input[str]] = None, + duplicate_detection_history_time_window: Optional[pulumi.Input[str]] = None, + enable_batched_operations: Optional[pulumi.Input[bool]] = None, + enable_express: Optional[pulumi.Input[bool]] = None, + enable_partitioning: Optional[pulumi.Input[bool]] = None, + forward_dead_lettered_messages_to: Optional[pulumi.Input[str]] = None, + forward_to: Optional[pulumi.Input[str]] = None, + lock_duration: Optional[pulumi.Input[str]] = None, + max_delivery_count: Optional[pulumi.Input[int]] = None, + max_message_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + max_size_in_megabytes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_id: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + requires_duplicate_detection: Optional[pulumi.Input[bool]] = None, + requires_session: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_delete_on_idle is None and 'autoDeleteOnIdle' in kwargs: + auto_delete_on_idle = kwargs['autoDeleteOnIdle'] + if dead_lettering_on_message_expiration is None and 'deadLetteringOnMessageExpiration' in kwargs: + dead_lettering_on_message_expiration = kwargs['deadLetteringOnMessageExpiration'] + if default_message_ttl is None and 'defaultMessageTtl' in kwargs: + default_message_ttl = kwargs['defaultMessageTtl'] + if duplicate_detection_history_time_window is None and 'duplicateDetectionHistoryTimeWindow' in kwargs: + duplicate_detection_history_time_window = kwargs['duplicateDetectionHistoryTimeWindow'] + if enable_batched_operations is None and 'enableBatchedOperations' in kwargs: + enable_batched_operations = kwargs['enableBatchedOperations'] + if enable_express is None and 'enableExpress' in kwargs: + enable_express = kwargs['enableExpress'] + if enable_partitioning is None and 'enablePartitioning' in kwargs: + enable_partitioning = kwargs['enablePartitioning'] + if forward_dead_lettered_messages_to is None and 'forwardDeadLetteredMessagesTo' in kwargs: + forward_dead_lettered_messages_to = kwargs['forwardDeadLetteredMessagesTo'] + if forward_to is None and 'forwardTo' in kwargs: + forward_to = kwargs['forwardTo'] + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if max_message_size_in_kilobytes is None and 'maxMessageSizeInKilobytes' in kwargs: + max_message_size_in_kilobytes = kwargs['maxMessageSizeInKilobytes'] + if max_size_in_megabytes is None and 'maxSizeInMegabytes' in kwargs: + max_size_in_megabytes = kwargs['maxSizeInMegabytes'] + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if requires_duplicate_detection is None and 'requiresDuplicateDetection' in kwargs: + requires_duplicate_detection = kwargs['requiresDuplicateDetection'] + if requires_session is None and 'requiresSession' in kwargs: + requires_session = kwargs['requiresSession'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if auto_delete_on_idle is not None: - pulumi.set(__self__, "auto_delete_on_idle", auto_delete_on_idle) + _setter("auto_delete_on_idle", auto_delete_on_idle) if dead_lettering_on_message_expiration is not None: - pulumi.set(__self__, "dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) + _setter("dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) if default_message_ttl is not None: - pulumi.set(__self__, "default_message_ttl", default_message_ttl) + _setter("default_message_ttl", default_message_ttl) if duplicate_detection_history_time_window is not None: - pulumi.set(__self__, "duplicate_detection_history_time_window", duplicate_detection_history_time_window) + _setter("duplicate_detection_history_time_window", duplicate_detection_history_time_window) if enable_batched_operations is not None: - pulumi.set(__self__, "enable_batched_operations", enable_batched_operations) + _setter("enable_batched_operations", enable_batched_operations) if enable_express is not None: - pulumi.set(__self__, "enable_express", enable_express) + _setter("enable_express", enable_express) if enable_partitioning is not None: - pulumi.set(__self__, "enable_partitioning", enable_partitioning) + _setter("enable_partitioning", enable_partitioning) if forward_dead_lettered_messages_to is not None: - pulumi.set(__self__, "forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) + _setter("forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) if forward_to is not None: - pulumi.set(__self__, "forward_to", forward_to) + _setter("forward_to", forward_to) if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) if max_message_size_in_kilobytes is not None: - pulumi.set(__self__, "max_message_size_in_kilobytes", max_message_size_in_kilobytes) + _setter("max_message_size_in_kilobytes", max_message_size_in_kilobytes) if max_size_in_megabytes is not None: - pulumi.set(__self__, "max_size_in_megabytes", max_size_in_megabytes) + _setter("max_size_in_megabytes", max_size_in_megabytes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_id is not None: - pulumi.set(__self__, "namespace_id", namespace_id) + _setter("namespace_id", namespace_id) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if requires_duplicate_detection is not None: - pulumi.set(__self__, "requires_duplicate_detection", requires_duplicate_detection) + _setter("requires_duplicate_detection", requires_duplicate_detection) if requires_session is not None: - pulumi.set(__self__, "requires_session", requires_session) + _setter("requires_session", requires_session) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) @property @pulumi.getter(name="autoDeleteOnIdle") @@ -772,6 +936,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + QueueArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventhub/queue_authorization_rule.py b/sdk/python/pulumi_azure/eventhub/queue_authorization_rule.py index 3c9946ebf2..7f3f841daf 100644 --- a/sdk/python/pulumi_azure/eventhub/queue_authorization_rule.py +++ b/sdk/python/pulumi_azure/eventhub/queue_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['QueueAuthorizationRuleArgs', 'QueueAuthorizationRule'] @@ -29,15 +29,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Authorization Rule. Changing this forces a new resource to be created. :param pulumi.Input[bool] send: Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`. """ - pulumi.set(__self__, "queue_id", queue_id) + QueueAuthorizationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + queue_id=queue_id, + listen=listen, + manage=manage, + name=name, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + queue_id: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if queue_id is None and 'queueId' in kwargs: + queue_id = kwargs['queueId'] + if queue_id is None: + raise TypeError("Missing 'queue_id' argument") + + _setter("queue_id", queue_id) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="queueId") @@ -132,28 +155,73 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_key: The Secondary Key for the Authorization Rule. :param pulumi.Input[bool] send: Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`. """ + _QueueAuthorizationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + listen=listen, + manage=manage, + name=name, + primary_connection_string=primary_connection_string, + primary_connection_string_alias=primary_connection_string_alias, + primary_key=primary_key, + queue_id=queue_id, + secondary_connection_string=secondary_connection_string, + secondary_connection_string_alias=secondary_connection_string_alias, + secondary_key=secondary_key, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_connection_string_alias: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + queue_id: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_connection_string_alias: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_connection_string_alias is None and 'primaryConnectionStringAlias' in kwargs: + primary_connection_string_alias = kwargs['primaryConnectionStringAlias'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if queue_id is None and 'queueId' in kwargs: + queue_id = kwargs['queueId'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_connection_string_alias is None and 'secondaryConnectionStringAlias' in kwargs: + secondary_connection_string_alias = kwargs['secondaryConnectionStringAlias'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_connection_string_alias is not None: - pulumi.set(__self__, "primary_connection_string_alias", primary_connection_string_alias) + _setter("primary_connection_string_alias", primary_connection_string_alias) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if queue_id is not None: - pulumi.set(__self__, "queue_id", queue_id) + _setter("queue_id", queue_id) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_connection_string_alias is not None: - pulumi.set(__self__, "secondary_connection_string_alias", secondary_connection_string_alias) + _setter("secondary_connection_string_alias", secondary_connection_string_alias) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter @@ -402,6 +470,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + QueueAuthorizationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventhub/subscription.py b/sdk/python/pulumi_azure/eventhub/subscription.py index 1921b48d78..4aad80fd5a 100644 --- a/sdk/python/pulumi_azure/eventhub/subscription.py +++ b/sdk/python/pulumi_azure/eventhub/subscription.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -51,34 +51,103 @@ def __init__(__self__, *, :param pulumi.Input[bool] requires_session: Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created. :param pulumi.Input[str] status: The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`. """ - pulumi.set(__self__, "max_delivery_count", max_delivery_count) - pulumi.set(__self__, "topic_id", topic_id) + SubscriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_delivery_count=max_delivery_count, + topic_id=topic_id, + auto_delete_on_idle=auto_delete_on_idle, + client_scoped_subscription=client_scoped_subscription, + client_scoped_subscription_enabled=client_scoped_subscription_enabled, + dead_lettering_on_filter_evaluation_error=dead_lettering_on_filter_evaluation_error, + dead_lettering_on_message_expiration=dead_lettering_on_message_expiration, + default_message_ttl=default_message_ttl, + enable_batched_operations=enable_batched_operations, + forward_dead_lettered_messages_to=forward_dead_lettered_messages_to, + forward_to=forward_to, + lock_duration=lock_duration, + name=name, + requires_session=requires_session, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_delivery_count: Optional[pulumi.Input[int]] = None, + topic_id: Optional[pulumi.Input[str]] = None, + auto_delete_on_idle: Optional[pulumi.Input[str]] = None, + client_scoped_subscription: Optional[pulumi.Input['SubscriptionClientScopedSubscriptionArgs']] = None, + client_scoped_subscription_enabled: Optional[pulumi.Input[bool]] = None, + dead_lettering_on_filter_evaluation_error: Optional[pulumi.Input[bool]] = None, + dead_lettering_on_message_expiration: Optional[pulumi.Input[bool]] = None, + default_message_ttl: Optional[pulumi.Input[str]] = None, + enable_batched_operations: Optional[pulumi.Input[bool]] = None, + forward_dead_lettered_messages_to: Optional[pulumi.Input[str]] = None, + forward_to: Optional[pulumi.Input[str]] = None, + lock_duration: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + requires_session: Optional[pulumi.Input[bool]] = None, + status: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if max_delivery_count is None: + raise TypeError("Missing 'max_delivery_count' argument") + if topic_id is None and 'topicId' in kwargs: + topic_id = kwargs['topicId'] + if topic_id is None: + raise TypeError("Missing 'topic_id' argument") + if auto_delete_on_idle is None and 'autoDeleteOnIdle' in kwargs: + auto_delete_on_idle = kwargs['autoDeleteOnIdle'] + if client_scoped_subscription is None and 'clientScopedSubscription' in kwargs: + client_scoped_subscription = kwargs['clientScopedSubscription'] + if client_scoped_subscription_enabled is None and 'clientScopedSubscriptionEnabled' in kwargs: + client_scoped_subscription_enabled = kwargs['clientScopedSubscriptionEnabled'] + if dead_lettering_on_filter_evaluation_error is None and 'deadLetteringOnFilterEvaluationError' in kwargs: + dead_lettering_on_filter_evaluation_error = kwargs['deadLetteringOnFilterEvaluationError'] + if dead_lettering_on_message_expiration is None and 'deadLetteringOnMessageExpiration' in kwargs: + dead_lettering_on_message_expiration = kwargs['deadLetteringOnMessageExpiration'] + if default_message_ttl is None and 'defaultMessageTtl' in kwargs: + default_message_ttl = kwargs['defaultMessageTtl'] + if enable_batched_operations is None and 'enableBatchedOperations' in kwargs: + enable_batched_operations = kwargs['enableBatchedOperations'] + if forward_dead_lettered_messages_to is None and 'forwardDeadLetteredMessagesTo' in kwargs: + forward_dead_lettered_messages_to = kwargs['forwardDeadLetteredMessagesTo'] + if forward_to is None and 'forwardTo' in kwargs: + forward_to = kwargs['forwardTo'] + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if requires_session is None and 'requiresSession' in kwargs: + requires_session = kwargs['requiresSession'] + + _setter("max_delivery_count", max_delivery_count) + _setter("topic_id", topic_id) if auto_delete_on_idle is not None: - pulumi.set(__self__, "auto_delete_on_idle", auto_delete_on_idle) + _setter("auto_delete_on_idle", auto_delete_on_idle) if client_scoped_subscription is not None: - pulumi.set(__self__, "client_scoped_subscription", client_scoped_subscription) + _setter("client_scoped_subscription", client_scoped_subscription) if client_scoped_subscription_enabled is not None: - pulumi.set(__self__, "client_scoped_subscription_enabled", client_scoped_subscription_enabled) + _setter("client_scoped_subscription_enabled", client_scoped_subscription_enabled) if dead_lettering_on_filter_evaluation_error is not None: - pulumi.set(__self__, "dead_lettering_on_filter_evaluation_error", dead_lettering_on_filter_evaluation_error) + _setter("dead_lettering_on_filter_evaluation_error", dead_lettering_on_filter_evaluation_error) if dead_lettering_on_message_expiration is not None: - pulumi.set(__self__, "dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) + _setter("dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) if default_message_ttl is not None: - pulumi.set(__self__, "default_message_ttl", default_message_ttl) + _setter("default_message_ttl", default_message_ttl) if enable_batched_operations is not None: - pulumi.set(__self__, "enable_batched_operations", enable_batched_operations) + _setter("enable_batched_operations", enable_batched_operations) if forward_dead_lettered_messages_to is not None: - pulumi.set(__self__, "forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) + _setter("forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) if forward_to is not None: - pulumi.set(__self__, "forward_to", forward_to) + _setter("forward_to", forward_to) if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if requires_session is not None: - pulumi.set(__self__, "requires_session", requires_session) + _setter("requires_session", requires_session) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) @property @pulumi.getter(name="maxDeliveryCount") @@ -301,36 +370,101 @@ def __init__(__self__, *, :param pulumi.Input[str] status: The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`. :param pulumi.Input[str] topic_id: The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created. """ + _SubscriptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_delete_on_idle=auto_delete_on_idle, + client_scoped_subscription=client_scoped_subscription, + client_scoped_subscription_enabled=client_scoped_subscription_enabled, + dead_lettering_on_filter_evaluation_error=dead_lettering_on_filter_evaluation_error, + dead_lettering_on_message_expiration=dead_lettering_on_message_expiration, + default_message_ttl=default_message_ttl, + enable_batched_operations=enable_batched_operations, + forward_dead_lettered_messages_to=forward_dead_lettered_messages_to, + forward_to=forward_to, + lock_duration=lock_duration, + max_delivery_count=max_delivery_count, + name=name, + requires_session=requires_session, + status=status, + topic_id=topic_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_delete_on_idle: Optional[pulumi.Input[str]] = None, + client_scoped_subscription: Optional[pulumi.Input['SubscriptionClientScopedSubscriptionArgs']] = None, + client_scoped_subscription_enabled: Optional[pulumi.Input[bool]] = None, + dead_lettering_on_filter_evaluation_error: Optional[pulumi.Input[bool]] = None, + dead_lettering_on_message_expiration: Optional[pulumi.Input[bool]] = None, + default_message_ttl: Optional[pulumi.Input[str]] = None, + enable_batched_operations: Optional[pulumi.Input[bool]] = None, + forward_dead_lettered_messages_to: Optional[pulumi.Input[str]] = None, + forward_to: Optional[pulumi.Input[str]] = None, + lock_duration: Optional[pulumi.Input[str]] = None, + max_delivery_count: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + requires_session: Optional[pulumi.Input[bool]] = None, + status: Optional[pulumi.Input[str]] = None, + topic_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_delete_on_idle is None and 'autoDeleteOnIdle' in kwargs: + auto_delete_on_idle = kwargs['autoDeleteOnIdle'] + if client_scoped_subscription is None and 'clientScopedSubscription' in kwargs: + client_scoped_subscription = kwargs['clientScopedSubscription'] + if client_scoped_subscription_enabled is None and 'clientScopedSubscriptionEnabled' in kwargs: + client_scoped_subscription_enabled = kwargs['clientScopedSubscriptionEnabled'] + if dead_lettering_on_filter_evaluation_error is None and 'deadLetteringOnFilterEvaluationError' in kwargs: + dead_lettering_on_filter_evaluation_error = kwargs['deadLetteringOnFilterEvaluationError'] + if dead_lettering_on_message_expiration is None and 'deadLetteringOnMessageExpiration' in kwargs: + dead_lettering_on_message_expiration = kwargs['deadLetteringOnMessageExpiration'] + if default_message_ttl is None and 'defaultMessageTtl' in kwargs: + default_message_ttl = kwargs['defaultMessageTtl'] + if enable_batched_operations is None and 'enableBatchedOperations' in kwargs: + enable_batched_operations = kwargs['enableBatchedOperations'] + if forward_dead_lettered_messages_to is None and 'forwardDeadLetteredMessagesTo' in kwargs: + forward_dead_lettered_messages_to = kwargs['forwardDeadLetteredMessagesTo'] + if forward_to is None and 'forwardTo' in kwargs: + forward_to = kwargs['forwardTo'] + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if requires_session is None and 'requiresSession' in kwargs: + requires_session = kwargs['requiresSession'] + if topic_id is None and 'topicId' in kwargs: + topic_id = kwargs['topicId'] + if auto_delete_on_idle is not None: - pulumi.set(__self__, "auto_delete_on_idle", auto_delete_on_idle) + _setter("auto_delete_on_idle", auto_delete_on_idle) if client_scoped_subscription is not None: - pulumi.set(__self__, "client_scoped_subscription", client_scoped_subscription) + _setter("client_scoped_subscription", client_scoped_subscription) if client_scoped_subscription_enabled is not None: - pulumi.set(__self__, "client_scoped_subscription_enabled", client_scoped_subscription_enabled) + _setter("client_scoped_subscription_enabled", client_scoped_subscription_enabled) if dead_lettering_on_filter_evaluation_error is not None: - pulumi.set(__self__, "dead_lettering_on_filter_evaluation_error", dead_lettering_on_filter_evaluation_error) + _setter("dead_lettering_on_filter_evaluation_error", dead_lettering_on_filter_evaluation_error) if dead_lettering_on_message_expiration is not None: - pulumi.set(__self__, "dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) + _setter("dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) if default_message_ttl is not None: - pulumi.set(__self__, "default_message_ttl", default_message_ttl) + _setter("default_message_ttl", default_message_ttl) if enable_batched_operations is not None: - pulumi.set(__self__, "enable_batched_operations", enable_batched_operations) + _setter("enable_batched_operations", enable_batched_operations) if forward_dead_lettered_messages_to is not None: - pulumi.set(__self__, "forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) + _setter("forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) if forward_to is not None: - pulumi.set(__self__, "forward_to", forward_to) + _setter("forward_to", forward_to) if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if requires_session is not None: - pulumi.set(__self__, "requires_session", requires_session) + _setter("requires_session", requires_session) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if topic_id is not None: - pulumi.set(__self__, "topic_id", topic_id) + _setter("topic_id", topic_id) @property @pulumi.getter(name="autoDeleteOnIdle") @@ -643,6 +777,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubscriptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -674,6 +812,11 @@ def _internal_init(__self__, __props__ = SubscriptionArgs.__new__(SubscriptionArgs) __props__.__dict__["auto_delete_on_idle"] = auto_delete_on_idle + if client_scoped_subscription is not None and not isinstance(client_scoped_subscription, SubscriptionClientScopedSubscriptionArgs): + client_scoped_subscription = client_scoped_subscription or {} + def _setter(key, value): + client_scoped_subscription[key] = value + SubscriptionClientScopedSubscriptionArgs._configure(_setter, **client_scoped_subscription) __props__.__dict__["client_scoped_subscription"] = client_scoped_subscription __props__.__dict__["client_scoped_subscription_enabled"] = client_scoped_subscription_enabled __props__.__dict__["dead_lettering_on_filter_evaluation_error"] = dead_lettering_on_filter_evaluation_error diff --git a/sdk/python/pulumi_azure/eventhub/subscription_rule.py b/sdk/python/pulumi_azure/eventhub/subscription_rule.py index b93f5c83cf..4b9b127cc2 100644 --- a/sdk/python/pulumi_azure/eventhub/subscription_rule.py +++ b/sdk/python/pulumi_azure/eventhub/subscription_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,16 +31,49 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created. :param pulumi.Input[str] sql_filter: Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `SqlFilter`. """ - pulumi.set(__self__, "filter_type", filter_type) - pulumi.set(__self__, "subscription_id", subscription_id) + SubscriptionRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filter_type=filter_type, + subscription_id=subscription_id, + action=action, + correlation_filter=correlation_filter, + name=name, + sql_filter=sql_filter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filter_type: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + action: Optional[pulumi.Input[str]] = None, + correlation_filter: Optional[pulumi.Input['SubscriptionRuleCorrelationFilterArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + sql_filter: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filter_type is None and 'filterType' in kwargs: + filter_type = kwargs['filterType'] + if filter_type is None: + raise TypeError("Missing 'filter_type' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + if correlation_filter is None and 'correlationFilter' in kwargs: + correlation_filter = kwargs['correlationFilter'] + if sql_filter is None and 'sqlFilter' in kwargs: + sql_filter = kwargs['sqlFilter'] + + _setter("filter_type", filter_type) + _setter("subscription_id", subscription_id) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if correlation_filter is not None: - pulumi.set(__self__, "correlation_filter", correlation_filter) + _setter("correlation_filter", correlation_filter) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sql_filter is not None: - pulumi.set(__self__, "sql_filter", sql_filter) + _setter("sql_filter", sql_filter) @property @pulumi.getter(name="filterType") @@ -134,20 +167,53 @@ def __init__(__self__, *, :param pulumi.Input[str] sql_filter: Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `SqlFilter`. :param pulumi.Input[str] subscription_id: The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created. """ + _SubscriptionRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + correlation_filter=correlation_filter, + filter_type=filter_type, + name=name, + sql_filter=sql_filter, + sql_filter_compatibility_level=sql_filter_compatibility_level, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + correlation_filter: Optional[pulumi.Input['SubscriptionRuleCorrelationFilterArgs']] = None, + filter_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sql_filter: Optional[pulumi.Input[str]] = None, + sql_filter_compatibility_level: Optional[pulumi.Input[int]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if correlation_filter is None and 'correlationFilter' in kwargs: + correlation_filter = kwargs['correlationFilter'] + if filter_type is None and 'filterType' in kwargs: + filter_type = kwargs['filterType'] + if sql_filter is None and 'sqlFilter' in kwargs: + sql_filter = kwargs['sqlFilter'] + if sql_filter_compatibility_level is None and 'sqlFilterCompatibilityLevel' in kwargs: + sql_filter_compatibility_level = kwargs['sqlFilterCompatibilityLevel'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if correlation_filter is not None: - pulumi.set(__self__, "correlation_filter", correlation_filter) + _setter("correlation_filter", correlation_filter) if filter_type is not None: - pulumi.set(__self__, "filter_type", filter_type) + _setter("filter_type", filter_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sql_filter is not None: - pulumi.set(__self__, "sql_filter", sql_filter) + _setter("sql_filter", sql_filter) if sql_filter_compatibility_level is not None: - pulumi.set(__self__, "sql_filter_compatibility_level", sql_filter_compatibility_level) + _setter("sql_filter_compatibility_level", sql_filter_compatibility_level) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -411,6 +477,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubscriptionRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -433,6 +503,11 @@ def _internal_init(__self__, __props__ = SubscriptionRuleArgs.__new__(SubscriptionRuleArgs) __props__.__dict__["action"] = action + if correlation_filter is not None and not isinstance(correlation_filter, SubscriptionRuleCorrelationFilterArgs): + correlation_filter = correlation_filter or {} + def _setter(key, value): + correlation_filter[key] = value + SubscriptionRuleCorrelationFilterArgs._configure(_setter, **correlation_filter) __props__.__dict__["correlation_filter"] = correlation_filter if filter_type is None and not opts.urn: raise TypeError("Missing required property 'filter_type'") diff --git a/sdk/python/pulumi_azure/eventhub/topic.py b/sdk/python/pulumi_azure/eventhub/topic.py index fd372c3247..c9f51c12d1 100644 --- a/sdk/python/pulumi_azure/eventhub/topic.py +++ b/sdk/python/pulumi_azure/eventhub/topic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TopicArgs', 'Topic'] @@ -48,31 +48,90 @@ def __init__(__self__, *, :param pulumi.Input[str] status: The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`. :param pulumi.Input[bool] support_ordering: Boolean flag which controls whether the Topic supports ordering. """ - pulumi.set(__self__, "namespace_id", namespace_id) + TopicArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_id=namespace_id, + auto_delete_on_idle=auto_delete_on_idle, + default_message_ttl=default_message_ttl, + duplicate_detection_history_time_window=duplicate_detection_history_time_window, + enable_batched_operations=enable_batched_operations, + enable_express=enable_express, + enable_partitioning=enable_partitioning, + max_message_size_in_kilobytes=max_message_size_in_kilobytes, + max_size_in_megabytes=max_size_in_megabytes, + name=name, + requires_duplicate_detection=requires_duplicate_detection, + status=status, + support_ordering=support_ordering, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_id: Optional[pulumi.Input[str]] = None, + auto_delete_on_idle: Optional[pulumi.Input[str]] = None, + default_message_ttl: Optional[pulumi.Input[str]] = None, + duplicate_detection_history_time_window: Optional[pulumi.Input[str]] = None, + enable_batched_operations: Optional[pulumi.Input[bool]] = None, + enable_express: Optional[pulumi.Input[bool]] = None, + enable_partitioning: Optional[pulumi.Input[bool]] = None, + max_message_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + max_size_in_megabytes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + requires_duplicate_detection: Optional[pulumi.Input[bool]] = None, + status: Optional[pulumi.Input[str]] = None, + support_ordering: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if namespace_id is None: + raise TypeError("Missing 'namespace_id' argument") + if auto_delete_on_idle is None and 'autoDeleteOnIdle' in kwargs: + auto_delete_on_idle = kwargs['autoDeleteOnIdle'] + if default_message_ttl is None and 'defaultMessageTtl' in kwargs: + default_message_ttl = kwargs['defaultMessageTtl'] + if duplicate_detection_history_time_window is None and 'duplicateDetectionHistoryTimeWindow' in kwargs: + duplicate_detection_history_time_window = kwargs['duplicateDetectionHistoryTimeWindow'] + if enable_batched_operations is None and 'enableBatchedOperations' in kwargs: + enable_batched_operations = kwargs['enableBatchedOperations'] + if enable_express is None and 'enableExpress' in kwargs: + enable_express = kwargs['enableExpress'] + if enable_partitioning is None and 'enablePartitioning' in kwargs: + enable_partitioning = kwargs['enablePartitioning'] + if max_message_size_in_kilobytes is None and 'maxMessageSizeInKilobytes' in kwargs: + max_message_size_in_kilobytes = kwargs['maxMessageSizeInKilobytes'] + if max_size_in_megabytes is None and 'maxSizeInMegabytes' in kwargs: + max_size_in_megabytes = kwargs['maxSizeInMegabytes'] + if requires_duplicate_detection is None and 'requiresDuplicateDetection' in kwargs: + requires_duplicate_detection = kwargs['requiresDuplicateDetection'] + if support_ordering is None and 'supportOrdering' in kwargs: + support_ordering = kwargs['supportOrdering'] + + _setter("namespace_id", namespace_id) if auto_delete_on_idle is not None: - pulumi.set(__self__, "auto_delete_on_idle", auto_delete_on_idle) + _setter("auto_delete_on_idle", auto_delete_on_idle) if default_message_ttl is not None: - pulumi.set(__self__, "default_message_ttl", default_message_ttl) + _setter("default_message_ttl", default_message_ttl) if duplicate_detection_history_time_window is not None: - pulumi.set(__self__, "duplicate_detection_history_time_window", duplicate_detection_history_time_window) + _setter("duplicate_detection_history_time_window", duplicate_detection_history_time_window) if enable_batched_operations is not None: - pulumi.set(__self__, "enable_batched_operations", enable_batched_operations) + _setter("enable_batched_operations", enable_batched_operations) if enable_express is not None: - pulumi.set(__self__, "enable_express", enable_express) + _setter("enable_express", enable_express) if enable_partitioning is not None: - pulumi.set(__self__, "enable_partitioning", enable_partitioning) + _setter("enable_partitioning", enable_partitioning) if max_message_size_in_kilobytes is not None: - pulumi.set(__self__, "max_message_size_in_kilobytes", max_message_size_in_kilobytes) + _setter("max_message_size_in_kilobytes", max_message_size_in_kilobytes) if max_size_in_megabytes is not None: - pulumi.set(__self__, "max_size_in_megabytes", max_size_in_megabytes) + _setter("max_size_in_megabytes", max_size_in_megabytes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if requires_duplicate_detection is not None: - pulumi.set(__self__, "requires_duplicate_detection", requires_duplicate_detection) + _setter("requires_duplicate_detection", requires_duplicate_detection) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if support_ordering is not None: - pulumi.set(__self__, "support_ordering", support_ordering) + _setter("support_ordering", support_ordering) @property @pulumi.getter(name="namespaceId") @@ -275,36 +334,101 @@ def __init__(__self__, *, :param pulumi.Input[str] status: The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`. :param pulumi.Input[bool] support_ordering: Boolean flag which controls whether the Topic supports ordering. """ + _TopicState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_delete_on_idle=auto_delete_on_idle, + default_message_ttl=default_message_ttl, + duplicate_detection_history_time_window=duplicate_detection_history_time_window, + enable_batched_operations=enable_batched_operations, + enable_express=enable_express, + enable_partitioning=enable_partitioning, + max_message_size_in_kilobytes=max_message_size_in_kilobytes, + max_size_in_megabytes=max_size_in_megabytes, + name=name, + namespace_id=namespace_id, + namespace_name=namespace_name, + requires_duplicate_detection=requires_duplicate_detection, + resource_group_name=resource_group_name, + status=status, + support_ordering=support_ordering, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_delete_on_idle: Optional[pulumi.Input[str]] = None, + default_message_ttl: Optional[pulumi.Input[str]] = None, + duplicate_detection_history_time_window: Optional[pulumi.Input[str]] = None, + enable_batched_operations: Optional[pulumi.Input[bool]] = None, + enable_express: Optional[pulumi.Input[bool]] = None, + enable_partitioning: Optional[pulumi.Input[bool]] = None, + max_message_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + max_size_in_megabytes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_id: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + requires_duplicate_detection: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + support_ordering: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_delete_on_idle is None and 'autoDeleteOnIdle' in kwargs: + auto_delete_on_idle = kwargs['autoDeleteOnIdle'] + if default_message_ttl is None and 'defaultMessageTtl' in kwargs: + default_message_ttl = kwargs['defaultMessageTtl'] + if duplicate_detection_history_time_window is None and 'duplicateDetectionHistoryTimeWindow' in kwargs: + duplicate_detection_history_time_window = kwargs['duplicateDetectionHistoryTimeWindow'] + if enable_batched_operations is None and 'enableBatchedOperations' in kwargs: + enable_batched_operations = kwargs['enableBatchedOperations'] + if enable_express is None and 'enableExpress' in kwargs: + enable_express = kwargs['enableExpress'] + if enable_partitioning is None and 'enablePartitioning' in kwargs: + enable_partitioning = kwargs['enablePartitioning'] + if max_message_size_in_kilobytes is None and 'maxMessageSizeInKilobytes' in kwargs: + max_message_size_in_kilobytes = kwargs['maxMessageSizeInKilobytes'] + if max_size_in_megabytes is None and 'maxSizeInMegabytes' in kwargs: + max_size_in_megabytes = kwargs['maxSizeInMegabytes'] + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if requires_duplicate_detection is None and 'requiresDuplicateDetection' in kwargs: + requires_duplicate_detection = kwargs['requiresDuplicateDetection'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if support_ordering is None and 'supportOrdering' in kwargs: + support_ordering = kwargs['supportOrdering'] + if auto_delete_on_idle is not None: - pulumi.set(__self__, "auto_delete_on_idle", auto_delete_on_idle) + _setter("auto_delete_on_idle", auto_delete_on_idle) if default_message_ttl is not None: - pulumi.set(__self__, "default_message_ttl", default_message_ttl) + _setter("default_message_ttl", default_message_ttl) if duplicate_detection_history_time_window is not None: - pulumi.set(__self__, "duplicate_detection_history_time_window", duplicate_detection_history_time_window) + _setter("duplicate_detection_history_time_window", duplicate_detection_history_time_window) if enable_batched_operations is not None: - pulumi.set(__self__, "enable_batched_operations", enable_batched_operations) + _setter("enable_batched_operations", enable_batched_operations) if enable_express is not None: - pulumi.set(__self__, "enable_express", enable_express) + _setter("enable_express", enable_express) if enable_partitioning is not None: - pulumi.set(__self__, "enable_partitioning", enable_partitioning) + _setter("enable_partitioning", enable_partitioning) if max_message_size_in_kilobytes is not None: - pulumi.set(__self__, "max_message_size_in_kilobytes", max_message_size_in_kilobytes) + _setter("max_message_size_in_kilobytes", max_message_size_in_kilobytes) if max_size_in_megabytes is not None: - pulumi.set(__self__, "max_size_in_megabytes", max_size_in_megabytes) + _setter("max_size_in_megabytes", max_size_in_megabytes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_id is not None: - pulumi.set(__self__, "namespace_id", namespace_id) + _setter("namespace_id", namespace_id) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if requires_duplicate_detection is not None: - pulumi.set(__self__, "requires_duplicate_detection", requires_duplicate_detection) + _setter("requires_duplicate_detection", requires_duplicate_detection) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if support_ordering is not None: - pulumi.set(__self__, "support_ordering", support_ordering) + _setter("support_ordering", support_ordering) @property @pulumi.getter(name="autoDeleteOnIdle") @@ -611,6 +735,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TopicArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/eventhub/topic_authorization_rule.py b/sdk/python/pulumi_azure/eventhub/topic_authorization_rule.py index 16cad54e6d..b7762e4b4f 100644 --- a/sdk/python/pulumi_azure/eventhub/topic_authorization_rule.py +++ b/sdk/python/pulumi_azure/eventhub/topic_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TopicAuthorizationRuleArgs', 'TopicAuthorizationRule'] @@ -29,15 +29,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created. :param pulumi.Input[bool] send: Grants send access to this this Authorization Rule. Defaults to `false`. """ - pulumi.set(__self__, "topic_id", topic_id) + TopicAuthorizationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + topic_id=topic_id, + listen=listen, + manage=manage, + name=name, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + topic_id: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if topic_id is None and 'topicId' in kwargs: + topic_id = kwargs['topicId'] + if topic_id is None: + raise TypeError("Missing 'topic_id' argument") + + _setter("topic_id", topic_id) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="topicId") @@ -132,28 +155,73 @@ def __init__(__self__, *, > **NOTE** At least one of the 3 permissions below needs to be set. """ + _TopicAuthorizationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + listen=listen, + manage=manage, + name=name, + primary_connection_string=primary_connection_string, + primary_connection_string_alias=primary_connection_string_alias, + primary_key=primary_key, + secondary_connection_string=secondary_connection_string, + secondary_connection_string_alias=secondary_connection_string_alias, + secondary_key=secondary_key, + send=send, + topic_id=topic_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_connection_string_alias: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_connection_string_alias: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + topic_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_connection_string_alias is None and 'primaryConnectionStringAlias' in kwargs: + primary_connection_string_alias = kwargs['primaryConnectionStringAlias'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_connection_string_alias is None and 'secondaryConnectionStringAlias' in kwargs: + secondary_connection_string_alias = kwargs['secondaryConnectionStringAlias'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if topic_id is None and 'topicId' in kwargs: + topic_id = kwargs['topicId'] + if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_connection_string_alias is not None: - pulumi.set(__self__, "primary_connection_string_alias", primary_connection_string_alias) + _setter("primary_connection_string_alias", primary_connection_string_alias) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_connection_string_alias is not None: - pulumi.set(__self__, "secondary_connection_string_alias", secondary_connection_string_alias) + _setter("secondary_connection_string_alias", secondary_connection_string_alias) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) if topic_id is not None: - pulumi.set(__self__, "topic_id", topic_id) + _setter("topic_id", topic_id) @property @pulumi.getter @@ -398,6 +466,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TopicAuthorizationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/fluidrelay/_inputs.py b/sdk/python/pulumi_azure/fluidrelay/_inputs.py index 176a9f2f72..e18a4d50ea 100644 --- a/sdk/python/pulumi_azure/fluidrelay/_inputs.py +++ b/sdk/python/pulumi_azure/fluidrelay/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -26,13 +26,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Identity of this Fluid Relay Server. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Identity of this Fluid Relay Server. """ - pulumi.set(__self__, "type", type) + ServerIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/fluidrelay/outputs.py b/sdk/python/pulumi_azure/fluidrelay/outputs.py index eb7d614bc3..5737d1344d 100644 --- a/sdk/python/pulumi_azure/fluidrelay/outputs.py +++ b/sdk/python/pulumi_azure/fluidrelay/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -47,13 +47,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Identity of this Fluid Relay Server. :param str tenant_id: The Tenant ID for the Service Principal associated with the Identity of this Fluid Relay Server. """ - pulumi.set(__self__, "type", type) + ServerIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/fluidrelay/server.py b/sdk/python/pulumi_azure/fluidrelay/server.py index 7916e6e9a3..ef8dba0417 100644 --- a/sdk/python/pulumi_azure/fluidrelay/server.py +++ b/sdk/python/pulumi_azure/fluidrelay/server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,17 +31,44 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_sku: Sku of the storage associated with the resource, Possible values are `standard` and `basic`. Changing this forces a new Fluid Relay Server to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Fluid Relay Server. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + ServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + identity=identity, + location=location, + name=name, + storage_sku=storage_sku, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ServerIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_sku is None and 'storageSku' in kwargs: + storage_sku = kwargs['storageSku'] + + _setter("resource_group_name", resource_group_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_sku is not None: - pulumi.set(__self__, "storage_sku", storage_sku) + _setter("storage_sku", storage_sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -146,30 +173,79 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_sku: Sku of the storage associated with the resource, Possible values are `standard` and `basic`. Changing this forces a new Fluid Relay Server to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Fluid Relay Server. """ + _ServerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + frs_tenant_id=frs_tenant_id, + identity=identity, + location=location, + name=name, + orderer_endpoints=orderer_endpoints, + primary_key=primary_key, + resource_group_name=resource_group_name, + secondary_key=secondary_key, + service_endpoints=service_endpoints, + storage_endpoints=storage_endpoints, + storage_sku=storage_sku, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frs_tenant_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ServerIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + orderer_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + service_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + storage_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + storage_sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frs_tenant_id is None and 'frsTenantId' in kwargs: + frs_tenant_id = kwargs['frsTenantId'] + if orderer_endpoints is None and 'ordererEndpoints' in kwargs: + orderer_endpoints = kwargs['ordererEndpoints'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if service_endpoints is None and 'serviceEndpoints' in kwargs: + service_endpoints = kwargs['serviceEndpoints'] + if storage_endpoints is None and 'storageEndpoints' in kwargs: + storage_endpoints = kwargs['storageEndpoints'] + if storage_sku is None and 'storageSku' in kwargs: + storage_sku = kwargs['storageSku'] + if frs_tenant_id is not None: - pulumi.set(__self__, "frs_tenant_id", frs_tenant_id) + _setter("frs_tenant_id", frs_tenant_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if orderer_endpoints is not None: - pulumi.set(__self__, "orderer_endpoints", orderer_endpoints) + _setter("orderer_endpoints", orderer_endpoints) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if service_endpoints is not None: - pulumi.set(__self__, "service_endpoints", service_endpoints) + _setter("service_endpoints", service_endpoints) if storage_endpoints is not None: - pulumi.set(__self__, "storage_endpoints", storage_endpoints) + _setter("storage_endpoints", storage_endpoints) if storage_sku is not None: - pulumi.set(__self__, "storage_sku", storage_sku) + _setter("storage_sku", storage_sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="frsTenantId") @@ -399,6 +475,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -419,6 +499,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ServerArgs.__new__(ServerArgs) + if identity is not None and not isinstance(identity, ServerIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ServerIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/frontdoor/_inputs.py b/sdk/python/pulumi_azure/frontdoor/_inputs.py index 012a25fd97..2e274b95d0 100644 --- a/sdk/python/pulumi_azure/frontdoor/_inputs.py +++ b/sdk/python/pulumi_azure/frontdoor/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -57,20 +57,57 @@ def __init__(__self__, *, The following attributes are only valid if `certificate_source` is set to `AzureKeyVault`: :param pulumi.Input[str] minimum_tls_version: Minimum client TLS version supported. """ + CustomHttpsConfigurationCustomHttpsConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_key_vault_certificate_secret_name=azure_key_vault_certificate_secret_name, + azure_key_vault_certificate_secret_version=azure_key_vault_certificate_secret_version, + azure_key_vault_certificate_vault_id=azure_key_vault_certificate_vault_id, + certificate_source=certificate_source, + minimum_tls_version=minimum_tls_version, + provisioning_state=provisioning_state, + provisioning_substate=provisioning_substate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_key_vault_certificate_secret_name: Optional[pulumi.Input[str]] = None, + azure_key_vault_certificate_secret_version: Optional[pulumi.Input[str]] = None, + azure_key_vault_certificate_vault_id: Optional[pulumi.Input[str]] = None, + certificate_source: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + provisioning_state: Optional[pulumi.Input[str]] = None, + provisioning_substate: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_key_vault_certificate_secret_name is None and 'azureKeyVaultCertificateSecretName' in kwargs: + azure_key_vault_certificate_secret_name = kwargs['azureKeyVaultCertificateSecretName'] + if azure_key_vault_certificate_secret_version is None and 'azureKeyVaultCertificateSecretVersion' in kwargs: + azure_key_vault_certificate_secret_version = kwargs['azureKeyVaultCertificateSecretVersion'] + if azure_key_vault_certificate_vault_id is None and 'azureKeyVaultCertificateVaultId' in kwargs: + azure_key_vault_certificate_vault_id = kwargs['azureKeyVaultCertificateVaultId'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if provisioning_state is None and 'provisioningState' in kwargs: + provisioning_state = kwargs['provisioningState'] + if provisioning_substate is None and 'provisioningSubstate' in kwargs: + provisioning_substate = kwargs['provisioningSubstate'] + if azure_key_vault_certificate_secret_name is not None: - pulumi.set(__self__, "azure_key_vault_certificate_secret_name", azure_key_vault_certificate_secret_name) + _setter("azure_key_vault_certificate_secret_name", azure_key_vault_certificate_secret_name) if azure_key_vault_certificate_secret_version is not None: - pulumi.set(__self__, "azure_key_vault_certificate_secret_version", azure_key_vault_certificate_secret_version) + _setter("azure_key_vault_certificate_secret_version", azure_key_vault_certificate_secret_version) if azure_key_vault_certificate_vault_id is not None: - pulumi.set(__self__, "azure_key_vault_certificate_vault_id", azure_key_vault_certificate_vault_id) + _setter("azure_key_vault_certificate_vault_id", azure_key_vault_certificate_vault_id) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if provisioning_state is not None: - pulumi.set(__self__, "provisioning_state", provisioning_state) + _setter("provisioning_state", provisioning_state) if provisioning_substate is not None: - pulumi.set(__self__, "provisioning_substate", provisioning_substate) + _setter("provisioning_substate", provisioning_substate) @property @pulumi.getter(name="azureKeyVaultCertificateSecretName") @@ -176,19 +213,56 @@ def __init__(__self__, *, :param pulumi.Input[int] rate_limit_duration_in_minutes: The rate limit duration in minutes. Defaults to `1`. :param pulumi.Input[int] rate_limit_threshold: The rate limit threshold. Defaults to `10`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + FirewallPolicyCustomRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + type=type, + enabled=enabled, + match_conditions=match_conditions, + priority=priority, + rate_limit_duration_in_minutes=rate_limit_duration_in_minutes, + rate_limit_threshold=rate_limit_threshold, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + match_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyCustomRuleMatchConditionArgs']]]] = None, + priority: Optional[pulumi.Input[int]] = None, + rate_limit_duration_in_minutes: Optional[pulumi.Input[int]] = None, + rate_limit_threshold: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if match_conditions is None and 'matchConditions' in kwargs: + match_conditions = kwargs['matchConditions'] + if rate_limit_duration_in_minutes is None and 'rateLimitDurationInMinutes' in kwargs: + rate_limit_duration_in_minutes = kwargs['rateLimitDurationInMinutes'] + if rate_limit_threshold is None and 'rateLimitThreshold' in kwargs: + rate_limit_threshold = kwargs['rateLimitThreshold'] + + _setter("action", action) + _setter("name", name) + _setter("type", type) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if match_conditions is not None: - pulumi.set(__self__, "match_conditions", match_conditions) + _setter("match_conditions", match_conditions) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if rate_limit_duration_in_minutes is not None: - pulumi.set(__self__, "rate_limit_duration_in_minutes", rate_limit_duration_in_minutes) + _setter("rate_limit_duration_in_minutes", rate_limit_duration_in_minutes) if rate_limit_threshold is not None: - pulumi.set(__self__, "rate_limit_threshold", rate_limit_threshold) + _setter("rate_limit_threshold", rate_limit_threshold) @property @pulumi.getter @@ -304,15 +378,48 @@ def __init__(__self__, *, :param pulumi.Input[str] selector: Match against a specific key if the `match_variable` is `QueryString`, `PostArgs`, `RequestHeader` or `Cookies`. :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: Up to `5` transforms to apply. Possible values are `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `URLDecode` or`URLEncode`. """ - pulumi.set(__self__, "match_values", match_values) - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) + FirewallPolicyCustomRuleMatchConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + match_variable=match_variable, + operator=operator, + negation_condition=negation_condition, + selector=selector, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + match_variable: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + negation_condition: Optional[pulumi.Input[bool]] = None, + selector: Optional[pulumi.Input[str]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if negation_condition is None and 'negationCondition' in kwargs: + negation_condition = kwargs['negationCondition'] + + _setter("match_values", match_values) + _setter("match_variable", match_variable) + _setter("operator", operator) if negation_condition is not None: - pulumi.set(__self__, "negation_condition", negation_condition) + _setter("negation_condition", negation_condition) if selector is not None: - pulumi.set(__self__, "selector", selector) + _setter("selector", selector) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="matchValues") @@ -400,12 +507,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyManagedRuleExclusionArgs']]] exclusions: One or more `exclusion` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyManagedRuleOverrideArgs']]] overrides: One or more `override` blocks as defined below. """ - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "version", version) + FirewallPolicyManagedRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + version=version, + exclusions=exclusions, + overrides=overrides, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + exclusions: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyManagedRuleExclusionArgs']]]] = None, + overrides: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyManagedRuleOverrideArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("type", type) + _setter("version", version) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) if overrides is not None: - pulumi.set(__self__, "overrides", overrides) + _setter("overrides", overrides) @property @pulumi.getter @@ -467,9 +595,32 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: Comparison operator to apply to the selector when specifying which elements in the collection this exclusion applies to. Possible values are: `Equals`, `Contains`, `StartsWith`, `EndsWith`, `EqualsAny`. :param pulumi.Input[str] selector: Selector for the value in the `match_variable` attribute this exclusion applies to. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + FirewallPolicyManagedRuleExclusionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + operator=operator, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + selector: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + + _setter("match_variable", match_variable) + _setter("operator", operator) + _setter("selector", selector) @property @pulumi.getter(name="matchVariable") @@ -519,11 +670,30 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyManagedRuleOverrideExclusionArgs']]] exclusions: One or more `exclusion` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyManagedRuleOverrideRuleArgs']]] rules: One or more `rule` blocks as defined below. If none are specified, all of the rules in the group will be disabled. """ - pulumi.set(__self__, "rule_group_name", rule_group_name) + FirewallPolicyManagedRuleOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_group_name=rule_group_name, + exclusions=exclusions, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_group_name: Optional[pulumi.Input[str]] = None, + exclusions: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyManagedRuleOverrideExclusionArgs']]]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyManagedRuleOverrideRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_group_name is None and 'ruleGroupName' in kwargs: + rule_group_name = kwargs['ruleGroupName'] + if rule_group_name is None: + raise TypeError("Missing 'rule_group_name' argument") + + _setter("rule_group_name", rule_group_name) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter(name="ruleGroupName") @@ -573,9 +743,32 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: Comparison operator to apply to the selector when specifying which elements in the collection this exclusion applies to. Possible values are: `Equals`, `Contains`, `StartsWith`, `EndsWith`, `EqualsAny`. :param pulumi.Input[str] selector: Selector for the value in the `match_variable` attribute this exclusion applies to. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + FirewallPolicyManagedRuleOverrideExclusionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + operator=operator, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + selector: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + + _setter("match_variable", match_variable) + _setter("operator", operator) + _setter("selector", selector) @property @pulumi.getter(name="matchVariable") @@ -627,12 +820,35 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Is the managed rule override enabled or disabled. Defaults to `false` :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyManagedRuleOverrideRuleExclusionArgs']]] exclusions: One or more `exclusion` blocks as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "rule_id", rule_id) + FirewallPolicyManagedRuleOverrideRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + rule_id=rule_id, + enabled=enabled, + exclusions=exclusions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + rule_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + exclusions: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyManagedRuleOverrideRuleExclusionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if rule_id is None and 'ruleId' in kwargs: + rule_id = kwargs['ruleId'] + if rule_id is None: + raise TypeError("Missing 'rule_id' argument") + + _setter("action", action) + _setter("rule_id", rule_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) @property @pulumi.getter @@ -694,9 +910,32 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: Comparison operator to apply to the selector when specifying which elements in the collection this exclusion applies to. Possible values are: `Equals`, `Contains`, `StartsWith`, `EndsWith`, `EqualsAny`. :param pulumi.Input[str] selector: Selector for the value in the `match_variable` attribute this exclusion applies to. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + FirewallPolicyManagedRuleOverrideRuleExclusionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + operator=operator, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + selector: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + + _setter("match_variable", match_variable) + _setter("operator", operator) + _setter("selector", selector) @property @pulumi.getter(name="matchVariable") @@ -750,12 +989,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Backend Pool. :param pulumi.Input[str] id: The ID of the FrontDoor. """ - pulumi.set(__self__, "backends", backends) - pulumi.set(__self__, "health_probe_name", health_probe_name) - pulumi.set(__self__, "load_balancing_name", load_balancing_name) - pulumi.set(__self__, "name", name) + FrontdoorBackendPoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backends=backends, + health_probe_name=health_probe_name, + load_balancing_name=load_balancing_name, + name=name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backends: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorBackendPoolBackendArgs']]]] = None, + health_probe_name: Optional[pulumi.Input[str]] = None, + load_balancing_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backends is None: + raise TypeError("Missing 'backends' argument") + if health_probe_name is None and 'healthProbeName' in kwargs: + health_probe_name = kwargs['healthProbeName'] + if health_probe_name is None: + raise TypeError("Missing 'health_probe_name' argument") + if load_balancing_name is None and 'loadBalancingName' in kwargs: + load_balancing_name = kwargs['loadBalancingName'] + if load_balancing_name is None: + raise TypeError("Missing 'load_balancing_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("backends", backends) + _setter("health_probe_name", health_probe_name) + _setter("load_balancing_name", load_balancing_name) + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -837,16 +1107,53 @@ def __init__(__self__, *, :param pulumi.Input[int] priority: Priority to use for load balancing. Higher priorities will not be used for load balancing if any lower priority backend is healthy. Defaults to `1`. :param pulumi.Input[int] weight: Weight of this endpoint for load balancing purposes. Defaults to `50`. """ - pulumi.set(__self__, "address", address) - pulumi.set(__self__, "host_header", host_header) - pulumi.set(__self__, "http_port", http_port) - pulumi.set(__self__, "https_port", https_port) + FrontdoorBackendPoolBackendArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + host_header=host_header, + http_port=http_port, + https_port=https_port, + enabled=enabled, + priority=priority, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: Optional[pulumi.Input[str]] = None, + host_header: Optional[pulumi.Input[str]] = None, + http_port: Optional[pulumi.Input[int]] = None, + https_port: Optional[pulumi.Input[int]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + priority: Optional[pulumi.Input[int]] = None, + weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address is None: + raise TypeError("Missing 'address' argument") + if host_header is None and 'hostHeader' in kwargs: + host_header = kwargs['hostHeader'] + if host_header is None: + raise TypeError("Missing 'host_header' argument") + if http_port is None and 'httpPort' in kwargs: + http_port = kwargs['httpPort'] + if http_port is None: + raise TypeError("Missing 'http_port' argument") + if https_port is None and 'httpsPort' in kwargs: + https_port = kwargs['httpsPort'] + if https_port is None: + raise TypeError("Missing 'https_port' argument") + + _setter("address", address) + _setter("host_header", host_header) + _setter("http_port", http_port) + _setter("https_port", https_port) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if weight is not None: - pulumi.set(__self__, "weight", weight) + _setter("weight", weight) @property @pulumi.getter @@ -954,19 +1261,48 @@ def __init__(__self__, *, > **NOTE:** Use the `HEAD` method if you do not need to check the response body of your health probe. :param pulumi.Input[str] protocol: Protocol scheme to use for the Health Probe. Possible values are `Http` and `Https`. Defaults to `Http`. """ - pulumi.set(__self__, "name", name) + FrontdoorBackendPoolHealthProbeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + enabled=enabled, + id=id, + interval_in_seconds=interval_in_seconds, + path=path, + probe_method=probe_method, + protocol=protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + id: Optional[pulumi.Input[str]] = None, + interval_in_seconds: Optional[pulumi.Input[int]] = None, + path: Optional[pulumi.Input[str]] = None, + probe_method: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if probe_method is None and 'probeMethod' in kwargs: + probe_method = kwargs['probeMethod'] + + _setter("name", name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if interval_in_seconds is not None: - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) + _setter("interval_in_seconds", interval_in_seconds) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if probe_method is not None: - pulumi.set(__self__, "probe_method", probe_method) + _setter("probe_method", probe_method) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) @property @pulumi.getter @@ -1070,15 +1406,42 @@ def __init__(__self__, *, :param pulumi.Input[int] sample_size: The number of samples to consider for load balancing decisions. Defaults to `4`. :param pulumi.Input[int] successful_samples_required: The number of samples within the sample period that must succeed. Defaults to `2`. """ - pulumi.set(__self__, "name", name) + FrontdoorBackendPoolLoadBalancingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + additional_latency_milliseconds=additional_latency_milliseconds, + id=id, + sample_size=sample_size, + successful_samples_required=successful_samples_required, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + additional_latency_milliseconds: Optional[pulumi.Input[int]] = None, + id: Optional[pulumi.Input[str]] = None, + sample_size: Optional[pulumi.Input[int]] = None, + successful_samples_required: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if additional_latency_milliseconds is None and 'additionalLatencyMilliseconds' in kwargs: + additional_latency_milliseconds = kwargs['additionalLatencyMilliseconds'] + if sample_size is None and 'sampleSize' in kwargs: + sample_size = kwargs['sampleSize'] + if successful_samples_required is None and 'successfulSamplesRequired' in kwargs: + successful_samples_required = kwargs['successfulSamplesRequired'] + + _setter("name", name) if additional_latency_milliseconds is not None: - pulumi.set(__self__, "additional_latency_milliseconds", additional_latency_milliseconds) + _setter("additional_latency_milliseconds", additional_latency_milliseconds) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if sample_size is not None: - pulumi.set(__self__, "sample_size", sample_size) + _setter("sample_size", sample_size) if successful_samples_required is not None: - pulumi.set(__self__, "successful_samples_required", successful_samples_required) + _setter("successful_samples_required", successful_samples_required) @property @pulumi.getter @@ -1152,9 +1515,28 @@ def __init__(__self__, *, > **NOTE:** `backend_pools_send_receive_timeout_seconds` and `enforce_backend_pools_certificate_name_check` apply to all backend pools. :param pulumi.Input[int] backend_pools_send_receive_timeout_seconds: Specifies the send and receive timeout on forwarding request to the backend. When the timeout is reached, the request fails and returns. Possible values are between `0` - `240`. Defaults to `60`. """ - pulumi.set(__self__, "enforce_backend_pools_certificate_name_check", enforce_backend_pools_certificate_name_check) + FrontdoorBackendPoolSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enforce_backend_pools_certificate_name_check=enforce_backend_pools_certificate_name_check, + backend_pools_send_receive_timeout_seconds=backend_pools_send_receive_timeout_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enforce_backend_pools_certificate_name_check: Optional[pulumi.Input[bool]] = None, + backend_pools_send_receive_timeout_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enforce_backend_pools_certificate_name_check is None and 'enforceBackendPoolsCertificateNameCheck' in kwargs: + enforce_backend_pools_certificate_name_check = kwargs['enforceBackendPoolsCertificateNameCheck'] + if enforce_backend_pools_certificate_name_check is None: + raise TypeError("Missing 'enforce_backend_pools_certificate_name_check' argument") + if backend_pools_send_receive_timeout_seconds is None and 'backendPoolsSendReceiveTimeoutSeconds' in kwargs: + backend_pools_send_receive_timeout_seconds = kwargs['backendPoolsSendReceiveTimeoutSeconds'] + + _setter("enforce_backend_pools_certificate_name_check", enforce_backend_pools_certificate_name_check) if backend_pools_send_receive_timeout_seconds is not None: - pulumi.set(__self__, "backend_pools_send_receive_timeout_seconds", backend_pools_send_receive_timeout_seconds) + _setter("backend_pools_send_receive_timeout_seconds", backend_pools_send_receive_timeout_seconds) @property @pulumi.getter(name="enforceBackendPoolsCertificateNameCheck") @@ -1191,16 +1573,45 @@ def __init__(__self__, *, backend_pool_load_balancing_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, frontend_endpoint_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, routing_rule_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): + FrontdoorExplicitResourceOrderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_pool_health_probe_ids=backend_pool_health_probe_ids, + backend_pool_ids=backend_pool_ids, + backend_pool_load_balancing_ids=backend_pool_load_balancing_ids, + frontend_endpoint_ids=frontend_endpoint_ids, + routing_rule_ids=routing_rule_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_pool_health_probe_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + backend_pool_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + backend_pool_load_balancing_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + frontend_endpoint_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + routing_rule_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_pool_health_probe_ids is None and 'backendPoolHealthProbeIds' in kwargs: + backend_pool_health_probe_ids = kwargs['backendPoolHealthProbeIds'] + if backend_pool_ids is None and 'backendPoolIds' in kwargs: + backend_pool_ids = kwargs['backendPoolIds'] + if backend_pool_load_balancing_ids is None and 'backendPoolLoadBalancingIds' in kwargs: + backend_pool_load_balancing_ids = kwargs['backendPoolLoadBalancingIds'] + if frontend_endpoint_ids is None and 'frontendEndpointIds' in kwargs: + frontend_endpoint_ids = kwargs['frontendEndpointIds'] + if routing_rule_ids is None and 'routingRuleIds' in kwargs: + routing_rule_ids = kwargs['routingRuleIds'] + if backend_pool_health_probe_ids is not None: - pulumi.set(__self__, "backend_pool_health_probe_ids", backend_pool_health_probe_ids) + _setter("backend_pool_health_probe_ids", backend_pool_health_probe_ids) if backend_pool_ids is not None: - pulumi.set(__self__, "backend_pool_ids", backend_pool_ids) + _setter("backend_pool_ids", backend_pool_ids) if backend_pool_load_balancing_ids is not None: - pulumi.set(__self__, "backend_pool_load_balancing_ids", backend_pool_load_balancing_ids) + _setter("backend_pool_load_balancing_ids", backend_pool_load_balancing_ids) if frontend_endpoint_ids is not None: - pulumi.set(__self__, "frontend_endpoint_ids", frontend_endpoint_ids) + _setter("frontend_endpoint_ids", frontend_endpoint_ids) if routing_rule_ids is not None: - pulumi.set(__self__, "routing_rule_ids", routing_rule_ids) + _setter("routing_rule_ids", routing_rule_ids) @property @pulumi.getter(name="backendPoolHealthProbeIds") @@ -1265,16 +1676,49 @@ def __init__(__self__, *, :param pulumi.Input[int] session_affinity_ttl_seconds: The TTL to use in seconds for session affinity, if applicable. Defaults to `0`. :param pulumi.Input[str] web_application_firewall_policy_link_id: Defines the Web Application Firewall policy `ID` for each host. """ - pulumi.set(__self__, "host_name", host_name) - pulumi.set(__self__, "name", name) + FrontdoorFrontendEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + name=name, + id=id, + session_affinity_enabled=session_affinity_enabled, + session_affinity_ttl_seconds=session_affinity_ttl_seconds, + web_application_firewall_policy_link_id=web_application_firewall_policy_link_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + session_affinity_enabled: Optional[pulumi.Input[bool]] = None, + session_affinity_ttl_seconds: Optional[pulumi.Input[int]] = None, + web_application_firewall_policy_link_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if session_affinity_enabled is None and 'sessionAffinityEnabled' in kwargs: + session_affinity_enabled = kwargs['sessionAffinityEnabled'] + if session_affinity_ttl_seconds is None and 'sessionAffinityTtlSeconds' in kwargs: + session_affinity_ttl_seconds = kwargs['sessionAffinityTtlSeconds'] + if web_application_firewall_policy_link_id is None and 'webApplicationFirewallPolicyLinkId' in kwargs: + web_application_firewall_policy_link_id = kwargs['webApplicationFirewallPolicyLinkId'] + + _setter("host_name", host_name) + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if session_affinity_enabled is not None: - pulumi.set(__self__, "session_affinity_enabled", session_affinity_enabled) + _setter("session_affinity_enabled", session_affinity_enabled) if session_affinity_ttl_seconds is not None: - pulumi.set(__self__, "session_affinity_ttl_seconds", session_affinity_ttl_seconds) + _setter("session_affinity_ttl_seconds", session_affinity_ttl_seconds) if web_application_firewall_policy_link_id is not None: - pulumi.set(__self__, "web_application_firewall_policy_link_id", web_application_firewall_policy_link_id) + _setter("web_application_firewall_policy_link_id", web_application_firewall_policy_link_id) @property @pulumi.getter(name="hostName") @@ -1370,18 +1814,61 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the FrontDoor. :param pulumi.Input['FrontdoorRoutingRuleRedirectConfigurationArgs'] redirect_configuration: A `redirect_configuration` block as defined below. """ - pulumi.set(__self__, "accepted_protocols", accepted_protocols) - pulumi.set(__self__, "frontend_endpoints", frontend_endpoints) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "patterns_to_matches", patterns_to_matches) + FrontdoorRoutingRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + accepted_protocols=accepted_protocols, + frontend_endpoints=frontend_endpoints, + name=name, + patterns_to_matches=patterns_to_matches, + enabled=enabled, + forwarding_configuration=forwarding_configuration, + id=id, + redirect_configuration=redirect_configuration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + accepted_protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + frontend_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + patterns_to_matches: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + forwarding_configuration: Optional[pulumi.Input['FrontdoorRoutingRuleForwardingConfigurationArgs']] = None, + id: Optional[pulumi.Input[str]] = None, + redirect_configuration: Optional[pulumi.Input['FrontdoorRoutingRuleRedirectConfigurationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if accepted_protocols is None and 'acceptedProtocols' in kwargs: + accepted_protocols = kwargs['acceptedProtocols'] + if accepted_protocols is None: + raise TypeError("Missing 'accepted_protocols' argument") + if frontend_endpoints is None and 'frontendEndpoints' in kwargs: + frontend_endpoints = kwargs['frontendEndpoints'] + if frontend_endpoints is None: + raise TypeError("Missing 'frontend_endpoints' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if patterns_to_matches is None and 'patternsToMatches' in kwargs: + patterns_to_matches = kwargs['patternsToMatches'] + if patterns_to_matches is None: + raise TypeError("Missing 'patterns_to_matches' argument") + if forwarding_configuration is None and 'forwardingConfiguration' in kwargs: + forwarding_configuration = kwargs['forwardingConfiguration'] + if redirect_configuration is None and 'redirectConfiguration' in kwargs: + redirect_configuration = kwargs['redirectConfiguration'] + + _setter("accepted_protocols", accepted_protocols) + _setter("frontend_endpoints", frontend_endpoints) + _setter("name", name) + _setter("patterns_to_matches", patterns_to_matches) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if forwarding_configuration is not None: - pulumi.set(__self__, "forwarding_configuration", forwarding_configuration) + _setter("forwarding_configuration", forwarding_configuration) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if redirect_configuration is not None: - pulumi.set(__self__, "redirect_configuration", redirect_configuration) + _setter("redirect_configuration", redirect_configuration) @property @pulumi.getter(name="acceptedProtocols") @@ -1501,21 +1988,64 @@ def __init__(__self__, *, :param pulumi.Input[str] custom_forwarding_path: Path to use when constructing the request to forward to the backend. This functions as a URL Rewrite. Default behaviour preserves the URL path. :param pulumi.Input[str] forwarding_protocol: Protocol to use when redirecting. Valid options are `HttpOnly`, `HttpsOnly`, or `MatchRequest`. Defaults to `HttpsOnly`. """ - pulumi.set(__self__, "backend_pool_name", backend_pool_name) + FrontdoorRoutingRuleForwardingConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_pool_name=backend_pool_name, + cache_duration=cache_duration, + cache_enabled=cache_enabled, + cache_query_parameter_strip_directive=cache_query_parameter_strip_directive, + cache_query_parameters=cache_query_parameters, + cache_use_dynamic_compression=cache_use_dynamic_compression, + custom_forwarding_path=custom_forwarding_path, + forwarding_protocol=forwarding_protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_pool_name: Optional[pulumi.Input[str]] = None, + cache_duration: Optional[pulumi.Input[str]] = None, + cache_enabled: Optional[pulumi.Input[bool]] = None, + cache_query_parameter_strip_directive: Optional[pulumi.Input[str]] = None, + cache_query_parameters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cache_use_dynamic_compression: Optional[pulumi.Input[bool]] = None, + custom_forwarding_path: Optional[pulumi.Input[str]] = None, + forwarding_protocol: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_pool_name is None and 'backendPoolName' in kwargs: + backend_pool_name = kwargs['backendPoolName'] + if backend_pool_name is None: + raise TypeError("Missing 'backend_pool_name' argument") + if cache_duration is None and 'cacheDuration' in kwargs: + cache_duration = kwargs['cacheDuration'] + if cache_enabled is None and 'cacheEnabled' in kwargs: + cache_enabled = kwargs['cacheEnabled'] + if cache_query_parameter_strip_directive is None and 'cacheQueryParameterStripDirective' in kwargs: + cache_query_parameter_strip_directive = kwargs['cacheQueryParameterStripDirective'] + if cache_query_parameters is None and 'cacheQueryParameters' in kwargs: + cache_query_parameters = kwargs['cacheQueryParameters'] + if cache_use_dynamic_compression is None and 'cacheUseDynamicCompression' in kwargs: + cache_use_dynamic_compression = kwargs['cacheUseDynamicCompression'] + if custom_forwarding_path is None and 'customForwardingPath' in kwargs: + custom_forwarding_path = kwargs['customForwardingPath'] + if forwarding_protocol is None and 'forwardingProtocol' in kwargs: + forwarding_protocol = kwargs['forwardingProtocol'] + + _setter("backend_pool_name", backend_pool_name) if cache_duration is not None: - pulumi.set(__self__, "cache_duration", cache_duration) + _setter("cache_duration", cache_duration) if cache_enabled is not None: - pulumi.set(__self__, "cache_enabled", cache_enabled) + _setter("cache_enabled", cache_enabled) if cache_query_parameter_strip_directive is not None: - pulumi.set(__self__, "cache_query_parameter_strip_directive", cache_query_parameter_strip_directive) + _setter("cache_query_parameter_strip_directive", cache_query_parameter_strip_directive) if cache_query_parameters is not None: - pulumi.set(__self__, "cache_query_parameters", cache_query_parameters) + _setter("cache_query_parameters", cache_query_parameters) if cache_use_dynamic_compression is not None: - pulumi.set(__self__, "cache_use_dynamic_compression", cache_use_dynamic_compression) + _setter("cache_use_dynamic_compression", cache_use_dynamic_compression) if custom_forwarding_path is not None: - pulumi.set(__self__, "custom_forwarding_path", custom_forwarding_path) + _setter("custom_forwarding_path", custom_forwarding_path) if forwarding_protocol is not None: - pulumi.set(__self__, "forwarding_protocol", forwarding_protocol) + _setter("forwarding_protocol", forwarding_protocol) @property @pulumi.getter(name="backendPoolName") @@ -1631,16 +2161,53 @@ def __init__(__self__, *, :param pulumi.Input[str] custom_path: The path to retain as per the incoming request, or update in the URL for the redirection. :param pulumi.Input[str] custom_query_string: Replace any existing query string from the incoming request URL. """ - pulumi.set(__self__, "redirect_protocol", redirect_protocol) - pulumi.set(__self__, "redirect_type", redirect_type) + FrontdoorRoutingRuleRedirectConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + redirect_protocol=redirect_protocol, + redirect_type=redirect_type, + custom_fragment=custom_fragment, + custom_host=custom_host, + custom_path=custom_path, + custom_query_string=custom_query_string, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + redirect_protocol: Optional[pulumi.Input[str]] = None, + redirect_type: Optional[pulumi.Input[str]] = None, + custom_fragment: Optional[pulumi.Input[str]] = None, + custom_host: Optional[pulumi.Input[str]] = None, + custom_path: Optional[pulumi.Input[str]] = None, + custom_query_string: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if redirect_protocol is None and 'redirectProtocol' in kwargs: + redirect_protocol = kwargs['redirectProtocol'] + if redirect_protocol is None: + raise TypeError("Missing 'redirect_protocol' argument") + if redirect_type is None and 'redirectType' in kwargs: + redirect_type = kwargs['redirectType'] + if redirect_type is None: + raise TypeError("Missing 'redirect_type' argument") + if custom_fragment is None and 'customFragment' in kwargs: + custom_fragment = kwargs['customFragment'] + if custom_host is None and 'customHost' in kwargs: + custom_host = kwargs['customHost'] + if custom_path is None and 'customPath' in kwargs: + custom_path = kwargs['customPath'] + if custom_query_string is None and 'customQueryString' in kwargs: + custom_query_string = kwargs['customQueryString'] + + _setter("redirect_protocol", redirect_protocol) + _setter("redirect_type", redirect_type) if custom_fragment is not None: - pulumi.set(__self__, "custom_fragment", custom_fragment) + _setter("custom_fragment", custom_fragment) if custom_host is not None: - pulumi.set(__self__, "custom_host", custom_host) + _setter("custom_host", custom_host) if custom_path is not None: - pulumi.set(__self__, "custom_path", custom_path) + _setter("custom_path", custom_path) if custom_query_string is not None: - pulumi.set(__self__, "custom_query_string", custom_query_string) + _setter("custom_query_string", custom_query_string) @property @pulumi.getter(name="redirectProtocol") @@ -1728,12 +2295,35 @@ def __init__(__self__, *, :param pulumi.Input['RulesEngineRuleActionArgs'] action: An `action` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['RulesEngineRuleMatchConditionArgs']]] match_conditions: One or more `match_condition` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) + RulesEngineRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + priority=priority, + action=action, + match_conditions=match_conditions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + action: Optional[pulumi.Input['RulesEngineRuleActionArgs']] = None, + match_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['RulesEngineRuleMatchConditionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if match_conditions is None and 'matchConditions' in kwargs: + match_conditions = kwargs['matchConditions'] + + _setter("name", name) + _setter("priority", priority) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if match_conditions is not None: - pulumi.set(__self__, "match_conditions", match_conditions) + _setter("match_conditions", match_conditions) @property @pulumi.getter @@ -1793,10 +2383,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['RulesEngineRuleActionRequestHeaderArgs']]] request_headers: A `request_header` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['RulesEngineRuleActionResponseHeaderArgs']]] response_headers: A `response_header` block as defined below. """ + RulesEngineRuleActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + request_headers=request_headers, + response_headers=response_headers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + request_headers: Optional[pulumi.Input[Sequence[pulumi.Input['RulesEngineRuleActionRequestHeaderArgs']]]] = None, + response_headers: Optional[pulumi.Input[Sequence[pulumi.Input['RulesEngineRuleActionResponseHeaderArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if request_headers is None and 'requestHeaders' in kwargs: + request_headers = kwargs['requestHeaders'] + if response_headers is None and 'responseHeaders' in kwargs: + response_headers = kwargs['responseHeaders'] + if request_headers is not None: - pulumi.set(__self__, "request_headers", request_headers) + _setter("request_headers", request_headers) if response_headers is not None: - pulumi.set(__self__, "response_headers", response_headers) + _setter("response_headers", response_headers) @property @pulumi.getter(name="requestHeaders") @@ -1834,12 +2441,31 @@ def __init__(__self__, *, :param pulumi.Input[str] header_name: header name (string). :param pulumi.Input[str] value: value name (string). """ + RulesEngineRuleActionRequestHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_action_type=header_action_type, + header_name=header_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_action_type: Optional[pulumi.Input[str]] = None, + header_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_action_type is None and 'headerActionType' in kwargs: + header_action_type = kwargs['headerActionType'] + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_action_type is not None: - pulumi.set(__self__, "header_action_type", header_action_type) + _setter("header_action_type", header_action_type) if header_name is not None: - pulumi.set(__self__, "header_name", header_name) + _setter("header_name", header_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerActionType") @@ -1889,12 +2515,31 @@ def __init__(__self__, *, :param pulumi.Input[str] header_name: header name (string). :param pulumi.Input[str] value: value name (string). """ + RulesEngineRuleActionResponseHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_action_type=header_action_type, + header_name=header_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_action_type: Optional[pulumi.Input[str]] = None, + header_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_action_type is None and 'headerActionType' in kwargs: + header_action_type = kwargs['headerActionType'] + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_action_type is not None: - pulumi.set(__self__, "header_action_type", header_action_type) + _setter("header_action_type", header_action_type) if header_name is not None: - pulumi.set(__self__, "header_name", header_name) + _setter("header_name", header_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerActionType") @@ -1950,17 +2595,42 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: (array) can contain one or more strings. :param pulumi.Input[str] variable: can be set to `IsMobile`, `RemoteAddr`, `RequestMethod`, `QueryString`, `PostArgs`, `RequestURI`, `RequestPath`, `RequestFilename`, `RequestFilenameExtension`,`RequestHeader`,`RequestBody` or `RequestScheme`. """ - pulumi.set(__self__, "operator", operator) + RulesEngineRuleMatchConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + negate_condition=negate_condition, + selector=selector, + transforms=transforms, + values=values, + variable=variable, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + negate_condition: Optional[pulumi.Input[bool]] = None, + selector: Optional[pulumi.Input[str]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + variable: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if selector is not None: - pulumi.set(__self__, "selector", selector) + _setter("selector", selector) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) if variable is not None: - pulumi.set(__self__, "variable", variable) + _setter("variable", variable) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/frontdoor/custom_https_configuration.py b/sdk/python/pulumi_azure/frontdoor/custom_https_configuration.py index 9960e31276..70023669cd 100644 --- a/sdk/python/pulumi_azure/frontdoor/custom_https_configuration.py +++ b/sdk/python/pulumi_azure/frontdoor/custom_https_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -25,10 +25,35 @@ def __init__(__self__, *, :param pulumi.Input[str] frontend_endpoint_id: The ID of the Front Door Frontend Endpoint which this configuration refers to. Changing this forces a new resource to be created. :param pulumi.Input['CustomHttpsConfigurationCustomHttpsConfigurationArgs'] custom_https_configuration: A `custom_https_configuration` block as defined above. """ - pulumi.set(__self__, "custom_https_provisioning_enabled", custom_https_provisioning_enabled) - pulumi.set(__self__, "frontend_endpoint_id", frontend_endpoint_id) + CustomHttpsConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_https_provisioning_enabled=custom_https_provisioning_enabled, + frontend_endpoint_id=frontend_endpoint_id, + custom_https_configuration=custom_https_configuration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_https_provisioning_enabled: Optional[pulumi.Input[bool]] = None, + frontend_endpoint_id: Optional[pulumi.Input[str]] = None, + custom_https_configuration: Optional[pulumi.Input['CustomHttpsConfigurationCustomHttpsConfigurationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_https_provisioning_enabled is None and 'customHttpsProvisioningEnabled' in kwargs: + custom_https_provisioning_enabled = kwargs['customHttpsProvisioningEnabled'] + if custom_https_provisioning_enabled is None: + raise TypeError("Missing 'custom_https_provisioning_enabled' argument") + if frontend_endpoint_id is None and 'frontendEndpointId' in kwargs: + frontend_endpoint_id = kwargs['frontendEndpointId'] + if frontend_endpoint_id is None: + raise TypeError("Missing 'frontend_endpoint_id' argument") + if custom_https_configuration is None and 'customHttpsConfiguration' in kwargs: + custom_https_configuration = kwargs['customHttpsConfiguration'] + + _setter("custom_https_provisioning_enabled", custom_https_provisioning_enabled) + _setter("frontend_endpoint_id", frontend_endpoint_id) if custom_https_configuration is not None: - pulumi.set(__self__, "custom_https_configuration", custom_https_configuration) + _setter("custom_https_configuration", custom_https_configuration) @property @pulumi.getter(name="customHttpsProvisioningEnabled") @@ -79,12 +104,33 @@ def __init__(__self__, *, :param pulumi.Input[bool] custom_https_provisioning_enabled: Should the HTTPS protocol be enabled for this custom domain associated with the Front Door? :param pulumi.Input[str] frontend_endpoint_id: The ID of the Front Door Frontend Endpoint which this configuration refers to. Changing this forces a new resource to be created. """ + _CustomHttpsConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_https_configuration=custom_https_configuration, + custom_https_provisioning_enabled=custom_https_provisioning_enabled, + frontend_endpoint_id=frontend_endpoint_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_https_configuration: Optional[pulumi.Input['CustomHttpsConfigurationCustomHttpsConfigurationArgs']] = None, + custom_https_provisioning_enabled: Optional[pulumi.Input[bool]] = None, + frontend_endpoint_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_https_configuration is None and 'customHttpsConfiguration' in kwargs: + custom_https_configuration = kwargs['customHttpsConfiguration'] + if custom_https_provisioning_enabled is None and 'customHttpsProvisioningEnabled' in kwargs: + custom_https_provisioning_enabled = kwargs['customHttpsProvisioningEnabled'] + if frontend_endpoint_id is None and 'frontendEndpointId' in kwargs: + frontend_endpoint_id = kwargs['frontendEndpointId'] + if custom_https_configuration is not None: - pulumi.set(__self__, "custom_https_configuration", custom_https_configuration) + _setter("custom_https_configuration", custom_https_configuration) if custom_https_provisioning_enabled is not None: - pulumi.set(__self__, "custom_https_provisioning_enabled", custom_https_provisioning_enabled) + _setter("custom_https_provisioning_enabled", custom_https_provisioning_enabled) if frontend_endpoint_id is not None: - pulumi.set(__self__, "frontend_endpoint_id", frontend_endpoint_id) + _setter("frontend_endpoint_id", frontend_endpoint_id) @property @pulumi.getter(name="customHttpsConfiguration") @@ -172,6 +218,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CustomHttpsConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -189,6 +239,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = CustomHttpsConfigurationArgs.__new__(CustomHttpsConfigurationArgs) + if custom_https_configuration is not None and not isinstance(custom_https_configuration, CustomHttpsConfigurationCustomHttpsConfigurationArgs): + custom_https_configuration = custom_https_configuration or {} + def _setter(key, value): + custom_https_configuration[key] = value + CustomHttpsConfigurationCustomHttpsConfigurationArgs._configure(_setter, **custom_https_configuration) __props__.__dict__["custom_https_configuration"] = custom_https_configuration if custom_https_provisioning_enabled is None and not opts.urn: raise TypeError("Missing required property 'custom_https_provisioning_enabled'") diff --git a/sdk/python/pulumi_azure/frontdoor/firewall_policy.py b/sdk/python/pulumi_azure/frontdoor/firewall_policy.py index ce115e79ae..569627c0da 100644 --- a/sdk/python/pulumi_azure/frontdoor/firewall_policy.py +++ b/sdk/python/pulumi_azure/frontdoor/firewall_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,25 +39,68 @@ def __init__(__self__, *, :param pulumi.Input[str] redirect_url: If action type is redirect, this field represents redirect URL for the client. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Web Application Firewall Policy. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + FirewallPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + custom_block_response_body=custom_block_response_body, + custom_block_response_status_code=custom_block_response_status_code, + custom_rules=custom_rules, + enabled=enabled, + managed_rules=managed_rules, + mode=mode, + name=name, + redirect_url=redirect_url, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + custom_block_response_body: Optional[pulumi.Input[str]] = None, + custom_block_response_status_code: Optional[pulumi.Input[int]] = None, + custom_rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyCustomRuleArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + managed_rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyManagedRuleArgs']]]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + redirect_url: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if custom_block_response_body is None and 'customBlockResponseBody' in kwargs: + custom_block_response_body = kwargs['customBlockResponseBody'] + if custom_block_response_status_code is None and 'customBlockResponseStatusCode' in kwargs: + custom_block_response_status_code = kwargs['customBlockResponseStatusCode'] + if custom_rules is None and 'customRules' in kwargs: + custom_rules = kwargs['customRules'] + if managed_rules is None and 'managedRules' in kwargs: + managed_rules = kwargs['managedRules'] + if redirect_url is None and 'redirectUrl' in kwargs: + redirect_url = kwargs['redirectUrl'] + + _setter("resource_group_name", resource_group_name) if custom_block_response_body is not None: - pulumi.set(__self__, "custom_block_response_body", custom_block_response_body) + _setter("custom_block_response_body", custom_block_response_body) if custom_block_response_status_code is not None: - pulumi.set(__self__, "custom_block_response_status_code", custom_block_response_status_code) + _setter("custom_block_response_status_code", custom_block_response_status_code) if custom_rules is not None: - pulumi.set(__self__, "custom_rules", custom_rules) + _setter("custom_rules", custom_rules) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if managed_rules is not None: - pulumi.set(__self__, "managed_rules", managed_rules) + _setter("managed_rules", managed_rules) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if redirect_url is not None: - pulumi.set(__self__, "redirect_url", redirect_url) + _setter("redirect_url", redirect_url) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -210,30 +253,77 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Web Application Firewall Policy. """ + _FirewallPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_block_response_body=custom_block_response_body, + custom_block_response_status_code=custom_block_response_status_code, + custom_rules=custom_rules, + enabled=enabled, + frontend_endpoint_ids=frontend_endpoint_ids, + location=location, + managed_rules=managed_rules, + mode=mode, + name=name, + redirect_url=redirect_url, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_block_response_body: Optional[pulumi.Input[str]] = None, + custom_block_response_status_code: Optional[pulumi.Input[int]] = None, + custom_rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyCustomRuleArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + frontend_endpoint_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyManagedRuleArgs']]]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + redirect_url: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_block_response_body is None and 'customBlockResponseBody' in kwargs: + custom_block_response_body = kwargs['customBlockResponseBody'] + if custom_block_response_status_code is None and 'customBlockResponseStatusCode' in kwargs: + custom_block_response_status_code = kwargs['customBlockResponseStatusCode'] + if custom_rules is None and 'customRules' in kwargs: + custom_rules = kwargs['customRules'] + if frontend_endpoint_ids is None and 'frontendEndpointIds' in kwargs: + frontend_endpoint_ids = kwargs['frontendEndpointIds'] + if managed_rules is None and 'managedRules' in kwargs: + managed_rules = kwargs['managedRules'] + if redirect_url is None and 'redirectUrl' in kwargs: + redirect_url = kwargs['redirectUrl'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if custom_block_response_body is not None: - pulumi.set(__self__, "custom_block_response_body", custom_block_response_body) + _setter("custom_block_response_body", custom_block_response_body) if custom_block_response_status_code is not None: - pulumi.set(__self__, "custom_block_response_status_code", custom_block_response_status_code) + _setter("custom_block_response_status_code", custom_block_response_status_code) if custom_rules is not None: - pulumi.set(__self__, "custom_rules", custom_rules) + _setter("custom_rules", custom_rules) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if frontend_endpoint_ids is not None: - pulumi.set(__self__, "frontend_endpoint_ids", frontend_endpoint_ids) + _setter("frontend_endpoint_ids", frontend_endpoint_ids) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_rules is not None: - pulumi.set(__self__, "managed_rules", managed_rules) + _setter("managed_rules", managed_rules) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if redirect_url is not None: - pulumi.set(__self__, "redirect_url", redirect_url) + _setter("redirect_url", redirect_url) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="customBlockResponseBody") @@ -655,6 +745,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/frontdoor/frontdoor.py b/sdk/python/pulumi_azure/frontdoor/frontdoor.py index 9fca5dcca8..1f57718d53 100644 --- a/sdk/python/pulumi_azure/frontdoor/frontdoor.py +++ b/sdk/python/pulumi_azure/frontdoor/frontdoor.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,22 +43,83 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Front Door service. Must be globally unique. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "backend_pool_health_probes", backend_pool_health_probes) - pulumi.set(__self__, "backend_pool_load_balancings", backend_pool_load_balancings) - pulumi.set(__self__, "backend_pools", backend_pools) - pulumi.set(__self__, "frontend_endpoints", frontend_endpoints) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "routing_rules", routing_rules) + FrontdoorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_pool_health_probes=backend_pool_health_probes, + backend_pool_load_balancings=backend_pool_load_balancings, + backend_pools=backend_pools, + frontend_endpoints=frontend_endpoints, + resource_group_name=resource_group_name, + routing_rules=routing_rules, + backend_pool_settings=backend_pool_settings, + friendly_name=friendly_name, + load_balancer_enabled=load_balancer_enabled, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_pool_health_probes: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorBackendPoolHealthProbeArgs']]]] = None, + backend_pool_load_balancings: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorBackendPoolLoadBalancingArgs']]]] = None, + backend_pools: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorBackendPoolArgs']]]] = None, + frontend_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorFrontendEndpointArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + routing_rules: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRoutingRuleArgs']]]] = None, + backend_pool_settings: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorBackendPoolSettingArgs']]]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + load_balancer_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_pool_health_probes is None and 'backendPoolHealthProbes' in kwargs: + backend_pool_health_probes = kwargs['backendPoolHealthProbes'] + if backend_pool_health_probes is None: + raise TypeError("Missing 'backend_pool_health_probes' argument") + if backend_pool_load_balancings is None and 'backendPoolLoadBalancings' in kwargs: + backend_pool_load_balancings = kwargs['backendPoolLoadBalancings'] + if backend_pool_load_balancings is None: + raise TypeError("Missing 'backend_pool_load_balancings' argument") + if backend_pools is None and 'backendPools' in kwargs: + backend_pools = kwargs['backendPools'] + if backend_pools is None: + raise TypeError("Missing 'backend_pools' argument") + if frontend_endpoints is None and 'frontendEndpoints' in kwargs: + frontend_endpoints = kwargs['frontendEndpoints'] + if frontend_endpoints is None: + raise TypeError("Missing 'frontend_endpoints' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if routing_rules is None and 'routingRules' in kwargs: + routing_rules = kwargs['routingRules'] + if routing_rules is None: + raise TypeError("Missing 'routing_rules' argument") + if backend_pool_settings is None and 'backendPoolSettings' in kwargs: + backend_pool_settings = kwargs['backendPoolSettings'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if load_balancer_enabled is None and 'loadBalancerEnabled' in kwargs: + load_balancer_enabled = kwargs['loadBalancerEnabled'] + + _setter("backend_pool_health_probes", backend_pool_health_probes) + _setter("backend_pool_load_balancings", backend_pool_load_balancings) + _setter("backend_pools", backend_pools) + _setter("frontend_endpoints", frontend_endpoints) + _setter("resource_group_name", resource_group_name) + _setter("routing_rules", routing_rules) if backend_pool_settings is not None: - pulumi.set(__self__, "backend_pool_settings", backend_pool_settings) + _setter("backend_pool_settings", backend_pool_settings) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if load_balancer_enabled is not None: - pulumi.set(__self__, "load_balancer_enabled", load_balancer_enabled) + _setter("load_balancer_enabled", load_balancer_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="backendPoolHealthProbes") @@ -240,44 +301,123 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] routing_rules_map: A map/dictionary of Routing Rule Names (key) to the Routing Rule ID (value) :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _FrontdoorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_pool_health_probes=backend_pool_health_probes, + backend_pool_health_probes_map=backend_pool_health_probes_map, + backend_pool_load_balancing_settings_map=backend_pool_load_balancing_settings_map, + backend_pool_load_balancings=backend_pool_load_balancings, + backend_pool_settings=backend_pool_settings, + backend_pools=backend_pools, + backend_pools_map=backend_pools_map, + cname=cname, + explicit_resource_orders=explicit_resource_orders, + friendly_name=friendly_name, + frontend_endpoints=frontend_endpoints, + frontend_endpoints_map=frontend_endpoints_map, + header_frontdoor_id=header_frontdoor_id, + load_balancer_enabled=load_balancer_enabled, + name=name, + resource_group_name=resource_group_name, + routing_rules=routing_rules, + routing_rules_map=routing_rules_map, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_pool_health_probes: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorBackendPoolHealthProbeArgs']]]] = None, + backend_pool_health_probes_map: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + backend_pool_load_balancing_settings_map: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + backend_pool_load_balancings: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorBackendPoolLoadBalancingArgs']]]] = None, + backend_pool_settings: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorBackendPoolSettingArgs']]]] = None, + backend_pools: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorBackendPoolArgs']]]] = None, + backend_pools_map: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + cname: Optional[pulumi.Input[str]] = None, + explicit_resource_orders: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorExplicitResourceOrderArgs']]]] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + frontend_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorFrontendEndpointArgs']]]] = None, + frontend_endpoints_map: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + header_frontdoor_id: Optional[pulumi.Input[str]] = None, + load_balancer_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + routing_rules: Optional[pulumi.Input[Sequence[pulumi.Input['FrontdoorRoutingRuleArgs']]]] = None, + routing_rules_map: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_pool_health_probes is None and 'backendPoolHealthProbes' in kwargs: + backend_pool_health_probes = kwargs['backendPoolHealthProbes'] + if backend_pool_health_probes_map is None and 'backendPoolHealthProbesMap' in kwargs: + backend_pool_health_probes_map = kwargs['backendPoolHealthProbesMap'] + if backend_pool_load_balancing_settings_map is None and 'backendPoolLoadBalancingSettingsMap' in kwargs: + backend_pool_load_balancing_settings_map = kwargs['backendPoolLoadBalancingSettingsMap'] + if backend_pool_load_balancings is None and 'backendPoolLoadBalancings' in kwargs: + backend_pool_load_balancings = kwargs['backendPoolLoadBalancings'] + if backend_pool_settings is None and 'backendPoolSettings' in kwargs: + backend_pool_settings = kwargs['backendPoolSettings'] + if backend_pools is None and 'backendPools' in kwargs: + backend_pools = kwargs['backendPools'] + if backend_pools_map is None and 'backendPoolsMap' in kwargs: + backend_pools_map = kwargs['backendPoolsMap'] + if explicit_resource_orders is None and 'explicitResourceOrders' in kwargs: + explicit_resource_orders = kwargs['explicitResourceOrders'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if frontend_endpoints is None and 'frontendEndpoints' in kwargs: + frontend_endpoints = kwargs['frontendEndpoints'] + if frontend_endpoints_map is None and 'frontendEndpointsMap' in kwargs: + frontend_endpoints_map = kwargs['frontendEndpointsMap'] + if header_frontdoor_id is None and 'headerFrontdoorId' in kwargs: + header_frontdoor_id = kwargs['headerFrontdoorId'] + if load_balancer_enabled is None and 'loadBalancerEnabled' in kwargs: + load_balancer_enabled = kwargs['loadBalancerEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if routing_rules is None and 'routingRules' in kwargs: + routing_rules = kwargs['routingRules'] + if routing_rules_map is None and 'routingRulesMap' in kwargs: + routing_rules_map = kwargs['routingRulesMap'] + if backend_pool_health_probes is not None: - pulumi.set(__self__, "backend_pool_health_probes", backend_pool_health_probes) + _setter("backend_pool_health_probes", backend_pool_health_probes) if backend_pool_health_probes_map is not None: - pulumi.set(__self__, "backend_pool_health_probes_map", backend_pool_health_probes_map) + _setter("backend_pool_health_probes_map", backend_pool_health_probes_map) if backend_pool_load_balancing_settings_map is not None: - pulumi.set(__self__, "backend_pool_load_balancing_settings_map", backend_pool_load_balancing_settings_map) + _setter("backend_pool_load_balancing_settings_map", backend_pool_load_balancing_settings_map) if backend_pool_load_balancings is not None: - pulumi.set(__self__, "backend_pool_load_balancings", backend_pool_load_balancings) + _setter("backend_pool_load_balancings", backend_pool_load_balancings) if backend_pool_settings is not None: - pulumi.set(__self__, "backend_pool_settings", backend_pool_settings) + _setter("backend_pool_settings", backend_pool_settings) if backend_pools is not None: - pulumi.set(__self__, "backend_pools", backend_pools) + _setter("backend_pools", backend_pools) if backend_pools_map is not None: - pulumi.set(__self__, "backend_pools_map", backend_pools_map) + _setter("backend_pools_map", backend_pools_map) if cname is not None: - pulumi.set(__self__, "cname", cname) + _setter("cname", cname) if explicit_resource_orders is not None: - pulumi.set(__self__, "explicit_resource_orders", explicit_resource_orders) + _setter("explicit_resource_orders", explicit_resource_orders) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if frontend_endpoints is not None: - pulumi.set(__self__, "frontend_endpoints", frontend_endpoints) + _setter("frontend_endpoints", frontend_endpoints) if frontend_endpoints_map is not None: - pulumi.set(__self__, "frontend_endpoints_map", frontend_endpoints_map) + _setter("frontend_endpoints_map", frontend_endpoints_map) if header_frontdoor_id is not None: - pulumi.set(__self__, "header_frontdoor_id", header_frontdoor_id) + _setter("header_frontdoor_id", header_frontdoor_id) if load_balancer_enabled is not None: - pulumi.set(__self__, "load_balancer_enabled", load_balancer_enabled) + _setter("load_balancer_enabled", load_balancer_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if routing_rules is not None: - pulumi.set(__self__, "routing_rules", routing_rules) + _setter("routing_rules", routing_rules) if routing_rules_map is not None: - pulumi.set(__self__, "routing_rules_map", routing_rules_map) + _setter("routing_rules_map", routing_rules_map) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="backendPoolHealthProbes") @@ -688,6 +828,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FrontdoorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/frontdoor/outputs.py b/sdk/python/pulumi_azure/frontdoor/outputs.py index 2300b9eb13..28d50655d4 100644 --- a/sdk/python/pulumi_azure/frontdoor/outputs.py +++ b/sdk/python/pulumi_azure/frontdoor/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -87,20 +87,57 @@ def __init__(__self__, *, The following attributes are only valid if `certificate_source` is set to `AzureKeyVault`: :param str minimum_tls_version: Minimum client TLS version supported. """ + CustomHttpsConfigurationCustomHttpsConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_key_vault_certificate_secret_name=azure_key_vault_certificate_secret_name, + azure_key_vault_certificate_secret_version=azure_key_vault_certificate_secret_version, + azure_key_vault_certificate_vault_id=azure_key_vault_certificate_vault_id, + certificate_source=certificate_source, + minimum_tls_version=minimum_tls_version, + provisioning_state=provisioning_state, + provisioning_substate=provisioning_substate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_key_vault_certificate_secret_name: Optional[str] = None, + azure_key_vault_certificate_secret_version: Optional[str] = None, + azure_key_vault_certificate_vault_id: Optional[str] = None, + certificate_source: Optional[str] = None, + minimum_tls_version: Optional[str] = None, + provisioning_state: Optional[str] = None, + provisioning_substate: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_key_vault_certificate_secret_name is None and 'azureKeyVaultCertificateSecretName' in kwargs: + azure_key_vault_certificate_secret_name = kwargs['azureKeyVaultCertificateSecretName'] + if azure_key_vault_certificate_secret_version is None and 'azureKeyVaultCertificateSecretVersion' in kwargs: + azure_key_vault_certificate_secret_version = kwargs['azureKeyVaultCertificateSecretVersion'] + if azure_key_vault_certificate_vault_id is None and 'azureKeyVaultCertificateVaultId' in kwargs: + azure_key_vault_certificate_vault_id = kwargs['azureKeyVaultCertificateVaultId'] + if certificate_source is None and 'certificateSource' in kwargs: + certificate_source = kwargs['certificateSource'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if provisioning_state is None and 'provisioningState' in kwargs: + provisioning_state = kwargs['provisioningState'] + if provisioning_substate is None and 'provisioningSubstate' in kwargs: + provisioning_substate = kwargs['provisioningSubstate'] + if azure_key_vault_certificate_secret_name is not None: - pulumi.set(__self__, "azure_key_vault_certificate_secret_name", azure_key_vault_certificate_secret_name) + _setter("azure_key_vault_certificate_secret_name", azure_key_vault_certificate_secret_name) if azure_key_vault_certificate_secret_version is not None: - pulumi.set(__self__, "azure_key_vault_certificate_secret_version", azure_key_vault_certificate_secret_version) + _setter("azure_key_vault_certificate_secret_version", azure_key_vault_certificate_secret_version) if azure_key_vault_certificate_vault_id is not None: - pulumi.set(__self__, "azure_key_vault_certificate_vault_id", azure_key_vault_certificate_vault_id) + _setter("azure_key_vault_certificate_vault_id", azure_key_vault_certificate_vault_id) if certificate_source is not None: - pulumi.set(__self__, "certificate_source", certificate_source) + _setter("certificate_source", certificate_source) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if provisioning_state is not None: - pulumi.set(__self__, "provisioning_state", provisioning_state) + _setter("provisioning_state", provisioning_state) if provisioning_substate is not None: - pulumi.set(__self__, "provisioning_substate", provisioning_substate) + _setter("provisioning_substate", provisioning_substate) @property @pulumi.getter(name="azureKeyVaultCertificateSecretName") @@ -199,19 +236,56 @@ def __init__(__self__, *, :param int rate_limit_duration_in_minutes: The rate limit duration in minutes. Defaults to `1`. :param int rate_limit_threshold: The rate limit threshold. Defaults to `10`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + FirewallPolicyCustomRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + type=type, + enabled=enabled, + match_conditions=match_conditions, + priority=priority, + rate_limit_duration_in_minutes=rate_limit_duration_in_minutes, + rate_limit_threshold=rate_limit_threshold, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + enabled: Optional[bool] = None, + match_conditions: Optional[Sequence['outputs.FirewallPolicyCustomRuleMatchCondition']] = None, + priority: Optional[int] = None, + rate_limit_duration_in_minutes: Optional[int] = None, + rate_limit_threshold: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if match_conditions is None and 'matchConditions' in kwargs: + match_conditions = kwargs['matchConditions'] + if rate_limit_duration_in_minutes is None and 'rateLimitDurationInMinutes' in kwargs: + rate_limit_duration_in_minutes = kwargs['rateLimitDurationInMinutes'] + if rate_limit_threshold is None and 'rateLimitThreshold' in kwargs: + rate_limit_threshold = kwargs['rateLimitThreshold'] + + _setter("action", action) + _setter("name", name) + _setter("type", type) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if match_conditions is not None: - pulumi.set(__self__, "match_conditions", match_conditions) + _setter("match_conditions", match_conditions) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if rate_limit_duration_in_minutes is not None: - pulumi.set(__self__, "rate_limit_duration_in_minutes", rate_limit_duration_in_minutes) + _setter("rate_limit_duration_in_minutes", rate_limit_duration_in_minutes) if rate_limit_threshold is not None: - pulumi.set(__self__, "rate_limit_threshold", rate_limit_threshold) + _setter("rate_limit_threshold", rate_limit_threshold) @property @pulumi.getter @@ -316,15 +390,48 @@ def __init__(__self__, *, :param str selector: Match against a specific key if the `match_variable` is `QueryString`, `PostArgs`, `RequestHeader` or `Cookies`. :param Sequence[str] transforms: Up to `5` transforms to apply. Possible values are `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `URLDecode` or`URLEncode`. """ - pulumi.set(__self__, "match_values", match_values) - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) + FirewallPolicyCustomRuleMatchCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_values=match_values, + match_variable=match_variable, + operator=operator, + negation_condition=negation_condition, + selector=selector, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_values: Optional[Sequence[str]] = None, + match_variable: Optional[str] = None, + operator: Optional[str] = None, + negation_condition: Optional[bool] = None, + selector: Optional[str] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if match_values is None: + raise TypeError("Missing 'match_values' argument") + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if negation_condition is None and 'negationCondition' in kwargs: + negation_condition = kwargs['negationCondition'] + + _setter("match_values", match_values) + _setter("match_variable", match_variable) + _setter("operator", operator) if negation_condition is not None: - pulumi.set(__self__, "negation_condition", negation_condition) + _setter("negation_condition", negation_condition) if selector is not None: - pulumi.set(__self__, "selector", selector) + _setter("selector", selector) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="matchValues") @@ -388,12 +495,33 @@ def __init__(__self__, *, :param Sequence['FirewallPolicyManagedRuleExclusionArgs'] exclusions: One or more `exclusion` blocks as defined below. :param Sequence['FirewallPolicyManagedRuleOverrideArgs'] overrides: One or more `override` blocks as defined below. """ - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "version", version) + FirewallPolicyManagedRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + version=version, + exclusions=exclusions, + overrides=overrides, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + version: Optional[str] = None, + exclusions: Optional[Sequence['outputs.FirewallPolicyManagedRuleExclusion']] = None, + overrides: Optional[Sequence['outputs.FirewallPolicyManagedRuleOverride']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("type", type) + _setter("version", version) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) if overrides is not None: - pulumi.set(__self__, "overrides", overrides) + _setter("overrides", overrides) @property @pulumi.getter @@ -456,9 +584,32 @@ def __init__(__self__, *, :param str operator: Comparison operator to apply to the selector when specifying which elements in the collection this exclusion applies to. Possible values are: `Equals`, `Contains`, `StartsWith`, `EndsWith`, `EqualsAny`. :param str selector: Selector for the value in the `match_variable` attribute this exclusion applies to. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + FirewallPolicyManagedRuleExclusion._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + operator=operator, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[str] = None, + operator: Optional[str] = None, + selector: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + + _setter("match_variable", match_variable) + _setter("operator", operator) + _setter("selector", selector) @property @pulumi.getter(name="matchVariable") @@ -513,11 +664,30 @@ def __init__(__self__, *, :param Sequence['FirewallPolicyManagedRuleOverrideExclusionArgs'] exclusions: One or more `exclusion` blocks as defined below. :param Sequence['FirewallPolicyManagedRuleOverrideRuleArgs'] rules: One or more `rule` blocks as defined below. If none are specified, all of the rules in the group will be disabled. """ - pulumi.set(__self__, "rule_group_name", rule_group_name) + FirewallPolicyManagedRuleOverride._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_group_name=rule_group_name, + exclusions=exclusions, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_group_name: Optional[str] = None, + exclusions: Optional[Sequence['outputs.FirewallPolicyManagedRuleOverrideExclusion']] = None, + rules: Optional[Sequence['outputs.FirewallPolicyManagedRuleOverrideRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_group_name is None and 'ruleGroupName' in kwargs: + rule_group_name = kwargs['ruleGroupName'] + if rule_group_name is None: + raise TypeError("Missing 'rule_group_name' argument") + + _setter("rule_group_name", rule_group_name) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter(name="ruleGroupName") @@ -572,9 +742,32 @@ def __init__(__self__, *, :param str operator: Comparison operator to apply to the selector when specifying which elements in the collection this exclusion applies to. Possible values are: `Equals`, `Contains`, `StartsWith`, `EndsWith`, `EqualsAny`. :param str selector: Selector for the value in the `match_variable` attribute this exclusion applies to. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + FirewallPolicyManagedRuleOverrideExclusion._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + operator=operator, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[str] = None, + operator: Optional[str] = None, + selector: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + + _setter("match_variable", match_variable) + _setter("operator", operator) + _setter("selector", selector) @property @pulumi.getter(name="matchVariable") @@ -631,12 +824,35 @@ def __init__(__self__, *, :param bool enabled: Is the managed rule override enabled or disabled. Defaults to `false` :param Sequence['FirewallPolicyManagedRuleOverrideRuleExclusionArgs'] exclusions: One or more `exclusion` blocks as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "rule_id", rule_id) + FirewallPolicyManagedRuleOverrideRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + rule_id=rule_id, + enabled=enabled, + exclusions=exclusions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + rule_id: Optional[str] = None, + enabled: Optional[bool] = None, + exclusions: Optional[Sequence['outputs.FirewallPolicyManagedRuleOverrideRuleExclusion']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if rule_id is None and 'ruleId' in kwargs: + rule_id = kwargs['ruleId'] + if rule_id is None: + raise TypeError("Missing 'rule_id' argument") + + _setter("action", action) + _setter("rule_id", rule_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) @property @pulumi.getter @@ -699,9 +915,32 @@ def __init__(__self__, *, :param str operator: Comparison operator to apply to the selector when specifying which elements in the collection this exclusion applies to. Possible values are: `Equals`, `Contains`, `StartsWith`, `EndsWith`, `EqualsAny`. :param str selector: Selector for the value in the `match_variable` attribute this exclusion applies to. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "selector", selector) + FirewallPolicyManagedRuleOverrideRuleExclusion._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + operator=operator, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[str] = None, + operator: Optional[str] = None, + selector: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + + _setter("match_variable", match_variable) + _setter("operator", operator) + _setter("selector", selector) @property @pulumi.getter(name="matchVariable") @@ -762,12 +1001,43 @@ def __init__(__self__, *, :param str name: Specifies the name of the Backend Pool. :param str id: The ID of the FrontDoor. """ - pulumi.set(__self__, "backends", backends) - pulumi.set(__self__, "health_probe_name", health_probe_name) - pulumi.set(__self__, "load_balancing_name", load_balancing_name) - pulumi.set(__self__, "name", name) + FrontdoorBackendPool._configure( + lambda key, value: pulumi.set(__self__, key, value), + backends=backends, + health_probe_name=health_probe_name, + load_balancing_name=load_balancing_name, + name=name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backends: Optional[Sequence['outputs.FrontdoorBackendPoolBackend']] = None, + health_probe_name: Optional[str] = None, + load_balancing_name: Optional[str] = None, + name: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backends is None: + raise TypeError("Missing 'backends' argument") + if health_probe_name is None and 'healthProbeName' in kwargs: + health_probe_name = kwargs['healthProbeName'] + if health_probe_name is None: + raise TypeError("Missing 'health_probe_name' argument") + if load_balancing_name is None and 'loadBalancingName' in kwargs: + load_balancing_name = kwargs['loadBalancingName'] + if load_balancing_name is None: + raise TypeError("Missing 'load_balancing_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("backends", backends) + _setter("health_probe_name", health_probe_name) + _setter("load_balancing_name", load_balancing_name) + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -850,16 +1120,53 @@ def __init__(__self__, *, :param int priority: Priority to use for load balancing. Higher priorities will not be used for load balancing if any lower priority backend is healthy. Defaults to `1`. :param int weight: Weight of this endpoint for load balancing purposes. Defaults to `50`. """ - pulumi.set(__self__, "address", address) - pulumi.set(__self__, "host_header", host_header) - pulumi.set(__self__, "http_port", http_port) - pulumi.set(__self__, "https_port", https_port) + FrontdoorBackendPoolBackend._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + host_header=host_header, + http_port=http_port, + https_port=https_port, + enabled=enabled, + priority=priority, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: Optional[str] = None, + host_header: Optional[str] = None, + http_port: Optional[int] = None, + https_port: Optional[int] = None, + enabled: Optional[bool] = None, + priority: Optional[int] = None, + weight: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address is None: + raise TypeError("Missing 'address' argument") + if host_header is None and 'hostHeader' in kwargs: + host_header = kwargs['hostHeader'] + if host_header is None: + raise TypeError("Missing 'host_header' argument") + if http_port is None and 'httpPort' in kwargs: + http_port = kwargs['httpPort'] + if http_port is None: + raise TypeError("Missing 'http_port' argument") + if https_port is None and 'httpsPort' in kwargs: + https_port = kwargs['httpsPort'] + if https_port is None: + raise TypeError("Missing 'https_port' argument") + + _setter("address", address) + _setter("host_header", host_header) + _setter("http_port", http_port) + _setter("https_port", https_port) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if weight is not None: - pulumi.set(__self__, "weight", weight) + _setter("weight", weight) @property @pulumi.getter @@ -958,19 +1265,48 @@ def __init__(__self__, *, > **NOTE:** Use the `HEAD` method if you do not need to check the response body of your health probe. :param str protocol: Protocol scheme to use for the Health Probe. Possible values are `Http` and `Https`. Defaults to `Http`. """ - pulumi.set(__self__, "name", name) + FrontdoorBackendPoolHealthProbe._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + enabled=enabled, + id=id, + interval_in_seconds=interval_in_seconds, + path=path, + probe_method=probe_method, + protocol=protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + enabled: Optional[bool] = None, + id: Optional[str] = None, + interval_in_seconds: Optional[int] = None, + path: Optional[str] = None, + probe_method: Optional[str] = None, + protocol: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if probe_method is None and 'probeMethod' in kwargs: + probe_method = kwargs['probeMethod'] + + _setter("name", name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if interval_in_seconds is not None: - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) + _setter("interval_in_seconds", interval_in_seconds) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if probe_method is not None: - pulumi.set(__self__, "probe_method", probe_method) + _setter("probe_method", probe_method) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) @property @pulumi.getter @@ -1067,15 +1403,42 @@ def __init__(__self__, *, :param int sample_size: The number of samples to consider for load balancing decisions. Defaults to `4`. :param int successful_samples_required: The number of samples within the sample period that must succeed. Defaults to `2`. """ - pulumi.set(__self__, "name", name) + FrontdoorBackendPoolLoadBalancing._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + additional_latency_milliseconds=additional_latency_milliseconds, + id=id, + sample_size=sample_size, + successful_samples_required=successful_samples_required, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + additional_latency_milliseconds: Optional[int] = None, + id: Optional[str] = None, + sample_size: Optional[int] = None, + successful_samples_required: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if additional_latency_milliseconds is None and 'additionalLatencyMilliseconds' in kwargs: + additional_latency_milliseconds = kwargs['additionalLatencyMilliseconds'] + if sample_size is None and 'sampleSize' in kwargs: + sample_size = kwargs['sampleSize'] + if successful_samples_required is None and 'successfulSamplesRequired' in kwargs: + successful_samples_required = kwargs['successfulSamplesRequired'] + + _setter("name", name) if additional_latency_milliseconds is not None: - pulumi.set(__self__, "additional_latency_milliseconds", additional_latency_milliseconds) + _setter("additional_latency_milliseconds", additional_latency_milliseconds) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if sample_size is not None: - pulumi.set(__self__, "sample_size", sample_size) + _setter("sample_size", sample_size) if successful_samples_required is not None: - pulumi.set(__self__, "successful_samples_required", successful_samples_required) + _setter("successful_samples_required", successful_samples_required) @property @pulumi.getter @@ -1148,9 +1511,28 @@ def __init__(__self__, *, > **NOTE:** `backend_pools_send_receive_timeout_seconds` and `enforce_backend_pools_certificate_name_check` apply to all backend pools. :param int backend_pools_send_receive_timeout_seconds: Specifies the send and receive timeout on forwarding request to the backend. When the timeout is reached, the request fails and returns. Possible values are between `0` - `240`. Defaults to `60`. """ - pulumi.set(__self__, "enforce_backend_pools_certificate_name_check", enforce_backend_pools_certificate_name_check) + FrontdoorBackendPoolSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + enforce_backend_pools_certificate_name_check=enforce_backend_pools_certificate_name_check, + backend_pools_send_receive_timeout_seconds=backend_pools_send_receive_timeout_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enforce_backend_pools_certificate_name_check: Optional[bool] = None, + backend_pools_send_receive_timeout_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enforce_backend_pools_certificate_name_check is None and 'enforceBackendPoolsCertificateNameCheck' in kwargs: + enforce_backend_pools_certificate_name_check = kwargs['enforceBackendPoolsCertificateNameCheck'] + if enforce_backend_pools_certificate_name_check is None: + raise TypeError("Missing 'enforce_backend_pools_certificate_name_check' argument") + if backend_pools_send_receive_timeout_seconds is None and 'backendPoolsSendReceiveTimeoutSeconds' in kwargs: + backend_pools_send_receive_timeout_seconds = kwargs['backendPoolsSendReceiveTimeoutSeconds'] + + _setter("enforce_backend_pools_certificate_name_check", enforce_backend_pools_certificate_name_check) if backend_pools_send_receive_timeout_seconds is not None: - pulumi.set(__self__, "backend_pools_send_receive_timeout_seconds", backend_pools_send_receive_timeout_seconds) + _setter("backend_pools_send_receive_timeout_seconds", backend_pools_send_receive_timeout_seconds) @property @pulumi.getter(name="enforceBackendPoolsCertificateNameCheck") @@ -1204,16 +1586,45 @@ def __init__(__self__, *, backend_pool_load_balancing_ids: Optional[Sequence[str]] = None, frontend_endpoint_ids: Optional[Sequence[str]] = None, routing_rule_ids: Optional[Sequence[str]] = None): + FrontdoorExplicitResourceOrder._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_pool_health_probe_ids=backend_pool_health_probe_ids, + backend_pool_ids=backend_pool_ids, + backend_pool_load_balancing_ids=backend_pool_load_balancing_ids, + frontend_endpoint_ids=frontend_endpoint_ids, + routing_rule_ids=routing_rule_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_pool_health_probe_ids: Optional[Sequence[str]] = None, + backend_pool_ids: Optional[Sequence[str]] = None, + backend_pool_load_balancing_ids: Optional[Sequence[str]] = None, + frontend_endpoint_ids: Optional[Sequence[str]] = None, + routing_rule_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_pool_health_probe_ids is None and 'backendPoolHealthProbeIds' in kwargs: + backend_pool_health_probe_ids = kwargs['backendPoolHealthProbeIds'] + if backend_pool_ids is None and 'backendPoolIds' in kwargs: + backend_pool_ids = kwargs['backendPoolIds'] + if backend_pool_load_balancing_ids is None and 'backendPoolLoadBalancingIds' in kwargs: + backend_pool_load_balancing_ids = kwargs['backendPoolLoadBalancingIds'] + if frontend_endpoint_ids is None and 'frontendEndpointIds' in kwargs: + frontend_endpoint_ids = kwargs['frontendEndpointIds'] + if routing_rule_ids is None and 'routingRuleIds' in kwargs: + routing_rule_ids = kwargs['routingRuleIds'] + if backend_pool_health_probe_ids is not None: - pulumi.set(__self__, "backend_pool_health_probe_ids", backend_pool_health_probe_ids) + _setter("backend_pool_health_probe_ids", backend_pool_health_probe_ids) if backend_pool_ids is not None: - pulumi.set(__self__, "backend_pool_ids", backend_pool_ids) + _setter("backend_pool_ids", backend_pool_ids) if backend_pool_load_balancing_ids is not None: - pulumi.set(__self__, "backend_pool_load_balancing_ids", backend_pool_load_balancing_ids) + _setter("backend_pool_load_balancing_ids", backend_pool_load_balancing_ids) if frontend_endpoint_ids is not None: - pulumi.set(__self__, "frontend_endpoint_ids", frontend_endpoint_ids) + _setter("frontend_endpoint_ids", frontend_endpoint_ids) if routing_rule_ids is not None: - pulumi.set(__self__, "routing_rule_ids", routing_rule_ids) + _setter("routing_rule_ids", routing_rule_ids) @property @pulumi.getter(name="backendPoolHealthProbeIds") @@ -1281,16 +1692,49 @@ def __init__(__self__, *, :param int session_affinity_ttl_seconds: The TTL to use in seconds for session affinity, if applicable. Defaults to `0`. :param str web_application_firewall_policy_link_id: Defines the Web Application Firewall policy `ID` for each host. """ - pulumi.set(__self__, "host_name", host_name) - pulumi.set(__self__, "name", name) + FrontdoorFrontendEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + name=name, + id=id, + session_affinity_enabled=session_affinity_enabled, + session_affinity_ttl_seconds=session_affinity_ttl_seconds, + web_application_firewall_policy_link_id=web_application_firewall_policy_link_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[str] = None, + name: Optional[str] = None, + id: Optional[str] = None, + session_affinity_enabled: Optional[bool] = None, + session_affinity_ttl_seconds: Optional[int] = None, + web_application_firewall_policy_link_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if session_affinity_enabled is None and 'sessionAffinityEnabled' in kwargs: + session_affinity_enabled = kwargs['sessionAffinityEnabled'] + if session_affinity_ttl_seconds is None and 'sessionAffinityTtlSeconds' in kwargs: + session_affinity_ttl_seconds = kwargs['sessionAffinityTtlSeconds'] + if web_application_firewall_policy_link_id is None and 'webApplicationFirewallPolicyLinkId' in kwargs: + web_application_firewall_policy_link_id = kwargs['webApplicationFirewallPolicyLinkId'] + + _setter("host_name", host_name) + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if session_affinity_enabled is not None: - pulumi.set(__self__, "session_affinity_enabled", session_affinity_enabled) + _setter("session_affinity_enabled", session_affinity_enabled) if session_affinity_ttl_seconds is not None: - pulumi.set(__self__, "session_affinity_ttl_seconds", session_affinity_ttl_seconds) + _setter("session_affinity_ttl_seconds", session_affinity_ttl_seconds) if web_application_firewall_policy_link_id is not None: - pulumi.set(__self__, "web_application_firewall_policy_link_id", web_application_firewall_policy_link_id) + _setter("web_application_firewall_policy_link_id", web_application_firewall_policy_link_id) @property @pulumi.getter(name="hostName") @@ -1387,18 +1831,61 @@ def __init__(__self__, *, :param str id: The ID of the FrontDoor. :param 'FrontdoorRoutingRuleRedirectConfigurationArgs' redirect_configuration: A `redirect_configuration` block as defined below. """ - pulumi.set(__self__, "accepted_protocols", accepted_protocols) - pulumi.set(__self__, "frontend_endpoints", frontend_endpoints) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "patterns_to_matches", patterns_to_matches) + FrontdoorRoutingRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + accepted_protocols=accepted_protocols, + frontend_endpoints=frontend_endpoints, + name=name, + patterns_to_matches=patterns_to_matches, + enabled=enabled, + forwarding_configuration=forwarding_configuration, + id=id, + redirect_configuration=redirect_configuration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + accepted_protocols: Optional[Sequence[str]] = None, + frontend_endpoints: Optional[Sequence[str]] = None, + name: Optional[str] = None, + patterns_to_matches: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + forwarding_configuration: Optional['outputs.FrontdoorRoutingRuleForwardingConfiguration'] = None, + id: Optional[str] = None, + redirect_configuration: Optional['outputs.FrontdoorRoutingRuleRedirectConfiguration'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if accepted_protocols is None and 'acceptedProtocols' in kwargs: + accepted_protocols = kwargs['acceptedProtocols'] + if accepted_protocols is None: + raise TypeError("Missing 'accepted_protocols' argument") + if frontend_endpoints is None and 'frontendEndpoints' in kwargs: + frontend_endpoints = kwargs['frontendEndpoints'] + if frontend_endpoints is None: + raise TypeError("Missing 'frontend_endpoints' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if patterns_to_matches is None and 'patternsToMatches' in kwargs: + patterns_to_matches = kwargs['patternsToMatches'] + if patterns_to_matches is None: + raise TypeError("Missing 'patterns_to_matches' argument") + if forwarding_configuration is None and 'forwardingConfiguration' in kwargs: + forwarding_configuration = kwargs['forwardingConfiguration'] + if redirect_configuration is None and 'redirectConfiguration' in kwargs: + redirect_configuration = kwargs['redirectConfiguration'] + + _setter("accepted_protocols", accepted_protocols) + _setter("frontend_endpoints", frontend_endpoints) + _setter("name", name) + _setter("patterns_to_matches", patterns_to_matches) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if forwarding_configuration is not None: - pulumi.set(__self__, "forwarding_configuration", forwarding_configuration) + _setter("forwarding_configuration", forwarding_configuration) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if redirect_configuration is not None: - pulumi.set(__self__, "redirect_configuration", redirect_configuration) + _setter("redirect_configuration", redirect_configuration) @property @pulumi.getter(name="acceptedProtocols") @@ -1517,21 +2004,64 @@ def __init__(__self__, *, :param str custom_forwarding_path: Path to use when constructing the request to forward to the backend. This functions as a URL Rewrite. Default behaviour preserves the URL path. :param str forwarding_protocol: Protocol to use when redirecting. Valid options are `HttpOnly`, `HttpsOnly`, or `MatchRequest`. Defaults to `HttpsOnly`. """ - pulumi.set(__self__, "backend_pool_name", backend_pool_name) + FrontdoorRoutingRuleForwardingConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_pool_name=backend_pool_name, + cache_duration=cache_duration, + cache_enabled=cache_enabled, + cache_query_parameter_strip_directive=cache_query_parameter_strip_directive, + cache_query_parameters=cache_query_parameters, + cache_use_dynamic_compression=cache_use_dynamic_compression, + custom_forwarding_path=custom_forwarding_path, + forwarding_protocol=forwarding_protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_pool_name: Optional[str] = None, + cache_duration: Optional[str] = None, + cache_enabled: Optional[bool] = None, + cache_query_parameter_strip_directive: Optional[str] = None, + cache_query_parameters: Optional[Sequence[str]] = None, + cache_use_dynamic_compression: Optional[bool] = None, + custom_forwarding_path: Optional[str] = None, + forwarding_protocol: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_pool_name is None and 'backendPoolName' in kwargs: + backend_pool_name = kwargs['backendPoolName'] + if backend_pool_name is None: + raise TypeError("Missing 'backend_pool_name' argument") + if cache_duration is None and 'cacheDuration' in kwargs: + cache_duration = kwargs['cacheDuration'] + if cache_enabled is None and 'cacheEnabled' in kwargs: + cache_enabled = kwargs['cacheEnabled'] + if cache_query_parameter_strip_directive is None and 'cacheQueryParameterStripDirective' in kwargs: + cache_query_parameter_strip_directive = kwargs['cacheQueryParameterStripDirective'] + if cache_query_parameters is None and 'cacheQueryParameters' in kwargs: + cache_query_parameters = kwargs['cacheQueryParameters'] + if cache_use_dynamic_compression is None and 'cacheUseDynamicCompression' in kwargs: + cache_use_dynamic_compression = kwargs['cacheUseDynamicCompression'] + if custom_forwarding_path is None and 'customForwardingPath' in kwargs: + custom_forwarding_path = kwargs['customForwardingPath'] + if forwarding_protocol is None and 'forwardingProtocol' in kwargs: + forwarding_protocol = kwargs['forwardingProtocol'] + + _setter("backend_pool_name", backend_pool_name) if cache_duration is not None: - pulumi.set(__self__, "cache_duration", cache_duration) + _setter("cache_duration", cache_duration) if cache_enabled is not None: - pulumi.set(__self__, "cache_enabled", cache_enabled) + _setter("cache_enabled", cache_enabled) if cache_query_parameter_strip_directive is not None: - pulumi.set(__self__, "cache_query_parameter_strip_directive", cache_query_parameter_strip_directive) + _setter("cache_query_parameter_strip_directive", cache_query_parameter_strip_directive) if cache_query_parameters is not None: - pulumi.set(__self__, "cache_query_parameters", cache_query_parameters) + _setter("cache_query_parameters", cache_query_parameters) if cache_use_dynamic_compression is not None: - pulumi.set(__self__, "cache_use_dynamic_compression", cache_use_dynamic_compression) + _setter("cache_use_dynamic_compression", cache_use_dynamic_compression) if custom_forwarding_path is not None: - pulumi.set(__self__, "custom_forwarding_path", custom_forwarding_path) + _setter("custom_forwarding_path", custom_forwarding_path) if forwarding_protocol is not None: - pulumi.set(__self__, "forwarding_protocol", forwarding_protocol) + _setter("forwarding_protocol", forwarding_protocol) @property @pulumi.getter(name="backendPoolName") @@ -1642,16 +2172,53 @@ def __init__(__self__, *, :param str custom_path: The path to retain as per the incoming request, or update in the URL for the redirection. :param str custom_query_string: Replace any existing query string from the incoming request URL. """ - pulumi.set(__self__, "redirect_protocol", redirect_protocol) - pulumi.set(__self__, "redirect_type", redirect_type) + FrontdoorRoutingRuleRedirectConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + redirect_protocol=redirect_protocol, + redirect_type=redirect_type, + custom_fragment=custom_fragment, + custom_host=custom_host, + custom_path=custom_path, + custom_query_string=custom_query_string, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + redirect_protocol: Optional[str] = None, + redirect_type: Optional[str] = None, + custom_fragment: Optional[str] = None, + custom_host: Optional[str] = None, + custom_path: Optional[str] = None, + custom_query_string: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if redirect_protocol is None and 'redirectProtocol' in kwargs: + redirect_protocol = kwargs['redirectProtocol'] + if redirect_protocol is None: + raise TypeError("Missing 'redirect_protocol' argument") + if redirect_type is None and 'redirectType' in kwargs: + redirect_type = kwargs['redirectType'] + if redirect_type is None: + raise TypeError("Missing 'redirect_type' argument") + if custom_fragment is None and 'customFragment' in kwargs: + custom_fragment = kwargs['customFragment'] + if custom_host is None and 'customHost' in kwargs: + custom_host = kwargs['customHost'] + if custom_path is None and 'customPath' in kwargs: + custom_path = kwargs['customPath'] + if custom_query_string is None and 'customQueryString' in kwargs: + custom_query_string = kwargs['customQueryString'] + + _setter("redirect_protocol", redirect_protocol) + _setter("redirect_type", redirect_type) if custom_fragment is not None: - pulumi.set(__self__, "custom_fragment", custom_fragment) + _setter("custom_fragment", custom_fragment) if custom_host is not None: - pulumi.set(__self__, "custom_host", custom_host) + _setter("custom_host", custom_host) if custom_path is not None: - pulumi.set(__self__, "custom_path", custom_path) + _setter("custom_path", custom_path) if custom_query_string is not None: - pulumi.set(__self__, "custom_query_string", custom_query_string) + _setter("custom_query_string", custom_query_string) @property @pulumi.getter(name="redirectProtocol") @@ -1732,12 +2299,35 @@ def __init__(__self__, *, :param 'RulesEngineRuleActionArgs' action: An `action` block as defined below. :param Sequence['RulesEngineRuleMatchConditionArgs'] match_conditions: One or more `match_condition` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) + RulesEngineRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + priority=priority, + action=action, + match_conditions=match_conditions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + priority: Optional[int] = None, + action: Optional['outputs.RulesEngineRuleAction'] = None, + match_conditions: Optional[Sequence['outputs.RulesEngineRuleMatchCondition']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if match_conditions is None and 'matchConditions' in kwargs: + match_conditions = kwargs['matchConditions'] + + _setter("name", name) + _setter("priority", priority) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if match_conditions is not None: - pulumi.set(__self__, "match_conditions", match_conditions) + _setter("match_conditions", match_conditions) @property @pulumi.getter @@ -1800,10 +2390,27 @@ def __init__(__self__, *, :param Sequence['RulesEngineRuleActionRequestHeaderArgs'] request_headers: A `request_header` block as defined below. :param Sequence['RulesEngineRuleActionResponseHeaderArgs'] response_headers: A `response_header` block as defined below. """ + RulesEngineRuleAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + request_headers=request_headers, + response_headers=response_headers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + request_headers: Optional[Sequence['outputs.RulesEngineRuleActionRequestHeader']] = None, + response_headers: Optional[Sequence['outputs.RulesEngineRuleActionResponseHeader']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if request_headers is None and 'requestHeaders' in kwargs: + request_headers = kwargs['requestHeaders'] + if response_headers is None and 'responseHeaders' in kwargs: + response_headers = kwargs['responseHeaders'] + if request_headers is not None: - pulumi.set(__self__, "request_headers", request_headers) + _setter("request_headers", request_headers) if response_headers is not None: - pulumi.set(__self__, "response_headers", response_headers) + _setter("response_headers", response_headers) @property @pulumi.getter(name="requestHeaders") @@ -1852,12 +2459,31 @@ def __init__(__self__, *, :param str header_name: header name (string). :param str value: value name (string). """ + RulesEngineRuleActionRequestHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_action_type=header_action_type, + header_name=header_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_action_type: Optional[str] = None, + header_name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_action_type is None and 'headerActionType' in kwargs: + header_action_type = kwargs['headerActionType'] + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_action_type is not None: - pulumi.set(__self__, "header_action_type", header_action_type) + _setter("header_action_type", header_action_type) if header_name is not None: - pulumi.set(__self__, "header_name", header_name) + _setter("header_name", header_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerActionType") @@ -1914,12 +2540,31 @@ def __init__(__self__, *, :param str header_name: header name (string). :param str value: value name (string). """ + RulesEngineRuleActionResponseHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_action_type=header_action_type, + header_name=header_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_action_type: Optional[str] = None, + header_name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_action_type is None and 'headerActionType' in kwargs: + header_action_type = kwargs['headerActionType'] + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_action_type is not None: - pulumi.set(__self__, "header_action_type", header_action_type) + _setter("header_action_type", header_action_type) if header_name is not None: - pulumi.set(__self__, "header_name", header_name) + _setter("header_name", header_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="headerActionType") @@ -1980,17 +2625,42 @@ def __init__(__self__, *, :param Sequence[str] values: (array) can contain one or more strings. :param str variable: can be set to `IsMobile`, `RemoteAddr`, `RequestMethod`, `QueryString`, `PostArgs`, `RequestURI`, `RequestPath`, `RequestFilename`, `RequestFilenameExtension`,`RequestHeader`,`RequestBody` or `RequestScheme`. """ - pulumi.set(__self__, "operator", operator) + RulesEngineRuleMatchCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + negate_condition=negate_condition, + selector=selector, + transforms=transforms, + values=values, + variable=variable, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + negate_condition: Optional[bool] = None, + selector: Optional[str] = None, + transforms: Optional[Sequence[str]] = None, + values: Optional[Sequence[str]] = None, + variable: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if negate_condition is None and 'negateCondition' in kwargs: + negate_condition = kwargs['negateCondition'] + + _setter("operator", operator) if negate_condition is not None: - pulumi.set(__self__, "negate_condition", negate_condition) + _setter("negate_condition", negate_condition) if selector is not None: - pulumi.set(__self__, "selector", selector) + _setter("selector", selector) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) if variable is not None: - pulumi.set(__self__, "variable", variable) + _setter("variable", variable) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/frontdoor/rules_engine.py b/sdk/python/pulumi_azure/frontdoor/rules_engine.py index fb00a7affa..bdf11e362c 100644 --- a/sdk/python/pulumi_azure/frontdoor/rules_engine.py +++ b/sdk/python/pulumi_azure/frontdoor/rules_engine.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Rules engine configuration. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['RulesEngineRuleArgs']]] rules: A `rule` block as defined below. """ - pulumi.set(__self__, "frontdoor_name", frontdoor_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + RulesEngineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frontdoor_name=frontdoor_name, + resource_group_name=resource_group_name, + enabled=enabled, + name=name, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frontdoor_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['RulesEngineRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frontdoor_name is None and 'frontdoorName' in kwargs: + frontdoor_name = kwargs['frontdoorName'] + if frontdoor_name is None: + raise TypeError("Missing 'frontdoor_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("frontdoor_name", frontdoor_name) + _setter("resource_group_name", resource_group_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter(name="frontdoorName") @@ -116,18 +143,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['RulesEngineRuleArgs']]] rules: A `rule` block as defined below. """ + _RulesEngineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + frontdoor_name=frontdoor_name, + location=location, + name=name, + resource_group_name=resource_group_name, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + frontdoor_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['RulesEngineRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frontdoor_name is None and 'frontdoorName' in kwargs: + frontdoor_name = kwargs['frontdoorName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if frontdoor_name is not None: - pulumi.set(__self__, "frontdoor_name", frontdoor_name) + _setter("frontdoor_name", frontdoor_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter @@ -426,6 +478,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RulesEngineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/graph/account.py b/sdk/python/pulumi_azure/graph/account.py index 9129489ee5..f968a85fe3 100644 --- a/sdk/python/pulumi_azure/graph/account.py +++ b/sdk/python/pulumi_azure/graph/account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AccountArgs', 'Account'] @@ -25,12 +25,37 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of this Account. Changing this forces a new Account to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Account. """ - pulumi.set(__self__, "application_id", application_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + AccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_id=application_id, + resource_group_name=resource_group_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_id is None and 'applicationId' in kwargs: + application_id = kwargs['applicationId'] + if application_id is None: + raise TypeError("Missing 'application_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("application_id", application_id) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="applicationId") @@ -97,16 +122,41 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group within which this Account should exist. Changing this forces a new Account to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Account. """ + _AccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_id=application_id, + billing_plan_id=billing_plan_id, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_id: Optional[pulumi.Input[str]] = None, + billing_plan_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_id is None and 'applicationId' in kwargs: + application_id = kwargs['applicationId'] + if billing_plan_id is None and 'billingPlanId' in kwargs: + billing_plan_id = kwargs['billingPlanId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if application_id is not None: - pulumi.set(__self__, "application_id", application_id) + _setter("application_id", application_id) if billing_plan_id is not None: - pulumi.set(__self__, "billing_plan_id", billing_plan_id) + _setter("billing_plan_id", billing_plan_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="applicationId") @@ -262,6 +312,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/graph/services_account.py b/sdk/python/pulumi_azure/graph/services_account.py index b2ede59602..66926f97b7 100644 --- a/sdk/python/pulumi_azure/graph/services_account.py +++ b/sdk/python/pulumi_azure/graph/services_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServicesAccountArgs', 'ServicesAccount'] @@ -25,12 +25,37 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of this Account. Changing this forces a new Account to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Account. """ - pulumi.set(__self__, "application_id", application_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ServicesAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_id=application_id, + resource_group_name=resource_group_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_id is None and 'applicationId' in kwargs: + application_id = kwargs['applicationId'] + if application_id is None: + raise TypeError("Missing 'application_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("application_id", application_id) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="applicationId") @@ -97,16 +122,41 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group within which this Account should exist. Changing this forces a new Account to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Account. """ + _ServicesAccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_id=application_id, + billing_plan_id=billing_plan_id, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_id: Optional[pulumi.Input[str]] = None, + billing_plan_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_id is None and 'applicationId' in kwargs: + application_id = kwargs['applicationId'] + if billing_plan_id is None and 'billingPlanId' in kwargs: + billing_plan_id = kwargs['billingPlanId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if application_id is not None: - pulumi.set(__self__, "application_id", application_id) + _setter("application_id", application_id) if billing_plan_id is not None: - pulumi.set(__self__, "billing_plan_id", billing_plan_id) + _setter("billing_plan_id", billing_plan_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="applicationId") @@ -258,6 +308,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServicesAccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/hdinsight/_inputs.py b/sdk/python/pulumi_azure/hdinsight/_inputs.py index 58a61949a3..af2e91ca47 100644 --- a/sdk/python/pulumi_azure/hdinsight/_inputs.py +++ b/sdk/python/pulumi_azure/hdinsight/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -146,7 +146,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] hbase: The version of HBase which should be used for this HDInsight HBase Cluster. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "hbase", hbase) + HBaseClusterComponentVersionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + hbase=hbase, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hbase: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hbase is None: + raise TypeError("Missing 'hbase' argument") + + _setter("hbase", hbase) @property @pulumi.getter @@ -170,10 +183,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] compute_isolation_enabled: This field indicates whether enable compute isolation or not. Possible values are `true` or `false`. :param pulumi.Input[str] host_sku: The name of the host SKU. """ + HBaseClusterComputeIsolationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_isolation_enabled=compute_isolation_enabled, + host_sku=host_sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_isolation_enabled: Optional[pulumi.Input[bool]] = None, + host_sku: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_isolation_enabled is None and 'computeIsolationEnabled' in kwargs: + compute_isolation_enabled = kwargs['computeIsolationEnabled'] + if host_sku is None and 'hostSku' in kwargs: + host_sku = kwargs['hostSku'] + if compute_isolation_enabled is not None: - pulumi.set(__self__, "compute_isolation_enabled", compute_isolation_enabled) + _setter("compute_isolation_enabled", compute_isolation_enabled) if host_sku is not None: - pulumi.set(__self__, "host_sku", host_sku) + _setter("host_sku", host_sku) @property @pulumi.getter(name="computeIsolationEnabled") @@ -213,14 +243,39 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the key vault key. :param pulumi.Input[str] key_vault_managed_identity_id: This is the resource ID of Managed Identity used to access the key vault. """ + HBaseClusterDiskEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption_algorithm=encryption_algorithm, + encryption_at_host_enabled=encryption_at_host_enabled, + key_vault_key_id=key_vault_key_id, + key_vault_managed_identity_id=key_vault_managed_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption_algorithm: Optional[pulumi.Input[str]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + key_vault_managed_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encryption_algorithm is None and 'encryptionAlgorithm' in kwargs: + encryption_algorithm = kwargs['encryptionAlgorithm'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_managed_identity_id is None and 'keyVaultManagedIdentityId' in kwargs: + key_vault_managed_identity_id = kwargs['keyVaultManagedIdentityId'] + if encryption_algorithm is not None: - pulumi.set(__self__, "encryption_algorithm", encryption_algorithm) + _setter("encryption_algorithm", encryption_algorithm) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if key_vault_managed_identity_id is not None: - pulumi.set(__self__, "key_vault_managed_identity_id", key_vault_managed_identity_id) + _setter("key_vault_managed_identity_id", key_vault_managed_identity_id) @property @pulumi.getter(name="encryptionAlgorithm") @@ -280,8 +335,29 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The workspace ID of the log analytics extension. :param pulumi.Input[str] primary_key: The workspace key of the log analytics extension. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + HBaseClusterExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -319,8 +395,25 @@ def __init__(__self__, *, > **NOTE:** This password must be different from the one used for the `head_node`, `worker_node` and `zookeeper_node` roles. :param pulumi.Input[str] username: The username used for the Ambari Portal. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + HBaseClusterGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -360,12 +453,27 @@ def __init__(__self__, *, :param pulumi.Input['HBaseClusterMetastoresHiveArgs'] hive: A `hive` block as defined below. :param pulumi.Input['HBaseClusterMetastoresOozieArgs'] oozie: An `oozie` block as defined below. """ + HBaseClusterMetastoresArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ambari=ambari, + hive=hive, + oozie=oozie, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ambari: Optional[pulumi.Input['HBaseClusterMetastoresAmbariArgs']] = None, + hive: Optional[pulumi.Input['HBaseClusterMetastoresHiveArgs']] = None, + oozie: Optional[pulumi.Input['HBaseClusterMetastoresOozieArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ambari is not None: - pulumi.set(__self__, "ambari", ambari) + _setter("ambari", ambari) if hive is not None: - pulumi.set(__self__, "hive", hive) + _setter("hive", hive) if oozie is not None: - pulumi.set(__self__, "oozie", oozie) + _setter("oozie", oozie) @property @pulumi.getter @@ -417,10 +525,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Ambari metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Ambari metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + HBaseClusterMetastoresAmbariArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -484,10 +619,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Hive metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Hive metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + HBaseClusterMetastoresHiveArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -551,10 +713,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Oozie metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Oozie metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + HBaseClusterMetastoresOozieArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -614,8 +803,29 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The Operations Management Suite (OMS) workspace ID. :param pulumi.Input[str] primary_key: The Operations Management Suite (OMS) workspace key. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + HBaseClusterMonitorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -653,10 +863,27 @@ def __init__(__self__, *, > **NOTE:** To enable the private link the `connection_direction` must be set to `Outbound`. :param pulumi.Input[bool] private_link_enabled: Is the private link enabled? Possible values include `True` or `False`. Defaults to `False`. Changing this forces a new resource to be created. """ + HBaseClusterNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_direction=connection_direction, + private_link_enabled=private_link_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_direction: Optional[pulumi.Input[str]] = None, + private_link_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_direction is None and 'connectionDirection' in kwargs: + connection_direction = kwargs['connectionDirection'] + if private_link_enabled is None and 'privateLinkEnabled' in kwargs: + private_link_enabled = kwargs['privateLinkEnabled'] + if connection_direction is not None: - pulumi.set(__self__, "connection_direction", connection_direction) + _setter("connection_direction", connection_direction) if private_link_enabled is not None: - pulumi.set(__self__, "private_link_enabled", private_link_enabled) + _setter("private_link_enabled", private_link_enabled) @property @pulumi.getter(name="connectionDirection") @@ -696,9 +923,36 @@ def __init__(__self__, *, :param pulumi.Input['HBaseClusterRolesWorkerNodeArgs'] worker_node: A `worker_node` block as defined below. :param pulumi.Input['HBaseClusterRolesZookeeperNodeArgs'] zookeeper_node: A `zookeeper_node` block as defined below. """ - pulumi.set(__self__, "head_node", head_node) - pulumi.set(__self__, "worker_node", worker_node) - pulumi.set(__self__, "zookeeper_node", zookeeper_node) + HBaseClusterRolesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + head_node=head_node, + worker_node=worker_node, + zookeeper_node=zookeeper_node, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + head_node: Optional[pulumi.Input['HBaseClusterRolesHeadNodeArgs']] = None, + worker_node: Optional[pulumi.Input['HBaseClusterRolesWorkerNodeArgs']] = None, + zookeeper_node: Optional[pulumi.Input['HBaseClusterRolesZookeeperNodeArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if head_node is None and 'headNode' in kwargs: + head_node = kwargs['headNode'] + if head_node is None: + raise TypeError("Missing 'head_node' argument") + if worker_node is None and 'workerNode' in kwargs: + worker_node = kwargs['workerNode'] + if worker_node is None: + raise TypeError("Missing 'worker_node' argument") + if zookeeper_node is None and 'zookeeperNode' in kwargs: + zookeeper_node = kwargs['zookeeperNode'] + if zookeeper_node is None: + raise TypeError("Missing 'zookeeper_node' argument") + + _setter("head_node", head_node) + _setter("worker_node", worker_node) + _setter("zookeeper_node", zookeeper_node) @property @pulumi.getter(name="headNode") @@ -760,18 +1014,55 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + HBaseClusterRolesHeadNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['HBaseClusterRolesHeadNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -873,10 +1164,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HBaseClusterRolesHeadNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -941,21 +1251,66 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + HBaseClusterRolesWorkerNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_instance_count=target_instance_count, + username=username, + vm_size=vm_size, + autoscale=autoscale, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_instance_count: Optional[pulumi.Input[int]] = None, + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + autoscale: Optional[pulumi.Input['HBaseClusterRolesWorkerNodeAutoscaleArgs']] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['HBaseClusterRolesWorkerNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("target_instance_count", target_instance_count) + _setter("username", username) + _setter("vm_size", vm_size) if autoscale is not None: - pulumi.set(__self__, "autoscale", autoscale) + _setter("autoscale", autoscale) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="targetInstanceCount") @@ -1071,8 +1426,19 @@ def virtual_network_id(self, value: Optional[pulumi.Input[str]]): class HBaseClusterRolesWorkerNodeAutoscaleArgs: def __init__(__self__, *, recurrence: Optional[pulumi.Input['HBaseClusterRolesWorkerNodeAutoscaleRecurrenceArgs']] = None): + HBaseClusterRolesWorkerNodeAutoscaleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + recurrence=recurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recurrence: Optional[pulumi.Input['HBaseClusterRolesWorkerNodeAutoscaleRecurrenceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) @property @pulumi.getter @@ -1089,8 +1455,25 @@ class HBaseClusterRolesWorkerNodeAutoscaleRecurrenceArgs: def __init__(__self__, *, schedules: pulumi.Input[Sequence[pulumi.Input['HBaseClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs']]], timezone: pulumi.Input[str]): - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "timezone", timezone) + HBaseClusterRolesWorkerNodeAutoscaleRecurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + schedules=schedules, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schedules: Optional[pulumi.Input[Sequence[pulumi.Input['HBaseClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs']]]] = None, + timezone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if timezone is None: + raise TypeError("Missing 'timezone' argument") + + _setter("schedules", schedules) + _setter("timezone", timezone) @property @pulumi.getter @@ -1120,9 +1503,32 @@ def __init__(__self__, *, """ :param pulumi.Input[int] target_instance_count: The number of instances which should be run for the Worker Nodes. """ - pulumi.set(__self__, "days", days) - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "time", time) + HBaseClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + target_instance_count=target_instance_count, + time=time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + target_instance_count: Optional[pulumi.Input[int]] = None, + time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if time is None: + raise TypeError("Missing 'time' argument") + + _setter("days", days) + _setter("target_instance_count", target_instance_count) + _setter("time", time) @property @pulumi.getter @@ -1166,10 +1572,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HBaseClusterRolesWorkerNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -1231,18 +1656,55 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + HBaseClusterRolesZookeeperNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['HBaseClusterRolesZookeeperNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -1344,10 +1806,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HBaseClusterRolesZookeeperNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -1405,14 +1886,63 @@ def __init__(__self__, *, :param pulumi.Input[str] msi_resource_id: The User Assigned Identity for the HDInsight Cluster. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] cluster_users_group_dns: A list of the distinguished names for the cluster user groups. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "aadds_resource_id", aadds_resource_id) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "domain_user_password", domain_user_password) - pulumi.set(__self__, "domain_username", domain_username) - pulumi.set(__self__, "ldaps_urls", ldaps_urls) - pulumi.set(__self__, "msi_resource_id", msi_resource_id) + HBaseClusterSecurityProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aadds_resource_id=aadds_resource_id, + domain_name=domain_name, + domain_user_password=domain_user_password, + domain_username=domain_username, + ldaps_urls=ldaps_urls, + msi_resource_id=msi_resource_id, + cluster_users_group_dns=cluster_users_group_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aadds_resource_id: Optional[pulumi.Input[str]] = None, + domain_name: Optional[pulumi.Input[str]] = None, + domain_user_password: Optional[pulumi.Input[str]] = None, + domain_username: Optional[pulumi.Input[str]] = None, + ldaps_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + msi_resource_id: Optional[pulumi.Input[str]] = None, + cluster_users_group_dns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aadds_resource_id is None and 'aaddsResourceId' in kwargs: + aadds_resource_id = kwargs['aaddsResourceId'] + if aadds_resource_id is None: + raise TypeError("Missing 'aadds_resource_id' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_user_password is None and 'domainUserPassword' in kwargs: + domain_user_password = kwargs['domainUserPassword'] + if domain_user_password is None: + raise TypeError("Missing 'domain_user_password' argument") + if domain_username is None and 'domainUsername' in kwargs: + domain_username = kwargs['domainUsername'] + if domain_username is None: + raise TypeError("Missing 'domain_username' argument") + if ldaps_urls is None and 'ldapsUrls' in kwargs: + ldaps_urls = kwargs['ldapsUrls'] + if ldaps_urls is None: + raise TypeError("Missing 'ldaps_urls' argument") + if msi_resource_id is None and 'msiResourceId' in kwargs: + msi_resource_id = kwargs['msiResourceId'] + if msi_resource_id is None: + raise TypeError("Missing 'msi_resource_id' argument") + if cluster_users_group_dns is None and 'clusterUsersGroupDns' in kwargs: + cluster_users_group_dns = kwargs['clusterUsersGroupDns'] + + _setter("aadds_resource_id", aadds_resource_id) + _setter("domain_name", domain_name) + _setter("domain_user_password", domain_user_password) + _setter("domain_username", domain_username) + _setter("ldaps_urls", ldaps_urls) + _setter("msi_resource_id", msi_resource_id) if cluster_users_group_dns is not None: - pulumi.set(__self__, "cluster_users_group_dns", cluster_users_group_dns) + _setter("cluster_users_group_dns", cluster_users_group_dns) @property @pulumi.getter(name="aaddsResourceId") @@ -1516,11 +2046,42 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param pulumi.Input[str] storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "storage_container_id", storage_container_id) + HBaseClusterStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_default=is_default, + storage_account_key=storage_account_key, + storage_container_id=storage_container_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_default: Optional[pulumi.Input[bool]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_container_id: Optional[pulumi.Input[str]] = None, + storage_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + + _setter("is_default", is_default) + _setter("storage_account_key", storage_account_key) + _setter("storage_container_id", storage_container_id) if storage_resource_id is not None: - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="isDefault") @@ -1592,10 +2153,43 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param pulumi.Input[str] storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "filesystem_id", filesystem_id) - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "managed_identity_resource_id", managed_identity_resource_id) - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + HBaseClusterStorageAccountGen2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + filesystem_id=filesystem_id, + is_default=is_default, + managed_identity_resource_id=managed_identity_resource_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filesystem_id: Optional[pulumi.Input[str]] = None, + is_default: Optional[pulumi.Input[bool]] = None, + managed_identity_resource_id: Optional[pulumi.Input[str]] = None, + storage_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filesystem_id is None and 'filesystemId' in kwargs: + filesystem_id = kwargs['filesystemId'] + if filesystem_id is None: + raise TypeError("Missing 'filesystem_id' argument") + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if managed_identity_resource_id is None and 'managedIdentityResourceId' in kwargs: + managed_identity_resource_id = kwargs['managedIdentityResourceId'] + if managed_identity_resource_id is None: + raise TypeError("Missing 'managed_identity_resource_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + if storage_resource_id is None: + raise TypeError("Missing 'storage_resource_id' argument") + + _setter("filesystem_id", filesystem_id) + _setter("is_default", is_default) + _setter("managed_identity_resource_id", managed_identity_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="filesystemId") @@ -1657,7 +2251,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] hadoop: The version of Hadoop which should be used for this HDInsight Hadoop Cluster. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "hadoop", hadoop) + HadoopClusterComponentVersionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + hadoop=hadoop, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hadoop: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hadoop is None: + raise TypeError("Missing 'hadoop' argument") + + _setter("hadoop", hadoop) @property @pulumi.getter @@ -1681,10 +2288,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] compute_isolation_enabled: This field indicates whether enable compute isolation or not. Possible values are `true` or `false`. :param pulumi.Input[str] host_sku: The name of the host SKU. """ + HadoopClusterComputeIsolationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_isolation_enabled=compute_isolation_enabled, + host_sku=host_sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_isolation_enabled: Optional[pulumi.Input[bool]] = None, + host_sku: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_isolation_enabled is None and 'computeIsolationEnabled' in kwargs: + compute_isolation_enabled = kwargs['computeIsolationEnabled'] + if host_sku is None and 'hostSku' in kwargs: + host_sku = kwargs['hostSku'] + if compute_isolation_enabled is not None: - pulumi.set(__self__, "compute_isolation_enabled", compute_isolation_enabled) + _setter("compute_isolation_enabled", compute_isolation_enabled) if host_sku is not None: - pulumi.set(__self__, "host_sku", host_sku) + _setter("host_sku", host_sku) @property @pulumi.getter(name="computeIsolationEnabled") @@ -1724,14 +2348,39 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the key vault key. :param pulumi.Input[str] key_vault_managed_identity_id: This is the resource ID of Managed Identity used to access the key vault. """ + HadoopClusterDiskEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption_algorithm=encryption_algorithm, + encryption_at_host_enabled=encryption_at_host_enabled, + key_vault_key_id=key_vault_key_id, + key_vault_managed_identity_id=key_vault_managed_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption_algorithm: Optional[pulumi.Input[str]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + key_vault_managed_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encryption_algorithm is None and 'encryptionAlgorithm' in kwargs: + encryption_algorithm = kwargs['encryptionAlgorithm'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_managed_identity_id is None and 'keyVaultManagedIdentityId' in kwargs: + key_vault_managed_identity_id = kwargs['keyVaultManagedIdentityId'] + if encryption_algorithm is not None: - pulumi.set(__self__, "encryption_algorithm", encryption_algorithm) + _setter("encryption_algorithm", encryption_algorithm) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if key_vault_managed_identity_id is not None: - pulumi.set(__self__, "key_vault_managed_identity_id", key_vault_managed_identity_id) + _setter("key_vault_managed_identity_id", key_vault_managed_identity_id) @property @pulumi.getter(name="encryptionAlgorithm") @@ -1791,8 +2440,29 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The workspace ID of the log analytics extension. :param pulumi.Input[str] primary_key: The workspace key of the log analytics extension. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + HadoopClusterExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -1830,8 +2500,25 @@ def __init__(__self__, *, > **NOTE:** This password must be different from the one used for the `head_node`, `worker_node` and `zookeeper_node` roles. :param pulumi.Input[str] username: The username used for the Ambari Portal. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + HadoopClusterGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -1871,12 +2558,27 @@ def __init__(__self__, *, :param pulumi.Input['HadoopClusterMetastoresHiveArgs'] hive: A `hive` block as defined below. :param pulumi.Input['HadoopClusterMetastoresOozieArgs'] oozie: An `oozie` block as defined below. """ + HadoopClusterMetastoresArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ambari=ambari, + hive=hive, + oozie=oozie, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ambari: Optional[pulumi.Input['HadoopClusterMetastoresAmbariArgs']] = None, + hive: Optional[pulumi.Input['HadoopClusterMetastoresHiveArgs']] = None, + oozie: Optional[pulumi.Input['HadoopClusterMetastoresOozieArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ambari is not None: - pulumi.set(__self__, "ambari", ambari) + _setter("ambari", ambari) if hive is not None: - pulumi.set(__self__, "hive", hive) + _setter("hive", hive) if oozie is not None: - pulumi.set(__self__, "oozie", oozie) + _setter("oozie", oozie) @property @pulumi.getter @@ -1928,10 +2630,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Ambari metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Ambari metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + HadoopClusterMetastoresAmbariArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -1995,10 +2724,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Hive metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Hive metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + HadoopClusterMetastoresHiveArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -2062,10 +2818,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Oozie metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Oozie metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + HadoopClusterMetastoresOozieArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -2125,8 +2908,29 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The Operations Management Suite (OMS) workspace ID. :param pulumi.Input[str] primary_key: The Operations Management Suite (OMS) workspace key. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + HadoopClusterMonitorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -2164,10 +2968,27 @@ def __init__(__self__, *, > **NOTE:** To enabled the private link the `connection_direction` must be set to `Outbound`. :param pulumi.Input[bool] private_link_enabled: Is the private link enabled? Possible values include `True` or `False`. Defaults to `False`. Changing this forces a new resource to be created. """ + HadoopClusterNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_direction=connection_direction, + private_link_enabled=private_link_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_direction: Optional[pulumi.Input[str]] = None, + private_link_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_direction is None and 'connectionDirection' in kwargs: + connection_direction = kwargs['connectionDirection'] + if private_link_enabled is None and 'privateLinkEnabled' in kwargs: + private_link_enabled = kwargs['privateLinkEnabled'] + if connection_direction is not None: - pulumi.set(__self__, "connection_direction", connection_direction) + _setter("connection_direction", connection_direction) if private_link_enabled is not None: - pulumi.set(__self__, "private_link_enabled", private_link_enabled) + _setter("private_link_enabled", private_link_enabled) @property @pulumi.getter(name="connectionDirection") @@ -2209,11 +3030,42 @@ def __init__(__self__, *, :param pulumi.Input['HadoopClusterRolesZookeeperNodeArgs'] zookeeper_node: A `zookeeper_node` block as defined below. :param pulumi.Input['HadoopClusterRolesEdgeNodeArgs'] edge_node: A `edge_node` block as defined below. """ - pulumi.set(__self__, "head_node", head_node) - pulumi.set(__self__, "worker_node", worker_node) - pulumi.set(__self__, "zookeeper_node", zookeeper_node) + HadoopClusterRolesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + head_node=head_node, + worker_node=worker_node, + zookeeper_node=zookeeper_node, + edge_node=edge_node, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + head_node: Optional[pulumi.Input['HadoopClusterRolesHeadNodeArgs']] = None, + worker_node: Optional[pulumi.Input['HadoopClusterRolesWorkerNodeArgs']] = None, + zookeeper_node: Optional[pulumi.Input['HadoopClusterRolesZookeeperNodeArgs']] = None, + edge_node: Optional[pulumi.Input['HadoopClusterRolesEdgeNodeArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if head_node is None and 'headNode' in kwargs: + head_node = kwargs['headNode'] + if head_node is None: + raise TypeError("Missing 'head_node' argument") + if worker_node is None and 'workerNode' in kwargs: + worker_node = kwargs['workerNode'] + if worker_node is None: + raise TypeError("Missing 'worker_node' argument") + if zookeeper_node is None and 'zookeeperNode' in kwargs: + zookeeper_node = kwargs['zookeeperNode'] + if zookeeper_node is None: + raise TypeError("Missing 'zookeeper_node' argument") + if edge_node is None and 'edgeNode' in kwargs: + edge_node = kwargs['edgeNode'] + + _setter("head_node", head_node) + _setter("worker_node", worker_node) + _setter("zookeeper_node", zookeeper_node) if edge_node is not None: - pulumi.set(__self__, "edge_node", edge_node) + _setter("edge_node", edge_node) @property @pulumi.getter(name="headNode") @@ -2279,13 +3131,48 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['HadoopClusterRolesEdgeNodeHttpsEndpointArgs']]] https_endpoints: The HTTPS Connectivity Endpoint for this HDInsight Hadoop Cluster. :param pulumi.Input[Sequence[pulumi.Input['HadoopClusterRolesEdgeNodeUninstallScriptActionArgs']]] uninstall_script_actions: A `uninstall_script_actions` block as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "install_script_actions", install_script_actions) - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "vm_size", vm_size) + HadoopClusterRolesEdgeNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + install_script_actions=install_script_actions, + target_instance_count=target_instance_count, + vm_size=vm_size, + https_endpoints=https_endpoints, + uninstall_script_actions=uninstall_script_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + install_script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['HadoopClusterRolesEdgeNodeInstallScriptActionArgs']]]] = None, + target_instance_count: Optional[pulumi.Input[int]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + https_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['HadoopClusterRolesEdgeNodeHttpsEndpointArgs']]]] = None, + uninstall_script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['HadoopClusterRolesEdgeNodeUninstallScriptActionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if install_script_actions is None and 'installScriptActions' in kwargs: + install_script_actions = kwargs['installScriptActions'] + if install_script_actions is None: + raise TypeError("Missing 'install_script_actions' argument") + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if https_endpoints is None and 'httpsEndpoints' in kwargs: + https_endpoints = kwargs['httpsEndpoints'] + if uninstall_script_actions is None and 'uninstallScriptActions' in kwargs: + uninstall_script_actions = kwargs['uninstallScriptActions'] + + _setter("install_script_actions", install_script_actions) + _setter("target_instance_count", target_instance_count) + _setter("vm_size", vm_size) if https_endpoints is not None: - pulumi.set(__self__, "https_endpoints", https_endpoints) + _setter("https_endpoints", https_endpoints) if uninstall_script_actions is not None: - pulumi.set(__self__, "uninstall_script_actions", uninstall_script_actions) + _setter("uninstall_script_actions", uninstall_script_actions) @property @pulumi.getter(name="installScriptActions") @@ -2363,16 +3250,45 @@ def __init__(__self__, *, :param pulumi.Input[str] private_ip_address: The private ip address of the endpoint. :param pulumi.Input[str] sub_domain_suffix: The application's subdomain suffix. """ + HadoopClusterRolesEdgeNodeHttpsEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_modes=access_modes, + destination_port=destination_port, + disable_gateway_auth=disable_gateway_auth, + private_ip_address=private_ip_address, + sub_domain_suffix=sub_domain_suffix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_modes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_port: Optional[pulumi.Input[int]] = None, + disable_gateway_auth: Optional[pulumi.Input[bool]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + sub_domain_suffix: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_modes is None and 'accessModes' in kwargs: + access_modes = kwargs['accessModes'] + if destination_port is None and 'destinationPort' in kwargs: + destination_port = kwargs['destinationPort'] + if disable_gateway_auth is None and 'disableGatewayAuth' in kwargs: + disable_gateway_auth = kwargs['disableGatewayAuth'] + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if sub_domain_suffix is None and 'subDomainSuffix' in kwargs: + sub_domain_suffix = kwargs['subDomainSuffix'] + if access_modes is not None: - pulumi.set(__self__, "access_modes", access_modes) + _setter("access_modes", access_modes) if destination_port is not None: - pulumi.set(__self__, "destination_port", destination_port) + _setter("destination_port", destination_port) if disable_gateway_auth is not None: - pulumi.set(__self__, "disable_gateway_auth", disable_gateway_auth) + _setter("disable_gateway_auth", disable_gateway_auth) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if sub_domain_suffix is not None: - pulumi.set(__self__, "sub_domain_suffix", sub_domain_suffix) + _setter("sub_domain_suffix", sub_domain_suffix) @property @pulumi.getter(name="accessModes") @@ -2446,10 +3362,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI pointing to the script to run during the installation of the edge node. :param pulumi.Input[str] parameters: The parameters for the script. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HadoopClusterRolesEdgeNodeInstallScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -2499,10 +3434,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI pointing to the script to run during the installation of the edge node. :param pulumi.Input[str] parameters: The parameters for the script. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HadoopClusterRolesEdgeNodeUninstallScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -2564,18 +3518,55 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + HadoopClusterRolesHeadNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['HadoopClusterRolesHeadNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -2677,10 +3668,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HadoopClusterRolesHeadNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -2746,21 +3756,66 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + HadoopClusterRolesWorkerNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_instance_count=target_instance_count, + username=username, + vm_size=vm_size, + autoscale=autoscale, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_instance_count: Optional[pulumi.Input[int]] = None, + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + autoscale: Optional[pulumi.Input['HadoopClusterRolesWorkerNodeAutoscaleArgs']] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['HadoopClusterRolesWorkerNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("target_instance_count", target_instance_count) + _setter("username", username) + _setter("vm_size", vm_size) if autoscale is not None: - pulumi.set(__self__, "autoscale", autoscale) + _setter("autoscale", autoscale) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="targetInstanceCount") @@ -2886,10 +3941,23 @@ def __init__(__self__, *, > **NOTE:** Either a `capacity` or `recurrence` block must be specified - but not both. """ + HadoopClusterRolesWorkerNodeAutoscaleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + recurrence=recurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input['HadoopClusterRolesWorkerNodeAutoscaleCapacityArgs']] = None, + recurrence: Optional[pulumi.Input['HadoopClusterRolesWorkerNodeAutoscaleRecurrenceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) @property @pulumi.getter @@ -2927,8 +3995,29 @@ def __init__(__self__, *, :param pulumi.Input[int] max_instance_count: The maximum number of worker nodes to autoscale to based on the cluster's activity. :param pulumi.Input[int] min_instance_count: The minimum number of worker nodes to autoscale to based on the cluster's activity. """ - pulumi.set(__self__, "max_instance_count", max_instance_count) - pulumi.set(__self__, "min_instance_count", min_instance_count) + HadoopClusterRolesWorkerNodeAutoscaleCapacityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_instance_count=max_instance_count, + min_instance_count=min_instance_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_instance_count: Optional[pulumi.Input[int]] = None, + min_instance_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_instance_count is None and 'maxInstanceCount' in kwargs: + max_instance_count = kwargs['maxInstanceCount'] + if max_instance_count is None: + raise TypeError("Missing 'max_instance_count' argument") + if min_instance_count is None and 'minInstanceCount' in kwargs: + min_instance_count = kwargs['minInstanceCount'] + if min_instance_count is None: + raise TypeError("Missing 'min_instance_count' argument") + + _setter("max_instance_count", max_instance_count) + _setter("min_instance_count", min_instance_count) @property @pulumi.getter(name="maxInstanceCount") @@ -2964,8 +4053,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['HadoopClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs']]] schedules: A list of `schedule` blocks as defined below. :param pulumi.Input[str] timezone: The time zone for the autoscale schedule times. """ - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "timezone", timezone) + HadoopClusterRolesWorkerNodeAutoscaleRecurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + schedules=schedules, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schedules: Optional[pulumi.Input[Sequence[pulumi.Input['HadoopClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs']]]] = None, + timezone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if timezone is None: + raise TypeError("Missing 'timezone' argument") + + _setter("schedules", schedules) + _setter("timezone", timezone) @property @pulumi.getter @@ -3003,9 +4109,32 @@ def __init__(__self__, *, :param pulumi.Input[int] target_instance_count: The number of worker nodes to autoscale at the specified time. :param pulumi.Input[str] time: The time of day to perform the autoscale in 24hour format. """ - pulumi.set(__self__, "days", days) - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "time", time) + HadoopClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + target_instance_count=target_instance_count, + time=time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + target_instance_count: Optional[pulumi.Input[int]] = None, + time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if time is None: + raise TypeError("Missing 'time' argument") + + _setter("days", days) + _setter("target_instance_count", target_instance_count) + _setter("time", time) @property @pulumi.getter @@ -3055,10 +4184,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HadoopClusterRolesWorkerNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3120,18 +4268,55 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + HadoopClusterRolesZookeeperNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['HadoopClusterRolesZookeeperNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -3233,10 +4418,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HadoopClusterRolesZookeeperNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3294,14 +4498,63 @@ def __init__(__self__, *, :param pulumi.Input[str] msi_resource_id: The User Assigned Identity for the HDInsight Cluster. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] cluster_users_group_dns: A list of the distinguished names for the cluster user groups. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "aadds_resource_id", aadds_resource_id) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "domain_user_password", domain_user_password) - pulumi.set(__self__, "domain_username", domain_username) - pulumi.set(__self__, "ldaps_urls", ldaps_urls) - pulumi.set(__self__, "msi_resource_id", msi_resource_id) + HadoopClusterSecurityProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aadds_resource_id=aadds_resource_id, + domain_name=domain_name, + domain_user_password=domain_user_password, + domain_username=domain_username, + ldaps_urls=ldaps_urls, + msi_resource_id=msi_resource_id, + cluster_users_group_dns=cluster_users_group_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aadds_resource_id: Optional[pulumi.Input[str]] = None, + domain_name: Optional[pulumi.Input[str]] = None, + domain_user_password: Optional[pulumi.Input[str]] = None, + domain_username: Optional[pulumi.Input[str]] = None, + ldaps_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + msi_resource_id: Optional[pulumi.Input[str]] = None, + cluster_users_group_dns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aadds_resource_id is None and 'aaddsResourceId' in kwargs: + aadds_resource_id = kwargs['aaddsResourceId'] + if aadds_resource_id is None: + raise TypeError("Missing 'aadds_resource_id' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_user_password is None and 'domainUserPassword' in kwargs: + domain_user_password = kwargs['domainUserPassword'] + if domain_user_password is None: + raise TypeError("Missing 'domain_user_password' argument") + if domain_username is None and 'domainUsername' in kwargs: + domain_username = kwargs['domainUsername'] + if domain_username is None: + raise TypeError("Missing 'domain_username' argument") + if ldaps_urls is None and 'ldapsUrls' in kwargs: + ldaps_urls = kwargs['ldapsUrls'] + if ldaps_urls is None: + raise TypeError("Missing 'ldaps_urls' argument") + if msi_resource_id is None and 'msiResourceId' in kwargs: + msi_resource_id = kwargs['msiResourceId'] + if msi_resource_id is None: + raise TypeError("Missing 'msi_resource_id' argument") + if cluster_users_group_dns is None and 'clusterUsersGroupDns' in kwargs: + cluster_users_group_dns = kwargs['clusterUsersGroupDns'] + + _setter("aadds_resource_id", aadds_resource_id) + _setter("domain_name", domain_name) + _setter("domain_user_password", domain_user_password) + _setter("domain_username", domain_username) + _setter("ldaps_urls", ldaps_urls) + _setter("msi_resource_id", msi_resource_id) if cluster_users_group_dns is not None: - pulumi.set(__self__, "cluster_users_group_dns", cluster_users_group_dns) + _setter("cluster_users_group_dns", cluster_users_group_dns) @property @pulumi.getter(name="aaddsResourceId") @@ -3405,11 +4658,42 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param pulumi.Input[str] storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "storage_container_id", storage_container_id) + HadoopClusterStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_default=is_default, + storage_account_key=storage_account_key, + storage_container_id=storage_container_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_default: Optional[pulumi.Input[bool]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_container_id: Optional[pulumi.Input[str]] = None, + storage_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + + _setter("is_default", is_default) + _setter("storage_account_key", storage_account_key) + _setter("storage_container_id", storage_container_id) if storage_resource_id is not None: - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="isDefault") @@ -3481,10 +4765,43 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param pulumi.Input[str] storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "filesystem_id", filesystem_id) - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "managed_identity_resource_id", managed_identity_resource_id) - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + HadoopClusterStorageAccountGen2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + filesystem_id=filesystem_id, + is_default=is_default, + managed_identity_resource_id=managed_identity_resource_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filesystem_id: Optional[pulumi.Input[str]] = None, + is_default: Optional[pulumi.Input[bool]] = None, + managed_identity_resource_id: Optional[pulumi.Input[str]] = None, + storage_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filesystem_id is None and 'filesystemId' in kwargs: + filesystem_id = kwargs['filesystemId'] + if filesystem_id is None: + raise TypeError("Missing 'filesystem_id' argument") + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if managed_identity_resource_id is None and 'managedIdentityResourceId' in kwargs: + managed_identity_resource_id = kwargs['managedIdentityResourceId'] + if managed_identity_resource_id is None: + raise TypeError("Missing 'managed_identity_resource_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + if storage_resource_id is None: + raise TypeError("Missing 'storage_resource_id' argument") + + _setter("filesystem_id", filesystem_id) + _setter("is_default", is_default) + _setter("managed_identity_resource_id", managed_identity_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="filesystemId") @@ -3546,7 +4863,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] interactive_hive: The version of Interactive Query which should be used for this HDInsight Interactive Query Cluster. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "interactive_hive", interactive_hive) + InteractiveQueryClusterComponentVersionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + interactive_hive=interactive_hive, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + interactive_hive: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if interactive_hive is None and 'interactiveHive' in kwargs: + interactive_hive = kwargs['interactiveHive'] + if interactive_hive is None: + raise TypeError("Missing 'interactive_hive' argument") + + _setter("interactive_hive", interactive_hive) @property @pulumi.getter(name="interactiveHive") @@ -3570,10 +4902,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] compute_isolation_enabled: This field indicates whether enable compute isolation or not. Possible values are `true` or `false`. :param pulumi.Input[str] host_sku: The name of the host SKU. """ + InteractiveQueryClusterComputeIsolationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_isolation_enabled=compute_isolation_enabled, + host_sku=host_sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_isolation_enabled: Optional[pulumi.Input[bool]] = None, + host_sku: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_isolation_enabled is None and 'computeIsolationEnabled' in kwargs: + compute_isolation_enabled = kwargs['computeIsolationEnabled'] + if host_sku is None and 'hostSku' in kwargs: + host_sku = kwargs['hostSku'] + if compute_isolation_enabled is not None: - pulumi.set(__self__, "compute_isolation_enabled", compute_isolation_enabled) + _setter("compute_isolation_enabled", compute_isolation_enabled) if host_sku is not None: - pulumi.set(__self__, "host_sku", host_sku) + _setter("host_sku", host_sku) @property @pulumi.getter(name="computeIsolationEnabled") @@ -3613,14 +4962,39 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the key vault key. :param pulumi.Input[str] key_vault_managed_identity_id: This is the resource ID of Managed Identity used to access the key vault. """ + InteractiveQueryClusterDiskEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption_algorithm=encryption_algorithm, + encryption_at_host_enabled=encryption_at_host_enabled, + key_vault_key_id=key_vault_key_id, + key_vault_managed_identity_id=key_vault_managed_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption_algorithm: Optional[pulumi.Input[str]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + key_vault_managed_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encryption_algorithm is None and 'encryptionAlgorithm' in kwargs: + encryption_algorithm = kwargs['encryptionAlgorithm'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_managed_identity_id is None and 'keyVaultManagedIdentityId' in kwargs: + key_vault_managed_identity_id = kwargs['keyVaultManagedIdentityId'] + if encryption_algorithm is not None: - pulumi.set(__self__, "encryption_algorithm", encryption_algorithm) + _setter("encryption_algorithm", encryption_algorithm) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if key_vault_managed_identity_id is not None: - pulumi.set(__self__, "key_vault_managed_identity_id", key_vault_managed_identity_id) + _setter("key_vault_managed_identity_id", key_vault_managed_identity_id) @property @pulumi.getter(name="encryptionAlgorithm") @@ -3680,8 +5054,29 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The workspace ID of the log analytics extension. :param pulumi.Input[str] primary_key: The workspace key of the log analytics extension. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + InteractiveQueryClusterExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -3719,8 +5114,25 @@ def __init__(__self__, *, > **NOTE:** This password must be different from the one used for the `head_node`, `worker_node` and `zookeeper_node` roles. :param pulumi.Input[str] username: The username used for the Ambari Portal. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + InteractiveQueryClusterGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -3760,12 +5172,27 @@ def __init__(__self__, *, :param pulumi.Input['InteractiveQueryClusterMetastoresHiveArgs'] hive: A `hive` block as defined below. :param pulumi.Input['InteractiveQueryClusterMetastoresOozieArgs'] oozie: An `oozie` block as defined below. """ + InteractiveQueryClusterMetastoresArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ambari=ambari, + hive=hive, + oozie=oozie, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ambari: Optional[pulumi.Input['InteractiveQueryClusterMetastoresAmbariArgs']] = None, + hive: Optional[pulumi.Input['InteractiveQueryClusterMetastoresHiveArgs']] = None, + oozie: Optional[pulumi.Input['InteractiveQueryClusterMetastoresOozieArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ambari is not None: - pulumi.set(__self__, "ambari", ambari) + _setter("ambari", ambari) if hive is not None: - pulumi.set(__self__, "hive", hive) + _setter("hive", hive) if oozie is not None: - pulumi.set(__self__, "oozie", oozie) + _setter("oozie", oozie) @property @pulumi.getter @@ -3817,10 +5244,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Ambari metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Ambari metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + InteractiveQueryClusterMetastoresAmbariArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -3884,10 +5338,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Hive metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Hive metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + InteractiveQueryClusterMetastoresHiveArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -3951,10 +5432,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Oozie metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Oozie metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + InteractiveQueryClusterMetastoresOozieArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -4014,8 +5522,29 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The Operations Management Suite (OMS) workspace ID. :param pulumi.Input[str] primary_key: The Operations Management Suite (OMS) workspace key. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + InteractiveQueryClusterMonitorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -4053,10 +5582,27 @@ def __init__(__self__, *, > **NOTE:** To enabled the private link the `connection_direction` must be set to `Outbound`. :param pulumi.Input[bool] private_link_enabled: Is the private link enabled? Possible values include `True` or `False`. Defaults to `False`. Changing this forces a new resource to be created. """ + InteractiveQueryClusterNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_direction=connection_direction, + private_link_enabled=private_link_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_direction: Optional[pulumi.Input[str]] = None, + private_link_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_direction is None and 'connectionDirection' in kwargs: + connection_direction = kwargs['connectionDirection'] + if private_link_enabled is None and 'privateLinkEnabled' in kwargs: + private_link_enabled = kwargs['privateLinkEnabled'] + if connection_direction is not None: - pulumi.set(__self__, "connection_direction", connection_direction) + _setter("connection_direction", connection_direction) if private_link_enabled is not None: - pulumi.set(__self__, "private_link_enabled", private_link_enabled) + _setter("private_link_enabled", private_link_enabled) @property @pulumi.getter(name="connectionDirection") @@ -4096,9 +5642,36 @@ def __init__(__self__, *, :param pulumi.Input['InteractiveQueryClusterRolesWorkerNodeArgs'] worker_node: A `worker_node` block as defined below. :param pulumi.Input['InteractiveQueryClusterRolesZookeeperNodeArgs'] zookeeper_node: A `zookeeper_node` block as defined below. """ - pulumi.set(__self__, "head_node", head_node) - pulumi.set(__self__, "worker_node", worker_node) - pulumi.set(__self__, "zookeeper_node", zookeeper_node) + InteractiveQueryClusterRolesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + head_node=head_node, + worker_node=worker_node, + zookeeper_node=zookeeper_node, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + head_node: Optional[pulumi.Input['InteractiveQueryClusterRolesHeadNodeArgs']] = None, + worker_node: Optional[pulumi.Input['InteractiveQueryClusterRolesWorkerNodeArgs']] = None, + zookeeper_node: Optional[pulumi.Input['InteractiveQueryClusterRolesZookeeperNodeArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if head_node is None and 'headNode' in kwargs: + head_node = kwargs['headNode'] + if head_node is None: + raise TypeError("Missing 'head_node' argument") + if worker_node is None and 'workerNode' in kwargs: + worker_node = kwargs['workerNode'] + if worker_node is None: + raise TypeError("Missing 'worker_node' argument") + if zookeeper_node is None and 'zookeeperNode' in kwargs: + zookeeper_node = kwargs['zookeeperNode'] + if zookeeper_node is None: + raise TypeError("Missing 'zookeeper_node' argument") + + _setter("head_node", head_node) + _setter("worker_node", worker_node) + _setter("zookeeper_node", zookeeper_node) @property @pulumi.getter(name="headNode") @@ -4162,18 +5735,55 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + InteractiveQueryClusterRolesHeadNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['InteractiveQueryClusterRolesHeadNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -4277,10 +5887,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + InteractiveQueryClusterRolesHeadNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -4348,21 +5977,66 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + InteractiveQueryClusterRolesWorkerNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_instance_count=target_instance_count, + username=username, + vm_size=vm_size, + autoscale=autoscale, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_instance_count: Optional[pulumi.Input[int]] = None, + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + autoscale: Optional[pulumi.Input['InteractiveQueryClusterRolesWorkerNodeAutoscaleArgs']] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['InteractiveQueryClusterRolesWorkerNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("target_instance_count", target_instance_count) + _setter("username", username) + _setter("vm_size", vm_size) if autoscale is not None: - pulumi.set(__self__, "autoscale", autoscale) + _setter("autoscale", autoscale) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="targetInstanceCount") @@ -4487,13 +6161,26 @@ def __init__(__self__, *, """ :param pulumi.Input['InteractiveQueryClusterRolesWorkerNodeAutoscaleRecurrenceArgs'] recurrence: A `recurrence` block as defined below. """ + InteractiveQueryClusterRolesWorkerNodeAutoscaleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + recurrence=recurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input['InteractiveQueryClusterRolesWorkerNodeAutoscaleCapacityArgs']] = None, + recurrence: Optional[pulumi.Input['InteractiveQueryClusterRolesWorkerNodeAutoscaleRecurrenceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is not None: warnings.warn("""HDInsight interactive query clusters can no longer be configured through `autoscale.0.capacity`. Use `autoscale.0.recurrence` instead.""", DeprecationWarning) pulumi.log.warn("""capacity is deprecated: HDInsight interactive query clusters can no longer be configured through `autoscale.0.capacity`. Use `autoscale.0.recurrence` instead.""") if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) @property @pulumi.getter @@ -4525,8 +6212,29 @@ class InteractiveQueryClusterRolesWorkerNodeAutoscaleCapacityArgs: def __init__(__self__, *, max_instance_count: pulumi.Input[int], min_instance_count: pulumi.Input[int]): - pulumi.set(__self__, "max_instance_count", max_instance_count) - pulumi.set(__self__, "min_instance_count", min_instance_count) + InteractiveQueryClusterRolesWorkerNodeAutoscaleCapacityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_instance_count=max_instance_count, + min_instance_count=min_instance_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_instance_count: Optional[pulumi.Input[int]] = None, + min_instance_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_instance_count is None and 'maxInstanceCount' in kwargs: + max_instance_count = kwargs['maxInstanceCount'] + if max_instance_count is None: + raise TypeError("Missing 'max_instance_count' argument") + if min_instance_count is None and 'minInstanceCount' in kwargs: + min_instance_count = kwargs['minInstanceCount'] + if min_instance_count is None: + raise TypeError("Missing 'min_instance_count' argument") + + _setter("max_instance_count", max_instance_count) + _setter("min_instance_count", min_instance_count) @property @pulumi.getter(name="maxInstanceCount") @@ -4556,8 +6264,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['InteractiveQueryClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs']]] schedules: A list of `schedule` blocks as defined below. :param pulumi.Input[str] timezone: The time zone for the autoscale schedule times. """ - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "timezone", timezone) + InteractiveQueryClusterRolesWorkerNodeAutoscaleRecurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + schedules=schedules, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schedules: Optional[pulumi.Input[Sequence[pulumi.Input['InteractiveQueryClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs']]]] = None, + timezone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if timezone is None: + raise TypeError("Missing 'timezone' argument") + + _setter("schedules", schedules) + _setter("timezone", timezone) @property @pulumi.getter @@ -4595,9 +6320,32 @@ def __init__(__self__, *, :param pulumi.Input[int] target_instance_count: The number of worker nodes to autoscale at the specified time. :param pulumi.Input[str] time: The time of day to perform the autoscale in 24hour format. """ - pulumi.set(__self__, "days", days) - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "time", time) + InteractiveQueryClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + target_instance_count=target_instance_count, + time=time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + target_instance_count: Optional[pulumi.Input[int]] = None, + time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if time is None: + raise TypeError("Missing 'time' argument") + + _setter("days", days) + _setter("target_instance_count", target_instance_count) + _setter("time", time) @property @pulumi.getter @@ -4647,10 +6395,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + InteractiveQueryClusterRolesWorkerNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -4712,18 +6479,55 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + InteractiveQueryClusterRolesZookeeperNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['InteractiveQueryClusterRolesZookeeperNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -4825,10 +6629,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + InteractiveQueryClusterRolesZookeeperNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -4886,14 +6709,63 @@ def __init__(__self__, *, :param pulumi.Input[str] msi_resource_id: The User Assigned Identity for the HDInsight Cluster. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] cluster_users_group_dns: A list of the distinguished names for the cluster user groups. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "aadds_resource_id", aadds_resource_id) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "domain_user_password", domain_user_password) - pulumi.set(__self__, "domain_username", domain_username) - pulumi.set(__self__, "ldaps_urls", ldaps_urls) - pulumi.set(__self__, "msi_resource_id", msi_resource_id) + InteractiveQueryClusterSecurityProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aadds_resource_id=aadds_resource_id, + domain_name=domain_name, + domain_user_password=domain_user_password, + domain_username=domain_username, + ldaps_urls=ldaps_urls, + msi_resource_id=msi_resource_id, + cluster_users_group_dns=cluster_users_group_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aadds_resource_id: Optional[pulumi.Input[str]] = None, + domain_name: Optional[pulumi.Input[str]] = None, + domain_user_password: Optional[pulumi.Input[str]] = None, + domain_username: Optional[pulumi.Input[str]] = None, + ldaps_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + msi_resource_id: Optional[pulumi.Input[str]] = None, + cluster_users_group_dns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aadds_resource_id is None and 'aaddsResourceId' in kwargs: + aadds_resource_id = kwargs['aaddsResourceId'] + if aadds_resource_id is None: + raise TypeError("Missing 'aadds_resource_id' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_user_password is None and 'domainUserPassword' in kwargs: + domain_user_password = kwargs['domainUserPassword'] + if domain_user_password is None: + raise TypeError("Missing 'domain_user_password' argument") + if domain_username is None and 'domainUsername' in kwargs: + domain_username = kwargs['domainUsername'] + if domain_username is None: + raise TypeError("Missing 'domain_username' argument") + if ldaps_urls is None and 'ldapsUrls' in kwargs: + ldaps_urls = kwargs['ldapsUrls'] + if ldaps_urls is None: + raise TypeError("Missing 'ldaps_urls' argument") + if msi_resource_id is None and 'msiResourceId' in kwargs: + msi_resource_id = kwargs['msiResourceId'] + if msi_resource_id is None: + raise TypeError("Missing 'msi_resource_id' argument") + if cluster_users_group_dns is None and 'clusterUsersGroupDns' in kwargs: + cluster_users_group_dns = kwargs['clusterUsersGroupDns'] + + _setter("aadds_resource_id", aadds_resource_id) + _setter("domain_name", domain_name) + _setter("domain_user_password", domain_user_password) + _setter("domain_username", domain_username) + _setter("ldaps_urls", ldaps_urls) + _setter("msi_resource_id", msi_resource_id) if cluster_users_group_dns is not None: - pulumi.set(__self__, "cluster_users_group_dns", cluster_users_group_dns) + _setter("cluster_users_group_dns", cluster_users_group_dns) @property @pulumi.getter(name="aaddsResourceId") @@ -4997,11 +6869,42 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param pulumi.Input[str] storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "storage_container_id", storage_container_id) + InteractiveQueryClusterStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_default=is_default, + storage_account_key=storage_account_key, + storage_container_id=storage_container_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_default: Optional[pulumi.Input[bool]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_container_id: Optional[pulumi.Input[str]] = None, + storage_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + + _setter("is_default", is_default) + _setter("storage_account_key", storage_account_key) + _setter("storage_container_id", storage_container_id) if storage_resource_id is not None: - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="isDefault") @@ -5073,10 +6976,43 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param pulumi.Input[str] storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "filesystem_id", filesystem_id) - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "managed_identity_resource_id", managed_identity_resource_id) - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + InteractiveQueryClusterStorageAccountGen2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + filesystem_id=filesystem_id, + is_default=is_default, + managed_identity_resource_id=managed_identity_resource_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filesystem_id: Optional[pulumi.Input[str]] = None, + is_default: Optional[pulumi.Input[bool]] = None, + managed_identity_resource_id: Optional[pulumi.Input[str]] = None, + storage_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filesystem_id is None and 'filesystemId' in kwargs: + filesystem_id = kwargs['filesystemId'] + if filesystem_id is None: + raise TypeError("Missing 'filesystem_id' argument") + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if managed_identity_resource_id is None and 'managedIdentityResourceId' in kwargs: + managed_identity_resource_id = kwargs['managedIdentityResourceId'] + if managed_identity_resource_id is None: + raise TypeError("Missing 'managed_identity_resource_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + if storage_resource_id is None: + raise TypeError("Missing 'storage_resource_id' argument") + + _setter("filesystem_id", filesystem_id) + _setter("is_default", is_default) + _setter("managed_identity_resource_id", managed_identity_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="filesystemId") @@ -5138,7 +7074,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] kafka: The version of Kafka which should be used for this HDInsight Kafka Cluster. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "kafka", kafka) + KafkaClusterComponentVersionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kafka=kafka, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kafka: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kafka is None: + raise TypeError("Missing 'kafka' argument") + + _setter("kafka", kafka) @property @pulumi.getter @@ -5162,10 +7111,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] compute_isolation_enabled: This field indicates whether enable compute isolation or not. Possible values are `true` or `false`. :param pulumi.Input[str] host_sku: The name of the host SKU. """ + KafkaClusterComputeIsolationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_isolation_enabled=compute_isolation_enabled, + host_sku=host_sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_isolation_enabled: Optional[pulumi.Input[bool]] = None, + host_sku: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_isolation_enabled is None and 'computeIsolationEnabled' in kwargs: + compute_isolation_enabled = kwargs['computeIsolationEnabled'] + if host_sku is None and 'hostSku' in kwargs: + host_sku = kwargs['hostSku'] + if compute_isolation_enabled is not None: - pulumi.set(__self__, "compute_isolation_enabled", compute_isolation_enabled) + _setter("compute_isolation_enabled", compute_isolation_enabled) if host_sku is not None: - pulumi.set(__self__, "host_sku", host_sku) + _setter("host_sku", host_sku) @property @pulumi.getter(name="computeIsolationEnabled") @@ -5205,14 +7171,39 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the key vault key. :param pulumi.Input[str] key_vault_managed_identity_id: This is the resource ID of Managed Identity used to access the key vault. """ + KafkaClusterDiskEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption_algorithm=encryption_algorithm, + encryption_at_host_enabled=encryption_at_host_enabled, + key_vault_key_id=key_vault_key_id, + key_vault_managed_identity_id=key_vault_managed_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption_algorithm: Optional[pulumi.Input[str]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + key_vault_managed_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encryption_algorithm is None and 'encryptionAlgorithm' in kwargs: + encryption_algorithm = kwargs['encryptionAlgorithm'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_managed_identity_id is None and 'keyVaultManagedIdentityId' in kwargs: + key_vault_managed_identity_id = kwargs['keyVaultManagedIdentityId'] + if encryption_algorithm is not None: - pulumi.set(__self__, "encryption_algorithm", encryption_algorithm) + _setter("encryption_algorithm", encryption_algorithm) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if key_vault_managed_identity_id is not None: - pulumi.set(__self__, "key_vault_managed_identity_id", key_vault_managed_identity_id) + _setter("key_vault_managed_identity_id", key_vault_managed_identity_id) @property @pulumi.getter(name="encryptionAlgorithm") @@ -5272,8 +7263,29 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The workspace ID of the log analytics extension. :param pulumi.Input[str] primary_key: The workspace key of the log analytics extension. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + KafkaClusterExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -5311,8 +7323,25 @@ def __init__(__self__, *, > **NOTE:** This password must be different from the one used for the `head_node`, `worker_node` and `zookeeper_node` roles. :param pulumi.Input[str] username: The username used for the Ambari Portal. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + KafkaClusterGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -5352,12 +7381,27 @@ def __init__(__self__, *, :param pulumi.Input['KafkaClusterMetastoresHiveArgs'] hive: A `hive` block as defined below. :param pulumi.Input['KafkaClusterMetastoresOozieArgs'] oozie: An `oozie` block as defined below. """ + KafkaClusterMetastoresArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ambari=ambari, + hive=hive, + oozie=oozie, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ambari: Optional[pulumi.Input['KafkaClusterMetastoresAmbariArgs']] = None, + hive: Optional[pulumi.Input['KafkaClusterMetastoresHiveArgs']] = None, + oozie: Optional[pulumi.Input['KafkaClusterMetastoresOozieArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ambari is not None: - pulumi.set(__self__, "ambari", ambari) + _setter("ambari", ambari) if hive is not None: - pulumi.set(__self__, "hive", hive) + _setter("hive", hive) if oozie is not None: - pulumi.set(__self__, "oozie", oozie) + _setter("oozie", oozie) @property @pulumi.getter @@ -5409,10 +7453,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Ambari metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Ambari metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + KafkaClusterMetastoresAmbariArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -5476,10 +7547,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Hive metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Hive metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + KafkaClusterMetastoresHiveArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -5543,10 +7641,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Oozie metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Oozie metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + KafkaClusterMetastoresOozieArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -5606,8 +7731,29 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The Operations Management Suite (OMS) workspace ID. :param pulumi.Input[str] primary_key: The Operations Management Suite (OMS) workspace key. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + KafkaClusterMonitorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -5645,10 +7791,27 @@ def __init__(__self__, *, > **NOTE:** To enabled the private link the `connection_direction` must be set to `Outbound`. :param pulumi.Input[bool] private_link_enabled: Is the private link enabled? Possible values include `True` or `False`. Defaults to `False`. Changing this forces a new resource to be created. """ + KafkaClusterNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_direction=connection_direction, + private_link_enabled=private_link_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_direction: Optional[pulumi.Input[str]] = None, + private_link_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_direction is None and 'connectionDirection' in kwargs: + connection_direction = kwargs['connectionDirection'] + if private_link_enabled is None and 'privateLinkEnabled' in kwargs: + private_link_enabled = kwargs['privateLinkEnabled'] + if connection_direction is not None: - pulumi.set(__self__, "connection_direction", connection_direction) + _setter("connection_direction", connection_direction) if private_link_enabled is not None: - pulumi.set(__self__, "private_link_enabled", private_link_enabled) + _setter("private_link_enabled", private_link_enabled) @property @pulumi.getter(name="connectionDirection") @@ -5688,8 +7851,29 @@ def __init__(__self__, *, > **Note:** The `security_group_name` property will be Required in version 3.0 of the AzureRM Provider. """ - pulumi.set(__self__, "security_group_id", security_group_id) - pulumi.set(__self__, "security_group_name", security_group_name) + KafkaClusterRestProxyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + security_group_id=security_group_id, + security_group_name=security_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + security_group_id: Optional[pulumi.Input[str]] = None, + security_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if security_group_id is None and 'securityGroupId' in kwargs: + security_group_id = kwargs['securityGroupId'] + if security_group_id is None: + raise TypeError("Missing 'security_group_id' argument") + if security_group_name is None and 'securityGroupName' in kwargs: + security_group_name = kwargs['securityGroupName'] + if security_group_name is None: + raise TypeError("Missing 'security_group_name' argument") + + _setter("security_group_id", security_group_id) + _setter("security_group_name", security_group_name) @property @pulumi.getter(name="securityGroupId") @@ -5733,11 +7917,42 @@ def __init__(__self__, *, > **Note:** This property has been deprecated and will be removed in version 4.0. """ - pulumi.set(__self__, "head_node", head_node) - pulumi.set(__self__, "worker_node", worker_node) - pulumi.set(__self__, "zookeeper_node", zookeeper_node) + KafkaClusterRolesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + head_node=head_node, + worker_node=worker_node, + zookeeper_node=zookeeper_node, + kafka_management_node=kafka_management_node, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + head_node: Optional[pulumi.Input['KafkaClusterRolesHeadNodeArgs']] = None, + worker_node: Optional[pulumi.Input['KafkaClusterRolesWorkerNodeArgs']] = None, + zookeeper_node: Optional[pulumi.Input['KafkaClusterRolesZookeeperNodeArgs']] = None, + kafka_management_node: Optional[pulumi.Input['KafkaClusterRolesKafkaManagementNodeArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if head_node is None and 'headNode' in kwargs: + head_node = kwargs['headNode'] + if head_node is None: + raise TypeError("Missing 'head_node' argument") + if worker_node is None and 'workerNode' in kwargs: + worker_node = kwargs['workerNode'] + if worker_node is None: + raise TypeError("Missing 'worker_node' argument") + if zookeeper_node is None and 'zookeeperNode' in kwargs: + zookeeper_node = kwargs['zookeeperNode'] + if zookeeper_node is None: + raise TypeError("Missing 'zookeeper_node' argument") + if kafka_management_node is None and 'kafkaManagementNode' in kwargs: + kafka_management_node = kwargs['kafkaManagementNode'] + + _setter("head_node", head_node) + _setter("worker_node", worker_node) + _setter("zookeeper_node", zookeeper_node) if kafka_management_node is not None: - pulumi.set(__self__, "kafka_management_node", kafka_management_node) + _setter("kafka_management_node", kafka_management_node) @property @pulumi.getter(name="headNode") @@ -5813,18 +8028,55 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + KafkaClusterRolesHeadNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['KafkaClusterRolesHeadNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -5926,10 +8178,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + KafkaClusterRolesHeadNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -5991,18 +8262,55 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Kafka Management Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Kafka Management Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + KafkaClusterRolesKafkaManagementNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['KafkaClusterRolesKafkaManagementNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -6104,10 +8412,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + KafkaClusterRolesKafkaManagementNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -6173,20 +8500,69 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "number_of_disks_per_node", number_of_disks_per_node) - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + KafkaClusterRolesWorkerNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + number_of_disks_per_node=number_of_disks_per_node, + target_instance_count=target_instance_count, + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + number_of_disks_per_node: Optional[pulumi.Input[int]] = None, + target_instance_count: Optional[pulumi.Input[int]] = None, + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['KafkaClusterRolesWorkerNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if number_of_disks_per_node is None and 'numberOfDisksPerNode' in kwargs: + number_of_disks_per_node = kwargs['numberOfDisksPerNode'] + if number_of_disks_per_node is None: + raise TypeError("Missing 'number_of_disks_per_node' argument") + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("number_of_disks_per_node", number_of_disks_per_node) + _setter("target_instance_count", target_instance_count) + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="numberOfDisksPerNode") @@ -6312,10 +8688,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + KafkaClusterRolesWorkerNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -6377,18 +8772,55 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + KafkaClusterRolesZookeeperNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['KafkaClusterRolesZookeeperNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -6490,10 +8922,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + KafkaClusterRolesZookeeperNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -6551,14 +9002,63 @@ def __init__(__self__, *, :param pulumi.Input[str] msi_resource_id: The User Assigned Identity for the HDInsight Cluster. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] cluster_users_group_dns: A list of the distinguished names for the cluster user groups. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "aadds_resource_id", aadds_resource_id) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "domain_user_password", domain_user_password) - pulumi.set(__self__, "domain_username", domain_username) - pulumi.set(__self__, "ldaps_urls", ldaps_urls) - pulumi.set(__self__, "msi_resource_id", msi_resource_id) + KafkaClusterSecurityProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aadds_resource_id=aadds_resource_id, + domain_name=domain_name, + domain_user_password=domain_user_password, + domain_username=domain_username, + ldaps_urls=ldaps_urls, + msi_resource_id=msi_resource_id, + cluster_users_group_dns=cluster_users_group_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aadds_resource_id: Optional[pulumi.Input[str]] = None, + domain_name: Optional[pulumi.Input[str]] = None, + domain_user_password: Optional[pulumi.Input[str]] = None, + domain_username: Optional[pulumi.Input[str]] = None, + ldaps_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + msi_resource_id: Optional[pulumi.Input[str]] = None, + cluster_users_group_dns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aadds_resource_id is None and 'aaddsResourceId' in kwargs: + aadds_resource_id = kwargs['aaddsResourceId'] + if aadds_resource_id is None: + raise TypeError("Missing 'aadds_resource_id' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_user_password is None and 'domainUserPassword' in kwargs: + domain_user_password = kwargs['domainUserPassword'] + if domain_user_password is None: + raise TypeError("Missing 'domain_user_password' argument") + if domain_username is None and 'domainUsername' in kwargs: + domain_username = kwargs['domainUsername'] + if domain_username is None: + raise TypeError("Missing 'domain_username' argument") + if ldaps_urls is None and 'ldapsUrls' in kwargs: + ldaps_urls = kwargs['ldapsUrls'] + if ldaps_urls is None: + raise TypeError("Missing 'ldaps_urls' argument") + if msi_resource_id is None and 'msiResourceId' in kwargs: + msi_resource_id = kwargs['msiResourceId'] + if msi_resource_id is None: + raise TypeError("Missing 'msi_resource_id' argument") + if cluster_users_group_dns is None and 'clusterUsersGroupDns' in kwargs: + cluster_users_group_dns = kwargs['clusterUsersGroupDns'] + + _setter("aadds_resource_id", aadds_resource_id) + _setter("domain_name", domain_name) + _setter("domain_user_password", domain_user_password) + _setter("domain_username", domain_username) + _setter("ldaps_urls", ldaps_urls) + _setter("msi_resource_id", msi_resource_id) if cluster_users_group_dns is not None: - pulumi.set(__self__, "cluster_users_group_dns", cluster_users_group_dns) + _setter("cluster_users_group_dns", cluster_users_group_dns) @property @pulumi.getter(name="aaddsResourceId") @@ -6662,11 +9162,42 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param pulumi.Input[str] storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "storage_container_id", storage_container_id) + KafkaClusterStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_default=is_default, + storage_account_key=storage_account_key, + storage_container_id=storage_container_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_default: Optional[pulumi.Input[bool]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_container_id: Optional[pulumi.Input[str]] = None, + storage_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + + _setter("is_default", is_default) + _setter("storage_account_key", storage_account_key) + _setter("storage_container_id", storage_container_id) if storage_resource_id is not None: - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="isDefault") @@ -6738,10 +9269,43 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param pulumi.Input[str] storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "filesystem_id", filesystem_id) - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "managed_identity_resource_id", managed_identity_resource_id) - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + KafkaClusterStorageAccountGen2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + filesystem_id=filesystem_id, + is_default=is_default, + managed_identity_resource_id=managed_identity_resource_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filesystem_id: Optional[pulumi.Input[str]] = None, + is_default: Optional[pulumi.Input[bool]] = None, + managed_identity_resource_id: Optional[pulumi.Input[str]] = None, + storage_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filesystem_id is None and 'filesystemId' in kwargs: + filesystem_id = kwargs['filesystemId'] + if filesystem_id is None: + raise TypeError("Missing 'filesystem_id' argument") + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if managed_identity_resource_id is None and 'managedIdentityResourceId' in kwargs: + managed_identity_resource_id = kwargs['managedIdentityResourceId'] + if managed_identity_resource_id is None: + raise TypeError("Missing 'managed_identity_resource_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + if storage_resource_id is None: + raise TypeError("Missing 'storage_resource_id' argument") + + _setter("filesystem_id", filesystem_id) + _setter("is_default", is_default) + _setter("managed_identity_resource_id", managed_identity_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="filesystemId") @@ -6803,7 +9367,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] spark: The version of Spark which should be used for this HDInsight Spark Cluster. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "spark", spark) + SparkClusterComponentVersionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + spark=spark, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spark: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spark is None: + raise TypeError("Missing 'spark' argument") + + _setter("spark", spark) @property @pulumi.getter @@ -6827,10 +9404,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] compute_isolation_enabled: This field indicates whether enable compute isolation or not. Possible values are `true` or `false`. :param pulumi.Input[str] host_sku: The name of the host SKU. """ + SparkClusterComputeIsolationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_isolation_enabled=compute_isolation_enabled, + host_sku=host_sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_isolation_enabled: Optional[pulumi.Input[bool]] = None, + host_sku: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_isolation_enabled is None and 'computeIsolationEnabled' in kwargs: + compute_isolation_enabled = kwargs['computeIsolationEnabled'] + if host_sku is None and 'hostSku' in kwargs: + host_sku = kwargs['hostSku'] + if compute_isolation_enabled is not None: - pulumi.set(__self__, "compute_isolation_enabled", compute_isolation_enabled) + _setter("compute_isolation_enabled", compute_isolation_enabled) if host_sku is not None: - pulumi.set(__self__, "host_sku", host_sku) + _setter("host_sku", host_sku) @property @pulumi.getter(name="computeIsolationEnabled") @@ -6870,14 +9464,39 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the key vault key. :param pulumi.Input[str] key_vault_managed_identity_id: This is the resource ID of Managed Identity used to access the key vault. """ + SparkClusterDiskEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption_algorithm=encryption_algorithm, + encryption_at_host_enabled=encryption_at_host_enabled, + key_vault_key_id=key_vault_key_id, + key_vault_managed_identity_id=key_vault_managed_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption_algorithm: Optional[pulumi.Input[str]] = None, + encryption_at_host_enabled: Optional[pulumi.Input[bool]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + key_vault_managed_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encryption_algorithm is None and 'encryptionAlgorithm' in kwargs: + encryption_algorithm = kwargs['encryptionAlgorithm'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_managed_identity_id is None and 'keyVaultManagedIdentityId' in kwargs: + key_vault_managed_identity_id = kwargs['keyVaultManagedIdentityId'] + if encryption_algorithm is not None: - pulumi.set(__self__, "encryption_algorithm", encryption_algorithm) + _setter("encryption_algorithm", encryption_algorithm) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if key_vault_managed_identity_id is not None: - pulumi.set(__self__, "key_vault_managed_identity_id", key_vault_managed_identity_id) + _setter("key_vault_managed_identity_id", key_vault_managed_identity_id) @property @pulumi.getter(name="encryptionAlgorithm") @@ -6937,8 +9556,29 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The workspace ID of the log analytics extension. :param pulumi.Input[str] primary_key: The workspace key of the log analytics extension. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + SparkClusterExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -6976,8 +9616,25 @@ def __init__(__self__, *, > **NOTE:** This password must be different from the one used for the `head_node`, `worker_node` and `zookeeper_node` roles. :param pulumi.Input[str] username: The username used for the Ambari Portal. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + SparkClusterGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -7017,12 +9674,27 @@ def __init__(__self__, *, :param pulumi.Input['SparkClusterMetastoresHiveArgs'] hive: A `hive` block as defined below. :param pulumi.Input['SparkClusterMetastoresOozieArgs'] oozie: An `oozie` block as defined below. """ + SparkClusterMetastoresArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ambari=ambari, + hive=hive, + oozie=oozie, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ambari: Optional[pulumi.Input['SparkClusterMetastoresAmbariArgs']] = None, + hive: Optional[pulumi.Input['SparkClusterMetastoresHiveArgs']] = None, + oozie: Optional[pulumi.Input['SparkClusterMetastoresOozieArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ambari is not None: - pulumi.set(__self__, "ambari", ambari) + _setter("ambari", ambari) if hive is not None: - pulumi.set(__self__, "hive", hive) + _setter("hive", hive) if oozie is not None: - pulumi.set(__self__, "oozie", oozie) + _setter("oozie", oozie) @property @pulumi.getter @@ -7074,10 +9746,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Ambari metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Ambari metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + SparkClusterMetastoresAmbariArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -7141,10 +9840,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Hive metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Hive metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + SparkClusterMetastoresHiveArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -7208,10 +9934,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Oozie metastore. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The external Oozie metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + SparkClusterMetastoresOozieArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -7271,8 +10024,29 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The Operations Management Suite (OMS) workspace ID. :param pulumi.Input[str] primary_key: The Operations Management Suite (OMS) workspace key. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + SparkClusterMonitorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -7310,10 +10084,27 @@ def __init__(__self__, *, > **NOTE:** To enabled the private link the `connection_direction` must be set to `Outbound`. :param pulumi.Input[bool] private_link_enabled: Is the private link enabled? Possible values include `True` or `False`. Defaults to `False`. Changing this forces a new resource to be created. """ + SparkClusterNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_direction=connection_direction, + private_link_enabled=private_link_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_direction: Optional[pulumi.Input[str]] = None, + private_link_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_direction is None and 'connectionDirection' in kwargs: + connection_direction = kwargs['connectionDirection'] + if private_link_enabled is None and 'privateLinkEnabled' in kwargs: + private_link_enabled = kwargs['privateLinkEnabled'] + if connection_direction is not None: - pulumi.set(__self__, "connection_direction", connection_direction) + _setter("connection_direction", connection_direction) if private_link_enabled is not None: - pulumi.set(__self__, "private_link_enabled", private_link_enabled) + _setter("private_link_enabled", private_link_enabled) @property @pulumi.getter(name="connectionDirection") @@ -7353,9 +10144,36 @@ def __init__(__self__, *, :param pulumi.Input['SparkClusterRolesWorkerNodeArgs'] worker_node: A `worker_node` block as defined below. :param pulumi.Input['SparkClusterRolesZookeeperNodeArgs'] zookeeper_node: A `zookeeper_node` block as defined below. """ - pulumi.set(__self__, "head_node", head_node) - pulumi.set(__self__, "worker_node", worker_node) - pulumi.set(__self__, "zookeeper_node", zookeeper_node) + SparkClusterRolesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + head_node=head_node, + worker_node=worker_node, + zookeeper_node=zookeeper_node, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + head_node: Optional[pulumi.Input['SparkClusterRolesHeadNodeArgs']] = None, + worker_node: Optional[pulumi.Input['SparkClusterRolesWorkerNodeArgs']] = None, + zookeeper_node: Optional[pulumi.Input['SparkClusterRolesZookeeperNodeArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if head_node is None and 'headNode' in kwargs: + head_node = kwargs['headNode'] + if head_node is None: + raise TypeError("Missing 'head_node' argument") + if worker_node is None and 'workerNode' in kwargs: + worker_node = kwargs['workerNode'] + if worker_node is None: + raise TypeError("Missing 'worker_node' argument") + if zookeeper_node is None and 'zookeeperNode' in kwargs: + zookeeper_node = kwargs['zookeeperNode'] + if zookeeper_node is None: + raise TypeError("Missing 'zookeeper_node' argument") + + _setter("head_node", head_node) + _setter("worker_node", worker_node) + _setter("zookeeper_node", zookeeper_node) @property @pulumi.getter(name="headNode") @@ -7417,18 +10235,55 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + SparkClusterRolesHeadNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['SparkClusterRolesHeadNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -7530,10 +10385,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + SparkClusterRolesHeadNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -7599,21 +10473,66 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + SparkClusterRolesWorkerNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_instance_count=target_instance_count, + username=username, + vm_size=vm_size, + autoscale=autoscale, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_instance_count: Optional[pulumi.Input[int]] = None, + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + autoscale: Optional[pulumi.Input['SparkClusterRolesWorkerNodeAutoscaleArgs']] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['SparkClusterRolesWorkerNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("target_instance_count", target_instance_count) + _setter("username", username) + _setter("vm_size", vm_size) if autoscale is not None: - pulumi.set(__self__, "autoscale", autoscale) + _setter("autoscale", autoscale) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="targetInstanceCount") @@ -7739,10 +10658,23 @@ def __init__(__self__, *, > **NOTE:** Either a `capacity` or `recurrence` block must be specified - but not both. """ + SparkClusterRolesWorkerNodeAutoscaleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + recurrence=recurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input['SparkClusterRolesWorkerNodeAutoscaleCapacityArgs']] = None, + recurrence: Optional[pulumi.Input['SparkClusterRolesWorkerNodeAutoscaleRecurrenceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) @property @pulumi.getter @@ -7780,8 +10712,29 @@ def __init__(__self__, *, :param pulumi.Input[int] max_instance_count: The maximum number of worker nodes to autoscale to based on the cluster's activity. :param pulumi.Input[int] min_instance_count: The minimum number of worker nodes to autoscale to based on the cluster's activity. """ - pulumi.set(__self__, "max_instance_count", max_instance_count) - pulumi.set(__self__, "min_instance_count", min_instance_count) + SparkClusterRolesWorkerNodeAutoscaleCapacityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_instance_count=max_instance_count, + min_instance_count=min_instance_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_instance_count: Optional[pulumi.Input[int]] = None, + min_instance_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_instance_count is None and 'maxInstanceCount' in kwargs: + max_instance_count = kwargs['maxInstanceCount'] + if max_instance_count is None: + raise TypeError("Missing 'max_instance_count' argument") + if min_instance_count is None and 'minInstanceCount' in kwargs: + min_instance_count = kwargs['minInstanceCount'] + if min_instance_count is None: + raise TypeError("Missing 'min_instance_count' argument") + + _setter("max_instance_count", max_instance_count) + _setter("min_instance_count", min_instance_count) @property @pulumi.getter(name="maxInstanceCount") @@ -7817,8 +10770,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['SparkClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs']]] schedules: A list of `schedule` blocks as defined below. :param pulumi.Input[str] timezone: The time zone for the autoscale schedule times. """ - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "timezone", timezone) + SparkClusterRolesWorkerNodeAutoscaleRecurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + schedules=schedules, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schedules: Optional[pulumi.Input[Sequence[pulumi.Input['SparkClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs']]]] = None, + timezone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if timezone is None: + raise TypeError("Missing 'timezone' argument") + + _setter("schedules", schedules) + _setter("timezone", timezone) @property @pulumi.getter @@ -7856,9 +10826,32 @@ def __init__(__self__, *, :param pulumi.Input[int] target_instance_count: The number of worker nodes to autoscale at the specified time. :param pulumi.Input[str] time: The time of day to perform the autoscale in 24hour format. """ - pulumi.set(__self__, "days", days) - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "time", time) + SparkClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + target_instance_count=target_instance_count, + time=time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + target_instance_count: Optional[pulumi.Input[int]] = None, + time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if time is None: + raise TypeError("Missing 'time' argument") + + _setter("days", days) + _setter("target_instance_count", target_instance_count) + _setter("time", time) @property @pulumi.getter @@ -7908,10 +10901,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + SparkClusterRolesWorkerNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -7973,18 +10985,55 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet within the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + SparkClusterRolesZookeeperNodeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + script_actions: Optional[pulumi.Input[Sequence[pulumi.Input['SparkClusterRolesZookeeperNodeScriptActionArgs']]]] = None, + ssh_keys: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -8086,10 +11135,29 @@ def __init__(__self__, *, :param pulumi.Input[str] uri: The URI to the script. :param pulumi.Input[str] parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + SparkClusterRolesZookeeperNodeScriptActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -8147,14 +11215,63 @@ def __init__(__self__, *, :param pulumi.Input[str] msi_resource_id: The User Assigned Identity for the HDInsight Cluster. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] cluster_users_group_dns: A list of the distinguished names for the cluster user groups. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "aadds_resource_id", aadds_resource_id) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "domain_user_password", domain_user_password) - pulumi.set(__self__, "domain_username", domain_username) - pulumi.set(__self__, "ldaps_urls", ldaps_urls) - pulumi.set(__self__, "msi_resource_id", msi_resource_id) + SparkClusterSecurityProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aadds_resource_id=aadds_resource_id, + domain_name=domain_name, + domain_user_password=domain_user_password, + domain_username=domain_username, + ldaps_urls=ldaps_urls, + msi_resource_id=msi_resource_id, + cluster_users_group_dns=cluster_users_group_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aadds_resource_id: Optional[pulumi.Input[str]] = None, + domain_name: Optional[pulumi.Input[str]] = None, + domain_user_password: Optional[pulumi.Input[str]] = None, + domain_username: Optional[pulumi.Input[str]] = None, + ldaps_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + msi_resource_id: Optional[pulumi.Input[str]] = None, + cluster_users_group_dns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aadds_resource_id is None and 'aaddsResourceId' in kwargs: + aadds_resource_id = kwargs['aaddsResourceId'] + if aadds_resource_id is None: + raise TypeError("Missing 'aadds_resource_id' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_user_password is None and 'domainUserPassword' in kwargs: + domain_user_password = kwargs['domainUserPassword'] + if domain_user_password is None: + raise TypeError("Missing 'domain_user_password' argument") + if domain_username is None and 'domainUsername' in kwargs: + domain_username = kwargs['domainUsername'] + if domain_username is None: + raise TypeError("Missing 'domain_username' argument") + if ldaps_urls is None and 'ldapsUrls' in kwargs: + ldaps_urls = kwargs['ldapsUrls'] + if ldaps_urls is None: + raise TypeError("Missing 'ldaps_urls' argument") + if msi_resource_id is None and 'msiResourceId' in kwargs: + msi_resource_id = kwargs['msiResourceId'] + if msi_resource_id is None: + raise TypeError("Missing 'msi_resource_id' argument") + if cluster_users_group_dns is None and 'clusterUsersGroupDns' in kwargs: + cluster_users_group_dns = kwargs['clusterUsersGroupDns'] + + _setter("aadds_resource_id", aadds_resource_id) + _setter("domain_name", domain_name) + _setter("domain_user_password", domain_user_password) + _setter("domain_username", domain_username) + _setter("ldaps_urls", ldaps_urls) + _setter("msi_resource_id", msi_resource_id) if cluster_users_group_dns is not None: - pulumi.set(__self__, "cluster_users_group_dns", cluster_users_group_dns) + _setter("cluster_users_group_dns", cluster_users_group_dns) @property @pulumi.getter(name="aaddsResourceId") @@ -8258,11 +11375,42 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param pulumi.Input[str] storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "storage_container_id", storage_container_id) + SparkClusterStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_default=is_default, + storage_account_key=storage_account_key, + storage_container_id=storage_container_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_default: Optional[pulumi.Input[bool]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_container_id: Optional[pulumi.Input[str]] = None, + storage_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + + _setter("is_default", is_default) + _setter("storage_account_key", storage_account_key) + _setter("storage_container_id", storage_container_id) if storage_resource_id is not None: - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="isDefault") @@ -8334,10 +11482,43 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param pulumi.Input[str] storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "filesystem_id", filesystem_id) - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "managed_identity_resource_id", managed_identity_resource_id) - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + SparkClusterStorageAccountGen2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + filesystem_id=filesystem_id, + is_default=is_default, + managed_identity_resource_id=managed_identity_resource_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filesystem_id: Optional[pulumi.Input[str]] = None, + is_default: Optional[pulumi.Input[bool]] = None, + managed_identity_resource_id: Optional[pulumi.Input[str]] = None, + storage_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filesystem_id is None and 'filesystemId' in kwargs: + filesystem_id = kwargs['filesystemId'] + if filesystem_id is None: + raise TypeError("Missing 'filesystem_id' argument") + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if managed_identity_resource_id is None and 'managedIdentityResourceId' in kwargs: + managed_identity_resource_id = kwargs['managedIdentityResourceId'] + if managed_identity_resource_id is None: + raise TypeError("Missing 'managed_identity_resource_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + if storage_resource_id is None: + raise TypeError("Missing 'storage_resource_id' argument") + + _setter("filesystem_id", filesystem_id) + _setter("is_default", is_default) + _setter("managed_identity_resource_id", managed_identity_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="filesystemId") diff --git a/sdk/python/pulumi_azure/hdinsight/get_cluster.py b/sdk/python/pulumi_azure/hdinsight/get_cluster.py index 3471acdfdc..2c6d483946 100644 --- a/sdk/python/pulumi_azure/hdinsight/get_cluster.py +++ b/sdk/python/pulumi_azure/hdinsight/get_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/hdinsight/h_base_cluster.py b/sdk/python/pulumi_azure/hdinsight/h_base_cluster.py index b8240d0dc8..1c87c98e3d 100644 --- a/sdk/python/pulumi_azure/hdinsight/h_base_cluster.py +++ b/sdk/python/pulumi_azure/hdinsight/h_base_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,38 +59,115 @@ def __init__(__self__, *, > **NOTE:** Starting on June 30, 2020, Azure HDInsight will enforce TLS 1.2 or later versions for all HTTPS connections. For more information, see [Azure HDInsight TLS 1.2 Enforcement](https://azure.microsoft.com/en-us/updates/azure-hdinsight-tls-12-enforcement/). """ - pulumi.set(__self__, "cluster_version", cluster_version) - pulumi.set(__self__, "component_version", component_version) - pulumi.set(__self__, "gateway", gateway) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "roles", roles) - pulumi.set(__self__, "tier", tier) + HBaseClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + component_version=component_version, + gateway=gateway, + resource_group_name=resource_group_name, + roles=roles, + tier=tier, + compute_isolation=compute_isolation, + disk_encryptions=disk_encryptions, + extension=extension, + location=location, + metastores=metastores, + monitor=monitor, + name=name, + network=network, + security_profile=security_profile, + storage_account_gen2=storage_account_gen2, + storage_accounts=storage_accounts, + tags=tags, + tls_min_version=tls_min_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[pulumi.Input[str]] = None, + component_version: Optional[pulumi.Input['HBaseClusterComponentVersionArgs']] = None, + gateway: Optional[pulumi.Input['HBaseClusterGatewayArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input['HBaseClusterRolesArgs']] = None, + tier: Optional[pulumi.Input[str]] = None, + compute_isolation: Optional[pulumi.Input['HBaseClusterComputeIsolationArgs']] = None, + disk_encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['HBaseClusterDiskEncryptionArgs']]]] = None, + extension: Optional[pulumi.Input['HBaseClusterExtensionArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + metastores: Optional[pulumi.Input['HBaseClusterMetastoresArgs']] = None, + monitor: Optional[pulumi.Input['HBaseClusterMonitorArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['HBaseClusterNetworkArgs']] = None, + security_profile: Optional[pulumi.Input['HBaseClusterSecurityProfileArgs']] = None, + storage_account_gen2: Optional[pulumi.Input['HBaseClusterStorageAccountGen2Args']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['HBaseClusterStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tls_min_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if cluster_version is None: + raise TypeError("Missing 'cluster_version' argument") + if component_version is None and 'componentVersion' in kwargs: + component_version = kwargs['componentVersion'] + if component_version is None: + raise TypeError("Missing 'component_version' argument") + if gateway is None: + raise TypeError("Missing 'gateway' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if roles is None: + raise TypeError("Missing 'roles' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + if compute_isolation is None and 'computeIsolation' in kwargs: + compute_isolation = kwargs['computeIsolation'] + if disk_encryptions is None and 'diskEncryptions' in kwargs: + disk_encryptions = kwargs['diskEncryptions'] + if security_profile is None and 'securityProfile' in kwargs: + security_profile = kwargs['securityProfile'] + if storage_account_gen2 is None and 'storageAccountGen2' in kwargs: + storage_account_gen2 = kwargs['storageAccountGen2'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if tls_min_version is None and 'tlsMinVersion' in kwargs: + tls_min_version = kwargs['tlsMinVersion'] + + _setter("cluster_version", cluster_version) + _setter("component_version", component_version) + _setter("gateway", gateway) + _setter("resource_group_name", resource_group_name) + _setter("roles", roles) + _setter("tier", tier) if compute_isolation is not None: - pulumi.set(__self__, "compute_isolation", compute_isolation) + _setter("compute_isolation", compute_isolation) if disk_encryptions is not None: - pulumi.set(__self__, "disk_encryptions", disk_encryptions) + _setter("disk_encryptions", disk_encryptions) if extension is not None: - pulumi.set(__self__, "extension", extension) + _setter("extension", extension) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metastores is not None: - pulumi.set(__self__, "metastores", metastores) + _setter("metastores", metastores) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if security_profile is not None: - pulumi.set(__self__, "security_profile", security_profile) + _setter("security_profile", security_profile) if storage_account_gen2 is not None: - pulumi.set(__self__, "storage_account_gen2", storage_account_gen2) + _setter("storage_account_gen2", storage_account_gen2) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tls_min_version is not None: - pulumi.set(__self__, "tls_min_version", tls_min_version) + _setter("tls_min_version", tls_min_version) @property @pulumi.getter(name="clusterVersion") @@ -373,48 +450,121 @@ def __init__(__self__, *, > **NOTE:** Starting on June 30, 2020, Azure HDInsight will enforce TLS 1.2 or later versions for all HTTPS connections. For more information, see [Azure HDInsight TLS 1.2 Enforcement](https://azure.microsoft.com/en-us/updates/azure-hdinsight-tls-12-enforcement/). """ + _HBaseClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + component_version=component_version, + compute_isolation=compute_isolation, + disk_encryptions=disk_encryptions, + extension=extension, + gateway=gateway, + https_endpoint=https_endpoint, + location=location, + metastores=metastores, + monitor=monitor, + name=name, + network=network, + resource_group_name=resource_group_name, + roles=roles, + security_profile=security_profile, + ssh_endpoint=ssh_endpoint, + storage_account_gen2=storage_account_gen2, + storage_accounts=storage_accounts, + tags=tags, + tier=tier, + tls_min_version=tls_min_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[pulumi.Input[str]] = None, + component_version: Optional[pulumi.Input['HBaseClusterComponentVersionArgs']] = None, + compute_isolation: Optional[pulumi.Input['HBaseClusterComputeIsolationArgs']] = None, + disk_encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['HBaseClusterDiskEncryptionArgs']]]] = None, + extension: Optional[pulumi.Input['HBaseClusterExtensionArgs']] = None, + gateway: Optional[pulumi.Input['HBaseClusterGatewayArgs']] = None, + https_endpoint: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + metastores: Optional[pulumi.Input['HBaseClusterMetastoresArgs']] = None, + monitor: Optional[pulumi.Input['HBaseClusterMonitorArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['HBaseClusterNetworkArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input['HBaseClusterRolesArgs']] = None, + security_profile: Optional[pulumi.Input['HBaseClusterSecurityProfileArgs']] = None, + ssh_endpoint: Optional[pulumi.Input[str]] = None, + storage_account_gen2: Optional[pulumi.Input['HBaseClusterStorageAccountGen2Args']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['HBaseClusterStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tier: Optional[pulumi.Input[str]] = None, + tls_min_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if component_version is None and 'componentVersion' in kwargs: + component_version = kwargs['componentVersion'] + if compute_isolation is None and 'computeIsolation' in kwargs: + compute_isolation = kwargs['computeIsolation'] + if disk_encryptions is None and 'diskEncryptions' in kwargs: + disk_encryptions = kwargs['diskEncryptions'] + if https_endpoint is None and 'httpsEndpoint' in kwargs: + https_endpoint = kwargs['httpsEndpoint'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if security_profile is None and 'securityProfile' in kwargs: + security_profile = kwargs['securityProfile'] + if ssh_endpoint is None and 'sshEndpoint' in kwargs: + ssh_endpoint = kwargs['sshEndpoint'] + if storage_account_gen2 is None and 'storageAccountGen2' in kwargs: + storage_account_gen2 = kwargs['storageAccountGen2'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if tls_min_version is None and 'tlsMinVersion' in kwargs: + tls_min_version = kwargs['tlsMinVersion'] + if cluster_version is not None: - pulumi.set(__self__, "cluster_version", cluster_version) + _setter("cluster_version", cluster_version) if component_version is not None: - pulumi.set(__self__, "component_version", component_version) + _setter("component_version", component_version) if compute_isolation is not None: - pulumi.set(__self__, "compute_isolation", compute_isolation) + _setter("compute_isolation", compute_isolation) if disk_encryptions is not None: - pulumi.set(__self__, "disk_encryptions", disk_encryptions) + _setter("disk_encryptions", disk_encryptions) if extension is not None: - pulumi.set(__self__, "extension", extension) + _setter("extension", extension) if gateway is not None: - pulumi.set(__self__, "gateway", gateway) + _setter("gateway", gateway) if https_endpoint is not None: - pulumi.set(__self__, "https_endpoint", https_endpoint) + _setter("https_endpoint", https_endpoint) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metastores is not None: - pulumi.set(__self__, "metastores", metastores) + _setter("metastores", metastores) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if roles is not None: - pulumi.set(__self__, "roles", roles) + _setter("roles", roles) if security_profile is not None: - pulumi.set(__self__, "security_profile", security_profile) + _setter("security_profile", security_profile) if ssh_endpoint is not None: - pulumi.set(__self__, "ssh_endpoint", ssh_endpoint) + _setter("ssh_endpoint", ssh_endpoint) if storage_account_gen2 is not None: - pulumi.set(__self__, "storage_account_gen2", storage_account_gen2) + _setter("storage_account_gen2", storage_account_gen2) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) if tls_min_version is not None: - pulumi.set(__self__, "tls_min_version", tls_min_version) + _setter("tls_min_version", tls_min_version) @property @pulumi.getter(name="clusterVersion") @@ -862,6 +1012,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HBaseClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -898,27 +1052,77 @@ def _internal_init(__self__, if cluster_version is None and not opts.urn: raise TypeError("Missing required property 'cluster_version'") __props__.__dict__["cluster_version"] = cluster_version + if component_version is not None and not isinstance(component_version, HBaseClusterComponentVersionArgs): + component_version = component_version or {} + def _setter(key, value): + component_version[key] = value + HBaseClusterComponentVersionArgs._configure(_setter, **component_version) if component_version is None and not opts.urn: raise TypeError("Missing required property 'component_version'") __props__.__dict__["component_version"] = component_version + if compute_isolation is not None and not isinstance(compute_isolation, HBaseClusterComputeIsolationArgs): + compute_isolation = compute_isolation or {} + def _setter(key, value): + compute_isolation[key] = value + HBaseClusterComputeIsolationArgs._configure(_setter, **compute_isolation) __props__.__dict__["compute_isolation"] = compute_isolation __props__.__dict__["disk_encryptions"] = disk_encryptions + if extension is not None and not isinstance(extension, HBaseClusterExtensionArgs): + extension = extension or {} + def _setter(key, value): + extension[key] = value + HBaseClusterExtensionArgs._configure(_setter, **extension) __props__.__dict__["extension"] = extension + if gateway is not None and not isinstance(gateway, HBaseClusterGatewayArgs): + gateway = gateway or {} + def _setter(key, value): + gateway[key] = value + HBaseClusterGatewayArgs._configure(_setter, **gateway) if gateway is None and not opts.urn: raise TypeError("Missing required property 'gateway'") __props__.__dict__["gateway"] = gateway __props__.__dict__["location"] = location + if metastores is not None and not isinstance(metastores, HBaseClusterMetastoresArgs): + metastores = metastores or {} + def _setter(key, value): + metastores[key] = value + HBaseClusterMetastoresArgs._configure(_setter, **metastores) __props__.__dict__["metastores"] = metastores + if monitor is not None and not isinstance(monitor, HBaseClusterMonitorArgs): + monitor = monitor or {} + def _setter(key, value): + monitor[key] = value + HBaseClusterMonitorArgs._configure(_setter, **monitor) __props__.__dict__["monitor"] = monitor __props__.__dict__["name"] = name + if network is not None and not isinstance(network, HBaseClusterNetworkArgs): + network = network or {} + def _setter(key, value): + network[key] = value + HBaseClusterNetworkArgs._configure(_setter, **network) __props__.__dict__["network"] = network if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if roles is not None and not isinstance(roles, HBaseClusterRolesArgs): + roles = roles or {} + def _setter(key, value): + roles[key] = value + HBaseClusterRolesArgs._configure(_setter, **roles) if roles is None and not opts.urn: raise TypeError("Missing required property 'roles'") __props__.__dict__["roles"] = roles + if security_profile is not None and not isinstance(security_profile, HBaseClusterSecurityProfileArgs): + security_profile = security_profile or {} + def _setter(key, value): + security_profile[key] = value + HBaseClusterSecurityProfileArgs._configure(_setter, **security_profile) __props__.__dict__["security_profile"] = security_profile + if storage_account_gen2 is not None and not isinstance(storage_account_gen2, HBaseClusterStorageAccountGen2Args): + storage_account_gen2 = storage_account_gen2 or {} + def _setter(key, value): + storage_account_gen2[key] = value + HBaseClusterStorageAccountGen2Args._configure(_setter, **storage_account_gen2) __props__.__dict__["storage_account_gen2"] = storage_account_gen2 __props__.__dict__["storage_accounts"] = storage_accounts __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/hdinsight/hadoop_cluster.py b/sdk/python/pulumi_azure/hdinsight/hadoop_cluster.py index d7aeb52b75..c9fc8d6426 100644 --- a/sdk/python/pulumi_azure/hdinsight/hadoop_cluster.py +++ b/sdk/python/pulumi_azure/hdinsight/hadoop_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,38 +59,115 @@ def __init__(__self__, *, > **NOTE:** Starting on June 30, 2020, Azure HDInsight will enforce TLS 1.2 or later versions for all HTTPS connections. For more information, see [Azure HDInsight TLS 1.2 Enforcement](https://azure.microsoft.com/en-us/updates/azure-hdinsight-tls-12-enforcement/). """ - pulumi.set(__self__, "cluster_version", cluster_version) - pulumi.set(__self__, "component_version", component_version) - pulumi.set(__self__, "gateway", gateway) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "roles", roles) - pulumi.set(__self__, "tier", tier) + HadoopClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + component_version=component_version, + gateway=gateway, + resource_group_name=resource_group_name, + roles=roles, + tier=tier, + compute_isolation=compute_isolation, + disk_encryptions=disk_encryptions, + extension=extension, + location=location, + metastores=metastores, + monitor=monitor, + name=name, + network=network, + security_profile=security_profile, + storage_account_gen2=storage_account_gen2, + storage_accounts=storage_accounts, + tags=tags, + tls_min_version=tls_min_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[pulumi.Input[str]] = None, + component_version: Optional[pulumi.Input['HadoopClusterComponentVersionArgs']] = None, + gateway: Optional[pulumi.Input['HadoopClusterGatewayArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input['HadoopClusterRolesArgs']] = None, + tier: Optional[pulumi.Input[str]] = None, + compute_isolation: Optional[pulumi.Input['HadoopClusterComputeIsolationArgs']] = None, + disk_encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['HadoopClusterDiskEncryptionArgs']]]] = None, + extension: Optional[pulumi.Input['HadoopClusterExtensionArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + metastores: Optional[pulumi.Input['HadoopClusterMetastoresArgs']] = None, + monitor: Optional[pulumi.Input['HadoopClusterMonitorArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['HadoopClusterNetworkArgs']] = None, + security_profile: Optional[pulumi.Input['HadoopClusterSecurityProfileArgs']] = None, + storage_account_gen2: Optional[pulumi.Input['HadoopClusterStorageAccountGen2Args']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['HadoopClusterStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tls_min_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if cluster_version is None: + raise TypeError("Missing 'cluster_version' argument") + if component_version is None and 'componentVersion' in kwargs: + component_version = kwargs['componentVersion'] + if component_version is None: + raise TypeError("Missing 'component_version' argument") + if gateway is None: + raise TypeError("Missing 'gateway' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if roles is None: + raise TypeError("Missing 'roles' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + if compute_isolation is None and 'computeIsolation' in kwargs: + compute_isolation = kwargs['computeIsolation'] + if disk_encryptions is None and 'diskEncryptions' in kwargs: + disk_encryptions = kwargs['diskEncryptions'] + if security_profile is None and 'securityProfile' in kwargs: + security_profile = kwargs['securityProfile'] + if storage_account_gen2 is None and 'storageAccountGen2' in kwargs: + storage_account_gen2 = kwargs['storageAccountGen2'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if tls_min_version is None and 'tlsMinVersion' in kwargs: + tls_min_version = kwargs['tlsMinVersion'] + + _setter("cluster_version", cluster_version) + _setter("component_version", component_version) + _setter("gateway", gateway) + _setter("resource_group_name", resource_group_name) + _setter("roles", roles) + _setter("tier", tier) if compute_isolation is not None: - pulumi.set(__self__, "compute_isolation", compute_isolation) + _setter("compute_isolation", compute_isolation) if disk_encryptions is not None: - pulumi.set(__self__, "disk_encryptions", disk_encryptions) + _setter("disk_encryptions", disk_encryptions) if extension is not None: - pulumi.set(__self__, "extension", extension) + _setter("extension", extension) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metastores is not None: - pulumi.set(__self__, "metastores", metastores) + _setter("metastores", metastores) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if security_profile is not None: - pulumi.set(__self__, "security_profile", security_profile) + _setter("security_profile", security_profile) if storage_account_gen2 is not None: - pulumi.set(__self__, "storage_account_gen2", storage_account_gen2) + _setter("storage_account_gen2", storage_account_gen2) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tls_min_version is not None: - pulumi.set(__self__, "tls_min_version", tls_min_version) + _setter("tls_min_version", tls_min_version) @property @pulumi.getter(name="clusterVersion") @@ -373,48 +450,121 @@ def __init__(__self__, *, > **NOTE:** Starting on June 30, 2020, Azure HDInsight will enforce TLS 1.2 or later versions for all HTTPS connections. For more information, see [Azure HDInsight TLS 1.2 Enforcement](https://azure.microsoft.com/en-us/updates/azure-hdinsight-tls-12-enforcement/). """ + _HadoopClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + component_version=component_version, + compute_isolation=compute_isolation, + disk_encryptions=disk_encryptions, + extension=extension, + gateway=gateway, + https_endpoint=https_endpoint, + location=location, + metastores=metastores, + monitor=monitor, + name=name, + network=network, + resource_group_name=resource_group_name, + roles=roles, + security_profile=security_profile, + ssh_endpoint=ssh_endpoint, + storage_account_gen2=storage_account_gen2, + storage_accounts=storage_accounts, + tags=tags, + tier=tier, + tls_min_version=tls_min_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[pulumi.Input[str]] = None, + component_version: Optional[pulumi.Input['HadoopClusterComponentVersionArgs']] = None, + compute_isolation: Optional[pulumi.Input['HadoopClusterComputeIsolationArgs']] = None, + disk_encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['HadoopClusterDiskEncryptionArgs']]]] = None, + extension: Optional[pulumi.Input['HadoopClusterExtensionArgs']] = None, + gateway: Optional[pulumi.Input['HadoopClusterGatewayArgs']] = None, + https_endpoint: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + metastores: Optional[pulumi.Input['HadoopClusterMetastoresArgs']] = None, + monitor: Optional[pulumi.Input['HadoopClusterMonitorArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['HadoopClusterNetworkArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input['HadoopClusterRolesArgs']] = None, + security_profile: Optional[pulumi.Input['HadoopClusterSecurityProfileArgs']] = None, + ssh_endpoint: Optional[pulumi.Input[str]] = None, + storage_account_gen2: Optional[pulumi.Input['HadoopClusterStorageAccountGen2Args']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['HadoopClusterStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tier: Optional[pulumi.Input[str]] = None, + tls_min_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if component_version is None and 'componentVersion' in kwargs: + component_version = kwargs['componentVersion'] + if compute_isolation is None and 'computeIsolation' in kwargs: + compute_isolation = kwargs['computeIsolation'] + if disk_encryptions is None and 'diskEncryptions' in kwargs: + disk_encryptions = kwargs['diskEncryptions'] + if https_endpoint is None and 'httpsEndpoint' in kwargs: + https_endpoint = kwargs['httpsEndpoint'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if security_profile is None and 'securityProfile' in kwargs: + security_profile = kwargs['securityProfile'] + if ssh_endpoint is None and 'sshEndpoint' in kwargs: + ssh_endpoint = kwargs['sshEndpoint'] + if storage_account_gen2 is None and 'storageAccountGen2' in kwargs: + storage_account_gen2 = kwargs['storageAccountGen2'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if tls_min_version is None and 'tlsMinVersion' in kwargs: + tls_min_version = kwargs['tlsMinVersion'] + if cluster_version is not None: - pulumi.set(__self__, "cluster_version", cluster_version) + _setter("cluster_version", cluster_version) if component_version is not None: - pulumi.set(__self__, "component_version", component_version) + _setter("component_version", component_version) if compute_isolation is not None: - pulumi.set(__self__, "compute_isolation", compute_isolation) + _setter("compute_isolation", compute_isolation) if disk_encryptions is not None: - pulumi.set(__self__, "disk_encryptions", disk_encryptions) + _setter("disk_encryptions", disk_encryptions) if extension is not None: - pulumi.set(__self__, "extension", extension) + _setter("extension", extension) if gateway is not None: - pulumi.set(__self__, "gateway", gateway) + _setter("gateway", gateway) if https_endpoint is not None: - pulumi.set(__self__, "https_endpoint", https_endpoint) + _setter("https_endpoint", https_endpoint) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metastores is not None: - pulumi.set(__self__, "metastores", metastores) + _setter("metastores", metastores) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if roles is not None: - pulumi.set(__self__, "roles", roles) + _setter("roles", roles) if security_profile is not None: - pulumi.set(__self__, "security_profile", security_profile) + _setter("security_profile", security_profile) if ssh_endpoint is not None: - pulumi.set(__self__, "ssh_endpoint", ssh_endpoint) + _setter("ssh_endpoint", ssh_endpoint) if storage_account_gen2 is not None: - pulumi.set(__self__, "storage_account_gen2", storage_account_gen2) + _setter("storage_account_gen2", storage_account_gen2) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) if tls_min_version is not None: - pulumi.set(__self__, "tls_min_version", tls_min_version) + _setter("tls_min_version", tls_min_version) @property @pulumi.getter(name="clusterVersion") @@ -862,6 +1012,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HadoopClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -898,27 +1052,77 @@ def _internal_init(__self__, if cluster_version is None and not opts.urn: raise TypeError("Missing required property 'cluster_version'") __props__.__dict__["cluster_version"] = cluster_version + if component_version is not None and not isinstance(component_version, HadoopClusterComponentVersionArgs): + component_version = component_version or {} + def _setter(key, value): + component_version[key] = value + HadoopClusterComponentVersionArgs._configure(_setter, **component_version) if component_version is None and not opts.urn: raise TypeError("Missing required property 'component_version'") __props__.__dict__["component_version"] = component_version + if compute_isolation is not None and not isinstance(compute_isolation, HadoopClusterComputeIsolationArgs): + compute_isolation = compute_isolation or {} + def _setter(key, value): + compute_isolation[key] = value + HadoopClusterComputeIsolationArgs._configure(_setter, **compute_isolation) __props__.__dict__["compute_isolation"] = compute_isolation __props__.__dict__["disk_encryptions"] = disk_encryptions + if extension is not None and not isinstance(extension, HadoopClusterExtensionArgs): + extension = extension or {} + def _setter(key, value): + extension[key] = value + HadoopClusterExtensionArgs._configure(_setter, **extension) __props__.__dict__["extension"] = extension + if gateway is not None and not isinstance(gateway, HadoopClusterGatewayArgs): + gateway = gateway or {} + def _setter(key, value): + gateway[key] = value + HadoopClusterGatewayArgs._configure(_setter, **gateway) if gateway is None and not opts.urn: raise TypeError("Missing required property 'gateway'") __props__.__dict__["gateway"] = gateway __props__.__dict__["location"] = location + if metastores is not None and not isinstance(metastores, HadoopClusterMetastoresArgs): + metastores = metastores or {} + def _setter(key, value): + metastores[key] = value + HadoopClusterMetastoresArgs._configure(_setter, **metastores) __props__.__dict__["metastores"] = metastores + if monitor is not None and not isinstance(monitor, HadoopClusterMonitorArgs): + monitor = monitor or {} + def _setter(key, value): + monitor[key] = value + HadoopClusterMonitorArgs._configure(_setter, **monitor) __props__.__dict__["monitor"] = monitor __props__.__dict__["name"] = name + if network is not None and not isinstance(network, HadoopClusterNetworkArgs): + network = network or {} + def _setter(key, value): + network[key] = value + HadoopClusterNetworkArgs._configure(_setter, **network) __props__.__dict__["network"] = network if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if roles is not None and not isinstance(roles, HadoopClusterRolesArgs): + roles = roles or {} + def _setter(key, value): + roles[key] = value + HadoopClusterRolesArgs._configure(_setter, **roles) if roles is None and not opts.urn: raise TypeError("Missing required property 'roles'") __props__.__dict__["roles"] = roles + if security_profile is not None and not isinstance(security_profile, HadoopClusterSecurityProfileArgs): + security_profile = security_profile or {} + def _setter(key, value): + security_profile[key] = value + HadoopClusterSecurityProfileArgs._configure(_setter, **security_profile) __props__.__dict__["security_profile"] = security_profile + if storage_account_gen2 is not None and not isinstance(storage_account_gen2, HadoopClusterStorageAccountGen2Args): + storage_account_gen2 = storage_account_gen2 or {} + def _setter(key, value): + storage_account_gen2[key] = value + HadoopClusterStorageAccountGen2Args._configure(_setter, **storage_account_gen2) __props__.__dict__["storage_account_gen2"] = storage_account_gen2 __props__.__dict__["storage_accounts"] = storage_accounts __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/hdinsight/interactive_query_cluster.py b/sdk/python/pulumi_azure/hdinsight/interactive_query_cluster.py index 5f9190b7cb..e8ab82f317 100644 --- a/sdk/python/pulumi_azure/hdinsight/interactive_query_cluster.py +++ b/sdk/python/pulumi_azure/hdinsight/interactive_query_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -61,40 +61,121 @@ def __init__(__self__, *, > **NOTE:** Starting on June 30, 2020, Azure HDInsight will enforce TLS 1.2 or later versions for all HTTPS connections. For more information, see [Azure HDInsight TLS 1.2 Enforcement](https://azure.microsoft.com/en-us/updates/azure-hdinsight-tls-12-enforcement/). """ - pulumi.set(__self__, "cluster_version", cluster_version) - pulumi.set(__self__, "component_version", component_version) - pulumi.set(__self__, "gateway", gateway) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "roles", roles) - pulumi.set(__self__, "tier", tier) + InteractiveQueryClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + component_version=component_version, + gateway=gateway, + resource_group_name=resource_group_name, + roles=roles, + tier=tier, + compute_isolation=compute_isolation, + disk_encryptions=disk_encryptions, + encryption_in_transit_enabled=encryption_in_transit_enabled, + extension=extension, + location=location, + metastores=metastores, + monitor=monitor, + name=name, + network=network, + security_profile=security_profile, + storage_account_gen2=storage_account_gen2, + storage_accounts=storage_accounts, + tags=tags, + tls_min_version=tls_min_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[pulumi.Input[str]] = None, + component_version: Optional[pulumi.Input['InteractiveQueryClusterComponentVersionArgs']] = None, + gateway: Optional[pulumi.Input['InteractiveQueryClusterGatewayArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input['InteractiveQueryClusterRolesArgs']] = None, + tier: Optional[pulumi.Input[str]] = None, + compute_isolation: Optional[pulumi.Input['InteractiveQueryClusterComputeIsolationArgs']] = None, + disk_encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['InteractiveQueryClusterDiskEncryptionArgs']]]] = None, + encryption_in_transit_enabled: Optional[pulumi.Input[bool]] = None, + extension: Optional[pulumi.Input['InteractiveQueryClusterExtensionArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + metastores: Optional[pulumi.Input['InteractiveQueryClusterMetastoresArgs']] = None, + monitor: Optional[pulumi.Input['InteractiveQueryClusterMonitorArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['InteractiveQueryClusterNetworkArgs']] = None, + security_profile: Optional[pulumi.Input['InteractiveQueryClusterSecurityProfileArgs']] = None, + storage_account_gen2: Optional[pulumi.Input['InteractiveQueryClusterStorageAccountGen2Args']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['InteractiveQueryClusterStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tls_min_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if cluster_version is None: + raise TypeError("Missing 'cluster_version' argument") + if component_version is None and 'componentVersion' in kwargs: + component_version = kwargs['componentVersion'] + if component_version is None: + raise TypeError("Missing 'component_version' argument") + if gateway is None: + raise TypeError("Missing 'gateway' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if roles is None: + raise TypeError("Missing 'roles' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + if compute_isolation is None and 'computeIsolation' in kwargs: + compute_isolation = kwargs['computeIsolation'] + if disk_encryptions is None and 'diskEncryptions' in kwargs: + disk_encryptions = kwargs['diskEncryptions'] + if encryption_in_transit_enabled is None and 'encryptionInTransitEnabled' in kwargs: + encryption_in_transit_enabled = kwargs['encryptionInTransitEnabled'] + if security_profile is None and 'securityProfile' in kwargs: + security_profile = kwargs['securityProfile'] + if storage_account_gen2 is None and 'storageAccountGen2' in kwargs: + storage_account_gen2 = kwargs['storageAccountGen2'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if tls_min_version is None and 'tlsMinVersion' in kwargs: + tls_min_version = kwargs['tlsMinVersion'] + + _setter("cluster_version", cluster_version) + _setter("component_version", component_version) + _setter("gateway", gateway) + _setter("resource_group_name", resource_group_name) + _setter("roles", roles) + _setter("tier", tier) if compute_isolation is not None: - pulumi.set(__self__, "compute_isolation", compute_isolation) + _setter("compute_isolation", compute_isolation) if disk_encryptions is not None: - pulumi.set(__self__, "disk_encryptions", disk_encryptions) + _setter("disk_encryptions", disk_encryptions) if encryption_in_transit_enabled is not None: - pulumi.set(__self__, "encryption_in_transit_enabled", encryption_in_transit_enabled) + _setter("encryption_in_transit_enabled", encryption_in_transit_enabled) if extension is not None: - pulumi.set(__self__, "extension", extension) + _setter("extension", extension) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metastores is not None: - pulumi.set(__self__, "metastores", metastores) + _setter("metastores", metastores) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if security_profile is not None: - pulumi.set(__self__, "security_profile", security_profile) + _setter("security_profile", security_profile) if storage_account_gen2 is not None: - pulumi.set(__self__, "storage_account_gen2", storage_account_gen2) + _setter("storage_account_gen2", storage_account_gen2) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tls_min_version is not None: - pulumi.set(__self__, "tls_min_version", tls_min_version) + _setter("tls_min_version", tls_min_version) @property @pulumi.getter(name="clusterVersion") @@ -391,50 +472,127 @@ def __init__(__self__, *, > **NOTE:** Starting on June 30, 2020, Azure HDInsight will enforce TLS 1.2 or later versions for all HTTPS connections. For more information, see [Azure HDInsight TLS 1.2 Enforcement](https://azure.microsoft.com/en-us/updates/azure-hdinsight-tls-12-enforcement/). """ + _InteractiveQueryClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + component_version=component_version, + compute_isolation=compute_isolation, + disk_encryptions=disk_encryptions, + encryption_in_transit_enabled=encryption_in_transit_enabled, + extension=extension, + gateway=gateway, + https_endpoint=https_endpoint, + location=location, + metastores=metastores, + monitor=monitor, + name=name, + network=network, + resource_group_name=resource_group_name, + roles=roles, + security_profile=security_profile, + ssh_endpoint=ssh_endpoint, + storage_account_gen2=storage_account_gen2, + storage_accounts=storage_accounts, + tags=tags, + tier=tier, + tls_min_version=tls_min_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[pulumi.Input[str]] = None, + component_version: Optional[pulumi.Input['InteractiveQueryClusterComponentVersionArgs']] = None, + compute_isolation: Optional[pulumi.Input['InteractiveQueryClusterComputeIsolationArgs']] = None, + disk_encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['InteractiveQueryClusterDiskEncryptionArgs']]]] = None, + encryption_in_transit_enabled: Optional[pulumi.Input[bool]] = None, + extension: Optional[pulumi.Input['InteractiveQueryClusterExtensionArgs']] = None, + gateway: Optional[pulumi.Input['InteractiveQueryClusterGatewayArgs']] = None, + https_endpoint: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + metastores: Optional[pulumi.Input['InteractiveQueryClusterMetastoresArgs']] = None, + monitor: Optional[pulumi.Input['InteractiveQueryClusterMonitorArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['InteractiveQueryClusterNetworkArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input['InteractiveQueryClusterRolesArgs']] = None, + security_profile: Optional[pulumi.Input['InteractiveQueryClusterSecurityProfileArgs']] = None, + ssh_endpoint: Optional[pulumi.Input[str]] = None, + storage_account_gen2: Optional[pulumi.Input['InteractiveQueryClusterStorageAccountGen2Args']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['InteractiveQueryClusterStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tier: Optional[pulumi.Input[str]] = None, + tls_min_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if component_version is None and 'componentVersion' in kwargs: + component_version = kwargs['componentVersion'] + if compute_isolation is None and 'computeIsolation' in kwargs: + compute_isolation = kwargs['computeIsolation'] + if disk_encryptions is None and 'diskEncryptions' in kwargs: + disk_encryptions = kwargs['diskEncryptions'] + if encryption_in_transit_enabled is None and 'encryptionInTransitEnabled' in kwargs: + encryption_in_transit_enabled = kwargs['encryptionInTransitEnabled'] + if https_endpoint is None and 'httpsEndpoint' in kwargs: + https_endpoint = kwargs['httpsEndpoint'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if security_profile is None and 'securityProfile' in kwargs: + security_profile = kwargs['securityProfile'] + if ssh_endpoint is None and 'sshEndpoint' in kwargs: + ssh_endpoint = kwargs['sshEndpoint'] + if storage_account_gen2 is None and 'storageAccountGen2' in kwargs: + storage_account_gen2 = kwargs['storageAccountGen2'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if tls_min_version is None and 'tlsMinVersion' in kwargs: + tls_min_version = kwargs['tlsMinVersion'] + if cluster_version is not None: - pulumi.set(__self__, "cluster_version", cluster_version) + _setter("cluster_version", cluster_version) if component_version is not None: - pulumi.set(__self__, "component_version", component_version) + _setter("component_version", component_version) if compute_isolation is not None: - pulumi.set(__self__, "compute_isolation", compute_isolation) + _setter("compute_isolation", compute_isolation) if disk_encryptions is not None: - pulumi.set(__self__, "disk_encryptions", disk_encryptions) + _setter("disk_encryptions", disk_encryptions) if encryption_in_transit_enabled is not None: - pulumi.set(__self__, "encryption_in_transit_enabled", encryption_in_transit_enabled) + _setter("encryption_in_transit_enabled", encryption_in_transit_enabled) if extension is not None: - pulumi.set(__self__, "extension", extension) + _setter("extension", extension) if gateway is not None: - pulumi.set(__self__, "gateway", gateway) + _setter("gateway", gateway) if https_endpoint is not None: - pulumi.set(__self__, "https_endpoint", https_endpoint) + _setter("https_endpoint", https_endpoint) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metastores is not None: - pulumi.set(__self__, "metastores", metastores) + _setter("metastores", metastores) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if roles is not None: - pulumi.set(__self__, "roles", roles) + _setter("roles", roles) if security_profile is not None: - pulumi.set(__self__, "security_profile", security_profile) + _setter("security_profile", security_profile) if ssh_endpoint is not None: - pulumi.set(__self__, "ssh_endpoint", ssh_endpoint) + _setter("ssh_endpoint", ssh_endpoint) if storage_account_gen2 is not None: - pulumi.set(__self__, "storage_account_gen2", storage_account_gen2) + _setter("storage_account_gen2", storage_account_gen2) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) if tls_min_version is not None: - pulumi.set(__self__, "tls_min_version", tls_min_version) + _setter("tls_min_version", tls_min_version) @property @pulumi.getter(name="clusterVersion") @@ -896,6 +1054,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + InteractiveQueryClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -933,28 +1095,78 @@ def _internal_init(__self__, if cluster_version is None and not opts.urn: raise TypeError("Missing required property 'cluster_version'") __props__.__dict__["cluster_version"] = cluster_version + if component_version is not None and not isinstance(component_version, InteractiveQueryClusterComponentVersionArgs): + component_version = component_version or {} + def _setter(key, value): + component_version[key] = value + InteractiveQueryClusterComponentVersionArgs._configure(_setter, **component_version) if component_version is None and not opts.urn: raise TypeError("Missing required property 'component_version'") __props__.__dict__["component_version"] = component_version + if compute_isolation is not None and not isinstance(compute_isolation, InteractiveQueryClusterComputeIsolationArgs): + compute_isolation = compute_isolation or {} + def _setter(key, value): + compute_isolation[key] = value + InteractiveQueryClusterComputeIsolationArgs._configure(_setter, **compute_isolation) __props__.__dict__["compute_isolation"] = compute_isolation __props__.__dict__["disk_encryptions"] = disk_encryptions __props__.__dict__["encryption_in_transit_enabled"] = encryption_in_transit_enabled + if extension is not None and not isinstance(extension, InteractiveQueryClusterExtensionArgs): + extension = extension or {} + def _setter(key, value): + extension[key] = value + InteractiveQueryClusterExtensionArgs._configure(_setter, **extension) __props__.__dict__["extension"] = extension + if gateway is not None and not isinstance(gateway, InteractiveQueryClusterGatewayArgs): + gateway = gateway or {} + def _setter(key, value): + gateway[key] = value + InteractiveQueryClusterGatewayArgs._configure(_setter, **gateway) if gateway is None and not opts.urn: raise TypeError("Missing required property 'gateway'") __props__.__dict__["gateway"] = gateway __props__.__dict__["location"] = location + if metastores is not None and not isinstance(metastores, InteractiveQueryClusterMetastoresArgs): + metastores = metastores or {} + def _setter(key, value): + metastores[key] = value + InteractiveQueryClusterMetastoresArgs._configure(_setter, **metastores) __props__.__dict__["metastores"] = metastores + if monitor is not None and not isinstance(monitor, InteractiveQueryClusterMonitorArgs): + monitor = monitor or {} + def _setter(key, value): + monitor[key] = value + InteractiveQueryClusterMonitorArgs._configure(_setter, **monitor) __props__.__dict__["monitor"] = monitor __props__.__dict__["name"] = name + if network is not None and not isinstance(network, InteractiveQueryClusterNetworkArgs): + network = network or {} + def _setter(key, value): + network[key] = value + InteractiveQueryClusterNetworkArgs._configure(_setter, **network) __props__.__dict__["network"] = network if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if roles is not None and not isinstance(roles, InteractiveQueryClusterRolesArgs): + roles = roles or {} + def _setter(key, value): + roles[key] = value + InteractiveQueryClusterRolesArgs._configure(_setter, **roles) if roles is None and not opts.urn: raise TypeError("Missing required property 'roles'") __props__.__dict__["roles"] = roles + if security_profile is not None and not isinstance(security_profile, InteractiveQueryClusterSecurityProfileArgs): + security_profile = security_profile or {} + def _setter(key, value): + security_profile[key] = value + InteractiveQueryClusterSecurityProfileArgs._configure(_setter, **security_profile) __props__.__dict__["security_profile"] = security_profile + if storage_account_gen2 is not None and not isinstance(storage_account_gen2, InteractiveQueryClusterStorageAccountGen2Args): + storage_account_gen2 = storage_account_gen2 or {} + def _setter(key, value): + storage_account_gen2[key] = value + InteractiveQueryClusterStorageAccountGen2Args._configure(_setter, **storage_account_gen2) __props__.__dict__["storage_account_gen2"] = storage_account_gen2 __props__.__dict__["storage_accounts"] = storage_accounts __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/hdinsight/kafka_cluster.py b/sdk/python/pulumi_azure/hdinsight/kafka_cluster.py index b8554625fd..d6f3b34913 100644 --- a/sdk/python/pulumi_azure/hdinsight/kafka_cluster.py +++ b/sdk/python/pulumi_azure/hdinsight/kafka_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -63,45 +63,130 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of Tags which should be assigned to this HDInsight Kafka Cluster. :param pulumi.Input[str] tls_min_version: The minimal supported TLS version. Possible values are `1.0`, `1.1` or `1.2`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cluster_version", cluster_version) - pulumi.set(__self__, "component_version", component_version) - pulumi.set(__self__, "gateway", gateway) - pulumi.set(__self__, "resource_group_name", resource_group_name) + KafkaClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + component_version=component_version, + gateway=gateway, + resource_group_name=resource_group_name, + roles=roles, + tier=tier, + compute_isolation=compute_isolation, + disk_encryptions=disk_encryptions, + encryption_in_transit_enabled=encryption_in_transit_enabled, + extension=extension, + location=location, + metastores=metastores, + monitor=monitor, + name=name, + network=network, + rest_proxy=rest_proxy, + security_profile=security_profile, + storage_account_gen2=storage_account_gen2, + storage_accounts=storage_accounts, + tags=tags, + tls_min_version=tls_min_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[pulumi.Input[str]] = None, + component_version: Optional[pulumi.Input['KafkaClusterComponentVersionArgs']] = None, + gateway: Optional[pulumi.Input['KafkaClusterGatewayArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input['KafkaClusterRolesArgs']] = None, + tier: Optional[pulumi.Input[str]] = None, + compute_isolation: Optional[pulumi.Input['KafkaClusterComputeIsolationArgs']] = None, + disk_encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['KafkaClusterDiskEncryptionArgs']]]] = None, + encryption_in_transit_enabled: Optional[pulumi.Input[bool]] = None, + extension: Optional[pulumi.Input['KafkaClusterExtensionArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + metastores: Optional[pulumi.Input['KafkaClusterMetastoresArgs']] = None, + monitor: Optional[pulumi.Input['KafkaClusterMonitorArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['KafkaClusterNetworkArgs']] = None, + rest_proxy: Optional[pulumi.Input['KafkaClusterRestProxyArgs']] = None, + security_profile: Optional[pulumi.Input['KafkaClusterSecurityProfileArgs']] = None, + storage_account_gen2: Optional[pulumi.Input['KafkaClusterStorageAccountGen2Args']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['KafkaClusterStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tls_min_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if cluster_version is None: + raise TypeError("Missing 'cluster_version' argument") + if component_version is None and 'componentVersion' in kwargs: + component_version = kwargs['componentVersion'] + if component_version is None: + raise TypeError("Missing 'component_version' argument") + if gateway is None: + raise TypeError("Missing 'gateway' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if roles is None: + raise TypeError("Missing 'roles' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + if compute_isolation is None and 'computeIsolation' in kwargs: + compute_isolation = kwargs['computeIsolation'] + if disk_encryptions is None and 'diskEncryptions' in kwargs: + disk_encryptions = kwargs['diskEncryptions'] + if encryption_in_transit_enabled is None and 'encryptionInTransitEnabled' in kwargs: + encryption_in_transit_enabled = kwargs['encryptionInTransitEnabled'] + if rest_proxy is None and 'restProxy' in kwargs: + rest_proxy = kwargs['restProxy'] + if security_profile is None and 'securityProfile' in kwargs: + security_profile = kwargs['securityProfile'] + if storage_account_gen2 is None and 'storageAccountGen2' in kwargs: + storage_account_gen2 = kwargs['storageAccountGen2'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if tls_min_version is None and 'tlsMinVersion' in kwargs: + tls_min_version = kwargs['tlsMinVersion'] + + _setter("cluster_version", cluster_version) + _setter("component_version", component_version) + _setter("gateway", gateway) + _setter("resource_group_name", resource_group_name) if roles is not None: warnings.warn("""`kafka_management_node` will be removed in version 4.0 of the AzureRM Provider since it no longer support configurations from the user""", DeprecationWarning) pulumi.log.warn("""roles is deprecated: `kafka_management_node` will be removed in version 4.0 of the AzureRM Provider since it no longer support configurations from the user""") - pulumi.set(__self__, "roles", roles) - pulumi.set(__self__, "tier", tier) + _setter("roles", roles) + _setter("tier", tier) if compute_isolation is not None: - pulumi.set(__self__, "compute_isolation", compute_isolation) + _setter("compute_isolation", compute_isolation) if disk_encryptions is not None: - pulumi.set(__self__, "disk_encryptions", disk_encryptions) + _setter("disk_encryptions", disk_encryptions) if encryption_in_transit_enabled is not None: - pulumi.set(__self__, "encryption_in_transit_enabled", encryption_in_transit_enabled) + _setter("encryption_in_transit_enabled", encryption_in_transit_enabled) if extension is not None: - pulumi.set(__self__, "extension", extension) + _setter("extension", extension) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metastores is not None: - pulumi.set(__self__, "metastores", metastores) + _setter("metastores", metastores) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if rest_proxy is not None: - pulumi.set(__self__, "rest_proxy", rest_proxy) + _setter("rest_proxy", rest_proxy) if security_profile is not None: - pulumi.set(__self__, "security_profile", security_profile) + _setter("security_profile", security_profile) if storage_account_gen2 is not None: - pulumi.set(__self__, "storage_account_gen2", storage_account_gen2) + _setter("storage_account_gen2", storage_account_gen2) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tls_min_version is not None: - pulumi.set(__self__, "tls_min_version", tls_min_version) + _setter("tls_min_version", tls_min_version) @property @pulumi.getter(name="clusterVersion") @@ -417,57 +502,142 @@ def __init__(__self__, *, :param pulumi.Input[str] tier: Specifies the Tier which should be used for this HDInsight Kafka Cluster. Possible values are `Standard` or `Premium`. Changing this forces a new resource to be created. :param pulumi.Input[str] tls_min_version: The minimal supported TLS version. Possible values are `1.0`, `1.1` or `1.2`. Changing this forces a new resource to be created. """ + _KafkaClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + component_version=component_version, + compute_isolation=compute_isolation, + disk_encryptions=disk_encryptions, + encryption_in_transit_enabled=encryption_in_transit_enabled, + extension=extension, + gateway=gateway, + https_endpoint=https_endpoint, + kafka_rest_proxy_endpoint=kafka_rest_proxy_endpoint, + location=location, + metastores=metastores, + monitor=monitor, + name=name, + network=network, + resource_group_name=resource_group_name, + rest_proxy=rest_proxy, + roles=roles, + security_profile=security_profile, + ssh_endpoint=ssh_endpoint, + storage_account_gen2=storage_account_gen2, + storage_accounts=storage_accounts, + tags=tags, + tier=tier, + tls_min_version=tls_min_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[pulumi.Input[str]] = None, + component_version: Optional[pulumi.Input['KafkaClusterComponentVersionArgs']] = None, + compute_isolation: Optional[pulumi.Input['KafkaClusterComputeIsolationArgs']] = None, + disk_encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['KafkaClusterDiskEncryptionArgs']]]] = None, + encryption_in_transit_enabled: Optional[pulumi.Input[bool]] = None, + extension: Optional[pulumi.Input['KafkaClusterExtensionArgs']] = None, + gateway: Optional[pulumi.Input['KafkaClusterGatewayArgs']] = None, + https_endpoint: Optional[pulumi.Input[str]] = None, + kafka_rest_proxy_endpoint: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + metastores: Optional[pulumi.Input['KafkaClusterMetastoresArgs']] = None, + monitor: Optional[pulumi.Input['KafkaClusterMonitorArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['KafkaClusterNetworkArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rest_proxy: Optional[pulumi.Input['KafkaClusterRestProxyArgs']] = None, + roles: Optional[pulumi.Input['KafkaClusterRolesArgs']] = None, + security_profile: Optional[pulumi.Input['KafkaClusterSecurityProfileArgs']] = None, + ssh_endpoint: Optional[pulumi.Input[str]] = None, + storage_account_gen2: Optional[pulumi.Input['KafkaClusterStorageAccountGen2Args']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['KafkaClusterStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tier: Optional[pulumi.Input[str]] = None, + tls_min_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if component_version is None and 'componentVersion' in kwargs: + component_version = kwargs['componentVersion'] + if compute_isolation is None and 'computeIsolation' in kwargs: + compute_isolation = kwargs['computeIsolation'] + if disk_encryptions is None and 'diskEncryptions' in kwargs: + disk_encryptions = kwargs['diskEncryptions'] + if encryption_in_transit_enabled is None and 'encryptionInTransitEnabled' in kwargs: + encryption_in_transit_enabled = kwargs['encryptionInTransitEnabled'] + if https_endpoint is None and 'httpsEndpoint' in kwargs: + https_endpoint = kwargs['httpsEndpoint'] + if kafka_rest_proxy_endpoint is None and 'kafkaRestProxyEndpoint' in kwargs: + kafka_rest_proxy_endpoint = kwargs['kafkaRestProxyEndpoint'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if rest_proxy is None and 'restProxy' in kwargs: + rest_proxy = kwargs['restProxy'] + if security_profile is None and 'securityProfile' in kwargs: + security_profile = kwargs['securityProfile'] + if ssh_endpoint is None and 'sshEndpoint' in kwargs: + ssh_endpoint = kwargs['sshEndpoint'] + if storage_account_gen2 is None and 'storageAccountGen2' in kwargs: + storage_account_gen2 = kwargs['storageAccountGen2'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if tls_min_version is None and 'tlsMinVersion' in kwargs: + tls_min_version = kwargs['tlsMinVersion'] + if cluster_version is not None: - pulumi.set(__self__, "cluster_version", cluster_version) + _setter("cluster_version", cluster_version) if component_version is not None: - pulumi.set(__self__, "component_version", component_version) + _setter("component_version", component_version) if compute_isolation is not None: - pulumi.set(__self__, "compute_isolation", compute_isolation) + _setter("compute_isolation", compute_isolation) if disk_encryptions is not None: - pulumi.set(__self__, "disk_encryptions", disk_encryptions) + _setter("disk_encryptions", disk_encryptions) if encryption_in_transit_enabled is not None: - pulumi.set(__self__, "encryption_in_transit_enabled", encryption_in_transit_enabled) + _setter("encryption_in_transit_enabled", encryption_in_transit_enabled) if extension is not None: - pulumi.set(__self__, "extension", extension) + _setter("extension", extension) if gateway is not None: - pulumi.set(__self__, "gateway", gateway) + _setter("gateway", gateway) if https_endpoint is not None: - pulumi.set(__self__, "https_endpoint", https_endpoint) + _setter("https_endpoint", https_endpoint) if kafka_rest_proxy_endpoint is not None: - pulumi.set(__self__, "kafka_rest_proxy_endpoint", kafka_rest_proxy_endpoint) + _setter("kafka_rest_proxy_endpoint", kafka_rest_proxy_endpoint) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metastores is not None: - pulumi.set(__self__, "metastores", metastores) + _setter("metastores", metastores) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rest_proxy is not None: - pulumi.set(__self__, "rest_proxy", rest_proxy) + _setter("rest_proxy", rest_proxy) if roles is not None: warnings.warn("""`kafka_management_node` will be removed in version 4.0 of the AzureRM Provider since it no longer support configurations from the user""", DeprecationWarning) pulumi.log.warn("""roles is deprecated: `kafka_management_node` will be removed in version 4.0 of the AzureRM Provider since it no longer support configurations from the user""") if roles is not None: - pulumi.set(__self__, "roles", roles) + _setter("roles", roles) if security_profile is not None: - pulumi.set(__self__, "security_profile", security_profile) + _setter("security_profile", security_profile) if ssh_endpoint is not None: - pulumi.set(__self__, "ssh_endpoint", ssh_endpoint) + _setter("ssh_endpoint", ssh_endpoint) if storage_account_gen2 is not None: - pulumi.set(__self__, "storage_account_gen2", storage_account_gen2) + _setter("storage_account_gen2", storage_account_gen2) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) if tls_min_version is not None: - pulumi.set(__self__, "tls_min_version", tls_min_version) + _setter("tls_min_version", tls_min_version) @property @pulumi.getter(name="clusterVersion") @@ -960,6 +1130,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + KafkaClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -998,29 +1172,84 @@ def _internal_init(__self__, if cluster_version is None and not opts.urn: raise TypeError("Missing required property 'cluster_version'") __props__.__dict__["cluster_version"] = cluster_version + if component_version is not None and not isinstance(component_version, KafkaClusterComponentVersionArgs): + component_version = component_version or {} + def _setter(key, value): + component_version[key] = value + KafkaClusterComponentVersionArgs._configure(_setter, **component_version) if component_version is None and not opts.urn: raise TypeError("Missing required property 'component_version'") __props__.__dict__["component_version"] = component_version + if compute_isolation is not None and not isinstance(compute_isolation, KafkaClusterComputeIsolationArgs): + compute_isolation = compute_isolation or {} + def _setter(key, value): + compute_isolation[key] = value + KafkaClusterComputeIsolationArgs._configure(_setter, **compute_isolation) __props__.__dict__["compute_isolation"] = compute_isolation __props__.__dict__["disk_encryptions"] = disk_encryptions __props__.__dict__["encryption_in_transit_enabled"] = encryption_in_transit_enabled + if extension is not None and not isinstance(extension, KafkaClusterExtensionArgs): + extension = extension or {} + def _setter(key, value): + extension[key] = value + KafkaClusterExtensionArgs._configure(_setter, **extension) __props__.__dict__["extension"] = extension + if gateway is not None and not isinstance(gateway, KafkaClusterGatewayArgs): + gateway = gateway or {} + def _setter(key, value): + gateway[key] = value + KafkaClusterGatewayArgs._configure(_setter, **gateway) if gateway is None and not opts.urn: raise TypeError("Missing required property 'gateway'") __props__.__dict__["gateway"] = gateway __props__.__dict__["location"] = location + if metastores is not None and not isinstance(metastores, KafkaClusterMetastoresArgs): + metastores = metastores or {} + def _setter(key, value): + metastores[key] = value + KafkaClusterMetastoresArgs._configure(_setter, **metastores) __props__.__dict__["metastores"] = metastores + if monitor is not None and not isinstance(monitor, KafkaClusterMonitorArgs): + monitor = monitor or {} + def _setter(key, value): + monitor[key] = value + KafkaClusterMonitorArgs._configure(_setter, **monitor) __props__.__dict__["monitor"] = monitor __props__.__dict__["name"] = name + if network is not None and not isinstance(network, KafkaClusterNetworkArgs): + network = network or {} + def _setter(key, value): + network[key] = value + KafkaClusterNetworkArgs._configure(_setter, **network) __props__.__dict__["network"] = network if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if rest_proxy is not None and not isinstance(rest_proxy, KafkaClusterRestProxyArgs): + rest_proxy = rest_proxy or {} + def _setter(key, value): + rest_proxy[key] = value + KafkaClusterRestProxyArgs._configure(_setter, **rest_proxy) __props__.__dict__["rest_proxy"] = rest_proxy + if roles is not None and not isinstance(roles, KafkaClusterRolesArgs): + roles = roles or {} + def _setter(key, value): + roles[key] = value + KafkaClusterRolesArgs._configure(_setter, **roles) if roles is None and not opts.urn: raise TypeError("Missing required property 'roles'") __props__.__dict__["roles"] = roles + if security_profile is not None and not isinstance(security_profile, KafkaClusterSecurityProfileArgs): + security_profile = security_profile or {} + def _setter(key, value): + security_profile[key] = value + KafkaClusterSecurityProfileArgs._configure(_setter, **security_profile) __props__.__dict__["security_profile"] = security_profile + if storage_account_gen2 is not None and not isinstance(storage_account_gen2, KafkaClusterStorageAccountGen2Args): + storage_account_gen2 = storage_account_gen2 or {} + def _setter(key, value): + storage_account_gen2[key] = value + KafkaClusterStorageAccountGen2Args._configure(_setter, **storage_account_gen2) __props__.__dict__["storage_account_gen2"] = storage_account_gen2 __props__.__dict__["storage_accounts"] = storage_accounts __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/hdinsight/outputs.py b/sdk/python/pulumi_azure/hdinsight/outputs.py index d48e7b4405..6e60c2d27f 100644 --- a/sdk/python/pulumi_azure/hdinsight/outputs.py +++ b/sdk/python/pulumi_azure/hdinsight/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -148,7 +148,20 @@ def __init__(__self__, *, """ :param str hbase: The version of HBase which should be used for this HDInsight HBase Cluster. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "hbase", hbase) + HBaseClusterComponentVersion._configure( + lambda key, value: pulumi.set(__self__, key, value), + hbase=hbase, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hbase: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hbase is None: + raise TypeError("Missing 'hbase' argument") + + _setter("hbase", hbase) @property @pulumi.getter @@ -187,10 +200,27 @@ def __init__(__self__, *, :param bool compute_isolation_enabled: This field indicates whether enable compute isolation or not. Possible values are `true` or `false`. :param str host_sku: The name of the host SKU. """ + HBaseClusterComputeIsolation._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_isolation_enabled=compute_isolation_enabled, + host_sku=host_sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_isolation_enabled: Optional[bool] = None, + host_sku: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_isolation_enabled is None and 'computeIsolationEnabled' in kwargs: + compute_isolation_enabled = kwargs['computeIsolationEnabled'] + if host_sku is None and 'hostSku' in kwargs: + host_sku = kwargs['hostSku'] + if compute_isolation_enabled is not None: - pulumi.set(__self__, "compute_isolation_enabled", compute_isolation_enabled) + _setter("compute_isolation_enabled", compute_isolation_enabled) if host_sku is not None: - pulumi.set(__self__, "host_sku", host_sku) + _setter("host_sku", host_sku) @property @pulumi.getter(name="computeIsolationEnabled") @@ -245,14 +275,39 @@ def __init__(__self__, *, :param str key_vault_key_id: The ID of the key vault key. :param str key_vault_managed_identity_id: This is the resource ID of Managed Identity used to access the key vault. """ + HBaseClusterDiskEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption_algorithm=encryption_algorithm, + encryption_at_host_enabled=encryption_at_host_enabled, + key_vault_key_id=key_vault_key_id, + key_vault_managed_identity_id=key_vault_managed_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption_algorithm: Optional[str] = None, + encryption_at_host_enabled: Optional[bool] = None, + key_vault_key_id: Optional[str] = None, + key_vault_managed_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encryption_algorithm is None and 'encryptionAlgorithm' in kwargs: + encryption_algorithm = kwargs['encryptionAlgorithm'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_managed_identity_id is None and 'keyVaultManagedIdentityId' in kwargs: + key_vault_managed_identity_id = kwargs['keyVaultManagedIdentityId'] + if encryption_algorithm is not None: - pulumi.set(__self__, "encryption_algorithm", encryption_algorithm) + _setter("encryption_algorithm", encryption_algorithm) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if key_vault_managed_identity_id is not None: - pulumi.set(__self__, "key_vault_managed_identity_id", key_vault_managed_identity_id) + _setter("key_vault_managed_identity_id", key_vault_managed_identity_id) @property @pulumi.getter(name="encryptionAlgorithm") @@ -315,8 +370,29 @@ def __init__(__self__, *, :param str log_analytics_workspace_id: The workspace ID of the log analytics extension. :param str primary_key: The workspace key of the log analytics extension. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + HBaseClusterExtension._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + primary_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -346,8 +422,25 @@ def __init__(__self__, *, > **NOTE:** This password must be different from the one used for the `head_node`, `worker_node` and `zookeeper_node` roles. :param str username: The username used for the Ambari Portal. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + HBaseClusterGateway._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -379,12 +472,27 @@ def __init__(__self__, *, :param 'HBaseClusterMetastoresHiveArgs' hive: A `hive` block as defined below. :param 'HBaseClusterMetastoresOozieArgs' oozie: An `oozie` block as defined below. """ + HBaseClusterMetastores._configure( + lambda key, value: pulumi.set(__self__, key, value), + ambari=ambari, + hive=hive, + oozie=oozie, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ambari: Optional['outputs.HBaseClusterMetastoresAmbari'] = None, + hive: Optional['outputs.HBaseClusterMetastoresHive'] = None, + oozie: Optional['outputs.HBaseClusterMetastoresOozie'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ambari is not None: - pulumi.set(__self__, "ambari", ambari) + _setter("ambari", ambari) if hive is not None: - pulumi.set(__self__, "hive", hive) + _setter("hive", hive) if oozie is not None: - pulumi.set(__self__, "oozie", oozie) + _setter("oozie", oozie) @property @pulumi.getter @@ -441,10 +549,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Ambari metastore. Changing this forces a new resource to be created. :param str username: The external Ambari metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + HBaseClusterMetastoresAmbari._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -509,10 +644,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Hive metastore. Changing this forces a new resource to be created. :param str username: The external Hive metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + HBaseClusterMetastoresHive._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -577,10 +739,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Oozie metastore. Changing this forces a new resource to be created. :param str username: The external Oozie metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + HBaseClusterMetastoresOozie._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -643,8 +832,29 @@ def __init__(__self__, *, :param str log_analytics_workspace_id: The Operations Management Suite (OMS) workspace ID. :param str primary_key: The Operations Management Suite (OMS) workspace key. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + HBaseClusterMonitor._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + primary_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -693,10 +903,27 @@ def __init__(__self__, *, > **NOTE:** To enable the private link the `connection_direction` must be set to `Outbound`. :param bool private_link_enabled: Is the private link enabled? Possible values include `True` or `False`. Defaults to `False`. Changing this forces a new resource to be created. """ + HBaseClusterNetwork._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_direction=connection_direction, + private_link_enabled=private_link_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_direction: Optional[str] = None, + private_link_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_direction is None and 'connectionDirection' in kwargs: + connection_direction = kwargs['connectionDirection'] + if private_link_enabled is None and 'privateLinkEnabled' in kwargs: + private_link_enabled = kwargs['privateLinkEnabled'] + if connection_direction is not None: - pulumi.set(__self__, "connection_direction", connection_direction) + _setter("connection_direction", connection_direction) if private_link_enabled is not None: - pulumi.set(__self__, "private_link_enabled", private_link_enabled) + _setter("private_link_enabled", private_link_enabled) @property @pulumi.getter(name="connectionDirection") @@ -749,9 +976,36 @@ def __init__(__self__, *, :param 'HBaseClusterRolesWorkerNodeArgs' worker_node: A `worker_node` block as defined below. :param 'HBaseClusterRolesZookeeperNodeArgs' zookeeper_node: A `zookeeper_node` block as defined below. """ - pulumi.set(__self__, "head_node", head_node) - pulumi.set(__self__, "worker_node", worker_node) - pulumi.set(__self__, "zookeeper_node", zookeeper_node) + HBaseClusterRoles._configure( + lambda key, value: pulumi.set(__self__, key, value), + head_node=head_node, + worker_node=worker_node, + zookeeper_node=zookeeper_node, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + head_node: Optional['outputs.HBaseClusterRolesHeadNode'] = None, + worker_node: Optional['outputs.HBaseClusterRolesWorkerNode'] = None, + zookeeper_node: Optional['outputs.HBaseClusterRolesZookeeperNode'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if head_node is None and 'headNode' in kwargs: + head_node = kwargs['headNode'] + if head_node is None: + raise TypeError("Missing 'head_node' argument") + if worker_node is None and 'workerNode' in kwargs: + worker_node = kwargs['workerNode'] + if worker_node is None: + raise TypeError("Missing 'worker_node' argument") + if zookeeper_node is None and 'zookeeperNode' in kwargs: + zookeeper_node = kwargs['zookeeperNode'] + if zookeeper_node is None: + raise TypeError("Missing 'zookeeper_node' argument") + + _setter("head_node", head_node) + _setter("worker_node", worker_node) + _setter("zookeeper_node", zookeeper_node) @property @pulumi.getter(name="headNode") @@ -826,18 +1080,55 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + HBaseClusterRolesHeadNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[str] = None, + vm_size: Optional[str] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.HBaseClusterRolesHeadNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -911,10 +1202,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HBaseClusterRolesHeadNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -994,21 +1304,66 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + HBaseClusterRolesWorkerNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_instance_count=target_instance_count, + username=username, + vm_size=vm_size, + autoscale=autoscale, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_instance_count: Optional[int] = None, + username: Optional[str] = None, + vm_size: Optional[str] = None, + autoscale: Optional['outputs.HBaseClusterRolesWorkerNodeAutoscale'] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.HBaseClusterRolesWorkerNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("target_instance_count", target_instance_count) + _setter("username", username) + _setter("vm_size", vm_size) if autoscale is not None: - pulumi.set(__self__, "autoscale", autoscale) + _setter("autoscale", autoscale) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="targetInstanceCount") @@ -1088,8 +1443,19 @@ def virtual_network_id(self) -> Optional[str]: class HBaseClusterRolesWorkerNodeAutoscale(dict): def __init__(__self__, *, recurrence: Optional['outputs.HBaseClusterRolesWorkerNodeAutoscaleRecurrence'] = None): + HBaseClusterRolesWorkerNodeAutoscale._configure( + lambda key, value: pulumi.set(__self__, key, value), + recurrence=recurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recurrence: Optional['outputs.HBaseClusterRolesWorkerNodeAutoscaleRecurrence'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) @property @pulumi.getter @@ -1102,8 +1468,25 @@ class HBaseClusterRolesWorkerNodeAutoscaleRecurrence(dict): def __init__(__self__, *, schedules: Sequence['outputs.HBaseClusterRolesWorkerNodeAutoscaleRecurrenceSchedule'], timezone: str): - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "timezone", timezone) + HBaseClusterRolesWorkerNodeAutoscaleRecurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + schedules=schedules, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schedules: Optional[Sequence['outputs.HBaseClusterRolesWorkerNodeAutoscaleRecurrenceSchedule']] = None, + timezone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if timezone is None: + raise TypeError("Missing 'timezone' argument") + + _setter("schedules", schedules) + _setter("timezone", timezone) @property @pulumi.getter @@ -1142,9 +1525,32 @@ def __init__(__self__, *, """ :param int target_instance_count: The number of instances which should be run for the Worker Nodes. """ - pulumi.set(__self__, "days", days) - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "time", time) + HBaseClusterRolesWorkerNodeAutoscaleRecurrenceSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + target_instance_count=target_instance_count, + time=time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[Sequence[str]] = None, + target_instance_count: Optional[int] = None, + time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if time is None: + raise TypeError("Missing 'time' argument") + + _setter("days", days) + _setter("target_instance_count", target_instance_count) + _setter("time", time) @property @pulumi.getter @@ -1176,10 +1582,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HBaseClusterRolesWorkerNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -1254,18 +1679,55 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + HBaseClusterRolesZookeeperNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[str] = None, + vm_size: Optional[str] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.HBaseClusterRolesZookeeperNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -1339,10 +1801,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HBaseClusterRolesZookeeperNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -1417,14 +1898,63 @@ def __init__(__self__, *, :param str msi_resource_id: The User Assigned Identity for the HDInsight Cluster. Changing this forces a new resource to be created. :param Sequence[str] cluster_users_group_dns: A list of the distinguished names for the cluster user groups. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "aadds_resource_id", aadds_resource_id) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "domain_user_password", domain_user_password) - pulumi.set(__self__, "domain_username", domain_username) - pulumi.set(__self__, "ldaps_urls", ldaps_urls) - pulumi.set(__self__, "msi_resource_id", msi_resource_id) + HBaseClusterSecurityProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + aadds_resource_id=aadds_resource_id, + domain_name=domain_name, + domain_user_password=domain_user_password, + domain_username=domain_username, + ldaps_urls=ldaps_urls, + msi_resource_id=msi_resource_id, + cluster_users_group_dns=cluster_users_group_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aadds_resource_id: Optional[str] = None, + domain_name: Optional[str] = None, + domain_user_password: Optional[str] = None, + domain_username: Optional[str] = None, + ldaps_urls: Optional[Sequence[str]] = None, + msi_resource_id: Optional[str] = None, + cluster_users_group_dns: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aadds_resource_id is None and 'aaddsResourceId' in kwargs: + aadds_resource_id = kwargs['aaddsResourceId'] + if aadds_resource_id is None: + raise TypeError("Missing 'aadds_resource_id' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_user_password is None and 'domainUserPassword' in kwargs: + domain_user_password = kwargs['domainUserPassword'] + if domain_user_password is None: + raise TypeError("Missing 'domain_user_password' argument") + if domain_username is None and 'domainUsername' in kwargs: + domain_username = kwargs['domainUsername'] + if domain_username is None: + raise TypeError("Missing 'domain_username' argument") + if ldaps_urls is None and 'ldapsUrls' in kwargs: + ldaps_urls = kwargs['ldapsUrls'] + if ldaps_urls is None: + raise TypeError("Missing 'ldaps_urls' argument") + if msi_resource_id is None and 'msiResourceId' in kwargs: + msi_resource_id = kwargs['msiResourceId'] + if msi_resource_id is None: + raise TypeError("Missing 'msi_resource_id' argument") + if cluster_users_group_dns is None and 'clusterUsersGroupDns' in kwargs: + cluster_users_group_dns = kwargs['clusterUsersGroupDns'] + + _setter("aadds_resource_id", aadds_resource_id) + _setter("domain_name", domain_name) + _setter("domain_user_password", domain_user_password) + _setter("domain_username", domain_username) + _setter("ldaps_urls", ldaps_urls) + _setter("msi_resource_id", msi_resource_id) if cluster_users_group_dns is not None: - pulumi.set(__self__, "cluster_users_group_dns", cluster_users_group_dns) + _setter("cluster_users_group_dns", cluster_users_group_dns) @property @pulumi.getter(name="aaddsResourceId") @@ -1523,11 +2053,42 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param str storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "storage_container_id", storage_container_id) + HBaseClusterStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_default=is_default, + storage_account_key=storage_account_key, + storage_container_id=storage_container_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_default: Optional[bool] = None, + storage_account_key: Optional[str] = None, + storage_container_id: Optional[str] = None, + storage_resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + + _setter("is_default", is_default) + _setter("storage_account_key", storage_account_key) + _setter("storage_container_id", storage_container_id) if storage_resource_id is not None: - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="isDefault") @@ -1606,10 +2167,43 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param str storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "filesystem_id", filesystem_id) - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "managed_identity_resource_id", managed_identity_resource_id) - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + HBaseClusterStorageAccountGen2._configure( + lambda key, value: pulumi.set(__self__, key, value), + filesystem_id=filesystem_id, + is_default=is_default, + managed_identity_resource_id=managed_identity_resource_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filesystem_id: Optional[str] = None, + is_default: Optional[bool] = None, + managed_identity_resource_id: Optional[str] = None, + storage_resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filesystem_id is None and 'filesystemId' in kwargs: + filesystem_id = kwargs['filesystemId'] + if filesystem_id is None: + raise TypeError("Missing 'filesystem_id' argument") + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if managed_identity_resource_id is None and 'managedIdentityResourceId' in kwargs: + managed_identity_resource_id = kwargs['managedIdentityResourceId'] + if managed_identity_resource_id is None: + raise TypeError("Missing 'managed_identity_resource_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + if storage_resource_id is None: + raise TypeError("Missing 'storage_resource_id' argument") + + _setter("filesystem_id", filesystem_id) + _setter("is_default", is_default) + _setter("managed_identity_resource_id", managed_identity_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="filesystemId") @@ -1655,7 +2249,20 @@ def __init__(__self__, *, """ :param str hadoop: The version of Hadoop which should be used for this HDInsight Hadoop Cluster. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "hadoop", hadoop) + HadoopClusterComponentVersion._configure( + lambda key, value: pulumi.set(__self__, key, value), + hadoop=hadoop, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hadoop: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hadoop is None: + raise TypeError("Missing 'hadoop' argument") + + _setter("hadoop", hadoop) @property @pulumi.getter @@ -1694,10 +2301,27 @@ def __init__(__self__, *, :param bool compute_isolation_enabled: This field indicates whether enable compute isolation or not. Possible values are `true` or `false`. :param str host_sku: The name of the host SKU. """ + HadoopClusterComputeIsolation._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_isolation_enabled=compute_isolation_enabled, + host_sku=host_sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_isolation_enabled: Optional[bool] = None, + host_sku: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_isolation_enabled is None and 'computeIsolationEnabled' in kwargs: + compute_isolation_enabled = kwargs['computeIsolationEnabled'] + if host_sku is None and 'hostSku' in kwargs: + host_sku = kwargs['hostSku'] + if compute_isolation_enabled is not None: - pulumi.set(__self__, "compute_isolation_enabled", compute_isolation_enabled) + _setter("compute_isolation_enabled", compute_isolation_enabled) if host_sku is not None: - pulumi.set(__self__, "host_sku", host_sku) + _setter("host_sku", host_sku) @property @pulumi.getter(name="computeIsolationEnabled") @@ -1752,14 +2376,39 @@ def __init__(__self__, *, :param str key_vault_key_id: The ID of the key vault key. :param str key_vault_managed_identity_id: This is the resource ID of Managed Identity used to access the key vault. """ + HadoopClusterDiskEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption_algorithm=encryption_algorithm, + encryption_at_host_enabled=encryption_at_host_enabled, + key_vault_key_id=key_vault_key_id, + key_vault_managed_identity_id=key_vault_managed_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption_algorithm: Optional[str] = None, + encryption_at_host_enabled: Optional[bool] = None, + key_vault_key_id: Optional[str] = None, + key_vault_managed_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encryption_algorithm is None and 'encryptionAlgorithm' in kwargs: + encryption_algorithm = kwargs['encryptionAlgorithm'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_managed_identity_id is None and 'keyVaultManagedIdentityId' in kwargs: + key_vault_managed_identity_id = kwargs['keyVaultManagedIdentityId'] + if encryption_algorithm is not None: - pulumi.set(__self__, "encryption_algorithm", encryption_algorithm) + _setter("encryption_algorithm", encryption_algorithm) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if key_vault_managed_identity_id is not None: - pulumi.set(__self__, "key_vault_managed_identity_id", key_vault_managed_identity_id) + _setter("key_vault_managed_identity_id", key_vault_managed_identity_id) @property @pulumi.getter(name="encryptionAlgorithm") @@ -1822,8 +2471,29 @@ def __init__(__self__, *, :param str log_analytics_workspace_id: The workspace ID of the log analytics extension. :param str primary_key: The workspace key of the log analytics extension. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + HadoopClusterExtension._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + primary_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -1853,8 +2523,25 @@ def __init__(__self__, *, > **NOTE:** This password must be different from the one used for the `head_node`, `worker_node` and `zookeeper_node` roles. :param str username: The username used for the Ambari Portal. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + HadoopClusterGateway._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -1886,12 +2573,27 @@ def __init__(__self__, *, :param 'HadoopClusterMetastoresHiveArgs' hive: A `hive` block as defined below. :param 'HadoopClusterMetastoresOozieArgs' oozie: An `oozie` block as defined below. """ + HadoopClusterMetastores._configure( + lambda key, value: pulumi.set(__self__, key, value), + ambari=ambari, + hive=hive, + oozie=oozie, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ambari: Optional['outputs.HadoopClusterMetastoresAmbari'] = None, + hive: Optional['outputs.HadoopClusterMetastoresHive'] = None, + oozie: Optional['outputs.HadoopClusterMetastoresOozie'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ambari is not None: - pulumi.set(__self__, "ambari", ambari) + _setter("ambari", ambari) if hive is not None: - pulumi.set(__self__, "hive", hive) + _setter("hive", hive) if oozie is not None: - pulumi.set(__self__, "oozie", oozie) + _setter("oozie", oozie) @property @pulumi.getter @@ -1948,10 +2650,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Ambari metastore. Changing this forces a new resource to be created. :param str username: The external Ambari metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + HadoopClusterMetastoresAmbari._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -2016,10 +2745,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Hive metastore. Changing this forces a new resource to be created. :param str username: The external Hive metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + HadoopClusterMetastoresHive._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -2084,10 +2840,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Oozie metastore. Changing this forces a new resource to be created. :param str username: The external Oozie metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + HadoopClusterMetastoresOozie._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -2150,8 +2933,29 @@ def __init__(__self__, *, :param str log_analytics_workspace_id: The Operations Management Suite (OMS) workspace ID. :param str primary_key: The Operations Management Suite (OMS) workspace key. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + HadoopClusterMonitor._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + primary_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -2200,10 +3004,27 @@ def __init__(__self__, *, > **NOTE:** To enabled the private link the `connection_direction` must be set to `Outbound`. :param bool private_link_enabled: Is the private link enabled? Possible values include `True` or `False`. Defaults to `False`. Changing this forces a new resource to be created. """ + HadoopClusterNetwork._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_direction=connection_direction, + private_link_enabled=private_link_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_direction: Optional[str] = None, + private_link_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_direction is None and 'connectionDirection' in kwargs: + connection_direction = kwargs['connectionDirection'] + if private_link_enabled is None and 'privateLinkEnabled' in kwargs: + private_link_enabled = kwargs['privateLinkEnabled'] + if connection_direction is not None: - pulumi.set(__self__, "connection_direction", connection_direction) + _setter("connection_direction", connection_direction) if private_link_enabled is not None: - pulumi.set(__self__, "private_link_enabled", private_link_enabled) + _setter("private_link_enabled", private_link_enabled) @property @pulumi.getter(name="connectionDirection") @@ -2260,11 +3081,42 @@ def __init__(__self__, *, :param 'HadoopClusterRolesZookeeperNodeArgs' zookeeper_node: A `zookeeper_node` block as defined below. :param 'HadoopClusterRolesEdgeNodeArgs' edge_node: A `edge_node` block as defined below. """ - pulumi.set(__self__, "head_node", head_node) - pulumi.set(__self__, "worker_node", worker_node) - pulumi.set(__self__, "zookeeper_node", zookeeper_node) + HadoopClusterRoles._configure( + lambda key, value: pulumi.set(__self__, key, value), + head_node=head_node, + worker_node=worker_node, + zookeeper_node=zookeeper_node, + edge_node=edge_node, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + head_node: Optional['outputs.HadoopClusterRolesHeadNode'] = None, + worker_node: Optional['outputs.HadoopClusterRolesWorkerNode'] = None, + zookeeper_node: Optional['outputs.HadoopClusterRolesZookeeperNode'] = None, + edge_node: Optional['outputs.HadoopClusterRolesEdgeNode'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if head_node is None and 'headNode' in kwargs: + head_node = kwargs['headNode'] + if head_node is None: + raise TypeError("Missing 'head_node' argument") + if worker_node is None and 'workerNode' in kwargs: + worker_node = kwargs['workerNode'] + if worker_node is None: + raise TypeError("Missing 'worker_node' argument") + if zookeeper_node is None and 'zookeeperNode' in kwargs: + zookeeper_node = kwargs['zookeeperNode'] + if zookeeper_node is None: + raise TypeError("Missing 'zookeeper_node' argument") + if edge_node is None and 'edgeNode' in kwargs: + edge_node = kwargs['edgeNode'] + + _setter("head_node", head_node) + _setter("worker_node", worker_node) + _setter("zookeeper_node", zookeeper_node) if edge_node is not None: - pulumi.set(__self__, "edge_node", edge_node) + _setter("edge_node", edge_node) @property @pulumi.getter(name="headNode") @@ -2339,13 +3191,48 @@ def __init__(__self__, *, :param Sequence['HadoopClusterRolesEdgeNodeHttpsEndpointArgs'] https_endpoints: The HTTPS Connectivity Endpoint for this HDInsight Hadoop Cluster. :param Sequence['HadoopClusterRolesEdgeNodeUninstallScriptActionArgs'] uninstall_script_actions: A `uninstall_script_actions` block as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "install_script_actions", install_script_actions) - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "vm_size", vm_size) + HadoopClusterRolesEdgeNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + install_script_actions=install_script_actions, + target_instance_count=target_instance_count, + vm_size=vm_size, + https_endpoints=https_endpoints, + uninstall_script_actions=uninstall_script_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + install_script_actions: Optional[Sequence['outputs.HadoopClusterRolesEdgeNodeInstallScriptAction']] = None, + target_instance_count: Optional[int] = None, + vm_size: Optional[str] = None, + https_endpoints: Optional[Sequence['outputs.HadoopClusterRolesEdgeNodeHttpsEndpoint']] = None, + uninstall_script_actions: Optional[Sequence['outputs.HadoopClusterRolesEdgeNodeUninstallScriptAction']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if install_script_actions is None and 'installScriptActions' in kwargs: + install_script_actions = kwargs['installScriptActions'] + if install_script_actions is None: + raise TypeError("Missing 'install_script_actions' argument") + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if https_endpoints is None and 'httpsEndpoints' in kwargs: + https_endpoints = kwargs['httpsEndpoints'] + if uninstall_script_actions is None and 'uninstallScriptActions' in kwargs: + uninstall_script_actions = kwargs['uninstallScriptActions'] + + _setter("install_script_actions", install_script_actions) + _setter("target_instance_count", target_instance_count) + _setter("vm_size", vm_size) if https_endpoints is not None: - pulumi.set(__self__, "https_endpoints", https_endpoints) + _setter("https_endpoints", https_endpoints) if uninstall_script_actions is not None: - pulumi.set(__self__, "uninstall_script_actions", uninstall_script_actions) + _setter("uninstall_script_actions", uninstall_script_actions) @property @pulumi.getter(name="installScriptActions") @@ -2428,16 +3315,45 @@ def __init__(__self__, *, :param str private_ip_address: The private ip address of the endpoint. :param str sub_domain_suffix: The application's subdomain suffix. """ + HadoopClusterRolesEdgeNodeHttpsEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_modes=access_modes, + destination_port=destination_port, + disable_gateway_auth=disable_gateway_auth, + private_ip_address=private_ip_address, + sub_domain_suffix=sub_domain_suffix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_modes: Optional[Sequence[str]] = None, + destination_port: Optional[int] = None, + disable_gateway_auth: Optional[bool] = None, + private_ip_address: Optional[str] = None, + sub_domain_suffix: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_modes is None and 'accessModes' in kwargs: + access_modes = kwargs['accessModes'] + if destination_port is None and 'destinationPort' in kwargs: + destination_port = kwargs['destinationPort'] + if disable_gateway_auth is None and 'disableGatewayAuth' in kwargs: + disable_gateway_auth = kwargs['disableGatewayAuth'] + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if sub_domain_suffix is None and 'subDomainSuffix' in kwargs: + sub_domain_suffix = kwargs['subDomainSuffix'] + if access_modes is not None: - pulumi.set(__self__, "access_modes", access_modes) + _setter("access_modes", access_modes) if destination_port is not None: - pulumi.set(__self__, "destination_port", destination_port) + _setter("destination_port", destination_port) if disable_gateway_auth is not None: - pulumi.set(__self__, "disable_gateway_auth", disable_gateway_auth) + _setter("disable_gateway_auth", disable_gateway_auth) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if sub_domain_suffix is not None: - pulumi.set(__self__, "sub_domain_suffix", sub_domain_suffix) + _setter("sub_domain_suffix", sub_domain_suffix) @property @pulumi.getter(name="accessModes") @@ -2491,10 +3407,29 @@ def __init__(__self__, *, :param str uri: The URI pointing to the script to run during the installation of the edge node. :param str parameters: The parameters for the script. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HadoopClusterRolesEdgeNodeInstallScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -2532,10 +3467,29 @@ def __init__(__self__, *, :param str uri: The URI pointing to the script to run during the installation of the edge node. :param str parameters: The parameters for the script. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HadoopClusterRolesEdgeNodeUninstallScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -2610,18 +3564,55 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + HadoopClusterRolesHeadNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[str] = None, + vm_size: Optional[str] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.HadoopClusterRolesHeadNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -2695,10 +3686,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HadoopClusterRolesHeadNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -2779,21 +3789,66 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + HadoopClusterRolesWorkerNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_instance_count=target_instance_count, + username=username, + vm_size=vm_size, + autoscale=autoscale, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_instance_count: Optional[int] = None, + username: Optional[str] = None, + vm_size: Optional[str] = None, + autoscale: Optional['outputs.HadoopClusterRolesWorkerNodeAutoscale'] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.HadoopClusterRolesWorkerNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("target_instance_count", target_instance_count) + _setter("username", username) + _setter("vm_size", vm_size) if autoscale is not None: - pulumi.set(__self__, "autoscale", autoscale) + _setter("autoscale", autoscale) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="targetInstanceCount") @@ -2883,10 +3938,23 @@ def __init__(__self__, *, > **NOTE:** Either a `capacity` or `recurrence` block must be specified - but not both. """ + HadoopClusterRolesWorkerNodeAutoscale._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + recurrence=recurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional['outputs.HadoopClusterRolesWorkerNodeAutoscaleCapacity'] = None, + recurrence: Optional['outputs.HadoopClusterRolesWorkerNodeAutoscaleRecurrence'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) @property @pulumi.getter @@ -2935,8 +4003,29 @@ def __init__(__self__, *, :param int max_instance_count: The maximum number of worker nodes to autoscale to based on the cluster's activity. :param int min_instance_count: The minimum number of worker nodes to autoscale to based on the cluster's activity. """ - pulumi.set(__self__, "max_instance_count", max_instance_count) - pulumi.set(__self__, "min_instance_count", min_instance_count) + HadoopClusterRolesWorkerNodeAutoscaleCapacity._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_instance_count=max_instance_count, + min_instance_count=min_instance_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_instance_count: Optional[int] = None, + min_instance_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_instance_count is None and 'maxInstanceCount' in kwargs: + max_instance_count = kwargs['maxInstanceCount'] + if max_instance_count is None: + raise TypeError("Missing 'max_instance_count' argument") + if min_instance_count is None and 'minInstanceCount' in kwargs: + min_instance_count = kwargs['minInstanceCount'] + if min_instance_count is None: + raise TypeError("Missing 'min_instance_count' argument") + + _setter("max_instance_count", max_instance_count) + _setter("min_instance_count", min_instance_count) @property @pulumi.getter(name="maxInstanceCount") @@ -2964,8 +4053,25 @@ def __init__(__self__, *, :param Sequence['HadoopClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs'] schedules: A list of `schedule` blocks as defined below. :param str timezone: The time zone for the autoscale schedule times. """ - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "timezone", timezone) + HadoopClusterRolesWorkerNodeAutoscaleRecurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + schedules=schedules, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schedules: Optional[Sequence['outputs.HadoopClusterRolesWorkerNodeAutoscaleRecurrenceSchedule']] = None, + timezone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if timezone is None: + raise TypeError("Missing 'timezone' argument") + + _setter("schedules", schedules) + _setter("timezone", timezone) @property @pulumi.getter @@ -3012,9 +4118,32 @@ def __init__(__self__, *, :param int target_instance_count: The number of worker nodes to autoscale at the specified time. :param str time: The time of day to perform the autoscale in 24hour format. """ - pulumi.set(__self__, "days", days) - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "time", time) + HadoopClusterRolesWorkerNodeAutoscaleRecurrenceSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + target_instance_count=target_instance_count, + time=time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[Sequence[str]] = None, + target_instance_count: Optional[int] = None, + time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if time is None: + raise TypeError("Missing 'time' argument") + + _setter("days", days) + _setter("target_instance_count", target_instance_count) + _setter("time", time) @property @pulumi.getter @@ -3052,10 +4181,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HadoopClusterRolesWorkerNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3130,18 +4278,55 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + HadoopClusterRolesZookeeperNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[str] = None, + vm_size: Optional[str] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.HadoopClusterRolesZookeeperNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -3215,10 +4400,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + HadoopClusterRolesZookeeperNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -3293,14 +4497,63 @@ def __init__(__self__, *, :param str msi_resource_id: The User Assigned Identity for the HDInsight Cluster. Changing this forces a new resource to be created. :param Sequence[str] cluster_users_group_dns: A list of the distinguished names for the cluster user groups. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "aadds_resource_id", aadds_resource_id) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "domain_user_password", domain_user_password) - pulumi.set(__self__, "domain_username", domain_username) - pulumi.set(__self__, "ldaps_urls", ldaps_urls) - pulumi.set(__self__, "msi_resource_id", msi_resource_id) + HadoopClusterSecurityProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + aadds_resource_id=aadds_resource_id, + domain_name=domain_name, + domain_user_password=domain_user_password, + domain_username=domain_username, + ldaps_urls=ldaps_urls, + msi_resource_id=msi_resource_id, + cluster_users_group_dns=cluster_users_group_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aadds_resource_id: Optional[str] = None, + domain_name: Optional[str] = None, + domain_user_password: Optional[str] = None, + domain_username: Optional[str] = None, + ldaps_urls: Optional[Sequence[str]] = None, + msi_resource_id: Optional[str] = None, + cluster_users_group_dns: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aadds_resource_id is None and 'aaddsResourceId' in kwargs: + aadds_resource_id = kwargs['aaddsResourceId'] + if aadds_resource_id is None: + raise TypeError("Missing 'aadds_resource_id' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_user_password is None and 'domainUserPassword' in kwargs: + domain_user_password = kwargs['domainUserPassword'] + if domain_user_password is None: + raise TypeError("Missing 'domain_user_password' argument") + if domain_username is None and 'domainUsername' in kwargs: + domain_username = kwargs['domainUsername'] + if domain_username is None: + raise TypeError("Missing 'domain_username' argument") + if ldaps_urls is None and 'ldapsUrls' in kwargs: + ldaps_urls = kwargs['ldapsUrls'] + if ldaps_urls is None: + raise TypeError("Missing 'ldaps_urls' argument") + if msi_resource_id is None and 'msiResourceId' in kwargs: + msi_resource_id = kwargs['msiResourceId'] + if msi_resource_id is None: + raise TypeError("Missing 'msi_resource_id' argument") + if cluster_users_group_dns is None and 'clusterUsersGroupDns' in kwargs: + cluster_users_group_dns = kwargs['clusterUsersGroupDns'] + + _setter("aadds_resource_id", aadds_resource_id) + _setter("domain_name", domain_name) + _setter("domain_user_password", domain_user_password) + _setter("domain_username", domain_username) + _setter("ldaps_urls", ldaps_urls) + _setter("msi_resource_id", msi_resource_id) if cluster_users_group_dns is not None: - pulumi.set(__self__, "cluster_users_group_dns", cluster_users_group_dns) + _setter("cluster_users_group_dns", cluster_users_group_dns) @property @pulumi.getter(name="aaddsResourceId") @@ -3399,11 +4652,42 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param str storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "storage_container_id", storage_container_id) + HadoopClusterStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_default=is_default, + storage_account_key=storage_account_key, + storage_container_id=storage_container_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_default: Optional[bool] = None, + storage_account_key: Optional[str] = None, + storage_container_id: Optional[str] = None, + storage_resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + + _setter("is_default", is_default) + _setter("storage_account_key", storage_account_key) + _setter("storage_container_id", storage_container_id) if storage_resource_id is not None: - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="isDefault") @@ -3482,10 +4766,43 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param str storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "filesystem_id", filesystem_id) - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "managed_identity_resource_id", managed_identity_resource_id) - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + HadoopClusterStorageAccountGen2._configure( + lambda key, value: pulumi.set(__self__, key, value), + filesystem_id=filesystem_id, + is_default=is_default, + managed_identity_resource_id=managed_identity_resource_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filesystem_id: Optional[str] = None, + is_default: Optional[bool] = None, + managed_identity_resource_id: Optional[str] = None, + storage_resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filesystem_id is None and 'filesystemId' in kwargs: + filesystem_id = kwargs['filesystemId'] + if filesystem_id is None: + raise TypeError("Missing 'filesystem_id' argument") + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if managed_identity_resource_id is None and 'managedIdentityResourceId' in kwargs: + managed_identity_resource_id = kwargs['managedIdentityResourceId'] + if managed_identity_resource_id is None: + raise TypeError("Missing 'managed_identity_resource_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + if storage_resource_id is None: + raise TypeError("Missing 'storage_resource_id' argument") + + _setter("filesystem_id", filesystem_id) + _setter("is_default", is_default) + _setter("managed_identity_resource_id", managed_identity_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="filesystemId") @@ -3548,7 +4865,22 @@ def __init__(__self__, *, """ :param str interactive_hive: The version of Interactive Query which should be used for this HDInsight Interactive Query Cluster. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "interactive_hive", interactive_hive) + InteractiveQueryClusterComponentVersion._configure( + lambda key, value: pulumi.set(__self__, key, value), + interactive_hive=interactive_hive, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + interactive_hive: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if interactive_hive is None and 'interactiveHive' in kwargs: + interactive_hive = kwargs['interactiveHive'] + if interactive_hive is None: + raise TypeError("Missing 'interactive_hive' argument") + + _setter("interactive_hive", interactive_hive) @property @pulumi.getter(name="interactiveHive") @@ -3587,10 +4919,27 @@ def __init__(__self__, *, :param bool compute_isolation_enabled: This field indicates whether enable compute isolation or not. Possible values are `true` or `false`. :param str host_sku: The name of the host SKU. """ + InteractiveQueryClusterComputeIsolation._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_isolation_enabled=compute_isolation_enabled, + host_sku=host_sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_isolation_enabled: Optional[bool] = None, + host_sku: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_isolation_enabled is None and 'computeIsolationEnabled' in kwargs: + compute_isolation_enabled = kwargs['computeIsolationEnabled'] + if host_sku is None and 'hostSku' in kwargs: + host_sku = kwargs['hostSku'] + if compute_isolation_enabled is not None: - pulumi.set(__self__, "compute_isolation_enabled", compute_isolation_enabled) + _setter("compute_isolation_enabled", compute_isolation_enabled) if host_sku is not None: - pulumi.set(__self__, "host_sku", host_sku) + _setter("host_sku", host_sku) @property @pulumi.getter(name="computeIsolationEnabled") @@ -3645,14 +4994,39 @@ def __init__(__self__, *, :param str key_vault_key_id: The ID of the key vault key. :param str key_vault_managed_identity_id: This is the resource ID of Managed Identity used to access the key vault. """ + InteractiveQueryClusterDiskEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption_algorithm=encryption_algorithm, + encryption_at_host_enabled=encryption_at_host_enabled, + key_vault_key_id=key_vault_key_id, + key_vault_managed_identity_id=key_vault_managed_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption_algorithm: Optional[str] = None, + encryption_at_host_enabled: Optional[bool] = None, + key_vault_key_id: Optional[str] = None, + key_vault_managed_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encryption_algorithm is None and 'encryptionAlgorithm' in kwargs: + encryption_algorithm = kwargs['encryptionAlgorithm'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_managed_identity_id is None and 'keyVaultManagedIdentityId' in kwargs: + key_vault_managed_identity_id = kwargs['keyVaultManagedIdentityId'] + if encryption_algorithm is not None: - pulumi.set(__self__, "encryption_algorithm", encryption_algorithm) + _setter("encryption_algorithm", encryption_algorithm) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if key_vault_managed_identity_id is not None: - pulumi.set(__self__, "key_vault_managed_identity_id", key_vault_managed_identity_id) + _setter("key_vault_managed_identity_id", key_vault_managed_identity_id) @property @pulumi.getter(name="encryptionAlgorithm") @@ -3715,8 +5089,29 @@ def __init__(__self__, *, :param str log_analytics_workspace_id: The workspace ID of the log analytics extension. :param str primary_key: The workspace key of the log analytics extension. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + InteractiveQueryClusterExtension._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + primary_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -3746,8 +5141,25 @@ def __init__(__self__, *, > **NOTE:** This password must be different from the one used for the `head_node`, `worker_node` and `zookeeper_node` roles. :param str username: The username used for the Ambari Portal. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + InteractiveQueryClusterGateway._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -3779,12 +5191,27 @@ def __init__(__self__, *, :param 'InteractiveQueryClusterMetastoresHiveArgs' hive: A `hive` block as defined below. :param 'InteractiveQueryClusterMetastoresOozieArgs' oozie: An `oozie` block as defined below. """ + InteractiveQueryClusterMetastores._configure( + lambda key, value: pulumi.set(__self__, key, value), + ambari=ambari, + hive=hive, + oozie=oozie, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ambari: Optional['outputs.InteractiveQueryClusterMetastoresAmbari'] = None, + hive: Optional['outputs.InteractiveQueryClusterMetastoresHive'] = None, + oozie: Optional['outputs.InteractiveQueryClusterMetastoresOozie'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ambari is not None: - pulumi.set(__self__, "ambari", ambari) + _setter("ambari", ambari) if hive is not None: - pulumi.set(__self__, "hive", hive) + _setter("hive", hive) if oozie is not None: - pulumi.set(__self__, "oozie", oozie) + _setter("oozie", oozie) @property @pulumi.getter @@ -3841,10 +5268,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Ambari metastore. Changing this forces a new resource to be created. :param str username: The external Ambari metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + InteractiveQueryClusterMetastoresAmbari._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -3909,10 +5363,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Hive metastore. Changing this forces a new resource to be created. :param str username: The external Hive metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + InteractiveQueryClusterMetastoresHive._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -3977,10 +5458,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Oozie metastore. Changing this forces a new resource to be created. :param str username: The external Oozie metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + InteractiveQueryClusterMetastoresOozie._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -4043,8 +5551,29 @@ def __init__(__self__, *, :param str log_analytics_workspace_id: The Operations Management Suite (OMS) workspace ID. :param str primary_key: The Operations Management Suite (OMS) workspace key. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + InteractiveQueryClusterMonitor._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + primary_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -4093,10 +5622,27 @@ def __init__(__self__, *, > **NOTE:** To enabled the private link the `connection_direction` must be set to `Outbound`. :param bool private_link_enabled: Is the private link enabled? Possible values include `True` or `False`. Defaults to `False`. Changing this forces a new resource to be created. """ + InteractiveQueryClusterNetwork._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_direction=connection_direction, + private_link_enabled=private_link_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_direction: Optional[str] = None, + private_link_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_direction is None and 'connectionDirection' in kwargs: + connection_direction = kwargs['connectionDirection'] + if private_link_enabled is None and 'privateLinkEnabled' in kwargs: + private_link_enabled = kwargs['privateLinkEnabled'] + if connection_direction is not None: - pulumi.set(__self__, "connection_direction", connection_direction) + _setter("connection_direction", connection_direction) if private_link_enabled is not None: - pulumi.set(__self__, "private_link_enabled", private_link_enabled) + _setter("private_link_enabled", private_link_enabled) @property @pulumi.getter(name="connectionDirection") @@ -4149,9 +5695,36 @@ def __init__(__self__, *, :param 'InteractiveQueryClusterRolesWorkerNodeArgs' worker_node: A `worker_node` block as defined below. :param 'InteractiveQueryClusterRolesZookeeperNodeArgs' zookeeper_node: A `zookeeper_node` block as defined below. """ - pulumi.set(__self__, "head_node", head_node) - pulumi.set(__self__, "worker_node", worker_node) - pulumi.set(__self__, "zookeeper_node", zookeeper_node) + InteractiveQueryClusterRoles._configure( + lambda key, value: pulumi.set(__self__, key, value), + head_node=head_node, + worker_node=worker_node, + zookeeper_node=zookeeper_node, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + head_node: Optional['outputs.InteractiveQueryClusterRolesHeadNode'] = None, + worker_node: Optional['outputs.InteractiveQueryClusterRolesWorkerNode'] = None, + zookeeper_node: Optional['outputs.InteractiveQueryClusterRolesZookeeperNode'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if head_node is None and 'headNode' in kwargs: + head_node = kwargs['headNode'] + if head_node is None: + raise TypeError("Missing 'head_node' argument") + if worker_node is None and 'workerNode' in kwargs: + worker_node = kwargs['workerNode'] + if worker_node is None: + raise TypeError("Missing 'worker_node' argument") + if zookeeper_node is None and 'zookeeperNode' in kwargs: + zookeeper_node = kwargs['zookeeperNode'] + if zookeeper_node is None: + raise TypeError("Missing 'zookeeper_node' argument") + + _setter("head_node", head_node) + _setter("worker_node", worker_node) + _setter("zookeeper_node", zookeeper_node) @property @pulumi.getter(name="headNode") @@ -4228,18 +5801,55 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + InteractiveQueryClusterRolesHeadNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[str] = None, + vm_size: Optional[str] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.InteractiveQueryClusterRolesHeadNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -4315,10 +5925,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + InteractiveQueryClusterRolesHeadNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -4401,21 +6030,66 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + InteractiveQueryClusterRolesWorkerNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_instance_count=target_instance_count, + username=username, + vm_size=vm_size, + autoscale=autoscale, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_instance_count: Optional[int] = None, + username: Optional[str] = None, + vm_size: Optional[str] = None, + autoscale: Optional['outputs.InteractiveQueryClusterRolesWorkerNodeAutoscale'] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.InteractiveQueryClusterRolesWorkerNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("target_instance_count", target_instance_count) + _setter("username", username) + _setter("vm_size", vm_size) if autoscale is not None: - pulumi.set(__self__, "autoscale", autoscale) + _setter("autoscale", autoscale) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="targetInstanceCount") @@ -4504,10 +6178,23 @@ def __init__(__self__, *, """ :param 'InteractiveQueryClusterRolesWorkerNodeAutoscaleRecurrenceArgs' recurrence: A `recurrence` block as defined below. """ + InteractiveQueryClusterRolesWorkerNodeAutoscale._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + recurrence=recurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional['outputs.InteractiveQueryClusterRolesWorkerNodeAutoscaleCapacity'] = None, + recurrence: Optional['outputs.InteractiveQueryClusterRolesWorkerNodeAutoscaleRecurrence'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) @property @pulumi.getter @@ -4550,8 +6237,29 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, max_instance_count: int, min_instance_count: int): - pulumi.set(__self__, "max_instance_count", max_instance_count) - pulumi.set(__self__, "min_instance_count", min_instance_count) + InteractiveQueryClusterRolesWorkerNodeAutoscaleCapacity._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_instance_count=max_instance_count, + min_instance_count=min_instance_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_instance_count: Optional[int] = None, + min_instance_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_instance_count is None and 'maxInstanceCount' in kwargs: + max_instance_count = kwargs['maxInstanceCount'] + if max_instance_count is None: + raise TypeError("Missing 'max_instance_count' argument") + if min_instance_count is None and 'minInstanceCount' in kwargs: + min_instance_count = kwargs['minInstanceCount'] + if min_instance_count is None: + raise TypeError("Missing 'min_instance_count' argument") + + _setter("max_instance_count", max_instance_count) + _setter("min_instance_count", min_instance_count) @property @pulumi.getter(name="maxInstanceCount") @@ -4573,8 +6281,25 @@ def __init__(__self__, *, :param Sequence['InteractiveQueryClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs'] schedules: A list of `schedule` blocks as defined below. :param str timezone: The time zone for the autoscale schedule times. """ - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "timezone", timezone) + InteractiveQueryClusterRolesWorkerNodeAutoscaleRecurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + schedules=schedules, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schedules: Optional[Sequence['outputs.InteractiveQueryClusterRolesWorkerNodeAutoscaleRecurrenceSchedule']] = None, + timezone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if timezone is None: + raise TypeError("Missing 'timezone' argument") + + _setter("schedules", schedules) + _setter("timezone", timezone) @property @pulumi.getter @@ -4621,9 +6346,32 @@ def __init__(__self__, *, :param int target_instance_count: The number of worker nodes to autoscale at the specified time. :param str time: The time of day to perform the autoscale in 24hour format. """ - pulumi.set(__self__, "days", days) - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "time", time) + InteractiveQueryClusterRolesWorkerNodeAutoscaleRecurrenceSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + target_instance_count=target_instance_count, + time=time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[Sequence[str]] = None, + target_instance_count: Optional[int] = None, + time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if time is None: + raise TypeError("Missing 'time' argument") + + _setter("days", days) + _setter("target_instance_count", target_instance_count) + _setter("time", time) @property @pulumi.getter @@ -4661,10 +6409,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + InteractiveQueryClusterRolesWorkerNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -4739,18 +6506,55 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + InteractiveQueryClusterRolesZookeeperNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[str] = None, + vm_size: Optional[str] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.InteractiveQueryClusterRolesZookeeperNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -4824,10 +6628,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + InteractiveQueryClusterRolesZookeeperNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -4902,14 +6725,63 @@ def __init__(__self__, *, :param str msi_resource_id: The User Assigned Identity for the HDInsight Cluster. Changing this forces a new resource to be created. :param Sequence[str] cluster_users_group_dns: A list of the distinguished names for the cluster user groups. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "aadds_resource_id", aadds_resource_id) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "domain_user_password", domain_user_password) - pulumi.set(__self__, "domain_username", domain_username) - pulumi.set(__self__, "ldaps_urls", ldaps_urls) - pulumi.set(__self__, "msi_resource_id", msi_resource_id) + InteractiveQueryClusterSecurityProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + aadds_resource_id=aadds_resource_id, + domain_name=domain_name, + domain_user_password=domain_user_password, + domain_username=domain_username, + ldaps_urls=ldaps_urls, + msi_resource_id=msi_resource_id, + cluster_users_group_dns=cluster_users_group_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aadds_resource_id: Optional[str] = None, + domain_name: Optional[str] = None, + domain_user_password: Optional[str] = None, + domain_username: Optional[str] = None, + ldaps_urls: Optional[Sequence[str]] = None, + msi_resource_id: Optional[str] = None, + cluster_users_group_dns: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aadds_resource_id is None and 'aaddsResourceId' in kwargs: + aadds_resource_id = kwargs['aaddsResourceId'] + if aadds_resource_id is None: + raise TypeError("Missing 'aadds_resource_id' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_user_password is None and 'domainUserPassword' in kwargs: + domain_user_password = kwargs['domainUserPassword'] + if domain_user_password is None: + raise TypeError("Missing 'domain_user_password' argument") + if domain_username is None and 'domainUsername' in kwargs: + domain_username = kwargs['domainUsername'] + if domain_username is None: + raise TypeError("Missing 'domain_username' argument") + if ldaps_urls is None and 'ldapsUrls' in kwargs: + ldaps_urls = kwargs['ldapsUrls'] + if ldaps_urls is None: + raise TypeError("Missing 'ldaps_urls' argument") + if msi_resource_id is None and 'msiResourceId' in kwargs: + msi_resource_id = kwargs['msiResourceId'] + if msi_resource_id is None: + raise TypeError("Missing 'msi_resource_id' argument") + if cluster_users_group_dns is None and 'clusterUsersGroupDns' in kwargs: + cluster_users_group_dns = kwargs['clusterUsersGroupDns'] + + _setter("aadds_resource_id", aadds_resource_id) + _setter("domain_name", domain_name) + _setter("domain_user_password", domain_user_password) + _setter("domain_username", domain_username) + _setter("ldaps_urls", ldaps_urls) + _setter("msi_resource_id", msi_resource_id) if cluster_users_group_dns is not None: - pulumi.set(__self__, "cluster_users_group_dns", cluster_users_group_dns) + _setter("cluster_users_group_dns", cluster_users_group_dns) @property @pulumi.getter(name="aaddsResourceId") @@ -5008,11 +6880,42 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param str storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "storage_container_id", storage_container_id) + InteractiveQueryClusterStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_default=is_default, + storage_account_key=storage_account_key, + storage_container_id=storage_container_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_default: Optional[bool] = None, + storage_account_key: Optional[str] = None, + storage_container_id: Optional[str] = None, + storage_resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + + _setter("is_default", is_default) + _setter("storage_account_key", storage_account_key) + _setter("storage_container_id", storage_container_id) if storage_resource_id is not None: - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="isDefault") @@ -5091,10 +6994,43 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param str storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "filesystem_id", filesystem_id) - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "managed_identity_resource_id", managed_identity_resource_id) - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + InteractiveQueryClusterStorageAccountGen2._configure( + lambda key, value: pulumi.set(__self__, key, value), + filesystem_id=filesystem_id, + is_default=is_default, + managed_identity_resource_id=managed_identity_resource_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filesystem_id: Optional[str] = None, + is_default: Optional[bool] = None, + managed_identity_resource_id: Optional[str] = None, + storage_resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filesystem_id is None and 'filesystemId' in kwargs: + filesystem_id = kwargs['filesystemId'] + if filesystem_id is None: + raise TypeError("Missing 'filesystem_id' argument") + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if managed_identity_resource_id is None and 'managedIdentityResourceId' in kwargs: + managed_identity_resource_id = kwargs['managedIdentityResourceId'] + if managed_identity_resource_id is None: + raise TypeError("Missing 'managed_identity_resource_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + if storage_resource_id is None: + raise TypeError("Missing 'storage_resource_id' argument") + + _setter("filesystem_id", filesystem_id) + _setter("is_default", is_default) + _setter("managed_identity_resource_id", managed_identity_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="filesystemId") @@ -5140,7 +7076,20 @@ def __init__(__self__, *, """ :param str kafka: The version of Kafka which should be used for this HDInsight Kafka Cluster. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "kafka", kafka) + KafkaClusterComponentVersion._configure( + lambda key, value: pulumi.set(__self__, key, value), + kafka=kafka, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kafka: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kafka is None: + raise TypeError("Missing 'kafka' argument") + + _setter("kafka", kafka) @property @pulumi.getter @@ -5179,10 +7128,27 @@ def __init__(__self__, *, :param bool compute_isolation_enabled: This field indicates whether enable compute isolation or not. Possible values are `true` or `false`. :param str host_sku: The name of the host SKU. """ + KafkaClusterComputeIsolation._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_isolation_enabled=compute_isolation_enabled, + host_sku=host_sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_isolation_enabled: Optional[bool] = None, + host_sku: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_isolation_enabled is None and 'computeIsolationEnabled' in kwargs: + compute_isolation_enabled = kwargs['computeIsolationEnabled'] + if host_sku is None and 'hostSku' in kwargs: + host_sku = kwargs['hostSku'] + if compute_isolation_enabled is not None: - pulumi.set(__self__, "compute_isolation_enabled", compute_isolation_enabled) + _setter("compute_isolation_enabled", compute_isolation_enabled) if host_sku is not None: - pulumi.set(__self__, "host_sku", host_sku) + _setter("host_sku", host_sku) @property @pulumi.getter(name="computeIsolationEnabled") @@ -5237,14 +7203,39 @@ def __init__(__self__, *, :param str key_vault_key_id: The ID of the key vault key. :param str key_vault_managed_identity_id: This is the resource ID of Managed Identity used to access the key vault. """ + KafkaClusterDiskEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption_algorithm=encryption_algorithm, + encryption_at_host_enabled=encryption_at_host_enabled, + key_vault_key_id=key_vault_key_id, + key_vault_managed_identity_id=key_vault_managed_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption_algorithm: Optional[str] = None, + encryption_at_host_enabled: Optional[bool] = None, + key_vault_key_id: Optional[str] = None, + key_vault_managed_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encryption_algorithm is None and 'encryptionAlgorithm' in kwargs: + encryption_algorithm = kwargs['encryptionAlgorithm'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_managed_identity_id is None and 'keyVaultManagedIdentityId' in kwargs: + key_vault_managed_identity_id = kwargs['keyVaultManagedIdentityId'] + if encryption_algorithm is not None: - pulumi.set(__self__, "encryption_algorithm", encryption_algorithm) + _setter("encryption_algorithm", encryption_algorithm) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if key_vault_managed_identity_id is not None: - pulumi.set(__self__, "key_vault_managed_identity_id", key_vault_managed_identity_id) + _setter("key_vault_managed_identity_id", key_vault_managed_identity_id) @property @pulumi.getter(name="encryptionAlgorithm") @@ -5307,8 +7298,29 @@ def __init__(__self__, *, :param str log_analytics_workspace_id: The workspace ID of the log analytics extension. :param str primary_key: The workspace key of the log analytics extension. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + KafkaClusterExtension._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + primary_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -5338,8 +7350,25 @@ def __init__(__self__, *, > **NOTE:** This password must be different from the one used for the `head_node`, `worker_node` and `zookeeper_node` roles. :param str username: The username used for the Ambari Portal. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + KafkaClusterGateway._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -5371,12 +7400,27 @@ def __init__(__self__, *, :param 'KafkaClusterMetastoresHiveArgs' hive: A `hive` block as defined below. :param 'KafkaClusterMetastoresOozieArgs' oozie: An `oozie` block as defined below. """ + KafkaClusterMetastores._configure( + lambda key, value: pulumi.set(__self__, key, value), + ambari=ambari, + hive=hive, + oozie=oozie, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ambari: Optional['outputs.KafkaClusterMetastoresAmbari'] = None, + hive: Optional['outputs.KafkaClusterMetastoresHive'] = None, + oozie: Optional['outputs.KafkaClusterMetastoresOozie'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ambari is not None: - pulumi.set(__self__, "ambari", ambari) + _setter("ambari", ambari) if hive is not None: - pulumi.set(__self__, "hive", hive) + _setter("hive", hive) if oozie is not None: - pulumi.set(__self__, "oozie", oozie) + _setter("oozie", oozie) @property @pulumi.getter @@ -5433,10 +7477,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Ambari metastore. Changing this forces a new resource to be created. :param str username: The external Ambari metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + KafkaClusterMetastoresAmbari._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -5501,10 +7572,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Hive metastore. Changing this forces a new resource to be created. :param str username: The external Hive metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + KafkaClusterMetastoresHive._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -5569,10 +7667,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Oozie metastore. Changing this forces a new resource to be created. :param str username: The external Oozie metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + KafkaClusterMetastoresOozie._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -5635,8 +7760,29 @@ def __init__(__self__, *, :param str log_analytics_workspace_id: The Operations Management Suite (OMS) workspace ID. :param str primary_key: The Operations Management Suite (OMS) workspace key. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + KafkaClusterMonitor._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + primary_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -5685,10 +7831,27 @@ def __init__(__self__, *, > **NOTE:** To enabled the private link the `connection_direction` must be set to `Outbound`. :param bool private_link_enabled: Is the private link enabled? Possible values include `True` or `False`. Defaults to `False`. Changing this forces a new resource to be created. """ + KafkaClusterNetwork._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_direction=connection_direction, + private_link_enabled=private_link_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_direction: Optional[str] = None, + private_link_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_direction is None and 'connectionDirection' in kwargs: + connection_direction = kwargs['connectionDirection'] + if private_link_enabled is None and 'privateLinkEnabled' in kwargs: + private_link_enabled = kwargs['privateLinkEnabled'] + if connection_direction is not None: - pulumi.set(__self__, "connection_direction", connection_direction) + _setter("connection_direction", connection_direction) if private_link_enabled is not None: - pulumi.set(__self__, "private_link_enabled", private_link_enabled) + _setter("private_link_enabled", private_link_enabled) @property @pulumi.getter(name="connectionDirection") @@ -5739,8 +7902,29 @@ def __init__(__self__, *, > **Note:** The `security_group_name` property will be Required in version 3.0 of the AzureRM Provider. """ - pulumi.set(__self__, "security_group_id", security_group_id) - pulumi.set(__self__, "security_group_name", security_group_name) + KafkaClusterRestProxy._configure( + lambda key, value: pulumi.set(__self__, key, value), + security_group_id=security_group_id, + security_group_name=security_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + security_group_id: Optional[str] = None, + security_group_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if security_group_id is None and 'securityGroupId' in kwargs: + security_group_id = kwargs['securityGroupId'] + if security_group_id is None: + raise TypeError("Missing 'security_group_id' argument") + if security_group_name is None and 'securityGroupName' in kwargs: + security_group_name = kwargs['securityGroupName'] + if security_group_name is None: + raise TypeError("Missing 'security_group_name' argument") + + _setter("security_group_id", security_group_id) + _setter("security_group_name", security_group_name) @property @pulumi.getter(name="securityGroupId") @@ -5799,11 +7983,42 @@ def __init__(__self__, *, > **Note:** This property has been deprecated and will be removed in version 4.0. """ - pulumi.set(__self__, "head_node", head_node) - pulumi.set(__self__, "worker_node", worker_node) - pulumi.set(__self__, "zookeeper_node", zookeeper_node) + KafkaClusterRoles._configure( + lambda key, value: pulumi.set(__self__, key, value), + head_node=head_node, + worker_node=worker_node, + zookeeper_node=zookeeper_node, + kafka_management_node=kafka_management_node, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + head_node: Optional['outputs.KafkaClusterRolesHeadNode'] = None, + worker_node: Optional['outputs.KafkaClusterRolesWorkerNode'] = None, + zookeeper_node: Optional['outputs.KafkaClusterRolesZookeeperNode'] = None, + kafka_management_node: Optional['outputs.KafkaClusterRolesKafkaManagementNode'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if head_node is None and 'headNode' in kwargs: + head_node = kwargs['headNode'] + if head_node is None: + raise TypeError("Missing 'head_node' argument") + if worker_node is None and 'workerNode' in kwargs: + worker_node = kwargs['workerNode'] + if worker_node is None: + raise TypeError("Missing 'worker_node' argument") + if zookeeper_node is None and 'zookeeperNode' in kwargs: + zookeeper_node = kwargs['zookeeperNode'] + if zookeeper_node is None: + raise TypeError("Missing 'zookeeper_node' argument") + if kafka_management_node is None and 'kafkaManagementNode' in kwargs: + kafka_management_node = kwargs['kafkaManagementNode'] + + _setter("head_node", head_node) + _setter("worker_node", worker_node) + _setter("zookeeper_node", zookeeper_node) if kafka_management_node is not None: - pulumi.set(__self__, "kafka_management_node", kafka_management_node) + _setter("kafka_management_node", kafka_management_node) @property @pulumi.getter(name="headNode") @@ -5888,18 +8103,55 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + KafkaClusterRolesHeadNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[str] = None, + vm_size: Optional[str] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.KafkaClusterRolesHeadNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -5973,10 +8225,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + KafkaClusterRolesHeadNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -6051,18 +8322,55 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Kafka Management Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Kafka Management Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + KafkaClusterRolesKafkaManagementNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[str] = None, + vm_size: Optional[str] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.KafkaClusterRolesKafkaManagementNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -6136,10 +8444,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + KafkaClusterRolesKafkaManagementNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -6222,20 +8549,69 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "number_of_disks_per_node", number_of_disks_per_node) - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + KafkaClusterRolesWorkerNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + number_of_disks_per_node=number_of_disks_per_node, + target_instance_count=target_instance_count, + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + number_of_disks_per_node: Optional[int] = None, + target_instance_count: Optional[int] = None, + username: Optional[str] = None, + vm_size: Optional[str] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.KafkaClusterRolesWorkerNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if number_of_disks_per_node is None and 'numberOfDisksPerNode' in kwargs: + number_of_disks_per_node = kwargs['numberOfDisksPerNode'] + if number_of_disks_per_node is None: + raise TypeError("Missing 'number_of_disks_per_node' argument") + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("number_of_disks_per_node", number_of_disks_per_node) + _setter("target_instance_count", target_instance_count) + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="numberOfDisksPerNode") @@ -6325,10 +8701,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + KafkaClusterRolesWorkerNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -6403,18 +8798,55 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + KafkaClusterRolesZookeeperNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[str] = None, + vm_size: Optional[str] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.KafkaClusterRolesZookeeperNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -6488,10 +8920,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + KafkaClusterRolesZookeeperNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -6566,14 +9017,63 @@ def __init__(__self__, *, :param str msi_resource_id: The User Assigned Identity for the HDInsight Cluster. Changing this forces a new resource to be created. :param Sequence[str] cluster_users_group_dns: A list of the distinguished names for the cluster user groups. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "aadds_resource_id", aadds_resource_id) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "domain_user_password", domain_user_password) - pulumi.set(__self__, "domain_username", domain_username) - pulumi.set(__self__, "ldaps_urls", ldaps_urls) - pulumi.set(__self__, "msi_resource_id", msi_resource_id) + KafkaClusterSecurityProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + aadds_resource_id=aadds_resource_id, + domain_name=domain_name, + domain_user_password=domain_user_password, + domain_username=domain_username, + ldaps_urls=ldaps_urls, + msi_resource_id=msi_resource_id, + cluster_users_group_dns=cluster_users_group_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aadds_resource_id: Optional[str] = None, + domain_name: Optional[str] = None, + domain_user_password: Optional[str] = None, + domain_username: Optional[str] = None, + ldaps_urls: Optional[Sequence[str]] = None, + msi_resource_id: Optional[str] = None, + cluster_users_group_dns: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aadds_resource_id is None and 'aaddsResourceId' in kwargs: + aadds_resource_id = kwargs['aaddsResourceId'] + if aadds_resource_id is None: + raise TypeError("Missing 'aadds_resource_id' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_user_password is None and 'domainUserPassword' in kwargs: + domain_user_password = kwargs['domainUserPassword'] + if domain_user_password is None: + raise TypeError("Missing 'domain_user_password' argument") + if domain_username is None and 'domainUsername' in kwargs: + domain_username = kwargs['domainUsername'] + if domain_username is None: + raise TypeError("Missing 'domain_username' argument") + if ldaps_urls is None and 'ldapsUrls' in kwargs: + ldaps_urls = kwargs['ldapsUrls'] + if ldaps_urls is None: + raise TypeError("Missing 'ldaps_urls' argument") + if msi_resource_id is None and 'msiResourceId' in kwargs: + msi_resource_id = kwargs['msiResourceId'] + if msi_resource_id is None: + raise TypeError("Missing 'msi_resource_id' argument") + if cluster_users_group_dns is None and 'clusterUsersGroupDns' in kwargs: + cluster_users_group_dns = kwargs['clusterUsersGroupDns'] + + _setter("aadds_resource_id", aadds_resource_id) + _setter("domain_name", domain_name) + _setter("domain_user_password", domain_user_password) + _setter("domain_username", domain_username) + _setter("ldaps_urls", ldaps_urls) + _setter("msi_resource_id", msi_resource_id) if cluster_users_group_dns is not None: - pulumi.set(__self__, "cluster_users_group_dns", cluster_users_group_dns) + _setter("cluster_users_group_dns", cluster_users_group_dns) @property @pulumi.getter(name="aaddsResourceId") @@ -6672,11 +9172,42 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param str storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "storage_container_id", storage_container_id) + KafkaClusterStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_default=is_default, + storage_account_key=storage_account_key, + storage_container_id=storage_container_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_default: Optional[bool] = None, + storage_account_key: Optional[str] = None, + storage_container_id: Optional[str] = None, + storage_resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + + _setter("is_default", is_default) + _setter("storage_account_key", storage_account_key) + _setter("storage_container_id", storage_container_id) if storage_resource_id is not None: - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="isDefault") @@ -6755,10 +9286,43 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param str storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "filesystem_id", filesystem_id) - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "managed_identity_resource_id", managed_identity_resource_id) - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + KafkaClusterStorageAccountGen2._configure( + lambda key, value: pulumi.set(__self__, key, value), + filesystem_id=filesystem_id, + is_default=is_default, + managed_identity_resource_id=managed_identity_resource_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filesystem_id: Optional[str] = None, + is_default: Optional[bool] = None, + managed_identity_resource_id: Optional[str] = None, + storage_resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filesystem_id is None and 'filesystemId' in kwargs: + filesystem_id = kwargs['filesystemId'] + if filesystem_id is None: + raise TypeError("Missing 'filesystem_id' argument") + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if managed_identity_resource_id is None and 'managedIdentityResourceId' in kwargs: + managed_identity_resource_id = kwargs['managedIdentityResourceId'] + if managed_identity_resource_id is None: + raise TypeError("Missing 'managed_identity_resource_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + if storage_resource_id is None: + raise TypeError("Missing 'storage_resource_id' argument") + + _setter("filesystem_id", filesystem_id) + _setter("is_default", is_default) + _setter("managed_identity_resource_id", managed_identity_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="filesystemId") @@ -6804,7 +9368,20 @@ def __init__(__self__, *, """ :param str spark: The version of Spark which should be used for this HDInsight Spark Cluster. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "spark", spark) + SparkClusterComponentVersion._configure( + lambda key, value: pulumi.set(__self__, key, value), + spark=spark, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + spark: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if spark is None: + raise TypeError("Missing 'spark' argument") + + _setter("spark", spark) @property @pulumi.getter @@ -6843,10 +9420,27 @@ def __init__(__self__, *, :param bool compute_isolation_enabled: This field indicates whether enable compute isolation or not. Possible values are `true` or `false`. :param str host_sku: The name of the host SKU. """ + SparkClusterComputeIsolation._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_isolation_enabled=compute_isolation_enabled, + host_sku=host_sku, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_isolation_enabled: Optional[bool] = None, + host_sku: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_isolation_enabled is None and 'computeIsolationEnabled' in kwargs: + compute_isolation_enabled = kwargs['computeIsolationEnabled'] + if host_sku is None and 'hostSku' in kwargs: + host_sku = kwargs['hostSku'] + if compute_isolation_enabled is not None: - pulumi.set(__self__, "compute_isolation_enabled", compute_isolation_enabled) + _setter("compute_isolation_enabled", compute_isolation_enabled) if host_sku is not None: - pulumi.set(__self__, "host_sku", host_sku) + _setter("host_sku", host_sku) @property @pulumi.getter(name="computeIsolationEnabled") @@ -6901,14 +9495,39 @@ def __init__(__self__, *, :param str key_vault_key_id: The ID of the key vault key. :param str key_vault_managed_identity_id: This is the resource ID of Managed Identity used to access the key vault. """ + SparkClusterDiskEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption_algorithm=encryption_algorithm, + encryption_at_host_enabled=encryption_at_host_enabled, + key_vault_key_id=key_vault_key_id, + key_vault_managed_identity_id=key_vault_managed_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption_algorithm: Optional[str] = None, + encryption_at_host_enabled: Optional[bool] = None, + key_vault_key_id: Optional[str] = None, + key_vault_managed_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encryption_algorithm is None and 'encryptionAlgorithm' in kwargs: + encryption_algorithm = kwargs['encryptionAlgorithm'] + if encryption_at_host_enabled is None and 'encryptionAtHostEnabled' in kwargs: + encryption_at_host_enabled = kwargs['encryptionAtHostEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_managed_identity_id is None and 'keyVaultManagedIdentityId' in kwargs: + key_vault_managed_identity_id = kwargs['keyVaultManagedIdentityId'] + if encryption_algorithm is not None: - pulumi.set(__self__, "encryption_algorithm", encryption_algorithm) + _setter("encryption_algorithm", encryption_algorithm) if encryption_at_host_enabled is not None: - pulumi.set(__self__, "encryption_at_host_enabled", encryption_at_host_enabled) + _setter("encryption_at_host_enabled", encryption_at_host_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if key_vault_managed_identity_id is not None: - pulumi.set(__self__, "key_vault_managed_identity_id", key_vault_managed_identity_id) + _setter("key_vault_managed_identity_id", key_vault_managed_identity_id) @property @pulumi.getter(name="encryptionAlgorithm") @@ -6971,8 +9590,29 @@ def __init__(__self__, *, :param str log_analytics_workspace_id: The workspace ID of the log analytics extension. :param str primary_key: The workspace key of the log analytics extension. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + SparkClusterExtension._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + primary_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -7002,8 +9642,25 @@ def __init__(__self__, *, > **NOTE:** This password must be different from the one used for the `head_node`, `worker_node` and `zookeeper_node` roles. :param str username: The username used for the Ambari Portal. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + SparkClusterGateway._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -7035,12 +9692,27 @@ def __init__(__self__, *, :param 'SparkClusterMetastoresHiveArgs' hive: A `hive` block as defined below. :param 'SparkClusterMetastoresOozieArgs' oozie: An `oozie` block as defined below. """ + SparkClusterMetastores._configure( + lambda key, value: pulumi.set(__self__, key, value), + ambari=ambari, + hive=hive, + oozie=oozie, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ambari: Optional['outputs.SparkClusterMetastoresAmbari'] = None, + hive: Optional['outputs.SparkClusterMetastoresHive'] = None, + oozie: Optional['outputs.SparkClusterMetastoresOozie'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ambari is not None: - pulumi.set(__self__, "ambari", ambari) + _setter("ambari", ambari) if hive is not None: - pulumi.set(__self__, "hive", hive) + _setter("hive", hive) if oozie is not None: - pulumi.set(__self__, "oozie", oozie) + _setter("oozie", oozie) @property @pulumi.getter @@ -7097,10 +9769,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Ambari metastore. Changing this forces a new resource to be created. :param str username: The external Ambari metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + SparkClusterMetastoresAmbari._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -7165,10 +9864,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Hive metastore. Changing this forces a new resource to be created. :param str username: The external Hive metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + SparkClusterMetastoresHive._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -7233,10 +9959,37 @@ def __init__(__self__, *, :param str server: The fully-qualified domain name (FQDN) of the SQL server to use for the external Oozie metastore. Changing this forces a new resource to be created. :param str username: The external Oozie metastore's existing SQL server admin username. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "username", username) + SparkClusterMetastoresOozie._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_name=database_name, + password=password, + server=server, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_name: Optional[str] = None, + password: Optional[str] = None, + server: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("database_name", database_name) + _setter("password", password) + _setter("server", server) + _setter("username", username) @property @pulumi.getter(name="databaseName") @@ -7299,8 +10052,29 @@ def __init__(__self__, *, :param str log_analytics_workspace_id: The Operations Management Suite (OMS) workspace ID. :param str primary_key: The Operations Management Suite (OMS) workspace key. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "primary_key", primary_key) + SparkClusterMonitor._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + primary_key=primary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[str] = None, + primary_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if primary_key is None: + raise TypeError("Missing 'primary_key' argument") + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("primary_key", primary_key) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -7349,10 +10123,27 @@ def __init__(__self__, *, > **NOTE:** To enabled the private link the `connection_direction` must be set to `Outbound`. :param bool private_link_enabled: Is the private link enabled? Possible values include `True` or `False`. Defaults to `False`. Changing this forces a new resource to be created. """ + SparkClusterNetwork._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_direction=connection_direction, + private_link_enabled=private_link_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_direction: Optional[str] = None, + private_link_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_direction is None and 'connectionDirection' in kwargs: + connection_direction = kwargs['connectionDirection'] + if private_link_enabled is None and 'privateLinkEnabled' in kwargs: + private_link_enabled = kwargs['privateLinkEnabled'] + if connection_direction is not None: - pulumi.set(__self__, "connection_direction", connection_direction) + _setter("connection_direction", connection_direction) if private_link_enabled is not None: - pulumi.set(__self__, "private_link_enabled", private_link_enabled) + _setter("private_link_enabled", private_link_enabled) @property @pulumi.getter(name="connectionDirection") @@ -7405,9 +10196,36 @@ def __init__(__self__, *, :param 'SparkClusterRolesWorkerNodeArgs' worker_node: A `worker_node` block as defined below. :param 'SparkClusterRolesZookeeperNodeArgs' zookeeper_node: A `zookeeper_node` block as defined below. """ - pulumi.set(__self__, "head_node", head_node) - pulumi.set(__self__, "worker_node", worker_node) - pulumi.set(__self__, "zookeeper_node", zookeeper_node) + SparkClusterRoles._configure( + lambda key, value: pulumi.set(__self__, key, value), + head_node=head_node, + worker_node=worker_node, + zookeeper_node=zookeeper_node, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + head_node: Optional['outputs.SparkClusterRolesHeadNode'] = None, + worker_node: Optional['outputs.SparkClusterRolesWorkerNode'] = None, + zookeeper_node: Optional['outputs.SparkClusterRolesZookeeperNode'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if head_node is None and 'headNode' in kwargs: + head_node = kwargs['headNode'] + if head_node is None: + raise TypeError("Missing 'head_node' argument") + if worker_node is None and 'workerNode' in kwargs: + worker_node = kwargs['workerNode'] + if worker_node is None: + raise TypeError("Missing 'worker_node' argument") + if zookeeper_node is None and 'zookeeperNode' in kwargs: + zookeeper_node = kwargs['zookeeperNode'] + if zookeeper_node is None: + raise TypeError("Missing 'zookeeper_node' argument") + + _setter("head_node", head_node) + _setter("worker_node", worker_node) + _setter("zookeeper_node", zookeeper_node) @property @pulumi.getter(name="headNode") @@ -7482,18 +10300,55 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + SparkClusterRolesHeadNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[str] = None, + vm_size: Optional[str] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.SparkClusterRolesHeadNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -7567,10 +10422,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + SparkClusterRolesHeadNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -7651,21 +10525,66 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + SparkClusterRolesWorkerNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_instance_count=target_instance_count, + username=username, + vm_size=vm_size, + autoscale=autoscale, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_instance_count: Optional[int] = None, + username: Optional[str] = None, + vm_size: Optional[str] = None, + autoscale: Optional['outputs.SparkClusterRolesWorkerNodeAutoscale'] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.SparkClusterRolesWorkerNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("target_instance_count", target_instance_count) + _setter("username", username) + _setter("vm_size", vm_size) if autoscale is not None: - pulumi.set(__self__, "autoscale", autoscale) + _setter("autoscale", autoscale) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="targetInstanceCount") @@ -7755,10 +10674,23 @@ def __init__(__self__, *, > **NOTE:** Either a `capacity` or `recurrence` block must be specified - but not both. """ + SparkClusterRolesWorkerNodeAutoscale._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + recurrence=recurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional['outputs.SparkClusterRolesWorkerNodeAutoscaleCapacity'] = None, + recurrence: Optional['outputs.SparkClusterRolesWorkerNodeAutoscaleRecurrence'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) @property @pulumi.getter @@ -7807,8 +10739,29 @@ def __init__(__self__, *, :param int max_instance_count: The maximum number of worker nodes to autoscale to based on the cluster's activity. :param int min_instance_count: The minimum number of worker nodes to autoscale to based on the cluster's activity. """ - pulumi.set(__self__, "max_instance_count", max_instance_count) - pulumi.set(__self__, "min_instance_count", min_instance_count) + SparkClusterRolesWorkerNodeAutoscaleCapacity._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_instance_count=max_instance_count, + min_instance_count=min_instance_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_instance_count: Optional[int] = None, + min_instance_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_instance_count is None and 'maxInstanceCount' in kwargs: + max_instance_count = kwargs['maxInstanceCount'] + if max_instance_count is None: + raise TypeError("Missing 'max_instance_count' argument") + if min_instance_count is None and 'minInstanceCount' in kwargs: + min_instance_count = kwargs['minInstanceCount'] + if min_instance_count is None: + raise TypeError("Missing 'min_instance_count' argument") + + _setter("max_instance_count", max_instance_count) + _setter("min_instance_count", min_instance_count) @property @pulumi.getter(name="maxInstanceCount") @@ -7836,8 +10789,25 @@ def __init__(__self__, *, :param Sequence['SparkClusterRolesWorkerNodeAutoscaleRecurrenceScheduleArgs'] schedules: A list of `schedule` blocks as defined below. :param str timezone: The time zone for the autoscale schedule times. """ - pulumi.set(__self__, "schedules", schedules) - pulumi.set(__self__, "timezone", timezone) + SparkClusterRolesWorkerNodeAutoscaleRecurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + schedules=schedules, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + schedules: Optional[Sequence['outputs.SparkClusterRolesWorkerNodeAutoscaleRecurrenceSchedule']] = None, + timezone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if schedules is None: + raise TypeError("Missing 'schedules' argument") + if timezone is None: + raise TypeError("Missing 'timezone' argument") + + _setter("schedules", schedules) + _setter("timezone", timezone) @property @pulumi.getter @@ -7884,9 +10854,32 @@ def __init__(__self__, *, :param int target_instance_count: The number of worker nodes to autoscale at the specified time. :param str time: The time of day to perform the autoscale in 24hour format. """ - pulumi.set(__self__, "days", days) - pulumi.set(__self__, "target_instance_count", target_instance_count) - pulumi.set(__self__, "time", time) + SparkClusterRolesWorkerNodeAutoscaleRecurrenceSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + target_instance_count=target_instance_count, + time=time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[Sequence[str]] = None, + target_instance_count: Optional[int] = None, + time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + if target_instance_count is None and 'targetInstanceCount' in kwargs: + target_instance_count = kwargs['targetInstanceCount'] + if target_instance_count is None: + raise TypeError("Missing 'target_instance_count' argument") + if time is None: + raise TypeError("Missing 'time' argument") + + _setter("days", days) + _setter("target_instance_count", target_instance_count) + _setter("time", time) @property @pulumi.getter @@ -7924,10 +10917,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + SparkClusterRolesWorkerNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -8002,18 +11014,55 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet within the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. :param str virtual_network_id: The ID of the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "username", username) - pulumi.set(__self__, "vm_size", vm_size) + SparkClusterRolesZookeeperNode._configure( + lambda key, value: pulumi.set(__self__, key, value), + username=username, + vm_size=vm_size, + password=password, + script_actions=script_actions, + ssh_keys=ssh_keys, + subnet_id=subnet_id, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + username: Optional[str] = None, + vm_size: Optional[str] = None, + password: Optional[str] = None, + script_actions: Optional[Sequence['outputs.SparkClusterRolesZookeeperNodeScriptAction']] = None, + ssh_keys: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if username is None: + raise TypeError("Missing 'username' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if script_actions is None and 'scriptActions' in kwargs: + script_actions = kwargs['scriptActions'] + if ssh_keys is None and 'sshKeys' in kwargs: + ssh_keys = kwargs['sshKeys'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("username", username) + _setter("vm_size", vm_size) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if script_actions is not None: - pulumi.set(__self__, "script_actions", script_actions) + _setter("script_actions", script_actions) if ssh_keys is not None: - pulumi.set(__self__, "ssh_keys", ssh_keys) + _setter("ssh_keys", ssh_keys) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -8087,10 +11136,29 @@ def __init__(__self__, *, :param str uri: The URI to the script. :param str parameters: The parameters for the script provided. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "uri", uri) + SparkClusterRolesZookeeperNodeScriptAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + uri=uri, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + uri: Optional[str] = None, + parameters: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + + _setter("name", name) + _setter("uri", uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -8165,14 +11233,63 @@ def __init__(__self__, *, :param str msi_resource_id: The User Assigned Identity for the HDInsight Cluster. Changing this forces a new resource to be created. :param Sequence[str] cluster_users_group_dns: A list of the distinguished names for the cluster user groups. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "aadds_resource_id", aadds_resource_id) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "domain_user_password", domain_user_password) - pulumi.set(__self__, "domain_username", domain_username) - pulumi.set(__self__, "ldaps_urls", ldaps_urls) - pulumi.set(__self__, "msi_resource_id", msi_resource_id) + SparkClusterSecurityProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + aadds_resource_id=aadds_resource_id, + domain_name=domain_name, + domain_user_password=domain_user_password, + domain_username=domain_username, + ldaps_urls=ldaps_urls, + msi_resource_id=msi_resource_id, + cluster_users_group_dns=cluster_users_group_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aadds_resource_id: Optional[str] = None, + domain_name: Optional[str] = None, + domain_user_password: Optional[str] = None, + domain_username: Optional[str] = None, + ldaps_urls: Optional[Sequence[str]] = None, + msi_resource_id: Optional[str] = None, + cluster_users_group_dns: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aadds_resource_id is None and 'aaddsResourceId' in kwargs: + aadds_resource_id = kwargs['aaddsResourceId'] + if aadds_resource_id is None: + raise TypeError("Missing 'aadds_resource_id' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_user_password is None and 'domainUserPassword' in kwargs: + domain_user_password = kwargs['domainUserPassword'] + if domain_user_password is None: + raise TypeError("Missing 'domain_user_password' argument") + if domain_username is None and 'domainUsername' in kwargs: + domain_username = kwargs['domainUsername'] + if domain_username is None: + raise TypeError("Missing 'domain_username' argument") + if ldaps_urls is None and 'ldapsUrls' in kwargs: + ldaps_urls = kwargs['ldapsUrls'] + if ldaps_urls is None: + raise TypeError("Missing 'ldaps_urls' argument") + if msi_resource_id is None and 'msiResourceId' in kwargs: + msi_resource_id = kwargs['msiResourceId'] + if msi_resource_id is None: + raise TypeError("Missing 'msi_resource_id' argument") + if cluster_users_group_dns is None and 'clusterUsersGroupDns' in kwargs: + cluster_users_group_dns = kwargs['clusterUsersGroupDns'] + + _setter("aadds_resource_id", aadds_resource_id) + _setter("domain_name", domain_name) + _setter("domain_user_password", domain_user_password) + _setter("domain_username", domain_username) + _setter("ldaps_urls", ldaps_urls) + _setter("msi_resource_id", msi_resource_id) if cluster_users_group_dns is not None: - pulumi.set(__self__, "cluster_users_group_dns", cluster_users_group_dns) + _setter("cluster_users_group_dns", cluster_users_group_dns) @property @pulumi.getter(name="aaddsResourceId") @@ -8271,11 +11388,42 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param str storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "storage_container_id", storage_container_id) + SparkClusterStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_default=is_default, + storage_account_key=storage_account_key, + storage_container_id=storage_container_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_default: Optional[bool] = None, + storage_account_key: Optional[str] = None, + storage_container_id: Optional[str] = None, + storage_resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + + _setter("is_default", is_default) + _setter("storage_account_key", storage_account_key) + _setter("storage_container_id", storage_container_id) if storage_resource_id is not None: - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="isDefault") @@ -8354,10 +11502,43 @@ def __init__(__self__, *, > **NOTE:** This can be obtained from the `id` of the `storage.Container` resource. :param str storage_resource_id: The ID of the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "filesystem_id", filesystem_id) - pulumi.set(__self__, "is_default", is_default) - pulumi.set(__self__, "managed_identity_resource_id", managed_identity_resource_id) - pulumi.set(__self__, "storage_resource_id", storage_resource_id) + SparkClusterStorageAccountGen2._configure( + lambda key, value: pulumi.set(__self__, key, value), + filesystem_id=filesystem_id, + is_default=is_default, + managed_identity_resource_id=managed_identity_resource_id, + storage_resource_id=storage_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filesystem_id: Optional[str] = None, + is_default: Optional[bool] = None, + managed_identity_resource_id: Optional[str] = None, + storage_resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filesystem_id is None and 'filesystemId' in kwargs: + filesystem_id = kwargs['filesystemId'] + if filesystem_id is None: + raise TypeError("Missing 'filesystem_id' argument") + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if is_default is None: + raise TypeError("Missing 'is_default' argument") + if managed_identity_resource_id is None and 'managedIdentityResourceId' in kwargs: + managed_identity_resource_id = kwargs['managedIdentityResourceId'] + if managed_identity_resource_id is None: + raise TypeError("Missing 'managed_identity_resource_id' argument") + if storage_resource_id is None and 'storageResourceId' in kwargs: + storage_resource_id = kwargs['storageResourceId'] + if storage_resource_id is None: + raise TypeError("Missing 'storage_resource_id' argument") + + _setter("filesystem_id", filesystem_id) + _setter("is_default", is_default) + _setter("managed_identity_resource_id", managed_identity_resource_id) + _setter("storage_resource_id", storage_resource_id) @property @pulumi.getter(name="filesystemId") @@ -8407,9 +11588,30 @@ def __init__(__self__, *, :param str password: The password used for the Ambari Portal. :param str username: The username used for the Ambari Portal. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + GetClusterGatewayResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("enabled", enabled) + _setter("password", password) + _setter("username", username) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/hdinsight/spark_cluster.py b/sdk/python/pulumi_azure/hdinsight/spark_cluster.py index a21fb230ca..43a01d8b05 100644 --- a/sdk/python/pulumi_azure/hdinsight/spark_cluster.py +++ b/sdk/python/pulumi_azure/hdinsight/spark_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -61,40 +61,121 @@ def __init__(__self__, *, > **NOTE:** Starting on June 30, 2020, Azure HDInsight will enforce TLS 1.2 or later versions for all HTTPS connections. For more information, see [Azure HDInsight TLS 1.2 Enforcement](https://azure.microsoft.com/en-us/updates/azure-hdinsight-tls-12-enforcement/). """ - pulumi.set(__self__, "cluster_version", cluster_version) - pulumi.set(__self__, "component_version", component_version) - pulumi.set(__self__, "gateway", gateway) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "roles", roles) - pulumi.set(__self__, "tier", tier) + SparkClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + component_version=component_version, + gateway=gateway, + resource_group_name=resource_group_name, + roles=roles, + tier=tier, + compute_isolation=compute_isolation, + disk_encryptions=disk_encryptions, + encryption_in_transit_enabled=encryption_in_transit_enabled, + extension=extension, + location=location, + metastores=metastores, + monitor=monitor, + name=name, + network=network, + security_profile=security_profile, + storage_account_gen2=storage_account_gen2, + storage_accounts=storage_accounts, + tags=tags, + tls_min_version=tls_min_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[pulumi.Input[str]] = None, + component_version: Optional[pulumi.Input['SparkClusterComponentVersionArgs']] = None, + gateway: Optional[pulumi.Input['SparkClusterGatewayArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input['SparkClusterRolesArgs']] = None, + tier: Optional[pulumi.Input[str]] = None, + compute_isolation: Optional[pulumi.Input['SparkClusterComputeIsolationArgs']] = None, + disk_encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['SparkClusterDiskEncryptionArgs']]]] = None, + encryption_in_transit_enabled: Optional[pulumi.Input[bool]] = None, + extension: Optional[pulumi.Input['SparkClusterExtensionArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + metastores: Optional[pulumi.Input['SparkClusterMetastoresArgs']] = None, + monitor: Optional[pulumi.Input['SparkClusterMonitorArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['SparkClusterNetworkArgs']] = None, + security_profile: Optional[pulumi.Input['SparkClusterSecurityProfileArgs']] = None, + storage_account_gen2: Optional[pulumi.Input['SparkClusterStorageAccountGen2Args']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['SparkClusterStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tls_min_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if cluster_version is None: + raise TypeError("Missing 'cluster_version' argument") + if component_version is None and 'componentVersion' in kwargs: + component_version = kwargs['componentVersion'] + if component_version is None: + raise TypeError("Missing 'component_version' argument") + if gateway is None: + raise TypeError("Missing 'gateway' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if roles is None: + raise TypeError("Missing 'roles' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + if compute_isolation is None and 'computeIsolation' in kwargs: + compute_isolation = kwargs['computeIsolation'] + if disk_encryptions is None and 'diskEncryptions' in kwargs: + disk_encryptions = kwargs['diskEncryptions'] + if encryption_in_transit_enabled is None and 'encryptionInTransitEnabled' in kwargs: + encryption_in_transit_enabled = kwargs['encryptionInTransitEnabled'] + if security_profile is None and 'securityProfile' in kwargs: + security_profile = kwargs['securityProfile'] + if storage_account_gen2 is None and 'storageAccountGen2' in kwargs: + storage_account_gen2 = kwargs['storageAccountGen2'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if tls_min_version is None and 'tlsMinVersion' in kwargs: + tls_min_version = kwargs['tlsMinVersion'] + + _setter("cluster_version", cluster_version) + _setter("component_version", component_version) + _setter("gateway", gateway) + _setter("resource_group_name", resource_group_name) + _setter("roles", roles) + _setter("tier", tier) if compute_isolation is not None: - pulumi.set(__self__, "compute_isolation", compute_isolation) + _setter("compute_isolation", compute_isolation) if disk_encryptions is not None: - pulumi.set(__self__, "disk_encryptions", disk_encryptions) + _setter("disk_encryptions", disk_encryptions) if encryption_in_transit_enabled is not None: - pulumi.set(__self__, "encryption_in_transit_enabled", encryption_in_transit_enabled) + _setter("encryption_in_transit_enabled", encryption_in_transit_enabled) if extension is not None: - pulumi.set(__self__, "extension", extension) + _setter("extension", extension) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metastores is not None: - pulumi.set(__self__, "metastores", metastores) + _setter("metastores", metastores) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if security_profile is not None: - pulumi.set(__self__, "security_profile", security_profile) + _setter("security_profile", security_profile) if storage_account_gen2 is not None: - pulumi.set(__self__, "storage_account_gen2", storage_account_gen2) + _setter("storage_account_gen2", storage_account_gen2) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tls_min_version is not None: - pulumi.set(__self__, "tls_min_version", tls_min_version) + _setter("tls_min_version", tls_min_version) @property @pulumi.getter(name="clusterVersion") @@ -391,50 +472,127 @@ def __init__(__self__, *, > **NOTE:** Starting on June 30, 2020, Azure HDInsight will enforce TLS 1.2 or later versions for all HTTPS connections. For more information, see [Azure HDInsight TLS 1.2 Enforcement](https://azure.microsoft.com/en-us/updates/azure-hdinsight-tls-12-enforcement/). """ + _SparkClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_version=cluster_version, + component_version=component_version, + compute_isolation=compute_isolation, + disk_encryptions=disk_encryptions, + encryption_in_transit_enabled=encryption_in_transit_enabled, + extension=extension, + gateway=gateway, + https_endpoint=https_endpoint, + location=location, + metastores=metastores, + monitor=monitor, + name=name, + network=network, + resource_group_name=resource_group_name, + roles=roles, + security_profile=security_profile, + ssh_endpoint=ssh_endpoint, + storage_account_gen2=storage_account_gen2, + storage_accounts=storage_accounts, + tags=tags, + tier=tier, + tls_min_version=tls_min_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_version: Optional[pulumi.Input[str]] = None, + component_version: Optional[pulumi.Input['SparkClusterComponentVersionArgs']] = None, + compute_isolation: Optional[pulumi.Input['SparkClusterComputeIsolationArgs']] = None, + disk_encryptions: Optional[pulumi.Input[Sequence[pulumi.Input['SparkClusterDiskEncryptionArgs']]]] = None, + encryption_in_transit_enabled: Optional[pulumi.Input[bool]] = None, + extension: Optional[pulumi.Input['SparkClusterExtensionArgs']] = None, + gateway: Optional[pulumi.Input['SparkClusterGatewayArgs']] = None, + https_endpoint: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + metastores: Optional[pulumi.Input['SparkClusterMetastoresArgs']] = None, + monitor: Optional[pulumi.Input['SparkClusterMonitorArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['SparkClusterNetworkArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input['SparkClusterRolesArgs']] = None, + security_profile: Optional[pulumi.Input['SparkClusterSecurityProfileArgs']] = None, + ssh_endpoint: Optional[pulumi.Input[str]] = None, + storage_account_gen2: Optional[pulumi.Input['SparkClusterStorageAccountGen2Args']] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['SparkClusterStorageAccountArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tier: Optional[pulumi.Input[str]] = None, + tls_min_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_version is None and 'clusterVersion' in kwargs: + cluster_version = kwargs['clusterVersion'] + if component_version is None and 'componentVersion' in kwargs: + component_version = kwargs['componentVersion'] + if compute_isolation is None and 'computeIsolation' in kwargs: + compute_isolation = kwargs['computeIsolation'] + if disk_encryptions is None and 'diskEncryptions' in kwargs: + disk_encryptions = kwargs['diskEncryptions'] + if encryption_in_transit_enabled is None and 'encryptionInTransitEnabled' in kwargs: + encryption_in_transit_enabled = kwargs['encryptionInTransitEnabled'] + if https_endpoint is None and 'httpsEndpoint' in kwargs: + https_endpoint = kwargs['httpsEndpoint'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if security_profile is None and 'securityProfile' in kwargs: + security_profile = kwargs['securityProfile'] + if ssh_endpoint is None and 'sshEndpoint' in kwargs: + ssh_endpoint = kwargs['sshEndpoint'] + if storage_account_gen2 is None and 'storageAccountGen2' in kwargs: + storage_account_gen2 = kwargs['storageAccountGen2'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if tls_min_version is None and 'tlsMinVersion' in kwargs: + tls_min_version = kwargs['tlsMinVersion'] + if cluster_version is not None: - pulumi.set(__self__, "cluster_version", cluster_version) + _setter("cluster_version", cluster_version) if component_version is not None: - pulumi.set(__self__, "component_version", component_version) + _setter("component_version", component_version) if compute_isolation is not None: - pulumi.set(__self__, "compute_isolation", compute_isolation) + _setter("compute_isolation", compute_isolation) if disk_encryptions is not None: - pulumi.set(__self__, "disk_encryptions", disk_encryptions) + _setter("disk_encryptions", disk_encryptions) if encryption_in_transit_enabled is not None: - pulumi.set(__self__, "encryption_in_transit_enabled", encryption_in_transit_enabled) + _setter("encryption_in_transit_enabled", encryption_in_transit_enabled) if extension is not None: - pulumi.set(__self__, "extension", extension) + _setter("extension", extension) if gateway is not None: - pulumi.set(__self__, "gateway", gateway) + _setter("gateway", gateway) if https_endpoint is not None: - pulumi.set(__self__, "https_endpoint", https_endpoint) + _setter("https_endpoint", https_endpoint) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metastores is not None: - pulumi.set(__self__, "metastores", metastores) + _setter("metastores", metastores) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if roles is not None: - pulumi.set(__self__, "roles", roles) + _setter("roles", roles) if security_profile is not None: - pulumi.set(__self__, "security_profile", security_profile) + _setter("security_profile", security_profile) if ssh_endpoint is not None: - pulumi.set(__self__, "ssh_endpoint", ssh_endpoint) + _setter("ssh_endpoint", ssh_endpoint) if storage_account_gen2 is not None: - pulumi.set(__self__, "storage_account_gen2", storage_account_gen2) + _setter("storage_account_gen2", storage_account_gen2) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) if tls_min_version is not None: - pulumi.set(__self__, "tls_min_version", tls_min_version) + _setter("tls_min_version", tls_min_version) @property @pulumi.getter(name="clusterVersion") @@ -896,6 +1054,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SparkClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -933,28 +1095,78 @@ def _internal_init(__self__, if cluster_version is None and not opts.urn: raise TypeError("Missing required property 'cluster_version'") __props__.__dict__["cluster_version"] = cluster_version + if component_version is not None and not isinstance(component_version, SparkClusterComponentVersionArgs): + component_version = component_version or {} + def _setter(key, value): + component_version[key] = value + SparkClusterComponentVersionArgs._configure(_setter, **component_version) if component_version is None and not opts.urn: raise TypeError("Missing required property 'component_version'") __props__.__dict__["component_version"] = component_version + if compute_isolation is not None and not isinstance(compute_isolation, SparkClusterComputeIsolationArgs): + compute_isolation = compute_isolation or {} + def _setter(key, value): + compute_isolation[key] = value + SparkClusterComputeIsolationArgs._configure(_setter, **compute_isolation) __props__.__dict__["compute_isolation"] = compute_isolation __props__.__dict__["disk_encryptions"] = disk_encryptions __props__.__dict__["encryption_in_transit_enabled"] = encryption_in_transit_enabled + if extension is not None and not isinstance(extension, SparkClusterExtensionArgs): + extension = extension or {} + def _setter(key, value): + extension[key] = value + SparkClusterExtensionArgs._configure(_setter, **extension) __props__.__dict__["extension"] = extension + if gateway is not None and not isinstance(gateway, SparkClusterGatewayArgs): + gateway = gateway or {} + def _setter(key, value): + gateway[key] = value + SparkClusterGatewayArgs._configure(_setter, **gateway) if gateway is None and not opts.urn: raise TypeError("Missing required property 'gateway'") __props__.__dict__["gateway"] = gateway __props__.__dict__["location"] = location + if metastores is not None and not isinstance(metastores, SparkClusterMetastoresArgs): + metastores = metastores or {} + def _setter(key, value): + metastores[key] = value + SparkClusterMetastoresArgs._configure(_setter, **metastores) __props__.__dict__["metastores"] = metastores + if monitor is not None and not isinstance(monitor, SparkClusterMonitorArgs): + monitor = monitor or {} + def _setter(key, value): + monitor[key] = value + SparkClusterMonitorArgs._configure(_setter, **monitor) __props__.__dict__["monitor"] = monitor __props__.__dict__["name"] = name + if network is not None and not isinstance(network, SparkClusterNetworkArgs): + network = network or {} + def _setter(key, value): + network[key] = value + SparkClusterNetworkArgs._configure(_setter, **network) __props__.__dict__["network"] = network if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if roles is not None and not isinstance(roles, SparkClusterRolesArgs): + roles = roles or {} + def _setter(key, value): + roles[key] = value + SparkClusterRolesArgs._configure(_setter, **roles) if roles is None and not opts.urn: raise TypeError("Missing required property 'roles'") __props__.__dict__["roles"] = roles + if security_profile is not None and not isinstance(security_profile, SparkClusterSecurityProfileArgs): + security_profile = security_profile or {} + def _setter(key, value): + security_profile[key] = value + SparkClusterSecurityProfileArgs._configure(_setter, **security_profile) __props__.__dict__["security_profile"] = security_profile + if storage_account_gen2 is not None and not isinstance(storage_account_gen2, SparkClusterStorageAccountGen2Args): + storage_account_gen2 = storage_account_gen2 or {} + def _setter(key, value): + storage_account_gen2[key] = value + SparkClusterStorageAccountGen2Args._configure(_setter, **storage_account_gen2) __props__.__dict__["storage_account_gen2"] = storage_account_gen2 __props__.__dict__["storage_accounts"] = storage_accounts __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/healthcare/_inputs.py b/sdk/python/pulumi_azure/healthcare/_inputs.py index 5032380902..da34ed852b 100644 --- a/sdk/python/pulumi_azure/healthcare/_inputs.py +++ b/sdk/python/pulumi_azure/healthcare/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -31,10 +31,23 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] audiences: The intended audience to receive authentication tokens for the service. The default value is """ + DicomServiceAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + audiences=audiences, + authority=authority, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audiences: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + authority: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audiences is not None: - pulumi.set(__self__, "audiences", audiences) + _setter("audiences", audiences) if authority is not None: - pulumi.set(__self__, "authority", authority) + _setter("authority", authority) @property @pulumi.getter @@ -69,13 +82,38 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of identity used for the Healthcare DICOM service. Possible values are `UserAssigned`, `SystemAssigned` and `SystemAssigned, UserAssigned`. If `UserAssigned` is set, an `identity_ids` must be set as well. :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: A list of User Assigned Identity IDs which should be assigned to this Healthcare DICOM service. """ - pulumi.set(__self__, "type", type) + DicomServiceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -129,10 +167,23 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the Healthcare DICOM Service. :param pulumi.Input[str] name: Specifies the name of the Healthcare DICOM Service. Changing this forces a new Healthcare DICOM Service to be created. """ + DicomServicePrivateEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -169,10 +220,31 @@ def __init__(__self__, *, :param pulumi.Input[str] audience: The intended audience to receive authentication tokens for the service. The default value is `https://.fhir.azurehealthcareapis.com`. :param pulumi.Input[bool] smart_proxy_enabled: Whether smart proxy is enabled. """ - pulumi.set(__self__, "audience", audience) - pulumi.set(__self__, "authority", authority) + FhirServiceAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + audience=audience, + authority=authority, + smart_proxy_enabled=smart_proxy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audience: Optional[pulumi.Input[str]] = None, + authority: Optional[pulumi.Input[str]] = None, + smart_proxy_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audience is None: + raise TypeError("Missing 'audience' argument") + if authority is None: + raise TypeError("Missing 'authority' argument") + if smart_proxy_enabled is None and 'smartProxyEnabled' in kwargs: + smart_proxy_enabled = kwargs['smartProxyEnabled'] + + _setter("audience", audience) + _setter("authority", authority) if smart_proxy_enabled is not None: - pulumi.set(__self__, "smart_proxy_enabled", smart_proxy_enabled) + _setter("smart_proxy_enabled", smart_proxy_enabled) @property @pulumi.getter @@ -223,13 +295,48 @@ def __init__(__self__, *, :param pulumi.Input[bool] credentials_allowed: If credentials are allowed via CORS. :param pulumi.Input[int] max_age_in_seconds: The max age to be allowed via CORS. """ - pulumi.set(__self__, "allowed_headers", allowed_headers) - pulumi.set(__self__, "allowed_methods", allowed_methods) - pulumi.set(__self__, "allowed_origins", allowed_origins) + FhirServiceCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + credentials_allowed=credentials_allowed, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + credentials_allowed: Optional[pulumi.Input[bool]] = None, + max_age_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_headers is None: + raise TypeError("Missing 'allowed_headers' argument") + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_methods is None: + raise TypeError("Missing 'allowed_methods' argument") + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if credentials_allowed is None and 'credentialsAllowed' in kwargs: + credentials_allowed = kwargs['credentialsAllowed'] + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + + _setter("allowed_headers", allowed_headers) + _setter("allowed_methods", allowed_methods) + _setter("allowed_origins", allowed_origins) if credentials_allowed is not None: - pulumi.set(__self__, "credentials_allowed", credentials_allowed) + _setter("credentials_allowed", credentials_allowed) if max_age_in_seconds is not None: - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowedHeaders") @@ -303,13 +410,38 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of managed identity to assign. Possible values are `UserAssigned` and `SystemAssigned` :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: A list of one or more Resource IDs for User Assigned Managed identities to assign. Required when `type` is set to `UserAssigned`. """ - pulumi.set(__self__, "type", type) + FhirServiceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -365,11 +497,32 @@ def __init__(__self__, *, :param pulumi.Input[str] digest: A digest of an image within Azure container registry used for export operations of the service instance to narrow the artifacts down. :param pulumi.Input[str] image_name: An image within Azure container registry used for export operations of the service instance. """ - pulumi.set(__self__, "login_server", login_server) + FhirServiceOciArtifactArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login_server=login_server, + digest=digest, + image_name=image_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login_server: Optional[pulumi.Input[str]] = None, + digest: Optional[pulumi.Input[str]] = None, + image_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login_server is None and 'loginServer' in kwargs: + login_server = kwargs['loginServer'] + if login_server is None: + raise TypeError("Missing 'login_server' argument") + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + + _setter("login_server", login_server) if digest is not None: - pulumi.set(__self__, "digest", digest) + _setter("digest", digest) if image_name is not None: - pulumi.set(__self__, "image_name", image_name) + _setter("image_name", image_name) @property @pulumi.getter(name="loginServer") @@ -420,13 +573,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this System Assigned Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this System Assigned Managed Service Identity. """ - pulumi.set(__self__, "type", type) + MedtechServiceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -486,12 +664,29 @@ def __init__(__self__, *, Authority must be registered to Azure AD and in the following format: https://{Azure-AD-endpoint}/{tenant-id}. :param pulumi.Input[bool] smart_proxy_enabled: (Boolean) Enables the 'SMART on FHIR' option for mobile and web implementations. """ + ServiceAuthenticationConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + audience=audience, + authority=authority, + smart_proxy_enabled=smart_proxy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audience: Optional[pulumi.Input[str]] = None, + authority: Optional[pulumi.Input[str]] = None, + smart_proxy_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if smart_proxy_enabled is None and 'smartProxyEnabled' in kwargs: + smart_proxy_enabled = kwargs['smartProxyEnabled'] + if audience is not None: - pulumi.set(__self__, "audience", audience) + _setter("audience", audience) if authority is not None: - pulumi.set(__self__, "authority", authority) + _setter("authority", authority) if smart_proxy_enabled is not None: - pulumi.set(__self__, "smart_proxy_enabled", smart_proxy_enabled) + _setter("smart_proxy_enabled", smart_proxy_enabled) @property @pulumi.getter @@ -546,16 +741,45 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: A set of origins to be allowed via CORS. :param pulumi.Input[int] max_age_in_seconds: The max age to be allowed via CORS. """ + ServiceCorsConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_credentials=allow_credentials, + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_credentials: Optional[pulumi.Input[bool]] = None, + allowed_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + max_age_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_credentials is None and 'allowCredentials' in kwargs: + allow_credentials = kwargs['allowCredentials'] + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + if allow_credentials is not None: - pulumi.set(__self__, "allow_credentials", allow_credentials) + _setter("allow_credentials", allow_credentials) if allowed_headers is not None: - pulumi.set(__self__, "allowed_headers", allowed_headers) + _setter("allowed_headers", allowed_headers) if allowed_methods is not None: - pulumi.set(__self__, "allowed_methods", allowed_methods) + _setter("allowed_methods", allowed_methods) if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if max_age_in_seconds is not None: - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowCredentials") @@ -627,10 +851,23 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the Healthcare Workspace. :param pulumi.Input[str] name: Specifies the name of the Healthcare Workspace. Changing this forces a new Healthcare Workspace to be created. """ + WorkspacePrivateEndpointConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/healthcare/dicom_service.py b/sdk/python/pulumi_azure/healthcare/dicom_service.py index 3ea17efb3d..e26be0a532 100644 --- a/sdk/python/pulumi_azure/healthcare/dicom_service.py +++ b/sdk/python/pulumi_azure/healthcare/dicom_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,17 +31,44 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether to enabled public networks when data plane traffic coming from public networks while private endpoint is enabled. Defaults to `true`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Healthcare DICOM Service. """ - pulumi.set(__self__, "workspace_id", workspace_id) + DicomServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + workspace_id=workspace_id, + identity=identity, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + workspace_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['DicomServiceIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("workspace_id", workspace_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="workspaceId") @@ -139,24 +166,59 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Healthcare DICOM Service. :param pulumi.Input[str] workspace_id: Specifies the id of the Healthcare Workspace where the Healthcare DICOM Service should exist. Changing this forces a new Healthcare DICOM Service to be created. """ + _DicomServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentications=authentications, + identity=identity, + location=location, + name=name, + private_endpoints=private_endpoints, + public_network_access_enabled=public_network_access_enabled, + service_url=service_url, + tags=tags, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentications: Optional[pulumi.Input[Sequence[pulumi.Input['DicomServiceAuthenticationArgs']]]] = None, + identity: Optional[pulumi.Input['DicomServiceIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['DicomServicePrivateEndpointArgs']]]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + service_url: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_endpoints is None and 'privateEndpoints' in kwargs: + private_endpoints = kwargs['privateEndpoints'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if service_url is None and 'serviceUrl' in kwargs: + service_url = kwargs['serviceUrl'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if authentications is not None: - pulumi.set(__self__, "authentications", authentications) + _setter("authentications", authentications) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_endpoints is not None: - pulumi.set(__self__, "private_endpoints", private_endpoints) + _setter("private_endpoints", private_endpoints) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if service_url is not None: - pulumi.set(__self__, "service_url", service_url) + _setter("service_url", service_url) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter @@ -363,6 +425,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DicomServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -383,6 +449,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = DicomServiceArgs.__new__(DicomServiceArgs) + if identity is not None and not isinstance(identity, DicomServiceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + DicomServiceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/healthcare/fhir_service.py b/sdk/python/pulumi_azure/healthcare/fhir_service.py index ef79b7a1c2..1aaffd43de 100644 --- a/sdk/python/pulumi_azure/healthcare/fhir_service.py +++ b/sdk/python/pulumi_azure/healthcare/fhir_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,29 +45,82 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FhirServiceOciArtifactArgs']]] oci_artifacts: [A list](https://www.terraform.io/docs/configuration/attr-as-blocks.html) of objects describing [OCI artifacts for export](https://learn.microsoft.com/en-gb/azure/healthcare-apis/fhir/de-identified-export) as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Healthcare FHIR Service. """ - pulumi.set(__self__, "authentication", authentication) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "workspace_id", workspace_id) + FhirServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication=authentication, + resource_group_name=resource_group_name, + workspace_id=workspace_id, + access_policy_object_ids=access_policy_object_ids, + configuration_export_storage_account_name=configuration_export_storage_account_name, + container_registry_login_server_urls=container_registry_login_server_urls, + cors=cors, + identity=identity, + kind=kind, + location=location, + name=name, + oci_artifacts=oci_artifacts, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication: Optional[pulumi.Input['FhirServiceAuthenticationArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + access_policy_object_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + configuration_export_storage_account_name: Optional[pulumi.Input[str]] = None, + container_registry_login_server_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cors: Optional[pulumi.Input['FhirServiceCorsArgs']] = None, + identity: Optional[pulumi.Input['FhirServiceIdentityArgs']] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + oci_artifacts: Optional[pulumi.Input[Sequence[pulumi.Input['FhirServiceOciArtifactArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication is None: + raise TypeError("Missing 'authentication' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if access_policy_object_ids is None and 'accessPolicyObjectIds' in kwargs: + access_policy_object_ids = kwargs['accessPolicyObjectIds'] + if configuration_export_storage_account_name is None and 'configurationExportStorageAccountName' in kwargs: + configuration_export_storage_account_name = kwargs['configurationExportStorageAccountName'] + if container_registry_login_server_urls is None and 'containerRegistryLoginServerUrls' in kwargs: + container_registry_login_server_urls = kwargs['containerRegistryLoginServerUrls'] + if oci_artifacts is None and 'ociArtifacts' in kwargs: + oci_artifacts = kwargs['ociArtifacts'] + + _setter("authentication", authentication) + _setter("resource_group_name", resource_group_name) + _setter("workspace_id", workspace_id) if access_policy_object_ids is not None: - pulumi.set(__self__, "access_policy_object_ids", access_policy_object_ids) + _setter("access_policy_object_ids", access_policy_object_ids) if configuration_export_storage_account_name is not None: - pulumi.set(__self__, "configuration_export_storage_account_name", configuration_export_storage_account_name) + _setter("configuration_export_storage_account_name", configuration_export_storage_account_name) if container_registry_login_server_urls is not None: - pulumi.set(__self__, "container_registry_login_server_urls", container_registry_login_server_urls) + _setter("container_registry_login_server_urls", container_registry_login_server_urls) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if oci_artifacts is not None: - pulumi.set(__self__, "oci_artifacts", oci_artifacts) + _setter("oci_artifacts", oci_artifacts) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -260,34 +313,85 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Healthcare FHIR Service. :param pulumi.Input[str] workspace_id: Specifies the id of the Healthcare Workspace where the Healthcare FHIR Service should exist. Changing this forces a new Healthcare FHIR Service to be created. """ + _FhirServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_policy_object_ids=access_policy_object_ids, + authentication=authentication, + configuration_export_storage_account_name=configuration_export_storage_account_name, + container_registry_login_server_urls=container_registry_login_server_urls, + cors=cors, + identity=identity, + kind=kind, + location=location, + name=name, + oci_artifacts=oci_artifacts, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + tags=tags, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_policy_object_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + authentication: Optional[pulumi.Input['FhirServiceAuthenticationArgs']] = None, + configuration_export_storage_account_name: Optional[pulumi.Input[str]] = None, + container_registry_login_server_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cors: Optional[pulumi.Input['FhirServiceCorsArgs']] = None, + identity: Optional[pulumi.Input['FhirServiceIdentityArgs']] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + oci_artifacts: Optional[pulumi.Input[Sequence[pulumi.Input['FhirServiceOciArtifactArgs']]]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_policy_object_ids is None and 'accessPolicyObjectIds' in kwargs: + access_policy_object_ids = kwargs['accessPolicyObjectIds'] + if configuration_export_storage_account_name is None and 'configurationExportStorageAccountName' in kwargs: + configuration_export_storage_account_name = kwargs['configurationExportStorageAccountName'] + if container_registry_login_server_urls is None and 'containerRegistryLoginServerUrls' in kwargs: + container_registry_login_server_urls = kwargs['containerRegistryLoginServerUrls'] + if oci_artifacts is None and 'ociArtifacts' in kwargs: + oci_artifacts = kwargs['ociArtifacts'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if access_policy_object_ids is not None: - pulumi.set(__self__, "access_policy_object_ids", access_policy_object_ids) + _setter("access_policy_object_ids", access_policy_object_ids) if authentication is not None: - pulumi.set(__self__, "authentication", authentication) + _setter("authentication", authentication) if configuration_export_storage_account_name is not None: - pulumi.set(__self__, "configuration_export_storage_account_name", configuration_export_storage_account_name) + _setter("configuration_export_storage_account_name", configuration_export_storage_account_name) if container_registry_login_server_urls is not None: - pulumi.set(__self__, "container_registry_login_server_urls", container_registry_login_server_urls) + _setter("container_registry_login_server_urls", container_registry_login_server_urls) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if oci_artifacts is not None: - pulumi.set(__self__, "oci_artifacts", oci_artifacts) + _setter("oci_artifacts", oci_artifacts) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="accessPolicyObjectIds") @@ -615,6 +719,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FhirServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -643,12 +751,27 @@ def _internal_init(__self__, __props__ = FhirServiceArgs.__new__(FhirServiceArgs) __props__.__dict__["access_policy_object_ids"] = access_policy_object_ids + if authentication is not None and not isinstance(authentication, FhirServiceAuthenticationArgs): + authentication = authentication or {} + def _setter(key, value): + authentication[key] = value + FhirServiceAuthenticationArgs._configure(_setter, **authentication) if authentication is None and not opts.urn: raise TypeError("Missing required property 'authentication'") __props__.__dict__["authentication"] = authentication __props__.__dict__["configuration_export_storage_account_name"] = configuration_export_storage_account_name __props__.__dict__["container_registry_login_server_urls"] = container_registry_login_server_urls + if cors is not None and not isinstance(cors, FhirServiceCorsArgs): + cors = cors or {} + def _setter(key, value): + cors[key] = value + FhirServiceCorsArgs._configure(_setter, **cors) __props__.__dict__["cors"] = cors + if identity is not None and not isinstance(identity, FhirServiceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + FhirServiceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["kind"] = kind __props__.__dict__["location"] = location diff --git a/sdk/python/pulumi_azure/healthcare/get_dicom_service.py b/sdk/python/pulumi_azure/healthcare/get_dicom_service.py index 0aa060ac15..fdd59827b0 100644 --- a/sdk/python/pulumi_azure/healthcare/get_dicom_service.py +++ b/sdk/python/pulumi_azure/healthcare/get_dicom_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/healthcare/get_fhir_service.py b/sdk/python/pulumi_azure/healthcare/get_fhir_service.py index f68dab0488..8fdf793180 100644 --- a/sdk/python/pulumi_azure/healthcare/get_fhir_service.py +++ b/sdk/python/pulumi_azure/healthcare/get_fhir_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/healthcare/get_medtech_service.py b/sdk/python/pulumi_azure/healthcare/get_medtech_service.py index 5bcdc10eeb..9d7f21a164 100644 --- a/sdk/python/pulumi_azure/healthcare/get_medtech_service.py +++ b/sdk/python/pulumi_azure/healthcare/get_medtech_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/healthcare/get_service.py b/sdk/python/pulumi_azure/healthcare/get_service.py index 738ec6a9bb..852b8e5128 100644 --- a/sdk/python/pulumi_azure/healthcare/get_service.py +++ b/sdk/python/pulumi_azure/healthcare/get_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/healthcare/get_workspace.py b/sdk/python/pulumi_azure/healthcare/get_workspace.py index a74798cb48..373c7493ba 100644 --- a/sdk/python/pulumi_azure/healthcare/get_workspace.py +++ b/sdk/python/pulumi_azure/healthcare/get_workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/healthcare/medtech_service.py b/sdk/python/pulumi_azure/healthcare/medtech_service.py index 37bffff614..9a77573279 100644 --- a/sdk/python/pulumi_azure/healthcare/medtech_service.py +++ b/sdk/python/pulumi_azure/healthcare/medtech_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,19 +37,66 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Healthcare Med Tech Service. Changing this forces a new Healthcare Med Tech Service to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Healthcare Med Tech Service. """ - pulumi.set(__self__, "device_mapping_json", device_mapping_json) - pulumi.set(__self__, "eventhub_consumer_group_name", eventhub_consumer_group_name) - pulumi.set(__self__, "eventhub_name", eventhub_name) - pulumi.set(__self__, "eventhub_namespace_name", eventhub_namespace_name) - pulumi.set(__self__, "workspace_id", workspace_id) + MedtechServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + device_mapping_json=device_mapping_json, + eventhub_consumer_group_name=eventhub_consumer_group_name, + eventhub_name=eventhub_name, + eventhub_namespace_name=eventhub_namespace_name, + workspace_id=workspace_id, + identity=identity, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + device_mapping_json: Optional[pulumi.Input[str]] = None, + eventhub_consumer_group_name: Optional[pulumi.Input[str]] = None, + eventhub_name: Optional[pulumi.Input[str]] = None, + eventhub_namespace_name: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['MedtechServiceIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if device_mapping_json is None and 'deviceMappingJson' in kwargs: + device_mapping_json = kwargs['deviceMappingJson'] + if device_mapping_json is None: + raise TypeError("Missing 'device_mapping_json' argument") + if eventhub_consumer_group_name is None and 'eventhubConsumerGroupName' in kwargs: + eventhub_consumer_group_name = kwargs['eventhubConsumerGroupName'] + if eventhub_consumer_group_name is None: + raise TypeError("Missing 'eventhub_consumer_group_name' argument") + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_name is None: + raise TypeError("Missing 'eventhub_name' argument") + if eventhub_namespace_name is None and 'eventhubNamespaceName' in kwargs: + eventhub_namespace_name = kwargs['eventhubNamespaceName'] + if eventhub_namespace_name is None: + raise TypeError("Missing 'eventhub_namespace_name' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + + _setter("device_mapping_json", device_mapping_json) + _setter("eventhub_consumer_group_name", eventhub_consumer_group_name) + _setter("eventhub_name", eventhub_name) + _setter("eventhub_namespace_name", eventhub_namespace_name) + _setter("workspace_id", workspace_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="deviceMappingJson") @@ -184,24 +231,61 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Healthcare Med Tech Service. :param pulumi.Input[str] workspace_id: Specifies the id of the Healthcare Workspace where the Healthcare Med Tech Service should exist. Changing this forces a new Healthcare Med Tech Service to be created. """ + _MedtechServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + device_mapping_json=device_mapping_json, + eventhub_consumer_group_name=eventhub_consumer_group_name, + eventhub_name=eventhub_name, + eventhub_namespace_name=eventhub_namespace_name, + identity=identity, + location=location, + name=name, + tags=tags, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + device_mapping_json: Optional[pulumi.Input[str]] = None, + eventhub_consumer_group_name: Optional[pulumi.Input[str]] = None, + eventhub_name: Optional[pulumi.Input[str]] = None, + eventhub_namespace_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['MedtechServiceIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if device_mapping_json is None and 'deviceMappingJson' in kwargs: + device_mapping_json = kwargs['deviceMappingJson'] + if eventhub_consumer_group_name is None and 'eventhubConsumerGroupName' in kwargs: + eventhub_consumer_group_name = kwargs['eventhubConsumerGroupName'] + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_namespace_name is None and 'eventhubNamespaceName' in kwargs: + eventhub_namespace_name = kwargs['eventhubNamespaceName'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if device_mapping_json is not None: - pulumi.set(__self__, "device_mapping_json", device_mapping_json) + _setter("device_mapping_json", device_mapping_json) if eventhub_consumer_group_name is not None: - pulumi.set(__self__, "eventhub_consumer_group_name", eventhub_consumer_group_name) + _setter("eventhub_consumer_group_name", eventhub_consumer_group_name) if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if eventhub_namespace_name is not None: - pulumi.set(__self__, "eventhub_namespace_name", eventhub_namespace_name) + _setter("eventhub_namespace_name", eventhub_namespace_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="deviceMappingJson") @@ -455,6 +539,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MedtechServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -490,6 +578,11 @@ def _internal_init(__self__, if eventhub_namespace_name is None and not opts.urn: raise TypeError("Missing required property 'eventhub_namespace_name'") __props__.__dict__["eventhub_namespace_name"] = eventhub_namespace_name + if identity is not None and not isinstance(identity, MedtechServiceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + MedtechServiceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/healthcare/medtech_service_fhir_destination.py b/sdk/python/pulumi_azure/healthcare/medtech_service_fhir_destination.py index 0e33d0db73..38004ad091 100644 --- a/sdk/python/pulumi_azure/healthcare/medtech_service_fhir_destination.py +++ b/sdk/python/pulumi_azure/healthcare/medtech_service_fhir_destination.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['MedtechServiceFhirDestinationArgs', 'MedtechServiceFhirDestination'] @@ -29,14 +29,51 @@ def __init__(__self__, *, :param pulumi.Input[str] location: Specifies the Azure Region where the Healthcare Med Tech Service Fhir Destination should be created. Changing this forces a new Healthcare Med Tech Service Fhir Destination to be created. :param pulumi.Input[str] name: Specifies the name of the Healthcare Med Tech Service Fhir Destination. Changing this forces a new Healthcare Med Tech Service Fhir Destination to be created. """ - pulumi.set(__self__, "destination_fhir_mapping_json", destination_fhir_mapping_json) - pulumi.set(__self__, "destination_fhir_service_id", destination_fhir_service_id) - pulumi.set(__self__, "destination_identity_resolution_type", destination_identity_resolution_type) - pulumi.set(__self__, "medtech_service_id", medtech_service_id) + MedtechServiceFhirDestinationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_fhir_mapping_json=destination_fhir_mapping_json, + destination_fhir_service_id=destination_fhir_service_id, + destination_identity_resolution_type=destination_identity_resolution_type, + medtech_service_id=medtech_service_id, + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_fhir_mapping_json: Optional[pulumi.Input[str]] = None, + destination_fhir_service_id: Optional[pulumi.Input[str]] = None, + destination_identity_resolution_type: Optional[pulumi.Input[str]] = None, + medtech_service_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_fhir_mapping_json is None and 'destinationFhirMappingJson' in kwargs: + destination_fhir_mapping_json = kwargs['destinationFhirMappingJson'] + if destination_fhir_mapping_json is None: + raise TypeError("Missing 'destination_fhir_mapping_json' argument") + if destination_fhir_service_id is None and 'destinationFhirServiceId' in kwargs: + destination_fhir_service_id = kwargs['destinationFhirServiceId'] + if destination_fhir_service_id is None: + raise TypeError("Missing 'destination_fhir_service_id' argument") + if destination_identity_resolution_type is None and 'destinationIdentityResolutionType' in kwargs: + destination_identity_resolution_type = kwargs['destinationIdentityResolutionType'] + if destination_identity_resolution_type is None: + raise TypeError("Missing 'destination_identity_resolution_type' argument") + if medtech_service_id is None and 'medtechServiceId' in kwargs: + medtech_service_id = kwargs['medtechServiceId'] + if medtech_service_id is None: + raise TypeError("Missing 'medtech_service_id' argument") + + _setter("destination_fhir_mapping_json", destination_fhir_mapping_json) + _setter("destination_fhir_service_id", destination_fhir_service_id) + _setter("destination_identity_resolution_type", destination_identity_resolution_type) + _setter("medtech_service_id", medtech_service_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="destinationFhirMappingJson") @@ -129,18 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[str] medtech_service_id: Specifies the name of the Healthcare Med Tech Service where the Healthcare Med Tech Service Fhir Destination should exist. Changing this forces a new Healthcare Med Tech Service Fhir Destination to be created. :param pulumi.Input[str] name: Specifies the name of the Healthcare Med Tech Service Fhir Destination. Changing this forces a new Healthcare Med Tech Service Fhir Destination to be created. """ + _MedtechServiceFhirDestinationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_fhir_mapping_json=destination_fhir_mapping_json, + destination_fhir_service_id=destination_fhir_service_id, + destination_identity_resolution_type=destination_identity_resolution_type, + location=location, + medtech_service_id=medtech_service_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_fhir_mapping_json: Optional[pulumi.Input[str]] = None, + destination_fhir_service_id: Optional[pulumi.Input[str]] = None, + destination_identity_resolution_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + medtech_service_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_fhir_mapping_json is None and 'destinationFhirMappingJson' in kwargs: + destination_fhir_mapping_json = kwargs['destinationFhirMappingJson'] + if destination_fhir_service_id is None and 'destinationFhirServiceId' in kwargs: + destination_fhir_service_id = kwargs['destinationFhirServiceId'] + if destination_identity_resolution_type is None and 'destinationIdentityResolutionType' in kwargs: + destination_identity_resolution_type = kwargs['destinationIdentityResolutionType'] + if medtech_service_id is None and 'medtechServiceId' in kwargs: + medtech_service_id = kwargs['medtechServiceId'] + if destination_fhir_mapping_json is not None: - pulumi.set(__self__, "destination_fhir_mapping_json", destination_fhir_mapping_json) + _setter("destination_fhir_mapping_json", destination_fhir_mapping_json) if destination_fhir_service_id is not None: - pulumi.set(__self__, "destination_fhir_service_id", destination_fhir_service_id) + _setter("destination_fhir_service_id", destination_fhir_service_id) if destination_identity_resolution_type is not None: - pulumi.set(__self__, "destination_identity_resolution_type", destination_identity_resolution_type) + _setter("destination_identity_resolution_type", destination_identity_resolution_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if medtech_service_id is not None: - pulumi.set(__self__, "medtech_service_id", medtech_service_id) + _setter("medtech_service_id", medtech_service_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="destinationFhirMappingJson") @@ -414,6 +480,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MedtechServiceFhirDestinationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/healthcare/outputs.py b/sdk/python/pulumi_azure/healthcare/outputs.py index 04565b752b..bc1fae28ac 100644 --- a/sdk/python/pulumi_azure/healthcare/outputs.py +++ b/sdk/python/pulumi_azure/healthcare/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -40,10 +40,23 @@ def __init__(__self__, *, """ :param Sequence[str] audiences: The intended audience to receive authentication tokens for the service. The default value is """ + DicomServiceAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + audiences=audiences, + authority=authority, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audiences: Optional[Sequence[str]] = None, + authority: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audiences is not None: - pulumi.set(__self__, "audiences", audiences) + _setter("audiences", audiences) if authority is not None: - pulumi.set(__self__, "authority", authority) + _setter("authority", authority) @property @pulumi.getter @@ -91,13 +104,38 @@ def __init__(__self__, *, :param str type: The type of identity used for the Healthcare DICOM service. Possible values are `UserAssigned`, `SystemAssigned` and `SystemAssigned, UserAssigned`. If `UserAssigned` is set, an `identity_ids` must be set as well. :param Sequence[str] identity_ids: A list of User Assigned Identity IDs which should be assigned to this Healthcare DICOM service. """ - pulumi.set(__self__, "type", type) + DicomServiceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -135,10 +173,23 @@ def __init__(__self__, *, :param str id: The ID of the Healthcare DICOM Service. :param str name: Specifies the name of the Healthcare DICOM Service. Changing this forces a new Healthcare DICOM Service to be created. """ + DicomServicePrivateEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -184,10 +235,31 @@ def __init__(__self__, *, :param str audience: The intended audience to receive authentication tokens for the service. The default value is `https://.fhir.azurehealthcareapis.com`. :param bool smart_proxy_enabled: Whether smart proxy is enabled. """ - pulumi.set(__self__, "audience", audience) - pulumi.set(__self__, "authority", authority) + FhirServiceAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + audience=audience, + authority=authority, + smart_proxy_enabled=smart_proxy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audience: Optional[str] = None, + authority: Optional[str] = None, + smart_proxy_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audience is None: + raise TypeError("Missing 'audience' argument") + if authority is None: + raise TypeError("Missing 'authority' argument") + if smart_proxy_enabled is None and 'smartProxyEnabled' in kwargs: + smart_proxy_enabled = kwargs['smartProxyEnabled'] + + _setter("audience", audience) + _setter("authority", authority) if smart_proxy_enabled is not None: - pulumi.set(__self__, "smart_proxy_enabled", smart_proxy_enabled) + _setter("smart_proxy_enabled", smart_proxy_enabled) @property @pulumi.getter @@ -251,13 +323,48 @@ def __init__(__self__, *, :param bool credentials_allowed: If credentials are allowed via CORS. :param int max_age_in_seconds: The max age to be allowed via CORS. """ - pulumi.set(__self__, "allowed_headers", allowed_headers) - pulumi.set(__self__, "allowed_methods", allowed_methods) - pulumi.set(__self__, "allowed_origins", allowed_origins) + FhirServiceCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + credentials_allowed=credentials_allowed, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_headers: Optional[Sequence[str]] = None, + allowed_methods: Optional[Sequence[str]] = None, + allowed_origins: Optional[Sequence[str]] = None, + credentials_allowed: Optional[bool] = None, + max_age_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_headers is None: + raise TypeError("Missing 'allowed_headers' argument") + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_methods is None: + raise TypeError("Missing 'allowed_methods' argument") + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if credentials_allowed is None and 'credentialsAllowed' in kwargs: + credentials_allowed = kwargs['credentialsAllowed'] + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + + _setter("allowed_headers", allowed_headers) + _setter("allowed_methods", allowed_methods) + _setter("allowed_origins", allowed_origins) if credentials_allowed is not None: - pulumi.set(__self__, "credentials_allowed", credentials_allowed) + _setter("credentials_allowed", credentials_allowed) if max_age_in_seconds is not None: - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowedHeaders") @@ -332,13 +439,38 @@ def __init__(__self__, *, :param str type: The type of managed identity to assign. Possible values are `UserAssigned` and `SystemAssigned` :param Sequence[str] identity_ids: A list of one or more Resource IDs for User Assigned Managed identities to assign. Required when `type` is set to `UserAssigned`. """ - pulumi.set(__self__, "type", type) + FhirServiceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -397,11 +529,32 @@ def __init__(__self__, *, :param str digest: A digest of an image within Azure container registry used for export operations of the service instance to narrow the artifacts down. :param str image_name: An image within Azure container registry used for export operations of the service instance. """ - pulumi.set(__self__, "login_server", login_server) + FhirServiceOciArtifact._configure( + lambda key, value: pulumi.set(__self__, key, value), + login_server=login_server, + digest=digest, + image_name=image_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login_server: Optional[str] = None, + digest: Optional[str] = None, + image_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login_server is None and 'loginServer' in kwargs: + login_server = kwargs['loginServer'] + if login_server is None: + raise TypeError("Missing 'login_server' argument") + if image_name is None and 'imageName' in kwargs: + image_name = kwargs['imageName'] + + _setter("login_server", login_server) if digest is not None: - pulumi.set(__self__, "digest", digest) + _setter("digest", digest) if image_name is not None: - pulumi.set(__self__, "image_name", image_name) + _setter("image_name", image_name) @property @pulumi.getter(name="loginServer") @@ -461,13 +614,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this System Assigned Managed Service Identity. :param str tenant_id: The Tenant ID associated with this System Assigned Managed Service Identity. """ - pulumi.set(__self__, "type", type) + MedtechServiceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -528,12 +706,29 @@ def __init__(__self__, *, Authority must be registered to Azure AD and in the following format: https://{Azure-AD-endpoint}/{tenant-id}. :param bool smart_proxy_enabled: (Boolean) Enables the 'SMART on FHIR' option for mobile and web implementations. """ + ServiceAuthenticationConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + audience=audience, + authority=authority, + smart_proxy_enabled=smart_proxy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audience: Optional[str] = None, + authority: Optional[str] = None, + smart_proxy_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if smart_proxy_enabled is None and 'smartProxyEnabled' in kwargs: + smart_proxy_enabled = kwargs['smartProxyEnabled'] + if audience is not None: - pulumi.set(__self__, "audience", audience) + _setter("audience", audience) if authority is not None: - pulumi.set(__self__, "authority", authority) + _setter("authority", authority) if smart_proxy_enabled is not None: - pulumi.set(__self__, "smart_proxy_enabled", smart_proxy_enabled) + _setter("smart_proxy_enabled", smart_proxy_enabled) @property @pulumi.getter @@ -601,16 +796,45 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: A set of origins to be allowed via CORS. :param int max_age_in_seconds: The max age to be allowed via CORS. """ + ServiceCorsConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_credentials=allow_credentials, + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_credentials: Optional[bool] = None, + allowed_headers: Optional[Sequence[str]] = None, + allowed_methods: Optional[Sequence[str]] = None, + allowed_origins: Optional[Sequence[str]] = None, + max_age_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_credentials is None and 'allowCredentials' in kwargs: + allow_credentials = kwargs['allowCredentials'] + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + if allow_credentials is not None: - pulumi.set(__self__, "allow_credentials", allow_credentials) + _setter("allow_credentials", allow_credentials) if allowed_headers is not None: - pulumi.set(__self__, "allowed_headers", allowed_headers) + _setter("allowed_headers", allowed_headers) if allowed_methods is not None: - pulumi.set(__self__, "allowed_methods", allowed_methods) + _setter("allowed_methods", allowed_methods) if allowed_origins is not None: - pulumi.set(__self__, "allowed_origins", allowed_origins) + _setter("allowed_origins", allowed_origins) if max_age_in_seconds is not None: - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowCredentials") @@ -662,10 +886,23 @@ def __init__(__self__, *, :param str id: The ID of the Healthcare Workspace. :param str name: Specifies the name of the Healthcare Workspace. Changing this forces a new Healthcare Workspace to be created. """ + WorkspacePrivateEndpointConnection._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -692,8 +929,25 @@ def __init__(__self__, *, """ :param Sequence[str] audiences: The intended audience to receive authentication tokens for the service. The default value is """ - pulumi.set(__self__, "audiences", audiences) - pulumi.set(__self__, "authority", authority) + GetDicomServiceAuthenticationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + audiences=audiences, + authority=authority, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audiences: Optional[Sequence[str]] = None, + authority: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audiences is None: + raise TypeError("Missing 'audiences' argument") + if authority is None: + raise TypeError("Missing 'authority' argument") + + _setter("audiences", audiences) + _setter("authority", authority) @property @pulumi.getter @@ -716,10 +970,41 @@ def __init__(__self__, *, principal_id: str, tenant_id: str, type: str): - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetDicomServiceIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -751,8 +1036,25 @@ def __init__(__self__, *, :param str id: The ID of the Healthcare DICOM Service. :param str name: The name of the Healthcare DICOM Service """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) + GetDicomServicePrivateEndpointResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("id", id) + _setter("name", name) @property @pulumi.getter @@ -780,9 +1082,32 @@ def __init__(__self__, *, """ :param str audience: The intended audience to receive authentication tokens for the service. The default value is `https://.fhir.azurehealthcareapis.com`. """ - pulumi.set(__self__, "audience", audience) - pulumi.set(__self__, "authority", authority) - pulumi.set(__self__, "smart_proxy_enabled", smart_proxy_enabled) + GetFhirServiceAuthenticationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + audience=audience, + authority=authority, + smart_proxy_enabled=smart_proxy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audience: Optional[str] = None, + authority: Optional[str] = None, + smart_proxy_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audience is None: + raise TypeError("Missing 'audience' argument") + if authority is None: + raise TypeError("Missing 'authority' argument") + if smart_proxy_enabled is None and 'smartProxyEnabled' in kwargs: + smart_proxy_enabled = kwargs['smartProxyEnabled'] + if smart_proxy_enabled is None: + raise TypeError("Missing 'smart_proxy_enabled' argument") + + _setter("audience", audience) + _setter("authority", authority) + _setter("smart_proxy_enabled", smart_proxy_enabled) @property @pulumi.getter @@ -818,11 +1143,50 @@ def __init__(__self__, *, :param bool credentials_allowed: Are credentials allowed via CORS? :param int max_age_in_seconds: The max age to be allowed via CORS. """ - pulumi.set(__self__, "allowed_headers", allowed_headers) - pulumi.set(__self__, "allowed_methods", allowed_methods) - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "credentials_allowed", credentials_allowed) - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + GetFhirServiceCorResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + credentials_allowed=credentials_allowed, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_headers: Optional[Sequence[str]] = None, + allowed_methods: Optional[Sequence[str]] = None, + allowed_origins: Optional[Sequence[str]] = None, + credentials_allowed: Optional[bool] = None, + max_age_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_headers is None: + raise TypeError("Missing 'allowed_headers' argument") + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_methods is None: + raise TypeError("Missing 'allowed_methods' argument") + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if credentials_allowed is None and 'credentialsAllowed' in kwargs: + credentials_allowed = kwargs['credentialsAllowed'] + if credentials_allowed is None: + raise TypeError("Missing 'credentials_allowed' argument") + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + if max_age_in_seconds is None: + raise TypeError("Missing 'max_age_in_seconds' argument") + + _setter("allowed_headers", allowed_headers) + _setter("allowed_methods", allowed_methods) + _setter("allowed_origins", allowed_origins) + _setter("credentials_allowed", credentials_allowed) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowedHeaders") @@ -877,10 +1241,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID associated with this System Assigned Managed Service Identity. :param str type: The type of identity used for the Healthcare FHIR service. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetFhirServiceIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -924,10 +1319,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Healthcare Med Tech Service. :param str type: The type of identity used for the Healthcare Med Tech Service. Possible values are `SystemAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetMedtechServiceIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -970,9 +1396,32 @@ def __init__(__self__, *, :param str authority: The Azure Active Directory (tenant) that serves as the authentication authority to access the service. :param bool smart_proxy_enabled: Is the 'SMART on FHIR' option for mobile and web implementations enabled? """ - pulumi.set(__self__, "audience", audience) - pulumi.set(__self__, "authority", authority) - pulumi.set(__self__, "smart_proxy_enabled", smart_proxy_enabled) + GetServiceAuthenticationConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + audience=audience, + authority=authority, + smart_proxy_enabled=smart_proxy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audience: Optional[str] = None, + authority: Optional[str] = None, + smart_proxy_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audience is None: + raise TypeError("Missing 'audience' argument") + if authority is None: + raise TypeError("Missing 'authority' argument") + if smart_proxy_enabled is None and 'smartProxyEnabled' in kwargs: + smart_proxy_enabled = kwargs['smartProxyEnabled'] + if smart_proxy_enabled is None: + raise TypeError("Missing 'smart_proxy_enabled' argument") + + _setter("audience", audience) + _setter("authority", authority) + _setter("smart_proxy_enabled", smart_proxy_enabled) @property @pulumi.getter @@ -1014,11 +1463,50 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: The set of origins to be allowed via CORS. :param int max_age_in_seconds: The max age to be allowed via CORS. """ - pulumi.set(__self__, "allow_credentials", allow_credentials) - pulumi.set(__self__, "allowed_headers", allowed_headers) - pulumi.set(__self__, "allowed_methods", allowed_methods) - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + GetServiceCorsConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_credentials=allow_credentials, + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_credentials: Optional[bool] = None, + allowed_headers: Optional[Sequence[str]] = None, + allowed_methods: Optional[Sequence[str]] = None, + allowed_origins: Optional[Sequence[str]] = None, + max_age_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_credentials is None and 'allowCredentials' in kwargs: + allow_credentials = kwargs['allowCredentials'] + if allow_credentials is None: + raise TypeError("Missing 'allow_credentials' argument") + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_headers is None: + raise TypeError("Missing 'allowed_headers' argument") + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_methods is None: + raise TypeError("Missing 'allowed_methods' argument") + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + if max_age_in_seconds is None: + raise TypeError("Missing 'max_age_in_seconds' argument") + + _setter("allow_credentials", allow_credentials) + _setter("allowed_headers", allowed_headers) + _setter("allowed_methods", allowed_methods) + _setter("allowed_origins", allowed_origins) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowCredentials") diff --git a/sdk/python/pulumi_azure/healthcare/service.py b/sdk/python/pulumi_azure/healthcare/service.py index 075c2b556e..50ec820443 100644 --- a/sdk/python/pulumi_azure/healthcare/service.py +++ b/sdk/python/pulumi_azure/healthcare/service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -44,27 +44,74 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether public network access is enabled or disabled for this service instance. Defaults to `true`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + ServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + access_policy_object_ids=access_policy_object_ids, + authentication_configuration=authentication_configuration, + cors_configuration=cors_configuration, + cosmosdb_key_vault_key_versionless_id=cosmosdb_key_vault_key_versionless_id, + cosmosdb_throughput=cosmosdb_throughput, + kind=kind, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + access_policy_object_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + authentication_configuration: Optional[pulumi.Input['ServiceAuthenticationConfigurationArgs']] = None, + cors_configuration: Optional[pulumi.Input['ServiceCorsConfigurationArgs']] = None, + cosmosdb_key_vault_key_versionless_id: Optional[pulumi.Input[str]] = None, + cosmosdb_throughput: Optional[pulumi.Input[int]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if access_policy_object_ids is None and 'accessPolicyObjectIds' in kwargs: + access_policy_object_ids = kwargs['accessPolicyObjectIds'] + if authentication_configuration is None and 'authenticationConfiguration' in kwargs: + authentication_configuration = kwargs['authenticationConfiguration'] + if cors_configuration is None and 'corsConfiguration' in kwargs: + cors_configuration = kwargs['corsConfiguration'] + if cosmosdb_key_vault_key_versionless_id is None and 'cosmosdbKeyVaultKeyVersionlessId' in kwargs: + cosmosdb_key_vault_key_versionless_id = kwargs['cosmosdbKeyVaultKeyVersionlessId'] + if cosmosdb_throughput is None and 'cosmosdbThroughput' in kwargs: + cosmosdb_throughput = kwargs['cosmosdbThroughput'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) if access_policy_object_ids is not None: - pulumi.set(__self__, "access_policy_object_ids", access_policy_object_ids) + _setter("access_policy_object_ids", access_policy_object_ids) if authentication_configuration is not None: - pulumi.set(__self__, "authentication_configuration", authentication_configuration) + _setter("authentication_configuration", authentication_configuration) if cors_configuration is not None: - pulumi.set(__self__, "cors_configuration", cors_configuration) + _setter("cors_configuration", cors_configuration) if cosmosdb_key_vault_key_versionless_id is not None: - pulumi.set(__self__, "cosmosdb_key_vault_key_versionless_id", cosmosdb_key_vault_key_versionless_id) + _setter("cosmosdb_key_vault_key_versionless_id", cosmosdb_key_vault_key_versionless_id) if cosmosdb_throughput is not None: - pulumi.set(__self__, "cosmosdb_throughput", cosmosdb_throughput) + _setter("cosmosdb_throughput", cosmosdb_throughput) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -231,28 +278,73 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which to create the Service. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_policy_object_ids=access_policy_object_ids, + authentication_configuration=authentication_configuration, + cors_configuration=cors_configuration, + cosmosdb_key_vault_key_versionless_id=cosmosdb_key_vault_key_versionless_id, + cosmosdb_throughput=cosmosdb_throughput, + kind=kind, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_policy_object_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + authentication_configuration: Optional[pulumi.Input['ServiceAuthenticationConfigurationArgs']] = None, + cors_configuration: Optional[pulumi.Input['ServiceCorsConfigurationArgs']] = None, + cosmosdb_key_vault_key_versionless_id: Optional[pulumi.Input[str]] = None, + cosmosdb_throughput: Optional[pulumi.Input[int]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_policy_object_ids is None and 'accessPolicyObjectIds' in kwargs: + access_policy_object_ids = kwargs['accessPolicyObjectIds'] + if authentication_configuration is None and 'authenticationConfiguration' in kwargs: + authentication_configuration = kwargs['authenticationConfiguration'] + if cors_configuration is None and 'corsConfiguration' in kwargs: + cors_configuration = kwargs['corsConfiguration'] + if cosmosdb_key_vault_key_versionless_id is None and 'cosmosdbKeyVaultKeyVersionlessId' in kwargs: + cosmosdb_key_vault_key_versionless_id = kwargs['cosmosdbKeyVaultKeyVersionlessId'] + if cosmosdb_throughput is None and 'cosmosdbThroughput' in kwargs: + cosmosdb_throughput = kwargs['cosmosdbThroughput'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if access_policy_object_ids is not None: - pulumi.set(__self__, "access_policy_object_ids", access_policy_object_ids) + _setter("access_policy_object_ids", access_policy_object_ids) if authentication_configuration is not None: - pulumi.set(__self__, "authentication_configuration", authentication_configuration) + _setter("authentication_configuration", authentication_configuration) if cors_configuration is not None: - pulumi.set(__self__, "cors_configuration", cors_configuration) + _setter("cors_configuration", cors_configuration) if cosmosdb_key_vault_key_versionless_id is not None: - pulumi.set(__self__, "cosmosdb_key_vault_key_versionless_id", cosmosdb_key_vault_key_versionless_id) + _setter("cosmosdb_key_vault_key_versionless_id", cosmosdb_key_vault_key_versionless_id) if cosmosdb_throughput is not None: - pulumi.set(__self__, "cosmosdb_throughput", cosmosdb_throughput) + _setter("cosmosdb_throughput", cosmosdb_throughput) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="accessPolicyObjectIds") @@ -540,6 +632,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -566,7 +662,17 @@ def _internal_init(__self__, __props__ = ServiceArgs.__new__(ServiceArgs) __props__.__dict__["access_policy_object_ids"] = access_policy_object_ids + if authentication_configuration is not None and not isinstance(authentication_configuration, ServiceAuthenticationConfigurationArgs): + authentication_configuration = authentication_configuration or {} + def _setter(key, value): + authentication_configuration[key] = value + ServiceAuthenticationConfigurationArgs._configure(_setter, **authentication_configuration) __props__.__dict__["authentication_configuration"] = authentication_configuration + if cors_configuration is not None and not isinstance(cors_configuration, ServiceCorsConfigurationArgs): + cors_configuration = cors_configuration or {} + def _setter(key, value): + cors_configuration[key] = value + ServiceCorsConfigurationArgs._configure(_setter, **cors_configuration) __props__.__dict__["cors_configuration"] = cors_configuration __props__.__dict__["cosmosdb_key_vault_key_versionless_id"] = cosmosdb_key_vault_key_versionless_id __props__.__dict__["cosmosdb_throughput"] = cosmosdb_throughput diff --git a/sdk/python/pulumi_azure/healthcare/workspace.py b/sdk/python/pulumi_azure/healthcare/workspace.py index e4f3712a76..315cf6cbf4 100644 --- a/sdk/python/pulumi_azure/healthcare/workspace.py +++ b/sdk/python/pulumi_azure/healthcare/workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,13 +27,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Healthcare Workspace. Changing this forces a new Healthcare Workspace to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Healthcare Workspace. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + WorkspaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -99,16 +120,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group where the Healthcare Workspace should exist. Changing this forces a new Healthcare Workspace to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Healthcare Workspace. """ + _WorkspaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + private_endpoint_connections=private_endpoint_connections, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_endpoint_connections: Optional[pulumi.Input[Sequence[pulumi.Input['WorkspacePrivateEndpointConnectionArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_endpoint_connections is None and 'privateEndpointConnections' in kwargs: + private_endpoint_connections = kwargs['privateEndpointConnections'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_endpoint_connections is not None: - pulumi.set(__self__, "private_endpoint_connections", private_endpoint_connections) + _setter("private_endpoint_connections", private_endpoint_connections) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -245,6 +289,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/hpc/_inputs.py b/sdk/python/pulumi_azure/hpc/_inputs.py index 3c139edde0..0703ec7afa 100644 --- a/sdk/python/pulumi_azure/hpc/_inputs.py +++ b/sdk/python/pulumi_azure/hpc/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -45,20 +45,59 @@ def __init__(__self__, *, :param pulumi.Input[bool] submount_access_enabled: Whether allow access to subdirectories under the root export? :param pulumi.Input[bool] suid_enabled: Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed? """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "scope", scope) + CacheAccessPolicyAccessRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + scope=scope, + anonymous_gid=anonymous_gid, + anonymous_uid=anonymous_uid, + filter=filter, + root_squash_enabled=root_squash_enabled, + submount_access_enabled=submount_access_enabled, + suid_enabled=suid_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + anonymous_gid: Optional[pulumi.Input[int]] = None, + anonymous_uid: Optional[pulumi.Input[int]] = None, + filter: Optional[pulumi.Input[str]] = None, + root_squash_enabled: Optional[pulumi.Input[bool]] = None, + submount_access_enabled: Optional[pulumi.Input[bool]] = None, + suid_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + if anonymous_gid is None and 'anonymousGid' in kwargs: + anonymous_gid = kwargs['anonymousGid'] + if anonymous_uid is None and 'anonymousUid' in kwargs: + anonymous_uid = kwargs['anonymousUid'] + if root_squash_enabled is None and 'rootSquashEnabled' in kwargs: + root_squash_enabled = kwargs['rootSquashEnabled'] + if submount_access_enabled is None and 'submountAccessEnabled' in kwargs: + submount_access_enabled = kwargs['submountAccessEnabled'] + if suid_enabled is None and 'suidEnabled' in kwargs: + suid_enabled = kwargs['suidEnabled'] + + _setter("access", access) + _setter("scope", scope) if anonymous_gid is not None: - pulumi.set(__self__, "anonymous_gid", anonymous_gid) + _setter("anonymous_gid", anonymous_gid) if anonymous_uid is not None: - pulumi.set(__self__, "anonymous_uid", anonymous_uid) + _setter("anonymous_uid", anonymous_uid) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) if root_squash_enabled is not None: - pulumi.set(__self__, "root_squash_enabled", root_squash_enabled) + _setter("root_squash_enabled", root_squash_enabled) if submount_access_enabled is not None: - pulumi.set(__self__, "submount_access_enabled", submount_access_enabled) + _setter("submount_access_enabled", submount_access_enabled) if suid_enabled is not None: - pulumi.set(__self__, "suid_enabled", suid_enabled) + _setter("suid_enabled", suid_enabled) @property @pulumi.getter @@ -166,7 +205,22 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input['CacheDefaultAccessPolicyAccessRuleArgs']]] access_rules: One to three `access_rule` blocks as defined above. """ - pulumi.set(__self__, "access_rules", access_rules) + CacheDefaultAccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_rules=access_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_rules: Optional[pulumi.Input[Sequence[pulumi.Input['CacheDefaultAccessPolicyAccessRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_rules is None and 'accessRules' in kwargs: + access_rules = kwargs['accessRules'] + if access_rules is None: + raise TypeError("Missing 'access_rules' argument") + + _setter("access_rules", access_rules) @property @pulumi.getter(name="accessRules") @@ -204,20 +258,59 @@ def __init__(__self__, *, :param pulumi.Input[bool] submount_access_enabled: Whether allow access to subdirectories under the root export? :param pulumi.Input[bool] suid_enabled: Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed? """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "scope", scope) + CacheDefaultAccessPolicyAccessRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + scope=scope, + anonymous_gid=anonymous_gid, + anonymous_uid=anonymous_uid, + filter=filter, + root_squash_enabled=root_squash_enabled, + submount_access_enabled=submount_access_enabled, + suid_enabled=suid_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + anonymous_gid: Optional[pulumi.Input[int]] = None, + anonymous_uid: Optional[pulumi.Input[int]] = None, + filter: Optional[pulumi.Input[str]] = None, + root_squash_enabled: Optional[pulumi.Input[bool]] = None, + submount_access_enabled: Optional[pulumi.Input[bool]] = None, + suid_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + if anonymous_gid is None and 'anonymousGid' in kwargs: + anonymous_gid = kwargs['anonymousGid'] + if anonymous_uid is None and 'anonymousUid' in kwargs: + anonymous_uid = kwargs['anonymousUid'] + if root_squash_enabled is None and 'rootSquashEnabled' in kwargs: + root_squash_enabled = kwargs['rootSquashEnabled'] + if submount_access_enabled is None and 'submountAccessEnabled' in kwargs: + submount_access_enabled = kwargs['submountAccessEnabled'] + if suid_enabled is None and 'suidEnabled' in kwargs: + suid_enabled = kwargs['suidEnabled'] + + _setter("access", access) + _setter("scope", scope) if anonymous_gid is not None: - pulumi.set(__self__, "anonymous_gid", anonymous_gid) + _setter("anonymous_gid", anonymous_gid) if anonymous_uid is not None: - pulumi.set(__self__, "anonymous_uid", anonymous_uid) + _setter("anonymous_uid", anonymous_uid) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) if root_squash_enabled is not None: - pulumi.set(__self__, "root_squash_enabled", root_squash_enabled) + _setter("root_squash_enabled", root_squash_enabled) if submount_access_enabled is not None: - pulumi.set(__self__, "submount_access_enabled", submount_access_enabled) + _setter("submount_access_enabled", submount_access_enabled) if suid_enabled is not None: - pulumi.set(__self__, "suid_enabled", suid_enabled) + _setter("suid_enabled", suid_enabled) @property @pulumi.getter @@ -337,14 +430,59 @@ def __init__(__self__, *, :param pulumi.Input[str] username: The username of the Active Directory domain administrator. :param pulumi.Input[str] dns_secondary_ip: The secondary DNS IP address used to resolve the Active Directory domain controller's FQDN. """ - pulumi.set(__self__, "cache_netbios_name", cache_netbios_name) - pulumi.set(__self__, "dns_primary_ip", dns_primary_ip) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "domain_netbios_name", domain_netbios_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + CacheDirectoryActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache_netbios_name=cache_netbios_name, + dns_primary_ip=dns_primary_ip, + domain_name=domain_name, + domain_netbios_name=domain_netbios_name, + password=password, + username=username, + dns_secondary_ip=dns_secondary_ip, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache_netbios_name: Optional[pulumi.Input[str]] = None, + dns_primary_ip: Optional[pulumi.Input[str]] = None, + domain_name: Optional[pulumi.Input[str]] = None, + domain_netbios_name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + dns_secondary_ip: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cache_netbios_name is None and 'cacheNetbiosName' in kwargs: + cache_netbios_name = kwargs['cacheNetbiosName'] + if cache_netbios_name is None: + raise TypeError("Missing 'cache_netbios_name' argument") + if dns_primary_ip is None and 'dnsPrimaryIp' in kwargs: + dns_primary_ip = kwargs['dnsPrimaryIp'] + if dns_primary_ip is None: + raise TypeError("Missing 'dns_primary_ip' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_netbios_name is None and 'domainNetbiosName' in kwargs: + domain_netbios_name = kwargs['domainNetbiosName'] + if domain_netbios_name is None: + raise TypeError("Missing 'domain_netbios_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if dns_secondary_ip is None and 'dnsSecondaryIp' in kwargs: + dns_secondary_ip = kwargs['dnsSecondaryIp'] + + _setter("cache_netbios_name", cache_netbios_name) + _setter("dns_primary_ip", dns_primary_ip) + _setter("domain_name", domain_name) + _setter("domain_netbios_name", domain_netbios_name) + _setter("password", password) + _setter("username", username) if dns_secondary_ip is not None: - pulumi.set(__self__, "dns_secondary_ip", dns_secondary_ip) + _setter("dns_secondary_ip", dns_secondary_ip) @property @pulumi.getter(name="cacheNetbiosName") @@ -440,8 +578,29 @@ def __init__(__self__, *, :param pulumi.Input[str] group_file_uri: The URI of the file containing group information (`/etc/group` file format in Unix-like OS). :param pulumi.Input[str] password_file_uri: The URI of the file containing user information (`/etc/passwd` file format in Unix-like OS). """ - pulumi.set(__self__, "group_file_uri", group_file_uri) - pulumi.set(__self__, "password_file_uri", password_file_uri) + CacheDirectoryFlatFileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + group_file_uri=group_file_uri, + password_file_uri=password_file_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + group_file_uri: Optional[pulumi.Input[str]] = None, + password_file_uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if group_file_uri is None and 'groupFileUri' in kwargs: + group_file_uri = kwargs['groupFileUri'] + if group_file_uri is None: + raise TypeError("Missing 'group_file_uri' argument") + if password_file_uri is None and 'passwordFileUri' in kwargs: + password_file_uri = kwargs['passwordFileUri'] + if password_file_uri is None: + raise TypeError("Missing 'password_file_uri' argument") + + _setter("group_file_uri", group_file_uri) + _setter("password_file_uri", password_file_uri) @property @pulumi.getter(name="groupFileUri") @@ -485,16 +644,47 @@ def __init__(__self__, *, :param pulumi.Input[bool] download_certificate_automatically: Whether the certificate should be automatically downloaded. This can be set to `true` only when `certificate_validation_uri` is provided. :param pulumi.Input[bool] encrypted: Whether the LDAP connection should be encrypted? """ - pulumi.set(__self__, "base_dn", base_dn) - pulumi.set(__self__, "server", server) + CacheDirectoryLdapArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + base_dn=base_dn, + server=server, + bind=bind, + certificate_validation_uri=certificate_validation_uri, + download_certificate_automatically=download_certificate_automatically, + encrypted=encrypted, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + base_dn: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + bind: Optional[pulumi.Input['CacheDirectoryLdapBindArgs']] = None, + certificate_validation_uri: Optional[pulumi.Input[str]] = None, + download_certificate_automatically: Optional[pulumi.Input[bool]] = None, + encrypted: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if base_dn is None and 'baseDn' in kwargs: + base_dn = kwargs['baseDn'] + if base_dn is None: + raise TypeError("Missing 'base_dn' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if certificate_validation_uri is None and 'certificateValidationUri' in kwargs: + certificate_validation_uri = kwargs['certificateValidationUri'] + if download_certificate_automatically is None and 'downloadCertificateAutomatically' in kwargs: + download_certificate_automatically = kwargs['downloadCertificateAutomatically'] + + _setter("base_dn", base_dn) + _setter("server", server) if bind is not None: - pulumi.set(__self__, "bind", bind) + _setter("bind", bind) if certificate_validation_uri is not None: - pulumi.set(__self__, "certificate_validation_uri", certificate_validation_uri) + _setter("certificate_validation_uri", certificate_validation_uri) if download_certificate_automatically is not None: - pulumi.set(__self__, "download_certificate_automatically", download_certificate_automatically) + _setter("download_certificate_automatically", download_certificate_automatically) if encrypted is not None: - pulumi.set(__self__, "encrypted", encrypted) + _setter("encrypted", encrypted) @property @pulumi.getter(name="baseDn") @@ -578,8 +768,25 @@ def __init__(__self__, *, :param pulumi.Input[str] dn: The Bind Distinguished Name (DN) identity to be used in the secure LDAP connection. :param pulumi.Input[str] password: The Bind password to be used in the secure LDAP connection. """ - pulumi.set(__self__, "dn", dn) - pulumi.set(__self__, "password", password) + CacheDirectoryLdapBindArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dn=dn, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dn: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dn is None: + raise TypeError("Missing 'dn' argument") + if password is None: + raise TypeError("Missing 'password' argument") + + _setter("dn", dn) + _setter("password", password) @property @pulumi.getter @@ -615,9 +822,26 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] servers: A list of DNS servers for the HPC Cache. At most three IP(s) are allowed to set. :param pulumi.Input[str] search_domain: The DNS search domain for the HPC Cache. """ - pulumi.set(__self__, "servers", servers) + CacheDnsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + servers=servers, + search_domain=search_domain, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + search_domain: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if servers is None: + raise TypeError("Missing 'servers' argument") + if search_domain is None and 'searchDomain' in kwargs: + search_domain = kwargs['searchDomain'] + + _setter("servers", servers) if search_domain is not None: - pulumi.set(__self__, "search_domain", search_domain) + _setter("search_domain", search_domain) @property @pulumi.getter @@ -659,13 +883,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + CacheIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -731,12 +980,41 @@ def __init__(__self__, *, :param pulumi.Input[str] access_policy_name: The name of the access policy applied to this target. Defaults to `default`. :param pulumi.Input[str] target_path: The relative subdirectory path from the `nfs_export` to map to the `namespace_path`. Defaults to `""`, in which case the whole `nfs_export` is exported. """ - pulumi.set(__self__, "namespace_path", namespace_path) - pulumi.set(__self__, "nfs_export", nfs_export) + CacheNfsTargetNamespaceJunctionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_path=namespace_path, + nfs_export=nfs_export, + access_policy_name=access_policy_name, + target_path=target_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_path: Optional[pulumi.Input[str]] = None, + nfs_export: Optional[pulumi.Input[str]] = None, + access_policy_name: Optional[pulumi.Input[str]] = None, + target_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_path is None and 'namespacePath' in kwargs: + namespace_path = kwargs['namespacePath'] + if namespace_path is None: + raise TypeError("Missing 'namespace_path' argument") + if nfs_export is None and 'nfsExport' in kwargs: + nfs_export = kwargs['nfsExport'] + if nfs_export is None: + raise TypeError("Missing 'nfs_export' argument") + if access_policy_name is None and 'accessPolicyName' in kwargs: + access_policy_name = kwargs['accessPolicyName'] + if target_path is None and 'targetPath' in kwargs: + target_path = kwargs['targetPath'] + + _setter("namespace_path", namespace_path) + _setter("nfs_export", nfs_export) if access_policy_name is not None: - pulumi.set(__self__, "access_policy_name", access_policy_name) + _setter("access_policy_name", access_policy_name) if target_path is not None: - pulumi.set(__self__, "target_path", target_path) + _setter("target_path", target_path) @property @pulumi.getter(name="namespacePath") diff --git a/sdk/python/pulumi_azure/hpc/cache.py b/sdk/python/pulumi_azure/hpc/cache.py index 70bdf16224..bc13714892 100644 --- a/sdk/python/pulumi_azure/hpc/cache.py +++ b/sdk/python/pulumi_azure/hpc/cache.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,36 +59,109 @@ def __init__(__self__, *, :param pulumi.Input[str] ntp_server: The NTP server IP Address or FQDN for the HPC Cache. Defaults to `time.windows.com`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the HPC Cache. """ - pulumi.set(__self__, "cache_size_in_gb", cache_size_in_gb) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "subnet_id", subnet_id) + CacheArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache_size_in_gb=cache_size_in_gb, + resource_group_name=resource_group_name, + sku_name=sku_name, + subnet_id=subnet_id, + automatically_rotate_key_to_latest_enabled=automatically_rotate_key_to_latest_enabled, + default_access_policy=default_access_policy, + directory_active_directory=directory_active_directory, + directory_flat_file=directory_flat_file, + directory_ldap=directory_ldap, + dns=dns, + identity=identity, + key_vault_key_id=key_vault_key_id, + location=location, + mtu=mtu, + name=name, + ntp_server=ntp_server, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache_size_in_gb: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + automatically_rotate_key_to_latest_enabled: Optional[pulumi.Input[bool]] = None, + default_access_policy: Optional[pulumi.Input['CacheDefaultAccessPolicyArgs']] = None, + directory_active_directory: Optional[pulumi.Input['CacheDirectoryActiveDirectoryArgs']] = None, + directory_flat_file: Optional[pulumi.Input['CacheDirectoryFlatFileArgs']] = None, + directory_ldap: Optional[pulumi.Input['CacheDirectoryLdapArgs']] = None, + dns: Optional[pulumi.Input['CacheDnsArgs']] = None, + identity: Optional[pulumi.Input['CacheIdentityArgs']] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + mtu: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + ntp_server: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cache_size_in_gb is None and 'cacheSizeInGb' in kwargs: + cache_size_in_gb = kwargs['cacheSizeInGb'] + if cache_size_in_gb is None: + raise TypeError("Missing 'cache_size_in_gb' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if automatically_rotate_key_to_latest_enabled is None and 'automaticallyRotateKeyToLatestEnabled' in kwargs: + automatically_rotate_key_to_latest_enabled = kwargs['automaticallyRotateKeyToLatestEnabled'] + if default_access_policy is None and 'defaultAccessPolicy' in kwargs: + default_access_policy = kwargs['defaultAccessPolicy'] + if directory_active_directory is None and 'directoryActiveDirectory' in kwargs: + directory_active_directory = kwargs['directoryActiveDirectory'] + if directory_flat_file is None and 'directoryFlatFile' in kwargs: + directory_flat_file = kwargs['directoryFlatFile'] + if directory_ldap is None and 'directoryLdap' in kwargs: + directory_ldap = kwargs['directoryLdap'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if ntp_server is None and 'ntpServer' in kwargs: + ntp_server = kwargs['ntpServer'] + + _setter("cache_size_in_gb", cache_size_in_gb) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("subnet_id", subnet_id) if automatically_rotate_key_to_latest_enabled is not None: - pulumi.set(__self__, "automatically_rotate_key_to_latest_enabled", automatically_rotate_key_to_latest_enabled) + _setter("automatically_rotate_key_to_latest_enabled", automatically_rotate_key_to_latest_enabled) if default_access_policy is not None: - pulumi.set(__self__, "default_access_policy", default_access_policy) + _setter("default_access_policy", default_access_policy) if directory_active_directory is not None: - pulumi.set(__self__, "directory_active_directory", directory_active_directory) + _setter("directory_active_directory", directory_active_directory) if directory_flat_file is not None: - pulumi.set(__self__, "directory_flat_file", directory_flat_file) + _setter("directory_flat_file", directory_flat_file) if directory_ldap is not None: - pulumi.set(__self__, "directory_ldap", directory_ldap) + _setter("directory_ldap", directory_ldap) if dns is not None: - pulumi.set(__self__, "dns", dns) + _setter("dns", dns) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mtu is not None: - pulumi.set(__self__, "mtu", mtu) + _setter("mtu", mtu) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if ntp_server is not None: - pulumi.set(__self__, "ntp_server", ntp_server) + _setter("ntp_server", ntp_server) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="cacheSizeInGb") @@ -349,42 +422,111 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet for the HPC Cache. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the HPC Cache. """ + _CacheState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automatically_rotate_key_to_latest_enabled=automatically_rotate_key_to_latest_enabled, + cache_size_in_gb=cache_size_in_gb, + default_access_policy=default_access_policy, + directory_active_directory=directory_active_directory, + directory_flat_file=directory_flat_file, + directory_ldap=directory_ldap, + dns=dns, + identity=identity, + key_vault_key_id=key_vault_key_id, + location=location, + mount_addresses=mount_addresses, + mtu=mtu, + name=name, + ntp_server=ntp_server, + resource_group_name=resource_group_name, + sku_name=sku_name, + subnet_id=subnet_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automatically_rotate_key_to_latest_enabled: Optional[pulumi.Input[bool]] = None, + cache_size_in_gb: Optional[pulumi.Input[int]] = None, + default_access_policy: Optional[pulumi.Input['CacheDefaultAccessPolicyArgs']] = None, + directory_active_directory: Optional[pulumi.Input['CacheDirectoryActiveDirectoryArgs']] = None, + directory_flat_file: Optional[pulumi.Input['CacheDirectoryFlatFileArgs']] = None, + directory_ldap: Optional[pulumi.Input['CacheDirectoryLdapArgs']] = None, + dns: Optional[pulumi.Input['CacheDnsArgs']] = None, + identity: Optional[pulumi.Input['CacheIdentityArgs']] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + mount_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + mtu: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + ntp_server: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automatically_rotate_key_to_latest_enabled is None and 'automaticallyRotateKeyToLatestEnabled' in kwargs: + automatically_rotate_key_to_latest_enabled = kwargs['automaticallyRotateKeyToLatestEnabled'] + if cache_size_in_gb is None and 'cacheSizeInGb' in kwargs: + cache_size_in_gb = kwargs['cacheSizeInGb'] + if default_access_policy is None and 'defaultAccessPolicy' in kwargs: + default_access_policy = kwargs['defaultAccessPolicy'] + if directory_active_directory is None and 'directoryActiveDirectory' in kwargs: + directory_active_directory = kwargs['directoryActiveDirectory'] + if directory_flat_file is None and 'directoryFlatFile' in kwargs: + directory_flat_file = kwargs['directoryFlatFile'] + if directory_ldap is None and 'directoryLdap' in kwargs: + directory_ldap = kwargs['directoryLdap'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if mount_addresses is None and 'mountAddresses' in kwargs: + mount_addresses = kwargs['mountAddresses'] + if ntp_server is None and 'ntpServer' in kwargs: + ntp_server = kwargs['ntpServer'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if automatically_rotate_key_to_latest_enabled is not None: - pulumi.set(__self__, "automatically_rotate_key_to_latest_enabled", automatically_rotate_key_to_latest_enabled) + _setter("automatically_rotate_key_to_latest_enabled", automatically_rotate_key_to_latest_enabled) if cache_size_in_gb is not None: - pulumi.set(__self__, "cache_size_in_gb", cache_size_in_gb) + _setter("cache_size_in_gb", cache_size_in_gb) if default_access_policy is not None: - pulumi.set(__self__, "default_access_policy", default_access_policy) + _setter("default_access_policy", default_access_policy) if directory_active_directory is not None: - pulumi.set(__self__, "directory_active_directory", directory_active_directory) + _setter("directory_active_directory", directory_active_directory) if directory_flat_file is not None: - pulumi.set(__self__, "directory_flat_file", directory_flat_file) + _setter("directory_flat_file", directory_flat_file) if directory_ldap is not None: - pulumi.set(__self__, "directory_ldap", directory_ldap) + _setter("directory_ldap", directory_ldap) if dns is not None: - pulumi.set(__self__, "dns", dns) + _setter("dns", dns) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mount_addresses is not None: - pulumi.set(__self__, "mount_addresses", mount_addresses) + _setter("mount_addresses", mount_addresses) if mtu is not None: - pulumi.set(__self__, "mtu", mtu) + _setter("mtu", mtu) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if ntp_server is not None: - pulumi.set(__self__, "ntp_server", ntp_server) + _setter("ntp_server", ntp_server) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="automaticallyRotateKeyToLatestEnabled") @@ -746,6 +888,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CacheArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -781,11 +927,41 @@ def _internal_init(__self__, if cache_size_in_gb is None and not opts.urn: raise TypeError("Missing required property 'cache_size_in_gb'") __props__.__dict__["cache_size_in_gb"] = cache_size_in_gb + if default_access_policy is not None and not isinstance(default_access_policy, CacheDefaultAccessPolicyArgs): + default_access_policy = default_access_policy or {} + def _setter(key, value): + default_access_policy[key] = value + CacheDefaultAccessPolicyArgs._configure(_setter, **default_access_policy) __props__.__dict__["default_access_policy"] = default_access_policy + if directory_active_directory is not None and not isinstance(directory_active_directory, CacheDirectoryActiveDirectoryArgs): + directory_active_directory = directory_active_directory or {} + def _setter(key, value): + directory_active_directory[key] = value + CacheDirectoryActiveDirectoryArgs._configure(_setter, **directory_active_directory) __props__.__dict__["directory_active_directory"] = directory_active_directory + if directory_flat_file is not None and not isinstance(directory_flat_file, CacheDirectoryFlatFileArgs): + directory_flat_file = directory_flat_file or {} + def _setter(key, value): + directory_flat_file[key] = value + CacheDirectoryFlatFileArgs._configure(_setter, **directory_flat_file) __props__.__dict__["directory_flat_file"] = directory_flat_file + if directory_ldap is not None and not isinstance(directory_ldap, CacheDirectoryLdapArgs): + directory_ldap = directory_ldap or {} + def _setter(key, value): + directory_ldap[key] = value + CacheDirectoryLdapArgs._configure(_setter, **directory_ldap) __props__.__dict__["directory_ldap"] = directory_ldap + if dns is not None and not isinstance(dns, CacheDnsArgs): + dns = dns or {} + def _setter(key, value): + dns[key] = value + CacheDnsArgs._configure(_setter, **dns) __props__.__dict__["dns"] = dns + if identity is not None and not isinstance(identity, CacheIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + CacheIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["key_vault_key_id"] = key_vault_key_id __props__.__dict__["location"] = location diff --git a/sdk/python/pulumi_azure/hpc/cache_access_policy.py b/sdk/python/pulumi_azure/hpc/cache_access_policy.py index dbab026769..d7ed82f9c8 100644 --- a/sdk/python/pulumi_azure/hpc/cache_access_policy.py +++ b/sdk/python/pulumi_azure/hpc/cache_access_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -25,10 +25,33 @@ def __init__(__self__, *, :param pulumi.Input[str] hpc_cache_id: The ID of the HPC Cache that this HPC Cache Access Policy resides in. Changing this forces a new HPC Cache Access Policy to be created. :param pulumi.Input[str] name: The name which should be used for this HPC Cache Access Policy. Changing this forces a new HPC Cache Access Policy to be created. """ - pulumi.set(__self__, "access_rules", access_rules) - pulumi.set(__self__, "hpc_cache_id", hpc_cache_id) + CacheAccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_rules=access_rules, + hpc_cache_id=hpc_cache_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_rules: Optional[pulumi.Input[Sequence[pulumi.Input['CacheAccessPolicyAccessRuleArgs']]]] = None, + hpc_cache_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_rules is None and 'accessRules' in kwargs: + access_rules = kwargs['accessRules'] + if access_rules is None: + raise TypeError("Missing 'access_rules' argument") + if hpc_cache_id is None and 'hpcCacheId' in kwargs: + hpc_cache_id = kwargs['hpcCacheId'] + if hpc_cache_id is None: + raise TypeError("Missing 'hpc_cache_id' argument") + + _setter("access_rules", access_rules) + _setter("hpc_cache_id", hpc_cache_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="accessRules") @@ -79,12 +102,31 @@ def __init__(__self__, *, :param pulumi.Input[str] hpc_cache_id: The ID of the HPC Cache that this HPC Cache Access Policy resides in. Changing this forces a new HPC Cache Access Policy to be created. :param pulumi.Input[str] name: The name which should be used for this HPC Cache Access Policy. Changing this forces a new HPC Cache Access Policy to be created. """ + _CacheAccessPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_rules=access_rules, + hpc_cache_id=hpc_cache_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_rules: Optional[pulumi.Input[Sequence[pulumi.Input['CacheAccessPolicyAccessRuleArgs']]]] = None, + hpc_cache_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_rules is None and 'accessRules' in kwargs: + access_rules = kwargs['accessRules'] + if hpc_cache_id is None and 'hpcCacheId' in kwargs: + hpc_cache_id = kwargs['hpcCacheId'] + if access_rules is not None: - pulumi.set(__self__, "access_rules", access_rules) + _setter("access_rules", access_rules) if hpc_cache_id is not None: - pulumi.set(__self__, "hpc_cache_id", hpc_cache_id) + _setter("hpc_cache_id", hpc_cache_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="accessRules") @@ -234,6 +276,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CacheAccessPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/hpc/cache_blob_nfs_target.py b/sdk/python/pulumi_azure/hpc/cache_blob_nfs_target.py index dc1fd7ad75..f056e0b8a1 100644 --- a/sdk/python/pulumi_azure/hpc/cache_blob_nfs_target.py +++ b/sdk/python/pulumi_azure/hpc/cache_blob_nfs_target.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CacheBlobNfsTargetArgs', 'CacheBlobNfsTarget'] @@ -33,15 +33,60 @@ def __init__(__self__, *, :param pulumi.Input[str] access_policy_name: The name of the access policy applied to this target. Defaults to `default`. :param pulumi.Input[str] name: The name which should be used for this HPC Cache Blob NFS Target. Changing this forces a new HPC Cache Blob NFS Target to be created. """ - pulumi.set(__self__, "cache_name", cache_name) - pulumi.set(__self__, "namespace_path", namespace_path) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_container_id", storage_container_id) - pulumi.set(__self__, "usage_model", usage_model) + CacheBlobNfsTargetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache_name=cache_name, + namespace_path=namespace_path, + resource_group_name=resource_group_name, + storage_container_id=storage_container_id, + usage_model=usage_model, + access_policy_name=access_policy_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache_name: Optional[pulumi.Input[str]] = None, + namespace_path: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_container_id: Optional[pulumi.Input[str]] = None, + usage_model: Optional[pulumi.Input[str]] = None, + access_policy_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cache_name is None and 'cacheName' in kwargs: + cache_name = kwargs['cacheName'] + if cache_name is None: + raise TypeError("Missing 'cache_name' argument") + if namespace_path is None and 'namespacePath' in kwargs: + namespace_path = kwargs['namespacePath'] + if namespace_path is None: + raise TypeError("Missing 'namespace_path' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if usage_model is None and 'usageModel' in kwargs: + usage_model = kwargs['usageModel'] + if usage_model is None: + raise TypeError("Missing 'usage_model' argument") + if access_policy_name is None and 'accessPolicyName' in kwargs: + access_policy_name = kwargs['accessPolicyName'] + + _setter("cache_name", cache_name) + _setter("namespace_path", namespace_path) + _setter("resource_group_name", resource_group_name) + _setter("storage_container_id", storage_container_id) + _setter("usage_model", usage_model) if access_policy_name is not None: - pulumi.set(__self__, "access_policy_name", access_policy_name) + _setter("access_policy_name", access_policy_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="cacheName") @@ -152,20 +197,55 @@ def __init__(__self__, *, > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resource_manager_id`. :param pulumi.Input[str] usage_model: The type of usage of the HPC Cache Blob NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`. """ + _CacheBlobNfsTargetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_policy_name=access_policy_name, + cache_name=cache_name, + name=name, + namespace_path=namespace_path, + resource_group_name=resource_group_name, + storage_container_id=storage_container_id, + usage_model=usage_model, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_policy_name: Optional[pulumi.Input[str]] = None, + cache_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_path: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_container_id: Optional[pulumi.Input[str]] = None, + usage_model: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_policy_name is None and 'accessPolicyName' in kwargs: + access_policy_name = kwargs['accessPolicyName'] + if cache_name is None and 'cacheName' in kwargs: + cache_name = kwargs['cacheName'] + if namespace_path is None and 'namespacePath' in kwargs: + namespace_path = kwargs['namespacePath'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if usage_model is None and 'usageModel' in kwargs: + usage_model = kwargs['usageModel'] + if access_policy_name is not None: - pulumi.set(__self__, "access_policy_name", access_policy_name) + _setter("access_policy_name", access_policy_name) if cache_name is not None: - pulumi.set(__self__, "cache_name", cache_name) + _setter("cache_name", cache_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_path is not None: - pulumi.set(__self__, "namespace_path", namespace_path) + _setter("namespace_path", namespace_path) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if storage_container_id is not None: - pulumi.set(__self__, "storage_container_id", storage_container_id) + _setter("storage_container_id", storage_container_id) if usage_model is not None: - pulumi.set(__self__, "usage_model", usage_model) + _setter("usage_model", usage_model) @property @pulumi.getter(name="accessPolicyName") @@ -325,6 +405,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CacheBlobNfsTargetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/hpc/cache_blob_target.py b/sdk/python/pulumi_azure/hpc/cache_blob_target.py index 94b6af9673..9731d4800c 100644 --- a/sdk/python/pulumi_azure/hpc/cache_blob_target.py +++ b/sdk/python/pulumi_azure/hpc/cache_blob_target.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CacheBlobTargetArgs', 'CacheBlobTarget'] @@ -31,14 +31,53 @@ def __init__(__self__, *, :param pulumi.Input[str] access_policy_name: The name of the access policy applied to this target. Defaults to `default`. :param pulumi.Input[str] name: The name of the HPC Cache Blob Target. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cache_name", cache_name) - pulumi.set(__self__, "namespace_path", namespace_path) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_container_id", storage_container_id) + CacheBlobTargetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache_name=cache_name, + namespace_path=namespace_path, + resource_group_name=resource_group_name, + storage_container_id=storage_container_id, + access_policy_name=access_policy_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache_name: Optional[pulumi.Input[str]] = None, + namespace_path: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_container_id: Optional[pulumi.Input[str]] = None, + access_policy_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cache_name is None and 'cacheName' in kwargs: + cache_name = kwargs['cacheName'] + if cache_name is None: + raise TypeError("Missing 'cache_name' argument") + if namespace_path is None and 'namespacePath' in kwargs: + namespace_path = kwargs['namespacePath'] + if namespace_path is None: + raise TypeError("Missing 'namespace_path' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if access_policy_name is None and 'accessPolicyName' in kwargs: + access_policy_name = kwargs['accessPolicyName'] + + _setter("cache_name", cache_name) + _setter("namespace_path", namespace_path) + _setter("resource_group_name", resource_group_name) + _setter("storage_container_id", storage_container_id) if access_policy_name is not None: - pulumi.set(__self__, "access_policy_name", access_policy_name) + _setter("access_policy_name", access_policy_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="cacheName") @@ -135,18 +174,49 @@ def __init__(__self__, *, > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resource_manager_id`. """ + _CacheBlobTargetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_policy_name=access_policy_name, + cache_name=cache_name, + name=name, + namespace_path=namespace_path, + resource_group_name=resource_group_name, + storage_container_id=storage_container_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_policy_name: Optional[pulumi.Input[str]] = None, + cache_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_path: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_container_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_policy_name is None and 'accessPolicyName' in kwargs: + access_policy_name = kwargs['accessPolicyName'] + if cache_name is None and 'cacheName' in kwargs: + cache_name = kwargs['cacheName'] + if namespace_path is None and 'namespacePath' in kwargs: + namespace_path = kwargs['namespacePath'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if access_policy_name is not None: - pulumi.set(__self__, "access_policy_name", access_policy_name) + _setter("access_policy_name", access_policy_name) if cache_name is not None: - pulumi.set(__self__, "cache_name", cache_name) + _setter("cache_name", cache_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_path is not None: - pulumi.set(__self__, "namespace_path", namespace_path) + _setter("namespace_path", namespace_path) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if storage_container_id is not None: - pulumi.set(__self__, "storage_container_id", storage_container_id) + _setter("storage_container_id", storage_container_id) @property @pulumi.getter(name="accessPolicyName") @@ -376,6 +446,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CacheBlobTargetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/hpc/cache_nfs_target.py b/sdk/python/pulumi_azure/hpc/cache_nfs_target.py index fee53e5969..32e9242de1 100644 --- a/sdk/python/pulumi_azure/hpc/cache_nfs_target.py +++ b/sdk/python/pulumi_azure/hpc/cache_nfs_target.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,13 +31,54 @@ def __init__(__self__, *, :param pulumi.Input[str] usage_model: The type of usage of the HPC Cache NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`. :param pulumi.Input[str] name: The name of the HPC Cache NFS Target. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cache_name", cache_name) - pulumi.set(__self__, "namespace_junctions", namespace_junctions) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "target_host_name", target_host_name) - pulumi.set(__self__, "usage_model", usage_model) + CacheNfsTargetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache_name=cache_name, + namespace_junctions=namespace_junctions, + resource_group_name=resource_group_name, + target_host_name=target_host_name, + usage_model=usage_model, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache_name: Optional[pulumi.Input[str]] = None, + namespace_junctions: Optional[pulumi.Input[Sequence[pulumi.Input['CacheNfsTargetNamespaceJunctionArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + target_host_name: Optional[pulumi.Input[str]] = None, + usage_model: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cache_name is None and 'cacheName' in kwargs: + cache_name = kwargs['cacheName'] + if cache_name is None: + raise TypeError("Missing 'cache_name' argument") + if namespace_junctions is None and 'namespaceJunctions' in kwargs: + namespace_junctions = kwargs['namespaceJunctions'] + if namespace_junctions is None: + raise TypeError("Missing 'namespace_junctions' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if target_host_name is None and 'targetHostName' in kwargs: + target_host_name = kwargs['targetHostName'] + if target_host_name is None: + raise TypeError("Missing 'target_host_name' argument") + if usage_model is None and 'usageModel' in kwargs: + usage_model = kwargs['usageModel'] + if usage_model is None: + raise TypeError("Missing 'usage_model' argument") + + _setter("cache_name", cache_name) + _setter("namespace_junctions", namespace_junctions) + _setter("resource_group_name", resource_group_name) + _setter("target_host_name", target_host_name) + _setter("usage_model", usage_model) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="cacheName") @@ -130,18 +171,49 @@ def __init__(__self__, *, :param pulumi.Input[str] target_host_name: The IP address or fully qualified domain name (FQDN) of the HPC Cache NFS target. Changing this forces a new resource to be created. :param pulumi.Input[str] usage_model: The type of usage of the HPC Cache NFS Target. Possible values are: `READ_HEAVY_INFREQ`, `READ_HEAVY_CHECK_180`, `READ_ONLY`, `READ_WRITE`, `WRITE_WORKLOAD_15`, `WRITE_AROUND`, `WRITE_WORKLOAD_CHECK_30`, `WRITE_WORKLOAD_CHECK_60` and `WRITE_WORKLOAD_CLOUDWS`. """ + _CacheNfsTargetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache_name=cache_name, + name=name, + namespace_junctions=namespace_junctions, + resource_group_name=resource_group_name, + target_host_name=target_host_name, + usage_model=usage_model, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_junctions: Optional[pulumi.Input[Sequence[pulumi.Input['CacheNfsTargetNamespaceJunctionArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + target_host_name: Optional[pulumi.Input[str]] = None, + usage_model: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cache_name is None and 'cacheName' in kwargs: + cache_name = kwargs['cacheName'] + if namespace_junctions is None and 'namespaceJunctions' in kwargs: + namespace_junctions = kwargs['namespaceJunctions'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if target_host_name is None and 'targetHostName' in kwargs: + target_host_name = kwargs['targetHostName'] + if usage_model is None and 'usageModel' in kwargs: + usage_model = kwargs['usageModel'] + if cache_name is not None: - pulumi.set(__self__, "cache_name", cache_name) + _setter("cache_name", cache_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_junctions is not None: - pulumi.set(__self__, "namespace_junctions", namespace_junctions) + _setter("namespace_junctions", namespace_junctions) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if target_host_name is not None: - pulumi.set(__self__, "target_host_name", target_host_name) + _setter("target_host_name", target_host_name) if usage_model is not None: - pulumi.set(__self__, "usage_model", usage_model) + _setter("usage_model", usage_model) @property @pulumi.getter(name="cacheName") @@ -279,6 +351,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CacheNfsTargetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/hpc/outputs.py b/sdk/python/pulumi_azure/hpc/outputs.py index 392441386d..9ce7f3d49c 100644 --- a/sdk/python/pulumi_azure/hpc/outputs.py +++ b/sdk/python/pulumi_azure/hpc/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -71,20 +71,59 @@ def __init__(__self__, *, :param bool submount_access_enabled: Whether allow access to subdirectories under the root export? :param bool suid_enabled: Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed? """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "scope", scope) + CacheAccessPolicyAccessRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + scope=scope, + anonymous_gid=anonymous_gid, + anonymous_uid=anonymous_uid, + filter=filter, + root_squash_enabled=root_squash_enabled, + submount_access_enabled=submount_access_enabled, + suid_enabled=suid_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[str] = None, + scope: Optional[str] = None, + anonymous_gid: Optional[int] = None, + anonymous_uid: Optional[int] = None, + filter: Optional[str] = None, + root_squash_enabled: Optional[bool] = None, + submount_access_enabled: Optional[bool] = None, + suid_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + if anonymous_gid is None and 'anonymousGid' in kwargs: + anonymous_gid = kwargs['anonymousGid'] + if anonymous_uid is None and 'anonymousUid' in kwargs: + anonymous_uid = kwargs['anonymousUid'] + if root_squash_enabled is None and 'rootSquashEnabled' in kwargs: + root_squash_enabled = kwargs['rootSquashEnabled'] + if submount_access_enabled is None and 'submountAccessEnabled' in kwargs: + submount_access_enabled = kwargs['submountAccessEnabled'] + if suid_enabled is None and 'suidEnabled' in kwargs: + suid_enabled = kwargs['suidEnabled'] + + _setter("access", access) + _setter("scope", scope) if anonymous_gid is not None: - pulumi.set(__self__, "anonymous_gid", anonymous_gid) + _setter("anonymous_gid", anonymous_gid) if anonymous_uid is not None: - pulumi.set(__self__, "anonymous_uid", anonymous_uid) + _setter("anonymous_uid", anonymous_uid) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) if root_squash_enabled is not None: - pulumi.set(__self__, "root_squash_enabled", root_squash_enabled) + _setter("root_squash_enabled", root_squash_enabled) if submount_access_enabled is not None: - pulumi.set(__self__, "submount_access_enabled", submount_access_enabled) + _setter("submount_access_enabled", submount_access_enabled) if suid_enabled is not None: - pulumi.set(__self__, "suid_enabled", suid_enabled) + _setter("suid_enabled", suid_enabled) @property @pulumi.getter @@ -177,7 +216,22 @@ def __init__(__self__, *, """ :param Sequence['CacheDefaultAccessPolicyAccessRuleArgs'] access_rules: One to three `access_rule` blocks as defined above. """ - pulumi.set(__self__, "access_rules", access_rules) + CacheDefaultAccessPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_rules=access_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_rules: Optional[Sequence['outputs.CacheDefaultAccessPolicyAccessRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_rules is None and 'accessRules' in kwargs: + access_rules = kwargs['accessRules'] + if access_rules is None: + raise TypeError("Missing 'access_rules' argument") + + _setter("access_rules", access_rules) @property @pulumi.getter(name="accessRules") @@ -236,20 +290,59 @@ def __init__(__self__, *, :param bool submount_access_enabled: Whether allow access to subdirectories under the root export? :param bool suid_enabled: Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed? """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "scope", scope) + CacheDefaultAccessPolicyAccessRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + scope=scope, + anonymous_gid=anonymous_gid, + anonymous_uid=anonymous_uid, + filter=filter, + root_squash_enabled=root_squash_enabled, + submount_access_enabled=submount_access_enabled, + suid_enabled=suid_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[str] = None, + scope: Optional[str] = None, + anonymous_gid: Optional[int] = None, + anonymous_uid: Optional[int] = None, + filter: Optional[str] = None, + root_squash_enabled: Optional[bool] = None, + submount_access_enabled: Optional[bool] = None, + suid_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + if anonymous_gid is None and 'anonymousGid' in kwargs: + anonymous_gid = kwargs['anonymousGid'] + if anonymous_uid is None and 'anonymousUid' in kwargs: + anonymous_uid = kwargs['anonymousUid'] + if root_squash_enabled is None and 'rootSquashEnabled' in kwargs: + root_squash_enabled = kwargs['rootSquashEnabled'] + if submount_access_enabled is None and 'submountAccessEnabled' in kwargs: + submount_access_enabled = kwargs['submountAccessEnabled'] + if suid_enabled is None and 'suidEnabled' in kwargs: + suid_enabled = kwargs['suidEnabled'] + + _setter("access", access) + _setter("scope", scope) if anonymous_gid is not None: - pulumi.set(__self__, "anonymous_gid", anonymous_gid) + _setter("anonymous_gid", anonymous_gid) if anonymous_uid is not None: - pulumi.set(__self__, "anonymous_uid", anonymous_uid) + _setter("anonymous_uid", anonymous_uid) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) if root_squash_enabled is not None: - pulumi.set(__self__, "root_squash_enabled", root_squash_enabled) + _setter("root_squash_enabled", root_squash_enabled) if submount_access_enabled is not None: - pulumi.set(__self__, "submount_access_enabled", submount_access_enabled) + _setter("submount_access_enabled", submount_access_enabled) if suid_enabled is not None: - pulumi.set(__self__, "suid_enabled", suid_enabled) + _setter("suid_enabled", suid_enabled) @property @pulumi.getter @@ -362,14 +455,59 @@ def __init__(__self__, *, :param str username: The username of the Active Directory domain administrator. :param str dns_secondary_ip: The secondary DNS IP address used to resolve the Active Directory domain controller's FQDN. """ - pulumi.set(__self__, "cache_netbios_name", cache_netbios_name) - pulumi.set(__self__, "dns_primary_ip", dns_primary_ip) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "domain_netbios_name", domain_netbios_name) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + CacheDirectoryActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache_netbios_name=cache_netbios_name, + dns_primary_ip=dns_primary_ip, + domain_name=domain_name, + domain_netbios_name=domain_netbios_name, + password=password, + username=username, + dns_secondary_ip=dns_secondary_ip, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache_netbios_name: Optional[str] = None, + dns_primary_ip: Optional[str] = None, + domain_name: Optional[str] = None, + domain_netbios_name: Optional[str] = None, + password: Optional[str] = None, + username: Optional[str] = None, + dns_secondary_ip: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cache_netbios_name is None and 'cacheNetbiosName' in kwargs: + cache_netbios_name = kwargs['cacheNetbiosName'] + if cache_netbios_name is None: + raise TypeError("Missing 'cache_netbios_name' argument") + if dns_primary_ip is None and 'dnsPrimaryIp' in kwargs: + dns_primary_ip = kwargs['dnsPrimaryIp'] + if dns_primary_ip is None: + raise TypeError("Missing 'dns_primary_ip' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_netbios_name is None and 'domainNetbiosName' in kwargs: + domain_netbios_name = kwargs['domainNetbiosName'] + if domain_netbios_name is None: + raise TypeError("Missing 'domain_netbios_name' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if dns_secondary_ip is None and 'dnsSecondaryIp' in kwargs: + dns_secondary_ip = kwargs['dnsSecondaryIp'] + + _setter("cache_netbios_name", cache_netbios_name) + _setter("dns_primary_ip", dns_primary_ip) + _setter("domain_name", domain_name) + _setter("domain_netbios_name", domain_netbios_name) + _setter("password", password) + _setter("username", username) if dns_secondary_ip is not None: - pulumi.set(__self__, "dns_secondary_ip", dns_secondary_ip) + _setter("dns_secondary_ip", dns_secondary_ip) @property @pulumi.getter(name="cacheNetbiosName") @@ -456,8 +594,29 @@ def __init__(__self__, *, :param str group_file_uri: The URI of the file containing group information (`/etc/group` file format in Unix-like OS). :param str password_file_uri: The URI of the file containing user information (`/etc/passwd` file format in Unix-like OS). """ - pulumi.set(__self__, "group_file_uri", group_file_uri) - pulumi.set(__self__, "password_file_uri", password_file_uri) + CacheDirectoryFlatFile._configure( + lambda key, value: pulumi.set(__self__, key, value), + group_file_uri=group_file_uri, + password_file_uri=password_file_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + group_file_uri: Optional[str] = None, + password_file_uri: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if group_file_uri is None and 'groupFileUri' in kwargs: + group_file_uri = kwargs['groupFileUri'] + if group_file_uri is None: + raise TypeError("Missing 'group_file_uri' argument") + if password_file_uri is None and 'passwordFileUri' in kwargs: + password_file_uri = kwargs['passwordFileUri'] + if password_file_uri is None: + raise TypeError("Missing 'password_file_uri' argument") + + _setter("group_file_uri", group_file_uri) + _setter("password_file_uri", password_file_uri) @property @pulumi.getter(name="groupFileUri") @@ -514,16 +673,47 @@ def __init__(__self__, *, :param bool download_certificate_automatically: Whether the certificate should be automatically downloaded. This can be set to `true` only when `certificate_validation_uri` is provided. :param bool encrypted: Whether the LDAP connection should be encrypted? """ - pulumi.set(__self__, "base_dn", base_dn) - pulumi.set(__self__, "server", server) + CacheDirectoryLdap._configure( + lambda key, value: pulumi.set(__self__, key, value), + base_dn=base_dn, + server=server, + bind=bind, + certificate_validation_uri=certificate_validation_uri, + download_certificate_automatically=download_certificate_automatically, + encrypted=encrypted, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + base_dn: Optional[str] = None, + server: Optional[str] = None, + bind: Optional['outputs.CacheDirectoryLdapBind'] = None, + certificate_validation_uri: Optional[str] = None, + download_certificate_automatically: Optional[bool] = None, + encrypted: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if base_dn is None and 'baseDn' in kwargs: + base_dn = kwargs['baseDn'] + if base_dn is None: + raise TypeError("Missing 'base_dn' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if certificate_validation_uri is None and 'certificateValidationUri' in kwargs: + certificate_validation_uri = kwargs['certificateValidationUri'] + if download_certificate_automatically is None and 'downloadCertificateAutomatically' in kwargs: + download_certificate_automatically = kwargs['downloadCertificateAutomatically'] + + _setter("base_dn", base_dn) + _setter("server", server) if bind is not None: - pulumi.set(__self__, "bind", bind) + _setter("bind", bind) if certificate_validation_uri is not None: - pulumi.set(__self__, "certificate_validation_uri", certificate_validation_uri) + _setter("certificate_validation_uri", certificate_validation_uri) if download_certificate_automatically is not None: - pulumi.set(__self__, "download_certificate_automatically", download_certificate_automatically) + _setter("download_certificate_automatically", download_certificate_automatically) if encrypted is not None: - pulumi.set(__self__, "encrypted", encrypted) + _setter("encrypted", encrypted) @property @pulumi.getter(name="baseDn") @@ -583,8 +773,25 @@ def __init__(__self__, *, :param str dn: The Bind Distinguished Name (DN) identity to be used in the secure LDAP connection. :param str password: The Bind password to be used in the secure LDAP connection. """ - pulumi.set(__self__, "dn", dn) - pulumi.set(__self__, "password", password) + CacheDirectoryLdapBind._configure( + lambda key, value: pulumi.set(__self__, key, value), + dn=dn, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dn: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dn is None: + raise TypeError("Missing 'dn' argument") + if password is None: + raise TypeError("Missing 'password' argument") + + _setter("dn", dn) + _setter("password", password) @property @pulumi.getter @@ -629,9 +836,26 @@ def __init__(__self__, *, :param Sequence[str] servers: A list of DNS servers for the HPC Cache. At most three IP(s) are allowed to set. :param str search_domain: The DNS search domain for the HPC Cache. """ - pulumi.set(__self__, "servers", servers) + CacheDns._configure( + lambda key, value: pulumi.set(__self__, key, value), + servers=servers, + search_domain=search_domain, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + servers: Optional[Sequence[str]] = None, + search_domain: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if servers is None: + raise TypeError("Missing 'servers' argument") + if search_domain is None and 'searchDomain' in kwargs: + search_domain = kwargs['searchDomain'] + + _setter("servers", servers) if search_domain is not None: - pulumi.set(__self__, "search_domain", search_domain) + _setter("search_domain", search_domain) @property @pulumi.getter @@ -686,13 +910,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + CacheIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -765,12 +1014,41 @@ def __init__(__self__, *, :param str access_policy_name: The name of the access policy applied to this target. Defaults to `default`. :param str target_path: The relative subdirectory path from the `nfs_export` to map to the `namespace_path`. Defaults to `""`, in which case the whole `nfs_export` is exported. """ - pulumi.set(__self__, "namespace_path", namespace_path) - pulumi.set(__self__, "nfs_export", nfs_export) + CacheNfsTargetNamespaceJunction._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_path=namespace_path, + nfs_export=nfs_export, + access_policy_name=access_policy_name, + target_path=target_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_path: Optional[str] = None, + nfs_export: Optional[str] = None, + access_policy_name: Optional[str] = None, + target_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_path is None and 'namespacePath' in kwargs: + namespace_path = kwargs['namespacePath'] + if namespace_path is None: + raise TypeError("Missing 'namespace_path' argument") + if nfs_export is None and 'nfsExport' in kwargs: + nfs_export = kwargs['nfsExport'] + if nfs_export is None: + raise TypeError("Missing 'nfs_export' argument") + if access_policy_name is None and 'accessPolicyName' in kwargs: + access_policy_name = kwargs['accessPolicyName'] + if target_path is None and 'targetPath' in kwargs: + target_path = kwargs['targetPath'] + + _setter("namespace_path", namespace_path) + _setter("nfs_export", nfs_export) if access_policy_name is not None: - pulumi.set(__self__, "access_policy_name", access_policy_name) + _setter("access_policy_name", access_policy_name) if target_path is not None: - pulumi.set(__self__, "target_path", target_path) + _setter("target_path", target_path) @property @pulumi.getter(name="namespacePath") diff --git a/sdk/python/pulumi_azure/hsm/_inputs.py b/sdk/python/pulumi_azure/hsm/_inputs.py index d5bec1084c..7752d3fe9c 100644 --- a/sdk/python/pulumi_azure/hsm/_inputs.py +++ b/sdk/python/pulumi_azure/hsm/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -23,8 +23,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] network_interface_private_ip_addresses: The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created. :param pulumi.Input[str] subnet_id: The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created. """ - pulumi.set(__self__, "network_interface_private_ip_addresses", network_interface_private_ip_addresses) - pulumi.set(__self__, "subnet_id", subnet_id) + ModuleManagementNetworkProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_interface_private_ip_addresses=network_interface_private_ip_addresses, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_interface_private_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_interface_private_ip_addresses is None and 'networkInterfacePrivateIpAddresses' in kwargs: + network_interface_private_ip_addresses = kwargs['networkInterfacePrivateIpAddresses'] + if network_interface_private_ip_addresses is None: + raise TypeError("Missing 'network_interface_private_ip_addresses' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("network_interface_private_ip_addresses", network_interface_private_ip_addresses) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="networkInterfacePrivateIpAddresses") @@ -60,8 +81,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] network_interface_private_ip_addresses: The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created. :param pulumi.Input[str] subnet_id: The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created. """ - pulumi.set(__self__, "network_interface_private_ip_addresses", network_interface_private_ip_addresses) - pulumi.set(__self__, "subnet_id", subnet_id) + ModuleNetworkProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_interface_private_ip_addresses=network_interface_private_ip_addresses, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_interface_private_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_interface_private_ip_addresses is None and 'networkInterfacePrivateIpAddresses' in kwargs: + network_interface_private_ip_addresses = kwargs['networkInterfacePrivateIpAddresses'] + if network_interface_private_ip_addresses is None: + raise TypeError("Missing 'network_interface_private_ip_addresses' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("network_interface_private_ip_addresses", network_interface_private_ip_addresses) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="networkInterfacePrivateIpAddresses") diff --git a/sdk/python/pulumi_azure/hsm/module.py b/sdk/python/pulumi_azure/hsm/module.py index 1762c3a5fe..ec98e6729c 100644 --- a/sdk/python/pulumi_azure/hsm/module.py +++ b/sdk/python/pulumi_azure/hsm/module.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,21 +39,64 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Dedicated Hardware Security Module. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones in which this Dedicated Hardware Security Module should be located. Changing this forces a new Dedicated Hardware Security Module to be created. """ - pulumi.set(__self__, "network_profile", network_profile) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + ModuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_profile=network_profile, + resource_group_name=resource_group_name, + sku_name=sku_name, + location=location, + management_network_profile=management_network_profile, + name=name, + stamp_id=stamp_id, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_profile: Optional[pulumi.Input['ModuleNetworkProfileArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + management_network_profile: Optional[pulumi.Input['ModuleManagementNetworkProfileArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + stamp_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if network_profile is None: + raise TypeError("Missing 'network_profile' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if management_network_profile is None and 'managementNetworkProfile' in kwargs: + management_network_profile = kwargs['managementNetworkProfile'] + if stamp_id is None and 'stampId' in kwargs: + stamp_id = kwargs['stampId'] + + _setter("network_profile", network_profile) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if management_network_profile is not None: - pulumi.set(__self__, "management_network_profile", management_network_profile) + _setter("management_network_profile", management_network_profile) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if stamp_id is not None: - pulumi.set(__self__, "stamp_id", stamp_id) + _setter("stamp_id", stamp_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="networkProfile") @@ -192,24 +235,61 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Dedicated Hardware Security Module. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones in which this Dedicated Hardware Security Module should be located. Changing this forces a new Dedicated Hardware Security Module to be created. """ + _ModuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + management_network_profile=management_network_profile, + name=name, + network_profile=network_profile, + resource_group_name=resource_group_name, + sku_name=sku_name, + stamp_id=stamp_id, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + management_network_profile: Optional[pulumi.Input['ModuleManagementNetworkProfileArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network_profile: Optional[pulumi.Input['ModuleNetworkProfileArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + stamp_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_network_profile is None and 'managementNetworkProfile' in kwargs: + management_network_profile = kwargs['managementNetworkProfile'] + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if stamp_id is None and 'stampId' in kwargs: + stamp_id = kwargs['stampId'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if management_network_profile is not None: - pulumi.set(__self__, "management_network_profile", management_network_profile) + _setter("management_network_profile", management_network_profile) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_profile is not None: - pulumi.set(__self__, "network_profile", network_profile) + _setter("network_profile", network_profile) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if stamp_id is not None: - pulumi.set(__self__, "stamp_id", stamp_id) + _setter("stamp_id", stamp_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -531,6 +611,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ModuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -555,8 +639,18 @@ def _internal_init(__self__, __props__ = ModuleArgs.__new__(ModuleArgs) __props__.__dict__["location"] = location + if management_network_profile is not None and not isinstance(management_network_profile, ModuleManagementNetworkProfileArgs): + management_network_profile = management_network_profile or {} + def _setter(key, value): + management_network_profile[key] = value + ModuleManagementNetworkProfileArgs._configure(_setter, **management_network_profile) __props__.__dict__["management_network_profile"] = management_network_profile __props__.__dict__["name"] = name + if network_profile is not None and not isinstance(network_profile, ModuleNetworkProfileArgs): + network_profile = network_profile or {} + def _setter(key, value): + network_profile[key] = value + ModuleNetworkProfileArgs._configure(_setter, **network_profile) if network_profile is None and not opts.urn: raise TypeError("Missing required property 'network_profile'") __props__.__dict__["network_profile"] = network_profile diff --git a/sdk/python/pulumi_azure/hsm/outputs.py b/sdk/python/pulumi_azure/hsm/outputs.py index 2d536a522d..fabd4154fb 100644 --- a/sdk/python/pulumi_azure/hsm/outputs.py +++ b/sdk/python/pulumi_azure/hsm/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -42,8 +42,29 @@ def __init__(__self__, *, :param Sequence[str] network_interface_private_ip_addresses: The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created. :param str subnet_id: The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created. """ - pulumi.set(__self__, "network_interface_private_ip_addresses", network_interface_private_ip_addresses) - pulumi.set(__self__, "subnet_id", subnet_id) + ModuleManagementNetworkProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_interface_private_ip_addresses=network_interface_private_ip_addresses, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_interface_private_ip_addresses: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_interface_private_ip_addresses is None and 'networkInterfacePrivateIpAddresses' in kwargs: + network_interface_private_ip_addresses = kwargs['networkInterfacePrivateIpAddresses'] + if network_interface_private_ip_addresses is None: + raise TypeError("Missing 'network_interface_private_ip_addresses' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("network_interface_private_ip_addresses", network_interface_private_ip_addresses) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="networkInterfacePrivateIpAddresses") @@ -90,8 +111,29 @@ def __init__(__self__, *, :param Sequence[str] network_interface_private_ip_addresses: The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created. :param str subnet_id: The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created. """ - pulumi.set(__self__, "network_interface_private_ip_addresses", network_interface_private_ip_addresses) - pulumi.set(__self__, "subnet_id", subnet_id) + ModuleNetworkProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_interface_private_ip_addresses=network_interface_private_ip_addresses, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_interface_private_ip_addresses: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_interface_private_ip_addresses is None and 'networkInterfacePrivateIpAddresses' in kwargs: + network_interface_private_ip_addresses = kwargs['networkInterfacePrivateIpAddresses'] + if network_interface_private_ip_addresses is None: + raise TypeError("Missing 'network_interface_private_ip_addresses' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("network_interface_private_ip_addresses", network_interface_private_ip_addresses) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="networkInterfacePrivateIpAddresses") diff --git a/sdk/python/pulumi_azure/hybrid/get_compute_machine.py b/sdk/python/pulumi_azure/hybrid/get_compute_machine.py index 02410af464..aa66b564bd 100644 --- a/sdk/python/pulumi_azure/hybrid/get_compute_machine.py +++ b/sdk/python/pulumi_azure/hybrid/get_compute_machine.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/hybrid/outputs.py b/sdk/python/pulumi_azure/hybrid/outputs.py index caa16a74cf..d8c34b3855 100644 --- a/sdk/python/pulumi_azure/hybrid/outputs.py +++ b/sdk/python/pulumi_azure/hybrid/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -48,13 +48,64 @@ def __init__(__self__, *, :param Sequence[str] proxy_bypasses: List of service names which should not use the specified proxy server. :param str proxy_url: Specifies the URL of the proxy to be used. """ - pulumi.set(__self__, "extensions_allow_lists", extensions_allow_lists) - pulumi.set(__self__, "extensions_block_lists", extensions_block_lists) - pulumi.set(__self__, "extensions_enabled", extensions_enabled) - pulumi.set(__self__, "guest_configuration_enabled", guest_configuration_enabled) - pulumi.set(__self__, "incoming_connections_ports", incoming_connections_ports) - pulumi.set(__self__, "proxy_bypasses", proxy_bypasses) - pulumi.set(__self__, "proxy_url", proxy_url) + GetComputeMachineAgentConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + extensions_allow_lists=extensions_allow_lists, + extensions_block_lists=extensions_block_lists, + extensions_enabled=extensions_enabled, + guest_configuration_enabled=guest_configuration_enabled, + incoming_connections_ports=incoming_connections_ports, + proxy_bypasses=proxy_bypasses, + proxy_url=proxy_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + extensions_allow_lists: Optional[Sequence['outputs.GetComputeMachineAgentConfigurationExtensionsAllowListResult']] = None, + extensions_block_lists: Optional[Sequence['outputs.GetComputeMachineAgentConfigurationExtensionsBlockListResult']] = None, + extensions_enabled: Optional[bool] = None, + guest_configuration_enabled: Optional[bool] = None, + incoming_connections_ports: Optional[Sequence[str]] = None, + proxy_bypasses: Optional[Sequence[str]] = None, + proxy_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if extensions_allow_lists is None and 'extensionsAllowLists' in kwargs: + extensions_allow_lists = kwargs['extensionsAllowLists'] + if extensions_allow_lists is None: + raise TypeError("Missing 'extensions_allow_lists' argument") + if extensions_block_lists is None and 'extensionsBlockLists' in kwargs: + extensions_block_lists = kwargs['extensionsBlockLists'] + if extensions_block_lists is None: + raise TypeError("Missing 'extensions_block_lists' argument") + if extensions_enabled is None and 'extensionsEnabled' in kwargs: + extensions_enabled = kwargs['extensionsEnabled'] + if extensions_enabled is None: + raise TypeError("Missing 'extensions_enabled' argument") + if guest_configuration_enabled is None and 'guestConfigurationEnabled' in kwargs: + guest_configuration_enabled = kwargs['guestConfigurationEnabled'] + if guest_configuration_enabled is None: + raise TypeError("Missing 'guest_configuration_enabled' argument") + if incoming_connections_ports is None and 'incomingConnectionsPorts' in kwargs: + incoming_connections_ports = kwargs['incomingConnectionsPorts'] + if incoming_connections_ports is None: + raise TypeError("Missing 'incoming_connections_ports' argument") + if proxy_bypasses is None and 'proxyBypasses' in kwargs: + proxy_bypasses = kwargs['proxyBypasses'] + if proxy_bypasses is None: + raise TypeError("Missing 'proxy_bypasses' argument") + if proxy_url is None and 'proxyUrl' in kwargs: + proxy_url = kwargs['proxyUrl'] + if proxy_url is None: + raise TypeError("Missing 'proxy_url' argument") + + _setter("extensions_allow_lists", extensions_allow_lists) + _setter("extensions_block_lists", extensions_block_lists) + _setter("extensions_enabled", extensions_enabled) + _setter("guest_configuration_enabled", guest_configuration_enabled) + _setter("incoming_connections_ports", incoming_connections_ports) + _setter("proxy_bypasses", proxy_bypasses) + _setter("proxy_url", proxy_url) @property @pulumi.getter(name="extensionsAllowLists") @@ -122,8 +173,25 @@ def __init__(__self__, *, :param str publisher: Publisher of the extension. :param str type: The identity type. """ - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) + GetComputeMachineAgentConfigurationExtensionsAllowListResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + publisher=publisher, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + publisher: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("publisher", publisher) + _setter("type", type) @property @pulumi.getter @@ -151,8 +219,25 @@ def __init__(__self__, *, :param str publisher: Publisher of the extension. :param str type: The identity type. """ - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "type", type) + GetComputeMachineAgentConfigurationExtensionsBlockListResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + publisher=publisher, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + publisher: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("publisher", publisher) + _setter("type", type) @property @pulumi.getter @@ -178,7 +263,20 @@ def __init__(__self__, *, """ :param str provider: Specifies the cloud provider. For example `Azure`, `AWS` and `GCP`. """ - pulumi.set(__self__, "provider", provider) + GetComputeMachineCloudMetadataResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + provider=provider, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + provider: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if provider is None: + raise TypeError("Missing 'provider' argument") + + _setter("provider", provider) @property @pulumi.getter @@ -202,10 +300,37 @@ def __init__(__self__, *, :param str message: The error message. :param str target: The error target. """ - pulumi.set(__self__, "additional_infos", additional_infos) - pulumi.set(__self__, "code", code) - pulumi.set(__self__, "message", message) - pulumi.set(__self__, "target", target) + GetComputeMachineErrorDetailResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_infos=additional_infos, + code=code, + message=message, + target=target, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_infos: Optional[Sequence['outputs.GetComputeMachineErrorDetailAdditionalInfoResult']] = None, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_infos is None and 'additionalInfos' in kwargs: + additional_infos = kwargs['additionalInfos'] + if additional_infos is None: + raise TypeError("Missing 'additional_infos' argument") + if code is None: + raise TypeError("Missing 'code' argument") + if message is None: + raise TypeError("Missing 'message' argument") + if target is None: + raise TypeError("Missing 'target' argument") + + _setter("additional_infos", additional_infos) + _setter("code", code) + _setter("message", message) + _setter("target", target) @property @pulumi.getter(name="additionalInfos") @@ -249,8 +374,25 @@ def __init__(__self__, *, :param str info: The additional information message. :param str type: The identity type. """ - pulumi.set(__self__, "info", info) - pulumi.set(__self__, "type", type) + GetComputeMachineErrorDetailAdditionalInfoResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + info=info, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + info: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if info is None: + raise TypeError("Missing 'info' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("info", info) + _setter("type", type) @property @pulumi.getter @@ -280,9 +422,34 @@ def __init__(__self__, *, :param str tenant_id: The tenant ID of resource. :param str type: The identity type. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetComputeMachineIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="principalId") @@ -322,10 +489,37 @@ def __init__(__self__, *, :param str district: The district, state, or province where the resource is located. :param str name: The name of this hybrid compute machine. """ - pulumi.set(__self__, "city", city) - pulumi.set(__self__, "country_or_region", country_or_region) - pulumi.set(__self__, "district", district) - pulumi.set(__self__, "name", name) + GetComputeMachineLocationDataResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + city=city, + country_or_region=country_or_region, + district=district, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + city: Optional[str] = None, + country_or_region: Optional[str] = None, + district: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if city is None: + raise TypeError("Missing 'city' argument") + if country_or_region is None and 'countryOrRegion' in kwargs: + country_or_region = kwargs['countryOrRegion'] + if country_or_region is None: + raise TypeError("Missing 'country_or_region' argument") + if district is None: + raise TypeError("Missing 'district' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("city", city) + _setter("country_or_region", country_or_region) + _setter("district", district) + _setter("name", name) @property @pulumi.getter @@ -371,9 +565,36 @@ def __init__(__self__, *, :param Sequence['GetComputeMachineOsProfileLinuxConfigurationArgs'] linux_configurations: A `linux_configuration` block as defined above. :param Sequence['GetComputeMachineOsProfileWindowsConfigurationArgs'] windows_configurations: A `windows_configuration` block as defined below. """ - pulumi.set(__self__, "computer_name", computer_name) - pulumi.set(__self__, "linux_configurations", linux_configurations) - pulumi.set(__self__, "windows_configurations", windows_configurations) + GetComputeMachineOsProfileResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + computer_name=computer_name, + linux_configurations=linux_configurations, + windows_configurations=windows_configurations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + computer_name: Optional[str] = None, + linux_configurations: Optional[Sequence['outputs.GetComputeMachineOsProfileLinuxConfigurationResult']] = None, + windows_configurations: Optional[Sequence['outputs.GetComputeMachineOsProfileWindowsConfigurationResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if computer_name is None and 'computerName' in kwargs: + computer_name = kwargs['computerName'] + if computer_name is None: + raise TypeError("Missing 'computer_name' argument") + if linux_configurations is None and 'linuxConfigurations' in kwargs: + linux_configurations = kwargs['linuxConfigurations'] + if linux_configurations is None: + raise TypeError("Missing 'linux_configurations' argument") + if windows_configurations is None and 'windowsConfigurations' in kwargs: + windows_configurations = kwargs['windowsConfigurations'] + if windows_configurations is None: + raise TypeError("Missing 'windows_configurations' argument") + + _setter("computer_name", computer_name) + _setter("linux_configurations", linux_configurations) + _setter("windows_configurations", windows_configurations) @property @pulumi.getter(name="computerName") @@ -407,7 +628,22 @@ def __init__(__self__, *, """ :param Sequence['GetComputeMachineOsProfileLinuxConfigurationPatchSettingArgs'] patch_settings: A `patch_settings` block as defined above. """ - pulumi.set(__self__, "patch_settings", patch_settings) + GetComputeMachineOsProfileLinuxConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + patch_settings=patch_settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + patch_settings: Optional[Sequence['outputs.GetComputeMachineOsProfileLinuxConfigurationPatchSettingResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if patch_settings is None and 'patchSettings' in kwargs: + patch_settings = kwargs['patchSettings'] + if patch_settings is None: + raise TypeError("Missing 'patch_settings' argument") + + _setter("patch_settings", patch_settings) @property @pulumi.getter(name="patchSettings") @@ -427,8 +663,29 @@ def __init__(__self__, *, :param str assessment_mode: Specifies the assessment mode. :param str patch_mode: Specifies the patch mode. """ - pulumi.set(__self__, "assessment_mode", assessment_mode) - pulumi.set(__self__, "patch_mode", patch_mode) + GetComputeMachineOsProfileLinuxConfigurationPatchSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + assessment_mode=assessment_mode, + patch_mode=patch_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assessment_mode: Optional[str] = None, + patch_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assessment_mode is None and 'assessmentMode' in kwargs: + assessment_mode = kwargs['assessmentMode'] + if assessment_mode is None: + raise TypeError("Missing 'assessment_mode' argument") + if patch_mode is None and 'patchMode' in kwargs: + patch_mode = kwargs['patchMode'] + if patch_mode is None: + raise TypeError("Missing 'patch_mode' argument") + + _setter("assessment_mode", assessment_mode) + _setter("patch_mode", patch_mode) @property @pulumi.getter(name="assessmentMode") @@ -454,7 +711,22 @@ def __init__(__self__, *, """ :param Sequence['GetComputeMachineOsProfileWindowsConfigurationPatchSettingArgs'] patch_settings: A `patch_settings` block as defined above. """ - pulumi.set(__self__, "patch_settings", patch_settings) + GetComputeMachineOsProfileWindowsConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + patch_settings=patch_settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + patch_settings: Optional[Sequence['outputs.GetComputeMachineOsProfileWindowsConfigurationPatchSettingResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if patch_settings is None and 'patchSettings' in kwargs: + patch_settings = kwargs['patchSettings'] + if patch_settings is None: + raise TypeError("Missing 'patch_settings' argument") + + _setter("patch_settings", patch_settings) @property @pulumi.getter(name="patchSettings") @@ -474,8 +746,29 @@ def __init__(__self__, *, :param str assessment_mode: Specifies the assessment mode. :param str patch_mode: Specifies the patch mode. """ - pulumi.set(__self__, "assessment_mode", assessment_mode) - pulumi.set(__self__, "patch_mode", patch_mode) + GetComputeMachineOsProfileWindowsConfigurationPatchSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + assessment_mode=assessment_mode, + patch_mode=patch_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assessment_mode: Optional[str] = None, + patch_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assessment_mode is None and 'assessmentMode' in kwargs: + assessment_mode = kwargs['assessmentMode'] + if assessment_mode is None: + raise TypeError("Missing 'assessment_mode' argument") + if patch_mode is None and 'patchMode' in kwargs: + patch_mode = kwargs['patchMode'] + if patch_mode is None: + raise TypeError("Missing 'patch_mode' argument") + + _setter("assessment_mode", assessment_mode) + _setter("patch_mode", patch_mode) @property @pulumi.getter(name="assessmentMode") @@ -503,8 +796,29 @@ def __init__(__self__, *, :param Sequence['GetComputeMachineServiceStatusExtensionServiceArgs'] extension_services: A `extension_service` block as defined above. :param Sequence['GetComputeMachineServiceStatusGuestConfigurationServiceArgs'] guest_configuration_services: A `guest_configuration_service` block as defined above. """ - pulumi.set(__self__, "extension_services", extension_services) - pulumi.set(__self__, "guest_configuration_services", guest_configuration_services) + GetComputeMachineServiceStatusResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + extension_services=extension_services, + guest_configuration_services=guest_configuration_services, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + extension_services: Optional[Sequence['outputs.GetComputeMachineServiceStatusExtensionServiceResult']] = None, + guest_configuration_services: Optional[Sequence['outputs.GetComputeMachineServiceStatusGuestConfigurationServiceResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if extension_services is None and 'extensionServices' in kwargs: + extension_services = kwargs['extensionServices'] + if extension_services is None: + raise TypeError("Missing 'extension_services' argument") + if guest_configuration_services is None and 'guestConfigurationServices' in kwargs: + guest_configuration_services = kwargs['guestConfigurationServices'] + if guest_configuration_services is None: + raise TypeError("Missing 'guest_configuration_services' argument") + + _setter("extension_services", extension_services) + _setter("guest_configuration_services", guest_configuration_services) @property @pulumi.getter(name="extensionServices") @@ -532,8 +846,27 @@ def __init__(__self__, *, :param str startup_type: The behavior of the service when the Arc-enabled machine starts up. :param str status: The current status of the service. """ - pulumi.set(__self__, "startup_type", startup_type) - pulumi.set(__self__, "status", status) + GetComputeMachineServiceStatusExtensionServiceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + startup_type=startup_type, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + startup_type: Optional[str] = None, + status: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if startup_type is None and 'startupType' in kwargs: + startup_type = kwargs['startupType'] + if startup_type is None: + raise TypeError("Missing 'startup_type' argument") + if status is None: + raise TypeError("Missing 'status' argument") + + _setter("startup_type", startup_type) + _setter("status", status) @property @pulumi.getter(name="startupType") @@ -561,8 +894,27 @@ def __init__(__self__, *, :param str startup_type: The behavior of the service when the Arc-enabled machine starts up. :param str status: The current status of the service. """ - pulumi.set(__self__, "startup_type", startup_type) - pulumi.set(__self__, "status", status) + GetComputeMachineServiceStatusGuestConfigurationServiceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + startup_type=startup_type, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + startup_type: Optional[str] = None, + status: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if startup_type is None and 'startupType' in kwargs: + startup_type = kwargs['startupType'] + if startup_type is None: + raise TypeError("Missing 'startup_type' argument") + if status is None: + raise TypeError("Missing 'status' argument") + + _setter("startup_type", startup_type) + _setter("status", status) @property @pulumi.getter(name="startupType") diff --git a/sdk/python/pulumi_azure/iot/_inputs.py b/sdk/python/pulumi_azure/iot/_inputs.py index 3221469312..df45eecc7e 100644 --- a/sdk/python/pulumi_azure/iot/_inputs.py +++ b/sdk/python/pulumi_azure/iot/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -46,12 +46,31 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['IoTHubCloudToDeviceFeedbackArgs']]] feedbacks: A `feedback` block as defined below. :param pulumi.Input[int] max_delivery_count: The maximum delivery count for cloud-to-device per-device queues. This value must be between `1` and `100`. Defaults to `10`. """ + IoTHubCloudToDeviceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_ttl=default_ttl, + feedbacks=feedbacks, + max_delivery_count=max_delivery_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_ttl: Optional[pulumi.Input[str]] = None, + feedbacks: Optional[pulumi.Input[Sequence[pulumi.Input['IoTHubCloudToDeviceFeedbackArgs']]]] = None, + max_delivery_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_ttl is None and 'defaultTtl' in kwargs: + default_ttl = kwargs['defaultTtl'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if default_ttl is not None: - pulumi.set(__self__, "default_ttl", default_ttl) + _setter("default_ttl", default_ttl) if feedbacks is not None: - pulumi.set(__self__, "feedbacks", feedbacks) + _setter("feedbacks", feedbacks) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) @property @pulumi.getter(name="defaultTtl") @@ -101,12 +120,33 @@ def __init__(__self__, *, :param pulumi.Input[int] max_delivery_count: The maximum delivery count for the feedback queue. This value must be between `1` and `100`. Defaults to `10`. :param pulumi.Input[str] time_to_live: The retention time for service-bound feedback messages, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. """ + IoTHubCloudToDeviceFeedbackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + lock_duration=lock_duration, + max_delivery_count=max_delivery_count, + time_to_live=time_to_live, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + lock_duration: Optional[pulumi.Input[str]] = None, + max_delivery_count: Optional[pulumi.Input[int]] = None, + time_to_live: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if time_to_live is None and 'timeToLive' in kwargs: + time_to_live = kwargs['timeToLive'] + if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) if time_to_live is not None: - pulumi.set(__self__, "time_to_live", time_to_live) + _setter("time_to_live", time_to_live) @property @pulumi.getter(name="lockDuration") @@ -180,30 +220,89 @@ def __init__(__self__, *, :param pulumi.Input[int] max_chunk_size_in_bytes: Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. :param pulumi.Input[str] resource_group_name: The resource group in which the endpoint will be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + IoTHubEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + authentication_type=authentication_type, + batch_frequency_in_seconds=batch_frequency_in_seconds, + connection_string=connection_string, + container_name=container_name, + encoding=encoding, + endpoint_uri=endpoint_uri, + entity_path=entity_path, + file_name_format=file_name_format, + identity_id=identity_id, + max_chunk_size_in_bytes=max_chunk_size_in_bytes, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + authentication_type: Optional[pulumi.Input[str]] = None, + batch_frequency_in_seconds: Optional[pulumi.Input[int]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + container_name: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + endpoint_uri: Optional[pulumi.Input[str]] = None, + entity_path: Optional[pulumi.Input[str]] = None, + file_name_format: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + max_chunk_size_in_bytes: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if batch_frequency_in_seconds is None and 'batchFrequencyInSeconds' in kwargs: + batch_frequency_in_seconds = kwargs['batchFrequencyInSeconds'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if endpoint_uri is None and 'endpointUri' in kwargs: + endpoint_uri = kwargs['endpointUri'] + if entity_path is None and 'entityPath' in kwargs: + entity_path = kwargs['entityPath'] + if file_name_format is None and 'fileNameFormat' in kwargs: + file_name_format = kwargs['fileNameFormat'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if max_chunk_size_in_bytes is None and 'maxChunkSizeInBytes' in kwargs: + max_chunk_size_in_bytes = kwargs['maxChunkSizeInBytes'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + + _setter("name", name) + _setter("type", type) if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if batch_frequency_in_seconds is not None: - pulumi.set(__self__, "batch_frequency_in_seconds", batch_frequency_in_seconds) + _setter("batch_frequency_in_seconds", batch_frequency_in_seconds) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if container_name is not None: - pulumi.set(__self__, "container_name", container_name) + _setter("container_name", container_name) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if endpoint_uri is not None: - pulumi.set(__self__, "endpoint_uri", endpoint_uri) + _setter("endpoint_uri", endpoint_uri) if entity_path is not None: - pulumi.set(__self__, "entity_path", entity_path) + _setter("entity_path", entity_path) if file_name_format is not None: - pulumi.set(__self__, "file_name_format", file_name_format) + _setter("file_name_format", file_name_format) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if max_chunk_size_in_bytes is not None: - pulumi.set(__self__, "max_chunk_size_in_bytes", max_chunk_size_in_bytes) + _setter("max_chunk_size_in_bytes", max_chunk_size_in_bytes) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter @@ -377,9 +476,32 @@ def __init__(__self__, *, :param pulumi.Input[str] key: The key of the enrichment. :param pulumi.Input[str] value: The value of the enrichment. Value can be any static string, the name of the IoT Hub sending the message (use `$iothubname`) or information from the device twin (ex: `$twin.tags.latitude`) """ - pulumi.set(__self__, "endpoint_names", endpoint_names) - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + IoTHubEnrichmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint_names=endpoint_names, + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + key: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_names is None and 'endpointNames' in kwargs: + endpoint_names = kwargs['endpointNames'] + if endpoint_names is None: + raise TypeError("Missing 'endpoint_names' argument") + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("endpoint_names", endpoint_names) + _setter("key", key) + _setter("value", value) @property @pulumi.getter(name="endpointNames") @@ -431,14 +553,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] endpoint_names: The endpoints to which messages that satisfy the condition are routed. Currently only 1 endpoint is allowed. :param pulumi.Input[str] source: The source that the routing rule is to be applied to, such as `DeviceMessages`. Possible values include: `Invalid`, `DeviceMessages`, `TwinChangeEvents`, `DeviceLifecycleEvents`, `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents` and `DigitalTwinChangeEvents`. """ + IoTHubFallbackRouteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + condition=condition, + enabled=enabled, + endpoint_names=endpoint_names, + source=source, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + condition: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + endpoint_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_names is None and 'endpointNames' in kwargs: + endpoint_names = kwargs['endpointNames'] + if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if endpoint_names is not None: - pulumi.set(__self__, "endpoint_names", endpoint_names) + _setter("endpoint_names", endpoint_names) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) @property @pulumi.getter @@ -516,22 +657,69 @@ def __init__(__self__, *, :param pulumi.Input[bool] notifications: Used to specify whether file notifications are sent to IoT Hub on upload. Defaults to `false`. :param pulumi.Input[str] sas_ttl: The period of time for which the SAS URI generated by IoT Hub for file upload is valid, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 24 hours. Defaults to `PT1H`. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "container_name", container_name) + IoTHubFileUploadArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + container_name=container_name, + authentication_type=authentication_type, + default_ttl=default_ttl, + identity_id=identity_id, + lock_duration=lock_duration, + max_delivery_count=max_delivery_count, + notifications=notifications, + sas_ttl=sas_ttl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + container_name: Optional[pulumi.Input[str]] = None, + authentication_type: Optional[pulumi.Input[str]] = None, + default_ttl: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + lock_duration: Optional[pulumi.Input[str]] = None, + max_delivery_count: Optional[pulumi.Input[int]] = None, + notifications: Optional[pulumi.Input[bool]] = None, + sas_ttl: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if default_ttl is None and 'defaultTtl' in kwargs: + default_ttl = kwargs['defaultTtl'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if sas_ttl is None and 'sasTtl' in kwargs: + sas_ttl = kwargs['sasTtl'] + + _setter("connection_string", connection_string) + _setter("container_name", container_name) if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if default_ttl is not None: - pulumi.set(__self__, "default_ttl", default_ttl) + _setter("default_ttl", default_ttl) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) if notifications is not None: - pulumi.set(__self__, "notifications", notifications) + _setter("notifications", notifications) if sas_ttl is not None: - pulumi.set(__self__, "sas_ttl", sas_ttl) + _setter("sas_ttl", sas_ttl) @property @pulumi.getter(name="connectionString") @@ -661,13 +849,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + IoTHubIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -731,12 +944,33 @@ def __init__(__self__, *, :param pulumi.Input[str] default_action: Default Action for Network Rule Set. Possible values are `DefaultActionDeny`, `DefaultActionAllow`. Defaults to `DefaultActionDeny`. :param pulumi.Input[Sequence[pulumi.Input['IoTHubNetworkRuleSetIpRuleArgs']]] ip_rules: One or more `ip_rule` blocks as defined below. """ + IoTHubNetworkRuleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + apply_to_builtin_eventhub_endpoint=apply_to_builtin_eventhub_endpoint, + default_action=default_action, + ip_rules=ip_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + apply_to_builtin_eventhub_endpoint: Optional[pulumi.Input[bool]] = None, + default_action: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['IoTHubNetworkRuleSetIpRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if apply_to_builtin_eventhub_endpoint is None and 'applyToBuiltinEventhubEndpoint' in kwargs: + apply_to_builtin_eventhub_endpoint = kwargs['applyToBuiltinEventhubEndpoint'] + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if apply_to_builtin_eventhub_endpoint is not None: - pulumi.set(__self__, "apply_to_builtin_eventhub_endpoint", apply_to_builtin_eventhub_endpoint) + _setter("apply_to_builtin_eventhub_endpoint", apply_to_builtin_eventhub_endpoint) if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) @property @pulumi.getter(name="applyToBuiltinEventhubEndpoint") @@ -786,10 +1020,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the ip rule. :param pulumi.Input[str] action: The desired action for requests captured by this rule. Possible values are `Allow`. Defaults to `Allow`. """ - pulumi.set(__self__, "ip_mask", ip_mask) - pulumi.set(__self__, "name", name) + IoTHubNetworkRuleSetIpRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + name=name, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("ip_mask", ip_mask) + _setter("name", name) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipMask") @@ -843,12 +1098,41 @@ def __init__(__self__, *, :param pulumi.Input[str] source: The source that the routing rule is to be applied to, such as `DeviceMessages`. Possible values include: `Invalid`, `DeviceMessages`, `TwinChangeEvents`, `DeviceLifecycleEvents`, `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents` and `DigitalTwinChangeEvents`. :param pulumi.Input[str] condition: The condition that is evaluated to apply the routing rule. Defaults to `true`. For grammar, see: . """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "endpoint_names", endpoint_names) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "source", source) + IoTHubRouteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + endpoint_names=endpoint_names, + name=name, + source=source, + condition=condition, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + endpoint_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input[str]] = None, + condition: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if endpoint_names is None and 'endpointNames' in kwargs: + endpoint_names = kwargs['endpointNames'] + if endpoint_names is None: + raise TypeError("Missing 'endpoint_names' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if source is None: + raise TypeError("Missing 'source' argument") + + _setter("enabled", enabled) + _setter("endpoint_names", endpoint_names) + _setter("name", name) + _setter("source", source) if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) @property @pulumi.getter @@ -924,14 +1208,37 @@ def __init__(__self__, *, :param pulumi.Input[str] primary_key: The primary key. :param pulumi.Input[str] secondary_key: The secondary key. """ + IoTHubSharedAccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_name=key_name, + permissions=permissions, + primary_key=primary_key, + secondary_key=secondary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_name: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_name is None and 'keyName' in kwargs: + key_name = kwargs['keyName'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if key_name is not None: - pulumi.set(__self__, "key_name", key_name) + _setter("key_name", key_name) if permissions is not None: - pulumi.set(__self__, "permissions", permissions) + _setter("permissions", permissions) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) @property @pulumi.getter(name="keyName") @@ -993,8 +1300,25 @@ def __init__(__self__, *, > **NOTE:** Only one IotHub can be on the `Free` tier per subscription. :param pulumi.Input[str] name: The name of the sku. Possible values are `B1`, `B2`, `B3`, `F1`, `S1`, `S2`, and `S3`. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + IoTHubSkuArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("capacity", capacity) + _setter("name", name) @property @pulumi.getter @@ -1038,13 +1362,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this IoT Hub Device Update Account. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this IoT Hub Device Update Account. """ - pulumi.set(__self__, "type", type) + IotHubDeviceUpdateAccountIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1106,8 +1455,27 @@ def __init__(__self__, *, :param pulumi.Input[str] connection_string: Connection String of the Diagnostic Storage Account. :param pulumi.Input[str] id: Resource ID of the Diagnostic Storage Account. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "id", id) + IotHubDeviceUpdateInstanceDiagnosticStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("connection_string", connection_string) + _setter("id", id) @property @pulumi.getter(name="connectionString") @@ -1147,11 +1515,36 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the filter. :param pulumi.Input[str] target: Target for requests captured by this rule. Possible values are `all`, `deviceApi` and `serviceApi`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "ip_mask", ip_mask) - pulumi.set(__self__, "name", name) + IotHubDpsIpFilterRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + ip_mask=ip_mask, + name=name, + target=target, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + ip_mask: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + target: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("ip_mask", ip_mask) + _setter("name", name) if target is not None: - pulumi.set(__self__, "target", target) + _setter("target", target) @property @pulumi.getter @@ -1217,14 +1610,43 @@ def __init__(__self__, *, :param pulumi.Input[bool] apply_allocation_policy: Determines whether to apply allocation policies to the IoT Hub. Defaults to `true`. :param pulumi.Input[str] hostname: The IoT Hub hostname. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "location", location) + IotHubDpsLinkedHubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + location=location, + allocation_weight=allocation_weight, + apply_allocation_policy=apply_allocation_policy, + hostname=hostname, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + allocation_weight: Optional[pulumi.Input[int]] = None, + apply_allocation_policy: Optional[pulumi.Input[bool]] = None, + hostname: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if location is None: + raise TypeError("Missing 'location' argument") + if allocation_weight is None and 'allocationWeight' in kwargs: + allocation_weight = kwargs['allocationWeight'] + if apply_allocation_policy is None and 'applyAllocationPolicy' in kwargs: + apply_allocation_policy = kwargs['applyAllocationPolicy'] + + _setter("connection_string", connection_string) + _setter("location", location) if allocation_weight is not None: - pulumi.set(__self__, "allocation_weight", allocation_weight) + _setter("allocation_weight", allocation_weight) if apply_allocation_policy is not None: - pulumi.set(__self__, "apply_allocation_policy", apply_allocation_policy) + _setter("apply_allocation_policy", apply_allocation_policy) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) @property @pulumi.getter(name="connectionString") @@ -1296,8 +1718,25 @@ def __init__(__self__, *, :param pulumi.Input[int] capacity: The number of provisioned IoT Device Provisioning Service units. :param pulumi.Input[str] name: The name of the sku. Currently can only be set to `S1`. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + IotHubDpsSkuArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("capacity", capacity) + _setter("name", name) @property @pulumi.getter @@ -1337,14 +1776,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] local_users_not_alloweds: Specifies which local user is not allowed to login in current device group. :param pulumi.Input[Sequence[pulumi.Input[str]]] processes_not_alloweds: Specifies which process is not allowed to be executed in current device group. """ + SecurityDeviceGroupAllowRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_from_ips_not_alloweds=connection_from_ips_not_alloweds, + connection_to_ips_not_alloweds=connection_to_ips_not_alloweds, + local_users_not_alloweds=local_users_not_alloweds, + processes_not_alloweds=processes_not_alloweds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_from_ips_not_alloweds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connection_to_ips_not_alloweds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + local_users_not_alloweds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + processes_not_alloweds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_from_ips_not_alloweds is None and 'connectionFromIpsNotAlloweds' in kwargs: + connection_from_ips_not_alloweds = kwargs['connectionFromIpsNotAlloweds'] + if connection_to_ips_not_alloweds is None and 'connectionToIpsNotAlloweds' in kwargs: + connection_to_ips_not_alloweds = kwargs['connectionToIpsNotAlloweds'] + if local_users_not_alloweds is None and 'localUsersNotAlloweds' in kwargs: + local_users_not_alloweds = kwargs['localUsersNotAlloweds'] + if processes_not_alloweds is None and 'processesNotAlloweds' in kwargs: + processes_not_alloweds = kwargs['processesNotAlloweds'] + if connection_from_ips_not_alloweds is not None: - pulumi.set(__self__, "connection_from_ips_not_alloweds", connection_from_ips_not_alloweds) + _setter("connection_from_ips_not_alloweds", connection_from_ips_not_alloweds) if connection_to_ips_not_alloweds is not None: - pulumi.set(__self__, "connection_to_ips_not_alloweds", connection_to_ips_not_alloweds) + _setter("connection_to_ips_not_alloweds", connection_to_ips_not_alloweds) if local_users_not_alloweds is not None: - pulumi.set(__self__, "local_users_not_alloweds", local_users_not_alloweds) + _setter("local_users_not_alloweds", local_users_not_alloweds) if processes_not_alloweds is not None: - pulumi.set(__self__, "processes_not_alloweds", processes_not_alloweds) + _setter("processes_not_alloweds", processes_not_alloweds) @property @pulumi.getter(name="connectionFromIpsNotAlloweds") @@ -1408,10 +1872,35 @@ def __init__(__self__, *, :param pulumi.Input[int] min: The minimum threshold in the given time window. :param pulumi.Input[str] type: The type of supported rule type. Possible Values are `ActiveConnectionsNotInAllowedRange`, `AmqpC2DMessagesNotInAllowedRange`, `MqttC2DMessagesNotInAllowedRange`, `HttpC2DMessagesNotInAllowedRange`, `AmqpC2DRejectedMessagesNotInAllowedRange`, `MqttC2DRejectedMessagesNotInAllowedRange`, `HttpC2DRejectedMessagesNotInAllowedRange`, `AmqpD2CMessagesNotInAllowedRange`, `MqttD2CMessagesNotInAllowedRange`, `HttpD2CMessagesNotInAllowedRange`, `DirectMethodInvokesNotInAllowedRange`, `FailedLocalLoginsNotInAllowedRange`, `FileUploadsNotInAllowedRange`, `QueuePurgesNotInAllowedRange`, `TwinUpdatesNotInAllowedRange` and `UnauthorizedOperationsNotInAllowedRange`. """ - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "max", max) - pulumi.set(__self__, "min", min) - pulumi.set(__self__, "type", type) + SecurityDeviceGroupRangeRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration=duration, + max=max, + min=min, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration: Optional[pulumi.Input[str]] = None, + max: Optional[pulumi.Input[int]] = None, + min: Optional[pulumi.Input[int]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration is None: + raise TypeError("Missing 'duration' argument") + if max is None: + raise TypeError("Missing 'max' argument") + if min is None: + raise TypeError("Missing 'min' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("duration", duration) + _setter("max", max) + _setter("min", min) + _setter("type", type) @property @pulumi.getter @@ -1471,8 +1960,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] data_types: A list of data types which sent to workspace. Possible values are `Alerts` and `RawEvents`. :param pulumi.Input[str] workspace_id: The resource ID of the Log Analytics Workspace. """ - pulumi.set(__self__, "data_types", data_types) - pulumi.set(__self__, "workspace_id", workspace_id) + SecuritySolutionAdditionalWorkspaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_types=data_types, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_types is None and 'dataTypes' in kwargs: + data_types = kwargs['dataTypes'] + if data_types is None: + raise TypeError("Missing 'data_types' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + + _setter("data_types", data_types) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="dataTypes") @@ -1536,38 +2046,109 @@ def __init__(__self__, *, :param pulumi.Input[bool] shared_credentials: Is any credentials shared among devices? Defaults to `true`. :param pulumi.Input[bool] vulnerable_tls_cipher_suite: Does TLS cipher suite need to be updated? Defaults to `true`. """ + SecuritySolutionRecommendationsEnabledArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + acr_authentication=acr_authentication, + agent_send_unutilized_msg=agent_send_unutilized_msg, + baseline=baseline, + edge_hub_mem_optimize=edge_hub_mem_optimize, + edge_logging_option=edge_logging_option, + inconsistent_module_settings=inconsistent_module_settings, + install_agent=install_agent, + ip_filter_deny_all=ip_filter_deny_all, + ip_filter_permissive_rule=ip_filter_permissive_rule, + open_ports=open_ports, + permissive_firewall_policy=permissive_firewall_policy, + permissive_input_firewall_rules=permissive_input_firewall_rules, + permissive_output_firewall_rules=permissive_output_firewall_rules, + privileged_docker_options=privileged_docker_options, + shared_credentials=shared_credentials, + vulnerable_tls_cipher_suite=vulnerable_tls_cipher_suite, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + acr_authentication: Optional[pulumi.Input[bool]] = None, + agent_send_unutilized_msg: Optional[pulumi.Input[bool]] = None, + baseline: Optional[pulumi.Input[bool]] = None, + edge_hub_mem_optimize: Optional[pulumi.Input[bool]] = None, + edge_logging_option: Optional[pulumi.Input[bool]] = None, + inconsistent_module_settings: Optional[pulumi.Input[bool]] = None, + install_agent: Optional[pulumi.Input[bool]] = None, + ip_filter_deny_all: Optional[pulumi.Input[bool]] = None, + ip_filter_permissive_rule: Optional[pulumi.Input[bool]] = None, + open_ports: Optional[pulumi.Input[bool]] = None, + permissive_firewall_policy: Optional[pulumi.Input[bool]] = None, + permissive_input_firewall_rules: Optional[pulumi.Input[bool]] = None, + permissive_output_firewall_rules: Optional[pulumi.Input[bool]] = None, + privileged_docker_options: Optional[pulumi.Input[bool]] = None, + shared_credentials: Optional[pulumi.Input[bool]] = None, + vulnerable_tls_cipher_suite: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if acr_authentication is None and 'acrAuthentication' in kwargs: + acr_authentication = kwargs['acrAuthentication'] + if agent_send_unutilized_msg is None and 'agentSendUnutilizedMsg' in kwargs: + agent_send_unutilized_msg = kwargs['agentSendUnutilizedMsg'] + if edge_hub_mem_optimize is None and 'edgeHubMemOptimize' in kwargs: + edge_hub_mem_optimize = kwargs['edgeHubMemOptimize'] + if edge_logging_option is None and 'edgeLoggingOption' in kwargs: + edge_logging_option = kwargs['edgeLoggingOption'] + if inconsistent_module_settings is None and 'inconsistentModuleSettings' in kwargs: + inconsistent_module_settings = kwargs['inconsistentModuleSettings'] + if install_agent is None and 'installAgent' in kwargs: + install_agent = kwargs['installAgent'] + if ip_filter_deny_all is None and 'ipFilterDenyAll' in kwargs: + ip_filter_deny_all = kwargs['ipFilterDenyAll'] + if ip_filter_permissive_rule is None and 'ipFilterPermissiveRule' in kwargs: + ip_filter_permissive_rule = kwargs['ipFilterPermissiveRule'] + if open_ports is None and 'openPorts' in kwargs: + open_ports = kwargs['openPorts'] + if permissive_firewall_policy is None and 'permissiveFirewallPolicy' in kwargs: + permissive_firewall_policy = kwargs['permissiveFirewallPolicy'] + if permissive_input_firewall_rules is None and 'permissiveInputFirewallRules' in kwargs: + permissive_input_firewall_rules = kwargs['permissiveInputFirewallRules'] + if permissive_output_firewall_rules is None and 'permissiveOutputFirewallRules' in kwargs: + permissive_output_firewall_rules = kwargs['permissiveOutputFirewallRules'] + if privileged_docker_options is None and 'privilegedDockerOptions' in kwargs: + privileged_docker_options = kwargs['privilegedDockerOptions'] + if shared_credentials is None and 'sharedCredentials' in kwargs: + shared_credentials = kwargs['sharedCredentials'] + if vulnerable_tls_cipher_suite is None and 'vulnerableTlsCipherSuite' in kwargs: + vulnerable_tls_cipher_suite = kwargs['vulnerableTlsCipherSuite'] + if acr_authentication is not None: - pulumi.set(__self__, "acr_authentication", acr_authentication) + _setter("acr_authentication", acr_authentication) if agent_send_unutilized_msg is not None: - pulumi.set(__self__, "agent_send_unutilized_msg", agent_send_unutilized_msg) + _setter("agent_send_unutilized_msg", agent_send_unutilized_msg) if baseline is not None: - pulumi.set(__self__, "baseline", baseline) + _setter("baseline", baseline) if edge_hub_mem_optimize is not None: - pulumi.set(__self__, "edge_hub_mem_optimize", edge_hub_mem_optimize) + _setter("edge_hub_mem_optimize", edge_hub_mem_optimize) if edge_logging_option is not None: - pulumi.set(__self__, "edge_logging_option", edge_logging_option) + _setter("edge_logging_option", edge_logging_option) if inconsistent_module_settings is not None: - pulumi.set(__self__, "inconsistent_module_settings", inconsistent_module_settings) + _setter("inconsistent_module_settings", inconsistent_module_settings) if install_agent is not None: - pulumi.set(__self__, "install_agent", install_agent) + _setter("install_agent", install_agent) if ip_filter_deny_all is not None: - pulumi.set(__self__, "ip_filter_deny_all", ip_filter_deny_all) + _setter("ip_filter_deny_all", ip_filter_deny_all) if ip_filter_permissive_rule is not None: - pulumi.set(__self__, "ip_filter_permissive_rule", ip_filter_permissive_rule) + _setter("ip_filter_permissive_rule", ip_filter_permissive_rule) if open_ports is not None: - pulumi.set(__self__, "open_ports", open_ports) + _setter("open_ports", open_ports) if permissive_firewall_policy is not None: - pulumi.set(__self__, "permissive_firewall_policy", permissive_firewall_policy) + _setter("permissive_firewall_policy", permissive_firewall_policy) if permissive_input_firewall_rules is not None: - pulumi.set(__self__, "permissive_input_firewall_rules", permissive_input_firewall_rules) + _setter("permissive_input_firewall_rules", permissive_input_firewall_rules) if permissive_output_firewall_rules is not None: - pulumi.set(__self__, "permissive_output_firewall_rules", permissive_output_firewall_rules) + _setter("permissive_output_firewall_rules", permissive_output_firewall_rules) if privileged_docker_options is not None: - pulumi.set(__self__, "privileged_docker_options", privileged_docker_options) + _setter("privileged_docker_options", privileged_docker_options) if shared_credentials is not None: - pulumi.set(__self__, "shared_credentials", shared_credentials) + _setter("shared_credentials", shared_credentials) if vulnerable_tls_cipher_suite is not None: - pulumi.set(__self__, "vulnerable_tls_cipher_suite", vulnerable_tls_cipher_suite) + _setter("vulnerable_tls_cipher_suite", vulnerable_tls_cipher_suite) @property @pulumi.getter(name="acrAuthentication") @@ -1771,8 +2352,25 @@ def __init__(__self__, *, :param pulumi.Input[str] key: Access key of storage account for Azure IoT Time Series Insights Gen2 Environment :param pulumi.Input[str] name: Name of storage account for Azure IoT Time Series Insights Gen2 Environment. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "name", name) + TimeSeriesInsightsGen2EnvironmentStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("key", key) + _setter("name", name) @property @pulumi.getter @@ -1808,8 +2406,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the key property. Changing this forces a new resource to be created. :param pulumi.Input[str] type: The data type of the key property. Valid values include `Bool`, `DateTime`, `Double`, `String`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + TimeSeriesInsightsReferenceDataSetKeyPropertyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/iot/certificate.py b/sdk/python/pulumi_azure/iot/certificate.py index 80576653ec..d03401071f 100644 --- a/sdk/python/pulumi_azure/iot/certificate.py +++ b/sdk/python/pulumi_azure/iot/certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CertificateArgs', 'Certificate'] @@ -27,13 +27,46 @@ def __init__(__self__, *, :param pulumi.Input[bool] is_verified: Is the certificate verified? Defaults to `false`. :param pulumi.Input[str] name: Specifies the name of the IotHub Certificate resource. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "certificate_content", certificate_content) - pulumi.set(__self__, "iothub_name", iothub_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + CertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_content=certificate_content, + iothub_name=iothub_name, + resource_group_name=resource_group_name, + is_verified=is_verified, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_content: Optional[pulumi.Input[str]] = None, + iothub_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + is_verified: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_content is None and 'certificateContent' in kwargs: + certificate_content = kwargs['certificateContent'] + if certificate_content is None: + raise TypeError("Missing 'certificate_content' argument") + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if iothub_name is None: + raise TypeError("Missing 'iothub_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if is_verified is None and 'isVerified' in kwargs: + is_verified = kwargs['isVerified'] + + _setter("certificate_content", certificate_content) + _setter("iothub_name", iothub_name) + _setter("resource_group_name", resource_group_name) if is_verified is not None: - pulumi.set(__self__, "is_verified", is_verified) + _setter("is_verified", is_verified) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="certificateContent") @@ -112,16 +145,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the IotHub Certificate resource. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group under which the IotHub Certificate resource has to be created. Changing this forces a new resource to be created. """ + _CertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_content=certificate_content, + iothub_name=iothub_name, + is_verified=is_verified, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_content: Optional[pulumi.Input[str]] = None, + iothub_name: Optional[pulumi.Input[str]] = None, + is_verified: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_content is None and 'certificateContent' in kwargs: + certificate_content = kwargs['certificateContent'] + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if is_verified is None and 'isVerified' in kwargs: + is_verified = kwargs['isVerified'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if certificate_content is not None: - pulumi.set(__self__, "certificate_content", certificate_content) + _setter("certificate_content", certificate_content) if iothub_name is not None: - pulumi.set(__self__, "iothub_name", iothub_name) + _setter("iothub_name", iothub_name) if is_verified is not None: - pulumi.set(__self__, "is_verified", is_verified) + _setter("is_verified", is_verified) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="certificateContent") @@ -285,6 +345,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/consumer_group.py b/sdk/python/pulumi_azure/iot/consumer_group.py index dc79094a6a..8e2c71ec77 100644 --- a/sdk/python/pulumi_azure/iot/consumer_group.py +++ b/sdk/python/pulumi_azure/iot/consumer_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ConsumerGroupArgs', 'ConsumerGroup'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of this Consumer Group. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "eventhub_endpoint_name", eventhub_endpoint_name) - pulumi.set(__self__, "iothub_name", iothub_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ConsumerGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_endpoint_name=eventhub_endpoint_name, + iothub_name=iothub_name, + resource_group_name=resource_group_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_endpoint_name: Optional[pulumi.Input[str]] = None, + iothub_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_endpoint_name is None and 'eventhubEndpointName' in kwargs: + eventhub_endpoint_name = kwargs['eventhubEndpointName'] + if eventhub_endpoint_name is None: + raise TypeError("Missing 'eventhub_endpoint_name' argument") + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if iothub_name is None: + raise TypeError("Missing 'iothub_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("eventhub_endpoint_name", eventhub_endpoint_name) + _setter("iothub_name", iothub_name) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="eventhubEndpointName") @@ -94,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of this Consumer Group. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created. """ + _ConsumerGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_endpoint_name=eventhub_endpoint_name, + iothub_name=iothub_name, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_endpoint_name: Optional[pulumi.Input[str]] = None, + iothub_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_endpoint_name is None and 'eventhubEndpointName' in kwargs: + eventhub_endpoint_name = kwargs['eventhubEndpointName'] + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if eventhub_endpoint_name is not None: - pulumi.set(__self__, "eventhub_endpoint_name", eventhub_endpoint_name) + _setter("eventhub_endpoint_name", eventhub_endpoint_name) if iothub_name is not None: - pulumi.set(__self__, "iothub_name", iothub_name) + _setter("iothub_name", iothub_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="eventhubEndpointName") @@ -253,6 +305,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConsumerGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/dps_shared_access_policy.py b/sdk/python/pulumi_azure/iot/dps_shared_access_policy.py index 0f2739522b..b90f5b9a0d 100644 --- a/sdk/python/pulumi_azure/iot/dps_shared_access_policy.py +++ b/sdk/python/pulumi_azure/iot/dps_shared_access_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DpsSharedAccessPolicyArgs', 'DpsSharedAccessPolicy'] @@ -41,20 +41,63 @@ def __init__(__self__, *, > **NOTE** At least one of `registration_read`, `registration_write`, `service_config`, `enrollment_read`, `enrollment_write` permissions must be set to `true`. """ - pulumi.set(__self__, "iothub_dps_name", iothub_dps_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + DpsSharedAccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + iothub_dps_name=iothub_dps_name, + resource_group_name=resource_group_name, + enrollment_read=enrollment_read, + enrollment_write=enrollment_write, + name=name, + registration_read=registration_read, + registration_write=registration_write, + service_config=service_config, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + iothub_dps_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + enrollment_read: Optional[pulumi.Input[bool]] = None, + enrollment_write: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + registration_read: Optional[pulumi.Input[bool]] = None, + registration_write: Optional[pulumi.Input[bool]] = None, + service_config: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if iothub_dps_name is None and 'iothubDpsName' in kwargs: + iothub_dps_name = kwargs['iothubDpsName'] + if iothub_dps_name is None: + raise TypeError("Missing 'iothub_dps_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if enrollment_read is None and 'enrollmentRead' in kwargs: + enrollment_read = kwargs['enrollmentRead'] + if enrollment_write is None and 'enrollmentWrite' in kwargs: + enrollment_write = kwargs['enrollmentWrite'] + if registration_read is None and 'registrationRead' in kwargs: + registration_read = kwargs['registrationRead'] + if registration_write is None and 'registrationWrite' in kwargs: + registration_write = kwargs['registrationWrite'] + if service_config is None and 'serviceConfig' in kwargs: + service_config = kwargs['serviceConfig'] + + _setter("iothub_dps_name", iothub_dps_name) + _setter("resource_group_name", resource_group_name) if enrollment_read is not None: - pulumi.set(__self__, "enrollment_read", enrollment_read) + _setter("enrollment_read", enrollment_read) if enrollment_write is not None: - pulumi.set(__self__, "enrollment_write", enrollment_write) + _setter("enrollment_write", enrollment_write) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if registration_read is not None: - pulumi.set(__self__, "registration_read", registration_read) + _setter("registration_read", registration_read) if registration_write is not None: - pulumi.set(__self__, "registration_write", registration_write) + _setter("registration_write", registration_write) if service_config is not None: - pulumi.set(__self__, "service_config", service_config) + _setter("service_config", service_config) @property @pulumi.getter(name="iothubDpsName") @@ -199,30 +242,85 @@ def __init__(__self__, *, > **NOTE** At least one of `registration_read`, `registration_write`, `service_config`, `enrollment_read`, `enrollment_write` permissions must be set to `true`. """ + _DpsSharedAccessPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + enrollment_read=enrollment_read, + enrollment_write=enrollment_write, + iothub_dps_name=iothub_dps_name, + name=name, + primary_connection_string=primary_connection_string, + primary_key=primary_key, + registration_read=registration_read, + registration_write=registration_write, + resource_group_name=resource_group_name, + secondary_connection_string=secondary_connection_string, + secondary_key=secondary_key, + service_config=service_config, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enrollment_read: Optional[pulumi.Input[bool]] = None, + enrollment_write: Optional[pulumi.Input[bool]] = None, + iothub_dps_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + registration_read: Optional[pulumi.Input[bool]] = None, + registration_write: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + service_config: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enrollment_read is None and 'enrollmentRead' in kwargs: + enrollment_read = kwargs['enrollmentRead'] + if enrollment_write is None and 'enrollmentWrite' in kwargs: + enrollment_write = kwargs['enrollmentWrite'] + if iothub_dps_name is None and 'iothubDpsName' in kwargs: + iothub_dps_name = kwargs['iothubDpsName'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if registration_read is None and 'registrationRead' in kwargs: + registration_read = kwargs['registrationRead'] + if registration_write is None and 'registrationWrite' in kwargs: + registration_write = kwargs['registrationWrite'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if service_config is None and 'serviceConfig' in kwargs: + service_config = kwargs['serviceConfig'] + if enrollment_read is not None: - pulumi.set(__self__, "enrollment_read", enrollment_read) + _setter("enrollment_read", enrollment_read) if enrollment_write is not None: - pulumi.set(__self__, "enrollment_write", enrollment_write) + _setter("enrollment_write", enrollment_write) if iothub_dps_name is not None: - pulumi.set(__self__, "iothub_dps_name", iothub_dps_name) + _setter("iothub_dps_name", iothub_dps_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if registration_read is not None: - pulumi.set(__self__, "registration_read", registration_read) + _setter("registration_read", registration_read) if registration_write is not None: - pulumi.set(__self__, "registration_write", registration_write) + _setter("registration_write", registration_write) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if service_config is not None: - pulumi.set(__self__, "service_config", service_config) + _setter("service_config", service_config) @property @pulumi.getter(name="enrollmentRead") @@ -490,6 +588,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DpsSharedAccessPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/endpoint_cosmosdb_account.py b/sdk/python/pulumi_azure/iot/endpoint_cosmosdb_account.py index ebf903a459..c38e618537 100644 --- a/sdk/python/pulumi_azure/iot/endpoint_cosmosdb_account.py +++ b/sdk/python/pulumi_azure/iot/endpoint_cosmosdb_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EndpointCosmosdbAccountArgs', 'EndpointCosmosdbAccount'] @@ -47,25 +47,90 @@ def __init__(__self__, *, > **NOTE:** `secondary_key` must and can only be specified when `authentication_type` is `keyBased`. """ - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "endpoint_uri", endpoint_uri) - pulumi.set(__self__, "iothub_id", iothub_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + EndpointCosmosdbAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + database_name=database_name, + endpoint_uri=endpoint_uri, + iothub_id=iothub_id, + resource_group_name=resource_group_name, + authentication_type=authentication_type, + identity_id=identity_id, + name=name, + partition_key_name=partition_key_name, + partition_key_template=partition_key_template, + primary_key=primary_key, + secondary_key=secondary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + endpoint_uri: Optional[pulumi.Input[str]] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + authentication_type: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key_name: Optional[pulumi.Input[str]] = None, + partition_key_template: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if endpoint_uri is None and 'endpointUri' in kwargs: + endpoint_uri = kwargs['endpointUri'] + if endpoint_uri is None: + raise TypeError("Missing 'endpoint_uri' argument") + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if iothub_id is None: + raise TypeError("Missing 'iothub_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if partition_key_name is None and 'partitionKeyName' in kwargs: + partition_key_name = kwargs['partitionKeyName'] + if partition_key_template is None and 'partitionKeyTemplate' in kwargs: + partition_key_template = kwargs['partitionKeyTemplate'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + + _setter("container_name", container_name) + _setter("database_name", database_name) + _setter("endpoint_uri", endpoint_uri) + _setter("iothub_id", iothub_id) + _setter("resource_group_name", resource_group_name) if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key_name is not None: - pulumi.set(__self__, "partition_key_name", partition_key_name) + _setter("partition_key_name", partition_key_name) if partition_key_template is not None: - pulumi.set(__self__, "partition_key_template", partition_key_template) + _setter("partition_key_template", partition_key_template) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) @property @pulumi.getter(name="containerName") @@ -254,30 +319,85 @@ def __init__(__self__, *, > **NOTE:** `secondary_key` must and can only be specified when `authentication_type` is `keyBased`. """ + _EndpointCosmosdbAccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_type=authentication_type, + container_name=container_name, + database_name=database_name, + endpoint_uri=endpoint_uri, + identity_id=identity_id, + iothub_id=iothub_id, + name=name, + partition_key_name=partition_key_name, + partition_key_template=partition_key_template, + primary_key=primary_key, + resource_group_name=resource_group_name, + secondary_key=secondary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_type: Optional[pulumi.Input[str]] = None, + container_name: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + endpoint_uri: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key_name: Optional[pulumi.Input[str]] = None, + partition_key_template: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if endpoint_uri is None and 'endpointUri' in kwargs: + endpoint_uri = kwargs['endpointUri'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if partition_key_name is None and 'partitionKeyName' in kwargs: + partition_key_name = kwargs['partitionKeyName'] + if partition_key_template is None and 'partitionKeyTemplate' in kwargs: + partition_key_template = kwargs['partitionKeyTemplate'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if container_name is not None: - pulumi.set(__self__, "container_name", container_name) + _setter("container_name", container_name) if database_name is not None: - pulumi.set(__self__, "database_name", database_name) + _setter("database_name", database_name) if endpoint_uri is not None: - pulumi.set(__self__, "endpoint_uri", endpoint_uri) + _setter("endpoint_uri", endpoint_uri) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if iothub_id is not None: - pulumi.set(__self__, "iothub_id", iothub_id) + _setter("iothub_id", iothub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key_name is not None: - pulumi.set(__self__, "partition_key_name", partition_key_name) + _setter("partition_key_name", partition_key_name) if partition_key_template is not None: - pulumi.set(__self__, "partition_key_template", partition_key_template) + _setter("partition_key_template", partition_key_template) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) @property @pulumi.getter(name="authenticationType") @@ -605,6 +725,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EndpointCosmosdbAccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/endpoint_eventhub.py b/sdk/python/pulumi_azure/iot/endpoint_eventhub.py index 78ed9d7983..645f4a51ad 100644 --- a/sdk/python/pulumi_azure/iot/endpoint_eventhub.py +++ b/sdk/python/pulumi_azure/iot/endpoint_eventhub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EndpointEventhubArgs', 'EndpointEventhub'] @@ -35,20 +35,63 @@ def __init__(__self__, *, > **NOTE:** `identity_id` can only be specified when `authentication_type` is `identityBased`. It must be one of the `identity_ids` of the Iot Hub. If not specified when `authentication_type` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used. :param pulumi.Input[str] name: The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "iothub_id", iothub_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + EndpointEventhubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + iothub_id=iothub_id, + resource_group_name=resource_group_name, + authentication_type=authentication_type, + connection_string=connection_string, + endpoint_uri=endpoint_uri, + entity_path=entity_path, + identity_id=identity_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + iothub_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + authentication_type: Optional[pulumi.Input[str]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + endpoint_uri: Optional[pulumi.Input[str]] = None, + entity_path: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if iothub_id is None: + raise TypeError("Missing 'iothub_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if endpoint_uri is None and 'endpointUri' in kwargs: + endpoint_uri = kwargs['endpointUri'] + if entity_path is None and 'entityPath' in kwargs: + entity_path = kwargs['entityPath'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + + _setter("iothub_id", iothub_id) + _setter("resource_group_name", resource_group_name) if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if endpoint_uri is not None: - pulumi.set(__self__, "endpoint_uri", endpoint_uri) + _setter("endpoint_uri", endpoint_uri) if entity_path is not None: - pulumi.set(__self__, "entity_path", entity_path) + _setter("entity_path", entity_path) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="iothubId") @@ -173,22 +216,61 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group under which the Event Hub has been created. Changing this forces a new resource to be created. """ + _EndpointEventhubState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_type=authentication_type, + connection_string=connection_string, + endpoint_uri=endpoint_uri, + entity_path=entity_path, + identity_id=identity_id, + iothub_id=iothub_id, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_type: Optional[pulumi.Input[str]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + endpoint_uri: Optional[pulumi.Input[str]] = None, + entity_path: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if endpoint_uri is None and 'endpointUri' in kwargs: + endpoint_uri = kwargs['endpointUri'] + if entity_path is None and 'entityPath' in kwargs: + entity_path = kwargs['entityPath'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if endpoint_uri is not None: - pulumi.set(__self__, "endpoint_uri", endpoint_uri) + _setter("endpoint_uri", endpoint_uri) if entity_path is not None: - pulumi.set(__self__, "entity_path", entity_path) + _setter("entity_path", entity_path) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if iothub_id is not None: - pulumi.set(__self__, "iothub_id", iothub_id) + _setter("iothub_id", iothub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="authenticationType") @@ -436,6 +518,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EndpointEventhubArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/endpoint_servicebus_queue.py b/sdk/python/pulumi_azure/iot/endpoint_servicebus_queue.py index aebfafbc1c..562a3b5399 100644 --- a/sdk/python/pulumi_azure/iot/endpoint_servicebus_queue.py +++ b/sdk/python/pulumi_azure/iot/endpoint_servicebus_queue.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EndpointServicebusQueueArgs', 'EndpointServicebusQueue'] @@ -35,20 +35,63 @@ def __init__(__self__, *, > **NOTE:** `identity_id` can only be specified when `authentication_type` is `identityBased`. It must be one of the `identity_ids` of the Iot Hub. If not specified when `authentication_type` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used. :param pulumi.Input[str] name: The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "iothub_id", iothub_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + EndpointServicebusQueueArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + iothub_id=iothub_id, + resource_group_name=resource_group_name, + authentication_type=authentication_type, + connection_string=connection_string, + endpoint_uri=endpoint_uri, + entity_path=entity_path, + identity_id=identity_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + iothub_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + authentication_type: Optional[pulumi.Input[str]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + endpoint_uri: Optional[pulumi.Input[str]] = None, + entity_path: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if iothub_id is None: + raise TypeError("Missing 'iothub_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if endpoint_uri is None and 'endpointUri' in kwargs: + endpoint_uri = kwargs['endpointUri'] + if entity_path is None and 'entityPath' in kwargs: + entity_path = kwargs['entityPath'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + + _setter("iothub_id", iothub_id) + _setter("resource_group_name", resource_group_name) if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if endpoint_uri is not None: - pulumi.set(__self__, "endpoint_uri", endpoint_uri) + _setter("endpoint_uri", endpoint_uri) if entity_path is not None: - pulumi.set(__self__, "entity_path", entity_path) + _setter("entity_path", entity_path) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="iothubId") @@ -173,22 +216,61 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group under which the Service Bus Queue has been created. Changing this forces a new resource to be created. """ + _EndpointServicebusQueueState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_type=authentication_type, + connection_string=connection_string, + endpoint_uri=endpoint_uri, + entity_path=entity_path, + identity_id=identity_id, + iothub_id=iothub_id, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_type: Optional[pulumi.Input[str]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + endpoint_uri: Optional[pulumi.Input[str]] = None, + entity_path: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if endpoint_uri is None and 'endpointUri' in kwargs: + endpoint_uri = kwargs['endpointUri'] + if entity_path is None and 'entityPath' in kwargs: + entity_path = kwargs['entityPath'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if endpoint_uri is not None: - pulumi.set(__self__, "endpoint_uri", endpoint_uri) + _setter("endpoint_uri", endpoint_uri) if entity_path is not None: - pulumi.set(__self__, "entity_path", entity_path) + _setter("entity_path", entity_path) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if iothub_id is not None: - pulumi.set(__self__, "iothub_id", iothub_id) + _setter("iothub_id", iothub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="authenticationType") @@ -428,6 +510,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EndpointServicebusQueueArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/endpoint_servicebus_topic.py b/sdk/python/pulumi_azure/iot/endpoint_servicebus_topic.py index 50d4415372..ab5772dd04 100644 --- a/sdk/python/pulumi_azure/iot/endpoint_servicebus_topic.py +++ b/sdk/python/pulumi_azure/iot/endpoint_servicebus_topic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EndpointServicebusTopicArgs', 'EndpointServicebusTopic'] @@ -35,20 +35,63 @@ def __init__(__self__, *, > **NOTE:** `identity_id` can only be specified when `authentication_type` is `identityBased`. It must be one of the `identity_ids` of the Iot Hub. If not specified when `authentication_type` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used. :param pulumi.Input[str] name: The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "iothub_id", iothub_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + EndpointServicebusTopicArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + iothub_id=iothub_id, + resource_group_name=resource_group_name, + authentication_type=authentication_type, + connection_string=connection_string, + endpoint_uri=endpoint_uri, + entity_path=entity_path, + identity_id=identity_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + iothub_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + authentication_type: Optional[pulumi.Input[str]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + endpoint_uri: Optional[pulumi.Input[str]] = None, + entity_path: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if iothub_id is None: + raise TypeError("Missing 'iothub_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if endpoint_uri is None and 'endpointUri' in kwargs: + endpoint_uri = kwargs['endpointUri'] + if entity_path is None and 'entityPath' in kwargs: + entity_path = kwargs['entityPath'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + + _setter("iothub_id", iothub_id) + _setter("resource_group_name", resource_group_name) if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if endpoint_uri is not None: - pulumi.set(__self__, "endpoint_uri", endpoint_uri) + _setter("endpoint_uri", endpoint_uri) if entity_path is not None: - pulumi.set(__self__, "entity_path", entity_path) + _setter("entity_path", entity_path) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="iothubId") @@ -173,22 +216,61 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group under which the Service Bus Topic has been created. Changing this forces a new resource to be created. """ + _EndpointServicebusTopicState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_type=authentication_type, + connection_string=connection_string, + endpoint_uri=endpoint_uri, + entity_path=entity_path, + identity_id=identity_id, + iothub_id=iothub_id, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_type: Optional[pulumi.Input[str]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + endpoint_uri: Optional[pulumi.Input[str]] = None, + entity_path: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if endpoint_uri is None and 'endpointUri' in kwargs: + endpoint_uri = kwargs['endpointUri'] + if entity_path is None and 'entityPath' in kwargs: + entity_path = kwargs['entityPath'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if endpoint_uri is not None: - pulumi.set(__self__, "endpoint_uri", endpoint_uri) + _setter("endpoint_uri", endpoint_uri) if entity_path is not None: - pulumi.set(__self__, "entity_path", entity_path) + _setter("entity_path", entity_path) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if iothub_id is not None: - pulumi.set(__self__, "iothub_id", iothub_id) + _setter("iothub_id", iothub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="authenticationType") @@ -424,6 +506,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EndpointServicebusTopicArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/endpoint_storage_container.py b/sdk/python/pulumi_azure/iot/endpoint_storage_container.py index 5bd984f53a..f8952edcd4 100644 --- a/sdk/python/pulumi_azure/iot/endpoint_storage_container.py +++ b/sdk/python/pulumi_azure/iot/endpoint_storage_container.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EndpointStorageContainerArgs', 'EndpointStorageContainer'] @@ -43,27 +43,86 @@ def __init__(__self__, *, :param pulumi.Input[int] max_chunk_size_in_bytes: Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). :param pulumi.Input[str] name: The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "iothub_id", iothub_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + EndpointStorageContainerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + iothub_id=iothub_id, + resource_group_name=resource_group_name, + authentication_type=authentication_type, + batch_frequency_in_seconds=batch_frequency_in_seconds, + connection_string=connection_string, + encoding=encoding, + endpoint_uri=endpoint_uri, + file_name_format=file_name_format, + identity_id=identity_id, + max_chunk_size_in_bytes=max_chunk_size_in_bytes, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[pulumi.Input[str]] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + authentication_type: Optional[pulumi.Input[str]] = None, + batch_frequency_in_seconds: Optional[pulumi.Input[int]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + endpoint_uri: Optional[pulumi.Input[str]] = None, + file_name_format: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + max_chunk_size_in_bytes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if iothub_id is None: + raise TypeError("Missing 'iothub_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if batch_frequency_in_seconds is None and 'batchFrequencyInSeconds' in kwargs: + batch_frequency_in_seconds = kwargs['batchFrequencyInSeconds'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if endpoint_uri is None and 'endpointUri' in kwargs: + endpoint_uri = kwargs['endpointUri'] + if file_name_format is None and 'fileNameFormat' in kwargs: + file_name_format = kwargs['fileNameFormat'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if max_chunk_size_in_bytes is None and 'maxChunkSizeInBytes' in kwargs: + max_chunk_size_in_bytes = kwargs['maxChunkSizeInBytes'] + + _setter("container_name", container_name) + _setter("iothub_id", iothub_id) + _setter("resource_group_name", resource_group_name) if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if batch_frequency_in_seconds is not None: - pulumi.set(__self__, "batch_frequency_in_seconds", batch_frequency_in_seconds) + _setter("batch_frequency_in_seconds", batch_frequency_in_seconds) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if endpoint_uri is not None: - pulumi.set(__self__, "endpoint_uri", endpoint_uri) + _setter("endpoint_uri", endpoint_uri) if file_name_format is not None: - pulumi.set(__self__, "file_name_format", file_name_format) + _setter("file_name_format", file_name_format) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if max_chunk_size_in_bytes is not None: - pulumi.set(__self__, "max_chunk_size_in_bytes", max_chunk_size_in_bytes) + _setter("max_chunk_size_in_bytes", max_chunk_size_in_bytes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="containerName") @@ -244,30 +303,83 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group under which the Storage Container has been created. Changing this forces a new resource to be created. """ + _EndpointStorageContainerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_type=authentication_type, + batch_frequency_in_seconds=batch_frequency_in_seconds, + connection_string=connection_string, + container_name=container_name, + encoding=encoding, + endpoint_uri=endpoint_uri, + file_name_format=file_name_format, + identity_id=identity_id, + iothub_id=iothub_id, + max_chunk_size_in_bytes=max_chunk_size_in_bytes, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_type: Optional[pulumi.Input[str]] = None, + batch_frequency_in_seconds: Optional[pulumi.Input[int]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + container_name: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + endpoint_uri: Optional[pulumi.Input[str]] = None, + file_name_format: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + max_chunk_size_in_bytes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if batch_frequency_in_seconds is None and 'batchFrequencyInSeconds' in kwargs: + batch_frequency_in_seconds = kwargs['batchFrequencyInSeconds'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if endpoint_uri is None and 'endpointUri' in kwargs: + endpoint_uri = kwargs['endpointUri'] + if file_name_format is None and 'fileNameFormat' in kwargs: + file_name_format = kwargs['fileNameFormat'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if max_chunk_size_in_bytes is None and 'maxChunkSizeInBytes' in kwargs: + max_chunk_size_in_bytes = kwargs['maxChunkSizeInBytes'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if batch_frequency_in_seconds is not None: - pulumi.set(__self__, "batch_frequency_in_seconds", batch_frequency_in_seconds) + _setter("batch_frequency_in_seconds", batch_frequency_in_seconds) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if container_name is not None: - pulumi.set(__self__, "container_name", container_name) + _setter("container_name", container_name) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if endpoint_uri is not None: - pulumi.set(__self__, "endpoint_uri", endpoint_uri) + _setter("endpoint_uri", endpoint_uri) if file_name_format is not None: - pulumi.set(__self__, "file_name_format", file_name_format) + _setter("file_name_format", file_name_format) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if iothub_id is not None: - pulumi.set(__self__, "iothub_id", iothub_id) + _setter("iothub_id", iothub_id) if max_chunk_size_in_bytes is not None: - pulumi.set(__self__, "max_chunk_size_in_bytes", max_chunk_size_in_bytes) + _setter("max_chunk_size_in_bytes", max_chunk_size_in_bytes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="authenticationType") @@ -559,6 +671,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EndpointStorageContainerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/enrichment.py b/sdk/python/pulumi_azure/iot/enrichment.py index 9127889520..acdd21a373 100644 --- a/sdk/python/pulumi_azure/iot/enrichment.py +++ b/sdk/python/pulumi_azure/iot/enrichment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EnrichmentArgs', 'Enrichment'] @@ -27,11 +27,46 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group under which the IoTHub resource is created. Changing this forces a new resource to be created. :param pulumi.Input[str] value: The value of the enrichment. Value can be any static string, the name of the IoT hub sending the message (use `$iothubname`) or information from the device twin (ex: `$twin.tags.latitude`) """ - pulumi.set(__self__, "endpoint_names", endpoint_names) - pulumi.set(__self__, "iothub_name", iothub_name) - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "value", value) + EnrichmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint_names=endpoint_names, + iothub_name=iothub_name, + key=key, + resource_group_name=resource_group_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + iothub_name: Optional[pulumi.Input[str]] = None, + key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_names is None and 'endpointNames' in kwargs: + endpoint_names = kwargs['endpointNames'] + if endpoint_names is None: + raise TypeError("Missing 'endpoint_names' argument") + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if iothub_name is None: + raise TypeError("Missing 'iothub_name' argument") + if key is None: + raise TypeError("Missing 'key' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("endpoint_names", endpoint_names) + _setter("iothub_name", iothub_name) + _setter("key", key) + _setter("resource_group_name", resource_group_name) + _setter("value", value) @property @pulumi.getter(name="endpointNames") @@ -110,16 +145,41 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group under which the IoTHub resource is created. Changing this forces a new resource to be created. :param pulumi.Input[str] value: The value of the enrichment. Value can be any static string, the name of the IoT hub sending the message (use `$iothubname`) or information from the device twin (ex: `$twin.tags.latitude`) """ + _EnrichmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint_names=endpoint_names, + iothub_name=iothub_name, + key=key, + resource_group_name=resource_group_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + iothub_name: Optional[pulumi.Input[str]] = None, + key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_names is None and 'endpointNames' in kwargs: + endpoint_names = kwargs['endpointNames'] + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if endpoint_names is not None: - pulumi.set(__self__, "endpoint_names", endpoint_names) + _setter("endpoint_names", endpoint_names) if iothub_name is not None: - pulumi.set(__self__, "iothub_name", iothub_name) + _setter("iothub_name", iothub_name) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="endpointNames") @@ -243,6 +303,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EnrichmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/fallback_route.py b/sdk/python/pulumi_azure/iot/fallback_route.py index 7e39f19402..0e34113c98 100644 --- a/sdk/python/pulumi_azure/iot/fallback_route.py +++ b/sdk/python/pulumi_azure/iot/fallback_route.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FallbackRouteArgs', 'FallbackRoute'] @@ -29,14 +29,49 @@ def __init__(__self__, *, :param pulumi.Input[str] condition: The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to `true` by default. For grammar, see: . :param pulumi.Input[str] source: The source that the routing rule is to be applied to. Possible values include: `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents`, `DeviceLifecycleEvents`, `DeviceMessages`, `DigitalTwinChangeEvents`, `Invalid`, `TwinChangeEvents`. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "endpoint_names", endpoint_names) - pulumi.set(__self__, "iothub_name", iothub_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + FallbackRouteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + endpoint_names=endpoint_names, + iothub_name=iothub_name, + resource_group_name=resource_group_name, + condition=condition, + source=source, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + endpoint_names: Optional[pulumi.Input[str]] = None, + iothub_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + condition: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if endpoint_names is None and 'endpointNames' in kwargs: + endpoint_names = kwargs['endpointNames'] + if endpoint_names is None: + raise TypeError("Missing 'endpoint_names' argument") + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if iothub_name is None: + raise TypeError("Missing 'iothub_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("enabled", enabled) + _setter("endpoint_names", endpoint_names) + _setter("iothub_name", iothub_name) + _setter("resource_group_name", resource_group_name) if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) @property @pulumi.getter @@ -129,18 +164,45 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group under which the IotHub Storage Container Endpoint resource has to be created. Changing this forces a new resource to be created. :param pulumi.Input[str] source: The source that the routing rule is to be applied to. Possible values include: `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents`, `DeviceLifecycleEvents`, `DeviceMessages`, `DigitalTwinChangeEvents`, `Invalid`, `TwinChangeEvents`. """ + _FallbackRouteState._configure( + lambda key, value: pulumi.set(__self__, key, value), + condition=condition, + enabled=enabled, + endpoint_names=endpoint_names, + iothub_name=iothub_name, + resource_group_name=resource_group_name, + source=source, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + condition: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + endpoint_names: Optional[pulumi.Input[str]] = None, + iothub_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_names is None and 'endpointNames' in kwargs: + endpoint_names = kwargs['endpointNames'] + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if endpoint_names is not None: - pulumi.set(__self__, "endpoint_names", endpoint_names) + _setter("endpoint_names", endpoint_names) if iothub_name is not None: - pulumi.set(__self__, "iothub_name", iothub_name) + _setter("iothub_name", iothub_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) @property @pulumi.getter @@ -286,6 +348,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FallbackRouteArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/file_upload.py b/sdk/python/pulumi_azure/iot/file_upload.py index 8ce7de74c0..41e92d6223 100644 --- a/sdk/python/pulumi_azure/iot/file_upload.py +++ b/sdk/python/pulumi_azure/iot/file_upload.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FileUploadArgs', 'FileUpload'] @@ -39,23 +39,78 @@ def __init__(__self__, *, :param pulumi.Input[bool] notifications_enabled: Used to specify whether file notifications are sent to IoT Hub on upload. Defaults to `false`. :param pulumi.Input[str] sas_ttl: The period of time for which the SAS URI generated by IoT Hub for file upload is valid, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 24 hours. Defaults to `PT1H`. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "iothub_id", iothub_id) + FileUploadArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + container_name=container_name, + iothub_id=iothub_id, + authentication_type=authentication_type, + default_ttl=default_ttl, + identity_id=identity_id, + lock_duration=lock_duration, + max_delivery_count=max_delivery_count, + notifications_enabled=notifications_enabled, + sas_ttl=sas_ttl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[pulumi.Input[str]] = None, + container_name: Optional[pulumi.Input[str]] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + authentication_type: Optional[pulumi.Input[str]] = None, + default_ttl: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + lock_duration: Optional[pulumi.Input[str]] = None, + max_delivery_count: Optional[pulumi.Input[int]] = None, + notifications_enabled: Optional[pulumi.Input[bool]] = None, + sas_ttl: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if iothub_id is None: + raise TypeError("Missing 'iothub_id' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if default_ttl is None and 'defaultTtl' in kwargs: + default_ttl = kwargs['defaultTtl'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if notifications_enabled is None and 'notificationsEnabled' in kwargs: + notifications_enabled = kwargs['notificationsEnabled'] + if sas_ttl is None and 'sasTtl' in kwargs: + sas_ttl = kwargs['sasTtl'] + + _setter("connection_string", connection_string) + _setter("container_name", container_name) + _setter("iothub_id", iothub_id) if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if default_ttl is not None: - pulumi.set(__self__, "default_ttl", default_ttl) + _setter("default_ttl", default_ttl) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) if notifications_enabled is not None: - pulumi.set(__self__, "notifications_enabled", notifications_enabled) + _setter("notifications_enabled", notifications_enabled) if sas_ttl is not None: - pulumi.set(__self__, "sas_ttl", sas_ttl) + _setter("sas_ttl", sas_ttl) @property @pulumi.getter(name="connectionString") @@ -208,26 +263,75 @@ def __init__(__self__, *, :param pulumi.Input[bool] notifications_enabled: Used to specify whether file notifications are sent to IoT Hub on upload. Defaults to `false`. :param pulumi.Input[str] sas_ttl: The period of time for which the SAS URI generated by IoT Hub for file upload is valid, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 24 hours. Defaults to `PT1H`. """ + _FileUploadState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_type=authentication_type, + connection_string=connection_string, + container_name=container_name, + default_ttl=default_ttl, + identity_id=identity_id, + iothub_id=iothub_id, + lock_duration=lock_duration, + max_delivery_count=max_delivery_count, + notifications_enabled=notifications_enabled, + sas_ttl=sas_ttl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_type: Optional[pulumi.Input[str]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + container_name: Optional[pulumi.Input[str]] = None, + default_ttl: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + lock_duration: Optional[pulumi.Input[str]] = None, + max_delivery_count: Optional[pulumi.Input[int]] = None, + notifications_enabled: Optional[pulumi.Input[bool]] = None, + sas_ttl: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if default_ttl is None and 'defaultTtl' in kwargs: + default_ttl = kwargs['defaultTtl'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if notifications_enabled is None and 'notificationsEnabled' in kwargs: + notifications_enabled = kwargs['notificationsEnabled'] + if sas_ttl is None and 'sasTtl' in kwargs: + sas_ttl = kwargs['sasTtl'] + if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if container_name is not None: - pulumi.set(__self__, "container_name", container_name) + _setter("container_name", container_name) if default_ttl is not None: - pulumi.set(__self__, "default_ttl", default_ttl) + _setter("default_ttl", default_ttl) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if iothub_id is not None: - pulumi.set(__self__, "iothub_id", iothub_id) + _setter("iothub_id", iothub_id) if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) if notifications_enabled is not None: - pulumi.set(__self__, "notifications_enabled", notifications_enabled) + _setter("notifications_enabled", notifications_enabled) if sas_ttl is not None: - pulumi.set(__self__, "sas_ttl", sas_ttl) + _setter("sas_ttl", sas_ttl) @property @pulumi.getter(name="authenticationType") @@ -481,6 +585,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FileUploadArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/get_dps.py b/sdk/python/pulumi_azure/iot/get_dps.py index 12ef16243b..dc55162d1e 100644 --- a/sdk/python/pulumi_azure/iot/get_dps.py +++ b/sdk/python/pulumi_azure/iot/get_dps.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/iot/get_dps_shared_access_policy.py b/sdk/python/pulumi_azure/iot/get_dps_shared_access_policy.py index 89314abf30..6980e1b027 100644 --- a/sdk/python/pulumi_azure/iot/get_dps_shared_access_policy.py +++ b/sdk/python/pulumi_azure/iot/get_dps_shared_access_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/iot/get_iot_hub.py b/sdk/python/pulumi_azure/iot/get_iot_hub.py index 84ece45aa4..f2bb6aa628 100644 --- a/sdk/python/pulumi_azure/iot/get_iot_hub.py +++ b/sdk/python/pulumi_azure/iot/get_iot_hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/iot/get_shared_access_policy.py b/sdk/python/pulumi_azure/iot/get_shared_access_policy.py index fc7eb82824..7f3ca279b6 100644 --- a/sdk/python/pulumi_azure/iot/get_shared_access_policy.py +++ b/sdk/python/pulumi_azure/iot/get_shared_access_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/iot/io_t_hub.py b/sdk/python/pulumi_azure/iot/io_t_hub.py index 60c9b1881b..03025bbb2a 100644 --- a/sdk/python/pulumi_azure/iot/io_t_hub.py +++ b/sdk/python/pulumi_azure/iot/io_t_hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -57,40 +57,109 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['IoTHubRouteArgs']]] routes: A `route` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + IoTHubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + cloud_to_device=cloud_to_device, + endpoints=endpoints, + enrichments=enrichments, + event_hub_partition_count=event_hub_partition_count, + event_hub_retention_in_days=event_hub_retention_in_days, + fallback_route=fallback_route, + file_upload=file_upload, + identity=identity, + local_authentication_enabled=local_authentication_enabled, + location=location, + min_tls_version=min_tls_version, + name=name, + network_rule_sets=network_rule_sets, + public_network_access_enabled=public_network_access_enabled, + routes=routes, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['IoTHubSkuArgs']] = None, + cloud_to_device: Optional[pulumi.Input['IoTHubCloudToDeviceArgs']] = None, + endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['IoTHubEndpointArgs']]]] = None, + enrichments: Optional[pulumi.Input[Sequence[pulumi.Input['IoTHubEnrichmentArgs']]]] = None, + event_hub_partition_count: Optional[pulumi.Input[int]] = None, + event_hub_retention_in_days: Optional[pulumi.Input[int]] = None, + fallback_route: Optional[pulumi.Input['IoTHubFallbackRouteArgs']] = None, + file_upload: Optional[pulumi.Input['IoTHubFileUploadArgs']] = None, + identity: Optional[pulumi.Input['IoTHubIdentityArgs']] = None, + local_authentication_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + min_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_rule_sets: Optional[pulumi.Input[Sequence[pulumi.Input['IoTHubNetworkRuleSetArgs']]]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + routes: Optional[pulumi.Input[Sequence[pulumi.Input['IoTHubRouteArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if cloud_to_device is None and 'cloudToDevice' in kwargs: + cloud_to_device = kwargs['cloudToDevice'] + if event_hub_partition_count is None and 'eventHubPartitionCount' in kwargs: + event_hub_partition_count = kwargs['eventHubPartitionCount'] + if event_hub_retention_in_days is None and 'eventHubRetentionInDays' in kwargs: + event_hub_retention_in_days = kwargs['eventHubRetentionInDays'] + if fallback_route is None and 'fallbackRoute' in kwargs: + fallback_route = kwargs['fallbackRoute'] + if file_upload is None and 'fileUpload' in kwargs: + file_upload = kwargs['fileUpload'] + if local_authentication_enabled is None and 'localAuthenticationEnabled' in kwargs: + local_authentication_enabled = kwargs['localAuthenticationEnabled'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if network_rule_sets is None and 'networkRuleSets' in kwargs: + network_rule_sets = kwargs['networkRuleSets'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if cloud_to_device is not None: - pulumi.set(__self__, "cloud_to_device", cloud_to_device) + _setter("cloud_to_device", cloud_to_device) if endpoints is not None: - pulumi.set(__self__, "endpoints", endpoints) + _setter("endpoints", endpoints) if enrichments is not None: - pulumi.set(__self__, "enrichments", enrichments) + _setter("enrichments", enrichments) if event_hub_partition_count is not None: - pulumi.set(__self__, "event_hub_partition_count", event_hub_partition_count) + _setter("event_hub_partition_count", event_hub_partition_count) if event_hub_retention_in_days is not None: - pulumi.set(__self__, "event_hub_retention_in_days", event_hub_retention_in_days) + _setter("event_hub_retention_in_days", event_hub_retention_in_days) if fallback_route is not None: - pulumi.set(__self__, "fallback_route", fallback_route) + _setter("fallback_route", fallback_route) if file_upload is not None: - pulumi.set(__self__, "file_upload", file_upload) + _setter("file_upload", file_upload) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_authentication_enabled is not None: - pulumi.set(__self__, "local_authentication_enabled", local_authentication_enabled) + _setter("local_authentication_enabled", local_authentication_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_rule_sets is not None: - pulumi.set(__self__, "network_rule_sets", network_rule_sets) + _setter("network_rule_sets", network_rule_sets) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if routes is not None: - pulumi.set(__self__, "routes", routes) + _setter("routes", routes) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -371,58 +440,151 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] type: The type of the endpoint. Possible values are `AzureIotHub.StorageContainer`, `AzureIotHub.ServiceBusQueue`, `AzureIotHub.ServiceBusTopic` or `AzureIotHub.EventHub`. """ + _IoTHubState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cloud_to_device=cloud_to_device, + endpoints=endpoints, + enrichments=enrichments, + event_hub_events_endpoint=event_hub_events_endpoint, + event_hub_events_namespace=event_hub_events_namespace, + event_hub_events_path=event_hub_events_path, + event_hub_operations_endpoint=event_hub_operations_endpoint, + event_hub_operations_path=event_hub_operations_path, + event_hub_partition_count=event_hub_partition_count, + event_hub_retention_in_days=event_hub_retention_in_days, + fallback_route=fallback_route, + file_upload=file_upload, + hostname=hostname, + identity=identity, + local_authentication_enabled=local_authentication_enabled, + location=location, + min_tls_version=min_tls_version, + name=name, + network_rule_sets=network_rule_sets, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + routes=routes, + shared_access_policies=shared_access_policies, + sku=sku, + tags=tags, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cloud_to_device: Optional[pulumi.Input['IoTHubCloudToDeviceArgs']] = None, + endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['IoTHubEndpointArgs']]]] = None, + enrichments: Optional[pulumi.Input[Sequence[pulumi.Input['IoTHubEnrichmentArgs']]]] = None, + event_hub_events_endpoint: Optional[pulumi.Input[str]] = None, + event_hub_events_namespace: Optional[pulumi.Input[str]] = None, + event_hub_events_path: Optional[pulumi.Input[str]] = None, + event_hub_operations_endpoint: Optional[pulumi.Input[str]] = None, + event_hub_operations_path: Optional[pulumi.Input[str]] = None, + event_hub_partition_count: Optional[pulumi.Input[int]] = None, + event_hub_retention_in_days: Optional[pulumi.Input[int]] = None, + fallback_route: Optional[pulumi.Input['IoTHubFallbackRouteArgs']] = None, + file_upload: Optional[pulumi.Input['IoTHubFileUploadArgs']] = None, + hostname: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['IoTHubIdentityArgs']] = None, + local_authentication_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + min_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_rule_sets: Optional[pulumi.Input[Sequence[pulumi.Input['IoTHubNetworkRuleSetArgs']]]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + routes: Optional[pulumi.Input[Sequence[pulumi.Input['IoTHubRouteArgs']]]] = None, + shared_access_policies: Optional[pulumi.Input[Sequence[pulumi.Input['IoTHubSharedAccessPolicyArgs']]]] = None, + sku: Optional[pulumi.Input['IoTHubSkuArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cloud_to_device is None and 'cloudToDevice' in kwargs: + cloud_to_device = kwargs['cloudToDevice'] + if event_hub_events_endpoint is None and 'eventHubEventsEndpoint' in kwargs: + event_hub_events_endpoint = kwargs['eventHubEventsEndpoint'] + if event_hub_events_namespace is None and 'eventHubEventsNamespace' in kwargs: + event_hub_events_namespace = kwargs['eventHubEventsNamespace'] + if event_hub_events_path is None and 'eventHubEventsPath' in kwargs: + event_hub_events_path = kwargs['eventHubEventsPath'] + if event_hub_operations_endpoint is None and 'eventHubOperationsEndpoint' in kwargs: + event_hub_operations_endpoint = kwargs['eventHubOperationsEndpoint'] + if event_hub_operations_path is None and 'eventHubOperationsPath' in kwargs: + event_hub_operations_path = kwargs['eventHubOperationsPath'] + if event_hub_partition_count is None and 'eventHubPartitionCount' in kwargs: + event_hub_partition_count = kwargs['eventHubPartitionCount'] + if event_hub_retention_in_days is None and 'eventHubRetentionInDays' in kwargs: + event_hub_retention_in_days = kwargs['eventHubRetentionInDays'] + if fallback_route is None and 'fallbackRoute' in kwargs: + fallback_route = kwargs['fallbackRoute'] + if file_upload is None and 'fileUpload' in kwargs: + file_upload = kwargs['fileUpload'] + if local_authentication_enabled is None and 'localAuthenticationEnabled' in kwargs: + local_authentication_enabled = kwargs['localAuthenticationEnabled'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if network_rule_sets is None and 'networkRuleSets' in kwargs: + network_rule_sets = kwargs['networkRuleSets'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if shared_access_policies is None and 'sharedAccessPolicies' in kwargs: + shared_access_policies = kwargs['sharedAccessPolicies'] + if cloud_to_device is not None: - pulumi.set(__self__, "cloud_to_device", cloud_to_device) + _setter("cloud_to_device", cloud_to_device) if endpoints is not None: - pulumi.set(__self__, "endpoints", endpoints) + _setter("endpoints", endpoints) if enrichments is not None: - pulumi.set(__self__, "enrichments", enrichments) + _setter("enrichments", enrichments) if event_hub_events_endpoint is not None: - pulumi.set(__self__, "event_hub_events_endpoint", event_hub_events_endpoint) + _setter("event_hub_events_endpoint", event_hub_events_endpoint) if event_hub_events_namespace is not None: - pulumi.set(__self__, "event_hub_events_namespace", event_hub_events_namespace) + _setter("event_hub_events_namespace", event_hub_events_namespace) if event_hub_events_path is not None: - pulumi.set(__self__, "event_hub_events_path", event_hub_events_path) + _setter("event_hub_events_path", event_hub_events_path) if event_hub_operations_endpoint is not None: - pulumi.set(__self__, "event_hub_operations_endpoint", event_hub_operations_endpoint) + _setter("event_hub_operations_endpoint", event_hub_operations_endpoint) if event_hub_operations_path is not None: - pulumi.set(__self__, "event_hub_operations_path", event_hub_operations_path) + _setter("event_hub_operations_path", event_hub_operations_path) if event_hub_partition_count is not None: - pulumi.set(__self__, "event_hub_partition_count", event_hub_partition_count) + _setter("event_hub_partition_count", event_hub_partition_count) if event_hub_retention_in_days is not None: - pulumi.set(__self__, "event_hub_retention_in_days", event_hub_retention_in_days) + _setter("event_hub_retention_in_days", event_hub_retention_in_days) if fallback_route is not None: - pulumi.set(__self__, "fallback_route", fallback_route) + _setter("fallback_route", fallback_route) if file_upload is not None: - pulumi.set(__self__, "file_upload", file_upload) + _setter("file_upload", file_upload) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_authentication_enabled is not None: - pulumi.set(__self__, "local_authentication_enabled", local_authentication_enabled) + _setter("local_authentication_enabled", local_authentication_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_rule_sets is not None: - pulumi.set(__self__, "network_rule_sets", network_rule_sets) + _setter("network_rule_sets", network_rule_sets) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if routes is not None: - pulumi.set(__self__, "routes", routes) + _setter("routes", routes) if shared_access_policies is not None: - pulumi.set(__self__, "shared_access_policies", shared_access_policies) + _setter("shared_access_policies", shared_access_policies) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="cloudToDevice") @@ -1028,6 +1190,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IoTHubArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1060,13 +1226,33 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = IoTHubArgs.__new__(IoTHubArgs) + if cloud_to_device is not None and not isinstance(cloud_to_device, IoTHubCloudToDeviceArgs): + cloud_to_device = cloud_to_device or {} + def _setter(key, value): + cloud_to_device[key] = value + IoTHubCloudToDeviceArgs._configure(_setter, **cloud_to_device) __props__.__dict__["cloud_to_device"] = cloud_to_device __props__.__dict__["endpoints"] = endpoints __props__.__dict__["enrichments"] = enrichments __props__.__dict__["event_hub_partition_count"] = event_hub_partition_count __props__.__dict__["event_hub_retention_in_days"] = event_hub_retention_in_days + if fallback_route is not None and not isinstance(fallback_route, IoTHubFallbackRouteArgs): + fallback_route = fallback_route or {} + def _setter(key, value): + fallback_route[key] = value + IoTHubFallbackRouteArgs._configure(_setter, **fallback_route) __props__.__dict__["fallback_route"] = fallback_route + if file_upload is not None and not isinstance(file_upload, IoTHubFileUploadArgs): + file_upload = file_upload or {} + def _setter(key, value): + file_upload[key] = value + IoTHubFileUploadArgs._configure(_setter, **file_upload) __props__.__dict__["file_upload"] = file_upload + if identity is not None and not isinstance(identity, IoTHubIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + IoTHubIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["local_authentication_enabled"] = local_authentication_enabled __props__.__dict__["location"] = location @@ -1078,6 +1264,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["routes"] = routes + if sku is not None and not isinstance(sku, IoTHubSkuArgs): + sku = sku or {} + def _setter(key, value): + sku[key] = value + IoTHubSkuArgs._configure(_setter, **sku) if sku is None and not opts.urn: raise TypeError("Missing required property 'sku'") __props__.__dict__["sku"] = sku diff --git a/sdk/python/pulumi_azure/iot/iot_hub_certificate.py b/sdk/python/pulumi_azure/iot/iot_hub_certificate.py index ade443d4e4..24c802f212 100644 --- a/sdk/python/pulumi_azure/iot/iot_hub_certificate.py +++ b/sdk/python/pulumi_azure/iot/iot_hub_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IotHubCertificateArgs', 'IotHubCertificate'] @@ -27,13 +27,46 @@ def __init__(__self__, *, :param pulumi.Input[bool] is_verified: Specifies if the certificate is created in verified state. Defaults to `false`. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the Iot Device Provisioning Service Certificate resource. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "certificate_content", certificate_content) - pulumi.set(__self__, "iot_dps_name", iot_dps_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IotHubCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_content=certificate_content, + iot_dps_name=iot_dps_name, + resource_group_name=resource_group_name, + is_verified=is_verified, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_content: Optional[pulumi.Input[str]] = None, + iot_dps_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + is_verified: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_content is None and 'certificateContent' in kwargs: + certificate_content = kwargs['certificateContent'] + if certificate_content is None: + raise TypeError("Missing 'certificate_content' argument") + if iot_dps_name is None and 'iotDpsName' in kwargs: + iot_dps_name = kwargs['iotDpsName'] + if iot_dps_name is None: + raise TypeError("Missing 'iot_dps_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if is_verified is None and 'isVerified' in kwargs: + is_verified = kwargs['isVerified'] + + _setter("certificate_content", certificate_content) + _setter("iot_dps_name", iot_dps_name) + _setter("resource_group_name", resource_group_name) if is_verified is not None: - pulumi.set(__self__, "is_verified", is_verified) + _setter("is_verified", is_verified) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="certificateContent") @@ -112,16 +145,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Iot Device Provisioning Service Certificate resource. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group under which the Iot Device Provisioning Service Certificate resource has to be created. Changing this forces a new resource to be created. """ + _IotHubCertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_content=certificate_content, + iot_dps_name=iot_dps_name, + is_verified=is_verified, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_content: Optional[pulumi.Input[str]] = None, + iot_dps_name: Optional[pulumi.Input[str]] = None, + is_verified: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_content is None and 'certificateContent' in kwargs: + certificate_content = kwargs['certificateContent'] + if iot_dps_name is None and 'iotDpsName' in kwargs: + iot_dps_name = kwargs['iotDpsName'] + if is_verified is None and 'isVerified' in kwargs: + is_verified = kwargs['isVerified'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if certificate_content is not None: - pulumi.set(__self__, "certificate_content", certificate_content) + _setter("certificate_content", certificate_content) if iot_dps_name is not None: - pulumi.set(__self__, "iot_dps_name", iot_dps_name) + _setter("iot_dps_name", iot_dps_name) if is_verified is not None: - pulumi.set(__self__, "is_verified", is_verified) + _setter("is_verified", is_verified) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="certificateContent") @@ -283,6 +343,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IotHubCertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/iot_hub_device_update_account.py b/sdk/python/pulumi_azure/iot/iot_hub_device_update_account.py index 894494c290..de9758a0cb 100644 --- a/sdk/python/pulumi_azure/iot/iot_hub_device_update_account.py +++ b/sdk/python/pulumi_azure/iot/iot_hub_device_update_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,19 +33,48 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: Sku of the IoT Hub Device Update Account. Possible values are `Free` and `Standard`. Defaults to `Standard`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the IoT Hub Device Update Account. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + IotHubDeviceUpdateAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + identity=identity, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + sku=sku, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['IotHubDeviceUpdateAccountIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -154,22 +183,53 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: Sku of the IoT Hub Device Update Account. Possible values are `Free` and `Standard`. Defaults to `Standard`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the IoT Hub Device Update Account. """ + _IotHubDeviceUpdateAccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_name=host_name, + identity=identity, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + sku=sku, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['IotHubDeviceUpdateAccountIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="hostName") @@ -365,6 +425,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IotHubDeviceUpdateAccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -386,6 +450,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = IotHubDeviceUpdateAccountArgs.__new__(IotHubDeviceUpdateAccountArgs) + if identity is not None and not isinstance(identity, IotHubDeviceUpdateAccountIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + IotHubDeviceUpdateAccountIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/iot/iot_hub_device_update_instance.py b/sdk/python/pulumi_azure/iot/iot_hub_device_update_instance.py index 1f2e8d8121..bfb8ac7820 100644 --- a/sdk/python/pulumi_azure/iot/iot_hub_device_update_instance.py +++ b/sdk/python/pulumi_azure/iot/iot_hub_device_update_instance.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,16 +31,49 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this IoT Hub Device Update Instance. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the IoT Hub Device Update Instance. """ - pulumi.set(__self__, "device_update_account_id", device_update_account_id) - pulumi.set(__self__, "iothub_id", iothub_id) + IotHubDeviceUpdateInstanceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + device_update_account_id=device_update_account_id, + iothub_id=iothub_id, + diagnostic_enabled=diagnostic_enabled, + diagnostic_storage_account=diagnostic_storage_account, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + device_update_account_id: Optional[pulumi.Input[str]] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + diagnostic_enabled: Optional[pulumi.Input[bool]] = None, + diagnostic_storage_account: Optional[pulumi.Input['IotHubDeviceUpdateInstanceDiagnosticStorageAccountArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if device_update_account_id is None and 'deviceUpdateAccountId' in kwargs: + device_update_account_id = kwargs['deviceUpdateAccountId'] + if device_update_account_id is None: + raise TypeError("Missing 'device_update_account_id' argument") + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if iothub_id is None: + raise TypeError("Missing 'iothub_id' argument") + if diagnostic_enabled is None and 'diagnosticEnabled' in kwargs: + diagnostic_enabled = kwargs['diagnosticEnabled'] + if diagnostic_storage_account is None and 'diagnosticStorageAccount' in kwargs: + diagnostic_storage_account = kwargs['diagnosticStorageAccount'] + + _setter("device_update_account_id", device_update_account_id) + _setter("iothub_id", iothub_id) if diagnostic_enabled is not None: - pulumi.set(__self__, "diagnostic_enabled", diagnostic_enabled) + _setter("diagnostic_enabled", diagnostic_enabled) if diagnostic_storage_account is not None: - pulumi.set(__self__, "diagnostic_storage_account", diagnostic_storage_account) + _setter("diagnostic_storage_account", diagnostic_storage_account) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="deviceUpdateAccountId") @@ -133,18 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this IoT Hub Device Update Instance. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the IoT Hub Device Update Instance. """ + _IotHubDeviceUpdateInstanceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + device_update_account_id=device_update_account_id, + diagnostic_enabled=diagnostic_enabled, + diagnostic_storage_account=diagnostic_storage_account, + iothub_id=iothub_id, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + device_update_account_id: Optional[pulumi.Input[str]] = None, + diagnostic_enabled: Optional[pulumi.Input[bool]] = None, + diagnostic_storage_account: Optional[pulumi.Input['IotHubDeviceUpdateInstanceDiagnosticStorageAccountArgs']] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if device_update_account_id is None and 'deviceUpdateAccountId' in kwargs: + device_update_account_id = kwargs['deviceUpdateAccountId'] + if diagnostic_enabled is None and 'diagnosticEnabled' in kwargs: + diagnostic_enabled = kwargs['diagnosticEnabled'] + if diagnostic_storage_account is None and 'diagnosticStorageAccount' in kwargs: + diagnostic_storage_account = kwargs['diagnosticStorageAccount'] + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if device_update_account_id is not None: - pulumi.set(__self__, "device_update_account_id", device_update_account_id) + _setter("device_update_account_id", device_update_account_id) if diagnostic_enabled is not None: - pulumi.set(__self__, "diagnostic_enabled", diagnostic_enabled) + _setter("diagnostic_enabled", diagnostic_enabled) if diagnostic_storage_account is not None: - pulumi.set(__self__, "diagnostic_storage_account", diagnostic_storage_account) + _setter("diagnostic_storage_account", diagnostic_storage_account) if iothub_id is not None: - pulumi.set(__self__, "iothub_id", iothub_id) + _setter("iothub_id", iothub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="deviceUpdateAccountId") @@ -348,6 +410,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IotHubDeviceUpdateInstanceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -372,6 +438,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'device_update_account_id'") __props__.__dict__["device_update_account_id"] = device_update_account_id __props__.__dict__["diagnostic_enabled"] = diagnostic_enabled + if diagnostic_storage_account is not None and not isinstance(diagnostic_storage_account, IotHubDeviceUpdateInstanceDiagnosticStorageAccountArgs): + diagnostic_storage_account = diagnostic_storage_account or {} + def _setter(key, value): + diagnostic_storage_account[key] = value + IotHubDeviceUpdateInstanceDiagnosticStorageAccountArgs._configure(_setter, **diagnostic_storage_account) __props__.__dict__["diagnostic_storage_account"] = diagnostic_storage_account if iothub_id is None and not opts.urn: raise TypeError("Missing required property 'iothub_id'") diff --git a/sdk/python/pulumi_azure/iot/iot_hub_dps.py b/sdk/python/pulumi_azure/iot/iot_hub_dps.py index 29c4580232..b98a0a0aa9 100644 --- a/sdk/python/pulumi_azure/iot/iot_hub_dps.py +++ b/sdk/python/pulumi_azure/iot/iot_hub_dps.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,24 +39,69 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether requests from Public Network are allowed. Defaults to `true`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + IotHubDpsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + allocation_policy=allocation_policy, + data_residency_enabled=data_residency_enabled, + ip_filter_rules=ip_filter_rules, + linked_hubs=linked_hubs, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['IotHubDpsSkuArgs']] = None, + allocation_policy: Optional[pulumi.Input[str]] = None, + data_residency_enabled: Optional[pulumi.Input[bool]] = None, + ip_filter_rules: Optional[pulumi.Input[Sequence[pulumi.Input['IotHubDpsIpFilterRuleArgs']]]] = None, + linked_hubs: Optional[pulumi.Input[Sequence[pulumi.Input['IotHubDpsLinkedHubArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if allocation_policy is None and 'allocationPolicy' in kwargs: + allocation_policy = kwargs['allocationPolicy'] + if data_residency_enabled is None and 'dataResidencyEnabled' in kwargs: + data_residency_enabled = kwargs['dataResidencyEnabled'] + if ip_filter_rules is None and 'ipFilterRules' in kwargs: + ip_filter_rules = kwargs['ipFilterRules'] + if linked_hubs is None and 'linkedHubs' in kwargs: + linked_hubs = kwargs['linkedHubs'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if allocation_policy is not None: - pulumi.set(__self__, "allocation_policy", allocation_policy) + _setter("allocation_policy", allocation_policy) if data_residency_enabled is not None: - pulumi.set(__self__, "data_residency_enabled", data_residency_enabled) + _setter("data_residency_enabled", data_residency_enabled) if ip_filter_rules is not None: - pulumi.set(__self__, "ip_filter_rules", ip_filter_rules) + _setter("ip_filter_rules", ip_filter_rules) if linked_hubs is not None: - pulumi.set(__self__, "linked_hubs", linked_hubs) + _setter("linked_hubs", linked_hubs) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -211,32 +256,85 @@ def __init__(__self__, *, :param pulumi.Input['IotHubDpsSkuArgs'] sku: A `sku` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _IotHubDpsState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allocation_policy=allocation_policy, + data_residency_enabled=data_residency_enabled, + device_provisioning_host_name=device_provisioning_host_name, + id_scope=id_scope, + ip_filter_rules=ip_filter_rules, + linked_hubs=linked_hubs, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + service_operations_host_name=service_operations_host_name, + sku=sku, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allocation_policy: Optional[pulumi.Input[str]] = None, + data_residency_enabled: Optional[pulumi.Input[bool]] = None, + device_provisioning_host_name: Optional[pulumi.Input[str]] = None, + id_scope: Optional[pulumi.Input[str]] = None, + ip_filter_rules: Optional[pulumi.Input[Sequence[pulumi.Input['IotHubDpsIpFilterRuleArgs']]]] = None, + linked_hubs: Optional[pulumi.Input[Sequence[pulumi.Input['IotHubDpsLinkedHubArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_operations_host_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['IotHubDpsSkuArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allocation_policy is None and 'allocationPolicy' in kwargs: + allocation_policy = kwargs['allocationPolicy'] + if data_residency_enabled is None and 'dataResidencyEnabled' in kwargs: + data_residency_enabled = kwargs['dataResidencyEnabled'] + if device_provisioning_host_name is None and 'deviceProvisioningHostName' in kwargs: + device_provisioning_host_name = kwargs['deviceProvisioningHostName'] + if id_scope is None and 'idScope' in kwargs: + id_scope = kwargs['idScope'] + if ip_filter_rules is None and 'ipFilterRules' in kwargs: + ip_filter_rules = kwargs['ipFilterRules'] + if linked_hubs is None and 'linkedHubs' in kwargs: + linked_hubs = kwargs['linkedHubs'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_operations_host_name is None and 'serviceOperationsHostName' in kwargs: + service_operations_host_name = kwargs['serviceOperationsHostName'] + if allocation_policy is not None: - pulumi.set(__self__, "allocation_policy", allocation_policy) + _setter("allocation_policy", allocation_policy) if data_residency_enabled is not None: - pulumi.set(__self__, "data_residency_enabled", data_residency_enabled) + _setter("data_residency_enabled", data_residency_enabled) if device_provisioning_host_name is not None: - pulumi.set(__self__, "device_provisioning_host_name", device_provisioning_host_name) + _setter("device_provisioning_host_name", device_provisioning_host_name) if id_scope is not None: - pulumi.set(__self__, "id_scope", id_scope) + _setter("id_scope", id_scope) if ip_filter_rules is not None: - pulumi.set(__self__, "ip_filter_rules", ip_filter_rules) + _setter("ip_filter_rules", ip_filter_rules) if linked_hubs is not None: - pulumi.set(__self__, "linked_hubs", linked_hubs) + _setter("linked_hubs", linked_hubs) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_operations_host_name is not None: - pulumi.set(__self__, "service_operations_host_name", service_operations_host_name) + _setter("service_operations_host_name", service_operations_host_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="allocationPolicy") @@ -496,6 +594,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IotHubDpsArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -530,6 +632,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if sku is not None and not isinstance(sku, IotHubDpsSkuArgs): + sku = sku or {} + def _setter(key, value): + sku[key] = value + IotHubDpsSkuArgs._configure(_setter, **sku) if sku is None and not opts.urn: raise TypeError("Missing required property 'sku'") __props__.__dict__["sku"] = sku diff --git a/sdk/python/pulumi_azure/iot/outputs.py b/sdk/python/pulumi_azure/iot/outputs.py index 35a560075e..aa15d98d3b 100644 --- a/sdk/python/pulumi_azure/iot/outputs.py +++ b/sdk/python/pulumi_azure/iot/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -67,12 +67,31 @@ def __init__(__self__, *, :param Sequence['IoTHubCloudToDeviceFeedbackArgs'] feedbacks: A `feedback` block as defined below. :param int max_delivery_count: The maximum delivery count for cloud-to-device per-device queues. This value must be between `1` and `100`. Defaults to `10`. """ + IoTHubCloudToDevice._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_ttl=default_ttl, + feedbacks=feedbacks, + max_delivery_count=max_delivery_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_ttl: Optional[str] = None, + feedbacks: Optional[Sequence['outputs.IoTHubCloudToDeviceFeedback']] = None, + max_delivery_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_ttl is None and 'defaultTtl' in kwargs: + default_ttl = kwargs['defaultTtl'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if default_ttl is not None: - pulumi.set(__self__, "default_ttl", default_ttl) + _setter("default_ttl", default_ttl) if feedbacks is not None: - pulumi.set(__self__, "feedbacks", feedbacks) + _setter("feedbacks", feedbacks) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) @property @pulumi.getter(name="defaultTtl") @@ -131,12 +150,33 @@ def __init__(__self__, *, :param int max_delivery_count: The maximum delivery count for the feedback queue. This value must be between `1` and `100`. Defaults to `10`. :param str time_to_live: The retention time for service-bound feedback messages, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. """ + IoTHubCloudToDeviceFeedback._configure( + lambda key, value: pulumi.set(__self__, key, value), + lock_duration=lock_duration, + max_delivery_count=max_delivery_count, + time_to_live=time_to_live, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + lock_duration: Optional[str] = None, + max_delivery_count: Optional[int] = None, + time_to_live: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if time_to_live is None and 'timeToLive' in kwargs: + time_to_live = kwargs['timeToLive'] + if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) if time_to_live is not None: - pulumi.set(__self__, "time_to_live", time_to_live) + _setter("time_to_live", time_to_live) @property @pulumi.getter(name="lockDuration") @@ -233,30 +273,89 @@ def __init__(__self__, *, :param int max_chunk_size_in_bytes: Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. :param str resource_group_name: The resource group in which the endpoint will be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + IoTHubEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + authentication_type=authentication_type, + batch_frequency_in_seconds=batch_frequency_in_seconds, + connection_string=connection_string, + container_name=container_name, + encoding=encoding, + endpoint_uri=endpoint_uri, + entity_path=entity_path, + file_name_format=file_name_format, + identity_id=identity_id, + max_chunk_size_in_bytes=max_chunk_size_in_bytes, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + authentication_type: Optional[str] = None, + batch_frequency_in_seconds: Optional[int] = None, + connection_string: Optional[str] = None, + container_name: Optional[str] = None, + encoding: Optional[str] = None, + endpoint_uri: Optional[str] = None, + entity_path: Optional[str] = None, + file_name_format: Optional[str] = None, + identity_id: Optional[str] = None, + max_chunk_size_in_bytes: Optional[int] = None, + resource_group_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if batch_frequency_in_seconds is None and 'batchFrequencyInSeconds' in kwargs: + batch_frequency_in_seconds = kwargs['batchFrequencyInSeconds'] + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if endpoint_uri is None and 'endpointUri' in kwargs: + endpoint_uri = kwargs['endpointUri'] + if entity_path is None and 'entityPath' in kwargs: + entity_path = kwargs['entityPath'] + if file_name_format is None and 'fileNameFormat' in kwargs: + file_name_format = kwargs['fileNameFormat'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if max_chunk_size_in_bytes is None and 'maxChunkSizeInBytes' in kwargs: + max_chunk_size_in_bytes = kwargs['maxChunkSizeInBytes'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + + _setter("name", name) + _setter("type", type) if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if batch_frequency_in_seconds is not None: - pulumi.set(__self__, "batch_frequency_in_seconds", batch_frequency_in_seconds) + _setter("batch_frequency_in_seconds", batch_frequency_in_seconds) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if container_name is not None: - pulumi.set(__self__, "container_name", container_name) + _setter("container_name", container_name) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if endpoint_uri is not None: - pulumi.set(__self__, "endpoint_uri", endpoint_uri) + _setter("endpoint_uri", endpoint_uri) if entity_path is not None: - pulumi.set(__self__, "entity_path", entity_path) + _setter("entity_path", entity_path) if file_name_format is not None: - pulumi.set(__self__, "file_name_format", file_name_format) + _setter("file_name_format", file_name_format) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if max_chunk_size_in_bytes is not None: - pulumi.set(__self__, "max_chunk_size_in_bytes", max_chunk_size_in_bytes) + _setter("max_chunk_size_in_bytes", max_chunk_size_in_bytes) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter @@ -395,9 +494,32 @@ def __init__(__self__, *, :param str key: The key of the enrichment. :param str value: The value of the enrichment. Value can be any static string, the name of the IoT Hub sending the message (use `$iothubname`) or information from the device twin (ex: `$twin.tags.latitude`) """ - pulumi.set(__self__, "endpoint_names", endpoint_names) - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "value", value) + IoTHubEnrichment._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint_names=endpoint_names, + key=key, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint_names: Optional[Sequence[str]] = None, + key: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_names is None and 'endpointNames' in kwargs: + endpoint_names = kwargs['endpointNames'] + if endpoint_names is None: + raise TypeError("Missing 'endpoint_names' argument") + if key is None: + raise TypeError("Missing 'key' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("endpoint_names", endpoint_names) + _setter("key", key) + _setter("value", value) @property @pulumi.getter(name="endpointNames") @@ -454,14 +576,33 @@ def __init__(__self__, *, :param Sequence[str] endpoint_names: The endpoints to which messages that satisfy the condition are routed. Currently only 1 endpoint is allowed. :param str source: The source that the routing rule is to be applied to, such as `DeviceMessages`. Possible values include: `Invalid`, `DeviceMessages`, `TwinChangeEvents`, `DeviceLifecycleEvents`, `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents` and `DigitalTwinChangeEvents`. """ + IoTHubFallbackRoute._configure( + lambda key, value: pulumi.set(__self__, key, value), + condition=condition, + enabled=enabled, + endpoint_names=endpoint_names, + source=source, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + condition: Optional[str] = None, + enabled: Optional[bool] = None, + endpoint_names: Optional[Sequence[str]] = None, + source: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_names is None and 'endpointNames' in kwargs: + endpoint_names = kwargs['endpointNames'] + if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if endpoint_names is not None: - pulumi.set(__self__, "endpoint_names", endpoint_names) + _setter("endpoint_names", endpoint_names) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) @property @pulumi.getter @@ -554,22 +695,69 @@ def __init__(__self__, *, :param bool notifications: Used to specify whether file notifications are sent to IoT Hub on upload. Defaults to `false`. :param str sas_ttl: The period of time for which the SAS URI generated by IoT Hub for file upload is valid, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 24 hours. Defaults to `PT1H`. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "container_name", container_name) + IoTHubFileUpload._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + container_name=container_name, + authentication_type=authentication_type, + default_ttl=default_ttl, + identity_id=identity_id, + lock_duration=lock_duration, + max_delivery_count=max_delivery_count, + notifications=notifications, + sas_ttl=sas_ttl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[str] = None, + container_name: Optional[str] = None, + authentication_type: Optional[str] = None, + default_ttl: Optional[str] = None, + identity_id: Optional[str] = None, + lock_duration: Optional[str] = None, + max_delivery_count: Optional[int] = None, + notifications: Optional[bool] = None, + sas_ttl: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if default_ttl is None and 'defaultTtl' in kwargs: + default_ttl = kwargs['defaultTtl'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if sas_ttl is None and 'sasTtl' in kwargs: + sas_ttl = kwargs['sasTtl'] + + _setter("connection_string", connection_string) + _setter("container_name", container_name) if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if default_ttl is not None: - pulumi.set(__self__, "default_ttl", default_ttl) + _setter("default_ttl", default_ttl) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) if notifications is not None: - pulumi.set(__self__, "notifications", notifications) + _setter("notifications", notifications) if sas_ttl is not None: - pulumi.set(__self__, "sas_ttl", sas_ttl) + _setter("sas_ttl", sas_ttl) @property @pulumi.getter(name="connectionString") @@ -684,13 +872,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + IoTHubIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -759,12 +972,33 @@ def __init__(__self__, *, :param str default_action: Default Action for Network Rule Set. Possible values are `DefaultActionDeny`, `DefaultActionAllow`. Defaults to `DefaultActionDeny`. :param Sequence['IoTHubNetworkRuleSetIpRuleArgs'] ip_rules: One or more `ip_rule` blocks as defined below. """ + IoTHubNetworkRuleSet._configure( + lambda key, value: pulumi.set(__self__, key, value), + apply_to_builtin_eventhub_endpoint=apply_to_builtin_eventhub_endpoint, + default_action=default_action, + ip_rules=ip_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + apply_to_builtin_eventhub_endpoint: Optional[bool] = None, + default_action: Optional[str] = None, + ip_rules: Optional[Sequence['outputs.IoTHubNetworkRuleSetIpRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if apply_to_builtin_eventhub_endpoint is None and 'applyToBuiltinEventhubEndpoint' in kwargs: + apply_to_builtin_eventhub_endpoint = kwargs['applyToBuiltinEventhubEndpoint'] + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if apply_to_builtin_eventhub_endpoint is not None: - pulumi.set(__self__, "apply_to_builtin_eventhub_endpoint", apply_to_builtin_eventhub_endpoint) + _setter("apply_to_builtin_eventhub_endpoint", apply_to_builtin_eventhub_endpoint) if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) @property @pulumi.getter(name="applyToBuiltinEventhubEndpoint") @@ -819,10 +1053,31 @@ def __init__(__self__, *, :param str name: The name of the ip rule. :param str action: The desired action for requests captured by this rule. Possible values are `Allow`. Defaults to `Allow`. """ - pulumi.set(__self__, "ip_mask", ip_mask) - pulumi.set(__self__, "name", name) + IoTHubNetworkRuleSetIpRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + name=name, + action=action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[str] = None, + name: Optional[str] = None, + action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("ip_mask", ip_mask) + _setter("name", name) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) @property @pulumi.getter(name="ipMask") @@ -881,12 +1136,41 @@ def __init__(__self__, *, :param str source: The source that the routing rule is to be applied to, such as `DeviceMessages`. Possible values include: `Invalid`, `DeviceMessages`, `TwinChangeEvents`, `DeviceLifecycleEvents`, `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents` and `DigitalTwinChangeEvents`. :param str condition: The condition that is evaluated to apply the routing rule. Defaults to `true`. For grammar, see: . """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "endpoint_names", endpoint_names) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "source", source) + IoTHubRoute._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + endpoint_names=endpoint_names, + name=name, + source=source, + condition=condition, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + endpoint_names: Optional[Sequence[str]] = None, + name: Optional[str] = None, + source: Optional[str] = None, + condition: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if endpoint_names is None and 'endpointNames' in kwargs: + endpoint_names = kwargs['endpointNames'] + if endpoint_names is None: + raise TypeError("Missing 'endpoint_names' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if source is None: + raise TypeError("Missing 'source' argument") + + _setter("enabled", enabled) + _setter("endpoint_names", endpoint_names) + _setter("name", name) + _setter("source", source) if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) @property @pulumi.getter @@ -963,14 +1247,37 @@ def __init__(__self__, *, :param str primary_key: The primary key. :param str secondary_key: The secondary key. """ + IoTHubSharedAccessPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_name=key_name, + permissions=permissions, + primary_key=primary_key, + secondary_key=secondary_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_name: Optional[str] = None, + permissions: Optional[str] = None, + primary_key: Optional[str] = None, + secondary_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_name is None and 'keyName' in kwargs: + key_name = kwargs['keyName'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if key_name is not None: - pulumi.set(__self__, "key_name", key_name) + _setter("key_name", key_name) if permissions is not None: - pulumi.set(__self__, "permissions", permissions) + _setter("permissions", permissions) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) @property @pulumi.getter(name="keyName") @@ -1016,8 +1323,25 @@ def __init__(__self__, *, > **NOTE:** Only one IotHub can be on the `Free` tier per subscription. :param str name: The name of the sku. Possible values are `B1`, `B2`, `B3`, `F1`, `S1`, `S2`, and `S3`. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + IoTHubSku._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("capacity", capacity) + _setter("name", name) @property @pulumi.getter @@ -1074,13 +1398,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this IoT Hub Device Update Account. :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this IoT Hub Device Update Account. """ - pulumi.set(__self__, "type", type) + IotHubDeviceUpdateAccountIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1143,8 +1492,27 @@ def __init__(__self__, *, :param str connection_string: Connection String of the Diagnostic Storage Account. :param str id: Resource ID of the Diagnostic Storage Account. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "id", id) + IotHubDeviceUpdateInstanceDiagnosticStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("connection_string", connection_string) + _setter("id", id) @property @pulumi.getter(name="connectionString") @@ -1193,11 +1561,36 @@ def __init__(__self__, *, :param str name: The name of the filter. :param str target: Target for requests captured by this rule. Possible values are `all`, `deviceApi` and `serviceApi`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "ip_mask", ip_mask) - pulumi.set(__self__, "name", name) + IotHubDpsIpFilterRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + ip_mask=ip_mask, + name=name, + target=target, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + ip_mask: Optional[str] = None, + name: Optional[str] = None, + target: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("ip_mask", ip_mask) + _setter("name", name) if target is not None: - pulumi.set(__self__, "target", target) + _setter("target", target) @property @pulumi.getter @@ -1268,14 +1661,43 @@ def __init__(__self__, *, :param bool apply_allocation_policy: Determines whether to apply allocation policies to the IoT Hub. Defaults to `true`. :param str hostname: The IoT Hub hostname. """ - pulumi.set(__self__, "connection_string", connection_string) - pulumi.set(__self__, "location", location) + IotHubDpsLinkedHub._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_string=connection_string, + location=location, + allocation_weight=allocation_weight, + apply_allocation_policy=apply_allocation_policy, + hostname=hostname, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_string: Optional[str] = None, + location: Optional[str] = None, + allocation_weight: Optional[int] = None, + apply_allocation_policy: Optional[bool] = None, + hostname: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if connection_string is None: + raise TypeError("Missing 'connection_string' argument") + if location is None: + raise TypeError("Missing 'location' argument") + if allocation_weight is None and 'allocationWeight' in kwargs: + allocation_weight = kwargs['allocationWeight'] + if apply_allocation_policy is None and 'applyAllocationPolicy' in kwargs: + apply_allocation_policy = kwargs['applyAllocationPolicy'] + + _setter("connection_string", connection_string) + _setter("location", location) if allocation_weight is not None: - pulumi.set(__self__, "allocation_weight", allocation_weight) + _setter("allocation_weight", allocation_weight) if apply_allocation_policy is not None: - pulumi.set(__self__, "apply_allocation_policy", apply_allocation_policy) + _setter("apply_allocation_policy", apply_allocation_policy) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) @property @pulumi.getter(name="connectionString") @@ -1327,8 +1749,25 @@ def __init__(__self__, *, :param int capacity: The number of provisioned IoT Device Provisioning Service units. :param str name: The name of the sku. Currently can only be set to `S1`. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + IotHubDpsSku._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("capacity", capacity) + _setter("name", name) @property @pulumi.getter @@ -1383,14 +1822,39 @@ def __init__(__self__, *, :param Sequence[str] local_users_not_alloweds: Specifies which local user is not allowed to login in current device group. :param Sequence[str] processes_not_alloweds: Specifies which process is not allowed to be executed in current device group. """ + SecurityDeviceGroupAllowRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_from_ips_not_alloweds=connection_from_ips_not_alloweds, + connection_to_ips_not_alloweds=connection_to_ips_not_alloweds, + local_users_not_alloweds=local_users_not_alloweds, + processes_not_alloweds=processes_not_alloweds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_from_ips_not_alloweds: Optional[Sequence[str]] = None, + connection_to_ips_not_alloweds: Optional[Sequence[str]] = None, + local_users_not_alloweds: Optional[Sequence[str]] = None, + processes_not_alloweds: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_from_ips_not_alloweds is None and 'connectionFromIpsNotAlloweds' in kwargs: + connection_from_ips_not_alloweds = kwargs['connectionFromIpsNotAlloweds'] + if connection_to_ips_not_alloweds is None and 'connectionToIpsNotAlloweds' in kwargs: + connection_to_ips_not_alloweds = kwargs['connectionToIpsNotAlloweds'] + if local_users_not_alloweds is None and 'localUsersNotAlloweds' in kwargs: + local_users_not_alloweds = kwargs['localUsersNotAlloweds'] + if processes_not_alloweds is None and 'processesNotAlloweds' in kwargs: + processes_not_alloweds = kwargs['processesNotAlloweds'] + if connection_from_ips_not_alloweds is not None: - pulumi.set(__self__, "connection_from_ips_not_alloweds", connection_from_ips_not_alloweds) + _setter("connection_from_ips_not_alloweds", connection_from_ips_not_alloweds) if connection_to_ips_not_alloweds is not None: - pulumi.set(__self__, "connection_to_ips_not_alloweds", connection_to_ips_not_alloweds) + _setter("connection_to_ips_not_alloweds", connection_to_ips_not_alloweds) if local_users_not_alloweds is not None: - pulumi.set(__self__, "local_users_not_alloweds", local_users_not_alloweds) + _setter("local_users_not_alloweds", local_users_not_alloweds) if processes_not_alloweds is not None: - pulumi.set(__self__, "processes_not_alloweds", processes_not_alloweds) + _setter("processes_not_alloweds", processes_not_alloweds) @property @pulumi.getter(name="connectionFromIpsNotAlloweds") @@ -1438,10 +1902,35 @@ def __init__(__self__, *, :param int min: The minimum threshold in the given time window. :param str type: The type of supported rule type. Possible Values are `ActiveConnectionsNotInAllowedRange`, `AmqpC2DMessagesNotInAllowedRange`, `MqttC2DMessagesNotInAllowedRange`, `HttpC2DMessagesNotInAllowedRange`, `AmqpC2DRejectedMessagesNotInAllowedRange`, `MqttC2DRejectedMessagesNotInAllowedRange`, `HttpC2DRejectedMessagesNotInAllowedRange`, `AmqpD2CMessagesNotInAllowedRange`, `MqttD2CMessagesNotInAllowedRange`, `HttpD2CMessagesNotInAllowedRange`, `DirectMethodInvokesNotInAllowedRange`, `FailedLocalLoginsNotInAllowedRange`, `FileUploadsNotInAllowedRange`, `QueuePurgesNotInAllowedRange`, `TwinUpdatesNotInAllowedRange` and `UnauthorizedOperationsNotInAllowedRange`. """ - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "max", max) - pulumi.set(__self__, "min", min) - pulumi.set(__self__, "type", type) + SecurityDeviceGroupRangeRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration=duration, + max=max, + min=min, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration: Optional[str] = None, + max: Optional[int] = None, + min: Optional[int] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration is None: + raise TypeError("Missing 'duration' argument") + if max is None: + raise TypeError("Missing 'max' argument") + if min is None: + raise TypeError("Missing 'min' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("duration", duration) + _setter("max", max) + _setter("min", min) + _setter("type", type) @property @pulumi.getter @@ -1504,8 +1993,29 @@ def __init__(__self__, *, :param Sequence[str] data_types: A list of data types which sent to workspace. Possible values are `Alerts` and `RawEvents`. :param str workspace_id: The resource ID of the Log Analytics Workspace. """ - pulumi.set(__self__, "data_types", data_types) - pulumi.set(__self__, "workspace_id", workspace_id) + SecuritySolutionAdditionalWorkspace._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_types=data_types, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_types: Optional[Sequence[str]] = None, + workspace_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_types is None and 'dataTypes' in kwargs: + data_types = kwargs['dataTypes'] + if data_types is None: + raise TypeError("Missing 'data_types' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + + _setter("data_types", data_types) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="dataTypes") @@ -1606,38 +2116,109 @@ def __init__(__self__, *, :param bool shared_credentials: Is any credentials shared among devices? Defaults to `true`. :param bool vulnerable_tls_cipher_suite: Does TLS cipher suite need to be updated? Defaults to `true`. """ + SecuritySolutionRecommendationsEnabled._configure( + lambda key, value: pulumi.set(__self__, key, value), + acr_authentication=acr_authentication, + agent_send_unutilized_msg=agent_send_unutilized_msg, + baseline=baseline, + edge_hub_mem_optimize=edge_hub_mem_optimize, + edge_logging_option=edge_logging_option, + inconsistent_module_settings=inconsistent_module_settings, + install_agent=install_agent, + ip_filter_deny_all=ip_filter_deny_all, + ip_filter_permissive_rule=ip_filter_permissive_rule, + open_ports=open_ports, + permissive_firewall_policy=permissive_firewall_policy, + permissive_input_firewall_rules=permissive_input_firewall_rules, + permissive_output_firewall_rules=permissive_output_firewall_rules, + privileged_docker_options=privileged_docker_options, + shared_credentials=shared_credentials, + vulnerable_tls_cipher_suite=vulnerable_tls_cipher_suite, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + acr_authentication: Optional[bool] = None, + agent_send_unutilized_msg: Optional[bool] = None, + baseline: Optional[bool] = None, + edge_hub_mem_optimize: Optional[bool] = None, + edge_logging_option: Optional[bool] = None, + inconsistent_module_settings: Optional[bool] = None, + install_agent: Optional[bool] = None, + ip_filter_deny_all: Optional[bool] = None, + ip_filter_permissive_rule: Optional[bool] = None, + open_ports: Optional[bool] = None, + permissive_firewall_policy: Optional[bool] = None, + permissive_input_firewall_rules: Optional[bool] = None, + permissive_output_firewall_rules: Optional[bool] = None, + privileged_docker_options: Optional[bool] = None, + shared_credentials: Optional[bool] = None, + vulnerable_tls_cipher_suite: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if acr_authentication is None and 'acrAuthentication' in kwargs: + acr_authentication = kwargs['acrAuthentication'] + if agent_send_unutilized_msg is None and 'agentSendUnutilizedMsg' in kwargs: + agent_send_unutilized_msg = kwargs['agentSendUnutilizedMsg'] + if edge_hub_mem_optimize is None and 'edgeHubMemOptimize' in kwargs: + edge_hub_mem_optimize = kwargs['edgeHubMemOptimize'] + if edge_logging_option is None and 'edgeLoggingOption' in kwargs: + edge_logging_option = kwargs['edgeLoggingOption'] + if inconsistent_module_settings is None and 'inconsistentModuleSettings' in kwargs: + inconsistent_module_settings = kwargs['inconsistentModuleSettings'] + if install_agent is None and 'installAgent' in kwargs: + install_agent = kwargs['installAgent'] + if ip_filter_deny_all is None and 'ipFilterDenyAll' in kwargs: + ip_filter_deny_all = kwargs['ipFilterDenyAll'] + if ip_filter_permissive_rule is None and 'ipFilterPermissiveRule' in kwargs: + ip_filter_permissive_rule = kwargs['ipFilterPermissiveRule'] + if open_ports is None and 'openPorts' in kwargs: + open_ports = kwargs['openPorts'] + if permissive_firewall_policy is None and 'permissiveFirewallPolicy' in kwargs: + permissive_firewall_policy = kwargs['permissiveFirewallPolicy'] + if permissive_input_firewall_rules is None and 'permissiveInputFirewallRules' in kwargs: + permissive_input_firewall_rules = kwargs['permissiveInputFirewallRules'] + if permissive_output_firewall_rules is None and 'permissiveOutputFirewallRules' in kwargs: + permissive_output_firewall_rules = kwargs['permissiveOutputFirewallRules'] + if privileged_docker_options is None and 'privilegedDockerOptions' in kwargs: + privileged_docker_options = kwargs['privilegedDockerOptions'] + if shared_credentials is None and 'sharedCredentials' in kwargs: + shared_credentials = kwargs['sharedCredentials'] + if vulnerable_tls_cipher_suite is None and 'vulnerableTlsCipherSuite' in kwargs: + vulnerable_tls_cipher_suite = kwargs['vulnerableTlsCipherSuite'] + if acr_authentication is not None: - pulumi.set(__self__, "acr_authentication", acr_authentication) + _setter("acr_authentication", acr_authentication) if agent_send_unutilized_msg is not None: - pulumi.set(__self__, "agent_send_unutilized_msg", agent_send_unutilized_msg) + _setter("agent_send_unutilized_msg", agent_send_unutilized_msg) if baseline is not None: - pulumi.set(__self__, "baseline", baseline) + _setter("baseline", baseline) if edge_hub_mem_optimize is not None: - pulumi.set(__self__, "edge_hub_mem_optimize", edge_hub_mem_optimize) + _setter("edge_hub_mem_optimize", edge_hub_mem_optimize) if edge_logging_option is not None: - pulumi.set(__self__, "edge_logging_option", edge_logging_option) + _setter("edge_logging_option", edge_logging_option) if inconsistent_module_settings is not None: - pulumi.set(__self__, "inconsistent_module_settings", inconsistent_module_settings) + _setter("inconsistent_module_settings", inconsistent_module_settings) if install_agent is not None: - pulumi.set(__self__, "install_agent", install_agent) + _setter("install_agent", install_agent) if ip_filter_deny_all is not None: - pulumi.set(__self__, "ip_filter_deny_all", ip_filter_deny_all) + _setter("ip_filter_deny_all", ip_filter_deny_all) if ip_filter_permissive_rule is not None: - pulumi.set(__self__, "ip_filter_permissive_rule", ip_filter_permissive_rule) + _setter("ip_filter_permissive_rule", ip_filter_permissive_rule) if open_ports is not None: - pulumi.set(__self__, "open_ports", open_ports) + _setter("open_ports", open_ports) if permissive_firewall_policy is not None: - pulumi.set(__self__, "permissive_firewall_policy", permissive_firewall_policy) + _setter("permissive_firewall_policy", permissive_firewall_policy) if permissive_input_firewall_rules is not None: - pulumi.set(__self__, "permissive_input_firewall_rules", permissive_input_firewall_rules) + _setter("permissive_input_firewall_rules", permissive_input_firewall_rules) if permissive_output_firewall_rules is not None: - pulumi.set(__self__, "permissive_output_firewall_rules", permissive_output_firewall_rules) + _setter("permissive_output_firewall_rules", permissive_output_firewall_rules) if privileged_docker_options is not None: - pulumi.set(__self__, "privileged_docker_options", privileged_docker_options) + _setter("privileged_docker_options", privileged_docker_options) if shared_credentials is not None: - pulumi.set(__self__, "shared_credentials", shared_credentials) + _setter("shared_credentials", shared_credentials) if vulnerable_tls_cipher_suite is not None: - pulumi.set(__self__, "vulnerable_tls_cipher_suite", vulnerable_tls_cipher_suite) + _setter("vulnerable_tls_cipher_suite", vulnerable_tls_cipher_suite) @property @pulumi.getter(name="acrAuthentication") @@ -1777,8 +2358,25 @@ def __init__(__self__, *, :param str key: Access key of storage account for Azure IoT Time Series Insights Gen2 Environment :param str name: Name of storage account for Azure IoT Time Series Insights Gen2 Environment. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "name", name) + TimeSeriesInsightsGen2EnvironmentStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("key", key) + _setter("name", name) @property @pulumi.getter @@ -1806,8 +2404,25 @@ def __init__(__self__, *, :param str name: The name of the key property. Changing this forces a new resource to be created. :param str type: The data type of the key property. Valid values include `Bool`, `DateTime`, `Double`, `String`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + TimeSeriesInsightsReferenceDataSetKeyProperty._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -1839,10 +2454,41 @@ def __init__(__self__, *, :param str tenant_id: The ID of the Tenant of the System Managed Service Principal assigned to the Virtual Machine. :param str type: The identity type of the Managed Identity assigned to the Virtual Machine. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetIotHubIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") diff --git a/sdk/python/pulumi_azure/iot/route.py b/sdk/python/pulumi_azure/iot/route.py index 7a09b24b73..2a2c5fb989 100644 --- a/sdk/python/pulumi_azure/iot/route.py +++ b/sdk/python/pulumi_azure/iot/route.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RouteArgs', 'Route'] @@ -31,15 +31,54 @@ def __init__(__self__, *, :param pulumi.Input[str] condition: The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to `true` by default. For grammar, see: . :param pulumi.Input[str] name: The name of the route. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "endpoint_names", endpoint_names) - pulumi.set(__self__, "iothub_name", iothub_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "source", source) + RouteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + endpoint_names=endpoint_names, + iothub_name=iothub_name, + resource_group_name=resource_group_name, + source=source, + condition=condition, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + endpoint_names: Optional[pulumi.Input[str]] = None, + iothub_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input[str]] = None, + condition: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if endpoint_names is None and 'endpointNames' in kwargs: + endpoint_names = kwargs['endpointNames'] + if endpoint_names is None: + raise TypeError("Missing 'endpoint_names' argument") + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if iothub_name is None: + raise TypeError("Missing 'iothub_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if source is None: + raise TypeError("Missing 'source' argument") + + _setter("enabled", enabled) + _setter("endpoint_names", endpoint_names) + _setter("iothub_name", iothub_name) + _setter("resource_group_name", resource_group_name) + _setter("source", source) if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -146,20 +185,49 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group under which the IotHub Route resource has to be created. Changing this forces a new resource to be created. :param pulumi.Input[str] source: The source that the routing rule is to be applied to. Possible values include: `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents`, `DeviceLifecycleEvents`, `DeviceMessages`, `DigitalTwinChangeEvents`, `Invalid`, `TwinChangeEvents`. """ + _RouteState._configure( + lambda key, value: pulumi.set(__self__, key, value), + condition=condition, + enabled=enabled, + endpoint_names=endpoint_names, + iothub_name=iothub_name, + name=name, + resource_group_name=resource_group_name, + source=source, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + condition: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + endpoint_names: Optional[pulumi.Input[str]] = None, + iothub_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_names is None and 'endpointNames' in kwargs: + endpoint_names = kwargs['endpointNames'] + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if endpoint_names is not None: - pulumi.set(__self__, "endpoint_names", endpoint_names) + _setter("endpoint_names", endpoint_names) if iothub_name is not None: - pulumi.set(__self__, "iothub_name", iothub_name) + _setter("iothub_name", iothub_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) @property @pulumi.getter @@ -311,6 +379,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RouteArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/security_device_group.py b/sdk/python/pulumi_azure/iot/security_device_group.py index 041792a691..4ffd482b95 100644 --- a/sdk/python/pulumi_azure/iot/security_device_group.py +++ b/sdk/python/pulumi_azure/iot/security_device_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,13 +27,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Device Security Group. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['SecurityDeviceGroupRangeRuleArgs']]] range_rules: One or more `range_rule` blocks as defined below. """ - pulumi.set(__self__, "iothub_id", iothub_id) + SecurityDeviceGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + iothub_id=iothub_id, + allow_rule=allow_rule, + name=name, + range_rules=range_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + iothub_id: Optional[pulumi.Input[str]] = None, + allow_rule: Optional[pulumi.Input['SecurityDeviceGroupAllowRuleArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + range_rules: Optional[pulumi.Input[Sequence[pulumi.Input['SecurityDeviceGroupRangeRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if iothub_id is None: + raise TypeError("Missing 'iothub_id' argument") + if allow_rule is None and 'allowRule' in kwargs: + allow_rule = kwargs['allowRule'] + if range_rules is None and 'rangeRules' in kwargs: + range_rules = kwargs['rangeRules'] + + _setter("iothub_id", iothub_id) if allow_rule is not None: - pulumi.set(__self__, "allow_rule", allow_rule) + _setter("allow_rule", allow_rule) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if range_rules is not None: - pulumi.set(__self__, "range_rules", range_rules) + _setter("range_rules", range_rules) @property @pulumi.getter(name="iothubId") @@ -98,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Device Security Group. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['SecurityDeviceGroupRangeRuleArgs']]] range_rules: One or more `range_rule` blocks as defined below. """ + _SecurityDeviceGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_rule=allow_rule, + iothub_id=iothub_id, + name=name, + range_rules=range_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_rule: Optional[pulumi.Input['SecurityDeviceGroupAllowRuleArgs']] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + range_rules: Optional[pulumi.Input[Sequence[pulumi.Input['SecurityDeviceGroupRangeRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_rule is None and 'allowRule' in kwargs: + allow_rule = kwargs['allowRule'] + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if range_rules is None and 'rangeRules' in kwargs: + range_rules = kwargs['rangeRules'] + if allow_rule is not None: - pulumi.set(__self__, "allow_rule", allow_rule) + _setter("allow_rule", allow_rule) if iothub_id is not None: - pulumi.set(__self__, "iothub_id", iothub_id) + _setter("iothub_id", iothub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if range_rules is not None: - pulumi.set(__self__, "range_rules", range_rules) + _setter("range_rules", range_rules) @property @pulumi.getter(name="allowRule") @@ -277,6 +325,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SecurityDeviceGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -295,6 +347,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = SecurityDeviceGroupArgs.__new__(SecurityDeviceGroupArgs) + if allow_rule is not None and not isinstance(allow_rule, SecurityDeviceGroupAllowRuleArgs): + allow_rule = allow_rule or {} + def _setter(key, value): + allow_rule[key] = value + SecurityDeviceGroupAllowRuleArgs._configure(_setter, **allow_rule) __props__.__dict__["allow_rule"] = allow_rule if iothub_id is None and not opts.urn: raise TypeError("Missing required property 'iothub_id'") diff --git a/sdk/python/pulumi_azure/iot/security_solution.py b/sdk/python/pulumi_azure/iot/security_solution.py index 507484c6e0..36f44e8dcc 100644 --- a/sdk/python/pulumi_azure/iot/security_solution.py +++ b/sdk/python/pulumi_azure/iot/security_solution.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,33 +49,100 @@ def __init__(__self__, *, :param pulumi.Input['SecuritySolutionRecommendationsEnabledArgs'] recommendations_enabled: A `recommendations_enabled` block of options to enable or disable as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "iothub_ids", iothub_ids) - pulumi.set(__self__, "resource_group_name", resource_group_name) + SecuritySolutionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + iothub_ids=iothub_ids, + resource_group_name=resource_group_name, + additional_workspaces=additional_workspaces, + disabled_data_sources=disabled_data_sources, + enabled=enabled, + events_to_exports=events_to_exports, + location=location, + log_analytics_workspace_id=log_analytics_workspace_id, + log_unmasked_ips_enabled=log_unmasked_ips_enabled, + name=name, + query_for_resources=query_for_resources, + query_subscription_ids=query_subscription_ids, + recommendations_enabled=recommendations_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + iothub_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + additional_workspaces: Optional[pulumi.Input[Sequence[pulumi.Input['SecuritySolutionAdditionalWorkspaceArgs']]]] = None, + disabled_data_sources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + events_to_exports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + log_unmasked_ips_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + query_for_resources: Optional[pulumi.Input[str]] = None, + query_subscription_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + recommendations_enabled: Optional[pulumi.Input['SecuritySolutionRecommendationsEnabledArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if iothub_ids is None and 'iothubIds' in kwargs: + iothub_ids = kwargs['iothubIds'] + if iothub_ids is None: + raise TypeError("Missing 'iothub_ids' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if additional_workspaces is None and 'additionalWorkspaces' in kwargs: + additional_workspaces = kwargs['additionalWorkspaces'] + if disabled_data_sources is None and 'disabledDataSources' in kwargs: + disabled_data_sources = kwargs['disabledDataSources'] + if events_to_exports is None and 'eventsToExports' in kwargs: + events_to_exports = kwargs['eventsToExports'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_unmasked_ips_enabled is None and 'logUnmaskedIpsEnabled' in kwargs: + log_unmasked_ips_enabled = kwargs['logUnmaskedIpsEnabled'] + if query_for_resources is None and 'queryForResources' in kwargs: + query_for_resources = kwargs['queryForResources'] + if query_subscription_ids is None and 'querySubscriptionIds' in kwargs: + query_subscription_ids = kwargs['querySubscriptionIds'] + if recommendations_enabled is None and 'recommendationsEnabled' in kwargs: + recommendations_enabled = kwargs['recommendationsEnabled'] + + _setter("display_name", display_name) + _setter("iothub_ids", iothub_ids) + _setter("resource_group_name", resource_group_name) if additional_workspaces is not None: - pulumi.set(__self__, "additional_workspaces", additional_workspaces) + _setter("additional_workspaces", additional_workspaces) if disabled_data_sources is not None: - pulumi.set(__self__, "disabled_data_sources", disabled_data_sources) + _setter("disabled_data_sources", disabled_data_sources) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if events_to_exports is not None: - pulumi.set(__self__, "events_to_exports", events_to_exports) + _setter("events_to_exports", events_to_exports) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if log_unmasked_ips_enabled is not None: - pulumi.set(__self__, "log_unmasked_ips_enabled", log_unmasked_ips_enabled) + _setter("log_unmasked_ips_enabled", log_unmasked_ips_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if query_for_resources is not None: - pulumi.set(__self__, "query_for_resources", query_for_resources) + _setter("query_for_resources", query_for_resources) if query_subscription_ids is not None: - pulumi.set(__self__, "query_subscription_ids", query_subscription_ids) + _setter("query_subscription_ids", query_subscription_ids) if recommendations_enabled is not None: - pulumi.set(__self__, "recommendations_enabled", recommendations_enabled) + _setter("recommendations_enabled", recommendations_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="displayName") @@ -294,36 +361,97 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the resource group in which to create the Iot Security Solution. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _SecuritySolutionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_workspaces=additional_workspaces, + disabled_data_sources=disabled_data_sources, + display_name=display_name, + enabled=enabled, + events_to_exports=events_to_exports, + iothub_ids=iothub_ids, + location=location, + log_analytics_workspace_id=log_analytics_workspace_id, + log_unmasked_ips_enabled=log_unmasked_ips_enabled, + name=name, + query_for_resources=query_for_resources, + query_subscription_ids=query_subscription_ids, + recommendations_enabled=recommendations_enabled, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_workspaces: Optional[pulumi.Input[Sequence[pulumi.Input['SecuritySolutionAdditionalWorkspaceArgs']]]] = None, + disabled_data_sources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + events_to_exports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + iothub_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + log_unmasked_ips_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + query_for_resources: Optional[pulumi.Input[str]] = None, + query_subscription_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + recommendations_enabled: Optional[pulumi.Input['SecuritySolutionRecommendationsEnabledArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_workspaces is None and 'additionalWorkspaces' in kwargs: + additional_workspaces = kwargs['additionalWorkspaces'] + if disabled_data_sources is None and 'disabledDataSources' in kwargs: + disabled_data_sources = kwargs['disabledDataSources'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if events_to_exports is None and 'eventsToExports' in kwargs: + events_to_exports = kwargs['eventsToExports'] + if iothub_ids is None and 'iothubIds' in kwargs: + iothub_ids = kwargs['iothubIds'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_unmasked_ips_enabled is None and 'logUnmaskedIpsEnabled' in kwargs: + log_unmasked_ips_enabled = kwargs['logUnmaskedIpsEnabled'] + if query_for_resources is None and 'queryForResources' in kwargs: + query_for_resources = kwargs['queryForResources'] + if query_subscription_ids is None and 'querySubscriptionIds' in kwargs: + query_subscription_ids = kwargs['querySubscriptionIds'] + if recommendations_enabled is None and 'recommendationsEnabled' in kwargs: + recommendations_enabled = kwargs['recommendationsEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if additional_workspaces is not None: - pulumi.set(__self__, "additional_workspaces", additional_workspaces) + _setter("additional_workspaces", additional_workspaces) if disabled_data_sources is not None: - pulumi.set(__self__, "disabled_data_sources", disabled_data_sources) + _setter("disabled_data_sources", disabled_data_sources) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if events_to_exports is not None: - pulumi.set(__self__, "events_to_exports", events_to_exports) + _setter("events_to_exports", events_to_exports) if iothub_ids is not None: - pulumi.set(__self__, "iothub_ids", iothub_ids) + _setter("iothub_ids", iothub_ids) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if log_unmasked_ips_enabled is not None: - pulumi.set(__self__, "log_unmasked_ips_enabled", log_unmasked_ips_enabled) + _setter("log_unmasked_ips_enabled", log_unmasked_ips_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if query_for_resources is not None: - pulumi.set(__self__, "query_for_resources", query_for_resources) + _setter("query_for_resources", query_for_resources) if query_subscription_ids is not None: - pulumi.set(__self__, "query_subscription_ids", query_subscription_ids) + _setter("query_subscription_ids", query_subscription_ids) if recommendations_enabled is not None: - pulumi.set(__self__, "recommendations_enabled", recommendations_enabled) + _setter("recommendations_enabled", recommendations_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="additionalWorkspaces") @@ -625,6 +753,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SecuritySolutionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -670,6 +802,11 @@ def _internal_init(__self__, __props__.__dict__["name"] = name __props__.__dict__["query_for_resources"] = query_for_resources __props__.__dict__["query_subscription_ids"] = query_subscription_ids + if recommendations_enabled is not None and not isinstance(recommendations_enabled, SecuritySolutionRecommendationsEnabledArgs): + recommendations_enabled = recommendations_enabled or {} + def _setter(key, value): + recommendations_enabled[key] = value + SecuritySolutionRecommendationsEnabledArgs._configure(_setter, **recommendations_enabled) __props__.__dict__["recommendations_enabled"] = recommendations_enabled if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") diff --git a/sdk/python/pulumi_azure/iot/shared_access_policy.py b/sdk/python/pulumi_azure/iot/shared_access_policy.py index da0afada41..1b81f353c6 100644 --- a/sdk/python/pulumi_azure/iot/shared_access_policy.py +++ b/sdk/python/pulumi_azure/iot/shared_access_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SharedAccessPolicyArgs', 'SharedAccessPolicy'] @@ -35,18 +35,57 @@ def __init__(__self__, *, > **NOTE** When `registry_write` is set to `true`, `registry_read` must also be set to true. This is a limitation of the Azure REST API :param pulumi.Input[bool] service_connect: Adds `ServiceConnect` permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints. """ - pulumi.set(__self__, "iothub_name", iothub_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + SharedAccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + iothub_name=iothub_name, + resource_group_name=resource_group_name, + device_connect=device_connect, + name=name, + registry_read=registry_read, + registry_write=registry_write, + service_connect=service_connect, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + iothub_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + device_connect: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + registry_read: Optional[pulumi.Input[bool]] = None, + registry_write: Optional[pulumi.Input[bool]] = None, + service_connect: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if iothub_name is None: + raise TypeError("Missing 'iothub_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if device_connect is None and 'deviceConnect' in kwargs: + device_connect = kwargs['deviceConnect'] + if registry_read is None and 'registryRead' in kwargs: + registry_read = kwargs['registryRead'] + if registry_write is None and 'registryWrite' in kwargs: + registry_write = kwargs['registryWrite'] + if service_connect is None and 'serviceConnect' in kwargs: + service_connect = kwargs['serviceConnect'] + + _setter("iothub_name", iothub_name) + _setter("resource_group_name", resource_group_name) if device_connect is not None: - pulumi.set(__self__, "device_connect", device_connect) + _setter("device_connect", device_connect) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if registry_read is not None: - pulumi.set(__self__, "registry_read", registry_read) + _setter("registry_read", registry_read) if registry_write is not None: - pulumi.set(__self__, "registry_write", registry_write) + _setter("registry_write", registry_write) if service_connect is not None: - pulumi.set(__self__, "service_connect", service_connect) + _setter("service_connect", service_connect) @property @pulumi.getter(name="iothubName") @@ -169,28 +208,79 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_key: The secondary key used to create the authentication token. :param pulumi.Input[bool] service_connect: Adds `ServiceConnect` permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints. """ + _SharedAccessPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + device_connect=device_connect, + iothub_name=iothub_name, + name=name, + primary_connection_string=primary_connection_string, + primary_key=primary_key, + registry_read=registry_read, + registry_write=registry_write, + resource_group_name=resource_group_name, + secondary_connection_string=secondary_connection_string, + secondary_key=secondary_key, + service_connect=service_connect, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + device_connect: Optional[pulumi.Input[bool]] = None, + iothub_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + registry_read: Optional[pulumi.Input[bool]] = None, + registry_write: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + service_connect: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if device_connect is None and 'deviceConnect' in kwargs: + device_connect = kwargs['deviceConnect'] + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if registry_read is None and 'registryRead' in kwargs: + registry_read = kwargs['registryRead'] + if registry_write is None and 'registryWrite' in kwargs: + registry_write = kwargs['registryWrite'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if service_connect is None and 'serviceConnect' in kwargs: + service_connect = kwargs['serviceConnect'] + if device_connect is not None: - pulumi.set(__self__, "device_connect", device_connect) + _setter("device_connect", device_connect) if iothub_name is not None: - pulumi.set(__self__, "iothub_name", iothub_name) + _setter("iothub_name", iothub_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if registry_read is not None: - pulumi.set(__self__, "registry_read", registry_read) + _setter("registry_read", registry_read) if registry_write is not None: - pulumi.set(__self__, "registry_write", registry_write) + _setter("registry_write", registry_write) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if service_connect is not None: - pulumi.set(__self__, "service_connect", service_connect) + _setter("service_connect", service_connect) @property @pulumi.getter(name="deviceConnect") @@ -436,6 +526,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SharedAccessPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/time_series_insights_access_policy.py b/sdk/python/pulumi_azure/iot/time_series_insights_access_policy.py index 2c3413084f..cabb61d334 100644 --- a/sdk/python/pulumi_azure/iot/time_series_insights_access_policy.py +++ b/sdk/python/pulumi_azure/iot/time_series_insights_access_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TimeSeriesInsightsAccessPolicyArgs', 'TimeSeriesInsightsAccessPolicy'] @@ -27,13 +27,42 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the Azure IoT Time Series Insights Access Policy. :param pulumi.Input[str] name: Specifies the name of the Azure IoT Time Series Insights Access Policy. Changing this forces a new resource to be created. Must be globally unique. """ - pulumi.set(__self__, "principal_object_id", principal_object_id) - pulumi.set(__self__, "roles", roles) - pulumi.set(__self__, "time_series_insights_environment_id", time_series_insights_environment_id) + TimeSeriesInsightsAccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_object_id=principal_object_id, + roles=roles, + time_series_insights_environment_id=time_series_insights_environment_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_object_id: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + time_series_insights_environment_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_object_id is None and 'principalObjectId' in kwargs: + principal_object_id = kwargs['principalObjectId'] + if principal_object_id is None: + raise TypeError("Missing 'principal_object_id' argument") + if roles is None: + raise TypeError("Missing 'roles' argument") + if time_series_insights_environment_id is None and 'timeSeriesInsightsEnvironmentId' in kwargs: + time_series_insights_environment_id = kwargs['timeSeriesInsightsEnvironmentId'] + if time_series_insights_environment_id is None: + raise TypeError("Missing 'time_series_insights_environment_id' argument") + + _setter("principal_object_id", principal_object_id) + _setter("roles", roles) + _setter("time_series_insights_environment_id", time_series_insights_environment_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="principalObjectId") @@ -112,16 +141,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: A list of roles to apply to the Access Policy. Valid values include `Contributor` and `Reader`. :param pulumi.Input[str] time_series_insights_environment_id: The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created. """ + _TimeSeriesInsightsAccessPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + name=name, + principal_object_id=principal_object_id, + roles=roles, + time_series_insights_environment_id=time_series_insights_environment_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + principal_object_id: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + time_series_insights_environment_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_object_id is None and 'principalObjectId' in kwargs: + principal_object_id = kwargs['principalObjectId'] + if time_series_insights_environment_id is None and 'timeSeriesInsightsEnvironmentId' in kwargs: + time_series_insights_environment_id = kwargs['timeSeriesInsightsEnvironmentId'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_object_id is not None: - pulumi.set(__self__, "principal_object_id", principal_object_id) + _setter("principal_object_id", principal_object_id) if roles is not None: - pulumi.set(__self__, "roles", roles) + _setter("roles", roles) if time_series_insights_environment_id is not None: - pulumi.set(__self__, "time_series_insights_environment_id", time_series_insights_environment_id) + _setter("time_series_insights_environment_id", time_series_insights_environment_id) @property @pulumi.getter @@ -277,6 +329,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TimeSeriesInsightsAccessPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/time_series_insights_event_source_eventhub.py b/sdk/python/pulumi_azure/iot/time_series_insights_event_source_eventhub.py index 488644150f..4c1b6cbbe7 100644 --- a/sdk/python/pulumi_azure/iot/time_series_insights_event_source_eventhub.py +++ b/sdk/python/pulumi_azure/iot/time_series_insights_event_source_eventhub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TimeSeriesInsightsEventSourceEventhubArgs', 'TimeSeriesInsightsEventSourceEventhub'] @@ -39,21 +39,82 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] timestamp_property_name: Specifies the value that will be used as the event source's timestamp. This value defaults to the event creation time. """ - pulumi.set(__self__, "consumer_group_name", consumer_group_name) - pulumi.set(__self__, "environment_id", environment_id) - pulumi.set(__self__, "event_source_resource_id", event_source_resource_id) - pulumi.set(__self__, "eventhub_name", eventhub_name) - pulumi.set(__self__, "namespace_name", namespace_name) - pulumi.set(__self__, "shared_access_key", shared_access_key) - pulumi.set(__self__, "shared_access_key_name", shared_access_key_name) + TimeSeriesInsightsEventSourceEventhubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_group_name=consumer_group_name, + environment_id=environment_id, + event_source_resource_id=event_source_resource_id, + eventhub_name=eventhub_name, + namespace_name=namespace_name, + shared_access_key=shared_access_key, + shared_access_key_name=shared_access_key_name, + location=location, + name=name, + tags=tags, + timestamp_property_name=timestamp_property_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_group_name: Optional[pulumi.Input[str]] = None, + environment_id: Optional[pulumi.Input[str]] = None, + event_source_resource_id: Optional[pulumi.Input[str]] = None, + eventhub_name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + shared_access_key: Optional[pulumi.Input[str]] = None, + shared_access_key_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timestamp_property_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_group_name is None and 'consumerGroupName' in kwargs: + consumer_group_name = kwargs['consumerGroupName'] + if consumer_group_name is None: + raise TypeError("Missing 'consumer_group_name' argument") + if environment_id is None and 'environmentId' in kwargs: + environment_id = kwargs['environmentId'] + if environment_id is None: + raise TypeError("Missing 'environment_id' argument") + if event_source_resource_id is None and 'eventSourceResourceId' in kwargs: + event_source_resource_id = kwargs['eventSourceResourceId'] + if event_source_resource_id is None: + raise TypeError("Missing 'event_source_resource_id' argument") + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_name is None: + raise TypeError("Missing 'eventhub_name' argument") + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if namespace_name is None: + raise TypeError("Missing 'namespace_name' argument") + if shared_access_key is None and 'sharedAccessKey' in kwargs: + shared_access_key = kwargs['sharedAccessKey'] + if shared_access_key is None: + raise TypeError("Missing 'shared_access_key' argument") + if shared_access_key_name is None and 'sharedAccessKeyName' in kwargs: + shared_access_key_name = kwargs['sharedAccessKeyName'] + if shared_access_key_name is None: + raise TypeError("Missing 'shared_access_key_name' argument") + if timestamp_property_name is None and 'timestampPropertyName' in kwargs: + timestamp_property_name = kwargs['timestampPropertyName'] + + _setter("consumer_group_name", consumer_group_name) + _setter("environment_id", environment_id) + _setter("event_source_resource_id", event_source_resource_id) + _setter("eventhub_name", eventhub_name) + _setter("namespace_name", namespace_name) + _setter("shared_access_key", shared_access_key) + _setter("shared_access_key_name", shared_access_key_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timestamp_property_name is not None: - pulumi.set(__self__, "timestamp_property_name", timestamp_property_name) + _setter("timestamp_property_name", timestamp_property_name) @property @pulumi.getter(name="consumerGroupName") @@ -216,28 +277,75 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] timestamp_property_name: Specifies the value that will be used as the event source's timestamp. This value defaults to the event creation time. """ + _TimeSeriesInsightsEventSourceEventhubState._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_group_name=consumer_group_name, + environment_id=environment_id, + event_source_resource_id=event_source_resource_id, + eventhub_name=eventhub_name, + location=location, + name=name, + namespace_name=namespace_name, + shared_access_key=shared_access_key, + shared_access_key_name=shared_access_key_name, + tags=tags, + timestamp_property_name=timestamp_property_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_group_name: Optional[pulumi.Input[str]] = None, + environment_id: Optional[pulumi.Input[str]] = None, + event_source_resource_id: Optional[pulumi.Input[str]] = None, + eventhub_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + shared_access_key: Optional[pulumi.Input[str]] = None, + shared_access_key_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timestamp_property_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_group_name is None and 'consumerGroupName' in kwargs: + consumer_group_name = kwargs['consumerGroupName'] + if environment_id is None and 'environmentId' in kwargs: + environment_id = kwargs['environmentId'] + if event_source_resource_id is None and 'eventSourceResourceId' in kwargs: + event_source_resource_id = kwargs['eventSourceResourceId'] + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if shared_access_key is None and 'sharedAccessKey' in kwargs: + shared_access_key = kwargs['sharedAccessKey'] + if shared_access_key_name is None and 'sharedAccessKeyName' in kwargs: + shared_access_key_name = kwargs['sharedAccessKeyName'] + if timestamp_property_name is None and 'timestampPropertyName' in kwargs: + timestamp_property_name = kwargs['timestampPropertyName'] + if consumer_group_name is not None: - pulumi.set(__self__, "consumer_group_name", consumer_group_name) + _setter("consumer_group_name", consumer_group_name) if environment_id is not None: - pulumi.set(__self__, "environment_id", environment_id) + _setter("environment_id", environment_id) if event_source_resource_id is not None: - pulumi.set(__self__, "event_source_resource_id", event_source_resource_id) + _setter("event_source_resource_id", event_source_resource_id) if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if shared_access_key is not None: - pulumi.set(__self__, "shared_access_key", shared_access_key) + _setter("shared_access_key", shared_access_key) if shared_access_key_name is not None: - pulumi.set(__self__, "shared_access_key_name", shared_access_key_name) + _setter("shared_access_key_name", shared_access_key_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timestamp_property_name is not None: - pulumi.set(__self__, "timestamp_property_name", timestamp_property_name) + _setter("timestamp_property_name", timestamp_property_name) @property @pulumi.getter(name="consumerGroupName") @@ -545,6 +653,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TimeSeriesInsightsEventSourceEventhubArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/time_series_insights_event_source_iothub.py b/sdk/python/pulumi_azure/iot/time_series_insights_event_source_iothub.py index d707c2cc1d..f709e12203 100644 --- a/sdk/python/pulumi_azure/iot/time_series_insights_event_source_iothub.py +++ b/sdk/python/pulumi_azure/iot/time_series_insights_event_source_iothub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TimeSeriesInsightsEventSourceIothubArgs', 'TimeSeriesInsightsEventSourceIothub'] @@ -37,20 +37,75 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] timestamp_property_name: Specifies the value that will be used as the event source's timestamp. This value defaults to the event creation time. """ - pulumi.set(__self__, "consumer_group_name", consumer_group_name) - pulumi.set(__self__, "environment_id", environment_id) - pulumi.set(__self__, "event_source_resource_id", event_source_resource_id) - pulumi.set(__self__, "iothub_name", iothub_name) - pulumi.set(__self__, "shared_access_key", shared_access_key) - pulumi.set(__self__, "shared_access_key_name", shared_access_key_name) + TimeSeriesInsightsEventSourceIothubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_group_name=consumer_group_name, + environment_id=environment_id, + event_source_resource_id=event_source_resource_id, + iothub_name=iothub_name, + shared_access_key=shared_access_key, + shared_access_key_name=shared_access_key_name, + location=location, + name=name, + tags=tags, + timestamp_property_name=timestamp_property_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_group_name: Optional[pulumi.Input[str]] = None, + environment_id: Optional[pulumi.Input[str]] = None, + event_source_resource_id: Optional[pulumi.Input[str]] = None, + iothub_name: Optional[pulumi.Input[str]] = None, + shared_access_key: Optional[pulumi.Input[str]] = None, + shared_access_key_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timestamp_property_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_group_name is None and 'consumerGroupName' in kwargs: + consumer_group_name = kwargs['consumerGroupName'] + if consumer_group_name is None: + raise TypeError("Missing 'consumer_group_name' argument") + if environment_id is None and 'environmentId' in kwargs: + environment_id = kwargs['environmentId'] + if environment_id is None: + raise TypeError("Missing 'environment_id' argument") + if event_source_resource_id is None and 'eventSourceResourceId' in kwargs: + event_source_resource_id = kwargs['eventSourceResourceId'] + if event_source_resource_id is None: + raise TypeError("Missing 'event_source_resource_id' argument") + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if iothub_name is None: + raise TypeError("Missing 'iothub_name' argument") + if shared_access_key is None and 'sharedAccessKey' in kwargs: + shared_access_key = kwargs['sharedAccessKey'] + if shared_access_key is None: + raise TypeError("Missing 'shared_access_key' argument") + if shared_access_key_name is None and 'sharedAccessKeyName' in kwargs: + shared_access_key_name = kwargs['sharedAccessKeyName'] + if shared_access_key_name is None: + raise TypeError("Missing 'shared_access_key_name' argument") + if timestamp_property_name is None and 'timestampPropertyName' in kwargs: + timestamp_property_name = kwargs['timestampPropertyName'] + + _setter("consumer_group_name", consumer_group_name) + _setter("environment_id", environment_id) + _setter("event_source_resource_id", event_source_resource_id) + _setter("iothub_name", iothub_name) + _setter("shared_access_key", shared_access_key) + _setter("shared_access_key_name", shared_access_key_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timestamp_property_name is not None: - pulumi.set(__self__, "timestamp_property_name", timestamp_property_name) + _setter("timestamp_property_name", timestamp_property_name) @property @pulumi.getter(name="consumerGroupName") @@ -199,26 +254,69 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] timestamp_property_name: Specifies the value that will be used as the event source's timestamp. This value defaults to the event creation time. """ + _TimeSeriesInsightsEventSourceIothubState._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_group_name=consumer_group_name, + environment_id=environment_id, + event_source_resource_id=event_source_resource_id, + iothub_name=iothub_name, + location=location, + name=name, + shared_access_key=shared_access_key, + shared_access_key_name=shared_access_key_name, + tags=tags, + timestamp_property_name=timestamp_property_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_group_name: Optional[pulumi.Input[str]] = None, + environment_id: Optional[pulumi.Input[str]] = None, + event_source_resource_id: Optional[pulumi.Input[str]] = None, + iothub_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + shared_access_key: Optional[pulumi.Input[str]] = None, + shared_access_key_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timestamp_property_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_group_name is None and 'consumerGroupName' in kwargs: + consumer_group_name = kwargs['consumerGroupName'] + if environment_id is None and 'environmentId' in kwargs: + environment_id = kwargs['environmentId'] + if event_source_resource_id is None and 'eventSourceResourceId' in kwargs: + event_source_resource_id = kwargs['eventSourceResourceId'] + if iothub_name is None and 'iothubName' in kwargs: + iothub_name = kwargs['iothubName'] + if shared_access_key is None and 'sharedAccessKey' in kwargs: + shared_access_key = kwargs['sharedAccessKey'] + if shared_access_key_name is None and 'sharedAccessKeyName' in kwargs: + shared_access_key_name = kwargs['sharedAccessKeyName'] + if timestamp_property_name is None and 'timestampPropertyName' in kwargs: + timestamp_property_name = kwargs['timestampPropertyName'] + if consumer_group_name is not None: - pulumi.set(__self__, "consumer_group_name", consumer_group_name) + _setter("consumer_group_name", consumer_group_name) if environment_id is not None: - pulumi.set(__self__, "environment_id", environment_id) + _setter("environment_id", environment_id) if event_source_resource_id is not None: - pulumi.set(__self__, "event_source_resource_id", event_source_resource_id) + _setter("event_source_resource_id", event_source_resource_id) if iothub_name is not None: - pulumi.set(__self__, "iothub_name", iothub_name) + _setter("iothub_name", iothub_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if shared_access_key is not None: - pulumi.set(__self__, "shared_access_key", shared_access_key) + _setter("shared_access_key", shared_access_key) if shared_access_key_name is not None: - pulumi.set(__self__, "shared_access_key_name", shared_access_key_name) + _setter("shared_access_key_name", shared_access_key_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timestamp_property_name is not None: - pulumi.set(__self__, "timestamp_property_name", timestamp_property_name) + _setter("timestamp_property_name", timestamp_property_name) @property @pulumi.getter(name="consumerGroupName") @@ -492,6 +590,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TimeSeriesInsightsEventSourceIothubArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/time_series_insights_gen2_environment.py b/sdk/python/pulumi_azure/iot/time_series_insights_gen2_environment.py index cb63314ba0..ac137c19be 100644 --- a/sdk/python/pulumi_azure/iot/time_series_insights_gen2_environment.py +++ b/sdk/python/pulumi_azure/iot/time_series_insights_gen2_environment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,18 +35,59 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] warm_store_data_retention_time: Specifies the ISO8601 timespan specifying the minimum number of days the environment's events will be available for query. """ - pulumi.set(__self__, "id_properties", id_properties) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "storage", storage) + TimeSeriesInsightsGen2EnvironmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id_properties=id_properties, + resource_group_name=resource_group_name, + sku_name=sku_name, + storage=storage, + location=location, + name=name, + tags=tags, + warm_store_data_retention_time=warm_store_data_retention_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id_properties: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storage: Optional[pulumi.Input['TimeSeriesInsightsGen2EnvironmentStorageArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + warm_store_data_retention_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id_properties is None and 'idProperties' in kwargs: + id_properties = kwargs['idProperties'] + if id_properties is None: + raise TypeError("Missing 'id_properties' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if storage is None: + raise TypeError("Missing 'storage' argument") + if warm_store_data_retention_time is None and 'warmStoreDataRetentionTime' in kwargs: + warm_store_data_retention_time = kwargs['warmStoreDataRetentionTime'] + + _setter("id_properties", id_properties) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("storage", storage) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if warm_store_data_retention_time is not None: - pulumi.set(__self__, "warm_store_data_retention_time", warm_store_data_retention_time) + _setter("warm_store_data_retention_time", warm_store_data_retention_time) @property @pulumi.getter(name="idProperties") @@ -169,24 +210,61 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] warm_store_data_retention_time: Specifies the ISO8601 timespan specifying the minimum number of days the environment's events will be available for query. """ + _TimeSeriesInsightsGen2EnvironmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_access_fqdn=data_access_fqdn, + id_properties=id_properties, + location=location, + name=name, + resource_group_name=resource_group_name, + sku_name=sku_name, + storage=storage, + tags=tags, + warm_store_data_retention_time=warm_store_data_retention_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_access_fqdn: Optional[pulumi.Input[str]] = None, + id_properties: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storage: Optional[pulumi.Input['TimeSeriesInsightsGen2EnvironmentStorageArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + warm_store_data_retention_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_access_fqdn is None and 'dataAccessFqdn' in kwargs: + data_access_fqdn = kwargs['dataAccessFqdn'] + if id_properties is None and 'idProperties' in kwargs: + id_properties = kwargs['idProperties'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if warm_store_data_retention_time is None and 'warmStoreDataRetentionTime' in kwargs: + warm_store_data_retention_time = kwargs['warmStoreDataRetentionTime'] + if data_access_fqdn is not None: - pulumi.set(__self__, "data_access_fqdn", data_access_fqdn) + _setter("data_access_fqdn", data_access_fqdn) if id_properties is not None: - pulumi.set(__self__, "id_properties", id_properties) + _setter("id_properties", id_properties) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if storage is not None: - pulumi.set(__self__, "storage", storage) + _setter("storage", storage) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if warm_store_data_retention_time is not None: - pulumi.set(__self__, "warm_store_data_retention_time", warm_store_data_retention_time) + _setter("warm_store_data_retention_time", warm_store_data_retention_time) @property @pulumi.getter(name="dataAccessFqdn") @@ -408,6 +486,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TimeSeriesInsightsGen2EnvironmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -441,6 +523,11 @@ def _internal_init(__self__, if sku_name is None and not opts.urn: raise TypeError("Missing required property 'sku_name'") __props__.__dict__["sku_name"] = sku_name + if storage is not None and not isinstance(storage, TimeSeriesInsightsGen2EnvironmentStorageArgs): + storage = storage or {} + def _setter(key, value): + storage[key] = value + TimeSeriesInsightsGen2EnvironmentStorageArgs._configure(_setter, **storage) if storage is None and not opts.urn: raise TypeError("Missing required property 'storage'") __props__.__dict__["storage"] = storage diff --git a/sdk/python/pulumi_azure/iot/time_series_insights_reference_data_set.py b/sdk/python/pulumi_azure/iot/time_series_insights_reference_data_set.py index b337b68891..bdf2f4f99b 100644 --- a/sdk/python/pulumi_azure/iot/time_series_insights_reference_data_set.py +++ b/sdk/python/pulumi_azure/iot/time_series_insights_reference_data_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,16 +31,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created. Must be globally unique. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "key_properties", key_properties) - pulumi.set(__self__, "time_series_insights_environment_id", time_series_insights_environment_id) + TimeSeriesInsightsReferenceDataSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_properties=key_properties, + time_series_insights_environment_id=time_series_insights_environment_id, + data_string_comparison_behavior=data_string_comparison_behavior, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_properties: Optional[pulumi.Input[Sequence[pulumi.Input['TimeSeriesInsightsReferenceDataSetKeyPropertyArgs']]]] = None, + time_series_insights_environment_id: Optional[pulumi.Input[str]] = None, + data_string_comparison_behavior: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_properties is None and 'keyProperties' in kwargs: + key_properties = kwargs['keyProperties'] + if key_properties is None: + raise TypeError("Missing 'key_properties' argument") + if time_series_insights_environment_id is None and 'timeSeriesInsightsEnvironmentId' in kwargs: + time_series_insights_environment_id = kwargs['timeSeriesInsightsEnvironmentId'] + if time_series_insights_environment_id is None: + raise TypeError("Missing 'time_series_insights_environment_id' argument") + if data_string_comparison_behavior is None and 'dataStringComparisonBehavior' in kwargs: + data_string_comparison_behavior = kwargs['dataStringComparisonBehavior'] + + _setter("key_properties", key_properties) + _setter("time_series_insights_environment_id", time_series_insights_environment_id) if data_string_comparison_behavior is not None: - pulumi.set(__self__, "data_string_comparison_behavior", data_string_comparison_behavior) + _setter("data_string_comparison_behavior", data_string_comparison_behavior) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="keyProperties") @@ -133,18 +164,45 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] time_series_insights_environment_id: The resource ID of the Azure IoT Time Series Insights Environment in which to create the Azure IoT Time Series Insights Reference Data Set. Changing this forces a new resource to be created. """ + _TimeSeriesInsightsReferenceDataSetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_string_comparison_behavior=data_string_comparison_behavior, + key_properties=key_properties, + location=location, + name=name, + tags=tags, + time_series_insights_environment_id=time_series_insights_environment_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_string_comparison_behavior: Optional[pulumi.Input[str]] = None, + key_properties: Optional[pulumi.Input[Sequence[pulumi.Input['TimeSeriesInsightsReferenceDataSetKeyPropertyArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + time_series_insights_environment_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_string_comparison_behavior is None and 'dataStringComparisonBehavior' in kwargs: + data_string_comparison_behavior = kwargs['dataStringComparisonBehavior'] + if key_properties is None and 'keyProperties' in kwargs: + key_properties = kwargs['keyProperties'] + if time_series_insights_environment_id is None and 'timeSeriesInsightsEnvironmentId' in kwargs: + time_series_insights_environment_id = kwargs['timeSeriesInsightsEnvironmentId'] + if data_string_comparison_behavior is not None: - pulumi.set(__self__, "data_string_comparison_behavior", data_string_comparison_behavior) + _setter("data_string_comparison_behavior", data_string_comparison_behavior) if key_properties is not None: - pulumi.set(__self__, "key_properties", key_properties) + _setter("key_properties", key_properties) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if time_series_insights_environment_id is not None: - pulumi.set(__self__, "time_series_insights_environment_id", time_series_insights_environment_id) + _setter("time_series_insights_environment_id", time_series_insights_environment_id) @property @pulumi.getter(name="dataStringComparisonBehavior") @@ -320,6 +378,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TimeSeriesInsightsReferenceDataSetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iot/time_series_insights_standard_environment.py b/sdk/python/pulumi_azure/iot/time_series_insights_standard_environment.py index a6bcf67a5f..15a3c13505 100644 --- a/sdk/python/pulumi_azure/iot/time_series_insights_standard_environment.py +++ b/sdk/python/pulumi_azure/iot/time_series_insights_standard_environment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TimeSeriesInsightsStandardEnvironmentArgs', 'TimeSeriesInsightsStandardEnvironment'] @@ -33,19 +33,60 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_limit_exceeded_behavior: Specifies the behaviour the IoT Time Series Insights service should take when the environment's capacity has been exceeded. Valid values include `PauseIngress` and `PurgeOldData`. Defaults to `PurgeOldData`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "data_retention_time", data_retention_time) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + TimeSeriesInsightsStandardEnvironmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_retention_time=data_retention_time, + resource_group_name=resource_group_name, + sku_name=sku_name, + location=location, + name=name, + partition_key=partition_key, + storage_limit_exceeded_behavior=storage_limit_exceeded_behavior, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_retention_time: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + storage_limit_exceeded_behavior: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_retention_time is None and 'dataRetentionTime' in kwargs: + data_retention_time = kwargs['dataRetentionTime'] + if data_retention_time is None: + raise TypeError("Missing 'data_retention_time' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + if storage_limit_exceeded_behavior is None and 'storageLimitExceededBehavior' in kwargs: + storage_limit_exceeded_behavior = kwargs['storageLimitExceededBehavior'] + + _setter("data_retention_time", data_retention_time) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key is not None: - pulumi.set(__self__, "partition_key", partition_key) + _setter("partition_key", partition_key) if storage_limit_exceeded_behavior is not None: - pulumi.set(__self__, "storage_limit_exceeded_behavior", storage_limit_exceeded_behavior) + _setter("storage_limit_exceeded_behavior", storage_limit_exceeded_behavior) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dataRetentionTime") @@ -166,22 +207,57 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_limit_exceeded_behavior: Specifies the behaviour the IoT Time Series Insights service should take when the environment's capacity has been exceeded. Valid values include `PauseIngress` and `PurgeOldData`. Defaults to `PurgeOldData`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _TimeSeriesInsightsStandardEnvironmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_retention_time=data_retention_time, + location=location, + name=name, + partition_key=partition_key, + resource_group_name=resource_group_name, + sku_name=sku_name, + storage_limit_exceeded_behavior=storage_limit_exceeded_behavior, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_retention_time: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storage_limit_exceeded_behavior: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_retention_time is None and 'dataRetentionTime' in kwargs: + data_retention_time = kwargs['dataRetentionTime'] + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if storage_limit_exceeded_behavior is None and 'storageLimitExceededBehavior' in kwargs: + storage_limit_exceeded_behavior = kwargs['storageLimitExceededBehavior'] + if data_retention_time is not None: - pulumi.set(__self__, "data_retention_time", data_retention_time) + _setter("data_retention_time", data_retention_time) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key is not None: - pulumi.set(__self__, "partition_key", partition_key) + _setter("partition_key", partition_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if storage_limit_exceeded_behavior is not None: - pulumi.set(__self__, "storage_limit_exceeded_behavior", storage_limit_exceeded_behavior) + _setter("storage_limit_exceeded_behavior", storage_limit_exceeded_behavior) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dataRetentionTime") @@ -371,6 +447,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TimeSeriesInsightsStandardEnvironmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iotcentral/_inputs.py b/sdk/python/pulumi_azure/iotcentral/_inputs.py index 4d345a50f1..9f956b48e1 100644 --- a/sdk/python/pulumi_azure/iotcentral/_inputs.py +++ b/sdk/python/pulumi_azure/iotcentral/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -25,11 +25,32 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ApplicationIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -77,8 +98,27 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_mask: The IP address range in CIDR notation for the IP Rule. :param pulumi.Input[str] name: The name of the IP Rule """ - pulumi.set(__self__, "ip_mask", ip_mask) - pulumi.set(__self__, "name", name) + ApplicationNetworkRuleSetIpRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("ip_mask", ip_mask) + _setter("name", name) @property @pulumi.getter(name="ipMask") diff --git a/sdk/python/pulumi_azure/iotcentral/application.py b/sdk/python/pulumi_azure/iotcentral/application.py index dd09a89991..8aefd2efca 100644 --- a/sdk/python/pulumi_azure/iotcentral/application.py +++ b/sdk/python/pulumi_azure/iotcentral/application.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,24 +41,65 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] template: A `template` name. IoT Central application template name. Default is a custom application. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sub_domain", sub_domain) + ApplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sub_domain=sub_domain, + display_name=display_name, + identity=identity, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + sku=sku, + tags=tags, + template=template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sub_domain: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ApplicationIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + template: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sub_domain is None and 'subDomain' in kwargs: + sub_domain = kwargs['subDomain'] + if sub_domain is None: + raise TypeError("Missing 'sub_domain' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) + _setter("sub_domain", sub_domain) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if template is not None: - pulumi.set(__self__, "template", template) + _setter("template", template) @property @pulumi.getter(name="resourceGroupName") @@ -211,26 +252,63 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] template: A `template` name. IoT Central application template name. Default is a custom application. Changing this forces a new resource to be created. """ + _ApplicationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + identity=identity, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + sku=sku, + sub_domain=sub_domain, + tags=tags, + template=template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ApplicationIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + sub_domain: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + template: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sub_domain is None and 'subDomain' in kwargs: + sub_domain = kwargs['subDomain'] + if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if sub_domain is not None: - pulumi.set(__self__, "sub_domain", sub_domain) + _setter("sub_domain", sub_domain) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if template is not None: - pulumi.set(__self__, "template", template) + _setter("template", template) @property @pulumi.getter(name="displayName") @@ -462,6 +540,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApplicationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -487,6 +569,11 @@ def _internal_init(__self__, __props__ = ApplicationArgs.__new__(ApplicationArgs) __props__.__dict__["display_name"] = display_name + if identity is not None and not isinstance(identity, ApplicationIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ApplicationIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/iotcentral/application_network_rule_set.py b/sdk/python/pulumi_azure/iotcentral/application_network_rule_set.py index acde88e49c..d8601c8927 100644 --- a/sdk/python/pulumi_azure/iotcentral/application_network_rule_set.py +++ b/sdk/python/pulumi_azure/iotcentral/application_network_rule_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,13 +27,40 @@ def __init__(__self__, *, :param pulumi.Input[str] default_action: Specifies the default action for the IoT Central Application Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Deny`. :param pulumi.Input[Sequence[pulumi.Input['ApplicationNetworkRuleSetIpRuleArgs']]] ip_rules: One or more `ip_rule` blocks as defined below. """ - pulumi.set(__self__, "iotcentral_application_id", iotcentral_application_id) + ApplicationNetworkRuleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + iotcentral_application_id=iotcentral_application_id, + apply_to_device=apply_to_device, + default_action=default_action, + ip_rules=ip_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + iotcentral_application_id: Optional[pulumi.Input[str]] = None, + apply_to_device: Optional[pulumi.Input[bool]] = None, + default_action: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationNetworkRuleSetIpRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if iotcentral_application_id is None and 'iotcentralApplicationId' in kwargs: + iotcentral_application_id = kwargs['iotcentralApplicationId'] + if iotcentral_application_id is None: + raise TypeError("Missing 'iotcentral_application_id' argument") + if apply_to_device is None and 'applyToDevice' in kwargs: + apply_to_device = kwargs['applyToDevice'] + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + + _setter("iotcentral_application_id", iotcentral_application_id) if apply_to_device is not None: - pulumi.set(__self__, "apply_to_device", apply_to_device) + _setter("apply_to_device", apply_to_device) if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) @property @pulumi.getter(name="iotcentralApplicationId") @@ -98,14 +125,39 @@ def __init__(__self__, *, :param pulumi.Input[str] iotcentral_application_id: The ID of the IoT Central Application. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['ApplicationNetworkRuleSetIpRuleArgs']]] ip_rules: One or more `ip_rule` blocks as defined below. """ + _ApplicationNetworkRuleSetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + apply_to_device=apply_to_device, + default_action=default_action, + iotcentral_application_id=iotcentral_application_id, + ip_rules=ip_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + apply_to_device: Optional[pulumi.Input[bool]] = None, + default_action: Optional[pulumi.Input[str]] = None, + iotcentral_application_id: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationNetworkRuleSetIpRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if apply_to_device is None and 'applyToDevice' in kwargs: + apply_to_device = kwargs['applyToDevice'] + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if iotcentral_application_id is None and 'iotcentralApplicationId' in kwargs: + iotcentral_application_id = kwargs['iotcentralApplicationId'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if apply_to_device is not None: - pulumi.set(__self__, "apply_to_device", apply_to_device) + _setter("apply_to_device", apply_to_device) if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if iotcentral_application_id is not None: - pulumi.set(__self__, "iotcentral_application_id", iotcentral_application_id) + _setter("iotcentral_application_id", iotcentral_application_id) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) @property @pulumi.getter(name="applyToDevice") @@ -271,6 +323,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApplicationNetworkRuleSetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/iotcentral/outputs.py b/sdk/python/pulumi_azure/iotcentral/outputs.py index 7e00044d5b..df1419223b 100644 --- a/sdk/python/pulumi_azure/iotcentral/outputs.py +++ b/sdk/python/pulumi_azure/iotcentral/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -44,11 +44,32 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ApplicationIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -101,8 +122,27 @@ def __init__(__self__, *, :param str ip_mask: The IP address range in CIDR notation for the IP Rule. :param str name: The name of the IP Rule """ - pulumi.set(__self__, "ip_mask", ip_mask) - pulumi.set(__self__, "name", name) + ApplicationNetworkRuleSetIpRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_mask=ip_mask, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_mask: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_mask is None and 'ipMask' in kwargs: + ip_mask = kwargs['ipMask'] + if ip_mask is None: + raise TypeError("Missing 'ip_mask' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("ip_mask", ip_mask) + _setter("name", name) @property @pulumi.getter(name="ipMask") diff --git a/sdk/python/pulumi_azure/keyvault/_inputs.py b/sdk/python/pulumi_azure/keyvault/_inputs.py index 2a78efb36d..e602370f90 100644 --- a/sdk/python/pulumi_azure/keyvault/_inputs.py +++ b/sdk/python/pulumi_azure/keyvault/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -60,9 +60,24 @@ def __init__(__self__, *, The PEM content should look something like: """ - pulumi.set(__self__, "contents", contents) + CertifiateCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + contents=contents, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contents: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if contents is None: + raise TypeError("Missing 'contents' argument") + + _setter("contents", contents) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -115,18 +130,43 @@ def __init__(__self__, *, :param pulumi.Input[str] recovery_level: The deletion recovery level of the Key Vault Certificate. :param pulumi.Input[str] updated: The recent update time of the Key Vault Certificate. """ + CertifiateCertificateAttributeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + created=created, + enabled=enabled, + expires=expires, + not_before=not_before, + recovery_level=recovery_level, + updated=updated, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + created: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + expires: Optional[pulumi.Input[str]] = None, + not_before: Optional[pulumi.Input[str]] = None, + recovery_level: Optional[pulumi.Input[str]] = None, + updated: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_before is None and 'notBefore' in kwargs: + not_before = kwargs['notBefore'] + if recovery_level is None and 'recoveryLevel' in kwargs: + recovery_level = kwargs['recoveryLevel'] + if created is not None: - pulumi.set(__self__, "created", created) + _setter("created", created) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if expires is not None: - pulumi.set(__self__, "expires", expires) + _setter("expires", expires) if not_before is not None: - pulumi.set(__self__, "not_before", not_before) + _setter("not_before", not_before) if recovery_level is not None: - pulumi.set(__self__, "recovery_level", recovery_level) + _setter("recovery_level", recovery_level) if updated is not None: - pulumi.set(__self__, "updated", updated) + _setter("updated", updated) @property @pulumi.getter @@ -216,13 +256,48 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['CertifiateCertificatePolicyLifetimeActionArgs']]] lifetime_actions: A `lifetime_action` block as defined below. :param pulumi.Input['CertifiateCertificatePolicyX509CertificatePropertiesArgs'] x509_certificate_properties: A `x509_certificate_properties` block as defined below. Required when `certificate` block is not specified. """ - pulumi.set(__self__, "issuer_parameters", issuer_parameters) - pulumi.set(__self__, "key_properties", key_properties) - pulumi.set(__self__, "secret_properties", secret_properties) + CertifiateCertificatePolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + issuer_parameters=issuer_parameters, + key_properties=key_properties, + secret_properties=secret_properties, + lifetime_actions=lifetime_actions, + x509_certificate_properties=x509_certificate_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + issuer_parameters: Optional[pulumi.Input['CertifiateCertificatePolicyIssuerParametersArgs']] = None, + key_properties: Optional[pulumi.Input['CertifiateCertificatePolicyKeyPropertiesArgs']] = None, + secret_properties: Optional[pulumi.Input['CertifiateCertificatePolicySecretPropertiesArgs']] = None, + lifetime_actions: Optional[pulumi.Input[Sequence[pulumi.Input['CertifiateCertificatePolicyLifetimeActionArgs']]]] = None, + x509_certificate_properties: Optional[pulumi.Input['CertifiateCertificatePolicyX509CertificatePropertiesArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if issuer_parameters is None and 'issuerParameters' in kwargs: + issuer_parameters = kwargs['issuerParameters'] + if issuer_parameters is None: + raise TypeError("Missing 'issuer_parameters' argument") + if key_properties is None and 'keyProperties' in kwargs: + key_properties = kwargs['keyProperties'] + if key_properties is None: + raise TypeError("Missing 'key_properties' argument") + if secret_properties is None and 'secretProperties' in kwargs: + secret_properties = kwargs['secretProperties'] + if secret_properties is None: + raise TypeError("Missing 'secret_properties' argument") + if lifetime_actions is None and 'lifetimeActions' in kwargs: + lifetime_actions = kwargs['lifetimeActions'] + if x509_certificate_properties is None and 'x509CertificateProperties' in kwargs: + x509_certificate_properties = kwargs['x509CertificateProperties'] + + _setter("issuer_parameters", issuer_parameters) + _setter("key_properties", key_properties) + _setter("secret_properties", secret_properties) if lifetime_actions is not None: - pulumi.set(__self__, "lifetime_actions", lifetime_actions) + _setter("lifetime_actions", lifetime_actions) if x509_certificate_properties is not None: - pulumi.set(__self__, "x509_certificate_properties", x509_certificate_properties) + _setter("x509_certificate_properties", x509_certificate_properties) @property @pulumi.getter(name="issuerParameters") @@ -292,7 +367,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] name: The name of the Certificate Issuer. Possible values include `Self` (for self-signed certificate), or `Unknown` (for a certificate issuing authority like `Let's Encrypt` and Azure direct supported ones). Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + CertifiateCertificatePolicyIssuerParametersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -322,13 +410,44 @@ def __init__(__self__, *, :param pulumi.Input[str] curve: Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `key_type` is `EC` or `EC-HSM`. Changing this forces a new resource to be created. :param pulumi.Input[int] key_size: The size of the key used in the certificate. Possible values include `2048`, `3072`, and `4096` for `RSA` keys, or `256`, `384`, and `521` for `EC` keys. This property is required when using RSA keys. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "exportable", exportable) - pulumi.set(__self__, "key_type", key_type) - pulumi.set(__self__, "reuse_key", reuse_key) + CertifiateCertificatePolicyKeyPropertiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + exportable=exportable, + key_type=key_type, + reuse_key=reuse_key, + curve=curve, + key_size=key_size, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exportable: Optional[pulumi.Input[bool]] = None, + key_type: Optional[pulumi.Input[str]] = None, + reuse_key: Optional[pulumi.Input[bool]] = None, + curve: Optional[pulumi.Input[str]] = None, + key_size: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exportable is None: + raise TypeError("Missing 'exportable' argument") + if key_type is None and 'keyType' in kwargs: + key_type = kwargs['keyType'] + if key_type is None: + raise TypeError("Missing 'key_type' argument") + if reuse_key is None and 'reuseKey' in kwargs: + reuse_key = kwargs['reuseKey'] + if reuse_key is None: + raise TypeError("Missing 'reuse_key' argument") + if key_size is None and 'keySize' in kwargs: + key_size = kwargs['keySize'] + + _setter("exportable", exportable) + _setter("key_type", key_type) + _setter("reuse_key", reuse_key) if curve is not None: - pulumi.set(__self__, "curve", curve) + _setter("curve", curve) if key_size is not None: - pulumi.set(__self__, "key_size", key_size) + _setter("key_size", key_size) @property @pulumi.getter @@ -400,8 +519,25 @@ def __init__(__self__, *, :param pulumi.Input['CertifiateCertificatePolicyLifetimeActionActionArgs'] action: A `action` block as defined below. :param pulumi.Input['CertifiateCertificatePolicyLifetimeActionTriggerArgs'] trigger: A `trigger` block as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "trigger", trigger) + CertifiateCertificatePolicyLifetimeActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + trigger=trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input['CertifiateCertificatePolicyLifetimeActionActionArgs']] = None, + trigger: Optional[pulumi.Input['CertifiateCertificatePolicyLifetimeActionTriggerArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if trigger is None: + raise TypeError("Missing 'trigger' argument") + + _setter("action", action) + _setter("trigger", trigger) @property @pulumi.getter @@ -435,7 +571,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] action_type: The Type of action to be performed when the lifetime trigger is triggerec. Possible values include `AutoRenew` and `EmailContacts`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "action_type", action_type) + CertifiateCertificatePolicyLifetimeActionActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + + _setter("action_type", action_type) @property @pulumi.getter(name="actionType") @@ -459,10 +610,27 @@ def __init__(__self__, *, :param pulumi.Input[int] days_before_expiry: The number of days before the Certificate expires that the action associated with this Trigger should run. Changing this forces a new resource to be created. Conflicts with `lifetime_percentage`. :param pulumi.Input[int] lifetime_percentage: The percentage at which during the Certificates Lifetime the action associated with this Trigger should run. Changing this forces a new resource to be created. Conflicts with `days_before_expiry`. """ + CertifiateCertificatePolicyLifetimeActionTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_before_expiry=days_before_expiry, + lifetime_percentage=lifetime_percentage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_before_expiry: Optional[pulumi.Input[int]] = None, + lifetime_percentage: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_before_expiry is None and 'daysBeforeExpiry' in kwargs: + days_before_expiry = kwargs['daysBeforeExpiry'] + if lifetime_percentage is None and 'lifetimePercentage' in kwargs: + lifetime_percentage = kwargs['lifetimePercentage'] + if days_before_expiry is not None: - pulumi.set(__self__, "days_before_expiry", days_before_expiry) + _setter("days_before_expiry", days_before_expiry) if lifetime_percentage is not None: - pulumi.set(__self__, "lifetime_percentage", lifetime_percentage) + _setter("lifetime_percentage", lifetime_percentage) @property @pulumi.getter(name="daysBeforeExpiry") @@ -496,7 +664,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] content_type: The Content-Type of the Certificate, such as `application/x-pkcs12` for a PFX or `application/x-pem-file` for a PEM. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "content_type", content_type) + CertifiateCertificatePolicySecretPropertiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if content_type is None: + raise TypeError("Missing 'content_type' argument") + + _setter("content_type", content_type) @property @pulumi.getter(name="contentType") @@ -526,13 +709,46 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] extended_key_usages: A list of Extended/Enhanced Key Usages. Changing this forces a new resource to be created. :param pulumi.Input['CertifiateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNamesArgs'] subject_alternative_names: A `subject_alternative_names` block as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "key_usages", key_usages) - pulumi.set(__self__, "subject", subject) - pulumi.set(__self__, "validity_in_months", validity_in_months) + CertifiateCertificatePolicyX509CertificatePropertiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_usages=key_usages, + subject=subject, + validity_in_months=validity_in_months, + extended_key_usages=extended_key_usages, + subject_alternative_names=subject_alternative_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_usages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subject: Optional[pulumi.Input[str]] = None, + validity_in_months: Optional[pulumi.Input[int]] = None, + extended_key_usages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subject_alternative_names: Optional[pulumi.Input['CertifiateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNamesArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_usages is None and 'keyUsages' in kwargs: + key_usages = kwargs['keyUsages'] + if key_usages is None: + raise TypeError("Missing 'key_usages' argument") + if subject is None: + raise TypeError("Missing 'subject' argument") + if validity_in_months is None and 'validityInMonths' in kwargs: + validity_in_months = kwargs['validityInMonths'] + if validity_in_months is None: + raise TypeError("Missing 'validity_in_months' argument") + if extended_key_usages is None and 'extendedKeyUsages' in kwargs: + extended_key_usages = kwargs['extendedKeyUsages'] + if subject_alternative_names is None and 'subjectAlternativeNames' in kwargs: + subject_alternative_names = kwargs['subjectAlternativeNames'] + + _setter("key_usages", key_usages) + _setter("subject", subject) + _setter("validity_in_months", validity_in_months) if extended_key_usages is not None: - pulumi.set(__self__, "extended_key_usages", extended_key_usages) + _setter("extended_key_usages", extended_key_usages) if subject_alternative_names is not None: - pulumi.set(__self__, "subject_alternative_names", subject_alternative_names) + _setter("subject_alternative_names", subject_alternative_names) @property @pulumi.getter(name="keyUsages") @@ -606,12 +822,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] emails: A list of email addresses identified by this Certificate. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] upns: A list of User Principal Names identified by the Certificate. Changing this forces a new resource to be created. """ + CertifiateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNamesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_names=dns_names, + emails=emails, + upns=upns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + upns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_names is None and 'dnsNames' in kwargs: + dns_names = kwargs['dnsNames'] + if dns_names is not None: - pulumi.set(__self__, "dns_names", dns_names) + _setter("dns_names", dns_names) if emails is not None: - pulumi.set(__self__, "emails", emails) + _setter("emails", emails) if upns is not None: - pulumi.set(__self__, "upns", upns) + _setter("upns", upns) @property @pulumi.getter(name="dnsNames") @@ -668,9 +901,24 @@ def __init__(__self__, *, The PEM content should look something like: """ - pulumi.set(__self__, "contents", contents) + CertificateCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + contents=contents, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contents: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if contents is None: + raise TypeError("Missing 'contents' argument") + + _setter("contents", contents) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -723,18 +971,43 @@ def __init__(__self__, *, :param pulumi.Input[str] recovery_level: The deletion recovery level of the Key Vault Certificate. :param pulumi.Input[str] updated: The recent update time of the Key Vault Certificate. """ + CertificateCertificateAttributeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + created=created, + enabled=enabled, + expires=expires, + not_before=not_before, + recovery_level=recovery_level, + updated=updated, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + created: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + expires: Optional[pulumi.Input[str]] = None, + not_before: Optional[pulumi.Input[str]] = None, + recovery_level: Optional[pulumi.Input[str]] = None, + updated: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_before is None and 'notBefore' in kwargs: + not_before = kwargs['notBefore'] + if recovery_level is None and 'recoveryLevel' in kwargs: + recovery_level = kwargs['recoveryLevel'] + if created is not None: - pulumi.set(__self__, "created", created) + _setter("created", created) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if expires is not None: - pulumi.set(__self__, "expires", expires) + _setter("expires", expires) if not_before is not None: - pulumi.set(__self__, "not_before", not_before) + _setter("not_before", not_before) if recovery_level is not None: - pulumi.set(__self__, "recovery_level", recovery_level) + _setter("recovery_level", recovery_level) if updated is not None: - pulumi.set(__self__, "updated", updated) + _setter("updated", updated) @property @pulumi.getter @@ -824,13 +1097,48 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['CertificateCertificatePolicyLifetimeActionArgs']]] lifetime_actions: A `lifetime_action` block as defined below. :param pulumi.Input['CertificateCertificatePolicyX509CertificatePropertiesArgs'] x509_certificate_properties: A `x509_certificate_properties` block as defined below. Required when `certificate` block is not specified. """ - pulumi.set(__self__, "issuer_parameters", issuer_parameters) - pulumi.set(__self__, "key_properties", key_properties) - pulumi.set(__self__, "secret_properties", secret_properties) + CertificateCertificatePolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + issuer_parameters=issuer_parameters, + key_properties=key_properties, + secret_properties=secret_properties, + lifetime_actions=lifetime_actions, + x509_certificate_properties=x509_certificate_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + issuer_parameters: Optional[pulumi.Input['CertificateCertificatePolicyIssuerParametersArgs']] = None, + key_properties: Optional[pulumi.Input['CertificateCertificatePolicyKeyPropertiesArgs']] = None, + secret_properties: Optional[pulumi.Input['CertificateCertificatePolicySecretPropertiesArgs']] = None, + lifetime_actions: Optional[pulumi.Input[Sequence[pulumi.Input['CertificateCertificatePolicyLifetimeActionArgs']]]] = None, + x509_certificate_properties: Optional[pulumi.Input['CertificateCertificatePolicyX509CertificatePropertiesArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if issuer_parameters is None and 'issuerParameters' in kwargs: + issuer_parameters = kwargs['issuerParameters'] + if issuer_parameters is None: + raise TypeError("Missing 'issuer_parameters' argument") + if key_properties is None and 'keyProperties' in kwargs: + key_properties = kwargs['keyProperties'] + if key_properties is None: + raise TypeError("Missing 'key_properties' argument") + if secret_properties is None and 'secretProperties' in kwargs: + secret_properties = kwargs['secretProperties'] + if secret_properties is None: + raise TypeError("Missing 'secret_properties' argument") + if lifetime_actions is None and 'lifetimeActions' in kwargs: + lifetime_actions = kwargs['lifetimeActions'] + if x509_certificate_properties is None and 'x509CertificateProperties' in kwargs: + x509_certificate_properties = kwargs['x509CertificateProperties'] + + _setter("issuer_parameters", issuer_parameters) + _setter("key_properties", key_properties) + _setter("secret_properties", secret_properties) if lifetime_actions is not None: - pulumi.set(__self__, "lifetime_actions", lifetime_actions) + _setter("lifetime_actions", lifetime_actions) if x509_certificate_properties is not None: - pulumi.set(__self__, "x509_certificate_properties", x509_certificate_properties) + _setter("x509_certificate_properties", x509_certificate_properties) @property @pulumi.getter(name="issuerParameters") @@ -900,7 +1208,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] name: The name of the Certificate Issuer. Possible values include `Self` (for self-signed certificate), or `Unknown` (for a certificate issuing authority like `Let's Encrypt` and Azure direct supported ones). Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + CertificateCertificatePolicyIssuerParametersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -930,13 +1251,44 @@ def __init__(__self__, *, :param pulumi.Input[str] curve: Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `key_type` is `EC` or `EC-HSM`. Changing this forces a new resource to be created. :param pulumi.Input[int] key_size: The size of the key used in the certificate. Possible values include `2048`, `3072`, and `4096` for `RSA` keys, or `256`, `384`, and `521` for `EC` keys. This property is required when using RSA keys. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "exportable", exportable) - pulumi.set(__self__, "key_type", key_type) - pulumi.set(__self__, "reuse_key", reuse_key) + CertificateCertificatePolicyKeyPropertiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + exportable=exportable, + key_type=key_type, + reuse_key=reuse_key, + curve=curve, + key_size=key_size, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exportable: Optional[pulumi.Input[bool]] = None, + key_type: Optional[pulumi.Input[str]] = None, + reuse_key: Optional[pulumi.Input[bool]] = None, + curve: Optional[pulumi.Input[str]] = None, + key_size: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exportable is None: + raise TypeError("Missing 'exportable' argument") + if key_type is None and 'keyType' in kwargs: + key_type = kwargs['keyType'] + if key_type is None: + raise TypeError("Missing 'key_type' argument") + if reuse_key is None and 'reuseKey' in kwargs: + reuse_key = kwargs['reuseKey'] + if reuse_key is None: + raise TypeError("Missing 'reuse_key' argument") + if key_size is None and 'keySize' in kwargs: + key_size = kwargs['keySize'] + + _setter("exportable", exportable) + _setter("key_type", key_type) + _setter("reuse_key", reuse_key) if curve is not None: - pulumi.set(__self__, "curve", curve) + _setter("curve", curve) if key_size is not None: - pulumi.set(__self__, "key_size", key_size) + _setter("key_size", key_size) @property @pulumi.getter @@ -1008,8 +1360,25 @@ def __init__(__self__, *, :param pulumi.Input['CertificateCertificatePolicyLifetimeActionActionArgs'] action: A `action` block as defined below. :param pulumi.Input['CertificateCertificatePolicyLifetimeActionTriggerArgs'] trigger: A `trigger` block as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "trigger", trigger) + CertificateCertificatePolicyLifetimeActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + trigger=trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input['CertificateCertificatePolicyLifetimeActionActionArgs']] = None, + trigger: Optional[pulumi.Input['CertificateCertificatePolicyLifetimeActionTriggerArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if trigger is None: + raise TypeError("Missing 'trigger' argument") + + _setter("action", action) + _setter("trigger", trigger) @property @pulumi.getter @@ -1043,7 +1412,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] action_type: The Type of action to be performed when the lifetime trigger is triggerec. Possible values include `AutoRenew` and `EmailContacts`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "action_type", action_type) + CertificateCertificatePolicyLifetimeActionActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + + _setter("action_type", action_type) @property @pulumi.getter(name="actionType") @@ -1067,10 +1451,27 @@ def __init__(__self__, *, :param pulumi.Input[int] days_before_expiry: The number of days before the Certificate expires that the action associated with this Trigger should run. Changing this forces a new resource to be created. Conflicts with `lifetime_percentage`. :param pulumi.Input[int] lifetime_percentage: The percentage at which during the Certificates Lifetime the action associated with this Trigger should run. Changing this forces a new resource to be created. Conflicts with `days_before_expiry`. """ + CertificateCertificatePolicyLifetimeActionTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_before_expiry=days_before_expiry, + lifetime_percentage=lifetime_percentage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_before_expiry: Optional[pulumi.Input[int]] = None, + lifetime_percentage: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_before_expiry is None and 'daysBeforeExpiry' in kwargs: + days_before_expiry = kwargs['daysBeforeExpiry'] + if lifetime_percentage is None and 'lifetimePercentage' in kwargs: + lifetime_percentage = kwargs['lifetimePercentage'] + if days_before_expiry is not None: - pulumi.set(__self__, "days_before_expiry", days_before_expiry) + _setter("days_before_expiry", days_before_expiry) if lifetime_percentage is not None: - pulumi.set(__self__, "lifetime_percentage", lifetime_percentage) + _setter("lifetime_percentage", lifetime_percentage) @property @pulumi.getter(name="daysBeforeExpiry") @@ -1104,7 +1505,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] content_type: The Content-Type of the Certificate, such as `application/x-pkcs12` for a PFX or `application/x-pem-file` for a PEM. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "content_type", content_type) + CertificateCertificatePolicySecretPropertiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if content_type is None: + raise TypeError("Missing 'content_type' argument") + + _setter("content_type", content_type) @property @pulumi.getter(name="contentType") @@ -1134,13 +1550,46 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] extended_key_usages: A list of Extended/Enhanced Key Usages. Changing this forces a new resource to be created. :param pulumi.Input['CertificateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNamesArgs'] subject_alternative_names: A `subject_alternative_names` block as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "key_usages", key_usages) - pulumi.set(__self__, "subject", subject) - pulumi.set(__self__, "validity_in_months", validity_in_months) + CertificateCertificatePolicyX509CertificatePropertiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_usages=key_usages, + subject=subject, + validity_in_months=validity_in_months, + extended_key_usages=extended_key_usages, + subject_alternative_names=subject_alternative_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_usages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subject: Optional[pulumi.Input[str]] = None, + validity_in_months: Optional[pulumi.Input[int]] = None, + extended_key_usages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subject_alternative_names: Optional[pulumi.Input['CertificateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNamesArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_usages is None and 'keyUsages' in kwargs: + key_usages = kwargs['keyUsages'] + if key_usages is None: + raise TypeError("Missing 'key_usages' argument") + if subject is None: + raise TypeError("Missing 'subject' argument") + if validity_in_months is None and 'validityInMonths' in kwargs: + validity_in_months = kwargs['validityInMonths'] + if validity_in_months is None: + raise TypeError("Missing 'validity_in_months' argument") + if extended_key_usages is None and 'extendedKeyUsages' in kwargs: + extended_key_usages = kwargs['extendedKeyUsages'] + if subject_alternative_names is None and 'subjectAlternativeNames' in kwargs: + subject_alternative_names = kwargs['subjectAlternativeNames'] + + _setter("key_usages", key_usages) + _setter("subject", subject) + _setter("validity_in_months", validity_in_months) if extended_key_usages is not None: - pulumi.set(__self__, "extended_key_usages", extended_key_usages) + _setter("extended_key_usages", extended_key_usages) if subject_alternative_names is not None: - pulumi.set(__self__, "subject_alternative_names", subject_alternative_names) + _setter("subject_alternative_names", subject_alternative_names) @property @pulumi.getter(name="keyUsages") @@ -1214,12 +1663,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] emails: A list of email addresses identified by this Certificate. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] upns: A list of User Principal Names identified by the Certificate. Changing this forces a new resource to be created. """ + CertificateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNamesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_names=dns_names, + emails=emails, + upns=upns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + upns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_names is None and 'dnsNames' in kwargs: + dns_names = kwargs['dnsNames'] + if dns_names is not None: - pulumi.set(__self__, "dns_names", dns_names) + _setter("dns_names", dns_names) if emails is not None: - pulumi.set(__self__, "emails", emails) + _setter("emails", emails) if upns is not None: - pulumi.set(__self__, "upns", upns) + _setter("upns", upns) @property @pulumi.getter(name="dnsNames") @@ -1269,11 +1735,28 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Name of the contact. :param pulumi.Input[str] phone: Phone number of the contact. """ - pulumi.set(__self__, "email", email) + CertificateContactsContactArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + name=name, + phone=phone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + phone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + + _setter("email", email) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if phone is not None: - pulumi.set(__self__, "phone", phone) + _setter("phone", phone) @property @pulumi.getter @@ -1325,13 +1808,38 @@ def __init__(__self__, *, :param pulumi.Input[str] last_name: Last name of the admin. :param pulumi.Input[str] phone: Phone number of the admin. """ - pulumi.set(__self__, "email_address", email_address) + CertificateIssuerAdminArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_address=email_address, + first_name=first_name, + last_name=last_name, + phone=phone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_address: Optional[pulumi.Input[str]] = None, + first_name: Optional[pulumi.Input[str]] = None, + last_name: Optional[pulumi.Input[str]] = None, + phone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_address is None and 'emailAddress' in kwargs: + email_address = kwargs['emailAddress'] + if email_address is None: + raise TypeError("Missing 'email_address' argument") + if first_name is None and 'firstName' in kwargs: + first_name = kwargs['firstName'] + if last_name is None and 'lastName' in kwargs: + last_name = kwargs['lastName'] + + _setter("email_address", email_address) if first_name is not None: - pulumi.set(__self__, "first_name", first_name) + _setter("first_name", first_name) if last_name is not None: - pulumi.set(__self__, "last_name", last_name) + _setter("last_name", last_name) if phone is not None: - pulumi.set(__self__, "phone", phone) + _setter("phone", phone) @property @pulumi.getter(name="emailAddress") @@ -1393,12 +1901,31 @@ def __init__(__self__, *, :param pulumi.Input[str] expire_after: Expire a Key Vault Key after given duration as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). :param pulumi.Input[str] notify_before_expiry: Notify at a given duration before expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Default is `P30D`. """ + KeyRotationPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automatic=automatic, + expire_after=expire_after, + notify_before_expiry=notify_before_expiry, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automatic: Optional[pulumi.Input['KeyRotationPolicyAutomaticArgs']] = None, + expire_after: Optional[pulumi.Input[str]] = None, + notify_before_expiry: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expire_after is None and 'expireAfter' in kwargs: + expire_after = kwargs['expireAfter'] + if notify_before_expiry is None and 'notifyBeforeExpiry' in kwargs: + notify_before_expiry = kwargs['notifyBeforeExpiry'] + if automatic is not None: - pulumi.set(__self__, "automatic", automatic) + _setter("automatic", automatic) if expire_after is not None: - pulumi.set(__self__, "expire_after", expire_after) + _setter("expire_after", expire_after) if notify_before_expiry is not None: - pulumi.set(__self__, "notify_before_expiry", notify_before_expiry) + _setter("notify_before_expiry", notify_before_expiry) @property @pulumi.getter @@ -1446,10 +1973,27 @@ def __init__(__self__, *, :param pulumi.Input[str] time_after_creation: Rotate automatically at a duration after create as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). :param pulumi.Input[str] time_before_expiry: Rotate automatically at a duration before expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). """ + KeyRotationPolicyAutomaticArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + time_after_creation=time_after_creation, + time_before_expiry=time_before_expiry, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time_after_creation: Optional[pulumi.Input[str]] = None, + time_before_expiry: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time_after_creation is None and 'timeAfterCreation' in kwargs: + time_after_creation = kwargs['timeAfterCreation'] + if time_before_expiry is None and 'timeBeforeExpiry' in kwargs: + time_before_expiry = kwargs['timeBeforeExpiry'] + if time_after_creation is not None: - pulumi.set(__self__, "time_after_creation", time_after_creation) + _setter("time_after_creation", time_after_creation) if time_before_expiry is not None: - pulumi.set(__self__, "time_before_expiry", time_before_expiry) + _setter("time_before_expiry", time_before_expiry) @property @pulumi.getter(name="timeAfterCreation") @@ -1495,18 +2039,59 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] secret_permissions: List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`. :param pulumi.Input[Sequence[pulumi.Input[str]]] storage_permissions: List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`. """ - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "tenant_id", tenant_id) + KeyVaultAccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + object_id=object_id, + tenant_id=tenant_id, + application_id=application_id, + certificate_permissions=certificate_permissions, + key_permissions=key_permissions, + secret_permissions=secret_permissions, + storage_permissions=storage_permissions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + object_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + application_id: Optional[pulumi.Input[str]] = None, + certificate_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + key_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + secret_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + storage_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if application_id is None and 'applicationId' in kwargs: + application_id = kwargs['applicationId'] + if certificate_permissions is None and 'certificatePermissions' in kwargs: + certificate_permissions = kwargs['certificatePermissions'] + if key_permissions is None and 'keyPermissions' in kwargs: + key_permissions = kwargs['keyPermissions'] + if secret_permissions is None and 'secretPermissions' in kwargs: + secret_permissions = kwargs['secretPermissions'] + if storage_permissions is None and 'storagePermissions' in kwargs: + storage_permissions = kwargs['storagePermissions'] + + _setter("object_id", object_id) + _setter("tenant_id", tenant_id) if application_id is not None: - pulumi.set(__self__, "application_id", application_id) + _setter("application_id", application_id) if certificate_permissions is not None: - pulumi.set(__self__, "certificate_permissions", certificate_permissions) + _setter("certificate_permissions", certificate_permissions) if key_permissions is not None: - pulumi.set(__self__, "key_permissions", key_permissions) + _setter("key_permissions", key_permissions) if secret_permissions is not None: - pulumi.set(__self__, "secret_permissions", secret_permissions) + _setter("secret_permissions", secret_permissions) if storage_permissions is not None: - pulumi.set(__self__, "storage_permissions", storage_permissions) + _setter("storage_permissions", storage_permissions) @property @pulumi.getter(name="objectId") @@ -1604,11 +2189,28 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Name of the contact. :param pulumi.Input[str] phone: Phone number of the contact. """ - pulumi.set(__self__, "email", email) + KeyVaultContactArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + name=name, + phone=phone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + phone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + + _setter("email", email) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if phone is not None: - pulumi.set(__self__, "phone", phone) + _setter("phone", phone) @property @pulumi.getter @@ -1660,12 +2262,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_rules: One or more IP Addresses, or CIDR Blocks which should be able to access the Key Vault. :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_network_subnet_ids: One or more Subnet IDs which should be able to access this Key Vault. """ - pulumi.set(__self__, "bypass", bypass) - pulumi.set(__self__, "default_action", default_action) + KeyVaultNetworkAclsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bypass=bypass, + default_action=default_action, + ip_rules=ip_rules, + virtual_network_subnet_ids=virtual_network_subnet_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bypass: Optional[pulumi.Input[str]] = None, + default_action: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + virtual_network_subnet_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bypass is None: + raise TypeError("Missing 'bypass' argument") + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if default_action is None: + raise TypeError("Missing 'default_action' argument") + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if virtual_network_subnet_ids is None and 'virtualNetworkSubnetIds' in kwargs: + virtual_network_subnet_ids = kwargs['virtualNetworkSubnetIds'] + + _setter("bypass", bypass) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if virtual_network_subnet_ids is not None: - pulumi.set(__self__, "virtual_network_subnet_ids", virtual_network_subnet_ids) + _setter("virtual_network_subnet_ids", virtual_network_subnet_ids) @property @pulumi.getter @@ -1725,8 +2354,27 @@ def __init__(__self__, *, :param pulumi.Input[str] bypass: Specifies which traffic can bypass the network rules. Possible values are `AzureServices` and `None`. :param pulumi.Input[str] default_action: The Default Action to use. Possible values are `Allow` and `Deny`. """ - pulumi.set(__self__, "bypass", bypass) - pulumi.set(__self__, "default_action", default_action) + ManagedHardwareSecurityModuleNetworkAclsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bypass=bypass, + default_action=default_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bypass: Optional[pulumi.Input[str]] = None, + default_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bypass is None: + raise TypeError("Missing 'bypass' argument") + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if default_action is None: + raise TypeError("Missing 'default_action' argument") + + _setter("bypass", bypass) + _setter("default_action", default_action) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/keyvault/access_policy.py b/sdk/python/pulumi_azure/keyvault/access_policy.py index d6686cc238..f75029b02b 100644 --- a/sdk/python/pulumi_azure/keyvault/access_policy.py +++ b/sdk/python/pulumi_azure/keyvault/access_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AccessPolicyArgs', 'AccessPolicy'] @@ -33,19 +33,66 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] secret_permissions: List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`. :param pulumi.Input[Sequence[pulumi.Input[str]]] storage_permissions: List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`. """ - pulumi.set(__self__, "key_vault_id", key_vault_id) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "tenant_id", tenant_id) + AccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_id=key_vault_id, + object_id=object_id, + tenant_id=tenant_id, + application_id=application_id, + certificate_permissions=certificate_permissions, + key_permissions=key_permissions, + secret_permissions=secret_permissions, + storage_permissions=storage_permissions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_id: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + application_id: Optional[pulumi.Input[str]] = None, + certificate_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + key_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + secret_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + storage_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if application_id is None and 'applicationId' in kwargs: + application_id = kwargs['applicationId'] + if certificate_permissions is None and 'certificatePermissions' in kwargs: + certificate_permissions = kwargs['certificatePermissions'] + if key_permissions is None and 'keyPermissions' in kwargs: + key_permissions = kwargs['keyPermissions'] + if secret_permissions is None and 'secretPermissions' in kwargs: + secret_permissions = kwargs['secretPermissions'] + if storage_permissions is None and 'storagePermissions' in kwargs: + storage_permissions = kwargs['storagePermissions'] + + _setter("key_vault_id", key_vault_id) + _setter("object_id", object_id) + _setter("tenant_id", tenant_id) if application_id is not None: - pulumi.set(__self__, "application_id", application_id) + _setter("application_id", application_id) if certificate_permissions is not None: - pulumi.set(__self__, "certificate_permissions", certificate_permissions) + _setter("certificate_permissions", certificate_permissions) if key_permissions is not None: - pulumi.set(__self__, "key_permissions", key_permissions) + _setter("key_permissions", key_permissions) if secret_permissions is not None: - pulumi.set(__self__, "secret_permissions", secret_permissions) + _setter("secret_permissions", secret_permissions) if storage_permissions is not None: - pulumi.set(__self__, "storage_permissions", storage_permissions) + _setter("storage_permissions", storage_permissions) @property @pulumi.getter(name="keyVaultId") @@ -166,22 +213,63 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] storage_permissions: List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`. :param pulumi.Input[str] tenant_id: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created. """ + _AccessPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_id=application_id, + certificate_permissions=certificate_permissions, + key_permissions=key_permissions, + key_vault_id=key_vault_id, + object_id=object_id, + secret_permissions=secret_permissions, + storage_permissions=storage_permissions, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_id: Optional[pulumi.Input[str]] = None, + certificate_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + key_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + secret_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + storage_permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_id is None and 'applicationId' in kwargs: + application_id = kwargs['applicationId'] + if certificate_permissions is None and 'certificatePermissions' in kwargs: + certificate_permissions = kwargs['certificatePermissions'] + if key_permissions is None and 'keyPermissions' in kwargs: + key_permissions = kwargs['keyPermissions'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if secret_permissions is None and 'secretPermissions' in kwargs: + secret_permissions = kwargs['secretPermissions'] + if storage_permissions is None and 'storagePermissions' in kwargs: + storage_permissions = kwargs['storagePermissions'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if application_id is not None: - pulumi.set(__self__, "application_id", application_id) + _setter("application_id", application_id) if certificate_permissions is not None: - pulumi.set(__self__, "certificate_permissions", certificate_permissions) + _setter("certificate_permissions", certificate_permissions) if key_permissions is not None: - pulumi.set(__self__, "key_permissions", key_permissions) + _setter("key_permissions", key_permissions) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if secret_permissions is not None: - pulumi.set(__self__, "secret_permissions", secret_permissions) + _setter("secret_permissions", secret_permissions) if storage_permissions is not None: - pulumi.set(__self__, "storage_permissions", storage_permissions) + _setter("storage_permissions", storage_permissions) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="applicationId") @@ -433,6 +521,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccessPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/keyvault/certifiate.py b/sdk/python/pulumi_azure/keyvault/certifiate.py index eafc850800..0289d8f174 100644 --- a/sdk/python/pulumi_azure/keyvault/certifiate.py +++ b/sdk/python/pulumi_azure/keyvault/certifiate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,15 +31,40 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "key_vault_id", key_vault_id) + CertifiateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_id=key_vault_id, + certificate=certificate, + certificate_policy=certificate_policy, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_id: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input['CertifiateCertificateArgs']] = None, + certificate_policy: Optional[pulumi.Input['CertifiateCertificatePolicyArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if certificate_policy is None and 'certificatePolicy' in kwargs: + certificate_policy = kwargs['certificatePolicy'] + + _setter("key_vault_id", key_vault_id) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_policy is not None: - pulumi.set(__self__, "certificate_policy", certificate_policy) + _setter("certificate_policy", certificate_policy) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="keyVaultId") @@ -142,36 +167,95 @@ def __init__(__self__, *, :param pulumi.Input[str] versionless_id: The Base ID of the Key Vault Certificate. :param pulumi.Input[str] versionless_secret_id: The Base ID of the Key Vault Secret. """ + _CertifiateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate=certificate, + certificate_attributes=certificate_attributes, + certificate_data=certificate_data, + certificate_data_base64=certificate_data_base64, + certificate_policy=certificate_policy, + key_vault_id=key_vault_id, + name=name, + resource_manager_id=resource_manager_id, + resource_manager_versionless_id=resource_manager_versionless_id, + secret_id=secret_id, + tags=tags, + thumbprint=thumbprint, + version=version, + versionless_id=versionless_id, + versionless_secret_id=versionless_secret_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate: Optional[pulumi.Input['CertifiateCertificateArgs']] = None, + certificate_attributes: Optional[pulumi.Input[Sequence[pulumi.Input['CertifiateCertificateAttributeArgs']]]] = None, + certificate_data: Optional[pulumi.Input[str]] = None, + certificate_data_base64: Optional[pulumi.Input[str]] = None, + certificate_policy: Optional[pulumi.Input['CertifiateCertificatePolicyArgs']] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_manager_id: Optional[pulumi.Input[str]] = None, + resource_manager_versionless_id: Optional[pulumi.Input[str]] = None, + secret_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + versionless_id: Optional[pulumi.Input[str]] = None, + versionless_secret_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_attributes is None and 'certificateAttributes' in kwargs: + certificate_attributes = kwargs['certificateAttributes'] + if certificate_data is None and 'certificateData' in kwargs: + certificate_data = kwargs['certificateData'] + if certificate_data_base64 is None and 'certificateDataBase64' in kwargs: + certificate_data_base64 = kwargs['certificateDataBase64'] + if certificate_policy is None and 'certificatePolicy' in kwargs: + certificate_policy = kwargs['certificatePolicy'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if resource_manager_id is None and 'resourceManagerId' in kwargs: + resource_manager_id = kwargs['resourceManagerId'] + if resource_manager_versionless_id is None and 'resourceManagerVersionlessId' in kwargs: + resource_manager_versionless_id = kwargs['resourceManagerVersionlessId'] + if secret_id is None and 'secretId' in kwargs: + secret_id = kwargs['secretId'] + if versionless_id is None and 'versionlessId' in kwargs: + versionless_id = kwargs['versionlessId'] + if versionless_secret_id is None and 'versionlessSecretId' in kwargs: + versionless_secret_id = kwargs['versionlessSecretId'] + if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_attributes is not None: - pulumi.set(__self__, "certificate_attributes", certificate_attributes) + _setter("certificate_attributes", certificate_attributes) if certificate_data is not None: - pulumi.set(__self__, "certificate_data", certificate_data) + _setter("certificate_data", certificate_data) if certificate_data_base64 is not None: - pulumi.set(__self__, "certificate_data_base64", certificate_data_base64) + _setter("certificate_data_base64", certificate_data_base64) if certificate_policy is not None: - pulumi.set(__self__, "certificate_policy", certificate_policy) + _setter("certificate_policy", certificate_policy) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_manager_id is not None: - pulumi.set(__self__, "resource_manager_id", resource_manager_id) + _setter("resource_manager_id", resource_manager_id) if resource_manager_versionless_id is not None: - pulumi.set(__self__, "resource_manager_versionless_id", resource_manager_versionless_id) + _setter("resource_manager_versionless_id", resource_manager_versionless_id) if secret_id is not None: - pulumi.set(__self__, "secret_id", secret_id) + _setter("secret_id", secret_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if versionless_id is not None: - pulumi.set(__self__, "versionless_id", versionless_id) + _setter("versionless_id", versionless_id) if versionless_secret_id is not None: - pulumi.set(__self__, "versionless_secret_id", versionless_secret_id) + _setter("versionless_secret_id", versionless_secret_id) @property @pulumi.getter @@ -782,6 +866,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CertifiateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -802,7 +890,17 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = CertifiateArgs.__new__(CertifiateArgs) + if certificate is not None and not isinstance(certificate, CertifiateCertificateArgs): + certificate = certificate or {} + def _setter(key, value): + certificate[key] = value + CertifiateCertificateArgs._configure(_setter, **certificate) __props__.__dict__["certificate"] = certificate + if certificate_policy is not None and not isinstance(certificate_policy, CertifiateCertificatePolicyArgs): + certificate_policy = certificate_policy or {} + def _setter(key, value): + certificate_policy[key] = value + CertifiateCertificatePolicyArgs._configure(_setter, **certificate_policy) __props__.__dict__["certificate_policy"] = certificate_policy if key_vault_id is None and not opts.urn: raise TypeError("Missing required property 'key_vault_id'") diff --git a/sdk/python/pulumi_azure/keyvault/certificate.py b/sdk/python/pulumi_azure/keyvault/certificate.py index 34853871de..3567afc89d 100644 --- a/sdk/python/pulumi_azure/keyvault/certificate.py +++ b/sdk/python/pulumi_azure/keyvault/certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,15 +31,40 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Key Vault Certificate. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "key_vault_id", key_vault_id) + CertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_id=key_vault_id, + certificate=certificate, + certificate_policy=certificate_policy, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_id: Optional[pulumi.Input[str]] = None, + certificate: Optional[pulumi.Input['CertificateCertificateArgs']] = None, + certificate_policy: Optional[pulumi.Input['CertificateCertificatePolicyArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if certificate_policy is None and 'certificatePolicy' in kwargs: + certificate_policy = kwargs['certificatePolicy'] + + _setter("key_vault_id", key_vault_id) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_policy is not None: - pulumi.set(__self__, "certificate_policy", certificate_policy) + _setter("certificate_policy", certificate_policy) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="keyVaultId") @@ -142,36 +167,95 @@ def __init__(__self__, *, :param pulumi.Input[str] versionless_id: The Base ID of the Key Vault Certificate. :param pulumi.Input[str] versionless_secret_id: The Base ID of the Key Vault Secret. """ + _CertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate=certificate, + certificate_attributes=certificate_attributes, + certificate_data=certificate_data, + certificate_data_base64=certificate_data_base64, + certificate_policy=certificate_policy, + key_vault_id=key_vault_id, + name=name, + resource_manager_id=resource_manager_id, + resource_manager_versionless_id=resource_manager_versionless_id, + secret_id=secret_id, + tags=tags, + thumbprint=thumbprint, + version=version, + versionless_id=versionless_id, + versionless_secret_id=versionless_secret_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate: Optional[pulumi.Input['CertificateCertificateArgs']] = None, + certificate_attributes: Optional[pulumi.Input[Sequence[pulumi.Input['CertificateCertificateAttributeArgs']]]] = None, + certificate_data: Optional[pulumi.Input[str]] = None, + certificate_data_base64: Optional[pulumi.Input[str]] = None, + certificate_policy: Optional[pulumi.Input['CertificateCertificatePolicyArgs']] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_manager_id: Optional[pulumi.Input[str]] = None, + resource_manager_versionless_id: Optional[pulumi.Input[str]] = None, + secret_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + versionless_id: Optional[pulumi.Input[str]] = None, + versionless_secret_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_attributes is None and 'certificateAttributes' in kwargs: + certificate_attributes = kwargs['certificateAttributes'] + if certificate_data is None and 'certificateData' in kwargs: + certificate_data = kwargs['certificateData'] + if certificate_data_base64 is None and 'certificateDataBase64' in kwargs: + certificate_data_base64 = kwargs['certificateDataBase64'] + if certificate_policy is None and 'certificatePolicy' in kwargs: + certificate_policy = kwargs['certificatePolicy'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if resource_manager_id is None and 'resourceManagerId' in kwargs: + resource_manager_id = kwargs['resourceManagerId'] + if resource_manager_versionless_id is None and 'resourceManagerVersionlessId' in kwargs: + resource_manager_versionless_id = kwargs['resourceManagerVersionlessId'] + if secret_id is None and 'secretId' in kwargs: + secret_id = kwargs['secretId'] + if versionless_id is None and 'versionlessId' in kwargs: + versionless_id = kwargs['versionlessId'] + if versionless_secret_id is None and 'versionlessSecretId' in kwargs: + versionless_secret_id = kwargs['versionlessSecretId'] + if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_attributes is not None: - pulumi.set(__self__, "certificate_attributes", certificate_attributes) + _setter("certificate_attributes", certificate_attributes) if certificate_data is not None: - pulumi.set(__self__, "certificate_data", certificate_data) + _setter("certificate_data", certificate_data) if certificate_data_base64 is not None: - pulumi.set(__self__, "certificate_data_base64", certificate_data_base64) + _setter("certificate_data_base64", certificate_data_base64) if certificate_policy is not None: - pulumi.set(__self__, "certificate_policy", certificate_policy) + _setter("certificate_policy", certificate_policy) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_manager_id is not None: - pulumi.set(__self__, "resource_manager_id", resource_manager_id) + _setter("resource_manager_id", resource_manager_id) if resource_manager_versionless_id is not None: - pulumi.set(__self__, "resource_manager_versionless_id", resource_manager_versionless_id) + _setter("resource_manager_versionless_id", resource_manager_versionless_id) if secret_id is not None: - pulumi.set(__self__, "secret_id", secret_id) + _setter("secret_id", secret_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if versionless_id is not None: - pulumi.set(__self__, "versionless_id", versionless_id) + _setter("versionless_id", versionless_id) if versionless_secret_id is not None: - pulumi.set(__self__, "versionless_secret_id", versionless_secret_id) + _setter("versionless_secret_id", versionless_secret_id) @property @pulumi.getter @@ -777,6 +861,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -796,7 +884,17 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = CertificateArgs.__new__(CertificateArgs) + if certificate is not None and not isinstance(certificate, CertificateCertificateArgs): + certificate = certificate or {} + def _setter(key, value): + certificate[key] = value + CertificateCertificateArgs._configure(_setter, **certificate) __props__.__dict__["certificate"] = certificate + if certificate_policy is not None and not isinstance(certificate_policy, CertificateCertificatePolicyArgs): + certificate_policy = certificate_policy or {} + def _setter(key, value): + certificate_policy[key] = value + CertificateCertificatePolicyArgs._configure(_setter, **certificate_policy) __props__.__dict__["certificate_policy"] = certificate_policy if key_vault_id is None and not opts.urn: raise TypeError("Missing required property 'key_vault_id'") diff --git a/sdk/python/pulumi_azure/keyvault/certificate_contacts.py b/sdk/python/pulumi_azure/keyvault/certificate_contacts.py index 346757da14..f6c50a03eb 100644 --- a/sdk/python/pulumi_azure/keyvault/certificate_contacts.py +++ b/sdk/python/pulumi_azure/keyvault/certificate_contacts.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -23,8 +23,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['CertificateContactsContactArgs']]] contacts: One or more `contact` blocks as defined below. :param pulumi.Input[str] key_vault_id: The ID of the Key Vault. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "contacts", contacts) - pulumi.set(__self__, "key_vault_id", key_vault_id) + CertificateContactsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + contacts=contacts, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contacts: Optional[pulumi.Input[Sequence[pulumi.Input['CertificateContactsContactArgs']]]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if contacts is None: + raise TypeError("Missing 'contacts' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + + _setter("contacts", contacts) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -61,10 +80,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['CertificateContactsContactArgs']]] contacts: One or more `contact` blocks as defined below. :param pulumi.Input[str] key_vault_id: The ID of the Key Vault. Changing this forces a new resource to be created. """ + _CertificateContactsState._configure( + lambda key, value: pulumi.set(__self__, key, value), + contacts=contacts, + key_vault_id=key_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contacts: Optional[pulumi.Input[Sequence[pulumi.Input['CertificateContactsContactArgs']]]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if contacts is not None: - pulumi.set(__self__, "contacts", contacts) + _setter("contacts", contacts) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) @property @pulumi.getter @@ -220,6 +254,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CertificateContactsArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/keyvault/certificate_issuer.py b/sdk/python/pulumi_azure/keyvault/certificate_issuer.py index c9ad3796c6..c9f86f3ac9 100644 --- a/sdk/python/pulumi_azure/keyvault/certificate_issuer.py +++ b/sdk/python/pulumi_azure/keyvault/certificate_issuer.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,18 +33,53 @@ def __init__(__self__, *, :param pulumi.Input[str] org_id: The ID of the organization as provided to the issuer. :param pulumi.Input[str] password: The password associated with the account and organization ID at the third-party Certificate Issuer. If not specified, will not overwrite any previous value. """ - pulumi.set(__self__, "key_vault_id", key_vault_id) - pulumi.set(__self__, "provider_name", provider_name) + CertificateIssuerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_id=key_vault_id, + provider_name=provider_name, + account_id=account_id, + admins=admins, + name=name, + org_id=org_id, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_id: Optional[pulumi.Input[str]] = None, + provider_name: Optional[pulumi.Input[str]] = None, + account_id: Optional[pulumi.Input[str]] = None, + admins: Optional[pulumi.Input[Sequence[pulumi.Input['CertificateIssuerAdminArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + org_id: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if provider_name is None and 'providerName' in kwargs: + provider_name = kwargs['providerName'] + if provider_name is None: + raise TypeError("Missing 'provider_name' argument") + if account_id is None and 'accountId' in kwargs: + account_id = kwargs['accountId'] + if org_id is None and 'orgId' in kwargs: + org_id = kwargs['orgId'] + + _setter("key_vault_id", key_vault_id) + _setter("provider_name", provider_name) if account_id is not None: - pulumi.set(__self__, "account_id", account_id) + _setter("account_id", account_id) if admins is not None: - pulumi.set(__self__, "admins", admins) + _setter("admins", admins) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if org_id is not None: - pulumi.set(__self__, "org_id", org_id) + _setter("org_id", org_id) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter(name="keyVaultId") @@ -151,20 +186,51 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password associated with the account and organization ID at the third-party Certificate Issuer. If not specified, will not overwrite any previous value. :param pulumi.Input[str] provider_name: The name of the third-party Certificate Issuer. Possible values are: `DigiCert`, `GlobalSign`, `OneCertV2-PrivateCA`, `OneCertV2-PublicCA` and `SslAdminV2`. """ + _CertificateIssuerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_id=account_id, + admins=admins, + key_vault_id=key_vault_id, + name=name, + org_id=org_id, + password=password, + provider_name=provider_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_id: Optional[pulumi.Input[str]] = None, + admins: Optional[pulumi.Input[Sequence[pulumi.Input['CertificateIssuerAdminArgs']]]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + org_id: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + provider_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_id is None and 'accountId' in kwargs: + account_id = kwargs['accountId'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if org_id is None and 'orgId' in kwargs: + org_id = kwargs['orgId'] + if provider_name is None and 'providerName' in kwargs: + provider_name = kwargs['providerName'] + if account_id is not None: - pulumi.set(__self__, "account_id", account_id) + _setter("account_id", account_id) if admins is not None: - pulumi.set(__self__, "admins", admins) + _setter("admins", admins) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if org_id is not None: - pulumi.set(__self__, "org_id", org_id) + _setter("org_id", org_id) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if provider_name is not None: - pulumi.set(__self__, "provider_name", provider_name) + _setter("provider_name", provider_name) @property @pulumi.getter(name="accountId") @@ -354,6 +420,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CertificateIssuerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/keyvault/get_access_policy.py b/sdk/python/pulumi_azure/keyvault/get_access_policy.py index b1bbcf7ac0..e6da0b0800 100644 --- a/sdk/python/pulumi_azure/keyvault/get_access_policy.py +++ b/sdk/python/pulumi_azure/keyvault/get_access_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/keyvault/get_certificate.py b/sdk/python/pulumi_azure/keyvault/get_certificate.py index 3af1871818..a3f03eedbc 100644 --- a/sdk/python/pulumi_azure/keyvault/get_certificate.py +++ b/sdk/python/pulumi_azure/keyvault/get_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/keyvault/get_certificate_data.py b/sdk/python/pulumi_azure/keyvault/get_certificate_data.py index c84872dadd..7c319abdb2 100644 --- a/sdk/python/pulumi_azure/keyvault/get_certificate_data.py +++ b/sdk/python/pulumi_azure/keyvault/get_certificate_data.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/keyvault/get_certificate_issuer.py b/sdk/python/pulumi_azure/keyvault/get_certificate_issuer.py index 8b42bd6c6c..87d5d13854 100644 --- a/sdk/python/pulumi_azure/keyvault/get_certificate_issuer.py +++ b/sdk/python/pulumi_azure/keyvault/get_certificate_issuer.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/keyvault/get_certificates.py b/sdk/python/pulumi_azure/keyvault/get_certificates.py index 814d05d28d..11d8fd930e 100644 --- a/sdk/python/pulumi_azure/keyvault/get_certificates.py +++ b/sdk/python/pulumi_azure/keyvault/get_certificates.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/keyvault/get_encrypted_value.py b/sdk/python/pulumi_azure/keyvault/get_encrypted_value.py index 7555e11f05..4a448f5dec 100644 --- a/sdk/python/pulumi_azure/keyvault/get_encrypted_value.py +++ b/sdk/python/pulumi_azure/keyvault/get_encrypted_value.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/keyvault/get_key.py b/sdk/python/pulumi_azure/keyvault/get_key.py index e9664728d8..29efc53d6c 100644 --- a/sdk/python/pulumi_azure/keyvault/get_key.py +++ b/sdk/python/pulumi_azure/keyvault/get_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/keyvault/get_key_vault.py b/sdk/python/pulumi_azure/keyvault/get_key_vault.py index a1cc69a382..e8182e1f07 100644 --- a/sdk/python/pulumi_azure/keyvault/get_key_vault.py +++ b/sdk/python/pulumi_azure/keyvault/get_key_vault.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/keyvault/get_managed_hardware_security_module.py b/sdk/python/pulumi_azure/keyvault/get_managed_hardware_security_module.py index f40d281ec8..3d3fa1297e 100644 --- a/sdk/python/pulumi_azure/keyvault/get_managed_hardware_security_module.py +++ b/sdk/python/pulumi_azure/keyvault/get_managed_hardware_security_module.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/keyvault/get_secret.py b/sdk/python/pulumi_azure/keyvault/get_secret.py index fcdb019848..dde73aa17f 100644 --- a/sdk/python/pulumi_azure/keyvault/get_secret.py +++ b/sdk/python/pulumi_azure/keyvault/get_secret.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/keyvault/get_secrets.py b/sdk/python/pulumi_azure/keyvault/get_secrets.py index b7bf22100f..0bd0ef3156 100644 --- a/sdk/python/pulumi_azure/keyvault/get_secrets.py +++ b/sdk/python/pulumi_azure/keyvault/get_secrets.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/keyvault/key.py b/sdk/python/pulumi_azure/keyvault/key.py index d93d38107c..0ea0cbc9a4 100644 --- a/sdk/python/pulumi_azure/keyvault/key.py +++ b/sdk/python/pulumi_azure/keyvault/key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,23 +39,72 @@ def __init__(__self__, *, :param pulumi.Input['KeyRotationPolicyArgs'] rotation_policy: A `rotation_policy` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "key_opts", key_opts) - pulumi.set(__self__, "key_type", key_type) - pulumi.set(__self__, "key_vault_id", key_vault_id) + KeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_opts=key_opts, + key_type=key_type, + key_vault_id=key_vault_id, + curve=curve, + expiration_date=expiration_date, + key_size=key_size, + name=name, + not_before_date=not_before_date, + rotation_policy=rotation_policy, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_opts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + key_type: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + curve: Optional[pulumi.Input[str]] = None, + expiration_date: Optional[pulumi.Input[str]] = None, + key_size: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + not_before_date: Optional[pulumi.Input[str]] = None, + rotation_policy: Optional[pulumi.Input['KeyRotationPolicyArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_opts is None and 'keyOpts' in kwargs: + key_opts = kwargs['keyOpts'] + if key_opts is None: + raise TypeError("Missing 'key_opts' argument") + if key_type is None and 'keyType' in kwargs: + key_type = kwargs['keyType'] + if key_type is None: + raise TypeError("Missing 'key_type' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if key_size is None and 'keySize' in kwargs: + key_size = kwargs['keySize'] + if not_before_date is None and 'notBeforeDate' in kwargs: + not_before_date = kwargs['notBeforeDate'] + if rotation_policy is None and 'rotationPolicy' in kwargs: + rotation_policy = kwargs['rotationPolicy'] + + _setter("key_opts", key_opts) + _setter("key_type", key_type) + _setter("key_vault_id", key_vault_id) if curve is not None: - pulumi.set(__self__, "curve", curve) + _setter("curve", curve) if expiration_date is not None: - pulumi.set(__self__, "expiration_date", expiration_date) + _setter("expiration_date", expiration_date) if key_size is not None: - pulumi.set(__self__, "key_size", key_size) + _setter("key_size", key_size) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if not_before_date is not None: - pulumi.set(__self__, "not_before_date", not_before_date) + _setter("not_before_date", not_before_date) if rotation_policy is not None: - pulumi.set(__self__, "rotation_policy", rotation_policy) + _setter("rotation_policy", rotation_policy) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="keyOpts") @@ -224,46 +273,119 @@ def __init__(__self__, *, :param pulumi.Input[str] x: The EC X component of this Key Vault Key. :param pulumi.Input[str] y: The EC Y component of this Key Vault Key. """ + _KeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + curve=curve, + e=e, + expiration_date=expiration_date, + key_opts=key_opts, + key_size=key_size, + key_type=key_type, + key_vault_id=key_vault_id, + n=n, + name=name, + not_before_date=not_before_date, + public_key_openssh=public_key_openssh, + public_key_pem=public_key_pem, + resource_id=resource_id, + resource_versionless_id=resource_versionless_id, + rotation_policy=rotation_policy, + tags=tags, + version=version, + versionless_id=versionless_id, + x=x, + y=y, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + curve: Optional[pulumi.Input[str]] = None, + e: Optional[pulumi.Input[str]] = None, + expiration_date: Optional[pulumi.Input[str]] = None, + key_opts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + key_size: Optional[pulumi.Input[int]] = None, + key_type: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + n: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + not_before_date: Optional[pulumi.Input[str]] = None, + public_key_openssh: Optional[pulumi.Input[str]] = None, + public_key_pem: Optional[pulumi.Input[str]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + resource_versionless_id: Optional[pulumi.Input[str]] = None, + rotation_policy: Optional[pulumi.Input['KeyRotationPolicyArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + versionless_id: Optional[pulumi.Input[str]] = None, + x: Optional[pulumi.Input[str]] = None, + y: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if key_opts is None and 'keyOpts' in kwargs: + key_opts = kwargs['keyOpts'] + if key_size is None and 'keySize' in kwargs: + key_size = kwargs['keySize'] + if key_type is None and 'keyType' in kwargs: + key_type = kwargs['keyType'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if not_before_date is None and 'notBeforeDate' in kwargs: + not_before_date = kwargs['notBeforeDate'] + if public_key_openssh is None and 'publicKeyOpenssh' in kwargs: + public_key_openssh = kwargs['publicKeyOpenssh'] + if public_key_pem is None and 'publicKeyPem' in kwargs: + public_key_pem = kwargs['publicKeyPem'] + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_versionless_id is None and 'resourceVersionlessId' in kwargs: + resource_versionless_id = kwargs['resourceVersionlessId'] + if rotation_policy is None and 'rotationPolicy' in kwargs: + rotation_policy = kwargs['rotationPolicy'] + if versionless_id is None and 'versionlessId' in kwargs: + versionless_id = kwargs['versionlessId'] + if curve is not None: - pulumi.set(__self__, "curve", curve) + _setter("curve", curve) if e is not None: - pulumi.set(__self__, "e", e) + _setter("e", e) if expiration_date is not None: - pulumi.set(__self__, "expiration_date", expiration_date) + _setter("expiration_date", expiration_date) if key_opts is not None: - pulumi.set(__self__, "key_opts", key_opts) + _setter("key_opts", key_opts) if key_size is not None: - pulumi.set(__self__, "key_size", key_size) + _setter("key_size", key_size) if key_type is not None: - pulumi.set(__self__, "key_type", key_type) + _setter("key_type", key_type) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if n is not None: - pulumi.set(__self__, "n", n) + _setter("n", n) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if not_before_date is not None: - pulumi.set(__self__, "not_before_date", not_before_date) + _setter("not_before_date", not_before_date) if public_key_openssh is not None: - pulumi.set(__self__, "public_key_openssh", public_key_openssh) + _setter("public_key_openssh", public_key_openssh) if public_key_pem is not None: - pulumi.set(__self__, "public_key_pem", public_key_pem) + _setter("public_key_pem", public_key_pem) if resource_id is not None: - pulumi.set(__self__, "resource_id", resource_id) + _setter("resource_id", resource_id) if resource_versionless_id is not None: - pulumi.set(__self__, "resource_versionless_id", resource_versionless_id) + _setter("resource_versionless_id", resource_versionless_id) if rotation_policy is not None: - pulumi.set(__self__, "rotation_policy", rotation_policy) + _setter("rotation_policy", rotation_policy) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if versionless_id is not None: - pulumi.set(__self__, "versionless_id", versionless_id) + _setter("versionless_id", versionless_id) if x is not None: - pulumi.set(__self__, "x", x) + _setter("x", x) if y is not None: - pulumi.set(__self__, "y", y) + _setter("y", y) @property @pulumi.getter @@ -683,6 +805,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + KeyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -721,6 +847,11 @@ def _internal_init(__self__, __props__.__dict__["key_vault_id"] = key_vault_id __props__.__dict__["name"] = name __props__.__dict__["not_before_date"] = not_before_date + if rotation_policy is not None and not isinstance(rotation_policy, KeyRotationPolicyArgs): + rotation_policy = rotation_policy or {} + def _setter(key, value): + rotation_policy[key] = value + KeyRotationPolicyArgs._configure(_setter, **rotation_policy) __props__.__dict__["rotation_policy"] = rotation_policy __props__.__dict__["tags"] = tags __props__.__dict__["e"] = None diff --git a/sdk/python/pulumi_azure/keyvault/key_vault.py b/sdk/python/pulumi_azure/keyvault/key_vault.py index 3b6a93bdeb..d6112e4f8e 100644 --- a/sdk/python/pulumi_azure/keyvault/key_vault.py +++ b/sdk/python/pulumi_azure/keyvault/key_vault.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,35 +59,106 @@ def __init__(__self__, *, > **Note:** This field can only be configured one time and cannot be updated. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "tenant_id", tenant_id) + KeyVaultArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + tenant_id=tenant_id, + access_policies=access_policies, + contacts=contacts, + enable_rbac_authorization=enable_rbac_authorization, + enabled_for_deployment=enabled_for_deployment, + enabled_for_disk_encryption=enabled_for_disk_encryption, + enabled_for_template_deployment=enabled_for_template_deployment, + location=location, + name=name, + network_acls=network_acls, + public_network_access_enabled=public_network_access_enabled, + purge_protection_enabled=purge_protection_enabled, + soft_delete_retention_days=soft_delete_retention_days, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + access_policies: Optional[pulumi.Input[Sequence[pulumi.Input['KeyVaultAccessPolicyArgs']]]] = None, + contacts: Optional[pulumi.Input[Sequence[pulumi.Input['KeyVaultContactArgs']]]] = None, + enable_rbac_authorization: Optional[pulumi.Input[bool]] = None, + enabled_for_deployment: Optional[pulumi.Input[bool]] = None, + enabled_for_disk_encryption: Optional[pulumi.Input[bool]] = None, + enabled_for_template_deployment: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_acls: Optional[pulumi.Input['KeyVaultNetworkAclsArgs']] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + purge_protection_enabled: Optional[pulumi.Input[bool]] = None, + soft_delete_retention_days: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if access_policies is None and 'accessPolicies' in kwargs: + access_policies = kwargs['accessPolicies'] + if enable_rbac_authorization is None and 'enableRbacAuthorization' in kwargs: + enable_rbac_authorization = kwargs['enableRbacAuthorization'] + if enabled_for_deployment is None and 'enabledForDeployment' in kwargs: + enabled_for_deployment = kwargs['enabledForDeployment'] + if enabled_for_disk_encryption is None and 'enabledForDiskEncryption' in kwargs: + enabled_for_disk_encryption = kwargs['enabledForDiskEncryption'] + if enabled_for_template_deployment is None and 'enabledForTemplateDeployment' in kwargs: + enabled_for_template_deployment = kwargs['enabledForTemplateDeployment'] + if network_acls is None and 'networkAcls' in kwargs: + network_acls = kwargs['networkAcls'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if purge_protection_enabled is None and 'purgeProtectionEnabled' in kwargs: + purge_protection_enabled = kwargs['purgeProtectionEnabled'] + if soft_delete_retention_days is None and 'softDeleteRetentionDays' in kwargs: + soft_delete_retention_days = kwargs['softDeleteRetentionDays'] + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("tenant_id", tenant_id) if access_policies is not None: - pulumi.set(__self__, "access_policies", access_policies) + _setter("access_policies", access_policies) if contacts is not None: - pulumi.set(__self__, "contacts", contacts) + _setter("contacts", contacts) if enable_rbac_authorization is not None: - pulumi.set(__self__, "enable_rbac_authorization", enable_rbac_authorization) + _setter("enable_rbac_authorization", enable_rbac_authorization) if enabled_for_deployment is not None: - pulumi.set(__self__, "enabled_for_deployment", enabled_for_deployment) + _setter("enabled_for_deployment", enabled_for_deployment) if enabled_for_disk_encryption is not None: - pulumi.set(__self__, "enabled_for_disk_encryption", enabled_for_disk_encryption) + _setter("enabled_for_disk_encryption", enabled_for_disk_encryption) if enabled_for_template_deployment is not None: - pulumi.set(__self__, "enabled_for_template_deployment", enabled_for_template_deployment) + _setter("enabled_for_template_deployment", enabled_for_template_deployment) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_acls is not None: - pulumi.set(__self__, "network_acls", network_acls) + _setter("network_acls", network_acls) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if purge_protection_enabled is not None: - pulumi.set(__self__, "purge_protection_enabled", purge_protection_enabled) + _setter("purge_protection_enabled", purge_protection_enabled) if soft_delete_retention_days is not None: - pulumi.set(__self__, "soft_delete_retention_days", soft_delete_retention_days) + _setter("soft_delete_retention_days", soft_delete_retention_days) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -338,40 +409,109 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. :param pulumi.Input[str] vault_uri: The URI of the Key Vault, used for performing operations on keys and secrets. """ + _KeyVaultState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_policies=access_policies, + contacts=contacts, + enable_rbac_authorization=enable_rbac_authorization, + enabled_for_deployment=enabled_for_deployment, + enabled_for_disk_encryption=enabled_for_disk_encryption, + enabled_for_template_deployment=enabled_for_template_deployment, + location=location, + name=name, + network_acls=network_acls, + public_network_access_enabled=public_network_access_enabled, + purge_protection_enabled=purge_protection_enabled, + resource_group_name=resource_group_name, + sku_name=sku_name, + soft_delete_retention_days=soft_delete_retention_days, + tags=tags, + tenant_id=tenant_id, + vault_uri=vault_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_policies: Optional[pulumi.Input[Sequence[pulumi.Input['KeyVaultAccessPolicyArgs']]]] = None, + contacts: Optional[pulumi.Input[Sequence[pulumi.Input['KeyVaultContactArgs']]]] = None, + enable_rbac_authorization: Optional[pulumi.Input[bool]] = None, + enabled_for_deployment: Optional[pulumi.Input[bool]] = None, + enabled_for_disk_encryption: Optional[pulumi.Input[bool]] = None, + enabled_for_template_deployment: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_acls: Optional[pulumi.Input['KeyVaultNetworkAclsArgs']] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + purge_protection_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + soft_delete_retention_days: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + vault_uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_policies is None and 'accessPolicies' in kwargs: + access_policies = kwargs['accessPolicies'] + if enable_rbac_authorization is None and 'enableRbacAuthorization' in kwargs: + enable_rbac_authorization = kwargs['enableRbacAuthorization'] + if enabled_for_deployment is None and 'enabledForDeployment' in kwargs: + enabled_for_deployment = kwargs['enabledForDeployment'] + if enabled_for_disk_encryption is None and 'enabledForDiskEncryption' in kwargs: + enabled_for_disk_encryption = kwargs['enabledForDiskEncryption'] + if enabled_for_template_deployment is None and 'enabledForTemplateDeployment' in kwargs: + enabled_for_template_deployment = kwargs['enabledForTemplateDeployment'] + if network_acls is None and 'networkAcls' in kwargs: + network_acls = kwargs['networkAcls'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if purge_protection_enabled is None and 'purgeProtectionEnabled' in kwargs: + purge_protection_enabled = kwargs['purgeProtectionEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if soft_delete_retention_days is None and 'softDeleteRetentionDays' in kwargs: + soft_delete_retention_days = kwargs['softDeleteRetentionDays'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if vault_uri is None and 'vaultUri' in kwargs: + vault_uri = kwargs['vaultUri'] + if access_policies is not None: - pulumi.set(__self__, "access_policies", access_policies) + _setter("access_policies", access_policies) if contacts is not None: - pulumi.set(__self__, "contacts", contacts) + _setter("contacts", contacts) if enable_rbac_authorization is not None: - pulumi.set(__self__, "enable_rbac_authorization", enable_rbac_authorization) + _setter("enable_rbac_authorization", enable_rbac_authorization) if enabled_for_deployment is not None: - pulumi.set(__self__, "enabled_for_deployment", enabled_for_deployment) + _setter("enabled_for_deployment", enabled_for_deployment) if enabled_for_disk_encryption is not None: - pulumi.set(__self__, "enabled_for_disk_encryption", enabled_for_disk_encryption) + _setter("enabled_for_disk_encryption", enabled_for_disk_encryption) if enabled_for_template_deployment is not None: - pulumi.set(__self__, "enabled_for_template_deployment", enabled_for_template_deployment) + _setter("enabled_for_template_deployment", enabled_for_template_deployment) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_acls is not None: - pulumi.set(__self__, "network_acls", network_acls) + _setter("network_acls", network_acls) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if purge_protection_enabled is not None: - pulumi.set(__self__, "purge_protection_enabled", purge_protection_enabled) + _setter("purge_protection_enabled", purge_protection_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if soft_delete_retention_days is not None: - pulumi.set(__self__, "soft_delete_retention_days", soft_delete_retention_days) + _setter("soft_delete_retention_days", soft_delete_retention_days) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if vault_uri is not None: - pulumi.set(__self__, "vault_uri", vault_uri) + _setter("vault_uri", vault_uri) @property @pulumi.getter(name="accessPolicies") @@ -735,6 +875,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + KeyVaultArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -773,6 +917,11 @@ def _internal_init(__self__, __props__.__dict__["enabled_for_template_deployment"] = enabled_for_template_deployment __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if network_acls is not None and not isinstance(network_acls, KeyVaultNetworkAclsArgs): + network_acls = network_acls or {} + def _setter(key, value): + network_acls[key] = value + KeyVaultNetworkAclsArgs._configure(_setter, **network_acls) __props__.__dict__["network_acls"] = network_acls __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled __props__.__dict__["purge_protection_enabled"] = purge_protection_enabled diff --git a/sdk/python/pulumi_azure/keyvault/managed_hardware_security_module.py b/sdk/python/pulumi_azure/keyvault/managed_hardware_security_module.py index 12576cbeeb..36e2b63e70 100644 --- a/sdk/python/pulumi_azure/keyvault/managed_hardware_security_module.py +++ b/sdk/python/pulumi_azure/keyvault/managed_hardware_security_module.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,28 +45,91 @@ def __init__(__self__, *, :param pulumi.Input[int] soft_delete_retention_days: The number of days that items should be retained for once soft-deleted. This value can be between `7` and `90` days. Defaults to `90`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "admin_object_ids", admin_object_ids) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "tenant_id", tenant_id) + ManagedHardwareSecurityModuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_object_ids=admin_object_ids, + resource_group_name=resource_group_name, + sku_name=sku_name, + tenant_id=tenant_id, + location=location, + name=name, + network_acls=network_acls, + public_network_access_enabled=public_network_access_enabled, + purge_protection_enabled=purge_protection_enabled, + security_domain_key_vault_certificate_ids=security_domain_key_vault_certificate_ids, + security_domain_quorum=security_domain_quorum, + soft_delete_retention_days=soft_delete_retention_days, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_object_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_acls: Optional[pulumi.Input['ManagedHardwareSecurityModuleNetworkAclsArgs']] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + purge_protection_enabled: Optional[pulumi.Input[bool]] = None, + security_domain_key_vault_certificate_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + security_domain_quorum: Optional[pulumi.Input[int]] = None, + soft_delete_retention_days: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_object_ids is None and 'adminObjectIds' in kwargs: + admin_object_ids = kwargs['adminObjectIds'] + if admin_object_ids is None: + raise TypeError("Missing 'admin_object_ids' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if network_acls is None and 'networkAcls' in kwargs: + network_acls = kwargs['networkAcls'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if purge_protection_enabled is None and 'purgeProtectionEnabled' in kwargs: + purge_protection_enabled = kwargs['purgeProtectionEnabled'] + if security_domain_key_vault_certificate_ids is None and 'securityDomainKeyVaultCertificateIds' in kwargs: + security_domain_key_vault_certificate_ids = kwargs['securityDomainKeyVaultCertificateIds'] + if security_domain_quorum is None and 'securityDomainQuorum' in kwargs: + security_domain_quorum = kwargs['securityDomainQuorum'] + if soft_delete_retention_days is None and 'softDeleteRetentionDays' in kwargs: + soft_delete_retention_days = kwargs['softDeleteRetentionDays'] + + _setter("admin_object_ids", admin_object_ids) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("tenant_id", tenant_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_acls is not None: - pulumi.set(__self__, "network_acls", network_acls) + _setter("network_acls", network_acls) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if purge_protection_enabled is not None: - pulumi.set(__self__, "purge_protection_enabled", purge_protection_enabled) + _setter("purge_protection_enabled", purge_protection_enabled) if security_domain_key_vault_certificate_ids is not None: - pulumi.set(__self__, "security_domain_key_vault_certificate_ids", security_domain_key_vault_certificate_ids) + _setter("security_domain_key_vault_certificate_ids", security_domain_key_vault_certificate_ids) if security_domain_quorum is not None: - pulumi.set(__self__, "security_domain_quorum", security_domain_quorum) + _setter("security_domain_quorum", security_domain_quorum) if soft_delete_retention_days is not None: - pulumi.set(__self__, "soft_delete_retention_days", soft_delete_retention_days) + _setter("soft_delete_retention_days", soft_delete_retention_days) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="adminObjectIds") @@ -261,36 +324,99 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. Changing this forces a new resource to be created. :param pulumi.Input[str] tenant_id: The Azure Active Directory Tenant ID that should be used for authenticating requests to the key vault Managed Hardware Security Module. Changing this forces a new resource to be created. """ + _ManagedHardwareSecurityModuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_object_ids=admin_object_ids, + hsm_uri=hsm_uri, + location=location, + name=name, + network_acls=network_acls, + public_network_access_enabled=public_network_access_enabled, + purge_protection_enabled=purge_protection_enabled, + resource_group_name=resource_group_name, + security_domain_encrypted_data=security_domain_encrypted_data, + security_domain_key_vault_certificate_ids=security_domain_key_vault_certificate_ids, + security_domain_quorum=security_domain_quorum, + sku_name=sku_name, + soft_delete_retention_days=soft_delete_retention_days, + tags=tags, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_object_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + hsm_uri: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_acls: Optional[pulumi.Input['ManagedHardwareSecurityModuleNetworkAclsArgs']] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + purge_protection_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + security_domain_encrypted_data: Optional[pulumi.Input[str]] = None, + security_domain_key_vault_certificate_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + security_domain_quorum: Optional[pulumi.Input[int]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + soft_delete_retention_days: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_object_ids is None and 'adminObjectIds' in kwargs: + admin_object_ids = kwargs['adminObjectIds'] + if hsm_uri is None and 'hsmUri' in kwargs: + hsm_uri = kwargs['hsmUri'] + if network_acls is None and 'networkAcls' in kwargs: + network_acls = kwargs['networkAcls'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if purge_protection_enabled is None and 'purgeProtectionEnabled' in kwargs: + purge_protection_enabled = kwargs['purgeProtectionEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if security_domain_encrypted_data is None and 'securityDomainEncryptedData' in kwargs: + security_domain_encrypted_data = kwargs['securityDomainEncryptedData'] + if security_domain_key_vault_certificate_ids is None and 'securityDomainKeyVaultCertificateIds' in kwargs: + security_domain_key_vault_certificate_ids = kwargs['securityDomainKeyVaultCertificateIds'] + if security_domain_quorum is None and 'securityDomainQuorum' in kwargs: + security_domain_quorum = kwargs['securityDomainQuorum'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if soft_delete_retention_days is None and 'softDeleteRetentionDays' in kwargs: + soft_delete_retention_days = kwargs['softDeleteRetentionDays'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if admin_object_ids is not None: - pulumi.set(__self__, "admin_object_ids", admin_object_ids) + _setter("admin_object_ids", admin_object_ids) if hsm_uri is not None: - pulumi.set(__self__, "hsm_uri", hsm_uri) + _setter("hsm_uri", hsm_uri) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_acls is not None: - pulumi.set(__self__, "network_acls", network_acls) + _setter("network_acls", network_acls) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if purge_protection_enabled is not None: - pulumi.set(__self__, "purge_protection_enabled", purge_protection_enabled) + _setter("purge_protection_enabled", purge_protection_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if security_domain_encrypted_data is not None: - pulumi.set(__self__, "security_domain_encrypted_data", security_domain_encrypted_data) + _setter("security_domain_encrypted_data", security_domain_encrypted_data) if security_domain_key_vault_certificate_ids is not None: - pulumi.set(__self__, "security_domain_key_vault_certificate_ids", security_domain_key_vault_certificate_ids) + _setter("security_domain_key_vault_certificate_ids", security_domain_key_vault_certificate_ids) if security_domain_quorum is not None: - pulumi.set(__self__, "security_domain_quorum", security_domain_quorum) + _setter("security_domain_quorum", security_domain_quorum) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if soft_delete_retention_days is not None: - pulumi.set(__self__, "soft_delete_retention_days", soft_delete_retention_days) + _setter("soft_delete_retention_days", soft_delete_retention_days) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="adminObjectIds") @@ -592,6 +718,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedHardwareSecurityModuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -624,6 +754,11 @@ def _internal_init(__self__, __props__.__dict__["admin_object_ids"] = admin_object_ids __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if network_acls is not None and not isinstance(network_acls, ManagedHardwareSecurityModuleNetworkAclsArgs): + network_acls = network_acls or {} + def _setter(key, value): + network_acls[key] = value + ManagedHardwareSecurityModuleNetworkAclsArgs._configure(_setter, **network_acls) __props__.__dict__["network_acls"] = network_acls __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled __props__.__dict__["purge_protection_enabled"] = purge_protection_enabled diff --git a/sdk/python/pulumi_azure/keyvault/managed_storage_account.py b/sdk/python/pulumi_azure/keyvault/managed_storage_account.py index e7efa3b13d..274fe43f52 100644 --- a/sdk/python/pulumi_azure/keyvault/managed_storage_account.py +++ b/sdk/python/pulumi_azure/keyvault/managed_storage_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManagedStorageAccountArgs', 'ManagedStorageAccount'] @@ -33,17 +33,56 @@ def __init__(__self__, *, :param pulumi.Input[str] regeneration_period: How often Storage Account access key should be regenerated. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Key Vault Managed Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "key_vault_id", key_vault_id) - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "storage_account_key", storage_account_key) + ManagedStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_id=key_vault_id, + storage_account_id=storage_account_id, + storage_account_key=storage_account_key, + name=name, + regenerate_key_automatically=regenerate_key_automatically, + regeneration_period=regeneration_period, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_id: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + regenerate_key_automatically: Optional[pulumi.Input[bool]] = None, + regeneration_period: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if regenerate_key_automatically is None and 'regenerateKeyAutomatically' in kwargs: + regenerate_key_automatically = kwargs['regenerateKeyAutomatically'] + if regeneration_period is None and 'regenerationPeriod' in kwargs: + regeneration_period = kwargs['regenerationPeriod'] + + _setter("key_vault_id", key_vault_id) + _setter("storage_account_id", storage_account_id) + _setter("storage_account_key", storage_account_key) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if regenerate_key_automatically is not None: - pulumi.set(__self__, "regenerate_key_automatically", regenerate_key_automatically) + _setter("regenerate_key_automatically", regenerate_key_automatically) if regeneration_period is not None: - pulumi.set(__self__, "regeneration_period", regeneration_period) + _setter("regeneration_period", regeneration_period) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="keyVaultId") @@ -154,20 +193,53 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_key: Which Storage Account access key that is managed by Key Vault. Possible values are `key1` and `key2`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Key Vault Managed Storage Account. Changing this forces a new resource to be created. """ + _ManagedStorageAccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_id=key_vault_id, + name=name, + regenerate_key_automatically=regenerate_key_automatically, + regeneration_period=regeneration_period, + storage_account_id=storage_account_id, + storage_account_key=storage_account_key, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + regenerate_key_automatically: Optional[pulumi.Input[bool]] = None, + regeneration_period: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if regenerate_key_automatically is None and 'regenerateKeyAutomatically' in kwargs: + regenerate_key_automatically = kwargs['regenerateKeyAutomatically'] + if regeneration_period is None and 'regenerationPeriod' in kwargs: + regeneration_period = kwargs['regenerationPeriod'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if regenerate_key_automatically is not None: - pulumi.set(__self__, "regenerate_key_automatically", regenerate_key_automatically) + _setter("regenerate_key_automatically", regenerate_key_automatically) if regeneration_period is not None: - pulumi.set(__self__, "regeneration_period", regeneration_period) + _setter("regeneration_period", regeneration_period) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="keyVaultId") @@ -507,6 +579,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedStorageAccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/keyvault/managed_storage_account_sas_token_definition.py b/sdk/python/pulumi_azure/keyvault/managed_storage_account_sas_token_definition.py index 482f578eab..a1aa83e498 100644 --- a/sdk/python/pulumi_azure/keyvault/managed_storage_account_sas_token_definition.py +++ b/sdk/python/pulumi_azure/keyvault/managed_storage_account_sas_token_definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManagedStorageAccountSasTokenDefinitionArgs', 'ManagedStorageAccountSasTokenDefinition'] @@ -29,14 +29,51 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this SAS Definition. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "managed_storage_account_id", managed_storage_account_id) - pulumi.set(__self__, "sas_template_uri", sas_template_uri) - pulumi.set(__self__, "sas_type", sas_type) - pulumi.set(__self__, "validity_period", validity_period) + ManagedStorageAccountSasTokenDefinitionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_storage_account_id=managed_storage_account_id, + sas_template_uri=sas_template_uri, + sas_type=sas_type, + validity_period=validity_period, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_storage_account_id: Optional[pulumi.Input[str]] = None, + sas_template_uri: Optional[pulumi.Input[str]] = None, + sas_type: Optional[pulumi.Input[str]] = None, + validity_period: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_storage_account_id is None and 'managedStorageAccountId' in kwargs: + managed_storage_account_id = kwargs['managedStorageAccountId'] + if managed_storage_account_id is None: + raise TypeError("Missing 'managed_storage_account_id' argument") + if sas_template_uri is None and 'sasTemplateUri' in kwargs: + sas_template_uri = kwargs['sasTemplateUri'] + if sas_template_uri is None: + raise TypeError("Missing 'sas_template_uri' argument") + if sas_type is None and 'sasType' in kwargs: + sas_type = kwargs['sasType'] + if sas_type is None: + raise TypeError("Missing 'sas_type' argument") + if validity_period is None and 'validityPeriod' in kwargs: + validity_period = kwargs['validityPeriod'] + if validity_period is None: + raise TypeError("Missing 'validity_period' argument") + + _setter("managed_storage_account_id", managed_storage_account_id) + _setter("sas_template_uri", sas_template_uri) + _setter("sas_type", sas_type) + _setter("validity_period", validity_period) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="managedStorageAccountId") @@ -131,20 +168,53 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the SAS Definition. Changing this forces a new resource to be created. :param pulumi.Input[str] validity_period: Validity period of SAS token. Value needs to be in [ISO 8601 duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations). """ + _ManagedStorageAccountSasTokenDefinitionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_storage_account_id=managed_storage_account_id, + name=name, + sas_template_uri=sas_template_uri, + sas_type=sas_type, + secret_id=secret_id, + tags=tags, + validity_period=validity_period, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_storage_account_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sas_template_uri: Optional[pulumi.Input[str]] = None, + sas_type: Optional[pulumi.Input[str]] = None, + secret_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + validity_period: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_storage_account_id is None and 'managedStorageAccountId' in kwargs: + managed_storage_account_id = kwargs['managedStorageAccountId'] + if sas_template_uri is None and 'sasTemplateUri' in kwargs: + sas_template_uri = kwargs['sasTemplateUri'] + if sas_type is None and 'sasType' in kwargs: + sas_type = kwargs['sasType'] + if secret_id is None and 'secretId' in kwargs: + secret_id = kwargs['secretId'] + if validity_period is None and 'validityPeriod' in kwargs: + validity_period = kwargs['validityPeriod'] + if managed_storage_account_id is not None: - pulumi.set(__self__, "managed_storage_account_id", managed_storage_account_id) + _setter("managed_storage_account_id", managed_storage_account_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sas_template_uri is not None: - pulumi.set(__self__, "sas_template_uri", sas_template_uri) + _setter("sas_template_uri", sas_template_uri) if sas_type is not None: - pulumi.set(__self__, "sas_type", sas_type) + _setter("sas_type", sas_type) if secret_id is not None: - pulumi.set(__self__, "secret_id", secret_id) + _setter("secret_id", secret_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if validity_period is not None: - pulumi.set(__self__, "validity_period", validity_period) + _setter("validity_period", validity_period) @property @pulumi.getter(name="managedStorageAccountId") @@ -442,6 +512,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedStorageAccountSasTokenDefinitionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/keyvault/outputs.py b/sdk/python/pulumi_azure/keyvault/outputs.py index 1c7ff528b0..19a51cba37 100644 --- a/sdk/python/pulumi_azure/keyvault/outputs.py +++ b/sdk/python/pulumi_azure/keyvault/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -75,9 +75,24 @@ def __init__(__self__, *, The PEM content should look something like: """ - pulumi.set(__self__, "contents", contents) + CertifiateCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + contents=contents, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contents: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if contents is None: + raise TypeError("Missing 'contents' argument") + + _setter("contents", contents) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -141,18 +156,43 @@ def __init__(__self__, *, :param str recovery_level: The deletion recovery level of the Key Vault Certificate. :param str updated: The recent update time of the Key Vault Certificate. """ + CertifiateCertificateAttribute._configure( + lambda key, value: pulumi.set(__self__, key, value), + created=created, + enabled=enabled, + expires=expires, + not_before=not_before, + recovery_level=recovery_level, + updated=updated, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + created: Optional[str] = None, + enabled: Optional[bool] = None, + expires: Optional[str] = None, + not_before: Optional[str] = None, + recovery_level: Optional[str] = None, + updated: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_before is None and 'notBefore' in kwargs: + not_before = kwargs['notBefore'] + if recovery_level is None and 'recoveryLevel' in kwargs: + recovery_level = kwargs['recoveryLevel'] + if created is not None: - pulumi.set(__self__, "created", created) + _setter("created", created) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if expires is not None: - pulumi.set(__self__, "expires", expires) + _setter("expires", expires) if not_before is not None: - pulumi.set(__self__, "not_before", not_before) + _setter("not_before", not_before) if recovery_level is not None: - pulumi.set(__self__, "recovery_level", recovery_level) + _setter("recovery_level", recovery_level) if updated is not None: - pulumi.set(__self__, "updated", updated) + _setter("updated", updated) @property @pulumi.getter @@ -243,13 +283,48 @@ def __init__(__self__, *, :param Sequence['CertifiateCertificatePolicyLifetimeActionArgs'] lifetime_actions: A `lifetime_action` block as defined below. :param 'CertifiateCertificatePolicyX509CertificatePropertiesArgs' x509_certificate_properties: A `x509_certificate_properties` block as defined below. Required when `certificate` block is not specified. """ - pulumi.set(__self__, "issuer_parameters", issuer_parameters) - pulumi.set(__self__, "key_properties", key_properties) - pulumi.set(__self__, "secret_properties", secret_properties) + CertifiateCertificatePolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + issuer_parameters=issuer_parameters, + key_properties=key_properties, + secret_properties=secret_properties, + lifetime_actions=lifetime_actions, + x509_certificate_properties=x509_certificate_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + issuer_parameters: Optional['outputs.CertifiateCertificatePolicyIssuerParameters'] = None, + key_properties: Optional['outputs.CertifiateCertificatePolicyKeyProperties'] = None, + secret_properties: Optional['outputs.CertifiateCertificatePolicySecretProperties'] = None, + lifetime_actions: Optional[Sequence['outputs.CertifiateCertificatePolicyLifetimeAction']] = None, + x509_certificate_properties: Optional['outputs.CertifiateCertificatePolicyX509CertificateProperties'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if issuer_parameters is None and 'issuerParameters' in kwargs: + issuer_parameters = kwargs['issuerParameters'] + if issuer_parameters is None: + raise TypeError("Missing 'issuer_parameters' argument") + if key_properties is None and 'keyProperties' in kwargs: + key_properties = kwargs['keyProperties'] + if key_properties is None: + raise TypeError("Missing 'key_properties' argument") + if secret_properties is None and 'secretProperties' in kwargs: + secret_properties = kwargs['secretProperties'] + if secret_properties is None: + raise TypeError("Missing 'secret_properties' argument") + if lifetime_actions is None and 'lifetimeActions' in kwargs: + lifetime_actions = kwargs['lifetimeActions'] + if x509_certificate_properties is None and 'x509CertificateProperties' in kwargs: + x509_certificate_properties = kwargs['x509CertificateProperties'] + + _setter("issuer_parameters", issuer_parameters) + _setter("key_properties", key_properties) + _setter("secret_properties", secret_properties) if lifetime_actions is not None: - pulumi.set(__self__, "lifetime_actions", lifetime_actions) + _setter("lifetime_actions", lifetime_actions) if x509_certificate_properties is not None: - pulumi.set(__self__, "x509_certificate_properties", x509_certificate_properties) + _setter("x509_certificate_properties", x509_certificate_properties) @property @pulumi.getter(name="issuerParameters") @@ -299,7 +374,20 @@ def __init__(__self__, *, """ :param str name: The name of the Certificate Issuer. Possible values include `Self` (for self-signed certificate), or `Unknown` (for a certificate issuing authority like `Let's Encrypt` and Azure direct supported ones). Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + CertifiateCertificatePolicyIssuerParameters._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -346,13 +434,44 @@ def __init__(__self__, *, :param str curve: Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `key_type` is `EC` or `EC-HSM`. Changing this forces a new resource to be created. :param int key_size: The size of the key used in the certificate. Possible values include `2048`, `3072`, and `4096` for `RSA` keys, or `256`, `384`, and `521` for `EC` keys. This property is required when using RSA keys. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "exportable", exportable) - pulumi.set(__self__, "key_type", key_type) - pulumi.set(__self__, "reuse_key", reuse_key) + CertifiateCertificatePolicyKeyProperties._configure( + lambda key, value: pulumi.set(__self__, key, value), + exportable=exportable, + key_type=key_type, + reuse_key=reuse_key, + curve=curve, + key_size=key_size, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exportable: Optional[bool] = None, + key_type: Optional[str] = None, + reuse_key: Optional[bool] = None, + curve: Optional[str] = None, + key_size: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exportable is None: + raise TypeError("Missing 'exportable' argument") + if key_type is None and 'keyType' in kwargs: + key_type = kwargs['keyType'] + if key_type is None: + raise TypeError("Missing 'key_type' argument") + if reuse_key is None and 'reuseKey' in kwargs: + reuse_key = kwargs['reuseKey'] + if reuse_key is None: + raise TypeError("Missing 'reuse_key' argument") + if key_size is None and 'keySize' in kwargs: + key_size = kwargs['keySize'] + + _setter("exportable", exportable) + _setter("key_type", key_type) + _setter("reuse_key", reuse_key) if curve is not None: - pulumi.set(__self__, "curve", curve) + _setter("curve", curve) if key_size is not None: - pulumi.set(__self__, "key_size", key_size) + _setter("key_size", key_size) @property @pulumi.getter @@ -404,8 +523,25 @@ def __init__(__self__, *, :param 'CertifiateCertificatePolicyLifetimeActionActionArgs' action: A `action` block as defined below. :param 'CertifiateCertificatePolicyLifetimeActionTriggerArgs' trigger: A `trigger` block as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "trigger", trigger) + CertifiateCertificatePolicyLifetimeAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + trigger=trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional['outputs.CertifiateCertificatePolicyLifetimeActionAction'] = None, + trigger: Optional['outputs.CertifiateCertificatePolicyLifetimeActionTrigger'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if trigger is None: + raise TypeError("Missing 'trigger' argument") + + _setter("action", action) + _setter("trigger", trigger) @property @pulumi.getter @@ -448,7 +584,22 @@ def __init__(__self__, *, """ :param str action_type: The Type of action to be performed when the lifetime trigger is triggerec. Possible values include `AutoRenew` and `EmailContacts`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "action_type", action_type) + CertifiateCertificatePolicyLifetimeActionAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + + _setter("action_type", action_type) @property @pulumi.getter(name="actionType") @@ -487,10 +638,27 @@ def __init__(__self__, *, :param int days_before_expiry: The number of days before the Certificate expires that the action associated with this Trigger should run. Changing this forces a new resource to be created. Conflicts with `lifetime_percentage`. :param int lifetime_percentage: The percentage at which during the Certificates Lifetime the action associated with this Trigger should run. Changing this forces a new resource to be created. Conflicts with `days_before_expiry`. """ + CertifiateCertificatePolicyLifetimeActionTrigger._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_before_expiry=days_before_expiry, + lifetime_percentage=lifetime_percentage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_before_expiry: Optional[int] = None, + lifetime_percentage: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_before_expiry is None and 'daysBeforeExpiry' in kwargs: + days_before_expiry = kwargs['daysBeforeExpiry'] + if lifetime_percentage is None and 'lifetimePercentage' in kwargs: + lifetime_percentage = kwargs['lifetimePercentage'] + if days_before_expiry is not None: - pulumi.set(__self__, "days_before_expiry", days_before_expiry) + _setter("days_before_expiry", days_before_expiry) if lifetime_percentage is not None: - pulumi.set(__self__, "lifetime_percentage", lifetime_percentage) + _setter("lifetime_percentage", lifetime_percentage) @property @pulumi.getter(name="daysBeforeExpiry") @@ -533,7 +701,22 @@ def __init__(__self__, *, """ :param str content_type: The Content-Type of the Certificate, such as `application/x-pkcs12` for a PFX or `application/x-pem-file` for a PEM. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "content_type", content_type) + CertifiateCertificatePolicySecretProperties._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if content_type is None: + raise TypeError("Missing 'content_type' argument") + + _setter("content_type", content_type) @property @pulumi.getter(name="contentType") @@ -582,13 +765,46 @@ def __init__(__self__, *, :param Sequence[str] extended_key_usages: A list of Extended/Enhanced Key Usages. Changing this forces a new resource to be created. :param 'CertifiateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNamesArgs' subject_alternative_names: A `subject_alternative_names` block as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "key_usages", key_usages) - pulumi.set(__self__, "subject", subject) - pulumi.set(__self__, "validity_in_months", validity_in_months) + CertifiateCertificatePolicyX509CertificateProperties._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_usages=key_usages, + subject=subject, + validity_in_months=validity_in_months, + extended_key_usages=extended_key_usages, + subject_alternative_names=subject_alternative_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_usages: Optional[Sequence[str]] = None, + subject: Optional[str] = None, + validity_in_months: Optional[int] = None, + extended_key_usages: Optional[Sequence[str]] = None, + subject_alternative_names: Optional['outputs.CertifiateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNames'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_usages is None and 'keyUsages' in kwargs: + key_usages = kwargs['keyUsages'] + if key_usages is None: + raise TypeError("Missing 'key_usages' argument") + if subject is None: + raise TypeError("Missing 'subject' argument") + if validity_in_months is None and 'validityInMonths' in kwargs: + validity_in_months = kwargs['validityInMonths'] + if validity_in_months is None: + raise TypeError("Missing 'validity_in_months' argument") + if extended_key_usages is None and 'extendedKeyUsages' in kwargs: + extended_key_usages = kwargs['extendedKeyUsages'] + if subject_alternative_names is None and 'subjectAlternativeNames' in kwargs: + subject_alternative_names = kwargs['subjectAlternativeNames'] + + _setter("key_usages", key_usages) + _setter("subject", subject) + _setter("validity_in_months", validity_in_months) if extended_key_usages is not None: - pulumi.set(__self__, "extended_key_usages", extended_key_usages) + _setter("extended_key_usages", extended_key_usages) if subject_alternative_names is not None: - pulumi.set(__self__, "subject_alternative_names", subject_alternative_names) + _setter("subject_alternative_names", subject_alternative_names) @property @pulumi.getter(name="keyUsages") @@ -659,12 +875,29 @@ def __init__(__self__, *, :param Sequence[str] emails: A list of email addresses identified by this Certificate. Changing this forces a new resource to be created. :param Sequence[str] upns: A list of User Principal Names identified by the Certificate. Changing this forces a new resource to be created. """ + CertifiateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNames._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_names=dns_names, + emails=emails, + upns=upns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_names: Optional[Sequence[str]] = None, + emails: Optional[Sequence[str]] = None, + upns: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_names is None and 'dnsNames' in kwargs: + dns_names = kwargs['dnsNames'] + if dns_names is not None: - pulumi.set(__self__, "dns_names", dns_names) + _setter("dns_names", dns_names) if emails is not None: - pulumi.set(__self__, "emails", emails) + _setter("emails", emails) if upns is not None: - pulumi.set(__self__, "upns", upns) + _setter("upns", upns) @property @pulumi.getter(name="dnsNames") @@ -709,9 +942,24 @@ def __init__(__self__, *, The PEM content should look something like: """ - pulumi.set(__self__, "contents", contents) + CertificateCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + contents=contents, + password=password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contents: Optional[str] = None, + password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if contents is None: + raise TypeError("Missing 'contents' argument") + + _setter("contents", contents) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) @property @pulumi.getter @@ -775,18 +1023,43 @@ def __init__(__self__, *, :param str recovery_level: The deletion recovery level of the Key Vault Certificate. :param str updated: The recent update time of the Key Vault Certificate. """ + CertificateCertificateAttribute._configure( + lambda key, value: pulumi.set(__self__, key, value), + created=created, + enabled=enabled, + expires=expires, + not_before=not_before, + recovery_level=recovery_level, + updated=updated, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + created: Optional[str] = None, + enabled: Optional[bool] = None, + expires: Optional[str] = None, + not_before: Optional[str] = None, + recovery_level: Optional[str] = None, + updated: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_before is None and 'notBefore' in kwargs: + not_before = kwargs['notBefore'] + if recovery_level is None and 'recoveryLevel' in kwargs: + recovery_level = kwargs['recoveryLevel'] + if created is not None: - pulumi.set(__self__, "created", created) + _setter("created", created) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if expires is not None: - pulumi.set(__self__, "expires", expires) + _setter("expires", expires) if not_before is not None: - pulumi.set(__self__, "not_before", not_before) + _setter("not_before", not_before) if recovery_level is not None: - pulumi.set(__self__, "recovery_level", recovery_level) + _setter("recovery_level", recovery_level) if updated is not None: - pulumi.set(__self__, "updated", updated) + _setter("updated", updated) @property @pulumi.getter @@ -877,13 +1150,48 @@ def __init__(__self__, *, :param Sequence['CertificateCertificatePolicyLifetimeActionArgs'] lifetime_actions: A `lifetime_action` block as defined below. :param 'CertificateCertificatePolicyX509CertificatePropertiesArgs' x509_certificate_properties: A `x509_certificate_properties` block as defined below. Required when `certificate` block is not specified. """ - pulumi.set(__self__, "issuer_parameters", issuer_parameters) - pulumi.set(__self__, "key_properties", key_properties) - pulumi.set(__self__, "secret_properties", secret_properties) + CertificateCertificatePolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + issuer_parameters=issuer_parameters, + key_properties=key_properties, + secret_properties=secret_properties, + lifetime_actions=lifetime_actions, + x509_certificate_properties=x509_certificate_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + issuer_parameters: Optional['outputs.CertificateCertificatePolicyIssuerParameters'] = None, + key_properties: Optional['outputs.CertificateCertificatePolicyKeyProperties'] = None, + secret_properties: Optional['outputs.CertificateCertificatePolicySecretProperties'] = None, + lifetime_actions: Optional[Sequence['outputs.CertificateCertificatePolicyLifetimeAction']] = None, + x509_certificate_properties: Optional['outputs.CertificateCertificatePolicyX509CertificateProperties'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if issuer_parameters is None and 'issuerParameters' in kwargs: + issuer_parameters = kwargs['issuerParameters'] + if issuer_parameters is None: + raise TypeError("Missing 'issuer_parameters' argument") + if key_properties is None and 'keyProperties' in kwargs: + key_properties = kwargs['keyProperties'] + if key_properties is None: + raise TypeError("Missing 'key_properties' argument") + if secret_properties is None and 'secretProperties' in kwargs: + secret_properties = kwargs['secretProperties'] + if secret_properties is None: + raise TypeError("Missing 'secret_properties' argument") + if lifetime_actions is None and 'lifetimeActions' in kwargs: + lifetime_actions = kwargs['lifetimeActions'] + if x509_certificate_properties is None and 'x509CertificateProperties' in kwargs: + x509_certificate_properties = kwargs['x509CertificateProperties'] + + _setter("issuer_parameters", issuer_parameters) + _setter("key_properties", key_properties) + _setter("secret_properties", secret_properties) if lifetime_actions is not None: - pulumi.set(__self__, "lifetime_actions", lifetime_actions) + _setter("lifetime_actions", lifetime_actions) if x509_certificate_properties is not None: - pulumi.set(__self__, "x509_certificate_properties", x509_certificate_properties) + _setter("x509_certificate_properties", x509_certificate_properties) @property @pulumi.getter(name="issuerParameters") @@ -933,7 +1241,20 @@ def __init__(__self__, *, """ :param str name: The name of the Certificate Issuer. Possible values include `Self` (for self-signed certificate), or `Unknown` (for a certificate issuing authority like `Let's Encrypt` and Azure direct supported ones). Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + CertificateCertificatePolicyIssuerParameters._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -980,13 +1301,44 @@ def __init__(__self__, *, :param str curve: Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `key_type` is `EC` or `EC-HSM`. Changing this forces a new resource to be created. :param int key_size: The size of the key used in the certificate. Possible values include `2048`, `3072`, and `4096` for `RSA` keys, or `256`, `384`, and `521` for `EC` keys. This property is required when using RSA keys. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "exportable", exportable) - pulumi.set(__self__, "key_type", key_type) - pulumi.set(__self__, "reuse_key", reuse_key) + CertificateCertificatePolicyKeyProperties._configure( + lambda key, value: pulumi.set(__self__, key, value), + exportable=exportable, + key_type=key_type, + reuse_key=reuse_key, + curve=curve, + key_size=key_size, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exportable: Optional[bool] = None, + key_type: Optional[str] = None, + reuse_key: Optional[bool] = None, + curve: Optional[str] = None, + key_size: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exportable is None: + raise TypeError("Missing 'exportable' argument") + if key_type is None and 'keyType' in kwargs: + key_type = kwargs['keyType'] + if key_type is None: + raise TypeError("Missing 'key_type' argument") + if reuse_key is None and 'reuseKey' in kwargs: + reuse_key = kwargs['reuseKey'] + if reuse_key is None: + raise TypeError("Missing 'reuse_key' argument") + if key_size is None and 'keySize' in kwargs: + key_size = kwargs['keySize'] + + _setter("exportable", exportable) + _setter("key_type", key_type) + _setter("reuse_key", reuse_key) if curve is not None: - pulumi.set(__self__, "curve", curve) + _setter("curve", curve) if key_size is not None: - pulumi.set(__self__, "key_size", key_size) + _setter("key_size", key_size) @property @pulumi.getter @@ -1038,8 +1390,25 @@ def __init__(__self__, *, :param 'CertificateCertificatePolicyLifetimeActionActionArgs' action: A `action` block as defined below. :param 'CertificateCertificatePolicyLifetimeActionTriggerArgs' trigger: A `trigger` block as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "trigger", trigger) + CertificateCertificatePolicyLifetimeAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + trigger=trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional['outputs.CertificateCertificatePolicyLifetimeActionAction'] = None, + trigger: Optional['outputs.CertificateCertificatePolicyLifetimeActionTrigger'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if trigger is None: + raise TypeError("Missing 'trigger' argument") + + _setter("action", action) + _setter("trigger", trigger) @property @pulumi.getter @@ -1082,7 +1451,22 @@ def __init__(__self__, *, """ :param str action_type: The Type of action to be performed when the lifetime trigger is triggerec. Possible values include `AutoRenew` and `EmailContacts`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "action_type", action_type) + CertificateCertificatePolicyLifetimeActionAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + + _setter("action_type", action_type) @property @pulumi.getter(name="actionType") @@ -1121,10 +1505,27 @@ def __init__(__self__, *, :param int days_before_expiry: The number of days before the Certificate expires that the action associated with this Trigger should run. Changing this forces a new resource to be created. Conflicts with `lifetime_percentage`. :param int lifetime_percentage: The percentage at which during the Certificates Lifetime the action associated with this Trigger should run. Changing this forces a new resource to be created. Conflicts with `days_before_expiry`. """ + CertificateCertificatePolicyLifetimeActionTrigger._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_before_expiry=days_before_expiry, + lifetime_percentage=lifetime_percentage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_before_expiry: Optional[int] = None, + lifetime_percentage: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_before_expiry is None and 'daysBeforeExpiry' in kwargs: + days_before_expiry = kwargs['daysBeforeExpiry'] + if lifetime_percentage is None and 'lifetimePercentage' in kwargs: + lifetime_percentage = kwargs['lifetimePercentage'] + if days_before_expiry is not None: - pulumi.set(__self__, "days_before_expiry", days_before_expiry) + _setter("days_before_expiry", days_before_expiry) if lifetime_percentage is not None: - pulumi.set(__self__, "lifetime_percentage", lifetime_percentage) + _setter("lifetime_percentage", lifetime_percentage) @property @pulumi.getter(name="daysBeforeExpiry") @@ -1167,7 +1568,22 @@ def __init__(__self__, *, """ :param str content_type: The Content-Type of the Certificate, such as `application/x-pkcs12` for a PFX or `application/x-pem-file` for a PEM. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "content_type", content_type) + CertificateCertificatePolicySecretProperties._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if content_type is None: + raise TypeError("Missing 'content_type' argument") + + _setter("content_type", content_type) @property @pulumi.getter(name="contentType") @@ -1216,13 +1632,46 @@ def __init__(__self__, *, :param Sequence[str] extended_key_usages: A list of Extended/Enhanced Key Usages. Changing this forces a new resource to be created. :param 'CertificateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNamesArgs' subject_alternative_names: A `subject_alternative_names` block as defined below. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "key_usages", key_usages) - pulumi.set(__self__, "subject", subject) - pulumi.set(__self__, "validity_in_months", validity_in_months) + CertificateCertificatePolicyX509CertificateProperties._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_usages=key_usages, + subject=subject, + validity_in_months=validity_in_months, + extended_key_usages=extended_key_usages, + subject_alternative_names=subject_alternative_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_usages: Optional[Sequence[str]] = None, + subject: Optional[str] = None, + validity_in_months: Optional[int] = None, + extended_key_usages: Optional[Sequence[str]] = None, + subject_alternative_names: Optional['outputs.CertificateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNames'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_usages is None and 'keyUsages' in kwargs: + key_usages = kwargs['keyUsages'] + if key_usages is None: + raise TypeError("Missing 'key_usages' argument") + if subject is None: + raise TypeError("Missing 'subject' argument") + if validity_in_months is None and 'validityInMonths' in kwargs: + validity_in_months = kwargs['validityInMonths'] + if validity_in_months is None: + raise TypeError("Missing 'validity_in_months' argument") + if extended_key_usages is None and 'extendedKeyUsages' in kwargs: + extended_key_usages = kwargs['extendedKeyUsages'] + if subject_alternative_names is None and 'subjectAlternativeNames' in kwargs: + subject_alternative_names = kwargs['subjectAlternativeNames'] + + _setter("key_usages", key_usages) + _setter("subject", subject) + _setter("validity_in_months", validity_in_months) if extended_key_usages is not None: - pulumi.set(__self__, "extended_key_usages", extended_key_usages) + _setter("extended_key_usages", extended_key_usages) if subject_alternative_names is not None: - pulumi.set(__self__, "subject_alternative_names", subject_alternative_names) + _setter("subject_alternative_names", subject_alternative_names) @property @pulumi.getter(name="keyUsages") @@ -1293,12 +1742,29 @@ def __init__(__self__, *, :param Sequence[str] emails: A list of email addresses identified by this Certificate. Changing this forces a new resource to be created. :param Sequence[str] upns: A list of User Principal Names identified by the Certificate. Changing this forces a new resource to be created. """ + CertificateCertificatePolicyX509CertificatePropertiesSubjectAlternativeNames._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_names=dns_names, + emails=emails, + upns=upns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_names: Optional[Sequence[str]] = None, + emails: Optional[Sequence[str]] = None, + upns: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_names is None and 'dnsNames' in kwargs: + dns_names = kwargs['dnsNames'] + if dns_names is not None: - pulumi.set(__self__, "dns_names", dns_names) + _setter("dns_names", dns_names) if emails is not None: - pulumi.set(__self__, "emails", emails) + _setter("emails", emails) if upns is not None: - pulumi.set(__self__, "upns", upns) + _setter("upns", upns) @property @pulumi.getter(name="dnsNames") @@ -1336,11 +1802,28 @@ def __init__(__self__, *, :param str name: Name of the contact. :param str phone: Phone number of the contact. """ - pulumi.set(__self__, "email", email) + CertificateContactsContact._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + name=name, + phone=phone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[str] = None, + name: Optional[str] = None, + phone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + + _setter("email", email) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if phone is not None: - pulumi.set(__self__, "phone", phone) + _setter("phone", phone) @property @pulumi.getter @@ -1401,13 +1884,38 @@ def __init__(__self__, *, :param str last_name: Last name of the admin. :param str phone: Phone number of the admin. """ - pulumi.set(__self__, "email_address", email_address) + CertificateIssuerAdmin._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_address=email_address, + first_name=first_name, + last_name=last_name, + phone=phone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_address: Optional[str] = None, + first_name: Optional[str] = None, + last_name: Optional[str] = None, + phone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_address is None and 'emailAddress' in kwargs: + email_address = kwargs['emailAddress'] + if email_address is None: + raise TypeError("Missing 'email_address' argument") + if first_name is None and 'firstName' in kwargs: + first_name = kwargs['firstName'] + if last_name is None and 'lastName' in kwargs: + last_name = kwargs['lastName'] + + _setter("email_address", email_address) if first_name is not None: - pulumi.set(__self__, "first_name", first_name) + _setter("first_name", first_name) if last_name is not None: - pulumi.set(__self__, "last_name", last_name) + _setter("last_name", last_name) if phone is not None: - pulumi.set(__self__, "phone", phone) + _setter("phone", phone) @property @pulumi.getter(name="emailAddress") @@ -1472,12 +1980,31 @@ def __init__(__self__, *, :param str expire_after: Expire a Key Vault Key after given duration as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). :param str notify_before_expiry: Notify at a given duration before expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Default is `P30D`. """ + KeyRotationPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + automatic=automatic, + expire_after=expire_after, + notify_before_expiry=notify_before_expiry, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automatic: Optional['outputs.KeyRotationPolicyAutomatic'] = None, + expire_after: Optional[str] = None, + notify_before_expiry: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expire_after is None and 'expireAfter' in kwargs: + expire_after = kwargs['expireAfter'] + if notify_before_expiry is None and 'notifyBeforeExpiry' in kwargs: + notify_before_expiry = kwargs['notifyBeforeExpiry'] + if automatic is not None: - pulumi.set(__self__, "automatic", automatic) + _setter("automatic", automatic) if expire_after is not None: - pulumi.set(__self__, "expire_after", expire_after) + _setter("expire_after", expire_after) if notify_before_expiry is not None: - pulumi.set(__self__, "notify_before_expiry", notify_before_expiry) + _setter("notify_before_expiry", notify_before_expiry) @property @pulumi.getter @@ -1532,10 +2059,27 @@ def __init__(__self__, *, :param str time_after_creation: Rotate automatically at a duration after create as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). :param str time_before_expiry: Rotate automatically at a duration before expiry as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). """ + KeyRotationPolicyAutomatic._configure( + lambda key, value: pulumi.set(__self__, key, value), + time_after_creation=time_after_creation, + time_before_expiry=time_before_expiry, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + time_after_creation: Optional[str] = None, + time_before_expiry: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if time_after_creation is None and 'timeAfterCreation' in kwargs: + time_after_creation = kwargs['timeAfterCreation'] + if time_before_expiry is None and 'timeBeforeExpiry' in kwargs: + time_before_expiry = kwargs['timeBeforeExpiry'] + if time_after_creation is not None: - pulumi.set(__self__, "time_after_creation", time_after_creation) + _setter("time_after_creation", time_after_creation) if time_before_expiry is not None: - pulumi.set(__self__, "time_before_expiry", time_before_expiry) + _setter("time_before_expiry", time_before_expiry) @property @pulumi.getter(name="timeAfterCreation") @@ -1602,18 +2146,59 @@ def __init__(__self__, *, :param Sequence[str] secret_permissions: List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`. :param Sequence[str] storage_permissions: List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`. """ - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "tenant_id", tenant_id) + KeyVaultAccessPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + object_id=object_id, + tenant_id=tenant_id, + application_id=application_id, + certificate_permissions=certificate_permissions, + key_permissions=key_permissions, + secret_permissions=secret_permissions, + storage_permissions=storage_permissions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + object_id: Optional[str] = None, + tenant_id: Optional[str] = None, + application_id: Optional[str] = None, + certificate_permissions: Optional[Sequence[str]] = None, + key_permissions: Optional[Sequence[str]] = None, + secret_permissions: Optional[Sequence[str]] = None, + storage_permissions: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if application_id is None and 'applicationId' in kwargs: + application_id = kwargs['applicationId'] + if certificate_permissions is None and 'certificatePermissions' in kwargs: + certificate_permissions = kwargs['certificatePermissions'] + if key_permissions is None and 'keyPermissions' in kwargs: + key_permissions = kwargs['keyPermissions'] + if secret_permissions is None and 'secretPermissions' in kwargs: + secret_permissions = kwargs['secretPermissions'] + if storage_permissions is None and 'storagePermissions' in kwargs: + storage_permissions = kwargs['storagePermissions'] + + _setter("object_id", object_id) + _setter("tenant_id", tenant_id) if application_id is not None: - pulumi.set(__self__, "application_id", application_id) + _setter("application_id", application_id) if certificate_permissions is not None: - pulumi.set(__self__, "certificate_permissions", certificate_permissions) + _setter("certificate_permissions", certificate_permissions) if key_permissions is not None: - pulumi.set(__self__, "key_permissions", key_permissions) + _setter("key_permissions", key_permissions) if secret_permissions is not None: - pulumi.set(__self__, "secret_permissions", secret_permissions) + _setter("secret_permissions", secret_permissions) if storage_permissions is not None: - pulumi.set(__self__, "storage_permissions", storage_permissions) + _setter("storage_permissions", storage_permissions) @property @pulumi.getter(name="objectId") @@ -1683,11 +2268,28 @@ def __init__(__self__, *, :param str name: Name of the contact. :param str phone: Phone number of the contact. """ - pulumi.set(__self__, "email", email) + KeyVaultContact._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + name=name, + phone=phone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[str] = None, + name: Optional[str] = None, + phone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + + _setter("email", email) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if phone is not None: - pulumi.set(__self__, "phone", phone) + _setter("phone", phone) @property @pulumi.getter @@ -1748,12 +2350,39 @@ def __init__(__self__, *, :param Sequence[str] ip_rules: One or more IP Addresses, or CIDR Blocks which should be able to access the Key Vault. :param Sequence[str] virtual_network_subnet_ids: One or more Subnet IDs which should be able to access this Key Vault. """ - pulumi.set(__self__, "bypass", bypass) - pulumi.set(__self__, "default_action", default_action) + KeyVaultNetworkAcls._configure( + lambda key, value: pulumi.set(__self__, key, value), + bypass=bypass, + default_action=default_action, + ip_rules=ip_rules, + virtual_network_subnet_ids=virtual_network_subnet_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bypass: Optional[str] = None, + default_action: Optional[str] = None, + ip_rules: Optional[Sequence[str]] = None, + virtual_network_subnet_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bypass is None: + raise TypeError("Missing 'bypass' argument") + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if default_action is None: + raise TypeError("Missing 'default_action' argument") + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if virtual_network_subnet_ids is None and 'virtualNetworkSubnetIds' in kwargs: + virtual_network_subnet_ids = kwargs['virtualNetworkSubnetIds'] + + _setter("bypass", bypass) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if virtual_network_subnet_ids is not None: - pulumi.set(__self__, "virtual_network_subnet_ids", virtual_network_subnet_ids) + _setter("virtual_network_subnet_ids", virtual_network_subnet_ids) @property @pulumi.getter @@ -1814,8 +2443,27 @@ def __init__(__self__, *, :param str bypass: Specifies which traffic can bypass the network rules. Possible values are `AzureServices` and `None`. :param str default_action: The Default Action to use. Possible values are `Allow` and `Deny`. """ - pulumi.set(__self__, "bypass", bypass) - pulumi.set(__self__, "default_action", default_action) + ManagedHardwareSecurityModuleNetworkAcls._configure( + lambda key, value: pulumi.set(__self__, key, value), + bypass=bypass, + default_action=default_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bypass: Optional[str] = None, + default_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bypass is None: + raise TypeError("Missing 'bypass' argument") + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if default_action is None: + raise TypeError("Missing 'default_action' argument") + + _setter("bypass", bypass) + _setter("default_action", default_action) @property @pulumi.getter @@ -1849,11 +2497,50 @@ def __init__(__self__, *, :param Sequence['GetCertificateCertificatePolicySecretPropertyArgs'] secret_properties: A `secret_properties` block as defined below. :param Sequence['GetCertificateCertificatePolicyX509CertificatePropertyArgs'] x509_certificate_properties: An `x509_certificate_properties` block as defined below. """ - pulumi.set(__self__, "issuer_parameters", issuer_parameters) - pulumi.set(__self__, "key_properties", key_properties) - pulumi.set(__self__, "lifetime_actions", lifetime_actions) - pulumi.set(__self__, "secret_properties", secret_properties) - pulumi.set(__self__, "x509_certificate_properties", x509_certificate_properties) + GetCertificateCertificatePolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + issuer_parameters=issuer_parameters, + key_properties=key_properties, + lifetime_actions=lifetime_actions, + secret_properties=secret_properties, + x509_certificate_properties=x509_certificate_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + issuer_parameters: Optional[Sequence['outputs.GetCertificateCertificatePolicyIssuerParameterResult']] = None, + key_properties: Optional[Sequence['outputs.GetCertificateCertificatePolicyKeyPropertyResult']] = None, + lifetime_actions: Optional[Sequence['outputs.GetCertificateCertificatePolicyLifetimeActionResult']] = None, + secret_properties: Optional[Sequence['outputs.GetCertificateCertificatePolicySecretPropertyResult']] = None, + x509_certificate_properties: Optional[Sequence['outputs.GetCertificateCertificatePolicyX509CertificatePropertyResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if issuer_parameters is None and 'issuerParameters' in kwargs: + issuer_parameters = kwargs['issuerParameters'] + if issuer_parameters is None: + raise TypeError("Missing 'issuer_parameters' argument") + if key_properties is None and 'keyProperties' in kwargs: + key_properties = kwargs['keyProperties'] + if key_properties is None: + raise TypeError("Missing 'key_properties' argument") + if lifetime_actions is None and 'lifetimeActions' in kwargs: + lifetime_actions = kwargs['lifetimeActions'] + if lifetime_actions is None: + raise TypeError("Missing 'lifetime_actions' argument") + if secret_properties is None and 'secretProperties' in kwargs: + secret_properties = kwargs['secretProperties'] + if secret_properties is None: + raise TypeError("Missing 'secret_properties' argument") + if x509_certificate_properties is None and 'x509CertificateProperties' in kwargs: + x509_certificate_properties = kwargs['x509CertificateProperties'] + if x509_certificate_properties is None: + raise TypeError("Missing 'x509_certificate_properties' argument") + + _setter("issuer_parameters", issuer_parameters) + _setter("key_properties", key_properties) + _setter("lifetime_actions", lifetime_actions) + _setter("secret_properties", secret_properties) + _setter("x509_certificate_properties", x509_certificate_properties) @property @pulumi.getter(name="issuerParameters") @@ -1903,7 +2590,20 @@ def __init__(__self__, *, """ :param str name: Specifies the name of the Key Vault Certificate. """ - pulumi.set(__self__, "name", name) + GetCertificateCertificatePolicyIssuerParameterResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -1928,11 +2628,46 @@ def __init__(__self__, *, :param str key_type: Specifies the Type of Key, for example `RSA`. :param bool reuse_key: Is the key reusable? """ - pulumi.set(__self__, "curve", curve) - pulumi.set(__self__, "exportable", exportable) - pulumi.set(__self__, "key_size", key_size) - pulumi.set(__self__, "key_type", key_type) - pulumi.set(__self__, "reuse_key", reuse_key) + GetCertificateCertificatePolicyKeyPropertyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + curve=curve, + exportable=exportable, + key_size=key_size, + key_type=key_type, + reuse_key=reuse_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + curve: Optional[str] = None, + exportable: Optional[bool] = None, + key_size: Optional[int] = None, + key_type: Optional[str] = None, + reuse_key: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if curve is None: + raise TypeError("Missing 'curve' argument") + if exportable is None: + raise TypeError("Missing 'exportable' argument") + if key_size is None and 'keySize' in kwargs: + key_size = kwargs['keySize'] + if key_size is None: + raise TypeError("Missing 'key_size' argument") + if key_type is None and 'keyType' in kwargs: + key_type = kwargs['keyType'] + if key_type is None: + raise TypeError("Missing 'key_type' argument") + if reuse_key is None and 'reuseKey' in kwargs: + reuse_key = kwargs['reuseKey'] + if reuse_key is None: + raise TypeError("Missing 'reuse_key' argument") + + _setter("curve", curve) + _setter("exportable", exportable) + _setter("key_size", key_size) + _setter("key_type", key_type) + _setter("reuse_key", reuse_key) @property @pulumi.getter @@ -1981,8 +2716,25 @@ def __init__(__self__, *, :param Sequence['GetCertificateCertificatePolicyLifetimeActionActionArgs'] actions: A `action` block as defined below. :param Sequence['GetCertificateCertificatePolicyLifetimeActionTriggerArgs'] triggers: A `trigger` block as defined below. """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "triggers", triggers) + GetCertificateCertificatePolicyLifetimeActionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + triggers=triggers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[Sequence['outputs.GetCertificateCertificatePolicyLifetimeActionActionResult']] = None, + triggers: Optional[Sequence['outputs.GetCertificateCertificatePolicyLifetimeActionTriggerResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if triggers is None: + raise TypeError("Missing 'triggers' argument") + + _setter("actions", actions) + _setter("triggers", triggers) @property @pulumi.getter @@ -2008,7 +2760,22 @@ def __init__(__self__, *, """ :param str action_type: The Type of action to be performed when the lifetime trigger is triggerec. """ - pulumi.set(__self__, "action_type", action_type) + GetCertificateCertificatePolicyLifetimeActionActionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_type=action_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_type is None and 'actionType' in kwargs: + action_type = kwargs['actionType'] + if action_type is None: + raise TypeError("Missing 'action_type' argument") + + _setter("action_type", action_type) @property @pulumi.getter(name="actionType") @@ -2028,8 +2795,29 @@ def __init__(__self__, *, :param int days_before_expiry: The number of days before the Certificate expires that the action associated with this Trigger should run. :param int lifetime_percentage: The percentage at which during the Certificates Lifetime the action associated with this Trigger should run. """ - pulumi.set(__self__, "days_before_expiry", days_before_expiry) - pulumi.set(__self__, "lifetime_percentage", lifetime_percentage) + GetCertificateCertificatePolicyLifetimeActionTriggerResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_before_expiry=days_before_expiry, + lifetime_percentage=lifetime_percentage, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_before_expiry: Optional[int] = None, + lifetime_percentage: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_before_expiry is None and 'daysBeforeExpiry' in kwargs: + days_before_expiry = kwargs['daysBeforeExpiry'] + if days_before_expiry is None: + raise TypeError("Missing 'days_before_expiry' argument") + if lifetime_percentage is None and 'lifetimePercentage' in kwargs: + lifetime_percentage = kwargs['lifetimePercentage'] + if lifetime_percentage is None: + raise TypeError("Missing 'lifetime_percentage' argument") + + _setter("days_before_expiry", days_before_expiry) + _setter("lifetime_percentage", lifetime_percentage) @property @pulumi.getter(name="daysBeforeExpiry") @@ -2055,7 +2843,22 @@ def __init__(__self__, *, """ :param str content_type: The Content-Type of the Certificate, for example `application/x-pkcs12` for a PFX or `application/x-pem-file` for a PEM. """ - pulumi.set(__self__, "content_type", content_type) + GetCertificateCertificatePolicySecretPropertyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if content_type is None: + raise TypeError("Missing 'content_type' argument") + + _setter("content_type", content_type) @property @pulumi.getter(name="contentType") @@ -2081,11 +2884,48 @@ def __init__(__self__, *, :param Sequence['GetCertificateCertificatePolicyX509CertificatePropertySubjectAlternativeNameArgs'] subject_alternative_names: A `subject_alternative_names` block as defined below. :param int validity_in_months: The Certificates Validity Period in Months. """ - pulumi.set(__self__, "extended_key_usages", extended_key_usages) - pulumi.set(__self__, "key_usages", key_usages) - pulumi.set(__self__, "subject", subject) - pulumi.set(__self__, "subject_alternative_names", subject_alternative_names) - pulumi.set(__self__, "validity_in_months", validity_in_months) + GetCertificateCertificatePolicyX509CertificatePropertyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + extended_key_usages=extended_key_usages, + key_usages=key_usages, + subject=subject, + subject_alternative_names=subject_alternative_names, + validity_in_months=validity_in_months, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + extended_key_usages: Optional[Sequence[str]] = None, + key_usages: Optional[Sequence[str]] = None, + subject: Optional[str] = None, + subject_alternative_names: Optional[Sequence['outputs.GetCertificateCertificatePolicyX509CertificatePropertySubjectAlternativeNameResult']] = None, + validity_in_months: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if extended_key_usages is None and 'extendedKeyUsages' in kwargs: + extended_key_usages = kwargs['extendedKeyUsages'] + if extended_key_usages is None: + raise TypeError("Missing 'extended_key_usages' argument") + if key_usages is None and 'keyUsages' in kwargs: + key_usages = kwargs['keyUsages'] + if key_usages is None: + raise TypeError("Missing 'key_usages' argument") + if subject is None: + raise TypeError("Missing 'subject' argument") + if subject_alternative_names is None and 'subjectAlternativeNames' in kwargs: + subject_alternative_names = kwargs['subjectAlternativeNames'] + if subject_alternative_names is None: + raise TypeError("Missing 'subject_alternative_names' argument") + if validity_in_months is None and 'validityInMonths' in kwargs: + validity_in_months = kwargs['validityInMonths'] + if validity_in_months is None: + raise TypeError("Missing 'validity_in_months' argument") + + _setter("extended_key_usages", extended_key_usages) + _setter("key_usages", key_usages) + _setter("subject", subject) + _setter("subject_alternative_names", subject_alternative_names) + _setter("validity_in_months", validity_in_months) @property @pulumi.getter(name="extendedKeyUsages") @@ -2139,9 +2979,32 @@ def __init__(__self__, *, :param Sequence[str] emails: A list of email addresses identified by this Certificate. :param Sequence[str] upns: A list of User Principal Names identified by the Certificate. """ - pulumi.set(__self__, "dns_names", dns_names) - pulumi.set(__self__, "emails", emails) - pulumi.set(__self__, "upns", upns) + GetCertificateCertificatePolicyX509CertificatePropertySubjectAlternativeNameResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_names=dns_names, + emails=emails, + upns=upns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_names: Optional[Sequence[str]] = None, + emails: Optional[Sequence[str]] = None, + upns: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_names is None and 'dnsNames' in kwargs: + dns_names = kwargs['dnsNames'] + if dns_names is None: + raise TypeError("Missing 'dns_names' argument") + if emails is None: + raise TypeError("Missing 'emails' argument") + if upns is None: + raise TypeError("Missing 'upns' argument") + + _setter("dns_names", dns_names) + _setter("emails", emails) + _setter("upns", upns) @property @pulumi.getter(name="dnsNames") @@ -2181,10 +3044,41 @@ def __init__(__self__, *, :param str last_name: Last name of the admin. :param str phone: Phone number of the admin. """ - pulumi.set(__self__, "email_address", email_address) - pulumi.set(__self__, "first_name", first_name) - pulumi.set(__self__, "last_name", last_name) - pulumi.set(__self__, "phone", phone) + GetCertificateIssuerAdminResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_address=email_address, + first_name=first_name, + last_name=last_name, + phone=phone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_address: Optional[str] = None, + first_name: Optional[str] = None, + last_name: Optional[str] = None, + phone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_address is None and 'emailAddress' in kwargs: + email_address = kwargs['emailAddress'] + if email_address is None: + raise TypeError("Missing 'email_address' argument") + if first_name is None and 'firstName' in kwargs: + first_name = kwargs['firstName'] + if first_name is None: + raise TypeError("Missing 'first_name' argument") + if last_name is None and 'lastName' in kwargs: + last_name = kwargs['lastName'] + if last_name is None: + raise TypeError("Missing 'last_name' argument") + if phone is None: + raise TypeError("Missing 'phone' argument") + + _setter("email_address", email_address) + _setter("first_name", first_name) + _setter("last_name", last_name) + _setter("phone", phone) @property @pulumi.getter(name="emailAddress") @@ -2229,9 +3123,30 @@ def __init__(__self__, *, :param bool enabled: Whether this secret is enabled. :param str name: The name of secret. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) + GetCertificatesCertificateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("enabled", enabled) + _setter("id", id) + _setter("name", name) @property @pulumi.getter @@ -2274,13 +3189,64 @@ def __init__(__self__, *, :param Sequence[str] storage_permissions: A list of storage permissions applicable to this Access Policy. :param str tenant_id: The Azure Active Directory Tenant ID used to authenticate requests for this Key Vault. """ - pulumi.set(__self__, "application_id", application_id) - pulumi.set(__self__, "certificate_permissions", certificate_permissions) - pulumi.set(__self__, "key_permissions", key_permissions) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "secret_permissions", secret_permissions) - pulumi.set(__self__, "storage_permissions", storage_permissions) - pulumi.set(__self__, "tenant_id", tenant_id) + GetKeyVaultAccessPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_id=application_id, + certificate_permissions=certificate_permissions, + key_permissions=key_permissions, + object_id=object_id, + secret_permissions=secret_permissions, + storage_permissions=storage_permissions, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_id: Optional[str] = None, + certificate_permissions: Optional[Sequence[str]] = None, + key_permissions: Optional[Sequence[str]] = None, + object_id: Optional[str] = None, + secret_permissions: Optional[Sequence[str]] = None, + storage_permissions: Optional[Sequence[str]] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_id is None and 'applicationId' in kwargs: + application_id = kwargs['applicationId'] + if application_id is None: + raise TypeError("Missing 'application_id' argument") + if certificate_permissions is None and 'certificatePermissions' in kwargs: + certificate_permissions = kwargs['certificatePermissions'] + if certificate_permissions is None: + raise TypeError("Missing 'certificate_permissions' argument") + if key_permissions is None and 'keyPermissions' in kwargs: + key_permissions = kwargs['keyPermissions'] + if key_permissions is None: + raise TypeError("Missing 'key_permissions' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if secret_permissions is None and 'secretPermissions' in kwargs: + secret_permissions = kwargs['secretPermissions'] + if secret_permissions is None: + raise TypeError("Missing 'secret_permissions' argument") + if storage_permissions is None and 'storagePermissions' in kwargs: + storage_permissions = kwargs['storagePermissions'] + if storage_permissions is None: + raise TypeError("Missing 'storage_permissions' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("application_id", application_id) + _setter("certificate_permissions", certificate_permissions) + _setter("key_permissions", key_permissions) + _setter("object_id", object_id) + _setter("secret_permissions", secret_permissions) + _setter("storage_permissions", storage_permissions) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="applicationId") @@ -2346,10 +3312,41 @@ def __init__(__self__, *, default_action: str, ip_rules: Sequence[str], virtual_network_subnet_ids: Sequence[str]): - pulumi.set(__self__, "bypass", bypass) - pulumi.set(__self__, "default_action", default_action) - pulumi.set(__self__, "ip_rules", ip_rules) - pulumi.set(__self__, "virtual_network_subnet_ids", virtual_network_subnet_ids) + GetKeyVaultNetworkAclResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + bypass=bypass, + default_action=default_action, + ip_rules=ip_rules, + virtual_network_subnet_ids=virtual_network_subnet_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bypass: Optional[str] = None, + default_action: Optional[str] = None, + ip_rules: Optional[Sequence[str]] = None, + virtual_network_subnet_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bypass is None: + raise TypeError("Missing 'bypass' argument") + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if default_action is None: + raise TypeError("Missing 'default_action' argument") + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if ip_rules is None: + raise TypeError("Missing 'ip_rules' argument") + if virtual_network_subnet_ids is None and 'virtualNetworkSubnetIds' in kwargs: + virtual_network_subnet_ids = kwargs['virtualNetworkSubnetIds'] + if virtual_network_subnet_ids is None: + raise TypeError("Missing 'virtual_network_subnet_ids' argument") + + _setter("bypass", bypass) + _setter("default_action", default_action) + _setter("ip_rules", ip_rules) + _setter("virtual_network_subnet_ids", virtual_network_subnet_ids) @property @pulumi.getter @@ -2383,9 +3380,30 @@ def __init__(__self__, *, :param str id: The ID of this secret. :param str name: The name of secret. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) + GetSecretsSecretResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("enabled", enabled) + _setter("id", id) + _setter("name", name) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/keyvault/secret.py b/sdk/python/pulumi_azure/keyvault/secret.py index 5ef9d84c45..bdf346483f 100644 --- a/sdk/python/pulumi_azure/keyvault/secret.py +++ b/sdk/python/pulumi_azure/keyvault/secret.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SecretArgs', 'Secret'] @@ -33,18 +33,53 @@ def __init__(__self__, *, :param pulumi.Input[str] not_before_date: Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "key_vault_id", key_vault_id) - pulumi.set(__self__, "value", value) + SecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_id=key_vault_id, + value=value, + content_type=content_type, + expiration_date=expiration_date, + name=name, + not_before_date=not_before_date, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_id: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + content_type: Optional[pulumi.Input[str]] = None, + expiration_date: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + not_before_date: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if value is None: + raise TypeError("Missing 'value' argument") + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if not_before_date is None and 'notBeforeDate' in kwargs: + not_before_date = kwargs['notBeforeDate'] + + _setter("key_vault_id", key_vault_id) + _setter("value", value) if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if expiration_date is not None: - pulumi.set(__self__, "expiration_date", expiration_date) + _setter("expiration_date", expiration_date) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if not_before_date is not None: - pulumi.set(__self__, "not_before_date", not_before_date) + _setter("not_before_date", not_before_date) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="keyVaultId") @@ -163,28 +198,73 @@ def __init__(__self__, *, :param pulumi.Input[str] version: The current version of the Key Vault Secret. :param pulumi.Input[str] versionless_id: The Base ID of the Key Vault Secret. """ + _SecretState._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + expiration_date=expiration_date, + key_vault_id=key_vault_id, + name=name, + not_before_date=not_before_date, + resource_id=resource_id, + resource_versionless_id=resource_versionless_id, + tags=tags, + value=value, + version=version, + versionless_id=versionless_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[pulumi.Input[str]] = None, + expiration_date: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + not_before_date: Optional[pulumi.Input[str]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + resource_versionless_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + value: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + versionless_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if not_before_date is None and 'notBeforeDate' in kwargs: + not_before_date = kwargs['notBeforeDate'] + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_versionless_id is None and 'resourceVersionlessId' in kwargs: + resource_versionless_id = kwargs['resourceVersionlessId'] + if versionless_id is None and 'versionlessId' in kwargs: + versionless_id = kwargs['versionlessId'] + if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if expiration_date is not None: - pulumi.set(__self__, "expiration_date", expiration_date) + _setter("expiration_date", expiration_date) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if not_before_date is not None: - pulumi.set(__self__, "not_before_date", not_before_date) + _setter("not_before_date", not_before_date) if resource_id is not None: - pulumi.set(__self__, "resource_id", resource_id) + _setter("resource_id", resource_id) if resource_versionless_id is not None: - pulumi.set(__self__, "resource_versionless_id", resource_versionless_id) + _setter("resource_versionless_id", resource_versionless_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if versionless_id is not None: - pulumi.set(__self__, "versionless_id", versionless_id) + _setter("versionless_id", versionless_id) @property @pulumi.getter(name="contentType") @@ -468,6 +548,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SecretArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/kusto/_inputs.py b/sdk/python/pulumi_azure/kusto/_inputs.py index 4db9c6771e..f737cd53f4 100644 --- a/sdk/python/pulumi_azure/kusto/_inputs.py +++ b/sdk/python/pulumi_azure/kusto/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -34,18 +34,51 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] tables_to_excludes: List of tables to exclude from the follower database. :param pulumi.Input[Sequence[pulumi.Input[str]]] tables_to_includes: List of tables to include in the follower database. """ + AttachedDatabaseConfigurationSharingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + external_tables_to_excludes=external_tables_to_excludes, + external_tables_to_includes=external_tables_to_includes, + materialized_views_to_excludes=materialized_views_to_excludes, + materialized_views_to_includes=materialized_views_to_includes, + tables_to_excludes=tables_to_excludes, + tables_to_includes=tables_to_includes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + external_tables_to_excludes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + external_tables_to_includes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + materialized_views_to_excludes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + materialized_views_to_includes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tables_to_excludes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tables_to_includes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if external_tables_to_excludes is None and 'externalTablesToExcludes' in kwargs: + external_tables_to_excludes = kwargs['externalTablesToExcludes'] + if external_tables_to_includes is None and 'externalTablesToIncludes' in kwargs: + external_tables_to_includes = kwargs['externalTablesToIncludes'] + if materialized_views_to_excludes is None and 'materializedViewsToExcludes' in kwargs: + materialized_views_to_excludes = kwargs['materializedViewsToExcludes'] + if materialized_views_to_includes is None and 'materializedViewsToIncludes' in kwargs: + materialized_views_to_includes = kwargs['materializedViewsToIncludes'] + if tables_to_excludes is None and 'tablesToExcludes' in kwargs: + tables_to_excludes = kwargs['tablesToExcludes'] + if tables_to_includes is None and 'tablesToIncludes' in kwargs: + tables_to_includes = kwargs['tablesToIncludes'] + if external_tables_to_excludes is not None: - pulumi.set(__self__, "external_tables_to_excludes", external_tables_to_excludes) + _setter("external_tables_to_excludes", external_tables_to_excludes) if external_tables_to_includes is not None: - pulumi.set(__self__, "external_tables_to_includes", external_tables_to_includes) + _setter("external_tables_to_includes", external_tables_to_includes) if materialized_views_to_excludes is not None: - pulumi.set(__self__, "materialized_views_to_excludes", materialized_views_to_excludes) + _setter("materialized_views_to_excludes", materialized_views_to_excludes) if materialized_views_to_includes is not None: - pulumi.set(__self__, "materialized_views_to_includes", materialized_views_to_includes) + _setter("materialized_views_to_includes", materialized_views_to_includes) if tables_to_excludes is not None: - pulumi.set(__self__, "tables_to_excludes", tables_to_excludes) + _setter("tables_to_excludes", tables_to_excludes) if tables_to_includes is not None: - pulumi.set(__self__, "tables_to_includes", tables_to_includes) + _setter("tables_to_includes", tables_to_includes) @property @pulumi.getter(name="externalTablesToExcludes") @@ -135,13 +168,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this System Assigned Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this System Assigned Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ClusterIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -203,8 +261,29 @@ def __init__(__self__, *, :param pulumi.Input[int] maximum_instances: The maximum number of allowed instances. Must between `0` and `1000`. :param pulumi.Input[int] minimum_instances: The minimum number of allowed instances. Must between `0` and `1000`. """ - pulumi.set(__self__, "maximum_instances", maximum_instances) - pulumi.set(__self__, "minimum_instances", minimum_instances) + ClusterOptimizedAutoScaleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + maximum_instances=maximum_instances, + minimum_instances=minimum_instances, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + maximum_instances: Optional[pulumi.Input[int]] = None, + minimum_instances: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maximum_instances is None and 'maximumInstances' in kwargs: + maximum_instances = kwargs['maximumInstances'] + if maximum_instances is None: + raise TypeError("Missing 'maximum_instances' argument") + if minimum_instances is None and 'minimumInstances' in kwargs: + minimum_instances = kwargs['minimumInstances'] + if minimum_instances is None: + raise TypeError("Missing 'minimum_instances' argument") + + _setter("maximum_instances", maximum_instances) + _setter("minimum_instances", minimum_instances) @property @pulumi.getter(name="maximumInstances") @@ -243,9 +322,24 @@ def __init__(__self__, *, > **NOTE:** If no `optimized_auto_scale` block is defined, then the capacity is required. > **NOTE:** If an `optimized_auto_scale` block is defined and no capacity is set, then the capacity is initially set to the value of `minimum_instances`. """ - pulumi.set(__self__, "name", name) + ClusterSkuArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + capacity=capacity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + capacity: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) @property @pulumi.getter @@ -286,9 +380,36 @@ def __init__(__self__, *, :param pulumi.Input[str] engine_public_ip_id: Engine service's public IP address resource id. :param pulumi.Input[str] subnet_id: The subnet resource id. """ - pulumi.set(__self__, "data_management_public_ip_id", data_management_public_ip_id) - pulumi.set(__self__, "engine_public_ip_id", engine_public_ip_id) - pulumi.set(__self__, "subnet_id", subnet_id) + ClusterVirtualNetworkConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_management_public_ip_id=data_management_public_ip_id, + engine_public_ip_id=engine_public_ip_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_management_public_ip_id: Optional[pulumi.Input[str]] = None, + engine_public_ip_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_management_public_ip_id is None and 'dataManagementPublicIpId' in kwargs: + data_management_public_ip_id = kwargs['dataManagementPublicIpId'] + if data_management_public_ip_id is None: + raise TypeError("Missing 'data_management_public_ip_id' argument") + if engine_public_ip_id is None and 'enginePublicIpId' in kwargs: + engine_public_ip_id = kwargs['enginePublicIpId'] + if engine_public_ip_id is None: + raise TypeError("Missing 'engine_public_ip_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("data_management_public_ip_id", data_management_public_ip_id) + _setter("engine_public_ip_id", engine_public_ip_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="dataManagementPublicIpId") diff --git a/sdk/python/pulumi_azure/kusto/attached_database_configuration.py b/sdk/python/pulumi_azure/kusto/attached_database_configuration.py index 75bdcf7815..26ca3cf1b0 100644 --- a/sdk/python/pulumi_azure/kusto/attached_database_configuration.py +++ b/sdk/python/pulumi_azure/kusto/attached_database_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,18 +35,61 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Kusto Attached Database Configuration to create. Changing this forces a new resource to be created. :param pulumi.Input['AttachedDatabaseConfigurationSharingArgs'] sharing: A `sharing` block as defined below. """ - pulumi.set(__self__, "cluster_name", cluster_name) - pulumi.set(__self__, "cluster_resource_id", cluster_resource_id) - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + AttachedDatabaseConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + cluster_resource_id=cluster_resource_id, + database_name=database_name, + resource_group_name=resource_group_name, + default_principal_modification_kind=default_principal_modification_kind, + location=location, + name=name, + sharing=sharing, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + cluster_resource_id: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + default_principal_modification_kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sharing: Optional[pulumi.Input['AttachedDatabaseConfigurationSharingArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if cluster_name is None: + raise TypeError("Missing 'cluster_name' argument") + if cluster_resource_id is None and 'clusterResourceId' in kwargs: + cluster_resource_id = kwargs['clusterResourceId'] + if cluster_resource_id is None: + raise TypeError("Missing 'cluster_resource_id' argument") + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if default_principal_modification_kind is None and 'defaultPrincipalModificationKind' in kwargs: + default_principal_modification_kind = kwargs['defaultPrincipalModificationKind'] + + _setter("cluster_name", cluster_name) + _setter("cluster_resource_id", cluster_resource_id) + _setter("database_name", database_name) + _setter("resource_group_name", resource_group_name) if default_principal_modification_kind is not None: - pulumi.set(__self__, "default_principal_modification_kind", default_principal_modification_kind) + _setter("default_principal_modification_kind", default_principal_modification_kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sharing is not None: - pulumi.set(__self__, "sharing", sharing) + _setter("sharing", sharing) @property @pulumi.getter(name="clusterName") @@ -169,24 +212,63 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the resource group of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. :param pulumi.Input['AttachedDatabaseConfigurationSharingArgs'] sharing: A `sharing` block as defined below. """ + _AttachedDatabaseConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + attached_database_names=attached_database_names, + cluster_name=cluster_name, + cluster_resource_id=cluster_resource_id, + database_name=database_name, + default_principal_modification_kind=default_principal_modification_kind, + location=location, + name=name, + resource_group_name=resource_group_name, + sharing=sharing, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + attached_database_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cluster_name: Optional[pulumi.Input[str]] = None, + cluster_resource_id: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + default_principal_modification_kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sharing: Optional[pulumi.Input['AttachedDatabaseConfigurationSharingArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if attached_database_names is None and 'attachedDatabaseNames' in kwargs: + attached_database_names = kwargs['attachedDatabaseNames'] + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if cluster_resource_id is None and 'clusterResourceId' in kwargs: + cluster_resource_id = kwargs['clusterResourceId'] + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if default_principal_modification_kind is None and 'defaultPrincipalModificationKind' in kwargs: + default_principal_modification_kind = kwargs['defaultPrincipalModificationKind'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if attached_database_names is not None: - pulumi.set(__self__, "attached_database_names", attached_database_names) + _setter("attached_database_names", attached_database_names) if cluster_name is not None: - pulumi.set(__self__, "cluster_name", cluster_name) + _setter("cluster_name", cluster_name) if cluster_resource_id is not None: - pulumi.set(__self__, "cluster_resource_id", cluster_resource_id) + _setter("cluster_resource_id", cluster_resource_id) if database_name is not None: - pulumi.set(__self__, "database_name", database_name) + _setter("database_name", database_name) if default_principal_modification_kind is not None: - pulumi.set(__self__, "default_principal_modification_kind", default_principal_modification_kind) + _setter("default_principal_modification_kind", default_principal_modification_kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sharing is not None: - pulumi.set(__self__, "sharing", sharing) + _setter("sharing", sharing) @property @pulumi.getter(name="attachedDatabaseNames") @@ -450,6 +532,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AttachedDatabaseConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -487,6 +573,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if sharing is not None and not isinstance(sharing, AttachedDatabaseConfigurationSharingArgs): + sharing = sharing or {} + def _setter(key, value): + sharing[key] = value + AttachedDatabaseConfigurationSharingArgs._configure(_setter, **sharing) __props__.__dict__["sharing"] = sharing __props__.__dict__["attached_database_names"] = None super(AttachedDatabaseConfiguration, __self__).__init__( diff --git a/sdk/python/pulumi_azure/kusto/cluster.py b/sdk/python/pulumi_azure/kusto/cluster.py index 34c8db62bf..a10d5eafab 100644 --- a/sdk/python/pulumi_azure/kusto/cluster.py +++ b/sdk/python/pulumi_azure/kusto/cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -66,51 +66,138 @@ def __init__(__self__, *, :param pulumi.Input['ClusterVirtualNetworkConfigurationArgs'] virtual_network_configuration: A `virtual_network_configuration` block as defined below. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones in which this Kusto Cluster should be located. Changing this forces a new Kusto Cluster to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + ClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + allowed_fqdns=allowed_fqdns, + allowed_ip_ranges=allowed_ip_ranges, + auto_stop_enabled=auto_stop_enabled, + disk_encryption_enabled=disk_encryption_enabled, + double_encryption_enabled=double_encryption_enabled, + engine=engine, + identity=identity, + language_extensions=language_extensions, + location=location, + name=name, + optimized_auto_scale=optimized_auto_scale, + outbound_network_access_restricted=outbound_network_access_restricted, + public_ip_type=public_ip_type, + public_network_access_enabled=public_network_access_enabled, + purge_enabled=purge_enabled, + streaming_ingestion_enabled=streaming_ingestion_enabled, + tags=tags, + trusted_external_tenants=trusted_external_tenants, + virtual_network_configuration=virtual_network_configuration, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['ClusterSkuArgs']] = None, + allowed_fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_ip_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + auto_stop_enabled: Optional[pulumi.Input[bool]] = None, + disk_encryption_enabled: Optional[pulumi.Input[bool]] = None, + double_encryption_enabled: Optional[pulumi.Input[bool]] = None, + engine: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ClusterIdentityArgs']] = None, + language_extensions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + optimized_auto_scale: Optional[pulumi.Input['ClusterOptimizedAutoScaleArgs']] = None, + outbound_network_access_restricted: Optional[pulumi.Input[bool]] = None, + public_ip_type: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + purge_enabled: Optional[pulumi.Input[bool]] = None, + streaming_ingestion_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + trusted_external_tenants: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + virtual_network_configuration: Optional[pulumi.Input['ClusterVirtualNetworkConfigurationArgs']] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if allowed_fqdns is None and 'allowedFqdns' in kwargs: + allowed_fqdns = kwargs['allowedFqdns'] + if allowed_ip_ranges is None and 'allowedIpRanges' in kwargs: + allowed_ip_ranges = kwargs['allowedIpRanges'] + if auto_stop_enabled is None and 'autoStopEnabled' in kwargs: + auto_stop_enabled = kwargs['autoStopEnabled'] + if disk_encryption_enabled is None and 'diskEncryptionEnabled' in kwargs: + disk_encryption_enabled = kwargs['diskEncryptionEnabled'] + if double_encryption_enabled is None and 'doubleEncryptionEnabled' in kwargs: + double_encryption_enabled = kwargs['doubleEncryptionEnabled'] + if language_extensions is None and 'languageExtensions' in kwargs: + language_extensions = kwargs['languageExtensions'] + if optimized_auto_scale is None and 'optimizedAutoScale' in kwargs: + optimized_auto_scale = kwargs['optimizedAutoScale'] + if outbound_network_access_restricted is None and 'outboundNetworkAccessRestricted' in kwargs: + outbound_network_access_restricted = kwargs['outboundNetworkAccessRestricted'] + if public_ip_type is None and 'publicIpType' in kwargs: + public_ip_type = kwargs['publicIpType'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if purge_enabled is None and 'purgeEnabled' in kwargs: + purge_enabled = kwargs['purgeEnabled'] + if streaming_ingestion_enabled is None and 'streamingIngestionEnabled' in kwargs: + streaming_ingestion_enabled = kwargs['streamingIngestionEnabled'] + if trusted_external_tenants is None and 'trustedExternalTenants' in kwargs: + trusted_external_tenants = kwargs['trustedExternalTenants'] + if virtual_network_configuration is None and 'virtualNetworkConfiguration' in kwargs: + virtual_network_configuration = kwargs['virtualNetworkConfiguration'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if allowed_fqdns is not None: - pulumi.set(__self__, "allowed_fqdns", allowed_fqdns) + _setter("allowed_fqdns", allowed_fqdns) if allowed_ip_ranges is not None: - pulumi.set(__self__, "allowed_ip_ranges", allowed_ip_ranges) + _setter("allowed_ip_ranges", allowed_ip_ranges) if auto_stop_enabled is not None: - pulumi.set(__self__, "auto_stop_enabled", auto_stop_enabled) + _setter("auto_stop_enabled", auto_stop_enabled) if disk_encryption_enabled is not None: - pulumi.set(__self__, "disk_encryption_enabled", disk_encryption_enabled) + _setter("disk_encryption_enabled", disk_encryption_enabled) if double_encryption_enabled is not None: - pulumi.set(__self__, "double_encryption_enabled", double_encryption_enabled) + _setter("double_encryption_enabled", double_encryption_enabled) if engine is not None: warnings.warn("""This property has been deprecated as it will no longer be supported by the API. It will be removed in a future version of the provider.""", DeprecationWarning) pulumi.log.warn("""engine is deprecated: This property has been deprecated as it will no longer be supported by the API. It will be removed in a future version of the provider.""") if engine is not None: - pulumi.set(__self__, "engine", engine) + _setter("engine", engine) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if language_extensions is not None: - pulumi.set(__self__, "language_extensions", language_extensions) + _setter("language_extensions", language_extensions) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if optimized_auto_scale is not None: - pulumi.set(__self__, "optimized_auto_scale", optimized_auto_scale) + _setter("optimized_auto_scale", optimized_auto_scale) if outbound_network_access_restricted is not None: - pulumi.set(__self__, "outbound_network_access_restricted", outbound_network_access_restricted) + _setter("outbound_network_access_restricted", outbound_network_access_restricted) if public_ip_type is not None: - pulumi.set(__self__, "public_ip_type", public_ip_type) + _setter("public_ip_type", public_ip_type) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if purge_enabled is not None: - pulumi.set(__self__, "purge_enabled", purge_enabled) + _setter("purge_enabled", purge_enabled) if streaming_ingestion_enabled is not None: - pulumi.set(__self__, "streaming_ingestion_enabled", streaming_ingestion_enabled) + _setter("streaming_ingestion_enabled", streaming_ingestion_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if trusted_external_tenants is not None: - pulumi.set(__self__, "trusted_external_tenants", trusted_external_tenants) + _setter("trusted_external_tenants", trusted_external_tenants) if virtual_network_configuration is not None: - pulumi.set(__self__, "virtual_network_configuration", virtual_network_configuration) + _setter("virtual_network_configuration", virtual_network_configuration) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="resourceGroupName") @@ -438,57 +525,146 @@ def __init__(__self__, *, :param pulumi.Input['ClusterVirtualNetworkConfigurationArgs'] virtual_network_configuration: A `virtual_network_configuration` block as defined below. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones in which this Kusto Cluster should be located. Changing this forces a new Kusto Cluster to be created. """ + _ClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_fqdns=allowed_fqdns, + allowed_ip_ranges=allowed_ip_ranges, + auto_stop_enabled=auto_stop_enabled, + data_ingestion_uri=data_ingestion_uri, + disk_encryption_enabled=disk_encryption_enabled, + double_encryption_enabled=double_encryption_enabled, + engine=engine, + identity=identity, + language_extensions=language_extensions, + location=location, + name=name, + optimized_auto_scale=optimized_auto_scale, + outbound_network_access_restricted=outbound_network_access_restricted, + public_ip_type=public_ip_type, + public_network_access_enabled=public_network_access_enabled, + purge_enabled=purge_enabled, + resource_group_name=resource_group_name, + sku=sku, + streaming_ingestion_enabled=streaming_ingestion_enabled, + tags=tags, + trusted_external_tenants=trusted_external_tenants, + uri=uri, + virtual_network_configuration=virtual_network_configuration, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_ip_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + auto_stop_enabled: Optional[pulumi.Input[bool]] = None, + data_ingestion_uri: Optional[pulumi.Input[str]] = None, + disk_encryption_enabled: Optional[pulumi.Input[bool]] = None, + double_encryption_enabled: Optional[pulumi.Input[bool]] = None, + engine: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ClusterIdentityArgs']] = None, + language_extensions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + optimized_auto_scale: Optional[pulumi.Input['ClusterOptimizedAutoScaleArgs']] = None, + outbound_network_access_restricted: Optional[pulumi.Input[bool]] = None, + public_ip_type: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + purge_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['ClusterSkuArgs']] = None, + streaming_ingestion_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + trusted_external_tenants: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + uri: Optional[pulumi.Input[str]] = None, + virtual_network_configuration: Optional[pulumi.Input['ClusterVirtualNetworkConfigurationArgs']] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_fqdns is None and 'allowedFqdns' in kwargs: + allowed_fqdns = kwargs['allowedFqdns'] + if allowed_ip_ranges is None and 'allowedIpRanges' in kwargs: + allowed_ip_ranges = kwargs['allowedIpRanges'] + if auto_stop_enabled is None and 'autoStopEnabled' in kwargs: + auto_stop_enabled = kwargs['autoStopEnabled'] + if data_ingestion_uri is None and 'dataIngestionUri' in kwargs: + data_ingestion_uri = kwargs['dataIngestionUri'] + if disk_encryption_enabled is None and 'diskEncryptionEnabled' in kwargs: + disk_encryption_enabled = kwargs['diskEncryptionEnabled'] + if double_encryption_enabled is None and 'doubleEncryptionEnabled' in kwargs: + double_encryption_enabled = kwargs['doubleEncryptionEnabled'] + if language_extensions is None and 'languageExtensions' in kwargs: + language_extensions = kwargs['languageExtensions'] + if optimized_auto_scale is None and 'optimizedAutoScale' in kwargs: + optimized_auto_scale = kwargs['optimizedAutoScale'] + if outbound_network_access_restricted is None and 'outboundNetworkAccessRestricted' in kwargs: + outbound_network_access_restricted = kwargs['outboundNetworkAccessRestricted'] + if public_ip_type is None and 'publicIpType' in kwargs: + public_ip_type = kwargs['publicIpType'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if purge_enabled is None and 'purgeEnabled' in kwargs: + purge_enabled = kwargs['purgeEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if streaming_ingestion_enabled is None and 'streamingIngestionEnabled' in kwargs: + streaming_ingestion_enabled = kwargs['streamingIngestionEnabled'] + if trusted_external_tenants is None and 'trustedExternalTenants' in kwargs: + trusted_external_tenants = kwargs['trustedExternalTenants'] + if virtual_network_configuration is None and 'virtualNetworkConfiguration' in kwargs: + virtual_network_configuration = kwargs['virtualNetworkConfiguration'] + if allowed_fqdns is not None: - pulumi.set(__self__, "allowed_fqdns", allowed_fqdns) + _setter("allowed_fqdns", allowed_fqdns) if allowed_ip_ranges is not None: - pulumi.set(__self__, "allowed_ip_ranges", allowed_ip_ranges) + _setter("allowed_ip_ranges", allowed_ip_ranges) if auto_stop_enabled is not None: - pulumi.set(__self__, "auto_stop_enabled", auto_stop_enabled) + _setter("auto_stop_enabled", auto_stop_enabled) if data_ingestion_uri is not None: - pulumi.set(__self__, "data_ingestion_uri", data_ingestion_uri) + _setter("data_ingestion_uri", data_ingestion_uri) if disk_encryption_enabled is not None: - pulumi.set(__self__, "disk_encryption_enabled", disk_encryption_enabled) + _setter("disk_encryption_enabled", disk_encryption_enabled) if double_encryption_enabled is not None: - pulumi.set(__self__, "double_encryption_enabled", double_encryption_enabled) + _setter("double_encryption_enabled", double_encryption_enabled) if engine is not None: warnings.warn("""This property has been deprecated as it will no longer be supported by the API. It will be removed in a future version of the provider.""", DeprecationWarning) pulumi.log.warn("""engine is deprecated: This property has been deprecated as it will no longer be supported by the API. It will be removed in a future version of the provider.""") if engine is not None: - pulumi.set(__self__, "engine", engine) + _setter("engine", engine) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if language_extensions is not None: - pulumi.set(__self__, "language_extensions", language_extensions) + _setter("language_extensions", language_extensions) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if optimized_auto_scale is not None: - pulumi.set(__self__, "optimized_auto_scale", optimized_auto_scale) + _setter("optimized_auto_scale", optimized_auto_scale) if outbound_network_access_restricted is not None: - pulumi.set(__self__, "outbound_network_access_restricted", outbound_network_access_restricted) + _setter("outbound_network_access_restricted", outbound_network_access_restricted) if public_ip_type is not None: - pulumi.set(__self__, "public_ip_type", public_ip_type) + _setter("public_ip_type", public_ip_type) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if purge_enabled is not None: - pulumi.set(__self__, "purge_enabled", purge_enabled) + _setter("purge_enabled", purge_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if streaming_ingestion_enabled is not None: - pulumi.set(__self__, "streaming_ingestion_enabled", streaming_ingestion_enabled) + _setter("streaming_ingestion_enabled", streaming_ingestion_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if trusted_external_tenants is not None: - pulumi.set(__self__, "trusted_external_tenants", trusted_external_tenants) + _setter("trusted_external_tenants", trusted_external_tenants) if uri is not None: - pulumi.set(__self__, "uri", uri) + _setter("uri", uri) if virtual_network_configuration is not None: - pulumi.set(__self__, "virtual_network_configuration", virtual_network_configuration) + _setter("virtual_network_configuration", virtual_network_configuration) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="allowedFqdns") @@ -915,6 +1091,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -957,10 +1137,20 @@ def _internal_init(__self__, __props__.__dict__["disk_encryption_enabled"] = disk_encryption_enabled __props__.__dict__["double_encryption_enabled"] = double_encryption_enabled __props__.__dict__["engine"] = engine + if identity is not None and not isinstance(identity, ClusterIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ClusterIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["language_extensions"] = language_extensions __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if optimized_auto_scale is not None and not isinstance(optimized_auto_scale, ClusterOptimizedAutoScaleArgs): + optimized_auto_scale = optimized_auto_scale or {} + def _setter(key, value): + optimized_auto_scale[key] = value + ClusterOptimizedAutoScaleArgs._configure(_setter, **optimized_auto_scale) __props__.__dict__["optimized_auto_scale"] = optimized_auto_scale __props__.__dict__["outbound_network_access_restricted"] = outbound_network_access_restricted __props__.__dict__["public_ip_type"] = public_ip_type @@ -969,12 +1159,22 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if sku is not None and not isinstance(sku, ClusterSkuArgs): + sku = sku or {} + def _setter(key, value): + sku[key] = value + ClusterSkuArgs._configure(_setter, **sku) if sku is None and not opts.urn: raise TypeError("Missing required property 'sku'") __props__.__dict__["sku"] = sku __props__.__dict__["streaming_ingestion_enabled"] = streaming_ingestion_enabled __props__.__dict__["tags"] = tags __props__.__dict__["trusted_external_tenants"] = trusted_external_tenants + if virtual_network_configuration is not None and not isinstance(virtual_network_configuration, ClusterVirtualNetworkConfigurationArgs): + virtual_network_configuration = virtual_network_configuration or {} + def _setter(key, value): + virtual_network_configuration[key] = value + ClusterVirtualNetworkConfigurationArgs._configure(_setter, **virtual_network_configuration) __props__.__dict__["virtual_network_configuration"] = virtual_network_configuration __props__.__dict__["zones"] = zones __props__.__dict__["data_ingestion_uri"] = None diff --git a/sdk/python/pulumi_azure/kusto/cluster_customer_managed_key.py b/sdk/python/pulumi_azure/kusto/cluster_customer_managed_key.py index 643a08883f..46a447e59c 100644 --- a/sdk/python/pulumi_azure/kusto/cluster_customer_managed_key.py +++ b/sdk/python/pulumi_azure/kusto/cluster_customer_managed_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ClusterCustomerManagedKeyArgs', 'ClusterCustomerManagedKey'] @@ -27,13 +27,48 @@ def __init__(__self__, *, :param pulumi.Input[str] key_version: The version of Key Vault Key. :param pulumi.Input[str] user_identity: The user assigned identity that has access to the Key Vault Key. If not specified, system assigned identity will be used. """ - pulumi.set(__self__, "cluster_id", cluster_id) - pulumi.set(__self__, "key_name", key_name) - pulumi.set(__self__, "key_vault_id", key_vault_id) + ClusterCustomerManagedKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + key_name=key_name, + key_vault_id=key_vault_id, + key_version=key_version, + user_identity=user_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + key_name: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + key_version: Optional[pulumi.Input[str]] = None, + user_identity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if cluster_id is None: + raise TypeError("Missing 'cluster_id' argument") + if key_name is None and 'keyName' in kwargs: + key_name = kwargs['keyName'] + if key_name is None: + raise TypeError("Missing 'key_name' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if key_version is None and 'keyVersion' in kwargs: + key_version = kwargs['keyVersion'] + if user_identity is None and 'userIdentity' in kwargs: + user_identity = kwargs['userIdentity'] + + _setter("cluster_id", cluster_id) + _setter("key_name", key_name) + _setter("key_vault_id", key_vault_id) if key_version is not None: - pulumi.set(__self__, "key_version", key_version) + _setter("key_version", key_version) if user_identity is not None: - pulumi.set(__self__, "user_identity", user_identity) + _setter("user_identity", user_identity) @property @pulumi.getter(name="clusterId") @@ -112,16 +147,45 @@ def __init__(__self__, *, :param pulumi.Input[str] key_version: The version of Key Vault Key. :param pulumi.Input[str] user_identity: The user assigned identity that has access to the Key Vault Key. If not specified, system assigned identity will be used. """ + _ClusterCustomerManagedKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + key_name=key_name, + key_vault_id=key_vault_id, + key_version=key_version, + user_identity=user_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + key_name: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + key_version: Optional[pulumi.Input[str]] = None, + user_identity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if key_name is None and 'keyName' in kwargs: + key_name = kwargs['keyName'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_version is None and 'keyVersion' in kwargs: + key_version = kwargs['keyVersion'] + if user_identity is None and 'userIdentity' in kwargs: + user_identity = kwargs['userIdentity'] + if cluster_id is not None: - pulumi.set(__self__, "cluster_id", cluster_id) + _setter("cluster_id", cluster_id) if key_name is not None: - pulumi.set(__self__, "key_name", key_name) + _setter("key_name", key_name) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if key_version is not None: - pulumi.set(__self__, "key_version", key_version) + _setter("key_version", key_version) if user_identity is not None: - pulumi.set(__self__, "user_identity", user_identity) + _setter("user_identity", user_identity) @property @pulumi.getter(name="clusterId") @@ -377,6 +441,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ClusterCustomerManagedKeyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/kusto/cluster_managed_private_endpoint.py b/sdk/python/pulumi_azure/kusto/cluster_managed_private_endpoint.py index 1a023c0960..7258938609 100644 --- a/sdk/python/pulumi_azure/kusto/cluster_managed_private_endpoint.py +++ b/sdk/python/pulumi_azure/kusto/cluster_managed_private_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ClusterManagedPrivateEndpointArgs', 'ClusterManagedPrivateEndpoint'] @@ -31,16 +31,59 @@ def __init__(__self__, *, :param pulumi.Input[str] private_link_resource_region: The region of the resource to which the managed private endpoint is created. Changing this forces a new resource to be created. :param pulumi.Input[str] request_message: The user request message. """ - pulumi.set(__self__, "cluster_name", cluster_name) - pulumi.set(__self__, "group_id", group_id) - pulumi.set(__self__, "private_link_resource_id", private_link_resource_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ClusterManagedPrivateEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + group_id=group_id, + private_link_resource_id=private_link_resource_id, + resource_group_name=resource_group_name, + name=name, + private_link_resource_region=private_link_resource_region, + request_message=request_message, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + group_id: Optional[pulumi.Input[str]] = None, + private_link_resource_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_link_resource_region: Optional[pulumi.Input[str]] = None, + request_message: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if cluster_name is None: + raise TypeError("Missing 'cluster_name' argument") + if group_id is None and 'groupId' in kwargs: + group_id = kwargs['groupId'] + if group_id is None: + raise TypeError("Missing 'group_id' argument") + if private_link_resource_id is None and 'privateLinkResourceId' in kwargs: + private_link_resource_id = kwargs['privateLinkResourceId'] + if private_link_resource_id is None: + raise TypeError("Missing 'private_link_resource_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if private_link_resource_region is None and 'privateLinkResourceRegion' in kwargs: + private_link_resource_region = kwargs['privateLinkResourceRegion'] + if request_message is None and 'requestMessage' in kwargs: + request_message = kwargs['requestMessage'] + + _setter("cluster_name", cluster_name) + _setter("group_id", group_id) + _setter("private_link_resource_id", private_link_resource_id) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_link_resource_region is not None: - pulumi.set(__self__, "private_link_resource_region", private_link_resource_region) + _setter("private_link_resource_region", private_link_resource_region) if request_message is not None: - pulumi.set(__self__, "request_message", request_message) + _setter("request_message", request_message) @property @pulumi.getter(name="clusterName") @@ -147,20 +190,55 @@ def __init__(__self__, *, :param pulumi.Input[str] request_message: The user request message. :param pulumi.Input[str] resource_group_name: Specifies the Resource Group where the Kusto Cluster should exist. Changing this forces a new resource to be created. """ + _ClusterManagedPrivateEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + group_id=group_id, + name=name, + private_link_resource_id=private_link_resource_id, + private_link_resource_region=private_link_resource_region, + request_message=request_message, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + group_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_link_resource_id: Optional[pulumi.Input[str]] = None, + private_link_resource_region: Optional[pulumi.Input[str]] = None, + request_message: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if group_id is None and 'groupId' in kwargs: + group_id = kwargs['groupId'] + if private_link_resource_id is None and 'privateLinkResourceId' in kwargs: + private_link_resource_id = kwargs['privateLinkResourceId'] + if private_link_resource_region is None and 'privateLinkResourceRegion' in kwargs: + private_link_resource_region = kwargs['privateLinkResourceRegion'] + if request_message is None and 'requestMessage' in kwargs: + request_message = kwargs['requestMessage'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if cluster_name is not None: - pulumi.set(__self__, "cluster_name", cluster_name) + _setter("cluster_name", cluster_name) if group_id is not None: - pulumi.set(__self__, "group_id", group_id) + _setter("group_id", group_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_link_resource_id is not None: - pulumi.set(__self__, "private_link_resource_id", private_link_resource_id) + _setter("private_link_resource_id", private_link_resource_id) if private_link_resource_region is not None: - pulumi.set(__self__, "private_link_resource_region", private_link_resource_region) + _setter("private_link_resource_region", private_link_resource_region) if request_message is not None: - pulumi.set(__self__, "request_message", request_message) + _setter("request_message", request_message) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="clusterName") @@ -366,6 +444,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ClusterManagedPrivateEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/kusto/cluster_principal_assignment.py b/sdk/python/pulumi_azure/kusto/cluster_principal_assignment.py index f54788089a..cac18ea361 100644 --- a/sdk/python/pulumi_azure/kusto/cluster_principal_assignment.py +++ b/sdk/python/pulumi_azure/kusto/cluster_principal_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ClusterPrincipalAssignmentArgs', 'ClusterPrincipalAssignment'] @@ -31,14 +31,59 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The tenant id in which the principal resides. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cluster_name", cluster_name) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "principal_type", principal_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "role", role) - pulumi.set(__self__, "tenant_id", tenant_id) + ClusterPrincipalAssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + principal_id=principal_id, + principal_type=principal_type, + resource_group_name=resource_group_name, + role=role, + tenant_id=tenant_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + principal_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if cluster_name is None: + raise TypeError("Missing 'cluster_name' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if principal_type is None and 'principalType' in kwargs: + principal_type = kwargs['principalType'] + if principal_type is None: + raise TypeError("Missing 'principal_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if role is None: + raise TypeError("Missing 'role' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("cluster_name", cluster_name) + _setter("principal_id", principal_id) + _setter("principal_type", principal_type) + _setter("resource_group_name", resource_group_name) + _setter("role", role) + _setter("tenant_id", tenant_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="clusterName") @@ -149,24 +194,65 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The tenant id in which the principal resides. Changing this forces a new resource to be created. :param pulumi.Input[str] tenant_name: The name of the tenant. """ + _ClusterPrincipalAssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + name=name, + principal_id=principal_id, + principal_name=principal_name, + principal_type=principal_type, + resource_group_name=resource_group_name, + role=role, + tenant_id=tenant_id, + tenant_name=tenant_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + principal_name: Optional[pulumi.Input[str]] = None, + principal_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + tenant_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_name is None and 'principalName' in kwargs: + principal_name = kwargs['principalName'] + if principal_type is None and 'principalType' in kwargs: + principal_type = kwargs['principalType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_name is None and 'tenantName' in kwargs: + tenant_name = kwargs['tenantName'] + if cluster_name is not None: - pulumi.set(__self__, "cluster_name", cluster_name) + _setter("cluster_name", cluster_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if principal_name is not None: - pulumi.set(__self__, "principal_name", principal_name) + _setter("principal_name", principal_name) if principal_type is not None: - pulumi.set(__self__, "principal_type", principal_type) + _setter("principal_type", principal_type) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if role is not None: - pulumi.set(__self__, "role", role) + _setter("role", role) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if tenant_name is not None: - pulumi.set(__self__, "tenant_name", tenant_name) + _setter("tenant_name", tenant_name) @property @pulumi.getter(name="clusterName") @@ -386,6 +472,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ClusterPrincipalAssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/kusto/cosmosdb_data_connection.py b/sdk/python/pulumi_azure/kusto/cosmosdb_data_connection.py index ed9b8e1e5b..4f57c6f7e8 100644 --- a/sdk/python/pulumi_azure/kusto/cosmosdb_data_connection.py +++ b/sdk/python/pulumi_azure/kusto/cosmosdb_data_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CosmosdbDataConnectionArgs', 'CosmosdbDataConnection'] @@ -33,18 +33,63 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the data connection. Changing this forces a new Kusto Cosmos DB Connection to be created. :param pulumi.Input[str] retrieval_start_date: If defined, the data connection retrieves Cosmos DB documents created or updated after the specified retrieval start date. Changing this forces a new Kusto Cosmos DB Connection to be created. """ - pulumi.set(__self__, "cosmosdb_container_id", cosmosdb_container_id) - pulumi.set(__self__, "kusto_database_id", kusto_database_id) - pulumi.set(__self__, "managed_identity_id", managed_identity_id) - pulumi.set(__self__, "table_name", table_name) + CosmosdbDataConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cosmosdb_container_id=cosmosdb_container_id, + kusto_database_id=kusto_database_id, + managed_identity_id=managed_identity_id, + table_name=table_name, + location=location, + mapping_rule_name=mapping_rule_name, + name=name, + retrieval_start_date=retrieval_start_date, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cosmosdb_container_id: Optional[pulumi.Input[str]] = None, + kusto_database_id: Optional[pulumi.Input[str]] = None, + managed_identity_id: Optional[pulumi.Input[str]] = None, + table_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + mapping_rule_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + retrieval_start_date: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cosmosdb_container_id is None and 'cosmosdbContainerId' in kwargs: + cosmosdb_container_id = kwargs['cosmosdbContainerId'] + if cosmosdb_container_id is None: + raise TypeError("Missing 'cosmosdb_container_id' argument") + if kusto_database_id is None and 'kustoDatabaseId' in kwargs: + kusto_database_id = kwargs['kustoDatabaseId'] + if kusto_database_id is None: + raise TypeError("Missing 'kusto_database_id' argument") + if managed_identity_id is None and 'managedIdentityId' in kwargs: + managed_identity_id = kwargs['managedIdentityId'] + if managed_identity_id is None: + raise TypeError("Missing 'managed_identity_id' argument") + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if table_name is None: + raise TypeError("Missing 'table_name' argument") + if mapping_rule_name is None and 'mappingRuleName' in kwargs: + mapping_rule_name = kwargs['mappingRuleName'] + if retrieval_start_date is None and 'retrievalStartDate' in kwargs: + retrieval_start_date = kwargs['retrievalStartDate'] + + _setter("cosmosdb_container_id", cosmosdb_container_id) + _setter("kusto_database_id", kusto_database_id) + _setter("managed_identity_id", managed_identity_id) + _setter("table_name", table_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mapping_rule_name is not None: - pulumi.set(__self__, "mapping_rule_name", mapping_rule_name) + _setter("mapping_rule_name", mapping_rule_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retrieval_start_date is not None: - pulumi.set(__self__, "retrieval_start_date", retrieval_start_date) + _setter("retrieval_start_date", retrieval_start_date) @property @pulumi.getter(name="cosmosdbContainerId") @@ -165,22 +210,59 @@ def __init__(__self__, *, :param pulumi.Input[str] retrieval_start_date: If defined, the data connection retrieves Cosmos DB documents created or updated after the specified retrieval start date. Changing this forces a new Kusto Cosmos DB Connection to be created. :param pulumi.Input[str] table_name: The case-sensitive name of the existing target table in your cluster. Retrieved data is ingested into this table. Changing this forces a new Kusto Cosmos DB Connection to be created. """ + _CosmosdbDataConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cosmosdb_container_id=cosmosdb_container_id, + kusto_database_id=kusto_database_id, + location=location, + managed_identity_id=managed_identity_id, + mapping_rule_name=mapping_rule_name, + name=name, + retrieval_start_date=retrieval_start_date, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cosmosdb_container_id: Optional[pulumi.Input[str]] = None, + kusto_database_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_identity_id: Optional[pulumi.Input[str]] = None, + mapping_rule_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + retrieval_start_date: Optional[pulumi.Input[str]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cosmosdb_container_id is None and 'cosmosdbContainerId' in kwargs: + cosmosdb_container_id = kwargs['cosmosdbContainerId'] + if kusto_database_id is None and 'kustoDatabaseId' in kwargs: + kusto_database_id = kwargs['kustoDatabaseId'] + if managed_identity_id is None and 'managedIdentityId' in kwargs: + managed_identity_id = kwargs['managedIdentityId'] + if mapping_rule_name is None and 'mappingRuleName' in kwargs: + mapping_rule_name = kwargs['mappingRuleName'] + if retrieval_start_date is None and 'retrievalStartDate' in kwargs: + retrieval_start_date = kwargs['retrievalStartDate'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if cosmosdb_container_id is not None: - pulumi.set(__self__, "cosmosdb_container_id", cosmosdb_container_id) + _setter("cosmosdb_container_id", cosmosdb_container_id) if kusto_database_id is not None: - pulumi.set(__self__, "kusto_database_id", kusto_database_id) + _setter("kusto_database_id", kusto_database_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_identity_id is not None: - pulumi.set(__self__, "managed_identity_id", managed_identity_id) + _setter("managed_identity_id", managed_identity_id) if mapping_rule_name is not None: - pulumi.set(__self__, "mapping_rule_name", mapping_rule_name) + _setter("mapping_rule_name", mapping_rule_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retrieval_start_date is not None: - pulumi.set(__self__, "retrieval_start_date", retrieval_start_date) + _setter("retrieval_start_date", retrieval_start_date) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="cosmosdbContainerId") @@ -504,6 +586,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CosmosdbDataConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/kusto/database.py b/sdk/python/pulumi_azure/kusto/database.py index 1ea0763574..4a17e3f221 100644 --- a/sdk/python/pulumi_azure/kusto/database.py +++ b/sdk/python/pulumi_azure/kusto/database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DatabaseArgs', 'Database'] @@ -29,16 +29,49 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Kusto Database to create. Changing this forces a new resource to be created. :param pulumi.Input[str] soft_delete_period: The time the data should be kept before it stops being accessible to queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations) """ - pulumi.set(__self__, "cluster_name", cluster_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + DatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + resource_group_name=resource_group_name, + hot_cache_period=hot_cache_period, + location=location, + name=name, + soft_delete_period=soft_delete_period, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + hot_cache_period: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + soft_delete_period: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if cluster_name is None: + raise TypeError("Missing 'cluster_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if hot_cache_period is None and 'hotCachePeriod' in kwargs: + hot_cache_period = kwargs['hotCachePeriod'] + if soft_delete_period is None and 'softDeletePeriod' in kwargs: + soft_delete_period = kwargs['softDeletePeriod'] + + _setter("cluster_name", cluster_name) + _setter("resource_group_name", resource_group_name) if hot_cache_period is not None: - pulumi.set(__self__, "hot_cache_period", hot_cache_period) + _setter("hot_cache_period", hot_cache_period) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if soft_delete_period is not None: - pulumi.set(__self__, "soft_delete_period", soft_delete_period) + _setter("soft_delete_period", soft_delete_period) @property @pulumi.getter(name="clusterName") @@ -133,20 +166,51 @@ def __init__(__self__, *, :param pulumi.Input[float] size: The size of the database in bytes. :param pulumi.Input[str] soft_delete_period: The time the data should be kept before it stops being accessible to queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations) """ + _DatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + hot_cache_period=hot_cache_period, + location=location, + name=name, + resource_group_name=resource_group_name, + size=size, + soft_delete_period=soft_delete_period, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + hot_cache_period: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + size: Optional[pulumi.Input[float]] = None, + soft_delete_period: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if hot_cache_period is None and 'hotCachePeriod' in kwargs: + hot_cache_period = kwargs['hotCachePeriod'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if soft_delete_period is None and 'softDeletePeriod' in kwargs: + soft_delete_period = kwargs['softDeletePeriod'] + if cluster_name is not None: - pulumi.set(__self__, "cluster_name", cluster_name) + _setter("cluster_name", cluster_name) if hot_cache_period is not None: - pulumi.set(__self__, "hot_cache_period", hot_cache_period) + _setter("hot_cache_period", hot_cache_period) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if soft_delete_period is not None: - pulumi.set(__self__, "soft_delete_period", soft_delete_period) + _setter("soft_delete_period", soft_delete_period) @property @pulumi.getter(name="clusterName") @@ -336,6 +400,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/kusto/database_principal_assignment.py b/sdk/python/pulumi_azure/kusto/database_principal_assignment.py index 81fb97d225..77868c2ccf 100644 --- a/sdk/python/pulumi_azure/kusto/database_principal_assignment.py +++ b/sdk/python/pulumi_azure/kusto/database_principal_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DatabasePrincipalAssignmentArgs', 'DatabasePrincipalAssignment'] @@ -33,15 +33,66 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The tenant id in which the principal resides. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the kusto principal assignment. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cluster_name", cluster_name) - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "principal_type", principal_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "role", role) - pulumi.set(__self__, "tenant_id", tenant_id) + DatabasePrincipalAssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + database_name=database_name, + principal_id=principal_id, + principal_type=principal_type, + resource_group_name=resource_group_name, + role=role, + tenant_id=tenant_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + principal_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if cluster_name is None: + raise TypeError("Missing 'cluster_name' argument") + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if principal_type is None and 'principalType' in kwargs: + principal_type = kwargs['principalType'] + if principal_type is None: + raise TypeError("Missing 'principal_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if role is None: + raise TypeError("Missing 'role' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("cluster_name", cluster_name) + _setter("database_name", database_name) + _setter("principal_id", principal_id) + _setter("principal_type", principal_type) + _setter("resource_group_name", resource_group_name) + _setter("role", role) + _setter("tenant_id", tenant_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="clusterName") @@ -166,26 +217,71 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The tenant id in which the principal resides. Changing this forces a new resource to be created. :param pulumi.Input[str] tenant_name: The name of the tenant. """ + _DatabasePrincipalAssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + database_name=database_name, + name=name, + principal_id=principal_id, + principal_name=principal_name, + principal_type=principal_type, + resource_group_name=resource_group_name, + role=role, + tenant_id=tenant_id, + tenant_name=tenant_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + principal_name: Optional[pulumi.Input[str]] = None, + principal_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + tenant_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_name is None and 'principalName' in kwargs: + principal_name = kwargs['principalName'] + if principal_type is None and 'principalType' in kwargs: + principal_type = kwargs['principalType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_name is None and 'tenantName' in kwargs: + tenant_name = kwargs['tenantName'] + if cluster_name is not None: - pulumi.set(__self__, "cluster_name", cluster_name) + _setter("cluster_name", cluster_name) if database_name is not None: - pulumi.set(__self__, "database_name", database_name) + _setter("database_name", database_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if principal_name is not None: - pulumi.set(__self__, "principal_name", principal_name) + _setter("principal_name", principal_name) if principal_type is not None: - pulumi.set(__self__, "principal_type", principal_type) + _setter("principal_type", principal_type) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if role is not None: - pulumi.set(__self__, "role", role) + _setter("role", role) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if tenant_name is not None: - pulumi.set(__self__, "tenant_name", tenant_name) + _setter("tenant_name", tenant_name) @property @pulumi.getter(name="clusterName") @@ -433,6 +529,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatabasePrincipalAssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/kusto/event_grid_data_connection.py b/sdk/python/pulumi_azure/kusto/event_grid_data_connection.py index 12f8ea12c6..5f991ce6bc 100644 --- a/sdk/python/pulumi_azure/kusto/event_grid_data_connection.py +++ b/sdk/python/pulumi_azure/kusto/event_grid_data_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EventGridDataConnectionArgs', 'EventGridDataConnection'] @@ -49,32 +49,113 @@ def __init__(__self__, *, :param pulumi.Input[bool] skip_first_record: is the first record of every file ignored? Defaults to `false`. :param pulumi.Input[str] table_name: Specifies the target table name used for the message ingestion. Table must exist before resource is created. """ - pulumi.set(__self__, "cluster_name", cluster_name) - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "eventhub_consumer_group_name", eventhub_consumer_group_name) - pulumi.set(__self__, "eventhub_id", eventhub_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + EventGridDataConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + database_name=database_name, + eventhub_consumer_group_name=eventhub_consumer_group_name, + eventhub_id=eventhub_id, + resource_group_name=resource_group_name, + storage_account_id=storage_account_id, + blob_storage_event_type=blob_storage_event_type, + data_format=data_format, + database_routing_type=database_routing_type, + eventgrid_resource_id=eventgrid_resource_id, + location=location, + managed_identity_resource_id=managed_identity_resource_id, + mapping_rule_name=mapping_rule_name, + name=name, + skip_first_record=skip_first_record, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + eventhub_consumer_group_name: Optional[pulumi.Input[str]] = None, + eventhub_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + blob_storage_event_type: Optional[pulumi.Input[str]] = None, + data_format: Optional[pulumi.Input[str]] = None, + database_routing_type: Optional[pulumi.Input[str]] = None, + eventgrid_resource_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_identity_resource_id: Optional[pulumi.Input[str]] = None, + mapping_rule_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + skip_first_record: Optional[pulumi.Input[bool]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if cluster_name is None: + raise TypeError("Missing 'cluster_name' argument") + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if eventhub_consumer_group_name is None and 'eventhubConsumerGroupName' in kwargs: + eventhub_consumer_group_name = kwargs['eventhubConsumerGroupName'] + if eventhub_consumer_group_name is None: + raise TypeError("Missing 'eventhub_consumer_group_name' argument") + if eventhub_id is None and 'eventhubId' in kwargs: + eventhub_id = kwargs['eventhubId'] + if eventhub_id is None: + raise TypeError("Missing 'eventhub_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if blob_storage_event_type is None and 'blobStorageEventType' in kwargs: + blob_storage_event_type = kwargs['blobStorageEventType'] + if data_format is None and 'dataFormat' in kwargs: + data_format = kwargs['dataFormat'] + if database_routing_type is None and 'databaseRoutingType' in kwargs: + database_routing_type = kwargs['databaseRoutingType'] + if eventgrid_resource_id is None and 'eventgridResourceId' in kwargs: + eventgrid_resource_id = kwargs['eventgridResourceId'] + if managed_identity_resource_id is None and 'managedIdentityResourceId' in kwargs: + managed_identity_resource_id = kwargs['managedIdentityResourceId'] + if mapping_rule_name is None and 'mappingRuleName' in kwargs: + mapping_rule_name = kwargs['mappingRuleName'] + if skip_first_record is None and 'skipFirstRecord' in kwargs: + skip_first_record = kwargs['skipFirstRecord'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + + _setter("cluster_name", cluster_name) + _setter("database_name", database_name) + _setter("eventhub_consumer_group_name", eventhub_consumer_group_name) + _setter("eventhub_id", eventhub_id) + _setter("resource_group_name", resource_group_name) + _setter("storage_account_id", storage_account_id) if blob_storage_event_type is not None: - pulumi.set(__self__, "blob_storage_event_type", blob_storage_event_type) + _setter("blob_storage_event_type", blob_storage_event_type) if data_format is not None: - pulumi.set(__self__, "data_format", data_format) + _setter("data_format", data_format) if database_routing_type is not None: - pulumi.set(__self__, "database_routing_type", database_routing_type) + _setter("database_routing_type", database_routing_type) if eventgrid_resource_id is not None: - pulumi.set(__self__, "eventgrid_resource_id", eventgrid_resource_id) + _setter("eventgrid_resource_id", eventgrid_resource_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_identity_resource_id is not None: - pulumi.set(__self__, "managed_identity_resource_id", managed_identity_resource_id) + _setter("managed_identity_resource_id", managed_identity_resource_id) if mapping_rule_name is not None: - pulumi.set(__self__, "mapping_rule_name", mapping_rule_name) + _setter("mapping_rule_name", mapping_rule_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if skip_first_record is not None: - pulumi.set(__self__, "skip_first_record", skip_first_record) + _setter("skip_first_record", skip_first_record) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="clusterName") @@ -307,38 +388,107 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_id: Specifies the resource id of the Storage Account this data connection will use for ingestion. Changing this forces a new resource to be created. :param pulumi.Input[str] table_name: Specifies the target table name used for the message ingestion. Table must exist before resource is created. """ + _EventGridDataConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_storage_event_type=blob_storage_event_type, + cluster_name=cluster_name, + data_format=data_format, + database_name=database_name, + database_routing_type=database_routing_type, + eventgrid_resource_id=eventgrid_resource_id, + eventhub_consumer_group_name=eventhub_consumer_group_name, + eventhub_id=eventhub_id, + location=location, + managed_identity_resource_id=managed_identity_resource_id, + mapping_rule_name=mapping_rule_name, + name=name, + resource_group_name=resource_group_name, + skip_first_record=skip_first_record, + storage_account_id=storage_account_id, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_storage_event_type: Optional[pulumi.Input[str]] = None, + cluster_name: Optional[pulumi.Input[str]] = None, + data_format: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + database_routing_type: Optional[pulumi.Input[str]] = None, + eventgrid_resource_id: Optional[pulumi.Input[str]] = None, + eventhub_consumer_group_name: Optional[pulumi.Input[str]] = None, + eventhub_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_identity_resource_id: Optional[pulumi.Input[str]] = None, + mapping_rule_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + skip_first_record: Optional[pulumi.Input[bool]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_storage_event_type is None and 'blobStorageEventType' in kwargs: + blob_storage_event_type = kwargs['blobStorageEventType'] + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if data_format is None and 'dataFormat' in kwargs: + data_format = kwargs['dataFormat'] + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_routing_type is None and 'databaseRoutingType' in kwargs: + database_routing_type = kwargs['databaseRoutingType'] + if eventgrid_resource_id is None and 'eventgridResourceId' in kwargs: + eventgrid_resource_id = kwargs['eventgridResourceId'] + if eventhub_consumer_group_name is None and 'eventhubConsumerGroupName' in kwargs: + eventhub_consumer_group_name = kwargs['eventhubConsumerGroupName'] + if eventhub_id is None and 'eventhubId' in kwargs: + eventhub_id = kwargs['eventhubId'] + if managed_identity_resource_id is None and 'managedIdentityResourceId' in kwargs: + managed_identity_resource_id = kwargs['managedIdentityResourceId'] + if mapping_rule_name is None and 'mappingRuleName' in kwargs: + mapping_rule_name = kwargs['mappingRuleName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if skip_first_record is None and 'skipFirstRecord' in kwargs: + skip_first_record = kwargs['skipFirstRecord'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if blob_storage_event_type is not None: - pulumi.set(__self__, "blob_storage_event_type", blob_storage_event_type) + _setter("blob_storage_event_type", blob_storage_event_type) if cluster_name is not None: - pulumi.set(__self__, "cluster_name", cluster_name) + _setter("cluster_name", cluster_name) if data_format is not None: - pulumi.set(__self__, "data_format", data_format) + _setter("data_format", data_format) if database_name is not None: - pulumi.set(__self__, "database_name", database_name) + _setter("database_name", database_name) if database_routing_type is not None: - pulumi.set(__self__, "database_routing_type", database_routing_type) + _setter("database_routing_type", database_routing_type) if eventgrid_resource_id is not None: - pulumi.set(__self__, "eventgrid_resource_id", eventgrid_resource_id) + _setter("eventgrid_resource_id", eventgrid_resource_id) if eventhub_consumer_group_name is not None: - pulumi.set(__self__, "eventhub_consumer_group_name", eventhub_consumer_group_name) + _setter("eventhub_consumer_group_name", eventhub_consumer_group_name) if eventhub_id is not None: - pulumi.set(__self__, "eventhub_id", eventhub_id) + _setter("eventhub_id", eventhub_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_identity_resource_id is not None: - pulumi.set(__self__, "managed_identity_resource_id", managed_identity_resource_id) + _setter("managed_identity_resource_id", managed_identity_resource_id) if mapping_rule_name is not None: - pulumi.set(__self__, "mapping_rule_name", mapping_rule_name) + _setter("mapping_rule_name", mapping_rule_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if skip_first_record is not None: - pulumi.set(__self__, "skip_first_record", skip_first_record) + _setter("skip_first_record", skip_first_record) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="blobStorageEventType") @@ -740,6 +890,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EventGridDataConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/kusto/eventhub_data_connection.py b/sdk/python/pulumi_azure/kusto/eventhub_data_connection.py index 19ae5e446d..731a2bc338 100644 --- a/sdk/python/pulumi_azure/kusto/eventhub_data_connection.py +++ b/sdk/python/pulumi_azure/kusto/eventhub_data_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EventhubDataConnectionArgs', 'EventhubDataConnection'] @@ -45,29 +45,98 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource to be created. :param pulumi.Input[str] table_name: Specifies the target table name used for the message ingestion. Table must exist before resource is created. """ - pulumi.set(__self__, "cluster_name", cluster_name) - pulumi.set(__self__, "consumer_group", consumer_group) - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "eventhub_id", eventhub_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + EventhubDataConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + consumer_group=consumer_group, + database_name=database_name, + eventhub_id=eventhub_id, + resource_group_name=resource_group_name, + compression=compression, + data_format=data_format, + database_routing_type=database_routing_type, + event_system_properties=event_system_properties, + identity_id=identity_id, + location=location, + mapping_rule_name=mapping_rule_name, + name=name, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + consumer_group: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + eventhub_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + compression: Optional[pulumi.Input[str]] = None, + data_format: Optional[pulumi.Input[str]] = None, + database_routing_type: Optional[pulumi.Input[str]] = None, + event_system_properties: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + mapping_rule_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if cluster_name is None: + raise TypeError("Missing 'cluster_name' argument") + if consumer_group is None and 'consumerGroup' in kwargs: + consumer_group = kwargs['consumerGroup'] + if consumer_group is None: + raise TypeError("Missing 'consumer_group' argument") + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if eventhub_id is None and 'eventhubId' in kwargs: + eventhub_id = kwargs['eventhubId'] + if eventhub_id is None: + raise TypeError("Missing 'eventhub_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if data_format is None and 'dataFormat' in kwargs: + data_format = kwargs['dataFormat'] + if database_routing_type is None and 'databaseRoutingType' in kwargs: + database_routing_type = kwargs['databaseRoutingType'] + if event_system_properties is None and 'eventSystemProperties' in kwargs: + event_system_properties = kwargs['eventSystemProperties'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if mapping_rule_name is None and 'mappingRuleName' in kwargs: + mapping_rule_name = kwargs['mappingRuleName'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + + _setter("cluster_name", cluster_name) + _setter("consumer_group", consumer_group) + _setter("database_name", database_name) + _setter("eventhub_id", eventhub_id) + _setter("resource_group_name", resource_group_name) if compression is not None: - pulumi.set(__self__, "compression", compression) + _setter("compression", compression) if data_format is not None: - pulumi.set(__self__, "data_format", data_format) + _setter("data_format", data_format) if database_routing_type is not None: - pulumi.set(__self__, "database_routing_type", database_routing_type) + _setter("database_routing_type", database_routing_type) if event_system_properties is not None: - pulumi.set(__self__, "event_system_properties", event_system_properties) + _setter("event_system_properties", event_system_properties) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mapping_rule_name is not None: - pulumi.set(__self__, "mapping_rule_name", mapping_rule_name) + _setter("mapping_rule_name", mapping_rule_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="clusterName") @@ -272,34 +341,93 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created. :param pulumi.Input[str] table_name: Specifies the target table name used for the message ingestion. Table must exist before resource is created. """ + _EventhubDataConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + compression=compression, + consumer_group=consumer_group, + data_format=data_format, + database_name=database_name, + database_routing_type=database_routing_type, + event_system_properties=event_system_properties, + eventhub_id=eventhub_id, + identity_id=identity_id, + location=location, + mapping_rule_name=mapping_rule_name, + name=name, + resource_group_name=resource_group_name, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + compression: Optional[pulumi.Input[str]] = None, + consumer_group: Optional[pulumi.Input[str]] = None, + data_format: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + database_routing_type: Optional[pulumi.Input[str]] = None, + event_system_properties: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + eventhub_id: Optional[pulumi.Input[str]] = None, + identity_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + mapping_rule_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if consumer_group is None and 'consumerGroup' in kwargs: + consumer_group = kwargs['consumerGroup'] + if data_format is None and 'dataFormat' in kwargs: + data_format = kwargs['dataFormat'] + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_routing_type is None and 'databaseRoutingType' in kwargs: + database_routing_type = kwargs['databaseRoutingType'] + if event_system_properties is None and 'eventSystemProperties' in kwargs: + event_system_properties = kwargs['eventSystemProperties'] + if eventhub_id is None and 'eventhubId' in kwargs: + eventhub_id = kwargs['eventhubId'] + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if mapping_rule_name is None and 'mappingRuleName' in kwargs: + mapping_rule_name = kwargs['mappingRuleName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if cluster_name is not None: - pulumi.set(__self__, "cluster_name", cluster_name) + _setter("cluster_name", cluster_name) if compression is not None: - pulumi.set(__self__, "compression", compression) + _setter("compression", compression) if consumer_group is not None: - pulumi.set(__self__, "consumer_group", consumer_group) + _setter("consumer_group", consumer_group) if data_format is not None: - pulumi.set(__self__, "data_format", data_format) + _setter("data_format", data_format) if database_name is not None: - pulumi.set(__self__, "database_name", database_name) + _setter("database_name", database_name) if database_routing_type is not None: - pulumi.set(__self__, "database_routing_type", database_routing_type) + _setter("database_routing_type", database_routing_type) if event_system_properties is not None: - pulumi.set(__self__, "event_system_properties", event_system_properties) + _setter("event_system_properties", event_system_properties) if eventhub_id is not None: - pulumi.set(__self__, "eventhub_id", eventhub_id) + _setter("eventhub_id", eventhub_id) if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mapping_rule_name is not None: - pulumi.set(__self__, "mapping_rule_name", mapping_rule_name) + _setter("mapping_rule_name", mapping_rule_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="clusterName") @@ -637,6 +765,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EventhubDataConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/kusto/get_cluster.py b/sdk/python/pulumi_azure/kusto/get_cluster.py index f71bd15f51..af5bfef4ef 100644 --- a/sdk/python/pulumi_azure/kusto/get_cluster.py +++ b/sdk/python/pulumi_azure/kusto/get_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/kusto/get_database.py b/sdk/python/pulumi_azure/kusto/get_database.py index 3919231105..07bb15c771 100644 --- a/sdk/python/pulumi_azure/kusto/get_database.py +++ b/sdk/python/pulumi_azure/kusto/get_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/kusto/iot_hub_data_connection.py b/sdk/python/pulumi_azure/kusto/iot_hub_data_connection.py index f13df12eea..8e33400108 100644 --- a/sdk/python/pulumi_azure/kusto/iot_hub_data_connection.py +++ b/sdk/python/pulumi_azure/kusto/iot_hub_data_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IotHubDataConnectionArgs', 'IotHubDataConnection'] @@ -43,26 +43,95 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Kusto IotHub Data Connection to create. Changing this forces a new resource to be created. :param pulumi.Input[str] table_name: Specifies the target table name used for the message ingestion. Table must exist before resource is created. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cluster_name", cluster_name) - pulumi.set(__self__, "consumer_group", consumer_group) - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "iothub_id", iothub_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) + IotHubDataConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + consumer_group=consumer_group, + database_name=database_name, + iothub_id=iothub_id, + resource_group_name=resource_group_name, + shared_access_policy_name=shared_access_policy_name, + data_format=data_format, + database_routing_type=database_routing_type, + event_system_properties=event_system_properties, + location=location, + mapping_rule_name=mapping_rule_name, + name=name, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + consumer_group: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + data_format: Optional[pulumi.Input[str]] = None, + database_routing_type: Optional[pulumi.Input[str]] = None, + event_system_properties: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + mapping_rule_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if cluster_name is None: + raise TypeError("Missing 'cluster_name' argument") + if consumer_group is None and 'consumerGroup' in kwargs: + consumer_group = kwargs['consumerGroup'] + if consumer_group is None: + raise TypeError("Missing 'consumer_group' argument") + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if iothub_id is None: + raise TypeError("Missing 'iothub_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + if shared_access_policy_name is None: + raise TypeError("Missing 'shared_access_policy_name' argument") + if data_format is None and 'dataFormat' in kwargs: + data_format = kwargs['dataFormat'] + if database_routing_type is None and 'databaseRoutingType' in kwargs: + database_routing_type = kwargs['databaseRoutingType'] + if event_system_properties is None and 'eventSystemProperties' in kwargs: + event_system_properties = kwargs['eventSystemProperties'] + if mapping_rule_name is None and 'mappingRuleName' in kwargs: + mapping_rule_name = kwargs['mappingRuleName'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + + _setter("cluster_name", cluster_name) + _setter("consumer_group", consumer_group) + _setter("database_name", database_name) + _setter("iothub_id", iothub_id) + _setter("resource_group_name", resource_group_name) + _setter("shared_access_policy_name", shared_access_policy_name) if data_format is not None: - pulumi.set(__self__, "data_format", data_format) + _setter("data_format", data_format) if database_routing_type is not None: - pulumi.set(__self__, "database_routing_type", database_routing_type) + _setter("database_routing_type", database_routing_type) if event_system_properties is not None: - pulumi.set(__self__, "event_system_properties", event_system_properties) + _setter("event_system_properties", event_system_properties) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mapping_rule_name is not None: - pulumi.set(__self__, "mapping_rule_name", mapping_rule_name) + _setter("mapping_rule_name", mapping_rule_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="clusterName") @@ -253,32 +322,89 @@ def __init__(__self__, *, :param pulumi.Input[str] shared_access_policy_name: Specifies the IotHub Shared Access Policy this data connection will use for ingestion, which must have read permission. Changing this forces a new resource to be created. :param pulumi.Input[str] table_name: Specifies the target table name used for the message ingestion. Table must exist before resource is created. Changing this forces a new resource to be created. """ + _IotHubDataConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + consumer_group=consumer_group, + data_format=data_format, + database_name=database_name, + database_routing_type=database_routing_type, + event_system_properties=event_system_properties, + iothub_id=iothub_id, + location=location, + mapping_rule_name=mapping_rule_name, + name=name, + resource_group_name=resource_group_name, + shared_access_policy_name=shared_access_policy_name, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + consumer_group: Optional[pulumi.Input[str]] = None, + data_format: Optional[pulumi.Input[str]] = None, + database_name: Optional[pulumi.Input[str]] = None, + database_routing_type: Optional[pulumi.Input[str]] = None, + event_system_properties: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + iothub_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + mapping_rule_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if consumer_group is None and 'consumerGroup' in kwargs: + consumer_group = kwargs['consumerGroup'] + if data_format is None and 'dataFormat' in kwargs: + data_format = kwargs['dataFormat'] + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_routing_type is None and 'databaseRoutingType' in kwargs: + database_routing_type = kwargs['databaseRoutingType'] + if event_system_properties is None and 'eventSystemProperties' in kwargs: + event_system_properties = kwargs['eventSystemProperties'] + if iothub_id is None and 'iothubId' in kwargs: + iothub_id = kwargs['iothubId'] + if mapping_rule_name is None and 'mappingRuleName' in kwargs: + mapping_rule_name = kwargs['mappingRuleName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if cluster_name is not None: - pulumi.set(__self__, "cluster_name", cluster_name) + _setter("cluster_name", cluster_name) if consumer_group is not None: - pulumi.set(__self__, "consumer_group", consumer_group) + _setter("consumer_group", consumer_group) if data_format is not None: - pulumi.set(__self__, "data_format", data_format) + _setter("data_format", data_format) if database_name is not None: - pulumi.set(__self__, "database_name", database_name) + _setter("database_name", database_name) if database_routing_type is not None: - pulumi.set(__self__, "database_routing_type", database_routing_type) + _setter("database_routing_type", database_routing_type) if event_system_properties is not None: - pulumi.set(__self__, "event_system_properties", event_system_properties) + _setter("event_system_properties", event_system_properties) if iothub_id is not None: - pulumi.set(__self__, "iothub_id", iothub_id) + _setter("iothub_id", iothub_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mapping_rule_name is not None: - pulumi.set(__self__, "mapping_rule_name", mapping_rule_name) + _setter("mapping_rule_name", mapping_rule_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if shared_access_policy_name is not None: - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) + _setter("shared_access_policy_name", shared_access_policy_name) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter(name="clusterName") @@ -616,6 +742,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IotHubDataConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/kusto/outputs.py b/sdk/python/pulumi_azure/kusto/outputs.py index 2cb29d0c2b..23f9339bbc 100644 --- a/sdk/python/pulumi_azure/kusto/outputs.py +++ b/sdk/python/pulumi_azure/kusto/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -61,18 +61,51 @@ def __init__(__self__, *, :param Sequence[str] tables_to_excludes: List of tables to exclude from the follower database. :param Sequence[str] tables_to_includes: List of tables to include in the follower database. """ + AttachedDatabaseConfigurationSharing._configure( + lambda key, value: pulumi.set(__self__, key, value), + external_tables_to_excludes=external_tables_to_excludes, + external_tables_to_includes=external_tables_to_includes, + materialized_views_to_excludes=materialized_views_to_excludes, + materialized_views_to_includes=materialized_views_to_includes, + tables_to_excludes=tables_to_excludes, + tables_to_includes=tables_to_includes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + external_tables_to_excludes: Optional[Sequence[str]] = None, + external_tables_to_includes: Optional[Sequence[str]] = None, + materialized_views_to_excludes: Optional[Sequence[str]] = None, + materialized_views_to_includes: Optional[Sequence[str]] = None, + tables_to_excludes: Optional[Sequence[str]] = None, + tables_to_includes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if external_tables_to_excludes is None and 'externalTablesToExcludes' in kwargs: + external_tables_to_excludes = kwargs['externalTablesToExcludes'] + if external_tables_to_includes is None and 'externalTablesToIncludes' in kwargs: + external_tables_to_includes = kwargs['externalTablesToIncludes'] + if materialized_views_to_excludes is None and 'materializedViewsToExcludes' in kwargs: + materialized_views_to_excludes = kwargs['materializedViewsToExcludes'] + if materialized_views_to_includes is None and 'materializedViewsToIncludes' in kwargs: + materialized_views_to_includes = kwargs['materializedViewsToIncludes'] + if tables_to_excludes is None and 'tablesToExcludes' in kwargs: + tables_to_excludes = kwargs['tablesToExcludes'] + if tables_to_includes is None and 'tablesToIncludes' in kwargs: + tables_to_includes = kwargs['tablesToIncludes'] + if external_tables_to_excludes is not None: - pulumi.set(__self__, "external_tables_to_excludes", external_tables_to_excludes) + _setter("external_tables_to_excludes", external_tables_to_excludes) if external_tables_to_includes is not None: - pulumi.set(__self__, "external_tables_to_includes", external_tables_to_includes) + _setter("external_tables_to_includes", external_tables_to_includes) if materialized_views_to_excludes is not None: - pulumi.set(__self__, "materialized_views_to_excludes", materialized_views_to_excludes) + _setter("materialized_views_to_excludes", materialized_views_to_excludes) if materialized_views_to_includes is not None: - pulumi.set(__self__, "materialized_views_to_includes", materialized_views_to_includes) + _setter("materialized_views_to_includes", materialized_views_to_includes) if tables_to_excludes is not None: - pulumi.set(__self__, "tables_to_excludes", tables_to_excludes) + _setter("tables_to_excludes", tables_to_excludes) if tables_to_includes is not None: - pulumi.set(__self__, "tables_to_includes", tables_to_includes) + _setter("tables_to_includes", tables_to_includes) @property @pulumi.getter(name="externalTablesToExcludes") @@ -159,13 +192,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this System Assigned Managed Service Identity. :param str tenant_id: The Tenant ID associated with this System Assigned Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ClusterIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -230,8 +288,29 @@ def __init__(__self__, *, :param int maximum_instances: The maximum number of allowed instances. Must between `0` and `1000`. :param int minimum_instances: The minimum number of allowed instances. Must between `0` and `1000`. """ - pulumi.set(__self__, "maximum_instances", maximum_instances) - pulumi.set(__self__, "minimum_instances", minimum_instances) + ClusterOptimizedAutoScale._configure( + lambda key, value: pulumi.set(__self__, key, value), + maximum_instances=maximum_instances, + minimum_instances=minimum_instances, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + maximum_instances: Optional[int] = None, + minimum_instances: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maximum_instances is None and 'maximumInstances' in kwargs: + maximum_instances = kwargs['maximumInstances'] + if maximum_instances is None: + raise TypeError("Missing 'maximum_instances' argument") + if minimum_instances is None and 'minimumInstances' in kwargs: + minimum_instances = kwargs['minimumInstances'] + if minimum_instances is None: + raise TypeError("Missing 'minimum_instances' argument") + + _setter("maximum_instances", maximum_instances) + _setter("minimum_instances", minimum_instances) @property @pulumi.getter(name="maximumInstances") @@ -262,9 +341,24 @@ def __init__(__self__, *, > **NOTE:** If no `optimized_auto_scale` block is defined, then the capacity is required. > **NOTE:** If an `optimized_auto_scale` block is defined and no capacity is set, then the capacity is initially set to the value of `minimum_instances`. """ - pulumi.set(__self__, "name", name) + ClusterSku._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + capacity=capacity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + capacity: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) @property @pulumi.getter @@ -318,9 +412,36 @@ def __init__(__self__, *, :param str engine_public_ip_id: Engine service's public IP address resource id. :param str subnet_id: The subnet resource id. """ - pulumi.set(__self__, "data_management_public_ip_id", data_management_public_ip_id) - pulumi.set(__self__, "engine_public_ip_id", engine_public_ip_id) - pulumi.set(__self__, "subnet_id", subnet_id) + ClusterVirtualNetworkConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_management_public_ip_id=data_management_public_ip_id, + engine_public_ip_id=engine_public_ip_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_management_public_ip_id: Optional[str] = None, + engine_public_ip_id: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_management_public_ip_id is None and 'dataManagementPublicIpId' in kwargs: + data_management_public_ip_id = kwargs['dataManagementPublicIpId'] + if data_management_public_ip_id is None: + raise TypeError("Missing 'data_management_public_ip_id' argument") + if engine_public_ip_id is None and 'enginePublicIpId' in kwargs: + engine_public_ip_id = kwargs['enginePublicIpId'] + if engine_public_ip_id is None: + raise TypeError("Missing 'engine_public_ip_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("data_management_public_ip_id", data_management_public_ip_id) + _setter("engine_public_ip_id", engine_public_ip_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="dataManagementPublicIpId") diff --git a/sdk/python/pulumi_azure/kusto/script.py b/sdk/python/pulumi_azure/kusto/script.py index ff988803d8..9930d45850 100644 --- a/sdk/python/pulumi_azure/kusto/script.py +++ b/sdk/python/pulumi_azure/kusto/script.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ScriptArgs', 'Script'] @@ -31,19 +31,54 @@ def __init__(__self__, *, :param pulumi.Input[str] script_content: The script content. This property should be used when the script is provide inline and not through file in a SA. Must not be used together with `url` and `sas_token` properties. Changing this forces a new resource to be created. :param pulumi.Input[str] url: The url to the KQL script blob file. Must not be used together with scriptContent property. Please reference [this documentation](https://docs.microsoft.com/azure/data-explorer/database-script) that describes the commands that are allowed in the script. """ - pulumi.set(__self__, "database_id", database_id) + ScriptArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_id=database_id, + continue_on_errors_enabled=continue_on_errors_enabled, + force_an_update_when_value_changed=force_an_update_when_value_changed, + name=name, + sas_token=sas_token, + script_content=script_content, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_id: Optional[pulumi.Input[str]] = None, + continue_on_errors_enabled: Optional[pulumi.Input[bool]] = None, + force_an_update_when_value_changed: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sas_token: Optional[pulumi.Input[str]] = None, + script_content: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_id is None and 'databaseId' in kwargs: + database_id = kwargs['databaseId'] + if database_id is None: + raise TypeError("Missing 'database_id' argument") + if continue_on_errors_enabled is None and 'continueOnErrorsEnabled' in kwargs: + continue_on_errors_enabled = kwargs['continueOnErrorsEnabled'] + if force_an_update_when_value_changed is None and 'forceAnUpdateWhenValueChanged' in kwargs: + force_an_update_when_value_changed = kwargs['forceAnUpdateWhenValueChanged'] + if sas_token is None and 'sasToken' in kwargs: + sas_token = kwargs['sasToken'] + if script_content is None and 'scriptContent' in kwargs: + script_content = kwargs['scriptContent'] + + _setter("database_id", database_id) if continue_on_errors_enabled is not None: - pulumi.set(__self__, "continue_on_errors_enabled", continue_on_errors_enabled) + _setter("continue_on_errors_enabled", continue_on_errors_enabled) if force_an_update_when_value_changed is not None: - pulumi.set(__self__, "force_an_update_when_value_changed", force_an_update_when_value_changed) + _setter("force_an_update_when_value_changed", force_an_update_when_value_changed) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sas_token is not None: - pulumi.set(__self__, "sas_token", sas_token) + _setter("sas_token", sas_token) if script_content is not None: - pulumi.set(__self__, "script_content", script_content) + _setter("script_content", script_content) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="databaseId") @@ -150,20 +185,53 @@ def __init__(__self__, *, :param pulumi.Input[str] script_content: The script content. This property should be used when the script is provide inline and not through file in a SA. Must not be used together with `url` and `sas_token` properties. Changing this forces a new resource to be created. :param pulumi.Input[str] url: The url to the KQL script blob file. Must not be used together with scriptContent property. Please reference [this documentation](https://docs.microsoft.com/azure/data-explorer/database-script) that describes the commands that are allowed in the script. """ + _ScriptState._configure( + lambda key, value: pulumi.set(__self__, key, value), + continue_on_errors_enabled=continue_on_errors_enabled, + database_id=database_id, + force_an_update_when_value_changed=force_an_update_when_value_changed, + name=name, + sas_token=sas_token, + script_content=script_content, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + continue_on_errors_enabled: Optional[pulumi.Input[bool]] = None, + database_id: Optional[pulumi.Input[str]] = None, + force_an_update_when_value_changed: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sas_token: Optional[pulumi.Input[str]] = None, + script_content: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if continue_on_errors_enabled is None and 'continueOnErrorsEnabled' in kwargs: + continue_on_errors_enabled = kwargs['continueOnErrorsEnabled'] + if database_id is None and 'databaseId' in kwargs: + database_id = kwargs['databaseId'] + if force_an_update_when_value_changed is None and 'forceAnUpdateWhenValueChanged' in kwargs: + force_an_update_when_value_changed = kwargs['forceAnUpdateWhenValueChanged'] + if sas_token is None and 'sasToken' in kwargs: + sas_token = kwargs['sasToken'] + if script_content is None and 'scriptContent' in kwargs: + script_content = kwargs['scriptContent'] + if continue_on_errors_enabled is not None: - pulumi.set(__self__, "continue_on_errors_enabled", continue_on_errors_enabled) + _setter("continue_on_errors_enabled", continue_on_errors_enabled) if database_id is not None: - pulumi.set(__self__, "database_id", database_id) + _setter("database_id", database_id) if force_an_update_when_value_changed is not None: - pulumi.set(__self__, "force_an_update_when_value_changed", force_an_update_when_value_changed) + _setter("force_an_update_when_value_changed", force_an_update_when_value_changed) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sas_token is not None: - pulumi.set(__self__, "sas_token", sas_token) + _setter("sas_token", sas_token) if script_content is not None: - pulumi.set(__self__, "script_content", script_content) + _setter("script_content", script_content) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="continueOnErrorsEnabled") @@ -415,6 +483,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ScriptArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/lab/_inputs.py b/sdk/python/pulumi_azure/lab/_inputs.py index 948b9e0eed..80921d105b 100644 --- a/sdk/python/pulumi_azure/lab/_inputs.py +++ b/sdk/python/pulumi_azure/lab/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -45,14 +45,39 @@ def __init__(__self__, *, > **NOTE:** This property is `None` when it isn't specified. No need to set `idle_delay` when `shutdown_on_idle` isn't specified. """ + LabAutoShutdownArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disconnect_delay=disconnect_delay, + idle_delay=idle_delay, + no_connect_delay=no_connect_delay, + shutdown_on_idle=shutdown_on_idle, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disconnect_delay: Optional[pulumi.Input[str]] = None, + idle_delay: Optional[pulumi.Input[str]] = None, + no_connect_delay: Optional[pulumi.Input[str]] = None, + shutdown_on_idle: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disconnect_delay is None and 'disconnectDelay' in kwargs: + disconnect_delay = kwargs['disconnectDelay'] + if idle_delay is None and 'idleDelay' in kwargs: + idle_delay = kwargs['idleDelay'] + if no_connect_delay is None and 'noConnectDelay' in kwargs: + no_connect_delay = kwargs['noConnectDelay'] + if shutdown_on_idle is None and 'shutdownOnIdle' in kwargs: + shutdown_on_idle = kwargs['shutdownOnIdle'] + if disconnect_delay is not None: - pulumi.set(__self__, "disconnect_delay", disconnect_delay) + _setter("disconnect_delay", disconnect_delay) if idle_delay is not None: - pulumi.set(__self__, "idle_delay", idle_delay) + _setter("idle_delay", idle_delay) if no_connect_delay is not None: - pulumi.set(__self__, "no_connect_delay", no_connect_delay) + _setter("no_connect_delay", no_connect_delay) if shutdown_on_idle is not None: - pulumi.set(__self__, "shutdown_on_idle", shutdown_on_idle) + _setter("shutdown_on_idle", shutdown_on_idle) @property @pulumi.getter(name="disconnectDelay") @@ -122,10 +147,27 @@ def __init__(__self__, *, > **NOTE:** This property is `None` when it isn't specified. """ + LabConnectionSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_rdp_access=client_rdp_access, + client_ssh_access=client_ssh_access, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_rdp_access: Optional[pulumi.Input[str]] = None, + client_ssh_access: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_rdp_access is None and 'clientRdpAccess' in kwargs: + client_rdp_access = kwargs['clientRdpAccess'] + if client_ssh_access is None and 'clientSshAccess' in kwargs: + client_ssh_access = kwargs['clientSshAccess'] + if client_rdp_access is not None: - pulumi.set(__self__, "client_rdp_access", client_rdp_access) + _setter("client_rdp_access", client_rdp_access) if client_ssh_access is not None: - pulumi.set(__self__, "client_ssh_access", client_ssh_access) + _setter("client_ssh_access", client_ssh_access) @property @pulumi.getter(name="clientRdpAccess") @@ -167,12 +209,33 @@ def __init__(__self__, *, :param pulumi.Input[str] public_ip_id: The resource ID of the Public IP for the network profile of the Lab Service Lab. :param pulumi.Input[str] subnet_id: The resource ID of the Subnet for the network profile of the Lab Service Lab. """ + LabNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + load_balancer_id=load_balancer_id, + public_ip_id=public_ip_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + load_balancer_id: Optional[pulumi.Input[str]] = None, + public_ip_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if load_balancer_id is None and 'loadBalancerId' in kwargs: + load_balancer_id = kwargs['loadBalancerId'] + if public_ip_id is None and 'publicIpId' in kwargs: + public_ip_id = kwargs['publicIpId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if load_balancer_id is not None: - pulumi.set(__self__, "load_balancer_id", load_balancer_id) + _setter("load_balancer_id", load_balancer_id) if public_ip_id is not None: - pulumi.set(__self__, "public_ip_id", public_ip_id) + _setter("public_ip_id", public_ip_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="loadBalancerId") @@ -226,16 +289,45 @@ def __init__(__self__, *, :param pulumi.Input[str] lti_context_id: The unique context identifier for the Lab Service Lab in the lms. :param pulumi.Input[str] lti_roster_endpoint: The URI of the names and roles service endpoint on the lms for the class attached to this Lab Service Lab. """ + LabRosterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directory_group_id=active_directory_group_id, + lms_instance=lms_instance, + lti_client_id=lti_client_id, + lti_context_id=lti_context_id, + lti_roster_endpoint=lti_roster_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directory_group_id: Optional[pulumi.Input[str]] = None, + lms_instance: Optional[pulumi.Input[str]] = None, + lti_client_id: Optional[pulumi.Input[str]] = None, + lti_context_id: Optional[pulumi.Input[str]] = None, + lti_roster_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directory_group_id is None and 'activeDirectoryGroupId' in kwargs: + active_directory_group_id = kwargs['activeDirectoryGroupId'] + if lms_instance is None and 'lmsInstance' in kwargs: + lms_instance = kwargs['lmsInstance'] + if lti_client_id is None and 'ltiClientId' in kwargs: + lti_client_id = kwargs['ltiClientId'] + if lti_context_id is None and 'ltiContextId' in kwargs: + lti_context_id = kwargs['ltiContextId'] + if lti_roster_endpoint is None and 'ltiRosterEndpoint' in kwargs: + lti_roster_endpoint = kwargs['ltiRosterEndpoint'] + if active_directory_group_id is not None: - pulumi.set(__self__, "active_directory_group_id", active_directory_group_id) + _setter("active_directory_group_id", active_directory_group_id) if lms_instance is not None: - pulumi.set(__self__, "lms_instance", lms_instance) + _setter("lms_instance", lms_instance) if lti_client_id is not None: - pulumi.set(__self__, "lti_client_id", lti_client_id) + _setter("lti_client_id", lti_client_id) if lti_context_id is not None: - pulumi.set(__self__, "lti_context_id", lti_context_id) + _setter("lti_context_id", lti_context_id) if lti_roster_endpoint is not None: - pulumi.set(__self__, "lti_roster_endpoint", lti_roster_endpoint) + _setter("lti_roster_endpoint", lti_roster_endpoint) @property @pulumi.getter(name="activeDirectoryGroupId") @@ -307,9 +399,28 @@ def __init__(__self__, *, :param pulumi.Input[bool] open_access_enabled: Is open access enabled to allow any user or only specified users to register to a Lab Service Lab? :param pulumi.Input[str] registration_code: The registration code for the Lab Service Lab. """ - pulumi.set(__self__, "open_access_enabled", open_access_enabled) + LabSecurityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + open_access_enabled=open_access_enabled, + registration_code=registration_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + open_access_enabled: Optional[pulumi.Input[bool]] = None, + registration_code: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if open_access_enabled is None and 'openAccessEnabled' in kwargs: + open_access_enabled = kwargs['openAccessEnabled'] + if open_access_enabled is None: + raise TypeError("Missing 'open_access_enabled' argument") + if registration_code is None and 'registrationCode' in kwargs: + registration_code = kwargs['registrationCode'] + + _setter("open_access_enabled", open_access_enabled) if registration_code is not None: - pulumi.set(__self__, "registration_code", registration_code) + _setter("registration_code", registration_code) @property @pulumi.getter(name="openAccessEnabled") @@ -357,19 +468,64 @@ def __init__(__self__, *, :param pulumi.Input[bool] shared_password_enabled: Is the shared password enabled with the same password for all user VMs? Defaults to `false`. Changing this forces a new resource to be created. :param pulumi.Input[str] usage_quota: The initial quota allocated to each Lab Service Lab user. Defaults to `PT0S`. This value must be formatted as an ISO 8601 string. """ - pulumi.set(__self__, "admin_user", admin_user) - pulumi.set(__self__, "image_reference", image_reference) - pulumi.set(__self__, "sku", sku) + LabVirtualMachineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_user=admin_user, + image_reference=image_reference, + sku=sku, + additional_capability_gpu_drivers_installed=additional_capability_gpu_drivers_installed, + create_option=create_option, + non_admin_user=non_admin_user, + shared_password_enabled=shared_password_enabled, + usage_quota=usage_quota, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_user: Optional[pulumi.Input['LabVirtualMachineAdminUserArgs']] = None, + image_reference: Optional[pulumi.Input['LabVirtualMachineImageReferenceArgs']] = None, + sku: Optional[pulumi.Input['LabVirtualMachineSkuArgs']] = None, + additional_capability_gpu_drivers_installed: Optional[pulumi.Input[bool]] = None, + create_option: Optional[pulumi.Input[str]] = None, + non_admin_user: Optional[pulumi.Input['LabVirtualMachineNonAdminUserArgs']] = None, + shared_password_enabled: Optional[pulumi.Input[bool]] = None, + usage_quota: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_user is None and 'adminUser' in kwargs: + admin_user = kwargs['adminUser'] + if admin_user is None: + raise TypeError("Missing 'admin_user' argument") + if image_reference is None and 'imageReference' in kwargs: + image_reference = kwargs['imageReference'] + if image_reference is None: + raise TypeError("Missing 'image_reference' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if additional_capability_gpu_drivers_installed is None and 'additionalCapabilityGpuDriversInstalled' in kwargs: + additional_capability_gpu_drivers_installed = kwargs['additionalCapabilityGpuDriversInstalled'] + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if non_admin_user is None and 'nonAdminUser' in kwargs: + non_admin_user = kwargs['nonAdminUser'] + if shared_password_enabled is None and 'sharedPasswordEnabled' in kwargs: + shared_password_enabled = kwargs['sharedPasswordEnabled'] + if usage_quota is None and 'usageQuota' in kwargs: + usage_quota = kwargs['usageQuota'] + + _setter("admin_user", admin_user) + _setter("image_reference", image_reference) + _setter("sku", sku) if additional_capability_gpu_drivers_installed is not None: - pulumi.set(__self__, "additional_capability_gpu_drivers_installed", additional_capability_gpu_drivers_installed) + _setter("additional_capability_gpu_drivers_installed", additional_capability_gpu_drivers_installed) if create_option is not None: - pulumi.set(__self__, "create_option", create_option) + _setter("create_option", create_option) if non_admin_user is not None: - pulumi.set(__self__, "non_admin_user", non_admin_user) + _setter("non_admin_user", non_admin_user) if shared_password_enabled is not None: - pulumi.set(__self__, "shared_password_enabled", shared_password_enabled) + _setter("shared_password_enabled", shared_password_enabled) if usage_quota is not None: - pulumi.set(__self__, "usage_quota", usage_quota) + _setter("usage_quota", usage_quota) @property @pulumi.getter(name="adminUser") @@ -477,8 +633,25 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password for the Lab user. Changing this forces a new resource to be created. :param pulumi.Input[str] username: The username to use when signing in to Lab Service Lab VMs. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + LabVirtualMachineAdminUserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -520,16 +693,35 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: The image SKU. Changing this forces a new resource to be created. :param pulumi.Input[str] version: The image version specified on creation. Changing this forces a new resource to be created. """ + LabVirtualMachineImageReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + offer: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if offer is not None: - pulumi.set(__self__, "offer", offer) + _setter("offer", offer) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -601,8 +793,25 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password for the user. :param pulumi.Input[str] username: The username to use when signing in to Lab Service Lab VMs. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + LabVirtualMachineNonAdminUserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -640,8 +849,25 @@ def __init__(__self__, *, > **NOTE:** Once `active_directory_group_id` is enabled, `capacity` wouldn't take effect, and it would be automatically set to the number of members in AAD Group by service API. So it has to use `ignore_changes` to avoid the difference of tf plan. :param pulumi.Input[str] name: The name of the SKU. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + LabVirtualMachineSkuArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("capacity", capacity) + _setter("name", name) @property @pulumi.getter @@ -683,12 +909,37 @@ def __init__(__self__, *, :param pulumi.Input[int] interval: The interval to invoke the schedule on. Possible values are between `1` and `365`. :param pulumi.Input[Sequence[pulumi.Input[str]]] week_days: The interval to invoke the schedule on. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. """ - pulumi.set(__self__, "expiration_date", expiration_date) - pulumi.set(__self__, "frequency", frequency) + ScheduleRecurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiration_date=expiration_date, + frequency=frequency, + interval=interval, + week_days=week_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiration_date: Optional[pulumi.Input[str]] = None, + frequency: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[int]] = None, + week_days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if expiration_date is None: + raise TypeError("Missing 'expiration_date' argument") + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if week_days is None and 'weekDays' in kwargs: + week_days = kwargs['weekDays'] + + _setter("expiration_date", expiration_date) + _setter("frequency", frequency) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) if week_days is not None: - pulumi.set(__self__, "week_days", week_days) + _setter("week_days", week_days) @property @pulumi.getter(name="expirationDate") @@ -754,14 +1005,39 @@ def __init__(__self__, *, > **NOTE:** This property is `None` when it isn't specified. No need to set `idle_delay` when `shutdown_on_idle` isn't specified. """ + ServicePlanDefaultAutoShutdownArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disconnect_delay=disconnect_delay, + idle_delay=idle_delay, + no_connect_delay=no_connect_delay, + shutdown_on_idle=shutdown_on_idle, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disconnect_delay: Optional[pulumi.Input[str]] = None, + idle_delay: Optional[pulumi.Input[str]] = None, + no_connect_delay: Optional[pulumi.Input[str]] = None, + shutdown_on_idle: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disconnect_delay is None and 'disconnectDelay' in kwargs: + disconnect_delay = kwargs['disconnectDelay'] + if idle_delay is None and 'idleDelay' in kwargs: + idle_delay = kwargs['idleDelay'] + if no_connect_delay is None and 'noConnectDelay' in kwargs: + no_connect_delay = kwargs['noConnectDelay'] + if shutdown_on_idle is None and 'shutdownOnIdle' in kwargs: + shutdown_on_idle = kwargs['shutdownOnIdle'] + if disconnect_delay is not None: - pulumi.set(__self__, "disconnect_delay", disconnect_delay) + _setter("disconnect_delay", disconnect_delay) if idle_delay is not None: - pulumi.set(__self__, "idle_delay", idle_delay) + _setter("idle_delay", idle_delay) if no_connect_delay is not None: - pulumi.set(__self__, "no_connect_delay", no_connect_delay) + _setter("no_connect_delay", no_connect_delay) if shutdown_on_idle is not None: - pulumi.set(__self__, "shutdown_on_idle", shutdown_on_idle) + _setter("shutdown_on_idle", shutdown_on_idle) @property @pulumi.getter(name="disconnectDelay") @@ -835,14 +1111,39 @@ def __init__(__self__, *, > **NOTE:** This property is `None` when it isn't specified. """ + ServicePlanDefaultConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_rdp_access=client_rdp_access, + client_ssh_access=client_ssh_access, + web_rdp_access=web_rdp_access, + web_ssh_access=web_ssh_access, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_rdp_access: Optional[pulumi.Input[str]] = None, + client_ssh_access: Optional[pulumi.Input[str]] = None, + web_rdp_access: Optional[pulumi.Input[str]] = None, + web_ssh_access: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_rdp_access is None and 'clientRdpAccess' in kwargs: + client_rdp_access = kwargs['clientRdpAccess'] + if client_ssh_access is None and 'clientSshAccess' in kwargs: + client_ssh_access = kwargs['clientSshAccess'] + if web_rdp_access is None and 'webRdpAccess' in kwargs: + web_rdp_access = kwargs['webRdpAccess'] + if web_ssh_access is None and 'webSshAccess' in kwargs: + web_ssh_access = kwargs['webSshAccess'] + if client_rdp_access is not None: - pulumi.set(__self__, "client_rdp_access", client_rdp_access) + _setter("client_rdp_access", client_rdp_access) if client_ssh_access is not None: - pulumi.set(__self__, "client_ssh_access", client_ssh_access) + _setter("client_ssh_access", client_ssh_access) if web_rdp_access is not None: - pulumi.set(__self__, "web_rdp_access", web_rdp_access) + _setter("web_rdp_access", web_rdp_access) if web_ssh_access is not None: - pulumi.set(__self__, "web_ssh_access", web_ssh_access) + _setter("web_ssh_access", web_ssh_access) @property @pulumi.getter(name="clientRdpAccess") @@ -914,14 +1215,31 @@ def __init__(__self__, *, :param pulumi.Input[str] phone: The phone number for the support contact. :param pulumi.Input[str] url: The web address for users of the Lab Service Plan. """ + ServicePlanSupportArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + instructions=instructions, + phone=phone, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input[str]] = None, + instructions: Optional[pulumi.Input[str]] = None, + phone: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if instructions is not None: - pulumi.set(__self__, "instructions", instructions) + _setter("instructions", instructions) if phone is not None: - pulumi.set(__self__, "phone", phone) + _setter("phone", phone) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/lab/lab.py b/sdk/python/pulumi_azure/lab/lab.py index 49db9c7c99..cfa7d765c9 100644 --- a/sdk/python/pulumi_azure/lab/lab.py +++ b/sdk/python/pulumi_azure/lab/lab.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,28 +45,81 @@ def __init__(__self__, *, :param pulumi.Input['LabRosterArgs'] roster: A `roster` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Lab Service Lab. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "security", security) - pulumi.set(__self__, "title", title) - pulumi.set(__self__, "virtual_machine", virtual_machine) + LabArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + security=security, + title=title, + virtual_machine=virtual_machine, + auto_shutdown=auto_shutdown, + connection_setting=connection_setting, + description=description, + lab_plan_id=lab_plan_id, + location=location, + name=name, + network=network, + roster=roster, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + security: Optional[pulumi.Input['LabSecurityArgs']] = None, + title: Optional[pulumi.Input[str]] = None, + virtual_machine: Optional[pulumi.Input['LabVirtualMachineArgs']] = None, + auto_shutdown: Optional[pulumi.Input['LabAutoShutdownArgs']] = None, + connection_setting: Optional[pulumi.Input['LabConnectionSettingArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + lab_plan_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['LabNetworkArgs']] = None, + roster: Optional[pulumi.Input['LabRosterArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if security is None: + raise TypeError("Missing 'security' argument") + if title is None: + raise TypeError("Missing 'title' argument") + if virtual_machine is None and 'virtualMachine' in kwargs: + virtual_machine = kwargs['virtualMachine'] + if virtual_machine is None: + raise TypeError("Missing 'virtual_machine' argument") + if auto_shutdown is None and 'autoShutdown' in kwargs: + auto_shutdown = kwargs['autoShutdown'] + if connection_setting is None and 'connectionSetting' in kwargs: + connection_setting = kwargs['connectionSetting'] + if lab_plan_id is None and 'labPlanId' in kwargs: + lab_plan_id = kwargs['labPlanId'] + + _setter("resource_group_name", resource_group_name) + _setter("security", security) + _setter("title", title) + _setter("virtual_machine", virtual_machine) if auto_shutdown is not None: - pulumi.set(__self__, "auto_shutdown", auto_shutdown) + _setter("auto_shutdown", auto_shutdown) if connection_setting is not None: - pulumi.set(__self__, "connection_setting", connection_setting) + _setter("connection_setting", connection_setting) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if lab_plan_id is not None: - pulumi.set(__self__, "lab_plan_id", lab_plan_id) + _setter("lab_plan_id", lab_plan_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if roster is not None: - pulumi.set(__self__, "roster", roster) + _setter("roster", roster) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -257,32 +310,77 @@ def __init__(__self__, *, :param pulumi.Input[str] title: The title of the Lab Service Lab. :param pulumi.Input['LabVirtualMachineArgs'] virtual_machine: A `virtual_machine` block as defined below. """ + _LabState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_shutdown=auto_shutdown, + connection_setting=connection_setting, + description=description, + lab_plan_id=lab_plan_id, + location=location, + name=name, + network=network, + resource_group_name=resource_group_name, + roster=roster, + security=security, + tags=tags, + title=title, + virtual_machine=virtual_machine, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_shutdown: Optional[pulumi.Input['LabAutoShutdownArgs']] = None, + connection_setting: Optional[pulumi.Input['LabConnectionSettingArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + lab_plan_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network: Optional[pulumi.Input['LabNetworkArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + roster: Optional[pulumi.Input['LabRosterArgs']] = None, + security: Optional[pulumi.Input['LabSecurityArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + title: Optional[pulumi.Input[str]] = None, + virtual_machine: Optional[pulumi.Input['LabVirtualMachineArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_shutdown is None and 'autoShutdown' in kwargs: + auto_shutdown = kwargs['autoShutdown'] + if connection_setting is None and 'connectionSetting' in kwargs: + connection_setting = kwargs['connectionSetting'] + if lab_plan_id is None and 'labPlanId' in kwargs: + lab_plan_id = kwargs['labPlanId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if virtual_machine is None and 'virtualMachine' in kwargs: + virtual_machine = kwargs['virtualMachine'] + if auto_shutdown is not None: - pulumi.set(__self__, "auto_shutdown", auto_shutdown) + _setter("auto_shutdown", auto_shutdown) if connection_setting is not None: - pulumi.set(__self__, "connection_setting", connection_setting) + _setter("connection_setting", connection_setting) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if lab_plan_id is not None: - pulumi.set(__self__, "lab_plan_id", lab_plan_id) + _setter("lab_plan_id", lab_plan_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if roster is not None: - pulumi.set(__self__, "roster", roster) + _setter("roster", roster) if security is not None: - pulumi.set(__self__, "security", security) + _setter("security", security) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if title is not None: - pulumi.set(__self__, "title", title) + _setter("title", title) if virtual_machine is not None: - pulumi.set(__self__, "virtual_machine", virtual_machine) + _setter("virtual_machine", virtual_machine) @property @pulumi.getter(name="autoShutdown") @@ -578,6 +676,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LabArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -605,17 +707,42 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = LabArgs.__new__(LabArgs) + if auto_shutdown is not None and not isinstance(auto_shutdown, LabAutoShutdownArgs): + auto_shutdown = auto_shutdown or {} + def _setter(key, value): + auto_shutdown[key] = value + LabAutoShutdownArgs._configure(_setter, **auto_shutdown) __props__.__dict__["auto_shutdown"] = auto_shutdown + if connection_setting is not None and not isinstance(connection_setting, LabConnectionSettingArgs): + connection_setting = connection_setting or {} + def _setter(key, value): + connection_setting[key] = value + LabConnectionSettingArgs._configure(_setter, **connection_setting) __props__.__dict__["connection_setting"] = connection_setting __props__.__dict__["description"] = description __props__.__dict__["lab_plan_id"] = lab_plan_id __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if network is not None and not isinstance(network, LabNetworkArgs): + network = network or {} + def _setter(key, value): + network[key] = value + LabNetworkArgs._configure(_setter, **network) __props__.__dict__["network"] = network if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if roster is not None and not isinstance(roster, LabRosterArgs): + roster = roster or {} + def _setter(key, value): + roster[key] = value + LabRosterArgs._configure(_setter, **roster) __props__.__dict__["roster"] = roster + if security is not None and not isinstance(security, LabSecurityArgs): + security = security or {} + def _setter(key, value): + security[key] = value + LabSecurityArgs._configure(_setter, **security) if security is None and not opts.urn: raise TypeError("Missing required property 'security'") __props__.__dict__["security"] = security @@ -623,6 +750,11 @@ def _internal_init(__self__, if title is None and not opts.urn: raise TypeError("Missing required property 'title'") __props__.__dict__["title"] = title + if virtual_machine is not None and not isinstance(virtual_machine, LabVirtualMachineArgs): + virtual_machine = virtual_machine or {} + def _setter(key, value): + virtual_machine[key] = value + LabVirtualMachineArgs._configure(_setter, **virtual_machine) if virtual_machine is None and not opts.urn: raise TypeError("Missing required property 'virtual_machine'") __props__.__dict__["virtual_machine"] = virtual_machine diff --git a/sdk/python/pulumi_azure/lab/outputs.py b/sdk/python/pulumi_azure/lab/outputs.py index 69c422015c..9d7c2f7da9 100644 --- a/sdk/python/pulumi_azure/lab/outputs.py +++ b/sdk/python/pulumi_azure/lab/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -69,14 +69,39 @@ def __init__(__self__, *, > **NOTE:** This property is `None` when it isn't specified. No need to set `idle_delay` when `shutdown_on_idle` isn't specified. """ + LabAutoShutdown._configure( + lambda key, value: pulumi.set(__self__, key, value), + disconnect_delay=disconnect_delay, + idle_delay=idle_delay, + no_connect_delay=no_connect_delay, + shutdown_on_idle=shutdown_on_idle, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disconnect_delay: Optional[str] = None, + idle_delay: Optional[str] = None, + no_connect_delay: Optional[str] = None, + shutdown_on_idle: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disconnect_delay is None and 'disconnectDelay' in kwargs: + disconnect_delay = kwargs['disconnectDelay'] + if idle_delay is None and 'idleDelay' in kwargs: + idle_delay = kwargs['idleDelay'] + if no_connect_delay is None and 'noConnectDelay' in kwargs: + no_connect_delay = kwargs['noConnectDelay'] + if shutdown_on_idle is None and 'shutdownOnIdle' in kwargs: + shutdown_on_idle = kwargs['shutdownOnIdle'] + if disconnect_delay is not None: - pulumi.set(__self__, "disconnect_delay", disconnect_delay) + _setter("disconnect_delay", disconnect_delay) if idle_delay is not None: - pulumi.set(__self__, "idle_delay", idle_delay) + _setter("idle_delay", idle_delay) if no_connect_delay is not None: - pulumi.set(__self__, "no_connect_delay", no_connect_delay) + _setter("no_connect_delay", no_connect_delay) if shutdown_on_idle is not None: - pulumi.set(__self__, "shutdown_on_idle", shutdown_on_idle) + _setter("shutdown_on_idle", shutdown_on_idle) @property @pulumi.getter(name="disconnectDelay") @@ -149,10 +174,27 @@ def __init__(__self__, *, > **NOTE:** This property is `None` when it isn't specified. """ + LabConnectionSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_rdp_access=client_rdp_access, + client_ssh_access=client_ssh_access, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_rdp_access: Optional[str] = None, + client_ssh_access: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_rdp_access is None and 'clientRdpAccess' in kwargs: + client_rdp_access = kwargs['clientRdpAccess'] + if client_ssh_access is None and 'clientSshAccess' in kwargs: + client_ssh_access = kwargs['clientSshAccess'] + if client_rdp_access is not None: - pulumi.set(__self__, "client_rdp_access", client_rdp_access) + _setter("client_rdp_access", client_rdp_access) if client_ssh_access is not None: - pulumi.set(__self__, "client_ssh_access", client_ssh_access) + _setter("client_ssh_access", client_ssh_access) @property @pulumi.getter(name="clientRdpAccess") @@ -207,12 +249,33 @@ def __init__(__self__, *, :param str public_ip_id: The resource ID of the Public IP for the network profile of the Lab Service Lab. :param str subnet_id: The resource ID of the Subnet for the network profile of the Lab Service Lab. """ + LabNetwork._configure( + lambda key, value: pulumi.set(__self__, key, value), + load_balancer_id=load_balancer_id, + public_ip_id=public_ip_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + load_balancer_id: Optional[str] = None, + public_ip_id: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if load_balancer_id is None and 'loadBalancerId' in kwargs: + load_balancer_id = kwargs['loadBalancerId'] + if public_ip_id is None and 'publicIpId' in kwargs: + public_ip_id = kwargs['publicIpId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if load_balancer_id is not None: - pulumi.set(__self__, "load_balancer_id", load_balancer_id) + _setter("load_balancer_id", load_balancer_id) if public_ip_id is not None: - pulumi.set(__self__, "public_ip_id", public_ip_id) + _setter("public_ip_id", public_ip_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="loadBalancerId") @@ -279,16 +342,45 @@ def __init__(__self__, *, :param str lti_context_id: The unique context identifier for the Lab Service Lab in the lms. :param str lti_roster_endpoint: The URI of the names and roles service endpoint on the lms for the class attached to this Lab Service Lab. """ + LabRoster._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directory_group_id=active_directory_group_id, + lms_instance=lms_instance, + lti_client_id=lti_client_id, + lti_context_id=lti_context_id, + lti_roster_endpoint=lti_roster_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directory_group_id: Optional[str] = None, + lms_instance: Optional[str] = None, + lti_client_id: Optional[str] = None, + lti_context_id: Optional[str] = None, + lti_roster_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directory_group_id is None and 'activeDirectoryGroupId' in kwargs: + active_directory_group_id = kwargs['activeDirectoryGroupId'] + if lms_instance is None and 'lmsInstance' in kwargs: + lms_instance = kwargs['lmsInstance'] + if lti_client_id is None and 'ltiClientId' in kwargs: + lti_client_id = kwargs['ltiClientId'] + if lti_context_id is None and 'ltiContextId' in kwargs: + lti_context_id = kwargs['ltiContextId'] + if lti_roster_endpoint is None and 'ltiRosterEndpoint' in kwargs: + lti_roster_endpoint = kwargs['ltiRosterEndpoint'] + if active_directory_group_id is not None: - pulumi.set(__self__, "active_directory_group_id", active_directory_group_id) + _setter("active_directory_group_id", active_directory_group_id) if lms_instance is not None: - pulumi.set(__self__, "lms_instance", lms_instance) + _setter("lms_instance", lms_instance) if lti_client_id is not None: - pulumi.set(__self__, "lti_client_id", lti_client_id) + _setter("lti_client_id", lti_client_id) if lti_context_id is not None: - pulumi.set(__self__, "lti_context_id", lti_context_id) + _setter("lti_context_id", lti_context_id) if lti_roster_endpoint is not None: - pulumi.set(__self__, "lti_roster_endpoint", lti_roster_endpoint) + _setter("lti_roster_endpoint", lti_roster_endpoint) @property @pulumi.getter(name="activeDirectoryGroupId") @@ -359,9 +451,28 @@ def __init__(__self__, *, :param bool open_access_enabled: Is open access enabled to allow any user or only specified users to register to a Lab Service Lab? :param str registration_code: The registration code for the Lab Service Lab. """ - pulumi.set(__self__, "open_access_enabled", open_access_enabled) + LabSecurity._configure( + lambda key, value: pulumi.set(__self__, key, value), + open_access_enabled=open_access_enabled, + registration_code=registration_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + open_access_enabled: Optional[bool] = None, + registration_code: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if open_access_enabled is None and 'openAccessEnabled' in kwargs: + open_access_enabled = kwargs['openAccessEnabled'] + if open_access_enabled is None: + raise TypeError("Missing 'open_access_enabled' argument") + if registration_code is None and 'registrationCode' in kwargs: + registration_code = kwargs['registrationCode'] + + _setter("open_access_enabled", open_access_enabled) if registration_code is not None: - pulumi.set(__self__, "registration_code", registration_code) + _setter("registration_code", registration_code) @property @pulumi.getter(name="openAccessEnabled") @@ -430,19 +541,64 @@ def __init__(__self__, *, :param bool shared_password_enabled: Is the shared password enabled with the same password for all user VMs? Defaults to `false`. Changing this forces a new resource to be created. :param str usage_quota: The initial quota allocated to each Lab Service Lab user. Defaults to `PT0S`. This value must be formatted as an ISO 8601 string. """ - pulumi.set(__self__, "admin_user", admin_user) - pulumi.set(__self__, "image_reference", image_reference) - pulumi.set(__self__, "sku", sku) + LabVirtualMachine._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_user=admin_user, + image_reference=image_reference, + sku=sku, + additional_capability_gpu_drivers_installed=additional_capability_gpu_drivers_installed, + create_option=create_option, + non_admin_user=non_admin_user, + shared_password_enabled=shared_password_enabled, + usage_quota=usage_quota, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_user: Optional['outputs.LabVirtualMachineAdminUser'] = None, + image_reference: Optional['outputs.LabVirtualMachineImageReference'] = None, + sku: Optional['outputs.LabVirtualMachineSku'] = None, + additional_capability_gpu_drivers_installed: Optional[bool] = None, + create_option: Optional[str] = None, + non_admin_user: Optional['outputs.LabVirtualMachineNonAdminUser'] = None, + shared_password_enabled: Optional[bool] = None, + usage_quota: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_user is None and 'adminUser' in kwargs: + admin_user = kwargs['adminUser'] + if admin_user is None: + raise TypeError("Missing 'admin_user' argument") + if image_reference is None and 'imageReference' in kwargs: + image_reference = kwargs['imageReference'] + if image_reference is None: + raise TypeError("Missing 'image_reference' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if additional_capability_gpu_drivers_installed is None and 'additionalCapabilityGpuDriversInstalled' in kwargs: + additional_capability_gpu_drivers_installed = kwargs['additionalCapabilityGpuDriversInstalled'] + if create_option is None and 'createOption' in kwargs: + create_option = kwargs['createOption'] + if non_admin_user is None and 'nonAdminUser' in kwargs: + non_admin_user = kwargs['nonAdminUser'] + if shared_password_enabled is None and 'sharedPasswordEnabled' in kwargs: + shared_password_enabled = kwargs['sharedPasswordEnabled'] + if usage_quota is None and 'usageQuota' in kwargs: + usage_quota = kwargs['usageQuota'] + + _setter("admin_user", admin_user) + _setter("image_reference", image_reference) + _setter("sku", sku) if additional_capability_gpu_drivers_installed is not None: - pulumi.set(__self__, "additional_capability_gpu_drivers_installed", additional_capability_gpu_drivers_installed) + _setter("additional_capability_gpu_drivers_installed", additional_capability_gpu_drivers_installed) if create_option is not None: - pulumi.set(__self__, "create_option", create_option) + _setter("create_option", create_option) if non_admin_user is not None: - pulumi.set(__self__, "non_admin_user", non_admin_user) + _setter("non_admin_user", non_admin_user) if shared_password_enabled is not None: - pulumi.set(__self__, "shared_password_enabled", shared_password_enabled) + _setter("shared_password_enabled", shared_password_enabled) if usage_quota is not None: - pulumi.set(__self__, "usage_quota", usage_quota) + _setter("usage_quota", usage_quota) @property @pulumi.getter(name="adminUser") @@ -518,8 +674,25 @@ def __init__(__self__, *, :param str password: The password for the Lab user. Changing this forces a new resource to be created. :param str username: The username to use when signing in to Lab Service Lab VMs. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + LabVirtualMachineAdminUser._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -553,16 +726,35 @@ def __init__(__self__, *, :param str sku: The image SKU. Changing this forces a new resource to be created. :param str version: The image version specified on creation. Changing this forces a new resource to be created. """ + LabVirtualMachineImageReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + offer=offer, + publisher=publisher, + sku=sku, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + offer: Optional[str] = None, + publisher: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if offer is not None: - pulumi.set(__self__, "offer", offer) + _setter("offer", offer) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -614,8 +806,25 @@ def __init__(__self__, *, :param str password: The password for the user. :param str username: The username to use when signing in to Lab Service Lab VMs. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + LabVirtualMachineNonAdminUser._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -645,8 +854,25 @@ def __init__(__self__, *, > **NOTE:** Once `active_directory_group_id` is enabled, `capacity` wouldn't take effect, and it would be automatically set to the number of members in AAD Group by service API. So it has to use `ignore_changes` to avoid the difference of tf plan. :param str name: The name of the SKU. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + LabVirtualMachineSku._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("capacity", capacity) + _setter("name", name) @property @pulumi.getter @@ -699,12 +925,37 @@ def __init__(__self__, *, :param int interval: The interval to invoke the schedule on. Possible values are between `1` and `365`. :param Sequence[str] week_days: The interval to invoke the schedule on. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. """ - pulumi.set(__self__, "expiration_date", expiration_date) - pulumi.set(__self__, "frequency", frequency) + ScheduleRecurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiration_date=expiration_date, + frequency=frequency, + interval=interval, + week_days=week_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiration_date: Optional[str] = None, + frequency: Optional[str] = None, + interval: Optional[int] = None, + week_days: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if expiration_date is None: + raise TypeError("Missing 'expiration_date' argument") + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if week_days is None and 'weekDays' in kwargs: + week_days = kwargs['weekDays'] + + _setter("expiration_date", expiration_date) + _setter("frequency", frequency) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) if week_days is not None: - pulumi.set(__self__, "week_days", week_days) + _setter("week_days", week_days) @property @pulumi.getter(name="expirationDate") @@ -777,14 +1028,39 @@ def __init__(__self__, *, > **NOTE:** This property is `None` when it isn't specified. No need to set `idle_delay` when `shutdown_on_idle` isn't specified. """ + ServicePlanDefaultAutoShutdown._configure( + lambda key, value: pulumi.set(__self__, key, value), + disconnect_delay=disconnect_delay, + idle_delay=idle_delay, + no_connect_delay=no_connect_delay, + shutdown_on_idle=shutdown_on_idle, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disconnect_delay: Optional[str] = None, + idle_delay: Optional[str] = None, + no_connect_delay: Optional[str] = None, + shutdown_on_idle: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disconnect_delay is None and 'disconnectDelay' in kwargs: + disconnect_delay = kwargs['disconnectDelay'] + if idle_delay is None and 'idleDelay' in kwargs: + idle_delay = kwargs['idleDelay'] + if no_connect_delay is None and 'noConnectDelay' in kwargs: + no_connect_delay = kwargs['noConnectDelay'] + if shutdown_on_idle is None and 'shutdownOnIdle' in kwargs: + shutdown_on_idle = kwargs['shutdownOnIdle'] + if disconnect_delay is not None: - pulumi.set(__self__, "disconnect_delay", disconnect_delay) + _setter("disconnect_delay", disconnect_delay) if idle_delay is not None: - pulumi.set(__self__, "idle_delay", idle_delay) + _setter("idle_delay", idle_delay) if no_connect_delay is not None: - pulumi.set(__self__, "no_connect_delay", no_connect_delay) + _setter("no_connect_delay", no_connect_delay) if shutdown_on_idle is not None: - pulumi.set(__self__, "shutdown_on_idle", shutdown_on_idle) + _setter("shutdown_on_idle", shutdown_on_idle) @property @pulumi.getter(name="disconnectDelay") @@ -865,14 +1141,39 @@ def __init__(__self__, *, > **NOTE:** This property is `None` when it isn't specified. """ + ServicePlanDefaultConnection._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_rdp_access=client_rdp_access, + client_ssh_access=client_ssh_access, + web_rdp_access=web_rdp_access, + web_ssh_access=web_ssh_access, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_rdp_access: Optional[str] = None, + client_ssh_access: Optional[str] = None, + web_rdp_access: Optional[str] = None, + web_ssh_access: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_rdp_access is None and 'clientRdpAccess' in kwargs: + client_rdp_access = kwargs['clientRdpAccess'] + if client_ssh_access is None and 'clientSshAccess' in kwargs: + client_ssh_access = kwargs['clientSshAccess'] + if web_rdp_access is None and 'webRdpAccess' in kwargs: + web_rdp_access = kwargs['webRdpAccess'] + if web_ssh_access is None and 'webSshAccess' in kwargs: + web_ssh_access = kwargs['webSshAccess'] + if client_rdp_access is not None: - pulumi.set(__self__, "client_rdp_access", client_rdp_access) + _setter("client_rdp_access", client_rdp_access) if client_ssh_access is not None: - pulumi.set(__self__, "client_ssh_access", client_ssh_access) + _setter("client_ssh_access", client_ssh_access) if web_rdp_access is not None: - pulumi.set(__self__, "web_rdp_access", web_rdp_access) + _setter("web_rdp_access", web_rdp_access) if web_ssh_access is not None: - pulumi.set(__self__, "web_ssh_access", web_ssh_access) + _setter("web_ssh_access", web_ssh_access) @property @pulumi.getter(name="clientRdpAccess") @@ -928,14 +1229,31 @@ def __init__(__self__, *, :param str phone: The phone number for the support contact. :param str url: The web address for users of the Lab Service Plan. """ + ServicePlanSupport._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + instructions=instructions, + phone=phone, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[str] = None, + instructions: Optional[str] = None, + phone: Optional[str] = None, + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if instructions is not None: - pulumi.set(__self__, "instructions", instructions) + _setter("instructions", instructions) if phone is not None: - pulumi.set(__self__, "phone", phone) + _setter("phone", phone) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/lab/schedule.py b/sdk/python/pulumi_azure/lab/schedule.py index cdd9e1b72f..3de5d9b446 100644 --- a/sdk/python/pulumi_azure/lab/schedule.py +++ b/sdk/python/pulumi_azure/lab/schedule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,54 @@ def __init__(__self__, *, :param pulumi.Input['ScheduleRecurrenceArgs'] recurrence: A `recurrence` block as defined below. :param pulumi.Input[str] start_time: When Lab User Virtual Machines will be started in RFC-3339 format. """ - pulumi.set(__self__, "lab_id", lab_id) - pulumi.set(__self__, "stop_time", stop_time) - pulumi.set(__self__, "time_zone", time_zone) + ScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + lab_id=lab_id, + stop_time=stop_time, + time_zone=time_zone, + name=name, + notes=notes, + recurrence=recurrence, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + lab_id: Optional[pulumi.Input[str]] = None, + stop_time: Optional[pulumi.Input[str]] = None, + time_zone: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + recurrence: Optional[pulumi.Input['ScheduleRecurrenceArgs']] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lab_id is None and 'labId' in kwargs: + lab_id = kwargs['labId'] + if lab_id is None: + raise TypeError("Missing 'lab_id' argument") + if stop_time is None and 'stopTime' in kwargs: + stop_time = kwargs['stopTime'] + if stop_time is None: + raise TypeError("Missing 'stop_time' argument") + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if time_zone is None: + raise TypeError("Missing 'time_zone' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("lab_id", lab_id) + _setter("stop_time", stop_time) + _setter("time_zone", time_zone) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="labId") @@ -150,20 +187,51 @@ def __init__(__self__, *, :param pulumi.Input[str] stop_time: When Lab User Virtual Machines will be stopped in RFC-3339 format. :param pulumi.Input[str] time_zone: The IANA Time Zone ID for the Schedule. """ + _ScheduleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + lab_id=lab_id, + name=name, + notes=notes, + recurrence=recurrence, + start_time=start_time, + stop_time=stop_time, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + lab_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + recurrence: Optional[pulumi.Input['ScheduleRecurrenceArgs']] = None, + start_time: Optional[pulumi.Input[str]] = None, + stop_time: Optional[pulumi.Input[str]] = None, + time_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lab_id is None and 'labId' in kwargs: + lab_id = kwargs['labId'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if stop_time is None and 'stopTime' in kwargs: + stop_time = kwargs['stopTime'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if lab_id is not None: - pulumi.set(__self__, "lab_id", lab_id) + _setter("lab_id", lab_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if stop_time is not None: - pulumi.set(__self__, "stop_time", stop_time) + _setter("stop_time", stop_time) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter(name="labId") @@ -383,6 +451,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ScheduleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -409,6 +481,11 @@ def _internal_init(__self__, __props__.__dict__["lab_id"] = lab_id __props__.__dict__["name"] = name __props__.__dict__["notes"] = notes + if recurrence is not None and not isinstance(recurrence, ScheduleRecurrenceArgs): + recurrence = recurrence or {} + def _setter(key, value): + recurrence[key] = value + ScheduleRecurrenceArgs._configure(_setter, **recurrence) __props__.__dict__["recurrence"] = recurrence __props__.__dict__["start_time"] = start_time if stop_time is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/lab/service_plan.py b/sdk/python/pulumi_azure/lab/service_plan.py index 9718786dab..7de82a520a 100644 --- a/sdk/python/pulumi_azure/lab/service_plan.py +++ b/sdk/python/pulumi_azure/lab/service_plan.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,24 +41,69 @@ def __init__(__self__, *, :param pulumi.Input['ServicePlanSupportArgs'] support: A `support` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Lab Service Plan. """ - pulumi.set(__self__, "allowed_regions", allowed_regions) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ServicePlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_regions=allowed_regions, + resource_group_name=resource_group_name, + default_auto_shutdown=default_auto_shutdown, + default_connection=default_connection, + default_network_subnet_id=default_network_subnet_id, + location=location, + name=name, + shared_gallery_id=shared_gallery_id, + support=support, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_regions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + default_auto_shutdown: Optional[pulumi.Input['ServicePlanDefaultAutoShutdownArgs']] = None, + default_connection: Optional[pulumi.Input['ServicePlanDefaultConnectionArgs']] = None, + default_network_subnet_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + shared_gallery_id: Optional[pulumi.Input[str]] = None, + support: Optional[pulumi.Input['ServicePlanSupportArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_regions is None and 'allowedRegions' in kwargs: + allowed_regions = kwargs['allowedRegions'] + if allowed_regions is None: + raise TypeError("Missing 'allowed_regions' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if default_auto_shutdown is None and 'defaultAutoShutdown' in kwargs: + default_auto_shutdown = kwargs['defaultAutoShutdown'] + if default_connection is None and 'defaultConnection' in kwargs: + default_connection = kwargs['defaultConnection'] + if default_network_subnet_id is None and 'defaultNetworkSubnetId' in kwargs: + default_network_subnet_id = kwargs['defaultNetworkSubnetId'] + if shared_gallery_id is None and 'sharedGalleryId' in kwargs: + shared_gallery_id = kwargs['sharedGalleryId'] + + _setter("allowed_regions", allowed_regions) + _setter("resource_group_name", resource_group_name) if default_auto_shutdown is not None: - pulumi.set(__self__, "default_auto_shutdown", default_auto_shutdown) + _setter("default_auto_shutdown", default_auto_shutdown) if default_connection is not None: - pulumi.set(__self__, "default_connection", default_connection) + _setter("default_connection", default_connection) if default_network_subnet_id is not None: - pulumi.set(__self__, "default_network_subnet_id", default_network_subnet_id) + _setter("default_network_subnet_id", default_network_subnet_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if shared_gallery_id is not None: - pulumi.set(__self__, "shared_gallery_id", shared_gallery_id) + _setter("shared_gallery_id", shared_gallery_id) if support is not None: - pulumi.set(__self__, "support", support) + _setter("support", support) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="allowedRegions") @@ -211,26 +256,67 @@ def __init__(__self__, *, :param pulumi.Input['ServicePlanSupportArgs'] support: A `support` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Lab Service Plan. """ + _ServicePlanState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_regions=allowed_regions, + default_auto_shutdown=default_auto_shutdown, + default_connection=default_connection, + default_network_subnet_id=default_network_subnet_id, + location=location, + name=name, + resource_group_name=resource_group_name, + shared_gallery_id=shared_gallery_id, + support=support, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_regions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_auto_shutdown: Optional[pulumi.Input['ServicePlanDefaultAutoShutdownArgs']] = None, + default_connection: Optional[pulumi.Input['ServicePlanDefaultConnectionArgs']] = None, + default_network_subnet_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + shared_gallery_id: Optional[pulumi.Input[str]] = None, + support: Optional[pulumi.Input['ServicePlanSupportArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_regions is None and 'allowedRegions' in kwargs: + allowed_regions = kwargs['allowedRegions'] + if default_auto_shutdown is None and 'defaultAutoShutdown' in kwargs: + default_auto_shutdown = kwargs['defaultAutoShutdown'] + if default_connection is None and 'defaultConnection' in kwargs: + default_connection = kwargs['defaultConnection'] + if default_network_subnet_id is None and 'defaultNetworkSubnetId' in kwargs: + default_network_subnet_id = kwargs['defaultNetworkSubnetId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if shared_gallery_id is None and 'sharedGalleryId' in kwargs: + shared_gallery_id = kwargs['sharedGalleryId'] + if allowed_regions is not None: - pulumi.set(__self__, "allowed_regions", allowed_regions) + _setter("allowed_regions", allowed_regions) if default_auto_shutdown is not None: - pulumi.set(__self__, "default_auto_shutdown", default_auto_shutdown) + _setter("default_auto_shutdown", default_auto_shutdown) if default_connection is not None: - pulumi.set(__self__, "default_connection", default_connection) + _setter("default_connection", default_connection) if default_network_subnet_id is not None: - pulumi.set(__self__, "default_network_subnet_id", default_network_subnet_id) + _setter("default_network_subnet_id", default_network_subnet_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if shared_gallery_id is not None: - pulumi.set(__self__, "shared_gallery_id", shared_gallery_id) + _setter("shared_gallery_id", shared_gallery_id) if support is not None: - pulumi.set(__self__, "support", support) + _setter("support", support) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="allowedRegions") @@ -454,6 +540,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServicePlanArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -481,7 +571,17 @@ def _internal_init(__self__, if allowed_regions is None and not opts.urn: raise TypeError("Missing required property 'allowed_regions'") __props__.__dict__["allowed_regions"] = allowed_regions + if default_auto_shutdown is not None and not isinstance(default_auto_shutdown, ServicePlanDefaultAutoShutdownArgs): + default_auto_shutdown = default_auto_shutdown or {} + def _setter(key, value): + default_auto_shutdown[key] = value + ServicePlanDefaultAutoShutdownArgs._configure(_setter, **default_auto_shutdown) __props__.__dict__["default_auto_shutdown"] = default_auto_shutdown + if default_connection is not None and not isinstance(default_connection, ServicePlanDefaultConnectionArgs): + default_connection = default_connection or {} + def _setter(key, value): + default_connection[key] = value + ServicePlanDefaultConnectionArgs._configure(_setter, **default_connection) __props__.__dict__["default_connection"] = default_connection __props__.__dict__["default_network_subnet_id"] = default_network_subnet_id __props__.__dict__["location"] = location @@ -490,6 +590,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["shared_gallery_id"] = shared_gallery_id + if support is not None and not isinstance(support, ServicePlanSupportArgs): + support = support or {} + def _setter(key, value): + support[key] = value + ServicePlanSupportArgs._configure(_setter, **support) __props__.__dict__["support"] = support __props__.__dict__["tags"] = tags super(ServicePlan, __self__).__init__( diff --git a/sdk/python/pulumi_azure/lab/user.py b/sdk/python/pulumi_azure/lab/user.py index 72c8cf2a6b..9b2cd66979 100644 --- a/sdk/python/pulumi_azure/lab/user.py +++ b/sdk/python/pulumi_azure/lab/user.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['UserArgs', 'User'] @@ -25,12 +25,37 @@ def __init__(__self__, *, :param pulumi.Input[str] additional_usage_quota: The amount of usage quota time the Lab Service User gets in addition to the lab usage quota. Defaults to `PT0S`. :param pulumi.Input[str] name: The name which should be used for this Lab Service User. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "email", email) - pulumi.set(__self__, "lab_id", lab_id) + UserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + lab_id=lab_id, + additional_usage_quota=additional_usage_quota, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input[str]] = None, + lab_id: Optional[pulumi.Input[str]] = None, + additional_usage_quota: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + if lab_id is None and 'labId' in kwargs: + lab_id = kwargs['labId'] + if lab_id is None: + raise TypeError("Missing 'lab_id' argument") + if additional_usage_quota is None and 'additionalUsageQuota' in kwargs: + additional_usage_quota = kwargs['additionalUsageQuota'] + + _setter("email", email) + _setter("lab_id", lab_id) if additional_usage_quota is not None: - pulumi.set(__self__, "additional_usage_quota", additional_usage_quota) + _setter("additional_usage_quota", additional_usage_quota) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -95,14 +120,35 @@ def __init__(__self__, *, :param pulumi.Input[str] lab_id: The resource ID of the Lab Service Lab. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name which should be used for this Lab Service User. Changing this forces a new resource to be created. """ + _UserState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_usage_quota=additional_usage_quota, + email=email, + lab_id=lab_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_usage_quota: Optional[pulumi.Input[str]] = None, + email: Optional[pulumi.Input[str]] = None, + lab_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_usage_quota is None and 'additionalUsageQuota' in kwargs: + additional_usage_quota = kwargs['additionalUsageQuota'] + if lab_id is None and 'labId' in kwargs: + lab_id = kwargs['labId'] + if additional_usage_quota is not None: - pulumi.set(__self__, "additional_usage_quota", additional_usage_quota) + _setter("additional_usage_quota", additional_usage_quota) if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if lab_id is not None: - pulumi.set(__self__, "lab_id", lab_id) + _setter("lab_id", lab_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="additionalUsageQuota") @@ -278,6 +324,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + UserArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/lb/_inputs.py b/sdk/python/pulumi_azure/lb/_inputs.py index bfbb39247c..8bc94d0df6 100644 --- a/sdk/python/pulumi_azure/lb/_inputs.py +++ b/sdk/python/pulumi_azure/lb/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -27,12 +27,33 @@ def __init__(__self__, *, :param pulumi.Input[int] frontend_port: The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. :param pulumi.Input[str] inbound_nat_rule_name: The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. """ + BackendAddressPoolAddressInboundNatRulePortMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + frontend_port=frontend_port, + inbound_nat_rule_name=inbound_nat_rule_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[pulumi.Input[int]] = None, + frontend_port: Optional[pulumi.Input[int]] = None, + inbound_nat_rule_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if frontend_port is None and 'frontendPort' in kwargs: + frontend_port = kwargs['frontendPort'] + if inbound_nat_rule_name is None and 'inboundNatRuleName' in kwargs: + inbound_nat_rule_name = kwargs['inboundNatRuleName'] + if backend_port is not None: - pulumi.set(__self__, "backend_port", backend_port) + _setter("backend_port", backend_port) if frontend_port is not None: - pulumi.set(__self__, "frontend_port", frontend_port) + _setter("frontend_port", frontend_port) if inbound_nat_rule_name is not None: - pulumi.set(__self__, "inbound_nat_rule_name", inbound_nat_rule_name) + _setter("inbound_nat_rule_name", inbound_nat_rule_name) @property @pulumi.getter(name="backendPort") @@ -84,10 +105,35 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol: The protocol used for this Gateway Lodbalancer Tunnel Interface. Possible values are `None`, `Native` and `VXLAN`. :param pulumi.Input[str] type: The traffic type of this Gateway Lodbalancer Tunnel Interface. Possible values are `None`, `Internal` and `External`. """ - pulumi.set(__self__, "identifier", identifier) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "type", type) + BackendAddressPoolTunnelInterfaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identifier=identifier, + port=port, + protocol=protocol, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identifier: Optional[pulumi.Input[int]] = None, + port: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identifier is None: + raise TypeError("Missing 'identifier' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identifier", identifier) + _setter("port", port) + _setter("protocol", protocol) + _setter("type", type) @property @pulumi.getter @@ -171,31 +217,88 @@ def __init__(__self__, *, > **NOTE:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/load-balancer/load-balancer-standard-availability-zones) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. """ - pulumi.set(__self__, "name", name) + LoadBalancerFrontendIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + gateway_load_balancer_frontend_ip_configuration_id=gateway_load_balancer_frontend_ip_configuration_id, + id=id, + inbound_nat_rules=inbound_nat_rules, + load_balancer_rules=load_balancer_rules, + outbound_rules=outbound_rules, + private_ip_address=private_ip_address, + private_ip_address_allocation=private_ip_address_allocation, + private_ip_address_version=private_ip_address_version, + public_ip_address_id=public_ip_address_id, + public_ip_prefix_id=public_ip_prefix_id, + subnet_id=subnet_id, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + gateway_load_balancer_frontend_ip_configuration_id: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + inbound_nat_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + load_balancer_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + outbound_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + private_ip_address_allocation: Optional[pulumi.Input[str]] = None, + private_ip_address_version: Optional[pulumi.Input[str]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + public_ip_prefix_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if gateway_load_balancer_frontend_ip_configuration_id is None and 'gatewayLoadBalancerFrontendIpConfigurationId' in kwargs: + gateway_load_balancer_frontend_ip_configuration_id = kwargs['gatewayLoadBalancerFrontendIpConfigurationId'] + if inbound_nat_rules is None and 'inboundNatRules' in kwargs: + inbound_nat_rules = kwargs['inboundNatRules'] + if load_balancer_rules is None and 'loadBalancerRules' in kwargs: + load_balancer_rules = kwargs['loadBalancerRules'] + if outbound_rules is None and 'outboundRules' in kwargs: + outbound_rules = kwargs['outboundRules'] + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + if private_ip_address_version is None and 'privateIpAddressVersion' in kwargs: + private_ip_address_version = kwargs['privateIpAddressVersion'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) if gateway_load_balancer_frontend_ip_configuration_id is not None: - pulumi.set(__self__, "gateway_load_balancer_frontend_ip_configuration_id", gateway_load_balancer_frontend_ip_configuration_id) + _setter("gateway_load_balancer_frontend_ip_configuration_id", gateway_load_balancer_frontend_ip_configuration_id) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if inbound_nat_rules is not None: - pulumi.set(__self__, "inbound_nat_rules", inbound_nat_rules) + _setter("inbound_nat_rules", inbound_nat_rules) if load_balancer_rules is not None: - pulumi.set(__self__, "load_balancer_rules", load_balancer_rules) + _setter("load_balancer_rules", load_balancer_rules) if outbound_rules is not None: - pulumi.set(__self__, "outbound_rules", outbound_rules) + _setter("outbound_rules", outbound_rules) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_address_allocation is not None: - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) + _setter("private_ip_address_allocation", private_ip_address_allocation) if private_ip_address_version is not None: - pulumi.set(__self__, "private_ip_address_version", private_ip_address_version) + _setter("private_ip_address_version", private_ip_address_version) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if public_ip_prefix_id is not None: - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) + _setter("public_ip_prefix_id", public_ip_prefix_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -365,9 +468,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Frontend IP Configuration. :param pulumi.Input[str] id: The ID of the Load Balancer Outbound Rule. """ - pulumi.set(__self__, "name", name) + OutboundRuleFrontendIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/lb/backend_address_pool.py b/sdk/python/pulumi_azure/lb/backend_address_pool.py index 29ec8f7b03..a9f2895bca 100644 --- a/sdk/python/pulumi_azure/lb/backend_address_pool.py +++ b/sdk/python/pulumi_azure/lb/backend_address_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,13 +27,38 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['BackendAddressPoolTunnelInterfaceArgs']]] tunnel_interfaces: One or more `tunnel_interface` blocks as defined below. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network within which the Backend Address Pool should exist. """ - pulumi.set(__self__, "loadbalancer_id", loadbalancer_id) + BackendAddressPoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + loadbalancer_id=loadbalancer_id, + name=name, + tunnel_interfaces=tunnel_interfaces, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + loadbalancer_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tunnel_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['BackendAddressPoolTunnelInterfaceArgs']]]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if loadbalancer_id is None and 'loadbalancerId' in kwargs: + loadbalancer_id = kwargs['loadbalancerId'] + if loadbalancer_id is None: + raise TypeError("Missing 'loadbalancer_id' argument") + if tunnel_interfaces is None and 'tunnelInterfaces' in kwargs: + tunnel_interfaces = kwargs['tunnelInterfaces'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("loadbalancer_id", loadbalancer_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tunnel_interfaces is not None: - pulumi.set(__self__, "tunnel_interfaces", tunnel_interfaces) + _setter("tunnel_interfaces", tunnel_interfaces) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="loadbalancerId") @@ -106,22 +131,61 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['BackendAddressPoolTunnelInterfaceArgs']]] tunnel_interfaces: One or more `tunnel_interface` blocks as defined below. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network within which the Backend Address Pool should exist. """ + _BackendAddressPoolState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_ip_configurations=backend_ip_configurations, + inbound_nat_rules=inbound_nat_rules, + load_balancing_rules=load_balancing_rules, + loadbalancer_id=loadbalancer_id, + name=name, + outbound_rules=outbound_rules, + tunnel_interfaces=tunnel_interfaces, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + inbound_nat_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + load_balancing_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + loadbalancer_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tunnel_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['BackendAddressPoolTunnelInterfaceArgs']]]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_ip_configurations is None and 'backendIpConfigurations' in kwargs: + backend_ip_configurations = kwargs['backendIpConfigurations'] + if inbound_nat_rules is None and 'inboundNatRules' in kwargs: + inbound_nat_rules = kwargs['inboundNatRules'] + if load_balancing_rules is None and 'loadBalancingRules' in kwargs: + load_balancing_rules = kwargs['loadBalancingRules'] + if loadbalancer_id is None and 'loadbalancerId' in kwargs: + loadbalancer_id = kwargs['loadbalancerId'] + if outbound_rules is None and 'outboundRules' in kwargs: + outbound_rules = kwargs['outboundRules'] + if tunnel_interfaces is None and 'tunnelInterfaces' in kwargs: + tunnel_interfaces = kwargs['tunnelInterfaces'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if backend_ip_configurations is not None: - pulumi.set(__self__, "backend_ip_configurations", backend_ip_configurations) + _setter("backend_ip_configurations", backend_ip_configurations) if inbound_nat_rules is not None: - pulumi.set(__self__, "inbound_nat_rules", inbound_nat_rules) + _setter("inbound_nat_rules", inbound_nat_rules) if load_balancing_rules is not None: - pulumi.set(__self__, "load_balancing_rules", load_balancing_rules) + _setter("load_balancing_rules", load_balancing_rules) if loadbalancer_id is not None: - pulumi.set(__self__, "loadbalancer_id", loadbalancer_id) + _setter("loadbalancer_id", loadbalancer_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_rules is not None: - pulumi.set(__self__, "outbound_rules", outbound_rules) + _setter("outbound_rules", outbound_rules) if tunnel_interfaces is not None: - pulumi.set(__self__, "tunnel_interfaces", tunnel_interfaces) + _setter("tunnel_interfaces", tunnel_interfaces) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="backendIpConfigurations") @@ -321,6 +385,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BackendAddressPoolArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/lb/backend_address_pool_address.py b/sdk/python/pulumi_azure/lb/backend_address_pool_address.py index dffd775df7..62fdaa7b20 100644 --- a/sdk/python/pulumi_azure/lb/backend_address_pool_address.py +++ b/sdk/python/pulumi_azure/lb/backend_address_pool_address.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,15 +31,44 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Backend Address Pool Address. Changing this forces a new Backend Address Pool Address to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network within which the Backend Address Pool should exist. """ - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) + BackendAddressPoolAddressArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_address_pool_id=backend_address_pool_id, + backend_address_ip_configuration_id=backend_address_ip_configuration_id, + ip_address=ip_address, + name=name, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_address_pool_id: Optional[pulumi.Input[str]] = None, + backend_address_ip_configuration_id: Optional[pulumi.Input[str]] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if backend_address_pool_id is None: + raise TypeError("Missing 'backend_address_pool_id' argument") + if backend_address_ip_configuration_id is None and 'backendAddressIpConfigurationId' in kwargs: + backend_address_ip_configuration_id = kwargs['backendAddressIpConfigurationId'] + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + + _setter("backend_address_pool_id", backend_address_pool_id) if backend_address_ip_configuration_id is not None: - pulumi.set(__self__, "backend_address_ip_configuration_id", backend_address_ip_configuration_id) + _setter("backend_address_ip_configuration_id", backend_address_ip_configuration_id) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="backendAddressPoolId") @@ -124,18 +153,49 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Backend Address Pool Address. Changing this forces a new Backend Address Pool Address to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network within which the Backend Address Pool should exist. """ + _BackendAddressPoolAddressState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_address_ip_configuration_id=backend_address_ip_configuration_id, + backend_address_pool_id=backend_address_pool_id, + inbound_nat_rule_port_mappings=inbound_nat_rule_port_mappings, + ip_address=ip_address, + name=name, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_address_ip_configuration_id: Optional[pulumi.Input[str]] = None, + backend_address_pool_id: Optional[pulumi.Input[str]] = None, + inbound_nat_rule_port_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['BackendAddressPoolAddressInboundNatRulePortMappingArgs']]]] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_address_ip_configuration_id is None and 'backendAddressIpConfigurationId' in kwargs: + backend_address_ip_configuration_id = kwargs['backendAddressIpConfigurationId'] + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if inbound_nat_rule_port_mappings is None and 'inboundNatRulePortMappings' in kwargs: + inbound_nat_rule_port_mappings = kwargs['inboundNatRulePortMappings'] + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if backend_address_ip_configuration_id is not None: - pulumi.set(__self__, "backend_address_ip_configuration_id", backend_address_ip_configuration_id) + _setter("backend_address_ip_configuration_id", backend_address_ip_configuration_id) if backend_address_pool_id is not None: - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) + _setter("backend_address_pool_id", backend_address_pool_id) if inbound_nat_rule_port_mappings is not None: - pulumi.set(__self__, "inbound_nat_rule_port_mappings", inbound_nat_rule_port_mappings) + _setter("inbound_nat_rule_port_mappings", inbound_nat_rule_port_mappings) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="backendAddressIpConfigurationId") @@ -327,6 +387,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BackendAddressPoolAddressArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/lb/get_backend_address_pool.py b/sdk/python/pulumi_azure/lb/get_backend_address_pool.py index a65732b9bf..4f79ef2089 100644 --- a/sdk/python/pulumi_azure/lb/get_backend_address_pool.py +++ b/sdk/python/pulumi_azure/lb/get_backend_address_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/lb/get_lb.py b/sdk/python/pulumi_azure/lb/get_lb.py index f408e9cf5a..f39f95ac2d 100644 --- a/sdk/python/pulumi_azure/lb/get_lb.py +++ b/sdk/python/pulumi_azure/lb/get_lb.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/lb/get_lb_outbound_rule.py b/sdk/python/pulumi_azure/lb/get_lb_outbound_rule.py index ecacfc55d0..8c2c3204d2 100644 --- a/sdk/python/pulumi_azure/lb/get_lb_outbound_rule.py +++ b/sdk/python/pulumi_azure/lb/get_lb_outbound_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/lb/get_lb_rule.py b/sdk/python/pulumi_azure/lb/get_lb_rule.py index 80eb598872..9757d23d00 100644 --- a/sdk/python/pulumi_azure/lb/get_lb_rule.py +++ b/sdk/python/pulumi_azure/lb/get_lb_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/lb/load_balancer.py b/sdk/python/pulumi_azure/lb/load_balancer.py index a03328646b..e06f581dad 100644 --- a/sdk/python/pulumi_azure/lb/load_balancer.py +++ b/sdk/python/pulumi_azure/lb/load_balancer.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,21 +37,56 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_tier: `sku_tier` - (Optional) The SKU tier of this Load Balancer. Possible values are `Global` and `Regional`. Defaults to `Regional`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + LoadBalancerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + edge_zone=edge_zone, + frontend_ip_configurations=frontend_ip_configurations, + location=location, + name=name, + sku=sku, + sku_tier=sku_tier, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + frontend_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['LoadBalancerFrontendIpConfigurationArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + sku_tier: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if frontend_ip_configurations is None and 'frontendIpConfigurations' in kwargs: + frontend_ip_configurations = kwargs['frontendIpConfigurations'] + if sku_tier is None and 'skuTier' in kwargs: + sku_tier = kwargs['skuTier'] + + _setter("resource_group_name", resource_group_name) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if frontend_ip_configurations is not None: - pulumi.set(__self__, "frontend_ip_configurations", frontend_ip_configurations) + _setter("frontend_ip_configurations", frontend_ip_configurations) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if sku_tier is not None: - pulumi.set(__self__, "sku_tier", sku_tier) + _setter("sku_tier", sku_tier) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -180,26 +215,67 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_tier: `sku_tier` - (Optional) The SKU tier of this Load Balancer. Possible values are `Global` and `Regional`. Defaults to `Regional`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _LoadBalancerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + edge_zone=edge_zone, + frontend_ip_configurations=frontend_ip_configurations, + location=location, + name=name, + private_ip_address=private_ip_address, + private_ip_addresses=private_ip_addresses, + resource_group_name=resource_group_name, + sku=sku, + sku_tier=sku_tier, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + edge_zone: Optional[pulumi.Input[str]] = None, + frontend_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['LoadBalancerFrontendIpConfigurationArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + private_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + sku_tier: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if frontend_ip_configurations is None and 'frontendIpConfigurations' in kwargs: + frontend_ip_configurations = kwargs['frontendIpConfigurations'] + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_addresses is None and 'privateIpAddresses' in kwargs: + private_ip_addresses = kwargs['privateIpAddresses'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_tier is None and 'skuTier' in kwargs: + sku_tier = kwargs['skuTier'] + if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if frontend_ip_configurations is not None: - pulumi.set(__self__, "frontend_ip_configurations", frontend_ip_configurations) + _setter("frontend_ip_configurations", frontend_ip_configurations) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_addresses is not None: - pulumi.set(__self__, "private_ip_addresses", private_ip_addresses) + _setter("private_ip_addresses", private_ip_addresses) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if sku_tier is not None: - pulumi.set(__self__, "sku_tier", sku_tier) + _setter("sku_tier", sku_tier) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="edgeZone") @@ -429,6 +505,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LoadBalancerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/lb/nat_pool.py b/sdk/python/pulumi_azure/lb/nat_pool.py index b662bca6c3..793fd33a92 100644 --- a/sdk/python/pulumi_azure/lb/nat_pool.py +++ b/sdk/python/pulumi_azure/lb/nat_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NatPoolArgs', 'NatPool'] @@ -39,21 +39,84 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the NAT pool. Changing this forces a new resource to be created. :param pulumi.Input[bool] tcp_reset_enabled: Is TCP Reset enabled for this Load Balancer Rule? """ - pulumi.set(__self__, "backend_port", backend_port) - pulumi.set(__self__, "frontend_ip_configuration_name", frontend_ip_configuration_name) - pulumi.set(__self__, "frontend_port_end", frontend_port_end) - pulumi.set(__self__, "frontend_port_start", frontend_port_start) - pulumi.set(__self__, "loadbalancer_id", loadbalancer_id) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "resource_group_name", resource_group_name) + NatPoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + frontend_ip_configuration_name=frontend_ip_configuration_name, + frontend_port_end=frontend_port_end, + frontend_port_start=frontend_port_start, + loadbalancer_id=loadbalancer_id, + protocol=protocol, + resource_group_name=resource_group_name, + floating_ip_enabled=floating_ip_enabled, + idle_timeout_in_minutes=idle_timeout_in_minutes, + name=name, + tcp_reset_enabled=tcp_reset_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[pulumi.Input[int]] = None, + frontend_ip_configuration_name: Optional[pulumi.Input[str]] = None, + frontend_port_end: Optional[pulumi.Input[int]] = None, + frontend_port_start: Optional[pulumi.Input[int]] = None, + loadbalancer_id: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + floating_ip_enabled: Optional[pulumi.Input[bool]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + tcp_reset_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if backend_port is None: + raise TypeError("Missing 'backend_port' argument") + if frontend_ip_configuration_name is None and 'frontendIpConfigurationName' in kwargs: + frontend_ip_configuration_name = kwargs['frontendIpConfigurationName'] + if frontend_ip_configuration_name is None: + raise TypeError("Missing 'frontend_ip_configuration_name' argument") + if frontend_port_end is None and 'frontendPortEnd' in kwargs: + frontend_port_end = kwargs['frontendPortEnd'] + if frontend_port_end is None: + raise TypeError("Missing 'frontend_port_end' argument") + if frontend_port_start is None and 'frontendPortStart' in kwargs: + frontend_port_start = kwargs['frontendPortStart'] + if frontend_port_start is None: + raise TypeError("Missing 'frontend_port_start' argument") + if loadbalancer_id is None and 'loadbalancerId' in kwargs: + loadbalancer_id = kwargs['loadbalancerId'] + if loadbalancer_id is None: + raise TypeError("Missing 'loadbalancer_id' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if floating_ip_enabled is None and 'floatingIpEnabled' in kwargs: + floating_ip_enabled = kwargs['floatingIpEnabled'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if tcp_reset_enabled is None and 'tcpResetEnabled' in kwargs: + tcp_reset_enabled = kwargs['tcpResetEnabled'] + + _setter("backend_port", backend_port) + _setter("frontend_ip_configuration_name", frontend_ip_configuration_name) + _setter("frontend_port_end", frontend_port_end) + _setter("frontend_port_start", frontend_port_start) + _setter("loadbalancer_id", loadbalancer_id) + _setter("protocol", protocol) + _setter("resource_group_name", resource_group_name) if floating_ip_enabled is not None: - pulumi.set(__self__, "floating_ip_enabled", floating_ip_enabled) + _setter("floating_ip_enabled", floating_ip_enabled) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tcp_reset_enabled is not None: - pulumi.set(__self__, "tcp_reset_enabled", tcp_reset_enabled) + _setter("tcp_reset_enabled", tcp_reset_enabled) @property @pulumi.getter(name="backendPort") @@ -217,30 +280,83 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the resource. Changing this forces a new resource to be created. :param pulumi.Input[bool] tcp_reset_enabled: Is TCP Reset enabled for this Load Balancer Rule? """ + _NatPoolState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + floating_ip_enabled=floating_ip_enabled, + frontend_ip_configuration_id=frontend_ip_configuration_id, + frontend_ip_configuration_name=frontend_ip_configuration_name, + frontend_port_end=frontend_port_end, + frontend_port_start=frontend_port_start, + idle_timeout_in_minutes=idle_timeout_in_minutes, + loadbalancer_id=loadbalancer_id, + name=name, + protocol=protocol, + resource_group_name=resource_group_name, + tcp_reset_enabled=tcp_reset_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[pulumi.Input[int]] = None, + floating_ip_enabled: Optional[pulumi.Input[bool]] = None, + frontend_ip_configuration_id: Optional[pulumi.Input[str]] = None, + frontend_ip_configuration_name: Optional[pulumi.Input[str]] = None, + frontend_port_end: Optional[pulumi.Input[int]] = None, + frontend_port_start: Optional[pulumi.Input[int]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + loadbalancer_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tcp_reset_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if floating_ip_enabled is None and 'floatingIpEnabled' in kwargs: + floating_ip_enabled = kwargs['floatingIpEnabled'] + if frontend_ip_configuration_id is None and 'frontendIpConfigurationId' in kwargs: + frontend_ip_configuration_id = kwargs['frontendIpConfigurationId'] + if frontend_ip_configuration_name is None and 'frontendIpConfigurationName' in kwargs: + frontend_ip_configuration_name = kwargs['frontendIpConfigurationName'] + if frontend_port_end is None and 'frontendPortEnd' in kwargs: + frontend_port_end = kwargs['frontendPortEnd'] + if frontend_port_start is None and 'frontendPortStart' in kwargs: + frontend_port_start = kwargs['frontendPortStart'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if loadbalancer_id is None and 'loadbalancerId' in kwargs: + loadbalancer_id = kwargs['loadbalancerId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if tcp_reset_enabled is None and 'tcpResetEnabled' in kwargs: + tcp_reset_enabled = kwargs['tcpResetEnabled'] + if backend_port is not None: - pulumi.set(__self__, "backend_port", backend_port) + _setter("backend_port", backend_port) if floating_ip_enabled is not None: - pulumi.set(__self__, "floating_ip_enabled", floating_ip_enabled) + _setter("floating_ip_enabled", floating_ip_enabled) if frontend_ip_configuration_id is not None: - pulumi.set(__self__, "frontend_ip_configuration_id", frontend_ip_configuration_id) + _setter("frontend_ip_configuration_id", frontend_ip_configuration_id) if frontend_ip_configuration_name is not None: - pulumi.set(__self__, "frontend_ip_configuration_name", frontend_ip_configuration_name) + _setter("frontend_ip_configuration_name", frontend_ip_configuration_name) if frontend_port_end is not None: - pulumi.set(__self__, "frontend_port_end", frontend_port_end) + _setter("frontend_port_end", frontend_port_end) if frontend_port_start is not None: - pulumi.set(__self__, "frontend_port_start", frontend_port_start) + _setter("frontend_port_start", frontend_port_start) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if loadbalancer_id is not None: - pulumi.set(__self__, "loadbalancer_id", loadbalancer_id) + _setter("loadbalancer_id", loadbalancer_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tcp_reset_enabled is not None: - pulumi.set(__self__, "tcp_reset_enabled", tcp_reset_enabled) + _setter("tcp_reset_enabled", tcp_reset_enabled) @property @pulumi.getter(name="backendPort") @@ -517,6 +633,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NatPoolArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/lb/nat_rule.py b/sdk/python/pulumi_azure/lb/nat_rule.py index 3f4ef18dc0..dd9a6b5f23 100644 --- a/sdk/python/pulumi_azure/lb/nat_rule.py +++ b/sdk/python/pulumi_azure/lb/nat_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NatRuleArgs', 'NatRule'] @@ -43,27 +43,94 @@ def __init__(__self__, *, :param pulumi.Input[int] idle_timeout_in_minutes: Specifies the idle timeout in minutes for TCP connections. Valid values are between `4` and `30` minutes. Defaults to `4` minutes. :param pulumi.Input[str] name: Specifies the name of the NAT Rule. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "backend_port", backend_port) - pulumi.set(__self__, "frontend_ip_configuration_name", frontend_ip_configuration_name) - pulumi.set(__self__, "loadbalancer_id", loadbalancer_id) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "resource_group_name", resource_group_name) + NatRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + frontend_ip_configuration_name=frontend_ip_configuration_name, + loadbalancer_id=loadbalancer_id, + protocol=protocol, + resource_group_name=resource_group_name, + backend_address_pool_id=backend_address_pool_id, + enable_floating_ip=enable_floating_ip, + enable_tcp_reset=enable_tcp_reset, + frontend_port=frontend_port, + frontend_port_end=frontend_port_end, + frontend_port_start=frontend_port_start, + idle_timeout_in_minutes=idle_timeout_in_minutes, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[pulumi.Input[int]] = None, + frontend_ip_configuration_name: Optional[pulumi.Input[str]] = None, + loadbalancer_id: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + backend_address_pool_id: Optional[pulumi.Input[str]] = None, + enable_floating_ip: Optional[pulumi.Input[bool]] = None, + enable_tcp_reset: Optional[pulumi.Input[bool]] = None, + frontend_port: Optional[pulumi.Input[int]] = None, + frontend_port_end: Optional[pulumi.Input[int]] = None, + frontend_port_start: Optional[pulumi.Input[int]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if backend_port is None: + raise TypeError("Missing 'backend_port' argument") + if frontend_ip_configuration_name is None and 'frontendIpConfigurationName' in kwargs: + frontend_ip_configuration_name = kwargs['frontendIpConfigurationName'] + if frontend_ip_configuration_name is None: + raise TypeError("Missing 'frontend_ip_configuration_name' argument") + if loadbalancer_id is None and 'loadbalancerId' in kwargs: + loadbalancer_id = kwargs['loadbalancerId'] + if loadbalancer_id is None: + raise TypeError("Missing 'loadbalancer_id' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if enable_floating_ip is None and 'enableFloatingIp' in kwargs: + enable_floating_ip = kwargs['enableFloatingIp'] + if enable_tcp_reset is None and 'enableTcpReset' in kwargs: + enable_tcp_reset = kwargs['enableTcpReset'] + if frontend_port is None and 'frontendPort' in kwargs: + frontend_port = kwargs['frontendPort'] + if frontend_port_end is None and 'frontendPortEnd' in kwargs: + frontend_port_end = kwargs['frontendPortEnd'] + if frontend_port_start is None and 'frontendPortStart' in kwargs: + frontend_port_start = kwargs['frontendPortStart'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + + _setter("backend_port", backend_port) + _setter("frontend_ip_configuration_name", frontend_ip_configuration_name) + _setter("loadbalancer_id", loadbalancer_id) + _setter("protocol", protocol) + _setter("resource_group_name", resource_group_name) if backend_address_pool_id is not None: - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) + _setter("backend_address_pool_id", backend_address_pool_id) if enable_floating_ip is not None: - pulumi.set(__self__, "enable_floating_ip", enable_floating_ip) + _setter("enable_floating_ip", enable_floating_ip) if enable_tcp_reset is not None: - pulumi.set(__self__, "enable_tcp_reset", enable_tcp_reset) + _setter("enable_tcp_reset", enable_tcp_reset) if frontend_port is not None: - pulumi.set(__self__, "frontend_port", frontend_port) + _setter("frontend_port", frontend_port) if frontend_port_end is not None: - pulumi.set(__self__, "frontend_port_end", frontend_port_end) + _setter("frontend_port_end", frontend_port_end) if frontend_port_start is not None: - pulumi.set(__self__, "frontend_port_start", frontend_port_start) + _setter("frontend_port_start", frontend_port_start) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="backendPort") @@ -256,36 +323,101 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol: The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the resource. Changing this forces a new resource to be created. """ + _NatRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_address_pool_id=backend_address_pool_id, + backend_ip_configuration_id=backend_ip_configuration_id, + backend_port=backend_port, + enable_floating_ip=enable_floating_ip, + enable_tcp_reset=enable_tcp_reset, + frontend_ip_configuration_id=frontend_ip_configuration_id, + frontend_ip_configuration_name=frontend_ip_configuration_name, + frontend_port=frontend_port, + frontend_port_end=frontend_port_end, + frontend_port_start=frontend_port_start, + idle_timeout_in_minutes=idle_timeout_in_minutes, + loadbalancer_id=loadbalancer_id, + name=name, + protocol=protocol, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_address_pool_id: Optional[pulumi.Input[str]] = None, + backend_ip_configuration_id: Optional[pulumi.Input[str]] = None, + backend_port: Optional[pulumi.Input[int]] = None, + enable_floating_ip: Optional[pulumi.Input[bool]] = None, + enable_tcp_reset: Optional[pulumi.Input[bool]] = None, + frontend_ip_configuration_id: Optional[pulumi.Input[str]] = None, + frontend_ip_configuration_name: Optional[pulumi.Input[str]] = None, + frontend_port: Optional[pulumi.Input[int]] = None, + frontend_port_end: Optional[pulumi.Input[int]] = None, + frontend_port_start: Optional[pulumi.Input[int]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + loadbalancer_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if backend_ip_configuration_id is None and 'backendIpConfigurationId' in kwargs: + backend_ip_configuration_id = kwargs['backendIpConfigurationId'] + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if enable_floating_ip is None and 'enableFloatingIp' in kwargs: + enable_floating_ip = kwargs['enableFloatingIp'] + if enable_tcp_reset is None and 'enableTcpReset' in kwargs: + enable_tcp_reset = kwargs['enableTcpReset'] + if frontend_ip_configuration_id is None and 'frontendIpConfigurationId' in kwargs: + frontend_ip_configuration_id = kwargs['frontendIpConfigurationId'] + if frontend_ip_configuration_name is None and 'frontendIpConfigurationName' in kwargs: + frontend_ip_configuration_name = kwargs['frontendIpConfigurationName'] + if frontend_port is None and 'frontendPort' in kwargs: + frontend_port = kwargs['frontendPort'] + if frontend_port_end is None and 'frontendPortEnd' in kwargs: + frontend_port_end = kwargs['frontendPortEnd'] + if frontend_port_start is None and 'frontendPortStart' in kwargs: + frontend_port_start = kwargs['frontendPortStart'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if loadbalancer_id is None and 'loadbalancerId' in kwargs: + loadbalancer_id = kwargs['loadbalancerId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if backend_address_pool_id is not None: - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) + _setter("backend_address_pool_id", backend_address_pool_id) if backend_ip_configuration_id is not None: - pulumi.set(__self__, "backend_ip_configuration_id", backend_ip_configuration_id) + _setter("backend_ip_configuration_id", backend_ip_configuration_id) if backend_port is not None: - pulumi.set(__self__, "backend_port", backend_port) + _setter("backend_port", backend_port) if enable_floating_ip is not None: - pulumi.set(__self__, "enable_floating_ip", enable_floating_ip) + _setter("enable_floating_ip", enable_floating_ip) if enable_tcp_reset is not None: - pulumi.set(__self__, "enable_tcp_reset", enable_tcp_reset) + _setter("enable_tcp_reset", enable_tcp_reset) if frontend_ip_configuration_id is not None: - pulumi.set(__self__, "frontend_ip_configuration_id", frontend_ip_configuration_id) + _setter("frontend_ip_configuration_id", frontend_ip_configuration_id) if frontend_ip_configuration_name is not None: - pulumi.set(__self__, "frontend_ip_configuration_name", frontend_ip_configuration_name) + _setter("frontend_ip_configuration_name", frontend_ip_configuration_name) if frontend_port is not None: - pulumi.set(__self__, "frontend_port", frontend_port) + _setter("frontend_port", frontend_port) if frontend_port_end is not None: - pulumi.set(__self__, "frontend_port_end", frontend_port_end) + _setter("frontend_port_end", frontend_port_end) if frontend_port_start is not None: - pulumi.set(__self__, "frontend_port_start", frontend_port_start) + _setter("frontend_port_start", frontend_port_start) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if loadbalancer_id is not None: - pulumi.set(__self__, "loadbalancer_id", loadbalancer_id) + _setter("loadbalancer_id", loadbalancer_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="backendAddressPoolId") @@ -543,6 +675,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NatRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/lb/outbound_rule.py b/sdk/python/pulumi_azure/lb/outbound_rule.py index a2bd0e7b64..f50412dcfe 100644 --- a/sdk/python/pulumi_azure/lb/outbound_rule.py +++ b/sdk/python/pulumi_azure/lb/outbound_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,19 +35,62 @@ def __init__(__self__, *, :param pulumi.Input[int] idle_timeout_in_minutes: The timeout for the TCP idle connection Defaults to `4`. :param pulumi.Input[str] name: Specifies the name of the Outbound Rule. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) - pulumi.set(__self__, "loadbalancer_id", loadbalancer_id) - pulumi.set(__self__, "protocol", protocol) + OutboundRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_address_pool_id=backend_address_pool_id, + loadbalancer_id=loadbalancer_id, + protocol=protocol, + allocated_outbound_ports=allocated_outbound_ports, + enable_tcp_reset=enable_tcp_reset, + frontend_ip_configurations=frontend_ip_configurations, + idle_timeout_in_minutes=idle_timeout_in_minutes, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_address_pool_id: Optional[pulumi.Input[str]] = None, + loadbalancer_id: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + allocated_outbound_ports: Optional[pulumi.Input[int]] = None, + enable_tcp_reset: Optional[pulumi.Input[bool]] = None, + frontend_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['OutboundRuleFrontendIpConfigurationArgs']]]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if backend_address_pool_id is None: + raise TypeError("Missing 'backend_address_pool_id' argument") + if loadbalancer_id is None and 'loadbalancerId' in kwargs: + loadbalancer_id = kwargs['loadbalancerId'] + if loadbalancer_id is None: + raise TypeError("Missing 'loadbalancer_id' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if allocated_outbound_ports is None and 'allocatedOutboundPorts' in kwargs: + allocated_outbound_ports = kwargs['allocatedOutboundPorts'] + if enable_tcp_reset is None and 'enableTcpReset' in kwargs: + enable_tcp_reset = kwargs['enableTcpReset'] + if frontend_ip_configurations is None and 'frontendIpConfigurations' in kwargs: + frontend_ip_configurations = kwargs['frontendIpConfigurations'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + + _setter("backend_address_pool_id", backend_address_pool_id) + _setter("loadbalancer_id", loadbalancer_id) + _setter("protocol", protocol) if allocated_outbound_ports is not None: - pulumi.set(__self__, "allocated_outbound_ports", allocated_outbound_ports) + _setter("allocated_outbound_ports", allocated_outbound_ports) if enable_tcp_reset is not None: - pulumi.set(__self__, "enable_tcp_reset", enable_tcp_reset) + _setter("enable_tcp_reset", enable_tcp_reset) if frontend_ip_configurations is not None: - pulumi.set(__self__, "frontend_ip_configurations", frontend_ip_configurations) + _setter("frontend_ip_configurations", frontend_ip_configurations) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="backendAddressPoolId") @@ -168,22 +211,59 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Outbound Rule. Changing this forces a new resource to be created. :param pulumi.Input[str] protocol: The transport protocol for the external endpoint. Possible values are `Udp`, `Tcp` or `All`. """ + _OutboundRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allocated_outbound_ports=allocated_outbound_ports, + backend_address_pool_id=backend_address_pool_id, + enable_tcp_reset=enable_tcp_reset, + frontend_ip_configurations=frontend_ip_configurations, + idle_timeout_in_minutes=idle_timeout_in_minutes, + loadbalancer_id=loadbalancer_id, + name=name, + protocol=protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allocated_outbound_ports: Optional[pulumi.Input[int]] = None, + backend_address_pool_id: Optional[pulumi.Input[str]] = None, + enable_tcp_reset: Optional[pulumi.Input[bool]] = None, + frontend_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['OutboundRuleFrontendIpConfigurationArgs']]]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + loadbalancer_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allocated_outbound_ports is None and 'allocatedOutboundPorts' in kwargs: + allocated_outbound_ports = kwargs['allocatedOutboundPorts'] + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if enable_tcp_reset is None and 'enableTcpReset' in kwargs: + enable_tcp_reset = kwargs['enableTcpReset'] + if frontend_ip_configurations is None and 'frontendIpConfigurations' in kwargs: + frontend_ip_configurations = kwargs['frontendIpConfigurations'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if loadbalancer_id is None and 'loadbalancerId' in kwargs: + loadbalancer_id = kwargs['loadbalancerId'] + if allocated_outbound_ports is not None: - pulumi.set(__self__, "allocated_outbound_ports", allocated_outbound_ports) + _setter("allocated_outbound_ports", allocated_outbound_ports) if backend_address_pool_id is not None: - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) + _setter("backend_address_pool_id", backend_address_pool_id) if enable_tcp_reset is not None: - pulumi.set(__self__, "enable_tcp_reset", enable_tcp_reset) + _setter("enable_tcp_reset", enable_tcp_reset) if frontend_ip_configurations is not None: - pulumi.set(__self__, "frontend_ip_configurations", frontend_ip_configurations) + _setter("frontend_ip_configurations", frontend_ip_configurations) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if loadbalancer_id is not None: - pulumi.set(__self__, "loadbalancer_id", loadbalancer_id) + _setter("loadbalancer_id", loadbalancer_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) @property @pulumi.getter(name="allocatedOutboundPorts") @@ -405,6 +485,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OutboundRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/lb/outputs.py b/sdk/python/pulumi_azure/lb/outputs.py index 0698d82f43..c5af27c166 100644 --- a/sdk/python/pulumi_azure/lb/outputs.py +++ b/sdk/python/pulumi_azure/lb/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -54,12 +54,33 @@ def __init__(__self__, *, :param int frontend_port: The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. :param str inbound_nat_rule_name: The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. """ + BackendAddressPoolAddressInboundNatRulePortMapping._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + frontend_port=frontend_port, + inbound_nat_rule_name=inbound_nat_rule_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[int] = None, + frontend_port: Optional[int] = None, + inbound_nat_rule_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if frontend_port is None and 'frontendPort' in kwargs: + frontend_port = kwargs['frontendPort'] + if inbound_nat_rule_name is None and 'inboundNatRuleName' in kwargs: + inbound_nat_rule_name = kwargs['inboundNatRuleName'] + if backend_port is not None: - pulumi.set(__self__, "backend_port", backend_port) + _setter("backend_port", backend_port) if frontend_port is not None: - pulumi.set(__self__, "frontend_port", frontend_port) + _setter("frontend_port", frontend_port) if inbound_nat_rule_name is not None: - pulumi.set(__self__, "inbound_nat_rule_name", inbound_nat_rule_name) + _setter("inbound_nat_rule_name", inbound_nat_rule_name) @property @pulumi.getter(name="backendPort") @@ -99,10 +120,35 @@ def __init__(__self__, *, :param str protocol: The protocol used for this Gateway Lodbalancer Tunnel Interface. Possible values are `None`, `Native` and `VXLAN`. :param str type: The traffic type of this Gateway Lodbalancer Tunnel Interface. Possible values are `None`, `Internal` and `External`. """ - pulumi.set(__self__, "identifier", identifier) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "type", type) + BackendAddressPoolTunnelInterface._configure( + lambda key, value: pulumi.set(__self__, key, value), + identifier=identifier, + port=port, + protocol=protocol, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identifier: Optional[int] = None, + port: Optional[int] = None, + protocol: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identifier is None: + raise TypeError("Missing 'identifier' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identifier", identifier) + _setter("port", port) + _setter("protocol", protocol) + _setter("type", type) @property @pulumi.getter @@ -205,31 +251,88 @@ def __init__(__self__, *, > **NOTE:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/load-balancer/load-balancer-standard-availability-zones) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. """ - pulumi.set(__self__, "name", name) + LoadBalancerFrontendIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + gateway_load_balancer_frontend_ip_configuration_id=gateway_load_balancer_frontend_ip_configuration_id, + id=id, + inbound_nat_rules=inbound_nat_rules, + load_balancer_rules=load_balancer_rules, + outbound_rules=outbound_rules, + private_ip_address=private_ip_address, + private_ip_address_allocation=private_ip_address_allocation, + private_ip_address_version=private_ip_address_version, + public_ip_address_id=public_ip_address_id, + public_ip_prefix_id=public_ip_prefix_id, + subnet_id=subnet_id, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + gateway_load_balancer_frontend_ip_configuration_id: Optional[str] = None, + id: Optional[str] = None, + inbound_nat_rules: Optional[Sequence[str]] = None, + load_balancer_rules: Optional[Sequence[str]] = None, + outbound_rules: Optional[Sequence[str]] = None, + private_ip_address: Optional[str] = None, + private_ip_address_allocation: Optional[str] = None, + private_ip_address_version: Optional[str] = None, + public_ip_address_id: Optional[str] = None, + public_ip_prefix_id: Optional[str] = None, + subnet_id: Optional[str] = None, + zones: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if gateway_load_balancer_frontend_ip_configuration_id is None and 'gatewayLoadBalancerFrontendIpConfigurationId' in kwargs: + gateway_load_balancer_frontend_ip_configuration_id = kwargs['gatewayLoadBalancerFrontendIpConfigurationId'] + if inbound_nat_rules is None and 'inboundNatRules' in kwargs: + inbound_nat_rules = kwargs['inboundNatRules'] + if load_balancer_rules is None and 'loadBalancerRules' in kwargs: + load_balancer_rules = kwargs['loadBalancerRules'] + if outbound_rules is None and 'outboundRules' in kwargs: + outbound_rules = kwargs['outboundRules'] + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + if private_ip_address_version is None and 'privateIpAddressVersion' in kwargs: + private_ip_address_version = kwargs['privateIpAddressVersion'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) if gateway_load_balancer_frontend_ip_configuration_id is not None: - pulumi.set(__self__, "gateway_load_balancer_frontend_ip_configuration_id", gateway_load_balancer_frontend_ip_configuration_id) + _setter("gateway_load_balancer_frontend_ip_configuration_id", gateway_load_balancer_frontend_ip_configuration_id) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if inbound_nat_rules is not None: - pulumi.set(__self__, "inbound_nat_rules", inbound_nat_rules) + _setter("inbound_nat_rules", inbound_nat_rules) if load_balancer_rules is not None: - pulumi.set(__self__, "load_balancer_rules", load_balancer_rules) + _setter("load_balancer_rules", load_balancer_rules) if outbound_rules is not None: - pulumi.set(__self__, "outbound_rules", outbound_rules) + _setter("outbound_rules", outbound_rules) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_address_allocation is not None: - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) + _setter("private_ip_address_allocation", private_ip_address_allocation) if private_ip_address_version is not None: - pulumi.set(__self__, "private_ip_address_version", private_ip_address_version) + _setter("private_ip_address_version", private_ip_address_version) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if public_ip_prefix_id is not None: - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) + _setter("public_ip_prefix_id", public_ip_prefix_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -347,9 +450,24 @@ def __init__(__self__, *, :param str name: The name of the Frontend IP Configuration. :param str id: The ID of the Load Balancer Outbound Rule. """ - pulumi.set(__self__, "name", name) + OutboundRuleFrontendIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -381,10 +499,41 @@ def __init__(__self__, *, :param str name: Specifies the name of the Backend Address Pool. :param str virtual_network_id: The ID of the Virtual Network where the Backend Address of the Load Balancer exists. """ - pulumi.set(__self__, "inbound_nat_rule_port_mappings", inbound_nat_rule_port_mappings) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + GetBackendAddressPoolBackendAddressResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + inbound_nat_rule_port_mappings=inbound_nat_rule_port_mappings, + ip_address=ip_address, + name=name, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + inbound_nat_rule_port_mappings: Optional[Sequence['outputs.GetBackendAddressPoolBackendAddressInboundNatRulePortMappingResult']] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + virtual_network_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if inbound_nat_rule_port_mappings is None and 'inboundNatRulePortMappings' in kwargs: + inbound_nat_rule_port_mappings = kwargs['inboundNatRulePortMappings'] + if inbound_nat_rule_port_mappings is None: + raise TypeError("Missing 'inbound_nat_rule_port_mappings' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if virtual_network_id is None: + raise TypeError("Missing 'virtual_network_id' argument") + + _setter("inbound_nat_rule_port_mappings", inbound_nat_rule_port_mappings) + _setter("ip_address", ip_address) + _setter("name", name) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="inboundNatRulePortMappings") @@ -430,9 +579,36 @@ def __init__(__self__, *, :param int frontend_port: The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. :param str inbound_nat_rule_name: The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. """ - pulumi.set(__self__, "backend_port", backend_port) - pulumi.set(__self__, "frontend_port", frontend_port) - pulumi.set(__self__, "inbound_nat_rule_name", inbound_nat_rule_name) + GetBackendAddressPoolBackendAddressInboundNatRulePortMappingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + frontend_port=frontend_port, + inbound_nat_rule_name=inbound_nat_rule_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[int] = None, + frontend_port: Optional[int] = None, + inbound_nat_rule_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if backend_port is None: + raise TypeError("Missing 'backend_port' argument") + if frontend_port is None and 'frontendPort' in kwargs: + frontend_port = kwargs['frontendPort'] + if frontend_port is None: + raise TypeError("Missing 'frontend_port' argument") + if inbound_nat_rule_name is None and 'inboundNatRuleName' in kwargs: + inbound_nat_rule_name = kwargs['inboundNatRuleName'] + if inbound_nat_rule_name is None: + raise TypeError("Missing 'inbound_nat_rule_name' argument") + + _setter("backend_port", backend_port) + _setter("frontend_port", frontend_port) + _setter("inbound_nat_rule_name", inbound_nat_rule_name) @property @pulumi.getter(name="backendPort") @@ -466,7 +642,20 @@ def __init__(__self__, *, """ :param str id: The ID of the Backend Address Pool. """ - pulumi.set(__self__, "id", id) + GetBackendAddressPoolBackendIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("id", id) @property @pulumi.getter @@ -498,14 +687,65 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet which is associated with the IP Configuration. :param Sequence[str] zones: A list of Availability Zones which the Load Balancer's IP Addresses should be created in. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) - pulumi.set(__self__, "private_ip_address_version", private_ip_address_version) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) - pulumi.set(__self__, "zones", zones) + GetLBFrontendIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + private_ip_address=private_ip_address, + private_ip_address_allocation=private_ip_address_allocation, + private_ip_address_version=private_ip_address_version, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_address_allocation: Optional[str] = None, + private_ip_address_version: Optional[str] = None, + public_ip_address_id: Optional[str] = None, + subnet_id: Optional[str] = None, + zones: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + if private_ip_address_allocation is None: + raise TypeError("Missing 'private_ip_address_allocation' argument") + if private_ip_address_version is None and 'privateIpAddressVersion' in kwargs: + private_ip_address_version = kwargs['privateIpAddressVersion'] + if private_ip_address_version is None: + raise TypeError("Missing 'private_ip_address_version' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if zones is None: + raise TypeError("Missing 'zones' argument") + + _setter("id", id) + _setter("name", name) + _setter("private_ip_address", private_ip_address) + _setter("private_ip_address_allocation", private_ip_address_allocation) + _setter("private_ip_address_version", private_ip_address_version) + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) + _setter("zones", zones) @property @pulumi.getter @@ -581,8 +821,25 @@ def __init__(__self__, *, :param str id: The ID of the Frontend IP Configuration. :param str name: The name of this Load Balancer Outbound Rule. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) + GetLBOutboundRuleFrontendIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("id", id) + _setter("name", name) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/lb/probe.py b/sdk/python/pulumi_azure/lb/probe.py index b8da9bebca..456a10d119 100644 --- a/sdk/python/pulumi_azure/lb/probe.py +++ b/sdk/python/pulumi_azure/lb/probe.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ProbeArgs', 'Probe'] @@ -33,20 +33,59 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol: Specifies the protocol of the end point. Possible values are `Http`, `Https` or `Tcp`. If TCP is specified, a received ACK is required for the probe to be successful. If HTTP is specified, a 200 OK response from the specified URI is required for the probe to be successful. :param pulumi.Input[str] request_path: The URI used for requesting health status from the backend endpoint. Required if protocol is set to `Http` or `Https`. Otherwise, it is not allowed. """ - pulumi.set(__self__, "loadbalancer_id", loadbalancer_id) - pulumi.set(__self__, "port", port) + ProbeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + loadbalancer_id=loadbalancer_id, + port=port, + interval_in_seconds=interval_in_seconds, + name=name, + number_of_probes=number_of_probes, + probe_threshold=probe_threshold, + protocol=protocol, + request_path=request_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + loadbalancer_id: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + interval_in_seconds: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + number_of_probes: Optional[pulumi.Input[int]] = None, + probe_threshold: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + request_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if loadbalancer_id is None and 'loadbalancerId' in kwargs: + loadbalancer_id = kwargs['loadbalancerId'] + if loadbalancer_id is None: + raise TypeError("Missing 'loadbalancer_id' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if number_of_probes is None and 'numberOfProbes' in kwargs: + number_of_probes = kwargs['numberOfProbes'] + if probe_threshold is None and 'probeThreshold' in kwargs: + probe_threshold = kwargs['probeThreshold'] + if request_path is None and 'requestPath' in kwargs: + request_path = kwargs['requestPath'] + + _setter("loadbalancer_id", loadbalancer_id) + _setter("port", port) if interval_in_seconds is not None: - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) + _setter("interval_in_seconds", interval_in_seconds) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if number_of_probes is not None: - pulumi.set(__self__, "number_of_probes", number_of_probes) + _setter("number_of_probes", number_of_probes) if probe_threshold is not None: - pulumi.set(__self__, "probe_threshold", probe_threshold) + _setter("probe_threshold", probe_threshold) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if request_path is not None: - pulumi.set(__self__, "request_path", request_path) + _setter("request_path", request_path) @property @pulumi.getter(name="loadbalancerId") @@ -168,24 +207,63 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol: Specifies the protocol of the end point. Possible values are `Http`, `Https` or `Tcp`. If TCP is specified, a received ACK is required for the probe to be successful. If HTTP is specified, a 200 OK response from the specified URI is required for the probe to be successful. :param pulumi.Input[str] request_path: The URI used for requesting health status from the backend endpoint. Required if protocol is set to `Http` or `Https`. Otherwise, it is not allowed. """ + _ProbeState._configure( + lambda key, value: pulumi.set(__self__, key, value), + interval_in_seconds=interval_in_seconds, + load_balancer_rules=load_balancer_rules, + loadbalancer_id=loadbalancer_id, + name=name, + number_of_probes=number_of_probes, + port=port, + probe_threshold=probe_threshold, + protocol=protocol, + request_path=request_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + interval_in_seconds: Optional[pulumi.Input[int]] = None, + load_balancer_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + loadbalancer_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + number_of_probes: Optional[pulumi.Input[int]] = None, + port: Optional[pulumi.Input[int]] = None, + probe_threshold: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + request_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if load_balancer_rules is None and 'loadBalancerRules' in kwargs: + load_balancer_rules = kwargs['loadBalancerRules'] + if loadbalancer_id is None and 'loadbalancerId' in kwargs: + loadbalancer_id = kwargs['loadbalancerId'] + if number_of_probes is None and 'numberOfProbes' in kwargs: + number_of_probes = kwargs['numberOfProbes'] + if probe_threshold is None and 'probeThreshold' in kwargs: + probe_threshold = kwargs['probeThreshold'] + if request_path is None and 'requestPath' in kwargs: + request_path = kwargs['requestPath'] + if interval_in_seconds is not None: - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) + _setter("interval_in_seconds", interval_in_seconds) if load_balancer_rules is not None: - pulumi.set(__self__, "load_balancer_rules", load_balancer_rules) + _setter("load_balancer_rules", load_balancer_rules) if loadbalancer_id is not None: - pulumi.set(__self__, "loadbalancer_id", loadbalancer_id) + _setter("loadbalancer_id", loadbalancer_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if number_of_probes is not None: - pulumi.set(__self__, "number_of_probes", number_of_probes) + _setter("number_of_probes", number_of_probes) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if probe_threshold is not None: - pulumi.set(__self__, "probe_threshold", probe_threshold) + _setter("probe_threshold", probe_threshold) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if request_path is not None: - pulumi.set(__self__, "request_path", request_path) + _setter("request_path", request_path) @property @pulumi.getter(name="intervalInSeconds") @@ -406,6 +484,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProbeArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/lb/rule.py b/sdk/python/pulumi_azure/lb/rule.py index 82fef7b4ee..54a7cf7c9b 100644 --- a/sdk/python/pulumi_azure/lb/rule.py +++ b/sdk/python/pulumi_azure/lb/rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RuleArgs', 'Rule'] @@ -45,27 +45,94 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the LB Rule. Changing this forces a new resource to be created. :param pulumi.Input[str] probe_id: A reference to a Probe used by this Load Balancing Rule. """ - pulumi.set(__self__, "backend_port", backend_port) - pulumi.set(__self__, "frontend_ip_configuration_name", frontend_ip_configuration_name) - pulumi.set(__self__, "frontend_port", frontend_port) - pulumi.set(__self__, "loadbalancer_id", loadbalancer_id) - pulumi.set(__self__, "protocol", protocol) + RuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + frontend_ip_configuration_name=frontend_ip_configuration_name, + frontend_port=frontend_port, + loadbalancer_id=loadbalancer_id, + protocol=protocol, + backend_address_pool_ids=backend_address_pool_ids, + disable_outbound_snat=disable_outbound_snat, + enable_floating_ip=enable_floating_ip, + enable_tcp_reset=enable_tcp_reset, + idle_timeout_in_minutes=idle_timeout_in_minutes, + load_distribution=load_distribution, + name=name, + probe_id=probe_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[pulumi.Input[int]] = None, + frontend_ip_configuration_name: Optional[pulumi.Input[str]] = None, + frontend_port: Optional[pulumi.Input[int]] = None, + loadbalancer_id: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + backend_address_pool_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + disable_outbound_snat: Optional[pulumi.Input[bool]] = None, + enable_floating_ip: Optional[pulumi.Input[bool]] = None, + enable_tcp_reset: Optional[pulumi.Input[bool]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + load_distribution: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + probe_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if backend_port is None: + raise TypeError("Missing 'backend_port' argument") + if frontend_ip_configuration_name is None and 'frontendIpConfigurationName' in kwargs: + frontend_ip_configuration_name = kwargs['frontendIpConfigurationName'] + if frontend_ip_configuration_name is None: + raise TypeError("Missing 'frontend_ip_configuration_name' argument") + if frontend_port is None and 'frontendPort' in kwargs: + frontend_port = kwargs['frontendPort'] + if frontend_port is None: + raise TypeError("Missing 'frontend_port' argument") + if loadbalancer_id is None and 'loadbalancerId' in kwargs: + loadbalancer_id = kwargs['loadbalancerId'] + if loadbalancer_id is None: + raise TypeError("Missing 'loadbalancer_id' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if backend_address_pool_ids is None and 'backendAddressPoolIds' in kwargs: + backend_address_pool_ids = kwargs['backendAddressPoolIds'] + if disable_outbound_snat is None and 'disableOutboundSnat' in kwargs: + disable_outbound_snat = kwargs['disableOutboundSnat'] + if enable_floating_ip is None and 'enableFloatingIp' in kwargs: + enable_floating_ip = kwargs['enableFloatingIp'] + if enable_tcp_reset is None and 'enableTcpReset' in kwargs: + enable_tcp_reset = kwargs['enableTcpReset'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if load_distribution is None and 'loadDistribution' in kwargs: + load_distribution = kwargs['loadDistribution'] + if probe_id is None and 'probeId' in kwargs: + probe_id = kwargs['probeId'] + + _setter("backend_port", backend_port) + _setter("frontend_ip_configuration_name", frontend_ip_configuration_name) + _setter("frontend_port", frontend_port) + _setter("loadbalancer_id", loadbalancer_id) + _setter("protocol", protocol) if backend_address_pool_ids is not None: - pulumi.set(__self__, "backend_address_pool_ids", backend_address_pool_ids) + _setter("backend_address_pool_ids", backend_address_pool_ids) if disable_outbound_snat is not None: - pulumi.set(__self__, "disable_outbound_snat", disable_outbound_snat) + _setter("disable_outbound_snat", disable_outbound_snat) if enable_floating_ip is not None: - pulumi.set(__self__, "enable_floating_ip", enable_floating_ip) + _setter("enable_floating_ip", enable_floating_ip) if enable_tcp_reset is not None: - pulumi.set(__self__, "enable_tcp_reset", enable_tcp_reset) + _setter("enable_tcp_reset", enable_tcp_reset) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if load_distribution is not None: - pulumi.set(__self__, "load_distribution", load_distribution) + _setter("load_distribution", load_distribution) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if probe_id is not None: - pulumi.set(__self__, "probe_id", probe_id) + _setter("probe_id", probe_id) @property @pulumi.getter(name="backendPort") @@ -261,34 +328,95 @@ def __init__(__self__, *, :param pulumi.Input[str] probe_id: A reference to a Probe used by this Load Balancing Rule. :param pulumi.Input[str] protocol: The transport protocol for the external endpoint. Possible values are `Tcp`, `Udp` or `All`. """ + _RuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_address_pool_ids=backend_address_pool_ids, + backend_port=backend_port, + disable_outbound_snat=disable_outbound_snat, + enable_floating_ip=enable_floating_ip, + enable_tcp_reset=enable_tcp_reset, + frontend_ip_configuration_id=frontend_ip_configuration_id, + frontend_ip_configuration_name=frontend_ip_configuration_name, + frontend_port=frontend_port, + idle_timeout_in_minutes=idle_timeout_in_minutes, + load_distribution=load_distribution, + loadbalancer_id=loadbalancer_id, + name=name, + probe_id=probe_id, + protocol=protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_address_pool_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + backend_port: Optional[pulumi.Input[int]] = None, + disable_outbound_snat: Optional[pulumi.Input[bool]] = None, + enable_floating_ip: Optional[pulumi.Input[bool]] = None, + enable_tcp_reset: Optional[pulumi.Input[bool]] = None, + frontend_ip_configuration_id: Optional[pulumi.Input[str]] = None, + frontend_ip_configuration_name: Optional[pulumi.Input[str]] = None, + frontend_port: Optional[pulumi.Input[int]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + load_distribution: Optional[pulumi.Input[str]] = None, + loadbalancer_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + probe_id: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_address_pool_ids is None and 'backendAddressPoolIds' in kwargs: + backend_address_pool_ids = kwargs['backendAddressPoolIds'] + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if disable_outbound_snat is None and 'disableOutboundSnat' in kwargs: + disable_outbound_snat = kwargs['disableOutboundSnat'] + if enable_floating_ip is None and 'enableFloatingIp' in kwargs: + enable_floating_ip = kwargs['enableFloatingIp'] + if enable_tcp_reset is None and 'enableTcpReset' in kwargs: + enable_tcp_reset = kwargs['enableTcpReset'] + if frontend_ip_configuration_id is None and 'frontendIpConfigurationId' in kwargs: + frontend_ip_configuration_id = kwargs['frontendIpConfigurationId'] + if frontend_ip_configuration_name is None and 'frontendIpConfigurationName' in kwargs: + frontend_ip_configuration_name = kwargs['frontendIpConfigurationName'] + if frontend_port is None and 'frontendPort' in kwargs: + frontend_port = kwargs['frontendPort'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if load_distribution is None and 'loadDistribution' in kwargs: + load_distribution = kwargs['loadDistribution'] + if loadbalancer_id is None and 'loadbalancerId' in kwargs: + loadbalancer_id = kwargs['loadbalancerId'] + if probe_id is None and 'probeId' in kwargs: + probe_id = kwargs['probeId'] + if backend_address_pool_ids is not None: - pulumi.set(__self__, "backend_address_pool_ids", backend_address_pool_ids) + _setter("backend_address_pool_ids", backend_address_pool_ids) if backend_port is not None: - pulumi.set(__self__, "backend_port", backend_port) + _setter("backend_port", backend_port) if disable_outbound_snat is not None: - pulumi.set(__self__, "disable_outbound_snat", disable_outbound_snat) + _setter("disable_outbound_snat", disable_outbound_snat) if enable_floating_ip is not None: - pulumi.set(__self__, "enable_floating_ip", enable_floating_ip) + _setter("enable_floating_ip", enable_floating_ip) if enable_tcp_reset is not None: - pulumi.set(__self__, "enable_tcp_reset", enable_tcp_reset) + _setter("enable_tcp_reset", enable_tcp_reset) if frontend_ip_configuration_id is not None: - pulumi.set(__self__, "frontend_ip_configuration_id", frontend_ip_configuration_id) + _setter("frontend_ip_configuration_id", frontend_ip_configuration_id) if frontend_ip_configuration_name is not None: - pulumi.set(__self__, "frontend_ip_configuration_name", frontend_ip_configuration_name) + _setter("frontend_ip_configuration_name", frontend_ip_configuration_name) if frontend_port is not None: - pulumi.set(__self__, "frontend_port", frontend_port) + _setter("frontend_port", frontend_port) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if load_distribution is not None: - pulumi.set(__self__, "load_distribution", load_distribution) + _setter("load_distribution", load_distribution) if loadbalancer_id is not None: - pulumi.set(__self__, "loadbalancer_id", loadbalancer_id) + _setter("loadbalancer_id", loadbalancer_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if probe_id is not None: - pulumi.set(__self__, "probe_id", probe_id) + _setter("probe_id", probe_id) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) @property @pulumi.getter(name="backendAddressPoolIds") @@ -589,6 +717,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/lighthouse/_inputs.py b/sdk/python/pulumi_azure/lighthouse/_inputs.py index 41746ebb8d..0f160be85a 100644 --- a/sdk/python/pulumi_azure/lighthouse/_inputs.py +++ b/sdk/python/pulumi_azure/lighthouse/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -30,12 +30,41 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] delegated_role_definition_ids: The set of role definition ids which define all the permissions that the principal id can assign. :param pulumi.Input[str] principal_display_name: The display name of the security group/service principal/user that would be assigned permissions to the projected subscription. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "role_definition_id", role_definition_id) + DefinitionAuthorizationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + role_definition_id=role_definition_id, + delegated_role_definition_ids=delegated_role_definition_ids, + principal_display_name=principal_display_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + delegated_role_definition_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_display_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_id is None: + raise TypeError("Missing 'role_definition_id' argument") + if delegated_role_definition_ids is None and 'delegatedRoleDefinitionIds' in kwargs: + delegated_role_definition_ids = kwargs['delegatedRoleDefinitionIds'] + if principal_display_name is None and 'principalDisplayName' in kwargs: + principal_display_name = kwargs['principalDisplayName'] + + _setter("principal_id", principal_id) + _setter("role_definition_id", role_definition_id) if delegated_role_definition_ids is not None: - pulumi.set(__self__, "delegated_role_definition_ids", delegated_role_definition_ids) + _setter("delegated_role_definition_ids", delegated_role_definition_ids) if principal_display_name is not None: - pulumi.set(__self__, "principal_display_name", principal_display_name) + _setter("principal_display_name", principal_display_name) @property @pulumi.getter(name="principalId") @@ -99,12 +128,41 @@ def __init__(__self__, *, :param pulumi.Input['DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs'] just_in_time_access_policy: A `just_in_time_access_policy` block as defined below. :param pulumi.Input[str] principal_display_name: The display name of the Azure Active Directory Principal. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "role_definition_id", role_definition_id) + DefinitionEligibleAuthorizationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + role_definition_id=role_definition_id, + just_in_time_access_policy=just_in_time_access_policy, + principal_display_name=principal_display_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + just_in_time_access_policy: Optional[pulumi.Input['DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs']] = None, + principal_display_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_id is None: + raise TypeError("Missing 'role_definition_id' argument") + if just_in_time_access_policy is None and 'justInTimeAccessPolicy' in kwargs: + just_in_time_access_policy = kwargs['justInTimeAccessPolicy'] + if principal_display_name is None and 'principalDisplayName' in kwargs: + principal_display_name = kwargs['principalDisplayName'] + + _setter("principal_id", principal_id) + _setter("role_definition_id", role_definition_id) if just_in_time_access_policy is not None: - pulumi.set(__self__, "just_in_time_access_policy", just_in_time_access_policy) + _setter("just_in_time_access_policy", just_in_time_access_policy) if principal_display_name is not None: - pulumi.set(__self__, "principal_display_name", principal_display_name) + _setter("principal_display_name", principal_display_name) @property @pulumi.getter(name="principalId") @@ -168,12 +226,31 @@ def __init__(__self__, *, > **Note:** When this property isn't set, it would be set to `None`. """ + DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + approvers=approvers, + maximum_activation_duration=maximum_activation_duration, + multi_factor_auth_provider=multi_factor_auth_provider, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + approvers: Optional[pulumi.Input[Sequence[pulumi.Input['DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArgs']]]] = None, + maximum_activation_duration: Optional[pulumi.Input[str]] = None, + multi_factor_auth_provider: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maximum_activation_duration is None and 'maximumActivationDuration' in kwargs: + maximum_activation_duration = kwargs['maximumActivationDuration'] + if multi_factor_auth_provider is None and 'multiFactorAuthProvider' in kwargs: + multi_factor_auth_provider = kwargs['multiFactorAuthProvider'] + if approvers is not None: - pulumi.set(__self__, "approvers", approvers) + _setter("approvers", approvers) if maximum_activation_duration is not None: - pulumi.set(__self__, "maximum_activation_duration", maximum_activation_duration) + _setter("maximum_activation_duration", maximum_activation_duration) if multi_factor_auth_provider is not None: - pulumi.set(__self__, "multi_factor_auth_provider", multi_factor_auth_provider) + _setter("multi_factor_auth_provider", multi_factor_auth_provider) @property @pulumi.getter @@ -223,9 +300,28 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID of the Azure Active Directory principal for the approver. :param pulumi.Input[str] principal_display_name: The display name of the Azure Active Directory Principal for the approver. """ - pulumi.set(__self__, "principal_id", principal_id) + DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + principal_display_name=principal_display_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[pulumi.Input[str]] = None, + principal_display_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if principal_display_name is None and 'principalDisplayName' in kwargs: + principal_display_name = kwargs['principalDisplayName'] + + _setter("principal_id", principal_id) if principal_display_name is not None: - pulumi.set(__self__, "principal_display_name", principal_display_name) + _setter("principal_display_name", principal_display_name) @property @pulumi.getter(name="principalId") @@ -265,10 +361,35 @@ def __init__(__self__, *, :param pulumi.Input[str] publisher: The publisher ID of the plan. :param pulumi.Input[str] version: The version of the plan. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "version", version) + DefinitionPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + product: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) + _setter("version", version) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/lighthouse/assignment.py b/sdk/python/pulumi_azure/lighthouse/assignment.py index e92b193ba5..a162b85072 100644 --- a/sdk/python/pulumi_azure/lighthouse/assignment.py +++ b/sdk/python/pulumi_azure/lighthouse/assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AssignmentArgs', 'Assignment'] @@ -23,10 +23,31 @@ def __init__(__self__, *, :param pulumi.Input[str] scope: The scope at which the Lighthouse Assignment applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333` or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`. Changing this forces a new resource to be created. :param pulumi.Input[str] name: A unique UUID/GUID which identifies this lighthouse assignment- one will be generated if not specified. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "lighthouse_definition_id", lighthouse_definition_id) - pulumi.set(__self__, "scope", scope) + AssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + lighthouse_definition_id=lighthouse_definition_id, + scope=scope, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + lighthouse_definition_id: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lighthouse_definition_id is None and 'lighthouseDefinitionId' in kwargs: + lighthouse_definition_id = kwargs['lighthouseDefinitionId'] + if lighthouse_definition_id is None: + raise TypeError("Missing 'lighthouse_definition_id' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + + _setter("lighthouse_definition_id", lighthouse_definition_id) + _setter("scope", scope) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="lighthouseDefinitionId") @@ -77,12 +98,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: A unique UUID/GUID which identifies this lighthouse assignment- one will be generated if not specified. Changing this forces a new resource to be created. :param pulumi.Input[str] scope: The scope at which the Lighthouse Assignment applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333` or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`. Changing this forces a new resource to be created. """ + _AssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + lighthouse_definition_id=lighthouse_definition_id, + name=name, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + lighthouse_definition_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lighthouse_definition_id is None and 'lighthouseDefinitionId' in kwargs: + lighthouse_definition_id = kwargs['lighthouseDefinitionId'] + if lighthouse_definition_id is not None: - pulumi.set(__self__, "lighthouse_definition_id", lighthouse_definition_id) + _setter("lighthouse_definition_id", lighthouse_definition_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="lighthouseDefinitionId") @@ -198,6 +236,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/lighthouse/definition.py b/sdk/python/pulumi_azure/lighthouse/definition.py index e27afd85fa..1f60e20210 100644 --- a/sdk/python/pulumi_azure/lighthouse/definition.py +++ b/sdk/python/pulumi_azure/lighthouse/definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,19 +35,56 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Lighthouse Definition. Changing this forces a new resource to be created. :param pulumi.Input['DefinitionPlanArgs'] plan: A `plan` block as defined below. """ - pulumi.set(__self__, "authorizations", authorizations) - pulumi.set(__self__, "managing_tenant_id", managing_tenant_id) - pulumi.set(__self__, "scope", scope) + DefinitionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorizations=authorizations, + managing_tenant_id=managing_tenant_id, + scope=scope, + description=description, + eligible_authorizations=eligible_authorizations, + lighthouse_definition_id=lighthouse_definition_id, + name=name, + plan=plan, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorizations: Optional[pulumi.Input[Sequence[pulumi.Input['DefinitionAuthorizationArgs']]]] = None, + managing_tenant_id: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + eligible_authorizations: Optional[pulumi.Input[Sequence[pulumi.Input['DefinitionEligibleAuthorizationArgs']]]] = None, + lighthouse_definition_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + plan: Optional[pulumi.Input['DefinitionPlanArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorizations is None: + raise TypeError("Missing 'authorizations' argument") + if managing_tenant_id is None and 'managingTenantId' in kwargs: + managing_tenant_id = kwargs['managingTenantId'] + if managing_tenant_id is None: + raise TypeError("Missing 'managing_tenant_id' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + if eligible_authorizations is None and 'eligibleAuthorizations' in kwargs: + eligible_authorizations = kwargs['eligibleAuthorizations'] + if lighthouse_definition_id is None and 'lighthouseDefinitionId' in kwargs: + lighthouse_definition_id = kwargs['lighthouseDefinitionId'] + + _setter("authorizations", authorizations) + _setter("managing_tenant_id", managing_tenant_id) + _setter("scope", scope) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if eligible_authorizations is not None: - pulumi.set(__self__, "eligible_authorizations", eligible_authorizations) + _setter("eligible_authorizations", eligible_authorizations) if lighthouse_definition_id is not None: - pulumi.set(__self__, "lighthouse_definition_id", lighthouse_definition_id) + _setter("lighthouse_definition_id", lighthouse_definition_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) @property @pulumi.getter @@ -168,22 +205,53 @@ def __init__(__self__, *, :param pulumi.Input['DefinitionPlanArgs'] plan: A `plan` block as defined below. :param pulumi.Input[str] scope: The ID of the managed subscription. Changing this forces a new resource to be created. """ + _DefinitionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorizations=authorizations, + description=description, + eligible_authorizations=eligible_authorizations, + lighthouse_definition_id=lighthouse_definition_id, + managing_tenant_id=managing_tenant_id, + name=name, + plan=plan, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorizations: Optional[pulumi.Input[Sequence[pulumi.Input['DefinitionAuthorizationArgs']]]] = None, + description: Optional[pulumi.Input[str]] = None, + eligible_authorizations: Optional[pulumi.Input[Sequence[pulumi.Input['DefinitionEligibleAuthorizationArgs']]]] = None, + lighthouse_definition_id: Optional[pulumi.Input[str]] = None, + managing_tenant_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + plan: Optional[pulumi.Input['DefinitionPlanArgs']] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eligible_authorizations is None and 'eligibleAuthorizations' in kwargs: + eligible_authorizations = kwargs['eligibleAuthorizations'] + if lighthouse_definition_id is None and 'lighthouseDefinitionId' in kwargs: + lighthouse_definition_id = kwargs['lighthouseDefinitionId'] + if managing_tenant_id is None and 'managingTenantId' in kwargs: + managing_tenant_id = kwargs['managingTenantId'] + if authorizations is not None: - pulumi.set(__self__, "authorizations", authorizations) + _setter("authorizations", authorizations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if eligible_authorizations is not None: - pulumi.set(__self__, "eligible_authorizations", eligible_authorizations) + _setter("eligible_authorizations", eligible_authorizations) if lighthouse_definition_id is not None: - pulumi.set(__self__, "lighthouse_definition_id", lighthouse_definition_id) + _setter("lighthouse_definition_id", lighthouse_definition_id) if managing_tenant_id is not None: - pulumi.set(__self__, "managing_tenant_id", managing_tenant_id) + _setter("managing_tenant_id", managing_tenant_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter @@ -381,6 +449,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DefinitionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -413,6 +485,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'managing_tenant_id'") __props__.__dict__["managing_tenant_id"] = managing_tenant_id __props__.__dict__["name"] = name + if plan is not None and not isinstance(plan, DefinitionPlanArgs): + plan = plan or {} + def _setter(key, value): + plan[key] = value + DefinitionPlanArgs._configure(_setter, **plan) __props__.__dict__["plan"] = plan if scope is None and not opts.urn: raise TypeError("Missing required property 'scope'") diff --git a/sdk/python/pulumi_azure/lighthouse/outputs.py b/sdk/python/pulumi_azure/lighthouse/outputs.py index 303b839a54..b746d0564d 100644 --- a/sdk/python/pulumi_azure/lighthouse/outputs.py +++ b/sdk/python/pulumi_azure/lighthouse/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -54,12 +54,41 @@ def __init__(__self__, *, :param Sequence[str] delegated_role_definition_ids: The set of role definition ids which define all the permissions that the principal id can assign. :param str principal_display_name: The display name of the security group/service principal/user that would be assigned permissions to the projected subscription. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "role_definition_id", role_definition_id) + DefinitionAuthorization._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + role_definition_id=role_definition_id, + delegated_role_definition_ids=delegated_role_definition_ids, + principal_display_name=principal_display_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + role_definition_id: Optional[str] = None, + delegated_role_definition_ids: Optional[Sequence[str]] = None, + principal_display_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_id is None: + raise TypeError("Missing 'role_definition_id' argument") + if delegated_role_definition_ids is None and 'delegatedRoleDefinitionIds' in kwargs: + delegated_role_definition_ids = kwargs['delegatedRoleDefinitionIds'] + if principal_display_name is None and 'principalDisplayName' in kwargs: + principal_display_name = kwargs['principalDisplayName'] + + _setter("principal_id", principal_id) + _setter("role_definition_id", role_definition_id) if delegated_role_definition_ids is not None: - pulumi.set(__self__, "delegated_role_definition_ids", delegated_role_definition_ids) + _setter("delegated_role_definition_ids", delegated_role_definition_ids) if principal_display_name is not None: - pulumi.set(__self__, "principal_display_name", principal_display_name) + _setter("principal_display_name", principal_display_name) @property @pulumi.getter(name="principalId") @@ -130,12 +159,41 @@ def __init__(__self__, *, :param 'DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs' just_in_time_access_policy: A `just_in_time_access_policy` block as defined below. :param str principal_display_name: The display name of the Azure Active Directory Principal. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "role_definition_id", role_definition_id) + DefinitionEligibleAuthorization._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + role_definition_id=role_definition_id, + just_in_time_access_policy=just_in_time_access_policy, + principal_display_name=principal_display_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + role_definition_id: Optional[str] = None, + just_in_time_access_policy: Optional['outputs.DefinitionEligibleAuthorizationJustInTimeAccessPolicy'] = None, + principal_display_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_id is None: + raise TypeError("Missing 'role_definition_id' argument") + if just_in_time_access_policy is None and 'justInTimeAccessPolicy' in kwargs: + just_in_time_access_policy = kwargs['justInTimeAccessPolicy'] + if principal_display_name is None and 'principalDisplayName' in kwargs: + principal_display_name = kwargs['principalDisplayName'] + + _setter("principal_id", principal_id) + _setter("role_definition_id", role_definition_id) if just_in_time_access_policy is not None: - pulumi.set(__self__, "just_in_time_access_policy", just_in_time_access_policy) + _setter("just_in_time_access_policy", just_in_time_access_policy) if principal_display_name is not None: - pulumi.set(__self__, "principal_display_name", principal_display_name) + _setter("principal_display_name", principal_display_name) @property @pulumi.getter(name="principalId") @@ -202,12 +260,31 @@ def __init__(__self__, *, > **Note:** When this property isn't set, it would be set to `None`. """ + DefinitionEligibleAuthorizationJustInTimeAccessPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + approvers=approvers, + maximum_activation_duration=maximum_activation_duration, + multi_factor_auth_provider=multi_factor_auth_provider, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + approvers: Optional[Sequence['outputs.DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover']] = None, + maximum_activation_duration: Optional[str] = None, + multi_factor_auth_provider: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maximum_activation_duration is None and 'maximumActivationDuration' in kwargs: + maximum_activation_duration = kwargs['maximumActivationDuration'] + if multi_factor_auth_provider is None and 'multiFactorAuthProvider' in kwargs: + multi_factor_auth_provider = kwargs['multiFactorAuthProvider'] + if approvers is not None: - pulumi.set(__self__, "approvers", approvers) + _setter("approvers", approvers) if maximum_activation_duration is not None: - pulumi.set(__self__, "maximum_activation_duration", maximum_activation_duration) + _setter("maximum_activation_duration", maximum_activation_duration) if multi_factor_auth_provider is not None: - pulumi.set(__self__, "multi_factor_auth_provider", multi_factor_auth_provider) + _setter("multi_factor_auth_provider", multi_factor_auth_provider) @property @pulumi.getter @@ -264,9 +341,28 @@ def __init__(__self__, *, :param str principal_id: The Principal ID of the Azure Active Directory principal for the approver. :param str principal_display_name: The display name of the Azure Active Directory Principal for the approver. """ - pulumi.set(__self__, "principal_id", principal_id) + DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + principal_display_name=principal_display_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + principal_display_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if principal_display_name is None and 'principalDisplayName' in kwargs: + principal_display_name = kwargs['principalDisplayName'] + + _setter("principal_id", principal_id) if principal_display_name is not None: - pulumi.set(__self__, "principal_display_name", principal_display_name) + _setter("principal_display_name", principal_display_name) @property @pulumi.getter(name="principalId") @@ -298,10 +394,35 @@ def __init__(__self__, *, :param str publisher: The publisher ID of the plan. :param str version: The version of the plan. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "version", version) + DefinitionPlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + product: Optional[str] = None, + publisher: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if version is None: + raise TypeError("Missing 'version' argument") + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) + _setter("version", version) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/loadtest/_inputs.py b/sdk/python/pulumi_azure/loadtest/_inputs.py index 0c70e9a710..77b4c28cb3 100644 --- a/sdk/python/pulumi_azure/loadtest/_inputs.py +++ b/sdk/python/pulumi_azure/loadtest/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -20,13 +20,38 @@ def __init__(__self__, *, identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, principal_id: Optional[pulumi.Input[str]] = None, tenant_id: Optional[pulumi.Input[str]] = None): - pulumi.set(__self__, "type", type) + LoadTestIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/loadtest/load_test.py b/sdk/python/pulumi_azure/loadtest/load_test.py index d4a44ac308..e9789af6a3 100644 --- a/sdk/python/pulumi_azure/loadtest/load_test.py +++ b/sdk/python/pulumi_azure/loadtest/load_test.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,17 +31,42 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of this Load Test. Changing this forces a new Load Test to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Load Test. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + LoadTestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + description=description, + identity=identity, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['LoadTestIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -136,20 +161,47 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Load Test. """ + _LoadTestState._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_plane_uri=data_plane_uri, + description=description, + identity=identity, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_plane_uri: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['LoadTestIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_plane_uri is None and 'dataPlaneUri' in kwargs: + data_plane_uri = kwargs['dataPlaneUri'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if data_plane_uri is not None: - pulumi.set(__self__, "data_plane_uri", data_plane_uri) + _setter("data_plane_uri", data_plane_uri) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dataPlaneUri") @@ -359,6 +411,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LoadTestArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -380,6 +436,11 @@ def _internal_init(__self__, __props__ = LoadTestArgs.__new__(LoadTestArgs) __props__.__dict__["description"] = description + if identity is not None and not isinstance(identity, LoadTestIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + LoadTestIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/loadtest/outputs.py b/sdk/python/pulumi_azure/loadtest/outputs.py index a7e34af455..d6aa04298c 100644 --- a/sdk/python/pulumi_azure/loadtest/outputs.py +++ b/sdk/python/pulumi_azure/loadtest/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -41,13 +41,38 @@ def __init__(__self__, *, identity_ids: Optional[Sequence[str]] = None, principal_id: Optional[str] = None, tenant_id: Optional[str] = None): - pulumi.set(__self__, "type", type) + LoadTestIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/loganalytics/_inputs.py b/sdk/python/pulumi_azure/loganalytics/_inputs.py index 58e91e59ca..d7a7f08451 100644 --- a/sdk/python/pulumi_azure/loganalytics/_inputs.py +++ b/sdk/python/pulumi_azure/loganalytics/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -26,11 +26,32 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ClusterIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/loganalytics/cluster.py b/sdk/python/pulumi_azure/loganalytics/cluster.py index 8bf4cca868..c172562054 100644 --- a/sdk/python/pulumi_azure/loganalytics/cluster.py +++ b/sdk/python/pulumi_azure/loganalytics/cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,16 +33,45 @@ def __init__(__self__, *, > **NOTE:** The cluster capacity must start at 500 GB and can be set to 1000, 2000 or 5000 GB/day. For more information on cluster costs, see [Dedicated clusters](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#dedicated-clusters). In v3.x the default value is `1000` GB, in v4.0 of the provider this will default to `500` GB. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Log Analytics Cluster. """ - pulumi.set(__self__, "identity", identity) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity=identity, + resource_group_name=resource_group_name, + location=location, + name=name, + size_gb=size_gb, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity: Optional[pulumi.Input['ClusterIdentityArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + size_gb: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity is None: + raise TypeError("Missing 'identity' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if size_gb is None and 'sizeGb' in kwargs: + size_gb = kwargs['sizeGb'] + + _setter("identity", identity) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if size_gb is not None: - pulumi.set(__self__, "size_gb", size_gb) + _setter("size_gb", size_gb) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -141,20 +170,49 @@ def __init__(__self__, *, > **NOTE:** The cluster capacity must start at 500 GB and can be set to 1000, 2000 or 5000 GB/day. For more information on cluster costs, see [Dedicated clusters](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#dedicated-clusters). In v3.x the default value is `1000` GB, in v4.0 of the provider this will default to `500` GB. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Log Analytics Cluster. """ + _ClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + identity=identity, + location=location, + name=name, + resource_group_name=resource_group_name, + size_gb=size_gb, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ClusterIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + size_gb: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if size_gb is None and 'sizeGb' in kwargs: + size_gb = kwargs['sizeGb'] + if cluster_id is not None: - pulumi.set(__self__, "cluster_id", cluster_id) + _setter("cluster_id", cluster_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if size_gb is not None: - pulumi.set(__self__, "size_gb", size_gb) + _setter("size_gb", size_gb) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="clusterId") @@ -338,6 +396,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -358,6 +420,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ClusterArgs.__new__(ClusterArgs) + if identity is not None and not isinstance(identity, ClusterIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ClusterIdentityArgs._configure(_setter, **identity) if identity is None and not opts.urn: raise TypeError("Missing required property 'identity'") __props__.__dict__["identity"] = identity diff --git a/sdk/python/pulumi_azure/loganalytics/cluster_customer_managed_key.py b/sdk/python/pulumi_azure/loganalytics/cluster_customer_managed_key.py index ea71b30d0e..0f0de560bd 100644 --- a/sdk/python/pulumi_azure/loganalytics/cluster_customer_managed_key.py +++ b/sdk/python/pulumi_azure/loganalytics/cluster_customer_managed_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ClusterCustomerManagedKeyArgs', 'ClusterCustomerManagedKey'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault Key to use for encryption. :param pulumi.Input[str] log_analytics_cluster_id: The ID of the Log Analytics Cluster. Changing this forces a new Log Analytics Cluster Customer Managed Key to be created. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) - pulumi.set(__self__, "log_analytics_cluster_id", log_analytics_cluster_id) + ClusterCustomerManagedKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + log_analytics_cluster_id=log_analytics_cluster_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + log_analytics_cluster_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if log_analytics_cluster_id is None and 'logAnalyticsClusterId' in kwargs: + log_analytics_cluster_id = kwargs['logAnalyticsClusterId'] + if log_analytics_cluster_id is None: + raise TypeError("Missing 'log_analytics_cluster_id' argument") + + _setter("key_vault_key_id", key_vault_key_id) + _setter("log_analytics_cluster_id", log_analytics_cluster_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault Key to use for encryption. :param pulumi.Input[str] log_analytics_cluster_id: The ID of the Log Analytics Cluster. Changing this forces a new Log Analytics Cluster Customer Managed Key to be created. """ + _ClusterCustomerManagedKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + log_analytics_cluster_id=log_analytics_cluster_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + log_analytics_cluster_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if log_analytics_cluster_id is None and 'logAnalyticsClusterId' in kwargs: + log_analytics_cluster_id = kwargs['logAnalyticsClusterId'] + if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if log_analytics_cluster_id is not None: - pulumi.set(__self__, "log_analytics_cluster_id", log_analytics_cluster_id) + _setter("log_analytics_cluster_id", log_analytics_cluster_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -260,6 +298,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ClusterCustomerManagedKeyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/loganalytics/data_export_rule.py b/sdk/python/pulumi_azure/loganalytics/data_export_rule.py index 4320fd9369..7017e93f69 100644 --- a/sdk/python/pulumi_azure/loganalytics/data_export_rule.py +++ b/sdk/python/pulumi_azure/loganalytics/data_export_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataExportRuleArgs', 'DataExportRule'] @@ -29,14 +29,51 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Is this Log Analytics Data Export Rule enabled? Possible values include `true` or `false`. Defaults to `false`. :param pulumi.Input[str] name: The name of the Log Analytics Data Export Rule. Changing this forces a new Log Analytics Data Export Rule to be created. """ - pulumi.set(__self__, "destination_resource_id", destination_resource_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "table_names", table_names) - pulumi.set(__self__, "workspace_resource_id", workspace_resource_id) + DataExportRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_resource_id=destination_resource_id, + resource_group_name=resource_group_name, + table_names=table_names, + workspace_resource_id=workspace_resource_id, + enabled=enabled, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_resource_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + table_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + workspace_resource_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_resource_id is None and 'destinationResourceId' in kwargs: + destination_resource_id = kwargs['destinationResourceId'] + if destination_resource_id is None: + raise TypeError("Missing 'destination_resource_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if table_names is None and 'tableNames' in kwargs: + table_names = kwargs['tableNames'] + if table_names is None: + raise TypeError("Missing 'table_names' argument") + if workspace_resource_id is None and 'workspaceResourceId' in kwargs: + workspace_resource_id = kwargs['workspaceResourceId'] + if workspace_resource_id is None: + raise TypeError("Missing 'workspace_resource_id' argument") + + _setter("destination_resource_id", destination_resource_id) + _setter("resource_group_name", resource_group_name) + _setter("table_names", table_names) + _setter("workspace_resource_id", workspace_resource_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="destinationResourceId") @@ -131,20 +168,53 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] table_names: A list of table names to export to the destination resource, for example: `["Heartbeat", "SecurityEvent"]`. :param pulumi.Input[str] workspace_resource_id: The resource ID of the workspace. Changing this forces a new Log Analytics Data Export Rule to be created. """ + _DataExportRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_resource_id=destination_resource_id, + enabled=enabled, + export_rule_id=export_rule_id, + name=name, + resource_group_name=resource_group_name, + table_names=table_names, + workspace_resource_id=workspace_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_resource_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + export_rule_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + table_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + workspace_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_resource_id is None and 'destinationResourceId' in kwargs: + destination_resource_id = kwargs['destinationResourceId'] + if export_rule_id is None and 'exportRuleId' in kwargs: + export_rule_id = kwargs['exportRuleId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if table_names is None and 'tableNames' in kwargs: + table_names = kwargs['tableNames'] + if workspace_resource_id is None and 'workspaceResourceId' in kwargs: + workspace_resource_id = kwargs['workspaceResourceId'] + if destination_resource_id is not None: - pulumi.set(__self__, "destination_resource_id", destination_resource_id) + _setter("destination_resource_id", destination_resource_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if export_rule_id is not None: - pulumi.set(__self__, "export_rule_id", export_rule_id) + _setter("export_rule_id", export_rule_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if table_names is not None: - pulumi.set(__self__, "table_names", table_names) + _setter("table_names", table_names) if workspace_resource_id is not None: - pulumi.set(__self__, "workspace_resource_id", workspace_resource_id) + _setter("workspace_resource_id", workspace_resource_id) @property @pulumi.getter(name="destinationResourceId") @@ -340,6 +410,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataExportRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/loganalytics/data_source_windows_event.py b/sdk/python/pulumi_azure/loganalytics/data_source_windows_event.py index c76ac1f26c..2eb0b7a127 100644 --- a/sdk/python/pulumi_azure/loganalytics/data_source_windows_event.py +++ b/sdk/python/pulumi_azure/loganalytics/data_source_windows_event.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataSourceWindowsEventArgs', 'DataSourceWindowsEvent'] @@ -27,12 +27,47 @@ def __init__(__self__, *, :param pulumi.Input[str] workspace_name: The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created. :param pulumi.Input[str] name: The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created. """ - pulumi.set(__self__, "event_log_name", event_log_name) - pulumi.set(__self__, "event_types", event_types) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "workspace_name", workspace_name) + DataSourceWindowsEventArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_log_name=event_log_name, + event_types=event_types, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_log_name: Optional[pulumi.Input[str]] = None, + event_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + workspace_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_log_name is None and 'eventLogName' in kwargs: + event_log_name = kwargs['eventLogName'] + if event_log_name is None: + raise TypeError("Missing 'event_log_name' argument") + if event_types is None and 'eventTypes' in kwargs: + event_types = kwargs['eventTypes'] + if event_types is None: + raise TypeError("Missing 'event_types' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if workspace_name is None and 'workspaceName' in kwargs: + workspace_name = kwargs['workspaceName'] + if workspace_name is None: + raise TypeError("Missing 'workspace_name' argument") + + _setter("event_log_name", event_log_name) + _setter("event_types", event_types) + _setter("resource_group_name", resource_group_name) + _setter("workspace_name", workspace_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="eventLogName") @@ -111,16 +146,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created. :param pulumi.Input[str] workspace_name: The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created. """ + _DataSourceWindowsEventState._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_log_name=event_log_name, + event_types=event_types, + name=name, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_log_name: Optional[pulumi.Input[str]] = None, + event_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + workspace_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_log_name is None and 'eventLogName' in kwargs: + event_log_name = kwargs['eventLogName'] + if event_types is None and 'eventTypes' in kwargs: + event_types = kwargs['eventTypes'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if workspace_name is None and 'workspaceName' in kwargs: + workspace_name = kwargs['workspaceName'] + if event_log_name is not None: - pulumi.set(__self__, "event_log_name", event_log_name) + _setter("event_log_name", event_log_name) if event_types is not None: - pulumi.set(__self__, "event_types", event_types) + _setter("event_types", event_types) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if workspace_name is not None: - pulumi.set(__self__, "workspace_name", workspace_name) + _setter("workspace_name", workspace_name) @property @pulumi.getter(name="eventLogName") @@ -276,6 +338,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataSourceWindowsEventArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/loganalytics/data_source_windows_performance_counter.py b/sdk/python/pulumi_azure/loganalytics/data_source_windows_performance_counter.py index dd4b752d1d..f0202ba955 100644 --- a/sdk/python/pulumi_azure/loganalytics/data_source_windows_performance_counter.py +++ b/sdk/python/pulumi_azure/loganalytics/data_source_windows_performance_counter.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataSourceWindowsPerformanceCounterArgs', 'DataSourceWindowsPerformanceCounter'] @@ -31,14 +31,61 @@ def __init__(__self__, *, :param pulumi.Input[str] workspace_name: The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created. :param pulumi.Input[str] name: The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created. """ - pulumi.set(__self__, "counter_name", counter_name) - pulumi.set(__self__, "instance_name", instance_name) - pulumi.set(__self__, "interval_seconds", interval_seconds) - pulumi.set(__self__, "object_name", object_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "workspace_name", workspace_name) + DataSourceWindowsPerformanceCounterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + counter_name=counter_name, + instance_name=instance_name, + interval_seconds=interval_seconds, + object_name=object_name, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + counter_name: Optional[pulumi.Input[str]] = None, + instance_name: Optional[pulumi.Input[str]] = None, + interval_seconds: Optional[pulumi.Input[int]] = None, + object_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + workspace_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if counter_name is None and 'counterName' in kwargs: + counter_name = kwargs['counterName'] + if counter_name is None: + raise TypeError("Missing 'counter_name' argument") + if instance_name is None and 'instanceName' in kwargs: + instance_name = kwargs['instanceName'] + if instance_name is None: + raise TypeError("Missing 'instance_name' argument") + if interval_seconds is None and 'intervalSeconds' in kwargs: + interval_seconds = kwargs['intervalSeconds'] + if interval_seconds is None: + raise TypeError("Missing 'interval_seconds' argument") + if object_name is None and 'objectName' in kwargs: + object_name = kwargs['objectName'] + if object_name is None: + raise TypeError("Missing 'object_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if workspace_name is None and 'workspaceName' in kwargs: + workspace_name = kwargs['workspaceName'] + if workspace_name is None: + raise TypeError("Missing 'workspace_name' argument") + + _setter("counter_name", counter_name) + _setter("instance_name", instance_name) + _setter("interval_seconds", interval_seconds) + _setter("object_name", object_name) + _setter("resource_group_name", resource_group_name) + _setter("workspace_name", workspace_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="counterName") @@ -145,20 +192,55 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created. :param pulumi.Input[str] workspace_name: The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created. """ + _DataSourceWindowsPerformanceCounterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + counter_name=counter_name, + instance_name=instance_name, + interval_seconds=interval_seconds, + name=name, + object_name=object_name, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + counter_name: Optional[pulumi.Input[str]] = None, + instance_name: Optional[pulumi.Input[str]] = None, + interval_seconds: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + object_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + workspace_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if counter_name is None and 'counterName' in kwargs: + counter_name = kwargs['counterName'] + if instance_name is None and 'instanceName' in kwargs: + instance_name = kwargs['instanceName'] + if interval_seconds is None and 'intervalSeconds' in kwargs: + interval_seconds = kwargs['intervalSeconds'] + if object_name is None and 'objectName' in kwargs: + object_name = kwargs['objectName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if workspace_name is None and 'workspaceName' in kwargs: + workspace_name = kwargs['workspaceName'] + if counter_name is not None: - pulumi.set(__self__, "counter_name", counter_name) + _setter("counter_name", counter_name) if instance_name is not None: - pulumi.set(__self__, "instance_name", instance_name) + _setter("instance_name", instance_name) if interval_seconds is not None: - pulumi.set(__self__, "interval_seconds", interval_seconds) + _setter("interval_seconds", interval_seconds) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if object_name is not None: - pulumi.set(__self__, "object_name", object_name) + _setter("object_name", object_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if workspace_name is not None: - pulumi.set(__self__, "workspace_name", workspace_name) + _setter("workspace_name", workspace_name) @property @pulumi.getter(name="counterName") @@ -346,6 +428,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataSourceWindowsPerformanceCounterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/loganalytics/linked_service.py b/sdk/python/pulumi_azure/loganalytics/linked_service.py index 73b58f21e8..7359278878 100644 --- a/sdk/python/pulumi_azure/loganalytics/linked_service.py +++ b/sdk/python/pulumi_azure/loganalytics/linked_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedServiceArgs', 'LinkedService'] @@ -27,12 +27,41 @@ def __init__(__self__, *, > **NOTE:** You must define at least one of the above access resource id attributes (e.g. `read_access_id` or `write_access_id`). """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "workspace_id", workspace_id) + LinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + workspace_id=workspace_id, + read_access_id=read_access_id, + write_access_id=write_access_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + read_access_id: Optional[pulumi.Input[str]] = None, + write_access_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if read_access_id is None and 'readAccessId' in kwargs: + read_access_id = kwargs['readAccessId'] + if write_access_id is None and 'writeAccessId' in kwargs: + write_access_id = kwargs['writeAccessId'] + + _setter("resource_group_name", resource_group_name) + _setter("workspace_id", workspace_id) if read_access_id is not None: - pulumi.set(__self__, "read_access_id", read_access_id) + _setter("read_access_id", read_access_id) if write_access_id is not None: - pulumi.set(__self__, "write_access_id", write_access_id) + _setter("write_access_id", write_access_id) @property @pulumi.getter(name="resourceGroupName") @@ -103,16 +132,43 @@ def __init__(__self__, *, > **NOTE:** You must define at least one of the above access resource id attributes (e.g. `read_access_id` or `write_access_id`). """ + _LinkedServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + read_access_id=read_access_id, + resource_group_name=resource_group_name, + workspace_id=workspace_id, + write_access_id=write_access_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + read_access_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + write_access_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if read_access_id is None and 'readAccessId' in kwargs: + read_access_id = kwargs['readAccessId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if write_access_id is None and 'writeAccessId' in kwargs: + write_access_id = kwargs['writeAccessId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if read_access_id is not None: - pulumi.set(__self__, "read_access_id", read_access_id) + _setter("read_access_id", read_access_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) if write_access_id is not None: - pulumi.set(__self__, "write_access_id", write_access_id) + _setter("write_access_id", write_access_id) @property @pulumi.getter @@ -284,6 +340,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/loganalytics/linked_storage_account.py b/sdk/python/pulumi_azure/loganalytics/linked_storage_account.py index 1977312edd..8d374423f6 100644 --- a/sdk/python/pulumi_azure/loganalytics/linked_storage_account.py +++ b/sdk/python/pulumi_azure/loganalytics/linked_storage_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedStorageAccountArgs', 'LinkedStorageAccount'] @@ -27,10 +27,43 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] storage_account_ids: The storage account resource ids to be linked. :param pulumi.Input[str] workspace_resource_id: The resource ID of the Log Analytics Workspace. Changing this forces a new Log Analytics Linked Storage Account to be created. """ - pulumi.set(__self__, "data_source_type", data_source_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_account_ids", storage_account_ids) - pulumi.set(__self__, "workspace_resource_id", workspace_resource_id) + LinkedStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_source_type=data_source_type, + resource_group_name=resource_group_name, + storage_account_ids=storage_account_ids, + workspace_resource_id=workspace_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_source_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + workspace_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_source_type is None and 'dataSourceType' in kwargs: + data_source_type = kwargs['dataSourceType'] + if data_source_type is None: + raise TypeError("Missing 'data_source_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_account_ids is None and 'storageAccountIds' in kwargs: + storage_account_ids = kwargs['storageAccountIds'] + if storage_account_ids is None: + raise TypeError("Missing 'storage_account_ids' argument") + if workspace_resource_id is None and 'workspaceResourceId' in kwargs: + workspace_resource_id = kwargs['workspaceResourceId'] + if workspace_resource_id is None: + raise TypeError("Missing 'workspace_resource_id' argument") + + _setter("data_source_type", data_source_type) + _setter("resource_group_name", resource_group_name) + _setter("storage_account_ids", storage_account_ids) + _setter("workspace_resource_id", workspace_resource_id) @property @pulumi.getter(name="dataSourceType") @@ -99,14 +132,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] storage_account_ids: The storage account resource ids to be linked. :param pulumi.Input[str] workspace_resource_id: The resource ID of the Log Analytics Workspace. Changing this forces a new Log Analytics Linked Storage Account to be created. """ + _LinkedStorageAccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_source_type=data_source_type, + resource_group_name=resource_group_name, + storage_account_ids=storage_account_ids, + workspace_resource_id=workspace_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_source_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + workspace_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_source_type is None and 'dataSourceType' in kwargs: + data_source_type = kwargs['dataSourceType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_account_ids is None and 'storageAccountIds' in kwargs: + storage_account_ids = kwargs['storageAccountIds'] + if workspace_resource_id is None and 'workspaceResourceId' in kwargs: + workspace_resource_id = kwargs['workspaceResourceId'] + if data_source_type is not None: - pulumi.set(__self__, "data_source_type", data_source_type) + _setter("data_source_type", data_source_type) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if storage_account_ids is not None: - pulumi.set(__self__, "storage_account_ids", storage_account_ids) + _setter("storage_account_ids", storage_account_ids) if workspace_resource_id is not None: - pulumi.set(__self__, "workspace_resource_id", workspace_resource_id) + _setter("workspace_resource_id", workspace_resource_id) @property @pulumi.getter(name="dataSourceType") @@ -262,6 +320,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedStorageAccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/loganalytics/outputs.py b/sdk/python/pulumi_azure/loganalytics/outputs.py index c6ce4e08cd..36a2741038 100644 --- a/sdk/python/pulumi_azure/loganalytics/outputs.py +++ b/sdk/python/pulumi_azure/loganalytics/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -45,11 +45,32 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ClusterIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/loganalytics/query_pack.py b/sdk/python/pulumi_azure/loganalytics/query_pack.py index 5a4b452261..8be4ac12c1 100644 --- a/sdk/python/pulumi_azure/loganalytics/query_pack.py +++ b/sdk/python/pulumi_azure/loganalytics/query_pack.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['QueryPackArgs', 'QueryPack'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Log Analytics Query Pack. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Log Analytics Query Pack. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + QueryPackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -96,14 +117,33 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Log Analytics Query Pack should exist. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Log Analytics Query Pack. """ + _QueryPackState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -233,6 +273,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + QueryPackArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/loganalytics/saved_search.py b/sdk/python/pulumi_azure/loganalytics/saved_search.py index 53e75d850d..cf004a4b03 100644 --- a/sdk/python/pulumi_azure/loganalytics/saved_search.py +++ b/sdk/python/pulumi_azure/loganalytics/saved_search.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SavedSearchArgs', 'SavedSearch'] @@ -33,18 +33,59 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Log Analytics Saved Search. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Logs Analytics Saved Search. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "category", category) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "query", query) + SavedSearchArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + display_name=display_name, + log_analytics_workspace_id=log_analytics_workspace_id, + query=query, + function_alias=function_alias, + function_parameters=function_parameters, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + query: Optional[pulumi.Input[str]] = None, + function_alias: Optional[pulumi.Input[str]] = None, + function_parameters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category is None: + raise TypeError("Missing 'category' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if query is None: + raise TypeError("Missing 'query' argument") + if function_alias is None and 'functionAlias' in kwargs: + function_alias = kwargs['functionAlias'] + if function_parameters is None and 'functionParameters' in kwargs: + function_parameters = kwargs['functionParameters'] + + _setter("category", category) + _setter("display_name", display_name) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("query", query) if function_alias is not None: - pulumi.set(__self__, "function_alias", function_alias) + _setter("function_alias", function_alias) if function_parameters is not None: - pulumi.set(__self__, "function_parameters", function_parameters) + _setter("function_parameters", function_parameters) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -165,22 +206,55 @@ def __init__(__self__, *, :param pulumi.Input[str] query: The query expression for the saved search. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Logs Analytics Saved Search. Changing this forces a new resource to be created. """ + _SavedSearchState._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + display_name=display_name, + function_alias=function_alias, + function_parameters=function_parameters, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + query=query, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + function_alias: Optional[pulumi.Input[str]] = None, + function_parameters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + query: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if function_alias is None and 'functionAlias' in kwargs: + function_alias = kwargs['functionAlias'] + if function_parameters is None and 'functionParameters' in kwargs: + function_parameters = kwargs['functionParameters'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if category is not None: - pulumi.set(__self__, "category", category) + _setter("category", category) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if function_alias is not None: - pulumi.set(__self__, "function_alias", function_alias) + _setter("function_alias", function_alias) if function_parameters is not None: - pulumi.set(__self__, "function_parameters", function_parameters) + _setter("function_parameters", function_parameters) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if query is not None: - pulumi.set(__self__, "query", query) + _setter("query", query) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -380,6 +454,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SavedSearchArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/loganalytics/storage_insights.py b/sdk/python/pulumi_azure/loganalytics/storage_insights.py index 3238c8506e..9c368df676 100644 --- a/sdk/python/pulumi_azure/loganalytics/storage_insights.py +++ b/sdk/python/pulumi_azure/loganalytics/storage_insights.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['StorageInsightsArgs', 'StorageInsights'] @@ -31,16 +31,59 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Log Analytics Storage Insights. Changing this forces a new Log Analytics Storage Insights to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] table_names: The names of the Azure tables that the workspace should read. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "workspace_id", workspace_id) + StorageInsightsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + storage_account_id=storage_account_id, + storage_account_key=storage_account_key, + workspace_id=workspace_id, + blob_container_names=blob_container_names, + name=name, + table_names=table_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + blob_container_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + table_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if blob_container_names is None and 'blobContainerNames' in kwargs: + blob_container_names = kwargs['blobContainerNames'] + if table_names is None and 'tableNames' in kwargs: + table_names = kwargs['tableNames'] + + _setter("resource_group_name", resource_group_name) + _setter("storage_account_id", storage_account_id) + _setter("storage_account_key", storage_account_key) + _setter("workspace_id", workspace_id) if blob_container_names is not None: - pulumi.set(__self__, "blob_container_names", blob_container_names) + _setter("blob_container_names", blob_container_names) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if table_names is not None: - pulumi.set(__self__, "table_names", table_names) + _setter("table_names", table_names) @property @pulumi.getter(name="resourceGroupName") @@ -147,20 +190,55 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] table_names: The names of the Azure tables that the workspace should read. :param pulumi.Input[str] workspace_id: The ID of the Log Analytics Workspace within which the Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created. """ + _StorageInsightsState._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_container_names=blob_container_names, + name=name, + resource_group_name=resource_group_name, + storage_account_id=storage_account_id, + storage_account_key=storage_account_key, + table_names=table_names, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_container_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + table_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_container_names is None and 'blobContainerNames' in kwargs: + blob_container_names = kwargs['blobContainerNames'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if table_names is None and 'tableNames' in kwargs: + table_names = kwargs['tableNames'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if blob_container_names is not None: - pulumi.set(__self__, "blob_container_names", blob_container_names) + _setter("blob_container_names", blob_container_names) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) if table_names is not None: - pulumi.set(__self__, "table_names", table_names) + _setter("table_names", table_names) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="blobContainerNames") @@ -356,6 +434,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StorageInsightsArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/logicapps/_inputs.py b/sdk/python/pulumi_azure/logicapps/_inputs.py index 21f93945cf..9ebd13cf77 100644 --- a/sdk/python/pulumi_azure/logicapps/_inputs.py +++ b/sdk/python/pulumi_azure/logicapps/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -54,8 +54,29 @@ def __init__(__self__, *, :param pulumi.Input[str] action_name: Specifies the name of the precedent HTTP Action. :param pulumi.Input[str] action_result: Specifies the expected result of the precedent HTTP Action, only after which the current HTTP Action will be triggered. Possible values include `Succeeded`, `Failed`, `Skipped` and `TimedOut`. """ - pulumi.set(__self__, "action_name", action_name) - pulumi.set(__self__, "action_result", action_result) + ActionHttpRunAfterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_name=action_name, + action_result=action_result, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_name: Optional[pulumi.Input[str]] = None, + action_result: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_name is None and 'actionName' in kwargs: + action_name = kwargs['actionName'] + if action_name is None: + raise TypeError("Missing 'action_name' argument") + if action_result is None and 'actionResult' in kwargs: + action_result = kwargs['actionResult'] + if action_result is None: + raise TypeError("Missing 'action_result' argument") + + _setter("action_name", action_name) + _setter("action_result", action_result) @property @pulumi.getter(name="actionName") @@ -91,8 +112,25 @@ def __init__(__self__, *, :param pulumi.Input[str] qualifier: The authenticating body that provides unique guest identities to organizations. :param pulumi.Input[str] value: The value that identifies the documents that your logic apps receive. """ - pulumi.set(__self__, "qualifier", qualifier) - pulumi.set(__self__, "value", value) + IntegrationAccountAgreementGuestIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + qualifier=qualifier, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + qualifier: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if qualifier is None: + raise TypeError("Missing 'qualifier' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("qualifier", qualifier) + _setter("value", value) @property @pulumi.getter @@ -128,8 +166,25 @@ def __init__(__self__, *, :param pulumi.Input[str] qualifier: The authenticating body that provides unique host identities to organizations. :param pulumi.Input[str] value: The value that identifies the documents that your logic apps receive. """ - pulumi.set(__self__, "qualifier", qualifier) - pulumi.set(__self__, "value", value) + IntegrationAccountAgreementHostIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + qualifier=qualifier, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + qualifier: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if qualifier is None: + raise TypeError("Missing 'qualifier' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("qualifier", qualifier) + _setter("value", value) @property @pulumi.getter @@ -167,12 +222,31 @@ def __init__(__self__, *, :param pulumi.Input[int] message_count: The message count for the Logic App Integration Batch Configuration. :param pulumi.Input['IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceArgs'] recurrence: A `recurrence` block as documented below. """ + IntegrationAccountBatchConfigurationReleaseCriteriaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + batch_size=batch_size, + message_count=message_count, + recurrence=recurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + batch_size: Optional[pulumi.Input[int]] = None, + message_count: Optional[pulumi.Input[int]] = None, + recurrence: Optional[pulumi.Input['IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if batch_size is None and 'batchSize' in kwargs: + batch_size = kwargs['batchSize'] + if message_count is None and 'messageCount' in kwargs: + message_count = kwargs['messageCount'] + if batch_size is not None: - pulumi.set(__self__, "batch_size", batch_size) + _setter("batch_size", batch_size) if message_count is not None: - pulumi.set(__self__, "message_count", message_count) + _setter("message_count", message_count) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) @property @pulumi.getter(name="batchSize") @@ -228,16 +302,47 @@ def __init__(__self__, *, :param pulumi.Input[str] start_time: The start time of the schedule, formatted as an RFC3339 string. :param pulumi.Input[str] time_zone: The timezone of the start/end time. """ - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "interval", interval) + IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency=frequency, + interval=interval, + end_time=end_time, + schedule=schedule, + start_time=start_time, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[int]] = None, + end_time: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceScheduleArgs']] = None, + start_time: Optional[pulumi.Input[str]] = None, + time_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + + _setter("frequency", frequency) + _setter("interval", interval) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter @@ -327,16 +432,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceScheduleMonthlyArgs']]] monthlies: A `monthly` block as documented below. :param pulumi.Input[Sequence[pulumi.Input[str]]] week_days: A list of days of the week that the job should execute on. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. """ + IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + hours=hours, + minutes=minutes, + month_days=month_days, + monthlies=monthlies, + week_days=week_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hours: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + minutes: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + month_days: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + monthlies: Optional[pulumi.Input[Sequence[pulumi.Input['IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceScheduleMonthlyArgs']]]] = None, + week_days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if month_days is None and 'monthDays' in kwargs: + month_days = kwargs['monthDays'] + if week_days is None and 'weekDays' in kwargs: + week_days = kwargs['weekDays'] + if hours is not None: - pulumi.set(__self__, "hours", hours) + _setter("hours", hours) if minutes is not None: - pulumi.set(__self__, "minutes", minutes) + _setter("minutes", minutes) if month_days is not None: - pulumi.set(__self__, "month_days", month_days) + _setter("month_days", month_days) if monthlies is not None: - pulumi.set(__self__, "monthlies", monthlies) + _setter("monthlies", monthlies) if week_days is not None: - pulumi.set(__self__, "week_days", week_days) + _setter("week_days", week_days) @property @pulumi.getter @@ -408,8 +536,25 @@ def __init__(__self__, *, :param pulumi.Input[int] week: The occurrence of the week within the month. :param pulumi.Input[str] weekday: The day of the occurrence. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. """ - pulumi.set(__self__, "week", week) - pulumi.set(__self__, "weekday", weekday) + IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceScheduleMonthlyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + week=week, + weekday=weekday, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + week: Optional[pulumi.Input[int]] = None, + weekday: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if week is None: + raise TypeError("Missing 'week' argument") + if weekday is None: + raise TypeError("Missing 'weekday' argument") + + _setter("week", week) + _setter("weekday", weekday) @property @pulumi.getter @@ -447,10 +592,35 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_id: The ID of the Key Vault. :param pulumi.Input[str] key_version: The version of Key Vault Key. """ - pulumi.set(__self__, "key_name", key_name) - pulumi.set(__self__, "key_vault_id", key_vault_id) + IntegrationAccountCertificateKeyVaultKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_name=key_name, + key_vault_id=key_vault_id, + key_version=key_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_name: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + key_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_name is None and 'keyName' in kwargs: + key_name = kwargs['keyName'] + if key_name is None: + raise TypeError("Missing 'key_name' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if key_version is None and 'keyVersion' in kwargs: + key_version = kwargs['keyVersion'] + + _setter("key_name", key_name) + _setter("key_vault_id", key_vault_id) if key_version is not None: - pulumi.set(__self__, "key_version", key_version) + _setter("key_version", key_version) @property @pulumi.getter(name="keyName") @@ -498,8 +668,25 @@ def __init__(__self__, *, :param pulumi.Input[str] qualifier: The authenticating body that provides unique business identities to organizations. :param pulumi.Input[str] value: The value that identifies the documents that your logic apps receive. """ - pulumi.set(__self__, "qualifier", qualifier) - pulumi.set(__self__, "value", value) + IntegrationAccountPartnerBusinessIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + qualifier=qualifier, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + qualifier: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if qualifier is None: + raise TypeError("Missing 'qualifier' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("qualifier", qualifier) + _setter("value", value) @property @pulumi.getter @@ -537,9 +724,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of the Connection String. Possible values are `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure` and `SQLServer`. :param pulumi.Input[str] value: The value for the Connection String. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + StandardConnectionStringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -595,13 +803,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service. """ - pulumi.set(__self__, "type", type) + StandardIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -709,48 +942,139 @@ def __init__(__self__, *, :param pulumi.Input[bool] vnet_route_all_enabled: Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. :param pulumi.Input[bool] websockets_enabled: Should WebSockets be enabled? """ + StandardSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + app_scale_limit=app_scale_limit, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + dotnet_framework_version=dotnet_framework_version, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + min_tls_version=min_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_min_tls_version=scm_min_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[pulumi.Input[bool]] = None, + app_scale_limit: Optional[pulumi.Input[int]] = None, + auto_swap_slot_name: Optional[pulumi.Input[str]] = None, + cors: Optional[pulumi.Input['StandardSiteConfigCorsArgs']] = None, + dotnet_framework_version: Optional[pulumi.Input[str]] = None, + elastic_instance_minimum: Optional[pulumi.Input[int]] = None, + ftps_state: Optional[pulumi.Input[str]] = None, + health_check_path: Optional[pulumi.Input[str]] = None, + http2_enabled: Optional[pulumi.Input[bool]] = None, + ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['StandardSiteConfigIpRestrictionArgs']]]] = None, + linux_fx_version: Optional[pulumi.Input[str]] = None, + min_tls_version: Optional[pulumi.Input[str]] = None, + pre_warmed_instance_count: Optional[pulumi.Input[int]] = None, + runtime_scale_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + scm_ip_restrictions: Optional[pulumi.Input[Sequence[pulumi.Input['StandardSiteConfigScmIpRestrictionArgs']]]] = None, + scm_min_tls_version: Optional[pulumi.Input[str]] = None, + scm_type: Optional[pulumi.Input[str]] = None, + scm_use_main_ip_restriction: Optional[pulumi.Input[bool]] = None, + use32_bit_worker_process: Optional[pulumi.Input[bool]] = None, + vnet_route_all_enabled: Optional[pulumi.Input[bool]] = None, + websockets_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_min_tls_version is None and 'scmMinTlsVersion' in kwargs: + scm_min_tls_version = kwargs['scmMinTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if dotnet_framework_version is not None: - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) + _setter("dotnet_framework_version", dotnet_framework_version) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_min_tls_version is not None: - pulumi.set(__self__, "scm_min_tls_version", scm_min_tls_version) + _setter("scm_min_tls_version", scm_min_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker_process is not None: - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) + _setter("use32_bit_worker_process", use32_bit_worker_process) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) @property @pulumi.getter(name="alwaysOn") @@ -1020,9 +1344,28 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls. :param pulumi.Input[bool] support_credentials: Are credentials supported? """ - pulumi.set(__self__, "allowed_origins", allowed_origins) + StandardSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + support_credentials: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -1070,20 +1413,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + StandardSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['StandardSiteConfigIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -1185,14 +1557,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + StandardSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -1264,20 +1661,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + StandardSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input['StandardSiteConfigScmIpRestrictionHeadersArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + service_tag: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -1379,14 +1805,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param pulumi.Input[Sequence[pulumi.Input[str]]] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + StandardSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_fd_health_probe: Optional[pulumi.Input[str]] = None, + x_forwarded_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_forwarded_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -1446,10 +1897,23 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password associated with the username, which can be used to publish to this App Service. :param pulumi.Input[str] username: The username which can be used to publish to this App Service """ + StandardSiteCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -1487,12 +1951,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[int]]] at_these_minutes: Specifies a list of minutes when the trigger should run. Valid values are between 0 and 59. :param pulumi.Input[Sequence[pulumi.Input[str]]] on_these_days: Specifies a list of days when the trigger should run. Valid values include `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, and `Sunday`. """ + TriggerRecurrenceScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + at_these_hours=at_these_hours, + at_these_minutes=at_these_minutes, + on_these_days=on_these_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + at_these_hours: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + at_these_minutes: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + on_these_days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if at_these_hours is None and 'atTheseHours' in kwargs: + at_these_hours = kwargs['atTheseHours'] + if at_these_minutes is None and 'atTheseMinutes' in kwargs: + at_these_minutes = kwargs['atTheseMinutes'] + if on_these_days is None and 'onTheseDays' in kwargs: + on_these_days = kwargs['onTheseDays'] + if at_these_hours is not None: - pulumi.set(__self__, "at_these_hours", at_these_hours) + _setter("at_these_hours", at_these_hours) if at_these_minutes is not None: - pulumi.set(__self__, "at_these_minutes", at_these_minutes) + _setter("at_these_minutes", at_these_minutes) if on_these_days is not None: - pulumi.set(__self__, "on_these_days", on_these_days) + _setter("on_these_days", on_these_days) @property @pulumi.getter(name="atTheseHours") @@ -1544,14 +2029,33 @@ def __init__(__self__, *, :param pulumi.Input['WorkflowAccessControlTriggerArgs'] trigger: A `trigger` block as defined below. :param pulumi.Input['WorkflowAccessControlWorkflowManagementArgs'] workflow_management: A `workflow_management` block as defined below. """ + WorkflowAccessControlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + content=content, + trigger=trigger, + workflow_management=workflow_management, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input['WorkflowAccessControlActionArgs']] = None, + content: Optional[pulumi.Input['WorkflowAccessControlContentArgs']] = None, + trigger: Optional[pulumi.Input['WorkflowAccessControlTriggerArgs']] = None, + workflow_management: Optional[pulumi.Input['WorkflowAccessControlWorkflowManagementArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if workflow_management is None and 'workflowManagement' in kwargs: + workflow_management = kwargs['workflowManagement'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if trigger is not None: - pulumi.set(__self__, "trigger", trigger) + _setter("trigger", trigger) if workflow_management is not None: - pulumi.set(__self__, "workflow_management", workflow_management) + _setter("workflow_management", workflow_management) @property @pulumi.getter @@ -1609,7 +2113,22 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_caller_ip_address_ranges: A list of the allowed caller IP address ranges. """ - pulumi.set(__self__, "allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) + WorkflowAccessControlActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_caller_ip_address_ranges=allowed_caller_ip_address_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_caller_ip_address_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_caller_ip_address_ranges is None and 'allowedCallerIpAddressRanges' in kwargs: + allowed_caller_ip_address_ranges = kwargs['allowedCallerIpAddressRanges'] + if allowed_caller_ip_address_ranges is None: + raise TypeError("Missing 'allowed_caller_ip_address_ranges' argument") + + _setter("allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) @property @pulumi.getter(name="allowedCallerIpAddressRanges") @@ -1631,7 +2150,22 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_caller_ip_address_ranges: A list of the allowed caller IP address ranges. """ - pulumi.set(__self__, "allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) + WorkflowAccessControlContentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_caller_ip_address_ranges=allowed_caller_ip_address_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_caller_ip_address_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_caller_ip_address_ranges is None and 'allowedCallerIpAddressRanges' in kwargs: + allowed_caller_ip_address_ranges = kwargs['allowedCallerIpAddressRanges'] + if allowed_caller_ip_address_ranges is None: + raise TypeError("Missing 'allowed_caller_ip_address_ranges' argument") + + _setter("allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) @property @pulumi.getter(name="allowedCallerIpAddressRanges") @@ -1655,9 +2189,28 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_caller_ip_address_ranges: A list of the allowed caller IP address ranges. :param pulumi.Input[Sequence[pulumi.Input['WorkflowAccessControlTriggerOpenAuthenticationPolicyArgs']]] open_authentication_policies: A `open_authentication_policy` block as defined below. """ - pulumi.set(__self__, "allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) + WorkflowAccessControlTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_caller_ip_address_ranges=allowed_caller_ip_address_ranges, + open_authentication_policies=open_authentication_policies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_caller_ip_address_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + open_authentication_policies: Optional[pulumi.Input[Sequence[pulumi.Input['WorkflowAccessControlTriggerOpenAuthenticationPolicyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_caller_ip_address_ranges is None and 'allowedCallerIpAddressRanges' in kwargs: + allowed_caller_ip_address_ranges = kwargs['allowedCallerIpAddressRanges'] + if allowed_caller_ip_address_ranges is None: + raise TypeError("Missing 'allowed_caller_ip_address_ranges' argument") + if open_authentication_policies is None and 'openAuthenticationPolicies' in kwargs: + open_authentication_policies = kwargs['openAuthenticationPolicies'] + + _setter("allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) if open_authentication_policies is not None: - pulumi.set(__self__, "open_authentication_policies", open_authentication_policies) + _setter("open_authentication_policies", open_authentication_policies) @property @pulumi.getter(name="allowedCallerIpAddressRanges") @@ -1693,8 +2246,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['WorkflowAccessControlTriggerOpenAuthenticationPolicyClaimArgs']]] claims: A `claim` block as defined below. :param pulumi.Input[str] name: The OAuth policy name for the Logic App Workflow. """ - pulumi.set(__self__, "claims", claims) - pulumi.set(__self__, "name", name) + WorkflowAccessControlTriggerOpenAuthenticationPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + claims=claims, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + claims: Optional[pulumi.Input[Sequence[pulumi.Input['WorkflowAccessControlTriggerOpenAuthenticationPolicyClaimArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if claims is None: + raise TypeError("Missing 'claims' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("claims", claims) + _setter("name", name) @property @pulumi.getter @@ -1730,8 +2300,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the OAuth policy claim for the Logic App Workflow. :param pulumi.Input[str] value: The value of the OAuth policy claim for the Logic App Workflow. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + WorkflowAccessControlTriggerOpenAuthenticationPolicyClaimArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1765,7 +2352,22 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_caller_ip_address_ranges: A list of the allowed caller IP address ranges. """ - pulumi.set(__self__, "allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) + WorkflowAccessControlWorkflowManagementArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_caller_ip_address_ranges=allowed_caller_ip_address_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_caller_ip_address_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_caller_ip_address_ranges is None and 'allowedCallerIpAddressRanges' in kwargs: + allowed_caller_ip_address_ranges = kwargs['allowedCallerIpAddressRanges'] + if allowed_caller_ip_address_ranges is None: + raise TypeError("Missing 'allowed_caller_ip_address_ranges' argument") + + _setter("allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) @property @pulumi.getter(name="allowedCallerIpAddressRanges") @@ -1795,13 +2397,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Logic App Workflow. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this Logic App Workflow. """ - pulumi.set(__self__, "type", type) + WorkflowIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1878,35 +2505,152 @@ def __init__(__self__, *, scm_use_main_ip_restriction: Optional[bool] = None, use32_bit_worker_process: Optional[bool] = None, websockets_enabled: Optional[bool] = None): - pulumi.set(__self__, "app_scale_limit", app_scale_limit) - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) - pulumi.set(__self__, "cors", cors) - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) - pulumi.set(__self__, "ftps_state", ftps_state) - pulumi.set(__self__, "ip_restrictions", ip_restrictions) - pulumi.set(__self__, "linux_fx_version", linux_fx_version) - pulumi.set(__self__, "min_tls_version", min_tls_version) - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) - pulumi.set(__self__, "scm_min_tls_version", scm_min_tls_version) - pulumi.set(__self__, "scm_type", scm_type) - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + GetStandardSiteConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_scale_limit=app_scale_limit, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + min_tls_version=min_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + scm_ip_restrictions=scm_ip_restrictions, + scm_min_tls_version=scm_min_tls_version, + scm_type=scm_type, + vnet_route_all_enabled=vnet_route_all_enabled, + always_on=always_on, + dotnet_framework_version=dotnet_framework_version, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + websockets_enabled=websockets_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_scale_limit: Optional[int] = None, + auto_swap_slot_name: Optional[str] = None, + cors: Optional['GetStandardSiteConfigCorsArgs'] = None, + elastic_instance_minimum: Optional[int] = None, + ftps_state: Optional[str] = None, + ip_restrictions: Optional[Sequence['GetStandardSiteConfigIpRestrictionArgs']] = None, + linux_fx_version: Optional[str] = None, + min_tls_version: Optional[str] = None, + pre_warmed_instance_count: Optional[int] = None, + scm_ip_restrictions: Optional[Sequence['GetStandardSiteConfigScmIpRestrictionArgs']] = None, + scm_min_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + vnet_route_all_enabled: Optional[bool] = None, + always_on: Optional[bool] = None, + dotnet_framework_version: Optional[str] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + runtime_scale_monitoring_enabled: Optional[bool] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker_process: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if app_scale_limit is None: + raise TypeError("Missing 'app_scale_limit' argument") + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if auto_swap_slot_name is None: + raise TypeError("Missing 'auto_swap_slot_name' argument") + if cors is None: + raise TypeError("Missing 'cors' argument") + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if elastic_instance_minimum is None: + raise TypeError("Missing 'elastic_instance_minimum' argument") + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if ftps_state is None: + raise TypeError("Missing 'ftps_state' argument") + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if ip_restrictions is None: + raise TypeError("Missing 'ip_restrictions' argument") + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if linux_fx_version is None: + raise TypeError("Missing 'linux_fx_version' argument") + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if min_tls_version is None: + raise TypeError("Missing 'min_tls_version' argument") + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if pre_warmed_instance_count is None: + raise TypeError("Missing 'pre_warmed_instance_count' argument") + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_ip_restrictions is None: + raise TypeError("Missing 'scm_ip_restrictions' argument") + if scm_min_tls_version is None and 'scmMinTlsVersion' in kwargs: + scm_min_tls_version = kwargs['scmMinTlsVersion'] + if scm_min_tls_version is None: + raise TypeError("Missing 'scm_min_tls_version' argument") + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_type is None: + raise TypeError("Missing 'scm_type' argument") + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if vnet_route_all_enabled is None: + raise TypeError("Missing 'vnet_route_all_enabled' argument") + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + + _setter("app_scale_limit", app_scale_limit) + _setter("auto_swap_slot_name", auto_swap_slot_name) + _setter("cors", cors) + _setter("elastic_instance_minimum", elastic_instance_minimum) + _setter("ftps_state", ftps_state) + _setter("ip_restrictions", ip_restrictions) + _setter("linux_fx_version", linux_fx_version) + _setter("min_tls_version", min_tls_version) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) + _setter("scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_min_tls_version", scm_min_tls_version) + _setter("scm_type", scm_type) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if dotnet_framework_version is not None: - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) + _setter("dotnet_framework_version", dotnet_framework_version) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker_process is not None: - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) + _setter("use32_bit_worker_process", use32_bit_worker_process) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) @property @pulumi.getter(name="appScaleLimit") @@ -2103,9 +2847,28 @@ class GetStandardSiteConfigCorsArgs: def __init__(__self__, *, allowed_origins: Sequence[str], support_credentials: Optional[bool] = None): - pulumi.set(__self__, "allowed_origins", allowed_origins) + GetStandardSiteConfigCorsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -2139,18 +2902,51 @@ def __init__(__self__, *, """ :param str name: The name of this Logic App. """ - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "name", name) + GetStandardSiteConfigIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + name=name, + action=action, + ip_address=ip_address, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional['GetStandardSiteConfigIpRestrictionHeadersArgs'] = None, + name: Optional[str] = None, + action: Optional[str] = None, + ip_address: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if headers is None: + raise TypeError("Missing 'headers' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + + _setter("headers", headers) + _setter("name", name) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -2226,14 +3022,39 @@ def __init__(__self__, *, x_fd_health_probe: Optional[str] = None, x_forwarded_fors: Optional[Sequence[str]] = None, x_forwarded_hosts: Optional[Sequence[str]] = None): + GetStandardSiteConfigIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -2285,18 +3106,51 @@ def __init__(__self__, *, """ :param str name: The name of this Logic App. """ - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "name", name) + GetStandardSiteConfigScmIpRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + name=name, + action=action, + ip_address=ip_address, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional['GetStandardSiteConfigScmIpRestrictionHeadersArgs'] = None, + name: Optional[str] = None, + action: Optional[str] = None, + ip_address: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if headers is None: + raise TypeError("Missing 'headers' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + + _setter("headers", headers) + _setter("name", name) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -2372,14 +3226,39 @@ def __init__(__self__, *, x_fd_health_probe: Optional[str] = None, x_forwarded_fors: Optional[Sequence[str]] = None, x_forwarded_hosts: Optional[Sequence[str]] = None): + GetStandardSiteConfigScmIpRestrictionHeadersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") diff --git a/sdk/python/pulumi_azure/logicapps/action_custom.py b/sdk/python/pulumi_azure/logicapps/action_custom.py index 32a64adac4..1d09f3cbdb 100644 --- a/sdk/python/pulumi_azure/logicapps/action_custom.py +++ b/sdk/python/pulumi_azure/logicapps/action_custom.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ActionCustomArgs', 'ActionCustom'] @@ -25,10 +25,31 @@ def __init__(__self__, *, > **NOTE:** This name must be unique across all Actions within the Logic App Workflow. """ - pulumi.set(__self__, "body", body) - pulumi.set(__self__, "logic_app_id", logic_app_id) + ActionCustomArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + body=body, + logic_app_id=logic_app_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body: Optional[pulumi.Input[str]] = None, + logic_app_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body is None: + raise TypeError("Missing 'body' argument") + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if logic_app_id is None: + raise TypeError("Missing 'logic_app_id' argument") + + _setter("body", body) + _setter("logic_app_id", logic_app_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -83,12 +104,29 @@ def __init__(__self__, *, > **NOTE:** This name must be unique across all Actions within the Logic App Workflow. """ + _ActionCustomState._configure( + lambda key, value: pulumi.set(__self__, key, value), + body=body, + logic_app_id=logic_app_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body: Optional[pulumi.Input[str]] = None, + logic_app_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if body is not None: - pulumi.set(__self__, "body", body) + _setter("body", body) if logic_app_id is not None: - pulumi.set(__self__, "logic_app_id", logic_app_id) + _setter("logic_app_id", logic_app_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -242,6 +280,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ActionCustomArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/logicapps/action_http.py b/sdk/python/pulumi_azure/logicapps/action_http.py index be351791ef..3d15e555ad 100644 --- a/sdk/python/pulumi_azure/logicapps/action_http.py +++ b/sdk/python/pulumi_azure/logicapps/action_http.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,19 +37,54 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] queries: Specifies a Map of Key-Value Pairs that should be sent to the `uri` when this HTTP Action is triggered. :param pulumi.Input[Sequence[pulumi.Input['ActionHttpRunAfterArgs']]] run_afters: Specifies the place of the HTTP Action in the Logic App Workflow. If not specified, the HTTP Action is right after the Trigger. A `run_after` block is as defined below. """ - pulumi.set(__self__, "logic_app_id", logic_app_id) - pulumi.set(__self__, "method", method) - pulumi.set(__self__, "uri", uri) + ActionHttpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + logic_app_id=logic_app_id, + method=method, + uri=uri, + body=body, + headers=headers, + name=name, + queries=queries, + run_afters=run_afters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + logic_app_id: Optional[pulumi.Input[str]] = None, + method: Optional[pulumi.Input[str]] = None, + uri: Optional[pulumi.Input[str]] = None, + body: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + queries: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + run_afters: Optional[pulumi.Input[Sequence[pulumi.Input['ActionHttpRunAfterArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if logic_app_id is None: + raise TypeError("Missing 'logic_app_id' argument") + if method is None: + raise TypeError("Missing 'method' argument") + if uri is None: + raise TypeError("Missing 'uri' argument") + if run_afters is None and 'runAfters' in kwargs: + run_afters = kwargs['runAfters'] + + _setter("logic_app_id", logic_app_id) + _setter("method", method) + _setter("uri", uri) if body is not None: - pulumi.set(__self__, "body", body) + _setter("body", body) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if queries is not None: - pulumi.set(__self__, "queries", queries) + _setter("queries", queries) if run_afters is not None: - pulumi.set(__self__, "run_afters", run_afters) + _setter("run_afters", run_afters) @property @pulumi.getter(name="logicAppId") @@ -174,22 +209,51 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ActionHttpRunAfterArgs']]] run_afters: Specifies the place of the HTTP Action in the Logic App Workflow. If not specified, the HTTP Action is right after the Trigger. A `run_after` block is as defined below. :param pulumi.Input[str] uri: Specifies the URI which will be called when this HTTP Action is triggered. """ + _ActionHttpState._configure( + lambda key, value: pulumi.set(__self__, key, value), + body=body, + headers=headers, + logic_app_id=logic_app_id, + method=method, + name=name, + queries=queries, + run_afters=run_afters, + uri=uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body: Optional[pulumi.Input[str]] = None, + headers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + logic_app_id: Optional[pulumi.Input[str]] = None, + method: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + queries: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + run_afters: Optional[pulumi.Input[Sequence[pulumi.Input['ActionHttpRunAfterArgs']]]] = None, + uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if run_afters is None and 'runAfters' in kwargs: + run_afters = kwargs['runAfters'] + if body is not None: - pulumi.set(__self__, "body", body) + _setter("body", body) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if logic_app_id is not None: - pulumi.set(__self__, "logic_app_id", logic_app_id) + _setter("logic_app_id", logic_app_id) if method is not None: - pulumi.set(__self__, "method", method) + _setter("method", method) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if queries is not None: - pulumi.set(__self__, "queries", queries) + _setter("queries", queries) if run_afters is not None: - pulumi.set(__self__, "run_afters", run_afters) + _setter("run_afters", run_afters) if uri is not None: - pulumi.set(__self__, "uri", uri) + _setter("uri", uri) @property @pulumi.getter @@ -387,6 +451,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ActionHttpArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/logicapps/get_integration_account.py b/sdk/python/pulumi_azure/logicapps/get_integration_account.py index 07376f127e..87c322873c 100644 --- a/sdk/python/pulumi_azure/logicapps/get_integration_account.py +++ b/sdk/python/pulumi_azure/logicapps/get_integration_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/logicapps/get_standard.py b/sdk/python/pulumi_azure/logicapps/get_standard.py index 9c2a7091a7..d2627814ac 100644 --- a/sdk/python/pulumi_azure/logicapps/get_standard.py +++ b/sdk/python/pulumi_azure/logicapps/get_standard.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * diff --git a/sdk/python/pulumi_azure/logicapps/get_workflow.py b/sdk/python/pulumi_azure/logicapps/get_workflow.py index 7bf7b289b0..6242d7aa12 100644 --- a/sdk/python/pulumi_azure/logicapps/get_workflow.py +++ b/sdk/python/pulumi_azure/logicapps/get_workflow.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/logicapps/integration_account.py b/sdk/python/pulumi_azure/logicapps/integration_account.py index 421d7757ec..09cb9c2691 100644 --- a/sdk/python/pulumi_azure/logicapps/integration_account.py +++ b/sdk/python/pulumi_azure/logicapps/integration_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IntegrationAccountArgs', 'IntegrationAccount'] @@ -29,16 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account. Changing this forces a new Logic App Integration Account to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Logic App Integration Account. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + IntegrationAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + integration_service_environment_id=integration_service_environment_id, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + integration_service_environment_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if integration_service_environment_id is None and 'integrationServiceEnvironmentId' in kwargs: + integration_service_environment_id = kwargs['integrationServiceEnvironmentId'] + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if integration_service_environment_id is not None: - pulumi.set(__self__, "integration_service_environment_id", integration_service_environment_id) + _setter("integration_service_environment_id", integration_service_environment_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -131,18 +162,45 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_name: The SKU name of the Logic App Integration Account. Possible Values are `Basic`, `Free` and `Standard`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Logic App Integration Account. """ + _IntegrationAccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + integration_service_environment_id=integration_service_environment_id, + location=location, + name=name, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + integration_service_environment_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if integration_service_environment_id is None and 'integrationServiceEnvironmentId' in kwargs: + integration_service_environment_id = kwargs['integrationServiceEnvironmentId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if integration_service_environment_id is not None: - pulumi.set(__self__, "integration_service_environment_id", integration_service_environment_id) + _setter("integration_service_environment_id", integration_service_environment_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="integrationServiceEnvironmentId") @@ -308,6 +366,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationAccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/logicapps/integration_account_agreement.py b/sdk/python/pulumi_azure/logicapps/integration_account_agreement.py index e254c4ded2..3342d31ea9 100644 --- a/sdk/python/pulumi_azure/logicapps/integration_account_agreement.py +++ b/sdk/python/pulumi_azure/logicapps/integration_account_agreement.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,18 +39,77 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] metadata: The metadata of the Logic App Integration Account Agreement. :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Agreement. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "agreement_type", agreement_type) - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "guest_identity", guest_identity) - pulumi.set(__self__, "guest_partner_name", guest_partner_name) - pulumi.set(__self__, "host_identity", host_identity) - pulumi.set(__self__, "host_partner_name", host_partner_name) - pulumi.set(__self__, "integration_account_name", integration_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IntegrationAccountAgreementArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + agreement_type=agreement_type, + content=content, + guest_identity=guest_identity, + guest_partner_name=guest_partner_name, + host_identity=host_identity, + host_partner_name=host_partner_name, + integration_account_name=integration_account_name, + resource_group_name=resource_group_name, + metadata=metadata, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + agreement_type: Optional[pulumi.Input[str]] = None, + content: Optional[pulumi.Input[str]] = None, + guest_identity: Optional[pulumi.Input['IntegrationAccountAgreementGuestIdentityArgs']] = None, + guest_partner_name: Optional[pulumi.Input[str]] = None, + host_identity: Optional[pulumi.Input['IntegrationAccountAgreementHostIdentityArgs']] = None, + host_partner_name: Optional[pulumi.Input[str]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if agreement_type is None and 'agreementType' in kwargs: + agreement_type = kwargs['agreementType'] + if agreement_type is None: + raise TypeError("Missing 'agreement_type' argument") + if content is None: + raise TypeError("Missing 'content' argument") + if guest_identity is None and 'guestIdentity' in kwargs: + guest_identity = kwargs['guestIdentity'] + if guest_identity is None: + raise TypeError("Missing 'guest_identity' argument") + if guest_partner_name is None and 'guestPartnerName' in kwargs: + guest_partner_name = kwargs['guestPartnerName'] + if guest_partner_name is None: + raise TypeError("Missing 'guest_partner_name' argument") + if host_identity is None and 'hostIdentity' in kwargs: + host_identity = kwargs['hostIdentity'] + if host_identity is None: + raise TypeError("Missing 'host_identity' argument") + if host_partner_name is None and 'hostPartnerName' in kwargs: + host_partner_name = kwargs['hostPartnerName'] + if host_partner_name is None: + raise TypeError("Missing 'host_partner_name' argument") + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if integration_account_name is None: + raise TypeError("Missing 'integration_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("agreement_type", agreement_type) + _setter("content", content) + _setter("guest_identity", guest_identity) + _setter("guest_partner_name", guest_partner_name) + _setter("host_identity", host_identity) + _setter("host_partner_name", host_partner_name) + _setter("integration_account_name", integration_account_name) + _setter("resource_group_name", resource_group_name) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="agreementType") @@ -199,26 +258,69 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Agreement. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Logic App Integration Account Agreement should exist. Changing this forces a new resource to be created. """ + _IntegrationAccountAgreementState._configure( + lambda key, value: pulumi.set(__self__, key, value), + agreement_type=agreement_type, + content=content, + guest_identity=guest_identity, + guest_partner_name=guest_partner_name, + host_identity=host_identity, + host_partner_name=host_partner_name, + integration_account_name=integration_account_name, + metadata=metadata, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + agreement_type: Optional[pulumi.Input[str]] = None, + content: Optional[pulumi.Input[str]] = None, + guest_identity: Optional[pulumi.Input['IntegrationAccountAgreementGuestIdentityArgs']] = None, + guest_partner_name: Optional[pulumi.Input[str]] = None, + host_identity: Optional[pulumi.Input['IntegrationAccountAgreementHostIdentityArgs']] = None, + host_partner_name: Optional[pulumi.Input[str]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if agreement_type is None and 'agreementType' in kwargs: + agreement_type = kwargs['agreementType'] + if guest_identity is None and 'guestIdentity' in kwargs: + guest_identity = kwargs['guestIdentity'] + if guest_partner_name is None and 'guestPartnerName' in kwargs: + guest_partner_name = kwargs['guestPartnerName'] + if host_identity is None and 'hostIdentity' in kwargs: + host_identity = kwargs['hostIdentity'] + if host_partner_name is None and 'hostPartnerName' in kwargs: + host_partner_name = kwargs['hostPartnerName'] + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if agreement_type is not None: - pulumi.set(__self__, "agreement_type", agreement_type) + _setter("agreement_type", agreement_type) if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if guest_identity is not None: - pulumi.set(__self__, "guest_identity", guest_identity) + _setter("guest_identity", guest_identity) if guest_partner_name is not None: - pulumi.set(__self__, "guest_partner_name", guest_partner_name) + _setter("guest_partner_name", guest_partner_name) if host_identity is not None: - pulumi.set(__self__, "host_identity", host_identity) + _setter("host_identity", host_identity) if host_partner_name is not None: - pulumi.set(__self__, "host_partner_name", host_partner_name) + _setter("host_partner_name", host_partner_name) if integration_account_name is not None: - pulumi.set(__self__, "integration_account_name", integration_account_name) + _setter("integration_account_name", integration_account_name) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="agreementType") @@ -492,6 +594,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationAccountAgreementArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -522,12 +628,22 @@ def _internal_init(__self__, if content is None and not opts.urn: raise TypeError("Missing required property 'content'") __props__.__dict__["content"] = content + if guest_identity is not None and not isinstance(guest_identity, IntegrationAccountAgreementGuestIdentityArgs): + guest_identity = guest_identity or {} + def _setter(key, value): + guest_identity[key] = value + IntegrationAccountAgreementGuestIdentityArgs._configure(_setter, **guest_identity) if guest_identity is None and not opts.urn: raise TypeError("Missing required property 'guest_identity'") __props__.__dict__["guest_identity"] = guest_identity if guest_partner_name is None and not opts.urn: raise TypeError("Missing required property 'guest_partner_name'") __props__.__dict__["guest_partner_name"] = guest_partner_name + if host_identity is not None and not isinstance(host_identity, IntegrationAccountAgreementHostIdentityArgs): + host_identity = host_identity or {} + def _setter(key, value): + host_identity[key] = value + IntegrationAccountAgreementHostIdentityArgs._configure(_setter, **host_identity) if host_identity is None and not opts.urn: raise TypeError("Missing required property 'host_identity'") __props__.__dict__["host_identity"] = host_identity diff --git a/sdk/python/pulumi_azure/logicapps/integration_account_assembly.py b/sdk/python/pulumi_azure/logicapps/integration_account_assembly.py index 4f4cf757f2..562b9bfa40 100644 --- a/sdk/python/pulumi_azure/logicapps/integration_account_assembly.py +++ b/sdk/python/pulumi_azure/logicapps/integration_account_assembly.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IntegrationAccountAssemblyArgs', 'IntegrationAccountAssembly'] @@ -33,19 +33,60 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] metadata: The metadata of the Logic App Integration Account Assembly. :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Assembly Artifact. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "assembly_name", assembly_name) - pulumi.set(__self__, "integration_account_name", integration_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IntegrationAccountAssemblyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + assembly_name=assembly_name, + integration_account_name=integration_account_name, + resource_group_name=resource_group_name, + assembly_version=assembly_version, + content=content, + content_link_uri=content_link_uri, + metadata=metadata, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assembly_name: Optional[pulumi.Input[str]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + assembly_version: Optional[pulumi.Input[str]] = None, + content: Optional[pulumi.Input[str]] = None, + content_link_uri: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assembly_name is None and 'assemblyName' in kwargs: + assembly_name = kwargs['assemblyName'] + if assembly_name is None: + raise TypeError("Missing 'assembly_name' argument") + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if integration_account_name is None: + raise TypeError("Missing 'integration_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if assembly_version is None and 'assemblyVersion' in kwargs: + assembly_version = kwargs['assemblyVersion'] + if content_link_uri is None and 'contentLinkUri' in kwargs: + content_link_uri = kwargs['contentLinkUri'] + + _setter("assembly_name", assembly_name) + _setter("integration_account_name", integration_account_name) + _setter("resource_group_name", resource_group_name) if assembly_version is not None: - pulumi.set(__self__, "assembly_version", assembly_version) + _setter("assembly_version", assembly_version) if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if content_link_uri is not None: - pulumi.set(__self__, "content_link_uri", content_link_uri) + _setter("content_link_uri", content_link_uri) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="assemblyName") @@ -166,22 +207,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Assembly Artifact. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Logic App Integration Account Assembly Artifact should exist. Changing this forces a new resource to be created. """ + _IntegrationAccountAssemblyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + assembly_name=assembly_name, + assembly_version=assembly_version, + content=content, + content_link_uri=content_link_uri, + integration_account_name=integration_account_name, + metadata=metadata, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assembly_name: Optional[pulumi.Input[str]] = None, + assembly_version: Optional[pulumi.Input[str]] = None, + content: Optional[pulumi.Input[str]] = None, + content_link_uri: Optional[pulumi.Input[str]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assembly_name is None and 'assemblyName' in kwargs: + assembly_name = kwargs['assemblyName'] + if assembly_version is None and 'assemblyVersion' in kwargs: + assembly_version = kwargs['assemblyVersion'] + if content_link_uri is None and 'contentLinkUri' in kwargs: + content_link_uri = kwargs['contentLinkUri'] + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if assembly_name is not None: - pulumi.set(__self__, "assembly_name", assembly_name) + _setter("assembly_name", assembly_name) if assembly_version is not None: - pulumi.set(__self__, "assembly_version", assembly_version) + _setter("assembly_version", assembly_version) if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if content_link_uri is not None: - pulumi.set(__self__, "content_link_uri", content_link_uri) + _setter("content_link_uri", content_link_uri) if integration_account_name is not None: - pulumi.set(__self__, "integration_account_name", integration_account_name) + _setter("integration_account_name", integration_account_name) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="assemblyName") @@ -381,6 +457,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationAccountAssemblyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/logicapps/integration_account_batch_configuration.py b/sdk/python/pulumi_azure/logicapps/integration_account_batch_configuration.py index 5bcb57a117..89c39d8687 100644 --- a/sdk/python/pulumi_azure/logicapps/integration_account_batch_configuration.py +++ b/sdk/python/pulumi_azure/logicapps/integration_account_batch_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,14 +31,51 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] metadata: A JSON mapping of any Metadata for this Logic App Integration Account Batch Configuration. :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Batch Configuration. Only Alphanumeric characters allowed. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "batch_group_name", batch_group_name) - pulumi.set(__self__, "integration_account_name", integration_account_name) - pulumi.set(__self__, "release_criteria", release_criteria) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IntegrationAccountBatchConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + batch_group_name=batch_group_name, + integration_account_name=integration_account_name, + release_criteria=release_criteria, + resource_group_name=resource_group_name, + metadata=metadata, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + batch_group_name: Optional[pulumi.Input[str]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + release_criteria: Optional[pulumi.Input['IntegrationAccountBatchConfigurationReleaseCriteriaArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if batch_group_name is None and 'batchGroupName' in kwargs: + batch_group_name = kwargs['batchGroupName'] + if batch_group_name is None: + raise TypeError("Missing 'batch_group_name' argument") + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if integration_account_name is None: + raise TypeError("Missing 'integration_account_name' argument") + if release_criteria is None and 'releaseCriteria' in kwargs: + release_criteria = kwargs['releaseCriteria'] + if release_criteria is None: + raise TypeError("Missing 'release_criteria' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("batch_group_name", batch_group_name) + _setter("integration_account_name", integration_account_name) + _setter("release_criteria", release_criteria) + _setter("resource_group_name", resource_group_name) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="batchGroupName") @@ -131,18 +168,47 @@ def __init__(__self__, *, :param pulumi.Input['IntegrationAccountBatchConfigurationReleaseCriteriaArgs'] release_criteria: A `release_criteria` block as documented below, which is used to select the criteria to meet before processing each batch. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Logic App Integration Account Batch Configuration should exist. Changing this forces a new resource to be created. """ + _IntegrationAccountBatchConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + batch_group_name=batch_group_name, + integration_account_name=integration_account_name, + metadata=metadata, + name=name, + release_criteria=release_criteria, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + batch_group_name: Optional[pulumi.Input[str]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + release_criteria: Optional[pulumi.Input['IntegrationAccountBatchConfigurationReleaseCriteriaArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if batch_group_name is None and 'batchGroupName' in kwargs: + batch_group_name = kwargs['batchGroupName'] + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if release_criteria is None and 'releaseCriteria' in kwargs: + release_criteria = kwargs['releaseCriteria'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if batch_group_name is not None: - pulumi.set(__self__, "batch_group_name", batch_group_name) + _setter("batch_group_name", batch_group_name) if integration_account_name is not None: - pulumi.set(__self__, "integration_account_name", integration_account_name) + _setter("integration_account_name", integration_account_name) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if release_criteria is not None: - pulumi.set(__self__, "release_criteria", release_criteria) + _setter("release_criteria", release_criteria) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="batchGroupName") @@ -316,6 +382,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationAccountBatchConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -344,6 +414,11 @@ def _internal_init(__self__, __props__.__dict__["integration_account_name"] = integration_account_name __props__.__dict__["metadata"] = metadata __props__.__dict__["name"] = name + if release_criteria is not None and not isinstance(release_criteria, IntegrationAccountBatchConfigurationReleaseCriteriaArgs): + release_criteria = release_criteria or {} + def _setter(key, value): + release_criteria[key] = value + IntegrationAccountBatchConfigurationReleaseCriteriaArgs._configure(_setter, **release_criteria) if release_criteria is None and not opts.urn: raise TypeError("Missing required property 'release_criteria'") __props__.__dict__["release_criteria"] = release_criteria diff --git a/sdk/python/pulumi_azure/logicapps/integration_account_certificate.py b/sdk/python/pulumi_azure/logicapps/integration_account_certificate.py index 3829734d8b..094765b8ae 100644 --- a/sdk/python/pulumi_azure/logicapps/integration_account_certificate.py +++ b/sdk/python/pulumi_azure/logicapps/integration_account_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,16 +31,49 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Certificate. Changing this forces a new Logic App Integration Account Certificate to be created. :param pulumi.Input[str] public_certificate: The public certificate for the Logic App Integration Account Certificate. """ - pulumi.set(__self__, "integration_account_name", integration_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IntegrationAccountCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + integration_account_name=integration_account_name, + resource_group_name=resource_group_name, + key_vault_key=key_vault_key, + metadata=metadata, + name=name, + public_certificate=public_certificate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + integration_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + key_vault_key: Optional[pulumi.Input['IntegrationAccountCertificateKeyVaultKeyArgs']] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_certificate: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if integration_account_name is None: + raise TypeError("Missing 'integration_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if key_vault_key is None and 'keyVaultKey' in kwargs: + key_vault_key = kwargs['keyVaultKey'] + if public_certificate is None and 'publicCertificate' in kwargs: + public_certificate = kwargs['publicCertificate'] + + _setter("integration_account_name", integration_account_name) + _setter("resource_group_name", resource_group_name) if key_vault_key is not None: - pulumi.set(__self__, "key_vault_key", key_vault_key) + _setter("key_vault_key", key_vault_key) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_certificate is not None: - pulumi.set(__self__, "public_certificate", public_certificate) + _setter("public_certificate", public_certificate) @property @pulumi.getter(name="integrationAccountName") @@ -133,18 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[str] public_certificate: The public certificate for the Logic App Integration Account Certificate. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Logic App Integration Account Certificate should exist. Changing this forces a new Logic App Integration Account Certificate to be created. """ + _IntegrationAccountCertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + integration_account_name=integration_account_name, + key_vault_key=key_vault_key, + metadata=metadata, + name=name, + public_certificate=public_certificate, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + integration_account_name: Optional[pulumi.Input[str]] = None, + key_vault_key: Optional[pulumi.Input['IntegrationAccountCertificateKeyVaultKeyArgs']] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_certificate: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if key_vault_key is None and 'keyVaultKey' in kwargs: + key_vault_key = kwargs['keyVaultKey'] + if public_certificate is None and 'publicCertificate' in kwargs: + public_certificate = kwargs['publicCertificate'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if integration_account_name is not None: - pulumi.set(__self__, "integration_account_name", integration_account_name) + _setter("integration_account_name", integration_account_name) if key_vault_key is not None: - pulumi.set(__self__, "key_vault_key", key_vault_key) + _setter("key_vault_key", key_vault_key) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_certificate is not None: - pulumi.set(__self__, "public_certificate", public_certificate) + _setter("public_certificate", public_certificate) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="integrationAccountName") @@ -312,6 +374,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationAccountCertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -335,6 +401,11 @@ def _internal_init(__self__, if integration_account_name is None and not opts.urn: raise TypeError("Missing required property 'integration_account_name'") __props__.__dict__["integration_account_name"] = integration_account_name + if key_vault_key is not None and not isinstance(key_vault_key, IntegrationAccountCertificateKeyVaultKeyArgs): + key_vault_key = key_vault_key or {} + def _setter(key, value): + key_vault_key[key] = value + IntegrationAccountCertificateKeyVaultKeyArgs._configure(_setter, **key_vault_key) __props__.__dict__["key_vault_key"] = key_vault_key __props__.__dict__["metadata"] = metadata __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/logicapps/integration_account_map.py b/sdk/python/pulumi_azure/logicapps/integration_account_map.py index 33e55e6d33..cb8f29138f 100644 --- a/sdk/python/pulumi_azure/logicapps/integration_account_map.py +++ b/sdk/python/pulumi_azure/logicapps/integration_account_map.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IntegrationAccountMapArgs', 'IntegrationAccountMap'] @@ -29,14 +29,49 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] metadata: The metadata of the Logic App Integration Account Map. :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Map. Changing this forces a new Logic App Integration Account Map to be created. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "integration_account_name", integration_account_name) - pulumi.set(__self__, "map_type", map_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IntegrationAccountMapArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + integration_account_name=integration_account_name, + map_type=map_type, + resource_group_name=resource_group_name, + metadata=metadata, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + map_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if integration_account_name is None: + raise TypeError("Missing 'integration_account_name' argument") + if map_type is None and 'mapType' in kwargs: + map_type = kwargs['mapType'] + if map_type is None: + raise TypeError("Missing 'map_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("content", content) + _setter("integration_account_name", integration_account_name) + _setter("map_type", map_type) + _setter("resource_group_name", resource_group_name) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -129,18 +164,45 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Map. Changing this forces a new Logic App Integration Account Map to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Logic App Integration Account Map should exist. Changing this forces a new Logic App Integration Account Map to be created. """ + _IntegrationAccountMapState._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + integration_account_name=integration_account_name, + map_type=map_type, + metadata=metadata, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + map_type: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if map_type is None and 'mapType' in kwargs: + map_type = kwargs['mapType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if integration_account_name is not None: - pulumi.set(__self__, "integration_account_name", integration_account_name) + _setter("integration_account_name", integration_account_name) if map_type is not None: - pulumi.set(__self__, "map_type", map_type) + _setter("map_type", map_type) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter @@ -310,6 +372,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationAccountMapArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/logicapps/integration_account_partner.py b/sdk/python/pulumi_azure/logicapps/integration_account_partner.py index eacff1d964..4e4bb8a4fc 100644 --- a/sdk/python/pulumi_azure/logicapps/integration_account_partner.py +++ b/sdk/python/pulumi_azure/logicapps/integration_account_partner.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,13 +29,44 @@ def __init__(__self__, *, :param pulumi.Input[str] metadata: A JSON mapping of any Metadata for this Logic App Integration Account Partner. :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Partner. Changing this forces a new Logic App Integration Account Partner to be created. """ - pulumi.set(__self__, "business_identities", business_identities) - pulumi.set(__self__, "integration_account_name", integration_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IntegrationAccountPartnerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + business_identities=business_identities, + integration_account_name=integration_account_name, + resource_group_name=resource_group_name, + metadata=metadata, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + business_identities: Optional[pulumi.Input[Sequence[pulumi.Input['IntegrationAccountPartnerBusinessIdentityArgs']]]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if business_identities is None and 'businessIdentities' in kwargs: + business_identities = kwargs['businessIdentities'] + if business_identities is None: + raise TypeError("Missing 'business_identities' argument") + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if integration_account_name is None: + raise TypeError("Missing 'integration_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("business_identities", business_identities) + _setter("integration_account_name", integration_account_name) + _setter("resource_group_name", resource_group_name) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="businessIdentities") @@ -114,16 +145,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Partner. Changing this forces a new Logic App Integration Account Partner to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Logic App Integration Account Partner should exist. Changing this forces a new Logic App Integration Account Partner to be created. """ + _IntegrationAccountPartnerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + business_identities=business_identities, + integration_account_name=integration_account_name, + metadata=metadata, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + business_identities: Optional[pulumi.Input[Sequence[pulumi.Input['IntegrationAccountPartnerBusinessIdentityArgs']]]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if business_identities is None and 'businessIdentities' in kwargs: + business_identities = kwargs['businessIdentities'] + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if business_identities is not None: - pulumi.set(__self__, "business_identities", business_identities) + _setter("business_identities", business_identities) if integration_account_name is not None: - pulumi.set(__self__, "integration_account_name", integration_account_name) + _setter("integration_account_name", integration_account_name) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="businessIdentities") @@ -283,6 +339,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationAccountPartnerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/logicapps/integration_account_schema.py b/sdk/python/pulumi_azure/logicapps/integration_account_schema.py index dfb758d61c..62c426cc9d 100644 --- a/sdk/python/pulumi_azure/logicapps/integration_account_schema.py +++ b/sdk/python/pulumi_azure/logicapps/integration_account_schema.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IntegrationAccountSchemaArgs', 'IntegrationAccountSchema'] @@ -29,15 +29,48 @@ def __init__(__self__, *, :param pulumi.Input[str] metadata: The metadata of the Logic App Integration Account Schema. :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Schema. Changing this forces a new Logic App Integration Account Schema to be created. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "integration_account_name", integration_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IntegrationAccountSchemaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + integration_account_name=integration_account_name, + resource_group_name=resource_group_name, + file_name=file_name, + metadata=metadata, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + file_name: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if integration_account_name is None: + raise TypeError("Missing 'integration_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if file_name is None and 'fileName' in kwargs: + file_name = kwargs['fileName'] + + _setter("content", content) + _setter("integration_account_name", integration_account_name) + _setter("resource_group_name", resource_group_name) if file_name is not None: - pulumi.set(__self__, "file_name", file_name) + _setter("file_name", file_name) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -130,18 +163,45 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Schema. Changing this forces a new Logic App Integration Account Schema to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Logic App Integration Account Schema should exist. Changing this forces a new Logic App Integration Account Schema to be created. """ + _IntegrationAccountSchemaState._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + file_name=file_name, + integration_account_name=integration_account_name, + metadata=metadata, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + file_name: Optional[pulumi.Input[str]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_name is None and 'fileName' in kwargs: + file_name = kwargs['fileName'] + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if file_name is not None: - pulumi.set(__self__, "file_name", file_name) + _setter("file_name", file_name) if integration_account_name is not None: - pulumi.set(__self__, "integration_account_name", integration_account_name) + _setter("integration_account_name", integration_account_name) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter @@ -309,6 +369,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationAccountSchemaArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/logicapps/integration_account_session.py b/sdk/python/pulumi_azure/logicapps/integration_account_session.py index 315140e0af..a343db812f 100644 --- a/sdk/python/pulumi_azure/logicapps/integration_account_session.py +++ b/sdk/python/pulumi_azure/logicapps/integration_account_session.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IntegrationAccountSessionArgs', 'IntegrationAccountSession'] @@ -25,11 +25,38 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Logic App Integration Account Session should exist. Changing this forces a new Logic App Integration Account Session to be created. :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Session. Changing this forces a new Logic App Integration Account Session to be created. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "integration_account_name", integration_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + IntegrationAccountSessionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + integration_account_name=integration_account_name, + resource_group_name=resource_group_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if integration_account_name is None: + raise TypeError("Missing 'integration_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("content", content) + _setter("integration_account_name", integration_account_name) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -94,14 +121,35 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Logic App Integration Account Session. Changing this forces a new Logic App Integration Account Session to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Logic App Integration Account Session should exist. Changing this forces a new Logic App Integration Account Session to be created. """ + _IntegrationAccountSessionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + integration_account_name=integration_account_name, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + integration_account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if integration_account_name is None and 'integrationAccountName' in kwargs: + integration_account_name = kwargs['integrationAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if integration_account_name is not None: - pulumi.set(__self__, "integration_account_name", integration_account_name) + _setter("integration_account_name", integration_account_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter @@ -247,6 +295,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationAccountSessionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/logicapps/interation_service_environment.py b/sdk/python/pulumi_azure/logicapps/interation_service_environment.py index 0634055a5c..14be276652 100644 --- a/sdk/python/pulumi_azure/logicapps/interation_service_environment.py +++ b/sdk/python/pulumi_azure/logicapps/interation_service_environment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['InterationServiceEnvironmentArgs', 'InterationServiceEnvironment'] @@ -33,17 +33,54 @@ def __init__(__self__, *, > **NOTE** For a `sku_name` using the `Developer` `sku` the `capacity` element must be always `0`. For a `sku_name` using the `sku` of `Premium` the `capacity` element can be between `0` and `10`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Integration Service Environment. """ - pulumi.set(__self__, "access_endpoint_type", access_endpoint_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "virtual_network_subnet_ids", virtual_network_subnet_ids) + InterationServiceEnvironmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_endpoint_type=access_endpoint_type, + resource_group_name=resource_group_name, + virtual_network_subnet_ids=virtual_network_subnet_ids, + location=location, + name=name, + sku_name=sku_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_endpoint_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_endpoint_type is None and 'accessEndpointType' in kwargs: + access_endpoint_type = kwargs['accessEndpointType'] + if access_endpoint_type is None: + raise TypeError("Missing 'access_endpoint_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if virtual_network_subnet_ids is None and 'virtualNetworkSubnetIds' in kwargs: + virtual_network_subnet_ids = kwargs['virtualNetworkSubnetIds'] + if virtual_network_subnet_ids is None: + raise TypeError("Missing 'virtual_network_subnet_ids' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + + _setter("access_endpoint_type", access_endpoint_type) + _setter("resource_group_name", resource_group_name) + _setter("virtual_network_subnet_ids", virtual_network_subnet_ids) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="accessEndpointType") @@ -162,28 +199,75 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] workflow_endpoint_ip_addresses: The list of access endpoint IP addresses of workflow. :param pulumi.Input[Sequence[pulumi.Input[str]]] workflow_outbound_ip_addresses: The list of outgoing IP addresses of workflow. """ + _InterationServiceEnvironmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_endpoint_type=access_endpoint_type, + connector_endpoint_ip_addresses=connector_endpoint_ip_addresses, + connector_outbound_ip_addresses=connector_outbound_ip_addresses, + location=location, + name=name, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + virtual_network_subnet_ids=virtual_network_subnet_ids, + workflow_endpoint_ip_addresses=workflow_endpoint_ip_addresses, + workflow_outbound_ip_addresses=workflow_outbound_ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_endpoint_type: Optional[pulumi.Input[str]] = None, + connector_endpoint_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connector_outbound_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_subnet_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + workflow_endpoint_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + workflow_outbound_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_endpoint_type is None and 'accessEndpointType' in kwargs: + access_endpoint_type = kwargs['accessEndpointType'] + if connector_endpoint_ip_addresses is None and 'connectorEndpointIpAddresses' in kwargs: + connector_endpoint_ip_addresses = kwargs['connectorEndpointIpAddresses'] + if connector_outbound_ip_addresses is None and 'connectorOutboundIpAddresses' in kwargs: + connector_outbound_ip_addresses = kwargs['connectorOutboundIpAddresses'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if virtual_network_subnet_ids is None and 'virtualNetworkSubnetIds' in kwargs: + virtual_network_subnet_ids = kwargs['virtualNetworkSubnetIds'] + if workflow_endpoint_ip_addresses is None and 'workflowEndpointIpAddresses' in kwargs: + workflow_endpoint_ip_addresses = kwargs['workflowEndpointIpAddresses'] + if workflow_outbound_ip_addresses is None and 'workflowOutboundIpAddresses' in kwargs: + workflow_outbound_ip_addresses = kwargs['workflowOutboundIpAddresses'] + if access_endpoint_type is not None: - pulumi.set(__self__, "access_endpoint_type", access_endpoint_type) + _setter("access_endpoint_type", access_endpoint_type) if connector_endpoint_ip_addresses is not None: - pulumi.set(__self__, "connector_endpoint_ip_addresses", connector_endpoint_ip_addresses) + _setter("connector_endpoint_ip_addresses", connector_endpoint_ip_addresses) if connector_outbound_ip_addresses is not None: - pulumi.set(__self__, "connector_outbound_ip_addresses", connector_outbound_ip_addresses) + _setter("connector_outbound_ip_addresses", connector_outbound_ip_addresses) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_subnet_ids is not None: - pulumi.set(__self__, "virtual_network_subnet_ids", virtual_network_subnet_ids) + _setter("virtual_network_subnet_ids", virtual_network_subnet_ids) if workflow_endpoint_ip_addresses is not None: - pulumi.set(__self__, "workflow_endpoint_ip_addresses", workflow_endpoint_ip_addresses) + _setter("workflow_endpoint_ip_addresses", workflow_endpoint_ip_addresses) if workflow_outbound_ip_addresses is not None: - pulumi.set(__self__, "workflow_outbound_ip_addresses", workflow_outbound_ip_addresses) + _setter("workflow_outbound_ip_addresses", workflow_outbound_ip_addresses) @property @pulumi.getter(name="accessEndpointType") @@ -485,6 +569,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + InterationServiceEnvironmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/logicapps/outputs.py b/sdk/python/pulumi_azure/logicapps/outputs.py index d954d2e9f6..6c1d068655 100644 --- a/sdk/python/pulumi_azure/logicapps/outputs.py +++ b/sdk/python/pulumi_azure/logicapps/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -78,8 +78,29 @@ def __init__(__self__, *, :param str action_name: Specifies the name of the precedent HTTP Action. :param str action_result: Specifies the expected result of the precedent HTTP Action, only after which the current HTTP Action will be triggered. Possible values include `Succeeded`, `Failed`, `Skipped` and `TimedOut`. """ - pulumi.set(__self__, "action_name", action_name) - pulumi.set(__self__, "action_result", action_result) + ActionHttpRunAfter._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_name=action_name, + action_result=action_result, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_name: Optional[str] = None, + action_result: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_name is None and 'actionName' in kwargs: + action_name = kwargs['actionName'] + if action_name is None: + raise TypeError("Missing 'action_name' argument") + if action_result is None and 'actionResult' in kwargs: + action_result = kwargs['actionResult'] + if action_result is None: + raise TypeError("Missing 'action_result' argument") + + _setter("action_name", action_name) + _setter("action_result", action_result) @property @pulumi.getter(name="actionName") @@ -107,8 +128,25 @@ def __init__(__self__, *, :param str qualifier: The authenticating body that provides unique guest identities to organizations. :param str value: The value that identifies the documents that your logic apps receive. """ - pulumi.set(__self__, "qualifier", qualifier) - pulumi.set(__self__, "value", value) + IntegrationAccountAgreementGuestIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + qualifier=qualifier, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + qualifier: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if qualifier is None: + raise TypeError("Missing 'qualifier' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("qualifier", qualifier) + _setter("value", value) @property @pulumi.getter @@ -136,8 +174,25 @@ def __init__(__self__, *, :param str qualifier: The authenticating body that provides unique host identities to organizations. :param str value: The value that identifies the documents that your logic apps receive. """ - pulumi.set(__self__, "qualifier", qualifier) - pulumi.set(__self__, "value", value) + IntegrationAccountAgreementHostIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + qualifier=qualifier, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + qualifier: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if qualifier is None: + raise TypeError("Missing 'qualifier' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("qualifier", qualifier) + _setter("value", value) @property @pulumi.getter @@ -186,12 +241,31 @@ def __init__(__self__, *, :param int message_count: The message count for the Logic App Integration Batch Configuration. :param 'IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceArgs' recurrence: A `recurrence` block as documented below. """ + IntegrationAccountBatchConfigurationReleaseCriteria._configure( + lambda key, value: pulumi.set(__self__, key, value), + batch_size=batch_size, + message_count=message_count, + recurrence=recurrence, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + batch_size: Optional[int] = None, + message_count: Optional[int] = None, + recurrence: Optional['outputs.IntegrationAccountBatchConfigurationReleaseCriteriaRecurrence'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if batch_size is None and 'batchSize' in kwargs: + batch_size = kwargs['batchSize'] + if message_count is None and 'messageCount' in kwargs: + message_count = kwargs['messageCount'] + if batch_size is not None: - pulumi.set(__self__, "batch_size", batch_size) + _setter("batch_size", batch_size) if message_count is not None: - pulumi.set(__self__, "message_count", message_count) + _setter("message_count", message_count) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) @property @pulumi.getter(name="batchSize") @@ -256,16 +330,47 @@ def __init__(__self__, *, :param str start_time: The start time of the schedule, formatted as an RFC3339 string. :param str time_zone: The timezone of the start/end time. """ - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "interval", interval) + IntegrationAccountBatchConfigurationReleaseCriteriaRecurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency=frequency, + interval=interval, + end_time=end_time, + schedule=schedule, + start_time=start_time, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency: Optional[str] = None, + interval: Optional[int] = None, + end_time: Optional[str] = None, + schedule: Optional['outputs.IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceSchedule'] = None, + start_time: Optional[str] = None, + time_zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + + _setter("frequency", frequency) + _setter("interval", interval) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter @@ -350,16 +455,39 @@ def __init__(__self__, *, :param Sequence['IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceScheduleMonthlyArgs'] monthlies: A `monthly` block as documented below. :param Sequence[str] week_days: A list of days of the week that the job should execute on. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. """ + IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + hours=hours, + minutes=minutes, + month_days=month_days, + monthlies=monthlies, + week_days=week_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hours: Optional[Sequence[int]] = None, + minutes: Optional[Sequence[int]] = None, + month_days: Optional[Sequence[int]] = None, + monthlies: Optional[Sequence['outputs.IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceScheduleMonthly']] = None, + week_days: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if month_days is None and 'monthDays' in kwargs: + month_days = kwargs['monthDays'] + if week_days is None and 'weekDays' in kwargs: + week_days = kwargs['weekDays'] + if hours is not None: - pulumi.set(__self__, "hours", hours) + _setter("hours", hours) if minutes is not None: - pulumi.set(__self__, "minutes", minutes) + _setter("minutes", minutes) if month_days is not None: - pulumi.set(__self__, "month_days", month_days) + _setter("month_days", month_days) if monthlies is not None: - pulumi.set(__self__, "monthlies", monthlies) + _setter("monthlies", monthlies) if week_days is not None: - pulumi.set(__self__, "week_days", week_days) + _setter("week_days", week_days) @property @pulumi.getter @@ -411,8 +539,25 @@ def __init__(__self__, *, :param int week: The occurrence of the week within the month. :param str weekday: The day of the occurrence. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. """ - pulumi.set(__self__, "week", week) - pulumi.set(__self__, "weekday", weekday) + IntegrationAccountBatchConfigurationReleaseCriteriaRecurrenceScheduleMonthly._configure( + lambda key, value: pulumi.set(__self__, key, value), + week=week, + weekday=weekday, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + week: Optional[int] = None, + weekday: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if week is None: + raise TypeError("Missing 'week' argument") + if weekday is None: + raise TypeError("Missing 'weekday' argument") + + _setter("week", week) + _setter("weekday", weekday) @property @pulumi.getter @@ -463,10 +608,35 @@ def __init__(__self__, *, :param str key_vault_id: The ID of the Key Vault. :param str key_version: The version of Key Vault Key. """ - pulumi.set(__self__, "key_name", key_name) - pulumi.set(__self__, "key_vault_id", key_vault_id) + IntegrationAccountCertificateKeyVaultKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_name=key_name, + key_vault_id=key_vault_id, + key_version=key_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_name: Optional[str] = None, + key_vault_id: Optional[str] = None, + key_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_name is None and 'keyName' in kwargs: + key_name = kwargs['keyName'] + if key_name is None: + raise TypeError("Missing 'key_name' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if key_version is None and 'keyVersion' in kwargs: + key_version = kwargs['keyVersion'] + + _setter("key_name", key_name) + _setter("key_vault_id", key_vault_id) if key_version is not None: - pulumi.set(__self__, "key_version", key_version) + _setter("key_version", key_version) @property @pulumi.getter(name="keyName") @@ -502,8 +672,25 @@ def __init__(__self__, *, :param str qualifier: The authenticating body that provides unique business identities to organizations. :param str value: The value that identifies the documents that your logic apps receive. """ - pulumi.set(__self__, "qualifier", qualifier) - pulumi.set(__self__, "value", value) + IntegrationAccountPartnerBusinessIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + qualifier=qualifier, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + qualifier: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if qualifier is None: + raise TypeError("Missing 'qualifier' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("qualifier", qualifier) + _setter("value", value) @property @pulumi.getter @@ -533,9 +720,30 @@ def __init__(__self__, *, :param str type: The type of the Connection String. Possible values are `APIHub`, `Custom`, `DocDb`, `EventHub`, `MySQL`, `NotificationHub`, `PostgreSQL`, `RedisCache`, `ServiceBus`, `SQLAzure` and `SQLServer`. :param str value: The value for the Connection String. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + StandardConnectionString._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -600,13 +808,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service. :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service. """ - pulumi.set(__self__, "type", type) + StandardIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -753,48 +986,139 @@ def __init__(__self__, *, :param bool vnet_route_all_enabled: Should all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. :param bool websockets_enabled: Should WebSockets be enabled? """ + StandardSiteConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + always_on=always_on, + app_scale_limit=app_scale_limit, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + dotnet_framework_version=dotnet_framework_version, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + min_tls_version=min_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_ip_restrictions=scm_ip_restrictions, + scm_min_tls_version=scm_min_tls_version, + scm_type=scm_type, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + vnet_route_all_enabled=vnet_route_all_enabled, + websockets_enabled=websockets_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + always_on: Optional[bool] = None, + app_scale_limit: Optional[int] = None, + auto_swap_slot_name: Optional[str] = None, + cors: Optional['outputs.StandardSiteConfigCors'] = None, + dotnet_framework_version: Optional[str] = None, + elastic_instance_minimum: Optional[int] = None, + ftps_state: Optional[str] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + ip_restrictions: Optional[Sequence['outputs.StandardSiteConfigIpRestriction']] = None, + linux_fx_version: Optional[str] = None, + min_tls_version: Optional[str] = None, + pre_warmed_instance_count: Optional[int] = None, + runtime_scale_monitoring_enabled: Optional[bool] = None, + scm_ip_restrictions: Optional[Sequence['outputs.StandardSiteConfigScmIpRestriction']] = None, + scm_min_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker_process: Optional[bool] = None, + vnet_route_all_enabled: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_min_tls_version is None and 'scmMinTlsVersion' in kwargs: + scm_min_tls_version = kwargs['scmMinTlsVersion'] + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if app_scale_limit is not None: - pulumi.set(__self__, "app_scale_limit", app_scale_limit) + _setter("app_scale_limit", app_scale_limit) if auto_swap_slot_name is not None: - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) + _setter("auto_swap_slot_name", auto_swap_slot_name) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if dotnet_framework_version is not None: - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) + _setter("dotnet_framework_version", dotnet_framework_version) if elastic_instance_minimum is not None: - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) + _setter("elastic_instance_minimum", elastic_instance_minimum) if ftps_state is not None: - pulumi.set(__self__, "ftps_state", ftps_state) + _setter("ftps_state", ftps_state) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if ip_restrictions is not None: - pulumi.set(__self__, "ip_restrictions", ip_restrictions) + _setter("ip_restrictions", ip_restrictions) if linux_fx_version is not None: - pulumi.set(__self__, "linux_fx_version", linux_fx_version) + _setter("linux_fx_version", linux_fx_version) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if pre_warmed_instance_count is not None: - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_ip_restrictions is not None: - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_ip_restrictions", scm_ip_restrictions) if scm_min_tls_version is not None: - pulumi.set(__self__, "scm_min_tls_version", scm_min_tls_version) + _setter("scm_min_tls_version", scm_min_tls_version) if scm_type is not None: - pulumi.set(__self__, "scm_type", scm_type) + _setter("scm_type", scm_type) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker_process is not None: - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) + _setter("use32_bit_worker_process", use32_bit_worker_process) if vnet_route_all_enabled is not None: - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) @property @pulumi.getter(name="alwaysOn") @@ -999,9 +1323,28 @@ def __init__(__self__, *, :param Sequence[str] allowed_origins: A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls. :param bool support_credentials: Are credentials supported? """ - pulumi.set(__self__, "allowed_origins", allowed_origins) + StandardSiteConfigCors._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -1062,20 +1405,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + StandardSiteConfigIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.StandardSiteConfigIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -1172,14 +1544,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param Sequence[str] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + StandardSiteConfigIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -1256,20 +1653,49 @@ def __init__(__self__, *, > **NOTE:** One of either `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified """ + StandardSiteConfigScmIpRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + headers=headers, + ip_address=ip_address, + name=name, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + headers: Optional['outputs.StandardSiteConfigScmIpRestrictionHeaders'] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if headers is not None: - pulumi.set(__self__, "headers", headers) + _setter("headers", headers) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -1366,14 +1792,39 @@ def __init__(__self__, *, :param Sequence[str] x_forwarded_fors: A list of allowed 'X-Forwarded-For' IPs in CIDR notation with a maximum of 8 :param Sequence[str] x_forwarded_hosts: A list of allowed 'X-Forwarded-Host' domains with a maximum of 8. """ + StandardSiteConfigScmIpRestrictionHeaders._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -1417,10 +1868,23 @@ def __init__(__self__, *, :param str password: The password associated with the username, which can be used to publish to this App Service. :param str username: The username which can be used to publish to this App Service """ + StandardSiteCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -1471,12 +1935,33 @@ def __init__(__self__, *, :param Sequence[int] at_these_minutes: Specifies a list of minutes when the trigger should run. Valid values are between 0 and 59. :param Sequence[str] on_these_days: Specifies a list of days when the trigger should run. Valid values include `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, and `Sunday`. """ + TriggerRecurrenceSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + at_these_hours=at_these_hours, + at_these_minutes=at_these_minutes, + on_these_days=on_these_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + at_these_hours: Optional[Sequence[int]] = None, + at_these_minutes: Optional[Sequence[int]] = None, + on_these_days: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if at_these_hours is None and 'atTheseHours' in kwargs: + at_these_hours = kwargs['atTheseHours'] + if at_these_minutes is None and 'atTheseMinutes' in kwargs: + at_these_minutes = kwargs['atTheseMinutes'] + if on_these_days is None and 'onTheseDays' in kwargs: + on_these_days = kwargs['onTheseDays'] + if at_these_hours is not None: - pulumi.set(__self__, "at_these_hours", at_these_hours) + _setter("at_these_hours", at_these_hours) if at_these_minutes is not None: - pulumi.set(__self__, "at_these_minutes", at_these_minutes) + _setter("at_these_minutes", at_these_minutes) if on_these_days is not None: - pulumi.set(__self__, "on_these_days", on_these_days) + _setter("on_these_days", on_these_days) @property @pulumi.getter(name="atTheseHours") @@ -1533,14 +2018,33 @@ def __init__(__self__, *, :param 'WorkflowAccessControlTriggerArgs' trigger: A `trigger` block as defined below. :param 'WorkflowAccessControlWorkflowManagementArgs' workflow_management: A `workflow_management` block as defined below. """ + WorkflowAccessControl._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + content=content, + trigger=trigger, + workflow_management=workflow_management, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional['outputs.WorkflowAccessControlAction'] = None, + content: Optional['outputs.WorkflowAccessControlContent'] = None, + trigger: Optional['outputs.WorkflowAccessControlTrigger'] = None, + workflow_management: Optional['outputs.WorkflowAccessControlWorkflowManagement'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if workflow_management is None and 'workflowManagement' in kwargs: + workflow_management = kwargs['workflowManagement'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if trigger is not None: - pulumi.set(__self__, "trigger", trigger) + _setter("trigger", trigger) if workflow_management is not None: - pulumi.set(__self__, "workflow_management", workflow_management) + _setter("workflow_management", workflow_management) @property @pulumi.getter @@ -1599,7 +2103,22 @@ def __init__(__self__, *, """ :param Sequence[str] allowed_caller_ip_address_ranges: A list of the allowed caller IP address ranges. """ - pulumi.set(__self__, "allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) + WorkflowAccessControlAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_caller_ip_address_ranges=allowed_caller_ip_address_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_caller_ip_address_ranges: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_caller_ip_address_ranges is None and 'allowedCallerIpAddressRanges' in kwargs: + allowed_caller_ip_address_ranges = kwargs['allowedCallerIpAddressRanges'] + if allowed_caller_ip_address_ranges is None: + raise TypeError("Missing 'allowed_caller_ip_address_ranges' argument") + + _setter("allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) @property @pulumi.getter(name="allowedCallerIpAddressRanges") @@ -1634,7 +2153,22 @@ def __init__(__self__, *, """ :param Sequence[str] allowed_caller_ip_address_ranges: A list of the allowed caller IP address ranges. """ - pulumi.set(__self__, "allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) + WorkflowAccessControlContent._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_caller_ip_address_ranges=allowed_caller_ip_address_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_caller_ip_address_ranges: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_caller_ip_address_ranges is None and 'allowedCallerIpAddressRanges' in kwargs: + allowed_caller_ip_address_ranges = kwargs['allowedCallerIpAddressRanges'] + if allowed_caller_ip_address_ranges is None: + raise TypeError("Missing 'allowed_caller_ip_address_ranges' argument") + + _setter("allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) @property @pulumi.getter(name="allowedCallerIpAddressRanges") @@ -1673,9 +2207,28 @@ def __init__(__self__, *, :param Sequence[str] allowed_caller_ip_address_ranges: A list of the allowed caller IP address ranges. :param Sequence['WorkflowAccessControlTriggerOpenAuthenticationPolicyArgs'] open_authentication_policies: A `open_authentication_policy` block as defined below. """ - pulumi.set(__self__, "allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) + WorkflowAccessControlTrigger._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_caller_ip_address_ranges=allowed_caller_ip_address_ranges, + open_authentication_policies=open_authentication_policies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_caller_ip_address_ranges: Optional[Sequence[str]] = None, + open_authentication_policies: Optional[Sequence['outputs.WorkflowAccessControlTriggerOpenAuthenticationPolicy']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_caller_ip_address_ranges is None and 'allowedCallerIpAddressRanges' in kwargs: + allowed_caller_ip_address_ranges = kwargs['allowedCallerIpAddressRanges'] + if allowed_caller_ip_address_ranges is None: + raise TypeError("Missing 'allowed_caller_ip_address_ranges' argument") + if open_authentication_policies is None and 'openAuthenticationPolicies' in kwargs: + open_authentication_policies = kwargs['openAuthenticationPolicies'] + + _setter("allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) if open_authentication_policies is not None: - pulumi.set(__self__, "open_authentication_policies", open_authentication_policies) + _setter("open_authentication_policies", open_authentication_policies) @property @pulumi.getter(name="allowedCallerIpAddressRanges") @@ -1703,8 +2256,25 @@ def __init__(__self__, *, :param Sequence['WorkflowAccessControlTriggerOpenAuthenticationPolicyClaimArgs'] claims: A `claim` block as defined below. :param str name: The OAuth policy name for the Logic App Workflow. """ - pulumi.set(__self__, "claims", claims) - pulumi.set(__self__, "name", name) + WorkflowAccessControlTriggerOpenAuthenticationPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + claims=claims, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + claims: Optional[Sequence['outputs.WorkflowAccessControlTriggerOpenAuthenticationPolicyClaim']] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if claims is None: + raise TypeError("Missing 'claims' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("claims", claims) + _setter("name", name) @property @pulumi.getter @@ -1732,8 +2302,25 @@ def __init__(__self__, *, :param str name: The name of the OAuth policy claim for the Logic App Workflow. :param str value: The value of the OAuth policy claim for the Logic App Workflow. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + WorkflowAccessControlTriggerOpenAuthenticationPolicyClaim._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1776,7 +2363,22 @@ def __init__(__self__, *, """ :param Sequence[str] allowed_caller_ip_address_ranges: A list of the allowed caller IP address ranges. """ - pulumi.set(__self__, "allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) + WorkflowAccessControlWorkflowManagement._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_caller_ip_address_ranges=allowed_caller_ip_address_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_caller_ip_address_ranges: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_caller_ip_address_ranges is None and 'allowedCallerIpAddressRanges' in kwargs: + allowed_caller_ip_address_ranges = kwargs['allowedCallerIpAddressRanges'] + if allowed_caller_ip_address_ranges is None: + raise TypeError("Missing 'allowed_caller_ip_address_ranges' argument") + + _setter("allowed_caller_ip_address_ranges", allowed_caller_ip_address_ranges) @property @pulumi.getter(name="allowedCallerIpAddressRanges") @@ -1823,13 +2425,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Logic App Workflow. :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this Logic App Workflow. """ - pulumi.set(__self__, "type", type) + WorkflowIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1876,9 +2503,30 @@ def __init__(__self__, *, :param str name: The name of this Logic App. :param str type: The Type of Managed Identity assigned to this Logic App Workflow. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + GetStandardConnectionStringResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -1913,9 +2561,34 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this Logic App Workflow. :param str type: The Type of Managed Identity assigned to this Logic App Workflow. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetStandardIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="principalId") @@ -1966,35 +2639,152 @@ def __init__(__self__, *, scm_use_main_ip_restriction: Optional[bool] = None, use32_bit_worker_process: Optional[bool] = None, websockets_enabled: Optional[bool] = None): - pulumi.set(__self__, "app_scale_limit", app_scale_limit) - pulumi.set(__self__, "auto_swap_slot_name", auto_swap_slot_name) - pulumi.set(__self__, "cors", cors) - pulumi.set(__self__, "elastic_instance_minimum", elastic_instance_minimum) - pulumi.set(__self__, "ftps_state", ftps_state) - pulumi.set(__self__, "ip_restrictions", ip_restrictions) - pulumi.set(__self__, "linux_fx_version", linux_fx_version) - pulumi.set(__self__, "min_tls_version", min_tls_version) - pulumi.set(__self__, "pre_warmed_instance_count", pre_warmed_instance_count) - pulumi.set(__self__, "scm_ip_restrictions", scm_ip_restrictions) - pulumi.set(__self__, "scm_min_tls_version", scm_min_tls_version) - pulumi.set(__self__, "scm_type", scm_type) - pulumi.set(__self__, "vnet_route_all_enabled", vnet_route_all_enabled) + GetStandardSiteConfigResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_scale_limit=app_scale_limit, + auto_swap_slot_name=auto_swap_slot_name, + cors=cors, + elastic_instance_minimum=elastic_instance_minimum, + ftps_state=ftps_state, + ip_restrictions=ip_restrictions, + linux_fx_version=linux_fx_version, + min_tls_version=min_tls_version, + pre_warmed_instance_count=pre_warmed_instance_count, + scm_ip_restrictions=scm_ip_restrictions, + scm_min_tls_version=scm_min_tls_version, + scm_type=scm_type, + vnet_route_all_enabled=vnet_route_all_enabled, + always_on=always_on, + dotnet_framework_version=dotnet_framework_version, + health_check_path=health_check_path, + http2_enabled=http2_enabled, + runtime_scale_monitoring_enabled=runtime_scale_monitoring_enabled, + scm_use_main_ip_restriction=scm_use_main_ip_restriction, + use32_bit_worker_process=use32_bit_worker_process, + websockets_enabled=websockets_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_scale_limit: Optional[int] = None, + auto_swap_slot_name: Optional[str] = None, + cors: Optional['outputs.GetStandardSiteConfigCorsResult'] = None, + elastic_instance_minimum: Optional[int] = None, + ftps_state: Optional[str] = None, + ip_restrictions: Optional[Sequence['outputs.GetStandardSiteConfigIpRestrictionResult']] = None, + linux_fx_version: Optional[str] = None, + min_tls_version: Optional[str] = None, + pre_warmed_instance_count: Optional[int] = None, + scm_ip_restrictions: Optional[Sequence['outputs.GetStandardSiteConfigScmIpRestrictionResult']] = None, + scm_min_tls_version: Optional[str] = None, + scm_type: Optional[str] = None, + vnet_route_all_enabled: Optional[bool] = None, + always_on: Optional[bool] = None, + dotnet_framework_version: Optional[str] = None, + health_check_path: Optional[str] = None, + http2_enabled: Optional[bool] = None, + runtime_scale_monitoring_enabled: Optional[bool] = None, + scm_use_main_ip_restriction: Optional[bool] = None, + use32_bit_worker_process: Optional[bool] = None, + websockets_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_scale_limit is None and 'appScaleLimit' in kwargs: + app_scale_limit = kwargs['appScaleLimit'] + if app_scale_limit is None: + raise TypeError("Missing 'app_scale_limit' argument") + if auto_swap_slot_name is None and 'autoSwapSlotName' in kwargs: + auto_swap_slot_name = kwargs['autoSwapSlotName'] + if auto_swap_slot_name is None: + raise TypeError("Missing 'auto_swap_slot_name' argument") + if cors is None: + raise TypeError("Missing 'cors' argument") + if elastic_instance_minimum is None and 'elasticInstanceMinimum' in kwargs: + elastic_instance_minimum = kwargs['elasticInstanceMinimum'] + if elastic_instance_minimum is None: + raise TypeError("Missing 'elastic_instance_minimum' argument") + if ftps_state is None and 'ftpsState' in kwargs: + ftps_state = kwargs['ftpsState'] + if ftps_state is None: + raise TypeError("Missing 'ftps_state' argument") + if ip_restrictions is None and 'ipRestrictions' in kwargs: + ip_restrictions = kwargs['ipRestrictions'] + if ip_restrictions is None: + raise TypeError("Missing 'ip_restrictions' argument") + if linux_fx_version is None and 'linuxFxVersion' in kwargs: + linux_fx_version = kwargs['linuxFxVersion'] + if linux_fx_version is None: + raise TypeError("Missing 'linux_fx_version' argument") + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if min_tls_version is None: + raise TypeError("Missing 'min_tls_version' argument") + if pre_warmed_instance_count is None and 'preWarmedInstanceCount' in kwargs: + pre_warmed_instance_count = kwargs['preWarmedInstanceCount'] + if pre_warmed_instance_count is None: + raise TypeError("Missing 'pre_warmed_instance_count' argument") + if scm_ip_restrictions is None and 'scmIpRestrictions' in kwargs: + scm_ip_restrictions = kwargs['scmIpRestrictions'] + if scm_ip_restrictions is None: + raise TypeError("Missing 'scm_ip_restrictions' argument") + if scm_min_tls_version is None and 'scmMinTlsVersion' in kwargs: + scm_min_tls_version = kwargs['scmMinTlsVersion'] + if scm_min_tls_version is None: + raise TypeError("Missing 'scm_min_tls_version' argument") + if scm_type is None and 'scmType' in kwargs: + scm_type = kwargs['scmType'] + if scm_type is None: + raise TypeError("Missing 'scm_type' argument") + if vnet_route_all_enabled is None and 'vnetRouteAllEnabled' in kwargs: + vnet_route_all_enabled = kwargs['vnetRouteAllEnabled'] + if vnet_route_all_enabled is None: + raise TypeError("Missing 'vnet_route_all_enabled' argument") + if always_on is None and 'alwaysOn' in kwargs: + always_on = kwargs['alwaysOn'] + if dotnet_framework_version is None and 'dotnetFrameworkVersion' in kwargs: + dotnet_framework_version = kwargs['dotnetFrameworkVersion'] + if health_check_path is None and 'healthCheckPath' in kwargs: + health_check_path = kwargs['healthCheckPath'] + if http2_enabled is None and 'http2Enabled' in kwargs: + http2_enabled = kwargs['http2Enabled'] + if runtime_scale_monitoring_enabled is None and 'runtimeScaleMonitoringEnabled' in kwargs: + runtime_scale_monitoring_enabled = kwargs['runtimeScaleMonitoringEnabled'] + if scm_use_main_ip_restriction is None and 'scmUseMainIpRestriction' in kwargs: + scm_use_main_ip_restriction = kwargs['scmUseMainIpRestriction'] + if use32_bit_worker_process is None and 'use32BitWorkerProcess' in kwargs: + use32_bit_worker_process = kwargs['use32BitWorkerProcess'] + if websockets_enabled is None and 'websocketsEnabled' in kwargs: + websockets_enabled = kwargs['websocketsEnabled'] + + _setter("app_scale_limit", app_scale_limit) + _setter("auto_swap_slot_name", auto_swap_slot_name) + _setter("cors", cors) + _setter("elastic_instance_minimum", elastic_instance_minimum) + _setter("ftps_state", ftps_state) + _setter("ip_restrictions", ip_restrictions) + _setter("linux_fx_version", linux_fx_version) + _setter("min_tls_version", min_tls_version) + _setter("pre_warmed_instance_count", pre_warmed_instance_count) + _setter("scm_ip_restrictions", scm_ip_restrictions) + _setter("scm_min_tls_version", scm_min_tls_version) + _setter("scm_type", scm_type) + _setter("vnet_route_all_enabled", vnet_route_all_enabled) if always_on is not None: - pulumi.set(__self__, "always_on", always_on) + _setter("always_on", always_on) if dotnet_framework_version is not None: - pulumi.set(__self__, "dotnet_framework_version", dotnet_framework_version) + _setter("dotnet_framework_version", dotnet_framework_version) if health_check_path is not None: - pulumi.set(__self__, "health_check_path", health_check_path) + _setter("health_check_path", health_check_path) if http2_enabled is not None: - pulumi.set(__self__, "http2_enabled", http2_enabled) + _setter("http2_enabled", http2_enabled) if runtime_scale_monitoring_enabled is not None: - pulumi.set(__self__, "runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) + _setter("runtime_scale_monitoring_enabled", runtime_scale_monitoring_enabled) if scm_use_main_ip_restriction is not None: - pulumi.set(__self__, "scm_use_main_ip_restriction", scm_use_main_ip_restriction) + _setter("scm_use_main_ip_restriction", scm_use_main_ip_restriction) if use32_bit_worker_process is not None: - pulumi.set(__self__, "use32_bit_worker_process", use32_bit_worker_process) + _setter("use32_bit_worker_process", use32_bit_worker_process) if websockets_enabled is not None: - pulumi.set(__self__, "websockets_enabled", websockets_enabled) + _setter("websockets_enabled", websockets_enabled) @property @pulumi.getter(name="appScaleLimit") @@ -2107,9 +2897,28 @@ class GetStandardSiteConfigCorsResult(dict): def __init__(__self__, *, allowed_origins: Sequence[str], support_credentials: Optional[bool] = None): - pulumi.set(__self__, "allowed_origins", allowed_origins) + GetStandardSiteConfigCorsResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + support_credentials=support_credentials, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + support_credentials: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if support_credentials is None and 'supportCredentials' in kwargs: + support_credentials = kwargs['supportCredentials'] + + _setter("allowed_origins", allowed_origins) if support_credentials is not None: - pulumi.set(__self__, "support_credentials", support_credentials) + _setter("support_credentials", support_credentials) @property @pulumi.getter(name="allowedOrigins") @@ -2135,18 +2944,51 @@ def __init__(__self__, *, """ :param str name: The name of this Logic App. """ - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "name", name) + GetStandardSiteConfigIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + name=name, + action=action, + ip_address=ip_address, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional['outputs.GetStandardSiteConfigIpRestrictionHeadersResult'] = None, + name: Optional[str] = None, + action: Optional[str] = None, + ip_address: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if headers is None: + raise TypeError("Missing 'headers' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + + _setter("headers", headers) + _setter("name", name) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -2194,14 +3036,39 @@ def __init__(__self__, *, x_fd_health_probe: Optional[str] = None, x_forwarded_fors: Optional[Sequence[str]] = None, x_forwarded_hosts: Optional[Sequence[str]] = None): + GetStandardSiteConfigIpRestrictionHeadersResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -2237,18 +3104,51 @@ def __init__(__self__, *, """ :param str name: The name of this Logic App. """ - pulumi.set(__self__, "headers", headers) - pulumi.set(__self__, "name", name) + GetStandardSiteConfigScmIpRestrictionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + headers=headers, + name=name, + action=action, + ip_address=ip_address, + priority=priority, + service_tag=service_tag, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + headers: Optional['outputs.GetStandardSiteConfigScmIpRestrictionHeadersResult'] = None, + name: Optional[str] = None, + action: Optional[str] = None, + ip_address: Optional[str] = None, + priority: Optional[int] = None, + service_tag: Optional[str] = None, + virtual_network_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if headers is None: + raise TypeError("Missing 'headers' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if service_tag is None and 'serviceTag' in kwargs: + service_tag = kwargs['serviceTag'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + + _setter("headers", headers) + _setter("name", name) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if service_tag is not None: - pulumi.set(__self__, "service_tag", service_tag) + _setter("service_tag", service_tag) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter @@ -2296,14 +3196,39 @@ def __init__(__self__, *, x_fd_health_probe: Optional[str] = None, x_forwarded_fors: Optional[Sequence[str]] = None, x_forwarded_hosts: Optional[Sequence[str]] = None): + GetStandardSiteConfigScmIpRestrictionHeadersResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + x_azure_fdids=x_azure_fdids, + x_fd_health_probe=x_fd_health_probe, + x_forwarded_fors=x_forwarded_fors, + x_forwarded_hosts=x_forwarded_hosts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + x_azure_fdids: Optional[Sequence[str]] = None, + x_fd_health_probe: Optional[str] = None, + x_forwarded_fors: Optional[Sequence[str]] = None, + x_forwarded_hosts: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if x_azure_fdids is None and 'xAzureFdids' in kwargs: + x_azure_fdids = kwargs['xAzureFdids'] + if x_fd_health_probe is None and 'xFdHealthProbe' in kwargs: + x_fd_health_probe = kwargs['xFdHealthProbe'] + if x_forwarded_fors is None and 'xForwardedFors' in kwargs: + x_forwarded_fors = kwargs['xForwardedFors'] + if x_forwarded_hosts is None and 'xForwardedHosts' in kwargs: + x_forwarded_hosts = kwargs['xForwardedHosts'] + if x_azure_fdids is not None: - pulumi.set(__self__, "x_azure_fdids", x_azure_fdids) + _setter("x_azure_fdids", x_azure_fdids) if x_fd_health_probe is not None: - pulumi.set(__self__, "x_fd_health_probe", x_fd_health_probe) + _setter("x_fd_health_probe", x_fd_health_probe) if x_forwarded_fors is not None: - pulumi.set(__self__, "x_forwarded_fors", x_forwarded_fors) + _setter("x_forwarded_fors", x_forwarded_fors) if x_forwarded_hosts is not None: - pulumi.set(__self__, "x_forwarded_hosts", x_forwarded_hosts) + _setter("x_forwarded_hosts", x_forwarded_hosts) @property @pulumi.getter(name="xAzureFdids") @@ -2331,8 +3256,25 @@ class GetStandardSiteCredentialResult(dict): def __init__(__self__, *, password: str, username: str): - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + GetStandardSiteCredentialResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("password", password) + _setter("username", username) @property @pulumi.getter @@ -2358,10 +3300,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Logic App Workflow. :param str type: The type of Managed Service Identity that is configured on this Logic App Workflow. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetWorkflowIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") diff --git a/sdk/python/pulumi_azure/logicapps/standard.py b/sdk/python/pulumi_azure/logicapps/standard.py index a7b1ca735f..747d4f916c 100644 --- a/sdk/python/pulumi_azure/logicapps/standard.py +++ b/sdk/python/pulumi_azure/logicapps/standard.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,42 +59,127 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_extension_bundle: Should the logic app use the bundled extension package? If true, then application settings for `AzureFunctionsJobHost__extensionBundle__id` and `AzureFunctionsJobHost__extensionBundle__version` will be created. Defaults to `true`. :param pulumi.Input[str] version: The runtime version associated with the Logic App Defaults to `~3`. """ - pulumi.set(__self__, "app_service_plan_id", app_service_plan_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) - pulumi.set(__self__, "storage_account_name", storage_account_name) + StandardArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_plan_id=app_service_plan_id, + resource_group_name=resource_group_name, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + app_settings=app_settings, + bundle_version=bundle_version, + client_affinity_enabled=client_affinity_enabled, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + enabled=enabled, + https_only=https_only, + identity=identity, + location=location, + name=name, + site_config=site_config, + storage_account_share_name=storage_account_share_name, + tags=tags, + use_extension_bundle=use_extension_bundle, + version=version, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_plan_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + bundle_version: Optional[pulumi.Input[str]] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['StandardConnectionStringArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['StandardIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['StandardSiteConfigArgs']] = None, + storage_account_share_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + use_extension_bundle: Optional[pulumi.Input[bool]] = None, + version: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_plan_id is None and 'appServicePlanId' in kwargs: + app_service_plan_id = kwargs['appServicePlanId'] + if app_service_plan_id is None: + raise TypeError("Missing 'app_service_plan_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key is None: + raise TypeError("Missing 'storage_account_access_key' argument") + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if bundle_version is None and 'bundleVersion' in kwargs: + bundle_version = kwargs['bundleVersion'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if storage_account_share_name is None and 'storageAccountShareName' in kwargs: + storage_account_share_name = kwargs['storageAccountShareName'] + if use_extension_bundle is None and 'useExtensionBundle' in kwargs: + use_extension_bundle = kwargs['useExtensionBundle'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + + _setter("app_service_plan_id", app_service_plan_id) + _setter("resource_group_name", resource_group_name) + _setter("storage_account_access_key", storage_account_access_key) + _setter("storage_account_name", storage_account_name) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if bundle_version is not None: - pulumi.set(__self__, "bundle_version", bundle_version) + _setter("bundle_version", bundle_version) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if storage_account_share_name is not None: - pulumi.set(__self__, "storage_account_share_name", storage_account_share_name) + _setter("storage_account_share_name", storage_account_share_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if use_extension_bundle is not None: - pulumi.set(__self__, "use_extension_bundle", use_extension_bundle) + _setter("use_extension_bundle", use_extension_bundle) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter(name="appServicePlanId") @@ -391,58 +476,157 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_extension_bundle: Should the logic app use the bundled extension package? If true, then application settings for `AzureFunctionsJobHost__extensionBundle__id` and `AzureFunctionsJobHost__extensionBundle__version` will be created. Defaults to `true`. :param pulumi.Input[str] version: The runtime version associated with the Logic App Defaults to `~3`. """ + _StandardState._configure( + lambda key, value: pulumi.set(__self__, key, value), + app_service_plan_id=app_service_plan_id, + app_settings=app_settings, + bundle_version=bundle_version, + client_affinity_enabled=client_affinity_enabled, + client_certificate_mode=client_certificate_mode, + connection_strings=connection_strings, + custom_domain_verification_id=custom_domain_verification_id, + default_hostname=default_hostname, + enabled=enabled, + https_only=https_only, + identity=identity, + kind=kind, + location=location, + name=name, + outbound_ip_addresses=outbound_ip_addresses, + possible_outbound_ip_addresses=possible_outbound_ip_addresses, + resource_group_name=resource_group_name, + site_config=site_config, + site_credentials=site_credentials, + storage_account_access_key=storage_account_access_key, + storage_account_name=storage_account_name, + storage_account_share_name=storage_account_share_name, + tags=tags, + use_extension_bundle=use_extension_bundle, + version=version, + virtual_network_subnet_id=virtual_network_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + app_service_plan_id: Optional[pulumi.Input[str]] = None, + app_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + bundle_version: Optional[pulumi.Input[str]] = None, + client_affinity_enabled: Optional[pulumi.Input[bool]] = None, + client_certificate_mode: Optional[pulumi.Input[str]] = None, + connection_strings: Optional[pulumi.Input[Sequence[pulumi.Input['StandardConnectionStringArgs']]]] = None, + custom_domain_verification_id: Optional[pulumi.Input[str]] = None, + default_hostname: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + https_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['StandardIdentityArgs']] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + possible_outbound_ip_addresses: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + site_config: Optional[pulumi.Input['StandardSiteConfigArgs']] = None, + site_credentials: Optional[pulumi.Input[Sequence[pulumi.Input['StandardSiteCredentialArgs']]]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_account_share_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + use_extension_bundle: Optional[pulumi.Input[bool]] = None, + version: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if app_service_plan_id is None and 'appServicePlanId' in kwargs: + app_service_plan_id = kwargs['appServicePlanId'] + if app_settings is None and 'appSettings' in kwargs: + app_settings = kwargs['appSettings'] + if bundle_version is None and 'bundleVersion' in kwargs: + bundle_version = kwargs['bundleVersion'] + if client_affinity_enabled is None and 'clientAffinityEnabled' in kwargs: + client_affinity_enabled = kwargs['clientAffinityEnabled'] + if client_certificate_mode is None and 'clientCertificateMode' in kwargs: + client_certificate_mode = kwargs['clientCertificateMode'] + if connection_strings is None and 'connectionStrings' in kwargs: + connection_strings = kwargs['connectionStrings'] + if custom_domain_verification_id is None and 'customDomainVerificationId' in kwargs: + custom_domain_verification_id = kwargs['customDomainVerificationId'] + if default_hostname is None and 'defaultHostname' in kwargs: + default_hostname = kwargs['defaultHostname'] + if https_only is None and 'httpsOnly' in kwargs: + https_only = kwargs['httpsOnly'] + if outbound_ip_addresses is None and 'outboundIpAddresses' in kwargs: + outbound_ip_addresses = kwargs['outboundIpAddresses'] + if possible_outbound_ip_addresses is None and 'possibleOutboundIpAddresses' in kwargs: + possible_outbound_ip_addresses = kwargs['possibleOutboundIpAddresses'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if site_config is None and 'siteConfig' in kwargs: + site_config = kwargs['siteConfig'] + if site_credentials is None and 'siteCredentials' in kwargs: + site_credentials = kwargs['siteCredentials'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_share_name is None and 'storageAccountShareName' in kwargs: + storage_account_share_name = kwargs['storageAccountShareName'] + if use_extension_bundle is None and 'useExtensionBundle' in kwargs: + use_extension_bundle = kwargs['useExtensionBundle'] + if virtual_network_subnet_id is None and 'virtualNetworkSubnetId' in kwargs: + virtual_network_subnet_id = kwargs['virtualNetworkSubnetId'] + if app_service_plan_id is not None: - pulumi.set(__self__, "app_service_plan_id", app_service_plan_id) + _setter("app_service_plan_id", app_service_plan_id) if app_settings is not None: - pulumi.set(__self__, "app_settings", app_settings) + _setter("app_settings", app_settings) if bundle_version is not None: - pulumi.set(__self__, "bundle_version", bundle_version) + _setter("bundle_version", bundle_version) if client_affinity_enabled is not None: - pulumi.set(__self__, "client_affinity_enabled", client_affinity_enabled) + _setter("client_affinity_enabled", client_affinity_enabled) if client_certificate_mode is not None: - pulumi.set(__self__, "client_certificate_mode", client_certificate_mode) + _setter("client_certificate_mode", client_certificate_mode) if connection_strings is not None: - pulumi.set(__self__, "connection_strings", connection_strings) + _setter("connection_strings", connection_strings) if custom_domain_verification_id is not None: - pulumi.set(__self__, "custom_domain_verification_id", custom_domain_verification_id) + _setter("custom_domain_verification_id", custom_domain_verification_id) if default_hostname is not None: - pulumi.set(__self__, "default_hostname", default_hostname) + _setter("default_hostname", default_hostname) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if https_only is not None: - pulumi.set(__self__, "https_only", https_only) + _setter("https_only", https_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_ip_addresses is not None: - pulumi.set(__self__, "outbound_ip_addresses", outbound_ip_addresses) + _setter("outbound_ip_addresses", outbound_ip_addresses) if possible_outbound_ip_addresses is not None: - pulumi.set(__self__, "possible_outbound_ip_addresses", possible_outbound_ip_addresses) + _setter("possible_outbound_ip_addresses", possible_outbound_ip_addresses) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if site_config is not None: - pulumi.set(__self__, "site_config", site_config) + _setter("site_config", site_config) if site_credentials is not None: - pulumi.set(__self__, "site_credentials", site_credentials) + _setter("site_credentials", site_credentials) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_account_share_name is not None: - pulumi.set(__self__, "storage_account_share_name", storage_account_share_name) + _setter("storage_account_share_name", storage_account_share_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if use_extension_bundle is not None: - pulumi.set(__self__, "use_extension_bundle", use_extension_bundle) + _setter("use_extension_bundle", use_extension_bundle) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if virtual_network_subnet_id is not None: - pulumi.set(__self__, "virtual_network_subnet_id", virtual_network_subnet_id) + _setter("virtual_network_subnet_id", virtual_network_subnet_id) @property @pulumi.getter(name="appServicePlanId") @@ -982,6 +1166,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StandardArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1026,12 +1214,22 @@ def _internal_init(__self__, __props__.__dict__["connection_strings"] = connection_strings __props__.__dict__["enabled"] = enabled __props__.__dict__["https_only"] = https_only + if identity is not None and not isinstance(identity, StandardIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + StandardIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if site_config is not None and not isinstance(site_config, StandardSiteConfigArgs): + site_config = site_config or {} + def _setter(key, value): + site_config[key] = value + StandardSiteConfigArgs._configure(_setter, **site_config) __props__.__dict__["site_config"] = site_config if storage_account_access_key is None and not opts.urn: raise TypeError("Missing required property 'storage_account_access_key'") diff --git a/sdk/python/pulumi_azure/logicapps/trigger_custom.py b/sdk/python/pulumi_azure/logicapps/trigger_custom.py index ba27931252..1e2da96056 100644 --- a/sdk/python/pulumi_azure/logicapps/trigger_custom.py +++ b/sdk/python/pulumi_azure/logicapps/trigger_custom.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TriggerCustomArgs', 'TriggerCustom'] @@ -25,10 +25,31 @@ def __init__(__self__, *, > **NOTE:** This name must be unique across all Triggers within the Logic App Workflow. """ - pulumi.set(__self__, "body", body) - pulumi.set(__self__, "logic_app_id", logic_app_id) + TriggerCustomArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + body=body, + logic_app_id=logic_app_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body: Optional[pulumi.Input[str]] = None, + logic_app_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body is None: + raise TypeError("Missing 'body' argument") + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if logic_app_id is None: + raise TypeError("Missing 'logic_app_id' argument") + + _setter("body", body) + _setter("logic_app_id", logic_app_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -83,12 +104,29 @@ def __init__(__self__, *, > **NOTE:** This name must be unique across all Triggers within the Logic App Workflow. """ + _TriggerCustomState._configure( + lambda key, value: pulumi.set(__self__, key, value), + body=body, + logic_app_id=logic_app_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body: Optional[pulumi.Input[str]] = None, + logic_app_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if body is not None: - pulumi.set(__self__, "body", body) + _setter("body", body) if logic_app_id is not None: - pulumi.set(__self__, "logic_app_id", logic_app_id) + _setter("logic_app_id", logic_app_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -228,6 +266,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TriggerCustomArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/logicapps/trigger_http_request.py b/sdk/python/pulumi_azure/logicapps/trigger_http_request.py index cb8cbc7cff..67d1b34d75 100644 --- a/sdk/python/pulumi_azure/logicapps/trigger_http_request.py +++ b/sdk/python/pulumi_azure/logicapps/trigger_http_request.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TriggerHttpRequestArgs', 'TriggerHttpRequest'] @@ -31,14 +31,41 @@ def __init__(__self__, *, > **NOTE:** When `relative_path` is set a `method` must also be set. """ - pulumi.set(__self__, "logic_app_id", logic_app_id) - pulumi.set(__self__, "schema", schema) + TriggerHttpRequestArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + logic_app_id=logic_app_id, + schema=schema, + method=method, + name=name, + relative_path=relative_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + logic_app_id: Optional[pulumi.Input[str]] = None, + schema: Optional[pulumi.Input[str]] = None, + method: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + relative_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if logic_app_id is None: + raise TypeError("Missing 'logic_app_id' argument") + if schema is None: + raise TypeError("Missing 'schema' argument") + if relative_path is None and 'relativePath' in kwargs: + relative_path = kwargs['relativePath'] + + _setter("logic_app_id", logic_app_id) + _setter("schema", schema) if method is not None: - pulumi.set(__self__, "method", method) + _setter("method", method) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if relative_path is not None: - pulumi.set(__self__, "relative_path", relative_path) + _setter("relative_path", relative_path) @property @pulumi.getter(name="logicAppId") @@ -127,18 +154,45 @@ def __init__(__self__, *, > **NOTE:** When `relative_path` is set a `method` must also be set. :param pulumi.Input[str] schema: A JSON Blob defining the Schema of the incoming request. This needs to be valid JSON. """ + _TriggerHttpRequestState._configure( + lambda key, value: pulumi.set(__self__, key, value), + callback_url=callback_url, + logic_app_id=logic_app_id, + method=method, + name=name, + relative_path=relative_path, + schema=schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + callback_url: Optional[pulumi.Input[str]] = None, + logic_app_id: Optional[pulumi.Input[str]] = None, + method: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + relative_path: Optional[pulumi.Input[str]] = None, + schema: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if callback_url is None and 'callbackUrl' in kwargs: + callback_url = kwargs['callbackUrl'] + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if relative_path is None and 'relativePath' in kwargs: + relative_path = kwargs['relativePath'] + if callback_url is not None: - pulumi.set(__self__, "callback_url", callback_url) + _setter("callback_url", callback_url) if logic_app_id is not None: - pulumi.set(__self__, "logic_app_id", logic_app_id) + _setter("logic_app_id", logic_app_id) if method is not None: - pulumi.set(__self__, "method", method) + _setter("method", method) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if relative_path is not None: - pulumi.set(__self__, "relative_path", relative_path) + _setter("relative_path", relative_path) if schema is not None: - pulumi.set(__self__, "schema", schema) + _setter("schema", schema) @property @pulumi.getter(name="callbackUrl") @@ -324,6 +378,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TriggerHttpRequestArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/logicapps/trigger_recurrence.py b/sdk/python/pulumi_azure/logicapps/trigger_recurrence.py index 286793d2aa..e3d6b09754 100644 --- a/sdk/python/pulumi_azure/logicapps/trigger_recurrence.py +++ b/sdk/python/pulumi_azure/logicapps/trigger_recurrence.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,17 +35,52 @@ def __init__(__self__, *, :param pulumi.Input[str] start_time: Specifies the start date and time for this trigger in RFC3339 format: `2000-01-02T03:04:05Z`. :param pulumi.Input[str] time_zone: Specifies the time zone for this trigger. Supported time zone options are listed [here](https://support.microsoft.com/en-us/help/973627/microsoft-time-zone-index-values) """ - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "logic_app_id", logic_app_id) + TriggerRecurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency=frequency, + interval=interval, + logic_app_id=logic_app_id, + name=name, + schedule=schedule, + start_time=start_time, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[int]] = None, + logic_app_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['TriggerRecurrenceScheduleArgs']] = None, + start_time: Optional[pulumi.Input[str]] = None, + time_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if logic_app_id is None: + raise TypeError("Missing 'logic_app_id' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + + _setter("frequency", frequency) + _setter("interval", interval) + _setter("logic_app_id", logic_app_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter @@ -156,20 +191,49 @@ def __init__(__self__, *, :param pulumi.Input[str] start_time: Specifies the start date and time for this trigger in RFC3339 format: `2000-01-02T03:04:05Z`. :param pulumi.Input[str] time_zone: Specifies the time zone for this trigger. Supported time zone options are listed [here](https://support.microsoft.com/en-us/help/973627/microsoft-time-zone-index-values) """ + _TriggerRecurrenceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + frequency=frequency, + interval=interval, + logic_app_id=logic_app_id, + name=name, + schedule=schedule, + start_time=start_time, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frequency: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[int]] = None, + logic_app_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['TriggerRecurrenceScheduleArgs']] = None, + start_time: Optional[pulumi.Input[str]] = None, + time_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) if logic_app_id is not None: - pulumi.set(__self__, "logic_app_id", logic_app_id) + _setter("logic_app_id", logic_app_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter @@ -353,6 +417,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TriggerRecurrenceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -384,6 +452,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'logic_app_id'") __props__.__dict__["logic_app_id"] = logic_app_id __props__.__dict__["name"] = name + if schedule is not None and not isinstance(schedule, TriggerRecurrenceScheduleArgs): + schedule = schedule or {} + def _setter(key, value): + schedule[key] = value + TriggerRecurrenceScheduleArgs._configure(_setter, **schedule) __props__.__dict__["schedule"] = schedule __props__.__dict__["start_time"] = start_time __props__.__dict__["time_zone"] = time_zone diff --git a/sdk/python/pulumi_azure/logicapps/workflow.py b/sdk/python/pulumi_azure/logicapps/workflow.py index 94ea7c4cc9..491fbfe6b8 100644 --- a/sdk/python/pulumi_azure/logicapps/workflow.py +++ b/sdk/python/pulumi_azure/logicapps/workflow.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,31 +47,82 @@ def __init__(__self__, *, :param pulumi.Input[str] workflow_schema: Specifies the Schema to use for this Logic App Workflow. Defaults to `https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#`. Changing this forces a new resource to be created. :param pulumi.Input[str] workflow_version: Specifies the version of the Schema used for this Logic App Workflow. Defaults to `1.0.0.0`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + WorkflowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + access_control=access_control, + enabled=enabled, + identity=identity, + integration_service_environment_id=integration_service_environment_id, + location=location, + logic_app_integration_account_id=logic_app_integration_account_id, + name=name, + parameters=parameters, + tags=tags, + workflow_parameters=workflow_parameters, + workflow_schema=workflow_schema, + workflow_version=workflow_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + access_control: Optional[pulumi.Input['WorkflowAccessControlArgs']] = None, + enabled: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['WorkflowIdentityArgs']] = None, + integration_service_environment_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logic_app_integration_account_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workflow_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workflow_schema: Optional[pulumi.Input[str]] = None, + workflow_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if access_control is None and 'accessControl' in kwargs: + access_control = kwargs['accessControl'] + if integration_service_environment_id is None and 'integrationServiceEnvironmentId' in kwargs: + integration_service_environment_id = kwargs['integrationServiceEnvironmentId'] + if logic_app_integration_account_id is None and 'logicAppIntegrationAccountId' in kwargs: + logic_app_integration_account_id = kwargs['logicAppIntegrationAccountId'] + if workflow_parameters is None and 'workflowParameters' in kwargs: + workflow_parameters = kwargs['workflowParameters'] + if workflow_schema is None and 'workflowSchema' in kwargs: + workflow_schema = kwargs['workflowSchema'] + if workflow_version is None and 'workflowVersion' in kwargs: + workflow_version = kwargs['workflowVersion'] + + _setter("resource_group_name", resource_group_name) if access_control is not None: - pulumi.set(__self__, "access_control", access_control) + _setter("access_control", access_control) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if integration_service_environment_id is not None: - pulumi.set(__self__, "integration_service_environment_id", integration_service_environment_id) + _setter("integration_service_environment_id", integration_service_environment_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logic_app_integration_account_id is not None: - pulumi.set(__self__, "logic_app_integration_account_id", logic_app_integration_account_id) + _setter("logic_app_integration_account_id", logic_app_integration_account_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if workflow_parameters is not None: - pulumi.set(__self__, "workflow_parameters", workflow_parameters) + _setter("workflow_parameters", workflow_parameters) if workflow_schema is not None: - pulumi.set(__self__, "workflow_schema", workflow_schema) + _setter("workflow_schema", workflow_schema) if workflow_version is not None: - pulumi.set(__self__, "workflow_version", workflow_version) + _setter("workflow_version", workflow_version) @property @pulumi.getter(name="resourceGroupName") @@ -276,42 +327,111 @@ def __init__(__self__, *, :param pulumi.Input[str] workflow_schema: Specifies the Schema to use for this Logic App Workflow. Defaults to `https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#`. Changing this forces a new resource to be created. :param pulumi.Input[str] workflow_version: Specifies the version of the Schema used for this Logic App Workflow. Defaults to `1.0.0.0`. Changing this forces a new resource to be created. """ + _WorkflowState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_control=access_control, + access_endpoint=access_endpoint, + connector_endpoint_ip_addresses=connector_endpoint_ip_addresses, + connector_outbound_ip_addresses=connector_outbound_ip_addresses, + enabled=enabled, + identity=identity, + integration_service_environment_id=integration_service_environment_id, + location=location, + logic_app_integration_account_id=logic_app_integration_account_id, + name=name, + parameters=parameters, + resource_group_name=resource_group_name, + tags=tags, + workflow_endpoint_ip_addresses=workflow_endpoint_ip_addresses, + workflow_outbound_ip_addresses=workflow_outbound_ip_addresses, + workflow_parameters=workflow_parameters, + workflow_schema=workflow_schema, + workflow_version=workflow_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_control: Optional[pulumi.Input['WorkflowAccessControlArgs']] = None, + access_endpoint: Optional[pulumi.Input[str]] = None, + connector_endpoint_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + connector_outbound_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['WorkflowIdentityArgs']] = None, + integration_service_environment_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logic_app_integration_account_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workflow_endpoint_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + workflow_outbound_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + workflow_parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workflow_schema: Optional[pulumi.Input[str]] = None, + workflow_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_control is None and 'accessControl' in kwargs: + access_control = kwargs['accessControl'] + if access_endpoint is None and 'accessEndpoint' in kwargs: + access_endpoint = kwargs['accessEndpoint'] + if connector_endpoint_ip_addresses is None and 'connectorEndpointIpAddresses' in kwargs: + connector_endpoint_ip_addresses = kwargs['connectorEndpointIpAddresses'] + if connector_outbound_ip_addresses is None and 'connectorOutboundIpAddresses' in kwargs: + connector_outbound_ip_addresses = kwargs['connectorOutboundIpAddresses'] + if integration_service_environment_id is None and 'integrationServiceEnvironmentId' in kwargs: + integration_service_environment_id = kwargs['integrationServiceEnvironmentId'] + if logic_app_integration_account_id is None and 'logicAppIntegrationAccountId' in kwargs: + logic_app_integration_account_id = kwargs['logicAppIntegrationAccountId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if workflow_endpoint_ip_addresses is None and 'workflowEndpointIpAddresses' in kwargs: + workflow_endpoint_ip_addresses = kwargs['workflowEndpointIpAddresses'] + if workflow_outbound_ip_addresses is None and 'workflowOutboundIpAddresses' in kwargs: + workflow_outbound_ip_addresses = kwargs['workflowOutboundIpAddresses'] + if workflow_parameters is None and 'workflowParameters' in kwargs: + workflow_parameters = kwargs['workflowParameters'] + if workflow_schema is None and 'workflowSchema' in kwargs: + workflow_schema = kwargs['workflowSchema'] + if workflow_version is None and 'workflowVersion' in kwargs: + workflow_version = kwargs['workflowVersion'] + if access_control is not None: - pulumi.set(__self__, "access_control", access_control) + _setter("access_control", access_control) if access_endpoint is not None: - pulumi.set(__self__, "access_endpoint", access_endpoint) + _setter("access_endpoint", access_endpoint) if connector_endpoint_ip_addresses is not None: - pulumi.set(__self__, "connector_endpoint_ip_addresses", connector_endpoint_ip_addresses) + _setter("connector_endpoint_ip_addresses", connector_endpoint_ip_addresses) if connector_outbound_ip_addresses is not None: - pulumi.set(__self__, "connector_outbound_ip_addresses", connector_outbound_ip_addresses) + _setter("connector_outbound_ip_addresses", connector_outbound_ip_addresses) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if integration_service_environment_id is not None: - pulumi.set(__self__, "integration_service_environment_id", integration_service_environment_id) + _setter("integration_service_environment_id", integration_service_environment_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logic_app_integration_account_id is not None: - pulumi.set(__self__, "logic_app_integration_account_id", logic_app_integration_account_id) + _setter("logic_app_integration_account_id", logic_app_integration_account_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if workflow_endpoint_ip_addresses is not None: - pulumi.set(__self__, "workflow_endpoint_ip_addresses", workflow_endpoint_ip_addresses) + _setter("workflow_endpoint_ip_addresses", workflow_endpoint_ip_addresses) if workflow_outbound_ip_addresses is not None: - pulumi.set(__self__, "workflow_outbound_ip_addresses", workflow_outbound_ip_addresses) + _setter("workflow_outbound_ip_addresses", workflow_outbound_ip_addresses) if workflow_parameters is not None: - pulumi.set(__self__, "workflow_parameters", workflow_parameters) + _setter("workflow_parameters", workflow_parameters) if workflow_schema is not None: - pulumi.set(__self__, "workflow_schema", workflow_schema) + _setter("workflow_schema", workflow_schema) if workflow_version is not None: - pulumi.set(__self__, "workflow_version", workflow_version) + _setter("workflow_version", workflow_version) @property @pulumi.getter(name="accessControl") @@ -631,6 +751,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkflowArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -658,8 +782,18 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = WorkflowArgs.__new__(WorkflowArgs) + if access_control is not None and not isinstance(access_control, WorkflowAccessControlArgs): + access_control = access_control or {} + def _setter(key, value): + access_control[key] = value + WorkflowAccessControlArgs._configure(_setter, **access_control) __props__.__dict__["access_control"] = access_control __props__.__dict__["enabled"] = enabled + if identity is not None and not isinstance(identity, WorkflowIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + WorkflowIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["integration_service_environment_id"] = integration_service_environment_id __props__.__dict__["location"] = location diff --git a/sdk/python/pulumi_azure/machinelearning/_inputs.py b/sdk/python/pulumi_azure/machinelearning/_inputs.py index 478d483ec3..46ff5b5be4 100644 --- a/sdk/python/pulumi_azure/machinelearning/_inputs.py +++ b/sdk/python/pulumi_azure/machinelearning/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -38,13 +38,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Cluster. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Cluster. """ - pulumi.set(__self__, "type", type) + ComputeClusterIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -108,9 +133,36 @@ def __init__(__self__, *, :param pulumi.Input[int] min_node_count: Minimal node count. Changing this forces a new Machine Learning Compute Cluster to be created. :param pulumi.Input[str] scale_down_nodes_after_idle_duration: Node Idle Time Before Scale Down: defines the time until the compute is shutdown when it has gone into Idle state. Is defined according to W3C XML schema standard for duration. Changing this forces a new Machine Learning Compute Cluster to be created. """ - pulumi.set(__self__, "max_node_count", max_node_count) - pulumi.set(__self__, "min_node_count", min_node_count) - pulumi.set(__self__, "scale_down_nodes_after_idle_duration", scale_down_nodes_after_idle_duration) + ComputeClusterScaleSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_node_count=max_node_count, + min_node_count=min_node_count, + scale_down_nodes_after_idle_duration=scale_down_nodes_after_idle_duration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_node_count: Optional[pulumi.Input[int]] = None, + min_node_count: Optional[pulumi.Input[int]] = None, + scale_down_nodes_after_idle_duration: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_node_count is None and 'maxNodeCount' in kwargs: + max_node_count = kwargs['maxNodeCount'] + if max_node_count is None: + raise TypeError("Missing 'max_node_count' argument") + if min_node_count is None and 'minNodeCount' in kwargs: + min_node_count = kwargs['minNodeCount'] + if min_node_count is None: + raise TypeError("Missing 'min_node_count' argument") + if scale_down_nodes_after_idle_duration is None and 'scaleDownNodesAfterIdleDuration' in kwargs: + scale_down_nodes_after_idle_duration = kwargs['scaleDownNodesAfterIdleDuration'] + if scale_down_nodes_after_idle_duration is None: + raise TypeError("Missing 'scale_down_nodes_after_idle_duration' argument") + + _setter("max_node_count", max_node_count) + _setter("min_node_count", min_node_count) + _setter("scale_down_nodes_after_idle_duration", scale_down_nodes_after_idle_duration) @property @pulumi.getter(name="maxNodeCount") @@ -162,11 +214,34 @@ def __init__(__self__, *, > **NOTE:** At least one of `admin_password` and `key_value` shoud be specified. """ - pulumi.set(__self__, "admin_username", admin_username) + ComputeClusterSshArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + admin_password=admin_password, + key_value=key_value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[pulumi.Input[str]] = None, + admin_password: Optional[pulumi.Input[str]] = None, + key_value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if key_value is None and 'keyValue' in kwargs: + key_value = kwargs['keyValue'] + + _setter("admin_username", admin_username) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if key_value is not None: - pulumi.set(__self__, "key_value", key_value) + _setter("key_value", key_value) @property @pulumi.getter(name="adminUsername") @@ -216,10 +291,27 @@ def __init__(__self__, *, :param pulumi.Input[str] object_id: User’s AAD Object Id. :param pulumi.Input[str] tenant_id: User’s AAD Tenant Id. """ + ComputeInstanceAssignToUserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + object_id=object_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + object_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="objectId") @@ -261,13 +353,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Instance. :param pulumi.Input[str] tenant_id: User’s AAD Tenant Id. """ - pulumi.set(__self__, "type", type) + ComputeInstanceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -331,11 +448,30 @@ def __init__(__self__, *, :param pulumi.Input[int] port: Describes the port for connecting through SSH. :param pulumi.Input[str] username: The admin username of this Machine Learning Compute Instance. """ - pulumi.set(__self__, "public_key", public_key) + ComputeInstanceSshArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_key=public_key, + port=port, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_key: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_key is None and 'publicKey' in kwargs: + public_key = kwargs['publicKey'] + if public_key is None: + raise TypeError("Missing 'public_key' argument") + + _setter("public_key", public_key) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="publicKey") @@ -389,13 +525,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Inference Cluster. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Inference Cluster. """ - pulumi.set(__self__, "type", type) + InferenceClusterIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -463,16 +624,39 @@ def __init__(__self__, *, :param pulumi.Input[str] leaf_domain_label: The leaf domain label for the SSL configuration. Conflicts with `ssl.0.cert`,`ssl.0.key`,`ssl.0.cname`. Changing this forces a new Machine Learning Inference Cluster to be created. Defaults to `""`. :param pulumi.Input[bool] overwrite_existing_domain: Whether or not to overwrite existing leaf domain. Conflicts with `ssl.0.cert`,`ssl.0.key`,`ssl.0.cname` Changing this forces a new Machine Learning Inference Cluster to be created. Defaults to `""`. """ + InferenceClusterSslArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cert=cert, + cname=cname, + key=key, + leaf_domain_label=leaf_domain_label, + overwrite_existing_domain=overwrite_existing_domain, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cert: Optional[pulumi.Input[str]] = None, + cname: Optional[pulumi.Input[str]] = None, + key: Optional[pulumi.Input[str]] = None, + leaf_domain_label: Optional[pulumi.Input[str]] = None, + overwrite_existing_domain: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if leaf_domain_label is None and 'leafDomainLabel' in kwargs: + leaf_domain_label = kwargs['leafDomainLabel'] + if overwrite_existing_domain is None and 'overwriteExistingDomain' in kwargs: + overwrite_existing_domain = kwargs['overwriteExistingDomain'] + if cert is not None: - pulumi.set(__self__, "cert", cert) + _setter("cert", cert) if cname is not None: - pulumi.set(__self__, "cname", cname) + _setter("cname", cname) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if leaf_domain_label is not None: - pulumi.set(__self__, "leaf_domain_label", leaf_domain_label) + _setter("leaf_domain_label", leaf_domain_label) if overwrite_existing_domain is not None: - pulumi.set(__self__, "overwrite_existing_domain", overwrite_existing_domain) + _setter("overwrite_existing_domain", overwrite_existing_domain) @property @pulumi.getter @@ -550,13 +734,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Synapse Spark. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Synapse Spark. """ - pulumi.set(__self__, "type", type) + SynapseSparkIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -622,10 +831,35 @@ def __init__(__self__, *, > **Note**: `user_assigned_identity_id` must set when`identity.type` is `UserAssigned` or service won't be able to find the assigned permissions. """ - pulumi.set(__self__, "key_id", key_id) - pulumi.set(__self__, "key_vault_id", key_vault_id) + WorkspaceEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_id=key_id, + key_vault_id=key_vault_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_id: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_id is None and 'keyId' in kwargs: + key_id = kwargs['keyId'] + if key_id is None: + raise TypeError("Missing 'key_id' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + + _setter("key_id", key_id) + _setter("key_vault_id", key_vault_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="keyId") @@ -681,13 +915,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WorkspaceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/machinelearning/compute_cluster.py b/sdk/python/pulumi_azure/machinelearning/compute_cluster.py index 754f705e25..a4154be3ef 100644 --- a/sdk/python/pulumi_azure/machinelearning/compute_cluster.py +++ b/sdk/python/pulumi_azure/machinelearning/compute_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,30 +47,91 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_resource_id: The ID of the Subnet that the Compute Cluster should reside in. Changing this forces a new Machine Learning Compute Cluster to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Machine Learning Compute Cluster. Changing this forces a new Machine Learning Compute Cluster to be created. """ - pulumi.set(__self__, "machine_learning_workspace_id", machine_learning_workspace_id) - pulumi.set(__self__, "scale_settings", scale_settings) - pulumi.set(__self__, "vm_priority", vm_priority) - pulumi.set(__self__, "vm_size", vm_size) + ComputeClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + machine_learning_workspace_id=machine_learning_workspace_id, + scale_settings=scale_settings, + vm_priority=vm_priority, + vm_size=vm_size, + description=description, + identity=identity, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + node_public_ip_enabled=node_public_ip_enabled, + ssh=ssh, + ssh_public_access_enabled=ssh_public_access_enabled, + subnet_resource_id=subnet_resource_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + machine_learning_workspace_id: Optional[pulumi.Input[str]] = None, + scale_settings: Optional[pulumi.Input['ComputeClusterScaleSettingsArgs']] = None, + vm_priority: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ComputeClusterIdentityArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_public_ip_enabled: Optional[pulumi.Input[bool]] = None, + ssh: Optional[pulumi.Input['ComputeClusterSshArgs']] = None, + ssh_public_access_enabled: Optional[pulumi.Input[bool]] = None, + subnet_resource_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if machine_learning_workspace_id is None and 'machineLearningWorkspaceId' in kwargs: + machine_learning_workspace_id = kwargs['machineLearningWorkspaceId'] + if machine_learning_workspace_id is None: + raise TypeError("Missing 'machine_learning_workspace_id' argument") + if scale_settings is None and 'scaleSettings' in kwargs: + scale_settings = kwargs['scaleSettings'] + if scale_settings is None: + raise TypeError("Missing 'scale_settings' argument") + if vm_priority is None and 'vmPriority' in kwargs: + vm_priority = kwargs['vmPriority'] + if vm_priority is None: + raise TypeError("Missing 'vm_priority' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if node_public_ip_enabled is None and 'nodePublicIpEnabled' in kwargs: + node_public_ip_enabled = kwargs['nodePublicIpEnabled'] + if ssh_public_access_enabled is None and 'sshPublicAccessEnabled' in kwargs: + ssh_public_access_enabled = kwargs['sshPublicAccessEnabled'] + if subnet_resource_id is None and 'subnetResourceId' in kwargs: + subnet_resource_id = kwargs['subnetResourceId'] + + _setter("machine_learning_workspace_id", machine_learning_workspace_id) + _setter("scale_settings", scale_settings) + _setter("vm_priority", vm_priority) + _setter("vm_size", vm_size) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_public_ip_enabled is not None: - pulumi.set(__self__, "node_public_ip_enabled", node_public_ip_enabled) + _setter("node_public_ip_enabled", node_public_ip_enabled) if ssh is not None: - pulumi.set(__self__, "ssh", ssh) + _setter("ssh", ssh) if ssh_public_access_enabled is not None: - pulumi.set(__self__, "ssh_public_access_enabled", ssh_public_access_enabled) + _setter("ssh_public_access_enabled", ssh_public_access_enabled) if subnet_resource_id is not None: - pulumi.set(__self__, "subnet_resource_id", subnet_resource_id) + _setter("subnet_resource_id", subnet_resource_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="machineLearningWorkspaceId") @@ -275,34 +336,87 @@ def __init__(__self__, *, :param pulumi.Input[str] vm_priority: The priority of the VM. Changing this forces a new Machine Learning Compute Cluster to be created. Accepted values are `Dedicated` and `LowPriority`. :param pulumi.Input[str] vm_size: The size of the VM. Changing this forces a new Machine Learning Compute Cluster to be created. """ + _ComputeClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + identity=identity, + local_auth_enabled=local_auth_enabled, + location=location, + machine_learning_workspace_id=machine_learning_workspace_id, + name=name, + node_public_ip_enabled=node_public_ip_enabled, + scale_settings=scale_settings, + ssh=ssh, + ssh_public_access_enabled=ssh_public_access_enabled, + subnet_resource_id=subnet_resource_id, + tags=tags, + vm_priority=vm_priority, + vm_size=vm_size, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ComputeClusterIdentityArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + machine_learning_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_public_ip_enabled: Optional[pulumi.Input[bool]] = None, + scale_settings: Optional[pulumi.Input['ComputeClusterScaleSettingsArgs']] = None, + ssh: Optional[pulumi.Input['ComputeClusterSshArgs']] = None, + ssh_public_access_enabled: Optional[pulumi.Input[bool]] = None, + subnet_resource_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + vm_priority: Optional[pulumi.Input[str]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if machine_learning_workspace_id is None and 'machineLearningWorkspaceId' in kwargs: + machine_learning_workspace_id = kwargs['machineLearningWorkspaceId'] + if node_public_ip_enabled is None and 'nodePublicIpEnabled' in kwargs: + node_public_ip_enabled = kwargs['nodePublicIpEnabled'] + if scale_settings is None and 'scaleSettings' in kwargs: + scale_settings = kwargs['scaleSettings'] + if ssh_public_access_enabled is None and 'sshPublicAccessEnabled' in kwargs: + ssh_public_access_enabled = kwargs['sshPublicAccessEnabled'] + if subnet_resource_id is None and 'subnetResourceId' in kwargs: + subnet_resource_id = kwargs['subnetResourceId'] + if vm_priority is None and 'vmPriority' in kwargs: + vm_priority = kwargs['vmPriority'] + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if machine_learning_workspace_id is not None: - pulumi.set(__self__, "machine_learning_workspace_id", machine_learning_workspace_id) + _setter("machine_learning_workspace_id", machine_learning_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_public_ip_enabled is not None: - pulumi.set(__self__, "node_public_ip_enabled", node_public_ip_enabled) + _setter("node_public_ip_enabled", node_public_ip_enabled) if scale_settings is not None: - pulumi.set(__self__, "scale_settings", scale_settings) + _setter("scale_settings", scale_settings) if ssh is not None: - pulumi.set(__self__, "ssh", ssh) + _setter("ssh", ssh) if ssh_public_access_enabled is not None: - pulumi.set(__self__, "ssh_public_access_enabled", ssh_public_access_enabled) + _setter("ssh_public_access_enabled", ssh_public_access_enabled) if subnet_resource_id is not None: - pulumi.set(__self__, "subnet_resource_id", subnet_resource_id) + _setter("subnet_resource_id", subnet_resource_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if vm_priority is not None: - pulumi.set(__self__, "vm_priority", vm_priority) + _setter("vm_priority", vm_priority) if vm_size is not None: - pulumi.set(__self__, "vm_size", vm_size) + _setter("vm_size", vm_size) @property @pulumi.getter @@ -670,6 +784,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ComputeClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -699,6 +817,11 @@ def _internal_init(__self__, __props__ = ComputeClusterArgs.__new__(ComputeClusterArgs) __props__.__dict__["description"] = description + if identity is not None and not isinstance(identity, ComputeClusterIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ComputeClusterIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["local_auth_enabled"] = local_auth_enabled __props__.__dict__["location"] = location @@ -707,9 +830,19 @@ def _internal_init(__self__, __props__.__dict__["machine_learning_workspace_id"] = machine_learning_workspace_id __props__.__dict__["name"] = name __props__.__dict__["node_public_ip_enabled"] = node_public_ip_enabled + if scale_settings is not None and not isinstance(scale_settings, ComputeClusterScaleSettingsArgs): + scale_settings = scale_settings or {} + def _setter(key, value): + scale_settings[key] = value + ComputeClusterScaleSettingsArgs._configure(_setter, **scale_settings) if scale_settings is None and not opts.urn: raise TypeError("Missing required property 'scale_settings'") __props__.__dict__["scale_settings"] = scale_settings + if ssh is not None and not isinstance(ssh, ComputeClusterSshArgs): + ssh = ssh or {} + def _setter(key, value): + ssh[key] = value + ComputeClusterSshArgs._configure(_setter, **ssh) __props__.__dict__["ssh"] = ssh __props__.__dict__["ssh_public_access_enabled"] = ssh_public_access_enabled __props__.__dict__["subnet_resource_id"] = subnet_resource_id diff --git a/sdk/python/pulumi_azure/machinelearning/compute_instance.py b/sdk/python/pulumi_azure/machinelearning/compute_instance.py index d4a238745a..be712e530e 100644 --- a/sdk/python/pulumi_azure/machinelearning/compute_instance.py +++ b/sdk/python/pulumi_azure/machinelearning/compute_instance.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,30 +45,83 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_resource_id: Virtual network subnet resource ID the compute nodes belong to. Changing this forces a new Machine Learning Compute Instance to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created. """ - pulumi.set(__self__, "machine_learning_workspace_id", machine_learning_workspace_id) - pulumi.set(__self__, "virtual_machine_size", virtual_machine_size) + ComputeInstanceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + machine_learning_workspace_id=machine_learning_workspace_id, + virtual_machine_size=virtual_machine_size, + assign_to_user=assign_to_user, + authorization_type=authorization_type, + description=description, + identity=identity, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + node_public_ip_enabled=node_public_ip_enabled, + ssh=ssh, + subnet_resource_id=subnet_resource_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + machine_learning_workspace_id: Optional[pulumi.Input[str]] = None, + virtual_machine_size: Optional[pulumi.Input[str]] = None, + assign_to_user: Optional[pulumi.Input['ComputeInstanceAssignToUserArgs']] = None, + authorization_type: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ComputeInstanceIdentityArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_public_ip_enabled: Optional[pulumi.Input[bool]] = None, + ssh: Optional[pulumi.Input['ComputeInstanceSshArgs']] = None, + subnet_resource_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if machine_learning_workspace_id is None and 'machineLearningWorkspaceId' in kwargs: + machine_learning_workspace_id = kwargs['machineLearningWorkspaceId'] + if machine_learning_workspace_id is None: + raise TypeError("Missing 'machine_learning_workspace_id' argument") + if virtual_machine_size is None and 'virtualMachineSize' in kwargs: + virtual_machine_size = kwargs['virtualMachineSize'] + if virtual_machine_size is None: + raise TypeError("Missing 'virtual_machine_size' argument") + if assign_to_user is None and 'assignToUser' in kwargs: + assign_to_user = kwargs['assignToUser'] + if authorization_type is None and 'authorizationType' in kwargs: + authorization_type = kwargs['authorizationType'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if node_public_ip_enabled is None and 'nodePublicIpEnabled' in kwargs: + node_public_ip_enabled = kwargs['nodePublicIpEnabled'] + if subnet_resource_id is None and 'subnetResourceId' in kwargs: + subnet_resource_id = kwargs['subnetResourceId'] + + _setter("machine_learning_workspace_id", machine_learning_workspace_id) + _setter("virtual_machine_size", virtual_machine_size) if assign_to_user is not None: - pulumi.set(__self__, "assign_to_user", assign_to_user) + _setter("assign_to_user", assign_to_user) if authorization_type is not None: - pulumi.set(__self__, "authorization_type", authorization_type) + _setter("authorization_type", authorization_type) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_public_ip_enabled is not None: - pulumi.set(__self__, "node_public_ip_enabled", node_public_ip_enabled) + _setter("node_public_ip_enabled", node_public_ip_enabled) if ssh is not None: - pulumi.set(__self__, "ssh", ssh) + _setter("ssh", ssh) if subnet_resource_id is not None: - pulumi.set(__self__, "subnet_resource_id", subnet_resource_id) + _setter("subnet_resource_id", subnet_resource_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="machineLearningWorkspaceId") @@ -259,32 +312,81 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created. :param pulumi.Input[str] virtual_machine_size: The Virtual Machine Size. Changing this forces a new Machine Learning Compute Instance to be created. """ + _ComputeInstanceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + assign_to_user=assign_to_user, + authorization_type=authorization_type, + description=description, + identity=identity, + local_auth_enabled=local_auth_enabled, + location=location, + machine_learning_workspace_id=machine_learning_workspace_id, + name=name, + node_public_ip_enabled=node_public_ip_enabled, + ssh=ssh, + subnet_resource_id=subnet_resource_id, + tags=tags, + virtual_machine_size=virtual_machine_size, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assign_to_user: Optional[pulumi.Input['ComputeInstanceAssignToUserArgs']] = None, + authorization_type: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ComputeInstanceIdentityArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + machine_learning_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_public_ip_enabled: Optional[pulumi.Input[bool]] = None, + ssh: Optional[pulumi.Input['ComputeInstanceSshArgs']] = None, + subnet_resource_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_machine_size: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assign_to_user is None and 'assignToUser' in kwargs: + assign_to_user = kwargs['assignToUser'] + if authorization_type is None and 'authorizationType' in kwargs: + authorization_type = kwargs['authorizationType'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if machine_learning_workspace_id is None and 'machineLearningWorkspaceId' in kwargs: + machine_learning_workspace_id = kwargs['machineLearningWorkspaceId'] + if node_public_ip_enabled is None and 'nodePublicIpEnabled' in kwargs: + node_public_ip_enabled = kwargs['nodePublicIpEnabled'] + if subnet_resource_id is None and 'subnetResourceId' in kwargs: + subnet_resource_id = kwargs['subnetResourceId'] + if virtual_machine_size is None and 'virtualMachineSize' in kwargs: + virtual_machine_size = kwargs['virtualMachineSize'] + if assign_to_user is not None: - pulumi.set(__self__, "assign_to_user", assign_to_user) + _setter("assign_to_user", assign_to_user) if authorization_type is not None: - pulumi.set(__self__, "authorization_type", authorization_type) + _setter("authorization_type", authorization_type) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if machine_learning_workspace_id is not None: - pulumi.set(__self__, "machine_learning_workspace_id", machine_learning_workspace_id) + _setter("machine_learning_workspace_id", machine_learning_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_public_ip_enabled is not None: - pulumi.set(__self__, "node_public_ip_enabled", node_public_ip_enabled) + _setter("node_public_ip_enabled", node_public_ip_enabled) if ssh is not None: - pulumi.set(__self__, "ssh", ssh) + _setter("ssh", ssh) if subnet_resource_id is not None: - pulumi.set(__self__, "subnet_resource_id", subnet_resource_id) + _setter("subnet_resource_id", subnet_resource_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_machine_size is not None: - pulumi.set(__self__, "virtual_machine_size", virtual_machine_size) + _setter("virtual_machine_size", virtual_machine_size) @property @pulumi.getter(name="assignToUser") @@ -642,6 +744,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ComputeInstanceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -669,9 +775,19 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ComputeInstanceArgs.__new__(ComputeInstanceArgs) + if assign_to_user is not None and not isinstance(assign_to_user, ComputeInstanceAssignToUserArgs): + assign_to_user = assign_to_user or {} + def _setter(key, value): + assign_to_user[key] = value + ComputeInstanceAssignToUserArgs._configure(_setter, **assign_to_user) __props__.__dict__["assign_to_user"] = assign_to_user __props__.__dict__["authorization_type"] = authorization_type __props__.__dict__["description"] = description + if identity is not None and not isinstance(identity, ComputeInstanceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ComputeInstanceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["local_auth_enabled"] = local_auth_enabled __props__.__dict__["location"] = location @@ -680,6 +796,11 @@ def _internal_init(__self__, __props__.__dict__["machine_learning_workspace_id"] = machine_learning_workspace_id __props__.__dict__["name"] = name __props__.__dict__["node_public_ip_enabled"] = node_public_ip_enabled + if ssh is not None and not isinstance(ssh, ComputeInstanceSshArgs): + ssh = ssh or {} + def _setter(key, value): + ssh[key] = value + ComputeInstanceSshArgs._configure(_setter, **ssh) __props__.__dict__["ssh"] = ssh __props__.__dict__["subnet_resource_id"] = subnet_resource_id __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/machinelearning/datastore_blobstorage.py b/sdk/python/pulumi_azure/machinelearning/datastore_blobstorage.py index f625fc85ce..043cf667bd 100644 --- a/sdk/python/pulumi_azure/machinelearning/datastore_blobstorage.py +++ b/sdk/python/pulumi_azure/machinelearning/datastore_blobstorage.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DatastoreBlobstorageArgs', 'DatastoreBlobstorage'] @@ -39,22 +39,65 @@ def __init__(__self__, *, > **Note:** One of `account_key` or `shared_access_signature` must be specified. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created. """ - pulumi.set(__self__, "storage_container_id", storage_container_id) - pulumi.set(__self__, "workspace_id", workspace_id) + DatastoreBlobstorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_container_id=storage_container_id, + workspace_id=workspace_id, + account_key=account_key, + description=description, + is_default=is_default, + name=name, + service_data_auth_identity=service_data_auth_identity, + shared_access_signature=shared_access_signature, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_container_id: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + account_key: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + is_default: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + service_data_auth_identity: Optional[pulumi.Input[str]] = None, + shared_access_signature: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if service_data_auth_identity is None and 'serviceDataAuthIdentity' in kwargs: + service_data_auth_identity = kwargs['serviceDataAuthIdentity'] + if shared_access_signature is None and 'sharedAccessSignature' in kwargs: + shared_access_signature = kwargs['sharedAccessSignature'] + + _setter("storage_container_id", storage_container_id) + _setter("workspace_id", workspace_id) if account_key is not None: - pulumi.set(__self__, "account_key", account_key) + _setter("account_key", account_key) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if is_default is not None: - pulumi.set(__self__, "is_default", is_default) + _setter("is_default", is_default) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if service_data_auth_identity is not None: - pulumi.set(__self__, "service_data_auth_identity", service_data_auth_identity) + _setter("service_data_auth_identity", service_data_auth_identity) if shared_access_signature is not None: - pulumi.set(__self__, "shared_access_signature", shared_access_signature) + _setter("shared_access_signature", shared_access_signature) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="storageContainerId") @@ -197,24 +240,63 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created. :param pulumi.Input[str] workspace_id: The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created. """ + _DatastoreBlobstorageState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_key=account_key, + description=description, + is_default=is_default, + name=name, + service_data_auth_identity=service_data_auth_identity, + shared_access_signature=shared_access_signature, + storage_container_id=storage_container_id, + tags=tags, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_key: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + is_default: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + service_data_auth_identity: Optional[pulumi.Input[str]] = None, + shared_access_signature: Optional[pulumi.Input[str]] = None, + storage_container_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if service_data_auth_identity is None and 'serviceDataAuthIdentity' in kwargs: + service_data_auth_identity = kwargs['serviceDataAuthIdentity'] + if shared_access_signature is None and 'sharedAccessSignature' in kwargs: + shared_access_signature = kwargs['sharedAccessSignature'] + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if account_key is not None: - pulumi.set(__self__, "account_key", account_key) + _setter("account_key", account_key) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if is_default is not None: - pulumi.set(__self__, "is_default", is_default) + _setter("is_default", is_default) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if service_data_auth_identity is not None: - pulumi.set(__self__, "service_data_auth_identity", service_data_auth_identity) + _setter("service_data_auth_identity", service_data_auth_identity) if shared_access_signature is not None: - pulumi.set(__self__, "shared_access_signature", shared_access_signature) + _setter("shared_access_signature", shared_access_signature) if storage_container_id is not None: - pulumi.set(__self__, "storage_container_id", storage_container_id) + _setter("storage_container_id", storage_container_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="accountKey") @@ -480,6 +562,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatastoreBlobstorageArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/machinelearning/datastore_datalake_gen2.py b/sdk/python/pulumi_azure/machinelearning/datastore_datalake_gen2.py index 1676307d1e..fe93ffd1b3 100644 --- a/sdk/python/pulumi_azure/machinelearning/datastore_datalake_gen2.py +++ b/sdk/python/pulumi_azure/machinelearning/datastore_datalake_gen2.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DatastoreDatalakeGen2Args', 'DatastoreDatalakeGen2'] @@ -37,24 +37,71 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created. :param pulumi.Input[str] tenant_id: The ID of the Tenant which the Service Principal belongs to. """ - pulumi.set(__self__, "storage_container_id", storage_container_id) - pulumi.set(__self__, "workspace_id", workspace_id) + DatastoreDatalakeGen2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_container_id=storage_container_id, + workspace_id=workspace_id, + authority_url=authority_url, + client_id=client_id, + client_secret=client_secret, + description=description, + name=name, + service_data_identity=service_data_identity, + tags=tags, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_container_id: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + authority_url: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + service_data_identity: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if storage_container_id is None: + raise TypeError("Missing 'storage_container_id' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if authority_url is None and 'authorityUrl' in kwargs: + authority_url = kwargs['authorityUrl'] + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if service_data_identity is None and 'serviceDataIdentity' in kwargs: + service_data_identity = kwargs['serviceDataIdentity'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("storage_container_id", storage_container_id) + _setter("workspace_id", workspace_id) if authority_url is not None: - pulumi.set(__self__, "authority_url", authority_url) + _setter("authority_url", authority_url) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if service_data_identity is not None: - pulumi.set(__self__, "service_data_identity", service_data_identity) + _setter("service_data_identity", service_data_identity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="storageContainerId") @@ -205,28 +252,75 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The ID of the Tenant which the Service Principal belongs to. :param pulumi.Input[str] workspace_id: The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created. """ + _DatastoreDatalakeGen2State._configure( + lambda key, value: pulumi.set(__self__, key, value), + authority_url=authority_url, + client_id=client_id, + client_secret=client_secret, + description=description, + is_default=is_default, + name=name, + service_data_identity=service_data_identity, + storage_container_id=storage_container_id, + tags=tags, + tenant_id=tenant_id, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authority_url: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + is_default: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + service_data_identity: Optional[pulumi.Input[str]] = None, + storage_container_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authority_url is None and 'authorityUrl' in kwargs: + authority_url = kwargs['authorityUrl'] + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if service_data_identity is None and 'serviceDataIdentity' in kwargs: + service_data_identity = kwargs['serviceDataIdentity'] + if storage_container_id is None and 'storageContainerId' in kwargs: + storage_container_id = kwargs['storageContainerId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if authority_url is not None: - pulumi.set(__self__, "authority_url", authority_url) + _setter("authority_url", authority_url) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if is_default is not None: - pulumi.set(__self__, "is_default", is_default) + _setter("is_default", is_default) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if service_data_identity is not None: - pulumi.set(__self__, "service_data_identity", service_data_identity) + _setter("service_data_identity", service_data_identity) if storage_container_id is not None: - pulumi.set(__self__, "storage_container_id", storage_container_id) + _setter("storage_container_id", storage_container_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="authorityUrl") @@ -506,6 +600,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatastoreDatalakeGen2Args._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/machinelearning/datastore_fileshare.py b/sdk/python/pulumi_azure/machinelearning/datastore_fileshare.py index 19e8092211..6e5dd3db77 100644 --- a/sdk/python/pulumi_azure/machinelearning/datastore_fileshare.py +++ b/sdk/python/pulumi_azure/machinelearning/datastore_fileshare.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DatastoreFileshareArgs', 'DatastoreFileshare'] @@ -33,20 +33,59 @@ def __init__(__self__, *, :param pulumi.Input[str] shared_access_signature: The Shared Access Signature of the Storage Account. Conflicts with `account_key`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created. """ - pulumi.set(__self__, "storage_fileshare_id", storage_fileshare_id) - pulumi.set(__self__, "workspace_id", workspace_id) + DatastoreFileshareArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_fileshare_id=storage_fileshare_id, + workspace_id=workspace_id, + account_key=account_key, + description=description, + name=name, + service_data_identity=service_data_identity, + shared_access_signature=shared_access_signature, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_fileshare_id: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + account_key: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + service_data_identity: Optional[pulumi.Input[str]] = None, + shared_access_signature: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_fileshare_id is None and 'storageFileshareId' in kwargs: + storage_fileshare_id = kwargs['storageFileshareId'] + if storage_fileshare_id is None: + raise TypeError("Missing 'storage_fileshare_id' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if service_data_identity is None and 'serviceDataIdentity' in kwargs: + service_data_identity = kwargs['serviceDataIdentity'] + if shared_access_signature is None and 'sharedAccessSignature' in kwargs: + shared_access_signature = kwargs['sharedAccessSignature'] + + _setter("storage_fileshare_id", storage_fileshare_id) + _setter("workspace_id", workspace_id) if account_key is not None: - pulumi.set(__self__, "account_key", account_key) + _setter("account_key", account_key) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if service_data_identity is not None: - pulumi.set(__self__, "service_data_identity", service_data_identity) + _setter("service_data_identity", service_data_identity) if shared_access_signature is not None: - pulumi.set(__self__, "shared_access_signature", shared_access_signature) + _setter("shared_access_signature", shared_access_signature) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="storageFileshareId") @@ -169,24 +208,63 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created. :param pulumi.Input[str] workspace_id: The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created. """ + _DatastoreFileshareState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_key=account_key, + description=description, + is_default=is_default, + name=name, + service_data_identity=service_data_identity, + shared_access_signature=shared_access_signature, + storage_fileshare_id=storage_fileshare_id, + tags=tags, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_key: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + is_default: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + service_data_identity: Optional[pulumi.Input[str]] = None, + shared_access_signature: Optional[pulumi.Input[str]] = None, + storage_fileshare_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if service_data_identity is None and 'serviceDataIdentity' in kwargs: + service_data_identity = kwargs['serviceDataIdentity'] + if shared_access_signature is None and 'sharedAccessSignature' in kwargs: + shared_access_signature = kwargs['sharedAccessSignature'] + if storage_fileshare_id is None and 'storageFileshareId' in kwargs: + storage_fileshare_id = kwargs['storageFileshareId'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if account_key is not None: - pulumi.set(__self__, "account_key", account_key) + _setter("account_key", account_key) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if is_default is not None: - pulumi.set(__self__, "is_default", is_default) + _setter("is_default", is_default) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if service_data_identity is not None: - pulumi.set(__self__, "service_data_identity", service_data_identity) + _setter("service_data_identity", service_data_identity) if shared_access_signature is not None: - pulumi.set(__self__, "shared_access_signature", shared_access_signature) + _setter("shared_access_signature", shared_access_signature) if storage_fileshare_id is not None: - pulumi.set(__self__, "storage_fileshare_id", storage_fileshare_id) + _setter("storage_fileshare_id", storage_fileshare_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="accountKey") @@ -364,6 +442,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatastoreFileshareArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/machinelearning/get_workspace.py b/sdk/python/pulumi_azure/machinelearning/get_workspace.py index 6d75cd4146..1e3f43a458 100644 --- a/sdk/python/pulumi_azure/machinelearning/get_workspace.py +++ b/sdk/python/pulumi_azure/machinelearning/get_workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/machinelearning/inference_cluster.py b/sdk/python/pulumi_azure/machinelearning/inference_cluster.py index 98722752e6..777331cbcb 100644 --- a/sdk/python/pulumi_azure/machinelearning/inference_cluster.py +++ b/sdk/python/pulumi_azure/machinelearning/inference_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,22 +39,59 @@ def __init__(__self__, *, :param pulumi.Input['InferenceClusterSslArgs'] ssl: A `ssl` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created. """ - pulumi.set(__self__, "kubernetes_cluster_id", kubernetes_cluster_id) - pulumi.set(__self__, "machine_learning_workspace_id", machine_learning_workspace_id) + InferenceClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kubernetes_cluster_id=kubernetes_cluster_id, + machine_learning_workspace_id=machine_learning_workspace_id, + cluster_purpose=cluster_purpose, + description=description, + identity=identity, + location=location, + name=name, + ssl=ssl, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kubernetes_cluster_id: Optional[pulumi.Input[str]] = None, + machine_learning_workspace_id: Optional[pulumi.Input[str]] = None, + cluster_purpose: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['InferenceClusterIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + ssl: Optional[pulumi.Input['InferenceClusterSslArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kubernetes_cluster_id is None and 'kubernetesClusterId' in kwargs: + kubernetes_cluster_id = kwargs['kubernetesClusterId'] + if kubernetes_cluster_id is None: + raise TypeError("Missing 'kubernetes_cluster_id' argument") + if machine_learning_workspace_id is None and 'machineLearningWorkspaceId' in kwargs: + machine_learning_workspace_id = kwargs['machineLearningWorkspaceId'] + if machine_learning_workspace_id is None: + raise TypeError("Missing 'machine_learning_workspace_id' argument") + if cluster_purpose is None and 'clusterPurpose' in kwargs: + cluster_purpose = kwargs['clusterPurpose'] + + _setter("kubernetes_cluster_id", kubernetes_cluster_id) + _setter("machine_learning_workspace_id", machine_learning_workspace_id) if cluster_purpose is not None: - pulumi.set(__self__, "cluster_purpose", cluster_purpose) + _setter("cluster_purpose", cluster_purpose) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if ssl is not None: - pulumi.set(__self__, "ssl", ssl) + _setter("ssl", ssl) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="kubernetesClusterId") @@ -193,24 +230,57 @@ def __init__(__self__, *, :param pulumi.Input['InferenceClusterSslArgs'] ssl: A `ssl` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created. """ + _InferenceClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_purpose=cluster_purpose, + description=description, + identity=identity, + kubernetes_cluster_id=kubernetes_cluster_id, + location=location, + machine_learning_workspace_id=machine_learning_workspace_id, + name=name, + ssl=ssl, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_purpose: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['InferenceClusterIdentityArgs']] = None, + kubernetes_cluster_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + machine_learning_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + ssl: Optional[pulumi.Input['InferenceClusterSslArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_purpose is None and 'clusterPurpose' in kwargs: + cluster_purpose = kwargs['clusterPurpose'] + if kubernetes_cluster_id is None and 'kubernetesClusterId' in kwargs: + kubernetes_cluster_id = kwargs['kubernetesClusterId'] + if machine_learning_workspace_id is None and 'machineLearningWorkspaceId' in kwargs: + machine_learning_workspace_id = kwargs['machineLearningWorkspaceId'] + if cluster_purpose is not None: - pulumi.set(__self__, "cluster_purpose", cluster_purpose) + _setter("cluster_purpose", cluster_purpose) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if kubernetes_cluster_id is not None: - pulumi.set(__self__, "kubernetes_cluster_id", kubernetes_cluster_id) + _setter("kubernetes_cluster_id", kubernetes_cluster_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if machine_learning_workspace_id is not None: - pulumi.set(__self__, "machine_learning_workspace_id", machine_learning_workspace_id) + _setter("machine_learning_workspace_id", machine_learning_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if ssl is not None: - pulumi.set(__self__, "ssl", ssl) + _setter("ssl", ssl) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="clusterPurpose") @@ -530,6 +600,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + InferenceClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -555,6 +629,11 @@ def _internal_init(__self__, __props__.__dict__["cluster_purpose"] = cluster_purpose __props__.__dict__["description"] = description + if identity is not None and not isinstance(identity, InferenceClusterIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + InferenceClusterIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity if kubernetes_cluster_id is None and not opts.urn: raise TypeError("Missing required property 'kubernetes_cluster_id'") @@ -564,6 +643,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'machine_learning_workspace_id'") __props__.__dict__["machine_learning_workspace_id"] = machine_learning_workspace_id __props__.__dict__["name"] = name + if ssl is not None and not isinstance(ssl, InferenceClusterSslArgs): + ssl = ssl or {} + def _setter(key, value): + ssl[key] = value + InferenceClusterSslArgs._configure(_setter, **ssl) __props__.__dict__["ssl"] = ssl __props__.__dict__["tags"] = tags super(InferenceCluster, __self__).__init__( diff --git a/sdk/python/pulumi_azure/machinelearning/outputs.py b/sdk/python/pulumi_azure/machinelearning/outputs.py index cd9680e6ae..a5dc74bcb9 100644 --- a/sdk/python/pulumi_azure/machinelearning/outputs.py +++ b/sdk/python/pulumi_azure/machinelearning/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -60,13 +60,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Cluster. :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Cluster. """ - pulumi.set(__self__, "type", type) + ComputeClusterIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -135,9 +160,36 @@ def __init__(__self__, *, :param int min_node_count: Minimal node count. Changing this forces a new Machine Learning Compute Cluster to be created. :param str scale_down_nodes_after_idle_duration: Node Idle Time Before Scale Down: defines the time until the compute is shutdown when it has gone into Idle state. Is defined according to W3C XML schema standard for duration. Changing this forces a new Machine Learning Compute Cluster to be created. """ - pulumi.set(__self__, "max_node_count", max_node_count) - pulumi.set(__self__, "min_node_count", min_node_count) - pulumi.set(__self__, "scale_down_nodes_after_idle_duration", scale_down_nodes_after_idle_duration) + ComputeClusterScaleSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_node_count=max_node_count, + min_node_count=min_node_count, + scale_down_nodes_after_idle_duration=scale_down_nodes_after_idle_duration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_node_count: Optional[int] = None, + min_node_count: Optional[int] = None, + scale_down_nodes_after_idle_duration: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_node_count is None and 'maxNodeCount' in kwargs: + max_node_count = kwargs['maxNodeCount'] + if max_node_count is None: + raise TypeError("Missing 'max_node_count' argument") + if min_node_count is None and 'minNodeCount' in kwargs: + min_node_count = kwargs['minNodeCount'] + if min_node_count is None: + raise TypeError("Missing 'min_node_count' argument") + if scale_down_nodes_after_idle_duration is None and 'scaleDownNodesAfterIdleDuration' in kwargs: + scale_down_nodes_after_idle_duration = kwargs['scaleDownNodesAfterIdleDuration'] + if scale_down_nodes_after_idle_duration is None: + raise TypeError("Missing 'scale_down_nodes_after_idle_duration' argument") + + _setter("max_node_count", max_node_count) + _setter("min_node_count", min_node_count) + _setter("scale_down_nodes_after_idle_duration", scale_down_nodes_after_idle_duration) @property @pulumi.getter(name="maxNodeCount") @@ -198,11 +250,34 @@ def __init__(__self__, *, > **NOTE:** At least one of `admin_password` and `key_value` shoud be specified. """ - pulumi.set(__self__, "admin_username", admin_username) + ComputeClusterSsh._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_username=admin_username, + admin_password=admin_password, + key_value=key_value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_username: Optional[str] = None, + admin_password: Optional[str] = None, + key_value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_username is None and 'adminUsername' in kwargs: + admin_username = kwargs['adminUsername'] + if admin_username is None: + raise TypeError("Missing 'admin_username' argument") + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if key_value is None and 'keyValue' in kwargs: + key_value = kwargs['keyValue'] + + _setter("admin_username", admin_username) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if key_value is not None: - pulumi.set(__self__, "key_value", key_value) + _setter("key_value", key_value) @property @pulumi.getter(name="adminUsername") @@ -259,10 +334,27 @@ def __init__(__self__, *, :param str object_id: User’s AAD Object Id. :param str tenant_id: User’s AAD Tenant Id. """ + ComputeInstanceAssignToUser._configure( + lambda key, value: pulumi.set(__self__, key, value), + object_id=object_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + object_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="objectId") @@ -317,13 +409,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Instance. :param str tenant_id: User’s AAD Tenant Id. """ - pulumi.set(__self__, "type", type) + ComputeInstanceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -388,11 +505,30 @@ def __init__(__self__, *, :param int port: Describes the port for connecting through SSH. :param str username: The admin username of this Machine Learning Compute Instance. """ - pulumi.set(__self__, "public_key", public_key) + ComputeInstanceSsh._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_key=public_key, + port=port, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_key: Optional[str] = None, + port: Optional[int] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_key is None and 'publicKey' in kwargs: + public_key = kwargs['publicKey'] + if public_key is None: + raise TypeError("Missing 'public_key' argument") + + _setter("public_key", public_key) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="publicKey") @@ -455,13 +591,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Inference Cluster. :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Inference Cluster. """ - pulumi.set(__self__, "type", type) + InferenceClusterIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -532,16 +693,39 @@ def __init__(__self__, *, :param str leaf_domain_label: The leaf domain label for the SSL configuration. Conflicts with `ssl.0.cert`,`ssl.0.key`,`ssl.0.cname`. Changing this forces a new Machine Learning Inference Cluster to be created. Defaults to `""`. :param bool overwrite_existing_domain: Whether or not to overwrite existing leaf domain. Conflicts with `ssl.0.cert`,`ssl.0.key`,`ssl.0.cname` Changing this forces a new Machine Learning Inference Cluster to be created. Defaults to `""`. """ + InferenceClusterSsl._configure( + lambda key, value: pulumi.set(__self__, key, value), + cert=cert, + cname=cname, + key=key, + leaf_domain_label=leaf_domain_label, + overwrite_existing_domain=overwrite_existing_domain, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cert: Optional[str] = None, + cname: Optional[str] = None, + key: Optional[str] = None, + leaf_domain_label: Optional[str] = None, + overwrite_existing_domain: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if leaf_domain_label is None and 'leafDomainLabel' in kwargs: + leaf_domain_label = kwargs['leafDomainLabel'] + if overwrite_existing_domain is None and 'overwriteExistingDomain' in kwargs: + overwrite_existing_domain = kwargs['overwriteExistingDomain'] + if cert is not None: - pulumi.set(__self__, "cert", cert) + _setter("cert", cert) if cname is not None: - pulumi.set(__self__, "cname", cname) + _setter("cname", cname) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if leaf_domain_label is not None: - pulumi.set(__self__, "leaf_domain_label", leaf_domain_label) + _setter("leaf_domain_label", leaf_domain_label) if overwrite_existing_domain is not None: - pulumi.set(__self__, "overwrite_existing_domain", overwrite_existing_domain) + _setter("overwrite_existing_domain", overwrite_existing_domain) @property @pulumi.getter @@ -620,13 +804,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Synapse Spark. :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Synapse Spark. """ - pulumi.set(__self__, "type", type) + SynapseSparkIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -697,10 +906,35 @@ def __init__(__self__, *, > **Note**: `user_assigned_identity_id` must set when`identity.type` is `UserAssigned` or service won't be able to find the assigned permissions. """ - pulumi.set(__self__, "key_id", key_id) - pulumi.set(__self__, "key_vault_id", key_vault_id) + WorkspaceEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_id=key_id, + key_vault_id=key_vault_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_id: Optional[str] = None, + key_vault_id: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_id is None and 'keyId' in kwargs: + key_id = kwargs['keyId'] + if key_id is None: + raise TypeError("Missing 'key_id' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + + _setter("key_id", key_id) + _setter("key_vault_id", key_vault_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="keyId") @@ -765,13 +999,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + WorkspaceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -821,10 +1080,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Identity assigned to this Machine Learning Workspace. :param str type: The Type of Managed Identity assigned to this Machine Learning Workspace. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetWorkspaceIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") diff --git a/sdk/python/pulumi_azure/machinelearning/synapse_spark.py b/sdk/python/pulumi_azure/machinelearning/synapse_spark.py index cab3c545c8..26eb1db55a 100644 --- a/sdk/python/pulumi_azure/machinelearning/synapse_spark.py +++ b/sdk/python/pulumi_azure/machinelearning/synapse_spark.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,20 +35,55 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created. """ - pulumi.set(__self__, "machine_learning_workspace_id", machine_learning_workspace_id) - pulumi.set(__self__, "synapse_spark_pool_id", synapse_spark_pool_id) + SynapseSparkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + machine_learning_workspace_id=machine_learning_workspace_id, + synapse_spark_pool_id=synapse_spark_pool_id, + description=description, + identity=identity, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + machine_learning_workspace_id: Optional[pulumi.Input[str]] = None, + synapse_spark_pool_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['SynapseSparkIdentityArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if machine_learning_workspace_id is None and 'machineLearningWorkspaceId' in kwargs: + machine_learning_workspace_id = kwargs['machineLearningWorkspaceId'] + if machine_learning_workspace_id is None: + raise TypeError("Missing 'machine_learning_workspace_id' argument") + if synapse_spark_pool_id is None and 'synapseSparkPoolId' in kwargs: + synapse_spark_pool_id = kwargs['synapseSparkPoolId'] + if synapse_spark_pool_id is None: + raise TypeError("Missing 'synapse_spark_pool_id' argument") + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + + _setter("machine_learning_workspace_id", machine_learning_workspace_id) + _setter("synapse_spark_pool_id", synapse_spark_pool_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="machineLearningWorkspaceId") @@ -169,22 +204,53 @@ def __init__(__self__, *, :param pulumi.Input[str] synapse_spark_pool_id: The ID of the linked Synapse Spark Pool. Changing this forces a new Machine Learning Synapse Spark to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created. """ + _SynapseSparkState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + identity=identity, + local_auth_enabled=local_auth_enabled, + location=location, + machine_learning_workspace_id=machine_learning_workspace_id, + name=name, + synapse_spark_pool_id=synapse_spark_pool_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['SynapseSparkIdentityArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + machine_learning_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + synapse_spark_pool_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if machine_learning_workspace_id is None and 'machineLearningWorkspaceId' in kwargs: + machine_learning_workspace_id = kwargs['machineLearningWorkspaceId'] + if synapse_spark_pool_id is None and 'synapseSparkPoolId' in kwargs: + synapse_spark_pool_id = kwargs['synapseSparkPoolId'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if machine_learning_workspace_id is not None: - pulumi.set(__self__, "machine_learning_workspace_id", machine_learning_workspace_id) + _setter("machine_learning_workspace_id", machine_learning_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if synapse_spark_pool_id is not None: - pulumi.set(__self__, "synapse_spark_pool_id", synapse_spark_pool_id) + _setter("synapse_spark_pool_id", synapse_spark_pool_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -466,6 +532,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SynapseSparkArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -489,6 +559,11 @@ def _internal_init(__self__, __props__ = SynapseSparkArgs.__new__(SynapseSparkArgs) __props__.__dict__["description"] = description + if identity is not None and not isinstance(identity, SynapseSparkIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + SynapseSparkIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["local_auth_enabled"] = local_auth_enabled __props__.__dict__["location"] = location diff --git a/sdk/python/pulumi_azure/machinelearning/workspace.py b/sdk/python/pulumi_azure/machinelearning/workspace.py index 401408d57a..be776b1148 100644 --- a/sdk/python/pulumi_azure/machinelearning/workspace.py +++ b/sdk/python/pulumi_azure/machinelearning/workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -63,42 +63,125 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] v1_legacy_mode_enabled: Enable V1 API features, enabling `v1_legacy_mode` may prevent you from using features provided by the v2 API. Defaults to `false`. """ - pulumi.set(__self__, "application_insights_id", application_insights_id) - pulumi.set(__self__, "identity", identity) - pulumi.set(__self__, "key_vault_id", key_vault_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + WorkspaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_insights_id=application_insights_id, + identity=identity, + key_vault_id=key_vault_id, + resource_group_name=resource_group_name, + storage_account_id=storage_account_id, + container_registry_id=container_registry_id, + description=description, + encryption=encryption, + friendly_name=friendly_name, + high_business_impact=high_business_impact, + image_build_compute_name=image_build_compute_name, + location=location, + name=name, + primary_user_assigned_identity=primary_user_assigned_identity, + public_access_behind_virtual_network_enabled=public_access_behind_virtual_network_enabled, + public_network_access_enabled=public_network_access_enabled, + sku_name=sku_name, + tags=tags, + v1_legacy_mode_enabled=v1_legacy_mode_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_insights_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['WorkspaceIdentityArgs']] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + container_registry_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + encryption: Optional[pulumi.Input['WorkspaceEncryptionArgs']] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + high_business_impact: Optional[pulumi.Input[bool]] = None, + image_build_compute_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_user_assigned_identity: Optional[pulumi.Input[str]] = None, + public_access_behind_virtual_network_enabled: Optional[pulumi.Input[bool]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + v1_legacy_mode_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_insights_id is None and 'applicationInsightsId' in kwargs: + application_insights_id = kwargs['applicationInsightsId'] + if application_insights_id is None: + raise TypeError("Missing 'application_insights_id' argument") + if identity is None: + raise TypeError("Missing 'identity' argument") + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_id is None: + raise TypeError("Missing 'key_vault_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if container_registry_id is None and 'containerRegistryId' in kwargs: + container_registry_id = kwargs['containerRegistryId'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if high_business_impact is None and 'highBusinessImpact' in kwargs: + high_business_impact = kwargs['highBusinessImpact'] + if image_build_compute_name is None and 'imageBuildComputeName' in kwargs: + image_build_compute_name = kwargs['imageBuildComputeName'] + if primary_user_assigned_identity is None and 'primaryUserAssignedIdentity' in kwargs: + primary_user_assigned_identity = kwargs['primaryUserAssignedIdentity'] + if public_access_behind_virtual_network_enabled is None and 'publicAccessBehindVirtualNetworkEnabled' in kwargs: + public_access_behind_virtual_network_enabled = kwargs['publicAccessBehindVirtualNetworkEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if v1_legacy_mode_enabled is None and 'v1LegacyModeEnabled' in kwargs: + v1_legacy_mode_enabled = kwargs['v1LegacyModeEnabled'] + + _setter("application_insights_id", application_insights_id) + _setter("identity", identity) + _setter("key_vault_id", key_vault_id) + _setter("resource_group_name", resource_group_name) + _setter("storage_account_id", storage_account_id) if container_registry_id is not None: - pulumi.set(__self__, "container_registry_id", container_registry_id) + _setter("container_registry_id", container_registry_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if high_business_impact is not None: - pulumi.set(__self__, "high_business_impact", high_business_impact) + _setter("high_business_impact", high_business_impact) if image_build_compute_name is not None: - pulumi.set(__self__, "image_build_compute_name", image_build_compute_name) + _setter("image_build_compute_name", image_build_compute_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_user_assigned_identity is not None: - pulumi.set(__self__, "primary_user_assigned_identity", primary_user_assigned_identity) + _setter("primary_user_assigned_identity", primary_user_assigned_identity) if public_access_behind_virtual_network_enabled is not None: warnings.warn("""`public_access_behind_virtual_network_enabled` will be removed in favour of the property `public_network_access_enabled` in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""public_access_behind_virtual_network_enabled is deprecated: `public_access_behind_virtual_network_enabled` will be removed in favour of the property `public_network_access_enabled` in version 4.0 of the AzureRM Provider.""") if public_access_behind_virtual_network_enabled is not None: - pulumi.set(__self__, "public_access_behind_virtual_network_enabled", public_access_behind_virtual_network_enabled) + _setter("public_access_behind_virtual_network_enabled", public_access_behind_virtual_network_enabled) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if v1_legacy_mode_enabled is not None: - pulumi.set(__self__, "v1_legacy_mode_enabled", v1_legacy_mode_enabled) + _setter("v1_legacy_mode_enabled", v1_legacy_mode_enabled) @property @pulumi.getter(name="applicationInsightsId") @@ -392,51 +475,132 @@ def __init__(__self__, *, :param pulumi.Input[bool] v1_legacy_mode_enabled: Enable V1 API features, enabling `v1_legacy_mode` may prevent you from using features provided by the v2 API. Defaults to `false`. :param pulumi.Input[str] workspace_id: The immutable id associated with this workspace. """ + _WorkspaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_insights_id=application_insights_id, + container_registry_id=container_registry_id, + description=description, + discovery_url=discovery_url, + encryption=encryption, + friendly_name=friendly_name, + high_business_impact=high_business_impact, + identity=identity, + image_build_compute_name=image_build_compute_name, + key_vault_id=key_vault_id, + location=location, + name=name, + primary_user_assigned_identity=primary_user_assigned_identity, + public_access_behind_virtual_network_enabled=public_access_behind_virtual_network_enabled, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + sku_name=sku_name, + storage_account_id=storage_account_id, + tags=tags, + v1_legacy_mode_enabled=v1_legacy_mode_enabled, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_insights_id: Optional[pulumi.Input[str]] = None, + container_registry_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + discovery_url: Optional[pulumi.Input[str]] = None, + encryption: Optional[pulumi.Input['WorkspaceEncryptionArgs']] = None, + friendly_name: Optional[pulumi.Input[str]] = None, + high_business_impact: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['WorkspaceIdentityArgs']] = None, + image_build_compute_name: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_user_assigned_identity: Optional[pulumi.Input[str]] = None, + public_access_behind_virtual_network_enabled: Optional[pulumi.Input[bool]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + v1_legacy_mode_enabled: Optional[pulumi.Input[bool]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_insights_id is None and 'applicationInsightsId' in kwargs: + application_insights_id = kwargs['applicationInsightsId'] + if container_registry_id is None and 'containerRegistryId' in kwargs: + container_registry_id = kwargs['containerRegistryId'] + if discovery_url is None and 'discoveryUrl' in kwargs: + discovery_url = kwargs['discoveryUrl'] + if friendly_name is None and 'friendlyName' in kwargs: + friendly_name = kwargs['friendlyName'] + if high_business_impact is None and 'highBusinessImpact' in kwargs: + high_business_impact = kwargs['highBusinessImpact'] + if image_build_compute_name is None and 'imageBuildComputeName' in kwargs: + image_build_compute_name = kwargs['imageBuildComputeName'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if primary_user_assigned_identity is None and 'primaryUserAssignedIdentity' in kwargs: + primary_user_assigned_identity = kwargs['primaryUserAssignedIdentity'] + if public_access_behind_virtual_network_enabled is None and 'publicAccessBehindVirtualNetworkEnabled' in kwargs: + public_access_behind_virtual_network_enabled = kwargs['publicAccessBehindVirtualNetworkEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if v1_legacy_mode_enabled is None and 'v1LegacyModeEnabled' in kwargs: + v1_legacy_mode_enabled = kwargs['v1LegacyModeEnabled'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if application_insights_id is not None: - pulumi.set(__self__, "application_insights_id", application_insights_id) + _setter("application_insights_id", application_insights_id) if container_registry_id is not None: - pulumi.set(__self__, "container_registry_id", container_registry_id) + _setter("container_registry_id", container_registry_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if discovery_url is not None: - pulumi.set(__self__, "discovery_url", discovery_url) + _setter("discovery_url", discovery_url) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if friendly_name is not None: - pulumi.set(__self__, "friendly_name", friendly_name) + _setter("friendly_name", friendly_name) if high_business_impact is not None: - pulumi.set(__self__, "high_business_impact", high_business_impact) + _setter("high_business_impact", high_business_impact) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if image_build_compute_name is not None: - pulumi.set(__self__, "image_build_compute_name", image_build_compute_name) + _setter("image_build_compute_name", image_build_compute_name) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_user_assigned_identity is not None: - pulumi.set(__self__, "primary_user_assigned_identity", primary_user_assigned_identity) + _setter("primary_user_assigned_identity", primary_user_assigned_identity) if public_access_behind_virtual_network_enabled is not None: warnings.warn("""`public_access_behind_virtual_network_enabled` will be removed in favour of the property `public_network_access_enabled` in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""public_access_behind_virtual_network_enabled is deprecated: `public_access_behind_virtual_network_enabled` will be removed in favour of the property `public_network_access_enabled` in version 4.0 of the AzureRM Provider.""") if public_access_behind_virtual_network_enabled is not None: - pulumi.set(__self__, "public_access_behind_virtual_network_enabled", public_access_behind_virtual_network_enabled) + _setter("public_access_behind_virtual_network_enabled", public_access_behind_virtual_network_enabled) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if v1_legacy_mode_enabled is not None: - pulumi.set(__self__, "v1_legacy_mode_enabled", v1_legacy_mode_enabled) + _setter("v1_legacy_mode_enabled", v1_legacy_mode_enabled) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="applicationInsightsId") @@ -1249,6 +1413,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1287,9 +1455,19 @@ def _internal_init(__self__, __props__.__dict__["application_insights_id"] = application_insights_id __props__.__dict__["container_registry_id"] = container_registry_id __props__.__dict__["description"] = description + if encryption is not None and not isinstance(encryption, WorkspaceEncryptionArgs): + encryption = encryption or {} + def _setter(key, value): + encryption[key] = value + WorkspaceEncryptionArgs._configure(_setter, **encryption) __props__.__dict__["encryption"] = encryption __props__.__dict__["friendly_name"] = friendly_name __props__.__dict__["high_business_impact"] = high_business_impact + if identity is not None and not isinstance(identity, WorkspaceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + WorkspaceIdentityArgs._configure(_setter, **identity) if identity is None and not opts.urn: raise TypeError("Missing required property 'identity'") __props__.__dict__["identity"] = identity diff --git a/sdk/python/pulumi_azure/maintenance/_inputs.py b/sdk/python/pulumi_azure/maintenance/_inputs.py index 628ecf0e2c..8d9215527a 100644 --- a/sdk/python/pulumi_azure/maintenance/_inputs.py +++ b/sdk/python/pulumi_azure/maintenance/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -27,12 +27,27 @@ def __init__(__self__, *, :param pulumi.Input[str] reboot: Possible reboot preference as defined by the user based on which it would be decided to reboot the machine or not after the patch operation is completed. Possible values are `Always`, `IfRequired` and `Never`. This property only applies when `scope` is set to `InGuestPatch`. :param pulumi.Input[Sequence[pulumi.Input['ConfigurationInstallPatchesWindowArgs']]] windows: A `windows` block as defined above. This property only applies when `scope` is set to `InGuestPatch` """ + ConfigurationInstallPatchesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linuxes=linuxes, + reboot=reboot, + windows=windows, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linuxes: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationInstallPatchesLinuxArgs']]]] = None, + reboot: Optional[pulumi.Input[str]] = None, + windows: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationInstallPatchesWindowArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linuxes is not None: - pulumi.set(__self__, "linuxes", linuxes) + _setter("linuxes", linuxes) if reboot is not None: - pulumi.set(__self__, "reboot", reboot) + _setter("reboot", reboot) if windows is not None: - pulumi.set(__self__, "windows", windows) + _setter("windows", windows) @property @pulumi.getter @@ -82,12 +97,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] package_names_mask_to_excludes: List of package names to be excluded from patching. :param pulumi.Input[Sequence[pulumi.Input[str]]] package_names_mask_to_includes: List of package names to be included for patching. """ + ConfigurationInstallPatchesLinuxArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + classifications_to_includes=classifications_to_includes, + package_names_mask_to_excludes=package_names_mask_to_excludes, + package_names_mask_to_includes=package_names_mask_to_includes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + classifications_to_includes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + package_names_mask_to_excludes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + package_names_mask_to_includes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if classifications_to_includes is None and 'classificationsToIncludes' in kwargs: + classifications_to_includes = kwargs['classificationsToIncludes'] + if package_names_mask_to_excludes is None and 'packageNamesMaskToExcludes' in kwargs: + package_names_mask_to_excludes = kwargs['packageNamesMaskToExcludes'] + if package_names_mask_to_includes is None and 'packageNamesMaskToIncludes' in kwargs: + package_names_mask_to_includes = kwargs['packageNamesMaskToIncludes'] + if classifications_to_includes is not None: - pulumi.set(__self__, "classifications_to_includes", classifications_to_includes) + _setter("classifications_to_includes", classifications_to_includes) if package_names_mask_to_excludes is not None: - pulumi.set(__self__, "package_names_mask_to_excludes", package_names_mask_to_excludes) + _setter("package_names_mask_to_excludes", package_names_mask_to_excludes) if package_names_mask_to_includes is not None: - pulumi.set(__self__, "package_names_mask_to_includes", package_names_mask_to_includes) + _setter("package_names_mask_to_includes", package_names_mask_to_includes) @property @pulumi.getter(name="classificationsToIncludes") @@ -137,12 +173,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] kb_numbers_to_excludes: List of KB numbers to be excluded from patching. :param pulumi.Input[Sequence[pulumi.Input[str]]] kb_numbers_to_includes: List of KB numbers to be included for patching. """ + ConfigurationInstallPatchesWindowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + classifications_to_includes=classifications_to_includes, + kb_numbers_to_excludes=kb_numbers_to_excludes, + kb_numbers_to_includes=kb_numbers_to_includes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + classifications_to_includes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + kb_numbers_to_excludes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + kb_numbers_to_includes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if classifications_to_includes is None and 'classificationsToIncludes' in kwargs: + classifications_to_includes = kwargs['classificationsToIncludes'] + if kb_numbers_to_excludes is None and 'kbNumbersToExcludes' in kwargs: + kb_numbers_to_excludes = kwargs['kbNumbersToExcludes'] + if kb_numbers_to_includes is None and 'kbNumbersToIncludes' in kwargs: + kb_numbers_to_includes = kwargs['kbNumbersToIncludes'] + if classifications_to_includes is not None: - pulumi.set(__self__, "classifications_to_includes", classifications_to_includes) + _setter("classifications_to_includes", classifications_to_includes) if kb_numbers_to_excludes is not None: - pulumi.set(__self__, "kb_numbers_to_excludes", kb_numbers_to_excludes) + _setter("kb_numbers_to_excludes", kb_numbers_to_excludes) if kb_numbers_to_includes is not None: - pulumi.set(__self__, "kb_numbers_to_includes", kb_numbers_to_includes) + _setter("kb_numbers_to_includes", kb_numbers_to_includes) @property @pulumi.getter(name="classificationsToIncludes") @@ -196,14 +253,45 @@ def __init__(__self__, *, :param pulumi.Input[str] expiration_date_time: Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format. :param pulumi.Input[str] recur_every: The rate at which a maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules. """ - pulumi.set(__self__, "start_date_time", start_date_time) - pulumi.set(__self__, "time_zone", time_zone) + ConfigurationWindowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + start_date_time=start_date_time, + time_zone=time_zone, + duration=duration, + expiration_date_time=expiration_date_time, + recur_every=recur_every, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + start_date_time: Optional[pulumi.Input[str]] = None, + time_zone: Optional[pulumi.Input[str]] = None, + duration: Optional[pulumi.Input[str]] = None, + expiration_date_time: Optional[pulumi.Input[str]] = None, + recur_every: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start_date_time is None and 'startDateTime' in kwargs: + start_date_time = kwargs['startDateTime'] + if start_date_time is None: + raise TypeError("Missing 'start_date_time' argument") + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if time_zone is None: + raise TypeError("Missing 'time_zone' argument") + if expiration_date_time is None and 'expirationDateTime' in kwargs: + expiration_date_time = kwargs['expirationDateTime'] + if recur_every is None and 'recurEvery' in kwargs: + recur_every = kwargs['recurEvery'] + + _setter("start_date_time", start_date_time) + _setter("time_zone", time_zone) if duration is not None: - pulumi.set(__self__, "duration", duration) + _setter("duration", duration) if expiration_date_time is not None: - pulumi.set(__self__, "expiration_date_time", expiration_date_time) + _setter("expiration_date_time", expiration_date_time) if recur_every is not None: - pulumi.set(__self__, "recur_every", recur_every) + _setter("recur_every", recur_every) @property @pulumi.getter(name="startDateTime") diff --git a/sdk/python/pulumi_azure/maintenance/assignment_dedicated_host.py b/sdk/python/pulumi_azure/maintenance/assignment_dedicated_host.py index 1db9875c15..e5797974e6 100644 --- a/sdk/python/pulumi_azure/maintenance/assignment_dedicated_host.py +++ b/sdk/python/pulumi_azure/maintenance/assignment_dedicated_host.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AssignmentDedicatedHostArgs', 'AssignmentDedicatedHost'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] maintenance_configuration_id: Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created. :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "dedicated_host_id", dedicated_host_id) - pulumi.set(__self__, "maintenance_configuration_id", maintenance_configuration_id) + AssignmentDedicatedHostArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dedicated_host_id=dedicated_host_id, + maintenance_configuration_id=maintenance_configuration_id, + location=location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dedicated_host_id: Optional[pulumi.Input[str]] = None, + maintenance_configuration_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dedicated_host_id is None and 'dedicatedHostId' in kwargs: + dedicated_host_id = kwargs['dedicatedHostId'] + if dedicated_host_id is None: + raise TypeError("Missing 'dedicated_host_id' argument") + if maintenance_configuration_id is None and 'maintenanceConfigurationId' in kwargs: + maintenance_configuration_id = kwargs['maintenanceConfigurationId'] + if maintenance_configuration_id is None: + raise TypeError("Missing 'maintenance_configuration_id' argument") + + _setter("dedicated_host_id", dedicated_host_id) + _setter("maintenance_configuration_id", maintenance_configuration_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) @property @pulumi.getter(name="dedicatedHostId") @@ -77,12 +100,31 @@ def __init__(__self__, *, :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. :param pulumi.Input[str] maintenance_configuration_id: Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created. """ + _AssignmentDedicatedHostState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dedicated_host_id=dedicated_host_id, + location=location, + maintenance_configuration_id=maintenance_configuration_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dedicated_host_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_configuration_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dedicated_host_id is None and 'dedicatedHostId' in kwargs: + dedicated_host_id = kwargs['dedicatedHostId'] + if maintenance_configuration_id is None and 'maintenanceConfigurationId' in kwargs: + maintenance_configuration_id = kwargs['maintenanceConfigurationId'] + if dedicated_host_id is not None: - pulumi.set(__self__, "dedicated_host_id", dedicated_host_id) + _setter("dedicated_host_id", dedicated_host_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_configuration_id is not None: - pulumi.set(__self__, "maintenance_configuration_id", maintenance_configuration_id) + _setter("maintenance_configuration_id", maintenance_configuration_id) @property @pulumi.getter(name="dedicatedHostId") @@ -226,6 +268,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AssignmentDedicatedHostArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/maintenance/assignment_virtual_machine.py b/sdk/python/pulumi_azure/maintenance/assignment_virtual_machine.py index efaf85e6e0..732bfe6604 100644 --- a/sdk/python/pulumi_azure/maintenance/assignment_virtual_machine.py +++ b/sdk/python/pulumi_azure/maintenance/assignment_virtual_machine.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AssignmentVirtualMachineArgs', 'AssignmentVirtualMachine'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] virtual_machine_id: Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created. :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "maintenance_configuration_id", maintenance_configuration_id) - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + AssignmentVirtualMachineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + maintenance_configuration_id=maintenance_configuration_id, + virtual_machine_id=virtual_machine_id, + location=location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + maintenance_configuration_id: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maintenance_configuration_id is None and 'maintenanceConfigurationId' in kwargs: + maintenance_configuration_id = kwargs['maintenanceConfigurationId'] + if maintenance_configuration_id is None: + raise TypeError("Missing 'maintenance_configuration_id' argument") + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_id is None: + raise TypeError("Missing 'virtual_machine_id' argument") + + _setter("maintenance_configuration_id", maintenance_configuration_id) + _setter("virtual_machine_id", virtual_machine_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) @property @pulumi.getter(name="maintenanceConfigurationId") @@ -77,12 +100,31 @@ def __init__(__self__, *, :param pulumi.Input[str] maintenance_configuration_id: Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_machine_id: Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created. """ + _AssignmentVirtualMachineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + maintenance_configuration_id=maintenance_configuration_id, + virtual_machine_id=virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + maintenance_configuration_id: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maintenance_configuration_id is None and 'maintenanceConfigurationId' in kwargs: + maintenance_configuration_id = kwargs['maintenanceConfigurationId'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_configuration_id is not None: - pulumi.set(__self__, "maintenance_configuration_id", maintenance_configuration_id) + _setter("maintenance_configuration_id", maintenance_configuration_id) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) @property @pulumi.getter @@ -280,6 +322,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AssignmentVirtualMachineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/maintenance/assignment_virtual_machine_scale_set.py b/sdk/python/pulumi_azure/maintenance/assignment_virtual_machine_scale_set.py index 173653587e..75bbe6f930 100644 --- a/sdk/python/pulumi_azure/maintenance/assignment_virtual_machine_scale_set.py +++ b/sdk/python/pulumi_azure/maintenance/assignment_virtual_machine_scale_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AssignmentVirtualMachineScaleSetArgs', 'AssignmentVirtualMachineScaleSet'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] virtual_machine_scale_set_id: Specifies the Virtual Machine Scale Set ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created. :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "maintenance_configuration_id", maintenance_configuration_id) - pulumi.set(__self__, "virtual_machine_scale_set_id", virtual_machine_scale_set_id) + AssignmentVirtualMachineScaleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + maintenance_configuration_id=maintenance_configuration_id, + virtual_machine_scale_set_id=virtual_machine_scale_set_id, + location=location, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + maintenance_configuration_id: Optional[pulumi.Input[str]] = None, + virtual_machine_scale_set_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maintenance_configuration_id is None and 'maintenanceConfigurationId' in kwargs: + maintenance_configuration_id = kwargs['maintenanceConfigurationId'] + if maintenance_configuration_id is None: + raise TypeError("Missing 'maintenance_configuration_id' argument") + if virtual_machine_scale_set_id is None and 'virtualMachineScaleSetId' in kwargs: + virtual_machine_scale_set_id = kwargs['virtualMachineScaleSetId'] + if virtual_machine_scale_set_id is None: + raise TypeError("Missing 'virtual_machine_scale_set_id' argument") + + _setter("maintenance_configuration_id", maintenance_configuration_id) + _setter("virtual_machine_scale_set_id", virtual_machine_scale_set_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) @property @pulumi.getter(name="maintenanceConfigurationId") @@ -77,12 +100,31 @@ def __init__(__self__, *, :param pulumi.Input[str] maintenance_configuration_id: Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_machine_scale_set_id: Specifies the Virtual Machine Scale Set ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created. """ + _AssignmentVirtualMachineScaleSetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + maintenance_configuration_id=maintenance_configuration_id, + virtual_machine_scale_set_id=virtual_machine_scale_set_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + maintenance_configuration_id: Optional[pulumi.Input[str]] = None, + virtual_machine_scale_set_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maintenance_configuration_id is None and 'maintenanceConfigurationId' in kwargs: + maintenance_configuration_id = kwargs['maintenanceConfigurationId'] + if virtual_machine_scale_set_id is None and 'virtualMachineScaleSetId' in kwargs: + virtual_machine_scale_set_id = kwargs['virtualMachineScaleSetId'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_configuration_id is not None: - pulumi.set(__self__, "maintenance_configuration_id", maintenance_configuration_id) + _setter("maintenance_configuration_id", maintenance_configuration_id) if virtual_machine_scale_set_id is not None: - pulumi.set(__self__, "virtual_machine_scale_set_id", virtual_machine_scale_set_id) + _setter("virtual_machine_scale_set_id", virtual_machine_scale_set_id) @property @pulumi.getter @@ -402,6 +444,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AssignmentVirtualMachineScaleSetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/maintenance/configuration.py b/sdk/python/pulumi_azure/maintenance/configuration.py index f66005f5b7..3abec05d69 100644 --- a/sdk/python/pulumi_azure/maintenance/configuration.py +++ b/sdk/python/pulumi_azure/maintenance/configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,24 +41,63 @@ def __init__(__self__, *, :param pulumi.Input[str] visibility: The visibility of the Maintenance Configuration. The only allowable value is `Custom`. :param pulumi.Input['ConfigurationWindowArgs'] window: A `window` block as defined below. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scope", scope) + ConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + scope=scope, + in_guest_user_patch_mode=in_guest_user_patch_mode, + install_patches=install_patches, + location=location, + name=name, + properties=properties, + tags=tags, + visibility=visibility, + window=window, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + in_guest_user_patch_mode: Optional[pulumi.Input[str]] = None, + install_patches: Optional[pulumi.Input['ConfigurationInstallPatchesArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + visibility: Optional[pulumi.Input[str]] = None, + window: Optional[pulumi.Input['ConfigurationWindowArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + if in_guest_user_patch_mode is None and 'inGuestUserPatchMode' in kwargs: + in_guest_user_patch_mode = kwargs['inGuestUserPatchMode'] + if install_patches is None and 'installPatches' in kwargs: + install_patches = kwargs['installPatches'] + + _setter("resource_group_name", resource_group_name) + _setter("scope", scope) if in_guest_user_patch_mode is not None: - pulumi.set(__self__, "in_guest_user_patch_mode", in_guest_user_patch_mode) + _setter("in_guest_user_patch_mode", in_guest_user_patch_mode) if install_patches is not None: - pulumi.set(__self__, "install_patches", install_patches) + _setter("install_patches", install_patches) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if visibility is not None: - pulumi.set(__self__, "visibility", visibility) + _setter("visibility", visibility) if window is not None: - pulumi.set(__self__, "window", window) + _setter("window", window) @property @pulumi.getter(name="resourceGroupName") @@ -211,26 +250,61 @@ def __init__(__self__, *, :param pulumi.Input[str] visibility: The visibility of the Maintenance Configuration. The only allowable value is `Custom`. :param pulumi.Input['ConfigurationWindowArgs'] window: A `window` block as defined below. """ + _ConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + in_guest_user_patch_mode=in_guest_user_patch_mode, + install_patches=install_patches, + location=location, + name=name, + properties=properties, + resource_group_name=resource_group_name, + scope=scope, + tags=tags, + visibility=visibility, + window=window, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + in_guest_user_patch_mode: Optional[pulumi.Input[str]] = None, + install_patches: Optional[pulumi.Input['ConfigurationInstallPatchesArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + visibility: Optional[pulumi.Input[str]] = None, + window: Optional[pulumi.Input['ConfigurationWindowArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if in_guest_user_patch_mode is None and 'inGuestUserPatchMode' in kwargs: + in_guest_user_patch_mode = kwargs['inGuestUserPatchMode'] + if install_patches is None and 'installPatches' in kwargs: + install_patches = kwargs['installPatches'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if in_guest_user_patch_mode is not None: - pulumi.set(__self__, "in_guest_user_patch_mode", in_guest_user_patch_mode) + _setter("in_guest_user_patch_mode", in_guest_user_patch_mode) if install_patches is not None: - pulumi.set(__self__, "install_patches", install_patches) + _setter("install_patches", install_patches) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if visibility is not None: - pulumi.set(__self__, "visibility", visibility) + _setter("visibility", visibility) if window is not None: - pulumi.set(__self__, "window", window) + _setter("window", window) @property @pulumi.getter(name="inGuestUserPatchMode") @@ -456,6 +530,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -481,6 +559,11 @@ def _internal_init(__self__, __props__ = ConfigurationArgs.__new__(ConfigurationArgs) __props__.__dict__["in_guest_user_patch_mode"] = in_guest_user_patch_mode + if install_patches is not None and not isinstance(install_patches, ConfigurationInstallPatchesArgs): + install_patches = install_patches or {} + def _setter(key, value): + install_patches[key] = value + ConfigurationInstallPatchesArgs._configure(_setter, **install_patches) __props__.__dict__["install_patches"] = install_patches __props__.__dict__["location"] = location __props__.__dict__["name"] = name @@ -493,6 +576,11 @@ def _internal_init(__self__, __props__.__dict__["scope"] = scope __props__.__dict__["tags"] = tags __props__.__dict__["visibility"] = visibility + if window is not None and not isinstance(window, ConfigurationWindowArgs): + window = window or {} + def _setter(key, value): + window[key] = value + ConfigurationWindowArgs._configure(_setter, **window) __props__.__dict__["window"] = window super(Configuration, __self__).__init__( 'azure:maintenance/configuration:Configuration', diff --git a/sdk/python/pulumi_azure/maintenance/get_configuration.py b/sdk/python/pulumi_azure/maintenance/get_configuration.py index 5be1b73030..bc48acbc3c 100644 --- a/sdk/python/pulumi_azure/maintenance/get_configuration.py +++ b/sdk/python/pulumi_azure/maintenance/get_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/maintenance/get_public_configurations.py b/sdk/python/pulumi_azure/maintenance/get_public_configurations.py index 0074be2808..a2d9caaf63 100644 --- a/sdk/python/pulumi_azure/maintenance/get_public_configurations.py +++ b/sdk/python/pulumi_azure/maintenance/get_public_configurations.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/maintenance/outputs.py b/sdk/python/pulumi_azure/maintenance/outputs.py index 580f4002df..31cc6e0fd8 100644 --- a/sdk/python/pulumi_azure/maintenance/outputs.py +++ b/sdk/python/pulumi_azure/maintenance/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -33,12 +33,27 @@ def __init__(__self__, *, :param str reboot: Possible reboot preference as defined by the user based on which it would be decided to reboot the machine or not after the patch operation is completed. Possible values are `Always`, `IfRequired` and `Never`. This property only applies when `scope` is set to `InGuestPatch`. :param Sequence['ConfigurationInstallPatchesWindowArgs'] windows: A `windows` block as defined above. This property only applies when `scope` is set to `InGuestPatch` """ + ConfigurationInstallPatches._configure( + lambda key, value: pulumi.set(__self__, key, value), + linuxes=linuxes, + reboot=reboot, + windows=windows, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linuxes: Optional[Sequence['outputs.ConfigurationInstallPatchesLinux']] = None, + reboot: Optional[str] = None, + windows: Optional[Sequence['outputs.ConfigurationInstallPatchesWindow']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linuxes is not None: - pulumi.set(__self__, "linuxes", linuxes) + _setter("linuxes", linuxes) if reboot is not None: - pulumi.set(__self__, "reboot", reboot) + _setter("reboot", reboot) if windows is not None: - pulumi.set(__self__, "windows", windows) + _setter("windows", windows) @property @pulumi.getter @@ -97,12 +112,33 @@ def __init__(__self__, *, :param Sequence[str] package_names_mask_to_excludes: List of package names to be excluded from patching. :param Sequence[str] package_names_mask_to_includes: List of package names to be included for patching. """ + ConfigurationInstallPatchesLinux._configure( + lambda key, value: pulumi.set(__self__, key, value), + classifications_to_includes=classifications_to_includes, + package_names_mask_to_excludes=package_names_mask_to_excludes, + package_names_mask_to_includes=package_names_mask_to_includes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + classifications_to_includes: Optional[Sequence[str]] = None, + package_names_mask_to_excludes: Optional[Sequence[str]] = None, + package_names_mask_to_includes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if classifications_to_includes is None and 'classificationsToIncludes' in kwargs: + classifications_to_includes = kwargs['classificationsToIncludes'] + if package_names_mask_to_excludes is None and 'packageNamesMaskToExcludes' in kwargs: + package_names_mask_to_excludes = kwargs['packageNamesMaskToExcludes'] + if package_names_mask_to_includes is None and 'packageNamesMaskToIncludes' in kwargs: + package_names_mask_to_includes = kwargs['packageNamesMaskToIncludes'] + if classifications_to_includes is not None: - pulumi.set(__self__, "classifications_to_includes", classifications_to_includes) + _setter("classifications_to_includes", classifications_to_includes) if package_names_mask_to_excludes is not None: - pulumi.set(__self__, "package_names_mask_to_excludes", package_names_mask_to_excludes) + _setter("package_names_mask_to_excludes", package_names_mask_to_excludes) if package_names_mask_to_includes is not None: - pulumi.set(__self__, "package_names_mask_to_includes", package_names_mask_to_includes) + _setter("package_names_mask_to_includes", package_names_mask_to_includes) @property @pulumi.getter(name="classificationsToIncludes") @@ -161,12 +197,33 @@ def __init__(__self__, *, :param Sequence[str] kb_numbers_to_excludes: List of KB numbers to be excluded from patching. :param Sequence[str] kb_numbers_to_includes: List of KB numbers to be included for patching. """ + ConfigurationInstallPatchesWindow._configure( + lambda key, value: pulumi.set(__self__, key, value), + classifications_to_includes=classifications_to_includes, + kb_numbers_to_excludes=kb_numbers_to_excludes, + kb_numbers_to_includes=kb_numbers_to_includes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + classifications_to_includes: Optional[Sequence[str]] = None, + kb_numbers_to_excludes: Optional[Sequence[str]] = None, + kb_numbers_to_includes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if classifications_to_includes is None and 'classificationsToIncludes' in kwargs: + classifications_to_includes = kwargs['classificationsToIncludes'] + if kb_numbers_to_excludes is None and 'kbNumbersToExcludes' in kwargs: + kb_numbers_to_excludes = kwargs['kbNumbersToExcludes'] + if kb_numbers_to_includes is None and 'kbNumbersToIncludes' in kwargs: + kb_numbers_to_includes = kwargs['kbNumbersToIncludes'] + if classifications_to_includes is not None: - pulumi.set(__self__, "classifications_to_includes", classifications_to_includes) + _setter("classifications_to_includes", classifications_to_includes) if kb_numbers_to_excludes is not None: - pulumi.set(__self__, "kb_numbers_to_excludes", kb_numbers_to_excludes) + _setter("kb_numbers_to_excludes", kb_numbers_to_excludes) if kb_numbers_to_includes is not None: - pulumi.set(__self__, "kb_numbers_to_includes", kb_numbers_to_includes) + _setter("kb_numbers_to_includes", kb_numbers_to_includes) @property @pulumi.getter(name="classificationsToIncludes") @@ -231,14 +288,45 @@ def __init__(__self__, *, :param str expiration_date_time: Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format. :param str recur_every: The rate at which a maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules. """ - pulumi.set(__self__, "start_date_time", start_date_time) - pulumi.set(__self__, "time_zone", time_zone) + ConfigurationWindow._configure( + lambda key, value: pulumi.set(__self__, key, value), + start_date_time=start_date_time, + time_zone=time_zone, + duration=duration, + expiration_date_time=expiration_date_time, + recur_every=recur_every, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + start_date_time: Optional[str] = None, + time_zone: Optional[str] = None, + duration: Optional[str] = None, + expiration_date_time: Optional[str] = None, + recur_every: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start_date_time is None and 'startDateTime' in kwargs: + start_date_time = kwargs['startDateTime'] + if start_date_time is None: + raise TypeError("Missing 'start_date_time' argument") + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if time_zone is None: + raise TypeError("Missing 'time_zone' argument") + if expiration_date_time is None and 'expirationDateTime' in kwargs: + expiration_date_time = kwargs['expirationDateTime'] + if recur_every is None and 'recurEvery' in kwargs: + recur_every = kwargs['recurEvery'] + + _setter("start_date_time", start_date_time) + _setter("time_zone", time_zone) if duration is not None: - pulumi.set(__self__, "duration", duration) + _setter("duration", duration) if expiration_date_time is not None: - pulumi.set(__self__, "expiration_date_time", expiration_date_time) + _setter("expiration_date_time", expiration_date_time) if recur_every is not None: - pulumi.set(__self__, "recur_every", recur_every) + _setter("recur_every", recur_every) @property @pulumi.getter(name="startDateTime") @@ -292,9 +380,30 @@ def __init__(__self__, *, :param str reboot: Possible reboot preference as defined by the user based on which it would be decided to reboot the machine or not after the patch operation is completed. :param Sequence['GetConfigurationInstallPatchWindowArgs'] windows: A `windows` block as defined below. """ - pulumi.set(__self__, "linuxes", linuxes) - pulumi.set(__self__, "reboot", reboot) - pulumi.set(__self__, "windows", windows) + GetConfigurationInstallPatchResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + linuxes=linuxes, + reboot=reboot, + windows=windows, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linuxes: Optional[Sequence['outputs.GetConfigurationInstallPatchLinuxResult']] = None, + reboot: Optional[str] = None, + windows: Optional[Sequence['outputs.GetConfigurationInstallPatchWindowResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linuxes is None: + raise TypeError("Missing 'linuxes' argument") + if reboot is None: + raise TypeError("Missing 'reboot' argument") + if windows is None: + raise TypeError("Missing 'windows' argument") + + _setter("linuxes", linuxes) + _setter("reboot", reboot) + _setter("windows", windows) @property @pulumi.getter @@ -332,9 +441,36 @@ def __init__(__self__, *, :param Sequence[str] package_names_mask_to_excludes: List of package names to be excluded from patching. :param Sequence[str] package_names_mask_to_includes: List of package names to be included for patching. """ - pulumi.set(__self__, "classifications_to_includes", classifications_to_includes) - pulumi.set(__self__, "package_names_mask_to_excludes", package_names_mask_to_excludes) - pulumi.set(__self__, "package_names_mask_to_includes", package_names_mask_to_includes) + GetConfigurationInstallPatchLinuxResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + classifications_to_includes=classifications_to_includes, + package_names_mask_to_excludes=package_names_mask_to_excludes, + package_names_mask_to_includes=package_names_mask_to_includes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + classifications_to_includes: Optional[Sequence[str]] = None, + package_names_mask_to_excludes: Optional[Sequence[str]] = None, + package_names_mask_to_includes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if classifications_to_includes is None and 'classificationsToIncludes' in kwargs: + classifications_to_includes = kwargs['classificationsToIncludes'] + if classifications_to_includes is None: + raise TypeError("Missing 'classifications_to_includes' argument") + if package_names_mask_to_excludes is None and 'packageNamesMaskToExcludes' in kwargs: + package_names_mask_to_excludes = kwargs['packageNamesMaskToExcludes'] + if package_names_mask_to_excludes is None: + raise TypeError("Missing 'package_names_mask_to_excludes' argument") + if package_names_mask_to_includes is None and 'packageNamesMaskToIncludes' in kwargs: + package_names_mask_to_includes = kwargs['packageNamesMaskToIncludes'] + if package_names_mask_to_includes is None: + raise TypeError("Missing 'package_names_mask_to_includes' argument") + + _setter("classifications_to_includes", classifications_to_includes) + _setter("package_names_mask_to_excludes", package_names_mask_to_excludes) + _setter("package_names_mask_to_includes", package_names_mask_to_includes) @property @pulumi.getter(name="classificationsToIncludes") @@ -372,9 +508,36 @@ def __init__(__self__, *, :param Sequence[str] kb_numbers_to_excludes: List of KB numbers to be excluded from patching. :param Sequence[str] kb_numbers_to_includes: List of KB numbers to be included for patching. """ - pulumi.set(__self__, "classifications_to_includes", classifications_to_includes) - pulumi.set(__self__, "kb_numbers_to_excludes", kb_numbers_to_excludes) - pulumi.set(__self__, "kb_numbers_to_includes", kb_numbers_to_includes) + GetConfigurationInstallPatchWindowResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + classifications_to_includes=classifications_to_includes, + kb_numbers_to_excludes=kb_numbers_to_excludes, + kb_numbers_to_includes=kb_numbers_to_includes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + classifications_to_includes: Optional[Sequence[str]] = None, + kb_numbers_to_excludes: Optional[Sequence[str]] = None, + kb_numbers_to_includes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if classifications_to_includes is None and 'classificationsToIncludes' in kwargs: + classifications_to_includes = kwargs['classificationsToIncludes'] + if classifications_to_includes is None: + raise TypeError("Missing 'classifications_to_includes' argument") + if kb_numbers_to_excludes is None and 'kbNumbersToExcludes' in kwargs: + kb_numbers_to_excludes = kwargs['kbNumbersToExcludes'] + if kb_numbers_to_excludes is None: + raise TypeError("Missing 'kb_numbers_to_excludes' argument") + if kb_numbers_to_includes is None and 'kbNumbersToIncludes' in kwargs: + kb_numbers_to_includes = kwargs['kbNumbersToIncludes'] + if kb_numbers_to_includes is None: + raise TypeError("Missing 'kb_numbers_to_includes' argument") + + _setter("classifications_to_includes", classifications_to_includes) + _setter("kb_numbers_to_excludes", kb_numbers_to_excludes) + _setter("kb_numbers_to_includes", kb_numbers_to_includes) @property @pulumi.getter(name="classificationsToIncludes") @@ -416,11 +579,48 @@ def __init__(__self__, *, :param str start_date_time: Effective start date of the maintenance window. :param str time_zone: The time zone for the maintenance window. """ - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "expiration_date_time", expiration_date_time) - pulumi.set(__self__, "recur_every", recur_every) - pulumi.set(__self__, "start_date_time", start_date_time) - pulumi.set(__self__, "time_zone", time_zone) + GetConfigurationWindowResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration=duration, + expiration_date_time=expiration_date_time, + recur_every=recur_every, + start_date_time=start_date_time, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration: Optional[str] = None, + expiration_date_time: Optional[str] = None, + recur_every: Optional[str] = None, + start_date_time: Optional[str] = None, + time_zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration is None: + raise TypeError("Missing 'duration' argument") + if expiration_date_time is None and 'expirationDateTime' in kwargs: + expiration_date_time = kwargs['expirationDateTime'] + if expiration_date_time is None: + raise TypeError("Missing 'expiration_date_time' argument") + if recur_every is None and 'recurEvery' in kwargs: + recur_every = kwargs['recurEvery'] + if recur_every is None: + raise TypeError("Missing 'recur_every' argument") + if start_date_time is None and 'startDateTime' in kwargs: + start_date_time = kwargs['startDateTime'] + if start_date_time is None: + raise TypeError("Missing 'start_date_time' argument") + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if time_zone is None: + raise TypeError("Missing 'time_zone' argument") + + _setter("duration", duration) + _setter("expiration_date_time", expiration_date_time) + _setter("recur_every", recur_every) + _setter("start_date_time", start_date_time) + _setter("time_zone", time_zone) @property @pulumi.getter @@ -484,14 +684,61 @@ def __init__(__self__, *, :param str recur_every: The recurring window to filter the list of Public Maintenance Configurations against. Possible values are `Monday-Thursday` and `Friday-Sunday` :param str time_zone: The time zone for the maintenance window. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "maintenance_scope", maintenance_scope) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "recur_every", recur_every) - pulumi.set(__self__, "time_zone", time_zone) + GetPublicConfigurationsConfigResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + duration=duration, + id=id, + location=location, + maintenance_scope=maintenance_scope, + name=name, + recur_every=recur_every, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + duration: Optional[str] = None, + id: Optional[str] = None, + location: Optional[str] = None, + maintenance_scope: Optional[str] = None, + name: Optional[str] = None, + recur_every: Optional[str] = None, + time_zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if duration is None: + raise TypeError("Missing 'duration' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if location is None: + raise TypeError("Missing 'location' argument") + if maintenance_scope is None and 'maintenanceScope' in kwargs: + maintenance_scope = kwargs['maintenanceScope'] + if maintenance_scope is None: + raise TypeError("Missing 'maintenance_scope' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if recur_every is None and 'recurEvery' in kwargs: + recur_every = kwargs['recurEvery'] + if recur_every is None: + raise TypeError("Missing 'recur_every' argument") + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if time_zone is None: + raise TypeError("Missing 'time_zone' argument") + + _setter("description", description) + _setter("duration", duration) + _setter("id", id) + _setter("location", location) + _setter("maintenance_scope", maintenance_scope) + _setter("name", name) + _setter("recur_every", recur_every) + _setter("time_zone", time_zone) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/managedapplication/_inputs.py b/sdk/python/pulumi_azure/managedapplication/_inputs.py index 01b38f051c..afb65ad32a 100644 --- a/sdk/python/pulumi_azure/managedapplication/_inputs.py +++ b/sdk/python/pulumi_azure/managedapplication/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -31,12 +31,41 @@ def __init__(__self__, *, > **NOTE:** When `plan` is specified, legal terms must be accepted for this item on this subscription before creating the Managed Application. The `marketplace.Agreement` resource or AZ CLI tool can be used to do this. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "version", version) + ApplicationPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + version=version, + promotion_code=promotion_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + product: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + promotion_code: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if promotion_code is None and 'promotionCode' in kwargs: + promotion_code = kwargs['promotionCode'] + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) + _setter("version", version) if promotion_code is not None: - pulumi.set(__self__, "promotion_code", promotion_code) + _setter("promotion_code", promotion_code) @property @pulumi.getter @@ -110,8 +139,29 @@ def __init__(__self__, *, :param pulumi.Input[str] role_definition_id: Specifies a role definition identifier for the provider. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group. :param pulumi.Input[str] service_principal_id: Specifies a service principal identifier for the provider. This is the identity that the provider will use to call ARM to manage the managed application resources. """ - pulumi.set(__self__, "role_definition_id", role_definition_id) - pulumi.set(__self__, "service_principal_id", service_principal_id) + DefinitionAuthorizationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + role_definition_id=role_definition_id, + service_principal_id=service_principal_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + role_definition_id: Optional[pulumi.Input[str]] = None, + service_principal_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_id is None: + raise TypeError("Missing 'role_definition_id' argument") + if service_principal_id is None and 'servicePrincipalId' in kwargs: + service_principal_id = kwargs['servicePrincipalId'] + if service_principal_id is None: + raise TypeError("Missing 'service_principal_id' argument") + + _setter("role_definition_id", role_definition_id) + _setter("service_principal_id", service_principal_id) @property @pulumi.getter(name="roleDefinitionId") diff --git a/sdk/python/pulumi_azure/managedapplication/application.py b/sdk/python/pulumi_azure/managedapplication/application.py index b3227a3b46..42bb7c0c8b 100644 --- a/sdk/python/pulumi_azure/managedapplication/application.py +++ b/sdk/python/pulumi_azure/managedapplication/application.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,26 +41,69 @@ def __init__(__self__, *, :param pulumi.Input['ApplicationPlanArgs'] plan: One `plan` block as defined below. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "kind", kind) - pulumi.set(__self__, "managed_resource_group_name", managed_resource_group_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ApplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kind=kind, + managed_resource_group_name=managed_resource_group_name, + resource_group_name=resource_group_name, + application_definition_id=application_definition_id, + location=location, + name=name, + parameter_values=parameter_values, + parameters=parameters, + plan=plan, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kind: Optional[pulumi.Input[str]] = None, + managed_resource_group_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + application_definition_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameter_values: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + plan: Optional[pulumi.Input['ApplicationPlanArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kind is None: + raise TypeError("Missing 'kind' argument") + if managed_resource_group_name is None and 'managedResourceGroupName' in kwargs: + managed_resource_group_name = kwargs['managedResourceGroupName'] + if managed_resource_group_name is None: + raise TypeError("Missing 'managed_resource_group_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if application_definition_id is None and 'applicationDefinitionId' in kwargs: + application_definition_id = kwargs['applicationDefinitionId'] + if parameter_values is None and 'parameterValues' in kwargs: + parameter_values = kwargs['parameterValues'] + + _setter("kind", kind) + _setter("managed_resource_group_name", managed_resource_group_name) + _setter("resource_group_name", resource_group_name) if application_definition_id is not None: - pulumi.set(__self__, "application_definition_id", application_definition_id) + _setter("application_definition_id", application_definition_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameter_values is not None: - pulumi.set(__self__, "parameter_values", parameter_values) + _setter("parameter_values", parameter_values) if parameters is not None: warnings.warn("""This property has been deprecated in favour of `parameter_values`""", DeprecationWarning) pulumi.log.warn("""parameters is deprecated: This property has been deprecated in favour of `parameter_values`""") if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -218,31 +261,70 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Managed Application should exist. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ApplicationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_definition_id=application_definition_id, + kind=kind, + location=location, + managed_resource_group_name=managed_resource_group_name, + name=name, + outputs=outputs, + parameter_values=parameter_values, + parameters=parameters, + plan=plan, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_definition_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outputs: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + parameter_values: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + plan: Optional[pulumi.Input['ApplicationPlanArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_definition_id is None and 'applicationDefinitionId' in kwargs: + application_definition_id = kwargs['applicationDefinitionId'] + if managed_resource_group_name is None and 'managedResourceGroupName' in kwargs: + managed_resource_group_name = kwargs['managedResourceGroupName'] + if parameter_values is None and 'parameterValues' in kwargs: + parameter_values = kwargs['parameterValues'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if application_definition_id is not None: - pulumi.set(__self__, "application_definition_id", application_definition_id) + _setter("application_definition_id", application_definition_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_resource_group_name is not None: - pulumi.set(__self__, "managed_resource_group_name", managed_resource_group_name) + _setter("managed_resource_group_name", managed_resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outputs is not None: - pulumi.set(__self__, "outputs", outputs) + _setter("outputs", outputs) if parameter_values is not None: - pulumi.set(__self__, "parameter_values", parameter_values) + _setter("parameter_values", parameter_values) if parameters is not None: warnings.warn("""This property has been deprecated in favour of `parameter_values`""", DeprecationWarning) pulumi.log.warn("""parameters is deprecated: This property has been deprecated in favour of `parameter_values`""") if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="applicationDefinitionId") @@ -531,6 +613,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApplicationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -566,6 +652,11 @@ def _internal_init(__self__, __props__.__dict__["name"] = name __props__.__dict__["parameter_values"] = parameter_values __props__.__dict__["parameters"] = parameters + if plan is not None and not isinstance(plan, ApplicationPlanArgs): + plan = plan or {} + def _setter(key, value): + plan[key] = value + ApplicationPlanArgs._configure(_setter, **plan) __props__.__dict__["plan"] = plan if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") diff --git a/sdk/python/pulumi_azure/managedapplication/definition.py b/sdk/python/pulumi_azure/managedapplication/definition.py index 98c731e5e5..cc3adeaf5d 100644 --- a/sdk/python/pulumi_azure/managedapplication/definition.py +++ b/sdk/python/pulumi_azure/managedapplication/definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,27 +45,80 @@ def __init__(__self__, *, > **NOTE:** If either `create_ui_definition` or `main_template` is set they both must be set. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "lock_level", lock_level) - pulumi.set(__self__, "resource_group_name", resource_group_name) + DefinitionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + lock_level=lock_level, + resource_group_name=resource_group_name, + authorizations=authorizations, + create_ui_definition=create_ui_definition, + description=description, + location=location, + main_template=main_template, + name=name, + package_enabled=package_enabled, + package_file_uri=package_file_uri, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + lock_level: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + authorizations: Optional[pulumi.Input[Sequence[pulumi.Input['DefinitionAuthorizationArgs']]]] = None, + create_ui_definition: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + main_template: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + package_enabled: Optional[pulumi.Input[bool]] = None, + package_file_uri: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if lock_level is None and 'lockLevel' in kwargs: + lock_level = kwargs['lockLevel'] + if lock_level is None: + raise TypeError("Missing 'lock_level' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if create_ui_definition is None and 'createUiDefinition' in kwargs: + create_ui_definition = kwargs['createUiDefinition'] + if main_template is None and 'mainTemplate' in kwargs: + main_template = kwargs['mainTemplate'] + if package_enabled is None and 'packageEnabled' in kwargs: + package_enabled = kwargs['packageEnabled'] + if package_file_uri is None and 'packageFileUri' in kwargs: + package_file_uri = kwargs['packageFileUri'] + + _setter("display_name", display_name) + _setter("lock_level", lock_level) + _setter("resource_group_name", resource_group_name) if authorizations is not None: - pulumi.set(__self__, "authorizations", authorizations) + _setter("authorizations", authorizations) if create_ui_definition is not None: - pulumi.set(__self__, "create_ui_definition", create_ui_definition) + _setter("create_ui_definition", create_ui_definition) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if main_template is not None: - pulumi.set(__self__, "main_template", main_template) + _setter("main_template", main_template) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if package_enabled is not None: - pulumi.set(__self__, "package_enabled", package_enabled) + _setter("package_enabled", package_enabled) if package_file_uri is not None: - pulumi.set(__self__, "package_file_uri", package_file_uri) + _setter("package_file_uri", package_file_uri) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="displayName") @@ -246,30 +299,77 @@ def __init__(__self__, *, > **NOTE:** If either `create_ui_definition` or `main_template` is set they both must be set. """ + _DefinitionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorizations=authorizations, + create_ui_definition=create_ui_definition, + description=description, + display_name=display_name, + location=location, + lock_level=lock_level, + main_template=main_template, + name=name, + package_enabled=package_enabled, + package_file_uri=package_file_uri, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorizations: Optional[pulumi.Input[Sequence[pulumi.Input['DefinitionAuthorizationArgs']]]] = None, + create_ui_definition: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + lock_level: Optional[pulumi.Input[str]] = None, + main_template: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + package_enabled: Optional[pulumi.Input[bool]] = None, + package_file_uri: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_ui_definition is None and 'createUiDefinition' in kwargs: + create_ui_definition = kwargs['createUiDefinition'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if lock_level is None and 'lockLevel' in kwargs: + lock_level = kwargs['lockLevel'] + if main_template is None and 'mainTemplate' in kwargs: + main_template = kwargs['mainTemplate'] + if package_enabled is None and 'packageEnabled' in kwargs: + package_enabled = kwargs['packageEnabled'] + if package_file_uri is None and 'packageFileUri' in kwargs: + package_file_uri = kwargs['packageFileUri'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if authorizations is not None: - pulumi.set(__self__, "authorizations", authorizations) + _setter("authorizations", authorizations) if create_ui_definition is not None: - pulumi.set(__self__, "create_ui_definition", create_ui_definition) + _setter("create_ui_definition", create_ui_definition) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if lock_level is not None: - pulumi.set(__self__, "lock_level", lock_level) + _setter("lock_level", lock_level) if main_template is not None: - pulumi.set(__self__, "main_template", main_template) + _setter("main_template", main_template) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if package_enabled is not None: - pulumi.set(__self__, "package_enabled", package_enabled) + _setter("package_enabled", package_enabled) if package_file_uri is not None: - pulumi.set(__self__, "package_file_uri", package_file_uri) + _setter("package_file_uri", package_file_uri) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -533,6 +633,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DefinitionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/managedapplication/get_definition.py b/sdk/python/pulumi_azure/managedapplication/get_definition.py index 27522cb8a4..2287f92341 100644 --- a/sdk/python/pulumi_azure/managedapplication/get_definition.py +++ b/sdk/python/pulumi_azure/managedapplication/get_definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/managedapplication/outputs.py b/sdk/python/pulumi_azure/managedapplication/outputs.py index 6d937df627..e2e7a55d92 100644 --- a/sdk/python/pulumi_azure/managedapplication/outputs.py +++ b/sdk/python/pulumi_azure/managedapplication/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -48,12 +48,41 @@ def __init__(__self__, *, > **NOTE:** When `plan` is specified, legal terms must be accepted for this item on this subscription before creating the Managed Application. The `marketplace.Agreement` resource or AZ CLI tool can be used to do this. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) - pulumi.set(__self__, "version", version) + ApplicationPlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + product=product, + publisher=publisher, + version=version, + promotion_code=promotion_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + product: Optional[str] = None, + publisher: Optional[str] = None, + version: Optional[str] = None, + promotion_code: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if promotion_code is None and 'promotionCode' in kwargs: + promotion_code = kwargs['promotionCode'] + + _setter("name", name) + _setter("product", product) + _setter("publisher", publisher) + _setter("version", version) if promotion_code is not None: - pulumi.set(__self__, "promotion_code", promotion_code) + _setter("promotion_code", promotion_code) @property @pulumi.getter @@ -126,8 +155,29 @@ def __init__(__self__, *, :param str role_definition_id: Specifies a role definition identifier for the provider. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group. :param str service_principal_id: Specifies a service principal identifier for the provider. This is the identity that the provider will use to call ARM to manage the managed application resources. """ - pulumi.set(__self__, "role_definition_id", role_definition_id) - pulumi.set(__self__, "service_principal_id", service_principal_id) + DefinitionAuthorization._configure( + lambda key, value: pulumi.set(__self__, key, value), + role_definition_id=role_definition_id, + service_principal_id=service_principal_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + role_definition_id: Optional[str] = None, + service_principal_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_id is None: + raise TypeError("Missing 'role_definition_id' argument") + if service_principal_id is None and 'servicePrincipalId' in kwargs: + service_principal_id = kwargs['servicePrincipalId'] + if service_principal_id is None: + raise TypeError("Missing 'service_principal_id' argument") + + _setter("role_definition_id", role_definition_id) + _setter("service_principal_id", service_principal_id) @property @pulumi.getter(name="roleDefinitionId") diff --git a/sdk/python/pulumi_azure/managedlustre/_inputs.py b/sdk/python/pulumi_azure/managedlustre/_inputs.py index 7766113d32..67dd732e0c 100644 --- a/sdk/python/pulumi_azure/managedlustre/_inputs.py +++ b/sdk/python/pulumi_azure/managedlustre/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -25,8 +25,29 @@ def __init__(__self__, *, :param pulumi.Input[str] key_url: The URL to the Key Vault Key used as the Encryption Key. This can be found as `id` on the `keyvault.Key` resource. :param pulumi.Input[str] source_vault_id: The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. """ - pulumi.set(__self__, "key_url", key_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + FileSystemEncryptionKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_url=key_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_url: Optional[pulumi.Input[str]] = None, + source_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_url is None and 'keyUrl' in kwargs: + key_url = kwargs['keyUrl'] + if key_url is None: + raise TypeError("Missing 'key_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("key_url", key_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="keyUrl") @@ -66,10 +87,35 @@ def __init__(__self__, *, > **NOTE:** The roles `Contributor` and `Storage Blob Data Contributor` must be added to the Service Principal `HPC Cache Resource Provider` for the Storage Account. See official docs for more information. """ - pulumi.set(__self__, "container_id", container_id) - pulumi.set(__self__, "logging_container_id", logging_container_id) + FileSystemHsmSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + logging_container_id=logging_container_id, + import_prefix=import_prefix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[pulumi.Input[str]] = None, + logging_container_id: Optional[pulumi.Input[str]] = None, + import_prefix: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if logging_container_id is None and 'loggingContainerId' in kwargs: + logging_container_id = kwargs['loggingContainerId'] + if logging_container_id is None: + raise TypeError("Missing 'logging_container_id' argument") + if import_prefix is None and 'importPrefix' in kwargs: + import_prefix = kwargs['importPrefix'] + + _setter("container_id", container_id) + _setter("logging_container_id", logging_container_id) if import_prefix is not None: - pulumi.set(__self__, "import_prefix", import_prefix) + _setter("import_prefix", import_prefix) @property @pulumi.getter(name="containerId") @@ -119,8 +165,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: A list of User Assigned Managed Identity IDs to be assigned to this Azure Managed Lustre File System. Changing this forces a new resource to be created. :param pulumi.Input[str] type: The type of Managed Service Identity that should be configured on this Azure Managed Lustre File System. Only possible value is `UserAssigned`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + FileSystemIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -155,8 +220,29 @@ def __init__(__self__, *, """ :param pulumi.Input[str] day_of_week: The day of the week on which the maintenance window will occur. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. """ - pulumi.set(__self__, "day_of_week", day_of_week) - pulumi.set(__self__, "time_of_day_in_utc", time_of_day_in_utc) + FileSystemMaintenanceWindowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + time_of_day_in_utc=time_of_day_in_utc, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[pulumi.Input[str]] = None, + time_of_day_in_utc: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if day_of_week is None: + raise TypeError("Missing 'day_of_week' argument") + if time_of_day_in_utc is None and 'timeOfDayInUtc' in kwargs: + time_of_day_in_utc = kwargs['timeOfDayInUtc'] + if time_of_day_in_utc is None: + raise TypeError("Missing 'time_of_day_in_utc' argument") + + _setter("day_of_week", day_of_week) + _setter("time_of_day_in_utc", time_of_day_in_utc) @property @pulumi.getter(name="dayOfWeek") diff --git a/sdk/python/pulumi_azure/managedlustre/file_system.py b/sdk/python/pulumi_azure/managedlustre/file_system.py index ef3dca4e1c..b029f44479 100644 --- a/sdk/python/pulumi_azure/managedlustre/file_system.py +++ b/sdk/python/pulumi_azure/managedlustre/file_system.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,24 +45,83 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Azure Managed Lustre File System. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Azure Managed Lustre File System. """ - pulumi.set(__self__, "maintenance_window", maintenance_window) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "storage_capacity_in_tb", storage_capacity_in_tb) - pulumi.set(__self__, "subnet_id", subnet_id) - pulumi.set(__self__, "zones", zones) + FileSystemArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + maintenance_window=maintenance_window, + resource_group_name=resource_group_name, + sku_name=sku_name, + storage_capacity_in_tb=storage_capacity_in_tb, + subnet_id=subnet_id, + zones=zones, + encryption_key=encryption_key, + hsm_setting=hsm_setting, + identity=identity, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + maintenance_window: Optional[pulumi.Input['FileSystemMaintenanceWindowArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storage_capacity_in_tb: Optional[pulumi.Input[int]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + encryption_key: Optional[pulumi.Input['FileSystemEncryptionKeyArgs']] = None, + hsm_setting: Optional[pulumi.Input['FileSystemHsmSettingArgs']] = None, + identity: Optional[pulumi.Input['FileSystemIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maintenance_window is None and 'maintenanceWindow' in kwargs: + maintenance_window = kwargs['maintenanceWindow'] + if maintenance_window is None: + raise TypeError("Missing 'maintenance_window' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if storage_capacity_in_tb is None and 'storageCapacityInTb' in kwargs: + storage_capacity_in_tb = kwargs['storageCapacityInTb'] + if storage_capacity_in_tb is None: + raise TypeError("Missing 'storage_capacity_in_tb' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if zones is None: + raise TypeError("Missing 'zones' argument") + if encryption_key is None and 'encryptionKey' in kwargs: + encryption_key = kwargs['encryptionKey'] + if hsm_setting is None and 'hsmSetting' in kwargs: + hsm_setting = kwargs['hsmSetting'] + + _setter("maintenance_window", maintenance_window) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("storage_capacity_in_tb", storage_capacity_in_tb) + _setter("subnet_id", subnet_id) + _setter("zones", zones) if encryption_key is not None: - pulumi.set(__self__, "encryption_key", encryption_key) + _setter("encryption_key", encryption_key) if hsm_setting is not None: - pulumi.set(__self__, "hsm_setting", hsm_setting) + _setter("hsm_setting", hsm_setting) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="maintenanceWindow") @@ -243,30 +302,77 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Azure Managed Lustre File System. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: A list of availability zones for the Azure Managed Lustre File System. Changing this forces a new resource to be created. """ + _FileSystemState._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption_key=encryption_key, + hsm_setting=hsm_setting, + identity=identity, + location=location, + maintenance_window=maintenance_window, + name=name, + resource_group_name=resource_group_name, + sku_name=sku_name, + storage_capacity_in_tb=storage_capacity_in_tb, + subnet_id=subnet_id, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption_key: Optional[pulumi.Input['FileSystemEncryptionKeyArgs']] = None, + hsm_setting: Optional[pulumi.Input['FileSystemHsmSettingArgs']] = None, + identity: Optional[pulumi.Input['FileSystemIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_window: Optional[pulumi.Input['FileSystemMaintenanceWindowArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storage_capacity_in_tb: Optional[pulumi.Input[int]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encryption_key is None and 'encryptionKey' in kwargs: + encryption_key = kwargs['encryptionKey'] + if hsm_setting is None and 'hsmSetting' in kwargs: + hsm_setting = kwargs['hsmSetting'] + if maintenance_window is None and 'maintenanceWindow' in kwargs: + maintenance_window = kwargs['maintenanceWindow'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if storage_capacity_in_tb is None and 'storageCapacityInTb' in kwargs: + storage_capacity_in_tb = kwargs['storageCapacityInTb'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if encryption_key is not None: - pulumi.set(__self__, "encryption_key", encryption_key) + _setter("encryption_key", encryption_key) if hsm_setting is not None: - pulumi.set(__self__, "hsm_setting", hsm_setting) + _setter("hsm_setting", hsm_setting) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_window is not None: - pulumi.set(__self__, "maintenance_window", maintenance_window) + _setter("maintenance_window", maintenance_window) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if storage_capacity_in_tb is not None: - pulumi.set(__self__, "storage_capacity_in_tb", storage_capacity_in_tb) + _setter("storage_capacity_in_tb", storage_capacity_in_tb) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="encryptionKey") @@ -488,6 +594,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FileSystemArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -514,10 +624,30 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = FileSystemArgs.__new__(FileSystemArgs) + if encryption_key is not None and not isinstance(encryption_key, FileSystemEncryptionKeyArgs): + encryption_key = encryption_key or {} + def _setter(key, value): + encryption_key[key] = value + FileSystemEncryptionKeyArgs._configure(_setter, **encryption_key) __props__.__dict__["encryption_key"] = encryption_key + if hsm_setting is not None and not isinstance(hsm_setting, FileSystemHsmSettingArgs): + hsm_setting = hsm_setting or {} + def _setter(key, value): + hsm_setting[key] = value + FileSystemHsmSettingArgs._configure(_setter, **hsm_setting) __props__.__dict__["hsm_setting"] = hsm_setting + if identity is not None and not isinstance(identity, FileSystemIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + FileSystemIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location + if maintenance_window is not None and not isinstance(maintenance_window, FileSystemMaintenanceWindowArgs): + maintenance_window = maintenance_window or {} + def _setter(key, value): + maintenance_window[key] = value + FileSystemMaintenanceWindowArgs._configure(_setter, **maintenance_window) if maintenance_window is None and not opts.urn: raise TypeError("Missing required property 'maintenance_window'") __props__.__dict__["maintenance_window"] = maintenance_window diff --git a/sdk/python/pulumi_azure/managedlustre/outputs.py b/sdk/python/pulumi_azure/managedlustre/outputs.py index 55eae40e1f..2aa229b885 100644 --- a/sdk/python/pulumi_azure/managedlustre/outputs.py +++ b/sdk/python/pulumi_azure/managedlustre/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -44,8 +44,29 @@ def __init__(__self__, *, :param str key_url: The URL to the Key Vault Key used as the Encryption Key. This can be found as `id` on the `keyvault.Key` resource. :param str source_vault_id: The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. """ - pulumi.set(__self__, "key_url", key_url) - pulumi.set(__self__, "source_vault_id", source_vault_id) + FileSystemEncryptionKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_url=key_url, + source_vault_id=source_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_url: Optional[str] = None, + source_vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_url is None and 'keyUrl' in kwargs: + key_url = kwargs['keyUrl'] + if key_url is None: + raise TypeError("Missing 'key_url' argument") + if source_vault_id is None and 'sourceVaultId' in kwargs: + source_vault_id = kwargs['sourceVaultId'] + if source_vault_id is None: + raise TypeError("Missing 'source_vault_id' argument") + + _setter("key_url", key_url) + _setter("source_vault_id", source_vault_id) @property @pulumi.getter(name="keyUrl") @@ -98,10 +119,35 @@ def __init__(__self__, *, > **NOTE:** The roles `Contributor` and `Storage Blob Data Contributor` must be added to the Service Principal `HPC Cache Resource Provider` for the Storage Account. See official docs for more information. """ - pulumi.set(__self__, "container_id", container_id) - pulumi.set(__self__, "logging_container_id", logging_container_id) + FileSystemHsmSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + logging_container_id=logging_container_id, + import_prefix=import_prefix, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[str] = None, + logging_container_id: Optional[str] = None, + import_prefix: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if logging_container_id is None and 'loggingContainerId' in kwargs: + logging_container_id = kwargs['loggingContainerId'] + if logging_container_id is None: + raise TypeError("Missing 'logging_container_id' argument") + if import_prefix is None and 'importPrefix' in kwargs: + import_prefix = kwargs['importPrefix'] + + _setter("container_id", container_id) + _setter("logging_container_id", logging_container_id) if import_prefix is not None: - pulumi.set(__self__, "import_prefix", import_prefix) + _setter("import_prefix", import_prefix) @property @pulumi.getter(name="containerId") @@ -156,8 +202,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: A list of User Assigned Managed Identity IDs to be assigned to this Azure Managed Lustre File System. Changing this forces a new resource to be created. :param str type: The type of Managed Service Identity that should be configured on this Azure Managed Lustre File System. Only possible value is `UserAssigned`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + FileSystemIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -203,8 +268,29 @@ def __init__(__self__, *, """ :param str day_of_week: The day of the week on which the maintenance window will occur. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. """ - pulumi.set(__self__, "day_of_week", day_of_week) - pulumi.set(__self__, "time_of_day_in_utc", time_of_day_in_utc) + FileSystemMaintenanceWindow._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + time_of_day_in_utc=time_of_day_in_utc, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[str] = None, + time_of_day_in_utc: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if day_of_week is None: + raise TypeError("Missing 'day_of_week' argument") + if time_of_day_in_utc is None and 'timeOfDayInUtc' in kwargs: + time_of_day_in_utc = kwargs['timeOfDayInUtc'] + if time_of_day_in_utc is None: + raise TypeError("Missing 'time_of_day_in_utc' argument") + + _setter("day_of_week", day_of_week) + _setter("time_of_day_in_utc", time_of_day_in_utc) @property @pulumi.getter(name="dayOfWeek") diff --git a/sdk/python/pulumi_azure/management/_inputs.py b/sdk/python/pulumi_azure/management/_inputs.py index 2741809bef..f1be91c93e 100644 --- a/sdk/python/pulumi_azure/management/_inputs.py +++ b/sdk/python/pulumi_azure/management/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -33,13 +33,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID of the Policy Assignment for this Management Group. :param pulumi.Input[str] tenant_id: The Tenant ID of the Policy Assignment for this Management Group. """ - pulumi.set(__self__, "type", type) + GroupPolicyAssignmentIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -101,9 +126,26 @@ def __init__(__self__, *, :param pulumi.Input[str] content: The non-compliance message text. When assigning policy sets (initiatives), unless `policy_definition_reference_id` is specified then this message will be the default for all policies. :param pulumi.Input[str] policy_definition_reference_id: When assigning policy sets (initiatives), this is the ID of the policy definition that the non-compliance message applies to. """ - pulumi.set(__self__, "content", content) + GroupPolicyAssignmentNonComplianceMessageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + policy_definition_reference_id=policy_definition_reference_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + policy_definition_reference_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + + _setter("content", content) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) @property @pulumi.getter @@ -139,9 +181,24 @@ def __init__(__self__, *, :param pulumi.Input[str] value: Specifies the value to override the policy property. Possible values for `policyEffect` override listed [policy effects](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects). :param pulumi.Input[Sequence[pulumi.Input['GroupPolicyAssignmentOverrideSelectorArgs']]] selectors: One or more `override_selector` as defined below. """ - pulumi.set(__self__, "value", value) + GroupPolicyAssignmentOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + selectors=selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[pulumi.Input[str]] = None, + selectors: Optional[pulumi.Input[Sequence[pulumi.Input['GroupPolicyAssignmentOverrideSelectorArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) if selectors is not None: - pulumi.set(__self__, "selectors", selectors) + _setter("selectors", selectors) @property @pulumi.getter @@ -179,12 +236,29 @@ def __init__(__self__, *, :param pulumi.Input[str] kind: Specifies which characteristic will narrow down the set of evaluated resources. Possible values are `resourceLocation`, `resourceType` and `resourceWithoutLocation`. :param pulumi.Input[Sequence[pulumi.Input[str]]] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ + GroupPolicyAssignmentOverrideSelectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ins=ins, + kind=kind, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + kind: Optional[pulumi.Input[str]] = None, + not_ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter @@ -232,9 +306,24 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['GroupPolicyAssignmentResourceSelectorSelectorArgs']]] selectors: One or more `resource_selector` block as defined below. :param pulumi.Input[str] name: Specifies a name for the resource selector. """ - pulumi.set(__self__, "selectors", selectors) + GroupPolicyAssignmentResourceSelectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + selectors=selectors, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + selectors: Optional[pulumi.Input[Sequence[pulumi.Input['GroupPolicyAssignmentResourceSelectorSelectorArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if selectors is None: + raise TypeError("Missing 'selectors' argument") + + _setter("selectors", selectors) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -272,11 +361,30 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] ins: Specify the list of policy reference id values to filter in. Cannot be used with `not_in`. :param pulumi.Input[Sequence[pulumi.Input[str]]] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ - pulumi.set(__self__, "kind", kind) + GroupPolicyAssignmentResourceSelectorSelectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kind=kind, + ins=ins, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kind: Optional[pulumi.Input[str]] = None, + ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + not_ins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kind is None: + raise TypeError("Missing 'kind' argument") + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + + _setter("kind", kind) if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/management/get_group.py b/sdk/python/pulumi_azure/management/get_group.py index 37d353a95d..7aea96ea0c 100644 --- a/sdk/python/pulumi_azure/management/get_group.py +++ b/sdk/python/pulumi_azure/management/get_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/management/get_group_template_deployment.py b/sdk/python/pulumi_azure/management/get_group_template_deployment.py index f41713fe31..d71ec47742 100644 --- a/sdk/python/pulumi_azure/management/get_group_template_deployment.py +++ b/sdk/python/pulumi_azure/management/get_group_template_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/management/group.py b/sdk/python/pulumi_azure/management/group.py index 787cd42c09..82e4f39e94 100644 --- a/sdk/python/pulumi_azure/management/group.py +++ b/sdk/python/pulumi_azure/management/group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['GroupArgs', 'Group'] @@ -27,14 +27,37 @@ def __init__(__self__, *, > **Note:** To clear all Subscriptions from the Management Group set `subscription_ids` to an empty list """ + GroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + name=name, + parent_management_group_id=parent_management_group_id, + subscription_ids=subscription_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parent_management_group_id: Optional[pulumi.Input[str]] = None, + subscription_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if parent_management_group_id is None and 'parentManagementGroupId' in kwargs: + parent_management_group_id = kwargs['parentManagementGroupId'] + if subscription_ids is None and 'subscriptionIds' in kwargs: + subscription_ids = kwargs['subscriptionIds'] + if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parent_management_group_id is not None: - pulumi.set(__self__, "parent_management_group_id", parent_management_group_id) + _setter("parent_management_group_id", parent_management_group_id) if subscription_ids is not None: - pulumi.set(__self__, "subscription_ids", subscription_ids) + _setter("subscription_ids", subscription_ids) @property @pulumi.getter(name="displayName") @@ -103,14 +126,37 @@ def __init__(__self__, *, > **Note:** To clear all Subscriptions from the Management Group set `subscription_ids` to an empty list """ + _GroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + name=name, + parent_management_group_id=parent_management_group_id, + subscription_ids=subscription_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parent_management_group_id: Optional[pulumi.Input[str]] = None, + subscription_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if parent_management_group_id is None and 'parentManagementGroupId' in kwargs: + parent_management_group_id = kwargs['parentManagementGroupId'] + if subscription_ids is None and 'subscriptionIds' in kwargs: + subscription_ids = kwargs['subscriptionIds'] + if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parent_management_group_id is not None: - pulumi.set(__self__, "parent_management_group_id", parent_management_group_id) + _setter("parent_management_group_id", parent_management_group_id) if subscription_ids is not None: - pulumi.set(__self__, "subscription_ids", subscription_ids) + _setter("subscription_ids", subscription_ids) @property @pulumi.getter(name="displayName") @@ -258,6 +304,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/management/group_policy_assignment.py b/sdk/python/pulumi_azure/management/group_policy_assignment.py index a258dd3fd7..64e89c90bc 100644 --- a/sdk/python/pulumi_azure/management/group_policy_assignment.py +++ b/sdk/python/pulumi_azure/management/group_policy_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,32 +49,85 @@ def __init__(__self__, *, :param pulumi.Input[str] parameters: A JSON mapping of any Parameters for this Policy. :param pulumi.Input[Sequence[pulumi.Input['GroupPolicyAssignmentResourceSelectorArgs']]] resource_selectors: One or more `resource_selectors` blocks as defined below to filter polices by resource properties. """ - pulumi.set(__self__, "management_group_id", management_group_id) - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + GroupPolicyAssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_group_id=management_group_id, + policy_definition_id=policy_definition_id, + description=description, + display_name=display_name, + enforce=enforce, + identity=identity, + location=location, + metadata=metadata, + name=name, + non_compliance_messages=non_compliance_messages, + not_scopes=not_scopes, + overrides=overrides, + parameters=parameters, + resource_selectors=resource_selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_group_id: Optional[pulumi.Input[str]] = None, + policy_definition_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enforce: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['GroupPolicyAssignmentIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + non_compliance_messages: Optional[pulumi.Input[Sequence[pulumi.Input['GroupPolicyAssignmentNonComplianceMessageArgs']]]] = None, + not_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + overrides: Optional[pulumi.Input[Sequence[pulumi.Input['GroupPolicyAssignmentOverrideArgs']]]] = None, + parameters: Optional[pulumi.Input[str]] = None, + resource_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['GroupPolicyAssignmentResourceSelectorArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if management_group_id is None: + raise TypeError("Missing 'management_group_id' argument") + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_id is None: + raise TypeError("Missing 'policy_definition_id' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if non_compliance_messages is None and 'nonComplianceMessages' in kwargs: + non_compliance_messages = kwargs['nonComplianceMessages'] + if not_scopes is None and 'notScopes' in kwargs: + not_scopes = kwargs['notScopes'] + if resource_selectors is None and 'resourceSelectors' in kwargs: + resource_selectors = kwargs['resourceSelectors'] + + _setter("management_group_id", management_group_id) + _setter("policy_definition_id", policy_definition_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enforce is not None: - pulumi.set(__self__, "enforce", enforce) + _setter("enforce", enforce) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if non_compliance_messages is not None: - pulumi.set(__self__, "non_compliance_messages", non_compliance_messages) + _setter("non_compliance_messages", non_compliance_messages) if not_scopes is not None: - pulumi.set(__self__, "not_scopes", not_scopes) + _setter("not_scopes", not_scopes) if overrides is not None: - pulumi.set(__self__, "overrides", overrides) + _setter("overrides", overrides) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if resource_selectors is not None: - pulumi.set(__self__, "resource_selectors", resource_selectors) + _setter("resource_selectors", resource_selectors) @property @pulumi.getter(name="managementGroupId") @@ -283,34 +336,83 @@ def __init__(__self__, *, :param pulumi.Input[str] policy_definition_id: The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created. :param pulumi.Input[Sequence[pulumi.Input['GroupPolicyAssignmentResourceSelectorArgs']]] resource_selectors: One or more `resource_selectors` blocks as defined below to filter polices by resource properties. """ + _GroupPolicyAssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + display_name=display_name, + enforce=enforce, + identity=identity, + location=location, + management_group_id=management_group_id, + metadata=metadata, + name=name, + non_compliance_messages=non_compliance_messages, + not_scopes=not_scopes, + overrides=overrides, + parameters=parameters, + policy_definition_id=policy_definition_id, + resource_selectors=resource_selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enforce: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['GroupPolicyAssignmentIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + management_group_id: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + non_compliance_messages: Optional[pulumi.Input[Sequence[pulumi.Input['GroupPolicyAssignmentNonComplianceMessageArgs']]]] = None, + not_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + overrides: Optional[pulumi.Input[Sequence[pulumi.Input['GroupPolicyAssignmentOverrideArgs']]]] = None, + parameters: Optional[pulumi.Input[str]] = None, + policy_definition_id: Optional[pulumi.Input[str]] = None, + resource_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['GroupPolicyAssignmentResourceSelectorArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if non_compliance_messages is None and 'nonComplianceMessages' in kwargs: + non_compliance_messages = kwargs['nonComplianceMessages'] + if not_scopes is None and 'notScopes' in kwargs: + not_scopes = kwargs['notScopes'] + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if resource_selectors is None and 'resourceSelectors' in kwargs: + resource_selectors = kwargs['resourceSelectors'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enforce is not None: - pulumi.set(__self__, "enforce", enforce) + _setter("enforce", enforce) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if management_group_id is not None: - pulumi.set(__self__, "management_group_id", management_group_id) + _setter("management_group_id", management_group_id) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if non_compliance_messages is not None: - pulumi.set(__self__, "non_compliance_messages", non_compliance_messages) + _setter("non_compliance_messages", non_compliance_messages) if not_scopes is not None: - pulumi.set(__self__, "not_scopes", not_scopes) + _setter("not_scopes", not_scopes) if overrides is not None: - pulumi.set(__self__, "overrides", overrides) + _setter("overrides", overrides) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if policy_definition_id is not None: - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + _setter("policy_definition_id", policy_definition_id) if resource_selectors is not None: - pulumi.set(__self__, "resource_selectors", resource_selectors) + _setter("resource_selectors", resource_selectors) @property @pulumi.getter @@ -618,6 +720,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GroupPolicyAssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -649,6 +755,11 @@ def _internal_init(__self__, __props__.__dict__["description"] = description __props__.__dict__["display_name"] = display_name __props__.__dict__["enforce"] = enforce + if identity is not None and not isinstance(identity, GroupPolicyAssignmentIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + GroupPolicyAssignmentIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location if management_group_id is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/management/group_policy_exemption.py b/sdk/python/pulumi_azure/management/group_policy_exemption.py index 19e9dfd1d9..a2dd0ee951 100644 --- a/sdk/python/pulumi_azure/management/group_policy_exemption.py +++ b/sdk/python/pulumi_azure/management/group_policy_exemption.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['GroupPolicyExemptionArgs', 'GroupPolicyExemption'] @@ -35,21 +35,66 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Policy Exemption. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] policy_definition_reference_ids: The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. """ - pulumi.set(__self__, "exemption_category", exemption_category) - pulumi.set(__self__, "management_group_id", management_group_id) - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) + GroupPolicyExemptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + exemption_category=exemption_category, + management_group_id=management_group_id, + policy_assignment_id=policy_assignment_id, + description=description, + display_name=display_name, + expires_on=expires_on, + metadata=metadata, + name=name, + policy_definition_reference_ids=policy_definition_reference_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exemption_category: Optional[pulumi.Input[str]] = None, + management_group_id: Optional[pulumi.Input[str]] = None, + policy_assignment_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + expires_on: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_definition_reference_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exemption_category is None and 'exemptionCategory' in kwargs: + exemption_category = kwargs['exemptionCategory'] + if exemption_category is None: + raise TypeError("Missing 'exemption_category' argument") + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if management_group_id is None: + raise TypeError("Missing 'management_group_id' argument") + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_assignment_id is None: + raise TypeError("Missing 'policy_assignment_id' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if expires_on is None and 'expiresOn' in kwargs: + expires_on = kwargs['expiresOn'] + if policy_definition_reference_ids is None and 'policyDefinitionReferenceIds' in kwargs: + policy_definition_reference_ids = kwargs['policyDefinitionReferenceIds'] + + _setter("exemption_category", exemption_category) + _setter("management_group_id", management_group_id) + _setter("policy_assignment_id", policy_assignment_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if expires_on is not None: - pulumi.set(__self__, "expires_on", expires_on) + _setter("expires_on", expires_on) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_definition_reference_ids is not None: - pulumi.set(__self__, "policy_definition_reference_ids", policy_definition_reference_ids) + _setter("policy_definition_reference_ids", policy_definition_reference_ids) @property @pulumi.getter(name="exemptionCategory") @@ -184,24 +229,63 @@ def __init__(__self__, *, :param pulumi.Input[str] policy_assignment_id: The ID of the Policy Assignment to be exempted at the specified Scope. :param pulumi.Input[Sequence[pulumi.Input[str]]] policy_definition_reference_ids: The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. """ + _GroupPolicyExemptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + display_name=display_name, + exemption_category=exemption_category, + expires_on=expires_on, + management_group_id=management_group_id, + metadata=metadata, + name=name, + policy_assignment_id=policy_assignment_id, + policy_definition_reference_ids=policy_definition_reference_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + exemption_category: Optional[pulumi.Input[str]] = None, + expires_on: Optional[pulumi.Input[str]] = None, + management_group_id: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_assignment_id: Optional[pulumi.Input[str]] = None, + policy_definition_reference_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if exemption_category is None and 'exemptionCategory' in kwargs: + exemption_category = kwargs['exemptionCategory'] + if expires_on is None and 'expiresOn' in kwargs: + expires_on = kwargs['expiresOn'] + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_definition_reference_ids is None and 'policyDefinitionReferenceIds' in kwargs: + policy_definition_reference_ids = kwargs['policyDefinitionReferenceIds'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if exemption_category is not None: - pulumi.set(__self__, "exemption_category", exemption_category) + _setter("exemption_category", exemption_category) if expires_on is not None: - pulumi.set(__self__, "expires_on", expires_on) + _setter("expires_on", expires_on) if management_group_id is not None: - pulumi.set(__self__, "management_group_id", management_group_id) + _setter("management_group_id", management_group_id) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_assignment_id is not None: - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) + _setter("policy_assignment_id", policy_assignment_id) if policy_definition_reference_ids is not None: - pulumi.set(__self__, "policy_definition_reference_ids", policy_definition_reference_ids) + _setter("policy_definition_reference_ids", policy_definition_reference_ids) @property @pulumi.getter @@ -419,6 +503,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GroupPolicyExemptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/management/group_policy_remediation.py b/sdk/python/pulumi_azure/management/group_policy_remediation.py index 6ed1707f8f..34da8dd588 100644 --- a/sdk/python/pulumi_azure/management/group_policy_remediation.py +++ b/sdk/python/pulumi_azure/management/group_policy_remediation.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['GroupPolicyRemediationArgs', 'GroupPolicyRemediation'] @@ -27,30 +27,81 @@ def __init__(__self__, *, """ The set of arguments for constructing a GroupPolicyRemediation resource. """ - pulumi.set(__self__, "management_group_id", management_group_id) - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) + GroupPolicyRemediationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_group_id=management_group_id, + policy_assignment_id=policy_assignment_id, + failure_percentage=failure_percentage, + location_filters=location_filters, + name=name, + parallel_deployments=parallel_deployments, + policy_definition_id=policy_definition_id, + policy_definition_reference_id=policy_definition_reference_id, + resource_count=resource_count, + resource_discovery_mode=resource_discovery_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_group_id: Optional[pulumi.Input[str]] = None, + policy_assignment_id: Optional[pulumi.Input[str]] = None, + failure_percentage: Optional[pulumi.Input[float]] = None, + location_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + parallel_deployments: Optional[pulumi.Input[int]] = None, + policy_definition_id: Optional[pulumi.Input[str]] = None, + policy_definition_reference_id: Optional[pulumi.Input[str]] = None, + resource_count: Optional[pulumi.Input[int]] = None, + resource_discovery_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if management_group_id is None: + raise TypeError("Missing 'management_group_id' argument") + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_assignment_id is None: + raise TypeError("Missing 'policy_assignment_id' argument") + if failure_percentage is None and 'failurePercentage' in kwargs: + failure_percentage = kwargs['failurePercentage'] + if location_filters is None and 'locationFilters' in kwargs: + location_filters = kwargs['locationFilters'] + if parallel_deployments is None and 'parallelDeployments' in kwargs: + parallel_deployments = kwargs['parallelDeployments'] + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + if resource_count is None and 'resourceCount' in kwargs: + resource_count = kwargs['resourceCount'] + if resource_discovery_mode is None and 'resourceDiscoveryMode' in kwargs: + resource_discovery_mode = kwargs['resourceDiscoveryMode'] + + _setter("management_group_id", management_group_id) + _setter("policy_assignment_id", policy_assignment_id) if failure_percentage is not None: - pulumi.set(__self__, "failure_percentage", failure_percentage) + _setter("failure_percentage", failure_percentage) if location_filters is not None: - pulumi.set(__self__, "location_filters", location_filters) + _setter("location_filters", location_filters) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parallel_deployments is not None: - pulumi.set(__self__, "parallel_deployments", parallel_deployments) + _setter("parallel_deployments", parallel_deployments) if policy_definition_id is not None: warnings.warn("""`policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""", DeprecationWarning) pulumi.log.warn("""policy_definition_id is deprecated: `policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""") if policy_definition_id is not None: - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + _setter("policy_definition_id", policy_definition_id) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) if resource_count is not None: - pulumi.set(__self__, "resource_count", resource_count) + _setter("resource_count", resource_count) if resource_discovery_mode is not None: warnings.warn("""`resource_discovery_mode` will be removed in version 4.0 of the AzureRM Provider as evaluating compliance before remediation is only supported at subscription scope and below.""", DeprecationWarning) pulumi.log.warn("""resource_discovery_mode is deprecated: `resource_discovery_mode` will be removed in version 4.0 of the AzureRM Provider as evaluating compliance before remediation is only supported at subscription scope and below.""") if resource_discovery_mode is not None: - pulumi.set(__self__, "resource_discovery_mode", resource_discovery_mode) + _setter("resource_discovery_mode", resource_discovery_mode) @property @pulumi.getter(name="managementGroupId") @@ -165,32 +216,79 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering GroupPolicyRemediation resources. """ + _GroupPolicyRemediationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + failure_percentage=failure_percentage, + location_filters=location_filters, + management_group_id=management_group_id, + name=name, + parallel_deployments=parallel_deployments, + policy_assignment_id=policy_assignment_id, + policy_definition_id=policy_definition_id, + policy_definition_reference_id=policy_definition_reference_id, + resource_count=resource_count, + resource_discovery_mode=resource_discovery_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + failure_percentage: Optional[pulumi.Input[float]] = None, + location_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + management_group_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parallel_deployments: Optional[pulumi.Input[int]] = None, + policy_assignment_id: Optional[pulumi.Input[str]] = None, + policy_definition_id: Optional[pulumi.Input[str]] = None, + policy_definition_reference_id: Optional[pulumi.Input[str]] = None, + resource_count: Optional[pulumi.Input[int]] = None, + resource_discovery_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failure_percentage is None and 'failurePercentage' in kwargs: + failure_percentage = kwargs['failurePercentage'] + if location_filters is None and 'locationFilters' in kwargs: + location_filters = kwargs['locationFilters'] + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if parallel_deployments is None and 'parallelDeployments' in kwargs: + parallel_deployments = kwargs['parallelDeployments'] + if policy_assignment_id is None and 'policyAssignmentId' in kwargs: + policy_assignment_id = kwargs['policyAssignmentId'] + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + if resource_count is None and 'resourceCount' in kwargs: + resource_count = kwargs['resourceCount'] + if resource_discovery_mode is None and 'resourceDiscoveryMode' in kwargs: + resource_discovery_mode = kwargs['resourceDiscoveryMode'] + if failure_percentage is not None: - pulumi.set(__self__, "failure_percentage", failure_percentage) + _setter("failure_percentage", failure_percentage) if location_filters is not None: - pulumi.set(__self__, "location_filters", location_filters) + _setter("location_filters", location_filters) if management_group_id is not None: - pulumi.set(__self__, "management_group_id", management_group_id) + _setter("management_group_id", management_group_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parallel_deployments is not None: - pulumi.set(__self__, "parallel_deployments", parallel_deployments) + _setter("parallel_deployments", parallel_deployments) if policy_assignment_id is not None: - pulumi.set(__self__, "policy_assignment_id", policy_assignment_id) + _setter("policy_assignment_id", policy_assignment_id) if policy_definition_id is not None: warnings.warn("""`policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""", DeprecationWarning) pulumi.log.warn("""policy_definition_id is deprecated: `policy_definition_id` will be removed in version 4.0 of the AzureRM Provider in favour of `policy_definition_reference_id`.""") if policy_definition_id is not None: - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + _setter("policy_definition_id", policy_definition_id) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) if resource_count is not None: - pulumi.set(__self__, "resource_count", resource_count) + _setter("resource_count", resource_count) if resource_discovery_mode is not None: warnings.warn("""`resource_discovery_mode` will be removed in version 4.0 of the AzureRM Provider as evaluating compliance before remediation is only supported at subscription scope and below.""", DeprecationWarning) pulumi.log.warn("""resource_discovery_mode is deprecated: `resource_discovery_mode` will be removed in version 4.0 of the AzureRM Provider as evaluating compliance before remediation is only supported at subscription scope and below.""") if resource_discovery_mode is not None: - pulumi.set(__self__, "resource_discovery_mode", resource_discovery_mode) + _setter("resource_discovery_mode", resource_discovery_mode) @property @pulumi.getter(name="failurePercentage") @@ -328,6 +426,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GroupPolicyRemediationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/management/group_subscription_association.py b/sdk/python/pulumi_azure/management/group_subscription_association.py index 83ae4aad64..c64ba656e5 100644 --- a/sdk/python/pulumi_azure/management/group_subscription_association.py +++ b/sdk/python/pulumi_azure/management/group_subscription_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['GroupSubscriptionAssociationArgs', 'GroupSubscriptionAssociation'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] management_group_id: The ID of the Management Group to associate the Subscription with. Changing this forces a new Management to be created. :param pulumi.Input[str] subscription_id: The ID of the Subscription to be associated with the Management Group. Changing this forces a new Management to be created. """ - pulumi.set(__self__, "management_group_id", management_group_id) - pulumi.set(__self__, "subscription_id", subscription_id) + GroupSubscriptionAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_group_id=management_group_id, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_group_id: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if management_group_id is None: + raise TypeError("Missing 'management_group_id' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + + _setter("management_group_id", management_group_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter(name="managementGroupId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] management_group_id: The ID of the Management Group to associate the Subscription with. Changing this forces a new Management to be created. :param pulumi.Input[str] subscription_id: The ID of the Subscription to be associated with the Management Group. Changing this forces a new Management to be created. """ + _GroupSubscriptionAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_group_id=management_group_id, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_group_id: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if management_group_id is not None: - pulumi.set(__self__, "management_group_id", management_group_id) + _setter("management_group_id", management_group_id) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter(name="managementGroupId") @@ -170,6 +208,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GroupSubscriptionAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/management/group_template_deployment.py b/sdk/python/pulumi_azure/management/group_template_deployment.py index c6a204099d..abe09a533b 100644 --- a/sdk/python/pulumi_azure/management/group_template_deployment.py +++ b/sdk/python/pulumi_azure/management/group_template_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['GroupTemplateDeploymentArgs', 'GroupTemplateDeployment'] @@ -33,21 +33,58 @@ def __init__(__self__, *, :param pulumi.Input[str] template_content: The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`. :param pulumi.Input[str] template_spec_version_id: The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`. """ - pulumi.set(__self__, "management_group_id", management_group_id) + GroupTemplateDeploymentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_group_id=management_group_id, + debug_level=debug_level, + location=location, + name=name, + parameters_content=parameters_content, + tags=tags, + template_content=template_content, + template_spec_version_id=template_spec_version_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_group_id: Optional[pulumi.Input[str]] = None, + debug_level: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters_content: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + template_content: Optional[pulumi.Input[str]] = None, + template_spec_version_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if management_group_id is None: + raise TypeError("Missing 'management_group_id' argument") + if debug_level is None and 'debugLevel' in kwargs: + debug_level = kwargs['debugLevel'] + if parameters_content is None and 'parametersContent' in kwargs: + parameters_content = kwargs['parametersContent'] + if template_content is None and 'templateContent' in kwargs: + template_content = kwargs['templateContent'] + if template_spec_version_id is None and 'templateSpecVersionId' in kwargs: + template_spec_version_id = kwargs['templateSpecVersionId'] + + _setter("management_group_id", management_group_id) if debug_level is not None: - pulumi.set(__self__, "debug_level", debug_level) + _setter("debug_level", debug_level) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters_content is not None: - pulumi.set(__self__, "parameters_content", parameters_content) + _setter("parameters_content", parameters_content) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if template_content is not None: - pulumi.set(__self__, "template_content", template_content) + _setter("template_content", template_content) if template_spec_version_id is not None: - pulumi.set(__self__, "template_spec_version_id", template_spec_version_id) + _setter("template_spec_version_id", template_spec_version_id) @property @pulumi.getter(name="managementGroupId") @@ -170,24 +207,63 @@ def __init__(__self__, *, :param pulumi.Input[str] template_content: The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`. :param pulumi.Input[str] template_spec_version_id: The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`. """ + _GroupTemplateDeploymentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + debug_level=debug_level, + location=location, + management_group_id=management_group_id, + name=name, + output_content=output_content, + parameters_content=parameters_content, + tags=tags, + template_content=template_content, + template_spec_version_id=template_spec_version_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + debug_level: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + management_group_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + output_content: Optional[pulumi.Input[str]] = None, + parameters_content: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + template_content: Optional[pulumi.Input[str]] = None, + template_spec_version_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if debug_level is None and 'debugLevel' in kwargs: + debug_level = kwargs['debugLevel'] + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if output_content is None and 'outputContent' in kwargs: + output_content = kwargs['outputContent'] + if parameters_content is None and 'parametersContent' in kwargs: + parameters_content = kwargs['parametersContent'] + if template_content is None and 'templateContent' in kwargs: + template_content = kwargs['templateContent'] + if template_spec_version_id is None and 'templateSpecVersionId' in kwargs: + template_spec_version_id = kwargs['templateSpecVersionId'] + if debug_level is not None: - pulumi.set(__self__, "debug_level", debug_level) + _setter("debug_level", debug_level) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if management_group_id is not None: - pulumi.set(__self__, "management_group_id", management_group_id) + _setter("management_group_id", management_group_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if output_content is not None: - pulumi.set(__self__, "output_content", output_content) + _setter("output_content", output_content) if parameters_content is not None: - pulumi.set(__self__, "parameters_content", parameters_content) + _setter("parameters_content", parameters_content) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if template_content is not None: - pulumi.set(__self__, "template_content", template_content) + _setter("template_content", template_content) if template_spec_version_id is not None: - pulumi.set(__self__, "template_spec_version_id", template_spec_version_id) + _setter("template_spec_version_id", template_spec_version_id) @property @pulumi.getter(name="debugLevel") @@ -527,6 +603,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + GroupTemplateDeploymentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/management/lock.py b/sdk/python/pulumi_azure/management/lock.py index 7a701af0a9..828c4c5e10 100644 --- a/sdk/python/pulumi_azure/management/lock.py +++ b/sdk/python/pulumi_azure/management/lock.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LockArgs', 'Lock'] @@ -27,12 +27,35 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Management Lock. Changing this forces a new resource to be created. :param pulumi.Input[str] notes: Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "lock_level", lock_level) - pulumi.set(__self__, "scope", scope) + LockArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + lock_level=lock_level, + scope=scope, + name=name, + notes=notes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + lock_level: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lock_level is None and 'lockLevel' in kwargs: + lock_level = kwargs['lockLevel'] + if lock_level is None: + raise TypeError("Missing 'lock_level' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + + _setter("lock_level", lock_level) + _setter("scope", scope) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) @property @pulumi.getter(name="lockLevel") @@ -101,14 +124,33 @@ def __init__(__self__, *, :param pulumi.Input[str] notes: Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created. :param pulumi.Input[str] scope: Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created. """ + _LockState._configure( + lambda key, value: pulumi.set(__self__, key, value), + lock_level=lock_level, + name=name, + notes=notes, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + lock_level: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lock_level is None and 'lockLevel' in kwargs: + lock_level = kwargs['lockLevel'] + if lock_level is not None: - pulumi.set(__self__, "lock_level", lock_level) + _setter("lock_level", lock_level) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="lockLevel") @@ -304,6 +346,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LockArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/management/outputs.py b/sdk/python/pulumi_azure/management/outputs.py index 96bef667a2..bc82b11d4b 100644 --- a/sdk/python/pulumi_azure/management/outputs.py +++ b/sdk/python/pulumi_azure/management/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -55,13 +55,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID of the Policy Assignment for this Management Group. :param str tenant_id: The Tenant ID of the Policy Assignment for this Management Group. """ - pulumi.set(__self__, "type", type) + GroupPolicyAssignmentIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -124,9 +149,26 @@ def __init__(__self__, *, :param str content: The non-compliance message text. When assigning policy sets (initiatives), unless `policy_definition_reference_id` is specified then this message will be the default for all policies. :param str policy_definition_reference_id: When assigning policy sets (initiatives), this is the ID of the policy definition that the non-compliance message applies to. """ - pulumi.set(__self__, "content", content) + GroupPolicyAssignmentNonComplianceMessage._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + policy_definition_reference_id=policy_definition_reference_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[str] = None, + policy_definition_reference_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + + _setter("content", content) if policy_definition_reference_id is not None: - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + _setter("policy_definition_reference_id", policy_definition_reference_id) @property @pulumi.getter @@ -154,9 +196,24 @@ def __init__(__self__, *, :param str value: Specifies the value to override the policy property. Possible values for `policyEffect` override listed [policy effects](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects). :param Sequence['GroupPolicyAssignmentOverrideSelectorArgs'] selectors: One or more `override_selector` as defined below. """ - pulumi.set(__self__, "value", value) + GroupPolicyAssignmentOverride._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + selectors=selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[str] = None, + selectors: Optional[Sequence['outputs.GroupPolicyAssignmentOverrideSelector']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) if selectors is not None: - pulumi.set(__self__, "selectors", selectors) + _setter("selectors", selectors) @property @pulumi.getter @@ -203,12 +260,29 @@ def __init__(__self__, *, :param str kind: Specifies which characteristic will narrow down the set of evaluated resources. Possible values are `resourceLocation`, `resourceType` and `resourceWithoutLocation`. :param Sequence[str] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ + GroupPolicyAssignmentOverrideSelector._configure( + lambda key, value: pulumi.set(__self__, key, value), + ins=ins, + kind=kind, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ins: Optional[Sequence[str]] = None, + kind: Optional[str] = None, + not_ins: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter @@ -244,9 +318,24 @@ def __init__(__self__, *, :param Sequence['GroupPolicyAssignmentResourceSelectorSelectorArgs'] selectors: One or more `resource_selector` block as defined below. :param str name: Specifies a name for the resource selector. """ - pulumi.set(__self__, "selectors", selectors) + GroupPolicyAssignmentResourceSelector._configure( + lambda key, value: pulumi.set(__self__, key, value), + selectors=selectors, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + selectors: Optional[Sequence['outputs.GroupPolicyAssignmentResourceSelectorSelector']] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if selectors is None: + raise TypeError("Missing 'selectors' argument") + + _setter("selectors", selectors) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -293,11 +382,30 @@ def __init__(__self__, *, :param Sequence[str] ins: Specify the list of policy reference id values to filter in. Cannot be used with `not_in`. :param Sequence[str] not_ins: Specify the list of policy reference id values to filter out. Cannot be used with `in`. """ - pulumi.set(__self__, "kind", kind) + GroupPolicyAssignmentResourceSelectorSelector._configure( + lambda key, value: pulumi.set(__self__, key, value), + kind=kind, + ins=ins, + not_ins=not_ins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kind: Optional[str] = None, + ins: Optional[Sequence[str]] = None, + not_ins: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kind is None: + raise TypeError("Missing 'kind' argument") + if not_ins is None and 'notIns' in kwargs: + not_ins = kwargs['notIns'] + + _setter("kind", kind) if ins is not None: - pulumi.set(__self__, "ins", ins) + _setter("ins", ins) if not_ins is not None: - pulumi.set(__self__, "not_ins", not_ins) + _setter("not_ins", not_ins) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/management/private_link.py b/sdk/python/pulumi_azure/management/private_link.py index bac7a80c06..21f6efb844 100644 --- a/sdk/python/pulumi_azure/management/private_link.py +++ b/sdk/python/pulumi_azure/management/private_link.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PrivateLinkArgs', 'PrivateLink'] @@ -23,11 +23,30 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created. :param pulumi.Input[str] name: Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + PrivateLinkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="resourceGroupName") @@ -78,12 +97,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created. :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created. """ + _PrivateLinkState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter @@ -199,6 +235,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PrivateLinkArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/management/private_link_association.py b/sdk/python/pulumi_azure/management/private_link_association.py index 4b4333b2e6..187521d750 100644 --- a/sdk/python/pulumi_azure/management/private_link_association.py +++ b/sdk/python/pulumi_azure/management/private_link_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PrivateLinkAssociationArgs', 'PrivateLinkAssociation'] @@ -37,11 +37,40 @@ def __init__(__self__, *, public_network_access_enabled=True) ``` """ - pulumi.set(__self__, "management_group_id", management_group_id) - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) - pulumi.set(__self__, "resource_management_private_link_id", resource_management_private_link_id) + PrivateLinkAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_group_id=management_group_id, + public_network_access_enabled=public_network_access_enabled, + resource_management_private_link_id=resource_management_private_link_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_group_id: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_management_private_link_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if management_group_id is None: + raise TypeError("Missing 'management_group_id' argument") + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if public_network_access_enabled is None: + raise TypeError("Missing 'public_network_access_enabled' argument") + if resource_management_private_link_id is None and 'resourceManagementPrivateLinkId' in kwargs: + resource_management_private_link_id = kwargs['resourceManagementPrivateLinkId'] + if resource_management_private_link_id is None: + raise TypeError("Missing 'resource_management_private_link_id' argument") + + _setter("management_group_id", management_group_id) + _setter("public_network_access_enabled", public_network_access_enabled) + _setter("resource_management_private_link_id", resource_management_private_link_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="managementGroupId") @@ -132,16 +161,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_management_private_link_id: The Resource ID of Resource Management Private Link. Changing this forces a new Private Link Association to be created. :param pulumi.Input[str] tenant_id: The Tenant ID. """ + _PrivateLinkAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_group_id=management_group_id, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_management_private_link_id=resource_management_private_link_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_group_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_management_private_link_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_management_private_link_id is None and 'resourceManagementPrivateLinkId' in kwargs: + resource_management_private_link_id = kwargs['resourceManagementPrivateLinkId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if management_group_id is not None: - pulumi.set(__self__, "management_group_id", management_group_id) + _setter("management_group_id", management_group_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_management_private_link_id is not None: - pulumi.set(__self__, "resource_management_private_link_id", resource_management_private_link_id) + _setter("resource_management_private_link_id", resource_management_private_link_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="managementGroupId") @@ -323,6 +379,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PrivateLinkAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/managementgroups/get_management_group.py b/sdk/python/pulumi_azure/managementgroups/get_management_group.py index e142d10794..52bb3c7550 100644 --- a/sdk/python/pulumi_azure/managementgroups/get_management_group.py +++ b/sdk/python/pulumi_azure/managementgroups/get_management_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/managementgroups/management_group.py b/sdk/python/pulumi_azure/managementgroups/management_group.py index 14d59b9d95..e68b71df55 100644 --- a/sdk/python/pulumi_azure/managementgroups/management_group.py +++ b/sdk/python/pulumi_azure/managementgroups/management_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManagementGroupArgs', 'ManagementGroup'] @@ -27,14 +27,37 @@ def __init__(__self__, *, > **Note:** To clear all Subscriptions from the Management Group set `subscription_ids` to an empty list """ + ManagementGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + name=name, + parent_management_group_id=parent_management_group_id, + subscription_ids=subscription_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parent_management_group_id: Optional[pulumi.Input[str]] = None, + subscription_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if parent_management_group_id is None and 'parentManagementGroupId' in kwargs: + parent_management_group_id = kwargs['parentManagementGroupId'] + if subscription_ids is None and 'subscriptionIds' in kwargs: + subscription_ids = kwargs['subscriptionIds'] + if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parent_management_group_id is not None: - pulumi.set(__self__, "parent_management_group_id", parent_management_group_id) + _setter("parent_management_group_id", parent_management_group_id) if subscription_ids is not None: - pulumi.set(__self__, "subscription_ids", subscription_ids) + _setter("subscription_ids", subscription_ids) @property @pulumi.getter(name="displayName") @@ -103,14 +126,37 @@ def __init__(__self__, *, > **Note:** To clear all Subscriptions from the Management Group set `subscription_ids` to an empty list """ + _ManagementGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + name=name, + parent_management_group_id=parent_management_group_id, + subscription_ids=subscription_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parent_management_group_id: Optional[pulumi.Input[str]] = None, + subscription_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if parent_management_group_id is None and 'parentManagementGroupId' in kwargs: + parent_management_group_id = kwargs['parentManagementGroupId'] + if subscription_ids is None and 'subscriptionIds' in kwargs: + subscription_ids = kwargs['subscriptionIds'] + if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parent_management_group_id is not None: - pulumi.set(__self__, "parent_management_group_id", parent_management_group_id) + _setter("parent_management_group_id", parent_management_group_id) if subscription_ids is not None: - pulumi.set(__self__, "subscription_ids", subscription_ids) + _setter("subscription_ids", subscription_ids) @property @pulumi.getter(name="displayName") @@ -263,6 +309,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagementGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/managementresource/manangement_lock.py b/sdk/python/pulumi_azure/managementresource/manangement_lock.py index 9171a07594..7d884e1b2c 100644 --- a/sdk/python/pulumi_azure/managementresource/manangement_lock.py +++ b/sdk/python/pulumi_azure/managementresource/manangement_lock.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManangementLockArgs', 'ManangementLock'] @@ -27,12 +27,35 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Management Lock. Changing this forces a new resource to be created. :param pulumi.Input[str] notes: Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "lock_level", lock_level) - pulumi.set(__self__, "scope", scope) + ManangementLockArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + lock_level=lock_level, + scope=scope, + name=name, + notes=notes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + lock_level: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lock_level is None and 'lockLevel' in kwargs: + lock_level = kwargs['lockLevel'] + if lock_level is None: + raise TypeError("Missing 'lock_level' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + + _setter("lock_level", lock_level) + _setter("scope", scope) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) @property @pulumi.getter(name="lockLevel") @@ -101,14 +124,33 @@ def __init__(__self__, *, :param pulumi.Input[str] notes: Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created. :param pulumi.Input[str] scope: Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created. """ + _ManangementLockState._configure( + lambda key, value: pulumi.set(__self__, key, value), + lock_level=lock_level, + name=name, + notes=notes, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + lock_level: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if lock_level is None and 'lockLevel' in kwargs: + lock_level = kwargs['lockLevel'] + if lock_level is not None: - pulumi.set(__self__, "lock_level", lock_level) + _setter("lock_level", lock_level) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="lockLevel") @@ -309,6 +351,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManangementLockArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/maps/account.py b/sdk/python/pulumi_azure/maps/account.py index 275e891166..4dfbf261cb 100644 --- a/sdk/python/pulumi_azure/maps/account.py +++ b/sdk/python/pulumi_azure/maps/account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AccountArgs', 'Account'] @@ -29,14 +29,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Azure Maps Account. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Azure Maps Account. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + AccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + local_authentication_enabled=local_authentication_enabled, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + local_authentication_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if local_authentication_enabled is None and 'localAuthenticationEnabled' in kwargs: + local_authentication_enabled = kwargs['localAuthenticationEnabled'] + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if local_authentication_enabled is not None: - pulumi.set(__self__, "local_authentication_enabled", local_authentication_enabled) + _setter("local_authentication_enabled", local_authentication_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -125,22 +154,59 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Azure Maps Account. :param pulumi.Input[str] x_ms_client_id: A unique identifier for the Maps Account. """ + _AccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + local_authentication_enabled=local_authentication_enabled, + name=name, + primary_access_key=primary_access_key, + resource_group_name=resource_group_name, + secondary_access_key=secondary_access_key, + sku_name=sku_name, + tags=tags, + x_ms_client_id=x_ms_client_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + local_authentication_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_access_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_access_key: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + x_ms_client_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_authentication_enabled is None and 'localAuthenticationEnabled' in kwargs: + local_authentication_enabled = kwargs['localAuthenticationEnabled'] + if primary_access_key is None and 'primaryAccessKey' in kwargs: + primary_access_key = kwargs['primaryAccessKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_access_key is None and 'secondaryAccessKey' in kwargs: + secondary_access_key = kwargs['secondaryAccessKey'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if x_ms_client_id is None and 'xMsClientId' in kwargs: + x_ms_client_id = kwargs['xMsClientId'] + if local_authentication_enabled is not None: - pulumi.set(__self__, "local_authentication_enabled", local_authentication_enabled) + _setter("local_authentication_enabled", local_authentication_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_access_key is not None: - pulumi.set(__self__, "primary_access_key", primary_access_key) + _setter("primary_access_key", primary_access_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_access_key is not None: - pulumi.set(__self__, "secondary_access_key", secondary_access_key) + _setter("secondary_access_key", secondary_access_key) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if x_ms_client_id is not None: - pulumi.set(__self__, "x_ms_client_id", x_ms_client_id) + _setter("x_ms_client_id", x_ms_client_id) @property @pulumi.getter(name="localAuthenticationEnabled") @@ -332,6 +398,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/maps/creator.py b/sdk/python/pulumi_azure/maps/creator.py index cc8bc9284a..52b33740f2 100644 --- a/sdk/python/pulumi_azure/maps/creator.py +++ b/sdk/python/pulumi_azure/maps/creator.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CreatorArgs', 'Creator'] @@ -27,14 +27,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Azure Maps Creator. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Azure Maps Creator. """ - pulumi.set(__self__, "maps_account_id", maps_account_id) - pulumi.set(__self__, "storage_units", storage_units) + CreatorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + maps_account_id=maps_account_id, + storage_units=storage_units, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + maps_account_id: Optional[pulumi.Input[str]] = None, + storage_units: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maps_account_id is None and 'mapsAccountId' in kwargs: + maps_account_id = kwargs['mapsAccountId'] + if maps_account_id is None: + raise TypeError("Missing 'maps_account_id' argument") + if storage_units is None and 'storageUnits' in kwargs: + storage_units = kwargs['storageUnits'] + if storage_units is None: + raise TypeError("Missing 'storage_units' argument") + + _setter("maps_account_id", maps_account_id) + _setter("storage_units", storage_units) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="mapsAccountId") @@ -113,16 +140,39 @@ def __init__(__self__, *, :param pulumi.Input[int] storage_units: The storage units to be allocated. Integer values from 1 to 100, inclusive. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Azure Maps Creator. """ + _CreatorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + maps_account_id=maps_account_id, + name=name, + storage_units=storage_units, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + maps_account_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_units: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maps_account_id is None and 'mapsAccountId' in kwargs: + maps_account_id = kwargs['mapsAccountId'] + if storage_units is None and 'storageUnits' in kwargs: + storage_units = kwargs['storageUnits'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maps_account_id is not None: - pulumi.set(__self__, "maps_account_id", maps_account_id) + _setter("maps_account_id", maps_account_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_units is not None: - pulumi.set(__self__, "storage_units", storage_units) + _setter("storage_units", storage_units) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -286,6 +336,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CreatorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/maps/get_account.py b/sdk/python/pulumi_azure/maps/get_account.py index 1b0f85631a..bb8775ae91 100644 --- a/sdk/python/pulumi_azure/maps/get_account.py +++ b/sdk/python/pulumi_azure/maps/get_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/mariadb/configuration.py b/sdk/python/pulumi_azure/mariadb/configuration.py index c6657d4ff0..a838096034 100644 --- a/sdk/python/pulumi_azure/mariadb/configuration.py +++ b/sdk/python/pulumi_azure/mariadb/configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ConfigurationArgs', 'Configuration'] @@ -25,10 +25,39 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. :param pulumi.Input[str] value: Specifies the value of the MariaDB Configuration. See the MariaDB documentation for valid values. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "value", value) + ConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("value", value) @property @pulumi.getter @@ -93,14 +122,35 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. :param pulumi.Input[str] value: Specifies the value of the MariaDB Configuration. See the MariaDB documentation for valid values. Changing this forces a new resource to be created. """ + _ConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -250,6 +300,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mariadb/database.py b/sdk/python/pulumi_azure/mariadb/database.py index d0dec820c3..db53d5a865 100644 --- a/sdk/python/pulumi_azure/mariadb/database.py +++ b/sdk/python/pulumi_azure/mariadb/database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DatabaseArgs', 'Database'] @@ -27,12 +27,43 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the MariaDB Database, which needs [to be a valid MariaDB identifier](https://mariadb.com/kb/en/library/identifier-names/). Changing this forces a new resource to be created. """ - pulumi.set(__self__, "charset", charset) - pulumi.set(__self__, "collation", collation) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) + DatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + charset=charset, + collation=collation, + resource_group_name=resource_group_name, + server_name=server_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + charset: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if charset is None: + raise TypeError("Missing 'charset' argument") + if collation is None: + raise TypeError("Missing 'collation' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + + _setter("charset", charset) + _setter("collation", collation) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -111,16 +142,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. :param pulumi.Input[str] server_name: Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. """ + _DatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + charset=charset, + collation=collation, + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + charset: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if charset is not None: - pulumi.set(__self__, "charset", charset) + _setter("charset", charset) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) @property @pulumi.getter @@ -290,6 +344,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mariadb/firewall_rule.py b/sdk/python/pulumi_azure/mariadb/firewall_rule.py index 14dcaada1b..e609a4ddbb 100644 --- a/sdk/python/pulumi_azure/mariadb/firewall_rule.py +++ b/sdk/python/pulumi_azure/mariadb/firewall_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FirewallRuleArgs', 'FirewallRule'] @@ -29,12 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] start_ip_address: Specifies the Start IP Address associated with this Firewall Rule. :param pulumi.Input[str] name: Specifies the name of the MariaDB Firewall Rule. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "end_ip_address", end_ip_address) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "start_ip_address", start_ip_address) + FirewallRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + resource_group_name=resource_group_name, + server_name=server_name, + start_ip_address=start_ip_address, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if end_ip_address is None: + raise TypeError("Missing 'end_ip_address' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if start_ip_address is None: + raise TypeError("Missing 'start_ip_address' argument") + + _setter("end_ip_address", end_ip_address) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("start_ip_address", start_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="endIpAddress") @@ -117,16 +152,43 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. :param pulumi.Input[str] start_ip_address: Specifies the Start IP Address associated with this Firewall Rule. """ + _FirewallRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + start_ip_address=start_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if end_ip_address is not None: - pulumi.set(__self__, "end_ip_address", end_ip_address) + _setter("end_ip_address", end_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if start_ip_address is not None: - pulumi.set(__self__, "start_ip_address", start_ip_address) + _setter("start_ip_address", start_ip_address) @property @pulumi.getter(name="endIpAddress") @@ -302,6 +364,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mariadb/get_maria_db_server.py b/sdk/python/pulumi_azure/mariadb/get_maria_db_server.py index 6cef43a4a9..8bfc110331 100644 --- a/sdk/python/pulumi_azure/mariadb/get_maria_db_server.py +++ b/sdk/python/pulumi_azure/mariadb/get_maria_db_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/mariadb/outputs.py b/sdk/python/pulumi_azure/mariadb/outputs.py index 1adf33a4aa..840d3742ea 100644 --- a/sdk/python/pulumi_azure/mariadb/outputs.py +++ b/sdk/python/pulumi_azure/mariadb/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -26,10 +26,43 @@ def __init__(__self__, *, :param str geo_redundant_backup: Whether Geo-redundant is enabled or not for server backup. :param int storage_mb: The max storage allowed for a server. """ - pulumi.set(__self__, "auto_grow", auto_grow) - pulumi.set(__self__, "backup_retention_days", backup_retention_days) - pulumi.set(__self__, "geo_redundant_backup", geo_redundant_backup) - pulumi.set(__self__, "storage_mb", storage_mb) + GetMariaDbServerStorageProfileResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_grow=auto_grow, + backup_retention_days=backup_retention_days, + geo_redundant_backup=geo_redundant_backup, + storage_mb=storage_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_grow: Optional[str] = None, + backup_retention_days: Optional[int] = None, + geo_redundant_backup: Optional[str] = None, + storage_mb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_grow is None and 'autoGrow' in kwargs: + auto_grow = kwargs['autoGrow'] + if auto_grow is None: + raise TypeError("Missing 'auto_grow' argument") + if backup_retention_days is None and 'backupRetentionDays' in kwargs: + backup_retention_days = kwargs['backupRetentionDays'] + if backup_retention_days is None: + raise TypeError("Missing 'backup_retention_days' argument") + if geo_redundant_backup is None and 'geoRedundantBackup' in kwargs: + geo_redundant_backup = kwargs['geoRedundantBackup'] + if geo_redundant_backup is None: + raise TypeError("Missing 'geo_redundant_backup' argument") + if storage_mb is None and 'storageMb' in kwargs: + storage_mb = kwargs['storageMb'] + if storage_mb is None: + raise TypeError("Missing 'storage_mb' argument") + + _setter("auto_grow", auto_grow) + _setter("backup_retention_days", backup_retention_days) + _setter("geo_redundant_backup", geo_redundant_backup) + _setter("storage_mb", storage_mb) @property @pulumi.getter(name="autoGrow") diff --git a/sdk/python/pulumi_azure/mariadb/server.py b/sdk/python/pulumi_azure/mariadb/server.py index 53ff58ace9..3bbfc80318 100644 --- a/sdk/python/pulumi_azure/mariadb/server.py +++ b/sdk/python/pulumi_azure/mariadb/server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServerArgs', 'Server'] @@ -55,38 +55,119 @@ def __init__(__self__, *, :param pulumi.Input[int] storage_mb: Max storage allowed for a server. Possible values are between `5120` MB (5GB) and `1024000`MB (1TB) for the Basic SKU and between `5120` MB (5GB) and `4096000` MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/rest/api/mariadb/servers/create#storageprofile). :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "ssl_enforcement_enabled", ssl_enforcement_enabled) - pulumi.set(__self__, "version", version) + ServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + ssl_enforcement_enabled=ssl_enforcement_enabled, + version=version, + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + auto_grow_enabled=auto_grow_enabled, + backup_retention_days=backup_retention_days, + create_mode=create_mode, + creation_source_server_id=creation_source_server_id, + geo_redundant_backup_enabled=geo_redundant_backup_enabled, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + restore_point_in_time=restore_point_in_time, + ssl_minimal_tls_version_enforced=ssl_minimal_tls_version_enforced, + storage_mb=storage_mb, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + ssl_enforcement_enabled: Optional[pulumi.Input[bool]] = None, + version: Optional[pulumi.Input[str]] = None, + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + auto_grow_enabled: Optional[pulumi.Input[bool]] = None, + backup_retention_days: Optional[pulumi.Input[int]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + creation_source_server_id: Optional[pulumi.Input[str]] = None, + geo_redundant_backup_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + restore_point_in_time: Optional[pulumi.Input[str]] = None, + ssl_minimal_tls_version_enforced: Optional[pulumi.Input[str]] = None, + storage_mb: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if ssl_enforcement_enabled is None and 'sslEnforcementEnabled' in kwargs: + ssl_enforcement_enabled = kwargs['sslEnforcementEnabled'] + if ssl_enforcement_enabled is None: + raise TypeError("Missing 'ssl_enforcement_enabled' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if auto_grow_enabled is None and 'autoGrowEnabled' in kwargs: + auto_grow_enabled = kwargs['autoGrowEnabled'] + if backup_retention_days is None and 'backupRetentionDays' in kwargs: + backup_retention_days = kwargs['backupRetentionDays'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if creation_source_server_id is None and 'creationSourceServerId' in kwargs: + creation_source_server_id = kwargs['creationSourceServerId'] + if geo_redundant_backup_enabled is None and 'geoRedundantBackupEnabled' in kwargs: + geo_redundant_backup_enabled = kwargs['geoRedundantBackupEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if restore_point_in_time is None and 'restorePointInTime' in kwargs: + restore_point_in_time = kwargs['restorePointInTime'] + if ssl_minimal_tls_version_enforced is None and 'sslMinimalTlsVersionEnforced' in kwargs: + ssl_minimal_tls_version_enforced = kwargs['sslMinimalTlsVersionEnforced'] + if storage_mb is None and 'storageMb' in kwargs: + storage_mb = kwargs['storageMb'] + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("ssl_enforcement_enabled", ssl_enforcement_enabled) + _setter("version", version) if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_login_password is not None: - pulumi.set(__self__, "administrator_login_password", administrator_login_password) + _setter("administrator_login_password", administrator_login_password) if auto_grow_enabled is not None: - pulumi.set(__self__, "auto_grow_enabled", auto_grow_enabled) + _setter("auto_grow_enabled", auto_grow_enabled) if backup_retention_days is not None: - pulumi.set(__self__, "backup_retention_days", backup_retention_days) + _setter("backup_retention_days", backup_retention_days) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if creation_source_server_id is not None: - pulumi.set(__self__, "creation_source_server_id", creation_source_server_id) + _setter("creation_source_server_id", creation_source_server_id) if geo_redundant_backup_enabled is not None: - pulumi.set(__self__, "geo_redundant_backup_enabled", geo_redundant_backup_enabled) + _setter("geo_redundant_backup_enabled", geo_redundant_backup_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if restore_point_in_time is not None: - pulumi.set(__self__, "restore_point_in_time", restore_point_in_time) + _setter("restore_point_in_time", restore_point_in_time) if ssl_minimal_tls_version_enforced is not None: - pulumi.set(__self__, "ssl_minimal_tls_version_enforced", ssl_minimal_tls_version_enforced) + _setter("ssl_minimal_tls_version_enforced", ssl_minimal_tls_version_enforced) if storage_mb is not None: - pulumi.set(__self__, "storage_mb", storage_mb) + _setter("storage_mb", storage_mb) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -353,44 +434,119 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] version: Specifies the version of MariaDB to use. Possible values are `10.2` and `10.3`. Changing this forces a new resource to be created. """ + _ServerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + auto_grow_enabled=auto_grow_enabled, + backup_retention_days=backup_retention_days, + create_mode=create_mode, + creation_source_server_id=creation_source_server_id, + fqdn=fqdn, + geo_redundant_backup_enabled=geo_redundant_backup_enabled, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + restore_point_in_time=restore_point_in_time, + sku_name=sku_name, + ssl_enforcement_enabled=ssl_enforcement_enabled, + ssl_minimal_tls_version_enforced=ssl_minimal_tls_version_enforced, + storage_mb=storage_mb, + tags=tags, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + auto_grow_enabled: Optional[pulumi.Input[bool]] = None, + backup_retention_days: Optional[pulumi.Input[int]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + creation_source_server_id: Optional[pulumi.Input[str]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + geo_redundant_backup_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + restore_point_in_time: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + ssl_enforcement_enabled: Optional[pulumi.Input[bool]] = None, + ssl_minimal_tls_version_enforced: Optional[pulumi.Input[str]] = None, + storage_mb: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if auto_grow_enabled is None and 'autoGrowEnabled' in kwargs: + auto_grow_enabled = kwargs['autoGrowEnabled'] + if backup_retention_days is None and 'backupRetentionDays' in kwargs: + backup_retention_days = kwargs['backupRetentionDays'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if creation_source_server_id is None and 'creationSourceServerId' in kwargs: + creation_source_server_id = kwargs['creationSourceServerId'] + if geo_redundant_backup_enabled is None and 'geoRedundantBackupEnabled' in kwargs: + geo_redundant_backup_enabled = kwargs['geoRedundantBackupEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if restore_point_in_time is None and 'restorePointInTime' in kwargs: + restore_point_in_time = kwargs['restorePointInTime'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if ssl_enforcement_enabled is None and 'sslEnforcementEnabled' in kwargs: + ssl_enforcement_enabled = kwargs['sslEnforcementEnabled'] + if ssl_minimal_tls_version_enforced is None and 'sslMinimalTlsVersionEnforced' in kwargs: + ssl_minimal_tls_version_enforced = kwargs['sslMinimalTlsVersionEnforced'] + if storage_mb is None and 'storageMb' in kwargs: + storage_mb = kwargs['storageMb'] + if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_login_password is not None: - pulumi.set(__self__, "administrator_login_password", administrator_login_password) + _setter("administrator_login_password", administrator_login_password) if auto_grow_enabled is not None: - pulumi.set(__self__, "auto_grow_enabled", auto_grow_enabled) + _setter("auto_grow_enabled", auto_grow_enabled) if backup_retention_days is not None: - pulumi.set(__self__, "backup_retention_days", backup_retention_days) + _setter("backup_retention_days", backup_retention_days) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if creation_source_server_id is not None: - pulumi.set(__self__, "creation_source_server_id", creation_source_server_id) + _setter("creation_source_server_id", creation_source_server_id) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if geo_redundant_backup_enabled is not None: - pulumi.set(__self__, "geo_redundant_backup_enabled", geo_redundant_backup_enabled) + _setter("geo_redundant_backup_enabled", geo_redundant_backup_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if restore_point_in_time is not None: - pulumi.set(__self__, "restore_point_in_time", restore_point_in_time) + _setter("restore_point_in_time", restore_point_in_time) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if ssl_enforcement_enabled is not None: - pulumi.set(__self__, "ssl_enforcement_enabled", ssl_enforcement_enabled) + _setter("ssl_enforcement_enabled", ssl_enforcement_enabled) if ssl_minimal_tls_version_enforced is not None: - pulumi.set(__self__, "ssl_minimal_tls_version_enforced", ssl_minimal_tls_version_enforced) + _setter("ssl_minimal_tls_version_enforced", ssl_minimal_tls_version_enforced) if storage_mb is not None: - pulumi.set(__self__, "storage_mb", storage_mb) + _setter("storage_mb", storage_mb) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="administratorLogin") @@ -754,6 +910,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mariadb/virtual_network_rule.py b/sdk/python/pulumi_azure/mariadb/virtual_network_rule.py index a5fe0ae45d..de6ee597a9 100644 --- a/sdk/python/pulumi_azure/mariadb/virtual_network_rule.py +++ b/sdk/python/pulumi_azure/mariadb/virtual_network_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VirtualNetworkRuleArgs', 'VirtualNetworkRule'] @@ -33,11 +33,40 @@ def __init__(__self__, *, 2. Cannot start with a number or hyphen 3. Cannot end with a hyphen """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "subnet_id", subnet_id) + VirtualNetworkRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + server_name=server_name, + subnet_id=subnet_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("subnet_id", subnet_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="resourceGroupName") @@ -118,14 +147,37 @@ def __init__(__self__, *, > **NOTE:** Due to [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/3719) this resource currently doesn't expose the `ignore_missing_vnet_service_endpoint` field and defaults this to `false`. This provider will check during the provisioning of the Virtual Network Rule that the Subnet contains the Service Rule to verify that the Virtual Network Rule can be created. """ + _VirtualNetworkRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -311,6 +363,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/marketplace/agreement.py b/sdk/python/pulumi_azure/marketplace/agreement.py index d82ef3af32..d95e676628 100644 --- a/sdk/python/pulumi_azure/marketplace/agreement.py +++ b/sdk/python/pulumi_azure/marketplace/agreement.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AgreementArgs', 'Agreement'] @@ -23,9 +23,30 @@ def __init__(__self__, *, :param pulumi.Input[str] plan: The Plan of the Marketplace Image. Changing this forces a new resource to be created. :param pulumi.Input[str] publisher: The Publisher of the Marketplace Image. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "offer", offer) - pulumi.set(__self__, "plan", plan) - pulumi.set(__self__, "publisher", publisher) + AgreementArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + offer=offer, + plan=plan, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + offer: Optional[pulumi.Input[str]] = None, + plan: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offer is None: + raise TypeError("Missing 'offer' argument") + if plan is None: + raise TypeError("Missing 'plan' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + + _setter("offer", offer) + _setter("plan", plan) + _setter("publisher", publisher) @property @pulumi.getter @@ -78,16 +99,39 @@ def __init__(__self__, *, :param pulumi.Input[str] plan: The Plan of the Marketplace Image. Changing this forces a new resource to be created. :param pulumi.Input[str] publisher: The Publisher of the Marketplace Image. Changing this forces a new resource to be created. """ + _AgreementState._configure( + lambda key, value: pulumi.set(__self__, key, value), + license_text_link=license_text_link, + offer=offer, + plan=plan, + privacy_policy_link=privacy_policy_link, + publisher=publisher, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + license_text_link: Optional[pulumi.Input[str]] = None, + offer: Optional[pulumi.Input[str]] = None, + plan: Optional[pulumi.Input[str]] = None, + privacy_policy_link: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if license_text_link is None and 'licenseTextLink' in kwargs: + license_text_link = kwargs['licenseTextLink'] + if privacy_policy_link is None and 'privacyPolicyLink' in kwargs: + privacy_policy_link = kwargs['privacyPolicyLink'] + if license_text_link is not None: - pulumi.set(__self__, "license_text_link", license_text_link) + _setter("license_text_link", license_text_link) if offer is not None: - pulumi.set(__self__, "offer", offer) + _setter("offer", offer) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if privacy_policy_link is not None: - pulumi.set(__self__, "privacy_policy_link", privacy_policy_link) + _setter("privacy_policy_link", privacy_policy_link) if publisher is not None: - pulumi.set(__self__, "publisher", publisher) + _setter("publisher", publisher) @property @pulumi.getter(name="licenseTextLink") @@ -221,6 +265,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AgreementArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/marketplace/get_agreement.py b/sdk/python/pulumi_azure/marketplace/get_agreement.py index 0a3aadc3a1..654817dbdf 100644 --- a/sdk/python/pulumi_azure/marketplace/get_agreement.py +++ b/sdk/python/pulumi_azure/marketplace/get_agreement.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/marketplace/role_assignment.py b/sdk/python/pulumi_azure/marketplace/role_assignment.py index 51cc876e31..517a01ff57 100644 --- a/sdk/python/pulumi_azure/marketplace/role_assignment.py +++ b/sdk/python/pulumi_azure/marketplace/role_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RoleAssignmentArgs', 'RoleAssignment'] @@ -26,23 +26,64 @@ def __init__(__self__, *, """ The set of arguments for constructing a RoleAssignment resource. """ - pulumi.set(__self__, "principal_id", principal_id) + RoleAssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + condition=condition, + condition_version=condition_version, + delegated_managed_identity_resource_id=delegated_managed_identity_resource_id, + description=description, + name=name, + role_definition_id=role_definition_id, + role_definition_name=role_definition_name, + skip_service_principal_aad_check=skip_service_principal_aad_check, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[pulumi.Input[str]] = None, + condition: Optional[pulumi.Input[str]] = None, + condition_version: Optional[pulumi.Input[str]] = None, + delegated_managed_identity_resource_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + role_definition_name: Optional[pulumi.Input[str]] = None, + skip_service_principal_aad_check: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if condition_version is None and 'conditionVersion' in kwargs: + condition_version = kwargs['conditionVersion'] + if delegated_managed_identity_resource_id is None and 'delegatedManagedIdentityResourceId' in kwargs: + delegated_managed_identity_resource_id = kwargs['delegatedManagedIdentityResourceId'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_name is None and 'roleDefinitionName' in kwargs: + role_definition_name = kwargs['roleDefinitionName'] + if skip_service_principal_aad_check is None and 'skipServicePrincipalAadCheck' in kwargs: + skip_service_principal_aad_check = kwargs['skipServicePrincipalAadCheck'] + + _setter("principal_id", principal_id) if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if condition_version is not None: - pulumi.set(__self__, "condition_version", condition_version) + _setter("condition_version", condition_version) if delegated_managed_identity_resource_id is not None: - pulumi.set(__self__, "delegated_managed_identity_resource_id", delegated_managed_identity_resource_id) + _setter("delegated_managed_identity_resource_id", delegated_managed_identity_resource_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) if role_definition_name is not None: - pulumi.set(__self__, "role_definition_name", role_definition_name) + _setter("role_definition_name", role_definition_name) if skip_service_principal_aad_check is not None: - pulumi.set(__self__, "skip_service_principal_aad_check", skip_service_principal_aad_check) + _setter("skip_service_principal_aad_check", skip_service_principal_aad_check) @property @pulumi.getter(name="principalId") @@ -142,26 +183,69 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering RoleAssignment resources. """ + _RoleAssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + condition=condition, + condition_version=condition_version, + delegated_managed_identity_resource_id=delegated_managed_identity_resource_id, + description=description, + name=name, + principal_id=principal_id, + principal_type=principal_type, + role_definition_id=role_definition_id, + role_definition_name=role_definition_name, + skip_service_principal_aad_check=skip_service_principal_aad_check, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + condition: Optional[pulumi.Input[str]] = None, + condition_version: Optional[pulumi.Input[str]] = None, + delegated_managed_identity_resource_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + principal_type: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + role_definition_name: Optional[pulumi.Input[str]] = None, + skip_service_principal_aad_check: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if condition_version is None and 'conditionVersion' in kwargs: + condition_version = kwargs['conditionVersion'] + if delegated_managed_identity_resource_id is None and 'delegatedManagedIdentityResourceId' in kwargs: + delegated_managed_identity_resource_id = kwargs['delegatedManagedIdentityResourceId'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_type is None and 'principalType' in kwargs: + principal_type = kwargs['principalType'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_name is None and 'roleDefinitionName' in kwargs: + role_definition_name = kwargs['roleDefinitionName'] + if skip_service_principal_aad_check is None and 'skipServicePrincipalAadCheck' in kwargs: + skip_service_principal_aad_check = kwargs['skipServicePrincipalAadCheck'] + if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if condition_version is not None: - pulumi.set(__self__, "condition_version", condition_version) + _setter("condition_version", condition_version) if delegated_managed_identity_resource_id is not None: - pulumi.set(__self__, "delegated_managed_identity_resource_id", delegated_managed_identity_resource_id) + _setter("delegated_managed_identity_resource_id", delegated_managed_identity_resource_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if principal_type is not None: - pulumi.set(__self__, "principal_type", principal_type) + _setter("principal_type", principal_type) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) if role_definition_name is not None: - pulumi.set(__self__, "role_definition_name", role_definition_name) + _setter("role_definition_name", role_definition_name) if skip_service_principal_aad_check is not None: - pulumi.set(__self__, "skip_service_principal_aad_check", skip_service_principal_aad_check) + _setter("skip_service_principal_aad_check", skip_service_principal_aad_check) @property @pulumi.getter @@ -292,6 +376,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RoleAssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/media/_inputs.py b/sdk/python/pulumi_azure/media/_inputs.py index 687a90e4e5..1e6f6c87b7 100644 --- a/sdk/python/pulumi_azure/media/_inputs.py +++ b/sdk/python/pulumi_azure/media/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -124,17 +124,52 @@ def __init__(__self__, *, :param pulumi.Input[int] presentation_window_in_units: The relative to end sliding window. Applies to Live Streaming only. Use `presentation_window_in_units` to apply a sliding window of fragments to include in a playlist. The unit is defined by `unit_timescale_in_milliseconds`. For example, set `presentation_window_in_units` to 120 to apply a two-minute sliding window. Media within 2 minutes of the live edge will be included in the playlist. If a fragment straddles the boundary, the entire fragment will be included in the playlist. The minimum presentation window duration is 60 seconds. :param pulumi.Input[int] start_in_units: The absolute start time boundary. Applies to Video on Demand (VoD) or Live Streaming. This is a long value that represents an absolute start point of the stream. The value gets rounded to the closest next GOP start. The unit is defined by `unit_timescale_in_milliseconds`, so a `start_in_units` of 15 would be for 15 seconds. Use `start_in_units` and `end_in_units` to trim the fragments that will be in the playlist (manifest). For example, `start_in_units` set to 20 and `end_in_units` set to 60 using `unit_timescale_in_milliseconds` in 1000 will generate a playlist that contains fragments from between 20 seconds and 60 seconds of the VoD presentation. If a fragment straddles the boundary, the entire fragment will be included in the manifest. """ - pulumi.set(__self__, "unit_timescale_in_milliseconds", unit_timescale_in_milliseconds) + AccountFilterPresentationTimeRangeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + unit_timescale_in_milliseconds=unit_timescale_in_milliseconds, + end_in_units=end_in_units, + force_end=force_end, + live_backoff_in_units=live_backoff_in_units, + presentation_window_in_units=presentation_window_in_units, + start_in_units=start_in_units, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + unit_timescale_in_milliseconds: Optional[pulumi.Input[int]] = None, + end_in_units: Optional[pulumi.Input[int]] = None, + force_end: Optional[pulumi.Input[bool]] = None, + live_backoff_in_units: Optional[pulumi.Input[int]] = None, + presentation_window_in_units: Optional[pulumi.Input[int]] = None, + start_in_units: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if unit_timescale_in_milliseconds is None and 'unitTimescaleInMilliseconds' in kwargs: + unit_timescale_in_milliseconds = kwargs['unitTimescaleInMilliseconds'] + if unit_timescale_in_milliseconds is None: + raise TypeError("Missing 'unit_timescale_in_milliseconds' argument") + if end_in_units is None and 'endInUnits' in kwargs: + end_in_units = kwargs['endInUnits'] + if force_end is None and 'forceEnd' in kwargs: + force_end = kwargs['forceEnd'] + if live_backoff_in_units is None and 'liveBackoffInUnits' in kwargs: + live_backoff_in_units = kwargs['liveBackoffInUnits'] + if presentation_window_in_units is None and 'presentationWindowInUnits' in kwargs: + presentation_window_in_units = kwargs['presentationWindowInUnits'] + if start_in_units is None and 'startInUnits' in kwargs: + start_in_units = kwargs['startInUnits'] + + _setter("unit_timescale_in_milliseconds", unit_timescale_in_milliseconds) if end_in_units is not None: - pulumi.set(__self__, "end_in_units", end_in_units) + _setter("end_in_units", end_in_units) if force_end is not None: - pulumi.set(__self__, "force_end", force_end) + _setter("force_end", force_end) if live_backoff_in_units is not None: - pulumi.set(__self__, "live_backoff_in_units", live_backoff_in_units) + _setter("live_backoff_in_units", live_backoff_in_units) if presentation_window_in_units is not None: - pulumi.set(__self__, "presentation_window_in_units", presentation_window_in_units) + _setter("presentation_window_in_units", presentation_window_in_units) if start_in_units is not None: - pulumi.set(__self__, "start_in_units", start_in_units) + _setter("start_in_units", start_in_units) @property @pulumi.getter(name="unitTimescaleInMilliseconds") @@ -218,7 +253,20 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input['AccountFilterTrackSelectionConditionArgs']]] conditions: One or more `selection` blocks as defined above. """ - pulumi.set(__self__, "conditions", conditions) + AccountFilterTrackSelectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + conditions=conditions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + conditions: Optional[pulumi.Input[Sequence[pulumi.Input['AccountFilterTrackSelectionConditionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if conditions is None: + raise TypeError("Missing 'conditions' argument") + + _setter("conditions", conditions) @property @pulumi.getter @@ -244,9 +292,30 @@ def __init__(__self__, *, :param pulumi.Input[str] property: The track property to compare. Supported values are `Bitrate`, `FourCC`, `Language`, `Name` and `Type`. Check [documentation](https://docs.microsoft.com/azure/media-services/latest/filters-concept) for more details. :param pulumi.Input[str] value: The track property value to match or not match. """ - pulumi.set(__self__, "operation", operation) - pulumi.set(__self__, "property", property) - pulumi.set(__self__, "value", value) + AccountFilterTrackSelectionConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operation=operation, + property=property, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operation: Optional[pulumi.Input[str]] = None, + property: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operation is None: + raise TypeError("Missing 'operation' argument") + if property is None: + raise TypeError("Missing 'property' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("operation", operation) + _setter("property", property) + _setter("value", value) @property @pulumi.getter @@ -304,18 +373,51 @@ def __init__(__self__, *, :param pulumi.Input[int] start_in_units: The absolute start time boundary. Applies to Video on Demand (VoD) or Live Streaming. This is a long value that represents an absolute start point of the stream. The value gets rounded to the closest next GOP start. The unit is defined by `unit_timescale_in_miliseconds`, so a `start_in_units` of 15 would be for 15 seconds. Use `start_in_units` and `end_in_units` to trim the fragments that will be in the playlist (manifest). For example, `start_in_units` set to 20 and `end_in_units` set to 60 using `unit_timescale_in_miliseconds` in 1000 will generate a playlist that contains fragments from between 20 seconds and 60 seconds of the VoD presentation. If a fragment straddles the boundary, the entire fragment will be included in the manifest. :param pulumi.Input[int] unit_timescale_in_miliseconds: Specified as the number of miliseconds in one unit timescale. For example, if you want to set a `start_in_units` at 30 seconds, you would use a value of 30 when using the `unit_timescale_in_miliseconds` in 1000. Or if you want to set `start_in_units` in 30 miliseconds, you would use a value of 30 when using the `unit_timescale_in_miliseconds` in 1. Applies timescale to `start_in_units`, `start_timescale` and `presentation_window_in_timescale` and `live_backoff_in_timescale`. """ + AssetFilterPresentationTimeRangeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_in_units=end_in_units, + force_end=force_end, + live_backoff_in_units=live_backoff_in_units, + presentation_window_in_units=presentation_window_in_units, + start_in_units=start_in_units, + unit_timescale_in_miliseconds=unit_timescale_in_miliseconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_in_units: Optional[pulumi.Input[int]] = None, + force_end: Optional[pulumi.Input[bool]] = None, + live_backoff_in_units: Optional[pulumi.Input[int]] = None, + presentation_window_in_units: Optional[pulumi.Input[int]] = None, + start_in_units: Optional[pulumi.Input[int]] = None, + unit_timescale_in_miliseconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_in_units is None and 'endInUnits' in kwargs: + end_in_units = kwargs['endInUnits'] + if force_end is None and 'forceEnd' in kwargs: + force_end = kwargs['forceEnd'] + if live_backoff_in_units is None and 'liveBackoffInUnits' in kwargs: + live_backoff_in_units = kwargs['liveBackoffInUnits'] + if presentation_window_in_units is None and 'presentationWindowInUnits' in kwargs: + presentation_window_in_units = kwargs['presentationWindowInUnits'] + if start_in_units is None and 'startInUnits' in kwargs: + start_in_units = kwargs['startInUnits'] + if unit_timescale_in_miliseconds is None and 'unitTimescaleInMiliseconds' in kwargs: + unit_timescale_in_miliseconds = kwargs['unitTimescaleInMiliseconds'] + if end_in_units is not None: - pulumi.set(__self__, "end_in_units", end_in_units) + _setter("end_in_units", end_in_units) if force_end is not None: - pulumi.set(__self__, "force_end", force_end) + _setter("force_end", force_end) if live_backoff_in_units is not None: - pulumi.set(__self__, "live_backoff_in_units", live_backoff_in_units) + _setter("live_backoff_in_units", live_backoff_in_units) if presentation_window_in_units is not None: - pulumi.set(__self__, "presentation_window_in_units", presentation_window_in_units) + _setter("presentation_window_in_units", presentation_window_in_units) if start_in_units is not None: - pulumi.set(__self__, "start_in_units", start_in_units) + _setter("start_in_units", start_in_units) if unit_timescale_in_miliseconds is not None: - pulumi.set(__self__, "unit_timescale_in_miliseconds", unit_timescale_in_miliseconds) + _setter("unit_timescale_in_miliseconds", unit_timescale_in_miliseconds) @property @pulumi.getter(name="endInUnits") @@ -399,7 +501,20 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input['AssetFilterTrackSelectionConditionArgs']]] conditions: One or more `condition` blocks as defined above. """ - pulumi.set(__self__, "conditions", conditions) + AssetFilterTrackSelectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + conditions=conditions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + conditions: Optional[pulumi.Input[Sequence[pulumi.Input['AssetFilterTrackSelectionConditionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if conditions is None: + raise TypeError("Missing 'conditions' argument") + + _setter("conditions", conditions) @property @pulumi.getter @@ -425,12 +540,27 @@ def __init__(__self__, *, :param pulumi.Input[str] property: The track property to compare. Supported values are `Bitrate`, `FourCC`, `Language`, `Name` and `Type`. Check [documentation](https://docs.microsoft.com/azure/media-services/latest/filters-concept) for more details. :param pulumi.Input[str] value: The track property value to match or not match. """ + AssetFilterTrackSelectionConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operation=operation, + property=property, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operation: Optional[pulumi.Input[str]] = None, + property: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operation is not None: - pulumi.set(__self__, "operation", operation) + _setter("operation", operation) if property is not None: - pulumi.set(__self__, "property", property) + _setter("property", property) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -492,21 +622,62 @@ def __init__(__self__, *, > **NOTE:** Each policy_option can only have one type of configuration: `fairplay_configuration`, `clear_key_configuration_enabled`, `playready_configuration_license` or `widevine_configuration_template`. And is possible to assign only one type of restriction: `open_restriction_enabled` or `token_restriction`. """ - pulumi.set(__self__, "name", name) + ContentKeyPolicyPolicyOptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + clear_key_configuration_enabled=clear_key_configuration_enabled, + fairplay_configuration=fairplay_configuration, + open_restriction_enabled=open_restriction_enabled, + playready_configuration_licenses=playready_configuration_licenses, + playready_response_custom_data=playready_response_custom_data, + token_restriction=token_restriction, + widevine_configuration_template=widevine_configuration_template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + clear_key_configuration_enabled: Optional[pulumi.Input[bool]] = None, + fairplay_configuration: Optional[pulumi.Input['ContentKeyPolicyPolicyOptionFairplayConfigurationArgs']] = None, + open_restriction_enabled: Optional[pulumi.Input[bool]] = None, + playready_configuration_licenses: Optional[pulumi.Input[Sequence[pulumi.Input['ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArgs']]]] = None, + playready_response_custom_data: Optional[pulumi.Input[str]] = None, + token_restriction: Optional[pulumi.Input['ContentKeyPolicyPolicyOptionTokenRestrictionArgs']] = None, + widevine_configuration_template: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if clear_key_configuration_enabled is None and 'clearKeyConfigurationEnabled' in kwargs: + clear_key_configuration_enabled = kwargs['clearKeyConfigurationEnabled'] + if fairplay_configuration is None and 'fairplayConfiguration' in kwargs: + fairplay_configuration = kwargs['fairplayConfiguration'] + if open_restriction_enabled is None and 'openRestrictionEnabled' in kwargs: + open_restriction_enabled = kwargs['openRestrictionEnabled'] + if playready_configuration_licenses is None and 'playreadyConfigurationLicenses' in kwargs: + playready_configuration_licenses = kwargs['playreadyConfigurationLicenses'] + if playready_response_custom_data is None and 'playreadyResponseCustomData' in kwargs: + playready_response_custom_data = kwargs['playreadyResponseCustomData'] + if token_restriction is None and 'tokenRestriction' in kwargs: + token_restriction = kwargs['tokenRestriction'] + if widevine_configuration_template is None and 'widevineConfigurationTemplate' in kwargs: + widevine_configuration_template = kwargs['widevineConfigurationTemplate'] + + _setter("name", name) if clear_key_configuration_enabled is not None: - pulumi.set(__self__, "clear_key_configuration_enabled", clear_key_configuration_enabled) + _setter("clear_key_configuration_enabled", clear_key_configuration_enabled) if fairplay_configuration is not None: - pulumi.set(__self__, "fairplay_configuration", fairplay_configuration) + _setter("fairplay_configuration", fairplay_configuration) if open_restriction_enabled is not None: - pulumi.set(__self__, "open_restriction_enabled", open_restriction_enabled) + _setter("open_restriction_enabled", open_restriction_enabled) if playready_configuration_licenses is not None: - pulumi.set(__self__, "playready_configuration_licenses", playready_configuration_licenses) + _setter("playready_configuration_licenses", playready_configuration_licenses) if playready_response_custom_data is not None: - pulumi.set(__self__, "playready_response_custom_data", playready_response_custom_data) + _setter("playready_response_custom_data", playready_response_custom_data) if token_restriction is not None: - pulumi.set(__self__, "token_restriction", token_restriction) + _setter("token_restriction", token_restriction) if widevine_configuration_template is not None: - pulumi.set(__self__, "widevine_configuration_template", widevine_configuration_template) + _setter("widevine_configuration_template", widevine_configuration_template) @property @pulumi.getter @@ -624,18 +795,47 @@ def __init__(__self__, *, :param pulumi.Input[str] rental_and_lease_key_type: The rental and lease key type. Supported values are `DualExpiry`, `PersistentLimited`, `PersistentUnlimited` or `Undefined`. :param pulumi.Input[int] rental_duration_seconds: The rental duration. Must be greater than 0. """ + ContentKeyPolicyPolicyOptionFairplayConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ask=ask, + offline_rental_configuration=offline_rental_configuration, + pfx=pfx, + pfx_password=pfx_password, + rental_and_lease_key_type=rental_and_lease_key_type, + rental_duration_seconds=rental_duration_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ask: Optional[pulumi.Input[str]] = None, + offline_rental_configuration: Optional[pulumi.Input['ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfigurationArgs']] = None, + pfx: Optional[pulumi.Input[str]] = None, + pfx_password: Optional[pulumi.Input[str]] = None, + rental_and_lease_key_type: Optional[pulumi.Input[str]] = None, + rental_duration_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offline_rental_configuration is None and 'offlineRentalConfiguration' in kwargs: + offline_rental_configuration = kwargs['offlineRentalConfiguration'] + if pfx_password is None and 'pfxPassword' in kwargs: + pfx_password = kwargs['pfxPassword'] + if rental_and_lease_key_type is None and 'rentalAndLeaseKeyType' in kwargs: + rental_and_lease_key_type = kwargs['rentalAndLeaseKeyType'] + if rental_duration_seconds is None and 'rentalDurationSeconds' in kwargs: + rental_duration_seconds = kwargs['rentalDurationSeconds'] + if ask is not None: - pulumi.set(__self__, "ask", ask) + _setter("ask", ask) if offline_rental_configuration is not None: - pulumi.set(__self__, "offline_rental_configuration", offline_rental_configuration) + _setter("offline_rental_configuration", offline_rental_configuration) if pfx is not None: - pulumi.set(__self__, "pfx", pfx) + _setter("pfx", pfx) if pfx_password is not None: - pulumi.set(__self__, "pfx_password", pfx_password) + _setter("pfx_password", pfx_password) if rental_and_lease_key_type is not None: - pulumi.set(__self__, "rental_and_lease_key_type", rental_and_lease_key_type) + _setter("rental_and_lease_key_type", rental_and_lease_key_type) if rental_duration_seconds is not None: - pulumi.set(__self__, "rental_duration_seconds", rental_duration_seconds) + _setter("rental_duration_seconds", rental_duration_seconds) @property @pulumi.getter @@ -719,10 +919,27 @@ def __init__(__self__, *, :param pulumi.Input[int] playback_duration_seconds: Playback duration. :param pulumi.Input[int] storage_duration_seconds: Storage duration. """ + ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + playback_duration_seconds=playback_duration_seconds, + storage_duration_seconds=storage_duration_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + playback_duration_seconds: Optional[pulumi.Input[int]] = None, + storage_duration_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if playback_duration_seconds is None and 'playbackDurationSeconds' in kwargs: + playback_duration_seconds = kwargs['playbackDurationSeconds'] + if storage_duration_seconds is None and 'storageDurationSeconds' in kwargs: + storage_duration_seconds = kwargs['storageDurationSeconds'] + if playback_duration_seconds is not None: - pulumi.set(__self__, "playback_duration_seconds", playback_duration_seconds) + _setter("playback_duration_seconds", playback_duration_seconds) if storage_duration_seconds is not None: - pulumi.set(__self__, "storage_duration_seconds", storage_duration_seconds) + _setter("storage_duration_seconds", storage_duration_seconds) @property @pulumi.getter(name="playbackDurationSeconds") @@ -780,30 +997,87 @@ def __init__(__self__, *, :param pulumi.Input[str] relative_expiration_date: The relative expiration date of license. :param pulumi.Input[str] security_level: The security level of the PlayReady license. Possible values are `SL150`, `SL2000` and `SL3000`. Please see [this document](https://learn.microsoft.com/en-us/rest/api/media/content-key-policies/create-or-update?tabs=HTTP#securitylevel) for more information about security level. See [this document](https://learn.microsoft.com/en-us/azure/media-services/latest/drm-playready-license-template-concept#playready-sl3000-support) for more information about `SL3000` support. """ + ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_test_devices=allow_test_devices, + begin_date=begin_date, + content_key_location_from_header_enabled=content_key_location_from_header_enabled, + content_key_location_from_key_id=content_key_location_from_key_id, + content_type=content_type, + expiration_date=expiration_date, + grace_period=grace_period, + license_type=license_type, + play_right=play_right, + relative_begin_date=relative_begin_date, + relative_expiration_date=relative_expiration_date, + security_level=security_level, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_test_devices: Optional[pulumi.Input[bool]] = None, + begin_date: Optional[pulumi.Input[str]] = None, + content_key_location_from_header_enabled: Optional[pulumi.Input[bool]] = None, + content_key_location_from_key_id: Optional[pulumi.Input[str]] = None, + content_type: Optional[pulumi.Input[str]] = None, + expiration_date: Optional[pulumi.Input[str]] = None, + grace_period: Optional[pulumi.Input[str]] = None, + license_type: Optional[pulumi.Input[str]] = None, + play_right: Optional[pulumi.Input['ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightArgs']] = None, + relative_begin_date: Optional[pulumi.Input[str]] = None, + relative_expiration_date: Optional[pulumi.Input[str]] = None, + security_level: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_test_devices is None and 'allowTestDevices' in kwargs: + allow_test_devices = kwargs['allowTestDevices'] + if begin_date is None and 'beginDate' in kwargs: + begin_date = kwargs['beginDate'] + if content_key_location_from_header_enabled is None and 'contentKeyLocationFromHeaderEnabled' in kwargs: + content_key_location_from_header_enabled = kwargs['contentKeyLocationFromHeaderEnabled'] + if content_key_location_from_key_id is None and 'contentKeyLocationFromKeyId' in kwargs: + content_key_location_from_key_id = kwargs['contentKeyLocationFromKeyId'] + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if grace_period is None and 'gracePeriod' in kwargs: + grace_period = kwargs['gracePeriod'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if play_right is None and 'playRight' in kwargs: + play_right = kwargs['playRight'] + if relative_begin_date is None and 'relativeBeginDate' in kwargs: + relative_begin_date = kwargs['relativeBeginDate'] + if relative_expiration_date is None and 'relativeExpirationDate' in kwargs: + relative_expiration_date = kwargs['relativeExpirationDate'] + if security_level is None and 'securityLevel' in kwargs: + security_level = kwargs['securityLevel'] + if allow_test_devices is not None: - pulumi.set(__self__, "allow_test_devices", allow_test_devices) + _setter("allow_test_devices", allow_test_devices) if begin_date is not None: - pulumi.set(__self__, "begin_date", begin_date) + _setter("begin_date", begin_date) if content_key_location_from_header_enabled is not None: - pulumi.set(__self__, "content_key_location_from_header_enabled", content_key_location_from_header_enabled) + _setter("content_key_location_from_header_enabled", content_key_location_from_header_enabled) if content_key_location_from_key_id is not None: - pulumi.set(__self__, "content_key_location_from_key_id", content_key_location_from_key_id) + _setter("content_key_location_from_key_id", content_key_location_from_key_id) if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if expiration_date is not None: - pulumi.set(__self__, "expiration_date", expiration_date) + _setter("expiration_date", expiration_date) if grace_period is not None: - pulumi.set(__self__, "grace_period", grace_period) + _setter("grace_period", grace_period) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if play_right is not None: - pulumi.set(__self__, "play_right", play_right) + _setter("play_right", play_right) if relative_begin_date is not None: - pulumi.set(__self__, "relative_begin_date", relative_begin_date) + _setter("relative_begin_date", relative_begin_date) if relative_expiration_date is not None: - pulumi.set(__self__, "relative_expiration_date", relative_expiration_date) + _setter("relative_expiration_date", relative_expiration_date) if security_level is not None: - pulumi.set(__self__, "security_level", security_level) + _setter("security_level", security_level) @property @pulumi.getter(name="allowTestDevices") @@ -983,32 +1257,93 @@ def __init__(__self__, *, :param pulumi.Input[int] uncompressed_digital_audio_opl: Specifies the output protection level for uncompressed digital audio. Supported values are `100`, `150`, `200`, `250` or `300`. :param pulumi.Input[int] uncompressed_digital_video_opl: Specifies the output protection level for uncompressed digital video. Supported values are `100`, `250`, `270` or `300`. """ + ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + agc_and_color_stripe_restriction=agc_and_color_stripe_restriction, + allow_passing_video_content_to_unknown_output=allow_passing_video_content_to_unknown_output, + analog_video_opl=analog_video_opl, + compressed_digital_audio_opl=compressed_digital_audio_opl, + compressed_digital_video_opl=compressed_digital_video_opl, + digital_video_only_content_restriction=digital_video_only_content_restriction, + explicit_analog_television_output_restriction=explicit_analog_television_output_restriction, + first_play_expiration=first_play_expiration, + image_constraint_for_analog_component_video_restriction=image_constraint_for_analog_component_video_restriction, + image_constraint_for_analog_computer_monitor_restriction=image_constraint_for_analog_computer_monitor_restriction, + scms_restriction=scms_restriction, + uncompressed_digital_audio_opl=uncompressed_digital_audio_opl, + uncompressed_digital_video_opl=uncompressed_digital_video_opl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + agc_and_color_stripe_restriction: Optional[pulumi.Input[int]] = None, + allow_passing_video_content_to_unknown_output: Optional[pulumi.Input[str]] = None, + analog_video_opl: Optional[pulumi.Input[int]] = None, + compressed_digital_audio_opl: Optional[pulumi.Input[int]] = None, + compressed_digital_video_opl: Optional[pulumi.Input[int]] = None, + digital_video_only_content_restriction: Optional[pulumi.Input[bool]] = None, + explicit_analog_television_output_restriction: Optional[pulumi.Input['ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestrictionArgs']] = None, + first_play_expiration: Optional[pulumi.Input[str]] = None, + image_constraint_for_analog_component_video_restriction: Optional[pulumi.Input[bool]] = None, + image_constraint_for_analog_computer_monitor_restriction: Optional[pulumi.Input[bool]] = None, + scms_restriction: Optional[pulumi.Input[int]] = None, + uncompressed_digital_audio_opl: Optional[pulumi.Input[int]] = None, + uncompressed_digital_video_opl: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if agc_and_color_stripe_restriction is None and 'agcAndColorStripeRestriction' in kwargs: + agc_and_color_stripe_restriction = kwargs['agcAndColorStripeRestriction'] + if allow_passing_video_content_to_unknown_output is None and 'allowPassingVideoContentToUnknownOutput' in kwargs: + allow_passing_video_content_to_unknown_output = kwargs['allowPassingVideoContentToUnknownOutput'] + if analog_video_opl is None and 'analogVideoOpl' in kwargs: + analog_video_opl = kwargs['analogVideoOpl'] + if compressed_digital_audio_opl is None and 'compressedDigitalAudioOpl' in kwargs: + compressed_digital_audio_opl = kwargs['compressedDigitalAudioOpl'] + if compressed_digital_video_opl is None and 'compressedDigitalVideoOpl' in kwargs: + compressed_digital_video_opl = kwargs['compressedDigitalVideoOpl'] + if digital_video_only_content_restriction is None and 'digitalVideoOnlyContentRestriction' in kwargs: + digital_video_only_content_restriction = kwargs['digitalVideoOnlyContentRestriction'] + if explicit_analog_television_output_restriction is None and 'explicitAnalogTelevisionOutputRestriction' in kwargs: + explicit_analog_television_output_restriction = kwargs['explicitAnalogTelevisionOutputRestriction'] + if first_play_expiration is None and 'firstPlayExpiration' in kwargs: + first_play_expiration = kwargs['firstPlayExpiration'] + if image_constraint_for_analog_component_video_restriction is None and 'imageConstraintForAnalogComponentVideoRestriction' in kwargs: + image_constraint_for_analog_component_video_restriction = kwargs['imageConstraintForAnalogComponentVideoRestriction'] + if image_constraint_for_analog_computer_monitor_restriction is None and 'imageConstraintForAnalogComputerMonitorRestriction' in kwargs: + image_constraint_for_analog_computer_monitor_restriction = kwargs['imageConstraintForAnalogComputerMonitorRestriction'] + if scms_restriction is None and 'scmsRestriction' in kwargs: + scms_restriction = kwargs['scmsRestriction'] + if uncompressed_digital_audio_opl is None and 'uncompressedDigitalAudioOpl' in kwargs: + uncompressed_digital_audio_opl = kwargs['uncompressedDigitalAudioOpl'] + if uncompressed_digital_video_opl is None and 'uncompressedDigitalVideoOpl' in kwargs: + uncompressed_digital_video_opl = kwargs['uncompressedDigitalVideoOpl'] + if agc_and_color_stripe_restriction is not None: - pulumi.set(__self__, "agc_and_color_stripe_restriction", agc_and_color_stripe_restriction) + _setter("agc_and_color_stripe_restriction", agc_and_color_stripe_restriction) if allow_passing_video_content_to_unknown_output is not None: - pulumi.set(__self__, "allow_passing_video_content_to_unknown_output", allow_passing_video_content_to_unknown_output) + _setter("allow_passing_video_content_to_unknown_output", allow_passing_video_content_to_unknown_output) if analog_video_opl is not None: - pulumi.set(__self__, "analog_video_opl", analog_video_opl) + _setter("analog_video_opl", analog_video_opl) if compressed_digital_audio_opl is not None: - pulumi.set(__self__, "compressed_digital_audio_opl", compressed_digital_audio_opl) + _setter("compressed_digital_audio_opl", compressed_digital_audio_opl) if compressed_digital_video_opl is not None: - pulumi.set(__self__, "compressed_digital_video_opl", compressed_digital_video_opl) + _setter("compressed_digital_video_opl", compressed_digital_video_opl) if digital_video_only_content_restriction is not None: - pulumi.set(__self__, "digital_video_only_content_restriction", digital_video_only_content_restriction) + _setter("digital_video_only_content_restriction", digital_video_only_content_restriction) if explicit_analog_television_output_restriction is not None: - pulumi.set(__self__, "explicit_analog_television_output_restriction", explicit_analog_television_output_restriction) + _setter("explicit_analog_television_output_restriction", explicit_analog_television_output_restriction) if first_play_expiration is not None: - pulumi.set(__self__, "first_play_expiration", first_play_expiration) + _setter("first_play_expiration", first_play_expiration) if image_constraint_for_analog_component_video_restriction is not None: - pulumi.set(__self__, "image_constraint_for_analog_component_video_restriction", image_constraint_for_analog_component_video_restriction) + _setter("image_constraint_for_analog_component_video_restriction", image_constraint_for_analog_component_video_restriction) if image_constraint_for_analog_computer_monitor_restriction is not None: - pulumi.set(__self__, "image_constraint_for_analog_computer_monitor_restriction", image_constraint_for_analog_computer_monitor_restriction) + _setter("image_constraint_for_analog_computer_monitor_restriction", image_constraint_for_analog_computer_monitor_restriction) if scms_restriction is not None: - pulumi.set(__self__, "scms_restriction", scms_restriction) + _setter("scms_restriction", scms_restriction) if uncompressed_digital_audio_opl is not None: - pulumi.set(__self__, "uncompressed_digital_audio_opl", uncompressed_digital_audio_opl) + _setter("uncompressed_digital_audio_opl", uncompressed_digital_audio_opl) if uncompressed_digital_video_opl is not None: - pulumi.set(__self__, "uncompressed_digital_video_opl", uncompressed_digital_video_opl) + _setter("uncompressed_digital_video_opl", uncompressed_digital_video_opl) @property @pulumi.getter(name="agcAndColorStripeRestriction") @@ -1176,9 +1511,28 @@ def __init__(__self__, *, :param pulumi.Input[int] control_bits: The restriction control bits. Possible value is integer between `0` and `3` inclusive. :param pulumi.Input[bool] best_effort_enforced: Indicates whether this restriction is enforced on a best effort basis. Possible values are `true` or `false`. Defaults to `false`. """ - pulumi.set(__self__, "control_bits", control_bits) + ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + control_bits=control_bits, + best_effort_enforced=best_effort_enforced, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + control_bits: Optional[pulumi.Input[int]] = None, + best_effort_enforced: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if control_bits is None and 'controlBits' in kwargs: + control_bits = kwargs['controlBits'] + if control_bits is None: + raise TypeError("Missing 'control_bits' argument") + if best_effort_enforced is None and 'bestEffortEnforced' in kwargs: + best_effort_enforced = kwargs['bestEffortEnforced'] + + _setter("control_bits", control_bits) if best_effort_enforced is not None: - pulumi.set(__self__, "best_effort_enforced", best_effort_enforced) + _setter("best_effort_enforced", best_effort_enforced) @property @pulumi.getter(name="controlBits") @@ -1232,26 +1586,71 @@ def __init__(__self__, *, > **NOTE:** Each token_restriction can only have one type of primary verification key: if you want to use RSA you must provide `primary_rsa_token_key_exponent` and `primary_rsa_token_key_modulus`, if you want to use symmetric you need to provide `primary_symmetric_token_key` and for x509 you must provide `primary_x509_token_key_raw`. For more information about Token access please refer to """ + ContentKeyPolicyPolicyOptionTokenRestrictionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + alternate_keys=alternate_keys, + audience=audience, + issuer=issuer, + open_id_connect_discovery_document=open_id_connect_discovery_document, + primary_rsa_token_key_exponent=primary_rsa_token_key_exponent, + primary_rsa_token_key_modulus=primary_rsa_token_key_modulus, + primary_symmetric_token_key=primary_symmetric_token_key, + primary_x509_token_key_raw=primary_x509_token_key_raw, + required_claims=required_claims, + token_type=token_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alternate_keys: Optional[pulumi.Input[Sequence[pulumi.Input['ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs']]]] = None, + audience: Optional[pulumi.Input[str]] = None, + issuer: Optional[pulumi.Input[str]] = None, + open_id_connect_discovery_document: Optional[pulumi.Input[str]] = None, + primary_rsa_token_key_exponent: Optional[pulumi.Input[str]] = None, + primary_rsa_token_key_modulus: Optional[pulumi.Input[str]] = None, + primary_symmetric_token_key: Optional[pulumi.Input[str]] = None, + primary_x509_token_key_raw: Optional[pulumi.Input[str]] = None, + required_claims: Optional[pulumi.Input[Sequence[pulumi.Input['ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArgs']]]] = None, + token_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alternate_keys is None and 'alternateKeys' in kwargs: + alternate_keys = kwargs['alternateKeys'] + if open_id_connect_discovery_document is None and 'openIdConnectDiscoveryDocument' in kwargs: + open_id_connect_discovery_document = kwargs['openIdConnectDiscoveryDocument'] + if primary_rsa_token_key_exponent is None and 'primaryRsaTokenKeyExponent' in kwargs: + primary_rsa_token_key_exponent = kwargs['primaryRsaTokenKeyExponent'] + if primary_rsa_token_key_modulus is None and 'primaryRsaTokenKeyModulus' in kwargs: + primary_rsa_token_key_modulus = kwargs['primaryRsaTokenKeyModulus'] + if primary_symmetric_token_key is None and 'primarySymmetricTokenKey' in kwargs: + primary_symmetric_token_key = kwargs['primarySymmetricTokenKey'] + if primary_x509_token_key_raw is None and 'primaryX509TokenKeyRaw' in kwargs: + primary_x509_token_key_raw = kwargs['primaryX509TokenKeyRaw'] + if required_claims is None and 'requiredClaims' in kwargs: + required_claims = kwargs['requiredClaims'] + if token_type is None and 'tokenType' in kwargs: + token_type = kwargs['tokenType'] + if alternate_keys is not None: - pulumi.set(__self__, "alternate_keys", alternate_keys) + _setter("alternate_keys", alternate_keys) if audience is not None: - pulumi.set(__self__, "audience", audience) + _setter("audience", audience) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if open_id_connect_discovery_document is not None: - pulumi.set(__self__, "open_id_connect_discovery_document", open_id_connect_discovery_document) + _setter("open_id_connect_discovery_document", open_id_connect_discovery_document) if primary_rsa_token_key_exponent is not None: - pulumi.set(__self__, "primary_rsa_token_key_exponent", primary_rsa_token_key_exponent) + _setter("primary_rsa_token_key_exponent", primary_rsa_token_key_exponent) if primary_rsa_token_key_modulus is not None: - pulumi.set(__self__, "primary_rsa_token_key_modulus", primary_rsa_token_key_modulus) + _setter("primary_rsa_token_key_modulus", primary_rsa_token_key_modulus) if primary_symmetric_token_key is not None: - pulumi.set(__self__, "primary_symmetric_token_key", primary_symmetric_token_key) + _setter("primary_symmetric_token_key", primary_symmetric_token_key) if primary_x509_token_key_raw is not None: - pulumi.set(__self__, "primary_x509_token_key_raw", primary_x509_token_key_raw) + _setter("primary_x509_token_key_raw", primary_x509_token_key_raw) if required_claims is not None: - pulumi.set(__self__, "required_claims", required_claims) + _setter("required_claims", required_claims) if token_type is not None: - pulumi.set(__self__, "token_type", token_type) + _setter("token_type", token_type) @property @pulumi.getter(name="alternateKeys") @@ -1391,14 +1790,39 @@ def __init__(__self__, *, > **NOTE:** Each `alternate_key` block can only have one type of primary verification key: if you want to use RSA you must provide `rsa_token_key_exponent` and `rsa_token_key_modulus`, if you want to use symmetric you need to provide `symmetric_token_key` and for x509 you must provide `x509_token_key_raw`. """ + ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + rsa_token_key_exponent=rsa_token_key_exponent, + rsa_token_key_modulus=rsa_token_key_modulus, + symmetric_token_key=symmetric_token_key, + x509_token_key_raw=x509_token_key_raw, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rsa_token_key_exponent: Optional[pulumi.Input[str]] = None, + rsa_token_key_modulus: Optional[pulumi.Input[str]] = None, + symmetric_token_key: Optional[pulumi.Input[str]] = None, + x509_token_key_raw: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rsa_token_key_exponent is None and 'rsaTokenKeyExponent' in kwargs: + rsa_token_key_exponent = kwargs['rsaTokenKeyExponent'] + if rsa_token_key_modulus is None and 'rsaTokenKeyModulus' in kwargs: + rsa_token_key_modulus = kwargs['rsaTokenKeyModulus'] + if symmetric_token_key is None and 'symmetricTokenKey' in kwargs: + symmetric_token_key = kwargs['symmetricTokenKey'] + if x509_token_key_raw is None and 'x509TokenKeyRaw' in kwargs: + x509_token_key_raw = kwargs['x509TokenKeyRaw'] + if rsa_token_key_exponent is not None: - pulumi.set(__self__, "rsa_token_key_exponent", rsa_token_key_exponent) + _setter("rsa_token_key_exponent", rsa_token_key_exponent) if rsa_token_key_modulus is not None: - pulumi.set(__self__, "rsa_token_key_modulus", rsa_token_key_modulus) + _setter("rsa_token_key_modulus", rsa_token_key_modulus) if symmetric_token_key is not None: - pulumi.set(__self__, "symmetric_token_key", symmetric_token_key) + _setter("symmetric_token_key", symmetric_token_key) if x509_token_key_raw is not None: - pulumi.set(__self__, "x509_token_key_raw", x509_token_key_raw) + _setter("x509_token_key_raw", x509_token_key_raw) @property @pulumi.getter(name="rsaTokenKeyExponent") @@ -1460,10 +1884,23 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Token claim type. :param pulumi.Input[str] value: Token claim value. """ + ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -1499,9 +1936,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the input Asset. Changing this forces a new Media Job to be created. :param pulumi.Input[str] label: A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + JobInputAssetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + label=label, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) @property @pulumi.getter @@ -1537,9 +1989,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the output Asset. Changing this forces a new Media Job to be created. :param pulumi.Input[str] label: A label that is assigned to a JobOutput in order to help uniquely identify it. This is useful when your Transform has more than one TransformOutput, whereby your Job has more than one JobOutput. In such cases, when you submit the Job, you will add two or more JobOutputs, in the same order as TransformOutputs in the Transform. Subsequently, when you retrieve the Job, either through events or on a GET request, you can use the label to easily identify the JobOutput. If a label is not provided, a default value of '{presetName}_{outputIndex}' will be used, where the preset name is the name of the preset in the corresponding TransformOutput and the output index is the relative index of the this JobOutput within the Job. Note that this index is the same as the relative index of the corresponding TransformOutput within its Transform. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + JobOutputAssetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + label=label, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) @property @pulumi.getter @@ -1575,10 +2042,27 @@ def __init__(__self__, *, :param pulumi.Input[str] client_access_policy: The content of clientaccesspolicy.xml used by Silverlight. :param pulumi.Input[str] cross_domain_policy: The content of the Cross Domain Policy (`crossdomain.xml`). """ + LiveEventCrossSiteAccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_access_policy=client_access_policy, + cross_domain_policy=cross_domain_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_access_policy: Optional[pulumi.Input[str]] = None, + cross_domain_policy: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_access_policy is None and 'clientAccessPolicy' in kwargs: + client_access_policy = kwargs['clientAccessPolicy'] + if cross_domain_policy is None and 'crossDomainPolicy' in kwargs: + cross_domain_policy = kwargs['crossDomainPolicy'] + if client_access_policy is not None: - pulumi.set(__self__, "client_access_policy", client_access_policy) + _setter("client_access_policy", client_access_policy) if cross_domain_policy is not None: - pulumi.set(__self__, "cross_domain_policy", cross_domain_policy) + _setter("cross_domain_policy", cross_domain_policy) @property @pulumi.getter(name="clientAccessPolicy") @@ -1620,14 +2104,37 @@ def __init__(__self__, *, > [More information can be found in the Microsoft Documentation](https://go.microsoft.com/fwlink/?linkid=2095101). """ + LiveEventEncodingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_frame_interval=key_frame_interval, + preset_name=preset_name, + stretch_mode=stretch_mode, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_frame_interval: Optional[pulumi.Input[str]] = None, + preset_name: Optional[pulumi.Input[str]] = None, + stretch_mode: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_frame_interval is None and 'keyFrameInterval' in kwargs: + key_frame_interval = kwargs['keyFrameInterval'] + if preset_name is None and 'presetName' in kwargs: + preset_name = kwargs['presetName'] + if stretch_mode is None and 'stretchMode' in kwargs: + stretch_mode = kwargs['stretchMode'] + if key_frame_interval is not None: - pulumi.set(__self__, "key_frame_interval", key_frame_interval) + _setter("key_frame_interval", key_frame_interval) if preset_name is not None: - pulumi.set(__self__, "preset_name", preset_name) + _setter("preset_name", preset_name) if stretch_mode is not None: - pulumi.set(__self__, "stretch_mode", stretch_mode) + _setter("stretch_mode", stretch_mode) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="keyFrameInterval") @@ -1694,16 +2201,43 @@ def __init__(__self__, *, :param pulumi.Input[str] key_frame_interval_duration: ISO 8601 time duration of the key frame interval duration of the input. This value sets the `EXT-X-TARGETDURATION` property in the HLS output. For example, use PT2S to indicate 2 seconds. This field cannot be set when `type` is set to `Encoding`. :param pulumi.Input[str] streaming_protocol: The input protocol for the live event. Allowed values are `FragmentedMP4` and `RTMP`. Changing this forces a new resource to be created. """ + LiveEventInputArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_token=access_token, + endpoints=endpoints, + ip_access_control_allows=ip_access_control_allows, + key_frame_interval_duration=key_frame_interval_duration, + streaming_protocol=streaming_protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_token: Optional[pulumi.Input[str]] = None, + endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['LiveEventInputEndpointArgs']]]] = None, + ip_access_control_allows: Optional[pulumi.Input[Sequence[pulumi.Input['LiveEventInputIpAccessControlAllowArgs']]]] = None, + key_frame_interval_duration: Optional[pulumi.Input[str]] = None, + streaming_protocol: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_token is None and 'accessToken' in kwargs: + access_token = kwargs['accessToken'] + if ip_access_control_allows is None and 'ipAccessControlAllows' in kwargs: + ip_access_control_allows = kwargs['ipAccessControlAllows'] + if key_frame_interval_duration is None and 'keyFrameIntervalDuration' in kwargs: + key_frame_interval_duration = kwargs['keyFrameIntervalDuration'] + if streaming_protocol is None and 'streamingProtocol' in kwargs: + streaming_protocol = kwargs['streamingProtocol'] + if access_token is not None: - pulumi.set(__self__, "access_token", access_token) + _setter("access_token", access_token) if endpoints is not None: - pulumi.set(__self__, "endpoints", endpoints) + _setter("endpoints", endpoints) if ip_access_control_allows is not None: - pulumi.set(__self__, "ip_access_control_allows", ip_access_control_allows) + _setter("ip_access_control_allows", ip_access_control_allows) if key_frame_interval_duration is not None: - pulumi.set(__self__, "key_frame_interval_duration", key_frame_interval_duration) + _setter("key_frame_interval_duration", key_frame_interval_duration) if streaming_protocol is not None: - pulumi.set(__self__, "streaming_protocol", streaming_protocol) + _setter("streaming_protocol", streaming_protocol) @property @pulumi.getter(name="accessToken") @@ -1768,10 +2302,23 @@ class LiveEventInputEndpointArgs: def __init__(__self__, *, protocol: Optional[pulumi.Input[str]] = None, url: Optional[pulumi.Input[str]] = None): + LiveEventInputEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter @@ -1803,12 +2350,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The friendly name for the IP address range. :param pulumi.Input[int] subnet_prefix_length: The subnet mask prefix length (see CIDR notation). """ + LiveEventInputIpAccessControlAllowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + name=name, + subnet_prefix_length=subnet_prefix_length, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + subnet_prefix_length: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_prefix_length is None and 'subnetPrefixLength' in kwargs: + subnet_prefix_length = kwargs['subnetPrefixLength'] + if address is not None: - pulumi.set(__self__, "address", address) + _setter("address", address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subnet_prefix_length is not None: - pulumi.set(__self__, "subnet_prefix_length", subnet_prefix_length) + _setter("subnet_prefix_length", subnet_prefix_length) @property @pulumi.getter @@ -1861,16 +2425,43 @@ def __init__(__self__, *, :param pulumi.Input[str] preview_locator: The identifier of the preview locator in GUID format. Specifying this at creation time allows the caller to know the preview locator url before the event is created. If omitted, the service will generate a random identifier. Changing this forces a new resource to be created. :param pulumi.Input[str] streaming_policy_name: The name of streaming policy used for the live event preview. Changing this forces a new resource to be created. """ + LiveEventPreviewArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + alternative_media_id=alternative_media_id, + endpoints=endpoints, + ip_access_control_allows=ip_access_control_allows, + preview_locator=preview_locator, + streaming_policy_name=streaming_policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alternative_media_id: Optional[pulumi.Input[str]] = None, + endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['LiveEventPreviewEndpointArgs']]]] = None, + ip_access_control_allows: Optional[pulumi.Input[Sequence[pulumi.Input['LiveEventPreviewIpAccessControlAllowArgs']]]] = None, + preview_locator: Optional[pulumi.Input[str]] = None, + streaming_policy_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alternative_media_id is None and 'alternativeMediaId' in kwargs: + alternative_media_id = kwargs['alternativeMediaId'] + if ip_access_control_allows is None and 'ipAccessControlAllows' in kwargs: + ip_access_control_allows = kwargs['ipAccessControlAllows'] + if preview_locator is None and 'previewLocator' in kwargs: + preview_locator = kwargs['previewLocator'] + if streaming_policy_name is None and 'streamingPolicyName' in kwargs: + streaming_policy_name = kwargs['streamingPolicyName'] + if alternative_media_id is not None: - pulumi.set(__self__, "alternative_media_id", alternative_media_id) + _setter("alternative_media_id", alternative_media_id) if endpoints is not None: - pulumi.set(__self__, "endpoints", endpoints) + _setter("endpoints", endpoints) if ip_access_control_allows is not None: - pulumi.set(__self__, "ip_access_control_allows", ip_access_control_allows) + _setter("ip_access_control_allows", ip_access_control_allows) if preview_locator is not None: - pulumi.set(__self__, "preview_locator", preview_locator) + _setter("preview_locator", preview_locator) if streaming_policy_name is not None: - pulumi.set(__self__, "streaming_policy_name", streaming_policy_name) + _setter("streaming_policy_name", streaming_policy_name) @property @pulumi.getter(name="alternativeMediaId") @@ -1935,10 +2526,23 @@ class LiveEventPreviewEndpointArgs: def __init__(__self__, *, protocol: Optional[pulumi.Input[str]] = None, url: Optional[pulumi.Input[str]] = None): + LiveEventPreviewEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter @@ -1970,12 +2574,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The friendly name for the IP address range. :param pulumi.Input[int] subnet_prefix_length: The subnet mask prefix length (see CIDR notation). """ + LiveEventPreviewIpAccessControlAllowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + name=name, + subnet_prefix_length=subnet_prefix_length, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + subnet_prefix_length: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_prefix_length is None and 'subnetPrefixLength' in kwargs: + subnet_prefix_length = kwargs['subnetPrefixLength'] + if address is not None: - pulumi.set(__self__, "address", address) + _setter("address", address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subnet_prefix_length is not None: - pulumi.set(__self__, "subnet_prefix_length", subnet_prefix_length) + _setter("subnet_prefix_length", subnet_prefix_length) @property @pulumi.getter @@ -2027,14 +2648,37 @@ def __init__(__self__, *, :param pulumi.Input['ServiceAccountEncryptionManagedIdentityArgs'] managed_identity: A `managed_identity` block as defined below. :param pulumi.Input[str] type: Specifies the type of key used to encrypt the account data. Possible values are `SystemKey` and `CustomerKey`. """ + ServiceAccountEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + current_key_identifier=current_key_identifier, + key_vault_key_identifier=key_vault_key_identifier, + managed_identity=managed_identity, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + current_key_identifier: Optional[pulumi.Input[str]] = None, + key_vault_key_identifier: Optional[pulumi.Input[str]] = None, + managed_identity: Optional[pulumi.Input['ServiceAccountEncryptionManagedIdentityArgs']] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if current_key_identifier is None and 'currentKeyIdentifier' in kwargs: + current_key_identifier = kwargs['currentKeyIdentifier'] + if key_vault_key_identifier is None and 'keyVaultKeyIdentifier' in kwargs: + key_vault_key_identifier = kwargs['keyVaultKeyIdentifier'] + if managed_identity is None and 'managedIdentity' in kwargs: + managed_identity = kwargs['managedIdentity'] + if current_key_identifier is not None: - pulumi.set(__self__, "current_key_identifier", current_key_identifier) + _setter("current_key_identifier", current_key_identifier) if key_vault_key_identifier is not None: - pulumi.set(__self__, "key_vault_key_identifier", key_vault_key_identifier) + _setter("key_vault_key_identifier", key_vault_key_identifier) if managed_identity is not None: - pulumi.set(__self__, "managed_identity", managed_identity) + _setter("managed_identity", managed_identity) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="currentKeyIdentifier") @@ -2094,10 +2738,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_system_assigned_identity: Whether to use System Assigned Identity. Possible Values are `true` and `false`. :param pulumi.Input[str] user_assigned_identity_id: The ID of the User Assigned Identity. This value can only be set when `use_system_assigned_identity` is `false` """ + ServiceAccountEncryptionManagedIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + use_system_assigned_identity=use_system_assigned_identity, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + use_system_assigned_identity: Optional[pulumi.Input[bool]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if use_system_assigned_identity is None and 'useSystemAssignedIdentity' in kwargs: + use_system_assigned_identity = kwargs['useSystemAssignedIdentity'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if use_system_assigned_identity is not None: - pulumi.set(__self__, "use_system_assigned_identity", use_system_assigned_identity) + _setter("use_system_assigned_identity", use_system_assigned_identity) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="useSystemAssignedIdentity") @@ -2137,13 +2798,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ServiceAccountIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -2203,10 +2889,27 @@ def __init__(__self__, *, :param pulumi.Input[str] default_action: The Default Action to use when no rules match from `ip_allow_list`. Possible values are `Allow` and `Deny`. :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_allow_lists: One or more IP Addresses, or CIDR Blocks which should be able to access the Key Delivery. """ + ServiceAccountKeyDeliveryAccessControlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_allow_lists=ip_allow_lists, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + ip_allow_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_allow_lists is None and 'ipAllowLists' in kwargs: + ip_allow_lists = kwargs['ipAllowLists'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_allow_lists is not None: - pulumi.set(__self__, "ip_allow_lists", ip_allow_lists) + _setter("ip_allow_lists", ip_allow_lists) @property @pulumi.getter(name="defaultAction") @@ -2246,11 +2949,32 @@ def __init__(__self__, *, > **NOTE:** Whilst multiple `storage_account` blocks can be specified - one of them must be set to the primary :param pulumi.Input['ServiceAccountStorageAccountManagedIdentityArgs'] managed_identity: A `managed_identity` block as defined below. """ - pulumi.set(__self__, "id", id) + ServiceAccountStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + is_primary=is_primary, + managed_identity=managed_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + is_primary: Optional[pulumi.Input[bool]] = None, + managed_identity: Optional[pulumi.Input['ServiceAccountStorageAccountManagedIdentityArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if is_primary is None and 'isPrimary' in kwargs: + is_primary = kwargs['isPrimary'] + if managed_identity is None and 'managedIdentity' in kwargs: + managed_identity = kwargs['managedIdentity'] + + _setter("id", id) if is_primary is not None: - pulumi.set(__self__, "is_primary", is_primary) + _setter("is_primary", is_primary) if managed_identity is not None: - pulumi.set(__self__, "managed_identity", managed_identity) + _setter("managed_identity", managed_identity) @property @pulumi.getter @@ -2300,10 +3024,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_system_assigned_identity: Whether to use System Assigned Identity. Possible Values are `true` and `false`. :param pulumi.Input[str] user_assigned_identity_id: The ID of the User Assigned Identity. This value can only be set when `use_system_assigned_identity` is `false` """ + ServiceAccountStorageAccountManagedIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + use_system_assigned_identity=use_system_assigned_identity, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + use_system_assigned_identity: Optional[pulumi.Input[bool]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if use_system_assigned_identity is None and 'useSystemAssignedIdentity' in kwargs: + use_system_assigned_identity = kwargs['useSystemAssignedIdentity'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if use_system_assigned_identity is not None: - pulumi.set(__self__, "use_system_assigned_identity", use_system_assigned_identity) + _setter("use_system_assigned_identity", use_system_assigned_identity) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="useSystemAssignedIdentity") @@ -2339,10 +3080,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['StreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyArgs']]] akamai_signature_header_authentication_keys: One or more `akamai_signature_header_authentication_key` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['StreamingEndpointAccessControlIpAllowArgs']]] ip_allows: A `ip_allow` block as defined below. """ + StreamingEndpointAccessControlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + akamai_signature_header_authentication_keys=akamai_signature_header_authentication_keys, + ip_allows=ip_allows, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + akamai_signature_header_authentication_keys: Optional[pulumi.Input[Sequence[pulumi.Input['StreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyArgs']]]] = None, + ip_allows: Optional[pulumi.Input[Sequence[pulumi.Input['StreamingEndpointAccessControlIpAllowArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if akamai_signature_header_authentication_keys is None and 'akamaiSignatureHeaderAuthenticationKeys' in kwargs: + akamai_signature_header_authentication_keys = kwargs['akamaiSignatureHeaderAuthenticationKeys'] + if ip_allows is None and 'ipAllows' in kwargs: + ip_allows = kwargs['ipAllows'] + if akamai_signature_header_authentication_keys is not None: - pulumi.set(__self__, "akamai_signature_header_authentication_keys", akamai_signature_header_authentication_keys) + _setter("akamai_signature_header_authentication_keys", akamai_signature_header_authentication_keys) if ip_allows is not None: - pulumi.set(__self__, "ip_allows", ip_allows) + _setter("ip_allows", ip_allows) @property @pulumi.getter(name="akamaiSignatureHeaderAuthenticationKeys") @@ -2380,12 +3138,29 @@ def __init__(__self__, *, :param pulumi.Input[str] expiration: The expiration time of the authentication key. :param pulumi.Input[str] identifier: Identifier of the key. """ + StreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + base64_key=base64_key, + expiration=expiration, + identifier=identifier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + base64_key: Optional[pulumi.Input[str]] = None, + expiration: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if base64_key is None and 'base64Key' in kwargs: + base64_key = kwargs['base64Key'] + if base64_key is not None: - pulumi.set(__self__, "base64_key", base64_key) + _setter("base64_key", base64_key) if expiration is not None: - pulumi.set(__self__, "expiration", expiration) + _setter("expiration", expiration) if identifier is not None: - pulumi.set(__self__, "identifier", identifier) + _setter("identifier", identifier) @property @pulumi.getter(name="base64Key") @@ -2435,12 +3210,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The friendly name for the IP address range. :param pulumi.Input[int] subnet_prefix_length: The subnet mask prefix length (see CIDR notation). """ + StreamingEndpointAccessControlIpAllowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + name=name, + subnet_prefix_length=subnet_prefix_length, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + subnet_prefix_length: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_prefix_length is None and 'subnetPrefixLength' in kwargs: + subnet_prefix_length = kwargs['subnetPrefixLength'] + if address is not None: - pulumi.set(__self__, "address", address) + _setter("address", address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subnet_prefix_length is not None: - pulumi.set(__self__, "subnet_prefix_length", subnet_prefix_length) + _setter("subnet_prefix_length", subnet_prefix_length) @property @pulumi.getter @@ -2488,10 +3280,27 @@ def __init__(__self__, *, :param pulumi.Input[str] client_access_policy: The content of `clientaccesspolicy.xml` used by Silverlight. :param pulumi.Input[str] cross_domain_policy: The content of `crossdomain.xml` used by Silverlight. """ + StreamingEndpointCrossSiteAccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_access_policy=client_access_policy, + cross_domain_policy=cross_domain_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_access_policy: Optional[pulumi.Input[str]] = None, + cross_domain_policy: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_access_policy is None and 'clientAccessPolicy' in kwargs: + client_access_policy = kwargs['clientAccessPolicy'] + if cross_domain_policy is None and 'crossDomainPolicy' in kwargs: + cross_domain_policy = kwargs['crossDomainPolicy'] + if client_access_policy is not None: - pulumi.set(__self__, "client_access_policy", client_access_policy) + _setter("client_access_policy", client_access_policy) if cross_domain_policy is not None: - pulumi.set(__self__, "cross_domain_policy", cross_domain_policy) + _setter("cross_domain_policy", cross_domain_policy) @property @pulumi.getter(name="clientAccessPolicy") @@ -2527,10 +3336,23 @@ def __init__(__self__, *, :param pulumi.Input[int] capacity: The sku capacity of Streaming Endpoint. :param pulumi.Input[str] name: The name which should be used for this Streaming Endpoint maximum length is `24`. Changing this forces a new Streaming Endpoint to be created. """ + StreamingEndpointSkusArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -2572,16 +3394,41 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Encryption type of Content Key. Supported values are `CommonEncryptionCbcs`, `CommonEncryptionCenc` or `EnvelopeEncryption`. Changing this forces a new Streaming Locator to be created. :param pulumi.Input[str] value: Value of Content Key. Changing this forces a new Streaming Locator to be created. """ + StreamingLocatorContentKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_key_id=content_key_id, + label_reference_in_streaming_policy=label_reference_in_streaming_policy, + policy_name=policy_name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_key_id: Optional[pulumi.Input[str]] = None, + label_reference_in_streaming_policy: Optional[pulumi.Input[str]] = None, + policy_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_key_id is None and 'contentKeyId' in kwargs: + content_key_id = kwargs['contentKeyId'] + if label_reference_in_streaming_policy is None and 'labelReferenceInStreamingPolicy' in kwargs: + label_reference_in_streaming_policy = kwargs['labelReferenceInStreamingPolicy'] + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if content_key_id is not None: - pulumi.set(__self__, "content_key_id", content_key_id) + _setter("content_key_id", content_key_id) if label_reference_in_streaming_policy is not None: - pulumi.set(__self__, "label_reference_in_streaming_policy", label_reference_in_streaming_policy) + _setter("label_reference_in_streaming_policy", label_reference_in_streaming_policy) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="contentKeyId") @@ -2657,14 +3504,39 @@ def __init__(__self__, *, :param pulumi.Input['StreamingPolicyCommonEncryptionCbcsDrmFairplayArgs'] drm_fairplay: A `drm_fairplay` block as defined below. Changing this forces a new Streaming Policy to be created. :param pulumi.Input['StreamingPolicyCommonEncryptionCbcsEnabledProtocolsArgs'] enabled_protocols: A `enabled_protocols` block as defined below. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCbcsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + clear_key_encryption=clear_key_encryption, + default_content_key=default_content_key, + drm_fairplay=drm_fairplay, + enabled_protocols=enabled_protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + clear_key_encryption: Optional[pulumi.Input['StreamingPolicyCommonEncryptionCbcsClearKeyEncryptionArgs']] = None, + default_content_key: Optional[pulumi.Input['StreamingPolicyCommonEncryptionCbcsDefaultContentKeyArgs']] = None, + drm_fairplay: Optional[pulumi.Input['StreamingPolicyCommonEncryptionCbcsDrmFairplayArgs']] = None, + enabled_protocols: Optional[pulumi.Input['StreamingPolicyCommonEncryptionCbcsEnabledProtocolsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if clear_key_encryption is None and 'clearKeyEncryption' in kwargs: + clear_key_encryption = kwargs['clearKeyEncryption'] + if default_content_key is None and 'defaultContentKey' in kwargs: + default_content_key = kwargs['defaultContentKey'] + if drm_fairplay is None and 'drmFairplay' in kwargs: + drm_fairplay = kwargs['drmFairplay'] + if enabled_protocols is None and 'enabledProtocols' in kwargs: + enabled_protocols = kwargs['enabledProtocols'] + if clear_key_encryption is not None: - pulumi.set(__self__, "clear_key_encryption", clear_key_encryption) + _setter("clear_key_encryption", clear_key_encryption) if default_content_key is not None: - pulumi.set(__self__, "default_content_key", default_content_key) + _setter("default_content_key", default_content_key) if drm_fairplay is not None: - pulumi.set(__self__, "drm_fairplay", drm_fairplay) + _setter("drm_fairplay", drm_fairplay) if enabled_protocols is not None: - pulumi.set(__self__, "enabled_protocols", enabled_protocols) + _setter("enabled_protocols", enabled_protocols) @property @pulumi.getter(name="clearKeyEncryption") @@ -2724,7 +3596,22 @@ def __init__(__self__, *, > **Note** Either `clear_key_encryption` or `drm` must be specified. """ - pulumi.set(__self__, "custom_keys_acquisition_url_template", custom_keys_acquisition_url_template) + StreamingPolicyCommonEncryptionCbcsClearKeyEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_keys_acquisition_url_template=custom_keys_acquisition_url_template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_keys_acquisition_url_template: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_keys_acquisition_url_template is None and 'customKeysAcquisitionUrlTemplate' in kwargs: + custom_keys_acquisition_url_template = kwargs['customKeysAcquisitionUrlTemplate'] + if custom_keys_acquisition_url_template is None: + raise TypeError("Missing 'custom_keys_acquisition_url_template' argument") + + _setter("custom_keys_acquisition_url_template", custom_keys_acquisition_url_template) @property @pulumi.getter(name="customKeysAcquisitionUrlTemplate") @@ -2750,10 +3637,25 @@ def __init__(__self__, *, :param pulumi.Input[str] label: Label can be used to specify Content Key when creating a Streaming Locator. Changing this forces a new Streaming Policy to be created. :param pulumi.Input[str] policy_name: Policy used by Default Key. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCbcsDefaultContentKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + policy_name=policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[pulumi.Input[str]] = None, + policy_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) @property @pulumi.getter @@ -2789,10 +3691,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] allow_persistent_license: All license to be persistent or not. Changing this forces a new Streaming Policy to be created. :param pulumi.Input[str] custom_license_acquisition_url_template: The URL template for the custom service that delivers licenses to the end user. This is not required when using Azure Media Services for issuing licenses. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCbcsDrmFairplayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_persistent_license=allow_persistent_license, + custom_license_acquisition_url_template=custom_license_acquisition_url_template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_persistent_license: Optional[pulumi.Input[bool]] = None, + custom_license_acquisition_url_template: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_persistent_license is None and 'allowPersistentLicense' in kwargs: + allow_persistent_license = kwargs['allowPersistentLicense'] + if custom_license_acquisition_url_template is None and 'customLicenseAcquisitionUrlTemplate' in kwargs: + custom_license_acquisition_url_template = kwargs['customLicenseAcquisitionUrlTemplate'] + if allow_persistent_license is not None: - pulumi.set(__self__, "allow_persistent_license", allow_persistent_license) + _setter("allow_persistent_license", allow_persistent_license) if custom_license_acquisition_url_template is not None: - pulumi.set(__self__, "custom_license_acquisition_url_template", custom_license_acquisition_url_template) + _setter("custom_license_acquisition_url_template", custom_license_acquisition_url_template) @property @pulumi.getter(name="allowPersistentLicense") @@ -2832,14 +3751,33 @@ def __init__(__self__, *, :param pulumi.Input[bool] hls: Enable HLS protocol or not. Changing this forces a new Streaming Policy to be created. :param pulumi.Input[bool] smooth_streaming: Enable SmoothStreaming protocol or not. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCbcsEnabledProtocolsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dash=dash, + download=download, + hls=hls, + smooth_streaming=smooth_streaming, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dash: Optional[pulumi.Input[bool]] = None, + download: Optional[pulumi.Input[bool]] = None, + hls: Optional[pulumi.Input[bool]] = None, + smooth_streaming: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if smooth_streaming is None and 'smoothStreaming' in kwargs: + smooth_streaming = kwargs['smoothStreaming'] + if dash is not None: - pulumi.set(__self__, "dash", dash) + _setter("dash", dash) if download is not None: - pulumi.set(__self__, "download", download) + _setter("download", download) if hls is not None: - pulumi.set(__self__, "hls", hls) + _setter("hls", hls) if smooth_streaming is not None: - pulumi.set(__self__, "smooth_streaming", smooth_streaming) + _setter("smooth_streaming", smooth_streaming) @property @pulumi.getter @@ -2909,20 +3847,57 @@ def __init__(__self__, *, :param pulumi.Input[str] drm_widevine_custom_license_acquisition_url_template: The URL template for the custom service that delivers licenses to the end user. This is not required when using Azure Media Services for issuing licenses. Changing this forces a new Streaming Policy to be created. :param pulumi.Input['StreamingPolicyCommonEncryptionCencEnabledProtocolsArgs'] enabled_protocols: A `enabled_protocols` block as defined below. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCencArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + clear_key_encryption=clear_key_encryption, + clear_tracks=clear_tracks, + content_key_to_track_mappings=content_key_to_track_mappings, + default_content_key=default_content_key, + drm_playready=drm_playready, + drm_widevine_custom_license_acquisition_url_template=drm_widevine_custom_license_acquisition_url_template, + enabled_protocols=enabled_protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + clear_key_encryption: Optional[pulumi.Input['StreamingPolicyCommonEncryptionCencClearKeyEncryptionArgs']] = None, + clear_tracks: Optional[pulumi.Input[Sequence[pulumi.Input['StreamingPolicyCommonEncryptionCencClearTrackArgs']]]] = None, + content_key_to_track_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['StreamingPolicyCommonEncryptionCencContentKeyToTrackMappingArgs']]]] = None, + default_content_key: Optional[pulumi.Input['StreamingPolicyCommonEncryptionCencDefaultContentKeyArgs']] = None, + drm_playready: Optional[pulumi.Input['StreamingPolicyCommonEncryptionCencDrmPlayreadyArgs']] = None, + drm_widevine_custom_license_acquisition_url_template: Optional[pulumi.Input[str]] = None, + enabled_protocols: Optional[pulumi.Input['StreamingPolicyCommonEncryptionCencEnabledProtocolsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if clear_key_encryption is None and 'clearKeyEncryption' in kwargs: + clear_key_encryption = kwargs['clearKeyEncryption'] + if clear_tracks is None and 'clearTracks' in kwargs: + clear_tracks = kwargs['clearTracks'] + if content_key_to_track_mappings is None and 'contentKeyToTrackMappings' in kwargs: + content_key_to_track_mappings = kwargs['contentKeyToTrackMappings'] + if default_content_key is None and 'defaultContentKey' in kwargs: + default_content_key = kwargs['defaultContentKey'] + if drm_playready is None and 'drmPlayready' in kwargs: + drm_playready = kwargs['drmPlayready'] + if drm_widevine_custom_license_acquisition_url_template is None and 'drmWidevineCustomLicenseAcquisitionUrlTemplate' in kwargs: + drm_widevine_custom_license_acquisition_url_template = kwargs['drmWidevineCustomLicenseAcquisitionUrlTemplate'] + if enabled_protocols is None and 'enabledProtocols' in kwargs: + enabled_protocols = kwargs['enabledProtocols'] + if clear_key_encryption is not None: - pulumi.set(__self__, "clear_key_encryption", clear_key_encryption) + _setter("clear_key_encryption", clear_key_encryption) if clear_tracks is not None: - pulumi.set(__self__, "clear_tracks", clear_tracks) + _setter("clear_tracks", clear_tracks) if content_key_to_track_mappings is not None: - pulumi.set(__self__, "content_key_to_track_mappings", content_key_to_track_mappings) + _setter("content_key_to_track_mappings", content_key_to_track_mappings) if default_content_key is not None: - pulumi.set(__self__, "default_content_key", default_content_key) + _setter("default_content_key", default_content_key) if drm_playready is not None: - pulumi.set(__self__, "drm_playready", drm_playready) + _setter("drm_playready", drm_playready) if drm_widevine_custom_license_acquisition_url_template is not None: - pulumi.set(__self__, "drm_widevine_custom_license_acquisition_url_template", drm_widevine_custom_license_acquisition_url_template) + _setter("drm_widevine_custom_license_acquisition_url_template", drm_widevine_custom_license_acquisition_url_template) if enabled_protocols is not None: - pulumi.set(__self__, "enabled_protocols", enabled_protocols) + _setter("enabled_protocols", enabled_protocols) @property @pulumi.getter(name="clearKeyEncryption") @@ -3018,7 +3993,22 @@ def __init__(__self__, *, > **Note** Either `clear_key_encryption` or `drm` must be specified. """ - pulumi.set(__self__, "custom_keys_acquisition_url_template", custom_keys_acquisition_url_template) + StreamingPolicyCommonEncryptionCencClearKeyEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_keys_acquisition_url_template=custom_keys_acquisition_url_template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_keys_acquisition_url_template: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_keys_acquisition_url_template is None and 'customKeysAcquisitionUrlTemplate' in kwargs: + custom_keys_acquisition_url_template = kwargs['customKeysAcquisitionUrlTemplate'] + if custom_keys_acquisition_url_template is None: + raise TypeError("Missing 'custom_keys_acquisition_url_template' argument") + + _setter("custom_keys_acquisition_url_template", custom_keys_acquisition_url_template) @property @pulumi.getter(name="customKeysAcquisitionUrlTemplate") @@ -3042,7 +4032,20 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input['StreamingPolicyCommonEncryptionCencClearTrackConditionArgs']]] conditions: One or more `condition` blocks as defined below. Changing this forces a new Streaming Policy to be created. """ - pulumi.set(__self__, "conditions", conditions) + StreamingPolicyCommonEncryptionCencClearTrackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + conditions=conditions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + conditions: Optional[pulumi.Input[Sequence[pulumi.Input['StreamingPolicyCommonEncryptionCencClearTrackConditionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if conditions is None: + raise TypeError("Missing 'conditions' argument") + + _setter("conditions", conditions) @property @pulumi.getter @@ -3068,9 +4071,30 @@ def __init__(__self__, *, :param pulumi.Input[str] property: The track property type. Possible value is `FourCC`. Changing this forces a new Streaming Policy to be created. :param pulumi.Input[str] value: The track property value. Changing this forces a new Streaming Policy to be created. """ - pulumi.set(__self__, "operation", operation) - pulumi.set(__self__, "property", property) - pulumi.set(__self__, "value", value) + StreamingPolicyCommonEncryptionCencClearTrackConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operation=operation, + property=property, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operation: Optional[pulumi.Input[str]] = None, + property: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operation is None: + raise TypeError("Missing 'operation' argument") + if property is None: + raise TypeError("Missing 'property' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("operation", operation) + _setter("property", property) + _setter("value", value) @property @pulumi.getter @@ -3120,11 +4144,30 @@ def __init__(__self__, *, :param pulumi.Input[str] label: Specifies the content key when creating a Streaming Locator. Changing this forces a new Streaming Policy to be created. :param pulumi.Input[str] policy_name: The policy used by the default key. Changing this forces a new Streaming Policy to be created. """ - pulumi.set(__self__, "tracks", tracks) + StreamingPolicyCommonEncryptionCencContentKeyToTrackMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + tracks=tracks, + label=label, + policy_name=policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tracks: Optional[pulumi.Input[Sequence[pulumi.Input['StreamingPolicyCommonEncryptionCencContentKeyToTrackMappingTrackArgs']]]] = None, + label: Optional[pulumi.Input[str]] = None, + policy_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tracks is None: + raise TypeError("Missing 'tracks' argument") + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + + _setter("tracks", tracks) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) @property @pulumi.getter @@ -3170,7 +4213,20 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input['StreamingPolicyCommonEncryptionCencContentKeyToTrackMappingTrackConditionArgs']]] conditions: One or more `condition` blocks as defined below. Changing this forces a new Streaming Policy to be created. """ - pulumi.set(__self__, "conditions", conditions) + StreamingPolicyCommonEncryptionCencContentKeyToTrackMappingTrackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + conditions=conditions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + conditions: Optional[pulumi.Input[Sequence[pulumi.Input['StreamingPolicyCommonEncryptionCencContentKeyToTrackMappingTrackConditionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if conditions is None: + raise TypeError("Missing 'conditions' argument") + + _setter("conditions", conditions) @property @pulumi.getter @@ -3196,9 +4252,30 @@ def __init__(__self__, *, :param pulumi.Input[str] property: The track property type. Possible value is `FourCC`. Changing this forces a new Streaming Policy to be created. :param pulumi.Input[str] value: The track property value. Changing this forces a new Streaming Policy to be created. """ - pulumi.set(__self__, "operation", operation) - pulumi.set(__self__, "property", property) - pulumi.set(__self__, "value", value) + StreamingPolicyCommonEncryptionCencContentKeyToTrackMappingTrackConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operation=operation, + property=property, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operation: Optional[pulumi.Input[str]] = None, + property: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operation is None: + raise TypeError("Missing 'operation' argument") + if property is None: + raise TypeError("Missing 'property' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("operation", operation) + _setter("property", property) + _setter("value", value) @property @pulumi.getter @@ -3246,10 +4323,25 @@ def __init__(__self__, *, :param pulumi.Input[str] label: Label can be used to specify Content Key when creating a Streaming Locator. Changing this forces a new Streaming Policy to be created. :param pulumi.Input[str] policy_name: Policy used by Default Key. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCencDefaultContentKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + policy_name=policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[pulumi.Input[str]] = None, + policy_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) @property @pulumi.getter @@ -3285,10 +4377,27 @@ def __init__(__self__, *, :param pulumi.Input[str] custom_attributes: Custom attributes for PlayReady. Changing this forces a new Streaming Policy to be created. :param pulumi.Input[str] custom_license_acquisition_url_template: The URL template for the custom service that delivers licenses to the end user. This is not required when using Azure Media Services for issuing licenses. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCencDrmPlayreadyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_attributes=custom_attributes, + custom_license_acquisition_url_template=custom_license_acquisition_url_template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_attributes: Optional[pulumi.Input[str]] = None, + custom_license_acquisition_url_template: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if custom_license_acquisition_url_template is None and 'customLicenseAcquisitionUrlTemplate' in kwargs: + custom_license_acquisition_url_template = kwargs['customLicenseAcquisitionUrlTemplate'] + if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if custom_license_acquisition_url_template is not None: - pulumi.set(__self__, "custom_license_acquisition_url_template", custom_license_acquisition_url_template) + _setter("custom_license_acquisition_url_template", custom_license_acquisition_url_template) @property @pulumi.getter(name="customAttributes") @@ -3328,14 +4437,33 @@ def __init__(__self__, *, :param pulumi.Input[bool] hls: Enable HLS protocol or not. Changing this forces a new Streaming Policy to be created. :param pulumi.Input[bool] smooth_streaming: Enable SmoothStreaming protocol or not. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCencEnabledProtocolsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dash=dash, + download=download, + hls=hls, + smooth_streaming=smooth_streaming, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dash: Optional[pulumi.Input[bool]] = None, + download: Optional[pulumi.Input[bool]] = None, + hls: Optional[pulumi.Input[bool]] = None, + smooth_streaming: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if smooth_streaming is None and 'smoothStreaming' in kwargs: + smooth_streaming = kwargs['smoothStreaming'] + if dash is not None: - pulumi.set(__self__, "dash", dash) + _setter("dash", dash) if download is not None: - pulumi.set(__self__, "download", download) + _setter("download", download) if hls is not None: - pulumi.set(__self__, "hls", hls) + _setter("hls", hls) if smooth_streaming is not None: - pulumi.set(__self__, "smooth_streaming", smooth_streaming) + _setter("smooth_streaming", smooth_streaming) @property @pulumi.getter @@ -3397,12 +4525,33 @@ def __init__(__self__, *, :param pulumi.Input['StreamingPolicyEnvelopeEncryptionDefaultContentKeyArgs'] default_content_key: A `default_content_key` block as defined above. Changing this forces a new Streaming Policy to be created. :param pulumi.Input['StreamingPolicyEnvelopeEncryptionEnabledProtocolsArgs'] enabled_protocols: A `enabled_protocols` block as defined above. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyEnvelopeEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_keys_acquisition_url_template=custom_keys_acquisition_url_template, + default_content_key=default_content_key, + enabled_protocols=enabled_protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_keys_acquisition_url_template: Optional[pulumi.Input[str]] = None, + default_content_key: Optional[pulumi.Input['StreamingPolicyEnvelopeEncryptionDefaultContentKeyArgs']] = None, + enabled_protocols: Optional[pulumi.Input['StreamingPolicyEnvelopeEncryptionEnabledProtocolsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_keys_acquisition_url_template is None and 'customKeysAcquisitionUrlTemplate' in kwargs: + custom_keys_acquisition_url_template = kwargs['customKeysAcquisitionUrlTemplate'] + if default_content_key is None and 'defaultContentKey' in kwargs: + default_content_key = kwargs['defaultContentKey'] + if enabled_protocols is None and 'enabledProtocols' in kwargs: + enabled_protocols = kwargs['enabledProtocols'] + if custom_keys_acquisition_url_template is not None: - pulumi.set(__self__, "custom_keys_acquisition_url_template", custom_keys_acquisition_url_template) + _setter("custom_keys_acquisition_url_template", custom_keys_acquisition_url_template) if default_content_key is not None: - pulumi.set(__self__, "default_content_key", default_content_key) + _setter("default_content_key", default_content_key) if enabled_protocols is not None: - pulumi.set(__self__, "enabled_protocols", enabled_protocols) + _setter("enabled_protocols", enabled_protocols) @property @pulumi.getter(name="customKeysAcquisitionUrlTemplate") @@ -3450,10 +4599,25 @@ def __init__(__self__, *, :param pulumi.Input[str] label: Label can be used to specify Content Key when creating a Streaming Locator. Changing this forces a new Streaming Policy to be created. :param pulumi.Input[str] policy_name: Policy used by Default Key. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyEnvelopeEncryptionDefaultContentKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + policy_name=policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[pulumi.Input[str]] = None, + policy_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) @property @pulumi.getter @@ -3493,14 +4657,33 @@ def __init__(__self__, *, :param pulumi.Input[bool] hls: Enable HLS protocol or not. Changing this forces a new Streaming Policy to be created. :param pulumi.Input[bool] smooth_streaming: Enable SmoothStreaming protocol or not. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyEnvelopeEncryptionEnabledProtocolsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dash=dash, + download=download, + hls=hls, + smooth_streaming=smooth_streaming, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dash: Optional[pulumi.Input[bool]] = None, + download: Optional[pulumi.Input[bool]] = None, + hls: Optional[pulumi.Input[bool]] = None, + smooth_streaming: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if smooth_streaming is None and 'smoothStreaming' in kwargs: + smooth_streaming = kwargs['smoothStreaming'] + if dash is not None: - pulumi.set(__self__, "dash", dash) + _setter("dash", dash) if download is not None: - pulumi.set(__self__, "download", download) + _setter("download", download) if hls is not None: - pulumi.set(__self__, "hls", hls) + _setter("hls", hls) if smooth_streaming is not None: - pulumi.set(__self__, "smooth_streaming", smooth_streaming) + _setter("smooth_streaming", smooth_streaming) @property @pulumi.getter @@ -3564,14 +4747,33 @@ def __init__(__self__, *, :param pulumi.Input[bool] hls: Enable HLS protocol or not. Changing this forces a new Streaming Policy to be created. :param pulumi.Input[bool] smooth_streaming: Enable SmoothStreaming protocol or not. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyNoEncryptionEnabledProtocolsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dash=dash, + download=download, + hls=hls, + smooth_streaming=smooth_streaming, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dash: Optional[pulumi.Input[bool]] = None, + download: Optional[pulumi.Input[bool]] = None, + hls: Optional[pulumi.Input[bool]] = None, + smooth_streaming: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if smooth_streaming is None and 'smoothStreaming' in kwargs: + smooth_streaming = kwargs['smoothStreaming'] + if dash is not None: - pulumi.set(__self__, "dash", dash) + _setter("dash", dash) if download is not None: - pulumi.set(__self__, "download", download) + _setter("download", download) if hls is not None: - pulumi.set(__self__, "hls", hls) + _setter("hls", hls) if smooth_streaming is not None: - pulumi.set(__self__, "smooth_streaming", smooth_streaming) + _setter("smooth_streaming", smooth_streaming) @property @pulumi.getter @@ -3643,20 +4845,57 @@ def __init__(__self__, *, > **NOTE:** Each output can only have one type of preset: `builtin_preset`, `audio_analyzer_preset`, `custom_preset`, `face_detector_preset` or `video_analyzer_preset`. If you need to apply different presets you must create one output for each one. """ + TransformOutputArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + audio_analyzer_preset=audio_analyzer_preset, + builtin_preset=builtin_preset, + custom_preset=custom_preset, + face_detector_preset=face_detector_preset, + on_error_action=on_error_action, + relative_priority=relative_priority, + video_analyzer_preset=video_analyzer_preset, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audio_analyzer_preset: Optional[pulumi.Input['TransformOutputAudioAnalyzerPresetArgs']] = None, + builtin_preset: Optional[pulumi.Input['TransformOutputBuiltinPresetArgs']] = None, + custom_preset: Optional[pulumi.Input['TransformOutputCustomPresetArgs']] = None, + face_detector_preset: Optional[pulumi.Input['TransformOutputFaceDetectorPresetArgs']] = None, + on_error_action: Optional[pulumi.Input[str]] = None, + relative_priority: Optional[pulumi.Input[str]] = None, + video_analyzer_preset: Optional[pulumi.Input['TransformOutputVideoAnalyzerPresetArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audio_analyzer_preset is None and 'audioAnalyzerPreset' in kwargs: + audio_analyzer_preset = kwargs['audioAnalyzerPreset'] + if builtin_preset is None and 'builtinPreset' in kwargs: + builtin_preset = kwargs['builtinPreset'] + if custom_preset is None and 'customPreset' in kwargs: + custom_preset = kwargs['customPreset'] + if face_detector_preset is None and 'faceDetectorPreset' in kwargs: + face_detector_preset = kwargs['faceDetectorPreset'] + if on_error_action is None and 'onErrorAction' in kwargs: + on_error_action = kwargs['onErrorAction'] + if relative_priority is None and 'relativePriority' in kwargs: + relative_priority = kwargs['relativePriority'] + if video_analyzer_preset is None and 'videoAnalyzerPreset' in kwargs: + video_analyzer_preset = kwargs['videoAnalyzerPreset'] + if audio_analyzer_preset is not None: - pulumi.set(__self__, "audio_analyzer_preset", audio_analyzer_preset) + _setter("audio_analyzer_preset", audio_analyzer_preset) if builtin_preset is not None: - pulumi.set(__self__, "builtin_preset", builtin_preset) + _setter("builtin_preset", builtin_preset) if custom_preset is not None: - pulumi.set(__self__, "custom_preset", custom_preset) + _setter("custom_preset", custom_preset) if face_detector_preset is not None: - pulumi.set(__self__, "face_detector_preset", face_detector_preset) + _setter("face_detector_preset", face_detector_preset) if on_error_action is not None: - pulumi.set(__self__, "on_error_action", on_error_action) + _setter("on_error_action", on_error_action) if relative_priority is not None: - pulumi.set(__self__, "relative_priority", relative_priority) + _setter("relative_priority", relative_priority) if video_analyzer_preset is not None: - pulumi.set(__self__, "video_analyzer_preset", video_analyzer_preset) + _setter("video_analyzer_preset", video_analyzer_preset) @property @pulumi.getter(name="audioAnalyzerPreset") @@ -3756,12 +4995,33 @@ def __init__(__self__, *, :param pulumi.Input[str] audio_language: The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you know the language of your content, it is recommended that you specify it. The language must be specified explicitly for AudioAnalysisMode:Basic, since automatic language detection is not included in basic mode. If the language isn't specified, automatic language detection will choose the first language detected and process with the selected language for the duration of the file. It does not currently support dynamically switching between languages after the first language is detected. The automatic detection works best with audio recordings with clearly discernible speech. If automatic detection fails to find the language, transcription would fall back to `en-US`. The list of supported languages is available here: . :param pulumi.Input[Mapping[str, pulumi.Input[str]]] experimental_options: Dictionary containing key value pairs for parameters not exposed in the preset itself. """ + TransformOutputAudioAnalyzerPresetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + audio_analysis_mode=audio_analysis_mode, + audio_language=audio_language, + experimental_options=experimental_options, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audio_analysis_mode: Optional[pulumi.Input[str]] = None, + audio_language: Optional[pulumi.Input[str]] = None, + experimental_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audio_analysis_mode is None and 'audioAnalysisMode' in kwargs: + audio_analysis_mode = kwargs['audioAnalysisMode'] + if audio_language is None and 'audioLanguage' in kwargs: + audio_language = kwargs['audioLanguage'] + if experimental_options is None and 'experimentalOptions' in kwargs: + experimental_options = kwargs['experimentalOptions'] + if audio_analysis_mode is not None: - pulumi.set(__self__, "audio_analysis_mode", audio_analysis_mode) + _setter("audio_analysis_mode", audio_analysis_mode) if audio_language is not None: - pulumi.set(__self__, "audio_language", audio_language) + _setter("audio_language", audio_language) if experimental_options is not None: - pulumi.set(__self__, "experimental_options", experimental_options) + _setter("experimental_options", experimental_options) @property @pulumi.getter(name="audioAnalysisMode") @@ -3809,9 +5069,28 @@ def __init__(__self__, *, :param pulumi.Input[str] preset_name: The built-in preset to be used for encoding videos. The Possible values are `AACGoodQualityAudio`, `AdaptiveStreaming`, `ContentAwareEncoding`, `ContentAwareEncodingExperimental`, `CopyAllBitrateNonInterleaved`, `DDGoodQualityAudio`, `H265AdaptiveStreaming`, `H265ContentAwareEncoding`, `H265SingleBitrate4K`, `H265SingleBitrate1080p`, `H265SingleBitrate720p`, `H264MultipleBitrate1080p`, `H264MultipleBitrateSD`, `H264MultipleBitrate720p`, `H264SingleBitrate1080p`, `H264SingleBitrateSD` and `H264SingleBitrate720p`. :param pulumi.Input['TransformOutputBuiltinPresetPresetConfigurationArgs'] preset_configuration: A `present_configuration` block as defined below. """ - pulumi.set(__self__, "preset_name", preset_name) + TransformOutputBuiltinPresetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + preset_name=preset_name, + preset_configuration=preset_configuration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + preset_name: Optional[pulumi.Input[str]] = None, + preset_configuration: Optional[pulumi.Input['TransformOutputBuiltinPresetPresetConfigurationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if preset_name is None and 'presetName' in kwargs: + preset_name = kwargs['presetName'] + if preset_name is None: + raise TypeError("Missing 'preset_name' argument") + if preset_configuration is None and 'presetConfiguration' in kwargs: + preset_configuration = kwargs['presetConfiguration'] + + _setter("preset_name", preset_name) if preset_configuration is not None: - pulumi.set(__self__, "preset_configuration", preset_configuration) + _setter("preset_configuration", preset_configuration) @property @pulumi.getter(name="presetName") @@ -3859,22 +5138,61 @@ def __init__(__self__, *, :param pulumi.Input[int] min_bitrate_bps: The minimum bitrate in bits per second (threshold for the bottom video layer). For example, set as `200000` to have a bottom layer that covers users with low network bandwidth. :param pulumi.Input[int] min_height: The minimum height of output video layers. For example, set as `360` to avoid output layers of smaller resolutions like 180P. """ + TransformOutputBuiltinPresetPresetConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + complexity=complexity, + interleave_output=interleave_output, + key_frame_interval_in_seconds=key_frame_interval_in_seconds, + max_bitrate_bps=max_bitrate_bps, + max_height=max_height, + max_layers=max_layers, + min_bitrate_bps=min_bitrate_bps, + min_height=min_height, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + complexity: Optional[pulumi.Input[str]] = None, + interleave_output: Optional[pulumi.Input[str]] = None, + key_frame_interval_in_seconds: Optional[pulumi.Input[float]] = None, + max_bitrate_bps: Optional[pulumi.Input[int]] = None, + max_height: Optional[pulumi.Input[int]] = None, + max_layers: Optional[pulumi.Input[int]] = None, + min_bitrate_bps: Optional[pulumi.Input[int]] = None, + min_height: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if interleave_output is None and 'interleaveOutput' in kwargs: + interleave_output = kwargs['interleaveOutput'] + if key_frame_interval_in_seconds is None and 'keyFrameIntervalInSeconds' in kwargs: + key_frame_interval_in_seconds = kwargs['keyFrameIntervalInSeconds'] + if max_bitrate_bps is None and 'maxBitrateBps' in kwargs: + max_bitrate_bps = kwargs['maxBitrateBps'] + if max_height is None and 'maxHeight' in kwargs: + max_height = kwargs['maxHeight'] + if max_layers is None and 'maxLayers' in kwargs: + max_layers = kwargs['maxLayers'] + if min_bitrate_bps is None and 'minBitrateBps' in kwargs: + min_bitrate_bps = kwargs['minBitrateBps'] + if min_height is None and 'minHeight' in kwargs: + min_height = kwargs['minHeight'] + if complexity is not None: - pulumi.set(__self__, "complexity", complexity) + _setter("complexity", complexity) if interleave_output is not None: - pulumi.set(__self__, "interleave_output", interleave_output) + _setter("interleave_output", interleave_output) if key_frame_interval_in_seconds is not None: - pulumi.set(__self__, "key_frame_interval_in_seconds", key_frame_interval_in_seconds) + _setter("key_frame_interval_in_seconds", key_frame_interval_in_seconds) if max_bitrate_bps is not None: - pulumi.set(__self__, "max_bitrate_bps", max_bitrate_bps) + _setter("max_bitrate_bps", max_bitrate_bps) if max_height is not None: - pulumi.set(__self__, "max_height", max_height) + _setter("max_height", max_height) if max_layers is not None: - pulumi.set(__self__, "max_layers", max_layers) + _setter("max_layers", max_layers) if min_bitrate_bps is not None: - pulumi.set(__self__, "min_bitrate_bps", min_bitrate_bps) + _setter("min_bitrate_bps", min_bitrate_bps) if min_height is not None: - pulumi.set(__self__, "min_height", min_height) + _setter("min_height", min_height) @property @pulumi.getter @@ -3986,12 +5304,35 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] experimental_options: Dictionary containing key value pairs for parameters not exposed in the preset itself. :param pulumi.Input['TransformOutputCustomPresetFilterArgs'] filter: A `filter` block as defined below. """ - pulumi.set(__self__, "codecs", codecs) - pulumi.set(__self__, "formats", formats) + TransformOutputCustomPresetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + codecs=codecs, + formats=formats, + experimental_options=experimental_options, + filter=filter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + codecs: Optional[pulumi.Input[Sequence[pulumi.Input['TransformOutputCustomPresetCodecArgs']]]] = None, + formats: Optional[pulumi.Input[Sequence[pulumi.Input['TransformOutputCustomPresetFormatArgs']]]] = None, + experimental_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + filter: Optional[pulumi.Input['TransformOutputCustomPresetFilterArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if codecs is None: + raise TypeError("Missing 'codecs' argument") + if formats is None: + raise TypeError("Missing 'formats' argument") + if experimental_options is None and 'experimentalOptions' in kwargs: + experimental_options = kwargs['experimentalOptions'] + + _setter("codecs", codecs) + _setter("formats", formats) if experimental_options is not None: - pulumi.set(__self__, "experimental_options", experimental_options) + _setter("experimental_options", experimental_options) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) @property @pulumi.getter @@ -4065,22 +5406,63 @@ def __init__(__self__, *, > **NOTE:** Each codec can only have one type: `aac_audio`, `copy_audio`, `copy_video`, `dd_audio`, `h264_video`, `h265_video`, `jpg_image` or `png_image`. If you need to apply different codec you must create one codec for each one. """ + TransformOutputCustomPresetCodecArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aac_audio=aac_audio, + copy_audio=copy_audio, + copy_video=copy_video, + dd_audio=dd_audio, + h264_video=h264_video, + h265_video=h265_video, + jpg_image=jpg_image, + png_image=png_image, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aac_audio: Optional[pulumi.Input['TransformOutputCustomPresetCodecAacAudioArgs']] = None, + copy_audio: Optional[pulumi.Input['TransformOutputCustomPresetCodecCopyAudioArgs']] = None, + copy_video: Optional[pulumi.Input['TransformOutputCustomPresetCodecCopyVideoArgs']] = None, + dd_audio: Optional[pulumi.Input['TransformOutputCustomPresetCodecDdAudioArgs']] = None, + h264_video: Optional[pulumi.Input['TransformOutputCustomPresetCodecH264VideoArgs']] = None, + h265_video: Optional[pulumi.Input['TransformOutputCustomPresetCodecH265VideoArgs']] = None, + jpg_image: Optional[pulumi.Input['TransformOutputCustomPresetCodecJpgImageArgs']] = None, + png_image: Optional[pulumi.Input['TransformOutputCustomPresetCodecPngImageArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aac_audio is None and 'aacAudio' in kwargs: + aac_audio = kwargs['aacAudio'] + if copy_audio is None and 'copyAudio' in kwargs: + copy_audio = kwargs['copyAudio'] + if copy_video is None and 'copyVideo' in kwargs: + copy_video = kwargs['copyVideo'] + if dd_audio is None and 'ddAudio' in kwargs: + dd_audio = kwargs['ddAudio'] + if h264_video is None and 'h264Video' in kwargs: + h264_video = kwargs['h264Video'] + if h265_video is None and 'h265Video' in kwargs: + h265_video = kwargs['h265Video'] + if jpg_image is None and 'jpgImage' in kwargs: + jpg_image = kwargs['jpgImage'] + if png_image is None and 'pngImage' in kwargs: + png_image = kwargs['pngImage'] + if aac_audio is not None: - pulumi.set(__self__, "aac_audio", aac_audio) + _setter("aac_audio", aac_audio) if copy_audio is not None: - pulumi.set(__self__, "copy_audio", copy_audio) + _setter("copy_audio", copy_audio) if copy_video is not None: - pulumi.set(__self__, "copy_video", copy_video) + _setter("copy_video", copy_video) if dd_audio is not None: - pulumi.set(__self__, "dd_audio", dd_audio) + _setter("dd_audio", dd_audio) if h264_video is not None: - pulumi.set(__self__, "h264_video", h264_video) + _setter("h264_video", h264_video) if h265_video is not None: - pulumi.set(__self__, "h265_video", h265_video) + _setter("h265_video", h265_video) if jpg_image is not None: - pulumi.set(__self__, "jpg_image", jpg_image) + _setter("jpg_image", jpg_image) if png_image is not None: - pulumi.set(__self__, "png_image", png_image) + _setter("png_image", png_image) @property @pulumi.getter(name="aacAudio") @@ -4196,16 +5578,37 @@ def __init__(__self__, *, :param pulumi.Input[str] profile: The encoding profile to be used when encoding audio with AAC. Possible values are `AacLc`, `HeAacV1`,and `HeAacV2`. Default to `AacLc`. :param pulumi.Input[int] sampling_rate: The sampling rate to use for encoding in Hertz. Default to `48000`. """ + TransformOutputCustomPresetCodecAacAudioArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bitrate=bitrate, + channels=channels, + label=label, + profile=profile, + sampling_rate=sampling_rate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bitrate: Optional[pulumi.Input[int]] = None, + channels: Optional[pulumi.Input[int]] = None, + label: Optional[pulumi.Input[str]] = None, + profile: Optional[pulumi.Input[str]] = None, + sampling_rate: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sampling_rate is None and 'samplingRate' in kwargs: + sampling_rate = kwargs['samplingRate'] + if bitrate is not None: - pulumi.set(__self__, "bitrate", bitrate) + _setter("bitrate", bitrate) if channels is not None: - pulumi.set(__self__, "channels", channels) + _setter("channels", channels) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if profile is not None: - pulumi.set(__self__, "profile", profile) + _setter("profile", profile) if sampling_rate is not None: - pulumi.set(__self__, "sampling_rate", sampling_rate) + _setter("sampling_rate", sampling_rate) @property @pulumi.getter @@ -4275,8 +5678,19 @@ def __init__(__self__, *, """ :param pulumi.Input[str] label: Specifies the label for the codec. The label can be used to control muxing behavior. """ + TransformOutputCustomPresetCodecCopyAudioArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) @property @pulumi.getter @@ -4298,8 +5712,19 @@ def __init__(__self__, *, """ :param pulumi.Input[str] label: Specifies the label for the codec. The label can be used to control muxing behavior. """ + TransformOutputCustomPresetCodecCopyVideoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) @property @pulumi.getter @@ -4327,14 +5752,33 @@ def __init__(__self__, *, :param pulumi.Input[str] label: Specifies the label for the codec. The label can be used to control muxing behavior. :param pulumi.Input[int] sampling_rate: The sampling rate to use for encoding in Hertz. Default to `48000`. """ + TransformOutputCustomPresetCodecDdAudioArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bitrate=bitrate, + channels=channels, + label=label, + sampling_rate=sampling_rate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bitrate: Optional[pulumi.Input[int]] = None, + channels: Optional[pulumi.Input[int]] = None, + label: Optional[pulumi.Input[str]] = None, + sampling_rate: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sampling_rate is None and 'samplingRate' in kwargs: + sampling_rate = kwargs['samplingRate'] + if bitrate is not None: - pulumi.set(__self__, "bitrate", bitrate) + _setter("bitrate", bitrate) if channels is not None: - pulumi.set(__self__, "channels", channels) + _setter("channels", channels) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if sampling_rate is not None: - pulumi.set(__self__, "sampling_rate", sampling_rate) + _setter("sampling_rate", sampling_rate) @property @pulumi.getter @@ -4406,22 +5850,57 @@ def __init__(__self__, *, :param pulumi.Input[str] stretch_mode: Specifies the resizing mode - how the input video will be resized to fit the desired output resolution(s). Possible values are `AutoFit`, `AutoSize` or `None`. Default to `AutoSize`. :param pulumi.Input[str] sync_mode: Specifies the synchronization mode for the video. Possible values are `Auto`, `Cfr`, `Passthrough` or `Vfr`. Default to `Auto`. """ + TransformOutputCustomPresetCodecH264VideoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + complexity=complexity, + key_frame_interval=key_frame_interval, + label=label, + layers=layers, + rate_control_mode=rate_control_mode, + scene_change_detection_enabled=scene_change_detection_enabled, + stretch_mode=stretch_mode, + sync_mode=sync_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + complexity: Optional[pulumi.Input[str]] = None, + key_frame_interval: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + layers: Optional[pulumi.Input[Sequence[pulumi.Input['TransformOutputCustomPresetCodecH264VideoLayerArgs']]]] = None, + rate_control_mode: Optional[pulumi.Input[str]] = None, + scene_change_detection_enabled: Optional[pulumi.Input[bool]] = None, + stretch_mode: Optional[pulumi.Input[str]] = None, + sync_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_frame_interval is None and 'keyFrameInterval' in kwargs: + key_frame_interval = kwargs['keyFrameInterval'] + if rate_control_mode is None and 'rateControlMode' in kwargs: + rate_control_mode = kwargs['rateControlMode'] + if scene_change_detection_enabled is None and 'sceneChangeDetectionEnabled' in kwargs: + scene_change_detection_enabled = kwargs['sceneChangeDetectionEnabled'] + if stretch_mode is None and 'stretchMode' in kwargs: + stretch_mode = kwargs['stretchMode'] + if sync_mode is None and 'syncMode' in kwargs: + sync_mode = kwargs['syncMode'] + if complexity is not None: - pulumi.set(__self__, "complexity", complexity) + _setter("complexity", complexity) if key_frame_interval is not None: - pulumi.set(__self__, "key_frame_interval", key_frame_interval) + _setter("key_frame_interval", key_frame_interval) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if layers is not None: - pulumi.set(__self__, "layers", layers) + _setter("layers", layers) if rate_control_mode is not None: - pulumi.set(__self__, "rate_control_mode", rate_control_mode) + _setter("rate_control_mode", rate_control_mode) if scene_change_detection_enabled is not None: - pulumi.set(__self__, "scene_change_detection_enabled", scene_change_detection_enabled) + _setter("scene_change_detection_enabled", scene_change_detection_enabled) if stretch_mode is not None: - pulumi.set(__self__, "stretch_mode", stretch_mode) + _setter("stretch_mode", stretch_mode) if sync_mode is not None: - pulumi.set(__self__, "sync_mode", sync_mode) + _setter("sync_mode", sync_mode) @property @pulumi.getter @@ -4555,35 +6034,90 @@ def __init__(__self__, *, :param pulumi.Input[int] slices: The number of slices to be used when encoding this layer. If not specified, default is `1`, which means that encoder will use a single slice for each frame. :param pulumi.Input[str] width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in width as the input. """ - pulumi.set(__self__, "bitrate", bitrate) + TransformOutputCustomPresetCodecH264VideoLayerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bitrate=bitrate, + adaptive_b_frame_enabled=adaptive_b_frame_enabled, + b_frames=b_frames, + buffer_window=buffer_window, + crf=crf, + entropy_mode=entropy_mode, + frame_rate=frame_rate, + height=height, + label=label, + level=level, + max_bitrate=max_bitrate, + profile=profile, + reference_frames=reference_frames, + slices=slices, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bitrate: Optional[pulumi.Input[int]] = None, + adaptive_b_frame_enabled: Optional[pulumi.Input[bool]] = None, + b_frames: Optional[pulumi.Input[int]] = None, + buffer_window: Optional[pulumi.Input[str]] = None, + crf: Optional[pulumi.Input[float]] = None, + entropy_mode: Optional[pulumi.Input[str]] = None, + frame_rate: Optional[pulumi.Input[str]] = None, + height: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + level: Optional[pulumi.Input[str]] = None, + max_bitrate: Optional[pulumi.Input[int]] = None, + profile: Optional[pulumi.Input[str]] = None, + reference_frames: Optional[pulumi.Input[int]] = None, + slices: Optional[pulumi.Input[int]] = None, + width: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bitrate is None: + raise TypeError("Missing 'bitrate' argument") + if adaptive_b_frame_enabled is None and 'adaptiveBFrameEnabled' in kwargs: + adaptive_b_frame_enabled = kwargs['adaptiveBFrameEnabled'] + if b_frames is None and 'bFrames' in kwargs: + b_frames = kwargs['bFrames'] + if buffer_window is None and 'bufferWindow' in kwargs: + buffer_window = kwargs['bufferWindow'] + if entropy_mode is None and 'entropyMode' in kwargs: + entropy_mode = kwargs['entropyMode'] + if frame_rate is None and 'frameRate' in kwargs: + frame_rate = kwargs['frameRate'] + if max_bitrate is None and 'maxBitrate' in kwargs: + max_bitrate = kwargs['maxBitrate'] + if reference_frames is None and 'referenceFrames' in kwargs: + reference_frames = kwargs['referenceFrames'] + + _setter("bitrate", bitrate) if adaptive_b_frame_enabled is not None: - pulumi.set(__self__, "adaptive_b_frame_enabled", adaptive_b_frame_enabled) + _setter("adaptive_b_frame_enabled", adaptive_b_frame_enabled) if b_frames is not None: - pulumi.set(__self__, "b_frames", b_frames) + _setter("b_frames", b_frames) if buffer_window is not None: - pulumi.set(__self__, "buffer_window", buffer_window) + _setter("buffer_window", buffer_window) if crf is not None: - pulumi.set(__self__, "crf", crf) + _setter("crf", crf) if entropy_mode is not None: - pulumi.set(__self__, "entropy_mode", entropy_mode) + _setter("entropy_mode", entropy_mode) if frame_rate is not None: - pulumi.set(__self__, "frame_rate", frame_rate) + _setter("frame_rate", frame_rate) if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if level is not None: - pulumi.set(__self__, "level", level) + _setter("level", level) if max_bitrate is not None: - pulumi.set(__self__, "max_bitrate", max_bitrate) + _setter("max_bitrate", max_bitrate) if profile is not None: - pulumi.set(__self__, "profile", profile) + _setter("profile", profile) if reference_frames is not None: - pulumi.set(__self__, "reference_frames", reference_frames) + _setter("reference_frames", reference_frames) if slices is not None: - pulumi.set(__self__, "slices", slices) + _setter("slices", slices) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -4785,20 +6319,51 @@ def __init__(__self__, *, :param pulumi.Input[str] stretch_mode: Specifies the resizing mode - how the input video will be resized to fit the desired output resolution(s). Possible values are `AutoFit`, `AutoSize` or `None`. Default to `AutoSize`. :param pulumi.Input[str] sync_mode: Specifies the synchronization mode for the video. Possible values are `Auto`, `Cfr`, `Passthrough` or `Vfr`. Default to `Auto`. """ + TransformOutputCustomPresetCodecH265VideoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + complexity=complexity, + key_frame_interval=key_frame_interval, + label=label, + layers=layers, + scene_change_detection_enabled=scene_change_detection_enabled, + stretch_mode=stretch_mode, + sync_mode=sync_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + complexity: Optional[pulumi.Input[str]] = None, + key_frame_interval: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + layers: Optional[pulumi.Input[Sequence[pulumi.Input['TransformOutputCustomPresetCodecH265VideoLayerArgs']]]] = None, + scene_change_detection_enabled: Optional[pulumi.Input[bool]] = None, + stretch_mode: Optional[pulumi.Input[str]] = None, + sync_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_frame_interval is None and 'keyFrameInterval' in kwargs: + key_frame_interval = kwargs['keyFrameInterval'] + if scene_change_detection_enabled is None and 'sceneChangeDetectionEnabled' in kwargs: + scene_change_detection_enabled = kwargs['sceneChangeDetectionEnabled'] + if stretch_mode is None and 'stretchMode' in kwargs: + stretch_mode = kwargs['stretchMode'] + if sync_mode is None and 'syncMode' in kwargs: + sync_mode = kwargs['syncMode'] + if complexity is not None: - pulumi.set(__self__, "complexity", complexity) + _setter("complexity", complexity) if key_frame_interval is not None: - pulumi.set(__self__, "key_frame_interval", key_frame_interval) + _setter("key_frame_interval", key_frame_interval) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if layers is not None: - pulumi.set(__self__, "layers", layers) + _setter("layers", layers) if scene_change_detection_enabled is not None: - pulumi.set(__self__, "scene_change_detection_enabled", scene_change_detection_enabled) + _setter("scene_change_detection_enabled", scene_change_detection_enabled) if stretch_mode is not None: - pulumi.set(__self__, "stretch_mode", stretch_mode) + _setter("stretch_mode", stretch_mode) if sync_mode is not None: - pulumi.set(__self__, "sync_mode", sync_mode) + _setter("sync_mode", sync_mode) @property @pulumi.getter @@ -4918,33 +6483,84 @@ def __init__(__self__, *, :param pulumi.Input[int] slices: The number of slices to be used when encoding this layer. If not specified, default is `1`, which means that encoder will use a single slice for each frame. :param pulumi.Input[str] width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in width as the input. """ - pulumi.set(__self__, "bitrate", bitrate) + TransformOutputCustomPresetCodecH265VideoLayerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bitrate=bitrate, + adaptive_b_frame_enabled=adaptive_b_frame_enabled, + b_frames=b_frames, + buffer_window=buffer_window, + crf=crf, + frame_rate=frame_rate, + height=height, + label=label, + level=level, + max_bitrate=max_bitrate, + profile=profile, + reference_frames=reference_frames, + slices=slices, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bitrate: Optional[pulumi.Input[int]] = None, + adaptive_b_frame_enabled: Optional[pulumi.Input[bool]] = None, + b_frames: Optional[pulumi.Input[int]] = None, + buffer_window: Optional[pulumi.Input[str]] = None, + crf: Optional[pulumi.Input[float]] = None, + frame_rate: Optional[pulumi.Input[str]] = None, + height: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + level: Optional[pulumi.Input[str]] = None, + max_bitrate: Optional[pulumi.Input[int]] = None, + profile: Optional[pulumi.Input[str]] = None, + reference_frames: Optional[pulumi.Input[int]] = None, + slices: Optional[pulumi.Input[int]] = None, + width: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bitrate is None: + raise TypeError("Missing 'bitrate' argument") + if adaptive_b_frame_enabled is None and 'adaptiveBFrameEnabled' in kwargs: + adaptive_b_frame_enabled = kwargs['adaptiveBFrameEnabled'] + if b_frames is None and 'bFrames' in kwargs: + b_frames = kwargs['bFrames'] + if buffer_window is None and 'bufferWindow' in kwargs: + buffer_window = kwargs['bufferWindow'] + if frame_rate is None and 'frameRate' in kwargs: + frame_rate = kwargs['frameRate'] + if max_bitrate is None and 'maxBitrate' in kwargs: + max_bitrate = kwargs['maxBitrate'] + if reference_frames is None and 'referenceFrames' in kwargs: + reference_frames = kwargs['referenceFrames'] + + _setter("bitrate", bitrate) if adaptive_b_frame_enabled is not None: - pulumi.set(__self__, "adaptive_b_frame_enabled", adaptive_b_frame_enabled) + _setter("adaptive_b_frame_enabled", adaptive_b_frame_enabled) if b_frames is not None: - pulumi.set(__self__, "b_frames", b_frames) + _setter("b_frames", b_frames) if buffer_window is not None: - pulumi.set(__self__, "buffer_window", buffer_window) + _setter("buffer_window", buffer_window) if crf is not None: - pulumi.set(__self__, "crf", crf) + _setter("crf", crf) if frame_rate is not None: - pulumi.set(__self__, "frame_rate", frame_rate) + _setter("frame_rate", frame_rate) if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if level is not None: - pulumi.set(__self__, "level", level) + _setter("level", level) if max_bitrate is not None: - pulumi.set(__self__, "max_bitrate", max_bitrate) + _setter("max_bitrate", max_bitrate) if profile is not None: - pulumi.set(__self__, "profile", profile) + _setter("profile", profile) if reference_frames is not None: - pulumi.set(__self__, "reference_frames", reference_frames) + _setter("reference_frames", reference_frames) if slices is not None: - pulumi.set(__self__, "slices", slices) + _setter("slices", slices) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -5138,23 +6754,60 @@ def __init__(__self__, *, :param pulumi.Input[str] stretch_mode: The resizing mode, which indicates how the input video will be resized to fit the desired output resolution(s). Possible values are `AutoFit`, `AutoSize` or `None`. Default to `AutoSize`. :param pulumi.Input[str] sync_mode: Specifies the synchronization mode for the video. Possible values are `Auto`, `Cfr`, `Passthrough` or `Vfr`. Default to `Auto`. """ - pulumi.set(__self__, "start", start) + TransformOutputCustomPresetCodecJpgImageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + start=start, + key_frame_interval=key_frame_interval, + label=label, + layers=layers, + range=range, + sprite_column=sprite_column, + step=step, + stretch_mode=stretch_mode, + sync_mode=sync_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + start: Optional[pulumi.Input[str]] = None, + key_frame_interval: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + layers: Optional[pulumi.Input[Sequence[pulumi.Input['TransformOutputCustomPresetCodecJpgImageLayerArgs']]]] = None, + range: Optional[pulumi.Input[str]] = None, + sprite_column: Optional[pulumi.Input[int]] = None, + step: Optional[pulumi.Input[str]] = None, + stretch_mode: Optional[pulumi.Input[str]] = None, + sync_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start is None: + raise TypeError("Missing 'start' argument") + if key_frame_interval is None and 'keyFrameInterval' in kwargs: + key_frame_interval = kwargs['keyFrameInterval'] + if sprite_column is None and 'spriteColumn' in kwargs: + sprite_column = kwargs['spriteColumn'] + if stretch_mode is None and 'stretchMode' in kwargs: + stretch_mode = kwargs['stretchMode'] + if sync_mode is None and 'syncMode' in kwargs: + sync_mode = kwargs['syncMode'] + + _setter("start", start) if key_frame_interval is not None: - pulumi.set(__self__, "key_frame_interval", key_frame_interval) + _setter("key_frame_interval", key_frame_interval) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if layers is not None: - pulumi.set(__self__, "layers", layers) + _setter("layers", layers) if range is not None: - pulumi.set(__self__, "range", range) + _setter("range", range) if sprite_column is not None: - pulumi.set(__self__, "sprite_column", sprite_column) + _setter("sprite_column", sprite_column) if step is not None: - pulumi.set(__self__, "step", step) + _setter("step", step) if stretch_mode is not None: - pulumi.set(__self__, "stretch_mode", stretch_mode) + _setter("stretch_mode", stretch_mode) if sync_mode is not None: - pulumi.set(__self__, "sync_mode", sync_mode) + _setter("sync_mode", sync_mode) @property @pulumi.getter @@ -5278,14 +6931,31 @@ def __init__(__self__, *, :param pulumi.Input[int] quality: The compression quality of the JPEG output. Range is from `0` to `100` and the default is `70`. :param pulumi.Input[str] width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in width as the input. """ + TransformOutputCustomPresetCodecJpgImageLayerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + height=height, + label=label, + quality=quality, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + height: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + quality: Optional[pulumi.Input[int]] = None, + width: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if quality is not None: - pulumi.set(__self__, "quality", quality) + _setter("quality", quality) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -5357,21 +7027,54 @@ def __init__(__self__, *, :param pulumi.Input[str] stretch_mode: The resizing mode, which indicates how the input video will be resized to fit the desired output resolution(s). Possible values are `AutoFit`, `AutoSize` or `None`. Default to `AutoSize`. :param pulumi.Input[str] sync_mode: Specifies the synchronization mode for the video. Possible values are `Auto`, `Cfr`, `Passthrough` or `Vfr`. Default to `Auto`. """ - pulumi.set(__self__, "start", start) + TransformOutputCustomPresetCodecPngImageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + start=start, + key_frame_interval=key_frame_interval, + label=label, + layers=layers, + range=range, + step=step, + stretch_mode=stretch_mode, + sync_mode=sync_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + start: Optional[pulumi.Input[str]] = None, + key_frame_interval: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + layers: Optional[pulumi.Input[Sequence[pulumi.Input['TransformOutputCustomPresetCodecPngImageLayerArgs']]]] = None, + range: Optional[pulumi.Input[str]] = None, + step: Optional[pulumi.Input[str]] = None, + stretch_mode: Optional[pulumi.Input[str]] = None, + sync_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start is None: + raise TypeError("Missing 'start' argument") + if key_frame_interval is None and 'keyFrameInterval' in kwargs: + key_frame_interval = kwargs['keyFrameInterval'] + if stretch_mode is None and 'stretchMode' in kwargs: + stretch_mode = kwargs['stretchMode'] + if sync_mode is None and 'syncMode' in kwargs: + sync_mode = kwargs['syncMode'] + + _setter("start", start) if key_frame_interval is not None: - pulumi.set(__self__, "key_frame_interval", key_frame_interval) + _setter("key_frame_interval", key_frame_interval) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if layers is not None: - pulumi.set(__self__, "layers", layers) + _setter("layers", layers) if range is not None: - pulumi.set(__self__, "range", range) + _setter("range", range) if step is not None: - pulumi.set(__self__, "step", step) + _setter("step", step) if stretch_mode is not None: - pulumi.set(__self__, "stretch_mode", stretch_mode) + _setter("stretch_mode", stretch_mode) if sync_mode is not None: - pulumi.set(__self__, "sync_mode", sync_mode) + _setter("sync_mode", sync_mode) @property @pulumi.getter @@ -5481,12 +7184,27 @@ def __init__(__self__, *, :param pulumi.Input[str] label: The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. :param pulumi.Input[str] width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in width as the input. """ + TransformOutputCustomPresetCodecPngImageLayerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + height=height, + label=label, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + height: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + width: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -5542,18 +7260,45 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['TransformOutputCustomPresetFilterOverlayArgs']]] overlays: One or more `overlay` blocks as defined below. :param pulumi.Input[str] rotation: The rotation to be applied to the input video before it is encoded. Possible values are `Auto`, `None`, `Rotate90`, `Rotate180`, `Rotate270`,or `Rotate0`. Default to `Auto`. """ + TransformOutputCustomPresetFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + crop_rectangle=crop_rectangle, + deinterlace=deinterlace, + fade_in=fade_in, + fade_out=fade_out, + overlays=overlays, + rotation=rotation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + crop_rectangle: Optional[pulumi.Input['TransformOutputCustomPresetFilterCropRectangleArgs']] = None, + deinterlace: Optional[pulumi.Input['TransformOutputCustomPresetFilterDeinterlaceArgs']] = None, + fade_in: Optional[pulumi.Input['TransformOutputCustomPresetFilterFadeInArgs']] = None, + fade_out: Optional[pulumi.Input['TransformOutputCustomPresetFilterFadeOutArgs']] = None, + overlays: Optional[pulumi.Input[Sequence[pulumi.Input['TransformOutputCustomPresetFilterOverlayArgs']]]] = None, + rotation: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if crop_rectangle is None and 'cropRectangle' in kwargs: + crop_rectangle = kwargs['cropRectangle'] + if fade_in is None and 'fadeIn' in kwargs: + fade_in = kwargs['fadeIn'] + if fade_out is None and 'fadeOut' in kwargs: + fade_out = kwargs['fadeOut'] + if crop_rectangle is not None: - pulumi.set(__self__, "crop_rectangle", crop_rectangle) + _setter("crop_rectangle", crop_rectangle) if deinterlace is not None: - pulumi.set(__self__, "deinterlace", deinterlace) + _setter("deinterlace", deinterlace) if fade_in is not None: - pulumi.set(__self__, "fade_in", fade_in) + _setter("fade_in", fade_in) if fade_out is not None: - pulumi.set(__self__, "fade_out", fade_out) + _setter("fade_out", fade_out) if overlays is not None: - pulumi.set(__self__, "overlays", overlays) + _setter("overlays", overlays) if rotation is not None: - pulumi.set(__self__, "rotation", rotation) + _setter("rotation", rotation) @property @pulumi.getter(name="cropRectangle") @@ -5641,14 +7386,31 @@ def __init__(__self__, *, :param pulumi.Input[str] top: The number of pixels from the top-margin. This can be absolute pixel value (e.g `100`), or relative to the size of the video (For example, `50%`). :param pulumi.Input[str] width: The width of the rectangular region in pixels. This can be absolute pixel value (e.g` 100`), or relative to the size of the video (For example, `50%`). """ + TransformOutputCustomPresetFilterCropRectangleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + height=height, + left=left, + top=top, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + height: Optional[pulumi.Input[str]] = None, + left: Optional[pulumi.Input[str]] = None, + top: Optional[pulumi.Input[str]] = None, + width: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if left is not None: - pulumi.set(__self__, "left", left) + _setter("left", left) if top is not None: - pulumi.set(__self__, "top", top) + _setter("top", top) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -5708,10 +7470,23 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The deinterlacing mode. Possible values are `AutoPixelAdaptive` or `Off`. Default to `AutoPixelAdaptive`. :param pulumi.Input[str] parity: The field parity to use for deinterlacing. Possible values are `Auto`, `TopFieldFirst` or `BottomFieldFirst`. Default to `Auto`. """ + TransformOutputCustomPresetFilterDeinterlaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + parity=parity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + parity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if parity is not None: - pulumi.set(__self__, "parity", parity) + _setter("parity", parity) @property @pulumi.getter @@ -5749,10 +7524,31 @@ def __init__(__self__, *, :param pulumi.Input[str] fade_color: The color for the fade in/out. It can be on the [CSS Level1 colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color_keywords) or an RGB/hex value: e.g: `rgb(255,0,0)`, `0xFF0000` or `#FF0000`. :param pulumi.Input[str] start: The position in the input video from where to start fade. The value can be in ISO 8601 format (For example, `PT05S` to start at 5 seconds), or a frame count (For example, `10` to start at the 10th frame), or a relative value to stream duration (For example, `10%` to start at 10% of stream duration). Default to `0`. """ - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "fade_color", fade_color) + TransformOutputCustomPresetFilterFadeInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration=duration, + fade_color=fade_color, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration: Optional[pulumi.Input[str]] = None, + fade_color: Optional[pulumi.Input[str]] = None, + start: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration is None: + raise TypeError("Missing 'duration' argument") + if fade_color is None and 'fadeColor' in kwargs: + fade_color = kwargs['fadeColor'] + if fade_color is None: + raise TypeError("Missing 'fade_color' argument") + + _setter("duration", duration) + _setter("fade_color", fade_color) if start is not None: - pulumi.set(__self__, "start", start) + _setter("start", start) @property @pulumi.getter @@ -5802,10 +7598,31 @@ def __init__(__self__, *, :param pulumi.Input[str] fade_color: The color for the fade in/out. It can be on the [CSS Level1 colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color_keywords) or an RGB/hex value: e.g: `rgb(255,0,0)`, `0xFF0000` or `#FF0000`. :param pulumi.Input[str] start: The position in the input video from where to start fade. The value can be in ISO 8601 format (For example, `PT05S` to start at 5 seconds), or a frame count (For example, `10` to start at the 10th frame), or a relative value to stream duration (For example, `10%` to start at 10% of stream duration). Default to `0`. """ - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "fade_color", fade_color) + TransformOutputCustomPresetFilterFadeOutArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration=duration, + fade_color=fade_color, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration: Optional[pulumi.Input[str]] = None, + fade_color: Optional[pulumi.Input[str]] = None, + start: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration is None: + raise TypeError("Missing 'duration' argument") + if fade_color is None and 'fadeColor' in kwargs: + fade_color = kwargs['fadeColor'] + if fade_color is None: + raise TypeError("Missing 'fade_color' argument") + + _setter("duration", duration) + _setter("fade_color", fade_color) if start is not None: - pulumi.set(__self__, "start", start) + _setter("start", start) @property @pulumi.getter @@ -5855,10 +7672,23 @@ def __init__(__self__, *, > **NOTE:** Each overlay can only have one type: `audio` or `video`. If you need to apply different type you must create one overlay for each one. """ + TransformOutputCustomPresetFilterOverlayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + audio=audio, + video=video, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audio: Optional[pulumi.Input['TransformOutputCustomPresetFilterOverlayAudioArgs']] = None, + video: Optional[pulumi.Input['TransformOutputCustomPresetFilterOverlayVideoArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audio is not None: - pulumi.set(__self__, "audio", audio) + _setter("audio", audio) if video is not None: - pulumi.set(__self__, "video", video) + _setter("video", video) @property @pulumi.getter @@ -5904,17 +7734,48 @@ def __init__(__self__, *, :param pulumi.Input[str] fade_out_duration: The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as `PT0S`). :param pulumi.Input[str] start: The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, `PT05S` to start the overlay at 5 seconds into the input video. If not specified the overlay starts from the beginning of the input video. """ - pulumi.set(__self__, "input_label", input_label) + TransformOutputCustomPresetFilterOverlayAudioArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + input_label=input_label, + audio_gain_level=audio_gain_level, + end=end, + fade_in_duration=fade_in_duration, + fade_out_duration=fade_out_duration, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + input_label: Optional[pulumi.Input[str]] = None, + audio_gain_level: Optional[pulumi.Input[float]] = None, + end: Optional[pulumi.Input[str]] = None, + fade_in_duration: Optional[pulumi.Input[str]] = None, + fade_out_duration: Optional[pulumi.Input[str]] = None, + start: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if input_label is None and 'inputLabel' in kwargs: + input_label = kwargs['inputLabel'] + if input_label is None: + raise TypeError("Missing 'input_label' argument") + if audio_gain_level is None and 'audioGainLevel' in kwargs: + audio_gain_level = kwargs['audioGainLevel'] + if fade_in_duration is None and 'fadeInDuration' in kwargs: + fade_in_duration = kwargs['fadeInDuration'] + if fade_out_duration is None and 'fadeOutDuration' in kwargs: + fade_out_duration = kwargs['fadeOutDuration'] + + _setter("input_label", input_label) if audio_gain_level is not None: - pulumi.set(__self__, "audio_gain_level", audio_gain_level) + _setter("audio_gain_level", audio_gain_level) if end is not None: - pulumi.set(__self__, "end", end) + _setter("end", end) if fade_in_duration is not None: - pulumi.set(__self__, "fade_in_duration", fade_in_duration) + _setter("fade_in_duration", fade_in_duration) if fade_out_duration is not None: - pulumi.set(__self__, "fade_out_duration", fade_out_duration) + _setter("fade_out_duration", fade_out_duration) if start is not None: - pulumi.set(__self__, "start", start) + _setter("start", start) @property @pulumi.getter(name="inputLabel") @@ -6012,23 +7873,62 @@ def __init__(__self__, *, :param pulumi.Input['TransformOutputCustomPresetFilterOverlayVideoPositionArgs'] position: A `position` block as defined above. :param pulumi.Input[str] start: The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, `PT05S` to start the overlay at 5 seconds into the input video. If not specified the overlay starts from the beginning of the input video. """ - pulumi.set(__self__, "input_label", input_label) + TransformOutputCustomPresetFilterOverlayVideoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + input_label=input_label, + audio_gain_level=audio_gain_level, + crop_rectangle=crop_rectangle, + end=end, + fade_in_duration=fade_in_duration, + fade_out_duration=fade_out_duration, + opacity=opacity, + position=position, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + input_label: Optional[pulumi.Input[str]] = None, + audio_gain_level: Optional[pulumi.Input[float]] = None, + crop_rectangle: Optional[pulumi.Input['TransformOutputCustomPresetFilterOverlayVideoCropRectangleArgs']] = None, + end: Optional[pulumi.Input[str]] = None, + fade_in_duration: Optional[pulumi.Input[str]] = None, + fade_out_duration: Optional[pulumi.Input[str]] = None, + opacity: Optional[pulumi.Input[float]] = None, + position: Optional[pulumi.Input['TransformOutputCustomPresetFilterOverlayVideoPositionArgs']] = None, + start: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if input_label is None and 'inputLabel' in kwargs: + input_label = kwargs['inputLabel'] + if input_label is None: + raise TypeError("Missing 'input_label' argument") + if audio_gain_level is None and 'audioGainLevel' in kwargs: + audio_gain_level = kwargs['audioGainLevel'] + if crop_rectangle is None and 'cropRectangle' in kwargs: + crop_rectangle = kwargs['cropRectangle'] + if fade_in_duration is None and 'fadeInDuration' in kwargs: + fade_in_duration = kwargs['fadeInDuration'] + if fade_out_duration is None and 'fadeOutDuration' in kwargs: + fade_out_duration = kwargs['fadeOutDuration'] + + _setter("input_label", input_label) if audio_gain_level is not None: - pulumi.set(__self__, "audio_gain_level", audio_gain_level) + _setter("audio_gain_level", audio_gain_level) if crop_rectangle is not None: - pulumi.set(__self__, "crop_rectangle", crop_rectangle) + _setter("crop_rectangle", crop_rectangle) if end is not None: - pulumi.set(__self__, "end", end) + _setter("end", end) if fade_in_duration is not None: - pulumi.set(__self__, "fade_in_duration", fade_in_duration) + _setter("fade_in_duration", fade_in_duration) if fade_out_duration is not None: - pulumi.set(__self__, "fade_out_duration", fade_out_duration) + _setter("fade_out_duration", fade_out_duration) if opacity is not None: - pulumi.set(__self__, "opacity", opacity) + _setter("opacity", opacity) if position is not None: - pulumi.set(__self__, "position", position) + _setter("position", position) if start is not None: - pulumi.set(__self__, "start", start) + _setter("start", start) @property @pulumi.getter(name="inputLabel") @@ -6152,14 +8052,31 @@ def __init__(__self__, *, :param pulumi.Input[str] top: The number of pixels from the top-margin. This can be absolute pixel value (e.g `100`), or relative to the size of the video (For example, `50%`). :param pulumi.Input[str] width: The width of the rectangular region in pixels. This can be absolute pixel value (e.g` 100`), or relative to the size of the video (For example, `50%`). """ + TransformOutputCustomPresetFilterOverlayVideoCropRectangleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + height=height, + left=left, + top=top, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + height: Optional[pulumi.Input[str]] = None, + left: Optional[pulumi.Input[str]] = None, + top: Optional[pulumi.Input[str]] = None, + width: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if left is not None: - pulumi.set(__self__, "left", left) + _setter("left", left) if top is not None: - pulumi.set(__self__, "top", top) + _setter("top", top) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -6223,14 +8140,31 @@ def __init__(__self__, *, :param pulumi.Input[str] top: The number of pixels from the top-margin. This can be absolute pixel value (e.g `100`), or relative to the size of the video (For example, `50%`). :param pulumi.Input[str] width: The width of the rectangular region in pixels. This can be absolute pixel value (e.g` 100`), or relative to the size of the video (For example, `50%`). """ + TransformOutputCustomPresetFilterOverlayVideoPositionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + height=height, + left=left, + top=top, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + height: Optional[pulumi.Input[str]] = None, + left: Optional[pulumi.Input[str]] = None, + top: Optional[pulumi.Input[str]] = None, + width: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if left is not None: - pulumi.set(__self__, "left", left) + _setter("left", left) if top is not None: - pulumi.set(__self__, "top", top) + _setter("top", top) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -6296,14 +8230,33 @@ def __init__(__self__, *, > **NOTE:** Each format can only have one type: `jpg`, `mp4`, `png` or `transport_stream`. If you need to apply different type you must create one format for each one. """ + TransformOutputCustomPresetFormatArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + jpg=jpg, + mp4=mp4, + png=png, + transport_stream=transport_stream, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + jpg: Optional[pulumi.Input['TransformOutputCustomPresetFormatJpgArgs']] = None, + mp4: Optional[pulumi.Input['TransformOutputCustomPresetFormatMp4Args']] = None, + png: Optional[pulumi.Input['TransformOutputCustomPresetFormatPngArgs']] = None, + transport_stream: Optional[pulumi.Input['TransformOutputCustomPresetFormatTransportStreamArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if transport_stream is None and 'transportStream' in kwargs: + transport_stream = kwargs['transportStream'] + if jpg is not None: - pulumi.set(__self__, "jpg", jpg) + _setter("jpg", jpg) if mp4 is not None: - pulumi.set(__self__, "mp4", mp4) + _setter("mp4", mp4) if png is not None: - pulumi.set(__self__, "png", png) + _setter("png", png) if transport_stream is not None: - pulumi.set(__self__, "transport_stream", transport_stream) + _setter("transport_stream", transport_stream) @property @pulumi.getter @@ -6363,7 +8316,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: `{Basename}` - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of input video files will be used. If the length of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. `{Extension}` - The appropriate extension for this format. `{Label}` - The label assigned to the codec/layer. `{Index}` - A unique index for thumbnails. Only applicable to thumbnails. `{AudioStream}` - string "Audio" plus audio stream number(start from 1). `{Bitrate}` - The audio/video bitrate in kbps. Not applicable to thumbnails. `{Codec}` - The type of the audio/video codec. `{Resolution}` - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename. """ - pulumi.set(__self__, "filename_pattern", filename_pattern) + TransformOutputCustomPresetFormatJpgArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename_pattern=filename_pattern, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename_pattern: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename_pattern is None and 'filenamePattern' in kwargs: + filename_pattern = kwargs['filenamePattern'] + if filename_pattern is None: + raise TypeError("Missing 'filename_pattern' argument") + + _setter("filename_pattern", filename_pattern) @property @pulumi.getter(name="filenamePattern") @@ -6387,9 +8355,28 @@ def __init__(__self__, *, :param pulumi.Input[str] filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: `{Basename}` - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of input video files will be used. If the length of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. `{Extension}` - The appropriate extension for this format. `{Label}` - The label assigned to the codec/layer. `{Index}` - A unique index for thumbnails. Only applicable to thumbnails. `{AudioStream}` - string "Audio" plus audio stream number(start from 1). `{Bitrate}` - The audio/video bitrate in kbps. Not applicable to thumbnails. `{Codec}` - The type of the audio/video codec. `{Resolution}` - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename. :param pulumi.Input[Sequence[pulumi.Input['TransformOutputCustomPresetFormatMp4OutputFileArgs']]] output_files: One or more `output_file` blocks as defined below. """ - pulumi.set(__self__, "filename_pattern", filename_pattern) + TransformOutputCustomPresetFormatMp4Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename_pattern=filename_pattern, + output_files=output_files, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename_pattern: Optional[pulumi.Input[str]] = None, + output_files: Optional[pulumi.Input[Sequence[pulumi.Input['TransformOutputCustomPresetFormatMp4OutputFileArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename_pattern is None and 'filenamePattern' in kwargs: + filename_pattern = kwargs['filenamePattern'] + if filename_pattern is None: + raise TypeError("Missing 'filename_pattern' argument") + if output_files is None and 'outputFiles' in kwargs: + output_files = kwargs['outputFiles'] + + _setter("filename_pattern", filename_pattern) if output_files is not None: - pulumi.set(__self__, "output_files", output_files) + _setter("output_files", output_files) @property @pulumi.getter(name="filenamePattern") @@ -6423,7 +8410,20 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] labels: The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if the encoder is producing two video layers with labels `v1` and `v2`, and one audio layer with label `a1`, then an array like `["v1", "a1"]` tells the encoder to produce an output file with the video track represented by `v1` and the audio track represented by `a1`. """ - pulumi.set(__self__, "labels", labels) + TransformOutputCustomPresetFormatMp4OutputFileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + labels=labels, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if labels is None: + raise TypeError("Missing 'labels' argument") + + _setter("labels", labels) @property @pulumi.getter @@ -6445,7 +8445,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: `{Basename}` - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of input video files will be used. If the length of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. `{Extension}` - The appropriate extension for this format. `{Label}` - The label assigned to the codec/layer. `{Index}` - A unique index for thumbnails. Only applicable to thumbnails. `{AudioStream}` - string "Audio" plus audio stream number(start from 1). `{Bitrate}` - The audio/video bitrate in kbps. Not applicable to thumbnails. `{Codec}` - The type of the audio/video codec. `{Resolution}` - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename. """ - pulumi.set(__self__, "filename_pattern", filename_pattern) + TransformOutputCustomPresetFormatPngArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename_pattern=filename_pattern, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename_pattern: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename_pattern is None and 'filenamePattern' in kwargs: + filename_pattern = kwargs['filenamePattern'] + if filename_pattern is None: + raise TypeError("Missing 'filename_pattern' argument") + + _setter("filename_pattern", filename_pattern) @property @pulumi.getter(name="filenamePattern") @@ -6469,9 +8484,28 @@ def __init__(__self__, *, :param pulumi.Input[str] filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: `{Basename}` - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of input video files will be used. If the length of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. `{Extension}` - The appropriate extension for this format. `{Label}` - The label assigned to the codec/layer. `{Index}` - A unique index for thumbnails. Only applicable to thumbnails. `{AudioStream}` - string "Audio" plus audio stream number(start from 1). `{Bitrate}` - The audio/video bitrate in kbps. Not applicable to thumbnails. `{Codec}` - The type of the audio/video codec. `{Resolution}` - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename. :param pulumi.Input[Sequence[pulumi.Input['TransformOutputCustomPresetFormatTransportStreamOutputFileArgs']]] output_files: One or more `output_file` blocks as defined above. """ - pulumi.set(__self__, "filename_pattern", filename_pattern) + TransformOutputCustomPresetFormatTransportStreamArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename_pattern=filename_pattern, + output_files=output_files, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename_pattern: Optional[pulumi.Input[str]] = None, + output_files: Optional[pulumi.Input[Sequence[pulumi.Input['TransformOutputCustomPresetFormatTransportStreamOutputFileArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename_pattern is None and 'filenamePattern' in kwargs: + filename_pattern = kwargs['filenamePattern'] + if filename_pattern is None: + raise TypeError("Missing 'filename_pattern' argument") + if output_files is None and 'outputFiles' in kwargs: + output_files = kwargs['outputFiles'] + + _setter("filename_pattern", filename_pattern) if output_files is not None: - pulumi.set(__self__, "output_files", output_files) + _setter("output_files", output_files) @property @pulumi.getter(name="filenamePattern") @@ -6505,7 +8539,20 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] labels: The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if the encoder is producing two video layers with labels `v1` and `v2`, and one audio layer with label `a1`, then an array like `["v1", "a1"]` tells the encoder to produce an output file with the video track represented by `v1` and the audio track represented by `a1`. """ - pulumi.set(__self__, "labels", labels) + TransformOutputCustomPresetFormatTransportStreamOutputFileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + labels=labels, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if labels is None: + raise TypeError("Missing 'labels' argument") + + _setter("labels", labels) @property @pulumi.getter @@ -6533,14 +8580,39 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] experimental_options: Dictionary containing key value pairs for parameters not exposed in the preset itself. :param pulumi.Input[str] face_redactor_mode: This mode provides the ability to choose between the following settings: 1) `Analyze` - For detection only. This mode generates a metadata JSON file marking appearances of faces throughout the video. Where possible, appearances of the same person are assigned the same ID. 2) `Combined` - Additionally redacts(blurs) detected faces. 3) `Redact` - This enables a 2-pass process, allowing for selective redaction of a subset of detected faces. It takes in the metadata file from a prior analyze pass, along with the source video, and a user-selected subset of IDs that require redaction. Default to `Analyze`. """ + TransformOutputFaceDetectorPresetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + analysis_resolution=analysis_resolution, + blur_type=blur_type, + experimental_options=experimental_options, + face_redactor_mode=face_redactor_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + analysis_resolution: Optional[pulumi.Input[str]] = None, + blur_type: Optional[pulumi.Input[str]] = None, + experimental_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + face_redactor_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if analysis_resolution is None and 'analysisResolution' in kwargs: + analysis_resolution = kwargs['analysisResolution'] + if blur_type is None and 'blurType' in kwargs: + blur_type = kwargs['blurType'] + if experimental_options is None and 'experimentalOptions' in kwargs: + experimental_options = kwargs['experimentalOptions'] + if face_redactor_mode is None and 'faceRedactorMode' in kwargs: + face_redactor_mode = kwargs['faceRedactorMode'] + if analysis_resolution is not None: - pulumi.set(__self__, "analysis_resolution", analysis_resolution) + _setter("analysis_resolution", analysis_resolution) if blur_type is not None: - pulumi.set(__self__, "blur_type", blur_type) + _setter("blur_type", blur_type) if experimental_options is not None: - pulumi.set(__self__, "experimental_options", experimental_options) + _setter("experimental_options", experimental_options) if face_redactor_mode is not None: - pulumi.set(__self__, "face_redactor_mode", face_redactor_mode) + _setter("face_redactor_mode", face_redactor_mode) @property @pulumi.getter(name="analysisResolution") @@ -6604,14 +8676,39 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] experimental_options: Dictionary containing key value pairs for parameters not exposed in the preset itself. :param pulumi.Input[str] insights_type: Defines the type of insights that you want the service to generate. The allowed values are `AudioInsightsOnly`, `VideoInsightsOnly`, and `AllInsights`. If you set this to `AllInsights` and the input is audio only, then only audio insights are generated. Similarly, if the input is video only, then only video insights are generated. It is recommended that you not use `AudioInsightsOnly` if you expect some of your inputs to be video only; or use `VideoInsightsOnly` if you expect some of your inputs to be audio only. Your Jobs in such conditions would error out. Default to `AllInsights`. """ + TransformOutputVideoAnalyzerPresetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + audio_analysis_mode=audio_analysis_mode, + audio_language=audio_language, + experimental_options=experimental_options, + insights_type=insights_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audio_analysis_mode: Optional[pulumi.Input[str]] = None, + audio_language: Optional[pulumi.Input[str]] = None, + experimental_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + insights_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audio_analysis_mode is None and 'audioAnalysisMode' in kwargs: + audio_analysis_mode = kwargs['audioAnalysisMode'] + if audio_language is None and 'audioLanguage' in kwargs: + audio_language = kwargs['audioLanguage'] + if experimental_options is None and 'experimentalOptions' in kwargs: + experimental_options = kwargs['experimentalOptions'] + if insights_type is None and 'insightsType' in kwargs: + insights_type = kwargs['insightsType'] + if audio_analysis_mode is not None: - pulumi.set(__self__, "audio_analysis_mode", audio_analysis_mode) + _setter("audio_analysis_mode", audio_analysis_mode) if audio_language is not None: - pulumi.set(__self__, "audio_language", audio_language) + _setter("audio_language", audio_language) if experimental_options is not None: - pulumi.set(__self__, "experimental_options", experimental_options) + _setter("experimental_options", experimental_options) if insights_type is not None: - pulumi.set(__self__, "insights_type", insights_type) + _setter("insights_type", insights_type) @property @pulumi.getter(name="audioAnalysisMode") diff --git a/sdk/python/pulumi_azure/media/account_filter.py b/sdk/python/pulumi_azure/media/account_filter.py index e3f7f056b8..df8767d2cd 100644 --- a/sdk/python/pulumi_azure/media/account_filter.py +++ b/sdk/python/pulumi_azure/media/account_filter.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,16 +31,51 @@ def __init__(__self__, *, :param pulumi.Input['AccountFilterPresentationTimeRangeArgs'] presentation_time_range: A `presentation_time_range` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['AccountFilterTrackSelectionArgs']]] track_selections: One or more `track_selection` blocks as defined below. """ - pulumi.set(__self__, "media_services_account_name", media_services_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + AccountFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + media_services_account_name=media_services_account_name, + resource_group_name=resource_group_name, + first_quality_bitrate=first_quality_bitrate, + name=name, + presentation_time_range=presentation_time_range, + track_selections=track_selections, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + media_services_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + first_quality_bitrate: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + presentation_time_range: Optional[pulumi.Input['AccountFilterPresentationTimeRangeArgs']] = None, + track_selections: Optional[pulumi.Input[Sequence[pulumi.Input['AccountFilterTrackSelectionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if media_services_account_name is None: + raise TypeError("Missing 'media_services_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if first_quality_bitrate is None and 'firstQualityBitrate' in kwargs: + first_quality_bitrate = kwargs['firstQualityBitrate'] + if presentation_time_range is None and 'presentationTimeRange' in kwargs: + presentation_time_range = kwargs['presentationTimeRange'] + if track_selections is None and 'trackSelections' in kwargs: + track_selections = kwargs['trackSelections'] + + _setter("media_services_account_name", media_services_account_name) + _setter("resource_group_name", resource_group_name) if first_quality_bitrate is not None: - pulumi.set(__self__, "first_quality_bitrate", first_quality_bitrate) + _setter("first_quality_bitrate", first_quality_bitrate) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if presentation_time_range is not None: - pulumi.set(__self__, "presentation_time_range", presentation_time_range) + _setter("presentation_time_range", presentation_time_range) if track_selections is not None: - pulumi.set(__self__, "track_selections", track_selections) + _setter("track_selections", track_selections) @property @pulumi.getter(name="mediaServicesAccountName") @@ -133,18 +168,49 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Account Filter should exist. Changing this forces a new Account Filter to be created. :param pulumi.Input[Sequence[pulumi.Input['AccountFilterTrackSelectionArgs']]] track_selections: One or more `track_selection` blocks as defined below. """ + _AccountFilterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + first_quality_bitrate=first_quality_bitrate, + media_services_account_name=media_services_account_name, + name=name, + presentation_time_range=presentation_time_range, + resource_group_name=resource_group_name, + track_selections=track_selections, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + first_quality_bitrate: Optional[pulumi.Input[int]] = None, + media_services_account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + presentation_time_range: Optional[pulumi.Input['AccountFilterPresentationTimeRangeArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + track_selections: Optional[pulumi.Input[Sequence[pulumi.Input['AccountFilterTrackSelectionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if first_quality_bitrate is None and 'firstQualityBitrate' in kwargs: + first_quality_bitrate = kwargs['firstQualityBitrate'] + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if presentation_time_range is None and 'presentationTimeRange' in kwargs: + presentation_time_range = kwargs['presentationTimeRange'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if track_selections is None and 'trackSelections' in kwargs: + track_selections = kwargs['trackSelections'] + if first_quality_bitrate is not None: - pulumi.set(__self__, "first_quality_bitrate", first_quality_bitrate) + _setter("first_quality_bitrate", first_quality_bitrate) if media_services_account_name is not None: - pulumi.set(__self__, "media_services_account_name", media_services_account_name) + _setter("media_services_account_name", media_services_account_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if presentation_time_range is not None: - pulumi.set(__self__, "presentation_time_range", presentation_time_range) + _setter("presentation_time_range", presentation_time_range) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if track_selections is not None: - pulumi.set(__self__, "track_selections", track_selections) + _setter("track_selections", track_selections) @property @pulumi.getter(name="firstQualityBitrate") @@ -414,6 +480,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountFilterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -439,6 +509,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'media_services_account_name'") __props__.__dict__["media_services_account_name"] = media_services_account_name __props__.__dict__["name"] = name + if presentation_time_range is not None and not isinstance(presentation_time_range, AccountFilterPresentationTimeRangeArgs): + presentation_time_range = presentation_time_range or {} + def _setter(key, value): + presentation_time_range[key] = value + AccountFilterPresentationTimeRangeArgs._configure(_setter, **presentation_time_range) __props__.__dict__["presentation_time_range"] = presentation_time_range if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") diff --git a/sdk/python/pulumi_azure/media/asset.py b/sdk/python/pulumi_azure/media/asset.py index 5a849577b9..64b3cca724 100644 --- a/sdk/python/pulumi_azure/media/asset.py +++ b/sdk/python/pulumi_azure/media/asset.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AssetArgs', 'Asset'] @@ -31,18 +31,53 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Media Asset. Changing this forces a new Media Asset to be created. :param pulumi.Input[str] storage_account_name: The name of the storage account where to store the media asset. Changing this forces a new Media Asset to be created. """ - pulumi.set(__self__, "media_services_account_name", media_services_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + AssetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + media_services_account_name=media_services_account_name, + resource_group_name=resource_group_name, + alternate_id=alternate_id, + container=container, + description=description, + name=name, + storage_account_name=storage_account_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + media_services_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + alternate_id: Optional[pulumi.Input[str]] = None, + container: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if media_services_account_name is None: + raise TypeError("Missing 'media_services_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if alternate_id is None and 'alternateId' in kwargs: + alternate_id = kwargs['alternateId'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + + _setter("media_services_account_name", media_services_account_name) + _setter("resource_group_name", resource_group_name) if alternate_id is not None: - pulumi.set(__self__, "alternate_id", alternate_id) + _setter("alternate_id", alternate_id) if container is not None: - pulumi.set(__self__, "container", container) + _setter("container", container) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) @property @pulumi.getter(name="mediaServicesAccountName") @@ -149,20 +184,51 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Media Asset should exist. Changing this forces a new Media Asset to be created. :param pulumi.Input[str] storage_account_name: The name of the storage account where to store the media asset. Changing this forces a new Media Asset to be created. """ + _AssetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alternate_id=alternate_id, + container=container, + description=description, + media_services_account_name=media_services_account_name, + name=name, + resource_group_name=resource_group_name, + storage_account_name=storage_account_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alternate_id: Optional[pulumi.Input[str]] = None, + container: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + media_services_account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alternate_id is None and 'alternateId' in kwargs: + alternate_id = kwargs['alternateId'] + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if alternate_id is not None: - pulumi.set(__self__, "alternate_id", alternate_id) + _setter("alternate_id", alternate_id) if container is not None: - pulumi.set(__self__, "container", container) + _setter("container", container) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if media_services_account_name is not None: - pulumi.set(__self__, "media_services_account_name", media_services_account_name) + _setter("media_services_account_name", media_services_account_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) @property @pulumi.getter(name="alternateId") @@ -360,6 +426,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AssetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/media/asset_filter.py b/sdk/python/pulumi_azure/media/asset_filter.py index cbddba453c..163881fc55 100644 --- a/sdk/python/pulumi_azure/media/asset_filter.py +++ b/sdk/python/pulumi_azure/media/asset_filter.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,15 +29,44 @@ def __init__(__self__, *, :param pulumi.Input['AssetFilterPresentationTimeRangeArgs'] presentation_time_range: A `presentation_time_range` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['AssetFilterTrackSelectionArgs']]] track_selections: One or more `track_selection` blocks as defined below. """ - pulumi.set(__self__, "asset_id", asset_id) + AssetFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + asset_id=asset_id, + first_quality_bitrate=first_quality_bitrate, + name=name, + presentation_time_range=presentation_time_range, + track_selections=track_selections, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asset_id: Optional[pulumi.Input[str]] = None, + first_quality_bitrate: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + presentation_time_range: Optional[pulumi.Input['AssetFilterPresentationTimeRangeArgs']] = None, + track_selections: Optional[pulumi.Input[Sequence[pulumi.Input['AssetFilterTrackSelectionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if asset_id is None and 'assetId' in kwargs: + asset_id = kwargs['assetId'] + if asset_id is None: + raise TypeError("Missing 'asset_id' argument") + if first_quality_bitrate is None and 'firstQualityBitrate' in kwargs: + first_quality_bitrate = kwargs['firstQualityBitrate'] + if presentation_time_range is None and 'presentationTimeRange' in kwargs: + presentation_time_range = kwargs['presentationTimeRange'] + if track_selections is None and 'trackSelections' in kwargs: + track_selections = kwargs['trackSelections'] + + _setter("asset_id", asset_id) if first_quality_bitrate is not None: - pulumi.set(__self__, "first_quality_bitrate", first_quality_bitrate) + _setter("first_quality_bitrate", first_quality_bitrate) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if presentation_time_range is not None: - pulumi.set(__self__, "presentation_time_range", presentation_time_range) + _setter("presentation_time_range", presentation_time_range) if track_selections is not None: - pulumi.set(__self__, "track_selections", track_selections) + _setter("track_selections", track_selections) @property @pulumi.getter(name="assetId") @@ -116,16 +145,43 @@ def __init__(__self__, *, :param pulumi.Input['AssetFilterPresentationTimeRangeArgs'] presentation_time_range: A `presentation_time_range` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['AssetFilterTrackSelectionArgs']]] track_selections: One or more `track_selection` blocks as defined below. """ + _AssetFilterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + asset_id=asset_id, + first_quality_bitrate=first_quality_bitrate, + name=name, + presentation_time_range=presentation_time_range, + track_selections=track_selections, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asset_id: Optional[pulumi.Input[str]] = None, + first_quality_bitrate: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + presentation_time_range: Optional[pulumi.Input['AssetFilterPresentationTimeRangeArgs']] = None, + track_selections: Optional[pulumi.Input[Sequence[pulumi.Input['AssetFilterTrackSelectionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if asset_id is None and 'assetId' in kwargs: + asset_id = kwargs['assetId'] + if first_quality_bitrate is None and 'firstQualityBitrate' in kwargs: + first_quality_bitrate = kwargs['firstQualityBitrate'] + if presentation_time_range is None and 'presentationTimeRange' in kwargs: + presentation_time_range = kwargs['presentationTimeRange'] + if track_selections is None and 'trackSelections' in kwargs: + track_selections = kwargs['trackSelections'] + if asset_id is not None: - pulumi.set(__self__, "asset_id", asset_id) + _setter("asset_id", asset_id) if first_quality_bitrate is not None: - pulumi.set(__self__, "first_quality_bitrate", first_quality_bitrate) + _setter("first_quality_bitrate", first_quality_bitrate) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if presentation_time_range is not None: - pulumi.set(__self__, "presentation_time_range", presentation_time_range) + _setter("presentation_time_range", presentation_time_range) if track_selections is not None: - pulumi.set(__self__, "track_selections", track_selections) + _setter("track_selections", track_selections) @property @pulumi.getter(name="assetId") @@ -387,6 +443,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AssetFilterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -411,6 +471,11 @@ def _internal_init(__self__, __props__.__dict__["asset_id"] = asset_id __props__.__dict__["first_quality_bitrate"] = first_quality_bitrate __props__.__dict__["name"] = name + if presentation_time_range is not None and not isinstance(presentation_time_range, AssetFilterPresentationTimeRangeArgs): + presentation_time_range = presentation_time_range or {} + def _setter(key, value): + presentation_time_range[key] = value + AssetFilterPresentationTimeRangeArgs._configure(_setter, **presentation_time_range) __props__.__dict__["presentation_time_range"] = presentation_time_range __props__.__dict__["track_selections"] = track_selections super(AssetFilter, __self__).__init__( diff --git a/sdk/python/pulumi_azure/media/content_key_policy.py b/sdk/python/pulumi_azure/media/content_key_policy.py index 17bdf752ac..b6dbc28284 100644 --- a/sdk/python/pulumi_azure/media/content_key_policy.py +++ b/sdk/python/pulumi_azure/media/content_key_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,13 +29,44 @@ def __init__(__self__, *, :param pulumi.Input[str] description: A description for the Policy. :param pulumi.Input[str] name: The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created. """ - pulumi.set(__self__, "media_services_account_name", media_services_account_name) - pulumi.set(__self__, "policy_options", policy_options) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ContentKeyPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + media_services_account_name=media_services_account_name, + policy_options=policy_options, + resource_group_name=resource_group_name, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + media_services_account_name: Optional[pulumi.Input[str]] = None, + policy_options: Optional[pulumi.Input[Sequence[pulumi.Input['ContentKeyPolicyPolicyOptionArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if media_services_account_name is None: + raise TypeError("Missing 'media_services_account_name' argument") + if policy_options is None and 'policyOptions' in kwargs: + policy_options = kwargs['policyOptions'] + if policy_options is None: + raise TypeError("Missing 'policy_options' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("media_services_account_name", media_services_account_name) + _setter("policy_options", policy_options) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="mediaServicesAccountName") @@ -114,16 +145,41 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ContentKeyPolicyPolicyOptionArgs']]] policy_options: One or more `policy_option` blocks as defined below. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created. """ + _ContentKeyPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + media_services_account_name=media_services_account_name, + name=name, + policy_options=policy_options, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + media_services_account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_options: Optional[pulumi.Input[Sequence[pulumi.Input['ContentKeyPolicyPolicyOptionArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if policy_options is None and 'policyOptions' in kwargs: + policy_options = kwargs['policyOptions'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if media_services_account_name is not None: - pulumi.set(__self__, "media_services_account_name", media_services_account_name) + _setter("media_services_account_name", media_services_account_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_options is not None: - pulumi.set(__self__, "policy_options", policy_options) + _setter("policy_options", policy_options) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter @@ -451,6 +507,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ContentKeyPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/media/job.py b/sdk/python/pulumi_azure/media/job.py index 2b31607414..6f022fe2bd 100644 --- a/sdk/python/pulumi_azure/media/job.py +++ b/sdk/python/pulumi_azure/media/job.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,17 +35,62 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Media Job. Changing this forces a new Media Job to be created. :param pulumi.Input[str] priority: Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not set, the default is normal. Changing this forces a new Media Job to be created. Possible values are `High`, `Normal` and `Low`. """ - pulumi.set(__self__, "input_asset", input_asset) - pulumi.set(__self__, "media_services_account_name", media_services_account_name) - pulumi.set(__self__, "output_assets", output_assets) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "transform_name", transform_name) + JobArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + input_asset=input_asset, + media_services_account_name=media_services_account_name, + output_assets=output_assets, + resource_group_name=resource_group_name, + transform_name=transform_name, + description=description, + name=name, + priority=priority, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + input_asset: Optional[pulumi.Input['JobInputAssetArgs']] = None, + media_services_account_name: Optional[pulumi.Input[str]] = None, + output_assets: Optional[pulumi.Input[Sequence[pulumi.Input['JobOutputAssetArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + transform_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if input_asset is None and 'inputAsset' in kwargs: + input_asset = kwargs['inputAsset'] + if input_asset is None: + raise TypeError("Missing 'input_asset' argument") + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if media_services_account_name is None: + raise TypeError("Missing 'media_services_account_name' argument") + if output_assets is None and 'outputAssets' in kwargs: + output_assets = kwargs['outputAssets'] + if output_assets is None: + raise TypeError("Missing 'output_assets' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if transform_name is None and 'transformName' in kwargs: + transform_name = kwargs['transformName'] + if transform_name is None: + raise TypeError("Missing 'transform_name' argument") + + _setter("input_asset", input_asset) + _setter("media_services_account_name", media_services_account_name) + _setter("output_assets", output_assets) + _setter("resource_group_name", resource_group_name) + _setter("transform_name", transform_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) @property @pulumi.getter(name="inputAsset") @@ -166,22 +211,57 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Media Job should exist. Changing this forces a new Media Job to be created. :param pulumi.Input[str] transform_name: The Transform name. Changing this forces a new Media Job to be created. """ + _JobState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + input_asset=input_asset, + media_services_account_name=media_services_account_name, + name=name, + output_assets=output_assets, + priority=priority, + resource_group_name=resource_group_name, + transform_name=transform_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + input_asset: Optional[pulumi.Input['JobInputAssetArgs']] = None, + media_services_account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + output_assets: Optional[pulumi.Input[Sequence[pulumi.Input['JobOutputAssetArgs']]]] = None, + priority: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + transform_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if input_asset is None and 'inputAsset' in kwargs: + input_asset = kwargs['inputAsset'] + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if output_assets is None and 'outputAssets' in kwargs: + output_assets = kwargs['outputAssets'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if transform_name is None and 'transformName' in kwargs: + transform_name = kwargs['transformName'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if input_asset is not None: - pulumi.set(__self__, "input_asset", input_asset) + _setter("input_asset", input_asset) if media_services_account_name is not None: - pulumi.set(__self__, "media_services_account_name", media_services_account_name) + _setter("media_services_account_name", media_services_account_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if output_assets is not None: - pulumi.set(__self__, "output_assets", output_assets) + _setter("output_assets", output_assets) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if transform_name is not None: - pulumi.set(__self__, "transform_name", transform_name) + _setter("transform_name", transform_name) @property @pulumi.getter @@ -447,6 +527,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + JobArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -470,6 +554,11 @@ def _internal_init(__self__, __props__ = JobArgs.__new__(JobArgs) __props__.__dict__["description"] = description + if input_asset is not None and not isinstance(input_asset, JobInputAssetArgs): + input_asset = input_asset or {} + def _setter(key, value): + input_asset[key] = value + JobInputAssetArgs._configure(_setter, **input_asset) if input_asset is None and not opts.urn: raise TypeError("Missing required property 'input_asset'") __props__.__dict__["input_asset"] = input_asset diff --git a/sdk/python/pulumi_azure/media/live_event.py b/sdk/python/pulumi_azure/media/live_event.py index aa846076d1..9df2493692 100644 --- a/sdk/python/pulumi_azure/media/live_event.py +++ b/sdk/python/pulumi_azure/media/live_event.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,33 +49,94 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] transcription_languages: Specifies a list of languages (locale) to be used for speech-to-text transcription – it should match the spoken language in the audio track. The value should be in `BCP-47` format (e.g: `en-US`). [See the Microsoft Documentation for more information about the live transcription feature and the list of supported languages](https://go.microsoft.com/fwlink/?linkid=2133742 ). :param pulumi.Input[bool] use_static_hostname: Specifies whether a static hostname would be assigned to the live event preview and ingest endpoints. Changing this forces a new Live Event to be created. """ - pulumi.set(__self__, "input", input) - pulumi.set(__self__, "media_services_account_name", media_services_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + LiveEventArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + input=input, + media_services_account_name=media_services_account_name, + resource_group_name=resource_group_name, + auto_start_enabled=auto_start_enabled, + cross_site_access_policy=cross_site_access_policy, + description=description, + encoding=encoding, + hostname_prefix=hostname_prefix, + location=location, + name=name, + preview=preview, + stream_options=stream_options, + tags=tags, + transcription_languages=transcription_languages, + use_static_hostname=use_static_hostname, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + input: Optional[pulumi.Input['LiveEventInputArgs']] = None, + media_services_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + auto_start_enabled: Optional[pulumi.Input[bool]] = None, + cross_site_access_policy: Optional[pulumi.Input['LiveEventCrossSiteAccessPolicyArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input['LiveEventEncodingArgs']] = None, + hostname_prefix: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + preview: Optional[pulumi.Input['LiveEventPreviewArgs']] = None, + stream_options: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + transcription_languages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + use_static_hostname: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if input is None: + raise TypeError("Missing 'input' argument") + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if media_services_account_name is None: + raise TypeError("Missing 'media_services_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if auto_start_enabled is None and 'autoStartEnabled' in kwargs: + auto_start_enabled = kwargs['autoStartEnabled'] + if cross_site_access_policy is None and 'crossSiteAccessPolicy' in kwargs: + cross_site_access_policy = kwargs['crossSiteAccessPolicy'] + if hostname_prefix is None and 'hostnamePrefix' in kwargs: + hostname_prefix = kwargs['hostnamePrefix'] + if stream_options is None and 'streamOptions' in kwargs: + stream_options = kwargs['streamOptions'] + if transcription_languages is None and 'transcriptionLanguages' in kwargs: + transcription_languages = kwargs['transcriptionLanguages'] + if use_static_hostname is None and 'useStaticHostname' in kwargs: + use_static_hostname = kwargs['useStaticHostname'] + + _setter("input", input) + _setter("media_services_account_name", media_services_account_name) + _setter("resource_group_name", resource_group_name) if auto_start_enabled is not None: - pulumi.set(__self__, "auto_start_enabled", auto_start_enabled) + _setter("auto_start_enabled", auto_start_enabled) if cross_site_access_policy is not None: - pulumi.set(__self__, "cross_site_access_policy", cross_site_access_policy) + _setter("cross_site_access_policy", cross_site_access_policy) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if hostname_prefix is not None: - pulumi.set(__self__, "hostname_prefix", hostname_prefix) + _setter("hostname_prefix", hostname_prefix) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if preview is not None: - pulumi.set(__self__, "preview", preview) + _setter("preview", preview) if stream_options is not None: - pulumi.set(__self__, "stream_options", stream_options) + _setter("stream_options", stream_options) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if transcription_languages is not None: - pulumi.set(__self__, "transcription_languages", transcription_languages) + _setter("transcription_languages", transcription_languages) if use_static_hostname is not None: - pulumi.set(__self__, "use_static_hostname", use_static_hostname) + _setter("use_static_hostname", use_static_hostname) @property @pulumi.getter @@ -294,36 +355,91 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] transcription_languages: Specifies a list of languages (locale) to be used for speech-to-text transcription – it should match the spoken language in the audio track. The value should be in `BCP-47` format (e.g: `en-US`). [See the Microsoft Documentation for more information about the live transcription feature and the list of supported languages](https://go.microsoft.com/fwlink/?linkid=2133742 ). :param pulumi.Input[bool] use_static_hostname: Specifies whether a static hostname would be assigned to the live event preview and ingest endpoints. Changing this forces a new Live Event to be created. """ + _LiveEventState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_start_enabled=auto_start_enabled, + cross_site_access_policy=cross_site_access_policy, + description=description, + encoding=encoding, + hostname_prefix=hostname_prefix, + input=input, + location=location, + media_services_account_name=media_services_account_name, + name=name, + preview=preview, + resource_group_name=resource_group_name, + stream_options=stream_options, + tags=tags, + transcription_languages=transcription_languages, + use_static_hostname=use_static_hostname, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_start_enabled: Optional[pulumi.Input[bool]] = None, + cross_site_access_policy: Optional[pulumi.Input['LiveEventCrossSiteAccessPolicyArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input['LiveEventEncodingArgs']] = None, + hostname_prefix: Optional[pulumi.Input[str]] = None, + input: Optional[pulumi.Input['LiveEventInputArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + media_services_account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + preview: Optional[pulumi.Input['LiveEventPreviewArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + stream_options: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + transcription_languages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + use_static_hostname: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_start_enabled is None and 'autoStartEnabled' in kwargs: + auto_start_enabled = kwargs['autoStartEnabled'] + if cross_site_access_policy is None and 'crossSiteAccessPolicy' in kwargs: + cross_site_access_policy = kwargs['crossSiteAccessPolicy'] + if hostname_prefix is None and 'hostnamePrefix' in kwargs: + hostname_prefix = kwargs['hostnamePrefix'] + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if stream_options is None and 'streamOptions' in kwargs: + stream_options = kwargs['streamOptions'] + if transcription_languages is None and 'transcriptionLanguages' in kwargs: + transcription_languages = kwargs['transcriptionLanguages'] + if use_static_hostname is None and 'useStaticHostname' in kwargs: + use_static_hostname = kwargs['useStaticHostname'] + if auto_start_enabled is not None: - pulumi.set(__self__, "auto_start_enabled", auto_start_enabled) + _setter("auto_start_enabled", auto_start_enabled) if cross_site_access_policy is not None: - pulumi.set(__self__, "cross_site_access_policy", cross_site_access_policy) + _setter("cross_site_access_policy", cross_site_access_policy) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if hostname_prefix is not None: - pulumi.set(__self__, "hostname_prefix", hostname_prefix) + _setter("hostname_prefix", hostname_prefix) if input is not None: - pulumi.set(__self__, "input", input) + _setter("input", input) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if media_services_account_name is not None: - pulumi.set(__self__, "media_services_account_name", media_services_account_name) + _setter("media_services_account_name", media_services_account_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if preview is not None: - pulumi.set(__self__, "preview", preview) + _setter("preview", preview) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if stream_options is not None: - pulumi.set(__self__, "stream_options", stream_options) + _setter("stream_options", stream_options) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if transcription_languages is not None: - pulumi.set(__self__, "transcription_languages", transcription_languages) + _setter("transcription_languages", transcription_languages) if use_static_hostname is not None: - pulumi.set(__self__, "use_static_hostname", use_static_hostname) + _setter("use_static_hostname", use_static_hostname) @property @pulumi.getter(name="autoStartEnabled") @@ -685,6 +801,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LiveEventArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -715,10 +835,25 @@ def _internal_init(__self__, __props__ = LiveEventArgs.__new__(LiveEventArgs) __props__.__dict__["auto_start_enabled"] = auto_start_enabled + if cross_site_access_policy is not None and not isinstance(cross_site_access_policy, LiveEventCrossSiteAccessPolicyArgs): + cross_site_access_policy = cross_site_access_policy or {} + def _setter(key, value): + cross_site_access_policy[key] = value + LiveEventCrossSiteAccessPolicyArgs._configure(_setter, **cross_site_access_policy) __props__.__dict__["cross_site_access_policy"] = cross_site_access_policy __props__.__dict__["description"] = description + if encoding is not None and not isinstance(encoding, LiveEventEncodingArgs): + encoding = encoding or {} + def _setter(key, value): + encoding[key] = value + LiveEventEncodingArgs._configure(_setter, **encoding) __props__.__dict__["encoding"] = encoding __props__.__dict__["hostname_prefix"] = hostname_prefix + if input is not None and not isinstance(input, LiveEventInputArgs): + input = input or {} + def _setter(key, value): + input[key] = value + LiveEventInputArgs._configure(_setter, **input) if input is None and not opts.urn: raise TypeError("Missing required property 'input'") __props__.__dict__["input"] = input @@ -727,6 +862,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'media_services_account_name'") __props__.__dict__["media_services_account_name"] = media_services_account_name __props__.__dict__["name"] = name + if preview is not None and not isinstance(preview, LiveEventPreviewArgs): + preview = preview or {} + def _setter(key, value): + preview[key] = value + LiveEventPreviewArgs._configure(_setter, **preview) __props__.__dict__["preview"] = preview if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") diff --git a/sdk/python/pulumi_azure/media/live_event_output.py b/sdk/python/pulumi_azure/media/live_event_output.py index d3d4a4f98d..443375176d 100644 --- a/sdk/python/pulumi_azure/media/live_event_output.py +++ b/sdk/python/pulumi_azure/media/live_event_output.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LiveEventOutputArgs', 'LiveEventOutput'] @@ -34,21 +34,68 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Live Event Output. Changing this forces a new Live Output to be created. :param pulumi.Input[int] output_snap_time_in_seconds: The initial timestamp that the live output will start at, any content before this value will not be archived. Changing this forces a new Live Output to be created. """ - pulumi.set(__self__, "archive_window_duration", archive_window_duration) - pulumi.set(__self__, "asset_name", asset_name) - pulumi.set(__self__, "live_event_id", live_event_id) + LiveEventOutputArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + archive_window_duration=archive_window_duration, + asset_name=asset_name, + live_event_id=live_event_id, + description=description, + hls_fragments_per_ts_segment=hls_fragments_per_ts_segment, + manifest_name=manifest_name, + name=name, + output_snap_time_in_seconds=output_snap_time_in_seconds, + rewind_window_duration=rewind_window_duration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + archive_window_duration: Optional[pulumi.Input[str]] = None, + asset_name: Optional[pulumi.Input[str]] = None, + live_event_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + hls_fragments_per_ts_segment: Optional[pulumi.Input[int]] = None, + manifest_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + output_snap_time_in_seconds: Optional[pulumi.Input[int]] = None, + rewind_window_duration: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if archive_window_duration is None and 'archiveWindowDuration' in kwargs: + archive_window_duration = kwargs['archiveWindowDuration'] + if archive_window_duration is None: + raise TypeError("Missing 'archive_window_duration' argument") + if asset_name is None and 'assetName' in kwargs: + asset_name = kwargs['assetName'] + if asset_name is None: + raise TypeError("Missing 'asset_name' argument") + if live_event_id is None and 'liveEventId' in kwargs: + live_event_id = kwargs['liveEventId'] + if live_event_id is None: + raise TypeError("Missing 'live_event_id' argument") + if hls_fragments_per_ts_segment is None and 'hlsFragmentsPerTsSegment' in kwargs: + hls_fragments_per_ts_segment = kwargs['hlsFragmentsPerTsSegment'] + if manifest_name is None and 'manifestName' in kwargs: + manifest_name = kwargs['manifestName'] + if output_snap_time_in_seconds is None and 'outputSnapTimeInSeconds' in kwargs: + output_snap_time_in_seconds = kwargs['outputSnapTimeInSeconds'] + if rewind_window_duration is None and 'rewindWindowDuration' in kwargs: + rewind_window_duration = kwargs['rewindWindowDuration'] + + _setter("archive_window_duration", archive_window_duration) + _setter("asset_name", asset_name) + _setter("live_event_id", live_event_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if hls_fragments_per_ts_segment is not None: - pulumi.set(__self__, "hls_fragments_per_ts_segment", hls_fragments_per_ts_segment) + _setter("hls_fragments_per_ts_segment", hls_fragments_per_ts_segment) if manifest_name is not None: - pulumi.set(__self__, "manifest_name", manifest_name) + _setter("manifest_name", manifest_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if output_snap_time_in_seconds is not None: - pulumi.set(__self__, "output_snap_time_in_seconds", output_snap_time_in_seconds) + _setter("output_snap_time_in_seconds", output_snap_time_in_seconds) if rewind_window_duration is not None: - pulumi.set(__self__, "rewind_window_duration", rewind_window_duration) + _setter("rewind_window_duration", rewind_window_duration) @property @pulumi.getter(name="archiveWindowDuration") @@ -179,24 +226,65 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Live Event Output. Changing this forces a new Live Output to be created. :param pulumi.Input[int] output_snap_time_in_seconds: The initial timestamp that the live output will start at, any content before this value will not be archived. Changing this forces a new Live Output to be created. """ + _LiveEventOutputState._configure( + lambda key, value: pulumi.set(__self__, key, value), + archive_window_duration=archive_window_duration, + asset_name=asset_name, + description=description, + hls_fragments_per_ts_segment=hls_fragments_per_ts_segment, + live_event_id=live_event_id, + manifest_name=manifest_name, + name=name, + output_snap_time_in_seconds=output_snap_time_in_seconds, + rewind_window_duration=rewind_window_duration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + archive_window_duration: Optional[pulumi.Input[str]] = None, + asset_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + hls_fragments_per_ts_segment: Optional[pulumi.Input[int]] = None, + live_event_id: Optional[pulumi.Input[str]] = None, + manifest_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + output_snap_time_in_seconds: Optional[pulumi.Input[int]] = None, + rewind_window_duration: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if archive_window_duration is None and 'archiveWindowDuration' in kwargs: + archive_window_duration = kwargs['archiveWindowDuration'] + if asset_name is None and 'assetName' in kwargs: + asset_name = kwargs['assetName'] + if hls_fragments_per_ts_segment is None and 'hlsFragmentsPerTsSegment' in kwargs: + hls_fragments_per_ts_segment = kwargs['hlsFragmentsPerTsSegment'] + if live_event_id is None and 'liveEventId' in kwargs: + live_event_id = kwargs['liveEventId'] + if manifest_name is None and 'manifestName' in kwargs: + manifest_name = kwargs['manifestName'] + if output_snap_time_in_seconds is None and 'outputSnapTimeInSeconds' in kwargs: + output_snap_time_in_seconds = kwargs['outputSnapTimeInSeconds'] + if rewind_window_duration is None and 'rewindWindowDuration' in kwargs: + rewind_window_duration = kwargs['rewindWindowDuration'] + if archive_window_duration is not None: - pulumi.set(__self__, "archive_window_duration", archive_window_duration) + _setter("archive_window_duration", archive_window_duration) if asset_name is not None: - pulumi.set(__self__, "asset_name", asset_name) + _setter("asset_name", asset_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if hls_fragments_per_ts_segment is not None: - pulumi.set(__self__, "hls_fragments_per_ts_segment", hls_fragments_per_ts_segment) + _setter("hls_fragments_per_ts_segment", hls_fragments_per_ts_segment) if live_event_id is not None: - pulumi.set(__self__, "live_event_id", live_event_id) + _setter("live_event_id", live_event_id) if manifest_name is not None: - pulumi.set(__self__, "manifest_name", manifest_name) + _setter("manifest_name", manifest_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if output_snap_time_in_seconds is not None: - pulumi.set(__self__, "output_snap_time_in_seconds", output_snap_time_in_seconds) + _setter("output_snap_time_in_seconds", output_snap_time_in_seconds) if rewind_window_duration is not None: - pulumi.set(__self__, "rewind_window_duration", rewind_window_duration) + _setter("rewind_window_duration", rewind_window_duration) @property @pulumi.getter(name="archiveWindowDuration") @@ -462,6 +550,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LiveEventOutputArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/media/outputs.py b/sdk/python/pulumi_azure/media/outputs.py index aed41b9f1b..f6532d3416 100644 --- a/sdk/python/pulumi_azure/media/outputs.py +++ b/sdk/python/pulumi_azure/media/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -152,17 +152,52 @@ def __init__(__self__, *, :param int presentation_window_in_units: The relative to end sliding window. Applies to Live Streaming only. Use `presentation_window_in_units` to apply a sliding window of fragments to include in a playlist. The unit is defined by `unit_timescale_in_milliseconds`. For example, set `presentation_window_in_units` to 120 to apply a two-minute sliding window. Media within 2 minutes of the live edge will be included in the playlist. If a fragment straddles the boundary, the entire fragment will be included in the playlist. The minimum presentation window duration is 60 seconds. :param int start_in_units: The absolute start time boundary. Applies to Video on Demand (VoD) or Live Streaming. This is a long value that represents an absolute start point of the stream. The value gets rounded to the closest next GOP start. The unit is defined by `unit_timescale_in_milliseconds`, so a `start_in_units` of 15 would be for 15 seconds. Use `start_in_units` and `end_in_units` to trim the fragments that will be in the playlist (manifest). For example, `start_in_units` set to 20 and `end_in_units` set to 60 using `unit_timescale_in_milliseconds` in 1000 will generate a playlist that contains fragments from between 20 seconds and 60 seconds of the VoD presentation. If a fragment straddles the boundary, the entire fragment will be included in the manifest. """ - pulumi.set(__self__, "unit_timescale_in_milliseconds", unit_timescale_in_milliseconds) + AccountFilterPresentationTimeRange._configure( + lambda key, value: pulumi.set(__self__, key, value), + unit_timescale_in_milliseconds=unit_timescale_in_milliseconds, + end_in_units=end_in_units, + force_end=force_end, + live_backoff_in_units=live_backoff_in_units, + presentation_window_in_units=presentation_window_in_units, + start_in_units=start_in_units, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + unit_timescale_in_milliseconds: Optional[int] = None, + end_in_units: Optional[int] = None, + force_end: Optional[bool] = None, + live_backoff_in_units: Optional[int] = None, + presentation_window_in_units: Optional[int] = None, + start_in_units: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if unit_timescale_in_milliseconds is None and 'unitTimescaleInMilliseconds' in kwargs: + unit_timescale_in_milliseconds = kwargs['unitTimescaleInMilliseconds'] + if unit_timescale_in_milliseconds is None: + raise TypeError("Missing 'unit_timescale_in_milliseconds' argument") + if end_in_units is None and 'endInUnits' in kwargs: + end_in_units = kwargs['endInUnits'] + if force_end is None and 'forceEnd' in kwargs: + force_end = kwargs['forceEnd'] + if live_backoff_in_units is None and 'liveBackoffInUnits' in kwargs: + live_backoff_in_units = kwargs['liveBackoffInUnits'] + if presentation_window_in_units is None and 'presentationWindowInUnits' in kwargs: + presentation_window_in_units = kwargs['presentationWindowInUnits'] + if start_in_units is None and 'startInUnits' in kwargs: + start_in_units = kwargs['startInUnits'] + + _setter("unit_timescale_in_milliseconds", unit_timescale_in_milliseconds) if end_in_units is not None: - pulumi.set(__self__, "end_in_units", end_in_units) + _setter("end_in_units", end_in_units) if force_end is not None: - pulumi.set(__self__, "force_end", force_end) + _setter("force_end", force_end) if live_backoff_in_units is not None: - pulumi.set(__self__, "live_backoff_in_units", live_backoff_in_units) + _setter("live_backoff_in_units", live_backoff_in_units) if presentation_window_in_units is not None: - pulumi.set(__self__, "presentation_window_in_units", presentation_window_in_units) + _setter("presentation_window_in_units", presentation_window_in_units) if start_in_units is not None: - pulumi.set(__self__, "start_in_units", start_in_units) + _setter("start_in_units", start_in_units) @property @pulumi.getter(name="unitTimescaleInMilliseconds") @@ -222,7 +257,20 @@ def __init__(__self__, *, """ :param Sequence['AccountFilterTrackSelectionConditionArgs'] conditions: One or more `selection` blocks as defined above. """ - pulumi.set(__self__, "conditions", conditions) + AccountFilterTrackSelection._configure( + lambda key, value: pulumi.set(__self__, key, value), + conditions=conditions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + conditions: Optional[Sequence['outputs.AccountFilterTrackSelectionCondition']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if conditions is None: + raise TypeError("Missing 'conditions' argument") + + _setter("conditions", conditions) @property @pulumi.getter @@ -244,9 +292,30 @@ def __init__(__self__, *, :param str property: The track property to compare. Supported values are `Bitrate`, `FourCC`, `Language`, `Name` and `Type`. Check [documentation](https://docs.microsoft.com/azure/media-services/latest/filters-concept) for more details. :param str value: The track property value to match or not match. """ - pulumi.set(__self__, "operation", operation) - pulumi.set(__self__, "property", property) - pulumi.set(__self__, "value", value) + AccountFilterTrackSelectionCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operation=operation, + property=property, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operation: Optional[str] = None, + property: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operation is None: + raise TypeError("Missing 'operation' argument") + if property is None: + raise TypeError("Missing 'property' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("operation", operation) + _setter("property", property) + _setter("value", value) @property @pulumi.getter @@ -319,18 +388,51 @@ def __init__(__self__, *, :param int start_in_units: The absolute start time boundary. Applies to Video on Demand (VoD) or Live Streaming. This is a long value that represents an absolute start point of the stream. The value gets rounded to the closest next GOP start. The unit is defined by `unit_timescale_in_miliseconds`, so a `start_in_units` of 15 would be for 15 seconds. Use `start_in_units` and `end_in_units` to trim the fragments that will be in the playlist (manifest). For example, `start_in_units` set to 20 and `end_in_units` set to 60 using `unit_timescale_in_miliseconds` in 1000 will generate a playlist that contains fragments from between 20 seconds and 60 seconds of the VoD presentation. If a fragment straddles the boundary, the entire fragment will be included in the manifest. :param int unit_timescale_in_miliseconds: Specified as the number of miliseconds in one unit timescale. For example, if you want to set a `start_in_units` at 30 seconds, you would use a value of 30 when using the `unit_timescale_in_miliseconds` in 1000. Or if you want to set `start_in_units` in 30 miliseconds, you would use a value of 30 when using the `unit_timescale_in_miliseconds` in 1. Applies timescale to `start_in_units`, `start_timescale` and `presentation_window_in_timescale` and `live_backoff_in_timescale`. """ + AssetFilterPresentationTimeRange._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_in_units=end_in_units, + force_end=force_end, + live_backoff_in_units=live_backoff_in_units, + presentation_window_in_units=presentation_window_in_units, + start_in_units=start_in_units, + unit_timescale_in_miliseconds=unit_timescale_in_miliseconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_in_units: Optional[int] = None, + force_end: Optional[bool] = None, + live_backoff_in_units: Optional[int] = None, + presentation_window_in_units: Optional[int] = None, + start_in_units: Optional[int] = None, + unit_timescale_in_miliseconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_in_units is None and 'endInUnits' in kwargs: + end_in_units = kwargs['endInUnits'] + if force_end is None and 'forceEnd' in kwargs: + force_end = kwargs['forceEnd'] + if live_backoff_in_units is None and 'liveBackoffInUnits' in kwargs: + live_backoff_in_units = kwargs['liveBackoffInUnits'] + if presentation_window_in_units is None and 'presentationWindowInUnits' in kwargs: + presentation_window_in_units = kwargs['presentationWindowInUnits'] + if start_in_units is None and 'startInUnits' in kwargs: + start_in_units = kwargs['startInUnits'] + if unit_timescale_in_miliseconds is None and 'unitTimescaleInMiliseconds' in kwargs: + unit_timescale_in_miliseconds = kwargs['unitTimescaleInMiliseconds'] + if end_in_units is not None: - pulumi.set(__self__, "end_in_units", end_in_units) + _setter("end_in_units", end_in_units) if force_end is not None: - pulumi.set(__self__, "force_end", force_end) + _setter("force_end", force_end) if live_backoff_in_units is not None: - pulumi.set(__self__, "live_backoff_in_units", live_backoff_in_units) + _setter("live_backoff_in_units", live_backoff_in_units) if presentation_window_in_units is not None: - pulumi.set(__self__, "presentation_window_in_units", presentation_window_in_units) + _setter("presentation_window_in_units", presentation_window_in_units) if start_in_units is not None: - pulumi.set(__self__, "start_in_units", start_in_units) + _setter("start_in_units", start_in_units) if unit_timescale_in_miliseconds is not None: - pulumi.set(__self__, "unit_timescale_in_miliseconds", unit_timescale_in_miliseconds) + _setter("unit_timescale_in_miliseconds", unit_timescale_in_miliseconds) @property @pulumi.getter(name="endInUnits") @@ -390,7 +492,20 @@ def __init__(__self__, *, """ :param Sequence['AssetFilterTrackSelectionConditionArgs'] conditions: One or more `condition` blocks as defined above. """ - pulumi.set(__self__, "conditions", conditions) + AssetFilterTrackSelection._configure( + lambda key, value: pulumi.set(__self__, key, value), + conditions=conditions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + conditions: Optional[Sequence['outputs.AssetFilterTrackSelectionCondition']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if conditions is None: + raise TypeError("Missing 'conditions' argument") + + _setter("conditions", conditions) @property @pulumi.getter @@ -412,12 +527,27 @@ def __init__(__self__, *, :param str property: The track property to compare. Supported values are `Bitrate`, `FourCC`, `Language`, `Name` and `Type`. Check [documentation](https://docs.microsoft.com/azure/media-services/latest/filters-concept) for more details. :param str value: The track property value to match or not match. """ + AssetFilterTrackSelectionCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operation=operation, + property=property, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operation: Optional[str] = None, + property: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operation is not None: - pulumi.set(__self__, "operation", operation) + _setter("operation", operation) if property is not None: - pulumi.set(__self__, "property", property) + _setter("property", property) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -496,21 +626,62 @@ def __init__(__self__, *, > **NOTE:** Each policy_option can only have one type of configuration: `fairplay_configuration`, `clear_key_configuration_enabled`, `playready_configuration_license` or `widevine_configuration_template`. And is possible to assign only one type of restriction: `open_restriction_enabled` or `token_restriction`. """ - pulumi.set(__self__, "name", name) + ContentKeyPolicyPolicyOption._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + clear_key_configuration_enabled=clear_key_configuration_enabled, + fairplay_configuration=fairplay_configuration, + open_restriction_enabled=open_restriction_enabled, + playready_configuration_licenses=playready_configuration_licenses, + playready_response_custom_data=playready_response_custom_data, + token_restriction=token_restriction, + widevine_configuration_template=widevine_configuration_template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + clear_key_configuration_enabled: Optional[bool] = None, + fairplay_configuration: Optional['outputs.ContentKeyPolicyPolicyOptionFairplayConfiguration'] = None, + open_restriction_enabled: Optional[bool] = None, + playready_configuration_licenses: Optional[Sequence['outputs.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicense']] = None, + playready_response_custom_data: Optional[str] = None, + token_restriction: Optional['outputs.ContentKeyPolicyPolicyOptionTokenRestriction'] = None, + widevine_configuration_template: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if clear_key_configuration_enabled is None and 'clearKeyConfigurationEnabled' in kwargs: + clear_key_configuration_enabled = kwargs['clearKeyConfigurationEnabled'] + if fairplay_configuration is None and 'fairplayConfiguration' in kwargs: + fairplay_configuration = kwargs['fairplayConfiguration'] + if open_restriction_enabled is None and 'openRestrictionEnabled' in kwargs: + open_restriction_enabled = kwargs['openRestrictionEnabled'] + if playready_configuration_licenses is None and 'playreadyConfigurationLicenses' in kwargs: + playready_configuration_licenses = kwargs['playreadyConfigurationLicenses'] + if playready_response_custom_data is None and 'playreadyResponseCustomData' in kwargs: + playready_response_custom_data = kwargs['playreadyResponseCustomData'] + if token_restriction is None and 'tokenRestriction' in kwargs: + token_restriction = kwargs['tokenRestriction'] + if widevine_configuration_template is None and 'widevineConfigurationTemplate' in kwargs: + widevine_configuration_template = kwargs['widevineConfigurationTemplate'] + + _setter("name", name) if clear_key_configuration_enabled is not None: - pulumi.set(__self__, "clear_key_configuration_enabled", clear_key_configuration_enabled) + _setter("clear_key_configuration_enabled", clear_key_configuration_enabled) if fairplay_configuration is not None: - pulumi.set(__self__, "fairplay_configuration", fairplay_configuration) + _setter("fairplay_configuration", fairplay_configuration) if open_restriction_enabled is not None: - pulumi.set(__self__, "open_restriction_enabled", open_restriction_enabled) + _setter("open_restriction_enabled", open_restriction_enabled) if playready_configuration_licenses is not None: - pulumi.set(__self__, "playready_configuration_licenses", playready_configuration_licenses) + _setter("playready_configuration_licenses", playready_configuration_licenses) if playready_response_custom_data is not None: - pulumi.set(__self__, "playready_response_custom_data", playready_response_custom_data) + _setter("playready_response_custom_data", playready_response_custom_data) if token_restriction is not None: - pulumi.set(__self__, "token_restriction", token_restriction) + _setter("token_restriction", token_restriction) if widevine_configuration_template is not None: - pulumi.set(__self__, "widevine_configuration_template", widevine_configuration_template) + _setter("widevine_configuration_template", widevine_configuration_template) @property @pulumi.getter @@ -619,18 +790,47 @@ def __init__(__self__, *, :param str rental_and_lease_key_type: The rental and lease key type. Supported values are `DualExpiry`, `PersistentLimited`, `PersistentUnlimited` or `Undefined`. :param int rental_duration_seconds: The rental duration. Must be greater than 0. """ + ContentKeyPolicyPolicyOptionFairplayConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + ask=ask, + offline_rental_configuration=offline_rental_configuration, + pfx=pfx, + pfx_password=pfx_password, + rental_and_lease_key_type=rental_and_lease_key_type, + rental_duration_seconds=rental_duration_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ask: Optional[str] = None, + offline_rental_configuration: Optional['outputs.ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfiguration'] = None, + pfx: Optional[str] = None, + pfx_password: Optional[str] = None, + rental_and_lease_key_type: Optional[str] = None, + rental_duration_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if offline_rental_configuration is None and 'offlineRentalConfiguration' in kwargs: + offline_rental_configuration = kwargs['offlineRentalConfiguration'] + if pfx_password is None and 'pfxPassword' in kwargs: + pfx_password = kwargs['pfxPassword'] + if rental_and_lease_key_type is None and 'rentalAndLeaseKeyType' in kwargs: + rental_and_lease_key_type = kwargs['rentalAndLeaseKeyType'] + if rental_duration_seconds is None and 'rentalDurationSeconds' in kwargs: + rental_duration_seconds = kwargs['rentalDurationSeconds'] + if ask is not None: - pulumi.set(__self__, "ask", ask) + _setter("ask", ask) if offline_rental_configuration is not None: - pulumi.set(__self__, "offline_rental_configuration", offline_rental_configuration) + _setter("offline_rental_configuration", offline_rental_configuration) if pfx is not None: - pulumi.set(__self__, "pfx", pfx) + _setter("pfx", pfx) if pfx_password is not None: - pulumi.set(__self__, "pfx_password", pfx_password) + _setter("pfx_password", pfx_password) if rental_and_lease_key_type is not None: - pulumi.set(__self__, "rental_and_lease_key_type", rental_and_lease_key_type) + _setter("rental_and_lease_key_type", rental_and_lease_key_type) if rental_duration_seconds is not None: - pulumi.set(__self__, "rental_duration_seconds", rental_duration_seconds) + _setter("rental_duration_seconds", rental_duration_seconds) @property @pulumi.getter @@ -709,10 +909,27 @@ def __init__(__self__, *, :param int playback_duration_seconds: Playback duration. :param int storage_duration_seconds: Storage duration. """ + ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + playback_duration_seconds=playback_duration_seconds, + storage_duration_seconds=storage_duration_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + playback_duration_seconds: Optional[int] = None, + storage_duration_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if playback_duration_seconds is None and 'playbackDurationSeconds' in kwargs: + playback_duration_seconds = kwargs['playbackDurationSeconds'] + if storage_duration_seconds is None and 'storageDurationSeconds' in kwargs: + storage_duration_seconds = kwargs['storageDurationSeconds'] + if playback_duration_seconds is not None: - pulumi.set(__self__, "playback_duration_seconds", playback_duration_seconds) + _setter("playback_duration_seconds", playback_duration_seconds) if storage_duration_seconds is not None: - pulumi.set(__self__, "storage_duration_seconds", storage_duration_seconds) + _setter("storage_duration_seconds", storage_duration_seconds) @property @pulumi.getter(name="playbackDurationSeconds") @@ -801,30 +1018,87 @@ def __init__(__self__, *, :param str relative_expiration_date: The relative expiration date of license. :param str security_level: The security level of the PlayReady license. Possible values are `SL150`, `SL2000` and `SL3000`. Please see [this document](https://learn.microsoft.com/en-us/rest/api/media/content-key-policies/create-or-update?tabs=HTTP#securitylevel) for more information about security level. See [this document](https://learn.microsoft.com/en-us/azure/media-services/latest/drm-playready-license-template-concept#playready-sl3000-support) for more information about `SL3000` support. """ + ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicense._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_test_devices=allow_test_devices, + begin_date=begin_date, + content_key_location_from_header_enabled=content_key_location_from_header_enabled, + content_key_location_from_key_id=content_key_location_from_key_id, + content_type=content_type, + expiration_date=expiration_date, + grace_period=grace_period, + license_type=license_type, + play_right=play_right, + relative_begin_date=relative_begin_date, + relative_expiration_date=relative_expiration_date, + security_level=security_level, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_test_devices: Optional[bool] = None, + begin_date: Optional[str] = None, + content_key_location_from_header_enabled: Optional[bool] = None, + content_key_location_from_key_id: Optional[str] = None, + content_type: Optional[str] = None, + expiration_date: Optional[str] = None, + grace_period: Optional[str] = None, + license_type: Optional[str] = None, + play_right: Optional['outputs.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRight'] = None, + relative_begin_date: Optional[str] = None, + relative_expiration_date: Optional[str] = None, + security_level: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_test_devices is None and 'allowTestDevices' in kwargs: + allow_test_devices = kwargs['allowTestDevices'] + if begin_date is None and 'beginDate' in kwargs: + begin_date = kwargs['beginDate'] + if content_key_location_from_header_enabled is None and 'contentKeyLocationFromHeaderEnabled' in kwargs: + content_key_location_from_header_enabled = kwargs['contentKeyLocationFromHeaderEnabled'] + if content_key_location_from_key_id is None and 'contentKeyLocationFromKeyId' in kwargs: + content_key_location_from_key_id = kwargs['contentKeyLocationFromKeyId'] + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if expiration_date is None and 'expirationDate' in kwargs: + expiration_date = kwargs['expirationDate'] + if grace_period is None and 'gracePeriod' in kwargs: + grace_period = kwargs['gracePeriod'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if play_right is None and 'playRight' in kwargs: + play_right = kwargs['playRight'] + if relative_begin_date is None and 'relativeBeginDate' in kwargs: + relative_begin_date = kwargs['relativeBeginDate'] + if relative_expiration_date is None and 'relativeExpirationDate' in kwargs: + relative_expiration_date = kwargs['relativeExpirationDate'] + if security_level is None and 'securityLevel' in kwargs: + security_level = kwargs['securityLevel'] + if allow_test_devices is not None: - pulumi.set(__self__, "allow_test_devices", allow_test_devices) + _setter("allow_test_devices", allow_test_devices) if begin_date is not None: - pulumi.set(__self__, "begin_date", begin_date) + _setter("begin_date", begin_date) if content_key_location_from_header_enabled is not None: - pulumi.set(__self__, "content_key_location_from_header_enabled", content_key_location_from_header_enabled) + _setter("content_key_location_from_header_enabled", content_key_location_from_header_enabled) if content_key_location_from_key_id is not None: - pulumi.set(__self__, "content_key_location_from_key_id", content_key_location_from_key_id) + _setter("content_key_location_from_key_id", content_key_location_from_key_id) if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if expiration_date is not None: - pulumi.set(__self__, "expiration_date", expiration_date) + _setter("expiration_date", expiration_date) if grace_period is not None: - pulumi.set(__self__, "grace_period", grace_period) + _setter("grace_period", grace_period) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if play_right is not None: - pulumi.set(__self__, "play_right", play_right) + _setter("play_right", play_right) if relative_begin_date is not None: - pulumi.set(__self__, "relative_begin_date", relative_begin_date) + _setter("relative_begin_date", relative_begin_date) if relative_expiration_date is not None: - pulumi.set(__self__, "relative_expiration_date", relative_expiration_date) + _setter("relative_expiration_date", relative_expiration_date) if security_level is not None: - pulumi.set(__self__, "security_level", security_level) + _setter("security_level", security_level) @property @pulumi.getter(name="allowTestDevices") @@ -997,32 +1271,93 @@ def __init__(__self__, *, :param int uncompressed_digital_audio_opl: Specifies the output protection level for uncompressed digital audio. Supported values are `100`, `150`, `200`, `250` or `300`. :param int uncompressed_digital_video_opl: Specifies the output protection level for uncompressed digital video. Supported values are `100`, `250`, `270` or `300`. """ + ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRight._configure( + lambda key, value: pulumi.set(__self__, key, value), + agc_and_color_stripe_restriction=agc_and_color_stripe_restriction, + allow_passing_video_content_to_unknown_output=allow_passing_video_content_to_unknown_output, + analog_video_opl=analog_video_opl, + compressed_digital_audio_opl=compressed_digital_audio_opl, + compressed_digital_video_opl=compressed_digital_video_opl, + digital_video_only_content_restriction=digital_video_only_content_restriction, + explicit_analog_television_output_restriction=explicit_analog_television_output_restriction, + first_play_expiration=first_play_expiration, + image_constraint_for_analog_component_video_restriction=image_constraint_for_analog_component_video_restriction, + image_constraint_for_analog_computer_monitor_restriction=image_constraint_for_analog_computer_monitor_restriction, + scms_restriction=scms_restriction, + uncompressed_digital_audio_opl=uncompressed_digital_audio_opl, + uncompressed_digital_video_opl=uncompressed_digital_video_opl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + agc_and_color_stripe_restriction: Optional[int] = None, + allow_passing_video_content_to_unknown_output: Optional[str] = None, + analog_video_opl: Optional[int] = None, + compressed_digital_audio_opl: Optional[int] = None, + compressed_digital_video_opl: Optional[int] = None, + digital_video_only_content_restriction: Optional[bool] = None, + explicit_analog_television_output_restriction: Optional['outputs.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestriction'] = None, + first_play_expiration: Optional[str] = None, + image_constraint_for_analog_component_video_restriction: Optional[bool] = None, + image_constraint_for_analog_computer_monitor_restriction: Optional[bool] = None, + scms_restriction: Optional[int] = None, + uncompressed_digital_audio_opl: Optional[int] = None, + uncompressed_digital_video_opl: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if agc_and_color_stripe_restriction is None and 'agcAndColorStripeRestriction' in kwargs: + agc_and_color_stripe_restriction = kwargs['agcAndColorStripeRestriction'] + if allow_passing_video_content_to_unknown_output is None and 'allowPassingVideoContentToUnknownOutput' in kwargs: + allow_passing_video_content_to_unknown_output = kwargs['allowPassingVideoContentToUnknownOutput'] + if analog_video_opl is None and 'analogVideoOpl' in kwargs: + analog_video_opl = kwargs['analogVideoOpl'] + if compressed_digital_audio_opl is None and 'compressedDigitalAudioOpl' in kwargs: + compressed_digital_audio_opl = kwargs['compressedDigitalAudioOpl'] + if compressed_digital_video_opl is None and 'compressedDigitalVideoOpl' in kwargs: + compressed_digital_video_opl = kwargs['compressedDigitalVideoOpl'] + if digital_video_only_content_restriction is None and 'digitalVideoOnlyContentRestriction' in kwargs: + digital_video_only_content_restriction = kwargs['digitalVideoOnlyContentRestriction'] + if explicit_analog_television_output_restriction is None and 'explicitAnalogTelevisionOutputRestriction' in kwargs: + explicit_analog_television_output_restriction = kwargs['explicitAnalogTelevisionOutputRestriction'] + if first_play_expiration is None and 'firstPlayExpiration' in kwargs: + first_play_expiration = kwargs['firstPlayExpiration'] + if image_constraint_for_analog_component_video_restriction is None and 'imageConstraintForAnalogComponentVideoRestriction' in kwargs: + image_constraint_for_analog_component_video_restriction = kwargs['imageConstraintForAnalogComponentVideoRestriction'] + if image_constraint_for_analog_computer_monitor_restriction is None and 'imageConstraintForAnalogComputerMonitorRestriction' in kwargs: + image_constraint_for_analog_computer_monitor_restriction = kwargs['imageConstraintForAnalogComputerMonitorRestriction'] + if scms_restriction is None and 'scmsRestriction' in kwargs: + scms_restriction = kwargs['scmsRestriction'] + if uncompressed_digital_audio_opl is None and 'uncompressedDigitalAudioOpl' in kwargs: + uncompressed_digital_audio_opl = kwargs['uncompressedDigitalAudioOpl'] + if uncompressed_digital_video_opl is None and 'uncompressedDigitalVideoOpl' in kwargs: + uncompressed_digital_video_opl = kwargs['uncompressedDigitalVideoOpl'] + if agc_and_color_stripe_restriction is not None: - pulumi.set(__self__, "agc_and_color_stripe_restriction", agc_and_color_stripe_restriction) + _setter("agc_and_color_stripe_restriction", agc_and_color_stripe_restriction) if allow_passing_video_content_to_unknown_output is not None: - pulumi.set(__self__, "allow_passing_video_content_to_unknown_output", allow_passing_video_content_to_unknown_output) + _setter("allow_passing_video_content_to_unknown_output", allow_passing_video_content_to_unknown_output) if analog_video_opl is not None: - pulumi.set(__self__, "analog_video_opl", analog_video_opl) + _setter("analog_video_opl", analog_video_opl) if compressed_digital_audio_opl is not None: - pulumi.set(__self__, "compressed_digital_audio_opl", compressed_digital_audio_opl) + _setter("compressed_digital_audio_opl", compressed_digital_audio_opl) if compressed_digital_video_opl is not None: - pulumi.set(__self__, "compressed_digital_video_opl", compressed_digital_video_opl) + _setter("compressed_digital_video_opl", compressed_digital_video_opl) if digital_video_only_content_restriction is not None: - pulumi.set(__self__, "digital_video_only_content_restriction", digital_video_only_content_restriction) + _setter("digital_video_only_content_restriction", digital_video_only_content_restriction) if explicit_analog_television_output_restriction is not None: - pulumi.set(__self__, "explicit_analog_television_output_restriction", explicit_analog_television_output_restriction) + _setter("explicit_analog_television_output_restriction", explicit_analog_television_output_restriction) if first_play_expiration is not None: - pulumi.set(__self__, "first_play_expiration", first_play_expiration) + _setter("first_play_expiration", first_play_expiration) if image_constraint_for_analog_component_video_restriction is not None: - pulumi.set(__self__, "image_constraint_for_analog_component_video_restriction", image_constraint_for_analog_component_video_restriction) + _setter("image_constraint_for_analog_component_video_restriction", image_constraint_for_analog_component_video_restriction) if image_constraint_for_analog_computer_monitor_restriction is not None: - pulumi.set(__self__, "image_constraint_for_analog_computer_monitor_restriction", image_constraint_for_analog_computer_monitor_restriction) + _setter("image_constraint_for_analog_computer_monitor_restriction", image_constraint_for_analog_computer_monitor_restriction) if scms_restriction is not None: - pulumi.set(__self__, "scms_restriction", scms_restriction) + _setter("scms_restriction", scms_restriction) if uncompressed_digital_audio_opl is not None: - pulumi.set(__self__, "uncompressed_digital_audio_opl", uncompressed_digital_audio_opl) + _setter("uncompressed_digital_audio_opl", uncompressed_digital_audio_opl) if uncompressed_digital_video_opl is not None: - pulumi.set(__self__, "uncompressed_digital_video_opl", uncompressed_digital_video_opl) + _setter("uncompressed_digital_video_opl", uncompressed_digital_video_opl) @property @pulumi.getter(name="agcAndColorStripeRestriction") @@ -1157,9 +1492,28 @@ def __init__(__self__, *, :param int control_bits: The restriction control bits. Possible value is integer between `0` and `3` inclusive. :param bool best_effort_enforced: Indicates whether this restriction is enforced on a best effort basis. Possible values are `true` or `false`. Defaults to `false`. """ - pulumi.set(__self__, "control_bits", control_bits) + ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + control_bits=control_bits, + best_effort_enforced=best_effort_enforced, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + control_bits: Optional[int] = None, + best_effort_enforced: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if control_bits is None and 'controlBits' in kwargs: + control_bits = kwargs['controlBits'] + if control_bits is None: + raise TypeError("Missing 'control_bits' argument") + if best_effort_enforced is None and 'bestEffortEnforced' in kwargs: + best_effort_enforced = kwargs['bestEffortEnforced'] + + _setter("control_bits", control_bits) if best_effort_enforced is not None: - pulumi.set(__self__, "best_effort_enforced", best_effort_enforced) + _setter("best_effort_enforced", best_effort_enforced) @property @pulumi.getter(name="controlBits") @@ -1236,26 +1590,71 @@ def __init__(__self__, *, > **NOTE:** Each token_restriction can only have one type of primary verification key: if you want to use RSA you must provide `primary_rsa_token_key_exponent` and `primary_rsa_token_key_modulus`, if you want to use symmetric you need to provide `primary_symmetric_token_key` and for x509 you must provide `primary_x509_token_key_raw`. For more information about Token access please refer to """ + ContentKeyPolicyPolicyOptionTokenRestriction._configure( + lambda key, value: pulumi.set(__self__, key, value), + alternate_keys=alternate_keys, + audience=audience, + issuer=issuer, + open_id_connect_discovery_document=open_id_connect_discovery_document, + primary_rsa_token_key_exponent=primary_rsa_token_key_exponent, + primary_rsa_token_key_modulus=primary_rsa_token_key_modulus, + primary_symmetric_token_key=primary_symmetric_token_key, + primary_x509_token_key_raw=primary_x509_token_key_raw, + required_claims=required_claims, + token_type=token_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alternate_keys: Optional[Sequence['outputs.ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKey']] = None, + audience: Optional[str] = None, + issuer: Optional[str] = None, + open_id_connect_discovery_document: Optional[str] = None, + primary_rsa_token_key_exponent: Optional[str] = None, + primary_rsa_token_key_modulus: Optional[str] = None, + primary_symmetric_token_key: Optional[str] = None, + primary_x509_token_key_raw: Optional[str] = None, + required_claims: Optional[Sequence['outputs.ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaim']] = None, + token_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alternate_keys is None and 'alternateKeys' in kwargs: + alternate_keys = kwargs['alternateKeys'] + if open_id_connect_discovery_document is None and 'openIdConnectDiscoveryDocument' in kwargs: + open_id_connect_discovery_document = kwargs['openIdConnectDiscoveryDocument'] + if primary_rsa_token_key_exponent is None and 'primaryRsaTokenKeyExponent' in kwargs: + primary_rsa_token_key_exponent = kwargs['primaryRsaTokenKeyExponent'] + if primary_rsa_token_key_modulus is None and 'primaryRsaTokenKeyModulus' in kwargs: + primary_rsa_token_key_modulus = kwargs['primaryRsaTokenKeyModulus'] + if primary_symmetric_token_key is None and 'primarySymmetricTokenKey' in kwargs: + primary_symmetric_token_key = kwargs['primarySymmetricTokenKey'] + if primary_x509_token_key_raw is None and 'primaryX509TokenKeyRaw' in kwargs: + primary_x509_token_key_raw = kwargs['primaryX509TokenKeyRaw'] + if required_claims is None and 'requiredClaims' in kwargs: + required_claims = kwargs['requiredClaims'] + if token_type is None and 'tokenType' in kwargs: + token_type = kwargs['tokenType'] + if alternate_keys is not None: - pulumi.set(__self__, "alternate_keys", alternate_keys) + _setter("alternate_keys", alternate_keys) if audience is not None: - pulumi.set(__self__, "audience", audience) + _setter("audience", audience) if issuer is not None: - pulumi.set(__self__, "issuer", issuer) + _setter("issuer", issuer) if open_id_connect_discovery_document is not None: - pulumi.set(__self__, "open_id_connect_discovery_document", open_id_connect_discovery_document) + _setter("open_id_connect_discovery_document", open_id_connect_discovery_document) if primary_rsa_token_key_exponent is not None: - pulumi.set(__self__, "primary_rsa_token_key_exponent", primary_rsa_token_key_exponent) + _setter("primary_rsa_token_key_exponent", primary_rsa_token_key_exponent) if primary_rsa_token_key_modulus is not None: - pulumi.set(__self__, "primary_rsa_token_key_modulus", primary_rsa_token_key_modulus) + _setter("primary_rsa_token_key_modulus", primary_rsa_token_key_modulus) if primary_symmetric_token_key is not None: - pulumi.set(__self__, "primary_symmetric_token_key", primary_symmetric_token_key) + _setter("primary_symmetric_token_key", primary_symmetric_token_key) if primary_x509_token_key_raw is not None: - pulumi.set(__self__, "primary_x509_token_key_raw", primary_x509_token_key_raw) + _setter("primary_x509_token_key_raw", primary_x509_token_key_raw) if required_claims is not None: - pulumi.set(__self__, "required_claims", required_claims) + _setter("required_claims", required_claims) if token_type is not None: - pulumi.set(__self__, "token_type", token_type) + _setter("token_type", token_type) @property @pulumi.getter(name="alternateKeys") @@ -1378,14 +1777,39 @@ def __init__(__self__, *, > **NOTE:** Each `alternate_key` block can only have one type of primary verification key: if you want to use RSA you must provide `rsa_token_key_exponent` and `rsa_token_key_modulus`, if you want to use symmetric you need to provide `symmetric_token_key` and for x509 you must provide `x509_token_key_raw`. """ + ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + rsa_token_key_exponent=rsa_token_key_exponent, + rsa_token_key_modulus=rsa_token_key_modulus, + symmetric_token_key=symmetric_token_key, + x509_token_key_raw=x509_token_key_raw, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rsa_token_key_exponent: Optional[str] = None, + rsa_token_key_modulus: Optional[str] = None, + symmetric_token_key: Optional[str] = None, + x509_token_key_raw: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rsa_token_key_exponent is None and 'rsaTokenKeyExponent' in kwargs: + rsa_token_key_exponent = kwargs['rsaTokenKeyExponent'] + if rsa_token_key_modulus is None and 'rsaTokenKeyModulus' in kwargs: + rsa_token_key_modulus = kwargs['rsaTokenKeyModulus'] + if symmetric_token_key is None and 'symmetricTokenKey' in kwargs: + symmetric_token_key = kwargs['symmetricTokenKey'] + if x509_token_key_raw is None and 'x509TokenKeyRaw' in kwargs: + x509_token_key_raw = kwargs['x509TokenKeyRaw'] + if rsa_token_key_exponent is not None: - pulumi.set(__self__, "rsa_token_key_exponent", rsa_token_key_exponent) + _setter("rsa_token_key_exponent", rsa_token_key_exponent) if rsa_token_key_modulus is not None: - pulumi.set(__self__, "rsa_token_key_modulus", rsa_token_key_modulus) + _setter("rsa_token_key_modulus", rsa_token_key_modulus) if symmetric_token_key is not None: - pulumi.set(__self__, "symmetric_token_key", symmetric_token_key) + _setter("symmetric_token_key", symmetric_token_key) if x509_token_key_raw is not None: - pulumi.set(__self__, "x509_token_key_raw", x509_token_key_raw) + _setter("x509_token_key_raw", x509_token_key_raw) @property @pulumi.getter(name="rsaTokenKeyExponent") @@ -1431,10 +1855,23 @@ def __init__(__self__, *, :param str type: Token claim type. :param str value: Token claim value. """ + ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaim._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -1462,9 +1899,24 @@ def __init__(__self__, *, :param str name: The name of the input Asset. Changing this forces a new Media Job to be created. :param str label: A label that is assigned to a JobInputClip, that is used to satisfy a reference used in the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the JobInputs should be the image file, and it should have the label 'xyz'. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + JobInputAsset._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + label=label, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + label: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) @property @pulumi.getter @@ -1492,9 +1944,24 @@ def __init__(__self__, *, :param str name: The name of the output Asset. Changing this forces a new Media Job to be created. :param str label: A label that is assigned to a JobOutput in order to help uniquely identify it. This is useful when your Transform has more than one TransformOutput, whereby your Job has more than one JobOutput. In such cases, when you submit the Job, you will add two or more JobOutputs, in the same order as TransformOutputs in the Transform. Subsequently, when you retrieve the Job, either through events or on a GET request, you can use the label to easily identify the JobOutput. If a label is not provided, a default value of '{presetName}_{outputIndex}' will be used, where the preset name is the name of the preset in the corresponding TransformOutput and the output index is the relative index of the this JobOutput within the Job. Note that this index is the same as the relative index of the corresponding TransformOutput within its Transform. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) + JobOutputAsset._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + label=label, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + label: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) @property @pulumi.getter @@ -1541,10 +2008,27 @@ def __init__(__self__, *, :param str client_access_policy: The content of clientaccesspolicy.xml used by Silverlight. :param str cross_domain_policy: The content of the Cross Domain Policy (`crossdomain.xml`). """ + LiveEventCrossSiteAccessPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_access_policy=client_access_policy, + cross_domain_policy=cross_domain_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_access_policy: Optional[str] = None, + cross_domain_policy: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_access_policy is None and 'clientAccessPolicy' in kwargs: + client_access_policy = kwargs['clientAccessPolicy'] + if cross_domain_policy is None and 'crossDomainPolicy' in kwargs: + cross_domain_policy = kwargs['crossDomainPolicy'] + if client_access_policy is not None: - pulumi.set(__self__, "client_access_policy", client_access_policy) + _setter("client_access_policy", client_access_policy) if cross_domain_policy is not None: - pulumi.set(__self__, "cross_domain_policy", cross_domain_policy) + _setter("cross_domain_policy", cross_domain_policy) @property @pulumi.getter(name="clientAccessPolicy") @@ -1599,14 +2083,37 @@ def __init__(__self__, *, > [More information can be found in the Microsoft Documentation](https://go.microsoft.com/fwlink/?linkid=2095101). """ + LiveEventEncoding._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_frame_interval=key_frame_interval, + preset_name=preset_name, + stretch_mode=stretch_mode, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_frame_interval: Optional[str] = None, + preset_name: Optional[str] = None, + stretch_mode: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_frame_interval is None and 'keyFrameInterval' in kwargs: + key_frame_interval = kwargs['keyFrameInterval'] + if preset_name is None and 'presetName' in kwargs: + preset_name = kwargs['presetName'] + if stretch_mode is None and 'stretchMode' in kwargs: + stretch_mode = kwargs['stretchMode'] + if key_frame_interval is not None: - pulumi.set(__self__, "key_frame_interval", key_frame_interval) + _setter("key_frame_interval", key_frame_interval) if preset_name is not None: - pulumi.set(__self__, "preset_name", preset_name) + _setter("preset_name", preset_name) if stretch_mode is not None: - pulumi.set(__self__, "stretch_mode", stretch_mode) + _setter("stretch_mode", stretch_mode) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="keyFrameInterval") @@ -1680,16 +2187,43 @@ def __init__(__self__, *, :param str key_frame_interval_duration: ISO 8601 time duration of the key frame interval duration of the input. This value sets the `EXT-X-TARGETDURATION` property in the HLS output. For example, use PT2S to indicate 2 seconds. This field cannot be set when `type` is set to `Encoding`. :param str streaming_protocol: The input protocol for the live event. Allowed values are `FragmentedMP4` and `RTMP`. Changing this forces a new resource to be created. """ + LiveEventInput._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_token=access_token, + endpoints=endpoints, + ip_access_control_allows=ip_access_control_allows, + key_frame_interval_duration=key_frame_interval_duration, + streaming_protocol=streaming_protocol, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_token: Optional[str] = None, + endpoints: Optional[Sequence['outputs.LiveEventInputEndpoint']] = None, + ip_access_control_allows: Optional[Sequence['outputs.LiveEventInputIpAccessControlAllow']] = None, + key_frame_interval_duration: Optional[str] = None, + streaming_protocol: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_token is None and 'accessToken' in kwargs: + access_token = kwargs['accessToken'] + if ip_access_control_allows is None and 'ipAccessControlAllows' in kwargs: + ip_access_control_allows = kwargs['ipAccessControlAllows'] + if key_frame_interval_duration is None and 'keyFrameIntervalDuration' in kwargs: + key_frame_interval_duration = kwargs['keyFrameIntervalDuration'] + if streaming_protocol is None and 'streamingProtocol' in kwargs: + streaming_protocol = kwargs['streamingProtocol'] + if access_token is not None: - pulumi.set(__self__, "access_token", access_token) + _setter("access_token", access_token) if endpoints is not None: - pulumi.set(__self__, "endpoints", endpoints) + _setter("endpoints", endpoints) if ip_access_control_allows is not None: - pulumi.set(__self__, "ip_access_control_allows", ip_access_control_allows) + _setter("ip_access_control_allows", ip_access_control_allows) if key_frame_interval_duration is not None: - pulumi.set(__self__, "key_frame_interval_duration", key_frame_interval_duration) + _setter("key_frame_interval_duration", key_frame_interval_duration) if streaming_protocol is not None: - pulumi.set(__self__, "streaming_protocol", streaming_protocol) + _setter("streaming_protocol", streaming_protocol) @property @pulumi.getter(name="accessToken") @@ -1734,10 +2268,23 @@ class LiveEventInputEndpoint(dict): def __init__(__self__, *, protocol: Optional[str] = None, url: Optional[str] = None): + LiveEventInputEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[str] = None, + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter @@ -1778,12 +2325,29 @@ def __init__(__self__, *, :param str name: The friendly name for the IP address range. :param int subnet_prefix_length: The subnet mask prefix length (see CIDR notation). """ + LiveEventInputIpAccessControlAllow._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + name=name, + subnet_prefix_length=subnet_prefix_length, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: Optional[str] = None, + name: Optional[str] = None, + subnet_prefix_length: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_prefix_length is None and 'subnetPrefixLength' in kwargs: + subnet_prefix_length = kwargs['subnetPrefixLength'] + if address is not None: - pulumi.set(__self__, "address", address) + _setter("address", address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subnet_prefix_length is not None: - pulumi.set(__self__, "subnet_prefix_length", subnet_prefix_length) + _setter("subnet_prefix_length", subnet_prefix_length) @property @pulumi.getter @@ -1847,16 +2411,43 @@ def __init__(__self__, *, :param str preview_locator: The identifier of the preview locator in GUID format. Specifying this at creation time allows the caller to know the preview locator url before the event is created. If omitted, the service will generate a random identifier. Changing this forces a new resource to be created. :param str streaming_policy_name: The name of streaming policy used for the live event preview. Changing this forces a new resource to be created. """ + LiveEventPreview._configure( + lambda key, value: pulumi.set(__self__, key, value), + alternative_media_id=alternative_media_id, + endpoints=endpoints, + ip_access_control_allows=ip_access_control_allows, + preview_locator=preview_locator, + streaming_policy_name=streaming_policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alternative_media_id: Optional[str] = None, + endpoints: Optional[Sequence['outputs.LiveEventPreviewEndpoint']] = None, + ip_access_control_allows: Optional[Sequence['outputs.LiveEventPreviewIpAccessControlAllow']] = None, + preview_locator: Optional[str] = None, + streaming_policy_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alternative_media_id is None and 'alternativeMediaId' in kwargs: + alternative_media_id = kwargs['alternativeMediaId'] + if ip_access_control_allows is None and 'ipAccessControlAllows' in kwargs: + ip_access_control_allows = kwargs['ipAccessControlAllows'] + if preview_locator is None and 'previewLocator' in kwargs: + preview_locator = kwargs['previewLocator'] + if streaming_policy_name is None and 'streamingPolicyName' in kwargs: + streaming_policy_name = kwargs['streamingPolicyName'] + if alternative_media_id is not None: - pulumi.set(__self__, "alternative_media_id", alternative_media_id) + _setter("alternative_media_id", alternative_media_id) if endpoints is not None: - pulumi.set(__self__, "endpoints", endpoints) + _setter("endpoints", endpoints) if ip_access_control_allows is not None: - pulumi.set(__self__, "ip_access_control_allows", ip_access_control_allows) + _setter("ip_access_control_allows", ip_access_control_allows) if preview_locator is not None: - pulumi.set(__self__, "preview_locator", preview_locator) + _setter("preview_locator", preview_locator) if streaming_policy_name is not None: - pulumi.set(__self__, "streaming_policy_name", streaming_policy_name) + _setter("streaming_policy_name", streaming_policy_name) @property @pulumi.getter(name="alternativeMediaId") @@ -1901,10 +2492,23 @@ class LiveEventPreviewEndpoint(dict): def __init__(__self__, *, protocol: Optional[str] = None, url: Optional[str] = None): + LiveEventPreviewEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[str] = None, + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter @@ -1945,12 +2549,29 @@ def __init__(__self__, *, :param str name: The friendly name for the IP address range. :param int subnet_prefix_length: The subnet mask prefix length (see CIDR notation). """ + LiveEventPreviewIpAccessControlAllow._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + name=name, + subnet_prefix_length=subnet_prefix_length, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: Optional[str] = None, + name: Optional[str] = None, + subnet_prefix_length: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_prefix_length is None and 'subnetPrefixLength' in kwargs: + subnet_prefix_length = kwargs['subnetPrefixLength'] + if address is not None: - pulumi.set(__self__, "address", address) + _setter("address", address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subnet_prefix_length is not None: - pulumi.set(__self__, "subnet_prefix_length", subnet_prefix_length) + _setter("subnet_prefix_length", subnet_prefix_length) @property @pulumi.getter @@ -2011,14 +2632,37 @@ def __init__(__self__, *, :param 'ServiceAccountEncryptionManagedIdentityArgs' managed_identity: A `managed_identity` block as defined below. :param str type: Specifies the type of key used to encrypt the account data. Possible values are `SystemKey` and `CustomerKey`. """ + ServiceAccountEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + current_key_identifier=current_key_identifier, + key_vault_key_identifier=key_vault_key_identifier, + managed_identity=managed_identity, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + current_key_identifier: Optional[str] = None, + key_vault_key_identifier: Optional[str] = None, + managed_identity: Optional['outputs.ServiceAccountEncryptionManagedIdentity'] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if current_key_identifier is None and 'currentKeyIdentifier' in kwargs: + current_key_identifier = kwargs['currentKeyIdentifier'] + if key_vault_key_identifier is None and 'keyVaultKeyIdentifier' in kwargs: + key_vault_key_identifier = kwargs['keyVaultKeyIdentifier'] + if managed_identity is None and 'managedIdentity' in kwargs: + managed_identity = kwargs['managedIdentity'] + if current_key_identifier is not None: - pulumi.set(__self__, "current_key_identifier", current_key_identifier) + _setter("current_key_identifier", current_key_identifier) if key_vault_key_identifier is not None: - pulumi.set(__self__, "key_vault_key_identifier", key_vault_key_identifier) + _setter("key_vault_key_identifier", key_vault_key_identifier) if managed_identity is not None: - pulumi.set(__self__, "managed_identity", managed_identity) + _setter("managed_identity", managed_identity) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="currentKeyIdentifier") @@ -2081,10 +2725,27 @@ def __init__(__self__, *, :param bool use_system_assigned_identity: Whether to use System Assigned Identity. Possible Values are `true` and `false`. :param str user_assigned_identity_id: The ID of the User Assigned Identity. This value can only be set when `use_system_assigned_identity` is `false` """ + ServiceAccountEncryptionManagedIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + use_system_assigned_identity=use_system_assigned_identity, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + use_system_assigned_identity: Optional[bool] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if use_system_assigned_identity is None and 'useSystemAssignedIdentity' in kwargs: + use_system_assigned_identity = kwargs['useSystemAssignedIdentity'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if use_system_assigned_identity is not None: - pulumi.set(__self__, "use_system_assigned_identity", use_system_assigned_identity) + _setter("use_system_assigned_identity", use_system_assigned_identity) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="useSystemAssignedIdentity") @@ -2137,13 +2798,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ServiceAccountIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -2206,10 +2892,27 @@ def __init__(__self__, *, :param str default_action: The Default Action to use when no rules match from `ip_allow_list`. Possible values are `Allow` and `Deny`. :param Sequence[str] ip_allow_lists: One or more IP Addresses, or CIDR Blocks which should be able to access the Key Delivery. """ + ServiceAccountKeyDeliveryAccessControl._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_allow_lists=ip_allow_lists, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[str] = None, + ip_allow_lists: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_allow_lists is None and 'ipAllowLists' in kwargs: + ip_allow_lists = kwargs['ipAllowLists'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_allow_lists is not None: - pulumi.set(__self__, "ip_allow_lists", ip_allow_lists) + _setter("ip_allow_lists", ip_allow_lists) @property @pulumi.getter(name="defaultAction") @@ -2260,11 +2963,32 @@ def __init__(__self__, *, > **NOTE:** Whilst multiple `storage_account` blocks can be specified - one of them must be set to the primary :param 'ServiceAccountStorageAccountManagedIdentityArgs' managed_identity: A `managed_identity` block as defined below. """ - pulumi.set(__self__, "id", id) + ServiceAccountStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + is_primary=is_primary, + managed_identity=managed_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + is_primary: Optional[bool] = None, + managed_identity: Optional['outputs.ServiceAccountStorageAccountManagedIdentity'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if is_primary is None and 'isPrimary' in kwargs: + is_primary = kwargs['isPrimary'] + if managed_identity is None and 'managedIdentity' in kwargs: + managed_identity = kwargs['managedIdentity'] + + _setter("id", id) if is_primary is not None: - pulumi.set(__self__, "is_primary", is_primary) + _setter("is_primary", is_primary) if managed_identity is not None: - pulumi.set(__self__, "managed_identity", managed_identity) + _setter("managed_identity", managed_identity) @property @pulumi.getter @@ -2321,10 +3045,27 @@ def __init__(__self__, *, :param bool use_system_assigned_identity: Whether to use System Assigned Identity. Possible Values are `true` and `false`. :param str user_assigned_identity_id: The ID of the User Assigned Identity. This value can only be set when `use_system_assigned_identity` is `false` """ + ServiceAccountStorageAccountManagedIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + use_system_assigned_identity=use_system_assigned_identity, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + use_system_assigned_identity: Optional[bool] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if use_system_assigned_identity is None and 'useSystemAssignedIdentity' in kwargs: + use_system_assigned_identity = kwargs['useSystemAssignedIdentity'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if use_system_assigned_identity is not None: - pulumi.set(__self__, "use_system_assigned_identity", use_system_assigned_identity) + _setter("use_system_assigned_identity", use_system_assigned_identity) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="useSystemAssignedIdentity") @@ -2371,10 +3112,27 @@ def __init__(__self__, *, :param Sequence['StreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyArgs'] akamai_signature_header_authentication_keys: One or more `akamai_signature_header_authentication_key` blocks as defined below. :param Sequence['StreamingEndpointAccessControlIpAllowArgs'] ip_allows: A `ip_allow` block as defined below. """ + StreamingEndpointAccessControl._configure( + lambda key, value: pulumi.set(__self__, key, value), + akamai_signature_header_authentication_keys=akamai_signature_header_authentication_keys, + ip_allows=ip_allows, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + akamai_signature_header_authentication_keys: Optional[Sequence['outputs.StreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKey']] = None, + ip_allows: Optional[Sequence['outputs.StreamingEndpointAccessControlIpAllow']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if akamai_signature_header_authentication_keys is None and 'akamaiSignatureHeaderAuthenticationKeys' in kwargs: + akamai_signature_header_authentication_keys = kwargs['akamaiSignatureHeaderAuthenticationKeys'] + if ip_allows is None and 'ipAllows' in kwargs: + ip_allows = kwargs['ipAllows'] + if akamai_signature_header_authentication_keys is not None: - pulumi.set(__self__, "akamai_signature_header_authentication_keys", akamai_signature_header_authentication_keys) + _setter("akamai_signature_header_authentication_keys", akamai_signature_header_authentication_keys) if ip_allows is not None: - pulumi.set(__self__, "ip_allows", ip_allows) + _setter("ip_allows", ip_allows) @property @pulumi.getter(name="akamaiSignatureHeaderAuthenticationKeys") @@ -2421,12 +3179,29 @@ def __init__(__self__, *, :param str expiration: The expiration time of the authentication key. :param str identifier: Identifier of the key. """ + StreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + base64_key=base64_key, + expiration=expiration, + identifier=identifier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + base64_key: Optional[str] = None, + expiration: Optional[str] = None, + identifier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if base64_key is None and 'base64Key' in kwargs: + base64_key = kwargs['base64Key'] + if base64_key is not None: - pulumi.set(__self__, "base64_key", base64_key) + _setter("base64_key", base64_key) if expiration is not None: - pulumi.set(__self__, "expiration", expiration) + _setter("expiration", expiration) if identifier is not None: - pulumi.set(__self__, "identifier", identifier) + _setter("identifier", identifier) @property @pulumi.getter(name="base64Key") @@ -2481,12 +3256,29 @@ def __init__(__self__, *, :param str name: The friendly name for the IP address range. :param int subnet_prefix_length: The subnet mask prefix length (see CIDR notation). """ + StreamingEndpointAccessControlIpAllow._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + name=name, + subnet_prefix_length=subnet_prefix_length, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: Optional[str] = None, + name: Optional[str] = None, + subnet_prefix_length: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_prefix_length is None and 'subnetPrefixLength' in kwargs: + subnet_prefix_length = kwargs['subnetPrefixLength'] + if address is not None: - pulumi.set(__self__, "address", address) + _setter("address", address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subnet_prefix_length is not None: - pulumi.set(__self__, "subnet_prefix_length", subnet_prefix_length) + _setter("subnet_prefix_length", subnet_prefix_length) @property @pulumi.getter @@ -2541,10 +3333,27 @@ def __init__(__self__, *, :param str client_access_policy: The content of `clientaccesspolicy.xml` used by Silverlight. :param str cross_domain_policy: The content of `crossdomain.xml` used by Silverlight. """ + StreamingEndpointCrossSiteAccessPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_access_policy=client_access_policy, + cross_domain_policy=cross_domain_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_access_policy: Optional[str] = None, + cross_domain_policy: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_access_policy is None and 'clientAccessPolicy' in kwargs: + client_access_policy = kwargs['clientAccessPolicy'] + if cross_domain_policy is None and 'crossDomainPolicy' in kwargs: + cross_domain_policy = kwargs['crossDomainPolicy'] + if client_access_policy is not None: - pulumi.set(__self__, "client_access_policy", client_access_policy) + _setter("client_access_policy", client_access_policy) if cross_domain_policy is not None: - pulumi.set(__self__, "cross_domain_policy", cross_domain_policy) + _setter("cross_domain_policy", cross_domain_policy) @property @pulumi.getter(name="clientAccessPolicy") @@ -2572,10 +3381,23 @@ def __init__(__self__, *, :param int capacity: The sku capacity of Streaming Endpoint. :param str name: The name which should be used for this Streaming Endpoint maximum length is `24`. Changing this forces a new Streaming Endpoint to be created. """ + StreamingEndpointSkus._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -2630,16 +3452,41 @@ def __init__(__self__, *, :param str type: Encryption type of Content Key. Supported values are `CommonEncryptionCbcs`, `CommonEncryptionCenc` or `EnvelopeEncryption`. Changing this forces a new Streaming Locator to be created. :param str value: Value of Content Key. Changing this forces a new Streaming Locator to be created. """ + StreamingLocatorContentKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_key_id=content_key_id, + label_reference_in_streaming_policy=label_reference_in_streaming_policy, + policy_name=policy_name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_key_id: Optional[str] = None, + label_reference_in_streaming_policy: Optional[str] = None, + policy_name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_key_id is None and 'contentKeyId' in kwargs: + content_key_id = kwargs['contentKeyId'] + if label_reference_in_streaming_policy is None and 'labelReferenceInStreamingPolicy' in kwargs: + label_reference_in_streaming_policy = kwargs['labelReferenceInStreamingPolicy'] + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if content_key_id is not None: - pulumi.set(__self__, "content_key_id", content_key_id) + _setter("content_key_id", content_key_id) if label_reference_in_streaming_policy is not None: - pulumi.set(__self__, "label_reference_in_streaming_policy", label_reference_in_streaming_policy) + _setter("label_reference_in_streaming_policy", label_reference_in_streaming_policy) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter(name="contentKeyId") @@ -2718,14 +3565,39 @@ def __init__(__self__, *, :param 'StreamingPolicyCommonEncryptionCbcsDrmFairplayArgs' drm_fairplay: A `drm_fairplay` block as defined below. Changing this forces a new Streaming Policy to be created. :param 'StreamingPolicyCommonEncryptionCbcsEnabledProtocolsArgs' enabled_protocols: A `enabled_protocols` block as defined below. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCbcs._configure( + lambda key, value: pulumi.set(__self__, key, value), + clear_key_encryption=clear_key_encryption, + default_content_key=default_content_key, + drm_fairplay=drm_fairplay, + enabled_protocols=enabled_protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + clear_key_encryption: Optional['outputs.StreamingPolicyCommonEncryptionCbcsClearKeyEncryption'] = None, + default_content_key: Optional['outputs.StreamingPolicyCommonEncryptionCbcsDefaultContentKey'] = None, + drm_fairplay: Optional['outputs.StreamingPolicyCommonEncryptionCbcsDrmFairplay'] = None, + enabled_protocols: Optional['outputs.StreamingPolicyCommonEncryptionCbcsEnabledProtocols'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if clear_key_encryption is None and 'clearKeyEncryption' in kwargs: + clear_key_encryption = kwargs['clearKeyEncryption'] + if default_content_key is None and 'defaultContentKey' in kwargs: + default_content_key = kwargs['defaultContentKey'] + if drm_fairplay is None and 'drmFairplay' in kwargs: + drm_fairplay = kwargs['drmFairplay'] + if enabled_protocols is None and 'enabledProtocols' in kwargs: + enabled_protocols = kwargs['enabledProtocols'] + if clear_key_encryption is not None: - pulumi.set(__self__, "clear_key_encryption", clear_key_encryption) + _setter("clear_key_encryption", clear_key_encryption) if default_content_key is not None: - pulumi.set(__self__, "default_content_key", default_content_key) + _setter("default_content_key", default_content_key) if drm_fairplay is not None: - pulumi.set(__self__, "drm_fairplay", drm_fairplay) + _setter("drm_fairplay", drm_fairplay) if enabled_protocols is not None: - pulumi.set(__self__, "enabled_protocols", enabled_protocols) + _setter("enabled_protocols", enabled_protocols) @property @pulumi.getter(name="clearKeyEncryption") @@ -2786,7 +3658,22 @@ def __init__(__self__, *, > **Note** Either `clear_key_encryption` or `drm` must be specified. """ - pulumi.set(__self__, "custom_keys_acquisition_url_template", custom_keys_acquisition_url_template) + StreamingPolicyCommonEncryptionCbcsClearKeyEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_keys_acquisition_url_template=custom_keys_acquisition_url_template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_keys_acquisition_url_template: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_keys_acquisition_url_template is None and 'customKeysAcquisitionUrlTemplate' in kwargs: + custom_keys_acquisition_url_template = kwargs['customKeysAcquisitionUrlTemplate'] + if custom_keys_acquisition_url_template is None: + raise TypeError("Missing 'custom_keys_acquisition_url_template' argument") + + _setter("custom_keys_acquisition_url_template", custom_keys_acquisition_url_template) @property @pulumi.getter(name="customKeysAcquisitionUrlTemplate") @@ -2825,10 +3712,25 @@ def __init__(__self__, *, :param str label: Label can be used to specify Content Key when creating a Streaming Locator. Changing this forces a new Streaming Policy to be created. :param str policy_name: Policy used by Default Key. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCbcsDefaultContentKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + policy_name=policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[str] = None, + policy_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) @property @pulumi.getter @@ -2875,10 +3777,27 @@ def __init__(__self__, *, :param bool allow_persistent_license: All license to be persistent or not. Changing this forces a new Streaming Policy to be created. :param str custom_license_acquisition_url_template: The URL template for the custom service that delivers licenses to the end user. This is not required when using Azure Media Services for issuing licenses. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCbcsDrmFairplay._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_persistent_license=allow_persistent_license, + custom_license_acquisition_url_template=custom_license_acquisition_url_template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_persistent_license: Optional[bool] = None, + custom_license_acquisition_url_template: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_persistent_license is None and 'allowPersistentLicense' in kwargs: + allow_persistent_license = kwargs['allowPersistentLicense'] + if custom_license_acquisition_url_template is None and 'customLicenseAcquisitionUrlTemplate' in kwargs: + custom_license_acquisition_url_template = kwargs['customLicenseAcquisitionUrlTemplate'] + if allow_persistent_license is not None: - pulumi.set(__self__, "allow_persistent_license", allow_persistent_license) + _setter("allow_persistent_license", allow_persistent_license) if custom_license_acquisition_url_template is not None: - pulumi.set(__self__, "custom_license_acquisition_url_template", custom_license_acquisition_url_template) + _setter("custom_license_acquisition_url_template", custom_license_acquisition_url_template) @property @pulumi.getter(name="allowPersistentLicense") @@ -2927,14 +3846,33 @@ def __init__(__self__, *, :param bool hls: Enable HLS protocol or not. Changing this forces a new Streaming Policy to be created. :param bool smooth_streaming: Enable SmoothStreaming protocol or not. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCbcsEnabledProtocols._configure( + lambda key, value: pulumi.set(__self__, key, value), + dash=dash, + download=download, + hls=hls, + smooth_streaming=smooth_streaming, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dash: Optional[bool] = None, + download: Optional[bool] = None, + hls: Optional[bool] = None, + smooth_streaming: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if smooth_streaming is None and 'smoothStreaming' in kwargs: + smooth_streaming = kwargs['smoothStreaming'] + if dash is not None: - pulumi.set(__self__, "dash", dash) + _setter("dash", dash) if download is not None: - pulumi.set(__self__, "download", download) + _setter("download", download) if hls is not None: - pulumi.set(__self__, "hls", hls) + _setter("hls", hls) if smooth_streaming is not None: - pulumi.set(__self__, "smooth_streaming", smooth_streaming) + _setter("smooth_streaming", smooth_streaming) @property @pulumi.getter @@ -3017,20 +3955,57 @@ def __init__(__self__, *, :param str drm_widevine_custom_license_acquisition_url_template: The URL template for the custom service that delivers licenses to the end user. This is not required when using Azure Media Services for issuing licenses. Changing this forces a new Streaming Policy to be created. :param 'StreamingPolicyCommonEncryptionCencEnabledProtocolsArgs' enabled_protocols: A `enabled_protocols` block as defined below. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCenc._configure( + lambda key, value: pulumi.set(__self__, key, value), + clear_key_encryption=clear_key_encryption, + clear_tracks=clear_tracks, + content_key_to_track_mappings=content_key_to_track_mappings, + default_content_key=default_content_key, + drm_playready=drm_playready, + drm_widevine_custom_license_acquisition_url_template=drm_widevine_custom_license_acquisition_url_template, + enabled_protocols=enabled_protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + clear_key_encryption: Optional['outputs.StreamingPolicyCommonEncryptionCencClearKeyEncryption'] = None, + clear_tracks: Optional[Sequence['outputs.StreamingPolicyCommonEncryptionCencClearTrack']] = None, + content_key_to_track_mappings: Optional[Sequence['outputs.StreamingPolicyCommonEncryptionCencContentKeyToTrackMapping']] = None, + default_content_key: Optional['outputs.StreamingPolicyCommonEncryptionCencDefaultContentKey'] = None, + drm_playready: Optional['outputs.StreamingPolicyCommonEncryptionCencDrmPlayready'] = None, + drm_widevine_custom_license_acquisition_url_template: Optional[str] = None, + enabled_protocols: Optional['outputs.StreamingPolicyCommonEncryptionCencEnabledProtocols'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if clear_key_encryption is None and 'clearKeyEncryption' in kwargs: + clear_key_encryption = kwargs['clearKeyEncryption'] + if clear_tracks is None and 'clearTracks' in kwargs: + clear_tracks = kwargs['clearTracks'] + if content_key_to_track_mappings is None and 'contentKeyToTrackMappings' in kwargs: + content_key_to_track_mappings = kwargs['contentKeyToTrackMappings'] + if default_content_key is None and 'defaultContentKey' in kwargs: + default_content_key = kwargs['defaultContentKey'] + if drm_playready is None and 'drmPlayready' in kwargs: + drm_playready = kwargs['drmPlayready'] + if drm_widevine_custom_license_acquisition_url_template is None and 'drmWidevineCustomLicenseAcquisitionUrlTemplate' in kwargs: + drm_widevine_custom_license_acquisition_url_template = kwargs['drmWidevineCustomLicenseAcquisitionUrlTemplate'] + if enabled_protocols is None and 'enabledProtocols' in kwargs: + enabled_protocols = kwargs['enabledProtocols'] + if clear_key_encryption is not None: - pulumi.set(__self__, "clear_key_encryption", clear_key_encryption) + _setter("clear_key_encryption", clear_key_encryption) if clear_tracks is not None: - pulumi.set(__self__, "clear_tracks", clear_tracks) + _setter("clear_tracks", clear_tracks) if content_key_to_track_mappings is not None: - pulumi.set(__self__, "content_key_to_track_mappings", content_key_to_track_mappings) + _setter("content_key_to_track_mappings", content_key_to_track_mappings) if default_content_key is not None: - pulumi.set(__self__, "default_content_key", default_content_key) + _setter("default_content_key", default_content_key) if drm_playready is not None: - pulumi.set(__self__, "drm_playready", drm_playready) + _setter("drm_playready", drm_playready) if drm_widevine_custom_license_acquisition_url_template is not None: - pulumi.set(__self__, "drm_widevine_custom_license_acquisition_url_template", drm_widevine_custom_license_acquisition_url_template) + _setter("drm_widevine_custom_license_acquisition_url_template", drm_widevine_custom_license_acquisition_url_template) if enabled_protocols is not None: - pulumi.set(__self__, "enabled_protocols", enabled_protocols) + _setter("enabled_protocols", enabled_protocols) @property @pulumi.getter(name="clearKeyEncryption") @@ -3115,7 +4090,22 @@ def __init__(__self__, *, > **Note** Either `clear_key_encryption` or `drm` must be specified. """ - pulumi.set(__self__, "custom_keys_acquisition_url_template", custom_keys_acquisition_url_template) + StreamingPolicyCommonEncryptionCencClearKeyEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_keys_acquisition_url_template=custom_keys_acquisition_url_template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_keys_acquisition_url_template: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_keys_acquisition_url_template is None and 'customKeysAcquisitionUrlTemplate' in kwargs: + custom_keys_acquisition_url_template = kwargs['customKeysAcquisitionUrlTemplate'] + if custom_keys_acquisition_url_template is None: + raise TypeError("Missing 'custom_keys_acquisition_url_template' argument") + + _setter("custom_keys_acquisition_url_template", custom_keys_acquisition_url_template) @property @pulumi.getter(name="customKeysAcquisitionUrlTemplate") @@ -3135,7 +4125,20 @@ def __init__(__self__, *, """ :param Sequence['StreamingPolicyCommonEncryptionCencClearTrackConditionArgs'] conditions: One or more `condition` blocks as defined below. Changing this forces a new Streaming Policy to be created. """ - pulumi.set(__self__, "conditions", conditions) + StreamingPolicyCommonEncryptionCencClearTrack._configure( + lambda key, value: pulumi.set(__self__, key, value), + conditions=conditions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + conditions: Optional[Sequence['outputs.StreamingPolicyCommonEncryptionCencClearTrackCondition']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if conditions is None: + raise TypeError("Missing 'conditions' argument") + + _setter("conditions", conditions) @property @pulumi.getter @@ -3157,9 +4160,30 @@ def __init__(__self__, *, :param str property: The track property type. Possible value is `FourCC`. Changing this forces a new Streaming Policy to be created. :param str value: The track property value. Changing this forces a new Streaming Policy to be created. """ - pulumi.set(__self__, "operation", operation) - pulumi.set(__self__, "property", property) - pulumi.set(__self__, "value", value) + StreamingPolicyCommonEncryptionCencClearTrackCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operation=operation, + property=property, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operation: Optional[str] = None, + property: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operation is None: + raise TypeError("Missing 'operation' argument") + if property is None: + raise TypeError("Missing 'property' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("operation", operation) + _setter("property", property) + _setter("value", value) @property @pulumi.getter @@ -3214,11 +4238,30 @@ def __init__(__self__, *, :param str label: Specifies the content key when creating a Streaming Locator. Changing this forces a new Streaming Policy to be created. :param str policy_name: The policy used by the default key. Changing this forces a new Streaming Policy to be created. """ - pulumi.set(__self__, "tracks", tracks) + StreamingPolicyCommonEncryptionCencContentKeyToTrackMapping._configure( + lambda key, value: pulumi.set(__self__, key, value), + tracks=tracks, + label=label, + policy_name=policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tracks: Optional[Sequence['outputs.StreamingPolicyCommonEncryptionCencContentKeyToTrackMappingTrack']] = None, + label: Optional[str] = None, + policy_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tracks is None: + raise TypeError("Missing 'tracks' argument") + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + + _setter("tracks", tracks) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) @property @pulumi.getter @@ -3252,7 +4295,20 @@ def __init__(__self__, *, """ :param Sequence['StreamingPolicyCommonEncryptionCencContentKeyToTrackMappingTrackConditionArgs'] conditions: One or more `condition` blocks as defined below. Changing this forces a new Streaming Policy to be created. """ - pulumi.set(__self__, "conditions", conditions) + StreamingPolicyCommonEncryptionCencContentKeyToTrackMappingTrack._configure( + lambda key, value: pulumi.set(__self__, key, value), + conditions=conditions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + conditions: Optional[Sequence['outputs.StreamingPolicyCommonEncryptionCencContentKeyToTrackMappingTrackCondition']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if conditions is None: + raise TypeError("Missing 'conditions' argument") + + _setter("conditions", conditions) @property @pulumi.getter @@ -3274,9 +4330,30 @@ def __init__(__self__, *, :param str property: The track property type. Possible value is `FourCC`. Changing this forces a new Streaming Policy to be created. :param str value: The track property value. Changing this forces a new Streaming Policy to be created. """ - pulumi.set(__self__, "operation", operation) - pulumi.set(__self__, "property", property) - pulumi.set(__self__, "value", value) + StreamingPolicyCommonEncryptionCencContentKeyToTrackMappingTrackCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operation=operation, + property=property, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operation: Optional[str] = None, + property: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operation is None: + raise TypeError("Missing 'operation' argument") + if property is None: + raise TypeError("Missing 'property' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("operation", operation) + _setter("property", property) + _setter("value", value) @property @pulumi.getter @@ -3329,10 +4406,25 @@ def __init__(__self__, *, :param str label: Label can be used to specify Content Key when creating a Streaming Locator. Changing this forces a new Streaming Policy to be created. :param str policy_name: Policy used by Default Key. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCencDefaultContentKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + policy_name=policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[str] = None, + policy_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) @property @pulumi.getter @@ -3379,10 +4471,27 @@ def __init__(__self__, *, :param str custom_attributes: Custom attributes for PlayReady. Changing this forces a new Streaming Policy to be created. :param str custom_license_acquisition_url_template: The URL template for the custom service that delivers licenses to the end user. This is not required when using Azure Media Services for issuing licenses. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCencDrmPlayready._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_attributes=custom_attributes, + custom_license_acquisition_url_template=custom_license_acquisition_url_template, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_attributes: Optional[str] = None, + custom_license_acquisition_url_template: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if custom_license_acquisition_url_template is None and 'customLicenseAcquisitionUrlTemplate' in kwargs: + custom_license_acquisition_url_template = kwargs['customLicenseAcquisitionUrlTemplate'] + if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if custom_license_acquisition_url_template is not None: - pulumi.set(__self__, "custom_license_acquisition_url_template", custom_license_acquisition_url_template) + _setter("custom_license_acquisition_url_template", custom_license_acquisition_url_template) @property @pulumi.getter(name="customAttributes") @@ -3431,14 +4540,33 @@ def __init__(__self__, *, :param bool hls: Enable HLS protocol or not. Changing this forces a new Streaming Policy to be created. :param bool smooth_streaming: Enable SmoothStreaming protocol or not. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyCommonEncryptionCencEnabledProtocols._configure( + lambda key, value: pulumi.set(__self__, key, value), + dash=dash, + download=download, + hls=hls, + smooth_streaming=smooth_streaming, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dash: Optional[bool] = None, + download: Optional[bool] = None, + hls: Optional[bool] = None, + smooth_streaming: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if smooth_streaming is None and 'smoothStreaming' in kwargs: + smooth_streaming = kwargs['smoothStreaming'] + if dash is not None: - pulumi.set(__self__, "dash", dash) + _setter("dash", dash) if download is not None: - pulumi.set(__self__, "download", download) + _setter("download", download) if hls is not None: - pulumi.set(__self__, "hls", hls) + _setter("hls", hls) if smooth_streaming is not None: - pulumi.set(__self__, "smooth_streaming", smooth_streaming) + _setter("smooth_streaming", smooth_streaming) @property @pulumi.getter @@ -3505,12 +4633,33 @@ def __init__(__self__, *, :param 'StreamingPolicyEnvelopeEncryptionDefaultContentKeyArgs' default_content_key: A `default_content_key` block as defined above. Changing this forces a new Streaming Policy to be created. :param 'StreamingPolicyEnvelopeEncryptionEnabledProtocolsArgs' enabled_protocols: A `enabled_protocols` block as defined above. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyEnvelopeEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_keys_acquisition_url_template=custom_keys_acquisition_url_template, + default_content_key=default_content_key, + enabled_protocols=enabled_protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_keys_acquisition_url_template: Optional[str] = None, + default_content_key: Optional['outputs.StreamingPolicyEnvelopeEncryptionDefaultContentKey'] = None, + enabled_protocols: Optional['outputs.StreamingPolicyEnvelopeEncryptionEnabledProtocols'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_keys_acquisition_url_template is None and 'customKeysAcquisitionUrlTemplate' in kwargs: + custom_keys_acquisition_url_template = kwargs['customKeysAcquisitionUrlTemplate'] + if default_content_key is None and 'defaultContentKey' in kwargs: + default_content_key = kwargs['defaultContentKey'] + if enabled_protocols is None and 'enabledProtocols' in kwargs: + enabled_protocols = kwargs['enabledProtocols'] + if custom_keys_acquisition_url_template is not None: - pulumi.set(__self__, "custom_keys_acquisition_url_template", custom_keys_acquisition_url_template) + _setter("custom_keys_acquisition_url_template", custom_keys_acquisition_url_template) if default_content_key is not None: - pulumi.set(__self__, "default_content_key", default_content_key) + _setter("default_content_key", default_content_key) if enabled_protocols is not None: - pulumi.set(__self__, "enabled_protocols", enabled_protocols) + _setter("enabled_protocols", enabled_protocols) @property @pulumi.getter(name="customKeysAcquisitionUrlTemplate") @@ -3563,10 +4712,25 @@ def __init__(__self__, *, :param str label: Label can be used to specify Content Key when creating a Streaming Locator. Changing this forces a new Streaming Policy to be created. :param str policy_name: Policy used by Default Key. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyEnvelopeEncryptionDefaultContentKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + policy_name=policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[str] = None, + policy_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) @property @pulumi.getter @@ -3615,14 +4779,33 @@ def __init__(__self__, *, :param bool hls: Enable HLS protocol or not. Changing this forces a new Streaming Policy to be created. :param bool smooth_streaming: Enable SmoothStreaming protocol or not. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyEnvelopeEncryptionEnabledProtocols._configure( + lambda key, value: pulumi.set(__self__, key, value), + dash=dash, + download=download, + hls=hls, + smooth_streaming=smooth_streaming, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dash: Optional[bool] = None, + download: Optional[bool] = None, + hls: Optional[bool] = None, + smooth_streaming: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if smooth_streaming is None and 'smoothStreaming' in kwargs: + smooth_streaming = kwargs['smoothStreaming'] + if dash is not None: - pulumi.set(__self__, "dash", dash) + _setter("dash", dash) if download is not None: - pulumi.set(__self__, "download", download) + _setter("download", download) if hls is not None: - pulumi.set(__self__, "hls", hls) + _setter("hls", hls) if smooth_streaming is not None: - pulumi.set(__self__, "smooth_streaming", smooth_streaming) + _setter("smooth_streaming", smooth_streaming) @property @pulumi.getter @@ -3687,14 +4870,33 @@ def __init__(__self__, *, :param bool hls: Enable HLS protocol or not. Changing this forces a new Streaming Policy to be created. :param bool smooth_streaming: Enable SmoothStreaming protocol or not. Changing this forces a new Streaming Policy to be created. """ + StreamingPolicyNoEncryptionEnabledProtocols._configure( + lambda key, value: pulumi.set(__self__, key, value), + dash=dash, + download=download, + hls=hls, + smooth_streaming=smooth_streaming, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dash: Optional[bool] = None, + download: Optional[bool] = None, + hls: Optional[bool] = None, + smooth_streaming: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if smooth_streaming is None and 'smoothStreaming' in kwargs: + smooth_streaming = kwargs['smoothStreaming'] + if dash is not None: - pulumi.set(__self__, "dash", dash) + _setter("dash", dash) if download is not None: - pulumi.set(__self__, "download", download) + _setter("download", download) if hls is not None: - pulumi.set(__self__, "hls", hls) + _setter("hls", hls) if smooth_streaming is not None: - pulumi.set(__self__, "smooth_streaming", smooth_streaming) + _setter("smooth_streaming", smooth_streaming) @property @pulumi.getter @@ -3779,20 +4981,57 @@ def __init__(__self__, *, > **NOTE:** Each output can only have one type of preset: `builtin_preset`, `audio_analyzer_preset`, `custom_preset`, `face_detector_preset` or `video_analyzer_preset`. If you need to apply different presets you must create one output for each one. """ + TransformOutput._configure( + lambda key, value: pulumi.set(__self__, key, value), + audio_analyzer_preset=audio_analyzer_preset, + builtin_preset=builtin_preset, + custom_preset=custom_preset, + face_detector_preset=face_detector_preset, + on_error_action=on_error_action, + relative_priority=relative_priority, + video_analyzer_preset=video_analyzer_preset, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audio_analyzer_preset: Optional['outputs.TransformOutputAudioAnalyzerPreset'] = None, + builtin_preset: Optional['outputs.TransformOutputBuiltinPreset'] = None, + custom_preset: Optional['outputs.TransformOutputCustomPreset'] = None, + face_detector_preset: Optional['outputs.TransformOutputFaceDetectorPreset'] = None, + on_error_action: Optional[str] = None, + relative_priority: Optional[str] = None, + video_analyzer_preset: Optional['outputs.TransformOutputVideoAnalyzerPreset'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audio_analyzer_preset is None and 'audioAnalyzerPreset' in kwargs: + audio_analyzer_preset = kwargs['audioAnalyzerPreset'] + if builtin_preset is None and 'builtinPreset' in kwargs: + builtin_preset = kwargs['builtinPreset'] + if custom_preset is None and 'customPreset' in kwargs: + custom_preset = kwargs['customPreset'] + if face_detector_preset is None and 'faceDetectorPreset' in kwargs: + face_detector_preset = kwargs['faceDetectorPreset'] + if on_error_action is None and 'onErrorAction' in kwargs: + on_error_action = kwargs['onErrorAction'] + if relative_priority is None and 'relativePriority' in kwargs: + relative_priority = kwargs['relativePriority'] + if video_analyzer_preset is None and 'videoAnalyzerPreset' in kwargs: + video_analyzer_preset = kwargs['videoAnalyzerPreset'] + if audio_analyzer_preset is not None: - pulumi.set(__self__, "audio_analyzer_preset", audio_analyzer_preset) + _setter("audio_analyzer_preset", audio_analyzer_preset) if builtin_preset is not None: - pulumi.set(__self__, "builtin_preset", builtin_preset) + _setter("builtin_preset", builtin_preset) if custom_preset is not None: - pulumi.set(__self__, "custom_preset", custom_preset) + _setter("custom_preset", custom_preset) if face_detector_preset is not None: - pulumi.set(__self__, "face_detector_preset", face_detector_preset) + _setter("face_detector_preset", face_detector_preset) if on_error_action is not None: - pulumi.set(__self__, "on_error_action", on_error_action) + _setter("on_error_action", on_error_action) if relative_priority is not None: - pulumi.set(__self__, "relative_priority", relative_priority) + _setter("relative_priority", relative_priority) if video_analyzer_preset is not None: - pulumi.set(__self__, "video_analyzer_preset", video_analyzer_preset) + _setter("video_analyzer_preset", video_analyzer_preset) @property @pulumi.getter(name="audioAnalyzerPreset") @@ -3885,12 +5124,33 @@ def __init__(__self__, *, :param str audio_language: The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). If you know the language of your content, it is recommended that you specify it. The language must be specified explicitly for AudioAnalysisMode:Basic, since automatic language detection is not included in basic mode. If the language isn't specified, automatic language detection will choose the first language detected and process with the selected language for the duration of the file. It does not currently support dynamically switching between languages after the first language is detected. The automatic detection works best with audio recordings with clearly discernible speech. If automatic detection fails to find the language, transcription would fall back to `en-US`. The list of supported languages is available here: . :param Mapping[str, str] experimental_options: Dictionary containing key value pairs for parameters not exposed in the preset itself. """ + TransformOutputAudioAnalyzerPreset._configure( + lambda key, value: pulumi.set(__self__, key, value), + audio_analysis_mode=audio_analysis_mode, + audio_language=audio_language, + experimental_options=experimental_options, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audio_analysis_mode: Optional[str] = None, + audio_language: Optional[str] = None, + experimental_options: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audio_analysis_mode is None and 'audioAnalysisMode' in kwargs: + audio_analysis_mode = kwargs['audioAnalysisMode'] + if audio_language is None and 'audioLanguage' in kwargs: + audio_language = kwargs['audioLanguage'] + if experimental_options is None and 'experimentalOptions' in kwargs: + experimental_options = kwargs['experimentalOptions'] + if audio_analysis_mode is not None: - pulumi.set(__self__, "audio_analysis_mode", audio_analysis_mode) + _setter("audio_analysis_mode", audio_analysis_mode) if audio_language is not None: - pulumi.set(__self__, "audio_language", audio_language) + _setter("audio_language", audio_language) if experimental_options is not None: - pulumi.set(__self__, "experimental_options", experimental_options) + _setter("experimental_options", experimental_options) @property @pulumi.getter(name="audioAnalysisMode") @@ -3945,9 +5205,28 @@ def __init__(__self__, *, :param str preset_name: The built-in preset to be used for encoding videos. The Possible values are `AACGoodQualityAudio`, `AdaptiveStreaming`, `ContentAwareEncoding`, `ContentAwareEncodingExperimental`, `CopyAllBitrateNonInterleaved`, `DDGoodQualityAudio`, `H265AdaptiveStreaming`, `H265ContentAwareEncoding`, `H265SingleBitrate4K`, `H265SingleBitrate1080p`, `H265SingleBitrate720p`, `H264MultipleBitrate1080p`, `H264MultipleBitrateSD`, `H264MultipleBitrate720p`, `H264SingleBitrate1080p`, `H264SingleBitrateSD` and `H264SingleBitrate720p`. :param 'TransformOutputBuiltinPresetPresetConfigurationArgs' preset_configuration: A `present_configuration` block as defined below. """ - pulumi.set(__self__, "preset_name", preset_name) + TransformOutputBuiltinPreset._configure( + lambda key, value: pulumi.set(__self__, key, value), + preset_name=preset_name, + preset_configuration=preset_configuration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + preset_name: Optional[str] = None, + preset_configuration: Optional['outputs.TransformOutputBuiltinPresetPresetConfiguration'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if preset_name is None and 'presetName' in kwargs: + preset_name = kwargs['presetName'] + if preset_name is None: + raise TypeError("Missing 'preset_name' argument") + if preset_configuration is None and 'presetConfiguration' in kwargs: + preset_configuration = kwargs['presetConfiguration'] + + _setter("preset_name", preset_name) if preset_configuration is not None: - pulumi.set(__self__, "preset_configuration", preset_configuration) + _setter("preset_configuration", preset_configuration) @property @pulumi.getter(name="presetName") @@ -4016,22 +5295,61 @@ def __init__(__self__, *, :param int min_bitrate_bps: The minimum bitrate in bits per second (threshold for the bottom video layer). For example, set as `200000` to have a bottom layer that covers users with low network bandwidth. :param int min_height: The minimum height of output video layers. For example, set as `360` to avoid output layers of smaller resolutions like 180P. """ + TransformOutputBuiltinPresetPresetConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + complexity=complexity, + interleave_output=interleave_output, + key_frame_interval_in_seconds=key_frame_interval_in_seconds, + max_bitrate_bps=max_bitrate_bps, + max_height=max_height, + max_layers=max_layers, + min_bitrate_bps=min_bitrate_bps, + min_height=min_height, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + complexity: Optional[str] = None, + interleave_output: Optional[str] = None, + key_frame_interval_in_seconds: Optional[float] = None, + max_bitrate_bps: Optional[int] = None, + max_height: Optional[int] = None, + max_layers: Optional[int] = None, + min_bitrate_bps: Optional[int] = None, + min_height: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if interleave_output is None and 'interleaveOutput' in kwargs: + interleave_output = kwargs['interleaveOutput'] + if key_frame_interval_in_seconds is None and 'keyFrameIntervalInSeconds' in kwargs: + key_frame_interval_in_seconds = kwargs['keyFrameIntervalInSeconds'] + if max_bitrate_bps is None and 'maxBitrateBps' in kwargs: + max_bitrate_bps = kwargs['maxBitrateBps'] + if max_height is None and 'maxHeight' in kwargs: + max_height = kwargs['maxHeight'] + if max_layers is None and 'maxLayers' in kwargs: + max_layers = kwargs['maxLayers'] + if min_bitrate_bps is None and 'minBitrateBps' in kwargs: + min_bitrate_bps = kwargs['minBitrateBps'] + if min_height is None and 'minHeight' in kwargs: + min_height = kwargs['minHeight'] + if complexity is not None: - pulumi.set(__self__, "complexity", complexity) + _setter("complexity", complexity) if interleave_output is not None: - pulumi.set(__self__, "interleave_output", interleave_output) + _setter("interleave_output", interleave_output) if key_frame_interval_in_seconds is not None: - pulumi.set(__self__, "key_frame_interval_in_seconds", key_frame_interval_in_seconds) + _setter("key_frame_interval_in_seconds", key_frame_interval_in_seconds) if max_bitrate_bps is not None: - pulumi.set(__self__, "max_bitrate_bps", max_bitrate_bps) + _setter("max_bitrate_bps", max_bitrate_bps) if max_height is not None: - pulumi.set(__self__, "max_height", max_height) + _setter("max_height", max_height) if max_layers is not None: - pulumi.set(__self__, "max_layers", max_layers) + _setter("max_layers", max_layers) if min_bitrate_bps is not None: - pulumi.set(__self__, "min_bitrate_bps", min_bitrate_bps) + _setter("min_bitrate_bps", min_bitrate_bps) if min_height is not None: - pulumi.set(__self__, "min_height", min_height) + _setter("min_height", min_height) @property @pulumi.getter @@ -4128,12 +5446,35 @@ def __init__(__self__, *, :param Mapping[str, str] experimental_options: Dictionary containing key value pairs for parameters not exposed in the preset itself. :param 'TransformOutputCustomPresetFilterArgs' filter: A `filter` block as defined below. """ - pulumi.set(__self__, "codecs", codecs) - pulumi.set(__self__, "formats", formats) + TransformOutputCustomPreset._configure( + lambda key, value: pulumi.set(__self__, key, value), + codecs=codecs, + formats=formats, + experimental_options=experimental_options, + filter=filter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + codecs: Optional[Sequence['outputs.TransformOutputCustomPresetCodec']] = None, + formats: Optional[Sequence['outputs.TransformOutputCustomPresetFormat']] = None, + experimental_options: Optional[Mapping[str, str]] = None, + filter: Optional['outputs.TransformOutputCustomPresetFilter'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if codecs is None: + raise TypeError("Missing 'codecs' argument") + if formats is None: + raise TypeError("Missing 'formats' argument") + if experimental_options is None and 'experimentalOptions' in kwargs: + experimental_options = kwargs['experimentalOptions'] + + _setter("codecs", codecs) + _setter("formats", formats) if experimental_options is not None: - pulumi.set(__self__, "experimental_options", experimental_options) + _setter("experimental_options", experimental_options) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) @property @pulumi.getter @@ -4222,22 +5563,63 @@ def __init__(__self__, *, > **NOTE:** Each codec can only have one type: `aac_audio`, `copy_audio`, `copy_video`, `dd_audio`, `h264_video`, `h265_video`, `jpg_image` or `png_image`. If you need to apply different codec you must create one codec for each one. """ + TransformOutputCustomPresetCodec._configure( + lambda key, value: pulumi.set(__self__, key, value), + aac_audio=aac_audio, + copy_audio=copy_audio, + copy_video=copy_video, + dd_audio=dd_audio, + h264_video=h264_video, + h265_video=h265_video, + jpg_image=jpg_image, + png_image=png_image, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aac_audio: Optional['outputs.TransformOutputCustomPresetCodecAacAudio'] = None, + copy_audio: Optional['outputs.TransformOutputCustomPresetCodecCopyAudio'] = None, + copy_video: Optional['outputs.TransformOutputCustomPresetCodecCopyVideo'] = None, + dd_audio: Optional['outputs.TransformOutputCustomPresetCodecDdAudio'] = None, + h264_video: Optional['outputs.TransformOutputCustomPresetCodecH264Video'] = None, + h265_video: Optional['outputs.TransformOutputCustomPresetCodecH265Video'] = None, + jpg_image: Optional['outputs.TransformOutputCustomPresetCodecJpgImage'] = None, + png_image: Optional['outputs.TransformOutputCustomPresetCodecPngImage'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aac_audio is None and 'aacAudio' in kwargs: + aac_audio = kwargs['aacAudio'] + if copy_audio is None and 'copyAudio' in kwargs: + copy_audio = kwargs['copyAudio'] + if copy_video is None and 'copyVideo' in kwargs: + copy_video = kwargs['copyVideo'] + if dd_audio is None and 'ddAudio' in kwargs: + dd_audio = kwargs['ddAudio'] + if h264_video is None and 'h264Video' in kwargs: + h264_video = kwargs['h264Video'] + if h265_video is None and 'h265Video' in kwargs: + h265_video = kwargs['h265Video'] + if jpg_image is None and 'jpgImage' in kwargs: + jpg_image = kwargs['jpgImage'] + if png_image is None and 'pngImage' in kwargs: + png_image = kwargs['pngImage'] + if aac_audio is not None: - pulumi.set(__self__, "aac_audio", aac_audio) + _setter("aac_audio", aac_audio) if copy_audio is not None: - pulumi.set(__self__, "copy_audio", copy_audio) + _setter("copy_audio", copy_audio) if copy_video is not None: - pulumi.set(__self__, "copy_video", copy_video) + _setter("copy_video", copy_video) if dd_audio is not None: - pulumi.set(__self__, "dd_audio", dd_audio) + _setter("dd_audio", dd_audio) if h264_video is not None: - pulumi.set(__self__, "h264_video", h264_video) + _setter("h264_video", h264_video) if h265_video is not None: - pulumi.set(__self__, "h265_video", h265_video) + _setter("h265_video", h265_video) if jpg_image is not None: - pulumi.set(__self__, "jpg_image", jpg_image) + _setter("jpg_image", jpg_image) if png_image is not None: - pulumi.set(__self__, "png_image", png_image) + _setter("png_image", png_image) @property @pulumi.getter(name="aacAudio") @@ -4338,16 +5720,37 @@ def __init__(__self__, *, :param str profile: The encoding profile to be used when encoding audio with AAC. Possible values are `AacLc`, `HeAacV1`,and `HeAacV2`. Default to `AacLc`. :param int sampling_rate: The sampling rate to use for encoding in Hertz. Default to `48000`. """ + TransformOutputCustomPresetCodecAacAudio._configure( + lambda key, value: pulumi.set(__self__, key, value), + bitrate=bitrate, + channels=channels, + label=label, + profile=profile, + sampling_rate=sampling_rate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bitrate: Optional[int] = None, + channels: Optional[int] = None, + label: Optional[str] = None, + profile: Optional[str] = None, + sampling_rate: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sampling_rate is None and 'samplingRate' in kwargs: + sampling_rate = kwargs['samplingRate'] + if bitrate is not None: - pulumi.set(__self__, "bitrate", bitrate) + _setter("bitrate", bitrate) if channels is not None: - pulumi.set(__self__, "channels", channels) + _setter("channels", channels) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if profile is not None: - pulumi.set(__self__, "profile", profile) + _setter("profile", profile) if sampling_rate is not None: - pulumi.set(__self__, "sampling_rate", sampling_rate) + _setter("sampling_rate", sampling_rate) @property @pulumi.getter @@ -4397,8 +5800,19 @@ def __init__(__self__, *, """ :param str label: Specifies the label for the codec. The label can be used to control muxing behavior. """ + TransformOutputCustomPresetCodecCopyAudio._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) @property @pulumi.getter @@ -4416,8 +5830,19 @@ def __init__(__self__, *, """ :param str label: Specifies the label for the codec. The label can be used to control muxing behavior. """ + TransformOutputCustomPresetCodecCopyVideo._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) @property @pulumi.getter @@ -4458,14 +5883,33 @@ def __init__(__self__, *, :param str label: Specifies the label for the codec. The label can be used to control muxing behavior. :param int sampling_rate: The sampling rate to use for encoding in Hertz. Default to `48000`. """ + TransformOutputCustomPresetCodecDdAudio._configure( + lambda key, value: pulumi.set(__self__, key, value), + bitrate=bitrate, + channels=channels, + label=label, + sampling_rate=sampling_rate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bitrate: Optional[int] = None, + channels: Optional[int] = None, + label: Optional[str] = None, + sampling_rate: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sampling_rate is None and 'samplingRate' in kwargs: + sampling_rate = kwargs['samplingRate'] + if bitrate is not None: - pulumi.set(__self__, "bitrate", bitrate) + _setter("bitrate", bitrate) if channels is not None: - pulumi.set(__self__, "channels", channels) + _setter("channels", channels) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if sampling_rate is not None: - pulumi.set(__self__, "sampling_rate", sampling_rate) + _setter("sampling_rate", sampling_rate) @property @pulumi.getter @@ -4546,22 +5990,57 @@ def __init__(__self__, *, :param str stretch_mode: Specifies the resizing mode - how the input video will be resized to fit the desired output resolution(s). Possible values are `AutoFit`, `AutoSize` or `None`. Default to `AutoSize`. :param str sync_mode: Specifies the synchronization mode for the video. Possible values are `Auto`, `Cfr`, `Passthrough` or `Vfr`. Default to `Auto`. """ + TransformOutputCustomPresetCodecH264Video._configure( + lambda key, value: pulumi.set(__self__, key, value), + complexity=complexity, + key_frame_interval=key_frame_interval, + label=label, + layers=layers, + rate_control_mode=rate_control_mode, + scene_change_detection_enabled=scene_change_detection_enabled, + stretch_mode=stretch_mode, + sync_mode=sync_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + complexity: Optional[str] = None, + key_frame_interval: Optional[str] = None, + label: Optional[str] = None, + layers: Optional[Sequence['outputs.TransformOutputCustomPresetCodecH264VideoLayer']] = None, + rate_control_mode: Optional[str] = None, + scene_change_detection_enabled: Optional[bool] = None, + stretch_mode: Optional[str] = None, + sync_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_frame_interval is None and 'keyFrameInterval' in kwargs: + key_frame_interval = kwargs['keyFrameInterval'] + if rate_control_mode is None and 'rateControlMode' in kwargs: + rate_control_mode = kwargs['rateControlMode'] + if scene_change_detection_enabled is None and 'sceneChangeDetectionEnabled' in kwargs: + scene_change_detection_enabled = kwargs['sceneChangeDetectionEnabled'] + if stretch_mode is None and 'stretchMode' in kwargs: + stretch_mode = kwargs['stretchMode'] + if sync_mode is None and 'syncMode' in kwargs: + sync_mode = kwargs['syncMode'] + if complexity is not None: - pulumi.set(__self__, "complexity", complexity) + _setter("complexity", complexity) if key_frame_interval is not None: - pulumi.set(__self__, "key_frame_interval", key_frame_interval) + _setter("key_frame_interval", key_frame_interval) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if layers is not None: - pulumi.set(__self__, "layers", layers) + _setter("layers", layers) if rate_control_mode is not None: - pulumi.set(__self__, "rate_control_mode", rate_control_mode) + _setter("rate_control_mode", rate_control_mode) if scene_change_detection_enabled is not None: - pulumi.set(__self__, "scene_change_detection_enabled", scene_change_detection_enabled) + _setter("scene_change_detection_enabled", scene_change_detection_enabled) if stretch_mode is not None: - pulumi.set(__self__, "stretch_mode", stretch_mode) + _setter("stretch_mode", stretch_mode) if sync_mode is not None: - pulumi.set(__self__, "sync_mode", sync_mode) + _setter("sync_mode", sync_mode) @property @pulumi.getter @@ -4692,35 +6171,90 @@ def __init__(__self__, *, :param int slices: The number of slices to be used when encoding this layer. If not specified, default is `1`, which means that encoder will use a single slice for each frame. :param str width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in width as the input. """ - pulumi.set(__self__, "bitrate", bitrate) + TransformOutputCustomPresetCodecH264VideoLayer._configure( + lambda key, value: pulumi.set(__self__, key, value), + bitrate=bitrate, + adaptive_b_frame_enabled=adaptive_b_frame_enabled, + b_frames=b_frames, + buffer_window=buffer_window, + crf=crf, + entropy_mode=entropy_mode, + frame_rate=frame_rate, + height=height, + label=label, + level=level, + max_bitrate=max_bitrate, + profile=profile, + reference_frames=reference_frames, + slices=slices, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bitrate: Optional[int] = None, + adaptive_b_frame_enabled: Optional[bool] = None, + b_frames: Optional[int] = None, + buffer_window: Optional[str] = None, + crf: Optional[float] = None, + entropy_mode: Optional[str] = None, + frame_rate: Optional[str] = None, + height: Optional[str] = None, + label: Optional[str] = None, + level: Optional[str] = None, + max_bitrate: Optional[int] = None, + profile: Optional[str] = None, + reference_frames: Optional[int] = None, + slices: Optional[int] = None, + width: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bitrate is None: + raise TypeError("Missing 'bitrate' argument") + if adaptive_b_frame_enabled is None and 'adaptiveBFrameEnabled' in kwargs: + adaptive_b_frame_enabled = kwargs['adaptiveBFrameEnabled'] + if b_frames is None and 'bFrames' in kwargs: + b_frames = kwargs['bFrames'] + if buffer_window is None and 'bufferWindow' in kwargs: + buffer_window = kwargs['bufferWindow'] + if entropy_mode is None and 'entropyMode' in kwargs: + entropy_mode = kwargs['entropyMode'] + if frame_rate is None and 'frameRate' in kwargs: + frame_rate = kwargs['frameRate'] + if max_bitrate is None and 'maxBitrate' in kwargs: + max_bitrate = kwargs['maxBitrate'] + if reference_frames is None and 'referenceFrames' in kwargs: + reference_frames = kwargs['referenceFrames'] + + _setter("bitrate", bitrate) if adaptive_b_frame_enabled is not None: - pulumi.set(__self__, "adaptive_b_frame_enabled", adaptive_b_frame_enabled) + _setter("adaptive_b_frame_enabled", adaptive_b_frame_enabled) if b_frames is not None: - pulumi.set(__self__, "b_frames", b_frames) + _setter("b_frames", b_frames) if buffer_window is not None: - pulumi.set(__self__, "buffer_window", buffer_window) + _setter("buffer_window", buffer_window) if crf is not None: - pulumi.set(__self__, "crf", crf) + _setter("crf", crf) if entropy_mode is not None: - pulumi.set(__self__, "entropy_mode", entropy_mode) + _setter("entropy_mode", entropy_mode) if frame_rate is not None: - pulumi.set(__self__, "frame_rate", frame_rate) + _setter("frame_rate", frame_rate) if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if level is not None: - pulumi.set(__self__, "level", level) + _setter("level", level) if max_bitrate is not None: - pulumi.set(__self__, "max_bitrate", max_bitrate) + _setter("max_bitrate", max_bitrate) if profile is not None: - pulumi.set(__self__, "profile", profile) + _setter("profile", profile) if reference_frames is not None: - pulumi.set(__self__, "reference_frames", reference_frames) + _setter("reference_frames", reference_frames) if slices is not None: - pulumi.set(__self__, "slices", slices) + _setter("slices", slices) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -4885,20 +6419,51 @@ def __init__(__self__, *, :param str stretch_mode: Specifies the resizing mode - how the input video will be resized to fit the desired output resolution(s). Possible values are `AutoFit`, `AutoSize` or `None`. Default to `AutoSize`. :param str sync_mode: Specifies the synchronization mode for the video. Possible values are `Auto`, `Cfr`, `Passthrough` or `Vfr`. Default to `Auto`. """ + TransformOutputCustomPresetCodecH265Video._configure( + lambda key, value: pulumi.set(__self__, key, value), + complexity=complexity, + key_frame_interval=key_frame_interval, + label=label, + layers=layers, + scene_change_detection_enabled=scene_change_detection_enabled, + stretch_mode=stretch_mode, + sync_mode=sync_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + complexity: Optional[str] = None, + key_frame_interval: Optional[str] = None, + label: Optional[str] = None, + layers: Optional[Sequence['outputs.TransformOutputCustomPresetCodecH265VideoLayer']] = None, + scene_change_detection_enabled: Optional[bool] = None, + stretch_mode: Optional[str] = None, + sync_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_frame_interval is None and 'keyFrameInterval' in kwargs: + key_frame_interval = kwargs['keyFrameInterval'] + if scene_change_detection_enabled is None and 'sceneChangeDetectionEnabled' in kwargs: + scene_change_detection_enabled = kwargs['sceneChangeDetectionEnabled'] + if stretch_mode is None and 'stretchMode' in kwargs: + stretch_mode = kwargs['stretchMode'] + if sync_mode is None and 'syncMode' in kwargs: + sync_mode = kwargs['syncMode'] + if complexity is not None: - pulumi.set(__self__, "complexity", complexity) + _setter("complexity", complexity) if key_frame_interval is not None: - pulumi.set(__self__, "key_frame_interval", key_frame_interval) + _setter("key_frame_interval", key_frame_interval) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if layers is not None: - pulumi.set(__self__, "layers", layers) + _setter("layers", layers) if scene_change_detection_enabled is not None: - pulumi.set(__self__, "scene_change_detection_enabled", scene_change_detection_enabled) + _setter("scene_change_detection_enabled", scene_change_detection_enabled) if stretch_mode is not None: - pulumi.set(__self__, "stretch_mode", stretch_mode) + _setter("stretch_mode", stretch_mode) if sync_mode is not None: - pulumi.set(__self__, "sync_mode", sync_mode) + _setter("sync_mode", sync_mode) @property @pulumi.getter @@ -5017,33 +6582,84 @@ def __init__(__self__, *, :param int slices: The number of slices to be used when encoding this layer. If not specified, default is `1`, which means that encoder will use a single slice for each frame. :param str width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in width as the input. """ - pulumi.set(__self__, "bitrate", bitrate) + TransformOutputCustomPresetCodecH265VideoLayer._configure( + lambda key, value: pulumi.set(__self__, key, value), + bitrate=bitrate, + adaptive_b_frame_enabled=adaptive_b_frame_enabled, + b_frames=b_frames, + buffer_window=buffer_window, + crf=crf, + frame_rate=frame_rate, + height=height, + label=label, + level=level, + max_bitrate=max_bitrate, + profile=profile, + reference_frames=reference_frames, + slices=slices, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bitrate: Optional[int] = None, + adaptive_b_frame_enabled: Optional[bool] = None, + b_frames: Optional[int] = None, + buffer_window: Optional[str] = None, + crf: Optional[float] = None, + frame_rate: Optional[str] = None, + height: Optional[str] = None, + label: Optional[str] = None, + level: Optional[str] = None, + max_bitrate: Optional[int] = None, + profile: Optional[str] = None, + reference_frames: Optional[int] = None, + slices: Optional[int] = None, + width: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bitrate is None: + raise TypeError("Missing 'bitrate' argument") + if adaptive_b_frame_enabled is None and 'adaptiveBFrameEnabled' in kwargs: + adaptive_b_frame_enabled = kwargs['adaptiveBFrameEnabled'] + if b_frames is None and 'bFrames' in kwargs: + b_frames = kwargs['bFrames'] + if buffer_window is None and 'bufferWindow' in kwargs: + buffer_window = kwargs['bufferWindow'] + if frame_rate is None and 'frameRate' in kwargs: + frame_rate = kwargs['frameRate'] + if max_bitrate is None and 'maxBitrate' in kwargs: + max_bitrate = kwargs['maxBitrate'] + if reference_frames is None and 'referenceFrames' in kwargs: + reference_frames = kwargs['referenceFrames'] + + _setter("bitrate", bitrate) if adaptive_b_frame_enabled is not None: - pulumi.set(__self__, "adaptive_b_frame_enabled", adaptive_b_frame_enabled) + _setter("adaptive_b_frame_enabled", adaptive_b_frame_enabled) if b_frames is not None: - pulumi.set(__self__, "b_frames", b_frames) + _setter("b_frames", b_frames) if buffer_window is not None: - pulumi.set(__self__, "buffer_window", buffer_window) + _setter("buffer_window", buffer_window) if crf is not None: - pulumi.set(__self__, "crf", crf) + _setter("crf", crf) if frame_rate is not None: - pulumi.set(__self__, "frame_rate", frame_rate) + _setter("frame_rate", frame_rate) if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if level is not None: - pulumi.set(__self__, "level", level) + _setter("level", level) if max_bitrate is not None: - pulumi.set(__self__, "max_bitrate", max_bitrate) + _setter("max_bitrate", max_bitrate) if profile is not None: - pulumi.set(__self__, "profile", profile) + _setter("profile", profile) if reference_frames is not None: - pulumi.set(__self__, "reference_frames", reference_frames) + _setter("reference_frames", reference_frames) if slices is not None: - pulumi.set(__self__, "slices", slices) + _setter("slices", slices) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -5204,23 +6820,60 @@ def __init__(__self__, *, :param str stretch_mode: The resizing mode, which indicates how the input video will be resized to fit the desired output resolution(s). Possible values are `AutoFit`, `AutoSize` or `None`. Default to `AutoSize`. :param str sync_mode: Specifies the synchronization mode for the video. Possible values are `Auto`, `Cfr`, `Passthrough` or `Vfr`. Default to `Auto`. """ - pulumi.set(__self__, "start", start) + TransformOutputCustomPresetCodecJpgImage._configure( + lambda key, value: pulumi.set(__self__, key, value), + start=start, + key_frame_interval=key_frame_interval, + label=label, + layers=layers, + range=range, + sprite_column=sprite_column, + step=step, + stretch_mode=stretch_mode, + sync_mode=sync_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + start: Optional[str] = None, + key_frame_interval: Optional[str] = None, + label: Optional[str] = None, + layers: Optional[Sequence['outputs.TransformOutputCustomPresetCodecJpgImageLayer']] = None, + range: Optional[str] = None, + sprite_column: Optional[int] = None, + step: Optional[str] = None, + stretch_mode: Optional[str] = None, + sync_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start is None: + raise TypeError("Missing 'start' argument") + if key_frame_interval is None and 'keyFrameInterval' in kwargs: + key_frame_interval = kwargs['keyFrameInterval'] + if sprite_column is None and 'spriteColumn' in kwargs: + sprite_column = kwargs['spriteColumn'] + if stretch_mode is None and 'stretchMode' in kwargs: + stretch_mode = kwargs['stretchMode'] + if sync_mode is None and 'syncMode' in kwargs: + sync_mode = kwargs['syncMode'] + + _setter("start", start) if key_frame_interval is not None: - pulumi.set(__self__, "key_frame_interval", key_frame_interval) + _setter("key_frame_interval", key_frame_interval) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if layers is not None: - pulumi.set(__self__, "layers", layers) + _setter("layers", layers) if range is not None: - pulumi.set(__self__, "range", range) + _setter("range", range) if sprite_column is not None: - pulumi.set(__self__, "sprite_column", sprite_column) + _setter("sprite_column", sprite_column) if step is not None: - pulumi.set(__self__, "step", step) + _setter("step", step) if stretch_mode is not None: - pulumi.set(__self__, "stretch_mode", stretch_mode) + _setter("stretch_mode", stretch_mode) if sync_mode is not None: - pulumi.set(__self__, "sync_mode", sync_mode) + _setter("sync_mode", sync_mode) @property @pulumi.getter @@ -5308,14 +6961,31 @@ def __init__(__self__, *, :param int quality: The compression quality of the JPEG output. Range is from `0` to `100` and the default is `70`. :param str width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in width as the input. """ + TransformOutputCustomPresetCodecJpgImageLayer._configure( + lambda key, value: pulumi.set(__self__, key, value), + height=height, + label=label, + quality=quality, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + height: Optional[str] = None, + label: Optional[str] = None, + quality: Optional[int] = None, + width: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if quality is not None: - pulumi.set(__self__, "quality", quality) + _setter("quality", quality) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -5392,21 +7062,54 @@ def __init__(__self__, *, :param str stretch_mode: The resizing mode, which indicates how the input video will be resized to fit the desired output resolution(s). Possible values are `AutoFit`, `AutoSize` or `None`. Default to `AutoSize`. :param str sync_mode: Specifies the synchronization mode for the video. Possible values are `Auto`, `Cfr`, `Passthrough` or `Vfr`. Default to `Auto`. """ - pulumi.set(__self__, "start", start) + TransformOutputCustomPresetCodecPngImage._configure( + lambda key, value: pulumi.set(__self__, key, value), + start=start, + key_frame_interval=key_frame_interval, + label=label, + layers=layers, + range=range, + step=step, + stretch_mode=stretch_mode, + sync_mode=sync_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + start: Optional[str] = None, + key_frame_interval: Optional[str] = None, + label: Optional[str] = None, + layers: Optional[Sequence['outputs.TransformOutputCustomPresetCodecPngImageLayer']] = None, + range: Optional[str] = None, + step: Optional[str] = None, + stretch_mode: Optional[str] = None, + sync_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start is None: + raise TypeError("Missing 'start' argument") + if key_frame_interval is None and 'keyFrameInterval' in kwargs: + key_frame_interval = kwargs['keyFrameInterval'] + if stretch_mode is None and 'stretchMode' in kwargs: + stretch_mode = kwargs['stretchMode'] + if sync_mode is None and 'syncMode' in kwargs: + sync_mode = kwargs['syncMode'] + + _setter("start", start) if key_frame_interval is not None: - pulumi.set(__self__, "key_frame_interval", key_frame_interval) + _setter("key_frame_interval", key_frame_interval) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if layers is not None: - pulumi.set(__self__, "layers", layers) + _setter("layers", layers) if range is not None: - pulumi.set(__self__, "range", range) + _setter("range", range) if step is not None: - pulumi.set(__self__, "step", step) + _setter("step", step) if stretch_mode is not None: - pulumi.set(__self__, "stretch_mode", stretch_mode) + _setter("stretch_mode", stretch_mode) if sync_mode is not None: - pulumi.set(__self__, "sync_mode", sync_mode) + _setter("sync_mode", sync_mode) @property @pulumi.getter @@ -5484,12 +7187,27 @@ def __init__(__self__, *, :param str label: The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. :param str width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example `50%` means the output video has half as many pixels in width as the input. """ + TransformOutputCustomPresetCodecPngImageLayer._configure( + lambda key, value: pulumi.set(__self__, key, value), + height=height, + label=label, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + height: Optional[str] = None, + label: Optional[str] = None, + width: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -5554,18 +7272,45 @@ def __init__(__self__, *, :param Sequence['TransformOutputCustomPresetFilterOverlayArgs'] overlays: One or more `overlay` blocks as defined below. :param str rotation: The rotation to be applied to the input video before it is encoded. Possible values are `Auto`, `None`, `Rotate90`, `Rotate180`, `Rotate270`,or `Rotate0`. Default to `Auto`. """ + TransformOutputCustomPresetFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + crop_rectangle=crop_rectangle, + deinterlace=deinterlace, + fade_in=fade_in, + fade_out=fade_out, + overlays=overlays, + rotation=rotation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + crop_rectangle: Optional['outputs.TransformOutputCustomPresetFilterCropRectangle'] = None, + deinterlace: Optional['outputs.TransformOutputCustomPresetFilterDeinterlace'] = None, + fade_in: Optional['outputs.TransformOutputCustomPresetFilterFadeIn'] = None, + fade_out: Optional['outputs.TransformOutputCustomPresetFilterFadeOut'] = None, + overlays: Optional[Sequence['outputs.TransformOutputCustomPresetFilterOverlay']] = None, + rotation: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if crop_rectangle is None and 'cropRectangle' in kwargs: + crop_rectangle = kwargs['cropRectangle'] + if fade_in is None and 'fadeIn' in kwargs: + fade_in = kwargs['fadeIn'] + if fade_out is None and 'fadeOut' in kwargs: + fade_out = kwargs['fadeOut'] + if crop_rectangle is not None: - pulumi.set(__self__, "crop_rectangle", crop_rectangle) + _setter("crop_rectangle", crop_rectangle) if deinterlace is not None: - pulumi.set(__self__, "deinterlace", deinterlace) + _setter("deinterlace", deinterlace) if fade_in is not None: - pulumi.set(__self__, "fade_in", fade_in) + _setter("fade_in", fade_in) if fade_out is not None: - pulumi.set(__self__, "fade_out", fade_out) + _setter("fade_out", fade_out) if overlays is not None: - pulumi.set(__self__, "overlays", overlays) + _setter("overlays", overlays) if rotation is not None: - pulumi.set(__self__, "rotation", rotation) + _setter("rotation", rotation) @property @pulumi.getter(name="cropRectangle") @@ -5629,14 +7374,31 @@ def __init__(__self__, *, :param str top: The number of pixels from the top-margin. This can be absolute pixel value (e.g `100`), or relative to the size of the video (For example, `50%`). :param str width: The width of the rectangular region in pixels. This can be absolute pixel value (e.g` 100`), or relative to the size of the video (For example, `50%`). """ + TransformOutputCustomPresetFilterCropRectangle._configure( + lambda key, value: pulumi.set(__self__, key, value), + height=height, + left=left, + top=top, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + height: Optional[str] = None, + left: Optional[str] = None, + top: Optional[str] = None, + width: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if left is not None: - pulumi.set(__self__, "left", left) + _setter("left", left) if top is not None: - pulumi.set(__self__, "top", top) + _setter("top", top) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -5680,10 +7442,23 @@ def __init__(__self__, *, :param str mode: The deinterlacing mode. Possible values are `AutoPixelAdaptive` or `Off`. Default to `AutoPixelAdaptive`. :param str parity: The field parity to use for deinterlacing. Possible values are `Auto`, `TopFieldFirst` or `BottomFieldFirst`. Default to `Auto`. """ + TransformOutputCustomPresetFilterDeinterlace._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + parity=parity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + parity: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if parity is not None: - pulumi.set(__self__, "parity", parity) + _setter("parity", parity) @property @pulumi.getter @@ -5730,10 +7505,31 @@ def __init__(__self__, *, :param str fade_color: The color for the fade in/out. It can be on the [CSS Level1 colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color_keywords) or an RGB/hex value: e.g: `rgb(255,0,0)`, `0xFF0000` or `#FF0000`. :param str start: The position in the input video from where to start fade. The value can be in ISO 8601 format (For example, `PT05S` to start at 5 seconds), or a frame count (For example, `10` to start at the 10th frame), or a relative value to stream duration (For example, `10%` to start at 10% of stream duration). Default to `0`. """ - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "fade_color", fade_color) + TransformOutputCustomPresetFilterFadeIn._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration=duration, + fade_color=fade_color, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration: Optional[str] = None, + fade_color: Optional[str] = None, + start: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration is None: + raise TypeError("Missing 'duration' argument") + if fade_color is None and 'fadeColor' in kwargs: + fade_color = kwargs['fadeColor'] + if fade_color is None: + raise TypeError("Missing 'fade_color' argument") + + _setter("duration", duration) + _setter("fade_color", fade_color) if start is not None: - pulumi.set(__self__, "start", start) + _setter("start", start) @property @pulumi.getter @@ -5788,10 +7584,31 @@ def __init__(__self__, *, :param str fade_color: The color for the fade in/out. It can be on the [CSS Level1 colors](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color_keywords) or an RGB/hex value: e.g: `rgb(255,0,0)`, `0xFF0000` or `#FF0000`. :param str start: The position in the input video from where to start fade. The value can be in ISO 8601 format (For example, `PT05S` to start at 5 seconds), or a frame count (For example, `10` to start at the 10th frame), or a relative value to stream duration (For example, `10%` to start at 10% of stream duration). Default to `0`. """ - pulumi.set(__self__, "duration", duration) - pulumi.set(__self__, "fade_color", fade_color) + TransformOutputCustomPresetFilterFadeOut._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration=duration, + fade_color=fade_color, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration: Optional[str] = None, + fade_color: Optional[str] = None, + start: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration is None: + raise TypeError("Missing 'duration' argument") + if fade_color is None and 'fadeColor' in kwargs: + fade_color = kwargs['fadeColor'] + if fade_color is None: + raise TypeError("Missing 'fade_color' argument") + + _setter("duration", duration) + _setter("fade_color", fade_color) if start is not None: - pulumi.set(__self__, "start", start) + _setter("start", start) @property @pulumi.getter @@ -5829,10 +7646,23 @@ def __init__(__self__, *, > **NOTE:** Each overlay can only have one type: `audio` or `video`. If you need to apply different type you must create one overlay for each one. """ + TransformOutputCustomPresetFilterOverlay._configure( + lambda key, value: pulumi.set(__self__, key, value), + audio=audio, + video=video, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audio: Optional['outputs.TransformOutputCustomPresetFilterOverlayAudio'] = None, + video: Optional['outputs.TransformOutputCustomPresetFilterOverlayVideo'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audio is not None: - pulumi.set(__self__, "audio", audio) + _setter("audio", audio) if video is not None: - pulumi.set(__self__, "video", video) + _setter("video", video) @property @pulumi.getter @@ -5893,17 +7723,48 @@ def __init__(__self__, *, :param str fade_out_duration: The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as `PT0S`). :param str start: The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, `PT05S` to start the overlay at 5 seconds into the input video. If not specified the overlay starts from the beginning of the input video. """ - pulumi.set(__self__, "input_label", input_label) + TransformOutputCustomPresetFilterOverlayAudio._configure( + lambda key, value: pulumi.set(__self__, key, value), + input_label=input_label, + audio_gain_level=audio_gain_level, + end=end, + fade_in_duration=fade_in_duration, + fade_out_duration=fade_out_duration, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + input_label: Optional[str] = None, + audio_gain_level: Optional[float] = None, + end: Optional[str] = None, + fade_in_duration: Optional[str] = None, + fade_out_duration: Optional[str] = None, + start: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if input_label is None and 'inputLabel' in kwargs: + input_label = kwargs['inputLabel'] + if input_label is None: + raise TypeError("Missing 'input_label' argument") + if audio_gain_level is None and 'audioGainLevel' in kwargs: + audio_gain_level = kwargs['audioGainLevel'] + if fade_in_duration is None and 'fadeInDuration' in kwargs: + fade_in_duration = kwargs['fadeInDuration'] + if fade_out_duration is None and 'fadeOutDuration' in kwargs: + fade_out_duration = kwargs['fadeOutDuration'] + + _setter("input_label", input_label) if audio_gain_level is not None: - pulumi.set(__self__, "audio_gain_level", audio_gain_level) + _setter("audio_gain_level", audio_gain_level) if end is not None: - pulumi.set(__self__, "end", end) + _setter("end", end) if fade_in_duration is not None: - pulumi.set(__self__, "fade_in_duration", fade_in_duration) + _setter("fade_in_duration", fade_in_duration) if fade_out_duration is not None: - pulumi.set(__self__, "fade_out_duration", fade_out_duration) + _setter("fade_out_duration", fade_out_duration) if start is not None: - pulumi.set(__self__, "start", start) + _setter("start", start) @property @pulumi.getter(name="inputLabel") @@ -6002,23 +7863,62 @@ def __init__(__self__, *, :param 'TransformOutputCustomPresetFilterOverlayVideoPositionArgs' position: A `position` block as defined above. :param str start: The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, `PT05S` to start the overlay at 5 seconds into the input video. If not specified the overlay starts from the beginning of the input video. """ - pulumi.set(__self__, "input_label", input_label) + TransformOutputCustomPresetFilterOverlayVideo._configure( + lambda key, value: pulumi.set(__self__, key, value), + input_label=input_label, + audio_gain_level=audio_gain_level, + crop_rectangle=crop_rectangle, + end=end, + fade_in_duration=fade_in_duration, + fade_out_duration=fade_out_duration, + opacity=opacity, + position=position, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + input_label: Optional[str] = None, + audio_gain_level: Optional[float] = None, + crop_rectangle: Optional['outputs.TransformOutputCustomPresetFilterOverlayVideoCropRectangle'] = None, + end: Optional[str] = None, + fade_in_duration: Optional[str] = None, + fade_out_duration: Optional[str] = None, + opacity: Optional[float] = None, + position: Optional['outputs.TransformOutputCustomPresetFilterOverlayVideoPosition'] = None, + start: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if input_label is None and 'inputLabel' in kwargs: + input_label = kwargs['inputLabel'] + if input_label is None: + raise TypeError("Missing 'input_label' argument") + if audio_gain_level is None and 'audioGainLevel' in kwargs: + audio_gain_level = kwargs['audioGainLevel'] + if crop_rectangle is None and 'cropRectangle' in kwargs: + crop_rectangle = kwargs['cropRectangle'] + if fade_in_duration is None and 'fadeInDuration' in kwargs: + fade_in_duration = kwargs['fadeInDuration'] + if fade_out_duration is None and 'fadeOutDuration' in kwargs: + fade_out_duration = kwargs['fadeOutDuration'] + + _setter("input_label", input_label) if audio_gain_level is not None: - pulumi.set(__self__, "audio_gain_level", audio_gain_level) + _setter("audio_gain_level", audio_gain_level) if crop_rectangle is not None: - pulumi.set(__self__, "crop_rectangle", crop_rectangle) + _setter("crop_rectangle", crop_rectangle) if end is not None: - pulumi.set(__self__, "end", end) + _setter("end", end) if fade_in_duration is not None: - pulumi.set(__self__, "fade_in_duration", fade_in_duration) + _setter("fade_in_duration", fade_in_duration) if fade_out_duration is not None: - pulumi.set(__self__, "fade_out_duration", fade_out_duration) + _setter("fade_out_duration", fade_out_duration) if opacity is not None: - pulumi.set(__self__, "opacity", opacity) + _setter("opacity", opacity) if position is not None: - pulumi.set(__self__, "position", position) + _setter("position", position) if start is not None: - pulumi.set(__self__, "start", start) + _setter("start", start) @property @pulumi.getter(name="inputLabel") @@ -6106,14 +8006,31 @@ def __init__(__self__, *, :param str top: The number of pixels from the top-margin. This can be absolute pixel value (e.g `100`), or relative to the size of the video (For example, `50%`). :param str width: The width of the rectangular region in pixels. This can be absolute pixel value (e.g` 100`), or relative to the size of the video (For example, `50%`). """ + TransformOutputCustomPresetFilterOverlayVideoCropRectangle._configure( + lambda key, value: pulumi.set(__self__, key, value), + height=height, + left=left, + top=top, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + height: Optional[str] = None, + left: Optional[str] = None, + top: Optional[str] = None, + width: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if left is not None: - pulumi.set(__self__, "left", left) + _setter("left", left) if top is not None: - pulumi.set(__self__, "top", top) + _setter("top", top) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -6161,14 +8078,31 @@ def __init__(__self__, *, :param str top: The number of pixels from the top-margin. This can be absolute pixel value (e.g `100`), or relative to the size of the video (For example, `50%`). :param str width: The width of the rectangular region in pixels. This can be absolute pixel value (e.g` 100`), or relative to the size of the video (For example, `50%`). """ + TransformOutputCustomPresetFilterOverlayVideoPosition._configure( + lambda key, value: pulumi.set(__self__, key, value), + height=height, + left=left, + top=top, + width=width, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + height: Optional[str] = None, + left: Optional[str] = None, + top: Optional[str] = None, + width: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if height is not None: - pulumi.set(__self__, "height", height) + _setter("height", height) if left is not None: - pulumi.set(__self__, "left", left) + _setter("left", left) if top is not None: - pulumi.set(__self__, "top", top) + _setter("top", top) if width is not None: - pulumi.set(__self__, "width", width) + _setter("width", width) @property @pulumi.getter @@ -6235,14 +8169,33 @@ def __init__(__self__, *, > **NOTE:** Each format can only have one type: `jpg`, `mp4`, `png` or `transport_stream`. If you need to apply different type you must create one format for each one. """ + TransformOutputCustomPresetFormat._configure( + lambda key, value: pulumi.set(__self__, key, value), + jpg=jpg, + mp4=mp4, + png=png, + transport_stream=transport_stream, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + jpg: Optional['outputs.TransformOutputCustomPresetFormatJpg'] = None, + mp4: Optional['outputs.TransformOutputCustomPresetFormatMp4'] = None, + png: Optional['outputs.TransformOutputCustomPresetFormatPng'] = None, + transport_stream: Optional['outputs.TransformOutputCustomPresetFormatTransportStream'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if transport_stream is None and 'transportStream' in kwargs: + transport_stream = kwargs['transportStream'] + if jpg is not None: - pulumi.set(__self__, "jpg", jpg) + _setter("jpg", jpg) if mp4 is not None: - pulumi.set(__self__, "mp4", mp4) + _setter("mp4", mp4) if png is not None: - pulumi.set(__self__, "png", png) + _setter("png", png) if transport_stream is not None: - pulumi.set(__self__, "transport_stream", transport_stream) + _setter("transport_stream", transport_stream) @property @pulumi.getter @@ -6303,7 +8256,22 @@ def __init__(__self__, *, """ :param str filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: `{Basename}` - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of input video files will be used. If the length of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. `{Extension}` - The appropriate extension for this format. `{Label}` - The label assigned to the codec/layer. `{Index}` - A unique index for thumbnails. Only applicable to thumbnails. `{AudioStream}` - string "Audio" plus audio stream number(start from 1). `{Bitrate}` - The audio/video bitrate in kbps. Not applicable to thumbnails. `{Codec}` - The type of the audio/video codec. `{Resolution}` - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename. """ - pulumi.set(__self__, "filename_pattern", filename_pattern) + TransformOutputCustomPresetFormatJpg._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename_pattern=filename_pattern, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename_pattern: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename_pattern is None and 'filenamePattern' in kwargs: + filename_pattern = kwargs['filenamePattern'] + if filename_pattern is None: + raise TypeError("Missing 'filename_pattern' argument") + + _setter("filename_pattern", filename_pattern) @property @pulumi.getter(name="filenamePattern") @@ -6342,9 +8310,28 @@ def __init__(__self__, *, :param str filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: `{Basename}` - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of input video files will be used. If the length of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. `{Extension}` - The appropriate extension for this format. `{Label}` - The label assigned to the codec/layer. `{Index}` - A unique index for thumbnails. Only applicable to thumbnails. `{AudioStream}` - string "Audio" plus audio stream number(start from 1). `{Bitrate}` - The audio/video bitrate in kbps. Not applicable to thumbnails. `{Codec}` - The type of the audio/video codec. `{Resolution}` - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename. :param Sequence['TransformOutputCustomPresetFormatMp4OutputFileArgs'] output_files: One or more `output_file` blocks as defined below. """ - pulumi.set(__self__, "filename_pattern", filename_pattern) + TransformOutputCustomPresetFormatMp4._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename_pattern=filename_pattern, + output_files=output_files, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename_pattern: Optional[str] = None, + output_files: Optional[Sequence['outputs.TransformOutputCustomPresetFormatMp4OutputFile']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename_pattern is None and 'filenamePattern' in kwargs: + filename_pattern = kwargs['filenamePattern'] + if filename_pattern is None: + raise TypeError("Missing 'filename_pattern' argument") + if output_files is None and 'outputFiles' in kwargs: + output_files = kwargs['outputFiles'] + + _setter("filename_pattern", filename_pattern) if output_files is not None: - pulumi.set(__self__, "output_files", output_files) + _setter("output_files", output_files) @property @pulumi.getter(name="filenamePattern") @@ -6370,7 +8357,20 @@ def __init__(__self__, *, """ :param Sequence[str] labels: The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if the encoder is producing two video layers with labels `v1` and `v2`, and one audio layer with label `a1`, then an array like `["v1", "a1"]` tells the encoder to produce an output file with the video track represented by `v1` and the audio track represented by `a1`. """ - pulumi.set(__self__, "labels", labels) + TransformOutputCustomPresetFormatMp4OutputFile._configure( + lambda key, value: pulumi.set(__self__, key, value), + labels=labels, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + labels: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if labels is None: + raise TypeError("Missing 'labels' argument") + + _setter("labels", labels) @property @pulumi.getter @@ -6405,7 +8405,22 @@ def __init__(__self__, *, """ :param str filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: `{Basename}` - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of input video files will be used. If the length of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. `{Extension}` - The appropriate extension for this format. `{Label}` - The label assigned to the codec/layer. `{Index}` - A unique index for thumbnails. Only applicable to thumbnails. `{AudioStream}` - string "Audio" plus audio stream number(start from 1). `{Bitrate}` - The audio/video bitrate in kbps. Not applicable to thumbnails. `{Codec}` - The type of the audio/video codec. `{Resolution}` - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename. """ - pulumi.set(__self__, "filename_pattern", filename_pattern) + TransformOutputCustomPresetFormatPng._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename_pattern=filename_pattern, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename_pattern: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename_pattern is None and 'filenamePattern' in kwargs: + filename_pattern = kwargs['filenamePattern'] + if filename_pattern is None: + raise TypeError("Missing 'filename_pattern' argument") + + _setter("filename_pattern", filename_pattern) @property @pulumi.getter(name="filenamePattern") @@ -6444,9 +8459,28 @@ def __init__(__self__, *, :param str filename_pattern: The file naming pattern used for the creation of output files. The following macros are supported in the file name: `{Basename}` - An expansion macro that will use the name of the input video file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, the base name of input video files will be used. If the length of base name of the input video file exceeds 32 characters, the base name is truncated to the first 32 characters in total length. `{Extension}` - The appropriate extension for this format. `{Label}` - The label assigned to the codec/layer. `{Index}` - A unique index for thumbnails. Only applicable to thumbnails. `{AudioStream}` - string "Audio" plus audio stream number(start from 1). `{Bitrate}` - The audio/video bitrate in kbps. Not applicable to thumbnails. `{Codec}` - The type of the audio/video codec. `{Resolution}` - The video resolution. Any unsubstituted macros will be collapsed and removed from the filename. :param Sequence['TransformOutputCustomPresetFormatTransportStreamOutputFileArgs'] output_files: One or more `output_file` blocks as defined above. """ - pulumi.set(__self__, "filename_pattern", filename_pattern) + TransformOutputCustomPresetFormatTransportStream._configure( + lambda key, value: pulumi.set(__self__, key, value), + filename_pattern=filename_pattern, + output_files=output_files, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filename_pattern: Optional[str] = None, + output_files: Optional[Sequence['outputs.TransformOutputCustomPresetFormatTransportStreamOutputFile']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filename_pattern is None and 'filenamePattern' in kwargs: + filename_pattern = kwargs['filenamePattern'] + if filename_pattern is None: + raise TypeError("Missing 'filename_pattern' argument") + if output_files is None and 'outputFiles' in kwargs: + output_files = kwargs['outputFiles'] + + _setter("filename_pattern", filename_pattern) if output_files is not None: - pulumi.set(__self__, "output_files", output_files) + _setter("output_files", output_files) @property @pulumi.getter(name="filenamePattern") @@ -6472,7 +8506,20 @@ def __init__(__self__, *, """ :param Sequence[str] labels: The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if the encoder is producing two video layers with labels `v1` and `v2`, and one audio layer with label `a1`, then an array like `["v1", "a1"]` tells the encoder to produce an output file with the video track represented by `v1` and the audio track represented by `a1`. """ - pulumi.set(__self__, "labels", labels) + TransformOutputCustomPresetFormatTransportStreamOutputFile._configure( + lambda key, value: pulumi.set(__self__, key, value), + labels=labels, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + labels: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if labels is None: + raise TypeError("Missing 'labels' argument") + + _setter("labels", labels) @property @pulumi.getter @@ -6519,14 +8566,39 @@ def __init__(__self__, *, :param Mapping[str, str] experimental_options: Dictionary containing key value pairs for parameters not exposed in the preset itself. :param str face_redactor_mode: This mode provides the ability to choose between the following settings: 1) `Analyze` - For detection only. This mode generates a metadata JSON file marking appearances of faces throughout the video. Where possible, appearances of the same person are assigned the same ID. 2) `Combined` - Additionally redacts(blurs) detected faces. 3) `Redact` - This enables a 2-pass process, allowing for selective redaction of a subset of detected faces. It takes in the metadata file from a prior analyze pass, along with the source video, and a user-selected subset of IDs that require redaction. Default to `Analyze`. """ + TransformOutputFaceDetectorPreset._configure( + lambda key, value: pulumi.set(__self__, key, value), + analysis_resolution=analysis_resolution, + blur_type=blur_type, + experimental_options=experimental_options, + face_redactor_mode=face_redactor_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + analysis_resolution: Optional[str] = None, + blur_type: Optional[str] = None, + experimental_options: Optional[Mapping[str, str]] = None, + face_redactor_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if analysis_resolution is None and 'analysisResolution' in kwargs: + analysis_resolution = kwargs['analysisResolution'] + if blur_type is None and 'blurType' in kwargs: + blur_type = kwargs['blurType'] + if experimental_options is None and 'experimentalOptions' in kwargs: + experimental_options = kwargs['experimentalOptions'] + if face_redactor_mode is None and 'faceRedactorMode' in kwargs: + face_redactor_mode = kwargs['faceRedactorMode'] + if analysis_resolution is not None: - pulumi.set(__self__, "analysis_resolution", analysis_resolution) + _setter("analysis_resolution", analysis_resolution) if blur_type is not None: - pulumi.set(__self__, "blur_type", blur_type) + _setter("blur_type", blur_type) if experimental_options is not None: - pulumi.set(__self__, "experimental_options", experimental_options) + _setter("experimental_options", experimental_options) if face_redactor_mode is not None: - pulumi.set(__self__, "face_redactor_mode", face_redactor_mode) + _setter("face_redactor_mode", face_redactor_mode) @property @pulumi.getter(name="analysisResolution") @@ -6597,14 +8669,39 @@ def __init__(__self__, *, :param Mapping[str, str] experimental_options: Dictionary containing key value pairs for parameters not exposed in the preset itself. :param str insights_type: Defines the type of insights that you want the service to generate. The allowed values are `AudioInsightsOnly`, `VideoInsightsOnly`, and `AllInsights`. If you set this to `AllInsights` and the input is audio only, then only audio insights are generated. Similarly, if the input is video only, then only video insights are generated. It is recommended that you not use `AudioInsightsOnly` if you expect some of your inputs to be video only; or use `VideoInsightsOnly` if you expect some of your inputs to be audio only. Your Jobs in such conditions would error out. Default to `AllInsights`. """ + TransformOutputVideoAnalyzerPreset._configure( + lambda key, value: pulumi.set(__self__, key, value), + audio_analysis_mode=audio_analysis_mode, + audio_language=audio_language, + experimental_options=experimental_options, + insights_type=insights_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audio_analysis_mode: Optional[str] = None, + audio_language: Optional[str] = None, + experimental_options: Optional[Mapping[str, str]] = None, + insights_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audio_analysis_mode is None and 'audioAnalysisMode' in kwargs: + audio_analysis_mode = kwargs['audioAnalysisMode'] + if audio_language is None and 'audioLanguage' in kwargs: + audio_language = kwargs['audioLanguage'] + if experimental_options is None and 'experimentalOptions' in kwargs: + experimental_options = kwargs['experimentalOptions'] + if insights_type is None and 'insightsType' in kwargs: + insights_type = kwargs['insightsType'] + if audio_analysis_mode is not None: - pulumi.set(__self__, "audio_analysis_mode", audio_analysis_mode) + _setter("audio_analysis_mode", audio_analysis_mode) if audio_language is not None: - pulumi.set(__self__, "audio_language", audio_language) + _setter("audio_language", audio_language) if experimental_options is not None: - pulumi.set(__self__, "experimental_options", experimental_options) + _setter("experimental_options", experimental_options) if insights_type is not None: - pulumi.set(__self__, "insights_type", insights_type) + _setter("insights_type", insights_type) @property @pulumi.getter(name="audioAnalysisMode") diff --git a/sdk/python/pulumi_azure/media/service_account.py b/sdk/python/pulumi_azure/media/service_account.py index d1e1baecf7..88b7b468d4 100644 --- a/sdk/python/pulumi_azure/media/service_account.py +++ b/sdk/python/pulumi_azure/media/service_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,24 +39,67 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_authentication_type: Specifies the storage authentication type. Possible value is `ManagedIdentity` or `System`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_accounts", storage_accounts) + ServiceAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + storage_accounts=storage_accounts, + encryption=encryption, + identity=identity, + key_delivery_access_control=key_delivery_access_control, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + storage_authentication_type=storage_authentication_type, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceAccountStorageAccountArgs']]]] = None, + encryption: Optional[pulumi.Input['ServiceAccountEncryptionArgs']] = None, + identity: Optional[pulumi.Input['ServiceAccountIdentityArgs']] = None, + key_delivery_access_control: Optional[pulumi.Input['ServiceAccountKeyDeliveryAccessControlArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + storage_authentication_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if storage_accounts is None: + raise TypeError("Missing 'storage_accounts' argument") + if key_delivery_access_control is None and 'keyDeliveryAccessControl' in kwargs: + key_delivery_access_control = kwargs['keyDeliveryAccessControl'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if storage_authentication_type is None and 'storageAuthenticationType' in kwargs: + storage_authentication_type = kwargs['storageAuthenticationType'] + + _setter("resource_group_name", resource_group_name) + _setter("storage_accounts", storage_accounts) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_delivery_access_control is not None: - pulumi.set(__self__, "key_delivery_access_control", key_delivery_access_control) + _setter("key_delivery_access_control", key_delivery_access_control) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if storage_authentication_type is not None: - pulumi.set(__self__, "storage_authentication_type", storage_authentication_type) + _setter("storage_authentication_type", storage_authentication_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -205,26 +248,65 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_authentication_type: Specifies the storage authentication type. Possible value is `ManagedIdentity` or `System`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource. """ + _ServiceAccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption=encryption, + identity=identity, + key_delivery_access_control=key_delivery_access_control, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + storage_accounts=storage_accounts, + storage_authentication_type=storage_authentication_type, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption: Optional[pulumi.Input['ServiceAccountEncryptionArgs']] = None, + identity: Optional[pulumi.Input['ServiceAccountIdentityArgs']] = None, + key_delivery_access_control: Optional[pulumi.Input['ServiceAccountKeyDeliveryAccessControlArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceAccountStorageAccountArgs']]]] = None, + storage_authentication_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_delivery_access_control is None and 'keyDeliveryAccessControl' in kwargs: + key_delivery_access_control = kwargs['keyDeliveryAccessControl'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if storage_authentication_type is None and 'storageAuthenticationType' in kwargs: + storage_authentication_type = kwargs['storageAuthenticationType'] + if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_delivery_access_control is not None: - pulumi.set(__self__, "key_delivery_access_control", key_delivery_access_control) + _setter("key_delivery_access_control", key_delivery_access_control) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if storage_authentication_type is not None: - pulumi.set(__self__, "storage_authentication_type", storage_authentication_type) + _setter("storage_authentication_type", storage_authentication_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -456,6 +538,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceAccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -480,8 +566,23 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ServiceAccountArgs.__new__(ServiceAccountArgs) + if encryption is not None and not isinstance(encryption, ServiceAccountEncryptionArgs): + encryption = encryption or {} + def _setter(key, value): + encryption[key] = value + ServiceAccountEncryptionArgs._configure(_setter, **encryption) __props__.__dict__["encryption"] = encryption + if identity is not None and not isinstance(identity, ServiceAccountIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ServiceAccountIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity + if key_delivery_access_control is not None and not isinstance(key_delivery_access_control, ServiceAccountKeyDeliveryAccessControlArgs): + key_delivery_access_control = key_delivery_access_control or {} + def _setter(key, value): + key_delivery_access_control[key] = value + ServiceAccountKeyDeliveryAccessControlArgs._configure(_setter, **key_delivery_access_control) __props__.__dict__["key_delivery_access_control"] = key_delivery_access_control __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/media/streaming_endpoint.py b/sdk/python/pulumi_azure/media/streaming_endpoint.py index 2834cf8f03..1207eaa5ed 100644 --- a/sdk/python/pulumi_azure/media/streaming_endpoint.py +++ b/sdk/python/pulumi_azure/media/streaming_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,33 +49,100 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Streaming Endpoint maximum length is `24`. Changing this forces a new Streaming Endpoint to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Streaming Endpoint. """ - pulumi.set(__self__, "media_services_account_name", media_services_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scale_units", scale_units) + StreamingEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + media_services_account_name=media_services_account_name, + resource_group_name=resource_group_name, + scale_units=scale_units, + access_control=access_control, + auto_start_enabled=auto_start_enabled, + cdn_enabled=cdn_enabled, + cdn_profile=cdn_profile, + cdn_provider=cdn_provider, + cross_site_access_policy=cross_site_access_policy, + custom_host_names=custom_host_names, + description=description, + location=location, + max_cache_age_seconds=max_cache_age_seconds, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + media_services_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scale_units: Optional[pulumi.Input[int]] = None, + access_control: Optional[pulumi.Input['StreamingEndpointAccessControlArgs']] = None, + auto_start_enabled: Optional[pulumi.Input[bool]] = None, + cdn_enabled: Optional[pulumi.Input[bool]] = None, + cdn_profile: Optional[pulumi.Input[str]] = None, + cdn_provider: Optional[pulumi.Input[str]] = None, + cross_site_access_policy: Optional[pulumi.Input['StreamingEndpointCrossSiteAccessPolicyArgs']] = None, + custom_host_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_cache_age_seconds: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if media_services_account_name is None: + raise TypeError("Missing 'media_services_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scale_units is None and 'scaleUnits' in kwargs: + scale_units = kwargs['scaleUnits'] + if scale_units is None: + raise TypeError("Missing 'scale_units' argument") + if access_control is None and 'accessControl' in kwargs: + access_control = kwargs['accessControl'] + if auto_start_enabled is None and 'autoStartEnabled' in kwargs: + auto_start_enabled = kwargs['autoStartEnabled'] + if cdn_enabled is None and 'cdnEnabled' in kwargs: + cdn_enabled = kwargs['cdnEnabled'] + if cdn_profile is None and 'cdnProfile' in kwargs: + cdn_profile = kwargs['cdnProfile'] + if cdn_provider is None and 'cdnProvider' in kwargs: + cdn_provider = kwargs['cdnProvider'] + if cross_site_access_policy is None and 'crossSiteAccessPolicy' in kwargs: + cross_site_access_policy = kwargs['crossSiteAccessPolicy'] + if custom_host_names is None and 'customHostNames' in kwargs: + custom_host_names = kwargs['customHostNames'] + if max_cache_age_seconds is None and 'maxCacheAgeSeconds' in kwargs: + max_cache_age_seconds = kwargs['maxCacheAgeSeconds'] + + _setter("media_services_account_name", media_services_account_name) + _setter("resource_group_name", resource_group_name) + _setter("scale_units", scale_units) if access_control is not None: - pulumi.set(__self__, "access_control", access_control) + _setter("access_control", access_control) if auto_start_enabled is not None: - pulumi.set(__self__, "auto_start_enabled", auto_start_enabled) + _setter("auto_start_enabled", auto_start_enabled) if cdn_enabled is not None: - pulumi.set(__self__, "cdn_enabled", cdn_enabled) + _setter("cdn_enabled", cdn_enabled) if cdn_profile is not None: - pulumi.set(__self__, "cdn_profile", cdn_profile) + _setter("cdn_profile", cdn_profile) if cdn_provider is not None: - pulumi.set(__self__, "cdn_provider", cdn_provider) + _setter("cdn_provider", cdn_provider) if cross_site_access_policy is not None: - pulumi.set(__self__, "cross_site_access_policy", cross_site_access_policy) + _setter("cross_site_access_policy", cross_site_access_policy) if custom_host_names is not None: - pulumi.set(__self__, "custom_host_names", custom_host_names) + _setter("custom_host_names", custom_host_names) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_cache_age_seconds is not None: - pulumi.set(__self__, "max_cache_age_seconds", max_cache_age_seconds) + _setter("max_cache_age_seconds", max_cache_age_seconds) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="mediaServicesAccountName") @@ -298,40 +365,107 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['StreamingEndpointSkusArgs']]] skus: A `sku` block defined as below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Streaming Endpoint. """ + _StreamingEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_control=access_control, + auto_start_enabled=auto_start_enabled, + cdn_enabled=cdn_enabled, + cdn_profile=cdn_profile, + cdn_provider=cdn_provider, + cross_site_access_policy=cross_site_access_policy, + custom_host_names=custom_host_names, + description=description, + host_name=host_name, + location=location, + max_cache_age_seconds=max_cache_age_seconds, + media_services_account_name=media_services_account_name, + name=name, + resource_group_name=resource_group_name, + scale_units=scale_units, + skus=skus, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_control: Optional[pulumi.Input['StreamingEndpointAccessControlArgs']] = None, + auto_start_enabled: Optional[pulumi.Input[bool]] = None, + cdn_enabled: Optional[pulumi.Input[bool]] = None, + cdn_profile: Optional[pulumi.Input[str]] = None, + cdn_provider: Optional[pulumi.Input[str]] = None, + cross_site_access_policy: Optional[pulumi.Input['StreamingEndpointCrossSiteAccessPolicyArgs']] = None, + custom_host_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + host_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + max_cache_age_seconds: Optional[pulumi.Input[int]] = None, + media_services_account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scale_units: Optional[pulumi.Input[int]] = None, + skus: Optional[pulumi.Input[Sequence[pulumi.Input['StreamingEndpointSkusArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_control is None and 'accessControl' in kwargs: + access_control = kwargs['accessControl'] + if auto_start_enabled is None and 'autoStartEnabled' in kwargs: + auto_start_enabled = kwargs['autoStartEnabled'] + if cdn_enabled is None and 'cdnEnabled' in kwargs: + cdn_enabled = kwargs['cdnEnabled'] + if cdn_profile is None and 'cdnProfile' in kwargs: + cdn_profile = kwargs['cdnProfile'] + if cdn_provider is None and 'cdnProvider' in kwargs: + cdn_provider = kwargs['cdnProvider'] + if cross_site_access_policy is None and 'crossSiteAccessPolicy' in kwargs: + cross_site_access_policy = kwargs['crossSiteAccessPolicy'] + if custom_host_names is None and 'customHostNames' in kwargs: + custom_host_names = kwargs['customHostNames'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if max_cache_age_seconds is None and 'maxCacheAgeSeconds' in kwargs: + max_cache_age_seconds = kwargs['maxCacheAgeSeconds'] + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if scale_units is None and 'scaleUnits' in kwargs: + scale_units = kwargs['scaleUnits'] + if access_control is not None: - pulumi.set(__self__, "access_control", access_control) + _setter("access_control", access_control) if auto_start_enabled is not None: - pulumi.set(__self__, "auto_start_enabled", auto_start_enabled) + _setter("auto_start_enabled", auto_start_enabled) if cdn_enabled is not None: - pulumi.set(__self__, "cdn_enabled", cdn_enabled) + _setter("cdn_enabled", cdn_enabled) if cdn_profile is not None: - pulumi.set(__self__, "cdn_profile", cdn_profile) + _setter("cdn_profile", cdn_profile) if cdn_provider is not None: - pulumi.set(__self__, "cdn_provider", cdn_provider) + _setter("cdn_provider", cdn_provider) if cross_site_access_policy is not None: - pulumi.set(__self__, "cross_site_access_policy", cross_site_access_policy) + _setter("cross_site_access_policy", cross_site_access_policy) if custom_host_names is not None: - pulumi.set(__self__, "custom_host_names", custom_host_names) + _setter("custom_host_names", custom_host_names) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_cache_age_seconds is not None: - pulumi.set(__self__, "max_cache_age_seconds", max_cache_age_seconds) + _setter("max_cache_age_seconds", max_cache_age_seconds) if media_services_account_name is not None: - pulumi.set(__self__, "media_services_account_name", media_services_account_name) + _setter("media_services_account_name", media_services_account_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scale_units is not None: - pulumi.set(__self__, "scale_units", scale_units) + _setter("scale_units", scale_units) if skus is not None: - pulumi.set(__self__, "skus", skus) + _setter("skus", skus) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="accessControl") @@ -765,6 +899,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StreamingEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -794,11 +932,21 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = StreamingEndpointArgs.__new__(StreamingEndpointArgs) + if access_control is not None and not isinstance(access_control, StreamingEndpointAccessControlArgs): + access_control = access_control or {} + def _setter(key, value): + access_control[key] = value + StreamingEndpointAccessControlArgs._configure(_setter, **access_control) __props__.__dict__["access_control"] = access_control __props__.__dict__["auto_start_enabled"] = auto_start_enabled __props__.__dict__["cdn_enabled"] = cdn_enabled __props__.__dict__["cdn_profile"] = cdn_profile __props__.__dict__["cdn_provider"] = cdn_provider + if cross_site_access_policy is not None and not isinstance(cross_site_access_policy, StreamingEndpointCrossSiteAccessPolicyArgs): + cross_site_access_policy = cross_site_access_policy or {} + def _setter(key, value): + cross_site_access_policy[key] = value + StreamingEndpointCrossSiteAccessPolicyArgs._configure(_setter, **cross_site_access_policy) __props__.__dict__["cross_site_access_policy"] = cross_site_access_policy __props__.__dict__["custom_host_names"] = custom_host_names __props__.__dict__["description"] = description diff --git a/sdk/python/pulumi_azure/media/streaming_locator.py b/sdk/python/pulumi_azure/media/streaming_locator.py index 7715263d19..d423d59410 100644 --- a/sdk/python/pulumi_azure/media/streaming_locator.py +++ b/sdk/python/pulumi_azure/media/streaming_locator.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,26 +43,89 @@ def __init__(__self__, *, :param pulumi.Input[str] start_time: The start time of the Streaming Locator. Changing this forces a new Streaming Locator to be created. :param pulumi.Input[str] streaming_locator_id: The ID of the Streaming Locator. Changing this forces a new Streaming Locator to be created. """ - pulumi.set(__self__, "asset_name", asset_name) - pulumi.set(__self__, "media_services_account_name", media_services_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "streaming_policy_name", streaming_policy_name) + StreamingLocatorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + asset_name=asset_name, + media_services_account_name=media_services_account_name, + resource_group_name=resource_group_name, + streaming_policy_name=streaming_policy_name, + alternative_media_id=alternative_media_id, + content_keys=content_keys, + default_content_key_policy_name=default_content_key_policy_name, + end_time=end_time, + filter_names=filter_names, + name=name, + start_time=start_time, + streaming_locator_id=streaming_locator_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asset_name: Optional[pulumi.Input[str]] = None, + media_services_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + streaming_policy_name: Optional[pulumi.Input[str]] = None, + alternative_media_id: Optional[pulumi.Input[str]] = None, + content_keys: Optional[pulumi.Input[Sequence[pulumi.Input['StreamingLocatorContentKeyArgs']]]] = None, + default_content_key_policy_name: Optional[pulumi.Input[str]] = None, + end_time: Optional[pulumi.Input[str]] = None, + filter_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + streaming_locator_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if asset_name is None and 'assetName' in kwargs: + asset_name = kwargs['assetName'] + if asset_name is None: + raise TypeError("Missing 'asset_name' argument") + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if media_services_account_name is None: + raise TypeError("Missing 'media_services_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if streaming_policy_name is None and 'streamingPolicyName' in kwargs: + streaming_policy_name = kwargs['streamingPolicyName'] + if streaming_policy_name is None: + raise TypeError("Missing 'streaming_policy_name' argument") + if alternative_media_id is None and 'alternativeMediaId' in kwargs: + alternative_media_id = kwargs['alternativeMediaId'] + if content_keys is None and 'contentKeys' in kwargs: + content_keys = kwargs['contentKeys'] + if default_content_key_policy_name is None and 'defaultContentKeyPolicyName' in kwargs: + default_content_key_policy_name = kwargs['defaultContentKeyPolicyName'] + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if filter_names is None and 'filterNames' in kwargs: + filter_names = kwargs['filterNames'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if streaming_locator_id is None and 'streamingLocatorId' in kwargs: + streaming_locator_id = kwargs['streamingLocatorId'] + + _setter("asset_name", asset_name) + _setter("media_services_account_name", media_services_account_name) + _setter("resource_group_name", resource_group_name) + _setter("streaming_policy_name", streaming_policy_name) if alternative_media_id is not None: - pulumi.set(__self__, "alternative_media_id", alternative_media_id) + _setter("alternative_media_id", alternative_media_id) if content_keys is not None: - pulumi.set(__self__, "content_keys", content_keys) + _setter("content_keys", content_keys) if default_content_key_policy_name is not None: - pulumi.set(__self__, "default_content_key_policy_name", default_content_key_policy_name) + _setter("default_content_key_policy_name", default_content_key_policy_name) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if filter_names is not None: - pulumi.set(__self__, "filter_names", filter_names) + _setter("filter_names", filter_names) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if streaming_locator_id is not None: - pulumi.set(__self__, "streaming_locator_id", streaming_locator_id) + _setter("streaming_locator_id", streaming_locator_id) @property @pulumi.getter(name="assetName") @@ -239,30 +302,85 @@ def __init__(__self__, *, :param pulumi.Input[str] streaming_locator_id: The ID of the Streaming Locator. Changing this forces a new Streaming Locator to be created. :param pulumi.Input[str] streaming_policy_name: Name of the Streaming Policy used by this Streaming Locator. Either specify the name of Streaming Policy you created or use one of the predefined Streaming Policies. The predefined Streaming Policies available are: `Predefined_DownloadOnly`, `Predefined_ClearStreamingOnly`, `Predefined_DownloadAndClearStreaming`, `Predefined_ClearKey`, `Predefined_MultiDrmCencStreaming` and `Predefined_MultiDrmStreaming`. Changing this forces a new Streaming Locator to be created. """ + _StreamingLocatorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alternative_media_id=alternative_media_id, + asset_name=asset_name, + content_keys=content_keys, + default_content_key_policy_name=default_content_key_policy_name, + end_time=end_time, + filter_names=filter_names, + media_services_account_name=media_services_account_name, + name=name, + resource_group_name=resource_group_name, + start_time=start_time, + streaming_locator_id=streaming_locator_id, + streaming_policy_name=streaming_policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alternative_media_id: Optional[pulumi.Input[str]] = None, + asset_name: Optional[pulumi.Input[str]] = None, + content_keys: Optional[pulumi.Input[Sequence[pulumi.Input['StreamingLocatorContentKeyArgs']]]] = None, + default_content_key_policy_name: Optional[pulumi.Input[str]] = None, + end_time: Optional[pulumi.Input[str]] = None, + filter_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + media_services_account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + streaming_locator_id: Optional[pulumi.Input[str]] = None, + streaming_policy_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alternative_media_id is None and 'alternativeMediaId' in kwargs: + alternative_media_id = kwargs['alternativeMediaId'] + if asset_name is None and 'assetName' in kwargs: + asset_name = kwargs['assetName'] + if content_keys is None and 'contentKeys' in kwargs: + content_keys = kwargs['contentKeys'] + if default_content_key_policy_name is None and 'defaultContentKeyPolicyName' in kwargs: + default_content_key_policy_name = kwargs['defaultContentKeyPolicyName'] + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if filter_names is None and 'filterNames' in kwargs: + filter_names = kwargs['filterNames'] + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if streaming_locator_id is None and 'streamingLocatorId' in kwargs: + streaming_locator_id = kwargs['streamingLocatorId'] + if streaming_policy_name is None and 'streamingPolicyName' in kwargs: + streaming_policy_name = kwargs['streamingPolicyName'] + if alternative_media_id is not None: - pulumi.set(__self__, "alternative_media_id", alternative_media_id) + _setter("alternative_media_id", alternative_media_id) if asset_name is not None: - pulumi.set(__self__, "asset_name", asset_name) + _setter("asset_name", asset_name) if content_keys is not None: - pulumi.set(__self__, "content_keys", content_keys) + _setter("content_keys", content_keys) if default_content_key_policy_name is not None: - pulumi.set(__self__, "default_content_key_policy_name", default_content_key_policy_name) + _setter("default_content_key_policy_name", default_content_key_policy_name) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if filter_names is not None: - pulumi.set(__self__, "filter_names", filter_names) + _setter("filter_names", filter_names) if media_services_account_name is not None: - pulumi.set(__self__, "media_services_account_name", media_services_account_name) + _setter("media_services_account_name", media_services_account_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if streaming_locator_id is not None: - pulumi.set(__self__, "streaming_locator_id", streaming_locator_id) + _setter("streaming_locator_id", streaming_locator_id) if streaming_policy_name is not None: - pulumi.set(__self__, "streaming_policy_name", streaming_policy_name) + _setter("streaming_policy_name", streaming_policy_name) @property @pulumi.getter(name="alternativeMediaId") @@ -548,6 +666,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StreamingLocatorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/media/streaming_policy.py b/sdk/python/pulumi_azure/media/streaming_policy.py index f02d5e9c79..42de1b32bb 100644 --- a/sdk/python/pulumi_azure/media/streaming_policy.py +++ b/sdk/python/pulumi_azure/media/streaming_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,20 +35,63 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Streaming Policy. Changing this forces a new Streaming Policy to be created. :param pulumi.Input['StreamingPolicyNoEncryptionEnabledProtocolsArgs'] no_encryption_enabled_protocols: A `no_encryption_enabled_protocols` block as defined below. Changing this forces a new Streaming Policy to be created. """ - pulumi.set(__self__, "media_services_account_name", media_services_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + StreamingPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + media_services_account_name=media_services_account_name, + resource_group_name=resource_group_name, + common_encryption_cbcs=common_encryption_cbcs, + common_encryption_cenc=common_encryption_cenc, + default_content_key_policy_name=default_content_key_policy_name, + envelope_encryption=envelope_encryption, + name=name, + no_encryption_enabled_protocols=no_encryption_enabled_protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + media_services_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + common_encryption_cbcs: Optional[pulumi.Input['StreamingPolicyCommonEncryptionCbcsArgs']] = None, + common_encryption_cenc: Optional[pulumi.Input['StreamingPolicyCommonEncryptionCencArgs']] = None, + default_content_key_policy_name: Optional[pulumi.Input[str]] = None, + envelope_encryption: Optional[pulumi.Input['StreamingPolicyEnvelopeEncryptionArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + no_encryption_enabled_protocols: Optional[pulumi.Input['StreamingPolicyNoEncryptionEnabledProtocolsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if media_services_account_name is None: + raise TypeError("Missing 'media_services_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if common_encryption_cbcs is None and 'commonEncryptionCbcs' in kwargs: + common_encryption_cbcs = kwargs['commonEncryptionCbcs'] + if common_encryption_cenc is None and 'commonEncryptionCenc' in kwargs: + common_encryption_cenc = kwargs['commonEncryptionCenc'] + if default_content_key_policy_name is None and 'defaultContentKeyPolicyName' in kwargs: + default_content_key_policy_name = kwargs['defaultContentKeyPolicyName'] + if envelope_encryption is None and 'envelopeEncryption' in kwargs: + envelope_encryption = kwargs['envelopeEncryption'] + if no_encryption_enabled_protocols is None and 'noEncryptionEnabledProtocols' in kwargs: + no_encryption_enabled_protocols = kwargs['noEncryptionEnabledProtocols'] + + _setter("media_services_account_name", media_services_account_name) + _setter("resource_group_name", resource_group_name) if common_encryption_cbcs is not None: - pulumi.set(__self__, "common_encryption_cbcs", common_encryption_cbcs) + _setter("common_encryption_cbcs", common_encryption_cbcs) if common_encryption_cenc is not None: - pulumi.set(__self__, "common_encryption_cenc", common_encryption_cenc) + _setter("common_encryption_cenc", common_encryption_cenc) if default_content_key_policy_name is not None: - pulumi.set(__self__, "default_content_key_policy_name", default_content_key_policy_name) + _setter("default_content_key_policy_name", default_content_key_policy_name) if envelope_encryption is not None: - pulumi.set(__self__, "envelope_encryption", envelope_encryption) + _setter("envelope_encryption", envelope_encryption) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if no_encryption_enabled_protocols is not None: - pulumi.set(__self__, "no_encryption_enabled_protocols", no_encryption_enabled_protocols) + _setter("no_encryption_enabled_protocols", no_encryption_enabled_protocols) @property @pulumi.getter(name="mediaServicesAccountName") @@ -169,22 +212,61 @@ def __init__(__self__, *, :param pulumi.Input['StreamingPolicyNoEncryptionEnabledProtocolsArgs'] no_encryption_enabled_protocols: A `no_encryption_enabled_protocols` block as defined below. Changing this forces a new Streaming Policy to be created. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Streaming Policy should exist. Changing this forces a new Streaming Policy to be created. """ + _StreamingPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + common_encryption_cbcs=common_encryption_cbcs, + common_encryption_cenc=common_encryption_cenc, + default_content_key_policy_name=default_content_key_policy_name, + envelope_encryption=envelope_encryption, + media_services_account_name=media_services_account_name, + name=name, + no_encryption_enabled_protocols=no_encryption_enabled_protocols, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + common_encryption_cbcs: Optional[pulumi.Input['StreamingPolicyCommonEncryptionCbcsArgs']] = None, + common_encryption_cenc: Optional[pulumi.Input['StreamingPolicyCommonEncryptionCencArgs']] = None, + default_content_key_policy_name: Optional[pulumi.Input[str]] = None, + envelope_encryption: Optional[pulumi.Input['StreamingPolicyEnvelopeEncryptionArgs']] = None, + media_services_account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + no_encryption_enabled_protocols: Optional[pulumi.Input['StreamingPolicyNoEncryptionEnabledProtocolsArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if common_encryption_cbcs is None and 'commonEncryptionCbcs' in kwargs: + common_encryption_cbcs = kwargs['commonEncryptionCbcs'] + if common_encryption_cenc is None and 'commonEncryptionCenc' in kwargs: + common_encryption_cenc = kwargs['commonEncryptionCenc'] + if default_content_key_policy_name is None and 'defaultContentKeyPolicyName' in kwargs: + default_content_key_policy_name = kwargs['defaultContentKeyPolicyName'] + if envelope_encryption is None and 'envelopeEncryption' in kwargs: + envelope_encryption = kwargs['envelopeEncryption'] + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if no_encryption_enabled_protocols is None and 'noEncryptionEnabledProtocols' in kwargs: + no_encryption_enabled_protocols = kwargs['noEncryptionEnabledProtocols'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if common_encryption_cbcs is not None: - pulumi.set(__self__, "common_encryption_cbcs", common_encryption_cbcs) + _setter("common_encryption_cbcs", common_encryption_cbcs) if common_encryption_cenc is not None: - pulumi.set(__self__, "common_encryption_cenc", common_encryption_cenc) + _setter("common_encryption_cenc", common_encryption_cenc) if default_content_key_policy_name is not None: - pulumi.set(__self__, "default_content_key_policy_name", default_content_key_policy_name) + _setter("default_content_key_policy_name", default_content_key_policy_name) if envelope_encryption is not None: - pulumi.set(__self__, "envelope_encryption", envelope_encryption) + _setter("envelope_encryption", envelope_encryption) if media_services_account_name is not None: - pulumi.set(__self__, "media_services_account_name", media_services_account_name) + _setter("media_services_account_name", media_services_account_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if no_encryption_enabled_protocols is not None: - pulumi.set(__self__, "no_encryption_enabled_protocols", no_encryption_enabled_protocols) + _setter("no_encryption_enabled_protocols", no_encryption_enabled_protocols) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="commonEncryptionCbcs") @@ -494,6 +576,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StreamingPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -516,14 +602,34 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = StreamingPolicyArgs.__new__(StreamingPolicyArgs) + if common_encryption_cbcs is not None and not isinstance(common_encryption_cbcs, StreamingPolicyCommonEncryptionCbcsArgs): + common_encryption_cbcs = common_encryption_cbcs or {} + def _setter(key, value): + common_encryption_cbcs[key] = value + StreamingPolicyCommonEncryptionCbcsArgs._configure(_setter, **common_encryption_cbcs) __props__.__dict__["common_encryption_cbcs"] = common_encryption_cbcs + if common_encryption_cenc is not None and not isinstance(common_encryption_cenc, StreamingPolicyCommonEncryptionCencArgs): + common_encryption_cenc = common_encryption_cenc or {} + def _setter(key, value): + common_encryption_cenc[key] = value + StreamingPolicyCommonEncryptionCencArgs._configure(_setter, **common_encryption_cenc) __props__.__dict__["common_encryption_cenc"] = common_encryption_cenc __props__.__dict__["default_content_key_policy_name"] = default_content_key_policy_name + if envelope_encryption is not None and not isinstance(envelope_encryption, StreamingPolicyEnvelopeEncryptionArgs): + envelope_encryption = envelope_encryption or {} + def _setter(key, value): + envelope_encryption[key] = value + StreamingPolicyEnvelopeEncryptionArgs._configure(_setter, **envelope_encryption) __props__.__dict__["envelope_encryption"] = envelope_encryption if media_services_account_name is None and not opts.urn: raise TypeError("Missing required property 'media_services_account_name'") __props__.__dict__["media_services_account_name"] = media_services_account_name __props__.__dict__["name"] = name + if no_encryption_enabled_protocols is not None and not isinstance(no_encryption_enabled_protocols, StreamingPolicyNoEncryptionEnabledProtocolsArgs): + no_encryption_enabled_protocols = no_encryption_enabled_protocols or {} + def _setter(key, value): + no_encryption_enabled_protocols[key] = value + StreamingPolicyNoEncryptionEnabledProtocolsArgs._configure(_setter, **no_encryption_enabled_protocols) __props__.__dict__["no_encryption_enabled_protocols"] = no_encryption_enabled_protocols if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") diff --git a/sdk/python/pulumi_azure/media/transform.py b/sdk/python/pulumi_azure/media/transform.py index 0d0316de52..578adb0e0a 100644 --- a/sdk/python/pulumi_azure/media/transform.py +++ b/sdk/python/pulumi_azure/media/transform.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Transform. Changing this forces a new Transform to be created. :param pulumi.Input[Sequence[pulumi.Input['TransformOutputArgs']]] outputs: One or more `output` blocks as defined below. At least one `output` must be defined. """ - pulumi.set(__self__, "media_services_account_name", media_services_account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + TransformArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + media_services_account_name=media_services_account_name, + resource_group_name=resource_group_name, + description=description, + name=name, + outputs=outputs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + media_services_account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outputs: Optional[pulumi.Input[Sequence[pulumi.Input['TransformOutputArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if media_services_account_name is None: + raise TypeError("Missing 'media_services_account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("media_services_account_name", media_services_account_name) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outputs is not None: - pulumi.set(__self__, "outputs", outputs) + _setter("outputs", outputs) @property @pulumi.getter(name="mediaServicesAccountName") @@ -115,16 +142,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['TransformOutputArgs']]] outputs: One or more `output` blocks as defined below. At least one `output` must be defined. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Transform should exist. Changing this forces a new Transform to be created. """ + _TransformState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + media_services_account_name=media_services_account_name, + name=name, + outputs=outputs, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + media_services_account_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outputs: Optional[pulumi.Input[Sequence[pulumi.Input['TransformOutputArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if media_services_account_name is None and 'mediaServicesAccountName' in kwargs: + media_services_account_name = kwargs['mediaServicesAccountName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if media_services_account_name is not None: - pulumi.set(__self__, "media_services_account_name", media_services_account_name) + _setter("media_services_account_name", media_services_account_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outputs is not None: - pulumi.set(__self__, "outputs", outputs) + _setter("outputs", outputs) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter @@ -890,6 +940,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TransformArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mediaservices/_inputs.py b/sdk/python/pulumi_azure/mediaservices/_inputs.py index 925d2e03f2..f88f6b2385 100644 --- a/sdk/python/pulumi_azure/mediaservices/_inputs.py +++ b/sdk/python/pulumi_azure/mediaservices/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -31,14 +31,37 @@ def __init__(__self__, *, :param pulumi.Input['AccountEncryptionManagedIdentityArgs'] managed_identity: A `managed_identity` block as defined below. :param pulumi.Input[str] type: Specifies the type of key used to encrypt the account data. Possible values are `SystemKey` and `CustomerKey`. """ + AccountEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + current_key_identifier=current_key_identifier, + key_vault_key_identifier=key_vault_key_identifier, + managed_identity=managed_identity, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + current_key_identifier: Optional[pulumi.Input[str]] = None, + key_vault_key_identifier: Optional[pulumi.Input[str]] = None, + managed_identity: Optional[pulumi.Input['AccountEncryptionManagedIdentityArgs']] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if current_key_identifier is None and 'currentKeyIdentifier' in kwargs: + current_key_identifier = kwargs['currentKeyIdentifier'] + if key_vault_key_identifier is None and 'keyVaultKeyIdentifier' in kwargs: + key_vault_key_identifier = kwargs['keyVaultKeyIdentifier'] + if managed_identity is None and 'managedIdentity' in kwargs: + managed_identity = kwargs['managedIdentity'] + if current_key_identifier is not None: - pulumi.set(__self__, "current_key_identifier", current_key_identifier) + _setter("current_key_identifier", current_key_identifier) if key_vault_key_identifier is not None: - pulumi.set(__self__, "key_vault_key_identifier", key_vault_key_identifier) + _setter("key_vault_key_identifier", key_vault_key_identifier) if managed_identity is not None: - pulumi.set(__self__, "managed_identity", managed_identity) + _setter("managed_identity", managed_identity) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="currentKeyIdentifier") @@ -98,10 +121,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_system_assigned_identity: Whether to use System Assigned Identity. Possible Values are `true` and `false`. :param pulumi.Input[str] user_assigned_identity_id: The ID of the User Assigned Identity. This value can only be set when `use_system_assigned_identity` is `false` """ + AccountEncryptionManagedIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + use_system_assigned_identity=use_system_assigned_identity, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + use_system_assigned_identity: Optional[pulumi.Input[bool]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if use_system_assigned_identity is None and 'useSystemAssignedIdentity' in kwargs: + use_system_assigned_identity = kwargs['useSystemAssignedIdentity'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if use_system_assigned_identity is not None: - pulumi.set(__self__, "use_system_assigned_identity", use_system_assigned_identity) + _setter("use_system_assigned_identity", use_system_assigned_identity) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="useSystemAssignedIdentity") @@ -141,13 +181,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + AccountIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -207,10 +272,27 @@ def __init__(__self__, *, :param pulumi.Input[str] default_action: The Default Action to use when no rules match from `ip_allow_list`. Possible values are `Allow` and `Deny`. :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_allow_lists: One or more IP Addresses, or CIDR Blocks which should be able to access the Key Delivery. """ + AccountKeyDeliveryAccessControlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_allow_lists=ip_allow_lists, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + ip_allow_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_allow_lists is None and 'ipAllowLists' in kwargs: + ip_allow_lists = kwargs['ipAllowLists'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_allow_lists is not None: - pulumi.set(__self__, "ip_allow_lists", ip_allow_lists) + _setter("ip_allow_lists", ip_allow_lists) @property @pulumi.getter(name="defaultAction") @@ -250,11 +332,32 @@ def __init__(__self__, *, > **NOTE:** Whilst multiple `storage_account` blocks can be specified - one of them must be set to the primary :param pulumi.Input['AccountStorageAccountManagedIdentityArgs'] managed_identity: A `managed_identity` block as defined below. """ - pulumi.set(__self__, "id", id) + AccountStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + is_primary=is_primary, + managed_identity=managed_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + is_primary: Optional[pulumi.Input[bool]] = None, + managed_identity: Optional[pulumi.Input['AccountStorageAccountManagedIdentityArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if is_primary is None and 'isPrimary' in kwargs: + is_primary = kwargs['isPrimary'] + if managed_identity is None and 'managedIdentity' in kwargs: + managed_identity = kwargs['managedIdentity'] + + _setter("id", id) if is_primary is not None: - pulumi.set(__self__, "is_primary", is_primary) + _setter("is_primary", is_primary) if managed_identity is not None: - pulumi.set(__self__, "managed_identity", managed_identity) + _setter("managed_identity", managed_identity) @property @pulumi.getter @@ -304,10 +407,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_system_assigned_identity: Whether to use System Assigned Identity. Possible Values are `true` and `false`. :param pulumi.Input[str] user_assigned_identity_id: The ID of the User Assigned Identity. This value can only be set when `use_system_assigned_identity` is `false` """ + AccountStorageAccountManagedIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + use_system_assigned_identity=use_system_assigned_identity, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + use_system_assigned_identity: Optional[pulumi.Input[bool]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if use_system_assigned_identity is None and 'useSystemAssignedIdentity' in kwargs: + use_system_assigned_identity = kwargs['useSystemAssignedIdentity'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if use_system_assigned_identity is not None: - pulumi.set(__self__, "use_system_assigned_identity", use_system_assigned_identity) + _setter("use_system_assigned_identity", use_system_assigned_identity) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="useSystemAssignedIdentity") diff --git a/sdk/python/pulumi_azure/mediaservices/account.py b/sdk/python/pulumi_azure/mediaservices/account.py index dccda9f81b..75053b466c 100644 --- a/sdk/python/pulumi_azure/mediaservices/account.py +++ b/sdk/python/pulumi_azure/mediaservices/account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,24 +39,67 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_authentication_type: Specifies the storage authentication type. Possible value is `ManagedIdentity` or `System`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_accounts", storage_accounts) + AccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + storage_accounts=storage_accounts, + encryption=encryption, + identity=identity, + key_delivery_access_control=key_delivery_access_control, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + storage_authentication_type=storage_authentication_type, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['AccountStorageAccountArgs']]]] = None, + encryption: Optional[pulumi.Input['AccountEncryptionArgs']] = None, + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + key_delivery_access_control: Optional[pulumi.Input['AccountKeyDeliveryAccessControlArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + storage_authentication_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if storage_accounts is None: + raise TypeError("Missing 'storage_accounts' argument") + if key_delivery_access_control is None and 'keyDeliveryAccessControl' in kwargs: + key_delivery_access_control = kwargs['keyDeliveryAccessControl'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if storage_authentication_type is None and 'storageAuthenticationType' in kwargs: + storage_authentication_type = kwargs['storageAuthenticationType'] + + _setter("resource_group_name", resource_group_name) + _setter("storage_accounts", storage_accounts) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_delivery_access_control is not None: - pulumi.set(__self__, "key_delivery_access_control", key_delivery_access_control) + _setter("key_delivery_access_control", key_delivery_access_control) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if storage_authentication_type is not None: - pulumi.set(__self__, "storage_authentication_type", storage_authentication_type) + _setter("storage_authentication_type", storage_authentication_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -205,26 +248,65 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_authentication_type: Specifies the storage authentication type. Possible value is `ManagedIdentity` or `System`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource. """ + _AccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption=encryption, + identity=identity, + key_delivery_access_control=key_delivery_access_control, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + storage_accounts=storage_accounts, + storage_authentication_type=storage_authentication_type, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption: Optional[pulumi.Input['AccountEncryptionArgs']] = None, + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + key_delivery_access_control: Optional[pulumi.Input['AccountKeyDeliveryAccessControlArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['AccountStorageAccountArgs']]]] = None, + storage_authentication_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_delivery_access_control is None and 'keyDeliveryAccessControl' in kwargs: + key_delivery_access_control = kwargs['keyDeliveryAccessControl'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_accounts is None and 'storageAccounts' in kwargs: + storage_accounts = kwargs['storageAccounts'] + if storage_authentication_type is None and 'storageAuthenticationType' in kwargs: + storage_authentication_type = kwargs['storageAuthenticationType'] + if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if key_delivery_access_control is not None: - pulumi.set(__self__, "key_delivery_access_control", key_delivery_access_control) + _setter("key_delivery_access_control", key_delivery_access_control) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if storage_accounts is not None: - pulumi.set(__self__, "storage_accounts", storage_accounts) + _setter("storage_accounts", storage_accounts) if storage_authentication_type is not None: - pulumi.set(__self__, "storage_authentication_type", storage_authentication_type) + _setter("storage_authentication_type", storage_authentication_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -461,6 +543,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -486,8 +572,23 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = AccountArgs.__new__(AccountArgs) + if encryption is not None and not isinstance(encryption, AccountEncryptionArgs): + encryption = encryption or {} + def _setter(key, value): + encryption[key] = value + AccountEncryptionArgs._configure(_setter, **encryption) __props__.__dict__["encryption"] = encryption + if identity is not None and not isinstance(identity, AccountIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + AccountIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity + if key_delivery_access_control is not None and not isinstance(key_delivery_access_control, AccountKeyDeliveryAccessControlArgs): + key_delivery_access_control = key_delivery_access_control or {} + def _setter(key, value): + key_delivery_access_control[key] = value + AccountKeyDeliveryAccessControlArgs._configure(_setter, **key_delivery_access_control) __props__.__dict__["key_delivery_access_control"] = key_delivery_access_control __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/mediaservices/outputs.py b/sdk/python/pulumi_azure/mediaservices/outputs.py index 82fb0bee85..104977c0f4 100644 --- a/sdk/python/pulumi_azure/mediaservices/outputs.py +++ b/sdk/python/pulumi_azure/mediaservices/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -53,14 +53,37 @@ def __init__(__self__, *, :param 'AccountEncryptionManagedIdentityArgs' managed_identity: A `managed_identity` block as defined below. :param str type: Specifies the type of key used to encrypt the account data. Possible values are `SystemKey` and `CustomerKey`. """ + AccountEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + current_key_identifier=current_key_identifier, + key_vault_key_identifier=key_vault_key_identifier, + managed_identity=managed_identity, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + current_key_identifier: Optional[str] = None, + key_vault_key_identifier: Optional[str] = None, + managed_identity: Optional['outputs.AccountEncryptionManagedIdentity'] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if current_key_identifier is None and 'currentKeyIdentifier' in kwargs: + current_key_identifier = kwargs['currentKeyIdentifier'] + if key_vault_key_identifier is None and 'keyVaultKeyIdentifier' in kwargs: + key_vault_key_identifier = kwargs['keyVaultKeyIdentifier'] + if managed_identity is None and 'managedIdentity' in kwargs: + managed_identity = kwargs['managedIdentity'] + if current_key_identifier is not None: - pulumi.set(__self__, "current_key_identifier", current_key_identifier) + _setter("current_key_identifier", current_key_identifier) if key_vault_key_identifier is not None: - pulumi.set(__self__, "key_vault_key_identifier", key_vault_key_identifier) + _setter("key_vault_key_identifier", key_vault_key_identifier) if managed_identity is not None: - pulumi.set(__self__, "managed_identity", managed_identity) + _setter("managed_identity", managed_identity) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="currentKeyIdentifier") @@ -123,10 +146,27 @@ def __init__(__self__, *, :param bool use_system_assigned_identity: Whether to use System Assigned Identity. Possible Values are `true` and `false`. :param str user_assigned_identity_id: The ID of the User Assigned Identity. This value can only be set when `use_system_assigned_identity` is `false` """ + AccountEncryptionManagedIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + use_system_assigned_identity=use_system_assigned_identity, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + use_system_assigned_identity: Optional[bool] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if use_system_assigned_identity is None and 'useSystemAssignedIdentity' in kwargs: + use_system_assigned_identity = kwargs['useSystemAssignedIdentity'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if use_system_assigned_identity is not None: - pulumi.set(__self__, "use_system_assigned_identity", use_system_assigned_identity) + _setter("use_system_assigned_identity", use_system_assigned_identity) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="useSystemAssignedIdentity") @@ -179,13 +219,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + AccountIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -248,10 +313,27 @@ def __init__(__self__, *, :param str default_action: The Default Action to use when no rules match from `ip_allow_list`. Possible values are `Allow` and `Deny`. :param Sequence[str] ip_allow_lists: One or more IP Addresses, or CIDR Blocks which should be able to access the Key Delivery. """ + AccountKeyDeliveryAccessControl._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_allow_lists=ip_allow_lists, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[str] = None, + ip_allow_lists: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_allow_lists is None and 'ipAllowLists' in kwargs: + ip_allow_lists = kwargs['ipAllowLists'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_allow_lists is not None: - pulumi.set(__self__, "ip_allow_lists", ip_allow_lists) + _setter("ip_allow_lists", ip_allow_lists) @property @pulumi.getter(name="defaultAction") @@ -302,11 +384,32 @@ def __init__(__self__, *, > **NOTE:** Whilst multiple `storage_account` blocks can be specified - one of them must be set to the primary :param 'AccountStorageAccountManagedIdentityArgs' managed_identity: A `managed_identity` block as defined below. """ - pulumi.set(__self__, "id", id) + AccountStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + is_primary=is_primary, + managed_identity=managed_identity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + is_primary: Optional[bool] = None, + managed_identity: Optional['outputs.AccountStorageAccountManagedIdentity'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if is_primary is None and 'isPrimary' in kwargs: + is_primary = kwargs['isPrimary'] + if managed_identity is None and 'managedIdentity' in kwargs: + managed_identity = kwargs['managedIdentity'] + + _setter("id", id) if is_primary is not None: - pulumi.set(__self__, "is_primary", is_primary) + _setter("is_primary", is_primary) if managed_identity is not None: - pulumi.set(__self__, "managed_identity", managed_identity) + _setter("managed_identity", managed_identity) @property @pulumi.getter @@ -363,10 +466,27 @@ def __init__(__self__, *, :param bool use_system_assigned_identity: Whether to use System Assigned Identity. Possible Values are `true` and `false`. :param str user_assigned_identity_id: The ID of the User Assigned Identity. This value can only be set when `use_system_assigned_identity` is `false` """ + AccountStorageAccountManagedIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + use_system_assigned_identity=use_system_assigned_identity, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + use_system_assigned_identity: Optional[bool] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if use_system_assigned_identity is None and 'useSystemAssignedIdentity' in kwargs: + use_system_assigned_identity = kwargs['useSystemAssignedIdentity'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if use_system_assigned_identity is not None: - pulumi.set(__self__, "use_system_assigned_identity", use_system_assigned_identity) + _setter("use_system_assigned_identity", use_system_assigned_identity) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="useSystemAssignedIdentity") diff --git a/sdk/python/pulumi_azure/mixedreality/get_spatial_anchors_account.py b/sdk/python/pulumi_azure/mixedreality/get_spatial_anchors_account.py index 914a6ec66a..5ec5f03073 100644 --- a/sdk/python/pulumi_azure/mixedreality/get_spatial_anchors_account.py +++ b/sdk/python/pulumi_azure/mixedreality/get_spatial_anchors_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/mixedreality/spatial_anchors_account.py b/sdk/python/pulumi_azure/mixedreality/spatial_anchors_account.py index 0104a69ea9..6bdc83dcc0 100644 --- a/sdk/python/pulumi_azure/mixedreality/spatial_anchors_account.py +++ b/sdk/python/pulumi_azure/mixedreality/spatial_anchors_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SpatialAnchorsAccountArgs', 'SpatialAnchorsAccount'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Spatial Anchors Account. Changing this forces a new resource to be created. Must be globally unique. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + SpatialAnchorsAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -100,18 +121,45 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Spatial Anchors Account. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _SpatialAnchorsAccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_domain=account_domain, + account_id=account_id, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_domain: Optional[pulumi.Input[str]] = None, + account_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_domain is None and 'accountDomain' in kwargs: + account_domain = kwargs['accountDomain'] + if account_id is None and 'accountId' in kwargs: + account_id = kwargs['accountId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if account_domain is not None: - pulumi.set(__self__, "account_domain", account_domain) + _setter("account_domain", account_domain) if account_id is not None: - pulumi.set(__self__, "account_id", account_id) + _setter("account_id", account_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="accountDomain") @@ -265,6 +313,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpatialAnchorsAccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mobile/_inputs.py b/sdk/python/pulumi_azure/mobile/_inputs.py index 4cecb8885a..8eb0f72030 100644 --- a/sdk/python/pulumi_azure/mobile/_inputs.py +++ b/sdk/python/pulumi_azure/mobile/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -49,20 +49,57 @@ def __init__(__self__, *, :param pulumi.Input[int] udp_pinhole_timeout_in_seconds: Pinhole timeout for UDP pinholes in seconds. Must between `1` to `180`, Default to `180`. :param pulumi.Input[int] udp_port_reuse_minimum_hold_time_in_seconds: Minimum time in seconds that will pass before a UDP port that was used by a closed pinhole can be reused. Defaults to `60`. """ + NetworkAttachedDataNetworkNetworkAddressPortTranslationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + icmp_pinhole_timeout_in_seconds=icmp_pinhole_timeout_in_seconds, + pinhole_maximum_number=pinhole_maximum_number, + port_range=port_range, + tcp_pinhole_timeout_in_seconds=tcp_pinhole_timeout_in_seconds, + tcp_port_reuse_minimum_hold_time_in_seconds=tcp_port_reuse_minimum_hold_time_in_seconds, + udp_pinhole_timeout_in_seconds=udp_pinhole_timeout_in_seconds, + udp_port_reuse_minimum_hold_time_in_seconds=udp_port_reuse_minimum_hold_time_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + icmp_pinhole_timeout_in_seconds: Optional[pulumi.Input[int]] = None, + pinhole_maximum_number: Optional[pulumi.Input[int]] = None, + port_range: Optional[pulumi.Input['NetworkAttachedDataNetworkNetworkAddressPortTranslationPortRangeArgs']] = None, + tcp_pinhole_timeout_in_seconds: Optional[pulumi.Input[int]] = None, + tcp_port_reuse_minimum_hold_time_in_seconds: Optional[pulumi.Input[int]] = None, + udp_pinhole_timeout_in_seconds: Optional[pulumi.Input[int]] = None, + udp_port_reuse_minimum_hold_time_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if icmp_pinhole_timeout_in_seconds is None and 'icmpPinholeTimeoutInSeconds' in kwargs: + icmp_pinhole_timeout_in_seconds = kwargs['icmpPinholeTimeoutInSeconds'] + if pinhole_maximum_number is None and 'pinholeMaximumNumber' in kwargs: + pinhole_maximum_number = kwargs['pinholeMaximumNumber'] + if port_range is None and 'portRange' in kwargs: + port_range = kwargs['portRange'] + if tcp_pinhole_timeout_in_seconds is None and 'tcpPinholeTimeoutInSeconds' in kwargs: + tcp_pinhole_timeout_in_seconds = kwargs['tcpPinholeTimeoutInSeconds'] + if tcp_port_reuse_minimum_hold_time_in_seconds is None and 'tcpPortReuseMinimumHoldTimeInSeconds' in kwargs: + tcp_port_reuse_minimum_hold_time_in_seconds = kwargs['tcpPortReuseMinimumHoldTimeInSeconds'] + if udp_pinhole_timeout_in_seconds is None and 'udpPinholeTimeoutInSeconds' in kwargs: + udp_pinhole_timeout_in_seconds = kwargs['udpPinholeTimeoutInSeconds'] + if udp_port_reuse_minimum_hold_time_in_seconds is None and 'udpPortReuseMinimumHoldTimeInSeconds' in kwargs: + udp_port_reuse_minimum_hold_time_in_seconds = kwargs['udpPortReuseMinimumHoldTimeInSeconds'] + if icmp_pinhole_timeout_in_seconds is not None: - pulumi.set(__self__, "icmp_pinhole_timeout_in_seconds", icmp_pinhole_timeout_in_seconds) + _setter("icmp_pinhole_timeout_in_seconds", icmp_pinhole_timeout_in_seconds) if pinhole_maximum_number is not None: - pulumi.set(__self__, "pinhole_maximum_number", pinhole_maximum_number) + _setter("pinhole_maximum_number", pinhole_maximum_number) if port_range is not None: - pulumi.set(__self__, "port_range", port_range) + _setter("port_range", port_range) if tcp_pinhole_timeout_in_seconds is not None: - pulumi.set(__self__, "tcp_pinhole_timeout_in_seconds", tcp_pinhole_timeout_in_seconds) + _setter("tcp_pinhole_timeout_in_seconds", tcp_pinhole_timeout_in_seconds) if tcp_port_reuse_minimum_hold_time_in_seconds is not None: - pulumi.set(__self__, "tcp_port_reuse_minimum_hold_time_in_seconds", tcp_port_reuse_minimum_hold_time_in_seconds) + _setter("tcp_port_reuse_minimum_hold_time_in_seconds", tcp_port_reuse_minimum_hold_time_in_seconds) if udp_pinhole_timeout_in_seconds is not None: - pulumi.set(__self__, "udp_pinhole_timeout_in_seconds", udp_pinhole_timeout_in_seconds) + _setter("udp_pinhole_timeout_in_seconds", udp_pinhole_timeout_in_seconds) if udp_port_reuse_minimum_hold_time_in_seconds is not None: - pulumi.set(__self__, "udp_port_reuse_minimum_hold_time_in_seconds", udp_port_reuse_minimum_hold_time_in_seconds) + _setter("udp_port_reuse_minimum_hold_time_in_seconds", udp_port_reuse_minimum_hold_time_in_seconds) @property @pulumi.getter(name="icmpPinholeTimeoutInSeconds") @@ -155,10 +192,23 @@ def __init__(__self__, *, :param pulumi.Input[int] maximum: Specifies the maximum port number. :param pulumi.Input[int] minimum: Specifies the minimum port number. """ + NetworkAttachedDataNetworkNetworkAddressPortTranslationPortRangeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + maximum=maximum, + minimum=minimum, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + maximum: Optional[pulumi.Input[int]] = None, + minimum: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maximum is not None: - pulumi.set(__self__, "maximum", maximum) + _setter("maximum", maximum) if minimum is not None: - pulumi.set(__self__, "minimum", minimum) + _setter("minimum", minimum) @property @pulumi.getter @@ -194,8 +244,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: A list of the IDs for User Assigned Managed Identity resources to be assigned. :param pulumi.Input[str] type: Specifies the type of Managed Service Identity. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + NetworkPacketCoreControlPlaneIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -231,9 +300,28 @@ def __init__(__self__, *, :param pulumi.Input[str] authentication_type: How to authenticate users to access local diagnostics APIs. Possible values are `AAD` and `Password`. :param pulumi.Input[str] https_server_certificate_url: The versionless certificate URL used to secure local access to packet core diagnostics over local APIs by the Kubernetes ingress. """ - pulumi.set(__self__, "authentication_type", authentication_type) + NetworkPacketCoreControlPlaneLocalDiagnosticsAccessArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_type=authentication_type, + https_server_certificate_url=https_server_certificate_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_type: Optional[pulumi.Input[str]] = None, + https_server_certificate_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if authentication_type is None: + raise TypeError("Missing 'authentication_type' argument") + if https_server_certificate_url is None and 'httpsServerCertificateUrl' in kwargs: + https_server_certificate_url = kwargs['httpsServerCertificateUrl'] + + _setter("authentication_type", authentication_type) if https_server_certificate_url is not None: - pulumi.set(__self__, "https_server_certificate_url", https_server_certificate_url) + _setter("https_server_certificate_url", https_server_certificate_url) @property @pulumi.getter(name="authenticationType") @@ -277,15 +365,44 @@ def __init__(__self__, *, :param pulumi.Input[str] edge_device_id: The ID of the Azure Stack Edge device where the packet core is deployed. If the device is part of a fault-tolerant pair, either device in the pair can be specified. :param pulumi.Input[str] stack_hci_cluster_id: The ID of the Azure Stack HCI cluster where the packet core is deployed. """ - pulumi.set(__self__, "type", type) + NetworkPacketCoreControlPlanePlatformArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + arc_kubernetes_cluster_id=arc_kubernetes_cluster_id, + custom_location_id=custom_location_id, + edge_device_id=edge_device_id, + stack_hci_cluster_id=stack_hci_cluster_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + arc_kubernetes_cluster_id: Optional[pulumi.Input[str]] = None, + custom_location_id: Optional[pulumi.Input[str]] = None, + edge_device_id: Optional[pulumi.Input[str]] = None, + stack_hci_cluster_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if arc_kubernetes_cluster_id is None and 'arcKubernetesClusterId' in kwargs: + arc_kubernetes_cluster_id = kwargs['arcKubernetesClusterId'] + if custom_location_id is None and 'customLocationId' in kwargs: + custom_location_id = kwargs['customLocationId'] + if edge_device_id is None and 'edgeDeviceId' in kwargs: + edge_device_id = kwargs['edgeDeviceId'] + if stack_hci_cluster_id is None and 'stackHciClusterId' in kwargs: + stack_hci_cluster_id = kwargs['stackHciClusterId'] + + _setter("type", type) if arc_kubernetes_cluster_id is not None: - pulumi.set(__self__, "arc_kubernetes_cluster_id", arc_kubernetes_cluster_id) + _setter("arc_kubernetes_cluster_id", arc_kubernetes_cluster_id) if custom_location_id is not None: - pulumi.set(__self__, "custom_location_id", custom_location_id) + _setter("custom_location_id", custom_location_id) if edge_device_id is not None: - pulumi.set(__self__, "edge_device_id", edge_device_id) + _setter("edge_device_id", edge_device_id) if stack_hci_cluster_id is not None: - pulumi.set(__self__, "stack_hci_cluster_id", stack_hci_cluster_id) + _setter("stack_hci_cluster_id", stack_hci_cluster_id) @property @pulumi.getter @@ -365,13 +482,44 @@ def __init__(__self__, *, :param pulumi.Input['NetworkServicePccRuleQosPolicyArgs'] qos_policy: A `qos_policy` block as defined below. The QoS policy to use for packets matching this rule. If this field is not specified then the Service will define the QoS settings. :param pulumi.Input[bool] traffic_control_enabled: Determines whether flows that match this data flow policy rule are permitted. Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "precedence", precedence) - pulumi.set(__self__, "service_data_flow_templates", service_data_flow_templates) + NetworkServicePccRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + precedence=precedence, + service_data_flow_templates=service_data_flow_templates, + qos_policy=qos_policy, + traffic_control_enabled=traffic_control_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + precedence: Optional[pulumi.Input[int]] = None, + service_data_flow_templates: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkServicePccRuleServiceDataFlowTemplateArgs']]]] = None, + qos_policy: Optional[pulumi.Input['NetworkServicePccRuleQosPolicyArgs']] = None, + traffic_control_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if precedence is None: + raise TypeError("Missing 'precedence' argument") + if service_data_flow_templates is None and 'serviceDataFlowTemplates' in kwargs: + service_data_flow_templates = kwargs['serviceDataFlowTemplates'] + if service_data_flow_templates is None: + raise TypeError("Missing 'service_data_flow_templates' argument") + if qos_policy is None and 'qosPolicy' in kwargs: + qos_policy = kwargs['qosPolicy'] + if traffic_control_enabled is None and 'trafficControlEnabled' in kwargs: + traffic_control_enabled = kwargs['trafficControlEnabled'] + + _setter("name", name) + _setter("precedence", precedence) + _setter("service_data_flow_templates", service_data_flow_templates) if qos_policy is not None: - pulumi.set(__self__, "qos_policy", qos_policy) + _setter("qos_policy", qos_policy) if traffic_control_enabled is not None: - pulumi.set(__self__, "traffic_control_enabled", traffic_control_enabled) + _setter("traffic_control_enabled", traffic_control_enabled) @property @pulumi.getter @@ -451,16 +599,53 @@ def __init__(__self__, *, :param pulumi.Input[str] preemption_capability: The Preemption Capability of a QoS Flow controls whether it can preempt another QoS Flow with a lower priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. Possible values are `NotPreempt` and `MayPreempt`, Defaults to `NotPreempt`. :param pulumi.Input[str] preemption_vulnerability: The Preemption Vulnerability of a QoS Flow controls whether it can be preempted by QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. Possible values are `NotPreemptable` and `Preemptable`. Defaults to `Preemptable`. """ - pulumi.set(__self__, "maximum_bit_rate", maximum_bit_rate) - pulumi.set(__self__, "qos_indicator", qos_indicator) + NetworkServicePccRuleQosPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + maximum_bit_rate=maximum_bit_rate, + qos_indicator=qos_indicator, + allocation_and_retention_priority_level=allocation_and_retention_priority_level, + guaranteed_bit_rate=guaranteed_bit_rate, + preemption_capability=preemption_capability, + preemption_vulnerability=preemption_vulnerability, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + maximum_bit_rate: Optional[pulumi.Input['NetworkServicePccRuleQosPolicyMaximumBitRateArgs']] = None, + qos_indicator: Optional[pulumi.Input[int]] = None, + allocation_and_retention_priority_level: Optional[pulumi.Input[int]] = None, + guaranteed_bit_rate: Optional[pulumi.Input['NetworkServicePccRuleQosPolicyGuaranteedBitRateArgs']] = None, + preemption_capability: Optional[pulumi.Input[str]] = None, + preemption_vulnerability: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maximum_bit_rate is None and 'maximumBitRate' in kwargs: + maximum_bit_rate = kwargs['maximumBitRate'] + if maximum_bit_rate is None: + raise TypeError("Missing 'maximum_bit_rate' argument") + if qos_indicator is None and 'qosIndicator' in kwargs: + qos_indicator = kwargs['qosIndicator'] + if qos_indicator is None: + raise TypeError("Missing 'qos_indicator' argument") + if allocation_and_retention_priority_level is None and 'allocationAndRetentionPriorityLevel' in kwargs: + allocation_and_retention_priority_level = kwargs['allocationAndRetentionPriorityLevel'] + if guaranteed_bit_rate is None and 'guaranteedBitRate' in kwargs: + guaranteed_bit_rate = kwargs['guaranteedBitRate'] + if preemption_capability is None and 'preemptionCapability' in kwargs: + preemption_capability = kwargs['preemptionCapability'] + if preemption_vulnerability is None and 'preemptionVulnerability' in kwargs: + preemption_vulnerability = kwargs['preemptionVulnerability'] + + _setter("maximum_bit_rate", maximum_bit_rate) + _setter("qos_indicator", qos_indicator) if allocation_and_retention_priority_level is not None: - pulumi.set(__self__, "allocation_and_retention_priority_level", allocation_and_retention_priority_level) + _setter("allocation_and_retention_priority_level", allocation_and_retention_priority_level) if guaranteed_bit_rate is not None: - pulumi.set(__self__, "guaranteed_bit_rate", guaranteed_bit_rate) + _setter("guaranteed_bit_rate", guaranteed_bit_rate) if preemption_capability is not None: - pulumi.set(__self__, "preemption_capability", preemption_capability) + _setter("preemption_capability", preemption_capability) if preemption_vulnerability is not None: - pulumi.set(__self__, "preemption_vulnerability", preemption_vulnerability) + _setter("preemption_vulnerability", preemption_vulnerability) @property @pulumi.getter(name="maximumBitRate") @@ -544,8 +729,25 @@ def __init__(__self__, *, :param pulumi.Input[str] downlink: Downlink bit rate. Must be a number followed by `Kbps`, `Mbps`, `Gbps` or `Tbps`. :param pulumi.Input[str] uplink: Uplink bit rate. Must be a number followed by `Kbps`, `Mbps`, `Gbps` or `Tbps`. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + NetworkServicePccRuleQosPolicyGuaranteedBitRateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[pulumi.Input[str]] = None, + uplink: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -581,8 +783,25 @@ def __init__(__self__, *, :param pulumi.Input[str] downlink: Downlink bit rate. Must be a number followed by `bps`, `Kbps`, `Mbps`, `Gbps` or `Tbps`. :param pulumi.Input[str] uplink: Uplink bit rate. Must be a number followed by `bps`, `Kbps`, `Mbps`, `Gbps` or `Tbps`. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + NetworkServicePccRuleQosPolicyMaximumBitRateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[pulumi.Input[str]] = None, + uplink: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -624,12 +843,41 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] remote_ip_lists: Specifies the remote IP address(es) to which UEs will connect for this flow. If you want to allow connections on any IP address, use the value `any`. Otherwise, you must provide each of the remote IP addresses to which the packet core instance will connect for this flow. You must provide each IP address in CIDR notation, including the netmask (for example, `192.0.2.54/24`). :param pulumi.Input[Sequence[pulumi.Input[str]]] ports: The port(s) to which UEs will connect for this flow. You can specify zero or more ports or port ranges. If you specify one or more ports or port ranges then you must specify a value other than `ip` in the `protocol` field. If it is not specified then connections will be allowed on all ports. Port ranges must be specified as -. For example: [`8080`, `8082-8085`]. """ - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocols", protocols) - pulumi.set(__self__, "remote_ip_lists", remote_ip_lists) + NetworkServicePccRuleServiceDataFlowTemplateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + direction=direction, + name=name, + protocols=protocols, + remote_ip_lists=remote_ip_lists, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + direction: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + remote_ip_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if remote_ip_lists is None and 'remoteIpLists' in kwargs: + remote_ip_lists = kwargs['remoteIpLists'] + if remote_ip_lists is None: + raise TypeError("Missing 'remote_ip_lists' argument") + + _setter("direction", direction) + _setter("name", name) + _setter("protocols", protocols) + _setter("remote_ip_lists", remote_ip_lists) if ports is not None: - pulumi.set(__self__, "ports", ports) + _setter("ports", ports) @property @pulumi.getter @@ -707,15 +955,46 @@ def __init__(__self__, *, :param pulumi.Input[str] preemption_vulnerability: The Preemption Vulnerability of a QoS Flow controls whether it can be preempted by QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. Possible values are `NotPreemptable` and `Preemptable`. Defaults to `Preemptable`. :param pulumi.Input[int] qos_indicator: The QoS Indicator (5QI for 5G network /QCI for 4G net work) value identifies a set of QoS characteristics that control QoS forwarding treatment for QoS flows or EPS bearers. Recommended values: 5-9; 69-70; 79-80. Must be between `1` and `127`. Defaults to `9`. """ - pulumi.set(__self__, "maximum_bit_rate", maximum_bit_rate) + NetworkServiceServiceQosPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + maximum_bit_rate=maximum_bit_rate, + allocation_and_retention_priority_level=allocation_and_retention_priority_level, + preemption_capability=preemption_capability, + preemption_vulnerability=preemption_vulnerability, + qos_indicator=qos_indicator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + maximum_bit_rate: Optional[pulumi.Input['NetworkServiceServiceQosPolicyMaximumBitRateArgs']] = None, + allocation_and_retention_priority_level: Optional[pulumi.Input[int]] = None, + preemption_capability: Optional[pulumi.Input[str]] = None, + preemption_vulnerability: Optional[pulumi.Input[str]] = None, + qos_indicator: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maximum_bit_rate is None and 'maximumBitRate' in kwargs: + maximum_bit_rate = kwargs['maximumBitRate'] + if maximum_bit_rate is None: + raise TypeError("Missing 'maximum_bit_rate' argument") + if allocation_and_retention_priority_level is None and 'allocationAndRetentionPriorityLevel' in kwargs: + allocation_and_retention_priority_level = kwargs['allocationAndRetentionPriorityLevel'] + if preemption_capability is None and 'preemptionCapability' in kwargs: + preemption_capability = kwargs['preemptionCapability'] + if preemption_vulnerability is None and 'preemptionVulnerability' in kwargs: + preemption_vulnerability = kwargs['preemptionVulnerability'] + if qos_indicator is None and 'qosIndicator' in kwargs: + qos_indicator = kwargs['qosIndicator'] + + _setter("maximum_bit_rate", maximum_bit_rate) if allocation_and_retention_priority_level is not None: - pulumi.set(__self__, "allocation_and_retention_priority_level", allocation_and_retention_priority_level) + _setter("allocation_and_retention_priority_level", allocation_and_retention_priority_level) if preemption_capability is not None: - pulumi.set(__self__, "preemption_capability", preemption_capability) + _setter("preemption_capability", preemption_capability) if preemption_vulnerability is not None: - pulumi.set(__self__, "preemption_vulnerability", preemption_vulnerability) + _setter("preemption_vulnerability", preemption_vulnerability) if qos_indicator is not None: - pulumi.set(__self__, "qos_indicator", qos_indicator) + _setter("qos_indicator", qos_indicator) @property @pulumi.getter(name="maximumBitRate") @@ -787,8 +1066,25 @@ def __init__(__self__, *, :param pulumi.Input[str] downlink: Downlink bit rate. Must be a number followed by `bps`, `Kbps`, `Mbps`, `Gbps` or `Tbps`. :param pulumi.Input[str] uplink: Uplink bit rate. Must be a number followed by `bps`, `Kbps`, `Mbps`, `Gbps` or `Tbps`. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + NetworkServiceServiceQosPolicyMaximumBitRateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[pulumi.Input[str]] = None, + uplink: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -824,8 +1120,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: A list of IDs for User Assigned Managed Identity resources to be assigned. :param pulumi.Input[str] type: Specifies the type of Managed Service Identity. Possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + NetworkSimGroupIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -863,9 +1178,36 @@ def __init__(__self__, *, :param pulumi.Input[str] default_data_network_id: The ID of default data network to use if the user equipment does not explicitly specify it. Configuration for this object must exist in the `data_network` block. :param pulumi.Input[str] slice_id: The ID of the slice that these settings apply to. """ - pulumi.set(__self__, "data_networks", data_networks) - pulumi.set(__self__, "default_data_network_id", default_data_network_id) - pulumi.set(__self__, "slice_id", slice_id) + NetworkSimPolicySliceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_networks=data_networks, + default_data_network_id=default_data_network_id, + slice_id=slice_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_networks: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkSimPolicySliceDataNetworkArgs']]]] = None, + default_data_network_id: Optional[pulumi.Input[str]] = None, + slice_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_networks is None and 'dataNetworks' in kwargs: + data_networks = kwargs['dataNetworks'] + if data_networks is None: + raise TypeError("Missing 'data_networks' argument") + if default_data_network_id is None and 'defaultDataNetworkId' in kwargs: + default_data_network_id = kwargs['defaultDataNetworkId'] + if default_data_network_id is None: + raise TypeError("Missing 'default_data_network_id' argument") + if slice_id is None and 'sliceId' in kwargs: + slice_id = kwargs['sliceId'] + if slice_id is None: + raise TypeError("Missing 'slice_id' argument") + + _setter("data_networks", data_networks) + _setter("default_data_network_id", default_data_network_id) + _setter("slice_id", slice_id) @property @pulumi.getter(name="dataNetworks") @@ -929,22 +1271,79 @@ def __init__(__self__, *, :param pulumi.Input[str] preemption_capability: The Preemption Capability of a QoS Flow, it controls whether it can preempt another QoS Flow with a lower priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. Possible values are `NotPreempt` and `MayPreempt`, Defaults to `NotPreempt`. :param pulumi.Input[str] preemption_vulnerability: The Preemption Vulnerability of a QoS Flow, it controls whether it can be preempted by QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. Possible values are `NotPreemptable` and `Preemptable`. Defaults to `Preemptable`. """ - pulumi.set(__self__, "allowed_services_ids", allowed_services_ids) - pulumi.set(__self__, "data_network_id", data_network_id) - pulumi.set(__self__, "qos_indicator", qos_indicator) - pulumi.set(__self__, "session_aggregate_maximum_bit_rate", session_aggregate_maximum_bit_rate) + NetworkSimPolicySliceDataNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_services_ids=allowed_services_ids, + data_network_id=data_network_id, + qos_indicator=qos_indicator, + session_aggregate_maximum_bit_rate=session_aggregate_maximum_bit_rate, + additional_allowed_session_types=additional_allowed_session_types, + allocation_and_retention_priority_level=allocation_and_retention_priority_level, + default_session_type=default_session_type, + max_buffered_packets=max_buffered_packets, + preemption_capability=preemption_capability, + preemption_vulnerability=preemption_vulnerability, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_services_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_network_id: Optional[pulumi.Input[str]] = None, + qos_indicator: Optional[pulumi.Input[int]] = None, + session_aggregate_maximum_bit_rate: Optional[pulumi.Input['NetworkSimPolicySliceDataNetworkSessionAggregateMaximumBitRateArgs']] = None, + additional_allowed_session_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allocation_and_retention_priority_level: Optional[pulumi.Input[int]] = None, + default_session_type: Optional[pulumi.Input[str]] = None, + max_buffered_packets: Optional[pulumi.Input[int]] = None, + preemption_capability: Optional[pulumi.Input[str]] = None, + preemption_vulnerability: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_services_ids is None and 'allowedServicesIds' in kwargs: + allowed_services_ids = kwargs['allowedServicesIds'] + if allowed_services_ids is None: + raise TypeError("Missing 'allowed_services_ids' argument") + if data_network_id is None and 'dataNetworkId' in kwargs: + data_network_id = kwargs['dataNetworkId'] + if data_network_id is None: + raise TypeError("Missing 'data_network_id' argument") + if qos_indicator is None and 'qosIndicator' in kwargs: + qos_indicator = kwargs['qosIndicator'] + if qos_indicator is None: + raise TypeError("Missing 'qos_indicator' argument") + if session_aggregate_maximum_bit_rate is None and 'sessionAggregateMaximumBitRate' in kwargs: + session_aggregate_maximum_bit_rate = kwargs['sessionAggregateMaximumBitRate'] + if session_aggregate_maximum_bit_rate is None: + raise TypeError("Missing 'session_aggregate_maximum_bit_rate' argument") + if additional_allowed_session_types is None and 'additionalAllowedSessionTypes' in kwargs: + additional_allowed_session_types = kwargs['additionalAllowedSessionTypes'] + if allocation_and_retention_priority_level is None and 'allocationAndRetentionPriorityLevel' in kwargs: + allocation_and_retention_priority_level = kwargs['allocationAndRetentionPriorityLevel'] + if default_session_type is None and 'defaultSessionType' in kwargs: + default_session_type = kwargs['defaultSessionType'] + if max_buffered_packets is None and 'maxBufferedPackets' in kwargs: + max_buffered_packets = kwargs['maxBufferedPackets'] + if preemption_capability is None and 'preemptionCapability' in kwargs: + preemption_capability = kwargs['preemptionCapability'] + if preemption_vulnerability is None and 'preemptionVulnerability' in kwargs: + preemption_vulnerability = kwargs['preemptionVulnerability'] + + _setter("allowed_services_ids", allowed_services_ids) + _setter("data_network_id", data_network_id) + _setter("qos_indicator", qos_indicator) + _setter("session_aggregate_maximum_bit_rate", session_aggregate_maximum_bit_rate) if additional_allowed_session_types is not None: - pulumi.set(__self__, "additional_allowed_session_types", additional_allowed_session_types) + _setter("additional_allowed_session_types", additional_allowed_session_types) if allocation_and_retention_priority_level is not None: - pulumi.set(__self__, "allocation_and_retention_priority_level", allocation_and_retention_priority_level) + _setter("allocation_and_retention_priority_level", allocation_and_retention_priority_level) if default_session_type is not None: - pulumi.set(__self__, "default_session_type", default_session_type) + _setter("default_session_type", default_session_type) if max_buffered_packets is not None: - pulumi.set(__self__, "max_buffered_packets", max_buffered_packets) + _setter("max_buffered_packets", max_buffered_packets) if preemption_capability is not None: - pulumi.set(__self__, "preemption_capability", preemption_capability) + _setter("preemption_capability", preemption_capability) if preemption_vulnerability is not None: - pulumi.set(__self__, "preemption_vulnerability", preemption_vulnerability) + _setter("preemption_vulnerability", preemption_vulnerability) @property @pulumi.getter(name="allowedServicesIds") @@ -1076,8 +1475,25 @@ def __init__(__self__, *, :param pulumi.Input[str] downlink: Downlink bit rate. Must be a number followed by `Kbps`, `Mbps`, `Gbps` or `Tbps`. :param pulumi.Input[str] uplink: Uplink bit rate. Must be a number followed by `Kbps`, `Mbps`, `Gbps` or `Tbps`. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + NetworkSimPolicySliceDataNetworkSessionAggregateMaximumBitRateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[pulumi.Input[str]] = None, + uplink: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -1113,8 +1529,25 @@ def __init__(__self__, *, :param pulumi.Input[str] downlink: Downlink bit rate. Must be a number followed by `Kbps`, `Mbps`, `Gbps` or `Tbps`. :param pulumi.Input[str] uplink: Uplink bit rate. Must be a number followed by `Kbps`, `Mbps`, `Gbps` or `Tbps`. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + NetworkSimPolicyUserEquipmentAggregateMaximumBitRateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[pulumi.Input[str]] = None, + uplink: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -1151,10 +1584,35 @@ def __init__(__self__, *, :param pulumi.Input[str] attached_data_network_id: The ID of attached data network on which the static IP address will be used. The combination of attached data network and slice defines the network scope of the IP address. :param pulumi.Input[str] static_ipv4_address: The IPv4 address assigned to the SIM at this network scope. This address must be in the userEquipmentStaticAddressPoolPrefix defined in the attached data network. """ - pulumi.set(__self__, "attached_data_network_id", attached_data_network_id) - pulumi.set(__self__, "slice_id", slice_id) + NetworkSimStaticIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + attached_data_network_id=attached_data_network_id, + slice_id=slice_id, + static_ipv4_address=static_ipv4_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + attached_data_network_id: Optional[pulumi.Input[str]] = None, + slice_id: Optional[pulumi.Input[str]] = None, + static_ipv4_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if attached_data_network_id is None and 'attachedDataNetworkId' in kwargs: + attached_data_network_id = kwargs['attachedDataNetworkId'] + if attached_data_network_id is None: + raise TypeError("Missing 'attached_data_network_id' argument") + if slice_id is None and 'sliceId' in kwargs: + slice_id = kwargs['sliceId'] + if slice_id is None: + raise TypeError("Missing 'slice_id' argument") + if static_ipv4_address is None and 'staticIpv4Address' in kwargs: + static_ipv4_address = kwargs['staticIpv4Address'] + + _setter("attached_data_network_id", attached_data_network_id) + _setter("slice_id", slice_id) if static_ipv4_address is not None: - pulumi.set(__self__, "static_ipv4_address", static_ipv4_address) + _setter("static_ipv4_address", static_ipv4_address) @property @pulumi.getter(name="attachedDataNetworkId") @@ -1199,9 +1657,28 @@ def __init__(__self__, *, :param pulumi.Input[int] slice_service_type: Slice/service type (SST). Must be between `0` and `255`. :param pulumi.Input[str] slice_differentiator: Slice differentiator (SD). Must be a 6 digit hex string. """ - pulumi.set(__self__, "slice_service_type", slice_service_type) + NetworkSliceSingleNetworkSliceSelectionAssistanceInformationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + slice_service_type=slice_service_type, + slice_differentiator=slice_differentiator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + slice_service_type: Optional[pulumi.Input[int]] = None, + slice_differentiator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if slice_service_type is None and 'sliceServiceType' in kwargs: + slice_service_type = kwargs['sliceServiceType'] + if slice_service_type is None: + raise TypeError("Missing 'slice_service_type' argument") + if slice_differentiator is None and 'sliceDifferentiator' in kwargs: + slice_differentiator = kwargs['sliceDifferentiator'] + + _setter("slice_service_type", slice_service_type) if slice_differentiator is not None: - pulumi.set(__self__, "slice_differentiator", slice_differentiator) + _setter("slice_differentiator", slice_differentiator) @property @pulumi.getter(name="sliceServiceType") diff --git a/sdk/python/pulumi_azure/mobile/get_network.py b/sdk/python/pulumi_azure/mobile/get_network.py index d1830f0e63..602e8d43f1 100644 --- a/sdk/python/pulumi_azure/mobile/get_network.py +++ b/sdk/python/pulumi_azure/mobile/get_network.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/mobile/get_network_attached_data_network.py b/sdk/python/pulumi_azure/mobile/get_network_attached_data_network.py index a5dcbf5d34..ebf5902d5c 100644 --- a/sdk/python/pulumi_azure/mobile/get_network_attached_data_network.py +++ b/sdk/python/pulumi_azure/mobile/get_network_attached_data_network.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/mobile/get_network_data_network.py b/sdk/python/pulumi_azure/mobile/get_network_data_network.py index 3252128eba..fb7b900244 100644 --- a/sdk/python/pulumi_azure/mobile/get_network_data_network.py +++ b/sdk/python/pulumi_azure/mobile/get_network_data_network.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/mobile/get_network_packet_core_control_plane.py b/sdk/python/pulumi_azure/mobile/get_network_packet_core_control_plane.py index d0608e025a..e59ffc9253 100644 --- a/sdk/python/pulumi_azure/mobile/get_network_packet_core_control_plane.py +++ b/sdk/python/pulumi_azure/mobile/get_network_packet_core_control_plane.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/mobile/get_network_packet_core_data_plane.py b/sdk/python/pulumi_azure/mobile/get_network_packet_core_data_plane.py index 7ca881173f..d06c73cbac 100644 --- a/sdk/python/pulumi_azure/mobile/get_network_packet_core_data_plane.py +++ b/sdk/python/pulumi_azure/mobile/get_network_packet_core_data_plane.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/mobile/get_network_service.py b/sdk/python/pulumi_azure/mobile/get_network_service.py index 1613253bf1..60da9238f1 100644 --- a/sdk/python/pulumi_azure/mobile/get_network_service.py +++ b/sdk/python/pulumi_azure/mobile/get_network_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/mobile/get_network_sim.py b/sdk/python/pulumi_azure/mobile/get_network_sim.py index 6911be0a21..30168ac489 100644 --- a/sdk/python/pulumi_azure/mobile/get_network_sim.py +++ b/sdk/python/pulumi_azure/mobile/get_network_sim.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/mobile/get_network_sim_group.py b/sdk/python/pulumi_azure/mobile/get_network_sim_group.py index b70b119d13..09d99f1f62 100644 --- a/sdk/python/pulumi_azure/mobile/get_network_sim_group.py +++ b/sdk/python/pulumi_azure/mobile/get_network_sim_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/mobile/get_network_sim_policy.py b/sdk/python/pulumi_azure/mobile/get_network_sim_policy.py index 313597a74a..ee73b97fb2 100644 --- a/sdk/python/pulumi_azure/mobile/get_network_sim_policy.py +++ b/sdk/python/pulumi_azure/mobile/get_network_sim_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/mobile/get_network_site.py b/sdk/python/pulumi_azure/mobile/get_network_site.py index c616309521..3bde88e49f 100644 --- a/sdk/python/pulumi_azure/mobile/get_network_site.py +++ b/sdk/python/pulumi_azure/mobile/get_network_site.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/mobile/get_network_slice.py b/sdk/python/pulumi_azure/mobile/get_network_slice.py index 75c5a2fb03..a5e6005f40 100644 --- a/sdk/python/pulumi_azure/mobile/get_network_slice.py +++ b/sdk/python/pulumi_azure/mobile/get_network_slice.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/mobile/network.py b/sdk/python/pulumi_azure/mobile/network.py index ea3b221e8a..664cc0a946 100644 --- a/sdk/python/pulumi_azure/mobile/network.py +++ b/sdk/python/pulumi_azure/mobile/network.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkArgs', 'Network'] @@ -29,15 +29,48 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Mobile Network. Changing this forces a new Mobile Network to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network. """ - pulumi.set(__self__, "mobile_country_code", mobile_country_code) - pulumi.set(__self__, "mobile_network_code", mobile_network_code) - pulumi.set(__self__, "resource_group_name", resource_group_name) + NetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mobile_country_code=mobile_country_code, + mobile_network_code=mobile_network_code, + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mobile_country_code: Optional[pulumi.Input[str]] = None, + mobile_network_code: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mobile_country_code is None and 'mobileCountryCode' in kwargs: + mobile_country_code = kwargs['mobileCountryCode'] + if mobile_country_code is None: + raise TypeError("Missing 'mobile_country_code' argument") + if mobile_network_code is None and 'mobileNetworkCode' in kwargs: + mobile_network_code = kwargs['mobileNetworkCode'] + if mobile_network_code is None: + raise TypeError("Missing 'mobile_network_code' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("mobile_country_code", mobile_country_code) + _setter("mobile_network_code", mobile_network_code) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="mobileCountryCode") @@ -132,20 +165,51 @@ def __init__(__self__, *, :param pulumi.Input[str] service_key: The mobile network resource identifier. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network. """ + _NetworkState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + mobile_country_code=mobile_country_code, + mobile_network_code=mobile_network_code, + name=name, + resource_group_name=resource_group_name, + service_key=service_key, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + mobile_country_code: Optional[pulumi.Input[str]] = None, + mobile_network_code: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_key: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mobile_country_code is None and 'mobileCountryCode' in kwargs: + mobile_country_code = kwargs['mobileCountryCode'] + if mobile_network_code is None and 'mobileNetworkCode' in kwargs: + mobile_network_code = kwargs['mobileNetworkCode'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_key is None and 'serviceKey' in kwargs: + service_key = kwargs['serviceKey'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mobile_country_code is not None: - pulumi.set(__self__, "mobile_country_code", mobile_country_code) + _setter("mobile_country_code", mobile_country_code) if mobile_network_code is not None: - pulumi.set(__self__, "mobile_network_code", mobile_network_code) + _setter("mobile_network_code", mobile_network_code) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_key is not None: - pulumi.set(__self__, "service_key", service_key) + _setter("service_key", service_key) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -325,6 +389,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mobile/network_attached_data_network.py b/sdk/python/pulumi_azure/mobile/network_attached_data_network.py index c84643e823..918ab6bf66 100644 --- a/sdk/python/pulumi_azure/mobile/network_attached_data_network.py +++ b/sdk/python/pulumi_azure/mobile/network_attached_data_network.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,27 +41,86 @@ def __init__(__self__, *, :param pulumi.Input[str] user_plane_access_ipv4_subnet: The IPv4 subnet for the user data plane interface. This should match one of the interfaces configured on your Azure Stack Edge device. :param pulumi.Input[str] user_plane_access_name: Specifies the logical name for the user data plane interface. This should match one of the interfaces configured on your Azure Stack Edge device. """ - pulumi.set(__self__, "dns_addresses", dns_addresses) - pulumi.set(__self__, "mobile_network_data_network_name", mobile_network_data_network_name) - pulumi.set(__self__, "mobile_network_packet_core_data_plane_id", mobile_network_packet_core_data_plane_id) + NetworkAttachedDataNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_addresses=dns_addresses, + mobile_network_data_network_name=mobile_network_data_network_name, + mobile_network_packet_core_data_plane_id=mobile_network_packet_core_data_plane_id, + location=location, + network_address_port_translation=network_address_port_translation, + tags=tags, + user_equipment_address_pool_prefixes=user_equipment_address_pool_prefixes, + user_equipment_static_address_pool_prefixes=user_equipment_static_address_pool_prefixes, + user_plane_access_ipv4_address=user_plane_access_ipv4_address, + user_plane_access_ipv4_gateway=user_plane_access_ipv4_gateway, + user_plane_access_ipv4_subnet=user_plane_access_ipv4_subnet, + user_plane_access_name=user_plane_access_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + mobile_network_data_network_name: Optional[pulumi.Input[str]] = None, + mobile_network_packet_core_data_plane_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + network_address_port_translation: Optional[pulumi.Input['NetworkAttachedDataNetworkNetworkAddressPortTranslationArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + user_equipment_address_pool_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_equipment_static_address_pool_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_plane_access_ipv4_address: Optional[pulumi.Input[str]] = None, + user_plane_access_ipv4_gateway: Optional[pulumi.Input[str]] = None, + user_plane_access_ipv4_subnet: Optional[pulumi.Input[str]] = None, + user_plane_access_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_addresses is None and 'dnsAddresses' in kwargs: + dns_addresses = kwargs['dnsAddresses'] + if dns_addresses is None: + raise TypeError("Missing 'dns_addresses' argument") + if mobile_network_data_network_name is None and 'mobileNetworkDataNetworkName' in kwargs: + mobile_network_data_network_name = kwargs['mobileNetworkDataNetworkName'] + if mobile_network_data_network_name is None: + raise TypeError("Missing 'mobile_network_data_network_name' argument") + if mobile_network_packet_core_data_plane_id is None and 'mobileNetworkPacketCoreDataPlaneId' in kwargs: + mobile_network_packet_core_data_plane_id = kwargs['mobileNetworkPacketCoreDataPlaneId'] + if mobile_network_packet_core_data_plane_id is None: + raise TypeError("Missing 'mobile_network_packet_core_data_plane_id' argument") + if network_address_port_translation is None and 'networkAddressPortTranslation' in kwargs: + network_address_port_translation = kwargs['networkAddressPortTranslation'] + if user_equipment_address_pool_prefixes is None and 'userEquipmentAddressPoolPrefixes' in kwargs: + user_equipment_address_pool_prefixes = kwargs['userEquipmentAddressPoolPrefixes'] + if user_equipment_static_address_pool_prefixes is None and 'userEquipmentStaticAddressPoolPrefixes' in kwargs: + user_equipment_static_address_pool_prefixes = kwargs['userEquipmentStaticAddressPoolPrefixes'] + if user_plane_access_ipv4_address is None and 'userPlaneAccessIpv4Address' in kwargs: + user_plane_access_ipv4_address = kwargs['userPlaneAccessIpv4Address'] + if user_plane_access_ipv4_gateway is None and 'userPlaneAccessIpv4Gateway' in kwargs: + user_plane_access_ipv4_gateway = kwargs['userPlaneAccessIpv4Gateway'] + if user_plane_access_ipv4_subnet is None and 'userPlaneAccessIpv4Subnet' in kwargs: + user_plane_access_ipv4_subnet = kwargs['userPlaneAccessIpv4Subnet'] + if user_plane_access_name is None and 'userPlaneAccessName' in kwargs: + user_plane_access_name = kwargs['userPlaneAccessName'] + + _setter("dns_addresses", dns_addresses) + _setter("mobile_network_data_network_name", mobile_network_data_network_name) + _setter("mobile_network_packet_core_data_plane_id", mobile_network_packet_core_data_plane_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if network_address_port_translation is not None: - pulumi.set(__self__, "network_address_port_translation", network_address_port_translation) + _setter("network_address_port_translation", network_address_port_translation) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if user_equipment_address_pool_prefixes is not None: - pulumi.set(__self__, "user_equipment_address_pool_prefixes", user_equipment_address_pool_prefixes) + _setter("user_equipment_address_pool_prefixes", user_equipment_address_pool_prefixes) if user_equipment_static_address_pool_prefixes is not None: - pulumi.set(__self__, "user_equipment_static_address_pool_prefixes", user_equipment_static_address_pool_prefixes) + _setter("user_equipment_static_address_pool_prefixes", user_equipment_static_address_pool_prefixes) if user_plane_access_ipv4_address is not None: - pulumi.set(__self__, "user_plane_access_ipv4_address", user_plane_access_ipv4_address) + _setter("user_plane_access_ipv4_address", user_plane_access_ipv4_address) if user_plane_access_ipv4_gateway is not None: - pulumi.set(__self__, "user_plane_access_ipv4_gateway", user_plane_access_ipv4_gateway) + _setter("user_plane_access_ipv4_gateway", user_plane_access_ipv4_gateway) if user_plane_access_ipv4_subnet is not None: - pulumi.set(__self__, "user_plane_access_ipv4_subnet", user_plane_access_ipv4_subnet) + _setter("user_plane_access_ipv4_subnet", user_plane_access_ipv4_subnet) if user_plane_access_name is not None: - pulumi.set(__self__, "user_plane_access_name", user_plane_access_name) + _setter("user_plane_access_name", user_plane_access_name) @property @pulumi.getter(name="dnsAddresses") @@ -230,30 +289,83 @@ def __init__(__self__, *, :param pulumi.Input[str] user_plane_access_ipv4_subnet: The IPv4 subnet for the user data plane interface. This should match one of the interfaces configured on your Azure Stack Edge device. :param pulumi.Input[str] user_plane_access_name: Specifies the logical name for the user data plane interface. This should match one of the interfaces configured on your Azure Stack Edge device. """ + _NetworkAttachedDataNetworkState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_addresses=dns_addresses, + location=location, + mobile_network_data_network_name=mobile_network_data_network_name, + mobile_network_packet_core_data_plane_id=mobile_network_packet_core_data_plane_id, + network_address_port_translation=network_address_port_translation, + tags=tags, + user_equipment_address_pool_prefixes=user_equipment_address_pool_prefixes, + user_equipment_static_address_pool_prefixes=user_equipment_static_address_pool_prefixes, + user_plane_access_ipv4_address=user_plane_access_ipv4_address, + user_plane_access_ipv4_gateway=user_plane_access_ipv4_gateway, + user_plane_access_ipv4_subnet=user_plane_access_ipv4_subnet, + user_plane_access_name=user_plane_access_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + mobile_network_data_network_name: Optional[pulumi.Input[str]] = None, + mobile_network_packet_core_data_plane_id: Optional[pulumi.Input[str]] = None, + network_address_port_translation: Optional[pulumi.Input['NetworkAttachedDataNetworkNetworkAddressPortTranslationArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + user_equipment_address_pool_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_equipment_static_address_pool_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_plane_access_ipv4_address: Optional[pulumi.Input[str]] = None, + user_plane_access_ipv4_gateway: Optional[pulumi.Input[str]] = None, + user_plane_access_ipv4_subnet: Optional[pulumi.Input[str]] = None, + user_plane_access_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_addresses is None and 'dnsAddresses' in kwargs: + dns_addresses = kwargs['dnsAddresses'] + if mobile_network_data_network_name is None and 'mobileNetworkDataNetworkName' in kwargs: + mobile_network_data_network_name = kwargs['mobileNetworkDataNetworkName'] + if mobile_network_packet_core_data_plane_id is None and 'mobileNetworkPacketCoreDataPlaneId' in kwargs: + mobile_network_packet_core_data_plane_id = kwargs['mobileNetworkPacketCoreDataPlaneId'] + if network_address_port_translation is None and 'networkAddressPortTranslation' in kwargs: + network_address_port_translation = kwargs['networkAddressPortTranslation'] + if user_equipment_address_pool_prefixes is None and 'userEquipmentAddressPoolPrefixes' in kwargs: + user_equipment_address_pool_prefixes = kwargs['userEquipmentAddressPoolPrefixes'] + if user_equipment_static_address_pool_prefixes is None and 'userEquipmentStaticAddressPoolPrefixes' in kwargs: + user_equipment_static_address_pool_prefixes = kwargs['userEquipmentStaticAddressPoolPrefixes'] + if user_plane_access_ipv4_address is None and 'userPlaneAccessIpv4Address' in kwargs: + user_plane_access_ipv4_address = kwargs['userPlaneAccessIpv4Address'] + if user_plane_access_ipv4_gateway is None and 'userPlaneAccessIpv4Gateway' in kwargs: + user_plane_access_ipv4_gateway = kwargs['userPlaneAccessIpv4Gateway'] + if user_plane_access_ipv4_subnet is None and 'userPlaneAccessIpv4Subnet' in kwargs: + user_plane_access_ipv4_subnet = kwargs['userPlaneAccessIpv4Subnet'] + if user_plane_access_name is None and 'userPlaneAccessName' in kwargs: + user_plane_access_name = kwargs['userPlaneAccessName'] + if dns_addresses is not None: - pulumi.set(__self__, "dns_addresses", dns_addresses) + _setter("dns_addresses", dns_addresses) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mobile_network_data_network_name is not None: - pulumi.set(__self__, "mobile_network_data_network_name", mobile_network_data_network_name) + _setter("mobile_network_data_network_name", mobile_network_data_network_name) if mobile_network_packet_core_data_plane_id is not None: - pulumi.set(__self__, "mobile_network_packet_core_data_plane_id", mobile_network_packet_core_data_plane_id) + _setter("mobile_network_packet_core_data_plane_id", mobile_network_packet_core_data_plane_id) if network_address_port_translation is not None: - pulumi.set(__self__, "network_address_port_translation", network_address_port_translation) + _setter("network_address_port_translation", network_address_port_translation) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if user_equipment_address_pool_prefixes is not None: - pulumi.set(__self__, "user_equipment_address_pool_prefixes", user_equipment_address_pool_prefixes) + _setter("user_equipment_address_pool_prefixes", user_equipment_address_pool_prefixes) if user_equipment_static_address_pool_prefixes is not None: - pulumi.set(__self__, "user_equipment_static_address_pool_prefixes", user_equipment_static_address_pool_prefixes) + _setter("user_equipment_static_address_pool_prefixes", user_equipment_static_address_pool_prefixes) if user_plane_access_ipv4_address is not None: - pulumi.set(__self__, "user_plane_access_ipv4_address", user_plane_access_ipv4_address) + _setter("user_plane_access_ipv4_address", user_plane_access_ipv4_address) if user_plane_access_ipv4_gateway is not None: - pulumi.set(__self__, "user_plane_access_ipv4_gateway", user_plane_access_ipv4_gateway) + _setter("user_plane_access_ipv4_gateway", user_plane_access_ipv4_gateway) if user_plane_access_ipv4_subnet is not None: - pulumi.set(__self__, "user_plane_access_ipv4_subnet", user_plane_access_ipv4_subnet) + _setter("user_plane_access_ipv4_subnet", user_plane_access_ipv4_subnet) if user_plane_access_name is not None: - pulumi.set(__self__, "user_plane_access_name", user_plane_access_name) + _setter("user_plane_access_name", user_plane_access_name) @property @pulumi.getter(name="dnsAddresses") @@ -463,6 +575,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkAttachedDataNetworkArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -499,6 +615,11 @@ def _internal_init(__self__, if mobile_network_packet_core_data_plane_id is None and not opts.urn: raise TypeError("Missing required property 'mobile_network_packet_core_data_plane_id'") __props__.__dict__["mobile_network_packet_core_data_plane_id"] = mobile_network_packet_core_data_plane_id + if network_address_port_translation is not None and not isinstance(network_address_port_translation, NetworkAttachedDataNetworkNetworkAddressPortTranslationArgs): + network_address_port_translation = network_address_port_translation or {} + def _setter(key, value): + network_address_port_translation[key] = value + NetworkAttachedDataNetworkNetworkAddressPortTranslationArgs._configure(_setter, **network_address_port_translation) __props__.__dict__["network_address_port_translation"] = network_address_port_translation __props__.__dict__["tags"] = tags __props__.__dict__["user_equipment_address_pool_prefixes"] = user_equipment_address_pool_prefixes diff --git a/sdk/python/pulumi_azure/mobile/network_data_network.py b/sdk/python/pulumi_azure/mobile/network_data_network.py index 6ea7f52ff4..ae99808052 100644 --- a/sdk/python/pulumi_azure/mobile/network_data_network.py +++ b/sdk/python/pulumi_azure/mobile/network_data_network.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkDataNetworkArgs', 'NetworkDataNetwork'] @@ -27,15 +27,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Mobile Network Data Network. Changing this forces a new Mobile Network Data Network to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Data Network. """ - pulumi.set(__self__, "mobile_network_id", mobile_network_id) + NetworkDataNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mobile_network_id=mobile_network_id, + description=description, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mobile_network_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mobile_network_id is None and 'mobileNetworkId' in kwargs: + mobile_network_id = kwargs['mobileNetworkId'] + if mobile_network_id is None: + raise TypeError("Missing 'mobile_network_id' argument") + + _setter("mobile_network_id", mobile_network_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="mobileNetworkId") @@ -114,16 +137,37 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Mobile Network Data Network. Changing this forces a new Mobile Network Data Network to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Data Network. """ + _NetworkDataNetworkState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + location=location, + mobile_network_id=mobile_network_id, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + mobile_network_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mobile_network_id is None and 'mobileNetworkId' in kwargs: + mobile_network_id = kwargs['mobileNetworkId'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mobile_network_id is not None: - pulumi.set(__self__, "mobile_network_id", mobile_network_id) + _setter("mobile_network_id", mobile_network_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -285,6 +329,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkDataNetworkArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mobile/network_packet_core_control_plane.py b/sdk/python/pulumi_azure/mobile/network_packet_core_control_plane.py index 4267fea558..067dc2fc30 100644 --- a/sdk/python/pulumi_azure/mobile/network_packet_core_control_plane.py +++ b/sdk/python/pulumi_azure/mobile/network_packet_core_control_plane.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -53,36 +53,109 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Packet Core Control Plane. :param pulumi.Input[int] user_equipment_mtu_in_bytes: Specifies the MTU in bytes that can be sent to the user equipment. The same MTU is set on the user plane data links for all data networks. The MTU set on the user plane access link will be 60 bytes greater than this value to allow for GTP encapsulation. """ - pulumi.set(__self__, "local_diagnostics_access", local_diagnostics_access) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "site_ids", site_ids) - pulumi.set(__self__, "sku", sku) + NetworkPacketCoreControlPlaneArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + local_diagnostics_access=local_diagnostics_access, + resource_group_name=resource_group_name, + site_ids=site_ids, + sku=sku, + control_plane_access_ipv4_address=control_plane_access_ipv4_address, + control_plane_access_ipv4_gateway=control_plane_access_ipv4_gateway, + control_plane_access_ipv4_subnet=control_plane_access_ipv4_subnet, + control_plane_access_name=control_plane_access_name, + core_network_technology=core_network_technology, + identity=identity, + interoperability_settings_json=interoperability_settings_json, + location=location, + name=name, + platform=platform, + software_version=software_version, + tags=tags, + user_equipment_mtu_in_bytes=user_equipment_mtu_in_bytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + local_diagnostics_access: Optional[pulumi.Input['NetworkPacketCoreControlPlaneLocalDiagnosticsAccessArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + site_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sku: Optional[pulumi.Input[str]] = None, + control_plane_access_ipv4_address: Optional[pulumi.Input[str]] = None, + control_plane_access_ipv4_gateway: Optional[pulumi.Input[str]] = None, + control_plane_access_ipv4_subnet: Optional[pulumi.Input[str]] = None, + control_plane_access_name: Optional[pulumi.Input[str]] = None, + core_network_technology: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['NetworkPacketCoreControlPlaneIdentityArgs']] = None, + interoperability_settings_json: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + platform: Optional[pulumi.Input['NetworkPacketCoreControlPlanePlatformArgs']] = None, + software_version: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + user_equipment_mtu_in_bytes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_diagnostics_access is None and 'localDiagnosticsAccess' in kwargs: + local_diagnostics_access = kwargs['localDiagnosticsAccess'] + if local_diagnostics_access is None: + raise TypeError("Missing 'local_diagnostics_access' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if site_ids is None and 'siteIds' in kwargs: + site_ids = kwargs['siteIds'] + if site_ids is None: + raise TypeError("Missing 'site_ids' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if control_plane_access_ipv4_address is None and 'controlPlaneAccessIpv4Address' in kwargs: + control_plane_access_ipv4_address = kwargs['controlPlaneAccessIpv4Address'] + if control_plane_access_ipv4_gateway is None and 'controlPlaneAccessIpv4Gateway' in kwargs: + control_plane_access_ipv4_gateway = kwargs['controlPlaneAccessIpv4Gateway'] + if control_plane_access_ipv4_subnet is None and 'controlPlaneAccessIpv4Subnet' in kwargs: + control_plane_access_ipv4_subnet = kwargs['controlPlaneAccessIpv4Subnet'] + if control_plane_access_name is None and 'controlPlaneAccessName' in kwargs: + control_plane_access_name = kwargs['controlPlaneAccessName'] + if core_network_technology is None and 'coreNetworkTechnology' in kwargs: + core_network_technology = kwargs['coreNetworkTechnology'] + if interoperability_settings_json is None and 'interoperabilitySettingsJson' in kwargs: + interoperability_settings_json = kwargs['interoperabilitySettingsJson'] + if software_version is None and 'softwareVersion' in kwargs: + software_version = kwargs['softwareVersion'] + if user_equipment_mtu_in_bytes is None and 'userEquipmentMtuInBytes' in kwargs: + user_equipment_mtu_in_bytes = kwargs['userEquipmentMtuInBytes'] + + _setter("local_diagnostics_access", local_diagnostics_access) + _setter("resource_group_name", resource_group_name) + _setter("site_ids", site_ids) + _setter("sku", sku) if control_plane_access_ipv4_address is not None: - pulumi.set(__self__, "control_plane_access_ipv4_address", control_plane_access_ipv4_address) + _setter("control_plane_access_ipv4_address", control_plane_access_ipv4_address) if control_plane_access_ipv4_gateway is not None: - pulumi.set(__self__, "control_plane_access_ipv4_gateway", control_plane_access_ipv4_gateway) + _setter("control_plane_access_ipv4_gateway", control_plane_access_ipv4_gateway) if control_plane_access_ipv4_subnet is not None: - pulumi.set(__self__, "control_plane_access_ipv4_subnet", control_plane_access_ipv4_subnet) + _setter("control_plane_access_ipv4_subnet", control_plane_access_ipv4_subnet) if control_plane_access_name is not None: - pulumi.set(__self__, "control_plane_access_name", control_plane_access_name) + _setter("control_plane_access_name", control_plane_access_name) if core_network_technology is not None: - pulumi.set(__self__, "core_network_technology", core_network_technology) + _setter("core_network_technology", core_network_technology) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if interoperability_settings_json is not None: - pulumi.set(__self__, "interoperability_settings_json", interoperability_settings_json) + _setter("interoperability_settings_json", interoperability_settings_json) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if platform is not None: - pulumi.set(__self__, "platform", platform) + _setter("platform", platform) if software_version is not None: - pulumi.set(__self__, "software_version", software_version) + _setter("software_version", software_version) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if user_equipment_mtu_in_bytes is not None: - pulumi.set(__self__, "user_equipment_mtu_in_bytes", user_equipment_mtu_in_bytes) + _setter("user_equipment_mtu_in_bytes", user_equipment_mtu_in_bytes) @property @pulumi.getter(name="localDiagnosticsAccess") @@ -329,40 +402,105 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Packet Core Control Plane. :param pulumi.Input[int] user_equipment_mtu_in_bytes: Specifies the MTU in bytes that can be sent to the user equipment. The same MTU is set on the user plane data links for all data networks. The MTU set on the user plane access link will be 60 bytes greater than this value to allow for GTP encapsulation. """ + _NetworkPacketCoreControlPlaneState._configure( + lambda key, value: pulumi.set(__self__, key, value), + control_plane_access_ipv4_address=control_plane_access_ipv4_address, + control_plane_access_ipv4_gateway=control_plane_access_ipv4_gateway, + control_plane_access_ipv4_subnet=control_plane_access_ipv4_subnet, + control_plane_access_name=control_plane_access_name, + core_network_technology=core_network_technology, + identity=identity, + interoperability_settings_json=interoperability_settings_json, + local_diagnostics_access=local_diagnostics_access, + location=location, + name=name, + platform=platform, + resource_group_name=resource_group_name, + site_ids=site_ids, + sku=sku, + software_version=software_version, + tags=tags, + user_equipment_mtu_in_bytes=user_equipment_mtu_in_bytes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + control_plane_access_ipv4_address: Optional[pulumi.Input[str]] = None, + control_plane_access_ipv4_gateway: Optional[pulumi.Input[str]] = None, + control_plane_access_ipv4_subnet: Optional[pulumi.Input[str]] = None, + control_plane_access_name: Optional[pulumi.Input[str]] = None, + core_network_technology: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['NetworkPacketCoreControlPlaneIdentityArgs']] = None, + interoperability_settings_json: Optional[pulumi.Input[str]] = None, + local_diagnostics_access: Optional[pulumi.Input['NetworkPacketCoreControlPlaneLocalDiagnosticsAccessArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + platform: Optional[pulumi.Input['NetworkPacketCoreControlPlanePlatformArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + site_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sku: Optional[pulumi.Input[str]] = None, + software_version: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + user_equipment_mtu_in_bytes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if control_plane_access_ipv4_address is None and 'controlPlaneAccessIpv4Address' in kwargs: + control_plane_access_ipv4_address = kwargs['controlPlaneAccessIpv4Address'] + if control_plane_access_ipv4_gateway is None and 'controlPlaneAccessIpv4Gateway' in kwargs: + control_plane_access_ipv4_gateway = kwargs['controlPlaneAccessIpv4Gateway'] + if control_plane_access_ipv4_subnet is None and 'controlPlaneAccessIpv4Subnet' in kwargs: + control_plane_access_ipv4_subnet = kwargs['controlPlaneAccessIpv4Subnet'] + if control_plane_access_name is None and 'controlPlaneAccessName' in kwargs: + control_plane_access_name = kwargs['controlPlaneAccessName'] + if core_network_technology is None and 'coreNetworkTechnology' in kwargs: + core_network_technology = kwargs['coreNetworkTechnology'] + if interoperability_settings_json is None and 'interoperabilitySettingsJson' in kwargs: + interoperability_settings_json = kwargs['interoperabilitySettingsJson'] + if local_diagnostics_access is None and 'localDiagnosticsAccess' in kwargs: + local_diagnostics_access = kwargs['localDiagnosticsAccess'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if site_ids is None and 'siteIds' in kwargs: + site_ids = kwargs['siteIds'] + if software_version is None and 'softwareVersion' in kwargs: + software_version = kwargs['softwareVersion'] + if user_equipment_mtu_in_bytes is None and 'userEquipmentMtuInBytes' in kwargs: + user_equipment_mtu_in_bytes = kwargs['userEquipmentMtuInBytes'] + if control_plane_access_ipv4_address is not None: - pulumi.set(__self__, "control_plane_access_ipv4_address", control_plane_access_ipv4_address) + _setter("control_plane_access_ipv4_address", control_plane_access_ipv4_address) if control_plane_access_ipv4_gateway is not None: - pulumi.set(__self__, "control_plane_access_ipv4_gateway", control_plane_access_ipv4_gateway) + _setter("control_plane_access_ipv4_gateway", control_plane_access_ipv4_gateway) if control_plane_access_ipv4_subnet is not None: - pulumi.set(__self__, "control_plane_access_ipv4_subnet", control_plane_access_ipv4_subnet) + _setter("control_plane_access_ipv4_subnet", control_plane_access_ipv4_subnet) if control_plane_access_name is not None: - pulumi.set(__self__, "control_plane_access_name", control_plane_access_name) + _setter("control_plane_access_name", control_plane_access_name) if core_network_technology is not None: - pulumi.set(__self__, "core_network_technology", core_network_technology) + _setter("core_network_technology", core_network_technology) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if interoperability_settings_json is not None: - pulumi.set(__self__, "interoperability_settings_json", interoperability_settings_json) + _setter("interoperability_settings_json", interoperability_settings_json) if local_diagnostics_access is not None: - pulumi.set(__self__, "local_diagnostics_access", local_diagnostics_access) + _setter("local_diagnostics_access", local_diagnostics_access) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if platform is not None: - pulumi.set(__self__, "platform", platform) + _setter("platform", platform) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if site_ids is not None: - pulumi.set(__self__, "site_ids", site_ids) + _setter("site_ids", site_ids) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if software_version is not None: - pulumi.set(__self__, "software_version", software_version) + _setter("software_version", software_version) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if user_equipment_mtu_in_bytes is not None: - pulumi.set(__self__, "user_equipment_mtu_in_bytes", user_equipment_mtu_in_bytes) + _setter("user_equipment_mtu_in_bytes", user_equipment_mtu_in_bytes) @property @pulumi.getter(name="controlPlaneAccessIpv4Address") @@ -738,6 +876,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkPacketCoreControlPlaneArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -774,13 +916,28 @@ def _internal_init(__self__, __props__.__dict__["control_plane_access_ipv4_subnet"] = control_plane_access_ipv4_subnet __props__.__dict__["control_plane_access_name"] = control_plane_access_name __props__.__dict__["core_network_technology"] = core_network_technology + if identity is not None and not isinstance(identity, NetworkPacketCoreControlPlaneIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + NetworkPacketCoreControlPlaneIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["interoperability_settings_json"] = interoperability_settings_json + if local_diagnostics_access is not None and not isinstance(local_diagnostics_access, NetworkPacketCoreControlPlaneLocalDiagnosticsAccessArgs): + local_diagnostics_access = local_diagnostics_access or {} + def _setter(key, value): + local_diagnostics_access[key] = value + NetworkPacketCoreControlPlaneLocalDiagnosticsAccessArgs._configure(_setter, **local_diagnostics_access) if local_diagnostics_access is None and not opts.urn: raise TypeError("Missing required property 'local_diagnostics_access'") __props__.__dict__["local_diagnostics_access"] = local_diagnostics_access __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if platform is not None and not isinstance(platform, NetworkPacketCoreControlPlanePlatformArgs): + platform = platform or {} + def _setter(key, value): + platform[key] = value + NetworkPacketCoreControlPlanePlatformArgs._configure(_setter, **platform) __props__.__dict__["platform"] = platform if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") diff --git a/sdk/python/pulumi_azure/mobile/network_packet_core_data_plane.py b/sdk/python/pulumi_azure/mobile/network_packet_core_data_plane.py index a44745c8f1..28331ee1c4 100644 --- a/sdk/python/pulumi_azure/mobile/network_packet_core_data_plane.py +++ b/sdk/python/pulumi_azure/mobile/network_packet_core_data_plane.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkPacketCoreDataPlaneArgs', 'NetworkPacketCoreDataPlane'] @@ -33,21 +33,58 @@ def __init__(__self__, *, :param pulumi.Input[str] user_plane_access_ipv4_subnet: The IPv4 subnet for the user plane interface. This should match one of the interfaces configured on your Azure Stack Edge device. :param pulumi.Input[str] user_plane_access_name: Specifies the logical name for thie user plane interface. This should match one of the interfaces configured on your Azure Stack Edge device. """ - pulumi.set(__self__, "mobile_network_packet_core_control_plane_id", mobile_network_packet_core_control_plane_id) + NetworkPacketCoreDataPlaneArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mobile_network_packet_core_control_plane_id=mobile_network_packet_core_control_plane_id, + location=location, + name=name, + tags=tags, + user_plane_access_ipv4_address=user_plane_access_ipv4_address, + user_plane_access_ipv4_gateway=user_plane_access_ipv4_gateway, + user_plane_access_ipv4_subnet=user_plane_access_ipv4_subnet, + user_plane_access_name=user_plane_access_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mobile_network_packet_core_control_plane_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + user_plane_access_ipv4_address: Optional[pulumi.Input[str]] = None, + user_plane_access_ipv4_gateway: Optional[pulumi.Input[str]] = None, + user_plane_access_ipv4_subnet: Optional[pulumi.Input[str]] = None, + user_plane_access_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mobile_network_packet_core_control_plane_id is None and 'mobileNetworkPacketCoreControlPlaneId' in kwargs: + mobile_network_packet_core_control_plane_id = kwargs['mobileNetworkPacketCoreControlPlaneId'] + if mobile_network_packet_core_control_plane_id is None: + raise TypeError("Missing 'mobile_network_packet_core_control_plane_id' argument") + if user_plane_access_ipv4_address is None and 'userPlaneAccessIpv4Address' in kwargs: + user_plane_access_ipv4_address = kwargs['userPlaneAccessIpv4Address'] + if user_plane_access_ipv4_gateway is None and 'userPlaneAccessIpv4Gateway' in kwargs: + user_plane_access_ipv4_gateway = kwargs['userPlaneAccessIpv4Gateway'] + if user_plane_access_ipv4_subnet is None and 'userPlaneAccessIpv4Subnet' in kwargs: + user_plane_access_ipv4_subnet = kwargs['userPlaneAccessIpv4Subnet'] + if user_plane_access_name is None and 'userPlaneAccessName' in kwargs: + user_plane_access_name = kwargs['userPlaneAccessName'] + + _setter("mobile_network_packet_core_control_plane_id", mobile_network_packet_core_control_plane_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if user_plane_access_ipv4_address is not None: - pulumi.set(__self__, "user_plane_access_ipv4_address", user_plane_access_ipv4_address) + _setter("user_plane_access_ipv4_address", user_plane_access_ipv4_address) if user_plane_access_ipv4_gateway is not None: - pulumi.set(__self__, "user_plane_access_ipv4_gateway", user_plane_access_ipv4_gateway) + _setter("user_plane_access_ipv4_gateway", user_plane_access_ipv4_gateway) if user_plane_access_ipv4_subnet is not None: - pulumi.set(__self__, "user_plane_access_ipv4_subnet", user_plane_access_ipv4_subnet) + _setter("user_plane_access_ipv4_subnet", user_plane_access_ipv4_subnet) if user_plane_access_name is not None: - pulumi.set(__self__, "user_plane_access_name", user_plane_access_name) + _setter("user_plane_access_name", user_plane_access_name) @property @pulumi.getter(name="mobileNetworkPacketCoreControlPlaneId") @@ -168,22 +205,57 @@ def __init__(__self__, *, :param pulumi.Input[str] user_plane_access_ipv4_subnet: The IPv4 subnet for the user plane interface. This should match one of the interfaces configured on your Azure Stack Edge device. :param pulumi.Input[str] user_plane_access_name: Specifies the logical name for thie user plane interface. This should match one of the interfaces configured on your Azure Stack Edge device. """ + _NetworkPacketCoreDataPlaneState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + mobile_network_packet_core_control_plane_id=mobile_network_packet_core_control_plane_id, + name=name, + tags=tags, + user_plane_access_ipv4_address=user_plane_access_ipv4_address, + user_plane_access_ipv4_gateway=user_plane_access_ipv4_gateway, + user_plane_access_ipv4_subnet=user_plane_access_ipv4_subnet, + user_plane_access_name=user_plane_access_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + mobile_network_packet_core_control_plane_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + user_plane_access_ipv4_address: Optional[pulumi.Input[str]] = None, + user_plane_access_ipv4_gateway: Optional[pulumi.Input[str]] = None, + user_plane_access_ipv4_subnet: Optional[pulumi.Input[str]] = None, + user_plane_access_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mobile_network_packet_core_control_plane_id is None and 'mobileNetworkPacketCoreControlPlaneId' in kwargs: + mobile_network_packet_core_control_plane_id = kwargs['mobileNetworkPacketCoreControlPlaneId'] + if user_plane_access_ipv4_address is None and 'userPlaneAccessIpv4Address' in kwargs: + user_plane_access_ipv4_address = kwargs['userPlaneAccessIpv4Address'] + if user_plane_access_ipv4_gateway is None and 'userPlaneAccessIpv4Gateway' in kwargs: + user_plane_access_ipv4_gateway = kwargs['userPlaneAccessIpv4Gateway'] + if user_plane_access_ipv4_subnet is None and 'userPlaneAccessIpv4Subnet' in kwargs: + user_plane_access_ipv4_subnet = kwargs['userPlaneAccessIpv4Subnet'] + if user_plane_access_name is None and 'userPlaneAccessName' in kwargs: + user_plane_access_name = kwargs['userPlaneAccessName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mobile_network_packet_core_control_plane_id is not None: - pulumi.set(__self__, "mobile_network_packet_core_control_plane_id", mobile_network_packet_core_control_plane_id) + _setter("mobile_network_packet_core_control_plane_id", mobile_network_packet_core_control_plane_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if user_plane_access_ipv4_address is not None: - pulumi.set(__self__, "user_plane_access_ipv4_address", user_plane_access_ipv4_address) + _setter("user_plane_access_ipv4_address", user_plane_access_ipv4_address) if user_plane_access_ipv4_gateway is not None: - pulumi.set(__self__, "user_plane_access_ipv4_gateway", user_plane_access_ipv4_gateway) + _setter("user_plane_access_ipv4_gateway", user_plane_access_ipv4_gateway) if user_plane_access_ipv4_subnet is not None: - pulumi.set(__self__, "user_plane_access_ipv4_subnet", user_plane_access_ipv4_subnet) + _setter("user_plane_access_ipv4_subnet", user_plane_access_ipv4_subnet) if user_plane_access_name is not None: - pulumi.set(__self__, "user_plane_access_name", user_plane_access_name) + _setter("user_plane_access_name", user_plane_access_name) @property @pulumi.getter @@ -345,6 +417,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkPacketCoreDataPlaneArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mobile/network_service.py b/sdk/python/pulumi_azure/mobile/network_service.py index 3d6571ece1..bc23394618 100644 --- a/sdk/python/pulumi_azure/mobile/network_service.py +++ b/sdk/python/pulumi_azure/mobile/network_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,54 @@ def __init__(__self__, *, :param pulumi.Input['NetworkServiceServiceQosPolicyArgs'] service_qos_policy: A `service_qos_policy` block as defined below. The QoS policy to use for packets matching this service. This can be overridden for particular flows using the ruleQosPolicy field in a `pcc_rule`. If this field is not specified then the `sim_policy` of User Equipment (UE) will define the QoS settings. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Service. """ - pulumi.set(__self__, "mobile_network_id", mobile_network_id) - pulumi.set(__self__, "pcc_rules", pcc_rules) - pulumi.set(__self__, "service_precedence", service_precedence) + NetworkServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mobile_network_id=mobile_network_id, + pcc_rules=pcc_rules, + service_precedence=service_precedence, + location=location, + name=name, + service_qos_policy=service_qos_policy, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mobile_network_id: Optional[pulumi.Input[str]] = None, + pcc_rules: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkServicePccRuleArgs']]]] = None, + service_precedence: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + service_qos_policy: Optional[pulumi.Input['NetworkServiceServiceQosPolicyArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mobile_network_id is None and 'mobileNetworkId' in kwargs: + mobile_network_id = kwargs['mobileNetworkId'] + if mobile_network_id is None: + raise TypeError("Missing 'mobile_network_id' argument") + if pcc_rules is None and 'pccRules' in kwargs: + pcc_rules = kwargs['pccRules'] + if pcc_rules is None: + raise TypeError("Missing 'pcc_rules' argument") + if service_precedence is None and 'servicePrecedence' in kwargs: + service_precedence = kwargs['servicePrecedence'] + if service_precedence is None: + raise TypeError("Missing 'service_precedence' argument") + if service_qos_policy is None and 'serviceQosPolicy' in kwargs: + service_qos_policy = kwargs['serviceQosPolicy'] + + _setter("mobile_network_id", mobile_network_id) + _setter("pcc_rules", pcc_rules) + _setter("service_precedence", service_precedence) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if service_qos_policy is not None: - pulumi.set(__self__, "service_qos_policy", service_qos_policy) + _setter("service_qos_policy", service_qos_policy) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="mobileNetworkId") @@ -150,20 +187,51 @@ def __init__(__self__, *, :param pulumi.Input['NetworkServiceServiceQosPolicyArgs'] service_qos_policy: A `service_qos_policy` block as defined below. The QoS policy to use for packets matching this service. This can be overridden for particular flows using the ruleQosPolicy field in a `pcc_rule`. If this field is not specified then the `sim_policy` of User Equipment (UE) will define the QoS settings. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Service. """ + _NetworkServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + mobile_network_id=mobile_network_id, + name=name, + pcc_rules=pcc_rules, + service_precedence=service_precedence, + service_qos_policy=service_qos_policy, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + mobile_network_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + pcc_rules: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkServicePccRuleArgs']]]] = None, + service_precedence: Optional[pulumi.Input[int]] = None, + service_qos_policy: Optional[pulumi.Input['NetworkServiceServiceQosPolicyArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mobile_network_id is None and 'mobileNetworkId' in kwargs: + mobile_network_id = kwargs['mobileNetworkId'] + if pcc_rules is None and 'pccRules' in kwargs: + pcc_rules = kwargs['pccRules'] + if service_precedence is None and 'servicePrecedence' in kwargs: + service_precedence = kwargs['servicePrecedence'] + if service_qos_policy is None and 'serviceQosPolicy' in kwargs: + service_qos_policy = kwargs['serviceQosPolicy'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mobile_network_id is not None: - pulumi.set(__self__, "mobile_network_id", mobile_network_id) + _setter("mobile_network_id", mobile_network_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pcc_rules is not None: - pulumi.set(__self__, "pcc_rules", pcc_rules) + _setter("pcc_rules", pcc_rules) if service_precedence is not None: - pulumi.set(__self__, "service_precedence", service_precedence) + _setter("service_precedence", service_precedence) if service_qos_policy is not None: - pulumi.set(__self__, "service_qos_policy", service_qos_policy) + _setter("service_qos_policy", service_qos_policy) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -425,6 +493,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -457,6 +529,11 @@ def _internal_init(__self__, if service_precedence is None and not opts.urn: raise TypeError("Missing required property 'service_precedence'") __props__.__dict__["service_precedence"] = service_precedence + if service_qos_policy is not None and not isinstance(service_qos_policy, NetworkServiceServiceQosPolicyArgs): + service_qos_policy = service_qos_policy or {} + def _setter(key, value): + service_qos_policy[key] = value + NetworkServiceServiceQosPolicyArgs._configure(_setter, **service_qos_policy) __props__.__dict__["service_qos_policy"] = service_qos_policy __props__.__dict__["tags"] = tags super(NetworkService, __self__).__init__( diff --git a/sdk/python/pulumi_azure/mobile/network_sim.py b/sdk/python/pulumi_azure/mobile/network_sim.py index 5774c7a939..e7eeb92833 100644 --- a/sdk/python/pulumi_azure/mobile/network_sim.py +++ b/sdk/python/pulumi_azure/mobile/network_sim.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,19 +37,72 @@ def __init__(__self__, *, :param pulumi.Input[str] sim_policy_id: The ID of SIM policy used by this SIM. :param pulumi.Input[Sequence[pulumi.Input['NetworkSimStaticIpConfigurationArgs']]] static_ip_configurations: A `static_ip_configuration` block as defined below. """ - pulumi.set(__self__, "authentication_key", authentication_key) - pulumi.set(__self__, "integrated_circuit_card_identifier", integrated_circuit_card_identifier) - pulumi.set(__self__, "international_mobile_subscriber_identity", international_mobile_subscriber_identity) - pulumi.set(__self__, "mobile_network_sim_group_id", mobile_network_sim_group_id) - pulumi.set(__self__, "operator_key_code", operator_key_code) + NetworkSimArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_key=authentication_key, + integrated_circuit_card_identifier=integrated_circuit_card_identifier, + international_mobile_subscriber_identity=international_mobile_subscriber_identity, + mobile_network_sim_group_id=mobile_network_sim_group_id, + operator_key_code=operator_key_code, + device_type=device_type, + name=name, + sim_policy_id=sim_policy_id, + static_ip_configurations=static_ip_configurations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_key: Optional[pulumi.Input[str]] = None, + integrated_circuit_card_identifier: Optional[pulumi.Input[str]] = None, + international_mobile_subscriber_identity: Optional[pulumi.Input[str]] = None, + mobile_network_sim_group_id: Optional[pulumi.Input[str]] = None, + operator_key_code: Optional[pulumi.Input[str]] = None, + device_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sim_policy_id: Optional[pulumi.Input[str]] = None, + static_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkSimStaticIpConfigurationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_key is None and 'authenticationKey' in kwargs: + authentication_key = kwargs['authenticationKey'] + if authentication_key is None: + raise TypeError("Missing 'authentication_key' argument") + if integrated_circuit_card_identifier is None and 'integratedCircuitCardIdentifier' in kwargs: + integrated_circuit_card_identifier = kwargs['integratedCircuitCardIdentifier'] + if integrated_circuit_card_identifier is None: + raise TypeError("Missing 'integrated_circuit_card_identifier' argument") + if international_mobile_subscriber_identity is None and 'internationalMobileSubscriberIdentity' in kwargs: + international_mobile_subscriber_identity = kwargs['internationalMobileSubscriberIdentity'] + if international_mobile_subscriber_identity is None: + raise TypeError("Missing 'international_mobile_subscriber_identity' argument") + if mobile_network_sim_group_id is None and 'mobileNetworkSimGroupId' in kwargs: + mobile_network_sim_group_id = kwargs['mobileNetworkSimGroupId'] + if mobile_network_sim_group_id is None: + raise TypeError("Missing 'mobile_network_sim_group_id' argument") + if operator_key_code is None and 'operatorKeyCode' in kwargs: + operator_key_code = kwargs['operatorKeyCode'] + if operator_key_code is None: + raise TypeError("Missing 'operator_key_code' argument") + if device_type is None and 'deviceType' in kwargs: + device_type = kwargs['deviceType'] + if sim_policy_id is None and 'simPolicyId' in kwargs: + sim_policy_id = kwargs['simPolicyId'] + if static_ip_configurations is None and 'staticIpConfigurations' in kwargs: + static_ip_configurations = kwargs['staticIpConfigurations'] + + _setter("authentication_key", authentication_key) + _setter("integrated_circuit_card_identifier", integrated_circuit_card_identifier) + _setter("international_mobile_subscriber_identity", international_mobile_subscriber_identity) + _setter("mobile_network_sim_group_id", mobile_network_sim_group_id) + _setter("operator_key_code", operator_key_code) if device_type is not None: - pulumi.set(__self__, "device_type", device_type) + _setter("device_type", device_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sim_policy_id is not None: - pulumi.set(__self__, "sim_policy_id", sim_policy_id) + _setter("sim_policy_id", sim_policy_id) if static_ip_configurations is not None: - pulumi.set(__self__, "static_ip_configurations", static_ip_configurations) + _setter("static_ip_configurations", static_ip_configurations) @property @pulumi.getter(name="authenticationKey") @@ -190,30 +243,85 @@ def __init__(__self__, *, :param pulumi.Input[str] vendor_key_fingerprint: The public key fingerprint of the SIM vendor who provided this SIM, if any. :param pulumi.Input[str] vendor_name: The name of the SIM vendor who provided this SIM, if any. """ + _NetworkSimState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_key=authentication_key, + device_type=device_type, + integrated_circuit_card_identifier=integrated_circuit_card_identifier, + international_mobile_subscriber_identity=international_mobile_subscriber_identity, + mobile_network_sim_group_id=mobile_network_sim_group_id, + name=name, + operator_key_code=operator_key_code, + sim_policy_id=sim_policy_id, + sim_state=sim_state, + static_ip_configurations=static_ip_configurations, + vendor_key_fingerprint=vendor_key_fingerprint, + vendor_name=vendor_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_key: Optional[pulumi.Input[str]] = None, + device_type: Optional[pulumi.Input[str]] = None, + integrated_circuit_card_identifier: Optional[pulumi.Input[str]] = None, + international_mobile_subscriber_identity: Optional[pulumi.Input[str]] = None, + mobile_network_sim_group_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + operator_key_code: Optional[pulumi.Input[str]] = None, + sim_policy_id: Optional[pulumi.Input[str]] = None, + sim_state: Optional[pulumi.Input[str]] = None, + static_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkSimStaticIpConfigurationArgs']]]] = None, + vendor_key_fingerprint: Optional[pulumi.Input[str]] = None, + vendor_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_key is None and 'authenticationKey' in kwargs: + authentication_key = kwargs['authenticationKey'] + if device_type is None and 'deviceType' in kwargs: + device_type = kwargs['deviceType'] + if integrated_circuit_card_identifier is None and 'integratedCircuitCardIdentifier' in kwargs: + integrated_circuit_card_identifier = kwargs['integratedCircuitCardIdentifier'] + if international_mobile_subscriber_identity is None and 'internationalMobileSubscriberIdentity' in kwargs: + international_mobile_subscriber_identity = kwargs['internationalMobileSubscriberIdentity'] + if mobile_network_sim_group_id is None and 'mobileNetworkSimGroupId' in kwargs: + mobile_network_sim_group_id = kwargs['mobileNetworkSimGroupId'] + if operator_key_code is None and 'operatorKeyCode' in kwargs: + operator_key_code = kwargs['operatorKeyCode'] + if sim_policy_id is None and 'simPolicyId' in kwargs: + sim_policy_id = kwargs['simPolicyId'] + if sim_state is None and 'simState' in kwargs: + sim_state = kwargs['simState'] + if static_ip_configurations is None and 'staticIpConfigurations' in kwargs: + static_ip_configurations = kwargs['staticIpConfigurations'] + if vendor_key_fingerprint is None and 'vendorKeyFingerprint' in kwargs: + vendor_key_fingerprint = kwargs['vendorKeyFingerprint'] + if vendor_name is None and 'vendorName' in kwargs: + vendor_name = kwargs['vendorName'] + if authentication_key is not None: - pulumi.set(__self__, "authentication_key", authentication_key) + _setter("authentication_key", authentication_key) if device_type is not None: - pulumi.set(__self__, "device_type", device_type) + _setter("device_type", device_type) if integrated_circuit_card_identifier is not None: - pulumi.set(__self__, "integrated_circuit_card_identifier", integrated_circuit_card_identifier) + _setter("integrated_circuit_card_identifier", integrated_circuit_card_identifier) if international_mobile_subscriber_identity is not None: - pulumi.set(__self__, "international_mobile_subscriber_identity", international_mobile_subscriber_identity) + _setter("international_mobile_subscriber_identity", international_mobile_subscriber_identity) if mobile_network_sim_group_id is not None: - pulumi.set(__self__, "mobile_network_sim_group_id", mobile_network_sim_group_id) + _setter("mobile_network_sim_group_id", mobile_network_sim_group_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if operator_key_code is not None: - pulumi.set(__self__, "operator_key_code", operator_key_code) + _setter("operator_key_code", operator_key_code) if sim_policy_id is not None: - pulumi.set(__self__, "sim_policy_id", sim_policy_id) + _setter("sim_policy_id", sim_policy_id) if sim_state is not None: - pulumi.set(__self__, "sim_state", sim_state) + _setter("sim_state", sim_state) if static_ip_configurations is not None: - pulumi.set(__self__, "static_ip_configurations", static_ip_configurations) + _setter("static_ip_configurations", static_ip_configurations) if vendor_key_fingerprint is not None: - pulumi.set(__self__, "vendor_key_fingerprint", vendor_key_fingerprint) + _setter("vendor_key_fingerprint", vendor_key_fingerprint) if vendor_name is not None: - pulumi.set(__self__, "vendor_name", vendor_name) + _setter("vendor_name", vendor_name) @property @pulumi.getter(name="authenticationKey") @@ -515,6 +623,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkSimArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mobile/network_sim_group.py b/sdk/python/pulumi_azure/mobile/network_sim_group.py index 4cc1cbdbb7..fa81aec75e 100644 --- a/sdk/python/pulumi_azure/mobile/network_sim_group.py +++ b/sdk/python/pulumi_azure/mobile/network_sim_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,44 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Mobile Network Sim Groups. Changing this forces a new Mobile Network Sim Group to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Sim Groups. """ - pulumi.set(__self__, "mobile_network_id", mobile_network_id) + NetworkSimGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mobile_network_id=mobile_network_id, + encryption_key_url=encryption_key_url, + identity=identity, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mobile_network_id: Optional[pulumi.Input[str]] = None, + encryption_key_url: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['NetworkSimGroupIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mobile_network_id is None and 'mobileNetworkId' in kwargs: + mobile_network_id = kwargs['mobileNetworkId'] + if mobile_network_id is None: + raise TypeError("Missing 'mobile_network_id' argument") + if encryption_key_url is None and 'encryptionKeyUrl' in kwargs: + encryption_key_url = kwargs['encryptionKeyUrl'] + + _setter("mobile_network_id", mobile_network_id) if encryption_key_url is not None: - pulumi.set(__self__, "encryption_key_url", encryption_key_url) + _setter("encryption_key_url", encryption_key_url) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="mobileNetworkId") @@ -140,18 +167,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Mobile Network Sim Groups. Changing this forces a new Mobile Network Sim Group to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Sim Groups. """ + _NetworkSimGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + encryption_key_url=encryption_key_url, + identity=identity, + location=location, + mobile_network_id=mobile_network_id, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + encryption_key_url: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['NetworkSimGroupIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + mobile_network_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if encryption_key_url is None and 'encryptionKeyUrl' in kwargs: + encryption_key_url = kwargs['encryptionKeyUrl'] + if mobile_network_id is None and 'mobileNetworkId' in kwargs: + mobile_network_id = kwargs['mobileNetworkId'] + if encryption_key_url is not None: - pulumi.set(__self__, "encryption_key_url", encryption_key_url) + _setter("encryption_key_url", encryption_key_url) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mobile_network_id is not None: - pulumi.set(__self__, "mobile_network_id", mobile_network_id) + _setter("mobile_network_id", mobile_network_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="encryptionKeyUrl") @@ -351,6 +403,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkSimGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -372,6 +428,11 @@ def _internal_init(__self__, __props__ = NetworkSimGroupArgs.__new__(NetworkSimGroupArgs) __props__.__dict__["encryption_key_url"] = encryption_key_url + if identity is not None and not isinstance(identity, NetworkSimGroupIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + NetworkSimGroupIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location if mobile_network_id is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/mobile/network_sim_policy.py b/sdk/python/pulumi_azure/mobile/network_sim_policy.py index 688e210d2d..80514a63e6 100644 --- a/sdk/python/pulumi_azure/mobile/network_sim_policy.py +++ b/sdk/python/pulumi_azure/mobile/network_sim_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,20 +37,65 @@ def __init__(__self__, *, :param pulumi.Input[int] registration_timer_in_seconds: Interval for the user equipment periodic registration update procedure. Defaults to `3240`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Sim Policies. """ - pulumi.set(__self__, "default_slice_id", default_slice_id) - pulumi.set(__self__, "mobile_network_id", mobile_network_id) - pulumi.set(__self__, "slices", slices) - pulumi.set(__self__, "user_equipment_aggregate_maximum_bit_rate", user_equipment_aggregate_maximum_bit_rate) + NetworkSimPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_slice_id=default_slice_id, + mobile_network_id=mobile_network_id, + slices=slices, + user_equipment_aggregate_maximum_bit_rate=user_equipment_aggregate_maximum_bit_rate, + location=location, + name=name, + rat_frequency_selection_priority_index=rat_frequency_selection_priority_index, + registration_timer_in_seconds=registration_timer_in_seconds, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_slice_id: Optional[pulumi.Input[str]] = None, + mobile_network_id: Optional[pulumi.Input[str]] = None, + slices: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkSimPolicySliceArgs']]]] = None, + user_equipment_aggregate_maximum_bit_rate: Optional[pulumi.Input['NetworkSimPolicyUserEquipmentAggregateMaximumBitRateArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rat_frequency_selection_priority_index: Optional[pulumi.Input[int]] = None, + registration_timer_in_seconds: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_slice_id is None and 'defaultSliceId' in kwargs: + default_slice_id = kwargs['defaultSliceId'] + if default_slice_id is None: + raise TypeError("Missing 'default_slice_id' argument") + if mobile_network_id is None and 'mobileNetworkId' in kwargs: + mobile_network_id = kwargs['mobileNetworkId'] + if mobile_network_id is None: + raise TypeError("Missing 'mobile_network_id' argument") + if slices is None: + raise TypeError("Missing 'slices' argument") + if user_equipment_aggregate_maximum_bit_rate is None and 'userEquipmentAggregateMaximumBitRate' in kwargs: + user_equipment_aggregate_maximum_bit_rate = kwargs['userEquipmentAggregateMaximumBitRate'] + if user_equipment_aggregate_maximum_bit_rate is None: + raise TypeError("Missing 'user_equipment_aggregate_maximum_bit_rate' argument") + if rat_frequency_selection_priority_index is None and 'ratFrequencySelectionPriorityIndex' in kwargs: + rat_frequency_selection_priority_index = kwargs['ratFrequencySelectionPriorityIndex'] + if registration_timer_in_seconds is None and 'registrationTimerInSeconds' in kwargs: + registration_timer_in_seconds = kwargs['registrationTimerInSeconds'] + + _setter("default_slice_id", default_slice_id) + _setter("mobile_network_id", mobile_network_id) + _setter("slices", slices) + _setter("user_equipment_aggregate_maximum_bit_rate", user_equipment_aggregate_maximum_bit_rate) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rat_frequency_selection_priority_index is not None: - pulumi.set(__self__, "rat_frequency_selection_priority_index", rat_frequency_selection_priority_index) + _setter("rat_frequency_selection_priority_index", rat_frequency_selection_priority_index) if registration_timer_in_seconds is not None: - pulumi.set(__self__, "registration_timer_in_seconds", registration_timer_in_seconds) + _setter("registration_timer_in_seconds", registration_timer_in_seconds) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="defaultSliceId") @@ -185,24 +230,61 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Sim Policies. :param pulumi.Input['NetworkSimPolicyUserEquipmentAggregateMaximumBitRateArgs'] user_equipment_aggregate_maximum_bit_rate: A `user_equipment_aggregate_maximum_bit_rate` block as defined below. """ + _NetworkSimPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_slice_id=default_slice_id, + location=location, + mobile_network_id=mobile_network_id, + name=name, + rat_frequency_selection_priority_index=rat_frequency_selection_priority_index, + registration_timer_in_seconds=registration_timer_in_seconds, + slices=slices, + tags=tags, + user_equipment_aggregate_maximum_bit_rate=user_equipment_aggregate_maximum_bit_rate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_slice_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + mobile_network_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rat_frequency_selection_priority_index: Optional[pulumi.Input[int]] = None, + registration_timer_in_seconds: Optional[pulumi.Input[int]] = None, + slices: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkSimPolicySliceArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + user_equipment_aggregate_maximum_bit_rate: Optional[pulumi.Input['NetworkSimPolicyUserEquipmentAggregateMaximumBitRateArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_slice_id is None and 'defaultSliceId' in kwargs: + default_slice_id = kwargs['defaultSliceId'] + if mobile_network_id is None and 'mobileNetworkId' in kwargs: + mobile_network_id = kwargs['mobileNetworkId'] + if rat_frequency_selection_priority_index is None and 'ratFrequencySelectionPriorityIndex' in kwargs: + rat_frequency_selection_priority_index = kwargs['ratFrequencySelectionPriorityIndex'] + if registration_timer_in_seconds is None and 'registrationTimerInSeconds' in kwargs: + registration_timer_in_seconds = kwargs['registrationTimerInSeconds'] + if user_equipment_aggregate_maximum_bit_rate is None and 'userEquipmentAggregateMaximumBitRate' in kwargs: + user_equipment_aggregate_maximum_bit_rate = kwargs['userEquipmentAggregateMaximumBitRate'] + if default_slice_id is not None: - pulumi.set(__self__, "default_slice_id", default_slice_id) + _setter("default_slice_id", default_slice_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mobile_network_id is not None: - pulumi.set(__self__, "mobile_network_id", mobile_network_id) + _setter("mobile_network_id", mobile_network_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rat_frequency_selection_priority_index is not None: - pulumi.set(__self__, "rat_frequency_selection_priority_index", rat_frequency_selection_priority_index) + _setter("rat_frequency_selection_priority_index", rat_frequency_selection_priority_index) if registration_timer_in_seconds is not None: - pulumi.set(__self__, "registration_timer_in_seconds", registration_timer_in_seconds) + _setter("registration_timer_in_seconds", registration_timer_in_seconds) if slices is not None: - pulumi.set(__self__, "slices", slices) + _setter("slices", slices) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if user_equipment_aggregate_maximum_bit_rate is not None: - pulumi.set(__self__, "user_equipment_aggregate_maximum_bit_rate", user_equipment_aggregate_maximum_bit_rate) + _setter("user_equipment_aggregate_maximum_bit_rate", user_equipment_aggregate_maximum_bit_rate) @property @pulumi.getter(name="defaultSliceId") @@ -514,6 +596,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkSimPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -551,6 +637,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'slices'") __props__.__dict__["slices"] = slices __props__.__dict__["tags"] = tags + if user_equipment_aggregate_maximum_bit_rate is not None and not isinstance(user_equipment_aggregate_maximum_bit_rate, NetworkSimPolicyUserEquipmentAggregateMaximumBitRateArgs): + user_equipment_aggregate_maximum_bit_rate = user_equipment_aggregate_maximum_bit_rate or {} + def _setter(key, value): + user_equipment_aggregate_maximum_bit_rate[key] = value + NetworkSimPolicyUserEquipmentAggregateMaximumBitRateArgs._configure(_setter, **user_equipment_aggregate_maximum_bit_rate) if user_equipment_aggregate_maximum_bit_rate is None and not opts.urn: raise TypeError("Missing required property 'user_equipment_aggregate_maximum_bit_rate'") __props__.__dict__["user_equipment_aggregate_maximum_bit_rate"] = user_equipment_aggregate_maximum_bit_rate diff --git a/sdk/python/pulumi_azure/mobile/network_site.py b/sdk/python/pulumi_azure/mobile/network_site.py index 24d7421e3a..4e965bb933 100644 --- a/sdk/python/pulumi_azure/mobile/network_site.py +++ b/sdk/python/pulumi_azure/mobile/network_site.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkSiteArgs', 'NetworkSite'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Mobile Network Site. Changing this forces a new Mobile Network Site to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Site. """ - pulumi.set(__self__, "mobile_network_id", mobile_network_id) + NetworkSiteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mobile_network_id=mobile_network_id, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mobile_network_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mobile_network_id is None and 'mobileNetworkId' in kwargs: + mobile_network_id = kwargs['mobileNetworkId'] + if mobile_network_id is None: + raise TypeError("Missing 'mobile_network_id' argument") + + _setter("mobile_network_id", mobile_network_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="mobileNetworkId") @@ -98,16 +119,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] network_function_ids: An array of Id of Network Functions deployed on the site. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Site. """ + _NetworkSiteState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + mobile_network_id=mobile_network_id, + name=name, + network_function_ids=network_function_ids, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + mobile_network_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_function_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mobile_network_id is None and 'mobileNetworkId' in kwargs: + mobile_network_id = kwargs['mobileNetworkId'] + if network_function_ids is None and 'networkFunctionIds' in kwargs: + network_function_ids = kwargs['networkFunctionIds'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mobile_network_id is not None: - pulumi.set(__self__, "mobile_network_id", mobile_network_id) + _setter("mobile_network_id", mobile_network_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_function_ids is not None: - pulumi.set(__self__, "network_function_ids", network_function_ids) + _setter("network_function_ids", network_function_ids) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -273,6 +317,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkSiteArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mobile/network_slice.py b/sdk/python/pulumi_azure/mobile/network_slice.py index 2fa536cac4..3ef89dec23 100644 --- a/sdk/python/pulumi_azure/mobile/network_slice.py +++ b/sdk/python/pulumi_azure/mobile/network_slice.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,16 +31,45 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Mobile Network Slice. Changing this forces a new Mobile Network Slice to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Slice. """ - pulumi.set(__self__, "mobile_network_id", mobile_network_id) - pulumi.set(__self__, "single_network_slice_selection_assistance_information", single_network_slice_selection_assistance_information) + NetworkSliceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mobile_network_id=mobile_network_id, + single_network_slice_selection_assistance_information=single_network_slice_selection_assistance_information, + description=description, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mobile_network_id: Optional[pulumi.Input[str]] = None, + single_network_slice_selection_assistance_information: Optional[pulumi.Input['NetworkSliceSingleNetworkSliceSelectionAssistanceInformationArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mobile_network_id is None and 'mobileNetworkId' in kwargs: + mobile_network_id = kwargs['mobileNetworkId'] + if mobile_network_id is None: + raise TypeError("Missing 'mobile_network_id' argument") + if single_network_slice_selection_assistance_information is None and 'singleNetworkSliceSelectionAssistanceInformation' in kwargs: + single_network_slice_selection_assistance_information = kwargs['singleNetworkSliceSelectionAssistanceInformation'] + if single_network_slice_selection_assistance_information is None: + raise TypeError("Missing 'single_network_slice_selection_assistance_information' argument") + + _setter("mobile_network_id", mobile_network_id) + _setter("single_network_slice_selection_assistance_information", single_network_slice_selection_assistance_information) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="mobileNetworkId") @@ -133,18 +162,43 @@ def __init__(__self__, *, :param pulumi.Input['NetworkSliceSingleNetworkSliceSelectionAssistanceInformationArgs'] single_network_slice_selection_assistance_information: A `single_network_slice_selection_assistance_information` block as defined below. Single-network slice selection assistance information (S-NSSAI). Unique at the scope of a mobile network. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Mobile Network Slice. """ + _NetworkSliceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + location=location, + mobile_network_id=mobile_network_id, + name=name, + single_network_slice_selection_assistance_information=single_network_slice_selection_assistance_information, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + mobile_network_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + single_network_slice_selection_assistance_information: Optional[pulumi.Input['NetworkSliceSingleNetworkSliceSelectionAssistanceInformationArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mobile_network_id is None and 'mobileNetworkId' in kwargs: + mobile_network_id = kwargs['mobileNetworkId'] + if single_network_slice_selection_assistance_information is None and 'singleNetworkSliceSelectionAssistanceInformation' in kwargs: + single_network_slice_selection_assistance_information = kwargs['singleNetworkSliceSelectionAssistanceInformation'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mobile_network_id is not None: - pulumi.set(__self__, "mobile_network_id", mobile_network_id) + _setter("mobile_network_id", mobile_network_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if single_network_slice_selection_assistance_information is not None: - pulumi.set(__self__, "single_network_slice_selection_assistance_information", single_network_slice_selection_assistance_information) + _setter("single_network_slice_selection_assistance_information", single_network_slice_selection_assistance_information) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -326,6 +380,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkSliceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -352,6 +410,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'mobile_network_id'") __props__.__dict__["mobile_network_id"] = mobile_network_id __props__.__dict__["name"] = name + if single_network_slice_selection_assistance_information is not None and not isinstance(single_network_slice_selection_assistance_information, NetworkSliceSingleNetworkSliceSelectionAssistanceInformationArgs): + single_network_slice_selection_assistance_information = single_network_slice_selection_assistance_information or {} + def _setter(key, value): + single_network_slice_selection_assistance_information[key] = value + NetworkSliceSingleNetworkSliceSelectionAssistanceInformationArgs._configure(_setter, **single_network_slice_selection_assistance_information) if single_network_slice_selection_assistance_information is None and not opts.urn: raise TypeError("Missing required property 'single_network_slice_selection_assistance_information'") __props__.__dict__["single_network_slice_selection_assistance_information"] = single_network_slice_selection_assistance_information diff --git a/sdk/python/pulumi_azure/mobile/outputs.py b/sdk/python/pulumi_azure/mobile/outputs.py index d1414425ca..e831ac1c58 100644 --- a/sdk/python/pulumi_azure/mobile/outputs.py +++ b/sdk/python/pulumi_azure/mobile/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -98,20 +98,57 @@ def __init__(__self__, *, :param int udp_pinhole_timeout_in_seconds: Pinhole timeout for UDP pinholes in seconds. Must between `1` to `180`, Default to `180`. :param int udp_port_reuse_minimum_hold_time_in_seconds: Minimum time in seconds that will pass before a UDP port that was used by a closed pinhole can be reused. Defaults to `60`. """ + NetworkAttachedDataNetworkNetworkAddressPortTranslation._configure( + lambda key, value: pulumi.set(__self__, key, value), + icmp_pinhole_timeout_in_seconds=icmp_pinhole_timeout_in_seconds, + pinhole_maximum_number=pinhole_maximum_number, + port_range=port_range, + tcp_pinhole_timeout_in_seconds=tcp_pinhole_timeout_in_seconds, + tcp_port_reuse_minimum_hold_time_in_seconds=tcp_port_reuse_minimum_hold_time_in_seconds, + udp_pinhole_timeout_in_seconds=udp_pinhole_timeout_in_seconds, + udp_port_reuse_minimum_hold_time_in_seconds=udp_port_reuse_minimum_hold_time_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + icmp_pinhole_timeout_in_seconds: Optional[int] = None, + pinhole_maximum_number: Optional[int] = None, + port_range: Optional['outputs.NetworkAttachedDataNetworkNetworkAddressPortTranslationPortRange'] = None, + tcp_pinhole_timeout_in_seconds: Optional[int] = None, + tcp_port_reuse_minimum_hold_time_in_seconds: Optional[int] = None, + udp_pinhole_timeout_in_seconds: Optional[int] = None, + udp_port_reuse_minimum_hold_time_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if icmp_pinhole_timeout_in_seconds is None and 'icmpPinholeTimeoutInSeconds' in kwargs: + icmp_pinhole_timeout_in_seconds = kwargs['icmpPinholeTimeoutInSeconds'] + if pinhole_maximum_number is None and 'pinholeMaximumNumber' in kwargs: + pinhole_maximum_number = kwargs['pinholeMaximumNumber'] + if port_range is None and 'portRange' in kwargs: + port_range = kwargs['portRange'] + if tcp_pinhole_timeout_in_seconds is None and 'tcpPinholeTimeoutInSeconds' in kwargs: + tcp_pinhole_timeout_in_seconds = kwargs['tcpPinholeTimeoutInSeconds'] + if tcp_port_reuse_minimum_hold_time_in_seconds is None and 'tcpPortReuseMinimumHoldTimeInSeconds' in kwargs: + tcp_port_reuse_minimum_hold_time_in_seconds = kwargs['tcpPortReuseMinimumHoldTimeInSeconds'] + if udp_pinhole_timeout_in_seconds is None and 'udpPinholeTimeoutInSeconds' in kwargs: + udp_pinhole_timeout_in_seconds = kwargs['udpPinholeTimeoutInSeconds'] + if udp_port_reuse_minimum_hold_time_in_seconds is None and 'udpPortReuseMinimumHoldTimeInSeconds' in kwargs: + udp_port_reuse_minimum_hold_time_in_seconds = kwargs['udpPortReuseMinimumHoldTimeInSeconds'] + if icmp_pinhole_timeout_in_seconds is not None: - pulumi.set(__self__, "icmp_pinhole_timeout_in_seconds", icmp_pinhole_timeout_in_seconds) + _setter("icmp_pinhole_timeout_in_seconds", icmp_pinhole_timeout_in_seconds) if pinhole_maximum_number is not None: - pulumi.set(__self__, "pinhole_maximum_number", pinhole_maximum_number) + _setter("pinhole_maximum_number", pinhole_maximum_number) if port_range is not None: - pulumi.set(__self__, "port_range", port_range) + _setter("port_range", port_range) if tcp_pinhole_timeout_in_seconds is not None: - pulumi.set(__self__, "tcp_pinhole_timeout_in_seconds", tcp_pinhole_timeout_in_seconds) + _setter("tcp_pinhole_timeout_in_seconds", tcp_pinhole_timeout_in_seconds) if tcp_port_reuse_minimum_hold_time_in_seconds is not None: - pulumi.set(__self__, "tcp_port_reuse_minimum_hold_time_in_seconds", tcp_port_reuse_minimum_hold_time_in_seconds) + _setter("tcp_port_reuse_minimum_hold_time_in_seconds", tcp_port_reuse_minimum_hold_time_in_seconds) if udp_pinhole_timeout_in_seconds is not None: - pulumi.set(__self__, "udp_pinhole_timeout_in_seconds", udp_pinhole_timeout_in_seconds) + _setter("udp_pinhole_timeout_in_seconds", udp_pinhole_timeout_in_seconds) if udp_port_reuse_minimum_hold_time_in_seconds is not None: - pulumi.set(__self__, "udp_port_reuse_minimum_hold_time_in_seconds", udp_port_reuse_minimum_hold_time_in_seconds) + _setter("udp_port_reuse_minimum_hold_time_in_seconds", udp_port_reuse_minimum_hold_time_in_seconds) @property @pulumi.getter(name="icmpPinholeTimeoutInSeconds") @@ -176,10 +213,23 @@ def __init__(__self__, *, :param int maximum: Specifies the maximum port number. :param int minimum: Specifies the minimum port number. """ + NetworkAttachedDataNetworkNetworkAddressPortTranslationPortRange._configure( + lambda key, value: pulumi.set(__self__, key, value), + maximum=maximum, + minimum=minimum, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + maximum: Optional[int] = None, + minimum: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maximum is not None: - pulumi.set(__self__, "maximum", maximum) + _setter("maximum", maximum) if minimum is not None: - pulumi.set(__self__, "minimum", minimum) + _setter("minimum", minimum) @property @pulumi.getter @@ -224,8 +274,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: A list of the IDs for User Assigned Managed Identity resources to be assigned. :param str type: Specifies the type of Managed Service Identity. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + NetworkPacketCoreControlPlaneIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -272,9 +341,28 @@ def __init__(__self__, *, :param str authentication_type: How to authenticate users to access local diagnostics APIs. Possible values are `AAD` and `Password`. :param str https_server_certificate_url: The versionless certificate URL used to secure local access to packet core diagnostics over local APIs by the Kubernetes ingress. """ - pulumi.set(__self__, "authentication_type", authentication_type) + NetworkPacketCoreControlPlaneLocalDiagnosticsAccess._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_type=authentication_type, + https_server_certificate_url=https_server_certificate_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_type: Optional[str] = None, + https_server_certificate_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if authentication_type is None: + raise TypeError("Missing 'authentication_type' argument") + if https_server_certificate_url is None and 'httpsServerCertificateUrl' in kwargs: + https_server_certificate_url = kwargs['httpsServerCertificateUrl'] + + _setter("authentication_type", authentication_type) if https_server_certificate_url is not None: - pulumi.set(__self__, "https_server_certificate_url", https_server_certificate_url) + _setter("https_server_certificate_url", https_server_certificate_url) @property @pulumi.getter(name="authenticationType") @@ -333,15 +421,44 @@ def __init__(__self__, *, :param str edge_device_id: The ID of the Azure Stack Edge device where the packet core is deployed. If the device is part of a fault-tolerant pair, either device in the pair can be specified. :param str stack_hci_cluster_id: The ID of the Azure Stack HCI cluster where the packet core is deployed. """ - pulumi.set(__self__, "type", type) + NetworkPacketCoreControlPlanePlatform._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + arc_kubernetes_cluster_id=arc_kubernetes_cluster_id, + custom_location_id=custom_location_id, + edge_device_id=edge_device_id, + stack_hci_cluster_id=stack_hci_cluster_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + arc_kubernetes_cluster_id: Optional[str] = None, + custom_location_id: Optional[str] = None, + edge_device_id: Optional[str] = None, + stack_hci_cluster_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if arc_kubernetes_cluster_id is None and 'arcKubernetesClusterId' in kwargs: + arc_kubernetes_cluster_id = kwargs['arcKubernetesClusterId'] + if custom_location_id is None and 'customLocationId' in kwargs: + custom_location_id = kwargs['customLocationId'] + if edge_device_id is None and 'edgeDeviceId' in kwargs: + edge_device_id = kwargs['edgeDeviceId'] + if stack_hci_cluster_id is None and 'stackHciClusterId' in kwargs: + stack_hci_cluster_id = kwargs['stackHciClusterId'] + + _setter("type", type) if arc_kubernetes_cluster_id is not None: - pulumi.set(__self__, "arc_kubernetes_cluster_id", arc_kubernetes_cluster_id) + _setter("arc_kubernetes_cluster_id", arc_kubernetes_cluster_id) if custom_location_id is not None: - pulumi.set(__self__, "custom_location_id", custom_location_id) + _setter("custom_location_id", custom_location_id) if edge_device_id is not None: - pulumi.set(__self__, "edge_device_id", edge_device_id) + _setter("edge_device_id", edge_device_id) if stack_hci_cluster_id is not None: - pulumi.set(__self__, "stack_hci_cluster_id", stack_hci_cluster_id) + _setter("stack_hci_cluster_id", stack_hci_cluster_id) @property @pulumi.getter @@ -422,13 +539,44 @@ def __init__(__self__, *, :param 'NetworkServicePccRuleQosPolicyArgs' qos_policy: A `qos_policy` block as defined below. The QoS policy to use for packets matching this rule. If this field is not specified then the Service will define the QoS settings. :param bool traffic_control_enabled: Determines whether flows that match this data flow policy rule are permitted. Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "precedence", precedence) - pulumi.set(__self__, "service_data_flow_templates", service_data_flow_templates) + NetworkServicePccRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + precedence=precedence, + service_data_flow_templates=service_data_flow_templates, + qos_policy=qos_policy, + traffic_control_enabled=traffic_control_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + precedence: Optional[int] = None, + service_data_flow_templates: Optional[Sequence['outputs.NetworkServicePccRuleServiceDataFlowTemplate']] = None, + qos_policy: Optional['outputs.NetworkServicePccRuleQosPolicy'] = None, + traffic_control_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if precedence is None: + raise TypeError("Missing 'precedence' argument") + if service_data_flow_templates is None and 'serviceDataFlowTemplates' in kwargs: + service_data_flow_templates = kwargs['serviceDataFlowTemplates'] + if service_data_flow_templates is None: + raise TypeError("Missing 'service_data_flow_templates' argument") + if qos_policy is None and 'qosPolicy' in kwargs: + qos_policy = kwargs['qosPolicy'] + if traffic_control_enabled is None and 'trafficControlEnabled' in kwargs: + traffic_control_enabled = kwargs['trafficControlEnabled'] + + _setter("name", name) + _setter("precedence", precedence) + _setter("service_data_flow_templates", service_data_flow_templates) if qos_policy is not None: - pulumi.set(__self__, "qos_policy", qos_policy) + _setter("qos_policy", qos_policy) if traffic_control_enabled is not None: - pulumi.set(__self__, "traffic_control_enabled", traffic_control_enabled) + _setter("traffic_control_enabled", traffic_control_enabled) @property @pulumi.getter @@ -515,16 +663,53 @@ def __init__(__self__, *, :param str preemption_capability: The Preemption Capability of a QoS Flow controls whether it can preempt another QoS Flow with a lower priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. Possible values are `NotPreempt` and `MayPreempt`, Defaults to `NotPreempt`. :param str preemption_vulnerability: The Preemption Vulnerability of a QoS Flow controls whether it can be preempted by QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. Possible values are `NotPreemptable` and `Preemptable`. Defaults to `Preemptable`. """ - pulumi.set(__self__, "maximum_bit_rate", maximum_bit_rate) - pulumi.set(__self__, "qos_indicator", qos_indicator) + NetworkServicePccRuleQosPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + maximum_bit_rate=maximum_bit_rate, + qos_indicator=qos_indicator, + allocation_and_retention_priority_level=allocation_and_retention_priority_level, + guaranteed_bit_rate=guaranteed_bit_rate, + preemption_capability=preemption_capability, + preemption_vulnerability=preemption_vulnerability, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + maximum_bit_rate: Optional['outputs.NetworkServicePccRuleQosPolicyMaximumBitRate'] = None, + qos_indicator: Optional[int] = None, + allocation_and_retention_priority_level: Optional[int] = None, + guaranteed_bit_rate: Optional['outputs.NetworkServicePccRuleQosPolicyGuaranteedBitRate'] = None, + preemption_capability: Optional[str] = None, + preemption_vulnerability: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maximum_bit_rate is None and 'maximumBitRate' in kwargs: + maximum_bit_rate = kwargs['maximumBitRate'] + if maximum_bit_rate is None: + raise TypeError("Missing 'maximum_bit_rate' argument") + if qos_indicator is None and 'qosIndicator' in kwargs: + qos_indicator = kwargs['qosIndicator'] + if qos_indicator is None: + raise TypeError("Missing 'qos_indicator' argument") + if allocation_and_retention_priority_level is None and 'allocationAndRetentionPriorityLevel' in kwargs: + allocation_and_retention_priority_level = kwargs['allocationAndRetentionPriorityLevel'] + if guaranteed_bit_rate is None and 'guaranteedBitRate' in kwargs: + guaranteed_bit_rate = kwargs['guaranteedBitRate'] + if preemption_capability is None and 'preemptionCapability' in kwargs: + preemption_capability = kwargs['preemptionCapability'] + if preemption_vulnerability is None and 'preemptionVulnerability' in kwargs: + preemption_vulnerability = kwargs['preemptionVulnerability'] + + _setter("maximum_bit_rate", maximum_bit_rate) + _setter("qos_indicator", qos_indicator) if allocation_and_retention_priority_level is not None: - pulumi.set(__self__, "allocation_and_retention_priority_level", allocation_and_retention_priority_level) + _setter("allocation_and_retention_priority_level", allocation_and_retention_priority_level) if guaranteed_bit_rate is not None: - pulumi.set(__self__, "guaranteed_bit_rate", guaranteed_bit_rate) + _setter("guaranteed_bit_rate", guaranteed_bit_rate) if preemption_capability is not None: - pulumi.set(__self__, "preemption_capability", preemption_capability) + _setter("preemption_capability", preemption_capability) if preemption_vulnerability is not None: - pulumi.set(__self__, "preemption_vulnerability", preemption_vulnerability) + _setter("preemption_vulnerability", preemption_vulnerability) @property @pulumi.getter(name="maximumBitRate") @@ -584,8 +769,25 @@ def __init__(__self__, *, :param str downlink: Downlink bit rate. Must be a number followed by `Kbps`, `Mbps`, `Gbps` or `Tbps`. :param str uplink: Uplink bit rate. Must be a number followed by `Kbps`, `Mbps`, `Gbps` or `Tbps`. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + NetworkServicePccRuleQosPolicyGuaranteedBitRate._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[str] = None, + uplink: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -613,8 +815,25 @@ def __init__(__self__, *, :param str downlink: Downlink bit rate. Must be a number followed by `bps`, `Kbps`, `Mbps`, `Gbps` or `Tbps`. :param str uplink: Uplink bit rate. Must be a number followed by `bps`, `Kbps`, `Mbps`, `Gbps` or `Tbps`. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + NetworkServicePccRuleQosPolicyMaximumBitRate._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[str] = None, + uplink: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -665,12 +884,41 @@ def __init__(__self__, *, :param Sequence[str] remote_ip_lists: Specifies the remote IP address(es) to which UEs will connect for this flow. If you want to allow connections on any IP address, use the value `any`. Otherwise, you must provide each of the remote IP addresses to which the packet core instance will connect for this flow. You must provide each IP address in CIDR notation, including the netmask (for example, `192.0.2.54/24`). :param Sequence[str] ports: The port(s) to which UEs will connect for this flow. You can specify zero or more ports or port ranges. If you specify one or more ports or port ranges then you must specify a value other than `ip` in the `protocol` field. If it is not specified then connections will be allowed on all ports. Port ranges must be specified as -. For example: [`8080`, `8082-8085`]. """ - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocols", protocols) - pulumi.set(__self__, "remote_ip_lists", remote_ip_lists) + NetworkServicePccRuleServiceDataFlowTemplate._configure( + lambda key, value: pulumi.set(__self__, key, value), + direction=direction, + name=name, + protocols=protocols, + remote_ip_lists=remote_ip_lists, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + direction: Optional[str] = None, + name: Optional[str] = None, + protocols: Optional[Sequence[str]] = None, + remote_ip_lists: Optional[Sequence[str]] = None, + ports: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if remote_ip_lists is None and 'remoteIpLists' in kwargs: + remote_ip_lists = kwargs['remoteIpLists'] + if remote_ip_lists is None: + raise TypeError("Missing 'remote_ip_lists' argument") + + _setter("direction", direction) + _setter("name", name) + _setter("protocols", protocols) + _setter("remote_ip_lists", remote_ip_lists) if ports is not None: - pulumi.set(__self__, "ports", ports) + _setter("ports", ports) @property @pulumi.getter @@ -753,15 +1001,46 @@ def __init__(__self__, *, :param str preemption_vulnerability: The Preemption Vulnerability of a QoS Flow controls whether it can be preempted by QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. Possible values are `NotPreemptable` and `Preemptable`. Defaults to `Preemptable`. :param int qos_indicator: The QoS Indicator (5QI for 5G network /QCI for 4G net work) value identifies a set of QoS characteristics that control QoS forwarding treatment for QoS flows or EPS bearers. Recommended values: 5-9; 69-70; 79-80. Must be between `1` and `127`. Defaults to `9`. """ - pulumi.set(__self__, "maximum_bit_rate", maximum_bit_rate) + NetworkServiceServiceQosPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + maximum_bit_rate=maximum_bit_rate, + allocation_and_retention_priority_level=allocation_and_retention_priority_level, + preemption_capability=preemption_capability, + preemption_vulnerability=preemption_vulnerability, + qos_indicator=qos_indicator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + maximum_bit_rate: Optional['outputs.NetworkServiceServiceQosPolicyMaximumBitRate'] = None, + allocation_and_retention_priority_level: Optional[int] = None, + preemption_capability: Optional[str] = None, + preemption_vulnerability: Optional[str] = None, + qos_indicator: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maximum_bit_rate is None and 'maximumBitRate' in kwargs: + maximum_bit_rate = kwargs['maximumBitRate'] + if maximum_bit_rate is None: + raise TypeError("Missing 'maximum_bit_rate' argument") + if allocation_and_retention_priority_level is None and 'allocationAndRetentionPriorityLevel' in kwargs: + allocation_and_retention_priority_level = kwargs['allocationAndRetentionPriorityLevel'] + if preemption_capability is None and 'preemptionCapability' in kwargs: + preemption_capability = kwargs['preemptionCapability'] + if preemption_vulnerability is None and 'preemptionVulnerability' in kwargs: + preemption_vulnerability = kwargs['preemptionVulnerability'] + if qos_indicator is None and 'qosIndicator' in kwargs: + qos_indicator = kwargs['qosIndicator'] + + _setter("maximum_bit_rate", maximum_bit_rate) if allocation_and_retention_priority_level is not None: - pulumi.set(__self__, "allocation_and_retention_priority_level", allocation_and_retention_priority_level) + _setter("allocation_and_retention_priority_level", allocation_and_retention_priority_level) if preemption_capability is not None: - pulumi.set(__self__, "preemption_capability", preemption_capability) + _setter("preemption_capability", preemption_capability) if preemption_vulnerability is not None: - pulumi.set(__self__, "preemption_vulnerability", preemption_vulnerability) + _setter("preemption_vulnerability", preemption_vulnerability) if qos_indicator is not None: - pulumi.set(__self__, "qos_indicator", qos_indicator) + _setter("qos_indicator", qos_indicator) @property @pulumi.getter(name="maximumBitRate") @@ -813,8 +1092,25 @@ def __init__(__self__, *, :param str downlink: Downlink bit rate. Must be a number followed by `bps`, `Kbps`, `Mbps`, `Gbps` or `Tbps`. :param str uplink: Uplink bit rate. Must be a number followed by `bps`, `Kbps`, `Mbps`, `Gbps` or `Tbps`. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + NetworkServiceServiceQosPolicyMaximumBitRate._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[str] = None, + uplink: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -859,8 +1155,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: A list of IDs for User Assigned Managed Identity resources to be assigned. :param str type: Specifies the type of Managed Service Identity. Possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + NetworkSimGroupIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -911,9 +1226,36 @@ def __init__(__self__, *, :param str default_data_network_id: The ID of default data network to use if the user equipment does not explicitly specify it. Configuration for this object must exist in the `data_network` block. :param str slice_id: The ID of the slice that these settings apply to. """ - pulumi.set(__self__, "data_networks", data_networks) - pulumi.set(__self__, "default_data_network_id", default_data_network_id) - pulumi.set(__self__, "slice_id", slice_id) + NetworkSimPolicySlice._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_networks=data_networks, + default_data_network_id=default_data_network_id, + slice_id=slice_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_networks: Optional[Sequence['outputs.NetworkSimPolicySliceDataNetwork']] = None, + default_data_network_id: Optional[str] = None, + slice_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_networks is None and 'dataNetworks' in kwargs: + data_networks = kwargs['dataNetworks'] + if data_networks is None: + raise TypeError("Missing 'data_networks' argument") + if default_data_network_id is None and 'defaultDataNetworkId' in kwargs: + default_data_network_id = kwargs['defaultDataNetworkId'] + if default_data_network_id is None: + raise TypeError("Missing 'default_data_network_id' argument") + if slice_id is None and 'sliceId' in kwargs: + slice_id = kwargs['sliceId'] + if slice_id is None: + raise TypeError("Missing 'slice_id' argument") + + _setter("data_networks", data_networks) + _setter("default_data_network_id", default_data_network_id) + _setter("slice_id", slice_id) @property @pulumi.getter(name="dataNetworks") @@ -1000,22 +1342,79 @@ def __init__(__self__, *, :param str preemption_capability: The Preemption Capability of a QoS Flow, it controls whether it can preempt another QoS Flow with a lower priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. Possible values are `NotPreempt` and `MayPreempt`, Defaults to `NotPreempt`. :param str preemption_vulnerability: The Preemption Vulnerability of a QoS Flow, it controls whether it can be preempted by QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. Possible values are `NotPreemptable` and `Preemptable`. Defaults to `Preemptable`. """ - pulumi.set(__self__, "allowed_services_ids", allowed_services_ids) - pulumi.set(__self__, "data_network_id", data_network_id) - pulumi.set(__self__, "qos_indicator", qos_indicator) - pulumi.set(__self__, "session_aggregate_maximum_bit_rate", session_aggregate_maximum_bit_rate) + NetworkSimPolicySliceDataNetwork._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_services_ids=allowed_services_ids, + data_network_id=data_network_id, + qos_indicator=qos_indicator, + session_aggregate_maximum_bit_rate=session_aggregate_maximum_bit_rate, + additional_allowed_session_types=additional_allowed_session_types, + allocation_and_retention_priority_level=allocation_and_retention_priority_level, + default_session_type=default_session_type, + max_buffered_packets=max_buffered_packets, + preemption_capability=preemption_capability, + preemption_vulnerability=preemption_vulnerability, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_services_ids: Optional[Sequence[str]] = None, + data_network_id: Optional[str] = None, + qos_indicator: Optional[int] = None, + session_aggregate_maximum_bit_rate: Optional['outputs.NetworkSimPolicySliceDataNetworkSessionAggregateMaximumBitRate'] = None, + additional_allowed_session_types: Optional[Sequence[str]] = None, + allocation_and_retention_priority_level: Optional[int] = None, + default_session_type: Optional[str] = None, + max_buffered_packets: Optional[int] = None, + preemption_capability: Optional[str] = None, + preemption_vulnerability: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_services_ids is None and 'allowedServicesIds' in kwargs: + allowed_services_ids = kwargs['allowedServicesIds'] + if allowed_services_ids is None: + raise TypeError("Missing 'allowed_services_ids' argument") + if data_network_id is None and 'dataNetworkId' in kwargs: + data_network_id = kwargs['dataNetworkId'] + if data_network_id is None: + raise TypeError("Missing 'data_network_id' argument") + if qos_indicator is None and 'qosIndicator' in kwargs: + qos_indicator = kwargs['qosIndicator'] + if qos_indicator is None: + raise TypeError("Missing 'qos_indicator' argument") + if session_aggregate_maximum_bit_rate is None and 'sessionAggregateMaximumBitRate' in kwargs: + session_aggregate_maximum_bit_rate = kwargs['sessionAggregateMaximumBitRate'] + if session_aggregate_maximum_bit_rate is None: + raise TypeError("Missing 'session_aggregate_maximum_bit_rate' argument") + if additional_allowed_session_types is None and 'additionalAllowedSessionTypes' in kwargs: + additional_allowed_session_types = kwargs['additionalAllowedSessionTypes'] + if allocation_and_retention_priority_level is None and 'allocationAndRetentionPriorityLevel' in kwargs: + allocation_and_retention_priority_level = kwargs['allocationAndRetentionPriorityLevel'] + if default_session_type is None and 'defaultSessionType' in kwargs: + default_session_type = kwargs['defaultSessionType'] + if max_buffered_packets is None and 'maxBufferedPackets' in kwargs: + max_buffered_packets = kwargs['maxBufferedPackets'] + if preemption_capability is None and 'preemptionCapability' in kwargs: + preemption_capability = kwargs['preemptionCapability'] + if preemption_vulnerability is None and 'preemptionVulnerability' in kwargs: + preemption_vulnerability = kwargs['preemptionVulnerability'] + + _setter("allowed_services_ids", allowed_services_ids) + _setter("data_network_id", data_network_id) + _setter("qos_indicator", qos_indicator) + _setter("session_aggregate_maximum_bit_rate", session_aggregate_maximum_bit_rate) if additional_allowed_session_types is not None: - pulumi.set(__self__, "additional_allowed_session_types", additional_allowed_session_types) + _setter("additional_allowed_session_types", additional_allowed_session_types) if allocation_and_retention_priority_level is not None: - pulumi.set(__self__, "allocation_and_retention_priority_level", allocation_and_retention_priority_level) + _setter("allocation_and_retention_priority_level", allocation_and_retention_priority_level) if default_session_type is not None: - pulumi.set(__self__, "default_session_type", default_session_type) + _setter("default_session_type", default_session_type) if max_buffered_packets is not None: - pulumi.set(__self__, "max_buffered_packets", max_buffered_packets) + _setter("max_buffered_packets", max_buffered_packets) if preemption_capability is not None: - pulumi.set(__self__, "preemption_capability", preemption_capability) + _setter("preemption_capability", preemption_capability) if preemption_vulnerability is not None: - pulumi.set(__self__, "preemption_vulnerability", preemption_vulnerability) + _setter("preemption_vulnerability", preemption_vulnerability) @property @pulumi.getter(name="allowedServicesIds") @@ -1107,8 +1506,25 @@ def __init__(__self__, *, :param str downlink: Downlink bit rate. Must be a number followed by `Kbps`, `Mbps`, `Gbps` or `Tbps`. :param str uplink: Uplink bit rate. Must be a number followed by `Kbps`, `Mbps`, `Gbps` or `Tbps`. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + NetworkSimPolicySliceDataNetworkSessionAggregateMaximumBitRate._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[str] = None, + uplink: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -1136,8 +1552,25 @@ def __init__(__self__, *, :param str downlink: Downlink bit rate. Must be a number followed by `Kbps`, `Mbps`, `Gbps` or `Tbps`. :param str uplink: Uplink bit rate. Must be a number followed by `Kbps`, `Mbps`, `Gbps` or `Tbps`. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + NetworkSimPolicyUserEquipmentAggregateMaximumBitRate._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[str] = None, + uplink: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -1187,10 +1620,35 @@ def __init__(__self__, *, :param str attached_data_network_id: The ID of attached data network on which the static IP address will be used. The combination of attached data network and slice defines the network scope of the IP address. :param str static_ipv4_address: The IPv4 address assigned to the SIM at this network scope. This address must be in the userEquipmentStaticAddressPoolPrefix defined in the attached data network. """ - pulumi.set(__self__, "attached_data_network_id", attached_data_network_id) - pulumi.set(__self__, "slice_id", slice_id) + NetworkSimStaticIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + attached_data_network_id=attached_data_network_id, + slice_id=slice_id, + static_ipv4_address=static_ipv4_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + attached_data_network_id: Optional[str] = None, + slice_id: Optional[str] = None, + static_ipv4_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if attached_data_network_id is None and 'attachedDataNetworkId' in kwargs: + attached_data_network_id = kwargs['attachedDataNetworkId'] + if attached_data_network_id is None: + raise TypeError("Missing 'attached_data_network_id' argument") + if slice_id is None and 'sliceId' in kwargs: + slice_id = kwargs['sliceId'] + if slice_id is None: + raise TypeError("Missing 'slice_id' argument") + if static_ipv4_address is None and 'staticIpv4Address' in kwargs: + static_ipv4_address = kwargs['staticIpv4Address'] + + _setter("attached_data_network_id", attached_data_network_id) + _setter("slice_id", slice_id) if static_ipv4_address is not None: - pulumi.set(__self__, "static_ipv4_address", static_ipv4_address) + _setter("static_ipv4_address", static_ipv4_address) @property @pulumi.getter(name="attachedDataNetworkId") @@ -1242,9 +1700,28 @@ def __init__(__self__, *, :param int slice_service_type: Slice/service type (SST). Must be between `0` and `255`. :param str slice_differentiator: Slice differentiator (SD). Must be a 6 digit hex string. """ - pulumi.set(__self__, "slice_service_type", slice_service_type) + NetworkSliceSingleNetworkSliceSelectionAssistanceInformation._configure( + lambda key, value: pulumi.set(__self__, key, value), + slice_service_type=slice_service_type, + slice_differentiator=slice_differentiator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + slice_service_type: Optional[int] = None, + slice_differentiator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if slice_service_type is None and 'sliceServiceType' in kwargs: + slice_service_type = kwargs['sliceServiceType'] + if slice_service_type is None: + raise TypeError("Missing 'slice_service_type' argument") + if slice_differentiator is None and 'sliceDifferentiator' in kwargs: + slice_differentiator = kwargs['sliceDifferentiator'] + + _setter("slice_service_type", slice_service_type) if slice_differentiator is not None: - pulumi.set(__self__, "slice_differentiator", slice_differentiator) + _setter("slice_differentiator", slice_differentiator) @property @pulumi.getter(name="sliceServiceType") @@ -1278,14 +1755,63 @@ def __init__(__self__, *, :param int tcp_port_reuse_minimum_hold_time_in_seconds: Minimum time in seconds that will pass before a TCP port that was used by a closed pinhole can be reused. :param int udp_port_reuse_minimum_hold_time_in_seconds: Minimum time in seconds that will pass before a UDP port that was used by a closed pinhole can be reused. """ - pulumi.set(__self__, "icmp_pinhole_timeout_in_seconds", icmp_pinhole_timeout_in_seconds) - pulumi.set(__self__, "port_ranges", port_ranges) - pulumi.set(__self__, "tcp_pinhole_timeout_in_seconds", tcp_pinhole_timeout_in_seconds) - pulumi.set(__self__, "tcp_port_reuse_minimum_hold_time_in_seconds", tcp_port_reuse_minimum_hold_time_in_seconds) - pulumi.set(__self__, "udp_pinhole_timeout_in_seconds", udp_pinhole_timeout_in_seconds) - pulumi.set(__self__, "udp_port_reuse_minimum_hold_time_in_seconds", udp_port_reuse_minimum_hold_time_in_seconds) + GetNetworkAttachedDataNetworkNetworkAddressPortTranslationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + icmp_pinhole_timeout_in_seconds=icmp_pinhole_timeout_in_seconds, + port_ranges=port_ranges, + tcp_pinhole_timeout_in_seconds=tcp_pinhole_timeout_in_seconds, + tcp_port_reuse_minimum_hold_time_in_seconds=tcp_port_reuse_minimum_hold_time_in_seconds, + udp_pinhole_timeout_in_seconds=udp_pinhole_timeout_in_seconds, + udp_port_reuse_minimum_hold_time_in_seconds=udp_port_reuse_minimum_hold_time_in_seconds, + pinhole_maximum_number=pinhole_maximum_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + icmp_pinhole_timeout_in_seconds: Optional[int] = None, + port_ranges: Optional[Sequence['outputs.GetNetworkAttachedDataNetworkNetworkAddressPortTranslationPortRangeResult']] = None, + tcp_pinhole_timeout_in_seconds: Optional[int] = None, + tcp_port_reuse_minimum_hold_time_in_seconds: Optional[int] = None, + udp_pinhole_timeout_in_seconds: Optional[int] = None, + udp_port_reuse_minimum_hold_time_in_seconds: Optional[int] = None, + pinhole_maximum_number: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if icmp_pinhole_timeout_in_seconds is None and 'icmpPinholeTimeoutInSeconds' in kwargs: + icmp_pinhole_timeout_in_seconds = kwargs['icmpPinholeTimeoutInSeconds'] + if icmp_pinhole_timeout_in_seconds is None: + raise TypeError("Missing 'icmp_pinhole_timeout_in_seconds' argument") + if port_ranges is None and 'portRanges' in kwargs: + port_ranges = kwargs['portRanges'] + if port_ranges is None: + raise TypeError("Missing 'port_ranges' argument") + if tcp_pinhole_timeout_in_seconds is None and 'tcpPinholeTimeoutInSeconds' in kwargs: + tcp_pinhole_timeout_in_seconds = kwargs['tcpPinholeTimeoutInSeconds'] + if tcp_pinhole_timeout_in_seconds is None: + raise TypeError("Missing 'tcp_pinhole_timeout_in_seconds' argument") + if tcp_port_reuse_minimum_hold_time_in_seconds is None and 'tcpPortReuseMinimumHoldTimeInSeconds' in kwargs: + tcp_port_reuse_minimum_hold_time_in_seconds = kwargs['tcpPortReuseMinimumHoldTimeInSeconds'] + if tcp_port_reuse_minimum_hold_time_in_seconds is None: + raise TypeError("Missing 'tcp_port_reuse_minimum_hold_time_in_seconds' argument") + if udp_pinhole_timeout_in_seconds is None and 'udpPinholeTimeoutInSeconds' in kwargs: + udp_pinhole_timeout_in_seconds = kwargs['udpPinholeTimeoutInSeconds'] + if udp_pinhole_timeout_in_seconds is None: + raise TypeError("Missing 'udp_pinhole_timeout_in_seconds' argument") + if udp_port_reuse_minimum_hold_time_in_seconds is None and 'udpPortReuseMinimumHoldTimeInSeconds' in kwargs: + udp_port_reuse_minimum_hold_time_in_seconds = kwargs['udpPortReuseMinimumHoldTimeInSeconds'] + if udp_port_reuse_minimum_hold_time_in_seconds is None: + raise TypeError("Missing 'udp_port_reuse_minimum_hold_time_in_seconds' argument") + if pinhole_maximum_number is None and 'pinholeMaximumNumber' in kwargs: + pinhole_maximum_number = kwargs['pinholeMaximumNumber'] + + _setter("icmp_pinhole_timeout_in_seconds", icmp_pinhole_timeout_in_seconds) + _setter("port_ranges", port_ranges) + _setter("tcp_pinhole_timeout_in_seconds", tcp_pinhole_timeout_in_seconds) + _setter("tcp_port_reuse_minimum_hold_time_in_seconds", tcp_port_reuse_minimum_hold_time_in_seconds) + _setter("udp_pinhole_timeout_in_seconds", udp_pinhole_timeout_in_seconds) + _setter("udp_port_reuse_minimum_hold_time_in_seconds", udp_port_reuse_minimum_hold_time_in_seconds) if pinhole_maximum_number is not None: - pulumi.set(__self__, "pinhole_maximum_number", pinhole_maximum_number) + _setter("pinhole_maximum_number", pinhole_maximum_number) @property @pulumi.getter(name="icmpPinholeTimeoutInSeconds") @@ -1341,8 +1867,25 @@ def __init__(__self__, *, :param int maximum: The maximum port number. :param int minimum: The minimum port number. """ - pulumi.set(__self__, "maximum", maximum) - pulumi.set(__self__, "minimum", minimum) + GetNetworkAttachedDataNetworkNetworkAddressPortTranslationPortRangeResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + maximum=maximum, + minimum=minimum, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + maximum: Optional[int] = None, + minimum: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maximum is None: + raise TypeError("Missing 'maximum' argument") + if minimum is None: + raise TypeError("Missing 'minimum' argument") + + _setter("maximum", maximum) + _setter("minimum", minimum) @property @pulumi.getter @@ -1370,8 +1913,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: A list of User Assigned Managed Identity IDs assigned to this resource. :param str type: The platform type where the packet core is deployed. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + GetNetworkPacketCoreControlPlaneIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -1399,8 +1961,29 @@ def __init__(__self__, *, :param str authentication_type: How to authenticate users who access local diagnostics APIs. :param str https_server_certificate_url: The versionless certificate URL used to secure local access to packet core diagnostics over local APIs by the Kubernetes ingress. """ - pulumi.set(__self__, "authentication_type", authentication_type) - pulumi.set(__self__, "https_server_certificate_url", https_server_certificate_url) + GetNetworkPacketCoreControlPlaneLocalDiagnosticsAccessResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_type=authentication_type, + https_server_certificate_url=https_server_certificate_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_type: Optional[str] = None, + https_server_certificate_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if authentication_type is None: + raise TypeError("Missing 'authentication_type' argument") + if https_server_certificate_url is None and 'httpsServerCertificateUrl' in kwargs: + https_server_certificate_url = kwargs['httpsServerCertificateUrl'] + if https_server_certificate_url is None: + raise TypeError("Missing 'https_server_certificate_url' argument") + + _setter("authentication_type", authentication_type) + _setter("https_server_certificate_url", https_server_certificate_url) @property @pulumi.getter(name="authenticationType") @@ -1434,11 +2017,48 @@ def __init__(__self__, *, :param str stack_hci_cluster_id: The ID of Azure Stack HCI cluster where the packet core is deployed. :param str type: The platform type where the packet core is deployed. """ - pulumi.set(__self__, "arc_kubernetes_cluster_id", arc_kubernetes_cluster_id) - pulumi.set(__self__, "custom_location_id", custom_location_id) - pulumi.set(__self__, "edge_device_id", edge_device_id) - pulumi.set(__self__, "stack_hci_cluster_id", stack_hci_cluster_id) - pulumi.set(__self__, "type", type) + GetNetworkPacketCoreControlPlanePlatformResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + arc_kubernetes_cluster_id=arc_kubernetes_cluster_id, + custom_location_id=custom_location_id, + edge_device_id=edge_device_id, + stack_hci_cluster_id=stack_hci_cluster_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + arc_kubernetes_cluster_id: Optional[str] = None, + custom_location_id: Optional[str] = None, + edge_device_id: Optional[str] = None, + stack_hci_cluster_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if arc_kubernetes_cluster_id is None and 'arcKubernetesClusterId' in kwargs: + arc_kubernetes_cluster_id = kwargs['arcKubernetesClusterId'] + if arc_kubernetes_cluster_id is None: + raise TypeError("Missing 'arc_kubernetes_cluster_id' argument") + if custom_location_id is None and 'customLocationId' in kwargs: + custom_location_id = kwargs['customLocationId'] + if custom_location_id is None: + raise TypeError("Missing 'custom_location_id' argument") + if edge_device_id is None and 'edgeDeviceId' in kwargs: + edge_device_id = kwargs['edgeDeviceId'] + if edge_device_id is None: + raise TypeError("Missing 'edge_device_id' argument") + if stack_hci_cluster_id is None and 'stackHciClusterId' in kwargs: + stack_hci_cluster_id = kwargs['stackHciClusterId'] + if stack_hci_cluster_id is None: + raise TypeError("Missing 'stack_hci_cluster_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("arc_kubernetes_cluster_id", arc_kubernetes_cluster_id) + _setter("custom_location_id", custom_location_id) + _setter("edge_device_id", edge_device_id) + _setter("stack_hci_cluster_id", stack_hci_cluster_id) + _setter("type", type) @property @pulumi.getter(name="arcKubernetesClusterId") @@ -1496,11 +2116,46 @@ def __init__(__self__, *, :param Sequence['GetNetworkServicePccRuleServiceDataFlowTemplateArgs'] service_data_flow_templates: A `service_data_flow_template` block as defined below. The set of service data flow templates to use for this PCC rule. :param bool traffic_control_enabled: Determines whether flows that match this data flow policy rule are permitted. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "precedence", precedence) - pulumi.set(__self__, "qos_policies", qos_policies) - pulumi.set(__self__, "service_data_flow_templates", service_data_flow_templates) - pulumi.set(__self__, "traffic_control_enabled", traffic_control_enabled) + GetNetworkServicePccRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + precedence=precedence, + qos_policies=qos_policies, + service_data_flow_templates=service_data_flow_templates, + traffic_control_enabled=traffic_control_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + precedence: Optional[int] = None, + qos_policies: Optional[Sequence['outputs.GetNetworkServicePccRuleQosPolicyResult']] = None, + service_data_flow_templates: Optional[Sequence['outputs.GetNetworkServicePccRuleServiceDataFlowTemplateResult']] = None, + traffic_control_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if precedence is None: + raise TypeError("Missing 'precedence' argument") + if qos_policies is None and 'qosPolicies' in kwargs: + qos_policies = kwargs['qosPolicies'] + if qos_policies is None: + raise TypeError("Missing 'qos_policies' argument") + if service_data_flow_templates is None and 'serviceDataFlowTemplates' in kwargs: + service_data_flow_templates = kwargs['serviceDataFlowTemplates'] + if service_data_flow_templates is None: + raise TypeError("Missing 'service_data_flow_templates' argument") + if traffic_control_enabled is None and 'trafficControlEnabled' in kwargs: + traffic_control_enabled = kwargs['trafficControlEnabled'] + if traffic_control_enabled is None: + raise TypeError("Missing 'traffic_control_enabled' argument") + + _setter("name", name) + _setter("precedence", precedence) + _setter("qos_policies", qos_policies) + _setter("service_data_flow_templates", service_data_flow_templates) + _setter("traffic_control_enabled", traffic_control_enabled) @property @pulumi.getter @@ -1560,12 +2215,57 @@ def __init__(__self__, *, :param str preemption_vulnerability: The Preemption Vulnerability of a QoS Flow controls whether it can be preempted by QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. :param int qos_indicator: The QoS Indicator (5QI for 5G network /QCI for 4G net work) value identifies a set of QoS characteristics that control QoS forwarding treatment for QoS flows or EPS bearers. """ - pulumi.set(__self__, "allocation_and_retention_priority_level", allocation_and_retention_priority_level) - pulumi.set(__self__, "guaranteed_bit_rates", guaranteed_bit_rates) - pulumi.set(__self__, "maximum_bit_rates", maximum_bit_rates) - pulumi.set(__self__, "preemption_capability", preemption_capability) - pulumi.set(__self__, "preemption_vulnerability", preemption_vulnerability) - pulumi.set(__self__, "qos_indicator", qos_indicator) + GetNetworkServicePccRuleQosPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allocation_and_retention_priority_level=allocation_and_retention_priority_level, + guaranteed_bit_rates=guaranteed_bit_rates, + maximum_bit_rates=maximum_bit_rates, + preemption_capability=preemption_capability, + preemption_vulnerability=preemption_vulnerability, + qos_indicator=qos_indicator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allocation_and_retention_priority_level: Optional[int] = None, + guaranteed_bit_rates: Optional[Sequence['outputs.GetNetworkServicePccRuleQosPolicyGuaranteedBitRateResult']] = None, + maximum_bit_rates: Optional[Sequence['outputs.GetNetworkServicePccRuleQosPolicyMaximumBitRateResult']] = None, + preemption_capability: Optional[str] = None, + preemption_vulnerability: Optional[str] = None, + qos_indicator: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allocation_and_retention_priority_level is None and 'allocationAndRetentionPriorityLevel' in kwargs: + allocation_and_retention_priority_level = kwargs['allocationAndRetentionPriorityLevel'] + if allocation_and_retention_priority_level is None: + raise TypeError("Missing 'allocation_and_retention_priority_level' argument") + if guaranteed_bit_rates is None and 'guaranteedBitRates' in kwargs: + guaranteed_bit_rates = kwargs['guaranteedBitRates'] + if guaranteed_bit_rates is None: + raise TypeError("Missing 'guaranteed_bit_rates' argument") + if maximum_bit_rates is None and 'maximumBitRates' in kwargs: + maximum_bit_rates = kwargs['maximumBitRates'] + if maximum_bit_rates is None: + raise TypeError("Missing 'maximum_bit_rates' argument") + if preemption_capability is None and 'preemptionCapability' in kwargs: + preemption_capability = kwargs['preemptionCapability'] + if preemption_capability is None: + raise TypeError("Missing 'preemption_capability' argument") + if preemption_vulnerability is None and 'preemptionVulnerability' in kwargs: + preemption_vulnerability = kwargs['preemptionVulnerability'] + if preemption_vulnerability is None: + raise TypeError("Missing 'preemption_vulnerability' argument") + if qos_indicator is None and 'qosIndicator' in kwargs: + qos_indicator = kwargs['qosIndicator'] + if qos_indicator is None: + raise TypeError("Missing 'qos_indicator' argument") + + _setter("allocation_and_retention_priority_level", allocation_and_retention_priority_level) + _setter("guaranteed_bit_rates", guaranteed_bit_rates) + _setter("maximum_bit_rates", maximum_bit_rates) + _setter("preemption_capability", preemption_capability) + _setter("preemption_vulnerability", preemption_vulnerability) + _setter("qos_indicator", qos_indicator) @property @pulumi.getter(name="allocationAndRetentionPriorityLevel") @@ -1625,8 +2325,25 @@ def __init__(__self__, *, :param str downlink: Downlink bit rate. :param str uplink: Uplink bit rate. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + GetNetworkServicePccRuleQosPolicyGuaranteedBitRateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[str] = None, + uplink: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -1654,8 +2371,25 @@ def __init__(__self__, *, :param str downlink: Downlink bit rate. :param str uplink: Uplink bit rate. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + GetNetworkServicePccRuleQosPolicyMaximumBitRateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[str] = None, + uplink: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -1689,11 +2423,42 @@ def __init__(__self__, *, :param Sequence[str] protocols: A list of the allowed protocol(s) for this flow. :param Sequence[str] remote_ip_lists: The remote IP address(es) to which UEs will connect for this flow. """ - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "ports", ports) - pulumi.set(__self__, "protocols", protocols) - pulumi.set(__self__, "remote_ip_lists", remote_ip_lists) + GetNetworkServicePccRuleServiceDataFlowTemplateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + direction=direction, + name=name, + ports=ports, + protocols=protocols, + remote_ip_lists=remote_ip_lists, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + direction: Optional[str] = None, + name: Optional[str] = None, + ports: Optional[Sequence[str]] = None, + protocols: Optional[Sequence[str]] = None, + remote_ip_lists: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if ports is None: + raise TypeError("Missing 'ports' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if remote_ip_lists is None and 'remoteIpLists' in kwargs: + remote_ip_lists = kwargs['remoteIpLists'] + if remote_ip_lists is None: + raise TypeError("Missing 'remote_ip_lists' argument") + + _setter("direction", direction) + _setter("name", name) + _setter("ports", ports) + _setter("protocols", protocols) + _setter("remote_ip_lists", remote_ip_lists) @property @pulumi.getter @@ -1751,11 +2516,50 @@ def __init__(__self__, *, :param str preemption_vulnerability: The Preemption Vulnerability of a QoS Flow controls whether it can be preempted by QoS Flow with a higher priority level. See 3GPP TS23.501 section 5.7.2.2 for a full description of the ARP parameters. :param int qos_indicator: The QoS Indicator (5QI for 5G network /QCI for 4G net work) value identifies a set of QoS characteristics that control QoS forwarding treatment for QoS flows or EPS bearers. """ - pulumi.set(__self__, "allocation_and_retention_priority_level", allocation_and_retention_priority_level) - pulumi.set(__self__, "maximum_bit_rates", maximum_bit_rates) - pulumi.set(__self__, "preemption_capability", preemption_capability) - pulumi.set(__self__, "preemption_vulnerability", preemption_vulnerability) - pulumi.set(__self__, "qos_indicator", qos_indicator) + GetNetworkServiceServiceQosPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allocation_and_retention_priority_level=allocation_and_retention_priority_level, + maximum_bit_rates=maximum_bit_rates, + preemption_capability=preemption_capability, + preemption_vulnerability=preemption_vulnerability, + qos_indicator=qos_indicator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allocation_and_retention_priority_level: Optional[int] = None, + maximum_bit_rates: Optional[Sequence['outputs.GetNetworkServiceServiceQosPolicyMaximumBitRateResult']] = None, + preemption_capability: Optional[str] = None, + preemption_vulnerability: Optional[str] = None, + qos_indicator: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allocation_and_retention_priority_level is None and 'allocationAndRetentionPriorityLevel' in kwargs: + allocation_and_retention_priority_level = kwargs['allocationAndRetentionPriorityLevel'] + if allocation_and_retention_priority_level is None: + raise TypeError("Missing 'allocation_and_retention_priority_level' argument") + if maximum_bit_rates is None and 'maximumBitRates' in kwargs: + maximum_bit_rates = kwargs['maximumBitRates'] + if maximum_bit_rates is None: + raise TypeError("Missing 'maximum_bit_rates' argument") + if preemption_capability is None and 'preemptionCapability' in kwargs: + preemption_capability = kwargs['preemptionCapability'] + if preemption_capability is None: + raise TypeError("Missing 'preemption_capability' argument") + if preemption_vulnerability is None and 'preemptionVulnerability' in kwargs: + preemption_vulnerability = kwargs['preemptionVulnerability'] + if preemption_vulnerability is None: + raise TypeError("Missing 'preemption_vulnerability' argument") + if qos_indicator is None and 'qosIndicator' in kwargs: + qos_indicator = kwargs['qosIndicator'] + if qos_indicator is None: + raise TypeError("Missing 'qos_indicator' argument") + + _setter("allocation_and_retention_priority_level", allocation_and_retention_priority_level) + _setter("maximum_bit_rates", maximum_bit_rates) + _setter("preemption_capability", preemption_capability) + _setter("preemption_vulnerability", preemption_vulnerability) + _setter("qos_indicator", qos_indicator) @property @pulumi.getter(name="allocationAndRetentionPriorityLevel") @@ -1807,8 +2611,25 @@ def __init__(__self__, *, :param str downlink: Downlink bit rate. :param str uplink: Uplink bit rate. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + GetNetworkServiceServiceQosPolicyMaximumBitRateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[str] = None, + uplink: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -1838,10 +2659,41 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: A list of User Assigned Managed Identity IDs assigned to this resource. :param str type: The type of Managed Service Identity. Possible values are `SystemAssigned`, `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetNetworkSimGroupIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -1881,9 +2733,36 @@ def __init__(__self__, *, :param str default_data_network_id: The ID of default data network to use if the UE does not explicitly specify it. :param str slice_id: The ID of the slice that these settings apply to. """ - pulumi.set(__self__, "data_networks", data_networks) - pulumi.set(__self__, "default_data_network_id", default_data_network_id) - pulumi.set(__self__, "slice_id", slice_id) + GetNetworkSimPolicySliceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_networks=data_networks, + default_data_network_id=default_data_network_id, + slice_id=slice_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_networks: Optional[Sequence['outputs.GetNetworkSimPolicySliceDataNetworkResult']] = None, + default_data_network_id: Optional[str] = None, + slice_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_networks is None and 'dataNetworks' in kwargs: + data_networks = kwargs['dataNetworks'] + if data_networks is None: + raise TypeError("Missing 'data_networks' argument") + if default_data_network_id is None and 'defaultDataNetworkId' in kwargs: + default_data_network_id = kwargs['defaultDataNetworkId'] + if default_data_network_id is None: + raise TypeError("Missing 'default_data_network_id' argument") + if slice_id is None and 'sliceId' in kwargs: + slice_id = kwargs['sliceId'] + if slice_id is None: + raise TypeError("Missing 'slice_id' argument") + + _setter("data_networks", data_networks) + _setter("default_data_network_id", default_data_network_id) + _setter("slice_id", slice_id) @property @pulumi.getter(name="dataNetworks") @@ -1935,16 +2814,85 @@ def __init__(__self__, *, :param int qos_indicator: The QoS Indicator (5QI for 5G network /QCI for 4G net work) value identifies a set of QoS characteristics that control QoS forwarding treatment for QoS flows or EPS bearers. :param Sequence['GetNetworkSimPolicySliceDataNetworkSessionAggregateMaximumBitRateArgs'] session_aggregate_maximum_bit_rates: A `session_aggregate_maximum_bit_rate` block as defined below. """ - pulumi.set(__self__, "additional_allowed_session_types", additional_allowed_session_types) - pulumi.set(__self__, "allocation_and_retention_priority_level", allocation_and_retention_priority_level) - pulumi.set(__self__, "allowed_services_ids", allowed_services_ids) - pulumi.set(__self__, "data_network_id", data_network_id) - pulumi.set(__self__, "default_session_type", default_session_type) - pulumi.set(__self__, "max_buffered_packets", max_buffered_packets) - pulumi.set(__self__, "preemption_capability", preemption_capability) - pulumi.set(__self__, "preemption_vulnerability", preemption_vulnerability) - pulumi.set(__self__, "qos_indicator", qos_indicator) - pulumi.set(__self__, "session_aggregate_maximum_bit_rates", session_aggregate_maximum_bit_rates) + GetNetworkSimPolicySliceDataNetworkResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_allowed_session_types=additional_allowed_session_types, + allocation_and_retention_priority_level=allocation_and_retention_priority_level, + allowed_services_ids=allowed_services_ids, + data_network_id=data_network_id, + default_session_type=default_session_type, + max_buffered_packets=max_buffered_packets, + preemption_capability=preemption_capability, + preemption_vulnerability=preemption_vulnerability, + qos_indicator=qos_indicator, + session_aggregate_maximum_bit_rates=session_aggregate_maximum_bit_rates, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_allowed_session_types: Optional[Sequence[str]] = None, + allocation_and_retention_priority_level: Optional[int] = None, + allowed_services_ids: Optional[Sequence[str]] = None, + data_network_id: Optional[str] = None, + default_session_type: Optional[str] = None, + max_buffered_packets: Optional[int] = None, + preemption_capability: Optional[str] = None, + preemption_vulnerability: Optional[str] = None, + qos_indicator: Optional[int] = None, + session_aggregate_maximum_bit_rates: Optional[Sequence['outputs.GetNetworkSimPolicySliceDataNetworkSessionAggregateMaximumBitRateResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_allowed_session_types is None and 'additionalAllowedSessionTypes' in kwargs: + additional_allowed_session_types = kwargs['additionalAllowedSessionTypes'] + if additional_allowed_session_types is None: + raise TypeError("Missing 'additional_allowed_session_types' argument") + if allocation_and_retention_priority_level is None and 'allocationAndRetentionPriorityLevel' in kwargs: + allocation_and_retention_priority_level = kwargs['allocationAndRetentionPriorityLevel'] + if allocation_and_retention_priority_level is None: + raise TypeError("Missing 'allocation_and_retention_priority_level' argument") + if allowed_services_ids is None and 'allowedServicesIds' in kwargs: + allowed_services_ids = kwargs['allowedServicesIds'] + if allowed_services_ids is None: + raise TypeError("Missing 'allowed_services_ids' argument") + if data_network_id is None and 'dataNetworkId' in kwargs: + data_network_id = kwargs['dataNetworkId'] + if data_network_id is None: + raise TypeError("Missing 'data_network_id' argument") + if default_session_type is None and 'defaultSessionType' in kwargs: + default_session_type = kwargs['defaultSessionType'] + if default_session_type is None: + raise TypeError("Missing 'default_session_type' argument") + if max_buffered_packets is None and 'maxBufferedPackets' in kwargs: + max_buffered_packets = kwargs['maxBufferedPackets'] + if max_buffered_packets is None: + raise TypeError("Missing 'max_buffered_packets' argument") + if preemption_capability is None and 'preemptionCapability' in kwargs: + preemption_capability = kwargs['preemptionCapability'] + if preemption_capability is None: + raise TypeError("Missing 'preemption_capability' argument") + if preemption_vulnerability is None and 'preemptionVulnerability' in kwargs: + preemption_vulnerability = kwargs['preemptionVulnerability'] + if preemption_vulnerability is None: + raise TypeError("Missing 'preemption_vulnerability' argument") + if qos_indicator is None and 'qosIndicator' in kwargs: + qos_indicator = kwargs['qosIndicator'] + if qos_indicator is None: + raise TypeError("Missing 'qos_indicator' argument") + if session_aggregate_maximum_bit_rates is None and 'sessionAggregateMaximumBitRates' in kwargs: + session_aggregate_maximum_bit_rates = kwargs['sessionAggregateMaximumBitRates'] + if session_aggregate_maximum_bit_rates is None: + raise TypeError("Missing 'session_aggregate_maximum_bit_rates' argument") + + _setter("additional_allowed_session_types", additional_allowed_session_types) + _setter("allocation_and_retention_priority_level", allocation_and_retention_priority_level) + _setter("allowed_services_ids", allowed_services_ids) + _setter("data_network_id", data_network_id) + _setter("default_session_type", default_session_type) + _setter("max_buffered_packets", max_buffered_packets) + _setter("preemption_capability", preemption_capability) + _setter("preemption_vulnerability", preemption_vulnerability) + _setter("qos_indicator", qos_indicator) + _setter("session_aggregate_maximum_bit_rates", session_aggregate_maximum_bit_rates) @property @pulumi.getter(name="additionalAllowedSessionTypes") @@ -2036,8 +2984,25 @@ def __init__(__self__, *, :param str downlink: Downlink bit rate. :param str uplink: Uplink bit rate. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + GetNetworkSimPolicySliceDataNetworkSessionAggregateMaximumBitRateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[str] = None, + uplink: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -2065,8 +3030,25 @@ def __init__(__self__, *, :param str downlink: Downlink bit rate. :param str uplink: Uplink bit rate. """ - pulumi.set(__self__, "downlink", downlink) - pulumi.set(__self__, "uplink", uplink) + GetNetworkSimPolicyUserEquipmentAggregateMaximumBitRateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + downlink=downlink, + uplink=uplink, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + downlink: Optional[str] = None, + uplink: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if downlink is None: + raise TypeError("Missing 'downlink' argument") + if uplink is None: + raise TypeError("Missing 'uplink' argument") + + _setter("downlink", downlink) + _setter("uplink", uplink) @property @pulumi.getter @@ -2095,9 +3077,36 @@ def __init__(__self__, *, :param str attached_data_network_id: The ID of attached data network on which the static. :param str static_ipv4_address: The IPv4 address assigned to the SIM at this network scope. """ - pulumi.set(__self__, "attached_data_network_id", attached_data_network_id) - pulumi.set(__self__, "slice_id", slice_id) - pulumi.set(__self__, "static_ipv4_address", static_ipv4_address) + GetNetworkSimStaticIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + attached_data_network_id=attached_data_network_id, + slice_id=slice_id, + static_ipv4_address=static_ipv4_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + attached_data_network_id: Optional[str] = None, + slice_id: Optional[str] = None, + static_ipv4_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if attached_data_network_id is None and 'attachedDataNetworkId' in kwargs: + attached_data_network_id = kwargs['attachedDataNetworkId'] + if attached_data_network_id is None: + raise TypeError("Missing 'attached_data_network_id' argument") + if slice_id is None and 'sliceId' in kwargs: + slice_id = kwargs['sliceId'] + if slice_id is None: + raise TypeError("Missing 'slice_id' argument") + if static_ipv4_address is None and 'staticIpv4Address' in kwargs: + static_ipv4_address = kwargs['staticIpv4Address'] + if static_ipv4_address is None: + raise TypeError("Missing 'static_ipv4_address' argument") + + _setter("attached_data_network_id", attached_data_network_id) + _setter("slice_id", slice_id) + _setter("static_ipv4_address", static_ipv4_address) @property @pulumi.getter(name="attachedDataNetworkId") @@ -2130,8 +3139,29 @@ def __init__(__self__, *, :param str slice_differentiator: Slice differentiator (SD). :param int slice_service_type: Slice/service type (SST). """ - pulumi.set(__self__, "slice_differentiator", slice_differentiator) - pulumi.set(__self__, "slice_service_type", slice_service_type) + GetNetworkSliceSingleNetworkSliceSelectionAssistanceInformationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + slice_differentiator=slice_differentiator, + slice_service_type=slice_service_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + slice_differentiator: Optional[str] = None, + slice_service_type: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if slice_differentiator is None and 'sliceDifferentiator' in kwargs: + slice_differentiator = kwargs['sliceDifferentiator'] + if slice_differentiator is None: + raise TypeError("Missing 'slice_differentiator' argument") + if slice_service_type is None and 'sliceServiceType' in kwargs: + slice_service_type = kwargs['sliceServiceType'] + if slice_service_type is None: + raise TypeError("Missing 'slice_service_type' argument") + + _setter("slice_differentiator", slice_differentiator) + _setter("slice_service_type", slice_service_type) @property @pulumi.getter(name="sliceDifferentiator") diff --git a/sdk/python/pulumi_azure/monitoring/_inputs.py b/sdk/python/pulumi_azure/monitoring/_inputs.py index 43135f16d3..471c97327a 100644 --- a/sdk/python/pulumi_azure/monitoring/_inputs.py +++ b/sdk/python/pulumi_azure/monitoring/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -166,8 +166,27 @@ def __init__(__self__, *, :param pulumi.Input[str] category: The log category for the Azure Active Directory Diagnostic. :param pulumi.Input['AadDiagnosticSettingEnabledLogRetentionPolicyArgs'] retention_policy: A `retention_policy` block as defined below. """ - pulumi.set(__self__, "category", category) - pulumi.set(__self__, "retention_policy", retention_policy) + AadDiagnosticSettingEnabledLogArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + retention_policy=retention_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[pulumi.Input[str]] = None, + retention_policy: Optional[pulumi.Input['AadDiagnosticSettingEnabledLogRetentionPolicyArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category is None: + raise TypeError("Missing 'category' argument") + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if retention_policy is None: + raise TypeError("Missing 'retention_policy' argument") + + _setter("category", category) + _setter("retention_policy", retention_policy) @property @pulumi.getter @@ -203,10 +222,23 @@ def __init__(__self__, *, :param pulumi.Input[int] days: The number of days for which this Retention Policy should apply. Defaults to `0`. :param pulumi.Input[bool] enabled: Is this Retention Policy enabled? Defaults to `false`. """ + AadDiagnosticSettingEnabledLogRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[pulumi.Input[int]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -244,10 +276,31 @@ def __init__(__self__, *, :param pulumi.Input['AadDiagnosticSettingLogRetentionPolicyArgs'] retention_policy: A `retention_policy` block as defined below. :param pulumi.Input[bool] enabled: Is this Diagnostic Log enabled? Defaults to `true`. """ - pulumi.set(__self__, "category", category) - pulumi.set(__self__, "retention_policy", retention_policy) + AadDiagnosticSettingLogArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + retention_policy=retention_policy, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[pulumi.Input[str]] = None, + retention_policy: Optional[pulumi.Input['AadDiagnosticSettingLogRetentionPolicyArgs']] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category is None: + raise TypeError("Missing 'category' argument") + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if retention_policy is None: + raise TypeError("Missing 'retention_policy' argument") + + _setter("category", category) + _setter("retention_policy", retention_policy) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -295,10 +348,23 @@ def __init__(__self__, *, :param pulumi.Input[int] days: The number of days for which this Retention Policy should apply. Defaults to `0`. :param pulumi.Input[bool] enabled: Is this Retention Policy enabled? Defaults to `false`. """ + AadDiagnosticSettingLogRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[pulumi.Input[int]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -336,10 +402,33 @@ def __init__(__self__, *, :param pulumi.Input[str] role_id: The arm role id. :param pulumi.Input[bool] use_common_alert_schema: Enables or disables the common alert schema. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "role_id", role_id) + ActionGroupArmRoleReceiverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + role_id=role_id, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + role_id: Optional[pulumi.Input[str]] = None, + use_common_alert_schema: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if role_id is None and 'roleId' in kwargs: + role_id = kwargs['roleId'] + if role_id is None: + raise TypeError("Missing 'role_id' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("name", name) + _setter("role_id", role_id) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter @@ -397,14 +486,61 @@ def __init__(__self__, *, :param pulumi.Input[str] webhook_resource_id: The resource id for webhook linked to this runbook. :param pulumi.Input[bool] use_common_alert_schema: Enables or disables the common alert schema. """ - pulumi.set(__self__, "automation_account_id", automation_account_id) - pulumi.set(__self__, "is_global_runbook", is_global_runbook) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "runbook_name", runbook_name) - pulumi.set(__self__, "service_uri", service_uri) - pulumi.set(__self__, "webhook_resource_id", webhook_resource_id) + ActionGroupAutomationRunbookReceiverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_id=automation_account_id, + is_global_runbook=is_global_runbook, + name=name, + runbook_name=runbook_name, + service_uri=service_uri, + webhook_resource_id=webhook_resource_id, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_id: Optional[pulumi.Input[str]] = None, + is_global_runbook: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + runbook_name: Optional[pulumi.Input[str]] = None, + service_uri: Optional[pulumi.Input[str]] = None, + webhook_resource_id: Optional[pulumi.Input[str]] = None, + use_common_alert_schema: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_id is None and 'automationAccountId' in kwargs: + automation_account_id = kwargs['automationAccountId'] + if automation_account_id is None: + raise TypeError("Missing 'automation_account_id' argument") + if is_global_runbook is None and 'isGlobalRunbook' in kwargs: + is_global_runbook = kwargs['isGlobalRunbook'] + if is_global_runbook is None: + raise TypeError("Missing 'is_global_runbook' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if runbook_name is None and 'runbookName' in kwargs: + runbook_name = kwargs['runbookName'] + if runbook_name is None: + raise TypeError("Missing 'runbook_name' argument") + if service_uri is None and 'serviceUri' in kwargs: + service_uri = kwargs['serviceUri'] + if service_uri is None: + raise TypeError("Missing 'service_uri' argument") + if webhook_resource_id is None and 'webhookResourceId' in kwargs: + webhook_resource_id = kwargs['webhookResourceId'] + if webhook_resource_id is None: + raise TypeError("Missing 'webhook_resource_id' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("automation_account_id", automation_account_id) + _setter("is_global_runbook", is_global_runbook) + _setter("name", name) + _setter("runbook_name", runbook_name) + _setter("service_uri", service_uri) + _setter("webhook_resource_id", webhook_resource_id) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter(name="automationAccountId") @@ -500,8 +636,27 @@ def __init__(__self__, *, :param pulumi.Input[str] email_address: The email address of the user signed into the mobile app who will receive push notifications from this receiver. :param pulumi.Input[str] name: The name of the Azure app push receiver. """ - pulumi.set(__self__, "email_address", email_address) - pulumi.set(__self__, "name", name) + ActionGroupAzureAppPushReceiverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_address=email_address, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_address is None and 'emailAddress' in kwargs: + email_address = kwargs['emailAddress'] + if email_address is None: + raise TypeError("Missing 'email_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("email_address", email_address) + _setter("name", name) @property @pulumi.getter(name="emailAddress") @@ -543,12 +698,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Azure Function receiver. :param pulumi.Input[bool] use_common_alert_schema: Enables or disables the common alert schema. """ - pulumi.set(__self__, "function_app_resource_id", function_app_resource_id) - pulumi.set(__self__, "function_name", function_name) - pulumi.set(__self__, "http_trigger_url", http_trigger_url) - pulumi.set(__self__, "name", name) + ActionGroupAzureFunctionReceiverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_app_resource_id=function_app_resource_id, + function_name=function_name, + http_trigger_url=http_trigger_url, + name=name, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_app_resource_id: Optional[pulumi.Input[str]] = None, + function_name: Optional[pulumi.Input[str]] = None, + http_trigger_url: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + use_common_alert_schema: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_app_resource_id is None and 'functionAppResourceId' in kwargs: + function_app_resource_id = kwargs['functionAppResourceId'] + if function_app_resource_id is None: + raise TypeError("Missing 'function_app_resource_id' argument") + if function_name is None and 'functionName' in kwargs: + function_name = kwargs['functionName'] + if function_name is None: + raise TypeError("Missing 'function_name' argument") + if http_trigger_url is None and 'httpTriggerUrl' in kwargs: + http_trigger_url = kwargs['httpTriggerUrl'] + if http_trigger_url is None: + raise TypeError("Missing 'http_trigger_url' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("function_app_resource_id", function_app_resource_id) + _setter("function_name", function_name) + _setter("http_trigger_url", http_trigger_url) + _setter("name", name) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter(name="functionAppResourceId") @@ -622,10 +812,33 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the email receiver. Names must be unique (case-insensitive) across all receivers within an action group. :param pulumi.Input[bool] use_common_alert_schema: Enables or disables the common alert schema. """ - pulumi.set(__self__, "email_address", email_address) - pulumi.set(__self__, "name", name) + ActionGroupEmailReceiverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_address=email_address, + name=name, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + use_common_alert_schema: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_address is None and 'emailAddress' in kwargs: + email_address = kwargs['emailAddress'] + if email_address is None: + raise TypeError("Missing 'email_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("email_address", email_address) + _setter("name", name) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter(name="emailAddress") @@ -685,22 +898,59 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The Tenant ID for the subscription containing this Event Hub. :param pulumi.Input[bool] use_common_alert_schema: Indicates whether to use common alert schema. """ - pulumi.set(__self__, "name", name) + ActionGroupEventHubReceiverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + event_hub_id=event_hub_id, + event_hub_name=event_hub_name, + event_hub_namespace=event_hub_namespace, + subscription_id=subscription_id, + tenant_id=tenant_id, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + event_hub_id: Optional[pulumi.Input[str]] = None, + event_hub_name: Optional[pulumi.Input[str]] = None, + event_hub_namespace: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + use_common_alert_schema: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if event_hub_id is None and 'eventHubId' in kwargs: + event_hub_id = kwargs['eventHubId'] + if event_hub_name is None and 'eventHubName' in kwargs: + event_hub_name = kwargs['eventHubName'] + if event_hub_namespace is None and 'eventHubNamespace' in kwargs: + event_hub_namespace = kwargs['eventHubNamespace'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("name", name) if event_hub_id is not None: warnings.warn("""This property is deprecated and will be removed in version 4.0 of the provider, please use 'event_hub_name' and 'event_hub_namespace' instead.""", DeprecationWarning) pulumi.log.warn("""event_hub_id is deprecated: This property is deprecated and will be removed in version 4.0 of the provider, please use 'event_hub_name' and 'event_hub_namespace' instead.""") if event_hub_id is not None: - pulumi.set(__self__, "event_hub_id", event_hub_id) + _setter("event_hub_id", event_hub_id) if event_hub_name is not None: - pulumi.set(__self__, "event_hub_name", event_hub_name) + _setter("event_hub_name", event_hub_name) if event_hub_namespace is not None: - pulumi.set(__self__, "event_hub_namespace", event_hub_namespace) + _setter("event_hub_namespace", event_hub_namespace) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter @@ -809,11 +1059,46 @@ def __init__(__self__, *, :param pulumi.Input[str] ticket_configuration: A JSON blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be part of this blob as well. :param pulumi.Input[str] workspace_id: The Azure Log Analytics workspace ID where this connection is defined. Format is `|`, for example `00000000-0000-0000-0000-000000000000|00000000-0000-0000-0000-000000000000`. """ - pulumi.set(__self__, "connection_id", connection_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "region", region) - pulumi.set(__self__, "ticket_configuration", ticket_configuration) - pulumi.set(__self__, "workspace_id", workspace_id) + ActionGroupItsmReceiverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_id=connection_id, + name=name, + region=region, + ticket_configuration=ticket_configuration, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + region: Optional[pulumi.Input[str]] = None, + ticket_configuration: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_id is None and 'connectionId' in kwargs: + connection_id = kwargs['connectionId'] + if connection_id is None: + raise TypeError("Missing 'connection_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if region is None: + raise TypeError("Missing 'region' argument") + if ticket_configuration is None and 'ticketConfiguration' in kwargs: + ticket_configuration = kwargs['ticketConfiguration'] + if ticket_configuration is None: + raise TypeError("Missing 'ticket_configuration' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + + _setter("connection_id", connection_id) + _setter("name", name) + _setter("region", region) + _setter("ticket_configuration", ticket_configuration) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="connectionId") @@ -891,11 +1176,40 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_id: The Azure resource ID of the logic app. :param pulumi.Input[bool] use_common_alert_schema: Enables or disables the common alert schema. """ - pulumi.set(__self__, "callback_url", callback_url) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "resource_id", resource_id) + ActionGroupLogicAppReceiverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + callback_url=callback_url, + name=name, + resource_id=resource_id, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + callback_url: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + use_common_alert_schema: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if callback_url is None and 'callbackUrl' in kwargs: + callback_url = kwargs['callbackUrl'] + if callback_url is None: + raise TypeError("Missing 'callback_url' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("callback_url", callback_url) + _setter("name", name) + _setter("resource_id", resource_id) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter(name="callbackUrl") @@ -957,9 +1271,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the SMS receiver. Names must be unique (case-insensitive) across all receivers within an action group. :param pulumi.Input[str] phone_number: The phone number of the SMS receiver. """ - pulumi.set(__self__, "country_code", country_code) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "phone_number", phone_number) + ActionGroupSmsReceiverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + country_code=country_code, + name=name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + country_code: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + phone_number: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if country_code is None and 'countryCode' in kwargs: + country_code = kwargs['countryCode'] + if country_code is None: + raise TypeError("Missing 'country_code' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("country_code", country_code) + _setter("name", name) + _setter("phone_number", phone_number) @property @pulumi.getter(name="countryCode") @@ -1009,9 +1348,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the voice receiver. :param pulumi.Input[str] phone_number: The phone number of the voice receiver. """ - pulumi.set(__self__, "country_code", country_code) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "phone_number", phone_number) + ActionGroupVoiceReceiverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + country_code=country_code, + name=name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + country_code: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + phone_number: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if country_code is None and 'countryCode' in kwargs: + country_code = kwargs['countryCode'] + if country_code is None: + raise TypeError("Missing 'country_code' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("country_code", country_code) + _setter("name", name) + _setter("phone_number", phone_number) @property @pulumi.getter(name="countryCode") @@ -1065,12 +1429,39 @@ def __init__(__self__, *, > **NOTE:** Before adding a secure webhook receiver by setting `aad_auth`, please read [the configuration instruction of the AAD application](https://docs.microsoft.com/azure/azure-monitor/platform/action-groups#secure-webhook). :param pulumi.Input[bool] use_common_alert_schema: Enables or disables the common alert schema. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "service_uri", service_uri) + ActionGroupWebhookReceiverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + service_uri=service_uri, + aad_auth=aad_auth, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + service_uri: Optional[pulumi.Input[str]] = None, + aad_auth: Optional[pulumi.Input['ActionGroupWebhookReceiverAadAuthArgs']] = None, + use_common_alert_schema: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if service_uri is None and 'serviceUri' in kwargs: + service_uri = kwargs['serviceUri'] + if service_uri is None: + raise TypeError("Missing 'service_uri' argument") + if aad_auth is None and 'aadAuth' in kwargs: + aad_auth = kwargs['aadAuth'] + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("name", name) + _setter("service_uri", service_uri) if aad_auth is not None: - pulumi.set(__self__, "aad_auth", aad_auth) + _setter("aad_auth", aad_auth) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter @@ -1134,11 +1525,34 @@ def __init__(__self__, *, :param pulumi.Input[str] identifier_uri: The identifier URI for AAD auth. :param pulumi.Input[str] tenant_id: The tenant id for AAD auth. """ - pulumi.set(__self__, "object_id", object_id) + ActionGroupWebhookReceiverAadAuthArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + object_id=object_id, + identifier_uri=identifier_uri, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + object_id: Optional[pulumi.Input[str]] = None, + identifier_uri: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if identifier_uri is None and 'identifierUri' in kwargs: + identifier_uri = kwargs['identifierUri'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("object_id", object_id) if identifier_uri is not None: - pulumi.set(__self__, "identifier_uri", identifier_uri) + _setter("identifier_uri", identifier_uri) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="objectId") @@ -1196,20 +1610,51 @@ def __init__(__self__, *, :param pulumi.Input['ActionRuleActionGroupConditionSeverityArgs'] severity: A `severity` block as defined below. :param pulumi.Input['ActionRuleActionGroupConditionTargetResourceTypeArgs'] target_resource_type: A `target_resource_type` block as defined below. """ + ActionRuleActionGroupConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_context=alert_context, + alert_rule_id=alert_rule_id, + description=description, + monitor=monitor, + monitor_service=monitor_service, + severity=severity, + target_resource_type=target_resource_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_context: Optional[pulumi.Input['ActionRuleActionGroupConditionAlertContextArgs']] = None, + alert_rule_id: Optional[pulumi.Input['ActionRuleActionGroupConditionAlertRuleIdArgs']] = None, + description: Optional[pulumi.Input['ActionRuleActionGroupConditionDescriptionArgs']] = None, + monitor: Optional[pulumi.Input['ActionRuleActionGroupConditionMonitorArgs']] = None, + monitor_service: Optional[pulumi.Input['ActionRuleActionGroupConditionMonitorServiceArgs']] = None, + severity: Optional[pulumi.Input['ActionRuleActionGroupConditionSeverityArgs']] = None, + target_resource_type: Optional[pulumi.Input['ActionRuleActionGroupConditionTargetResourceTypeArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_context is None and 'alertContext' in kwargs: + alert_context = kwargs['alertContext'] + if alert_rule_id is None and 'alertRuleId' in kwargs: + alert_rule_id = kwargs['alertRuleId'] + if monitor_service is None and 'monitorService' in kwargs: + monitor_service = kwargs['monitorService'] + if target_resource_type is None and 'targetResourceType' in kwargs: + target_resource_type = kwargs['targetResourceType'] + if alert_context is not None: - pulumi.set(__self__, "alert_context", alert_context) + _setter("alert_context", alert_context) if alert_rule_id is not None: - pulumi.set(__self__, "alert_rule_id", alert_rule_id) + _setter("alert_rule_id", alert_rule_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if monitor_service is not None: - pulumi.set(__self__, "monitor_service", monitor_service) + _setter("monitor_service", monitor_service) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if target_resource_type is not None: - pulumi.set(__self__, "target_resource_type", target_resource_type) + _setter("target_resource_type", target_resource_type) @property @pulumi.getter(name="alertContext") @@ -1305,8 +1750,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionAlertContextArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1342,8 +1804,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionAlertRuleIdArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1379,8 +1858,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionDescriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1416,8 +1912,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. Possible values are `Fired` and `Resolved`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionMonitorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1453,8 +1966,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. Possible values are `ActivityLog Administrative`, `ActivityLog Autoscale`, `ActivityLog Policy`, `ActivityLog Recommendation`, `ActivityLog Security`, `Application Insights`, `Azure Backup`, `Azure Stack Edge`, `Azure Stack Hub`, `Custom`, `Data Box Gateway`, `Health Platform`, `Log Alerts V2`, `Log Analytics`, `Platform`, `Resource Health`, `Smart Detector` and `VM Insights - Health`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionMonitorServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1490,8 +2020,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3`, and `Sev4`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionSeverityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1527,8 +2074,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. The values should be valid resource types. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionTargetResourceTypeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1564,8 +2128,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] resource_ids: A list of resource IDs of the given scope type which will be the target of action rule. :param pulumi.Input[str] type: Specifies the type of target scope. Possible values are `ResourceGroup` and `Resource`. """ - pulumi.set(__self__, "resource_ids", resource_ids) - pulumi.set(__self__, "type", type) + ActionRuleActionGroupScopeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_ids=resource_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_ids is None and 'resourceIds' in kwargs: + resource_ids = kwargs['resourceIds'] + if resource_ids is None: + raise TypeError("Missing 'resource_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("resource_ids", resource_ids) + _setter("type", type) @property @pulumi.getter(name="resourceIds") @@ -1611,20 +2194,51 @@ def __init__(__self__, *, :param pulumi.Input['ActionRuleSuppressionConditionSeverityArgs'] severity: A `severity` block as defined below. :param pulumi.Input['ActionRuleSuppressionConditionTargetResourceTypeArgs'] target_resource_type: A `target_resource_type` block as defined below. """ + ActionRuleSuppressionConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_context=alert_context, + alert_rule_id=alert_rule_id, + description=description, + monitor=monitor, + monitor_service=monitor_service, + severity=severity, + target_resource_type=target_resource_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_context: Optional[pulumi.Input['ActionRuleSuppressionConditionAlertContextArgs']] = None, + alert_rule_id: Optional[pulumi.Input['ActionRuleSuppressionConditionAlertRuleIdArgs']] = None, + description: Optional[pulumi.Input['ActionRuleSuppressionConditionDescriptionArgs']] = None, + monitor: Optional[pulumi.Input['ActionRuleSuppressionConditionMonitorArgs']] = None, + monitor_service: Optional[pulumi.Input['ActionRuleSuppressionConditionMonitorServiceArgs']] = None, + severity: Optional[pulumi.Input['ActionRuleSuppressionConditionSeverityArgs']] = None, + target_resource_type: Optional[pulumi.Input['ActionRuleSuppressionConditionTargetResourceTypeArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_context is None and 'alertContext' in kwargs: + alert_context = kwargs['alertContext'] + if alert_rule_id is None and 'alertRuleId' in kwargs: + alert_rule_id = kwargs['alertRuleId'] + if monitor_service is None and 'monitorService' in kwargs: + monitor_service = kwargs['monitorService'] + if target_resource_type is None and 'targetResourceType' in kwargs: + target_resource_type = kwargs['targetResourceType'] + if alert_context is not None: - pulumi.set(__self__, "alert_context", alert_context) + _setter("alert_context", alert_context) if alert_rule_id is not None: - pulumi.set(__self__, "alert_rule_id", alert_rule_id) + _setter("alert_rule_id", alert_rule_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if monitor_service is not None: - pulumi.set(__self__, "monitor_service", monitor_service) + _setter("monitor_service", monitor_service) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if target_resource_type is not None: - pulumi.set(__self__, "target_resource_type", target_resource_type) + _setter("target_resource_type", target_resource_type) @property @pulumi.getter(name="alertContext") @@ -1720,8 +2334,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionAlertContextArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1757,8 +2388,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionAlertRuleIdArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1794,8 +2442,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionDescriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1831,8 +2496,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. Possible values are `Fired` and `Resolved`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionMonitorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1868,8 +2550,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. Possible values are `ActivityLog Administrative`, `ActivityLog Autoscale`, `ActivityLog Policy`, `ActivityLog Recommendation`, `ActivityLog Security`, `Application Insights`, `Azure Backup`, `Azure Stack Edge`, `Azure Stack Hub`, `Custom`, `Data Box Gateway`, `Health Platform`, `Log Alerts V2`, `Log Analytics`, `Platform`, `Resource Health`, `Smart Detector` and `VM Insights - Health`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionMonitorServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1905,8 +2604,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3`, and `Sev4`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionSeverityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1942,8 +2658,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. The values should be valid resource types. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionTargetResourceTypeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1979,8 +2712,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] resource_ids: A list of resource IDs of the given scope type which will be the target of action rule. :param pulumi.Input[str] type: Specifies the type of target scope. Possible values are `ResourceGroup` and `Resource`. """ - pulumi.set(__self__, "resource_ids", resource_ids) - pulumi.set(__self__, "type", type) + ActionRuleSuppressionScopeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_ids=resource_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_ids is None and 'resourceIds' in kwargs: + resource_ids = kwargs['resourceIds'] + if resource_ids is None: + raise TypeError("Missing 'resource_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("resource_ids", resource_ids) + _setter("type", type) @property @pulumi.getter(name="resourceIds") @@ -2016,9 +2768,26 @@ def __init__(__self__, *, :param pulumi.Input[str] recurrence_type: Specifies the type of suppression. Possible values are `Always`, `Daily`, `Monthly`, `Once`, and `Weekly`. :param pulumi.Input['ActionRuleSuppressionSuppressionScheduleArgs'] schedule: A `schedule` block as defined below. Required if `recurrence_type` is `Daily`, `Monthly`, `Once` or `Weekly`. """ - pulumi.set(__self__, "recurrence_type", recurrence_type) + ActionRuleSuppressionSuppressionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + recurrence_type=recurrence_type, + schedule=schedule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recurrence_type: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['ActionRuleSuppressionSuppressionScheduleArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recurrence_type is None and 'recurrenceType' in kwargs: + recurrence_type = kwargs['recurrenceType'] + if recurrence_type is None: + raise TypeError("Missing 'recurrence_type' argument") + + _setter("recurrence_type", recurrence_type) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) @property @pulumi.getter(name="recurrenceType") @@ -2058,12 +2827,41 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[int]]] recurrence_monthlies: specifies the list of dayOfMonth to recurrence. Possible values are between `1` - `31`. Required if `recurrence_type` is `Monthly`. :param pulumi.Input[Sequence[pulumi.Input[str]]] recurrence_weeklies: specifies the list of dayOfWeek to recurrence. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. """ - pulumi.set(__self__, "end_date_utc", end_date_utc) - pulumi.set(__self__, "start_date_utc", start_date_utc) + ActionRuleSuppressionSuppressionScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_date_utc=end_date_utc, + start_date_utc=start_date_utc, + recurrence_monthlies=recurrence_monthlies, + recurrence_weeklies=recurrence_weeklies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_date_utc: Optional[pulumi.Input[str]] = None, + start_date_utc: Optional[pulumi.Input[str]] = None, + recurrence_monthlies: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + recurrence_weeklies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_date_utc is None and 'endDateUtc' in kwargs: + end_date_utc = kwargs['endDateUtc'] + if end_date_utc is None: + raise TypeError("Missing 'end_date_utc' argument") + if start_date_utc is None and 'startDateUtc' in kwargs: + start_date_utc = kwargs['startDateUtc'] + if start_date_utc is None: + raise TypeError("Missing 'start_date_utc' argument") + if recurrence_monthlies is None and 'recurrenceMonthlies' in kwargs: + recurrence_monthlies = kwargs['recurrenceMonthlies'] + if recurrence_weeklies is None and 'recurrenceWeeklies' in kwargs: + recurrence_weeklies = kwargs['recurrenceWeeklies'] + + _setter("end_date_utc", end_date_utc) + _setter("start_date_utc", start_date_utc) if recurrence_monthlies is not None: - pulumi.set(__self__, "recurrence_monthlies", recurrence_monthlies) + _setter("recurrence_monthlies", recurrence_monthlies) if recurrence_weeklies is not None: - pulumi.set(__self__, "recurrence_weeklies", recurrence_weeklies) + _setter("recurrence_weeklies", recurrence_weeklies) @property @pulumi.getter(name="endDateUtc") @@ -2123,9 +2921,28 @@ def __init__(__self__, *, :param pulumi.Input[str] action_group_id: The ID of the Action Group can be sourced from the `monitoring.ActionGroup` resource. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] webhook_properties: The map of custom string properties to include with the post operation. These data are appended to the webhook payload. """ - pulumi.set(__self__, "action_group_id", action_group_id) + ActivityLogAlertActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_group_id=action_group_id, + webhook_properties=webhook_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_group_id: Optional[pulumi.Input[str]] = None, + webhook_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_group_id is None and 'actionGroupId' in kwargs: + action_group_id = kwargs['actionGroupId'] + if action_group_id is None: + raise TypeError("Missing 'action_group_id' argument") + if webhook_properties is None and 'webhookProperties' in kwargs: + webhook_properties = kwargs['webhookProperties'] + + _setter("action_group_id", action_group_id) if webhook_properties is not None: - pulumi.set(__self__, "webhook_properties", webhook_properties) + _setter("webhook_properties", webhook_properties) @property @pulumi.getter(name="actionGroupId") @@ -2215,49 +3032,136 @@ def __init__(__self__, *, > **NOTE:** `sub_status` and `sub_statuses` are mutually exclusive. """ - pulumi.set(__self__, "category", category) + ActivityLogAlertCriteriaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + caller=caller, + level=level, + levels=levels, + operation_name=operation_name, + recommendation_category=recommendation_category, + recommendation_impact=recommendation_impact, + recommendation_type=recommendation_type, + resource_group=resource_group, + resource_groups=resource_groups, + resource_healths=resource_healths, + resource_id=resource_id, + resource_ids=resource_ids, + resource_provider=resource_provider, + resource_providers=resource_providers, + resource_type=resource_type, + resource_types=resource_types, + service_healths=service_healths, + status=status, + statuses=statuses, + sub_status=sub_status, + sub_statuses=sub_statuses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[pulumi.Input[str]] = None, + caller: Optional[pulumi.Input[str]] = None, + level: Optional[pulumi.Input[str]] = None, + levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operation_name: Optional[pulumi.Input[str]] = None, + recommendation_category: Optional[pulumi.Input[str]] = None, + recommendation_impact: Optional[pulumi.Input[str]] = None, + recommendation_type: Optional[pulumi.Input[str]] = None, + resource_group: Optional[pulumi.Input[str]] = None, + resource_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_healths: Optional[pulumi.Input[Sequence[pulumi.Input['ActivityLogAlertCriteriaResourceHealthArgs']]]] = None, + resource_id: Optional[pulumi.Input[str]] = None, + resource_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_provider: Optional[pulumi.Input[str]] = None, + resource_providers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_type: Optional[pulumi.Input[str]] = None, + resource_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + service_healths: Optional[pulumi.Input[Sequence[pulumi.Input['ActivityLogAlertCriteriaServiceHealthArgs']]]] = None, + status: Optional[pulumi.Input[str]] = None, + statuses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sub_status: Optional[pulumi.Input[str]] = None, + sub_statuses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category is None: + raise TypeError("Missing 'category' argument") + if operation_name is None and 'operationName' in kwargs: + operation_name = kwargs['operationName'] + if recommendation_category is None and 'recommendationCategory' in kwargs: + recommendation_category = kwargs['recommendationCategory'] + if recommendation_impact is None and 'recommendationImpact' in kwargs: + recommendation_impact = kwargs['recommendationImpact'] + if recommendation_type is None and 'recommendationType' in kwargs: + recommendation_type = kwargs['recommendationType'] + if resource_group is None and 'resourceGroup' in kwargs: + resource_group = kwargs['resourceGroup'] + if resource_groups is None and 'resourceGroups' in kwargs: + resource_groups = kwargs['resourceGroups'] + if resource_healths is None and 'resourceHealths' in kwargs: + resource_healths = kwargs['resourceHealths'] + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_ids is None and 'resourceIds' in kwargs: + resource_ids = kwargs['resourceIds'] + if resource_provider is None and 'resourceProvider' in kwargs: + resource_provider = kwargs['resourceProvider'] + if resource_providers is None and 'resourceProviders' in kwargs: + resource_providers = kwargs['resourceProviders'] + if resource_type is None and 'resourceType' in kwargs: + resource_type = kwargs['resourceType'] + if resource_types is None and 'resourceTypes' in kwargs: + resource_types = kwargs['resourceTypes'] + if service_healths is None and 'serviceHealths' in kwargs: + service_healths = kwargs['serviceHealths'] + if sub_status is None and 'subStatus' in kwargs: + sub_status = kwargs['subStatus'] + if sub_statuses is None and 'subStatuses' in kwargs: + sub_statuses = kwargs['subStatuses'] + + _setter("category", category) if caller is not None: - pulumi.set(__self__, "caller", caller) + _setter("caller", caller) if level is not None: - pulumi.set(__self__, "level", level) + _setter("level", level) if levels is not None: - pulumi.set(__self__, "levels", levels) + _setter("levels", levels) if operation_name is not None: - pulumi.set(__self__, "operation_name", operation_name) + _setter("operation_name", operation_name) if recommendation_category is not None: - pulumi.set(__self__, "recommendation_category", recommendation_category) + _setter("recommendation_category", recommendation_category) if recommendation_impact is not None: - pulumi.set(__self__, "recommendation_impact", recommendation_impact) + _setter("recommendation_impact", recommendation_impact) if recommendation_type is not None: - pulumi.set(__self__, "recommendation_type", recommendation_type) + _setter("recommendation_type", recommendation_type) if resource_group is not None: - pulumi.set(__self__, "resource_group", resource_group) + _setter("resource_group", resource_group) if resource_groups is not None: - pulumi.set(__self__, "resource_groups", resource_groups) + _setter("resource_groups", resource_groups) if resource_healths is not None: - pulumi.set(__self__, "resource_healths", resource_healths) + _setter("resource_healths", resource_healths) if resource_id is not None: - pulumi.set(__self__, "resource_id", resource_id) + _setter("resource_id", resource_id) if resource_ids is not None: - pulumi.set(__self__, "resource_ids", resource_ids) + _setter("resource_ids", resource_ids) if resource_provider is not None: - pulumi.set(__self__, "resource_provider", resource_provider) + _setter("resource_provider", resource_provider) if resource_providers is not None: - pulumi.set(__self__, "resource_providers", resource_providers) + _setter("resource_providers", resource_providers) if resource_type is not None: - pulumi.set(__self__, "resource_type", resource_type) + _setter("resource_type", resource_type) if resource_types is not None: - pulumi.set(__self__, "resource_types", resource_types) + _setter("resource_types", resource_types) if service_healths is not None: - pulumi.set(__self__, "service_healths", service_healths) + _setter("service_healths", service_healths) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if statuses is not None: - pulumi.set(__self__, "statuses", statuses) + _setter("statuses", statuses) if sub_status is not None: - pulumi.set(__self__, "sub_status", sub_status) + _setter("sub_status", sub_status) if sub_statuses is not None: - pulumi.set(__self__, "sub_statuses", sub_statuses) + _setter("sub_statuses", sub_statuses) @property @pulumi.getter @@ -2549,12 +3453,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] previouses: The previous resource health statuses that will log an alert. Possible values are `Available`, `Degraded`, `Unavailable` and `Unknown`. :param pulumi.Input[Sequence[pulumi.Input[str]]] reasons: The reason that will log an alert. Possible values are `PlatformInitiated` (such as a problem with the resource in an affected region of an Azure incident), `UserInitiated` (such as a shutdown request of a VM) and `Unknown`. """ + ActivityLogAlertCriteriaResourceHealthArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + currents=currents, + previouses=previouses, + reasons=reasons, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + currents: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + previouses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + reasons: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if currents is not None: - pulumi.set(__self__, "currents", currents) + _setter("currents", currents) if previouses is not None: - pulumi.set(__self__, "previouses", previouses) + _setter("previouses", previouses) if reasons is not None: - pulumi.set(__self__, "reasons", reasons) + _setter("reasons", reasons) @property @pulumi.getter @@ -2604,12 +3523,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] locations: Locations this alert will monitor. For example, `West Europe`. :param pulumi.Input[Sequence[pulumi.Input[str]]] services: Services this alert will monitor. For example, `Activity Logs & Alerts`, `Action Groups`. Defaults to all Services. """ + ActivityLogAlertCriteriaServiceHealthArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + events=events, + locations=locations, + services=services, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + events: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + locations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if events is not None: - pulumi.set(__self__, "events", events) + _setter("events", events) if locations is not None: - pulumi.set(__self__, "locations", locations) + _setter("locations", locations) if services is not None: - pulumi.set(__self__, "services", services) + _setter("services", services) @property @pulumi.getter @@ -2677,28 +3611,77 @@ def __init__(__self__, *, > **Note:** At least one of the `alert_context`, `alert_rule_id`, `alert_rule_name`, `description`, `monitor_condition`, `monitor_service`, `severity`, `signal_type`, `target_resource`, `target_resource_group`, `target_resource_type` must be specified. """ + AlertProcessingRuleActionGroupConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_context=alert_context, + alert_rule_id=alert_rule_id, + alert_rule_name=alert_rule_name, + description=description, + monitor_condition=monitor_condition, + monitor_service=monitor_service, + severity=severity, + signal_type=signal_type, + target_resource=target_resource, + target_resource_group=target_resource_group, + target_resource_type=target_resource_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_context: Optional[pulumi.Input['AlertProcessingRuleActionGroupConditionAlertContextArgs']] = None, + alert_rule_id: Optional[pulumi.Input['AlertProcessingRuleActionGroupConditionAlertRuleIdArgs']] = None, + alert_rule_name: Optional[pulumi.Input['AlertProcessingRuleActionGroupConditionAlertRuleNameArgs']] = None, + description: Optional[pulumi.Input['AlertProcessingRuleActionGroupConditionDescriptionArgs']] = None, + monitor_condition: Optional[pulumi.Input['AlertProcessingRuleActionGroupConditionMonitorConditionArgs']] = None, + monitor_service: Optional[pulumi.Input['AlertProcessingRuleActionGroupConditionMonitorServiceArgs']] = None, + severity: Optional[pulumi.Input['AlertProcessingRuleActionGroupConditionSeverityArgs']] = None, + signal_type: Optional[pulumi.Input['AlertProcessingRuleActionGroupConditionSignalTypeArgs']] = None, + target_resource: Optional[pulumi.Input['AlertProcessingRuleActionGroupConditionTargetResourceArgs']] = None, + target_resource_group: Optional[pulumi.Input['AlertProcessingRuleActionGroupConditionTargetResourceGroupArgs']] = None, + target_resource_type: Optional[pulumi.Input['AlertProcessingRuleActionGroupConditionTargetResourceTypeArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_context is None and 'alertContext' in kwargs: + alert_context = kwargs['alertContext'] + if alert_rule_id is None and 'alertRuleId' in kwargs: + alert_rule_id = kwargs['alertRuleId'] + if alert_rule_name is None and 'alertRuleName' in kwargs: + alert_rule_name = kwargs['alertRuleName'] + if monitor_condition is None and 'monitorCondition' in kwargs: + monitor_condition = kwargs['monitorCondition'] + if monitor_service is None and 'monitorService' in kwargs: + monitor_service = kwargs['monitorService'] + if signal_type is None and 'signalType' in kwargs: + signal_type = kwargs['signalType'] + if target_resource is None and 'targetResource' in kwargs: + target_resource = kwargs['targetResource'] + if target_resource_group is None and 'targetResourceGroup' in kwargs: + target_resource_group = kwargs['targetResourceGroup'] + if target_resource_type is None and 'targetResourceType' in kwargs: + target_resource_type = kwargs['targetResourceType'] + if alert_context is not None: - pulumi.set(__self__, "alert_context", alert_context) + _setter("alert_context", alert_context) if alert_rule_id is not None: - pulumi.set(__self__, "alert_rule_id", alert_rule_id) + _setter("alert_rule_id", alert_rule_id) if alert_rule_name is not None: - pulumi.set(__self__, "alert_rule_name", alert_rule_name) + _setter("alert_rule_name", alert_rule_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if monitor_condition is not None: - pulumi.set(__self__, "monitor_condition", monitor_condition) + _setter("monitor_condition", monitor_condition) if monitor_service is not None: - pulumi.set(__self__, "monitor_service", monitor_service) + _setter("monitor_service", monitor_service) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if signal_type is not None: - pulumi.set(__self__, "signal_type", signal_type) + _setter("signal_type", signal_type) if target_resource is not None: - pulumi.set(__self__, "target_resource", target_resource) + _setter("target_resource", target_resource) if target_resource_group is not None: - pulumi.set(__self__, "target_resource_group", target_resource_group) + _setter("target_resource_group", target_resource_group) if target_resource_type is not None: - pulumi.set(__self__, "target_resource_type", target_resource_type) + _setter("target_resource_type", target_resource_type) @property @pulumi.getter(name="alertContext") @@ -2844,8 +3827,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionAlertContextArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -2881,8 +3881,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionAlertRuleIdArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -2918,8 +3935,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionAlertRuleNameArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -2955,8 +3989,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionDescriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -2992,8 +4043,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to match for a given condition. Possible values are `Fired` and `Resolved`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionMonitorConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3029,8 +4097,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. Possible values are `ActivityLog Administrative`, `ActivityLog Autoscale`, `ActivityLog Policy`, `ActivityLog Recommendation`, `ActivityLog Security`, `Application Insights`, `Azure Backup`, `Azure Stack Edge`, `Azure Stack Hub`, `Custom`, `Data Box Gateway`, `Health Platform`, `Log Alerts V2`, `Log Analytics`, `Platform`, `Prometheus`, `Resource Health`, `Smart Detector`, and `VM Insights - Health`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionMonitorServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3066,8 +4151,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies list of values to match for a given condition. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3`, and `Sev4`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionSeverityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3103,8 +4205,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to match for a given condition. Possible values are `Metric`, `Log`, `Unknown`, and `Health`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionSignalTypeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3140,8 +4259,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. The values should be valid resource IDs. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionTargetResourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3177,8 +4313,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. The values should be valid resource group IDs. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionTargetResourceGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3214,8 +4367,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. The values should be valid resource types. (e.g. Microsoft.Compute/VirtualMachines) """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionTargetResourceTypeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3255,14 +4425,37 @@ def __init__(__self__, *, :param pulumi.Input['AlertProcessingRuleActionGroupScheduleRecurrenceArgs'] recurrence: A `recurrence` block as defined above. :param pulumi.Input[str] time_zone: The time zone (e.g. Pacific Standard time, Eastern Standard Time). Defaults to `UTC`. [possible values are defined here](https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11)). """ + AlertProcessingRuleActionGroupScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + effective_from=effective_from, + effective_until=effective_until, + recurrence=recurrence, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + effective_from: Optional[pulumi.Input[str]] = None, + effective_until: Optional[pulumi.Input[str]] = None, + recurrence: Optional[pulumi.Input['AlertProcessingRuleActionGroupScheduleRecurrenceArgs']] = None, + time_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if effective_from is None and 'effectiveFrom' in kwargs: + effective_from = kwargs['effectiveFrom'] + if effective_until is None and 'effectiveUntil' in kwargs: + effective_until = kwargs['effectiveUntil'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if effective_from is not None: - pulumi.set(__self__, "effective_from", effective_from) + _setter("effective_from", effective_from) if effective_until is not None: - pulumi.set(__self__, "effective_until", effective_until) + _setter("effective_until", effective_until) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter(name="effectiveFrom") @@ -3324,12 +4517,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['AlertProcessingRuleActionGroupScheduleRecurrenceMonthlyArgs']]] monthlies: One or more `monthly` blocks as defined above. :param pulumi.Input[Sequence[pulumi.Input['AlertProcessingRuleActionGroupScheduleRecurrenceWeeklyArgs']]] weeklies: One or more `weekly` blocks as defined below. """ + AlertProcessingRuleActionGroupScheduleRecurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dailies=dailies, + monthlies=monthlies, + weeklies=weeklies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dailies: Optional[pulumi.Input[Sequence[pulumi.Input['AlertProcessingRuleActionGroupScheduleRecurrenceDailyArgs']]]] = None, + monthlies: Optional[pulumi.Input[Sequence[pulumi.Input['AlertProcessingRuleActionGroupScheduleRecurrenceMonthlyArgs']]]] = None, + weeklies: Optional[pulumi.Input[Sequence[pulumi.Input['AlertProcessingRuleActionGroupScheduleRecurrenceWeeklyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dailies is not None: - pulumi.set(__self__, "dailies", dailies) + _setter("dailies", dailies) if monthlies is not None: - pulumi.set(__self__, "monthlies", monthlies) + _setter("monthlies", monthlies) if weeklies is not None: - pulumi.set(__self__, "weeklies", weeklies) + _setter("weeklies", weeklies) @property @pulumi.getter @@ -3377,8 +4585,29 @@ def __init__(__self__, *, :param pulumi.Input[str] end_time: Specifies the recurrence end time (H:M:S). :param pulumi.Input[str] start_time: Specifies the recurrence start time (H:M:S). """ - pulumi.set(__self__, "end_time", end_time) - pulumi.set(__self__, "start_time", start_time) + AlertProcessingRuleActionGroupScheduleRecurrenceDailyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_time=end_time, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_time: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if end_time is None: + raise TypeError("Missing 'end_time' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + + _setter("end_time", end_time) + _setter("start_time", start_time) @property @pulumi.getter(name="endTime") @@ -3416,11 +4645,34 @@ def __init__(__self__, *, :param pulumi.Input[str] end_time: Specifies the recurrence end time (H:M:S). :param pulumi.Input[str] start_time: Specifies the recurrence start time (H:M:S). """ - pulumi.set(__self__, "days_of_months", days_of_months) + AlertProcessingRuleActionGroupScheduleRecurrenceMonthlyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_months=days_of_months, + end_time=end_time, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_months: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + end_time: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_months is None and 'daysOfMonths' in kwargs: + days_of_months = kwargs['daysOfMonths'] + if days_of_months is None: + raise TypeError("Missing 'days_of_months' argument") + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("days_of_months", days_of_months) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="daysOfMonths") @@ -3470,11 +4722,34 @@ def __init__(__self__, *, :param pulumi.Input[str] end_time: Specifies the recurrence end time (H:M:S). :param pulumi.Input[str] start_time: Specifies the recurrence start time (H:M:S). """ - pulumi.set(__self__, "days_of_weeks", days_of_weeks) + AlertProcessingRuleActionGroupScheduleRecurrenceWeeklyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_weeks=days_of_weeks, + end_time=end_time, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + end_time: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if days_of_weeks is None: + raise TypeError("Missing 'days_of_weeks' argument") + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("days_of_weeks", days_of_weeks) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="daysOfWeeks") @@ -3540,28 +4815,77 @@ def __init__(__self__, *, :param pulumi.Input['AlertProcessingRuleSuppressionConditionTargetResourceGroupArgs'] target_resource_group: A `target_resource_group` block as defined below. :param pulumi.Input['AlertProcessingRuleSuppressionConditionTargetResourceTypeArgs'] target_resource_type: A `target_resource_type` block as defined below. """ + AlertProcessingRuleSuppressionConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_context=alert_context, + alert_rule_id=alert_rule_id, + alert_rule_name=alert_rule_name, + description=description, + monitor_condition=monitor_condition, + monitor_service=monitor_service, + severity=severity, + signal_type=signal_type, + target_resource=target_resource, + target_resource_group=target_resource_group, + target_resource_type=target_resource_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_context: Optional[pulumi.Input['AlertProcessingRuleSuppressionConditionAlertContextArgs']] = None, + alert_rule_id: Optional[pulumi.Input['AlertProcessingRuleSuppressionConditionAlertRuleIdArgs']] = None, + alert_rule_name: Optional[pulumi.Input['AlertProcessingRuleSuppressionConditionAlertRuleNameArgs']] = None, + description: Optional[pulumi.Input['AlertProcessingRuleSuppressionConditionDescriptionArgs']] = None, + monitor_condition: Optional[pulumi.Input['AlertProcessingRuleSuppressionConditionMonitorConditionArgs']] = None, + monitor_service: Optional[pulumi.Input['AlertProcessingRuleSuppressionConditionMonitorServiceArgs']] = None, + severity: Optional[pulumi.Input['AlertProcessingRuleSuppressionConditionSeverityArgs']] = None, + signal_type: Optional[pulumi.Input['AlertProcessingRuleSuppressionConditionSignalTypeArgs']] = None, + target_resource: Optional[pulumi.Input['AlertProcessingRuleSuppressionConditionTargetResourceArgs']] = None, + target_resource_group: Optional[pulumi.Input['AlertProcessingRuleSuppressionConditionTargetResourceGroupArgs']] = None, + target_resource_type: Optional[pulumi.Input['AlertProcessingRuleSuppressionConditionTargetResourceTypeArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_context is None and 'alertContext' in kwargs: + alert_context = kwargs['alertContext'] + if alert_rule_id is None and 'alertRuleId' in kwargs: + alert_rule_id = kwargs['alertRuleId'] + if alert_rule_name is None and 'alertRuleName' in kwargs: + alert_rule_name = kwargs['alertRuleName'] + if monitor_condition is None and 'monitorCondition' in kwargs: + monitor_condition = kwargs['monitorCondition'] + if monitor_service is None and 'monitorService' in kwargs: + monitor_service = kwargs['monitorService'] + if signal_type is None and 'signalType' in kwargs: + signal_type = kwargs['signalType'] + if target_resource is None and 'targetResource' in kwargs: + target_resource = kwargs['targetResource'] + if target_resource_group is None and 'targetResourceGroup' in kwargs: + target_resource_group = kwargs['targetResourceGroup'] + if target_resource_type is None and 'targetResourceType' in kwargs: + target_resource_type = kwargs['targetResourceType'] + if alert_context is not None: - pulumi.set(__self__, "alert_context", alert_context) + _setter("alert_context", alert_context) if alert_rule_id is not None: - pulumi.set(__self__, "alert_rule_id", alert_rule_id) + _setter("alert_rule_id", alert_rule_id) if alert_rule_name is not None: - pulumi.set(__self__, "alert_rule_name", alert_rule_name) + _setter("alert_rule_name", alert_rule_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if monitor_condition is not None: - pulumi.set(__self__, "monitor_condition", monitor_condition) + _setter("monitor_condition", monitor_condition) if monitor_service is not None: - pulumi.set(__self__, "monitor_service", monitor_service) + _setter("monitor_service", monitor_service) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if signal_type is not None: - pulumi.set(__self__, "signal_type", signal_type) + _setter("signal_type", signal_type) if target_resource is not None: - pulumi.set(__self__, "target_resource", target_resource) + _setter("target_resource", target_resource) if target_resource_group is not None: - pulumi.set(__self__, "target_resource_group", target_resource_group) + _setter("target_resource_group", target_resource_group) if target_resource_type is not None: - pulumi.set(__self__, "target_resource_type", target_resource_type) + _setter("target_resource_type", target_resource_type) @property @pulumi.getter(name="alertContext") @@ -3705,8 +5029,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionAlertContextArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3742,8 +5083,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionAlertRuleIdArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3779,8 +5137,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionAlertRuleNameArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3816,8 +5191,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionDescriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3853,8 +5245,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to match for a given condition. Possible values are `Fired` and `Resolved`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionMonitorConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3890,8 +5299,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. Possible values are `ActivityLog Administrative`, `ActivityLog Autoscale`, `ActivityLog Policy`, `ActivityLog Recommendation`, `ActivityLog Security`, `Application Insights`, `Azure Backup`, `Azure Stack Edge`, `Azure Stack Hub`, `Custom`, `Data Box Gateway`, `Health Platform`, `Log Alerts V2`, `Log Analytics`, `Platform`, `Prometheus`, `Resource Health`, `Smart Detector`, and `VM Insights - Health`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionMonitorServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3927,8 +5353,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies list of values to match for a given condition. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3`, and `Sev4`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionSeverityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3964,8 +5407,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to match for a given condition. Possible values are `Metric`, `Log`, `Unknown`, and `Health`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionSignalTypeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -4001,8 +5461,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. The values should be valid resource IDs. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionTargetResourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -4038,8 +5515,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. The values should be valid resource group IDs. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionTargetResourceGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -4075,8 +5569,25 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values to match for a given condition. The values should be valid resource types. (e.g. Microsoft.Compute/VirtualMachines) """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionTargetResourceTypeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -4116,14 +5627,37 @@ def __init__(__self__, *, :param pulumi.Input['AlertProcessingRuleSuppressionScheduleRecurrenceArgs'] recurrence: A `recurrence` block as defined above. :param pulumi.Input[str] time_zone: The time zone (e.g. Pacific Standard time, Eastern Standard Time). Defaults to `UTC`. [possible values are defined here](https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11)). """ + AlertProcessingRuleSuppressionScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + effective_from=effective_from, + effective_until=effective_until, + recurrence=recurrence, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + effective_from: Optional[pulumi.Input[str]] = None, + effective_until: Optional[pulumi.Input[str]] = None, + recurrence: Optional[pulumi.Input['AlertProcessingRuleSuppressionScheduleRecurrenceArgs']] = None, + time_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if effective_from is None and 'effectiveFrom' in kwargs: + effective_from = kwargs['effectiveFrom'] + if effective_until is None and 'effectiveUntil' in kwargs: + effective_until = kwargs['effectiveUntil'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if effective_from is not None: - pulumi.set(__self__, "effective_from", effective_from) + _setter("effective_from", effective_from) if effective_until is not None: - pulumi.set(__self__, "effective_until", effective_until) + _setter("effective_until", effective_until) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter(name="effectiveFrom") @@ -4185,12 +5719,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['AlertProcessingRuleSuppressionScheduleRecurrenceMonthlyArgs']]] monthlies: One or more `monthly` blocks as defined above. :param pulumi.Input[Sequence[pulumi.Input['AlertProcessingRuleSuppressionScheduleRecurrenceWeeklyArgs']]] weeklies: One or more `weekly` blocks as defined below. """ + AlertProcessingRuleSuppressionScheduleRecurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dailies=dailies, + monthlies=monthlies, + weeklies=weeklies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dailies: Optional[pulumi.Input[Sequence[pulumi.Input['AlertProcessingRuleSuppressionScheduleRecurrenceDailyArgs']]]] = None, + monthlies: Optional[pulumi.Input[Sequence[pulumi.Input['AlertProcessingRuleSuppressionScheduleRecurrenceMonthlyArgs']]]] = None, + weeklies: Optional[pulumi.Input[Sequence[pulumi.Input['AlertProcessingRuleSuppressionScheduleRecurrenceWeeklyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dailies is not None: - pulumi.set(__self__, "dailies", dailies) + _setter("dailies", dailies) if monthlies is not None: - pulumi.set(__self__, "monthlies", monthlies) + _setter("monthlies", monthlies) if weeklies is not None: - pulumi.set(__self__, "weeklies", weeklies) + _setter("weeklies", weeklies) @property @pulumi.getter @@ -4238,8 +5787,29 @@ def __init__(__self__, *, :param pulumi.Input[str] end_time: Specifies the recurrence end time (H:M:S). :param pulumi.Input[str] start_time: Specifies the recurrence start time (H:M:S). """ - pulumi.set(__self__, "end_time", end_time) - pulumi.set(__self__, "start_time", start_time) + AlertProcessingRuleSuppressionScheduleRecurrenceDailyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_time=end_time, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_time: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if end_time is None: + raise TypeError("Missing 'end_time' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + + _setter("end_time", end_time) + _setter("start_time", start_time) @property @pulumi.getter(name="endTime") @@ -4277,11 +5847,34 @@ def __init__(__self__, *, :param pulumi.Input[str] end_time: Specifies the recurrence end time (H:M:S). :param pulumi.Input[str] start_time: Specifies the recurrence start time (H:M:S). """ - pulumi.set(__self__, "days_of_months", days_of_months) + AlertProcessingRuleSuppressionScheduleRecurrenceMonthlyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_months=days_of_months, + end_time=end_time, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_months: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + end_time: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_months is None and 'daysOfMonths' in kwargs: + days_of_months = kwargs['daysOfMonths'] + if days_of_months is None: + raise TypeError("Missing 'days_of_months' argument") + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("days_of_months", days_of_months) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="daysOfMonths") @@ -4331,11 +5924,34 @@ def __init__(__self__, *, :param pulumi.Input[str] end_time: Specifies the recurrence end time (H:M:S). :param pulumi.Input[str] start_time: Specifies the recurrence start time (H:M:S). """ - pulumi.set(__self__, "days_of_weeks", days_of_weeks) + AlertProcessingRuleSuppressionScheduleRecurrenceWeeklyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_weeks=days_of_weeks, + end_time=end_time, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + end_time: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if days_of_weeks is None: + raise TypeError("Missing 'days_of_weeks' argument") + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("days_of_weeks", days_of_weeks) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="daysOfWeeks") @@ -4399,25 +6015,60 @@ def __init__(__self__, *, :param pulumi.Input[str] record: Specifies the recorded metrics name. :param pulumi.Input[int] severity: Specifies the severity of the alerts fired by the rule. Possible values are between 0 and 4. """ - pulumi.set(__self__, "expression", expression) + AlertPrometheusRuleGroupRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + expression=expression, + actions=actions, + alert=alert, + alert_resolution=alert_resolution, + annotations=annotations, + enabled=enabled, + for_=for_, + labels=labels, + record=record, + severity=severity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expression: Optional[pulumi.Input[str]] = None, + actions: Optional[pulumi.Input[Sequence[pulumi.Input['AlertPrometheusRuleGroupRuleActionArgs']]]] = None, + alert: Optional[pulumi.Input[str]] = None, + alert_resolution: Optional[pulumi.Input['AlertPrometheusRuleGroupRuleAlertResolutionArgs']] = None, + annotations: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + for_: Optional[pulumi.Input[str]] = None, + labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + record: Optional[pulumi.Input[str]] = None, + severity: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expression is None: + raise TypeError("Missing 'expression' argument") + if alert_resolution is None and 'alertResolution' in kwargs: + alert_resolution = kwargs['alertResolution'] + if for_ is None and 'for' in kwargs: + for_ = kwargs['for'] + + _setter("expression", expression) if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if alert is not None: - pulumi.set(__self__, "alert", alert) + _setter("alert", alert) if alert_resolution is not None: - pulumi.set(__self__, "alert_resolution", alert_resolution) + _setter("alert_resolution", alert_resolution) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if for_ is not None: - pulumi.set(__self__, "for_", for_) + _setter("for_", for_) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if record is not None: - pulumi.set(__self__, "record", record) + _setter("record", record) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) @property @pulumi.getter @@ -4551,9 +6202,28 @@ def __init__(__self__, *, > **Note:** `action_properties` can only be configured for IcM Connector Action Groups for now. Other public features will be supported in the future. """ - pulumi.set(__self__, "action_group_id", action_group_id) + AlertPrometheusRuleGroupRuleActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_group_id=action_group_id, + action_properties=action_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_group_id: Optional[pulumi.Input[str]] = None, + action_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_group_id is None and 'actionGroupId' in kwargs: + action_group_id = kwargs['actionGroupId'] + if action_group_id is None: + raise TypeError("Missing 'action_group_id' argument") + if action_properties is None and 'actionProperties' in kwargs: + action_properties = kwargs['actionProperties'] + + _setter("action_group_id", action_group_id) if action_properties is not None: - pulumi.set(__self__, "action_properties", action_properties) + _setter("action_properties", action_properties) @property @pulumi.getter(name="actionGroupId") @@ -4591,10 +6261,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] auto_resolved: Is the alert auto-resolution? Possible values are `true` and `false`. :param pulumi.Input[str] time_to_resolve: Specifies the alert auto-resolution interval, represented in ISO 8601 duration format. """ + AlertPrometheusRuleGroupRuleAlertResolutionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_resolved=auto_resolved, + time_to_resolve=time_to_resolve, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_resolved: Optional[pulumi.Input[bool]] = None, + time_to_resolve: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_resolved is None and 'autoResolved' in kwargs: + auto_resolved = kwargs['autoResolved'] + if time_to_resolve is None and 'timeToResolve' in kwargs: + time_to_resolve = kwargs['timeToResolve'] + if auto_resolved is not None: - pulumi.set(__self__, "auto_resolved", auto_resolved) + _setter("auto_resolved", auto_resolved) if time_to_resolve is not None: - pulumi.set(__self__, "time_to_resolve", time_to_resolve) + _setter("time_to_resolve", time_to_resolve) @property @pulumi.getter(name="autoResolved") @@ -4630,10 +6317,23 @@ def __init__(__self__, *, :param pulumi.Input['AutoscaleSettingNotificationEmailArgs'] email: A `email` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['AutoscaleSettingNotificationWebhookArgs']]] webhooks: One or more `webhook` blocks as defined below. """ + AutoscaleSettingNotificationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + webhooks=webhooks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input['AutoscaleSettingNotificationEmailArgs']] = None, + webhooks: Optional[pulumi.Input[Sequence[pulumi.Input['AutoscaleSettingNotificationWebhookArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if webhooks is not None: - pulumi.set(__self__, "webhooks", webhooks) + _setter("webhooks", webhooks) @property @pulumi.getter @@ -4671,12 +6371,33 @@ def __init__(__self__, *, :param pulumi.Input[bool] send_to_subscription_administrator: Should email notifications be sent to the subscription administrator? Defaults to `false`. :param pulumi.Input[bool] send_to_subscription_co_administrator: Should email notifications be sent to the subscription co-administrator? Defaults to `false`. """ + AutoscaleSettingNotificationEmailArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_emails=custom_emails, + send_to_subscription_administrator=send_to_subscription_administrator, + send_to_subscription_co_administrator=send_to_subscription_co_administrator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + send_to_subscription_administrator: Optional[pulumi.Input[bool]] = None, + send_to_subscription_co_administrator: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_emails is None and 'customEmails' in kwargs: + custom_emails = kwargs['customEmails'] + if send_to_subscription_administrator is None and 'sendToSubscriptionAdministrator' in kwargs: + send_to_subscription_administrator = kwargs['sendToSubscriptionAdministrator'] + if send_to_subscription_co_administrator is None and 'sendToSubscriptionCoAdministrator' in kwargs: + send_to_subscription_co_administrator = kwargs['sendToSubscriptionCoAdministrator'] + if custom_emails is not None: - pulumi.set(__self__, "custom_emails", custom_emails) + _setter("custom_emails", custom_emails) if send_to_subscription_administrator is not None: - pulumi.set(__self__, "send_to_subscription_administrator", send_to_subscription_administrator) + _setter("send_to_subscription_administrator", send_to_subscription_administrator) if send_to_subscription_co_administrator is not None: - pulumi.set(__self__, "send_to_subscription_co_administrator", send_to_subscription_co_administrator) + _setter("send_to_subscription_co_administrator", send_to_subscription_co_administrator) @property @pulumi.getter(name="customEmails") @@ -4724,9 +6445,26 @@ def __init__(__self__, *, :param pulumi.Input[str] service_uri: The HTTPS URI which should receive scale notifications. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] properties: A map of settings. """ - pulumi.set(__self__, "service_uri", service_uri) + AutoscaleSettingNotificationWebhookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + service_uri=service_uri, + properties=properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + service_uri: Optional[pulumi.Input[str]] = None, + properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if service_uri is None and 'serviceUri' in kwargs: + service_uri = kwargs['serviceUri'] + if service_uri is None: + raise TypeError("Missing 'service_uri' argument") + + _setter("service_uri", service_uri) if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) @property @pulumi.getter(name="serviceUri") @@ -4762,9 +6500,28 @@ def __init__(__self__, *, :param pulumi.Input[str] scale_mode: Specifies the predictive scale mode. Possible values are `Enabled` or `ForecastOnly`. :param pulumi.Input[str] look_ahead_time: Specifies the amount of time by which instances are launched in advance. It must be between `PT1M` and `PT1H` in ISO 8601 format. """ - pulumi.set(__self__, "scale_mode", scale_mode) + AutoscaleSettingPredictiveArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + scale_mode=scale_mode, + look_ahead_time=look_ahead_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + scale_mode: Optional[pulumi.Input[str]] = None, + look_ahead_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if scale_mode is None and 'scaleMode' in kwargs: + scale_mode = kwargs['scaleMode'] + if scale_mode is None: + raise TypeError("Missing 'scale_mode' argument") + if look_ahead_time is None and 'lookAheadTime' in kwargs: + look_ahead_time = kwargs['lookAheadTime'] + + _setter("scale_mode", scale_mode) if look_ahead_time is not None: - pulumi.set(__self__, "look_ahead_time", look_ahead_time) + _setter("look_ahead_time", look_ahead_time) @property @pulumi.getter(name="scaleMode") @@ -4806,14 +6563,39 @@ def __init__(__self__, *, :param pulumi.Input['AutoscaleSettingProfileRecurrenceArgs'] recurrence: A `recurrence` block as defined below. This cannot be specified if a `fixed_date` block is specified. :param pulumi.Input[Sequence[pulumi.Input['AutoscaleSettingProfileRuleArgs']]] rules: One or more (up to 10) `rule` blocks as defined below. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + AutoscaleSettingProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + fixed_date=fixed_date, + recurrence=recurrence, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input['AutoscaleSettingProfileCapacityArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + fixed_date: Optional[pulumi.Input['AutoscaleSettingProfileFixedDateArgs']] = None, + recurrence: Optional[pulumi.Input['AutoscaleSettingProfileRecurrenceArgs']] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['AutoscaleSettingProfileRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if fixed_date is None and 'fixedDate' in kwargs: + fixed_date = kwargs['fixedDate'] + + _setter("capacity", capacity) + _setter("name", name) if fixed_date is not None: - pulumi.set(__self__, "fixed_date", fixed_date) + _setter("fixed_date", fixed_date) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter @@ -4889,9 +6671,30 @@ def __init__(__self__, *, > **NOTE:** The maximum number of instances is also limited by the amount of Cores available in the subscription. :param pulumi.Input[int] minimum: The minimum number of instances for this resource. Valid values are between `0` and `1000`. """ - pulumi.set(__self__, "default", default) - pulumi.set(__self__, "maximum", maximum) - pulumi.set(__self__, "minimum", minimum) + AutoscaleSettingProfileCapacityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default=default, + maximum=maximum, + minimum=minimum, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default: Optional[pulumi.Input[int]] = None, + maximum: Optional[pulumi.Input[int]] = None, + minimum: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default is None: + raise TypeError("Missing 'default' argument") + if maximum is None: + raise TypeError("Missing 'maximum' argument") + if minimum is None: + raise TypeError("Missing 'minimum' argument") + + _setter("default", default) + _setter("maximum", maximum) + _setter("minimum", minimum) @property @pulumi.getter @@ -4943,10 +6746,29 @@ def __init__(__self__, *, :param pulumi.Input[str] start: Specifies the start date for the profile, formatted as an RFC3339 date string. :param pulumi.Input[str] timezone: The Time Zone of the `start` and `end` times. A list of [possible values can be found here](https://msdn.microsoft.com/en-us/library/azure/dn931928.aspx). Defaults to `UTC`. """ - pulumi.set(__self__, "end", end) - pulumi.set(__self__, "start", start) + AutoscaleSettingProfileFixedDateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end=end, + start=start, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end: Optional[pulumi.Input[str]] = None, + start: Optional[pulumi.Input[str]] = None, + timezone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end is None: + raise TypeError("Missing 'end' argument") + if start is None: + raise TypeError("Missing 'start' argument") + + _setter("end", end) + _setter("start", start) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) @property @pulumi.getter @@ -4998,11 +6820,34 @@ def __init__(__self__, *, :param pulumi.Input[int] minutes: A list containing a single item which specifies the Minute interval at which this recurrence should be triggered. :param pulumi.Input[str] timezone: The Time Zone used for the `hours` field. A list of [possible values can be found here](https://msdn.microsoft.com/en-us/library/azure/dn931928.aspx). Defaults to `UTC`. """ - pulumi.set(__self__, "days", days) - pulumi.set(__self__, "hours", hours) - pulumi.set(__self__, "minutes", minutes) + AutoscaleSettingProfileRecurrenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + hours=hours, + minutes=minutes, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + hours: Optional[pulumi.Input[int]] = None, + minutes: Optional[pulumi.Input[int]] = None, + timezone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + if hours is None: + raise TypeError("Missing 'hours' argument") + if minutes is None: + raise TypeError("Missing 'minutes' argument") + + _setter("days", days) + _setter("hours", hours) + _setter("minutes", minutes) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) @property @pulumi.getter @@ -5062,8 +6907,29 @@ def __init__(__self__, *, :param pulumi.Input['AutoscaleSettingProfileRuleMetricTriggerArgs'] metric_trigger: A `metric_trigger` block as defined below. :param pulumi.Input['AutoscaleSettingProfileRuleScaleActionArgs'] scale_action: A `scale_action` block as defined below. """ - pulumi.set(__self__, "metric_trigger", metric_trigger) - pulumi.set(__self__, "scale_action", scale_action) + AutoscaleSettingProfileRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + metric_trigger=metric_trigger, + scale_action=scale_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + metric_trigger: Optional[pulumi.Input['AutoscaleSettingProfileRuleMetricTriggerArgs']] = None, + scale_action: Optional[pulumi.Input['AutoscaleSettingProfileRuleScaleActionArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if metric_trigger is None and 'metricTrigger' in kwargs: + metric_trigger = kwargs['metricTrigger'] + if metric_trigger is None: + raise TypeError("Missing 'metric_trigger' argument") + if scale_action is None and 'scaleAction' in kwargs: + scale_action = kwargs['scaleAction'] + if scale_action is None: + raise TypeError("Missing 'scale_action' argument") + + _setter("metric_trigger", metric_trigger) + _setter("scale_action", scale_action) @property @pulumi.getter(name="metricTrigger") @@ -5119,20 +6985,81 @@ def __init__(__self__, *, :param pulumi.Input[bool] divide_by_instance_count: Whether to enable metric divide by instance count. :param pulumi.Input[str] metric_namespace: The namespace of the metric that defines what the rule monitors, such as `microsoft.compute/virtualmachinescalesets` for `Virtual Machine Scale Sets`. """ - pulumi.set(__self__, "metric_name", metric_name) - pulumi.set(__self__, "metric_resource_id", metric_resource_id) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "statistic", statistic) - pulumi.set(__self__, "threshold", threshold) - pulumi.set(__self__, "time_aggregation", time_aggregation) - pulumi.set(__self__, "time_grain", time_grain) - pulumi.set(__self__, "time_window", time_window) + AutoscaleSettingProfileRuleMetricTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + metric_name=metric_name, + metric_resource_id=metric_resource_id, + operator=operator, + statistic=statistic, + threshold=threshold, + time_aggregation=time_aggregation, + time_grain=time_grain, + time_window=time_window, + dimensions=dimensions, + divide_by_instance_count=divide_by_instance_count, + metric_namespace=metric_namespace, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + metric_name: Optional[pulumi.Input[str]] = None, + metric_resource_id: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + statistic: Optional[pulumi.Input[str]] = None, + threshold: Optional[pulumi.Input[float]] = None, + time_aggregation: Optional[pulumi.Input[str]] = None, + time_grain: Optional[pulumi.Input[str]] = None, + time_window: Optional[pulumi.Input[str]] = None, + dimensions: Optional[pulumi.Input[Sequence[pulumi.Input['AutoscaleSettingProfileRuleMetricTriggerDimensionArgs']]]] = None, + divide_by_instance_count: Optional[pulumi.Input[bool]] = None, + metric_namespace: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if metric_name is None and 'metricName' in kwargs: + metric_name = kwargs['metricName'] + if metric_name is None: + raise TypeError("Missing 'metric_name' argument") + if metric_resource_id is None and 'metricResourceId' in kwargs: + metric_resource_id = kwargs['metricResourceId'] + if metric_resource_id is None: + raise TypeError("Missing 'metric_resource_id' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if statistic is None: + raise TypeError("Missing 'statistic' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if time_aggregation is None and 'timeAggregation' in kwargs: + time_aggregation = kwargs['timeAggregation'] + if time_aggregation is None: + raise TypeError("Missing 'time_aggregation' argument") + if time_grain is None and 'timeGrain' in kwargs: + time_grain = kwargs['timeGrain'] + if time_grain is None: + raise TypeError("Missing 'time_grain' argument") + if time_window is None and 'timeWindow' in kwargs: + time_window = kwargs['timeWindow'] + if time_window is None: + raise TypeError("Missing 'time_window' argument") + if divide_by_instance_count is None and 'divideByInstanceCount' in kwargs: + divide_by_instance_count = kwargs['divideByInstanceCount'] + if metric_namespace is None and 'metricNamespace' in kwargs: + metric_namespace = kwargs['metricNamespace'] + + _setter("metric_name", metric_name) + _setter("metric_resource_id", metric_resource_id) + _setter("operator", operator) + _setter("statistic", statistic) + _setter("threshold", threshold) + _setter("time_aggregation", time_aggregation) + _setter("time_grain", time_grain) + _setter("time_window", time_window) if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if divide_by_instance_count is not None: - pulumi.set(__self__, "divide_by_instance_count", divide_by_instance_count) + _setter("divide_by_instance_count", divide_by_instance_count) if metric_namespace is not None: - pulumi.set(__self__, "metric_namespace", metric_namespace) + _setter("metric_namespace", metric_namespace) @property @pulumi.getter(name="metricName") @@ -5280,9 +7207,30 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The dimension operator. Possible values are `Equals` and `NotEquals`. `Equals` means being equal to any of the values. `NotEquals` means being not equal to any of the values. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of dimension values. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AutoscaleSettingProfileRuleMetricTriggerDimensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -5334,10 +7282,35 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of action that should occur. Possible values are `ChangeCount`, `ExactCount`, `PercentChangeCount` and `ServiceAllowedNextValue`. :param pulumi.Input[int] value: The number of instances involved in the scaling action. """ - pulumi.set(__self__, "cooldown", cooldown) - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + AutoscaleSettingProfileRuleScaleActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cooldown=cooldown, + direction=direction, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cooldown: Optional[pulumi.Input[str]] = None, + direction: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cooldown is None: + raise TypeError("Missing 'cooldown' argument") + if direction is None: + raise TypeError("Missing 'direction' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("cooldown", cooldown) + _setter("direction", direction) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -5403,14 +7376,43 @@ def __init__(__self__, *, :param pulumi.Input[str] output_stream: The output stream of the transform. Only required if the data flow changes data to a different stream. :param pulumi.Input[str] transform_kql: The KQL query to transform stream data. """ - pulumi.set(__self__, "destinations", destinations) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataFlowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destinations=destinations, + streams=streams, + built_in_transform=built_in_transform, + output_stream=output_stream, + transform_kql=transform_kql, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destinations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + streams: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + built_in_transform: Optional[pulumi.Input[str]] = None, + output_stream: Optional[pulumi.Input[str]] = None, + transform_kql: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destinations is None: + raise TypeError("Missing 'destinations' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + if built_in_transform is None and 'builtInTransform' in kwargs: + built_in_transform = kwargs['builtInTransform'] + if output_stream is None and 'outputStream' in kwargs: + output_stream = kwargs['outputStream'] + if transform_kql is None and 'transformKql' in kwargs: + transform_kql = kwargs['transformKql'] + + _setter("destinations", destinations) + _setter("streams", streams) if built_in_transform is not None: - pulumi.set(__self__, "built_in_transform", built_in_transform) + _setter("built_in_transform", built_in_transform) if output_stream is not None: - pulumi.set(__self__, "output_stream", output_stream) + _setter("output_stream", output_stream) if transform_kql is not None: - pulumi.set(__self__, "transform_kql", transform_kql) + _setter("transform_kql", transform_kql) @property @pulumi.getter @@ -5498,26 +7500,71 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesWindowsEventLogArgs']]] windows_event_logs: One or more `windows_event_log` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesWindowsFirewallLogArgs']]] windows_firewall_logs: One or more `windows_firewall_log` blocks as defined below. """ + DataCollectionRuleDataSourcesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_import=data_import, + extensions=extensions, + iis_logs=iis_logs, + log_files=log_files, + performance_counters=performance_counters, + platform_telemetries=platform_telemetries, + prometheus_forwarders=prometheus_forwarders, + syslogs=syslogs, + windows_event_logs=windows_event_logs, + windows_firewall_logs=windows_firewall_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_import: Optional[pulumi.Input['DataCollectionRuleDataSourcesDataImportArgs']] = None, + extensions: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesExtensionArgs']]]] = None, + iis_logs: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesIisLogArgs']]]] = None, + log_files: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesLogFileArgs']]]] = None, + performance_counters: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesPerformanceCounterArgs']]]] = None, + platform_telemetries: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesPlatformTelemetryArgs']]]] = None, + prometheus_forwarders: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesPrometheusForwarderArgs']]]] = None, + syslogs: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesSyslogArgs']]]] = None, + windows_event_logs: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesWindowsEventLogArgs']]]] = None, + windows_firewall_logs: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesWindowsFirewallLogArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_import is None and 'dataImport' in kwargs: + data_import = kwargs['dataImport'] + if iis_logs is None and 'iisLogs' in kwargs: + iis_logs = kwargs['iisLogs'] + if log_files is None and 'logFiles' in kwargs: + log_files = kwargs['logFiles'] + if performance_counters is None and 'performanceCounters' in kwargs: + performance_counters = kwargs['performanceCounters'] + if platform_telemetries is None and 'platformTelemetries' in kwargs: + platform_telemetries = kwargs['platformTelemetries'] + if prometheus_forwarders is None and 'prometheusForwarders' in kwargs: + prometheus_forwarders = kwargs['prometheusForwarders'] + if windows_event_logs is None and 'windowsEventLogs' in kwargs: + windows_event_logs = kwargs['windowsEventLogs'] + if windows_firewall_logs is None and 'windowsFirewallLogs' in kwargs: + windows_firewall_logs = kwargs['windowsFirewallLogs'] + if data_import is not None: - pulumi.set(__self__, "data_import", data_import) + _setter("data_import", data_import) if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if iis_logs is not None: - pulumi.set(__self__, "iis_logs", iis_logs) + _setter("iis_logs", iis_logs) if log_files is not None: - pulumi.set(__self__, "log_files", log_files) + _setter("log_files", log_files) if performance_counters is not None: - pulumi.set(__self__, "performance_counters", performance_counters) + _setter("performance_counters", performance_counters) if platform_telemetries is not None: - pulumi.set(__self__, "platform_telemetries", platform_telemetries) + _setter("platform_telemetries", platform_telemetries) if prometheus_forwarders is not None: - pulumi.set(__self__, "prometheus_forwarders", prometheus_forwarders) + _setter("prometheus_forwarders", prometheus_forwarders) if syslogs is not None: - pulumi.set(__self__, "syslogs", syslogs) + _setter("syslogs", syslogs) if windows_event_logs is not None: - pulumi.set(__self__, "windows_event_logs", windows_event_logs) + _setter("windows_event_logs", windows_event_logs) if windows_firewall_logs is not None: - pulumi.set(__self__, "windows_firewall_logs", windows_firewall_logs) + _setter("windows_firewall_logs", windows_firewall_logs) @property @pulumi.getter(name="dataImport") @@ -5647,7 +7694,22 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesDataImportEventHubDataSourceArgs']]] event_hub_data_sources: An `event_hub_data_source` block as defined below. """ - pulumi.set(__self__, "event_hub_data_sources", event_hub_data_sources) + DataCollectionRuleDataSourcesDataImportArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_hub_data_sources=event_hub_data_sources, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_hub_data_sources: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesDataImportEventHubDataSourceArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_hub_data_sources is None and 'eventHubDataSources' in kwargs: + event_hub_data_sources = kwargs['eventHubDataSources'] + if event_hub_data_sources is None: + raise TypeError("Missing 'event_hub_data_sources' argument") + + _setter("event_hub_data_sources", event_hub_data_sources) @property @pulumi.getter(name="eventHubDataSources") @@ -5673,10 +7735,31 @@ def __init__(__self__, *, :param pulumi.Input[str] stream: The stream to collect from Event Hub. Possible value should be a custom stream name. :param pulumi.Input[str] consumer_group: The Event Hub consumer group name. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "stream", stream) + DataCollectionRuleDataSourcesDataImportEventHubDataSourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + stream=stream, + consumer_group=consumer_group, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + stream: Optional[pulumi.Input[str]] = None, + consumer_group: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if stream is None: + raise TypeError("Missing 'stream' argument") + if consumer_group is None and 'consumerGroup' in kwargs: + consumer_group = kwargs['consumerGroup'] + + _setter("name", name) + _setter("stream", stream) if consumer_group is not None: - pulumi.set(__self__, "consumer_group", consumer_group) + _setter("consumer_group", consumer_group) @property @pulumi.getter @@ -5730,13 +7813,44 @@ def __init__(__self__, *, :param pulumi.Input[str] extension_json: A JSON String which specifies the extension setting. :param pulumi.Input[Sequence[pulumi.Input[str]]] input_data_sources: Specifies a list of data sources this extension needs data from. An item should be a name of a supported data source which produces only one stream. Supported data sources type: `performance_counter`, `windows_event_log`,and `syslog`. """ - pulumi.set(__self__, "extension_name", extension_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + extension_name=extension_name, + name=name, + streams=streams, + extension_json=extension_json, + input_data_sources=input_data_sources, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + extension_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + streams: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + extension_json: Optional[pulumi.Input[str]] = None, + input_data_sources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if extension_name is None and 'extensionName' in kwargs: + extension_name = kwargs['extensionName'] + if extension_name is None: + raise TypeError("Missing 'extension_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + if extension_json is None and 'extensionJson' in kwargs: + extension_json = kwargs['extensionJson'] + if input_data_sources is None and 'inputDataSources' in kwargs: + input_data_sources = kwargs['inputDataSources'] + + _setter("extension_name", extension_name) + _setter("name", name) + _setter("streams", streams) if extension_json is not None: - pulumi.set(__self__, "extension_json", extension_json) + _setter("extension_json", extension_json) if input_data_sources is not None: - pulumi.set(__self__, "input_data_sources", input_data_sources) + _setter("input_data_sources", input_data_sources) @property @pulumi.getter(name="extensionName") @@ -5810,10 +7924,31 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible value is `Microsoft-W3CIISLog`. :param pulumi.Input[Sequence[pulumi.Input[str]]] log_directories: Specifies a list of absolute paths where the log files are located. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesIisLogArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + streams=streams, + log_directories=log_directories, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + streams: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + log_directories: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + if log_directories is None and 'logDirectories' in kwargs: + log_directories = kwargs['logDirectories'] + + _setter("name", name) + _setter("streams", streams) if log_directories is not None: - pulumi.set(__self__, "log_directories", log_directories) + _setter("log_directories", log_directories) @property @pulumi.getter @@ -5867,12 +8002,41 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible value should be custom stream names. :param pulumi.Input['DataCollectionRuleDataSourcesLogFileSettingsArgs'] settings: A `settings` block as defined below. """ - pulumi.set(__self__, "file_patterns", file_patterns) - pulumi.set(__self__, "format", format) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesLogFileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_patterns=file_patterns, + format=format, + name=name, + streams=streams, + settings=settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_patterns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + format: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + streams: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + settings: Optional[pulumi.Input['DataCollectionRuleDataSourcesLogFileSettingsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_patterns is None and 'filePatterns' in kwargs: + file_patterns = kwargs['filePatterns'] + if file_patterns is None: + raise TypeError("Missing 'file_patterns' argument") + if format is None: + raise TypeError("Missing 'format' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("file_patterns", file_patterns) + _setter("format", format) + _setter("name", name) + _setter("streams", streams) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) @property @pulumi.getter(name="filePatterns") @@ -5942,7 +8106,20 @@ def __init__(__self__, *, """ :param pulumi.Input['DataCollectionRuleDataSourcesLogFileSettingsTextArgs'] text: A `text` block as defined below. """ - pulumi.set(__self__, "text", text) + DataCollectionRuleDataSourcesLogFileSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + text=text, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + text: Optional[pulumi.Input['DataCollectionRuleDataSourcesLogFileSettingsTextArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if text is None: + raise TypeError("Missing 'text' argument") + + _setter("text", text) @property @pulumi.getter @@ -5964,7 +8141,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] record_start_timestamp_format: The timestamp format of the text log files. Possible values are `ISO 8601`, `YYYY-MM-DD HH:MM:SS`, `M/D/YYYY HH:MM:SS AM/PM`, `Mon DD, YYYY HH:MM:SS`, `yyMMdd HH:mm:ss`, `ddMMyy HH:mm:ss`, `MMM d hh:mm:ss`, `dd/MMM/yyyy:HH:mm:ss zzz`,and `yyyy-MM-ddTHH:mm:ssK`. """ - pulumi.set(__self__, "record_start_timestamp_format", record_start_timestamp_format) + DataCollectionRuleDataSourcesLogFileSettingsTextArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + record_start_timestamp_format=record_start_timestamp_format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + record_start_timestamp_format: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if record_start_timestamp_format is None and 'recordStartTimestampFormat' in kwargs: + record_start_timestamp_format = kwargs['recordStartTimestampFormat'] + if record_start_timestamp_format is None: + raise TypeError("Missing 'record_start_timestamp_format' argument") + + _setter("record_start_timestamp_format", record_start_timestamp_format) @property @pulumi.getter(name="recordStartTimestampFormat") @@ -5992,10 +8184,39 @@ def __init__(__self__, *, :param pulumi.Input[int] sampling_frequency_in_seconds: The number of seconds between consecutive counter measurements (samples). The value should be integer between `1` and `300` inclusive. `sampling_frequency_in_seconds` must be equal to `60` seconds for counters collected with `Microsoft-InsightsMetrics` stream. :param pulumi.Input[Sequence[pulumi.Input[str]]] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values include but not limited to `Microsoft-InsightsMetrics`,and `Microsoft-Perf`. """ - pulumi.set(__self__, "counter_specifiers", counter_specifiers) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "sampling_frequency_in_seconds", sampling_frequency_in_seconds) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesPerformanceCounterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + counter_specifiers=counter_specifiers, + name=name, + sampling_frequency_in_seconds=sampling_frequency_in_seconds, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + counter_specifiers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + sampling_frequency_in_seconds: Optional[pulumi.Input[int]] = None, + streams: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if counter_specifiers is None and 'counterSpecifiers' in kwargs: + counter_specifiers = kwargs['counterSpecifiers'] + if counter_specifiers is None: + raise TypeError("Missing 'counter_specifiers' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if sampling_frequency_in_seconds is None and 'samplingFrequencyInSeconds' in kwargs: + sampling_frequency_in_seconds = kwargs['samplingFrequencyInSeconds'] + if sampling_frequency_in_seconds is None: + raise TypeError("Missing 'sampling_frequency_in_seconds' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("counter_specifiers", counter_specifiers) + _setter("name", name) + _setter("sampling_frequency_in_seconds", sampling_frequency_in_seconds) + _setter("streams", streams) @property @pulumi.getter(name="counterSpecifiers") @@ -6055,8 +8276,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule. :param pulumi.Input[Sequence[pulumi.Input[str]]] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values include but not limited to `Microsoft.Cache/redis:Metrics-Group-All`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesPlatformTelemetryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + streams: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("name", name) + _setter("streams", streams) @property @pulumi.getter @@ -6094,10 +8332,31 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible value is `Microsoft-PrometheusMetrics`. :param pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesPrometheusForwarderLabelIncludeFilterArgs']]] label_include_filters: One or more `label_include_filter` blocks as defined above. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesPrometheusForwarderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + streams=streams, + label_include_filters=label_include_filters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + streams: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + label_include_filters: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataSourcesPrometheusForwarderLabelIncludeFilterArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + if label_include_filters is None and 'labelIncludeFilters' in kwargs: + label_include_filters = kwargs['labelIncludeFilters'] + + _setter("name", name) + _setter("streams", streams) if label_include_filters is not None: - pulumi.set(__self__, "label_include_filters", label_include_filters) + _setter("label_include_filters", label_include_filters) @property @pulumi.getter @@ -6145,8 +8404,25 @@ def __init__(__self__, *, :param pulumi.Input[str] label: The label of the filter. This label should be unique across all `label_include_fileter` block. Possible value is `microsoft_metrics_include_label`. :param pulumi.Input[str] value: The value of the filter. """ - pulumi.set(__self__, "label", label) - pulumi.set(__self__, "value", value) + DataCollectionRuleDataSourcesPrometheusForwarderLabelIncludeFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if label is None: + raise TypeError("Missing 'label' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("label", label) + _setter("value", value) @property @pulumi.getter @@ -6188,11 +8464,38 @@ def __init__(__self__, *, > **Note:** In 4.0 or later version of the provider, `streams` will be required. In 3.x version of provider, if `streams` is not specified in creation, it is default to `["Microsoft-Syslog"]`. if `streams` need to be modified (include change other value to the default value), it must be explicitly specified. """ - pulumi.set(__self__, "facility_names", facility_names) - pulumi.set(__self__, "log_levels", log_levels) - pulumi.set(__self__, "name", name) + DataCollectionRuleDataSourcesSyslogArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + facility_names=facility_names, + log_levels=log_levels, + name=name, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + facility_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + log_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + streams: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if facility_names is None and 'facilityNames' in kwargs: + facility_names = kwargs['facilityNames'] + if facility_names is None: + raise TypeError("Missing 'facility_names' argument") + if log_levels is None and 'logLevels' in kwargs: + log_levels = kwargs['logLevels'] + if log_levels is None: + raise TypeError("Missing 'log_levels' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("facility_names", facility_names) + _setter("log_levels", log_levels) + _setter("name", name) if streams is not None: - pulumi.set(__self__, "streams", streams) + _setter("streams", streams) @property @pulumi.getter(name="facilityNames") @@ -6256,9 +8559,32 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values include but not limited to `Microsoft-Event`,and `Microsoft-WindowsEvent`, `Microsoft-RomeDetectionEvent`, and `Microsoft-SecurityEvent`. :param pulumi.Input[Sequence[pulumi.Input[str]]] x_path_queries: Specifies a list of Windows Event Log queries in XPath expression. Please see [this document](https://learn.microsoft.com/en-us/azure/azure-monitor/agents/data-collection-rule-azure-monitor-agent?tabs=cli#filter-events-using-xpath-queries) for more information. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) - pulumi.set(__self__, "x_path_queries", x_path_queries) + DataCollectionRuleDataSourcesWindowsEventLogArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + streams=streams, + x_path_queries=x_path_queries, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + streams: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + x_path_queries: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + if x_path_queries is None and 'xPathQueries' in kwargs: + x_path_queries = kwargs['xPathQueries'] + if x_path_queries is None: + raise TypeError("Missing 'x_path_queries' argument") + + _setter("name", name) + _setter("streams", streams) + _setter("x_path_queries", x_path_queries) @property @pulumi.getter @@ -6306,8 +8632,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule. :param pulumi.Input[Sequence[pulumi.Input[str]]] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesWindowsFirewallLogArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + streams: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("name", name) + _setter("streams", streams) @property @pulumi.getter @@ -6359,22 +8702,63 @@ def __init__(__self__, *, > **NOTE** At least one of `azure_monitor_metrics`, `event_hub`, `event_hub_direct`, `log_analytics`, `monitor_account`, `storage_blob`, `storage_blob_direct`,and `storage_table_direct` blocks must be specified. """ + DataCollectionRuleDestinationsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_monitor_metrics=azure_monitor_metrics, + event_hub=event_hub, + event_hub_direct=event_hub_direct, + log_analytics=log_analytics, + monitor_accounts=monitor_accounts, + storage_blob_directs=storage_blob_directs, + storage_blobs=storage_blobs, + storage_table_directs=storage_table_directs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_monitor_metrics: Optional[pulumi.Input['DataCollectionRuleDestinationsAzureMonitorMetricsArgs']] = None, + event_hub: Optional[pulumi.Input['DataCollectionRuleDestinationsEventHubArgs']] = None, + event_hub_direct: Optional[pulumi.Input['DataCollectionRuleDestinationsEventHubDirectArgs']] = None, + log_analytics: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDestinationsLogAnalyticArgs']]]] = None, + monitor_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDestinationsMonitorAccountArgs']]]] = None, + storage_blob_directs: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDestinationsStorageBlobDirectArgs']]]] = None, + storage_blobs: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDestinationsStorageBlobArgs']]]] = None, + storage_table_directs: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDestinationsStorageTableDirectArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_monitor_metrics is None and 'azureMonitorMetrics' in kwargs: + azure_monitor_metrics = kwargs['azureMonitorMetrics'] + if event_hub is None and 'eventHub' in kwargs: + event_hub = kwargs['eventHub'] + if event_hub_direct is None and 'eventHubDirect' in kwargs: + event_hub_direct = kwargs['eventHubDirect'] + if log_analytics is None and 'logAnalytics' in kwargs: + log_analytics = kwargs['logAnalytics'] + if monitor_accounts is None and 'monitorAccounts' in kwargs: + monitor_accounts = kwargs['monitorAccounts'] + if storage_blob_directs is None and 'storageBlobDirects' in kwargs: + storage_blob_directs = kwargs['storageBlobDirects'] + if storage_blobs is None and 'storageBlobs' in kwargs: + storage_blobs = kwargs['storageBlobs'] + if storage_table_directs is None and 'storageTableDirects' in kwargs: + storage_table_directs = kwargs['storageTableDirects'] + if azure_monitor_metrics is not None: - pulumi.set(__self__, "azure_monitor_metrics", azure_monitor_metrics) + _setter("azure_monitor_metrics", azure_monitor_metrics) if event_hub is not None: - pulumi.set(__self__, "event_hub", event_hub) + _setter("event_hub", event_hub) if event_hub_direct is not None: - pulumi.set(__self__, "event_hub_direct", event_hub_direct) + _setter("event_hub_direct", event_hub_direct) if log_analytics is not None: - pulumi.set(__self__, "log_analytics", log_analytics) + _setter("log_analytics", log_analytics) if monitor_accounts is not None: - pulumi.set(__self__, "monitor_accounts", monitor_accounts) + _setter("monitor_accounts", monitor_accounts) if storage_blob_directs is not None: - pulumi.set(__self__, "storage_blob_directs", storage_blob_directs) + _setter("storage_blob_directs", storage_blob_directs) if storage_blobs is not None: - pulumi.set(__self__, "storage_blobs", storage_blobs) + _setter("storage_blobs", storage_blobs) if storage_table_directs is not None: - pulumi.set(__self__, "storage_table_directs", storage_table_directs) + _setter("storage_table_directs", storage_table_directs) @property @pulumi.getter(name="azureMonitorMetrics") @@ -6484,7 +8868,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. """ - pulumi.set(__self__, "name", name) + DataCollectionRuleDestinationsAzureMonitorMetricsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -6508,8 +8905,27 @@ def __init__(__self__, *, :param pulumi.Input[str] event_hub_id: The resource ID of the Event Hub. :param pulumi.Input[str] name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. """ - pulumi.set(__self__, "event_hub_id", event_hub_id) - pulumi.set(__self__, "name", name) + DataCollectionRuleDestinationsEventHubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_hub_id=event_hub_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_hub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_hub_id is None and 'eventHubId' in kwargs: + event_hub_id = kwargs['eventHubId'] + if event_hub_id is None: + raise TypeError("Missing 'event_hub_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("event_hub_id", event_hub_id) + _setter("name", name) @property @pulumi.getter(name="eventHubId") @@ -6545,8 +8961,27 @@ def __init__(__self__, *, :param pulumi.Input[str] event_hub_id: The resource ID of the Event Hub. :param pulumi.Input[str] name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. """ - pulumi.set(__self__, "event_hub_id", event_hub_id) - pulumi.set(__self__, "name", name) + DataCollectionRuleDestinationsEventHubDirectArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_hub_id=event_hub_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_hub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_hub_id is None and 'eventHubId' in kwargs: + event_hub_id = kwargs['eventHubId'] + if event_hub_id is None: + raise TypeError("Missing 'event_hub_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("event_hub_id", event_hub_id) + _setter("name", name) @property @pulumi.getter(name="eventHubId") @@ -6582,8 +9017,27 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. :param pulumi.Input[str] workspace_resource_id: The ID of a Log Analytic Workspace resource. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "workspace_resource_id", workspace_resource_id) + DataCollectionRuleDestinationsLogAnalyticArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + workspace_resource_id=workspace_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + workspace_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if workspace_resource_id is None and 'workspaceResourceId' in kwargs: + workspace_resource_id = kwargs['workspaceResourceId'] + if workspace_resource_id is None: + raise TypeError("Missing 'workspace_resource_id' argument") + + _setter("name", name) + _setter("workspace_resource_id", workspace_resource_id) @property @pulumi.getter @@ -6619,8 +9073,27 @@ def __init__(__self__, *, :param pulumi.Input[str] monitor_account_id: The resource ID of the Monitor Account. :param pulumi.Input[str] name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. """ - pulumi.set(__self__, "monitor_account_id", monitor_account_id) - pulumi.set(__self__, "name", name) + DataCollectionRuleDestinationsMonitorAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + monitor_account_id=monitor_account_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + monitor_account_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if monitor_account_id is None and 'monitorAccountId' in kwargs: + monitor_account_id = kwargs['monitorAccountId'] + if monitor_account_id is None: + raise TypeError("Missing 'monitor_account_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("monitor_account_id", monitor_account_id) + _setter("name", name) @property @pulumi.getter(name="monitorAccountId") @@ -6658,9 +9131,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. :param pulumi.Input[str] storage_account_id: The resource ID of the Storage Account. """ - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + DataCollectionRuleDestinationsStorageBlobArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + name=name, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + + _setter("container_name", container_name) + _setter("name", name) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="containerName") @@ -6710,9 +9208,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. :param pulumi.Input[str] storage_account_id: The resource ID of the Storage Account. """ - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + DataCollectionRuleDestinationsStorageBlobDirectArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + name=name, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + + _setter("container_name", container_name) + _setter("name", name) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="containerName") @@ -6762,9 +9285,34 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_id: The resource ID of the Storage Account. :param pulumi.Input[str] table_name: The Storage Table name. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "table_name", table_name) + DataCollectionRuleDestinationsStorageTableDirectArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + storage_account_id=storage_account_id, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if table_name is None: + raise TypeError("Missing 'table_name' argument") + + _setter("name", name) + _setter("storage_account_id", storage_account_id) + _setter("table_name", table_name) @property @pulumi.getter @@ -6818,13 +9366,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + DataCollectionRuleIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -6886,8 +9459,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleStreamDeclarationColumnArgs']]] columns: One or more `column` blocks as defined above. :param pulumi.Input[str] stream_name: The name of the custom stream. This name should be unique across all `stream_declaration` blocks. """ - pulumi.set(__self__, "columns", columns) - pulumi.set(__self__, "stream_name", stream_name) + DataCollectionRuleStreamDeclarationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + columns=columns, + stream_name=stream_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + columns: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleStreamDeclarationColumnArgs']]]] = None, + stream_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if columns is None: + raise TypeError("Missing 'columns' argument") + if stream_name is None and 'streamName' in kwargs: + stream_name = kwargs['streamName'] + if stream_name is None: + raise TypeError("Missing 'stream_name' argument") + + _setter("columns", columns) + _setter("stream_name", stream_name) @property @pulumi.getter @@ -6923,8 +9515,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the column. :param pulumi.Input[str] type: The type of the column data. Possible values are `string`, `int`, `long`, `real`, `boolean`, `datetime`,and `dynamic`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + DataCollectionRuleStreamDeclarationColumnArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -6970,15 +9579,34 @@ def __init__(__self__, *, !> **NOTE:** `retention_policy` has been deprecated in favor of `storage.ManagementPolicy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention). """ + DiagnosticSettingEnabledLogArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + category_group=category_group, + retention_policy=retention_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[pulumi.Input[str]] = None, + category_group: Optional[pulumi.Input[str]] = None, + retention_policy: Optional[pulumi.Input['DiagnosticSettingEnabledLogRetentionPolicyArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category_group is None and 'categoryGroup' in kwargs: + category_group = kwargs['categoryGroup'] + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if category is not None: - pulumi.set(__self__, "category", category) + _setter("category", category) if category_group is not None: - pulumi.set(__self__, "category_group", category_group) + _setter("category_group", category_group) if retention_policy is not None: warnings.warn("""`retention_policy` has been deprecated in favor of `azurerm_storage_management_policy` resource - to learn more https://aka.ms/diagnostic_settings_log_retention""", DeprecationWarning) pulumi.log.warn("""retention_policy is deprecated: `retention_policy` has been deprecated in favor of `azurerm_storage_management_policy` resource - to learn more https://aka.ms/diagnostic_settings_log_retention""") if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) @property @pulumi.getter @@ -7040,9 +9668,24 @@ def __init__(__self__, *, > **NOTE:** Setting this to `0` will retain the events indefinitely. """ - pulumi.set(__self__, "enabled", enabled) + DiagnosticSettingEnabledLogRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -7093,17 +9736,38 @@ def __init__(__self__, *, !> **NOTE:** `retention_policy` has been deprecated in favor of `storage.ManagementPolicy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention). """ + DiagnosticSettingLogArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + category_group=category_group, + enabled=enabled, + retention_policy=retention_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[pulumi.Input[str]] = None, + category_group: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + retention_policy: Optional[pulumi.Input['DiagnosticSettingLogRetentionPolicyArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category_group is None and 'categoryGroup' in kwargs: + category_group = kwargs['categoryGroup'] + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if category is not None: - pulumi.set(__self__, "category", category) + _setter("category", category) if category_group is not None: - pulumi.set(__self__, "category_group", category_group) + _setter("category_group", category_group) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if retention_policy is not None: warnings.warn("""`retention_policy` has been deprecated in favor of `azurerm_storage_management_policy` resource - to learn more https://aka.ms/diagnostic_settings_log_retention""", DeprecationWarning) pulumi.log.warn("""retention_policy is deprecated: `retention_policy` has been deprecated in favor of `azurerm_storage_management_policy` resource - to learn more https://aka.ms/diagnostic_settings_log_retention""") if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) @property @pulumi.getter @@ -7177,9 +9841,24 @@ def __init__(__self__, *, > **NOTE:** Setting this to `0` will retain the events indefinitely. """ - pulumi.set(__self__, "enabled", enabled) + DiagnosticSettingLogRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -7224,14 +9903,33 @@ def __init__(__self__, *, !> **NOTE:** `retention_policy` has been deprecated in favor of `storage.ManagementPolicy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention). """ - pulumi.set(__self__, "category", category) + DiagnosticSettingMetricArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + enabled=enabled, + retention_policy=retention_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + retention_policy: Optional[pulumi.Input['DiagnosticSettingMetricRetentionPolicyArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category is None: + raise TypeError("Missing 'category' argument") + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + + _setter("category", category) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if retention_policy is not None: warnings.warn("""`retention_policy` has been deprecated in favor of `azurerm_storage_management_policy` resource - to learn more https://aka.ms/diagnostic_settings_log_retention""", DeprecationWarning) pulumi.log.warn("""retention_policy is deprecated: `retention_policy` has been deprecated in favor of `azurerm_storage_management_policy` resource - to learn more https://aka.ms/diagnostic_settings_log_retention""") if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) @property @pulumi.getter @@ -7289,9 +9987,24 @@ def __init__(__self__, *, > **NOTE:** Setting this to `0` will retain the events indefinitely. """ - pulumi.set(__self__, "enabled", enabled) + DiagnosticSettingMetricRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -7330,9 +10043,24 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: A boolean value to indicate whether the retention policy is enabled. :param pulumi.Input[int] days: The number of days for the retention policy. Defaults to `0`. """ - pulumi.set(__self__, "enabled", enabled) + LogProfileRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -7372,11 +10100,42 @@ def __init__(__self__, *, :param pulumi.Input[str] usage_type: Different usage types. Possible values are `PAYG` or `COMMITTED`. Changing this forces a new logz Monitor to be created. :param pulumi.Input[str] plan_id: Plan id as published by Logz. The only possible value is `100gb14days`. Defaults to `100gb14days`. Changing this forces a new logz Monitor to be created. """ - pulumi.set(__self__, "billing_cycle", billing_cycle) - pulumi.set(__self__, "effective_date", effective_date) - pulumi.set(__self__, "usage_type", usage_type) + LogzMonitorPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + billing_cycle=billing_cycle, + effective_date=effective_date, + usage_type=usage_type, + plan_id=plan_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + billing_cycle: Optional[pulumi.Input[str]] = None, + effective_date: Optional[pulumi.Input[str]] = None, + usage_type: Optional[pulumi.Input[str]] = None, + plan_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if billing_cycle is None and 'billingCycle' in kwargs: + billing_cycle = kwargs['billingCycle'] + if billing_cycle is None: + raise TypeError("Missing 'billing_cycle' argument") + if effective_date is None and 'effectiveDate' in kwargs: + effective_date = kwargs['effectiveDate'] + if effective_date is None: + raise TypeError("Missing 'effective_date' argument") + if usage_type is None and 'usageType' in kwargs: + usage_type = kwargs['usageType'] + if usage_type is None: + raise TypeError("Missing 'usage_type' argument") + if plan_id is None and 'planId' in kwargs: + plan_id = kwargs['planId'] + + _setter("billing_cycle", billing_cycle) + _setter("effective_date", effective_date) + _setter("usage_type", usage_type) if plan_id is not None: - pulumi.set(__self__, "plan_id", plan_id) + _setter("plan_id", plan_id) @property @pulumi.getter(name="billingCycle") @@ -7442,10 +10201,41 @@ def __init__(__self__, *, :param pulumi.Input[str] last_name: Last Name of the user. Changing this forces a new logz Monitor to be created. :param pulumi.Input[str] phone_number: Phone number of the user used by Logz for contacting them if needed. Changing this forces a new logz Monitor to be created. """ - pulumi.set(__self__, "email", email) - pulumi.set(__self__, "first_name", first_name) - pulumi.set(__self__, "last_name", last_name) - pulumi.set(__self__, "phone_number", phone_number) + LogzMonitorUserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + first_name=first_name, + last_name=last_name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input[str]] = None, + first_name: Optional[pulumi.Input[str]] = None, + last_name: Optional[pulumi.Input[str]] = None, + phone_number: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + if first_name is None and 'firstName' in kwargs: + first_name = kwargs['firstName'] + if first_name is None: + raise TypeError("Missing 'first_name' argument") + if last_name is None and 'lastName' in kwargs: + last_name = kwargs['lastName'] + if last_name is None: + raise TypeError("Missing 'last_name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("email", email) + _setter("first_name", first_name) + _setter("last_name", last_name) + _setter("phone_number", phone_number) @property @pulumi.getter @@ -7509,10 +10299,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the tag to match. :param pulumi.Input[str] value: The value of the tag to match. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + LogzSubAccountTagRuleTagFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -7566,10 +10375,41 @@ def __init__(__self__, *, :param pulumi.Input[str] last_name: Last Name of the user. Possible values must be between 1 and 50 characters in length. Changing this forces a new logz Sub Account to be created. :param pulumi.Input[str] phone_number: Phone number of the user used by Logz for contacting them if needed. Possible values must be between 1 and 40 characters in length. Changing this forces a new logz Sub Account to be created. """ - pulumi.set(__self__, "email", email) - pulumi.set(__self__, "first_name", first_name) - pulumi.set(__self__, "last_name", last_name) - pulumi.set(__self__, "phone_number", phone_number) + LogzSubAccountUserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + first_name=first_name, + last_name=last_name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input[str]] = None, + first_name: Optional[pulumi.Input[str]] = None, + last_name: Optional[pulumi.Input[str]] = None, + phone_number: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + if first_name is None and 'firstName' in kwargs: + first_name = kwargs['firstName'] + if first_name is None: + raise TypeError("Missing 'first_name' argument") + if last_name is None and 'lastName' in kwargs: + last_name = kwargs['lastName'] + if last_name is None: + raise TypeError("Missing 'last_name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("email", email) + _setter("first_name", first_name) + _setter("last_name", last_name) + _setter("phone_number", phone_number) @property @pulumi.getter @@ -7633,10 +10473,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of this `tag_filter`. :param pulumi.Input[str] value: The value of this `tag_filter`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + LogzTagRuleTagFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -7684,9 +10543,28 @@ def __init__(__self__, *, :param pulumi.Input[str] action_group_id: The ID of the Action Group can be sourced from the `monitoring.ActionGroup` resource :param pulumi.Input[Mapping[str, pulumi.Input[str]]] webhook_properties: The map of custom string properties to include with the post operation. These data are appended to the webhook payload. """ - pulumi.set(__self__, "action_group_id", action_group_id) + MetricAlertActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_group_id=action_group_id, + webhook_properties=webhook_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_group_id: Optional[pulumi.Input[str]] = None, + webhook_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_group_id is None and 'actionGroupId' in kwargs: + action_group_id = kwargs['actionGroupId'] + if action_group_id is None: + raise TypeError("Missing 'action_group_id' argument") + if webhook_properties is None and 'webhookProperties' in kwargs: + webhook_properties = kwargs['webhookProperties'] + + _setter("action_group_id", action_group_id) if webhook_properties is not None: - pulumi.set(__self__, "webhook_properties", webhook_properties) + _setter("webhook_properties", webhook_properties) @property @pulumi.getter(name="actionGroupId") @@ -7724,9 +10602,36 @@ def __init__(__self__, *, :param pulumi.Input[int] failed_location_count: The number of failed locations. :param pulumi.Input[str] web_test_id: The ID of the Application Insights Web Test. """ - pulumi.set(__self__, "component_id", component_id) - pulumi.set(__self__, "failed_location_count", failed_location_count) - pulumi.set(__self__, "web_test_id", web_test_id) + MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + component_id=component_id, + failed_location_count=failed_location_count, + web_test_id=web_test_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + component_id: Optional[pulumi.Input[str]] = None, + failed_location_count: Optional[pulumi.Input[int]] = None, + web_test_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if component_id is None and 'componentId' in kwargs: + component_id = kwargs['componentId'] + if component_id is None: + raise TypeError("Missing 'component_id' argument") + if failed_location_count is None and 'failedLocationCount' in kwargs: + failed_location_count = kwargs['failedLocationCount'] + if failed_location_count is None: + raise TypeError("Missing 'failed_location_count' argument") + if web_test_id is None and 'webTestId' in kwargs: + web_test_id = kwargs['webTestId'] + if web_test_id is None: + raise TypeError("Missing 'web_test_id' argument") + + _setter("component_id", component_id) + _setter("failed_location_count", failed_location_count) + _setter("web_test_id", web_test_id) @property @pulumi.getter(name="componentId") @@ -7784,15 +10689,54 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['MetricAlertCriteriaDimensionArgs']]] dimensions: One or more `dimension` blocks as defined below. :param pulumi.Input[bool] skip_metric_validation: Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to `false`. """ - pulumi.set(__self__, "aggregation", aggregation) - pulumi.set(__self__, "metric_name", metric_name) - pulumi.set(__self__, "metric_namespace", metric_namespace) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + MetricAlertCriteriaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aggregation=aggregation, + metric_name=metric_name, + metric_namespace=metric_namespace, + operator=operator, + threshold=threshold, + dimensions=dimensions, + skip_metric_validation=skip_metric_validation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aggregation: Optional[pulumi.Input[str]] = None, + metric_name: Optional[pulumi.Input[str]] = None, + metric_namespace: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + threshold: Optional[pulumi.Input[float]] = None, + dimensions: Optional[pulumi.Input[Sequence[pulumi.Input['MetricAlertCriteriaDimensionArgs']]]] = None, + skip_metric_validation: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aggregation is None: + raise TypeError("Missing 'aggregation' argument") + if metric_name is None and 'metricName' in kwargs: + metric_name = kwargs['metricName'] + if metric_name is None: + raise TypeError("Missing 'metric_name' argument") + if metric_namespace is None and 'metricNamespace' in kwargs: + metric_namespace = kwargs['metricNamespace'] + if metric_namespace is None: + raise TypeError("Missing 'metric_namespace' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if skip_metric_validation is None and 'skipMetricValidation' in kwargs: + skip_metric_validation = kwargs['skipMetricValidation'] + + _setter("aggregation", aggregation) + _setter("metric_name", metric_name) + _setter("metric_namespace", metric_namespace) + _setter("operator", operator) + _setter("threshold", threshold) if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if skip_metric_validation is not None: - pulumi.set(__self__, "skip_metric_validation", skip_metric_validation) + _setter("skip_metric_validation", skip_metric_validation) @property @pulumi.getter @@ -7890,9 +10834,30 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The dimension operator. Possible values are `Include`, `Exclude` and `StartsWith`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: The list of dimension values. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + MetricAlertCriteriaDimensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -7956,21 +10921,74 @@ def __init__(__self__, *, :param pulumi.Input[str] ignore_data_before: The [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date from which to start learning the metric historical data and calculate the dynamic thresholds. :param pulumi.Input[bool] skip_metric_validation: Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? """ - pulumi.set(__self__, "aggregation", aggregation) - pulumi.set(__self__, "alert_sensitivity", alert_sensitivity) - pulumi.set(__self__, "metric_name", metric_name) - pulumi.set(__self__, "metric_namespace", metric_namespace) - pulumi.set(__self__, "operator", operator) + MetricAlertDynamicCriteriaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aggregation=aggregation, + alert_sensitivity=alert_sensitivity, + metric_name=metric_name, + metric_namespace=metric_namespace, + operator=operator, + dimensions=dimensions, + evaluation_failure_count=evaluation_failure_count, + evaluation_total_count=evaluation_total_count, + ignore_data_before=ignore_data_before, + skip_metric_validation=skip_metric_validation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aggregation: Optional[pulumi.Input[str]] = None, + alert_sensitivity: Optional[pulumi.Input[str]] = None, + metric_name: Optional[pulumi.Input[str]] = None, + metric_namespace: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + dimensions: Optional[pulumi.Input[Sequence[pulumi.Input['MetricAlertDynamicCriteriaDimensionArgs']]]] = None, + evaluation_failure_count: Optional[pulumi.Input[int]] = None, + evaluation_total_count: Optional[pulumi.Input[int]] = None, + ignore_data_before: Optional[pulumi.Input[str]] = None, + skip_metric_validation: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aggregation is None: + raise TypeError("Missing 'aggregation' argument") + if alert_sensitivity is None and 'alertSensitivity' in kwargs: + alert_sensitivity = kwargs['alertSensitivity'] + if alert_sensitivity is None: + raise TypeError("Missing 'alert_sensitivity' argument") + if metric_name is None and 'metricName' in kwargs: + metric_name = kwargs['metricName'] + if metric_name is None: + raise TypeError("Missing 'metric_name' argument") + if metric_namespace is None and 'metricNamespace' in kwargs: + metric_namespace = kwargs['metricNamespace'] + if metric_namespace is None: + raise TypeError("Missing 'metric_namespace' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if evaluation_failure_count is None and 'evaluationFailureCount' in kwargs: + evaluation_failure_count = kwargs['evaluationFailureCount'] + if evaluation_total_count is None and 'evaluationTotalCount' in kwargs: + evaluation_total_count = kwargs['evaluationTotalCount'] + if ignore_data_before is None and 'ignoreDataBefore' in kwargs: + ignore_data_before = kwargs['ignoreDataBefore'] + if skip_metric_validation is None and 'skipMetricValidation' in kwargs: + skip_metric_validation = kwargs['skipMetricValidation'] + + _setter("aggregation", aggregation) + _setter("alert_sensitivity", alert_sensitivity) + _setter("metric_name", metric_name) + _setter("metric_namespace", metric_namespace) + _setter("operator", operator) if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if evaluation_failure_count is not None: - pulumi.set(__self__, "evaluation_failure_count", evaluation_failure_count) + _setter("evaluation_failure_count", evaluation_failure_count) if evaluation_total_count is not None: - pulumi.set(__self__, "evaluation_total_count", evaluation_total_count) + _setter("evaluation_total_count", evaluation_total_count) if ignore_data_before is not None: - pulumi.set(__self__, "ignore_data_before", ignore_data_before) + _setter("ignore_data_before", ignore_data_before) if skip_metric_validation is not None: - pulumi.set(__self__, "skip_metric_validation", skip_metric_validation) + _setter("skip_metric_validation", skip_metric_validation) @property @pulumi.getter @@ -8104,9 +11122,30 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: The dimension operator. Possible values are `Include`, `Exclude` and `StartsWith`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: The list of dimension values. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + MetricAlertDynamicCriteriaDimensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -8156,11 +11195,34 @@ def __init__(__self__, *, :param pulumi.Input[str] custom_webhook_payload: Custom payload to be sent for all webhook payloads in alerting action. :param pulumi.Input[str] email_subject: Custom subject override for all email ids in Azure action group. """ - pulumi.set(__self__, "action_groups", action_groups) + ScheduledQueryRulesAlertActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_groups=action_groups, + custom_webhook_payload=custom_webhook_payload, + email_subject=email_subject, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + custom_webhook_payload: Optional[pulumi.Input[str]] = None, + email_subject: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_groups is None and 'actionGroups' in kwargs: + action_groups = kwargs['actionGroups'] + if action_groups is None: + raise TypeError("Missing 'action_groups' argument") + if custom_webhook_payload is None and 'customWebhookPayload' in kwargs: + custom_webhook_payload = kwargs['customWebhookPayload'] + if email_subject is None and 'emailSubject' in kwargs: + email_subject = kwargs['emailSubject'] + + _setter("action_groups", action_groups) if custom_webhook_payload is not None: - pulumi.set(__self__, "custom_webhook_payload", custom_webhook_payload) + _setter("custom_webhook_payload", custom_webhook_payload) if email_subject is not None: - pulumi.set(__self__, "email_subject", email_subject) + _setter("email_subject", email_subject) @property @pulumi.getter(name="actionGroups") @@ -8210,10 +11272,31 @@ def __init__(__self__, *, :param pulumi.Input[float] threshold: Result or count threshold based on which rule should be triggered. Values must be between 0 and 10000 inclusive. :param pulumi.Input['ScheduledQueryRulesAlertTriggerMetricTriggerArgs'] metric_trigger: A `metric_trigger` block as defined above. Trigger condition for metric query rule. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + ScheduledQueryRulesAlertTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + threshold=threshold, + metric_trigger=metric_trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + threshold: Optional[pulumi.Input[float]] = None, + metric_trigger: Optional[pulumi.Input['ScheduledQueryRulesAlertTriggerMetricTriggerArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if metric_trigger is None and 'metricTrigger' in kwargs: + metric_trigger = kwargs['metricTrigger'] + + _setter("operator", operator) + _setter("threshold", threshold) if metric_trigger is not None: - pulumi.set(__self__, "metric_trigger", metric_trigger) + _setter("metric_trigger", metric_trigger) @property @pulumi.getter @@ -8265,11 +11348,38 @@ def __init__(__self__, *, :param pulumi.Input[float] threshold: The threshold of the metric trigger. Values must be between 0 and 10000 inclusive. :param pulumi.Input[str] metric_column: Evaluation of metric on a particular column. """ - pulumi.set(__self__, "metric_trigger_type", metric_trigger_type) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + ScheduledQueryRulesAlertTriggerMetricTriggerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + metric_trigger_type=metric_trigger_type, + operator=operator, + threshold=threshold, + metric_column=metric_column, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + metric_trigger_type: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + threshold: Optional[pulumi.Input[float]] = None, + metric_column: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if metric_trigger_type is None and 'metricTriggerType' in kwargs: + metric_trigger_type = kwargs['metricTriggerType'] + if metric_trigger_type is None: + raise TypeError("Missing 'metric_trigger_type' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if metric_column is None and 'metricColumn' in kwargs: + metric_column = kwargs['metricColumn'] + + _setter("metric_trigger_type", metric_trigger_type) + _setter("operator", operator) + _setter("threshold", threshold) if metric_column is not None: - pulumi.set(__self__, "metric_column", metric_column) + _setter("metric_column", metric_column) @property @pulumi.getter(name="metricTriggerType") @@ -8329,10 +11439,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] action_groups: List of Action Group resource IDs to invoke when the alert fires. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_properties: Specifies the properties of an alert payload. """ + ScheduledQueryRulesAlertV2ActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_groups=action_groups, + custom_properties=custom_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + custom_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_groups is None and 'actionGroups' in kwargs: + action_groups = kwargs['actionGroups'] + if custom_properties is None and 'customProperties' in kwargs: + custom_properties = kwargs['customProperties'] + if action_groups is not None: - pulumi.set(__self__, "action_groups", action_groups) + _setter("action_groups", action_groups) if custom_properties is not None: - pulumi.set(__self__, "custom_properties", custom_properties) + _setter("custom_properties", custom_properties) @property @pulumi.getter(name="actionGroups") @@ -8382,18 +11509,59 @@ def __init__(__self__, *, > **Note** `metric_measure_column` is required if `time_aggregation_method` is `Average`, `Maximum`, `Minimum`, or `Total`. And `metric_measure_column` can not be specified if `time_aggregation_method` is `Count`. :param pulumi.Input[str] resource_id_column: Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "query", query) - pulumi.set(__self__, "threshold", threshold) - pulumi.set(__self__, "time_aggregation_method", time_aggregation_method) + ScheduledQueryRulesAlertV2CriteriaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + query=query, + threshold=threshold, + time_aggregation_method=time_aggregation_method, + dimensions=dimensions, + failing_periods=failing_periods, + metric_measure_column=metric_measure_column, + resource_id_column=resource_id_column, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + query: Optional[pulumi.Input[str]] = None, + threshold: Optional[pulumi.Input[float]] = None, + time_aggregation_method: Optional[pulumi.Input[str]] = None, + dimensions: Optional[pulumi.Input[Sequence[pulumi.Input['ScheduledQueryRulesAlertV2CriteriaDimensionArgs']]]] = None, + failing_periods: Optional[pulumi.Input['ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs']] = None, + metric_measure_column: Optional[pulumi.Input[str]] = None, + resource_id_column: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if query is None: + raise TypeError("Missing 'query' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if time_aggregation_method is None and 'timeAggregationMethod' in kwargs: + time_aggregation_method = kwargs['timeAggregationMethod'] + if time_aggregation_method is None: + raise TypeError("Missing 'time_aggregation_method' argument") + if failing_periods is None and 'failingPeriods' in kwargs: + failing_periods = kwargs['failingPeriods'] + if metric_measure_column is None and 'metricMeasureColumn' in kwargs: + metric_measure_column = kwargs['metricMeasureColumn'] + if resource_id_column is None and 'resourceIdColumn' in kwargs: + resource_id_column = kwargs['resourceIdColumn'] + + _setter("operator", operator) + _setter("query", query) + _setter("threshold", threshold) + _setter("time_aggregation_method", time_aggregation_method) if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if failing_periods is not None: - pulumi.set(__self__, "failing_periods", failing_periods) + _setter("failing_periods", failing_periods) if metric_measure_column is not None: - pulumi.set(__self__, "metric_measure_column", metric_measure_column) + _setter("metric_measure_column", metric_measure_column) if resource_id_column is not None: - pulumi.set(__self__, "resource_id_column", resource_id_column) + _setter("resource_id_column", resource_id_column) @property @pulumi.getter @@ -8505,9 +11673,30 @@ def __init__(__self__, *, :param pulumi.Input[str] operator: Operator for dimension values. Possible values are `Exclude`,and `Include`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: List of dimension values. Use a wildcard `*` to collect all. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ScheduledQueryRulesAlertV2CriteriaDimensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -8559,8 +11748,29 @@ def __init__(__self__, *, > **Note** `number_of_evaluation_periods` must be `1` for queries that do not project timestamp column """ - pulumi.set(__self__, "minimum_failing_periods_to_trigger_alert", minimum_failing_periods_to_trigger_alert) - pulumi.set(__self__, "number_of_evaluation_periods", number_of_evaluation_periods) + ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + minimum_failing_periods_to_trigger_alert=minimum_failing_periods_to_trigger_alert, + number_of_evaluation_periods=number_of_evaluation_periods, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + minimum_failing_periods_to_trigger_alert: Optional[pulumi.Input[int]] = None, + number_of_evaluation_periods: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if minimum_failing_periods_to_trigger_alert is None and 'minimumFailingPeriodsToTriggerAlert' in kwargs: + minimum_failing_periods_to_trigger_alert = kwargs['minimumFailingPeriodsToTriggerAlert'] + if minimum_failing_periods_to_trigger_alert is None: + raise TypeError("Missing 'minimum_failing_periods_to_trigger_alert' argument") + if number_of_evaluation_periods is None and 'numberOfEvaluationPeriods' in kwargs: + number_of_evaluation_periods = kwargs['numberOfEvaluationPeriods'] + if number_of_evaluation_periods is None: + raise TypeError("Missing 'number_of_evaluation_periods' argument") + + _setter("minimum_failing_periods_to_trigger_alert", minimum_failing_periods_to_trigger_alert) + _setter("number_of_evaluation_periods", number_of_evaluation_periods) @property @pulumi.getter(name="minimumFailingPeriodsToTriggerAlert") @@ -8600,8 +11810,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ScheduledQueryRulesLogCriteriaDimensionArgs']]] dimensions: A `dimension` block as defined below. :param pulumi.Input[str] metric_name: Name of the metric. Supported metrics are listed in the Azure Monitor [Microsoft.OperationalInsights/workspaces](https://docs.microsoft.com/azure/azure-monitor/platform/metrics-supported#microsoftoperationalinsightsworkspaces) metrics namespace. """ - pulumi.set(__self__, "dimensions", dimensions) - pulumi.set(__self__, "metric_name", metric_name) + ScheduledQueryRulesLogCriteriaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimensions=dimensions, + metric_name=metric_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimensions: Optional[pulumi.Input[Sequence[pulumi.Input['ScheduledQueryRulesLogCriteriaDimensionArgs']]]] = None, + metric_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dimensions is None: + raise TypeError("Missing 'dimensions' argument") + if metric_name is None and 'metricName' in kwargs: + metric_name = kwargs['metricName'] + if metric_name is None: + raise TypeError("Missing 'metric_name' argument") + + _setter("dimensions", dimensions) + _setter("metric_name", metric_name) @property @pulumi.getter @@ -8639,10 +11868,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] values: List of dimension values. :param pulumi.Input[str] operator: Operator for dimension values, - 'Include'. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + ScheduledQueryRulesLogCriteriaDimensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -8692,11 +11940,32 @@ def __init__(__self__, *, :param pulumi.Input[str] email_subject: Specifies a custom email subject if Email Receiver is specified in Monitor Action Group resource. :param pulumi.Input[str] webhook_payload: A JSON String which Specifies the custom webhook payload if Webhook Receiver is specified in Monitor Action Group resource. """ - pulumi.set(__self__, "ids", ids) + SmartDetectorAlertRuleActionGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ids=ids, + email_subject=email_subject, + webhook_payload=webhook_payload, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_subject: Optional[pulumi.Input[str]] = None, + webhook_payload: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ids is None: + raise TypeError("Missing 'ids' argument") + if email_subject is None and 'emailSubject' in kwargs: + email_subject = kwargs['emailSubject'] + if webhook_payload is None and 'webhookPayload' in kwargs: + webhook_payload = kwargs['webhookPayload'] + + _setter("ids", ids) if email_subject is not None: - pulumi.set(__self__, "email_subject", email_subject) + _setter("email_subject", email_subject) if webhook_payload is not None: - pulumi.set(__self__, "webhook_payload", webhook_payload) + _setter("webhook_payload", webhook_payload) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/monitoring/aad_diagnostic_setting.py b/sdk/python/pulumi_azure/monitoring/aad_diagnostic_setting.py index 92309855e3..8fabc464f6 100644 --- a/sdk/python/pulumi_azure/monitoring/aad_diagnostic_setting.py +++ b/sdk/python/pulumi_azure/monitoring/aad_diagnostic_setting.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,23 +41,56 @@ def __init__(__self__, *, > **NOTE:** One of `eventhub_authorization_rule_id`, `log_analytics_workspace_id` and `storage_account_id` must be specified. """ + AadDiagnosticSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled_logs=enabled_logs, + eventhub_authorization_rule_id=eventhub_authorization_rule_id, + eventhub_name=eventhub_name, + log_analytics_workspace_id=log_analytics_workspace_id, + logs=logs, + name=name, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled_logs: Optional[pulumi.Input[Sequence[pulumi.Input['AadDiagnosticSettingEnabledLogArgs']]]] = None, + eventhub_authorization_rule_id: Optional[pulumi.Input[str]] = None, + eventhub_name: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input[Sequence[pulumi.Input['AadDiagnosticSettingLogArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled_logs is None and 'enabledLogs' in kwargs: + enabled_logs = kwargs['enabledLogs'] + if eventhub_authorization_rule_id is None and 'eventhubAuthorizationRuleId' in kwargs: + eventhub_authorization_rule_id = kwargs['eventhubAuthorizationRuleId'] + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if enabled_logs is not None: - pulumi.set(__self__, "enabled_logs", enabled_logs) + _setter("enabled_logs", enabled_logs) if eventhub_authorization_rule_id is not None: - pulumi.set(__self__, "eventhub_authorization_rule_id", eventhub_authorization_rule_id) + _setter("eventhub_authorization_rule_id", eventhub_authorization_rule_id) if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if logs is not None: warnings.warn("""`log` has been superseded by `enabled_log` and will be removed in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""logs is deprecated: `log` has been superseded by `enabled_log` and will be removed in version 4.0 of the AzureRM Provider.""") if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="enabledLogs") @@ -183,23 +216,56 @@ def __init__(__self__, *, > **NOTE:** One of `eventhub_authorization_rule_id`, `log_analytics_workspace_id` and `storage_account_id` must be specified. """ + _AadDiagnosticSettingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled_logs=enabled_logs, + eventhub_authorization_rule_id=eventhub_authorization_rule_id, + eventhub_name=eventhub_name, + log_analytics_workspace_id=log_analytics_workspace_id, + logs=logs, + name=name, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled_logs: Optional[pulumi.Input[Sequence[pulumi.Input['AadDiagnosticSettingEnabledLogArgs']]]] = None, + eventhub_authorization_rule_id: Optional[pulumi.Input[str]] = None, + eventhub_name: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input[Sequence[pulumi.Input['AadDiagnosticSettingLogArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled_logs is None and 'enabledLogs' in kwargs: + enabled_logs = kwargs['enabledLogs'] + if eventhub_authorization_rule_id is None and 'eventhubAuthorizationRuleId' in kwargs: + eventhub_authorization_rule_id = kwargs['eventhubAuthorizationRuleId'] + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if enabled_logs is not None: - pulumi.set(__self__, "enabled_logs", enabled_logs) + _setter("enabled_logs", enabled_logs) if eventhub_authorization_rule_id is not None: - pulumi.set(__self__, "eventhub_authorization_rule_id", eventhub_authorization_rule_id) + _setter("eventhub_authorization_rule_id", eventhub_authorization_rule_id) if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if logs is not None: warnings.warn("""`log` has been superseded by `enabled_log` and will be removed in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""logs is deprecated: `log` has been superseded by `enabled_log` and will be removed in version 4.0 of the AzureRM Provider.""") if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="enabledLogs") @@ -464,6 +530,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AadDiagnosticSettingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/monitoring/action_group.py b/sdk/python/pulumi_azure/monitoring/action_group.py index 4697425b15..ed02b531bb 100644 --- a/sdk/python/pulumi_azure/monitoring/action_group.py +++ b/sdk/python/pulumi_azure/monitoring/action_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -53,38 +53,111 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ActionGroupVoiceReceiverArgs']]] voice_receivers: One or more `voice_receiver` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['ActionGroupWebhookReceiverArgs']]] webhook_receivers: One or more `webhook_receiver` blocks as defined below. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "short_name", short_name) + ActionGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + short_name=short_name, + arm_role_receivers=arm_role_receivers, + automation_runbook_receivers=automation_runbook_receivers, + azure_app_push_receivers=azure_app_push_receivers, + azure_function_receivers=azure_function_receivers, + email_receivers=email_receivers, + enabled=enabled, + event_hub_receivers=event_hub_receivers, + itsm_receivers=itsm_receivers, + location=location, + logic_app_receivers=logic_app_receivers, + name=name, + sms_receivers=sms_receivers, + tags=tags, + voice_receivers=voice_receivers, + webhook_receivers=webhook_receivers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + short_name: Optional[pulumi.Input[str]] = None, + arm_role_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupArmRoleReceiverArgs']]]] = None, + automation_runbook_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupAutomationRunbookReceiverArgs']]]] = None, + azure_app_push_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupAzureAppPushReceiverArgs']]]] = None, + azure_function_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupAzureFunctionReceiverArgs']]]] = None, + email_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupEmailReceiverArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + event_hub_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupEventHubReceiverArgs']]]] = None, + itsm_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupItsmReceiverArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + logic_app_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupLogicAppReceiverArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + sms_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupSmsReceiverArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + voice_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupVoiceReceiverArgs']]]] = None, + webhook_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupWebhookReceiverArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if short_name is None and 'shortName' in kwargs: + short_name = kwargs['shortName'] + if short_name is None: + raise TypeError("Missing 'short_name' argument") + if arm_role_receivers is None and 'armRoleReceivers' in kwargs: + arm_role_receivers = kwargs['armRoleReceivers'] + if automation_runbook_receivers is None and 'automationRunbookReceivers' in kwargs: + automation_runbook_receivers = kwargs['automationRunbookReceivers'] + if azure_app_push_receivers is None and 'azureAppPushReceivers' in kwargs: + azure_app_push_receivers = kwargs['azureAppPushReceivers'] + if azure_function_receivers is None and 'azureFunctionReceivers' in kwargs: + azure_function_receivers = kwargs['azureFunctionReceivers'] + if email_receivers is None and 'emailReceivers' in kwargs: + email_receivers = kwargs['emailReceivers'] + if event_hub_receivers is None and 'eventHubReceivers' in kwargs: + event_hub_receivers = kwargs['eventHubReceivers'] + if itsm_receivers is None and 'itsmReceivers' in kwargs: + itsm_receivers = kwargs['itsmReceivers'] + if logic_app_receivers is None and 'logicAppReceivers' in kwargs: + logic_app_receivers = kwargs['logicAppReceivers'] + if sms_receivers is None and 'smsReceivers' in kwargs: + sms_receivers = kwargs['smsReceivers'] + if voice_receivers is None and 'voiceReceivers' in kwargs: + voice_receivers = kwargs['voiceReceivers'] + if webhook_receivers is None and 'webhookReceivers' in kwargs: + webhook_receivers = kwargs['webhookReceivers'] + + _setter("resource_group_name", resource_group_name) + _setter("short_name", short_name) if arm_role_receivers is not None: - pulumi.set(__self__, "arm_role_receivers", arm_role_receivers) + _setter("arm_role_receivers", arm_role_receivers) if automation_runbook_receivers is not None: - pulumi.set(__self__, "automation_runbook_receivers", automation_runbook_receivers) + _setter("automation_runbook_receivers", automation_runbook_receivers) if azure_app_push_receivers is not None: - pulumi.set(__self__, "azure_app_push_receivers", azure_app_push_receivers) + _setter("azure_app_push_receivers", azure_app_push_receivers) if azure_function_receivers is not None: - pulumi.set(__self__, "azure_function_receivers", azure_function_receivers) + _setter("azure_function_receivers", azure_function_receivers) if email_receivers is not None: - pulumi.set(__self__, "email_receivers", email_receivers) + _setter("email_receivers", email_receivers) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if event_hub_receivers is not None: - pulumi.set(__self__, "event_hub_receivers", event_hub_receivers) + _setter("event_hub_receivers", event_hub_receivers) if itsm_receivers is not None: - pulumi.set(__self__, "itsm_receivers", itsm_receivers) + _setter("itsm_receivers", itsm_receivers) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logic_app_receivers is not None: - pulumi.set(__self__, "logic_app_receivers", logic_app_receivers) + _setter("logic_app_receivers", logic_app_receivers) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sms_receivers is not None: - pulumi.set(__self__, "sms_receivers", sms_receivers) + _setter("sms_receivers", sms_receivers) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if voice_receivers is not None: - pulumi.set(__self__, "voice_receivers", voice_receivers) + _setter("voice_receivers", voice_receivers) if webhook_receivers is not None: - pulumi.set(__self__, "webhook_receivers", webhook_receivers) + _setter("webhook_receivers", webhook_receivers) @property @pulumi.getter(name="resourceGroupName") @@ -331,40 +404,109 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ActionGroupVoiceReceiverArgs']]] voice_receivers: One or more `voice_receiver` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['ActionGroupWebhookReceiverArgs']]] webhook_receivers: One or more `webhook_receiver` blocks as defined below. """ + _ActionGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + arm_role_receivers=arm_role_receivers, + automation_runbook_receivers=automation_runbook_receivers, + azure_app_push_receivers=azure_app_push_receivers, + azure_function_receivers=azure_function_receivers, + email_receivers=email_receivers, + enabled=enabled, + event_hub_receivers=event_hub_receivers, + itsm_receivers=itsm_receivers, + location=location, + logic_app_receivers=logic_app_receivers, + name=name, + resource_group_name=resource_group_name, + short_name=short_name, + sms_receivers=sms_receivers, + tags=tags, + voice_receivers=voice_receivers, + webhook_receivers=webhook_receivers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + arm_role_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupArmRoleReceiverArgs']]]] = None, + automation_runbook_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupAutomationRunbookReceiverArgs']]]] = None, + azure_app_push_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupAzureAppPushReceiverArgs']]]] = None, + azure_function_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupAzureFunctionReceiverArgs']]]] = None, + email_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupEmailReceiverArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + event_hub_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupEventHubReceiverArgs']]]] = None, + itsm_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupItsmReceiverArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + logic_app_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupLogicAppReceiverArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + short_name: Optional[pulumi.Input[str]] = None, + sms_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupSmsReceiverArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + voice_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupVoiceReceiverArgs']]]] = None, + webhook_receivers: Optional[pulumi.Input[Sequence[pulumi.Input['ActionGroupWebhookReceiverArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if arm_role_receivers is None and 'armRoleReceivers' in kwargs: + arm_role_receivers = kwargs['armRoleReceivers'] + if automation_runbook_receivers is None and 'automationRunbookReceivers' in kwargs: + automation_runbook_receivers = kwargs['automationRunbookReceivers'] + if azure_app_push_receivers is None and 'azureAppPushReceivers' in kwargs: + azure_app_push_receivers = kwargs['azureAppPushReceivers'] + if azure_function_receivers is None and 'azureFunctionReceivers' in kwargs: + azure_function_receivers = kwargs['azureFunctionReceivers'] + if email_receivers is None and 'emailReceivers' in kwargs: + email_receivers = kwargs['emailReceivers'] + if event_hub_receivers is None and 'eventHubReceivers' in kwargs: + event_hub_receivers = kwargs['eventHubReceivers'] + if itsm_receivers is None and 'itsmReceivers' in kwargs: + itsm_receivers = kwargs['itsmReceivers'] + if logic_app_receivers is None and 'logicAppReceivers' in kwargs: + logic_app_receivers = kwargs['logicAppReceivers'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if short_name is None and 'shortName' in kwargs: + short_name = kwargs['shortName'] + if sms_receivers is None and 'smsReceivers' in kwargs: + sms_receivers = kwargs['smsReceivers'] + if voice_receivers is None and 'voiceReceivers' in kwargs: + voice_receivers = kwargs['voiceReceivers'] + if webhook_receivers is None and 'webhookReceivers' in kwargs: + webhook_receivers = kwargs['webhookReceivers'] + if arm_role_receivers is not None: - pulumi.set(__self__, "arm_role_receivers", arm_role_receivers) + _setter("arm_role_receivers", arm_role_receivers) if automation_runbook_receivers is not None: - pulumi.set(__self__, "automation_runbook_receivers", automation_runbook_receivers) + _setter("automation_runbook_receivers", automation_runbook_receivers) if azure_app_push_receivers is not None: - pulumi.set(__self__, "azure_app_push_receivers", azure_app_push_receivers) + _setter("azure_app_push_receivers", azure_app_push_receivers) if azure_function_receivers is not None: - pulumi.set(__self__, "azure_function_receivers", azure_function_receivers) + _setter("azure_function_receivers", azure_function_receivers) if email_receivers is not None: - pulumi.set(__self__, "email_receivers", email_receivers) + _setter("email_receivers", email_receivers) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if event_hub_receivers is not None: - pulumi.set(__self__, "event_hub_receivers", event_hub_receivers) + _setter("event_hub_receivers", event_hub_receivers) if itsm_receivers is not None: - pulumi.set(__self__, "itsm_receivers", itsm_receivers) + _setter("itsm_receivers", itsm_receivers) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logic_app_receivers is not None: - pulumi.set(__self__, "logic_app_receivers", logic_app_receivers) + _setter("logic_app_receivers", logic_app_receivers) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if short_name is not None: - pulumi.set(__self__, "short_name", short_name) + _setter("short_name", short_name) if sms_receivers is not None: - pulumi.set(__self__, "sms_receivers", sms_receivers) + _setter("sms_receivers", sms_receivers) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if voice_receivers is not None: - pulumi.set(__self__, "voice_receivers", voice_receivers) + _setter("voice_receivers", voice_receivers) if webhook_receivers is not None: - pulumi.set(__self__, "webhook_receivers", webhook_receivers) + _setter("webhook_receivers", webhook_receivers) @property @pulumi.getter(name="armRoleReceivers") @@ -826,6 +968,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ActionGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/monitoring/action_rule_action_group.py b/sdk/python/pulumi_azure/monitoring/action_rule_action_group.py index f291508837..053fd4f0d4 100644 --- a/sdk/python/pulumi_azure/monitoring/action_rule_action_group.py +++ b/sdk/python/pulumi_azure/monitoring/action_rule_action_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,20 +35,53 @@ def __init__(__self__, *, :param pulumi.Input['ActionRuleActionGroupScopeArgs'] scope: A `scope` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "action_group_id", action_group_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ActionRuleActionGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_group_id=action_group_id, + resource_group_name=resource_group_name, + condition=condition, + description=description, + enabled=enabled, + name=name, + scope=scope, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_group_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + condition: Optional[pulumi.Input['ActionRuleActionGroupConditionArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input['ActionRuleActionGroupScopeArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_group_id is None and 'actionGroupId' in kwargs: + action_group_id = kwargs['actionGroupId'] + if action_group_id is None: + raise TypeError("Missing 'action_group_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("action_group_id", action_group_id) + _setter("resource_group_name", resource_group_name) if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="actionGroupId") @@ -169,22 +202,51 @@ def __init__(__self__, *, :param pulumi.Input['ActionRuleActionGroupScopeArgs'] scope: A `scope` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ActionRuleActionGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_group_id=action_group_id, + condition=condition, + description=description, + enabled=enabled, + name=name, + resource_group_name=resource_group_name, + scope=scope, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_group_id: Optional[pulumi.Input[str]] = None, + condition: Optional[pulumi.Input['ActionRuleActionGroupConditionArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input['ActionRuleActionGroupScopeArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_group_id is None and 'actionGroupId' in kwargs: + action_group_id = kwargs['actionGroupId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if action_group_id is not None: - pulumi.set(__self__, "action_group_id", action_group_id) + _setter("action_group_id", action_group_id) if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="actionGroupId") @@ -394,6 +456,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ActionRuleActionGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -419,6 +485,11 @@ def _internal_init(__self__, if action_group_id is None and not opts.urn: raise TypeError("Missing required property 'action_group_id'") __props__.__dict__["action_group_id"] = action_group_id + if condition is not None and not isinstance(condition, ActionRuleActionGroupConditionArgs): + condition = condition or {} + def _setter(key, value): + condition[key] = value + ActionRuleActionGroupConditionArgs._configure(_setter, **condition) __props__.__dict__["condition"] = condition __props__.__dict__["description"] = description __props__.__dict__["enabled"] = enabled @@ -426,6 +497,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if scope is not None and not isinstance(scope, ActionRuleActionGroupScopeArgs): + scope = scope or {} + def _setter(key, value): + scope[key] = value + ActionRuleActionGroupScopeArgs._configure(_setter, **scope) __props__.__dict__["scope"] = scope __props__.__dict__["tags"] = tags super(ActionRuleActionGroup, __self__).__init__( diff --git a/sdk/python/pulumi_azure/monitoring/action_rule_suppression.py b/sdk/python/pulumi_azure/monitoring/action_rule_suppression.py index 9a5927e672..2549f9740d 100644 --- a/sdk/python/pulumi_azure/monitoring/action_rule_suppression.py +++ b/sdk/python/pulumi_azure/monitoring/action_rule_suppression.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,20 +35,51 @@ def __init__(__self__, *, :param pulumi.Input['ActionRuleSuppressionScopeArgs'] scope: A `scope` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "suppression", suppression) + ActionRuleSuppressionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + suppression=suppression, + condition=condition, + description=description, + enabled=enabled, + name=name, + scope=scope, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + suppression: Optional[pulumi.Input['ActionRuleSuppressionSuppressionArgs']] = None, + condition: Optional[pulumi.Input['ActionRuleSuppressionConditionArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input['ActionRuleSuppressionScopeArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if suppression is None: + raise TypeError("Missing 'suppression' argument") + + _setter("resource_group_name", resource_group_name) + _setter("suppression", suppression) if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -169,22 +200,49 @@ def __init__(__self__, *, :param pulumi.Input['ActionRuleSuppressionSuppressionArgs'] suppression: A `suppression` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ActionRuleSuppressionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + condition=condition, + description=description, + enabled=enabled, + name=name, + resource_group_name=resource_group_name, + scope=scope, + suppression=suppression, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + condition: Optional[pulumi.Input['ActionRuleSuppressionConditionArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input['ActionRuleSuppressionScopeArgs']] = None, + suppression: Optional[pulumi.Input['ActionRuleSuppressionSuppressionArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if suppression is not None: - pulumi.set(__self__, "suppression", suppression) + _setter("suppression", suppression) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -412,6 +470,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ActionRuleSuppressionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -434,6 +496,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ActionRuleSuppressionArgs.__new__(ActionRuleSuppressionArgs) + if condition is not None and not isinstance(condition, ActionRuleSuppressionConditionArgs): + condition = condition or {} + def _setter(key, value): + condition[key] = value + ActionRuleSuppressionConditionArgs._configure(_setter, **condition) __props__.__dict__["condition"] = condition __props__.__dict__["description"] = description __props__.__dict__["enabled"] = enabled @@ -441,7 +508,17 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if scope is not None and not isinstance(scope, ActionRuleSuppressionScopeArgs): + scope = scope or {} + def _setter(key, value): + scope[key] = value + ActionRuleSuppressionScopeArgs._configure(_setter, **scope) __props__.__dict__["scope"] = scope + if suppression is not None and not isinstance(suppression, ActionRuleSuppressionSuppressionArgs): + suppression = suppression or {} + def _setter(key, value): + suppression[key] = value + ActionRuleSuppressionSuppressionArgs._configure(_setter, **suppression) if suppression is None and not opts.urn: raise TypeError("Missing required property 'suppression'") __props__.__dict__["suppression"] = suppression diff --git a/sdk/python/pulumi_azure/monitoring/activity_log_alert.py b/sdk/python/pulumi_azure/monitoring/activity_log_alert.py index 45d0d8b40c..b818e3cc6c 100644 --- a/sdk/python/pulumi_azure/monitoring/activity_log_alert.py +++ b/sdk/python/pulumi_azure/monitoring/activity_log_alert.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,19 +35,52 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the activity log alert. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "criteria", criteria) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scopes", scopes) + ActivityLogAlertArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + criteria=criteria, + resource_group_name=resource_group_name, + scopes=scopes, + actions=actions, + description=description, + enabled=enabled, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + criteria: Optional[pulumi.Input['ActivityLogAlertCriteriaArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + actions: Optional[pulumi.Input[Sequence[pulumi.Input['ActivityLogAlertActionArgs']]]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if criteria is None: + raise TypeError("Missing 'criteria' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scopes is None: + raise TypeError("Missing 'scopes' argument") + + _setter("criteria", criteria) + _setter("resource_group_name", resource_group_name) + _setter("scopes", scopes) if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -168,22 +201,49 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: The Scope at which the Activity Log should be applied. A list of strings which could be a resource group , or a subscription, or a resource ID (such as a Storage Account). :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ActivityLogAlertState._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + criteria=criteria, + description=description, + enabled=enabled, + name=name, + resource_group_name=resource_group_name, + scopes=scopes, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input['ActivityLogAlertActionArgs']]]] = None, + criteria: Optional[pulumi.Input['ActivityLogAlertCriteriaArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if criteria is not None: - pulumi.set(__self__, "criteria", criteria) + _setter("criteria", criteria) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -417,6 +477,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ActivityLogAlertArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -440,6 +504,11 @@ def _internal_init(__self__, __props__ = ActivityLogAlertArgs.__new__(ActivityLogAlertArgs) __props__.__dict__["actions"] = actions + if criteria is not None and not isinstance(criteria, ActivityLogAlertCriteriaArgs): + criteria = criteria or {} + def _setter(key, value): + criteria[key] = value + ActivityLogAlertCriteriaArgs._configure(_setter, **criteria) if criteria is None and not opts.urn: raise TypeError("Missing required property 'criteria'") __props__.__dict__["criteria"] = criteria diff --git a/sdk/python/pulumi_azure/monitoring/alert_processing_rule_action_group.py b/sdk/python/pulumi_azure/monitoring/alert_processing_rule_action_group.py index a8a9187e3b..d12a562d51 100644 --- a/sdk/python/pulumi_azure/monitoring/alert_processing_rule_action_group.py +++ b/sdk/python/pulumi_azure/monitoring/alert_processing_rule_action_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,21 +37,58 @@ def __init__(__self__, *, :param pulumi.Input['AlertProcessingRuleActionGroupScheduleArgs'] schedule: A `schedule` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Alert Processing Rule. """ - pulumi.set(__self__, "add_action_group_ids", add_action_group_ids) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scopes", scopes) + AlertProcessingRuleActionGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + add_action_group_ids=add_action_group_ids, + resource_group_name=resource_group_name, + scopes=scopes, + condition=condition, + description=description, + enabled=enabled, + name=name, + schedule=schedule, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + add_action_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + condition: Optional[pulumi.Input['AlertProcessingRuleActionGroupConditionArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['AlertProcessingRuleActionGroupScheduleArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if add_action_group_ids is None and 'addActionGroupIds' in kwargs: + add_action_group_ids = kwargs['addActionGroupIds'] + if add_action_group_ids is None: + raise TypeError("Missing 'add_action_group_ids' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scopes is None: + raise TypeError("Missing 'scopes' argument") + + _setter("add_action_group_ids", add_action_group_ids) + _setter("resource_group_name", resource_group_name) + _setter("scopes", scopes) if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="addActionGroupIds") @@ -186,24 +223,55 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: A list of resource IDs which will be the target of alert processing rule. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Alert Processing Rule. """ + _AlertProcessingRuleActionGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + add_action_group_ids=add_action_group_ids, + condition=condition, + description=description, + enabled=enabled, + name=name, + resource_group_name=resource_group_name, + schedule=schedule, + scopes=scopes, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + add_action_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + condition: Optional[pulumi.Input['AlertProcessingRuleActionGroupConditionArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['AlertProcessingRuleActionGroupScheduleArgs']] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if add_action_group_ids is None and 'addActionGroupIds' in kwargs: + add_action_group_ids = kwargs['addActionGroupIds'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if add_action_group_ids is not None: - pulumi.set(__self__, "add_action_group_ids", add_action_group_ids) + _setter("add_action_group_ids", add_action_group_ids) if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="addActionGroupIds") @@ -479,6 +547,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AlertProcessingRuleActionGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -505,6 +577,11 @@ def _internal_init(__self__, if add_action_group_ids is None and not opts.urn: raise TypeError("Missing required property 'add_action_group_ids'") __props__.__dict__["add_action_group_ids"] = add_action_group_ids + if condition is not None and not isinstance(condition, AlertProcessingRuleActionGroupConditionArgs): + condition = condition or {} + def _setter(key, value): + condition[key] = value + AlertProcessingRuleActionGroupConditionArgs._configure(_setter, **condition) __props__.__dict__["condition"] = condition __props__.__dict__["description"] = description __props__.__dict__["enabled"] = enabled @@ -512,6 +589,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if schedule is not None and not isinstance(schedule, AlertProcessingRuleActionGroupScheduleArgs): + schedule = schedule or {} + def _setter(key, value): + schedule[key] = value + AlertProcessingRuleActionGroupScheduleArgs._configure(_setter, **schedule) __props__.__dict__["schedule"] = schedule if scopes is None and not opts.urn: raise TypeError("Missing required property 'scopes'") diff --git a/sdk/python/pulumi_azure/monitoring/alert_processing_rule_suppression.py b/sdk/python/pulumi_azure/monitoring/alert_processing_rule_suppression.py index a8f92125cc..936d5ada44 100644 --- a/sdk/python/pulumi_azure/monitoring/alert_processing_rule_suppression.py +++ b/sdk/python/pulumi_azure/monitoring/alert_processing_rule_suppression.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,20 +35,51 @@ def __init__(__self__, *, :param pulumi.Input['AlertProcessingRuleSuppressionScheduleArgs'] schedule: A `schedule` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Alert Processing Rule. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scopes", scopes) + AlertProcessingRuleSuppressionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + scopes=scopes, + condition=condition, + description=description, + enabled=enabled, + name=name, + schedule=schedule, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + condition: Optional[pulumi.Input['AlertProcessingRuleSuppressionConditionArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['AlertProcessingRuleSuppressionScheduleArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scopes is None: + raise TypeError("Missing 'scopes' argument") + + _setter("resource_group_name", resource_group_name) + _setter("scopes", scopes) if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -169,22 +200,49 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: A list of resource IDs which will be the target of Alert Processing Rule. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Alert Processing Rule. """ + _AlertProcessingRuleSuppressionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + condition=condition, + description=description, + enabled=enabled, + name=name, + resource_group_name=resource_group_name, + schedule=schedule, + scopes=scopes, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + condition: Optional[pulumi.Input['AlertProcessingRuleSuppressionConditionArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['AlertProcessingRuleSuppressionScheduleArgs']] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -438,6 +496,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AlertProcessingRuleSuppressionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -460,6 +522,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = AlertProcessingRuleSuppressionArgs.__new__(AlertProcessingRuleSuppressionArgs) + if condition is not None and not isinstance(condition, AlertProcessingRuleSuppressionConditionArgs): + condition = condition or {} + def _setter(key, value): + condition[key] = value + AlertProcessingRuleSuppressionConditionArgs._configure(_setter, **condition) __props__.__dict__["condition"] = condition __props__.__dict__["description"] = description __props__.__dict__["enabled"] = enabled @@ -467,6 +534,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if schedule is not None and not isinstance(schedule, AlertProcessingRuleSuppressionScheduleArgs): + schedule = schedule or {} + def _setter(key, value): + schedule[key] = value + AlertProcessingRuleSuppressionScheduleArgs._configure(_setter, **schedule) __props__.__dict__["schedule"] = schedule if scopes is None and not opts.urn: raise TypeError("Missing required property 'scopes'") diff --git a/sdk/python/pulumi_azure/monitoring/alert_prometheus_rule_group.py b/sdk/python/pulumi_azure/monitoring/alert_prometheus_rule_group.py index 5064262c86..28744b547a 100644 --- a/sdk/python/pulumi_azure/monitoring/alert_prometheus_rule_group.py +++ b/sdk/python/pulumi_azure/monitoring/alert_prometheus_rule_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,23 +39,64 @@ def __init__(__self__, *, :param pulumi.Input[bool] rule_group_enabled: Is this Alert Management Prometheus Rule Group enabled? Possible values are `true` and `false`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Alert Management Prometheus Rule Group. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "rules", rules) - pulumi.set(__self__, "scopes", scopes) + AlertPrometheusRuleGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + rules=rules, + scopes=scopes, + cluster_name=cluster_name, + description=description, + interval=interval, + location=location, + name=name, + rule_group_enabled=rule_group_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['AlertPrometheusRuleGroupRuleArgs']]]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cluster_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rule_group_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if rules is None: + raise TypeError("Missing 'rules' argument") + if scopes is None: + raise TypeError("Missing 'scopes' argument") + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if rule_group_enabled is None and 'ruleGroupEnabled' in kwargs: + rule_group_enabled = kwargs['ruleGroupEnabled'] + + _setter("resource_group_name", resource_group_name) + _setter("rules", rules) + _setter("scopes", scopes) if cluster_name is not None: - pulumi.set(__self__, "cluster_name", cluster_name) + _setter("cluster_name", cluster_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rule_group_enabled is not None: - pulumi.set(__self__, "rule_group_enabled", rule_group_enabled) + _setter("rule_group_enabled", rule_group_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -204,26 +245,61 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: Specifies the resource ID of the Azure Monitor Workspace. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Alert Management Prometheus Rule Group. """ + _AlertPrometheusRuleGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_name=cluster_name, + description=description, + interval=interval, + location=location, + name=name, + resource_group_name=resource_group_name, + rule_group_enabled=rule_group_enabled, + rules=rules, + scopes=scopes, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + interval: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rule_group_enabled: Optional[pulumi.Input[bool]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['AlertPrometheusRuleGroupRuleArgs']]]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_name is None and 'clusterName' in kwargs: + cluster_name = kwargs['clusterName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if rule_group_enabled is None and 'ruleGroupEnabled' in kwargs: + rule_group_enabled = kwargs['ruleGroupEnabled'] + if cluster_name is not None: - pulumi.set(__self__, "cluster_name", cluster_name) + _setter("cluster_name", cluster_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if interval is not None: - pulumi.set(__self__, "interval", interval) + _setter("interval", interval) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rule_group_enabled is not None: - pulumi.set(__self__, "rule_group_enabled", rule_group_enabled) + _setter("rule_group_enabled", rule_group_enabled) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="clusterName") @@ -413,6 +489,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AlertPrometheusRuleGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/monitoring/autoscale_setting.py b/sdk/python/pulumi_azure/monitoring/autoscale_setting.py index 6e7c7e953d..5272424eb5 100644 --- a/sdk/python/pulumi_azure/monitoring/autoscale_setting.py +++ b/sdk/python/pulumi_azure/monitoring/autoscale_setting.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,21 +37,58 @@ def __init__(__self__, *, :param pulumi.Input['AutoscaleSettingPredictiveArgs'] predictive: A `predictive` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "profiles", profiles) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "target_resource_id", target_resource_id) + AutoscaleSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + profiles=profiles, + resource_group_name=resource_group_name, + target_resource_id=target_resource_id, + enabled=enabled, + location=location, + name=name, + notification=notification, + predictive=predictive, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + profiles: Optional[pulumi.Input[Sequence[pulumi.Input['AutoscaleSettingProfileArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notification: Optional[pulumi.Input['AutoscaleSettingNotificationArgs']] = None, + predictive: Optional[pulumi.Input['AutoscaleSettingPredictiveArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if profiles is None: + raise TypeError("Missing 'profiles' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + + _setter("profiles", profiles) + _setter("resource_group_name", resource_group_name) + _setter("target_resource_id", target_resource_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notification is not None: - pulumi.set(__self__, "notification", notification) + _setter("notification", notification) if predictive is not None: - pulumi.set(__self__, "predictive", predictive) + _setter("predictive", predictive) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -186,24 +223,55 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] target_resource_id: Specifies the resource ID of the resource that the autoscale setting should be added to. Changing this forces a new resource to be created. """ + _AutoscaleSettingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + location=location, + name=name, + notification=notification, + predictive=predictive, + profiles=profiles, + resource_group_name=resource_group_name, + tags=tags, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notification: Optional[pulumi.Input['AutoscaleSettingNotificationArgs']] = None, + predictive: Optional[pulumi.Input['AutoscaleSettingPredictiveArgs']] = None, + profiles: Optional[pulumi.Input[Sequence[pulumi.Input['AutoscaleSettingProfileArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notification is not None: - pulumi.set(__self__, "notification", notification) + _setter("notification", notification) if predictive is not None: - pulumi.set(__self__, "predictive", predictive) + _setter("predictive", predictive) if profiles is not None: - pulumi.set(__self__, "profiles", profiles) + _setter("profiles", profiles) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter @@ -825,6 +893,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AutoscaleSettingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -851,7 +923,17 @@ def _internal_init(__self__, __props__.__dict__["enabled"] = enabled __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if notification is not None and not isinstance(notification, AutoscaleSettingNotificationArgs): + notification = notification or {} + def _setter(key, value): + notification[key] = value + AutoscaleSettingNotificationArgs._configure(_setter, **notification) __props__.__dict__["notification"] = notification + if predictive is not None and not isinstance(predictive, AutoscaleSettingPredictiveArgs): + predictive = predictive or {} + def _setter(key, value): + predictive[key] = value + AutoscaleSettingPredictiveArgs._configure(_setter, **predictive) __props__.__dict__["predictive"] = predictive if profiles is None and not opts.urn: raise TypeError("Missing required property 'profiles'") diff --git a/sdk/python/pulumi_azure/monitoring/data_collection_endpoint.py b/sdk/python/pulumi_azure/monitoring/data_collection_endpoint.py index 0af6de57d2..e8e305e8d3 100644 --- a/sdk/python/pulumi_azure/monitoring/data_collection_endpoint.py +++ b/sdk/python/pulumi_azure/monitoring/data_collection_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataCollectionEndpointArgs', 'DataCollectionEndpoint'] @@ -31,19 +31,48 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether network access from public internet to the Data Collection Endpoint are allowed. Possible values are `true` and `false`. Default to `true`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Data Collection Endpoint. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + DataCollectionEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + description=description, + kind=kind, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -154,24 +183,59 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Data Collection Endpoint. """ + _DataCollectionEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + configuration_access_endpoint=configuration_access_endpoint, + description=description, + kind=kind, + location=location, + logs_ingestion_endpoint=logs_ingestion_endpoint, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + configuration_access_endpoint: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logs_ingestion_endpoint: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if configuration_access_endpoint is None and 'configurationAccessEndpoint' in kwargs: + configuration_access_endpoint = kwargs['configurationAccessEndpoint'] + if logs_ingestion_endpoint is None and 'logsIngestionEndpoint' in kwargs: + logs_ingestion_endpoint = kwargs['logsIngestionEndpoint'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if configuration_access_endpoint is not None: - pulumi.set(__self__, "configuration_access_endpoint", configuration_access_endpoint) + _setter("configuration_access_endpoint", configuration_access_endpoint) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logs_ingestion_endpoint is not None: - pulumi.set(__self__, "logs_ingestion_endpoint", logs_ingestion_endpoint) + _setter("logs_ingestion_endpoint", logs_ingestion_endpoint) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="configurationAccessEndpoint") @@ -379,6 +443,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataCollectionEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/monitoring/data_collection_rule.py b/sdk/python/pulumi_azure/monitoring/data_collection_rule.py index 30baae3239..3a56d0eae1 100644 --- a/sdk/python/pulumi_azure/monitoring/data_collection_rule.py +++ b/sdk/python/pulumi_azure/monitoring/data_collection_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,27 +45,76 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleStreamDeclarationArgs']]] stream_declarations: A `stream_declaration` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Data Collection Rule. """ - pulumi.set(__self__, "data_flows", data_flows) - pulumi.set(__self__, "destinations", destinations) - pulumi.set(__self__, "resource_group_name", resource_group_name) + DataCollectionRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_flows=data_flows, + destinations=destinations, + resource_group_name=resource_group_name, + data_collection_endpoint_id=data_collection_endpoint_id, + data_sources=data_sources, + description=description, + identity=identity, + kind=kind, + location=location, + name=name, + stream_declarations=stream_declarations, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_flows: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataFlowArgs']]]] = None, + destinations: Optional[pulumi.Input['DataCollectionRuleDestinationsArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + data_collection_endpoint_id: Optional[pulumi.Input[str]] = None, + data_sources: Optional[pulumi.Input['DataCollectionRuleDataSourcesArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['DataCollectionRuleIdentityArgs']] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + stream_declarations: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleStreamDeclarationArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_flows is None and 'dataFlows' in kwargs: + data_flows = kwargs['dataFlows'] + if data_flows is None: + raise TypeError("Missing 'data_flows' argument") + if destinations is None: + raise TypeError("Missing 'destinations' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if data_collection_endpoint_id is None and 'dataCollectionEndpointId' in kwargs: + data_collection_endpoint_id = kwargs['dataCollectionEndpointId'] + if data_sources is None and 'dataSources' in kwargs: + data_sources = kwargs['dataSources'] + if stream_declarations is None and 'streamDeclarations' in kwargs: + stream_declarations = kwargs['streamDeclarations'] + + _setter("data_flows", data_flows) + _setter("destinations", destinations) + _setter("resource_group_name", resource_group_name) if data_collection_endpoint_id is not None: - pulumi.set(__self__, "data_collection_endpoint_id", data_collection_endpoint_id) + _setter("data_collection_endpoint_id", data_collection_endpoint_id) if data_sources is not None: - pulumi.set(__self__, "data_sources", data_sources) + _setter("data_sources", data_sources) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if stream_declarations is not None: - pulumi.set(__self__, "stream_declarations", stream_declarations) + _setter("stream_declarations", stream_declarations) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dataFlows") @@ -248,32 +297,79 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleStreamDeclarationArgs']]] stream_declarations: A `stream_declaration` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Data Collection Rule. """ + _DataCollectionRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_collection_endpoint_id=data_collection_endpoint_id, + data_flows=data_flows, + data_sources=data_sources, + description=description, + destinations=destinations, + identity=identity, + immutable_id=immutable_id, + kind=kind, + location=location, + name=name, + resource_group_name=resource_group_name, + stream_declarations=stream_declarations, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_collection_endpoint_id: Optional[pulumi.Input[str]] = None, + data_flows: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleDataFlowArgs']]]] = None, + data_sources: Optional[pulumi.Input['DataCollectionRuleDataSourcesArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + destinations: Optional[pulumi.Input['DataCollectionRuleDestinationsArgs']] = None, + identity: Optional[pulumi.Input['DataCollectionRuleIdentityArgs']] = None, + immutable_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + stream_declarations: Optional[pulumi.Input[Sequence[pulumi.Input['DataCollectionRuleStreamDeclarationArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_collection_endpoint_id is None and 'dataCollectionEndpointId' in kwargs: + data_collection_endpoint_id = kwargs['dataCollectionEndpointId'] + if data_flows is None and 'dataFlows' in kwargs: + data_flows = kwargs['dataFlows'] + if data_sources is None and 'dataSources' in kwargs: + data_sources = kwargs['dataSources'] + if immutable_id is None and 'immutableId' in kwargs: + immutable_id = kwargs['immutableId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if stream_declarations is None and 'streamDeclarations' in kwargs: + stream_declarations = kwargs['streamDeclarations'] + if data_collection_endpoint_id is not None: - pulumi.set(__self__, "data_collection_endpoint_id", data_collection_endpoint_id) + _setter("data_collection_endpoint_id", data_collection_endpoint_id) if data_flows is not None: - pulumi.set(__self__, "data_flows", data_flows) + _setter("data_flows", data_flows) if data_sources is not None: - pulumi.set(__self__, "data_sources", data_sources) + _setter("data_sources", data_sources) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destinations is not None: - pulumi.set(__self__, "destinations", destinations) + _setter("destinations", destinations) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if immutable_id is not None: - pulumi.set(__self__, "immutable_id", immutable_id) + _setter("immutable_id", immutable_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if stream_declarations is not None: - pulumi.set(__self__, "stream_declarations", stream_declarations) + _setter("stream_declarations", stream_declarations) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dataCollectionEndpointId") @@ -833,6 +929,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataCollectionRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -863,11 +963,26 @@ def _internal_init(__self__, if data_flows is None and not opts.urn: raise TypeError("Missing required property 'data_flows'") __props__.__dict__["data_flows"] = data_flows + if data_sources is not None and not isinstance(data_sources, DataCollectionRuleDataSourcesArgs): + data_sources = data_sources or {} + def _setter(key, value): + data_sources[key] = value + DataCollectionRuleDataSourcesArgs._configure(_setter, **data_sources) __props__.__dict__["data_sources"] = data_sources __props__.__dict__["description"] = description + if destinations is not None and not isinstance(destinations, DataCollectionRuleDestinationsArgs): + destinations = destinations or {} + def _setter(key, value): + destinations[key] = value + DataCollectionRuleDestinationsArgs._configure(_setter, **destinations) if destinations is None and not opts.urn: raise TypeError("Missing required property 'destinations'") __props__.__dict__["destinations"] = destinations + if identity is not None and not isinstance(identity, DataCollectionRuleIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + DataCollectionRuleIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["kind"] = kind __props__.__dict__["location"] = location diff --git a/sdk/python/pulumi_azure/monitoring/data_collection_rule_association.py b/sdk/python/pulumi_azure/monitoring/data_collection_rule_association.py index 583e6c96d2..3356d3039e 100644 --- a/sdk/python/pulumi_azure/monitoring/data_collection_rule_association.py +++ b/sdk/python/pulumi_azure/monitoring/data_collection_rule_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataCollectionRuleAssociationArgs', 'DataCollectionRuleAssociation'] @@ -31,15 +31,42 @@ def __init__(__self__, *, > **NOTE** `name` is required when `data_collection_rule_id` is specified. And when `data_collection_endpoint_id` is specified, the `name` is populated with `configurationAccessEndpoint`. """ - pulumi.set(__self__, "target_resource_id", target_resource_id) + DataCollectionRuleAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_resource_id=target_resource_id, + data_collection_endpoint_id=data_collection_endpoint_id, + data_collection_rule_id=data_collection_rule_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_resource_id: Optional[pulumi.Input[str]] = None, + data_collection_endpoint_id: Optional[pulumi.Input[str]] = None, + data_collection_rule_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + if data_collection_endpoint_id is None and 'dataCollectionEndpointId' in kwargs: + data_collection_endpoint_id = kwargs['dataCollectionEndpointId'] + if data_collection_rule_id is None and 'dataCollectionRuleId' in kwargs: + data_collection_rule_id = kwargs['dataCollectionRuleId'] + + _setter("target_resource_id", target_resource_id) if data_collection_endpoint_id is not None: - pulumi.set(__self__, "data_collection_endpoint_id", data_collection_endpoint_id) + _setter("data_collection_endpoint_id", data_collection_endpoint_id) if data_collection_rule_id is not None: - pulumi.set(__self__, "data_collection_rule_id", data_collection_rule_id) + _setter("data_collection_rule_id", data_collection_rule_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="targetResourceId") @@ -126,16 +153,41 @@ def __init__(__self__, *, > **NOTE** `name` is required when `data_collection_rule_id` is specified. And when `data_collection_endpoint_id` is specified, the `name` is populated with `configurationAccessEndpoint`. :param pulumi.Input[str] target_resource_id: The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created. """ + _DataCollectionRuleAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_collection_endpoint_id=data_collection_endpoint_id, + data_collection_rule_id=data_collection_rule_id, + description=description, + name=name, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_collection_endpoint_id: Optional[pulumi.Input[str]] = None, + data_collection_rule_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_collection_endpoint_id is None and 'dataCollectionEndpointId' in kwargs: + data_collection_endpoint_id = kwargs['dataCollectionEndpointId'] + if data_collection_rule_id is None and 'dataCollectionRuleId' in kwargs: + data_collection_rule_id = kwargs['dataCollectionRuleId'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if data_collection_endpoint_id is not None: - pulumi.set(__self__, "data_collection_endpoint_id", data_collection_endpoint_id) + _setter("data_collection_endpoint_id", data_collection_endpoint_id) if data_collection_rule_id is not None: - pulumi.set(__self__, "data_collection_rule_id", data_collection_rule_id) + _setter("data_collection_rule_id", data_collection_rule_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter(name="dataCollectionEndpointId") @@ -399,6 +451,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataCollectionRuleAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/monitoring/diagnostic_setting.py b/sdk/python/pulumi_azure/monitoring/diagnostic_setting.py index cb2f2456b3..e710095d62 100644 --- a/sdk/python/pulumi_azure/monitoring/diagnostic_setting.py +++ b/sdk/python/pulumi_azure/monitoring/diagnostic_setting.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -63,30 +63,79 @@ def __init__(__self__, *, > **NOTE:** At least one of `eventhub_authorization_rule_id`, `log_analytics_workspace_id`, `partner_solution_id` and `storage_account_id` must be specified. """ - pulumi.set(__self__, "target_resource_id", target_resource_id) + DiagnosticSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + target_resource_id=target_resource_id, + enabled_logs=enabled_logs, + eventhub_authorization_rule_id=eventhub_authorization_rule_id, + eventhub_name=eventhub_name, + log_analytics_destination_type=log_analytics_destination_type, + log_analytics_workspace_id=log_analytics_workspace_id, + logs=logs, + metrics=metrics, + name=name, + partner_solution_id=partner_solution_id, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + target_resource_id: Optional[pulumi.Input[str]] = None, + enabled_logs: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticSettingEnabledLogArgs']]]] = None, + eventhub_authorization_rule_id: Optional[pulumi.Input[str]] = None, + eventhub_name: Optional[pulumi.Input[str]] = None, + log_analytics_destination_type: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticSettingLogArgs']]]] = None, + metrics: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticSettingMetricArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + partner_solution_id: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + if enabled_logs is None and 'enabledLogs' in kwargs: + enabled_logs = kwargs['enabledLogs'] + if eventhub_authorization_rule_id is None and 'eventhubAuthorizationRuleId' in kwargs: + eventhub_authorization_rule_id = kwargs['eventhubAuthorizationRuleId'] + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if log_analytics_destination_type is None and 'logAnalyticsDestinationType' in kwargs: + log_analytics_destination_type = kwargs['logAnalyticsDestinationType'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if partner_solution_id is None and 'partnerSolutionId' in kwargs: + partner_solution_id = kwargs['partnerSolutionId'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + + _setter("target_resource_id", target_resource_id) if enabled_logs is not None: - pulumi.set(__self__, "enabled_logs", enabled_logs) + _setter("enabled_logs", enabled_logs) if eventhub_authorization_rule_id is not None: - pulumi.set(__self__, "eventhub_authorization_rule_id", eventhub_authorization_rule_id) + _setter("eventhub_authorization_rule_id", eventhub_authorization_rule_id) if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if log_analytics_destination_type is not None: - pulumi.set(__self__, "log_analytics_destination_type", log_analytics_destination_type) + _setter("log_analytics_destination_type", log_analytics_destination_type) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if logs is not None: warnings.warn("""`log` has been superseded by `enabled_log` and will be removed in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""logs is deprecated: `log` has been superseded by `enabled_log` and will be removed in version 4.0 of the AzureRM Provider.""") if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if metrics is not None: - pulumi.set(__self__, "metrics", metrics) + _setter("metrics", metrics) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partner_solution_id is not None: - pulumi.set(__self__, "partner_solution_id", partner_solution_id) + _setter("partner_solution_id", partner_solution_id) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="targetResourceId") @@ -296,31 +345,78 @@ def __init__(__self__, *, > **NOTE:** At least one of `eventhub_authorization_rule_id`, `log_analytics_workspace_id`, `partner_solution_id` and `storage_account_id` must be specified. :param pulumi.Input[str] target_resource_id: The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created. """ + _DiagnosticSettingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled_logs=enabled_logs, + eventhub_authorization_rule_id=eventhub_authorization_rule_id, + eventhub_name=eventhub_name, + log_analytics_destination_type=log_analytics_destination_type, + log_analytics_workspace_id=log_analytics_workspace_id, + logs=logs, + metrics=metrics, + name=name, + partner_solution_id=partner_solution_id, + storage_account_id=storage_account_id, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled_logs: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticSettingEnabledLogArgs']]]] = None, + eventhub_authorization_rule_id: Optional[pulumi.Input[str]] = None, + eventhub_name: Optional[pulumi.Input[str]] = None, + log_analytics_destination_type: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + logs: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticSettingLogArgs']]]] = None, + metrics: Optional[pulumi.Input[Sequence[pulumi.Input['DiagnosticSettingMetricArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + partner_solution_id: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled_logs is None and 'enabledLogs' in kwargs: + enabled_logs = kwargs['enabledLogs'] + if eventhub_authorization_rule_id is None and 'eventhubAuthorizationRuleId' in kwargs: + eventhub_authorization_rule_id = kwargs['eventhubAuthorizationRuleId'] + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if log_analytics_destination_type is None and 'logAnalyticsDestinationType' in kwargs: + log_analytics_destination_type = kwargs['logAnalyticsDestinationType'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if partner_solution_id is None and 'partnerSolutionId' in kwargs: + partner_solution_id = kwargs['partnerSolutionId'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if enabled_logs is not None: - pulumi.set(__self__, "enabled_logs", enabled_logs) + _setter("enabled_logs", enabled_logs) if eventhub_authorization_rule_id is not None: - pulumi.set(__self__, "eventhub_authorization_rule_id", eventhub_authorization_rule_id) + _setter("eventhub_authorization_rule_id", eventhub_authorization_rule_id) if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if log_analytics_destination_type is not None: - pulumi.set(__self__, "log_analytics_destination_type", log_analytics_destination_type) + _setter("log_analytics_destination_type", log_analytics_destination_type) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if logs is not None: warnings.warn("""`log` has been superseded by `enabled_log` and will be removed in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""logs is deprecated: `log` has been superseded by `enabled_log` and will be removed in version 4.0 of the AzureRM Provider.""") if logs is not None: - pulumi.set(__self__, "logs", logs) + _setter("logs", logs) if metrics is not None: - pulumi.set(__self__, "metrics", metrics) + _setter("metrics", metrics) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partner_solution_id is not None: - pulumi.set(__self__, "partner_solution_id", partner_solution_id) + _setter("partner_solution_id", partner_solution_id) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter(name="enabledLogs") @@ -645,6 +741,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DiagnosticSettingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/monitoring/get_action_group.py b/sdk/python/pulumi_azure/monitoring/get_action_group.py index 99f829ca97..18fe7dd35b 100644 --- a/sdk/python/pulumi_azure/monitoring/get_action_group.py +++ b/sdk/python/pulumi_azure/monitoring/get_action_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/monitoring/get_data_collection_endpoint.py b/sdk/python/pulumi_azure/monitoring/get_data_collection_endpoint.py index 58f20b6b7f..e4ea5b8afb 100644 --- a/sdk/python/pulumi_azure/monitoring/get_data_collection_endpoint.py +++ b/sdk/python/pulumi_azure/monitoring/get_data_collection_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/monitoring/get_data_collection_rule.py b/sdk/python/pulumi_azure/monitoring/get_data_collection_rule.py index 8faf712a61..2f3f0cfa69 100644 --- a/sdk/python/pulumi_azure/monitoring/get_data_collection_rule.py +++ b/sdk/python/pulumi_azure/monitoring/get_data_collection_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/monitoring/get_diagnostic_categories.py b/sdk/python/pulumi_azure/monitoring/get_diagnostic_categories.py index f44fc6dcba..c1ae942de8 100644 --- a/sdk/python/pulumi_azure/monitoring/get_diagnostic_categories.py +++ b/sdk/python/pulumi_azure/monitoring/get_diagnostic_categories.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/monitoring/get_log_profile.py b/sdk/python/pulumi_azure/monitoring/get_log_profile.py index 2e8b618f99..4b321775dd 100644 --- a/sdk/python/pulumi_azure/monitoring/get_log_profile.py +++ b/sdk/python/pulumi_azure/monitoring/get_log_profile.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/monitoring/get_scheduled_query_rules_alert.py b/sdk/python/pulumi_azure/monitoring/get_scheduled_query_rules_alert.py index 72116254ae..7aac4b433c 100644 --- a/sdk/python/pulumi_azure/monitoring/get_scheduled_query_rules_alert.py +++ b/sdk/python/pulumi_azure/monitoring/get_scheduled_query_rules_alert.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/monitoring/get_scheduled_query_rules_log.py b/sdk/python/pulumi_azure/monitoring/get_scheduled_query_rules_log.py index e75f039e4e..96e29ce897 100644 --- a/sdk/python/pulumi_azure/monitoring/get_scheduled_query_rules_log.py +++ b/sdk/python/pulumi_azure/monitoring/get_scheduled_query_rules_log.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/monitoring/log_profile.py b/sdk/python/pulumi_azure/monitoring/log_profile.py index bfa63210b9..11d47a62d1 100644 --- a/sdk/python/pulumi_azure/monitoring/log_profile.py +++ b/sdk/python/pulumi_azure/monitoring/log_profile.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,15 +31,48 @@ def __init__(__self__, *, :param pulumi.Input[str] servicebus_rule_id: The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to. At least one of `storage_account_id` or `servicebus_rule_id` must be set. :param pulumi.Input[str] storage_account_id: The resource ID of the storage account in which the Activity Log is stored. At least one of `storage_account_id` or `servicebus_rule_id` must be set. """ - pulumi.set(__self__, "categories", categories) - pulumi.set(__self__, "locations", locations) - pulumi.set(__self__, "retention_policy", retention_policy) + LogProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + categories=categories, + locations=locations, + retention_policy=retention_policy, + name=name, + servicebus_rule_id=servicebus_rule_id, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + categories: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + locations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + retention_policy: Optional[pulumi.Input['LogProfileRetentionPolicyArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + servicebus_rule_id: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if categories is None: + raise TypeError("Missing 'categories' argument") + if locations is None: + raise TypeError("Missing 'locations' argument") + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if retention_policy is None: + raise TypeError("Missing 'retention_policy' argument") + if servicebus_rule_id is None and 'servicebusRuleId' in kwargs: + servicebus_rule_id = kwargs['servicebusRuleId'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + + _setter("categories", categories) + _setter("locations", locations) + _setter("retention_policy", retention_policy) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if servicebus_rule_id is not None: - pulumi.set(__self__, "servicebus_rule_id", servicebus_rule_id) + _setter("servicebus_rule_id", servicebus_rule_id) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter @@ -132,18 +165,45 @@ def __init__(__self__, *, :param pulumi.Input[str] servicebus_rule_id: The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to. At least one of `storage_account_id` or `servicebus_rule_id` must be set. :param pulumi.Input[str] storage_account_id: The resource ID of the storage account in which the Activity Log is stored. At least one of `storage_account_id` or `servicebus_rule_id` must be set. """ + _LogProfileState._configure( + lambda key, value: pulumi.set(__self__, key, value), + categories=categories, + locations=locations, + name=name, + retention_policy=retention_policy, + servicebus_rule_id=servicebus_rule_id, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + categories: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + locations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + retention_policy: Optional[pulumi.Input['LogProfileRetentionPolicyArgs']] = None, + servicebus_rule_id: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if servicebus_rule_id is None and 'servicebusRuleId' in kwargs: + servicebus_rule_id = kwargs['servicebusRuleId'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if categories is not None: - pulumi.set(__self__, "categories", categories) + _setter("categories", categories) if locations is not None: - pulumi.set(__self__, "locations", locations) + _setter("locations", locations) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) if servicebus_rule_id is not None: - pulumi.set(__self__, "servicebus_rule_id", servicebus_rule_id) + _setter("servicebus_rule_id", servicebus_rule_id) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter @@ -355,6 +415,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LogProfileArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -382,6 +446,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'locations'") __props__.__dict__["locations"] = locations __props__.__dict__["name"] = name + if retention_policy is not None and not isinstance(retention_policy, LogProfileRetentionPolicyArgs): + retention_policy = retention_policy or {} + def _setter(key, value): + retention_policy[key] = value + LogProfileRetentionPolicyArgs._configure(_setter, **retention_policy) if retention_policy is None and not opts.urn: raise TypeError("Missing required property 'retention_policy'") __props__.__dict__["retention_policy"] = retention_policy diff --git a/sdk/python/pulumi_azure/monitoring/logz_monitor.py b/sdk/python/pulumi_azure/monitoring/logz_monitor.py index 6b7f5b5566..fc5dd2404a 100644 --- a/sdk/python/pulumi_azure/monitoring/logz_monitor.py +++ b/sdk/python/pulumi_azure/monitoring/logz_monitor.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,21 +39,60 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this logz Monitor. Changing this forces a new logz Monitor to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the logz Monitor. """ - pulumi.set(__self__, "plan", plan) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "user", user) + LogzMonitorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + plan=plan, + resource_group_name=resource_group_name, + user=user, + company_name=company_name, + enabled=enabled, + enterprise_app_id=enterprise_app_id, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + plan: Optional[pulumi.Input['LogzMonitorPlanArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + user: Optional[pulumi.Input['LogzMonitorUserArgs']] = None, + company_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + enterprise_app_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if plan is None: + raise TypeError("Missing 'plan' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if user is None: + raise TypeError("Missing 'user' argument") + if company_name is None and 'companyName' in kwargs: + company_name = kwargs['companyName'] + if enterprise_app_id is None and 'enterpriseAppId' in kwargs: + enterprise_app_id = kwargs['enterpriseAppId'] + + _setter("plan", plan) + _setter("resource_group_name", resource_group_name) + _setter("user", user) if company_name is not None: - pulumi.set(__self__, "company_name", company_name) + _setter("company_name", company_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if enterprise_app_id is not None: - pulumi.set(__self__, "enterprise_app_id", enterprise_app_id) + _setter("enterprise_app_id", enterprise_app_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -196,28 +235,69 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the logz Monitor. :param pulumi.Input['LogzMonitorUserArgs'] user: A `user` block as defined below. Changing this forces a new resource to be created. """ + _LogzMonitorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + company_name=company_name, + enabled=enabled, + enterprise_app_id=enterprise_app_id, + location=location, + logz_organization_id=logz_organization_id, + name=name, + plan=plan, + resource_group_name=resource_group_name, + single_sign_on_url=single_sign_on_url, + tags=tags, + user=user, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + company_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + enterprise_app_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logz_organization_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + plan: Optional[pulumi.Input['LogzMonitorPlanArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + single_sign_on_url: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + user: Optional[pulumi.Input['LogzMonitorUserArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if company_name is None and 'companyName' in kwargs: + company_name = kwargs['companyName'] + if enterprise_app_id is None and 'enterpriseAppId' in kwargs: + enterprise_app_id = kwargs['enterpriseAppId'] + if logz_organization_id is None and 'logzOrganizationId' in kwargs: + logz_organization_id = kwargs['logzOrganizationId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if single_sign_on_url is None and 'singleSignOnUrl' in kwargs: + single_sign_on_url = kwargs['singleSignOnUrl'] + if company_name is not None: - pulumi.set(__self__, "company_name", company_name) + _setter("company_name", company_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if enterprise_app_id is not None: - pulumi.set(__self__, "enterprise_app_id", enterprise_app_id) + _setter("enterprise_app_id", enterprise_app_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logz_organization_id is not None: - pulumi.set(__self__, "logz_organization_id", logz_organization_id) + _setter("logz_organization_id", logz_organization_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if single_sign_on_url is not None: - pulumi.set(__self__, "single_sign_on_url", single_sign_on_url) + _setter("single_sign_on_url", single_sign_on_url) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if user is not None: - pulumi.set(__self__, "user", user) + _setter("user", user) @property @pulumi.getter(name="companyName") @@ -467,6 +547,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LogzMonitorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -495,6 +579,11 @@ def _internal_init(__self__, __props__.__dict__["enterprise_app_id"] = enterprise_app_id __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if plan is not None and not isinstance(plan, LogzMonitorPlanArgs): + plan = plan or {} + def _setter(key, value): + plan[key] = value + LogzMonitorPlanArgs._configure(_setter, **plan) if plan is None and not opts.urn: raise TypeError("Missing required property 'plan'") __props__.__dict__["plan"] = plan @@ -502,6 +591,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["tags"] = tags + if user is not None and not isinstance(user, LogzMonitorUserArgs): + user = user or {} + def _setter(key, value): + user[key] = value + LogzMonitorUserArgs._configure(_setter, **user) if user is None and not opts.urn: raise TypeError("Missing required property 'user'") __props__.__dict__["user"] = user diff --git a/sdk/python/pulumi_azure/monitoring/logz_sub_account.py b/sdk/python/pulumi_azure/monitoring/logz_sub_account.py index 2a6665f190..abf4888f5f 100644 --- a/sdk/python/pulumi_azure/monitoring/logz_sub_account.py +++ b/sdk/python/pulumi_azure/monitoring/logz_sub_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,39 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this logz Sub Account. Possible values must be between 1 and 32 characters in length and may contain only letters, numbers, hyphens and underscores. Changing this forces a new logz Sub Account to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the logz Sub Account. """ - pulumi.set(__self__, "logz_monitor_id", logz_monitor_id) - pulumi.set(__self__, "user", user) + LogzSubAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + logz_monitor_id=logz_monitor_id, + user=user, + enabled=enabled, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + logz_monitor_id: Optional[pulumi.Input[str]] = None, + user: Optional[pulumi.Input['LogzSubAccountUserArgs']] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logz_monitor_id is None and 'logzMonitorId' in kwargs: + logz_monitor_id = kwargs['logzMonitorId'] + if logz_monitor_id is None: + raise TypeError("Missing 'logz_monitor_id' argument") + if user is None: + raise TypeError("Missing 'user' argument") + + _setter("logz_monitor_id", logz_monitor_id) + _setter("user", user) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="logzMonitorId") @@ -115,16 +140,37 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the logz Sub Account. :param pulumi.Input['LogzSubAccountUserArgs'] user: A `user` block as defined below. Changing this forces a new resource to be created. """ + _LogzSubAccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + logz_monitor_id=logz_monitor_id, + name=name, + tags=tags, + user=user, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + logz_monitor_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + user: Optional[pulumi.Input['LogzSubAccountUserArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logz_monitor_id is None and 'logzMonitorId' in kwargs: + logz_monitor_id = kwargs['logzMonitorId'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if logz_monitor_id is not None: - pulumi.set(__self__, "logz_monitor_id", logz_monitor_id) + _setter("logz_monitor_id", logz_monitor_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if user is not None: - pulumi.set(__self__, "user", user) + _setter("user", user) @property @pulumi.getter @@ -306,6 +352,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LogzSubAccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -331,6 +381,11 @@ def _internal_init(__self__, __props__.__dict__["logz_monitor_id"] = logz_monitor_id __props__.__dict__["name"] = name __props__.__dict__["tags"] = tags + if user is not None and not isinstance(user, LogzSubAccountUserArgs): + user = user or {} + def _setter(key, value): + user[key] = value + LogzSubAccountUserArgs._configure(_setter, **user) if user is None and not opts.urn: raise TypeError("Missing required property 'user'") __props__.__dict__["user"] = user diff --git a/sdk/python/pulumi_azure/monitoring/logz_sub_account_tag_rule.py b/sdk/python/pulumi_azure/monitoring/logz_sub_account_tag_rule.py index 4f69e3db24..ad8778cfeb 100644 --- a/sdk/python/pulumi_azure/monitoring/logz_sub_account_tag_rule.py +++ b/sdk/python/pulumi_azure/monitoring/logz_sub_account_tag_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,15 +29,46 @@ def __init__(__self__, *, :param pulumi.Input[bool] send_subscription_logs: Whether subscription logs should be sent to the Monitor resource? :param pulumi.Input[Sequence[pulumi.Input['LogzSubAccountTagRuleTagFilterArgs']]] tag_filters: One or more (up to 10) `tag_filter` blocks as defined below. """ - pulumi.set(__self__, "logz_sub_account_id", logz_sub_account_id) + LogzSubAccountTagRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + logz_sub_account_id=logz_sub_account_id, + send_aad_logs=send_aad_logs, + send_activity_logs=send_activity_logs, + send_subscription_logs=send_subscription_logs, + tag_filters=tag_filters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + logz_sub_account_id: Optional[pulumi.Input[str]] = None, + send_aad_logs: Optional[pulumi.Input[bool]] = None, + send_activity_logs: Optional[pulumi.Input[bool]] = None, + send_subscription_logs: Optional[pulumi.Input[bool]] = None, + tag_filters: Optional[pulumi.Input[Sequence[pulumi.Input['LogzSubAccountTagRuleTagFilterArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logz_sub_account_id is None and 'logzSubAccountId' in kwargs: + logz_sub_account_id = kwargs['logzSubAccountId'] + if logz_sub_account_id is None: + raise TypeError("Missing 'logz_sub_account_id' argument") + if send_aad_logs is None and 'sendAadLogs' in kwargs: + send_aad_logs = kwargs['sendAadLogs'] + if send_activity_logs is None and 'sendActivityLogs' in kwargs: + send_activity_logs = kwargs['sendActivityLogs'] + if send_subscription_logs is None and 'sendSubscriptionLogs' in kwargs: + send_subscription_logs = kwargs['sendSubscriptionLogs'] + if tag_filters is None and 'tagFilters' in kwargs: + tag_filters = kwargs['tagFilters'] + + _setter("logz_sub_account_id", logz_sub_account_id) if send_aad_logs is not None: - pulumi.set(__self__, "send_aad_logs", send_aad_logs) + _setter("send_aad_logs", send_aad_logs) if send_activity_logs is not None: - pulumi.set(__self__, "send_activity_logs", send_activity_logs) + _setter("send_activity_logs", send_activity_logs) if send_subscription_logs is not None: - pulumi.set(__self__, "send_subscription_logs", send_subscription_logs) + _setter("send_subscription_logs", send_subscription_logs) if tag_filters is not None: - pulumi.set(__self__, "tag_filters", tag_filters) + _setter("tag_filters", tag_filters) @property @pulumi.getter(name="logzSubAccountId") @@ -116,16 +147,45 @@ def __init__(__self__, *, :param pulumi.Input[bool] send_subscription_logs: Whether subscription logs should be sent to the Monitor resource? :param pulumi.Input[Sequence[pulumi.Input['LogzSubAccountTagRuleTagFilterArgs']]] tag_filters: One or more (up to 10) `tag_filter` blocks as defined below. """ + _LogzSubAccountTagRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + logz_sub_account_id=logz_sub_account_id, + send_aad_logs=send_aad_logs, + send_activity_logs=send_activity_logs, + send_subscription_logs=send_subscription_logs, + tag_filters=tag_filters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + logz_sub_account_id: Optional[pulumi.Input[str]] = None, + send_aad_logs: Optional[pulumi.Input[bool]] = None, + send_activity_logs: Optional[pulumi.Input[bool]] = None, + send_subscription_logs: Optional[pulumi.Input[bool]] = None, + tag_filters: Optional[pulumi.Input[Sequence[pulumi.Input['LogzSubAccountTagRuleTagFilterArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logz_sub_account_id is None and 'logzSubAccountId' in kwargs: + logz_sub_account_id = kwargs['logzSubAccountId'] + if send_aad_logs is None and 'sendAadLogs' in kwargs: + send_aad_logs = kwargs['sendAadLogs'] + if send_activity_logs is None and 'sendActivityLogs' in kwargs: + send_activity_logs = kwargs['sendActivityLogs'] + if send_subscription_logs is None and 'sendSubscriptionLogs' in kwargs: + send_subscription_logs = kwargs['sendSubscriptionLogs'] + if tag_filters is None and 'tagFilters' in kwargs: + tag_filters = kwargs['tagFilters'] + if logz_sub_account_id is not None: - pulumi.set(__self__, "logz_sub_account_id", logz_sub_account_id) + _setter("logz_sub_account_id", logz_sub_account_id) if send_aad_logs is not None: - pulumi.set(__self__, "send_aad_logs", send_aad_logs) + _setter("send_aad_logs", send_aad_logs) if send_activity_logs is not None: - pulumi.set(__self__, "send_activity_logs", send_activity_logs) + _setter("send_activity_logs", send_activity_logs) if send_subscription_logs is not None: - pulumi.set(__self__, "send_subscription_logs", send_subscription_logs) + _setter("send_subscription_logs", send_subscription_logs) if tag_filters is not None: - pulumi.set(__self__, "tag_filters", tag_filters) + _setter("tag_filters", tag_filters) @property @pulumi.getter(name="logzSubAccountId") @@ -341,6 +401,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LogzSubAccountTagRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/monitoring/logz_tag_rule.py b/sdk/python/pulumi_azure/monitoring/logz_tag_rule.py index 059d9663c6..b1d4a64766 100644 --- a/sdk/python/pulumi_azure/monitoring/logz_tag_rule.py +++ b/sdk/python/pulumi_azure/monitoring/logz_tag_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,15 +29,46 @@ def __init__(__self__, *, :param pulumi.Input[bool] send_subscription_logs: Whether subscription logs should be sent to the Monitor resource? :param pulumi.Input[Sequence[pulumi.Input['LogzTagRuleTagFilterArgs']]] tag_filters: One or more (up to 10) `tag_filter` blocks as defined below. """ - pulumi.set(__self__, "logz_monitor_id", logz_monitor_id) + LogzTagRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + logz_monitor_id=logz_monitor_id, + send_aad_logs=send_aad_logs, + send_activity_logs=send_activity_logs, + send_subscription_logs=send_subscription_logs, + tag_filters=tag_filters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + logz_monitor_id: Optional[pulumi.Input[str]] = None, + send_aad_logs: Optional[pulumi.Input[bool]] = None, + send_activity_logs: Optional[pulumi.Input[bool]] = None, + send_subscription_logs: Optional[pulumi.Input[bool]] = None, + tag_filters: Optional[pulumi.Input[Sequence[pulumi.Input['LogzTagRuleTagFilterArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logz_monitor_id is None and 'logzMonitorId' in kwargs: + logz_monitor_id = kwargs['logzMonitorId'] + if logz_monitor_id is None: + raise TypeError("Missing 'logz_monitor_id' argument") + if send_aad_logs is None and 'sendAadLogs' in kwargs: + send_aad_logs = kwargs['sendAadLogs'] + if send_activity_logs is None and 'sendActivityLogs' in kwargs: + send_activity_logs = kwargs['sendActivityLogs'] + if send_subscription_logs is None and 'sendSubscriptionLogs' in kwargs: + send_subscription_logs = kwargs['sendSubscriptionLogs'] + if tag_filters is None and 'tagFilters' in kwargs: + tag_filters = kwargs['tagFilters'] + + _setter("logz_monitor_id", logz_monitor_id) if send_aad_logs is not None: - pulumi.set(__self__, "send_aad_logs", send_aad_logs) + _setter("send_aad_logs", send_aad_logs) if send_activity_logs is not None: - pulumi.set(__self__, "send_activity_logs", send_activity_logs) + _setter("send_activity_logs", send_activity_logs) if send_subscription_logs is not None: - pulumi.set(__self__, "send_subscription_logs", send_subscription_logs) + _setter("send_subscription_logs", send_subscription_logs) if tag_filters is not None: - pulumi.set(__self__, "tag_filters", tag_filters) + _setter("tag_filters", tag_filters) @property @pulumi.getter(name="logzMonitorId") @@ -116,16 +147,45 @@ def __init__(__self__, *, :param pulumi.Input[bool] send_subscription_logs: Whether subscription logs should be sent to the Monitor resource? :param pulumi.Input[Sequence[pulumi.Input['LogzTagRuleTagFilterArgs']]] tag_filters: One or more (up to 10) `tag_filter` blocks as defined below. """ + _LogzTagRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + logz_monitor_id=logz_monitor_id, + send_aad_logs=send_aad_logs, + send_activity_logs=send_activity_logs, + send_subscription_logs=send_subscription_logs, + tag_filters=tag_filters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + logz_monitor_id: Optional[pulumi.Input[str]] = None, + send_aad_logs: Optional[pulumi.Input[bool]] = None, + send_activity_logs: Optional[pulumi.Input[bool]] = None, + send_subscription_logs: Optional[pulumi.Input[bool]] = None, + tag_filters: Optional[pulumi.Input[Sequence[pulumi.Input['LogzTagRuleTagFilterArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logz_monitor_id is None and 'logzMonitorId' in kwargs: + logz_monitor_id = kwargs['logzMonitorId'] + if send_aad_logs is None and 'sendAadLogs' in kwargs: + send_aad_logs = kwargs['sendAadLogs'] + if send_activity_logs is None and 'sendActivityLogs' in kwargs: + send_activity_logs = kwargs['sendActivityLogs'] + if send_subscription_logs is None and 'sendSubscriptionLogs' in kwargs: + send_subscription_logs = kwargs['sendSubscriptionLogs'] + if tag_filters is None and 'tagFilters' in kwargs: + tag_filters = kwargs['tagFilters'] + if logz_monitor_id is not None: - pulumi.set(__self__, "logz_monitor_id", logz_monitor_id) + _setter("logz_monitor_id", logz_monitor_id) if send_aad_logs is not None: - pulumi.set(__self__, "send_aad_logs", send_aad_logs) + _setter("send_aad_logs", send_aad_logs) if send_activity_logs is not None: - pulumi.set(__self__, "send_activity_logs", send_activity_logs) + _setter("send_activity_logs", send_activity_logs) if send_subscription_logs is not None: - pulumi.set(__self__, "send_subscription_logs", send_subscription_logs) + _setter("send_subscription_logs", send_subscription_logs) if tag_filters is not None: - pulumi.set(__self__, "tag_filters", tag_filters) + _setter("tag_filters", tag_filters) @property @pulumi.getter(name="logzMonitorId") @@ -325,6 +385,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LogzTagRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/monitoring/metric_alert.py b/sdk/python/pulumi_azure/monitoring/metric_alert.py index 48f8554547..5c8cda32fa 100644 --- a/sdk/python/pulumi_azure/monitoring/metric_alert.py +++ b/sdk/python/pulumi_azure/monitoring/metric_alert.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -61,36 +61,95 @@ def __init__(__self__, *, > This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. :param pulumi.Input[str] window_size: The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than `frequency`. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M`, `PT1H`, `PT6H`, `PT12H` and `P1D`. Defaults to `PT5M`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scopes", scopes) + MetricAlertArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + scopes=scopes, + actions=actions, + application_insights_web_test_location_availability_criteria=application_insights_web_test_location_availability_criteria, + auto_mitigate=auto_mitigate, + criterias=criterias, + description=description, + dynamic_criteria=dynamic_criteria, + enabled=enabled, + frequency=frequency, + name=name, + severity=severity, + tags=tags, + target_resource_location=target_resource_location, + target_resource_type=target_resource_type, + window_size=window_size, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + actions: Optional[pulumi.Input[Sequence[pulumi.Input['MetricAlertActionArgs']]]] = None, + application_insights_web_test_location_availability_criteria: Optional[pulumi.Input['MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaArgs']] = None, + auto_mitigate: Optional[pulumi.Input[bool]] = None, + criterias: Optional[pulumi.Input[Sequence[pulumi.Input['MetricAlertCriteriaArgs']]]] = None, + description: Optional[pulumi.Input[str]] = None, + dynamic_criteria: Optional[pulumi.Input['MetricAlertDynamicCriteriaArgs']] = None, + enabled: Optional[pulumi.Input[bool]] = None, + frequency: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + severity: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_resource_location: Optional[pulumi.Input[str]] = None, + target_resource_type: Optional[pulumi.Input[str]] = None, + window_size: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scopes is None: + raise TypeError("Missing 'scopes' argument") + if application_insights_web_test_location_availability_criteria is None and 'applicationInsightsWebTestLocationAvailabilityCriteria' in kwargs: + application_insights_web_test_location_availability_criteria = kwargs['applicationInsightsWebTestLocationAvailabilityCriteria'] + if auto_mitigate is None and 'autoMitigate' in kwargs: + auto_mitigate = kwargs['autoMitigate'] + if dynamic_criteria is None and 'dynamicCriteria' in kwargs: + dynamic_criteria = kwargs['dynamicCriteria'] + if target_resource_location is None and 'targetResourceLocation' in kwargs: + target_resource_location = kwargs['targetResourceLocation'] + if target_resource_type is None and 'targetResourceType' in kwargs: + target_resource_type = kwargs['targetResourceType'] + if window_size is None and 'windowSize' in kwargs: + window_size = kwargs['windowSize'] + + _setter("resource_group_name", resource_group_name) + _setter("scopes", scopes) if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if application_insights_web_test_location_availability_criteria is not None: - pulumi.set(__self__, "application_insights_web_test_location_availability_criteria", application_insights_web_test_location_availability_criteria) + _setter("application_insights_web_test_location_availability_criteria", application_insights_web_test_location_availability_criteria) if auto_mitigate is not None: - pulumi.set(__self__, "auto_mitigate", auto_mitigate) + _setter("auto_mitigate", auto_mitigate) if criterias is not None: - pulumi.set(__self__, "criterias", criterias) + _setter("criterias", criterias) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if dynamic_criteria is not None: - pulumi.set(__self__, "dynamic_criteria", dynamic_criteria) + _setter("dynamic_criteria", dynamic_criteria) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_resource_location is not None: - pulumi.set(__self__, "target_resource_location", target_resource_location) + _setter("target_resource_location", target_resource_location) if target_resource_type is not None: - pulumi.set(__self__, "target_resource_type", target_resource_type) + _setter("target_resource_type", target_resource_type) if window_size is not None: - pulumi.set(__self__, "window_size", window_size) + _setter("window_size", window_size) @property @pulumi.getter(name="resourceGroupName") @@ -343,38 +402,93 @@ def __init__(__self__, *, > This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. :param pulumi.Input[str] window_size: The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than `frequency`. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M`, `PT1H`, `PT6H`, `PT12H` and `P1D`. Defaults to `PT5M`. """ + _MetricAlertState._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + application_insights_web_test_location_availability_criteria=application_insights_web_test_location_availability_criteria, + auto_mitigate=auto_mitigate, + criterias=criterias, + description=description, + dynamic_criteria=dynamic_criteria, + enabled=enabled, + frequency=frequency, + name=name, + resource_group_name=resource_group_name, + scopes=scopes, + severity=severity, + tags=tags, + target_resource_location=target_resource_location, + target_resource_type=target_resource_type, + window_size=window_size, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input['MetricAlertActionArgs']]]] = None, + application_insights_web_test_location_availability_criteria: Optional[pulumi.Input['MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaArgs']] = None, + auto_mitigate: Optional[pulumi.Input[bool]] = None, + criterias: Optional[pulumi.Input[Sequence[pulumi.Input['MetricAlertCriteriaArgs']]]] = None, + description: Optional[pulumi.Input[str]] = None, + dynamic_criteria: Optional[pulumi.Input['MetricAlertDynamicCriteriaArgs']] = None, + enabled: Optional[pulumi.Input[bool]] = None, + frequency: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + severity: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_resource_location: Optional[pulumi.Input[str]] = None, + target_resource_type: Optional[pulumi.Input[str]] = None, + window_size: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_insights_web_test_location_availability_criteria is None and 'applicationInsightsWebTestLocationAvailabilityCriteria' in kwargs: + application_insights_web_test_location_availability_criteria = kwargs['applicationInsightsWebTestLocationAvailabilityCriteria'] + if auto_mitigate is None and 'autoMitigate' in kwargs: + auto_mitigate = kwargs['autoMitigate'] + if dynamic_criteria is None and 'dynamicCriteria' in kwargs: + dynamic_criteria = kwargs['dynamicCriteria'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if target_resource_location is None and 'targetResourceLocation' in kwargs: + target_resource_location = kwargs['targetResourceLocation'] + if target_resource_type is None and 'targetResourceType' in kwargs: + target_resource_type = kwargs['targetResourceType'] + if window_size is None and 'windowSize' in kwargs: + window_size = kwargs['windowSize'] + if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if application_insights_web_test_location_availability_criteria is not None: - pulumi.set(__self__, "application_insights_web_test_location_availability_criteria", application_insights_web_test_location_availability_criteria) + _setter("application_insights_web_test_location_availability_criteria", application_insights_web_test_location_availability_criteria) if auto_mitigate is not None: - pulumi.set(__self__, "auto_mitigate", auto_mitigate) + _setter("auto_mitigate", auto_mitigate) if criterias is not None: - pulumi.set(__self__, "criterias", criterias) + _setter("criterias", criterias) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if dynamic_criteria is not None: - pulumi.set(__self__, "dynamic_criteria", dynamic_criteria) + _setter("dynamic_criteria", dynamic_criteria) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_resource_location is not None: - pulumi.set(__self__, "target_resource_location", target_resource_location) + _setter("target_resource_location", target_resource_location) if target_resource_type is not None: - pulumi.set(__self__, "target_resource_type", target_resource_type) + _setter("target_resource_type", target_resource_type) if window_size is not None: - pulumi.set(__self__, "window_size", window_size) + _setter("window_size", window_size) @property @pulumi.getter @@ -748,6 +862,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MetricAlertArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -779,10 +897,20 @@ def _internal_init(__self__, __props__ = MetricAlertArgs.__new__(MetricAlertArgs) __props__.__dict__["actions"] = actions + if application_insights_web_test_location_availability_criteria is not None and not isinstance(application_insights_web_test_location_availability_criteria, MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaArgs): + application_insights_web_test_location_availability_criteria = application_insights_web_test_location_availability_criteria or {} + def _setter(key, value): + application_insights_web_test_location_availability_criteria[key] = value + MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaArgs._configure(_setter, **application_insights_web_test_location_availability_criteria) __props__.__dict__["application_insights_web_test_location_availability_criteria"] = application_insights_web_test_location_availability_criteria __props__.__dict__["auto_mitigate"] = auto_mitigate __props__.__dict__["criterias"] = criterias __props__.__dict__["description"] = description + if dynamic_criteria is not None and not isinstance(dynamic_criteria, MetricAlertDynamicCriteriaArgs): + dynamic_criteria = dynamic_criteria or {} + def _setter(key, value): + dynamic_criteria[key] = value + MetricAlertDynamicCriteriaArgs._configure(_setter, **dynamic_criteria) __props__.__dict__["dynamic_criteria"] = dynamic_criteria __props__.__dict__["enabled"] = enabled __props__.__dict__["frequency"] = frequency diff --git a/sdk/python/pulumi_azure/monitoring/outputs.py b/sdk/python/pulumi_azure/monitoring/outputs.py index 61d1dbdc82..735dc5c897 100644 --- a/sdk/python/pulumi_azure/monitoring/outputs.py +++ b/sdk/python/pulumi_azure/monitoring/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -230,8 +230,27 @@ def __init__(__self__, *, :param str category: The log category for the Azure Active Directory Diagnostic. :param 'AadDiagnosticSettingEnabledLogRetentionPolicyArgs' retention_policy: A `retention_policy` block as defined below. """ - pulumi.set(__self__, "category", category) - pulumi.set(__self__, "retention_policy", retention_policy) + AadDiagnosticSettingEnabledLog._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + retention_policy=retention_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[str] = None, + retention_policy: Optional['outputs.AadDiagnosticSettingEnabledLogRetentionPolicy'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category is None: + raise TypeError("Missing 'category' argument") + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if retention_policy is None: + raise TypeError("Missing 'retention_policy' argument") + + _setter("category", category) + _setter("retention_policy", retention_policy) @property @pulumi.getter @@ -259,10 +278,23 @@ def __init__(__self__, *, :param int days: The number of days for which this Retention Policy should apply. Defaults to `0`. :param bool enabled: Is this Retention Policy enabled? Defaults to `false`. """ + AadDiagnosticSettingEnabledLogRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[int] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -309,10 +341,31 @@ def __init__(__self__, *, :param 'AadDiagnosticSettingLogRetentionPolicyArgs' retention_policy: A `retention_policy` block as defined below. :param bool enabled: Is this Diagnostic Log enabled? Defaults to `true`. """ - pulumi.set(__self__, "category", category) - pulumi.set(__self__, "retention_policy", retention_policy) + AadDiagnosticSettingLog._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + retention_policy=retention_policy, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[str] = None, + retention_policy: Optional['outputs.AadDiagnosticSettingLogRetentionPolicy'] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category is None: + raise TypeError("Missing 'category' argument") + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if retention_policy is None: + raise TypeError("Missing 'retention_policy' argument") + + _setter("category", category) + _setter("retention_policy", retention_policy) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -348,10 +401,23 @@ def __init__(__self__, *, :param int days: The number of days for which this Retention Policy should apply. Defaults to `0`. :param bool enabled: Is this Retention Policy enabled? Defaults to `false`. """ + AadDiagnosticSettingLogRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[int] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -400,10 +466,33 @@ def __init__(__self__, *, :param str role_id: The arm role id. :param bool use_common_alert_schema: Enables or disables the common alert schema. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "role_id", role_id) + ActionGroupArmRoleReceiver._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + role_id=role_id, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + role_id: Optional[str] = None, + use_common_alert_schema: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if role_id is None and 'roleId' in kwargs: + role_id = kwargs['roleId'] + if role_id is None: + raise TypeError("Missing 'role_id' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("name", name) + _setter("role_id", role_id) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter @@ -476,14 +565,61 @@ def __init__(__self__, *, :param str webhook_resource_id: The resource id for webhook linked to this runbook. :param bool use_common_alert_schema: Enables or disables the common alert schema. """ - pulumi.set(__self__, "automation_account_id", automation_account_id) - pulumi.set(__self__, "is_global_runbook", is_global_runbook) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "runbook_name", runbook_name) - pulumi.set(__self__, "service_uri", service_uri) - pulumi.set(__self__, "webhook_resource_id", webhook_resource_id) + ActionGroupAutomationRunbookReceiver._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_id=automation_account_id, + is_global_runbook=is_global_runbook, + name=name, + runbook_name=runbook_name, + service_uri=service_uri, + webhook_resource_id=webhook_resource_id, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_id: Optional[str] = None, + is_global_runbook: Optional[bool] = None, + name: Optional[str] = None, + runbook_name: Optional[str] = None, + service_uri: Optional[str] = None, + webhook_resource_id: Optional[str] = None, + use_common_alert_schema: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_id is None and 'automationAccountId' in kwargs: + automation_account_id = kwargs['automationAccountId'] + if automation_account_id is None: + raise TypeError("Missing 'automation_account_id' argument") + if is_global_runbook is None and 'isGlobalRunbook' in kwargs: + is_global_runbook = kwargs['isGlobalRunbook'] + if is_global_runbook is None: + raise TypeError("Missing 'is_global_runbook' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if runbook_name is None and 'runbookName' in kwargs: + runbook_name = kwargs['runbookName'] + if runbook_name is None: + raise TypeError("Missing 'runbook_name' argument") + if service_uri is None and 'serviceUri' in kwargs: + service_uri = kwargs['serviceUri'] + if service_uri is None: + raise TypeError("Missing 'service_uri' argument") + if webhook_resource_id is None and 'webhookResourceId' in kwargs: + webhook_resource_id = kwargs['webhookResourceId'] + if webhook_resource_id is None: + raise TypeError("Missing 'webhook_resource_id' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("automation_account_id", automation_account_id) + _setter("is_global_runbook", is_global_runbook) + _setter("name", name) + _setter("runbook_name", runbook_name) + _setter("service_uri", service_uri) + _setter("webhook_resource_id", webhook_resource_id) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter(name="automationAccountId") @@ -568,8 +704,27 @@ def __init__(__self__, *, :param str email_address: The email address of the user signed into the mobile app who will receive push notifications from this receiver. :param str name: The name of the Azure app push receiver. """ - pulumi.set(__self__, "email_address", email_address) - pulumi.set(__self__, "name", name) + ActionGroupAzureAppPushReceiver._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_address=email_address, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_address: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_address is None and 'emailAddress' in kwargs: + email_address = kwargs['emailAddress'] + if email_address is None: + raise TypeError("Missing 'email_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("email_address", email_address) + _setter("name", name) @property @pulumi.getter(name="emailAddress") @@ -626,12 +781,47 @@ def __init__(__self__, *, :param str name: The name of the Azure Function receiver. :param bool use_common_alert_schema: Enables or disables the common alert schema. """ - pulumi.set(__self__, "function_app_resource_id", function_app_resource_id) - pulumi.set(__self__, "function_name", function_name) - pulumi.set(__self__, "http_trigger_url", http_trigger_url) - pulumi.set(__self__, "name", name) + ActionGroupAzureFunctionReceiver._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_app_resource_id=function_app_resource_id, + function_name=function_name, + http_trigger_url=http_trigger_url, + name=name, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_app_resource_id: Optional[str] = None, + function_name: Optional[str] = None, + http_trigger_url: Optional[str] = None, + name: Optional[str] = None, + use_common_alert_schema: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_app_resource_id is None and 'functionAppResourceId' in kwargs: + function_app_resource_id = kwargs['functionAppResourceId'] + if function_app_resource_id is None: + raise TypeError("Missing 'function_app_resource_id' argument") + if function_name is None and 'functionName' in kwargs: + function_name = kwargs['functionName'] + if function_name is None: + raise TypeError("Missing 'function_name' argument") + if http_trigger_url is None and 'httpTriggerUrl' in kwargs: + http_trigger_url = kwargs['httpTriggerUrl'] + if http_trigger_url is None: + raise TypeError("Missing 'http_trigger_url' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("function_app_resource_id", function_app_resource_id) + _setter("function_name", function_name) + _setter("http_trigger_url", http_trigger_url) + _setter("name", name) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter(name="functionAppResourceId") @@ -704,10 +894,33 @@ def __init__(__self__, *, :param str name: The name of the email receiver. Names must be unique (case-insensitive) across all receivers within an action group. :param bool use_common_alert_schema: Enables or disables the common alert schema. """ - pulumi.set(__self__, "email_address", email_address) - pulumi.set(__self__, "name", name) + ActionGroupEmailReceiver._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_address=email_address, + name=name, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_address: Optional[str] = None, + name: Optional[str] = None, + use_common_alert_schema: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_address is None and 'emailAddress' in kwargs: + email_address = kwargs['emailAddress'] + if email_address is None: + raise TypeError("Missing 'email_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("email_address", email_address) + _setter("name", name) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter(name="emailAddress") @@ -782,19 +995,56 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID for the subscription containing this Event Hub. :param bool use_common_alert_schema: Indicates whether to use common alert schema. """ - pulumi.set(__self__, "name", name) + ActionGroupEventHubReceiver._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + event_hub_id=event_hub_id, + event_hub_name=event_hub_name, + event_hub_namespace=event_hub_namespace, + subscription_id=subscription_id, + tenant_id=tenant_id, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + event_hub_id: Optional[str] = None, + event_hub_name: Optional[str] = None, + event_hub_namespace: Optional[str] = None, + subscription_id: Optional[str] = None, + tenant_id: Optional[str] = None, + use_common_alert_schema: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if event_hub_id is None and 'eventHubId' in kwargs: + event_hub_id = kwargs['eventHubId'] + if event_hub_name is None and 'eventHubName' in kwargs: + event_hub_name = kwargs['eventHubName'] + if event_hub_namespace is None and 'eventHubNamespace' in kwargs: + event_hub_namespace = kwargs['eventHubNamespace'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("name", name) if event_hub_id is not None: - pulumi.set(__self__, "event_hub_id", event_hub_id) + _setter("event_hub_id", event_hub_id) if event_hub_name is not None: - pulumi.set(__self__, "event_hub_name", event_hub_name) + _setter("event_hub_name", event_hub_name) if event_hub_namespace is not None: - pulumi.set(__self__, "event_hub_namespace", event_hub_namespace) + _setter("event_hub_namespace", event_hub_namespace) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter @@ -896,11 +1146,46 @@ def __init__(__self__, *, :param str ticket_configuration: A JSON blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be part of this blob as well. :param str workspace_id: The Azure Log Analytics workspace ID where this connection is defined. Format is `|`, for example `00000000-0000-0000-0000-000000000000|00000000-0000-0000-0000-000000000000`. """ - pulumi.set(__self__, "connection_id", connection_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "region", region) - pulumi.set(__self__, "ticket_configuration", ticket_configuration) - pulumi.set(__self__, "workspace_id", workspace_id) + ActionGroupItsmReceiver._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_id=connection_id, + name=name, + region=region, + ticket_configuration=ticket_configuration, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_id: Optional[str] = None, + name: Optional[str] = None, + region: Optional[str] = None, + ticket_configuration: Optional[str] = None, + workspace_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_id is None and 'connectionId' in kwargs: + connection_id = kwargs['connectionId'] + if connection_id is None: + raise TypeError("Missing 'connection_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if region is None: + raise TypeError("Missing 'region' argument") + if ticket_configuration is None and 'ticketConfiguration' in kwargs: + ticket_configuration = kwargs['ticketConfiguration'] + if ticket_configuration is None: + raise TypeError("Missing 'ticket_configuration' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + + _setter("connection_id", connection_id) + _setter("name", name) + _setter("region", region) + _setter("ticket_configuration", ticket_configuration) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="connectionId") @@ -979,11 +1264,40 @@ def __init__(__self__, *, :param str resource_id: The Azure resource ID of the logic app. :param bool use_common_alert_schema: Enables or disables the common alert schema. """ - pulumi.set(__self__, "callback_url", callback_url) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "resource_id", resource_id) + ActionGroupLogicAppReceiver._configure( + lambda key, value: pulumi.set(__self__, key, value), + callback_url=callback_url, + name=name, + resource_id=resource_id, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + callback_url: Optional[str] = None, + name: Optional[str] = None, + resource_id: Optional[str] = None, + use_common_alert_schema: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if callback_url is None and 'callbackUrl' in kwargs: + callback_url = kwargs['callbackUrl'] + if callback_url is None: + raise TypeError("Missing 'callback_url' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("callback_url", callback_url) + _setter("name", name) + _setter("resource_id", resource_id) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter(name="callbackUrl") @@ -1048,9 +1362,34 @@ def __init__(__self__, *, :param str name: The name of the SMS receiver. Names must be unique (case-insensitive) across all receivers within an action group. :param str phone_number: The phone number of the SMS receiver. """ - pulumi.set(__self__, "country_code", country_code) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "phone_number", phone_number) + ActionGroupSmsReceiver._configure( + lambda key, value: pulumi.set(__self__, key, value), + country_code=country_code, + name=name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + country_code: Optional[str] = None, + name: Optional[str] = None, + phone_number: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if country_code is None and 'countryCode' in kwargs: + country_code = kwargs['countryCode'] + if country_code is None: + raise TypeError("Missing 'country_code' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("country_code", country_code) + _setter("name", name) + _setter("phone_number", phone_number) @property @pulumi.getter(name="countryCode") @@ -1107,9 +1446,34 @@ def __init__(__self__, *, :param str name: The name of the voice receiver. :param str phone_number: The phone number of the voice receiver. """ - pulumi.set(__self__, "country_code", country_code) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "phone_number", phone_number) + ActionGroupVoiceReceiver._configure( + lambda key, value: pulumi.set(__self__, key, value), + country_code=country_code, + name=name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + country_code: Optional[str] = None, + name: Optional[str] = None, + phone_number: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if country_code is None and 'countryCode' in kwargs: + country_code = kwargs['countryCode'] + if country_code is None: + raise TypeError("Missing 'country_code' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("country_code", country_code) + _setter("name", name) + _setter("phone_number", phone_number) @property @pulumi.getter(name="countryCode") @@ -1172,12 +1536,39 @@ def __init__(__self__, *, > **NOTE:** Before adding a secure webhook receiver by setting `aad_auth`, please read [the configuration instruction of the AAD application](https://docs.microsoft.com/azure/azure-monitor/platform/action-groups#secure-webhook). :param bool use_common_alert_schema: Enables or disables the common alert schema. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "service_uri", service_uri) + ActionGroupWebhookReceiver._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + service_uri=service_uri, + aad_auth=aad_auth, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + service_uri: Optional[str] = None, + aad_auth: Optional['outputs.ActionGroupWebhookReceiverAadAuth'] = None, + use_common_alert_schema: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if service_uri is None and 'serviceUri' in kwargs: + service_uri = kwargs['serviceUri'] + if service_uri is None: + raise TypeError("Missing 'service_uri' argument") + if aad_auth is None and 'aadAuth' in kwargs: + aad_auth = kwargs['aadAuth'] + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("name", name) + _setter("service_uri", service_uri) if aad_auth is not None: - pulumi.set(__self__, "aad_auth", aad_auth) + _setter("aad_auth", aad_auth) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter @@ -1246,11 +1637,34 @@ def __init__(__self__, *, :param str identifier_uri: The identifier URI for AAD auth. :param str tenant_id: The tenant id for AAD auth. """ - pulumi.set(__self__, "object_id", object_id) + ActionGroupWebhookReceiverAadAuth._configure( + lambda key, value: pulumi.set(__self__, key, value), + object_id=object_id, + identifier_uri=identifier_uri, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + object_id: Optional[str] = None, + identifier_uri: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if identifier_uri is None and 'identifierUri' in kwargs: + identifier_uri = kwargs['identifierUri'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("object_id", object_id) if identifier_uri is not None: - pulumi.set(__self__, "identifier_uri", identifier_uri) + _setter("identifier_uri", identifier_uri) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="objectId") @@ -1319,20 +1733,51 @@ def __init__(__self__, *, :param 'ActionRuleActionGroupConditionSeverityArgs' severity: A `severity` block as defined below. :param 'ActionRuleActionGroupConditionTargetResourceTypeArgs' target_resource_type: A `target_resource_type` block as defined below. """ + ActionRuleActionGroupCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_context=alert_context, + alert_rule_id=alert_rule_id, + description=description, + monitor=monitor, + monitor_service=monitor_service, + severity=severity, + target_resource_type=target_resource_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_context: Optional['outputs.ActionRuleActionGroupConditionAlertContext'] = None, + alert_rule_id: Optional['outputs.ActionRuleActionGroupConditionAlertRuleId'] = None, + description: Optional['outputs.ActionRuleActionGroupConditionDescription'] = None, + monitor: Optional['outputs.ActionRuleActionGroupConditionMonitor'] = None, + monitor_service: Optional['outputs.ActionRuleActionGroupConditionMonitorService'] = None, + severity: Optional['outputs.ActionRuleActionGroupConditionSeverity'] = None, + target_resource_type: Optional['outputs.ActionRuleActionGroupConditionTargetResourceType'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_context is None and 'alertContext' in kwargs: + alert_context = kwargs['alertContext'] + if alert_rule_id is None and 'alertRuleId' in kwargs: + alert_rule_id = kwargs['alertRuleId'] + if monitor_service is None and 'monitorService' in kwargs: + monitor_service = kwargs['monitorService'] + if target_resource_type is None and 'targetResourceType' in kwargs: + target_resource_type = kwargs['targetResourceType'] + if alert_context is not None: - pulumi.set(__self__, "alert_context", alert_context) + _setter("alert_context", alert_context) if alert_rule_id is not None: - pulumi.set(__self__, "alert_rule_id", alert_rule_id) + _setter("alert_rule_id", alert_rule_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if monitor_service is not None: - pulumi.set(__self__, "monitor_service", monitor_service) + _setter("monitor_service", monitor_service) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if target_resource_type is not None: - pulumi.set(__self__, "target_resource_type", target_resource_type) + _setter("target_resource_type", target_resource_type) @property @pulumi.getter(name="alertContext") @@ -1400,8 +1845,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: A list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionAlertContext._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1429,8 +1891,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: A list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionAlertRuleId._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1458,8 +1937,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: A list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionDescription._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1487,8 +1983,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: A list of values to match for a given condition. Possible values are `Fired` and `Resolved`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionMonitor._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1516,8 +2029,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: A list of values to match for a given condition. Possible values are `ActivityLog Administrative`, `ActivityLog Autoscale`, `ActivityLog Policy`, `ActivityLog Recommendation`, `ActivityLog Security`, `Application Insights`, `Azure Backup`, `Azure Stack Edge`, `Azure Stack Hub`, `Custom`, `Data Box Gateway`, `Health Platform`, `Log Alerts V2`, `Log Analytics`, `Platform`, `Resource Health`, `Smart Detector` and `VM Insights - Health`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionMonitorService._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1545,8 +2075,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`and `NotEquals`. :param Sequence[str] values: A list of values to match for a given condition. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3`, and `Sev4`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionSeverity._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1574,8 +2121,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: A list of values to match for a given condition. The values should be valid resource types. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleActionGroupConditionTargetResourceType._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1620,8 +2184,27 @@ def __init__(__self__, *, :param Sequence[str] resource_ids: A list of resource IDs of the given scope type which will be the target of action rule. :param str type: Specifies the type of target scope. Possible values are `ResourceGroup` and `Resource`. """ - pulumi.set(__self__, "resource_ids", resource_ids) - pulumi.set(__self__, "type", type) + ActionRuleActionGroupScope._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_ids=resource_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_ids is None and 'resourceIds' in kwargs: + resource_ids = kwargs['resourceIds'] + if resource_ids is None: + raise TypeError("Missing 'resource_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("resource_ids", resource_ids) + _setter("type", type) @property @pulumi.getter(name="resourceIds") @@ -1682,20 +2265,51 @@ def __init__(__self__, *, :param 'ActionRuleSuppressionConditionSeverityArgs' severity: A `severity` block as defined below. :param 'ActionRuleSuppressionConditionTargetResourceTypeArgs' target_resource_type: A `target_resource_type` block as defined below. """ + ActionRuleSuppressionCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_context=alert_context, + alert_rule_id=alert_rule_id, + description=description, + monitor=monitor, + monitor_service=monitor_service, + severity=severity, + target_resource_type=target_resource_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_context: Optional['outputs.ActionRuleSuppressionConditionAlertContext'] = None, + alert_rule_id: Optional['outputs.ActionRuleSuppressionConditionAlertRuleId'] = None, + description: Optional['outputs.ActionRuleSuppressionConditionDescription'] = None, + monitor: Optional['outputs.ActionRuleSuppressionConditionMonitor'] = None, + monitor_service: Optional['outputs.ActionRuleSuppressionConditionMonitorService'] = None, + severity: Optional['outputs.ActionRuleSuppressionConditionSeverity'] = None, + target_resource_type: Optional['outputs.ActionRuleSuppressionConditionTargetResourceType'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_context is None and 'alertContext' in kwargs: + alert_context = kwargs['alertContext'] + if alert_rule_id is None and 'alertRuleId' in kwargs: + alert_rule_id = kwargs['alertRuleId'] + if monitor_service is None and 'monitorService' in kwargs: + monitor_service = kwargs['monitorService'] + if target_resource_type is None and 'targetResourceType' in kwargs: + target_resource_type = kwargs['targetResourceType'] + if alert_context is not None: - pulumi.set(__self__, "alert_context", alert_context) + _setter("alert_context", alert_context) if alert_rule_id is not None: - pulumi.set(__self__, "alert_rule_id", alert_rule_id) + _setter("alert_rule_id", alert_rule_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if monitor is not None: - pulumi.set(__self__, "monitor", monitor) + _setter("monitor", monitor) if monitor_service is not None: - pulumi.set(__self__, "monitor_service", monitor_service) + _setter("monitor_service", monitor_service) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if target_resource_type is not None: - pulumi.set(__self__, "target_resource_type", target_resource_type) + _setter("target_resource_type", target_resource_type) @property @pulumi.getter(name="alertContext") @@ -1763,8 +2377,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: A list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionAlertContext._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1792,8 +2423,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: A list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionAlertRuleId._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1821,8 +2469,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: A list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionDescription._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1850,8 +2515,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: A list of values to match for a given condition. Possible values are `Fired` and `Resolved`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionMonitor._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1879,8 +2561,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: A list of values to match for a given condition. Possible values are `ActivityLog Administrative`, `ActivityLog Autoscale`, `ActivityLog Policy`, `ActivityLog Recommendation`, `ActivityLog Security`, `Application Insights`, `Azure Backup`, `Azure Stack Edge`, `Azure Stack Hub`, `Custom`, `Data Box Gateway`, `Health Platform`, `Log Alerts V2`, `Log Analytics`, `Platform`, `Resource Health`, `Smart Detector` and `VM Insights - Health`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionMonitorService._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1908,8 +2607,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`and `NotEquals`. :param Sequence[str] values: A list of values to match for a given condition. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3`, and `Sev4`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionSeverity._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1937,8 +2653,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: A list of values to match for a given condition. The values should be valid resource types. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ActionRuleSuppressionConditionTargetResourceType._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -1983,8 +2716,27 @@ def __init__(__self__, *, :param Sequence[str] resource_ids: A list of resource IDs of the given scope type which will be the target of action rule. :param str type: Specifies the type of target scope. Possible values are `ResourceGroup` and `Resource`. """ - pulumi.set(__self__, "resource_ids", resource_ids) - pulumi.set(__self__, "type", type) + ActionRuleSuppressionScope._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_ids=resource_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_ids is None and 'resourceIds' in kwargs: + resource_ids = kwargs['resourceIds'] + if resource_ids is None: + raise TypeError("Missing 'resource_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("resource_ids", resource_ids) + _setter("type", type) @property @pulumi.getter(name="resourceIds") @@ -2029,9 +2781,26 @@ def __init__(__self__, *, :param str recurrence_type: Specifies the type of suppression. Possible values are `Always`, `Daily`, `Monthly`, `Once`, and `Weekly`. :param 'ActionRuleSuppressionSuppressionScheduleArgs' schedule: A `schedule` block as defined below. Required if `recurrence_type` is `Daily`, `Monthly`, `Once` or `Weekly`. """ - pulumi.set(__self__, "recurrence_type", recurrence_type) + ActionRuleSuppressionSuppression._configure( + lambda key, value: pulumi.set(__self__, key, value), + recurrence_type=recurrence_type, + schedule=schedule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recurrence_type: Optional[str] = None, + schedule: Optional['outputs.ActionRuleSuppressionSuppressionSchedule'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recurrence_type is None and 'recurrenceType' in kwargs: + recurrence_type = kwargs['recurrenceType'] + if recurrence_type is None: + raise TypeError("Missing 'recurrence_type' argument") + + _setter("recurrence_type", recurrence_type) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) @property @pulumi.getter(name="recurrenceType") @@ -2086,12 +2855,41 @@ def __init__(__self__, *, :param Sequence[int] recurrence_monthlies: specifies the list of dayOfMonth to recurrence. Possible values are between `1` - `31`. Required if `recurrence_type` is `Monthly`. :param Sequence[str] recurrence_weeklies: specifies the list of dayOfWeek to recurrence. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. """ - pulumi.set(__self__, "end_date_utc", end_date_utc) - pulumi.set(__self__, "start_date_utc", start_date_utc) + ActionRuleSuppressionSuppressionSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_date_utc=end_date_utc, + start_date_utc=start_date_utc, + recurrence_monthlies=recurrence_monthlies, + recurrence_weeklies=recurrence_weeklies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_date_utc: Optional[str] = None, + start_date_utc: Optional[str] = None, + recurrence_monthlies: Optional[Sequence[int]] = None, + recurrence_weeklies: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_date_utc is None and 'endDateUtc' in kwargs: + end_date_utc = kwargs['endDateUtc'] + if end_date_utc is None: + raise TypeError("Missing 'end_date_utc' argument") + if start_date_utc is None and 'startDateUtc' in kwargs: + start_date_utc = kwargs['startDateUtc'] + if start_date_utc is None: + raise TypeError("Missing 'start_date_utc' argument") + if recurrence_monthlies is None and 'recurrenceMonthlies' in kwargs: + recurrence_monthlies = kwargs['recurrenceMonthlies'] + if recurrence_weeklies is None and 'recurrenceWeeklies' in kwargs: + recurrence_weeklies = kwargs['recurrenceWeeklies'] + + _setter("end_date_utc", end_date_utc) + _setter("start_date_utc", start_date_utc) if recurrence_monthlies is not None: - pulumi.set(__self__, "recurrence_monthlies", recurrence_monthlies) + _setter("recurrence_monthlies", recurrence_monthlies) if recurrence_weeklies is not None: - pulumi.set(__self__, "recurrence_weeklies", recurrence_weeklies) + _setter("recurrence_weeklies", recurrence_weeklies) @property @pulumi.getter(name="endDateUtc") @@ -2154,9 +2952,28 @@ def __init__(__self__, *, :param str action_group_id: The ID of the Action Group can be sourced from the `monitoring.ActionGroup` resource. :param Mapping[str, str] webhook_properties: The map of custom string properties to include with the post operation. These data are appended to the webhook payload. """ - pulumi.set(__self__, "action_group_id", action_group_id) + ActivityLogAlertAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_group_id=action_group_id, + webhook_properties=webhook_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_group_id: Optional[str] = None, + webhook_properties: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_group_id is None and 'actionGroupId' in kwargs: + action_group_id = kwargs['actionGroupId'] + if action_group_id is None: + raise TypeError("Missing 'action_group_id' argument") + if webhook_properties is None and 'webhookProperties' in kwargs: + webhook_properties = kwargs['webhookProperties'] + + _setter("action_group_id", action_group_id) if webhook_properties is not None: - pulumi.set(__self__, "webhook_properties", webhook_properties) + _setter("webhook_properties", webhook_properties) @property @pulumi.getter(name="actionGroupId") @@ -2285,49 +3102,136 @@ def __init__(__self__, *, > **NOTE:** `sub_status` and `sub_statuses` are mutually exclusive. """ - pulumi.set(__self__, "category", category) + ActivityLogAlertCriteria._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + caller=caller, + level=level, + levels=levels, + operation_name=operation_name, + recommendation_category=recommendation_category, + recommendation_impact=recommendation_impact, + recommendation_type=recommendation_type, + resource_group=resource_group, + resource_groups=resource_groups, + resource_healths=resource_healths, + resource_id=resource_id, + resource_ids=resource_ids, + resource_provider=resource_provider, + resource_providers=resource_providers, + resource_type=resource_type, + resource_types=resource_types, + service_healths=service_healths, + status=status, + statuses=statuses, + sub_status=sub_status, + sub_statuses=sub_statuses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[str] = None, + caller: Optional[str] = None, + level: Optional[str] = None, + levels: Optional[Sequence[str]] = None, + operation_name: Optional[str] = None, + recommendation_category: Optional[str] = None, + recommendation_impact: Optional[str] = None, + recommendation_type: Optional[str] = None, + resource_group: Optional[str] = None, + resource_groups: Optional[Sequence[str]] = None, + resource_healths: Optional[Sequence['outputs.ActivityLogAlertCriteriaResourceHealth']] = None, + resource_id: Optional[str] = None, + resource_ids: Optional[Sequence[str]] = None, + resource_provider: Optional[str] = None, + resource_providers: Optional[Sequence[str]] = None, + resource_type: Optional[str] = None, + resource_types: Optional[Sequence[str]] = None, + service_healths: Optional[Sequence['outputs.ActivityLogAlertCriteriaServiceHealth']] = None, + status: Optional[str] = None, + statuses: Optional[Sequence[str]] = None, + sub_status: Optional[str] = None, + sub_statuses: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category is None: + raise TypeError("Missing 'category' argument") + if operation_name is None and 'operationName' in kwargs: + operation_name = kwargs['operationName'] + if recommendation_category is None and 'recommendationCategory' in kwargs: + recommendation_category = kwargs['recommendationCategory'] + if recommendation_impact is None and 'recommendationImpact' in kwargs: + recommendation_impact = kwargs['recommendationImpact'] + if recommendation_type is None and 'recommendationType' in kwargs: + recommendation_type = kwargs['recommendationType'] + if resource_group is None and 'resourceGroup' in kwargs: + resource_group = kwargs['resourceGroup'] + if resource_groups is None and 'resourceGroups' in kwargs: + resource_groups = kwargs['resourceGroups'] + if resource_healths is None and 'resourceHealths' in kwargs: + resource_healths = kwargs['resourceHealths'] + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_ids is None and 'resourceIds' in kwargs: + resource_ids = kwargs['resourceIds'] + if resource_provider is None and 'resourceProvider' in kwargs: + resource_provider = kwargs['resourceProvider'] + if resource_providers is None and 'resourceProviders' in kwargs: + resource_providers = kwargs['resourceProviders'] + if resource_type is None and 'resourceType' in kwargs: + resource_type = kwargs['resourceType'] + if resource_types is None and 'resourceTypes' in kwargs: + resource_types = kwargs['resourceTypes'] + if service_healths is None and 'serviceHealths' in kwargs: + service_healths = kwargs['serviceHealths'] + if sub_status is None and 'subStatus' in kwargs: + sub_status = kwargs['subStatus'] + if sub_statuses is None and 'subStatuses' in kwargs: + sub_statuses = kwargs['subStatuses'] + + _setter("category", category) if caller is not None: - pulumi.set(__self__, "caller", caller) + _setter("caller", caller) if level is not None: - pulumi.set(__self__, "level", level) + _setter("level", level) if levels is not None: - pulumi.set(__self__, "levels", levels) + _setter("levels", levels) if operation_name is not None: - pulumi.set(__self__, "operation_name", operation_name) + _setter("operation_name", operation_name) if recommendation_category is not None: - pulumi.set(__self__, "recommendation_category", recommendation_category) + _setter("recommendation_category", recommendation_category) if recommendation_impact is not None: - pulumi.set(__self__, "recommendation_impact", recommendation_impact) + _setter("recommendation_impact", recommendation_impact) if recommendation_type is not None: - pulumi.set(__self__, "recommendation_type", recommendation_type) + _setter("recommendation_type", recommendation_type) if resource_group is not None: - pulumi.set(__self__, "resource_group", resource_group) + _setter("resource_group", resource_group) if resource_groups is not None: - pulumi.set(__self__, "resource_groups", resource_groups) + _setter("resource_groups", resource_groups) if resource_healths is not None: - pulumi.set(__self__, "resource_healths", resource_healths) + _setter("resource_healths", resource_healths) if resource_id is not None: - pulumi.set(__self__, "resource_id", resource_id) + _setter("resource_id", resource_id) if resource_ids is not None: - pulumi.set(__self__, "resource_ids", resource_ids) + _setter("resource_ids", resource_ids) if resource_provider is not None: - pulumi.set(__self__, "resource_provider", resource_provider) + _setter("resource_provider", resource_provider) if resource_providers is not None: - pulumi.set(__self__, "resource_providers", resource_providers) + _setter("resource_providers", resource_providers) if resource_type is not None: - pulumi.set(__self__, "resource_type", resource_type) + _setter("resource_type", resource_type) if resource_types is not None: - pulumi.set(__self__, "resource_types", resource_types) + _setter("resource_types", resource_types) if service_healths is not None: - pulumi.set(__self__, "service_healths", service_healths) + _setter("service_healths", service_healths) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if statuses is not None: - pulumi.set(__self__, "statuses", statuses) + _setter("statuses", statuses) if sub_status is not None: - pulumi.set(__self__, "sub_status", sub_status) + _setter("sub_status", sub_status) if sub_statuses is not None: - pulumi.set(__self__, "sub_statuses", sub_statuses) + _setter("sub_statuses", sub_statuses) @property @pulumi.getter @@ -2531,12 +3435,27 @@ def __init__(__self__, *, :param Sequence[str] previouses: The previous resource health statuses that will log an alert. Possible values are `Available`, `Degraded`, `Unavailable` and `Unknown`. :param Sequence[str] reasons: The reason that will log an alert. Possible values are `PlatformInitiated` (such as a problem with the resource in an affected region of an Azure incident), `UserInitiated` (such as a shutdown request of a VM) and `Unknown`. """ + ActivityLogAlertCriteriaResourceHealth._configure( + lambda key, value: pulumi.set(__self__, key, value), + currents=currents, + previouses=previouses, + reasons=reasons, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + currents: Optional[Sequence[str]] = None, + previouses: Optional[Sequence[str]] = None, + reasons: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if currents is not None: - pulumi.set(__self__, "currents", currents) + _setter("currents", currents) if previouses is not None: - pulumi.set(__self__, "previouses", previouses) + _setter("previouses", previouses) if reasons is not None: - pulumi.set(__self__, "reasons", reasons) + _setter("reasons", reasons) @property @pulumi.getter @@ -2574,12 +3493,27 @@ def __init__(__self__, *, :param Sequence[str] locations: Locations this alert will monitor. For example, `West Europe`. :param Sequence[str] services: Services this alert will monitor. For example, `Activity Logs & Alerts`, `Action Groups`. Defaults to all Services. """ + ActivityLogAlertCriteriaServiceHealth._configure( + lambda key, value: pulumi.set(__self__, key, value), + events=events, + locations=locations, + services=services, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + events: Optional[Sequence[str]] = None, + locations: Optional[Sequence[str]] = None, + services: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if events is not None: - pulumi.set(__self__, "events", events) + _setter("events", events) if locations is not None: - pulumi.set(__self__, "locations", locations) + _setter("locations", locations) if services is not None: - pulumi.set(__self__, "services", services) + _setter("services", services) @property @pulumi.getter @@ -2668,28 +3602,77 @@ def __init__(__self__, *, > **Note:** At least one of the `alert_context`, `alert_rule_id`, `alert_rule_name`, `description`, `monitor_condition`, `monitor_service`, `severity`, `signal_type`, `target_resource`, `target_resource_group`, `target_resource_type` must be specified. """ + AlertProcessingRuleActionGroupCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_context=alert_context, + alert_rule_id=alert_rule_id, + alert_rule_name=alert_rule_name, + description=description, + monitor_condition=monitor_condition, + monitor_service=monitor_service, + severity=severity, + signal_type=signal_type, + target_resource=target_resource, + target_resource_group=target_resource_group, + target_resource_type=target_resource_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_context: Optional['outputs.AlertProcessingRuleActionGroupConditionAlertContext'] = None, + alert_rule_id: Optional['outputs.AlertProcessingRuleActionGroupConditionAlertRuleId'] = None, + alert_rule_name: Optional['outputs.AlertProcessingRuleActionGroupConditionAlertRuleName'] = None, + description: Optional['outputs.AlertProcessingRuleActionGroupConditionDescription'] = None, + monitor_condition: Optional['outputs.AlertProcessingRuleActionGroupConditionMonitorCondition'] = None, + monitor_service: Optional['outputs.AlertProcessingRuleActionGroupConditionMonitorService'] = None, + severity: Optional['outputs.AlertProcessingRuleActionGroupConditionSeverity'] = None, + signal_type: Optional['outputs.AlertProcessingRuleActionGroupConditionSignalType'] = None, + target_resource: Optional['outputs.AlertProcessingRuleActionGroupConditionTargetResource'] = None, + target_resource_group: Optional['outputs.AlertProcessingRuleActionGroupConditionTargetResourceGroup'] = None, + target_resource_type: Optional['outputs.AlertProcessingRuleActionGroupConditionTargetResourceType'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_context is None and 'alertContext' in kwargs: + alert_context = kwargs['alertContext'] + if alert_rule_id is None and 'alertRuleId' in kwargs: + alert_rule_id = kwargs['alertRuleId'] + if alert_rule_name is None and 'alertRuleName' in kwargs: + alert_rule_name = kwargs['alertRuleName'] + if monitor_condition is None and 'monitorCondition' in kwargs: + monitor_condition = kwargs['monitorCondition'] + if monitor_service is None and 'monitorService' in kwargs: + monitor_service = kwargs['monitorService'] + if signal_type is None and 'signalType' in kwargs: + signal_type = kwargs['signalType'] + if target_resource is None and 'targetResource' in kwargs: + target_resource = kwargs['targetResource'] + if target_resource_group is None and 'targetResourceGroup' in kwargs: + target_resource_group = kwargs['targetResourceGroup'] + if target_resource_type is None and 'targetResourceType' in kwargs: + target_resource_type = kwargs['targetResourceType'] + if alert_context is not None: - pulumi.set(__self__, "alert_context", alert_context) + _setter("alert_context", alert_context) if alert_rule_id is not None: - pulumi.set(__self__, "alert_rule_id", alert_rule_id) + _setter("alert_rule_id", alert_rule_id) if alert_rule_name is not None: - pulumi.set(__self__, "alert_rule_name", alert_rule_name) + _setter("alert_rule_name", alert_rule_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if monitor_condition is not None: - pulumi.set(__self__, "monitor_condition", monitor_condition) + _setter("monitor_condition", monitor_condition) if monitor_service is not None: - pulumi.set(__self__, "monitor_service", monitor_service) + _setter("monitor_service", monitor_service) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if signal_type is not None: - pulumi.set(__self__, "signal_type", signal_type) + _setter("signal_type", signal_type) if target_resource is not None: - pulumi.set(__self__, "target_resource", target_resource) + _setter("target_resource", target_resource) if target_resource_group is not None: - pulumi.set(__self__, "target_resource_group", target_resource_group) + _setter("target_resource_group", target_resource_group) if target_resource_type is not None: - pulumi.set(__self__, "target_resource_type", target_resource_type) + _setter("target_resource_type", target_resource_type) @property @pulumi.getter(name="alertContext") @@ -2791,8 +3774,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionAlertContext._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -2820,8 +3820,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionAlertRuleId._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -2849,8 +3866,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionAlertRuleName._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -2878,8 +3912,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionDescription._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -2907,8 +3958,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: Specifies a list of values to match for a given condition. Possible values are `Fired` and `Resolved`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionMonitorCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -2936,8 +4004,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: A list of values to match for a given condition. Possible values are `ActivityLog Administrative`, `ActivityLog Autoscale`, `ActivityLog Policy`, `ActivityLog Recommendation`, `ActivityLog Security`, `Application Insights`, `Azure Backup`, `Azure Stack Edge`, `Azure Stack Hub`, `Custom`, `Data Box Gateway`, `Health Platform`, `Log Alerts V2`, `Log Analytics`, `Platform`, `Prometheus`, `Resource Health`, `Smart Detector`, and `VM Insights - Health`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionMonitorService._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -2965,8 +4050,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: Specifies list of values to match for a given condition. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3`, and `Sev4`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionSeverity._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -2994,8 +4096,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: Specifies a list of values to match for a given condition. Possible values are `Metric`, `Log`, `Unknown`, and `Health`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionSignalType._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3023,8 +4142,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: A list of values to match for a given condition. The values should be valid resource IDs. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionTargetResource._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3052,8 +4188,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: A list of values to match for a given condition. The values should be valid resource group IDs. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionTargetResourceGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3081,8 +4234,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: A list of values to match for a given condition. The values should be valid resource types. (e.g. Microsoft.Compute/VirtualMachines) """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleActionGroupConditionTargetResourceType._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3135,14 +4305,37 @@ def __init__(__self__, *, :param 'AlertProcessingRuleActionGroupScheduleRecurrenceArgs' recurrence: A `recurrence` block as defined above. :param str time_zone: The time zone (e.g. Pacific Standard time, Eastern Standard Time). Defaults to `UTC`. [possible values are defined here](https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11)). """ + AlertProcessingRuleActionGroupSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + effective_from=effective_from, + effective_until=effective_until, + recurrence=recurrence, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + effective_from: Optional[str] = None, + effective_until: Optional[str] = None, + recurrence: Optional['outputs.AlertProcessingRuleActionGroupScheduleRecurrence'] = None, + time_zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if effective_from is None and 'effectiveFrom' in kwargs: + effective_from = kwargs['effectiveFrom'] + if effective_until is None and 'effectiveUntil' in kwargs: + effective_until = kwargs['effectiveUntil'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if effective_from is not None: - pulumi.set(__self__, "effective_from", effective_from) + _setter("effective_from", effective_from) if effective_until is not None: - pulumi.set(__self__, "effective_until", effective_until) + _setter("effective_until", effective_until) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter(name="effectiveFrom") @@ -3188,12 +4381,27 @@ def __init__(__self__, *, :param Sequence['AlertProcessingRuleActionGroupScheduleRecurrenceMonthlyArgs'] monthlies: One or more `monthly` blocks as defined above. :param Sequence['AlertProcessingRuleActionGroupScheduleRecurrenceWeeklyArgs'] weeklies: One or more `weekly` blocks as defined below. """ + AlertProcessingRuleActionGroupScheduleRecurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + dailies=dailies, + monthlies=monthlies, + weeklies=weeklies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dailies: Optional[Sequence['outputs.AlertProcessingRuleActionGroupScheduleRecurrenceDaily']] = None, + monthlies: Optional[Sequence['outputs.AlertProcessingRuleActionGroupScheduleRecurrenceMonthly']] = None, + weeklies: Optional[Sequence['outputs.AlertProcessingRuleActionGroupScheduleRecurrenceWeekly']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dailies is not None: - pulumi.set(__self__, "dailies", dailies) + _setter("dailies", dailies) if monthlies is not None: - pulumi.set(__self__, "monthlies", monthlies) + _setter("monthlies", monthlies) if weeklies is not None: - pulumi.set(__self__, "weeklies", weeklies) + _setter("weeklies", weeklies) @property @pulumi.getter @@ -3248,8 +4456,29 @@ def __init__(__self__, *, :param str end_time: Specifies the recurrence end time (H:M:S). :param str start_time: Specifies the recurrence start time (H:M:S). """ - pulumi.set(__self__, "end_time", end_time) - pulumi.set(__self__, "start_time", start_time) + AlertProcessingRuleActionGroupScheduleRecurrenceDaily._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_time=end_time, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_time: Optional[str] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if end_time is None: + raise TypeError("Missing 'end_time' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + + _setter("end_time", end_time) + _setter("start_time", start_time) @property @pulumi.getter(name="endTime") @@ -3300,11 +4529,34 @@ def __init__(__self__, *, :param str end_time: Specifies the recurrence end time (H:M:S). :param str start_time: Specifies the recurrence start time (H:M:S). """ - pulumi.set(__self__, "days_of_months", days_of_months) + AlertProcessingRuleActionGroupScheduleRecurrenceMonthly._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_months=days_of_months, + end_time=end_time, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_months: Optional[Sequence[int]] = None, + end_time: Optional[str] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_months is None and 'daysOfMonths' in kwargs: + days_of_months = kwargs['daysOfMonths'] + if days_of_months is None: + raise TypeError("Missing 'days_of_months' argument") + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("days_of_months", days_of_months) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="daysOfMonths") @@ -3363,11 +4615,34 @@ def __init__(__self__, *, :param str end_time: Specifies the recurrence end time (H:M:S). :param str start_time: Specifies the recurrence start time (H:M:S). """ - pulumi.set(__self__, "days_of_weeks", days_of_weeks) + AlertProcessingRuleActionGroupScheduleRecurrenceWeekly._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_weeks=days_of_weeks, + end_time=end_time, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_weeks: Optional[Sequence[str]] = None, + end_time: Optional[str] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if days_of_weeks is None: + raise TypeError("Missing 'days_of_weeks' argument") + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("days_of_weeks", days_of_weeks) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="daysOfWeeks") @@ -3454,28 +4729,77 @@ def __init__(__self__, *, :param 'AlertProcessingRuleSuppressionConditionTargetResourceGroupArgs' target_resource_group: A `target_resource_group` block as defined below. :param 'AlertProcessingRuleSuppressionConditionTargetResourceTypeArgs' target_resource_type: A `target_resource_type` block as defined below. """ + AlertProcessingRuleSuppressionCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_context=alert_context, + alert_rule_id=alert_rule_id, + alert_rule_name=alert_rule_name, + description=description, + monitor_condition=monitor_condition, + monitor_service=monitor_service, + severity=severity, + signal_type=signal_type, + target_resource=target_resource, + target_resource_group=target_resource_group, + target_resource_type=target_resource_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_context: Optional['outputs.AlertProcessingRuleSuppressionConditionAlertContext'] = None, + alert_rule_id: Optional['outputs.AlertProcessingRuleSuppressionConditionAlertRuleId'] = None, + alert_rule_name: Optional['outputs.AlertProcessingRuleSuppressionConditionAlertRuleName'] = None, + description: Optional['outputs.AlertProcessingRuleSuppressionConditionDescription'] = None, + monitor_condition: Optional['outputs.AlertProcessingRuleSuppressionConditionMonitorCondition'] = None, + monitor_service: Optional['outputs.AlertProcessingRuleSuppressionConditionMonitorService'] = None, + severity: Optional['outputs.AlertProcessingRuleSuppressionConditionSeverity'] = None, + signal_type: Optional['outputs.AlertProcessingRuleSuppressionConditionSignalType'] = None, + target_resource: Optional['outputs.AlertProcessingRuleSuppressionConditionTargetResource'] = None, + target_resource_group: Optional['outputs.AlertProcessingRuleSuppressionConditionTargetResourceGroup'] = None, + target_resource_type: Optional['outputs.AlertProcessingRuleSuppressionConditionTargetResourceType'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_context is None and 'alertContext' in kwargs: + alert_context = kwargs['alertContext'] + if alert_rule_id is None and 'alertRuleId' in kwargs: + alert_rule_id = kwargs['alertRuleId'] + if alert_rule_name is None and 'alertRuleName' in kwargs: + alert_rule_name = kwargs['alertRuleName'] + if monitor_condition is None and 'monitorCondition' in kwargs: + monitor_condition = kwargs['monitorCondition'] + if monitor_service is None and 'monitorService' in kwargs: + monitor_service = kwargs['monitorService'] + if signal_type is None and 'signalType' in kwargs: + signal_type = kwargs['signalType'] + if target_resource is None and 'targetResource' in kwargs: + target_resource = kwargs['targetResource'] + if target_resource_group is None and 'targetResourceGroup' in kwargs: + target_resource_group = kwargs['targetResourceGroup'] + if target_resource_type is None and 'targetResourceType' in kwargs: + target_resource_type = kwargs['targetResourceType'] + if alert_context is not None: - pulumi.set(__self__, "alert_context", alert_context) + _setter("alert_context", alert_context) if alert_rule_id is not None: - pulumi.set(__self__, "alert_rule_id", alert_rule_id) + _setter("alert_rule_id", alert_rule_id) if alert_rule_name is not None: - pulumi.set(__self__, "alert_rule_name", alert_rule_name) + _setter("alert_rule_name", alert_rule_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if monitor_condition is not None: - pulumi.set(__self__, "monitor_condition", monitor_condition) + _setter("monitor_condition", monitor_condition) if monitor_service is not None: - pulumi.set(__self__, "monitor_service", monitor_service) + _setter("monitor_service", monitor_service) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if signal_type is not None: - pulumi.set(__self__, "signal_type", signal_type) + _setter("signal_type", signal_type) if target_resource is not None: - pulumi.set(__self__, "target_resource", target_resource) + _setter("target_resource", target_resource) if target_resource_group is not None: - pulumi.set(__self__, "target_resource_group", target_resource_group) + _setter("target_resource_group", target_resource_group) if target_resource_type is not None: - pulumi.set(__self__, "target_resource_type", target_resource_type) + _setter("target_resource_type", target_resource_type) @property @pulumi.getter(name="alertContext") @@ -3575,8 +4899,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionAlertContext._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3604,8 +4945,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionAlertRuleId._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3633,8 +4991,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionAlertRuleName._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3662,8 +5037,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: Specifies a list of values to match for a given condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionDescription._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3691,8 +5083,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: Specifies a list of values to match for a given condition. Possible values are `Fired` and `Resolved`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionMonitorCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3720,8 +5129,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: A list of values to match for a given condition. Possible values are `ActivityLog Administrative`, `ActivityLog Autoscale`, `ActivityLog Policy`, `ActivityLog Recommendation`, `ActivityLog Security`, `Application Insights`, `Azure Backup`, `Azure Stack Edge`, `Azure Stack Hub`, `Custom`, `Data Box Gateway`, `Health Platform`, `Log Alerts V2`, `Log Analytics`, `Platform`, `Prometheus`, `Resource Health`, `Smart Detector`, and `VM Insights - Health`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionMonitorService._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3749,8 +5175,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: Specifies list of values to match for a given condition. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3`, and `Sev4`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionSeverity._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3778,8 +5221,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals` and `NotEquals`. :param Sequence[str] values: Specifies a list of values to match for a given condition. Possible values are `Metric`, `Log`, `Unknown`, and `Health`. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionSignalType._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3807,8 +5267,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: A list of values to match for a given condition. The values should be valid resource IDs. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionTargetResource._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3836,8 +5313,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: A list of values to match for a given condition. The values should be valid resource group IDs. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionTargetResourceGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3865,8 +5359,25 @@ def __init__(__self__, *, :param str operator: The operator for a given condition. Possible values are `Equals`, `NotEquals`, `Contains`, and `DoesNotContain`. :param Sequence[str] values: A list of values to match for a given condition. The values should be valid resource types. (e.g. Microsoft.Compute/VirtualMachines) """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AlertProcessingRuleSuppressionConditionTargetResourceType._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -3919,14 +5430,37 @@ def __init__(__self__, *, :param 'AlertProcessingRuleSuppressionScheduleRecurrenceArgs' recurrence: A `recurrence` block as defined above. :param str time_zone: The time zone (e.g. Pacific Standard time, Eastern Standard Time). Defaults to `UTC`. [possible values are defined here](https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11)). """ + AlertProcessingRuleSuppressionSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + effective_from=effective_from, + effective_until=effective_until, + recurrence=recurrence, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + effective_from: Optional[str] = None, + effective_until: Optional[str] = None, + recurrence: Optional['outputs.AlertProcessingRuleSuppressionScheduleRecurrence'] = None, + time_zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if effective_from is None and 'effectiveFrom' in kwargs: + effective_from = kwargs['effectiveFrom'] + if effective_until is None and 'effectiveUntil' in kwargs: + effective_until = kwargs['effectiveUntil'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + if effective_from is not None: - pulumi.set(__self__, "effective_from", effective_from) + _setter("effective_from", effective_from) if effective_until is not None: - pulumi.set(__self__, "effective_until", effective_until) + _setter("effective_until", effective_until) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter(name="effectiveFrom") @@ -3972,12 +5506,27 @@ def __init__(__self__, *, :param Sequence['AlertProcessingRuleSuppressionScheduleRecurrenceMonthlyArgs'] monthlies: One or more `monthly` blocks as defined above. :param Sequence['AlertProcessingRuleSuppressionScheduleRecurrenceWeeklyArgs'] weeklies: One or more `weekly` blocks as defined below. """ + AlertProcessingRuleSuppressionScheduleRecurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + dailies=dailies, + monthlies=monthlies, + weeklies=weeklies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dailies: Optional[Sequence['outputs.AlertProcessingRuleSuppressionScheduleRecurrenceDaily']] = None, + monthlies: Optional[Sequence['outputs.AlertProcessingRuleSuppressionScheduleRecurrenceMonthly']] = None, + weeklies: Optional[Sequence['outputs.AlertProcessingRuleSuppressionScheduleRecurrenceWeekly']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dailies is not None: - pulumi.set(__self__, "dailies", dailies) + _setter("dailies", dailies) if monthlies is not None: - pulumi.set(__self__, "monthlies", monthlies) + _setter("monthlies", monthlies) if weeklies is not None: - pulumi.set(__self__, "weeklies", weeklies) + _setter("weeklies", weeklies) @property @pulumi.getter @@ -4032,8 +5581,29 @@ def __init__(__self__, *, :param str end_time: Specifies the recurrence end time (H:M:S). :param str start_time: Specifies the recurrence start time (H:M:S). """ - pulumi.set(__self__, "end_time", end_time) - pulumi.set(__self__, "start_time", start_time) + AlertProcessingRuleSuppressionScheduleRecurrenceDaily._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_time=end_time, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_time: Optional[str] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if end_time is None: + raise TypeError("Missing 'end_time' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + + _setter("end_time", end_time) + _setter("start_time", start_time) @property @pulumi.getter(name="endTime") @@ -4084,11 +5654,34 @@ def __init__(__self__, *, :param str end_time: Specifies the recurrence end time (H:M:S). :param str start_time: Specifies the recurrence start time (H:M:S). """ - pulumi.set(__self__, "days_of_months", days_of_months) + AlertProcessingRuleSuppressionScheduleRecurrenceMonthly._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_months=days_of_months, + end_time=end_time, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_months: Optional[Sequence[int]] = None, + end_time: Optional[str] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_months is None and 'daysOfMonths' in kwargs: + days_of_months = kwargs['daysOfMonths'] + if days_of_months is None: + raise TypeError("Missing 'days_of_months' argument") + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("days_of_months", days_of_months) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="daysOfMonths") @@ -4147,11 +5740,34 @@ def __init__(__self__, *, :param str end_time: Specifies the recurrence end time (H:M:S). :param str start_time: Specifies the recurrence start time (H:M:S). """ - pulumi.set(__self__, "days_of_weeks", days_of_weeks) + AlertProcessingRuleSuppressionScheduleRecurrenceWeekly._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_weeks=days_of_weeks, + end_time=end_time, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_weeks: Optional[Sequence[str]] = None, + end_time: Optional[str] = None, + start_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if days_of_weeks is None: + raise TypeError("Missing 'days_of_weeks' argument") + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("days_of_weeks", days_of_weeks) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="daysOfWeeks") @@ -4222,25 +5838,60 @@ def __init__(__self__, *, :param str record: Specifies the recorded metrics name. :param int severity: Specifies the severity of the alerts fired by the rule. Possible values are between 0 and 4. """ - pulumi.set(__self__, "expression", expression) + AlertPrometheusRuleGroupRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + expression=expression, + actions=actions, + alert=alert, + alert_resolution=alert_resolution, + annotations=annotations, + enabled=enabled, + for_=for_, + labels=labels, + record=record, + severity=severity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expression: Optional[str] = None, + actions: Optional[Sequence['outputs.AlertPrometheusRuleGroupRuleAction']] = None, + alert: Optional[str] = None, + alert_resolution: Optional['outputs.AlertPrometheusRuleGroupRuleAlertResolution'] = None, + annotations: Optional[Mapping[str, str]] = None, + enabled: Optional[bool] = None, + for_: Optional[str] = None, + labels: Optional[Mapping[str, str]] = None, + record: Optional[str] = None, + severity: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expression is None: + raise TypeError("Missing 'expression' argument") + if alert_resolution is None and 'alertResolution' in kwargs: + alert_resolution = kwargs['alertResolution'] + if for_ is None and 'for' in kwargs: + for_ = kwargs['for'] + + _setter("expression", expression) if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if alert is not None: - pulumi.set(__self__, "alert", alert) + _setter("alert", alert) if alert_resolution is not None: - pulumi.set(__self__, "alert_resolution", alert_resolution) + _setter("alert_resolution", alert_resolution) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if for_ is not None: - pulumi.set(__self__, "for_", for_) + _setter("for_", for_) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if record is not None: - pulumi.set(__self__, "record", record) + _setter("record", record) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) @property @pulumi.getter @@ -4353,9 +6004,28 @@ def __init__(__self__, *, > **Note:** `action_properties` can only be configured for IcM Connector Action Groups for now. Other public features will be supported in the future. """ - pulumi.set(__self__, "action_group_id", action_group_id) + AlertPrometheusRuleGroupRuleAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_group_id=action_group_id, + action_properties=action_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_group_id: Optional[str] = None, + action_properties: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_group_id is None and 'actionGroupId' in kwargs: + action_group_id = kwargs['actionGroupId'] + if action_group_id is None: + raise TypeError("Missing 'action_group_id' argument") + if action_properties is None and 'actionProperties' in kwargs: + action_properties = kwargs['actionProperties'] + + _setter("action_group_id", action_group_id) if action_properties is not None: - pulumi.set(__self__, "action_properties", action_properties) + _setter("action_properties", action_properties) @property @pulumi.getter(name="actionGroupId") @@ -4404,10 +6074,27 @@ def __init__(__self__, *, :param bool auto_resolved: Is the alert auto-resolution? Possible values are `true` and `false`. :param str time_to_resolve: Specifies the alert auto-resolution interval, represented in ISO 8601 duration format. """ + AlertPrometheusRuleGroupRuleAlertResolution._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_resolved=auto_resolved, + time_to_resolve=time_to_resolve, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_resolved: Optional[bool] = None, + time_to_resolve: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_resolved is None and 'autoResolved' in kwargs: + auto_resolved = kwargs['autoResolved'] + if time_to_resolve is None and 'timeToResolve' in kwargs: + time_to_resolve = kwargs['timeToResolve'] + if auto_resolved is not None: - pulumi.set(__self__, "auto_resolved", auto_resolved) + _setter("auto_resolved", auto_resolved) if time_to_resolve is not None: - pulumi.set(__self__, "time_to_resolve", time_to_resolve) + _setter("time_to_resolve", time_to_resolve) @property @pulumi.getter(name="autoResolved") @@ -4435,10 +6122,23 @@ def __init__(__self__, *, :param 'AutoscaleSettingNotificationEmailArgs' email: A `email` block as defined below. :param Sequence['AutoscaleSettingNotificationWebhookArgs'] webhooks: One or more `webhook` blocks as defined below. """ + AutoscaleSettingNotification._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + webhooks=webhooks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional['outputs.AutoscaleSettingNotificationEmail'] = None, + webhooks: Optional[Sequence['outputs.AutoscaleSettingNotificationWebhook']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if webhooks is not None: - pulumi.set(__self__, "webhooks", webhooks) + _setter("webhooks", webhooks) @property @pulumi.getter @@ -4489,12 +6189,33 @@ def __init__(__self__, *, :param bool send_to_subscription_administrator: Should email notifications be sent to the subscription administrator? Defaults to `false`. :param bool send_to_subscription_co_administrator: Should email notifications be sent to the subscription co-administrator? Defaults to `false`. """ + AutoscaleSettingNotificationEmail._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_emails=custom_emails, + send_to_subscription_administrator=send_to_subscription_administrator, + send_to_subscription_co_administrator=send_to_subscription_co_administrator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_emails: Optional[Sequence[str]] = None, + send_to_subscription_administrator: Optional[bool] = None, + send_to_subscription_co_administrator: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_emails is None and 'customEmails' in kwargs: + custom_emails = kwargs['customEmails'] + if send_to_subscription_administrator is None and 'sendToSubscriptionAdministrator' in kwargs: + send_to_subscription_administrator = kwargs['sendToSubscriptionAdministrator'] + if send_to_subscription_co_administrator is None and 'sendToSubscriptionCoAdministrator' in kwargs: + send_to_subscription_co_administrator = kwargs['sendToSubscriptionCoAdministrator'] + if custom_emails is not None: - pulumi.set(__self__, "custom_emails", custom_emails) + _setter("custom_emails", custom_emails) if send_to_subscription_administrator is not None: - pulumi.set(__self__, "send_to_subscription_administrator", send_to_subscription_administrator) + _setter("send_to_subscription_administrator", send_to_subscription_administrator) if send_to_subscription_co_administrator is not None: - pulumi.set(__self__, "send_to_subscription_co_administrator", send_to_subscription_co_administrator) + _setter("send_to_subscription_co_administrator", send_to_subscription_co_administrator) @property @pulumi.getter(name="customEmails") @@ -4547,9 +6268,26 @@ def __init__(__self__, *, :param str service_uri: The HTTPS URI which should receive scale notifications. :param Mapping[str, str] properties: A map of settings. """ - pulumi.set(__self__, "service_uri", service_uri) + AutoscaleSettingNotificationWebhook._configure( + lambda key, value: pulumi.set(__self__, key, value), + service_uri=service_uri, + properties=properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + service_uri: Optional[str] = None, + properties: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if service_uri is None and 'serviceUri' in kwargs: + service_uri = kwargs['serviceUri'] + if service_uri is None: + raise TypeError("Missing 'service_uri' argument") + + _setter("service_uri", service_uri) if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) @property @pulumi.getter(name="serviceUri") @@ -4596,9 +6334,28 @@ def __init__(__self__, *, :param str scale_mode: Specifies the predictive scale mode. Possible values are `Enabled` or `ForecastOnly`. :param str look_ahead_time: Specifies the amount of time by which instances are launched in advance. It must be between `PT1M` and `PT1H` in ISO 8601 format. """ - pulumi.set(__self__, "scale_mode", scale_mode) + AutoscaleSettingPredictive._configure( + lambda key, value: pulumi.set(__self__, key, value), + scale_mode=scale_mode, + look_ahead_time=look_ahead_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + scale_mode: Optional[str] = None, + look_ahead_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if scale_mode is None and 'scaleMode' in kwargs: + scale_mode = kwargs['scaleMode'] + if scale_mode is None: + raise TypeError("Missing 'scale_mode' argument") + if look_ahead_time is None and 'lookAheadTime' in kwargs: + look_ahead_time = kwargs['lookAheadTime'] + + _setter("scale_mode", scale_mode) if look_ahead_time is not None: - pulumi.set(__self__, "look_ahead_time", look_ahead_time) + _setter("look_ahead_time", look_ahead_time) @property @pulumi.getter(name="scaleMode") @@ -4649,14 +6406,39 @@ def __init__(__self__, *, :param 'AutoscaleSettingProfileRecurrenceArgs' recurrence: A `recurrence` block as defined below. This cannot be specified if a `fixed_date` block is specified. :param Sequence['AutoscaleSettingProfileRuleArgs'] rules: One or more (up to 10) `rule` blocks as defined below. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + AutoscaleSettingProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + fixed_date=fixed_date, + recurrence=recurrence, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional['outputs.AutoscaleSettingProfileCapacity'] = None, + name: Optional[str] = None, + fixed_date: Optional['outputs.AutoscaleSettingProfileFixedDate'] = None, + recurrence: Optional['outputs.AutoscaleSettingProfileRecurrence'] = None, + rules: Optional[Sequence['outputs.AutoscaleSettingProfileRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if fixed_date is None and 'fixedDate' in kwargs: + fixed_date = kwargs['fixedDate'] + + _setter("capacity", capacity) + _setter("name", name) if fixed_date is not None: - pulumi.set(__self__, "fixed_date", fixed_date) + _setter("fixed_date", fixed_date) if recurrence is not None: - pulumi.set(__self__, "recurrence", recurrence) + _setter("recurrence", recurrence) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter @@ -4712,9 +6494,30 @@ def __init__(__self__, *, > **NOTE:** The maximum number of instances is also limited by the amount of Cores available in the subscription. :param int minimum: The minimum number of instances for this resource. Valid values are between `0` and `1000`. """ - pulumi.set(__self__, "default", default) - pulumi.set(__self__, "maximum", maximum) - pulumi.set(__self__, "minimum", minimum) + AutoscaleSettingProfileCapacity._configure( + lambda key, value: pulumi.set(__self__, key, value), + default=default, + maximum=maximum, + minimum=minimum, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default: Optional[int] = None, + maximum: Optional[int] = None, + minimum: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default is None: + raise TypeError("Missing 'default' argument") + if maximum is None: + raise TypeError("Missing 'maximum' argument") + if minimum is None: + raise TypeError("Missing 'minimum' argument") + + _setter("default", default) + _setter("maximum", maximum) + _setter("minimum", minimum) @property @pulumi.getter @@ -4754,10 +6557,29 @@ def __init__(__self__, *, :param str start: Specifies the start date for the profile, formatted as an RFC3339 date string. :param str timezone: The Time Zone of the `start` and `end` times. A list of [possible values can be found here](https://msdn.microsoft.com/en-us/library/azure/dn931928.aspx). Defaults to `UTC`. """ - pulumi.set(__self__, "end", end) - pulumi.set(__self__, "start", start) + AutoscaleSettingProfileFixedDate._configure( + lambda key, value: pulumi.set(__self__, key, value), + end=end, + start=start, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end: Optional[str] = None, + start: Optional[str] = None, + timezone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end is None: + raise TypeError("Missing 'end' argument") + if start is None: + raise TypeError("Missing 'start' argument") + + _setter("end", end) + _setter("start", start) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) @property @pulumi.getter @@ -4797,11 +6619,34 @@ def __init__(__self__, *, :param int minutes: A list containing a single item which specifies the Minute interval at which this recurrence should be triggered. :param str timezone: The Time Zone used for the `hours` field. A list of [possible values can be found here](https://msdn.microsoft.com/en-us/library/azure/dn931928.aspx). Defaults to `UTC`. """ - pulumi.set(__self__, "days", days) - pulumi.set(__self__, "hours", hours) - pulumi.set(__self__, "minutes", minutes) + AutoscaleSettingProfileRecurrence._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + hours=hours, + minutes=minutes, + timezone=timezone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[Sequence[str]] = None, + hours: Optional[int] = None, + minutes: Optional[int] = None, + timezone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + if hours is None: + raise TypeError("Missing 'hours' argument") + if minutes is None: + raise TypeError("Missing 'minutes' argument") + + _setter("days", days) + _setter("hours", hours) + _setter("minutes", minutes) if timezone is not None: - pulumi.set(__self__, "timezone", timezone) + _setter("timezone", timezone) @property @pulumi.getter @@ -4864,8 +6709,29 @@ def __init__(__self__, *, :param 'AutoscaleSettingProfileRuleMetricTriggerArgs' metric_trigger: A `metric_trigger` block as defined below. :param 'AutoscaleSettingProfileRuleScaleActionArgs' scale_action: A `scale_action` block as defined below. """ - pulumi.set(__self__, "metric_trigger", metric_trigger) - pulumi.set(__self__, "scale_action", scale_action) + AutoscaleSettingProfileRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + metric_trigger=metric_trigger, + scale_action=scale_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + metric_trigger: Optional['outputs.AutoscaleSettingProfileRuleMetricTrigger'] = None, + scale_action: Optional['outputs.AutoscaleSettingProfileRuleScaleAction'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if metric_trigger is None and 'metricTrigger' in kwargs: + metric_trigger = kwargs['metricTrigger'] + if metric_trigger is None: + raise TypeError("Missing 'metric_trigger' argument") + if scale_action is None and 'scaleAction' in kwargs: + scale_action = kwargs['scaleAction'] + if scale_action is None: + raise TypeError("Missing 'scale_action' argument") + + _setter("metric_trigger", metric_trigger) + _setter("scale_action", scale_action) @property @pulumi.getter(name="metricTrigger") @@ -4942,20 +6808,81 @@ def __init__(__self__, *, :param bool divide_by_instance_count: Whether to enable metric divide by instance count. :param str metric_namespace: The namespace of the metric that defines what the rule monitors, such as `microsoft.compute/virtualmachinescalesets` for `Virtual Machine Scale Sets`. """ - pulumi.set(__self__, "metric_name", metric_name) - pulumi.set(__self__, "metric_resource_id", metric_resource_id) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "statistic", statistic) - pulumi.set(__self__, "threshold", threshold) - pulumi.set(__self__, "time_aggregation", time_aggregation) - pulumi.set(__self__, "time_grain", time_grain) - pulumi.set(__self__, "time_window", time_window) + AutoscaleSettingProfileRuleMetricTrigger._configure( + lambda key, value: pulumi.set(__self__, key, value), + metric_name=metric_name, + metric_resource_id=metric_resource_id, + operator=operator, + statistic=statistic, + threshold=threshold, + time_aggregation=time_aggregation, + time_grain=time_grain, + time_window=time_window, + dimensions=dimensions, + divide_by_instance_count=divide_by_instance_count, + metric_namespace=metric_namespace, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + metric_name: Optional[str] = None, + metric_resource_id: Optional[str] = None, + operator: Optional[str] = None, + statistic: Optional[str] = None, + threshold: Optional[float] = None, + time_aggregation: Optional[str] = None, + time_grain: Optional[str] = None, + time_window: Optional[str] = None, + dimensions: Optional[Sequence['outputs.AutoscaleSettingProfileRuleMetricTriggerDimension']] = None, + divide_by_instance_count: Optional[bool] = None, + metric_namespace: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if metric_name is None and 'metricName' in kwargs: + metric_name = kwargs['metricName'] + if metric_name is None: + raise TypeError("Missing 'metric_name' argument") + if metric_resource_id is None and 'metricResourceId' in kwargs: + metric_resource_id = kwargs['metricResourceId'] + if metric_resource_id is None: + raise TypeError("Missing 'metric_resource_id' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if statistic is None: + raise TypeError("Missing 'statistic' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if time_aggregation is None and 'timeAggregation' in kwargs: + time_aggregation = kwargs['timeAggregation'] + if time_aggregation is None: + raise TypeError("Missing 'time_aggregation' argument") + if time_grain is None and 'timeGrain' in kwargs: + time_grain = kwargs['timeGrain'] + if time_grain is None: + raise TypeError("Missing 'time_grain' argument") + if time_window is None and 'timeWindow' in kwargs: + time_window = kwargs['timeWindow'] + if time_window is None: + raise TypeError("Missing 'time_window' argument") + if divide_by_instance_count is None and 'divideByInstanceCount' in kwargs: + divide_by_instance_count = kwargs['divideByInstanceCount'] + if metric_namespace is None and 'metricNamespace' in kwargs: + metric_namespace = kwargs['metricNamespace'] + + _setter("metric_name", metric_name) + _setter("metric_resource_id", metric_resource_id) + _setter("operator", operator) + _setter("statistic", statistic) + _setter("threshold", threshold) + _setter("time_aggregation", time_aggregation) + _setter("time_grain", time_grain) + _setter("time_window", time_window) if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if divide_by_instance_count is not None: - pulumi.set(__self__, "divide_by_instance_count", divide_by_instance_count) + _setter("divide_by_instance_count", divide_by_instance_count) if metric_namespace is not None: - pulumi.set(__self__, "metric_namespace", metric_namespace) + _setter("metric_namespace", metric_namespace) @property @pulumi.getter(name="metricName") @@ -5059,9 +6986,30 @@ def __init__(__self__, *, :param str operator: The dimension operator. Possible values are `Equals` and `NotEquals`. `Equals` means being equal to any of the values. `NotEquals` means being not equal to any of the values. :param Sequence[str] values: A list of dimension values. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + AutoscaleSettingProfileRuleMetricTriggerDimension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -5101,10 +7049,35 @@ def __init__(__self__, *, :param str type: The type of action that should occur. Possible values are `ChangeCount`, `ExactCount`, `PercentChangeCount` and `ServiceAllowedNextValue`. :param int value: The number of instances involved in the scaling action. """ - pulumi.set(__self__, "cooldown", cooldown) - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + AutoscaleSettingProfileRuleScaleAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + cooldown=cooldown, + direction=direction, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cooldown: Optional[str] = None, + direction: Optional[str] = None, + type: Optional[str] = None, + value: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cooldown is None: + raise TypeError("Missing 'cooldown' argument") + if direction is None: + raise TypeError("Missing 'direction' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("cooldown", cooldown) + _setter("direction", direction) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -5175,14 +7148,43 @@ def __init__(__self__, *, :param str output_stream: The output stream of the transform. Only required if the data flow changes data to a different stream. :param str transform_kql: The KQL query to transform stream data. """ - pulumi.set(__self__, "destinations", destinations) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataFlow._configure( + lambda key, value: pulumi.set(__self__, key, value), + destinations=destinations, + streams=streams, + built_in_transform=built_in_transform, + output_stream=output_stream, + transform_kql=transform_kql, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destinations: Optional[Sequence[str]] = None, + streams: Optional[Sequence[str]] = None, + built_in_transform: Optional[str] = None, + output_stream: Optional[str] = None, + transform_kql: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destinations is None: + raise TypeError("Missing 'destinations' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + if built_in_transform is None and 'builtInTransform' in kwargs: + built_in_transform = kwargs['builtInTransform'] + if output_stream is None and 'outputStream' in kwargs: + output_stream = kwargs['outputStream'] + if transform_kql is None and 'transformKql' in kwargs: + transform_kql = kwargs['transformKql'] + + _setter("destinations", destinations) + _setter("streams", streams) if built_in_transform is not None: - pulumi.set(__self__, "built_in_transform", built_in_transform) + _setter("built_in_transform", built_in_transform) if output_stream is not None: - pulumi.set(__self__, "output_stream", output_stream) + _setter("output_stream", output_stream) if transform_kql is not None: - pulumi.set(__self__, "transform_kql", transform_kql) + _setter("transform_kql", transform_kql) @property @pulumi.getter @@ -5281,26 +7283,71 @@ def __init__(__self__, *, :param Sequence['DataCollectionRuleDataSourcesWindowsEventLogArgs'] windows_event_logs: One or more `windows_event_log` blocks as defined below. :param Sequence['DataCollectionRuleDataSourcesWindowsFirewallLogArgs'] windows_firewall_logs: One or more `windows_firewall_log` blocks as defined below. """ + DataCollectionRuleDataSources._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_import=data_import, + extensions=extensions, + iis_logs=iis_logs, + log_files=log_files, + performance_counters=performance_counters, + platform_telemetries=platform_telemetries, + prometheus_forwarders=prometheus_forwarders, + syslogs=syslogs, + windows_event_logs=windows_event_logs, + windows_firewall_logs=windows_firewall_logs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_import: Optional['outputs.DataCollectionRuleDataSourcesDataImport'] = None, + extensions: Optional[Sequence['outputs.DataCollectionRuleDataSourcesExtension']] = None, + iis_logs: Optional[Sequence['outputs.DataCollectionRuleDataSourcesIisLog']] = None, + log_files: Optional[Sequence['outputs.DataCollectionRuleDataSourcesLogFile']] = None, + performance_counters: Optional[Sequence['outputs.DataCollectionRuleDataSourcesPerformanceCounter']] = None, + platform_telemetries: Optional[Sequence['outputs.DataCollectionRuleDataSourcesPlatformTelemetry']] = None, + prometheus_forwarders: Optional[Sequence['outputs.DataCollectionRuleDataSourcesPrometheusForwarder']] = None, + syslogs: Optional[Sequence['outputs.DataCollectionRuleDataSourcesSyslog']] = None, + windows_event_logs: Optional[Sequence['outputs.DataCollectionRuleDataSourcesWindowsEventLog']] = None, + windows_firewall_logs: Optional[Sequence['outputs.DataCollectionRuleDataSourcesWindowsFirewallLog']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_import is None and 'dataImport' in kwargs: + data_import = kwargs['dataImport'] + if iis_logs is None and 'iisLogs' in kwargs: + iis_logs = kwargs['iisLogs'] + if log_files is None and 'logFiles' in kwargs: + log_files = kwargs['logFiles'] + if performance_counters is None and 'performanceCounters' in kwargs: + performance_counters = kwargs['performanceCounters'] + if platform_telemetries is None and 'platformTelemetries' in kwargs: + platform_telemetries = kwargs['platformTelemetries'] + if prometheus_forwarders is None and 'prometheusForwarders' in kwargs: + prometheus_forwarders = kwargs['prometheusForwarders'] + if windows_event_logs is None and 'windowsEventLogs' in kwargs: + windows_event_logs = kwargs['windowsEventLogs'] + if windows_firewall_logs is None and 'windowsFirewallLogs' in kwargs: + windows_firewall_logs = kwargs['windowsFirewallLogs'] + if data_import is not None: - pulumi.set(__self__, "data_import", data_import) + _setter("data_import", data_import) if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if iis_logs is not None: - pulumi.set(__self__, "iis_logs", iis_logs) + _setter("iis_logs", iis_logs) if log_files is not None: - pulumi.set(__self__, "log_files", log_files) + _setter("log_files", log_files) if performance_counters is not None: - pulumi.set(__self__, "performance_counters", performance_counters) + _setter("performance_counters", performance_counters) if platform_telemetries is not None: - pulumi.set(__self__, "platform_telemetries", platform_telemetries) + _setter("platform_telemetries", platform_telemetries) if prometheus_forwarders is not None: - pulumi.set(__self__, "prometheus_forwarders", prometheus_forwarders) + _setter("prometheus_forwarders", prometheus_forwarders) if syslogs is not None: - pulumi.set(__self__, "syslogs", syslogs) + _setter("syslogs", syslogs) if windows_event_logs is not None: - pulumi.set(__self__, "windows_event_logs", windows_event_logs) + _setter("windows_event_logs", windows_event_logs) if windows_firewall_logs is not None: - pulumi.set(__self__, "windows_firewall_logs", windows_firewall_logs) + _setter("windows_firewall_logs", windows_firewall_logs) @property @pulumi.getter(name="dataImport") @@ -5407,7 +7454,22 @@ def __init__(__self__, *, """ :param Sequence['DataCollectionRuleDataSourcesDataImportEventHubDataSourceArgs'] event_hub_data_sources: An `event_hub_data_source` block as defined below. """ - pulumi.set(__self__, "event_hub_data_sources", event_hub_data_sources) + DataCollectionRuleDataSourcesDataImport._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_hub_data_sources=event_hub_data_sources, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_hub_data_sources: Optional[Sequence['outputs.DataCollectionRuleDataSourcesDataImportEventHubDataSource']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_hub_data_sources is None and 'eventHubDataSources' in kwargs: + event_hub_data_sources = kwargs['eventHubDataSources'] + if event_hub_data_sources is None: + raise TypeError("Missing 'event_hub_data_sources' argument") + + _setter("event_hub_data_sources", event_hub_data_sources) @property @pulumi.getter(name="eventHubDataSources") @@ -5446,10 +7508,31 @@ def __init__(__self__, *, :param str stream: The stream to collect from Event Hub. Possible value should be a custom stream name. :param str consumer_group: The Event Hub consumer group name. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "stream", stream) + DataCollectionRuleDataSourcesDataImportEventHubDataSource._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + stream=stream, + consumer_group=consumer_group, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + stream: Optional[str] = None, + consumer_group: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if stream is None: + raise TypeError("Missing 'stream' argument") + if consumer_group is None and 'consumerGroup' in kwargs: + consumer_group = kwargs['consumerGroup'] + + _setter("name", name) + _setter("stream", stream) if consumer_group is not None: - pulumi.set(__self__, "consumer_group", consumer_group) + _setter("consumer_group", consumer_group) @property @pulumi.getter @@ -5512,13 +7595,44 @@ def __init__(__self__, *, :param str extension_json: A JSON String which specifies the extension setting. :param Sequence[str] input_data_sources: Specifies a list of data sources this extension needs data from. An item should be a name of a supported data source which produces only one stream. Supported data sources type: `performance_counter`, `windows_event_log`,and `syslog`. """ - pulumi.set(__self__, "extension_name", extension_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesExtension._configure( + lambda key, value: pulumi.set(__self__, key, value), + extension_name=extension_name, + name=name, + streams=streams, + extension_json=extension_json, + input_data_sources=input_data_sources, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + extension_name: Optional[str] = None, + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + extension_json: Optional[str] = None, + input_data_sources: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if extension_name is None and 'extensionName' in kwargs: + extension_name = kwargs['extensionName'] + if extension_name is None: + raise TypeError("Missing 'extension_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + if extension_json is None and 'extensionJson' in kwargs: + extension_json = kwargs['extensionJson'] + if input_data_sources is None and 'inputDataSources' in kwargs: + input_data_sources = kwargs['inputDataSources'] + + _setter("extension_name", extension_name) + _setter("name", name) + _setter("streams", streams) if extension_json is not None: - pulumi.set(__self__, "extension_json", extension_json) + _setter("extension_json", extension_json) if input_data_sources is not None: - pulumi.set(__self__, "input_data_sources", input_data_sources) + _setter("input_data_sources", input_data_sources) @property @pulumi.getter(name="extensionName") @@ -5589,10 +7703,31 @@ def __init__(__self__, *, :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible value is `Microsoft-W3CIISLog`. :param Sequence[str] log_directories: Specifies a list of absolute paths where the log files are located. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesIisLog._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + streams=streams, + log_directories=log_directories, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + log_directories: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + if log_directories is None and 'logDirectories' in kwargs: + log_directories = kwargs['logDirectories'] + + _setter("name", name) + _setter("streams", streams) if log_directories is not None: - pulumi.set(__self__, "log_directories", log_directories) + _setter("log_directories", log_directories) @property @pulumi.getter @@ -5651,12 +7786,41 @@ def __init__(__self__, *, :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible value should be custom stream names. :param 'DataCollectionRuleDataSourcesLogFileSettingsArgs' settings: A `settings` block as defined below. """ - pulumi.set(__self__, "file_patterns", file_patterns) - pulumi.set(__self__, "format", format) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesLogFile._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_patterns=file_patterns, + format=format, + name=name, + streams=streams, + settings=settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_patterns: Optional[Sequence[str]] = None, + format: Optional[str] = None, + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + settings: Optional['outputs.DataCollectionRuleDataSourcesLogFileSettings'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_patterns is None and 'filePatterns' in kwargs: + file_patterns = kwargs['filePatterns'] + if file_patterns is None: + raise TypeError("Missing 'file_patterns' argument") + if format is None: + raise TypeError("Missing 'format' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("file_patterns", file_patterns) + _setter("format", format) + _setter("name", name) + _setter("streams", streams) if settings is not None: - pulumi.set(__self__, "settings", settings) + _setter("settings", settings) @property @pulumi.getter(name="filePatterns") @@ -5706,7 +7870,20 @@ def __init__(__self__, *, """ :param 'DataCollectionRuleDataSourcesLogFileSettingsTextArgs' text: A `text` block as defined below. """ - pulumi.set(__self__, "text", text) + DataCollectionRuleDataSourcesLogFileSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + text=text, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + text: Optional['outputs.DataCollectionRuleDataSourcesLogFileSettingsText'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if text is None: + raise TypeError("Missing 'text' argument") + + _setter("text", text) @property @pulumi.getter @@ -5741,7 +7918,22 @@ def __init__(__self__, *, """ :param str record_start_timestamp_format: The timestamp format of the text log files. Possible values are `ISO 8601`, `YYYY-MM-DD HH:MM:SS`, `M/D/YYYY HH:MM:SS AM/PM`, `Mon DD, YYYY HH:MM:SS`, `yyMMdd HH:mm:ss`, `ddMMyy HH:mm:ss`, `MMM d hh:mm:ss`, `dd/MMM/yyyy:HH:mm:ss zzz`,and `yyyy-MM-ddTHH:mm:ssK`. """ - pulumi.set(__self__, "record_start_timestamp_format", record_start_timestamp_format) + DataCollectionRuleDataSourcesLogFileSettingsText._configure( + lambda key, value: pulumi.set(__self__, key, value), + record_start_timestamp_format=record_start_timestamp_format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + record_start_timestamp_format: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if record_start_timestamp_format is None and 'recordStartTimestampFormat' in kwargs: + record_start_timestamp_format = kwargs['recordStartTimestampFormat'] + if record_start_timestamp_format is None: + raise TypeError("Missing 'record_start_timestamp_format' argument") + + _setter("record_start_timestamp_format", record_start_timestamp_format) @property @pulumi.getter(name="recordStartTimestampFormat") @@ -5784,10 +7976,39 @@ def __init__(__self__, *, :param int sampling_frequency_in_seconds: The number of seconds between consecutive counter measurements (samples). The value should be integer between `1` and `300` inclusive. `sampling_frequency_in_seconds` must be equal to `60` seconds for counters collected with `Microsoft-InsightsMetrics` stream. :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values include but not limited to `Microsoft-InsightsMetrics`,and `Microsoft-Perf`. """ - pulumi.set(__self__, "counter_specifiers", counter_specifiers) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "sampling_frequency_in_seconds", sampling_frequency_in_seconds) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesPerformanceCounter._configure( + lambda key, value: pulumi.set(__self__, key, value), + counter_specifiers=counter_specifiers, + name=name, + sampling_frequency_in_seconds=sampling_frequency_in_seconds, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + counter_specifiers: Optional[Sequence[str]] = None, + name: Optional[str] = None, + sampling_frequency_in_seconds: Optional[int] = None, + streams: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if counter_specifiers is None and 'counterSpecifiers' in kwargs: + counter_specifiers = kwargs['counterSpecifiers'] + if counter_specifiers is None: + raise TypeError("Missing 'counter_specifiers' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if sampling_frequency_in_seconds is None and 'samplingFrequencyInSeconds' in kwargs: + sampling_frequency_in_seconds = kwargs['samplingFrequencyInSeconds'] + if sampling_frequency_in_seconds is None: + raise TypeError("Missing 'sampling_frequency_in_seconds' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("counter_specifiers", counter_specifiers) + _setter("name", name) + _setter("sampling_frequency_in_seconds", sampling_frequency_in_seconds) + _setter("streams", streams) @property @pulumi.getter(name="counterSpecifiers") @@ -5831,8 +8052,25 @@ def __init__(__self__, *, :param str name: The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule. :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values include but not limited to `Microsoft.Cache/redis:Metrics-Group-All`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesPlatformTelemetry._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("name", name) + _setter("streams", streams) @property @pulumi.getter @@ -5879,10 +8117,31 @@ def __init__(__self__, *, :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible value is `Microsoft-PrometheusMetrics`. :param Sequence['DataCollectionRuleDataSourcesPrometheusForwarderLabelIncludeFilterArgs'] label_include_filters: One or more `label_include_filter` blocks as defined above. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesPrometheusForwarder._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + streams=streams, + label_include_filters=label_include_filters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + label_include_filters: Optional[Sequence['outputs.DataCollectionRuleDataSourcesPrometheusForwarderLabelIncludeFilter']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + if label_include_filters is None and 'labelIncludeFilters' in kwargs: + label_include_filters = kwargs['labelIncludeFilters'] + + _setter("name", name) + _setter("streams", streams) if label_include_filters is not None: - pulumi.set(__self__, "label_include_filters", label_include_filters) + _setter("label_include_filters", label_include_filters) @property @pulumi.getter @@ -5918,8 +8177,25 @@ def __init__(__self__, *, :param str label: The label of the filter. This label should be unique across all `label_include_fileter` block. Possible value is `microsoft_metrics_include_label`. :param str value: The value of the filter. """ - pulumi.set(__self__, "label", label) - pulumi.set(__self__, "value", value) + DataCollectionRuleDataSourcesPrometheusForwarderLabelIncludeFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if label is None: + raise TypeError("Missing 'label' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("label", label) + _setter("value", value) @property @pulumi.getter @@ -5972,11 +8248,38 @@ def __init__(__self__, *, > **Note:** In 4.0 or later version of the provider, `streams` will be required. In 3.x version of provider, if `streams` is not specified in creation, it is default to `["Microsoft-Syslog"]`. if `streams` need to be modified (include change other value to the default value), it must be explicitly specified. """ - pulumi.set(__self__, "facility_names", facility_names) - pulumi.set(__self__, "log_levels", log_levels) - pulumi.set(__self__, "name", name) + DataCollectionRuleDataSourcesSyslog._configure( + lambda key, value: pulumi.set(__self__, key, value), + facility_names=facility_names, + log_levels=log_levels, + name=name, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + facility_names: Optional[Sequence[str]] = None, + log_levels: Optional[Sequence[str]] = None, + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if facility_names is None and 'facilityNames' in kwargs: + facility_names = kwargs['facilityNames'] + if facility_names is None: + raise TypeError("Missing 'facility_names' argument") + if log_levels is None and 'logLevels' in kwargs: + log_levels = kwargs['logLevels'] + if log_levels is None: + raise TypeError("Missing 'log_levels' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("facility_names", facility_names) + _setter("log_levels", log_levels) + _setter("name", name) if streams is not None: - pulumi.set(__self__, "streams", streams) + _setter("streams", streams) @property @pulumi.getter(name="facilityNames") @@ -6041,9 +8344,32 @@ def __init__(__self__, *, :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values include but not limited to `Microsoft-Event`,and `Microsoft-WindowsEvent`, `Microsoft-RomeDetectionEvent`, and `Microsoft-SecurityEvent`. :param Sequence[str] x_path_queries: Specifies a list of Windows Event Log queries in XPath expression. Please see [this document](https://learn.microsoft.com/en-us/azure/azure-monitor/agents/data-collection-rule-azure-monitor-agent?tabs=cli#filter-events-using-xpath-queries) for more information. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) - pulumi.set(__self__, "x_path_queries", x_path_queries) + DataCollectionRuleDataSourcesWindowsEventLog._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + streams=streams, + x_path_queries=x_path_queries, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + x_path_queries: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + if x_path_queries is None and 'xPathQueries' in kwargs: + x_path_queries = kwargs['xPathQueries'] + if x_path_queries is None: + raise TypeError("Missing 'x_path_queries' argument") + + _setter("name", name) + _setter("streams", streams) + _setter("x_path_queries", x_path_queries) @property @pulumi.getter @@ -6079,8 +8405,25 @@ def __init__(__self__, *, :param str name: The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule. :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + DataCollectionRuleDataSourcesWindowsFirewallLog._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("name", name) + _setter("streams", streams) @property @pulumi.getter @@ -6155,22 +8498,63 @@ def __init__(__self__, *, > **NOTE** At least one of `azure_monitor_metrics`, `event_hub`, `event_hub_direct`, `log_analytics`, `monitor_account`, `storage_blob`, `storage_blob_direct`,and `storage_table_direct` blocks must be specified. """ + DataCollectionRuleDestinations._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_monitor_metrics=azure_monitor_metrics, + event_hub=event_hub, + event_hub_direct=event_hub_direct, + log_analytics=log_analytics, + monitor_accounts=monitor_accounts, + storage_blob_directs=storage_blob_directs, + storage_blobs=storage_blobs, + storage_table_directs=storage_table_directs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_monitor_metrics: Optional['outputs.DataCollectionRuleDestinationsAzureMonitorMetrics'] = None, + event_hub: Optional['outputs.DataCollectionRuleDestinationsEventHub'] = None, + event_hub_direct: Optional['outputs.DataCollectionRuleDestinationsEventHubDirect'] = None, + log_analytics: Optional[Sequence['outputs.DataCollectionRuleDestinationsLogAnalytic']] = None, + monitor_accounts: Optional[Sequence['outputs.DataCollectionRuleDestinationsMonitorAccount']] = None, + storage_blob_directs: Optional[Sequence['outputs.DataCollectionRuleDestinationsStorageBlobDirect']] = None, + storage_blobs: Optional[Sequence['outputs.DataCollectionRuleDestinationsStorageBlob']] = None, + storage_table_directs: Optional[Sequence['outputs.DataCollectionRuleDestinationsStorageTableDirect']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_monitor_metrics is None and 'azureMonitorMetrics' in kwargs: + azure_monitor_metrics = kwargs['azureMonitorMetrics'] + if event_hub is None and 'eventHub' in kwargs: + event_hub = kwargs['eventHub'] + if event_hub_direct is None and 'eventHubDirect' in kwargs: + event_hub_direct = kwargs['eventHubDirect'] + if log_analytics is None and 'logAnalytics' in kwargs: + log_analytics = kwargs['logAnalytics'] + if monitor_accounts is None and 'monitorAccounts' in kwargs: + monitor_accounts = kwargs['monitorAccounts'] + if storage_blob_directs is None and 'storageBlobDirects' in kwargs: + storage_blob_directs = kwargs['storageBlobDirects'] + if storage_blobs is None and 'storageBlobs' in kwargs: + storage_blobs = kwargs['storageBlobs'] + if storage_table_directs is None and 'storageTableDirects' in kwargs: + storage_table_directs = kwargs['storageTableDirects'] + if azure_monitor_metrics is not None: - pulumi.set(__self__, "azure_monitor_metrics", azure_monitor_metrics) + _setter("azure_monitor_metrics", azure_monitor_metrics) if event_hub is not None: - pulumi.set(__self__, "event_hub", event_hub) + _setter("event_hub", event_hub) if event_hub_direct is not None: - pulumi.set(__self__, "event_hub_direct", event_hub_direct) + _setter("event_hub_direct", event_hub_direct) if log_analytics is not None: - pulumi.set(__self__, "log_analytics", log_analytics) + _setter("log_analytics", log_analytics) if monitor_accounts is not None: - pulumi.set(__self__, "monitor_accounts", monitor_accounts) + _setter("monitor_accounts", monitor_accounts) if storage_blob_directs is not None: - pulumi.set(__self__, "storage_blob_directs", storage_blob_directs) + _setter("storage_blob_directs", storage_blob_directs) if storage_blobs is not None: - pulumi.set(__self__, "storage_blobs", storage_blobs) + _setter("storage_blobs", storage_blobs) if storage_table_directs is not None: - pulumi.set(__self__, "storage_table_directs", storage_table_directs) + _setter("storage_table_directs", storage_table_directs) @property @pulumi.getter(name="azureMonitorMetrics") @@ -6248,7 +8632,20 @@ def __init__(__self__, *, """ :param str name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. """ - pulumi.set(__self__, "name", name) + DataCollectionRuleDestinationsAzureMonitorMetrics._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -6285,8 +8682,27 @@ def __init__(__self__, *, :param str event_hub_id: The resource ID of the Event Hub. :param str name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. """ - pulumi.set(__self__, "event_hub_id", event_hub_id) - pulumi.set(__self__, "name", name) + DataCollectionRuleDestinationsEventHub._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_hub_id=event_hub_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_hub_id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_hub_id is None and 'eventHubId' in kwargs: + event_hub_id = kwargs['eventHubId'] + if event_hub_id is None: + raise TypeError("Missing 'event_hub_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("event_hub_id", event_hub_id) + _setter("name", name) @property @pulumi.getter(name="eventHubId") @@ -6331,8 +8747,27 @@ def __init__(__self__, *, :param str event_hub_id: The resource ID of the Event Hub. :param str name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. """ - pulumi.set(__self__, "event_hub_id", event_hub_id) - pulumi.set(__self__, "name", name) + DataCollectionRuleDestinationsEventHubDirect._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_hub_id=event_hub_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_hub_id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_hub_id is None and 'eventHubId' in kwargs: + event_hub_id = kwargs['eventHubId'] + if event_hub_id is None: + raise TypeError("Missing 'event_hub_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("event_hub_id", event_hub_id) + _setter("name", name) @property @pulumi.getter(name="eventHubId") @@ -6377,8 +8812,27 @@ def __init__(__self__, *, :param str name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. :param str workspace_resource_id: The ID of a Log Analytic Workspace resource. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "workspace_resource_id", workspace_resource_id) + DataCollectionRuleDestinationsLogAnalytic._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + workspace_resource_id=workspace_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + workspace_resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if workspace_resource_id is None and 'workspaceResourceId' in kwargs: + workspace_resource_id = kwargs['workspaceResourceId'] + if workspace_resource_id is None: + raise TypeError("Missing 'workspace_resource_id' argument") + + _setter("name", name) + _setter("workspace_resource_id", workspace_resource_id) @property @pulumi.getter @@ -6423,8 +8877,27 @@ def __init__(__self__, *, :param str monitor_account_id: The resource ID of the Monitor Account. :param str name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. """ - pulumi.set(__self__, "monitor_account_id", monitor_account_id) - pulumi.set(__self__, "name", name) + DataCollectionRuleDestinationsMonitorAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + monitor_account_id=monitor_account_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + monitor_account_id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if monitor_account_id is None and 'monitorAccountId' in kwargs: + monitor_account_id = kwargs['monitorAccountId'] + if monitor_account_id is None: + raise TypeError("Missing 'monitor_account_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("monitor_account_id", monitor_account_id) + _setter("name", name) @property @pulumi.getter(name="monitorAccountId") @@ -6473,9 +8946,34 @@ def __init__(__self__, *, :param str name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. :param str storage_account_id: The resource ID of the Storage Account. """ - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + DataCollectionRuleDestinationsStorageBlob._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + name=name, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[str] = None, + name: Optional[str] = None, + storage_account_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + + _setter("container_name", container_name) + _setter("name", name) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="containerName") @@ -6532,9 +9030,34 @@ def __init__(__self__, *, :param str name: The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule. :param str storage_account_id: The resource ID of the Storage Account. """ - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + DataCollectionRuleDestinationsStorageBlobDirect._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + name=name, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[str] = None, + name: Optional[str] = None, + storage_account_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + + _setter("container_name", container_name) + _setter("name", name) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="containerName") @@ -6591,9 +9114,34 @@ def __init__(__self__, *, :param str storage_account_id: The resource ID of the Storage Account. :param str table_name: The Storage Table name. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "table_name", table_name) + DataCollectionRuleDestinationsStorageTableDirect._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + storage_account_id=storage_account_id, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + storage_account_id: Optional[str] = None, + table_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if table_name is None: + raise TypeError("Missing 'table_name' argument") + + _setter("name", name) + _setter("storage_account_id", storage_account_id) + _setter("table_name", table_name) @property @pulumi.getter @@ -6656,13 +9204,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + DataCollectionRuleIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -6725,8 +9298,27 @@ def __init__(__self__, *, :param Sequence['DataCollectionRuleStreamDeclarationColumnArgs'] columns: One or more `column` blocks as defined above. :param str stream_name: The name of the custom stream. This name should be unique across all `stream_declaration` blocks. """ - pulumi.set(__self__, "columns", columns) - pulumi.set(__self__, "stream_name", stream_name) + DataCollectionRuleStreamDeclaration._configure( + lambda key, value: pulumi.set(__self__, key, value), + columns=columns, + stream_name=stream_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + columns: Optional[Sequence['outputs.DataCollectionRuleStreamDeclarationColumn']] = None, + stream_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if columns is None: + raise TypeError("Missing 'columns' argument") + if stream_name is None and 'streamName' in kwargs: + stream_name = kwargs['streamName'] + if stream_name is None: + raise TypeError("Missing 'stream_name' argument") + + _setter("columns", columns) + _setter("stream_name", stream_name) @property @pulumi.getter @@ -6754,8 +9346,25 @@ def __init__(__self__, *, :param str name: The name of the column. :param str type: The type of the column data. Possible values are `string`, `int`, `long`, `real`, `boolean`, `datetime`,and `dynamic`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + DataCollectionRuleStreamDeclarationColumn._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -6812,12 +9421,31 @@ def __init__(__self__, *, !> **NOTE:** `retention_policy` has been deprecated in favor of `storage.ManagementPolicy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention). """ + DiagnosticSettingEnabledLog._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + category_group=category_group, + retention_policy=retention_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[str] = None, + category_group: Optional[str] = None, + retention_policy: Optional['outputs.DiagnosticSettingEnabledLogRetentionPolicy'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category_group is None and 'categoryGroup' in kwargs: + category_group = kwargs['categoryGroup'] + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if category is not None: - pulumi.set(__self__, "category", category) + _setter("category", category) if category_group is not None: - pulumi.set(__self__, "category_group", category_group) + _setter("category_group", category_group) if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) @property @pulumi.getter @@ -6867,9 +9495,24 @@ def __init__(__self__, *, > **NOTE:** Setting this to `0` will retain the events indefinitely. """ - pulumi.set(__self__, "enabled", enabled) + DiagnosticSettingEnabledLogRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -6931,14 +9574,35 @@ def __init__(__self__, *, !> **NOTE:** `retention_policy` has been deprecated in favor of `storage.ManagementPolicy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention). """ + DiagnosticSettingLog._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + category_group=category_group, + enabled=enabled, + retention_policy=retention_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[str] = None, + category_group: Optional[str] = None, + enabled: Optional[bool] = None, + retention_policy: Optional['outputs.DiagnosticSettingLogRetentionPolicy'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category_group is None and 'categoryGroup' in kwargs: + category_group = kwargs['categoryGroup'] + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if category is not None: - pulumi.set(__self__, "category", category) + _setter("category", category) if category_group is not None: - pulumi.set(__self__, "category_group", category_group) + _setter("category_group", category_group) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) @property @pulumi.getter @@ -6996,9 +9660,24 @@ def __init__(__self__, *, > **NOTE:** Setting this to `0` will retain the events indefinitely. """ - pulumi.set(__self__, "enabled", enabled) + DiagnosticSettingLogRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -7052,11 +9731,30 @@ def __init__(__self__, *, !> **NOTE:** `retention_policy` has been deprecated in favor of `storage.ManagementPolicy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention). """ - pulumi.set(__self__, "category", category) + DiagnosticSettingMetric._configure( + lambda key, value: pulumi.set(__self__, key, value), + category=category, + enabled=enabled, + retention_policy=retention_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category: Optional[str] = None, + enabled: Optional[bool] = None, + retention_policy: Optional['outputs.DiagnosticSettingMetricRetentionPolicy'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category is None: + raise TypeError("Missing 'category' argument") + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + + _setter("category", category) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) @property @pulumi.getter @@ -7102,9 +9800,24 @@ def __init__(__self__, *, > **NOTE:** Setting this to `0` will retain the events indefinitely. """ - pulumi.set(__self__, "enabled", enabled) + DiagnosticSettingMetricRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -7135,9 +9848,24 @@ def __init__(__self__, *, :param bool enabled: A boolean value to indicate whether the retention policy is enabled. :param int days: The number of days for the retention policy. Defaults to `0`. """ - pulumi.set(__self__, "enabled", enabled) + LogProfileRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("enabled", enabled) if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -7192,11 +9920,42 @@ def __init__(__self__, *, :param str usage_type: Different usage types. Possible values are `PAYG` or `COMMITTED`. Changing this forces a new logz Monitor to be created. :param str plan_id: Plan id as published by Logz. The only possible value is `100gb14days`. Defaults to `100gb14days`. Changing this forces a new logz Monitor to be created. """ - pulumi.set(__self__, "billing_cycle", billing_cycle) - pulumi.set(__self__, "effective_date", effective_date) - pulumi.set(__self__, "usage_type", usage_type) + LogzMonitorPlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + billing_cycle=billing_cycle, + effective_date=effective_date, + usage_type=usage_type, + plan_id=plan_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + billing_cycle: Optional[str] = None, + effective_date: Optional[str] = None, + usage_type: Optional[str] = None, + plan_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if billing_cycle is None and 'billingCycle' in kwargs: + billing_cycle = kwargs['billingCycle'] + if billing_cycle is None: + raise TypeError("Missing 'billing_cycle' argument") + if effective_date is None and 'effectiveDate' in kwargs: + effective_date = kwargs['effectiveDate'] + if effective_date is None: + raise TypeError("Missing 'effective_date' argument") + if usage_type is None and 'usageType' in kwargs: + usage_type = kwargs['usageType'] + if usage_type is None: + raise TypeError("Missing 'usage_type' argument") + if plan_id is None and 'planId' in kwargs: + plan_id = kwargs['planId'] + + _setter("billing_cycle", billing_cycle) + _setter("effective_date", effective_date) + _setter("usage_type", usage_type) if plan_id is not None: - pulumi.set(__self__, "plan_id", plan_id) + _setter("plan_id", plan_id) @property @pulumi.getter(name="billingCycle") @@ -7267,10 +10026,41 @@ def __init__(__self__, *, :param str last_name: Last Name of the user. Changing this forces a new logz Monitor to be created. :param str phone_number: Phone number of the user used by Logz for contacting them if needed. Changing this forces a new logz Monitor to be created. """ - pulumi.set(__self__, "email", email) - pulumi.set(__self__, "first_name", first_name) - pulumi.set(__self__, "last_name", last_name) - pulumi.set(__self__, "phone_number", phone_number) + LogzMonitorUser._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + first_name=first_name, + last_name=last_name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[str] = None, + first_name: Optional[str] = None, + last_name: Optional[str] = None, + phone_number: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + if first_name is None and 'firstName' in kwargs: + first_name = kwargs['firstName'] + if first_name is None: + raise TypeError("Missing 'first_name' argument") + if last_name is None and 'lastName' in kwargs: + last_name = kwargs['lastName'] + if last_name is None: + raise TypeError("Missing 'last_name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("email", email) + _setter("first_name", first_name) + _setter("last_name", last_name) + _setter("phone_number", phone_number) @property @pulumi.getter @@ -7318,10 +10108,29 @@ def __init__(__self__, *, :param str name: The name of the tag to match. :param str value: The value of the tag to match. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + LogzSubAccountTagRuleTagFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -7384,10 +10193,41 @@ def __init__(__self__, *, :param str last_name: Last Name of the user. Possible values must be between 1 and 50 characters in length. Changing this forces a new logz Sub Account to be created. :param str phone_number: Phone number of the user used by Logz for contacting them if needed. Possible values must be between 1 and 40 characters in length. Changing this forces a new logz Sub Account to be created. """ - pulumi.set(__self__, "email", email) - pulumi.set(__self__, "first_name", first_name) - pulumi.set(__self__, "last_name", last_name) - pulumi.set(__self__, "phone_number", phone_number) + LogzSubAccountUser._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + first_name=first_name, + last_name=last_name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[str] = None, + first_name: Optional[str] = None, + last_name: Optional[str] = None, + phone_number: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + if first_name is None and 'firstName' in kwargs: + first_name = kwargs['firstName'] + if first_name is None: + raise TypeError("Missing 'first_name' argument") + if last_name is None and 'lastName' in kwargs: + last_name = kwargs['lastName'] + if last_name is None: + raise TypeError("Missing 'last_name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("email", email) + _setter("first_name", first_name) + _setter("last_name", last_name) + _setter("phone_number", phone_number) @property @pulumi.getter @@ -7435,10 +10275,29 @@ def __init__(__self__, *, :param str name: The name of this `tag_filter`. :param str value: The value of this `tag_filter`. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) + LogzTagRuleTagFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("action", action) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -7493,9 +10352,28 @@ def __init__(__self__, *, :param str action_group_id: The ID of the Action Group can be sourced from the `monitoring.ActionGroup` resource :param Mapping[str, str] webhook_properties: The map of custom string properties to include with the post operation. These data are appended to the webhook payload. """ - pulumi.set(__self__, "action_group_id", action_group_id) + MetricAlertAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_group_id=action_group_id, + webhook_properties=webhook_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_group_id: Optional[str] = None, + webhook_properties: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_group_id is None and 'actionGroupId' in kwargs: + action_group_id = kwargs['actionGroupId'] + if action_group_id is None: + raise TypeError("Missing 'action_group_id' argument") + if webhook_properties is None and 'webhookProperties' in kwargs: + webhook_properties = kwargs['webhookProperties'] + + _setter("action_group_id", action_group_id) if webhook_properties is not None: - pulumi.set(__self__, "webhook_properties", webhook_properties) + _setter("webhook_properties", webhook_properties) @property @pulumi.getter(name="actionGroupId") @@ -7546,9 +10424,36 @@ def __init__(__self__, *, :param int failed_location_count: The number of failed locations. :param str web_test_id: The ID of the Application Insights Web Test. """ - pulumi.set(__self__, "component_id", component_id) - pulumi.set(__self__, "failed_location_count", failed_location_count) - pulumi.set(__self__, "web_test_id", web_test_id) + MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteria._configure( + lambda key, value: pulumi.set(__self__, key, value), + component_id=component_id, + failed_location_count=failed_location_count, + web_test_id=web_test_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + component_id: Optional[str] = None, + failed_location_count: Optional[int] = None, + web_test_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if component_id is None and 'componentId' in kwargs: + component_id = kwargs['componentId'] + if component_id is None: + raise TypeError("Missing 'component_id' argument") + if failed_location_count is None and 'failedLocationCount' in kwargs: + failed_location_count = kwargs['failedLocationCount'] + if failed_location_count is None: + raise TypeError("Missing 'failed_location_count' argument") + if web_test_id is None and 'webTestId' in kwargs: + web_test_id = kwargs['webTestId'] + if web_test_id is None: + raise TypeError("Missing 'web_test_id' argument") + + _setter("component_id", component_id) + _setter("failed_location_count", failed_location_count) + _setter("web_test_id", web_test_id) @property @pulumi.getter(name="componentId") @@ -7615,15 +10520,54 @@ def __init__(__self__, *, :param Sequence['MetricAlertCriteriaDimensionArgs'] dimensions: One or more `dimension` blocks as defined below. :param bool skip_metric_validation: Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to `false`. """ - pulumi.set(__self__, "aggregation", aggregation) - pulumi.set(__self__, "metric_name", metric_name) - pulumi.set(__self__, "metric_namespace", metric_namespace) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + MetricAlertCriteria._configure( + lambda key, value: pulumi.set(__self__, key, value), + aggregation=aggregation, + metric_name=metric_name, + metric_namespace=metric_namespace, + operator=operator, + threshold=threshold, + dimensions=dimensions, + skip_metric_validation=skip_metric_validation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aggregation: Optional[str] = None, + metric_name: Optional[str] = None, + metric_namespace: Optional[str] = None, + operator: Optional[str] = None, + threshold: Optional[float] = None, + dimensions: Optional[Sequence['outputs.MetricAlertCriteriaDimension']] = None, + skip_metric_validation: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aggregation is None: + raise TypeError("Missing 'aggregation' argument") + if metric_name is None and 'metricName' in kwargs: + metric_name = kwargs['metricName'] + if metric_name is None: + raise TypeError("Missing 'metric_name' argument") + if metric_namespace is None and 'metricNamespace' in kwargs: + metric_namespace = kwargs['metricNamespace'] + if metric_namespace is None: + raise TypeError("Missing 'metric_namespace' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if skip_metric_validation is None and 'skipMetricValidation' in kwargs: + skip_metric_validation = kwargs['skipMetricValidation'] + + _setter("aggregation", aggregation) + _setter("metric_name", metric_name) + _setter("metric_namespace", metric_namespace) + _setter("operator", operator) + _setter("threshold", threshold) if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if skip_metric_validation is not None: - pulumi.set(__self__, "skip_metric_validation", skip_metric_validation) + _setter("skip_metric_validation", skip_metric_validation) @property @pulumi.getter @@ -7693,9 +10637,30 @@ def __init__(__self__, *, :param str operator: The dimension operator. Possible values are `Include`, `Exclude` and `StartsWith`. :param Sequence[str] values: The list of dimension values. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + MetricAlertCriteriaDimension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -7776,21 +10741,74 @@ def __init__(__self__, *, :param str ignore_data_before: The [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date from which to start learning the metric historical data and calculate the dynamic thresholds. :param bool skip_metric_validation: Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? """ - pulumi.set(__self__, "aggregation", aggregation) - pulumi.set(__self__, "alert_sensitivity", alert_sensitivity) - pulumi.set(__self__, "metric_name", metric_name) - pulumi.set(__self__, "metric_namespace", metric_namespace) - pulumi.set(__self__, "operator", operator) + MetricAlertDynamicCriteria._configure( + lambda key, value: pulumi.set(__self__, key, value), + aggregation=aggregation, + alert_sensitivity=alert_sensitivity, + metric_name=metric_name, + metric_namespace=metric_namespace, + operator=operator, + dimensions=dimensions, + evaluation_failure_count=evaluation_failure_count, + evaluation_total_count=evaluation_total_count, + ignore_data_before=ignore_data_before, + skip_metric_validation=skip_metric_validation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aggregation: Optional[str] = None, + alert_sensitivity: Optional[str] = None, + metric_name: Optional[str] = None, + metric_namespace: Optional[str] = None, + operator: Optional[str] = None, + dimensions: Optional[Sequence['outputs.MetricAlertDynamicCriteriaDimension']] = None, + evaluation_failure_count: Optional[int] = None, + evaluation_total_count: Optional[int] = None, + ignore_data_before: Optional[str] = None, + skip_metric_validation: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aggregation is None: + raise TypeError("Missing 'aggregation' argument") + if alert_sensitivity is None and 'alertSensitivity' in kwargs: + alert_sensitivity = kwargs['alertSensitivity'] + if alert_sensitivity is None: + raise TypeError("Missing 'alert_sensitivity' argument") + if metric_name is None and 'metricName' in kwargs: + metric_name = kwargs['metricName'] + if metric_name is None: + raise TypeError("Missing 'metric_name' argument") + if metric_namespace is None and 'metricNamespace' in kwargs: + metric_namespace = kwargs['metricNamespace'] + if metric_namespace is None: + raise TypeError("Missing 'metric_namespace' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if evaluation_failure_count is None and 'evaluationFailureCount' in kwargs: + evaluation_failure_count = kwargs['evaluationFailureCount'] + if evaluation_total_count is None and 'evaluationTotalCount' in kwargs: + evaluation_total_count = kwargs['evaluationTotalCount'] + if ignore_data_before is None and 'ignoreDataBefore' in kwargs: + ignore_data_before = kwargs['ignoreDataBefore'] + if skip_metric_validation is None and 'skipMetricValidation' in kwargs: + skip_metric_validation = kwargs['skipMetricValidation'] + + _setter("aggregation", aggregation) + _setter("alert_sensitivity", alert_sensitivity) + _setter("metric_name", metric_name) + _setter("metric_namespace", metric_namespace) + _setter("operator", operator) if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if evaluation_failure_count is not None: - pulumi.set(__self__, "evaluation_failure_count", evaluation_failure_count) + _setter("evaluation_failure_count", evaluation_failure_count) if evaluation_total_count is not None: - pulumi.set(__self__, "evaluation_total_count", evaluation_total_count) + _setter("evaluation_total_count", evaluation_total_count) if ignore_data_before is not None: - pulumi.set(__self__, "ignore_data_before", ignore_data_before) + _setter("ignore_data_before", ignore_data_before) if skip_metric_validation is not None: - pulumi.set(__self__, "skip_metric_validation", skip_metric_validation) + _setter("skip_metric_validation", skip_metric_validation) @property @pulumi.getter @@ -7884,9 +10902,30 @@ def __init__(__self__, *, :param str operator: The dimension operator. Possible values are `Include`, `Exclude` and `StartsWith`. :param Sequence[str] values: The list of dimension values. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + MetricAlertDynamicCriteriaDimension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -7945,11 +10984,34 @@ def __init__(__self__, *, :param str custom_webhook_payload: Custom payload to be sent for all webhook payloads in alerting action. :param str email_subject: Custom subject override for all email ids in Azure action group. """ - pulumi.set(__self__, "action_groups", action_groups) + ScheduledQueryRulesAlertAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_groups=action_groups, + custom_webhook_payload=custom_webhook_payload, + email_subject=email_subject, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_groups: Optional[Sequence[str]] = None, + custom_webhook_payload: Optional[str] = None, + email_subject: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_groups is None and 'actionGroups' in kwargs: + action_groups = kwargs['actionGroups'] + if action_groups is None: + raise TypeError("Missing 'action_groups' argument") + if custom_webhook_payload is None and 'customWebhookPayload' in kwargs: + custom_webhook_payload = kwargs['customWebhookPayload'] + if email_subject is None and 'emailSubject' in kwargs: + email_subject = kwargs['emailSubject'] + + _setter("action_groups", action_groups) if custom_webhook_payload is not None: - pulumi.set(__self__, "custom_webhook_payload", custom_webhook_payload) + _setter("custom_webhook_payload", custom_webhook_payload) if email_subject is not None: - pulumi.set(__self__, "email_subject", email_subject) + _setter("email_subject", email_subject) @property @pulumi.getter(name="actionGroups") @@ -8004,10 +11066,31 @@ def __init__(__self__, *, :param float threshold: Result or count threshold based on which rule should be triggered. Values must be between 0 and 10000 inclusive. :param 'ScheduledQueryRulesAlertTriggerMetricTriggerArgs' metric_trigger: A `metric_trigger` block as defined above. Trigger condition for metric query rule. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + ScheduledQueryRulesAlertTrigger._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + threshold=threshold, + metric_trigger=metric_trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + threshold: Optional[float] = None, + metric_trigger: Optional['outputs.ScheduledQueryRulesAlertTriggerMetricTrigger'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if metric_trigger is None and 'metricTrigger' in kwargs: + metric_trigger = kwargs['metricTrigger'] + + _setter("operator", operator) + _setter("threshold", threshold) if metric_trigger is not None: - pulumi.set(__self__, "metric_trigger", metric_trigger) + _setter("metric_trigger", metric_trigger) @property @pulumi.getter @@ -8066,11 +11149,38 @@ def __init__(__self__, *, :param float threshold: The threshold of the metric trigger. Values must be between 0 and 10000 inclusive. :param str metric_column: Evaluation of metric on a particular column. """ - pulumi.set(__self__, "metric_trigger_type", metric_trigger_type) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + ScheduledQueryRulesAlertTriggerMetricTrigger._configure( + lambda key, value: pulumi.set(__self__, key, value), + metric_trigger_type=metric_trigger_type, + operator=operator, + threshold=threshold, + metric_column=metric_column, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + metric_trigger_type: Optional[str] = None, + operator: Optional[str] = None, + threshold: Optional[float] = None, + metric_column: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if metric_trigger_type is None and 'metricTriggerType' in kwargs: + metric_trigger_type = kwargs['metricTriggerType'] + if metric_trigger_type is None: + raise TypeError("Missing 'metric_trigger_type' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if metric_column is None and 'metricColumn' in kwargs: + metric_column = kwargs['metricColumn'] + + _setter("metric_trigger_type", metric_trigger_type) + _setter("operator", operator) + _setter("threshold", threshold) if metric_column is not None: - pulumi.set(__self__, "metric_column", metric_column) + _setter("metric_column", metric_column) @property @pulumi.getter(name="metricTriggerType") @@ -8133,10 +11243,27 @@ def __init__(__self__, *, :param Sequence[str] action_groups: List of Action Group resource IDs to invoke when the alert fires. :param Mapping[str, str] custom_properties: Specifies the properties of an alert payload. """ + ScheduledQueryRulesAlertV2Action._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_groups=action_groups, + custom_properties=custom_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_groups: Optional[Sequence[str]] = None, + custom_properties: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_groups is None and 'actionGroups' in kwargs: + action_groups = kwargs['actionGroups'] + if custom_properties is None and 'customProperties' in kwargs: + custom_properties = kwargs['customProperties'] + if action_groups is not None: - pulumi.set(__self__, "action_groups", action_groups) + _setter("action_groups", action_groups) if custom_properties is not None: - pulumi.set(__self__, "custom_properties", custom_properties) + _setter("custom_properties", custom_properties) @property @pulumi.getter(name="actionGroups") @@ -8201,18 +11328,59 @@ def __init__(__self__, *, > **Note** `metric_measure_column` is required if `time_aggregation_method` is `Average`, `Maximum`, `Minimum`, or `Total`. And `metric_measure_column` can not be specified if `time_aggregation_method` is `Count`. :param str resource_id_column: Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "query", query) - pulumi.set(__self__, "threshold", threshold) - pulumi.set(__self__, "time_aggregation_method", time_aggregation_method) + ScheduledQueryRulesAlertV2Criteria._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + query=query, + threshold=threshold, + time_aggregation_method=time_aggregation_method, + dimensions=dimensions, + failing_periods=failing_periods, + metric_measure_column=metric_measure_column, + resource_id_column=resource_id_column, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + query: Optional[str] = None, + threshold: Optional[float] = None, + time_aggregation_method: Optional[str] = None, + dimensions: Optional[Sequence['outputs.ScheduledQueryRulesAlertV2CriteriaDimension']] = None, + failing_periods: Optional['outputs.ScheduledQueryRulesAlertV2CriteriaFailingPeriods'] = None, + metric_measure_column: Optional[str] = None, + resource_id_column: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if query is None: + raise TypeError("Missing 'query' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + if time_aggregation_method is None and 'timeAggregationMethod' in kwargs: + time_aggregation_method = kwargs['timeAggregationMethod'] + if time_aggregation_method is None: + raise TypeError("Missing 'time_aggregation_method' argument") + if failing_periods is None and 'failingPeriods' in kwargs: + failing_periods = kwargs['failingPeriods'] + if metric_measure_column is None and 'metricMeasureColumn' in kwargs: + metric_measure_column = kwargs['metricMeasureColumn'] + if resource_id_column is None and 'resourceIdColumn' in kwargs: + resource_id_column = kwargs['resourceIdColumn'] + + _setter("operator", operator) + _setter("query", query) + _setter("threshold", threshold) + _setter("time_aggregation_method", time_aggregation_method) if dimensions is not None: - pulumi.set(__self__, "dimensions", dimensions) + _setter("dimensions", dimensions) if failing_periods is not None: - pulumi.set(__self__, "failing_periods", failing_periods) + _setter("failing_periods", failing_periods) if metric_measure_column is not None: - pulumi.set(__self__, "metric_measure_column", metric_measure_column) + _setter("metric_measure_column", metric_measure_column) if resource_id_column is not None: - pulumi.set(__self__, "resource_id_column", resource_id_column) + _setter("resource_id_column", resource_id_column) @property @pulumi.getter @@ -8292,9 +11460,30 @@ def __init__(__self__, *, :param str operator: Operator for dimension values. Possible values are `Exclude`,and `Include`. :param Sequence[str] values: List of dimension values. Use a wildcard `*` to collect all. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + ScheduledQueryRulesAlertV2CriteriaDimension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter @@ -8353,8 +11542,29 @@ def __init__(__self__, *, > **Note** `number_of_evaluation_periods` must be `1` for queries that do not project timestamp column """ - pulumi.set(__self__, "minimum_failing_periods_to_trigger_alert", minimum_failing_periods_to_trigger_alert) - pulumi.set(__self__, "number_of_evaluation_periods", number_of_evaluation_periods) + ScheduledQueryRulesAlertV2CriteriaFailingPeriods._configure( + lambda key, value: pulumi.set(__self__, key, value), + minimum_failing_periods_to_trigger_alert=minimum_failing_periods_to_trigger_alert, + number_of_evaluation_periods=number_of_evaluation_periods, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + minimum_failing_periods_to_trigger_alert: Optional[int] = None, + number_of_evaluation_periods: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if minimum_failing_periods_to_trigger_alert is None and 'minimumFailingPeriodsToTriggerAlert' in kwargs: + minimum_failing_periods_to_trigger_alert = kwargs['minimumFailingPeriodsToTriggerAlert'] + if minimum_failing_periods_to_trigger_alert is None: + raise TypeError("Missing 'minimum_failing_periods_to_trigger_alert' argument") + if number_of_evaluation_periods is None and 'numberOfEvaluationPeriods' in kwargs: + number_of_evaluation_periods = kwargs['numberOfEvaluationPeriods'] + if number_of_evaluation_periods is None: + raise TypeError("Missing 'number_of_evaluation_periods' argument") + + _setter("minimum_failing_periods_to_trigger_alert", minimum_failing_periods_to_trigger_alert) + _setter("number_of_evaluation_periods", number_of_evaluation_periods) @property @pulumi.getter(name="minimumFailingPeriodsToTriggerAlert") @@ -8403,8 +11613,27 @@ def __init__(__self__, *, :param Sequence['ScheduledQueryRulesLogCriteriaDimensionArgs'] dimensions: A `dimension` block as defined below. :param str metric_name: Name of the metric. Supported metrics are listed in the Azure Monitor [Microsoft.OperationalInsights/workspaces](https://docs.microsoft.com/azure/azure-monitor/platform/metrics-supported#microsoftoperationalinsightsworkspaces) metrics namespace. """ - pulumi.set(__self__, "dimensions", dimensions) - pulumi.set(__self__, "metric_name", metric_name) + ScheduledQueryRulesLogCriteria._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimensions=dimensions, + metric_name=metric_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimensions: Optional[Sequence['outputs.ScheduledQueryRulesLogCriteriaDimension']] = None, + metric_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dimensions is None: + raise TypeError("Missing 'dimensions' argument") + if metric_name is None and 'metricName' in kwargs: + metric_name = kwargs['metricName'] + if metric_name is None: + raise TypeError("Missing 'metric_name' argument") + + _setter("dimensions", dimensions) + _setter("metric_name", metric_name) @property @pulumi.getter @@ -8434,10 +11663,29 @@ def __init__(__self__, *, :param Sequence[str] values: List of dimension values. :param str operator: Operator for dimension values, - 'Include'. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + ScheduledQueryRulesLogCriteriaDimension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + operator=operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("values", values) if operator is not None: - pulumi.set(__self__, "operator", operator) + _setter("operator", operator) @property @pulumi.getter @@ -8494,11 +11742,32 @@ def __init__(__self__, *, :param str email_subject: Specifies a custom email subject if Email Receiver is specified in Monitor Action Group resource. :param str webhook_payload: A JSON String which Specifies the custom webhook payload if Webhook Receiver is specified in Monitor Action Group resource. """ - pulumi.set(__self__, "ids", ids) + SmartDetectorAlertRuleActionGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + ids=ids, + email_subject=email_subject, + webhook_payload=webhook_payload, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ids: Optional[Sequence[str]] = None, + email_subject: Optional[str] = None, + webhook_payload: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ids is None: + raise TypeError("Missing 'ids' argument") + if email_subject is None and 'emailSubject' in kwargs: + email_subject = kwargs['emailSubject'] + if webhook_payload is None and 'webhookPayload' in kwargs: + webhook_payload = kwargs['webhookPayload'] + + _setter("ids", ids) if email_subject is not None: - pulumi.set(__self__, "email_subject", email_subject) + _setter("email_subject", email_subject) if webhook_payload is not None: - pulumi.set(__self__, "webhook_payload", webhook_payload) + _setter("webhook_payload", webhook_payload) @property @pulumi.getter @@ -8536,9 +11805,34 @@ def __init__(__self__, *, :param str role_id: The arm role id. :param bool use_common_alert_schema: Indicates whether to use common alert schema. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "role_id", role_id) - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + GetActionGroupArmRoleReceiverResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + role_id=role_id, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + role_id: Optional[str] = None, + use_common_alert_schema: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if role_id is None and 'roleId' in kwargs: + role_id = kwargs['roleId'] + if role_id is None: + raise TypeError("Missing 'role_id' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + if use_common_alert_schema is None: + raise TypeError("Missing 'use_common_alert_schema' argument") + + _setter("name", name) + _setter("role_id", role_id) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter @@ -8584,13 +11878,62 @@ def __init__(__self__, *, :param bool use_common_alert_schema: Indicates whether to use common alert schema. :param str webhook_resource_id: The resource id for webhook linked to this runbook. """ - pulumi.set(__self__, "automation_account_id", automation_account_id) - pulumi.set(__self__, "is_global_runbook", is_global_runbook) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "runbook_name", runbook_name) - pulumi.set(__self__, "service_uri", service_uri) - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) - pulumi.set(__self__, "webhook_resource_id", webhook_resource_id) + GetActionGroupAutomationRunbookReceiverResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + automation_account_id=automation_account_id, + is_global_runbook=is_global_runbook, + name=name, + runbook_name=runbook_name, + service_uri=service_uri, + use_common_alert_schema=use_common_alert_schema, + webhook_resource_id=webhook_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automation_account_id: Optional[str] = None, + is_global_runbook: Optional[bool] = None, + name: Optional[str] = None, + runbook_name: Optional[str] = None, + service_uri: Optional[str] = None, + use_common_alert_schema: Optional[bool] = None, + webhook_resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automation_account_id is None and 'automationAccountId' in kwargs: + automation_account_id = kwargs['automationAccountId'] + if automation_account_id is None: + raise TypeError("Missing 'automation_account_id' argument") + if is_global_runbook is None and 'isGlobalRunbook' in kwargs: + is_global_runbook = kwargs['isGlobalRunbook'] + if is_global_runbook is None: + raise TypeError("Missing 'is_global_runbook' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if runbook_name is None and 'runbookName' in kwargs: + runbook_name = kwargs['runbookName'] + if runbook_name is None: + raise TypeError("Missing 'runbook_name' argument") + if service_uri is None and 'serviceUri' in kwargs: + service_uri = kwargs['serviceUri'] + if service_uri is None: + raise TypeError("Missing 'service_uri' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + if use_common_alert_schema is None: + raise TypeError("Missing 'use_common_alert_schema' argument") + if webhook_resource_id is None and 'webhookResourceId' in kwargs: + webhook_resource_id = kwargs['webhookResourceId'] + if webhook_resource_id is None: + raise TypeError("Missing 'webhook_resource_id' argument") + + _setter("automation_account_id", automation_account_id) + _setter("is_global_runbook", is_global_runbook) + _setter("name", name) + _setter("runbook_name", runbook_name) + _setter("service_uri", service_uri) + _setter("use_common_alert_schema", use_common_alert_schema) + _setter("webhook_resource_id", webhook_resource_id) @property @pulumi.getter(name="automationAccountId") @@ -8658,8 +12001,27 @@ def __init__(__self__, *, :param str email_address: The email address of this receiver. :param str name: Specifies the name of the Action Group. """ - pulumi.set(__self__, "email_address", email_address) - pulumi.set(__self__, "name", name) + GetActionGroupAzureAppPushReceiverResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_address=email_address, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_address: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_address is None and 'emailAddress' in kwargs: + email_address = kwargs['emailAddress'] + if email_address is None: + raise TypeError("Missing 'email_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("email_address", email_address) + _setter("name", name) @property @pulumi.getter(name="emailAddress") @@ -8693,11 +12055,48 @@ def __init__(__self__, *, :param str name: Specifies the name of the Action Group. :param bool use_common_alert_schema: Indicates whether to use common alert schema. """ - pulumi.set(__self__, "function_app_resource_id", function_app_resource_id) - pulumi.set(__self__, "function_name", function_name) - pulumi.set(__self__, "http_trigger_url", http_trigger_url) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + GetActionGroupAzureFunctionReceiverResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + function_app_resource_id=function_app_resource_id, + function_name=function_name, + http_trigger_url=http_trigger_url, + name=name, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + function_app_resource_id: Optional[str] = None, + function_name: Optional[str] = None, + http_trigger_url: Optional[str] = None, + name: Optional[str] = None, + use_common_alert_schema: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if function_app_resource_id is None and 'functionAppResourceId' in kwargs: + function_app_resource_id = kwargs['functionAppResourceId'] + if function_app_resource_id is None: + raise TypeError("Missing 'function_app_resource_id' argument") + if function_name is None and 'functionName' in kwargs: + function_name = kwargs['functionName'] + if function_name is None: + raise TypeError("Missing 'function_name' argument") + if http_trigger_url is None and 'httpTriggerUrl' in kwargs: + http_trigger_url = kwargs['httpTriggerUrl'] + if http_trigger_url is None: + raise TypeError("Missing 'http_trigger_url' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + if use_common_alert_schema is None: + raise TypeError("Missing 'use_common_alert_schema' argument") + + _setter("function_app_resource_id", function_app_resource_id) + _setter("function_name", function_name) + _setter("http_trigger_url", http_trigger_url) + _setter("name", name) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter(name="functionAppResourceId") @@ -8751,9 +12150,34 @@ def __init__(__self__, *, :param str name: Specifies the name of the Action Group. :param bool use_common_alert_schema: Indicates whether to use common alert schema. """ - pulumi.set(__self__, "email_address", email_address) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + GetActionGroupEmailReceiverResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_address=email_address, + name=name, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_address: Optional[str] = None, + name: Optional[str] = None, + use_common_alert_schema: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_address is None and 'emailAddress' in kwargs: + email_address = kwargs['emailAddress'] + if email_address is None: + raise TypeError("Missing 'email_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + if use_common_alert_schema is None: + raise TypeError("Missing 'use_common_alert_schema' argument") + + _setter("email_address", email_address) + _setter("name", name) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter(name="emailAddress") @@ -8799,14 +12223,61 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID for the subscription containing this Event Hub. :param bool use_common_alert_schema: Indicates whether to use common alert schema. """ - pulumi.set(__self__, "event_hub_id", event_hub_id) - pulumi.set(__self__, "event_hub_name", event_hub_name) - pulumi.set(__self__, "event_hub_namespace", event_hub_namespace) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "subscription_id", subscription_id) - pulumi.set(__self__, "tenant_id", tenant_id) + GetActionGroupEventHubReceiverResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_hub_id=event_hub_id, + event_hub_name=event_hub_name, + event_hub_namespace=event_hub_namespace, + name=name, + subscription_id=subscription_id, + tenant_id=tenant_id, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_hub_id: Optional[str] = None, + event_hub_name: Optional[str] = None, + event_hub_namespace: Optional[str] = None, + name: Optional[str] = None, + subscription_id: Optional[str] = None, + tenant_id: Optional[str] = None, + use_common_alert_schema: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_hub_id is None and 'eventHubId' in kwargs: + event_hub_id = kwargs['eventHubId'] + if event_hub_id is None: + raise TypeError("Missing 'event_hub_id' argument") + if event_hub_name is None and 'eventHubName' in kwargs: + event_hub_name = kwargs['eventHubName'] + if event_hub_name is None: + raise TypeError("Missing 'event_hub_name' argument") + if event_hub_namespace is None and 'eventHubNamespace' in kwargs: + event_hub_namespace = kwargs['eventHubNamespace'] + if event_hub_namespace is None: + raise TypeError("Missing 'event_hub_namespace' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + + _setter("event_hub_id", event_hub_id) + _setter("event_hub_name", event_hub_name) + _setter("event_hub_namespace", event_hub_namespace) + _setter("name", name) + _setter("subscription_id", subscription_id) + _setter("tenant_id", tenant_id) if use_common_alert_schema is not None: - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter(name="eventHubId") @@ -8883,11 +12354,46 @@ def __init__(__self__, *, :param str ticket_configuration: A JSON blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be part of this blob as well. :param str workspace_id: The Azure Log Analytics workspace ID where this connection is defined. """ - pulumi.set(__self__, "connection_id", connection_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "region", region) - pulumi.set(__self__, "ticket_configuration", ticket_configuration) - pulumi.set(__self__, "workspace_id", workspace_id) + GetActionGroupItsmReceiverResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_id=connection_id, + name=name, + region=region, + ticket_configuration=ticket_configuration, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_id: Optional[str] = None, + name: Optional[str] = None, + region: Optional[str] = None, + ticket_configuration: Optional[str] = None, + workspace_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_id is None and 'connectionId' in kwargs: + connection_id = kwargs['connectionId'] + if connection_id is None: + raise TypeError("Missing 'connection_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if region is None: + raise TypeError("Missing 'region' argument") + if ticket_configuration is None and 'ticketConfiguration' in kwargs: + ticket_configuration = kwargs['ticketConfiguration'] + if ticket_configuration is None: + raise TypeError("Missing 'ticket_configuration' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + + _setter("connection_id", connection_id) + _setter("name", name) + _setter("region", region) + _setter("ticket_configuration", ticket_configuration) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="connectionId") @@ -8943,10 +12449,41 @@ def __init__(__self__, *, :param str resource_id: The Azure resource ID of the logic app. :param bool use_common_alert_schema: Indicates whether to use common alert schema. """ - pulumi.set(__self__, "callback_url", callback_url) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "resource_id", resource_id) - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + GetActionGroupLogicAppReceiverResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + callback_url=callback_url, + name=name, + resource_id=resource_id, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + callback_url: Optional[str] = None, + name: Optional[str] = None, + resource_id: Optional[str] = None, + use_common_alert_schema: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if callback_url is None and 'callbackUrl' in kwargs: + callback_url = kwargs['callbackUrl'] + if callback_url is None: + raise TypeError("Missing 'callback_url' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + if use_common_alert_schema is None: + raise TypeError("Missing 'use_common_alert_schema' argument") + + _setter("callback_url", callback_url) + _setter("name", name) + _setter("resource_id", resource_id) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter(name="callbackUrl") @@ -8992,9 +12529,34 @@ def __init__(__self__, *, :param str name: Specifies the name of the Action Group. :param str phone_number: The phone number of the voice receiver. """ - pulumi.set(__self__, "country_code", country_code) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "phone_number", phone_number) + GetActionGroupSmsReceiverResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + country_code=country_code, + name=name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + country_code: Optional[str] = None, + name: Optional[str] = None, + phone_number: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if country_code is None and 'countryCode' in kwargs: + country_code = kwargs['countryCode'] + if country_code is None: + raise TypeError("Missing 'country_code' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("country_code", country_code) + _setter("name", name) + _setter("phone_number", phone_number) @property @pulumi.getter(name="countryCode") @@ -9032,9 +12594,34 @@ def __init__(__self__, *, :param str name: Specifies the name of the Action Group. :param str phone_number: The phone number of the voice receiver. """ - pulumi.set(__self__, "country_code", country_code) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "phone_number", phone_number) + GetActionGroupVoiceReceiverResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + country_code=country_code, + name=name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + country_code: Optional[str] = None, + name: Optional[str] = None, + phone_number: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if country_code is None and 'countryCode' in kwargs: + country_code = kwargs['countryCode'] + if country_code is None: + raise TypeError("Missing 'country_code' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("country_code", country_code) + _setter("name", name) + _setter("phone_number", phone_number) @property @pulumi.getter(name="countryCode") @@ -9073,10 +12660,41 @@ def __init__(__self__, *, :param str service_uri: The URI where webhooks should be sent. :param bool use_common_alert_schema: Indicates whether to use common alert schema. """ - pulumi.set(__self__, "aad_auths", aad_auths) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "service_uri", service_uri) - pulumi.set(__self__, "use_common_alert_schema", use_common_alert_schema) + GetActionGroupWebhookReceiverResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + aad_auths=aad_auths, + name=name, + service_uri=service_uri, + use_common_alert_schema=use_common_alert_schema, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aad_auths: Optional[Sequence['outputs.GetActionGroupWebhookReceiverAadAuthResult']] = None, + name: Optional[str] = None, + service_uri: Optional[str] = None, + use_common_alert_schema: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aad_auths is None and 'aadAuths' in kwargs: + aad_auths = kwargs['aadAuths'] + if aad_auths is None: + raise TypeError("Missing 'aad_auths' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if service_uri is None and 'serviceUri' in kwargs: + service_uri = kwargs['serviceUri'] + if service_uri is None: + raise TypeError("Missing 'service_uri' argument") + if use_common_alert_schema is None and 'useCommonAlertSchema' in kwargs: + use_common_alert_schema = kwargs['useCommonAlertSchema'] + if use_common_alert_schema is None: + raise TypeError("Missing 'use_common_alert_schema' argument") + + _setter("aad_auths", aad_auths) + _setter("name", name) + _setter("service_uri", service_uri) + _setter("use_common_alert_schema", use_common_alert_schema) @property @pulumi.getter(name="aadAuths") @@ -9117,9 +12735,36 @@ def __init__(__self__, *, """ :param str tenant_id: The Tenant ID for the subscription containing this Event Hub. """ - pulumi.set(__self__, "identifier_uri", identifier_uri) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "tenant_id", tenant_id) + GetActionGroupWebhookReceiverAadAuthResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identifier_uri=identifier_uri, + object_id=object_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identifier_uri: Optional[str] = None, + object_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identifier_uri is None and 'identifierUri' in kwargs: + identifier_uri = kwargs['identifierUri'] + if identifier_uri is None: + raise TypeError("Missing 'identifier_uri' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("identifier_uri", identifier_uri) + _setter("object_id", object_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="identifierUri") @@ -9155,11 +12800,46 @@ def __init__(__self__, *, :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :param str transform_kql: The KQL query to transform stream data. """ - pulumi.set(__self__, "built_in_transform", built_in_transform) - pulumi.set(__self__, "destinations", destinations) - pulumi.set(__self__, "output_stream", output_stream) - pulumi.set(__self__, "streams", streams) - pulumi.set(__self__, "transform_kql", transform_kql) + GetDataCollectionRuleDataFlowResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + built_in_transform=built_in_transform, + destinations=destinations, + output_stream=output_stream, + streams=streams, + transform_kql=transform_kql, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + built_in_transform: Optional[str] = None, + destinations: Optional[Sequence[str]] = None, + output_stream: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + transform_kql: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if built_in_transform is None and 'builtInTransform' in kwargs: + built_in_transform = kwargs['builtInTransform'] + if built_in_transform is None: + raise TypeError("Missing 'built_in_transform' argument") + if destinations is None: + raise TypeError("Missing 'destinations' argument") + if output_stream is None and 'outputStream' in kwargs: + output_stream = kwargs['outputStream'] + if output_stream is None: + raise TypeError("Missing 'output_stream' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + if transform_kql is None and 'transformKql' in kwargs: + transform_kql = kwargs['transformKql'] + if transform_kql is None: + raise TypeError("Missing 'transform_kql' argument") + + _setter("built_in_transform", built_in_transform) + _setter("destinations", destinations) + _setter("output_stream", output_stream) + _setter("streams", streams) + _setter("transform_kql", transform_kql) @property @pulumi.getter(name="builtInTransform") @@ -9227,18 +12907,79 @@ def __init__(__self__, *, :param Sequence['GetDataCollectionRuleDataSourceLogFileArgs'] log_files: One or more `log_file` blocks as defined below. :param Sequence['GetDataCollectionRuleDataSourcePlatformTelemetryArgs'] platform_telemetries: One or more `platform_telemetry` blocks as defined below. """ - pulumi.set(__self__, "data_imports", data_imports) - pulumi.set(__self__, "extensions", extensions) - pulumi.set(__self__, "iis_logs", iis_logs) - pulumi.set(__self__, "performance_counters", performance_counters) - pulumi.set(__self__, "prometheus_forwarders", prometheus_forwarders) - pulumi.set(__self__, "syslogs", syslogs) - pulumi.set(__self__, "windows_event_logs", windows_event_logs) - pulumi.set(__self__, "windows_firewall_logs", windows_firewall_logs) + GetDataCollectionRuleDataSourceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + data_imports=data_imports, + extensions=extensions, + iis_logs=iis_logs, + performance_counters=performance_counters, + prometheus_forwarders=prometheus_forwarders, + syslogs=syslogs, + windows_event_logs=windows_event_logs, + windows_firewall_logs=windows_firewall_logs, + log_files=log_files, + platform_telemetries=platform_telemetries, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data_imports: Optional[Sequence['outputs.GetDataCollectionRuleDataSourceDataImportResult']] = None, + extensions: Optional[Sequence['outputs.GetDataCollectionRuleDataSourceExtensionResult']] = None, + iis_logs: Optional[Sequence['outputs.GetDataCollectionRuleDataSourceIisLogResult']] = None, + performance_counters: Optional[Sequence['outputs.GetDataCollectionRuleDataSourcePerformanceCounterResult']] = None, + prometheus_forwarders: Optional[Sequence['outputs.GetDataCollectionRuleDataSourcePrometheusForwarderResult']] = None, + syslogs: Optional[Sequence['outputs.GetDataCollectionRuleDataSourceSyslogResult']] = None, + windows_event_logs: Optional[Sequence['outputs.GetDataCollectionRuleDataSourceWindowsEventLogResult']] = None, + windows_firewall_logs: Optional[Sequence['outputs.GetDataCollectionRuleDataSourceWindowsFirewallLogResult']] = None, + log_files: Optional[Sequence['outputs.GetDataCollectionRuleDataSourceLogFileResult']] = None, + platform_telemetries: Optional[Sequence['outputs.GetDataCollectionRuleDataSourcePlatformTelemetryResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_imports is None and 'dataImports' in kwargs: + data_imports = kwargs['dataImports'] + if data_imports is None: + raise TypeError("Missing 'data_imports' argument") + if extensions is None: + raise TypeError("Missing 'extensions' argument") + if iis_logs is None and 'iisLogs' in kwargs: + iis_logs = kwargs['iisLogs'] + if iis_logs is None: + raise TypeError("Missing 'iis_logs' argument") + if performance_counters is None and 'performanceCounters' in kwargs: + performance_counters = kwargs['performanceCounters'] + if performance_counters is None: + raise TypeError("Missing 'performance_counters' argument") + if prometheus_forwarders is None and 'prometheusForwarders' in kwargs: + prometheus_forwarders = kwargs['prometheusForwarders'] + if prometheus_forwarders is None: + raise TypeError("Missing 'prometheus_forwarders' argument") + if syslogs is None: + raise TypeError("Missing 'syslogs' argument") + if windows_event_logs is None and 'windowsEventLogs' in kwargs: + windows_event_logs = kwargs['windowsEventLogs'] + if windows_event_logs is None: + raise TypeError("Missing 'windows_event_logs' argument") + if windows_firewall_logs is None and 'windowsFirewallLogs' in kwargs: + windows_firewall_logs = kwargs['windowsFirewallLogs'] + if windows_firewall_logs is None: + raise TypeError("Missing 'windows_firewall_logs' argument") + if log_files is None and 'logFiles' in kwargs: + log_files = kwargs['logFiles'] + if platform_telemetries is None and 'platformTelemetries' in kwargs: + platform_telemetries = kwargs['platformTelemetries'] + + _setter("data_imports", data_imports) + _setter("extensions", extensions) + _setter("iis_logs", iis_logs) + _setter("performance_counters", performance_counters) + _setter("prometheus_forwarders", prometheus_forwarders) + _setter("syslogs", syslogs) + _setter("windows_event_logs", windows_event_logs) + _setter("windows_firewall_logs", windows_firewall_logs) if log_files is not None: - pulumi.set(__self__, "log_files", log_files) + _setter("log_files", log_files) if platform_telemetries is not None: - pulumi.set(__self__, "platform_telemetries", platform_telemetries) + _setter("platform_telemetries", platform_telemetries) @property @pulumi.getter(name="dataImports") @@ -9328,7 +13069,22 @@ def __init__(__self__, *, """ :param Sequence['GetDataCollectionRuleDataSourceDataImportEventHubDataSourceArgs'] event_hub_data_sources: An `event_hub_data_source` block as defined below. """ - pulumi.set(__self__, "event_hub_data_sources", event_hub_data_sources) + GetDataCollectionRuleDataSourceDataImportResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_hub_data_sources=event_hub_data_sources, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_hub_data_sources: Optional[Sequence['outputs.GetDataCollectionRuleDataSourceDataImportEventHubDataSourceResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_hub_data_sources is None and 'eventHubDataSources' in kwargs: + event_hub_data_sources = kwargs['eventHubDataSources'] + if event_hub_data_sources is None: + raise TypeError("Missing 'event_hub_data_sources' argument") + + _setter("event_hub_data_sources", event_hub_data_sources) @property @pulumi.getter(name="eventHubDataSources") @@ -9350,9 +13106,32 @@ def __init__(__self__, *, :param str name: Specifies the name of the Data Collection Rule. :param str stream: The stream to collect from Event Hub. Possible value should be a custom stream name. """ - pulumi.set(__self__, "consumer_group", consumer_group) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "stream", stream) + GetDataCollectionRuleDataSourceDataImportEventHubDataSourceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + consumer_group=consumer_group, + name=name, + stream=stream, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consumer_group: Optional[str] = None, + name: Optional[str] = None, + stream: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if consumer_group is None and 'consumerGroup' in kwargs: + consumer_group = kwargs['consumerGroup'] + if consumer_group is None: + raise TypeError("Missing 'consumer_group' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if stream is None: + raise TypeError("Missing 'stream' argument") + + _setter("consumer_group", consumer_group) + _setter("name", name) + _setter("stream", stream) @property @pulumi.getter(name="consumerGroup") @@ -9394,11 +13173,46 @@ def __init__(__self__, *, :param str name: Specifies the name of the Data Collection Rule. :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. """ - pulumi.set(__self__, "extension_json", extension_json) - pulumi.set(__self__, "extension_name", extension_name) - pulumi.set(__self__, "input_data_sources", input_data_sources) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + GetDataCollectionRuleDataSourceExtensionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + extension_json=extension_json, + extension_name=extension_name, + input_data_sources=input_data_sources, + name=name, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + extension_json: Optional[str] = None, + extension_name: Optional[str] = None, + input_data_sources: Optional[Sequence[str]] = None, + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if extension_json is None and 'extensionJson' in kwargs: + extension_json = kwargs['extensionJson'] + if extension_json is None: + raise TypeError("Missing 'extension_json' argument") + if extension_name is None and 'extensionName' in kwargs: + extension_name = kwargs['extensionName'] + if extension_name is None: + raise TypeError("Missing 'extension_name' argument") + if input_data_sources is None and 'inputDataSources' in kwargs: + input_data_sources = kwargs['inputDataSources'] + if input_data_sources is None: + raise TypeError("Missing 'input_data_sources' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("extension_json", extension_json) + _setter("extension_name", extension_name) + _setter("input_data_sources", input_data_sources) + _setter("name", name) + _setter("streams", streams) @property @pulumi.getter(name="extensionJson") @@ -9452,9 +13266,32 @@ def __init__(__self__, *, :param str name: Specifies the name of the Data Collection Rule. :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. """ - pulumi.set(__self__, "log_directories", log_directories) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + GetDataCollectionRuleDataSourceIisLogResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_directories=log_directories, + name=name, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_directories: Optional[Sequence[str]] = None, + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_directories is None and 'logDirectories' in kwargs: + log_directories = kwargs['logDirectories'] + if log_directories is None: + raise TypeError("Missing 'log_directories' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("log_directories", log_directories) + _setter("name", name) + _setter("streams", streams) @property @pulumi.getter(name="logDirectories") @@ -9496,11 +13333,42 @@ def __init__(__self__, *, :param Sequence['GetDataCollectionRuleDataSourceLogFileSettingArgs'] settings: A `settings` block as defined below. :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. """ - pulumi.set(__self__, "file_patterns", file_patterns) - pulumi.set(__self__, "format", format) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "settings", settings) - pulumi.set(__self__, "streams", streams) + GetDataCollectionRuleDataSourceLogFileResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_patterns=file_patterns, + format=format, + name=name, + settings=settings, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_patterns: Optional[Sequence[str]] = None, + format: Optional[str] = None, + name: Optional[str] = None, + settings: Optional[Sequence['outputs.GetDataCollectionRuleDataSourceLogFileSettingResult']] = None, + streams: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_patterns is None and 'filePatterns' in kwargs: + file_patterns = kwargs['filePatterns'] + if file_patterns is None: + raise TypeError("Missing 'file_patterns' argument") + if format is None: + raise TypeError("Missing 'format' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if settings is None: + raise TypeError("Missing 'settings' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("file_patterns", file_patterns) + _setter("format", format) + _setter("name", name) + _setter("settings", settings) + _setter("streams", streams) @property @pulumi.getter(name="filePatterns") @@ -9550,7 +13418,20 @@ def __init__(__self__, *, """ :param Sequence['GetDataCollectionRuleDataSourceLogFileSettingTextArgs'] texts: A `text` block as defined below. """ - pulumi.set(__self__, "texts", texts) + GetDataCollectionRuleDataSourceLogFileSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + texts=texts, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + texts: Optional[Sequence['outputs.GetDataCollectionRuleDataSourceLogFileSettingTextResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if texts is None: + raise TypeError("Missing 'texts' argument") + + _setter("texts", texts) @property @pulumi.getter @@ -9568,7 +13449,22 @@ def __init__(__self__, *, """ :param str record_start_timestamp_format: The timestamp format of the text log files. Possible values are `ISO 8601`, `YYYY-MM-DD HH:MM:SS`, `M/D/YYYY HH:MM:SS AM/PM`, `Mon DD, YYYY HH:MM:SS`, `yyMMdd HH:mm:ss`, `ddMMyy HH:mm:ss`, `MMM d hh:mm:ss`, `dd/MMM/yyyy:HH:mm:ss zzz`,and `yyyy-MM-ddTHH:mm:ssK`. """ - pulumi.set(__self__, "record_start_timestamp_format", record_start_timestamp_format) + GetDataCollectionRuleDataSourceLogFileSettingTextResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + record_start_timestamp_format=record_start_timestamp_format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + record_start_timestamp_format: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if record_start_timestamp_format is None and 'recordStartTimestampFormat' in kwargs: + record_start_timestamp_format = kwargs['recordStartTimestampFormat'] + if record_start_timestamp_format is None: + raise TypeError("Missing 'record_start_timestamp_format' argument") + + _setter("record_start_timestamp_format", record_start_timestamp_format) @property @pulumi.getter(name="recordStartTimestampFormat") @@ -9592,10 +13488,39 @@ def __init__(__self__, *, :param int sampling_frequency_in_seconds: The number of seconds between consecutive counter measurements (samples). The value should be integer between `1` and `300` inclusive. :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. """ - pulumi.set(__self__, "counter_specifiers", counter_specifiers) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "sampling_frequency_in_seconds", sampling_frequency_in_seconds) - pulumi.set(__self__, "streams", streams) + GetDataCollectionRuleDataSourcePerformanceCounterResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + counter_specifiers=counter_specifiers, + name=name, + sampling_frequency_in_seconds=sampling_frequency_in_seconds, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + counter_specifiers: Optional[Sequence[str]] = None, + name: Optional[str] = None, + sampling_frequency_in_seconds: Optional[int] = None, + streams: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if counter_specifiers is None and 'counterSpecifiers' in kwargs: + counter_specifiers = kwargs['counterSpecifiers'] + if counter_specifiers is None: + raise TypeError("Missing 'counter_specifiers' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if sampling_frequency_in_seconds is None and 'samplingFrequencyInSeconds' in kwargs: + sampling_frequency_in_seconds = kwargs['samplingFrequencyInSeconds'] + if sampling_frequency_in_seconds is None: + raise TypeError("Missing 'sampling_frequency_in_seconds' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("counter_specifiers", counter_specifiers) + _setter("name", name) + _setter("sampling_frequency_in_seconds", sampling_frequency_in_seconds) + _setter("streams", streams) @property @pulumi.getter(name="counterSpecifiers") @@ -9639,8 +13564,25 @@ def __init__(__self__, *, :param str name: Specifies the name of the Data Collection Rule. :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + GetDataCollectionRuleDataSourcePlatformTelemetryResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("name", name) + _setter("streams", streams) @property @pulumi.getter @@ -9670,9 +13612,32 @@ def __init__(__self__, *, :param str name: Specifies the name of the Data Collection Rule. :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. """ - pulumi.set(__self__, "label_include_filters", label_include_filters) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + GetDataCollectionRuleDataSourcePrometheusForwarderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + label_include_filters=label_include_filters, + name=name, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label_include_filters: Optional[Sequence['outputs.GetDataCollectionRuleDataSourcePrometheusForwarderLabelIncludeFilterResult']] = None, + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if label_include_filters is None and 'labelIncludeFilters' in kwargs: + label_include_filters = kwargs['labelIncludeFilters'] + if label_include_filters is None: + raise TypeError("Missing 'label_include_filters' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("label_include_filters", label_include_filters) + _setter("name", name) + _setter("streams", streams) @property @pulumi.getter(name="labelIncludeFilters") @@ -9708,8 +13673,25 @@ def __init__(__self__, *, :param str label: The label of the filter. This label should be unique across all `label_include_fileter` block. Possible value is `microsoft_metrics_include_label`. :param str value: The value of the filter. """ - pulumi.set(__self__, "label", label) - pulumi.set(__self__, "value", value) + GetDataCollectionRuleDataSourcePrometheusForwarderLabelIncludeFilterResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if label is None: + raise TypeError("Missing 'label' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("label", label) + _setter("value", value) @property @pulumi.getter @@ -9741,10 +13723,39 @@ def __init__(__self__, *, :param str name: Specifies the name of the Data Collection Rule. :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. """ - pulumi.set(__self__, "facility_names", facility_names) - pulumi.set(__self__, "log_levels", log_levels) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + GetDataCollectionRuleDataSourceSyslogResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + facility_names=facility_names, + log_levels=log_levels, + name=name, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + facility_names: Optional[Sequence[str]] = None, + log_levels: Optional[Sequence[str]] = None, + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if facility_names is None and 'facilityNames' in kwargs: + facility_names = kwargs['facilityNames'] + if facility_names is None: + raise TypeError("Missing 'facility_names' argument") + if log_levels is None and 'logLevels' in kwargs: + log_levels = kwargs['logLevels'] + if log_levels is None: + raise TypeError("Missing 'log_levels' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("facility_names", facility_names) + _setter("log_levels", log_levels) + _setter("name", name) + _setter("streams", streams) @property @pulumi.getter(name="facilityNames") @@ -9790,9 +13801,32 @@ def __init__(__self__, *, :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :param Sequence[str] x_path_queries: Specifies a list of Windows Event Log queries in XPath expression. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) - pulumi.set(__self__, "x_path_queries", x_path_queries) + GetDataCollectionRuleDataSourceWindowsEventLogResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + streams=streams, + x_path_queries=x_path_queries, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + x_path_queries: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + if x_path_queries is None and 'xPathQueries' in kwargs: + x_path_queries = kwargs['xPathQueries'] + if x_path_queries is None: + raise TypeError("Missing 'x_path_queries' argument") + + _setter("name", name) + _setter("streams", streams) + _setter("x_path_queries", x_path_queries) @property @pulumi.getter @@ -9828,8 +13862,25 @@ def __init__(__self__, *, :param str name: Specifies the name of the Data Collection Rule. :param Sequence[str] streams: Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "streams", streams) + GetDataCollectionRuleDataSourceWindowsFirewallLogResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + streams=streams, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + streams: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if streams is None: + raise TypeError("Missing 'streams' argument") + + _setter("name", name) + _setter("streams", streams) @property @pulumi.getter @@ -9869,16 +13920,69 @@ def __init__(__self__, *, :param 'GetDataCollectionRuleDestinationEventHubArgs' event_hub: One or more `event_hub` blocks as defined below. :param 'GetDataCollectionRuleDestinationEventHubDirectArgs' event_hub_direct: One or more `event_hub_direct` blocks as defined below. """ - pulumi.set(__self__, "azure_monitor_metrics", azure_monitor_metrics) - pulumi.set(__self__, "log_analytics", log_analytics) - pulumi.set(__self__, "monitor_accounts", monitor_accounts) - pulumi.set(__self__, "storage_blob_directs", storage_blob_directs) - pulumi.set(__self__, "storage_blobs", storage_blobs) - pulumi.set(__self__, "storage_table_directs", storage_table_directs) + GetDataCollectionRuleDestinationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_monitor_metrics=azure_monitor_metrics, + log_analytics=log_analytics, + monitor_accounts=monitor_accounts, + storage_blob_directs=storage_blob_directs, + storage_blobs=storage_blobs, + storage_table_directs=storage_table_directs, + event_hub=event_hub, + event_hub_direct=event_hub_direct, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_monitor_metrics: Optional[Sequence['outputs.GetDataCollectionRuleDestinationAzureMonitorMetricResult']] = None, + log_analytics: Optional[Sequence['outputs.GetDataCollectionRuleDestinationLogAnalyticResult']] = None, + monitor_accounts: Optional[Sequence['outputs.GetDataCollectionRuleDestinationMonitorAccountResult']] = None, + storage_blob_directs: Optional[Sequence['outputs.GetDataCollectionRuleDestinationStorageBlobDirectResult']] = None, + storage_blobs: Optional[Sequence['outputs.GetDataCollectionRuleDestinationStorageBlobResult']] = None, + storage_table_directs: Optional[Sequence['outputs.GetDataCollectionRuleDestinationStorageTableDirectResult']] = None, + event_hub: Optional['outputs.GetDataCollectionRuleDestinationEventHubResult'] = None, + event_hub_direct: Optional['outputs.GetDataCollectionRuleDestinationEventHubDirectResult'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_monitor_metrics is None and 'azureMonitorMetrics' in kwargs: + azure_monitor_metrics = kwargs['azureMonitorMetrics'] + if azure_monitor_metrics is None: + raise TypeError("Missing 'azure_monitor_metrics' argument") + if log_analytics is None and 'logAnalytics' in kwargs: + log_analytics = kwargs['logAnalytics'] + if log_analytics is None: + raise TypeError("Missing 'log_analytics' argument") + if monitor_accounts is None and 'monitorAccounts' in kwargs: + monitor_accounts = kwargs['monitorAccounts'] + if monitor_accounts is None: + raise TypeError("Missing 'monitor_accounts' argument") + if storage_blob_directs is None and 'storageBlobDirects' in kwargs: + storage_blob_directs = kwargs['storageBlobDirects'] + if storage_blob_directs is None: + raise TypeError("Missing 'storage_blob_directs' argument") + if storage_blobs is None and 'storageBlobs' in kwargs: + storage_blobs = kwargs['storageBlobs'] + if storage_blobs is None: + raise TypeError("Missing 'storage_blobs' argument") + if storage_table_directs is None and 'storageTableDirects' in kwargs: + storage_table_directs = kwargs['storageTableDirects'] + if storage_table_directs is None: + raise TypeError("Missing 'storage_table_directs' argument") + if event_hub is None and 'eventHub' in kwargs: + event_hub = kwargs['eventHub'] + if event_hub_direct is None and 'eventHubDirect' in kwargs: + event_hub_direct = kwargs['eventHubDirect'] + + _setter("azure_monitor_metrics", azure_monitor_metrics) + _setter("log_analytics", log_analytics) + _setter("monitor_accounts", monitor_accounts) + _setter("storage_blob_directs", storage_blob_directs) + _setter("storage_blobs", storage_blobs) + _setter("storage_table_directs", storage_table_directs) if event_hub is not None: - pulumi.set(__self__, "event_hub", event_hub) + _setter("event_hub", event_hub) if event_hub_direct is not None: - pulumi.set(__self__, "event_hub_direct", event_hub_direct) + _setter("event_hub_direct", event_hub_direct) @property @pulumi.getter(name="azureMonitorMetrics") @@ -9952,7 +14056,20 @@ def __init__(__self__, *, """ :param str name: Specifies the name of the Data Collection Rule. """ - pulumi.set(__self__, "name", name) + GetDataCollectionRuleDestinationAzureMonitorMetricResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -9972,8 +14089,27 @@ def __init__(__self__, *, :param str event_hub_id: The resource ID of the Event Hub. :param str name: Specifies the name of the Data Collection Rule. """ - pulumi.set(__self__, "event_hub_id", event_hub_id) - pulumi.set(__self__, "name", name) + GetDataCollectionRuleDestinationEventHubResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_hub_id=event_hub_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_hub_id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_hub_id is None and 'eventHubId' in kwargs: + event_hub_id = kwargs['eventHubId'] + if event_hub_id is None: + raise TypeError("Missing 'event_hub_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("event_hub_id", event_hub_id) + _setter("name", name) @property @pulumi.getter(name="eventHubId") @@ -10001,8 +14137,27 @@ def __init__(__self__, *, :param str event_hub_id: The resource ID of the Event Hub. :param str name: Specifies the name of the Data Collection Rule. """ - pulumi.set(__self__, "event_hub_id", event_hub_id) - pulumi.set(__self__, "name", name) + GetDataCollectionRuleDestinationEventHubDirectResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_hub_id=event_hub_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_hub_id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_hub_id is None and 'eventHubId' in kwargs: + event_hub_id = kwargs['eventHubId'] + if event_hub_id is None: + raise TypeError("Missing 'event_hub_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("event_hub_id", event_hub_id) + _setter("name", name) @property @pulumi.getter(name="eventHubId") @@ -10030,8 +14185,27 @@ def __init__(__self__, *, :param str name: Specifies the name of the Data Collection Rule. :param str workspace_resource_id: The ID of a Log Analytic Workspace resource. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "workspace_resource_id", workspace_resource_id) + GetDataCollectionRuleDestinationLogAnalyticResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + workspace_resource_id=workspace_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + workspace_resource_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if workspace_resource_id is None and 'workspaceResourceId' in kwargs: + workspace_resource_id = kwargs['workspaceResourceId'] + if workspace_resource_id is None: + raise TypeError("Missing 'workspace_resource_id' argument") + + _setter("name", name) + _setter("workspace_resource_id", workspace_resource_id) @property @pulumi.getter @@ -10059,8 +14233,27 @@ def __init__(__self__, *, :param str monitor_account_id: The resource ID of the Monitor Account. :param str name: Specifies the name of the Data Collection Rule. """ - pulumi.set(__self__, "monitor_account_id", monitor_account_id) - pulumi.set(__self__, "name", name) + GetDataCollectionRuleDestinationMonitorAccountResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + monitor_account_id=monitor_account_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + monitor_account_id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if monitor_account_id is None and 'monitorAccountId' in kwargs: + monitor_account_id = kwargs['monitorAccountId'] + if monitor_account_id is None: + raise TypeError("Missing 'monitor_account_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("monitor_account_id", monitor_account_id) + _setter("name", name) @property @pulumi.getter(name="monitorAccountId") @@ -10090,9 +14283,34 @@ def __init__(__self__, *, :param str name: Specifies the name of the Data Collection Rule. :param str storage_account_id: The resource ID of the Storage Account. """ - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + GetDataCollectionRuleDestinationStorageBlobResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + name=name, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[str] = None, + name: Optional[str] = None, + storage_account_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + + _setter("container_name", container_name) + _setter("name", name) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="containerName") @@ -10130,9 +14348,34 @@ def __init__(__self__, *, :param str name: Specifies the name of the Data Collection Rule. :param str storage_account_id: The resource ID of the Storage Account. """ - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + GetDataCollectionRuleDestinationStorageBlobDirectResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + name=name, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[str] = None, + name: Optional[str] = None, + storage_account_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + + _setter("container_name", container_name) + _setter("name", name) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="containerName") @@ -10170,9 +14413,34 @@ def __init__(__self__, *, :param str storage_account_id: The resource ID of the Storage Account. :param str table_name: The Storage Table name. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "table_name", table_name) + GetDataCollectionRuleDestinationStorageTableDirectResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + storage_account_id=storage_account_id, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + storage_account_id: Optional[str] = None, + table_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if table_name is None: + raise TypeError("Missing 'table_name' argument") + + _setter("name", name) + _setter("storage_account_id", storage_account_id) + _setter("table_name", table_name) @property @pulumi.getter @@ -10212,10 +14480,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID associated with this Managed Service Identity. :param str type: cSpecifies the type of Managed Service Identity that should be configured on this Data Collection Rule. Possible values are `SystemAssigned` and `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetDataCollectionRuleIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -10259,8 +14558,27 @@ def __init__(__self__, *, :param Sequence['GetDataCollectionRuleStreamDeclarationColumnArgs'] columns: One or more `column` blocks as defined above. :param str stream_name: The name of the custom stream. This name should be unique across all `stream_declaration` blocks. """ - pulumi.set(__self__, "columns", columns) - pulumi.set(__self__, "stream_name", stream_name) + GetDataCollectionRuleStreamDeclarationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + columns=columns, + stream_name=stream_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + columns: Optional[Sequence['outputs.GetDataCollectionRuleStreamDeclarationColumnResult']] = None, + stream_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if columns is None: + raise TypeError("Missing 'columns' argument") + if stream_name is None and 'streamName' in kwargs: + stream_name = kwargs['streamName'] + if stream_name is None: + raise TypeError("Missing 'stream_name' argument") + + _setter("columns", columns) + _setter("stream_name", stream_name) @property @pulumi.getter @@ -10288,8 +14606,25 @@ def __init__(__self__, *, :param str name: Specifies the name of the Data Collection Rule. :param str type: cSpecifies the type of Managed Service Identity that should be configured on this Data Collection Rule. Possible values are `SystemAssigned` and `UserAssigned`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + GetDataCollectionRuleStreamDeclarationColumnResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("name", name) + _setter("type", type) @property @pulumi.getter @@ -10317,8 +14652,25 @@ def __init__(__self__, *, :param int days: The number of days for the retention policy. :param bool enabled: A boolean value indicating whether the retention policy is enabled. """ - pulumi.set(__self__, "days", days) - pulumi.set(__self__, "enabled", enabled) + GetLogProfileRetentionPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[int] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("days", days) + _setter("enabled", enabled) @property @pulumi.getter @@ -10348,9 +14700,36 @@ def __init__(__self__, *, :param str custom_webhook_payload: Custom payload to be sent for all webhook URI in Azure action group. :param str email_subject: Custom subject override for all email IDs in Azure action group. """ - pulumi.set(__self__, "action_groups", action_groups) - pulumi.set(__self__, "custom_webhook_payload", custom_webhook_payload) - pulumi.set(__self__, "email_subject", email_subject) + GetScheduledQueryRulesAlertActionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_groups=action_groups, + custom_webhook_payload=custom_webhook_payload, + email_subject=email_subject, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_groups: Optional[Sequence[str]] = None, + custom_webhook_payload: Optional[str] = None, + email_subject: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_groups is None and 'actionGroups' in kwargs: + action_groups = kwargs['actionGroups'] + if action_groups is None: + raise TypeError("Missing 'action_groups' argument") + if custom_webhook_payload is None and 'customWebhookPayload' in kwargs: + custom_webhook_payload = kwargs['customWebhookPayload'] + if custom_webhook_payload is None: + raise TypeError("Missing 'custom_webhook_payload' argument") + if email_subject is None and 'emailSubject' in kwargs: + email_subject = kwargs['emailSubject'] + if email_subject is None: + raise TypeError("Missing 'email_subject' argument") + + _setter("action_groups", action_groups) + _setter("custom_webhook_payload", custom_webhook_payload) + _setter("email_subject", email_subject) @property @pulumi.getter(name="actionGroups") @@ -10387,9 +14766,32 @@ def __init__(__self__, *, :param str operator: Evaluation operation for rule. :param float threshold: Result or count threshold based on which rule should be triggered. """ - pulumi.set(__self__, "metric_triggers", metric_triggers) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + GetScheduledQueryRulesAlertTriggerResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + metric_triggers=metric_triggers, + operator=operator, + threshold=threshold, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + metric_triggers: Optional[Sequence['outputs.GetScheduledQueryRulesAlertTriggerMetricTriggerResult']] = None, + operator: Optional[str] = None, + threshold: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if metric_triggers is None and 'metricTriggers' in kwargs: + metric_triggers = kwargs['metricTriggers'] + if metric_triggers is None: + raise TypeError("Missing 'metric_triggers' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + + _setter("metric_triggers", metric_triggers) + _setter("operator", operator) + _setter("threshold", threshold) @property @pulumi.getter(name="metricTriggers") @@ -10424,10 +14826,39 @@ def __init__(__self__, *, :param str operator: Evaluation operation for rule. :param float threshold: Result or count threshold based on which rule should be triggered. """ - pulumi.set(__self__, "metric_column", metric_column) - pulumi.set(__self__, "metric_trigger_type", metric_trigger_type) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "threshold", threshold) + GetScheduledQueryRulesAlertTriggerMetricTriggerResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + metric_column=metric_column, + metric_trigger_type=metric_trigger_type, + operator=operator, + threshold=threshold, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + metric_column: Optional[str] = None, + metric_trigger_type: Optional[str] = None, + operator: Optional[str] = None, + threshold: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if metric_column is None and 'metricColumn' in kwargs: + metric_column = kwargs['metricColumn'] + if metric_column is None: + raise TypeError("Missing 'metric_column' argument") + if metric_trigger_type is None and 'metricTriggerType' in kwargs: + metric_trigger_type = kwargs['metricTriggerType'] + if metric_trigger_type is None: + raise TypeError("Missing 'metric_trigger_type' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if threshold is None: + raise TypeError("Missing 'threshold' argument") + + _setter("metric_column", metric_column) + _setter("metric_trigger_type", metric_trigger_type) + _setter("operator", operator) + _setter("threshold", threshold) @property @pulumi.getter(name="metricColumn") @@ -10465,8 +14896,27 @@ def __init__(__self__, *, :param Sequence['GetScheduledQueryRulesLogCriteriaDimensionArgs'] dimensions: A `dimension` block as defined below. :param str metric_name: Name of the metric. """ - pulumi.set(__self__, "dimensions", dimensions) - pulumi.set(__self__, "metric_name", metric_name) + GetScheduledQueryRulesLogCriteriaResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + dimensions=dimensions, + metric_name=metric_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dimensions: Optional[Sequence['outputs.GetScheduledQueryRulesLogCriteriaDimensionResult']] = None, + metric_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dimensions is None: + raise TypeError("Missing 'dimensions' argument") + if metric_name is None and 'metricName' in kwargs: + metric_name = kwargs['metricName'] + if metric_name is None: + raise TypeError("Missing 'metric_name' argument") + + _setter("dimensions", dimensions) + _setter("metric_name", metric_name) @property @pulumi.getter @@ -10496,9 +14946,30 @@ def __init__(__self__, *, :param str operator: Operator for dimension values. :param Sequence[str] values: List of dimension values. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "values", values) + GetScheduledQueryRulesLogCriteriaDimensionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operator=operator, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operator: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("name", name) + _setter("operator", operator) + _setter("values", values) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/monitoring/private_link_scope.py b/sdk/python/pulumi_azure/monitoring/private_link_scope.py index ddf9481497..d67b0815b3 100644 --- a/sdk/python/pulumi_azure/monitoring/private_link_scope.py +++ b/sdk/python/pulumi_azure/monitoring/private_link_scope.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PrivateLinkScopeArgs', 'PrivateLinkScope'] @@ -23,11 +23,30 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Azure Monitor Private Link Scope. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + PrivateLinkScopeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -78,12 +97,29 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Azure Monitor Private Link Scope should exist. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Azure Monitor Private Link Scope. """ + _PrivateLinkScopeState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -195,6 +231,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PrivateLinkScopeArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/monitoring/private_link_scoped_service.py b/sdk/python/pulumi_azure/monitoring/private_link_scoped_service.py index fffd0c7756..2fa9151ad1 100644 --- a/sdk/python/pulumi_azure/monitoring/private_link_scoped_service.py +++ b/sdk/python/pulumi_azure/monitoring/private_link_scoped_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PrivateLinkScopedServiceArgs', 'PrivateLinkScopedService'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] scope_name: The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the Azure Monitor Private Link Scoped Service. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "linked_resource_id", linked_resource_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scope_name", scope_name) + PrivateLinkScopedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_resource_id=linked_resource_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_resource_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scope_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_resource_id is None and 'linkedResourceId' in kwargs: + linked_resource_id = kwargs['linkedResourceId'] + if linked_resource_id is None: + raise TypeError("Missing 'linked_resource_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scope_name is None and 'scopeName' in kwargs: + scope_name = kwargs['scopeName'] + if scope_name is None: + raise TypeError("Missing 'scope_name' argument") + + _setter("linked_resource_id", linked_resource_id) + _setter("resource_group_name", resource_group_name) + _setter("scope_name", scope_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="linkedResourceId") @@ -94,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Azure Monitor Private Link Scoped Service should exist. Changing this forces a new resource to be created. :param pulumi.Input[str] scope_name: The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. """ + _PrivateLinkScopedServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_resource_id=linked_resource_id, + name=name, + resource_group_name=resource_group_name, + scope_name=scope_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_resource_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scope_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_resource_id is None and 'linkedResourceId' in kwargs: + linked_resource_id = kwargs['linkedResourceId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if scope_name is None and 'scopeName' in kwargs: + scope_name = kwargs['scopeName'] + if linked_resource_id is not None: - pulumi.set(__self__, "linked_resource_id", linked_resource_id) + _setter("linked_resource_id", linked_resource_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scope_name is not None: - pulumi.set(__self__, "scope_name", scope_name) + _setter("scope_name", scope_name) @property @pulumi.getter(name="linkedResourceId") @@ -243,6 +295,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PrivateLinkScopedServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/monitoring/scheduled_query_rules_alert.py b/sdk/python/pulumi_azure/monitoring/scheduled_query_rules_alert.py index 8ba39624ed..f0d61f5180 100644 --- a/sdk/python/pulumi_azure/monitoring/scheduled_query_rules_alert.py +++ b/sdk/python/pulumi_azure/monitoring/scheduled_query_rules_alert.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -54,33 +54,102 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[int] throttling: Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive). """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "data_source_id", data_source_id) - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "query", query) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "time_window", time_window) - pulumi.set(__self__, "trigger", trigger) + ScheduledQueryRulesAlertArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + data_source_id=data_source_id, + frequency=frequency, + query=query, + resource_group_name=resource_group_name, + time_window=time_window, + trigger=trigger, + authorized_resource_ids=authorized_resource_ids, + auto_mitigation_enabled=auto_mitigation_enabled, + description=description, + enabled=enabled, + location=location, + name=name, + query_type=query_type, + severity=severity, + tags=tags, + throttling=throttling, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input['ScheduledQueryRulesAlertActionArgs']] = None, + data_source_id: Optional[pulumi.Input[str]] = None, + frequency: Optional[pulumi.Input[int]] = None, + query: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + time_window: Optional[pulumi.Input[int]] = None, + trigger: Optional[pulumi.Input['ScheduledQueryRulesAlertTriggerArgs']] = None, + authorized_resource_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + auto_mitigation_enabled: Optional[pulumi.Input[bool]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + query_type: Optional[pulumi.Input[str]] = None, + severity: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + throttling: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if data_source_id is None and 'dataSourceId' in kwargs: + data_source_id = kwargs['dataSourceId'] + if data_source_id is None: + raise TypeError("Missing 'data_source_id' argument") + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if query is None: + raise TypeError("Missing 'query' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if time_window is None and 'timeWindow' in kwargs: + time_window = kwargs['timeWindow'] + if time_window is None: + raise TypeError("Missing 'time_window' argument") + if trigger is None: + raise TypeError("Missing 'trigger' argument") + if authorized_resource_ids is None and 'authorizedResourceIds' in kwargs: + authorized_resource_ids = kwargs['authorizedResourceIds'] + if auto_mitigation_enabled is None and 'autoMitigationEnabled' in kwargs: + auto_mitigation_enabled = kwargs['autoMitigationEnabled'] + if query_type is None and 'queryType' in kwargs: + query_type = kwargs['queryType'] + + _setter("action", action) + _setter("data_source_id", data_source_id) + _setter("frequency", frequency) + _setter("query", query) + _setter("resource_group_name", resource_group_name) + _setter("time_window", time_window) + _setter("trigger", trigger) if authorized_resource_ids is not None: - pulumi.set(__self__, "authorized_resource_ids", authorized_resource_ids) + _setter("authorized_resource_ids", authorized_resource_ids) if auto_mitigation_enabled is not None: - pulumi.set(__self__, "auto_mitigation_enabled", auto_mitigation_enabled) + _setter("auto_mitigation_enabled", auto_mitigation_enabled) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if query_type is not None: - pulumi.set(__self__, "query_type", query_type) + _setter("query_type", query_type) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if throttling is not None: - pulumi.set(__self__, "throttling", throttling) + _setter("throttling", throttling) @property @pulumi.getter @@ -329,40 +398,95 @@ def __init__(__self__, *, :param pulumi.Input[int] time_window: Time window for which data needs to be fetched for query (must be greater than or equal to `frequency`). Values must be between 5 and 2880 (inclusive). :param pulumi.Input['ScheduledQueryRulesAlertTriggerArgs'] trigger: A `trigger` block as defined below. """ + _ScheduledQueryRulesAlertState._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + authorized_resource_ids=authorized_resource_ids, + auto_mitigation_enabled=auto_mitigation_enabled, + data_source_id=data_source_id, + description=description, + enabled=enabled, + frequency=frequency, + location=location, + name=name, + query=query, + query_type=query_type, + resource_group_name=resource_group_name, + severity=severity, + tags=tags, + throttling=throttling, + time_window=time_window, + trigger=trigger, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input['ScheduledQueryRulesAlertActionArgs']] = None, + authorized_resource_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + auto_mitigation_enabled: Optional[pulumi.Input[bool]] = None, + data_source_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + frequency: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + query: Optional[pulumi.Input[str]] = None, + query_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + severity: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + throttling: Optional[pulumi.Input[int]] = None, + time_window: Optional[pulumi.Input[int]] = None, + trigger: Optional[pulumi.Input['ScheduledQueryRulesAlertTriggerArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorized_resource_ids is None and 'authorizedResourceIds' in kwargs: + authorized_resource_ids = kwargs['authorizedResourceIds'] + if auto_mitigation_enabled is None and 'autoMitigationEnabled' in kwargs: + auto_mitigation_enabled = kwargs['autoMitigationEnabled'] + if data_source_id is None and 'dataSourceId' in kwargs: + data_source_id = kwargs['dataSourceId'] + if query_type is None and 'queryType' in kwargs: + query_type = kwargs['queryType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if time_window is None and 'timeWindow' in kwargs: + time_window = kwargs['timeWindow'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if authorized_resource_ids is not None: - pulumi.set(__self__, "authorized_resource_ids", authorized_resource_ids) + _setter("authorized_resource_ids", authorized_resource_ids) if auto_mitigation_enabled is not None: - pulumi.set(__self__, "auto_mitigation_enabled", auto_mitigation_enabled) + _setter("auto_mitigation_enabled", auto_mitigation_enabled) if data_source_id is not None: - pulumi.set(__self__, "data_source_id", data_source_id) + _setter("data_source_id", data_source_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if query is not None: - pulumi.set(__self__, "query", query) + _setter("query", query) if query_type is not None: - pulumi.set(__self__, "query_type", query_type) + _setter("query_type", query_type) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if throttling is not None: - pulumi.set(__self__, "throttling", throttling) + _setter("throttling", throttling) if time_window is not None: - pulumi.set(__self__, "time_window", time_window) + _setter("time_window", time_window) if trigger is not None: - pulumi.set(__self__, "trigger", trigger) + _setter("trigger", trigger) @property @pulumi.getter @@ -652,6 +776,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ScheduledQueryRulesAlertArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -683,6 +811,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ScheduledQueryRulesAlertArgs.__new__(ScheduledQueryRulesAlertArgs) + if action is not None and not isinstance(action, ScheduledQueryRulesAlertActionArgs): + action = action or {} + def _setter(key, value): + action[key] = value + ScheduledQueryRulesAlertActionArgs._configure(_setter, **action) if action is None and not opts.urn: raise TypeError("Missing required property 'action'") __props__.__dict__["action"] = action @@ -711,6 +844,11 @@ def _internal_init(__self__, if time_window is None and not opts.urn: raise TypeError("Missing required property 'time_window'") __props__.__dict__["time_window"] = time_window + if trigger is not None and not isinstance(trigger, ScheduledQueryRulesAlertTriggerArgs): + trigger = trigger or {} + def _setter(key, value): + trigger[key] = value + ScheduledQueryRulesAlertTriggerArgs._configure(_setter, **trigger) if trigger is None and not opts.urn: raise TypeError("Missing required property 'trigger'") __props__.__dict__["trigger"] = trigger diff --git a/sdk/python/pulumi_azure/monitoring/scheduled_query_rules_alert_v2.py b/sdk/python/pulumi_azure/monitoring/scheduled_query_rules_alert_v2.py index fd03f9cb95..76b3ef917d 100644 --- a/sdk/python/pulumi_azure/monitoring/scheduled_query_rules_alert_v2.py +++ b/sdk/python/pulumi_azure/monitoring/scheduled_query_rules_alert_v2.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -65,39 +65,116 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] target_resource_types: List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is `Microsoft.Compute/virtualMachines`, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. :param pulumi.Input[bool] workspace_alerts_storage_enabled: Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be `true` or `false`. The default is `false`. """ - pulumi.set(__self__, "criterias", criterias) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scopes", scopes) - pulumi.set(__self__, "severity", severity) - pulumi.set(__self__, "window_duration", window_duration) + ScheduledQueryRulesAlertV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + criterias=criterias, + resource_group_name=resource_group_name, + scopes=scopes, + severity=severity, + window_duration=window_duration, + action=action, + auto_mitigation_enabled=auto_mitigation_enabled, + description=description, + display_name=display_name, + enabled=enabled, + evaluation_frequency=evaluation_frequency, + location=location, + mute_actions_after_alert_duration=mute_actions_after_alert_duration, + name=name, + query_time_range_override=query_time_range_override, + skip_query_validation=skip_query_validation, + tags=tags, + target_resource_types=target_resource_types, + workspace_alerts_storage_enabled=workspace_alerts_storage_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + criterias: Optional[pulumi.Input[Sequence[pulumi.Input['ScheduledQueryRulesAlertV2CriteriaArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[str]] = None, + severity: Optional[pulumi.Input[int]] = None, + window_duration: Optional[pulumi.Input[str]] = None, + action: Optional[pulumi.Input['ScheduledQueryRulesAlertV2ActionArgs']] = None, + auto_mitigation_enabled: Optional[pulumi.Input[bool]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + evaluation_frequency: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + mute_actions_after_alert_duration: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + query_time_range_override: Optional[pulumi.Input[str]] = None, + skip_query_validation: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_resource_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + workspace_alerts_storage_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if criterias is None: + raise TypeError("Missing 'criterias' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scopes is None: + raise TypeError("Missing 'scopes' argument") + if severity is None: + raise TypeError("Missing 'severity' argument") + if window_duration is None and 'windowDuration' in kwargs: + window_duration = kwargs['windowDuration'] + if window_duration is None: + raise TypeError("Missing 'window_duration' argument") + if auto_mitigation_enabled is None and 'autoMitigationEnabled' in kwargs: + auto_mitigation_enabled = kwargs['autoMitigationEnabled'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if evaluation_frequency is None and 'evaluationFrequency' in kwargs: + evaluation_frequency = kwargs['evaluationFrequency'] + if mute_actions_after_alert_duration is None and 'muteActionsAfterAlertDuration' in kwargs: + mute_actions_after_alert_duration = kwargs['muteActionsAfterAlertDuration'] + if query_time_range_override is None and 'queryTimeRangeOverride' in kwargs: + query_time_range_override = kwargs['queryTimeRangeOverride'] + if skip_query_validation is None and 'skipQueryValidation' in kwargs: + skip_query_validation = kwargs['skipQueryValidation'] + if target_resource_types is None and 'targetResourceTypes' in kwargs: + target_resource_types = kwargs['targetResourceTypes'] + if workspace_alerts_storage_enabled is None and 'workspaceAlertsStorageEnabled' in kwargs: + workspace_alerts_storage_enabled = kwargs['workspaceAlertsStorageEnabled'] + + _setter("criterias", criterias) + _setter("resource_group_name", resource_group_name) + _setter("scopes", scopes) + _setter("severity", severity) + _setter("window_duration", window_duration) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if auto_mitigation_enabled is not None: - pulumi.set(__self__, "auto_mitigation_enabled", auto_mitigation_enabled) + _setter("auto_mitigation_enabled", auto_mitigation_enabled) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if evaluation_frequency is not None: - pulumi.set(__self__, "evaluation_frequency", evaluation_frequency) + _setter("evaluation_frequency", evaluation_frequency) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mute_actions_after_alert_duration is not None: - pulumi.set(__self__, "mute_actions_after_alert_duration", mute_actions_after_alert_duration) + _setter("mute_actions_after_alert_duration", mute_actions_after_alert_duration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if query_time_range_override is not None: - pulumi.set(__self__, "query_time_range_override", query_time_range_override) + _setter("query_time_range_override", query_time_range_override) if skip_query_validation is not None: - pulumi.set(__self__, "skip_query_validation", skip_query_validation) + _setter("skip_query_validation", skip_query_validation) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_resource_types is not None: - pulumi.set(__self__, "target_resource_types", target_resource_types) + _setter("target_resource_types", target_resource_types) if workspace_alerts_storage_enabled is not None: - pulumi.set(__self__, "workspace_alerts_storage_enabled", workspace_alerts_storage_enabled) + _setter("workspace_alerts_storage_enabled", workspace_alerts_storage_enabled) @property @pulumi.getter @@ -394,50 +471,129 @@ def __init__(__self__, *, :param pulumi.Input[str] window_duration: Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If `evaluation_frequency` is `PT1M`, possible values are `PT1M`, `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, and `PT6H`. Otherwise, possible values are `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D`, and `P2D`. :param pulumi.Input[bool] workspace_alerts_storage_enabled: Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be `true` or `false`. The default is `false`. """ + _ScheduledQueryRulesAlertV2State._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + auto_mitigation_enabled=auto_mitigation_enabled, + created_with_api_version=created_with_api_version, + criterias=criterias, + description=description, + display_name=display_name, + enabled=enabled, + evaluation_frequency=evaluation_frequency, + is_a_legacy_log_analytics_rule=is_a_legacy_log_analytics_rule, + is_workspace_alerts_storage_configured=is_workspace_alerts_storage_configured, + location=location, + mute_actions_after_alert_duration=mute_actions_after_alert_duration, + name=name, + query_time_range_override=query_time_range_override, + resource_group_name=resource_group_name, + scopes=scopes, + severity=severity, + skip_query_validation=skip_query_validation, + tags=tags, + target_resource_types=target_resource_types, + window_duration=window_duration, + workspace_alerts_storage_enabled=workspace_alerts_storage_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input['ScheduledQueryRulesAlertV2ActionArgs']] = None, + auto_mitigation_enabled: Optional[pulumi.Input[bool]] = None, + created_with_api_version: Optional[pulumi.Input[str]] = None, + criterias: Optional[pulumi.Input[Sequence[pulumi.Input['ScheduledQueryRulesAlertV2CriteriaArgs']]]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + evaluation_frequency: Optional[pulumi.Input[str]] = None, + is_a_legacy_log_analytics_rule: Optional[pulumi.Input[bool]] = None, + is_workspace_alerts_storage_configured: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + mute_actions_after_alert_duration: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + query_time_range_override: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[str]] = None, + severity: Optional[pulumi.Input[int]] = None, + skip_query_validation: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + target_resource_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + window_duration: Optional[pulumi.Input[str]] = None, + workspace_alerts_storage_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_mitigation_enabled is None and 'autoMitigationEnabled' in kwargs: + auto_mitigation_enabled = kwargs['autoMitigationEnabled'] + if created_with_api_version is None and 'createdWithApiVersion' in kwargs: + created_with_api_version = kwargs['createdWithApiVersion'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if evaluation_frequency is None and 'evaluationFrequency' in kwargs: + evaluation_frequency = kwargs['evaluationFrequency'] + if is_a_legacy_log_analytics_rule is None and 'isALegacyLogAnalyticsRule' in kwargs: + is_a_legacy_log_analytics_rule = kwargs['isALegacyLogAnalyticsRule'] + if is_workspace_alerts_storage_configured is None and 'isWorkspaceAlertsStorageConfigured' in kwargs: + is_workspace_alerts_storage_configured = kwargs['isWorkspaceAlertsStorageConfigured'] + if mute_actions_after_alert_duration is None and 'muteActionsAfterAlertDuration' in kwargs: + mute_actions_after_alert_duration = kwargs['muteActionsAfterAlertDuration'] + if query_time_range_override is None and 'queryTimeRangeOverride' in kwargs: + query_time_range_override = kwargs['queryTimeRangeOverride'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if skip_query_validation is None and 'skipQueryValidation' in kwargs: + skip_query_validation = kwargs['skipQueryValidation'] + if target_resource_types is None and 'targetResourceTypes' in kwargs: + target_resource_types = kwargs['targetResourceTypes'] + if window_duration is None and 'windowDuration' in kwargs: + window_duration = kwargs['windowDuration'] + if workspace_alerts_storage_enabled is None and 'workspaceAlertsStorageEnabled' in kwargs: + workspace_alerts_storage_enabled = kwargs['workspaceAlertsStorageEnabled'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if auto_mitigation_enabled is not None: - pulumi.set(__self__, "auto_mitigation_enabled", auto_mitigation_enabled) + _setter("auto_mitigation_enabled", auto_mitigation_enabled) if created_with_api_version is not None: - pulumi.set(__self__, "created_with_api_version", created_with_api_version) + _setter("created_with_api_version", created_with_api_version) if criterias is not None: - pulumi.set(__self__, "criterias", criterias) + _setter("criterias", criterias) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if evaluation_frequency is not None: - pulumi.set(__self__, "evaluation_frequency", evaluation_frequency) + _setter("evaluation_frequency", evaluation_frequency) if is_a_legacy_log_analytics_rule is not None: - pulumi.set(__self__, "is_a_legacy_log_analytics_rule", is_a_legacy_log_analytics_rule) + _setter("is_a_legacy_log_analytics_rule", is_a_legacy_log_analytics_rule) if is_workspace_alerts_storage_configured is not None: - pulumi.set(__self__, "is_workspace_alerts_storage_configured", is_workspace_alerts_storage_configured) + _setter("is_workspace_alerts_storage_configured", is_workspace_alerts_storage_configured) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mute_actions_after_alert_duration is not None: - pulumi.set(__self__, "mute_actions_after_alert_duration", mute_actions_after_alert_duration) + _setter("mute_actions_after_alert_duration", mute_actions_after_alert_duration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if query_time_range_override is not None: - pulumi.set(__self__, "query_time_range_override", query_time_range_override) + _setter("query_time_range_override", query_time_range_override) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if skip_query_validation is not None: - pulumi.set(__self__, "skip_query_validation", skip_query_validation) + _setter("skip_query_validation", skip_query_validation) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_resource_types is not None: - pulumi.set(__self__, "target_resource_types", target_resource_types) + _setter("target_resource_types", target_resource_types) if window_duration is not None: - pulumi.set(__self__, "window_duration", window_duration) + _setter("window_duration", window_duration) if workspace_alerts_storage_enabled is not None: - pulumi.set(__self__, "workspace_alerts_storage_enabled", workspace_alerts_storage_enabled) + _setter("workspace_alerts_storage_enabled", workspace_alerts_storage_enabled) @property @pulumi.getter @@ -805,6 +961,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ScheduledQueryRulesAlertV2Args._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -838,6 +998,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ScheduledQueryRulesAlertV2Args.__new__(ScheduledQueryRulesAlertV2Args) + if action is not None and not isinstance(action, ScheduledQueryRulesAlertV2ActionArgs): + action = action or {} + def _setter(key, value): + action[key] = value + ScheduledQueryRulesAlertV2ActionArgs._configure(_setter, **action) __props__.__dict__["action"] = action __props__.__dict__["auto_mitigation_enabled"] = auto_mitigation_enabled if criterias is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/monitoring/scheduled_query_rules_log.py b/sdk/python/pulumi_azure/monitoring/scheduled_query_rules_log.py index 78a592a525..5869c1a5c0 100644 --- a/sdk/python/pulumi_azure/monitoring/scheduled_query_rules_log.py +++ b/sdk/python/pulumi_azure/monitoring/scheduled_query_rules_log.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,21 +37,60 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the scheduled query rule. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "criteria", criteria) - pulumi.set(__self__, "data_source_id", data_source_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ScheduledQueryRulesLogArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + criteria=criteria, + data_source_id=data_source_id, + resource_group_name=resource_group_name, + authorized_resource_ids=authorized_resource_ids, + description=description, + enabled=enabled, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + criteria: Optional[pulumi.Input['ScheduledQueryRulesLogCriteriaArgs']] = None, + data_source_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + authorized_resource_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if criteria is None: + raise TypeError("Missing 'criteria' argument") + if data_source_id is None and 'dataSourceId' in kwargs: + data_source_id = kwargs['dataSourceId'] + if data_source_id is None: + raise TypeError("Missing 'data_source_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if authorized_resource_ids is None and 'authorizedResourceIds' in kwargs: + authorized_resource_ids = kwargs['authorizedResourceIds'] + + _setter("criteria", criteria) + _setter("data_source_id", data_source_id) + _setter("resource_group_name", resource_group_name) if authorized_resource_ids is not None: - pulumi.set(__self__, "authorized_resource_ids", authorized_resource_ids) + _setter("authorized_resource_ids", authorized_resource_ids) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -186,24 +225,57 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ScheduledQueryRulesLogState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorized_resource_ids=authorized_resource_ids, + criteria=criteria, + data_source_id=data_source_id, + description=description, + enabled=enabled, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorized_resource_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + criteria: Optional[pulumi.Input['ScheduledQueryRulesLogCriteriaArgs']] = None, + data_source_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorized_resource_ids is None and 'authorizedResourceIds' in kwargs: + authorized_resource_ids = kwargs['authorizedResourceIds'] + if data_source_id is None and 'dataSourceId' in kwargs: + data_source_id = kwargs['dataSourceId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if authorized_resource_ids is not None: - pulumi.set(__self__, "authorized_resource_ids", authorized_resource_ids) + _setter("authorized_resource_ids", authorized_resource_ids) if criteria is not None: - pulumi.set(__self__, "criteria", criteria) + _setter("criteria", criteria) if data_source_id is not None: - pulumi.set(__self__, "data_source_id", data_source_id) + _setter("data_source_id", data_source_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="authorizedResourceIds") @@ -491,6 +563,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ScheduledQueryRulesLogArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -515,6 +591,11 @@ def _internal_init(__self__, __props__ = ScheduledQueryRulesLogArgs.__new__(ScheduledQueryRulesLogArgs) __props__.__dict__["authorized_resource_ids"] = authorized_resource_ids + if criteria is not None and not isinstance(criteria, ScheduledQueryRulesLogCriteriaArgs): + criteria = criteria or {} + def _setter(key, value): + criteria[key] = value + ScheduledQueryRulesLogCriteriaArgs._configure(_setter, **criteria) if criteria is None and not opts.urn: raise TypeError("Missing required property 'criteria'") __props__.__dict__["criteria"] = criteria diff --git a/sdk/python/pulumi_azure/monitoring/smart_detector_alert_rule.py b/sdk/python/pulumi_azure/monitoring/smart_detector_alert_rule.py index 110fbf794a..305ebff065 100644 --- a/sdk/python/pulumi_azure/monitoring/smart_detector_alert_rule.py +++ b/sdk/python/pulumi_azure/monitoring/smart_detector_alert_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,22 +41,75 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] throttling_duration: Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again. """ - pulumi.set(__self__, "action_group", action_group) - pulumi.set(__self__, "detector_type", detector_type) - pulumi.set(__self__, "frequency", frequency) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scope_resource_ids", scope_resource_ids) - pulumi.set(__self__, "severity", severity) + SmartDetectorAlertRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_group=action_group, + detector_type=detector_type, + frequency=frequency, + resource_group_name=resource_group_name, + scope_resource_ids=scope_resource_ids, + severity=severity, + description=description, + enabled=enabled, + name=name, + tags=tags, + throttling_duration=throttling_duration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_group: Optional[pulumi.Input['SmartDetectorAlertRuleActionGroupArgs']] = None, + detector_type: Optional[pulumi.Input[str]] = None, + frequency: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scope_resource_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + severity: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + throttling_duration: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_group is None and 'actionGroup' in kwargs: + action_group = kwargs['actionGroup'] + if action_group is None: + raise TypeError("Missing 'action_group' argument") + if detector_type is None and 'detectorType' in kwargs: + detector_type = kwargs['detectorType'] + if detector_type is None: + raise TypeError("Missing 'detector_type' argument") + if frequency is None: + raise TypeError("Missing 'frequency' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scope_resource_ids is None and 'scopeResourceIds' in kwargs: + scope_resource_ids = kwargs['scopeResourceIds'] + if scope_resource_ids is None: + raise TypeError("Missing 'scope_resource_ids' argument") + if severity is None: + raise TypeError("Missing 'severity' argument") + if throttling_duration is None and 'throttlingDuration' in kwargs: + throttling_duration = kwargs['throttlingDuration'] + + _setter("action_group", action_group) + _setter("detector_type", detector_type) + _setter("frequency", frequency) + _setter("resource_group_name", resource_group_name) + _setter("scope_resource_ids", scope_resource_ids) + _setter("severity", severity) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if throttling_duration is not None: - pulumi.set(__self__, "throttling_duration", throttling_duration) + _setter("throttling_duration", throttling_duration) @property @pulumi.getter(name="actionGroup") @@ -219,28 +272,69 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] throttling_duration: Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again. """ + _SmartDetectorAlertRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_group=action_group, + description=description, + detector_type=detector_type, + enabled=enabled, + frequency=frequency, + name=name, + resource_group_name=resource_group_name, + scope_resource_ids=scope_resource_ids, + severity=severity, + tags=tags, + throttling_duration=throttling_duration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_group: Optional[pulumi.Input['SmartDetectorAlertRuleActionGroupArgs']] = None, + description: Optional[pulumi.Input[str]] = None, + detector_type: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + frequency: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scope_resource_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + severity: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + throttling_duration: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_group is None and 'actionGroup' in kwargs: + action_group = kwargs['actionGroup'] + if detector_type is None and 'detectorType' in kwargs: + detector_type = kwargs['detectorType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if scope_resource_ids is None and 'scopeResourceIds' in kwargs: + scope_resource_ids = kwargs['scopeResourceIds'] + if throttling_duration is None and 'throttlingDuration' in kwargs: + throttling_duration = kwargs['throttlingDuration'] + if action_group is not None: - pulumi.set(__self__, "action_group", action_group) + _setter("action_group", action_group) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if detector_type is not None: - pulumi.set(__self__, "detector_type", detector_type) + _setter("detector_type", detector_type) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scope_resource_ids is not None: - pulumi.set(__self__, "scope_resource_ids", scope_resource_ids) + _setter("scope_resource_ids", scope_resource_ids) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if throttling_duration is not None: - pulumi.set(__self__, "throttling_duration", throttling_duration) + _setter("throttling_duration", throttling_duration) @property @pulumi.getter(name="actionGroup") @@ -494,6 +588,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SmartDetectorAlertRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -519,6 +617,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = SmartDetectorAlertRuleArgs.__new__(SmartDetectorAlertRuleArgs) + if action_group is not None and not isinstance(action_group, SmartDetectorAlertRuleActionGroupArgs): + action_group = action_group or {} + def _setter(key, value): + action_group[key] = value + SmartDetectorAlertRuleActionGroupArgs._configure(_setter, **action_group) if action_group is None and not opts.urn: raise TypeError("Missing required property 'action_group'") __props__.__dict__["action_group"] = action_group diff --git a/sdk/python/pulumi_azure/monitoring/workspace.py b/sdk/python/pulumi_azure/monitoring/workspace.py index 8ff4eb2125..f853bc57ea 100644 --- a/sdk/python/pulumi_azure/monitoring/workspace.py +++ b/sdk/python/pulumi_azure/monitoring/workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WorkspaceArgs', 'Workspace'] @@ -27,15 +27,40 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Is public network access enabled? Defaults to `true`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Azure Monitor Workspace. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + WorkspaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -116,18 +141,45 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Azure Monitor Workspace. """ + _WorkspaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + query_endpoint=query_endpoint, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + query_endpoint: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if query_endpoint is None and 'queryEndpoint' in kwargs: + query_endpoint = kwargs['queryEndpoint'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if query_endpoint is not None: - pulumi.set(__self__, "query_endpoint", query_endpoint) + _setter("query_endpoint", query_endpoint) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -289,6 +341,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/msi/user_assigned_identity.py b/sdk/python/pulumi_azure/msi/user_assigned_identity.py index f6fae114e3..99c69167cb 100644 --- a/sdk/python/pulumi_azure/msi/user_assigned_identity.py +++ b/sdk/python/pulumi_azure/msi/user_assigned_identity.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['UserAssignedIdentityArgs', 'UserAssignedIdentity'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of this User Assigned Identity. Changing this forces a new User Assigned Identity to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the User Assigned Identity. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + UserAssignedIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -102,20 +123,51 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the User Assigned Identity. :param pulumi.Input[str] tenant_id: The ID of the Tenant which the Identity belongs to. """ + _UserAssignedIdentityState._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + location=location, + name=name, + principal_id=principal_id, + resource_group_name=resource_group_name, + tags=tags, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="clientId") @@ -294,6 +346,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + UserAssignedIdentityArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/_inputs.py b/sdk/python/pulumi_azure/mssql/_inputs.py index dfac325641..abb1c1428c 100644 --- a/sdk/python/pulumi_azure/mssql/_inputs.py +++ b/sdk/python/pulumi_azure/mssql/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -64,14 +64,63 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_uri: Specifies the blob URI of the .bacpac file. :param pulumi.Input[str] storage_account_id: The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter. """ - pulumi.set(__self__, "administrator_login", administrator_login) - pulumi.set(__self__, "administrator_login_password", administrator_login_password) - pulumi.set(__self__, "authentication_type", authentication_type) - pulumi.set(__self__, "storage_key", storage_key) - pulumi.set(__self__, "storage_key_type", storage_key_type) - pulumi.set(__self__, "storage_uri", storage_uri) + DatabaseImportArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + authentication_type=authentication_type, + storage_key=storage_key, + storage_key_type=storage_key_type, + storage_uri=storage_uri, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + authentication_type: Optional[pulumi.Input[str]] = None, + storage_key: Optional[pulumi.Input[str]] = None, + storage_key_type: Optional[pulumi.Input[str]] = None, + storage_uri: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login is None: + raise TypeError("Missing 'administrator_login' argument") + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if administrator_login_password is None: + raise TypeError("Missing 'administrator_login_password' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if authentication_type is None: + raise TypeError("Missing 'authentication_type' argument") + if storage_key is None and 'storageKey' in kwargs: + storage_key = kwargs['storageKey'] + if storage_key is None: + raise TypeError("Missing 'storage_key' argument") + if storage_key_type is None and 'storageKeyType' in kwargs: + storage_key_type = kwargs['storageKeyType'] + if storage_key_type is None: + raise TypeError("Missing 'storage_key_type' argument") + if storage_uri is None and 'storageUri' in kwargs: + storage_uri = kwargs['storageUri'] + if storage_uri is None: + raise TypeError("Missing 'storage_uri' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + + _setter("administrator_login", administrator_login) + _setter("administrator_login_password", administrator_login_password) + _setter("authentication_type", authentication_type) + _setter("storage_key", storage_key) + _setter("storage_key_type", storage_key_type) + _setter("storage_uri", storage_uri) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="administratorLogin") @@ -171,14 +220,39 @@ def __init__(__self__, *, :param pulumi.Input[str] weekly_retention: The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. `P1Y`, `P1M`, `P1W` or `P7D`. :param pulumi.Input[str] yearly_retention: The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. `P1Y`, `P12M`, `P52W` or `P365D`. """ + DatabaseLongTermRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + monthly_retention=monthly_retention, + week_of_year=week_of_year, + weekly_retention=weekly_retention, + yearly_retention=yearly_retention, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + monthly_retention: Optional[pulumi.Input[str]] = None, + week_of_year: Optional[pulumi.Input[int]] = None, + weekly_retention: Optional[pulumi.Input[str]] = None, + yearly_retention: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if monthly_retention is None and 'monthlyRetention' in kwargs: + monthly_retention = kwargs['monthlyRetention'] + if week_of_year is None and 'weekOfYear' in kwargs: + week_of_year = kwargs['weekOfYear'] + if weekly_retention is None and 'weeklyRetention' in kwargs: + weekly_retention = kwargs['weeklyRetention'] + if yearly_retention is None and 'yearlyRetention' in kwargs: + yearly_retention = kwargs['yearlyRetention'] + if monthly_retention is not None: - pulumi.set(__self__, "monthly_retention", monthly_retention) + _setter("monthly_retention", monthly_retention) if week_of_year is not None: - pulumi.set(__self__, "week_of_year", week_of_year) + _setter("week_of_year", week_of_year) if weekly_retention is not None: - pulumi.set(__self__, "weekly_retention", weekly_retention) + _setter("weekly_retention", weekly_retention) if yearly_retention is not None: - pulumi.set(__self__, "yearly_retention", yearly_retention) + _setter("yearly_retention", yearly_retention) @property @pulumi.getter(name="monthlyRetention") @@ -238,9 +312,28 @@ def __init__(__self__, *, :param pulumi.Input[int] retention_days: Point In Time Restore configuration. Value has to be between `1` and `35`. :param pulumi.Input[int] backup_interval_in_hours: The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be `12` or `24`. Defaults to `12` hours. """ - pulumi.set(__self__, "retention_days", retention_days) + DatabaseShortTermRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_days=retention_days, + backup_interval_in_hours=backup_interval_in_hours, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_days: Optional[pulumi.Input[int]] = None, + backup_interval_in_hours: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if retention_days is None: + raise TypeError("Missing 'retention_days' argument") + if backup_interval_in_hours is None and 'backupIntervalInHours' in kwargs: + backup_interval_in_hours = kwargs['backupIntervalInHours'] + + _setter("retention_days", retention_days) if backup_interval_in_hours is not None: - pulumi.set(__self__, "backup_interval_in_hours", backup_interval_in_hours) + _setter("backup_interval_in_hours", backup_interval_in_hours) @property @pulumi.getter(name="retentionDays") @@ -286,20 +379,55 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. Required if `state` is `Enabled`. :param pulumi.Input[str] storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. Required if `state` is `Enabled`. """ + DatabaseThreatDetectionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins=email_account_admins, + email_addresses=email_addresses, + retention_days=retention_days, + state=state, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_account_admins: Optional[pulumi.Input[str]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + retention_days: Optional[pulumi.Input[int]] = None, + state: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins is None and 'emailAccountAdmins' in kwargs: + email_account_admins = kwargs['emailAccountAdmins'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins is not None: - pulumi.set(__self__, "email_account_admins", email_account_admins) + _setter("email_account_admins", email_account_admins) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") @@ -393,7 +521,20 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] results: A list representing a result of the baseline. """ - pulumi.set(__self__, "results", results) + DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + results=results, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + results: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if results is None: + raise TypeError("Missing 'results' argument") + + _setter("results", results) @property @pulumi.getter @@ -417,8 +558,29 @@ def __init__(__self__, *, :param pulumi.Input[float] max_capacity: The maximum capacity any one database can consume. :param pulumi.Input[float] min_capacity: The minimum capacity all databases are guaranteed. """ - pulumi.set(__self__, "max_capacity", max_capacity) - pulumi.set(__self__, "min_capacity", min_capacity) + ElasticPoolPerDatabaseSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_capacity=max_capacity, + min_capacity=min_capacity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_capacity: Optional[pulumi.Input[float]] = None, + min_capacity: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_capacity is None and 'maxCapacity' in kwargs: + max_capacity = kwargs['maxCapacity'] + if max_capacity is None: + raise TypeError("Missing 'max_capacity' argument") + if min_capacity is None and 'minCapacity' in kwargs: + min_capacity = kwargs['minCapacity'] + if min_capacity is None: + raise TypeError("Missing 'min_capacity' argument") + + _setter("max_capacity", max_capacity) + _setter("min_capacity", min_capacity) @property @pulumi.getter(name="maxCapacity") @@ -458,11 +620,34 @@ def __init__(__self__, *, :param pulumi.Input[str] tier: The tier of the particular SKU. Possible values are `GeneralPurpose`, `BusinessCritical`, `Basic`, `Standard`, `Premium`, or `HyperScale`. For more information see the documentation for your Elasticpool configuration: [vCore-based](https://docs.microsoft.com/azure/sql-database/sql-database-vcore-resource-limits-elastic-pools) or [DTU-based](https://docs.microsoft.com/azure/sql-database/sql-database-dtu-resource-limits-elastic-pools). :param pulumi.Input[str] family: The `family` of hardware `Gen4`, `Gen5`, `Fsv2` or `DC`. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "tier", tier) + ElasticPoolSkuArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + tier=tier, + family=family, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + tier: Optional[pulumi.Input[str]] = None, + family: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("capacity", capacity) + _setter("name", name) + _setter("tier", tier) if family is not None: - pulumi.set(__self__, "family", family) + _setter("family", family) @property @pulumi.getter @@ -524,11 +709,28 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The location of the partner server. :param pulumi.Input[str] role: The replication role of the partner server. Possible values include `Primary` or `Secondary`. """ - pulumi.set(__self__, "id", id) + FailoverGroupPartnerServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + location=location, + role=role, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("id", id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if role is not None: - pulumi.set(__self__, "role", role) + _setter("role", role) @property @pulumi.getter @@ -576,9 +778,26 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The failover policy of the read-write endpoint for the failover group. Possible values are `Automatic` or `Manual`. :param pulumi.Input[int] grace_minutes: The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when `mode` is `Automatic`. """ - pulumi.set(__self__, "mode", mode) + FailoverGroupReadWriteEndpointFailoverPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + grace_minutes=grace_minutes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + grace_minutes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if grace_minutes is None and 'graceMinutes' in kwargs: + grace_minutes = kwargs['graceMinutes'] + + _setter("mode", mode) if grace_minutes is not None: - pulumi.set(__self__, "grace_minutes", grace_minutes) + _setter("grace_minutes", grace_minutes) @property @pulumi.getter @@ -618,14 +837,39 @@ def __init__(__self__, *, :param pulumi.Input[str] weekly_retention: The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. `P1Y`, `P1M`, `P1W` or `P7D`. :param pulumi.Input[str] yearly_retention: The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. `P1Y`, `P12M`, `P52W` or `P365D`. """ + ManagedDatabaseLongTermRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + monthly_retention=monthly_retention, + week_of_year=week_of_year, + weekly_retention=weekly_retention, + yearly_retention=yearly_retention, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + monthly_retention: Optional[pulumi.Input[str]] = None, + week_of_year: Optional[pulumi.Input[int]] = None, + weekly_retention: Optional[pulumi.Input[str]] = None, + yearly_retention: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if monthly_retention is None and 'monthlyRetention' in kwargs: + monthly_retention = kwargs['monthlyRetention'] + if week_of_year is None and 'weekOfYear' in kwargs: + week_of_year = kwargs['weekOfYear'] + if weekly_retention is None and 'weeklyRetention' in kwargs: + weekly_retention = kwargs['weeklyRetention'] + if yearly_retention is None and 'yearlyRetention' in kwargs: + yearly_retention = kwargs['yearlyRetention'] + if monthly_retention is not None: - pulumi.set(__self__, "monthly_retention", monthly_retention) + _setter("monthly_retention", monthly_retention) if week_of_year is not None: - pulumi.set(__self__, "week_of_year", week_of_year) + _setter("week_of_year", week_of_year) if weekly_retention is not None: - pulumi.set(__self__, "weekly_retention", weekly_retention) + _setter("weekly_retention", weekly_retention) if yearly_retention is not None: - pulumi.set(__self__, "yearly_retention", yearly_retention) + _setter("yearly_retention", yearly_retention) @property @pulumi.getter(name="monthlyRetention") @@ -685,10 +929,23 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created. :param pulumi.Input[str] role: The partner replication role of the Managed Instance Failover Group. """ + ManagedInstanceFailoverGroupPartnerRegionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + role=role, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if role is not None: - pulumi.set(__self__, "role", role) + _setter("role", role) @property @pulumi.getter @@ -724,9 +981,26 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The failover mode. Possible values are `Automatic` or `Manual`. :param pulumi.Input[int] grace_minutes: Applies only if `mode` is `Automatic`. The grace period in minutes before failover with data loss is attempted. """ - pulumi.set(__self__, "mode", mode) + ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + grace_minutes=grace_minutes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + grace_minutes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if grace_minutes is None and 'graceMinutes' in kwargs: + grace_minutes = kwargs['graceMinutes'] + + _setter("mode", mode) if grace_minutes is not None: - pulumi.set(__self__, "grace_minutes", grace_minutes) + _setter("grace_minutes", grace_minutes) @property @pulumi.getter @@ -768,13 +1042,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance. """ - pulumi.set(__self__, "type", type) + ManagedInstanceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -838,12 +1137,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] emails: Specifies an array of e-mail addresses to which the scan notification is sent. :param pulumi.Input[bool] enabled: Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to `false`. """ + ManagedInstanceVulnerabilityAssessmentRecurringScansArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_subscription_admins=email_subscription_admins, + emails=emails, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_subscription_admins: Optional[pulumi.Input[bool]] = None, + emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_subscription_admins is None and 'emailSubscriptionAdmins' in kwargs: + email_subscription_admins = kwargs['emailSubscriptionAdmins'] + if email_subscription_admins is not None: - pulumi.set(__self__, "email_subscription_admins", email_subscription_admins) + _setter("email_subscription_admins", email_subscription_admins) if emails is not None: - pulumi.set(__self__, "emails", emails) + _setter("emails", emails) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="emailSubscriptionAdmins") @@ -895,12 +1211,41 @@ def __init__(__self__, *, :param pulumi.Input[bool] azuread_authentication_only: Specifies whether only AD Users and administrators (e.g. `azuread_administrator.0.login_username`) can be used to login, or also local database users (e.g. `administrator_login`). When `true`, the `administrator_login` and `administrator_login_password` properties can be omitted. :param pulumi.Input[str] tenant_id: The tenant id of the Azure AD Administrator of this SQL Server. """ - pulumi.set(__self__, "login_username", login_username) - pulumi.set(__self__, "object_id", object_id) + ServerAzureadAdministratorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login_username=login_username, + object_id=object_id, + azuread_authentication_only=azuread_authentication_only, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login_username: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + azuread_authentication_only: Optional[pulumi.Input[bool]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login_username is None and 'loginUsername' in kwargs: + login_username = kwargs['loginUsername'] + if login_username is None: + raise TypeError("Missing 'login_username' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if azuread_authentication_only is None and 'azureadAuthenticationOnly' in kwargs: + azuread_authentication_only = kwargs['azureadAuthenticationOnly'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("login_username", login_username) + _setter("object_id", object_id) if azuread_authentication_only is not None: - pulumi.set(__self__, "azuread_authentication_only", azuread_authentication_only) + _setter("azuread_authentication_only", azuread_authentication_only) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="loginUsername") @@ -968,13 +1313,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Identity of this SQL Server. :param pulumi.Input[str] tenant_id: The tenant id of the Azure AD Administrator of this SQL Server. """ - pulumi.set(__self__, "type", type) + ServerIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1040,12 +1410,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] emails: Specifies an array of email addresses to which the scan notification is sent. :param pulumi.Input[bool] enabled: Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to `false`. """ + ServerVulnerabilityAssessmentRecurringScansArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_subscription_admins=email_subscription_admins, + emails=emails, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_subscription_admins: Optional[pulumi.Input[bool]] = None, + emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_subscription_admins is None and 'emailSubscriptionAdmins' in kwargs: + email_subscription_admins = kwargs['emailSubscriptionAdmins'] + if email_subscription_admins is not None: - pulumi.set(__self__, "email_subscription_admins", email_subscription_admins) + _setter("email_subscription_admins", email_subscription_admins) if emails is not None: - pulumi.set(__self__, "emails", emails) + _setter("emails", emails) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="emailSubscriptionAdmins") @@ -1095,12 +1482,29 @@ def __init__(__self__, *, :param pulumi.Input[bool] run_immediately: Should Assessment be run immediately? Defaults to `false`. :param pulumi.Input['VirtualMachineAssessmentScheduleArgs'] schedule: An `schedule` block as defined below. """ + VirtualMachineAssessmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + run_immediately=run_immediately, + schedule=schedule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + run_immediately: Optional[pulumi.Input[bool]] = None, + schedule: Optional[pulumi.Input['VirtualMachineAssessmentScheduleArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if run_immediately is None and 'runImmediately' in kwargs: + run_immediately = kwargs['runImmediately'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if run_immediately is not None: - pulumi.set(__self__, "run_immediately", run_immediately) + _setter("run_immediately", run_immediately) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) @property @pulumi.getter @@ -1154,12 +1558,41 @@ def __init__(__self__, *, > **NOTE:** Either one of `weekly_interval` or `monthly_occurrence` must be specified. :param pulumi.Input[int] weekly_interval: How many weeks between assessment runs. Valid values are between `1` and `6`. """ - pulumi.set(__self__, "day_of_week", day_of_week) - pulumi.set(__self__, "start_time", start_time) + VirtualMachineAssessmentScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + start_time=start_time, + monthly_occurrence=monthly_occurrence, + weekly_interval=weekly_interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + monthly_occurrence: Optional[pulumi.Input[int]] = None, + weekly_interval: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if day_of_week is None: + raise TypeError("Missing 'day_of_week' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + if monthly_occurrence is None and 'monthlyOccurrence' in kwargs: + monthly_occurrence = kwargs['monthlyOccurrence'] + if weekly_interval is None and 'weeklyInterval' in kwargs: + weekly_interval = kwargs['weeklyInterval'] + + _setter("day_of_week", day_of_week) + _setter("start_time", start_time) if monthly_occurrence is not None: - pulumi.set(__self__, "monthly_occurrence", monthly_occurrence) + _setter("monthly_occurrence", monthly_occurrence) if weekly_interval is not None: - pulumi.set(__self__, "weekly_interval", weekly_interval) + _setter("weekly_interval", weekly_interval) @property @pulumi.getter(name="dayOfWeek") @@ -1231,17 +1664,60 @@ def __init__(__self__, *, :param pulumi.Input['VirtualMachineAutoBackupManualScheduleArgs'] manual_schedule: A `manual_schedule` block as documented below. When this block is present, the schedule type is set to `Manual`. Without this block, the schedule type is set to `Automated`. :param pulumi.Input[bool] system_databases_backup_enabled: Include or exclude system databases from auto backup. """ - pulumi.set(__self__, "retention_period_in_days", retention_period_in_days) - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) - pulumi.set(__self__, "storage_blob_endpoint", storage_blob_endpoint) + VirtualMachineAutoBackupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_period_in_days=retention_period_in_days, + storage_account_access_key=storage_account_access_key, + storage_blob_endpoint=storage_blob_endpoint, + encryption_enabled=encryption_enabled, + encryption_password=encryption_password, + manual_schedule=manual_schedule, + system_databases_backup_enabled=system_databases_backup_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_period_in_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_blob_endpoint: Optional[pulumi.Input[str]] = None, + encryption_enabled: Optional[pulumi.Input[bool]] = None, + encryption_password: Optional[pulumi.Input[str]] = None, + manual_schedule: Optional[pulumi.Input['VirtualMachineAutoBackupManualScheduleArgs']] = None, + system_databases_backup_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_period_in_days is None and 'retentionPeriodInDays' in kwargs: + retention_period_in_days = kwargs['retentionPeriodInDays'] + if retention_period_in_days is None: + raise TypeError("Missing 'retention_period_in_days' argument") + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key is None: + raise TypeError("Missing 'storage_account_access_key' argument") + if storage_blob_endpoint is None and 'storageBlobEndpoint' in kwargs: + storage_blob_endpoint = kwargs['storageBlobEndpoint'] + if storage_blob_endpoint is None: + raise TypeError("Missing 'storage_blob_endpoint' argument") + if encryption_enabled is None and 'encryptionEnabled' in kwargs: + encryption_enabled = kwargs['encryptionEnabled'] + if encryption_password is None and 'encryptionPassword' in kwargs: + encryption_password = kwargs['encryptionPassword'] + if manual_schedule is None and 'manualSchedule' in kwargs: + manual_schedule = kwargs['manualSchedule'] + if system_databases_backup_enabled is None and 'systemDatabasesBackupEnabled' in kwargs: + system_databases_backup_enabled = kwargs['systemDatabasesBackupEnabled'] + + _setter("retention_period_in_days", retention_period_in_days) + _setter("storage_account_access_key", storage_account_access_key) + _setter("storage_blob_endpoint", storage_blob_endpoint) if encryption_enabled is not None: - pulumi.set(__self__, "encryption_enabled", encryption_enabled) + _setter("encryption_enabled", encryption_enabled) if encryption_password is not None: - pulumi.set(__self__, "encryption_password", encryption_password) + _setter("encryption_password", encryption_password) if manual_schedule is not None: - pulumi.set(__self__, "manual_schedule", manual_schedule) + _setter("manual_schedule", manual_schedule) if system_databases_backup_enabled is not None: - pulumi.set(__self__, "system_databases_backup_enabled", system_databases_backup_enabled) + _setter("system_databases_backup_enabled", system_databases_backup_enabled) @property @pulumi.getter(name="retentionPeriodInDays") @@ -1345,12 +1821,49 @@ def __init__(__self__, *, > **NOTE:** `days_of_week` can only be specified when `manual_schedule` is set to `Weekly` """ - pulumi.set(__self__, "full_backup_frequency", full_backup_frequency) - pulumi.set(__self__, "full_backup_start_hour", full_backup_start_hour) - pulumi.set(__self__, "full_backup_window_in_hours", full_backup_window_in_hours) - pulumi.set(__self__, "log_backup_frequency_in_minutes", log_backup_frequency_in_minutes) + VirtualMachineAutoBackupManualScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + full_backup_frequency=full_backup_frequency, + full_backup_start_hour=full_backup_start_hour, + full_backup_window_in_hours=full_backup_window_in_hours, + log_backup_frequency_in_minutes=log_backup_frequency_in_minutes, + days_of_weeks=days_of_weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + full_backup_frequency: Optional[pulumi.Input[str]] = None, + full_backup_start_hour: Optional[pulumi.Input[int]] = None, + full_backup_window_in_hours: Optional[pulumi.Input[int]] = None, + log_backup_frequency_in_minutes: Optional[pulumi.Input[int]] = None, + days_of_weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if full_backup_frequency is None and 'fullBackupFrequency' in kwargs: + full_backup_frequency = kwargs['fullBackupFrequency'] + if full_backup_frequency is None: + raise TypeError("Missing 'full_backup_frequency' argument") + if full_backup_start_hour is None and 'fullBackupStartHour' in kwargs: + full_backup_start_hour = kwargs['fullBackupStartHour'] + if full_backup_start_hour is None: + raise TypeError("Missing 'full_backup_start_hour' argument") + if full_backup_window_in_hours is None and 'fullBackupWindowInHours' in kwargs: + full_backup_window_in_hours = kwargs['fullBackupWindowInHours'] + if full_backup_window_in_hours is None: + raise TypeError("Missing 'full_backup_window_in_hours' argument") + if log_backup_frequency_in_minutes is None and 'logBackupFrequencyInMinutes' in kwargs: + log_backup_frequency_in_minutes = kwargs['logBackupFrequencyInMinutes'] + if log_backup_frequency_in_minutes is None: + raise TypeError("Missing 'log_backup_frequency_in_minutes' argument") + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + + _setter("full_backup_frequency", full_backup_frequency) + _setter("full_backup_start_hour", full_backup_start_hour) + _setter("full_backup_window_in_hours", full_backup_window_in_hours) + _setter("log_backup_frequency_in_minutes", log_backup_frequency_in_minutes) if days_of_weeks is not None: - pulumi.set(__self__, "days_of_weeks", days_of_weeks) + _setter("days_of_weeks", days_of_weeks) @property @pulumi.getter(name="fullBackupFrequency") @@ -1426,9 +1939,36 @@ def __init__(__self__, *, :param pulumi.Input[int] maintenance_window_duration_in_minutes: The size of the Maintenance Window in minutes. :param pulumi.Input[int] maintenance_window_starting_hour: The Hour, in the Virtual Machine Time-Zone when the patching maintenance window should begin. """ - pulumi.set(__self__, "day_of_week", day_of_week) - pulumi.set(__self__, "maintenance_window_duration_in_minutes", maintenance_window_duration_in_minutes) - pulumi.set(__self__, "maintenance_window_starting_hour", maintenance_window_starting_hour) + VirtualMachineAutoPatchingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + maintenance_window_duration_in_minutes=maintenance_window_duration_in_minutes, + maintenance_window_starting_hour=maintenance_window_starting_hour, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[pulumi.Input[str]] = None, + maintenance_window_duration_in_minutes: Optional[pulumi.Input[int]] = None, + maintenance_window_starting_hour: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if day_of_week is None: + raise TypeError("Missing 'day_of_week' argument") + if maintenance_window_duration_in_minutes is None and 'maintenanceWindowDurationInMinutes' in kwargs: + maintenance_window_duration_in_minutes = kwargs['maintenanceWindowDurationInMinutes'] + if maintenance_window_duration_in_minutes is None: + raise TypeError("Missing 'maintenance_window_duration_in_minutes' argument") + if maintenance_window_starting_hour is None and 'maintenanceWindowStartingHour' in kwargs: + maintenance_window_starting_hour = kwargs['maintenanceWindowStartingHour'] + if maintenance_window_starting_hour is None: + raise TypeError("Missing 'maintenance_window_starting_hour' argument") + + _setter("day_of_week", day_of_week) + _setter("maintenance_window_duration_in_minutes", maintenance_window_duration_in_minutes) + _setter("maintenance_window_starting_hour", maintenance_window_starting_hour) @property @pulumi.getter(name="dayOfWeek") @@ -1484,11 +2024,50 @@ def __init__(__self__, *, > **NOTE:** `sql_virtual_machine_ids` should match with the SQL Virtual Machines specified in `replica`. """ - pulumi.set(__self__, "load_balancer_id", load_balancer_id) - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "probe_port", probe_port) - pulumi.set(__self__, "sql_virtual_machine_ids", sql_virtual_machine_ids) - pulumi.set(__self__, "subnet_id", subnet_id) + VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + load_balancer_id=load_balancer_id, + private_ip_address=private_ip_address, + probe_port=probe_port, + sql_virtual_machine_ids=sql_virtual_machine_ids, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + load_balancer_id: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + probe_port: Optional[pulumi.Input[int]] = None, + sql_virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if load_balancer_id is None and 'loadBalancerId' in kwargs: + load_balancer_id = kwargs['loadBalancerId'] + if load_balancer_id is None: + raise TypeError("Missing 'load_balancer_id' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if probe_port is None and 'probePort' in kwargs: + probe_port = kwargs['probePort'] + if probe_port is None: + raise TypeError("Missing 'probe_port' argument") + if sql_virtual_machine_ids is None and 'sqlVirtualMachineIds' in kwargs: + sql_virtual_machine_ids = kwargs['sqlVirtualMachineIds'] + if sql_virtual_machine_ids is None: + raise TypeError("Missing 'sql_virtual_machine_ids' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("load_balancer_id", load_balancer_id) + _setter("private_ip_address", private_ip_address) + _setter("probe_port", probe_port) + _setter("sql_virtual_machine_ids", sql_virtual_machine_ids) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="loadBalancerId") @@ -1566,9 +2145,36 @@ def __init__(__self__, *, > **NOTE:** `sql_virtual_machine_id` should match with the SQL Virtual Machines specified in `replica`. """ - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "sql_virtual_machine_id", sql_virtual_machine_id) - pulumi.set(__self__, "subnet_id", subnet_id) + VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_ip_address=private_ip_address, + sql_virtual_machine_id=sql_virtual_machine_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_ip_address: Optional[pulumi.Input[str]] = None, + sql_virtual_machine_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if sql_virtual_machine_id is None and 'sqlVirtualMachineId' in kwargs: + sql_virtual_machine_id = kwargs['sqlVirtualMachineId'] + if sql_virtual_machine_id is None: + raise TypeError("Missing 'sql_virtual_machine_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("private_ip_address", private_ip_address) + _setter("sql_virtual_machine_id", sql_virtual_machine_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="privateIpAddress") @@ -1624,11 +2230,46 @@ def __init__(__self__, *, :param pulumi.Input[str] role: The replica role for the availability group. Possible values are `Primary` and `Secondary`. Changing this forces a new resource to be created. :param pulumi.Input[str] sql_virtual_machine_id: The ID of the SQL Virtual Machine. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "commit", commit) - pulumi.set(__self__, "failover_mode", failover_mode) - pulumi.set(__self__, "readable_secondary", readable_secondary) - pulumi.set(__self__, "role", role) - pulumi.set(__self__, "sql_virtual_machine_id", sql_virtual_machine_id) + VirtualMachineAvailabilityGroupListenerReplicaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + commit=commit, + failover_mode=failover_mode, + readable_secondary=readable_secondary, + role=role, + sql_virtual_machine_id=sql_virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + commit: Optional[pulumi.Input[str]] = None, + failover_mode: Optional[pulumi.Input[str]] = None, + readable_secondary: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + sql_virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if commit is None: + raise TypeError("Missing 'commit' argument") + if failover_mode is None and 'failoverMode' in kwargs: + failover_mode = kwargs['failoverMode'] + if failover_mode is None: + raise TypeError("Missing 'failover_mode' argument") + if readable_secondary is None and 'readableSecondary' in kwargs: + readable_secondary = kwargs['readableSecondary'] + if readable_secondary is None: + raise TypeError("Missing 'readable_secondary' argument") + if role is None: + raise TypeError("Missing 'role' argument") + if sql_virtual_machine_id is None and 'sqlVirtualMachineId' in kwargs: + sql_virtual_machine_id = kwargs['sqlVirtualMachineId'] + if sql_virtual_machine_id is None: + raise TypeError("Missing 'sql_virtual_machine_id' argument") + + _setter("commit", commit) + _setter("failover_mode", failover_mode) + _setter("readable_secondary", readable_secondary) + _setter("role", role) + _setter("sql_virtual_machine_id", sql_virtual_machine_id) @property @pulumi.getter @@ -1712,20 +2353,63 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_primary_key: The primary key of the Storage Account. :param pulumi.Input[str] storage_account_url: The SAS URL to the Storage Container of the witness storage account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cluster_subnet_type", cluster_subnet_type) - pulumi.set(__self__, "fqdn", fqdn) + VirtualMachineGroupWsfcDomainProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_subnet_type=cluster_subnet_type, + fqdn=fqdn, + cluster_bootstrap_account_name=cluster_bootstrap_account_name, + cluster_operator_account_name=cluster_operator_account_name, + organizational_unit_path=organizational_unit_path, + sql_service_account_name=sql_service_account_name, + storage_account_primary_key=storage_account_primary_key, + storage_account_url=storage_account_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_subnet_type: Optional[pulumi.Input[str]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + cluster_bootstrap_account_name: Optional[pulumi.Input[str]] = None, + cluster_operator_account_name: Optional[pulumi.Input[str]] = None, + organizational_unit_path: Optional[pulumi.Input[str]] = None, + sql_service_account_name: Optional[pulumi.Input[str]] = None, + storage_account_primary_key: Optional[pulumi.Input[str]] = None, + storage_account_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_subnet_type is None and 'clusterSubnetType' in kwargs: + cluster_subnet_type = kwargs['clusterSubnetType'] + if cluster_subnet_type is None: + raise TypeError("Missing 'cluster_subnet_type' argument") + if fqdn is None: + raise TypeError("Missing 'fqdn' argument") + if cluster_bootstrap_account_name is None and 'clusterBootstrapAccountName' in kwargs: + cluster_bootstrap_account_name = kwargs['clusterBootstrapAccountName'] + if cluster_operator_account_name is None and 'clusterOperatorAccountName' in kwargs: + cluster_operator_account_name = kwargs['clusterOperatorAccountName'] + if organizational_unit_path is None and 'organizationalUnitPath' in kwargs: + organizational_unit_path = kwargs['organizationalUnitPath'] + if sql_service_account_name is None and 'sqlServiceAccountName' in kwargs: + sql_service_account_name = kwargs['sqlServiceAccountName'] + if storage_account_primary_key is None and 'storageAccountPrimaryKey' in kwargs: + storage_account_primary_key = kwargs['storageAccountPrimaryKey'] + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + + _setter("cluster_subnet_type", cluster_subnet_type) + _setter("fqdn", fqdn) if cluster_bootstrap_account_name is not None: - pulumi.set(__self__, "cluster_bootstrap_account_name", cluster_bootstrap_account_name) + _setter("cluster_bootstrap_account_name", cluster_bootstrap_account_name) if cluster_operator_account_name is not None: - pulumi.set(__self__, "cluster_operator_account_name", cluster_operator_account_name) + _setter("cluster_operator_account_name", cluster_operator_account_name) if organizational_unit_path is not None: - pulumi.set(__self__, "organizational_unit_path", organizational_unit_path) + _setter("organizational_unit_path", organizational_unit_path) if sql_service_account_name is not None: - pulumi.set(__self__, "sql_service_account_name", sql_service_account_name) + _setter("sql_service_account_name", sql_service_account_name) if storage_account_primary_key is not None: - pulumi.set(__self__, "storage_account_primary_key", storage_account_primary_key) + _setter("storage_account_primary_key", storage_account_primary_key) if storage_account_url is not None: - pulumi.set(__self__, "storage_account_url", storage_account_url) + _setter("storage_account_url", storage_account_url) @property @pulumi.getter(name="clusterSubnetType") @@ -1837,10 +2521,41 @@ def __init__(__self__, *, :param pulumi.Input[str] service_principal_name: The service principal name to access key vault. Changing this forces a new resource to be created. :param pulumi.Input[str] service_principal_secret: The service principal name secret to access key vault. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "key_vault_url", key_vault_url) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "service_principal_name", service_principal_name) - pulumi.set(__self__, "service_principal_secret", service_principal_secret) + VirtualMachineKeyVaultCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_url=key_vault_url, + name=name, + service_principal_name=service_principal_name, + service_principal_secret=service_principal_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_url: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + service_principal_name: Optional[pulumi.Input[str]] = None, + service_principal_secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_url is None and 'keyVaultUrl' in kwargs: + key_vault_url = kwargs['keyVaultUrl'] + if key_vault_url is None: + raise TypeError("Missing 'key_vault_url' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if service_principal_name is None and 'servicePrincipalName' in kwargs: + service_principal_name = kwargs['servicePrincipalName'] + if service_principal_name is None: + raise TypeError("Missing 'service_principal_name' argument") + if service_principal_secret is None and 'servicePrincipalSecret' in kwargs: + service_principal_secret = kwargs['servicePrincipalSecret'] + if service_principal_secret is None: + raise TypeError("Missing 'service_principal_secret' argument") + + _setter("key_vault_url", key_vault_url) + _setter("name", name) + _setter("service_principal_name", service_principal_name) + _setter("service_principal_secret", service_principal_secret) @property @pulumi.getter(name="keyVaultUrl") @@ -1912,20 +2627,55 @@ def __init__(__self__, *, > **NOTE:** `max_server_memory_mb` must be greater than or equal to `min_server_memory_mb` """ + VirtualMachineSqlInstanceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + adhoc_workloads_optimization_enabled=adhoc_workloads_optimization_enabled, + collation=collation, + instant_file_initialization_enabled=instant_file_initialization_enabled, + lock_pages_in_memory_enabled=lock_pages_in_memory_enabled, + max_dop=max_dop, + max_server_memory_mb=max_server_memory_mb, + min_server_memory_mb=min_server_memory_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + adhoc_workloads_optimization_enabled: Optional[pulumi.Input[bool]] = None, + collation: Optional[pulumi.Input[str]] = None, + instant_file_initialization_enabled: Optional[pulumi.Input[bool]] = None, + lock_pages_in_memory_enabled: Optional[pulumi.Input[bool]] = None, + max_dop: Optional[pulumi.Input[int]] = None, + max_server_memory_mb: Optional[pulumi.Input[int]] = None, + min_server_memory_mb: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if adhoc_workloads_optimization_enabled is None and 'adhocWorkloadsOptimizationEnabled' in kwargs: + adhoc_workloads_optimization_enabled = kwargs['adhocWorkloadsOptimizationEnabled'] + if instant_file_initialization_enabled is None and 'instantFileInitializationEnabled' in kwargs: + instant_file_initialization_enabled = kwargs['instantFileInitializationEnabled'] + if lock_pages_in_memory_enabled is None and 'lockPagesInMemoryEnabled' in kwargs: + lock_pages_in_memory_enabled = kwargs['lockPagesInMemoryEnabled'] + if max_dop is None and 'maxDop' in kwargs: + max_dop = kwargs['maxDop'] + if max_server_memory_mb is None and 'maxServerMemoryMb' in kwargs: + max_server_memory_mb = kwargs['maxServerMemoryMb'] + if min_server_memory_mb is None and 'minServerMemoryMb' in kwargs: + min_server_memory_mb = kwargs['minServerMemoryMb'] + if adhoc_workloads_optimization_enabled is not None: - pulumi.set(__self__, "adhoc_workloads_optimization_enabled", adhoc_workloads_optimization_enabled) + _setter("adhoc_workloads_optimization_enabled", adhoc_workloads_optimization_enabled) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if instant_file_initialization_enabled is not None: - pulumi.set(__self__, "instant_file_initialization_enabled", instant_file_initialization_enabled) + _setter("instant_file_initialization_enabled", instant_file_initialization_enabled) if lock_pages_in_memory_enabled is not None: - pulumi.set(__self__, "lock_pages_in_memory_enabled", lock_pages_in_memory_enabled) + _setter("lock_pages_in_memory_enabled", lock_pages_in_memory_enabled) if max_dop is not None: - pulumi.set(__self__, "max_dop", max_dop) + _setter("max_dop", max_dop) if max_server_memory_mb is not None: - pulumi.set(__self__, "max_server_memory_mb", max_server_memory_mb) + _setter("max_server_memory_mb", max_server_memory_mb) if min_server_memory_mb is not None: - pulumi.set(__self__, "min_server_memory_mb", min_server_memory_mb) + _setter("min_server_memory_mb", min_server_memory_mb) @property @pulumi.getter(name="adhocWorkloadsOptimizationEnabled") @@ -2031,16 +2781,53 @@ def __init__(__self__, *, :param pulumi.Input[bool] system_db_on_data_disk_enabled: Specifies whether to set system databases (except tempDb) location to newly created data storage. Possible values are `true` and `false`. Defaults to `false`. :param pulumi.Input['VirtualMachineStorageConfigurationTempDbSettingsArgs'] temp_db_settings: An `temp_db_settings` as defined below. """ - pulumi.set(__self__, "disk_type", disk_type) - pulumi.set(__self__, "storage_workload_type", storage_workload_type) + VirtualMachineStorageConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_type=disk_type, + storage_workload_type=storage_workload_type, + data_settings=data_settings, + log_settings=log_settings, + system_db_on_data_disk_enabled=system_db_on_data_disk_enabled, + temp_db_settings=temp_db_settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_type: Optional[pulumi.Input[str]] = None, + storage_workload_type: Optional[pulumi.Input[str]] = None, + data_settings: Optional[pulumi.Input['VirtualMachineStorageConfigurationDataSettingsArgs']] = None, + log_settings: Optional[pulumi.Input['VirtualMachineStorageConfigurationLogSettingsArgs']] = None, + system_db_on_data_disk_enabled: Optional[pulumi.Input[bool]] = None, + temp_db_settings: Optional[pulumi.Input['VirtualMachineStorageConfigurationTempDbSettingsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_type is None and 'diskType' in kwargs: + disk_type = kwargs['diskType'] + if disk_type is None: + raise TypeError("Missing 'disk_type' argument") + if storage_workload_type is None and 'storageWorkloadType' in kwargs: + storage_workload_type = kwargs['storageWorkloadType'] + if storage_workload_type is None: + raise TypeError("Missing 'storage_workload_type' argument") + if data_settings is None and 'dataSettings' in kwargs: + data_settings = kwargs['dataSettings'] + if log_settings is None and 'logSettings' in kwargs: + log_settings = kwargs['logSettings'] + if system_db_on_data_disk_enabled is None and 'systemDbOnDataDiskEnabled' in kwargs: + system_db_on_data_disk_enabled = kwargs['systemDbOnDataDiskEnabled'] + if temp_db_settings is None and 'tempDbSettings' in kwargs: + temp_db_settings = kwargs['tempDbSettings'] + + _setter("disk_type", disk_type) + _setter("storage_workload_type", storage_workload_type) if data_settings is not None: - pulumi.set(__self__, "data_settings", data_settings) + _setter("data_settings", data_settings) if log_settings is not None: - pulumi.set(__self__, "log_settings", log_settings) + _setter("log_settings", log_settings) if system_db_on_data_disk_enabled is not None: - pulumi.set(__self__, "system_db_on_data_disk_enabled", system_db_on_data_disk_enabled) + _setter("system_db_on_data_disk_enabled", system_db_on_data_disk_enabled) if temp_db_settings is not None: - pulumi.set(__self__, "temp_db_settings", temp_db_settings) + _setter("temp_db_settings", temp_db_settings) @property @pulumi.getter(name="diskType") @@ -2124,8 +2911,27 @@ def __init__(__self__, *, :param pulumi.Input[str] default_file_path: The SQL Server default path :param pulumi.Input[Sequence[pulumi.Input[int]]] luns: A list of Logical Unit Numbers for the disks. """ - pulumi.set(__self__, "default_file_path", default_file_path) - pulumi.set(__self__, "luns", luns) + VirtualMachineStorageConfigurationDataSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_file_path=default_file_path, + luns=luns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_file_path: Optional[pulumi.Input[str]] = None, + luns: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_file_path is None and 'defaultFilePath' in kwargs: + default_file_path = kwargs['defaultFilePath'] + if default_file_path is None: + raise TypeError("Missing 'default_file_path' argument") + if luns is None: + raise TypeError("Missing 'luns' argument") + + _setter("default_file_path", default_file_path) + _setter("luns", luns) @property @pulumi.getter(name="defaultFilePath") @@ -2161,8 +2967,27 @@ def __init__(__self__, *, :param pulumi.Input[str] default_file_path: The SQL Server default path :param pulumi.Input[Sequence[pulumi.Input[int]]] luns: A list of Logical Unit Numbers for the disks. """ - pulumi.set(__self__, "default_file_path", default_file_path) - pulumi.set(__self__, "luns", luns) + VirtualMachineStorageConfigurationLogSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_file_path=default_file_path, + luns=luns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_file_path: Optional[pulumi.Input[str]] = None, + luns: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_file_path is None and 'defaultFilePath' in kwargs: + default_file_path = kwargs['defaultFilePath'] + if default_file_path is None: + raise TypeError("Missing 'default_file_path' argument") + if luns is None: + raise TypeError("Missing 'luns' argument") + + _setter("default_file_path", default_file_path) + _setter("luns", luns) @property @pulumi.getter(name="defaultFilePath") @@ -2208,18 +3033,57 @@ def __init__(__self__, *, :param pulumi.Input[int] log_file_growth_mb: The SQL Server default file size - This value defaults to `512` :param pulumi.Input[int] log_file_size_mb: The SQL Server default file size - This value defaults to `256` """ - pulumi.set(__self__, "default_file_path", default_file_path) - pulumi.set(__self__, "luns", luns) + VirtualMachineStorageConfigurationTempDbSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_file_path=default_file_path, + luns=luns, + data_file_count=data_file_count, + data_file_growth_in_mb=data_file_growth_in_mb, + data_file_size_mb=data_file_size_mb, + log_file_growth_mb=log_file_growth_mb, + log_file_size_mb=log_file_size_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_file_path: Optional[pulumi.Input[str]] = None, + luns: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + data_file_count: Optional[pulumi.Input[int]] = None, + data_file_growth_in_mb: Optional[pulumi.Input[int]] = None, + data_file_size_mb: Optional[pulumi.Input[int]] = None, + log_file_growth_mb: Optional[pulumi.Input[int]] = None, + log_file_size_mb: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_file_path is None and 'defaultFilePath' in kwargs: + default_file_path = kwargs['defaultFilePath'] + if default_file_path is None: + raise TypeError("Missing 'default_file_path' argument") + if luns is None: + raise TypeError("Missing 'luns' argument") + if data_file_count is None and 'dataFileCount' in kwargs: + data_file_count = kwargs['dataFileCount'] + if data_file_growth_in_mb is None and 'dataFileGrowthInMb' in kwargs: + data_file_growth_in_mb = kwargs['dataFileGrowthInMb'] + if data_file_size_mb is None and 'dataFileSizeMb' in kwargs: + data_file_size_mb = kwargs['dataFileSizeMb'] + if log_file_growth_mb is None and 'logFileGrowthMb' in kwargs: + log_file_growth_mb = kwargs['logFileGrowthMb'] + if log_file_size_mb is None and 'logFileSizeMb' in kwargs: + log_file_size_mb = kwargs['logFileSizeMb'] + + _setter("default_file_path", default_file_path) + _setter("luns", luns) if data_file_count is not None: - pulumi.set(__self__, "data_file_count", data_file_count) + _setter("data_file_count", data_file_count) if data_file_growth_in_mb is not None: - pulumi.set(__self__, "data_file_growth_in_mb", data_file_growth_in_mb) + _setter("data_file_growth_in_mb", data_file_growth_in_mb) if data_file_size_mb is not None: - pulumi.set(__self__, "data_file_size_mb", data_file_size_mb) + _setter("data_file_size_mb", data_file_size_mb) if log_file_growth_mb is not None: - pulumi.set(__self__, "log_file_growth_mb", log_file_growth_mb) + _setter("log_file_growth_mb", log_file_growth_mb) if log_file_size_mb is not None: - pulumi.set(__self__, "log_file_size_mb", log_file_size_mb) + _setter("log_file_size_mb", log_file_size_mb) @property @pulumi.getter(name="defaultFilePath") @@ -2317,9 +3181,36 @@ def __init__(__self__, *, :param pulumi.Input[str] cluster_operator_account_password: The account password used for operating cluster. :param pulumi.Input[str] sql_service_account_password: The account password under which SQL service will run on all participating SQL virtual machines in the cluster. """ - pulumi.set(__self__, "cluster_bootstrap_account_password", cluster_bootstrap_account_password) - pulumi.set(__self__, "cluster_operator_account_password", cluster_operator_account_password) - pulumi.set(__self__, "sql_service_account_password", sql_service_account_password) + VirtualMachineWsfcDomainCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_bootstrap_account_password=cluster_bootstrap_account_password, + cluster_operator_account_password=cluster_operator_account_password, + sql_service_account_password=sql_service_account_password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_bootstrap_account_password: Optional[pulumi.Input[str]] = None, + cluster_operator_account_password: Optional[pulumi.Input[str]] = None, + sql_service_account_password: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_bootstrap_account_password is None and 'clusterBootstrapAccountPassword' in kwargs: + cluster_bootstrap_account_password = kwargs['clusterBootstrapAccountPassword'] + if cluster_bootstrap_account_password is None: + raise TypeError("Missing 'cluster_bootstrap_account_password' argument") + if cluster_operator_account_password is None and 'clusterOperatorAccountPassword' in kwargs: + cluster_operator_account_password = kwargs['clusterOperatorAccountPassword'] + if cluster_operator_account_password is None: + raise TypeError("Missing 'cluster_operator_account_password' argument") + if sql_service_account_password is None and 'sqlServiceAccountPassword' in kwargs: + sql_service_account_password = kwargs['sqlServiceAccountPassword'] + if sql_service_account_password is None: + raise TypeError("Missing 'sql_service_account_password' argument") + + _setter("cluster_bootstrap_account_password", cluster_bootstrap_account_password) + _setter("cluster_operator_account_password", cluster_operator_account_password) + _setter("sql_service_account_password", sql_service_account_password) @property @pulumi.getter(name="clusterBootstrapAccountPassword") diff --git a/sdk/python/pulumi_azure/mssql/database.py b/sdk/python/pulumi_azure/mssql/database.py index 5a27a96710..cee2b0e5d8 100644 --- a/sdk/python/pulumi_azure/mssql/database.py +++ b/sdk/python/pulumi_azure/mssql/database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -89,61 +89,178 @@ def __init__(__self__, *, > **NOTE:** TDE cannot be disabled on servers with SKUs other than ones starting with DW. :param pulumi.Input[bool] zone_redundant: Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases. """ - pulumi.set(__self__, "server_id", server_id) + DatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + server_id=server_id, + auto_pause_delay_in_minutes=auto_pause_delay_in_minutes, + collation=collation, + create_mode=create_mode, + creation_source_database_id=creation_source_database_id, + elastic_pool_id=elastic_pool_id, + geo_backup_enabled=geo_backup_enabled, + import_=import_, + ledger_enabled=ledger_enabled, + license_type=license_type, + long_term_retention_policy=long_term_retention_policy, + maintenance_configuration_name=maintenance_configuration_name, + max_size_gb=max_size_gb, + min_capacity=min_capacity, + name=name, + read_replica_count=read_replica_count, + read_scale=read_scale, + recover_database_id=recover_database_id, + restore_dropped_database_id=restore_dropped_database_id, + restore_point_in_time=restore_point_in_time, + sample_name=sample_name, + short_term_retention_policy=short_term_retention_policy, + sku_name=sku_name, + storage_account_type=storage_account_type, + tags=tags, + threat_detection_policy=threat_detection_policy, + transparent_data_encryption_enabled=transparent_data_encryption_enabled, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server_id: Optional[pulumi.Input[str]] = None, + auto_pause_delay_in_minutes: Optional[pulumi.Input[int]] = None, + collation: Optional[pulumi.Input[str]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + creation_source_database_id: Optional[pulumi.Input[str]] = None, + elastic_pool_id: Optional[pulumi.Input[str]] = None, + geo_backup_enabled: Optional[pulumi.Input[bool]] = None, + import_: Optional[pulumi.Input['DatabaseImportArgs']] = None, + ledger_enabled: Optional[pulumi.Input[bool]] = None, + license_type: Optional[pulumi.Input[str]] = None, + long_term_retention_policy: Optional[pulumi.Input['DatabaseLongTermRetentionPolicyArgs']] = None, + maintenance_configuration_name: Optional[pulumi.Input[str]] = None, + max_size_gb: Optional[pulumi.Input[int]] = None, + min_capacity: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + read_replica_count: Optional[pulumi.Input[int]] = None, + read_scale: Optional[pulumi.Input[bool]] = None, + recover_database_id: Optional[pulumi.Input[str]] = None, + restore_dropped_database_id: Optional[pulumi.Input[str]] = None, + restore_point_in_time: Optional[pulumi.Input[str]] = None, + sample_name: Optional[pulumi.Input[str]] = None, + short_term_retention_policy: Optional[pulumi.Input['DatabaseShortTermRetentionPolicyArgs']] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_detection_policy: Optional[pulumi.Input['DatabaseThreatDetectionPolicyArgs']] = None, + transparent_data_encryption_enabled: Optional[pulumi.Input[bool]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + if auto_pause_delay_in_minutes is None and 'autoPauseDelayInMinutes' in kwargs: + auto_pause_delay_in_minutes = kwargs['autoPauseDelayInMinutes'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if creation_source_database_id is None and 'creationSourceDatabaseId' in kwargs: + creation_source_database_id = kwargs['creationSourceDatabaseId'] + if elastic_pool_id is None and 'elasticPoolId' in kwargs: + elastic_pool_id = kwargs['elasticPoolId'] + if geo_backup_enabled is None and 'geoBackupEnabled' in kwargs: + geo_backup_enabled = kwargs['geoBackupEnabled'] + if import_ is None and 'import' in kwargs: + import_ = kwargs['import'] + if ledger_enabled is None and 'ledgerEnabled' in kwargs: + ledger_enabled = kwargs['ledgerEnabled'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if long_term_retention_policy is None and 'longTermRetentionPolicy' in kwargs: + long_term_retention_policy = kwargs['longTermRetentionPolicy'] + if maintenance_configuration_name is None and 'maintenanceConfigurationName' in kwargs: + maintenance_configuration_name = kwargs['maintenanceConfigurationName'] + if max_size_gb is None and 'maxSizeGb' in kwargs: + max_size_gb = kwargs['maxSizeGb'] + if min_capacity is None and 'minCapacity' in kwargs: + min_capacity = kwargs['minCapacity'] + if read_replica_count is None and 'readReplicaCount' in kwargs: + read_replica_count = kwargs['readReplicaCount'] + if read_scale is None and 'readScale' in kwargs: + read_scale = kwargs['readScale'] + if recover_database_id is None and 'recoverDatabaseId' in kwargs: + recover_database_id = kwargs['recoverDatabaseId'] + if restore_dropped_database_id is None and 'restoreDroppedDatabaseId' in kwargs: + restore_dropped_database_id = kwargs['restoreDroppedDatabaseId'] + if restore_point_in_time is None and 'restorePointInTime' in kwargs: + restore_point_in_time = kwargs['restorePointInTime'] + if sample_name is None and 'sampleName' in kwargs: + sample_name = kwargs['sampleName'] + if short_term_retention_policy is None and 'shortTermRetentionPolicy' in kwargs: + short_term_retention_policy = kwargs['shortTermRetentionPolicy'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if threat_detection_policy is None and 'threatDetectionPolicy' in kwargs: + threat_detection_policy = kwargs['threatDetectionPolicy'] + if transparent_data_encryption_enabled is None and 'transparentDataEncryptionEnabled' in kwargs: + transparent_data_encryption_enabled = kwargs['transparentDataEncryptionEnabled'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + + _setter("server_id", server_id) if auto_pause_delay_in_minutes is not None: - pulumi.set(__self__, "auto_pause_delay_in_minutes", auto_pause_delay_in_minutes) + _setter("auto_pause_delay_in_minutes", auto_pause_delay_in_minutes) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if creation_source_database_id is not None: - pulumi.set(__self__, "creation_source_database_id", creation_source_database_id) + _setter("creation_source_database_id", creation_source_database_id) if elastic_pool_id is not None: - pulumi.set(__self__, "elastic_pool_id", elastic_pool_id) + _setter("elastic_pool_id", elastic_pool_id) if geo_backup_enabled is not None: - pulumi.set(__self__, "geo_backup_enabled", geo_backup_enabled) + _setter("geo_backup_enabled", geo_backup_enabled) if import_ is not None: - pulumi.set(__self__, "import_", import_) + _setter("import_", import_) if ledger_enabled is not None: - pulumi.set(__self__, "ledger_enabled", ledger_enabled) + _setter("ledger_enabled", ledger_enabled) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if long_term_retention_policy is not None: - pulumi.set(__self__, "long_term_retention_policy", long_term_retention_policy) + _setter("long_term_retention_policy", long_term_retention_policy) if maintenance_configuration_name is not None: - pulumi.set(__self__, "maintenance_configuration_name", maintenance_configuration_name) + _setter("maintenance_configuration_name", maintenance_configuration_name) if max_size_gb is not None: - pulumi.set(__self__, "max_size_gb", max_size_gb) + _setter("max_size_gb", max_size_gb) if min_capacity is not None: - pulumi.set(__self__, "min_capacity", min_capacity) + _setter("min_capacity", min_capacity) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if read_replica_count is not None: - pulumi.set(__self__, "read_replica_count", read_replica_count) + _setter("read_replica_count", read_replica_count) if read_scale is not None: - pulumi.set(__self__, "read_scale", read_scale) + _setter("read_scale", read_scale) if recover_database_id is not None: - pulumi.set(__self__, "recover_database_id", recover_database_id) + _setter("recover_database_id", recover_database_id) if restore_dropped_database_id is not None: - pulumi.set(__self__, "restore_dropped_database_id", restore_dropped_database_id) + _setter("restore_dropped_database_id", restore_dropped_database_id) if restore_point_in_time is not None: - pulumi.set(__self__, "restore_point_in_time", restore_point_in_time) + _setter("restore_point_in_time", restore_point_in_time) if sample_name is not None: - pulumi.set(__self__, "sample_name", sample_name) + _setter("sample_name", sample_name) if short_term_retention_policy is not None: - pulumi.set(__self__, "short_term_retention_policy", short_term_retention_policy) + _setter("short_term_retention_policy", short_term_retention_policy) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_detection_policy is not None: - pulumi.set(__self__, "threat_detection_policy", threat_detection_policy) + _setter("threat_detection_policy", threat_detection_policy) if transparent_data_encryption_enabled is not None: - pulumi.set(__self__, "transparent_data_encryption_enabled", transparent_data_encryption_enabled) + _setter("transparent_data_encryption_enabled", transparent_data_encryption_enabled) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="serverId") @@ -572,62 +689,177 @@ def __init__(__self__, *, > **NOTE:** TDE cannot be disabled on servers with SKUs other than ones starting with DW. :param pulumi.Input[bool] zone_redundant: Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases. """ + _DatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_pause_delay_in_minutes=auto_pause_delay_in_minutes, + collation=collation, + create_mode=create_mode, + creation_source_database_id=creation_source_database_id, + elastic_pool_id=elastic_pool_id, + geo_backup_enabled=geo_backup_enabled, + import_=import_, + ledger_enabled=ledger_enabled, + license_type=license_type, + long_term_retention_policy=long_term_retention_policy, + maintenance_configuration_name=maintenance_configuration_name, + max_size_gb=max_size_gb, + min_capacity=min_capacity, + name=name, + read_replica_count=read_replica_count, + read_scale=read_scale, + recover_database_id=recover_database_id, + restore_dropped_database_id=restore_dropped_database_id, + restore_point_in_time=restore_point_in_time, + sample_name=sample_name, + server_id=server_id, + short_term_retention_policy=short_term_retention_policy, + sku_name=sku_name, + storage_account_type=storage_account_type, + tags=tags, + threat_detection_policy=threat_detection_policy, + transparent_data_encryption_enabled=transparent_data_encryption_enabled, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_pause_delay_in_minutes: Optional[pulumi.Input[int]] = None, + collation: Optional[pulumi.Input[str]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + creation_source_database_id: Optional[pulumi.Input[str]] = None, + elastic_pool_id: Optional[pulumi.Input[str]] = None, + geo_backup_enabled: Optional[pulumi.Input[bool]] = None, + import_: Optional[pulumi.Input['DatabaseImportArgs']] = None, + ledger_enabled: Optional[pulumi.Input[bool]] = None, + license_type: Optional[pulumi.Input[str]] = None, + long_term_retention_policy: Optional[pulumi.Input['DatabaseLongTermRetentionPolicyArgs']] = None, + maintenance_configuration_name: Optional[pulumi.Input[str]] = None, + max_size_gb: Optional[pulumi.Input[int]] = None, + min_capacity: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + read_replica_count: Optional[pulumi.Input[int]] = None, + read_scale: Optional[pulumi.Input[bool]] = None, + recover_database_id: Optional[pulumi.Input[str]] = None, + restore_dropped_database_id: Optional[pulumi.Input[str]] = None, + restore_point_in_time: Optional[pulumi.Input[str]] = None, + sample_name: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + short_term_retention_policy: Optional[pulumi.Input['DatabaseShortTermRetentionPolicyArgs']] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_detection_policy: Optional[pulumi.Input['DatabaseThreatDetectionPolicyArgs']] = None, + transparent_data_encryption_enabled: Optional[pulumi.Input[bool]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_pause_delay_in_minutes is None and 'autoPauseDelayInMinutes' in kwargs: + auto_pause_delay_in_minutes = kwargs['autoPauseDelayInMinutes'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if creation_source_database_id is None and 'creationSourceDatabaseId' in kwargs: + creation_source_database_id = kwargs['creationSourceDatabaseId'] + if elastic_pool_id is None and 'elasticPoolId' in kwargs: + elastic_pool_id = kwargs['elasticPoolId'] + if geo_backup_enabled is None and 'geoBackupEnabled' in kwargs: + geo_backup_enabled = kwargs['geoBackupEnabled'] + if import_ is None and 'import' in kwargs: + import_ = kwargs['import'] + if ledger_enabled is None and 'ledgerEnabled' in kwargs: + ledger_enabled = kwargs['ledgerEnabled'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if long_term_retention_policy is None and 'longTermRetentionPolicy' in kwargs: + long_term_retention_policy = kwargs['longTermRetentionPolicy'] + if maintenance_configuration_name is None and 'maintenanceConfigurationName' in kwargs: + maintenance_configuration_name = kwargs['maintenanceConfigurationName'] + if max_size_gb is None and 'maxSizeGb' in kwargs: + max_size_gb = kwargs['maxSizeGb'] + if min_capacity is None and 'minCapacity' in kwargs: + min_capacity = kwargs['minCapacity'] + if read_replica_count is None and 'readReplicaCount' in kwargs: + read_replica_count = kwargs['readReplicaCount'] + if read_scale is None and 'readScale' in kwargs: + read_scale = kwargs['readScale'] + if recover_database_id is None and 'recoverDatabaseId' in kwargs: + recover_database_id = kwargs['recoverDatabaseId'] + if restore_dropped_database_id is None and 'restoreDroppedDatabaseId' in kwargs: + restore_dropped_database_id = kwargs['restoreDroppedDatabaseId'] + if restore_point_in_time is None and 'restorePointInTime' in kwargs: + restore_point_in_time = kwargs['restorePointInTime'] + if sample_name is None and 'sampleName' in kwargs: + sample_name = kwargs['sampleName'] + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if short_term_retention_policy is None and 'shortTermRetentionPolicy' in kwargs: + short_term_retention_policy = kwargs['shortTermRetentionPolicy'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if threat_detection_policy is None and 'threatDetectionPolicy' in kwargs: + threat_detection_policy = kwargs['threatDetectionPolicy'] + if transparent_data_encryption_enabled is None and 'transparentDataEncryptionEnabled' in kwargs: + transparent_data_encryption_enabled = kwargs['transparentDataEncryptionEnabled'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + if auto_pause_delay_in_minutes is not None: - pulumi.set(__self__, "auto_pause_delay_in_minutes", auto_pause_delay_in_minutes) + _setter("auto_pause_delay_in_minutes", auto_pause_delay_in_minutes) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if creation_source_database_id is not None: - pulumi.set(__self__, "creation_source_database_id", creation_source_database_id) + _setter("creation_source_database_id", creation_source_database_id) if elastic_pool_id is not None: - pulumi.set(__self__, "elastic_pool_id", elastic_pool_id) + _setter("elastic_pool_id", elastic_pool_id) if geo_backup_enabled is not None: - pulumi.set(__self__, "geo_backup_enabled", geo_backup_enabled) + _setter("geo_backup_enabled", geo_backup_enabled) if import_ is not None: - pulumi.set(__self__, "import_", import_) + _setter("import_", import_) if ledger_enabled is not None: - pulumi.set(__self__, "ledger_enabled", ledger_enabled) + _setter("ledger_enabled", ledger_enabled) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if long_term_retention_policy is not None: - pulumi.set(__self__, "long_term_retention_policy", long_term_retention_policy) + _setter("long_term_retention_policy", long_term_retention_policy) if maintenance_configuration_name is not None: - pulumi.set(__self__, "maintenance_configuration_name", maintenance_configuration_name) + _setter("maintenance_configuration_name", maintenance_configuration_name) if max_size_gb is not None: - pulumi.set(__self__, "max_size_gb", max_size_gb) + _setter("max_size_gb", max_size_gb) if min_capacity is not None: - pulumi.set(__self__, "min_capacity", min_capacity) + _setter("min_capacity", min_capacity) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if read_replica_count is not None: - pulumi.set(__self__, "read_replica_count", read_replica_count) + _setter("read_replica_count", read_replica_count) if read_scale is not None: - pulumi.set(__self__, "read_scale", read_scale) + _setter("read_scale", read_scale) if recover_database_id is not None: - pulumi.set(__self__, "recover_database_id", recover_database_id) + _setter("recover_database_id", recover_database_id) if restore_dropped_database_id is not None: - pulumi.set(__self__, "restore_dropped_database_id", restore_dropped_database_id) + _setter("restore_dropped_database_id", restore_dropped_database_id) if restore_point_in_time is not None: - pulumi.set(__self__, "restore_point_in_time", restore_point_in_time) + _setter("restore_point_in_time", restore_point_in_time) if sample_name is not None: - pulumi.set(__self__, "sample_name", sample_name) + _setter("sample_name", sample_name) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) if short_term_retention_policy is not None: - pulumi.set(__self__, "short_term_retention_policy", short_term_retention_policy) + _setter("short_term_retention_policy", short_term_retention_policy) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_detection_policy is not None: - pulumi.set(__self__, "threat_detection_policy", threat_detection_policy) + _setter("threat_detection_policy", threat_detection_policy) if transparent_data_encryption_enabled is not None: - pulumi.set(__self__, "transparent_data_encryption_enabled", transparent_data_encryption_enabled) + _setter("transparent_data_encryption_enabled", transparent_data_encryption_enabled) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="autoPauseDelayInMinutes") @@ -1159,6 +1391,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1207,9 +1443,19 @@ def _internal_init(__self__, __props__.__dict__["creation_source_database_id"] = creation_source_database_id __props__.__dict__["elastic_pool_id"] = elastic_pool_id __props__.__dict__["geo_backup_enabled"] = geo_backup_enabled + if import_ is not None and not isinstance(import_, DatabaseImportArgs): + import_ = import_ or {} + def _setter(key, value): + import_[key] = value + DatabaseImportArgs._configure(_setter, **import_) __props__.__dict__["import_"] = import_ __props__.__dict__["ledger_enabled"] = ledger_enabled __props__.__dict__["license_type"] = license_type + if long_term_retention_policy is not None and not isinstance(long_term_retention_policy, DatabaseLongTermRetentionPolicyArgs): + long_term_retention_policy = long_term_retention_policy or {} + def _setter(key, value): + long_term_retention_policy[key] = value + DatabaseLongTermRetentionPolicyArgs._configure(_setter, **long_term_retention_policy) __props__.__dict__["long_term_retention_policy"] = long_term_retention_policy __props__.__dict__["maintenance_configuration_name"] = maintenance_configuration_name __props__.__dict__["max_size_gb"] = max_size_gb @@ -1224,10 +1470,20 @@ def _internal_init(__self__, if server_id is None and not opts.urn: raise TypeError("Missing required property 'server_id'") __props__.__dict__["server_id"] = server_id + if short_term_retention_policy is not None and not isinstance(short_term_retention_policy, DatabaseShortTermRetentionPolicyArgs): + short_term_retention_policy = short_term_retention_policy or {} + def _setter(key, value): + short_term_retention_policy[key] = value + DatabaseShortTermRetentionPolicyArgs._configure(_setter, **short_term_retention_policy) __props__.__dict__["short_term_retention_policy"] = short_term_retention_policy __props__.__dict__["sku_name"] = sku_name __props__.__dict__["storage_account_type"] = storage_account_type __props__.__dict__["tags"] = tags + if threat_detection_policy is not None and not isinstance(threat_detection_policy, DatabaseThreatDetectionPolicyArgs): + threat_detection_policy = threat_detection_policy or {} + def _setter(key, value): + threat_detection_policy[key] = value + DatabaseThreatDetectionPolicyArgs._configure(_setter, **threat_detection_policy) __props__.__dict__["threat_detection_policy"] = threat_detection_policy __props__.__dict__["transparent_data_encryption_enabled"] = transparent_data_encryption_enabled __props__.__dict__["zone_redundant"] = zone_redundant diff --git a/sdk/python/pulumi_azure/mssql/database_extended_auditing_policy.py b/sdk/python/pulumi_azure/mssql/database_extended_auditing_policy.py index c01f3525f1..3bf353349b 100644 --- a/sdk/python/pulumi_azure/mssql/database_extended_auditing_policy.py +++ b/sdk/python/pulumi_azure/mssql/database_extended_auditing_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DatabaseExtendedAuditingPolicyArgs', 'DatabaseExtendedAuditingPolicy'] @@ -32,19 +32,56 @@ def __init__(__self__, *, :param pulumi.Input[bool] storage_account_access_key_is_secondary: Is `storage_account_access_key` value the storage's secondary key? :param pulumi.Input[str] storage_endpoint: The blob storage endpoint (e.g. ). This blob storage will hold all extended auditing logs. """ - pulumi.set(__self__, "database_id", database_id) + DatabaseExtendedAuditingPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_id=database_id, + enabled=enabled, + log_monitoring_enabled=log_monitoring_enabled, + retention_in_days=retention_in_days, + storage_account_access_key=storage_account_access_key, + storage_account_access_key_is_secondary=storage_account_access_key_is_secondary, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + log_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_access_key_is_secondary: Optional[pulumi.Input[bool]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_id is None and 'databaseId' in kwargs: + database_id = kwargs['databaseId'] + if database_id is None: + raise TypeError("Missing 'database_id' argument") + if log_monitoring_enabled is None and 'logMonitoringEnabled' in kwargs: + log_monitoring_enabled = kwargs['logMonitoringEnabled'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key_is_secondary is None and 'storageAccountAccessKeyIsSecondary' in kwargs: + storage_account_access_key_is_secondary = kwargs['storageAccountAccessKeyIsSecondary'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + + _setter("database_id", database_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if log_monitoring_enabled is not None: - pulumi.set(__self__, "log_monitoring_enabled", log_monitoring_enabled) + _setter("log_monitoring_enabled", log_monitoring_enabled) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_access_key_is_secondary is not None: - pulumi.set(__self__, "storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) + _setter("storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="databaseId") @@ -151,20 +188,55 @@ def __init__(__self__, *, :param pulumi.Input[bool] storage_account_access_key_is_secondary: Is `storage_account_access_key` value the storage's secondary key? :param pulumi.Input[str] storage_endpoint: The blob storage endpoint (e.g. ). This blob storage will hold all extended auditing logs. """ + _DatabaseExtendedAuditingPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_id=database_id, + enabled=enabled, + log_monitoring_enabled=log_monitoring_enabled, + retention_in_days=retention_in_days, + storage_account_access_key=storage_account_access_key, + storage_account_access_key_is_secondary=storage_account_access_key_is_secondary, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + log_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_access_key_is_secondary: Optional[pulumi.Input[bool]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_id is None and 'databaseId' in kwargs: + database_id = kwargs['databaseId'] + if log_monitoring_enabled is None and 'logMonitoringEnabled' in kwargs: + log_monitoring_enabled = kwargs['logMonitoringEnabled'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key_is_secondary is None and 'storageAccountAccessKeyIsSecondary' in kwargs: + storage_account_access_key_is_secondary = kwargs['storageAccountAccessKeyIsSecondary'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if database_id is not None: - pulumi.set(__self__, "database_id", database_id) + _setter("database_id", database_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if log_monitoring_enabled is not None: - pulumi.set(__self__, "log_monitoring_enabled", log_monitoring_enabled) + _setter("log_monitoring_enabled", log_monitoring_enabled) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_access_key_is_secondary is not None: - pulumi.set(__self__, "storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) + _setter("storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="databaseId") @@ -366,6 +438,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatabaseExtendedAuditingPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/database_vulnerability_assessment_rule_baseline.py b/sdk/python/pulumi_azure/mssql/database_vulnerability_assessment_rule_baseline.py index 84bcba0849..0898efccf0 100644 --- a/sdk/python/pulumi_azure/mssql/database_vulnerability_assessment_rule_baseline.py +++ b/sdk/python/pulumi_azure/mssql/database_vulnerability_assessment_rule_baseline.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,12 +29,49 @@ def __init__(__self__, *, :param pulumi.Input[str] server_vulnerability_assessment_id: The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created. :param pulumi.Input[str] baseline_name: The name of the vulnerability assessment rule baseline. Valid options are `default` and `master`. `default` implies a baseline on a database level rule and `master` for server level rule. Defaults to `default`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "baseline_results", baseline_results) - pulumi.set(__self__, "database_name", database_name) - pulumi.set(__self__, "rule_id", rule_id) - pulumi.set(__self__, "server_vulnerability_assessment_id", server_vulnerability_assessment_id) + DatabaseVulnerabilityAssessmentRuleBaselineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + baseline_results=baseline_results, + database_name=database_name, + rule_id=rule_id, + server_vulnerability_assessment_id=server_vulnerability_assessment_id, + baseline_name=baseline_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + baseline_results: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs']]]] = None, + database_name: Optional[pulumi.Input[str]] = None, + rule_id: Optional[pulumi.Input[str]] = None, + server_vulnerability_assessment_id: Optional[pulumi.Input[str]] = None, + baseline_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if baseline_results is None and 'baselineResults' in kwargs: + baseline_results = kwargs['baselineResults'] + if baseline_results is None: + raise TypeError("Missing 'baseline_results' argument") + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if database_name is None: + raise TypeError("Missing 'database_name' argument") + if rule_id is None and 'ruleId' in kwargs: + rule_id = kwargs['ruleId'] + if rule_id is None: + raise TypeError("Missing 'rule_id' argument") + if server_vulnerability_assessment_id is None and 'serverVulnerabilityAssessmentId' in kwargs: + server_vulnerability_assessment_id = kwargs['serverVulnerabilityAssessmentId'] + if server_vulnerability_assessment_id is None: + raise TypeError("Missing 'server_vulnerability_assessment_id' argument") + if baseline_name is None and 'baselineName' in kwargs: + baseline_name = kwargs['baselineName'] + + _setter("baseline_results", baseline_results) + _setter("database_name", database_name) + _setter("rule_id", rule_id) + _setter("server_vulnerability_assessment_id", server_vulnerability_assessment_id) if baseline_name is not None: - pulumi.set(__self__, "baseline_name", baseline_name) + _setter("baseline_name", baseline_name) @property @pulumi.getter(name="baselineResults") @@ -113,16 +150,45 @@ def __init__(__self__, *, :param pulumi.Input[str] rule_id: The vulnerability assessment rule ID. Changing this forces a new resource to be created. :param pulumi.Input[str] server_vulnerability_assessment_id: The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created. """ + _DatabaseVulnerabilityAssessmentRuleBaselineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + baseline_name=baseline_name, + baseline_results=baseline_results, + database_name=database_name, + rule_id=rule_id, + server_vulnerability_assessment_id=server_vulnerability_assessment_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + baseline_name: Optional[pulumi.Input[str]] = None, + baseline_results: Optional[pulumi.Input[Sequence[pulumi.Input['DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs']]]] = None, + database_name: Optional[pulumi.Input[str]] = None, + rule_id: Optional[pulumi.Input[str]] = None, + server_vulnerability_assessment_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if baseline_name is None and 'baselineName' in kwargs: + baseline_name = kwargs['baselineName'] + if baseline_results is None and 'baselineResults' in kwargs: + baseline_results = kwargs['baselineResults'] + if database_name is None and 'databaseName' in kwargs: + database_name = kwargs['databaseName'] + if rule_id is None and 'ruleId' in kwargs: + rule_id = kwargs['ruleId'] + if server_vulnerability_assessment_id is None and 'serverVulnerabilityAssessmentId' in kwargs: + server_vulnerability_assessment_id = kwargs['serverVulnerabilityAssessmentId'] + if baseline_name is not None: - pulumi.set(__self__, "baseline_name", baseline_name) + _setter("baseline_name", baseline_name) if baseline_results is not None: - pulumi.set(__self__, "baseline_results", baseline_results) + _setter("baseline_results", baseline_results) if database_name is not None: - pulumi.set(__self__, "database_name", database_name) + _setter("database_name", database_name) if rule_id is not None: - pulumi.set(__self__, "rule_id", rule_id) + _setter("rule_id", rule_id) if server_vulnerability_assessment_id is not None: - pulumi.set(__self__, "server_vulnerability_assessment_id", server_vulnerability_assessment_id) + _setter("server_vulnerability_assessment_id", server_vulnerability_assessment_id) @property @pulumi.getter(name="baselineName") @@ -360,6 +426,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatabaseVulnerabilityAssessmentRuleBaselineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/elastic_pool.py b/sdk/python/pulumi_azure/mssql/elastic_pool.py index 5a7d34327a..a791ad8468 100644 --- a/sdk/python/pulumi_azure/mssql/elastic_pool.py +++ b/sdk/python/pulumi_azure/mssql/elastic_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,26 +45,83 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] zone_redundant: Whether or not this elastic pool is zone redundant. `tier` needs to be `Premium` for `DTU` based or `BusinessCritical` for `vCore` based `sku`. """ - pulumi.set(__self__, "per_database_settings", per_database_settings) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "sku", sku) + ElasticPoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + per_database_settings=per_database_settings, + resource_group_name=resource_group_name, + server_name=server_name, + sku=sku, + license_type=license_type, + location=location, + maintenance_configuration_name=maintenance_configuration_name, + max_size_bytes=max_size_bytes, + max_size_gb=max_size_gb, + name=name, + tags=tags, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + per_database_settings: Optional[pulumi.Input['ElasticPoolPerDatabaseSettingsArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['ElasticPoolSkuArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_configuration_name: Optional[pulumi.Input[str]] = None, + max_size_bytes: Optional[pulumi.Input[int]] = None, + max_size_gb: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if per_database_settings is None and 'perDatabaseSettings' in kwargs: + per_database_settings = kwargs['perDatabaseSettings'] + if per_database_settings is None: + raise TypeError("Missing 'per_database_settings' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if maintenance_configuration_name is None and 'maintenanceConfigurationName' in kwargs: + maintenance_configuration_name = kwargs['maintenanceConfigurationName'] + if max_size_bytes is None and 'maxSizeBytes' in kwargs: + max_size_bytes = kwargs['maxSizeBytes'] + if max_size_gb is None and 'maxSizeGb' in kwargs: + max_size_gb = kwargs['maxSizeGb'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + + _setter("per_database_settings", per_database_settings) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("sku", sku) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_configuration_name is not None: - pulumi.set(__self__, "maintenance_configuration_name", maintenance_configuration_name) + _setter("maintenance_configuration_name", maintenance_configuration_name) if max_size_bytes is not None: - pulumi.set(__self__, "max_size_bytes", max_size_bytes) + _setter("max_size_bytes", max_size_bytes) if max_size_gb is not None: - pulumi.set(__self__, "max_size_gb", max_size_gb) + _setter("max_size_gb", max_size_gb) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="perDatabaseSettings") @@ -245,30 +302,79 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] zone_redundant: Whether or not this elastic pool is zone redundant. `tier` needs to be `Premium` for `DTU` based or `BusinessCritical` for `vCore` based `sku`. """ + _ElasticPoolState._configure( + lambda key, value: pulumi.set(__self__, key, value), + license_type=license_type, + location=location, + maintenance_configuration_name=maintenance_configuration_name, + max_size_bytes=max_size_bytes, + max_size_gb=max_size_gb, + name=name, + per_database_settings=per_database_settings, + resource_group_name=resource_group_name, + server_name=server_name, + sku=sku, + tags=tags, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_configuration_name: Optional[pulumi.Input[str]] = None, + max_size_bytes: Optional[pulumi.Input[int]] = None, + max_size_gb: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + per_database_settings: Optional[pulumi.Input['ElasticPoolPerDatabaseSettingsArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['ElasticPoolSkuArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if maintenance_configuration_name is None and 'maintenanceConfigurationName' in kwargs: + maintenance_configuration_name = kwargs['maintenanceConfigurationName'] + if max_size_bytes is None and 'maxSizeBytes' in kwargs: + max_size_bytes = kwargs['maxSizeBytes'] + if max_size_gb is None and 'maxSizeGb' in kwargs: + max_size_gb = kwargs['maxSizeGb'] + if per_database_settings is None and 'perDatabaseSettings' in kwargs: + per_database_settings = kwargs['perDatabaseSettings'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_configuration_name is not None: - pulumi.set(__self__, "maintenance_configuration_name", maintenance_configuration_name) + _setter("maintenance_configuration_name", maintenance_configuration_name) if max_size_bytes is not None: - pulumi.set(__self__, "max_size_bytes", max_size_bytes) + _setter("max_size_bytes", max_size_bytes) if max_size_gb is not None: - pulumi.set(__self__, "max_size_gb", max_size_gb) + _setter("max_size_gb", max_size_gb) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if per_database_settings is not None: - pulumi.set(__self__, "per_database_settings", per_database_settings) + _setter("per_database_settings", per_database_settings) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="licenseType") @@ -552,6 +658,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ElasticPoolArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -584,6 +694,11 @@ def _internal_init(__self__, __props__.__dict__["max_size_bytes"] = max_size_bytes __props__.__dict__["max_size_gb"] = max_size_gb __props__.__dict__["name"] = name + if per_database_settings is not None and not isinstance(per_database_settings, ElasticPoolPerDatabaseSettingsArgs): + per_database_settings = per_database_settings or {} + def _setter(key, value): + per_database_settings[key] = value + ElasticPoolPerDatabaseSettingsArgs._configure(_setter, **per_database_settings) if per_database_settings is None and not opts.urn: raise TypeError("Missing required property 'per_database_settings'") __props__.__dict__["per_database_settings"] = per_database_settings @@ -593,6 +708,11 @@ def _internal_init(__self__, if server_name is None and not opts.urn: raise TypeError("Missing required property 'server_name'") __props__.__dict__["server_name"] = server_name + if sku is not None and not isinstance(sku, ElasticPoolSkuArgs): + sku = sku or {} + def _setter(key, value): + sku[key] = value + ElasticPoolSkuArgs._configure(_setter, **sku) if sku is None and not opts.urn: raise TypeError("Missing required property 'sku'") __props__.__dict__["sku"] = sku diff --git a/sdk/python/pulumi_azure/mssql/failover_group.py b/sdk/python/pulumi_azure/mssql/failover_group.py index 558d0b1071..2e79212ad6 100644 --- a/sdk/python/pulumi_azure/mssql/failover_group.py +++ b/sdk/python/pulumi_azure/mssql/failover_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,54 @@ def __init__(__self__, *, :param pulumi.Input[bool] readonly_endpoint_failover_policy_enabled: Whether failover is enabled for the readonly endpoint. Defaults to `false`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "partner_servers", partner_servers) - pulumi.set(__self__, "read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) - pulumi.set(__self__, "server_id", server_id) + FailoverGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + partner_servers=partner_servers, + read_write_endpoint_failover_policy=read_write_endpoint_failover_policy, + server_id=server_id, + databases=databases, + name=name, + readonly_endpoint_failover_policy_enabled=readonly_endpoint_failover_policy_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + partner_servers: Optional[pulumi.Input[Sequence[pulumi.Input['FailoverGroupPartnerServerArgs']]]] = None, + read_write_endpoint_failover_policy: Optional[pulumi.Input['FailoverGroupReadWriteEndpointFailoverPolicyArgs']] = None, + server_id: Optional[pulumi.Input[str]] = None, + databases: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + readonly_endpoint_failover_policy_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if partner_servers is None and 'partnerServers' in kwargs: + partner_servers = kwargs['partnerServers'] + if partner_servers is None: + raise TypeError("Missing 'partner_servers' argument") + if read_write_endpoint_failover_policy is None and 'readWriteEndpointFailoverPolicy' in kwargs: + read_write_endpoint_failover_policy = kwargs['readWriteEndpointFailoverPolicy'] + if read_write_endpoint_failover_policy is None: + raise TypeError("Missing 'read_write_endpoint_failover_policy' argument") + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + if readonly_endpoint_failover_policy_enabled is None and 'readonlyEndpointFailoverPolicyEnabled' in kwargs: + readonly_endpoint_failover_policy_enabled = kwargs['readonlyEndpointFailoverPolicyEnabled'] + + _setter("partner_servers", partner_servers) + _setter("read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) + _setter("server_id", server_id) if databases is not None: - pulumi.set(__self__, "databases", databases) + _setter("databases", databases) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if readonly_endpoint_failover_policy_enabled is not None: - pulumi.set(__self__, "readonly_endpoint_failover_policy_enabled", readonly_endpoint_failover_policy_enabled) + _setter("readonly_endpoint_failover_policy_enabled", readonly_endpoint_failover_policy_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="partnerServers") @@ -150,20 +187,51 @@ def __init__(__self__, *, :param pulumi.Input[str] server_id: The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _FailoverGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + databases=databases, + name=name, + partner_servers=partner_servers, + read_write_endpoint_failover_policy=read_write_endpoint_failover_policy, + readonly_endpoint_failover_policy_enabled=readonly_endpoint_failover_policy_enabled, + server_id=server_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + databases: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + partner_servers: Optional[pulumi.Input[Sequence[pulumi.Input['FailoverGroupPartnerServerArgs']]]] = None, + read_write_endpoint_failover_policy: Optional[pulumi.Input['FailoverGroupReadWriteEndpointFailoverPolicyArgs']] = None, + readonly_endpoint_failover_policy_enabled: Optional[pulumi.Input[bool]] = None, + server_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if partner_servers is None and 'partnerServers' in kwargs: + partner_servers = kwargs['partnerServers'] + if read_write_endpoint_failover_policy is None and 'readWriteEndpointFailoverPolicy' in kwargs: + read_write_endpoint_failover_policy = kwargs['readWriteEndpointFailoverPolicy'] + if readonly_endpoint_failover_policy_enabled is None and 'readonlyEndpointFailoverPolicyEnabled' in kwargs: + readonly_endpoint_failover_policy_enabled = kwargs['readonlyEndpointFailoverPolicyEnabled'] + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if databases is not None: - pulumi.set(__self__, "databases", databases) + _setter("databases", databases) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partner_servers is not None: - pulumi.set(__self__, "partner_servers", partner_servers) + _setter("partner_servers", partner_servers) if read_write_endpoint_failover_policy is not None: - pulumi.set(__self__, "read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) + _setter("read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) if readonly_endpoint_failover_policy_enabled is not None: - pulumi.set(__self__, "readonly_endpoint_failover_policy_enabled", readonly_endpoint_failover_policy_enabled) + _setter("readonly_endpoint_failover_policy_enabled", readonly_endpoint_failover_policy_enabled) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -391,6 +459,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FailoverGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -417,6 +489,11 @@ def _internal_init(__self__, if partner_servers is None and not opts.urn: raise TypeError("Missing required property 'partner_servers'") __props__.__dict__["partner_servers"] = partner_servers + if read_write_endpoint_failover_policy is not None and not isinstance(read_write_endpoint_failover_policy, FailoverGroupReadWriteEndpointFailoverPolicyArgs): + read_write_endpoint_failover_policy = read_write_endpoint_failover_policy or {} + def _setter(key, value): + read_write_endpoint_failover_policy[key] = value + FailoverGroupReadWriteEndpointFailoverPolicyArgs._configure(_setter, **read_write_endpoint_failover_policy) if read_write_endpoint_failover_policy is None and not opts.urn: raise TypeError("Missing required property 'read_write_endpoint_failover_policy'") __props__.__dict__["read_write_endpoint_failover_policy"] = read_write_endpoint_failover_policy diff --git a/sdk/python/pulumi_azure/mssql/firewall_rule.py b/sdk/python/pulumi_azure/mssql/firewall_rule.py index 7be36a59dd..afc3f25c0c 100644 --- a/sdk/python/pulumi_azure/mssql/firewall_rule.py +++ b/sdk/python/pulumi_azure/mssql/firewall_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FirewallRuleArgs', 'FirewallRule'] @@ -27,11 +27,40 @@ def __init__(__self__, *, :param pulumi.Input[str] start_ip_address: The starting IP address to allow through the firewall for this rule. :param pulumi.Input[str] name: The name of the firewall rule. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "end_ip_address", end_ip_address) - pulumi.set(__self__, "server_id", server_id) - pulumi.set(__self__, "start_ip_address", start_ip_address) + FirewallRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + server_id=server_id, + start_ip_address=start_ip_address, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if end_ip_address is None: + raise TypeError("Missing 'end_ip_address' argument") + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if start_ip_address is None: + raise TypeError("Missing 'start_ip_address' argument") + + _setter("end_ip_address", end_ip_address) + _setter("server_id", server_id) + _setter("start_ip_address", start_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="endIpAddress") @@ -100,14 +129,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server_id: The resource ID of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created. :param pulumi.Input[str] start_ip_address: The starting IP address to allow through the firewall for this rule. """ + _FirewallRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + name=name, + server_id=server_id, + start_ip_address=start_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if end_ip_address is not None: - pulumi.set(__self__, "end_ip_address", end_ip_address) + _setter("end_ip_address", end_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) if start_ip_address is not None: - pulumi.set(__self__, "start_ip_address", start_ip_address) + _setter("start_ip_address", start_ip_address) @property @pulumi.getter(name="endIpAddress") @@ -255,6 +307,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/get_database.py b/sdk/python/pulumi_azure/mssql/get_database.py index ea5f302eff..3346d7daec 100644 --- a/sdk/python/pulumi_azure/mssql/get_database.py +++ b/sdk/python/pulumi_azure/mssql/get_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/mssql/get_elastic_pool.py b/sdk/python/pulumi_azure/mssql/get_elastic_pool.py index ceebecaa9c..92ce645a89 100644 --- a/sdk/python/pulumi_azure/mssql/get_elastic_pool.py +++ b/sdk/python/pulumi_azure/mssql/get_elastic_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/mssql/get_managed_instance.py b/sdk/python/pulumi_azure/mssql/get_managed_instance.py index 9505063633..9ed6269d8b 100644 --- a/sdk/python/pulumi_azure/mssql/get_managed_instance.py +++ b/sdk/python/pulumi_azure/mssql/get_managed_instance.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/mssql/get_server.py b/sdk/python/pulumi_azure/mssql/get_server.py index 3888d98ba4..6c1a3e875b 100644 --- a/sdk/python/pulumi_azure/mssql/get_server.py +++ b/sdk/python/pulumi_azure/mssql/get_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/mssql/job_agent.py b/sdk/python/pulumi_azure/mssql/job_agent.py index 62a118d885..bcdba343d9 100644 --- a/sdk/python/pulumi_azure/mssql/job_agent.py +++ b/sdk/python/pulumi_azure/mssql/job_agent.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['JobAgentArgs', 'JobAgent'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Database. """ - pulumi.set(__self__, "database_id", database_id) + JobAgentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_id=database_id, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_id is None and 'databaseId' in kwargs: + database_id = kwargs['databaseId'] + if database_id is None: + raise TypeError("Missing 'database_id' argument") + + _setter("database_id", database_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="databaseId") @@ -96,14 +117,33 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Database. """ + _JobAgentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + database_id=database_id, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database_id is None and 'databaseId' in kwargs: + database_id = kwargs['databaseId'] + if database_id is not None: - pulumi.set(__self__, "database_id", database_id) + _setter("database_id", database_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="databaseId") @@ -253,6 +293,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + JobAgentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/job_credential.py b/sdk/python/pulumi_azure/mssql/job_credential.py index 1b212ad80a..f3725066a6 100644 --- a/sdk/python/pulumi_azure/mssql/job_credential.py +++ b/sdk/python/pulumi_azure/mssql/job_credential.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['JobCredentialArgs', 'JobCredential'] @@ -25,11 +25,36 @@ def __init__(__self__, *, :param pulumi.Input[str] username: The username part of the credential. :param pulumi.Input[str] name: The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created. """ - pulumi.set(__self__, "job_agent_id", job_agent_id) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + JobCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + job_agent_id=job_agent_id, + password=password, + username=username, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + job_agent_id: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if job_agent_id is None and 'jobAgentId' in kwargs: + job_agent_id = kwargs['jobAgentId'] + if job_agent_id is None: + raise TypeError("Missing 'job_agent_id' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + + _setter("job_agent_id", job_agent_id) + _setter("password", password) + _setter("username", username) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="jobAgentId") @@ -94,14 +119,33 @@ def __init__(__self__, *, :param pulumi.Input[str] password: The password part of the credential. :param pulumi.Input[str] username: The username part of the credential. """ + _JobCredentialState._configure( + lambda key, value: pulumi.set(__self__, key, value), + job_agent_id=job_agent_id, + name=name, + password=password, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + job_agent_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if job_agent_id is None and 'jobAgentId' in kwargs: + job_agent_id = kwargs['jobAgentId'] + if job_agent_id is not None: - pulumi.set(__self__, "job_agent_id", job_agent_id) + _setter("job_agent_id", job_agent_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="jobAgentId") @@ -259,6 +303,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + JobCredentialArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/managed_database.py b/sdk/python/pulumi_azure/mssql/managed_database.py index e083fd18d8..5a6afb3ffc 100644 --- a/sdk/python/pulumi_azure/mssql/managed_database.py +++ b/sdk/python/pulumi_azure/mssql/managed_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,13 +27,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Managed Database to create. Changing this forces a new resource to be created. :param pulumi.Input[int] short_term_retention_days: The backup retention period in days. This is how many days Point-in-Time Restore will be supported. """ - pulumi.set(__self__, "managed_instance_id", managed_instance_id) + ManagedDatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_instance_id=managed_instance_id, + long_term_retention_policy=long_term_retention_policy, + name=name, + short_term_retention_days=short_term_retention_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_instance_id: Optional[pulumi.Input[str]] = None, + long_term_retention_policy: Optional[pulumi.Input['ManagedDatabaseLongTermRetentionPolicyArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + short_term_retention_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_instance_id is None and 'managedInstanceId' in kwargs: + managed_instance_id = kwargs['managedInstanceId'] + if managed_instance_id is None: + raise TypeError("Missing 'managed_instance_id' argument") + if long_term_retention_policy is None and 'longTermRetentionPolicy' in kwargs: + long_term_retention_policy = kwargs['longTermRetentionPolicy'] + if short_term_retention_days is None and 'shortTermRetentionDays' in kwargs: + short_term_retention_days = kwargs['shortTermRetentionDays'] + + _setter("managed_instance_id", managed_instance_id) if long_term_retention_policy is not None: - pulumi.set(__self__, "long_term_retention_policy", long_term_retention_policy) + _setter("long_term_retention_policy", long_term_retention_policy) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if short_term_retention_days is not None: - pulumi.set(__self__, "short_term_retention_days", short_term_retention_days) + _setter("short_term_retention_days", short_term_retention_days) @property @pulumi.getter(name="managedInstanceId") @@ -98,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Managed Database to create. Changing this forces a new resource to be created. :param pulumi.Input[int] short_term_retention_days: The backup retention period in days. This is how many days Point-in-Time Restore will be supported. """ + _ManagedDatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + long_term_retention_policy=long_term_retention_policy, + managed_instance_id=managed_instance_id, + name=name, + short_term_retention_days=short_term_retention_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + long_term_retention_policy: Optional[pulumi.Input['ManagedDatabaseLongTermRetentionPolicyArgs']] = None, + managed_instance_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + short_term_retention_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if long_term_retention_policy is None and 'longTermRetentionPolicy' in kwargs: + long_term_retention_policy = kwargs['longTermRetentionPolicy'] + if managed_instance_id is None and 'managedInstanceId' in kwargs: + managed_instance_id = kwargs['managedInstanceId'] + if short_term_retention_days is None and 'shortTermRetentionDays' in kwargs: + short_term_retention_days = kwargs['shortTermRetentionDays'] + if long_term_retention_policy is not None: - pulumi.set(__self__, "long_term_retention_policy", long_term_retention_policy) + _setter("long_term_retention_policy", long_term_retention_policy) if managed_instance_id is not None: - pulumi.set(__self__, "managed_instance_id", managed_instance_id) + _setter("managed_instance_id", managed_instance_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if short_term_retention_days is not None: - pulumi.set(__self__, "short_term_retention_days", short_term_retention_days) + _setter("short_term_retention_days", short_term_retention_days) @property @pulumi.getter(name="longTermRetentionPolicy") @@ -267,6 +315,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedDatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -285,6 +337,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ManagedDatabaseArgs.__new__(ManagedDatabaseArgs) + if long_term_retention_policy is not None and not isinstance(long_term_retention_policy, ManagedDatabaseLongTermRetentionPolicyArgs): + long_term_retention_policy = long_term_retention_policy or {} + def _setter(key, value): + long_term_retention_policy[key] = value + ManagedDatabaseLongTermRetentionPolicyArgs._configure(_setter, **long_term_retention_policy) __props__.__dict__["long_term_retention_policy"] = long_term_retention_policy if managed_instance_id is None and not opts.urn: raise TypeError("Missing required property 'managed_instance_id'") diff --git a/sdk/python/pulumi_azure/mssql/managed_instance.py b/sdk/python/pulumi_azure/mssql/managed_instance.py index 5620d3d3a0..7b05cc057a 100644 --- a/sdk/python/pulumi_azure/mssql/managed_instance.py +++ b/sdk/python/pulumi_azure/mssql/managed_instance.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,38 +59,131 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] timezone_id: The TimeZone ID that the SQL Managed Instance will be operating in. Default value is `UTC`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "administrator_login", administrator_login) - pulumi.set(__self__, "administrator_login_password", administrator_login_password) - pulumi.set(__self__, "license_type", license_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "storage_size_in_gb", storage_size_in_gb) - pulumi.set(__self__, "subnet_id", subnet_id) - pulumi.set(__self__, "vcores", vcores) + ManagedInstanceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + license_type=license_type, + resource_group_name=resource_group_name, + sku_name=sku_name, + storage_size_in_gb=storage_size_in_gb, + subnet_id=subnet_id, + vcores=vcores, + collation=collation, + dns_zone_partner_id=dns_zone_partner_id, + identity=identity, + location=location, + maintenance_configuration_name=maintenance_configuration_name, + minimum_tls_version=minimum_tls_version, + name=name, + proxy_override=proxy_override, + public_data_endpoint_enabled=public_data_endpoint_enabled, + storage_account_type=storage_account_type, + tags=tags, + timezone_id=timezone_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + license_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storage_size_in_gb: Optional[pulumi.Input[int]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + vcores: Optional[pulumi.Input[int]] = None, + collation: Optional[pulumi.Input[str]] = None, + dns_zone_partner_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ManagedInstanceIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_configuration_name: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + proxy_override: Optional[pulumi.Input[str]] = None, + public_data_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timezone_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login is None: + raise TypeError("Missing 'administrator_login' argument") + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if administrator_login_password is None: + raise TypeError("Missing 'administrator_login_password' argument") + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if license_type is None: + raise TypeError("Missing 'license_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if storage_size_in_gb is None and 'storageSizeInGb' in kwargs: + storage_size_in_gb = kwargs['storageSizeInGb'] + if storage_size_in_gb is None: + raise TypeError("Missing 'storage_size_in_gb' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if vcores is None: + raise TypeError("Missing 'vcores' argument") + if dns_zone_partner_id is None and 'dnsZonePartnerId' in kwargs: + dns_zone_partner_id = kwargs['dnsZonePartnerId'] + if maintenance_configuration_name is None and 'maintenanceConfigurationName' in kwargs: + maintenance_configuration_name = kwargs['maintenanceConfigurationName'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if proxy_override is None and 'proxyOverride' in kwargs: + proxy_override = kwargs['proxyOverride'] + if public_data_endpoint_enabled is None and 'publicDataEndpointEnabled' in kwargs: + public_data_endpoint_enabled = kwargs['publicDataEndpointEnabled'] + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if timezone_id is None and 'timezoneId' in kwargs: + timezone_id = kwargs['timezoneId'] + + _setter("administrator_login", administrator_login) + _setter("administrator_login_password", administrator_login_password) + _setter("license_type", license_type) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("storage_size_in_gb", storage_size_in_gb) + _setter("subnet_id", subnet_id) + _setter("vcores", vcores) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if dns_zone_partner_id is not None: - pulumi.set(__self__, "dns_zone_partner_id", dns_zone_partner_id) + _setter("dns_zone_partner_id", dns_zone_partner_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_configuration_name is not None: - pulumi.set(__self__, "maintenance_configuration_name", maintenance_configuration_name) + _setter("maintenance_configuration_name", maintenance_configuration_name) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if proxy_override is not None: - pulumi.set(__self__, "proxy_override", proxy_override) + _setter("proxy_override", proxy_override) if public_data_endpoint_enabled is not None: - pulumi.set(__self__, "public_data_endpoint_enabled", public_data_endpoint_enabled) + _setter("public_data_endpoint_enabled", public_data_endpoint_enabled) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timezone_id is not None: - pulumi.set(__self__, "timezone_id", timezone_id) + _setter("timezone_id", timezone_id) @property @pulumi.getter(name="administratorLogin") @@ -381,48 +474,127 @@ def __init__(__self__, *, :param pulumi.Input[str] timezone_id: The TimeZone ID that the SQL Managed Instance will be operating in. Default value is `UTC`. Changing this forces a new resource to be created. :param pulumi.Input[int] vcores: Number of cores that should be assigned to the SQL Managed Instance. Values can be `8`, `16`, or `24` for Gen4 SKUs, or `4`, `8`, `16`, `24`, `32`, `40`, `64`, or `80` for Gen5 SKUs. """ + _ManagedInstanceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + collation=collation, + dns_zone_partner_id=dns_zone_partner_id, + fqdn=fqdn, + identity=identity, + license_type=license_type, + location=location, + maintenance_configuration_name=maintenance_configuration_name, + minimum_tls_version=minimum_tls_version, + name=name, + proxy_override=proxy_override, + public_data_endpoint_enabled=public_data_endpoint_enabled, + resource_group_name=resource_group_name, + sku_name=sku_name, + storage_account_type=storage_account_type, + storage_size_in_gb=storage_size_in_gb, + subnet_id=subnet_id, + tags=tags, + timezone_id=timezone_id, + vcores=vcores, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + dns_zone_partner_id: Optional[pulumi.Input[str]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ManagedInstanceIdentityArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_configuration_name: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + proxy_override: Optional[pulumi.Input[str]] = None, + public_data_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + storage_size_in_gb: Optional[pulumi.Input[int]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timezone_id: Optional[pulumi.Input[str]] = None, + vcores: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if dns_zone_partner_id is None and 'dnsZonePartnerId' in kwargs: + dns_zone_partner_id = kwargs['dnsZonePartnerId'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if maintenance_configuration_name is None and 'maintenanceConfigurationName' in kwargs: + maintenance_configuration_name = kwargs['maintenanceConfigurationName'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if proxy_override is None and 'proxyOverride' in kwargs: + proxy_override = kwargs['proxyOverride'] + if public_data_endpoint_enabled is None and 'publicDataEndpointEnabled' in kwargs: + public_data_endpoint_enabled = kwargs['publicDataEndpointEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_size_in_gb is None and 'storageSizeInGb' in kwargs: + storage_size_in_gb = kwargs['storageSizeInGb'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if timezone_id is None and 'timezoneId' in kwargs: + timezone_id = kwargs['timezoneId'] + if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_login_password is not None: - pulumi.set(__self__, "administrator_login_password", administrator_login_password) + _setter("administrator_login_password", administrator_login_password) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if dns_zone_partner_id is not None: - pulumi.set(__self__, "dns_zone_partner_id", dns_zone_partner_id) + _setter("dns_zone_partner_id", dns_zone_partner_id) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_configuration_name is not None: - pulumi.set(__self__, "maintenance_configuration_name", maintenance_configuration_name) + _setter("maintenance_configuration_name", maintenance_configuration_name) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if proxy_override is not None: - pulumi.set(__self__, "proxy_override", proxy_override) + _setter("proxy_override", proxy_override) if public_data_endpoint_enabled is not None: - pulumi.set(__self__, "public_data_endpoint_enabled", public_data_endpoint_enabled) + _setter("public_data_endpoint_enabled", public_data_endpoint_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) if storage_size_in_gb is not None: - pulumi.set(__self__, "storage_size_in_gb", storage_size_in_gb) + _setter("storage_size_in_gb", storage_size_in_gb) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timezone_id is not None: - pulumi.set(__self__, "timezone_id", timezone_id) + _setter("timezone_id", timezone_id) if vcores is not None: - pulumi.set(__self__, "vcores", vcores) + _setter("vcores", vcores) @property @pulumi.getter(name="administratorLogin") @@ -1076,6 +1248,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedInstanceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1118,6 +1294,11 @@ def _internal_init(__self__, __props__.__dict__["administrator_login_password"] = None if administrator_login_password is None else pulumi.Output.secret(administrator_login_password) __props__.__dict__["collation"] = collation __props__.__dict__["dns_zone_partner_id"] = dns_zone_partner_id + if identity is not None and not isinstance(identity, ManagedInstanceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ManagedInstanceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity if license_type is None and not opts.urn: raise TypeError("Missing required property 'license_type'") diff --git a/sdk/python/pulumi_azure/mssql/managed_instance_active_directory_administrator.py b/sdk/python/pulumi_azure/mssql/managed_instance_active_directory_administrator.py index e34225129f..6c188ee905 100644 --- a/sdk/python/pulumi_azure/mssql/managed_instance_active_directory_administrator.py +++ b/sdk/python/pulumi_azure/mssql/managed_instance_active_directory_administrator.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManagedInstanceActiveDirectoryAdministratorArgs', 'ManagedInstanceActiveDirectoryAdministrator'] @@ -27,12 +27,49 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The Azure Active Directory Tenant ID. :param pulumi.Input[bool] azuread_authentication_only: When `true`, only permit logins from AAD users and administrators. When `false`, also allow local database users. """ - pulumi.set(__self__, "login_username", login_username) - pulumi.set(__self__, "managed_instance_id", managed_instance_id) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "tenant_id", tenant_id) + ManagedInstanceActiveDirectoryAdministratorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login_username=login_username, + managed_instance_id=managed_instance_id, + object_id=object_id, + tenant_id=tenant_id, + azuread_authentication_only=azuread_authentication_only, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login_username: Optional[pulumi.Input[str]] = None, + managed_instance_id: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + azuread_authentication_only: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login_username is None and 'loginUsername' in kwargs: + login_username = kwargs['loginUsername'] + if login_username is None: + raise TypeError("Missing 'login_username' argument") + if managed_instance_id is None and 'managedInstanceId' in kwargs: + managed_instance_id = kwargs['managedInstanceId'] + if managed_instance_id is None: + raise TypeError("Missing 'managed_instance_id' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if azuread_authentication_only is None and 'azureadAuthenticationOnly' in kwargs: + azuread_authentication_only = kwargs['azureadAuthenticationOnly'] + + _setter("login_username", login_username) + _setter("managed_instance_id", managed_instance_id) + _setter("object_id", object_id) + _setter("tenant_id", tenant_id) if azuread_authentication_only is not None: - pulumi.set(__self__, "azuread_authentication_only", azuread_authentication_only) + _setter("azuread_authentication_only", azuread_authentication_only) @property @pulumi.getter(name="loginUsername") @@ -111,16 +148,45 @@ def __init__(__self__, *, :param pulumi.Input[str] object_id: The Object ID of the principal to set as the Managed Instance Administrator. :param pulumi.Input[str] tenant_id: The Azure Active Directory Tenant ID. """ + _ManagedInstanceActiveDirectoryAdministratorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + azuread_authentication_only=azuread_authentication_only, + login_username=login_username, + managed_instance_id=managed_instance_id, + object_id=object_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azuread_authentication_only: Optional[pulumi.Input[bool]] = None, + login_username: Optional[pulumi.Input[str]] = None, + managed_instance_id: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azuread_authentication_only is None and 'azureadAuthenticationOnly' in kwargs: + azuread_authentication_only = kwargs['azureadAuthenticationOnly'] + if login_username is None and 'loginUsername' in kwargs: + login_username = kwargs['loginUsername'] + if managed_instance_id is None and 'managedInstanceId' in kwargs: + managed_instance_id = kwargs['managedInstanceId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if azuread_authentication_only is not None: - pulumi.set(__self__, "azuread_authentication_only", azuread_authentication_only) + _setter("azuread_authentication_only", azuread_authentication_only) if login_username is not None: - pulumi.set(__self__, "login_username", login_username) + _setter("login_username", login_username) if managed_instance_id is not None: - pulumi.set(__self__, "managed_instance_id", managed_instance_id) + _setter("managed_instance_id", managed_instance_id) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="azureadAuthenticationOnly") @@ -332,6 +398,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedInstanceActiveDirectoryAdministratorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/managed_instance_failover_group.py b/sdk/python/pulumi_azure/mssql/managed_instance_failover_group.py index f028b5f439..1b9a18f56b 100644 --- a/sdk/python/pulumi_azure/mssql/managed_instance_failover_group.py +++ b/sdk/python/pulumi_azure/mssql/managed_instance_failover_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,15 +31,50 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Managed Instance Failover Group. Changing this forces a new resource to be created. :param pulumi.Input[bool] readonly_endpoint_failover_policy_enabled: Failover policy for the read-only endpoint. Defaults to `true`. """ - pulumi.set(__self__, "managed_instance_id", managed_instance_id) - pulumi.set(__self__, "partner_managed_instance_id", partner_managed_instance_id) - pulumi.set(__self__, "read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) + ManagedInstanceFailoverGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_instance_id=managed_instance_id, + partner_managed_instance_id=partner_managed_instance_id, + read_write_endpoint_failover_policy=read_write_endpoint_failover_policy, + location=location, + name=name, + readonly_endpoint_failover_policy_enabled=readonly_endpoint_failover_policy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_instance_id: Optional[pulumi.Input[str]] = None, + partner_managed_instance_id: Optional[pulumi.Input[str]] = None, + read_write_endpoint_failover_policy: Optional[pulumi.Input['ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + readonly_endpoint_failover_policy_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_instance_id is None and 'managedInstanceId' in kwargs: + managed_instance_id = kwargs['managedInstanceId'] + if managed_instance_id is None: + raise TypeError("Missing 'managed_instance_id' argument") + if partner_managed_instance_id is None and 'partnerManagedInstanceId' in kwargs: + partner_managed_instance_id = kwargs['partnerManagedInstanceId'] + if partner_managed_instance_id is None: + raise TypeError("Missing 'partner_managed_instance_id' argument") + if read_write_endpoint_failover_policy is None and 'readWriteEndpointFailoverPolicy' in kwargs: + read_write_endpoint_failover_policy = kwargs['readWriteEndpointFailoverPolicy'] + if read_write_endpoint_failover_policy is None: + raise TypeError("Missing 'read_write_endpoint_failover_policy' argument") + if readonly_endpoint_failover_policy_enabled is None and 'readonlyEndpointFailoverPolicyEnabled' in kwargs: + readonly_endpoint_failover_policy_enabled = kwargs['readonlyEndpointFailoverPolicyEnabled'] + + _setter("managed_instance_id", managed_instance_id) + _setter("partner_managed_instance_id", partner_managed_instance_id) + _setter("read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if readonly_endpoint_failover_policy_enabled is not None: - pulumi.set(__self__, "readonly_endpoint_failover_policy_enabled", readonly_endpoint_failover_policy_enabled) + _setter("readonly_endpoint_failover_policy_enabled", readonly_endpoint_failover_policy_enabled) @property @pulumi.getter(name="managedInstanceId") @@ -136,22 +171,57 @@ def __init__(__self__, *, :param pulumi.Input[bool] readonly_endpoint_failover_policy_enabled: Failover policy for the read-only endpoint. Defaults to `true`. :param pulumi.Input[str] role: The partner replication role of the Managed Instance Failover Group. """ + _ManagedInstanceFailoverGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + managed_instance_id=managed_instance_id, + name=name, + partner_managed_instance_id=partner_managed_instance_id, + partner_regions=partner_regions, + read_write_endpoint_failover_policy=read_write_endpoint_failover_policy, + readonly_endpoint_failover_policy_enabled=readonly_endpoint_failover_policy_enabled, + role=role, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + managed_instance_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partner_managed_instance_id: Optional[pulumi.Input[str]] = None, + partner_regions: Optional[pulumi.Input[Sequence[pulumi.Input['ManagedInstanceFailoverGroupPartnerRegionArgs']]]] = None, + read_write_endpoint_failover_policy: Optional[pulumi.Input['ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs']] = None, + readonly_endpoint_failover_policy_enabled: Optional[pulumi.Input[bool]] = None, + role: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_instance_id is None and 'managedInstanceId' in kwargs: + managed_instance_id = kwargs['managedInstanceId'] + if partner_managed_instance_id is None and 'partnerManagedInstanceId' in kwargs: + partner_managed_instance_id = kwargs['partnerManagedInstanceId'] + if partner_regions is None and 'partnerRegions' in kwargs: + partner_regions = kwargs['partnerRegions'] + if read_write_endpoint_failover_policy is None and 'readWriteEndpointFailoverPolicy' in kwargs: + read_write_endpoint_failover_policy = kwargs['readWriteEndpointFailoverPolicy'] + if readonly_endpoint_failover_policy_enabled is None and 'readonlyEndpointFailoverPolicyEnabled' in kwargs: + readonly_endpoint_failover_policy_enabled = kwargs['readonlyEndpointFailoverPolicyEnabled'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_instance_id is not None: - pulumi.set(__self__, "managed_instance_id", managed_instance_id) + _setter("managed_instance_id", managed_instance_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partner_managed_instance_id is not None: - pulumi.set(__self__, "partner_managed_instance_id", partner_managed_instance_id) + _setter("partner_managed_instance_id", partner_managed_instance_id) if partner_regions is not None: - pulumi.set(__self__, "partner_regions", partner_regions) + _setter("partner_regions", partner_regions) if read_write_endpoint_failover_policy is not None: - pulumi.set(__self__, "read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) + _setter("read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) if readonly_endpoint_failover_policy_enabled is not None: - pulumi.set(__self__, "readonly_endpoint_failover_policy_enabled", readonly_endpoint_failover_policy_enabled) + _setter("readonly_endpoint_failover_policy_enabled", readonly_endpoint_failover_policy_enabled) if role is not None: - pulumi.set(__self__, "role", role) + _setter("role", role) @property @pulumi.getter @@ -305,6 +375,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedInstanceFailoverGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -333,6 +407,11 @@ def _internal_init(__self__, if partner_managed_instance_id is None and not opts.urn: raise TypeError("Missing required property 'partner_managed_instance_id'") __props__.__dict__["partner_managed_instance_id"] = partner_managed_instance_id + if read_write_endpoint_failover_policy is not None and not isinstance(read_write_endpoint_failover_policy, ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs): + read_write_endpoint_failover_policy = read_write_endpoint_failover_policy or {} + def _setter(key, value): + read_write_endpoint_failover_policy[key] = value + ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs._configure(_setter, **read_write_endpoint_failover_policy) if read_write_endpoint_failover_policy is None and not opts.urn: raise TypeError("Missing required property 'read_write_endpoint_failover_policy'") __props__.__dict__["read_write_endpoint_failover_policy"] = read_write_endpoint_failover_policy diff --git a/sdk/python/pulumi_azure/mssql/managed_instance_security_alert_policy.py b/sdk/python/pulumi_azure/mssql/managed_instance_security_alert_policy.py index 1d42ad30fa..bc5bc310bb 100644 --- a/sdk/python/pulumi_azure/mssql/managed_instance_security_alert_policy.py +++ b/sdk/python/pulumi_azure/mssql/managed_instance_security_alert_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManagedInstanceSecurityAlertPolicyArgs', 'ManagedInstanceSecurityAlertPolicy'] @@ -37,22 +37,69 @@ def __init__(__self__, *, > **NOTE:** Please note that storage accounts configured with `shared_access_key_enabled = false` cannot be used to configure `mssql.ManagedInstanceSecurityAlertPolicy` with `storage_endpoint` for now. :param pulumi.Input[str] storage_endpoint: Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. """ - pulumi.set(__self__, "managed_instance_name", managed_instance_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ManagedInstanceSecurityAlertPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_instance_name=managed_instance_name, + resource_group_name=resource_group_name, + disabled_alerts=disabled_alerts, + email_account_admins_enabled=email_account_admins_enabled, + email_addresses=email_addresses, + enabled=enabled, + retention_days=retention_days, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_instance_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + disabled_alerts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_account_admins_enabled: Optional[pulumi.Input[bool]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + retention_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_instance_name is None and 'managedInstanceName' in kwargs: + managed_instance_name = kwargs['managedInstanceName'] + if managed_instance_name is None: + raise TypeError("Missing 'managed_instance_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins_enabled is None and 'emailAccountAdminsEnabled' in kwargs: + email_account_admins_enabled = kwargs['emailAccountAdminsEnabled'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + + _setter("managed_instance_name", managed_instance_name) + _setter("resource_group_name", resource_group_name) if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins_enabled is not None: - pulumi.set(__self__, "email_account_admins_enabled", email_account_admins_enabled) + _setter("email_account_admins_enabled", email_account_admins_enabled) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="managedInstanceName") @@ -191,24 +238,67 @@ def __init__(__self__, *, > **NOTE:** Please note that storage accounts configured with `shared_access_key_enabled = false` cannot be used to configure `mssql.ManagedInstanceSecurityAlertPolicy` with `storage_endpoint` for now. :param pulumi.Input[str] storage_endpoint: Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. """ + _ManagedInstanceSecurityAlertPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins_enabled=email_account_admins_enabled, + email_addresses=email_addresses, + enabled=enabled, + managed_instance_name=managed_instance_name, + resource_group_name=resource_group_name, + retention_days=retention_days, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_account_admins_enabled: Optional[pulumi.Input[bool]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + managed_instance_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins_enabled is None and 'emailAccountAdminsEnabled' in kwargs: + email_account_admins_enabled = kwargs['emailAccountAdminsEnabled'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if managed_instance_name is None and 'managedInstanceName' in kwargs: + managed_instance_name = kwargs['managedInstanceName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins_enabled is not None: - pulumi.set(__self__, "email_account_admins_enabled", email_account_admins_enabled) + _setter("email_account_admins_enabled", email_account_admins_enabled) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if managed_instance_name is not None: - pulumi.set(__self__, "managed_instance_name", managed_instance_name) + _setter("managed_instance_name", managed_instance_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") @@ -718,6 +808,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedInstanceSecurityAlertPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/managed_instance_transparent_data_encryption.py b/sdk/python/pulumi_azure/mssql/managed_instance_transparent_data_encryption.py index 14bae6e31b..4874a3c947 100644 --- a/sdk/python/pulumi_azure/mssql/managed_instance_transparent_data_encryption.py +++ b/sdk/python/pulumi_azure/mssql/managed_instance_transparent_data_encryption.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManagedInstanceTransparentDataEncryptionArgs', 'ManagedInstanceTransparentDataEncryption'] @@ -27,11 +27,34 @@ def __init__(__self__, *, > **NOTE:** If `managed_instance_id` denotes a secondary instance deployed for disaster recovery purposes, then the `key_vault_key_id` should be the same key used for the primary instance's transparent data encryption. Both primary and secondary instances should be encrypted with same key material. """ - pulumi.set(__self__, "managed_instance_id", managed_instance_id) + ManagedInstanceTransparentDataEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_instance_id=managed_instance_id, + auto_rotation_enabled=auto_rotation_enabled, + key_vault_key_id=key_vault_key_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_instance_id: Optional[pulumi.Input[str]] = None, + auto_rotation_enabled: Optional[pulumi.Input[bool]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_instance_id is None and 'managedInstanceId' in kwargs: + managed_instance_id = kwargs['managedInstanceId'] + if managed_instance_id is None: + raise TypeError("Missing 'managed_instance_id' argument") + if auto_rotation_enabled is None and 'autoRotationEnabled' in kwargs: + auto_rotation_enabled = kwargs['autoRotationEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + + _setter("managed_instance_id", managed_instance_id) if auto_rotation_enabled is not None: - pulumi.set(__self__, "auto_rotation_enabled", auto_rotation_enabled) + _setter("auto_rotation_enabled", auto_rotation_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) @property @pulumi.getter(name="managedInstanceId") @@ -90,12 +113,33 @@ def __init__(__self__, *, > **NOTE:** If `managed_instance_id` denotes a secondary instance deployed for disaster recovery purposes, then the `key_vault_key_id` should be the same key used for the primary instance's transparent data encryption. Both primary and secondary instances should be encrypted with same key material. :param pulumi.Input[str] managed_instance_id: Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created. """ + _ManagedInstanceTransparentDataEncryptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_rotation_enabled=auto_rotation_enabled, + key_vault_key_id=key_vault_key_id, + managed_instance_id=managed_instance_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_rotation_enabled: Optional[pulumi.Input[bool]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + managed_instance_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_rotation_enabled is None and 'autoRotationEnabled' in kwargs: + auto_rotation_enabled = kwargs['autoRotationEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if managed_instance_id is None and 'managedInstanceId' in kwargs: + managed_instance_id = kwargs['managedInstanceId'] + if auto_rotation_enabled is not None: - pulumi.set(__self__, "auto_rotation_enabled", auto_rotation_enabled) + _setter("auto_rotation_enabled", auto_rotation_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if managed_instance_id is not None: - pulumi.set(__self__, "managed_instance_id", managed_instance_id) + _setter("managed_instance_id", managed_instance_id) @property @pulumi.getter(name="autoRotationEnabled") @@ -463,6 +507,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedInstanceTransparentDataEncryptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/managed_instance_vulnerability_assessment.py b/sdk/python/pulumi_azure/mssql/managed_instance_vulnerability_assessment.py index 4a6ae2f99b..5744b5fad0 100644 --- a/sdk/python/pulumi_azure/mssql/managed_instance_vulnerability_assessment.py +++ b/sdk/python/pulumi_azure/mssql/managed_instance_vulnerability_assessment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,14 +33,47 @@ def __init__(__self__, *, > **NOTE** The `storage_container_sas_key` only applies if the storage account is not behind a virtual network or a firewall. """ - pulumi.set(__self__, "managed_instance_id", managed_instance_id) - pulumi.set(__self__, "storage_container_path", storage_container_path) + ManagedInstanceVulnerabilityAssessmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_instance_id=managed_instance_id, + storage_container_path=storage_container_path, + recurring_scans=recurring_scans, + storage_account_access_key=storage_account_access_key, + storage_container_sas_key=storage_container_sas_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_instance_id: Optional[pulumi.Input[str]] = None, + storage_container_path: Optional[pulumi.Input[str]] = None, + recurring_scans: Optional[pulumi.Input['ManagedInstanceVulnerabilityAssessmentRecurringScansArgs']] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_container_sas_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_instance_id is None and 'managedInstanceId' in kwargs: + managed_instance_id = kwargs['managedInstanceId'] + if managed_instance_id is None: + raise TypeError("Missing 'managed_instance_id' argument") + if storage_container_path is None and 'storageContainerPath' in kwargs: + storage_container_path = kwargs['storageContainerPath'] + if storage_container_path is None: + raise TypeError("Missing 'storage_container_path' argument") + if recurring_scans is None and 'recurringScans' in kwargs: + recurring_scans = kwargs['recurringScans'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_container_sas_key is None and 'storageContainerSasKey' in kwargs: + storage_container_sas_key = kwargs['storageContainerSasKey'] + + _setter("managed_instance_id", managed_instance_id) + _setter("storage_container_path", storage_container_path) if recurring_scans is not None: - pulumi.set(__self__, "recurring_scans", recurring_scans) + _setter("recurring_scans", recurring_scans) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_container_sas_key is not None: - pulumi.set(__self__, "storage_container_sas_key", storage_container_sas_key) + _setter("storage_container_sas_key", storage_container_sas_key) @property @pulumi.getter(name="managedInstanceId") @@ -127,16 +160,45 @@ def __init__(__self__, *, > **NOTE** The `storage_container_sas_key` only applies if the storage account is not behind a virtual network or a firewall. """ + _ManagedInstanceVulnerabilityAssessmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_instance_id=managed_instance_id, + recurring_scans=recurring_scans, + storage_account_access_key=storage_account_access_key, + storage_container_path=storage_container_path, + storage_container_sas_key=storage_container_sas_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_instance_id: Optional[pulumi.Input[str]] = None, + recurring_scans: Optional[pulumi.Input['ManagedInstanceVulnerabilityAssessmentRecurringScansArgs']] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_container_path: Optional[pulumi.Input[str]] = None, + storage_container_sas_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_instance_id is None and 'managedInstanceId' in kwargs: + managed_instance_id = kwargs['managedInstanceId'] + if recurring_scans is None and 'recurringScans' in kwargs: + recurring_scans = kwargs['recurringScans'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_container_path is None and 'storageContainerPath' in kwargs: + storage_container_path = kwargs['storageContainerPath'] + if storage_container_sas_key is None and 'storageContainerSasKey' in kwargs: + storage_container_sas_key = kwargs['storageContainerSasKey'] + if managed_instance_id is not None: - pulumi.set(__self__, "managed_instance_id", managed_instance_id) + _setter("managed_instance_id", managed_instance_id) if recurring_scans is not None: - pulumi.set(__self__, "recurring_scans", recurring_scans) + _setter("recurring_scans", recurring_scans) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_container_path is not None: - pulumi.set(__self__, "storage_container_path", storage_container_path) + _setter("storage_container_path", storage_container_path) if storage_container_sas_key is not None: - pulumi.set(__self__, "storage_container_sas_key", storage_container_sas_key) + _setter("storage_container_sas_key", storage_container_sas_key) @property @pulumi.getter(name="managedInstanceId") @@ -374,6 +436,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedInstanceVulnerabilityAssessmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -396,6 +462,11 @@ def _internal_init(__self__, if managed_instance_id is None and not opts.urn: raise TypeError("Missing required property 'managed_instance_id'") __props__.__dict__["managed_instance_id"] = managed_instance_id + if recurring_scans is not None and not isinstance(recurring_scans, ManagedInstanceVulnerabilityAssessmentRecurringScansArgs): + recurring_scans = recurring_scans or {} + def _setter(key, value): + recurring_scans[key] = value + ManagedInstanceVulnerabilityAssessmentRecurringScansArgs._configure(_setter, **recurring_scans) __props__.__dict__["recurring_scans"] = recurring_scans __props__.__dict__["storage_account_access_key"] = None if storage_account_access_key is None else pulumi.Output.secret(storage_account_access_key) if storage_container_path is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/mssql/outbound_firewall_rule.py b/sdk/python/pulumi_azure/mssql/outbound_firewall_rule.py index f1ed3bd04a..43bd6fef85 100644 --- a/sdk/python/pulumi_azure/mssql/outbound_firewall_rule.py +++ b/sdk/python/pulumi_azure/mssql/outbound_firewall_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['OutboundFirewallRuleArgs', 'OutboundFirewallRule'] @@ -21,9 +21,26 @@ def __init__(__self__, *, :param pulumi.Input[str] server_id: The resource ID of the SQL Server on which to create the Outbound Firewall Rule. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the outbound firewall rule. This should be a FQDN. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "server_id", server_id) + OutboundFirewallRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + server_id=server_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + + _setter("server_id", server_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="serverId") @@ -60,10 +77,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the outbound firewall rule. This should be a FQDN. Changing this forces a new resource to be created. :param pulumi.Input[str] server_id: The resource ID of the SQL Server on which to create the Outbound Firewall Rule. Changing this forces a new resource to be created. """ + _OutboundFirewallRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + server_id=server_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) @property @pulumi.getter @@ -175,6 +207,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OutboundFirewallRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/outputs.py b/sdk/python/pulumi_azure/mssql/outputs.py index b8f3609d2f..8a771e51b6 100644 --- a/sdk/python/pulumi_azure/mssql/outputs.py +++ b/sdk/python/pulumi_azure/mssql/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -97,14 +97,63 @@ def __init__(__self__, *, :param str storage_uri: Specifies the blob URI of the .bacpac file. :param str storage_account_id: The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter. """ - pulumi.set(__self__, "administrator_login", administrator_login) - pulumi.set(__self__, "administrator_login_password", administrator_login_password) - pulumi.set(__self__, "authentication_type", authentication_type) - pulumi.set(__self__, "storage_key", storage_key) - pulumi.set(__self__, "storage_key_type", storage_key_type) - pulumi.set(__self__, "storage_uri", storage_uri) + DatabaseImport._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + authentication_type=authentication_type, + storage_key=storage_key, + storage_key_type=storage_key_type, + storage_uri=storage_uri, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[str] = None, + administrator_login_password: Optional[str] = None, + authentication_type: Optional[str] = None, + storage_key: Optional[str] = None, + storage_key_type: Optional[str] = None, + storage_uri: Optional[str] = None, + storage_account_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login is None: + raise TypeError("Missing 'administrator_login' argument") + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if administrator_login_password is None: + raise TypeError("Missing 'administrator_login_password' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if authentication_type is None: + raise TypeError("Missing 'authentication_type' argument") + if storage_key is None and 'storageKey' in kwargs: + storage_key = kwargs['storageKey'] + if storage_key is None: + raise TypeError("Missing 'storage_key' argument") + if storage_key_type is None and 'storageKeyType' in kwargs: + storage_key_type = kwargs['storageKeyType'] + if storage_key_type is None: + raise TypeError("Missing 'storage_key_type' argument") + if storage_uri is None and 'storageUri' in kwargs: + storage_uri = kwargs['storageUri'] + if storage_uri is None: + raise TypeError("Missing 'storage_uri' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + + _setter("administrator_login", administrator_login) + _setter("administrator_login_password", administrator_login_password) + _setter("authentication_type", authentication_type) + _setter("storage_key", storage_key) + _setter("storage_key_type", storage_key_type) + _setter("storage_uri", storage_uri) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="administratorLogin") @@ -199,14 +248,39 @@ def __init__(__self__, *, :param str weekly_retention: The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. `P1Y`, `P1M`, `P1W` or `P7D`. :param str yearly_retention: The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. `P1Y`, `P12M`, `P52W` or `P365D`. """ + DatabaseLongTermRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + monthly_retention=monthly_retention, + week_of_year=week_of_year, + weekly_retention=weekly_retention, + yearly_retention=yearly_retention, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + monthly_retention: Optional[str] = None, + week_of_year: Optional[int] = None, + weekly_retention: Optional[str] = None, + yearly_retention: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if monthly_retention is None and 'monthlyRetention' in kwargs: + monthly_retention = kwargs['monthlyRetention'] + if week_of_year is None and 'weekOfYear' in kwargs: + week_of_year = kwargs['weekOfYear'] + if weekly_retention is None and 'weeklyRetention' in kwargs: + weekly_retention = kwargs['weeklyRetention'] + if yearly_retention is None and 'yearlyRetention' in kwargs: + yearly_retention = kwargs['yearlyRetention'] + if monthly_retention is not None: - pulumi.set(__self__, "monthly_retention", monthly_retention) + _setter("monthly_retention", monthly_retention) if week_of_year is not None: - pulumi.set(__self__, "week_of_year", week_of_year) + _setter("week_of_year", week_of_year) if weekly_retention is not None: - pulumi.set(__self__, "weekly_retention", weekly_retention) + _setter("weekly_retention", weekly_retention) if yearly_retention is not None: - pulumi.set(__self__, "yearly_retention", yearly_retention) + _setter("yearly_retention", yearly_retention) @property @pulumi.getter(name="monthlyRetention") @@ -269,9 +343,28 @@ def __init__(__self__, *, :param int retention_days: Point In Time Restore configuration. Value has to be between `1` and `35`. :param int backup_interval_in_hours: The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be `12` or `24`. Defaults to `12` hours. """ - pulumi.set(__self__, "retention_days", retention_days) + DatabaseShortTermRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_days=retention_days, + backup_interval_in_hours=backup_interval_in_hours, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_days: Optional[int] = None, + backup_interval_in_hours: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if retention_days is None: + raise TypeError("Missing 'retention_days' argument") + if backup_interval_in_hours is None and 'backupIntervalInHours' in kwargs: + backup_interval_in_hours = kwargs['backupIntervalInHours'] + + _setter("retention_days", retention_days) if backup_interval_in_hours is not None: - pulumi.set(__self__, "backup_interval_in_hours", backup_interval_in_hours) + _setter("backup_interval_in_hours", backup_interval_in_hours) @property @pulumi.getter(name="retentionDays") @@ -336,20 +429,55 @@ def __init__(__self__, *, :param str storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. Required if `state` is `Enabled`. :param str storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. Required if `state` is `Enabled`. """ + DatabaseThreatDetectionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins=email_account_admins, + email_addresses=email_addresses, + retention_days=retention_days, + state=state, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[Sequence[str]] = None, + email_account_admins: Optional[str] = None, + email_addresses: Optional[Sequence[str]] = None, + retention_days: Optional[int] = None, + state: Optional[str] = None, + storage_account_access_key: Optional[str] = None, + storage_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins is None and 'emailAccountAdmins' in kwargs: + email_account_admins = kwargs['emailAccountAdmins'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins is not None: - pulumi.set(__self__, "email_account_admins", email_account_admins) + _setter("email_account_admins", email_account_admins) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") @@ -415,7 +543,20 @@ def __init__(__self__, *, """ :param Sequence[str] results: A list representing a result of the baseline. """ - pulumi.set(__self__, "results", results) + DatabaseVulnerabilityAssessmentRuleBaselineBaselineResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + results=results, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + results: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if results is None: + raise TypeError("Missing 'results' argument") + + _setter("results", results) @property @pulumi.getter @@ -454,8 +595,29 @@ def __init__(__self__, *, :param float max_capacity: The maximum capacity any one database can consume. :param float min_capacity: The minimum capacity all databases are guaranteed. """ - pulumi.set(__self__, "max_capacity", max_capacity) - pulumi.set(__self__, "min_capacity", min_capacity) + ElasticPoolPerDatabaseSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_capacity=max_capacity, + min_capacity=min_capacity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_capacity: Optional[float] = None, + min_capacity: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_capacity is None and 'maxCapacity' in kwargs: + max_capacity = kwargs['maxCapacity'] + if max_capacity is None: + raise TypeError("Missing 'max_capacity' argument") + if min_capacity is None and 'minCapacity' in kwargs: + min_capacity = kwargs['minCapacity'] + if min_capacity is None: + raise TypeError("Missing 'min_capacity' argument") + + _setter("max_capacity", max_capacity) + _setter("min_capacity", min_capacity) @property @pulumi.getter(name="maxCapacity") @@ -487,11 +649,34 @@ def __init__(__self__, *, :param str tier: The tier of the particular SKU. Possible values are `GeneralPurpose`, `BusinessCritical`, `Basic`, `Standard`, `Premium`, or `HyperScale`. For more information see the documentation for your Elasticpool configuration: [vCore-based](https://docs.microsoft.com/azure/sql-database/sql-database-vcore-resource-limits-elastic-pools) or [DTU-based](https://docs.microsoft.com/azure/sql-database/sql-database-dtu-resource-limits-elastic-pools). :param str family: The `family` of hardware `Gen4`, `Gen5`, `Fsv2` or `DC`. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "tier", tier) + ElasticPoolSku._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + tier=tier, + family=family, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + name: Optional[str] = None, + tier: Optional[str] = None, + family: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("capacity", capacity) + _setter("name", name) + _setter("tier", tier) if family is not None: - pulumi.set(__self__, "family", family) + _setter("family", family) @property @pulumi.getter @@ -537,11 +722,28 @@ def __init__(__self__, *, :param str location: The location of the partner server. :param str role: The replication role of the partner server. Possible values include `Primary` or `Secondary`. """ - pulumi.set(__self__, "id", id) + FailoverGroupPartnerServer._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + location=location, + role=role, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + location: Optional[str] = None, + role: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("id", id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if role is not None: - pulumi.set(__self__, "role", role) + _setter("role", role) @property @pulumi.getter @@ -594,9 +796,26 @@ def __init__(__self__, *, :param str mode: The failover policy of the read-write endpoint for the failover group. Possible values are `Automatic` or `Manual`. :param int grace_minutes: The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when `mode` is `Automatic`. """ - pulumi.set(__self__, "mode", mode) + FailoverGroupReadWriteEndpointFailoverPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + grace_minutes=grace_minutes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + grace_minutes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if grace_minutes is None and 'graceMinutes' in kwargs: + grace_minutes = kwargs['graceMinutes'] + + _setter("mode", mode) if grace_minutes is not None: - pulumi.set(__self__, "grace_minutes", grace_minutes) + _setter("grace_minutes", grace_minutes) @property @pulumi.getter @@ -651,14 +870,39 @@ def __init__(__self__, *, :param str weekly_retention: The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. `P1Y`, `P1M`, `P1W` or `P7D`. :param str yearly_retention: The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. `P1Y`, `P12M`, `P52W` or `P365D`. """ + ManagedDatabaseLongTermRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + monthly_retention=monthly_retention, + week_of_year=week_of_year, + weekly_retention=weekly_retention, + yearly_retention=yearly_retention, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + monthly_retention: Optional[str] = None, + week_of_year: Optional[int] = None, + weekly_retention: Optional[str] = None, + yearly_retention: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if monthly_retention is None and 'monthlyRetention' in kwargs: + monthly_retention = kwargs['monthlyRetention'] + if week_of_year is None and 'weekOfYear' in kwargs: + week_of_year = kwargs['weekOfYear'] + if weekly_retention is None and 'weeklyRetention' in kwargs: + weekly_retention = kwargs['weeklyRetention'] + if yearly_retention is None and 'yearlyRetention' in kwargs: + yearly_retention = kwargs['yearlyRetention'] + if monthly_retention is not None: - pulumi.set(__self__, "monthly_retention", monthly_retention) + _setter("monthly_retention", monthly_retention) if week_of_year is not None: - pulumi.set(__self__, "week_of_year", week_of_year) + _setter("week_of_year", week_of_year) if weekly_retention is not None: - pulumi.set(__self__, "weekly_retention", weekly_retention) + _setter("weekly_retention", weekly_retention) if yearly_retention is not None: - pulumi.set(__self__, "yearly_retention", yearly_retention) + _setter("yearly_retention", yearly_retention) @property @pulumi.getter(name="monthlyRetention") @@ -702,10 +946,23 @@ def __init__(__self__, *, :param str location: The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created. :param str role: The partner replication role of the Managed Instance Failover Group. """ + ManagedInstanceFailoverGroupPartnerRegion._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + role=role, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[str] = None, + role: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if role is not None: - pulumi.set(__self__, "role", role) + _setter("role", role) @property @pulumi.getter @@ -750,9 +1007,26 @@ def __init__(__self__, *, :param str mode: The failover mode. Possible values are `Automatic` or `Manual`. :param int grace_minutes: Applies only if `mode` is `Automatic`. The grace period in minutes before failover with data loss is attempted. """ - pulumi.set(__self__, "mode", mode) + ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + grace_minutes=grace_minutes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + grace_minutes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if grace_minutes is None and 'graceMinutes' in kwargs: + grace_minutes = kwargs['graceMinutes'] + + _setter("mode", mode) if grace_minutes is not None: - pulumi.set(__self__, "grace_minutes", grace_minutes) + _setter("grace_minutes", grace_minutes) @property @pulumi.getter @@ -807,13 +1081,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance. :param str tenant_id: The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance. """ - pulumi.set(__self__, "type", type) + ManagedInstanceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -878,12 +1177,29 @@ def __init__(__self__, *, :param Sequence[str] emails: Specifies an array of e-mail addresses to which the scan notification is sent. :param bool enabled: Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to `false`. """ + ManagedInstanceVulnerabilityAssessmentRecurringScans._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_subscription_admins=email_subscription_admins, + emails=emails, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_subscription_admins: Optional[bool] = None, + emails: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_subscription_admins is None and 'emailSubscriptionAdmins' in kwargs: + email_subscription_admins = kwargs['emailSubscriptionAdmins'] + if email_subscription_admins is not None: - pulumi.set(__self__, "email_subscription_admins", email_subscription_admins) + _setter("email_subscription_admins", email_subscription_admins) if emails is not None: - pulumi.set(__self__, "emails", emails) + _setter("emails", emails) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="emailSubscriptionAdmins") @@ -946,12 +1262,41 @@ def __init__(__self__, *, :param bool azuread_authentication_only: Specifies whether only AD Users and administrators (e.g. `azuread_administrator.0.login_username`) can be used to login, or also local database users (e.g. `administrator_login`). When `true`, the `administrator_login` and `administrator_login_password` properties can be omitted. :param str tenant_id: The tenant id of the Azure AD Administrator of this SQL Server. """ - pulumi.set(__self__, "login_username", login_username) - pulumi.set(__self__, "object_id", object_id) + ServerAzureadAdministrator._configure( + lambda key, value: pulumi.set(__self__, key, value), + login_username=login_username, + object_id=object_id, + azuread_authentication_only=azuread_authentication_only, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login_username: Optional[str] = None, + object_id: Optional[str] = None, + azuread_authentication_only: Optional[bool] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login_username is None and 'loginUsername' in kwargs: + login_username = kwargs['loginUsername'] + if login_username is None: + raise TypeError("Missing 'login_username' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if azuread_authentication_only is None and 'azureadAuthenticationOnly' in kwargs: + azuread_authentication_only = kwargs['azureadAuthenticationOnly'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("login_username", login_username) + _setter("object_id", object_id) if azuread_authentication_only is not None: - pulumi.set(__self__, "azuread_authentication_only", azuread_authentication_only) + _setter("azuread_authentication_only", azuread_authentication_only) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="loginUsername") @@ -1024,13 +1369,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Identity of this SQL Server. :param str tenant_id: The tenant id of the Azure AD Administrator of this SQL Server. """ - pulumi.set(__self__, "type", type) + ServerIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -1097,12 +1467,29 @@ def __init__(__self__, *, :param Sequence[str] emails: Specifies an array of email addresses to which the scan notification is sent. :param bool enabled: Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to `false`. """ + ServerVulnerabilityAssessmentRecurringScans._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_subscription_admins=email_subscription_admins, + emails=emails, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_subscription_admins: Optional[bool] = None, + emails: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_subscription_admins is None and 'emailSubscriptionAdmins' in kwargs: + email_subscription_admins = kwargs['emailSubscriptionAdmins'] + if email_subscription_admins is not None: - pulumi.set(__self__, "email_subscription_admins", email_subscription_admins) + _setter("email_subscription_admins", email_subscription_admins) if emails is not None: - pulumi.set(__self__, "emails", emails) + _setter("emails", emails) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="emailSubscriptionAdmins") @@ -1157,12 +1544,29 @@ def __init__(__self__, *, :param bool run_immediately: Should Assessment be run immediately? Defaults to `false`. :param 'VirtualMachineAssessmentScheduleArgs' schedule: An `schedule` block as defined below. """ + VirtualMachineAssessment._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + run_immediately=run_immediately, + schedule=schedule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + run_immediately: Optional[bool] = None, + schedule: Optional['outputs.VirtualMachineAssessmentSchedule'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if run_immediately is None and 'runImmediately' in kwargs: + run_immediately = kwargs['runImmediately'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if run_immediately is not None: - pulumi.set(__self__, "run_immediately", run_immediately) + _setter("run_immediately", run_immediately) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) @property @pulumi.getter @@ -1227,12 +1631,41 @@ def __init__(__self__, *, > **NOTE:** Either one of `weekly_interval` or `monthly_occurrence` must be specified. :param int weekly_interval: How many weeks between assessment runs. Valid values are between `1` and `6`. """ - pulumi.set(__self__, "day_of_week", day_of_week) - pulumi.set(__self__, "start_time", start_time) + VirtualMachineAssessmentSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + start_time=start_time, + monthly_occurrence=monthly_occurrence, + weekly_interval=weekly_interval, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[str] = None, + start_time: Optional[str] = None, + monthly_occurrence: Optional[int] = None, + weekly_interval: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if day_of_week is None: + raise TypeError("Missing 'day_of_week' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if start_time is None: + raise TypeError("Missing 'start_time' argument") + if monthly_occurrence is None and 'monthlyOccurrence' in kwargs: + monthly_occurrence = kwargs['monthlyOccurrence'] + if weekly_interval is None and 'weeklyInterval' in kwargs: + weekly_interval = kwargs['weeklyInterval'] + + _setter("day_of_week", day_of_week) + _setter("start_time", start_time) if monthly_occurrence is not None: - pulumi.set(__self__, "monthly_occurrence", monthly_occurrence) + _setter("monthly_occurrence", monthly_occurrence) if weekly_interval is not None: - pulumi.set(__self__, "weekly_interval", weekly_interval) + _setter("weekly_interval", weekly_interval) @property @pulumi.getter(name="dayOfWeek") @@ -1317,17 +1750,60 @@ def __init__(__self__, *, :param 'VirtualMachineAutoBackupManualScheduleArgs' manual_schedule: A `manual_schedule` block as documented below. When this block is present, the schedule type is set to `Manual`. Without this block, the schedule type is set to `Automated`. :param bool system_databases_backup_enabled: Include or exclude system databases from auto backup. """ - pulumi.set(__self__, "retention_period_in_days", retention_period_in_days) - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) - pulumi.set(__self__, "storage_blob_endpoint", storage_blob_endpoint) + VirtualMachineAutoBackup._configure( + lambda key, value: pulumi.set(__self__, key, value), + retention_period_in_days=retention_period_in_days, + storage_account_access_key=storage_account_access_key, + storage_blob_endpoint=storage_blob_endpoint, + encryption_enabled=encryption_enabled, + encryption_password=encryption_password, + manual_schedule=manual_schedule, + system_databases_backup_enabled=system_databases_backup_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + retention_period_in_days: Optional[int] = None, + storage_account_access_key: Optional[str] = None, + storage_blob_endpoint: Optional[str] = None, + encryption_enabled: Optional[bool] = None, + encryption_password: Optional[str] = None, + manual_schedule: Optional['outputs.VirtualMachineAutoBackupManualSchedule'] = None, + system_databases_backup_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if retention_period_in_days is None and 'retentionPeriodInDays' in kwargs: + retention_period_in_days = kwargs['retentionPeriodInDays'] + if retention_period_in_days is None: + raise TypeError("Missing 'retention_period_in_days' argument") + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key is None: + raise TypeError("Missing 'storage_account_access_key' argument") + if storage_blob_endpoint is None and 'storageBlobEndpoint' in kwargs: + storage_blob_endpoint = kwargs['storageBlobEndpoint'] + if storage_blob_endpoint is None: + raise TypeError("Missing 'storage_blob_endpoint' argument") + if encryption_enabled is None and 'encryptionEnabled' in kwargs: + encryption_enabled = kwargs['encryptionEnabled'] + if encryption_password is None and 'encryptionPassword' in kwargs: + encryption_password = kwargs['encryptionPassword'] + if manual_schedule is None and 'manualSchedule' in kwargs: + manual_schedule = kwargs['manualSchedule'] + if system_databases_backup_enabled is None and 'systemDatabasesBackupEnabled' in kwargs: + system_databases_backup_enabled = kwargs['systemDatabasesBackupEnabled'] + + _setter("retention_period_in_days", retention_period_in_days) + _setter("storage_account_access_key", storage_account_access_key) + _setter("storage_blob_endpoint", storage_blob_endpoint) if encryption_enabled is not None: - pulumi.set(__self__, "encryption_enabled", encryption_enabled) + _setter("encryption_enabled", encryption_enabled) if encryption_password is not None: - pulumi.set(__self__, "encryption_password", encryption_password) + _setter("encryption_password", encryption_password) if manual_schedule is not None: - pulumi.set(__self__, "manual_schedule", manual_schedule) + _setter("manual_schedule", manual_schedule) if system_databases_backup_enabled is not None: - pulumi.set(__self__, "system_databases_backup_enabled", system_databases_backup_enabled) + _setter("system_databases_backup_enabled", system_databases_backup_enabled) @property @pulumi.getter(name="retentionPeriodInDays") @@ -1428,12 +1904,49 @@ def __init__(__self__, *, > **NOTE:** `days_of_week` can only be specified when `manual_schedule` is set to `Weekly` """ - pulumi.set(__self__, "full_backup_frequency", full_backup_frequency) - pulumi.set(__self__, "full_backup_start_hour", full_backup_start_hour) - pulumi.set(__self__, "full_backup_window_in_hours", full_backup_window_in_hours) - pulumi.set(__self__, "log_backup_frequency_in_minutes", log_backup_frequency_in_minutes) + VirtualMachineAutoBackupManualSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + full_backup_frequency=full_backup_frequency, + full_backup_start_hour=full_backup_start_hour, + full_backup_window_in_hours=full_backup_window_in_hours, + log_backup_frequency_in_minutes=log_backup_frequency_in_minutes, + days_of_weeks=days_of_weeks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + full_backup_frequency: Optional[str] = None, + full_backup_start_hour: Optional[int] = None, + full_backup_window_in_hours: Optional[int] = None, + log_backup_frequency_in_minutes: Optional[int] = None, + days_of_weeks: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if full_backup_frequency is None and 'fullBackupFrequency' in kwargs: + full_backup_frequency = kwargs['fullBackupFrequency'] + if full_backup_frequency is None: + raise TypeError("Missing 'full_backup_frequency' argument") + if full_backup_start_hour is None and 'fullBackupStartHour' in kwargs: + full_backup_start_hour = kwargs['fullBackupStartHour'] + if full_backup_start_hour is None: + raise TypeError("Missing 'full_backup_start_hour' argument") + if full_backup_window_in_hours is None and 'fullBackupWindowInHours' in kwargs: + full_backup_window_in_hours = kwargs['fullBackupWindowInHours'] + if full_backup_window_in_hours is None: + raise TypeError("Missing 'full_backup_window_in_hours' argument") + if log_backup_frequency_in_minutes is None and 'logBackupFrequencyInMinutes' in kwargs: + log_backup_frequency_in_minutes = kwargs['logBackupFrequencyInMinutes'] + if log_backup_frequency_in_minutes is None: + raise TypeError("Missing 'log_backup_frequency_in_minutes' argument") + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + + _setter("full_backup_frequency", full_backup_frequency) + _setter("full_backup_start_hour", full_backup_start_hour) + _setter("full_backup_window_in_hours", full_backup_window_in_hours) + _setter("log_backup_frequency_in_minutes", log_backup_frequency_in_minutes) if days_of_weeks is not None: - pulumi.set(__self__, "days_of_weeks", days_of_weeks) + _setter("days_of_weeks", days_of_weeks) @property @pulumi.getter(name="fullBackupFrequency") @@ -1510,9 +2023,36 @@ def __init__(__self__, *, :param int maintenance_window_duration_in_minutes: The size of the Maintenance Window in minutes. :param int maintenance_window_starting_hour: The Hour, in the Virtual Machine Time-Zone when the patching maintenance window should begin. """ - pulumi.set(__self__, "day_of_week", day_of_week) - pulumi.set(__self__, "maintenance_window_duration_in_minutes", maintenance_window_duration_in_minutes) - pulumi.set(__self__, "maintenance_window_starting_hour", maintenance_window_starting_hour) + VirtualMachineAutoPatching._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + maintenance_window_duration_in_minutes=maintenance_window_duration_in_minutes, + maintenance_window_starting_hour=maintenance_window_starting_hour, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[str] = None, + maintenance_window_duration_in_minutes: Optional[int] = None, + maintenance_window_starting_hour: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if day_of_week is None: + raise TypeError("Missing 'day_of_week' argument") + if maintenance_window_duration_in_minutes is None and 'maintenanceWindowDurationInMinutes' in kwargs: + maintenance_window_duration_in_minutes = kwargs['maintenanceWindowDurationInMinutes'] + if maintenance_window_duration_in_minutes is None: + raise TypeError("Missing 'maintenance_window_duration_in_minutes' argument") + if maintenance_window_starting_hour is None and 'maintenanceWindowStartingHour' in kwargs: + maintenance_window_starting_hour = kwargs['maintenanceWindowStartingHour'] + if maintenance_window_starting_hour is None: + raise TypeError("Missing 'maintenance_window_starting_hour' argument") + + _setter("day_of_week", day_of_week) + _setter("maintenance_window_duration_in_minutes", maintenance_window_duration_in_minutes) + _setter("maintenance_window_starting_hour", maintenance_window_starting_hour) @property @pulumi.getter(name="dayOfWeek") @@ -1581,11 +2121,50 @@ def __init__(__self__, *, > **NOTE:** `sql_virtual_machine_ids` should match with the SQL Virtual Machines specified in `replica`. """ - pulumi.set(__self__, "load_balancer_id", load_balancer_id) - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "probe_port", probe_port) - pulumi.set(__self__, "sql_virtual_machine_ids", sql_virtual_machine_ids) - pulumi.set(__self__, "subnet_id", subnet_id) + VirtualMachineAvailabilityGroupListenerLoadBalancerConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + load_balancer_id=load_balancer_id, + private_ip_address=private_ip_address, + probe_port=probe_port, + sql_virtual_machine_ids=sql_virtual_machine_ids, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + load_balancer_id: Optional[str] = None, + private_ip_address: Optional[str] = None, + probe_port: Optional[int] = None, + sql_virtual_machine_ids: Optional[Sequence[str]] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if load_balancer_id is None and 'loadBalancerId' in kwargs: + load_balancer_id = kwargs['loadBalancerId'] + if load_balancer_id is None: + raise TypeError("Missing 'load_balancer_id' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if probe_port is None and 'probePort' in kwargs: + probe_port = kwargs['probePort'] + if probe_port is None: + raise TypeError("Missing 'probe_port' argument") + if sql_virtual_machine_ids is None and 'sqlVirtualMachineIds' in kwargs: + sql_virtual_machine_ids = kwargs['sqlVirtualMachineIds'] + if sql_virtual_machine_ids is None: + raise TypeError("Missing 'sql_virtual_machine_ids' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("load_balancer_id", load_balancer_id) + _setter("private_ip_address", private_ip_address) + _setter("probe_port", probe_port) + _setter("sql_virtual_machine_ids", sql_virtual_machine_ids) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="loadBalancerId") @@ -1664,9 +2243,36 @@ def __init__(__self__, *, > **NOTE:** `sql_virtual_machine_id` should match with the SQL Virtual Machines specified in `replica`. """ - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "sql_virtual_machine_id", sql_virtual_machine_id) - pulumi.set(__self__, "subnet_id", subnet_id) + VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_ip_address=private_ip_address, + sql_virtual_machine_id=sql_virtual_machine_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_ip_address: Optional[str] = None, + sql_virtual_machine_id: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if sql_virtual_machine_id is None and 'sqlVirtualMachineId' in kwargs: + sql_virtual_machine_id = kwargs['sqlVirtualMachineId'] + if sql_virtual_machine_id is None: + raise TypeError("Missing 'sql_virtual_machine_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("private_ip_address", private_ip_address) + _setter("sql_virtual_machine_id", sql_virtual_machine_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="privateIpAddress") @@ -1731,11 +2337,46 @@ def __init__(__self__, *, :param str role: The replica role for the availability group. Possible values are `Primary` and `Secondary`. Changing this forces a new resource to be created. :param str sql_virtual_machine_id: The ID of the SQL Virtual Machine. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "commit", commit) - pulumi.set(__self__, "failover_mode", failover_mode) - pulumi.set(__self__, "readable_secondary", readable_secondary) - pulumi.set(__self__, "role", role) - pulumi.set(__self__, "sql_virtual_machine_id", sql_virtual_machine_id) + VirtualMachineAvailabilityGroupListenerReplica._configure( + lambda key, value: pulumi.set(__self__, key, value), + commit=commit, + failover_mode=failover_mode, + readable_secondary=readable_secondary, + role=role, + sql_virtual_machine_id=sql_virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + commit: Optional[str] = None, + failover_mode: Optional[str] = None, + readable_secondary: Optional[str] = None, + role: Optional[str] = None, + sql_virtual_machine_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if commit is None: + raise TypeError("Missing 'commit' argument") + if failover_mode is None and 'failoverMode' in kwargs: + failover_mode = kwargs['failoverMode'] + if failover_mode is None: + raise TypeError("Missing 'failover_mode' argument") + if readable_secondary is None and 'readableSecondary' in kwargs: + readable_secondary = kwargs['readableSecondary'] + if readable_secondary is None: + raise TypeError("Missing 'readable_secondary' argument") + if role is None: + raise TypeError("Missing 'role' argument") + if sql_virtual_machine_id is None and 'sqlVirtualMachineId' in kwargs: + sql_virtual_machine_id = kwargs['sqlVirtualMachineId'] + if sql_virtual_machine_id is None: + raise TypeError("Missing 'sql_virtual_machine_id' argument") + + _setter("commit", commit) + _setter("failover_mode", failover_mode) + _setter("readable_secondary", readable_secondary) + _setter("role", role) + _setter("sql_virtual_machine_id", sql_virtual_machine_id) @property @pulumi.getter @@ -1828,20 +2469,63 @@ def __init__(__self__, *, :param str storage_account_primary_key: The primary key of the Storage Account. :param str storage_account_url: The SAS URL to the Storage Container of the witness storage account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "cluster_subnet_type", cluster_subnet_type) - pulumi.set(__self__, "fqdn", fqdn) + VirtualMachineGroupWsfcDomainProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_subnet_type=cluster_subnet_type, + fqdn=fqdn, + cluster_bootstrap_account_name=cluster_bootstrap_account_name, + cluster_operator_account_name=cluster_operator_account_name, + organizational_unit_path=organizational_unit_path, + sql_service_account_name=sql_service_account_name, + storage_account_primary_key=storage_account_primary_key, + storage_account_url=storage_account_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_subnet_type: Optional[str] = None, + fqdn: Optional[str] = None, + cluster_bootstrap_account_name: Optional[str] = None, + cluster_operator_account_name: Optional[str] = None, + organizational_unit_path: Optional[str] = None, + sql_service_account_name: Optional[str] = None, + storage_account_primary_key: Optional[str] = None, + storage_account_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_subnet_type is None and 'clusterSubnetType' in kwargs: + cluster_subnet_type = kwargs['clusterSubnetType'] + if cluster_subnet_type is None: + raise TypeError("Missing 'cluster_subnet_type' argument") + if fqdn is None: + raise TypeError("Missing 'fqdn' argument") + if cluster_bootstrap_account_name is None and 'clusterBootstrapAccountName' in kwargs: + cluster_bootstrap_account_name = kwargs['clusterBootstrapAccountName'] + if cluster_operator_account_name is None and 'clusterOperatorAccountName' in kwargs: + cluster_operator_account_name = kwargs['clusterOperatorAccountName'] + if organizational_unit_path is None and 'organizationalUnitPath' in kwargs: + organizational_unit_path = kwargs['organizationalUnitPath'] + if sql_service_account_name is None and 'sqlServiceAccountName' in kwargs: + sql_service_account_name = kwargs['sqlServiceAccountName'] + if storage_account_primary_key is None and 'storageAccountPrimaryKey' in kwargs: + storage_account_primary_key = kwargs['storageAccountPrimaryKey'] + if storage_account_url is None and 'storageAccountUrl' in kwargs: + storage_account_url = kwargs['storageAccountUrl'] + + _setter("cluster_subnet_type", cluster_subnet_type) + _setter("fqdn", fqdn) if cluster_bootstrap_account_name is not None: - pulumi.set(__self__, "cluster_bootstrap_account_name", cluster_bootstrap_account_name) + _setter("cluster_bootstrap_account_name", cluster_bootstrap_account_name) if cluster_operator_account_name is not None: - pulumi.set(__self__, "cluster_operator_account_name", cluster_operator_account_name) + _setter("cluster_operator_account_name", cluster_operator_account_name) if organizational_unit_path is not None: - pulumi.set(__self__, "organizational_unit_path", organizational_unit_path) + _setter("organizational_unit_path", organizational_unit_path) if sql_service_account_name is not None: - pulumi.set(__self__, "sql_service_account_name", sql_service_account_name) + _setter("sql_service_account_name", sql_service_account_name) if storage_account_primary_key is not None: - pulumi.set(__self__, "storage_account_primary_key", storage_account_primary_key) + _setter("storage_account_primary_key", storage_account_primary_key) if storage_account_url is not None: - pulumi.set(__self__, "storage_account_url", storage_account_url) + _setter("storage_account_url", storage_account_url) @property @pulumi.getter(name="clusterSubnetType") @@ -1942,10 +2626,41 @@ def __init__(__self__, *, :param str service_principal_name: The service principal name to access key vault. Changing this forces a new resource to be created. :param str service_principal_secret: The service principal name secret to access key vault. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "key_vault_url", key_vault_url) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "service_principal_name", service_principal_name) - pulumi.set(__self__, "service_principal_secret", service_principal_secret) + VirtualMachineKeyVaultCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_url=key_vault_url, + name=name, + service_principal_name=service_principal_name, + service_principal_secret=service_principal_secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_url: Optional[str] = None, + name: Optional[str] = None, + service_principal_name: Optional[str] = None, + service_principal_secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_url is None and 'keyVaultUrl' in kwargs: + key_vault_url = kwargs['keyVaultUrl'] + if key_vault_url is None: + raise TypeError("Missing 'key_vault_url' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if service_principal_name is None and 'servicePrincipalName' in kwargs: + service_principal_name = kwargs['servicePrincipalName'] + if service_principal_name is None: + raise TypeError("Missing 'service_principal_name' argument") + if service_principal_secret is None and 'servicePrincipalSecret' in kwargs: + service_principal_secret = kwargs['servicePrincipalSecret'] + if service_principal_secret is None: + raise TypeError("Missing 'service_principal_secret' argument") + + _setter("key_vault_url", key_vault_url) + _setter("name", name) + _setter("service_principal_name", service_principal_name) + _setter("service_principal_secret", service_principal_secret) @property @pulumi.getter(name="keyVaultUrl") @@ -2028,20 +2743,55 @@ def __init__(__self__, *, > **NOTE:** `max_server_memory_mb` must be greater than or equal to `min_server_memory_mb` """ + VirtualMachineSqlInstance._configure( + lambda key, value: pulumi.set(__self__, key, value), + adhoc_workloads_optimization_enabled=adhoc_workloads_optimization_enabled, + collation=collation, + instant_file_initialization_enabled=instant_file_initialization_enabled, + lock_pages_in_memory_enabled=lock_pages_in_memory_enabled, + max_dop=max_dop, + max_server_memory_mb=max_server_memory_mb, + min_server_memory_mb=min_server_memory_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + adhoc_workloads_optimization_enabled: Optional[bool] = None, + collation: Optional[str] = None, + instant_file_initialization_enabled: Optional[bool] = None, + lock_pages_in_memory_enabled: Optional[bool] = None, + max_dop: Optional[int] = None, + max_server_memory_mb: Optional[int] = None, + min_server_memory_mb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if adhoc_workloads_optimization_enabled is None and 'adhocWorkloadsOptimizationEnabled' in kwargs: + adhoc_workloads_optimization_enabled = kwargs['adhocWorkloadsOptimizationEnabled'] + if instant_file_initialization_enabled is None and 'instantFileInitializationEnabled' in kwargs: + instant_file_initialization_enabled = kwargs['instantFileInitializationEnabled'] + if lock_pages_in_memory_enabled is None and 'lockPagesInMemoryEnabled' in kwargs: + lock_pages_in_memory_enabled = kwargs['lockPagesInMemoryEnabled'] + if max_dop is None and 'maxDop' in kwargs: + max_dop = kwargs['maxDop'] + if max_server_memory_mb is None and 'maxServerMemoryMb' in kwargs: + max_server_memory_mb = kwargs['maxServerMemoryMb'] + if min_server_memory_mb is None and 'minServerMemoryMb' in kwargs: + min_server_memory_mb = kwargs['minServerMemoryMb'] + if adhoc_workloads_optimization_enabled is not None: - pulumi.set(__self__, "adhoc_workloads_optimization_enabled", adhoc_workloads_optimization_enabled) + _setter("adhoc_workloads_optimization_enabled", adhoc_workloads_optimization_enabled) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if instant_file_initialization_enabled is not None: - pulumi.set(__self__, "instant_file_initialization_enabled", instant_file_initialization_enabled) + _setter("instant_file_initialization_enabled", instant_file_initialization_enabled) if lock_pages_in_memory_enabled is not None: - pulumi.set(__self__, "lock_pages_in_memory_enabled", lock_pages_in_memory_enabled) + _setter("lock_pages_in_memory_enabled", lock_pages_in_memory_enabled) if max_dop is not None: - pulumi.set(__self__, "max_dop", max_dop) + _setter("max_dop", max_dop) if max_server_memory_mb is not None: - pulumi.set(__self__, "max_server_memory_mb", max_server_memory_mb) + _setter("max_server_memory_mb", max_server_memory_mb) if min_server_memory_mb is not None: - pulumi.set(__self__, "min_server_memory_mb", min_server_memory_mb) + _setter("min_server_memory_mb", min_server_memory_mb) @property @pulumi.getter(name="adhocWorkloadsOptimizationEnabled") @@ -2146,16 +2896,53 @@ def __init__(__self__, *, :param bool system_db_on_data_disk_enabled: Specifies whether to set system databases (except tempDb) location to newly created data storage. Possible values are `true` and `false`. Defaults to `false`. :param 'VirtualMachineStorageConfigurationTempDbSettingsArgs' temp_db_settings: An `temp_db_settings` as defined below. """ - pulumi.set(__self__, "disk_type", disk_type) - pulumi.set(__self__, "storage_workload_type", storage_workload_type) + VirtualMachineStorageConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_type=disk_type, + storage_workload_type=storage_workload_type, + data_settings=data_settings, + log_settings=log_settings, + system_db_on_data_disk_enabled=system_db_on_data_disk_enabled, + temp_db_settings=temp_db_settings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_type: Optional[str] = None, + storage_workload_type: Optional[str] = None, + data_settings: Optional['outputs.VirtualMachineStorageConfigurationDataSettings'] = None, + log_settings: Optional['outputs.VirtualMachineStorageConfigurationLogSettings'] = None, + system_db_on_data_disk_enabled: Optional[bool] = None, + temp_db_settings: Optional['outputs.VirtualMachineStorageConfigurationTempDbSettings'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_type is None and 'diskType' in kwargs: + disk_type = kwargs['diskType'] + if disk_type is None: + raise TypeError("Missing 'disk_type' argument") + if storage_workload_type is None and 'storageWorkloadType' in kwargs: + storage_workload_type = kwargs['storageWorkloadType'] + if storage_workload_type is None: + raise TypeError("Missing 'storage_workload_type' argument") + if data_settings is None and 'dataSettings' in kwargs: + data_settings = kwargs['dataSettings'] + if log_settings is None and 'logSettings' in kwargs: + log_settings = kwargs['logSettings'] + if system_db_on_data_disk_enabled is None and 'systemDbOnDataDiskEnabled' in kwargs: + system_db_on_data_disk_enabled = kwargs['systemDbOnDataDiskEnabled'] + if temp_db_settings is None and 'tempDbSettings' in kwargs: + temp_db_settings = kwargs['tempDbSettings'] + + _setter("disk_type", disk_type) + _setter("storage_workload_type", storage_workload_type) if data_settings is not None: - pulumi.set(__self__, "data_settings", data_settings) + _setter("data_settings", data_settings) if log_settings is not None: - pulumi.set(__self__, "log_settings", log_settings) + _setter("log_settings", log_settings) if system_db_on_data_disk_enabled is not None: - pulumi.set(__self__, "system_db_on_data_disk_enabled", system_db_on_data_disk_enabled) + _setter("system_db_on_data_disk_enabled", system_db_on_data_disk_enabled) if temp_db_settings is not None: - pulumi.set(__self__, "temp_db_settings", temp_db_settings) + _setter("temp_db_settings", temp_db_settings) @property @pulumi.getter(name="diskType") @@ -2232,8 +3019,27 @@ def __init__(__self__, *, :param str default_file_path: The SQL Server default path :param Sequence[int] luns: A list of Logical Unit Numbers for the disks. """ - pulumi.set(__self__, "default_file_path", default_file_path) - pulumi.set(__self__, "luns", luns) + VirtualMachineStorageConfigurationDataSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_file_path=default_file_path, + luns=luns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_file_path: Optional[str] = None, + luns: Optional[Sequence[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_file_path is None and 'defaultFilePath' in kwargs: + default_file_path = kwargs['defaultFilePath'] + if default_file_path is None: + raise TypeError("Missing 'default_file_path' argument") + if luns is None: + raise TypeError("Missing 'luns' argument") + + _setter("default_file_path", default_file_path) + _setter("luns", luns) @property @pulumi.getter(name="defaultFilePath") @@ -2278,8 +3084,27 @@ def __init__(__self__, *, :param str default_file_path: The SQL Server default path :param Sequence[int] luns: A list of Logical Unit Numbers for the disks. """ - pulumi.set(__self__, "default_file_path", default_file_path) - pulumi.set(__self__, "luns", luns) + VirtualMachineStorageConfigurationLogSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_file_path=default_file_path, + luns=luns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_file_path: Optional[str] = None, + luns: Optional[Sequence[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_file_path is None and 'defaultFilePath' in kwargs: + default_file_path = kwargs['defaultFilePath'] + if default_file_path is None: + raise TypeError("Missing 'default_file_path' argument") + if luns is None: + raise TypeError("Missing 'luns' argument") + + _setter("default_file_path", default_file_path) + _setter("luns", luns) @property @pulumi.getter(name="defaultFilePath") @@ -2344,18 +3169,57 @@ def __init__(__self__, *, :param int log_file_growth_mb: The SQL Server default file size - This value defaults to `512` :param int log_file_size_mb: The SQL Server default file size - This value defaults to `256` """ - pulumi.set(__self__, "default_file_path", default_file_path) - pulumi.set(__self__, "luns", luns) + VirtualMachineStorageConfigurationTempDbSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_file_path=default_file_path, + luns=luns, + data_file_count=data_file_count, + data_file_growth_in_mb=data_file_growth_in_mb, + data_file_size_mb=data_file_size_mb, + log_file_growth_mb=log_file_growth_mb, + log_file_size_mb=log_file_size_mb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_file_path: Optional[str] = None, + luns: Optional[Sequence[int]] = None, + data_file_count: Optional[int] = None, + data_file_growth_in_mb: Optional[int] = None, + data_file_size_mb: Optional[int] = None, + log_file_growth_mb: Optional[int] = None, + log_file_size_mb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_file_path is None and 'defaultFilePath' in kwargs: + default_file_path = kwargs['defaultFilePath'] + if default_file_path is None: + raise TypeError("Missing 'default_file_path' argument") + if luns is None: + raise TypeError("Missing 'luns' argument") + if data_file_count is None and 'dataFileCount' in kwargs: + data_file_count = kwargs['dataFileCount'] + if data_file_growth_in_mb is None and 'dataFileGrowthInMb' in kwargs: + data_file_growth_in_mb = kwargs['dataFileGrowthInMb'] + if data_file_size_mb is None and 'dataFileSizeMb' in kwargs: + data_file_size_mb = kwargs['dataFileSizeMb'] + if log_file_growth_mb is None and 'logFileGrowthMb' in kwargs: + log_file_growth_mb = kwargs['logFileGrowthMb'] + if log_file_size_mb is None and 'logFileSizeMb' in kwargs: + log_file_size_mb = kwargs['logFileSizeMb'] + + _setter("default_file_path", default_file_path) + _setter("luns", luns) if data_file_count is not None: - pulumi.set(__self__, "data_file_count", data_file_count) + _setter("data_file_count", data_file_count) if data_file_growth_in_mb is not None: - pulumi.set(__self__, "data_file_growth_in_mb", data_file_growth_in_mb) + _setter("data_file_growth_in_mb", data_file_growth_in_mb) if data_file_size_mb is not None: - pulumi.set(__self__, "data_file_size_mb", data_file_size_mb) + _setter("data_file_size_mb", data_file_size_mb) if log_file_growth_mb is not None: - pulumi.set(__self__, "log_file_growth_mb", log_file_growth_mb) + _setter("log_file_growth_mb", log_file_growth_mb) if log_file_size_mb is not None: - pulumi.set(__self__, "log_file_size_mb", log_file_size_mb) + _setter("log_file_size_mb", log_file_size_mb) @property @pulumi.getter(name="defaultFilePath") @@ -2446,9 +3310,36 @@ def __init__(__self__, *, :param str cluster_operator_account_password: The account password used for operating cluster. :param str sql_service_account_password: The account password under which SQL service will run on all participating SQL virtual machines in the cluster. """ - pulumi.set(__self__, "cluster_bootstrap_account_password", cluster_bootstrap_account_password) - pulumi.set(__self__, "cluster_operator_account_password", cluster_operator_account_password) - pulumi.set(__self__, "sql_service_account_password", sql_service_account_password) + VirtualMachineWsfcDomainCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_bootstrap_account_password=cluster_bootstrap_account_password, + cluster_operator_account_password=cluster_operator_account_password, + sql_service_account_password=sql_service_account_password, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_bootstrap_account_password: Optional[str] = None, + cluster_operator_account_password: Optional[str] = None, + sql_service_account_password: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_bootstrap_account_password is None and 'clusterBootstrapAccountPassword' in kwargs: + cluster_bootstrap_account_password = kwargs['clusterBootstrapAccountPassword'] + if cluster_bootstrap_account_password is None: + raise TypeError("Missing 'cluster_bootstrap_account_password' argument") + if cluster_operator_account_password is None and 'clusterOperatorAccountPassword' in kwargs: + cluster_operator_account_password = kwargs['clusterOperatorAccountPassword'] + if cluster_operator_account_password is None: + raise TypeError("Missing 'cluster_operator_account_password' argument") + if sql_service_account_password is None and 'sqlServiceAccountPassword' in kwargs: + sql_service_account_password = kwargs['sqlServiceAccountPassword'] + if sql_service_account_password is None: + raise TypeError("Missing 'sql_service_account_password' argument") + + _setter("cluster_bootstrap_account_password", cluster_bootstrap_account_password) + _setter("cluster_operator_account_password", cluster_operator_account_password) + _setter("sql_service_account_password", sql_service_account_password) @property @pulumi.getter(name="clusterBootstrapAccountPassword") @@ -2488,10 +3379,35 @@ def __init__(__self__, *, :param str name: The name of the elastic pool. :param str tier: The tier of the particular SKU. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "family", family) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "tier", tier) + GetElasticPoolSkusResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + family=family, + name=name, + tier=tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + family: Optional[str] = None, + name: Optional[str] = None, + tier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if family is None: + raise TypeError("Missing 'family' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("capacity", capacity) + _setter("family", family) + _setter("name", name) + _setter("tier", tier) @property @pulumi.getter @@ -2539,10 +3455,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance. :param str type: The identity type of the SQL Managed Instance. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetManagedInstanceIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -2590,10 +3537,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the System Assigned Managed Service Identity that is configured on this Microsoft SQL Server. :param str type: The type of Managed Service Identity that is configured on this Microsoft SQL Server. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetServerIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") diff --git a/sdk/python/pulumi_azure/mssql/server.py b/sdk/python/pulumi_azure/mssql/server.py index 9f944dce9f..cf3ad5310b 100644 --- a/sdk/python/pulumi_azure/mssql/server.py +++ b/sdk/python/pulumi_azure/mssql/server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,34 +59,97 @@ def __init__(__self__, *, > **NOTE:** When using a firewall with a `Key Vault`, you must enable the option `Allow trusted Microsoft services to bypass the firewall`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "version", version) + ServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + version=version, + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + azuread_administrator=azuread_administrator, + connection_policy=connection_policy, + identity=identity, + location=location, + minimum_tls_version=minimum_tls_version, + name=name, + outbound_network_restriction_enabled=outbound_network_restriction_enabled, + primary_user_assigned_identity_id=primary_user_assigned_identity_id, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + transparent_data_encryption_key_vault_key_id=transparent_data_encryption_key_vault_key_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + azuread_administrator: Optional[pulumi.Input['ServerAzureadAdministratorArgs']] = None, + connection_policy: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ServerIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_network_restriction_enabled: Optional[pulumi.Input[bool]] = None, + primary_user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + transparent_data_encryption_key_vault_key_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if azuread_administrator is None and 'azureadAdministrator' in kwargs: + azuread_administrator = kwargs['azureadAdministrator'] + if connection_policy is None and 'connectionPolicy' in kwargs: + connection_policy = kwargs['connectionPolicy'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if outbound_network_restriction_enabled is None and 'outboundNetworkRestrictionEnabled' in kwargs: + outbound_network_restriction_enabled = kwargs['outboundNetworkRestrictionEnabled'] + if primary_user_assigned_identity_id is None and 'primaryUserAssignedIdentityId' in kwargs: + primary_user_assigned_identity_id = kwargs['primaryUserAssignedIdentityId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if transparent_data_encryption_key_vault_key_id is None and 'transparentDataEncryptionKeyVaultKeyId' in kwargs: + transparent_data_encryption_key_vault_key_id = kwargs['transparentDataEncryptionKeyVaultKeyId'] + + _setter("resource_group_name", resource_group_name) + _setter("version", version) if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_login_password is not None: - pulumi.set(__self__, "administrator_login_password", administrator_login_password) + _setter("administrator_login_password", administrator_login_password) if azuread_administrator is not None: - pulumi.set(__self__, "azuread_administrator", azuread_administrator) + _setter("azuread_administrator", azuread_administrator) if connection_policy is not None: - pulumi.set(__self__, "connection_policy", connection_policy) + _setter("connection_policy", connection_policy) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_network_restriction_enabled is not None: - pulumi.set(__self__, "outbound_network_restriction_enabled", outbound_network_restriction_enabled) + _setter("outbound_network_restriction_enabled", outbound_network_restriction_enabled) if primary_user_assigned_identity_id is not None: - pulumi.set(__self__, "primary_user_assigned_identity_id", primary_user_assigned_identity_id) + _setter("primary_user_assigned_identity_id", primary_user_assigned_identity_id) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if transparent_data_encryption_key_vault_key_id is not None: - pulumi.set(__self__, "transparent_data_encryption_key_vault_key_id", transparent_data_encryption_key_vault_key_id) + _setter("transparent_data_encryption_key_vault_key_id", transparent_data_encryption_key_vault_key_id) @property @pulumi.getter(name="resourceGroupName") @@ -329,40 +392,107 @@ def __init__(__self__, *, > **NOTE:** When using a firewall with a `Key Vault`, you must enable the option `Allow trusted Microsoft services to bypass the firewall`. :param pulumi.Input[str] version: The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created. """ + _ServerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + azuread_administrator=azuread_administrator, + connection_policy=connection_policy, + fully_qualified_domain_name=fully_qualified_domain_name, + identity=identity, + location=location, + minimum_tls_version=minimum_tls_version, + name=name, + outbound_network_restriction_enabled=outbound_network_restriction_enabled, + primary_user_assigned_identity_id=primary_user_assigned_identity_id, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + restorable_dropped_database_ids=restorable_dropped_database_ids, + tags=tags, + transparent_data_encryption_key_vault_key_id=transparent_data_encryption_key_vault_key_id, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + azuread_administrator: Optional[pulumi.Input['ServerAzureadAdministratorArgs']] = None, + connection_policy: Optional[pulumi.Input[str]] = None, + fully_qualified_domain_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ServerIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + outbound_network_restriction_enabled: Optional[pulumi.Input[bool]] = None, + primary_user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + restorable_dropped_database_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + transparent_data_encryption_key_vault_key_id: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if azuread_administrator is None and 'azureadAdministrator' in kwargs: + azuread_administrator = kwargs['azureadAdministrator'] + if connection_policy is None and 'connectionPolicy' in kwargs: + connection_policy = kwargs['connectionPolicy'] + if fully_qualified_domain_name is None and 'fullyQualifiedDomainName' in kwargs: + fully_qualified_domain_name = kwargs['fullyQualifiedDomainName'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if outbound_network_restriction_enabled is None and 'outboundNetworkRestrictionEnabled' in kwargs: + outbound_network_restriction_enabled = kwargs['outboundNetworkRestrictionEnabled'] + if primary_user_assigned_identity_id is None and 'primaryUserAssignedIdentityId' in kwargs: + primary_user_assigned_identity_id = kwargs['primaryUserAssignedIdentityId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if restorable_dropped_database_ids is None and 'restorableDroppedDatabaseIds' in kwargs: + restorable_dropped_database_ids = kwargs['restorableDroppedDatabaseIds'] + if transparent_data_encryption_key_vault_key_id is None and 'transparentDataEncryptionKeyVaultKeyId' in kwargs: + transparent_data_encryption_key_vault_key_id = kwargs['transparentDataEncryptionKeyVaultKeyId'] + if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_login_password is not None: - pulumi.set(__self__, "administrator_login_password", administrator_login_password) + _setter("administrator_login_password", administrator_login_password) if azuread_administrator is not None: - pulumi.set(__self__, "azuread_administrator", azuread_administrator) + _setter("azuread_administrator", azuread_administrator) if connection_policy is not None: - pulumi.set(__self__, "connection_policy", connection_policy) + _setter("connection_policy", connection_policy) if fully_qualified_domain_name is not None: - pulumi.set(__self__, "fully_qualified_domain_name", fully_qualified_domain_name) + _setter("fully_qualified_domain_name", fully_qualified_domain_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if outbound_network_restriction_enabled is not None: - pulumi.set(__self__, "outbound_network_restriction_enabled", outbound_network_restriction_enabled) + _setter("outbound_network_restriction_enabled", outbound_network_restriction_enabled) if primary_user_assigned_identity_id is not None: - pulumi.set(__self__, "primary_user_assigned_identity_id", primary_user_assigned_identity_id) + _setter("primary_user_assigned_identity_id", primary_user_assigned_identity_id) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if restorable_dropped_database_ids is not None: - pulumi.set(__self__, "restorable_dropped_database_ids", restorable_dropped_database_ids) + _setter("restorable_dropped_database_ids", restorable_dropped_database_ids) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if transparent_data_encryption_key_vault_key_id is not None: - pulumi.set(__self__, "transparent_data_encryption_key_vault_key_id", transparent_data_encryption_key_vault_key_id) + _setter("transparent_data_encryption_key_vault_key_id", transparent_data_encryption_key_vault_key_id) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="administratorLogin") @@ -856,6 +986,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -887,8 +1021,18 @@ def _internal_init(__self__, __props__.__dict__["administrator_login"] = administrator_login __props__.__dict__["administrator_login_password"] = None if administrator_login_password is None else pulumi.Output.secret(administrator_login_password) + if azuread_administrator is not None and not isinstance(azuread_administrator, ServerAzureadAdministratorArgs): + azuread_administrator = azuread_administrator or {} + def _setter(key, value): + azuread_administrator[key] = value + ServerAzureadAdministratorArgs._configure(_setter, **azuread_administrator) __props__.__dict__["azuread_administrator"] = azuread_administrator __props__.__dict__["connection_policy"] = connection_policy + if identity is not None and not isinstance(identity, ServerIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ServerIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["minimum_tls_version"] = minimum_tls_version diff --git a/sdk/python/pulumi_azure/mssql/server_dns_alias.py b/sdk/python/pulumi_azure/mssql/server_dns_alias.py index ec34c0a99b..adf1c3823c 100644 --- a/sdk/python/pulumi_azure/mssql/server_dns_alias.py +++ b/sdk/python/pulumi_azure/mssql/server_dns_alias.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServerDnsAliasArgs', 'ServerDnsAlias'] @@ -21,9 +21,26 @@ def __init__(__self__, *, :param pulumi.Input[str] mssql_server_id: The ID of the mssql server. Changing this forces a new MSSQL Server DNS Alias to be created. :param pulumi.Input[str] name: The name which should be used for this MSSQL Server DNS Alias. Changing this forces a new MSSQL Server DNS Alias to be created. """ - pulumi.set(__self__, "mssql_server_id", mssql_server_id) + ServerDnsAliasArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mssql_server_id=mssql_server_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mssql_server_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mssql_server_id is None and 'mssqlServerId' in kwargs: + mssql_server_id = kwargs['mssqlServerId'] + if mssql_server_id is None: + raise TypeError("Missing 'mssql_server_id' argument") + + _setter("mssql_server_id", mssql_server_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="mssqlServerId") @@ -62,12 +79,31 @@ def __init__(__self__, *, :param pulumi.Input[str] mssql_server_id: The ID of the mssql server. Changing this forces a new MSSQL Server DNS Alias to be created. :param pulumi.Input[str] name: The name which should be used for this MSSQL Server DNS Alias. Changing this forces a new MSSQL Server DNS Alias to be created. """ + _ServerDnsAliasState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_record=dns_record, + mssql_server_id=mssql_server_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_record: Optional[pulumi.Input[str]] = None, + mssql_server_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_record is None and 'dnsRecord' in kwargs: + dns_record = kwargs['dnsRecord'] + if mssql_server_id is None and 'mssqlServerId' in kwargs: + mssql_server_id = kwargs['mssqlServerId'] + if dns_record is not None: - pulumi.set(__self__, "dns_record", dns_record) + _setter("dns_record", dns_record) if mssql_server_id is not None: - pulumi.set(__self__, "mssql_server_id", mssql_server_id) + _setter("mssql_server_id", mssql_server_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="dnsRecord") @@ -189,6 +225,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerDnsAliasArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/server_extended_auditing_policy.py b/sdk/python/pulumi_azure/mssql/server_extended_auditing_policy.py index 9beba38c6b..d6426456c3 100644 --- a/sdk/python/pulumi_azure/mssql/server_extended_auditing_policy.py +++ b/sdk/python/pulumi_azure/mssql/server_extended_auditing_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServerExtendedAuditingPolicyArgs', 'ServerExtendedAuditingPolicy'] @@ -35,21 +35,62 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_subscription_id: The ID of the Subscription containing the Storage Account. :param pulumi.Input[str] storage_endpoint: The blob storage endpoint (e.g. ). This blob storage will hold all extended auditing logs. """ - pulumi.set(__self__, "server_id", server_id) + ServerExtendedAuditingPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + server_id=server_id, + enabled=enabled, + log_monitoring_enabled=log_monitoring_enabled, + retention_in_days=retention_in_days, + storage_account_access_key=storage_account_access_key, + storage_account_access_key_is_secondary=storage_account_access_key_is_secondary, + storage_account_subscription_id=storage_account_subscription_id, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + log_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_access_key_is_secondary: Optional[pulumi.Input[bool]] = None, + storage_account_subscription_id: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + if log_monitoring_enabled is None and 'logMonitoringEnabled' in kwargs: + log_monitoring_enabled = kwargs['logMonitoringEnabled'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key_is_secondary is None and 'storageAccountAccessKeyIsSecondary' in kwargs: + storage_account_access_key_is_secondary = kwargs['storageAccountAccessKeyIsSecondary'] + if storage_account_subscription_id is None and 'storageAccountSubscriptionId' in kwargs: + storage_account_subscription_id = kwargs['storageAccountSubscriptionId'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + + _setter("server_id", server_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if log_monitoring_enabled is not None: - pulumi.set(__self__, "log_monitoring_enabled", log_monitoring_enabled) + _setter("log_monitoring_enabled", log_monitoring_enabled) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_access_key_is_secondary is not None: - pulumi.set(__self__, "storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) + _setter("storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) if storage_account_subscription_id is not None: - pulumi.set(__self__, "storage_account_subscription_id", storage_account_subscription_id) + _setter("storage_account_subscription_id", storage_account_subscription_id) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="serverId") @@ -174,22 +215,61 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_subscription_id: The ID of the Subscription containing the Storage Account. :param pulumi.Input[str] storage_endpoint: The blob storage endpoint (e.g. ). This blob storage will hold all extended auditing logs. """ + _ServerExtendedAuditingPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + log_monitoring_enabled=log_monitoring_enabled, + retention_in_days=retention_in_days, + server_id=server_id, + storage_account_access_key=storage_account_access_key, + storage_account_access_key_is_secondary=storage_account_access_key_is_secondary, + storage_account_subscription_id=storage_account_subscription_id, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + log_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + server_id: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_access_key_is_secondary: Optional[pulumi.Input[bool]] = None, + storage_account_subscription_id: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_monitoring_enabled is None and 'logMonitoringEnabled' in kwargs: + log_monitoring_enabled = kwargs['logMonitoringEnabled'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key_is_secondary is None and 'storageAccountAccessKeyIsSecondary' in kwargs: + storage_account_access_key_is_secondary = kwargs['storageAccountAccessKeyIsSecondary'] + if storage_account_subscription_id is None and 'storageAccountSubscriptionId' in kwargs: + storage_account_subscription_id = kwargs['storageAccountSubscriptionId'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if log_monitoring_enabled is not None: - pulumi.set(__self__, "log_monitoring_enabled", log_monitoring_enabled) + _setter("log_monitoring_enabled", log_monitoring_enabled) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_access_key_is_secondary is not None: - pulumi.set(__self__, "storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) + _setter("storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) if storage_account_subscription_id is not None: - pulumi.set(__self__, "storage_account_subscription_id", storage_account_subscription_id) + _setter("storage_account_subscription_id", storage_account_subscription_id) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter @@ -551,6 +631,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerExtendedAuditingPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/server_microsoft_support_auditing_policy.py b/sdk/python/pulumi_azure/mssql/server_microsoft_support_auditing_policy.py index 710ee9fb50..5fdc4be2a1 100644 --- a/sdk/python/pulumi_azure/mssql/server_microsoft_support_auditing_policy.py +++ b/sdk/python/pulumi_azure/mssql/server_microsoft_support_auditing_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServerMicrosoftSupportAuditingPolicyArgs', 'ServerMicrosoftSupportAuditingPolicy'] @@ -31,17 +31,50 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_access_key: The access key to use for the auditing storage account. :param pulumi.Input[str] storage_account_subscription_id: The ID of the Subscription containing the Storage Account. """ - pulumi.set(__self__, "server_id", server_id) + ServerMicrosoftSupportAuditingPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + server_id=server_id, + blob_storage_endpoint=blob_storage_endpoint, + enabled=enabled, + log_monitoring_enabled=log_monitoring_enabled, + storage_account_access_key=storage_account_access_key, + storage_account_subscription_id=storage_account_subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server_id: Optional[pulumi.Input[str]] = None, + blob_storage_endpoint: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + log_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + if blob_storage_endpoint is None and 'blobStorageEndpoint' in kwargs: + blob_storage_endpoint = kwargs['blobStorageEndpoint'] + if log_monitoring_enabled is None and 'logMonitoringEnabled' in kwargs: + log_monitoring_enabled = kwargs['logMonitoringEnabled'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_subscription_id is None and 'storageAccountSubscriptionId' in kwargs: + storage_account_subscription_id = kwargs['storageAccountSubscriptionId'] + + _setter("server_id", server_id) if blob_storage_endpoint is not None: - pulumi.set(__self__, "blob_storage_endpoint", blob_storage_endpoint) + _setter("blob_storage_endpoint", blob_storage_endpoint) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if log_monitoring_enabled is not None: - pulumi.set(__self__, "log_monitoring_enabled", log_monitoring_enabled) + _setter("log_monitoring_enabled", log_monitoring_enabled) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_subscription_id is not None: - pulumi.set(__self__, "storage_account_subscription_id", storage_account_subscription_id) + _setter("storage_account_subscription_id", storage_account_subscription_id) @property @pulumi.getter(name="serverId") @@ -138,18 +171,49 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_access_key: The access key to use for the auditing storage account. :param pulumi.Input[str] storage_account_subscription_id: The ID of the Subscription containing the Storage Account. """ + _ServerMicrosoftSupportAuditingPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_storage_endpoint=blob_storage_endpoint, + enabled=enabled, + log_monitoring_enabled=log_monitoring_enabled, + server_id=server_id, + storage_account_access_key=storage_account_access_key, + storage_account_subscription_id=storage_account_subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_storage_endpoint: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + log_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + server_id: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_storage_endpoint is None and 'blobStorageEndpoint' in kwargs: + blob_storage_endpoint = kwargs['blobStorageEndpoint'] + if log_monitoring_enabled is None and 'logMonitoringEnabled' in kwargs: + log_monitoring_enabled = kwargs['logMonitoringEnabled'] + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_subscription_id is None and 'storageAccountSubscriptionId' in kwargs: + storage_account_subscription_id = kwargs['storageAccountSubscriptionId'] + if blob_storage_endpoint is not None: - pulumi.set(__self__, "blob_storage_endpoint", blob_storage_endpoint) + _setter("blob_storage_endpoint", blob_storage_endpoint) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if log_monitoring_enabled is not None: - pulumi.set(__self__, "log_monitoring_enabled", log_monitoring_enabled) + _setter("log_monitoring_enabled", log_monitoring_enabled) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_subscription_id is not None: - pulumi.set(__self__, "storage_account_subscription_id", storage_account_subscription_id) + _setter("storage_account_subscription_id", storage_account_subscription_id) @property @pulumi.getter(name="blobStorageEndpoint") @@ -475,6 +539,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerMicrosoftSupportAuditingPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/server_security_alert_policy.py b/sdk/python/pulumi_azure/mssql/server_security_alert_policy.py index c441355d86..1201873082 100644 --- a/sdk/python/pulumi_azure/mssql/server_security_alert_policy.py +++ b/sdk/python/pulumi_azure/mssql/server_security_alert_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServerSecurityAlertPolicyArgs', 'ServerSecurityAlertPolicy'] @@ -37,21 +37,70 @@ def __init__(__self__, *, > **NOTE:** Please note that storage accounts configured with `shared_access_key_enabled = false` cannot be used to configure `mssql.ServerSecurityAlertPolicy` with `storage_endpoint` for now. :param pulumi.Input[str] storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "state", state) + ServerSecurityAlertPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + server_name=server_name, + state=state, + disabled_alerts=disabled_alerts, + email_account_admins=email_account_admins, + email_addresses=email_addresses, + retention_days=retention_days, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + state: Optional[pulumi.Input[str]] = None, + disabled_alerts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_account_admins: Optional[pulumi.Input[bool]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + retention_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if state is None: + raise TypeError("Missing 'state' argument") + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins is None and 'emailAccountAdmins' in kwargs: + email_account_admins = kwargs['emailAccountAdmins'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("state", state) if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins is not None: - pulumi.set(__self__, "email_account_admins", email_account_admins) + _setter("email_account_admins", email_account_admins) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="resourceGroupName") @@ -190,24 +239,67 @@ def __init__(__self__, *, > **NOTE:** Please note that storage accounts configured with `shared_access_key_enabled = false` cannot be used to configure `mssql.ServerSecurityAlertPolicy` with `storage_endpoint` for now. :param pulumi.Input[str] storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. """ + _ServerSecurityAlertPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins=email_account_admins, + email_addresses=email_addresses, + resource_group_name=resource_group_name, + retention_days=retention_days, + server_name=server_name, + state=state, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_account_admins: Optional[pulumi.Input[bool]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_days: Optional[pulumi.Input[int]] = None, + server_name: Optional[pulumi.Input[str]] = None, + state: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins is None and 'emailAccountAdmins' in kwargs: + email_account_admins = kwargs['emailAccountAdmins'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins is not None: - pulumi.set(__self__, "email_account_admins", email_account_admins) + _setter("email_account_admins", email_account_admins) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") @@ -453,6 +545,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerSecurityAlertPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/server_transparent_data_encryption.py b/sdk/python/pulumi_azure/mssql/server_transparent_data_encryption.py index eb965317cc..174a808299 100644 --- a/sdk/python/pulumi_azure/mssql/server_transparent_data_encryption.py +++ b/sdk/python/pulumi_azure/mssql/server_transparent_data_encryption.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServerTransparentDataEncryptionArgs', 'ServerTransparentDataEncryption'] @@ -27,11 +27,34 @@ def __init__(__self__, *, > **NOTE:** If `server_id` denotes a secondary server deployed for disaster recovery purposes, then the `key_vault_key_id` should be the same key used for the primary server's transparent data encryption. Both primary and secondary servers should be encrypted with same key material. """ - pulumi.set(__self__, "server_id", server_id) + ServerTransparentDataEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + server_id=server_id, + auto_rotation_enabled=auto_rotation_enabled, + key_vault_key_id=key_vault_key_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server_id: Optional[pulumi.Input[str]] = None, + auto_rotation_enabled: Optional[pulumi.Input[bool]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + if auto_rotation_enabled is None and 'autoRotationEnabled' in kwargs: + auto_rotation_enabled = kwargs['autoRotationEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + + _setter("server_id", server_id) if auto_rotation_enabled is not None: - pulumi.set(__self__, "auto_rotation_enabled", auto_rotation_enabled) + _setter("auto_rotation_enabled", auto_rotation_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) @property @pulumi.getter(name="serverId") @@ -90,12 +113,33 @@ def __init__(__self__, *, > **NOTE:** If `server_id` denotes a secondary server deployed for disaster recovery purposes, then the `key_vault_key_id` should be the same key used for the primary server's transparent data encryption. Both primary and secondary servers should be encrypted with same key material. :param pulumi.Input[str] server_id: Specifies the name of the MS SQL Server. Changing this forces a new resource to be created. """ + _ServerTransparentDataEncryptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_rotation_enabled=auto_rotation_enabled, + key_vault_key_id=key_vault_key_id, + server_id=server_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_rotation_enabled: Optional[pulumi.Input[bool]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_rotation_enabled is None and 'autoRotationEnabled' in kwargs: + auto_rotation_enabled = kwargs['autoRotationEnabled'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if auto_rotation_enabled is not None: - pulumi.set(__self__, "auto_rotation_enabled", auto_rotation_enabled) + _setter("auto_rotation_enabled", auto_rotation_enabled) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) @property @pulumi.getter(name="autoRotationEnabled") @@ -401,6 +445,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerTransparentDataEncryptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mssql/server_vulnerability_assessment.py b/sdk/python/pulumi_azure/mssql/server_vulnerability_assessment.py index a9059a8801..ce3b6972ba 100644 --- a/sdk/python/pulumi_azure/mssql/server_vulnerability_assessment.py +++ b/sdk/python/pulumi_azure/mssql/server_vulnerability_assessment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,14 +33,47 @@ def __init__(__self__, *, > **NOTE** The `storage_container_sas_key` only applies if the storage account is not behind a virtual network or a firewall. """ - pulumi.set(__self__, "server_security_alert_policy_id", server_security_alert_policy_id) - pulumi.set(__self__, "storage_container_path", storage_container_path) + ServerVulnerabilityAssessmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + server_security_alert_policy_id=server_security_alert_policy_id, + storage_container_path=storage_container_path, + recurring_scans=recurring_scans, + storage_account_access_key=storage_account_access_key, + storage_container_sas_key=storage_container_sas_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server_security_alert_policy_id: Optional[pulumi.Input[str]] = None, + storage_container_path: Optional[pulumi.Input[str]] = None, + recurring_scans: Optional[pulumi.Input['ServerVulnerabilityAssessmentRecurringScansArgs']] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_container_sas_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_security_alert_policy_id is None and 'serverSecurityAlertPolicyId' in kwargs: + server_security_alert_policy_id = kwargs['serverSecurityAlertPolicyId'] + if server_security_alert_policy_id is None: + raise TypeError("Missing 'server_security_alert_policy_id' argument") + if storage_container_path is None and 'storageContainerPath' in kwargs: + storage_container_path = kwargs['storageContainerPath'] + if storage_container_path is None: + raise TypeError("Missing 'storage_container_path' argument") + if recurring_scans is None and 'recurringScans' in kwargs: + recurring_scans = kwargs['recurringScans'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_container_sas_key is None and 'storageContainerSasKey' in kwargs: + storage_container_sas_key = kwargs['storageContainerSasKey'] + + _setter("server_security_alert_policy_id", server_security_alert_policy_id) + _setter("storage_container_path", storage_container_path) if recurring_scans is not None: - pulumi.set(__self__, "recurring_scans", recurring_scans) + _setter("recurring_scans", recurring_scans) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_container_sas_key is not None: - pulumi.set(__self__, "storage_container_sas_key", storage_container_sas_key) + _setter("storage_container_sas_key", storage_container_sas_key) @property @pulumi.getter(name="serverSecurityAlertPolicyId") @@ -127,16 +160,45 @@ def __init__(__self__, *, > **NOTE** The `storage_container_sas_key` only applies if the storage account is not behind a virtual network or a firewall. """ + _ServerVulnerabilityAssessmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + recurring_scans=recurring_scans, + server_security_alert_policy_id=server_security_alert_policy_id, + storage_account_access_key=storage_account_access_key, + storage_container_path=storage_container_path, + storage_container_sas_key=storage_container_sas_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recurring_scans: Optional[pulumi.Input['ServerVulnerabilityAssessmentRecurringScansArgs']] = None, + server_security_alert_policy_id: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_container_path: Optional[pulumi.Input[str]] = None, + storage_container_sas_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recurring_scans is None and 'recurringScans' in kwargs: + recurring_scans = kwargs['recurringScans'] + if server_security_alert_policy_id is None and 'serverSecurityAlertPolicyId' in kwargs: + server_security_alert_policy_id = kwargs['serverSecurityAlertPolicyId'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_container_path is None and 'storageContainerPath' in kwargs: + storage_container_path = kwargs['storageContainerPath'] + if storage_container_sas_key is None and 'storageContainerSasKey' in kwargs: + storage_container_sas_key = kwargs['storageContainerSasKey'] + if recurring_scans is not None: - pulumi.set(__self__, "recurring_scans", recurring_scans) + _setter("recurring_scans", recurring_scans) if server_security_alert_policy_id is not None: - pulumi.set(__self__, "server_security_alert_policy_id", server_security_alert_policy_id) + _setter("server_security_alert_policy_id", server_security_alert_policy_id) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_container_path is not None: - pulumi.set(__self__, "storage_container_path", storage_container_path) + _setter("storage_container_path", storage_container_path) if storage_container_sas_key is not None: - pulumi.set(__self__, "storage_container_sas_key", storage_container_sas_key) + _setter("storage_container_sas_key", storage_container_sas_key) @property @pulumi.getter(name="recurringScans") @@ -346,6 +408,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerVulnerabilityAssessmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -365,6 +431,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ServerVulnerabilityAssessmentArgs.__new__(ServerVulnerabilityAssessmentArgs) + if recurring_scans is not None and not isinstance(recurring_scans, ServerVulnerabilityAssessmentRecurringScansArgs): + recurring_scans = recurring_scans or {} + def _setter(key, value): + recurring_scans[key] = value + ServerVulnerabilityAssessmentRecurringScansArgs._configure(_setter, **recurring_scans) __props__.__dict__["recurring_scans"] = recurring_scans if server_security_alert_policy_id is None and not opts.urn: raise TypeError("Missing required property 'server_security_alert_policy_id'") diff --git a/sdk/python/pulumi_azure/mssql/virtual_machine.py b/sdk/python/pulumi_azure/mssql/virtual_machine.py index e1d19a9d40..5e8d199d0b 100644 --- a/sdk/python/pulumi_azure/mssql/virtual_machine.py +++ b/sdk/python/pulumi_azure/mssql/virtual_machine.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -51,37 +51,108 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input['VirtualMachineWsfcDomainCredentialArgs'] wsfc_domain_credential: A `wsfc_domain_credential` block as defined below """ - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + VirtualMachineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + virtual_machine_id=virtual_machine_id, + assessment=assessment, + auto_backup=auto_backup, + auto_patching=auto_patching, + key_vault_credential=key_vault_credential, + r_services_enabled=r_services_enabled, + sql_connectivity_port=sql_connectivity_port, + sql_connectivity_type=sql_connectivity_type, + sql_connectivity_update_password=sql_connectivity_update_password, + sql_connectivity_update_username=sql_connectivity_update_username, + sql_instance=sql_instance, + sql_license_type=sql_license_type, + sql_virtual_machine_group_id=sql_virtual_machine_group_id, + storage_configuration=storage_configuration, + tags=tags, + wsfc_domain_credential=wsfc_domain_credential, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + virtual_machine_id: Optional[pulumi.Input[str]] = None, + assessment: Optional[pulumi.Input['VirtualMachineAssessmentArgs']] = None, + auto_backup: Optional[pulumi.Input['VirtualMachineAutoBackupArgs']] = None, + auto_patching: Optional[pulumi.Input['VirtualMachineAutoPatchingArgs']] = None, + key_vault_credential: Optional[pulumi.Input['VirtualMachineKeyVaultCredentialArgs']] = None, + r_services_enabled: Optional[pulumi.Input[bool]] = None, + sql_connectivity_port: Optional[pulumi.Input[int]] = None, + sql_connectivity_type: Optional[pulumi.Input[str]] = None, + sql_connectivity_update_password: Optional[pulumi.Input[str]] = None, + sql_connectivity_update_username: Optional[pulumi.Input[str]] = None, + sql_instance: Optional[pulumi.Input['VirtualMachineSqlInstanceArgs']] = None, + sql_license_type: Optional[pulumi.Input[str]] = None, + sql_virtual_machine_group_id: Optional[pulumi.Input[str]] = None, + storage_configuration: Optional[pulumi.Input['VirtualMachineStorageConfigurationArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + wsfc_domain_credential: Optional[pulumi.Input['VirtualMachineWsfcDomainCredentialArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_id is None: + raise TypeError("Missing 'virtual_machine_id' argument") + if auto_backup is None and 'autoBackup' in kwargs: + auto_backup = kwargs['autoBackup'] + if auto_patching is None and 'autoPatching' in kwargs: + auto_patching = kwargs['autoPatching'] + if key_vault_credential is None and 'keyVaultCredential' in kwargs: + key_vault_credential = kwargs['keyVaultCredential'] + if r_services_enabled is None and 'rServicesEnabled' in kwargs: + r_services_enabled = kwargs['rServicesEnabled'] + if sql_connectivity_port is None and 'sqlConnectivityPort' in kwargs: + sql_connectivity_port = kwargs['sqlConnectivityPort'] + if sql_connectivity_type is None and 'sqlConnectivityType' in kwargs: + sql_connectivity_type = kwargs['sqlConnectivityType'] + if sql_connectivity_update_password is None and 'sqlConnectivityUpdatePassword' in kwargs: + sql_connectivity_update_password = kwargs['sqlConnectivityUpdatePassword'] + if sql_connectivity_update_username is None and 'sqlConnectivityUpdateUsername' in kwargs: + sql_connectivity_update_username = kwargs['sqlConnectivityUpdateUsername'] + if sql_instance is None and 'sqlInstance' in kwargs: + sql_instance = kwargs['sqlInstance'] + if sql_license_type is None and 'sqlLicenseType' in kwargs: + sql_license_type = kwargs['sqlLicenseType'] + if sql_virtual_machine_group_id is None and 'sqlVirtualMachineGroupId' in kwargs: + sql_virtual_machine_group_id = kwargs['sqlVirtualMachineGroupId'] + if storage_configuration is None and 'storageConfiguration' in kwargs: + storage_configuration = kwargs['storageConfiguration'] + if wsfc_domain_credential is None and 'wsfcDomainCredential' in kwargs: + wsfc_domain_credential = kwargs['wsfcDomainCredential'] + + _setter("virtual_machine_id", virtual_machine_id) if assessment is not None: - pulumi.set(__self__, "assessment", assessment) + _setter("assessment", assessment) if auto_backup is not None: - pulumi.set(__self__, "auto_backup", auto_backup) + _setter("auto_backup", auto_backup) if auto_patching is not None: - pulumi.set(__self__, "auto_patching", auto_patching) + _setter("auto_patching", auto_patching) if key_vault_credential is not None: - pulumi.set(__self__, "key_vault_credential", key_vault_credential) + _setter("key_vault_credential", key_vault_credential) if r_services_enabled is not None: - pulumi.set(__self__, "r_services_enabled", r_services_enabled) + _setter("r_services_enabled", r_services_enabled) if sql_connectivity_port is not None: - pulumi.set(__self__, "sql_connectivity_port", sql_connectivity_port) + _setter("sql_connectivity_port", sql_connectivity_port) if sql_connectivity_type is not None: - pulumi.set(__self__, "sql_connectivity_type", sql_connectivity_type) + _setter("sql_connectivity_type", sql_connectivity_type) if sql_connectivity_update_password is not None: - pulumi.set(__self__, "sql_connectivity_update_password", sql_connectivity_update_password) + _setter("sql_connectivity_update_password", sql_connectivity_update_password) if sql_connectivity_update_username is not None: - pulumi.set(__self__, "sql_connectivity_update_username", sql_connectivity_update_username) + _setter("sql_connectivity_update_username", sql_connectivity_update_username) if sql_instance is not None: - pulumi.set(__self__, "sql_instance", sql_instance) + _setter("sql_instance", sql_instance) if sql_license_type is not None: - pulumi.set(__self__, "sql_license_type", sql_license_type) + _setter("sql_license_type", sql_license_type) if sql_virtual_machine_group_id is not None: - pulumi.set(__self__, "sql_virtual_machine_group_id", sql_virtual_machine_group_id) + _setter("sql_virtual_machine_group_id", sql_virtual_machine_group_id) if storage_configuration is not None: - pulumi.set(__self__, "storage_configuration", storage_configuration) + _setter("storage_configuration", storage_configuration) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if wsfc_domain_credential is not None: - pulumi.set(__self__, "wsfc_domain_credential", wsfc_domain_credential) + _setter("wsfc_domain_credential", wsfc_domain_credential) @property @pulumi.getter(name="virtualMachineId") @@ -314,38 +385,107 @@ def __init__(__self__, *, :param pulumi.Input[str] virtual_machine_id: The ID of the Virtual Machine. Changing this forces a new resource to be created. :param pulumi.Input['VirtualMachineWsfcDomainCredentialArgs'] wsfc_domain_credential: A `wsfc_domain_credential` block as defined below """ + _VirtualMachineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + assessment=assessment, + auto_backup=auto_backup, + auto_patching=auto_patching, + key_vault_credential=key_vault_credential, + r_services_enabled=r_services_enabled, + sql_connectivity_port=sql_connectivity_port, + sql_connectivity_type=sql_connectivity_type, + sql_connectivity_update_password=sql_connectivity_update_password, + sql_connectivity_update_username=sql_connectivity_update_username, + sql_instance=sql_instance, + sql_license_type=sql_license_type, + sql_virtual_machine_group_id=sql_virtual_machine_group_id, + storage_configuration=storage_configuration, + tags=tags, + virtual_machine_id=virtual_machine_id, + wsfc_domain_credential=wsfc_domain_credential, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assessment: Optional[pulumi.Input['VirtualMachineAssessmentArgs']] = None, + auto_backup: Optional[pulumi.Input['VirtualMachineAutoBackupArgs']] = None, + auto_patching: Optional[pulumi.Input['VirtualMachineAutoPatchingArgs']] = None, + key_vault_credential: Optional[pulumi.Input['VirtualMachineKeyVaultCredentialArgs']] = None, + r_services_enabled: Optional[pulumi.Input[bool]] = None, + sql_connectivity_port: Optional[pulumi.Input[int]] = None, + sql_connectivity_type: Optional[pulumi.Input[str]] = None, + sql_connectivity_update_password: Optional[pulumi.Input[str]] = None, + sql_connectivity_update_username: Optional[pulumi.Input[str]] = None, + sql_instance: Optional[pulumi.Input['VirtualMachineSqlInstanceArgs']] = None, + sql_license_type: Optional[pulumi.Input[str]] = None, + sql_virtual_machine_group_id: Optional[pulumi.Input[str]] = None, + storage_configuration: Optional[pulumi.Input['VirtualMachineStorageConfigurationArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + wsfc_domain_credential: Optional[pulumi.Input['VirtualMachineWsfcDomainCredentialArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_backup is None and 'autoBackup' in kwargs: + auto_backup = kwargs['autoBackup'] + if auto_patching is None and 'autoPatching' in kwargs: + auto_patching = kwargs['autoPatching'] + if key_vault_credential is None and 'keyVaultCredential' in kwargs: + key_vault_credential = kwargs['keyVaultCredential'] + if r_services_enabled is None and 'rServicesEnabled' in kwargs: + r_services_enabled = kwargs['rServicesEnabled'] + if sql_connectivity_port is None and 'sqlConnectivityPort' in kwargs: + sql_connectivity_port = kwargs['sqlConnectivityPort'] + if sql_connectivity_type is None and 'sqlConnectivityType' in kwargs: + sql_connectivity_type = kwargs['sqlConnectivityType'] + if sql_connectivity_update_password is None and 'sqlConnectivityUpdatePassword' in kwargs: + sql_connectivity_update_password = kwargs['sqlConnectivityUpdatePassword'] + if sql_connectivity_update_username is None and 'sqlConnectivityUpdateUsername' in kwargs: + sql_connectivity_update_username = kwargs['sqlConnectivityUpdateUsername'] + if sql_instance is None and 'sqlInstance' in kwargs: + sql_instance = kwargs['sqlInstance'] + if sql_license_type is None and 'sqlLicenseType' in kwargs: + sql_license_type = kwargs['sqlLicenseType'] + if sql_virtual_machine_group_id is None and 'sqlVirtualMachineGroupId' in kwargs: + sql_virtual_machine_group_id = kwargs['sqlVirtualMachineGroupId'] + if storage_configuration is None and 'storageConfiguration' in kwargs: + storage_configuration = kwargs['storageConfiguration'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if wsfc_domain_credential is None and 'wsfcDomainCredential' in kwargs: + wsfc_domain_credential = kwargs['wsfcDomainCredential'] + if assessment is not None: - pulumi.set(__self__, "assessment", assessment) + _setter("assessment", assessment) if auto_backup is not None: - pulumi.set(__self__, "auto_backup", auto_backup) + _setter("auto_backup", auto_backup) if auto_patching is not None: - pulumi.set(__self__, "auto_patching", auto_patching) + _setter("auto_patching", auto_patching) if key_vault_credential is not None: - pulumi.set(__self__, "key_vault_credential", key_vault_credential) + _setter("key_vault_credential", key_vault_credential) if r_services_enabled is not None: - pulumi.set(__self__, "r_services_enabled", r_services_enabled) + _setter("r_services_enabled", r_services_enabled) if sql_connectivity_port is not None: - pulumi.set(__self__, "sql_connectivity_port", sql_connectivity_port) + _setter("sql_connectivity_port", sql_connectivity_port) if sql_connectivity_type is not None: - pulumi.set(__self__, "sql_connectivity_type", sql_connectivity_type) + _setter("sql_connectivity_type", sql_connectivity_type) if sql_connectivity_update_password is not None: - pulumi.set(__self__, "sql_connectivity_update_password", sql_connectivity_update_password) + _setter("sql_connectivity_update_password", sql_connectivity_update_password) if sql_connectivity_update_username is not None: - pulumi.set(__self__, "sql_connectivity_update_username", sql_connectivity_update_username) + _setter("sql_connectivity_update_username", sql_connectivity_update_username) if sql_instance is not None: - pulumi.set(__self__, "sql_instance", sql_instance) + _setter("sql_instance", sql_instance) if sql_license_type is not None: - pulumi.set(__self__, "sql_license_type", sql_license_type) + _setter("sql_license_type", sql_license_type) if sql_virtual_machine_group_id is not None: - pulumi.set(__self__, "sql_virtual_machine_group_id", sql_virtual_machine_group_id) + _setter("sql_virtual_machine_group_id", sql_virtual_machine_group_id) if storage_configuration is not None: - pulumi.set(__self__, "storage_configuration", storage_configuration) + _setter("storage_configuration", storage_configuration) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) if wsfc_domain_credential is not None: - pulumi.set(__self__, "wsfc_domain_credential", wsfc_domain_credential) + _setter("wsfc_domain_credential", wsfc_domain_credential) @property @pulumi.getter @@ -669,6 +809,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualMachineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -699,23 +843,58 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = VirtualMachineArgs.__new__(VirtualMachineArgs) + if assessment is not None and not isinstance(assessment, VirtualMachineAssessmentArgs): + assessment = assessment or {} + def _setter(key, value): + assessment[key] = value + VirtualMachineAssessmentArgs._configure(_setter, **assessment) __props__.__dict__["assessment"] = assessment + if auto_backup is not None and not isinstance(auto_backup, VirtualMachineAutoBackupArgs): + auto_backup = auto_backup or {} + def _setter(key, value): + auto_backup[key] = value + VirtualMachineAutoBackupArgs._configure(_setter, **auto_backup) __props__.__dict__["auto_backup"] = auto_backup + if auto_patching is not None and not isinstance(auto_patching, VirtualMachineAutoPatchingArgs): + auto_patching = auto_patching or {} + def _setter(key, value): + auto_patching[key] = value + VirtualMachineAutoPatchingArgs._configure(_setter, **auto_patching) __props__.__dict__["auto_patching"] = auto_patching + if key_vault_credential is not None and not isinstance(key_vault_credential, VirtualMachineKeyVaultCredentialArgs): + key_vault_credential = key_vault_credential or {} + def _setter(key, value): + key_vault_credential[key] = value + VirtualMachineKeyVaultCredentialArgs._configure(_setter, **key_vault_credential) __props__.__dict__["key_vault_credential"] = key_vault_credential __props__.__dict__["r_services_enabled"] = r_services_enabled __props__.__dict__["sql_connectivity_port"] = sql_connectivity_port __props__.__dict__["sql_connectivity_type"] = sql_connectivity_type __props__.__dict__["sql_connectivity_update_password"] = None if sql_connectivity_update_password is None else pulumi.Output.secret(sql_connectivity_update_password) __props__.__dict__["sql_connectivity_update_username"] = None if sql_connectivity_update_username is None else pulumi.Output.secret(sql_connectivity_update_username) + if sql_instance is not None and not isinstance(sql_instance, VirtualMachineSqlInstanceArgs): + sql_instance = sql_instance or {} + def _setter(key, value): + sql_instance[key] = value + VirtualMachineSqlInstanceArgs._configure(_setter, **sql_instance) __props__.__dict__["sql_instance"] = sql_instance __props__.__dict__["sql_license_type"] = sql_license_type __props__.__dict__["sql_virtual_machine_group_id"] = sql_virtual_machine_group_id + if storage_configuration is not None and not isinstance(storage_configuration, VirtualMachineStorageConfigurationArgs): + storage_configuration = storage_configuration or {} + def _setter(key, value): + storage_configuration[key] = value + VirtualMachineStorageConfigurationArgs._configure(_setter, **storage_configuration) __props__.__dict__["storage_configuration"] = storage_configuration __props__.__dict__["tags"] = tags if virtual_machine_id is None and not opts.urn: raise TypeError("Missing required property 'virtual_machine_id'") __props__.__dict__["virtual_machine_id"] = virtual_machine_id + if wsfc_domain_credential is not None and not isinstance(wsfc_domain_credential, VirtualMachineWsfcDomainCredentialArgs): + wsfc_domain_credential = wsfc_domain_credential or {} + def _setter(key, value): + wsfc_domain_credential[key] = value + VirtualMachineWsfcDomainCredentialArgs._configure(_setter, **wsfc_domain_credential) __props__.__dict__["wsfc_domain_credential"] = wsfc_domain_credential secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["sqlConnectivityUpdatePassword", "sqlConnectivityUpdateUsername"]) opts = pulumi.ResourceOptions.merge(opts, secret_opts) diff --git a/sdk/python/pulumi_azure/mssql/virtual_machine_availability_group_listener.py b/sdk/python/pulumi_azure/mssql/virtual_machine_availability_group_listener.py index 0d022c5a51..c2e359b0c6 100644 --- a/sdk/python/pulumi_azure/mssql/virtual_machine_availability_group_listener.py +++ b/sdk/python/pulumi_azure/mssql/virtual_machine_availability_group_listener.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,18 +35,53 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for the Microsoft SQL Virtual Machine Availability Group Listener. Changing this forces a new resource to be created. :param pulumi.Input[int] port: The port of the listener. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "replicas", replicas) - pulumi.set(__self__, "sql_virtual_machine_group_id", sql_virtual_machine_group_id) + VirtualMachineAvailabilityGroupListenerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + replicas=replicas, + sql_virtual_machine_group_id=sql_virtual_machine_group_id, + availability_group_name=availability_group_name, + load_balancer_configuration=load_balancer_configuration, + multi_subnet_ip_configurations=multi_subnet_ip_configurations, + name=name, + port=port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + replicas: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineAvailabilityGroupListenerReplicaArgs']]]] = None, + sql_virtual_machine_group_id: Optional[pulumi.Input[str]] = None, + availability_group_name: Optional[pulumi.Input[str]] = None, + load_balancer_configuration: Optional[pulumi.Input['VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationArgs']] = None, + multi_subnet_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if replicas is None: + raise TypeError("Missing 'replicas' argument") + if sql_virtual_machine_group_id is None and 'sqlVirtualMachineGroupId' in kwargs: + sql_virtual_machine_group_id = kwargs['sqlVirtualMachineGroupId'] + if sql_virtual_machine_group_id is None: + raise TypeError("Missing 'sql_virtual_machine_group_id' argument") + if availability_group_name is None and 'availabilityGroupName' in kwargs: + availability_group_name = kwargs['availabilityGroupName'] + if load_balancer_configuration is None and 'loadBalancerConfiguration' in kwargs: + load_balancer_configuration = kwargs['loadBalancerConfiguration'] + if multi_subnet_ip_configurations is None and 'multiSubnetIpConfigurations' in kwargs: + multi_subnet_ip_configurations = kwargs['multiSubnetIpConfigurations'] + + _setter("replicas", replicas) + _setter("sql_virtual_machine_group_id", sql_virtual_machine_group_id) if availability_group_name is not None: - pulumi.set(__self__, "availability_group_name", availability_group_name) + _setter("availability_group_name", availability_group_name) if load_balancer_configuration is not None: - pulumi.set(__self__, "load_balancer_configuration", load_balancer_configuration) + _setter("load_balancer_configuration", load_balancer_configuration) if multi_subnet_ip_configurations is not None: - pulumi.set(__self__, "multi_subnet_ip_configurations", multi_subnet_ip_configurations) + _setter("multi_subnet_ip_configurations", multi_subnet_ip_configurations) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) @property @pulumi.getter @@ -157,20 +192,51 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['VirtualMachineAvailabilityGroupListenerReplicaArgs']]] replicas: One or more `replica` blocks as defined below. Changing this forces a new resource to be created. :param pulumi.Input[str] sql_virtual_machine_group_id: The ID of the SQL Virtual Machine Group to create the listener. Changing this forces a new resource to be created. """ + _VirtualMachineAvailabilityGroupListenerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + availability_group_name=availability_group_name, + load_balancer_configuration=load_balancer_configuration, + multi_subnet_ip_configurations=multi_subnet_ip_configurations, + name=name, + port=port, + replicas=replicas, + sql_virtual_machine_group_id=sql_virtual_machine_group_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + availability_group_name: Optional[pulumi.Input[str]] = None, + load_balancer_configuration: Optional[pulumi.Input['VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationArgs']] = None, + multi_subnet_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + replicas: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineAvailabilityGroupListenerReplicaArgs']]]] = None, + sql_virtual_machine_group_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if availability_group_name is None and 'availabilityGroupName' in kwargs: + availability_group_name = kwargs['availabilityGroupName'] + if load_balancer_configuration is None and 'loadBalancerConfiguration' in kwargs: + load_balancer_configuration = kwargs['loadBalancerConfiguration'] + if multi_subnet_ip_configurations is None and 'multiSubnetIpConfigurations' in kwargs: + multi_subnet_ip_configurations = kwargs['multiSubnetIpConfigurations'] + if sql_virtual_machine_group_id is None and 'sqlVirtualMachineGroupId' in kwargs: + sql_virtual_machine_group_id = kwargs['sqlVirtualMachineGroupId'] + if availability_group_name is not None: - pulumi.set(__self__, "availability_group_name", availability_group_name) + _setter("availability_group_name", availability_group_name) if load_balancer_configuration is not None: - pulumi.set(__self__, "load_balancer_configuration", load_balancer_configuration) + _setter("load_balancer_configuration", load_balancer_configuration) if multi_subnet_ip_configurations is not None: - pulumi.set(__self__, "multi_subnet_ip_configurations", multi_subnet_ip_configurations) + _setter("multi_subnet_ip_configurations", multi_subnet_ip_configurations) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if replicas is not None: - pulumi.set(__self__, "replicas", replicas) + _setter("replicas", replicas) if sql_virtual_machine_group_id is not None: - pulumi.set(__self__, "sql_virtual_machine_group_id", sql_virtual_machine_group_id) + _setter("sql_virtual_machine_group_id", sql_virtual_machine_group_id) @property @pulumi.getter(name="availabilityGroupName") @@ -322,6 +388,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualMachineAvailabilityGroupListenerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -344,6 +414,11 @@ def _internal_init(__self__, __props__ = VirtualMachineAvailabilityGroupListenerArgs.__new__(VirtualMachineAvailabilityGroupListenerArgs) __props__.__dict__["availability_group_name"] = availability_group_name + if load_balancer_configuration is not None and not isinstance(load_balancer_configuration, VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationArgs): + load_balancer_configuration = load_balancer_configuration or {} + def _setter(key, value): + load_balancer_configuration[key] = value + VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationArgs._configure(_setter, **load_balancer_configuration) __props__.__dict__["load_balancer_configuration"] = load_balancer_configuration __props__.__dict__["multi_subnet_ip_configurations"] = multi_subnet_ip_configurations __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/mssql/virtual_machine_group.py b/sdk/python/pulumi_azure/mssql/virtual_machine_group.py index fae278ca5a..acef0f32c2 100644 --- a/sdk/python/pulumi_azure/mssql/virtual_machine_group.py +++ b/sdk/python/pulumi_azure/mssql/virtual_machine_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,16 +33,55 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for the Microsoft SQL Virtual Machine Group. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Microsoft SQL Virtual Machine Group. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sql_image_offer", sql_image_offer) - pulumi.set(__self__, "sql_image_sku", sql_image_sku) - pulumi.set(__self__, "wsfc_domain_profile", wsfc_domain_profile) + VirtualMachineGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sql_image_offer=sql_image_offer, + sql_image_sku=sql_image_sku, + wsfc_domain_profile=wsfc_domain_profile, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sql_image_offer: Optional[pulumi.Input[str]] = None, + sql_image_sku: Optional[pulumi.Input[str]] = None, + wsfc_domain_profile: Optional[pulumi.Input['VirtualMachineGroupWsfcDomainProfileArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sql_image_offer is None and 'sqlImageOffer' in kwargs: + sql_image_offer = kwargs['sqlImageOffer'] + if sql_image_offer is None: + raise TypeError("Missing 'sql_image_offer' argument") + if sql_image_sku is None and 'sqlImageSku' in kwargs: + sql_image_sku = kwargs['sqlImageSku'] + if sql_image_sku is None: + raise TypeError("Missing 'sql_image_sku' argument") + if wsfc_domain_profile is None and 'wsfcDomainProfile' in kwargs: + wsfc_domain_profile = kwargs['wsfcDomainProfile'] + if wsfc_domain_profile is None: + raise TypeError("Missing 'wsfc_domain_profile' argument") + + _setter("resource_group_name", resource_group_name) + _setter("sql_image_offer", sql_image_offer) + _setter("sql_image_sku", sql_image_sku) + _setter("wsfc_domain_profile", wsfc_domain_profile) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -149,20 +188,51 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Microsoft SQL Virtual Machine Group. :param pulumi.Input['VirtualMachineGroupWsfcDomainProfileArgs'] wsfc_domain_profile: A `wsfc_domain_profile` block as defined below. """ + _VirtualMachineGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + sql_image_offer=sql_image_offer, + sql_image_sku=sql_image_sku, + tags=tags, + wsfc_domain_profile=wsfc_domain_profile, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sql_image_offer: Optional[pulumi.Input[str]] = None, + sql_image_sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + wsfc_domain_profile: Optional[pulumi.Input['VirtualMachineGroupWsfcDomainProfileArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sql_image_offer is None and 'sqlImageOffer' in kwargs: + sql_image_offer = kwargs['sqlImageOffer'] + if sql_image_sku is None and 'sqlImageSku' in kwargs: + sql_image_sku = kwargs['sqlImageSku'] + if wsfc_domain_profile is None and 'wsfcDomainProfile' in kwargs: + wsfc_domain_profile = kwargs['wsfcDomainProfile'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sql_image_offer is not None: - pulumi.set(__self__, "sql_image_offer", sql_image_offer) + _setter("sql_image_offer", sql_image_offer) if sql_image_sku is not None: - pulumi.set(__self__, "sql_image_sku", sql_image_sku) + _setter("sql_image_sku", sql_image_sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if wsfc_domain_profile is not None: - pulumi.set(__self__, "wsfc_domain_profile", wsfc_domain_profile) + _setter("wsfc_domain_profile", wsfc_domain_profile) @property @pulumi.getter @@ -346,6 +416,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualMachineGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -379,6 +453,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'sql_image_sku'") __props__.__dict__["sql_image_sku"] = sql_image_sku __props__.__dict__["tags"] = tags + if wsfc_domain_profile is not None and not isinstance(wsfc_domain_profile, VirtualMachineGroupWsfcDomainProfileArgs): + wsfc_domain_profile = wsfc_domain_profile or {} + def _setter(key, value): + wsfc_domain_profile[key] = value + VirtualMachineGroupWsfcDomainProfileArgs._configure(_setter, **wsfc_domain_profile) if wsfc_domain_profile is None and not opts.urn: raise TypeError("Missing required property 'wsfc_domain_profile'") __props__.__dict__["wsfc_domain_profile"] = wsfc_domain_profile diff --git a/sdk/python/pulumi_azure/mssql/virtual_network_rule.py b/sdk/python/pulumi_azure/mssql/virtual_network_rule.py index 758edd69a9..f61548a590 100644 --- a/sdk/python/pulumi_azure/mssql/virtual_network_rule.py +++ b/sdk/python/pulumi_azure/mssql/virtual_network_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VirtualNetworkRuleArgs', 'VirtualNetworkRule'] @@ -27,12 +27,39 @@ def __init__(__self__, *, > **NOTE:** If `ignore_missing_vnet_service_endpoint` is false, and the target subnet does not contain the `Microsoft.SQL` endpoint in the `service_endpoints` array, the deployment will fail when it tries to create the SQL virtual network rule. :param pulumi.Input[str] name: The name of the SQL virtual network rule. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "server_id", server_id) - pulumi.set(__self__, "subnet_id", subnet_id) + VirtualNetworkRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + server_id=server_id, + subnet_id=subnet_id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + ignore_missing_vnet_service_endpoint: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + + _setter("server_id", server_id) + _setter("subnet_id", subnet_id) if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="serverId") @@ -101,14 +128,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server_id: The resource ID of the SQL Server to which this SQL virtual network rule will be applied. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ID of the subnet from which the SQL server will accept communications. """ + _VirtualNetworkRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + name=name, + server_id=server_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ignore_missing_vnet_service_endpoint: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="ignoreMissingVnetServiceEndpoint") @@ -272,6 +322,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mysql/_inputs.py b/sdk/python/pulumi_azure/mysql/_inputs.py index 3dfae20e0d..4f5d96867a 100644 --- a/sdk/python/pulumi_azure/mysql/_inputs.py +++ b/sdk/python/pulumi_azure/mysql/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -34,14 +34,39 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault Key. :param pulumi.Input[str] primary_user_assigned_identity_id: Specifies the primary user managed identity id for a Customer Managed Key. Should be added with `identity_ids`. """ + FlexibleServerCustomerManagedKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + geo_backup_key_vault_key_id=geo_backup_key_vault_key_id, + geo_backup_user_assigned_identity_id=geo_backup_user_assigned_identity_id, + key_vault_key_id=key_vault_key_id, + primary_user_assigned_identity_id=primary_user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + geo_backup_key_vault_key_id: Optional[pulumi.Input[str]] = None, + geo_backup_user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + primary_user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if geo_backup_key_vault_key_id is None and 'geoBackupKeyVaultKeyId' in kwargs: + geo_backup_key_vault_key_id = kwargs['geoBackupKeyVaultKeyId'] + if geo_backup_user_assigned_identity_id is None and 'geoBackupUserAssignedIdentityId' in kwargs: + geo_backup_user_assigned_identity_id = kwargs['geoBackupUserAssignedIdentityId'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if primary_user_assigned_identity_id is None and 'primaryUserAssignedIdentityId' in kwargs: + primary_user_assigned_identity_id = kwargs['primaryUserAssignedIdentityId'] + if geo_backup_key_vault_key_id is not None: - pulumi.set(__self__, "geo_backup_key_vault_key_id", geo_backup_key_vault_key_id) + _setter("geo_backup_key_vault_key_id", geo_backup_key_vault_key_id) if geo_backup_user_assigned_identity_id is not None: - pulumi.set(__self__, "geo_backup_user_assigned_identity_id", geo_backup_user_assigned_identity_id) + _setter("geo_backup_user_assigned_identity_id", geo_backup_user_assigned_identity_id) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if primary_user_assigned_identity_id is not None: - pulumi.set(__self__, "primary_user_assigned_identity_id", primary_user_assigned_identity_id) + _setter("primary_user_assigned_identity_id", primary_user_assigned_identity_id) @property @pulumi.getter(name="geoBackupKeyVaultKeyId") @@ -104,9 +129,26 @@ def __init__(__self__, *, > **NOTE:** `storage.0.auto_grow_enabled` must be enabled when `high_availability` is enabled. To change the `high_availability` for a MySQL Flexible Server created with `high_availability` disabled during creation, the resource has to be recreated. """ - pulumi.set(__self__, "mode", mode) + FlexibleServerHighAvailabilityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + standby_availability_zone=standby_availability_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + standby_availability_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if standby_availability_zone is None and 'standbyAvailabilityZone' in kwargs: + standby_availability_zone = kwargs['standbyAvailabilityZone'] + + _setter("mode", mode) if standby_availability_zone is not None: - pulumi.set(__self__, "standby_availability_zone", standby_availability_zone) + _setter("standby_availability_zone", standby_availability_zone) @property @pulumi.getter @@ -141,8 +183,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: A list of User Assigned Managed Identity IDs to be assigned to this MySQL Flexible Server. :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that should be configured on this MySQL Flexible Server. The only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + FlexibleServerIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -180,12 +241,33 @@ def __init__(__self__, *, :param pulumi.Input[int] start_hour: The start hour for maintenance window. Defaults to `0`. :param pulumi.Input[int] start_minute: The start minute for maintenance window. Defaults to `0`. """ + FlexibleServerMaintenanceWindowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + start_hour=start_hour, + start_minute=start_minute, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[pulumi.Input[int]] = None, + start_hour: Optional[pulumi.Input[int]] = None, + start_minute: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if start_hour is None and 'startHour' in kwargs: + start_hour = kwargs['startHour'] + if start_minute is None and 'startMinute' in kwargs: + start_minute = kwargs['startMinute'] + if day_of_week is not None: - pulumi.set(__self__, "day_of_week", day_of_week) + _setter("day_of_week", day_of_week) if start_hour is not None: - pulumi.set(__self__, "start_hour", start_hour) + _setter("start_hour", start_hour) if start_minute is not None: - pulumi.set(__self__, "start_minute", start_minute) + _setter("start_minute", start_minute) @property @pulumi.getter(name="dayOfWeek") @@ -237,14 +319,37 @@ def __init__(__self__, *, :param pulumi.Input[int] iops: The storage IOPS for the MySQL Flexible Server. Possible values are between `360` and `20000`. :param pulumi.Input[int] size_gb: The max storage allowed for the MySQL Flexible Server. Possible values are between `20` and `16384`. """ + FlexibleServerStorageArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_grow_enabled=auto_grow_enabled, + io_scaling_enabled=io_scaling_enabled, + iops=iops, + size_gb=size_gb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_grow_enabled: Optional[pulumi.Input[bool]] = None, + io_scaling_enabled: Optional[pulumi.Input[bool]] = None, + iops: Optional[pulumi.Input[int]] = None, + size_gb: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_grow_enabled is None and 'autoGrowEnabled' in kwargs: + auto_grow_enabled = kwargs['autoGrowEnabled'] + if io_scaling_enabled is None and 'ioScalingEnabled' in kwargs: + io_scaling_enabled = kwargs['ioScalingEnabled'] + if size_gb is None and 'sizeGb' in kwargs: + size_gb = kwargs['sizeGb'] + if auto_grow_enabled is not None: - pulumi.set(__self__, "auto_grow_enabled", auto_grow_enabled) + _setter("auto_grow_enabled", auto_grow_enabled) if io_scaling_enabled is not None: - pulumi.set(__self__, "io_scaling_enabled", io_scaling_enabled) + _setter("io_scaling_enabled", io_scaling_enabled) if iops is not None: - pulumi.set(__self__, "iops", iops) + _setter("iops", iops) if size_gb is not None: - pulumi.set(__self__, "size_gb", size_gb) + _setter("size_gb", size_gb) @property @pulumi.getter(name="autoGrowEnabled") @@ -306,11 +411,32 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ServerIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -368,20 +494,55 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. :param pulumi.Input[str] storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. """ + ServerThreatDetectionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins=email_account_admins, + email_addresses=email_addresses, + enabled=enabled, + retention_days=retention_days, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_account_admins: Optional[pulumi.Input[bool]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + retention_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins is None and 'emailAccountAdmins' in kwargs: + email_account_admins = kwargs['emailAccountAdmins'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins is not None: - pulumi.set(__self__, "email_account_admins", email_account_admins) + _setter("email_account_admins", email_account_admins) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") diff --git a/sdk/python/pulumi_azure/mysql/active_directory_administrator.py b/sdk/python/pulumi_azure/mysql/active_directory_administrator.py index 904aa6a366..4beb0ba7fd 100644 --- a/sdk/python/pulumi_azure/mysql/active_directory_administrator.py +++ b/sdk/python/pulumi_azure/mysql/active_directory_administrator.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ActiveDirectoryAdministratorArgs', 'ActiveDirectoryAdministrator'] @@ -27,11 +27,48 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: The name of the MySQL Server on which to set the administrator. Changing this forces a new resource to be created. :param pulumi.Input[str] tenant_id: The Azure Tenant ID """ - pulumi.set(__self__, "login", login) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "tenant_id", tenant_id) + ActiveDirectoryAdministratorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + object_id=object_id, + resource_group_name=resource_group_name, + server_name=server_name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("login", login) + _setter("object_id", object_id) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -110,16 +147,43 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: The name of the MySQL Server on which to set the administrator. Changing this forces a new resource to be created. :param pulumi.Input[str] tenant_id: The Azure Tenant ID """ + _ActiveDirectoryAdministratorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + object_id=object_id, + resource_group_name=resource_group_name, + server_name=server_name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if login is not None: - pulumi.set(__self__, "login", login) + _setter("login", login) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -289,6 +353,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ActiveDirectoryAdministratorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mysql/configuration.py b/sdk/python/pulumi_azure/mysql/configuration.py index 18006cfb8f..143260fc15 100644 --- a/sdk/python/pulumi_azure/mysql/configuration.py +++ b/sdk/python/pulumi_azure/mysql/configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ConfigurationArgs', 'Configuration'] @@ -25,10 +25,39 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the MySQL Server. Changing this forces a new resource to be created. :param pulumi.Input[str] value: Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "value", value) + ConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("value", value) @property @pulumi.getter @@ -93,14 +122,35 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the MySQL Server. Changing this forces a new resource to be created. :param pulumi.Input[str] value: Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. """ + _ConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -272,6 +322,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mysql/database.py b/sdk/python/pulumi_azure/mysql/database.py index 35287784d3..f4fea7fdcb 100644 --- a/sdk/python/pulumi_azure/mysql/database.py +++ b/sdk/python/pulumi_azure/mysql/database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DatabaseArgs', 'Database'] @@ -27,12 +27,43 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the MySQL Server. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the MySQL Database, which needs [to be a valid MySQL identifier](https://dev.mysql.com/doc/refman/5.7/en/identifiers.html). Changing this forces a new resource to be created. """ - pulumi.set(__self__, "charset", charset) - pulumi.set(__self__, "collation", collation) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) + DatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + charset=charset, + collation=collation, + resource_group_name=resource_group_name, + server_name=server_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + charset: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if charset is None: + raise TypeError("Missing 'charset' argument") + if collation is None: + raise TypeError("Missing 'collation' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + + _setter("charset", charset) + _setter("collation", collation) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -111,16 +142,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. :param pulumi.Input[str] server_name: Specifies the name of the MySQL Server. Changing this forces a new resource to be created. """ + _DatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + charset=charset, + collation=collation, + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + charset: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if charset is not None: - pulumi.set(__self__, "charset", charset) + _setter("charset", charset) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) @property @pulumi.getter @@ -298,6 +352,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mysql/firewall_rule.py b/sdk/python/pulumi_azure/mysql/firewall_rule.py index 9347cb509d..08a038e910 100644 --- a/sdk/python/pulumi_azure/mysql/firewall_rule.py +++ b/sdk/python/pulumi_azure/mysql/firewall_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FirewallRuleArgs', 'FirewallRule'] @@ -29,12 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] start_ip_address: Specifies the Start IP Address associated with this Firewall Rule. :param pulumi.Input[str] name: Specifies the name of the MySQL Firewall Rule. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "end_ip_address", end_ip_address) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "start_ip_address", start_ip_address) + FirewallRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + resource_group_name=resource_group_name, + server_name=server_name, + start_ip_address=start_ip_address, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if end_ip_address is None: + raise TypeError("Missing 'end_ip_address' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if start_ip_address is None: + raise TypeError("Missing 'start_ip_address' argument") + + _setter("end_ip_address", end_ip_address) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("start_ip_address", start_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="endIpAddress") @@ -117,16 +152,43 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the MySQL Server. Changing this forces a new resource to be created. :param pulumi.Input[str] start_ip_address: Specifies the Start IP Address associated with this Firewall Rule. """ + _FirewallRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + start_ip_address=start_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if end_ip_address is not None: - pulumi.set(__self__, "end_ip_address", end_ip_address) + _setter("end_ip_address", end_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if start_ip_address is not None: - pulumi.set(__self__, "start_ip_address", start_ip_address) + _setter("start_ip_address", start_ip_address) @property @pulumi.getter(name="endIpAddress") @@ -352,6 +414,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mysql/flexible_database.py b/sdk/python/pulumi_azure/mysql/flexible_database.py index 7bfb0b6b80..8e9c6c6627 100644 --- a/sdk/python/pulumi_azure/mysql/flexible_database.py +++ b/sdk/python/pulumi_azure/mysql/flexible_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FlexibleDatabaseArgs', 'FlexibleDatabase'] @@ -27,12 +27,43 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the MySQL Database, which needs [to be a valid MySQL identifier](https://dev.mysql.com/doc/refman/5.7/en/identifiers.html). Changing this forces a new resource to be created. """ - pulumi.set(__self__, "charset", charset) - pulumi.set(__self__, "collation", collation) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) + FlexibleDatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + charset=charset, + collation=collation, + resource_group_name=resource_group_name, + server_name=server_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + charset: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if charset is None: + raise TypeError("Missing 'charset' argument") + if collation is None: + raise TypeError("Missing 'collation' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + + _setter("charset", charset) + _setter("collation", collation) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -111,16 +142,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. :param pulumi.Input[str] server_name: Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. """ + _FlexibleDatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + charset=charset, + collation=collation, + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + charset: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if charset is not None: - pulumi.set(__self__, "charset", charset) + _setter("charset", charset) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) @property @pulumi.getter @@ -280,6 +334,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FlexibleDatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mysql/flexible_server.py b/sdk/python/pulumi_azure/mysql/flexible_server.py index e4e1d2575b..35ffdb4f1c 100644 --- a/sdk/python/pulumi_azure/mysql/flexible_server.py +++ b/sdk/python/pulumi_azure/mysql/flexible_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -74,49 +74,134 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the MySQL Flexible Server. :param pulumi.Input[str] version: The version of the MySQL Flexible Server to use. Possible values are `5.7`, and `8.0.21`. Changing this forces a new MySQL Flexible Server to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + FlexibleServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + administrator_login=administrator_login, + administrator_password=administrator_password, + backup_retention_days=backup_retention_days, + create_mode=create_mode, + customer_managed_key=customer_managed_key, + delegated_subnet_id=delegated_subnet_id, + geo_redundant_backup_enabled=geo_redundant_backup_enabled, + high_availability=high_availability, + identity=identity, + location=location, + maintenance_window=maintenance_window, + name=name, + point_in_time_restore_time_in_utc=point_in_time_restore_time_in_utc, + private_dns_zone_id=private_dns_zone_id, + replication_role=replication_role, + sku_name=sku_name, + source_server_id=source_server_id, + storage=storage, + tags=tags, + version=version, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_password: Optional[pulumi.Input[str]] = None, + backup_retention_days: Optional[pulumi.Input[int]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + customer_managed_key: Optional[pulumi.Input['FlexibleServerCustomerManagedKeyArgs']] = None, + delegated_subnet_id: Optional[pulumi.Input[str]] = None, + geo_redundant_backup_enabled: Optional[pulumi.Input[bool]] = None, + high_availability: Optional[pulumi.Input['FlexibleServerHighAvailabilityArgs']] = None, + identity: Optional[pulumi.Input['FlexibleServerIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_window: Optional[pulumi.Input['FlexibleServerMaintenanceWindowArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + point_in_time_restore_time_in_utc: Optional[pulumi.Input[str]] = None, + private_dns_zone_id: Optional[pulumi.Input[str]] = None, + replication_role: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + source_server_id: Optional[pulumi.Input[str]] = None, + storage: Optional[pulumi.Input['FlexibleServerStorageArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_password is None and 'administratorPassword' in kwargs: + administrator_password = kwargs['administratorPassword'] + if backup_retention_days is None and 'backupRetentionDays' in kwargs: + backup_retention_days = kwargs['backupRetentionDays'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if delegated_subnet_id is None and 'delegatedSubnetId' in kwargs: + delegated_subnet_id = kwargs['delegatedSubnetId'] + if geo_redundant_backup_enabled is None and 'geoRedundantBackupEnabled' in kwargs: + geo_redundant_backup_enabled = kwargs['geoRedundantBackupEnabled'] + if high_availability is None and 'highAvailability' in kwargs: + high_availability = kwargs['highAvailability'] + if maintenance_window is None and 'maintenanceWindow' in kwargs: + maintenance_window = kwargs['maintenanceWindow'] + if point_in_time_restore_time_in_utc is None and 'pointInTimeRestoreTimeInUtc' in kwargs: + point_in_time_restore_time_in_utc = kwargs['pointInTimeRestoreTimeInUtc'] + if private_dns_zone_id is None and 'privateDnsZoneId' in kwargs: + private_dns_zone_id = kwargs['privateDnsZoneId'] + if replication_role is None and 'replicationRole' in kwargs: + replication_role = kwargs['replicationRole'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if source_server_id is None and 'sourceServerId' in kwargs: + source_server_id = kwargs['sourceServerId'] + + _setter("resource_group_name", resource_group_name) if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_password is not None: - pulumi.set(__self__, "administrator_password", administrator_password) + _setter("administrator_password", administrator_password) if backup_retention_days is not None: - pulumi.set(__self__, "backup_retention_days", backup_retention_days) + _setter("backup_retention_days", backup_retention_days) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if delegated_subnet_id is not None: - pulumi.set(__self__, "delegated_subnet_id", delegated_subnet_id) + _setter("delegated_subnet_id", delegated_subnet_id) if geo_redundant_backup_enabled is not None: - pulumi.set(__self__, "geo_redundant_backup_enabled", geo_redundant_backup_enabled) + _setter("geo_redundant_backup_enabled", geo_redundant_backup_enabled) if high_availability is not None: - pulumi.set(__self__, "high_availability", high_availability) + _setter("high_availability", high_availability) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_window is not None: - pulumi.set(__self__, "maintenance_window", maintenance_window) + _setter("maintenance_window", maintenance_window) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if point_in_time_restore_time_in_utc is not None: - pulumi.set(__self__, "point_in_time_restore_time_in_utc", point_in_time_restore_time_in_utc) + _setter("point_in_time_restore_time_in_utc", point_in_time_restore_time_in_utc) if private_dns_zone_id is not None: - pulumi.set(__self__, "private_dns_zone_id", private_dns_zone_id) + _setter("private_dns_zone_id", private_dns_zone_id) if replication_role is not None: - pulumi.set(__self__, "replication_role", replication_role) + _setter("replication_role", replication_role) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if source_server_id is not None: - pulumi.set(__self__, "source_server_id", source_server_id) + _setter("source_server_id", source_server_id) if storage is not None: - pulumi.set(__self__, "storage", storage) + _setter("storage", storage) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="resourceGroupName") @@ -459,56 +544,149 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the MySQL Flexible Server. :param pulumi.Input[str] version: The version of the MySQL Flexible Server to use. Possible values are `5.7`, and `8.0.21`. Changing this forces a new MySQL Flexible Server to be created. """ + _FlexibleServerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_password=administrator_password, + backup_retention_days=backup_retention_days, + create_mode=create_mode, + customer_managed_key=customer_managed_key, + delegated_subnet_id=delegated_subnet_id, + fqdn=fqdn, + geo_redundant_backup_enabled=geo_redundant_backup_enabled, + high_availability=high_availability, + identity=identity, + location=location, + maintenance_window=maintenance_window, + name=name, + point_in_time_restore_time_in_utc=point_in_time_restore_time_in_utc, + private_dns_zone_id=private_dns_zone_id, + public_network_access_enabled=public_network_access_enabled, + replica_capacity=replica_capacity, + replication_role=replication_role, + resource_group_name=resource_group_name, + sku_name=sku_name, + source_server_id=source_server_id, + storage=storage, + tags=tags, + version=version, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_password: Optional[pulumi.Input[str]] = None, + backup_retention_days: Optional[pulumi.Input[int]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + customer_managed_key: Optional[pulumi.Input['FlexibleServerCustomerManagedKeyArgs']] = None, + delegated_subnet_id: Optional[pulumi.Input[str]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + geo_redundant_backup_enabled: Optional[pulumi.Input[bool]] = None, + high_availability: Optional[pulumi.Input['FlexibleServerHighAvailabilityArgs']] = None, + identity: Optional[pulumi.Input['FlexibleServerIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_window: Optional[pulumi.Input['FlexibleServerMaintenanceWindowArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + point_in_time_restore_time_in_utc: Optional[pulumi.Input[str]] = None, + private_dns_zone_id: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + replica_capacity: Optional[pulumi.Input[int]] = None, + replication_role: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + source_server_id: Optional[pulumi.Input[str]] = None, + storage: Optional[pulumi.Input['FlexibleServerStorageArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_password is None and 'administratorPassword' in kwargs: + administrator_password = kwargs['administratorPassword'] + if backup_retention_days is None and 'backupRetentionDays' in kwargs: + backup_retention_days = kwargs['backupRetentionDays'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if delegated_subnet_id is None and 'delegatedSubnetId' in kwargs: + delegated_subnet_id = kwargs['delegatedSubnetId'] + if geo_redundant_backup_enabled is None and 'geoRedundantBackupEnabled' in kwargs: + geo_redundant_backup_enabled = kwargs['geoRedundantBackupEnabled'] + if high_availability is None and 'highAvailability' in kwargs: + high_availability = kwargs['highAvailability'] + if maintenance_window is None and 'maintenanceWindow' in kwargs: + maintenance_window = kwargs['maintenanceWindow'] + if point_in_time_restore_time_in_utc is None and 'pointInTimeRestoreTimeInUtc' in kwargs: + point_in_time_restore_time_in_utc = kwargs['pointInTimeRestoreTimeInUtc'] + if private_dns_zone_id is None and 'privateDnsZoneId' in kwargs: + private_dns_zone_id = kwargs['privateDnsZoneId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if replica_capacity is None and 'replicaCapacity' in kwargs: + replica_capacity = kwargs['replicaCapacity'] + if replication_role is None and 'replicationRole' in kwargs: + replication_role = kwargs['replicationRole'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if source_server_id is None and 'sourceServerId' in kwargs: + source_server_id = kwargs['sourceServerId'] + if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_password is not None: - pulumi.set(__self__, "administrator_password", administrator_password) + _setter("administrator_password", administrator_password) if backup_retention_days is not None: - pulumi.set(__self__, "backup_retention_days", backup_retention_days) + _setter("backup_retention_days", backup_retention_days) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if delegated_subnet_id is not None: - pulumi.set(__self__, "delegated_subnet_id", delegated_subnet_id) + _setter("delegated_subnet_id", delegated_subnet_id) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if geo_redundant_backup_enabled is not None: - pulumi.set(__self__, "geo_redundant_backup_enabled", geo_redundant_backup_enabled) + _setter("geo_redundant_backup_enabled", geo_redundant_backup_enabled) if high_availability is not None: - pulumi.set(__self__, "high_availability", high_availability) + _setter("high_availability", high_availability) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_window is not None: - pulumi.set(__self__, "maintenance_window", maintenance_window) + _setter("maintenance_window", maintenance_window) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if point_in_time_restore_time_in_utc is not None: - pulumi.set(__self__, "point_in_time_restore_time_in_utc", point_in_time_restore_time_in_utc) + _setter("point_in_time_restore_time_in_utc", point_in_time_restore_time_in_utc) if private_dns_zone_id is not None: - pulumi.set(__self__, "private_dns_zone_id", private_dns_zone_id) + _setter("private_dns_zone_id", private_dns_zone_id) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if replica_capacity is not None: - pulumi.set(__self__, "replica_capacity", replica_capacity) + _setter("replica_capacity", replica_capacity) if replication_role is not None: - pulumi.set(__self__, "replication_role", replication_role) + _setter("replication_role", replication_role) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if source_server_id is not None: - pulumi.set(__self__, "source_server_id", source_server_id) + _setter("source_server_id", source_server_id) if storage is not None: - pulumi.set(__self__, "storage", storage) + _setter("storage", storage) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="administratorLogin") @@ -1002,6 +1180,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FlexibleServerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1042,12 +1224,32 @@ def _internal_init(__self__, __props__.__dict__["administrator_password"] = None if administrator_password is None else pulumi.Output.secret(administrator_password) __props__.__dict__["backup_retention_days"] = backup_retention_days __props__.__dict__["create_mode"] = create_mode + if customer_managed_key is not None and not isinstance(customer_managed_key, FlexibleServerCustomerManagedKeyArgs): + customer_managed_key = customer_managed_key or {} + def _setter(key, value): + customer_managed_key[key] = value + FlexibleServerCustomerManagedKeyArgs._configure(_setter, **customer_managed_key) __props__.__dict__["customer_managed_key"] = customer_managed_key __props__.__dict__["delegated_subnet_id"] = delegated_subnet_id __props__.__dict__["geo_redundant_backup_enabled"] = geo_redundant_backup_enabled + if high_availability is not None and not isinstance(high_availability, FlexibleServerHighAvailabilityArgs): + high_availability = high_availability or {} + def _setter(key, value): + high_availability[key] = value + FlexibleServerHighAvailabilityArgs._configure(_setter, **high_availability) __props__.__dict__["high_availability"] = high_availability + if identity is not None and not isinstance(identity, FlexibleServerIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + FlexibleServerIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location + if maintenance_window is not None and not isinstance(maintenance_window, FlexibleServerMaintenanceWindowArgs): + maintenance_window = maintenance_window or {} + def _setter(key, value): + maintenance_window[key] = value + FlexibleServerMaintenanceWindowArgs._configure(_setter, **maintenance_window) __props__.__dict__["maintenance_window"] = maintenance_window __props__.__dict__["name"] = name __props__.__dict__["point_in_time_restore_time_in_utc"] = point_in_time_restore_time_in_utc @@ -1058,6 +1260,11 @@ def _internal_init(__self__, __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["sku_name"] = sku_name __props__.__dict__["source_server_id"] = source_server_id + if storage is not None and not isinstance(storage, FlexibleServerStorageArgs): + storage = storage or {} + def _setter(key, value): + storage[key] = value + FlexibleServerStorageArgs._configure(_setter, **storage) __props__.__dict__["storage"] = storage __props__.__dict__["tags"] = tags __props__.__dict__["version"] = version diff --git a/sdk/python/pulumi_azure/mysql/flexible_server_active_directory_administrator.py b/sdk/python/pulumi_azure/mysql/flexible_server_active_directory_administrator.py index af323a76f7..77db61d528 100644 --- a/sdk/python/pulumi_azure/mysql/flexible_server_active_directory_administrator.py +++ b/sdk/python/pulumi_azure/mysql/flexible_server_active_directory_administrator.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FlexibleServerActiveDirectoryAdministratorArgs', 'FlexibleServerActiveDirectoryAdministrator'] @@ -22,11 +22,48 @@ def __init__(__self__, *, """ The set of arguments for constructing a FlexibleServerActiveDirectoryAdministrator resource. """ - pulumi.set(__self__, "identity_id", identity_id) - pulumi.set(__self__, "login", login) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "server_id", server_id) - pulumi.set(__self__, "tenant_id", tenant_id) + FlexibleServerActiveDirectoryAdministratorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_id=identity_id, + login=login, + object_id=object_id, + server_id=server_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_id: Optional[pulumi.Input[str]] = None, + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if identity_id is None: + raise TypeError("Missing 'identity_id' argument") + if login is None: + raise TypeError("Missing 'login' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("identity_id", identity_id) + _setter("login", login) + _setter("object_id", object_id) + _setter("server_id", server_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="identityId") @@ -85,16 +122,43 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering FlexibleServerActiveDirectoryAdministrator resources. """ + _FlexibleServerActiveDirectoryAdministratorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_id=identity_id, + login=login, + object_id=object_id, + server_id=server_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_id: Optional[pulumi.Input[str]] = None, + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if login is not None: - pulumi.set(__self__, "login", login) + _setter("login", login) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="identityId") @@ -181,6 +245,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FlexibleServerActiveDirectoryAdministratorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mysql/flexible_server_active_directory_administratory.py b/sdk/python/pulumi_azure/mysql/flexible_server_active_directory_administratory.py index 77c2f3c8e2..aa42b3775a 100644 --- a/sdk/python/pulumi_azure/mysql/flexible_server_active_directory_administratory.py +++ b/sdk/python/pulumi_azure/mysql/flexible_server_active_directory_administratory.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FlexibleServerActiveDirectoryAdministratoryArgs', 'FlexibleServerActiveDirectoryAdministratory'] @@ -22,11 +22,48 @@ def __init__(__self__, *, """ The set of arguments for constructing a FlexibleServerActiveDirectoryAdministratory resource. """ - pulumi.set(__self__, "identity_id", identity_id) - pulumi.set(__self__, "login", login) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "server_id", server_id) - pulumi.set(__self__, "tenant_id", tenant_id) + FlexibleServerActiveDirectoryAdministratoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_id=identity_id, + login=login, + object_id=object_id, + server_id=server_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_id: Optional[pulumi.Input[str]] = None, + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if identity_id is None: + raise TypeError("Missing 'identity_id' argument") + if login is None: + raise TypeError("Missing 'login' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("identity_id", identity_id) + _setter("login", login) + _setter("object_id", object_id) + _setter("server_id", server_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="identityId") @@ -85,16 +122,43 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering FlexibleServerActiveDirectoryAdministratory resources. """ + _FlexibleServerActiveDirectoryAdministratoryState._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_id=identity_id, + login=login, + object_id=object_id, + server_id=server_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_id: Optional[pulumi.Input[str]] = None, + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if identity_id is not None: - pulumi.set(__self__, "identity_id", identity_id) + _setter("identity_id", identity_id) if login is not None: - pulumi.set(__self__, "login", login) + _setter("login", login) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="identityId") @@ -176,6 +240,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FlexibleServerActiveDirectoryAdministratoryArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mysql/flexible_server_configuration.py b/sdk/python/pulumi_azure/mysql/flexible_server_configuration.py index 6e5e0353fa..172d4cf727 100644 --- a/sdk/python/pulumi_azure/mysql/flexible_server_configuration.py +++ b/sdk/python/pulumi_azure/mysql/flexible_server_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FlexibleServerConfigurationArgs', 'FlexibleServerConfiguration'] @@ -25,11 +25,38 @@ def __init__(__self__, *, :param pulumi.Input[str] value: Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. :param pulumi.Input[str] name: Specifies the name of the MySQL Flexible Server Configuration, which needs [to be a valid MySQL configuration name](https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html). Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "value", value) + FlexibleServerConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("value", value) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="resourceGroupName") @@ -94,14 +121,35 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. :param pulumi.Input[str] value: Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. """ + _FlexibleServerConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -253,6 +301,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FlexibleServerConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mysql/flexible_server_firewall_rule.py b/sdk/python/pulumi_azure/mysql/flexible_server_firewall_rule.py index 7350077bde..4779e7531d 100644 --- a/sdk/python/pulumi_azure/mysql/flexible_server_firewall_rule.py +++ b/sdk/python/pulumi_azure/mysql/flexible_server_firewall_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FlexibleServerFirewallRuleArgs', 'FlexibleServerFirewallRule'] @@ -29,12 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] start_ip_address: Specifies the Start IP Address associated with this Firewall Rule. :param pulumi.Input[str] name: Specifies the name of the MySQL Firewall Rule. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "end_ip_address", end_ip_address) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "start_ip_address", start_ip_address) + FlexibleServerFirewallRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + resource_group_name=resource_group_name, + server_name=server_name, + start_ip_address=start_ip_address, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if end_ip_address is None: + raise TypeError("Missing 'end_ip_address' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if start_ip_address is None: + raise TypeError("Missing 'start_ip_address' argument") + + _setter("end_ip_address", end_ip_address) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("start_ip_address", start_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="endIpAddress") @@ -117,16 +152,43 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. :param pulumi.Input[str] start_ip_address: Specifies the Start IP Address associated with this Firewall Rule. """ + _FlexibleServerFirewallRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + start_ip_address=start_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if end_ip_address is not None: - pulumi.set(__self__, "end_ip_address", end_ip_address) + _setter("end_ip_address", end_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if start_ip_address is not None: - pulumi.set(__self__, "start_ip_address", start_ip_address) + _setter("start_ip_address", start_ip_address) @property @pulumi.getter(name="endIpAddress") @@ -350,6 +412,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FlexibleServerFirewallRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mysql/get_flexible_server.py b/sdk/python/pulumi_azure/mysql/get_flexible_server.py index 8730e5b703..c0294fc768 100644 --- a/sdk/python/pulumi_azure/mysql/get_flexible_server.py +++ b/sdk/python/pulumi_azure/mysql/get_flexible_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/mysql/get_server.py b/sdk/python/pulumi_azure/mysql/get_server.py index dc7b4a17b9..6ef7ac10e4 100644 --- a/sdk/python/pulumi_azure/mysql/get_server.py +++ b/sdk/python/pulumi_azure/mysql/get_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/mysql/outputs.py b/sdk/python/pulumi_azure/mysql/outputs.py index dd4b41c9d8..6ec3dea508 100644 --- a/sdk/python/pulumi_azure/mysql/outputs.py +++ b/sdk/python/pulumi_azure/mysql/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -62,14 +62,39 @@ def __init__(__self__, *, :param str key_vault_key_id: The ID of the Key Vault Key. :param str primary_user_assigned_identity_id: Specifies the primary user managed identity id for a Customer Managed Key. Should be added with `identity_ids`. """ + FlexibleServerCustomerManagedKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + geo_backup_key_vault_key_id=geo_backup_key_vault_key_id, + geo_backup_user_assigned_identity_id=geo_backup_user_assigned_identity_id, + key_vault_key_id=key_vault_key_id, + primary_user_assigned_identity_id=primary_user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + geo_backup_key_vault_key_id: Optional[str] = None, + geo_backup_user_assigned_identity_id: Optional[str] = None, + key_vault_key_id: Optional[str] = None, + primary_user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if geo_backup_key_vault_key_id is None and 'geoBackupKeyVaultKeyId' in kwargs: + geo_backup_key_vault_key_id = kwargs['geoBackupKeyVaultKeyId'] + if geo_backup_user_assigned_identity_id is None and 'geoBackupUserAssignedIdentityId' in kwargs: + geo_backup_user_assigned_identity_id = kwargs['geoBackupUserAssignedIdentityId'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if primary_user_assigned_identity_id is None and 'primaryUserAssignedIdentityId' in kwargs: + primary_user_assigned_identity_id = kwargs['primaryUserAssignedIdentityId'] + if geo_backup_key_vault_key_id is not None: - pulumi.set(__self__, "geo_backup_key_vault_key_id", geo_backup_key_vault_key_id) + _setter("geo_backup_key_vault_key_id", geo_backup_key_vault_key_id) if geo_backup_user_assigned_identity_id is not None: - pulumi.set(__self__, "geo_backup_user_assigned_identity_id", geo_backup_user_assigned_identity_id) + _setter("geo_backup_user_assigned_identity_id", geo_backup_user_assigned_identity_id) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if primary_user_assigned_identity_id is not None: - pulumi.set(__self__, "primary_user_assigned_identity_id", primary_user_assigned_identity_id) + _setter("primary_user_assigned_identity_id", primary_user_assigned_identity_id) @property @pulumi.getter(name="geoBackupKeyVaultKeyId") @@ -133,9 +158,26 @@ def __init__(__self__, *, > **NOTE:** `storage.0.auto_grow_enabled` must be enabled when `high_availability` is enabled. To change the `high_availability` for a MySQL Flexible Server created with `high_availability` disabled during creation, the resource has to be recreated. """ - pulumi.set(__self__, "mode", mode) + FlexibleServerHighAvailability._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + standby_availability_zone=standby_availability_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + standby_availability_zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if standby_availability_zone is None and 'standbyAvailabilityZone' in kwargs: + standby_availability_zone = kwargs['standbyAvailabilityZone'] + + _setter("mode", mode) if standby_availability_zone is not None: - pulumi.set(__self__, "standby_availability_zone", standby_availability_zone) + _setter("standby_availability_zone", standby_availability_zone) @property @pulumi.getter @@ -179,8 +221,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: A list of User Assigned Managed Identity IDs to be assigned to this MySQL Flexible Server. :param str type: Specifies the type of Managed Service Identity that should be configured on this MySQL Flexible Server. The only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + FlexibleServerIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -231,12 +292,33 @@ def __init__(__self__, *, :param int start_hour: The start hour for maintenance window. Defaults to `0`. :param int start_minute: The start minute for maintenance window. Defaults to `0`. """ + FlexibleServerMaintenanceWindow._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + start_hour=start_hour, + start_minute=start_minute, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[int] = None, + start_hour: Optional[int] = None, + start_minute: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if start_hour is None and 'startHour' in kwargs: + start_hour = kwargs['startHour'] + if start_minute is None and 'startMinute' in kwargs: + start_minute = kwargs['startMinute'] + if day_of_week is not None: - pulumi.set(__self__, "day_of_week", day_of_week) + _setter("day_of_week", day_of_week) if start_hour is not None: - pulumi.set(__self__, "start_hour", start_hour) + _setter("start_hour", start_hour) if start_minute is not None: - pulumi.set(__self__, "start_minute", start_minute) + _setter("start_minute", start_minute) @property @pulumi.getter(name="dayOfWeek") @@ -297,14 +379,37 @@ def __init__(__self__, *, :param int iops: The storage IOPS for the MySQL Flexible Server. Possible values are between `360` and `20000`. :param int size_gb: The max storage allowed for the MySQL Flexible Server. Possible values are between `20` and `16384`. """ + FlexibleServerStorage._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_grow_enabled=auto_grow_enabled, + io_scaling_enabled=io_scaling_enabled, + iops=iops, + size_gb=size_gb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_grow_enabled: Optional[bool] = None, + io_scaling_enabled: Optional[bool] = None, + iops: Optional[int] = None, + size_gb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_grow_enabled is None and 'autoGrowEnabled' in kwargs: + auto_grow_enabled = kwargs['autoGrowEnabled'] + if io_scaling_enabled is None and 'ioScalingEnabled' in kwargs: + io_scaling_enabled = kwargs['ioScalingEnabled'] + if size_gb is None and 'sizeGb' in kwargs: + size_gb = kwargs['sizeGb'] + if auto_grow_enabled is not None: - pulumi.set(__self__, "auto_grow_enabled", auto_grow_enabled) + _setter("auto_grow_enabled", auto_grow_enabled) if io_scaling_enabled is not None: - pulumi.set(__self__, "io_scaling_enabled", io_scaling_enabled) + _setter("io_scaling_enabled", io_scaling_enabled) if iops is not None: - pulumi.set(__self__, "iops", iops) + _setter("iops", iops) if size_gb is not None: - pulumi.set(__self__, "size_gb", size_gb) + _setter("size_gb", size_gb) @property @pulumi.getter(name="autoGrowEnabled") @@ -369,11 +474,32 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ServerIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -446,20 +572,55 @@ def __init__(__self__, *, :param str storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. :param str storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. """ + ServerThreatDetectionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins=email_account_admins, + email_addresses=email_addresses, + enabled=enabled, + retention_days=retention_days, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[Sequence[str]] = None, + email_account_admins: Optional[bool] = None, + email_addresses: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + retention_days: Optional[int] = None, + storage_account_access_key: Optional[str] = None, + storage_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins is None and 'emailAccountAdmins' in kwargs: + email_account_admins = kwargs['emailAccountAdmins'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins is not None: - pulumi.set(__self__, "email_account_admins", email_account_admins) + _setter("email_account_admins", email_account_admins) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") @@ -527,8 +688,27 @@ def __init__(__self__, *, :param str mode: The high availability mode of the MySQL Flexible Server. :param str standby_availability_zone: The availability zone of the standby Flexible Server. """ - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "standby_availability_zone", standby_availability_zone) + GetFlexibleServerHighAvailabilityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + standby_availability_zone=standby_availability_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + standby_availability_zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if standby_availability_zone is None and 'standbyAvailabilityZone' in kwargs: + standby_availability_zone = kwargs['standbyAvailabilityZone'] + if standby_availability_zone is None: + raise TypeError("Missing 'standby_availability_zone' argument") + + _setter("mode", mode) + _setter("standby_availability_zone", standby_availability_zone) @property @pulumi.getter @@ -558,9 +738,36 @@ def __init__(__self__, *, :param int start_hour: The start hour of the maintenance window. :param int start_minute: The start minute of the maintenance window. """ - pulumi.set(__self__, "day_of_week", day_of_week) - pulumi.set(__self__, "start_hour", start_hour) - pulumi.set(__self__, "start_minute", start_minute) + GetFlexibleServerMaintenanceWindowResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + start_hour=start_hour, + start_minute=start_minute, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[int] = None, + start_hour: Optional[int] = None, + start_minute: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if day_of_week is None: + raise TypeError("Missing 'day_of_week' argument") + if start_hour is None and 'startHour' in kwargs: + start_hour = kwargs['startHour'] + if start_hour is None: + raise TypeError("Missing 'start_hour' argument") + if start_minute is None and 'startMinute' in kwargs: + start_minute = kwargs['startMinute'] + if start_minute is None: + raise TypeError("Missing 'start_minute' argument") + + _setter("day_of_week", day_of_week) + _setter("start_hour", start_hour) + _setter("start_minute", start_minute) @property @pulumi.getter(name="dayOfWeek") @@ -600,10 +807,41 @@ def __init__(__self__, *, :param int iops: The storage IOPS of the MySQL Flexible Server. :param int size_gb: The max storage allowed for the MySQL Flexible Server. """ - pulumi.set(__self__, "auto_grow_enabled", auto_grow_enabled) - pulumi.set(__self__, "io_scaling_enabled", io_scaling_enabled) - pulumi.set(__self__, "iops", iops) - pulumi.set(__self__, "size_gb", size_gb) + GetFlexibleServerStorageResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_grow_enabled=auto_grow_enabled, + io_scaling_enabled=io_scaling_enabled, + iops=iops, + size_gb=size_gb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_grow_enabled: Optional[bool] = None, + io_scaling_enabled: Optional[bool] = None, + iops: Optional[int] = None, + size_gb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_grow_enabled is None and 'autoGrowEnabled' in kwargs: + auto_grow_enabled = kwargs['autoGrowEnabled'] + if auto_grow_enabled is None: + raise TypeError("Missing 'auto_grow_enabled' argument") + if io_scaling_enabled is None and 'ioScalingEnabled' in kwargs: + io_scaling_enabled = kwargs['ioScalingEnabled'] + if io_scaling_enabled is None: + raise TypeError("Missing 'io_scaling_enabled' argument") + if iops is None: + raise TypeError("Missing 'iops' argument") + if size_gb is None and 'sizeGb' in kwargs: + size_gb = kwargs['sizeGb'] + if size_gb is None: + raise TypeError("Missing 'size_gb' argument") + + _setter("auto_grow_enabled", auto_grow_enabled) + _setter("io_scaling_enabled", io_scaling_enabled) + _setter("iops", iops) + _setter("size_gb", size_gb) @property @pulumi.getter(name="autoGrowEnabled") @@ -649,9 +887,34 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID associated with this Managed Service Identity. :param str type: The identity type of this Managed Service Identity. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetServerIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="principalId") @@ -697,13 +960,62 @@ def __init__(__self__, *, :param str storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. :param str storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. """ - pulumi.set(__self__, "disabled_alerts", disabled_alerts) - pulumi.set(__self__, "email_account_admins", email_account_admins) - pulumi.set(__self__, "email_addresses", email_addresses) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "retention_days", retention_days) - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + GetServerThreatDetectionPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins=email_account_admins, + email_addresses=email_addresses, + enabled=enabled, + retention_days=retention_days, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[Sequence[str]] = None, + email_account_admins: Optional[bool] = None, + email_addresses: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + retention_days: Optional[int] = None, + storage_account_access_key: Optional[str] = None, + storage_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if disabled_alerts is None: + raise TypeError("Missing 'disabled_alerts' argument") + if email_account_admins is None and 'emailAccountAdmins' in kwargs: + email_account_admins = kwargs['emailAccountAdmins'] + if email_account_admins is None: + raise TypeError("Missing 'email_account_admins' argument") + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if email_addresses is None: + raise TypeError("Missing 'email_addresses' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if retention_days is None: + raise TypeError("Missing 'retention_days' argument") + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key is None: + raise TypeError("Missing 'storage_account_access_key' argument") + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if storage_endpoint is None: + raise TypeError("Missing 'storage_endpoint' argument") + + _setter("disabled_alerts", disabled_alerts) + _setter("email_account_admins", email_account_admins) + _setter("email_addresses", email_addresses) + _setter("enabled", enabled) + _setter("retention_days", retention_days) + _setter("storage_account_access_key", storage_account_access_key) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") diff --git a/sdk/python/pulumi_azure/mysql/server.py b/sdk/python/pulumi_azure/mysql/server.py index 7498074a85..ba98d59ca1 100644 --- a/sdk/python/pulumi_azure/mysql/server.py +++ b/sdk/python/pulumi_azure/mysql/server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -61,44 +61,135 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input['ServerThreatDetectionPolicyArgs'] threat_detection_policy: Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threat_detection_policy` block supports fields documented below. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "ssl_enforcement_enabled", ssl_enforcement_enabled) - pulumi.set(__self__, "version", version) + ServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + ssl_enforcement_enabled=ssl_enforcement_enabled, + version=version, + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + auto_grow_enabled=auto_grow_enabled, + backup_retention_days=backup_retention_days, + create_mode=create_mode, + creation_source_server_id=creation_source_server_id, + geo_redundant_backup_enabled=geo_redundant_backup_enabled, + identity=identity, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + restore_point_in_time=restore_point_in_time, + ssl_minimal_tls_version_enforced=ssl_minimal_tls_version_enforced, + storage_mb=storage_mb, + tags=tags, + threat_detection_policy=threat_detection_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + ssl_enforcement_enabled: Optional[pulumi.Input[bool]] = None, + version: Optional[pulumi.Input[str]] = None, + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + auto_grow_enabled: Optional[pulumi.Input[bool]] = None, + backup_retention_days: Optional[pulumi.Input[int]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + creation_source_server_id: Optional[pulumi.Input[str]] = None, + geo_redundant_backup_enabled: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['ServerIdentityArgs']] = None, + infrastructure_encryption_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + restore_point_in_time: Optional[pulumi.Input[str]] = None, + ssl_minimal_tls_version_enforced: Optional[pulumi.Input[str]] = None, + storage_mb: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_detection_policy: Optional[pulumi.Input['ServerThreatDetectionPolicyArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if ssl_enforcement_enabled is None and 'sslEnforcementEnabled' in kwargs: + ssl_enforcement_enabled = kwargs['sslEnforcementEnabled'] + if ssl_enforcement_enabled is None: + raise TypeError("Missing 'ssl_enforcement_enabled' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if auto_grow_enabled is None and 'autoGrowEnabled' in kwargs: + auto_grow_enabled = kwargs['autoGrowEnabled'] + if backup_retention_days is None and 'backupRetentionDays' in kwargs: + backup_retention_days = kwargs['backupRetentionDays'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if creation_source_server_id is None and 'creationSourceServerId' in kwargs: + creation_source_server_id = kwargs['creationSourceServerId'] + if geo_redundant_backup_enabled is None and 'geoRedundantBackupEnabled' in kwargs: + geo_redundant_backup_enabled = kwargs['geoRedundantBackupEnabled'] + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if restore_point_in_time is None and 'restorePointInTime' in kwargs: + restore_point_in_time = kwargs['restorePointInTime'] + if ssl_minimal_tls_version_enforced is None and 'sslMinimalTlsVersionEnforced' in kwargs: + ssl_minimal_tls_version_enforced = kwargs['sslMinimalTlsVersionEnforced'] + if storage_mb is None and 'storageMb' in kwargs: + storage_mb = kwargs['storageMb'] + if threat_detection_policy is None and 'threatDetectionPolicy' in kwargs: + threat_detection_policy = kwargs['threatDetectionPolicy'] + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("ssl_enforcement_enabled", ssl_enforcement_enabled) + _setter("version", version) if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_login_password is not None: - pulumi.set(__self__, "administrator_login_password", administrator_login_password) + _setter("administrator_login_password", administrator_login_password) if auto_grow_enabled is not None: - pulumi.set(__self__, "auto_grow_enabled", auto_grow_enabled) + _setter("auto_grow_enabled", auto_grow_enabled) if backup_retention_days is not None: - pulumi.set(__self__, "backup_retention_days", backup_retention_days) + _setter("backup_retention_days", backup_retention_days) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if creation_source_server_id is not None: - pulumi.set(__self__, "creation_source_server_id", creation_source_server_id) + _setter("creation_source_server_id", creation_source_server_id) if geo_redundant_backup_enabled is not None: - pulumi.set(__self__, "geo_redundant_backup_enabled", geo_redundant_backup_enabled) + _setter("geo_redundant_backup_enabled", geo_redundant_backup_enabled) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if restore_point_in_time is not None: - pulumi.set(__self__, "restore_point_in_time", restore_point_in_time) + _setter("restore_point_in_time", restore_point_in_time) if ssl_minimal_tls_version_enforced is not None: - pulumi.set(__self__, "ssl_minimal_tls_version_enforced", ssl_minimal_tls_version_enforced) + _setter("ssl_minimal_tls_version_enforced", ssl_minimal_tls_version_enforced) if storage_mb is not None: - pulumi.set(__self__, "storage_mb", storage_mb) + _setter("storage_mb", storage_mb) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_detection_policy is not None: - pulumi.set(__self__, "threat_detection_policy", threat_detection_policy) + _setter("threat_detection_policy", threat_detection_policy) @property @pulumi.getter(name="resourceGroupName") @@ -403,50 +494,135 @@ def __init__(__self__, *, :param pulumi.Input['ServerThreatDetectionPolicyArgs'] threat_detection_policy: Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threat_detection_policy` block supports fields documented below. :param pulumi.Input[str] version: Specifies the version of MySQL to use. Valid values are `5.7`, or `8.0`. Changing this forces a new resource to be created. """ + _ServerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + auto_grow_enabled=auto_grow_enabled, + backup_retention_days=backup_retention_days, + create_mode=create_mode, + creation_source_server_id=creation_source_server_id, + fqdn=fqdn, + geo_redundant_backup_enabled=geo_redundant_backup_enabled, + identity=identity, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + restore_point_in_time=restore_point_in_time, + sku_name=sku_name, + ssl_enforcement_enabled=ssl_enforcement_enabled, + ssl_minimal_tls_version_enforced=ssl_minimal_tls_version_enforced, + storage_mb=storage_mb, + tags=tags, + threat_detection_policy=threat_detection_policy, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + auto_grow_enabled: Optional[pulumi.Input[bool]] = None, + backup_retention_days: Optional[pulumi.Input[int]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + creation_source_server_id: Optional[pulumi.Input[str]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + geo_redundant_backup_enabled: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['ServerIdentityArgs']] = None, + infrastructure_encryption_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + restore_point_in_time: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + ssl_enforcement_enabled: Optional[pulumi.Input[bool]] = None, + ssl_minimal_tls_version_enforced: Optional[pulumi.Input[str]] = None, + storage_mb: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_detection_policy: Optional[pulumi.Input['ServerThreatDetectionPolicyArgs']] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if auto_grow_enabled is None and 'autoGrowEnabled' in kwargs: + auto_grow_enabled = kwargs['autoGrowEnabled'] + if backup_retention_days is None and 'backupRetentionDays' in kwargs: + backup_retention_days = kwargs['backupRetentionDays'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if creation_source_server_id is None and 'creationSourceServerId' in kwargs: + creation_source_server_id = kwargs['creationSourceServerId'] + if geo_redundant_backup_enabled is None and 'geoRedundantBackupEnabled' in kwargs: + geo_redundant_backup_enabled = kwargs['geoRedundantBackupEnabled'] + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if restore_point_in_time is None and 'restorePointInTime' in kwargs: + restore_point_in_time = kwargs['restorePointInTime'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if ssl_enforcement_enabled is None and 'sslEnforcementEnabled' in kwargs: + ssl_enforcement_enabled = kwargs['sslEnforcementEnabled'] + if ssl_minimal_tls_version_enforced is None and 'sslMinimalTlsVersionEnforced' in kwargs: + ssl_minimal_tls_version_enforced = kwargs['sslMinimalTlsVersionEnforced'] + if storage_mb is None and 'storageMb' in kwargs: + storage_mb = kwargs['storageMb'] + if threat_detection_policy is None and 'threatDetectionPolicy' in kwargs: + threat_detection_policy = kwargs['threatDetectionPolicy'] + if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_login_password is not None: - pulumi.set(__self__, "administrator_login_password", administrator_login_password) + _setter("administrator_login_password", administrator_login_password) if auto_grow_enabled is not None: - pulumi.set(__self__, "auto_grow_enabled", auto_grow_enabled) + _setter("auto_grow_enabled", auto_grow_enabled) if backup_retention_days is not None: - pulumi.set(__self__, "backup_retention_days", backup_retention_days) + _setter("backup_retention_days", backup_retention_days) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if creation_source_server_id is not None: - pulumi.set(__self__, "creation_source_server_id", creation_source_server_id) + _setter("creation_source_server_id", creation_source_server_id) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if geo_redundant_backup_enabled is not None: - pulumi.set(__self__, "geo_redundant_backup_enabled", geo_redundant_backup_enabled) + _setter("geo_redundant_backup_enabled", geo_redundant_backup_enabled) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if restore_point_in_time is not None: - pulumi.set(__self__, "restore_point_in_time", restore_point_in_time) + _setter("restore_point_in_time", restore_point_in_time) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if ssl_enforcement_enabled is not None: - pulumi.set(__self__, "ssl_enforcement_enabled", ssl_enforcement_enabled) + _setter("ssl_enforcement_enabled", ssl_enforcement_enabled) if ssl_minimal_tls_version_enforced is not None: - pulumi.set(__self__, "ssl_minimal_tls_version_enforced", ssl_minimal_tls_version_enforced) + _setter("ssl_minimal_tls_version_enforced", ssl_minimal_tls_version_enforced) if storage_mb is not None: - pulumi.set(__self__, "storage_mb", storage_mb) + _setter("storage_mb", storage_mb) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_detection_policy is not None: - pulumi.set(__self__, "threat_detection_policy", threat_detection_policy) + _setter("threat_detection_policy", threat_detection_policy) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="administratorLogin") @@ -850,6 +1026,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -892,6 +1072,11 @@ def _internal_init(__self__, __props__.__dict__["create_mode"] = create_mode __props__.__dict__["creation_source_server_id"] = creation_source_server_id __props__.__dict__["geo_redundant_backup_enabled"] = geo_redundant_backup_enabled + if identity is not None and not isinstance(identity, ServerIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ServerIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["infrastructure_encryption_enabled"] = infrastructure_encryption_enabled __props__.__dict__["location"] = location @@ -910,6 +1095,11 @@ def _internal_init(__self__, __props__.__dict__["ssl_minimal_tls_version_enforced"] = ssl_minimal_tls_version_enforced __props__.__dict__["storage_mb"] = storage_mb __props__.__dict__["tags"] = tags + if threat_detection_policy is not None and not isinstance(threat_detection_policy, ServerThreatDetectionPolicyArgs): + threat_detection_policy = threat_detection_policy or {} + def _setter(key, value): + threat_detection_policy[key] = value + ServerThreatDetectionPolicyArgs._configure(_setter, **threat_detection_policy) __props__.__dict__["threat_detection_policy"] = threat_detection_policy if version is None and not opts.urn: raise TypeError("Missing required property 'version'") diff --git a/sdk/python/pulumi_azure/mysql/server_key.py b/sdk/python/pulumi_azure/mysql/server_key.py index e6746098c1..8f302128eb 100644 --- a/sdk/python/pulumi_azure/mysql/server_key.py +++ b/sdk/python/pulumi_azure/mysql/server_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServerKeyArgs', 'ServerKey'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The URL to a Key Vault Key. :param pulumi.Input[str] server_id: The ID of the MySQL Server. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) - pulumi.set(__self__, "server_id", server_id) + ServerKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + server_id=server_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + + _setter("key_vault_key_id", key_vault_key_id) + _setter("server_id", server_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The URL to a Key Vault Key. :param pulumi.Input[str] server_id: The ID of the MySQL Server. Changing this forces a new resource to be created. """ + _ServerKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + server_id=server_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -298,6 +336,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerKeyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/mysql/virtual_network_rule.py b/sdk/python/pulumi_azure/mysql/virtual_network_rule.py index 9ddb744d60..ab3791e9c8 100644 --- a/sdk/python/pulumi_azure/mysql/virtual_network_rule.py +++ b/sdk/python/pulumi_azure/mysql/virtual_network_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VirtualNetworkRuleArgs', 'VirtualNetworkRule'] @@ -33,11 +33,40 @@ def __init__(__self__, *, 2. Cannot start with a number or hyphen 3. Cannot end with a hyphen """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "subnet_id", subnet_id) + VirtualNetworkRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + server_name=server_name, + subnet_id=subnet_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("subnet_id", subnet_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="resourceGroupName") @@ -118,14 +147,37 @@ def __init__(__self__, *, > **NOTE:** Due to [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/3719) this resource currently doesn't expose the `ignore_missing_vnet_service_endpoint` field and defaults this to `false`. This provider will check during the provisioning of the Virtual Network Rule that the Subnet contains the Service Rule to verify that the Virtual Network Rule can be created. """ + _VirtualNetworkRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -317,6 +369,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/netapp/_inputs.py b/sdk/python/pulumi_azure/netapp/_inputs.py index 9de36f04b5..af4cfd85b9 100644 --- a/sdk/python/pulumi_azure/netapp/_inputs.py +++ b/sdk/python/pulumi_azure/netapp/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -41,13 +41,50 @@ def __init__(__self__, *, :param pulumi.Input[str] username: The Username of Active Directory Domain Administrator. :param pulumi.Input[str] organizational_unit: The Organizational Unit (OU) within the Active Directory Domain. """ - pulumi.set(__self__, "dns_servers", dns_servers) - pulumi.set(__self__, "domain", domain) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "smb_server_name", smb_server_name) - pulumi.set(__self__, "username", username) + AccountActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_servers=dns_servers, + domain=domain, + password=password, + smb_server_name=smb_server_name, + username=username, + organizational_unit=organizational_unit, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + domain: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + smb_server_name: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + organizational_unit: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if dns_servers is None: + raise TypeError("Missing 'dns_servers' argument") + if domain is None: + raise TypeError("Missing 'domain' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if smb_server_name is None and 'smbServerName' in kwargs: + smb_server_name = kwargs['smbServerName'] + if smb_server_name is None: + raise TypeError("Missing 'smb_server_name' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if organizational_unit is None and 'organizationalUnit' in kwargs: + organizational_unit = kwargs['organizationalUnit'] + + _setter("dns_servers", dns_servers) + _setter("domain", domain) + _setter("password", password) + _setter("smb_server_name", smb_server_name) + _setter("username", username) if organizational_unit is not None: - pulumi.set(__self__, "organizational_unit", organizational_unit) + _setter("organizational_unit", organizational_unit) @property @pulumi.getter(name="dnsServers") @@ -133,9 +170,32 @@ def __init__(__self__, *, :param pulumi.Input[int] minute: Minute of the hour that the snapshots will be created, valid range is from 0 to 59. :param pulumi.Input[int] snapshots_to_keep: How many hourly snapshots to keep, valid range is from 0 to 255. """ - pulumi.set(__self__, "hour", hour) - pulumi.set(__self__, "minute", minute) - pulumi.set(__self__, "snapshots_to_keep", snapshots_to_keep) + SnapshotPolicyDailyScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + hour=hour, + minute=minute, + snapshots_to_keep=snapshots_to_keep, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hour: Optional[pulumi.Input[int]] = None, + minute: Optional[pulumi.Input[int]] = None, + snapshots_to_keep: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hour is None: + raise TypeError("Missing 'hour' argument") + if minute is None: + raise TypeError("Missing 'minute' argument") + if snapshots_to_keep is None and 'snapshotsToKeep' in kwargs: + snapshots_to_keep = kwargs['snapshotsToKeep'] + if snapshots_to_keep is None: + raise TypeError("Missing 'snapshots_to_keep' argument") + + _setter("hour", hour) + _setter("minute", minute) + _setter("snapshots_to_keep", snapshots_to_keep) @property @pulumi.getter @@ -183,8 +243,27 @@ def __init__(__self__, *, :param pulumi.Input[int] minute: Minute of the hour that the snapshots will be created, valid range is from 0 to 59. :param pulumi.Input[int] snapshots_to_keep: How many hourly snapshots to keep, valid range is from 0 to 255. """ - pulumi.set(__self__, "minute", minute) - pulumi.set(__self__, "snapshots_to_keep", snapshots_to_keep) + SnapshotPolicyHourlyScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + minute=minute, + snapshots_to_keep=snapshots_to_keep, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + minute: Optional[pulumi.Input[int]] = None, + snapshots_to_keep: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if minute is None: + raise TypeError("Missing 'minute' argument") + if snapshots_to_keep is None and 'snapshotsToKeep' in kwargs: + snapshots_to_keep = kwargs['snapshotsToKeep'] + if snapshots_to_keep is None: + raise TypeError("Missing 'snapshots_to_keep' argument") + + _setter("minute", minute) + _setter("snapshots_to_keep", snapshots_to_keep) @property @pulumi.getter @@ -224,10 +303,39 @@ def __init__(__self__, *, :param pulumi.Input[int] minute: Minute of the hour that the snapshots will be created, valid range is from 0 to 59. :param pulumi.Input[int] snapshots_to_keep: How many hourly snapshots to keep, valid range is from 0 to 255. """ - pulumi.set(__self__, "days_of_months", days_of_months) - pulumi.set(__self__, "hour", hour) - pulumi.set(__self__, "minute", minute) - pulumi.set(__self__, "snapshots_to_keep", snapshots_to_keep) + SnapshotPolicyMonthlyScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_months=days_of_months, + hour=hour, + minute=minute, + snapshots_to_keep=snapshots_to_keep, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_months: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + hour: Optional[pulumi.Input[int]] = None, + minute: Optional[pulumi.Input[int]] = None, + snapshots_to_keep: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_months is None and 'daysOfMonths' in kwargs: + days_of_months = kwargs['daysOfMonths'] + if days_of_months is None: + raise TypeError("Missing 'days_of_months' argument") + if hour is None: + raise TypeError("Missing 'hour' argument") + if minute is None: + raise TypeError("Missing 'minute' argument") + if snapshots_to_keep is None and 'snapshotsToKeep' in kwargs: + snapshots_to_keep = kwargs['snapshotsToKeep'] + if snapshots_to_keep is None: + raise TypeError("Missing 'snapshots_to_keep' argument") + + _setter("days_of_months", days_of_months) + _setter("hour", hour) + _setter("minute", minute) + _setter("snapshots_to_keep", snapshots_to_keep) @property @pulumi.getter(name="daysOfMonths") @@ -291,10 +399,39 @@ def __init__(__self__, *, :param pulumi.Input[int] minute: Minute of the hour that the snapshots will be created, valid range is from 0 to 59. :param pulumi.Input[int] snapshots_to_keep: How many hourly snapshots to keep, valid range is from 0 to 255. """ - pulumi.set(__self__, "days_of_weeks", days_of_weeks) - pulumi.set(__self__, "hour", hour) - pulumi.set(__self__, "minute", minute) - pulumi.set(__self__, "snapshots_to_keep", snapshots_to_keep) + SnapshotPolicyWeeklyScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_weeks=days_of_weeks, + hour=hour, + minute=minute, + snapshots_to_keep=snapshots_to_keep, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_weeks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + hour: Optional[pulumi.Input[int]] = None, + minute: Optional[pulumi.Input[int]] = None, + snapshots_to_keep: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if days_of_weeks is None: + raise TypeError("Missing 'days_of_weeks' argument") + if hour is None: + raise TypeError("Missing 'hour' argument") + if minute is None: + raise TypeError("Missing 'minute' argument") + if snapshots_to_keep is None and 'snapshotsToKeep' in kwargs: + snapshots_to_keep = kwargs['snapshotsToKeep'] + if snapshots_to_keep is None: + raise TypeError("Missing 'snapshots_to_keep' argument") + + _setter("days_of_weeks", days_of_weeks) + _setter("hour", hour) + _setter("minute", minute) + _setter("snapshots_to_keep", snapshots_to_keep) @property @pulumi.getter(name="daysOfWeeks") @@ -357,11 +494,42 @@ def __init__(__self__, *, :param pulumi.Input[str] remote_volume_resource_id: Resource ID of the primary volume. :param pulumi.Input[str] endpoint_type: The endpoint type, default value is `dst` for destination. """ - pulumi.set(__self__, "remote_volume_location", remote_volume_location) - pulumi.set(__self__, "remote_volume_resource_id", remote_volume_resource_id) - pulumi.set(__self__, "replication_frequency", replication_frequency) + VolumeDataProtectionReplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + remote_volume_location=remote_volume_location, + remote_volume_resource_id=remote_volume_resource_id, + replication_frequency=replication_frequency, + endpoint_type=endpoint_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + remote_volume_location: Optional[pulumi.Input[str]] = None, + remote_volume_resource_id: Optional[pulumi.Input[str]] = None, + replication_frequency: Optional[pulumi.Input[str]] = None, + endpoint_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if remote_volume_location is None and 'remoteVolumeLocation' in kwargs: + remote_volume_location = kwargs['remoteVolumeLocation'] + if remote_volume_location is None: + raise TypeError("Missing 'remote_volume_location' argument") + if remote_volume_resource_id is None and 'remoteVolumeResourceId' in kwargs: + remote_volume_resource_id = kwargs['remoteVolumeResourceId'] + if remote_volume_resource_id is None: + raise TypeError("Missing 'remote_volume_resource_id' argument") + if replication_frequency is None and 'replicationFrequency' in kwargs: + replication_frequency = kwargs['replicationFrequency'] + if replication_frequency is None: + raise TypeError("Missing 'replication_frequency' argument") + if endpoint_type is None and 'endpointType' in kwargs: + endpoint_type = kwargs['endpointType'] + + _setter("remote_volume_location", remote_volume_location) + _setter("remote_volume_resource_id", remote_volume_resource_id) + _setter("replication_frequency", replication_frequency) if endpoint_type is not None: - pulumi.set(__self__, "endpoint_type", endpoint_type) + _setter("endpoint_type", endpoint_type) @property @pulumi.getter(name="remoteVolumeLocation") @@ -413,7 +581,22 @@ def endpoint_type(self, value: Optional[pulumi.Input[str]]): class VolumeDataProtectionSnapshotPolicyArgs: def __init__(__self__, *, snapshot_policy_id: pulumi.Input[str]): - pulumi.set(__self__, "snapshot_policy_id", snapshot_policy_id) + VolumeDataProtectionSnapshotPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + snapshot_policy_id=snapshot_policy_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + snapshot_policy_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if snapshot_policy_id is None and 'snapshotPolicyId' in kwargs: + snapshot_policy_id = kwargs['snapshotPolicyId'] + if snapshot_policy_id is None: + raise TypeError("Missing 'snapshot_policy_id' argument") + + _setter("snapshot_policy_id", snapshot_policy_id) @property @pulumi.getter(name="snapshotPolicyId") @@ -442,16 +625,53 @@ def __init__(__self__, *, :param pulumi.Input[bool] unix_read_only: Is the file system on unix read only? :param pulumi.Input[bool] unix_read_write: Is the file system on unix read and write? """ - pulumi.set(__self__, "allowed_clients", allowed_clients) - pulumi.set(__self__, "rule_index", rule_index) + VolumeExportPolicyRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_clients=allowed_clients, + rule_index=rule_index, + protocols_enabled=protocols_enabled, + root_access_enabled=root_access_enabled, + unix_read_only=unix_read_only, + unix_read_write=unix_read_write, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_clients: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + rule_index: Optional[pulumi.Input[int]] = None, + protocols_enabled: Optional[pulumi.Input[str]] = None, + root_access_enabled: Optional[pulumi.Input[bool]] = None, + unix_read_only: Optional[pulumi.Input[bool]] = None, + unix_read_write: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_clients is None and 'allowedClients' in kwargs: + allowed_clients = kwargs['allowedClients'] + if allowed_clients is None: + raise TypeError("Missing 'allowed_clients' argument") + if rule_index is None and 'ruleIndex' in kwargs: + rule_index = kwargs['ruleIndex'] + if rule_index is None: + raise TypeError("Missing 'rule_index' argument") + if protocols_enabled is None and 'protocolsEnabled' in kwargs: + protocols_enabled = kwargs['protocolsEnabled'] + if root_access_enabled is None and 'rootAccessEnabled' in kwargs: + root_access_enabled = kwargs['rootAccessEnabled'] + if unix_read_only is None and 'unixReadOnly' in kwargs: + unix_read_only = kwargs['unixReadOnly'] + if unix_read_write is None and 'unixReadWrite' in kwargs: + unix_read_write = kwargs['unixReadWrite'] + + _setter("allowed_clients", allowed_clients) + _setter("rule_index", rule_index) if protocols_enabled is not None: - pulumi.set(__self__, "protocols_enabled", protocols_enabled) + _setter("protocols_enabled", protocols_enabled) if root_access_enabled is not None: - pulumi.set(__self__, "root_access_enabled", root_access_enabled) + _setter("root_access_enabled", root_access_enabled) if unix_read_only is not None: - pulumi.set(__self__, "unix_read_only", unix_read_only) + _setter("unix_read_only", unix_read_only) if unix_read_write is not None: - pulumi.set(__self__, "unix_read_write", unix_read_write) + _setter("unix_read_write", unix_read_write) @property @pulumi.getter(name="allowedClients") @@ -566,30 +786,127 @@ def __init__(__self__, *, :param pulumi.Input[str] proximity_placement_group_id: The ID of the proximity placement group. Changing this forces a new Application Volume Group to be created and data will be lost. For SAP-HANA application, it is required to have PPG enabled so Azure NetApp Files can pin the volumes next to your compute resources, please check [Requirements and considerations for application volume group for SAP HANA](https://learn.microsoft.com/en-us/azure/azure-netapp-files/application-volume-group-considerations) for details and other requirements. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Application Volume Group. """ - pulumi.set(__self__, "capacity_pool_id", capacity_pool_id) - pulumi.set(__self__, "export_policy_rules", export_policy_rules) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocols", protocols) - pulumi.set(__self__, "security_style", security_style) - pulumi.set(__self__, "service_level", service_level) - pulumi.set(__self__, "snapshot_directory_visible", snapshot_directory_visible) - pulumi.set(__self__, "storage_quota_in_gb", storage_quota_in_gb) - pulumi.set(__self__, "subnet_id", subnet_id) - pulumi.set(__self__, "throughput_in_mibps", throughput_in_mibps) - pulumi.set(__self__, "volume_path", volume_path) - pulumi.set(__self__, "volume_spec_name", volume_spec_name) + VolumeGroupSapHanaVolumeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity_pool_id=capacity_pool_id, + export_policy_rules=export_policy_rules, + name=name, + protocols=protocols, + security_style=security_style, + service_level=service_level, + snapshot_directory_visible=snapshot_directory_visible, + storage_quota_in_gb=storage_quota_in_gb, + subnet_id=subnet_id, + throughput_in_mibps=throughput_in_mibps, + volume_path=volume_path, + volume_spec_name=volume_spec_name, + data_protection_replication=data_protection_replication, + data_protection_snapshot_policy=data_protection_snapshot_policy, + id=id, + mount_ip_addresses=mount_ip_addresses, + proximity_placement_group_id=proximity_placement_group_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity_pool_id: Optional[pulumi.Input[str]] = None, + export_policy_rules: Optional[pulumi.Input[Sequence[pulumi.Input['VolumeGroupSapHanaVolumeExportPolicyRuleArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + protocols: Optional[pulumi.Input[str]] = None, + security_style: Optional[pulumi.Input[str]] = None, + service_level: Optional[pulumi.Input[str]] = None, + snapshot_directory_visible: Optional[pulumi.Input[bool]] = None, + storage_quota_in_gb: Optional[pulumi.Input[int]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + throughput_in_mibps: Optional[pulumi.Input[float]] = None, + volume_path: Optional[pulumi.Input[str]] = None, + volume_spec_name: Optional[pulumi.Input[str]] = None, + data_protection_replication: Optional[pulumi.Input['VolumeGroupSapHanaVolumeDataProtectionReplicationArgs']] = None, + data_protection_snapshot_policy: Optional[pulumi.Input['VolumeGroupSapHanaVolumeDataProtectionSnapshotPolicyArgs']] = None, + id: Optional[pulumi.Input[str]] = None, + mount_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity_pool_id is None and 'capacityPoolId' in kwargs: + capacity_pool_id = kwargs['capacityPoolId'] + if capacity_pool_id is None: + raise TypeError("Missing 'capacity_pool_id' argument") + if export_policy_rules is None and 'exportPolicyRules' in kwargs: + export_policy_rules = kwargs['exportPolicyRules'] + if export_policy_rules is None: + raise TypeError("Missing 'export_policy_rules' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if security_style is None and 'securityStyle' in kwargs: + security_style = kwargs['securityStyle'] + if security_style is None: + raise TypeError("Missing 'security_style' argument") + if service_level is None and 'serviceLevel' in kwargs: + service_level = kwargs['serviceLevel'] + if service_level is None: + raise TypeError("Missing 'service_level' argument") + if snapshot_directory_visible is None and 'snapshotDirectoryVisible' in kwargs: + snapshot_directory_visible = kwargs['snapshotDirectoryVisible'] + if snapshot_directory_visible is None: + raise TypeError("Missing 'snapshot_directory_visible' argument") + if storage_quota_in_gb is None and 'storageQuotaInGb' in kwargs: + storage_quota_in_gb = kwargs['storageQuotaInGb'] + if storage_quota_in_gb is None: + raise TypeError("Missing 'storage_quota_in_gb' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if throughput_in_mibps is None and 'throughputInMibps' in kwargs: + throughput_in_mibps = kwargs['throughputInMibps'] + if throughput_in_mibps is None: + raise TypeError("Missing 'throughput_in_mibps' argument") + if volume_path is None and 'volumePath' in kwargs: + volume_path = kwargs['volumePath'] + if volume_path is None: + raise TypeError("Missing 'volume_path' argument") + if volume_spec_name is None and 'volumeSpecName' in kwargs: + volume_spec_name = kwargs['volumeSpecName'] + if volume_spec_name is None: + raise TypeError("Missing 'volume_spec_name' argument") + if data_protection_replication is None and 'dataProtectionReplication' in kwargs: + data_protection_replication = kwargs['dataProtectionReplication'] + if data_protection_snapshot_policy is None and 'dataProtectionSnapshotPolicy' in kwargs: + data_protection_snapshot_policy = kwargs['dataProtectionSnapshotPolicy'] + if mount_ip_addresses is None and 'mountIpAddresses' in kwargs: + mount_ip_addresses = kwargs['mountIpAddresses'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + + _setter("capacity_pool_id", capacity_pool_id) + _setter("export_policy_rules", export_policy_rules) + _setter("name", name) + _setter("protocols", protocols) + _setter("security_style", security_style) + _setter("service_level", service_level) + _setter("snapshot_directory_visible", snapshot_directory_visible) + _setter("storage_quota_in_gb", storage_quota_in_gb) + _setter("subnet_id", subnet_id) + _setter("throughput_in_mibps", throughput_in_mibps) + _setter("volume_path", volume_path) + _setter("volume_spec_name", volume_spec_name) if data_protection_replication is not None: - pulumi.set(__self__, "data_protection_replication", data_protection_replication) + _setter("data_protection_replication", data_protection_replication) if data_protection_snapshot_policy is not None: - pulumi.set(__self__, "data_protection_snapshot_policy", data_protection_snapshot_policy) + _setter("data_protection_snapshot_policy", data_protection_snapshot_policy) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if mount_ip_addresses is not None: - pulumi.set(__self__, "mount_ip_addresses", mount_ip_addresses) + _setter("mount_ip_addresses", mount_ip_addresses) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="capacityPoolId") @@ -818,11 +1135,42 @@ def __init__(__self__, *, :param pulumi.Input[str] replication_frequency: eplication frequency. Possible values are `10minutes`, `daily` and `hourly`. :param pulumi.Input[str] endpoint_type: The endpoint type. Possible values are `dst` and `src`. Defaults to `dst`. """ - pulumi.set(__self__, "remote_volume_location", remote_volume_location) - pulumi.set(__self__, "remote_volume_resource_id", remote_volume_resource_id) - pulumi.set(__self__, "replication_frequency", replication_frequency) + VolumeGroupSapHanaVolumeDataProtectionReplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + remote_volume_location=remote_volume_location, + remote_volume_resource_id=remote_volume_resource_id, + replication_frequency=replication_frequency, + endpoint_type=endpoint_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + remote_volume_location: Optional[pulumi.Input[str]] = None, + remote_volume_resource_id: Optional[pulumi.Input[str]] = None, + replication_frequency: Optional[pulumi.Input[str]] = None, + endpoint_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if remote_volume_location is None and 'remoteVolumeLocation' in kwargs: + remote_volume_location = kwargs['remoteVolumeLocation'] + if remote_volume_location is None: + raise TypeError("Missing 'remote_volume_location' argument") + if remote_volume_resource_id is None and 'remoteVolumeResourceId' in kwargs: + remote_volume_resource_id = kwargs['remoteVolumeResourceId'] + if remote_volume_resource_id is None: + raise TypeError("Missing 'remote_volume_resource_id' argument") + if replication_frequency is None and 'replicationFrequency' in kwargs: + replication_frequency = kwargs['replicationFrequency'] + if replication_frequency is None: + raise TypeError("Missing 'replication_frequency' argument") + if endpoint_type is None and 'endpointType' in kwargs: + endpoint_type = kwargs['endpointType'] + + _setter("remote_volume_location", remote_volume_location) + _setter("remote_volume_resource_id", remote_volume_resource_id) + _setter("replication_frequency", replication_frequency) if endpoint_type is not None: - pulumi.set(__self__, "endpoint_type", endpoint_type) + _setter("endpoint_type", endpoint_type) @property @pulumi.getter(name="remoteVolumeLocation") @@ -880,7 +1228,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] snapshot_policy_id: Resource ID of the snapshot policy to apply to the volume. """ - pulumi.set(__self__, "snapshot_policy_id", snapshot_policy_id) + VolumeGroupSapHanaVolumeDataProtectionSnapshotPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + snapshot_policy_id=snapshot_policy_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + snapshot_policy_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if snapshot_policy_id is None and 'snapshotPolicyId' in kwargs: + snapshot_policy_id = kwargs['snapshotPolicyId'] + if snapshot_policy_id is None: + raise TypeError("Missing 'snapshot_policy_id' argument") + + _setter("snapshot_policy_id", snapshot_policy_id) @property @pulumi.getter(name="snapshotPolicyId") @@ -914,16 +1277,61 @@ def __init__(__self__, *, :param pulumi.Input[bool] unix_read_only: Is the file system on unix read only? Defaults to `false. :param pulumi.Input[bool] unix_read_write: Is the file system on unix read and write? Defaults to `true`. """ - pulumi.set(__self__, "allowed_clients", allowed_clients) - pulumi.set(__self__, "nfsv3_enabled", nfsv3_enabled) - pulumi.set(__self__, "nfsv41_enabled", nfsv41_enabled) - pulumi.set(__self__, "rule_index", rule_index) + VolumeGroupSapHanaVolumeExportPolicyRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_clients=allowed_clients, + nfsv3_enabled=nfsv3_enabled, + nfsv41_enabled=nfsv41_enabled, + rule_index=rule_index, + root_access_enabled=root_access_enabled, + unix_read_only=unix_read_only, + unix_read_write=unix_read_write, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_clients: Optional[pulumi.Input[str]] = None, + nfsv3_enabled: Optional[pulumi.Input[bool]] = None, + nfsv41_enabled: Optional[pulumi.Input[bool]] = None, + rule_index: Optional[pulumi.Input[int]] = None, + root_access_enabled: Optional[pulumi.Input[bool]] = None, + unix_read_only: Optional[pulumi.Input[bool]] = None, + unix_read_write: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_clients is None and 'allowedClients' in kwargs: + allowed_clients = kwargs['allowedClients'] + if allowed_clients is None: + raise TypeError("Missing 'allowed_clients' argument") + if nfsv3_enabled is None and 'nfsv3Enabled' in kwargs: + nfsv3_enabled = kwargs['nfsv3Enabled'] + if nfsv3_enabled is None: + raise TypeError("Missing 'nfsv3_enabled' argument") + if nfsv41_enabled is None and 'nfsv41Enabled' in kwargs: + nfsv41_enabled = kwargs['nfsv41Enabled'] + if nfsv41_enabled is None: + raise TypeError("Missing 'nfsv41_enabled' argument") + if rule_index is None and 'ruleIndex' in kwargs: + rule_index = kwargs['ruleIndex'] + if rule_index is None: + raise TypeError("Missing 'rule_index' argument") + if root_access_enabled is None and 'rootAccessEnabled' in kwargs: + root_access_enabled = kwargs['rootAccessEnabled'] + if unix_read_only is None and 'unixReadOnly' in kwargs: + unix_read_only = kwargs['unixReadOnly'] + if unix_read_write is None and 'unixReadWrite' in kwargs: + unix_read_write = kwargs['unixReadWrite'] + + _setter("allowed_clients", allowed_clients) + _setter("nfsv3_enabled", nfsv3_enabled) + _setter("nfsv41_enabled", nfsv41_enabled) + _setter("rule_index", rule_index) if root_access_enabled is not None: - pulumi.set(__self__, "root_access_enabled", root_access_enabled) + _setter("root_access_enabled", root_access_enabled) if unix_read_only is not None: - pulumi.set(__self__, "unix_read_only", unix_read_only) + _setter("unix_read_only", unix_read_only) if unix_read_write is not None: - pulumi.set(__self__, "unix_read_write", unix_read_write) + _setter("unix_read_write", unix_read_write) @property @pulumi.getter(name="allowedClients") diff --git a/sdk/python/pulumi_azure/netapp/account.py b/sdk/python/pulumi_azure/netapp/account.py index dc3139e485..d08f2af32b 100644 --- a/sdk/python/pulumi_azure/netapp/account.py +++ b/sdk/python/pulumi_azure/netapp/account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,15 +29,40 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the NetApp Account. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + AccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + active_directory=active_directory, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + active_directory: Optional[pulumi.Input['AccountActiveDirectoryArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + + _setter("resource_group_name", resource_group_name) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -116,16 +141,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group where the NetApp Account should be created. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _AccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directory=active_directory, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directory: Optional[pulumi.Input['AccountActiveDirectoryArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="activeDirectory") @@ -289,6 +337,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -308,6 +360,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = AccountArgs.__new__(AccountArgs) + if active_directory is not None and not isinstance(active_directory, AccountActiveDirectoryArgs): + active_directory = active_directory or {} + def _setter(key, value): + active_directory[key] = value + AccountActiveDirectoryArgs._configure(_setter, **active_directory) __props__.__dict__["active_directory"] = active_directory __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/netapp/get_account.py b/sdk/python/pulumi_azure/netapp/get_account.py index 1ba5cb752f..754017e987 100644 --- a/sdk/python/pulumi_azure/netapp/get_account.py +++ b/sdk/python/pulumi_azure/netapp/get_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/netapp/get_pool.py b/sdk/python/pulumi_azure/netapp/get_pool.py index f1fea9c9a7..c591c885ac 100644 --- a/sdk/python/pulumi_azure/netapp/get_pool.py +++ b/sdk/python/pulumi_azure/netapp/get_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/netapp/get_snapshot.py b/sdk/python/pulumi_azure/netapp/get_snapshot.py index 9a422c2d40..6334f90ccd 100644 --- a/sdk/python/pulumi_azure/netapp/get_snapshot.py +++ b/sdk/python/pulumi_azure/netapp/get_snapshot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/netapp/get_snapshot_policy.py b/sdk/python/pulumi_azure/netapp/get_snapshot_policy.py index bae995b587..15c336ddd3 100644 --- a/sdk/python/pulumi_azure/netapp/get_snapshot_policy.py +++ b/sdk/python/pulumi_azure/netapp/get_snapshot_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/netapp/get_volume.py b/sdk/python/pulumi_azure/netapp/get_volume.py index 792792bcd3..556bf854a4 100644 --- a/sdk/python/pulumi_azure/netapp/get_volume.py +++ b/sdk/python/pulumi_azure/netapp/get_volume.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/netapp/get_volume_group_sap_hana.py b/sdk/python/pulumi_azure/netapp/get_volume_group_sap_hana.py index b0c0883dbb..f9fb3adbdb 100644 --- a/sdk/python/pulumi_azure/netapp/get_volume_group_sap_hana.py +++ b/sdk/python/pulumi_azure/netapp/get_volume_group_sap_hana.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/netapp/get_volume_quota_rule.py b/sdk/python/pulumi_azure/netapp/get_volume_quota_rule.py index 571b3bf20e..70ad7a3396 100644 --- a/sdk/python/pulumi_azure/netapp/get_volume_quota_rule.py +++ b/sdk/python/pulumi_azure/netapp/get_volume_quota_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/netapp/outputs.py b/sdk/python/pulumi_azure/netapp/outputs.py index ce316fe755..7ea4db2afd 100644 --- a/sdk/python/pulumi_azure/netapp/outputs.py +++ b/sdk/python/pulumi_azure/netapp/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -72,13 +72,50 @@ def __init__(__self__, *, :param str username: The Username of Active Directory Domain Administrator. :param str organizational_unit: The Organizational Unit (OU) within the Active Directory Domain. """ - pulumi.set(__self__, "dns_servers", dns_servers) - pulumi.set(__self__, "domain", domain) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "smb_server_name", smb_server_name) - pulumi.set(__self__, "username", username) + AccountActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_servers=dns_servers, + domain=domain, + password=password, + smb_server_name=smb_server_name, + username=username, + organizational_unit=organizational_unit, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_servers: Optional[Sequence[str]] = None, + domain: Optional[str] = None, + password: Optional[str] = None, + smb_server_name: Optional[str] = None, + username: Optional[str] = None, + organizational_unit: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if dns_servers is None: + raise TypeError("Missing 'dns_servers' argument") + if domain is None: + raise TypeError("Missing 'domain' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if smb_server_name is None and 'smbServerName' in kwargs: + smb_server_name = kwargs['smbServerName'] + if smb_server_name is None: + raise TypeError("Missing 'smb_server_name' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if organizational_unit is None and 'organizationalUnit' in kwargs: + organizational_unit = kwargs['organizationalUnit'] + + _setter("dns_servers", dns_servers) + _setter("domain", domain) + _setter("password", password) + _setter("smb_server_name", smb_server_name) + _setter("username", username) if organizational_unit is not None: - pulumi.set(__self__, "organizational_unit", organizational_unit) + _setter("organizational_unit", organizational_unit) @property @pulumi.getter(name="dnsServers") @@ -157,9 +194,32 @@ def __init__(__self__, *, :param int minute: Minute of the hour that the snapshots will be created, valid range is from 0 to 59. :param int snapshots_to_keep: How many hourly snapshots to keep, valid range is from 0 to 255. """ - pulumi.set(__self__, "hour", hour) - pulumi.set(__self__, "minute", minute) - pulumi.set(__self__, "snapshots_to_keep", snapshots_to_keep) + SnapshotPolicyDailySchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + hour=hour, + minute=minute, + snapshots_to_keep=snapshots_to_keep, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hour: Optional[int] = None, + minute: Optional[int] = None, + snapshots_to_keep: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hour is None: + raise TypeError("Missing 'hour' argument") + if minute is None: + raise TypeError("Missing 'minute' argument") + if snapshots_to_keep is None and 'snapshotsToKeep' in kwargs: + snapshots_to_keep = kwargs['snapshotsToKeep'] + if snapshots_to_keep is None: + raise TypeError("Missing 'snapshots_to_keep' argument") + + _setter("hour", hour) + _setter("minute", minute) + _setter("snapshots_to_keep", snapshots_to_keep) @property @pulumi.getter @@ -212,8 +272,27 @@ def __init__(__self__, *, :param int minute: Minute of the hour that the snapshots will be created, valid range is from 0 to 59. :param int snapshots_to_keep: How many hourly snapshots to keep, valid range is from 0 to 255. """ - pulumi.set(__self__, "minute", minute) - pulumi.set(__self__, "snapshots_to_keep", snapshots_to_keep) + SnapshotPolicyHourlySchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + minute=minute, + snapshots_to_keep=snapshots_to_keep, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + minute: Optional[int] = None, + snapshots_to_keep: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if minute is None: + raise TypeError("Missing 'minute' argument") + if snapshots_to_keep is None and 'snapshotsToKeep' in kwargs: + snapshots_to_keep = kwargs['snapshotsToKeep'] + if snapshots_to_keep is None: + raise TypeError("Missing 'snapshots_to_keep' argument") + + _setter("minute", minute) + _setter("snapshots_to_keep", snapshots_to_keep) @property @pulumi.getter @@ -264,10 +343,39 @@ def __init__(__self__, *, :param int minute: Minute of the hour that the snapshots will be created, valid range is from 0 to 59. :param int snapshots_to_keep: How many hourly snapshots to keep, valid range is from 0 to 255. """ - pulumi.set(__self__, "days_of_months", days_of_months) - pulumi.set(__self__, "hour", hour) - pulumi.set(__self__, "minute", minute) - pulumi.set(__self__, "snapshots_to_keep", snapshots_to_keep) + SnapshotPolicyMonthlySchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_months=days_of_months, + hour=hour, + minute=minute, + snapshots_to_keep=snapshots_to_keep, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_months: Optional[Sequence[int]] = None, + hour: Optional[int] = None, + minute: Optional[int] = None, + snapshots_to_keep: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_months is None and 'daysOfMonths' in kwargs: + days_of_months = kwargs['daysOfMonths'] + if days_of_months is None: + raise TypeError("Missing 'days_of_months' argument") + if hour is None: + raise TypeError("Missing 'hour' argument") + if minute is None: + raise TypeError("Missing 'minute' argument") + if snapshots_to_keep is None and 'snapshotsToKeep' in kwargs: + snapshots_to_keep = kwargs['snapshotsToKeep'] + if snapshots_to_keep is None: + raise TypeError("Missing 'snapshots_to_keep' argument") + + _setter("days_of_months", days_of_months) + _setter("hour", hour) + _setter("minute", minute) + _setter("snapshots_to_keep", snapshots_to_keep) @property @pulumi.getter(name="daysOfMonths") @@ -334,10 +442,39 @@ def __init__(__self__, *, :param int minute: Minute of the hour that the snapshots will be created, valid range is from 0 to 59. :param int snapshots_to_keep: How many hourly snapshots to keep, valid range is from 0 to 255. """ - pulumi.set(__self__, "days_of_weeks", days_of_weeks) - pulumi.set(__self__, "hour", hour) - pulumi.set(__self__, "minute", minute) - pulumi.set(__self__, "snapshots_to_keep", snapshots_to_keep) + SnapshotPolicyWeeklySchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_weeks=days_of_weeks, + hour=hour, + minute=minute, + snapshots_to_keep=snapshots_to_keep, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_weeks: Optional[Sequence[str]] = None, + hour: Optional[int] = None, + minute: Optional[int] = None, + snapshots_to_keep: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if days_of_weeks is None: + raise TypeError("Missing 'days_of_weeks' argument") + if hour is None: + raise TypeError("Missing 'hour' argument") + if minute is None: + raise TypeError("Missing 'minute' argument") + if snapshots_to_keep is None and 'snapshotsToKeep' in kwargs: + snapshots_to_keep = kwargs['snapshotsToKeep'] + if snapshots_to_keep is None: + raise TypeError("Missing 'snapshots_to_keep' argument") + + _setter("days_of_weeks", days_of_weeks) + _setter("hour", hour) + _setter("minute", minute) + _setter("snapshots_to_keep", snapshots_to_keep) @property @pulumi.getter(name="daysOfWeeks") @@ -407,11 +544,42 @@ def __init__(__self__, *, :param str remote_volume_resource_id: Resource ID of the primary volume. :param str endpoint_type: The endpoint type, default value is `dst` for destination. """ - pulumi.set(__self__, "remote_volume_location", remote_volume_location) - pulumi.set(__self__, "remote_volume_resource_id", remote_volume_resource_id) - pulumi.set(__self__, "replication_frequency", replication_frequency) + VolumeDataProtectionReplication._configure( + lambda key, value: pulumi.set(__self__, key, value), + remote_volume_location=remote_volume_location, + remote_volume_resource_id=remote_volume_resource_id, + replication_frequency=replication_frequency, + endpoint_type=endpoint_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + remote_volume_location: Optional[str] = None, + remote_volume_resource_id: Optional[str] = None, + replication_frequency: Optional[str] = None, + endpoint_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if remote_volume_location is None and 'remoteVolumeLocation' in kwargs: + remote_volume_location = kwargs['remoteVolumeLocation'] + if remote_volume_location is None: + raise TypeError("Missing 'remote_volume_location' argument") + if remote_volume_resource_id is None and 'remoteVolumeResourceId' in kwargs: + remote_volume_resource_id = kwargs['remoteVolumeResourceId'] + if remote_volume_resource_id is None: + raise TypeError("Missing 'remote_volume_resource_id' argument") + if replication_frequency is None and 'replicationFrequency' in kwargs: + replication_frequency = kwargs['replicationFrequency'] + if replication_frequency is None: + raise TypeError("Missing 'replication_frequency' argument") + if endpoint_type is None and 'endpointType' in kwargs: + endpoint_type = kwargs['endpointType'] + + _setter("remote_volume_location", remote_volume_location) + _setter("remote_volume_resource_id", remote_volume_resource_id) + _setter("replication_frequency", replication_frequency) if endpoint_type is not None: - pulumi.set(__self__, "endpoint_type", endpoint_type) + _setter("endpoint_type", endpoint_type) @property @pulumi.getter(name="remoteVolumeLocation") @@ -464,7 +632,22 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, snapshot_policy_id: str): - pulumi.set(__self__, "snapshot_policy_id", snapshot_policy_id) + VolumeDataProtectionSnapshotPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + snapshot_policy_id=snapshot_policy_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + snapshot_policy_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if snapshot_policy_id is None and 'snapshotPolicyId' in kwargs: + snapshot_policy_id = kwargs['snapshotPolicyId'] + if snapshot_policy_id is None: + raise TypeError("Missing 'snapshot_policy_id' argument") + + _setter("snapshot_policy_id", snapshot_policy_id) @property @pulumi.getter(name="snapshotPolicyId") @@ -516,16 +699,53 @@ def __init__(__self__, *, :param bool unix_read_only: Is the file system on unix read only? :param bool unix_read_write: Is the file system on unix read and write? """ - pulumi.set(__self__, "allowed_clients", allowed_clients) - pulumi.set(__self__, "rule_index", rule_index) + VolumeExportPolicyRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_clients=allowed_clients, + rule_index=rule_index, + protocols_enabled=protocols_enabled, + root_access_enabled=root_access_enabled, + unix_read_only=unix_read_only, + unix_read_write=unix_read_write, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_clients: Optional[Sequence[str]] = None, + rule_index: Optional[int] = None, + protocols_enabled: Optional[str] = None, + root_access_enabled: Optional[bool] = None, + unix_read_only: Optional[bool] = None, + unix_read_write: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_clients is None and 'allowedClients' in kwargs: + allowed_clients = kwargs['allowedClients'] + if allowed_clients is None: + raise TypeError("Missing 'allowed_clients' argument") + if rule_index is None and 'ruleIndex' in kwargs: + rule_index = kwargs['ruleIndex'] + if rule_index is None: + raise TypeError("Missing 'rule_index' argument") + if protocols_enabled is None and 'protocolsEnabled' in kwargs: + protocols_enabled = kwargs['protocolsEnabled'] + if root_access_enabled is None and 'rootAccessEnabled' in kwargs: + root_access_enabled = kwargs['rootAccessEnabled'] + if unix_read_only is None and 'unixReadOnly' in kwargs: + unix_read_only = kwargs['unixReadOnly'] + if unix_read_write is None and 'unixReadWrite' in kwargs: + unix_read_write = kwargs['unixReadWrite'] + + _setter("allowed_clients", allowed_clients) + _setter("rule_index", rule_index) if protocols_enabled is not None: - pulumi.set(__self__, "protocols_enabled", protocols_enabled) + _setter("protocols_enabled", protocols_enabled) if root_access_enabled is not None: - pulumi.set(__self__, "root_access_enabled", root_access_enabled) + _setter("root_access_enabled", root_access_enabled) if unix_read_only is not None: - pulumi.set(__self__, "unix_read_only", unix_read_only) + _setter("unix_read_only", unix_read_only) if unix_read_write is not None: - pulumi.set(__self__, "unix_read_write", unix_read_write) + _setter("unix_read_write", unix_read_write) @property @pulumi.getter(name="allowedClients") @@ -659,30 +879,127 @@ def __init__(__self__, *, :param str proximity_placement_group_id: The ID of the proximity placement group. Changing this forces a new Application Volume Group to be created and data will be lost. For SAP-HANA application, it is required to have PPG enabled so Azure NetApp Files can pin the volumes next to your compute resources, please check [Requirements and considerations for application volume group for SAP HANA](https://learn.microsoft.com/en-us/azure/azure-netapp-files/application-volume-group-considerations) for details and other requirements. :param Mapping[str, str] tags: A mapping of tags which should be assigned to the Application Volume Group. """ - pulumi.set(__self__, "capacity_pool_id", capacity_pool_id) - pulumi.set(__self__, "export_policy_rules", export_policy_rules) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocols", protocols) - pulumi.set(__self__, "security_style", security_style) - pulumi.set(__self__, "service_level", service_level) - pulumi.set(__self__, "snapshot_directory_visible", snapshot_directory_visible) - pulumi.set(__self__, "storage_quota_in_gb", storage_quota_in_gb) - pulumi.set(__self__, "subnet_id", subnet_id) - pulumi.set(__self__, "throughput_in_mibps", throughput_in_mibps) - pulumi.set(__self__, "volume_path", volume_path) - pulumi.set(__self__, "volume_spec_name", volume_spec_name) + VolumeGroupSapHanaVolume._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity_pool_id=capacity_pool_id, + export_policy_rules=export_policy_rules, + name=name, + protocols=protocols, + security_style=security_style, + service_level=service_level, + snapshot_directory_visible=snapshot_directory_visible, + storage_quota_in_gb=storage_quota_in_gb, + subnet_id=subnet_id, + throughput_in_mibps=throughput_in_mibps, + volume_path=volume_path, + volume_spec_name=volume_spec_name, + data_protection_replication=data_protection_replication, + data_protection_snapshot_policy=data_protection_snapshot_policy, + id=id, + mount_ip_addresses=mount_ip_addresses, + proximity_placement_group_id=proximity_placement_group_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity_pool_id: Optional[str] = None, + export_policy_rules: Optional[Sequence['outputs.VolumeGroupSapHanaVolumeExportPolicyRule']] = None, + name: Optional[str] = None, + protocols: Optional[str] = None, + security_style: Optional[str] = None, + service_level: Optional[str] = None, + snapshot_directory_visible: Optional[bool] = None, + storage_quota_in_gb: Optional[int] = None, + subnet_id: Optional[str] = None, + throughput_in_mibps: Optional[float] = None, + volume_path: Optional[str] = None, + volume_spec_name: Optional[str] = None, + data_protection_replication: Optional['outputs.VolumeGroupSapHanaVolumeDataProtectionReplication'] = None, + data_protection_snapshot_policy: Optional['outputs.VolumeGroupSapHanaVolumeDataProtectionSnapshotPolicy'] = None, + id: Optional[str] = None, + mount_ip_addresses: Optional[Sequence[str]] = None, + proximity_placement_group_id: Optional[str] = None, + tags: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity_pool_id is None and 'capacityPoolId' in kwargs: + capacity_pool_id = kwargs['capacityPoolId'] + if capacity_pool_id is None: + raise TypeError("Missing 'capacity_pool_id' argument") + if export_policy_rules is None and 'exportPolicyRules' in kwargs: + export_policy_rules = kwargs['exportPolicyRules'] + if export_policy_rules is None: + raise TypeError("Missing 'export_policy_rules' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if security_style is None and 'securityStyle' in kwargs: + security_style = kwargs['securityStyle'] + if security_style is None: + raise TypeError("Missing 'security_style' argument") + if service_level is None and 'serviceLevel' in kwargs: + service_level = kwargs['serviceLevel'] + if service_level is None: + raise TypeError("Missing 'service_level' argument") + if snapshot_directory_visible is None and 'snapshotDirectoryVisible' in kwargs: + snapshot_directory_visible = kwargs['snapshotDirectoryVisible'] + if snapshot_directory_visible is None: + raise TypeError("Missing 'snapshot_directory_visible' argument") + if storage_quota_in_gb is None and 'storageQuotaInGb' in kwargs: + storage_quota_in_gb = kwargs['storageQuotaInGb'] + if storage_quota_in_gb is None: + raise TypeError("Missing 'storage_quota_in_gb' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if throughput_in_mibps is None and 'throughputInMibps' in kwargs: + throughput_in_mibps = kwargs['throughputInMibps'] + if throughput_in_mibps is None: + raise TypeError("Missing 'throughput_in_mibps' argument") + if volume_path is None and 'volumePath' in kwargs: + volume_path = kwargs['volumePath'] + if volume_path is None: + raise TypeError("Missing 'volume_path' argument") + if volume_spec_name is None and 'volumeSpecName' in kwargs: + volume_spec_name = kwargs['volumeSpecName'] + if volume_spec_name is None: + raise TypeError("Missing 'volume_spec_name' argument") + if data_protection_replication is None and 'dataProtectionReplication' in kwargs: + data_protection_replication = kwargs['dataProtectionReplication'] + if data_protection_snapshot_policy is None and 'dataProtectionSnapshotPolicy' in kwargs: + data_protection_snapshot_policy = kwargs['dataProtectionSnapshotPolicy'] + if mount_ip_addresses is None and 'mountIpAddresses' in kwargs: + mount_ip_addresses = kwargs['mountIpAddresses'] + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + + _setter("capacity_pool_id", capacity_pool_id) + _setter("export_policy_rules", export_policy_rules) + _setter("name", name) + _setter("protocols", protocols) + _setter("security_style", security_style) + _setter("service_level", service_level) + _setter("snapshot_directory_visible", snapshot_directory_visible) + _setter("storage_quota_in_gb", storage_quota_in_gb) + _setter("subnet_id", subnet_id) + _setter("throughput_in_mibps", throughput_in_mibps) + _setter("volume_path", volume_path) + _setter("volume_spec_name", volume_spec_name) if data_protection_replication is not None: - pulumi.set(__self__, "data_protection_replication", data_protection_replication) + _setter("data_protection_replication", data_protection_replication) if data_protection_snapshot_policy is not None: - pulumi.set(__self__, "data_protection_snapshot_policy", data_protection_snapshot_policy) + _setter("data_protection_snapshot_policy", data_protection_snapshot_policy) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if mount_ip_addresses is not None: - pulumi.set(__self__, "mount_ip_addresses", mount_ip_addresses) + _setter("mount_ip_addresses", mount_ip_addresses) if proximity_placement_group_id is not None: - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) + _setter("proximity_placement_group_id", proximity_placement_group_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="capacityPoolId") @@ -862,11 +1179,42 @@ def __init__(__self__, *, :param str replication_frequency: eplication frequency. Possible values are `10minutes`, `daily` and `hourly`. :param str endpoint_type: The endpoint type. Possible values are `dst` and `src`. Defaults to `dst`. """ - pulumi.set(__self__, "remote_volume_location", remote_volume_location) - pulumi.set(__self__, "remote_volume_resource_id", remote_volume_resource_id) - pulumi.set(__self__, "replication_frequency", replication_frequency) + VolumeGroupSapHanaVolumeDataProtectionReplication._configure( + lambda key, value: pulumi.set(__self__, key, value), + remote_volume_location=remote_volume_location, + remote_volume_resource_id=remote_volume_resource_id, + replication_frequency=replication_frequency, + endpoint_type=endpoint_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + remote_volume_location: Optional[str] = None, + remote_volume_resource_id: Optional[str] = None, + replication_frequency: Optional[str] = None, + endpoint_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if remote_volume_location is None and 'remoteVolumeLocation' in kwargs: + remote_volume_location = kwargs['remoteVolumeLocation'] + if remote_volume_location is None: + raise TypeError("Missing 'remote_volume_location' argument") + if remote_volume_resource_id is None and 'remoteVolumeResourceId' in kwargs: + remote_volume_resource_id = kwargs['remoteVolumeResourceId'] + if remote_volume_resource_id is None: + raise TypeError("Missing 'remote_volume_resource_id' argument") + if replication_frequency is None and 'replicationFrequency' in kwargs: + replication_frequency = kwargs['replicationFrequency'] + if replication_frequency is None: + raise TypeError("Missing 'replication_frequency' argument") + if endpoint_type is None and 'endpointType' in kwargs: + endpoint_type = kwargs['endpointType'] + + _setter("remote_volume_location", remote_volume_location) + _setter("remote_volume_resource_id", remote_volume_resource_id) + _setter("replication_frequency", replication_frequency) if endpoint_type is not None: - pulumi.set(__self__, "endpoint_type", endpoint_type) + _setter("endpoint_type", endpoint_type) @property @pulumi.getter(name="remoteVolumeLocation") @@ -925,7 +1273,22 @@ def __init__(__self__, *, """ :param str snapshot_policy_id: Resource ID of the snapshot policy to apply to the volume. """ - pulumi.set(__self__, "snapshot_policy_id", snapshot_policy_id) + VolumeGroupSapHanaVolumeDataProtectionSnapshotPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + snapshot_policy_id=snapshot_policy_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + snapshot_policy_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if snapshot_policy_id is None and 'snapshotPolicyId' in kwargs: + snapshot_policy_id = kwargs['snapshotPolicyId'] + if snapshot_policy_id is None: + raise TypeError("Missing 'snapshot_policy_id' argument") + + _setter("snapshot_policy_id", snapshot_policy_id) @property @pulumi.getter(name="snapshotPolicyId") @@ -984,16 +1347,61 @@ def __init__(__self__, *, :param bool unix_read_only: Is the file system on unix read only? Defaults to `false. :param bool unix_read_write: Is the file system on unix read and write? Defaults to `true`. """ - pulumi.set(__self__, "allowed_clients", allowed_clients) - pulumi.set(__self__, "nfsv3_enabled", nfsv3_enabled) - pulumi.set(__self__, "nfsv41_enabled", nfsv41_enabled) - pulumi.set(__self__, "rule_index", rule_index) + VolumeGroupSapHanaVolumeExportPolicyRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_clients=allowed_clients, + nfsv3_enabled=nfsv3_enabled, + nfsv41_enabled=nfsv41_enabled, + rule_index=rule_index, + root_access_enabled=root_access_enabled, + unix_read_only=unix_read_only, + unix_read_write=unix_read_write, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_clients: Optional[str] = None, + nfsv3_enabled: Optional[bool] = None, + nfsv41_enabled: Optional[bool] = None, + rule_index: Optional[int] = None, + root_access_enabled: Optional[bool] = None, + unix_read_only: Optional[bool] = None, + unix_read_write: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_clients is None and 'allowedClients' in kwargs: + allowed_clients = kwargs['allowedClients'] + if allowed_clients is None: + raise TypeError("Missing 'allowed_clients' argument") + if nfsv3_enabled is None and 'nfsv3Enabled' in kwargs: + nfsv3_enabled = kwargs['nfsv3Enabled'] + if nfsv3_enabled is None: + raise TypeError("Missing 'nfsv3_enabled' argument") + if nfsv41_enabled is None and 'nfsv41Enabled' in kwargs: + nfsv41_enabled = kwargs['nfsv41Enabled'] + if nfsv41_enabled is None: + raise TypeError("Missing 'nfsv41_enabled' argument") + if rule_index is None and 'ruleIndex' in kwargs: + rule_index = kwargs['ruleIndex'] + if rule_index is None: + raise TypeError("Missing 'rule_index' argument") + if root_access_enabled is None and 'rootAccessEnabled' in kwargs: + root_access_enabled = kwargs['rootAccessEnabled'] + if unix_read_only is None and 'unixReadOnly' in kwargs: + unix_read_only = kwargs['unixReadOnly'] + if unix_read_write is None and 'unixReadWrite' in kwargs: + unix_read_write = kwargs['unixReadWrite'] + + _setter("allowed_clients", allowed_clients) + _setter("nfsv3_enabled", nfsv3_enabled) + _setter("nfsv41_enabled", nfsv41_enabled) + _setter("rule_index", rule_index) if root_access_enabled is not None: - pulumi.set(__self__, "root_access_enabled", root_access_enabled) + _setter("root_access_enabled", root_access_enabled) if unix_read_only is not None: - pulumi.set(__self__, "unix_read_only", unix_read_only) + _setter("unix_read_only", unix_read_only) if unix_read_write is not None: - pulumi.set(__self__, "unix_read_write", unix_read_write) + _setter("unix_read_write", unix_read_write) @property @pulumi.getter(name="allowedClients") @@ -1063,9 +1471,32 @@ def __init__(__self__, *, :param int minute: Minute of the hour that the snapshots will be created. :param int snapshots_to_keep: How many hourly snapshots to keep. """ - pulumi.set(__self__, "hour", hour) - pulumi.set(__self__, "minute", minute) - pulumi.set(__self__, "snapshots_to_keep", snapshots_to_keep) + GetSnapshotPolicyDailyScheduleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + hour=hour, + minute=minute, + snapshots_to_keep=snapshots_to_keep, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hour: Optional[int] = None, + minute: Optional[int] = None, + snapshots_to_keep: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hour is None: + raise TypeError("Missing 'hour' argument") + if minute is None: + raise TypeError("Missing 'minute' argument") + if snapshots_to_keep is None and 'snapshotsToKeep' in kwargs: + snapshots_to_keep = kwargs['snapshotsToKeep'] + if snapshots_to_keep is None: + raise TypeError("Missing 'snapshots_to_keep' argument") + + _setter("hour", hour) + _setter("minute", minute) + _setter("snapshots_to_keep", snapshots_to_keep) @property @pulumi.getter @@ -1101,8 +1532,27 @@ def __init__(__self__, *, :param int minute: Minute of the hour that the snapshots will be created. :param int snapshots_to_keep: How many hourly snapshots to keep. """ - pulumi.set(__self__, "minute", minute) - pulumi.set(__self__, "snapshots_to_keep", snapshots_to_keep) + GetSnapshotPolicyHourlyScheduleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + minute=minute, + snapshots_to_keep=snapshots_to_keep, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + minute: Optional[int] = None, + snapshots_to_keep: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if minute is None: + raise TypeError("Missing 'minute' argument") + if snapshots_to_keep is None and 'snapshotsToKeep' in kwargs: + snapshots_to_keep = kwargs['snapshotsToKeep'] + if snapshots_to_keep is None: + raise TypeError("Missing 'snapshots_to_keep' argument") + + _setter("minute", minute) + _setter("snapshots_to_keep", snapshots_to_keep) @property @pulumi.getter @@ -1133,10 +1583,39 @@ def __init__(__self__, *, :param int minute: Minute of the hour that the snapshots will be created. :param int snapshots_to_keep: How many hourly snapshots to keep. """ - pulumi.set(__self__, "days_of_months", days_of_months) - pulumi.set(__self__, "hour", hour) - pulumi.set(__self__, "minute", minute) - pulumi.set(__self__, "snapshots_to_keep", snapshots_to_keep) + GetSnapshotPolicyMonthlyScheduleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_months=days_of_months, + hour=hour, + minute=minute, + snapshots_to_keep=snapshots_to_keep, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_months: Optional[Sequence[int]] = None, + hour: Optional[int] = None, + minute: Optional[int] = None, + snapshots_to_keep: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_months is None and 'daysOfMonths' in kwargs: + days_of_months = kwargs['daysOfMonths'] + if days_of_months is None: + raise TypeError("Missing 'days_of_months' argument") + if hour is None: + raise TypeError("Missing 'hour' argument") + if minute is None: + raise TypeError("Missing 'minute' argument") + if snapshots_to_keep is None and 'snapshotsToKeep' in kwargs: + snapshots_to_keep = kwargs['snapshotsToKeep'] + if snapshots_to_keep is None: + raise TypeError("Missing 'snapshots_to_keep' argument") + + _setter("days_of_months", days_of_months) + _setter("hour", hour) + _setter("minute", minute) + _setter("snapshots_to_keep", snapshots_to_keep) @property @pulumi.getter(name="daysOfMonths") @@ -1181,10 +1660,39 @@ def __init__(__self__, *, :param int minute: Minute of the hour that the snapshots will be created. :param int snapshots_to_keep: How many hourly snapshots to keep. """ - pulumi.set(__self__, "days_of_weeks", days_of_weeks) - pulumi.set(__self__, "hour", hour) - pulumi.set(__self__, "minute", minute) - pulumi.set(__self__, "snapshots_to_keep", snapshots_to_keep) + GetSnapshotPolicyWeeklyScheduleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + days_of_weeks=days_of_weeks, + hour=hour, + minute=minute, + snapshots_to_keep=snapshots_to_keep, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days_of_weeks: Optional[Sequence[str]] = None, + hour: Optional[int] = None, + minute: Optional[int] = None, + snapshots_to_keep: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days_of_weeks is None and 'daysOfWeeks' in kwargs: + days_of_weeks = kwargs['daysOfWeeks'] + if days_of_weeks is None: + raise TypeError("Missing 'days_of_weeks' argument") + if hour is None: + raise TypeError("Missing 'hour' argument") + if minute is None: + raise TypeError("Missing 'minute' argument") + if snapshots_to_keep is None and 'snapshotsToKeep' in kwargs: + snapshots_to_keep = kwargs['snapshotsToKeep'] + if snapshots_to_keep is None: + raise TypeError("Missing 'snapshots_to_keep' argument") + + _setter("days_of_weeks", days_of_weeks) + _setter("hour", hour) + _setter("minute", minute) + _setter("snapshots_to_keep", snapshots_to_keep) @property @pulumi.getter(name="daysOfWeeks") @@ -1232,10 +1740,43 @@ def __init__(__self__, *, :param str remote_volume_resource_id: Resource ID of the primary volume. :param str replication_frequency: Frequency of replication. """ - pulumi.set(__self__, "endpoint_type", endpoint_type) - pulumi.set(__self__, "remote_volume_location", remote_volume_location) - pulumi.set(__self__, "remote_volume_resource_id", remote_volume_resource_id) - pulumi.set(__self__, "replication_frequency", replication_frequency) + GetVolumeDataProtectionReplicationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint_type=endpoint_type, + remote_volume_location=remote_volume_location, + remote_volume_resource_id=remote_volume_resource_id, + replication_frequency=replication_frequency, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint_type: Optional[str] = None, + remote_volume_location: Optional[str] = None, + remote_volume_resource_id: Optional[str] = None, + replication_frequency: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_type is None and 'endpointType' in kwargs: + endpoint_type = kwargs['endpointType'] + if endpoint_type is None: + raise TypeError("Missing 'endpoint_type' argument") + if remote_volume_location is None and 'remoteVolumeLocation' in kwargs: + remote_volume_location = kwargs['remoteVolumeLocation'] + if remote_volume_location is None: + raise TypeError("Missing 'remote_volume_location' argument") + if remote_volume_resource_id is None and 'remoteVolumeResourceId' in kwargs: + remote_volume_resource_id = kwargs['remoteVolumeResourceId'] + if remote_volume_resource_id is None: + raise TypeError("Missing 'remote_volume_resource_id' argument") + if replication_frequency is None and 'replicationFrequency' in kwargs: + replication_frequency = kwargs['replicationFrequency'] + if replication_frequency is None: + raise TypeError("Missing 'replication_frequency' argument") + + _setter("endpoint_type", endpoint_type) + _setter("remote_volume_location", remote_volume_location) + _setter("remote_volume_resource_id", remote_volume_resource_id) + _setter("replication_frequency", replication_frequency) @property @pulumi.getter(name="endpointType") @@ -1311,24 +1852,133 @@ def __init__(__self__, *, :param str volume_path: A unique file path for the volume. :param str volume_spec_name: Volume spec name. """ - pulumi.set(__self__, "capacity_pool_id", capacity_pool_id) - pulumi.set(__self__, "data_protection_replications", data_protection_replications) - pulumi.set(__self__, "data_protection_snapshot_policies", data_protection_snapshot_policies) - pulumi.set(__self__, "export_policy_rules", export_policy_rules) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "mount_ip_addresses", mount_ip_addresses) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocols", protocols) - pulumi.set(__self__, "proximity_placement_group_id", proximity_placement_group_id) - pulumi.set(__self__, "security_style", security_style) - pulumi.set(__self__, "service_level", service_level) - pulumi.set(__self__, "snapshot_directory_visible", snapshot_directory_visible) - pulumi.set(__self__, "storage_quota_in_gb", storage_quota_in_gb) - pulumi.set(__self__, "subnet_id", subnet_id) - pulumi.set(__self__, "tags", tags) - pulumi.set(__self__, "throughput_in_mibps", throughput_in_mibps) - pulumi.set(__self__, "volume_path", volume_path) - pulumi.set(__self__, "volume_spec_name", volume_spec_name) + GetVolumeGroupSapHanaVolumeResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity_pool_id=capacity_pool_id, + data_protection_replications=data_protection_replications, + data_protection_snapshot_policies=data_protection_snapshot_policies, + export_policy_rules=export_policy_rules, + id=id, + mount_ip_addresses=mount_ip_addresses, + name=name, + protocols=protocols, + proximity_placement_group_id=proximity_placement_group_id, + security_style=security_style, + service_level=service_level, + snapshot_directory_visible=snapshot_directory_visible, + storage_quota_in_gb=storage_quota_in_gb, + subnet_id=subnet_id, + tags=tags, + throughput_in_mibps=throughput_in_mibps, + volume_path=volume_path, + volume_spec_name=volume_spec_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity_pool_id: Optional[str] = None, + data_protection_replications: Optional[Sequence['outputs.GetVolumeGroupSapHanaVolumeDataProtectionReplicationResult']] = None, + data_protection_snapshot_policies: Optional[Sequence['outputs.GetVolumeGroupSapHanaVolumeDataProtectionSnapshotPolicyResult']] = None, + export_policy_rules: Optional[Sequence['outputs.GetVolumeGroupSapHanaVolumeExportPolicyRuleResult']] = None, + id: Optional[str] = None, + mount_ip_addresses: Optional[Sequence[str]] = None, + name: Optional[str] = None, + protocols: Optional[Sequence[str]] = None, + proximity_placement_group_id: Optional[str] = None, + security_style: Optional[str] = None, + service_level: Optional[str] = None, + snapshot_directory_visible: Optional[bool] = None, + storage_quota_in_gb: Optional[int] = None, + subnet_id: Optional[str] = None, + tags: Optional[Mapping[str, str]] = None, + throughput_in_mibps: Optional[float] = None, + volume_path: Optional[str] = None, + volume_spec_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity_pool_id is None and 'capacityPoolId' in kwargs: + capacity_pool_id = kwargs['capacityPoolId'] + if capacity_pool_id is None: + raise TypeError("Missing 'capacity_pool_id' argument") + if data_protection_replications is None and 'dataProtectionReplications' in kwargs: + data_protection_replications = kwargs['dataProtectionReplications'] + if data_protection_replications is None: + raise TypeError("Missing 'data_protection_replications' argument") + if data_protection_snapshot_policies is None and 'dataProtectionSnapshotPolicies' in kwargs: + data_protection_snapshot_policies = kwargs['dataProtectionSnapshotPolicies'] + if data_protection_snapshot_policies is None: + raise TypeError("Missing 'data_protection_snapshot_policies' argument") + if export_policy_rules is None and 'exportPolicyRules' in kwargs: + export_policy_rules = kwargs['exportPolicyRules'] + if export_policy_rules is None: + raise TypeError("Missing 'export_policy_rules' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if mount_ip_addresses is None and 'mountIpAddresses' in kwargs: + mount_ip_addresses = kwargs['mountIpAddresses'] + if mount_ip_addresses is None: + raise TypeError("Missing 'mount_ip_addresses' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if proximity_placement_group_id is None and 'proximityPlacementGroupId' in kwargs: + proximity_placement_group_id = kwargs['proximityPlacementGroupId'] + if proximity_placement_group_id is None: + raise TypeError("Missing 'proximity_placement_group_id' argument") + if security_style is None and 'securityStyle' in kwargs: + security_style = kwargs['securityStyle'] + if security_style is None: + raise TypeError("Missing 'security_style' argument") + if service_level is None and 'serviceLevel' in kwargs: + service_level = kwargs['serviceLevel'] + if service_level is None: + raise TypeError("Missing 'service_level' argument") + if snapshot_directory_visible is None and 'snapshotDirectoryVisible' in kwargs: + snapshot_directory_visible = kwargs['snapshotDirectoryVisible'] + if snapshot_directory_visible is None: + raise TypeError("Missing 'snapshot_directory_visible' argument") + if storage_quota_in_gb is None and 'storageQuotaInGb' in kwargs: + storage_quota_in_gb = kwargs['storageQuotaInGb'] + if storage_quota_in_gb is None: + raise TypeError("Missing 'storage_quota_in_gb' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if tags is None: + raise TypeError("Missing 'tags' argument") + if throughput_in_mibps is None and 'throughputInMibps' in kwargs: + throughput_in_mibps = kwargs['throughputInMibps'] + if throughput_in_mibps is None: + raise TypeError("Missing 'throughput_in_mibps' argument") + if volume_path is None and 'volumePath' in kwargs: + volume_path = kwargs['volumePath'] + if volume_path is None: + raise TypeError("Missing 'volume_path' argument") + if volume_spec_name is None and 'volumeSpecName' in kwargs: + volume_spec_name = kwargs['volumeSpecName'] + if volume_spec_name is None: + raise TypeError("Missing 'volume_spec_name' argument") + + _setter("capacity_pool_id", capacity_pool_id) + _setter("data_protection_replications", data_protection_replications) + _setter("data_protection_snapshot_policies", data_protection_snapshot_policies) + _setter("export_policy_rules", export_policy_rules) + _setter("id", id) + _setter("mount_ip_addresses", mount_ip_addresses) + _setter("name", name) + _setter("protocols", protocols) + _setter("proximity_placement_group_id", proximity_placement_group_id) + _setter("security_style", security_style) + _setter("service_level", service_level) + _setter("snapshot_directory_visible", snapshot_directory_visible) + _setter("storage_quota_in_gb", storage_quota_in_gb) + _setter("subnet_id", subnet_id) + _setter("tags", tags) + _setter("throughput_in_mibps", throughput_in_mibps) + _setter("volume_path", volume_path) + _setter("volume_spec_name", volume_spec_name) @property @pulumi.getter(name="capacityPoolId") @@ -1488,10 +2138,43 @@ def __init__(__self__, *, :param str remote_volume_resource_id: Resource ID of the primary volume. :param str replication_frequency: Replication frequency. """ - pulumi.set(__self__, "endpoint_type", endpoint_type) - pulumi.set(__self__, "remote_volume_location", remote_volume_location) - pulumi.set(__self__, "remote_volume_resource_id", remote_volume_resource_id) - pulumi.set(__self__, "replication_frequency", replication_frequency) + GetVolumeGroupSapHanaVolumeDataProtectionReplicationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint_type=endpoint_type, + remote_volume_location=remote_volume_location, + remote_volume_resource_id=remote_volume_resource_id, + replication_frequency=replication_frequency, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint_type: Optional[str] = None, + remote_volume_location: Optional[str] = None, + remote_volume_resource_id: Optional[str] = None, + replication_frequency: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_type is None and 'endpointType' in kwargs: + endpoint_type = kwargs['endpointType'] + if endpoint_type is None: + raise TypeError("Missing 'endpoint_type' argument") + if remote_volume_location is None and 'remoteVolumeLocation' in kwargs: + remote_volume_location = kwargs['remoteVolumeLocation'] + if remote_volume_location is None: + raise TypeError("Missing 'remote_volume_location' argument") + if remote_volume_resource_id is None and 'remoteVolumeResourceId' in kwargs: + remote_volume_resource_id = kwargs['remoteVolumeResourceId'] + if remote_volume_resource_id is None: + raise TypeError("Missing 'remote_volume_resource_id' argument") + if replication_frequency is None and 'replicationFrequency' in kwargs: + replication_frequency = kwargs['replicationFrequency'] + if replication_frequency is None: + raise TypeError("Missing 'replication_frequency' argument") + + _setter("endpoint_type", endpoint_type) + _setter("remote_volume_location", remote_volume_location) + _setter("remote_volume_resource_id", remote_volume_resource_id) + _setter("replication_frequency", replication_frequency) @property @pulumi.getter(name="endpointType") @@ -1533,7 +2216,22 @@ def __init__(__self__, *, """ :param str snapshot_policy_id: Resource ID of the snapshot policy to apply to the volume. """ - pulumi.set(__self__, "snapshot_policy_id", snapshot_policy_id) + GetVolumeGroupSapHanaVolumeDataProtectionSnapshotPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + snapshot_policy_id=snapshot_policy_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + snapshot_policy_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if snapshot_policy_id is None and 'snapshotPolicyId' in kwargs: + snapshot_policy_id = kwargs['snapshotPolicyId'] + if snapshot_policy_id is None: + raise TypeError("Missing 'snapshot_policy_id' argument") + + _setter("snapshot_policy_id", snapshot_policy_id) @property @pulumi.getter(name="snapshotPolicyId") @@ -1563,13 +2261,64 @@ def __init__(__self__, *, :param bool unix_read_only: Is the file system on unix read only?. :param bool unix_read_write: Is the file system on unix read and write?. """ - pulumi.set(__self__, "allowed_clients", allowed_clients) - pulumi.set(__self__, "nfsv3_enabled", nfsv3_enabled) - pulumi.set(__self__, "nfsv41_enabled", nfsv41_enabled) - pulumi.set(__self__, "root_access_enabled", root_access_enabled) - pulumi.set(__self__, "rule_index", rule_index) - pulumi.set(__self__, "unix_read_only", unix_read_only) - pulumi.set(__self__, "unix_read_write", unix_read_write) + GetVolumeGroupSapHanaVolumeExportPolicyRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_clients=allowed_clients, + nfsv3_enabled=nfsv3_enabled, + nfsv41_enabled=nfsv41_enabled, + root_access_enabled=root_access_enabled, + rule_index=rule_index, + unix_read_only=unix_read_only, + unix_read_write=unix_read_write, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_clients: Optional[str] = None, + nfsv3_enabled: Optional[bool] = None, + nfsv41_enabled: Optional[bool] = None, + root_access_enabled: Optional[bool] = None, + rule_index: Optional[int] = None, + unix_read_only: Optional[bool] = None, + unix_read_write: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_clients is None and 'allowedClients' in kwargs: + allowed_clients = kwargs['allowedClients'] + if allowed_clients is None: + raise TypeError("Missing 'allowed_clients' argument") + if nfsv3_enabled is None and 'nfsv3Enabled' in kwargs: + nfsv3_enabled = kwargs['nfsv3Enabled'] + if nfsv3_enabled is None: + raise TypeError("Missing 'nfsv3_enabled' argument") + if nfsv41_enabled is None and 'nfsv41Enabled' in kwargs: + nfsv41_enabled = kwargs['nfsv41Enabled'] + if nfsv41_enabled is None: + raise TypeError("Missing 'nfsv41_enabled' argument") + if root_access_enabled is None and 'rootAccessEnabled' in kwargs: + root_access_enabled = kwargs['rootAccessEnabled'] + if root_access_enabled is None: + raise TypeError("Missing 'root_access_enabled' argument") + if rule_index is None and 'ruleIndex' in kwargs: + rule_index = kwargs['ruleIndex'] + if rule_index is None: + raise TypeError("Missing 'rule_index' argument") + if unix_read_only is None and 'unixReadOnly' in kwargs: + unix_read_only = kwargs['unixReadOnly'] + if unix_read_only is None: + raise TypeError("Missing 'unix_read_only' argument") + if unix_read_write is None and 'unixReadWrite' in kwargs: + unix_read_write = kwargs['unixReadWrite'] + if unix_read_write is None: + raise TypeError("Missing 'unix_read_write' argument") + + _setter("allowed_clients", allowed_clients) + _setter("nfsv3_enabled", nfsv3_enabled) + _setter("nfsv41_enabled", nfsv41_enabled) + _setter("root_access_enabled", root_access_enabled) + _setter("rule_index", rule_index) + _setter("unix_read_only", unix_read_only) + _setter("unix_read_write", unix_read_write) @property @pulumi.getter(name="allowedClients") diff --git a/sdk/python/pulumi_azure/netapp/pool.py b/sdk/python/pulumi_azure/netapp/pool.py index f4a5aa7793..a140799b88 100644 --- a/sdk/python/pulumi_azure/netapp/pool.py +++ b/sdk/python/pulumi_azure/netapp/pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PoolArgs', 'Pool'] @@ -35,18 +35,61 @@ def __init__(__self__, *, :param pulumi.Input[str] qos_type: QoS Type of the pool. Valid values include `Auto` or `Manual`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "service_level", service_level) - pulumi.set(__self__, "size_in_tb", size_in_tb) + PoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + resource_group_name=resource_group_name, + service_level=service_level, + size_in_tb=size_in_tb, + location=location, + name=name, + qos_type=qos_type, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_level: Optional[pulumi.Input[str]] = None, + size_in_tb: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + qos_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if service_level is None and 'serviceLevel' in kwargs: + service_level = kwargs['serviceLevel'] + if service_level is None: + raise TypeError("Missing 'service_level' argument") + if size_in_tb is None and 'sizeInTb' in kwargs: + size_in_tb = kwargs['sizeInTb'] + if size_in_tb is None: + raise TypeError("Missing 'size_in_tb' argument") + if qos_type is None and 'qosType' in kwargs: + qos_type = kwargs['qosType'] + + _setter("account_name", account_name) + _setter("resource_group_name", resource_group_name) + _setter("service_level", service_level) + _setter("size_in_tb", size_in_tb) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if qos_type is not None: - pulumi.set(__self__, "qos_type", qos_type) + _setter("qos_type", qos_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="accountName") @@ -171,22 +214,57 @@ def __init__(__self__, *, > **NOTE** `2` TB capacity pool sizing is currently in preview. You can only take advantage of the `2` TB minimum if all the volumes in the capacity pool are using `Standard` network features. If any volume is using `Basic` network features, the minimum size is `4` TB. Please see the product [documentation](https://learn.microsoft.com/azure/azure-netapp-files/azure-netapp-files-set-up-capacity-pool) for more information. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _PoolState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + location=location, + name=name, + qos_type=qos_type, + resource_group_name=resource_group_name, + service_level=service_level, + size_in_tb=size_in_tb, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + qos_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_level: Optional[pulumi.Input[str]] = None, + size_in_tb: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if qos_type is None and 'qosType' in kwargs: + qos_type = kwargs['qosType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_level is None and 'serviceLevel' in kwargs: + service_level = kwargs['serviceLevel'] + if size_in_tb is None and 'sizeInTb' in kwargs: + size_in_tb = kwargs['sizeInTb'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if qos_type is not None: - pulumi.set(__self__, "qos_type", qos_type) + _setter("qos_type", qos_type) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_level is not None: - pulumi.set(__self__, "service_level", service_level) + _setter("service_level", service_level) if size_in_tb is not None: - pulumi.set(__self__, "size_in_tb", size_in_tb) + _setter("size_in_tb", size_in_tb) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="accountName") @@ -388,6 +466,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PoolArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/netapp/snapshot.py b/sdk/python/pulumi_azure/netapp/snapshot.py index e7226ad69f..752b7b7863 100644 --- a/sdk/python/pulumi_azure/netapp/snapshot.py +++ b/sdk/python/pulumi_azure/netapp/snapshot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SnapshotArgs', 'Snapshot'] @@ -29,14 +29,51 @@ def __init__(__self__, *, :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the NetApp Snapshot. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "pool_name", pool_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "volume_name", volume_name) + SnapshotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + pool_name=pool_name, + resource_group_name=resource_group_name, + volume_name=volume_name, + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + pool_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + volume_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if pool_name is None and 'poolName' in kwargs: + pool_name = kwargs['poolName'] + if pool_name is None: + raise TypeError("Missing 'pool_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if volume_name is None and 'volumeName' in kwargs: + volume_name = kwargs['volumeName'] + if volume_name is None: + raise TypeError("Missing 'volume_name' argument") + + _setter("account_name", account_name) + _setter("pool_name", pool_name) + _setter("resource_group_name", resource_group_name) + _setter("volume_name", volume_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="accountName") @@ -129,18 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group where the NetApp Snapshot should be created. Changing this forces a new resource to be created. :param pulumi.Input[str] volume_name: The name of the NetApp volume in which the NetApp Snapshot should be created. Changing this forces a new resource to be created. """ + _SnapshotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + location=location, + name=name, + pool_name=pool_name, + resource_group_name=resource_group_name, + volume_name=volume_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + pool_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + volume_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if pool_name is None and 'poolName' in kwargs: + pool_name = kwargs['poolName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if volume_name is None and 'volumeName' in kwargs: + volume_name = kwargs['volumeName'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pool_name is not None: - pulumi.set(__self__, "pool_name", pool_name) + _setter("pool_name", pool_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if volume_name is not None: - pulumi.set(__self__, "volume_name", volume_name) + _setter("volume_name", volume_name) @property @pulumi.getter(name="accountName") @@ -376,6 +442,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SnapshotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/netapp/snapshot_policy.py b/sdk/python/pulumi_azure/netapp/snapshot_policy.py index 8f2aad7158..d7e6113a26 100644 --- a/sdk/python/pulumi_azure/netapp/snapshot_policy.py +++ b/sdk/python/pulumi_azure/netapp/snapshot_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,23 +39,70 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input['SnapshotPolicyWeeklyScheduleArgs'] weekly_schedule: Sets a weekly snapshot schedule. See details in below `weekly_schedule` block. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "resource_group_name", resource_group_name) + SnapshotPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + enabled=enabled, + resource_group_name=resource_group_name, + daily_schedule=daily_schedule, + hourly_schedule=hourly_schedule, + location=location, + monthly_schedule=monthly_schedule, + name=name, + tags=tags, + weekly_schedule=weekly_schedule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + daily_schedule: Optional[pulumi.Input['SnapshotPolicyDailyScheduleArgs']] = None, + hourly_schedule: Optional[pulumi.Input['SnapshotPolicyHourlyScheduleArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + monthly_schedule: Optional[pulumi.Input['SnapshotPolicyMonthlyScheduleArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + weekly_schedule: Optional[pulumi.Input['SnapshotPolicyWeeklyScheduleArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if daily_schedule is None and 'dailySchedule' in kwargs: + daily_schedule = kwargs['dailySchedule'] + if hourly_schedule is None and 'hourlySchedule' in kwargs: + hourly_schedule = kwargs['hourlySchedule'] + if monthly_schedule is None and 'monthlySchedule' in kwargs: + monthly_schedule = kwargs['monthlySchedule'] + if weekly_schedule is None and 'weeklySchedule' in kwargs: + weekly_schedule = kwargs['weeklySchedule'] + + _setter("account_name", account_name) + _setter("enabled", enabled) + _setter("resource_group_name", resource_group_name) if daily_schedule is not None: - pulumi.set(__self__, "daily_schedule", daily_schedule) + _setter("daily_schedule", daily_schedule) if hourly_schedule is not None: - pulumi.set(__self__, "hourly_schedule", hourly_schedule) + _setter("hourly_schedule", hourly_schedule) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if monthly_schedule is not None: - pulumi.set(__self__, "monthly_schedule", monthly_schedule) + _setter("monthly_schedule", monthly_schedule) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if weekly_schedule is not None: - pulumi.set(__self__, "weekly_schedule", weekly_schedule) + _setter("weekly_schedule", weekly_schedule) @property @pulumi.getter(name="accountName") @@ -204,26 +251,67 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input['SnapshotPolicyWeeklyScheduleArgs'] weekly_schedule: Sets a weekly snapshot schedule. See details in below `weekly_schedule` block. """ + _SnapshotPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + daily_schedule=daily_schedule, + enabled=enabled, + hourly_schedule=hourly_schedule, + location=location, + monthly_schedule=monthly_schedule, + name=name, + resource_group_name=resource_group_name, + tags=tags, + weekly_schedule=weekly_schedule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + daily_schedule: Optional[pulumi.Input['SnapshotPolicyDailyScheduleArgs']] = None, + enabled: Optional[pulumi.Input[bool]] = None, + hourly_schedule: Optional[pulumi.Input['SnapshotPolicyHourlyScheduleArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + monthly_schedule: Optional[pulumi.Input['SnapshotPolicyMonthlyScheduleArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + weekly_schedule: Optional[pulumi.Input['SnapshotPolicyWeeklyScheduleArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if daily_schedule is None and 'dailySchedule' in kwargs: + daily_schedule = kwargs['dailySchedule'] + if hourly_schedule is None and 'hourlySchedule' in kwargs: + hourly_schedule = kwargs['hourlySchedule'] + if monthly_schedule is None and 'monthlySchedule' in kwargs: + monthly_schedule = kwargs['monthlySchedule'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if weekly_schedule is None and 'weeklySchedule' in kwargs: + weekly_schedule = kwargs['weeklySchedule'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if daily_schedule is not None: - pulumi.set(__self__, "daily_schedule", daily_schedule) + _setter("daily_schedule", daily_schedule) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if hourly_schedule is not None: - pulumi.set(__self__, "hourly_schedule", hourly_schedule) + _setter("hourly_schedule", hourly_schedule) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if monthly_schedule is not None: - pulumi.set(__self__, "monthly_schedule", monthly_schedule) + _setter("monthly_schedule", monthly_schedule) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if weekly_schedule is not None: - pulumi.set(__self__, "weekly_schedule", weekly_schedule) + _setter("weekly_schedule", weekly_schedule) @property @pulumi.getter(name="accountName") @@ -505,6 +593,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SnapshotPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -532,18 +624,38 @@ def _internal_init(__self__, if account_name is None and not opts.urn: raise TypeError("Missing required property 'account_name'") __props__.__dict__["account_name"] = account_name + if daily_schedule is not None and not isinstance(daily_schedule, SnapshotPolicyDailyScheduleArgs): + daily_schedule = daily_schedule or {} + def _setter(key, value): + daily_schedule[key] = value + SnapshotPolicyDailyScheduleArgs._configure(_setter, **daily_schedule) __props__.__dict__["daily_schedule"] = daily_schedule if enabled is None and not opts.urn: raise TypeError("Missing required property 'enabled'") __props__.__dict__["enabled"] = enabled + if hourly_schedule is not None and not isinstance(hourly_schedule, SnapshotPolicyHourlyScheduleArgs): + hourly_schedule = hourly_schedule or {} + def _setter(key, value): + hourly_schedule[key] = value + SnapshotPolicyHourlyScheduleArgs._configure(_setter, **hourly_schedule) __props__.__dict__["hourly_schedule"] = hourly_schedule __props__.__dict__["location"] = location + if monthly_schedule is not None and not isinstance(monthly_schedule, SnapshotPolicyMonthlyScheduleArgs): + monthly_schedule = monthly_schedule or {} + def _setter(key, value): + monthly_schedule[key] = value + SnapshotPolicyMonthlyScheduleArgs._configure(_setter, **monthly_schedule) __props__.__dict__["monthly_schedule"] = monthly_schedule __props__.__dict__["name"] = name if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["tags"] = tags + if weekly_schedule is not None and not isinstance(weekly_schedule, SnapshotPolicyWeeklyScheduleArgs): + weekly_schedule = weekly_schedule or {} + def _setter(key, value): + weekly_schedule[key] = value + SnapshotPolicyWeeklyScheduleArgs._configure(_setter, **weekly_schedule) __props__.__dict__["weekly_schedule"] = weekly_schedule super(SnapshotPolicy, __self__).__init__( 'azure:netapp/snapshotPolicy:SnapshotPolicy', diff --git a/sdk/python/pulumi_azure/netapp/volume.py b/sdk/python/pulumi_azure/netapp/volume.py index 239c9435a1..530afced37 100644 --- a/sdk/python/pulumi_azure/netapp/volume.py +++ b/sdk/python/pulumi_azure/netapp/volume.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -63,41 +63,138 @@ def __init__(__self__, *, :param pulumi.Input[float] throughput_in_mibps: Throughput of this volume in Mibps. :param pulumi.Input[str] zone: Specifies the Availability Zone in which the Volume should be located. Possible values are `1`, `2` and `3`. Changing this forces a new resource to be created. This feature is currently in preview, for more information on how to enable it, please refer to [Manage availability zone volume placement for Azure NetApp Files](https://learn.microsoft.com/en-us/azure/azure-netapp-files/manage-availability-zone-volume-placement#register-the-feature). """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "pool_name", pool_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "service_level", service_level) - pulumi.set(__self__, "storage_quota_in_gb", storage_quota_in_gb) - pulumi.set(__self__, "subnet_id", subnet_id) - pulumi.set(__self__, "volume_path", volume_path) + VolumeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + pool_name=pool_name, + resource_group_name=resource_group_name, + service_level=service_level, + storage_quota_in_gb=storage_quota_in_gb, + subnet_id=subnet_id, + volume_path=volume_path, + azure_vmware_data_store_enabled=azure_vmware_data_store_enabled, + create_from_snapshot_resource_id=create_from_snapshot_resource_id, + data_protection_replication=data_protection_replication, + data_protection_snapshot_policy=data_protection_snapshot_policy, + export_policy_rules=export_policy_rules, + location=location, + name=name, + network_features=network_features, + protocols=protocols, + security_style=security_style, + snapshot_directory_visible=snapshot_directory_visible, + tags=tags, + throughput_in_mibps=throughput_in_mibps, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + pool_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_level: Optional[pulumi.Input[str]] = None, + storage_quota_in_gb: Optional[pulumi.Input[int]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + volume_path: Optional[pulumi.Input[str]] = None, + azure_vmware_data_store_enabled: Optional[pulumi.Input[bool]] = None, + create_from_snapshot_resource_id: Optional[pulumi.Input[str]] = None, + data_protection_replication: Optional[pulumi.Input['VolumeDataProtectionReplicationArgs']] = None, + data_protection_snapshot_policy: Optional[pulumi.Input['VolumeDataProtectionSnapshotPolicyArgs']] = None, + export_policy_rules: Optional[pulumi.Input[Sequence[pulumi.Input['VolumeExportPolicyRuleArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_features: Optional[pulumi.Input[str]] = None, + protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + security_style: Optional[pulumi.Input[str]] = None, + snapshot_directory_visible: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + throughput_in_mibps: Optional[pulumi.Input[float]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if pool_name is None and 'poolName' in kwargs: + pool_name = kwargs['poolName'] + if pool_name is None: + raise TypeError("Missing 'pool_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if service_level is None and 'serviceLevel' in kwargs: + service_level = kwargs['serviceLevel'] + if service_level is None: + raise TypeError("Missing 'service_level' argument") + if storage_quota_in_gb is None and 'storageQuotaInGb' in kwargs: + storage_quota_in_gb = kwargs['storageQuotaInGb'] + if storage_quota_in_gb is None: + raise TypeError("Missing 'storage_quota_in_gb' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if volume_path is None and 'volumePath' in kwargs: + volume_path = kwargs['volumePath'] + if volume_path is None: + raise TypeError("Missing 'volume_path' argument") + if azure_vmware_data_store_enabled is None and 'azureVmwareDataStoreEnabled' in kwargs: + azure_vmware_data_store_enabled = kwargs['azureVmwareDataStoreEnabled'] + if create_from_snapshot_resource_id is None and 'createFromSnapshotResourceId' in kwargs: + create_from_snapshot_resource_id = kwargs['createFromSnapshotResourceId'] + if data_protection_replication is None and 'dataProtectionReplication' in kwargs: + data_protection_replication = kwargs['dataProtectionReplication'] + if data_protection_snapshot_policy is None and 'dataProtectionSnapshotPolicy' in kwargs: + data_protection_snapshot_policy = kwargs['dataProtectionSnapshotPolicy'] + if export_policy_rules is None and 'exportPolicyRules' in kwargs: + export_policy_rules = kwargs['exportPolicyRules'] + if network_features is None and 'networkFeatures' in kwargs: + network_features = kwargs['networkFeatures'] + if security_style is None and 'securityStyle' in kwargs: + security_style = kwargs['securityStyle'] + if snapshot_directory_visible is None and 'snapshotDirectoryVisible' in kwargs: + snapshot_directory_visible = kwargs['snapshotDirectoryVisible'] + if throughput_in_mibps is None and 'throughputInMibps' in kwargs: + throughput_in_mibps = kwargs['throughputInMibps'] + + _setter("account_name", account_name) + _setter("pool_name", pool_name) + _setter("resource_group_name", resource_group_name) + _setter("service_level", service_level) + _setter("storage_quota_in_gb", storage_quota_in_gb) + _setter("subnet_id", subnet_id) + _setter("volume_path", volume_path) if azure_vmware_data_store_enabled is not None: - pulumi.set(__self__, "azure_vmware_data_store_enabled", azure_vmware_data_store_enabled) + _setter("azure_vmware_data_store_enabled", azure_vmware_data_store_enabled) if create_from_snapshot_resource_id is not None: - pulumi.set(__self__, "create_from_snapshot_resource_id", create_from_snapshot_resource_id) + _setter("create_from_snapshot_resource_id", create_from_snapshot_resource_id) if data_protection_replication is not None: - pulumi.set(__self__, "data_protection_replication", data_protection_replication) + _setter("data_protection_replication", data_protection_replication) if data_protection_snapshot_policy is not None: - pulumi.set(__self__, "data_protection_snapshot_policy", data_protection_snapshot_policy) + _setter("data_protection_snapshot_policy", data_protection_snapshot_policy) if export_policy_rules is not None: - pulumi.set(__self__, "export_policy_rules", export_policy_rules) + _setter("export_policy_rules", export_policy_rules) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_features is not None: - pulumi.set(__self__, "network_features", network_features) + _setter("network_features", network_features) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) if security_style is not None: - pulumi.set(__self__, "security_style", security_style) + _setter("security_style", security_style) if snapshot_directory_visible is not None: - pulumi.set(__self__, "snapshot_directory_visible", snapshot_directory_visible) + _setter("snapshot_directory_visible", snapshot_directory_visible) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if throughput_in_mibps is not None: - pulumi.set(__self__, "throughput_in_mibps", throughput_in_mibps) + _setter("throughput_in_mibps", throughput_in_mibps) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="accountName") @@ -406,50 +503,137 @@ def __init__(__self__, *, :param pulumi.Input[str] volume_path: A unique file path for the volume. Used when creating mount targets. Changing this forces a new resource to be created. :param pulumi.Input[str] zone: Specifies the Availability Zone in which the Volume should be located. Possible values are `1`, `2` and `3`. Changing this forces a new resource to be created. This feature is currently in preview, for more information on how to enable it, please refer to [Manage availability zone volume placement for Azure NetApp Files](https://learn.microsoft.com/en-us/azure/azure-netapp-files/manage-availability-zone-volume-placement#register-the-feature). """ + _VolumeState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + azure_vmware_data_store_enabled=azure_vmware_data_store_enabled, + create_from_snapshot_resource_id=create_from_snapshot_resource_id, + data_protection_replication=data_protection_replication, + data_protection_snapshot_policy=data_protection_snapshot_policy, + export_policy_rules=export_policy_rules, + location=location, + mount_ip_addresses=mount_ip_addresses, + name=name, + network_features=network_features, + pool_name=pool_name, + protocols=protocols, + resource_group_name=resource_group_name, + security_style=security_style, + service_level=service_level, + snapshot_directory_visible=snapshot_directory_visible, + storage_quota_in_gb=storage_quota_in_gb, + subnet_id=subnet_id, + tags=tags, + throughput_in_mibps=throughput_in_mibps, + volume_path=volume_path, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + azure_vmware_data_store_enabled: Optional[pulumi.Input[bool]] = None, + create_from_snapshot_resource_id: Optional[pulumi.Input[str]] = None, + data_protection_replication: Optional[pulumi.Input['VolumeDataProtectionReplicationArgs']] = None, + data_protection_snapshot_policy: Optional[pulumi.Input['VolumeDataProtectionSnapshotPolicyArgs']] = None, + export_policy_rules: Optional[pulumi.Input[Sequence[pulumi.Input['VolumeExportPolicyRuleArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + mount_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + network_features: Optional[pulumi.Input[str]] = None, + pool_name: Optional[pulumi.Input[str]] = None, + protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + security_style: Optional[pulumi.Input[str]] = None, + service_level: Optional[pulumi.Input[str]] = None, + snapshot_directory_visible: Optional[pulumi.Input[bool]] = None, + storage_quota_in_gb: Optional[pulumi.Input[int]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + throughput_in_mibps: Optional[pulumi.Input[float]] = None, + volume_path: Optional[pulumi.Input[str]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if azure_vmware_data_store_enabled is None and 'azureVmwareDataStoreEnabled' in kwargs: + azure_vmware_data_store_enabled = kwargs['azureVmwareDataStoreEnabled'] + if create_from_snapshot_resource_id is None and 'createFromSnapshotResourceId' in kwargs: + create_from_snapshot_resource_id = kwargs['createFromSnapshotResourceId'] + if data_protection_replication is None and 'dataProtectionReplication' in kwargs: + data_protection_replication = kwargs['dataProtectionReplication'] + if data_protection_snapshot_policy is None and 'dataProtectionSnapshotPolicy' in kwargs: + data_protection_snapshot_policy = kwargs['dataProtectionSnapshotPolicy'] + if export_policy_rules is None and 'exportPolicyRules' in kwargs: + export_policy_rules = kwargs['exportPolicyRules'] + if mount_ip_addresses is None and 'mountIpAddresses' in kwargs: + mount_ip_addresses = kwargs['mountIpAddresses'] + if network_features is None and 'networkFeatures' in kwargs: + network_features = kwargs['networkFeatures'] + if pool_name is None and 'poolName' in kwargs: + pool_name = kwargs['poolName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if security_style is None and 'securityStyle' in kwargs: + security_style = kwargs['securityStyle'] + if service_level is None and 'serviceLevel' in kwargs: + service_level = kwargs['serviceLevel'] + if snapshot_directory_visible is None and 'snapshotDirectoryVisible' in kwargs: + snapshot_directory_visible = kwargs['snapshotDirectoryVisible'] + if storage_quota_in_gb is None and 'storageQuotaInGb' in kwargs: + storage_quota_in_gb = kwargs['storageQuotaInGb'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if throughput_in_mibps is None and 'throughputInMibps' in kwargs: + throughput_in_mibps = kwargs['throughputInMibps'] + if volume_path is None and 'volumePath' in kwargs: + volume_path = kwargs['volumePath'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if azure_vmware_data_store_enabled is not None: - pulumi.set(__self__, "azure_vmware_data_store_enabled", azure_vmware_data_store_enabled) + _setter("azure_vmware_data_store_enabled", azure_vmware_data_store_enabled) if create_from_snapshot_resource_id is not None: - pulumi.set(__self__, "create_from_snapshot_resource_id", create_from_snapshot_resource_id) + _setter("create_from_snapshot_resource_id", create_from_snapshot_resource_id) if data_protection_replication is not None: - pulumi.set(__self__, "data_protection_replication", data_protection_replication) + _setter("data_protection_replication", data_protection_replication) if data_protection_snapshot_policy is not None: - pulumi.set(__self__, "data_protection_snapshot_policy", data_protection_snapshot_policy) + _setter("data_protection_snapshot_policy", data_protection_snapshot_policy) if export_policy_rules is not None: - pulumi.set(__self__, "export_policy_rules", export_policy_rules) + _setter("export_policy_rules", export_policy_rules) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mount_ip_addresses is not None: - pulumi.set(__self__, "mount_ip_addresses", mount_ip_addresses) + _setter("mount_ip_addresses", mount_ip_addresses) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_features is not None: - pulumi.set(__self__, "network_features", network_features) + _setter("network_features", network_features) if pool_name is not None: - pulumi.set(__self__, "pool_name", pool_name) + _setter("pool_name", pool_name) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if security_style is not None: - pulumi.set(__self__, "security_style", security_style) + _setter("security_style", security_style) if service_level is not None: - pulumi.set(__self__, "service_level", service_level) + _setter("service_level", service_level) if snapshot_directory_visible is not None: - pulumi.set(__self__, "snapshot_directory_visible", snapshot_directory_visible) + _setter("snapshot_directory_visible", snapshot_directory_visible) if storage_quota_in_gb is not None: - pulumi.set(__self__, "storage_quota_in_gb", storage_quota_in_gb) + _setter("storage_quota_in_gb", storage_quota_in_gb) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if throughput_in_mibps is not None: - pulumi.set(__self__, "throughput_in_mibps", throughput_in_mibps) + _setter("throughput_in_mibps", throughput_in_mibps) if volume_path is not None: - pulumi.set(__self__, "volume_path", volume_path) + _setter("volume_path", volume_path) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="accountName") @@ -809,6 +993,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VolumeArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -849,7 +1037,17 @@ def _internal_init(__self__, __props__.__dict__["account_name"] = account_name __props__.__dict__["azure_vmware_data_store_enabled"] = azure_vmware_data_store_enabled __props__.__dict__["create_from_snapshot_resource_id"] = create_from_snapshot_resource_id + if data_protection_replication is not None and not isinstance(data_protection_replication, VolumeDataProtectionReplicationArgs): + data_protection_replication = data_protection_replication or {} + def _setter(key, value): + data_protection_replication[key] = value + VolumeDataProtectionReplicationArgs._configure(_setter, **data_protection_replication) __props__.__dict__["data_protection_replication"] = data_protection_replication + if data_protection_snapshot_policy is not None and not isinstance(data_protection_snapshot_policy, VolumeDataProtectionSnapshotPolicyArgs): + data_protection_snapshot_policy = data_protection_snapshot_policy or {} + def _setter(key, value): + data_protection_snapshot_policy[key] = value + VolumeDataProtectionSnapshotPolicyArgs._configure(_setter, **data_protection_snapshot_policy) __props__.__dict__["data_protection_snapshot_policy"] = data_protection_snapshot_policy __props__.__dict__["export_policy_rules"] = export_policy_rules __props__.__dict__["location"] = location diff --git a/sdk/python/pulumi_azure/netapp/volume_group_sap_hana.py b/sdk/python/pulumi_azure/netapp/volume_group_sap_hana.py index b42dddf0dd..ec3969344e 100644 --- a/sdk/python/pulumi_azure/netapp/volume_group_sap_hana.py +++ b/sdk/python/pulumi_azure/netapp/volume_group_sap_hana.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,15 +33,56 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The Azure Region where the Application Volume Group should exist. Changing this forces a new Application Volume Group to be created and data will be lost. :param pulumi.Input[str] name: The name which should be used for this Application Volume Group. Changing this forces a new Application Volume Group to be created and data will be lost. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "application_identifier", application_identifier) - pulumi.set(__self__, "group_description", group_description) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "volumes", volumes) + VolumeGroupSapHanaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + application_identifier=application_identifier, + group_description=group_description, + resource_group_name=resource_group_name, + volumes=volumes, + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + application_identifier: Optional[pulumi.Input[str]] = None, + group_description: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + volumes: Optional[pulumi.Input[Sequence[pulumi.Input['VolumeGroupSapHanaVolumeArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if application_identifier is None and 'applicationIdentifier' in kwargs: + application_identifier = kwargs['applicationIdentifier'] + if application_identifier is None: + raise TypeError("Missing 'application_identifier' argument") + if group_description is None and 'groupDescription' in kwargs: + group_description = kwargs['groupDescription'] + if group_description is None: + raise TypeError("Missing 'group_description' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if volumes is None: + raise TypeError("Missing 'volumes' argument") + + _setter("account_name", account_name) + _setter("application_identifier", application_identifier) + _setter("group_description", group_description) + _setter("resource_group_name", resource_group_name) + _setter("volumes", volumes) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="accountName") @@ -148,20 +189,51 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Application Volume Group should exist. Changing this forces a new Application Volume Group to be created and data will be lost. :param pulumi.Input[Sequence[pulumi.Input['VolumeGroupSapHanaVolumeArgs']]] volumes: One or more `volume` blocks as defined below. """ + _VolumeGroupSapHanaState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + application_identifier=application_identifier, + group_description=group_description, + location=location, + name=name, + resource_group_name=resource_group_name, + volumes=volumes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + application_identifier: Optional[pulumi.Input[str]] = None, + group_description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + volumes: Optional[pulumi.Input[Sequence[pulumi.Input['VolumeGroupSapHanaVolumeArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if application_identifier is None and 'applicationIdentifier' in kwargs: + application_identifier = kwargs['applicationIdentifier'] + if group_description is None and 'groupDescription' in kwargs: + group_description = kwargs['groupDescription'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if account_name is not None: - pulumi.set(__self__, "account_name", account_name) + _setter("account_name", account_name) if application_identifier is not None: - pulumi.set(__self__, "application_identifier", application_identifier) + _setter("application_identifier", application_identifier) if group_description is not None: - pulumi.set(__self__, "group_description", group_description) + _setter("group_description", group_description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if volumes is not None: - pulumi.set(__self__, "volumes", volumes) + _setter("volumes", volumes) @property @pulumi.getter(name="accountName") @@ -305,6 +377,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VolumeGroupSapHanaArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/netapp/volume_quota_rule.py b/sdk/python/pulumi_azure/netapp/volume_quota_rule.py index 5bb74b2aaf..81aab8c846 100644 --- a/sdk/python/pulumi_azure/netapp/volume_quota_rule.py +++ b/sdk/python/pulumi_azure/netapp/volume_quota_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VolumeQuotaRuleArgs', 'VolumeQuotaRule'] @@ -33,15 +33,50 @@ def __init__(__self__, *, > **NOTE:** more information about this resource can be found at [Understand default and individual user and group quotas](https://learn.microsoft.com/en-us/azure/azure-netapp-files/default-individual-user-group-quotas-introduction) """ - pulumi.set(__self__, "quota_size_in_kib", quota_size_in_kib) - pulumi.set(__self__, "quota_type", quota_type) - pulumi.set(__self__, "volume_id", volume_id) + VolumeQuotaRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + quota_size_in_kib=quota_size_in_kib, + quota_type=quota_type, + volume_id=volume_id, + location=location, + name=name, + quota_target=quota_target, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + quota_size_in_kib: Optional[pulumi.Input[int]] = None, + quota_type: Optional[pulumi.Input[str]] = None, + volume_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + quota_target: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if quota_size_in_kib is None and 'quotaSizeInKib' in kwargs: + quota_size_in_kib = kwargs['quotaSizeInKib'] + if quota_size_in_kib is None: + raise TypeError("Missing 'quota_size_in_kib' argument") + if quota_type is None and 'quotaType' in kwargs: + quota_type = kwargs['quotaType'] + if quota_type is None: + raise TypeError("Missing 'quota_type' argument") + if volume_id is None and 'volumeId' in kwargs: + volume_id = kwargs['volumeId'] + if volume_id is None: + raise TypeError("Missing 'volume_id' argument") + if quota_target is None and 'quotaTarget' in kwargs: + quota_target = kwargs['quotaTarget'] + + _setter("quota_size_in_kib", quota_size_in_kib) + _setter("quota_type", quota_type) + _setter("volume_id", volume_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if quota_target is not None: - pulumi.set(__self__, "quota_target", quota_target) + _setter("quota_target", quota_target) @property @pulumi.getter(name="quotaSizeInKib") @@ -142,18 +177,47 @@ def __init__(__self__, *, :param pulumi.Input[str] quota_type: Quota type. Possible values are `DefaultGroupQuota`, `DefaultUserQuota`, `IndividualGroupQuota` and `IndividualUserQuota`. Please note that `IndividualGroupQuota` and `DefaultGroupQuota` are not applicable to SMB and dual-protocol volumes. :param pulumi.Input[str] volume_id: The NetApp volume ID where the Volume Quota Rule is assigned to. """ + _VolumeQuotaRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + quota_size_in_kib=quota_size_in_kib, + quota_target=quota_target, + quota_type=quota_type, + volume_id=volume_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + quota_size_in_kib: Optional[pulumi.Input[int]] = None, + quota_target: Optional[pulumi.Input[str]] = None, + quota_type: Optional[pulumi.Input[str]] = None, + volume_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if quota_size_in_kib is None and 'quotaSizeInKib' in kwargs: + quota_size_in_kib = kwargs['quotaSizeInKib'] + if quota_target is None and 'quotaTarget' in kwargs: + quota_target = kwargs['quotaTarget'] + if quota_type is None and 'quotaType' in kwargs: + quota_type = kwargs['quotaType'] + if volume_id is None and 'volumeId' in kwargs: + volume_id = kwargs['volumeId'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if quota_size_in_kib is not None: - pulumi.set(__self__, "quota_size_in_kib", quota_size_in_kib) + _setter("quota_size_in_kib", quota_size_in_kib) if quota_target is not None: - pulumi.set(__self__, "quota_target", quota_target) + _setter("quota_target", quota_target) if quota_type is not None: - pulumi.set(__self__, "quota_type", quota_type) + _setter("quota_type", quota_type) if volume_id is not None: - pulumi.set(__self__, "volume_id", volume_id) + _setter("volume_id", volume_id) @property @pulumi.getter @@ -439,6 +503,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VolumeQuotaRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/_inputs.py b/sdk/python/pulumi_azure/network/_inputs.py index 98704f66d3..803f83a8df 100644 --- a/sdk/python/pulumi_azure/network/_inputs.py +++ b/sdk/python/pulumi_azure/network/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -187,10 +187,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Authentication Certificate. :param pulumi.Input[str] id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "data", data) - pulumi.set(__self__, "name", name) + ApplicationGatewayAuthenticationCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data=data, + name=name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data is None: + raise TypeError("Missing 'data' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("data", data) + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -238,9 +257,28 @@ def __init__(__self__, *, :param pulumi.Input[int] min_capacity: Minimum capacity for autoscaling. Accepted values are in the range `0` to `100`. :param pulumi.Input[int] max_capacity: Maximum capacity for autoscaling. Accepted values are in the range `2` to `125`. """ - pulumi.set(__self__, "min_capacity", min_capacity) + ApplicationGatewayAutoscaleConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + min_capacity=min_capacity, + max_capacity=max_capacity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + min_capacity: Optional[pulumi.Input[int]] = None, + max_capacity: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if min_capacity is None and 'minCapacity' in kwargs: + min_capacity = kwargs['minCapacity'] + if min_capacity is None: + raise TypeError("Missing 'min_capacity' argument") + if max_capacity is None and 'maxCapacity' in kwargs: + max_capacity = kwargs['maxCapacity'] + + _setter("min_capacity", min_capacity) if max_capacity is not None: - pulumi.set(__self__, "max_capacity", max_capacity) + _setter("max_capacity", max_capacity) @property @pulumi.getter(name="minCapacity") @@ -280,13 +318,34 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the Rewrite Rule Set :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_addresses: A list of IP Addresses which should be part of the Backend Address Pool. """ - pulumi.set(__self__, "name", name) + ApplicationGatewayBackendAddressPoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + fqdns=fqdns, + id=id, + ip_addresses=ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + id: Optional[pulumi.Input[str]] = None, + ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + + _setter("name", name) if fqdns is not None: - pulumi.set(__self__, "fqdns", fqdns) + _setter("fqdns", fqdns) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) @property @pulumi.getter @@ -372,32 +431,99 @@ def __init__(__self__, *, :param pulumi.Input[int] request_timeout: The request timeout in seconds, which must be between 1 and 86400 seconds. Defaults to `30`. :param pulumi.Input[Sequence[pulumi.Input[str]]] trusted_root_certificate_names: A list of `trusted_root_certificate` names. """ - pulumi.set(__self__, "cookie_based_affinity", cookie_based_affinity) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "protocol", protocol) + ApplicationGatewayBackendHttpSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cookie_based_affinity=cookie_based_affinity, + name=name, + port=port, + protocol=protocol, + affinity_cookie_name=affinity_cookie_name, + authentication_certificates=authentication_certificates, + connection_draining=connection_draining, + host_name=host_name, + id=id, + path=path, + pick_host_name_from_backend_address=pick_host_name_from_backend_address, + probe_id=probe_id, + probe_name=probe_name, + request_timeout=request_timeout, + trusted_root_certificate_names=trusted_root_certificate_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cookie_based_affinity: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + affinity_cookie_name: Optional[pulumi.Input[str]] = None, + authentication_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayBackendHttpSettingAuthenticationCertificateArgs']]]] = None, + connection_draining: Optional[pulumi.Input['ApplicationGatewayBackendHttpSettingConnectionDrainingArgs']] = None, + host_name: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + pick_host_name_from_backend_address: Optional[pulumi.Input[bool]] = None, + probe_id: Optional[pulumi.Input[str]] = None, + probe_name: Optional[pulumi.Input[str]] = None, + request_timeout: Optional[pulumi.Input[int]] = None, + trusted_root_certificate_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cookie_based_affinity is None and 'cookieBasedAffinity' in kwargs: + cookie_based_affinity = kwargs['cookieBasedAffinity'] + if cookie_based_affinity is None: + raise TypeError("Missing 'cookie_based_affinity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if affinity_cookie_name is None and 'affinityCookieName' in kwargs: + affinity_cookie_name = kwargs['affinityCookieName'] + if authentication_certificates is None and 'authenticationCertificates' in kwargs: + authentication_certificates = kwargs['authenticationCertificates'] + if connection_draining is None and 'connectionDraining' in kwargs: + connection_draining = kwargs['connectionDraining'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if pick_host_name_from_backend_address is None and 'pickHostNameFromBackendAddress' in kwargs: + pick_host_name_from_backend_address = kwargs['pickHostNameFromBackendAddress'] + if probe_id is None and 'probeId' in kwargs: + probe_id = kwargs['probeId'] + if probe_name is None and 'probeName' in kwargs: + probe_name = kwargs['probeName'] + if request_timeout is None and 'requestTimeout' in kwargs: + request_timeout = kwargs['requestTimeout'] + if trusted_root_certificate_names is None and 'trustedRootCertificateNames' in kwargs: + trusted_root_certificate_names = kwargs['trustedRootCertificateNames'] + + _setter("cookie_based_affinity", cookie_based_affinity) + _setter("name", name) + _setter("port", port) + _setter("protocol", protocol) if affinity_cookie_name is not None: - pulumi.set(__self__, "affinity_cookie_name", affinity_cookie_name) + _setter("affinity_cookie_name", affinity_cookie_name) if authentication_certificates is not None: - pulumi.set(__self__, "authentication_certificates", authentication_certificates) + _setter("authentication_certificates", authentication_certificates) if connection_draining is not None: - pulumi.set(__self__, "connection_draining", connection_draining) + _setter("connection_draining", connection_draining) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if pick_host_name_from_backend_address is not None: - pulumi.set(__self__, "pick_host_name_from_backend_address", pick_host_name_from_backend_address) + _setter("pick_host_name_from_backend_address", pick_host_name_from_backend_address) if probe_id is not None: - pulumi.set(__self__, "probe_id", probe_id) + _setter("probe_id", probe_id) if probe_name is not None: - pulumi.set(__self__, "probe_name", probe_name) + _setter("probe_name", probe_name) if request_timeout is not None: - pulumi.set(__self__, "request_timeout", request_timeout) + _setter("request_timeout", request_timeout) if trusted_root_certificate_names is not None: - pulumi.set(__self__, "trusted_root_certificate_names", trusted_root_certificate_names) + _setter("trusted_root_certificate_names", trusted_root_certificate_names) @property @pulumi.getter(name="cookieBasedAffinity") @@ -589,9 +715,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Authentication Certificate. :param pulumi.Input[str] id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "name", name) + ApplicationGatewayBackendHttpSettingAuthenticationCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -627,8 +768,27 @@ def __init__(__self__, *, :param pulumi.Input[int] drain_timeout_sec: The number of seconds connection draining is active. Acceptable values are from `1` second to `3600` seconds. :param pulumi.Input[bool] enabled: If connection draining is enabled or not. """ - pulumi.set(__self__, "drain_timeout_sec", drain_timeout_sec) - pulumi.set(__self__, "enabled", enabled) + ApplicationGatewayBackendHttpSettingConnectionDrainingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + drain_timeout_sec=drain_timeout_sec, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + drain_timeout_sec: Optional[pulumi.Input[int]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if drain_timeout_sec is None and 'drainTimeoutSec' in kwargs: + drain_timeout_sec = kwargs['drainTimeoutSec'] + if drain_timeout_sec is None: + raise TypeError("Missing 'drain_timeout_sec' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("drain_timeout_sec", drain_timeout_sec) + _setter("enabled", enabled) @property @pulumi.getter(name="drainTimeoutSec") @@ -666,10 +826,33 @@ def __init__(__self__, *, :param pulumi.Input[str] status_code: Status code of the application gateway customer error. Possible values are `HttpStatus403` and `HttpStatus502` :param pulumi.Input[str] id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "custom_error_page_url", custom_error_page_url) - pulumi.set(__self__, "status_code", status_code) + ApplicationGatewayCustomErrorConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_error_page_url=custom_error_page_url, + status_code=status_code, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_error_page_url: Optional[pulumi.Input[str]] = None, + status_code: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_error_page_url is None and 'customErrorPageUrl' in kwargs: + custom_error_page_url = kwargs['customErrorPageUrl'] + if custom_error_page_url is None: + raise TypeError("Missing 'custom_error_page_url' argument") + if status_code is None and 'statusCode' in kwargs: + status_code = kwargs['statusCode'] + if status_code is None: + raise TypeError("Missing 'status_code' argument") + + _setter("custom_error_page_url", custom_error_page_url) + _setter("status_code", status_code) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter(name="customErrorPageUrl") @@ -729,21 +912,60 @@ def __init__(__self__, *, :param pulumi.Input[str] public_ip_address_id: The ID of a Public IP Address which the Application Gateway should use. The allocation method for the Public IP Address depends on the `sku` of this Application Gateway. Please refer to the [Azure documentation for public IP addresses](https://docs.microsoft.com/azure/virtual-network/public-ip-addresses#application-gateways) for details. :param pulumi.Input[str] subnet_id: The ID of the Subnet. """ - pulumi.set(__self__, "name", name) + ApplicationGatewayFrontendIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + id=id, + private_ip_address=private_ip_address, + private_ip_address_allocation=private_ip_address_allocation, + private_link_configuration_id=private_link_configuration_id, + private_link_configuration_name=private_link_configuration_name, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + private_ip_address_allocation: Optional[pulumi.Input[str]] = None, + private_link_configuration_id: Optional[pulumi.Input[str]] = None, + private_link_configuration_name: Optional[pulumi.Input[str]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + if private_link_configuration_id is None and 'privateLinkConfigurationId' in kwargs: + private_link_configuration_id = kwargs['privateLinkConfigurationId'] + if private_link_configuration_name is None and 'privateLinkConfigurationName' in kwargs: + private_link_configuration_name = kwargs['privateLinkConfigurationName'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_address_allocation is not None: - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) + _setter("private_ip_address_allocation", private_ip_address_allocation) if private_link_configuration_id is not None: - pulumi.set(__self__, "private_link_configuration_id", private_link_configuration_id) + _setter("private_link_configuration_id", private_link_configuration_id) if private_link_configuration_name is not None: - pulumi.set(__self__, "private_link_configuration_name", private_link_configuration_name) + _setter("private_link_configuration_name", private_link_configuration_name) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -853,10 +1075,29 @@ def __init__(__self__, *, :param pulumi.Input[int] port: The port used for this Frontend Port. :param pulumi.Input[str] id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "port", port) + ApplicationGatewayFrontendPortArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + port=port, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if port is None: + raise TypeError("Missing 'port' argument") + + _setter("name", name) + _setter("port", port) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -906,10 +1147,31 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet which the Application Gateway should be connected to. :param pulumi.Input[str] id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "subnet_id", subnet_id) + ApplicationGatewayGatewayIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + subnet_id=subnet_id, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("name", name) + _setter("subnet_id", subnet_id) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -957,8 +1219,29 @@ def __init__(__self__, *, :param pulumi.Input[bool] request_buffering_enabled: Whether Application Gateway's Request buffer is enabled. :param pulumi.Input[bool] response_buffering_enabled: Whether Application Gateway's Response buffer is enabled. """ - pulumi.set(__self__, "request_buffering_enabled", request_buffering_enabled) - pulumi.set(__self__, "response_buffering_enabled", response_buffering_enabled) + ApplicationGatewayGlobalArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + request_buffering_enabled=request_buffering_enabled, + response_buffering_enabled=response_buffering_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + request_buffering_enabled: Optional[pulumi.Input[bool]] = None, + response_buffering_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if request_buffering_enabled is None and 'requestBufferingEnabled' in kwargs: + request_buffering_enabled = kwargs['requestBufferingEnabled'] + if request_buffering_enabled is None: + raise TypeError("Missing 'request_buffering_enabled' argument") + if response_buffering_enabled is None and 'responseBufferingEnabled' in kwargs: + response_buffering_enabled = kwargs['responseBufferingEnabled'] + if response_buffering_enabled is None: + raise TypeError("Missing 'response_buffering_enabled' argument") + + _setter("request_buffering_enabled", request_buffering_enabled) + _setter("response_buffering_enabled", response_buffering_enabled) @property @pulumi.getter(name="requestBufferingEnabled") @@ -1024,34 +1307,109 @@ def __init__(__self__, *, :param pulumi.Input[str] ssl_profile_id: The ID of the associated SSL Profile. :param pulumi.Input[str] ssl_profile_name: The name of the associated SSL Profile which should be used for this HTTP Listener. """ - pulumi.set(__self__, "frontend_ip_configuration_name", frontend_ip_configuration_name) - pulumi.set(__self__, "frontend_port_name", frontend_port_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + ApplicationGatewayHttpListenerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + frontend_ip_configuration_name=frontend_ip_configuration_name, + frontend_port_name=frontend_port_name, + name=name, + protocol=protocol, + custom_error_configurations=custom_error_configurations, + firewall_policy_id=firewall_policy_id, + frontend_ip_configuration_id=frontend_ip_configuration_id, + frontend_port_id=frontend_port_id, + host_name=host_name, + host_names=host_names, + id=id, + require_sni=require_sni, + ssl_certificate_id=ssl_certificate_id, + ssl_certificate_name=ssl_certificate_name, + ssl_profile_id=ssl_profile_id, + ssl_profile_name=ssl_profile_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frontend_ip_configuration_name: Optional[pulumi.Input[str]] = None, + frontend_port_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + custom_error_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayHttpListenerCustomErrorConfigurationArgs']]]] = None, + firewall_policy_id: Optional[pulumi.Input[str]] = None, + frontend_ip_configuration_id: Optional[pulumi.Input[str]] = None, + frontend_port_id: Optional[pulumi.Input[str]] = None, + host_name: Optional[pulumi.Input[str]] = None, + host_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + id: Optional[pulumi.Input[str]] = None, + require_sni: Optional[pulumi.Input[bool]] = None, + ssl_certificate_id: Optional[pulumi.Input[str]] = None, + ssl_certificate_name: Optional[pulumi.Input[str]] = None, + ssl_profile_id: Optional[pulumi.Input[str]] = None, + ssl_profile_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frontend_ip_configuration_name is None and 'frontendIpConfigurationName' in kwargs: + frontend_ip_configuration_name = kwargs['frontendIpConfigurationName'] + if frontend_ip_configuration_name is None: + raise TypeError("Missing 'frontend_ip_configuration_name' argument") + if frontend_port_name is None and 'frontendPortName' in kwargs: + frontend_port_name = kwargs['frontendPortName'] + if frontend_port_name is None: + raise TypeError("Missing 'frontend_port_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if custom_error_configurations is None and 'customErrorConfigurations' in kwargs: + custom_error_configurations = kwargs['customErrorConfigurations'] + if firewall_policy_id is None and 'firewallPolicyId' in kwargs: + firewall_policy_id = kwargs['firewallPolicyId'] + if frontend_ip_configuration_id is None and 'frontendIpConfigurationId' in kwargs: + frontend_ip_configuration_id = kwargs['frontendIpConfigurationId'] + if frontend_port_id is None and 'frontendPortId' in kwargs: + frontend_port_id = kwargs['frontendPortId'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_names is None and 'hostNames' in kwargs: + host_names = kwargs['hostNames'] + if require_sni is None and 'requireSni' in kwargs: + require_sni = kwargs['requireSni'] + if ssl_certificate_id is None and 'sslCertificateId' in kwargs: + ssl_certificate_id = kwargs['sslCertificateId'] + if ssl_certificate_name is None and 'sslCertificateName' in kwargs: + ssl_certificate_name = kwargs['sslCertificateName'] + if ssl_profile_id is None and 'sslProfileId' in kwargs: + ssl_profile_id = kwargs['sslProfileId'] + if ssl_profile_name is None and 'sslProfileName' in kwargs: + ssl_profile_name = kwargs['sslProfileName'] + + _setter("frontend_ip_configuration_name", frontend_ip_configuration_name) + _setter("frontend_port_name", frontend_port_name) + _setter("name", name) + _setter("protocol", protocol) if custom_error_configurations is not None: - pulumi.set(__self__, "custom_error_configurations", custom_error_configurations) + _setter("custom_error_configurations", custom_error_configurations) if firewall_policy_id is not None: - pulumi.set(__self__, "firewall_policy_id", firewall_policy_id) + _setter("firewall_policy_id", firewall_policy_id) if frontend_ip_configuration_id is not None: - pulumi.set(__self__, "frontend_ip_configuration_id", frontend_ip_configuration_id) + _setter("frontend_ip_configuration_id", frontend_ip_configuration_id) if frontend_port_id is not None: - pulumi.set(__self__, "frontend_port_id", frontend_port_id) + _setter("frontend_port_id", frontend_port_id) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if host_names is not None: - pulumi.set(__self__, "host_names", host_names) + _setter("host_names", host_names) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if require_sni is not None: - pulumi.set(__self__, "require_sni", require_sni) + _setter("require_sni", require_sni) if ssl_certificate_id is not None: - pulumi.set(__self__, "ssl_certificate_id", ssl_certificate_id) + _setter("ssl_certificate_id", ssl_certificate_id) if ssl_certificate_name is not None: - pulumi.set(__self__, "ssl_certificate_name", ssl_certificate_name) + _setter("ssl_certificate_name", ssl_certificate_name) if ssl_profile_id is not None: - pulumi.set(__self__, "ssl_profile_id", ssl_profile_id) + _setter("ssl_profile_id", ssl_profile_id) if ssl_profile_name is not None: - pulumi.set(__self__, "ssl_profile_name", ssl_profile_name) + _setter("ssl_profile_name", ssl_profile_name) @property @pulumi.getter(name="frontendIpConfigurationName") @@ -1259,10 +1617,33 @@ def __init__(__self__, *, :param pulumi.Input[str] status_code: Status code of the application gateway customer error. Possible values are `HttpStatus403` and `HttpStatus502` :param pulumi.Input[str] id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "custom_error_page_url", custom_error_page_url) - pulumi.set(__self__, "status_code", status_code) + ApplicationGatewayHttpListenerCustomErrorConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_error_page_url=custom_error_page_url, + status_code=status_code, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_error_page_url: Optional[pulumi.Input[str]] = None, + status_code: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_error_page_url is None and 'customErrorPageUrl' in kwargs: + custom_error_page_url = kwargs['customErrorPageUrl'] + if custom_error_page_url is None: + raise TypeError("Missing 'custom_error_page_url' argument") + if status_code is None and 'statusCode' in kwargs: + status_code = kwargs['statusCode'] + if status_code is None: + raise TypeError("Missing 'status_code' argument") + + _setter("custom_error_page_url", custom_error_page_url) + _setter("status_code", status_code) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter(name="customErrorPageUrl") @@ -1310,8 +1691,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: Specifies a list of User Assigned Managed Identity IDs to be assigned to this Application Gateway. :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that should be configured on this Application Gateway. Only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + ApplicationGatewayIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -1347,10 +1747,23 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the Rewrite Rule Set :param pulumi.Input[str] name: The name of the Application Gateway. Changing this forces a new resource to be created. """ + ApplicationGatewayPrivateEndpointConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -1394,10 +1807,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the private link configuration. :param pulumi.Input[str] id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) + ApplicationGatewayPrivateLinkConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + name=name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayPrivateLinkConfigurationIpConfigurationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("ip_configurations", ip_configurations) + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter(name="ipConfigurations") @@ -1457,12 +1891,45 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the subnet the private link configuration should connect to. :param pulumi.Input[str] private_ip_address: The Static IP Address which should be used. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "primary", primary) - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) - pulumi.set(__self__, "subnet_id", subnet_id) + ApplicationGatewayPrivateLinkConfigurationIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + primary=primary, + private_ip_address_allocation=private_ip_address_allocation, + subnet_id=subnet_id, + private_ip_address=private_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + primary: Optional[pulumi.Input[bool]] = None, + private_ip_address_allocation: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + if private_ip_address_allocation is None: + raise TypeError("Missing 'private_ip_address_allocation' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + + _setter("name", name) + _setter("primary", primary) + _setter("private_ip_address_allocation", private_ip_address_allocation) + _setter("subnet_id", subnet_id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) @property @pulumi.getter @@ -1554,24 +2021,75 @@ def __init__(__self__, *, :param pulumi.Input[bool] pick_host_name_from_backend_http_settings: Whether the host header should be picked from the backend HTTP settings. Defaults to `false`. :param pulumi.Input[int] port: Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from HTTP settings will be used. This property is valid for Standard_v2 and WAF_v2 only. """ - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "timeout", timeout) - pulumi.set(__self__, "unhealthy_threshold", unhealthy_threshold) + ApplicationGatewayProbeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + interval=interval, + name=name, + path=path, + protocol=protocol, + timeout=timeout, + unhealthy_threshold=unhealthy_threshold, + host=host, + id=id, + match=match, + minimum_servers=minimum_servers, + pick_host_name_from_backend_http_settings=pick_host_name_from_backend_http_settings, + port=port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + interval: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + timeout: Optional[pulumi.Input[int]] = None, + unhealthy_threshold: Optional[pulumi.Input[int]] = None, + host: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + match: Optional[pulumi.Input['ApplicationGatewayProbeMatchArgs']] = None, + minimum_servers: Optional[pulumi.Input[int]] = None, + pick_host_name_from_backend_http_settings: Optional[pulumi.Input[bool]] = None, + port: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if interval is None: + raise TypeError("Missing 'interval' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if timeout is None: + raise TypeError("Missing 'timeout' argument") + if unhealthy_threshold is None and 'unhealthyThreshold' in kwargs: + unhealthy_threshold = kwargs['unhealthyThreshold'] + if unhealthy_threshold is None: + raise TypeError("Missing 'unhealthy_threshold' argument") + if minimum_servers is None and 'minimumServers' in kwargs: + minimum_servers = kwargs['minimumServers'] + if pick_host_name_from_backend_http_settings is None and 'pickHostNameFromBackendHttpSettings' in kwargs: + pick_host_name_from_backend_http_settings = kwargs['pickHostNameFromBackendHttpSettings'] + + _setter("interval", interval) + _setter("name", name) + _setter("path", path) + _setter("protocol", protocol) + _setter("timeout", timeout) + _setter("unhealthy_threshold", unhealthy_threshold) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if match is not None: - pulumi.set(__self__, "match", match) + _setter("match", match) if minimum_servers is not None: - pulumi.set(__self__, "minimum_servers", minimum_servers) + _setter("minimum_servers", minimum_servers) if pick_host_name_from_backend_http_settings is not None: - pulumi.set(__self__, "pick_host_name_from_backend_http_settings", pick_host_name_from_backend_http_settings) + _setter("pick_host_name_from_backend_http_settings", pick_host_name_from_backend_http_settings) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) @property @pulumi.getter @@ -1727,9 +2245,26 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] status_codes: A list of allowed status codes for this Health Probe. :param pulumi.Input[str] body: A snippet from the Response Body which must be present in the Response. """ - pulumi.set(__self__, "status_codes", status_codes) + ApplicationGatewayProbeMatchArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + status_codes=status_codes, + body=body, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + status_codes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + body: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if status_codes is None and 'statusCodes' in kwargs: + status_codes = kwargs['statusCodes'] + if status_codes is None: + raise TypeError("Missing 'status_codes' argument") + + _setter("status_codes", status_codes) if body is not None: - pulumi.set(__self__, "body", body) + _setter("body", body) @property @pulumi.getter(name="statusCodes") @@ -1776,20 +2311,61 @@ def __init__(__self__, *, :param pulumi.Input[str] target_listener_name: The name of the listener to redirect to. Cannot be set if `target_url` is set. :param pulumi.Input[str] target_url: The URL to redirect the request to. Cannot be set if `target_listener_name` is set. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "redirect_type", redirect_type) + ApplicationGatewayRedirectConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + redirect_type=redirect_type, + id=id, + include_path=include_path, + include_query_string=include_query_string, + target_listener_id=target_listener_id, + target_listener_name=target_listener_name, + target_url=target_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + redirect_type: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + include_path: Optional[pulumi.Input[bool]] = None, + include_query_string: Optional[pulumi.Input[bool]] = None, + target_listener_id: Optional[pulumi.Input[str]] = None, + target_listener_name: Optional[pulumi.Input[str]] = None, + target_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if redirect_type is None and 'redirectType' in kwargs: + redirect_type = kwargs['redirectType'] + if redirect_type is None: + raise TypeError("Missing 'redirect_type' argument") + if include_path is None and 'includePath' in kwargs: + include_path = kwargs['includePath'] + if include_query_string is None and 'includeQueryString' in kwargs: + include_query_string = kwargs['includeQueryString'] + if target_listener_id is None and 'targetListenerId' in kwargs: + target_listener_id = kwargs['targetListenerId'] + if target_listener_name is None and 'targetListenerName' in kwargs: + target_listener_name = kwargs['targetListenerName'] + if target_url is None and 'targetUrl' in kwargs: + target_url = kwargs['targetUrl'] + + _setter("name", name) + _setter("redirect_type", redirect_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if include_path is not None: - pulumi.set(__self__, "include_path", include_path) + _setter("include_path", include_path) if include_query_string is not None: - pulumi.set(__self__, "include_query_string", include_query_string) + _setter("include_query_string", include_query_string) if target_listener_id is not None: - pulumi.set(__self__, "target_listener_id", target_listener_id) + _setter("target_listener_id", target_listener_id) if target_listener_name is not None: - pulumi.set(__self__, "target_listener_name", target_listener_name) + _setter("target_listener_name", target_listener_name) if target_url is not None: - pulumi.set(__self__, "target_url", target_url) + _setter("target_url", target_url) @property @pulumi.getter @@ -1926,35 +2502,108 @@ def __init__(__self__, *, :param pulumi.Input[str] url_path_map_id: The ID of the associated URL Path Map. :param pulumi.Input[str] url_path_map_name: The Name of the URL Path Map which should be associated with this Routing Rule. """ - pulumi.set(__self__, "http_listener_name", http_listener_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "rule_type", rule_type) + ApplicationGatewayRequestRoutingRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + http_listener_name=http_listener_name, + name=name, + rule_type=rule_type, + backend_address_pool_id=backend_address_pool_id, + backend_address_pool_name=backend_address_pool_name, + backend_http_settings_id=backend_http_settings_id, + backend_http_settings_name=backend_http_settings_name, + http_listener_id=http_listener_id, + id=id, + priority=priority, + redirect_configuration_id=redirect_configuration_id, + redirect_configuration_name=redirect_configuration_name, + rewrite_rule_set_id=rewrite_rule_set_id, + rewrite_rule_set_name=rewrite_rule_set_name, + url_path_map_id=url_path_map_id, + url_path_map_name=url_path_map_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + http_listener_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rule_type: Optional[pulumi.Input[str]] = None, + backend_address_pool_id: Optional[pulumi.Input[str]] = None, + backend_address_pool_name: Optional[pulumi.Input[str]] = None, + backend_http_settings_id: Optional[pulumi.Input[str]] = None, + backend_http_settings_name: Optional[pulumi.Input[str]] = None, + http_listener_id: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + redirect_configuration_id: Optional[pulumi.Input[str]] = None, + redirect_configuration_name: Optional[pulumi.Input[str]] = None, + rewrite_rule_set_id: Optional[pulumi.Input[str]] = None, + rewrite_rule_set_name: Optional[pulumi.Input[str]] = None, + url_path_map_id: Optional[pulumi.Input[str]] = None, + url_path_map_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if http_listener_name is None and 'httpListenerName' in kwargs: + http_listener_name = kwargs['httpListenerName'] + if http_listener_name is None: + raise TypeError("Missing 'http_listener_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if rule_type is None and 'ruleType' in kwargs: + rule_type = kwargs['ruleType'] + if rule_type is None: + raise TypeError("Missing 'rule_type' argument") + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if backend_address_pool_name is None and 'backendAddressPoolName' in kwargs: + backend_address_pool_name = kwargs['backendAddressPoolName'] + if backend_http_settings_id is None and 'backendHttpSettingsId' in kwargs: + backend_http_settings_id = kwargs['backendHttpSettingsId'] + if backend_http_settings_name is None and 'backendHttpSettingsName' in kwargs: + backend_http_settings_name = kwargs['backendHttpSettingsName'] + if http_listener_id is None and 'httpListenerId' in kwargs: + http_listener_id = kwargs['httpListenerId'] + if redirect_configuration_id is None and 'redirectConfigurationId' in kwargs: + redirect_configuration_id = kwargs['redirectConfigurationId'] + if redirect_configuration_name is None and 'redirectConfigurationName' in kwargs: + redirect_configuration_name = kwargs['redirectConfigurationName'] + if rewrite_rule_set_id is None and 'rewriteRuleSetId' in kwargs: + rewrite_rule_set_id = kwargs['rewriteRuleSetId'] + if rewrite_rule_set_name is None and 'rewriteRuleSetName' in kwargs: + rewrite_rule_set_name = kwargs['rewriteRuleSetName'] + if url_path_map_id is None and 'urlPathMapId' in kwargs: + url_path_map_id = kwargs['urlPathMapId'] + if url_path_map_name is None and 'urlPathMapName' in kwargs: + url_path_map_name = kwargs['urlPathMapName'] + + _setter("http_listener_name", http_listener_name) + _setter("name", name) + _setter("rule_type", rule_type) if backend_address_pool_id is not None: - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) + _setter("backend_address_pool_id", backend_address_pool_id) if backend_address_pool_name is not None: - pulumi.set(__self__, "backend_address_pool_name", backend_address_pool_name) + _setter("backend_address_pool_name", backend_address_pool_name) if backend_http_settings_id is not None: - pulumi.set(__self__, "backend_http_settings_id", backend_http_settings_id) + _setter("backend_http_settings_id", backend_http_settings_id) if backend_http_settings_name is not None: - pulumi.set(__self__, "backend_http_settings_name", backend_http_settings_name) + _setter("backend_http_settings_name", backend_http_settings_name) if http_listener_id is not None: - pulumi.set(__self__, "http_listener_id", http_listener_id) + _setter("http_listener_id", http_listener_id) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if redirect_configuration_id is not None: - pulumi.set(__self__, "redirect_configuration_id", redirect_configuration_id) + _setter("redirect_configuration_id", redirect_configuration_id) if redirect_configuration_name is not None: - pulumi.set(__self__, "redirect_configuration_name", redirect_configuration_name) + _setter("redirect_configuration_name", redirect_configuration_name) if rewrite_rule_set_id is not None: - pulumi.set(__self__, "rewrite_rule_set_id", rewrite_rule_set_id) + _setter("rewrite_rule_set_id", rewrite_rule_set_id) if rewrite_rule_set_name is not None: - pulumi.set(__self__, "rewrite_rule_set_name", rewrite_rule_set_name) + _setter("rewrite_rule_set_name", rewrite_rule_set_name) if url_path_map_id is not None: - pulumi.set(__self__, "url_path_map_id", url_path_map_id) + _setter("url_path_map_id", url_path_map_id) if url_path_map_name is not None: - pulumi.set(__self__, "url_path_map_name", url_path_map_name) + _setter("url_path_map_name", url_path_map_name) @property @pulumi.getter(name="httpListenerName") @@ -2164,11 +2813,30 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the Rewrite Rule Set :param pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayRewriteRuleSetRewriteRuleArgs']]] rewrite_rules: One or more `rewrite_rule` blocks as defined below. """ - pulumi.set(__self__, "name", name) + ApplicationGatewayRewriteRuleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + id=id, + rewrite_rules=rewrite_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + rewrite_rules: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayRewriteRuleSetRewriteRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if rewrite_rules is None and 'rewriteRules' in kwargs: + rewrite_rules = kwargs['rewriteRules'] + + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if rewrite_rules is not None: - pulumi.set(__self__, "rewrite_rules", rewrite_rules) + _setter("rewrite_rules", rewrite_rules) @property @pulumi.getter @@ -2224,16 +2892,47 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayRewriteRuleSetRewriteRuleResponseHeaderConfigurationArgs']]] response_header_configurations: One or more `response_header_configuration` blocks as defined above. :param pulumi.Input['ApplicationGatewayRewriteRuleSetRewriteRuleUrlArgs'] url: One `url` block as defined below """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "rule_sequence", rule_sequence) + ApplicationGatewayRewriteRuleSetRewriteRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + rule_sequence=rule_sequence, + conditions=conditions, + request_header_configurations=request_header_configurations, + response_header_configurations=response_header_configurations, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + rule_sequence: Optional[pulumi.Input[int]] = None, + conditions: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayRewriteRuleSetRewriteRuleConditionArgs']]]] = None, + request_header_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayRewriteRuleSetRewriteRuleRequestHeaderConfigurationArgs']]]] = None, + response_header_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayRewriteRuleSetRewriteRuleResponseHeaderConfigurationArgs']]]] = None, + url: Optional[pulumi.Input['ApplicationGatewayRewriteRuleSetRewriteRuleUrlArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if rule_sequence is None and 'ruleSequence' in kwargs: + rule_sequence = kwargs['ruleSequence'] + if rule_sequence is None: + raise TypeError("Missing 'rule_sequence' argument") + if request_header_configurations is None and 'requestHeaderConfigurations' in kwargs: + request_header_configurations = kwargs['requestHeaderConfigurations'] + if response_header_configurations is None and 'responseHeaderConfigurations' in kwargs: + response_header_configurations = kwargs['responseHeaderConfigurations'] + + _setter("name", name) + _setter("rule_sequence", rule_sequence) if conditions is not None: - pulumi.set(__self__, "conditions", conditions) + _setter("conditions", conditions) if request_header_configurations is not None: - pulumi.set(__self__, "request_header_configurations", request_header_configurations) + _setter("request_header_configurations", request_header_configurations) if response_header_configurations is not None: - pulumi.set(__self__, "response_header_configurations", response_header_configurations) + _setter("response_header_configurations", response_header_configurations) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter @@ -2321,12 +3020,35 @@ def __init__(__self__, *, :param pulumi.Input[bool] ignore_case: Perform a case in-sensitive comparison. Defaults to `false` :param pulumi.Input[bool] negate: Negate the result of the condition evaluation. Defaults to `false` """ - pulumi.set(__self__, "pattern", pattern) - pulumi.set(__self__, "variable", variable) + ApplicationGatewayRewriteRuleSetRewriteRuleConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + pattern=pattern, + variable=variable, + ignore_case=ignore_case, + negate=negate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + pattern: Optional[pulumi.Input[str]] = None, + variable: Optional[pulumi.Input[str]] = None, + ignore_case: Optional[pulumi.Input[bool]] = None, + negate: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if pattern is None: + raise TypeError("Missing 'pattern' argument") + if variable is None: + raise TypeError("Missing 'variable' argument") + if ignore_case is None and 'ignoreCase' in kwargs: + ignore_case = kwargs['ignoreCase'] + + _setter("pattern", pattern) + _setter("variable", variable) if ignore_case is not None: - pulumi.set(__self__, "ignore_case", ignore_case) + _setter("ignore_case", ignore_case) if negate is not None: - pulumi.set(__self__, "negate", negate) + _setter("negate", negate) @property @pulumi.getter @@ -2386,8 +3108,29 @@ def __init__(__self__, *, :param pulumi.Input[str] header_name: Header name of the header configuration. :param pulumi.Input[str] header_value: Header value of the header configuration. To delete a request header set this property to an empty string. """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "header_value", header_value) + ApplicationGatewayRewriteRuleSetRewriteRuleRequestHeaderConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + header_value=header_value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[pulumi.Input[str]] = None, + header_value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if header_value is None and 'headerValue' in kwargs: + header_value = kwargs['headerValue'] + if header_value is None: + raise TypeError("Missing 'header_value' argument") + + _setter("header_name", header_name) + _setter("header_value", header_value) @property @pulumi.getter(name="headerName") @@ -2423,8 +3166,29 @@ def __init__(__self__, *, :param pulumi.Input[str] header_name: Header name of the header configuration. :param pulumi.Input[str] header_value: Header value of the header configuration. To delete a response header set this property to an empty string. """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "header_value", header_value) + ApplicationGatewayRewriteRuleSetRewriteRuleResponseHeaderConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + header_value=header_value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[pulumi.Input[str]] = None, + header_value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if header_value is None and 'headerValue' in kwargs: + header_value = kwargs['headerValue'] + if header_value is None: + raise TypeError("Missing 'header_value' argument") + + _setter("header_name", header_name) + _setter("header_value", header_value) @property @pulumi.getter(name="headerName") @@ -2466,14 +3230,33 @@ def __init__(__self__, *, :param pulumi.Input[str] query_string: The query string to rewrite. :param pulumi.Input[bool] reroute: Whether the URL path map should be reevaluated after this rewrite has been applied. [More info on rewrite configuration](https://docs.microsoft.com/azure/application-gateway/rewrite-http-headers-url#rewrite-configuration) """ + ApplicationGatewayRewriteRuleSetRewriteRuleUrlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + components=components, + path=path, + query_string=query_string, + reroute=reroute, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + components: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + query_string: Optional[pulumi.Input[str]] = None, + reroute: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_string is None and 'queryString' in kwargs: + query_string = kwargs['queryString'] + if components is not None: - pulumi.set(__self__, "components", components) + _setter("components", components) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if query_string is not None: - pulumi.set(__self__, "query_string", query_string) + _setter("query_string", query_string) if reroute is not None: - pulumi.set(__self__, "reroute", reroute) + _setter("reroute", reroute) @property @pulumi.getter @@ -2539,10 +3322,29 @@ def __init__(__self__, *, !> **NOTE:** The `Standard` and `WAF` SKU have been deprecated in favour of the `Standard_v2` and `WAF_v2` SKU. Please see the [Azure documentation](https://aka.ms/V1retirement) for more details. :param pulumi.Input[int] capacity: The Capacity of the SKU to use for this Application Gateway. When using a V1 SKU this value must be between `1` and `32`, and `1` to `125` for a V2 SKU. This property is optional if `autoscale_configuration` is set. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "tier", tier) + ApplicationGatewaySkuArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + tier=tier, + capacity=capacity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + tier: Optional[pulumi.Input[str]] = None, + capacity: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("name", name) + _setter("tier", tier) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) @property @pulumi.getter @@ -2606,17 +3408,44 @@ def __init__(__self__, *, :param pulumi.Input[str] password: Password for the pfx file specified in data. Required if `data` is set. :param pulumi.Input[str] public_cert_data: The Public Certificate Data associated with the SSL Certificate. """ - pulumi.set(__self__, "name", name) + ApplicationGatewaySslCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + data=data, + id=id, + key_vault_secret_id=key_vault_secret_id, + password=password, + public_cert_data=public_cert_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + data: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + key_vault_secret_id: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + public_cert_data: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + if public_cert_data is None and 'publicCertData' in kwargs: + public_cert_data = kwargs['publicCertData'] + + _setter("name", name) if data is not None: - pulumi.set(__self__, "data", data) + _setter("data", data) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if key_vault_secret_id is not None: - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) + _setter("key_vault_secret_id", key_vault_secret_id) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if public_cert_data is not None: - pulumi.set(__self__, "public_cert_data", public_cert_data) + _setter("public_cert_data", public_cert_data) @property @pulumi.getter @@ -2716,16 +3545,45 @@ def __init__(__self__, *, > **NOTE:** `policy_type` is Required when `policy_name` is set - cannot be set if `disabled_protocols` is set. """ + ApplicationGatewaySslPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cipher_suites=cipher_suites, + disabled_protocols=disabled_protocols, + min_protocol_version=min_protocol_version, + policy_name=policy_name, + policy_type=policy_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cipher_suites: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + disabled_protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + min_protocol_version: Optional[pulumi.Input[str]] = None, + policy_name: Optional[pulumi.Input[str]] = None, + policy_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cipher_suites is None and 'cipherSuites' in kwargs: + cipher_suites = kwargs['cipherSuites'] + if disabled_protocols is None and 'disabledProtocols' in kwargs: + disabled_protocols = kwargs['disabledProtocols'] + if min_protocol_version is None and 'minProtocolVersion' in kwargs: + min_protocol_version = kwargs['minProtocolVersion'] + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if cipher_suites is not None: - pulumi.set(__self__, "cipher_suites", cipher_suites) + _setter("cipher_suites", cipher_suites) if disabled_protocols is not None: - pulumi.set(__self__, "disabled_protocols", disabled_protocols) + _setter("disabled_protocols", disabled_protocols) if min_protocol_version is not None: - pulumi.set(__self__, "min_protocol_version", min_protocol_version) + _setter("min_protocol_version", min_protocol_version) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) if policy_type is not None: - pulumi.set(__self__, "policy_type", policy_type) + _setter("policy_type", policy_type) @property @pulumi.getter(name="cipherSuites") @@ -2809,17 +3667,48 @@ def __init__(__self__, *, :param pulumi.Input[bool] verify_client_cert_issuer_dn: Should client certificate issuer DN be verified? Defaults to `false`. :param pulumi.Input[str] verify_client_certificate_revocation: Specify the method to check client certificate revocation status. Possible value is `OCSP`. """ - pulumi.set(__self__, "name", name) + ApplicationGatewaySslProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + id=id, + ssl_policy=ssl_policy, + trusted_client_certificate_names=trusted_client_certificate_names, + verify_client_cert_issuer_dn=verify_client_cert_issuer_dn, + verify_client_certificate_revocation=verify_client_certificate_revocation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + ssl_policy: Optional[pulumi.Input['ApplicationGatewaySslProfileSslPolicyArgs']] = None, + trusted_client_certificate_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + verify_client_cert_issuer_dn: Optional[pulumi.Input[bool]] = None, + verify_client_certificate_revocation: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if ssl_policy is None and 'sslPolicy' in kwargs: + ssl_policy = kwargs['sslPolicy'] + if trusted_client_certificate_names is None and 'trustedClientCertificateNames' in kwargs: + trusted_client_certificate_names = kwargs['trustedClientCertificateNames'] + if verify_client_cert_issuer_dn is None and 'verifyClientCertIssuerDn' in kwargs: + verify_client_cert_issuer_dn = kwargs['verifyClientCertIssuerDn'] + if verify_client_certificate_revocation is None and 'verifyClientCertificateRevocation' in kwargs: + verify_client_certificate_revocation = kwargs['verifyClientCertificateRevocation'] + + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if ssl_policy is not None: - pulumi.set(__self__, "ssl_policy", ssl_policy) + _setter("ssl_policy", ssl_policy) if trusted_client_certificate_names is not None: - pulumi.set(__self__, "trusted_client_certificate_names", trusted_client_certificate_names) + _setter("trusted_client_certificate_names", trusted_client_certificate_names) if verify_client_cert_issuer_dn is not None: - pulumi.set(__self__, "verify_client_cert_issuer_dn", verify_client_cert_issuer_dn) + _setter("verify_client_cert_issuer_dn", verify_client_cert_issuer_dn) if verify_client_certificate_revocation is not None: - pulumi.set(__self__, "verify_client_certificate_revocation", verify_client_certificate_revocation) + _setter("verify_client_certificate_revocation", verify_client_certificate_revocation) @property @pulumi.getter @@ -2913,16 +3802,45 @@ def __init__(__self__, *, > **NOTE:** `policy_type` is Required when `policy_name` is set - cannot be set if `disabled_protocols` is set. """ + ApplicationGatewaySslProfileSslPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cipher_suites=cipher_suites, + disabled_protocols=disabled_protocols, + min_protocol_version=min_protocol_version, + policy_name=policy_name, + policy_type=policy_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cipher_suites: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + disabled_protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + min_protocol_version: Optional[pulumi.Input[str]] = None, + policy_name: Optional[pulumi.Input[str]] = None, + policy_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cipher_suites is None and 'cipherSuites' in kwargs: + cipher_suites = kwargs['cipherSuites'] + if disabled_protocols is None and 'disabledProtocols' in kwargs: + disabled_protocols = kwargs['disabledProtocols'] + if min_protocol_version is None and 'minProtocolVersion' in kwargs: + min_protocol_version = kwargs['minProtocolVersion'] + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if cipher_suites is not None: - pulumi.set(__self__, "cipher_suites", cipher_suites) + _setter("cipher_suites", cipher_suites) if disabled_protocols is not None: - pulumi.set(__self__, "disabled_protocols", disabled_protocols) + _setter("disabled_protocols", disabled_protocols) if min_protocol_version is not None: - pulumi.set(__self__, "min_protocol_version", min_protocol_version) + _setter("min_protocol_version", min_protocol_version) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) if policy_type is not None: - pulumi.set(__self__, "policy_type", policy_type) + _setter("policy_type", policy_type) @property @pulumi.getter(name="cipherSuites") @@ -3000,10 +3918,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Trusted Client Certificate that is unique within this Application Gateway. :param pulumi.Input[str] id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "data", data) - pulumi.set(__self__, "name", name) + ApplicationGatewayTrustedClientCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + data=data, + name=name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data is None: + raise TypeError("Missing 'data' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("data", data) + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -3059,13 +3996,34 @@ def __init__(__self__, *, > **NOTE:** For TLS termination with Key Vault certificates to work properly existing user-assigned managed identity, which Application Gateway uses to retrieve certificates from Key Vault, should be defined via `identity` block. Additionally, access policies in the Key Vault to allow the identity to be granted *get* access to the secret should be defined. """ - pulumi.set(__self__, "name", name) + ApplicationGatewayTrustedRootCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + data=data, + id=id, + key_vault_secret_id=key_vault_secret_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + data: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + key_vault_secret_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + + _setter("name", name) if data is not None: - pulumi.set(__self__, "data", data) + _setter("data", data) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if key_vault_secret_id is not None: - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) + _setter("key_vault_secret_id", key_vault_secret_id) @property @pulumi.getter @@ -3148,26 +4106,79 @@ def __init__(__self__, *, :param pulumi.Input[str] default_rewrite_rule_set_name: The Name of the Default Rewrite Rule Set which should be used for this URL Path Map. Only valid for v2 SKUs. :param pulumi.Input[str] id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "path_rules", path_rules) + ApplicationGatewayUrlPathMapArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + path_rules=path_rules, + default_backend_address_pool_id=default_backend_address_pool_id, + default_backend_address_pool_name=default_backend_address_pool_name, + default_backend_http_settings_id=default_backend_http_settings_id, + default_backend_http_settings_name=default_backend_http_settings_name, + default_redirect_configuration_id=default_redirect_configuration_id, + default_redirect_configuration_name=default_redirect_configuration_name, + default_rewrite_rule_set_id=default_rewrite_rule_set_id, + default_rewrite_rule_set_name=default_rewrite_rule_set_name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + path_rules: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayUrlPathMapPathRuleArgs']]]] = None, + default_backend_address_pool_id: Optional[pulumi.Input[str]] = None, + default_backend_address_pool_name: Optional[pulumi.Input[str]] = None, + default_backend_http_settings_id: Optional[pulumi.Input[str]] = None, + default_backend_http_settings_name: Optional[pulumi.Input[str]] = None, + default_redirect_configuration_id: Optional[pulumi.Input[str]] = None, + default_redirect_configuration_name: Optional[pulumi.Input[str]] = None, + default_rewrite_rule_set_id: Optional[pulumi.Input[str]] = None, + default_rewrite_rule_set_name: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if path_rules is None and 'pathRules' in kwargs: + path_rules = kwargs['pathRules'] + if path_rules is None: + raise TypeError("Missing 'path_rules' argument") + if default_backend_address_pool_id is None and 'defaultBackendAddressPoolId' in kwargs: + default_backend_address_pool_id = kwargs['defaultBackendAddressPoolId'] + if default_backend_address_pool_name is None and 'defaultBackendAddressPoolName' in kwargs: + default_backend_address_pool_name = kwargs['defaultBackendAddressPoolName'] + if default_backend_http_settings_id is None and 'defaultBackendHttpSettingsId' in kwargs: + default_backend_http_settings_id = kwargs['defaultBackendHttpSettingsId'] + if default_backend_http_settings_name is None and 'defaultBackendHttpSettingsName' in kwargs: + default_backend_http_settings_name = kwargs['defaultBackendHttpSettingsName'] + if default_redirect_configuration_id is None and 'defaultRedirectConfigurationId' in kwargs: + default_redirect_configuration_id = kwargs['defaultRedirectConfigurationId'] + if default_redirect_configuration_name is None and 'defaultRedirectConfigurationName' in kwargs: + default_redirect_configuration_name = kwargs['defaultRedirectConfigurationName'] + if default_rewrite_rule_set_id is None and 'defaultRewriteRuleSetId' in kwargs: + default_rewrite_rule_set_id = kwargs['defaultRewriteRuleSetId'] + if default_rewrite_rule_set_name is None and 'defaultRewriteRuleSetName' in kwargs: + default_rewrite_rule_set_name = kwargs['defaultRewriteRuleSetName'] + + _setter("name", name) + _setter("path_rules", path_rules) if default_backend_address_pool_id is not None: - pulumi.set(__self__, "default_backend_address_pool_id", default_backend_address_pool_id) + _setter("default_backend_address_pool_id", default_backend_address_pool_id) if default_backend_address_pool_name is not None: - pulumi.set(__self__, "default_backend_address_pool_name", default_backend_address_pool_name) + _setter("default_backend_address_pool_name", default_backend_address_pool_name) if default_backend_http_settings_id is not None: - pulumi.set(__self__, "default_backend_http_settings_id", default_backend_http_settings_id) + _setter("default_backend_http_settings_id", default_backend_http_settings_id) if default_backend_http_settings_name is not None: - pulumi.set(__self__, "default_backend_http_settings_name", default_backend_http_settings_name) + _setter("default_backend_http_settings_name", default_backend_http_settings_name) if default_redirect_configuration_id is not None: - pulumi.set(__self__, "default_redirect_configuration_id", default_redirect_configuration_id) + _setter("default_redirect_configuration_id", default_redirect_configuration_id) if default_redirect_configuration_name is not None: - pulumi.set(__self__, "default_redirect_configuration_name", default_redirect_configuration_name) + _setter("default_redirect_configuration_name", default_redirect_configuration_name) if default_rewrite_rule_set_id is not None: - pulumi.set(__self__, "default_rewrite_rule_set_id", default_rewrite_rule_set_id) + _setter("default_rewrite_rule_set_id", default_rewrite_rule_set_id) if default_rewrite_rule_set_name is not None: - pulumi.set(__self__, "default_rewrite_rule_set_name", default_rewrite_rule_set_name) + _setter("default_rewrite_rule_set_name", default_rewrite_rule_set_name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -3330,28 +4341,83 @@ def __init__(__self__, *, :param pulumi.Input[str] rewrite_rule_set_id: The ID of the associated Rewrite Rule Set. :param pulumi.Input[str] rewrite_rule_set_name: The Name of the Rewrite Rule Set which should be used for this URL Path Map. Only valid for v2 SKUs. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "paths", paths) + ApplicationGatewayUrlPathMapPathRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + paths=paths, + backend_address_pool_id=backend_address_pool_id, + backend_address_pool_name=backend_address_pool_name, + backend_http_settings_id=backend_http_settings_id, + backend_http_settings_name=backend_http_settings_name, + firewall_policy_id=firewall_policy_id, + id=id, + redirect_configuration_id=redirect_configuration_id, + redirect_configuration_name=redirect_configuration_name, + rewrite_rule_set_id=rewrite_rule_set_id, + rewrite_rule_set_name=rewrite_rule_set_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + backend_address_pool_id: Optional[pulumi.Input[str]] = None, + backend_address_pool_name: Optional[pulumi.Input[str]] = None, + backend_http_settings_id: Optional[pulumi.Input[str]] = None, + backend_http_settings_name: Optional[pulumi.Input[str]] = None, + firewall_policy_id: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + redirect_configuration_id: Optional[pulumi.Input[str]] = None, + redirect_configuration_name: Optional[pulumi.Input[str]] = None, + rewrite_rule_set_id: Optional[pulumi.Input[str]] = None, + rewrite_rule_set_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if paths is None: + raise TypeError("Missing 'paths' argument") + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if backend_address_pool_name is None and 'backendAddressPoolName' in kwargs: + backend_address_pool_name = kwargs['backendAddressPoolName'] + if backend_http_settings_id is None and 'backendHttpSettingsId' in kwargs: + backend_http_settings_id = kwargs['backendHttpSettingsId'] + if backend_http_settings_name is None and 'backendHttpSettingsName' in kwargs: + backend_http_settings_name = kwargs['backendHttpSettingsName'] + if firewall_policy_id is None and 'firewallPolicyId' in kwargs: + firewall_policy_id = kwargs['firewallPolicyId'] + if redirect_configuration_id is None and 'redirectConfigurationId' in kwargs: + redirect_configuration_id = kwargs['redirectConfigurationId'] + if redirect_configuration_name is None and 'redirectConfigurationName' in kwargs: + redirect_configuration_name = kwargs['redirectConfigurationName'] + if rewrite_rule_set_id is None and 'rewriteRuleSetId' in kwargs: + rewrite_rule_set_id = kwargs['rewriteRuleSetId'] + if rewrite_rule_set_name is None and 'rewriteRuleSetName' in kwargs: + rewrite_rule_set_name = kwargs['rewriteRuleSetName'] + + _setter("name", name) + _setter("paths", paths) if backend_address_pool_id is not None: - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) + _setter("backend_address_pool_id", backend_address_pool_id) if backend_address_pool_name is not None: - pulumi.set(__self__, "backend_address_pool_name", backend_address_pool_name) + _setter("backend_address_pool_name", backend_address_pool_name) if backend_http_settings_id is not None: - pulumi.set(__self__, "backend_http_settings_id", backend_http_settings_id) + _setter("backend_http_settings_id", backend_http_settings_id) if backend_http_settings_name is not None: - pulumi.set(__self__, "backend_http_settings_name", backend_http_settings_name) + _setter("backend_http_settings_name", backend_http_settings_name) if firewall_policy_id is not None: - pulumi.set(__self__, "firewall_policy_id", firewall_policy_id) + _setter("firewall_policy_id", firewall_policy_id) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if redirect_configuration_id is not None: - pulumi.set(__self__, "redirect_configuration_id", redirect_configuration_id) + _setter("redirect_configuration_id", redirect_configuration_id) if redirect_configuration_name is not None: - pulumi.set(__self__, "redirect_configuration_name", redirect_configuration_name) + _setter("redirect_configuration_name", redirect_configuration_name) if rewrite_rule_set_id is not None: - pulumi.set(__self__, "rewrite_rule_set_id", rewrite_rule_set_id) + _setter("rewrite_rule_set_id", rewrite_rule_set_id) if rewrite_rule_set_name is not None: - pulumi.set(__self__, "rewrite_rule_set_name", rewrite_rule_set_name) + _setter("rewrite_rule_set_name", rewrite_rule_set_name) @property @pulumi.getter @@ -3521,21 +4587,68 @@ def __init__(__self__, *, :param pulumi.Input[bool] request_body_check: Is Request Body Inspection enabled? Defaults to `true`. :param pulumi.Input[str] rule_set_type: The Type of the Rule Set used for this Web Application Firewall. Possible values are `OWASP` and `Microsoft_BotManagerRuleSet`. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "firewall_mode", firewall_mode) - pulumi.set(__self__, "rule_set_version", rule_set_version) + ApplicationGatewayWafConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + firewall_mode=firewall_mode, + rule_set_version=rule_set_version, + disabled_rule_groups=disabled_rule_groups, + exclusions=exclusions, + file_upload_limit_mb=file_upload_limit_mb, + max_request_body_size_kb=max_request_body_size_kb, + request_body_check=request_body_check, + rule_set_type=rule_set_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + firewall_mode: Optional[pulumi.Input[str]] = None, + rule_set_version: Optional[pulumi.Input[str]] = None, + disabled_rule_groups: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayWafConfigurationDisabledRuleGroupArgs']]]] = None, + exclusions: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayWafConfigurationExclusionArgs']]]] = None, + file_upload_limit_mb: Optional[pulumi.Input[int]] = None, + max_request_body_size_kb: Optional[pulumi.Input[int]] = None, + request_body_check: Optional[pulumi.Input[bool]] = None, + rule_set_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if firewall_mode is None and 'firewallMode' in kwargs: + firewall_mode = kwargs['firewallMode'] + if firewall_mode is None: + raise TypeError("Missing 'firewall_mode' argument") + if rule_set_version is None and 'ruleSetVersion' in kwargs: + rule_set_version = kwargs['ruleSetVersion'] + if rule_set_version is None: + raise TypeError("Missing 'rule_set_version' argument") + if disabled_rule_groups is None and 'disabledRuleGroups' in kwargs: + disabled_rule_groups = kwargs['disabledRuleGroups'] + if file_upload_limit_mb is None and 'fileUploadLimitMb' in kwargs: + file_upload_limit_mb = kwargs['fileUploadLimitMb'] + if max_request_body_size_kb is None and 'maxRequestBodySizeKb' in kwargs: + max_request_body_size_kb = kwargs['maxRequestBodySizeKb'] + if request_body_check is None and 'requestBodyCheck' in kwargs: + request_body_check = kwargs['requestBodyCheck'] + if rule_set_type is None and 'ruleSetType' in kwargs: + rule_set_type = kwargs['ruleSetType'] + + _setter("enabled", enabled) + _setter("firewall_mode", firewall_mode) + _setter("rule_set_version", rule_set_version) if disabled_rule_groups is not None: - pulumi.set(__self__, "disabled_rule_groups", disabled_rule_groups) + _setter("disabled_rule_groups", disabled_rule_groups) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) if file_upload_limit_mb is not None: - pulumi.set(__self__, "file_upload_limit_mb", file_upload_limit_mb) + _setter("file_upload_limit_mb", file_upload_limit_mb) if max_request_body_size_kb is not None: - pulumi.set(__self__, "max_request_body_size_kb", max_request_body_size_kb) + _setter("max_request_body_size_kb", max_request_body_size_kb) if request_body_check is not None: - pulumi.set(__self__, "request_body_check", request_body_check) + _setter("request_body_check", request_body_check) if rule_set_type is not None: - pulumi.set(__self__, "rule_set_type", rule_set_type) + _setter("rule_set_type", rule_set_type) @property @pulumi.getter @@ -3655,9 +4768,26 @@ def __init__(__self__, *, :param pulumi.Input[str] rule_group_name: The rule group where specific rules should be disabled. Possible values are `BadBots`, `crs_20_protocol_violations`, `crs_21_protocol_anomalies`, `crs_23_request_limits`, `crs_30_http_policy`, `crs_35_bad_robots`, `crs_40_generic_attacks`, `crs_41_sql_injection_attacks`, `crs_41_xss_attacks`, `crs_42_tight_security`, `crs_45_trojans`, `General`, `GoodBots`, `Known-CVEs`, `REQUEST-911-METHOD-ENFORCEMENT`, `REQUEST-913-SCANNER-DETECTION`, `REQUEST-920-PROTOCOL-ENFORCEMENT`, `REQUEST-921-PROTOCOL-ATTACK`, `REQUEST-930-APPLICATION-ATTACK-LFI`, `REQUEST-931-APPLICATION-ATTACK-RFI`, `REQUEST-932-APPLICATION-ATTACK-RCE`, `REQUEST-933-APPLICATION-ATTACK-PHP`, `REQUEST-941-APPLICATION-ATTACK-XSS`, `REQUEST-942-APPLICATION-ATTACK-SQLI`, `REQUEST-943-APPLICATION-ATTACK-SESSION-FIXATION`, `REQUEST-944-APPLICATION-ATTACK-JAVA` and `UnknownBots`. :param pulumi.Input[Sequence[pulumi.Input[int]]] rules: A list of rules which should be disabled in that group. Disables all rules in the specified group if `rules` is not specified. """ - pulumi.set(__self__, "rule_group_name", rule_group_name) + ApplicationGatewayWafConfigurationDisabledRuleGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_group_name=rule_group_name, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_group_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_group_name is None and 'ruleGroupName' in kwargs: + rule_group_name = kwargs['ruleGroupName'] + if rule_group_name is None: + raise TypeError("Missing 'rule_group_name' argument") + + _setter("rule_group_name", rule_group_name) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter(name="ruleGroupName") @@ -3695,11 +4825,32 @@ def __init__(__self__, *, :param pulumi.Input[str] selector: String value which will be used for the filter operation. If empty will exclude all traffic on this `match_variable` :param pulumi.Input[str] selector_match_operator: Operator which will be used to search in the variable content. Possible values are `Contains`, `EndsWith`, `Equals`, `EqualsAny` and `StartsWith`. If empty will exclude all traffic on this `match_variable` """ - pulumi.set(__self__, "match_variable", match_variable) + ApplicationGatewayWafConfigurationExclusionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + selector=selector, + selector_match_operator=selector_match_operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[pulumi.Input[str]] = None, + selector: Optional[pulumi.Input[str]] = None, + selector_match_operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if selector_match_operator is None and 'selectorMatchOperator' in kwargs: + selector_match_operator = kwargs['selectorMatchOperator'] + + _setter("match_variable", match_variable) if selector is not None: - pulumi.set(__self__, "selector", selector) + _setter("selector", selector) if selector_match_operator is not None: - pulumi.set(__self__, "selector_match_operator", selector_match_operator) + _setter("selector_match_operator", selector_match_operator) @property @pulumi.getter(name="matchVariable") @@ -3755,14 +4906,45 @@ def __init__(__self__, *, > **NOTE:** `ipv6` can be specified when `peering_type` is `MicrosoftPeering` or `AzurePrivatePeering` """ - pulumi.set(__self__, "primary_peer_address_prefix", primary_peer_address_prefix) - pulumi.set(__self__, "secondary_peer_address_prefix", secondary_peer_address_prefix) + ExpressRouteCircuitPeeringIpv6Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + primary_peer_address_prefix=primary_peer_address_prefix, + secondary_peer_address_prefix=secondary_peer_address_prefix, + enabled=enabled, + microsoft_peering=microsoft_peering, + route_filter_id=route_filter_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + primary_peer_address_prefix: Optional[pulumi.Input[str]] = None, + secondary_peer_address_prefix: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + microsoft_peering: Optional[pulumi.Input['ExpressRouteCircuitPeeringIpv6MicrosoftPeeringArgs']] = None, + route_filter_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary_peer_address_prefix is None and 'primaryPeerAddressPrefix' in kwargs: + primary_peer_address_prefix = kwargs['primaryPeerAddressPrefix'] + if primary_peer_address_prefix is None: + raise TypeError("Missing 'primary_peer_address_prefix' argument") + if secondary_peer_address_prefix is None and 'secondaryPeerAddressPrefix' in kwargs: + secondary_peer_address_prefix = kwargs['secondaryPeerAddressPrefix'] + if secondary_peer_address_prefix is None: + raise TypeError("Missing 'secondary_peer_address_prefix' argument") + if microsoft_peering is None and 'microsoftPeering' in kwargs: + microsoft_peering = kwargs['microsoftPeering'] + if route_filter_id is None and 'routeFilterId' in kwargs: + route_filter_id = kwargs['routeFilterId'] + + _setter("primary_peer_address_prefix", primary_peer_address_prefix) + _setter("secondary_peer_address_prefix", secondary_peer_address_prefix) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if microsoft_peering is not None: - pulumi.set(__self__, "microsoft_peering", microsoft_peering) + _setter("microsoft_peering", microsoft_peering) if route_filter_id is not None: - pulumi.set(__self__, "route_filter_id", route_filter_id) + _setter("route_filter_id", route_filter_id) @property @pulumi.getter(name="primaryPeerAddressPrefix") @@ -3840,14 +5022,39 @@ def __init__(__self__, *, :param pulumi.Input[int] customer_asn: The CustomerASN of the peering. Defaults to `0`. :param pulumi.Input[str] routing_registry_name: The Routing Registry against which the AS number and prefixes are registered. For example: `ARIN`, `RIPE`, `AFRINIC` etc. Defaults to `NONE`. """ + ExpressRouteCircuitPeeringIpv6MicrosoftPeeringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + advertised_communities=advertised_communities, + advertised_public_prefixes=advertised_public_prefixes, + customer_asn=customer_asn, + routing_registry_name=routing_registry_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + advertised_communities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + advertised_public_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + customer_asn: Optional[pulumi.Input[int]] = None, + routing_registry_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if advertised_communities is None and 'advertisedCommunities' in kwargs: + advertised_communities = kwargs['advertisedCommunities'] + if advertised_public_prefixes is None and 'advertisedPublicPrefixes' in kwargs: + advertised_public_prefixes = kwargs['advertisedPublicPrefixes'] + if customer_asn is None and 'customerAsn' in kwargs: + customer_asn = kwargs['customerAsn'] + if routing_registry_name is None and 'routingRegistryName' in kwargs: + routing_registry_name = kwargs['routingRegistryName'] + if advertised_communities is not None: - pulumi.set(__self__, "advertised_communities", advertised_communities) + _setter("advertised_communities", advertised_communities) if advertised_public_prefixes is not None: - pulumi.set(__self__, "advertised_public_prefixes", advertised_public_prefixes) + _setter("advertised_public_prefixes", advertised_public_prefixes) if customer_asn is not None: - pulumi.set(__self__, "customer_asn", customer_asn) + _setter("customer_asn", customer_asn) if routing_registry_name is not None: - pulumi.set(__self__, "routing_registry_name", routing_registry_name) + _setter("routing_registry_name", routing_registry_name) @property @pulumi.getter(name="advertisedCommunities") @@ -3911,13 +5118,40 @@ def __init__(__self__, *, :param pulumi.Input[int] customer_asn: The CustomerASN of the peering. Defaults to `0`. :param pulumi.Input[str] routing_registry_name: The Routing Registry against which the AS number and prefixes are registered. For example: `ARIN`, `RIPE`, `AFRINIC` etc. Defaults to `NONE`. """ - pulumi.set(__self__, "advertised_public_prefixes", advertised_public_prefixes) + ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + advertised_public_prefixes=advertised_public_prefixes, + advertised_communities=advertised_communities, + customer_asn=customer_asn, + routing_registry_name=routing_registry_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + advertised_public_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + advertised_communities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + customer_asn: Optional[pulumi.Input[int]] = None, + routing_registry_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if advertised_public_prefixes is None and 'advertisedPublicPrefixes' in kwargs: + advertised_public_prefixes = kwargs['advertisedPublicPrefixes'] + if advertised_public_prefixes is None: + raise TypeError("Missing 'advertised_public_prefixes' argument") + if advertised_communities is None and 'advertisedCommunities' in kwargs: + advertised_communities = kwargs['advertisedCommunities'] + if customer_asn is None and 'customerAsn' in kwargs: + customer_asn = kwargs['customerAsn'] + if routing_registry_name is None and 'routingRegistryName' in kwargs: + routing_registry_name = kwargs['routingRegistryName'] + + _setter("advertised_public_prefixes", advertised_public_prefixes) if advertised_communities is not None: - pulumi.set(__self__, "advertised_communities", advertised_communities) + _setter("advertised_communities", advertised_communities) if customer_asn is not None: - pulumi.set(__self__, "customer_asn", customer_asn) + _setter("customer_asn", customer_asn) if routing_registry_name is not None: - pulumi.set(__self__, "routing_registry_name", routing_registry_name) + _setter("routing_registry_name", routing_registry_name) @property @pulumi.getter(name="advertisedPublicPrefixes") @@ -3979,8 +5213,25 @@ def __init__(__self__, *, > **NOTE:** You can migrate from `MeteredData` to `UnlimitedData`, but not the other way around. :param pulumi.Input[str] tier: The service tier. Possible values are `Basic`, `Local`, `Standard` or `Premium`. """ - pulumi.set(__self__, "family", family) - pulumi.set(__self__, "tier", tier) + ExpressRouteCircuitSkuArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + family=family, + tier=tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + family: Optional[pulumi.Input[str]] = None, + tier: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if family is None: + raise TypeError("Missing 'family' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("family", family) + _setter("tier", tier) @property @pulumi.getter @@ -4022,14 +5273,39 @@ def __init__(__self__, *, :param pulumi.Input[str] outbound_route_map_id: The ID of the Route Map associated with this Express Route Connection for outbound routes. :param pulumi.Input['ExpressRouteConnectionRoutingPropagatedRouteTableArgs'] propagated_route_table: A `propagated_route_table` block as defined below. """ + ExpressRouteConnectionRoutingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + associated_route_table_id=associated_route_table_id, + inbound_route_map_id=inbound_route_map_id, + outbound_route_map_id=outbound_route_map_id, + propagated_route_table=propagated_route_table, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + associated_route_table_id: Optional[pulumi.Input[str]] = None, + inbound_route_map_id: Optional[pulumi.Input[str]] = None, + outbound_route_map_id: Optional[pulumi.Input[str]] = None, + propagated_route_table: Optional[pulumi.Input['ExpressRouteConnectionRoutingPropagatedRouteTableArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if associated_route_table_id is None and 'associatedRouteTableId' in kwargs: + associated_route_table_id = kwargs['associatedRouteTableId'] + if inbound_route_map_id is None and 'inboundRouteMapId' in kwargs: + inbound_route_map_id = kwargs['inboundRouteMapId'] + if outbound_route_map_id is None and 'outboundRouteMapId' in kwargs: + outbound_route_map_id = kwargs['outboundRouteMapId'] + if propagated_route_table is None and 'propagatedRouteTable' in kwargs: + propagated_route_table = kwargs['propagatedRouteTable'] + if associated_route_table_id is not None: - pulumi.set(__self__, "associated_route_table_id", associated_route_table_id) + _setter("associated_route_table_id", associated_route_table_id) if inbound_route_map_id is not None: - pulumi.set(__self__, "inbound_route_map_id", inbound_route_map_id) + _setter("inbound_route_map_id", inbound_route_map_id) if outbound_route_map_id is not None: - pulumi.set(__self__, "outbound_route_map_id", outbound_route_map_id) + _setter("outbound_route_map_id", outbound_route_map_id) if propagated_route_table is not None: - pulumi.set(__self__, "propagated_route_table", propagated_route_table) + _setter("propagated_route_table", propagated_route_table) @property @pulumi.getter(name="associatedRouteTableId") @@ -4089,10 +5365,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] labels: The list of labels to logically group route tables. :param pulumi.Input[Sequence[pulumi.Input[str]]] route_table_ids: A list of IDs of the Virtual Hub Route Table to propagate routes from Express Route Connection to the route table. """ + ExpressRouteConnectionRoutingPropagatedRouteTableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + labels=labels, + route_table_ids=route_table_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + route_table_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if route_table_ids is None and 'routeTableIds' in kwargs: + route_table_ids = kwargs['routeTableIds'] + if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if route_table_ids is not None: - pulumi.set(__self__, "route_table_ids", route_table_ids) + _setter("route_table_ids", route_table_ids) @property @pulumi.getter @@ -4128,8 +5419,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: Specifies a list of User Assigned Managed Identity IDs to be assigned to this Express Route Port. :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that should be configured on this Express Route Port. Only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + ExpressRoutePortIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -4185,28 +5495,79 @@ def __init__(__self__, *, :param pulumi.Input[str] rack_id: The ID that maps from the patch panel port to the rack. :param pulumi.Input[str] router_name: The name of the Azure router associated with the Express Route Port Link. """ + ExpressRoutePortLink1Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_enabled=admin_enabled, + connector_type=connector_type, + id=id, + interface_name=interface_name, + macsec_cak_keyvault_secret_id=macsec_cak_keyvault_secret_id, + macsec_cipher=macsec_cipher, + macsec_ckn_keyvault_secret_id=macsec_ckn_keyvault_secret_id, + macsec_sci_enabled=macsec_sci_enabled, + patch_panel_id=patch_panel_id, + rack_id=rack_id, + router_name=router_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_enabled: Optional[pulumi.Input[bool]] = None, + connector_type: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + interface_name: Optional[pulumi.Input[str]] = None, + macsec_cak_keyvault_secret_id: Optional[pulumi.Input[str]] = None, + macsec_cipher: Optional[pulumi.Input[str]] = None, + macsec_ckn_keyvault_secret_id: Optional[pulumi.Input[str]] = None, + macsec_sci_enabled: Optional[pulumi.Input[bool]] = None, + patch_panel_id: Optional[pulumi.Input[str]] = None, + rack_id: Optional[pulumi.Input[str]] = None, + router_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_enabled is None and 'adminEnabled' in kwargs: + admin_enabled = kwargs['adminEnabled'] + if connector_type is None and 'connectorType' in kwargs: + connector_type = kwargs['connectorType'] + if interface_name is None and 'interfaceName' in kwargs: + interface_name = kwargs['interfaceName'] + if macsec_cak_keyvault_secret_id is None and 'macsecCakKeyvaultSecretId' in kwargs: + macsec_cak_keyvault_secret_id = kwargs['macsecCakKeyvaultSecretId'] + if macsec_cipher is None and 'macsecCipher' in kwargs: + macsec_cipher = kwargs['macsecCipher'] + if macsec_ckn_keyvault_secret_id is None and 'macsecCknKeyvaultSecretId' in kwargs: + macsec_ckn_keyvault_secret_id = kwargs['macsecCknKeyvaultSecretId'] + if macsec_sci_enabled is None and 'macsecSciEnabled' in kwargs: + macsec_sci_enabled = kwargs['macsecSciEnabled'] + if patch_panel_id is None and 'patchPanelId' in kwargs: + patch_panel_id = kwargs['patchPanelId'] + if rack_id is None and 'rackId' in kwargs: + rack_id = kwargs['rackId'] + if router_name is None and 'routerName' in kwargs: + router_name = kwargs['routerName'] + if admin_enabled is not None: - pulumi.set(__self__, "admin_enabled", admin_enabled) + _setter("admin_enabled", admin_enabled) if connector_type is not None: - pulumi.set(__self__, "connector_type", connector_type) + _setter("connector_type", connector_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if interface_name is not None: - pulumi.set(__self__, "interface_name", interface_name) + _setter("interface_name", interface_name) if macsec_cak_keyvault_secret_id is not None: - pulumi.set(__self__, "macsec_cak_keyvault_secret_id", macsec_cak_keyvault_secret_id) + _setter("macsec_cak_keyvault_secret_id", macsec_cak_keyvault_secret_id) if macsec_cipher is not None: - pulumi.set(__self__, "macsec_cipher", macsec_cipher) + _setter("macsec_cipher", macsec_cipher) if macsec_ckn_keyvault_secret_id is not None: - pulumi.set(__self__, "macsec_ckn_keyvault_secret_id", macsec_ckn_keyvault_secret_id) + _setter("macsec_ckn_keyvault_secret_id", macsec_ckn_keyvault_secret_id) if macsec_sci_enabled is not None: - pulumi.set(__self__, "macsec_sci_enabled", macsec_sci_enabled) + _setter("macsec_sci_enabled", macsec_sci_enabled) if patch_panel_id is not None: - pulumi.set(__self__, "patch_panel_id", patch_panel_id) + _setter("patch_panel_id", patch_panel_id) if rack_id is not None: - pulumi.set(__self__, "rack_id", rack_id) + _setter("rack_id", rack_id) if router_name is not None: - pulumi.set(__self__, "router_name", router_name) + _setter("router_name", router_name) @property @pulumi.getter(name="adminEnabled") @@ -4372,28 +5733,79 @@ def __init__(__self__, *, :param pulumi.Input[str] rack_id: The ID that maps from the patch panel port to the rack. :param pulumi.Input[str] router_name: The name of the Azure router associated with the Express Route Port Link. """ + ExpressRoutePortLink2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_enabled=admin_enabled, + connector_type=connector_type, + id=id, + interface_name=interface_name, + macsec_cak_keyvault_secret_id=macsec_cak_keyvault_secret_id, + macsec_cipher=macsec_cipher, + macsec_ckn_keyvault_secret_id=macsec_ckn_keyvault_secret_id, + macsec_sci_enabled=macsec_sci_enabled, + patch_panel_id=patch_panel_id, + rack_id=rack_id, + router_name=router_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_enabled: Optional[pulumi.Input[bool]] = None, + connector_type: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + interface_name: Optional[pulumi.Input[str]] = None, + macsec_cak_keyvault_secret_id: Optional[pulumi.Input[str]] = None, + macsec_cipher: Optional[pulumi.Input[str]] = None, + macsec_ckn_keyvault_secret_id: Optional[pulumi.Input[str]] = None, + macsec_sci_enabled: Optional[pulumi.Input[bool]] = None, + patch_panel_id: Optional[pulumi.Input[str]] = None, + rack_id: Optional[pulumi.Input[str]] = None, + router_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_enabled is None and 'adminEnabled' in kwargs: + admin_enabled = kwargs['adminEnabled'] + if connector_type is None and 'connectorType' in kwargs: + connector_type = kwargs['connectorType'] + if interface_name is None and 'interfaceName' in kwargs: + interface_name = kwargs['interfaceName'] + if macsec_cak_keyvault_secret_id is None and 'macsecCakKeyvaultSecretId' in kwargs: + macsec_cak_keyvault_secret_id = kwargs['macsecCakKeyvaultSecretId'] + if macsec_cipher is None and 'macsecCipher' in kwargs: + macsec_cipher = kwargs['macsecCipher'] + if macsec_ckn_keyvault_secret_id is None and 'macsecCknKeyvaultSecretId' in kwargs: + macsec_ckn_keyvault_secret_id = kwargs['macsecCknKeyvaultSecretId'] + if macsec_sci_enabled is None and 'macsecSciEnabled' in kwargs: + macsec_sci_enabled = kwargs['macsecSciEnabled'] + if patch_panel_id is None and 'patchPanelId' in kwargs: + patch_panel_id = kwargs['patchPanelId'] + if rack_id is None and 'rackId' in kwargs: + rack_id = kwargs['rackId'] + if router_name is None and 'routerName' in kwargs: + router_name = kwargs['routerName'] + if admin_enabled is not None: - pulumi.set(__self__, "admin_enabled", admin_enabled) + _setter("admin_enabled", admin_enabled) if connector_type is not None: - pulumi.set(__self__, "connector_type", connector_type) + _setter("connector_type", connector_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if interface_name is not None: - pulumi.set(__self__, "interface_name", interface_name) + _setter("interface_name", interface_name) if macsec_cak_keyvault_secret_id is not None: - pulumi.set(__self__, "macsec_cak_keyvault_secret_id", macsec_cak_keyvault_secret_id) + _setter("macsec_cak_keyvault_secret_id", macsec_cak_keyvault_secret_id) if macsec_cipher is not None: - pulumi.set(__self__, "macsec_cipher", macsec_cipher) + _setter("macsec_cipher", macsec_cipher) if macsec_ckn_keyvault_secret_id is not None: - pulumi.set(__self__, "macsec_ckn_keyvault_secret_id", macsec_ckn_keyvault_secret_id) + _setter("macsec_ckn_keyvault_secret_id", macsec_ckn_keyvault_secret_id) if macsec_sci_enabled is not None: - pulumi.set(__self__, "macsec_sci_enabled", macsec_sci_enabled) + _setter("macsec_sci_enabled", macsec_sci_enabled) if patch_panel_id is not None: - pulumi.set(__self__, "patch_panel_id", patch_panel_id) + _setter("patch_panel_id", patch_panel_id) if rack_id is not None: - pulumi.set(__self__, "rack_id", rack_id) + _setter("rack_id", rack_id) if router_name is not None: - pulumi.set(__self__, "router_name", router_name) + _setter("router_name", router_name) @property @pulumi.getter(name="adminEnabled") @@ -4551,19 +5963,52 @@ def __init__(__self__, *, > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule. :param pulumi.Input[Sequence[pulumi.Input[str]]] target_fqdns: A list of FQDNs. """ - pulumi.set(__self__, "name", name) + FirewallApplicationRuleCollectionRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + fqdn_tags=fqdn_tags, + protocols=protocols, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + target_fqdns=target_fqdns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + fqdn_tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + protocols: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallApplicationRuleCollectionRuleProtocolArgs']]]] = None, + source_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_ip_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + target_fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if fqdn_tags is None and 'fqdnTags' in kwargs: + fqdn_tags = kwargs['fqdnTags'] + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + if target_fqdns is None and 'targetFqdns' in kwargs: + target_fqdns = kwargs['targetFqdns'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if fqdn_tags is not None: - pulumi.set(__self__, "fqdn_tags", fqdn_tags) + _setter("fqdn_tags", fqdn_tags) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) if target_fqdns is not None: - pulumi.set(__self__, "target_fqdns", target_fqdns) + _setter("target_fqdns", target_fqdns) @property @pulumi.getter @@ -4661,8 +6106,25 @@ def __init__(__self__, *, :param pulumi.Input[int] port: Specify a port for the connection. :param pulumi.Input[str] type: Specifies the type of connection. Possible values are `Http`, `Https` and `Mssql`. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "type", type) + FirewallApplicationRuleCollectionRuleProtocolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("port", port) + _setter("type", type) @property @pulumi.getter @@ -4705,13 +6167,38 @@ def __init__(__self__, *, > **NOTE** At least one and only one `ip_configuration` block may contain a `subnet_id`. """ - pulumi.set(__self__, "name", name) + FirewallIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + private_ip_address=private_ip_address, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -4780,11 +6267,40 @@ def __init__(__self__, *, > **NOTE** The Management Subnet used for the Firewall must have the name `AzureFirewallManagementSubnet` and the subnet mask must be at least a `/26`. :param pulumi.Input[str] private_ip_address: The private IP address associated with the Firewall. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) + FirewallManagementIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + private_ip_address=private_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + + _setter("name", name) + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) @property @pulumi.getter @@ -4864,18 +6380,69 @@ def __init__(__self__, *, > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule. """ - pulumi.set(__self__, "destination_addresses", destination_addresses) - pulumi.set(__self__, "destination_ports", destination_ports) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocols", protocols) - pulumi.set(__self__, "translated_address", translated_address) - pulumi.set(__self__, "translated_port", translated_port) + FirewallNatRuleCollectionRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_addresses=destination_addresses, + destination_ports=destination_ports, + name=name, + protocols=protocols, + translated_address=translated_address, + translated_port=translated_port, + description=description, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_ports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + translated_address: Optional[pulumi.Input[str]] = None, + translated_port: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + source_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_ip_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_addresses is None and 'destinationAddresses' in kwargs: + destination_addresses = kwargs['destinationAddresses'] + if destination_addresses is None: + raise TypeError("Missing 'destination_addresses' argument") + if destination_ports is None and 'destinationPorts' in kwargs: + destination_ports = kwargs['destinationPorts'] + if destination_ports is None: + raise TypeError("Missing 'destination_ports' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if translated_address is None and 'translatedAddress' in kwargs: + translated_address = kwargs['translatedAddress'] + if translated_address is None: + raise TypeError("Missing 'translated_address' argument") + if translated_port is None and 'translatedPort' in kwargs: + translated_port = kwargs['translatedPort'] + if translated_port is None: + raise TypeError("Missing 'translated_port' argument") + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + + _setter("destination_addresses", destination_addresses) + _setter("destination_ports", destination_ports) + _setter("name", name) + _setter("protocols", protocols) + _setter("translated_address", translated_address) + _setter("translated_port", translated_port) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) @property @pulumi.getter(name="destinationAddresses") @@ -5017,21 +6584,66 @@ def __init__(__self__, *, > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule. """ - pulumi.set(__self__, "destination_ports", destination_ports) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocols", protocols) + FirewallNetworkRuleCollectionRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_ports=destination_ports, + name=name, + protocols=protocols, + description=description, + destination_addresses=destination_addresses, + destination_fqdns=destination_fqdns, + destination_ip_groups=destination_ip_groups, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_ports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + destination_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_ip_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_ip_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_ports is None and 'destinationPorts' in kwargs: + destination_ports = kwargs['destinationPorts'] + if destination_ports is None: + raise TypeError("Missing 'destination_ports' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if destination_addresses is None and 'destinationAddresses' in kwargs: + destination_addresses = kwargs['destinationAddresses'] + if destination_fqdns is None and 'destinationFqdns' in kwargs: + destination_fqdns = kwargs['destinationFqdns'] + if destination_ip_groups is None and 'destinationIpGroups' in kwargs: + destination_ip_groups = kwargs['destinationIpGroups'] + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + + _setter("destination_ports", destination_ports) + _setter("name", name) + _setter("protocols", protocols) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_addresses is not None: - pulumi.set(__self__, "destination_addresses", destination_addresses) + _setter("destination_addresses", destination_addresses) if destination_fqdns is not None: - pulumi.set(__self__, "destination_fqdns", destination_fqdns) + _setter("destination_fqdns", destination_fqdns) if destination_ip_groups is not None: - pulumi.set(__self__, "destination_ip_groups", destination_ip_groups) + _setter("destination_ip_groups", destination_ip_groups) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) @property @pulumi.getter(name="destinationPorts") @@ -5157,10 +6769,25 @@ def __init__(__self__, *, :param pulumi.Input[bool] proxy_enabled: Whether to enable DNS proxy on Firewalls attached to this Firewall Policy? Defaults to `false`. :param pulumi.Input[Sequence[pulumi.Input[str]]] servers: A list of custom DNS servers' IP addresses. """ + FirewallPolicyDnsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + proxy_enabled=proxy_enabled, + servers=servers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + proxy_enabled: Optional[pulumi.Input[bool]] = None, + servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if proxy_enabled is None and 'proxyEnabled' in kwargs: + proxy_enabled = kwargs['proxyEnabled'] + if proxy_enabled is not None: - pulumi.set(__self__, "proxy_enabled", proxy_enabled) + _setter("proxy_enabled", proxy_enabled) if servers is not None: - pulumi.set(__self__, "servers", servers) + _setter("servers", servers) @property @pulumi.getter(name="proxyEnabled") @@ -5204,18 +6831,49 @@ def __init__(__self__, *, :param pulumi.Input[str] pac_file: Specifies a SAS URL for PAC file. :param pulumi.Input[int] pac_file_port: Specifies a port number for firewall to serve PAC file. """ + FirewallPolicyExplicitProxyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enable_pac_file=enable_pac_file, + enabled=enabled, + http_port=http_port, + https_port=https_port, + pac_file=pac_file, + pac_file_port=pac_file_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enable_pac_file: Optional[pulumi.Input[bool]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + http_port: Optional[pulumi.Input[int]] = None, + https_port: Optional[pulumi.Input[int]] = None, + pac_file: Optional[pulumi.Input[str]] = None, + pac_file_port: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enable_pac_file is None and 'enablePacFile' in kwargs: + enable_pac_file = kwargs['enablePacFile'] + if http_port is None and 'httpPort' in kwargs: + http_port = kwargs['httpPort'] + if https_port is None and 'httpsPort' in kwargs: + https_port = kwargs['httpsPort'] + if pac_file is None and 'pacFile' in kwargs: + pac_file = kwargs['pacFile'] + if pac_file_port is None and 'pacFilePort' in kwargs: + pac_file_port = kwargs['pacFilePort'] + if enable_pac_file is not None: - pulumi.set(__self__, "enable_pac_file", enable_pac_file) + _setter("enable_pac_file", enable_pac_file) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if http_port is not None: - pulumi.set(__self__, "http_port", http_port) + _setter("http_port", http_port) if https_port is not None: - pulumi.set(__self__, "https_port", https_port) + _setter("https_port", https_port) if pac_file is not None: - pulumi.set(__self__, "pac_file", pac_file) + _setter("pac_file", pac_file) if pac_file_port is not None: - pulumi.set(__self__, "pac_file_port", pac_file_port) + _setter("pac_file_port", pac_file_port) @property @pulumi.getter(name="enablePacFile") @@ -5301,13 +6959,38 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that should be configured on this Firewall Policy. Only possible value is `UserAssigned`. :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: Specifies a list of User Assigned Managed Identity IDs to be assigned to this Firewall Policy. """ - pulumi.set(__self__, "type", type) + FirewallPolicyIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -5365,12 +7048,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyInsightsLogAnalyticsWorkspaceArgs']]] log_analytics_workspaces: A list of `log_analytics_workspace` block as defined below. :param pulumi.Input[int] retention_in_days: The log retention period in days. """ - pulumi.set(__self__, "default_log_analytics_workspace_id", default_log_analytics_workspace_id) - pulumi.set(__self__, "enabled", enabled) + FirewallPolicyInsightsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_log_analytics_workspace_id=default_log_analytics_workspace_id, + enabled=enabled, + log_analytics_workspaces=log_analytics_workspaces, + retention_in_days=retention_in_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + log_analytics_workspaces: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyInsightsLogAnalyticsWorkspaceArgs']]]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_log_analytics_workspace_id is None and 'defaultLogAnalyticsWorkspaceId' in kwargs: + default_log_analytics_workspace_id = kwargs['defaultLogAnalyticsWorkspaceId'] + if default_log_analytics_workspace_id is None: + raise TypeError("Missing 'default_log_analytics_workspace_id' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if log_analytics_workspaces is None and 'logAnalyticsWorkspaces' in kwargs: + log_analytics_workspaces = kwargs['logAnalyticsWorkspaces'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + + _setter("default_log_analytics_workspace_id", default_log_analytics_workspace_id) + _setter("enabled", enabled) if log_analytics_workspaces is not None: - pulumi.set(__self__, "log_analytics_workspaces", log_analytics_workspaces) + _setter("log_analytics_workspaces", log_analytics_workspaces) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) @property @pulumi.getter(name="defaultLogAnalyticsWorkspaceId") @@ -5430,8 +7140,27 @@ def __init__(__self__, *, :param pulumi.Input[str] firewall_location: The location of the Firewalls, that when matches this Log Analytics Workspace will be used to consume their logs. :param pulumi.Input[str] id: The ID of the Log Analytics Workspace that the Firewalls associated with this Firewall Policy will send their logs to when their locations match the `firewall_location`. """ - pulumi.set(__self__, "firewall_location", firewall_location) - pulumi.set(__self__, "id", id) + FirewallPolicyInsightsLogAnalyticsWorkspaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + firewall_location=firewall_location, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + firewall_location: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if firewall_location is None and 'firewallLocation' in kwargs: + firewall_location = kwargs['firewallLocation'] + if firewall_location is None: + raise TypeError("Missing 'firewall_location' argument") + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("firewall_location", firewall_location) + _setter("id", id) @property @pulumi.getter(name="firewallLocation") @@ -5471,14 +7200,37 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyIntrusionDetectionSignatureOverrideArgs']]] signature_overrides: One or more `signature_overrides` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyIntrusionDetectionTrafficBypassArgs']]] traffic_bypasses: One or more `traffic_bypass` blocks as defined below. """ + FirewallPolicyIntrusionDetectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + private_ranges=private_ranges, + signature_overrides=signature_overrides, + traffic_bypasses=traffic_bypasses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + private_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + signature_overrides: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyIntrusionDetectionSignatureOverrideArgs']]]] = None, + traffic_bypasses: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyIntrusionDetectionTrafficBypassArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_ranges is None and 'privateRanges' in kwargs: + private_ranges = kwargs['privateRanges'] + if signature_overrides is None and 'signatureOverrides' in kwargs: + signature_overrides = kwargs['signatureOverrides'] + if traffic_bypasses is None and 'trafficBypasses' in kwargs: + traffic_bypasses = kwargs['trafficBypasses'] + if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if private_ranges is not None: - pulumi.set(__self__, "private_ranges", private_ranges) + _setter("private_ranges", private_ranges) if signature_overrides is not None: - pulumi.set(__self__, "signature_overrides", signature_overrides) + _setter("signature_overrides", signature_overrides) if traffic_bypasses is not None: - pulumi.set(__self__, "traffic_bypasses", traffic_bypasses) + _setter("traffic_bypasses", traffic_bypasses) @property @pulumi.getter @@ -5538,10 +7290,23 @@ def __init__(__self__, *, :param pulumi.Input[str] id: 12-digit number (id) which identifies your signature. :param pulumi.Input[str] state: state can be any of `Off`, `Alert` or `Deny`. """ + FirewallPolicyIntrusionDetectionSignatureOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + state=state, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + state: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) @property @pulumi.getter @@ -5589,20 +7354,59 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] source_addresses: Specifies a list of source addresses that shall be bypassed by intrusion detection. :param pulumi.Input[Sequence[pulumi.Input[str]]] source_ip_groups: Specifies a list of source IP groups that shall be bypassed by intrusion detection. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + FirewallPolicyIntrusionDetectionTrafficBypassArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocol=protocol, + description=description, + destination_addresses=destination_addresses, + destination_ip_groups=destination_ip_groups, + destination_ports=destination_ports, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + destination_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_ip_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_ports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_ip_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if destination_addresses is None and 'destinationAddresses' in kwargs: + destination_addresses = kwargs['destinationAddresses'] + if destination_ip_groups is None and 'destinationIpGroups' in kwargs: + destination_ip_groups = kwargs['destinationIpGroups'] + if destination_ports is None and 'destinationPorts' in kwargs: + destination_ports = kwargs['destinationPorts'] + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + + _setter("name", name) + _setter("protocol", protocol) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_addresses is not None: - pulumi.set(__self__, "destination_addresses", destination_addresses) + _setter("destination_addresses", destination_addresses) if destination_ip_groups is not None: - pulumi.set(__self__, "destination_ip_groups", destination_ip_groups) + _setter("destination_ip_groups", destination_ip_groups) if destination_ports is not None: - pulumi.set(__self__, "destination_ports", destination_ports) + _setter("destination_ports", destination_ports) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) @property @pulumi.getter @@ -5714,10 +7518,35 @@ def __init__(__self__, *, :param pulumi.Input[int] priority: The priority of the application rule collection. The range is `100` - `65000`. :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleArgs']]] rules: One or more `application_rule` (application rule) blocks as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "rules", rules) + FirewallPolicyRuleCollectionGroupApplicationRuleCollectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + priority=priority, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if rules is None: + raise TypeError("Missing 'rules' argument") + + _setter("action", action) + _setter("name", name) + _setter("priority", priority) + _setter("rules", rules) @property @pulumi.getter @@ -5795,27 +7624,76 @@ def __init__(__self__, *, :param pulumi.Input[bool] terminate_tls: Boolean specifying if TLS shall be terminated (true) or not (false). Must be `true` when using `destination_urls`. Needs Premium SKU for Firewall Policy. :param pulumi.Input[Sequence[pulumi.Input[str]]] web_categories: Specifies a list of web categories to which access is denied or allowed depending on the value of `action` above. Needs Premium SKU for Firewall Policy. """ - pulumi.set(__self__, "name", name) + FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + destination_addresses=destination_addresses, + destination_fqdn_tags=destination_fqdn_tags, + destination_fqdns=destination_fqdns, + destination_urls=destination_urls, + protocols=protocols, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + terminate_tls=terminate_tls, + web_categories=web_categories, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + destination_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_fqdn_tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + protocols: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleProtocolArgs']]]] = None, + source_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_ip_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + terminate_tls: Optional[pulumi.Input[bool]] = None, + web_categories: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if destination_addresses is None and 'destinationAddresses' in kwargs: + destination_addresses = kwargs['destinationAddresses'] + if destination_fqdn_tags is None and 'destinationFqdnTags' in kwargs: + destination_fqdn_tags = kwargs['destinationFqdnTags'] + if destination_fqdns is None and 'destinationFqdns' in kwargs: + destination_fqdns = kwargs['destinationFqdns'] + if destination_urls is None and 'destinationUrls' in kwargs: + destination_urls = kwargs['destinationUrls'] + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + if terminate_tls is None and 'terminateTls' in kwargs: + terminate_tls = kwargs['terminateTls'] + if web_categories is None and 'webCategories' in kwargs: + web_categories = kwargs['webCategories'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_addresses is not None: - pulumi.set(__self__, "destination_addresses", destination_addresses) + _setter("destination_addresses", destination_addresses) if destination_fqdn_tags is not None: - pulumi.set(__self__, "destination_fqdn_tags", destination_fqdn_tags) + _setter("destination_fqdn_tags", destination_fqdn_tags) if destination_fqdns is not None: - pulumi.set(__self__, "destination_fqdns", destination_fqdns) + _setter("destination_fqdns", destination_fqdns) if destination_urls is not None: - pulumi.set(__self__, "destination_urls", destination_urls) + _setter("destination_urls", destination_urls) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) if terminate_tls is not None: - pulumi.set(__self__, "terminate_tls", terminate_tls) + _setter("terminate_tls", terminate_tls) if web_categories is not None: - pulumi.set(__self__, "web_categories", web_categories) + _setter("web_categories", web_categories) @property @pulumi.getter @@ -5959,8 +7837,25 @@ def __init__(__self__, *, :param pulumi.Input[int] port: Port number of the protocol. Range is 0-64000. :param pulumi.Input[str] type: Protocol type. Possible values are `Http` and `Https`. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "type", type) + FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleProtocolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("port", port) + _setter("type", type) @property @pulumi.getter @@ -6000,10 +7895,35 @@ def __init__(__self__, *, :param pulumi.Input[int] priority: The priority of the NAT rule collection. The range is `100` - `65000`. :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupNatRuleCollectionRuleArgs']]] rules: A `nat_rule` (NAT rule) block as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "rules", rules) + FirewallPolicyRuleCollectionGroupNatRuleCollectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + priority=priority, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupNatRuleCollectionRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if rules is None: + raise TypeError("Missing 'rules' argument") + + _setter("action", action) + _setter("name", name) + _setter("priority", priority) + _setter("rules", rules) @property @pulumi.getter @@ -6081,23 +8001,72 @@ def __init__(__self__, *, > **NOTE:** Exactly one of `translated_address` and `translated_fqdn` should be set. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocols", protocols) - pulumi.set(__self__, "translated_port", translated_port) + FirewallPolicyRuleCollectionGroupNatRuleCollectionRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocols=protocols, + translated_port=translated_port, + description=description, + destination_address=destination_address, + destination_ports=destination_ports, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + translated_address=translated_address, + translated_fqdn=translated_fqdn, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + translated_port: Optional[pulumi.Input[int]] = None, + description: Optional[pulumi.Input[str]] = None, + destination_address: Optional[pulumi.Input[str]] = None, + destination_ports: Optional[pulumi.Input[str]] = None, + source_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_ip_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + translated_address: Optional[pulumi.Input[str]] = None, + translated_fqdn: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if translated_port is None and 'translatedPort' in kwargs: + translated_port = kwargs['translatedPort'] + if translated_port is None: + raise TypeError("Missing 'translated_port' argument") + if destination_address is None and 'destinationAddress' in kwargs: + destination_address = kwargs['destinationAddress'] + if destination_ports is None and 'destinationPorts' in kwargs: + destination_ports = kwargs['destinationPorts'] + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + if translated_address is None and 'translatedAddress' in kwargs: + translated_address = kwargs['translatedAddress'] + if translated_fqdn is None and 'translatedFqdn' in kwargs: + translated_fqdn = kwargs['translatedFqdn'] + + _setter("name", name) + _setter("protocols", protocols) + _setter("translated_port", translated_port) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_address is not None: - pulumi.set(__self__, "destination_address", destination_address) + _setter("destination_address", destination_address) if destination_ports is not None: - pulumi.set(__self__, "destination_ports", destination_ports) + _setter("destination_ports", destination_ports) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) if translated_address is not None: - pulumi.set(__self__, "translated_address", translated_address) + _setter("translated_address", translated_address) if translated_fqdn is not None: - pulumi.set(__self__, "translated_fqdn", translated_fqdn) + _setter("translated_fqdn", translated_fqdn) @property @pulumi.getter @@ -6235,10 +8204,35 @@ def __init__(__self__, *, :param pulumi.Input[int] priority: The priority of the network rule collection. The range is `100` - `65000`. :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupNetworkRuleCollectionRuleArgs']]] rules: One or more `network_rule` (network rule) blocks as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "rules", rules) + FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + priority=priority, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupNetworkRuleCollectionRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if rules is None: + raise TypeError("Missing 'rules' argument") + + _setter("action", action) + _setter("name", name) + _setter("priority", priority) + _setter("rules", rules) @property @pulumi.getter @@ -6312,21 +8306,66 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] source_addresses: Specifies a list of source IP addresses (including CIDR, IP range and `*`). :param pulumi.Input[Sequence[pulumi.Input[str]]] source_ip_groups: Specifies a list of source IP groups. """ - pulumi.set(__self__, "destination_ports", destination_ports) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocols", protocols) + FirewallPolicyRuleCollectionGroupNetworkRuleCollectionRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_ports=destination_ports, + name=name, + protocols=protocols, + description=description, + destination_addresses=destination_addresses, + destination_fqdns=destination_fqdns, + destination_ip_groups=destination_ip_groups, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_ports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + destination_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_ip_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_ip_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_ports is None and 'destinationPorts' in kwargs: + destination_ports = kwargs['destinationPorts'] + if destination_ports is None: + raise TypeError("Missing 'destination_ports' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if destination_addresses is None and 'destinationAddresses' in kwargs: + destination_addresses = kwargs['destinationAddresses'] + if destination_fqdns is None and 'destinationFqdns' in kwargs: + destination_fqdns = kwargs['destinationFqdns'] + if destination_ip_groups is None and 'destinationIpGroups' in kwargs: + destination_ip_groups = kwargs['destinationIpGroups'] + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + + _setter("destination_ports", destination_ports) + _setter("name", name) + _setter("protocols", protocols) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_addresses is not None: - pulumi.set(__self__, "destination_addresses", destination_addresses) + _setter("destination_addresses", destination_addresses) if destination_fqdns is not None: - pulumi.set(__self__, "destination_fqdns", destination_fqdns) + _setter("destination_fqdns", destination_fqdns) if destination_ip_groups is not None: - pulumi.set(__self__, "destination_ip_groups", destination_ip_groups) + _setter("destination_ip_groups", destination_ip_groups) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) @property @pulumi.getter(name="destinationPorts") @@ -6446,10 +8485,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] fqdns: A list of FQDNs that will be skipped for threat detection. :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_addresses: A list of IP addresses or CIDR ranges that will be skipped for threat detection. """ + FirewallPolicyThreatIntelligenceAllowlistArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdns=fqdns, + ip_addresses=ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if fqdns is not None: - pulumi.set(__self__, "fqdns", fqdns) + _setter("fqdns", fqdns) if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) @property @pulumi.getter @@ -6485,8 +8539,27 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_secret_id: The ID of the Key Vault, where the secret or certificate is stored. :param pulumi.Input[str] name: The name of the certificate. """ - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) - pulumi.set(__self__, "name", name) + FirewallPolicyTlsCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_secret_id=key_vault_secret_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_secret_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + if key_vault_secret_id is None: + raise TypeError("Missing 'key_vault_secret_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("key_vault_secret_id", key_vault_secret_id) + _setter("name", name) @property @pulumi.getter(name="keyVaultSecretId") @@ -6526,13 +8599,40 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] public_ip_addresses: The list of public IP addresses associated with the Firewall. :param pulumi.Input[int] public_ip_count: Specifies the number of public IPs to assign to the Firewall. Defaults to `1`. """ - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + FirewallVirtualHubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + virtual_hub_id=virtual_hub_id, + private_ip_address=private_ip_address, + public_ip_addresses=public_ip_addresses, + public_ip_count=public_ip_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + virtual_hub_id: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + public_ip_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if public_ip_count is None and 'publicIpCount' in kwargs: + public_ip_count = kwargs['publicIpCount'] + + _setter("virtual_hub_id", virtual_hub_id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if public_ip_count is not None: - pulumi.set(__self__, "public_ip_count", public_ip_count) + _setter("public_ip_count", public_ip_count) @property @pulumi.getter(name="virtualHubId") @@ -6594,10 +8694,33 @@ def __init__(__self__, *, :param pulumi.Input[str] bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. :param pulumi.Input[int] peer_weight: The weight added to routes learned from this BGP speaker. """ - pulumi.set(__self__, "asn", asn) - pulumi.set(__self__, "bgp_peering_address", bgp_peering_address) + LocalNetworkGatewayBgpSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + asn=asn, + bgp_peering_address=bgp_peering_address, + peer_weight=peer_weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asn: Optional[pulumi.Input[int]] = None, + bgp_peering_address: Optional[pulumi.Input[str]] = None, + peer_weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if asn is None: + raise TypeError("Missing 'asn' argument") + if bgp_peering_address is None and 'bgpPeeringAddress' in kwargs: + bgp_peering_address = kwargs['bgpPeeringAddress'] + if bgp_peering_address is None: + raise TypeError("Missing 'bgp_peering_address' argument") + if peer_weight is None and 'peerWeight' in kwargs: + peer_weight = kwargs['peerWeight'] + + _setter("asn", asn) + _setter("bgp_peering_address", bgp_peering_address) if peer_weight is not None: - pulumi.set(__self__, "peer_weight", peer_weight) + _setter("peer_weight", peer_weight) @property @pulumi.getter @@ -6657,21 +8780,58 @@ def __init__(__self__, *, :param pulumi.Input[str] target_resource_id: The resource ID which is used as the endpoint by the Network Connection Monitor. :param pulumi.Input[str] target_resource_type: The endpoint type of the Network Connection Monitor. Possible values are `AzureSubnet`, `AzureVM`, `AzureVNet`, `ExternalAddress`, `MMAWorkspaceMachine` and `MMAWorkspaceNetwork`. """ - pulumi.set(__self__, "name", name) + NetworkConnectionMonitorEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + address=address, + coverage_level=coverage_level, + excluded_ip_addresses=excluded_ip_addresses, + filter=filter, + included_ip_addresses=included_ip_addresses, + target_resource_id=target_resource_id, + target_resource_type=target_resource_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + address: Optional[pulumi.Input[str]] = None, + coverage_level: Optional[pulumi.Input[str]] = None, + excluded_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + filter: Optional[pulumi.Input['NetworkConnectionMonitorEndpointFilterArgs']] = None, + included_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + target_resource_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if coverage_level is None and 'coverageLevel' in kwargs: + coverage_level = kwargs['coverageLevel'] + if excluded_ip_addresses is None and 'excludedIpAddresses' in kwargs: + excluded_ip_addresses = kwargs['excludedIpAddresses'] + if included_ip_addresses is None and 'includedIpAddresses' in kwargs: + included_ip_addresses = kwargs['includedIpAddresses'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_type is None and 'targetResourceType' in kwargs: + target_resource_type = kwargs['targetResourceType'] + + _setter("name", name) if address is not None: - pulumi.set(__self__, "address", address) + _setter("address", address) if coverage_level is not None: - pulumi.set(__self__, "coverage_level", coverage_level) + _setter("coverage_level", coverage_level) if excluded_ip_addresses is not None: - pulumi.set(__self__, "excluded_ip_addresses", excluded_ip_addresses) + _setter("excluded_ip_addresses", excluded_ip_addresses) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) if included_ip_addresses is not None: - pulumi.set(__self__, "included_ip_addresses", included_ip_addresses) + _setter("included_ip_addresses", included_ip_addresses) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) if target_resource_type is not None: - pulumi.set(__self__, "target_resource_type", target_resource_type) + _setter("target_resource_type", target_resource_type) @property @pulumi.getter @@ -6779,10 +8939,23 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['NetworkConnectionMonitorEndpointFilterItemArgs']]] items: A `item` block as defined below. :param pulumi.Input[str] type: The behaviour type of this endpoint filter. Currently the only allowed value is `Include`. Defaults to `Include`. """ + NetworkConnectionMonitorEndpointFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + items=items, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + items: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkConnectionMonitorEndpointFilterItemArgs']]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if items is not None: - pulumi.set(__self__, "items", items) + _setter("items", items) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -6818,10 +8991,23 @@ def __init__(__self__, *, :param pulumi.Input[str] address: The address of the filter item. :param pulumi.Input[str] type: The type of items included in the filter. Possible values are `AgentAddress`. Defaults to `AgentAddress`. """ + NetworkConnectionMonitorEndpointFilterItemArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address is not None: - pulumi.set(__self__, "address", address) + _setter("address", address) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -6869,20 +9055,61 @@ def __init__(__self__, *, :param pulumi.Input['NetworkConnectionMonitorTestConfigurationTcpConfigurationArgs'] tcp_configuration: A `tcp_configuration` block as defined below. :param pulumi.Input[int] test_frequency_in_seconds: The time interval in seconds at which the test evaluation will happen. Defaults to `60`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + NetworkConnectionMonitorTestConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocol=protocol, + http_configuration=http_configuration, + icmp_configuration=icmp_configuration, + preferred_ip_version=preferred_ip_version, + success_threshold=success_threshold, + tcp_configuration=tcp_configuration, + test_frequency_in_seconds=test_frequency_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + http_configuration: Optional[pulumi.Input['NetworkConnectionMonitorTestConfigurationHttpConfigurationArgs']] = None, + icmp_configuration: Optional[pulumi.Input['NetworkConnectionMonitorTestConfigurationIcmpConfigurationArgs']] = None, + preferred_ip_version: Optional[pulumi.Input[str]] = None, + success_threshold: Optional[pulumi.Input['NetworkConnectionMonitorTestConfigurationSuccessThresholdArgs']] = None, + tcp_configuration: Optional[pulumi.Input['NetworkConnectionMonitorTestConfigurationTcpConfigurationArgs']] = None, + test_frequency_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if http_configuration is None and 'httpConfiguration' in kwargs: + http_configuration = kwargs['httpConfiguration'] + if icmp_configuration is None and 'icmpConfiguration' in kwargs: + icmp_configuration = kwargs['icmpConfiguration'] + if preferred_ip_version is None and 'preferredIpVersion' in kwargs: + preferred_ip_version = kwargs['preferredIpVersion'] + if success_threshold is None and 'successThreshold' in kwargs: + success_threshold = kwargs['successThreshold'] + if tcp_configuration is None and 'tcpConfiguration' in kwargs: + tcp_configuration = kwargs['tcpConfiguration'] + if test_frequency_in_seconds is None and 'testFrequencyInSeconds' in kwargs: + test_frequency_in_seconds = kwargs['testFrequencyInSeconds'] + + _setter("name", name) + _setter("protocol", protocol) if http_configuration is not None: - pulumi.set(__self__, "http_configuration", http_configuration) + _setter("http_configuration", http_configuration) if icmp_configuration is not None: - pulumi.set(__self__, "icmp_configuration", icmp_configuration) + _setter("icmp_configuration", icmp_configuration) if preferred_ip_version is not None: - pulumi.set(__self__, "preferred_ip_version", preferred_ip_version) + _setter("preferred_ip_version", preferred_ip_version) if success_threshold is not None: - pulumi.set(__self__, "success_threshold", success_threshold) + _setter("success_threshold", success_threshold) if tcp_configuration is not None: - pulumi.set(__self__, "tcp_configuration", tcp_configuration) + _setter("tcp_configuration", tcp_configuration) if test_frequency_in_seconds is not None: - pulumi.set(__self__, "test_frequency_in_seconds", test_frequency_in_seconds) + _setter("test_frequency_in_seconds", test_frequency_in_seconds) @property @pulumi.getter @@ -6998,18 +9225,45 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['NetworkConnectionMonitorTestConfigurationHttpConfigurationRequestHeaderArgs']]] request_headers: A `request_header` block as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] valid_status_code_ranges: The HTTP status codes to consider successful. For instance, `2xx`, `301-304` and `418`. """ + NetworkConnectionMonitorTestConfigurationHttpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + method=method, + path=path, + port=port, + prefer_https=prefer_https, + request_headers=request_headers, + valid_status_code_ranges=valid_status_code_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + method: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + prefer_https: Optional[pulumi.Input[bool]] = None, + request_headers: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkConnectionMonitorTestConfigurationHttpConfigurationRequestHeaderArgs']]]] = None, + valid_status_code_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if prefer_https is None and 'preferHttps' in kwargs: + prefer_https = kwargs['preferHttps'] + if request_headers is None and 'requestHeaders' in kwargs: + request_headers = kwargs['requestHeaders'] + if valid_status_code_ranges is None and 'validStatusCodeRanges' in kwargs: + valid_status_code_ranges = kwargs['validStatusCodeRanges'] + if method is not None: - pulumi.set(__self__, "method", method) + _setter("method", method) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if prefer_https is not None: - pulumi.set(__self__, "prefer_https", prefer_https) + _setter("prefer_https", prefer_https) if request_headers is not None: - pulumi.set(__self__, "request_headers", request_headers) + _setter("request_headers", request_headers) if valid_status_code_ranges is not None: - pulumi.set(__self__, "valid_status_code_ranges", valid_status_code_ranges) + _setter("valid_status_code_ranges", valid_status_code_ranges) @property @pulumi.getter @@ -7093,8 +9347,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the HTTP header. :param pulumi.Input[str] value: The value of the HTTP header. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + NetworkConnectionMonitorTestConfigurationHttpConfigurationRequestHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -7128,8 +9399,21 @@ def __init__(__self__, *, """ :param pulumi.Input[bool] trace_route_enabled: Should path evaluation with trace route be enabled? Defaults to `true`. """ + NetworkConnectionMonitorTestConfigurationIcmpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + trace_route_enabled=trace_route_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + trace_route_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if trace_route_enabled is None and 'traceRouteEnabled' in kwargs: + trace_route_enabled = kwargs['traceRouteEnabled'] + if trace_route_enabled is not None: - pulumi.set(__self__, "trace_route_enabled", trace_route_enabled) + _setter("trace_route_enabled", trace_route_enabled) @property @pulumi.getter(name="traceRouteEnabled") @@ -7153,10 +9437,27 @@ def __init__(__self__, *, :param pulumi.Input[int] checks_failed_percent: The maximum percentage of failed checks permitted for a test to be successful. :param pulumi.Input[float] round_trip_time_ms: The maximum round-trip time in milliseconds permitted for a test to be successful. """ + NetworkConnectionMonitorTestConfigurationSuccessThresholdArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + checks_failed_percent=checks_failed_percent, + round_trip_time_ms=round_trip_time_ms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + checks_failed_percent: Optional[pulumi.Input[int]] = None, + round_trip_time_ms: Optional[pulumi.Input[float]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if checks_failed_percent is None and 'checksFailedPercent' in kwargs: + checks_failed_percent = kwargs['checksFailedPercent'] + if round_trip_time_ms is None and 'roundTripTimeMs' in kwargs: + round_trip_time_ms = kwargs['roundTripTimeMs'] + if checks_failed_percent is not None: - pulumi.set(__self__, "checks_failed_percent", checks_failed_percent) + _setter("checks_failed_percent", checks_failed_percent) if round_trip_time_ms is not None: - pulumi.set(__self__, "round_trip_time_ms", round_trip_time_ms) + _setter("round_trip_time_ms", round_trip_time_ms) @property @pulumi.getter(name="checksFailedPercent") @@ -7194,11 +9495,32 @@ def __init__(__self__, *, :param pulumi.Input[str] destination_port_behavior: The destination port behavior for the TCP connection. Possible values are `None` and `ListenIfAvailable`. :param pulumi.Input[bool] trace_route_enabled: Should path evaluation with trace route be enabled? Defaults to `true`. """ - pulumi.set(__self__, "port", port) + NetworkConnectionMonitorTestConfigurationTcpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + destination_port_behavior=destination_port_behavior, + trace_route_enabled=trace_route_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + destination_port_behavior: Optional[pulumi.Input[str]] = None, + trace_route_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if destination_port_behavior is None and 'destinationPortBehavior' in kwargs: + destination_port_behavior = kwargs['destinationPortBehavior'] + if trace_route_enabled is None and 'traceRouteEnabled' in kwargs: + trace_route_enabled = kwargs['traceRouteEnabled'] + + _setter("port", port) if destination_port_behavior is not None: - pulumi.set(__self__, "destination_port_behavior", destination_port_behavior) + _setter("destination_port_behavior", destination_port_behavior) if trace_route_enabled is not None: - pulumi.set(__self__, "trace_route_enabled", trace_route_enabled) + _setter("trace_route_enabled", trace_route_enabled) @property @pulumi.getter @@ -7252,12 +9574,45 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] test_configuration_names: A list of test configuration names. :param pulumi.Input[bool] enabled: Should the test group be enabled? Defaults to `true`. """ - pulumi.set(__self__, "destination_endpoints", destination_endpoints) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "source_endpoints", source_endpoints) - pulumi.set(__self__, "test_configuration_names", test_configuration_names) + NetworkConnectionMonitorTestGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_endpoints=destination_endpoints, + name=name, + source_endpoints=source_endpoints, + test_configuration_names=test_configuration_names, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + source_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + test_configuration_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_endpoints is None and 'destinationEndpoints' in kwargs: + destination_endpoints = kwargs['destinationEndpoints'] + if destination_endpoints is None: + raise TypeError("Missing 'destination_endpoints' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if source_endpoints is None and 'sourceEndpoints' in kwargs: + source_endpoints = kwargs['sourceEndpoints'] + if source_endpoints is None: + raise TypeError("Missing 'source_endpoints' argument") + if test_configuration_names is None and 'testConfigurationNames' in kwargs: + test_configuration_names = kwargs['testConfigurationNames'] + if test_configuration_names is None: + raise TypeError("Missing 'test_configuration_names' argument") + + _setter("destination_endpoints", destination_endpoints) + _setter("name", name) + _setter("source_endpoints", source_endpoints) + _setter("test_configuration_names", test_configuration_names) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="destinationEndpoints") @@ -7345,20 +9700,61 @@ def __init__(__self__, *, > **Note:** This is required when `private_ip_address_version` is set to `IPv4`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) + NetworkInterfaceIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + private_ip_address_allocation=private_ip_address_allocation, + gateway_load_balancer_frontend_ip_configuration_id=gateway_load_balancer_frontend_ip_configuration_id, + primary=primary, + private_ip_address=private_ip_address, + private_ip_address_version=private_ip_address_version, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + private_ip_address_allocation: Optional[pulumi.Input[str]] = None, + gateway_load_balancer_frontend_ip_configuration_id: Optional[pulumi.Input[str]] = None, + primary: Optional[pulumi.Input[bool]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + private_ip_address_version: Optional[pulumi.Input[str]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + if private_ip_address_allocation is None: + raise TypeError("Missing 'private_ip_address_allocation' argument") + if gateway_load_balancer_frontend_ip_configuration_id is None and 'gatewayLoadBalancerFrontendIpConfigurationId' in kwargs: + gateway_load_balancer_frontend_ip_configuration_id = kwargs['gatewayLoadBalancerFrontendIpConfigurationId'] + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address_version is None and 'privateIpAddressVersion' in kwargs: + private_ip_address_version = kwargs['privateIpAddressVersion'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) + _setter("private_ip_address_allocation", private_ip_address_allocation) if gateway_load_balancer_frontend_ip_configuration_id is not None: - pulumi.set(__self__, "gateway_load_balancer_frontend_ip_configuration_id", gateway_load_balancer_frontend_ip_configuration_id) + _setter("gateway_load_balancer_frontend_ip_configuration_id", gateway_load_balancer_frontend_ip_configuration_id) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_address_version is not None: - pulumi.set(__self__, "private_ip_address_version", private_ip_address_version) + _setter("private_ip_address_version", private_ip_address_version) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -7470,8 +9866,29 @@ def __init__(__self__, *, :param pulumi.Input[str] address_prefix: Specifies the address prefix. :param pulumi.Input[str] address_prefix_type: Specifies the address prefix type. Possible values are `IPPrefix` and `ServiceTag`. For more information, please see [this document](https://learn.microsoft.com/en-us/azure/virtual-network-manager/concept-security-admins#source-and-destination-types). """ - pulumi.set(__self__, "address_prefix", address_prefix) - pulumi.set(__self__, "address_prefix_type", address_prefix_type) + NetworkManagerAdminRuleDestinationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix=address_prefix, + address_prefix_type=address_prefix_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix: Optional[pulumi.Input[str]] = None, + address_prefix_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix is None and 'addressPrefix' in kwargs: + address_prefix = kwargs['addressPrefix'] + if address_prefix is None: + raise TypeError("Missing 'address_prefix' argument") + if address_prefix_type is None and 'addressPrefixType' in kwargs: + address_prefix_type = kwargs['addressPrefixType'] + if address_prefix_type is None: + raise TypeError("Missing 'address_prefix_type' argument") + + _setter("address_prefix", address_prefix) + _setter("address_prefix_type", address_prefix_type) @property @pulumi.getter(name="addressPrefix") @@ -7507,8 +9924,29 @@ def __init__(__self__, *, :param pulumi.Input[str] address_prefix: Specifies the address prefix. :param pulumi.Input[str] address_prefix_type: Specifies the address prefix type. Possible values are `IPPrefix` and `ServiceTag`. For more information, please see [this document](https://learn.microsoft.com/en-us/azure/virtual-network-manager/concept-security-admins#source-and-destination-types). """ - pulumi.set(__self__, "address_prefix", address_prefix) - pulumi.set(__self__, "address_prefix_type", address_prefix_type) + NetworkManagerAdminRuleSourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix=address_prefix, + address_prefix_type=address_prefix_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix: Optional[pulumi.Input[str]] = None, + address_prefix_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix is None and 'addressPrefix' in kwargs: + address_prefix = kwargs['addressPrefix'] + if address_prefix is None: + raise TypeError("Missing 'address_prefix' argument") + if address_prefix_type is None and 'addressPrefixType' in kwargs: + address_prefix_type = kwargs['addressPrefixType'] + if address_prefix_type is None: + raise TypeError("Missing 'address_prefix_type' argument") + + _setter("address_prefix", address_prefix) + _setter("address_prefix_type", address_prefix_type) @property @pulumi.getter(name="addressPrefix") @@ -7550,12 +9988,41 @@ def __init__(__self__, *, > **NOTE:** A group can be global only if the `group_connectivity` is `DirectlyConnected`. :param pulumi.Input[bool] use_hub_gateway: Indicates whether the hub gateway is used. Possible values are `true` and `false`. """ - pulumi.set(__self__, "group_connectivity", group_connectivity) - pulumi.set(__self__, "network_group_id", network_group_id) + NetworkManagerConnectivityConfigurationAppliesToGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + group_connectivity=group_connectivity, + network_group_id=network_group_id, + global_mesh_enabled=global_mesh_enabled, + use_hub_gateway=use_hub_gateway, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + group_connectivity: Optional[pulumi.Input[str]] = None, + network_group_id: Optional[pulumi.Input[str]] = None, + global_mesh_enabled: Optional[pulumi.Input[bool]] = None, + use_hub_gateway: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if group_connectivity is None and 'groupConnectivity' in kwargs: + group_connectivity = kwargs['groupConnectivity'] + if group_connectivity is None: + raise TypeError("Missing 'group_connectivity' argument") + if network_group_id is None and 'networkGroupId' in kwargs: + network_group_id = kwargs['networkGroupId'] + if network_group_id is None: + raise TypeError("Missing 'network_group_id' argument") + if global_mesh_enabled is None and 'globalMeshEnabled' in kwargs: + global_mesh_enabled = kwargs['globalMeshEnabled'] + if use_hub_gateway is None and 'useHubGateway' in kwargs: + use_hub_gateway = kwargs['useHubGateway'] + + _setter("group_connectivity", group_connectivity) + _setter("network_group_id", network_group_id) if global_mesh_enabled is not None: - pulumi.set(__self__, "global_mesh_enabled", global_mesh_enabled) + _setter("global_mesh_enabled", global_mesh_enabled) if use_hub_gateway is not None: - pulumi.set(__self__, "use_hub_gateway", use_hub_gateway) + _setter("use_hub_gateway", use_hub_gateway) @property @pulumi.getter(name="groupConnectivity") @@ -7617,8 +10084,29 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_id: Specifies the resource ID used as hub in Hub And Spoke topology. :param pulumi.Input[str] resource_type: Specifies the resource Type used as hub in Hub And Spoke topology. """ - pulumi.set(__self__, "resource_id", resource_id) - pulumi.set(__self__, "resource_type", resource_type) + NetworkManagerConnectivityConfigurationHubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_id=resource_id, + resource_type=resource_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_id: Optional[pulumi.Input[str]] = None, + resource_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + if resource_type is None and 'resourceType' in kwargs: + resource_type = kwargs['resourceType'] + if resource_type is None: + raise TypeError("Missing 'resource_type' argument") + + _setter("resource_id", resource_id) + _setter("resource_type", resource_type) @property @pulumi.getter(name="resourceId") @@ -7656,12 +10144,31 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] subscriptions: List of subscriptions. :param pulumi.Input[str] tenant_id: Tenant ID. """ + NetworkManagerCrossTenantScopeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_groups=management_groups, + subscriptions=subscriptions, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subscriptions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_groups is None and 'managementGroups' in kwargs: + management_groups = kwargs['managementGroups'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if management_groups is not None: - pulumi.set(__self__, "management_groups", management_groups) + _setter("management_groups", management_groups) if subscriptions is not None: - pulumi.set(__self__, "subscriptions", subscriptions) + _setter("subscriptions", subscriptions) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="managementGroups") @@ -7709,10 +10216,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] management_group_ids: A list of management group IDs. :param pulumi.Input[Sequence[pulumi.Input[str]]] subscription_ids: A list of subscription IDs. """ + NetworkManagerScopeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_group_ids=management_group_ids, + subscription_ids=subscription_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subscription_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_group_ids is None and 'managementGroupIds' in kwargs: + management_group_ids = kwargs['managementGroupIds'] + if subscription_ids is None and 'subscriptionIds' in kwargs: + subscription_ids = kwargs['subscriptionIds'] + if management_group_ids is not None: - pulumi.set(__self__, "management_group_ids", management_group_ids) + _setter("management_group_ids", management_group_ids) if subscription_ids is not None: - pulumi.set(__self__, "subscription_ids", subscription_ids) + _setter("subscription_ids", subscription_ids) @property @pulumi.getter(name="managementGroupIds") @@ -7754,15 +10278,44 @@ def __init__(__self__, *, :param pulumi.Input[str] remote_ip_address: The remote IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported.. Changing this forces a new resource to be created. :param pulumi.Input[str] remote_port: The remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "protocol", protocol) + NetworkPacketCaptureFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + local_ip_address=local_ip_address, + local_port=local_port, + remote_ip_address=remote_ip_address, + remote_port=remote_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[pulumi.Input[str]] = None, + local_ip_address: Optional[pulumi.Input[str]] = None, + local_port: Optional[pulumi.Input[str]] = None, + remote_ip_address: Optional[pulumi.Input[str]] = None, + remote_port: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if local_ip_address is None and 'localIpAddress' in kwargs: + local_ip_address = kwargs['localIpAddress'] + if local_port is None and 'localPort' in kwargs: + local_port = kwargs['localPort'] + if remote_ip_address is None and 'remoteIpAddress' in kwargs: + remote_ip_address = kwargs['remoteIpAddress'] + if remote_port is None and 'remotePort' in kwargs: + remote_port = kwargs['remotePort'] + + _setter("protocol", protocol) if local_ip_address is not None: - pulumi.set(__self__, "local_ip_address", local_ip_address) + _setter("local_ip_address", local_ip_address) if local_port is not None: - pulumi.set(__self__, "local_port", local_port) + _setter("local_port", local_port) if remote_ip_address is not None: - pulumi.set(__self__, "remote_ip_address", remote_ip_address) + _setter("remote_ip_address", remote_ip_address) if remote_port is not None: - pulumi.set(__self__, "remote_port", remote_port) + _setter("remote_port", remote_port) @property @pulumi.getter @@ -7838,12 +10391,33 @@ def __init__(__self__, *, > **NOTE:** At least one of `file_path` or `storage_account_id` must be specified. :param pulumi.Input[str] storage_path: The URI of the storage path to save the packet capture. """ + NetworkPacketCaptureStorageLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_path=file_path, + storage_account_id=storage_account_id, + storage_path=storage_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_path: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_path is None and 'filePath' in kwargs: + file_path = kwargs['filePath'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_path is None and 'storagePath' in kwargs: + storage_path = kwargs['storagePath'] + if file_path is not None: - pulumi.set(__self__, "file_path", file_path) + _setter("file_path", file_path) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if storage_path is not None: - pulumi.set(__self__, "storage_path", storage_path) + _setter("storage_path", storage_path) @property @pulumi.getter(name="filePath") @@ -7921,33 +10495,104 @@ def __init__(__self__, *, :param pulumi.Input[str] source_port_range: Source Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `source_port_ranges` is not specified. :param pulumi.Input[Sequence[pulumi.Input[str]]] source_port_ranges: List of source ports or port ranges. This is required if `source_port_range` is not specified. """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "protocol", protocol) + NetworkSecurityGroupSecurityRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + direction=direction, + name=name, + priority=priority, + protocol=protocol, + description=description, + destination_address_prefix=destination_address_prefix, + destination_address_prefixes=destination_address_prefixes, + destination_application_security_group_ids=destination_application_security_group_ids, + destination_port_range=destination_port_range, + destination_port_ranges=destination_port_ranges, + source_address_prefix=source_address_prefix, + source_address_prefixes=source_address_prefixes, + source_application_security_group_ids=source_application_security_group_ids, + source_port_range=source_port_range, + source_port_ranges=source_port_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[pulumi.Input[str]] = None, + direction: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + destination_address_prefix: Optional[pulumi.Input[str]] = None, + destination_address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_application_security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_port_range: Optional[pulumi.Input[str]] = None, + destination_port_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_address_prefix: Optional[pulumi.Input[str]] = None, + source_address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_application_security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_port_range: Optional[pulumi.Input[str]] = None, + source_port_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if destination_address_prefix is None and 'destinationAddressPrefix' in kwargs: + destination_address_prefix = kwargs['destinationAddressPrefix'] + if destination_address_prefixes is None and 'destinationAddressPrefixes' in kwargs: + destination_address_prefixes = kwargs['destinationAddressPrefixes'] + if destination_application_security_group_ids is None and 'destinationApplicationSecurityGroupIds' in kwargs: + destination_application_security_group_ids = kwargs['destinationApplicationSecurityGroupIds'] + if destination_port_range is None and 'destinationPortRange' in kwargs: + destination_port_range = kwargs['destinationPortRange'] + if destination_port_ranges is None and 'destinationPortRanges' in kwargs: + destination_port_ranges = kwargs['destinationPortRanges'] + if source_address_prefix is None and 'sourceAddressPrefix' in kwargs: + source_address_prefix = kwargs['sourceAddressPrefix'] + if source_address_prefixes is None and 'sourceAddressPrefixes' in kwargs: + source_address_prefixes = kwargs['sourceAddressPrefixes'] + if source_application_security_group_ids is None and 'sourceApplicationSecurityGroupIds' in kwargs: + source_application_security_group_ids = kwargs['sourceApplicationSecurityGroupIds'] + if source_port_range is None and 'sourcePortRange' in kwargs: + source_port_range = kwargs['sourcePortRange'] + if source_port_ranges is None and 'sourcePortRanges' in kwargs: + source_port_ranges = kwargs['sourcePortRanges'] + + _setter("access", access) + _setter("direction", direction) + _setter("name", name) + _setter("priority", priority) + _setter("protocol", protocol) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_address_prefix is not None: - pulumi.set(__self__, "destination_address_prefix", destination_address_prefix) + _setter("destination_address_prefix", destination_address_prefix) if destination_address_prefixes is not None: - pulumi.set(__self__, "destination_address_prefixes", destination_address_prefixes) + _setter("destination_address_prefixes", destination_address_prefixes) if destination_application_security_group_ids is not None: - pulumi.set(__self__, "destination_application_security_group_ids", destination_application_security_group_ids) + _setter("destination_application_security_group_ids", destination_application_security_group_ids) if destination_port_range is not None: - pulumi.set(__self__, "destination_port_range", destination_port_range) + _setter("destination_port_range", destination_port_range) if destination_port_ranges is not None: - pulumi.set(__self__, "destination_port_ranges", destination_port_ranges) + _setter("destination_port_ranges", destination_port_ranges) if source_address_prefix is not None: - pulumi.set(__self__, "source_address_prefix", source_address_prefix) + _setter("source_address_prefix", source_address_prefix) if source_address_prefixes is not None: - pulumi.set(__self__, "source_address_prefixes", source_address_prefixes) + _setter("source_address_prefixes", source_address_prefixes) if source_application_security_group_ids is not None: - pulumi.set(__self__, "source_application_security_group_ids", source_application_security_group_ids) + _setter("source_application_security_group_ids", source_application_security_group_ids) if source_port_range is not None: - pulumi.set(__self__, "source_port_range", source_port_range) + _setter("source_port_range", source_port_range) if source_port_ranges is not None: - pulumi.set(__self__, "source_port_ranges", source_port_ranges) + _setter("source_port_ranges", source_port_ranges) @property @pulumi.getter @@ -8151,8 +10796,25 @@ def __init__(__self__, *, :param pulumi.Input[int] days: The number of days to retain flow log records. :param pulumi.Input[bool] enabled: Boolean flag to enable/disable retention. """ - pulumi.set(__self__, "days", days) - pulumi.set(__self__, "enabled", enabled) + NetworkWatcherFlowLogRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[pulumi.Input[int]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("days", days) + _setter("enabled", enabled) @property @pulumi.getter @@ -8194,12 +10856,47 @@ def __init__(__self__, *, :param pulumi.Input[str] workspace_resource_id: The resource ID of the attached workspace. :param pulumi.Input[int] interval_in_minutes: How frequently service should do flow analytics in minutes. Defaults to `60`. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "workspace_id", workspace_id) - pulumi.set(__self__, "workspace_region", workspace_region) - pulumi.set(__self__, "workspace_resource_id", workspace_resource_id) + NetworkWatcherFlowLogTrafficAnalyticsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + workspace_id=workspace_id, + workspace_region=workspace_region, + workspace_resource_id=workspace_resource_id, + interval_in_minutes=interval_in_minutes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + workspace_region: Optional[pulumi.Input[str]] = None, + workspace_resource_id: Optional[pulumi.Input[str]] = None, + interval_in_minutes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if workspace_region is None and 'workspaceRegion' in kwargs: + workspace_region = kwargs['workspaceRegion'] + if workspace_region is None: + raise TypeError("Missing 'workspace_region' argument") + if workspace_resource_id is None and 'workspaceResourceId' in kwargs: + workspace_resource_id = kwargs['workspaceResourceId'] + if workspace_resource_id is None: + raise TypeError("Missing 'workspace_resource_id' argument") + if interval_in_minutes is None and 'intervalInMinutes' in kwargs: + interval_in_minutes = kwargs['intervalInMinutes'] + + _setter("enabled", enabled) + _setter("workspace_id", workspace_id) + _setter("workspace_region", workspace_region) + _setter("workspace_resource_id", workspace_resource_id) if interval_in_minutes is not None: - pulumi.set(__self__, "interval_in_minutes", interval_in_minutes) + _setter("interval_in_minutes", interval_in_minutes) @property @pulumi.getter @@ -8275,12 +10972,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] internet_security_enabled: Should Internet Security be enabled to secure internet traffic? Changing this forces a new resource to be created. Defaults to `false`. :param pulumi.Input['PointToPointVpnGatewayConnectionConfigurationRouteArgs'] route: A `route` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "vpn_client_address_pool", vpn_client_address_pool) + PointToPointVpnGatewayConnectionConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + vpn_client_address_pool=vpn_client_address_pool, + internet_security_enabled=internet_security_enabled, + route=route, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + vpn_client_address_pool: Optional[pulumi.Input['PointToPointVpnGatewayConnectionConfigurationVpnClientAddressPoolArgs']] = None, + internet_security_enabled: Optional[pulumi.Input[bool]] = None, + route: Optional[pulumi.Input['PointToPointVpnGatewayConnectionConfigurationRouteArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if vpn_client_address_pool is None and 'vpnClientAddressPool' in kwargs: + vpn_client_address_pool = kwargs['vpnClientAddressPool'] + if vpn_client_address_pool is None: + raise TypeError("Missing 'vpn_client_address_pool' argument") + if internet_security_enabled is None and 'internetSecurityEnabled' in kwargs: + internet_security_enabled = kwargs['internetSecurityEnabled'] + + _setter("name", name) + _setter("vpn_client_address_pool", vpn_client_address_pool) if internet_security_enabled is not None: - pulumi.set(__self__, "internet_security_enabled", internet_security_enabled) + _setter("internet_security_enabled", internet_security_enabled) if route is not None: - pulumi.set(__self__, "route", route) + _setter("route", route) @property @pulumi.getter @@ -8344,13 +11066,40 @@ def __init__(__self__, *, :param pulumi.Input[str] outbound_route_map_id: The resource ID of the Route Map associated with this Routing Configuration for outbound advertised routes. :param pulumi.Input['PointToPointVpnGatewayConnectionConfigurationRoutePropagatedRouteTableArgs'] propagated_route_table: A `propagated_route_table` block as defined below. """ - pulumi.set(__self__, "associated_route_table_id", associated_route_table_id) + PointToPointVpnGatewayConnectionConfigurationRouteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + associated_route_table_id=associated_route_table_id, + inbound_route_map_id=inbound_route_map_id, + outbound_route_map_id=outbound_route_map_id, + propagated_route_table=propagated_route_table, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + associated_route_table_id: Optional[pulumi.Input[str]] = None, + inbound_route_map_id: Optional[pulumi.Input[str]] = None, + outbound_route_map_id: Optional[pulumi.Input[str]] = None, + propagated_route_table: Optional[pulumi.Input['PointToPointVpnGatewayConnectionConfigurationRoutePropagatedRouteTableArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if associated_route_table_id is None and 'associatedRouteTableId' in kwargs: + associated_route_table_id = kwargs['associatedRouteTableId'] + if associated_route_table_id is None: + raise TypeError("Missing 'associated_route_table_id' argument") + if inbound_route_map_id is None and 'inboundRouteMapId' in kwargs: + inbound_route_map_id = kwargs['inboundRouteMapId'] + if outbound_route_map_id is None and 'outboundRouteMapId' in kwargs: + outbound_route_map_id = kwargs['outboundRouteMapId'] + if propagated_route_table is None and 'propagatedRouteTable' in kwargs: + propagated_route_table = kwargs['propagatedRouteTable'] + + _setter("associated_route_table_id", associated_route_table_id) if inbound_route_map_id is not None: - pulumi.set(__self__, "inbound_route_map_id", inbound_route_map_id) + _setter("inbound_route_map_id", inbound_route_map_id) if outbound_route_map_id is not None: - pulumi.set(__self__, "outbound_route_map_id", outbound_route_map_id) + _setter("outbound_route_map_id", outbound_route_map_id) if propagated_route_table is not None: - pulumi.set(__self__, "propagated_route_table", propagated_route_table) + _setter("propagated_route_table", propagated_route_table) @property @pulumi.getter(name="associatedRouteTableId") @@ -8410,9 +11159,24 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] ids: The list of Virtual Hub Route Table resource id which the routes will be propagated to. :param pulumi.Input[Sequence[pulumi.Input[str]]] labels: The list of labels to logically group Virtual Hub Route Tables which the routes will be propagated to. """ - pulumi.set(__self__, "ids", ids) + PointToPointVpnGatewayConnectionConfigurationRoutePropagatedRouteTableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ids=ids, + labels=labels, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ids is None: + raise TypeError("Missing 'ids' argument") + + _setter("ids", ids) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) @property @pulumi.getter @@ -8446,7 +11210,22 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] address_prefixes: A list of CIDR Ranges which should be used as Address Prefixes. """ - pulumi.set(__self__, "address_prefixes", address_prefixes) + PointToPointVpnGatewayConnectionConfigurationVpnClientAddressPoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefixes=address_prefixes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefixes is None and 'addressPrefixes' in kwargs: + address_prefixes = kwargs['addressPrefixes'] + if address_prefixes is None: + raise TypeError("Missing 'address_prefixes' argument") + + _setter("address_prefixes", address_prefixes) @property @pulumi.getter(name="addressPrefixes") @@ -8470,8 +11249,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ProfileContainerNetworkInterfaceIpConfigurationArgs']]] ip_configurations: One or more `ip_configuration` blocks as documented below. :param pulumi.Input[str] name: Specifies the name of the IP Configuration. """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) + ProfileContainerNetworkInterfaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ProfileContainerNetworkInterfaceIpConfigurationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("ip_configurations", ip_configurations) + _setter("name", name) @property @pulumi.getter(name="ipConfigurations") @@ -8507,8 +11305,27 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the IP Configuration. :param pulumi.Input[str] subnet_id: Reference to the subnet associated with the IP Configuration. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "subnet_id", subnet_id) + ProfileContainerNetworkInterfaceIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("name", name) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -8548,10 +11365,37 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the route filter rule. :param pulumi.Input[str] rule_type: The rule type of the rule. The only possible value is `Community`. """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "communities", communities) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "rule_type", rule_type) + RouteFilterRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + communities=communities, + name=name, + rule_type=rule_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[pulumi.Input[str]] = None, + communities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + rule_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if communities is None: + raise TypeError("Missing 'communities' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if rule_type is None and 'ruleType' in kwargs: + rule_type = kwargs['ruleType'] + if rule_type is None: + raise TypeError("Missing 'rule_type' argument") + + _setter("access", access) + _setter("communities", communities) + _setter("name", name) + _setter("rule_type", rule_type) @property @pulumi.getter @@ -8615,13 +11459,36 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['RouteMapRuleMatchCriterionArgs']]] match_criterions: A `match_criterion` block as defined below. :param pulumi.Input[str] next_step_if_matched: The next step after the rule is evaluated. Possible values are `Continue`, `Terminate` and `Unknown`. Defaults to `Unknown`. """ - pulumi.set(__self__, "name", name) + RouteMapRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + actions=actions, + match_criterions=match_criterions, + next_step_if_matched=next_step_if_matched, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + actions: Optional[pulumi.Input[Sequence[pulumi.Input['RouteMapRuleActionArgs']]]] = None, + match_criterions: Optional[pulumi.Input[Sequence[pulumi.Input['RouteMapRuleMatchCriterionArgs']]]] = None, + next_step_if_matched: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if match_criterions is None and 'matchCriterions' in kwargs: + match_criterions = kwargs['matchCriterions'] + if next_step_if_matched is None and 'nextStepIfMatched' in kwargs: + next_step_if_matched = kwargs['nextStepIfMatched'] + + _setter("name", name) if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if match_criterions is not None: - pulumi.set(__self__, "match_criterions", match_criterions) + _setter("match_criterions", match_criterions) if next_step_if_matched is not None: - pulumi.set(__self__, "next_step_if_matched", next_step_if_matched) + _setter("next_step_if_matched", next_step_if_matched) @property @pulumi.getter @@ -8681,8 +11548,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['RouteMapRuleActionParameterArgs']]] parameters: A `parameter` block as defined below. :param pulumi.Input[str] type: The type of the action to be taken. Possible values are `Add`, `Drop`, `Remove`, `Replace` and `Unknown`. """ - pulumi.set(__self__, "parameters", parameters) - pulumi.set(__self__, "type", type) + RouteMapRuleActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + parameters=parameters, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + parameters: Optional[pulumi.Input[Sequence[pulumi.Input['RouteMapRuleActionParameterArgs']]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parameters is None: + raise TypeError("Missing 'parameters' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("parameters", parameters) + _setter("type", type) @property @pulumi.getter @@ -8720,12 +11604,31 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] communities: A list of BGP communities. :param pulumi.Input[Sequence[pulumi.Input[str]]] route_prefixes: A list of route prefixes. """ + RouteMapRuleActionParameterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + as_paths=as_paths, + communities=communities, + route_prefixes=route_prefixes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + as_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + communities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + route_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if as_paths is None and 'asPaths' in kwargs: + as_paths = kwargs['asPaths'] + if route_prefixes is None and 'routePrefixes' in kwargs: + route_prefixes = kwargs['routePrefixes'] + if as_paths is not None: - pulumi.set(__self__, "as_paths", as_paths) + _setter("as_paths", as_paths) if communities is not None: - pulumi.set(__self__, "communities", communities) + _setter("communities", communities) if route_prefixes is not None: - pulumi.set(__self__, "route_prefixes", route_prefixes) + _setter("route_prefixes", route_prefixes) @property @pulumi.getter(name="asPaths") @@ -8777,13 +11680,38 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] communities: A list of BGP communities which this criterion matches. :param pulumi.Input[Sequence[pulumi.Input[str]]] route_prefixes: A list of route prefixes which this criterion matches. """ - pulumi.set(__self__, "match_condition", match_condition) + RouteMapRuleMatchCriterionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_condition=match_condition, + as_paths=as_paths, + communities=communities, + route_prefixes=route_prefixes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_condition: Optional[pulumi.Input[str]] = None, + as_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + communities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + route_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_condition is None and 'matchCondition' in kwargs: + match_condition = kwargs['matchCondition'] + if match_condition is None: + raise TypeError("Missing 'match_condition' argument") + if as_paths is None and 'asPaths' in kwargs: + as_paths = kwargs['asPaths'] + if route_prefixes is None and 'routePrefixes' in kwargs: + route_prefixes = kwargs['routePrefixes'] + + _setter("match_condition", match_condition) if as_paths is not None: - pulumi.set(__self__, "as_paths", as_paths) + _setter("as_paths", as_paths) if communities is not None: - pulumi.set(__self__, "communities", communities) + _setter("communities", communities) if route_prefixes is not None: - pulumi.set(__self__, "route_prefixes", route_prefixes) + _setter("route_prefixes", route_prefixes) @property @pulumi.getter(name="matchCondition") @@ -8847,11 +11775,40 @@ def __init__(__self__, *, :param pulumi.Input[str] next_hop_type: The type of Azure hop the packet should be sent to. Possible values are `VirtualNetworkGateway`, `VnetLocal`, `Internet`, `VirtualAppliance` and `None`. :param pulumi.Input[str] next_hop_in_ip_address: Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is `VirtualAppliance`. """ - pulumi.set(__self__, "address_prefix", address_prefix) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "next_hop_type", next_hop_type) + RouteTableRouteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix=address_prefix, + name=name, + next_hop_type=next_hop_type, + next_hop_in_ip_address=next_hop_in_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + next_hop_type: Optional[pulumi.Input[str]] = None, + next_hop_in_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix is None and 'addressPrefix' in kwargs: + address_prefix = kwargs['addressPrefix'] + if address_prefix is None: + raise TypeError("Missing 'address_prefix' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if next_hop_type is None and 'nextHopType' in kwargs: + next_hop_type = kwargs['nextHopType'] + if next_hop_type is None: + raise TypeError("Missing 'next_hop_type' argument") + if next_hop_in_ip_address is None and 'nextHopInIpAddress' in kwargs: + next_hop_in_ip_address = kwargs['nextHopInIpAddress'] + + _setter("address_prefix", address_prefix) + _setter("name", name) + _setter("next_hop_type", next_hop_type) if next_hop_in_ip_address is not None: - pulumi.set(__self__, "next_hop_in_ip_address", next_hop_in_ip_address) + _setter("next_hop_in_ip_address", next_hop_in_ip_address) @property @pulumi.getter(name="addressPrefix") @@ -8913,9 +11870,32 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The unique name for the routing policy. :param pulumi.Input[str] next_hop: The resource ID of the next hop on which this routing policy is applicable to. """ - pulumi.set(__self__, "destinations", destinations) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "next_hop", next_hop) + RoutingIntentRoutingPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destinations=destinations, + name=name, + next_hop=next_hop, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destinations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + next_hop: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destinations is None: + raise TypeError("Missing 'destinations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if next_hop is None and 'nextHop' in kwargs: + next_hop = kwargs['nextHop'] + if next_hop is None: + raise TypeError("Missing 'next_hop' argument") + + _setter("destinations", destinations) + _setter("name", name) + _setter("next_hop", next_hop) @property @pulumi.getter @@ -8963,8 +11943,27 @@ def __init__(__self__, *, :param pulumi.Input[str] name: A name for this delegation. :param pulumi.Input['SubnetDelegationServiceDelegationArgs'] service_delegation: A `service_delegation` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "service_delegation", service_delegation) + SubnetDelegationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + service_delegation=service_delegation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + service_delegation: Optional[pulumi.Input['SubnetDelegationServiceDelegationArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if service_delegation is None and 'serviceDelegation' in kwargs: + service_delegation = kwargs['serviceDelegation'] + if service_delegation is None: + raise TypeError("Missing 'service_delegation' argument") + + _setter("name", name) + _setter("service_delegation", service_delegation) @property @pulumi.getter @@ -9002,9 +12001,24 @@ def __init__(__self__, *, > **NOTE:** Azure may add default actions depending on the service delegation name and they can't be changed. """ - pulumi.set(__self__, "name", name) + SubnetDelegationServiceDelegationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + actions=actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) @property @pulumi.getter @@ -9048,12 +12062,35 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of this Subnet Service Endpoint Storage Policy Definition. :param pulumi.Input[str] service: The type of service resources. Valid values are `Microsoft.Storage` or `Global`. When the `service_resources` property contains resource IDs, this property must be `Microsoft.Storage`. When the `service_resources` property contains Aliases, this property must be `Global`. Defaults to `Microsoft.Storage`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "service_resources", service_resources) + SubnetServiceEndpointStoragePolicyDefinitionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + service_resources=service_resources, + description=description, + service=service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + service_resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + service: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if service_resources is None and 'serviceResources' in kwargs: + service_resources = kwargs['serviceResources'] + if service_resources is None: + raise TypeError("Missing 'service_resources' argument") + + _setter("name", name) + _setter("service_resources", service_resources) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if service is not None: - pulumi.set(__self__, "service", service) + _setter("service", service) @property @pulumi.getter @@ -9115,8 +12152,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the custom header. :param pulumi.Input[str] value: The value of custom header. Applicable for HTTP and HTTPS protocol. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + TrafficManagerAzureEndpointCustomHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -9154,11 +12208,28 @@ def __init__(__self__, *, :param pulumi.Input[str] last: The last IP Address in this subnet. :param pulumi.Input[int] scope: The block size (number of leading bits in the subnet mask). """ - pulumi.set(__self__, "first", first) + TrafficManagerAzureEndpointSubnetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + first=first, + last=last, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + first: Optional[pulumi.Input[str]] = None, + last: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if first is None: + raise TypeError("Missing 'first' argument") + + _setter("first", first) if last is not None: - pulumi.set(__self__, "last", last) + _setter("last", last) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter @@ -9206,8 +12277,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the custom header. :param pulumi.Input[str] value: The value of custom header. Applicable for HTTP and HTTPS protocol. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + TrafficManagerExternalEndpointCustomHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -9245,11 +12333,28 @@ def __init__(__self__, *, :param pulumi.Input[str] last: The last IP Address in this subnet. :param pulumi.Input[int] scope: The block size (number of leading bits in the subnet mask). """ - pulumi.set(__self__, "first", first) + TrafficManagerExternalEndpointSubnetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + first=first, + last=last, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + first: Optional[pulumi.Input[str]] = None, + last: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if first is None: + raise TypeError("Missing 'first' argument") + + _setter("first", first) if last is not None: - pulumi.set(__self__, "last", last) + _setter("last", last) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter @@ -9297,8 +12402,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the custom header. :param pulumi.Input[str] value: The value of custom header. Applicable for HTTP and HTTPS protocol. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + TrafficManagerNestedEndpointCustomHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -9336,11 +12458,28 @@ def __init__(__self__, *, :param pulumi.Input[str] last: The last IP Address in this subnet. :param pulumi.Input[int] scope: The block size (number of leading bits in the subnet mask). """ - pulumi.set(__self__, "first", first) + TrafficManagerNestedEndpointSubnetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + first=first, + last=last, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + first: Optional[pulumi.Input[str]] = None, + last: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if first is None: + raise TypeError("Missing 'first' argument") + + _setter("first", first) if last is not None: - pulumi.set(__self__, "last", last) + _setter("last", last) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter @@ -9388,8 +12527,27 @@ def __init__(__self__, *, :param pulumi.Input[str] relative_name: The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created. :param pulumi.Input[int] ttl: The TTL value of the Profile used by Local DNS resolvers and clients. """ - pulumi.set(__self__, "relative_name", relative_name) - pulumi.set(__self__, "ttl", ttl) + TrafficManagerProfileDnsConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + relative_name=relative_name, + ttl=ttl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + relative_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if relative_name is None and 'relativeName' in kwargs: + relative_name = kwargs['relativeName'] + if relative_name is None: + raise TypeError("Missing 'relative_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + + _setter("relative_name", relative_name) + _setter("ttl", ttl) @property @pulumi.getter(name="relativeName") @@ -9437,20 +12595,59 @@ def __init__(__self__, *, :param pulumi.Input[int] timeout_in_seconds: The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If `interval_in_seconds` is set to `30`, then `timeout_in_seconds` can be between `5` and `10`. The default value is `10`. If `interval_in_seconds` is set to `10`, then valid values are between `5` and `9` and `timeout_in_seconds` is required. :param pulumi.Input[int] tolerated_number_of_failures: The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between `0` and `9`. The default value is `3` """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "protocol", protocol) + TrafficManagerProfileMonitorConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + protocol=protocol, + custom_headers=custom_headers, + expected_status_code_ranges=expected_status_code_ranges, + interval_in_seconds=interval_in_seconds, + path=path, + timeout_in_seconds=timeout_in_seconds, + tolerated_number_of_failures=tolerated_number_of_failures, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + custom_headers: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerProfileMonitorConfigCustomHeaderArgs']]]] = None, + expected_status_code_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + interval_in_seconds: Optional[pulumi.Input[int]] = None, + path: Optional[pulumi.Input[str]] = None, + timeout_in_seconds: Optional[pulumi.Input[int]] = None, + tolerated_number_of_failures: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + if expected_status_code_ranges is None and 'expectedStatusCodeRanges' in kwargs: + expected_status_code_ranges = kwargs['expectedStatusCodeRanges'] + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + if tolerated_number_of_failures is None and 'toleratedNumberOfFailures' in kwargs: + tolerated_number_of_failures = kwargs['toleratedNumberOfFailures'] + + _setter("port", port) + _setter("protocol", protocol) if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if expected_status_code_ranges is not None: - pulumi.set(__self__, "expected_status_code_ranges", expected_status_code_ranges) + _setter("expected_status_code_ranges", expected_status_code_ranges) if interval_in_seconds is not None: - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) + _setter("interval_in_seconds", interval_in_seconds) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) if tolerated_number_of_failures is not None: - pulumi.set(__self__, "tolerated_number_of_failures", tolerated_number_of_failures) + _setter("tolerated_number_of_failures", tolerated_number_of_failures) @property @pulumi.getter @@ -9558,8 +12755,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the custom header. :param pulumi.Input[str] value: The value of custom header. Applicable for HTTP and HTTPS protocol. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + TrafficManagerProfileMonitorConfigCustomHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -9603,18 +12817,51 @@ def __init__(__self__, *, :param pulumi.Input[str] static_vnet_local_route_override_criteria: The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet. Possible values are `Contains` and `Equal`. Defaults to `Contains`. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['VirtualHubConnectionRoutingStaticVnetRouteArgs']]] static_vnet_routes: A `static_vnet_route` block as defined below. """ + VirtualHubConnectionRoutingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + associated_route_table_id=associated_route_table_id, + inbound_route_map_id=inbound_route_map_id, + outbound_route_map_id=outbound_route_map_id, + propagated_route_table=propagated_route_table, + static_vnet_local_route_override_criteria=static_vnet_local_route_override_criteria, + static_vnet_routes=static_vnet_routes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + associated_route_table_id: Optional[pulumi.Input[str]] = None, + inbound_route_map_id: Optional[pulumi.Input[str]] = None, + outbound_route_map_id: Optional[pulumi.Input[str]] = None, + propagated_route_table: Optional[pulumi.Input['VirtualHubConnectionRoutingPropagatedRouteTableArgs']] = None, + static_vnet_local_route_override_criteria: Optional[pulumi.Input[str]] = None, + static_vnet_routes: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualHubConnectionRoutingStaticVnetRouteArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if associated_route_table_id is None and 'associatedRouteTableId' in kwargs: + associated_route_table_id = kwargs['associatedRouteTableId'] + if inbound_route_map_id is None and 'inboundRouteMapId' in kwargs: + inbound_route_map_id = kwargs['inboundRouteMapId'] + if outbound_route_map_id is None and 'outboundRouteMapId' in kwargs: + outbound_route_map_id = kwargs['outboundRouteMapId'] + if propagated_route_table is None and 'propagatedRouteTable' in kwargs: + propagated_route_table = kwargs['propagatedRouteTable'] + if static_vnet_local_route_override_criteria is None and 'staticVnetLocalRouteOverrideCriteria' in kwargs: + static_vnet_local_route_override_criteria = kwargs['staticVnetLocalRouteOverrideCriteria'] + if static_vnet_routes is None and 'staticVnetRoutes' in kwargs: + static_vnet_routes = kwargs['staticVnetRoutes'] + if associated_route_table_id is not None: - pulumi.set(__self__, "associated_route_table_id", associated_route_table_id) + _setter("associated_route_table_id", associated_route_table_id) if inbound_route_map_id is not None: - pulumi.set(__self__, "inbound_route_map_id", inbound_route_map_id) + _setter("inbound_route_map_id", inbound_route_map_id) if outbound_route_map_id is not None: - pulumi.set(__self__, "outbound_route_map_id", outbound_route_map_id) + _setter("outbound_route_map_id", outbound_route_map_id) if propagated_route_table is not None: - pulumi.set(__self__, "propagated_route_table", propagated_route_table) + _setter("propagated_route_table", propagated_route_table) if static_vnet_local_route_override_criteria is not None: - pulumi.set(__self__, "static_vnet_local_route_override_criteria", static_vnet_local_route_override_criteria) + _setter("static_vnet_local_route_override_criteria", static_vnet_local_route_override_criteria) if static_vnet_routes is not None: - pulumi.set(__self__, "static_vnet_routes", static_vnet_routes) + _setter("static_vnet_routes", static_vnet_routes) @property @pulumi.getter(name="associatedRouteTableId") @@ -9698,10 +12945,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] labels: The list of labels to assign to this route table. :param pulumi.Input[Sequence[pulumi.Input[str]]] route_table_ids: A list of Route Table IDs to associated with this Virtual Hub Connection. """ + VirtualHubConnectionRoutingPropagatedRouteTableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + labels=labels, + route_table_ids=route_table_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + route_table_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if route_table_ids is None and 'routeTableIds' in kwargs: + route_table_ids = kwargs['routeTableIds'] + if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if route_table_ids is not None: - pulumi.set(__self__, "route_table_ids", route_table_ids) + _setter("route_table_ids", route_table_ids) @property @pulumi.getter @@ -9739,12 +13001,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Static Route. :param pulumi.Input[str] next_hop_ip_address: The IP Address which should be used for the Next Hop. """ + VirtualHubConnectionRoutingStaticVnetRouteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefixes=address_prefixes, + name=name, + next_hop_ip_address=next_hop_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + next_hop_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefixes is None and 'addressPrefixes' in kwargs: + address_prefixes = kwargs['addressPrefixes'] + if next_hop_ip_address is None and 'nextHopIpAddress' in kwargs: + next_hop_ip_address = kwargs['nextHopIpAddress'] + if address_prefixes is not None: - pulumi.set(__self__, "address_prefixes", address_prefixes) + _setter("address_prefixes", address_prefixes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if next_hop_ip_address is not None: - pulumi.set(__self__, "next_hop_ip_address", next_hop_ip_address) + _setter("next_hop_ip_address", next_hop_ip_address) @property @pulumi.getter(name="addressPrefixes") @@ -9792,8 +13073,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] address_prefixes: A list of Address Prefixes. :param pulumi.Input[str] next_hop_ip_address: The IP Address that Packets should be forwarded to as the Next Hop. """ - pulumi.set(__self__, "address_prefixes", address_prefixes) - pulumi.set(__self__, "next_hop_ip_address", next_hop_ip_address) + VirtualHubRouteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefixes=address_prefixes, + next_hop_ip_address=next_hop_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + next_hop_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefixes is None and 'addressPrefixes' in kwargs: + address_prefixes = kwargs['addressPrefixes'] + if address_prefixes is None: + raise TypeError("Missing 'address_prefixes' argument") + if next_hop_ip_address is None and 'nextHopIpAddress' in kwargs: + next_hop_ip_address = kwargs['nextHopIpAddress'] + if next_hop_ip_address is None: + raise TypeError("Missing 'next_hop_ip_address' argument") + + _setter("address_prefixes", address_prefixes) + _setter("next_hop_ip_address", next_hop_ip_address) @property @pulumi.getter(name="addressPrefixes") @@ -9837,12 +13139,45 @@ def __init__(__self__, *, > **Note:** The Routes can alternatively be created using the virtual_hub_route_table_route resource. Using both inline and external routes is not supported and may result in unexpected configuration. """ - pulumi.set(__self__, "destinations", destinations) - pulumi.set(__self__, "destinations_type", destinations_type) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "next_hop", next_hop) + VirtualHubRouteTableRouteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destinations=destinations, + destinations_type=destinations_type, + name=name, + next_hop=next_hop, + next_hop_type=next_hop_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destinations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destinations_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + next_hop: Optional[pulumi.Input[str]] = None, + next_hop_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destinations is None: + raise TypeError("Missing 'destinations' argument") + if destinations_type is None and 'destinationsType' in kwargs: + destinations_type = kwargs['destinationsType'] + if destinations_type is None: + raise TypeError("Missing 'destinations_type' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if next_hop is None and 'nextHop' in kwargs: + next_hop = kwargs['nextHop'] + if next_hop is None: + raise TypeError("Missing 'next_hop' argument") + if next_hop_type is None and 'nextHopType' in kwargs: + next_hop_type = kwargs['nextHopType'] + + _setter("destinations", destinations) + _setter("destinations_type", destinations_type) + _setter("name", name) + _setter("next_hop", next_hop) if next_hop_type is not None: - pulumi.set(__self__, "next_hop_type", next_hop_type) + _setter("next_hop_type", next_hop_type) @property @pulumi.getter @@ -9916,8 +13251,25 @@ def __init__(__self__, *, :param pulumi.Input[bool] enable: Enable/disable DDoS Protection Plan on Virtual Network. :param pulumi.Input[str] id: The ID of DDoS Protection Plan. """ - pulumi.set(__self__, "enable", enable) - pulumi.set(__self__, "id", id) + VirtualNetworkDdosProtectionPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enable=enable, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enable: Optional[pulumi.Input[bool]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enable is None: + raise TypeError("Missing 'enable' argument") + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("enable", enable) + _setter("id", id) @property @pulumi.getter @@ -9951,7 +13303,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] enforcement: Specifies if the encrypted Virtual Network allows VM that does not support encryption. Possible values are `DropUnencrypted` and `AllowUnencrypted`. """ - pulumi.set(__self__, "enforcement", enforcement) + VirtualNetworkEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enforcement=enforcement, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enforcement: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enforcement is None: + raise TypeError("Missing 'enforcement' argument") + + _setter("enforcement", enforcement) @property @pulumi.getter @@ -9977,12 +13342,31 @@ def __init__(__self__, *, :param pulumi.Input[int] peer_weight: The weight added to routes which have been learned through BGP peering. Valid values can be between `0` and `100`. :param pulumi.Input[Sequence[pulumi.Input['VirtualNetworkGatewayBgpSettingsPeeringAddressArgs']]] peering_addresses: A list of `peering_addresses` as defined below. Only one `peering_addresses` block can be specified except when `active_active` of this Virtual Network Gateway is `true`. """ + VirtualNetworkGatewayBgpSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + asn=asn, + peer_weight=peer_weight, + peering_addresses=peering_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asn: Optional[pulumi.Input[int]] = None, + peer_weight: Optional[pulumi.Input[int]] = None, + peering_addresses: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualNetworkGatewayBgpSettingsPeeringAddressArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if peer_weight is None and 'peerWeight' in kwargs: + peer_weight = kwargs['peerWeight'] + if peering_addresses is None and 'peeringAddresses' in kwargs: + peering_addresses = kwargs['peeringAddresses'] + if asn is not None: - pulumi.set(__self__, "asn", asn) + _setter("asn", asn) if peer_weight is not None: - pulumi.set(__self__, "peer_weight", peer_weight) + _setter("peer_weight", peer_weight) if peering_addresses is not None: - pulumi.set(__self__, "peering_addresses", peering_addresses) + _setter("peering_addresses", peering_addresses) @property @pulumi.getter @@ -10036,14 +13420,39 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_configuration_name: The name of the IP configuration of this Virtual Network Gateway. In case there are multiple `ip_configuration` blocks defined, this property is **required** to specify. :param pulumi.Input[Sequence[pulumi.Input[str]]] tunnel_ip_addresses: A list of tunnel IP addresses assigned to the BGP peer of the Virtual Network Gateway. """ + VirtualNetworkGatewayBgpSettingsPeeringAddressArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + apipa_addresses=apipa_addresses, + default_addresses=default_addresses, + ip_configuration_name=ip_configuration_name, + tunnel_ip_addresses=tunnel_ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + apipa_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ip_configuration_name: Optional[pulumi.Input[str]] = None, + tunnel_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if apipa_addresses is None and 'apipaAddresses' in kwargs: + apipa_addresses = kwargs['apipaAddresses'] + if default_addresses is None and 'defaultAddresses' in kwargs: + default_addresses = kwargs['defaultAddresses'] + if ip_configuration_name is None and 'ipConfigurationName' in kwargs: + ip_configuration_name = kwargs['ipConfigurationName'] + if tunnel_ip_addresses is None and 'tunnelIpAddresses' in kwargs: + tunnel_ip_addresses = kwargs['tunnelIpAddresses'] + if apipa_addresses is not None: - pulumi.set(__self__, "apipa_addresses", apipa_addresses) + _setter("apipa_addresses", apipa_addresses) if default_addresses is not None: - pulumi.set(__self__, "default_addresses", default_addresses) + _setter("default_addresses", default_addresses) if ip_configuration_name is not None: - pulumi.set(__self__, "ip_configuration_name", ip_configuration_name) + _setter("ip_configuration_name", ip_configuration_name) if tunnel_ip_addresses is not None: - pulumi.set(__self__, "tunnel_ip_addresses", tunnel_ip_addresses) + _setter("tunnel_ip_addresses", tunnel_ip_addresses) @property @pulumi.getter(name="apipaAddresses") @@ -10105,9 +13514,24 @@ def __init__(__self__, *, :param pulumi.Input[str] primary: single IP address that is part of the `network.VirtualNetworkGateway` ip_configuration (first one) :param pulumi.Input[str] secondary: single IP address that is part of the `network.VirtualNetworkGateway` ip_configuration (second one) """ - pulumi.set(__self__, "primary", primary) + VirtualNetworkGatewayConnectionCustomBgpAddressesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + primary=primary, + secondary=secondary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + primary: Optional[pulumi.Input[str]] = None, + secondary: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary is None: + raise TypeError("Missing 'primary' argument") + + _setter("primary", primary) if secondary is not None: - pulumi.set(__self__, "secondary", secondary) + _setter("secondary", secondary) @property @pulumi.getter @@ -10157,16 +13581,69 @@ def __init__(__self__, *, :param pulumi.Input[int] sa_datasize: The IPSec SA payload size in KB. Must be at least `1024` KB. Defaults to `102400000` KB. :param pulumi.Input[int] sa_lifetime: The IPSec SA lifetime in seconds. Must be at least `300` seconds. Defaults to `27000` seconds. """ - pulumi.set(__self__, "dh_group", dh_group) - pulumi.set(__self__, "ike_encryption", ike_encryption) - pulumi.set(__self__, "ike_integrity", ike_integrity) - pulumi.set(__self__, "ipsec_encryption", ipsec_encryption) - pulumi.set(__self__, "ipsec_integrity", ipsec_integrity) - pulumi.set(__self__, "pfs_group", pfs_group) + VirtualNetworkGatewayConnectionIpsecPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dh_group=dh_group, + ike_encryption=ike_encryption, + ike_integrity=ike_integrity, + ipsec_encryption=ipsec_encryption, + ipsec_integrity=ipsec_integrity, + pfs_group=pfs_group, + sa_datasize=sa_datasize, + sa_lifetime=sa_lifetime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dh_group: Optional[pulumi.Input[str]] = None, + ike_encryption: Optional[pulumi.Input[str]] = None, + ike_integrity: Optional[pulumi.Input[str]] = None, + ipsec_encryption: Optional[pulumi.Input[str]] = None, + ipsec_integrity: Optional[pulumi.Input[str]] = None, + pfs_group: Optional[pulumi.Input[str]] = None, + sa_datasize: Optional[pulumi.Input[int]] = None, + sa_lifetime: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dh_group is None and 'dhGroup' in kwargs: + dh_group = kwargs['dhGroup'] + if dh_group is None: + raise TypeError("Missing 'dh_group' argument") + if ike_encryption is None and 'ikeEncryption' in kwargs: + ike_encryption = kwargs['ikeEncryption'] + if ike_encryption is None: + raise TypeError("Missing 'ike_encryption' argument") + if ike_integrity is None and 'ikeIntegrity' in kwargs: + ike_integrity = kwargs['ikeIntegrity'] + if ike_integrity is None: + raise TypeError("Missing 'ike_integrity' argument") + if ipsec_encryption is None and 'ipsecEncryption' in kwargs: + ipsec_encryption = kwargs['ipsecEncryption'] + if ipsec_encryption is None: + raise TypeError("Missing 'ipsec_encryption' argument") + if ipsec_integrity is None and 'ipsecIntegrity' in kwargs: + ipsec_integrity = kwargs['ipsecIntegrity'] + if ipsec_integrity is None: + raise TypeError("Missing 'ipsec_integrity' argument") + if pfs_group is None and 'pfsGroup' in kwargs: + pfs_group = kwargs['pfsGroup'] + if pfs_group is None: + raise TypeError("Missing 'pfs_group' argument") + if sa_datasize is None and 'saDatasize' in kwargs: + sa_datasize = kwargs['saDatasize'] + if sa_lifetime is None and 'saLifetime' in kwargs: + sa_lifetime = kwargs['saLifetime'] + + _setter("dh_group", dh_group) + _setter("ike_encryption", ike_encryption) + _setter("ike_integrity", ike_integrity) + _setter("ipsec_encryption", ipsec_encryption) + _setter("ipsec_integrity", ipsec_integrity) + _setter("pfs_group", pfs_group) if sa_datasize is not None: - pulumi.set(__self__, "sa_datasize", sa_datasize) + _setter("sa_datasize", sa_datasize) if sa_lifetime is not None: - pulumi.set(__self__, "sa_lifetime", sa_lifetime) + _setter("sa_lifetime", sa_lifetime) @property @pulumi.getter(name="dhGroup") @@ -10276,8 +13753,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] local_address_cidrs: List of local CIDRs. :param pulumi.Input[Sequence[pulumi.Input[str]]] remote_address_cidrs: List of remote CIDRs. """ - pulumi.set(__self__, "local_address_cidrs", local_address_cidrs) - pulumi.set(__self__, "remote_address_cidrs", remote_address_cidrs) + VirtualNetworkGatewayConnectionTrafficSelectorPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + local_address_cidrs=local_address_cidrs, + remote_address_cidrs=remote_address_cidrs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + local_address_cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + remote_address_cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_address_cidrs is None and 'localAddressCidrs' in kwargs: + local_address_cidrs = kwargs['localAddressCidrs'] + if local_address_cidrs is None: + raise TypeError("Missing 'local_address_cidrs' argument") + if remote_address_cidrs is None and 'remoteAddressCidrs' in kwargs: + remote_address_cidrs = kwargs['remoteAddressCidrs'] + if remote_address_cidrs is None: + raise TypeError("Missing 'remote_address_cidrs' argument") + + _setter("local_address_cidrs", local_address_cidrs) + _setter("remote_address_cidrs", remote_address_cidrs) @property @pulumi.getter(name="localAddressCidrs") @@ -10311,8 +13809,21 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] address_prefixes: A list of address blocks reserved for this virtual network in CIDR notation as defined below. """ + VirtualNetworkGatewayCustomRouteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefixes=address_prefixes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefixes is None and 'addressPrefixes' in kwargs: + address_prefixes = kwargs['addressPrefixes'] + if address_prefixes is not None: - pulumi.set(__self__, "address_prefixes", address_prefixes) + _setter("address_prefixes", address_prefixes) @property @pulumi.getter(name="addressPrefixes") @@ -10340,12 +13851,39 @@ def __init__(__self__, *, :param pulumi.Input[str] name: A user-defined name of the IP configuration. Defaults to `vnetGatewayConfig`. :param pulumi.Input[str] private_ip_address_allocation: Defines how the private IP address of the gateways virtual interface is assigned. Valid options are `Static` or `Dynamic`. Defaults to `Dynamic`. """ - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) + VirtualNetworkGatewayIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + name=name, + private_ip_address_allocation=private_ip_address_allocation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_ip_address_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_ip_address_allocation: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_ip_address_allocation is not None: - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) + _setter("private_ip_address_allocation", private_ip_address_allocation) @property @pulumi.getter(name="publicIpAddressId") @@ -10405,9 +13943,28 @@ def __init__(__self__, *, :param pulumi.Input[str] address_space: The string CIDR representing the address space for the Virtual Network Gateway Nat Rule external mapping. :param pulumi.Input[str] port_range: The single port range for the Virtual Network Gateway Nat Rule external mapping. """ - pulumi.set(__self__, "address_space", address_space) + VirtualNetworkGatewayNatRuleExternalMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_space=address_space, + port_range=port_range, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_space: Optional[pulumi.Input[str]] = None, + port_range: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_space is None and 'addressSpace' in kwargs: + address_space = kwargs['addressSpace'] + if address_space is None: + raise TypeError("Missing 'address_space' argument") + if port_range is None and 'portRange' in kwargs: + port_range = kwargs['portRange'] + + _setter("address_space", address_space) if port_range is not None: - pulumi.set(__self__, "port_range", port_range) + _setter("port_range", port_range) @property @pulumi.getter(name="addressSpace") @@ -10443,9 +14000,28 @@ def __init__(__self__, *, :param pulumi.Input[str] address_space: The string CIDR representing the address space for the Virtual Network Gateway Nat Rule internal mapping. :param pulumi.Input[str] port_range: The single port range for the Virtual Network Gateway Nat Rule internal mapping. """ - pulumi.set(__self__, "address_space", address_space) + VirtualNetworkGatewayNatRuleInternalMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_space=address_space, + port_range=port_range, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_space: Optional[pulumi.Input[str]] = None, + port_range: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_space is None and 'addressSpace' in kwargs: + address_space = kwargs['addressSpace'] + if address_space is None: + raise TypeError("Missing 'address_space' argument") + if port_range is None and 'portRange' in kwargs: + port_range = kwargs['portRange'] + + _setter("address_space", address_space) if port_range is not None: - pulumi.set(__self__, "port_range", port_range) + _setter("port_range", port_range) @property @pulumi.getter(name="addressSpace") @@ -10504,25 +14080,76 @@ def __init__(__self__, *, Values `SSTP` and `IkeV2` are incompatible with the use of `aad_tenant`, `aad_audience` and `aad_issuer`. """ - pulumi.set(__self__, "address_spaces", address_spaces) + VirtualNetworkGatewayVpnClientConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_spaces=address_spaces, + aad_audience=aad_audience, + aad_issuer=aad_issuer, + aad_tenant=aad_tenant, + radius_server_address=radius_server_address, + radius_server_secret=radius_server_secret, + revoked_certificates=revoked_certificates, + root_certificates=root_certificates, + vpn_auth_types=vpn_auth_types, + vpn_client_protocols=vpn_client_protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_spaces: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + aad_audience: Optional[pulumi.Input[str]] = None, + aad_issuer: Optional[pulumi.Input[str]] = None, + aad_tenant: Optional[pulumi.Input[str]] = None, + radius_server_address: Optional[pulumi.Input[str]] = None, + radius_server_secret: Optional[pulumi.Input[str]] = None, + revoked_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualNetworkGatewayVpnClientConfigurationRevokedCertificateArgs']]]] = None, + root_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualNetworkGatewayVpnClientConfigurationRootCertificateArgs']]]] = None, + vpn_auth_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + vpn_client_protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_spaces is None and 'addressSpaces' in kwargs: + address_spaces = kwargs['addressSpaces'] + if address_spaces is None: + raise TypeError("Missing 'address_spaces' argument") + if aad_audience is None and 'aadAudience' in kwargs: + aad_audience = kwargs['aadAudience'] + if aad_issuer is None and 'aadIssuer' in kwargs: + aad_issuer = kwargs['aadIssuer'] + if aad_tenant is None and 'aadTenant' in kwargs: + aad_tenant = kwargs['aadTenant'] + if radius_server_address is None and 'radiusServerAddress' in kwargs: + radius_server_address = kwargs['radiusServerAddress'] + if radius_server_secret is None and 'radiusServerSecret' in kwargs: + radius_server_secret = kwargs['radiusServerSecret'] + if revoked_certificates is None and 'revokedCertificates' in kwargs: + revoked_certificates = kwargs['revokedCertificates'] + if root_certificates is None and 'rootCertificates' in kwargs: + root_certificates = kwargs['rootCertificates'] + if vpn_auth_types is None and 'vpnAuthTypes' in kwargs: + vpn_auth_types = kwargs['vpnAuthTypes'] + if vpn_client_protocols is None and 'vpnClientProtocols' in kwargs: + vpn_client_protocols = kwargs['vpnClientProtocols'] + + _setter("address_spaces", address_spaces) if aad_audience is not None: - pulumi.set(__self__, "aad_audience", aad_audience) + _setter("aad_audience", aad_audience) if aad_issuer is not None: - pulumi.set(__self__, "aad_issuer", aad_issuer) + _setter("aad_issuer", aad_issuer) if aad_tenant is not None: - pulumi.set(__self__, "aad_tenant", aad_tenant) + _setter("aad_tenant", aad_tenant) if radius_server_address is not None: - pulumi.set(__self__, "radius_server_address", radius_server_address) + _setter("radius_server_address", radius_server_address) if radius_server_secret is not None: - pulumi.set(__self__, "radius_server_secret", radius_server_secret) + _setter("radius_server_secret", radius_server_secret) if revoked_certificates is not None: - pulumi.set(__self__, "revoked_certificates", revoked_certificates) + _setter("revoked_certificates", revoked_certificates) if root_certificates is not None: - pulumi.set(__self__, "root_certificates", root_certificates) + _setter("root_certificates", root_certificates) if vpn_auth_types is not None: - pulumi.set(__self__, "vpn_auth_types", vpn_auth_types) + _setter("vpn_auth_types", vpn_auth_types) if vpn_client_protocols is not None: - pulumi.set(__self__, "vpn_client_protocols", vpn_client_protocols) + _setter("vpn_client_protocols", vpn_client_protocols) @property @pulumi.getter(name="addressSpaces") @@ -10661,8 +14288,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the certificate resource. :param pulumi.Input[str] thumbprint: Specifies the public data of the certificate. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "thumbprint", thumbprint) + VirtualNetworkGatewayVpnClientConfigurationRevokedCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + + _setter("name", name) + _setter("thumbprint", thumbprint) @property @pulumi.getter @@ -10698,8 +14342,27 @@ def __init__(__self__, *, :param pulumi.Input[str] name: A user-defined name of the root certificate. :param pulumi.Input[str] public_cert_data: The public certificate of the root certificate authority. The certificate must be provided in Base-64 encoded X.509 format (PEM). In particular, this argument *must not* include the `-----BEGIN CERTIFICATE-----` or `-----END CERTIFICATE-----` markers. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_cert_data", public_cert_data) + VirtualNetworkGatewayVpnClientConfigurationRootCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + public_cert_data=public_cert_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + public_cert_data: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if public_cert_data is None and 'publicCertData' in kwargs: + public_cert_data = kwargs['publicCertData'] + if public_cert_data is None: + raise TypeError("Missing 'public_cert_data' argument") + + _setter("name", name) + _setter("public_cert_data", public_cert_data) @property @pulumi.getter @@ -10739,12 +14402,37 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of DDoS Protection Plan. :param pulumi.Input[str] security_group: The Network Security Group to associate with the subnet. (Referenced by `id`, ie. `azurerm_network_security_group.example.id`) """ - pulumi.set(__self__, "address_prefix", address_prefix) - pulumi.set(__self__, "name", name) + VirtualNetworkSubnetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix=address_prefix, + name=name, + id=id, + security_group=security_group, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + security_group: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix is None and 'addressPrefix' in kwargs: + address_prefix = kwargs['addressPrefix'] + if address_prefix is None: + raise TypeError("Missing 'address_prefix' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if security_group is None and 'securityGroup' in kwargs: + security_group = kwargs['securityGroup'] + + _setter("address_prefix", address_prefix) + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if security_group is not None: - pulumi.set(__self__, "security_group", security_group) + _setter("security_group", security_group) @property @pulumi.getter(name="addressPrefix") @@ -10804,9 +14492,28 @@ def __init__(__self__, *, :param pulumi.Input[str] address_space: The string CIDR representing the address space for the VPN Gateway Nat Rule external mapping. :param pulumi.Input[str] port_range: The single port range for the VPN Gateway Nat Rule external mapping. """ - pulumi.set(__self__, "address_space", address_space) + VnpGatewayNatRuleExternalMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_space=address_space, + port_range=port_range, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_space: Optional[pulumi.Input[str]] = None, + port_range: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_space is None and 'addressSpace' in kwargs: + address_space = kwargs['addressSpace'] + if address_space is None: + raise TypeError("Missing 'address_space' argument") + if port_range is None and 'portRange' in kwargs: + port_range = kwargs['portRange'] + + _setter("address_space", address_space) if port_range is not None: - pulumi.set(__self__, "port_range", port_range) + _setter("port_range", port_range) @property @pulumi.getter(name="addressSpace") @@ -10842,9 +14549,28 @@ def __init__(__self__, *, :param pulumi.Input[str] address_space: The string CIDR representing the address space for the VPN Gateway Nat Rule internal mapping. :param pulumi.Input[str] port_range: The single port range for the VPN Gateway Nat Rule internal mapping. """ - pulumi.set(__self__, "address_space", address_space) + VnpGatewayNatRuleInternalMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_space=address_space, + port_range=port_range, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_space: Optional[pulumi.Input[str]] = None, + port_range: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_space is None and 'addressSpace' in kwargs: + address_space = kwargs['addressSpace'] + if address_space is None: + raise TypeError("Missing 'address_space' argument") + if port_range is None and 'portRange' in kwargs: + port_range = kwargs['portRange'] + + _setter("address_space", address_space) if port_range is not None: - pulumi.set(__self__, "port_range", port_range) + _setter("port_range", port_range) @property @pulumi.getter(name="addressSpace") @@ -10886,14 +14612,45 @@ def __init__(__self__, *, :param pulumi.Input['VpnGatewayBgpSettingsInstance0BgpPeeringAddressArgs'] instance0_bgp_peering_address: An `instance_bgp_peering_address` block as defined below. :param pulumi.Input['VpnGatewayBgpSettingsInstance1BgpPeeringAddressArgs'] instance1_bgp_peering_address: An `instance_bgp_peering_address` block as defined below. """ - pulumi.set(__self__, "asn", asn) - pulumi.set(__self__, "peer_weight", peer_weight) + VpnGatewayBgpSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + asn=asn, + peer_weight=peer_weight, + bgp_peering_address=bgp_peering_address, + instance0_bgp_peering_address=instance0_bgp_peering_address, + instance1_bgp_peering_address=instance1_bgp_peering_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asn: Optional[pulumi.Input[int]] = None, + peer_weight: Optional[pulumi.Input[int]] = None, + bgp_peering_address: Optional[pulumi.Input[str]] = None, + instance0_bgp_peering_address: Optional[pulumi.Input['VpnGatewayBgpSettingsInstance0BgpPeeringAddressArgs']] = None, + instance1_bgp_peering_address: Optional[pulumi.Input['VpnGatewayBgpSettingsInstance1BgpPeeringAddressArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if asn is None: + raise TypeError("Missing 'asn' argument") + if peer_weight is None and 'peerWeight' in kwargs: + peer_weight = kwargs['peerWeight'] + if peer_weight is None: + raise TypeError("Missing 'peer_weight' argument") + if bgp_peering_address is None and 'bgpPeeringAddress' in kwargs: + bgp_peering_address = kwargs['bgpPeeringAddress'] + if instance0_bgp_peering_address is None and 'instance0BgpPeeringAddress' in kwargs: + instance0_bgp_peering_address = kwargs['instance0BgpPeeringAddress'] + if instance1_bgp_peering_address is None and 'instance1BgpPeeringAddress' in kwargs: + instance1_bgp_peering_address = kwargs['instance1BgpPeeringAddress'] + + _setter("asn", asn) + _setter("peer_weight", peer_weight) if bgp_peering_address is not None: - pulumi.set(__self__, "bgp_peering_address", bgp_peering_address) + _setter("bgp_peering_address", bgp_peering_address) if instance0_bgp_peering_address is not None: - pulumi.set(__self__, "instance0_bgp_peering_address", instance0_bgp_peering_address) + _setter("instance0_bgp_peering_address", instance0_bgp_peering_address) if instance1_bgp_peering_address is not None: - pulumi.set(__self__, "instance1_bgp_peering_address", instance1_bgp_peering_address) + _setter("instance1_bgp_peering_address", instance1_bgp_peering_address) @property @pulumi.getter @@ -10969,13 +14726,40 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_configuration_id: The pre-defined id of VPN Gateway IP Configuration. :param pulumi.Input[Sequence[pulumi.Input[str]]] tunnel_ips: The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration. """ - pulumi.set(__self__, "custom_ips", custom_ips) + VpnGatewayBgpSettingsInstance0BgpPeeringAddressArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_ips=custom_ips, + default_ips=default_ips, + ip_configuration_id=ip_configuration_id, + tunnel_ips=tunnel_ips, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ip_configuration_id: Optional[pulumi.Input[str]] = None, + tunnel_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_ips is None and 'customIps' in kwargs: + custom_ips = kwargs['customIps'] + if custom_ips is None: + raise TypeError("Missing 'custom_ips' argument") + if default_ips is None and 'defaultIps' in kwargs: + default_ips = kwargs['defaultIps'] + if ip_configuration_id is None and 'ipConfigurationId' in kwargs: + ip_configuration_id = kwargs['ipConfigurationId'] + if tunnel_ips is None and 'tunnelIps' in kwargs: + tunnel_ips = kwargs['tunnelIps'] + + _setter("custom_ips", custom_ips) if default_ips is not None: - pulumi.set(__self__, "default_ips", default_ips) + _setter("default_ips", default_ips) if ip_configuration_id is not None: - pulumi.set(__self__, "ip_configuration_id", ip_configuration_id) + _setter("ip_configuration_id", ip_configuration_id) if tunnel_ips is not None: - pulumi.set(__self__, "tunnel_ips", tunnel_ips) + _setter("tunnel_ips", tunnel_ips) @property @pulumi.getter(name="customIps") @@ -11039,13 +14823,40 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_configuration_id: The pre-defined id of VPN Gateway IP Configuration. :param pulumi.Input[Sequence[pulumi.Input[str]]] tunnel_ips: The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration. """ - pulumi.set(__self__, "custom_ips", custom_ips) + VpnGatewayBgpSettingsInstance1BgpPeeringAddressArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_ips=custom_ips, + default_ips=default_ips, + ip_configuration_id=ip_configuration_id, + tunnel_ips=tunnel_ips, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ip_configuration_id: Optional[pulumi.Input[str]] = None, + tunnel_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_ips is None and 'customIps' in kwargs: + custom_ips = kwargs['customIps'] + if custom_ips is None: + raise TypeError("Missing 'custom_ips' argument") + if default_ips is None and 'defaultIps' in kwargs: + default_ips = kwargs['defaultIps'] + if ip_configuration_id is None and 'ipConfigurationId' in kwargs: + ip_configuration_id = kwargs['ipConfigurationId'] + if tunnel_ips is None and 'tunnelIps' in kwargs: + tunnel_ips = kwargs['tunnelIps'] + + _setter("custom_ips", custom_ips) if default_ips is not None: - pulumi.set(__self__, "default_ips", default_ips) + _setter("default_ips", default_ips) if ip_configuration_id is not None: - pulumi.set(__self__, "ip_configuration_id", ip_configuration_id) + _setter("ip_configuration_id", ip_configuration_id) if tunnel_ips is not None: - pulumi.set(__self__, "tunnel_ips", tunnel_ips) + _setter("tunnel_ips", tunnel_ips) @property @pulumi.getter(name="customIps") @@ -11109,13 +14920,40 @@ def __init__(__self__, *, :param pulumi.Input[str] outbound_route_map_id: The resource ID of the Route Map associated with this Routing Configuration for outbound advertised routes. :param pulumi.Input['VpnGatewayConnectionRoutingPropagatedRouteTableArgs'] propagated_route_table: A `propagated_route_table` block as defined below. """ - pulumi.set(__self__, "associated_route_table", associated_route_table) + VpnGatewayConnectionRoutingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + associated_route_table=associated_route_table, + inbound_route_map_id=inbound_route_map_id, + outbound_route_map_id=outbound_route_map_id, + propagated_route_table=propagated_route_table, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + associated_route_table: Optional[pulumi.Input[str]] = None, + inbound_route_map_id: Optional[pulumi.Input[str]] = None, + outbound_route_map_id: Optional[pulumi.Input[str]] = None, + propagated_route_table: Optional[pulumi.Input['VpnGatewayConnectionRoutingPropagatedRouteTableArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if associated_route_table is None and 'associatedRouteTable' in kwargs: + associated_route_table = kwargs['associatedRouteTable'] + if associated_route_table is None: + raise TypeError("Missing 'associated_route_table' argument") + if inbound_route_map_id is None and 'inboundRouteMapId' in kwargs: + inbound_route_map_id = kwargs['inboundRouteMapId'] + if outbound_route_map_id is None and 'outboundRouteMapId' in kwargs: + outbound_route_map_id = kwargs['outboundRouteMapId'] + if propagated_route_table is None and 'propagatedRouteTable' in kwargs: + propagated_route_table = kwargs['propagatedRouteTable'] + + _setter("associated_route_table", associated_route_table) if inbound_route_map_id is not None: - pulumi.set(__self__, "inbound_route_map_id", inbound_route_map_id) + _setter("inbound_route_map_id", inbound_route_map_id) if outbound_route_map_id is not None: - pulumi.set(__self__, "outbound_route_map_id", outbound_route_map_id) + _setter("outbound_route_map_id", outbound_route_map_id) if propagated_route_table is not None: - pulumi.set(__self__, "propagated_route_table", propagated_route_table) + _setter("propagated_route_table", propagated_route_table) @property @pulumi.getter(name="associatedRouteTable") @@ -11175,9 +15013,26 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] route_table_ids: A list of Route Table IDs to associated with this VPN Gateway Connection. :param pulumi.Input[Sequence[pulumi.Input[str]]] labels: A list of labels to assign to this route table. """ - pulumi.set(__self__, "route_table_ids", route_table_ids) + VpnGatewayConnectionRoutingPropagatedRouteTableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + route_table_ids=route_table_ids, + labels=labels, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + route_table_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if route_table_ids is None and 'routeTableIds' in kwargs: + route_table_ids = kwargs['routeTableIds'] + if route_table_ids is None: + raise TypeError("Missing 'route_table_ids' argument") + + _setter("route_table_ids", route_table_ids) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) @property @pulumi.getter(name="routeTableIds") @@ -11213,8 +15068,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] local_address_ranges: A list of local address spaces in CIDR format for this VPN Gateway Connection. :param pulumi.Input[Sequence[pulumi.Input[str]]] remote_address_ranges: A list of remote address spaces in CIDR format for this VPN Gateway Connection. """ - pulumi.set(__self__, "local_address_ranges", local_address_ranges) - pulumi.set(__self__, "remote_address_ranges", remote_address_ranges) + VpnGatewayConnectionTrafficSelectorPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + local_address_ranges=local_address_ranges, + remote_address_ranges=remote_address_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + local_address_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + remote_address_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_address_ranges is None and 'localAddressRanges' in kwargs: + local_address_ranges = kwargs['localAddressRanges'] + if local_address_ranges is None: + raise TypeError("Missing 'local_address_ranges' argument") + if remote_address_ranges is None and 'remoteAddressRanges' in kwargs: + remote_address_ranges = kwargs['remoteAddressRanges'] + if remote_address_ranges is None: + raise TypeError("Missing 'remote_address_ranges' argument") + + _setter("local_address_ranges", local_address_ranges) + _setter("remote_address_ranges", remote_address_ranges) @property @pulumi.getter(name="localAddressRanges") @@ -11276,34 +15152,103 @@ def __init__(__self__, *, :param pulumi.Input[int] route_weight: Routing weight for this VPN Link Connection. Defaults to `0`. :param pulumi.Input[str] shared_key: SharedKey for this VPN Link Connection. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "vpn_site_link_id", vpn_site_link_id) + VpnGatewayConnectionVpnLinkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + vpn_site_link_id=vpn_site_link_id, + bandwidth_mbps=bandwidth_mbps, + bgp_enabled=bgp_enabled, + connection_mode=connection_mode, + custom_bgp_addresses=custom_bgp_addresses, + egress_nat_rule_ids=egress_nat_rule_ids, + ingress_nat_rule_ids=ingress_nat_rule_ids, + ipsec_policies=ipsec_policies, + local_azure_ip_address_enabled=local_azure_ip_address_enabled, + policy_based_traffic_selector_enabled=policy_based_traffic_selector_enabled, + protocol=protocol, + ratelimit_enabled=ratelimit_enabled, + route_weight=route_weight, + shared_key=shared_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + vpn_site_link_id: Optional[pulumi.Input[str]] = None, + bandwidth_mbps: Optional[pulumi.Input[int]] = None, + bgp_enabled: Optional[pulumi.Input[bool]] = None, + connection_mode: Optional[pulumi.Input[str]] = None, + custom_bgp_addresses: Optional[pulumi.Input[Sequence[pulumi.Input['VpnGatewayConnectionVpnLinkCustomBgpAddressArgs']]]] = None, + egress_nat_rule_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ingress_nat_rule_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ipsec_policies: Optional[pulumi.Input[Sequence[pulumi.Input['VpnGatewayConnectionVpnLinkIpsecPolicyArgs']]]] = None, + local_azure_ip_address_enabled: Optional[pulumi.Input[bool]] = None, + policy_based_traffic_selector_enabled: Optional[pulumi.Input[bool]] = None, + protocol: Optional[pulumi.Input[str]] = None, + ratelimit_enabled: Optional[pulumi.Input[bool]] = None, + route_weight: Optional[pulumi.Input[int]] = None, + shared_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if vpn_site_link_id is None and 'vpnSiteLinkId' in kwargs: + vpn_site_link_id = kwargs['vpnSiteLinkId'] + if vpn_site_link_id is None: + raise TypeError("Missing 'vpn_site_link_id' argument") + if bandwidth_mbps is None and 'bandwidthMbps' in kwargs: + bandwidth_mbps = kwargs['bandwidthMbps'] + if bgp_enabled is None and 'bgpEnabled' in kwargs: + bgp_enabled = kwargs['bgpEnabled'] + if connection_mode is None and 'connectionMode' in kwargs: + connection_mode = kwargs['connectionMode'] + if custom_bgp_addresses is None and 'customBgpAddresses' in kwargs: + custom_bgp_addresses = kwargs['customBgpAddresses'] + if egress_nat_rule_ids is None and 'egressNatRuleIds' in kwargs: + egress_nat_rule_ids = kwargs['egressNatRuleIds'] + if ingress_nat_rule_ids is None and 'ingressNatRuleIds' in kwargs: + ingress_nat_rule_ids = kwargs['ingressNatRuleIds'] + if ipsec_policies is None and 'ipsecPolicies' in kwargs: + ipsec_policies = kwargs['ipsecPolicies'] + if local_azure_ip_address_enabled is None and 'localAzureIpAddressEnabled' in kwargs: + local_azure_ip_address_enabled = kwargs['localAzureIpAddressEnabled'] + if policy_based_traffic_selector_enabled is None and 'policyBasedTrafficSelectorEnabled' in kwargs: + policy_based_traffic_selector_enabled = kwargs['policyBasedTrafficSelectorEnabled'] + if ratelimit_enabled is None and 'ratelimitEnabled' in kwargs: + ratelimit_enabled = kwargs['ratelimitEnabled'] + if route_weight is None and 'routeWeight' in kwargs: + route_weight = kwargs['routeWeight'] + if shared_key is None and 'sharedKey' in kwargs: + shared_key = kwargs['sharedKey'] + + _setter("name", name) + _setter("vpn_site_link_id", vpn_site_link_id) if bandwidth_mbps is not None: - pulumi.set(__self__, "bandwidth_mbps", bandwidth_mbps) + _setter("bandwidth_mbps", bandwidth_mbps) if bgp_enabled is not None: - pulumi.set(__self__, "bgp_enabled", bgp_enabled) + _setter("bgp_enabled", bgp_enabled) if connection_mode is not None: - pulumi.set(__self__, "connection_mode", connection_mode) + _setter("connection_mode", connection_mode) if custom_bgp_addresses is not None: - pulumi.set(__self__, "custom_bgp_addresses", custom_bgp_addresses) + _setter("custom_bgp_addresses", custom_bgp_addresses) if egress_nat_rule_ids is not None: - pulumi.set(__self__, "egress_nat_rule_ids", egress_nat_rule_ids) + _setter("egress_nat_rule_ids", egress_nat_rule_ids) if ingress_nat_rule_ids is not None: - pulumi.set(__self__, "ingress_nat_rule_ids", ingress_nat_rule_ids) + _setter("ingress_nat_rule_ids", ingress_nat_rule_ids) if ipsec_policies is not None: - pulumi.set(__self__, "ipsec_policies", ipsec_policies) + _setter("ipsec_policies", ipsec_policies) if local_azure_ip_address_enabled is not None: - pulumi.set(__self__, "local_azure_ip_address_enabled", local_azure_ip_address_enabled) + _setter("local_azure_ip_address_enabled", local_azure_ip_address_enabled) if policy_based_traffic_selector_enabled is not None: - pulumi.set(__self__, "policy_based_traffic_selector_enabled", policy_based_traffic_selector_enabled) + _setter("policy_based_traffic_selector_enabled", policy_based_traffic_selector_enabled) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if ratelimit_enabled is not None: - pulumi.set(__self__, "ratelimit_enabled", ratelimit_enabled) + _setter("ratelimit_enabled", ratelimit_enabled) if route_weight is not None: - pulumi.set(__self__, "route_weight", route_weight) + _setter("route_weight", route_weight) if shared_key is not None: - pulumi.set(__self__, "shared_key", shared_key) + _setter("shared_key", shared_key) @property @pulumi.getter @@ -11495,8 +15440,29 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_address: The custom bgp ip address which belongs to the IP Configuration. :param pulumi.Input[str] ip_configuration_id: The ID of the IP Configuration which belongs to the VPN Gateway. """ - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "ip_configuration_id", ip_configuration_id) + VpnGatewayConnectionVpnLinkCustomBgpAddressArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_address=ip_address, + ip_configuration_id=ip_configuration_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_address: Optional[pulumi.Input[str]] = None, + ip_configuration_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if ip_configuration_id is None and 'ipConfigurationId' in kwargs: + ip_configuration_id = kwargs['ipConfigurationId'] + if ip_configuration_id is None: + raise TypeError("Missing 'ip_configuration_id' argument") + + _setter("ip_address", ip_address) + _setter("ip_configuration_id", ip_configuration_id) @property @pulumi.getter(name="ipAddress") @@ -11544,14 +15510,71 @@ def __init__(__self__, *, :param pulumi.Input[int] sa_data_size_kb: The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for the site to site VPN tunnel. :param pulumi.Input[int] sa_lifetime_sec: The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for the site to site VPN tunnel. """ - pulumi.set(__self__, "dh_group", dh_group) - pulumi.set(__self__, "encryption_algorithm", encryption_algorithm) - pulumi.set(__self__, "ike_encryption_algorithm", ike_encryption_algorithm) - pulumi.set(__self__, "ike_integrity_algorithm", ike_integrity_algorithm) - pulumi.set(__self__, "integrity_algorithm", integrity_algorithm) - pulumi.set(__self__, "pfs_group", pfs_group) - pulumi.set(__self__, "sa_data_size_kb", sa_data_size_kb) - pulumi.set(__self__, "sa_lifetime_sec", sa_lifetime_sec) + VpnGatewayConnectionVpnLinkIpsecPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dh_group=dh_group, + encryption_algorithm=encryption_algorithm, + ike_encryption_algorithm=ike_encryption_algorithm, + ike_integrity_algorithm=ike_integrity_algorithm, + integrity_algorithm=integrity_algorithm, + pfs_group=pfs_group, + sa_data_size_kb=sa_data_size_kb, + sa_lifetime_sec=sa_lifetime_sec, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dh_group: Optional[pulumi.Input[str]] = None, + encryption_algorithm: Optional[pulumi.Input[str]] = None, + ike_encryption_algorithm: Optional[pulumi.Input[str]] = None, + ike_integrity_algorithm: Optional[pulumi.Input[str]] = None, + integrity_algorithm: Optional[pulumi.Input[str]] = None, + pfs_group: Optional[pulumi.Input[str]] = None, + sa_data_size_kb: Optional[pulumi.Input[int]] = None, + sa_lifetime_sec: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dh_group is None and 'dhGroup' in kwargs: + dh_group = kwargs['dhGroup'] + if dh_group is None: + raise TypeError("Missing 'dh_group' argument") + if encryption_algorithm is None and 'encryptionAlgorithm' in kwargs: + encryption_algorithm = kwargs['encryptionAlgorithm'] + if encryption_algorithm is None: + raise TypeError("Missing 'encryption_algorithm' argument") + if ike_encryption_algorithm is None and 'ikeEncryptionAlgorithm' in kwargs: + ike_encryption_algorithm = kwargs['ikeEncryptionAlgorithm'] + if ike_encryption_algorithm is None: + raise TypeError("Missing 'ike_encryption_algorithm' argument") + if ike_integrity_algorithm is None and 'ikeIntegrityAlgorithm' in kwargs: + ike_integrity_algorithm = kwargs['ikeIntegrityAlgorithm'] + if ike_integrity_algorithm is None: + raise TypeError("Missing 'ike_integrity_algorithm' argument") + if integrity_algorithm is None and 'integrityAlgorithm' in kwargs: + integrity_algorithm = kwargs['integrityAlgorithm'] + if integrity_algorithm is None: + raise TypeError("Missing 'integrity_algorithm' argument") + if pfs_group is None and 'pfsGroup' in kwargs: + pfs_group = kwargs['pfsGroup'] + if pfs_group is None: + raise TypeError("Missing 'pfs_group' argument") + if sa_data_size_kb is None and 'saDataSizeKb' in kwargs: + sa_data_size_kb = kwargs['saDataSizeKb'] + if sa_data_size_kb is None: + raise TypeError("Missing 'sa_data_size_kb' argument") + if sa_lifetime_sec is None and 'saLifetimeSec' in kwargs: + sa_lifetime_sec = kwargs['saLifetimeSec'] + if sa_lifetime_sec is None: + raise TypeError("Missing 'sa_lifetime_sec' argument") + + _setter("dh_group", dh_group) + _setter("encryption_algorithm", encryption_algorithm) + _setter("ike_encryption_algorithm", ike_encryption_algorithm) + _setter("ike_integrity_algorithm", ike_integrity_algorithm) + _setter("integrity_algorithm", integrity_algorithm) + _setter("pfs_group", pfs_group) + _setter("sa_data_size_kb", sa_data_size_kb) + _setter("sa_lifetime_sec", sa_lifetime_sec) @property @pulumi.getter(name="dhGroup") @@ -11661,9 +15684,30 @@ def __init__(__self__, *, :param pulumi.Input[str] issuer: The Issuer which should be used for authentication. :param pulumi.Input[str] tenant: The Tenant which should be used for authentication. """ - pulumi.set(__self__, "audience", audience) - pulumi.set(__self__, "issuer", issuer) - pulumi.set(__self__, "tenant", tenant) + VpnServerConfigurationAzureActiveDirectoryAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + audience=audience, + issuer=issuer, + tenant=tenant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audience: Optional[pulumi.Input[str]] = None, + issuer: Optional[pulumi.Input[str]] = None, + tenant: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audience is None: + raise TypeError("Missing 'audience' argument") + if issuer is None: + raise TypeError("Missing 'issuer' argument") + if tenant is None: + raise TypeError("Missing 'tenant' argument") + + _setter("audience", audience) + _setter("issuer", issuer) + _setter("tenant", tenant) @property @pulumi.getter @@ -11711,8 +15755,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: A name used to uniquely identify this certificate. :param pulumi.Input[str] thumbprint: The Thumbprint of the Certificate. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "thumbprint", thumbprint) + VpnServerConfigurationClientRevokedCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + + _setter("name", name) + _setter("thumbprint", thumbprint) @property @pulumi.getter @@ -11748,8 +15809,27 @@ def __init__(__self__, *, :param pulumi.Input[str] name: A name used to uniquely identify this certificate. :param pulumi.Input[str] public_cert_data: The Public Key Data associated with the Certificate. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_cert_data", public_cert_data) + VpnServerConfigurationClientRootCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + public_cert_data=public_cert_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + public_cert_data: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if public_cert_data is None and 'publicCertData' in kwargs: + public_cert_data = kwargs['publicCertData'] + if public_cert_data is None: + raise TypeError("Missing 'public_cert_data' argument") + + _setter("name", name) + _setter("public_cert_data", public_cert_data) @property @pulumi.getter @@ -11797,14 +15877,71 @@ def __init__(__self__, *, :param pulumi.Input[int] sa_data_size_kilobytes: The IPSec Security Association payload size in KB for a Site-to-Site VPN tunnel. :param pulumi.Input[int] sa_lifetime_seconds: The IPSec Security Association lifetime in seconds for a Site-to-Site VPN tunnel. """ - pulumi.set(__self__, "dh_group", dh_group) - pulumi.set(__self__, "ike_encryption", ike_encryption) - pulumi.set(__self__, "ike_integrity", ike_integrity) - pulumi.set(__self__, "ipsec_encryption", ipsec_encryption) - pulumi.set(__self__, "ipsec_integrity", ipsec_integrity) - pulumi.set(__self__, "pfs_group", pfs_group) - pulumi.set(__self__, "sa_data_size_kilobytes", sa_data_size_kilobytes) - pulumi.set(__self__, "sa_lifetime_seconds", sa_lifetime_seconds) + VpnServerConfigurationIpsecPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dh_group=dh_group, + ike_encryption=ike_encryption, + ike_integrity=ike_integrity, + ipsec_encryption=ipsec_encryption, + ipsec_integrity=ipsec_integrity, + pfs_group=pfs_group, + sa_data_size_kilobytes=sa_data_size_kilobytes, + sa_lifetime_seconds=sa_lifetime_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dh_group: Optional[pulumi.Input[str]] = None, + ike_encryption: Optional[pulumi.Input[str]] = None, + ike_integrity: Optional[pulumi.Input[str]] = None, + ipsec_encryption: Optional[pulumi.Input[str]] = None, + ipsec_integrity: Optional[pulumi.Input[str]] = None, + pfs_group: Optional[pulumi.Input[str]] = None, + sa_data_size_kilobytes: Optional[pulumi.Input[int]] = None, + sa_lifetime_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dh_group is None and 'dhGroup' in kwargs: + dh_group = kwargs['dhGroup'] + if dh_group is None: + raise TypeError("Missing 'dh_group' argument") + if ike_encryption is None and 'ikeEncryption' in kwargs: + ike_encryption = kwargs['ikeEncryption'] + if ike_encryption is None: + raise TypeError("Missing 'ike_encryption' argument") + if ike_integrity is None and 'ikeIntegrity' in kwargs: + ike_integrity = kwargs['ikeIntegrity'] + if ike_integrity is None: + raise TypeError("Missing 'ike_integrity' argument") + if ipsec_encryption is None and 'ipsecEncryption' in kwargs: + ipsec_encryption = kwargs['ipsecEncryption'] + if ipsec_encryption is None: + raise TypeError("Missing 'ipsec_encryption' argument") + if ipsec_integrity is None and 'ipsecIntegrity' in kwargs: + ipsec_integrity = kwargs['ipsecIntegrity'] + if ipsec_integrity is None: + raise TypeError("Missing 'ipsec_integrity' argument") + if pfs_group is None and 'pfsGroup' in kwargs: + pfs_group = kwargs['pfsGroup'] + if pfs_group is None: + raise TypeError("Missing 'pfs_group' argument") + if sa_data_size_kilobytes is None and 'saDataSizeKilobytes' in kwargs: + sa_data_size_kilobytes = kwargs['saDataSizeKilobytes'] + if sa_data_size_kilobytes is None: + raise TypeError("Missing 'sa_data_size_kilobytes' argument") + if sa_lifetime_seconds is None and 'saLifetimeSeconds' in kwargs: + sa_lifetime_seconds = kwargs['saLifetimeSeconds'] + if sa_lifetime_seconds is None: + raise TypeError("Missing 'sa_lifetime_seconds' argument") + + _setter("dh_group", dh_group) + _setter("ike_encryption", ike_encryption) + _setter("ike_integrity", ike_integrity) + _setter("ipsec_encryption", ipsec_encryption) + _setter("ipsec_integrity", ipsec_integrity) + _setter("pfs_group", pfs_group) + _setter("sa_data_size_kilobytes", sa_data_size_kilobytes) + _setter("sa_lifetime_seconds", sa_lifetime_seconds) @property @pulumi.getter(name="dhGroup") @@ -11914,9 +16051,30 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The attribute type of the VPN Server Configuration Policy member. Possible values are `AADGroupId`, `CertificateGroupId` and `RadiusAzureGroupId`. :param pulumi.Input[str] value: The value of the attribute that is used for the VPN Server Configuration Policy member. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + VpnServerConfigurationPolicyGroupPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -11966,12 +16124,31 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['VpnServerConfigurationRadiusServerRootCertificateArgs']]] server_root_certificates: One or more `server_root_certificate` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['VpnServerConfigurationRadiusServerArgs']]] servers: One or more `server` blocks as defined below. """ + VpnServerConfigurationRadiusArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_root_certificates=client_root_certificates, + server_root_certificates=server_root_certificates, + servers=servers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_root_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['VpnServerConfigurationRadiusClientRootCertificateArgs']]]] = None, + server_root_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['VpnServerConfigurationRadiusServerRootCertificateArgs']]]] = None, + servers: Optional[pulumi.Input[Sequence[pulumi.Input['VpnServerConfigurationRadiusServerArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_root_certificates is None and 'clientRootCertificates' in kwargs: + client_root_certificates = kwargs['clientRootCertificates'] + if server_root_certificates is None and 'serverRootCertificates' in kwargs: + server_root_certificates = kwargs['serverRootCertificates'] + if client_root_certificates is not None: - pulumi.set(__self__, "client_root_certificates", client_root_certificates) + _setter("client_root_certificates", client_root_certificates) if server_root_certificates is not None: - pulumi.set(__self__, "server_root_certificates", server_root_certificates) + _setter("server_root_certificates", server_root_certificates) if servers is not None: - pulumi.set(__self__, "servers", servers) + _setter("servers", servers) @property @pulumi.getter(name="clientRootCertificates") @@ -12019,8 +16196,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: A name used to uniquely identify this certificate. :param pulumi.Input[str] thumbprint: The Thumbprint of the Certificate. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "thumbprint", thumbprint) + VpnServerConfigurationRadiusClientRootCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + + _setter("name", name) + _setter("thumbprint", thumbprint) @property @pulumi.getter @@ -12058,9 +16252,30 @@ def __init__(__self__, *, :param pulumi.Input[int] score: The Score of the Radius Server determines the priority of the server. Ranges from 1 to 30. :param pulumi.Input[str] secret: The Secret used to communicate with the Radius Server. """ - pulumi.set(__self__, "address", address) - pulumi.set(__self__, "score", score) - pulumi.set(__self__, "secret", secret) + VpnServerConfigurationRadiusServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + score=score, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: Optional[pulumi.Input[str]] = None, + score: Optional[pulumi.Input[int]] = None, + secret: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address is None: + raise TypeError("Missing 'address' argument") + if score is None: + raise TypeError("Missing 'score' argument") + if secret is None: + raise TypeError("Missing 'secret' argument") + + _setter("address", address) + _setter("score", score) + _setter("secret", secret) @property @pulumi.getter @@ -12108,8 +16323,27 @@ def __init__(__self__, *, :param pulumi.Input[str] name: A name used to uniquely identify this certificate. :param pulumi.Input[str] public_cert_data: The Public Key Data associated with the Certificate. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_cert_data", public_cert_data) + VpnServerConfigurationRadiusServerRootCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + public_cert_data=public_cert_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + public_cert_data: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if public_cert_data is None and 'publicCertData' in kwargs: + public_cert_data = kwargs['publicCertData'] + if public_cert_data is None: + raise TypeError("Missing 'public_cert_data' argument") + + _setter("name", name) + _setter("public_cert_data", public_cert_data) @property @pulumi.getter @@ -12159,19 +16393,50 @@ def __init__(__self__, *, :param pulumi.Input[str] provider_name: The name of the physical link at the VPN Site. Example: `ATT`, `Verizon`. :param pulumi.Input[int] speed_in_mbps: The speed of the VPN device at the branch location in unit of mbps. Defaults to `0`. """ - pulumi.set(__self__, "name", name) + VpnSiteLinkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + bgp=bgp, + fqdn=fqdn, + id=id, + ip_address=ip_address, + provider_name=provider_name, + speed_in_mbps=speed_in_mbps, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + bgp: Optional[pulumi.Input['VpnSiteLinkBgpArgs']] = None, + fqdn: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + ip_address: Optional[pulumi.Input[str]] = None, + provider_name: Optional[pulumi.Input[str]] = None, + speed_in_mbps: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if provider_name is None and 'providerName' in kwargs: + provider_name = kwargs['providerName'] + if speed_in_mbps is None and 'speedInMbps' in kwargs: + speed_in_mbps = kwargs['speedInMbps'] + + _setter("name", name) if bgp is not None: - pulumi.set(__self__, "bgp", bgp) + _setter("bgp", bgp) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if provider_name is not None: - pulumi.set(__self__, "provider_name", provider_name) + _setter("provider_name", provider_name) if speed_in_mbps is not None: - pulumi.set(__self__, "speed_in_mbps", speed_in_mbps) + _setter("speed_in_mbps", speed_in_mbps) @property @pulumi.getter @@ -12271,8 +16536,27 @@ def __init__(__self__, *, :param pulumi.Input[int] asn: The BGP speaker's ASN. :param pulumi.Input[str] peering_address: The BGP peering IP address. """ - pulumi.set(__self__, "asn", asn) - pulumi.set(__self__, "peering_address", peering_address) + VpnSiteLinkBgpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + asn=asn, + peering_address=peering_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asn: Optional[pulumi.Input[int]] = None, + peering_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if asn is None: + raise TypeError("Missing 'asn' argument") + if peering_address is None and 'peeringAddress' in kwargs: + peering_address = kwargs['peeringAddress'] + if peering_address is None: + raise TypeError("Missing 'peering_address' argument") + + _setter("asn", asn) + _setter("peering_address", peering_address) @property @pulumi.getter @@ -12306,8 +16590,21 @@ def __init__(__self__, *, """ :param pulumi.Input['VpnSiteO365PolicyTrafficCategoryArgs'] traffic_category: A `traffic_category` block as defined above. """ + VpnSiteO365PolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + traffic_category=traffic_category, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + traffic_category: Optional[pulumi.Input['VpnSiteO365PolicyTrafficCategoryArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if traffic_category is None and 'trafficCategory' in kwargs: + traffic_category = kwargs['trafficCategory'] + if traffic_category is not None: - pulumi.set(__self__, "traffic_category", traffic_category) + _setter("traffic_category", traffic_category) @property @pulumi.getter(name="trafficCategory") @@ -12333,12 +16630,33 @@ def __init__(__self__, *, :param pulumi.Input[bool] default_endpoint_enabled: Is default endpoint enabled? The `Default` endpoint represents O365 services and dependencies that do not require any optimization, and can be treated by customer networks as normal Internet bound traffic. Defaults to `false`. :param pulumi.Input[bool] optimize_endpoint_enabled: Is optimize endpoint enabled? The `Optimize` endpoint is required for connectivity to every O365 service and represents the O365 scenario that is the most sensitive to network performance, latency, and availability. Defaults to `false`. """ + VpnSiteO365PolicyTrafficCategoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_endpoint_enabled=allow_endpoint_enabled, + default_endpoint_enabled=default_endpoint_enabled, + optimize_endpoint_enabled=optimize_endpoint_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + default_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + optimize_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_endpoint_enabled is None and 'allowEndpointEnabled' in kwargs: + allow_endpoint_enabled = kwargs['allowEndpointEnabled'] + if default_endpoint_enabled is None and 'defaultEndpointEnabled' in kwargs: + default_endpoint_enabled = kwargs['defaultEndpointEnabled'] + if optimize_endpoint_enabled is None and 'optimizeEndpointEnabled' in kwargs: + optimize_endpoint_enabled = kwargs['optimizeEndpointEnabled'] + if allow_endpoint_enabled is not None: - pulumi.set(__self__, "allow_endpoint_enabled", allow_endpoint_enabled) + _setter("allow_endpoint_enabled", allow_endpoint_enabled) if default_endpoint_enabled is not None: - pulumi.set(__self__, "default_endpoint_enabled", default_endpoint_enabled) + _setter("default_endpoint_enabled", default_endpoint_enabled) if optimize_endpoint_enabled is not None: - pulumi.set(__self__, "optimize_endpoint_enabled", optimize_endpoint_enabled) + _setter("optimize_endpoint_enabled", optimize_endpoint_enabled) @property @pulumi.getter(name="allowEndpointEnabled") diff --git a/sdk/python/pulumi_azure/network/application_gateway.py b/sdk/python/pulumi_azure/network/application_gateway.py index c39ac5b9a9..f547fe1ed5 100644 --- a/sdk/python/pulumi_azure/network/application_gateway.py +++ b/sdk/python/pulumi_azure/network/application_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -87,63 +87,208 @@ def __init__(__self__, *, > **Please Note**: Availability Zones are not supported in all regions at this time, please check the [official documentation](https://docs.microsoft.com/azure/availability-zones/az-overview) for more information. They are also only supported for [v2 SKUs](https://docs.microsoft.com/azure/application-gateway/application-gateway-autoscaling-zone-redundant) """ - pulumi.set(__self__, "backend_address_pools", backend_address_pools) - pulumi.set(__self__, "backend_http_settings", backend_http_settings) - pulumi.set(__self__, "frontend_ip_configurations", frontend_ip_configurations) - pulumi.set(__self__, "frontend_ports", frontend_ports) - pulumi.set(__self__, "gateway_ip_configurations", gateway_ip_configurations) - pulumi.set(__self__, "http_listeners", http_listeners) - pulumi.set(__self__, "request_routing_rules", request_routing_rules) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + ApplicationGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_address_pools=backend_address_pools, + backend_http_settings=backend_http_settings, + frontend_ip_configurations=frontend_ip_configurations, + frontend_ports=frontend_ports, + gateway_ip_configurations=gateway_ip_configurations, + http_listeners=http_listeners, + request_routing_rules=request_routing_rules, + resource_group_name=resource_group_name, + sku=sku, + authentication_certificates=authentication_certificates, + autoscale_configuration=autoscale_configuration, + custom_error_configurations=custom_error_configurations, + enable_http2=enable_http2, + fips_enabled=fips_enabled, + firewall_policy_id=firewall_policy_id, + force_firewall_policy_association=force_firewall_policy_association, + global_=global_, + identity=identity, + location=location, + name=name, + private_link_configurations=private_link_configurations, + probes=probes, + redirect_configurations=redirect_configurations, + rewrite_rule_sets=rewrite_rule_sets, + ssl_certificates=ssl_certificates, + ssl_policy=ssl_policy, + ssl_profiles=ssl_profiles, + tags=tags, + trusted_client_certificates=trusted_client_certificates, + trusted_root_certificates=trusted_root_certificates, + url_path_maps=url_path_maps, + waf_configuration=waf_configuration, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_address_pools: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayBackendAddressPoolArgs']]]] = None, + backend_http_settings: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayBackendHttpSettingArgs']]]] = None, + frontend_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayFrontendIpConfigurationArgs']]]] = None, + frontend_ports: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayFrontendPortArgs']]]] = None, + gateway_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayGatewayIpConfigurationArgs']]]] = None, + http_listeners: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayHttpListenerArgs']]]] = None, + request_routing_rules: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayRequestRoutingRuleArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['ApplicationGatewaySkuArgs']] = None, + authentication_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayAuthenticationCertificateArgs']]]] = None, + autoscale_configuration: Optional[pulumi.Input['ApplicationGatewayAutoscaleConfigurationArgs']] = None, + custom_error_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayCustomErrorConfigurationArgs']]]] = None, + enable_http2: Optional[pulumi.Input[bool]] = None, + fips_enabled: Optional[pulumi.Input[bool]] = None, + firewall_policy_id: Optional[pulumi.Input[str]] = None, + force_firewall_policy_association: Optional[pulumi.Input[bool]] = None, + global_: Optional[pulumi.Input['ApplicationGatewayGlobalArgs']] = None, + identity: Optional[pulumi.Input['ApplicationGatewayIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_link_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayPrivateLinkConfigurationArgs']]]] = None, + probes: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayProbeArgs']]]] = None, + redirect_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayRedirectConfigurationArgs']]]] = None, + rewrite_rule_sets: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayRewriteRuleSetArgs']]]] = None, + ssl_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewaySslCertificateArgs']]]] = None, + ssl_policy: Optional[pulumi.Input['ApplicationGatewaySslPolicyArgs']] = None, + ssl_profiles: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewaySslProfileArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + trusted_client_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayTrustedClientCertificateArgs']]]] = None, + trusted_root_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayTrustedRootCertificateArgs']]]] = None, + url_path_maps: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayUrlPathMapArgs']]]] = None, + waf_configuration: Optional[pulumi.Input['ApplicationGatewayWafConfigurationArgs']] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_address_pools is None and 'backendAddressPools' in kwargs: + backend_address_pools = kwargs['backendAddressPools'] + if backend_address_pools is None: + raise TypeError("Missing 'backend_address_pools' argument") + if backend_http_settings is None and 'backendHttpSettings' in kwargs: + backend_http_settings = kwargs['backendHttpSettings'] + if backend_http_settings is None: + raise TypeError("Missing 'backend_http_settings' argument") + if frontend_ip_configurations is None and 'frontendIpConfigurations' in kwargs: + frontend_ip_configurations = kwargs['frontendIpConfigurations'] + if frontend_ip_configurations is None: + raise TypeError("Missing 'frontend_ip_configurations' argument") + if frontend_ports is None and 'frontendPorts' in kwargs: + frontend_ports = kwargs['frontendPorts'] + if frontend_ports is None: + raise TypeError("Missing 'frontend_ports' argument") + if gateway_ip_configurations is None and 'gatewayIpConfigurations' in kwargs: + gateway_ip_configurations = kwargs['gatewayIpConfigurations'] + if gateway_ip_configurations is None: + raise TypeError("Missing 'gateway_ip_configurations' argument") + if http_listeners is None and 'httpListeners' in kwargs: + http_listeners = kwargs['httpListeners'] + if http_listeners is None: + raise TypeError("Missing 'http_listeners' argument") + if request_routing_rules is None and 'requestRoutingRules' in kwargs: + request_routing_rules = kwargs['requestRoutingRules'] + if request_routing_rules is None: + raise TypeError("Missing 'request_routing_rules' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if authentication_certificates is None and 'authenticationCertificates' in kwargs: + authentication_certificates = kwargs['authenticationCertificates'] + if autoscale_configuration is None and 'autoscaleConfiguration' in kwargs: + autoscale_configuration = kwargs['autoscaleConfiguration'] + if custom_error_configurations is None and 'customErrorConfigurations' in kwargs: + custom_error_configurations = kwargs['customErrorConfigurations'] + if enable_http2 is None and 'enableHttp2' in kwargs: + enable_http2 = kwargs['enableHttp2'] + if fips_enabled is None and 'fipsEnabled' in kwargs: + fips_enabled = kwargs['fipsEnabled'] + if firewall_policy_id is None and 'firewallPolicyId' in kwargs: + firewall_policy_id = kwargs['firewallPolicyId'] + if force_firewall_policy_association is None and 'forceFirewallPolicyAssociation' in kwargs: + force_firewall_policy_association = kwargs['forceFirewallPolicyAssociation'] + if global_ is None and 'global' in kwargs: + global_ = kwargs['global'] + if private_link_configurations is None and 'privateLinkConfigurations' in kwargs: + private_link_configurations = kwargs['privateLinkConfigurations'] + if redirect_configurations is None and 'redirectConfigurations' in kwargs: + redirect_configurations = kwargs['redirectConfigurations'] + if rewrite_rule_sets is None and 'rewriteRuleSets' in kwargs: + rewrite_rule_sets = kwargs['rewriteRuleSets'] + if ssl_certificates is None and 'sslCertificates' in kwargs: + ssl_certificates = kwargs['sslCertificates'] + if ssl_policy is None and 'sslPolicy' in kwargs: + ssl_policy = kwargs['sslPolicy'] + if ssl_profiles is None and 'sslProfiles' in kwargs: + ssl_profiles = kwargs['sslProfiles'] + if trusted_client_certificates is None and 'trustedClientCertificates' in kwargs: + trusted_client_certificates = kwargs['trustedClientCertificates'] + if trusted_root_certificates is None and 'trustedRootCertificates' in kwargs: + trusted_root_certificates = kwargs['trustedRootCertificates'] + if url_path_maps is None and 'urlPathMaps' in kwargs: + url_path_maps = kwargs['urlPathMaps'] + if waf_configuration is None and 'wafConfiguration' in kwargs: + waf_configuration = kwargs['wafConfiguration'] + + _setter("backend_address_pools", backend_address_pools) + _setter("backend_http_settings", backend_http_settings) + _setter("frontend_ip_configurations", frontend_ip_configurations) + _setter("frontend_ports", frontend_ports) + _setter("gateway_ip_configurations", gateway_ip_configurations) + _setter("http_listeners", http_listeners) + _setter("request_routing_rules", request_routing_rules) + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if authentication_certificates is not None: - pulumi.set(__self__, "authentication_certificates", authentication_certificates) + _setter("authentication_certificates", authentication_certificates) if autoscale_configuration is not None: - pulumi.set(__self__, "autoscale_configuration", autoscale_configuration) + _setter("autoscale_configuration", autoscale_configuration) if custom_error_configurations is not None: - pulumi.set(__self__, "custom_error_configurations", custom_error_configurations) + _setter("custom_error_configurations", custom_error_configurations) if enable_http2 is not None: - pulumi.set(__self__, "enable_http2", enable_http2) + _setter("enable_http2", enable_http2) if fips_enabled is not None: - pulumi.set(__self__, "fips_enabled", fips_enabled) + _setter("fips_enabled", fips_enabled) if firewall_policy_id is not None: - pulumi.set(__self__, "firewall_policy_id", firewall_policy_id) + _setter("firewall_policy_id", firewall_policy_id) if force_firewall_policy_association is not None: - pulumi.set(__self__, "force_firewall_policy_association", force_firewall_policy_association) + _setter("force_firewall_policy_association", force_firewall_policy_association) if global_ is not None: - pulumi.set(__self__, "global_", global_) + _setter("global_", global_) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_link_configurations is not None: - pulumi.set(__self__, "private_link_configurations", private_link_configurations) + _setter("private_link_configurations", private_link_configurations) if probes is not None: - pulumi.set(__self__, "probes", probes) + _setter("probes", probes) if redirect_configurations is not None: - pulumi.set(__self__, "redirect_configurations", redirect_configurations) + _setter("redirect_configurations", redirect_configurations) if rewrite_rule_sets is not None: - pulumi.set(__self__, "rewrite_rule_sets", rewrite_rule_sets) + _setter("rewrite_rule_sets", rewrite_rule_sets) if ssl_certificates is not None: - pulumi.set(__self__, "ssl_certificates", ssl_certificates) + _setter("ssl_certificates", ssl_certificates) if ssl_policy is not None: - pulumi.set(__self__, "ssl_policy", ssl_policy) + _setter("ssl_policy", ssl_policy) if ssl_profiles is not None: - pulumi.set(__self__, "ssl_profiles", ssl_profiles) + _setter("ssl_profiles", ssl_profiles) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if trusted_client_certificates is not None: - pulumi.set(__self__, "trusted_client_certificates", trusted_client_certificates) + _setter("trusted_client_certificates", trusted_client_certificates) if trusted_root_certificates is not None: - pulumi.set(__self__, "trusted_root_certificates", trusted_root_certificates) + _setter("trusted_root_certificates", trusted_root_certificates) if url_path_maps is not None: - pulumi.set(__self__, "url_path_maps", url_path_maps) + _setter("url_path_maps", url_path_maps) if waf_configuration is not None: - pulumi.set(__self__, "waf_configuration", waf_configuration) + _setter("waf_configuration", waf_configuration) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="backendAddressPools") @@ -620,74 +765,205 @@ def __init__(__self__, *, > **Please Note**: Availability Zones are not supported in all regions at this time, please check the [official documentation](https://docs.microsoft.com/azure/availability-zones/az-overview) for more information. They are also only supported for [v2 SKUs](https://docs.microsoft.com/azure/application-gateway/application-gateway-autoscaling-zone-redundant) """ + _ApplicationGatewayState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_certificates=authentication_certificates, + autoscale_configuration=autoscale_configuration, + backend_address_pools=backend_address_pools, + backend_http_settings=backend_http_settings, + custom_error_configurations=custom_error_configurations, + enable_http2=enable_http2, + fips_enabled=fips_enabled, + firewall_policy_id=firewall_policy_id, + force_firewall_policy_association=force_firewall_policy_association, + frontend_ip_configurations=frontend_ip_configurations, + frontend_ports=frontend_ports, + gateway_ip_configurations=gateway_ip_configurations, + global_=global_, + http_listeners=http_listeners, + identity=identity, + location=location, + name=name, + private_endpoint_connections=private_endpoint_connections, + private_link_configurations=private_link_configurations, + probes=probes, + redirect_configurations=redirect_configurations, + request_routing_rules=request_routing_rules, + resource_group_name=resource_group_name, + rewrite_rule_sets=rewrite_rule_sets, + sku=sku, + ssl_certificates=ssl_certificates, + ssl_policy=ssl_policy, + ssl_profiles=ssl_profiles, + tags=tags, + trusted_client_certificates=trusted_client_certificates, + trusted_root_certificates=trusted_root_certificates, + url_path_maps=url_path_maps, + waf_configuration=waf_configuration, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayAuthenticationCertificateArgs']]]] = None, + autoscale_configuration: Optional[pulumi.Input['ApplicationGatewayAutoscaleConfigurationArgs']] = None, + backend_address_pools: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayBackendAddressPoolArgs']]]] = None, + backend_http_settings: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayBackendHttpSettingArgs']]]] = None, + custom_error_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayCustomErrorConfigurationArgs']]]] = None, + enable_http2: Optional[pulumi.Input[bool]] = None, + fips_enabled: Optional[pulumi.Input[bool]] = None, + firewall_policy_id: Optional[pulumi.Input[str]] = None, + force_firewall_policy_association: Optional[pulumi.Input[bool]] = None, + frontend_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayFrontendIpConfigurationArgs']]]] = None, + frontend_ports: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayFrontendPortArgs']]]] = None, + gateway_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayGatewayIpConfigurationArgs']]]] = None, + global_: Optional[pulumi.Input['ApplicationGatewayGlobalArgs']] = None, + http_listeners: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayHttpListenerArgs']]]] = None, + identity: Optional[pulumi.Input['ApplicationGatewayIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_endpoint_connections: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayPrivateEndpointConnectionArgs']]]] = None, + private_link_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayPrivateLinkConfigurationArgs']]]] = None, + probes: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayProbeArgs']]]] = None, + redirect_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayRedirectConfigurationArgs']]]] = None, + request_routing_rules: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayRequestRoutingRuleArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rewrite_rule_sets: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayRewriteRuleSetArgs']]]] = None, + sku: Optional[pulumi.Input['ApplicationGatewaySkuArgs']] = None, + ssl_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewaySslCertificateArgs']]]] = None, + ssl_policy: Optional[pulumi.Input['ApplicationGatewaySslPolicyArgs']] = None, + ssl_profiles: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewaySslProfileArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + trusted_client_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayTrustedClientCertificateArgs']]]] = None, + trusted_root_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayTrustedRootCertificateArgs']]]] = None, + url_path_maps: Optional[pulumi.Input[Sequence[pulumi.Input['ApplicationGatewayUrlPathMapArgs']]]] = None, + waf_configuration: Optional[pulumi.Input['ApplicationGatewayWafConfigurationArgs']] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_certificates is None and 'authenticationCertificates' in kwargs: + authentication_certificates = kwargs['authenticationCertificates'] + if autoscale_configuration is None and 'autoscaleConfiguration' in kwargs: + autoscale_configuration = kwargs['autoscaleConfiguration'] + if backend_address_pools is None and 'backendAddressPools' in kwargs: + backend_address_pools = kwargs['backendAddressPools'] + if backend_http_settings is None and 'backendHttpSettings' in kwargs: + backend_http_settings = kwargs['backendHttpSettings'] + if custom_error_configurations is None and 'customErrorConfigurations' in kwargs: + custom_error_configurations = kwargs['customErrorConfigurations'] + if enable_http2 is None and 'enableHttp2' in kwargs: + enable_http2 = kwargs['enableHttp2'] + if fips_enabled is None and 'fipsEnabled' in kwargs: + fips_enabled = kwargs['fipsEnabled'] + if firewall_policy_id is None and 'firewallPolicyId' in kwargs: + firewall_policy_id = kwargs['firewallPolicyId'] + if force_firewall_policy_association is None and 'forceFirewallPolicyAssociation' in kwargs: + force_firewall_policy_association = kwargs['forceFirewallPolicyAssociation'] + if frontend_ip_configurations is None and 'frontendIpConfigurations' in kwargs: + frontend_ip_configurations = kwargs['frontendIpConfigurations'] + if frontend_ports is None and 'frontendPorts' in kwargs: + frontend_ports = kwargs['frontendPorts'] + if gateway_ip_configurations is None and 'gatewayIpConfigurations' in kwargs: + gateway_ip_configurations = kwargs['gatewayIpConfigurations'] + if global_ is None and 'global' in kwargs: + global_ = kwargs['global'] + if http_listeners is None and 'httpListeners' in kwargs: + http_listeners = kwargs['httpListeners'] + if private_endpoint_connections is None and 'privateEndpointConnections' in kwargs: + private_endpoint_connections = kwargs['privateEndpointConnections'] + if private_link_configurations is None and 'privateLinkConfigurations' in kwargs: + private_link_configurations = kwargs['privateLinkConfigurations'] + if redirect_configurations is None and 'redirectConfigurations' in kwargs: + redirect_configurations = kwargs['redirectConfigurations'] + if request_routing_rules is None and 'requestRoutingRules' in kwargs: + request_routing_rules = kwargs['requestRoutingRules'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if rewrite_rule_sets is None and 'rewriteRuleSets' in kwargs: + rewrite_rule_sets = kwargs['rewriteRuleSets'] + if ssl_certificates is None and 'sslCertificates' in kwargs: + ssl_certificates = kwargs['sslCertificates'] + if ssl_policy is None and 'sslPolicy' in kwargs: + ssl_policy = kwargs['sslPolicy'] + if ssl_profiles is None and 'sslProfiles' in kwargs: + ssl_profiles = kwargs['sslProfiles'] + if trusted_client_certificates is None and 'trustedClientCertificates' in kwargs: + trusted_client_certificates = kwargs['trustedClientCertificates'] + if trusted_root_certificates is None and 'trustedRootCertificates' in kwargs: + trusted_root_certificates = kwargs['trustedRootCertificates'] + if url_path_maps is None and 'urlPathMaps' in kwargs: + url_path_maps = kwargs['urlPathMaps'] + if waf_configuration is None and 'wafConfiguration' in kwargs: + waf_configuration = kwargs['wafConfiguration'] + if authentication_certificates is not None: - pulumi.set(__self__, "authentication_certificates", authentication_certificates) + _setter("authentication_certificates", authentication_certificates) if autoscale_configuration is not None: - pulumi.set(__self__, "autoscale_configuration", autoscale_configuration) + _setter("autoscale_configuration", autoscale_configuration) if backend_address_pools is not None: - pulumi.set(__self__, "backend_address_pools", backend_address_pools) + _setter("backend_address_pools", backend_address_pools) if backend_http_settings is not None: - pulumi.set(__self__, "backend_http_settings", backend_http_settings) + _setter("backend_http_settings", backend_http_settings) if custom_error_configurations is not None: - pulumi.set(__self__, "custom_error_configurations", custom_error_configurations) + _setter("custom_error_configurations", custom_error_configurations) if enable_http2 is not None: - pulumi.set(__self__, "enable_http2", enable_http2) + _setter("enable_http2", enable_http2) if fips_enabled is not None: - pulumi.set(__self__, "fips_enabled", fips_enabled) + _setter("fips_enabled", fips_enabled) if firewall_policy_id is not None: - pulumi.set(__self__, "firewall_policy_id", firewall_policy_id) + _setter("firewall_policy_id", firewall_policy_id) if force_firewall_policy_association is not None: - pulumi.set(__self__, "force_firewall_policy_association", force_firewall_policy_association) + _setter("force_firewall_policy_association", force_firewall_policy_association) if frontend_ip_configurations is not None: - pulumi.set(__self__, "frontend_ip_configurations", frontend_ip_configurations) + _setter("frontend_ip_configurations", frontend_ip_configurations) if frontend_ports is not None: - pulumi.set(__self__, "frontend_ports", frontend_ports) + _setter("frontend_ports", frontend_ports) if gateway_ip_configurations is not None: - pulumi.set(__self__, "gateway_ip_configurations", gateway_ip_configurations) + _setter("gateway_ip_configurations", gateway_ip_configurations) if global_ is not None: - pulumi.set(__self__, "global_", global_) + _setter("global_", global_) if http_listeners is not None: - pulumi.set(__self__, "http_listeners", http_listeners) + _setter("http_listeners", http_listeners) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_endpoint_connections is not None: - pulumi.set(__self__, "private_endpoint_connections", private_endpoint_connections) + _setter("private_endpoint_connections", private_endpoint_connections) if private_link_configurations is not None: - pulumi.set(__self__, "private_link_configurations", private_link_configurations) + _setter("private_link_configurations", private_link_configurations) if probes is not None: - pulumi.set(__self__, "probes", probes) + _setter("probes", probes) if redirect_configurations is not None: - pulumi.set(__self__, "redirect_configurations", redirect_configurations) + _setter("redirect_configurations", redirect_configurations) if request_routing_rules is not None: - pulumi.set(__self__, "request_routing_rules", request_routing_rules) + _setter("request_routing_rules", request_routing_rules) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rewrite_rule_sets is not None: - pulumi.set(__self__, "rewrite_rule_sets", rewrite_rule_sets) + _setter("rewrite_rule_sets", rewrite_rule_sets) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if ssl_certificates is not None: - pulumi.set(__self__, "ssl_certificates", ssl_certificates) + _setter("ssl_certificates", ssl_certificates) if ssl_policy is not None: - pulumi.set(__self__, "ssl_policy", ssl_policy) + _setter("ssl_policy", ssl_policy) if ssl_profiles is not None: - pulumi.set(__self__, "ssl_profiles", ssl_profiles) + _setter("ssl_profiles", ssl_profiles) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if trusted_client_certificates is not None: - pulumi.set(__self__, "trusted_client_certificates", trusted_client_certificates) + _setter("trusted_client_certificates", trusted_client_certificates) if trusted_root_certificates is not None: - pulumi.set(__self__, "trusted_root_certificates", trusted_root_certificates) + _setter("trusted_root_certificates", trusted_root_certificates) if url_path_maps is not None: - pulumi.set(__self__, "url_path_maps", url_path_maps) + _setter("url_path_maps", url_path_maps) if waf_configuration is not None: - pulumi.set(__self__, "waf_configuration", waf_configuration) + _setter("waf_configuration", waf_configuration) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="authenticationCertificates") @@ -1361,6 +1637,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApplicationGatewayArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1409,6 +1689,11 @@ def _internal_init(__self__, __props__ = ApplicationGatewayArgs.__new__(ApplicationGatewayArgs) __props__.__dict__["authentication_certificates"] = authentication_certificates + if autoscale_configuration is not None and not isinstance(autoscale_configuration, ApplicationGatewayAutoscaleConfigurationArgs): + autoscale_configuration = autoscale_configuration or {} + def _setter(key, value): + autoscale_configuration[key] = value + ApplicationGatewayAutoscaleConfigurationArgs._configure(_setter, **autoscale_configuration) __props__.__dict__["autoscale_configuration"] = autoscale_configuration if backend_address_pools is None and not opts.urn: raise TypeError("Missing required property 'backend_address_pools'") @@ -1430,10 +1715,20 @@ def _internal_init(__self__, if gateway_ip_configurations is None and not opts.urn: raise TypeError("Missing required property 'gateway_ip_configurations'") __props__.__dict__["gateway_ip_configurations"] = gateway_ip_configurations + if global_ is not None and not isinstance(global_, ApplicationGatewayGlobalArgs): + global_ = global_ or {} + def _setter(key, value): + global_[key] = value + ApplicationGatewayGlobalArgs._configure(_setter, **global_) __props__.__dict__["global_"] = global_ if http_listeners is None and not opts.urn: raise TypeError("Missing required property 'http_listeners'") __props__.__dict__["http_listeners"] = http_listeners + if identity is not None and not isinstance(identity, ApplicationGatewayIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ApplicationGatewayIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name @@ -1447,16 +1742,31 @@ def _internal_init(__self__, raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["rewrite_rule_sets"] = rewrite_rule_sets + if sku is not None and not isinstance(sku, ApplicationGatewaySkuArgs): + sku = sku or {} + def _setter(key, value): + sku[key] = value + ApplicationGatewaySkuArgs._configure(_setter, **sku) if sku is None and not opts.urn: raise TypeError("Missing required property 'sku'") __props__.__dict__["sku"] = sku __props__.__dict__["ssl_certificates"] = ssl_certificates + if ssl_policy is not None and not isinstance(ssl_policy, ApplicationGatewaySslPolicyArgs): + ssl_policy = ssl_policy or {} + def _setter(key, value): + ssl_policy[key] = value + ApplicationGatewaySslPolicyArgs._configure(_setter, **ssl_policy) __props__.__dict__["ssl_policy"] = ssl_policy __props__.__dict__["ssl_profiles"] = ssl_profiles __props__.__dict__["tags"] = tags __props__.__dict__["trusted_client_certificates"] = trusted_client_certificates __props__.__dict__["trusted_root_certificates"] = trusted_root_certificates __props__.__dict__["url_path_maps"] = url_path_maps + if waf_configuration is not None and not isinstance(waf_configuration, ApplicationGatewayWafConfigurationArgs): + waf_configuration = waf_configuration or {} + def _setter(key, value): + waf_configuration[key] = value + ApplicationGatewayWafConfigurationArgs._configure(_setter, **waf_configuration) __props__.__dict__["waf_configuration"] = waf_configuration __props__.__dict__["zones"] = zones __props__.__dict__["private_endpoint_connections"] = None diff --git a/sdk/python/pulumi_azure/network/application_security_group.py b/sdk/python/pulumi_azure/network/application_security_group.py index ead86ecde8..ea2eac98a0 100644 --- a/sdk/python/pulumi_azure/network/application_security_group.py +++ b/sdk/python/pulumi_azure/network/application_security_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApplicationSecurityGroupArgs', 'ApplicationSecurityGroup'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Application Security Group. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + ApplicationSecurityGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -96,14 +117,33 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Application Security Group. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ApplicationSecurityGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -239,6 +279,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApplicationSecurityGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/bgp_connection.py b/sdk/python/pulumi_azure/network/bgp_connection.py index ca5da66849..b0cef61b8f 100644 --- a/sdk/python/pulumi_azure/network/bgp_connection.py +++ b/sdk/python/pulumi_azure/network/bgp_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['BgpConnectionArgs', 'BgpConnection'] @@ -27,13 +27,46 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Virtual Hub Bgp Connection. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_connection_id: The ID of virtual network connection. """ - pulumi.set(__self__, "peer_asn", peer_asn) - pulumi.set(__self__, "peer_ip", peer_ip) - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + BgpConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + peer_asn=peer_asn, + peer_ip=peer_ip, + virtual_hub_id=virtual_hub_id, + name=name, + virtual_network_connection_id=virtual_network_connection_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + peer_asn: Optional[pulumi.Input[int]] = None, + peer_ip: Optional[pulumi.Input[str]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + virtual_network_connection_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if peer_asn is None and 'peerAsn' in kwargs: + peer_asn = kwargs['peerAsn'] + if peer_asn is None: + raise TypeError("Missing 'peer_asn' argument") + if peer_ip is None and 'peerIp' in kwargs: + peer_ip = kwargs['peerIp'] + if peer_ip is None: + raise TypeError("Missing 'peer_ip' argument") + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + if virtual_network_connection_id is None and 'virtualNetworkConnectionId' in kwargs: + virtual_network_connection_id = kwargs['virtualNetworkConnectionId'] + + _setter("peer_asn", peer_asn) + _setter("peer_ip", peer_ip) + _setter("virtual_hub_id", virtual_hub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if virtual_network_connection_id is not None: - pulumi.set(__self__, "virtual_network_connection_id", virtual_network_connection_id) + _setter("virtual_network_connection_id", virtual_network_connection_id) @property @pulumi.getter(name="peerAsn") @@ -112,16 +145,43 @@ def __init__(__self__, *, :param pulumi.Input[str] virtual_hub_id: The ID of the Virtual Hub within which this Bgp connection should be created. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_connection_id: The ID of virtual network connection. """ + _BgpConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + peer_asn=peer_asn, + peer_ip=peer_ip, + virtual_hub_id=virtual_hub_id, + virtual_network_connection_id=virtual_network_connection_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + peer_asn: Optional[pulumi.Input[int]] = None, + peer_ip: Optional[pulumi.Input[str]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + virtual_network_connection_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if peer_asn is None and 'peerAsn' in kwargs: + peer_asn = kwargs['peerAsn'] + if peer_ip is None and 'peerIp' in kwargs: + peer_ip = kwargs['peerIp'] + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_network_connection_id is None and 'virtualNetworkConnectionId' in kwargs: + virtual_network_connection_id = kwargs['virtualNetworkConnectionId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if peer_asn is not None: - pulumi.set(__self__, "peer_asn", peer_asn) + _setter("peer_asn", peer_asn) if peer_ip is not None: - pulumi.set(__self__, "peer_ip", peer_ip) + _setter("peer_ip", peer_ip) if virtual_hub_id is not None: - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + _setter("virtual_hub_id", virtual_hub_id) if virtual_network_connection_id is not None: - pulumi.set(__self__, "virtual_network_connection_id", virtual_network_connection_id) + _setter("virtual_network_connection_id", virtual_network_connection_id) @property @pulumi.getter @@ -315,6 +375,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BgpConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/ddos_protection_plan.py b/sdk/python/pulumi_azure/network/ddos_protection_plan.py index 3d006643a9..44a1c55d94 100644 --- a/sdk/python/pulumi_azure/network/ddos_protection_plan.py +++ b/sdk/python/pulumi_azure/network/ddos_protection_plan.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DdosProtectionPlanArgs', 'DdosProtectionPlan'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + DdosProtectionPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -98,16 +119,39 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_network_ids: A list of Virtual Network IDs associated with the DDoS Protection Plan. """ + _DdosProtectionPlanState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + virtual_network_ids=virtual_network_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if virtual_network_ids is None and 'virtualNetworkIds' in kwargs: + virtual_network_ids = kwargs['virtualNetworkIds'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_ids is not None: - pulumi.set(__self__, "virtual_network_ids", virtual_network_ids) + _setter("virtual_network_ids", virtual_network_ids) @property @pulumi.getter @@ -257,6 +301,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DdosProtectionPlanArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/express_route_circuit.py b/sdk/python/pulumi_azure/network/express_route_circuit.py index 8813688292..23504e6bf1 100644 --- a/sdk/python/pulumi_azure/network/express_route_circuit.py +++ b/sdk/python/pulumi_azure/network/express_route_circuit.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,28 +49,81 @@ def __init__(__self__, *, :param pulumi.Input[str] service_provider_name: The name of the ExpressRoute Service Provider. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + ExpressRouteCircuitArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + allow_classic_operations=allow_classic_operations, + authorization_key=authorization_key, + bandwidth_in_gbps=bandwidth_in_gbps, + bandwidth_in_mbps=bandwidth_in_mbps, + express_route_port_id=express_route_port_id, + location=location, + name=name, + peering_location=peering_location, + service_provider_name=service_provider_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['ExpressRouteCircuitSkuArgs']] = None, + allow_classic_operations: Optional[pulumi.Input[bool]] = None, + authorization_key: Optional[pulumi.Input[str]] = None, + bandwidth_in_gbps: Optional[pulumi.Input[float]] = None, + bandwidth_in_mbps: Optional[pulumi.Input[int]] = None, + express_route_port_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + peering_location: Optional[pulumi.Input[str]] = None, + service_provider_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if allow_classic_operations is None and 'allowClassicOperations' in kwargs: + allow_classic_operations = kwargs['allowClassicOperations'] + if authorization_key is None and 'authorizationKey' in kwargs: + authorization_key = kwargs['authorizationKey'] + if bandwidth_in_gbps is None and 'bandwidthInGbps' in kwargs: + bandwidth_in_gbps = kwargs['bandwidthInGbps'] + if bandwidth_in_mbps is None and 'bandwidthInMbps' in kwargs: + bandwidth_in_mbps = kwargs['bandwidthInMbps'] + if express_route_port_id is None and 'expressRoutePortId' in kwargs: + express_route_port_id = kwargs['expressRoutePortId'] + if peering_location is None and 'peeringLocation' in kwargs: + peering_location = kwargs['peeringLocation'] + if service_provider_name is None and 'serviceProviderName' in kwargs: + service_provider_name = kwargs['serviceProviderName'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if allow_classic_operations is not None: - pulumi.set(__self__, "allow_classic_operations", allow_classic_operations) + _setter("allow_classic_operations", allow_classic_operations) if authorization_key is not None: - pulumi.set(__self__, "authorization_key", authorization_key) + _setter("authorization_key", authorization_key) if bandwidth_in_gbps is not None: - pulumi.set(__self__, "bandwidth_in_gbps", bandwidth_in_gbps) + _setter("bandwidth_in_gbps", bandwidth_in_gbps) if bandwidth_in_mbps is not None: - pulumi.set(__self__, "bandwidth_in_mbps", bandwidth_in_mbps) + _setter("bandwidth_in_mbps", bandwidth_in_mbps) if express_route_port_id is not None: - pulumi.set(__self__, "express_route_port_id", express_route_port_id) + _setter("express_route_port_id", express_route_port_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if peering_location is not None: - pulumi.set(__self__, "peering_location", peering_location) + _setter("peering_location", peering_location) if service_provider_name is not None: - pulumi.set(__self__, "service_provider_name", service_provider_name) + _setter("service_provider_name", service_provider_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -263,34 +316,91 @@ def __init__(__self__, *, :param pulumi.Input['ExpressRouteCircuitSkuArgs'] sku: A `sku` block for the ExpressRoute circuit as documented below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ExpressRouteCircuitState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_classic_operations=allow_classic_operations, + authorization_key=authorization_key, + bandwidth_in_gbps=bandwidth_in_gbps, + bandwidth_in_mbps=bandwidth_in_mbps, + express_route_port_id=express_route_port_id, + location=location, + name=name, + peering_location=peering_location, + resource_group_name=resource_group_name, + service_key=service_key, + service_provider_name=service_provider_name, + service_provider_provisioning_state=service_provider_provisioning_state, + sku=sku, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_classic_operations: Optional[pulumi.Input[bool]] = None, + authorization_key: Optional[pulumi.Input[str]] = None, + bandwidth_in_gbps: Optional[pulumi.Input[float]] = None, + bandwidth_in_mbps: Optional[pulumi.Input[int]] = None, + express_route_port_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + peering_location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_key: Optional[pulumi.Input[str]] = None, + service_provider_name: Optional[pulumi.Input[str]] = None, + service_provider_provisioning_state: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['ExpressRouteCircuitSkuArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_classic_operations is None and 'allowClassicOperations' in kwargs: + allow_classic_operations = kwargs['allowClassicOperations'] + if authorization_key is None and 'authorizationKey' in kwargs: + authorization_key = kwargs['authorizationKey'] + if bandwidth_in_gbps is None and 'bandwidthInGbps' in kwargs: + bandwidth_in_gbps = kwargs['bandwidthInGbps'] + if bandwidth_in_mbps is None and 'bandwidthInMbps' in kwargs: + bandwidth_in_mbps = kwargs['bandwidthInMbps'] + if express_route_port_id is None and 'expressRoutePortId' in kwargs: + express_route_port_id = kwargs['expressRoutePortId'] + if peering_location is None and 'peeringLocation' in kwargs: + peering_location = kwargs['peeringLocation'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_key is None and 'serviceKey' in kwargs: + service_key = kwargs['serviceKey'] + if service_provider_name is None and 'serviceProviderName' in kwargs: + service_provider_name = kwargs['serviceProviderName'] + if service_provider_provisioning_state is None and 'serviceProviderProvisioningState' in kwargs: + service_provider_provisioning_state = kwargs['serviceProviderProvisioningState'] + if allow_classic_operations is not None: - pulumi.set(__self__, "allow_classic_operations", allow_classic_operations) + _setter("allow_classic_operations", allow_classic_operations) if authorization_key is not None: - pulumi.set(__self__, "authorization_key", authorization_key) + _setter("authorization_key", authorization_key) if bandwidth_in_gbps is not None: - pulumi.set(__self__, "bandwidth_in_gbps", bandwidth_in_gbps) + _setter("bandwidth_in_gbps", bandwidth_in_gbps) if bandwidth_in_mbps is not None: - pulumi.set(__self__, "bandwidth_in_mbps", bandwidth_in_mbps) + _setter("bandwidth_in_mbps", bandwidth_in_mbps) if express_route_port_id is not None: - pulumi.set(__self__, "express_route_port_id", express_route_port_id) + _setter("express_route_port_id", express_route_port_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if peering_location is not None: - pulumi.set(__self__, "peering_location", peering_location) + _setter("peering_location", peering_location) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_key is not None: - pulumi.set(__self__, "service_key", service_key) + _setter("service_key", service_key) if service_provider_name is not None: - pulumi.set(__self__, "service_provider_name", service_provider_name) + _setter("service_provider_name", service_provider_name) if service_provider_provisioning_state is not None: - pulumi.set(__self__, "service_provider_provisioning_state", service_provider_provisioning_state) + _setter("service_provider_provisioning_state", service_provider_provisioning_state) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="allowClassicOperations") @@ -588,6 +698,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ExpressRouteCircuitArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -626,6 +740,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["service_provider_name"] = service_provider_name + if sku is not None and not isinstance(sku, ExpressRouteCircuitSkuArgs): + sku = sku or {} + def _setter(key, value): + sku[key] = value + ExpressRouteCircuitSkuArgs._configure(_setter, **sku) if sku is None and not opts.urn: raise TypeError("Missing required property 'sku'") __props__.__dict__["sku"] = sku diff --git a/sdk/python/pulumi_azure/network/express_route_circuit_authorization.py b/sdk/python/pulumi_azure/network/express_route_circuit_authorization.py index 02a88e4cf0..47ec649325 100644 --- a/sdk/python/pulumi_azure/network/express_route_circuit_authorization.py +++ b/sdk/python/pulumi_azure/network/express_route_circuit_authorization.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ExpressRouteCircuitAuthorizationArgs', 'ExpressRouteCircuitAuthorization'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the ExpressRoute circuit. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "express_route_circuit_name", express_route_circuit_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ExpressRouteCircuitAuthorizationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + express_route_circuit_name=express_route_circuit_name, + resource_group_name=resource_group_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + express_route_circuit_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if express_route_circuit_name is None and 'expressRouteCircuitName' in kwargs: + express_route_circuit_name = kwargs['expressRouteCircuitName'] + if express_route_circuit_name is None: + raise TypeError("Missing 'express_route_circuit_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("express_route_circuit_name", express_route_circuit_name) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="expressRouteCircuitName") @@ -81,16 +104,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the ExpressRoute circuit. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. """ + _ExpressRouteCircuitAuthorizationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorization_key=authorization_key, + authorization_use_status=authorization_use_status, + express_route_circuit_name=express_route_circuit_name, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorization_key: Optional[pulumi.Input[str]] = None, + authorization_use_status: Optional[pulumi.Input[str]] = None, + express_route_circuit_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorization_key is None and 'authorizationKey' in kwargs: + authorization_key = kwargs['authorizationKey'] + if authorization_use_status is None and 'authorizationUseStatus' in kwargs: + authorization_use_status = kwargs['authorizationUseStatus'] + if express_route_circuit_name is None and 'expressRouteCircuitName' in kwargs: + express_route_circuit_name = kwargs['expressRouteCircuitName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if authorization_key is not None: - pulumi.set(__self__, "authorization_key", authorization_key) + _setter("authorization_key", authorization_key) if authorization_use_status is not None: - pulumi.set(__self__, "authorization_use_status", authorization_use_status) + _setter("authorization_use_status", authorization_use_status) if express_route_circuit_name is not None: - pulumi.set(__self__, "express_route_circuit_name", express_route_circuit_name) + _setter("express_route_circuit_name", express_route_circuit_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="authorizationKey") @@ -258,6 +308,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ExpressRouteCircuitAuthorizationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/express_route_circuit_connection.py b/sdk/python/pulumi_azure/network/express_route_circuit_connection.py index 14fbd99ecb..2e4fa00fe6 100644 --- a/sdk/python/pulumi_azure/network/express_route_circuit_connection.py +++ b/sdk/python/pulumi_azure/network/express_route_circuit_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ExpressRouteCircuitConnectionArgs', 'ExpressRouteCircuitConnection'] @@ -31,15 +31,52 @@ def __init__(__self__, *, :param pulumi.Input[str] authorization_key: The authorization key which is associated with the Express Route Circuit Connection. :param pulumi.Input[str] name: The name which should be used for this Express Route Circuit Connection. Changing this forces a new Express Route Circuit Connection to be created. """ - pulumi.set(__self__, "address_prefix_ipv4", address_prefix_ipv4) - pulumi.set(__self__, "peer_peering_id", peer_peering_id) - pulumi.set(__self__, "peering_id", peering_id) + ExpressRouteCircuitConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix_ipv4=address_prefix_ipv4, + peer_peering_id=peer_peering_id, + peering_id=peering_id, + address_prefix_ipv6=address_prefix_ipv6, + authorization_key=authorization_key, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix_ipv4: Optional[pulumi.Input[str]] = None, + peer_peering_id: Optional[pulumi.Input[str]] = None, + peering_id: Optional[pulumi.Input[str]] = None, + address_prefix_ipv6: Optional[pulumi.Input[str]] = None, + authorization_key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix_ipv4 is None and 'addressPrefixIpv4' in kwargs: + address_prefix_ipv4 = kwargs['addressPrefixIpv4'] + if address_prefix_ipv4 is None: + raise TypeError("Missing 'address_prefix_ipv4' argument") + if peer_peering_id is None and 'peerPeeringId' in kwargs: + peer_peering_id = kwargs['peerPeeringId'] + if peer_peering_id is None: + raise TypeError("Missing 'peer_peering_id' argument") + if peering_id is None and 'peeringId' in kwargs: + peering_id = kwargs['peeringId'] + if peering_id is None: + raise TypeError("Missing 'peering_id' argument") + if address_prefix_ipv6 is None and 'addressPrefixIpv6' in kwargs: + address_prefix_ipv6 = kwargs['addressPrefixIpv6'] + if authorization_key is None and 'authorizationKey' in kwargs: + authorization_key = kwargs['authorizationKey'] + + _setter("address_prefix_ipv4", address_prefix_ipv4) + _setter("peer_peering_id", peer_peering_id) + _setter("peering_id", peering_id) if address_prefix_ipv6 is not None: - pulumi.set(__self__, "address_prefix_ipv6", address_prefix_ipv6) + _setter("address_prefix_ipv6", address_prefix_ipv6) if authorization_key is not None: - pulumi.set(__self__, "authorization_key", authorization_key) + _setter("authorization_key", authorization_key) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="addressPrefixIpv4") @@ -136,18 +173,49 @@ def __init__(__self__, *, :param pulumi.Input[str] peer_peering_id: The ID of the peered Express Route Circuit Private Peering. Changing this forces a new Express Route Circuit Connection to be created. :param pulumi.Input[str] peering_id: The ID of the Express Route Circuit Private Peering that this Express Route Circuit Connection connects with. Changing this forces a new Express Route Circuit Connection to be created. """ + _ExpressRouteCircuitConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix_ipv4=address_prefix_ipv4, + address_prefix_ipv6=address_prefix_ipv6, + authorization_key=authorization_key, + name=name, + peer_peering_id=peer_peering_id, + peering_id=peering_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix_ipv4: Optional[pulumi.Input[str]] = None, + address_prefix_ipv6: Optional[pulumi.Input[str]] = None, + authorization_key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + peer_peering_id: Optional[pulumi.Input[str]] = None, + peering_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix_ipv4 is None and 'addressPrefixIpv4' in kwargs: + address_prefix_ipv4 = kwargs['addressPrefixIpv4'] + if address_prefix_ipv6 is None and 'addressPrefixIpv6' in kwargs: + address_prefix_ipv6 = kwargs['addressPrefixIpv6'] + if authorization_key is None and 'authorizationKey' in kwargs: + authorization_key = kwargs['authorizationKey'] + if peer_peering_id is None and 'peerPeeringId' in kwargs: + peer_peering_id = kwargs['peerPeeringId'] + if peering_id is None and 'peeringId' in kwargs: + peering_id = kwargs['peeringId'] + if address_prefix_ipv4 is not None: - pulumi.set(__self__, "address_prefix_ipv4", address_prefix_ipv4) + _setter("address_prefix_ipv4", address_prefix_ipv4) if address_prefix_ipv6 is not None: - pulumi.set(__self__, "address_prefix_ipv6", address_prefix_ipv6) + _setter("address_prefix_ipv6", address_prefix_ipv6) if authorization_key is not None: - pulumi.set(__self__, "authorization_key", authorization_key) + _setter("authorization_key", authorization_key) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if peer_peering_id is not None: - pulumi.set(__self__, "peer_peering_id", peer_peering_id) + _setter("peer_peering_id", peer_peering_id) if peering_id is not None: - pulumi.set(__self__, "peering_id", peering_id) + _setter("peering_id", peering_id) @property @pulumi.getter(name="addressPrefixIpv4") @@ -409,6 +477,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ExpressRouteCircuitConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/express_route_circuit_peering.py b/sdk/python/pulumi_azure/network/express_route_circuit_peering.py index d8028b491d..9bb34c1e53 100644 --- a/sdk/python/pulumi_azure/network/express_route_circuit_peering.py +++ b/sdk/python/pulumi_azure/network/express_route_circuit_peering.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,26 +47,89 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_peer_address_prefix: A subnet for the secondary link. :param pulumi.Input[str] shared_key: The shared key. Can be a maximum of 25 characters. """ - pulumi.set(__self__, "express_route_circuit_name", express_route_circuit_name) - pulumi.set(__self__, "peering_type", peering_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "vlan_id", vlan_id) + ExpressRouteCircuitPeeringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + express_route_circuit_name=express_route_circuit_name, + peering_type=peering_type, + resource_group_name=resource_group_name, + vlan_id=vlan_id, + ipv4_enabled=ipv4_enabled, + ipv6=ipv6, + microsoft_peering_config=microsoft_peering_config, + peer_asn=peer_asn, + primary_peer_address_prefix=primary_peer_address_prefix, + route_filter_id=route_filter_id, + secondary_peer_address_prefix=secondary_peer_address_prefix, + shared_key=shared_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + express_route_circuit_name: Optional[pulumi.Input[str]] = None, + peering_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + vlan_id: Optional[pulumi.Input[int]] = None, + ipv4_enabled: Optional[pulumi.Input[bool]] = None, + ipv6: Optional[pulumi.Input['ExpressRouteCircuitPeeringIpv6Args']] = None, + microsoft_peering_config: Optional[pulumi.Input['ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs']] = None, + peer_asn: Optional[pulumi.Input[int]] = None, + primary_peer_address_prefix: Optional[pulumi.Input[str]] = None, + route_filter_id: Optional[pulumi.Input[str]] = None, + secondary_peer_address_prefix: Optional[pulumi.Input[str]] = None, + shared_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if express_route_circuit_name is None and 'expressRouteCircuitName' in kwargs: + express_route_circuit_name = kwargs['expressRouteCircuitName'] + if express_route_circuit_name is None: + raise TypeError("Missing 'express_route_circuit_name' argument") + if peering_type is None and 'peeringType' in kwargs: + peering_type = kwargs['peeringType'] + if peering_type is None: + raise TypeError("Missing 'peering_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if vlan_id is None and 'vlanId' in kwargs: + vlan_id = kwargs['vlanId'] + if vlan_id is None: + raise TypeError("Missing 'vlan_id' argument") + if ipv4_enabled is None and 'ipv4Enabled' in kwargs: + ipv4_enabled = kwargs['ipv4Enabled'] + if microsoft_peering_config is None and 'microsoftPeeringConfig' in kwargs: + microsoft_peering_config = kwargs['microsoftPeeringConfig'] + if peer_asn is None and 'peerAsn' in kwargs: + peer_asn = kwargs['peerAsn'] + if primary_peer_address_prefix is None and 'primaryPeerAddressPrefix' in kwargs: + primary_peer_address_prefix = kwargs['primaryPeerAddressPrefix'] + if route_filter_id is None and 'routeFilterId' in kwargs: + route_filter_id = kwargs['routeFilterId'] + if secondary_peer_address_prefix is None and 'secondaryPeerAddressPrefix' in kwargs: + secondary_peer_address_prefix = kwargs['secondaryPeerAddressPrefix'] + if shared_key is None and 'sharedKey' in kwargs: + shared_key = kwargs['sharedKey'] + + _setter("express_route_circuit_name", express_route_circuit_name) + _setter("peering_type", peering_type) + _setter("resource_group_name", resource_group_name) + _setter("vlan_id", vlan_id) if ipv4_enabled is not None: - pulumi.set(__self__, "ipv4_enabled", ipv4_enabled) + _setter("ipv4_enabled", ipv4_enabled) if ipv6 is not None: - pulumi.set(__self__, "ipv6", ipv6) + _setter("ipv6", ipv6) if microsoft_peering_config is not None: - pulumi.set(__self__, "microsoft_peering_config", microsoft_peering_config) + _setter("microsoft_peering_config", microsoft_peering_config) if peer_asn is not None: - pulumi.set(__self__, "peer_asn", peer_asn) + _setter("peer_asn", peer_asn) if primary_peer_address_prefix is not None: - pulumi.set(__self__, "primary_peer_address_prefix", primary_peer_address_prefix) + _setter("primary_peer_address_prefix", primary_peer_address_prefix) if route_filter_id is not None: - pulumi.set(__self__, "route_filter_id", route_filter_id) + _setter("route_filter_id", route_filter_id) if secondary_peer_address_prefix is not None: - pulumi.set(__self__, "secondary_peer_address_prefix", secondary_peer_address_prefix) + _setter("secondary_peer_address_prefix", secondary_peer_address_prefix) if shared_key is not None: - pulumi.set(__self__, "shared_key", shared_key) + _setter("shared_key", shared_key) @property @pulumi.getter(name="expressRouteCircuitName") @@ -258,38 +321,109 @@ def __init__(__self__, *, :param pulumi.Input[str] shared_key: The shared key. Can be a maximum of 25 characters. :param pulumi.Input[int] vlan_id: A valid VLAN ID to establish this peering on. """ + _ExpressRouteCircuitPeeringState._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_asn=azure_asn, + express_route_circuit_name=express_route_circuit_name, + gateway_manager_etag=gateway_manager_etag, + ipv4_enabled=ipv4_enabled, + ipv6=ipv6, + microsoft_peering_config=microsoft_peering_config, + peer_asn=peer_asn, + peering_type=peering_type, + primary_azure_port=primary_azure_port, + primary_peer_address_prefix=primary_peer_address_prefix, + resource_group_name=resource_group_name, + route_filter_id=route_filter_id, + secondary_azure_port=secondary_azure_port, + secondary_peer_address_prefix=secondary_peer_address_prefix, + shared_key=shared_key, + vlan_id=vlan_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_asn: Optional[pulumi.Input[int]] = None, + express_route_circuit_name: Optional[pulumi.Input[str]] = None, + gateway_manager_etag: Optional[pulumi.Input[str]] = None, + ipv4_enabled: Optional[pulumi.Input[bool]] = None, + ipv6: Optional[pulumi.Input['ExpressRouteCircuitPeeringIpv6Args']] = None, + microsoft_peering_config: Optional[pulumi.Input['ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs']] = None, + peer_asn: Optional[pulumi.Input[int]] = None, + peering_type: Optional[pulumi.Input[str]] = None, + primary_azure_port: Optional[pulumi.Input[str]] = None, + primary_peer_address_prefix: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + route_filter_id: Optional[pulumi.Input[str]] = None, + secondary_azure_port: Optional[pulumi.Input[str]] = None, + secondary_peer_address_prefix: Optional[pulumi.Input[str]] = None, + shared_key: Optional[pulumi.Input[str]] = None, + vlan_id: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_asn is None and 'azureAsn' in kwargs: + azure_asn = kwargs['azureAsn'] + if express_route_circuit_name is None and 'expressRouteCircuitName' in kwargs: + express_route_circuit_name = kwargs['expressRouteCircuitName'] + if gateway_manager_etag is None and 'gatewayManagerEtag' in kwargs: + gateway_manager_etag = kwargs['gatewayManagerEtag'] + if ipv4_enabled is None and 'ipv4Enabled' in kwargs: + ipv4_enabled = kwargs['ipv4Enabled'] + if microsoft_peering_config is None and 'microsoftPeeringConfig' in kwargs: + microsoft_peering_config = kwargs['microsoftPeeringConfig'] + if peer_asn is None and 'peerAsn' in kwargs: + peer_asn = kwargs['peerAsn'] + if peering_type is None and 'peeringType' in kwargs: + peering_type = kwargs['peeringType'] + if primary_azure_port is None and 'primaryAzurePort' in kwargs: + primary_azure_port = kwargs['primaryAzurePort'] + if primary_peer_address_prefix is None and 'primaryPeerAddressPrefix' in kwargs: + primary_peer_address_prefix = kwargs['primaryPeerAddressPrefix'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if route_filter_id is None and 'routeFilterId' in kwargs: + route_filter_id = kwargs['routeFilterId'] + if secondary_azure_port is None and 'secondaryAzurePort' in kwargs: + secondary_azure_port = kwargs['secondaryAzurePort'] + if secondary_peer_address_prefix is None and 'secondaryPeerAddressPrefix' in kwargs: + secondary_peer_address_prefix = kwargs['secondaryPeerAddressPrefix'] + if shared_key is None and 'sharedKey' in kwargs: + shared_key = kwargs['sharedKey'] + if vlan_id is None and 'vlanId' in kwargs: + vlan_id = kwargs['vlanId'] + if azure_asn is not None: - pulumi.set(__self__, "azure_asn", azure_asn) + _setter("azure_asn", azure_asn) if express_route_circuit_name is not None: - pulumi.set(__self__, "express_route_circuit_name", express_route_circuit_name) + _setter("express_route_circuit_name", express_route_circuit_name) if gateway_manager_etag is not None: - pulumi.set(__self__, "gateway_manager_etag", gateway_manager_etag) + _setter("gateway_manager_etag", gateway_manager_etag) if ipv4_enabled is not None: - pulumi.set(__self__, "ipv4_enabled", ipv4_enabled) + _setter("ipv4_enabled", ipv4_enabled) if ipv6 is not None: - pulumi.set(__self__, "ipv6", ipv6) + _setter("ipv6", ipv6) if microsoft_peering_config is not None: - pulumi.set(__self__, "microsoft_peering_config", microsoft_peering_config) + _setter("microsoft_peering_config", microsoft_peering_config) if peer_asn is not None: - pulumi.set(__self__, "peer_asn", peer_asn) + _setter("peer_asn", peer_asn) if peering_type is not None: - pulumi.set(__self__, "peering_type", peering_type) + _setter("peering_type", peering_type) if primary_azure_port is not None: - pulumi.set(__self__, "primary_azure_port", primary_azure_port) + _setter("primary_azure_port", primary_azure_port) if primary_peer_address_prefix is not None: - pulumi.set(__self__, "primary_peer_address_prefix", primary_peer_address_prefix) + _setter("primary_peer_address_prefix", primary_peer_address_prefix) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if route_filter_id is not None: - pulumi.set(__self__, "route_filter_id", route_filter_id) + _setter("route_filter_id", route_filter_id) if secondary_azure_port is not None: - pulumi.set(__self__, "secondary_azure_port", secondary_azure_port) + _setter("secondary_azure_port", secondary_azure_port) if secondary_peer_address_prefix is not None: - pulumi.set(__self__, "secondary_peer_address_prefix", secondary_peer_address_prefix) + _setter("secondary_peer_address_prefix", secondary_peer_address_prefix) if shared_key is not None: - pulumi.set(__self__, "shared_key", shared_key) + _setter("shared_key", shared_key) if vlan_id is not None: - pulumi.set(__self__, "vlan_id", vlan_id) + _setter("vlan_id", vlan_id) @property @pulumi.getter(name="azureAsn") @@ -720,6 +854,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ExpressRouteCircuitPeeringArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -750,7 +888,17 @@ def _internal_init(__self__, raise TypeError("Missing required property 'express_route_circuit_name'") __props__.__dict__["express_route_circuit_name"] = express_route_circuit_name __props__.__dict__["ipv4_enabled"] = ipv4_enabled + if ipv6 is not None and not isinstance(ipv6, ExpressRouteCircuitPeeringIpv6Args): + ipv6 = ipv6 or {} + def _setter(key, value): + ipv6[key] = value + ExpressRouteCircuitPeeringIpv6Args._configure(_setter, **ipv6) __props__.__dict__["ipv6"] = ipv6 + if microsoft_peering_config is not None and not isinstance(microsoft_peering_config, ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs): + microsoft_peering_config = microsoft_peering_config or {} + def _setter(key, value): + microsoft_peering_config[key] = value + ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs._configure(_setter, **microsoft_peering_config) __props__.__dict__["microsoft_peering_config"] = microsoft_peering_config __props__.__dict__["peer_asn"] = peer_asn if peering_type is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/network/express_route_connection.py b/sdk/python/pulumi_azure/network/express_route_connection.py index 225319d51e..91db5414e9 100644 --- a/sdk/python/pulumi_azure/network/express_route_connection.py +++ b/sdk/python/pulumi_azure/network/express_route_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,20 +35,61 @@ def __init__(__self__, *, :param pulumi.Input['ExpressRouteConnectionRoutingArgs'] routing: A `routing` block as defined below. :param pulumi.Input[int] routing_weight: The routing weight associated to the Express Route Connection. Possible value is between `0` and `32000`. Defaults to `0`. """ - pulumi.set(__self__, "express_route_circuit_peering_id", express_route_circuit_peering_id) - pulumi.set(__self__, "express_route_gateway_id", express_route_gateway_id) + ExpressRouteConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + express_route_circuit_peering_id=express_route_circuit_peering_id, + express_route_gateway_id=express_route_gateway_id, + authorization_key=authorization_key, + enable_internet_security=enable_internet_security, + express_route_gateway_bypass_enabled=express_route_gateway_bypass_enabled, + name=name, + routing=routing, + routing_weight=routing_weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + express_route_circuit_peering_id: Optional[pulumi.Input[str]] = None, + express_route_gateway_id: Optional[pulumi.Input[str]] = None, + authorization_key: Optional[pulumi.Input[str]] = None, + enable_internet_security: Optional[pulumi.Input[bool]] = None, + express_route_gateway_bypass_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + routing: Optional[pulumi.Input['ExpressRouteConnectionRoutingArgs']] = None, + routing_weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if express_route_circuit_peering_id is None and 'expressRouteCircuitPeeringId' in kwargs: + express_route_circuit_peering_id = kwargs['expressRouteCircuitPeeringId'] + if express_route_circuit_peering_id is None: + raise TypeError("Missing 'express_route_circuit_peering_id' argument") + if express_route_gateway_id is None and 'expressRouteGatewayId' in kwargs: + express_route_gateway_id = kwargs['expressRouteGatewayId'] + if express_route_gateway_id is None: + raise TypeError("Missing 'express_route_gateway_id' argument") + if authorization_key is None and 'authorizationKey' in kwargs: + authorization_key = kwargs['authorizationKey'] + if enable_internet_security is None and 'enableInternetSecurity' in kwargs: + enable_internet_security = kwargs['enableInternetSecurity'] + if express_route_gateway_bypass_enabled is None and 'expressRouteGatewayBypassEnabled' in kwargs: + express_route_gateway_bypass_enabled = kwargs['expressRouteGatewayBypassEnabled'] + if routing_weight is None and 'routingWeight' in kwargs: + routing_weight = kwargs['routingWeight'] + + _setter("express_route_circuit_peering_id", express_route_circuit_peering_id) + _setter("express_route_gateway_id", express_route_gateway_id) if authorization_key is not None: - pulumi.set(__self__, "authorization_key", authorization_key) + _setter("authorization_key", authorization_key) if enable_internet_security is not None: - pulumi.set(__self__, "enable_internet_security", enable_internet_security) + _setter("enable_internet_security", enable_internet_security) if express_route_gateway_bypass_enabled is not None: - pulumi.set(__self__, "express_route_gateway_bypass_enabled", express_route_gateway_bypass_enabled) + _setter("express_route_gateway_bypass_enabled", express_route_gateway_bypass_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if routing is not None: - pulumi.set(__self__, "routing", routing) + _setter("routing", routing) if routing_weight is not None: - pulumi.set(__self__, "routing_weight", routing_weight) + _setter("routing_weight", routing_weight) @property @pulumi.getter(name="expressRouteCircuitPeeringId") @@ -169,22 +210,59 @@ def __init__(__self__, *, :param pulumi.Input['ExpressRouteConnectionRoutingArgs'] routing: A `routing` block as defined below. :param pulumi.Input[int] routing_weight: The routing weight associated to the Express Route Connection. Possible value is between `0` and `32000`. Defaults to `0`. """ + _ExpressRouteConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorization_key=authorization_key, + enable_internet_security=enable_internet_security, + express_route_circuit_peering_id=express_route_circuit_peering_id, + express_route_gateway_bypass_enabled=express_route_gateway_bypass_enabled, + express_route_gateway_id=express_route_gateway_id, + name=name, + routing=routing, + routing_weight=routing_weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorization_key: Optional[pulumi.Input[str]] = None, + enable_internet_security: Optional[pulumi.Input[bool]] = None, + express_route_circuit_peering_id: Optional[pulumi.Input[str]] = None, + express_route_gateway_bypass_enabled: Optional[pulumi.Input[bool]] = None, + express_route_gateway_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + routing: Optional[pulumi.Input['ExpressRouteConnectionRoutingArgs']] = None, + routing_weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorization_key is None and 'authorizationKey' in kwargs: + authorization_key = kwargs['authorizationKey'] + if enable_internet_security is None and 'enableInternetSecurity' in kwargs: + enable_internet_security = kwargs['enableInternetSecurity'] + if express_route_circuit_peering_id is None and 'expressRouteCircuitPeeringId' in kwargs: + express_route_circuit_peering_id = kwargs['expressRouteCircuitPeeringId'] + if express_route_gateway_bypass_enabled is None and 'expressRouteGatewayBypassEnabled' in kwargs: + express_route_gateway_bypass_enabled = kwargs['expressRouteGatewayBypassEnabled'] + if express_route_gateway_id is None and 'expressRouteGatewayId' in kwargs: + express_route_gateway_id = kwargs['expressRouteGatewayId'] + if routing_weight is None and 'routingWeight' in kwargs: + routing_weight = kwargs['routingWeight'] + if authorization_key is not None: - pulumi.set(__self__, "authorization_key", authorization_key) + _setter("authorization_key", authorization_key) if enable_internet_security is not None: - pulumi.set(__self__, "enable_internet_security", enable_internet_security) + _setter("enable_internet_security", enable_internet_security) if express_route_circuit_peering_id is not None: - pulumi.set(__self__, "express_route_circuit_peering_id", express_route_circuit_peering_id) + _setter("express_route_circuit_peering_id", express_route_circuit_peering_id) if express_route_gateway_bypass_enabled is not None: - pulumi.set(__self__, "express_route_gateway_bypass_enabled", express_route_gateway_bypass_enabled) + _setter("express_route_gateway_bypass_enabled", express_route_gateway_bypass_enabled) if express_route_gateway_id is not None: - pulumi.set(__self__, "express_route_gateway_id", express_route_gateway_id) + _setter("express_route_gateway_id", express_route_gateway_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if routing is not None: - pulumi.set(__self__, "routing", routing) + _setter("routing", routing) if routing_weight is not None: - pulumi.set(__self__, "routing_weight", routing_weight) + _setter("routing_weight", routing_weight) @property @pulumi.getter(name="authorizationKey") @@ -448,6 +526,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ExpressRouteConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -480,6 +562,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'express_route_gateway_id'") __props__.__dict__["express_route_gateway_id"] = express_route_gateway_id __props__.__dict__["name"] = name + if routing is not None and not isinstance(routing, ExpressRouteConnectionRoutingArgs): + routing = routing or {} + def _setter(key, value): + routing[key] = value + ExpressRouteConnectionRoutingArgs._configure(_setter, **routing) __props__.__dict__["routing"] = routing __props__.__dict__["routing_weight"] = routing_weight super(ExpressRouteConnection, __self__).__init__( diff --git a/sdk/python/pulumi_azure/network/express_route_gateway.py b/sdk/python/pulumi_azure/network/express_route_gateway.py index 3585e82f7c..9a6e3f4758 100644 --- a/sdk/python/pulumi_azure/network/express_route_gateway.py +++ b/sdk/python/pulumi_azure/network/express_route_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ExpressRouteGatewayArgs', 'ExpressRouteGateway'] @@ -31,17 +31,54 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the ExpressRoute gateway. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scale_units", scale_units) - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + ExpressRouteGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + scale_units=scale_units, + virtual_hub_id=virtual_hub_id, + allow_non_virtual_wan_traffic=allow_non_virtual_wan_traffic, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + scale_units: Optional[pulumi.Input[int]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + allow_non_virtual_wan_traffic: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scale_units is None and 'scaleUnits' in kwargs: + scale_units = kwargs['scaleUnits'] + if scale_units is None: + raise TypeError("Missing 'scale_units' argument") + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + if allow_non_virtual_wan_traffic is None and 'allowNonVirtualWanTraffic' in kwargs: + allow_non_virtual_wan_traffic = kwargs['allowNonVirtualWanTraffic'] + + _setter("resource_group_name", resource_group_name) + _setter("scale_units", scale_units) + _setter("virtual_hub_id", virtual_hub_id) if allow_non_virtual_wan_traffic is not None: - pulumi.set(__self__, "allow_non_virtual_wan_traffic", allow_non_virtual_wan_traffic) + _setter("allow_non_virtual_wan_traffic", allow_non_virtual_wan_traffic) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -148,20 +185,51 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] virtual_hub_id: The ID of a Virtual HUB within which the ExpressRoute gateway should be created. Changing this forces a new resource to be created. """ + _ExpressRouteGatewayState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_non_virtual_wan_traffic=allow_non_virtual_wan_traffic, + location=location, + name=name, + resource_group_name=resource_group_name, + scale_units=scale_units, + tags=tags, + virtual_hub_id=virtual_hub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_non_virtual_wan_traffic: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scale_units: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_non_virtual_wan_traffic is None and 'allowNonVirtualWanTraffic' in kwargs: + allow_non_virtual_wan_traffic = kwargs['allowNonVirtualWanTraffic'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if scale_units is None and 'scaleUnits' in kwargs: + scale_units = kwargs['scaleUnits'] + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if allow_non_virtual_wan_traffic is not None: - pulumi.set(__self__, "allow_non_virtual_wan_traffic", allow_non_virtual_wan_traffic) + _setter("allow_non_virtual_wan_traffic", allow_non_virtual_wan_traffic) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scale_units is not None: - pulumi.set(__self__, "scale_units", scale_units) + _setter("scale_units", scale_units) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_hub_id is not None: - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + _setter("virtual_hub_id", virtual_hub_id) @property @pulumi.getter(name="allowNonVirtualWanTraffic") @@ -359,6 +427,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ExpressRouteGatewayArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/express_route_port.py b/sdk/python/pulumi_azure/network/express_route_port.py index 98f9d97b67..36572360c2 100644 --- a/sdk/python/pulumi_azure/network/express_route_port.py +++ b/sdk/python/pulumi_azure/network/express_route_port.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,24 +41,71 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Express Route Port. Changing this forces a new Express Route Port to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Express Route Port. """ - pulumi.set(__self__, "bandwidth_in_gbps", bandwidth_in_gbps) - pulumi.set(__self__, "encapsulation", encapsulation) - pulumi.set(__self__, "peering_location", peering_location) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ExpressRoutePortArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bandwidth_in_gbps=bandwidth_in_gbps, + encapsulation=encapsulation, + peering_location=peering_location, + resource_group_name=resource_group_name, + billing_type=billing_type, + identity=identity, + link1=link1, + link2=link2, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bandwidth_in_gbps: Optional[pulumi.Input[int]] = None, + encapsulation: Optional[pulumi.Input[str]] = None, + peering_location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + billing_type: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ExpressRoutePortIdentityArgs']] = None, + link1: Optional[pulumi.Input['ExpressRoutePortLink1Args']] = None, + link2: Optional[pulumi.Input['ExpressRoutePortLink2Args']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bandwidth_in_gbps is None and 'bandwidthInGbps' in kwargs: + bandwidth_in_gbps = kwargs['bandwidthInGbps'] + if bandwidth_in_gbps is None: + raise TypeError("Missing 'bandwidth_in_gbps' argument") + if encapsulation is None: + raise TypeError("Missing 'encapsulation' argument") + if peering_location is None and 'peeringLocation' in kwargs: + peering_location = kwargs['peeringLocation'] + if peering_location is None: + raise TypeError("Missing 'peering_location' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if billing_type is None and 'billingType' in kwargs: + billing_type = kwargs['billingType'] + + _setter("bandwidth_in_gbps", bandwidth_in_gbps) + _setter("encapsulation", encapsulation) + _setter("peering_location", peering_location) + _setter("resource_group_name", resource_group_name) if billing_type is not None: - pulumi.set(__self__, "billing_type", billing_type) + _setter("billing_type", billing_type) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if link1 is not None: - pulumi.set(__self__, "link1", link1) + _setter("link1", link1) if link2 is not None: - pulumi.set(__self__, "link2", link2) + _setter("link2", link2) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="bandwidthInGbps") @@ -227,34 +274,79 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Express Route Port should exist. Changing this forces a new Express Route Port to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Express Route Port. """ + _ExpressRoutePortState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bandwidth_in_gbps=bandwidth_in_gbps, + billing_type=billing_type, + encapsulation=encapsulation, + ethertype=ethertype, + guid=guid, + identity=identity, + link1=link1, + link2=link2, + location=location, + mtu=mtu, + name=name, + peering_location=peering_location, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bandwidth_in_gbps: Optional[pulumi.Input[int]] = None, + billing_type: Optional[pulumi.Input[str]] = None, + encapsulation: Optional[pulumi.Input[str]] = None, + ethertype: Optional[pulumi.Input[str]] = None, + guid: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ExpressRoutePortIdentityArgs']] = None, + link1: Optional[pulumi.Input['ExpressRoutePortLink1Args']] = None, + link2: Optional[pulumi.Input['ExpressRoutePortLink2Args']] = None, + location: Optional[pulumi.Input[str]] = None, + mtu: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + peering_location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bandwidth_in_gbps is None and 'bandwidthInGbps' in kwargs: + bandwidth_in_gbps = kwargs['bandwidthInGbps'] + if billing_type is None and 'billingType' in kwargs: + billing_type = kwargs['billingType'] + if peering_location is None and 'peeringLocation' in kwargs: + peering_location = kwargs['peeringLocation'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if bandwidth_in_gbps is not None: - pulumi.set(__self__, "bandwidth_in_gbps", bandwidth_in_gbps) + _setter("bandwidth_in_gbps", bandwidth_in_gbps) if billing_type is not None: - pulumi.set(__self__, "billing_type", billing_type) + _setter("billing_type", billing_type) if encapsulation is not None: - pulumi.set(__self__, "encapsulation", encapsulation) + _setter("encapsulation", encapsulation) if ethertype is not None: - pulumi.set(__self__, "ethertype", ethertype) + _setter("ethertype", ethertype) if guid is not None: - pulumi.set(__self__, "guid", guid) + _setter("guid", guid) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if link1 is not None: - pulumi.set(__self__, "link1", link1) + _setter("link1", link1) if link2 is not None: - pulumi.set(__self__, "link2", link2) + _setter("link2", link2) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mtu is not None: - pulumi.set(__self__, "mtu", mtu) + _setter("mtu", mtu) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if peering_location is not None: - pulumi.set(__self__, "peering_location", peering_location) + _setter("peering_location", peering_location) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="bandwidthInGbps") @@ -524,6 +616,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ExpressRoutePortArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -556,8 +652,23 @@ def _internal_init(__self__, if encapsulation is None and not opts.urn: raise TypeError("Missing required property 'encapsulation'") __props__.__dict__["encapsulation"] = encapsulation + if identity is not None and not isinstance(identity, ExpressRoutePortIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ExpressRoutePortIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity + if link1 is not None and not isinstance(link1, ExpressRoutePortLink1Args): + link1 = link1 or {} + def _setter(key, value): + link1[key] = value + ExpressRoutePortLink1Args._configure(_setter, **link1) __props__.__dict__["link1"] = link1 + if link2 is not None and not isinstance(link2, ExpressRoutePortLink2Args): + link2 = link2 or {} + def _setter(key, value): + link2[key] = value + ExpressRoutePortLink2Args._configure(_setter, **link2) __props__.__dict__["link2"] = link2 __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/network/express_route_port_authorization.py b/sdk/python/pulumi_azure/network/express_route_port_authorization.py index 84b43e6c2f..517e4755a3 100644 --- a/sdk/python/pulumi_azure/network/express_route_port_authorization.py +++ b/sdk/python/pulumi_azure/network/express_route_port_authorization.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ExpressRoutePortAuthorizationArgs', 'ExpressRoutePortAuthorization'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the ExpressRoute Port. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the ExpressRoute Port. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "express_route_port_name", express_route_port_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ExpressRoutePortAuthorizationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + express_route_port_name=express_route_port_name, + resource_group_name=resource_group_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + express_route_port_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if express_route_port_name is None and 'expressRoutePortName' in kwargs: + express_route_port_name = kwargs['expressRoutePortName'] + if express_route_port_name is None: + raise TypeError("Missing 'express_route_port_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("express_route_port_name", express_route_port_name) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="expressRoutePortName") @@ -81,16 +104,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the ExpressRoute Port. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the ExpressRoute Port. Changing this forces a new resource to be created. """ + _ExpressRoutePortAuthorizationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorization_key=authorization_key, + authorization_use_status=authorization_use_status, + express_route_port_name=express_route_port_name, + name=name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorization_key: Optional[pulumi.Input[str]] = None, + authorization_use_status: Optional[pulumi.Input[str]] = None, + express_route_port_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorization_key is None and 'authorizationKey' in kwargs: + authorization_key = kwargs['authorizationKey'] + if authorization_use_status is None and 'authorizationUseStatus' in kwargs: + authorization_use_status = kwargs['authorizationUseStatus'] + if express_route_port_name is None and 'expressRoutePortName' in kwargs: + express_route_port_name = kwargs['expressRoutePortName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if authorization_key is not None: - pulumi.set(__self__, "authorization_key", authorization_key) + _setter("authorization_key", authorization_key) if authorization_use_status is not None: - pulumi.set(__self__, "authorization_use_status", authorization_use_status) + _setter("authorization_use_status", authorization_use_status) if express_route_port_name is not None: - pulumi.set(__self__, "express_route_port_name", express_route_port_name) + _setter("express_route_port_name", express_route_port_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="authorizationKey") @@ -242,6 +292,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ExpressRoutePortAuthorizationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/firewall.py b/sdk/python/pulumi_azure/network/firewall.py index fdb53e60e3..4f915fa015 100644 --- a/sdk/python/pulumi_azure/network/firewall.py +++ b/sdk/python/pulumi_azure/network/firewall.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,31 +49,94 @@ def __init__(__self__, *, > **Please Note**: Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "sku_tier", sku_tier) + FirewallArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + sku_tier=sku_tier, + dns_servers=dns_servers, + firewall_policy_id=firewall_policy_id, + ip_configurations=ip_configurations, + location=location, + management_ip_configuration=management_ip_configuration, + name=name, + private_ip_ranges=private_ip_ranges, + tags=tags, + threat_intel_mode=threat_intel_mode, + virtual_hub=virtual_hub, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + sku_tier: Optional[pulumi.Input[str]] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + firewall_policy_id: Optional[pulumi.Input[str]] = None, + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallIpConfigurationArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + management_ip_configuration: Optional[pulumi.Input['FirewallManagementIpConfigurationArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + private_ip_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_intel_mode: Optional[pulumi.Input[str]] = None, + virtual_hub: Optional[pulumi.Input['FirewallVirtualHubArgs']] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if sku_tier is None and 'skuTier' in kwargs: + sku_tier = kwargs['skuTier'] + if sku_tier is None: + raise TypeError("Missing 'sku_tier' argument") + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if firewall_policy_id is None and 'firewallPolicyId' in kwargs: + firewall_policy_id = kwargs['firewallPolicyId'] + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if management_ip_configuration is None and 'managementIpConfiguration' in kwargs: + management_ip_configuration = kwargs['managementIpConfiguration'] + if private_ip_ranges is None and 'privateIpRanges' in kwargs: + private_ip_ranges = kwargs['privateIpRanges'] + if threat_intel_mode is None and 'threatIntelMode' in kwargs: + threat_intel_mode = kwargs['threatIntelMode'] + if virtual_hub is None and 'virtualHub' in kwargs: + virtual_hub = kwargs['virtualHub'] + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("sku_tier", sku_tier) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if firewall_policy_id is not None: - pulumi.set(__self__, "firewall_policy_id", firewall_policy_id) + _setter("firewall_policy_id", firewall_policy_id) if ip_configurations is not None: - pulumi.set(__self__, "ip_configurations", ip_configurations) + _setter("ip_configurations", ip_configurations) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if management_ip_configuration is not None: - pulumi.set(__self__, "management_ip_configuration", management_ip_configuration) + _setter("management_ip_configuration", management_ip_configuration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_ip_ranges is not None: - pulumi.set(__self__, "private_ip_ranges", private_ip_ranges) + _setter("private_ip_ranges", private_ip_ranges) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_intel_mode is not None: - pulumi.set(__self__, "threat_intel_mode", threat_intel_mode) + _setter("threat_intel_mode", threat_intel_mode) if virtual_hub is not None: - pulumi.set(__self__, "virtual_hub", virtual_hub) + _setter("virtual_hub", virtual_hub) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="resourceGroupName") @@ -282,34 +345,91 @@ def __init__(__self__, *, > **Please Note**: Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). """ + _FirewallState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_servers=dns_servers, + firewall_policy_id=firewall_policy_id, + ip_configurations=ip_configurations, + location=location, + management_ip_configuration=management_ip_configuration, + name=name, + private_ip_ranges=private_ip_ranges, + resource_group_name=resource_group_name, + sku_name=sku_name, + sku_tier=sku_tier, + tags=tags, + threat_intel_mode=threat_intel_mode, + virtual_hub=virtual_hub, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + firewall_policy_id: Optional[pulumi.Input[str]] = None, + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallIpConfigurationArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + management_ip_configuration: Optional[pulumi.Input['FirewallManagementIpConfigurationArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + private_ip_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + sku_tier: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_intel_mode: Optional[pulumi.Input[str]] = None, + virtual_hub: Optional[pulumi.Input['FirewallVirtualHubArgs']] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if firewall_policy_id is None and 'firewallPolicyId' in kwargs: + firewall_policy_id = kwargs['firewallPolicyId'] + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if management_ip_configuration is None and 'managementIpConfiguration' in kwargs: + management_ip_configuration = kwargs['managementIpConfiguration'] + if private_ip_ranges is None and 'privateIpRanges' in kwargs: + private_ip_ranges = kwargs['privateIpRanges'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_tier is None and 'skuTier' in kwargs: + sku_tier = kwargs['skuTier'] + if threat_intel_mode is None and 'threatIntelMode' in kwargs: + threat_intel_mode = kwargs['threatIntelMode'] + if virtual_hub is None and 'virtualHub' in kwargs: + virtual_hub = kwargs['virtualHub'] + if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if firewall_policy_id is not None: - pulumi.set(__self__, "firewall_policy_id", firewall_policy_id) + _setter("firewall_policy_id", firewall_policy_id) if ip_configurations is not None: - pulumi.set(__self__, "ip_configurations", ip_configurations) + _setter("ip_configurations", ip_configurations) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if management_ip_configuration is not None: - pulumi.set(__self__, "management_ip_configuration", management_ip_configuration) + _setter("management_ip_configuration", management_ip_configuration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_ip_ranges is not None: - pulumi.set(__self__, "private_ip_ranges", private_ip_ranges) + _setter("private_ip_ranges", private_ip_ranges) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if sku_tier is not None: - pulumi.set(__self__, "sku_tier", sku_tier) + _setter("sku_tier", sku_tier) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_intel_mode is not None: - pulumi.set(__self__, "threat_intel_mode", threat_intel_mode) + _setter("threat_intel_mode", threat_intel_mode) if virtual_hub is not None: - pulumi.set(__self__, "virtual_hub", virtual_hub) + _setter("virtual_hub", virtual_hub) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="dnsServers") @@ -623,6 +743,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -655,6 +779,11 @@ def _internal_init(__self__, __props__.__dict__["firewall_policy_id"] = firewall_policy_id __props__.__dict__["ip_configurations"] = ip_configurations __props__.__dict__["location"] = location + if management_ip_configuration is not None and not isinstance(management_ip_configuration, FirewallManagementIpConfigurationArgs): + management_ip_configuration = management_ip_configuration or {} + def _setter(key, value): + management_ip_configuration[key] = value + FirewallManagementIpConfigurationArgs._configure(_setter, **management_ip_configuration) __props__.__dict__["management_ip_configuration"] = management_ip_configuration __props__.__dict__["name"] = name __props__.__dict__["private_ip_ranges"] = private_ip_ranges @@ -669,6 +798,11 @@ def _internal_init(__self__, __props__.__dict__["sku_tier"] = sku_tier __props__.__dict__["tags"] = tags __props__.__dict__["threat_intel_mode"] = threat_intel_mode + if virtual_hub is not None and not isinstance(virtual_hub, FirewallVirtualHubArgs): + virtual_hub = virtual_hub or {} + def _setter(key, value): + virtual_hub[key] = value + FirewallVirtualHubArgs._configure(_setter, **virtual_hub) __props__.__dict__["virtual_hub"] = virtual_hub __props__.__dict__["zones"] = zones super(Firewall, __self__).__init__( diff --git a/sdk/python/pulumi_azure/network/firewall_application_rule_collection.py b/sdk/python/pulumi_azure/network/firewall_application_rule_collection.py index 7d5fcc8db8..dd79469398 100644 --- a/sdk/python/pulumi_azure/network/firewall_application_rule_collection.py +++ b/sdk/python/pulumi_azure/network/firewall_application_rule_collection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,13 +31,48 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FirewallApplicationRuleCollectionRuleArgs']]] rules: One or more `rule` blocks as defined below. :param pulumi.Input[str] name: Specifies the name of the Application Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "azure_firewall_name", azure_firewall_name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "rules", rules) + FirewallApplicationRuleCollectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + azure_firewall_name=azure_firewall_name, + priority=priority, + resource_group_name=resource_group_name, + rules=rules, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + azure_firewall_name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallApplicationRuleCollectionRuleArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if azure_firewall_name is None and 'azureFirewallName' in kwargs: + azure_firewall_name = kwargs['azureFirewallName'] + if azure_firewall_name is None: + raise TypeError("Missing 'azure_firewall_name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if rules is None: + raise TypeError("Missing 'rules' argument") + + _setter("action", action) + _setter("azure_firewall_name", azure_firewall_name) + _setter("priority", priority) + _setter("resource_group_name", resource_group_name) + _setter("rules", rules) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -130,18 +165,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['FirewallApplicationRuleCollectionRuleArgs']]] rules: One or more `rule` blocks as defined below. """ + _FirewallApplicationRuleCollectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + azure_firewall_name=azure_firewall_name, + name=name, + priority=priority, + resource_group_name=resource_group_name, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + azure_firewall_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallApplicationRuleCollectionRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_firewall_name is None and 'azureFirewallName' in kwargs: + azure_firewall_name = kwargs['azureFirewallName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if azure_firewall_name is not None: - pulumi.set(__self__, "azure_firewall_name", azure_firewall_name) + _setter("azure_firewall_name", azure_firewall_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter @@ -367,6 +427,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallApplicationRuleCollectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/firewall_nat_rule_collection.py b/sdk/python/pulumi_azure/network/firewall_nat_rule_collection.py index bcc9838bd4..4896587b5e 100644 --- a/sdk/python/pulumi_azure/network/firewall_nat_rule_collection.py +++ b/sdk/python/pulumi_azure/network/firewall_nat_rule_collection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,13 +31,48 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FirewallNatRuleCollectionRuleArgs']]] rules: One or more `rule` blocks as defined below. :param pulumi.Input[str] name: Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "azure_firewall_name", azure_firewall_name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "rules", rules) + FirewallNatRuleCollectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + azure_firewall_name=azure_firewall_name, + priority=priority, + resource_group_name=resource_group_name, + rules=rules, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + azure_firewall_name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallNatRuleCollectionRuleArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if azure_firewall_name is None and 'azureFirewallName' in kwargs: + azure_firewall_name = kwargs['azureFirewallName'] + if azure_firewall_name is None: + raise TypeError("Missing 'azure_firewall_name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if rules is None: + raise TypeError("Missing 'rules' argument") + + _setter("action", action) + _setter("azure_firewall_name", azure_firewall_name) + _setter("priority", priority) + _setter("resource_group_name", resource_group_name) + _setter("rules", rules) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -130,18 +165,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['FirewallNatRuleCollectionRuleArgs']]] rules: One or more `rule` blocks as defined below. """ + _FirewallNatRuleCollectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + azure_firewall_name=azure_firewall_name, + name=name, + priority=priority, + resource_group_name=resource_group_name, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + azure_firewall_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallNatRuleCollectionRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_firewall_name is None and 'azureFirewallName' in kwargs: + azure_firewall_name = kwargs['azureFirewallName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if azure_firewall_name is not None: - pulumi.set(__self__, "azure_firewall_name", azure_firewall_name) + _setter("azure_firewall_name", azure_firewall_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter @@ -373,6 +433,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallNatRuleCollectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/firewall_network_rule_collection.py b/sdk/python/pulumi_azure/network/firewall_network_rule_collection.py index d72baf1d0d..d87229f93b 100644 --- a/sdk/python/pulumi_azure/network/firewall_network_rule_collection.py +++ b/sdk/python/pulumi_azure/network/firewall_network_rule_collection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,13 +31,48 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FirewallNetworkRuleCollectionRuleArgs']]] rules: One or more `rule` blocks as defined below. :param pulumi.Input[str] name: Specifies the name of the Network Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "azure_firewall_name", azure_firewall_name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "rules", rules) + FirewallNetworkRuleCollectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + azure_firewall_name=azure_firewall_name, + priority=priority, + resource_group_name=resource_group_name, + rules=rules, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + azure_firewall_name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallNetworkRuleCollectionRuleArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if azure_firewall_name is None and 'azureFirewallName' in kwargs: + azure_firewall_name = kwargs['azureFirewallName'] + if azure_firewall_name is None: + raise TypeError("Missing 'azure_firewall_name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if rules is None: + raise TypeError("Missing 'rules' argument") + + _setter("action", action) + _setter("azure_firewall_name", azure_firewall_name) + _setter("priority", priority) + _setter("resource_group_name", resource_group_name) + _setter("rules", rules) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -130,18 +165,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['FirewallNetworkRuleCollectionRuleArgs']]] rules: One or more `rule` blocks as defined below. """ + _FirewallNetworkRuleCollectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + azure_firewall_name=azure_firewall_name, + name=name, + priority=priority, + resource_group_name=resource_group_name, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + azure_firewall_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallNetworkRuleCollectionRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_firewall_name is None and 'azureFirewallName' in kwargs: + azure_firewall_name = kwargs['azureFirewallName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if azure_firewall_name is not None: - pulumi.set(__self__, "azure_firewall_name", azure_firewall_name) + _setter("azure_firewall_name", azure_firewall_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter @@ -375,6 +435,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallNetworkRuleCollectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/firewall_policy.py b/sdk/python/pulumi_azure/network/firewall_policy.py index 4a2118bc0f..937069c71a 100644 --- a/sdk/python/pulumi_azure/network/firewall_policy.py +++ b/sdk/python/pulumi_azure/network/firewall_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -53,39 +53,104 @@ def __init__(__self__, *, :param pulumi.Input[str] threat_intelligence_mode: The operation mode for Threat Intelligence. Possible values are `Alert`, `Deny` and `Off`. Defaults to `Alert`. :param pulumi.Input['FirewallPolicyTlsCertificateArgs'] tls_certificate: A `tls_certificate` block as defined below. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + FirewallPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + auto_learn_private_ranges_enabled=auto_learn_private_ranges_enabled, + base_policy_id=base_policy_id, + dns=dns, + explicit_proxy=explicit_proxy, + identity=identity, + insights=insights, + intrusion_detection=intrusion_detection, + location=location, + name=name, + private_ip_ranges=private_ip_ranges, + sku=sku, + sql_redirect_allowed=sql_redirect_allowed, + tags=tags, + threat_intelligence_allowlist=threat_intelligence_allowlist, + threat_intelligence_mode=threat_intelligence_mode, + tls_certificate=tls_certificate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + auto_learn_private_ranges_enabled: Optional[pulumi.Input[bool]] = None, + base_policy_id: Optional[pulumi.Input[str]] = None, + dns: Optional[pulumi.Input['FirewallPolicyDnsArgs']] = None, + explicit_proxy: Optional[pulumi.Input['FirewallPolicyExplicitProxyArgs']] = None, + identity: Optional[pulumi.Input['FirewallPolicyIdentityArgs']] = None, + insights: Optional[pulumi.Input['FirewallPolicyInsightsArgs']] = None, + intrusion_detection: Optional[pulumi.Input['FirewallPolicyIntrusionDetectionArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_ip_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sku: Optional[pulumi.Input[str]] = None, + sql_redirect_allowed: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_intelligence_allowlist: Optional[pulumi.Input['FirewallPolicyThreatIntelligenceAllowlistArgs']] = None, + threat_intelligence_mode: Optional[pulumi.Input[str]] = None, + tls_certificate: Optional[pulumi.Input['FirewallPolicyTlsCertificateArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if auto_learn_private_ranges_enabled is None and 'autoLearnPrivateRangesEnabled' in kwargs: + auto_learn_private_ranges_enabled = kwargs['autoLearnPrivateRangesEnabled'] + if base_policy_id is None and 'basePolicyId' in kwargs: + base_policy_id = kwargs['basePolicyId'] + if explicit_proxy is None and 'explicitProxy' in kwargs: + explicit_proxy = kwargs['explicitProxy'] + if intrusion_detection is None and 'intrusionDetection' in kwargs: + intrusion_detection = kwargs['intrusionDetection'] + if private_ip_ranges is None and 'privateIpRanges' in kwargs: + private_ip_ranges = kwargs['privateIpRanges'] + if sql_redirect_allowed is None and 'sqlRedirectAllowed' in kwargs: + sql_redirect_allowed = kwargs['sqlRedirectAllowed'] + if threat_intelligence_allowlist is None and 'threatIntelligenceAllowlist' in kwargs: + threat_intelligence_allowlist = kwargs['threatIntelligenceAllowlist'] + if threat_intelligence_mode is None and 'threatIntelligenceMode' in kwargs: + threat_intelligence_mode = kwargs['threatIntelligenceMode'] + if tls_certificate is None and 'tlsCertificate' in kwargs: + tls_certificate = kwargs['tlsCertificate'] + + _setter("resource_group_name", resource_group_name) if auto_learn_private_ranges_enabled is not None: - pulumi.set(__self__, "auto_learn_private_ranges_enabled", auto_learn_private_ranges_enabled) + _setter("auto_learn_private_ranges_enabled", auto_learn_private_ranges_enabled) if base_policy_id is not None: - pulumi.set(__self__, "base_policy_id", base_policy_id) + _setter("base_policy_id", base_policy_id) if dns is not None: - pulumi.set(__self__, "dns", dns) + _setter("dns", dns) if explicit_proxy is not None: - pulumi.set(__self__, "explicit_proxy", explicit_proxy) + _setter("explicit_proxy", explicit_proxy) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if insights is not None: - pulumi.set(__self__, "insights", insights) + _setter("insights", insights) if intrusion_detection is not None: - pulumi.set(__self__, "intrusion_detection", intrusion_detection) + _setter("intrusion_detection", intrusion_detection) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_ip_ranges is not None: - pulumi.set(__self__, "private_ip_ranges", private_ip_ranges) + _setter("private_ip_ranges", private_ip_ranges) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if sql_redirect_allowed is not None: - pulumi.set(__self__, "sql_redirect_allowed", sql_redirect_allowed) + _setter("sql_redirect_allowed", sql_redirect_allowed) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_intelligence_allowlist is not None: - pulumi.set(__self__, "threat_intelligence_allowlist", threat_intelligence_allowlist) + _setter("threat_intelligence_allowlist", threat_intelligence_allowlist) if threat_intelligence_mode is not None: - pulumi.set(__self__, "threat_intelligence_mode", threat_intelligence_mode) + _setter("threat_intelligence_mode", threat_intelligence_mode) if tls_certificate is not None: - pulumi.set(__self__, "tls_certificate", tls_certificate) + _setter("tls_certificate", tls_certificate) @property @pulumi.getter(name="resourceGroupName") @@ -338,46 +403,119 @@ def __init__(__self__, *, :param pulumi.Input[str] threat_intelligence_mode: The operation mode for Threat Intelligence. Possible values are `Alert`, `Deny` and `Off`. Defaults to `Alert`. :param pulumi.Input['FirewallPolicyTlsCertificateArgs'] tls_certificate: A `tls_certificate` block as defined below. """ + _FirewallPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_learn_private_ranges_enabled=auto_learn_private_ranges_enabled, + base_policy_id=base_policy_id, + child_policies=child_policies, + dns=dns, + explicit_proxy=explicit_proxy, + firewalls=firewalls, + identity=identity, + insights=insights, + intrusion_detection=intrusion_detection, + location=location, + name=name, + private_ip_ranges=private_ip_ranges, + resource_group_name=resource_group_name, + rule_collection_groups=rule_collection_groups, + sku=sku, + sql_redirect_allowed=sql_redirect_allowed, + tags=tags, + threat_intelligence_allowlist=threat_intelligence_allowlist, + threat_intelligence_mode=threat_intelligence_mode, + tls_certificate=tls_certificate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_learn_private_ranges_enabled: Optional[pulumi.Input[bool]] = None, + base_policy_id: Optional[pulumi.Input[str]] = None, + child_policies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + dns: Optional[pulumi.Input['FirewallPolicyDnsArgs']] = None, + explicit_proxy: Optional[pulumi.Input['FirewallPolicyExplicitProxyArgs']] = None, + firewalls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + identity: Optional[pulumi.Input['FirewallPolicyIdentityArgs']] = None, + insights: Optional[pulumi.Input['FirewallPolicyInsightsArgs']] = None, + intrusion_detection: Optional[pulumi.Input['FirewallPolicyIntrusionDetectionArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_ip_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rule_collection_groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sku: Optional[pulumi.Input[str]] = None, + sql_redirect_allowed: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_intelligence_allowlist: Optional[pulumi.Input['FirewallPolicyThreatIntelligenceAllowlistArgs']] = None, + threat_intelligence_mode: Optional[pulumi.Input[str]] = None, + tls_certificate: Optional[pulumi.Input['FirewallPolicyTlsCertificateArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_learn_private_ranges_enabled is None and 'autoLearnPrivateRangesEnabled' in kwargs: + auto_learn_private_ranges_enabled = kwargs['autoLearnPrivateRangesEnabled'] + if base_policy_id is None and 'basePolicyId' in kwargs: + base_policy_id = kwargs['basePolicyId'] + if child_policies is None and 'childPolicies' in kwargs: + child_policies = kwargs['childPolicies'] + if explicit_proxy is None and 'explicitProxy' in kwargs: + explicit_proxy = kwargs['explicitProxy'] + if intrusion_detection is None and 'intrusionDetection' in kwargs: + intrusion_detection = kwargs['intrusionDetection'] + if private_ip_ranges is None and 'privateIpRanges' in kwargs: + private_ip_ranges = kwargs['privateIpRanges'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if rule_collection_groups is None and 'ruleCollectionGroups' in kwargs: + rule_collection_groups = kwargs['ruleCollectionGroups'] + if sql_redirect_allowed is None and 'sqlRedirectAllowed' in kwargs: + sql_redirect_allowed = kwargs['sqlRedirectAllowed'] + if threat_intelligence_allowlist is None and 'threatIntelligenceAllowlist' in kwargs: + threat_intelligence_allowlist = kwargs['threatIntelligenceAllowlist'] + if threat_intelligence_mode is None and 'threatIntelligenceMode' in kwargs: + threat_intelligence_mode = kwargs['threatIntelligenceMode'] + if tls_certificate is None and 'tlsCertificate' in kwargs: + tls_certificate = kwargs['tlsCertificate'] + if auto_learn_private_ranges_enabled is not None: - pulumi.set(__self__, "auto_learn_private_ranges_enabled", auto_learn_private_ranges_enabled) + _setter("auto_learn_private_ranges_enabled", auto_learn_private_ranges_enabled) if base_policy_id is not None: - pulumi.set(__self__, "base_policy_id", base_policy_id) + _setter("base_policy_id", base_policy_id) if child_policies is not None: - pulumi.set(__self__, "child_policies", child_policies) + _setter("child_policies", child_policies) if dns is not None: - pulumi.set(__self__, "dns", dns) + _setter("dns", dns) if explicit_proxy is not None: - pulumi.set(__self__, "explicit_proxy", explicit_proxy) + _setter("explicit_proxy", explicit_proxy) if firewalls is not None: - pulumi.set(__self__, "firewalls", firewalls) + _setter("firewalls", firewalls) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if insights is not None: - pulumi.set(__self__, "insights", insights) + _setter("insights", insights) if intrusion_detection is not None: - pulumi.set(__self__, "intrusion_detection", intrusion_detection) + _setter("intrusion_detection", intrusion_detection) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_ip_ranges is not None: - pulumi.set(__self__, "private_ip_ranges", private_ip_ranges) + _setter("private_ip_ranges", private_ip_ranges) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rule_collection_groups is not None: - pulumi.set(__self__, "rule_collection_groups", rule_collection_groups) + _setter("rule_collection_groups", rule_collection_groups) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if sql_redirect_allowed is not None: - pulumi.set(__self__, "sql_redirect_allowed", sql_redirect_allowed) + _setter("sql_redirect_allowed", sql_redirect_allowed) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_intelligence_allowlist is not None: - pulumi.set(__self__, "threat_intelligence_allowlist", threat_intelligence_allowlist) + _setter("threat_intelligence_allowlist", threat_intelligence_allowlist) if threat_intelligence_mode is not None: - pulumi.set(__self__, "threat_intelligence_mode", threat_intelligence_mode) + _setter("threat_intelligence_mode", threat_intelligence_mode) if tls_certificate is not None: - pulumi.set(__self__, "tls_certificate", tls_certificate) + _setter("tls_certificate", tls_certificate) @property @pulumi.getter(name="autoLearnPrivateRangesEnabled") @@ -725,6 +863,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -758,10 +900,35 @@ def _internal_init(__self__, __props__.__dict__["auto_learn_private_ranges_enabled"] = auto_learn_private_ranges_enabled __props__.__dict__["base_policy_id"] = base_policy_id + if dns is not None and not isinstance(dns, FirewallPolicyDnsArgs): + dns = dns or {} + def _setter(key, value): + dns[key] = value + FirewallPolicyDnsArgs._configure(_setter, **dns) __props__.__dict__["dns"] = dns + if explicit_proxy is not None and not isinstance(explicit_proxy, FirewallPolicyExplicitProxyArgs): + explicit_proxy = explicit_proxy or {} + def _setter(key, value): + explicit_proxy[key] = value + FirewallPolicyExplicitProxyArgs._configure(_setter, **explicit_proxy) __props__.__dict__["explicit_proxy"] = explicit_proxy + if identity is not None and not isinstance(identity, FirewallPolicyIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + FirewallPolicyIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity + if insights is not None and not isinstance(insights, FirewallPolicyInsightsArgs): + insights = insights or {} + def _setter(key, value): + insights[key] = value + FirewallPolicyInsightsArgs._configure(_setter, **insights) __props__.__dict__["insights"] = insights + if intrusion_detection is not None and not isinstance(intrusion_detection, FirewallPolicyIntrusionDetectionArgs): + intrusion_detection = intrusion_detection or {} + def _setter(key, value): + intrusion_detection[key] = value + FirewallPolicyIntrusionDetectionArgs._configure(_setter, **intrusion_detection) __props__.__dict__["intrusion_detection"] = intrusion_detection __props__.__dict__["location"] = location __props__.__dict__["name"] = name @@ -772,8 +939,18 @@ def _internal_init(__self__, __props__.__dict__["sku"] = sku __props__.__dict__["sql_redirect_allowed"] = sql_redirect_allowed __props__.__dict__["tags"] = tags + if threat_intelligence_allowlist is not None and not isinstance(threat_intelligence_allowlist, FirewallPolicyThreatIntelligenceAllowlistArgs): + threat_intelligence_allowlist = threat_intelligence_allowlist or {} + def _setter(key, value): + threat_intelligence_allowlist[key] = value + FirewallPolicyThreatIntelligenceAllowlistArgs._configure(_setter, **threat_intelligence_allowlist) __props__.__dict__["threat_intelligence_allowlist"] = threat_intelligence_allowlist __props__.__dict__["threat_intelligence_mode"] = threat_intelligence_mode + if tls_certificate is not None and not isinstance(tls_certificate, FirewallPolicyTlsCertificateArgs): + tls_certificate = tls_certificate or {} + def _setter(key, value): + tls_certificate[key] = value + FirewallPolicyTlsCertificateArgs._configure(_setter, **tls_certificate) __props__.__dict__["tls_certificate"] = tls_certificate __props__.__dict__["child_policies"] = None __props__.__dict__["firewalls"] = None diff --git a/sdk/python/pulumi_azure/network/firewall_policy_rule_collection_group.py b/sdk/python/pulumi_azure/network/firewall_policy_rule_collection_group.py index a9482c67f6..c4fcf8829c 100644 --- a/sdk/python/pulumi_azure/network/firewall_policy_rule_collection_group.py +++ b/sdk/python/pulumi_azure/network/firewall_policy_rule_collection_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,16 +31,49 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupNatRuleCollectionArgs']]] nat_rule_collections: One or more `nat_rule_collection` blocks as defined below. :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArgs']]] network_rule_collections: One or more `network_rule_collection` blocks as defined below. """ - pulumi.set(__self__, "firewall_policy_id", firewall_policy_id) - pulumi.set(__self__, "priority", priority) + FirewallPolicyRuleCollectionGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + firewall_policy_id=firewall_policy_id, + priority=priority, + application_rule_collections=application_rule_collections, + name=name, + nat_rule_collections=nat_rule_collections, + network_rule_collections=network_rule_collections, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + firewall_policy_id: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + application_rule_collections: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupApplicationRuleCollectionArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + nat_rule_collections: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupNatRuleCollectionArgs']]]] = None, + network_rule_collections: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if firewall_policy_id is None and 'firewallPolicyId' in kwargs: + firewall_policy_id = kwargs['firewallPolicyId'] + if firewall_policy_id is None: + raise TypeError("Missing 'firewall_policy_id' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if application_rule_collections is None and 'applicationRuleCollections' in kwargs: + application_rule_collections = kwargs['applicationRuleCollections'] + if nat_rule_collections is None and 'natRuleCollections' in kwargs: + nat_rule_collections = kwargs['natRuleCollections'] + if network_rule_collections is None and 'networkRuleCollections' in kwargs: + network_rule_collections = kwargs['networkRuleCollections'] + + _setter("firewall_policy_id", firewall_policy_id) + _setter("priority", priority) if application_rule_collections is not None: - pulumi.set(__self__, "application_rule_collections", application_rule_collections) + _setter("application_rule_collections", application_rule_collections) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if nat_rule_collections is not None: - pulumi.set(__self__, "nat_rule_collections", nat_rule_collections) + _setter("nat_rule_collections", nat_rule_collections) if network_rule_collections is not None: - pulumi.set(__self__, "network_rule_collections", network_rule_collections) + _setter("network_rule_collections", network_rule_collections) @property @pulumi.getter(name="firewallPolicyId") @@ -133,18 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArgs']]] network_rule_collections: One or more `network_rule_collection` blocks as defined below. :param pulumi.Input[int] priority: The priority of the Firewall Policy Rule Collection Group. The range is 100-65000. """ + _FirewallPolicyRuleCollectionGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_rule_collections=application_rule_collections, + firewall_policy_id=firewall_policy_id, + name=name, + nat_rule_collections=nat_rule_collections, + network_rule_collections=network_rule_collections, + priority=priority, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_rule_collections: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupApplicationRuleCollectionArgs']]]] = None, + firewall_policy_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + nat_rule_collections: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupNatRuleCollectionArgs']]]] = None, + network_rule_collections: Optional[pulumi.Input[Sequence[pulumi.Input['FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArgs']]]] = None, + priority: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_rule_collections is None and 'applicationRuleCollections' in kwargs: + application_rule_collections = kwargs['applicationRuleCollections'] + if firewall_policy_id is None and 'firewallPolicyId' in kwargs: + firewall_policy_id = kwargs['firewallPolicyId'] + if nat_rule_collections is None and 'natRuleCollections' in kwargs: + nat_rule_collections = kwargs['natRuleCollections'] + if network_rule_collections is None and 'networkRuleCollections' in kwargs: + network_rule_collections = kwargs['networkRuleCollections'] + if application_rule_collections is not None: - pulumi.set(__self__, "application_rule_collections", application_rule_collections) + _setter("application_rule_collections", application_rule_collections) if firewall_policy_id is not None: - pulumi.set(__self__, "firewall_policy_id", firewall_policy_id) + _setter("firewall_policy_id", firewall_policy_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if nat_rule_collections is not None: - pulumi.set(__self__, "nat_rule_collections", nat_rule_collections) + _setter("nat_rule_collections", nat_rule_collections) if network_rule_collections is not None: - pulumi.set(__self__, "network_rule_collections", network_rule_collections) + _setter("network_rule_collections", network_rule_collections) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) @property @pulumi.getter(name="applicationRuleCollections") @@ -278,6 +340,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallPolicyRuleCollectionGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/get_application_gateway.py b/sdk/python/pulumi_azure/network/get_application_gateway.py index 2475e9912e..b5ecf7b6d2 100644 --- a/sdk/python/pulumi_azure/network/get_application_gateway.py +++ b/sdk/python/pulumi_azure/network/get_application_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_application_security_group.py b/sdk/python/pulumi_azure/network/get_application_security_group.py index cd98012977..683bb06eeb 100644 --- a/sdk/python/pulumi_azure/network/get_application_security_group.py +++ b/sdk/python/pulumi_azure/network/get_application_security_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_express_route_circuit.py b/sdk/python/pulumi_azure/network/get_express_route_circuit.py index 1f9b964232..94be70219d 100644 --- a/sdk/python/pulumi_azure/network/get_express_route_circuit.py +++ b/sdk/python/pulumi_azure/network/get_express_route_circuit.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_firewall.py b/sdk/python/pulumi_azure/network/get_firewall.py index bd3b83dea4..45ba1e6a36 100644 --- a/sdk/python/pulumi_azure/network/get_firewall.py +++ b/sdk/python/pulumi_azure/network/get_firewall.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_firewall_policy.py b/sdk/python/pulumi_azure/network/get_firewall_policy.py index edd1ebc25b..25f1fcbeb7 100644 --- a/sdk/python/pulumi_azure/network/get_firewall_policy.py +++ b/sdk/python/pulumi_azure/network/get_firewall_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_gateway_connection.py b/sdk/python/pulumi_azure/network/get_gateway_connection.py index 8fc97f3c0d..bfc81a5562 100644 --- a/sdk/python/pulumi_azure/network/get_gateway_connection.py +++ b/sdk/python/pulumi_azure/network/get_gateway_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_ip_group.py b/sdk/python/pulumi_azure/network/get_ip_group.py index d137defb2e..19b2c421f2 100644 --- a/sdk/python/pulumi_azure/network/get_ip_group.py +++ b/sdk/python/pulumi_azure/network/get_ip_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_local_network_gateway.py b/sdk/python/pulumi_azure/network/get_local_network_gateway.py index ebb7f6d799..8ac96ff4f8 100644 --- a/sdk/python/pulumi_azure/network/get_local_network_gateway.py +++ b/sdk/python/pulumi_azure/network/get_local_network_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_nat_gateway.py b/sdk/python/pulumi_azure/network/get_nat_gateway.py index 5f88dbec0e..a6a3ac5a04 100644 --- a/sdk/python/pulumi_azure/network/get_nat_gateway.py +++ b/sdk/python/pulumi_azure/network/get_nat_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_network_ddos_protection_plan.py b/sdk/python/pulumi_azure/network/get_network_ddos_protection_plan.py index 0e39209ce7..9e2e7347d8 100644 --- a/sdk/python/pulumi_azure/network/get_network_ddos_protection_plan.py +++ b/sdk/python/pulumi_azure/network/get_network_ddos_protection_plan.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_network_interface.py b/sdk/python/pulumi_azure/network/get_network_interface.py index b5359cae89..c4d62e637f 100644 --- a/sdk/python/pulumi_azure/network/get_network_interface.py +++ b/sdk/python/pulumi_azure/network/get_network_interface.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_network_manager_network_group.py b/sdk/python/pulumi_azure/network/get_network_manager_network_group.py index be91a878d8..9b6c6a9e80 100644 --- a/sdk/python/pulumi_azure/network/get_network_manager_network_group.py +++ b/sdk/python/pulumi_azure/network/get_network_manager_network_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_network_security_group.py b/sdk/python/pulumi_azure/network/get_network_security_group.py index 5197c0088d..29b76f415b 100644 --- a/sdk/python/pulumi_azure/network/get_network_security_group.py +++ b/sdk/python/pulumi_azure/network/get_network_security_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_network_watcher.py b/sdk/python/pulumi_azure/network/get_network_watcher.py index a09bb9d00a..4d1ad046a5 100644 --- a/sdk/python/pulumi_azure/network/get_network_watcher.py +++ b/sdk/python/pulumi_azure/network/get_network_watcher.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_public_i_ps.py b/sdk/python/pulumi_azure/network/get_public_i_ps.py index fea82f948d..8250cae6e9 100644 --- a/sdk/python/pulumi_azure/network/get_public_i_ps.py +++ b/sdk/python/pulumi_azure/network/get_public_i_ps.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_public_ip.py b/sdk/python/pulumi_azure/network/get_public_ip.py index 8642dfc591..3031ec637c 100644 --- a/sdk/python/pulumi_azure/network/get_public_ip.py +++ b/sdk/python/pulumi_azure/network/get_public_ip.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_public_ip_prefix.py b/sdk/python/pulumi_azure/network/get_public_ip_prefix.py index b5f0f859e3..1b1fcfad1a 100644 --- a/sdk/python/pulumi_azure/network/get_public_ip_prefix.py +++ b/sdk/python/pulumi_azure/network/get_public_ip_prefix.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_route_filter.py b/sdk/python/pulumi_azure/network/get_route_filter.py index 4cfaf42306..40c82cb23c 100644 --- a/sdk/python/pulumi_azure/network/get_route_filter.py +++ b/sdk/python/pulumi_azure/network/get_route_filter.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_route_table.py b/sdk/python/pulumi_azure/network/get_route_table.py index f9dedc3794..43971ac9d0 100644 --- a/sdk/python/pulumi_azure/network/get_route_table.py +++ b/sdk/python/pulumi_azure/network/get_route_table.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_service_tags.py b/sdk/python/pulumi_azure/network/get_service_tags.py index 60d9985b71..6affce9ebb 100644 --- a/sdk/python/pulumi_azure/network/get_service_tags.py +++ b/sdk/python/pulumi_azure/network/get_service_tags.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_subnet.py b/sdk/python/pulumi_azure/network/get_subnet.py index 788039e001..6e46be6c67 100644 --- a/sdk/python/pulumi_azure/network/get_subnet.py +++ b/sdk/python/pulumi_azure/network/get_subnet.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_traffic_manager.py b/sdk/python/pulumi_azure/network/get_traffic_manager.py index 1c4a6cebae..456ef72397 100644 --- a/sdk/python/pulumi_azure/network/get_traffic_manager.py +++ b/sdk/python/pulumi_azure/network/get_traffic_manager.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_traffic_manager_profile.py b/sdk/python/pulumi_azure/network/get_traffic_manager_profile.py index 867e949384..4f8c59c808 100644 --- a/sdk/python/pulumi_azure/network/get_traffic_manager_profile.py +++ b/sdk/python/pulumi_azure/network/get_traffic_manager_profile.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_virtual_hub.py b/sdk/python/pulumi_azure/network/get_virtual_hub.py index e95e387be6..b117d9a3c6 100644 --- a/sdk/python/pulumi_azure/network/get_virtual_hub.py +++ b/sdk/python/pulumi_azure/network/get_virtual_hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_virtual_hub_connection.py b/sdk/python/pulumi_azure/network/get_virtual_hub_connection.py index e655a42aae..b1137a1582 100644 --- a/sdk/python/pulumi_azure/network/get_virtual_hub_connection.py +++ b/sdk/python/pulumi_azure/network/get_virtual_hub_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_virtual_hub_route_table.py b/sdk/python/pulumi_azure/network/get_virtual_hub_route_table.py index 798e01d0e0..931e445629 100644 --- a/sdk/python/pulumi_azure/network/get_virtual_hub_route_table.py +++ b/sdk/python/pulumi_azure/network/get_virtual_hub_route_table.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_virtual_network.py b/sdk/python/pulumi_azure/network/get_virtual_network.py index 8ffa9c7b92..bf9ca429f0 100644 --- a/sdk/python/pulumi_azure/network/get_virtual_network.py +++ b/sdk/python/pulumi_azure/network/get_virtual_network.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_virtual_network_gateway.py b/sdk/python/pulumi_azure/network/get_virtual_network_gateway.py index 0af0bba52b..eae1240670 100644 --- a/sdk/python/pulumi_azure/network/get_virtual_network_gateway.py +++ b/sdk/python/pulumi_azure/network/get_virtual_network_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/get_virtual_wan.py b/sdk/python/pulumi_azure/network/get_virtual_wan.py index 7dbcc0147e..23d0ebcaab 100644 --- a/sdk/python/pulumi_azure/network/get_virtual_wan.py +++ b/sdk/python/pulumi_azure/network/get_virtual_wan.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/network/get_vpn_gateway.py b/sdk/python/pulumi_azure/network/get_vpn_gateway.py index 2f69561f79..ae7c8043b9 100644 --- a/sdk/python/pulumi_azure/network/get_vpn_gateway.py +++ b/sdk/python/pulumi_azure/network/get_vpn_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/network/ip_group.py b/sdk/python/pulumi_azure/network/ip_group.py index 65984f444f..4b7508d6b7 100644 --- a/sdk/python/pulumi_azure/network/ip_group.py +++ b/sdk/python/pulumi_azure/network/ip_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IPGroupArgs', 'IPGroup'] @@ -26,15 +26,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the IP group. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + IPGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + cidrs=cidrs, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if cidrs is not None: - pulumi.set(__self__, "cidrs", cidrs) + _setter("cidrs", cidrs) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -113,20 +136,49 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the IP group. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _IPGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cidrs=cidrs, + firewall_ids=firewall_ids, + firewall_policy_ids=firewall_policy_ids, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + firewall_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + firewall_policy_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if firewall_ids is None and 'firewallIds' in kwargs: + firewall_ids = kwargs['firewallIds'] + if firewall_policy_ids is None and 'firewallPolicyIds' in kwargs: + firewall_policy_ids = kwargs['firewallPolicyIds'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if cidrs is not None: - pulumi.set(__self__, "cidrs", cidrs) + _setter("cidrs", cidrs) if firewall_ids is not None: - pulumi.set(__self__, "firewall_ids", firewall_ids) + _setter("firewall_ids", firewall_ids) if firewall_policy_ids is not None: - pulumi.set(__self__, "firewall_policy_ids", firewall_policy_ids) + _setter("firewall_policy_ids", firewall_policy_ids) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -306,6 +358,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IPGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/ip_group_cidr.py b/sdk/python/pulumi_azure/network/ip_group_cidr.py index ee76e1c7ad..ff07759654 100644 --- a/sdk/python/pulumi_azure/network/ip_group_cidr.py +++ b/sdk/python/pulumi_azure/network/ip_group_cidr.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IPGroupCIDRArgs', 'IPGroupCIDR'] @@ -21,8 +21,27 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_group_id: The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created. """ - pulumi.set(__self__, "cidr", cidr) - pulumi.set(__self__, "ip_group_id", ip_group_id) + IPGroupCIDRArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cidr=cidr, + ip_group_id=ip_group_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cidr: Optional[pulumi.Input[str]] = None, + ip_group_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cidr is None: + raise TypeError("Missing 'cidr' argument") + if ip_group_id is None and 'ipGroupId' in kwargs: + ip_group_id = kwargs['ipGroupId'] + if ip_group_id is None: + raise TypeError("Missing 'ip_group_id' argument") + + _setter("cidr", cidr) + _setter("ip_group_id", ip_group_id) @property @pulumi.getter @@ -57,10 +76,25 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_group_id: The ID of the destination IP Group. Changing this forces a new IP Group CIDR to be created. """ + _IPGroupCIDRState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cidr=cidr, + ip_group_id=ip_group_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cidr: Optional[pulumi.Input[str]] = None, + ip_group_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_group_id is None and 'ipGroupId' in kwargs: + ip_group_id = kwargs['ipGroupId'] + if cidr is not None: - pulumi.set(__self__, "cidr", cidr) + _setter("cidr", cidr) if ip_group_id is not None: - pulumi.set(__self__, "ip_group_id", ip_group_id) + _setter("ip_group_id", ip_group_id) @property @pulumi.getter @@ -174,6 +208,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IPGroupCIDRArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/local_network_gateway.py b/sdk/python/pulumi_azure/network/local_network_gateway.py index b17841181b..7dc4ee6cfc 100644 --- a/sdk/python/pulumi_azure/network/local_network_gateway.py +++ b/sdk/python/pulumi_azure/network/local_network_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,21 +37,58 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the local network gateway. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + LocalNetworkGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + address_spaces=address_spaces, + bgp_settings=bgp_settings, + gateway_address=gateway_address, + gateway_fqdn=gateway_fqdn, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + address_spaces: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + bgp_settings: Optional[pulumi.Input['LocalNetworkGatewayBgpSettingsArgs']] = None, + gateway_address: Optional[pulumi.Input[str]] = None, + gateway_fqdn: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if address_spaces is None and 'addressSpaces' in kwargs: + address_spaces = kwargs['addressSpaces'] + if bgp_settings is None and 'bgpSettings' in kwargs: + bgp_settings = kwargs['bgpSettings'] + if gateway_address is None and 'gatewayAddress' in kwargs: + gateway_address = kwargs['gatewayAddress'] + if gateway_fqdn is None and 'gatewayFqdn' in kwargs: + gateway_fqdn = kwargs['gatewayFqdn'] + + _setter("resource_group_name", resource_group_name) if address_spaces is not None: - pulumi.set(__self__, "address_spaces", address_spaces) + _setter("address_spaces", address_spaces) if bgp_settings is not None: - pulumi.set(__self__, "bgp_settings", bgp_settings) + _setter("bgp_settings", bgp_settings) if gateway_address is not None: - pulumi.set(__self__, "gateway_address", gateway_address) + _setter("gateway_address", gateway_address) if gateway_fqdn is not None: - pulumi.set(__self__, "gateway_fqdn", gateway_fqdn) + _setter("gateway_fqdn", gateway_fqdn) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -176,22 +213,57 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _LocalNetworkGatewayState._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_spaces=address_spaces, + bgp_settings=bgp_settings, + gateway_address=gateway_address, + gateway_fqdn=gateway_fqdn, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_spaces: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + bgp_settings: Optional[pulumi.Input['LocalNetworkGatewayBgpSettingsArgs']] = None, + gateway_address: Optional[pulumi.Input[str]] = None, + gateway_fqdn: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_spaces is None and 'addressSpaces' in kwargs: + address_spaces = kwargs['addressSpaces'] + if bgp_settings is None and 'bgpSettings' in kwargs: + bgp_settings = kwargs['bgpSettings'] + if gateway_address is None and 'gatewayAddress' in kwargs: + gateway_address = kwargs['gatewayAddress'] + if gateway_fqdn is None and 'gatewayFqdn' in kwargs: + gateway_fqdn = kwargs['gatewayFqdn'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if address_spaces is not None: - pulumi.set(__self__, "address_spaces", address_spaces) + _setter("address_spaces", address_spaces) if bgp_settings is not None: - pulumi.set(__self__, "bgp_settings", bgp_settings) + _setter("bgp_settings", bgp_settings) if gateway_address is not None: - pulumi.set(__self__, "gateway_address", gateway_address) + _setter("gateway_address", gateway_address) if gateway_fqdn is not None: - pulumi.set(__self__, "gateway_fqdn", gateway_fqdn) + _setter("gateway_fqdn", gateway_fqdn) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="addressSpaces") @@ -385,6 +457,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LocalNetworkGatewayArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -408,6 +484,11 @@ def _internal_init(__self__, __props__ = LocalNetworkGatewayArgs.__new__(LocalNetworkGatewayArgs) __props__.__dict__["address_spaces"] = address_spaces + if bgp_settings is not None and not isinstance(bgp_settings, LocalNetworkGatewayBgpSettingsArgs): + bgp_settings = bgp_settings or {} + def _setter(key, value): + bgp_settings[key] = value + LocalNetworkGatewayBgpSettingsArgs._configure(_setter, **bgp_settings) __props__.__dict__["bgp_settings"] = bgp_settings __props__.__dict__["gateway_address"] = gateway_address __props__.__dict__["gateway_fqdn"] = gateway_fqdn diff --git a/sdk/python/pulumi_azure/network/nat_gateway.py b/sdk/python/pulumi_azure/network/nat_gateway.py index 4f5b3eeee3..6440bb9e36 100644 --- a/sdk/python/pulumi_azure/network/nat_gateway.py +++ b/sdk/python/pulumi_azure/network/nat_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NatGatewayArgs', 'NatGateway'] @@ -33,19 +33,50 @@ def __init__(__self__, *, > **NOTE:** Only one Availability Zone can be defined. For more information, please check out the [Azure documentation](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview#availability-zones) """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + NatGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + idle_timeout_in_minutes=idle_timeout_in_minutes, + location=location, + name=name, + sku_name=sku_name, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + + _setter("resource_group_name", resource_group_name) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="resourceGroupName") @@ -158,22 +189,55 @@ def __init__(__self__, *, > **NOTE:** Only one Availability Zone can be defined. For more information, please check out the [Azure documentation](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview#availability-zones) """ + _NatGatewayState._configure( + lambda key, value: pulumi.set(__self__, key, value), + idle_timeout_in_minutes=idle_timeout_in_minutes, + location=location, + name=name, + resource_group_name=resource_group_name, + resource_guid=resource_guid, + sku_name=sku_name, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + resource_guid: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_guid is None and 'resourceGuid' in kwargs: + resource_guid = kwargs['resourceGuid'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if resource_guid is not None: - pulumi.set(__self__, "resource_guid", resource_guid) + _setter("resource_guid", resource_guid) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="idleTimeoutInMinutes") @@ -371,6 +435,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NatGatewayArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/nat_gateway_public_ip_association.py b/sdk/python/pulumi_azure/network/nat_gateway_public_ip_association.py index 079b19e478..02b07ff304 100644 --- a/sdk/python/pulumi_azure/network/nat_gateway_public_ip_association.py +++ b/sdk/python/pulumi_azure/network/nat_gateway_public_ip_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NatGatewayPublicIpAssociationArgs', 'NatGatewayPublicIpAssociation'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] nat_gateway_id: The ID of the NAT Gateway. Changing this forces a new resource to be created. :param pulumi.Input[str] public_ip_address_id: The ID of the Public IP which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "nat_gateway_id", nat_gateway_id) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + NatGatewayPublicIpAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + nat_gateway_id=nat_gateway_id, + public_ip_address_id=public_ip_address_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + nat_gateway_id: Optional[pulumi.Input[str]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if nat_gateway_id is None and 'natGatewayId' in kwargs: + nat_gateway_id = kwargs['natGatewayId'] + if nat_gateway_id is None: + raise TypeError("Missing 'nat_gateway_id' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + + _setter("nat_gateway_id", nat_gateway_id) + _setter("public_ip_address_id", public_ip_address_id) @property @pulumi.getter(name="natGatewayId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] nat_gateway_id: The ID of the NAT Gateway. Changing this forces a new resource to be created. :param pulumi.Input[str] public_ip_address_id: The ID of the Public IP which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. """ + _NatGatewayPublicIpAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + nat_gateway_id=nat_gateway_id, + public_ip_address_id=public_ip_address_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + nat_gateway_id: Optional[pulumi.Input[str]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if nat_gateway_id is None and 'natGatewayId' in kwargs: + nat_gateway_id = kwargs['natGatewayId'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if nat_gateway_id is not None: - pulumi.set(__self__, "nat_gateway_id", nat_gateway_id) + _setter("nat_gateway_id", nat_gateway_id) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) @property @pulumi.getter(name="natGatewayId") @@ -182,6 +220,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NatGatewayPublicIpAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/nat_gateway_public_ip_prefix_association.py b/sdk/python/pulumi_azure/network/nat_gateway_public_ip_prefix_association.py index 3a4d1370d7..21f3cfe3d0 100644 --- a/sdk/python/pulumi_azure/network/nat_gateway_public_ip_prefix_association.py +++ b/sdk/python/pulumi_azure/network/nat_gateway_public_ip_prefix_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NatGatewayPublicIpPrefixAssociationArgs', 'NatGatewayPublicIpPrefixAssociation'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] nat_gateway_id: The ID of the NAT Gateway. Changing this forces a new resource to be created. :param pulumi.Input[str] public_ip_prefix_id: The ID of the Public IP Prefix which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "nat_gateway_id", nat_gateway_id) - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) + NatGatewayPublicIpPrefixAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + nat_gateway_id=nat_gateway_id, + public_ip_prefix_id=public_ip_prefix_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + nat_gateway_id: Optional[pulumi.Input[str]] = None, + public_ip_prefix_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if nat_gateway_id is None and 'natGatewayId' in kwargs: + nat_gateway_id = kwargs['natGatewayId'] + if nat_gateway_id is None: + raise TypeError("Missing 'nat_gateway_id' argument") + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + if public_ip_prefix_id is None: + raise TypeError("Missing 'public_ip_prefix_id' argument") + + _setter("nat_gateway_id", nat_gateway_id) + _setter("public_ip_prefix_id", public_ip_prefix_id) @property @pulumi.getter(name="natGatewayId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] nat_gateway_id: The ID of the NAT Gateway. Changing this forces a new resource to be created. :param pulumi.Input[str] public_ip_prefix_id: The ID of the Public IP Prefix which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. """ + _NatGatewayPublicIpPrefixAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + nat_gateway_id=nat_gateway_id, + public_ip_prefix_id=public_ip_prefix_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + nat_gateway_id: Optional[pulumi.Input[str]] = None, + public_ip_prefix_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if nat_gateway_id is None and 'natGatewayId' in kwargs: + nat_gateway_id = kwargs['natGatewayId'] + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + if nat_gateway_id is not None: - pulumi.set(__self__, "nat_gateway_id", nat_gateway_id) + _setter("nat_gateway_id", nat_gateway_id) if public_ip_prefix_id is not None: - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) + _setter("public_ip_prefix_id", public_ip_prefix_id) @property @pulumi.getter(name="natGatewayId") @@ -182,6 +220,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NatGatewayPublicIpPrefixAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_connection_monitor.py b/sdk/python/pulumi_azure/network/network_connection_monitor.py index 783e5b0aca..7d15a1bb0f 100644 --- a/sdk/python/pulumi_azure/network/network_connection_monitor.py +++ b/sdk/python/pulumi_azure/network/network_connection_monitor.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,20 +37,63 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] output_workspace_resource_ids: A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Network Connection Monitor. """ - pulumi.set(__self__, "endpoints", endpoints) - pulumi.set(__self__, "network_watcher_id", network_watcher_id) - pulumi.set(__self__, "test_configurations", test_configurations) - pulumi.set(__self__, "test_groups", test_groups) + NetworkConnectionMonitorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoints=endpoints, + network_watcher_id=network_watcher_id, + test_configurations=test_configurations, + test_groups=test_groups, + location=location, + name=name, + notes=notes, + output_workspace_resource_ids=output_workspace_resource_ids, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkConnectionMonitorEndpointArgs']]]] = None, + network_watcher_id: Optional[pulumi.Input[str]] = None, + test_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkConnectionMonitorTestConfigurationArgs']]]] = None, + test_groups: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkConnectionMonitorTestGroupArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + output_workspace_resource_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoints is None: + raise TypeError("Missing 'endpoints' argument") + if network_watcher_id is None and 'networkWatcherId' in kwargs: + network_watcher_id = kwargs['networkWatcherId'] + if network_watcher_id is None: + raise TypeError("Missing 'network_watcher_id' argument") + if test_configurations is None and 'testConfigurations' in kwargs: + test_configurations = kwargs['testConfigurations'] + if test_configurations is None: + raise TypeError("Missing 'test_configurations' argument") + if test_groups is None and 'testGroups' in kwargs: + test_groups = kwargs['testGroups'] + if test_groups is None: + raise TypeError("Missing 'test_groups' argument") + if output_workspace_resource_ids is None and 'outputWorkspaceResourceIds' in kwargs: + output_workspace_resource_ids = kwargs['outputWorkspaceResourceIds'] + + _setter("endpoints", endpoints) + _setter("network_watcher_id", network_watcher_id) + _setter("test_configurations", test_configurations) + _setter("test_groups", test_groups) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) if output_workspace_resource_ids is not None: - pulumi.set(__self__, "output_workspace_resource_ids", output_workspace_resource_ids) + _setter("output_workspace_resource_ids", output_workspace_resource_ids) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -185,24 +228,59 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['NetworkConnectionMonitorTestConfigurationArgs']]] test_configurations: A `test_configuration` block as defined below. :param pulumi.Input[Sequence[pulumi.Input['NetworkConnectionMonitorTestGroupArgs']]] test_groups: A `test_group` block as defined below. """ + _NetworkConnectionMonitorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoints=endpoints, + location=location, + name=name, + network_watcher_id=network_watcher_id, + notes=notes, + output_workspace_resource_ids=output_workspace_resource_ids, + tags=tags, + test_configurations=test_configurations, + test_groups=test_groups, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkConnectionMonitorEndpointArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_watcher_id: Optional[pulumi.Input[str]] = None, + notes: Optional[pulumi.Input[str]] = None, + output_workspace_resource_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + test_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkConnectionMonitorTestConfigurationArgs']]]] = None, + test_groups: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkConnectionMonitorTestGroupArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_watcher_id is None and 'networkWatcherId' in kwargs: + network_watcher_id = kwargs['networkWatcherId'] + if output_workspace_resource_ids is None and 'outputWorkspaceResourceIds' in kwargs: + output_workspace_resource_ids = kwargs['outputWorkspaceResourceIds'] + if test_configurations is None and 'testConfigurations' in kwargs: + test_configurations = kwargs['testConfigurations'] + if test_groups is None and 'testGroups' in kwargs: + test_groups = kwargs['testGroups'] + if endpoints is not None: - pulumi.set(__self__, "endpoints", endpoints) + _setter("endpoints", endpoints) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_watcher_id is not None: - pulumi.set(__self__, "network_watcher_id", network_watcher_id) + _setter("network_watcher_id", network_watcher_id) if notes is not None: - pulumi.set(__self__, "notes", notes) + _setter("notes", notes) if output_workspace_resource_ids is not None: - pulumi.set(__self__, "output_workspace_resource_ids", output_workspace_resource_ids) + _setter("output_workspace_resource_ids", output_workspace_resource_ids) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if test_configurations is not None: - pulumi.set(__self__, "test_configurations", test_configurations) + _setter("test_configurations", test_configurations) if test_groups is not None: - pulumi.set(__self__, "test_groups", test_groups) + _setter("test_groups", test_groups) @property @pulumi.getter @@ -582,6 +660,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkConnectionMonitorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_interface.py b/sdk/python/pulumi_azure/network/network_interface.py index 13a742cd1d..b604fc007c 100644 --- a/sdk/python/pulumi_azure/network/network_interface.py +++ b/sdk/python/pulumi_azure/network/network_interface.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -53,28 +53,83 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Network Interface. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "resource_group_name", resource_group_name) + NetworkInterfaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + resource_group_name=resource_group_name, + auxiliary_mode=auxiliary_mode, + auxiliary_sku=auxiliary_sku, + dns_servers=dns_servers, + edge_zone=edge_zone, + enable_accelerated_networking=enable_accelerated_networking, + enable_ip_forwarding=enable_ip_forwarding, + internal_dns_name_label=internal_dns_name_label, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkInterfaceIpConfigurationArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + auxiliary_mode: Optional[pulumi.Input[str]] = None, + auxiliary_sku: Optional[pulumi.Input[str]] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + enable_accelerated_networking: Optional[pulumi.Input[bool]] = None, + enable_ip_forwarding: Optional[pulumi.Input[bool]] = None, + internal_dns_name_label: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if auxiliary_mode is None and 'auxiliaryMode' in kwargs: + auxiliary_mode = kwargs['auxiliaryMode'] + if auxiliary_sku is None and 'auxiliarySku' in kwargs: + auxiliary_sku = kwargs['auxiliarySku'] + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if enable_accelerated_networking is None and 'enableAcceleratedNetworking' in kwargs: + enable_accelerated_networking = kwargs['enableAcceleratedNetworking'] + if enable_ip_forwarding is None and 'enableIpForwarding' in kwargs: + enable_ip_forwarding = kwargs['enableIpForwarding'] + if internal_dns_name_label is None and 'internalDnsNameLabel' in kwargs: + internal_dns_name_label = kwargs['internalDnsNameLabel'] + + _setter("ip_configurations", ip_configurations) + _setter("resource_group_name", resource_group_name) if auxiliary_mode is not None: - pulumi.set(__self__, "auxiliary_mode", auxiliary_mode) + _setter("auxiliary_mode", auxiliary_mode) if auxiliary_sku is not None: - pulumi.set(__self__, "auxiliary_sku", auxiliary_sku) + _setter("auxiliary_sku", auxiliary_sku) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if enable_accelerated_networking is not None: - pulumi.set(__self__, "enable_accelerated_networking", enable_accelerated_networking) + _setter("enable_accelerated_networking", enable_accelerated_networking) if enable_ip_forwarding is not None: - pulumi.set(__self__, "enable_ip_forwarding", enable_ip_forwarding) + _setter("enable_ip_forwarding", enable_ip_forwarding) if internal_dns_name_label is not None: - pulumi.set(__self__, "internal_dns_name_label", internal_dns_name_label) + _setter("internal_dns_name_label", internal_dns_name_label) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="ipConfigurations") @@ -283,42 +338,117 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] virtual_machine_id: The ID of the Virtual Machine which this Network Interface is connected to. """ + _NetworkInterfaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + applied_dns_servers=applied_dns_servers, + auxiliary_mode=auxiliary_mode, + auxiliary_sku=auxiliary_sku, + dns_servers=dns_servers, + edge_zone=edge_zone, + enable_accelerated_networking=enable_accelerated_networking, + enable_ip_forwarding=enable_ip_forwarding, + internal_dns_name_label=internal_dns_name_label, + internal_domain_name_suffix=internal_domain_name_suffix, + ip_configurations=ip_configurations, + location=location, + mac_address=mac_address, + name=name, + private_ip_address=private_ip_address, + private_ip_addresses=private_ip_addresses, + resource_group_name=resource_group_name, + tags=tags, + virtual_machine_id=virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + applied_dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + auxiliary_mode: Optional[pulumi.Input[str]] = None, + auxiliary_sku: Optional[pulumi.Input[str]] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + enable_accelerated_networking: Optional[pulumi.Input[bool]] = None, + enable_ip_forwarding: Optional[pulumi.Input[bool]] = None, + internal_dns_name_label: Optional[pulumi.Input[str]] = None, + internal_domain_name_suffix: Optional[pulumi.Input[str]] = None, + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkInterfaceIpConfigurationArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + mac_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + private_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if applied_dns_servers is None and 'appliedDnsServers' in kwargs: + applied_dns_servers = kwargs['appliedDnsServers'] + if auxiliary_mode is None and 'auxiliaryMode' in kwargs: + auxiliary_mode = kwargs['auxiliaryMode'] + if auxiliary_sku is None and 'auxiliarySku' in kwargs: + auxiliary_sku = kwargs['auxiliarySku'] + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if enable_accelerated_networking is None and 'enableAcceleratedNetworking' in kwargs: + enable_accelerated_networking = kwargs['enableAcceleratedNetworking'] + if enable_ip_forwarding is None and 'enableIpForwarding' in kwargs: + enable_ip_forwarding = kwargs['enableIpForwarding'] + if internal_dns_name_label is None and 'internalDnsNameLabel' in kwargs: + internal_dns_name_label = kwargs['internalDnsNameLabel'] + if internal_domain_name_suffix is None and 'internalDomainNameSuffix' in kwargs: + internal_domain_name_suffix = kwargs['internalDomainNameSuffix'] + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if mac_address is None and 'macAddress' in kwargs: + mac_address = kwargs['macAddress'] + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_addresses is None and 'privateIpAddresses' in kwargs: + private_ip_addresses = kwargs['privateIpAddresses'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if applied_dns_servers is not None: - pulumi.set(__self__, "applied_dns_servers", applied_dns_servers) + _setter("applied_dns_servers", applied_dns_servers) if auxiliary_mode is not None: - pulumi.set(__self__, "auxiliary_mode", auxiliary_mode) + _setter("auxiliary_mode", auxiliary_mode) if auxiliary_sku is not None: - pulumi.set(__self__, "auxiliary_sku", auxiliary_sku) + _setter("auxiliary_sku", auxiliary_sku) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if enable_accelerated_networking is not None: - pulumi.set(__self__, "enable_accelerated_networking", enable_accelerated_networking) + _setter("enable_accelerated_networking", enable_accelerated_networking) if enable_ip_forwarding is not None: - pulumi.set(__self__, "enable_ip_forwarding", enable_ip_forwarding) + _setter("enable_ip_forwarding", enable_ip_forwarding) if internal_dns_name_label is not None: - pulumi.set(__self__, "internal_dns_name_label", internal_dns_name_label) + _setter("internal_dns_name_label", internal_dns_name_label) if internal_domain_name_suffix is not None: - pulumi.set(__self__, "internal_domain_name_suffix", internal_domain_name_suffix) + _setter("internal_domain_name_suffix", internal_domain_name_suffix) if ip_configurations is not None: - pulumi.set(__self__, "ip_configurations", ip_configurations) + _setter("ip_configurations", ip_configurations) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mac_address is not None: - pulumi.set(__self__, "mac_address", mac_address) + _setter("mac_address", mac_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_addresses is not None: - pulumi.set(__self__, "private_ip_addresses", private_ip_addresses) + _setter("private_ip_addresses", private_ip_addresses) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) @property @pulumi.getter(name="appliedDnsServers") @@ -678,6 +808,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkInterfaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_interface_application_gateway_backend_address_pool_association.py b/sdk/python/pulumi_azure/network/network_interface_application_gateway_backend_address_pool_association.py index 0b2e49cc9e..b7002495ab 100644 --- a/sdk/python/pulumi_azure/network/network_interface_application_gateway_backend_address_pool_association.py +++ b/sdk/python/pulumi_azure/network/network_interface_application_gateway_backend_address_pool_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArgs', 'NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation'] @@ -23,9 +23,36 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_configuration_name: The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. :param pulumi.Input[str] network_interface_id: The ID of the Network Interface. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) - pulumi.set(__self__, "ip_configuration_name", ip_configuration_name) - pulumi.set(__self__, "network_interface_id", network_interface_id) + NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_address_pool_id=backend_address_pool_id, + ip_configuration_name=ip_configuration_name, + network_interface_id=network_interface_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_address_pool_id: Optional[pulumi.Input[str]] = None, + ip_configuration_name: Optional[pulumi.Input[str]] = None, + network_interface_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if backend_address_pool_id is None: + raise TypeError("Missing 'backend_address_pool_id' argument") + if ip_configuration_name is None and 'ipConfigurationName' in kwargs: + ip_configuration_name = kwargs['ipConfigurationName'] + if ip_configuration_name is None: + raise TypeError("Missing 'ip_configuration_name' argument") + if network_interface_id is None and 'networkInterfaceId' in kwargs: + network_interface_id = kwargs['networkInterfaceId'] + if network_interface_id is None: + raise TypeError("Missing 'network_interface_id' argument") + + _setter("backend_address_pool_id", backend_address_pool_id) + _setter("ip_configuration_name", ip_configuration_name) + _setter("network_interface_id", network_interface_id) @property @pulumi.getter(name="backendAddressPoolId") @@ -76,12 +103,33 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_configuration_name: The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. :param pulumi.Input[str] network_interface_id: The ID of the Network Interface. Changing this forces a new resource to be created. """ + _NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_address_pool_id=backend_address_pool_id, + ip_configuration_name=ip_configuration_name, + network_interface_id=network_interface_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_address_pool_id: Optional[pulumi.Input[str]] = None, + ip_configuration_name: Optional[pulumi.Input[str]] = None, + network_interface_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if ip_configuration_name is None and 'ipConfigurationName' in kwargs: + ip_configuration_name = kwargs['ipConfigurationName'] + if network_interface_id is None and 'networkInterfaceId' in kwargs: + network_interface_id = kwargs['networkInterfaceId'] + if backend_address_pool_id is not None: - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) + _setter("backend_address_pool_id", backend_address_pool_id) if ip_configuration_name is not None: - pulumi.set(__self__, "ip_configuration_name", ip_configuration_name) + _setter("ip_configuration_name", ip_configuration_name) if network_interface_id is not None: - pulumi.set(__self__, "network_interface_id", network_interface_id) + _setter("network_interface_id", network_interface_id) @property @pulumi.getter(name="backendAddressPoolId") @@ -173,6 +221,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_interface_application_security_group_association.py b/sdk/python/pulumi_azure/network/network_interface_application_security_group_association.py index f9dbc4073e..fb00fd6f9b 100644 --- a/sdk/python/pulumi_azure/network/network_interface_application_security_group_association.py +++ b/sdk/python/pulumi_azure/network/network_interface_application_security_group_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkInterfaceApplicationSecurityGroupAssociationArgs', 'NetworkInterfaceApplicationSecurityGroupAssociation'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] application_security_group_id: The ID of the Application Security Group which this Network Interface which should be connected to. Changing this forces a new resource to be created. :param pulumi.Input[str] network_interface_id: The ID of the Network Interface. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "application_security_group_id", application_security_group_id) - pulumi.set(__self__, "network_interface_id", network_interface_id) + NetworkInterfaceApplicationSecurityGroupAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_security_group_id=application_security_group_id, + network_interface_id=network_interface_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_security_group_id: Optional[pulumi.Input[str]] = None, + network_interface_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_security_group_id is None and 'applicationSecurityGroupId' in kwargs: + application_security_group_id = kwargs['applicationSecurityGroupId'] + if application_security_group_id is None: + raise TypeError("Missing 'application_security_group_id' argument") + if network_interface_id is None and 'networkInterfaceId' in kwargs: + network_interface_id = kwargs['networkInterfaceId'] + if network_interface_id is None: + raise TypeError("Missing 'network_interface_id' argument") + + _setter("application_security_group_id", application_security_group_id) + _setter("network_interface_id", network_interface_id) @property @pulumi.getter(name="applicationSecurityGroupId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] application_security_group_id: The ID of the Application Security Group which this Network Interface which should be connected to. Changing this forces a new resource to be created. :param pulumi.Input[str] network_interface_id: The ID of the Network Interface. Changing this forces a new resource to be created. """ + _NetworkInterfaceApplicationSecurityGroupAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_security_group_id=application_security_group_id, + network_interface_id=network_interface_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_security_group_id: Optional[pulumi.Input[str]] = None, + network_interface_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_security_group_id is None and 'applicationSecurityGroupId' in kwargs: + application_security_group_id = kwargs['applicationSecurityGroupId'] + if network_interface_id is None and 'networkInterfaceId' in kwargs: + network_interface_id = kwargs['networkInterfaceId'] + if application_security_group_id is not None: - pulumi.set(__self__, "application_security_group_id", application_security_group_id) + _setter("application_security_group_id", application_security_group_id) if network_interface_id is not None: - pulumi.set(__self__, "network_interface_id", network_interface_id) + _setter("network_interface_id", network_interface_id) @property @pulumi.getter(name="applicationSecurityGroupId") @@ -202,6 +240,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkInterfaceApplicationSecurityGroupAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_interface_backend_address_pool_association.py b/sdk/python/pulumi_azure/network/network_interface_backend_address_pool_association.py index 8db2aa8df7..3cbe48040c 100644 --- a/sdk/python/pulumi_azure/network/network_interface_backend_address_pool_association.py +++ b/sdk/python/pulumi_azure/network/network_interface_backend_address_pool_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkInterfaceBackendAddressPoolAssociationArgs', 'NetworkInterfaceBackendAddressPoolAssociation'] @@ -23,9 +23,36 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_configuration_name: The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. :param pulumi.Input[str] network_interface_id: The ID of the Network Interface. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) - pulumi.set(__self__, "ip_configuration_name", ip_configuration_name) - pulumi.set(__self__, "network_interface_id", network_interface_id) + NetworkInterfaceBackendAddressPoolAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_address_pool_id=backend_address_pool_id, + ip_configuration_name=ip_configuration_name, + network_interface_id=network_interface_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_address_pool_id: Optional[pulumi.Input[str]] = None, + ip_configuration_name: Optional[pulumi.Input[str]] = None, + network_interface_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if backend_address_pool_id is None: + raise TypeError("Missing 'backend_address_pool_id' argument") + if ip_configuration_name is None and 'ipConfigurationName' in kwargs: + ip_configuration_name = kwargs['ipConfigurationName'] + if ip_configuration_name is None: + raise TypeError("Missing 'ip_configuration_name' argument") + if network_interface_id is None and 'networkInterfaceId' in kwargs: + network_interface_id = kwargs['networkInterfaceId'] + if network_interface_id is None: + raise TypeError("Missing 'network_interface_id' argument") + + _setter("backend_address_pool_id", backend_address_pool_id) + _setter("ip_configuration_name", ip_configuration_name) + _setter("network_interface_id", network_interface_id) @property @pulumi.getter(name="backendAddressPoolId") @@ -76,12 +103,33 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_configuration_name: The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. :param pulumi.Input[str] network_interface_id: The ID of the Network Interface. Changing this forces a new resource to be created. """ + _NetworkInterfaceBackendAddressPoolAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_address_pool_id=backend_address_pool_id, + ip_configuration_name=ip_configuration_name, + network_interface_id=network_interface_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_address_pool_id: Optional[pulumi.Input[str]] = None, + ip_configuration_name: Optional[pulumi.Input[str]] = None, + network_interface_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if ip_configuration_name is None and 'ipConfigurationName' in kwargs: + ip_configuration_name = kwargs['ipConfigurationName'] + if network_interface_id is None and 'networkInterfaceId' in kwargs: + network_interface_id = kwargs['networkInterfaceId'] + if backend_address_pool_id is not None: - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) + _setter("backend_address_pool_id", backend_address_pool_id) if ip_configuration_name is not None: - pulumi.set(__self__, "ip_configuration_name", ip_configuration_name) + _setter("ip_configuration_name", ip_configuration_name) if network_interface_id is not None: - pulumi.set(__self__, "network_interface_id", network_interface_id) + _setter("network_interface_id", network_interface_id) @property @pulumi.getter(name="backendAddressPoolId") @@ -255,6 +303,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkInterfaceBackendAddressPoolAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_interface_nat_rule_association.py b/sdk/python/pulumi_azure/network/network_interface_nat_rule_association.py index 86e000c68f..91a90876a0 100644 --- a/sdk/python/pulumi_azure/network/network_interface_nat_rule_association.py +++ b/sdk/python/pulumi_azure/network/network_interface_nat_rule_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkInterfaceNatRuleAssociationArgs', 'NetworkInterfaceNatRuleAssociation'] @@ -23,9 +23,36 @@ def __init__(__self__, *, :param pulumi.Input[str] nat_rule_id: The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created. :param pulumi.Input[str] network_interface_id: The ID of the Network Interface. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "ip_configuration_name", ip_configuration_name) - pulumi.set(__self__, "nat_rule_id", nat_rule_id) - pulumi.set(__self__, "network_interface_id", network_interface_id) + NetworkInterfaceNatRuleAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configuration_name=ip_configuration_name, + nat_rule_id=nat_rule_id, + network_interface_id=network_interface_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configuration_name: Optional[pulumi.Input[str]] = None, + nat_rule_id: Optional[pulumi.Input[str]] = None, + network_interface_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configuration_name is None and 'ipConfigurationName' in kwargs: + ip_configuration_name = kwargs['ipConfigurationName'] + if ip_configuration_name is None: + raise TypeError("Missing 'ip_configuration_name' argument") + if nat_rule_id is None and 'natRuleId' in kwargs: + nat_rule_id = kwargs['natRuleId'] + if nat_rule_id is None: + raise TypeError("Missing 'nat_rule_id' argument") + if network_interface_id is None and 'networkInterfaceId' in kwargs: + network_interface_id = kwargs['networkInterfaceId'] + if network_interface_id is None: + raise TypeError("Missing 'network_interface_id' argument") + + _setter("ip_configuration_name", ip_configuration_name) + _setter("nat_rule_id", nat_rule_id) + _setter("network_interface_id", network_interface_id) @property @pulumi.getter(name="ipConfigurationName") @@ -76,12 +103,33 @@ def __init__(__self__, *, :param pulumi.Input[str] nat_rule_id: The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created. :param pulumi.Input[str] network_interface_id: The ID of the Network Interface. Changing this forces a new resource to be created. """ + _NetworkInterfaceNatRuleAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configuration_name=ip_configuration_name, + nat_rule_id=nat_rule_id, + network_interface_id=network_interface_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configuration_name: Optional[pulumi.Input[str]] = None, + nat_rule_id: Optional[pulumi.Input[str]] = None, + network_interface_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configuration_name is None and 'ipConfigurationName' in kwargs: + ip_configuration_name = kwargs['ipConfigurationName'] + if nat_rule_id is None and 'natRuleId' in kwargs: + nat_rule_id = kwargs['natRuleId'] + if network_interface_id is None and 'networkInterfaceId' in kwargs: + network_interface_id = kwargs['networkInterfaceId'] + if ip_configuration_name is not None: - pulumi.set(__self__, "ip_configuration_name", ip_configuration_name) + _setter("ip_configuration_name", ip_configuration_name) if nat_rule_id is not None: - pulumi.set(__self__, "nat_rule_id", nat_rule_id) + _setter("nat_rule_id", nat_rule_id) if network_interface_id is not None: - pulumi.set(__self__, "network_interface_id", network_interface_id) + _setter("network_interface_id", network_interface_id) @property @pulumi.getter(name="ipConfigurationName") @@ -267,6 +315,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkInterfaceNatRuleAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_interface_security_group_association.py b/sdk/python/pulumi_azure/network/network_interface_security_group_association.py index cf1748ead2..46ec236885 100644 --- a/sdk/python/pulumi_azure/network/network_interface_security_group_association.py +++ b/sdk/python/pulumi_azure/network/network_interface_security_group_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkInterfaceSecurityGroupAssociationArgs', 'NetworkInterfaceSecurityGroupAssociation'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] network_interface_id: The ID of the Network Interface. Changing this forces a new resource to be created. :param pulumi.Input[str] network_security_group_id: The ID of the Network Security Group which should be attached to the Network Interface. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "network_interface_id", network_interface_id) - pulumi.set(__self__, "network_security_group_id", network_security_group_id) + NetworkInterfaceSecurityGroupAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_interface_id=network_interface_id, + network_security_group_id=network_security_group_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_interface_id: Optional[pulumi.Input[str]] = None, + network_security_group_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_interface_id is None and 'networkInterfaceId' in kwargs: + network_interface_id = kwargs['networkInterfaceId'] + if network_interface_id is None: + raise TypeError("Missing 'network_interface_id' argument") + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + if network_security_group_id is None: + raise TypeError("Missing 'network_security_group_id' argument") + + _setter("network_interface_id", network_interface_id) + _setter("network_security_group_id", network_security_group_id) @property @pulumi.getter(name="networkInterfaceId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] network_interface_id: The ID of the Network Interface. Changing this forces a new resource to be created. :param pulumi.Input[str] network_security_group_id: The ID of the Network Security Group which should be attached to the Network Interface. Changing this forces a new resource to be created. """ + _NetworkInterfaceSecurityGroupAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_interface_id=network_interface_id, + network_security_group_id=network_security_group_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_interface_id: Optional[pulumi.Input[str]] = None, + network_security_group_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_interface_id is None and 'networkInterfaceId' in kwargs: + network_interface_id = kwargs['networkInterfaceId'] + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + if network_interface_id is not None: - pulumi.set(__self__, "network_interface_id", network_interface_id) + _setter("network_interface_id", network_interface_id) if network_security_group_id is not None: - pulumi.set(__self__, "network_security_group_id", network_security_group_id) + _setter("network_security_group_id", network_security_group_id) @property @pulumi.getter(name="networkInterfaceId") @@ -202,6 +240,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkInterfaceSecurityGroupAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_manager.py b/sdk/python/pulumi_azure/network/network_manager.py index db8d1513b0..e1ee3d1e7d 100644 --- a/sdk/python/pulumi_azure/network/network_manager.py +++ b/sdk/python/pulumi_azure/network/network_manager.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,50 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Network Managers. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scope", scope) - pulumi.set(__self__, "scope_accesses", scope_accesses) + NetworkManagerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + scope=scope, + scope_accesses=scope_accesses, + description=description, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input['NetworkManagerScopeArgs']] = None, + scope_accesses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + if scope_accesses is None and 'scopeAccesses' in kwargs: + scope_accesses = kwargs['scopeAccesses'] + if scope_accesses is None: + raise TypeError("Missing 'scope_accesses' argument") + + _setter("resource_group_name", resource_group_name) + _setter("scope", scope) + _setter("scope_accesses", scope_accesses) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -152,22 +185,53 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] scope_accesses: A list of configuration deployment type. Possible values are `Connectivity` and `SecurityAdmin`, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Network Managers. """ + _NetworkManagerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cross_tenant_scopes=cross_tenant_scopes, + description=description, + location=location, + name=name, + resource_group_name=resource_group_name, + scope=scope, + scope_accesses=scope_accesses, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cross_tenant_scopes: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkManagerCrossTenantScopeArgs']]]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input['NetworkManagerScopeArgs']] = None, + scope_accesses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cross_tenant_scopes is None and 'crossTenantScopes' in kwargs: + cross_tenant_scopes = kwargs['crossTenantScopes'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if scope_accesses is None and 'scopeAccesses' in kwargs: + scope_accesses = kwargs['scopeAccesses'] + if cross_tenant_scopes is not None: - pulumi.set(__self__, "cross_tenant_scopes", cross_tenant_scopes) + _setter("cross_tenant_scopes", cross_tenant_scopes) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if scope_accesses is not None: - pulumi.set(__self__, "scope_accesses", scope_accesses) + _setter("scope_accesses", scope_accesses) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="crossTenantScopes") @@ -375,6 +439,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkManagerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -402,6 +470,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if scope is not None and not isinstance(scope, NetworkManagerScopeArgs): + scope = scope or {} + def _setter(key, value): + scope[key] = value + NetworkManagerScopeArgs._configure(_setter, **scope) if scope is None and not opts.urn: raise TypeError("Missing required property 'scope'") __props__.__dict__["scope"] = scope diff --git a/sdk/python/pulumi_azure/network/network_manager_admin_rule.py b/sdk/python/pulumi_azure/network/network_manager_admin_rule.py index 7b89ce75e7..1d654c6f7f 100644 --- a/sdk/python/pulumi_azure/network/network_manager_admin_rule.py +++ b/sdk/python/pulumi_azure/network/network_manager_admin_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,23 +41,70 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] source_port_ranges: A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. :param pulumi.Input[Sequence[pulumi.Input['NetworkManagerAdminRuleSourceArgs']]] sources: One or more `source` blocks as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "admin_rule_collection_id", admin_rule_collection_id) - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "protocol", protocol) + NetworkManagerAdminRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + admin_rule_collection_id=admin_rule_collection_id, + direction=direction, + priority=priority, + protocol=protocol, + description=description, + destination_port_ranges=destination_port_ranges, + destinations=destinations, + name=name, + source_port_ranges=source_port_ranges, + sources=sources, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + admin_rule_collection_id: Optional[pulumi.Input[str]] = None, + direction: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + destination_port_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destinations: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkManagerAdminRuleDestinationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + source_port_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkManagerAdminRuleSourceArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if admin_rule_collection_id is None and 'adminRuleCollectionId' in kwargs: + admin_rule_collection_id = kwargs['adminRuleCollectionId'] + if admin_rule_collection_id is None: + raise TypeError("Missing 'admin_rule_collection_id' argument") + if direction is None: + raise TypeError("Missing 'direction' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if destination_port_ranges is None and 'destinationPortRanges' in kwargs: + destination_port_ranges = kwargs['destinationPortRanges'] + if source_port_ranges is None and 'sourcePortRanges' in kwargs: + source_port_ranges = kwargs['sourcePortRanges'] + + _setter("action", action) + _setter("admin_rule_collection_id", admin_rule_collection_id) + _setter("direction", direction) + _setter("priority", priority) + _setter("protocol", protocol) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_port_ranges is not None: - pulumi.set(__self__, "destination_port_ranges", destination_port_ranges) + _setter("destination_port_ranges", destination_port_ranges) if destinations is not None: - pulumi.set(__self__, "destinations", destinations) + _setter("destinations", destinations) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if source_port_ranges is not None: - pulumi.set(__self__, "source_port_ranges", source_port_ranges) + _setter("source_port_ranges", source_port_ranges) if sources is not None: - pulumi.set(__self__, "sources", sources) + _setter("sources", sources) @property @pulumi.getter @@ -220,28 +267,65 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] source_port_ranges: A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. :param pulumi.Input[Sequence[pulumi.Input['NetworkManagerAdminRuleSourceArgs']]] sources: One or more `source` blocks as defined below. """ + _NetworkManagerAdminRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + admin_rule_collection_id=admin_rule_collection_id, + description=description, + destination_port_ranges=destination_port_ranges, + destinations=destinations, + direction=direction, + name=name, + priority=priority, + protocol=protocol, + source_port_ranges=source_port_ranges, + sources=sources, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + admin_rule_collection_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + destination_port_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destinations: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkManagerAdminRuleDestinationArgs']]]] = None, + direction: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + source_port_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkManagerAdminRuleSourceArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_rule_collection_id is None and 'adminRuleCollectionId' in kwargs: + admin_rule_collection_id = kwargs['adminRuleCollectionId'] + if destination_port_ranges is None and 'destinationPortRanges' in kwargs: + destination_port_ranges = kwargs['destinationPortRanges'] + if source_port_ranges is None and 'sourcePortRanges' in kwargs: + source_port_ranges = kwargs['sourcePortRanges'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if admin_rule_collection_id is not None: - pulumi.set(__self__, "admin_rule_collection_id", admin_rule_collection_id) + _setter("admin_rule_collection_id", admin_rule_collection_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_port_ranges is not None: - pulumi.set(__self__, "destination_port_ranges", destination_port_ranges) + _setter("destination_port_ranges", destination_port_ranges) if destinations is not None: - pulumi.set(__self__, "destinations", destinations) + _setter("destinations", destinations) if direction is not None: - pulumi.set(__self__, "direction", direction) + _setter("direction", direction) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if source_port_ranges is not None: - pulumi.set(__self__, "source_port_ranges", source_port_ranges) + _setter("source_port_ranges", source_port_ranges) if sources is not None: - pulumi.set(__self__, "sources", sources) + _setter("sources", sources) @property @pulumi.getter @@ -549,6 +633,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkManagerAdminRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_manager_admin_rule_collection.py b/sdk/python/pulumi_azure/network/network_manager_admin_rule_collection.py index 002633a4cc..2c6af29a94 100644 --- a/sdk/python/pulumi_azure/network/network_manager_admin_rule_collection.py +++ b/sdk/python/pulumi_azure/network/network_manager_admin_rule_collection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkManagerAdminRuleCollectionArgs', 'NetworkManagerAdminRuleCollection'] @@ -25,12 +25,37 @@ def __init__(__self__, *, :param pulumi.Input[str] description: A description of the Network Manager Admin Rule Collection. :param pulumi.Input[str] name: Specifies the name which should be used for this Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule Collection to be created. """ - pulumi.set(__self__, "network_group_ids", network_group_ids) - pulumi.set(__self__, "security_admin_configuration_id", security_admin_configuration_id) + NetworkManagerAdminRuleCollectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_group_ids=network_group_ids, + security_admin_configuration_id=security_admin_configuration_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + security_admin_configuration_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_group_ids is None and 'networkGroupIds' in kwargs: + network_group_ids = kwargs['networkGroupIds'] + if network_group_ids is None: + raise TypeError("Missing 'network_group_ids' argument") + if security_admin_configuration_id is None and 'securityAdminConfigurationId' in kwargs: + security_admin_configuration_id = kwargs['securityAdminConfigurationId'] + if security_admin_configuration_id is None: + raise TypeError("Missing 'security_admin_configuration_id' argument") + + _setter("network_group_ids", network_group_ids) + _setter("security_admin_configuration_id", security_admin_configuration_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="networkGroupIds") @@ -95,14 +120,35 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] network_group_ids: A list of Network Group ID which this Network Manager Admin Rule Collection applies to. :param pulumi.Input[str] security_admin_configuration_id: Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Admin Rule Collection to be created. """ + _NetworkManagerAdminRuleCollectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + name=name, + network_group_ids=network_group_ids, + security_admin_configuration_id=security_admin_configuration_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + security_admin_configuration_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_group_ids is None and 'networkGroupIds' in kwargs: + network_group_ids = kwargs['networkGroupIds'] + if security_admin_configuration_id is None and 'securityAdminConfigurationId' in kwargs: + security_admin_configuration_id = kwargs['securityAdminConfigurationId'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_group_ids is not None: - pulumi.set(__self__, "network_group_ids", network_group_ids) + _setter("network_group_ids", network_group_ids) if security_admin_configuration_id is not None: - pulumi.set(__self__, "security_admin_configuration_id", security_admin_configuration_id) + _setter("security_admin_configuration_id", security_admin_configuration_id) @property @pulumi.getter @@ -260,6 +306,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkManagerAdminRuleCollectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_manager_connectivity_configuration.py b/sdk/python/pulumi_azure/network/network_manager_connectivity_configuration.py index e6ac6ddb6a..ef6e552e2e 100644 --- a/sdk/python/pulumi_azure/network/network_manager_connectivity_configuration.py +++ b/sdk/python/pulumi_azure/network/network_manager_connectivity_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,19 +35,60 @@ def __init__(__self__, *, :param pulumi.Input['NetworkManagerConnectivityConfigurationHubArgs'] hub: A `hub` block as defined below. :param pulumi.Input[str] name: Specifies the name which should be used for this Network Manager Connectivity Configuration. Changing this forces a new Network Manager Connectivity Configuration to be created. """ - pulumi.set(__self__, "applies_to_groups", applies_to_groups) - pulumi.set(__self__, "connectivity_topology", connectivity_topology) - pulumi.set(__self__, "network_manager_id", network_manager_id) + NetworkManagerConnectivityConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + applies_to_groups=applies_to_groups, + connectivity_topology=connectivity_topology, + network_manager_id=network_manager_id, + delete_existing_peering_enabled=delete_existing_peering_enabled, + description=description, + global_mesh_enabled=global_mesh_enabled, + hub=hub, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + applies_to_groups: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkManagerConnectivityConfigurationAppliesToGroupArgs']]]] = None, + connectivity_topology: Optional[pulumi.Input[str]] = None, + network_manager_id: Optional[pulumi.Input[str]] = None, + delete_existing_peering_enabled: Optional[pulumi.Input[bool]] = None, + description: Optional[pulumi.Input[str]] = None, + global_mesh_enabled: Optional[pulumi.Input[bool]] = None, + hub: Optional[pulumi.Input['NetworkManagerConnectivityConfigurationHubArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if applies_to_groups is None and 'appliesToGroups' in kwargs: + applies_to_groups = kwargs['appliesToGroups'] + if applies_to_groups is None: + raise TypeError("Missing 'applies_to_groups' argument") + if connectivity_topology is None and 'connectivityTopology' in kwargs: + connectivity_topology = kwargs['connectivityTopology'] + if connectivity_topology is None: + raise TypeError("Missing 'connectivity_topology' argument") + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if network_manager_id is None: + raise TypeError("Missing 'network_manager_id' argument") + if delete_existing_peering_enabled is None and 'deleteExistingPeeringEnabled' in kwargs: + delete_existing_peering_enabled = kwargs['deleteExistingPeeringEnabled'] + if global_mesh_enabled is None and 'globalMeshEnabled' in kwargs: + global_mesh_enabled = kwargs['globalMeshEnabled'] + + _setter("applies_to_groups", applies_to_groups) + _setter("connectivity_topology", connectivity_topology) + _setter("network_manager_id", network_manager_id) if delete_existing_peering_enabled is not None: - pulumi.set(__self__, "delete_existing_peering_enabled", delete_existing_peering_enabled) + _setter("delete_existing_peering_enabled", delete_existing_peering_enabled) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if global_mesh_enabled is not None: - pulumi.set(__self__, "global_mesh_enabled", global_mesh_enabled) + _setter("global_mesh_enabled", global_mesh_enabled) if hub is not None: - pulumi.set(__self__, "hub", hub) + _setter("hub", hub) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="appliesToGroups") @@ -168,22 +209,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Network Manager Connectivity Configuration. Changing this forces a new Network Manager Connectivity Configuration to be created. :param pulumi.Input[str] network_manager_id: Specifies the ID of the Network Manager. Changing this forces a new Network Manager Connectivity Configuration to be created. """ + _NetworkManagerConnectivityConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + applies_to_groups=applies_to_groups, + connectivity_topology=connectivity_topology, + delete_existing_peering_enabled=delete_existing_peering_enabled, + description=description, + global_mesh_enabled=global_mesh_enabled, + hub=hub, + name=name, + network_manager_id=network_manager_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + applies_to_groups: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkManagerConnectivityConfigurationAppliesToGroupArgs']]]] = None, + connectivity_topology: Optional[pulumi.Input[str]] = None, + delete_existing_peering_enabled: Optional[pulumi.Input[bool]] = None, + description: Optional[pulumi.Input[str]] = None, + global_mesh_enabled: Optional[pulumi.Input[bool]] = None, + hub: Optional[pulumi.Input['NetworkManagerConnectivityConfigurationHubArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network_manager_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if applies_to_groups is None and 'appliesToGroups' in kwargs: + applies_to_groups = kwargs['appliesToGroups'] + if connectivity_topology is None and 'connectivityTopology' in kwargs: + connectivity_topology = kwargs['connectivityTopology'] + if delete_existing_peering_enabled is None and 'deleteExistingPeeringEnabled' in kwargs: + delete_existing_peering_enabled = kwargs['deleteExistingPeeringEnabled'] + if global_mesh_enabled is None and 'globalMeshEnabled' in kwargs: + global_mesh_enabled = kwargs['globalMeshEnabled'] + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if applies_to_groups is not None: - pulumi.set(__self__, "applies_to_groups", applies_to_groups) + _setter("applies_to_groups", applies_to_groups) if connectivity_topology is not None: - pulumi.set(__self__, "connectivity_topology", connectivity_topology) + _setter("connectivity_topology", connectivity_topology) if delete_existing_peering_enabled is not None: - pulumi.set(__self__, "delete_existing_peering_enabled", delete_existing_peering_enabled) + _setter("delete_existing_peering_enabled", delete_existing_peering_enabled) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if global_mesh_enabled is not None: - pulumi.set(__self__, "global_mesh_enabled", global_mesh_enabled) + _setter("global_mesh_enabled", global_mesh_enabled) if hub is not None: - pulumi.set(__self__, "hub", hub) + _setter("hub", hub) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_manager_id is not None: - pulumi.set(__self__, "network_manager_id", network_manager_id) + _setter("network_manager_id", network_manager_id) @property @pulumi.getter(name="appliesToGroups") @@ -425,6 +501,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkManagerConnectivityConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -456,6 +536,11 @@ def _internal_init(__self__, __props__.__dict__["delete_existing_peering_enabled"] = delete_existing_peering_enabled __props__.__dict__["description"] = description __props__.__dict__["global_mesh_enabled"] = global_mesh_enabled + if hub is not None and not isinstance(hub, NetworkManagerConnectivityConfigurationHubArgs): + hub = hub or {} + def _setter(key, value): + hub[key] = value + NetworkManagerConnectivityConfigurationHubArgs._configure(_setter, **hub) __props__.__dict__["hub"] = hub __props__.__dict__["name"] = name if network_manager_id is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/network/network_manager_deployment.py b/sdk/python/pulumi_azure/network/network_manager_deployment.py index 432280ead4..cf760f9eab 100644 --- a/sdk/python/pulumi_azure/network/network_manager_deployment.py +++ b/sdk/python/pulumi_azure/network/network_manager_deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkManagerDeploymentArgs', 'NetworkManagerDeployment'] @@ -27,13 +27,44 @@ def __init__(__self__, *, :param pulumi.Input[str] location: Specifies the location which the configurations will be deployed to. Changing this forces a new Network Manager Deployment to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] triggers: A mapping of key values pairs that can be used to keep the deployment up with the Network Manager configurations and rules. """ - pulumi.set(__self__, "configuration_ids", configuration_ids) - pulumi.set(__self__, "network_manager_id", network_manager_id) - pulumi.set(__self__, "scope_access", scope_access) + NetworkManagerDeploymentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + configuration_ids=configuration_ids, + network_manager_id=network_manager_id, + scope_access=scope_access, + location=location, + triggers=triggers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + configuration_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + network_manager_id: Optional[pulumi.Input[str]] = None, + scope_access: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if configuration_ids is None and 'configurationIds' in kwargs: + configuration_ids = kwargs['configurationIds'] + if configuration_ids is None: + raise TypeError("Missing 'configuration_ids' argument") + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if network_manager_id is None: + raise TypeError("Missing 'network_manager_id' argument") + if scope_access is None and 'scopeAccess' in kwargs: + scope_access = kwargs['scopeAccess'] + if scope_access is None: + raise TypeError("Missing 'scope_access' argument") + + _setter("configuration_ids", configuration_ids) + _setter("network_manager_id", network_manager_id) + _setter("scope_access", scope_access) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if triggers is not None: - pulumi.set(__self__, "triggers", triggers) + _setter("triggers", triggers) @property @pulumi.getter(name="configurationIds") @@ -112,16 +143,41 @@ def __init__(__self__, *, :param pulumi.Input[str] scope_access: Specifies the configuration deployment type. Possible values are `Connectivity` and `SecurityAdmin`. Changing this forces a new Network Manager Deployment to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] triggers: A mapping of key values pairs that can be used to keep the deployment up with the Network Manager configurations and rules. """ + _NetworkManagerDeploymentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + configuration_ids=configuration_ids, + location=location, + network_manager_id=network_manager_id, + scope_access=scope_access, + triggers=triggers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + configuration_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + network_manager_id: Optional[pulumi.Input[str]] = None, + scope_access: Optional[pulumi.Input[str]] = None, + triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if configuration_ids is None and 'configurationIds' in kwargs: + configuration_ids = kwargs['configurationIds'] + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if scope_access is None and 'scopeAccess' in kwargs: + scope_access = kwargs['scopeAccess'] + if configuration_ids is not None: - pulumi.set(__self__, "configuration_ids", configuration_ids) + _setter("configuration_ids", configuration_ids) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if network_manager_id is not None: - pulumi.set(__self__, "network_manager_id", network_manager_id) + _setter("network_manager_id", network_manager_id) if scope_access is not None: - pulumi.set(__self__, "scope_access", scope_access) + _setter("scope_access", scope_access) if triggers is not None: - pulumi.set(__self__, "triggers", triggers) + _setter("triggers", triggers) @property @pulumi.getter(name="configurationIds") @@ -331,6 +387,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkManagerDeploymentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_manager_management_group_connection.py b/sdk/python/pulumi_azure/network/network_manager_management_group_connection.py index b564c49566..896c93c771 100644 --- a/sdk/python/pulumi_azure/network/network_manager_management_group_connection.py +++ b/sdk/python/pulumi_azure/network/network_manager_management_group_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkManagerManagementGroupConnectionArgs', 'NetworkManagerManagementGroupConnection'] @@ -25,12 +25,37 @@ def __init__(__self__, *, :param pulumi.Input[str] description: A description of the Network Manager Management Group Connection. :param pulumi.Input[str] name: Specifies the name which should be used for this Network Manager Management Group Connection. Changing this forces a new Network Manager Management Group Connection to be created. """ - pulumi.set(__self__, "management_group_id", management_group_id) - pulumi.set(__self__, "network_manager_id", network_manager_id) + NetworkManagerManagementGroupConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_group_id=management_group_id, + network_manager_id=network_manager_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_group_id: Optional[pulumi.Input[str]] = None, + network_manager_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if management_group_id is None: + raise TypeError("Missing 'management_group_id' argument") + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if network_manager_id is None: + raise TypeError("Missing 'network_manager_id' argument") + + _setter("management_group_id", management_group_id) + _setter("network_manager_id", network_manager_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="managementGroupId") @@ -97,16 +122,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Network Manager Management Group Connection. Changing this forces a new Network Manager Management Group Connection to be created. :param pulumi.Input[str] network_manager_id: Specifies the ID of the Network Manager which the Management Group is connected to. Changing this forces a new resource to be created. """ + _NetworkManagerManagementGroupConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_state=connection_state, + description=description, + management_group_id=management_group_id, + name=name, + network_manager_id=network_manager_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_state: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + management_group_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_manager_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_state is None and 'connectionState' in kwargs: + connection_state = kwargs['connectionState'] + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if connection_state is not None: - pulumi.set(__self__, "connection_state", connection_state) + _setter("connection_state", connection_state) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if management_group_id is not None: - pulumi.set(__self__, "management_group_id", management_group_id) + _setter("management_group_id", management_group_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_manager_id is not None: - pulumi.set(__self__, "network_manager_id", network_manager_id) + _setter("network_manager_id", network_manager_id) @property @pulumi.getter(name="connectionState") @@ -288,6 +338,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkManagerManagementGroupConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_manager_network_group.py b/sdk/python/pulumi_azure/network/network_manager_network_group.py index b44e1751cf..acad97fde3 100644 --- a/sdk/python/pulumi_azure/network/network_manager_network_group.py +++ b/sdk/python/pulumi_azure/network/network_manager_network_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkManagerNetworkGroupArgs', 'NetworkManagerNetworkGroup'] @@ -23,11 +23,30 @@ def __init__(__self__, *, :param pulumi.Input[str] description: A description of the Network Manager Network Group. :param pulumi.Input[str] name: Specifies the name which should be used for this Network Manager Network Group. Changing this forces a new Network Manager Network Group to be created. """ - pulumi.set(__self__, "network_manager_id", network_manager_id) + NetworkManagerNetworkGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_manager_id=network_manager_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_manager_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if network_manager_id is None: + raise TypeError("Missing 'network_manager_id' argument") + + _setter("network_manager_id", network_manager_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="networkManagerId") @@ -78,12 +97,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Network Manager Network Group. Changing this forces a new Network Manager Network Group to be created. :param pulumi.Input[str] network_manager_id: Specifies the ID of the Network Manager. Changing this forces a new Network Manager Network Group to be created. """ + _NetworkManagerNetworkGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + name=name, + network_manager_id=network_manager_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_manager_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_manager_id is not None: - pulumi.set(__self__, "network_manager_id", network_manager_id) + _setter("network_manager_id", network_manager_id) @property @pulumi.getter @@ -219,6 +255,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkManagerNetworkGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_manager_scope_connection.py b/sdk/python/pulumi_azure/network/network_manager_scope_connection.py index eaae5c4657..d9c0da1f68 100644 --- a/sdk/python/pulumi_azure/network/network_manager_scope_connection.py +++ b/sdk/python/pulumi_azure/network/network_manager_scope_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkManagerScopeConnectionArgs', 'NetworkManagerScopeConnection'] @@ -27,13 +27,44 @@ def __init__(__self__, *, :param pulumi.Input[str] description: A description of the Network Manager Scope Connection. :param pulumi.Input[str] name: Specifies the name which should be used for this Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created. """ - pulumi.set(__self__, "network_manager_id", network_manager_id) - pulumi.set(__self__, "target_scope_id", target_scope_id) - pulumi.set(__self__, "tenant_id", tenant_id) + NetworkManagerScopeConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_manager_id=network_manager_id, + target_scope_id=target_scope_id, + tenant_id=tenant_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_manager_id: Optional[pulumi.Input[str]] = None, + target_scope_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if network_manager_id is None: + raise TypeError("Missing 'network_manager_id' argument") + if target_scope_id is None and 'targetScopeId' in kwargs: + target_scope_id = kwargs['targetScopeId'] + if target_scope_id is None: + raise TypeError("Missing 'target_scope_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("network_manager_id", network_manager_id) + _setter("target_scope_id", target_scope_id) + _setter("tenant_id", tenant_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="networkManagerId") @@ -114,18 +145,47 @@ def __init__(__self__, *, :param pulumi.Input[str] target_scope_id: Specifies the Resource ID of the target scope which the Network Manager is connected to. It should be either Subscription ID or Management Group ID. :param pulumi.Input[str] tenant_id: Specifies the Tenant ID of the Resource which the Network Manager is connected to. """ + _NetworkManagerScopeConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_state=connection_state, + description=description, + name=name, + network_manager_id=network_manager_id, + target_scope_id=target_scope_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_state: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_manager_id: Optional[pulumi.Input[str]] = None, + target_scope_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_state is None and 'connectionState' in kwargs: + connection_state = kwargs['connectionState'] + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if target_scope_id is None and 'targetScopeId' in kwargs: + target_scope_id = kwargs['targetScopeId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if connection_state is not None: - pulumi.set(__self__, "connection_state", connection_state) + _setter("connection_state", connection_state) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_manager_id is not None: - pulumi.set(__self__, "network_manager_id", network_manager_id) + _setter("network_manager_id", network_manager_id) if target_scope_id is not None: - pulumi.set(__self__, "target_scope_id", target_scope_id) + _setter("target_scope_id", target_scope_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="connectionState") @@ -305,6 +365,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkManagerScopeConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_manager_security_admin_configuration.py b/sdk/python/pulumi_azure/network/network_manager_security_admin_configuration.py index d22a374cfb..3f48e67395 100644 --- a/sdk/python/pulumi_azure/network/network_manager_security_admin_configuration.py +++ b/sdk/python/pulumi_azure/network/network_manager_security_admin_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkManagerSecurityAdminConfigurationArgs', 'NetworkManagerSecurityAdminConfiguration'] @@ -25,13 +25,36 @@ def __init__(__self__, *, :param pulumi.Input[str] description: A description of the Security Admin Configuration. :param pulumi.Input[str] name: Specifies the name which should be used for this Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. """ - pulumi.set(__self__, "network_manager_id", network_manager_id) + NetworkManagerSecurityAdminConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_manager_id=network_manager_id, + apply_on_network_intent_policy_based_services=apply_on_network_intent_policy_based_services, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_manager_id: Optional[pulumi.Input[str]] = None, + apply_on_network_intent_policy_based_services: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if network_manager_id is None: + raise TypeError("Missing 'network_manager_id' argument") + if apply_on_network_intent_policy_based_services is None and 'applyOnNetworkIntentPolicyBasedServices' in kwargs: + apply_on_network_intent_policy_based_services = kwargs['applyOnNetworkIntentPolicyBasedServices'] + + _setter("network_manager_id", network_manager_id) if apply_on_network_intent_policy_based_services is not None: - pulumi.set(__self__, "apply_on_network_intent_policy_based_services", apply_on_network_intent_policy_based_services) + _setter("apply_on_network_intent_policy_based_services", apply_on_network_intent_policy_based_services) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="networkManagerId") @@ -96,14 +119,35 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. :param pulumi.Input[str] network_manager_id: Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. """ + _NetworkManagerSecurityAdminConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + apply_on_network_intent_policy_based_services=apply_on_network_intent_policy_based_services, + description=description, + name=name, + network_manager_id=network_manager_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + apply_on_network_intent_policy_based_services: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_manager_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if apply_on_network_intent_policy_based_services is None and 'applyOnNetworkIntentPolicyBasedServices' in kwargs: + apply_on_network_intent_policy_based_services = kwargs['applyOnNetworkIntentPolicyBasedServices'] + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if apply_on_network_intent_policy_based_services is not None: - pulumi.set(__self__, "apply_on_network_intent_policy_based_services", apply_on_network_intent_policy_based_services) + _setter("apply_on_network_intent_policy_based_services", apply_on_network_intent_policy_based_services) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_manager_id is not None: - pulumi.set(__self__, "network_manager_id", network_manager_id) + _setter("network_manager_id", network_manager_id) @property @pulumi.getter(name="applyOnNetworkIntentPolicyBasedServices") @@ -209,6 +253,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkManagerSecurityAdminConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_manager_static_member.py b/sdk/python/pulumi_azure/network/network_manager_static_member.py index 281ea0138d..c204d6a631 100644 --- a/sdk/python/pulumi_azure/network/network_manager_static_member.py +++ b/sdk/python/pulumi_azure/network/network_manager_static_member.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkManagerStaticMemberArgs', 'NetworkManagerStaticMember'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] target_virtual_network_id: Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created. :param pulumi.Input[str] name: Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created. """ - pulumi.set(__self__, "network_group_id", network_group_id) - pulumi.set(__self__, "target_virtual_network_id", target_virtual_network_id) + NetworkManagerStaticMemberArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_group_id=network_group_id, + target_virtual_network_id=target_virtual_network_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_group_id: Optional[pulumi.Input[str]] = None, + target_virtual_network_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_group_id is None and 'networkGroupId' in kwargs: + network_group_id = kwargs['networkGroupId'] + if network_group_id is None: + raise TypeError("Missing 'network_group_id' argument") + if target_virtual_network_id is None and 'targetVirtualNetworkId' in kwargs: + target_virtual_network_id = kwargs['targetVirtualNetworkId'] + if target_virtual_network_id is None: + raise TypeError("Missing 'target_virtual_network_id' argument") + + _setter("network_group_id", network_group_id) + _setter("target_virtual_network_id", target_virtual_network_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="networkGroupId") @@ -79,14 +102,35 @@ def __init__(__self__, *, :param pulumi.Input[str] region: The region of the Network Manager Static Member. :param pulumi.Input[str] target_virtual_network_id: Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created. """ + _NetworkManagerStaticMemberState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + network_group_id=network_group_id, + region=region, + target_virtual_network_id=target_virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + network_group_id: Optional[pulumi.Input[str]] = None, + region: Optional[pulumi.Input[str]] = None, + target_virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_group_id is None and 'networkGroupId' in kwargs: + network_group_id = kwargs['networkGroupId'] + if target_virtual_network_id is None and 'targetVirtualNetworkId' in kwargs: + target_virtual_network_id = kwargs['targetVirtualNetworkId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_group_id is not None: - pulumi.set(__self__, "network_group_id", network_group_id) + _setter("network_group_id", network_group_id) if region is not None: - pulumi.set(__self__, "region", region) + _setter("region", region) if target_virtual_network_id is not None: - pulumi.set(__self__, "target_virtual_network_id", target_virtual_network_id) + _setter("target_virtual_network_id", target_virtual_network_id) @property @pulumi.getter @@ -252,6 +296,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkManagerStaticMemberArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_manager_subscription_connection.py b/sdk/python/pulumi_azure/network/network_manager_subscription_connection.py index 32cf6d60ba..1a9b6f8acc 100644 --- a/sdk/python/pulumi_azure/network/network_manager_subscription_connection.py +++ b/sdk/python/pulumi_azure/network/network_manager_subscription_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkManagerSubscriptionConnectionArgs', 'NetworkManagerSubscriptionConnection'] @@ -25,12 +25,37 @@ def __init__(__self__, *, :param pulumi.Input[str] description: A description of the Network Manager Subscription Connection. :param pulumi.Input[str] name: Specifies the name which should be used for this Network Subscription Network Manager Connection. Changing this forces a new Network Subscription Network Manager Connection to be created. """ - pulumi.set(__self__, "network_manager_id", network_manager_id) - pulumi.set(__self__, "subscription_id", subscription_id) + NetworkManagerSubscriptionConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_manager_id=network_manager_id, + subscription_id=subscription_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_manager_id: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if network_manager_id is None: + raise TypeError("Missing 'network_manager_id' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + + _setter("network_manager_id", network_manager_id) + _setter("subscription_id", subscription_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="networkManagerId") @@ -97,16 +122,41 @@ def __init__(__self__, *, :param pulumi.Input[str] network_manager_id: Specifies the ID of the Network Manager which the Subscription is connected to. :param pulumi.Input[str] subscription_id: Specifies the ID of the target Subscription. Changing this forces a new resource to be created. """ + _NetworkManagerSubscriptionConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_state=connection_state, + description=description, + name=name, + network_manager_id=network_manager_id, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_state: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_manager_id: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_state is None and 'connectionState' in kwargs: + connection_state = kwargs['connectionState'] + if network_manager_id is None and 'networkManagerId' in kwargs: + network_manager_id = kwargs['networkManagerId'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if connection_state is not None: - pulumi.set(__self__, "connection_state", connection_state) + _setter("connection_state", connection_state) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_manager_id is not None: - pulumi.set(__self__, "network_manager_id", network_manager_id) + _setter("network_manager_id", network_manager_id) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter(name="connectionState") @@ -266,6 +316,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkManagerSubscriptionConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_packet_capture.py b/sdk/python/pulumi_azure/network/network_packet_capture.py index ce8ed53a5e..4ead3dc10b 100644 --- a/sdk/python/pulumi_azure/network/network_packet_capture.py +++ b/sdk/python/pulumi_azure/network/network_packet_capture.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,20 +39,69 @@ def __init__(__self__, *, :param pulumi.Input[int] maximum_capture_duration: The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name to use for this Network Packet Capture. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "network_watcher_name", network_watcher_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_location", storage_location) - pulumi.set(__self__, "target_resource_id", target_resource_id) + NetworkPacketCaptureArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_watcher_name=network_watcher_name, + resource_group_name=resource_group_name, + storage_location=storage_location, + target_resource_id=target_resource_id, + filters=filters, + maximum_bytes_per_packet=maximum_bytes_per_packet, + maximum_bytes_per_session=maximum_bytes_per_session, + maximum_capture_duration=maximum_capture_duration, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_watcher_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_location: Optional[pulumi.Input['NetworkPacketCaptureStorageLocationArgs']] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + filters: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkPacketCaptureFilterArgs']]]] = None, + maximum_bytes_per_packet: Optional[pulumi.Input[int]] = None, + maximum_bytes_per_session: Optional[pulumi.Input[int]] = None, + maximum_capture_duration: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_watcher_name is None and 'networkWatcherName' in kwargs: + network_watcher_name = kwargs['networkWatcherName'] + if network_watcher_name is None: + raise TypeError("Missing 'network_watcher_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_location is None and 'storageLocation' in kwargs: + storage_location = kwargs['storageLocation'] + if storage_location is None: + raise TypeError("Missing 'storage_location' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + if maximum_bytes_per_packet is None and 'maximumBytesPerPacket' in kwargs: + maximum_bytes_per_packet = kwargs['maximumBytesPerPacket'] + if maximum_bytes_per_session is None and 'maximumBytesPerSession' in kwargs: + maximum_bytes_per_session = kwargs['maximumBytesPerSession'] + if maximum_capture_duration is None and 'maximumCaptureDuration' in kwargs: + maximum_capture_duration = kwargs['maximumCaptureDuration'] + + _setter("network_watcher_name", network_watcher_name) + _setter("resource_group_name", resource_group_name) + _setter("storage_location", storage_location) + _setter("target_resource_id", target_resource_id) if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) if maximum_bytes_per_packet is not None: - pulumi.set(__self__, "maximum_bytes_per_packet", maximum_bytes_per_packet) + _setter("maximum_bytes_per_packet", maximum_bytes_per_packet) if maximum_bytes_per_session is not None: - pulumi.set(__self__, "maximum_bytes_per_session", maximum_bytes_per_session) + _setter("maximum_bytes_per_session", maximum_bytes_per_session) if maximum_capture_duration is not None: - pulumi.set(__self__, "maximum_capture_duration", maximum_capture_duration) + _setter("maximum_capture_duration", maximum_capture_duration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="networkWatcherName") @@ -191,24 +240,65 @@ def __init__(__self__, *, > **NOTE:** Currently only Virtual Machines IDs are supported. """ + _NetworkPacketCaptureState._configure( + lambda key, value: pulumi.set(__self__, key, value), + filters=filters, + maximum_bytes_per_packet=maximum_bytes_per_packet, + maximum_bytes_per_session=maximum_bytes_per_session, + maximum_capture_duration=maximum_capture_duration, + name=name, + network_watcher_name=network_watcher_name, + resource_group_name=resource_group_name, + storage_location=storage_location, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filters: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkPacketCaptureFilterArgs']]]] = None, + maximum_bytes_per_packet: Optional[pulumi.Input[int]] = None, + maximum_bytes_per_session: Optional[pulumi.Input[int]] = None, + maximum_capture_duration: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + network_watcher_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_location: Optional[pulumi.Input['NetworkPacketCaptureStorageLocationArgs']] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if maximum_bytes_per_packet is None and 'maximumBytesPerPacket' in kwargs: + maximum_bytes_per_packet = kwargs['maximumBytesPerPacket'] + if maximum_bytes_per_session is None and 'maximumBytesPerSession' in kwargs: + maximum_bytes_per_session = kwargs['maximumBytesPerSession'] + if maximum_capture_duration is None and 'maximumCaptureDuration' in kwargs: + maximum_capture_duration = kwargs['maximumCaptureDuration'] + if network_watcher_name is None and 'networkWatcherName' in kwargs: + network_watcher_name = kwargs['networkWatcherName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_location is None and 'storageLocation' in kwargs: + storage_location = kwargs['storageLocation'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if filters is not None: - pulumi.set(__self__, "filters", filters) + _setter("filters", filters) if maximum_bytes_per_packet is not None: - pulumi.set(__self__, "maximum_bytes_per_packet", maximum_bytes_per_packet) + _setter("maximum_bytes_per_packet", maximum_bytes_per_packet) if maximum_bytes_per_session is not None: - pulumi.set(__self__, "maximum_bytes_per_session", maximum_bytes_per_session) + _setter("maximum_bytes_per_session", maximum_bytes_per_session) if maximum_capture_duration is not None: - pulumi.set(__self__, "maximum_capture_duration", maximum_capture_duration) + _setter("maximum_capture_duration", maximum_capture_duration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_watcher_name is not None: - pulumi.set(__self__, "network_watcher_name", network_watcher_name) + _setter("network_watcher_name", network_watcher_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if storage_location is not None: - pulumi.set(__self__, "storage_location", storage_location) + _setter("storage_location", storage_location) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter @@ -540,6 +630,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkPacketCaptureArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -574,6 +668,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if storage_location is not None and not isinstance(storage_location, NetworkPacketCaptureStorageLocationArgs): + storage_location = storage_location or {} + def _setter(key, value): + storage_location[key] = value + NetworkPacketCaptureStorageLocationArgs._configure(_setter, **storage_location) if storage_location is None and not opts.urn: raise TypeError("Missing required property 'storage_location'") __props__.__dict__["storage_location"] = storage_location diff --git a/sdk/python/pulumi_azure/network/network_security_group.py b/sdk/python/pulumi_azure/network/network_security_group.py index 2ddb8b61be..77b06f0c2d 100644 --- a/sdk/python/pulumi_azure/network/network_security_group.py +++ b/sdk/python/pulumi_azure/network/network_security_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,15 +31,40 @@ def __init__(__self__, *, > **NOTE** Since `security_rule` can be configured both inline and via the separate `network.NetworkSecurityRule` resource, we have to explicitly set it to empty slice (`[]`) to remove it. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + NetworkSecurityGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + security_rules=security_rules, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + security_rules: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkSecurityGroupSecurityRuleArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if security_rules is None and 'securityRules' in kwargs: + security_rules = kwargs['securityRules'] + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if security_rules is not None: - pulumi.set(__self__, "security_rules", security_rules) + _setter("security_rules", security_rules) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -122,16 +147,39 @@ def __init__(__self__, *, > **NOTE** Since `security_rule` can be configured both inline and via the separate `network.NetworkSecurityRule` resource, we have to explicitly set it to empty slice (`[]`) to remove it. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _NetworkSecurityGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + security_rules=security_rules, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + security_rules: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkSecurityGroupSecurityRuleArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if security_rules is None and 'securityRules' in kwargs: + security_rules = kwargs['securityRules'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if security_rules is not None: - pulumi.set(__self__, "security_rules", security_rules) + _setter("security_rules", security_rules) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -315,6 +363,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkSecurityGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_security_rule.py b/sdk/python/pulumi_azure/network/network_security_rule.py index b9c96b732d..b9797f2570 100644 --- a/sdk/python/pulumi_azure/network/network_security_rule.py +++ b/sdk/python/pulumi_azure/network/network_security_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkSecurityRuleArgs', 'NetworkSecurityRule'] @@ -53,36 +53,117 @@ def __init__(__self__, *, :param pulumi.Input[str] source_port_range: Source Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `source_port_ranges` is not specified. :param pulumi.Input[Sequence[pulumi.Input[str]]] source_port_ranges: List of source ports or port ranges. This is required if `source_port_range` is not specified. """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "network_security_group_name", network_security_group_name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "resource_group_name", resource_group_name) + NetworkSecurityRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + direction=direction, + network_security_group_name=network_security_group_name, + priority=priority, + protocol=protocol, + resource_group_name=resource_group_name, + description=description, + destination_address_prefix=destination_address_prefix, + destination_address_prefixes=destination_address_prefixes, + destination_application_security_group_ids=destination_application_security_group_ids, + destination_port_range=destination_port_range, + destination_port_ranges=destination_port_ranges, + name=name, + source_address_prefix=source_address_prefix, + source_address_prefixes=source_address_prefixes, + source_application_security_group_ids=source_application_security_group_ids, + source_port_range=source_port_range, + source_port_ranges=source_port_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[pulumi.Input[str]] = None, + direction: Optional[pulumi.Input[str]] = None, + network_security_group_name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + destination_address_prefix: Optional[pulumi.Input[str]] = None, + destination_address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_application_security_group_ids: Optional[pulumi.Input[str]] = None, + destination_port_range: Optional[pulumi.Input[str]] = None, + destination_port_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + source_address_prefix: Optional[pulumi.Input[str]] = None, + source_address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_application_security_group_ids: Optional[pulumi.Input[str]] = None, + source_port_range: Optional[pulumi.Input[str]] = None, + source_port_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if direction is None: + raise TypeError("Missing 'direction' argument") + if network_security_group_name is None and 'networkSecurityGroupName' in kwargs: + network_security_group_name = kwargs['networkSecurityGroupName'] + if network_security_group_name is None: + raise TypeError("Missing 'network_security_group_name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if destination_address_prefix is None and 'destinationAddressPrefix' in kwargs: + destination_address_prefix = kwargs['destinationAddressPrefix'] + if destination_address_prefixes is None and 'destinationAddressPrefixes' in kwargs: + destination_address_prefixes = kwargs['destinationAddressPrefixes'] + if destination_application_security_group_ids is None and 'destinationApplicationSecurityGroupIds' in kwargs: + destination_application_security_group_ids = kwargs['destinationApplicationSecurityGroupIds'] + if destination_port_range is None and 'destinationPortRange' in kwargs: + destination_port_range = kwargs['destinationPortRange'] + if destination_port_ranges is None and 'destinationPortRanges' in kwargs: + destination_port_ranges = kwargs['destinationPortRanges'] + if source_address_prefix is None and 'sourceAddressPrefix' in kwargs: + source_address_prefix = kwargs['sourceAddressPrefix'] + if source_address_prefixes is None and 'sourceAddressPrefixes' in kwargs: + source_address_prefixes = kwargs['sourceAddressPrefixes'] + if source_application_security_group_ids is None and 'sourceApplicationSecurityGroupIds' in kwargs: + source_application_security_group_ids = kwargs['sourceApplicationSecurityGroupIds'] + if source_port_range is None and 'sourcePortRange' in kwargs: + source_port_range = kwargs['sourcePortRange'] + if source_port_ranges is None and 'sourcePortRanges' in kwargs: + source_port_ranges = kwargs['sourcePortRanges'] + + _setter("access", access) + _setter("direction", direction) + _setter("network_security_group_name", network_security_group_name) + _setter("priority", priority) + _setter("protocol", protocol) + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_address_prefix is not None: - pulumi.set(__self__, "destination_address_prefix", destination_address_prefix) + _setter("destination_address_prefix", destination_address_prefix) if destination_address_prefixes is not None: - pulumi.set(__self__, "destination_address_prefixes", destination_address_prefixes) + _setter("destination_address_prefixes", destination_address_prefixes) if destination_application_security_group_ids is not None: - pulumi.set(__self__, "destination_application_security_group_ids", destination_application_security_group_ids) + _setter("destination_application_security_group_ids", destination_application_security_group_ids) if destination_port_range is not None: - pulumi.set(__self__, "destination_port_range", destination_port_range) + _setter("destination_port_range", destination_port_range) if destination_port_ranges is not None: - pulumi.set(__self__, "destination_port_ranges", destination_port_ranges) + _setter("destination_port_ranges", destination_port_ranges) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if source_address_prefix is not None: - pulumi.set(__self__, "source_address_prefix", source_address_prefix) + _setter("source_address_prefix", source_address_prefix) if source_address_prefixes is not None: - pulumi.set(__self__, "source_address_prefixes", source_address_prefixes) + _setter("source_address_prefixes", source_address_prefixes) if source_application_security_group_ids is not None: - pulumi.set(__self__, "source_application_security_group_ids", source_application_security_group_ids) + _setter("source_application_security_group_ids", source_application_security_group_ids) if source_port_range is not None: - pulumi.set(__self__, "source_port_range", source_port_range) + _setter("source_port_range", source_port_range) if source_port_ranges is not None: - pulumi.set(__self__, "source_port_ranges", source_port_ranges) + _setter("source_port_ranges", source_port_ranges) @property @pulumi.getter @@ -343,42 +424,111 @@ def __init__(__self__, *, :param pulumi.Input[str] source_port_range: Source Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `source_port_ranges` is not specified. :param pulumi.Input[Sequence[pulumi.Input[str]]] source_port_ranges: List of source ports or port ranges. This is required if `source_port_range` is not specified. """ + _NetworkSecurityRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + description=description, + destination_address_prefix=destination_address_prefix, + destination_address_prefixes=destination_address_prefixes, + destination_application_security_group_ids=destination_application_security_group_ids, + destination_port_range=destination_port_range, + destination_port_ranges=destination_port_ranges, + direction=direction, + name=name, + network_security_group_name=network_security_group_name, + priority=priority, + protocol=protocol, + resource_group_name=resource_group_name, + source_address_prefix=source_address_prefix, + source_address_prefixes=source_address_prefixes, + source_application_security_group_ids=source_application_security_group_ids, + source_port_range=source_port_range, + source_port_ranges=source_port_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + destination_address_prefix: Optional[pulumi.Input[str]] = None, + destination_address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination_application_security_group_ids: Optional[pulumi.Input[str]] = None, + destination_port_range: Optional[pulumi.Input[str]] = None, + destination_port_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + direction: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_security_group_name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source_address_prefix: Optional[pulumi.Input[str]] = None, + source_address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source_application_security_group_ids: Optional[pulumi.Input[str]] = None, + source_port_range: Optional[pulumi.Input[str]] = None, + source_port_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_address_prefix is None and 'destinationAddressPrefix' in kwargs: + destination_address_prefix = kwargs['destinationAddressPrefix'] + if destination_address_prefixes is None and 'destinationAddressPrefixes' in kwargs: + destination_address_prefixes = kwargs['destinationAddressPrefixes'] + if destination_application_security_group_ids is None and 'destinationApplicationSecurityGroupIds' in kwargs: + destination_application_security_group_ids = kwargs['destinationApplicationSecurityGroupIds'] + if destination_port_range is None and 'destinationPortRange' in kwargs: + destination_port_range = kwargs['destinationPortRange'] + if destination_port_ranges is None and 'destinationPortRanges' in kwargs: + destination_port_ranges = kwargs['destinationPortRanges'] + if network_security_group_name is None and 'networkSecurityGroupName' in kwargs: + network_security_group_name = kwargs['networkSecurityGroupName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if source_address_prefix is None and 'sourceAddressPrefix' in kwargs: + source_address_prefix = kwargs['sourceAddressPrefix'] + if source_address_prefixes is None and 'sourceAddressPrefixes' in kwargs: + source_address_prefixes = kwargs['sourceAddressPrefixes'] + if source_application_security_group_ids is None and 'sourceApplicationSecurityGroupIds' in kwargs: + source_application_security_group_ids = kwargs['sourceApplicationSecurityGroupIds'] + if source_port_range is None and 'sourcePortRange' in kwargs: + source_port_range = kwargs['sourcePortRange'] + if source_port_ranges is None and 'sourcePortRanges' in kwargs: + source_port_ranges = kwargs['sourcePortRanges'] + if access is not None: - pulumi.set(__self__, "access", access) + _setter("access", access) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_address_prefix is not None: - pulumi.set(__self__, "destination_address_prefix", destination_address_prefix) + _setter("destination_address_prefix", destination_address_prefix) if destination_address_prefixes is not None: - pulumi.set(__self__, "destination_address_prefixes", destination_address_prefixes) + _setter("destination_address_prefixes", destination_address_prefixes) if destination_application_security_group_ids is not None: - pulumi.set(__self__, "destination_application_security_group_ids", destination_application_security_group_ids) + _setter("destination_application_security_group_ids", destination_application_security_group_ids) if destination_port_range is not None: - pulumi.set(__self__, "destination_port_range", destination_port_range) + _setter("destination_port_range", destination_port_range) if destination_port_ranges is not None: - pulumi.set(__self__, "destination_port_ranges", destination_port_ranges) + _setter("destination_port_ranges", destination_port_ranges) if direction is not None: - pulumi.set(__self__, "direction", direction) + _setter("direction", direction) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_security_group_name is not None: - pulumi.set(__self__, "network_security_group_name", network_security_group_name) + _setter("network_security_group_name", network_security_group_name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if source_address_prefix is not None: - pulumi.set(__self__, "source_address_prefix", source_address_prefix) + _setter("source_address_prefix", source_address_prefix) if source_address_prefixes is not None: - pulumi.set(__self__, "source_address_prefixes", source_address_prefixes) + _setter("source_address_prefixes", source_address_prefixes) if source_application_security_group_ids is not None: - pulumi.set(__self__, "source_application_security_group_ids", source_application_security_group_ids) + _setter("source_application_security_group_ids", source_application_security_group_ids) if source_port_range is not None: - pulumi.set(__self__, "source_port_range", source_port_range) + _setter("source_port_range", source_port_range) if source_port_ranges is not None: - pulumi.set(__self__, "source_port_ranges", source_port_ranges) + _setter("source_port_ranges", source_port_ranges) @property @pulumi.getter @@ -734,6 +884,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkSecurityRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_watcher.py b/sdk/python/pulumi_azure/network/network_watcher.py index cfce5e3cc0..a34a565b48 100644 --- a/sdk/python/pulumi_azure/network/network_watcher.py +++ b/sdk/python/pulumi_azure/network/network_watcher.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkWatcherArgs', 'NetworkWatcher'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Network Watcher. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + NetworkWatcherArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -96,14 +117,33 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Network Watcher. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _NetworkWatcherState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -233,6 +273,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkWatcherArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/network_watcher_flow_log.py b/sdk/python/pulumi_azure/network/network_watcher_flow_log.py index 43c5fbd320..5ab01d2514 100644 --- a/sdk/python/pulumi_azure/network/network_watcher_flow_log.py +++ b/sdk/python/pulumi_azure/network/network_watcher_flow_log.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,22 +41,77 @@ def __init__(__self__, *, :param pulumi.Input['NetworkWatcherFlowLogTrafficAnalyticsArgs'] traffic_analytics: A `traffic_analytics` block as documented below. :param pulumi.Input[int] version: The version (revision) of the flow log. Possible values are `1` and `2`. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "network_security_group_id", network_security_group_id) - pulumi.set(__self__, "network_watcher_name", network_watcher_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "retention_policy", retention_policy) - pulumi.set(__self__, "storage_account_id", storage_account_id) + NetworkWatcherFlowLogArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + network_security_group_id=network_security_group_id, + network_watcher_name=network_watcher_name, + resource_group_name=resource_group_name, + retention_policy=retention_policy, + storage_account_id=storage_account_id, + location=location, + name=name, + tags=tags, + traffic_analytics=traffic_analytics, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + network_security_group_id: Optional[pulumi.Input[str]] = None, + network_watcher_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_policy: Optional[pulumi.Input['NetworkWatcherFlowLogRetentionPolicyArgs']] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + traffic_analytics: Optional[pulumi.Input['NetworkWatcherFlowLogTrafficAnalyticsArgs']] = None, + version: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + if network_security_group_id is None: + raise TypeError("Missing 'network_security_group_id' argument") + if network_watcher_name is None and 'networkWatcherName' in kwargs: + network_watcher_name = kwargs['networkWatcherName'] + if network_watcher_name is None: + raise TypeError("Missing 'network_watcher_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if retention_policy is None: + raise TypeError("Missing 'retention_policy' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if traffic_analytics is None and 'trafficAnalytics' in kwargs: + traffic_analytics = kwargs['trafficAnalytics'] + + _setter("enabled", enabled) + _setter("network_security_group_id", network_security_group_id) + _setter("network_watcher_name", network_watcher_name) + _setter("resource_group_name", resource_group_name) + _setter("retention_policy", retention_policy) + _setter("storage_account_id", storage_account_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if traffic_analytics is not None: - pulumi.set(__self__, "traffic_analytics", traffic_analytics) + _setter("traffic_analytics", traffic_analytics) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -219,28 +274,71 @@ def __init__(__self__, *, :param pulumi.Input['NetworkWatcherFlowLogTrafficAnalyticsArgs'] traffic_analytics: A `traffic_analytics` block as documented below. :param pulumi.Input[int] version: The version (revision) of the flow log. Possible values are `1` and `2`. """ + _NetworkWatcherFlowLogState._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + location=location, + name=name, + network_security_group_id=network_security_group_id, + network_watcher_name=network_watcher_name, + resource_group_name=resource_group_name, + retention_policy=retention_policy, + storage_account_id=storage_account_id, + tags=tags, + traffic_analytics=traffic_analytics, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_security_group_id: Optional[pulumi.Input[str]] = None, + network_watcher_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_policy: Optional[pulumi.Input['NetworkWatcherFlowLogRetentionPolicyArgs']] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + traffic_analytics: Optional[pulumi.Input['NetworkWatcherFlowLogTrafficAnalyticsArgs']] = None, + version: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + if network_watcher_name is None and 'networkWatcherName' in kwargs: + network_watcher_name = kwargs['networkWatcherName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if traffic_analytics is None and 'trafficAnalytics' in kwargs: + traffic_analytics = kwargs['trafficAnalytics'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_security_group_id is not None: - pulumi.set(__self__, "network_security_group_id", network_security_group_id) + _setter("network_security_group_id", network_security_group_id) if network_watcher_name is not None: - pulumi.set(__self__, "network_watcher_name", network_watcher_name) + _setter("network_watcher_name", network_watcher_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if traffic_analytics is not None: - pulumi.set(__self__, "traffic_analytics", traffic_analytics) + _setter("traffic_analytics", traffic_analytics) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -526,6 +624,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkWatcherFlowLogArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -565,6 +667,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if retention_policy is not None and not isinstance(retention_policy, NetworkWatcherFlowLogRetentionPolicyArgs): + retention_policy = retention_policy or {} + def _setter(key, value): + retention_policy[key] = value + NetworkWatcherFlowLogRetentionPolicyArgs._configure(_setter, **retention_policy) if retention_policy is None and not opts.urn: raise TypeError("Missing required property 'retention_policy'") __props__.__dict__["retention_policy"] = retention_policy @@ -572,6 +679,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'storage_account_id'") __props__.__dict__["storage_account_id"] = storage_account_id __props__.__dict__["tags"] = tags + if traffic_analytics is not None and not isinstance(traffic_analytics, NetworkWatcherFlowLogTrafficAnalyticsArgs): + traffic_analytics = traffic_analytics or {} + def _setter(key, value): + traffic_analytics[key] = value + NetworkWatcherFlowLogTrafficAnalyticsArgs._configure(_setter, **traffic_analytics) __props__.__dict__["traffic_analytics"] = traffic_analytics __props__.__dict__["version"] = version super(NetworkWatcherFlowLog, __self__).__init__( diff --git a/sdk/python/pulumi_azure/network/outputs.py b/sdk/python/pulumi_azure/network/outputs.py index 3df051b5e7..51566e9e7a 100644 --- a/sdk/python/pulumi_azure/network/outputs.py +++ b/sdk/python/pulumi_azure/network/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -259,10 +259,29 @@ def __init__(__self__, *, :param str name: The name of the Authentication Certificate. :param str id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "data", data) - pulumi.set(__self__, "name", name) + ApplicationGatewayAuthenticationCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + data=data, + name=name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data: Optional[str] = None, + name: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data is None: + raise TypeError("Missing 'data' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("data", data) + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -317,9 +336,28 @@ def __init__(__self__, *, :param int min_capacity: Minimum capacity for autoscaling. Accepted values are in the range `0` to `100`. :param int max_capacity: Maximum capacity for autoscaling. Accepted values are in the range `2` to `125`. """ - pulumi.set(__self__, "min_capacity", min_capacity) + ApplicationGatewayAutoscaleConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + min_capacity=min_capacity, + max_capacity=max_capacity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + min_capacity: Optional[int] = None, + max_capacity: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if min_capacity is None and 'minCapacity' in kwargs: + min_capacity = kwargs['minCapacity'] + if min_capacity is None: + raise TypeError("Missing 'min_capacity' argument") + if max_capacity is None and 'maxCapacity' in kwargs: + max_capacity = kwargs['maxCapacity'] + + _setter("min_capacity", min_capacity) if max_capacity is not None: - pulumi.set(__self__, "max_capacity", max_capacity) + _setter("max_capacity", max_capacity) @property @pulumi.getter(name="minCapacity") @@ -368,13 +406,34 @@ def __init__(__self__, *, :param str id: The ID of the Rewrite Rule Set :param Sequence[str] ip_addresses: A list of IP Addresses which should be part of the Backend Address Pool. """ - pulumi.set(__self__, "name", name) + ApplicationGatewayBackendAddressPool._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + fqdns=fqdns, + id=id, + ip_addresses=ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + fqdns: Optional[Sequence[str]] = None, + id: Optional[str] = None, + ip_addresses: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + + _setter("name", name) if fqdns is not None: - pulumi.set(__self__, "fqdns", fqdns) + _setter("fqdns", fqdns) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) @property @pulumi.getter @@ -479,32 +538,99 @@ def __init__(__self__, *, :param int request_timeout: The request timeout in seconds, which must be between 1 and 86400 seconds. Defaults to `30`. :param Sequence[str] trusted_root_certificate_names: A list of `trusted_root_certificate` names. """ - pulumi.set(__self__, "cookie_based_affinity", cookie_based_affinity) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "protocol", protocol) + ApplicationGatewayBackendHttpSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + cookie_based_affinity=cookie_based_affinity, + name=name, + port=port, + protocol=protocol, + affinity_cookie_name=affinity_cookie_name, + authentication_certificates=authentication_certificates, + connection_draining=connection_draining, + host_name=host_name, + id=id, + path=path, + pick_host_name_from_backend_address=pick_host_name_from_backend_address, + probe_id=probe_id, + probe_name=probe_name, + request_timeout=request_timeout, + trusted_root_certificate_names=trusted_root_certificate_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cookie_based_affinity: Optional[str] = None, + name: Optional[str] = None, + port: Optional[int] = None, + protocol: Optional[str] = None, + affinity_cookie_name: Optional[str] = None, + authentication_certificates: Optional[Sequence['outputs.ApplicationGatewayBackendHttpSettingAuthenticationCertificate']] = None, + connection_draining: Optional['outputs.ApplicationGatewayBackendHttpSettingConnectionDraining'] = None, + host_name: Optional[str] = None, + id: Optional[str] = None, + path: Optional[str] = None, + pick_host_name_from_backend_address: Optional[bool] = None, + probe_id: Optional[str] = None, + probe_name: Optional[str] = None, + request_timeout: Optional[int] = None, + trusted_root_certificate_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cookie_based_affinity is None and 'cookieBasedAffinity' in kwargs: + cookie_based_affinity = kwargs['cookieBasedAffinity'] + if cookie_based_affinity is None: + raise TypeError("Missing 'cookie_based_affinity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if affinity_cookie_name is None and 'affinityCookieName' in kwargs: + affinity_cookie_name = kwargs['affinityCookieName'] + if authentication_certificates is None and 'authenticationCertificates' in kwargs: + authentication_certificates = kwargs['authenticationCertificates'] + if connection_draining is None and 'connectionDraining' in kwargs: + connection_draining = kwargs['connectionDraining'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if pick_host_name_from_backend_address is None and 'pickHostNameFromBackendAddress' in kwargs: + pick_host_name_from_backend_address = kwargs['pickHostNameFromBackendAddress'] + if probe_id is None and 'probeId' in kwargs: + probe_id = kwargs['probeId'] + if probe_name is None and 'probeName' in kwargs: + probe_name = kwargs['probeName'] + if request_timeout is None and 'requestTimeout' in kwargs: + request_timeout = kwargs['requestTimeout'] + if trusted_root_certificate_names is None and 'trustedRootCertificateNames' in kwargs: + trusted_root_certificate_names = kwargs['trustedRootCertificateNames'] + + _setter("cookie_based_affinity", cookie_based_affinity) + _setter("name", name) + _setter("port", port) + _setter("protocol", protocol) if affinity_cookie_name is not None: - pulumi.set(__self__, "affinity_cookie_name", affinity_cookie_name) + _setter("affinity_cookie_name", affinity_cookie_name) if authentication_certificates is not None: - pulumi.set(__self__, "authentication_certificates", authentication_certificates) + _setter("authentication_certificates", authentication_certificates) if connection_draining is not None: - pulumi.set(__self__, "connection_draining", connection_draining) + _setter("connection_draining", connection_draining) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if pick_host_name_from_backend_address is not None: - pulumi.set(__self__, "pick_host_name_from_backend_address", pick_host_name_from_backend_address) + _setter("pick_host_name_from_backend_address", pick_host_name_from_backend_address) if probe_id is not None: - pulumi.set(__self__, "probe_id", probe_id) + _setter("probe_id", probe_id) if probe_name is not None: - pulumi.set(__self__, "probe_name", probe_name) + _setter("probe_name", probe_name) if request_timeout is not None: - pulumi.set(__self__, "request_timeout", request_timeout) + _setter("request_timeout", request_timeout) if trusted_root_certificate_names is not None: - pulumi.set(__self__, "trusted_root_certificate_names", trusted_root_certificate_names) + _setter("trusted_root_certificate_names", trusted_root_certificate_names) @property @pulumi.getter(name="cookieBasedAffinity") @@ -636,9 +762,24 @@ def __init__(__self__, *, :param str name: The name of the Authentication Certificate. :param str id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "name", name) + ApplicationGatewayBackendHttpSettingAuthenticationCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -683,8 +824,27 @@ def __init__(__self__, *, :param int drain_timeout_sec: The number of seconds connection draining is active. Acceptable values are from `1` second to `3600` seconds. :param bool enabled: If connection draining is enabled or not. """ - pulumi.set(__self__, "drain_timeout_sec", drain_timeout_sec) - pulumi.set(__self__, "enabled", enabled) + ApplicationGatewayBackendHttpSettingConnectionDraining._configure( + lambda key, value: pulumi.set(__self__, key, value), + drain_timeout_sec=drain_timeout_sec, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + drain_timeout_sec: Optional[int] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if drain_timeout_sec is None and 'drainTimeoutSec' in kwargs: + drain_timeout_sec = kwargs['drainTimeoutSec'] + if drain_timeout_sec is None: + raise TypeError("Missing 'drain_timeout_sec' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("drain_timeout_sec", drain_timeout_sec) + _setter("enabled", enabled) @property @pulumi.getter(name="drainTimeoutSec") @@ -733,10 +893,33 @@ def __init__(__self__, *, :param str status_code: Status code of the application gateway customer error. Possible values are `HttpStatus403` and `HttpStatus502` :param str id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "custom_error_page_url", custom_error_page_url) - pulumi.set(__self__, "status_code", status_code) + ApplicationGatewayCustomErrorConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_error_page_url=custom_error_page_url, + status_code=status_code, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_error_page_url: Optional[str] = None, + status_code: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_error_page_url is None and 'customErrorPageUrl' in kwargs: + custom_error_page_url = kwargs['customErrorPageUrl'] + if custom_error_page_url is None: + raise TypeError("Missing 'custom_error_page_url' argument") + if status_code is None and 'statusCode' in kwargs: + status_code = kwargs['statusCode'] + if status_code is None: + raise TypeError("Missing 'status_code' argument") + + _setter("custom_error_page_url", custom_error_page_url) + _setter("status_code", status_code) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter(name="customErrorPageUrl") @@ -811,21 +994,60 @@ def __init__(__self__, *, :param str public_ip_address_id: The ID of a Public IP Address which the Application Gateway should use. The allocation method for the Public IP Address depends on the `sku` of this Application Gateway. Please refer to the [Azure documentation for public IP addresses](https://docs.microsoft.com/azure/virtual-network/public-ip-addresses#application-gateways) for details. :param str subnet_id: The ID of the Subnet. """ - pulumi.set(__self__, "name", name) + ApplicationGatewayFrontendIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + id=id, + private_ip_address=private_ip_address, + private_ip_address_allocation=private_ip_address_allocation, + private_link_configuration_id=private_link_configuration_id, + private_link_configuration_name=private_link_configuration_name, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + id: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_address_allocation: Optional[str] = None, + private_link_configuration_id: Optional[str] = None, + private_link_configuration_name: Optional[str] = None, + public_ip_address_id: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + if private_link_configuration_id is None and 'privateLinkConfigurationId' in kwargs: + private_link_configuration_id = kwargs['privateLinkConfigurationId'] + if private_link_configuration_name is None and 'privateLinkConfigurationName' in kwargs: + private_link_configuration_name = kwargs['privateLinkConfigurationName'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_address_allocation is not None: - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) + _setter("private_ip_address_allocation", private_ip_address_allocation) if private_link_configuration_id is not None: - pulumi.set(__self__, "private_link_configuration_id", private_link_configuration_id) + _setter("private_link_configuration_id", private_link_configuration_id) if private_link_configuration_name is not None: - pulumi.set(__self__, "private_link_configuration_name", private_link_configuration_name) + _setter("private_link_configuration_name", private_link_configuration_name) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -903,10 +1125,29 @@ def __init__(__self__, *, :param int port: The port used for this Frontend Port. :param str id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "port", port) + ApplicationGatewayFrontendPort._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + port=port, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + port: Optional[int] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if port is None: + raise TypeError("Missing 'port' argument") + + _setter("name", name) + _setter("port", port) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -961,10 +1202,31 @@ def __init__(__self__, *, :param str subnet_id: The ID of the Subnet which the Application Gateway should be connected to. :param str id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "subnet_id", subnet_id) + ApplicationGatewayGatewayIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + subnet_id=subnet_id, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + subnet_id: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("name", name) + _setter("subnet_id", subnet_id) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -1019,8 +1281,29 @@ def __init__(__self__, *, :param bool request_buffering_enabled: Whether Application Gateway's Request buffer is enabled. :param bool response_buffering_enabled: Whether Application Gateway's Response buffer is enabled. """ - pulumi.set(__self__, "request_buffering_enabled", request_buffering_enabled) - pulumi.set(__self__, "response_buffering_enabled", response_buffering_enabled) + ApplicationGatewayGlobal._configure( + lambda key, value: pulumi.set(__self__, key, value), + request_buffering_enabled=request_buffering_enabled, + response_buffering_enabled=response_buffering_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + request_buffering_enabled: Optional[bool] = None, + response_buffering_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if request_buffering_enabled is None and 'requestBufferingEnabled' in kwargs: + request_buffering_enabled = kwargs['requestBufferingEnabled'] + if request_buffering_enabled is None: + raise TypeError("Missing 'request_buffering_enabled' argument") + if response_buffering_enabled is None and 'responseBufferingEnabled' in kwargs: + response_buffering_enabled = kwargs['responseBufferingEnabled'] + if response_buffering_enabled is None: + raise TypeError("Missing 'response_buffering_enabled' argument") + + _setter("request_buffering_enabled", request_buffering_enabled) + _setter("response_buffering_enabled", response_buffering_enabled) @property @pulumi.getter(name="requestBufferingEnabled") @@ -1119,34 +1402,109 @@ def __init__(__self__, *, :param str ssl_profile_id: The ID of the associated SSL Profile. :param str ssl_profile_name: The name of the associated SSL Profile which should be used for this HTTP Listener. """ - pulumi.set(__self__, "frontend_ip_configuration_name", frontend_ip_configuration_name) - pulumi.set(__self__, "frontend_port_name", frontend_port_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + ApplicationGatewayHttpListener._configure( + lambda key, value: pulumi.set(__self__, key, value), + frontend_ip_configuration_name=frontend_ip_configuration_name, + frontend_port_name=frontend_port_name, + name=name, + protocol=protocol, + custom_error_configurations=custom_error_configurations, + firewall_policy_id=firewall_policy_id, + frontend_ip_configuration_id=frontend_ip_configuration_id, + frontend_port_id=frontend_port_id, + host_name=host_name, + host_names=host_names, + id=id, + require_sni=require_sni, + ssl_certificate_id=ssl_certificate_id, + ssl_certificate_name=ssl_certificate_name, + ssl_profile_id=ssl_profile_id, + ssl_profile_name=ssl_profile_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + frontend_ip_configuration_name: Optional[str] = None, + frontend_port_name: Optional[str] = None, + name: Optional[str] = None, + protocol: Optional[str] = None, + custom_error_configurations: Optional[Sequence['outputs.ApplicationGatewayHttpListenerCustomErrorConfiguration']] = None, + firewall_policy_id: Optional[str] = None, + frontend_ip_configuration_id: Optional[str] = None, + frontend_port_id: Optional[str] = None, + host_name: Optional[str] = None, + host_names: Optional[Sequence[str]] = None, + id: Optional[str] = None, + require_sni: Optional[bool] = None, + ssl_certificate_id: Optional[str] = None, + ssl_certificate_name: Optional[str] = None, + ssl_profile_id: Optional[str] = None, + ssl_profile_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if frontend_ip_configuration_name is None and 'frontendIpConfigurationName' in kwargs: + frontend_ip_configuration_name = kwargs['frontendIpConfigurationName'] + if frontend_ip_configuration_name is None: + raise TypeError("Missing 'frontend_ip_configuration_name' argument") + if frontend_port_name is None and 'frontendPortName' in kwargs: + frontend_port_name = kwargs['frontendPortName'] + if frontend_port_name is None: + raise TypeError("Missing 'frontend_port_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if custom_error_configurations is None and 'customErrorConfigurations' in kwargs: + custom_error_configurations = kwargs['customErrorConfigurations'] + if firewall_policy_id is None and 'firewallPolicyId' in kwargs: + firewall_policy_id = kwargs['firewallPolicyId'] + if frontend_ip_configuration_id is None and 'frontendIpConfigurationId' in kwargs: + frontend_ip_configuration_id = kwargs['frontendIpConfigurationId'] + if frontend_port_id is None and 'frontendPortId' in kwargs: + frontend_port_id = kwargs['frontendPortId'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_names is None and 'hostNames' in kwargs: + host_names = kwargs['hostNames'] + if require_sni is None and 'requireSni' in kwargs: + require_sni = kwargs['requireSni'] + if ssl_certificate_id is None and 'sslCertificateId' in kwargs: + ssl_certificate_id = kwargs['sslCertificateId'] + if ssl_certificate_name is None and 'sslCertificateName' in kwargs: + ssl_certificate_name = kwargs['sslCertificateName'] + if ssl_profile_id is None and 'sslProfileId' in kwargs: + ssl_profile_id = kwargs['sslProfileId'] + if ssl_profile_name is None and 'sslProfileName' in kwargs: + ssl_profile_name = kwargs['sslProfileName'] + + _setter("frontend_ip_configuration_name", frontend_ip_configuration_name) + _setter("frontend_port_name", frontend_port_name) + _setter("name", name) + _setter("protocol", protocol) if custom_error_configurations is not None: - pulumi.set(__self__, "custom_error_configurations", custom_error_configurations) + _setter("custom_error_configurations", custom_error_configurations) if firewall_policy_id is not None: - pulumi.set(__self__, "firewall_policy_id", firewall_policy_id) + _setter("firewall_policy_id", firewall_policy_id) if frontend_ip_configuration_id is not None: - pulumi.set(__self__, "frontend_ip_configuration_id", frontend_ip_configuration_id) + _setter("frontend_ip_configuration_id", frontend_ip_configuration_id) if frontend_port_id is not None: - pulumi.set(__self__, "frontend_port_id", frontend_port_id) + _setter("frontend_port_id", frontend_port_id) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if host_names is not None: - pulumi.set(__self__, "host_names", host_names) + _setter("host_names", host_names) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if require_sni is not None: - pulumi.set(__self__, "require_sni", require_sni) + _setter("require_sni", require_sni) if ssl_certificate_id is not None: - pulumi.set(__self__, "ssl_certificate_id", ssl_certificate_id) + _setter("ssl_certificate_id", ssl_certificate_id) if ssl_certificate_name is not None: - pulumi.set(__self__, "ssl_certificate_name", ssl_certificate_name) + _setter("ssl_certificate_name", ssl_certificate_name) if ssl_profile_id is not None: - pulumi.set(__self__, "ssl_profile_id", ssl_profile_id) + _setter("ssl_profile_id", ssl_profile_id) if ssl_profile_name is not None: - pulumi.set(__self__, "ssl_profile_name", ssl_profile_name) + _setter("ssl_profile_name", ssl_profile_name) @property @pulumi.getter(name="frontendIpConfigurationName") @@ -1309,10 +1667,33 @@ def __init__(__self__, *, :param str status_code: Status code of the application gateway customer error. Possible values are `HttpStatus403` and `HttpStatus502` :param str id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "custom_error_page_url", custom_error_page_url) - pulumi.set(__self__, "status_code", status_code) + ApplicationGatewayHttpListenerCustomErrorConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_error_page_url=custom_error_page_url, + status_code=status_code, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_error_page_url: Optional[str] = None, + status_code: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_error_page_url is None and 'customErrorPageUrl' in kwargs: + custom_error_page_url = kwargs['customErrorPageUrl'] + if custom_error_page_url is None: + raise TypeError("Missing 'custom_error_page_url' argument") + if status_code is None and 'statusCode' in kwargs: + status_code = kwargs['statusCode'] + if status_code is None: + raise TypeError("Missing 'status_code' argument") + + _setter("custom_error_page_url", custom_error_page_url) + _setter("status_code", status_code) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter(name="customErrorPageUrl") @@ -1365,8 +1746,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: Specifies a list of User Assigned Managed Identity IDs to be assigned to this Application Gateway. :param str type: Specifies the type of Managed Service Identity that should be configured on this Application Gateway. Only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + ApplicationGatewayIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -1394,10 +1794,23 @@ def __init__(__self__, *, :param str id: The ID of the Rewrite Rule Set :param str name: The name of the Application Gateway. Changing this forces a new resource to be created. """ + ApplicationGatewayPrivateEndpointConnection._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -1450,10 +1863,31 @@ def __init__(__self__, *, :param str name: The name of the private link configuration. :param str id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) + ApplicationGatewayPrivateLinkConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + name=name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[Sequence['outputs.ApplicationGatewayPrivateLinkConfigurationIpConfiguration']] = None, + name: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("ip_configurations", ip_configurations) + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter(name="ipConfigurations") @@ -1522,12 +1956,45 @@ def __init__(__self__, *, :param str subnet_id: The ID of the subnet the private link configuration should connect to. :param str private_ip_address: The Static IP Address which should be used. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "primary", primary) - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) - pulumi.set(__self__, "subnet_id", subnet_id) + ApplicationGatewayPrivateLinkConfigurationIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + primary=primary, + private_ip_address_allocation=private_ip_address_allocation, + subnet_id=subnet_id, + private_ip_address=private_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + primary: Optional[bool] = None, + private_ip_address_allocation: Optional[str] = None, + subnet_id: Optional[str] = None, + private_ip_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + if private_ip_address_allocation is None: + raise TypeError("Missing 'private_ip_address_allocation' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + + _setter("name", name) + _setter("primary", primary) + _setter("private_ip_address_allocation", private_ip_address_allocation) + _setter("subnet_id", subnet_id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) @property @pulumi.getter @@ -1620,24 +2087,75 @@ def __init__(__self__, *, :param bool pick_host_name_from_backend_http_settings: Whether the host header should be picked from the backend HTTP settings. Defaults to `false`. :param int port: Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from HTTP settings will be used. This property is valid for Standard_v2 and WAF_v2 only. """ - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "timeout", timeout) - pulumi.set(__self__, "unhealthy_threshold", unhealthy_threshold) + ApplicationGatewayProbe._configure( + lambda key, value: pulumi.set(__self__, key, value), + interval=interval, + name=name, + path=path, + protocol=protocol, + timeout=timeout, + unhealthy_threshold=unhealthy_threshold, + host=host, + id=id, + match=match, + minimum_servers=minimum_servers, + pick_host_name_from_backend_http_settings=pick_host_name_from_backend_http_settings, + port=port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + interval: Optional[int] = None, + name: Optional[str] = None, + path: Optional[str] = None, + protocol: Optional[str] = None, + timeout: Optional[int] = None, + unhealthy_threshold: Optional[int] = None, + host: Optional[str] = None, + id: Optional[str] = None, + match: Optional['outputs.ApplicationGatewayProbeMatch'] = None, + minimum_servers: Optional[int] = None, + pick_host_name_from_backend_http_settings: Optional[bool] = None, + port: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if interval is None: + raise TypeError("Missing 'interval' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if timeout is None: + raise TypeError("Missing 'timeout' argument") + if unhealthy_threshold is None and 'unhealthyThreshold' in kwargs: + unhealthy_threshold = kwargs['unhealthyThreshold'] + if unhealthy_threshold is None: + raise TypeError("Missing 'unhealthy_threshold' argument") + if minimum_servers is None and 'minimumServers' in kwargs: + minimum_servers = kwargs['minimumServers'] + if pick_host_name_from_backend_http_settings is None and 'pickHostNameFromBackendHttpSettings' in kwargs: + pick_host_name_from_backend_http_settings = kwargs['pickHostNameFromBackendHttpSettings'] + + _setter("interval", interval) + _setter("name", name) + _setter("path", path) + _setter("protocol", protocol) + _setter("timeout", timeout) + _setter("unhealthy_threshold", unhealthy_threshold) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if match is not None: - pulumi.set(__self__, "match", match) + _setter("match", match) if minimum_servers is not None: - pulumi.set(__self__, "minimum_servers", minimum_servers) + _setter("minimum_servers", minimum_servers) if pick_host_name_from_backend_http_settings is not None: - pulumi.set(__self__, "pick_host_name_from_backend_http_settings", pick_host_name_from_backend_http_settings) + _setter("pick_host_name_from_backend_http_settings", pick_host_name_from_backend_http_settings) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) @property @pulumi.getter @@ -1762,9 +2280,26 @@ def __init__(__self__, *, :param Sequence[str] status_codes: A list of allowed status codes for this Health Probe. :param str body: A snippet from the Response Body which must be present in the Response. """ - pulumi.set(__self__, "status_codes", status_codes) + ApplicationGatewayProbeMatch._configure( + lambda key, value: pulumi.set(__self__, key, value), + status_codes=status_codes, + body=body, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + status_codes: Optional[Sequence[str]] = None, + body: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if status_codes is None and 'statusCodes' in kwargs: + status_codes = kwargs['statusCodes'] + if status_codes is None: + raise TypeError("Missing 'status_codes' argument") + + _setter("status_codes", status_codes) if body is not None: - pulumi.set(__self__, "body", body) + _setter("body", body) @property @pulumi.getter(name="statusCodes") @@ -1830,20 +2365,61 @@ def __init__(__self__, *, :param str target_listener_name: The name of the listener to redirect to. Cannot be set if `target_url` is set. :param str target_url: The URL to redirect the request to. Cannot be set if `target_listener_name` is set. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "redirect_type", redirect_type) + ApplicationGatewayRedirectConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + redirect_type=redirect_type, + id=id, + include_path=include_path, + include_query_string=include_query_string, + target_listener_id=target_listener_id, + target_listener_name=target_listener_name, + target_url=target_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + redirect_type: Optional[str] = None, + id: Optional[str] = None, + include_path: Optional[bool] = None, + include_query_string: Optional[bool] = None, + target_listener_id: Optional[str] = None, + target_listener_name: Optional[str] = None, + target_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if redirect_type is None and 'redirectType' in kwargs: + redirect_type = kwargs['redirectType'] + if redirect_type is None: + raise TypeError("Missing 'redirect_type' argument") + if include_path is None and 'includePath' in kwargs: + include_path = kwargs['includePath'] + if include_query_string is None and 'includeQueryString' in kwargs: + include_query_string = kwargs['includeQueryString'] + if target_listener_id is None and 'targetListenerId' in kwargs: + target_listener_id = kwargs['targetListenerId'] + if target_listener_name is None and 'targetListenerName' in kwargs: + target_listener_name = kwargs['targetListenerName'] + if target_url is None and 'targetUrl' in kwargs: + target_url = kwargs['targetUrl'] + + _setter("name", name) + _setter("redirect_type", redirect_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if include_path is not None: - pulumi.set(__self__, "include_path", include_path) + _setter("include_path", include_path) if include_query_string is not None: - pulumi.set(__self__, "include_query_string", include_query_string) + _setter("include_query_string", include_query_string) if target_listener_id is not None: - pulumi.set(__self__, "target_listener_id", target_listener_id) + _setter("target_listener_id", target_listener_id) if target_listener_name is not None: - pulumi.set(__self__, "target_listener_name", target_listener_name) + _setter("target_listener_name", target_listener_name) if target_url is not None: - pulumi.set(__self__, "target_url", target_url) + _setter("target_url", target_url) @property @pulumi.getter @@ -1989,35 +2565,108 @@ def __init__(__self__, *, :param str url_path_map_id: The ID of the associated URL Path Map. :param str url_path_map_name: The Name of the URL Path Map which should be associated with this Routing Rule. """ - pulumi.set(__self__, "http_listener_name", http_listener_name) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "rule_type", rule_type) + ApplicationGatewayRequestRoutingRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + http_listener_name=http_listener_name, + name=name, + rule_type=rule_type, + backend_address_pool_id=backend_address_pool_id, + backend_address_pool_name=backend_address_pool_name, + backend_http_settings_id=backend_http_settings_id, + backend_http_settings_name=backend_http_settings_name, + http_listener_id=http_listener_id, + id=id, + priority=priority, + redirect_configuration_id=redirect_configuration_id, + redirect_configuration_name=redirect_configuration_name, + rewrite_rule_set_id=rewrite_rule_set_id, + rewrite_rule_set_name=rewrite_rule_set_name, + url_path_map_id=url_path_map_id, + url_path_map_name=url_path_map_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + http_listener_name: Optional[str] = None, + name: Optional[str] = None, + rule_type: Optional[str] = None, + backend_address_pool_id: Optional[str] = None, + backend_address_pool_name: Optional[str] = None, + backend_http_settings_id: Optional[str] = None, + backend_http_settings_name: Optional[str] = None, + http_listener_id: Optional[str] = None, + id: Optional[str] = None, + priority: Optional[int] = None, + redirect_configuration_id: Optional[str] = None, + redirect_configuration_name: Optional[str] = None, + rewrite_rule_set_id: Optional[str] = None, + rewrite_rule_set_name: Optional[str] = None, + url_path_map_id: Optional[str] = None, + url_path_map_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if http_listener_name is None and 'httpListenerName' in kwargs: + http_listener_name = kwargs['httpListenerName'] + if http_listener_name is None: + raise TypeError("Missing 'http_listener_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if rule_type is None and 'ruleType' in kwargs: + rule_type = kwargs['ruleType'] + if rule_type is None: + raise TypeError("Missing 'rule_type' argument") + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if backend_address_pool_name is None and 'backendAddressPoolName' in kwargs: + backend_address_pool_name = kwargs['backendAddressPoolName'] + if backend_http_settings_id is None and 'backendHttpSettingsId' in kwargs: + backend_http_settings_id = kwargs['backendHttpSettingsId'] + if backend_http_settings_name is None and 'backendHttpSettingsName' in kwargs: + backend_http_settings_name = kwargs['backendHttpSettingsName'] + if http_listener_id is None and 'httpListenerId' in kwargs: + http_listener_id = kwargs['httpListenerId'] + if redirect_configuration_id is None and 'redirectConfigurationId' in kwargs: + redirect_configuration_id = kwargs['redirectConfigurationId'] + if redirect_configuration_name is None and 'redirectConfigurationName' in kwargs: + redirect_configuration_name = kwargs['redirectConfigurationName'] + if rewrite_rule_set_id is None and 'rewriteRuleSetId' in kwargs: + rewrite_rule_set_id = kwargs['rewriteRuleSetId'] + if rewrite_rule_set_name is None and 'rewriteRuleSetName' in kwargs: + rewrite_rule_set_name = kwargs['rewriteRuleSetName'] + if url_path_map_id is None and 'urlPathMapId' in kwargs: + url_path_map_id = kwargs['urlPathMapId'] + if url_path_map_name is None and 'urlPathMapName' in kwargs: + url_path_map_name = kwargs['urlPathMapName'] + + _setter("http_listener_name", http_listener_name) + _setter("name", name) + _setter("rule_type", rule_type) if backend_address_pool_id is not None: - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) + _setter("backend_address_pool_id", backend_address_pool_id) if backend_address_pool_name is not None: - pulumi.set(__self__, "backend_address_pool_name", backend_address_pool_name) + _setter("backend_address_pool_name", backend_address_pool_name) if backend_http_settings_id is not None: - pulumi.set(__self__, "backend_http_settings_id", backend_http_settings_id) + _setter("backend_http_settings_id", backend_http_settings_id) if backend_http_settings_name is not None: - pulumi.set(__self__, "backend_http_settings_name", backend_http_settings_name) + _setter("backend_http_settings_name", backend_http_settings_name) if http_listener_id is not None: - pulumi.set(__self__, "http_listener_id", http_listener_id) + _setter("http_listener_id", http_listener_id) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if redirect_configuration_id is not None: - pulumi.set(__self__, "redirect_configuration_id", redirect_configuration_id) + _setter("redirect_configuration_id", redirect_configuration_id) if redirect_configuration_name is not None: - pulumi.set(__self__, "redirect_configuration_name", redirect_configuration_name) + _setter("redirect_configuration_name", redirect_configuration_name) if rewrite_rule_set_id is not None: - pulumi.set(__self__, "rewrite_rule_set_id", rewrite_rule_set_id) + _setter("rewrite_rule_set_id", rewrite_rule_set_id) if rewrite_rule_set_name is not None: - pulumi.set(__self__, "rewrite_rule_set_name", rewrite_rule_set_name) + _setter("rewrite_rule_set_name", rewrite_rule_set_name) if url_path_map_id is not None: - pulumi.set(__self__, "url_path_map_id", url_path_map_id) + _setter("url_path_map_id", url_path_map_id) if url_path_map_name is not None: - pulumi.set(__self__, "url_path_map_name", url_path_map_name) + _setter("url_path_map_name", url_path_map_name) @property @pulumi.getter(name="httpListenerName") @@ -2180,11 +2829,30 @@ def __init__(__self__, *, :param str id: The ID of the Rewrite Rule Set :param Sequence['ApplicationGatewayRewriteRuleSetRewriteRuleArgs'] rewrite_rules: One or more `rewrite_rule` blocks as defined below. """ - pulumi.set(__self__, "name", name) + ApplicationGatewayRewriteRuleSet._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + id=id, + rewrite_rules=rewrite_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + id: Optional[str] = None, + rewrite_rules: Optional[Sequence['outputs.ApplicationGatewayRewriteRuleSetRewriteRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if rewrite_rules is None and 'rewriteRules' in kwargs: + rewrite_rules = kwargs['rewriteRules'] + + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if rewrite_rules is not None: - pulumi.set(__self__, "rewrite_rules", rewrite_rules) + _setter("rewrite_rules", rewrite_rules) @property @pulumi.getter @@ -2249,16 +2917,47 @@ def __init__(__self__, *, :param Sequence['ApplicationGatewayRewriteRuleSetRewriteRuleResponseHeaderConfigurationArgs'] response_header_configurations: One or more `response_header_configuration` blocks as defined above. :param 'ApplicationGatewayRewriteRuleSetRewriteRuleUrlArgs' url: One `url` block as defined below """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "rule_sequence", rule_sequence) + ApplicationGatewayRewriteRuleSetRewriteRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + rule_sequence=rule_sequence, + conditions=conditions, + request_header_configurations=request_header_configurations, + response_header_configurations=response_header_configurations, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + rule_sequence: Optional[int] = None, + conditions: Optional[Sequence['outputs.ApplicationGatewayRewriteRuleSetRewriteRuleCondition']] = None, + request_header_configurations: Optional[Sequence['outputs.ApplicationGatewayRewriteRuleSetRewriteRuleRequestHeaderConfiguration']] = None, + response_header_configurations: Optional[Sequence['outputs.ApplicationGatewayRewriteRuleSetRewriteRuleResponseHeaderConfiguration']] = None, + url: Optional['outputs.ApplicationGatewayRewriteRuleSetRewriteRuleUrl'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if rule_sequence is None and 'ruleSequence' in kwargs: + rule_sequence = kwargs['ruleSequence'] + if rule_sequence is None: + raise TypeError("Missing 'rule_sequence' argument") + if request_header_configurations is None and 'requestHeaderConfigurations' in kwargs: + request_header_configurations = kwargs['requestHeaderConfigurations'] + if response_header_configurations is None and 'responseHeaderConfigurations' in kwargs: + response_header_configurations = kwargs['responseHeaderConfigurations'] + + _setter("name", name) + _setter("rule_sequence", rule_sequence) if conditions is not None: - pulumi.set(__self__, "conditions", conditions) + _setter("conditions", conditions) if request_header_configurations is not None: - pulumi.set(__self__, "request_header_configurations", request_header_configurations) + _setter("request_header_configurations", request_header_configurations) if response_header_configurations is not None: - pulumi.set(__self__, "response_header_configurations", response_header_configurations) + _setter("response_header_configurations", response_header_configurations) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter @@ -2339,12 +3038,35 @@ def __init__(__self__, *, :param bool ignore_case: Perform a case in-sensitive comparison. Defaults to `false` :param bool negate: Negate the result of the condition evaluation. Defaults to `false` """ - pulumi.set(__self__, "pattern", pattern) - pulumi.set(__self__, "variable", variable) + ApplicationGatewayRewriteRuleSetRewriteRuleCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + pattern=pattern, + variable=variable, + ignore_case=ignore_case, + negate=negate, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + pattern: Optional[str] = None, + variable: Optional[str] = None, + ignore_case: Optional[bool] = None, + negate: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if pattern is None: + raise TypeError("Missing 'pattern' argument") + if variable is None: + raise TypeError("Missing 'variable' argument") + if ignore_case is None and 'ignoreCase' in kwargs: + ignore_case = kwargs['ignoreCase'] + + _setter("pattern", pattern) + _setter("variable", variable) if ignore_case is not None: - pulumi.set(__self__, "ignore_case", ignore_case) + _setter("ignore_case", ignore_case) if negate is not None: - pulumi.set(__self__, "negate", negate) + _setter("negate", negate) @property @pulumi.getter @@ -2407,8 +3129,29 @@ def __init__(__self__, *, :param str header_name: Header name of the header configuration. :param str header_value: Header value of the header configuration. To delete a request header set this property to an empty string. """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "header_value", header_value) + ApplicationGatewayRewriteRuleSetRewriteRuleRequestHeaderConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + header_value=header_value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[str] = None, + header_value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if header_value is None and 'headerValue' in kwargs: + header_value = kwargs['headerValue'] + if header_value is None: + raise TypeError("Missing 'header_value' argument") + + _setter("header_name", header_name) + _setter("header_value", header_value) @property @pulumi.getter(name="headerName") @@ -2455,8 +3198,29 @@ def __init__(__self__, *, :param str header_name: Header name of the header configuration. :param str header_value: Header value of the header configuration. To delete a response header set this property to an empty string. """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "header_value", header_value) + ApplicationGatewayRewriteRuleSetRewriteRuleResponseHeaderConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + header_value=header_value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[str] = None, + header_value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if header_value is None and 'headerValue' in kwargs: + header_value = kwargs['headerValue'] + if header_value is None: + raise TypeError("Missing 'header_value' argument") + + _setter("header_name", header_name) + _setter("header_value", header_value) @property @pulumi.getter(name="headerName") @@ -2507,14 +3271,33 @@ def __init__(__self__, *, :param str query_string: The query string to rewrite. :param bool reroute: Whether the URL path map should be reevaluated after this rewrite has been applied. [More info on rewrite configuration](https://docs.microsoft.com/azure/application-gateway/rewrite-http-headers-url#rewrite-configuration) """ + ApplicationGatewayRewriteRuleSetRewriteRuleUrl._configure( + lambda key, value: pulumi.set(__self__, key, value), + components=components, + path=path, + query_string=query_string, + reroute=reroute, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + components: Optional[str] = None, + path: Optional[str] = None, + query_string: Optional[str] = None, + reroute: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if query_string is None and 'queryString' in kwargs: + query_string = kwargs['queryString'] + if components is not None: - pulumi.set(__self__, "components", components) + _setter("components", components) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if query_string is not None: - pulumi.set(__self__, "query_string", query_string) + _setter("query_string", query_string) if reroute is not None: - pulumi.set(__self__, "reroute", reroute) + _setter("reroute", reroute) @property @pulumi.getter @@ -2564,10 +3347,29 @@ def __init__(__self__, *, !> **NOTE:** The `Standard` and `WAF` SKU have been deprecated in favour of the `Standard_v2` and `WAF_v2` SKU. Please see the [Azure documentation](https://aka.ms/V1retirement) for more details. :param int capacity: The Capacity of the SKU to use for this Application Gateway. When using a V1 SKU this value must be between `1` and `32`, and `1` to `125` for a V2 SKU. This property is optional if `autoscale_configuration` is set. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "tier", tier) + ApplicationGatewaySku._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + tier=tier, + capacity=capacity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + tier: Optional[str] = None, + capacity: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("name", name) + _setter("tier", tier) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) @property @pulumi.getter @@ -2638,17 +3440,44 @@ def __init__(__self__, *, :param str password: Password for the pfx file specified in data. Required if `data` is set. :param str public_cert_data: The Public Certificate Data associated with the SSL Certificate. """ - pulumi.set(__self__, "name", name) + ApplicationGatewaySslCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + data=data, + id=id, + key_vault_secret_id=key_vault_secret_id, + password=password, + public_cert_data=public_cert_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + data: Optional[str] = None, + id: Optional[str] = None, + key_vault_secret_id: Optional[str] = None, + password: Optional[str] = None, + public_cert_data: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + if public_cert_data is None and 'publicCertData' in kwargs: + public_cert_data = kwargs['publicCertData'] + + _setter("name", name) if data is not None: - pulumi.set(__self__, "data", data) + _setter("data", data) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if key_vault_secret_id is not None: - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) + _setter("key_vault_secret_id", key_vault_secret_id) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if public_cert_data is not None: - pulumi.set(__self__, "public_cert_data", public_cert_data) + _setter("public_cert_data", public_cert_data) @property @pulumi.getter @@ -2749,16 +3578,45 @@ def __init__(__self__, *, > **NOTE:** `policy_type` is Required when `policy_name` is set - cannot be set if `disabled_protocols` is set. """ + ApplicationGatewaySslPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + cipher_suites=cipher_suites, + disabled_protocols=disabled_protocols, + min_protocol_version=min_protocol_version, + policy_name=policy_name, + policy_type=policy_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cipher_suites: Optional[Sequence[str]] = None, + disabled_protocols: Optional[Sequence[str]] = None, + min_protocol_version: Optional[str] = None, + policy_name: Optional[str] = None, + policy_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cipher_suites is None and 'cipherSuites' in kwargs: + cipher_suites = kwargs['cipherSuites'] + if disabled_protocols is None and 'disabledProtocols' in kwargs: + disabled_protocols = kwargs['disabledProtocols'] + if min_protocol_version is None and 'minProtocolVersion' in kwargs: + min_protocol_version = kwargs['minProtocolVersion'] + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if cipher_suites is not None: - pulumi.set(__self__, "cipher_suites", cipher_suites) + _setter("cipher_suites", cipher_suites) if disabled_protocols is not None: - pulumi.set(__self__, "disabled_protocols", disabled_protocols) + _setter("disabled_protocols", disabled_protocols) if min_protocol_version is not None: - pulumi.set(__self__, "min_protocol_version", min_protocol_version) + _setter("min_protocol_version", min_protocol_version) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) if policy_type is not None: - pulumi.set(__self__, "policy_type", policy_type) + _setter("policy_type", policy_type) @property @pulumi.getter(name="cipherSuites") @@ -2845,17 +3703,48 @@ def __init__(__self__, *, :param bool verify_client_cert_issuer_dn: Should client certificate issuer DN be verified? Defaults to `false`. :param str verify_client_certificate_revocation: Specify the method to check client certificate revocation status. Possible value is `OCSP`. """ - pulumi.set(__self__, "name", name) + ApplicationGatewaySslProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + id=id, + ssl_policy=ssl_policy, + trusted_client_certificate_names=trusted_client_certificate_names, + verify_client_cert_issuer_dn=verify_client_cert_issuer_dn, + verify_client_certificate_revocation=verify_client_certificate_revocation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + id: Optional[str] = None, + ssl_policy: Optional['outputs.ApplicationGatewaySslProfileSslPolicy'] = None, + trusted_client_certificate_names: Optional[Sequence[str]] = None, + verify_client_cert_issuer_dn: Optional[bool] = None, + verify_client_certificate_revocation: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if ssl_policy is None and 'sslPolicy' in kwargs: + ssl_policy = kwargs['sslPolicy'] + if trusted_client_certificate_names is None and 'trustedClientCertificateNames' in kwargs: + trusted_client_certificate_names = kwargs['trustedClientCertificateNames'] + if verify_client_cert_issuer_dn is None and 'verifyClientCertIssuerDn' in kwargs: + verify_client_cert_issuer_dn = kwargs['verifyClientCertIssuerDn'] + if verify_client_certificate_revocation is None and 'verifyClientCertificateRevocation' in kwargs: + verify_client_certificate_revocation = kwargs['verifyClientCertificateRevocation'] + + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if ssl_policy is not None: - pulumi.set(__self__, "ssl_policy", ssl_policy) + _setter("ssl_policy", ssl_policy) if trusted_client_certificate_names is not None: - pulumi.set(__self__, "trusted_client_certificate_names", trusted_client_certificate_names) + _setter("trusted_client_certificate_names", trusted_client_certificate_names) if verify_client_cert_issuer_dn is not None: - pulumi.set(__self__, "verify_client_cert_issuer_dn", verify_client_cert_issuer_dn) + _setter("verify_client_cert_issuer_dn", verify_client_cert_issuer_dn) if verify_client_certificate_revocation is not None: - pulumi.set(__self__, "verify_client_certificate_revocation", verify_client_certificate_revocation) + _setter("verify_client_certificate_revocation", verify_client_certificate_revocation) @property @pulumi.getter @@ -2950,16 +3839,45 @@ def __init__(__self__, *, > **NOTE:** `policy_type` is Required when `policy_name` is set - cannot be set if `disabled_protocols` is set. """ + ApplicationGatewaySslProfileSslPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + cipher_suites=cipher_suites, + disabled_protocols=disabled_protocols, + min_protocol_version=min_protocol_version, + policy_name=policy_name, + policy_type=policy_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cipher_suites: Optional[Sequence[str]] = None, + disabled_protocols: Optional[Sequence[str]] = None, + min_protocol_version: Optional[str] = None, + policy_name: Optional[str] = None, + policy_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cipher_suites is None and 'cipherSuites' in kwargs: + cipher_suites = kwargs['cipherSuites'] + if disabled_protocols is None and 'disabledProtocols' in kwargs: + disabled_protocols = kwargs['disabledProtocols'] + if min_protocol_version is None and 'minProtocolVersion' in kwargs: + min_protocol_version = kwargs['minProtocolVersion'] + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if cipher_suites is not None: - pulumi.set(__self__, "cipher_suites", cipher_suites) + _setter("cipher_suites", cipher_suites) if disabled_protocols is not None: - pulumi.set(__self__, "disabled_protocols", disabled_protocols) + _setter("disabled_protocols", disabled_protocols) if min_protocol_version is not None: - pulumi.set(__self__, "min_protocol_version", min_protocol_version) + _setter("min_protocol_version", min_protocol_version) if policy_name is not None: - pulumi.set(__self__, "policy_name", policy_name) + _setter("policy_name", policy_name) if policy_type is not None: - pulumi.set(__self__, "policy_type", policy_type) + _setter("policy_type", policy_type) @property @pulumi.getter(name="cipherSuites") @@ -3017,10 +3935,29 @@ def __init__(__self__, *, :param str name: The name of the Trusted Client Certificate that is unique within this Application Gateway. :param str id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "data", data) - pulumi.set(__self__, "name", name) + ApplicationGatewayTrustedClientCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + data=data, + name=name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + data: Optional[str] = None, + name: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data is None: + raise TypeError("Missing 'data' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("data", data) + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -3081,13 +4018,34 @@ def __init__(__self__, *, > **NOTE:** For TLS termination with Key Vault certificates to work properly existing user-assigned managed identity, which Application Gateway uses to retrieve certificates from Key Vault, should be defined via `identity` block. Additionally, access policies in the Key Vault to allow the identity to be granted *get* access to the secret should be defined. """ - pulumi.set(__self__, "name", name) + ApplicationGatewayTrustedRootCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + data=data, + id=id, + key_vault_secret_id=key_vault_secret_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + data: Optional[str] = None, + id: Optional[str] = None, + key_vault_secret_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + + _setter("name", name) if data is not None: - pulumi.set(__self__, "data", data) + _setter("data", data) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if key_vault_secret_id is not None: - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) + _setter("key_vault_secret_id", key_vault_secret_id) @property @pulumi.getter @@ -3187,26 +4145,79 @@ def __init__(__self__, *, :param str default_rewrite_rule_set_name: The Name of the Default Rewrite Rule Set which should be used for this URL Path Map. Only valid for v2 SKUs. :param str id: The ID of the Rewrite Rule Set """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "path_rules", path_rules) + ApplicationGatewayUrlPathMap._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + path_rules=path_rules, + default_backend_address_pool_id=default_backend_address_pool_id, + default_backend_address_pool_name=default_backend_address_pool_name, + default_backend_http_settings_id=default_backend_http_settings_id, + default_backend_http_settings_name=default_backend_http_settings_name, + default_redirect_configuration_id=default_redirect_configuration_id, + default_redirect_configuration_name=default_redirect_configuration_name, + default_rewrite_rule_set_id=default_rewrite_rule_set_id, + default_rewrite_rule_set_name=default_rewrite_rule_set_name, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + path_rules: Optional[Sequence['outputs.ApplicationGatewayUrlPathMapPathRule']] = None, + default_backend_address_pool_id: Optional[str] = None, + default_backend_address_pool_name: Optional[str] = None, + default_backend_http_settings_id: Optional[str] = None, + default_backend_http_settings_name: Optional[str] = None, + default_redirect_configuration_id: Optional[str] = None, + default_redirect_configuration_name: Optional[str] = None, + default_rewrite_rule_set_id: Optional[str] = None, + default_rewrite_rule_set_name: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if path_rules is None and 'pathRules' in kwargs: + path_rules = kwargs['pathRules'] + if path_rules is None: + raise TypeError("Missing 'path_rules' argument") + if default_backend_address_pool_id is None and 'defaultBackendAddressPoolId' in kwargs: + default_backend_address_pool_id = kwargs['defaultBackendAddressPoolId'] + if default_backend_address_pool_name is None and 'defaultBackendAddressPoolName' in kwargs: + default_backend_address_pool_name = kwargs['defaultBackendAddressPoolName'] + if default_backend_http_settings_id is None and 'defaultBackendHttpSettingsId' in kwargs: + default_backend_http_settings_id = kwargs['defaultBackendHttpSettingsId'] + if default_backend_http_settings_name is None and 'defaultBackendHttpSettingsName' in kwargs: + default_backend_http_settings_name = kwargs['defaultBackendHttpSettingsName'] + if default_redirect_configuration_id is None and 'defaultRedirectConfigurationId' in kwargs: + default_redirect_configuration_id = kwargs['defaultRedirectConfigurationId'] + if default_redirect_configuration_name is None and 'defaultRedirectConfigurationName' in kwargs: + default_redirect_configuration_name = kwargs['defaultRedirectConfigurationName'] + if default_rewrite_rule_set_id is None and 'defaultRewriteRuleSetId' in kwargs: + default_rewrite_rule_set_id = kwargs['defaultRewriteRuleSetId'] + if default_rewrite_rule_set_name is None and 'defaultRewriteRuleSetName' in kwargs: + default_rewrite_rule_set_name = kwargs['defaultRewriteRuleSetName'] + + _setter("name", name) + _setter("path_rules", path_rules) if default_backend_address_pool_id is not None: - pulumi.set(__self__, "default_backend_address_pool_id", default_backend_address_pool_id) + _setter("default_backend_address_pool_id", default_backend_address_pool_id) if default_backend_address_pool_name is not None: - pulumi.set(__self__, "default_backend_address_pool_name", default_backend_address_pool_name) + _setter("default_backend_address_pool_name", default_backend_address_pool_name) if default_backend_http_settings_id is not None: - pulumi.set(__self__, "default_backend_http_settings_id", default_backend_http_settings_id) + _setter("default_backend_http_settings_id", default_backend_http_settings_id) if default_backend_http_settings_name is not None: - pulumi.set(__self__, "default_backend_http_settings_name", default_backend_http_settings_name) + _setter("default_backend_http_settings_name", default_backend_http_settings_name) if default_redirect_configuration_id is not None: - pulumi.set(__self__, "default_redirect_configuration_id", default_redirect_configuration_id) + _setter("default_redirect_configuration_id", default_redirect_configuration_id) if default_redirect_configuration_name is not None: - pulumi.set(__self__, "default_redirect_configuration_name", default_redirect_configuration_name) + _setter("default_redirect_configuration_name", default_redirect_configuration_name) if default_rewrite_rule_set_id is not None: - pulumi.set(__self__, "default_rewrite_rule_set_id", default_rewrite_rule_set_id) + _setter("default_rewrite_rule_set_id", default_rewrite_rule_set_id) if default_rewrite_rule_set_name is not None: - pulumi.set(__self__, "default_rewrite_rule_set_name", default_rewrite_rule_set_name) + _setter("default_rewrite_rule_set_name", default_rewrite_rule_set_name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -3358,28 +4369,83 @@ def __init__(__self__, *, :param str rewrite_rule_set_id: The ID of the associated Rewrite Rule Set. :param str rewrite_rule_set_name: The Name of the Rewrite Rule Set which should be used for this URL Path Map. Only valid for v2 SKUs. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "paths", paths) + ApplicationGatewayUrlPathMapPathRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + paths=paths, + backend_address_pool_id=backend_address_pool_id, + backend_address_pool_name=backend_address_pool_name, + backend_http_settings_id=backend_http_settings_id, + backend_http_settings_name=backend_http_settings_name, + firewall_policy_id=firewall_policy_id, + id=id, + redirect_configuration_id=redirect_configuration_id, + redirect_configuration_name=redirect_configuration_name, + rewrite_rule_set_id=rewrite_rule_set_id, + rewrite_rule_set_name=rewrite_rule_set_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + paths: Optional[Sequence[str]] = None, + backend_address_pool_id: Optional[str] = None, + backend_address_pool_name: Optional[str] = None, + backend_http_settings_id: Optional[str] = None, + backend_http_settings_name: Optional[str] = None, + firewall_policy_id: Optional[str] = None, + id: Optional[str] = None, + redirect_configuration_id: Optional[str] = None, + redirect_configuration_name: Optional[str] = None, + rewrite_rule_set_id: Optional[str] = None, + rewrite_rule_set_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if paths is None: + raise TypeError("Missing 'paths' argument") + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if backend_address_pool_name is None and 'backendAddressPoolName' in kwargs: + backend_address_pool_name = kwargs['backendAddressPoolName'] + if backend_http_settings_id is None and 'backendHttpSettingsId' in kwargs: + backend_http_settings_id = kwargs['backendHttpSettingsId'] + if backend_http_settings_name is None and 'backendHttpSettingsName' in kwargs: + backend_http_settings_name = kwargs['backendHttpSettingsName'] + if firewall_policy_id is None and 'firewallPolicyId' in kwargs: + firewall_policy_id = kwargs['firewallPolicyId'] + if redirect_configuration_id is None and 'redirectConfigurationId' in kwargs: + redirect_configuration_id = kwargs['redirectConfigurationId'] + if redirect_configuration_name is None and 'redirectConfigurationName' in kwargs: + redirect_configuration_name = kwargs['redirectConfigurationName'] + if rewrite_rule_set_id is None and 'rewriteRuleSetId' in kwargs: + rewrite_rule_set_id = kwargs['rewriteRuleSetId'] + if rewrite_rule_set_name is None and 'rewriteRuleSetName' in kwargs: + rewrite_rule_set_name = kwargs['rewriteRuleSetName'] + + _setter("name", name) + _setter("paths", paths) if backend_address_pool_id is not None: - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) + _setter("backend_address_pool_id", backend_address_pool_id) if backend_address_pool_name is not None: - pulumi.set(__self__, "backend_address_pool_name", backend_address_pool_name) + _setter("backend_address_pool_name", backend_address_pool_name) if backend_http_settings_id is not None: - pulumi.set(__self__, "backend_http_settings_id", backend_http_settings_id) + _setter("backend_http_settings_id", backend_http_settings_id) if backend_http_settings_name is not None: - pulumi.set(__self__, "backend_http_settings_name", backend_http_settings_name) + _setter("backend_http_settings_name", backend_http_settings_name) if firewall_policy_id is not None: - pulumi.set(__self__, "firewall_policy_id", firewall_policy_id) + _setter("firewall_policy_id", firewall_policy_id) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if redirect_configuration_id is not None: - pulumi.set(__self__, "redirect_configuration_id", redirect_configuration_id) + _setter("redirect_configuration_id", redirect_configuration_id) if redirect_configuration_name is not None: - pulumi.set(__self__, "redirect_configuration_name", redirect_configuration_name) + _setter("redirect_configuration_name", redirect_configuration_name) if rewrite_rule_set_id is not None: - pulumi.set(__self__, "rewrite_rule_set_id", rewrite_rule_set_id) + _setter("rewrite_rule_set_id", rewrite_rule_set_id) if rewrite_rule_set_name is not None: - pulumi.set(__self__, "rewrite_rule_set_name", rewrite_rule_set_name) + _setter("rewrite_rule_set_name", rewrite_rule_set_name) @property @pulumi.getter @@ -3530,21 +4596,68 @@ def __init__(__self__, *, :param bool request_body_check: Is Request Body Inspection enabled? Defaults to `true`. :param str rule_set_type: The Type of the Rule Set used for this Web Application Firewall. Possible values are `OWASP` and `Microsoft_BotManagerRuleSet`. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "firewall_mode", firewall_mode) - pulumi.set(__self__, "rule_set_version", rule_set_version) + ApplicationGatewayWafConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + firewall_mode=firewall_mode, + rule_set_version=rule_set_version, + disabled_rule_groups=disabled_rule_groups, + exclusions=exclusions, + file_upload_limit_mb=file_upload_limit_mb, + max_request_body_size_kb=max_request_body_size_kb, + request_body_check=request_body_check, + rule_set_type=rule_set_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + firewall_mode: Optional[str] = None, + rule_set_version: Optional[str] = None, + disabled_rule_groups: Optional[Sequence['outputs.ApplicationGatewayWafConfigurationDisabledRuleGroup']] = None, + exclusions: Optional[Sequence['outputs.ApplicationGatewayWafConfigurationExclusion']] = None, + file_upload_limit_mb: Optional[int] = None, + max_request_body_size_kb: Optional[int] = None, + request_body_check: Optional[bool] = None, + rule_set_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if firewall_mode is None and 'firewallMode' in kwargs: + firewall_mode = kwargs['firewallMode'] + if firewall_mode is None: + raise TypeError("Missing 'firewall_mode' argument") + if rule_set_version is None and 'ruleSetVersion' in kwargs: + rule_set_version = kwargs['ruleSetVersion'] + if rule_set_version is None: + raise TypeError("Missing 'rule_set_version' argument") + if disabled_rule_groups is None and 'disabledRuleGroups' in kwargs: + disabled_rule_groups = kwargs['disabledRuleGroups'] + if file_upload_limit_mb is None and 'fileUploadLimitMb' in kwargs: + file_upload_limit_mb = kwargs['fileUploadLimitMb'] + if max_request_body_size_kb is None and 'maxRequestBodySizeKb' in kwargs: + max_request_body_size_kb = kwargs['maxRequestBodySizeKb'] + if request_body_check is None and 'requestBodyCheck' in kwargs: + request_body_check = kwargs['requestBodyCheck'] + if rule_set_type is None and 'ruleSetType' in kwargs: + rule_set_type = kwargs['ruleSetType'] + + _setter("enabled", enabled) + _setter("firewall_mode", firewall_mode) + _setter("rule_set_version", rule_set_version) if disabled_rule_groups is not None: - pulumi.set(__self__, "disabled_rule_groups", disabled_rule_groups) + _setter("disabled_rule_groups", disabled_rule_groups) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) if file_upload_limit_mb is not None: - pulumi.set(__self__, "file_upload_limit_mb", file_upload_limit_mb) + _setter("file_upload_limit_mb", file_upload_limit_mb) if max_request_body_size_kb is not None: - pulumi.set(__self__, "max_request_body_size_kb", max_request_body_size_kb) + _setter("max_request_body_size_kb", max_request_body_size_kb) if request_body_check is not None: - pulumi.set(__self__, "request_body_check", request_body_check) + _setter("request_body_check", request_body_check) if rule_set_type is not None: - pulumi.set(__self__, "rule_set_type", rule_set_type) + _setter("rule_set_type", rule_set_type) @property @pulumi.getter @@ -3645,9 +4758,26 @@ def __init__(__self__, *, :param str rule_group_name: The rule group where specific rules should be disabled. Possible values are `BadBots`, `crs_20_protocol_violations`, `crs_21_protocol_anomalies`, `crs_23_request_limits`, `crs_30_http_policy`, `crs_35_bad_robots`, `crs_40_generic_attacks`, `crs_41_sql_injection_attacks`, `crs_41_xss_attacks`, `crs_42_tight_security`, `crs_45_trojans`, `General`, `GoodBots`, `Known-CVEs`, `REQUEST-911-METHOD-ENFORCEMENT`, `REQUEST-913-SCANNER-DETECTION`, `REQUEST-920-PROTOCOL-ENFORCEMENT`, `REQUEST-921-PROTOCOL-ATTACK`, `REQUEST-930-APPLICATION-ATTACK-LFI`, `REQUEST-931-APPLICATION-ATTACK-RFI`, `REQUEST-932-APPLICATION-ATTACK-RCE`, `REQUEST-933-APPLICATION-ATTACK-PHP`, `REQUEST-941-APPLICATION-ATTACK-XSS`, `REQUEST-942-APPLICATION-ATTACK-SQLI`, `REQUEST-943-APPLICATION-ATTACK-SESSION-FIXATION`, `REQUEST-944-APPLICATION-ATTACK-JAVA` and `UnknownBots`. :param Sequence[int] rules: A list of rules which should be disabled in that group. Disables all rules in the specified group if `rules` is not specified. """ - pulumi.set(__self__, "rule_group_name", rule_group_name) + ApplicationGatewayWafConfigurationDisabledRuleGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_group_name=rule_group_name, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_group_name: Optional[str] = None, + rules: Optional[Sequence[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_group_name is None and 'ruleGroupName' in kwargs: + rule_group_name = kwargs['ruleGroupName'] + if rule_group_name is None: + raise TypeError("Missing 'rule_group_name' argument") + + _setter("rule_group_name", rule_group_name) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter(name="ruleGroupName") @@ -3696,11 +4826,32 @@ def __init__(__self__, *, :param str selector: String value which will be used for the filter operation. If empty will exclude all traffic on this `match_variable` :param str selector_match_operator: Operator which will be used to search in the variable content. Possible values are `Contains`, `EndsWith`, `Equals`, `EqualsAny` and `StartsWith`. If empty will exclude all traffic on this `match_variable` """ - pulumi.set(__self__, "match_variable", match_variable) + ApplicationGatewayWafConfigurationExclusion._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + selector=selector, + selector_match_operator=selector_match_operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[str] = None, + selector: Optional[str] = None, + selector_match_operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if selector_match_operator is None and 'selectorMatchOperator' in kwargs: + selector_match_operator = kwargs['selectorMatchOperator'] + + _setter("match_variable", match_variable) if selector is not None: - pulumi.set(__self__, "selector", selector) + _setter("selector", selector) if selector_match_operator is not None: - pulumi.set(__self__, "selector_match_operator", selector_match_operator) + _setter("selector_match_operator", selector_match_operator) @property @pulumi.getter(name="matchVariable") @@ -3767,14 +4918,45 @@ def __init__(__self__, *, > **NOTE:** `ipv6` can be specified when `peering_type` is `MicrosoftPeering` or `AzurePrivatePeering` """ - pulumi.set(__self__, "primary_peer_address_prefix", primary_peer_address_prefix) - pulumi.set(__self__, "secondary_peer_address_prefix", secondary_peer_address_prefix) + ExpressRouteCircuitPeeringIpv6._configure( + lambda key, value: pulumi.set(__self__, key, value), + primary_peer_address_prefix=primary_peer_address_prefix, + secondary_peer_address_prefix=secondary_peer_address_prefix, + enabled=enabled, + microsoft_peering=microsoft_peering, + route_filter_id=route_filter_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + primary_peer_address_prefix: Optional[str] = None, + secondary_peer_address_prefix: Optional[str] = None, + enabled: Optional[bool] = None, + microsoft_peering: Optional['outputs.ExpressRouteCircuitPeeringIpv6MicrosoftPeering'] = None, + route_filter_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary_peer_address_prefix is None and 'primaryPeerAddressPrefix' in kwargs: + primary_peer_address_prefix = kwargs['primaryPeerAddressPrefix'] + if primary_peer_address_prefix is None: + raise TypeError("Missing 'primary_peer_address_prefix' argument") + if secondary_peer_address_prefix is None and 'secondaryPeerAddressPrefix' in kwargs: + secondary_peer_address_prefix = kwargs['secondaryPeerAddressPrefix'] + if secondary_peer_address_prefix is None: + raise TypeError("Missing 'secondary_peer_address_prefix' argument") + if microsoft_peering is None and 'microsoftPeering' in kwargs: + microsoft_peering = kwargs['microsoftPeering'] + if route_filter_id is None and 'routeFilterId' in kwargs: + route_filter_id = kwargs['routeFilterId'] + + _setter("primary_peer_address_prefix", primary_peer_address_prefix) + _setter("secondary_peer_address_prefix", secondary_peer_address_prefix) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if microsoft_peering is not None: - pulumi.set(__self__, "microsoft_peering", microsoft_peering) + _setter("microsoft_peering", microsoft_peering) if route_filter_id is not None: - pulumi.set(__self__, "route_filter_id", route_filter_id) + _setter("route_filter_id", route_filter_id) @property @pulumi.getter(name="primaryPeerAddressPrefix") @@ -3855,14 +5037,39 @@ def __init__(__self__, *, :param int customer_asn: The CustomerASN of the peering. Defaults to `0`. :param str routing_registry_name: The Routing Registry against which the AS number and prefixes are registered. For example: `ARIN`, `RIPE`, `AFRINIC` etc. Defaults to `NONE`. """ + ExpressRouteCircuitPeeringIpv6MicrosoftPeering._configure( + lambda key, value: pulumi.set(__self__, key, value), + advertised_communities=advertised_communities, + advertised_public_prefixes=advertised_public_prefixes, + customer_asn=customer_asn, + routing_registry_name=routing_registry_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + advertised_communities: Optional[Sequence[str]] = None, + advertised_public_prefixes: Optional[Sequence[str]] = None, + customer_asn: Optional[int] = None, + routing_registry_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if advertised_communities is None and 'advertisedCommunities' in kwargs: + advertised_communities = kwargs['advertisedCommunities'] + if advertised_public_prefixes is None and 'advertisedPublicPrefixes' in kwargs: + advertised_public_prefixes = kwargs['advertisedPublicPrefixes'] + if customer_asn is None and 'customerAsn' in kwargs: + customer_asn = kwargs['customerAsn'] + if routing_registry_name is None and 'routingRegistryName' in kwargs: + routing_registry_name = kwargs['routingRegistryName'] + if advertised_communities is not None: - pulumi.set(__self__, "advertised_communities", advertised_communities) + _setter("advertised_communities", advertised_communities) if advertised_public_prefixes is not None: - pulumi.set(__self__, "advertised_public_prefixes", advertised_public_prefixes) + _setter("advertised_public_prefixes", advertised_public_prefixes) if customer_asn is not None: - pulumi.set(__self__, "customer_asn", customer_asn) + _setter("customer_asn", customer_asn) if routing_registry_name is not None: - pulumi.set(__self__, "routing_registry_name", routing_registry_name) + _setter("routing_registry_name", routing_registry_name) @property @pulumi.getter(name="advertisedCommunities") @@ -3933,13 +5140,40 @@ def __init__(__self__, *, :param int customer_asn: The CustomerASN of the peering. Defaults to `0`. :param str routing_registry_name: The Routing Registry against which the AS number and prefixes are registered. For example: `ARIN`, `RIPE`, `AFRINIC` etc. Defaults to `NONE`. """ - pulumi.set(__self__, "advertised_public_prefixes", advertised_public_prefixes) + ExpressRouteCircuitPeeringMicrosoftPeeringConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + advertised_public_prefixes=advertised_public_prefixes, + advertised_communities=advertised_communities, + customer_asn=customer_asn, + routing_registry_name=routing_registry_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + advertised_public_prefixes: Optional[Sequence[str]] = None, + advertised_communities: Optional[Sequence[str]] = None, + customer_asn: Optional[int] = None, + routing_registry_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if advertised_public_prefixes is None and 'advertisedPublicPrefixes' in kwargs: + advertised_public_prefixes = kwargs['advertisedPublicPrefixes'] + if advertised_public_prefixes is None: + raise TypeError("Missing 'advertised_public_prefixes' argument") + if advertised_communities is None and 'advertisedCommunities' in kwargs: + advertised_communities = kwargs['advertisedCommunities'] + if customer_asn is None and 'customerAsn' in kwargs: + customer_asn = kwargs['customerAsn'] + if routing_registry_name is None and 'routingRegistryName' in kwargs: + routing_registry_name = kwargs['routingRegistryName'] + + _setter("advertised_public_prefixes", advertised_public_prefixes) if advertised_communities is not None: - pulumi.set(__self__, "advertised_communities", advertised_communities) + _setter("advertised_communities", advertised_communities) if customer_asn is not None: - pulumi.set(__self__, "customer_asn", customer_asn) + _setter("customer_asn", customer_asn) if routing_registry_name is not None: - pulumi.set(__self__, "routing_registry_name", routing_registry_name) + _setter("routing_registry_name", routing_registry_name) @property @pulumi.getter(name="advertisedPublicPrefixes") @@ -3985,8 +5219,25 @@ def __init__(__self__, *, > **NOTE:** You can migrate from `MeteredData` to `UnlimitedData`, but not the other way around. :param str tier: The service tier. Possible values are `Basic`, `Local`, `Standard` or `Premium`. """ - pulumi.set(__self__, "family", family) - pulumi.set(__self__, "tier", tier) + ExpressRouteCircuitSku._configure( + lambda key, value: pulumi.set(__self__, key, value), + family=family, + tier=tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + family: Optional[str] = None, + tier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if family is None: + raise TypeError("Missing 'family' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("family", family) + _setter("tier", tier) @property @pulumi.getter @@ -4043,14 +5294,39 @@ def __init__(__self__, *, :param str outbound_route_map_id: The ID of the Route Map associated with this Express Route Connection for outbound routes. :param 'ExpressRouteConnectionRoutingPropagatedRouteTableArgs' propagated_route_table: A `propagated_route_table` block as defined below. """ + ExpressRouteConnectionRouting._configure( + lambda key, value: pulumi.set(__self__, key, value), + associated_route_table_id=associated_route_table_id, + inbound_route_map_id=inbound_route_map_id, + outbound_route_map_id=outbound_route_map_id, + propagated_route_table=propagated_route_table, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + associated_route_table_id: Optional[str] = None, + inbound_route_map_id: Optional[str] = None, + outbound_route_map_id: Optional[str] = None, + propagated_route_table: Optional['outputs.ExpressRouteConnectionRoutingPropagatedRouteTable'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if associated_route_table_id is None and 'associatedRouteTableId' in kwargs: + associated_route_table_id = kwargs['associatedRouteTableId'] + if inbound_route_map_id is None and 'inboundRouteMapId' in kwargs: + inbound_route_map_id = kwargs['inboundRouteMapId'] + if outbound_route_map_id is None and 'outboundRouteMapId' in kwargs: + outbound_route_map_id = kwargs['outboundRouteMapId'] + if propagated_route_table is None and 'propagatedRouteTable' in kwargs: + propagated_route_table = kwargs['propagatedRouteTable'] + if associated_route_table_id is not None: - pulumi.set(__self__, "associated_route_table_id", associated_route_table_id) + _setter("associated_route_table_id", associated_route_table_id) if inbound_route_map_id is not None: - pulumi.set(__self__, "inbound_route_map_id", inbound_route_map_id) + _setter("inbound_route_map_id", inbound_route_map_id) if outbound_route_map_id is not None: - pulumi.set(__self__, "outbound_route_map_id", outbound_route_map_id) + _setter("outbound_route_map_id", outbound_route_map_id) if propagated_route_table is not None: - pulumi.set(__self__, "propagated_route_table", propagated_route_table) + _setter("propagated_route_table", propagated_route_table) @property @pulumi.getter(name="associatedRouteTableId") @@ -4111,10 +5387,25 @@ def __init__(__self__, *, :param Sequence[str] labels: The list of labels to logically group route tables. :param Sequence[str] route_table_ids: A list of IDs of the Virtual Hub Route Table to propagate routes from Express Route Connection to the route table. """ + ExpressRouteConnectionRoutingPropagatedRouteTable._configure( + lambda key, value: pulumi.set(__self__, key, value), + labels=labels, + route_table_ids=route_table_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + labels: Optional[Sequence[str]] = None, + route_table_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if route_table_ids is None and 'routeTableIds' in kwargs: + route_table_ids = kwargs['routeTableIds'] + if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if route_table_ids is not None: - pulumi.set(__self__, "route_table_ids", route_table_ids) + _setter("route_table_ids", route_table_ids) @property @pulumi.getter @@ -4159,8 +5450,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: Specifies a list of User Assigned Managed Identity IDs to be assigned to this Express Route Port. :param str type: Specifies the type of Managed Service Identity that should be configured on this Express Route Port. Only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + ExpressRoutePortIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -4243,28 +5553,79 @@ def __init__(__self__, *, :param str rack_id: The ID that maps from the patch panel port to the rack. :param str router_name: The name of the Azure router associated with the Express Route Port Link. """ + ExpressRoutePortLink1._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_enabled=admin_enabled, + connector_type=connector_type, + id=id, + interface_name=interface_name, + macsec_cak_keyvault_secret_id=macsec_cak_keyvault_secret_id, + macsec_cipher=macsec_cipher, + macsec_ckn_keyvault_secret_id=macsec_ckn_keyvault_secret_id, + macsec_sci_enabled=macsec_sci_enabled, + patch_panel_id=patch_panel_id, + rack_id=rack_id, + router_name=router_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_enabled: Optional[bool] = None, + connector_type: Optional[str] = None, + id: Optional[str] = None, + interface_name: Optional[str] = None, + macsec_cak_keyvault_secret_id: Optional[str] = None, + macsec_cipher: Optional[str] = None, + macsec_ckn_keyvault_secret_id: Optional[str] = None, + macsec_sci_enabled: Optional[bool] = None, + patch_panel_id: Optional[str] = None, + rack_id: Optional[str] = None, + router_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_enabled is None and 'adminEnabled' in kwargs: + admin_enabled = kwargs['adminEnabled'] + if connector_type is None and 'connectorType' in kwargs: + connector_type = kwargs['connectorType'] + if interface_name is None and 'interfaceName' in kwargs: + interface_name = kwargs['interfaceName'] + if macsec_cak_keyvault_secret_id is None and 'macsecCakKeyvaultSecretId' in kwargs: + macsec_cak_keyvault_secret_id = kwargs['macsecCakKeyvaultSecretId'] + if macsec_cipher is None and 'macsecCipher' in kwargs: + macsec_cipher = kwargs['macsecCipher'] + if macsec_ckn_keyvault_secret_id is None and 'macsecCknKeyvaultSecretId' in kwargs: + macsec_ckn_keyvault_secret_id = kwargs['macsecCknKeyvaultSecretId'] + if macsec_sci_enabled is None and 'macsecSciEnabled' in kwargs: + macsec_sci_enabled = kwargs['macsecSciEnabled'] + if patch_panel_id is None and 'patchPanelId' in kwargs: + patch_panel_id = kwargs['patchPanelId'] + if rack_id is None and 'rackId' in kwargs: + rack_id = kwargs['rackId'] + if router_name is None and 'routerName' in kwargs: + router_name = kwargs['routerName'] + if admin_enabled is not None: - pulumi.set(__self__, "admin_enabled", admin_enabled) + _setter("admin_enabled", admin_enabled) if connector_type is not None: - pulumi.set(__self__, "connector_type", connector_type) + _setter("connector_type", connector_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if interface_name is not None: - pulumi.set(__self__, "interface_name", interface_name) + _setter("interface_name", interface_name) if macsec_cak_keyvault_secret_id is not None: - pulumi.set(__self__, "macsec_cak_keyvault_secret_id", macsec_cak_keyvault_secret_id) + _setter("macsec_cak_keyvault_secret_id", macsec_cak_keyvault_secret_id) if macsec_cipher is not None: - pulumi.set(__self__, "macsec_cipher", macsec_cipher) + _setter("macsec_cipher", macsec_cipher) if macsec_ckn_keyvault_secret_id is not None: - pulumi.set(__self__, "macsec_ckn_keyvault_secret_id", macsec_ckn_keyvault_secret_id) + _setter("macsec_ckn_keyvault_secret_id", macsec_ckn_keyvault_secret_id) if macsec_sci_enabled is not None: - pulumi.set(__self__, "macsec_sci_enabled", macsec_sci_enabled) + _setter("macsec_sci_enabled", macsec_sci_enabled) if patch_panel_id is not None: - pulumi.set(__self__, "patch_panel_id", patch_panel_id) + _setter("patch_panel_id", patch_panel_id) if rack_id is not None: - pulumi.set(__self__, "rack_id", rack_id) + _setter("rack_id", rack_id) if router_name is not None: - pulumi.set(__self__, "router_name", router_name) + _setter("router_name", router_name) @property @pulumi.getter(name="adminEnabled") @@ -4421,28 +5782,79 @@ def __init__(__self__, *, :param str rack_id: The ID that maps from the patch panel port to the rack. :param str router_name: The name of the Azure router associated with the Express Route Port Link. """ + ExpressRoutePortLink2._configure( + lambda key, value: pulumi.set(__self__, key, value), + admin_enabled=admin_enabled, + connector_type=connector_type, + id=id, + interface_name=interface_name, + macsec_cak_keyvault_secret_id=macsec_cak_keyvault_secret_id, + macsec_cipher=macsec_cipher, + macsec_ckn_keyvault_secret_id=macsec_ckn_keyvault_secret_id, + macsec_sci_enabled=macsec_sci_enabled, + patch_panel_id=patch_panel_id, + rack_id=rack_id, + router_name=router_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + admin_enabled: Optional[bool] = None, + connector_type: Optional[str] = None, + id: Optional[str] = None, + interface_name: Optional[str] = None, + macsec_cak_keyvault_secret_id: Optional[str] = None, + macsec_cipher: Optional[str] = None, + macsec_ckn_keyvault_secret_id: Optional[str] = None, + macsec_sci_enabled: Optional[bool] = None, + patch_panel_id: Optional[str] = None, + rack_id: Optional[str] = None, + router_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if admin_enabled is None and 'adminEnabled' in kwargs: + admin_enabled = kwargs['adminEnabled'] + if connector_type is None and 'connectorType' in kwargs: + connector_type = kwargs['connectorType'] + if interface_name is None and 'interfaceName' in kwargs: + interface_name = kwargs['interfaceName'] + if macsec_cak_keyvault_secret_id is None and 'macsecCakKeyvaultSecretId' in kwargs: + macsec_cak_keyvault_secret_id = kwargs['macsecCakKeyvaultSecretId'] + if macsec_cipher is None and 'macsecCipher' in kwargs: + macsec_cipher = kwargs['macsecCipher'] + if macsec_ckn_keyvault_secret_id is None and 'macsecCknKeyvaultSecretId' in kwargs: + macsec_ckn_keyvault_secret_id = kwargs['macsecCknKeyvaultSecretId'] + if macsec_sci_enabled is None and 'macsecSciEnabled' in kwargs: + macsec_sci_enabled = kwargs['macsecSciEnabled'] + if patch_panel_id is None and 'patchPanelId' in kwargs: + patch_panel_id = kwargs['patchPanelId'] + if rack_id is None and 'rackId' in kwargs: + rack_id = kwargs['rackId'] + if router_name is None and 'routerName' in kwargs: + router_name = kwargs['routerName'] + if admin_enabled is not None: - pulumi.set(__self__, "admin_enabled", admin_enabled) + _setter("admin_enabled", admin_enabled) if connector_type is not None: - pulumi.set(__self__, "connector_type", connector_type) + _setter("connector_type", connector_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if interface_name is not None: - pulumi.set(__self__, "interface_name", interface_name) + _setter("interface_name", interface_name) if macsec_cak_keyvault_secret_id is not None: - pulumi.set(__self__, "macsec_cak_keyvault_secret_id", macsec_cak_keyvault_secret_id) + _setter("macsec_cak_keyvault_secret_id", macsec_cak_keyvault_secret_id) if macsec_cipher is not None: - pulumi.set(__self__, "macsec_cipher", macsec_cipher) + _setter("macsec_cipher", macsec_cipher) if macsec_ckn_keyvault_secret_id is not None: - pulumi.set(__self__, "macsec_ckn_keyvault_secret_id", macsec_ckn_keyvault_secret_id) + _setter("macsec_ckn_keyvault_secret_id", macsec_ckn_keyvault_secret_id) if macsec_sci_enabled is not None: - pulumi.set(__self__, "macsec_sci_enabled", macsec_sci_enabled) + _setter("macsec_sci_enabled", macsec_sci_enabled) if patch_panel_id is not None: - pulumi.set(__self__, "patch_panel_id", patch_panel_id) + _setter("patch_panel_id", patch_panel_id) if rack_id is not None: - pulumi.set(__self__, "rack_id", rack_id) + _setter("rack_id", rack_id) if router_name is not None: - pulumi.set(__self__, "router_name", router_name) + _setter("router_name", router_name) @property @pulumi.getter(name="adminEnabled") @@ -4579,19 +5991,52 @@ def __init__(__self__, *, > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule. :param Sequence[str] target_fqdns: A list of FQDNs. """ - pulumi.set(__self__, "name", name) + FirewallApplicationRuleCollectionRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + fqdn_tags=fqdn_tags, + protocols=protocols, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + target_fqdns=target_fqdns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + fqdn_tags: Optional[Sequence[str]] = None, + protocols: Optional[Sequence['outputs.FirewallApplicationRuleCollectionRuleProtocol']] = None, + source_addresses: Optional[Sequence[str]] = None, + source_ip_groups: Optional[Sequence[str]] = None, + target_fqdns: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if fqdn_tags is None and 'fqdnTags' in kwargs: + fqdn_tags = kwargs['fqdnTags'] + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + if target_fqdns is None and 'targetFqdns' in kwargs: + target_fqdns = kwargs['targetFqdns'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if fqdn_tags is not None: - pulumi.set(__self__, "fqdn_tags", fqdn_tags) + _setter("fqdn_tags", fqdn_tags) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) if target_fqdns is not None: - pulumi.set(__self__, "target_fqdns", target_fqdns) + _setter("target_fqdns", target_fqdns) @property @pulumi.getter @@ -4661,8 +6106,25 @@ def __init__(__self__, *, :param int port: Specify a port for the connection. :param str type: Specifies the type of connection. Possible values are `Http`, `Https` and `Mssql`. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "type", type) + FirewallApplicationRuleCollectionRuleProtocol._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("port", port) + _setter("type", type) @property @pulumi.getter @@ -4718,13 +6180,38 @@ def __init__(__self__, *, > **NOTE** At least one and only one `ip_configuration` block may contain a `subnet_id`. """ - pulumi.set(__self__, "name", name) + FirewallIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + private_ip_address=private_ip_address, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + public_ip_address_id: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -4798,11 +6285,40 @@ def __init__(__self__, *, > **NOTE** The Management Subnet used for the Firewall must have the name `AzureFirewallManagementSubnet` and the subnet mask must be at least a `/26`. :param str private_ip_address: The private IP address associated with the Firewall. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) + FirewallManagementIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + private_ip_address=private_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + public_ip_address_id: Optional[str] = None, + subnet_id: Optional[str] = None, + private_ip_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + + _setter("name", name) + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) @property @pulumi.getter @@ -4893,18 +6409,69 @@ def __init__(__self__, *, > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule. """ - pulumi.set(__self__, "destination_addresses", destination_addresses) - pulumi.set(__self__, "destination_ports", destination_ports) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocols", protocols) - pulumi.set(__self__, "translated_address", translated_address) - pulumi.set(__self__, "translated_port", translated_port) + FirewallNatRuleCollectionRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_addresses=destination_addresses, + destination_ports=destination_ports, + name=name, + protocols=protocols, + translated_address=translated_address, + translated_port=translated_port, + description=description, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_addresses: Optional[Sequence[str]] = None, + destination_ports: Optional[Sequence[str]] = None, + name: Optional[str] = None, + protocols: Optional[Sequence[str]] = None, + translated_address: Optional[str] = None, + translated_port: Optional[str] = None, + description: Optional[str] = None, + source_addresses: Optional[Sequence[str]] = None, + source_ip_groups: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_addresses is None and 'destinationAddresses' in kwargs: + destination_addresses = kwargs['destinationAddresses'] + if destination_addresses is None: + raise TypeError("Missing 'destination_addresses' argument") + if destination_ports is None and 'destinationPorts' in kwargs: + destination_ports = kwargs['destinationPorts'] + if destination_ports is None: + raise TypeError("Missing 'destination_ports' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if translated_address is None and 'translatedAddress' in kwargs: + translated_address = kwargs['translatedAddress'] + if translated_address is None: + raise TypeError("Missing 'translated_address' argument") + if translated_port is None and 'translatedPort' in kwargs: + translated_port = kwargs['translatedPort'] + if translated_port is None: + raise TypeError("Missing 'translated_port' argument") + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + + _setter("destination_addresses", destination_addresses) + _setter("destination_ports", destination_ports) + _setter("name", name) + _setter("protocols", protocols) + _setter("translated_address", translated_address) + _setter("translated_port", translated_port) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) @property @pulumi.getter(name="destinationAddresses") @@ -5037,21 +6604,66 @@ def __init__(__self__, *, > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule. """ - pulumi.set(__self__, "destination_ports", destination_ports) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocols", protocols) + FirewallNetworkRuleCollectionRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_ports=destination_ports, + name=name, + protocols=protocols, + description=description, + destination_addresses=destination_addresses, + destination_fqdns=destination_fqdns, + destination_ip_groups=destination_ip_groups, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_ports: Optional[Sequence[str]] = None, + name: Optional[str] = None, + protocols: Optional[Sequence[str]] = None, + description: Optional[str] = None, + destination_addresses: Optional[Sequence[str]] = None, + destination_fqdns: Optional[Sequence[str]] = None, + destination_ip_groups: Optional[Sequence[str]] = None, + source_addresses: Optional[Sequence[str]] = None, + source_ip_groups: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_ports is None and 'destinationPorts' in kwargs: + destination_ports = kwargs['destinationPorts'] + if destination_ports is None: + raise TypeError("Missing 'destination_ports' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if destination_addresses is None and 'destinationAddresses' in kwargs: + destination_addresses = kwargs['destinationAddresses'] + if destination_fqdns is None and 'destinationFqdns' in kwargs: + destination_fqdns = kwargs['destinationFqdns'] + if destination_ip_groups is None and 'destinationIpGroups' in kwargs: + destination_ip_groups = kwargs['destinationIpGroups'] + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + + _setter("destination_ports", destination_ports) + _setter("name", name) + _setter("protocols", protocols) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_addresses is not None: - pulumi.set(__self__, "destination_addresses", destination_addresses) + _setter("destination_addresses", destination_addresses) if destination_fqdns is not None: - pulumi.set(__self__, "destination_fqdns", destination_fqdns) + _setter("destination_fqdns", destination_fqdns) if destination_ip_groups is not None: - pulumi.set(__self__, "destination_ip_groups", destination_ip_groups) + _setter("destination_ip_groups", destination_ip_groups) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) @property @pulumi.getter(name="destinationPorts") @@ -5158,10 +6770,25 @@ def __init__(__self__, *, :param bool proxy_enabled: Whether to enable DNS proxy on Firewalls attached to this Firewall Policy? Defaults to `false`. :param Sequence[str] servers: A list of custom DNS servers' IP addresses. """ + FirewallPolicyDns._configure( + lambda key, value: pulumi.set(__self__, key, value), + proxy_enabled=proxy_enabled, + servers=servers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + proxy_enabled: Optional[bool] = None, + servers: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if proxy_enabled is None and 'proxyEnabled' in kwargs: + proxy_enabled = kwargs['proxyEnabled'] + if proxy_enabled is not None: - pulumi.set(__self__, "proxy_enabled", proxy_enabled) + _setter("proxy_enabled", proxy_enabled) if servers is not None: - pulumi.set(__self__, "servers", servers) + _setter("servers", servers) @property @pulumi.getter(name="proxyEnabled") @@ -5222,18 +6849,49 @@ def __init__(__self__, *, :param str pac_file: Specifies a SAS URL for PAC file. :param int pac_file_port: Specifies a port number for firewall to serve PAC file. """ + FirewallPolicyExplicitProxy._configure( + lambda key, value: pulumi.set(__self__, key, value), + enable_pac_file=enable_pac_file, + enabled=enabled, + http_port=http_port, + https_port=https_port, + pac_file=pac_file, + pac_file_port=pac_file_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enable_pac_file: Optional[bool] = None, + enabled: Optional[bool] = None, + http_port: Optional[int] = None, + https_port: Optional[int] = None, + pac_file: Optional[str] = None, + pac_file_port: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enable_pac_file is None and 'enablePacFile' in kwargs: + enable_pac_file = kwargs['enablePacFile'] + if http_port is None and 'httpPort' in kwargs: + http_port = kwargs['httpPort'] + if https_port is None and 'httpsPort' in kwargs: + https_port = kwargs['httpsPort'] + if pac_file is None and 'pacFile' in kwargs: + pac_file = kwargs['pacFile'] + if pac_file_port is None and 'pacFilePort' in kwargs: + pac_file_port = kwargs['pacFilePort'] + if enable_pac_file is not None: - pulumi.set(__self__, "enable_pac_file", enable_pac_file) + _setter("enable_pac_file", enable_pac_file) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if http_port is not None: - pulumi.set(__self__, "http_port", http_port) + _setter("http_port", http_port) if https_port is not None: - pulumi.set(__self__, "https_port", https_port) + _setter("https_port", https_port) if pac_file is not None: - pulumi.set(__self__, "pac_file", pac_file) + _setter("pac_file", pac_file) if pac_file_port is not None: - pulumi.set(__self__, "pac_file_port", pac_file_port) + _setter("pac_file_port", pac_file_port) @property @pulumi.getter(name="enablePacFile") @@ -5316,13 +6974,38 @@ def __init__(__self__, *, :param str type: Specifies the type of Managed Service Identity that should be configured on this Firewall Policy. Only possible value is `UserAssigned`. :param Sequence[str] identity_ids: Specifies a list of User Assigned Managed Identity IDs to be assigned to this Firewall Policy. """ - pulumi.set(__self__, "type", type) + FirewallPolicyIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -5385,12 +7068,39 @@ def __init__(__self__, *, :param Sequence['FirewallPolicyInsightsLogAnalyticsWorkspaceArgs'] log_analytics_workspaces: A list of `log_analytics_workspace` block as defined below. :param int retention_in_days: The log retention period in days. """ - pulumi.set(__self__, "default_log_analytics_workspace_id", default_log_analytics_workspace_id) - pulumi.set(__self__, "enabled", enabled) + FirewallPolicyInsights._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_log_analytics_workspace_id=default_log_analytics_workspace_id, + enabled=enabled, + log_analytics_workspaces=log_analytics_workspaces, + retention_in_days=retention_in_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_log_analytics_workspace_id: Optional[str] = None, + enabled: Optional[bool] = None, + log_analytics_workspaces: Optional[Sequence['outputs.FirewallPolicyInsightsLogAnalyticsWorkspace']] = None, + retention_in_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_log_analytics_workspace_id is None and 'defaultLogAnalyticsWorkspaceId' in kwargs: + default_log_analytics_workspace_id = kwargs['defaultLogAnalyticsWorkspaceId'] + if default_log_analytics_workspace_id is None: + raise TypeError("Missing 'default_log_analytics_workspace_id' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if log_analytics_workspaces is None and 'logAnalyticsWorkspaces' in kwargs: + log_analytics_workspaces = kwargs['logAnalyticsWorkspaces'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + + _setter("default_log_analytics_workspace_id", default_log_analytics_workspace_id) + _setter("enabled", enabled) if log_analytics_workspaces is not None: - pulumi.set(__self__, "log_analytics_workspaces", log_analytics_workspaces) + _setter("log_analytics_workspaces", log_analytics_workspaces) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) @property @pulumi.getter(name="defaultLogAnalyticsWorkspaceId") @@ -5451,8 +7161,27 @@ def __init__(__self__, *, :param str firewall_location: The location of the Firewalls, that when matches this Log Analytics Workspace will be used to consume their logs. :param str id: The ID of the Log Analytics Workspace that the Firewalls associated with this Firewall Policy will send their logs to when their locations match the `firewall_location`. """ - pulumi.set(__self__, "firewall_location", firewall_location) - pulumi.set(__self__, "id", id) + FirewallPolicyInsightsLogAnalyticsWorkspace._configure( + lambda key, value: pulumi.set(__self__, key, value), + firewall_location=firewall_location, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + firewall_location: Optional[str] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if firewall_location is None and 'firewallLocation' in kwargs: + firewall_location = kwargs['firewallLocation'] + if firewall_location is None: + raise TypeError("Missing 'firewall_location' argument") + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("firewall_location", firewall_location) + _setter("id", id) @property @pulumi.getter(name="firewallLocation") @@ -5505,14 +7234,37 @@ def __init__(__self__, *, :param Sequence['FirewallPolicyIntrusionDetectionSignatureOverrideArgs'] signature_overrides: One or more `signature_overrides` blocks as defined below. :param Sequence['FirewallPolicyIntrusionDetectionTrafficBypassArgs'] traffic_bypasses: One or more `traffic_bypass` blocks as defined below. """ + FirewallPolicyIntrusionDetection._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + private_ranges=private_ranges, + signature_overrides=signature_overrides, + traffic_bypasses=traffic_bypasses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + private_ranges: Optional[Sequence[str]] = None, + signature_overrides: Optional[Sequence['outputs.FirewallPolicyIntrusionDetectionSignatureOverride']] = None, + traffic_bypasses: Optional[Sequence['outputs.FirewallPolicyIntrusionDetectionTrafficBypass']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_ranges is None and 'privateRanges' in kwargs: + private_ranges = kwargs['privateRanges'] + if signature_overrides is None and 'signatureOverrides' in kwargs: + signature_overrides = kwargs['signatureOverrides'] + if traffic_bypasses is None and 'trafficBypasses' in kwargs: + traffic_bypasses = kwargs['trafficBypasses'] + if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if private_ranges is not None: - pulumi.set(__self__, "private_ranges", private_ranges) + _setter("private_ranges", private_ranges) if signature_overrides is not None: - pulumi.set(__self__, "signature_overrides", signature_overrides) + _setter("signature_overrides", signature_overrides) if traffic_bypasses is not None: - pulumi.set(__self__, "traffic_bypasses", traffic_bypasses) + _setter("traffic_bypasses", traffic_bypasses) @property @pulumi.getter @@ -5556,10 +7308,23 @@ def __init__(__self__, *, :param str id: 12-digit number (id) which identifies your signature. :param str state: state can be any of `Off`, `Alert` or `Deny`. """ + FirewallPolicyIntrusionDetectionSignatureOverride._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + state=state, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + state: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) @property @pulumi.getter @@ -5624,20 +7389,59 @@ def __init__(__self__, *, :param Sequence[str] source_addresses: Specifies a list of source addresses that shall be bypassed by intrusion detection. :param Sequence[str] source_ip_groups: Specifies a list of source IP groups that shall be bypassed by intrusion detection. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + FirewallPolicyIntrusionDetectionTrafficBypass._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocol=protocol, + description=description, + destination_addresses=destination_addresses, + destination_ip_groups=destination_ip_groups, + destination_ports=destination_ports, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + protocol: Optional[str] = None, + description: Optional[str] = None, + destination_addresses: Optional[Sequence[str]] = None, + destination_ip_groups: Optional[Sequence[str]] = None, + destination_ports: Optional[Sequence[str]] = None, + source_addresses: Optional[Sequence[str]] = None, + source_ip_groups: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if destination_addresses is None and 'destinationAddresses' in kwargs: + destination_addresses = kwargs['destinationAddresses'] + if destination_ip_groups is None and 'destinationIpGroups' in kwargs: + destination_ip_groups = kwargs['destinationIpGroups'] + if destination_ports is None and 'destinationPorts' in kwargs: + destination_ports = kwargs['destinationPorts'] + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + + _setter("name", name) + _setter("protocol", protocol) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_addresses is not None: - pulumi.set(__self__, "destination_addresses", destination_addresses) + _setter("destination_addresses", destination_addresses) if destination_ip_groups is not None: - pulumi.set(__self__, "destination_ip_groups", destination_ip_groups) + _setter("destination_ip_groups", destination_ip_groups) if destination_ports is not None: - pulumi.set(__self__, "destination_ports", destination_ports) + _setter("destination_ports", destination_ports) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) @property @pulumi.getter @@ -5717,10 +7521,35 @@ def __init__(__self__, *, :param int priority: The priority of the application rule collection. The range is `100` - `65000`. :param Sequence['FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleArgs'] rules: One or more `application_rule` (application rule) blocks as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "rules", rules) + FirewallPolicyRuleCollectionGroupApplicationRuleCollection._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + priority=priority, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + rules: Optional[Sequence['outputs.FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if rules is None: + raise TypeError("Missing 'rules' argument") + + _setter("action", action) + _setter("name", name) + _setter("priority", priority) + _setter("rules", rules) @property @pulumi.getter @@ -5813,27 +7642,76 @@ def __init__(__self__, *, :param bool terminate_tls: Boolean specifying if TLS shall be terminated (true) or not (false). Must be `true` when using `destination_urls`. Needs Premium SKU for Firewall Policy. :param Sequence[str] web_categories: Specifies a list of web categories to which access is denied or allowed depending on the value of `action` above. Needs Premium SKU for Firewall Policy. """ - pulumi.set(__self__, "name", name) + FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + destination_addresses=destination_addresses, + destination_fqdn_tags=destination_fqdn_tags, + destination_fqdns=destination_fqdns, + destination_urls=destination_urls, + protocols=protocols, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + terminate_tls=terminate_tls, + web_categories=web_categories, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + destination_addresses: Optional[Sequence[str]] = None, + destination_fqdn_tags: Optional[Sequence[str]] = None, + destination_fqdns: Optional[Sequence[str]] = None, + destination_urls: Optional[Sequence[str]] = None, + protocols: Optional[Sequence['outputs.FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleProtocol']] = None, + source_addresses: Optional[Sequence[str]] = None, + source_ip_groups: Optional[Sequence[str]] = None, + terminate_tls: Optional[bool] = None, + web_categories: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if destination_addresses is None and 'destinationAddresses' in kwargs: + destination_addresses = kwargs['destinationAddresses'] + if destination_fqdn_tags is None and 'destinationFqdnTags' in kwargs: + destination_fqdn_tags = kwargs['destinationFqdnTags'] + if destination_fqdns is None and 'destinationFqdns' in kwargs: + destination_fqdns = kwargs['destinationFqdns'] + if destination_urls is None and 'destinationUrls' in kwargs: + destination_urls = kwargs['destinationUrls'] + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + if terminate_tls is None and 'terminateTls' in kwargs: + terminate_tls = kwargs['terminateTls'] + if web_categories is None and 'webCategories' in kwargs: + web_categories = kwargs['webCategories'] + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_addresses is not None: - pulumi.set(__self__, "destination_addresses", destination_addresses) + _setter("destination_addresses", destination_addresses) if destination_fqdn_tags is not None: - pulumi.set(__self__, "destination_fqdn_tags", destination_fqdn_tags) + _setter("destination_fqdn_tags", destination_fqdn_tags) if destination_fqdns is not None: - pulumi.set(__self__, "destination_fqdns", destination_fqdns) + _setter("destination_fqdns", destination_fqdns) if destination_urls is not None: - pulumi.set(__self__, "destination_urls", destination_urls) + _setter("destination_urls", destination_urls) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) if terminate_tls is not None: - pulumi.set(__self__, "terminate_tls", terminate_tls) + _setter("terminate_tls", terminate_tls) if web_categories is not None: - pulumi.set(__self__, "web_categories", web_categories) + _setter("web_categories", web_categories) @property @pulumi.getter @@ -5933,8 +7811,25 @@ def __init__(__self__, *, :param int port: Port number of the protocol. Range is 0-64000. :param str type: Protocol type. Possible values are `Http` and `Https`. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "type", type) + FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleProtocol._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("port", port) + _setter("type", type) @property @pulumi.getter @@ -5966,10 +7861,35 @@ def __init__(__self__, *, :param int priority: The priority of the NAT rule collection. The range is `100` - `65000`. :param Sequence['FirewallPolicyRuleCollectionGroupNatRuleCollectionRuleArgs'] rules: A `nat_rule` (NAT rule) block as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "rules", rules) + FirewallPolicyRuleCollectionGroupNatRuleCollection._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + priority=priority, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + rules: Optional[Sequence['outputs.FirewallPolicyRuleCollectionGroupNatRuleCollectionRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if rules is None: + raise TypeError("Missing 'rules' argument") + + _setter("action", action) + _setter("name", name) + _setter("priority", priority) + _setter("rules", rules) @property @pulumi.getter @@ -6060,23 +7980,72 @@ def __init__(__self__, *, > **NOTE:** Exactly one of `translated_address` and `translated_fqdn` should be set. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocols", protocols) - pulumi.set(__self__, "translated_port", translated_port) + FirewallPolicyRuleCollectionGroupNatRuleCollectionRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocols=protocols, + translated_port=translated_port, + description=description, + destination_address=destination_address, + destination_ports=destination_ports, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + translated_address=translated_address, + translated_fqdn=translated_fqdn, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + protocols: Optional[Sequence[str]] = None, + translated_port: Optional[int] = None, + description: Optional[str] = None, + destination_address: Optional[str] = None, + destination_ports: Optional[str] = None, + source_addresses: Optional[Sequence[str]] = None, + source_ip_groups: Optional[Sequence[str]] = None, + translated_address: Optional[str] = None, + translated_fqdn: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if translated_port is None and 'translatedPort' in kwargs: + translated_port = kwargs['translatedPort'] + if translated_port is None: + raise TypeError("Missing 'translated_port' argument") + if destination_address is None and 'destinationAddress' in kwargs: + destination_address = kwargs['destinationAddress'] + if destination_ports is None and 'destinationPorts' in kwargs: + destination_ports = kwargs['destinationPorts'] + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + if translated_address is None and 'translatedAddress' in kwargs: + translated_address = kwargs['translatedAddress'] + if translated_fqdn is None and 'translatedFqdn' in kwargs: + translated_fqdn = kwargs['translatedFqdn'] + + _setter("name", name) + _setter("protocols", protocols) + _setter("translated_port", translated_port) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_address is not None: - pulumi.set(__self__, "destination_address", destination_address) + _setter("destination_address", destination_address) if destination_ports is not None: - pulumi.set(__self__, "destination_ports", destination_ports) + _setter("destination_ports", destination_ports) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) if translated_address is not None: - pulumi.set(__self__, "translated_address", translated_address) + _setter("translated_address", translated_address) if translated_fqdn is not None: - pulumi.set(__self__, "translated_fqdn", translated_fqdn) + _setter("translated_fqdn", translated_fqdn) @property @pulumi.getter @@ -6174,10 +8143,35 @@ def __init__(__self__, *, :param int priority: The priority of the network rule collection. The range is `100` - `65000`. :param Sequence['FirewallPolicyRuleCollectionGroupNetworkRuleCollectionRuleArgs'] rules: One or more `network_rule` (network rule) blocks as defined below. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "rules", rules) + FirewallPolicyRuleCollectionGroupNetworkRuleCollection._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + priority=priority, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + rules: Optional[Sequence['outputs.FirewallPolicyRuleCollectionGroupNetworkRuleCollectionRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if rules is None: + raise TypeError("Missing 'rules' argument") + + _setter("action", action) + _setter("name", name) + _setter("priority", priority) + _setter("rules", rules) @property @pulumi.getter @@ -6262,21 +8256,66 @@ def __init__(__self__, *, :param Sequence[str] source_addresses: Specifies a list of source IP addresses (including CIDR, IP range and `*`). :param Sequence[str] source_ip_groups: Specifies a list of source IP groups. """ - pulumi.set(__self__, "destination_ports", destination_ports) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocols", protocols) + FirewallPolicyRuleCollectionGroupNetworkRuleCollectionRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_ports=destination_ports, + name=name, + protocols=protocols, + description=description, + destination_addresses=destination_addresses, + destination_fqdns=destination_fqdns, + destination_ip_groups=destination_ip_groups, + source_addresses=source_addresses, + source_ip_groups=source_ip_groups, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_ports: Optional[Sequence[str]] = None, + name: Optional[str] = None, + protocols: Optional[Sequence[str]] = None, + description: Optional[str] = None, + destination_addresses: Optional[Sequence[str]] = None, + destination_fqdns: Optional[Sequence[str]] = None, + destination_ip_groups: Optional[Sequence[str]] = None, + source_addresses: Optional[Sequence[str]] = None, + source_ip_groups: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_ports is None and 'destinationPorts' in kwargs: + destination_ports = kwargs['destinationPorts'] + if destination_ports is None: + raise TypeError("Missing 'destination_ports' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocols is None: + raise TypeError("Missing 'protocols' argument") + if destination_addresses is None and 'destinationAddresses' in kwargs: + destination_addresses = kwargs['destinationAddresses'] + if destination_fqdns is None and 'destinationFqdns' in kwargs: + destination_fqdns = kwargs['destinationFqdns'] + if destination_ip_groups is None and 'destinationIpGroups' in kwargs: + destination_ip_groups = kwargs['destinationIpGroups'] + if source_addresses is None and 'sourceAddresses' in kwargs: + source_addresses = kwargs['sourceAddresses'] + if source_ip_groups is None and 'sourceIpGroups' in kwargs: + source_ip_groups = kwargs['sourceIpGroups'] + + _setter("destination_ports", destination_ports) + _setter("name", name) + _setter("protocols", protocols) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_addresses is not None: - pulumi.set(__self__, "destination_addresses", destination_addresses) + _setter("destination_addresses", destination_addresses) if destination_fqdns is not None: - pulumi.set(__self__, "destination_fqdns", destination_fqdns) + _setter("destination_fqdns", destination_fqdns) if destination_ip_groups is not None: - pulumi.set(__self__, "destination_ip_groups", destination_ip_groups) + _setter("destination_ip_groups", destination_ip_groups) if source_addresses is not None: - pulumi.set(__self__, "source_addresses", source_addresses) + _setter("source_addresses", source_addresses) if source_ip_groups is not None: - pulumi.set(__self__, "source_ip_groups", source_ip_groups) + _setter("source_ip_groups", source_ip_groups) @property @pulumi.getter(name="destinationPorts") @@ -6377,10 +8416,25 @@ def __init__(__self__, *, :param Sequence[str] fqdns: A list of FQDNs that will be skipped for threat detection. :param Sequence[str] ip_addresses: A list of IP addresses or CIDR ranges that will be skipped for threat detection. """ + FirewallPolicyThreatIntelligenceAllowlist._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdns=fqdns, + ip_addresses=ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdns: Optional[Sequence[str]] = None, + ip_addresses: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if fqdns is not None: - pulumi.set(__self__, "fqdns", fqdns) + _setter("fqdns", fqdns) if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) @property @pulumi.getter @@ -6425,8 +8479,27 @@ def __init__(__self__, *, :param str key_vault_secret_id: The ID of the Key Vault, where the secret or certificate is stored. :param str name: The name of the certificate. """ - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) - pulumi.set(__self__, "name", name) + FirewallPolicyTlsCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_secret_id=key_vault_secret_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_secret_id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + if key_vault_secret_id is None: + raise TypeError("Missing 'key_vault_secret_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("key_vault_secret_id", key_vault_secret_id) + _setter("name", name) @property @pulumi.getter(name="keyVaultSecretId") @@ -6481,13 +8554,40 @@ def __init__(__self__, *, :param Sequence[str] public_ip_addresses: The list of public IP addresses associated with the Firewall. :param int public_ip_count: Specifies the number of public IPs to assign to the Firewall. Defaults to `1`. """ - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + FirewallVirtualHub._configure( + lambda key, value: pulumi.set(__self__, key, value), + virtual_hub_id=virtual_hub_id, + private_ip_address=private_ip_address, + public_ip_addresses=public_ip_addresses, + public_ip_count=public_ip_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + virtual_hub_id: Optional[str] = None, + private_ip_address: Optional[str] = None, + public_ip_addresses: Optional[Sequence[str]] = None, + public_ip_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if public_ip_count is None and 'publicIpCount' in kwargs: + public_ip_count = kwargs['publicIpCount'] + + _setter("virtual_hub_id", virtual_hub_id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if public_ip_count is not None: - pulumi.set(__self__, "public_ip_count", public_ip_count) + _setter("public_ip_count", public_ip_count) @property @pulumi.getter(name="virtualHubId") @@ -6552,10 +8652,33 @@ def __init__(__self__, *, :param str bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. :param int peer_weight: The weight added to routes learned from this BGP speaker. """ - pulumi.set(__self__, "asn", asn) - pulumi.set(__self__, "bgp_peering_address", bgp_peering_address) + LocalNetworkGatewayBgpSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + asn=asn, + bgp_peering_address=bgp_peering_address, + peer_weight=peer_weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asn: Optional[int] = None, + bgp_peering_address: Optional[str] = None, + peer_weight: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if asn is None: + raise TypeError("Missing 'asn' argument") + if bgp_peering_address is None and 'bgpPeeringAddress' in kwargs: + bgp_peering_address = kwargs['bgpPeeringAddress'] + if bgp_peering_address is None: + raise TypeError("Missing 'bgp_peering_address' argument") + if peer_weight is None and 'peerWeight' in kwargs: + peer_weight = kwargs['peerWeight'] + + _setter("asn", asn) + _setter("bgp_peering_address", bgp_peering_address) if peer_weight is not None: - pulumi.set(__self__, "peer_weight", peer_weight) + _setter("peer_weight", peer_weight) @property @pulumi.getter @@ -6628,21 +8751,58 @@ def __init__(__self__, *, :param str target_resource_id: The resource ID which is used as the endpoint by the Network Connection Monitor. :param str target_resource_type: The endpoint type of the Network Connection Monitor. Possible values are `AzureSubnet`, `AzureVM`, `AzureVNet`, `ExternalAddress`, `MMAWorkspaceMachine` and `MMAWorkspaceNetwork`. """ - pulumi.set(__self__, "name", name) + NetworkConnectionMonitorEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + address=address, + coverage_level=coverage_level, + excluded_ip_addresses=excluded_ip_addresses, + filter=filter, + included_ip_addresses=included_ip_addresses, + target_resource_id=target_resource_id, + target_resource_type=target_resource_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + address: Optional[str] = None, + coverage_level: Optional[str] = None, + excluded_ip_addresses: Optional[Sequence[str]] = None, + filter: Optional['outputs.NetworkConnectionMonitorEndpointFilter'] = None, + included_ip_addresses: Optional[Sequence[str]] = None, + target_resource_id: Optional[str] = None, + target_resource_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if coverage_level is None and 'coverageLevel' in kwargs: + coverage_level = kwargs['coverageLevel'] + if excluded_ip_addresses is None and 'excludedIpAddresses' in kwargs: + excluded_ip_addresses = kwargs['excludedIpAddresses'] + if included_ip_addresses is None and 'includedIpAddresses' in kwargs: + included_ip_addresses = kwargs['includedIpAddresses'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_type is None and 'targetResourceType' in kwargs: + target_resource_type = kwargs['targetResourceType'] + + _setter("name", name) if address is not None: - pulumi.set(__self__, "address", address) + _setter("address", address) if coverage_level is not None: - pulumi.set(__self__, "coverage_level", coverage_level) + _setter("coverage_level", coverage_level) if excluded_ip_addresses is not None: - pulumi.set(__self__, "excluded_ip_addresses", excluded_ip_addresses) + _setter("excluded_ip_addresses", excluded_ip_addresses) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) if included_ip_addresses is not None: - pulumi.set(__self__, "included_ip_addresses", included_ip_addresses) + _setter("included_ip_addresses", included_ip_addresses) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) if target_resource_type is not None: - pulumi.set(__self__, "target_resource_type", target_resource_type) + _setter("target_resource_type", target_resource_type) @property @pulumi.getter @@ -6718,10 +8878,23 @@ def __init__(__self__, *, :param Sequence['NetworkConnectionMonitorEndpointFilterItemArgs'] items: A `item` block as defined below. :param str type: The behaviour type of this endpoint filter. Currently the only allowed value is `Include`. Defaults to `Include`. """ + NetworkConnectionMonitorEndpointFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + items=items, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + items: Optional[Sequence['outputs.NetworkConnectionMonitorEndpointFilterItem']] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if items is not None: - pulumi.set(__self__, "items", items) + _setter("items", items) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -6749,10 +8922,23 @@ def __init__(__self__, *, :param str address: The address of the filter item. :param str type: The type of items included in the filter. Possible values are `AgentAddress`. Defaults to `AgentAddress`. """ + NetworkConnectionMonitorEndpointFilterItem._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address is not None: - pulumi.set(__self__, "address", address) + _setter("address", address) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -6819,20 +9005,61 @@ def __init__(__self__, *, :param 'NetworkConnectionMonitorTestConfigurationTcpConfigurationArgs' tcp_configuration: A `tcp_configuration` block as defined below. :param int test_frequency_in_seconds: The time interval in seconds at which the test evaluation will happen. Defaults to `60`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + NetworkConnectionMonitorTestConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocol=protocol, + http_configuration=http_configuration, + icmp_configuration=icmp_configuration, + preferred_ip_version=preferred_ip_version, + success_threshold=success_threshold, + tcp_configuration=tcp_configuration, + test_frequency_in_seconds=test_frequency_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + protocol: Optional[str] = None, + http_configuration: Optional['outputs.NetworkConnectionMonitorTestConfigurationHttpConfiguration'] = None, + icmp_configuration: Optional['outputs.NetworkConnectionMonitorTestConfigurationIcmpConfiguration'] = None, + preferred_ip_version: Optional[str] = None, + success_threshold: Optional['outputs.NetworkConnectionMonitorTestConfigurationSuccessThreshold'] = None, + tcp_configuration: Optional['outputs.NetworkConnectionMonitorTestConfigurationTcpConfiguration'] = None, + test_frequency_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if http_configuration is None and 'httpConfiguration' in kwargs: + http_configuration = kwargs['httpConfiguration'] + if icmp_configuration is None and 'icmpConfiguration' in kwargs: + icmp_configuration = kwargs['icmpConfiguration'] + if preferred_ip_version is None and 'preferredIpVersion' in kwargs: + preferred_ip_version = kwargs['preferredIpVersion'] + if success_threshold is None and 'successThreshold' in kwargs: + success_threshold = kwargs['successThreshold'] + if tcp_configuration is None and 'tcpConfiguration' in kwargs: + tcp_configuration = kwargs['tcpConfiguration'] + if test_frequency_in_seconds is None and 'testFrequencyInSeconds' in kwargs: + test_frequency_in_seconds = kwargs['testFrequencyInSeconds'] + + _setter("name", name) + _setter("protocol", protocol) if http_configuration is not None: - pulumi.set(__self__, "http_configuration", http_configuration) + _setter("http_configuration", http_configuration) if icmp_configuration is not None: - pulumi.set(__self__, "icmp_configuration", icmp_configuration) + _setter("icmp_configuration", icmp_configuration) if preferred_ip_version is not None: - pulumi.set(__self__, "preferred_ip_version", preferred_ip_version) + _setter("preferred_ip_version", preferred_ip_version) if success_threshold is not None: - pulumi.set(__self__, "success_threshold", success_threshold) + _setter("success_threshold", success_threshold) if tcp_configuration is not None: - pulumi.set(__self__, "tcp_configuration", tcp_configuration) + _setter("tcp_configuration", tcp_configuration) if test_frequency_in_seconds is not None: - pulumi.set(__self__, "test_frequency_in_seconds", test_frequency_in_seconds) + _setter("test_frequency_in_seconds", test_frequency_in_seconds) @property @pulumi.getter @@ -6937,18 +9164,45 @@ def __init__(__self__, *, :param Sequence['NetworkConnectionMonitorTestConfigurationHttpConfigurationRequestHeaderArgs'] request_headers: A `request_header` block as defined below. :param Sequence[str] valid_status_code_ranges: The HTTP status codes to consider successful. For instance, `2xx`, `301-304` and `418`. """ + NetworkConnectionMonitorTestConfigurationHttpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + method=method, + path=path, + port=port, + prefer_https=prefer_https, + request_headers=request_headers, + valid_status_code_ranges=valid_status_code_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + method: Optional[str] = None, + path: Optional[str] = None, + port: Optional[int] = None, + prefer_https: Optional[bool] = None, + request_headers: Optional[Sequence['outputs.NetworkConnectionMonitorTestConfigurationHttpConfigurationRequestHeader']] = None, + valid_status_code_ranges: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if prefer_https is None and 'preferHttps' in kwargs: + prefer_https = kwargs['preferHttps'] + if request_headers is None and 'requestHeaders' in kwargs: + request_headers = kwargs['requestHeaders'] + if valid_status_code_ranges is None and 'validStatusCodeRanges' in kwargs: + valid_status_code_ranges = kwargs['validStatusCodeRanges'] + if method is not None: - pulumi.set(__self__, "method", method) + _setter("method", method) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if prefer_https is not None: - pulumi.set(__self__, "prefer_https", prefer_https) + _setter("prefer_https", prefer_https) if request_headers is not None: - pulumi.set(__self__, "request_headers", request_headers) + _setter("request_headers", request_headers) if valid_status_code_ranges is not None: - pulumi.set(__self__, "valid_status_code_ranges", valid_status_code_ranges) + _setter("valid_status_code_ranges", valid_status_code_ranges) @property @pulumi.getter @@ -7008,8 +9262,25 @@ def __init__(__self__, *, :param str name: The name of the HTTP header. :param str value: The value of the HTTP header. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + NetworkConnectionMonitorTestConfigurationHttpConfigurationRequestHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -7052,8 +9323,21 @@ def __init__(__self__, *, """ :param bool trace_route_enabled: Should path evaluation with trace route be enabled? Defaults to `true`. """ + NetworkConnectionMonitorTestConfigurationIcmpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + trace_route_enabled=trace_route_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + trace_route_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if trace_route_enabled is None and 'traceRouteEnabled' in kwargs: + trace_route_enabled = kwargs['traceRouteEnabled'] + if trace_route_enabled is not None: - pulumi.set(__self__, "trace_route_enabled", trace_route_enabled) + _setter("trace_route_enabled", trace_route_enabled) @property @pulumi.getter(name="traceRouteEnabled") @@ -7092,10 +9376,27 @@ def __init__(__self__, *, :param int checks_failed_percent: The maximum percentage of failed checks permitted for a test to be successful. :param float round_trip_time_ms: The maximum round-trip time in milliseconds permitted for a test to be successful. """ + NetworkConnectionMonitorTestConfigurationSuccessThreshold._configure( + lambda key, value: pulumi.set(__self__, key, value), + checks_failed_percent=checks_failed_percent, + round_trip_time_ms=round_trip_time_ms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + checks_failed_percent: Optional[int] = None, + round_trip_time_ms: Optional[float] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if checks_failed_percent is None and 'checksFailedPercent' in kwargs: + checks_failed_percent = kwargs['checksFailedPercent'] + if round_trip_time_ms is None and 'roundTripTimeMs' in kwargs: + round_trip_time_ms = kwargs['roundTripTimeMs'] + if checks_failed_percent is not None: - pulumi.set(__self__, "checks_failed_percent", checks_failed_percent) + _setter("checks_failed_percent", checks_failed_percent) if round_trip_time_ms is not None: - pulumi.set(__self__, "round_trip_time_ms", round_trip_time_ms) + _setter("round_trip_time_ms", round_trip_time_ms) @property @pulumi.getter(name="checksFailedPercent") @@ -7144,11 +9445,32 @@ def __init__(__self__, *, :param str destination_port_behavior: The destination port behavior for the TCP connection. Possible values are `None` and `ListenIfAvailable`. :param bool trace_route_enabled: Should path evaluation with trace route be enabled? Defaults to `true`. """ - pulumi.set(__self__, "port", port) + NetworkConnectionMonitorTestConfigurationTcpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + destination_port_behavior=destination_port_behavior, + trace_route_enabled=trace_route_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + destination_port_behavior: Optional[str] = None, + trace_route_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if destination_port_behavior is None and 'destinationPortBehavior' in kwargs: + destination_port_behavior = kwargs['destinationPortBehavior'] + if trace_route_enabled is None and 'traceRouteEnabled' in kwargs: + trace_route_enabled = kwargs['traceRouteEnabled'] + + _setter("port", port) if destination_port_behavior is not None: - pulumi.set(__self__, "destination_port_behavior", destination_port_behavior) + _setter("destination_port_behavior", destination_port_behavior) if trace_route_enabled is not None: - pulumi.set(__self__, "trace_route_enabled", trace_route_enabled) + _setter("trace_route_enabled", trace_route_enabled) @property @pulumi.getter @@ -7211,12 +9533,45 @@ def __init__(__self__, *, :param Sequence[str] test_configuration_names: A list of test configuration names. :param bool enabled: Should the test group be enabled? Defaults to `true`. """ - pulumi.set(__self__, "destination_endpoints", destination_endpoints) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "source_endpoints", source_endpoints) - pulumi.set(__self__, "test_configuration_names", test_configuration_names) + NetworkConnectionMonitorTestGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_endpoints=destination_endpoints, + name=name, + source_endpoints=source_endpoints, + test_configuration_names=test_configuration_names, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_endpoints: Optional[Sequence[str]] = None, + name: Optional[str] = None, + source_endpoints: Optional[Sequence[str]] = None, + test_configuration_names: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_endpoints is None and 'destinationEndpoints' in kwargs: + destination_endpoints = kwargs['destinationEndpoints'] + if destination_endpoints is None: + raise TypeError("Missing 'destination_endpoints' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if source_endpoints is None and 'sourceEndpoints' in kwargs: + source_endpoints = kwargs['sourceEndpoints'] + if source_endpoints is None: + raise TypeError("Missing 'source_endpoints' argument") + if test_configuration_names is None and 'testConfigurationNames' in kwargs: + test_configuration_names = kwargs['testConfigurationNames'] + if test_configuration_names is None: + raise TypeError("Missing 'test_configuration_names' argument") + + _setter("destination_endpoints", destination_endpoints) + _setter("name", name) + _setter("source_endpoints", source_endpoints) + _setter("test_configuration_names", test_configuration_names) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="destinationEndpoints") @@ -7311,20 +9666,61 @@ def __init__(__self__, *, > **Note:** This is required when `private_ip_address_version` is set to `IPv4`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) + NetworkInterfaceIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + private_ip_address_allocation=private_ip_address_allocation, + gateway_load_balancer_frontend_ip_configuration_id=gateway_load_balancer_frontend_ip_configuration_id, + primary=primary, + private_ip_address=private_ip_address, + private_ip_address_version=private_ip_address_version, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + private_ip_address_allocation: Optional[str] = None, + gateway_load_balancer_frontend_ip_configuration_id: Optional[str] = None, + primary: Optional[bool] = None, + private_ip_address: Optional[str] = None, + private_ip_address_version: Optional[str] = None, + public_ip_address_id: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + if private_ip_address_allocation is None: + raise TypeError("Missing 'private_ip_address_allocation' argument") + if gateway_load_balancer_frontend_ip_configuration_id is None and 'gatewayLoadBalancerFrontendIpConfigurationId' in kwargs: + gateway_load_balancer_frontend_ip_configuration_id = kwargs['gatewayLoadBalancerFrontendIpConfigurationId'] + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address_version is None and 'privateIpAddressVersion' in kwargs: + private_ip_address_version = kwargs['privateIpAddressVersion'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + + _setter("name", name) + _setter("private_ip_address_allocation", private_ip_address_allocation) if gateway_load_balancer_frontend_ip_configuration_id is not None: - pulumi.set(__self__, "gateway_load_balancer_frontend_ip_configuration_id", gateway_load_balancer_frontend_ip_configuration_id) + _setter("gateway_load_balancer_frontend_ip_configuration_id", gateway_load_balancer_frontend_ip_configuration_id) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_address_version is not None: - pulumi.set(__self__, "private_ip_address_version", private_ip_address_version) + _setter("private_ip_address_version", private_ip_address_version) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -7423,8 +9819,29 @@ def __init__(__self__, *, :param str address_prefix: Specifies the address prefix. :param str address_prefix_type: Specifies the address prefix type. Possible values are `IPPrefix` and `ServiceTag`. For more information, please see [this document](https://learn.microsoft.com/en-us/azure/virtual-network-manager/concept-security-admins#source-and-destination-types). """ - pulumi.set(__self__, "address_prefix", address_prefix) - pulumi.set(__self__, "address_prefix_type", address_prefix_type) + NetworkManagerAdminRuleDestination._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix=address_prefix, + address_prefix_type=address_prefix_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix: Optional[str] = None, + address_prefix_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix is None and 'addressPrefix' in kwargs: + address_prefix = kwargs['addressPrefix'] + if address_prefix is None: + raise TypeError("Missing 'address_prefix' argument") + if address_prefix_type is None and 'addressPrefixType' in kwargs: + address_prefix_type = kwargs['addressPrefixType'] + if address_prefix_type is None: + raise TypeError("Missing 'address_prefix_type' argument") + + _setter("address_prefix", address_prefix) + _setter("address_prefix_type", address_prefix_type) @property @pulumi.getter(name="addressPrefix") @@ -7471,8 +9888,29 @@ def __init__(__self__, *, :param str address_prefix: Specifies the address prefix. :param str address_prefix_type: Specifies the address prefix type. Possible values are `IPPrefix` and `ServiceTag`. For more information, please see [this document](https://learn.microsoft.com/en-us/azure/virtual-network-manager/concept-security-admins#source-and-destination-types). """ - pulumi.set(__self__, "address_prefix", address_prefix) - pulumi.set(__self__, "address_prefix_type", address_prefix_type) + NetworkManagerAdminRuleSource._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix=address_prefix, + address_prefix_type=address_prefix_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix: Optional[str] = None, + address_prefix_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix is None and 'addressPrefix' in kwargs: + address_prefix = kwargs['addressPrefix'] + if address_prefix is None: + raise TypeError("Missing 'address_prefix' argument") + if address_prefix_type is None and 'addressPrefixType' in kwargs: + address_prefix_type = kwargs['addressPrefixType'] + if address_prefix_type is None: + raise TypeError("Missing 'address_prefix_type' argument") + + _setter("address_prefix", address_prefix) + _setter("address_prefix_type", address_prefix_type) @property @pulumi.getter(name="addressPrefix") @@ -7529,12 +9967,41 @@ def __init__(__self__, *, > **NOTE:** A group can be global only if the `group_connectivity` is `DirectlyConnected`. :param bool use_hub_gateway: Indicates whether the hub gateway is used. Possible values are `true` and `false`. """ - pulumi.set(__self__, "group_connectivity", group_connectivity) - pulumi.set(__self__, "network_group_id", network_group_id) + NetworkManagerConnectivityConfigurationAppliesToGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + group_connectivity=group_connectivity, + network_group_id=network_group_id, + global_mesh_enabled=global_mesh_enabled, + use_hub_gateway=use_hub_gateway, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + group_connectivity: Optional[str] = None, + network_group_id: Optional[str] = None, + global_mesh_enabled: Optional[bool] = None, + use_hub_gateway: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if group_connectivity is None and 'groupConnectivity' in kwargs: + group_connectivity = kwargs['groupConnectivity'] + if group_connectivity is None: + raise TypeError("Missing 'group_connectivity' argument") + if network_group_id is None and 'networkGroupId' in kwargs: + network_group_id = kwargs['networkGroupId'] + if network_group_id is None: + raise TypeError("Missing 'network_group_id' argument") + if global_mesh_enabled is None and 'globalMeshEnabled' in kwargs: + global_mesh_enabled = kwargs['globalMeshEnabled'] + if use_hub_gateway is None and 'useHubGateway' in kwargs: + use_hub_gateway = kwargs['useHubGateway'] + + _setter("group_connectivity", group_connectivity) + _setter("network_group_id", network_group_id) if global_mesh_enabled is not None: - pulumi.set(__self__, "global_mesh_enabled", global_mesh_enabled) + _setter("global_mesh_enabled", global_mesh_enabled) if use_hub_gateway is not None: - pulumi.set(__self__, "use_hub_gateway", use_hub_gateway) + _setter("use_hub_gateway", use_hub_gateway) @property @pulumi.getter(name="groupConnectivity") @@ -7599,8 +10066,29 @@ def __init__(__self__, *, :param str resource_id: Specifies the resource ID used as hub in Hub And Spoke topology. :param str resource_type: Specifies the resource Type used as hub in Hub And Spoke topology. """ - pulumi.set(__self__, "resource_id", resource_id) - pulumi.set(__self__, "resource_type", resource_type) + NetworkManagerConnectivityConfigurationHub._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_id=resource_id, + resource_type=resource_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_id: Optional[str] = None, + resource_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + if resource_type is None and 'resourceType' in kwargs: + resource_type = kwargs['resourceType'] + if resource_type is None: + raise TypeError("Missing 'resource_type' argument") + + _setter("resource_id", resource_id) + _setter("resource_type", resource_type) @property @pulumi.getter(name="resourceId") @@ -7649,12 +10137,31 @@ def __init__(__self__, *, :param Sequence[str] subscriptions: List of subscriptions. :param str tenant_id: Tenant ID. """ + NetworkManagerCrossTenantScope._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_groups=management_groups, + subscriptions=subscriptions, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_groups: Optional[Sequence[str]] = None, + subscriptions: Optional[Sequence[str]] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_groups is None and 'managementGroups' in kwargs: + management_groups = kwargs['managementGroups'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if management_groups is not None: - pulumi.set(__self__, "management_groups", management_groups) + _setter("management_groups", management_groups) if subscriptions is not None: - pulumi.set(__self__, "subscriptions", subscriptions) + _setter("subscriptions", subscriptions) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="managementGroups") @@ -7709,10 +10216,27 @@ def __init__(__self__, *, :param Sequence[str] management_group_ids: A list of management group IDs. :param Sequence[str] subscription_ids: A list of subscription IDs. """ + NetworkManagerScope._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_group_ids=management_group_ids, + subscription_ids=subscription_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_group_ids: Optional[Sequence[str]] = None, + subscription_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_group_ids is None and 'managementGroupIds' in kwargs: + management_group_ids = kwargs['managementGroupIds'] + if subscription_ids is None and 'subscriptionIds' in kwargs: + subscription_ids = kwargs['subscriptionIds'] + if management_group_ids is not None: - pulumi.set(__self__, "management_group_ids", management_group_ids) + _setter("management_group_ids", management_group_ids) if subscription_ids is not None: - pulumi.set(__self__, "subscription_ids", subscription_ids) + _setter("subscription_ids", subscription_ids) @property @pulumi.getter(name="managementGroupIds") @@ -7769,15 +10293,44 @@ def __init__(__self__, *, :param str remote_ip_address: The remote IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported.. Changing this forces a new resource to be created. :param str remote_port: The remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "protocol", protocol) + NetworkPacketCaptureFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + protocol=protocol, + local_ip_address=local_ip_address, + local_port=local_port, + remote_ip_address=remote_ip_address, + remote_port=remote_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + protocol: Optional[str] = None, + local_ip_address: Optional[str] = None, + local_port: Optional[str] = None, + remote_ip_address: Optional[str] = None, + remote_port: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if local_ip_address is None and 'localIpAddress' in kwargs: + local_ip_address = kwargs['localIpAddress'] + if local_port is None and 'localPort' in kwargs: + local_port = kwargs['localPort'] + if remote_ip_address is None and 'remoteIpAddress' in kwargs: + remote_ip_address = kwargs['remoteIpAddress'] + if remote_port is None and 'remotePort' in kwargs: + remote_port = kwargs['remotePort'] + + _setter("protocol", protocol) if local_ip_address is not None: - pulumi.set(__self__, "local_ip_address", local_ip_address) + _setter("local_ip_address", local_ip_address) if local_port is not None: - pulumi.set(__self__, "local_port", local_port) + _setter("local_port", local_port) if remote_ip_address is not None: - pulumi.set(__self__, "remote_ip_address", remote_ip_address) + _setter("remote_ip_address", remote_ip_address) if remote_port is not None: - pulumi.set(__self__, "remote_port", remote_port) + _setter("remote_port", remote_port) @property @pulumi.getter @@ -7854,12 +10407,33 @@ def __init__(__self__, *, > **NOTE:** At least one of `file_path` or `storage_account_id` must be specified. :param str storage_path: The URI of the storage path to save the packet capture. """ + NetworkPacketCaptureStorageLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_path=file_path, + storage_account_id=storage_account_id, + storage_path=storage_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_path: Optional[str] = None, + storage_account_id: Optional[str] = None, + storage_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_path is None and 'filePath' in kwargs: + file_path = kwargs['filePath'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_path is None and 'storagePath' in kwargs: + storage_path = kwargs['storagePath'] + if file_path is not None: - pulumi.set(__self__, "file_path", file_path) + _setter("file_path", file_path) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if storage_path is not None: - pulumi.set(__self__, "storage_path", storage_path) + _setter("storage_path", storage_path) @property @pulumi.getter(name="filePath") @@ -7960,33 +10534,104 @@ def __init__(__self__, *, :param str source_port_range: Source Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `source_port_ranges` is not specified. :param Sequence[str] source_port_ranges: List of source ports or port ranges. This is required if `source_port_range` is not specified. """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "protocol", protocol) + NetworkSecurityGroupSecurityRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + direction=direction, + name=name, + priority=priority, + protocol=protocol, + description=description, + destination_address_prefix=destination_address_prefix, + destination_address_prefixes=destination_address_prefixes, + destination_application_security_group_ids=destination_application_security_group_ids, + destination_port_range=destination_port_range, + destination_port_ranges=destination_port_ranges, + source_address_prefix=source_address_prefix, + source_address_prefixes=source_address_prefixes, + source_application_security_group_ids=source_application_security_group_ids, + source_port_range=source_port_range, + source_port_ranges=source_port_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[str] = None, + direction: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + protocol: Optional[str] = None, + description: Optional[str] = None, + destination_address_prefix: Optional[str] = None, + destination_address_prefixes: Optional[Sequence[str]] = None, + destination_application_security_group_ids: Optional[Sequence[str]] = None, + destination_port_range: Optional[str] = None, + destination_port_ranges: Optional[Sequence[str]] = None, + source_address_prefix: Optional[str] = None, + source_address_prefixes: Optional[Sequence[str]] = None, + source_application_security_group_ids: Optional[Sequence[str]] = None, + source_port_range: Optional[str] = None, + source_port_ranges: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if destination_address_prefix is None and 'destinationAddressPrefix' in kwargs: + destination_address_prefix = kwargs['destinationAddressPrefix'] + if destination_address_prefixes is None and 'destinationAddressPrefixes' in kwargs: + destination_address_prefixes = kwargs['destinationAddressPrefixes'] + if destination_application_security_group_ids is None and 'destinationApplicationSecurityGroupIds' in kwargs: + destination_application_security_group_ids = kwargs['destinationApplicationSecurityGroupIds'] + if destination_port_range is None and 'destinationPortRange' in kwargs: + destination_port_range = kwargs['destinationPortRange'] + if destination_port_ranges is None and 'destinationPortRanges' in kwargs: + destination_port_ranges = kwargs['destinationPortRanges'] + if source_address_prefix is None and 'sourceAddressPrefix' in kwargs: + source_address_prefix = kwargs['sourceAddressPrefix'] + if source_address_prefixes is None and 'sourceAddressPrefixes' in kwargs: + source_address_prefixes = kwargs['sourceAddressPrefixes'] + if source_application_security_group_ids is None and 'sourceApplicationSecurityGroupIds' in kwargs: + source_application_security_group_ids = kwargs['sourceApplicationSecurityGroupIds'] + if source_port_range is None and 'sourcePortRange' in kwargs: + source_port_range = kwargs['sourcePortRange'] + if source_port_ranges is None and 'sourcePortRanges' in kwargs: + source_port_ranges = kwargs['sourcePortRanges'] + + _setter("access", access) + _setter("direction", direction) + _setter("name", name) + _setter("priority", priority) + _setter("protocol", protocol) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination_address_prefix is not None: - pulumi.set(__self__, "destination_address_prefix", destination_address_prefix) + _setter("destination_address_prefix", destination_address_prefix) if destination_address_prefixes is not None: - pulumi.set(__self__, "destination_address_prefixes", destination_address_prefixes) + _setter("destination_address_prefixes", destination_address_prefixes) if destination_application_security_group_ids is not None: - pulumi.set(__self__, "destination_application_security_group_ids", destination_application_security_group_ids) + _setter("destination_application_security_group_ids", destination_application_security_group_ids) if destination_port_range is not None: - pulumi.set(__self__, "destination_port_range", destination_port_range) + _setter("destination_port_range", destination_port_range) if destination_port_ranges is not None: - pulumi.set(__self__, "destination_port_ranges", destination_port_ranges) + _setter("destination_port_ranges", destination_port_ranges) if source_address_prefix is not None: - pulumi.set(__self__, "source_address_prefix", source_address_prefix) + _setter("source_address_prefix", source_address_prefix) if source_address_prefixes is not None: - pulumi.set(__self__, "source_address_prefixes", source_address_prefixes) + _setter("source_address_prefixes", source_address_prefixes) if source_application_security_group_ids is not None: - pulumi.set(__self__, "source_application_security_group_ids", source_application_security_group_ids) + _setter("source_application_security_group_ids", source_application_security_group_ids) if source_port_range is not None: - pulumi.set(__self__, "source_port_range", source_port_range) + _setter("source_port_range", source_port_range) if source_port_ranges is not None: - pulumi.set(__self__, "source_port_ranges", source_port_ranges) + _setter("source_port_ranges", source_port_ranges) @property @pulumi.getter @@ -8126,8 +10771,25 @@ def __init__(__self__, *, :param int days: The number of days to retain flow log records. :param bool enabled: Boolean flag to enable/disable retention. """ - pulumi.set(__self__, "days", days) - pulumi.set(__self__, "enabled", enabled) + NetworkWatcherFlowLogRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[int] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("days", days) + _setter("enabled", enabled) @property @pulumi.getter @@ -8184,12 +10846,47 @@ def __init__(__self__, *, :param str workspace_resource_id: The resource ID of the attached workspace. :param int interval_in_minutes: How frequently service should do flow analytics in minutes. Defaults to `60`. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "workspace_id", workspace_id) - pulumi.set(__self__, "workspace_region", workspace_region) - pulumi.set(__self__, "workspace_resource_id", workspace_resource_id) + NetworkWatcherFlowLogTrafficAnalytics._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + workspace_id=workspace_id, + workspace_region=workspace_region, + workspace_resource_id=workspace_resource_id, + interval_in_minutes=interval_in_minutes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + workspace_id: Optional[str] = None, + workspace_region: Optional[str] = None, + workspace_resource_id: Optional[str] = None, + interval_in_minutes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if workspace_region is None and 'workspaceRegion' in kwargs: + workspace_region = kwargs['workspaceRegion'] + if workspace_region is None: + raise TypeError("Missing 'workspace_region' argument") + if workspace_resource_id is None and 'workspaceResourceId' in kwargs: + workspace_resource_id = kwargs['workspaceResourceId'] + if workspace_resource_id is None: + raise TypeError("Missing 'workspace_resource_id' argument") + if interval_in_minutes is None and 'intervalInMinutes' in kwargs: + interval_in_minutes = kwargs['intervalInMinutes'] + + _setter("enabled", enabled) + _setter("workspace_id", workspace_id) + _setter("workspace_region", workspace_region) + _setter("workspace_resource_id", workspace_resource_id) if interval_in_minutes is not None: - pulumi.set(__self__, "interval_in_minutes", interval_in_minutes) + _setter("interval_in_minutes", interval_in_minutes) @property @pulumi.getter @@ -8264,12 +10961,37 @@ def __init__(__self__, *, :param bool internet_security_enabled: Should Internet Security be enabled to secure internet traffic? Changing this forces a new resource to be created. Defaults to `false`. :param 'PointToPointVpnGatewayConnectionConfigurationRouteArgs' route: A `route` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "vpn_client_address_pool", vpn_client_address_pool) + PointToPointVpnGatewayConnectionConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + vpn_client_address_pool=vpn_client_address_pool, + internet_security_enabled=internet_security_enabled, + route=route, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + vpn_client_address_pool: Optional['outputs.PointToPointVpnGatewayConnectionConfigurationVpnClientAddressPool'] = None, + internet_security_enabled: Optional[bool] = None, + route: Optional['outputs.PointToPointVpnGatewayConnectionConfigurationRoute'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if vpn_client_address_pool is None and 'vpnClientAddressPool' in kwargs: + vpn_client_address_pool = kwargs['vpnClientAddressPool'] + if vpn_client_address_pool is None: + raise TypeError("Missing 'vpn_client_address_pool' argument") + if internet_security_enabled is None and 'internetSecurityEnabled' in kwargs: + internet_security_enabled = kwargs['internetSecurityEnabled'] + + _setter("name", name) + _setter("vpn_client_address_pool", vpn_client_address_pool) if internet_security_enabled is not None: - pulumi.set(__self__, "internet_security_enabled", internet_security_enabled) + _setter("internet_security_enabled", internet_security_enabled) if route is not None: - pulumi.set(__self__, "route", route) + _setter("route", route) @property @pulumi.getter @@ -8340,13 +11062,40 @@ def __init__(__self__, *, :param str outbound_route_map_id: The resource ID of the Route Map associated with this Routing Configuration for outbound advertised routes. :param 'PointToPointVpnGatewayConnectionConfigurationRoutePropagatedRouteTableArgs' propagated_route_table: A `propagated_route_table` block as defined below. """ - pulumi.set(__self__, "associated_route_table_id", associated_route_table_id) + PointToPointVpnGatewayConnectionConfigurationRoute._configure( + lambda key, value: pulumi.set(__self__, key, value), + associated_route_table_id=associated_route_table_id, + inbound_route_map_id=inbound_route_map_id, + outbound_route_map_id=outbound_route_map_id, + propagated_route_table=propagated_route_table, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + associated_route_table_id: Optional[str] = None, + inbound_route_map_id: Optional[str] = None, + outbound_route_map_id: Optional[str] = None, + propagated_route_table: Optional['outputs.PointToPointVpnGatewayConnectionConfigurationRoutePropagatedRouteTable'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if associated_route_table_id is None and 'associatedRouteTableId' in kwargs: + associated_route_table_id = kwargs['associatedRouteTableId'] + if associated_route_table_id is None: + raise TypeError("Missing 'associated_route_table_id' argument") + if inbound_route_map_id is None and 'inboundRouteMapId' in kwargs: + inbound_route_map_id = kwargs['inboundRouteMapId'] + if outbound_route_map_id is None and 'outboundRouteMapId' in kwargs: + outbound_route_map_id = kwargs['outboundRouteMapId'] + if propagated_route_table is None and 'propagatedRouteTable' in kwargs: + propagated_route_table = kwargs['propagatedRouteTable'] + + _setter("associated_route_table_id", associated_route_table_id) if inbound_route_map_id is not None: - pulumi.set(__self__, "inbound_route_map_id", inbound_route_map_id) + _setter("inbound_route_map_id", inbound_route_map_id) if outbound_route_map_id is not None: - pulumi.set(__self__, "outbound_route_map_id", outbound_route_map_id) + _setter("outbound_route_map_id", outbound_route_map_id) if propagated_route_table is not None: - pulumi.set(__self__, "propagated_route_table", propagated_route_table) + _setter("propagated_route_table", propagated_route_table) @property @pulumi.getter(name="associatedRouteTableId") @@ -8390,9 +11139,24 @@ def __init__(__self__, *, :param Sequence[str] ids: The list of Virtual Hub Route Table resource id which the routes will be propagated to. :param Sequence[str] labels: The list of labels to logically group Virtual Hub Route Tables which the routes will be propagated to. """ - pulumi.set(__self__, "ids", ids) + PointToPointVpnGatewayConnectionConfigurationRoutePropagatedRouteTable._configure( + lambda key, value: pulumi.set(__self__, key, value), + ids=ids, + labels=labels, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ids: Optional[Sequence[str]] = None, + labels: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ids is None: + raise TypeError("Missing 'ids' argument") + + _setter("ids", ids) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) @property @pulumi.getter @@ -8435,7 +11199,22 @@ def __init__(__self__, *, """ :param Sequence[str] address_prefixes: A list of CIDR Ranges which should be used as Address Prefixes. """ - pulumi.set(__self__, "address_prefixes", address_prefixes) + PointToPointVpnGatewayConnectionConfigurationVpnClientAddressPool._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefixes=address_prefixes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefixes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefixes is None and 'addressPrefixes' in kwargs: + address_prefixes = kwargs['addressPrefixes'] + if address_prefixes is None: + raise TypeError("Missing 'address_prefixes' argument") + + _setter("address_prefixes", address_prefixes) @property @pulumi.getter(name="addressPrefixes") @@ -8472,8 +11251,27 @@ def __init__(__self__, *, :param Sequence['ProfileContainerNetworkInterfaceIpConfigurationArgs'] ip_configurations: One or more `ip_configuration` blocks as documented below. :param str name: Specifies the name of the IP Configuration. """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) + ProfileContainerNetworkInterface._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[Sequence['outputs.ProfileContainerNetworkInterfaceIpConfiguration']] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("ip_configurations", ip_configurations) + _setter("name", name) @property @pulumi.getter(name="ipConfigurations") @@ -8518,8 +11316,27 @@ def __init__(__self__, *, :param str name: Specifies the name of the IP Configuration. :param str subnet_id: Reference to the subnet associated with the IP Configuration. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "subnet_id", subnet_id) + ProfileContainerNetworkInterfaceIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("name", name) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -8568,10 +11385,37 @@ def __init__(__self__, *, :param str name: The name of the route filter rule. :param str rule_type: The rule type of the rule. The only possible value is `Community`. """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "communities", communities) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "rule_type", rule_type) + RouteFilterRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + communities=communities, + name=name, + rule_type=rule_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[str] = None, + communities: Optional[Sequence[str]] = None, + name: Optional[str] = None, + rule_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if communities is None: + raise TypeError("Missing 'communities' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if rule_type is None and 'ruleType' in kwargs: + rule_type = kwargs['ruleType'] + if rule_type is None: + raise TypeError("Missing 'rule_type' argument") + + _setter("access", access) + _setter("communities", communities) + _setter("name", name) + _setter("rule_type", rule_type) @property @pulumi.getter @@ -8638,13 +11482,36 @@ def __init__(__self__, *, :param Sequence['RouteMapRuleMatchCriterionArgs'] match_criterions: A `match_criterion` block as defined below. :param str next_step_if_matched: The next step after the rule is evaluated. Possible values are `Continue`, `Terminate` and `Unknown`. Defaults to `Unknown`. """ - pulumi.set(__self__, "name", name) + RouteMapRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + actions=actions, + match_criterions=match_criterions, + next_step_if_matched=next_step_if_matched, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + actions: Optional[Sequence['outputs.RouteMapRuleAction']] = None, + match_criterions: Optional[Sequence['outputs.RouteMapRuleMatchCriterion']] = None, + next_step_if_matched: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if match_criterions is None and 'matchCriterions' in kwargs: + match_criterions = kwargs['matchCriterions'] + if next_step_if_matched is None and 'nextStepIfMatched' in kwargs: + next_step_if_matched = kwargs['nextStepIfMatched'] + + _setter("name", name) if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if match_criterions is not None: - pulumi.set(__self__, "match_criterions", match_criterions) + _setter("match_criterions", match_criterions) if next_step_if_matched is not None: - pulumi.set(__self__, "next_step_if_matched", next_step_if_matched) + _setter("next_step_if_matched", next_step_if_matched) @property @pulumi.getter @@ -8688,8 +11555,25 @@ def __init__(__self__, *, :param Sequence['RouteMapRuleActionParameterArgs'] parameters: A `parameter` block as defined below. :param str type: The type of the action to be taken. Possible values are `Add`, `Drop`, `Remove`, `Replace` and `Unknown`. """ - pulumi.set(__self__, "parameters", parameters) - pulumi.set(__self__, "type", type) + RouteMapRuleAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + parameters=parameters, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + parameters: Optional[Sequence['outputs.RouteMapRuleActionParameter']] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parameters is None: + raise TypeError("Missing 'parameters' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("parameters", parameters) + _setter("type", type) @property @pulumi.getter @@ -8738,12 +11622,31 @@ def __init__(__self__, *, :param Sequence[str] communities: A list of BGP communities. :param Sequence[str] route_prefixes: A list of route prefixes. """ + RouteMapRuleActionParameter._configure( + lambda key, value: pulumi.set(__self__, key, value), + as_paths=as_paths, + communities=communities, + route_prefixes=route_prefixes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + as_paths: Optional[Sequence[str]] = None, + communities: Optional[Sequence[str]] = None, + route_prefixes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if as_paths is None and 'asPaths' in kwargs: + as_paths = kwargs['asPaths'] + if route_prefixes is None and 'routePrefixes' in kwargs: + route_prefixes = kwargs['routePrefixes'] + if as_paths is not None: - pulumi.set(__self__, "as_paths", as_paths) + _setter("as_paths", as_paths) if communities is not None: - pulumi.set(__self__, "communities", communities) + _setter("communities", communities) if route_prefixes is not None: - pulumi.set(__self__, "route_prefixes", route_prefixes) + _setter("route_prefixes", route_prefixes) @property @pulumi.getter(name="asPaths") @@ -8804,13 +11707,38 @@ def __init__(__self__, *, :param Sequence[str] communities: A list of BGP communities which this criterion matches. :param Sequence[str] route_prefixes: A list of route prefixes which this criterion matches. """ - pulumi.set(__self__, "match_condition", match_condition) + RouteMapRuleMatchCriterion._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_condition=match_condition, + as_paths=as_paths, + communities=communities, + route_prefixes=route_prefixes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_condition: Optional[str] = None, + as_paths: Optional[Sequence[str]] = None, + communities: Optional[Sequence[str]] = None, + route_prefixes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_condition is None and 'matchCondition' in kwargs: + match_condition = kwargs['matchCondition'] + if match_condition is None: + raise TypeError("Missing 'match_condition' argument") + if as_paths is None and 'asPaths' in kwargs: + as_paths = kwargs['asPaths'] + if route_prefixes is None and 'routePrefixes' in kwargs: + route_prefixes = kwargs['routePrefixes'] + + _setter("match_condition", match_condition) if as_paths is not None: - pulumi.set(__self__, "as_paths", as_paths) + _setter("as_paths", as_paths) if communities is not None: - pulumi.set(__self__, "communities", communities) + _setter("communities", communities) if route_prefixes is not None: - pulumi.set(__self__, "route_prefixes", route_prefixes) + _setter("route_prefixes", route_prefixes) @property @pulumi.getter(name="matchCondition") @@ -8879,11 +11807,40 @@ def __init__(__self__, *, :param str next_hop_type: The type of Azure hop the packet should be sent to. Possible values are `VirtualNetworkGateway`, `VnetLocal`, `Internet`, `VirtualAppliance` and `None`. :param str next_hop_in_ip_address: Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is `VirtualAppliance`. """ - pulumi.set(__self__, "address_prefix", address_prefix) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "next_hop_type", next_hop_type) + RouteTableRoute._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix=address_prefix, + name=name, + next_hop_type=next_hop_type, + next_hop_in_ip_address=next_hop_in_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix: Optional[str] = None, + name: Optional[str] = None, + next_hop_type: Optional[str] = None, + next_hop_in_ip_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix is None and 'addressPrefix' in kwargs: + address_prefix = kwargs['addressPrefix'] + if address_prefix is None: + raise TypeError("Missing 'address_prefix' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if next_hop_type is None and 'nextHopType' in kwargs: + next_hop_type = kwargs['nextHopType'] + if next_hop_type is None: + raise TypeError("Missing 'next_hop_type' argument") + if next_hop_in_ip_address is None and 'nextHopInIpAddress' in kwargs: + next_hop_in_ip_address = kwargs['nextHopInIpAddress'] + + _setter("address_prefix", address_prefix) + _setter("name", name) + _setter("next_hop_type", next_hop_type) if next_hop_in_ip_address is not None: - pulumi.set(__self__, "next_hop_in_ip_address", next_hop_in_ip_address) + _setter("next_hop_in_ip_address", next_hop_in_ip_address) @property @pulumi.getter(name="addressPrefix") @@ -8946,9 +11903,32 @@ def __init__(__self__, *, :param str name: The unique name for the routing policy. :param str next_hop: The resource ID of the next hop on which this routing policy is applicable to. """ - pulumi.set(__self__, "destinations", destinations) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "next_hop", next_hop) + RoutingIntentRoutingPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + destinations=destinations, + name=name, + next_hop=next_hop, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destinations: Optional[Sequence[str]] = None, + name: Optional[str] = None, + next_hop: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destinations is None: + raise TypeError("Missing 'destinations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if next_hop is None and 'nextHop' in kwargs: + next_hop = kwargs['nextHop'] + if next_hop is None: + raise TypeError("Missing 'next_hop' argument") + + _setter("destinations", destinations) + _setter("name", name) + _setter("next_hop", next_hop) @property @pulumi.getter @@ -9001,8 +11981,27 @@ def __init__(__self__, *, :param str name: A name for this delegation. :param 'SubnetDelegationServiceDelegationArgs' service_delegation: A `service_delegation` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "service_delegation", service_delegation) + SubnetDelegation._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + service_delegation=service_delegation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + service_delegation: Optional['outputs.SubnetDelegationServiceDelegation'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if service_delegation is None and 'serviceDelegation' in kwargs: + service_delegation = kwargs['serviceDelegation'] + if service_delegation is None: + raise TypeError("Missing 'service_delegation' argument") + + _setter("name", name) + _setter("service_delegation", service_delegation) @property @pulumi.getter @@ -9032,9 +12031,24 @@ def __init__(__self__, *, > **NOTE:** Azure may add default actions depending on the service delegation name and they can't be changed. """ - pulumi.set(__self__, "name", name) + SubnetDelegationServiceDelegation._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + actions=actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + actions: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) @property @pulumi.getter @@ -9087,12 +12101,35 @@ def __init__(__self__, *, :param str description: The description of this Subnet Service Endpoint Storage Policy Definition. :param str service: The type of service resources. Valid values are `Microsoft.Storage` or `Global`. When the `service_resources` property contains resource IDs, this property must be `Microsoft.Storage`. When the `service_resources` property contains Aliases, this property must be `Global`. Defaults to `Microsoft.Storage`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "service_resources", service_resources) + SubnetServiceEndpointStoragePolicyDefinition._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + service_resources=service_resources, + description=description, + service=service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + service_resources: Optional[Sequence[str]] = None, + description: Optional[str] = None, + service: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if service_resources is None and 'serviceResources' in kwargs: + service_resources = kwargs['serviceResources'] + if service_resources is None: + raise TypeError("Missing 'service_resources' argument") + + _setter("name", name) + _setter("service_resources", service_resources) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if service is not None: - pulumi.set(__self__, "service", service) + _setter("service", service) @property @pulumi.getter @@ -9138,8 +12175,25 @@ def __init__(__self__, *, :param str name: The name of the custom header. :param str value: The value of custom header. Applicable for HTTP and HTTPS protocol. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + TrafficManagerAzureEndpointCustomHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -9169,11 +12223,28 @@ def __init__(__self__, *, :param str last: The last IP Address in this subnet. :param int scope: The block size (number of leading bits in the subnet mask). """ - pulumi.set(__self__, "first", first) + TrafficManagerAzureEndpointSubnet._configure( + lambda key, value: pulumi.set(__self__, key, value), + first=first, + last=last, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + first: Optional[str] = None, + last: Optional[str] = None, + scope: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if first is None: + raise TypeError("Missing 'first' argument") + + _setter("first", first) if last is not None: - pulumi.set(__self__, "last", last) + _setter("last", last) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter @@ -9209,8 +12280,25 @@ def __init__(__self__, *, :param str name: The name of the custom header. :param str value: The value of custom header. Applicable for HTTP and HTTPS protocol. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + TrafficManagerExternalEndpointCustomHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -9240,11 +12328,28 @@ def __init__(__self__, *, :param str last: The last IP Address in this subnet. :param int scope: The block size (number of leading bits in the subnet mask). """ - pulumi.set(__self__, "first", first) + TrafficManagerExternalEndpointSubnet._configure( + lambda key, value: pulumi.set(__self__, key, value), + first=first, + last=last, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + first: Optional[str] = None, + last: Optional[str] = None, + scope: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if first is None: + raise TypeError("Missing 'first' argument") + + _setter("first", first) if last is not None: - pulumi.set(__self__, "last", last) + _setter("last", last) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter @@ -9280,8 +12385,25 @@ def __init__(__self__, *, :param str name: The name of the custom header. :param str value: The value of custom header. Applicable for HTTP and HTTPS protocol. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + TrafficManagerNestedEndpointCustomHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -9311,11 +12433,28 @@ def __init__(__self__, *, :param str last: The last IP Address in this subnet. :param int scope: The block size (number of leading bits in the subnet mask). """ - pulumi.set(__self__, "first", first) + TrafficManagerNestedEndpointSubnet._configure( + lambda key, value: pulumi.set(__self__, key, value), + first=first, + last=last, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + first: Optional[str] = None, + last: Optional[str] = None, + scope: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if first is None: + raise TypeError("Missing 'first' argument") + + _setter("first", first) if last is not None: - pulumi.set(__self__, "last", last) + _setter("last", last) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter @@ -9368,8 +12507,27 @@ def __init__(__self__, *, :param str relative_name: The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created. :param int ttl: The TTL value of the Profile used by Local DNS resolvers and clients. """ - pulumi.set(__self__, "relative_name", relative_name) - pulumi.set(__self__, "ttl", ttl) + TrafficManagerProfileDnsConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + relative_name=relative_name, + ttl=ttl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + relative_name: Optional[str] = None, + ttl: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if relative_name is None and 'relativeName' in kwargs: + relative_name = kwargs['relativeName'] + if relative_name is None: + raise TypeError("Missing 'relative_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + + _setter("relative_name", relative_name) + _setter("ttl", ttl) @property @pulumi.getter(name="relativeName") @@ -9434,20 +12592,59 @@ def __init__(__self__, *, :param int timeout_in_seconds: The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If `interval_in_seconds` is set to `30`, then `timeout_in_seconds` can be between `5` and `10`. The default value is `10`. If `interval_in_seconds` is set to `10`, then valid values are between `5` and `9` and `timeout_in_seconds` is required. :param int tolerated_number_of_failures: The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between `0` and `9`. The default value is `3` """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "protocol", protocol) + TrafficManagerProfileMonitorConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + protocol=protocol, + custom_headers=custom_headers, + expected_status_code_ranges=expected_status_code_ranges, + interval_in_seconds=interval_in_seconds, + path=path, + timeout_in_seconds=timeout_in_seconds, + tolerated_number_of_failures=tolerated_number_of_failures, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + protocol: Optional[str] = None, + custom_headers: Optional[Sequence['outputs.TrafficManagerProfileMonitorConfigCustomHeader']] = None, + expected_status_code_ranges: Optional[Sequence[str]] = None, + interval_in_seconds: Optional[int] = None, + path: Optional[str] = None, + timeout_in_seconds: Optional[int] = None, + tolerated_number_of_failures: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + if expected_status_code_ranges is None and 'expectedStatusCodeRanges' in kwargs: + expected_status_code_ranges = kwargs['expectedStatusCodeRanges'] + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + if tolerated_number_of_failures is None and 'toleratedNumberOfFailures' in kwargs: + tolerated_number_of_failures = kwargs['toleratedNumberOfFailures'] + + _setter("port", port) + _setter("protocol", protocol) if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if expected_status_code_ranges is not None: - pulumi.set(__self__, "expected_status_code_ranges", expected_status_code_ranges) + _setter("expected_status_code_ranges", expected_status_code_ranges) if interval_in_seconds is not None: - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) + _setter("interval_in_seconds", interval_in_seconds) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) if tolerated_number_of_failures is not None: - pulumi.set(__self__, "tolerated_number_of_failures", tolerated_number_of_failures) + _setter("tolerated_number_of_failures", tolerated_number_of_failures) @property @pulumi.getter @@ -9523,8 +12720,25 @@ def __init__(__self__, *, :param str name: The name of the custom header. :param str value: The value of custom header. Applicable for HTTP and HTTPS protocol. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + TrafficManagerProfileMonitorConfigCustomHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -9587,18 +12801,51 @@ def __init__(__self__, *, :param str static_vnet_local_route_override_criteria: The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet. Possible values are `Contains` and `Equal`. Defaults to `Contains`. Changing this forces a new resource to be created. :param Sequence['VirtualHubConnectionRoutingStaticVnetRouteArgs'] static_vnet_routes: A `static_vnet_route` block as defined below. """ + VirtualHubConnectionRouting._configure( + lambda key, value: pulumi.set(__self__, key, value), + associated_route_table_id=associated_route_table_id, + inbound_route_map_id=inbound_route_map_id, + outbound_route_map_id=outbound_route_map_id, + propagated_route_table=propagated_route_table, + static_vnet_local_route_override_criteria=static_vnet_local_route_override_criteria, + static_vnet_routes=static_vnet_routes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + associated_route_table_id: Optional[str] = None, + inbound_route_map_id: Optional[str] = None, + outbound_route_map_id: Optional[str] = None, + propagated_route_table: Optional['outputs.VirtualHubConnectionRoutingPropagatedRouteTable'] = None, + static_vnet_local_route_override_criteria: Optional[str] = None, + static_vnet_routes: Optional[Sequence['outputs.VirtualHubConnectionRoutingStaticVnetRoute']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if associated_route_table_id is None and 'associatedRouteTableId' in kwargs: + associated_route_table_id = kwargs['associatedRouteTableId'] + if inbound_route_map_id is None and 'inboundRouteMapId' in kwargs: + inbound_route_map_id = kwargs['inboundRouteMapId'] + if outbound_route_map_id is None and 'outboundRouteMapId' in kwargs: + outbound_route_map_id = kwargs['outboundRouteMapId'] + if propagated_route_table is None and 'propagatedRouteTable' in kwargs: + propagated_route_table = kwargs['propagatedRouteTable'] + if static_vnet_local_route_override_criteria is None and 'staticVnetLocalRouteOverrideCriteria' in kwargs: + static_vnet_local_route_override_criteria = kwargs['staticVnetLocalRouteOverrideCriteria'] + if static_vnet_routes is None and 'staticVnetRoutes' in kwargs: + static_vnet_routes = kwargs['staticVnetRoutes'] + if associated_route_table_id is not None: - pulumi.set(__self__, "associated_route_table_id", associated_route_table_id) + _setter("associated_route_table_id", associated_route_table_id) if inbound_route_map_id is not None: - pulumi.set(__self__, "inbound_route_map_id", inbound_route_map_id) + _setter("inbound_route_map_id", inbound_route_map_id) if outbound_route_map_id is not None: - pulumi.set(__self__, "outbound_route_map_id", outbound_route_map_id) + _setter("outbound_route_map_id", outbound_route_map_id) if propagated_route_table is not None: - pulumi.set(__self__, "propagated_route_table", propagated_route_table) + _setter("propagated_route_table", propagated_route_table) if static_vnet_local_route_override_criteria is not None: - pulumi.set(__self__, "static_vnet_local_route_override_criteria", static_vnet_local_route_override_criteria) + _setter("static_vnet_local_route_override_criteria", static_vnet_local_route_override_criteria) if static_vnet_routes is not None: - pulumi.set(__self__, "static_vnet_routes", static_vnet_routes) + _setter("static_vnet_routes", static_vnet_routes) @property @pulumi.getter(name="associatedRouteTableId") @@ -9675,10 +12922,25 @@ def __init__(__self__, *, :param Sequence[str] labels: The list of labels to assign to this route table. :param Sequence[str] route_table_ids: A list of Route Table IDs to associated with this Virtual Hub Connection. """ + VirtualHubConnectionRoutingPropagatedRouteTable._configure( + lambda key, value: pulumi.set(__self__, key, value), + labels=labels, + route_table_ids=route_table_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + labels: Optional[Sequence[str]] = None, + route_table_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if route_table_ids is None and 'routeTableIds' in kwargs: + route_table_ids = kwargs['routeTableIds'] + if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if route_table_ids is not None: - pulumi.set(__self__, "route_table_ids", route_table_ids) + _setter("route_table_ids", route_table_ids) @property @pulumi.getter @@ -9727,12 +12989,31 @@ def __init__(__self__, *, :param str name: The name which should be used for this Static Route. :param str next_hop_ip_address: The IP Address which should be used for the Next Hop. """ + VirtualHubConnectionRoutingStaticVnetRoute._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefixes=address_prefixes, + name=name, + next_hop_ip_address=next_hop_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefixes: Optional[Sequence[str]] = None, + name: Optional[str] = None, + next_hop_ip_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefixes is None and 'addressPrefixes' in kwargs: + address_prefixes = kwargs['addressPrefixes'] + if next_hop_ip_address is None and 'nextHopIpAddress' in kwargs: + next_hop_ip_address = kwargs['nextHopIpAddress'] + if address_prefixes is not None: - pulumi.set(__self__, "address_prefixes", address_prefixes) + _setter("address_prefixes", address_prefixes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if next_hop_ip_address is not None: - pulumi.set(__self__, "next_hop_ip_address", next_hop_ip_address) + _setter("next_hop_ip_address", next_hop_ip_address) @property @pulumi.getter(name="addressPrefixes") @@ -9787,8 +13068,29 @@ def __init__(__self__, *, :param Sequence[str] address_prefixes: A list of Address Prefixes. :param str next_hop_ip_address: The IP Address that Packets should be forwarded to as the Next Hop. """ - pulumi.set(__self__, "address_prefixes", address_prefixes) - pulumi.set(__self__, "next_hop_ip_address", next_hop_ip_address) + VirtualHubRoute._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefixes=address_prefixes, + next_hop_ip_address=next_hop_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefixes: Optional[Sequence[str]] = None, + next_hop_ip_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefixes is None and 'addressPrefixes' in kwargs: + address_prefixes = kwargs['addressPrefixes'] + if address_prefixes is None: + raise TypeError("Missing 'address_prefixes' argument") + if next_hop_ip_address is None and 'nextHopIpAddress' in kwargs: + next_hop_ip_address = kwargs['nextHopIpAddress'] + if next_hop_ip_address is None: + raise TypeError("Missing 'next_hop_ip_address' argument") + + _setter("address_prefixes", address_prefixes) + _setter("next_hop_ip_address", next_hop_ip_address) @property @pulumi.getter(name="addressPrefixes") @@ -9845,12 +13147,45 @@ def __init__(__self__, *, > **Note:** The Routes can alternatively be created using the virtual_hub_route_table_route resource. Using both inline and external routes is not supported and may result in unexpected configuration. """ - pulumi.set(__self__, "destinations", destinations) - pulumi.set(__self__, "destinations_type", destinations_type) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "next_hop", next_hop) + VirtualHubRouteTableRoute._configure( + lambda key, value: pulumi.set(__self__, key, value), + destinations=destinations, + destinations_type=destinations_type, + name=name, + next_hop=next_hop, + next_hop_type=next_hop_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destinations: Optional[Sequence[str]] = None, + destinations_type: Optional[str] = None, + name: Optional[str] = None, + next_hop: Optional[str] = None, + next_hop_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destinations is None: + raise TypeError("Missing 'destinations' argument") + if destinations_type is None and 'destinationsType' in kwargs: + destinations_type = kwargs['destinationsType'] + if destinations_type is None: + raise TypeError("Missing 'destinations_type' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if next_hop is None and 'nextHop' in kwargs: + next_hop = kwargs['nextHop'] + if next_hop is None: + raise TypeError("Missing 'next_hop' argument") + if next_hop_type is None and 'nextHopType' in kwargs: + next_hop_type = kwargs['nextHopType'] + + _setter("destinations", destinations) + _setter("destinations_type", destinations_type) + _setter("name", name) + _setter("next_hop", next_hop) if next_hop_type is not None: - pulumi.set(__self__, "next_hop_type", next_hop_type) + _setter("next_hop_type", next_hop_type) @property @pulumi.getter @@ -9904,8 +13239,25 @@ def __init__(__self__, *, :param bool enable: Enable/disable DDoS Protection Plan on Virtual Network. :param str id: The ID of DDoS Protection Plan. """ - pulumi.set(__self__, "enable", enable) - pulumi.set(__self__, "id", id) + VirtualNetworkDdosProtectionPlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + enable=enable, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enable: Optional[bool] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enable is None: + raise TypeError("Missing 'enable' argument") + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("enable", enable) + _setter("id", id) @property @pulumi.getter @@ -9931,7 +13283,20 @@ def __init__(__self__, *, """ :param str enforcement: Specifies if the encrypted Virtual Network allows VM that does not support encryption. Possible values are `DropUnencrypted` and `AllowUnencrypted`. """ - pulumi.set(__self__, "enforcement", enforcement) + VirtualNetworkEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + enforcement=enforcement, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enforcement: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enforcement is None: + raise TypeError("Missing 'enforcement' argument") + + _setter("enforcement", enforcement) @property @pulumi.getter @@ -9972,12 +13337,31 @@ def __init__(__self__, *, :param int peer_weight: The weight added to routes which have been learned through BGP peering. Valid values can be between `0` and `100`. :param Sequence['VirtualNetworkGatewayBgpSettingsPeeringAddressArgs'] peering_addresses: A list of `peering_addresses` as defined below. Only one `peering_addresses` block can be specified except when `active_active` of this Virtual Network Gateway is `true`. """ + VirtualNetworkGatewayBgpSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + asn=asn, + peer_weight=peer_weight, + peering_addresses=peering_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asn: Optional[int] = None, + peer_weight: Optional[int] = None, + peering_addresses: Optional[Sequence['outputs.VirtualNetworkGatewayBgpSettingsPeeringAddress']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if peer_weight is None and 'peerWeight' in kwargs: + peer_weight = kwargs['peerWeight'] + if peering_addresses is None and 'peeringAddresses' in kwargs: + peering_addresses = kwargs['peeringAddresses'] + if asn is not None: - pulumi.set(__self__, "asn", asn) + _setter("asn", asn) if peer_weight is not None: - pulumi.set(__self__, "peer_weight", peer_weight) + _setter("peer_weight", peer_weight) if peering_addresses is not None: - pulumi.set(__self__, "peering_addresses", peering_addresses) + _setter("peering_addresses", peering_addresses) @property @pulumi.getter @@ -10042,14 +13426,39 @@ def __init__(__self__, *, :param str ip_configuration_name: The name of the IP configuration of this Virtual Network Gateway. In case there are multiple `ip_configuration` blocks defined, this property is **required** to specify. :param Sequence[str] tunnel_ip_addresses: A list of tunnel IP addresses assigned to the BGP peer of the Virtual Network Gateway. """ + VirtualNetworkGatewayBgpSettingsPeeringAddress._configure( + lambda key, value: pulumi.set(__self__, key, value), + apipa_addresses=apipa_addresses, + default_addresses=default_addresses, + ip_configuration_name=ip_configuration_name, + tunnel_ip_addresses=tunnel_ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + apipa_addresses: Optional[Sequence[str]] = None, + default_addresses: Optional[Sequence[str]] = None, + ip_configuration_name: Optional[str] = None, + tunnel_ip_addresses: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if apipa_addresses is None and 'apipaAddresses' in kwargs: + apipa_addresses = kwargs['apipaAddresses'] + if default_addresses is None and 'defaultAddresses' in kwargs: + default_addresses = kwargs['defaultAddresses'] + if ip_configuration_name is None and 'ipConfigurationName' in kwargs: + ip_configuration_name = kwargs['ipConfigurationName'] + if tunnel_ip_addresses is None and 'tunnelIpAddresses' in kwargs: + tunnel_ip_addresses = kwargs['tunnelIpAddresses'] + if apipa_addresses is not None: - pulumi.set(__self__, "apipa_addresses", apipa_addresses) + _setter("apipa_addresses", apipa_addresses) if default_addresses is not None: - pulumi.set(__self__, "default_addresses", default_addresses) + _setter("default_addresses", default_addresses) if ip_configuration_name is not None: - pulumi.set(__self__, "ip_configuration_name", ip_configuration_name) + _setter("ip_configuration_name", ip_configuration_name) if tunnel_ip_addresses is not None: - pulumi.set(__self__, "tunnel_ip_addresses", tunnel_ip_addresses) + _setter("tunnel_ip_addresses", tunnel_ip_addresses) @property @pulumi.getter(name="apipaAddresses") @@ -10095,9 +13504,24 @@ def __init__(__self__, *, :param str primary: single IP address that is part of the `network.VirtualNetworkGateway` ip_configuration (first one) :param str secondary: single IP address that is part of the `network.VirtualNetworkGateway` ip_configuration (second one) """ - pulumi.set(__self__, "primary", primary) + VirtualNetworkGatewayConnectionCustomBgpAddresses._configure( + lambda key, value: pulumi.set(__self__, key, value), + primary=primary, + secondary=secondary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + primary: Optional[str] = None, + secondary: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary is None: + raise TypeError("Missing 'primary' argument") + + _setter("primary", primary) if secondary is not None: - pulumi.set(__self__, "secondary", secondary) + _setter("secondary", secondary) @property @pulumi.getter @@ -10170,16 +13594,69 @@ def __init__(__self__, *, :param int sa_datasize: The IPSec SA payload size in KB. Must be at least `1024` KB. Defaults to `102400000` KB. :param int sa_lifetime: The IPSec SA lifetime in seconds. Must be at least `300` seconds. Defaults to `27000` seconds. """ - pulumi.set(__self__, "dh_group", dh_group) - pulumi.set(__self__, "ike_encryption", ike_encryption) - pulumi.set(__self__, "ike_integrity", ike_integrity) - pulumi.set(__self__, "ipsec_encryption", ipsec_encryption) - pulumi.set(__self__, "ipsec_integrity", ipsec_integrity) - pulumi.set(__self__, "pfs_group", pfs_group) + VirtualNetworkGatewayConnectionIpsecPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + dh_group=dh_group, + ike_encryption=ike_encryption, + ike_integrity=ike_integrity, + ipsec_encryption=ipsec_encryption, + ipsec_integrity=ipsec_integrity, + pfs_group=pfs_group, + sa_datasize=sa_datasize, + sa_lifetime=sa_lifetime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dh_group: Optional[str] = None, + ike_encryption: Optional[str] = None, + ike_integrity: Optional[str] = None, + ipsec_encryption: Optional[str] = None, + ipsec_integrity: Optional[str] = None, + pfs_group: Optional[str] = None, + sa_datasize: Optional[int] = None, + sa_lifetime: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dh_group is None and 'dhGroup' in kwargs: + dh_group = kwargs['dhGroup'] + if dh_group is None: + raise TypeError("Missing 'dh_group' argument") + if ike_encryption is None and 'ikeEncryption' in kwargs: + ike_encryption = kwargs['ikeEncryption'] + if ike_encryption is None: + raise TypeError("Missing 'ike_encryption' argument") + if ike_integrity is None and 'ikeIntegrity' in kwargs: + ike_integrity = kwargs['ikeIntegrity'] + if ike_integrity is None: + raise TypeError("Missing 'ike_integrity' argument") + if ipsec_encryption is None and 'ipsecEncryption' in kwargs: + ipsec_encryption = kwargs['ipsecEncryption'] + if ipsec_encryption is None: + raise TypeError("Missing 'ipsec_encryption' argument") + if ipsec_integrity is None and 'ipsecIntegrity' in kwargs: + ipsec_integrity = kwargs['ipsecIntegrity'] + if ipsec_integrity is None: + raise TypeError("Missing 'ipsec_integrity' argument") + if pfs_group is None and 'pfsGroup' in kwargs: + pfs_group = kwargs['pfsGroup'] + if pfs_group is None: + raise TypeError("Missing 'pfs_group' argument") + if sa_datasize is None and 'saDatasize' in kwargs: + sa_datasize = kwargs['saDatasize'] + if sa_lifetime is None and 'saLifetime' in kwargs: + sa_lifetime = kwargs['saLifetime'] + + _setter("dh_group", dh_group) + _setter("ike_encryption", ike_encryption) + _setter("ike_integrity", ike_integrity) + _setter("ipsec_encryption", ipsec_encryption) + _setter("ipsec_integrity", ipsec_integrity) + _setter("pfs_group", pfs_group) if sa_datasize is not None: - pulumi.set(__self__, "sa_datasize", sa_datasize) + _setter("sa_datasize", sa_datasize) if sa_lifetime is not None: - pulumi.set(__self__, "sa_lifetime", sa_lifetime) + _setter("sa_lifetime", sa_lifetime) @property @pulumi.getter(name="dhGroup") @@ -10276,8 +13753,29 @@ def __init__(__self__, *, :param Sequence[str] local_address_cidrs: List of local CIDRs. :param Sequence[str] remote_address_cidrs: List of remote CIDRs. """ - pulumi.set(__self__, "local_address_cidrs", local_address_cidrs) - pulumi.set(__self__, "remote_address_cidrs", remote_address_cidrs) + VirtualNetworkGatewayConnectionTrafficSelectorPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + local_address_cidrs=local_address_cidrs, + remote_address_cidrs=remote_address_cidrs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + local_address_cidrs: Optional[Sequence[str]] = None, + remote_address_cidrs: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_address_cidrs is None and 'localAddressCidrs' in kwargs: + local_address_cidrs = kwargs['localAddressCidrs'] + if local_address_cidrs is None: + raise TypeError("Missing 'local_address_cidrs' argument") + if remote_address_cidrs is None and 'remoteAddressCidrs' in kwargs: + remote_address_cidrs = kwargs['remoteAddressCidrs'] + if remote_address_cidrs is None: + raise TypeError("Missing 'remote_address_cidrs' argument") + + _setter("local_address_cidrs", local_address_cidrs) + _setter("remote_address_cidrs", remote_address_cidrs) @property @pulumi.getter(name="localAddressCidrs") @@ -10320,8 +13818,21 @@ def __init__(__self__, *, """ :param Sequence[str] address_prefixes: A list of address blocks reserved for this virtual network in CIDR notation as defined below. """ + VirtualNetworkGatewayCustomRoute._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefixes=address_prefixes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefixes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefixes is None and 'addressPrefixes' in kwargs: + address_prefixes = kwargs['addressPrefixes'] + if address_prefixes is not None: - pulumi.set(__self__, "address_prefixes", address_prefixes) + _setter("address_prefixes", address_prefixes) @property @pulumi.getter(name="addressPrefixes") @@ -10366,12 +13877,39 @@ def __init__(__self__, *, :param str name: A user-defined name of the IP configuration. Defaults to `vnetGatewayConfig`. :param str private_ip_address_allocation: Defines how the private IP address of the gateways virtual interface is assigned. Valid options are `Static` or `Dynamic`. Defaults to `Dynamic`. """ - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) + VirtualNetworkGatewayIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + name=name, + private_ip_address_allocation=private_ip_address_allocation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_ip_address_id: Optional[str] = None, + subnet_id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address_allocation: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_ip_address_allocation is not None: - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) + _setter("private_ip_address_allocation", private_ip_address_allocation) @property @pulumi.getter(name="publicIpAddressId") @@ -10434,9 +13972,28 @@ def __init__(__self__, *, :param str address_space: The string CIDR representing the address space for the Virtual Network Gateway Nat Rule external mapping. :param str port_range: The single port range for the Virtual Network Gateway Nat Rule external mapping. """ - pulumi.set(__self__, "address_space", address_space) + VirtualNetworkGatewayNatRuleExternalMapping._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_space=address_space, + port_range=port_range, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_space: Optional[str] = None, + port_range: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_space is None and 'addressSpace' in kwargs: + address_space = kwargs['addressSpace'] + if address_space is None: + raise TypeError("Missing 'address_space' argument") + if port_range is None and 'portRange' in kwargs: + port_range = kwargs['portRange'] + + _setter("address_space", address_space) if port_range is not None: - pulumi.set(__self__, "port_range", port_range) + _setter("port_range", port_range) @property @pulumi.getter(name="addressSpace") @@ -10483,9 +14040,28 @@ def __init__(__self__, *, :param str address_space: The string CIDR representing the address space for the Virtual Network Gateway Nat Rule internal mapping. :param str port_range: The single port range for the Virtual Network Gateway Nat Rule internal mapping. """ - pulumi.set(__self__, "address_space", address_space) + VirtualNetworkGatewayNatRuleInternalMapping._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_space=address_space, + port_range=port_range, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_space: Optional[str] = None, + port_range: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_space is None and 'addressSpace' in kwargs: + address_space = kwargs['addressSpace'] + if address_space is None: + raise TypeError("Missing 'address_space' argument") + if port_range is None and 'portRange' in kwargs: + port_range = kwargs['portRange'] + + _setter("address_space", address_space) if port_range is not None: - pulumi.set(__self__, "port_range", port_range) + _setter("port_range", port_range) @property @pulumi.getter(name="addressSpace") @@ -10571,25 +14147,76 @@ def __init__(__self__, *, Values `SSTP` and `IkeV2` are incompatible with the use of `aad_tenant`, `aad_audience` and `aad_issuer`. """ - pulumi.set(__self__, "address_spaces", address_spaces) + VirtualNetworkGatewayVpnClientConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_spaces=address_spaces, + aad_audience=aad_audience, + aad_issuer=aad_issuer, + aad_tenant=aad_tenant, + radius_server_address=radius_server_address, + radius_server_secret=radius_server_secret, + revoked_certificates=revoked_certificates, + root_certificates=root_certificates, + vpn_auth_types=vpn_auth_types, + vpn_client_protocols=vpn_client_protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_spaces: Optional[Sequence[str]] = None, + aad_audience: Optional[str] = None, + aad_issuer: Optional[str] = None, + aad_tenant: Optional[str] = None, + radius_server_address: Optional[str] = None, + radius_server_secret: Optional[str] = None, + revoked_certificates: Optional[Sequence['outputs.VirtualNetworkGatewayVpnClientConfigurationRevokedCertificate']] = None, + root_certificates: Optional[Sequence['outputs.VirtualNetworkGatewayVpnClientConfigurationRootCertificate']] = None, + vpn_auth_types: Optional[Sequence[str]] = None, + vpn_client_protocols: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_spaces is None and 'addressSpaces' in kwargs: + address_spaces = kwargs['addressSpaces'] + if address_spaces is None: + raise TypeError("Missing 'address_spaces' argument") + if aad_audience is None and 'aadAudience' in kwargs: + aad_audience = kwargs['aadAudience'] + if aad_issuer is None and 'aadIssuer' in kwargs: + aad_issuer = kwargs['aadIssuer'] + if aad_tenant is None and 'aadTenant' in kwargs: + aad_tenant = kwargs['aadTenant'] + if radius_server_address is None and 'radiusServerAddress' in kwargs: + radius_server_address = kwargs['radiusServerAddress'] + if radius_server_secret is None and 'radiusServerSecret' in kwargs: + radius_server_secret = kwargs['radiusServerSecret'] + if revoked_certificates is None and 'revokedCertificates' in kwargs: + revoked_certificates = kwargs['revokedCertificates'] + if root_certificates is None and 'rootCertificates' in kwargs: + root_certificates = kwargs['rootCertificates'] + if vpn_auth_types is None and 'vpnAuthTypes' in kwargs: + vpn_auth_types = kwargs['vpnAuthTypes'] + if vpn_client_protocols is None and 'vpnClientProtocols' in kwargs: + vpn_client_protocols = kwargs['vpnClientProtocols'] + + _setter("address_spaces", address_spaces) if aad_audience is not None: - pulumi.set(__self__, "aad_audience", aad_audience) + _setter("aad_audience", aad_audience) if aad_issuer is not None: - pulumi.set(__self__, "aad_issuer", aad_issuer) + _setter("aad_issuer", aad_issuer) if aad_tenant is not None: - pulumi.set(__self__, "aad_tenant", aad_tenant) + _setter("aad_tenant", aad_tenant) if radius_server_address is not None: - pulumi.set(__self__, "radius_server_address", radius_server_address) + _setter("radius_server_address", radius_server_address) if radius_server_secret is not None: - pulumi.set(__self__, "radius_server_secret", radius_server_secret) + _setter("radius_server_secret", radius_server_secret) if revoked_certificates is not None: - pulumi.set(__self__, "revoked_certificates", revoked_certificates) + _setter("revoked_certificates", revoked_certificates) if root_certificates is not None: - pulumi.set(__self__, "root_certificates", root_certificates) + _setter("root_certificates", root_certificates) if vpn_auth_types is not None: - pulumi.set(__self__, "vpn_auth_types", vpn_auth_types) + _setter("vpn_auth_types", vpn_auth_types) if vpn_client_protocols is not None: - pulumi.set(__self__, "vpn_client_protocols", vpn_client_protocols) + _setter("vpn_client_protocols", vpn_client_protocols) @property @pulumi.getter(name="addressSpaces") @@ -10688,8 +14315,25 @@ def __init__(__self__, *, :param str name: Specifies the name of the certificate resource. :param str thumbprint: Specifies the public data of the certificate. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "thumbprint", thumbprint) + VirtualNetworkGatewayVpnClientConfigurationRevokedCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + + _setter("name", name) + _setter("thumbprint", thumbprint) @property @pulumi.getter @@ -10734,8 +14378,27 @@ def __init__(__self__, *, :param str name: A user-defined name of the root certificate. :param str public_cert_data: The public certificate of the root certificate authority. The certificate must be provided in Base-64 encoded X.509 format (PEM). In particular, this argument *must not* include the `-----BEGIN CERTIFICATE-----` or `-----END CERTIFICATE-----` markers. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_cert_data", public_cert_data) + VirtualNetworkGatewayVpnClientConfigurationRootCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + public_cert_data=public_cert_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + public_cert_data: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if public_cert_data is None and 'publicCertData' in kwargs: + public_cert_data = kwargs['publicCertData'] + if public_cert_data is None: + raise TypeError("Missing 'public_cert_data' argument") + + _setter("name", name) + _setter("public_cert_data", public_cert_data) @property @pulumi.getter @@ -10786,12 +14449,37 @@ def __init__(__self__, *, :param str id: The ID of DDoS Protection Plan. :param str security_group: The Network Security Group to associate with the subnet. (Referenced by `id`, ie. `azurerm_network_security_group.example.id`) """ - pulumi.set(__self__, "address_prefix", address_prefix) - pulumi.set(__self__, "name", name) + VirtualNetworkSubnet._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix=address_prefix, + name=name, + id=id, + security_group=security_group, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix: Optional[str] = None, + name: Optional[str] = None, + id: Optional[str] = None, + security_group: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix is None and 'addressPrefix' in kwargs: + address_prefix = kwargs['addressPrefix'] + if address_prefix is None: + raise TypeError("Missing 'address_prefix' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if security_group is None and 'securityGroup' in kwargs: + security_group = kwargs['securityGroup'] + + _setter("address_prefix", address_prefix) + _setter("name", name) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if security_group is not None: - pulumi.set(__self__, "security_group", security_group) + _setter("security_group", security_group) @property @pulumi.getter(name="addressPrefix") @@ -10854,9 +14542,28 @@ def __init__(__self__, *, :param str address_space: The string CIDR representing the address space for the VPN Gateway Nat Rule external mapping. :param str port_range: The single port range for the VPN Gateway Nat Rule external mapping. """ - pulumi.set(__self__, "address_space", address_space) + VnpGatewayNatRuleExternalMapping._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_space=address_space, + port_range=port_range, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_space: Optional[str] = None, + port_range: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_space is None and 'addressSpace' in kwargs: + address_space = kwargs['addressSpace'] + if address_space is None: + raise TypeError("Missing 'address_space' argument") + if port_range is None and 'portRange' in kwargs: + port_range = kwargs['portRange'] + + _setter("address_space", address_space) if port_range is not None: - pulumi.set(__self__, "port_range", port_range) + _setter("port_range", port_range) @property @pulumi.getter(name="addressSpace") @@ -10903,9 +14610,28 @@ def __init__(__self__, *, :param str address_space: The string CIDR representing the address space for the VPN Gateway Nat Rule internal mapping. :param str port_range: The single port range for the VPN Gateway Nat Rule internal mapping. """ - pulumi.set(__self__, "address_space", address_space) + VnpGatewayNatRuleInternalMapping._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_space=address_space, + port_range=port_range, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_space: Optional[str] = None, + port_range: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_space is None and 'addressSpace' in kwargs: + address_space = kwargs['addressSpace'] + if address_space is None: + raise TypeError("Missing 'address_space' argument") + if port_range is None and 'portRange' in kwargs: + port_range = kwargs['portRange'] + + _setter("address_space", address_space) if port_range is not None: - pulumi.set(__self__, "port_range", port_range) + _setter("port_range", port_range) @property @pulumi.getter(name="addressSpace") @@ -10962,14 +14688,45 @@ def __init__(__self__, *, :param 'VpnGatewayBgpSettingsInstance0BgpPeeringAddressArgs' instance0_bgp_peering_address: An `instance_bgp_peering_address` block as defined below. :param 'VpnGatewayBgpSettingsInstance1BgpPeeringAddressArgs' instance1_bgp_peering_address: An `instance_bgp_peering_address` block as defined below. """ - pulumi.set(__self__, "asn", asn) - pulumi.set(__self__, "peer_weight", peer_weight) + VpnGatewayBgpSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + asn=asn, + peer_weight=peer_weight, + bgp_peering_address=bgp_peering_address, + instance0_bgp_peering_address=instance0_bgp_peering_address, + instance1_bgp_peering_address=instance1_bgp_peering_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asn: Optional[int] = None, + peer_weight: Optional[int] = None, + bgp_peering_address: Optional[str] = None, + instance0_bgp_peering_address: Optional['outputs.VpnGatewayBgpSettingsInstance0BgpPeeringAddress'] = None, + instance1_bgp_peering_address: Optional['outputs.VpnGatewayBgpSettingsInstance1BgpPeeringAddress'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if asn is None: + raise TypeError("Missing 'asn' argument") + if peer_weight is None and 'peerWeight' in kwargs: + peer_weight = kwargs['peerWeight'] + if peer_weight is None: + raise TypeError("Missing 'peer_weight' argument") + if bgp_peering_address is None and 'bgpPeeringAddress' in kwargs: + bgp_peering_address = kwargs['bgpPeeringAddress'] + if instance0_bgp_peering_address is None and 'instance0BgpPeeringAddress' in kwargs: + instance0_bgp_peering_address = kwargs['instance0BgpPeeringAddress'] + if instance1_bgp_peering_address is None and 'instance1BgpPeeringAddress' in kwargs: + instance1_bgp_peering_address = kwargs['instance1BgpPeeringAddress'] + + _setter("asn", asn) + _setter("peer_weight", peer_weight) if bgp_peering_address is not None: - pulumi.set(__self__, "bgp_peering_address", bgp_peering_address) + _setter("bgp_peering_address", bgp_peering_address) if instance0_bgp_peering_address is not None: - pulumi.set(__self__, "instance0_bgp_peering_address", instance0_bgp_peering_address) + _setter("instance0_bgp_peering_address", instance0_bgp_peering_address) if instance1_bgp_peering_address is not None: - pulumi.set(__self__, "instance1_bgp_peering_address", instance1_bgp_peering_address) + _setter("instance1_bgp_peering_address", instance1_bgp_peering_address) @property @pulumi.getter @@ -11048,13 +14805,40 @@ def __init__(__self__, *, :param str ip_configuration_id: The pre-defined id of VPN Gateway IP Configuration. :param Sequence[str] tunnel_ips: The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration. """ - pulumi.set(__self__, "custom_ips", custom_ips) + VpnGatewayBgpSettingsInstance0BgpPeeringAddress._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_ips=custom_ips, + default_ips=default_ips, + ip_configuration_id=ip_configuration_id, + tunnel_ips=tunnel_ips, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_ips: Optional[Sequence[str]] = None, + default_ips: Optional[Sequence[str]] = None, + ip_configuration_id: Optional[str] = None, + tunnel_ips: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_ips is None and 'customIps' in kwargs: + custom_ips = kwargs['customIps'] + if custom_ips is None: + raise TypeError("Missing 'custom_ips' argument") + if default_ips is None and 'defaultIps' in kwargs: + default_ips = kwargs['defaultIps'] + if ip_configuration_id is None and 'ipConfigurationId' in kwargs: + ip_configuration_id = kwargs['ipConfigurationId'] + if tunnel_ips is None and 'tunnelIps' in kwargs: + tunnel_ips = kwargs['tunnelIps'] + + _setter("custom_ips", custom_ips) if default_ips is not None: - pulumi.set(__self__, "default_ips", default_ips) + _setter("default_ips", default_ips) if ip_configuration_id is not None: - pulumi.set(__self__, "ip_configuration_id", ip_configuration_id) + _setter("ip_configuration_id", ip_configuration_id) if tunnel_ips is not None: - pulumi.set(__self__, "tunnel_ips", tunnel_ips) + _setter("tunnel_ips", tunnel_ips) @property @pulumi.getter(name="customIps") @@ -11125,13 +14909,40 @@ def __init__(__self__, *, :param str ip_configuration_id: The pre-defined id of VPN Gateway IP Configuration. :param Sequence[str] tunnel_ips: The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration. """ - pulumi.set(__self__, "custom_ips", custom_ips) + VpnGatewayBgpSettingsInstance1BgpPeeringAddress._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_ips=custom_ips, + default_ips=default_ips, + ip_configuration_id=ip_configuration_id, + tunnel_ips=tunnel_ips, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_ips: Optional[Sequence[str]] = None, + default_ips: Optional[Sequence[str]] = None, + ip_configuration_id: Optional[str] = None, + tunnel_ips: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_ips is None and 'customIps' in kwargs: + custom_ips = kwargs['customIps'] + if custom_ips is None: + raise TypeError("Missing 'custom_ips' argument") + if default_ips is None and 'defaultIps' in kwargs: + default_ips = kwargs['defaultIps'] + if ip_configuration_id is None and 'ipConfigurationId' in kwargs: + ip_configuration_id = kwargs['ipConfigurationId'] + if tunnel_ips is None and 'tunnelIps' in kwargs: + tunnel_ips = kwargs['tunnelIps'] + + _setter("custom_ips", custom_ips) if default_ips is not None: - pulumi.set(__self__, "default_ips", default_ips) + _setter("default_ips", default_ips) if ip_configuration_id is not None: - pulumi.set(__self__, "ip_configuration_id", ip_configuration_id) + _setter("ip_configuration_id", ip_configuration_id) if tunnel_ips is not None: - pulumi.set(__self__, "tunnel_ips", tunnel_ips) + _setter("tunnel_ips", tunnel_ips) @property @pulumi.getter(name="customIps") @@ -11202,13 +15013,40 @@ def __init__(__self__, *, :param str outbound_route_map_id: The resource ID of the Route Map associated with this Routing Configuration for outbound advertised routes. :param 'VpnGatewayConnectionRoutingPropagatedRouteTableArgs' propagated_route_table: A `propagated_route_table` block as defined below. """ - pulumi.set(__self__, "associated_route_table", associated_route_table) + VpnGatewayConnectionRouting._configure( + lambda key, value: pulumi.set(__self__, key, value), + associated_route_table=associated_route_table, + inbound_route_map_id=inbound_route_map_id, + outbound_route_map_id=outbound_route_map_id, + propagated_route_table=propagated_route_table, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + associated_route_table: Optional[str] = None, + inbound_route_map_id: Optional[str] = None, + outbound_route_map_id: Optional[str] = None, + propagated_route_table: Optional['outputs.VpnGatewayConnectionRoutingPropagatedRouteTable'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if associated_route_table is None and 'associatedRouteTable' in kwargs: + associated_route_table = kwargs['associatedRouteTable'] + if associated_route_table is None: + raise TypeError("Missing 'associated_route_table' argument") + if inbound_route_map_id is None and 'inboundRouteMapId' in kwargs: + inbound_route_map_id = kwargs['inboundRouteMapId'] + if outbound_route_map_id is None and 'outboundRouteMapId' in kwargs: + outbound_route_map_id = kwargs['outboundRouteMapId'] + if propagated_route_table is None and 'propagatedRouteTable' in kwargs: + propagated_route_table = kwargs['propagatedRouteTable'] + + _setter("associated_route_table", associated_route_table) if inbound_route_map_id is not None: - pulumi.set(__self__, "inbound_route_map_id", inbound_route_map_id) + _setter("inbound_route_map_id", inbound_route_map_id) if outbound_route_map_id is not None: - pulumi.set(__self__, "outbound_route_map_id", outbound_route_map_id) + _setter("outbound_route_map_id", outbound_route_map_id) if propagated_route_table is not None: - pulumi.set(__self__, "propagated_route_table", propagated_route_table) + _setter("propagated_route_table", propagated_route_table) @property @pulumi.getter(name="associatedRouteTable") @@ -11269,9 +15107,26 @@ def __init__(__self__, *, :param Sequence[str] route_table_ids: A list of Route Table IDs to associated with this VPN Gateway Connection. :param Sequence[str] labels: A list of labels to assign to this route table. """ - pulumi.set(__self__, "route_table_ids", route_table_ids) + VpnGatewayConnectionRoutingPropagatedRouteTable._configure( + lambda key, value: pulumi.set(__self__, key, value), + route_table_ids=route_table_ids, + labels=labels, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + route_table_ids: Optional[Sequence[str]] = None, + labels: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if route_table_ids is None and 'routeTableIds' in kwargs: + route_table_ids = kwargs['routeTableIds'] + if route_table_ids is None: + raise TypeError("Missing 'route_table_ids' argument") + + _setter("route_table_ids", route_table_ids) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) @property @pulumi.getter(name="routeTableIds") @@ -11318,8 +15173,29 @@ def __init__(__self__, *, :param Sequence[str] local_address_ranges: A list of local address spaces in CIDR format for this VPN Gateway Connection. :param Sequence[str] remote_address_ranges: A list of remote address spaces in CIDR format for this VPN Gateway Connection. """ - pulumi.set(__self__, "local_address_ranges", local_address_ranges) - pulumi.set(__self__, "remote_address_ranges", remote_address_ranges) + VpnGatewayConnectionTrafficSelectorPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + local_address_ranges=local_address_ranges, + remote_address_ranges=remote_address_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + local_address_ranges: Optional[Sequence[str]] = None, + remote_address_ranges: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_address_ranges is None and 'localAddressRanges' in kwargs: + local_address_ranges = kwargs['localAddressRanges'] + if local_address_ranges is None: + raise TypeError("Missing 'local_address_ranges' argument") + if remote_address_ranges is None and 'remoteAddressRanges' in kwargs: + remote_address_ranges = kwargs['remoteAddressRanges'] + if remote_address_ranges is None: + raise TypeError("Missing 'remote_address_ranges' argument") + + _setter("local_address_ranges", local_address_ranges) + _setter("remote_address_ranges", remote_address_ranges) @property @pulumi.getter(name="localAddressRanges") @@ -11414,34 +15290,103 @@ def __init__(__self__, *, :param int route_weight: Routing weight for this VPN Link Connection. Defaults to `0`. :param str shared_key: SharedKey for this VPN Link Connection. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "vpn_site_link_id", vpn_site_link_id) + VpnGatewayConnectionVpnLink._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + vpn_site_link_id=vpn_site_link_id, + bandwidth_mbps=bandwidth_mbps, + bgp_enabled=bgp_enabled, + connection_mode=connection_mode, + custom_bgp_addresses=custom_bgp_addresses, + egress_nat_rule_ids=egress_nat_rule_ids, + ingress_nat_rule_ids=ingress_nat_rule_ids, + ipsec_policies=ipsec_policies, + local_azure_ip_address_enabled=local_azure_ip_address_enabled, + policy_based_traffic_selector_enabled=policy_based_traffic_selector_enabled, + protocol=protocol, + ratelimit_enabled=ratelimit_enabled, + route_weight=route_weight, + shared_key=shared_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + vpn_site_link_id: Optional[str] = None, + bandwidth_mbps: Optional[int] = None, + bgp_enabled: Optional[bool] = None, + connection_mode: Optional[str] = None, + custom_bgp_addresses: Optional[Sequence['outputs.VpnGatewayConnectionVpnLinkCustomBgpAddress']] = None, + egress_nat_rule_ids: Optional[Sequence[str]] = None, + ingress_nat_rule_ids: Optional[Sequence[str]] = None, + ipsec_policies: Optional[Sequence['outputs.VpnGatewayConnectionVpnLinkIpsecPolicy']] = None, + local_azure_ip_address_enabled: Optional[bool] = None, + policy_based_traffic_selector_enabled: Optional[bool] = None, + protocol: Optional[str] = None, + ratelimit_enabled: Optional[bool] = None, + route_weight: Optional[int] = None, + shared_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if vpn_site_link_id is None and 'vpnSiteLinkId' in kwargs: + vpn_site_link_id = kwargs['vpnSiteLinkId'] + if vpn_site_link_id is None: + raise TypeError("Missing 'vpn_site_link_id' argument") + if bandwidth_mbps is None and 'bandwidthMbps' in kwargs: + bandwidth_mbps = kwargs['bandwidthMbps'] + if bgp_enabled is None and 'bgpEnabled' in kwargs: + bgp_enabled = kwargs['bgpEnabled'] + if connection_mode is None and 'connectionMode' in kwargs: + connection_mode = kwargs['connectionMode'] + if custom_bgp_addresses is None and 'customBgpAddresses' in kwargs: + custom_bgp_addresses = kwargs['customBgpAddresses'] + if egress_nat_rule_ids is None and 'egressNatRuleIds' in kwargs: + egress_nat_rule_ids = kwargs['egressNatRuleIds'] + if ingress_nat_rule_ids is None and 'ingressNatRuleIds' in kwargs: + ingress_nat_rule_ids = kwargs['ingressNatRuleIds'] + if ipsec_policies is None and 'ipsecPolicies' in kwargs: + ipsec_policies = kwargs['ipsecPolicies'] + if local_azure_ip_address_enabled is None and 'localAzureIpAddressEnabled' in kwargs: + local_azure_ip_address_enabled = kwargs['localAzureIpAddressEnabled'] + if policy_based_traffic_selector_enabled is None and 'policyBasedTrafficSelectorEnabled' in kwargs: + policy_based_traffic_selector_enabled = kwargs['policyBasedTrafficSelectorEnabled'] + if ratelimit_enabled is None and 'ratelimitEnabled' in kwargs: + ratelimit_enabled = kwargs['ratelimitEnabled'] + if route_weight is None and 'routeWeight' in kwargs: + route_weight = kwargs['routeWeight'] + if shared_key is None and 'sharedKey' in kwargs: + shared_key = kwargs['sharedKey'] + + _setter("name", name) + _setter("vpn_site_link_id", vpn_site_link_id) if bandwidth_mbps is not None: - pulumi.set(__self__, "bandwidth_mbps", bandwidth_mbps) + _setter("bandwidth_mbps", bandwidth_mbps) if bgp_enabled is not None: - pulumi.set(__self__, "bgp_enabled", bgp_enabled) + _setter("bgp_enabled", bgp_enabled) if connection_mode is not None: - pulumi.set(__self__, "connection_mode", connection_mode) + _setter("connection_mode", connection_mode) if custom_bgp_addresses is not None: - pulumi.set(__self__, "custom_bgp_addresses", custom_bgp_addresses) + _setter("custom_bgp_addresses", custom_bgp_addresses) if egress_nat_rule_ids is not None: - pulumi.set(__self__, "egress_nat_rule_ids", egress_nat_rule_ids) + _setter("egress_nat_rule_ids", egress_nat_rule_ids) if ingress_nat_rule_ids is not None: - pulumi.set(__self__, "ingress_nat_rule_ids", ingress_nat_rule_ids) + _setter("ingress_nat_rule_ids", ingress_nat_rule_ids) if ipsec_policies is not None: - pulumi.set(__self__, "ipsec_policies", ipsec_policies) + _setter("ipsec_policies", ipsec_policies) if local_azure_ip_address_enabled is not None: - pulumi.set(__self__, "local_azure_ip_address_enabled", local_azure_ip_address_enabled) + _setter("local_azure_ip_address_enabled", local_azure_ip_address_enabled) if policy_based_traffic_selector_enabled is not None: - pulumi.set(__self__, "policy_based_traffic_selector_enabled", policy_based_traffic_selector_enabled) + _setter("policy_based_traffic_selector_enabled", policy_based_traffic_selector_enabled) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if ratelimit_enabled is not None: - pulumi.set(__self__, "ratelimit_enabled", ratelimit_enabled) + _setter("ratelimit_enabled", ratelimit_enabled) if route_weight is not None: - pulumi.set(__self__, "route_weight", route_weight) + _setter("route_weight", route_weight) if shared_key is not None: - pulumi.set(__self__, "shared_key", shared_key) + _setter("shared_key", shared_key) @property @pulumi.getter @@ -11592,8 +15537,29 @@ def __init__(__self__, *, :param str ip_address: The custom bgp ip address which belongs to the IP Configuration. :param str ip_configuration_id: The ID of the IP Configuration which belongs to the VPN Gateway. """ - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "ip_configuration_id", ip_configuration_id) + VpnGatewayConnectionVpnLinkCustomBgpAddress._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_address=ip_address, + ip_configuration_id=ip_configuration_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_address: Optional[str] = None, + ip_configuration_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if ip_configuration_id is None and 'ipConfigurationId' in kwargs: + ip_configuration_id = kwargs['ipConfigurationId'] + if ip_configuration_id is None: + raise TypeError("Missing 'ip_configuration_id' argument") + + _setter("ip_address", ip_address) + _setter("ip_configuration_id", ip_configuration_id) @property @pulumi.getter(name="ipAddress") @@ -11664,14 +15630,71 @@ def __init__(__self__, *, :param int sa_data_size_kb: The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for the site to site VPN tunnel. :param int sa_lifetime_sec: The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for the site to site VPN tunnel. """ - pulumi.set(__self__, "dh_group", dh_group) - pulumi.set(__self__, "encryption_algorithm", encryption_algorithm) - pulumi.set(__self__, "ike_encryption_algorithm", ike_encryption_algorithm) - pulumi.set(__self__, "ike_integrity_algorithm", ike_integrity_algorithm) - pulumi.set(__self__, "integrity_algorithm", integrity_algorithm) - pulumi.set(__self__, "pfs_group", pfs_group) - pulumi.set(__self__, "sa_data_size_kb", sa_data_size_kb) - pulumi.set(__self__, "sa_lifetime_sec", sa_lifetime_sec) + VpnGatewayConnectionVpnLinkIpsecPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + dh_group=dh_group, + encryption_algorithm=encryption_algorithm, + ike_encryption_algorithm=ike_encryption_algorithm, + ike_integrity_algorithm=ike_integrity_algorithm, + integrity_algorithm=integrity_algorithm, + pfs_group=pfs_group, + sa_data_size_kb=sa_data_size_kb, + sa_lifetime_sec=sa_lifetime_sec, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dh_group: Optional[str] = None, + encryption_algorithm: Optional[str] = None, + ike_encryption_algorithm: Optional[str] = None, + ike_integrity_algorithm: Optional[str] = None, + integrity_algorithm: Optional[str] = None, + pfs_group: Optional[str] = None, + sa_data_size_kb: Optional[int] = None, + sa_lifetime_sec: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dh_group is None and 'dhGroup' in kwargs: + dh_group = kwargs['dhGroup'] + if dh_group is None: + raise TypeError("Missing 'dh_group' argument") + if encryption_algorithm is None and 'encryptionAlgorithm' in kwargs: + encryption_algorithm = kwargs['encryptionAlgorithm'] + if encryption_algorithm is None: + raise TypeError("Missing 'encryption_algorithm' argument") + if ike_encryption_algorithm is None and 'ikeEncryptionAlgorithm' in kwargs: + ike_encryption_algorithm = kwargs['ikeEncryptionAlgorithm'] + if ike_encryption_algorithm is None: + raise TypeError("Missing 'ike_encryption_algorithm' argument") + if ike_integrity_algorithm is None and 'ikeIntegrityAlgorithm' in kwargs: + ike_integrity_algorithm = kwargs['ikeIntegrityAlgorithm'] + if ike_integrity_algorithm is None: + raise TypeError("Missing 'ike_integrity_algorithm' argument") + if integrity_algorithm is None and 'integrityAlgorithm' in kwargs: + integrity_algorithm = kwargs['integrityAlgorithm'] + if integrity_algorithm is None: + raise TypeError("Missing 'integrity_algorithm' argument") + if pfs_group is None and 'pfsGroup' in kwargs: + pfs_group = kwargs['pfsGroup'] + if pfs_group is None: + raise TypeError("Missing 'pfs_group' argument") + if sa_data_size_kb is None and 'saDataSizeKb' in kwargs: + sa_data_size_kb = kwargs['saDataSizeKb'] + if sa_data_size_kb is None: + raise TypeError("Missing 'sa_data_size_kb' argument") + if sa_lifetime_sec is None and 'saLifetimeSec' in kwargs: + sa_lifetime_sec = kwargs['saLifetimeSec'] + if sa_lifetime_sec is None: + raise TypeError("Missing 'sa_lifetime_sec' argument") + + _setter("dh_group", dh_group) + _setter("encryption_algorithm", encryption_algorithm) + _setter("ike_encryption_algorithm", ike_encryption_algorithm) + _setter("ike_integrity_algorithm", ike_integrity_algorithm) + _setter("integrity_algorithm", integrity_algorithm) + _setter("pfs_group", pfs_group) + _setter("sa_data_size_kb", sa_data_size_kb) + _setter("sa_lifetime_sec", sa_lifetime_sec) @property @pulumi.getter(name="dhGroup") @@ -11749,9 +15772,30 @@ def __init__(__self__, *, :param str issuer: The Issuer which should be used for authentication. :param str tenant: The Tenant which should be used for authentication. """ - pulumi.set(__self__, "audience", audience) - pulumi.set(__self__, "issuer", issuer) - pulumi.set(__self__, "tenant", tenant) + VpnServerConfigurationAzureActiveDirectoryAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + audience=audience, + issuer=issuer, + tenant=tenant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audience: Optional[str] = None, + issuer: Optional[str] = None, + tenant: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audience is None: + raise TypeError("Missing 'audience' argument") + if issuer is None: + raise TypeError("Missing 'issuer' argument") + if tenant is None: + raise TypeError("Missing 'tenant' argument") + + _setter("audience", audience) + _setter("issuer", issuer) + _setter("tenant", tenant) @property @pulumi.getter @@ -11787,8 +15831,25 @@ def __init__(__self__, *, :param str name: A name used to uniquely identify this certificate. :param str thumbprint: The Thumbprint of the Certificate. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "thumbprint", thumbprint) + VpnServerConfigurationClientRevokedCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + + _setter("name", name) + _setter("thumbprint", thumbprint) @property @pulumi.getter @@ -11833,8 +15894,27 @@ def __init__(__self__, *, :param str name: A name used to uniquely identify this certificate. :param str public_cert_data: The Public Key Data associated with the Certificate. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_cert_data", public_cert_data) + VpnServerConfigurationClientRootCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + public_cert_data=public_cert_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + public_cert_data: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if public_cert_data is None and 'publicCertData' in kwargs: + public_cert_data = kwargs['publicCertData'] + if public_cert_data is None: + raise TypeError("Missing 'public_cert_data' argument") + + _setter("name", name) + _setter("public_cert_data", public_cert_data) @property @pulumi.getter @@ -11905,14 +15985,71 @@ def __init__(__self__, *, :param int sa_data_size_kilobytes: The IPSec Security Association payload size in KB for a Site-to-Site VPN tunnel. :param int sa_lifetime_seconds: The IPSec Security Association lifetime in seconds for a Site-to-Site VPN tunnel. """ - pulumi.set(__self__, "dh_group", dh_group) - pulumi.set(__self__, "ike_encryption", ike_encryption) - pulumi.set(__self__, "ike_integrity", ike_integrity) - pulumi.set(__self__, "ipsec_encryption", ipsec_encryption) - pulumi.set(__self__, "ipsec_integrity", ipsec_integrity) - pulumi.set(__self__, "pfs_group", pfs_group) - pulumi.set(__self__, "sa_data_size_kilobytes", sa_data_size_kilobytes) - pulumi.set(__self__, "sa_lifetime_seconds", sa_lifetime_seconds) + VpnServerConfigurationIpsecPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + dh_group=dh_group, + ike_encryption=ike_encryption, + ike_integrity=ike_integrity, + ipsec_encryption=ipsec_encryption, + ipsec_integrity=ipsec_integrity, + pfs_group=pfs_group, + sa_data_size_kilobytes=sa_data_size_kilobytes, + sa_lifetime_seconds=sa_lifetime_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dh_group: Optional[str] = None, + ike_encryption: Optional[str] = None, + ike_integrity: Optional[str] = None, + ipsec_encryption: Optional[str] = None, + ipsec_integrity: Optional[str] = None, + pfs_group: Optional[str] = None, + sa_data_size_kilobytes: Optional[int] = None, + sa_lifetime_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dh_group is None and 'dhGroup' in kwargs: + dh_group = kwargs['dhGroup'] + if dh_group is None: + raise TypeError("Missing 'dh_group' argument") + if ike_encryption is None and 'ikeEncryption' in kwargs: + ike_encryption = kwargs['ikeEncryption'] + if ike_encryption is None: + raise TypeError("Missing 'ike_encryption' argument") + if ike_integrity is None and 'ikeIntegrity' in kwargs: + ike_integrity = kwargs['ikeIntegrity'] + if ike_integrity is None: + raise TypeError("Missing 'ike_integrity' argument") + if ipsec_encryption is None and 'ipsecEncryption' in kwargs: + ipsec_encryption = kwargs['ipsecEncryption'] + if ipsec_encryption is None: + raise TypeError("Missing 'ipsec_encryption' argument") + if ipsec_integrity is None and 'ipsecIntegrity' in kwargs: + ipsec_integrity = kwargs['ipsecIntegrity'] + if ipsec_integrity is None: + raise TypeError("Missing 'ipsec_integrity' argument") + if pfs_group is None and 'pfsGroup' in kwargs: + pfs_group = kwargs['pfsGroup'] + if pfs_group is None: + raise TypeError("Missing 'pfs_group' argument") + if sa_data_size_kilobytes is None and 'saDataSizeKilobytes' in kwargs: + sa_data_size_kilobytes = kwargs['saDataSizeKilobytes'] + if sa_data_size_kilobytes is None: + raise TypeError("Missing 'sa_data_size_kilobytes' argument") + if sa_lifetime_seconds is None and 'saLifetimeSeconds' in kwargs: + sa_lifetime_seconds = kwargs['saLifetimeSeconds'] + if sa_lifetime_seconds is None: + raise TypeError("Missing 'sa_lifetime_seconds' argument") + + _setter("dh_group", dh_group) + _setter("ike_encryption", ike_encryption) + _setter("ike_integrity", ike_integrity) + _setter("ipsec_encryption", ipsec_encryption) + _setter("ipsec_integrity", ipsec_integrity) + _setter("pfs_group", pfs_group) + _setter("sa_data_size_kilobytes", sa_data_size_kilobytes) + _setter("sa_lifetime_seconds", sa_lifetime_seconds) @property @pulumi.getter(name="dhGroup") @@ -11990,9 +16127,30 @@ def __init__(__self__, *, :param str type: The attribute type of the VPN Server Configuration Policy member. Possible values are `AADGroupId`, `CertificateGroupId` and `RadiusAzureGroupId`. :param str value: The value of the attribute that is used for the VPN Server Configuration Policy member. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "value", value) + VpnServerConfigurationPolicyGroupPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + type=type, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("type", type) + _setter("value", value) @property @pulumi.getter @@ -12049,12 +16207,31 @@ def __init__(__self__, *, :param Sequence['VpnServerConfigurationRadiusServerRootCertificateArgs'] server_root_certificates: One or more `server_root_certificate` blocks as defined below. :param Sequence['VpnServerConfigurationRadiusServerArgs'] servers: One or more `server` blocks as defined below. """ + VpnServerConfigurationRadius._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_root_certificates=client_root_certificates, + server_root_certificates=server_root_certificates, + servers=servers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_root_certificates: Optional[Sequence['outputs.VpnServerConfigurationRadiusClientRootCertificate']] = None, + server_root_certificates: Optional[Sequence['outputs.VpnServerConfigurationRadiusServerRootCertificate']] = None, + servers: Optional[Sequence['outputs.VpnServerConfigurationRadiusServer']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_root_certificates is None and 'clientRootCertificates' in kwargs: + client_root_certificates = kwargs['clientRootCertificates'] + if server_root_certificates is None and 'serverRootCertificates' in kwargs: + server_root_certificates = kwargs['serverRootCertificates'] + if client_root_certificates is not None: - pulumi.set(__self__, "client_root_certificates", client_root_certificates) + _setter("client_root_certificates", client_root_certificates) if server_root_certificates is not None: - pulumi.set(__self__, "server_root_certificates", server_root_certificates) + _setter("server_root_certificates", server_root_certificates) if servers is not None: - pulumi.set(__self__, "servers", servers) + _setter("servers", servers) @property @pulumi.getter(name="clientRootCertificates") @@ -12090,8 +16267,25 @@ def __init__(__self__, *, :param str name: A name used to uniquely identify this certificate. :param str thumbprint: The Thumbprint of the Certificate. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "thumbprint", thumbprint) + VpnServerConfigurationRadiusClientRootCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + + _setter("name", name) + _setter("thumbprint", thumbprint) @property @pulumi.getter @@ -12121,9 +16315,30 @@ def __init__(__self__, *, :param int score: The Score of the Radius Server determines the priority of the server. Ranges from 1 to 30. :param str secret: The Secret used to communicate with the Radius Server. """ - pulumi.set(__self__, "address", address) - pulumi.set(__self__, "score", score) - pulumi.set(__self__, "secret", secret) + VpnServerConfigurationRadiusServer._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + score=score, + secret=secret, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: Optional[str] = None, + score: Optional[int] = None, + secret: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address is None: + raise TypeError("Missing 'address' argument") + if score is None: + raise TypeError("Missing 'score' argument") + if secret is None: + raise TypeError("Missing 'secret' argument") + + _setter("address", address) + _setter("score", score) + _setter("secret", secret) @property @pulumi.getter @@ -12176,8 +16391,27 @@ def __init__(__self__, *, :param str name: A name used to uniquely identify this certificate. :param str public_cert_data: The Public Key Data associated with the Certificate. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_cert_data", public_cert_data) + VpnServerConfigurationRadiusServerRootCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + public_cert_data=public_cert_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + public_cert_data: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if public_cert_data is None and 'publicCertData' in kwargs: + public_cert_data = kwargs['publicCertData'] + if public_cert_data is None: + raise TypeError("Missing 'public_cert_data' argument") + + _setter("name", name) + _setter("public_cert_data", public_cert_data) @property @pulumi.getter @@ -12240,19 +16474,50 @@ def __init__(__self__, *, :param str provider_name: The name of the physical link at the VPN Site. Example: `ATT`, `Verizon`. :param int speed_in_mbps: The speed of the VPN device at the branch location in unit of mbps. Defaults to `0`. """ - pulumi.set(__self__, "name", name) + VpnSiteLink._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + bgp=bgp, + fqdn=fqdn, + id=id, + ip_address=ip_address, + provider_name=provider_name, + speed_in_mbps=speed_in_mbps, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + bgp: Optional['outputs.VpnSiteLinkBgp'] = None, + fqdn: Optional[str] = None, + id: Optional[str] = None, + ip_address: Optional[str] = None, + provider_name: Optional[str] = None, + speed_in_mbps: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if provider_name is None and 'providerName' in kwargs: + provider_name = kwargs['providerName'] + if speed_in_mbps is None and 'speedInMbps' in kwargs: + speed_in_mbps = kwargs['speedInMbps'] + + _setter("name", name) if bgp is not None: - pulumi.set(__self__, "bgp", bgp) + _setter("bgp", bgp) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if provider_name is not None: - pulumi.set(__self__, "provider_name", provider_name) + _setter("provider_name", provider_name) if speed_in_mbps is not None: - pulumi.set(__self__, "speed_in_mbps", speed_in_mbps) + _setter("speed_in_mbps", speed_in_mbps) @property @pulumi.getter @@ -12341,8 +16606,27 @@ def __init__(__self__, *, :param int asn: The BGP speaker's ASN. :param str peering_address: The BGP peering IP address. """ - pulumi.set(__self__, "asn", asn) - pulumi.set(__self__, "peering_address", peering_address) + VpnSiteLinkBgp._configure( + lambda key, value: pulumi.set(__self__, key, value), + asn=asn, + peering_address=peering_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asn: Optional[int] = None, + peering_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if asn is None: + raise TypeError("Missing 'asn' argument") + if peering_address is None and 'peeringAddress' in kwargs: + peering_address = kwargs['peeringAddress'] + if peering_address is None: + raise TypeError("Missing 'peering_address' argument") + + _setter("asn", asn) + _setter("peering_address", peering_address) @property @pulumi.getter @@ -12385,8 +16669,21 @@ def __init__(__self__, *, """ :param 'VpnSiteO365PolicyTrafficCategoryArgs' traffic_category: A `traffic_category` block as defined above. """ + VpnSiteO365Policy._configure( + lambda key, value: pulumi.set(__self__, key, value), + traffic_category=traffic_category, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + traffic_category: Optional['outputs.VpnSiteO365PolicyTrafficCategory'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if traffic_category is None and 'trafficCategory' in kwargs: + traffic_category = kwargs['trafficCategory'] + if traffic_category is not None: - pulumi.set(__self__, "traffic_category", traffic_category) + _setter("traffic_category", traffic_category) @property @pulumi.getter(name="trafficCategory") @@ -12429,12 +16726,33 @@ def __init__(__self__, *, :param bool default_endpoint_enabled: Is default endpoint enabled? The `Default` endpoint represents O365 services and dependencies that do not require any optimization, and can be treated by customer networks as normal Internet bound traffic. Defaults to `false`. :param bool optimize_endpoint_enabled: Is optimize endpoint enabled? The `Optimize` endpoint is required for connectivity to every O365 service and represents the O365 scenario that is the most sensitive to network performance, latency, and availability. Defaults to `false`. """ + VpnSiteO365PolicyTrafficCategory._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_endpoint_enabled=allow_endpoint_enabled, + default_endpoint_enabled=default_endpoint_enabled, + optimize_endpoint_enabled=optimize_endpoint_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_endpoint_enabled: Optional[bool] = None, + default_endpoint_enabled: Optional[bool] = None, + optimize_endpoint_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_endpoint_enabled is None and 'allowEndpointEnabled' in kwargs: + allow_endpoint_enabled = kwargs['allowEndpointEnabled'] + if default_endpoint_enabled is None and 'defaultEndpointEnabled' in kwargs: + default_endpoint_enabled = kwargs['defaultEndpointEnabled'] + if optimize_endpoint_enabled is None and 'optimizeEndpointEnabled' in kwargs: + optimize_endpoint_enabled = kwargs['optimizeEndpointEnabled'] + if allow_endpoint_enabled is not None: - pulumi.set(__self__, "allow_endpoint_enabled", allow_endpoint_enabled) + _setter("allow_endpoint_enabled", allow_endpoint_enabled) if default_endpoint_enabled is not None: - pulumi.set(__self__, "default_endpoint_enabled", default_endpoint_enabled) + _setter("default_endpoint_enabled", default_endpoint_enabled) if optimize_endpoint_enabled is not None: - pulumi.set(__self__, "optimize_endpoint_enabled", optimize_endpoint_enabled) + _setter("optimize_endpoint_enabled", optimize_endpoint_enabled) @property @pulumi.getter(name="allowEndpointEnabled") @@ -12470,8 +16788,25 @@ def __init__(__self__, *, :param str id: The ID of the Rewrite Rule Set :param str name: The name of this Application Gateway. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) + GetApplicationGatewayAuthenticationCertificateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("id", id) + _setter("name", name) @property @pulumi.getter @@ -12499,8 +16834,29 @@ def __init__(__self__, *, :param int max_capacity: Maximum capacity for autoscaling. :param int min_capacity: Minimum capacity for autoscaling. """ - pulumi.set(__self__, "max_capacity", max_capacity) - pulumi.set(__self__, "min_capacity", min_capacity) + GetApplicationGatewayAutoscaleConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_capacity=max_capacity, + min_capacity=min_capacity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_capacity: Optional[int] = None, + min_capacity: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_capacity is None and 'maxCapacity' in kwargs: + max_capacity = kwargs['maxCapacity'] + if max_capacity is None: + raise TypeError("Missing 'max_capacity' argument") + if min_capacity is None and 'minCapacity' in kwargs: + min_capacity = kwargs['minCapacity'] + if min_capacity is None: + raise TypeError("Missing 'min_capacity' argument") + + _setter("max_capacity", max_capacity) + _setter("min_capacity", min_capacity) @property @pulumi.getter(name="maxCapacity") @@ -12532,10 +16888,37 @@ def __init__(__self__, *, :param Sequence[str] ip_addresses: A list of IP Addresses which are part of the Backend Address Pool. :param str name: The name of this Application Gateway. """ - pulumi.set(__self__, "fqdns", fqdns) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "ip_addresses", ip_addresses) - pulumi.set(__self__, "name", name) + GetApplicationGatewayBackendAddressPoolResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdns=fqdns, + id=id, + ip_addresses=ip_addresses, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdns: Optional[Sequence[str]] = None, + id: Optional[str] = None, + ip_addresses: Optional[Sequence[str]] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fqdns is None: + raise TypeError("Missing 'fqdns' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if ip_addresses is None: + raise TypeError("Missing 'ip_addresses' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("fqdns", fqdns) + _setter("id", id) + _setter("ip_addresses", ip_addresses) + _setter("name", name) @property @pulumi.getter @@ -12605,21 +16988,110 @@ def __init__(__self__, *, :param int request_timeout: The request timeout in seconds. :param Sequence[str] trusted_root_certificate_names: A list of `trusted_root_certificate` names. """ - pulumi.set(__self__, "affinity_cookie_name", affinity_cookie_name) - pulumi.set(__self__, "authentication_certificates", authentication_certificates) - pulumi.set(__self__, "connection_drainings", connection_drainings) - pulumi.set(__self__, "cookie_based_affinity", cookie_based_affinity) - pulumi.set(__self__, "host_name", host_name) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "pick_host_name_from_backend_address", pick_host_name_from_backend_address) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "probe_id", probe_id) - pulumi.set(__self__, "probe_name", probe_name) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "request_timeout", request_timeout) - pulumi.set(__self__, "trusted_root_certificate_names", trusted_root_certificate_names) + GetApplicationGatewayBackendHttpSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + affinity_cookie_name=affinity_cookie_name, + authentication_certificates=authentication_certificates, + connection_drainings=connection_drainings, + cookie_based_affinity=cookie_based_affinity, + host_name=host_name, + id=id, + name=name, + path=path, + pick_host_name_from_backend_address=pick_host_name_from_backend_address, + port=port, + probe_id=probe_id, + probe_name=probe_name, + protocol=protocol, + request_timeout=request_timeout, + trusted_root_certificate_names=trusted_root_certificate_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + affinity_cookie_name: Optional[str] = None, + authentication_certificates: Optional[Sequence['outputs.GetApplicationGatewayBackendHttpSettingAuthenticationCertificateResult']] = None, + connection_drainings: Optional[Sequence['outputs.GetApplicationGatewayBackendHttpSettingConnectionDrainingResult']] = None, + cookie_based_affinity: Optional[str] = None, + host_name: Optional[str] = None, + id: Optional[str] = None, + name: Optional[str] = None, + path: Optional[str] = None, + pick_host_name_from_backend_address: Optional[bool] = None, + port: Optional[int] = None, + probe_id: Optional[str] = None, + probe_name: Optional[str] = None, + protocol: Optional[str] = None, + request_timeout: Optional[int] = None, + trusted_root_certificate_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if affinity_cookie_name is None and 'affinityCookieName' in kwargs: + affinity_cookie_name = kwargs['affinityCookieName'] + if affinity_cookie_name is None: + raise TypeError("Missing 'affinity_cookie_name' argument") + if authentication_certificates is None and 'authenticationCertificates' in kwargs: + authentication_certificates = kwargs['authenticationCertificates'] + if authentication_certificates is None: + raise TypeError("Missing 'authentication_certificates' argument") + if connection_drainings is None and 'connectionDrainings' in kwargs: + connection_drainings = kwargs['connectionDrainings'] + if connection_drainings is None: + raise TypeError("Missing 'connection_drainings' argument") + if cookie_based_affinity is None and 'cookieBasedAffinity' in kwargs: + cookie_based_affinity = kwargs['cookieBasedAffinity'] + if cookie_based_affinity is None: + raise TypeError("Missing 'cookie_based_affinity' argument") + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if pick_host_name_from_backend_address is None and 'pickHostNameFromBackendAddress' in kwargs: + pick_host_name_from_backend_address = kwargs['pickHostNameFromBackendAddress'] + if pick_host_name_from_backend_address is None: + raise TypeError("Missing 'pick_host_name_from_backend_address' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if probe_id is None and 'probeId' in kwargs: + probe_id = kwargs['probeId'] + if probe_id is None: + raise TypeError("Missing 'probe_id' argument") + if probe_name is None and 'probeName' in kwargs: + probe_name = kwargs['probeName'] + if probe_name is None: + raise TypeError("Missing 'probe_name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if request_timeout is None and 'requestTimeout' in kwargs: + request_timeout = kwargs['requestTimeout'] + if request_timeout is None: + raise TypeError("Missing 'request_timeout' argument") + if trusted_root_certificate_names is None and 'trustedRootCertificateNames' in kwargs: + trusted_root_certificate_names = kwargs['trustedRootCertificateNames'] + if trusted_root_certificate_names is None: + raise TypeError("Missing 'trusted_root_certificate_names' argument") + + _setter("affinity_cookie_name", affinity_cookie_name) + _setter("authentication_certificates", authentication_certificates) + _setter("connection_drainings", connection_drainings) + _setter("cookie_based_affinity", cookie_based_affinity) + _setter("host_name", host_name) + _setter("id", id) + _setter("name", name) + _setter("path", path) + _setter("pick_host_name_from_backend_address", pick_host_name_from_backend_address) + _setter("port", port) + _setter("probe_id", probe_id) + _setter("probe_name", probe_name) + _setter("protocol", protocol) + _setter("request_timeout", request_timeout) + _setter("trusted_root_certificate_names", trusted_root_certificate_names) @property @pulumi.getter(name="affinityCookieName") @@ -12751,8 +17223,25 @@ def __init__(__self__, *, :param str id: The ID of the Rewrite Rule Set :param str name: The name of this Application Gateway. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) + GetApplicationGatewayBackendHttpSettingAuthenticationCertificateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("id", id) + _setter("name", name) @property @pulumi.getter @@ -12780,8 +17269,27 @@ def __init__(__self__, *, :param int drain_timeout_sec: The number of seconds connection draining is active. :param bool enabled: Is the Web Application Firewall enabled? """ - pulumi.set(__self__, "drain_timeout_sec", drain_timeout_sec) - pulumi.set(__self__, "enabled", enabled) + GetApplicationGatewayBackendHttpSettingConnectionDrainingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + drain_timeout_sec=drain_timeout_sec, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + drain_timeout_sec: Optional[int] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if drain_timeout_sec is None and 'drainTimeoutSec' in kwargs: + drain_timeout_sec = kwargs['drainTimeoutSec'] + if drain_timeout_sec is None: + raise TypeError("Missing 'drain_timeout_sec' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + + _setter("drain_timeout_sec", drain_timeout_sec) + _setter("enabled", enabled) @property @pulumi.getter(name="drainTimeoutSec") @@ -12811,9 +17319,34 @@ def __init__(__self__, *, :param str id: The ID of the Rewrite Rule Set :param str status_code: Status code of the application gateway custom error. """ - pulumi.set(__self__, "custom_error_page_url", custom_error_page_url) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "status_code", status_code) + GetApplicationGatewayCustomErrorConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_error_page_url=custom_error_page_url, + id=id, + status_code=status_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_error_page_url: Optional[str] = None, + id: Optional[str] = None, + status_code: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_error_page_url is None and 'customErrorPageUrl' in kwargs: + custom_error_page_url = kwargs['customErrorPageUrl'] + if custom_error_page_url is None: + raise TypeError("Missing 'custom_error_page_url' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if status_code is None and 'statusCode' in kwargs: + status_code = kwargs['statusCode'] + if status_code is None: + raise TypeError("Missing 'status_code' argument") + + _setter("custom_error_page_url", custom_error_page_url) + _setter("id", id) + _setter("status_code", status_code) @property @pulumi.getter(name="customErrorPageUrl") @@ -12861,14 +17394,67 @@ def __init__(__self__, *, :param str public_ip_address_id: The ID of the Public IP Address which the Application Gateway will use. :param str subnet_id: The ID of the subnet the private link configuration is connected to. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) - pulumi.set(__self__, "private_link_configuration_id", private_link_configuration_id) - pulumi.set(__self__, "private_link_configuration_name", private_link_configuration_name) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) + GetApplicationGatewayFrontendIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + private_ip_address=private_ip_address, + private_ip_address_allocation=private_ip_address_allocation, + private_link_configuration_id=private_link_configuration_id, + private_link_configuration_name=private_link_configuration_name, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_address_allocation: Optional[str] = None, + private_link_configuration_id: Optional[str] = None, + private_link_configuration_name: Optional[str] = None, + public_ip_address_id: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + if private_ip_address_allocation is None: + raise TypeError("Missing 'private_ip_address_allocation' argument") + if private_link_configuration_id is None and 'privateLinkConfigurationId' in kwargs: + private_link_configuration_id = kwargs['privateLinkConfigurationId'] + if private_link_configuration_id is None: + raise TypeError("Missing 'private_link_configuration_id' argument") + if private_link_configuration_name is None and 'privateLinkConfigurationName' in kwargs: + private_link_configuration_name = kwargs['privateLinkConfigurationName'] + if private_link_configuration_name is None: + raise TypeError("Missing 'private_link_configuration_name' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("id", id) + _setter("name", name) + _setter("private_ip_address", private_ip_address) + _setter("private_ip_address_allocation", private_ip_address_allocation) + _setter("private_link_configuration_id", private_link_configuration_id) + _setter("private_link_configuration_name", private_link_configuration_name) + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -12946,9 +17532,30 @@ def __init__(__self__, *, :param str name: The name of this Application Gateway. :param int port: Custom port which is used for probing the backend servers. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "port", port) + GetApplicationGatewayFrontendPortResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + port=port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + port: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if port is None: + raise TypeError("Missing 'port' argument") + + _setter("id", id) + _setter("name", name) + _setter("port", port) @property @pulumi.getter @@ -12986,9 +17593,32 @@ def __init__(__self__, *, :param str name: The name of this Application Gateway. :param str subnet_id: The ID of the subnet the private link configuration is connected to. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "subnet_id", subnet_id) + GetApplicationGatewayGatewayIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("id", id) + _setter("name", name) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -13024,8 +17654,29 @@ def __init__(__self__, *, :param bool request_buffering_enabled: Whether Application Gateway's Request buffer is enabled. :param bool response_buffering_enabled: Whether Application Gateway's Response buffer is enabled. """ - pulumi.set(__self__, "request_buffering_enabled", request_buffering_enabled) - pulumi.set(__self__, "response_buffering_enabled", response_buffering_enabled) + GetApplicationGatewayGlobalResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + request_buffering_enabled=request_buffering_enabled, + response_buffering_enabled=response_buffering_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + request_buffering_enabled: Optional[bool] = None, + response_buffering_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if request_buffering_enabled is None and 'requestBufferingEnabled' in kwargs: + request_buffering_enabled = kwargs['requestBufferingEnabled'] + if request_buffering_enabled is None: + raise TypeError("Missing 'request_buffering_enabled' argument") + if response_buffering_enabled is None and 'responseBufferingEnabled' in kwargs: + response_buffering_enabled = kwargs['responseBufferingEnabled'] + if response_buffering_enabled is None: + raise TypeError("Missing 'response_buffering_enabled' argument") + + _setter("request_buffering_enabled", request_buffering_enabled) + _setter("response_buffering_enabled", response_buffering_enabled) @property @pulumi.getter(name="requestBufferingEnabled") @@ -13081,22 +17732,121 @@ def __init__(__self__, *, :param str ssl_profile_id: The ID of the associated SSL Profile. :param str ssl_profile_name: The name of the associated SSL Profile which is used for this HTTP Listener. """ - pulumi.set(__self__, "custom_error_configurations", custom_error_configurations) - pulumi.set(__self__, "firewall_policy_id", firewall_policy_id) - pulumi.set(__self__, "frontend_ip_configuration_id", frontend_ip_configuration_id) - pulumi.set(__self__, "frontend_ip_configuration_name", frontend_ip_configuration_name) - pulumi.set(__self__, "frontend_port_id", frontend_port_id) - pulumi.set(__self__, "frontend_port_name", frontend_port_name) - pulumi.set(__self__, "host_name", host_name) - pulumi.set(__self__, "host_names", host_names) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "require_sni", require_sni) - pulumi.set(__self__, "ssl_certificate_id", ssl_certificate_id) - pulumi.set(__self__, "ssl_certificate_name", ssl_certificate_name) - pulumi.set(__self__, "ssl_profile_id", ssl_profile_id) - pulumi.set(__self__, "ssl_profile_name", ssl_profile_name) + GetApplicationGatewayHttpListenerResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_error_configurations=custom_error_configurations, + firewall_policy_id=firewall_policy_id, + frontend_ip_configuration_id=frontend_ip_configuration_id, + frontend_ip_configuration_name=frontend_ip_configuration_name, + frontend_port_id=frontend_port_id, + frontend_port_name=frontend_port_name, + host_name=host_name, + host_names=host_names, + id=id, + name=name, + protocol=protocol, + require_sni=require_sni, + ssl_certificate_id=ssl_certificate_id, + ssl_certificate_name=ssl_certificate_name, + ssl_profile_id=ssl_profile_id, + ssl_profile_name=ssl_profile_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_error_configurations: Optional[Sequence['outputs.GetApplicationGatewayHttpListenerCustomErrorConfigurationResult']] = None, + firewall_policy_id: Optional[str] = None, + frontend_ip_configuration_id: Optional[str] = None, + frontend_ip_configuration_name: Optional[str] = None, + frontend_port_id: Optional[str] = None, + frontend_port_name: Optional[str] = None, + host_name: Optional[str] = None, + host_names: Optional[Sequence[str]] = None, + id: Optional[str] = None, + name: Optional[str] = None, + protocol: Optional[str] = None, + require_sni: Optional[bool] = None, + ssl_certificate_id: Optional[str] = None, + ssl_certificate_name: Optional[str] = None, + ssl_profile_id: Optional[str] = None, + ssl_profile_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_error_configurations is None and 'customErrorConfigurations' in kwargs: + custom_error_configurations = kwargs['customErrorConfigurations'] + if custom_error_configurations is None: + raise TypeError("Missing 'custom_error_configurations' argument") + if firewall_policy_id is None and 'firewallPolicyId' in kwargs: + firewall_policy_id = kwargs['firewallPolicyId'] + if firewall_policy_id is None: + raise TypeError("Missing 'firewall_policy_id' argument") + if frontend_ip_configuration_id is None and 'frontendIpConfigurationId' in kwargs: + frontend_ip_configuration_id = kwargs['frontendIpConfigurationId'] + if frontend_ip_configuration_id is None: + raise TypeError("Missing 'frontend_ip_configuration_id' argument") + if frontend_ip_configuration_name is None and 'frontendIpConfigurationName' in kwargs: + frontend_ip_configuration_name = kwargs['frontendIpConfigurationName'] + if frontend_ip_configuration_name is None: + raise TypeError("Missing 'frontend_ip_configuration_name' argument") + if frontend_port_id is None and 'frontendPortId' in kwargs: + frontend_port_id = kwargs['frontendPortId'] + if frontend_port_id is None: + raise TypeError("Missing 'frontend_port_id' argument") + if frontend_port_name is None and 'frontendPortName' in kwargs: + frontend_port_name = kwargs['frontendPortName'] + if frontend_port_name is None: + raise TypeError("Missing 'frontend_port_name' argument") + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if host_names is None and 'hostNames' in kwargs: + host_names = kwargs['hostNames'] + if host_names is None: + raise TypeError("Missing 'host_names' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if require_sni is None and 'requireSni' in kwargs: + require_sni = kwargs['requireSni'] + if require_sni is None: + raise TypeError("Missing 'require_sni' argument") + if ssl_certificate_id is None and 'sslCertificateId' in kwargs: + ssl_certificate_id = kwargs['sslCertificateId'] + if ssl_certificate_id is None: + raise TypeError("Missing 'ssl_certificate_id' argument") + if ssl_certificate_name is None and 'sslCertificateName' in kwargs: + ssl_certificate_name = kwargs['sslCertificateName'] + if ssl_certificate_name is None: + raise TypeError("Missing 'ssl_certificate_name' argument") + if ssl_profile_id is None and 'sslProfileId' in kwargs: + ssl_profile_id = kwargs['sslProfileId'] + if ssl_profile_id is None: + raise TypeError("Missing 'ssl_profile_id' argument") + if ssl_profile_name is None and 'sslProfileName' in kwargs: + ssl_profile_name = kwargs['sslProfileName'] + if ssl_profile_name is None: + raise TypeError("Missing 'ssl_profile_name' argument") + + _setter("custom_error_configurations", custom_error_configurations) + _setter("firewall_policy_id", firewall_policy_id) + _setter("frontend_ip_configuration_id", frontend_ip_configuration_id) + _setter("frontend_ip_configuration_name", frontend_ip_configuration_name) + _setter("frontend_port_id", frontend_port_id) + _setter("frontend_port_name", frontend_port_name) + _setter("host_name", host_name) + _setter("host_names", host_names) + _setter("id", id) + _setter("name", name) + _setter("protocol", protocol) + _setter("require_sni", require_sni) + _setter("ssl_certificate_id", ssl_certificate_id) + _setter("ssl_certificate_name", ssl_certificate_name) + _setter("ssl_profile_id", ssl_profile_id) + _setter("ssl_profile_name", ssl_profile_name) @property @pulumi.getter(name="customErrorConfigurations") @@ -13238,9 +17988,34 @@ def __init__(__self__, *, :param str id: The ID of the Rewrite Rule Set :param str status_code: Status code of the application gateway custom error. """ - pulumi.set(__self__, "custom_error_page_url", custom_error_page_url) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "status_code", status_code) + GetApplicationGatewayHttpListenerCustomErrorConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_error_page_url=custom_error_page_url, + id=id, + status_code=status_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_error_page_url: Optional[str] = None, + id: Optional[str] = None, + status_code: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_error_page_url is None and 'customErrorPageUrl' in kwargs: + custom_error_page_url = kwargs['customErrorPageUrl'] + if custom_error_page_url is None: + raise TypeError("Missing 'custom_error_page_url' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if status_code is None and 'statusCode' in kwargs: + status_code = kwargs['statusCode'] + if status_code is None: + raise TypeError("Missing 'status_code' argument") + + _setter("custom_error_page_url", custom_error_page_url) + _setter("id", id) + _setter("status_code", status_code) @property @pulumi.getter(name="customErrorPageUrl") @@ -13276,8 +18051,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: The list of User Assigned Managed Identity IDs assigned to this Application Gateway. :param str type: The type of Managed Service Identity that is configured on this Application Gateway. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + GetApplicationGatewayIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -13305,8 +18099,25 @@ def __init__(__self__, *, :param str id: The ID of the Rewrite Rule Set :param str name: The name of this Application Gateway. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) + GetApplicationGatewayPrivateEndpointConnectionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("id", id) + _setter("name", name) @property @pulumi.getter @@ -13336,9 +18147,32 @@ def __init__(__self__, *, :param Sequence['GetApplicationGatewayPrivateLinkConfigurationIpConfigurationArgs'] ip_configurations: One or more `ip_configuration` blocks as defined below. :param str name: The name of this Application Gateway. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "name", name) + GetApplicationGatewayPrivateLinkConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + ip_configurations=ip_configurations, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + ip_configurations: Optional[Sequence['outputs.GetApplicationGatewayPrivateLinkConfigurationIpConfigurationResult']] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("id", id) + _setter("ip_configurations", ip_configurations) + _setter("name", name) @property @pulumi.getter @@ -13380,11 +18214,46 @@ def __init__(__self__, *, :param str private_ip_address_allocation: The allocation method used for the Private IP Address. :param str subnet_id: The ID of the subnet the private link configuration is connected to. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "primary", primary) - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) - pulumi.set(__self__, "subnet_id", subnet_id) + GetApplicationGatewayPrivateLinkConfigurationIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + primary=primary, + private_ip_address=private_ip_address, + private_ip_address_allocation=private_ip_address_allocation, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + primary: Optional[bool] = None, + private_ip_address: Optional[str] = None, + private_ip_address_allocation: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + if private_ip_address_allocation is None: + raise TypeError("Missing 'private_ip_address_allocation' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("name", name) + _setter("primary", primary) + _setter("private_ip_address", private_ip_address) + _setter("private_ip_address_allocation", private_ip_address_allocation) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -13456,18 +18325,81 @@ def __init__(__self__, *, :param int timeout: The Timeout used for this Probe, indicating when a probe becomes unhealthy. :param int unhealthy_threshold: The Unhealthy Threshold for this Probe, which indicates the amount of retries which will be attempted before a node is deemed unhealthy. """ - pulumi.set(__self__, "host", host) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "interval", interval) - pulumi.set(__self__, "matches", matches) - pulumi.set(__self__, "minimum_servers", minimum_servers) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "pick_host_name_from_backend_http_settings", pick_host_name_from_backend_http_settings) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "timeout", timeout) - pulumi.set(__self__, "unhealthy_threshold", unhealthy_threshold) + GetApplicationGatewayProbeResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + host=host, + id=id, + interval=interval, + matches=matches, + minimum_servers=minimum_servers, + name=name, + path=path, + pick_host_name_from_backend_http_settings=pick_host_name_from_backend_http_settings, + port=port, + protocol=protocol, + timeout=timeout, + unhealthy_threshold=unhealthy_threshold, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host: Optional[str] = None, + id: Optional[str] = None, + interval: Optional[int] = None, + matches: Optional[Sequence['outputs.GetApplicationGatewayProbeMatchResult']] = None, + minimum_servers: Optional[int] = None, + name: Optional[str] = None, + path: Optional[str] = None, + pick_host_name_from_backend_http_settings: Optional[bool] = None, + port: Optional[int] = None, + protocol: Optional[str] = None, + timeout: Optional[int] = None, + unhealthy_threshold: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host is None: + raise TypeError("Missing 'host' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if interval is None: + raise TypeError("Missing 'interval' argument") + if matches is None: + raise TypeError("Missing 'matches' argument") + if minimum_servers is None and 'minimumServers' in kwargs: + minimum_servers = kwargs['minimumServers'] + if minimum_servers is None: + raise TypeError("Missing 'minimum_servers' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if pick_host_name_from_backend_http_settings is None and 'pickHostNameFromBackendHttpSettings' in kwargs: + pick_host_name_from_backend_http_settings = kwargs['pickHostNameFromBackendHttpSettings'] + if pick_host_name_from_backend_http_settings is None: + raise TypeError("Missing 'pick_host_name_from_backend_http_settings' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if timeout is None: + raise TypeError("Missing 'timeout' argument") + if unhealthy_threshold is None and 'unhealthyThreshold' in kwargs: + unhealthy_threshold = kwargs['unhealthyThreshold'] + if unhealthy_threshold is None: + raise TypeError("Missing 'unhealthy_threshold' argument") + + _setter("host", host) + _setter("id", id) + _setter("interval", interval) + _setter("matches", matches) + _setter("minimum_servers", minimum_servers) + _setter("name", name) + _setter("path", path) + _setter("pick_host_name_from_backend_http_settings", pick_host_name_from_backend_http_settings) + _setter("port", port) + _setter("protocol", protocol) + _setter("timeout", timeout) + _setter("unhealthy_threshold", unhealthy_threshold) @property @pulumi.getter @@ -13575,8 +18507,27 @@ def __init__(__self__, *, :param str body: A snippet from the Response Body which must be present in the Response. :param Sequence[str] status_codes: Status code of the application gateway custom error. """ - pulumi.set(__self__, "body", body) - pulumi.set(__self__, "status_codes", status_codes) + GetApplicationGatewayProbeMatchResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + body=body, + status_codes=status_codes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body: Optional[str] = None, + status_codes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body is None: + raise TypeError("Missing 'body' argument") + if status_codes is None and 'statusCodes' in kwargs: + status_codes = kwargs['statusCodes'] + if status_codes is None: + raise TypeError("Missing 'status_codes' argument") + + _setter("body", body) + _setter("status_codes", status_codes) @property @pulumi.getter @@ -13615,14 +18566,67 @@ def __init__(__self__, *, :param str target_listener_name: The name of the listener to redirect to. :param str target_url: The URL to redirect the request to. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "include_path", include_path) - pulumi.set(__self__, "include_query_string", include_query_string) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "redirect_type", redirect_type) - pulumi.set(__self__, "target_listener_id", target_listener_id) - pulumi.set(__self__, "target_listener_name", target_listener_name) - pulumi.set(__self__, "target_url", target_url) + GetApplicationGatewayRedirectConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + include_path=include_path, + include_query_string=include_query_string, + name=name, + redirect_type=redirect_type, + target_listener_id=target_listener_id, + target_listener_name=target_listener_name, + target_url=target_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + include_path: Optional[bool] = None, + include_query_string: Optional[bool] = None, + name: Optional[str] = None, + redirect_type: Optional[str] = None, + target_listener_id: Optional[str] = None, + target_listener_name: Optional[str] = None, + target_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if include_path is None and 'includePath' in kwargs: + include_path = kwargs['includePath'] + if include_path is None: + raise TypeError("Missing 'include_path' argument") + if include_query_string is None and 'includeQueryString' in kwargs: + include_query_string = kwargs['includeQueryString'] + if include_query_string is None: + raise TypeError("Missing 'include_query_string' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if redirect_type is None and 'redirectType' in kwargs: + redirect_type = kwargs['redirectType'] + if redirect_type is None: + raise TypeError("Missing 'redirect_type' argument") + if target_listener_id is None and 'targetListenerId' in kwargs: + target_listener_id = kwargs['targetListenerId'] + if target_listener_id is None: + raise TypeError("Missing 'target_listener_id' argument") + if target_listener_name is None and 'targetListenerName' in kwargs: + target_listener_name = kwargs['targetListenerName'] + if target_listener_name is None: + raise TypeError("Missing 'target_listener_name' argument") + if target_url is None and 'targetUrl' in kwargs: + target_url = kwargs['targetUrl'] + if target_url is None: + raise TypeError("Missing 'target_url' argument") + + _setter("id", id) + _setter("include_path", include_path) + _setter("include_query_string", include_query_string) + _setter("name", name) + _setter("redirect_type", redirect_type) + _setter("target_listener_id", target_listener_id) + _setter("target_listener_name", target_listener_name) + _setter("target_url", target_url) @property @pulumi.getter @@ -13723,22 +18727,121 @@ def __init__(__self__, *, :param str url_path_map_id: The ID of the associated URL Path Map. :param str url_path_map_name: The Name of the URL Path Map which is associated with this Routing Rule. """ - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) - pulumi.set(__self__, "backend_address_pool_name", backend_address_pool_name) - pulumi.set(__self__, "backend_http_settings_id", backend_http_settings_id) - pulumi.set(__self__, "backend_http_settings_name", backend_http_settings_name) - pulumi.set(__self__, "http_listener_id", http_listener_id) - pulumi.set(__self__, "http_listener_name", http_listener_name) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "redirect_configuration_id", redirect_configuration_id) - pulumi.set(__self__, "redirect_configuration_name", redirect_configuration_name) - pulumi.set(__self__, "rewrite_rule_set_id", rewrite_rule_set_id) - pulumi.set(__self__, "rewrite_rule_set_name", rewrite_rule_set_name) - pulumi.set(__self__, "rule_type", rule_type) - pulumi.set(__self__, "url_path_map_id", url_path_map_id) - pulumi.set(__self__, "url_path_map_name", url_path_map_name) + GetApplicationGatewayRequestRoutingRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_address_pool_id=backend_address_pool_id, + backend_address_pool_name=backend_address_pool_name, + backend_http_settings_id=backend_http_settings_id, + backend_http_settings_name=backend_http_settings_name, + http_listener_id=http_listener_id, + http_listener_name=http_listener_name, + id=id, + name=name, + priority=priority, + redirect_configuration_id=redirect_configuration_id, + redirect_configuration_name=redirect_configuration_name, + rewrite_rule_set_id=rewrite_rule_set_id, + rewrite_rule_set_name=rewrite_rule_set_name, + rule_type=rule_type, + url_path_map_id=url_path_map_id, + url_path_map_name=url_path_map_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_address_pool_id: Optional[str] = None, + backend_address_pool_name: Optional[str] = None, + backend_http_settings_id: Optional[str] = None, + backend_http_settings_name: Optional[str] = None, + http_listener_id: Optional[str] = None, + http_listener_name: Optional[str] = None, + id: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + redirect_configuration_id: Optional[str] = None, + redirect_configuration_name: Optional[str] = None, + rewrite_rule_set_id: Optional[str] = None, + rewrite_rule_set_name: Optional[str] = None, + rule_type: Optional[str] = None, + url_path_map_id: Optional[str] = None, + url_path_map_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if backend_address_pool_id is None: + raise TypeError("Missing 'backend_address_pool_id' argument") + if backend_address_pool_name is None and 'backendAddressPoolName' in kwargs: + backend_address_pool_name = kwargs['backendAddressPoolName'] + if backend_address_pool_name is None: + raise TypeError("Missing 'backend_address_pool_name' argument") + if backend_http_settings_id is None and 'backendHttpSettingsId' in kwargs: + backend_http_settings_id = kwargs['backendHttpSettingsId'] + if backend_http_settings_id is None: + raise TypeError("Missing 'backend_http_settings_id' argument") + if backend_http_settings_name is None and 'backendHttpSettingsName' in kwargs: + backend_http_settings_name = kwargs['backendHttpSettingsName'] + if backend_http_settings_name is None: + raise TypeError("Missing 'backend_http_settings_name' argument") + if http_listener_id is None and 'httpListenerId' in kwargs: + http_listener_id = kwargs['httpListenerId'] + if http_listener_id is None: + raise TypeError("Missing 'http_listener_id' argument") + if http_listener_name is None and 'httpListenerName' in kwargs: + http_listener_name = kwargs['httpListenerName'] + if http_listener_name is None: + raise TypeError("Missing 'http_listener_name' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if redirect_configuration_id is None and 'redirectConfigurationId' in kwargs: + redirect_configuration_id = kwargs['redirectConfigurationId'] + if redirect_configuration_id is None: + raise TypeError("Missing 'redirect_configuration_id' argument") + if redirect_configuration_name is None and 'redirectConfigurationName' in kwargs: + redirect_configuration_name = kwargs['redirectConfigurationName'] + if redirect_configuration_name is None: + raise TypeError("Missing 'redirect_configuration_name' argument") + if rewrite_rule_set_id is None and 'rewriteRuleSetId' in kwargs: + rewrite_rule_set_id = kwargs['rewriteRuleSetId'] + if rewrite_rule_set_id is None: + raise TypeError("Missing 'rewrite_rule_set_id' argument") + if rewrite_rule_set_name is None and 'rewriteRuleSetName' in kwargs: + rewrite_rule_set_name = kwargs['rewriteRuleSetName'] + if rewrite_rule_set_name is None: + raise TypeError("Missing 'rewrite_rule_set_name' argument") + if rule_type is None and 'ruleType' in kwargs: + rule_type = kwargs['ruleType'] + if rule_type is None: + raise TypeError("Missing 'rule_type' argument") + if url_path_map_id is None and 'urlPathMapId' in kwargs: + url_path_map_id = kwargs['urlPathMapId'] + if url_path_map_id is None: + raise TypeError("Missing 'url_path_map_id' argument") + if url_path_map_name is None and 'urlPathMapName' in kwargs: + url_path_map_name = kwargs['urlPathMapName'] + if url_path_map_name is None: + raise TypeError("Missing 'url_path_map_name' argument") + + _setter("backend_address_pool_id", backend_address_pool_id) + _setter("backend_address_pool_name", backend_address_pool_name) + _setter("backend_http_settings_id", backend_http_settings_id) + _setter("backend_http_settings_name", backend_http_settings_name) + _setter("http_listener_id", http_listener_id) + _setter("http_listener_name", http_listener_name) + _setter("id", id) + _setter("name", name) + _setter("priority", priority) + _setter("redirect_configuration_id", redirect_configuration_id) + _setter("redirect_configuration_name", redirect_configuration_name) + _setter("rewrite_rule_set_id", rewrite_rule_set_id) + _setter("rewrite_rule_set_name", rewrite_rule_set_name) + _setter("rule_type", rule_type) + _setter("url_path_map_id", url_path_map_id) + _setter("url_path_map_name", url_path_map_name) @property @pulumi.getter(name="backendAddressPoolId") @@ -13880,9 +18983,32 @@ def __init__(__self__, *, :param str name: The name of this Application Gateway. :param Sequence['GetApplicationGatewayRewriteRuleSetRewriteRuleArgs'] rewrite_rules: One or more `rewrite_rule` blocks as defined below. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "rewrite_rules", rewrite_rules) + GetApplicationGatewayRewriteRuleSetResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + rewrite_rules=rewrite_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + rewrite_rules: Optional[Sequence['outputs.GetApplicationGatewayRewriteRuleSetRewriteRuleResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if rewrite_rules is None and 'rewriteRules' in kwargs: + rewrite_rules = kwargs['rewriteRules'] + if rewrite_rules is None: + raise TypeError("Missing 'rewrite_rules' argument") + + _setter("id", id) + _setter("name", name) + _setter("rewrite_rules", rewrite_rules) @property @pulumi.getter @@ -13926,12 +19052,51 @@ def __init__(__self__, *, :param int rule_sequence: Rule sequence of the Rewrite Rule that determines the order of execution in a set. :param Sequence['GetApplicationGatewayRewriteRuleSetRewriteRuleUrlArgs'] urls: One `url` block as defined below """ - pulumi.set(__self__, "conditions", conditions) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "request_header_configurations", request_header_configurations) - pulumi.set(__self__, "response_header_configurations", response_header_configurations) - pulumi.set(__self__, "rule_sequence", rule_sequence) - pulumi.set(__self__, "urls", urls) + GetApplicationGatewayRewriteRuleSetRewriteRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + conditions=conditions, + name=name, + request_header_configurations=request_header_configurations, + response_header_configurations=response_header_configurations, + rule_sequence=rule_sequence, + urls=urls, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + conditions: Optional[Sequence['outputs.GetApplicationGatewayRewriteRuleSetRewriteRuleConditionResult']] = None, + name: Optional[str] = None, + request_header_configurations: Optional[Sequence['outputs.GetApplicationGatewayRewriteRuleSetRewriteRuleRequestHeaderConfigurationResult']] = None, + response_header_configurations: Optional[Sequence['outputs.GetApplicationGatewayRewriteRuleSetRewriteRuleResponseHeaderConfigurationResult']] = None, + rule_sequence: Optional[int] = None, + urls: Optional[Sequence['outputs.GetApplicationGatewayRewriteRuleSetRewriteRuleUrlResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if conditions is None: + raise TypeError("Missing 'conditions' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if request_header_configurations is None and 'requestHeaderConfigurations' in kwargs: + request_header_configurations = kwargs['requestHeaderConfigurations'] + if request_header_configurations is None: + raise TypeError("Missing 'request_header_configurations' argument") + if response_header_configurations is None and 'responseHeaderConfigurations' in kwargs: + response_header_configurations = kwargs['responseHeaderConfigurations'] + if response_header_configurations is None: + raise TypeError("Missing 'response_header_configurations' argument") + if rule_sequence is None and 'ruleSequence' in kwargs: + rule_sequence = kwargs['ruleSequence'] + if rule_sequence is None: + raise TypeError("Missing 'rule_sequence' argument") + if urls is None: + raise TypeError("Missing 'urls' argument") + + _setter("conditions", conditions) + _setter("name", name) + _setter("request_header_configurations", request_header_configurations) + _setter("response_header_configurations", response_header_configurations) + _setter("rule_sequence", rule_sequence) + _setter("urls", urls) @property @pulumi.getter @@ -13995,10 +19160,37 @@ def __init__(__self__, *, :param str pattern: The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition. :param str variable: The [variable](https://docs.microsoft.com/azure/application-gateway/rewrite-http-headers#server-variables) of the condition. """ - pulumi.set(__self__, "ignore_case", ignore_case) - pulumi.set(__self__, "negate", negate) - pulumi.set(__self__, "pattern", pattern) - pulumi.set(__self__, "variable", variable) + GetApplicationGatewayRewriteRuleSetRewriteRuleConditionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + ignore_case=ignore_case, + negate=negate, + pattern=pattern, + variable=variable, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ignore_case: Optional[bool] = None, + negate: Optional[bool] = None, + pattern: Optional[str] = None, + variable: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ignore_case is None and 'ignoreCase' in kwargs: + ignore_case = kwargs['ignoreCase'] + if ignore_case is None: + raise TypeError("Missing 'ignore_case' argument") + if negate is None: + raise TypeError("Missing 'negate' argument") + if pattern is None: + raise TypeError("Missing 'pattern' argument") + if variable is None: + raise TypeError("Missing 'variable' argument") + + _setter("ignore_case", ignore_case) + _setter("negate", negate) + _setter("pattern", pattern) + _setter("variable", variable) @property @pulumi.getter(name="ignoreCase") @@ -14042,8 +19234,29 @@ def __init__(__self__, *, :param str header_name: Header name of the header configuration. :param str header_value: Header value of the header configuration. """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "header_value", header_value) + GetApplicationGatewayRewriteRuleSetRewriteRuleRequestHeaderConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + header_value=header_value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[str] = None, + header_value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if header_value is None and 'headerValue' in kwargs: + header_value = kwargs['headerValue'] + if header_value is None: + raise TypeError("Missing 'header_value' argument") + + _setter("header_name", header_name) + _setter("header_value", header_value) @property @pulumi.getter(name="headerName") @@ -14071,8 +19284,29 @@ def __init__(__self__, *, :param str header_name: Header name of the header configuration. :param str header_value: Header value of the header configuration. """ - pulumi.set(__self__, "header_name", header_name) - pulumi.set(__self__, "header_value", header_value) + GetApplicationGatewayRewriteRuleSetRewriteRuleResponseHeaderConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + header_name=header_name, + header_value=header_value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + header_name: Optional[str] = None, + header_value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if header_name is None and 'headerName' in kwargs: + header_name = kwargs['headerName'] + if header_name is None: + raise TypeError("Missing 'header_name' argument") + if header_value is None and 'headerValue' in kwargs: + header_value = kwargs['headerValue'] + if header_value is None: + raise TypeError("Missing 'header_value' argument") + + _setter("header_name", header_name) + _setter("header_value", header_value) @property @pulumi.getter(name="headerName") @@ -14104,10 +19338,37 @@ def __init__(__self__, *, :param str query_string: The query string to rewrite. :param bool reroute: Whether the URL path map is reevaluated after this rewrite has been applied. """ - pulumi.set(__self__, "components", components) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "query_string", query_string) - pulumi.set(__self__, "reroute", reroute) + GetApplicationGatewayRewriteRuleSetRewriteRuleUrlResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + components=components, + path=path, + query_string=query_string, + reroute=reroute, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + components: Optional[str] = None, + path: Optional[str] = None, + query_string: Optional[str] = None, + reroute: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if components is None: + raise TypeError("Missing 'components' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if query_string is None and 'queryString' in kwargs: + query_string = kwargs['queryString'] + if query_string is None: + raise TypeError("Missing 'query_string' argument") + if reroute is None: + raise TypeError("Missing 'reroute' argument") + + _setter("components", components) + _setter("path", path) + _setter("query_string", query_string) + _setter("reroute", reroute) @property @pulumi.getter @@ -14153,9 +19414,30 @@ def __init__(__self__, *, :param str name: The name of this Application Gateway. :param str tier: The Tier of the SKU in use for this Application Gateway. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "tier", tier) + GetApplicationGatewaySkusResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + tier=tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + name: Optional[str] = None, + tier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("capacity", capacity) + _setter("name", name) + _setter("tier", tier) @property @pulumi.getter @@ -14195,10 +19477,39 @@ def __init__(__self__, *, :param str name: The name of this Application Gateway. :param str public_cert_data: The Public Certificate Data associated with the SSL Certificate. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_cert_data", public_cert_data) + GetApplicationGatewaySslCertificateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + key_vault_secret_id=key_vault_secret_id, + name=name, + public_cert_data=public_cert_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + key_vault_secret_id: Optional[str] = None, + name: Optional[str] = None, + public_cert_data: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + if key_vault_secret_id is None: + raise TypeError("Missing 'key_vault_secret_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if public_cert_data is None and 'publicCertData' in kwargs: + public_cert_data = kwargs['publicCertData'] + if public_cert_data is None: + raise TypeError("Missing 'public_cert_data' argument") + + _setter("id", id) + _setter("key_vault_secret_id", key_vault_secret_id) + _setter("name", name) + _setter("public_cert_data", public_cert_data) @property @pulumi.getter @@ -14248,11 +19559,50 @@ def __init__(__self__, *, :param str policy_name: The Name of the Policy. :param str policy_type: The Type of the Policy. """ - pulumi.set(__self__, "cipher_suites", cipher_suites) - pulumi.set(__self__, "disabled_protocols", disabled_protocols) - pulumi.set(__self__, "min_protocol_version", min_protocol_version) - pulumi.set(__self__, "policy_name", policy_name) - pulumi.set(__self__, "policy_type", policy_type) + GetApplicationGatewaySslPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + cipher_suites=cipher_suites, + disabled_protocols=disabled_protocols, + min_protocol_version=min_protocol_version, + policy_name=policy_name, + policy_type=policy_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cipher_suites: Optional[Sequence[str]] = None, + disabled_protocols: Optional[Sequence[str]] = None, + min_protocol_version: Optional[str] = None, + policy_name: Optional[str] = None, + policy_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cipher_suites is None and 'cipherSuites' in kwargs: + cipher_suites = kwargs['cipherSuites'] + if cipher_suites is None: + raise TypeError("Missing 'cipher_suites' argument") + if disabled_protocols is None and 'disabledProtocols' in kwargs: + disabled_protocols = kwargs['disabledProtocols'] + if disabled_protocols is None: + raise TypeError("Missing 'disabled_protocols' argument") + if min_protocol_version is None and 'minProtocolVersion' in kwargs: + min_protocol_version = kwargs['minProtocolVersion'] + if min_protocol_version is None: + raise TypeError("Missing 'min_protocol_version' argument") + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if policy_name is None: + raise TypeError("Missing 'policy_name' argument") + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if policy_type is None: + raise TypeError("Missing 'policy_type' argument") + + _setter("cipher_suites", cipher_suites) + _setter("disabled_protocols", disabled_protocols) + _setter("min_protocol_version", min_protocol_version) + _setter("policy_name", policy_name) + _setter("policy_type", policy_type) @property @pulumi.getter(name="cipherSuites") @@ -14311,12 +19661,53 @@ def __init__(__self__, *, :param Sequence[str] trusted_client_certificate_names: The name of the Trusted Client Certificate that will be used to authenticate requests from clients. :param str verify_client_certificate_revocation: The method used to check client certificate revocation status. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "ssl_policies", ssl_policies) - pulumi.set(__self__, "trusted_client_certificate_names", trusted_client_certificate_names) - pulumi.set(__self__, "verify_client_certificate_issuer_dn", verify_client_certificate_issuer_dn) - pulumi.set(__self__, "verify_client_certificate_revocation", verify_client_certificate_revocation) + GetApplicationGatewaySslProfileResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ssl_policies=ssl_policies, + trusted_client_certificate_names=trusted_client_certificate_names, + verify_client_certificate_issuer_dn=verify_client_certificate_issuer_dn, + verify_client_certificate_revocation=verify_client_certificate_revocation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + ssl_policies: Optional[Sequence['outputs.GetApplicationGatewaySslProfileSslPolicyResult']] = None, + trusted_client_certificate_names: Optional[Sequence[str]] = None, + verify_client_certificate_issuer_dn: Optional[bool] = None, + verify_client_certificate_revocation: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if ssl_policies is None and 'sslPolicies' in kwargs: + ssl_policies = kwargs['sslPolicies'] + if ssl_policies is None: + raise TypeError("Missing 'ssl_policies' argument") + if trusted_client_certificate_names is None and 'trustedClientCertificateNames' in kwargs: + trusted_client_certificate_names = kwargs['trustedClientCertificateNames'] + if trusted_client_certificate_names is None: + raise TypeError("Missing 'trusted_client_certificate_names' argument") + if verify_client_certificate_issuer_dn is None and 'verifyClientCertificateIssuerDn' in kwargs: + verify_client_certificate_issuer_dn = kwargs['verifyClientCertificateIssuerDn'] + if verify_client_certificate_issuer_dn is None: + raise TypeError("Missing 'verify_client_certificate_issuer_dn' argument") + if verify_client_certificate_revocation is None and 'verifyClientCertificateRevocation' in kwargs: + verify_client_certificate_revocation = kwargs['verifyClientCertificateRevocation'] + if verify_client_certificate_revocation is None: + raise TypeError("Missing 'verify_client_certificate_revocation' argument") + + _setter("id", id) + _setter("name", name) + _setter("ssl_policies", ssl_policies) + _setter("trusted_client_certificate_names", trusted_client_certificate_names) + _setter("verify_client_certificate_issuer_dn", verify_client_certificate_issuer_dn) + _setter("verify_client_certificate_revocation", verify_client_certificate_revocation) @property @pulumi.getter @@ -14379,11 +19770,50 @@ def __init__(__self__, *, :param str policy_name: The Name of the Policy. :param str policy_type: The Type of the Policy. """ - pulumi.set(__self__, "cipher_suites", cipher_suites) - pulumi.set(__self__, "disabled_protocols", disabled_protocols) - pulumi.set(__self__, "min_protocol_version", min_protocol_version) - pulumi.set(__self__, "policy_name", policy_name) - pulumi.set(__self__, "policy_type", policy_type) + GetApplicationGatewaySslProfileSslPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + cipher_suites=cipher_suites, + disabled_protocols=disabled_protocols, + min_protocol_version=min_protocol_version, + policy_name=policy_name, + policy_type=policy_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cipher_suites: Optional[Sequence[str]] = None, + disabled_protocols: Optional[Sequence[str]] = None, + min_protocol_version: Optional[str] = None, + policy_name: Optional[str] = None, + policy_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cipher_suites is None and 'cipherSuites' in kwargs: + cipher_suites = kwargs['cipherSuites'] + if cipher_suites is None: + raise TypeError("Missing 'cipher_suites' argument") + if disabled_protocols is None and 'disabledProtocols' in kwargs: + disabled_protocols = kwargs['disabledProtocols'] + if disabled_protocols is None: + raise TypeError("Missing 'disabled_protocols' argument") + if min_protocol_version is None and 'minProtocolVersion' in kwargs: + min_protocol_version = kwargs['minProtocolVersion'] + if min_protocol_version is None: + raise TypeError("Missing 'min_protocol_version' argument") + if policy_name is None and 'policyName' in kwargs: + policy_name = kwargs['policyName'] + if policy_name is None: + raise TypeError("Missing 'policy_name' argument") + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if policy_type is None: + raise TypeError("Missing 'policy_type' argument") + + _setter("cipher_suites", cipher_suites) + _setter("disabled_protocols", disabled_protocols) + _setter("min_protocol_version", min_protocol_version) + _setter("policy_name", policy_name) + _setter("policy_type", policy_type) @property @pulumi.getter(name="cipherSuites") @@ -14435,8 +19865,25 @@ def __init__(__self__, *, :param str id: The ID of the Rewrite Rule Set :param str name: The name of this Application Gateway. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) + GetApplicationGatewayTrustedClientCertificateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("id", id) + _setter("name", name) @property @pulumi.getter @@ -14466,9 +19913,32 @@ def __init__(__self__, *, :param str key_vault_secret_id: The Secret ID of (base-64 encoded unencrypted pfx) the `Secret` or `Certificate` object stored in Azure KeyVault. :param str name: The name of this Application Gateway. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) - pulumi.set(__self__, "name", name) + GetApplicationGatewayTrustedRootCertificateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + key_vault_secret_id=key_vault_secret_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + key_vault_secret_id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + if key_vault_secret_id is None: + raise TypeError("Missing 'key_vault_secret_id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("id", id) + _setter("key_vault_secret_id", key_vault_secret_id) + _setter("name", name) @property @pulumi.getter @@ -14521,17 +19991,88 @@ def __init__(__self__, *, :param str name: The name of this Application Gateway. :param Sequence['GetApplicationGatewayUrlPathMapPathRuleArgs'] path_rules: One or more `path_rule` blocks as defined above. """ - pulumi.set(__self__, "default_backend_address_pool_id", default_backend_address_pool_id) - pulumi.set(__self__, "default_backend_address_pool_name", default_backend_address_pool_name) - pulumi.set(__self__, "default_backend_http_settings_id", default_backend_http_settings_id) - pulumi.set(__self__, "default_backend_http_settings_name", default_backend_http_settings_name) - pulumi.set(__self__, "default_redirect_configuration_id", default_redirect_configuration_id) - pulumi.set(__self__, "default_redirect_configuration_name", default_redirect_configuration_name) - pulumi.set(__self__, "default_rewrite_rule_set_id", default_rewrite_rule_set_id) - pulumi.set(__self__, "default_rewrite_rule_set_name", default_rewrite_rule_set_name) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "path_rules", path_rules) + GetApplicationGatewayUrlPathMapResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_backend_address_pool_id=default_backend_address_pool_id, + default_backend_address_pool_name=default_backend_address_pool_name, + default_backend_http_settings_id=default_backend_http_settings_id, + default_backend_http_settings_name=default_backend_http_settings_name, + default_redirect_configuration_id=default_redirect_configuration_id, + default_redirect_configuration_name=default_redirect_configuration_name, + default_rewrite_rule_set_id=default_rewrite_rule_set_id, + default_rewrite_rule_set_name=default_rewrite_rule_set_name, + id=id, + name=name, + path_rules=path_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_backend_address_pool_id: Optional[str] = None, + default_backend_address_pool_name: Optional[str] = None, + default_backend_http_settings_id: Optional[str] = None, + default_backend_http_settings_name: Optional[str] = None, + default_redirect_configuration_id: Optional[str] = None, + default_redirect_configuration_name: Optional[str] = None, + default_rewrite_rule_set_id: Optional[str] = None, + default_rewrite_rule_set_name: Optional[str] = None, + id: Optional[str] = None, + name: Optional[str] = None, + path_rules: Optional[Sequence['outputs.GetApplicationGatewayUrlPathMapPathRuleResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_backend_address_pool_id is None and 'defaultBackendAddressPoolId' in kwargs: + default_backend_address_pool_id = kwargs['defaultBackendAddressPoolId'] + if default_backend_address_pool_id is None: + raise TypeError("Missing 'default_backend_address_pool_id' argument") + if default_backend_address_pool_name is None and 'defaultBackendAddressPoolName' in kwargs: + default_backend_address_pool_name = kwargs['defaultBackendAddressPoolName'] + if default_backend_address_pool_name is None: + raise TypeError("Missing 'default_backend_address_pool_name' argument") + if default_backend_http_settings_id is None and 'defaultBackendHttpSettingsId' in kwargs: + default_backend_http_settings_id = kwargs['defaultBackendHttpSettingsId'] + if default_backend_http_settings_id is None: + raise TypeError("Missing 'default_backend_http_settings_id' argument") + if default_backend_http_settings_name is None and 'defaultBackendHttpSettingsName' in kwargs: + default_backend_http_settings_name = kwargs['defaultBackendHttpSettingsName'] + if default_backend_http_settings_name is None: + raise TypeError("Missing 'default_backend_http_settings_name' argument") + if default_redirect_configuration_id is None and 'defaultRedirectConfigurationId' in kwargs: + default_redirect_configuration_id = kwargs['defaultRedirectConfigurationId'] + if default_redirect_configuration_id is None: + raise TypeError("Missing 'default_redirect_configuration_id' argument") + if default_redirect_configuration_name is None and 'defaultRedirectConfigurationName' in kwargs: + default_redirect_configuration_name = kwargs['defaultRedirectConfigurationName'] + if default_redirect_configuration_name is None: + raise TypeError("Missing 'default_redirect_configuration_name' argument") + if default_rewrite_rule_set_id is None and 'defaultRewriteRuleSetId' in kwargs: + default_rewrite_rule_set_id = kwargs['defaultRewriteRuleSetId'] + if default_rewrite_rule_set_id is None: + raise TypeError("Missing 'default_rewrite_rule_set_id' argument") + if default_rewrite_rule_set_name is None and 'defaultRewriteRuleSetName' in kwargs: + default_rewrite_rule_set_name = kwargs['defaultRewriteRuleSetName'] + if default_rewrite_rule_set_name is None: + raise TypeError("Missing 'default_rewrite_rule_set_name' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if path_rules is None and 'pathRules' in kwargs: + path_rules = kwargs['pathRules'] + if path_rules is None: + raise TypeError("Missing 'path_rules' argument") + + _setter("default_backend_address_pool_id", default_backend_address_pool_id) + _setter("default_backend_address_pool_name", default_backend_address_pool_name) + _setter("default_backend_http_settings_id", default_backend_http_settings_id) + _setter("default_backend_http_settings_name", default_backend_http_settings_name) + _setter("default_redirect_configuration_id", default_redirect_configuration_id) + _setter("default_redirect_configuration_name", default_redirect_configuration_name) + _setter("default_rewrite_rule_set_id", default_rewrite_rule_set_id) + _setter("default_rewrite_rule_set_name", default_rewrite_rule_set_name) + _setter("id", id) + _setter("name", name) + _setter("path_rules", path_rules) @property @pulumi.getter(name="defaultBackendAddressPoolId") @@ -14648,18 +20189,93 @@ def __init__(__self__, *, :param str rewrite_rule_set_id: The ID of the associated Rewrite Rule Set. :param str rewrite_rule_set_name: The Name of the Rewrite Rule Set which is used for this Routing Rule. """ - pulumi.set(__self__, "backend_address_pool_id", backend_address_pool_id) - pulumi.set(__self__, "backend_address_pool_name", backend_address_pool_name) - pulumi.set(__self__, "backend_http_settings_id", backend_http_settings_id) - pulumi.set(__self__, "backend_http_settings_name", backend_http_settings_name) - pulumi.set(__self__, "firewall_policy_id", firewall_policy_id) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "paths", paths) - pulumi.set(__self__, "redirect_configuration_id", redirect_configuration_id) - pulumi.set(__self__, "redirect_configuration_name", redirect_configuration_name) - pulumi.set(__self__, "rewrite_rule_set_id", rewrite_rule_set_id) - pulumi.set(__self__, "rewrite_rule_set_name", rewrite_rule_set_name) + GetApplicationGatewayUrlPathMapPathRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_address_pool_id=backend_address_pool_id, + backend_address_pool_name=backend_address_pool_name, + backend_http_settings_id=backend_http_settings_id, + backend_http_settings_name=backend_http_settings_name, + firewall_policy_id=firewall_policy_id, + id=id, + name=name, + paths=paths, + redirect_configuration_id=redirect_configuration_id, + redirect_configuration_name=redirect_configuration_name, + rewrite_rule_set_id=rewrite_rule_set_id, + rewrite_rule_set_name=rewrite_rule_set_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_address_pool_id: Optional[str] = None, + backend_address_pool_name: Optional[str] = None, + backend_http_settings_id: Optional[str] = None, + backend_http_settings_name: Optional[str] = None, + firewall_policy_id: Optional[str] = None, + id: Optional[str] = None, + name: Optional[str] = None, + paths: Optional[Sequence[str]] = None, + redirect_configuration_id: Optional[str] = None, + redirect_configuration_name: Optional[str] = None, + rewrite_rule_set_id: Optional[str] = None, + rewrite_rule_set_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_address_pool_id is None and 'backendAddressPoolId' in kwargs: + backend_address_pool_id = kwargs['backendAddressPoolId'] + if backend_address_pool_id is None: + raise TypeError("Missing 'backend_address_pool_id' argument") + if backend_address_pool_name is None and 'backendAddressPoolName' in kwargs: + backend_address_pool_name = kwargs['backendAddressPoolName'] + if backend_address_pool_name is None: + raise TypeError("Missing 'backend_address_pool_name' argument") + if backend_http_settings_id is None and 'backendHttpSettingsId' in kwargs: + backend_http_settings_id = kwargs['backendHttpSettingsId'] + if backend_http_settings_id is None: + raise TypeError("Missing 'backend_http_settings_id' argument") + if backend_http_settings_name is None and 'backendHttpSettingsName' in kwargs: + backend_http_settings_name = kwargs['backendHttpSettingsName'] + if backend_http_settings_name is None: + raise TypeError("Missing 'backend_http_settings_name' argument") + if firewall_policy_id is None and 'firewallPolicyId' in kwargs: + firewall_policy_id = kwargs['firewallPolicyId'] + if firewall_policy_id is None: + raise TypeError("Missing 'firewall_policy_id' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if paths is None: + raise TypeError("Missing 'paths' argument") + if redirect_configuration_id is None and 'redirectConfigurationId' in kwargs: + redirect_configuration_id = kwargs['redirectConfigurationId'] + if redirect_configuration_id is None: + raise TypeError("Missing 'redirect_configuration_id' argument") + if redirect_configuration_name is None and 'redirectConfigurationName' in kwargs: + redirect_configuration_name = kwargs['redirectConfigurationName'] + if redirect_configuration_name is None: + raise TypeError("Missing 'redirect_configuration_name' argument") + if rewrite_rule_set_id is None and 'rewriteRuleSetId' in kwargs: + rewrite_rule_set_id = kwargs['rewriteRuleSetId'] + if rewrite_rule_set_id is None: + raise TypeError("Missing 'rewrite_rule_set_id' argument") + if rewrite_rule_set_name is None and 'rewriteRuleSetName' in kwargs: + rewrite_rule_set_name = kwargs['rewriteRuleSetName'] + if rewrite_rule_set_name is None: + raise TypeError("Missing 'rewrite_rule_set_name' argument") + + _setter("backend_address_pool_id", backend_address_pool_id) + _setter("backend_address_pool_name", backend_address_pool_name) + _setter("backend_http_settings_id", backend_http_settings_id) + _setter("backend_http_settings_name", backend_http_settings_name) + _setter("firewall_policy_id", firewall_policy_id) + _setter("id", id) + _setter("name", name) + _setter("paths", paths) + _setter("redirect_configuration_id", redirect_configuration_id) + _setter("redirect_configuration_name", redirect_configuration_name) + _setter("rewrite_rule_set_id", rewrite_rule_set_id) + _setter("rewrite_rule_set_name", rewrite_rule_set_name) @property @pulumi.getter(name="backendAddressPoolId") @@ -14781,15 +20397,74 @@ def __init__(__self__, *, :param str rule_set_type: The Type of the Rule Set used for this Web Application Firewall. :param str rule_set_version: The Version of the Rule Set used for this Web Application Firewall. """ - pulumi.set(__self__, "disabled_rule_groups", disabled_rule_groups) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "exclusions", exclusions) - pulumi.set(__self__, "file_upload_limit_mb", file_upload_limit_mb) - pulumi.set(__self__, "firewall_mode", firewall_mode) - pulumi.set(__self__, "max_request_body_size_kb", max_request_body_size_kb) - pulumi.set(__self__, "request_body_check", request_body_check) - pulumi.set(__self__, "rule_set_type", rule_set_type) - pulumi.set(__self__, "rule_set_version", rule_set_version) + GetApplicationGatewayWafConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_rule_groups=disabled_rule_groups, + enabled=enabled, + exclusions=exclusions, + file_upload_limit_mb=file_upload_limit_mb, + firewall_mode=firewall_mode, + max_request_body_size_kb=max_request_body_size_kb, + request_body_check=request_body_check, + rule_set_type=rule_set_type, + rule_set_version=rule_set_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_rule_groups: Optional[Sequence['outputs.GetApplicationGatewayWafConfigurationDisabledRuleGroupResult']] = None, + enabled: Optional[bool] = None, + exclusions: Optional[Sequence['outputs.GetApplicationGatewayWafConfigurationExclusionResult']] = None, + file_upload_limit_mb: Optional[int] = None, + firewall_mode: Optional[str] = None, + max_request_body_size_kb: Optional[int] = None, + request_body_check: Optional[bool] = None, + rule_set_type: Optional[str] = None, + rule_set_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_rule_groups is None and 'disabledRuleGroups' in kwargs: + disabled_rule_groups = kwargs['disabledRuleGroups'] + if disabled_rule_groups is None: + raise TypeError("Missing 'disabled_rule_groups' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if exclusions is None: + raise TypeError("Missing 'exclusions' argument") + if file_upload_limit_mb is None and 'fileUploadLimitMb' in kwargs: + file_upload_limit_mb = kwargs['fileUploadLimitMb'] + if file_upload_limit_mb is None: + raise TypeError("Missing 'file_upload_limit_mb' argument") + if firewall_mode is None and 'firewallMode' in kwargs: + firewall_mode = kwargs['firewallMode'] + if firewall_mode is None: + raise TypeError("Missing 'firewall_mode' argument") + if max_request_body_size_kb is None and 'maxRequestBodySizeKb' in kwargs: + max_request_body_size_kb = kwargs['maxRequestBodySizeKb'] + if max_request_body_size_kb is None: + raise TypeError("Missing 'max_request_body_size_kb' argument") + if request_body_check is None and 'requestBodyCheck' in kwargs: + request_body_check = kwargs['requestBodyCheck'] + if request_body_check is None: + raise TypeError("Missing 'request_body_check' argument") + if rule_set_type is None and 'ruleSetType' in kwargs: + rule_set_type = kwargs['ruleSetType'] + if rule_set_type is None: + raise TypeError("Missing 'rule_set_type' argument") + if rule_set_version is None and 'ruleSetVersion' in kwargs: + rule_set_version = kwargs['ruleSetVersion'] + if rule_set_version is None: + raise TypeError("Missing 'rule_set_version' argument") + + _setter("disabled_rule_groups", disabled_rule_groups) + _setter("enabled", enabled) + _setter("exclusions", exclusions) + _setter("file_upload_limit_mb", file_upload_limit_mb) + _setter("firewall_mode", firewall_mode) + _setter("max_request_body_size_kb", max_request_body_size_kb) + _setter("request_body_check", request_body_check) + _setter("rule_set_type", rule_set_type) + _setter("rule_set_version", rule_set_version) @property @pulumi.getter(name="disabledRuleGroups") @@ -14873,8 +20548,27 @@ def __init__(__self__, *, :param str rule_group_name: The rule group where specific rules are disabled. :param Sequence[int] rules: A list of rules which will be disabled in that group. """ - pulumi.set(__self__, "rule_group_name", rule_group_name) - pulumi.set(__self__, "rules", rules) + GetApplicationGatewayWafConfigurationDisabledRuleGroupResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_group_name=rule_group_name, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_group_name: Optional[str] = None, + rules: Optional[Sequence[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_group_name is None and 'ruleGroupName' in kwargs: + rule_group_name = kwargs['ruleGroupName'] + if rule_group_name is None: + raise TypeError("Missing 'rule_group_name' argument") + if rules is None: + raise TypeError("Missing 'rules' argument") + + _setter("rule_group_name", rule_group_name) + _setter("rules", rules) @property @pulumi.getter(name="ruleGroupName") @@ -14904,9 +20598,34 @@ def __init__(__self__, *, :param str selector: String value which will be used for the filter operation. :param str selector_match_operator: Operator which will be used to search in the variable content. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "selector", selector) - pulumi.set(__self__, "selector_match_operator", selector_match_operator) + GetApplicationGatewayWafConfigurationExclusionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + selector=selector, + selector_match_operator=selector_match_operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[str] = None, + selector: Optional[str] = None, + selector_match_operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + if selector_match_operator is None and 'selectorMatchOperator' in kwargs: + selector_match_operator = kwargs['selectorMatchOperator'] + if selector_match_operator is None: + raise TypeError("Missing 'selector_match_operator' argument") + + _setter("match_variable", match_variable) + _setter("selector", selector) + _setter("selector_match_operator", selector_match_operator) @property @pulumi.getter(name="matchVariable") @@ -14952,13 +20671,64 @@ def __init__(__self__, *, :param str shared_key: The shared key. Can be a maximum of 25 characters. :param int vlan_id: A valid VLAN ID to establish this peering on. """ - pulumi.set(__self__, "azure_asn", azure_asn) - pulumi.set(__self__, "peer_asn", peer_asn) - pulumi.set(__self__, "peering_type", peering_type) - pulumi.set(__self__, "primary_peer_address_prefix", primary_peer_address_prefix) - pulumi.set(__self__, "secondary_peer_address_prefix", secondary_peer_address_prefix) - pulumi.set(__self__, "shared_key", shared_key) - pulumi.set(__self__, "vlan_id", vlan_id) + GetExpressRouteCircuitPeeringResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_asn=azure_asn, + peer_asn=peer_asn, + peering_type=peering_type, + primary_peer_address_prefix=primary_peer_address_prefix, + secondary_peer_address_prefix=secondary_peer_address_prefix, + shared_key=shared_key, + vlan_id=vlan_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_asn: Optional[int] = None, + peer_asn: Optional[int] = None, + peering_type: Optional[str] = None, + primary_peer_address_prefix: Optional[str] = None, + secondary_peer_address_prefix: Optional[str] = None, + shared_key: Optional[str] = None, + vlan_id: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_asn is None and 'azureAsn' in kwargs: + azure_asn = kwargs['azureAsn'] + if azure_asn is None: + raise TypeError("Missing 'azure_asn' argument") + if peer_asn is None and 'peerAsn' in kwargs: + peer_asn = kwargs['peerAsn'] + if peer_asn is None: + raise TypeError("Missing 'peer_asn' argument") + if peering_type is None and 'peeringType' in kwargs: + peering_type = kwargs['peeringType'] + if peering_type is None: + raise TypeError("Missing 'peering_type' argument") + if primary_peer_address_prefix is None and 'primaryPeerAddressPrefix' in kwargs: + primary_peer_address_prefix = kwargs['primaryPeerAddressPrefix'] + if primary_peer_address_prefix is None: + raise TypeError("Missing 'primary_peer_address_prefix' argument") + if secondary_peer_address_prefix is None and 'secondaryPeerAddressPrefix' in kwargs: + secondary_peer_address_prefix = kwargs['secondaryPeerAddressPrefix'] + if secondary_peer_address_prefix is None: + raise TypeError("Missing 'secondary_peer_address_prefix' argument") + if shared_key is None and 'sharedKey' in kwargs: + shared_key = kwargs['sharedKey'] + if shared_key is None: + raise TypeError("Missing 'shared_key' argument") + if vlan_id is None and 'vlanId' in kwargs: + vlan_id = kwargs['vlanId'] + if vlan_id is None: + raise TypeError("Missing 'vlan_id' argument") + + _setter("azure_asn", azure_asn) + _setter("peer_asn", peer_asn) + _setter("peering_type", peering_type) + _setter("primary_peer_address_prefix", primary_peer_address_prefix) + _setter("secondary_peer_address_prefix", secondary_peer_address_prefix) + _setter("shared_key", shared_key) + _setter("vlan_id", vlan_id) @property @pulumi.getter(name="azureAsn") @@ -15028,9 +20798,36 @@ def __init__(__self__, *, :param str peering_location: The name of the peering location and **not** the Azure resource location. :param str service_provider_name: The name of the ExpressRoute Service Provider. """ - pulumi.set(__self__, "bandwidth_in_mbps", bandwidth_in_mbps) - pulumi.set(__self__, "peering_location", peering_location) - pulumi.set(__self__, "service_provider_name", service_provider_name) + GetExpressRouteCircuitServiceProviderPropertyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + bandwidth_in_mbps=bandwidth_in_mbps, + peering_location=peering_location, + service_provider_name=service_provider_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bandwidth_in_mbps: Optional[int] = None, + peering_location: Optional[str] = None, + service_provider_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bandwidth_in_mbps is None and 'bandwidthInMbps' in kwargs: + bandwidth_in_mbps = kwargs['bandwidthInMbps'] + if bandwidth_in_mbps is None: + raise TypeError("Missing 'bandwidth_in_mbps' argument") + if peering_location is None and 'peeringLocation' in kwargs: + peering_location = kwargs['peeringLocation'] + if peering_location is None: + raise TypeError("Missing 'peering_location' argument") + if service_provider_name is None and 'serviceProviderName' in kwargs: + service_provider_name = kwargs['serviceProviderName'] + if service_provider_name is None: + raise TypeError("Missing 'service_provider_name' argument") + + _setter("bandwidth_in_mbps", bandwidth_in_mbps) + _setter("peering_location", peering_location) + _setter("service_provider_name", service_provider_name) @property @pulumi.getter(name="bandwidthInMbps") @@ -15066,8 +20863,25 @@ def __init__(__self__, *, :param str family: The billing mode for bandwidth. Possible values are `MeteredData` or `UnlimitedData`. :param str tier: The service tier. Possible values are `Basic`, `Local`, `Standard` or `Premium`. """ - pulumi.set(__self__, "family", family) - pulumi.set(__self__, "tier", tier) + GetExpressRouteCircuitSkuResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + family=family, + tier=tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + family: Optional[str] = None, + tier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if family is None: + raise TypeError("Missing 'family' argument") + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("family", family) + _setter("tier", tier) @property @pulumi.getter @@ -15099,10 +20913,41 @@ def __init__(__self__, *, :param str public_ip_address_id: The ID of the Public IP address of the Azure Firewall. :param str subnet_id: The ID of the Subnet where the Azure Firewall is deployed. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) + GetFirewallIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + private_ip_address=private_ip_address, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + public_ip_address_id: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("name", name) + _setter("private_ip_address", private_ip_address) + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -15150,10 +20995,41 @@ def __init__(__self__, *, :param str public_ip_address_id: The ID of the Public IP address of the Azure Firewall. :param str subnet_id: The ID of the Subnet where the Azure Firewall is deployed. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) + GetFirewallManagementIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + private_ip_address=private_ip_address, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + public_ip_address_id: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("name", name) + _setter("private_ip_address", private_ip_address) + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -15194,9 +21070,34 @@ def __init__(__self__, *, network_rule_fqdn_enabled: bool, proxy_enabled: bool, servers: Sequence[str]): - pulumi.set(__self__, "network_rule_fqdn_enabled", network_rule_fqdn_enabled) - pulumi.set(__self__, "proxy_enabled", proxy_enabled) - pulumi.set(__self__, "servers", servers) + GetFirewallPolicyDnResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_rule_fqdn_enabled=network_rule_fqdn_enabled, + proxy_enabled=proxy_enabled, + servers=servers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_rule_fqdn_enabled: Optional[bool] = None, + proxy_enabled: Optional[bool] = None, + servers: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_rule_fqdn_enabled is None and 'networkRuleFqdnEnabled' in kwargs: + network_rule_fqdn_enabled = kwargs['networkRuleFqdnEnabled'] + if network_rule_fqdn_enabled is None: + raise TypeError("Missing 'network_rule_fqdn_enabled' argument") + if proxy_enabled is None and 'proxyEnabled' in kwargs: + proxy_enabled = kwargs['proxyEnabled'] + if proxy_enabled is None: + raise TypeError("Missing 'proxy_enabled' argument") + if servers is None: + raise TypeError("Missing 'servers' argument") + + _setter("network_rule_fqdn_enabled", network_rule_fqdn_enabled) + _setter("proxy_enabled", proxy_enabled) + _setter("servers", servers) @property @pulumi.getter(name="networkRuleFqdnEnabled") @@ -15219,8 +21120,27 @@ class GetFirewallPolicyThreatIntelligenceAllowlistResult(dict): def __init__(__self__, *, fqdns: Sequence[str], ip_addresses: Sequence[str]): - pulumi.set(__self__, "fqdns", fqdns) - pulumi.set(__self__, "ip_addresses", ip_addresses) + GetFirewallPolicyThreatIntelligenceAllowlistResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdns=fqdns, + ip_addresses=ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdns: Optional[Sequence[str]] = None, + ip_addresses: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fqdns is None: + raise TypeError("Missing 'fqdns' argument") + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if ip_addresses is None: + raise TypeError("Missing 'ip_addresses' argument") + + _setter("fqdns", fqdns) + _setter("ip_addresses", ip_addresses) @property @pulumi.getter @@ -15246,10 +21166,43 @@ def __init__(__self__, *, :param int public_ip_count: The number of public IPs assigned to the Azure Firewall. :param str virtual_hub_id: The ID of the Virtual Hub where the Azure Firewall resides in. """ - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) - pulumi.set(__self__, "public_ip_count", public_ip_count) - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + GetFirewallVirtualHubResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_ip_address=private_ip_address, + public_ip_addresses=public_ip_addresses, + public_ip_count=public_ip_count, + virtual_hub_id=virtual_hub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_ip_address: Optional[str] = None, + public_ip_addresses: Optional[Sequence[str]] = None, + public_ip_count: Optional[int] = None, + virtual_hub_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if public_ip_addresses is None: + raise TypeError("Missing 'public_ip_addresses' argument") + if public_ip_count is None and 'publicIpCount' in kwargs: + public_ip_count = kwargs['publicIpCount'] + if public_ip_count is None: + raise TypeError("Missing 'public_ip_count' argument") + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + + _setter("private_ip_address", private_ip_address) + _setter("public_ip_addresses", public_ip_addresses) + _setter("public_ip_count", public_ip_count) + _setter("virtual_hub_id", virtual_hub_id) @property @pulumi.getter(name="privateIpAddress") @@ -15315,14 +21268,71 @@ def __init__(__self__, *, :param int sa_lifetime: The IPSec SA lifetime in seconds. Must be at least `300` seconds. """ - pulumi.set(__self__, "dh_group", dh_group) - pulumi.set(__self__, "ike_encryption", ike_encryption) - pulumi.set(__self__, "ike_integrity", ike_integrity) - pulumi.set(__self__, "ipsec_encryption", ipsec_encryption) - pulumi.set(__self__, "ipsec_integrity", ipsec_integrity) - pulumi.set(__self__, "pfs_group", pfs_group) - pulumi.set(__self__, "sa_datasize", sa_datasize) - pulumi.set(__self__, "sa_lifetime", sa_lifetime) + GetGatewayConnectionIpsecPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + dh_group=dh_group, + ike_encryption=ike_encryption, + ike_integrity=ike_integrity, + ipsec_encryption=ipsec_encryption, + ipsec_integrity=ipsec_integrity, + pfs_group=pfs_group, + sa_datasize=sa_datasize, + sa_lifetime=sa_lifetime, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dh_group: Optional[str] = None, + ike_encryption: Optional[str] = None, + ike_integrity: Optional[str] = None, + ipsec_encryption: Optional[str] = None, + ipsec_integrity: Optional[str] = None, + pfs_group: Optional[str] = None, + sa_datasize: Optional[int] = None, + sa_lifetime: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dh_group is None and 'dhGroup' in kwargs: + dh_group = kwargs['dhGroup'] + if dh_group is None: + raise TypeError("Missing 'dh_group' argument") + if ike_encryption is None and 'ikeEncryption' in kwargs: + ike_encryption = kwargs['ikeEncryption'] + if ike_encryption is None: + raise TypeError("Missing 'ike_encryption' argument") + if ike_integrity is None and 'ikeIntegrity' in kwargs: + ike_integrity = kwargs['ikeIntegrity'] + if ike_integrity is None: + raise TypeError("Missing 'ike_integrity' argument") + if ipsec_encryption is None and 'ipsecEncryption' in kwargs: + ipsec_encryption = kwargs['ipsecEncryption'] + if ipsec_encryption is None: + raise TypeError("Missing 'ipsec_encryption' argument") + if ipsec_integrity is None and 'ipsecIntegrity' in kwargs: + ipsec_integrity = kwargs['ipsecIntegrity'] + if ipsec_integrity is None: + raise TypeError("Missing 'ipsec_integrity' argument") + if pfs_group is None and 'pfsGroup' in kwargs: + pfs_group = kwargs['pfsGroup'] + if pfs_group is None: + raise TypeError("Missing 'pfs_group' argument") + if sa_datasize is None and 'saDatasize' in kwargs: + sa_datasize = kwargs['saDatasize'] + if sa_datasize is None: + raise TypeError("Missing 'sa_datasize' argument") + if sa_lifetime is None and 'saLifetime' in kwargs: + sa_lifetime = kwargs['saLifetime'] + if sa_lifetime is None: + raise TypeError("Missing 'sa_lifetime' argument") + + _setter("dh_group", dh_group) + _setter("ike_encryption", ike_encryption) + _setter("ike_integrity", ike_integrity) + _setter("ipsec_encryption", ipsec_encryption) + _setter("ipsec_integrity", ipsec_integrity) + _setter("pfs_group", pfs_group) + _setter("sa_datasize", sa_datasize) + _setter("sa_lifetime", sa_lifetime) @property @pulumi.getter(name="dhGroup") @@ -15408,8 +21418,29 @@ def __init__(__self__, *, :param Sequence[str] local_address_cidrs: List of local CIDRs. :param Sequence[str] remote_address_cidrs: List of remote CIDRs. """ - pulumi.set(__self__, "local_address_cidrs", local_address_cidrs) - pulumi.set(__self__, "remote_address_cidrs", remote_address_cidrs) + GetGatewayConnectionTrafficSelectorPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + local_address_cidrs=local_address_cidrs, + remote_address_cidrs=remote_address_cidrs, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + local_address_cidrs: Optional[Sequence[str]] = None, + remote_address_cidrs: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_address_cidrs is None and 'localAddressCidrs' in kwargs: + local_address_cidrs = kwargs['localAddressCidrs'] + if local_address_cidrs is None: + raise TypeError("Missing 'local_address_cidrs' argument") + if remote_address_cidrs is None and 'remoteAddressCidrs' in kwargs: + remote_address_cidrs = kwargs['remoteAddressCidrs'] + if remote_address_cidrs is None: + raise TypeError("Missing 'remote_address_cidrs' argument") + + _setter("local_address_cidrs", local_address_cidrs) + _setter("remote_address_cidrs", remote_address_cidrs) @property @pulumi.getter(name="localAddressCidrs") @@ -15439,9 +21470,34 @@ def __init__(__self__, *, :param str bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. :param int peer_weight: The weight added to routes learned from this BGP speaker. """ - pulumi.set(__self__, "asn", asn) - pulumi.set(__self__, "bgp_peering_address", bgp_peering_address) - pulumi.set(__self__, "peer_weight", peer_weight) + GetLocalNetworkGatewayBgpSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + asn=asn, + bgp_peering_address=bgp_peering_address, + peer_weight=peer_weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asn: Optional[int] = None, + bgp_peering_address: Optional[str] = None, + peer_weight: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if asn is None: + raise TypeError("Missing 'asn' argument") + if bgp_peering_address is None and 'bgpPeeringAddress' in kwargs: + bgp_peering_address = kwargs['bgpPeeringAddress'] + if bgp_peering_address is None: + raise TypeError("Missing 'bgp_peering_address' argument") + if peer_weight is None and 'peerWeight' in kwargs: + peer_weight = kwargs['peerWeight'] + if peer_weight is None: + raise TypeError("Missing 'peer_weight' argument") + + _setter("asn", asn) + _setter("bgp_peering_address", bgp_peering_address) + _setter("peer_weight", peer_weight) @property @pulumi.getter @@ -15495,18 +21551,95 @@ def __init__(__self__, *, :param str public_ip_address_id: The ID of the Public IP Address which is connected to this Network Interface. :param str subnet_id: The ID of the Subnet which the Network Interface is connected to. """ - pulumi.set(__self__, "application_gateway_backend_address_pools_ids", application_gateway_backend_address_pools_ids) - pulumi.set(__self__, "application_security_group_ids", application_security_group_ids) - pulumi.set(__self__, "gateway_load_balancer_frontend_ip_configuration_id", gateway_load_balancer_frontend_ip_configuration_id) - pulumi.set(__self__, "load_balancer_backend_address_pools_ids", load_balancer_backend_address_pools_ids) - pulumi.set(__self__, "load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "primary", primary) - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) - pulumi.set(__self__, "private_ip_address_version", private_ip_address_version) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) + GetNetworkInterfaceIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_gateway_backend_address_pools_ids=application_gateway_backend_address_pools_ids, + application_security_group_ids=application_security_group_ids, + gateway_load_balancer_frontend_ip_configuration_id=gateway_load_balancer_frontend_ip_configuration_id, + load_balancer_backend_address_pools_ids=load_balancer_backend_address_pools_ids, + load_balancer_inbound_nat_rules_ids=load_balancer_inbound_nat_rules_ids, + name=name, + primary=primary, + private_ip_address=private_ip_address, + private_ip_address_allocation=private_ip_address_allocation, + private_ip_address_version=private_ip_address_version, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_gateway_backend_address_pools_ids: Optional[Sequence[str]] = None, + application_security_group_ids: Optional[Sequence[str]] = None, + gateway_load_balancer_frontend_ip_configuration_id: Optional[str] = None, + load_balancer_backend_address_pools_ids: Optional[Sequence[str]] = None, + load_balancer_inbound_nat_rules_ids: Optional[Sequence[str]] = None, + name: Optional[str] = None, + primary: Optional[bool] = None, + private_ip_address: Optional[str] = None, + private_ip_address_allocation: Optional[str] = None, + private_ip_address_version: Optional[str] = None, + public_ip_address_id: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_gateway_backend_address_pools_ids is None and 'applicationGatewayBackendAddressPoolsIds' in kwargs: + application_gateway_backend_address_pools_ids = kwargs['applicationGatewayBackendAddressPoolsIds'] + if application_gateway_backend_address_pools_ids is None: + raise TypeError("Missing 'application_gateway_backend_address_pools_ids' argument") + if application_security_group_ids is None and 'applicationSecurityGroupIds' in kwargs: + application_security_group_ids = kwargs['applicationSecurityGroupIds'] + if application_security_group_ids is None: + raise TypeError("Missing 'application_security_group_ids' argument") + if gateway_load_balancer_frontend_ip_configuration_id is None and 'gatewayLoadBalancerFrontendIpConfigurationId' in kwargs: + gateway_load_balancer_frontend_ip_configuration_id = kwargs['gatewayLoadBalancerFrontendIpConfigurationId'] + if gateway_load_balancer_frontend_ip_configuration_id is None: + raise TypeError("Missing 'gateway_load_balancer_frontend_ip_configuration_id' argument") + if load_balancer_backend_address_pools_ids is None and 'loadBalancerBackendAddressPoolsIds' in kwargs: + load_balancer_backend_address_pools_ids = kwargs['loadBalancerBackendAddressPoolsIds'] + if load_balancer_backend_address_pools_ids is None: + raise TypeError("Missing 'load_balancer_backend_address_pools_ids' argument") + if load_balancer_inbound_nat_rules_ids is None and 'loadBalancerInboundNatRulesIds' in kwargs: + load_balancer_inbound_nat_rules_ids = kwargs['loadBalancerInboundNatRulesIds'] + if load_balancer_inbound_nat_rules_ids is None: + raise TypeError("Missing 'load_balancer_inbound_nat_rules_ids' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + if private_ip_address_allocation is None: + raise TypeError("Missing 'private_ip_address_allocation' argument") + if private_ip_address_version is None and 'privateIpAddressVersion' in kwargs: + private_ip_address_version = kwargs['privateIpAddressVersion'] + if private_ip_address_version is None: + raise TypeError("Missing 'private_ip_address_version' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("application_gateway_backend_address_pools_ids", application_gateway_backend_address_pools_ids) + _setter("application_security_group_ids", application_security_group_ids) + _setter("gateway_load_balancer_frontend_ip_configuration_id", gateway_load_balancer_frontend_ip_configuration_id) + _setter("load_balancer_backend_address_pools_ids", load_balancer_backend_address_pools_ids) + _setter("load_balancer_inbound_nat_rules_ids", load_balancer_inbound_nat_rules_ids) + _setter("name", name) + _setter("primary", primary) + _setter("private_ip_address", private_ip_address) + _setter("private_ip_address_allocation", private_ip_address_allocation) + _setter("private_ip_address_version", private_ip_address_version) + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="applicationGatewayBackendAddressPoolsIds") @@ -15634,24 +21767,113 @@ def __init__(__self__, *, :param Sequence[str] destination_application_security_group_ids: A List of destination Application Security Group IDs :param Sequence[str] source_application_security_group_ids: A List of source Application Security Group IDs """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "destination_address_prefix", destination_address_prefix) - pulumi.set(__self__, "destination_address_prefixes", destination_address_prefixes) - pulumi.set(__self__, "destination_port_range", destination_port_range) - pulumi.set(__self__, "destination_port_ranges", destination_port_ranges) - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "source_address_prefix", source_address_prefix) - pulumi.set(__self__, "source_address_prefixes", source_address_prefixes) - pulumi.set(__self__, "source_port_range", source_port_range) - pulumi.set(__self__, "source_port_ranges", source_port_ranges) + GetNetworkSecurityGroupSecurityRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + description=description, + destination_address_prefix=destination_address_prefix, + destination_address_prefixes=destination_address_prefixes, + destination_port_range=destination_port_range, + destination_port_ranges=destination_port_ranges, + direction=direction, + name=name, + priority=priority, + protocol=protocol, + source_address_prefix=source_address_prefix, + source_address_prefixes=source_address_prefixes, + source_port_range=source_port_range, + source_port_ranges=source_port_ranges, + destination_application_security_group_ids=destination_application_security_group_ids, + source_application_security_group_ids=source_application_security_group_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[str] = None, + description: Optional[str] = None, + destination_address_prefix: Optional[str] = None, + destination_address_prefixes: Optional[Sequence[str]] = None, + destination_port_range: Optional[str] = None, + destination_port_ranges: Optional[Sequence[str]] = None, + direction: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + protocol: Optional[str] = None, + source_address_prefix: Optional[str] = None, + source_address_prefixes: Optional[Sequence[str]] = None, + source_port_range: Optional[str] = None, + source_port_ranges: Optional[Sequence[str]] = None, + destination_application_security_group_ids: Optional[Sequence[str]] = None, + source_application_security_group_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if description is None: + raise TypeError("Missing 'description' argument") + if destination_address_prefix is None and 'destinationAddressPrefix' in kwargs: + destination_address_prefix = kwargs['destinationAddressPrefix'] + if destination_address_prefix is None: + raise TypeError("Missing 'destination_address_prefix' argument") + if destination_address_prefixes is None and 'destinationAddressPrefixes' in kwargs: + destination_address_prefixes = kwargs['destinationAddressPrefixes'] + if destination_address_prefixes is None: + raise TypeError("Missing 'destination_address_prefixes' argument") + if destination_port_range is None and 'destinationPortRange' in kwargs: + destination_port_range = kwargs['destinationPortRange'] + if destination_port_range is None: + raise TypeError("Missing 'destination_port_range' argument") + if destination_port_ranges is None and 'destinationPortRanges' in kwargs: + destination_port_ranges = kwargs['destinationPortRanges'] + if destination_port_ranges is None: + raise TypeError("Missing 'destination_port_ranges' argument") + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if source_address_prefix is None and 'sourceAddressPrefix' in kwargs: + source_address_prefix = kwargs['sourceAddressPrefix'] + if source_address_prefix is None: + raise TypeError("Missing 'source_address_prefix' argument") + if source_address_prefixes is None and 'sourceAddressPrefixes' in kwargs: + source_address_prefixes = kwargs['sourceAddressPrefixes'] + if source_address_prefixes is None: + raise TypeError("Missing 'source_address_prefixes' argument") + if source_port_range is None and 'sourcePortRange' in kwargs: + source_port_range = kwargs['sourcePortRange'] + if source_port_range is None: + raise TypeError("Missing 'source_port_range' argument") + if source_port_ranges is None and 'sourcePortRanges' in kwargs: + source_port_ranges = kwargs['sourcePortRanges'] + if source_port_ranges is None: + raise TypeError("Missing 'source_port_ranges' argument") + if destination_application_security_group_ids is None and 'destinationApplicationSecurityGroupIds' in kwargs: + destination_application_security_group_ids = kwargs['destinationApplicationSecurityGroupIds'] + if source_application_security_group_ids is None and 'sourceApplicationSecurityGroupIds' in kwargs: + source_application_security_group_ids = kwargs['sourceApplicationSecurityGroupIds'] + + _setter("access", access) + _setter("description", description) + _setter("destination_address_prefix", destination_address_prefix) + _setter("destination_address_prefixes", destination_address_prefixes) + _setter("destination_port_range", destination_port_range) + _setter("destination_port_ranges", destination_port_ranges) + _setter("direction", direction) + _setter("name", name) + _setter("priority", priority) + _setter("protocol", protocol) + _setter("source_address_prefix", source_address_prefix) + _setter("source_address_prefixes", source_address_prefixes) + _setter("source_port_range", source_port_range) + _setter("source_port_ranges", source_port_ranges) if destination_application_security_group_ids is not None: - pulumi.set(__self__, "destination_application_security_group_ids", destination_application_security_group_ids) + _setter("destination_application_security_group_ids", destination_application_security_group_ids) if source_application_security_group_ids is not None: - pulumi.set(__self__, "source_application_security_group_ids", source_application_security_group_ids) + _setter("source_application_security_group_ids", source_application_security_group_ids) @property @pulumi.getter @@ -15791,11 +22013,44 @@ def __init__(__self__, *, :param str ip_address: The IP address of the Public IP Address :param str name: The Name of the Public IP Address """ - pulumi.set(__self__, "domain_name_label", domain_name_label) - pulumi.set(__self__, "fqdn", fqdn) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "name", name) + GetPublicIPsPublicIpResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name_label=domain_name_label, + fqdn=fqdn, + id=id, + ip_address=ip_address, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name_label: Optional[str] = None, + fqdn: Optional[str] = None, + id: Optional[str] = None, + ip_address: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name_label is None and 'domainNameLabel' in kwargs: + domain_name_label = kwargs['domainNameLabel'] + if domain_name_label is None: + raise TypeError("Missing 'domain_name_label' argument") + if fqdn is None: + raise TypeError("Missing 'fqdn' argument") + if id is None: + raise TypeError("Missing 'id' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("domain_name_label", domain_name_label) + _setter("fqdn", fqdn) + _setter("id", id) + _setter("ip_address", ip_address) + _setter("name", name) @property @pulumi.getter(name="domainNameLabel") @@ -15851,10 +22106,37 @@ def __init__(__self__, *, :param str name: The Name of this Route Filter. :param str rule_type: The Route Filter Rule Type. """ - pulumi.set(__self__, "access", access) - pulumi.set(__self__, "communities", communities) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "rule_type", rule_type) + GetRouteFilterRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + communities=communities, + name=name, + rule_type=rule_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[str] = None, + communities: Optional[Sequence[str]] = None, + name: Optional[str] = None, + rule_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access is None: + raise TypeError("Missing 'access' argument") + if communities is None: + raise TypeError("Missing 'communities' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if rule_type is None and 'ruleType' in kwargs: + rule_type = kwargs['ruleType'] + if rule_type is None: + raise TypeError("Missing 'rule_type' argument") + + _setter("access", access) + _setter("communities", communities) + _setter("name", name) + _setter("rule_type", rule_type) @property @pulumi.getter @@ -15902,10 +22184,41 @@ def __init__(__self__, *, :param str next_hop_in_ip_address: Contains the IP address packets should be forwarded to. :param str next_hop_type: The type of Azure hop the packet should be sent to. """ - pulumi.set(__self__, "address_prefix", address_prefix) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "next_hop_in_ip_address", next_hop_in_ip_address) - pulumi.set(__self__, "next_hop_type", next_hop_type) + GetRouteTableRouteResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix=address_prefix, + name=name, + next_hop_in_ip_address=next_hop_in_ip_address, + next_hop_type=next_hop_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix: Optional[str] = None, + name: Optional[str] = None, + next_hop_in_ip_address: Optional[str] = None, + next_hop_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix is None and 'addressPrefix' in kwargs: + address_prefix = kwargs['addressPrefix'] + if address_prefix is None: + raise TypeError("Missing 'address_prefix' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if next_hop_in_ip_address is None and 'nextHopInIpAddress' in kwargs: + next_hop_in_ip_address = kwargs['nextHopInIpAddress'] + if next_hop_in_ip_address is None: + raise TypeError("Missing 'next_hop_in_ip_address' argument") + if next_hop_type is None and 'nextHopType' in kwargs: + next_hop_type = kwargs['nextHopType'] + if next_hop_type is None: + raise TypeError("Missing 'next_hop_type' argument") + + _setter("address_prefix", address_prefix) + _setter("name", name) + _setter("next_hop_in_ip_address", next_hop_in_ip_address) + _setter("next_hop_type", next_hop_type) @property @pulumi.getter(name="addressPrefix") @@ -15949,8 +22262,27 @@ def __init__(__self__, *, :param str relative_name: The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. :param int ttl: The TTL value of the Profile used by Local DNS resolvers and clients. """ - pulumi.set(__self__, "relative_name", relative_name) - pulumi.set(__self__, "ttl", ttl) + GetTrafficManagerProfileDnsConfigResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + relative_name=relative_name, + ttl=ttl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + relative_name: Optional[str] = None, + ttl: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if relative_name is None and 'relativeName' in kwargs: + relative_name = kwargs['relativeName'] + if relative_name is None: + raise TypeError("Missing 'relative_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + + _setter("relative_name", relative_name) + _setter("ttl", ttl) @property @pulumi.getter(name="relativeName") @@ -15990,14 +22322,65 @@ def __init__(__self__, *, :param int timeout_in_seconds: The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. :param int tolerated_number_of_failures: The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. """ - pulumi.set(__self__, "custom_headers", custom_headers) - pulumi.set(__self__, "expected_status_code_ranges", expected_status_code_ranges) - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "protocol", protocol) - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) - pulumi.set(__self__, "tolerated_number_of_failures", tolerated_number_of_failures) + GetTrafficManagerProfileMonitorConfigResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_headers=custom_headers, + expected_status_code_ranges=expected_status_code_ranges, + interval_in_seconds=interval_in_seconds, + path=path, + port=port, + protocol=protocol, + timeout_in_seconds=timeout_in_seconds, + tolerated_number_of_failures=tolerated_number_of_failures, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_headers: Optional[Sequence['outputs.GetTrafficManagerProfileMonitorConfigCustomHeaderResult']] = None, + expected_status_code_ranges: Optional[Sequence[str]] = None, + interval_in_seconds: Optional[int] = None, + path: Optional[str] = None, + port: Optional[int] = None, + protocol: Optional[str] = None, + timeout_in_seconds: Optional[int] = None, + tolerated_number_of_failures: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + if custom_headers is None: + raise TypeError("Missing 'custom_headers' argument") + if expected_status_code_ranges is None and 'expectedStatusCodeRanges' in kwargs: + expected_status_code_ranges = kwargs['expectedStatusCodeRanges'] + if expected_status_code_ranges is None: + raise TypeError("Missing 'expected_status_code_ranges' argument") + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if interval_in_seconds is None: + raise TypeError("Missing 'interval_in_seconds' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + if timeout_in_seconds is None: + raise TypeError("Missing 'timeout_in_seconds' argument") + if tolerated_number_of_failures is None and 'toleratedNumberOfFailures' in kwargs: + tolerated_number_of_failures = kwargs['toleratedNumberOfFailures'] + if tolerated_number_of_failures is None: + raise TypeError("Missing 'tolerated_number_of_failures' argument") + + _setter("custom_headers", custom_headers) + _setter("expected_status_code_ranges", expected_status_code_ranges) + _setter("interval_in_seconds", interval_in_seconds) + _setter("path", path) + _setter("port", port) + _setter("protocol", protocol) + _setter("timeout_in_seconds", timeout_in_seconds) + _setter("tolerated_number_of_failures", tolerated_number_of_failures) @property @pulumi.getter(name="customHeaders") @@ -16073,8 +22456,25 @@ def __init__(__self__, *, :param str name: Specifies the name of the Traffic Manager Profile. :param str value: The value of custom header. Applicable for HTTP and HTTPS protocol. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetTrafficManagerProfileMonitorConfigCustomHeaderResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -16110,12 +22510,57 @@ def __init__(__self__, *, :param str static_vnet_local_route_override_criteria: The static VNet local route override criteria that is used to determine whether NVA in spoke VNet is bypassed for traffic with destination in spoke VNet. :param Sequence['GetVirtualHubConnectionRoutingStaticVnetRouteArgs'] static_vnet_routes: A `static_vnet_route` block as defined below. """ - pulumi.set(__self__, "associated_route_table_id", associated_route_table_id) - pulumi.set(__self__, "inbound_route_map_id", inbound_route_map_id) - pulumi.set(__self__, "outbound_route_map_id", outbound_route_map_id) - pulumi.set(__self__, "propagated_route_tables", propagated_route_tables) - pulumi.set(__self__, "static_vnet_local_route_override_criteria", static_vnet_local_route_override_criteria) - pulumi.set(__self__, "static_vnet_routes", static_vnet_routes) + GetVirtualHubConnectionRoutingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + associated_route_table_id=associated_route_table_id, + inbound_route_map_id=inbound_route_map_id, + outbound_route_map_id=outbound_route_map_id, + propagated_route_tables=propagated_route_tables, + static_vnet_local_route_override_criteria=static_vnet_local_route_override_criteria, + static_vnet_routes=static_vnet_routes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + associated_route_table_id: Optional[str] = None, + inbound_route_map_id: Optional[str] = None, + outbound_route_map_id: Optional[str] = None, + propagated_route_tables: Optional[Sequence['outputs.GetVirtualHubConnectionRoutingPropagatedRouteTableResult']] = None, + static_vnet_local_route_override_criteria: Optional[str] = None, + static_vnet_routes: Optional[Sequence['outputs.GetVirtualHubConnectionRoutingStaticVnetRouteResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if associated_route_table_id is None and 'associatedRouteTableId' in kwargs: + associated_route_table_id = kwargs['associatedRouteTableId'] + if associated_route_table_id is None: + raise TypeError("Missing 'associated_route_table_id' argument") + if inbound_route_map_id is None and 'inboundRouteMapId' in kwargs: + inbound_route_map_id = kwargs['inboundRouteMapId'] + if inbound_route_map_id is None: + raise TypeError("Missing 'inbound_route_map_id' argument") + if outbound_route_map_id is None and 'outboundRouteMapId' in kwargs: + outbound_route_map_id = kwargs['outboundRouteMapId'] + if outbound_route_map_id is None: + raise TypeError("Missing 'outbound_route_map_id' argument") + if propagated_route_tables is None and 'propagatedRouteTables' in kwargs: + propagated_route_tables = kwargs['propagatedRouteTables'] + if propagated_route_tables is None: + raise TypeError("Missing 'propagated_route_tables' argument") + if static_vnet_local_route_override_criteria is None and 'staticVnetLocalRouteOverrideCriteria' in kwargs: + static_vnet_local_route_override_criteria = kwargs['staticVnetLocalRouteOverrideCriteria'] + if static_vnet_local_route_override_criteria is None: + raise TypeError("Missing 'static_vnet_local_route_override_criteria' argument") + if static_vnet_routes is None and 'staticVnetRoutes' in kwargs: + static_vnet_routes = kwargs['staticVnetRoutes'] + if static_vnet_routes is None: + raise TypeError("Missing 'static_vnet_routes' argument") + + _setter("associated_route_table_id", associated_route_table_id) + _setter("inbound_route_map_id", inbound_route_map_id) + _setter("outbound_route_map_id", outbound_route_map_id) + _setter("propagated_route_tables", propagated_route_tables) + _setter("static_vnet_local_route_override_criteria", static_vnet_local_route_override_criteria) + _setter("static_vnet_routes", static_vnet_routes) @property @pulumi.getter(name="associatedRouteTableId") @@ -16175,8 +22620,27 @@ def __init__(__self__, *, :param Sequence[str] labels: The list of labels assigned to this route table. :param Sequence[str] route_table_ids: A list of Route Table IDs associated with this Virtual Hub Connection. """ - pulumi.set(__self__, "labels", labels) - pulumi.set(__self__, "route_table_ids", route_table_ids) + GetVirtualHubConnectionRoutingPropagatedRouteTableResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + labels=labels, + route_table_ids=route_table_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + labels: Optional[Sequence[str]] = None, + route_table_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if labels is None: + raise TypeError("Missing 'labels' argument") + if route_table_ids is None and 'routeTableIds' in kwargs: + route_table_ids = kwargs['routeTableIds'] + if route_table_ids is None: + raise TypeError("Missing 'route_table_ids' argument") + + _setter("labels", labels) + _setter("route_table_ids", route_table_ids) @property @pulumi.getter @@ -16206,9 +22670,34 @@ def __init__(__self__, *, :param str name: The name of the Connection which should be retrieved. :param str next_hop_ip_address: The IP Address which is used for the Next Hop. """ - pulumi.set(__self__, "address_prefixes", address_prefixes) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "next_hop_ip_address", next_hop_ip_address) + GetVirtualHubConnectionRoutingStaticVnetRouteResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefixes=address_prefixes, + name=name, + next_hop_ip_address=next_hop_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefixes: Optional[Sequence[str]] = None, + name: Optional[str] = None, + next_hop_ip_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefixes is None and 'addressPrefixes' in kwargs: + address_prefixes = kwargs['addressPrefixes'] + if address_prefixes is None: + raise TypeError("Missing 'address_prefixes' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if next_hop_ip_address is None and 'nextHopIpAddress' in kwargs: + next_hop_ip_address = kwargs['nextHopIpAddress'] + if next_hop_ip_address is None: + raise TypeError("Missing 'next_hop_ip_address' argument") + + _setter("address_prefixes", address_prefixes) + _setter("name", name) + _setter("next_hop_ip_address", next_hop_ip_address) @property @pulumi.getter(name="addressPrefixes") @@ -16250,11 +22739,46 @@ def __init__(__self__, *, :param str next_hop: The next hop's resource ID. :param str next_hop_type: The type of next hop. """ - pulumi.set(__self__, "destinations", destinations) - pulumi.set(__self__, "destinations_type", destinations_type) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "next_hop", next_hop) - pulumi.set(__self__, "next_hop_type", next_hop_type) + GetVirtualHubRouteTableRouteResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + destinations=destinations, + destinations_type=destinations_type, + name=name, + next_hop=next_hop, + next_hop_type=next_hop_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destinations: Optional[Sequence[str]] = None, + destinations_type: Optional[str] = None, + name: Optional[str] = None, + next_hop: Optional[str] = None, + next_hop_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destinations is None: + raise TypeError("Missing 'destinations' argument") + if destinations_type is None and 'destinationsType' in kwargs: + destinations_type = kwargs['destinationsType'] + if destinations_type is None: + raise TypeError("Missing 'destinations_type' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if next_hop is None and 'nextHop' in kwargs: + next_hop = kwargs['nextHop'] + if next_hop is None: + raise TypeError("Missing 'next_hop' argument") + if next_hop_type is None and 'nextHopType' in kwargs: + next_hop_type = kwargs['nextHopType'] + if next_hop_type is None: + raise TypeError("Missing 'next_hop_type' argument") + + _setter("destinations", destinations) + _setter("destinations_type", destinations_type) + _setter("name", name) + _setter("next_hop", next_hop) + _setter("next_hop_type", next_hop_type) @property @pulumi.getter @@ -16311,9 +22835,34 @@ def __init__(__self__, *, gateway. This address is needed to configure the created gateway as a BGP Peer on the on-premises VPN devices. """ - pulumi.set(__self__, "asn", asn) - pulumi.set(__self__, "peer_weight", peer_weight) - pulumi.set(__self__, "peering_address", peering_address) + GetVirtualNetworkGatewayBgpSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + asn=asn, + peer_weight=peer_weight, + peering_address=peering_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asn: Optional[int] = None, + peer_weight: Optional[int] = None, + peering_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if asn is None: + raise TypeError("Missing 'asn' argument") + if peer_weight is None and 'peerWeight' in kwargs: + peer_weight = kwargs['peerWeight'] + if peer_weight is None: + raise TypeError("Missing 'peer_weight' argument") + if peering_address is None and 'peeringAddress' in kwargs: + peering_address = kwargs['peeringAddress'] + if peering_address is None: + raise TypeError("Missing 'peering_address' argument") + + _setter("asn", asn) + _setter("peer_weight", peer_weight) + _setter("peering_address", peering_address) @property @pulumi.getter @@ -16350,7 +22899,22 @@ def __init__(__self__, *, """ :param Sequence[str] address_prefixes: A list of address blocks reserved for this virtual network in CIDR notation. """ - pulumi.set(__self__, "address_prefixes", address_prefixes) + GetVirtualNetworkGatewayCustomRouteResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefixes=address_prefixes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefixes: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefixes is None and 'addressPrefixes' in kwargs: + address_prefixes = kwargs['addressPrefixes'] + if address_prefixes is None: + raise TypeError("Missing 'address_prefixes' argument") + + _setter("address_prefixes", address_prefixes) @property @pulumi.getter(name="addressPrefixes") @@ -16383,12 +22947,53 @@ def __init__(__self__, *, the associated subnet is named `GatewaySubnet`. Therefore, each virtual network can contain at most a single Virtual Network Gateway. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "private_ip_address_allocation", private_ip_address_allocation) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) + GetVirtualNetworkGatewayIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + private_ip_address=private_ip_address, + private_ip_address_allocation=private_ip_address_allocation, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_address_allocation: Optional[str] = None, + public_ip_address_id: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if private_ip_address_allocation is None and 'privateIpAddressAllocation' in kwargs: + private_ip_address_allocation = kwargs['privateIpAddressAllocation'] + if private_ip_address_allocation is None: + raise TypeError("Missing 'private_ip_address_allocation' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("id", id) + _setter("name", name) + _setter("private_ip_address", private_ip_address) + _setter("private_ip_address_allocation", private_ip_address_allocation) + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter @@ -16488,15 +23093,78 @@ def __init__(__self__, *, :param Sequence[str] vpn_client_protocols: List of the protocols supported by the vpn client. The supported values are `SSTP`, `IkeV2` and `OpenVPN`. """ - pulumi.set(__self__, "aad_audience", aad_audience) - pulumi.set(__self__, "aad_issuer", aad_issuer) - pulumi.set(__self__, "aad_tenant", aad_tenant) - pulumi.set(__self__, "address_spaces", address_spaces) - pulumi.set(__self__, "radius_server_address", radius_server_address) - pulumi.set(__self__, "radius_server_secret", radius_server_secret) - pulumi.set(__self__, "revoked_certificates", revoked_certificates) - pulumi.set(__self__, "root_certificates", root_certificates) - pulumi.set(__self__, "vpn_client_protocols", vpn_client_protocols) + GetVirtualNetworkGatewayVpnClientConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + aad_audience=aad_audience, + aad_issuer=aad_issuer, + aad_tenant=aad_tenant, + address_spaces=address_spaces, + radius_server_address=radius_server_address, + radius_server_secret=radius_server_secret, + revoked_certificates=revoked_certificates, + root_certificates=root_certificates, + vpn_client_protocols=vpn_client_protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aad_audience: Optional[str] = None, + aad_issuer: Optional[str] = None, + aad_tenant: Optional[str] = None, + address_spaces: Optional[Sequence[str]] = None, + radius_server_address: Optional[str] = None, + radius_server_secret: Optional[str] = None, + revoked_certificates: Optional[Sequence['outputs.GetVirtualNetworkGatewayVpnClientConfigurationRevokedCertificateResult']] = None, + root_certificates: Optional[Sequence['outputs.GetVirtualNetworkGatewayVpnClientConfigurationRootCertificateResult']] = None, + vpn_client_protocols: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aad_audience is None and 'aadAudience' in kwargs: + aad_audience = kwargs['aadAudience'] + if aad_audience is None: + raise TypeError("Missing 'aad_audience' argument") + if aad_issuer is None and 'aadIssuer' in kwargs: + aad_issuer = kwargs['aadIssuer'] + if aad_issuer is None: + raise TypeError("Missing 'aad_issuer' argument") + if aad_tenant is None and 'aadTenant' in kwargs: + aad_tenant = kwargs['aadTenant'] + if aad_tenant is None: + raise TypeError("Missing 'aad_tenant' argument") + if address_spaces is None and 'addressSpaces' in kwargs: + address_spaces = kwargs['addressSpaces'] + if address_spaces is None: + raise TypeError("Missing 'address_spaces' argument") + if radius_server_address is None and 'radiusServerAddress' in kwargs: + radius_server_address = kwargs['radiusServerAddress'] + if radius_server_address is None: + raise TypeError("Missing 'radius_server_address' argument") + if radius_server_secret is None and 'radiusServerSecret' in kwargs: + radius_server_secret = kwargs['radiusServerSecret'] + if radius_server_secret is None: + raise TypeError("Missing 'radius_server_secret' argument") + if revoked_certificates is None and 'revokedCertificates' in kwargs: + revoked_certificates = kwargs['revokedCertificates'] + if revoked_certificates is None: + raise TypeError("Missing 'revoked_certificates' argument") + if root_certificates is None and 'rootCertificates' in kwargs: + root_certificates = kwargs['rootCertificates'] + if root_certificates is None: + raise TypeError("Missing 'root_certificates' argument") + if vpn_client_protocols is None and 'vpnClientProtocols' in kwargs: + vpn_client_protocols = kwargs['vpnClientProtocols'] + if vpn_client_protocols is None: + raise TypeError("Missing 'vpn_client_protocols' argument") + + _setter("aad_audience", aad_audience) + _setter("aad_issuer", aad_issuer) + _setter("aad_tenant", aad_tenant) + _setter("address_spaces", address_spaces) + _setter("radius_server_address", radius_server_address) + _setter("radius_server_secret", radius_server_secret) + _setter("revoked_certificates", revoked_certificates) + _setter("root_certificates", root_certificates) + _setter("vpn_client_protocols", vpn_client_protocols) @property @pulumi.getter(name="aadAudience") @@ -16600,8 +23268,25 @@ def __init__(__self__, *, """ :param str name: Specifies the name of the Virtual Network Gateway. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "thumbprint", thumbprint) + GetVirtualNetworkGatewayVpnClientConfigurationRevokedCertificateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + + _setter("name", name) + _setter("thumbprint", thumbprint) @property @pulumi.getter @@ -16628,8 +23313,27 @@ def __init__(__self__, *, authority. The certificate must be provided in Base-64 encoded X.509 format (PEM). """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "public_cert_data", public_cert_data) + GetVirtualNetworkGatewayVpnClientConfigurationRootCertificateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + public_cert_data=public_cert_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + public_cert_data: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if public_cert_data is None and 'publicCertData' in kwargs: + public_cert_data = kwargs['publicCertData'] + if public_cert_data is None: + raise TypeError("Missing 'public_cert_data' argument") + + _setter("name", name) + _setter("public_cert_data", public_cert_data) @property @pulumi.getter @@ -16665,11 +23369,48 @@ def __init__(__self__, *, :param Sequence['GetVpnGatewayBgpSettingInstance1BgpPeeringAddressArgs'] instance1_bgp_peering_addresses: an `instance_bgp_peering_address` block as defined below. :param int peer_weight: The weight added to Routes learned from this BGP Speaker. """ - pulumi.set(__self__, "asn", asn) - pulumi.set(__self__, "bgp_peering_address", bgp_peering_address) - pulumi.set(__self__, "instance0_bgp_peering_addresses", instance0_bgp_peering_addresses) - pulumi.set(__self__, "instance1_bgp_peering_addresses", instance1_bgp_peering_addresses) - pulumi.set(__self__, "peer_weight", peer_weight) + GetVpnGatewayBgpSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + asn=asn, + bgp_peering_address=bgp_peering_address, + instance0_bgp_peering_addresses=instance0_bgp_peering_addresses, + instance1_bgp_peering_addresses=instance1_bgp_peering_addresses, + peer_weight=peer_weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + asn: Optional[int] = None, + bgp_peering_address: Optional[str] = None, + instance0_bgp_peering_addresses: Optional[Sequence['outputs.GetVpnGatewayBgpSettingInstance0BgpPeeringAddressResult']] = None, + instance1_bgp_peering_addresses: Optional[Sequence['outputs.GetVpnGatewayBgpSettingInstance1BgpPeeringAddressResult']] = None, + peer_weight: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if asn is None: + raise TypeError("Missing 'asn' argument") + if bgp_peering_address is None and 'bgpPeeringAddress' in kwargs: + bgp_peering_address = kwargs['bgpPeeringAddress'] + if bgp_peering_address is None: + raise TypeError("Missing 'bgp_peering_address' argument") + if instance0_bgp_peering_addresses is None and 'instance0BgpPeeringAddresses' in kwargs: + instance0_bgp_peering_addresses = kwargs['instance0BgpPeeringAddresses'] + if instance0_bgp_peering_addresses is None: + raise TypeError("Missing 'instance0_bgp_peering_addresses' argument") + if instance1_bgp_peering_addresses is None and 'instance1BgpPeeringAddresses' in kwargs: + instance1_bgp_peering_addresses = kwargs['instance1BgpPeeringAddresses'] + if instance1_bgp_peering_addresses is None: + raise TypeError("Missing 'instance1_bgp_peering_addresses' argument") + if peer_weight is None and 'peerWeight' in kwargs: + peer_weight = kwargs['peerWeight'] + if peer_weight is None: + raise TypeError("Missing 'peer_weight' argument") + + _setter("asn", asn) + _setter("bgp_peering_address", bgp_peering_address) + _setter("instance0_bgp_peering_addresses", instance0_bgp_peering_addresses) + _setter("instance1_bgp_peering_addresses", instance1_bgp_peering_addresses) + _setter("peer_weight", peer_weight) @property @pulumi.getter @@ -16725,10 +23466,43 @@ def __init__(__self__, *, :param str ip_configuration_id: The pre-defined id of VPN Gateway IP Configuration. :param Sequence[str] tunnel_ips: The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration. """ - pulumi.set(__self__, "custom_ips", custom_ips) - pulumi.set(__self__, "default_ips", default_ips) - pulumi.set(__self__, "ip_configuration_id", ip_configuration_id) - pulumi.set(__self__, "tunnel_ips", tunnel_ips) + GetVpnGatewayBgpSettingInstance0BgpPeeringAddressResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_ips=custom_ips, + default_ips=default_ips, + ip_configuration_id=ip_configuration_id, + tunnel_ips=tunnel_ips, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_ips: Optional[Sequence[str]] = None, + default_ips: Optional[Sequence[str]] = None, + ip_configuration_id: Optional[str] = None, + tunnel_ips: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_ips is None and 'customIps' in kwargs: + custom_ips = kwargs['customIps'] + if custom_ips is None: + raise TypeError("Missing 'custom_ips' argument") + if default_ips is None and 'defaultIps' in kwargs: + default_ips = kwargs['defaultIps'] + if default_ips is None: + raise TypeError("Missing 'default_ips' argument") + if ip_configuration_id is None and 'ipConfigurationId' in kwargs: + ip_configuration_id = kwargs['ipConfigurationId'] + if ip_configuration_id is None: + raise TypeError("Missing 'ip_configuration_id' argument") + if tunnel_ips is None and 'tunnelIps' in kwargs: + tunnel_ips = kwargs['tunnelIps'] + if tunnel_ips is None: + raise TypeError("Missing 'tunnel_ips' argument") + + _setter("custom_ips", custom_ips) + _setter("default_ips", default_ips) + _setter("ip_configuration_id", ip_configuration_id) + _setter("tunnel_ips", tunnel_ips) @property @pulumi.getter(name="customIps") @@ -16776,10 +23550,43 @@ def __init__(__self__, *, :param str ip_configuration_id: The pre-defined id of VPN Gateway IP Configuration. :param Sequence[str] tunnel_ips: The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration. """ - pulumi.set(__self__, "custom_ips", custom_ips) - pulumi.set(__self__, "default_ips", default_ips) - pulumi.set(__self__, "ip_configuration_id", ip_configuration_id) - pulumi.set(__self__, "tunnel_ips", tunnel_ips) + GetVpnGatewayBgpSettingInstance1BgpPeeringAddressResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_ips=custom_ips, + default_ips=default_ips, + ip_configuration_id=ip_configuration_id, + tunnel_ips=tunnel_ips, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_ips: Optional[Sequence[str]] = None, + default_ips: Optional[Sequence[str]] = None, + ip_configuration_id: Optional[str] = None, + tunnel_ips: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_ips is None and 'customIps' in kwargs: + custom_ips = kwargs['customIps'] + if custom_ips is None: + raise TypeError("Missing 'custom_ips' argument") + if default_ips is None and 'defaultIps' in kwargs: + default_ips = kwargs['defaultIps'] + if default_ips is None: + raise TypeError("Missing 'default_ips' argument") + if ip_configuration_id is None and 'ipConfigurationId' in kwargs: + ip_configuration_id = kwargs['ipConfigurationId'] + if ip_configuration_id is None: + raise TypeError("Missing 'ip_configuration_id' argument") + if tunnel_ips is None and 'tunnelIps' in kwargs: + tunnel_ips = kwargs['tunnelIps'] + if tunnel_ips is None: + raise TypeError("Missing 'tunnel_ips' argument") + + _setter("custom_ips", custom_ips) + _setter("default_ips", default_ips) + _setter("ip_configuration_id", ip_configuration_id) + _setter("tunnel_ips", tunnel_ips) @property @pulumi.getter(name="customIps") diff --git a/sdk/python/pulumi_azure/network/point_to_point_vpn_gateway.py b/sdk/python/pulumi_azure/network/point_to_point_vpn_gateway.py index 6fc65aea90..1418a6b255 100644 --- a/sdk/python/pulumi_azure/network/point_to_point_vpn_gateway.py +++ b/sdk/python/pulumi_azure/network/point_to_point_vpn_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,21 +39,74 @@ def __init__(__self__, *, :param pulumi.Input[bool] routing_preference_internet_enabled: Is the Routing Preference for the Public IP Interface of the VPN Gateway enabled? Defaults to `false`. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Point-to-Site VPN Gateway. """ - pulumi.set(__self__, "connection_configuration", connection_configuration) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scale_unit", scale_unit) - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) - pulumi.set(__self__, "vpn_server_configuration_id", vpn_server_configuration_id) + PointToPointVpnGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_configuration=connection_configuration, + resource_group_name=resource_group_name, + scale_unit=scale_unit, + virtual_hub_id=virtual_hub_id, + vpn_server_configuration_id=vpn_server_configuration_id, + dns_servers=dns_servers, + location=location, + name=name, + routing_preference_internet_enabled=routing_preference_internet_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_configuration: Optional[pulumi.Input['PointToPointVpnGatewayConnectionConfigurationArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scale_unit: Optional[pulumi.Input[int]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + vpn_server_configuration_id: Optional[pulumi.Input[str]] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + routing_preference_internet_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_configuration is None and 'connectionConfiguration' in kwargs: + connection_configuration = kwargs['connectionConfiguration'] + if connection_configuration is None: + raise TypeError("Missing 'connection_configuration' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scale_unit is None and 'scaleUnit' in kwargs: + scale_unit = kwargs['scaleUnit'] + if scale_unit is None: + raise TypeError("Missing 'scale_unit' argument") + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + if vpn_server_configuration_id is None and 'vpnServerConfigurationId' in kwargs: + vpn_server_configuration_id = kwargs['vpnServerConfigurationId'] + if vpn_server_configuration_id is None: + raise TypeError("Missing 'vpn_server_configuration_id' argument") + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if routing_preference_internet_enabled is None and 'routingPreferenceInternetEnabled' in kwargs: + routing_preference_internet_enabled = kwargs['routingPreferenceInternetEnabled'] + + _setter("connection_configuration", connection_configuration) + _setter("resource_group_name", resource_group_name) + _setter("scale_unit", scale_unit) + _setter("virtual_hub_id", virtual_hub_id) + _setter("vpn_server_configuration_id", vpn_server_configuration_id) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if routing_preference_internet_enabled is not None: - pulumi.set(__self__, "routing_preference_internet_enabled", routing_preference_internet_enabled) + _setter("routing_preference_internet_enabled", routing_preference_internet_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="connectionConfiguration") @@ -202,26 +255,69 @@ def __init__(__self__, *, :param pulumi.Input[str] virtual_hub_id: The ID of the Virtual Hub where this Point-to-Site VPN Gateway should exist. Changing this forces a new resource to be created. :param pulumi.Input[str] vpn_server_configuration_id: The ID of the VPN Server Configuration which this Point-to-Site VPN Gateway should use. Changing this forces a new resource to be created. """ + _PointToPointVpnGatewayState._configure( + lambda key, value: pulumi.set(__self__, key, value), + connection_configuration=connection_configuration, + dns_servers=dns_servers, + location=location, + name=name, + resource_group_name=resource_group_name, + routing_preference_internet_enabled=routing_preference_internet_enabled, + scale_unit=scale_unit, + tags=tags, + virtual_hub_id=virtual_hub_id, + vpn_server_configuration_id=vpn_server_configuration_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connection_configuration: Optional[pulumi.Input['PointToPointVpnGatewayConnectionConfigurationArgs']] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + routing_preference_internet_enabled: Optional[pulumi.Input[bool]] = None, + scale_unit: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + vpn_server_configuration_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connection_configuration is None and 'connectionConfiguration' in kwargs: + connection_configuration = kwargs['connectionConfiguration'] + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if routing_preference_internet_enabled is None and 'routingPreferenceInternetEnabled' in kwargs: + routing_preference_internet_enabled = kwargs['routingPreferenceInternetEnabled'] + if scale_unit is None and 'scaleUnit' in kwargs: + scale_unit = kwargs['scaleUnit'] + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if vpn_server_configuration_id is None and 'vpnServerConfigurationId' in kwargs: + vpn_server_configuration_id = kwargs['vpnServerConfigurationId'] + if connection_configuration is not None: - pulumi.set(__self__, "connection_configuration", connection_configuration) + _setter("connection_configuration", connection_configuration) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if routing_preference_internet_enabled is not None: - pulumi.set(__self__, "routing_preference_internet_enabled", routing_preference_internet_enabled) + _setter("routing_preference_internet_enabled", routing_preference_internet_enabled) if scale_unit is not None: - pulumi.set(__self__, "scale_unit", scale_unit) + _setter("scale_unit", scale_unit) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_hub_id is not None: - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + _setter("virtual_hub_id", virtual_hub_id) if vpn_server_configuration_id is not None: - pulumi.set(__self__, "vpn_server_configuration_id", vpn_server_configuration_id) + _setter("vpn_server_configuration_id", vpn_server_configuration_id) @property @pulumi.getter(name="connectionConfiguration") @@ -525,6 +621,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PointToPointVpnGatewayArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -549,6 +649,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = PointToPointVpnGatewayArgs.__new__(PointToPointVpnGatewayArgs) + if connection_configuration is not None and not isinstance(connection_configuration, PointToPointVpnGatewayConnectionConfigurationArgs): + connection_configuration = connection_configuration or {} + def _setter(key, value): + connection_configuration[key] = value + PointToPointVpnGatewayConnectionConfigurationArgs._configure(_setter, **connection_configuration) if connection_configuration is None and not opts.urn: raise TypeError("Missing required property 'connection_configuration'") __props__.__dict__["connection_configuration"] = connection_configuration diff --git a/sdk/python/pulumi_azure/network/profile.py b/sdk/python/pulumi_azure/network/profile.py index 146c3620a5..4a047f773c 100644 --- a/sdk/python/pulumi_azure/network/profile.py +++ b/sdk/python/pulumi_azure/network/profile.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Network Profile. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "container_network_interface", container_network_interface) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_network_interface=container_network_interface, + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_network_interface: Optional[pulumi.Input['ProfileContainerNetworkInterfaceArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_network_interface is None and 'containerNetworkInterface' in kwargs: + container_network_interface = kwargs['containerNetworkInterface'] + if container_network_interface is None: + raise TypeError("Missing 'container_network_interface' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("container_network_interface", container_network_interface) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="containerNetworkInterface") @@ -117,18 +144,45 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the resource. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ProfileState._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_network_interface=container_network_interface, + container_network_interface_ids=container_network_interface_ids, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_network_interface: Optional[pulumi.Input['ProfileContainerNetworkInterfaceArgs']] = None, + container_network_interface_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_network_interface is None and 'containerNetworkInterface' in kwargs: + container_network_interface = kwargs['containerNetworkInterface'] + if container_network_interface_ids is None and 'containerNetworkInterfaceIds' in kwargs: + container_network_interface_ids = kwargs['containerNetworkInterfaceIds'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if container_network_interface is not None: - pulumi.set(__self__, "container_network_interface", container_network_interface) + _setter("container_network_interface", container_network_interface) if container_network_interface_ids is not None: - pulumi.set(__self__, "container_network_interface_ids", container_network_interface_ids) + _setter("container_network_interface_ids", container_network_interface_ids) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="containerNetworkInterface") @@ -328,6 +382,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProfileArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -347,6 +405,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ProfileArgs.__new__(ProfileArgs) + if container_network_interface is not None and not isinstance(container_network_interface, ProfileContainerNetworkInterfaceArgs): + container_network_interface = container_network_interface or {} + def _setter(key, value): + container_network_interface[key] = value + ProfileContainerNetworkInterfaceArgs._configure(_setter, **container_network_interface) if container_network_interface is None and not opts.urn: raise TypeError("Missing required property 'container_network_interface'") __props__.__dict__["container_network_interface"] = container_network_interface diff --git a/sdk/python/pulumi_azure/network/public_ip.py b/sdk/python/pulumi_azure/network/public_ip.py index f4aa3e43fa..f7b7398463 100644 --- a/sdk/python/pulumi_azure/network/public_ip.py +++ b/sdk/python/pulumi_azure/network/public_ip.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PublicIpArgs', 'PublicIp'] @@ -65,38 +65,109 @@ def __init__(__self__, *, > **Note:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/virtual-network/virtual-network-ip-addresses-overview-arm#standard) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. Standard SKU Public IP Addresses that do not specify a zone are **not** zone-redundant by default. """ - pulumi.set(__self__, "allocation_method", allocation_method) - pulumi.set(__self__, "resource_group_name", resource_group_name) + PublicIpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allocation_method=allocation_method, + resource_group_name=resource_group_name, + ddos_protection_mode=ddos_protection_mode, + ddos_protection_plan_id=ddos_protection_plan_id, + domain_name_label=domain_name_label, + edge_zone=edge_zone, + idle_timeout_in_minutes=idle_timeout_in_minutes, + ip_tags=ip_tags, + ip_version=ip_version, + location=location, + name=name, + public_ip_prefix_id=public_ip_prefix_id, + reverse_fqdn=reverse_fqdn, + sku=sku, + sku_tier=sku_tier, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allocation_method: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ddos_protection_mode: Optional[pulumi.Input[str]] = None, + ddos_protection_plan_id: Optional[pulumi.Input[str]] = None, + domain_name_label: Optional[pulumi.Input[str]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + ip_tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ip_version: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_ip_prefix_id: Optional[pulumi.Input[str]] = None, + reverse_fqdn: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + sku_tier: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allocation_method is None and 'allocationMethod' in kwargs: + allocation_method = kwargs['allocationMethod'] + if allocation_method is None: + raise TypeError("Missing 'allocation_method' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ddos_protection_mode is None and 'ddosProtectionMode' in kwargs: + ddos_protection_mode = kwargs['ddosProtectionMode'] + if ddos_protection_plan_id is None and 'ddosProtectionPlanId' in kwargs: + ddos_protection_plan_id = kwargs['ddosProtectionPlanId'] + if domain_name_label is None and 'domainNameLabel' in kwargs: + domain_name_label = kwargs['domainNameLabel'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if ip_tags is None and 'ipTags' in kwargs: + ip_tags = kwargs['ipTags'] + if ip_version is None and 'ipVersion' in kwargs: + ip_version = kwargs['ipVersion'] + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + if reverse_fqdn is None and 'reverseFqdn' in kwargs: + reverse_fqdn = kwargs['reverseFqdn'] + if sku_tier is None and 'skuTier' in kwargs: + sku_tier = kwargs['skuTier'] + + _setter("allocation_method", allocation_method) + _setter("resource_group_name", resource_group_name) if ddos_protection_mode is not None: - pulumi.set(__self__, "ddos_protection_mode", ddos_protection_mode) + _setter("ddos_protection_mode", ddos_protection_mode) if ddos_protection_plan_id is not None: - pulumi.set(__self__, "ddos_protection_plan_id", ddos_protection_plan_id) + _setter("ddos_protection_plan_id", ddos_protection_plan_id) if domain_name_label is not None: - pulumi.set(__self__, "domain_name_label", domain_name_label) + _setter("domain_name_label", domain_name_label) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if ip_tags is not None: - pulumi.set(__self__, "ip_tags", ip_tags) + _setter("ip_tags", ip_tags) if ip_version is not None: - pulumi.set(__self__, "ip_version", ip_version) + _setter("ip_version", ip_version) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_ip_prefix_id is not None: - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) + _setter("public_ip_prefix_id", public_ip_prefix_id) if reverse_fqdn is not None: - pulumi.set(__self__, "reverse_fqdn", reverse_fqdn) + _setter("reverse_fqdn", reverse_fqdn) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if sku_tier is not None: - pulumi.set(__self__, "sku_tier", sku_tier) + _setter("sku_tier", sku_tier) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="allocationMethod") @@ -375,44 +446,117 @@ def __init__(__self__, *, > **Note:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/virtual-network/virtual-network-ip-addresses-overview-arm#standard) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. Standard SKU Public IP Addresses that do not specify a zone are **not** zone-redundant by default. """ + _PublicIpState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allocation_method=allocation_method, + ddos_protection_mode=ddos_protection_mode, + ddos_protection_plan_id=ddos_protection_plan_id, + domain_name_label=domain_name_label, + edge_zone=edge_zone, + fqdn=fqdn, + idle_timeout_in_minutes=idle_timeout_in_minutes, + ip_address=ip_address, + ip_tags=ip_tags, + ip_version=ip_version, + location=location, + name=name, + public_ip_prefix_id=public_ip_prefix_id, + resource_group_name=resource_group_name, + reverse_fqdn=reverse_fqdn, + sku=sku, + sku_tier=sku_tier, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allocation_method: Optional[pulumi.Input[str]] = None, + ddos_protection_mode: Optional[pulumi.Input[str]] = None, + ddos_protection_plan_id: Optional[pulumi.Input[str]] = None, + domain_name_label: Optional[pulumi.Input[str]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + idle_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + ip_address: Optional[pulumi.Input[str]] = None, + ip_tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ip_version: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_ip_prefix_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + reverse_fqdn: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + sku_tier: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allocation_method is None and 'allocationMethod' in kwargs: + allocation_method = kwargs['allocationMethod'] + if ddos_protection_mode is None and 'ddosProtectionMode' in kwargs: + ddos_protection_mode = kwargs['ddosProtectionMode'] + if ddos_protection_plan_id is None and 'ddosProtectionPlanId' in kwargs: + ddos_protection_plan_id = kwargs['ddosProtectionPlanId'] + if domain_name_label is None and 'domainNameLabel' in kwargs: + domain_name_label = kwargs['domainNameLabel'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if idle_timeout_in_minutes is None and 'idleTimeoutInMinutes' in kwargs: + idle_timeout_in_minutes = kwargs['idleTimeoutInMinutes'] + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_tags is None and 'ipTags' in kwargs: + ip_tags = kwargs['ipTags'] + if ip_version is None and 'ipVersion' in kwargs: + ip_version = kwargs['ipVersion'] + if public_ip_prefix_id is None and 'publicIpPrefixId' in kwargs: + public_ip_prefix_id = kwargs['publicIpPrefixId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if reverse_fqdn is None and 'reverseFqdn' in kwargs: + reverse_fqdn = kwargs['reverseFqdn'] + if sku_tier is None and 'skuTier' in kwargs: + sku_tier = kwargs['skuTier'] + if allocation_method is not None: - pulumi.set(__self__, "allocation_method", allocation_method) + _setter("allocation_method", allocation_method) if ddos_protection_mode is not None: - pulumi.set(__self__, "ddos_protection_mode", ddos_protection_mode) + _setter("ddos_protection_mode", ddos_protection_mode) if ddos_protection_plan_id is not None: - pulumi.set(__self__, "ddos_protection_plan_id", ddos_protection_plan_id) + _setter("ddos_protection_plan_id", ddos_protection_plan_id) if domain_name_label is not None: - pulumi.set(__self__, "domain_name_label", domain_name_label) + _setter("domain_name_label", domain_name_label) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if idle_timeout_in_minutes is not None: - pulumi.set(__self__, "idle_timeout_in_minutes", idle_timeout_in_minutes) + _setter("idle_timeout_in_minutes", idle_timeout_in_minutes) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if ip_tags is not None: - pulumi.set(__self__, "ip_tags", ip_tags) + _setter("ip_tags", ip_tags) if ip_version is not None: - pulumi.set(__self__, "ip_version", ip_version) + _setter("ip_version", ip_version) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_ip_prefix_id is not None: - pulumi.set(__self__, "public_ip_prefix_id", public_ip_prefix_id) + _setter("public_ip_prefix_id", public_ip_prefix_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if reverse_fqdn is not None: - pulumi.set(__self__, "reverse_fqdn", reverse_fqdn) + _setter("reverse_fqdn", reverse_fqdn) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if sku_tier is not None: - pulumi.set(__self__, "sku_tier", sku_tier) + _setter("sku_tier", sku_tier) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="allocationMethod") @@ -788,6 +932,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PublicIpArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/public_ip_prefix.py b/sdk/python/pulumi_azure/network/public_ip_prefix.py index 5c90dbd9df..ae2a04cbd8 100644 --- a/sdk/python/pulumi_azure/network/public_ip_prefix.py +++ b/sdk/python/pulumi_azure/network/public_ip_prefix.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PublicIpPrefixArgs', 'PublicIpPrefix'] @@ -39,21 +39,54 @@ def __init__(__self__, *, > **Please Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + PublicIpPrefixArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + ip_version=ip_version, + location=location, + name=name, + prefix_length=prefix_length, + sku=sku, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + ip_version: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + prefix_length: Optional[pulumi.Input[int]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ip_version is None and 'ipVersion' in kwargs: + ip_version = kwargs['ipVersion'] + if prefix_length is None and 'prefixLength' in kwargs: + prefix_length = kwargs['prefixLength'] + + _setter("resource_group_name", resource_group_name) if ip_version is not None: - pulumi.set(__self__, "ip_version", ip_version) + _setter("ip_version", ip_version) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if prefix_length is not None: - pulumi.set(__self__, "prefix_length", prefix_length) + _setter("prefix_length", prefix_length) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="resourceGroupName") @@ -188,24 +221,59 @@ def __init__(__self__, *, > **Please Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). """ + _PublicIpPrefixState._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_prefix=ip_prefix, + ip_version=ip_version, + location=location, + name=name, + prefix_length=prefix_length, + resource_group_name=resource_group_name, + sku=sku, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_prefix: Optional[pulumi.Input[str]] = None, + ip_version: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + prefix_length: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_prefix is None and 'ipPrefix' in kwargs: + ip_prefix = kwargs['ipPrefix'] + if ip_version is None and 'ipVersion' in kwargs: + ip_version = kwargs['ipVersion'] + if prefix_length is None and 'prefixLength' in kwargs: + prefix_length = kwargs['prefixLength'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if ip_prefix is not None: - pulumi.set(__self__, "ip_prefix", ip_prefix) + _setter("ip_prefix", ip_prefix) if ip_version is not None: - pulumi.set(__self__, "ip_version", ip_version) + _setter("ip_version", ip_version) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if prefix_length is not None: - pulumi.set(__self__, "prefix_length", prefix_length) + _setter("prefix_length", prefix_length) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="ipPrefix") @@ -423,6 +491,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PublicIpPrefixArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/route.py b/sdk/python/pulumi_azure/network/route.py index db32170dcd..d12a3dee3c 100644 --- a/sdk/python/pulumi_azure/network/route.py +++ b/sdk/python/pulumi_azure/network/route.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RouteArgs', 'Route'] @@ -29,14 +29,53 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the route. Changing this forces a new resource to be created. :param pulumi.Input[str] next_hop_in_ip_address: Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is `VirtualAppliance`. """ - pulumi.set(__self__, "address_prefix", address_prefix) - pulumi.set(__self__, "next_hop_type", next_hop_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "route_table_name", route_table_name) + RouteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix=address_prefix, + next_hop_type=next_hop_type, + resource_group_name=resource_group_name, + route_table_name=route_table_name, + name=name, + next_hop_in_ip_address=next_hop_in_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix: Optional[pulumi.Input[str]] = None, + next_hop_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + route_table_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + next_hop_in_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix is None and 'addressPrefix' in kwargs: + address_prefix = kwargs['addressPrefix'] + if address_prefix is None: + raise TypeError("Missing 'address_prefix' argument") + if next_hop_type is None and 'nextHopType' in kwargs: + next_hop_type = kwargs['nextHopType'] + if next_hop_type is None: + raise TypeError("Missing 'next_hop_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if route_table_name is None and 'routeTableName' in kwargs: + route_table_name = kwargs['routeTableName'] + if route_table_name is None: + raise TypeError("Missing 'route_table_name' argument") + if next_hop_in_ip_address is None and 'nextHopInIpAddress' in kwargs: + next_hop_in_ip_address = kwargs['nextHopInIpAddress'] + + _setter("address_prefix", address_prefix) + _setter("next_hop_type", next_hop_type) + _setter("resource_group_name", resource_group_name) + _setter("route_table_name", route_table_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if next_hop_in_ip_address is not None: - pulumi.set(__self__, "next_hop_in_ip_address", next_hop_in_ip_address) + _setter("next_hop_in_ip_address", next_hop_in_ip_address) @property @pulumi.getter(name="addressPrefix") @@ -129,18 +168,49 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the route. Changing this forces a new resource to be created. :param pulumi.Input[str] route_table_name: The name of the route table within which create the route. Changing this forces a new resource to be created. """ + _RouteState._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix=address_prefix, + name=name, + next_hop_in_ip_address=next_hop_in_ip_address, + next_hop_type=next_hop_type, + resource_group_name=resource_group_name, + route_table_name=route_table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + next_hop_in_ip_address: Optional[pulumi.Input[str]] = None, + next_hop_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + route_table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix is None and 'addressPrefix' in kwargs: + address_prefix = kwargs['addressPrefix'] + if next_hop_in_ip_address is None and 'nextHopInIpAddress' in kwargs: + next_hop_in_ip_address = kwargs['nextHopInIpAddress'] + if next_hop_type is None and 'nextHopType' in kwargs: + next_hop_type = kwargs['nextHopType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if route_table_name is None and 'routeTableName' in kwargs: + route_table_name = kwargs['routeTableName'] + if address_prefix is not None: - pulumi.set(__self__, "address_prefix", address_prefix) + _setter("address_prefix", address_prefix) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if next_hop_in_ip_address is not None: - pulumi.set(__self__, "next_hop_in_ip_address", next_hop_in_ip_address) + _setter("next_hop_in_ip_address", next_hop_in_ip_address) if next_hop_type is not None: - pulumi.set(__self__, "next_hop_type", next_hop_type) + _setter("next_hop_type", next_hop_type) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if route_table_name is not None: - pulumi.set(__self__, "route_table_name", route_table_name) + _setter("route_table_name", route_table_name) @property @pulumi.getter(name="addressPrefix") @@ -316,6 +386,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RouteArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/route_filter.py b/sdk/python/pulumi_azure/network/route_filter.py index fad2e0a5fc..c486b06752 100644 --- a/sdk/python/pulumi_azure/network/route_filter.py +++ b/sdk/python/pulumi_azure/network/route_filter.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,15 +29,38 @@ def __init__(__self__, *, :param pulumi.Input['RouteFilterRuleArgs'] rule: A `rule` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Route Filter. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + RouteFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + rule=rule, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rule: Optional[pulumi.Input['RouteFilterRuleArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rule is not None: - pulumi.set(__self__, "rule", rule) + _setter("rule", rule) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -116,16 +139,37 @@ def __init__(__self__, *, :param pulumi.Input['RouteFilterRuleArgs'] rule: A `rule` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Route Filter. """ + _RouteFilterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + rule=rule, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rule: Optional[pulumi.Input['RouteFilterRuleArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rule is not None: - pulumi.set(__self__, "rule", rule) + _setter("rule", rule) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -279,6 +323,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RouteFilterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -303,6 +351,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if rule is not None and not isinstance(rule, RouteFilterRuleArgs): + rule = rule or {} + def _setter(key, value): + rule[key] = value + RouteFilterRuleArgs._configure(_setter, **rule) __props__.__dict__["rule"] = rule __props__.__dict__["tags"] = tags super(RouteFilter, __self__).__init__( diff --git a/sdk/python/pulumi_azure/network/route_map.py b/sdk/python/pulumi_azure/network/route_map.py index 1eabafe98a..f0212d14fe 100644 --- a/sdk/python/pulumi_azure/network/route_map.py +++ b/sdk/python/pulumi_azure/network/route_map.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -25,11 +25,30 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Route Map. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['RouteMapRuleArgs']]] rules: A `rule` block as defined below. """ - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + RouteMapArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + virtual_hub_id=virtual_hub_id, + name=name, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + virtual_hub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['RouteMapRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + + _setter("virtual_hub_id", virtual_hub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter(name="virtualHubId") @@ -80,12 +99,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['RouteMapRuleArgs']]] rules: A `rule` block as defined below. :param pulumi.Input[str] virtual_hub_id: The resource ID of the Virtual Hub. Changing this forces a new resource to be created. """ + _RouteMapState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + rules=rules, + virtual_hub_id=virtual_hub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['RouteMapRuleArgs']]]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) if virtual_hub_id is not None: - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + _setter("virtual_hub_id", virtual_hub_id) @property @pulumi.getter @@ -243,6 +279,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RouteMapArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/route_server.py b/sdk/python/pulumi_azure/network/route_server.py index 2e3ee45f85..54dbd5c3b2 100644 --- a/sdk/python/pulumi_azure/network/route_server.py +++ b/sdk/python/pulumi_azure/network/route_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RouteServerArgs', 'RouteServer'] @@ -35,18 +35,59 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Route Server. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "subnet_id", subnet_id) + RouteServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_ip_address_id=public_ip_address_id, + resource_group_name=resource_group_name, + sku=sku, + subnet_id=subnet_id, + branch_to_branch_traffic_enabled=branch_to_branch_traffic_enabled, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_ip_address_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + branch_to_branch_traffic_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if branch_to_branch_traffic_enabled is None and 'branchToBranchTrafficEnabled' in kwargs: + branch_to_branch_traffic_enabled = kwargs['branchToBranchTrafficEnabled'] + + _setter("public_ip_address_id", public_ip_address_id) + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) + _setter("subnet_id", subnet_id) if branch_to_branch_traffic_enabled is not None: - pulumi.set(__self__, "branch_to_branch_traffic_enabled", branch_to_branch_traffic_enabled) + _setter("branch_to_branch_traffic_enabled", branch_to_branch_traffic_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="publicIpAddressId") @@ -174,28 +215,73 @@ def __init__(__self__, *, > **NOTE:** Azure Route Server requires a dedicated subnet named RouteServerSubnet. The subnet size has to be at least /27 or short prefix (such as /26 or /25) and cannot be attached to any security group, otherwise, you'll receive an error message when deploying the Route Server :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _RouteServerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + branch_to_branch_traffic_enabled=branch_to_branch_traffic_enabled, + location=location, + name=name, + public_ip_address_id=public_ip_address_id, + resource_group_name=resource_group_name, + routing_state=routing_state, + sku=sku, + subnet_id=subnet_id, + tags=tags, + virtual_router_asn=virtual_router_asn, + virtual_router_ips=virtual_router_ips, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + branch_to_branch_traffic_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + routing_state: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_router_asn: Optional[pulumi.Input[int]] = None, + virtual_router_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if branch_to_branch_traffic_enabled is None and 'branchToBranchTrafficEnabled' in kwargs: + branch_to_branch_traffic_enabled = kwargs['branchToBranchTrafficEnabled'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if routing_state is None and 'routingState' in kwargs: + routing_state = kwargs['routingState'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_router_asn is None and 'virtualRouterAsn' in kwargs: + virtual_router_asn = kwargs['virtualRouterAsn'] + if virtual_router_ips is None and 'virtualRouterIps' in kwargs: + virtual_router_ips = kwargs['virtualRouterIps'] + if branch_to_branch_traffic_enabled is not None: - pulumi.set(__self__, "branch_to_branch_traffic_enabled", branch_to_branch_traffic_enabled) + _setter("branch_to_branch_traffic_enabled", branch_to_branch_traffic_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if routing_state is not None: - pulumi.set(__self__, "routing_state", routing_state) + _setter("routing_state", routing_state) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_router_asn is not None: - pulumi.set(__self__, "virtual_router_asn", virtual_router_asn) + _setter("virtual_router_asn", virtual_router_asn) if virtual_router_ips is not None: - pulumi.set(__self__, "virtual_router_ips", virtual_router_ips) + _setter("virtual_router_ips", virtual_router_ips) @property @pulumi.getter(name="branchToBranchTrafficEnabled") @@ -452,6 +538,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RouteServerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/route_server_bgp_connection.py b/sdk/python/pulumi_azure/network/route_server_bgp_connection.py index 62490adb41..5ca45a68ac 100644 --- a/sdk/python/pulumi_azure/network/route_server_bgp_connection.py +++ b/sdk/python/pulumi_azure/network/route_server_bgp_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RouteServerBgpConnectionArgs', 'RouteServerBgpConnection'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] route_server_id: The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "peer_asn", peer_asn) - pulumi.set(__self__, "peer_ip", peer_ip) - pulumi.set(__self__, "route_server_id", route_server_id) + RouteServerBgpConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + peer_asn=peer_asn, + peer_ip=peer_ip, + route_server_id=route_server_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + peer_asn: Optional[pulumi.Input[int]] = None, + peer_ip: Optional[pulumi.Input[str]] = None, + route_server_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if peer_asn is None and 'peerAsn' in kwargs: + peer_asn = kwargs['peerAsn'] + if peer_asn is None: + raise TypeError("Missing 'peer_asn' argument") + if peer_ip is None and 'peerIp' in kwargs: + peer_ip = kwargs['peerIp'] + if peer_ip is None: + raise TypeError("Missing 'peer_ip' argument") + if route_server_id is None and 'routeServerId' in kwargs: + route_server_id = kwargs['routeServerId'] + if route_server_id is None: + raise TypeError("Missing 'route_server_id' argument") + + _setter("peer_asn", peer_asn) + _setter("peer_ip", peer_ip) + _setter("route_server_id", route_server_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="peerAsn") @@ -94,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[str] peer_ip: The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created. :param pulumi.Input[str] route_server_id: The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created. """ + _RouteServerBgpConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + peer_asn=peer_asn, + peer_ip=peer_ip, + route_server_id=route_server_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + peer_asn: Optional[pulumi.Input[int]] = None, + peer_ip: Optional[pulumi.Input[str]] = None, + route_server_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if peer_asn is None and 'peerAsn' in kwargs: + peer_asn = kwargs['peerAsn'] + if peer_ip is None and 'peerIp' in kwargs: + peer_ip = kwargs['peerIp'] + if route_server_id is None and 'routeServerId' in kwargs: + route_server_id = kwargs['routeServerId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if peer_asn is not None: - pulumi.set(__self__, "peer_asn", peer_asn) + _setter("peer_asn", peer_asn) if peer_ip is not None: - pulumi.set(__self__, "peer_ip", peer_ip) + _setter("peer_ip", peer_ip) if route_server_id is not None: - pulumi.set(__self__, "route_server_id", route_server_id) + _setter("route_server_id", route_server_id) @property @pulumi.getter @@ -279,6 +331,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RouteServerBgpConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/route_table.py b/sdk/python/pulumi_azure/network/route_table.py index 5f606543d8..23dee57ae2 100644 --- a/sdk/python/pulumi_azure/network/route_table.py +++ b/sdk/python/pulumi_azure/network/route_table.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,44 @@ def __init__(__self__, *, > **NOTE** Since `route` can be configured both inline and via the separate `network.Route` resource, we have to explicitly set it to empty slice (`[]`) to remove it. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + RouteTableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + disable_bgp_route_propagation=disable_bgp_route_propagation, + location=location, + name=name, + routes=routes, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + disable_bgp_route_propagation: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + routes: Optional[pulumi.Input[Sequence[pulumi.Input['RouteTableRouteArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if disable_bgp_route_propagation is None and 'disableBgpRoutePropagation' in kwargs: + disable_bgp_route_propagation = kwargs['disableBgpRoutePropagation'] + + _setter("resource_group_name", resource_group_name) if disable_bgp_route_propagation is not None: - pulumi.set(__self__, "disable_bgp_route_propagation", disable_bgp_route_propagation) + _setter("disable_bgp_route_propagation", disable_bgp_route_propagation) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if routes is not None: - pulumi.set(__self__, "routes", routes) + _setter("routes", routes) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -142,20 +169,47 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] subnets: The collection of Subnets associated with this route table. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _RouteTableState._configure( + lambda key, value: pulumi.set(__self__, key, value), + disable_bgp_route_propagation=disable_bgp_route_propagation, + location=location, + name=name, + resource_group_name=resource_group_name, + routes=routes, + subnets=subnets, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disable_bgp_route_propagation: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + routes: Optional[pulumi.Input[Sequence[pulumi.Input['RouteTableRouteArgs']]]] = None, + subnets: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disable_bgp_route_propagation is None and 'disableBgpRoutePropagation' in kwargs: + disable_bgp_route_propagation = kwargs['disableBgpRoutePropagation'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if disable_bgp_route_propagation is not None: - pulumi.set(__self__, "disable_bgp_route_propagation", disable_bgp_route_propagation) + _setter("disable_bgp_route_propagation", disable_bgp_route_propagation) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if routes is not None: - pulumi.set(__self__, "routes", routes) + _setter("routes", routes) if subnets is not None: - pulumi.set(__self__, "subnets", subnets) + _setter("subnets", subnets) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="disableBgpRoutePropagation") @@ -353,6 +407,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RouteTableArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/routing_intent.py b/sdk/python/pulumi_azure/network/routing_intent.py index 1d9f4f74e8..c6a93e1b1c 100644 --- a/sdk/python/pulumi_azure/network/routing_intent.py +++ b/sdk/python/pulumi_azure/network/routing_intent.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -25,10 +25,33 @@ def __init__(__self__, *, :param pulumi.Input[str] virtual_hub_id: The resource ID of the Virtual Hub. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "routing_policies", routing_policies) - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + RoutingIntentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + routing_policies=routing_policies, + virtual_hub_id=virtual_hub_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + routing_policies: Optional[pulumi.Input[Sequence[pulumi.Input['RoutingIntentRoutingPolicyArgs']]]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if routing_policies is None and 'routingPolicies' in kwargs: + routing_policies = kwargs['routingPolicies'] + if routing_policies is None: + raise TypeError("Missing 'routing_policies' argument") + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + + _setter("routing_policies", routing_policies) + _setter("virtual_hub_id", virtual_hub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="routingPolicies") @@ -79,12 +102,31 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['RoutingIntentRoutingPolicyArgs']]] routing_policies: One or more `routing_policy` blocks as defined below. :param pulumi.Input[str] virtual_hub_id: The resource ID of the Virtual Hub. Changing this forces a new resource to be created. """ + _RoutingIntentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + routing_policies=routing_policies, + virtual_hub_id=virtual_hub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + routing_policies: Optional[pulumi.Input[Sequence[pulumi.Input['RoutingIntentRoutingPolicyArgs']]]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if routing_policies is None and 'routingPolicies' in kwargs: + routing_policies = kwargs['routingPolicies'] + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if routing_policies is not None: - pulumi.set(__self__, "routing_policies", routing_policies) + _setter("routing_policies", routing_policies) if virtual_hub_id is not None: - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + _setter("virtual_hub_id", virtual_hub_id) @property @pulumi.getter @@ -242,6 +284,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RoutingIntentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/security_partner_provider.py b/sdk/python/pulumi_azure/network/security_partner_provider.py index b657593c49..b9b8c5b84a 100644 --- a/sdk/python/pulumi_azure/network/security_partner_provider.py +++ b/sdk/python/pulumi_azure/network/security_partner_provider.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SecurityPartnerProviderArgs', 'SecurityPartnerProvider'] @@ -29,16 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Security Partner Provider. :param pulumi.Input[str] virtual_hub_id: The ID of the Virtual Hub within which this Security Partner Provider should be created. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "security_provider_name", security_provider_name) + SecurityPartnerProviderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + security_provider_name=security_provider_name, + location=location, + name=name, + tags=tags, + virtual_hub_id=virtual_hub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + security_provider_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if security_provider_name is None and 'securityProviderName' in kwargs: + security_provider_name = kwargs['securityProviderName'] + if security_provider_name is None: + raise TypeError("Missing 'security_provider_name' argument") + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + + _setter("resource_group_name", resource_group_name) + _setter("security_provider_name", security_provider_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_hub_id is not None: - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + _setter("virtual_hub_id", virtual_hub_id) @property @pulumi.getter(name="resourceGroupName") @@ -131,18 +162,45 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Security Partner Provider. :param pulumi.Input[str] virtual_hub_id: The ID of the Virtual Hub within which this Security Partner Provider should be created. Changing this forces a new resource to be created. """ + _SecurityPartnerProviderState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + security_provider_name=security_provider_name, + tags=tags, + virtual_hub_id=virtual_hub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + security_provider_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if security_provider_name is None and 'securityProviderName' in kwargs: + security_provider_name = kwargs['securityProviderName'] + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if security_provider_name is not None: - pulumi.set(__self__, "security_provider_name", security_provider_name) + _setter("security_provider_name", security_provider_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_hub_id is not None: - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + _setter("virtual_hub_id", virtual_hub_id) @property @pulumi.getter @@ -336,6 +394,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SecurityPartnerProviderArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/subnet.py b/sdk/python/pulumi_azure/network/subnet.py index a3c7d2cce4..8223f7da43 100644 --- a/sdk/python/pulumi_azure/network/subnet.py +++ b/sdk/python/pulumi_azure/network/subnet.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,31 +47,86 @@ def __init__(__self__, *, > **NOTE:** In order to use `Microsoft.Storage.Global` service endpoint (which allows access to virtual networks in other regions), you must enable the `AllowGlobalTagsForStorage` feature in your subscription. This is currently a preview feature, please see the [official documentation](https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-cli#enabling-access-to-virtual-networks-in-other-regions-preview) for more information. """ - pulumi.set(__self__, "address_prefixes", address_prefixes) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "virtual_network_name", virtual_network_name) + SubnetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefixes=address_prefixes, + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + delegations=delegations, + enforce_private_link_endpoint_network_policies=enforce_private_link_endpoint_network_policies, + enforce_private_link_service_network_policies=enforce_private_link_service_network_policies, + name=name, + private_endpoint_network_policies_enabled=private_endpoint_network_policies_enabled, + private_link_service_network_policies_enabled=private_link_service_network_policies_enabled, + service_endpoint_policy_ids=service_endpoint_policy_ids, + service_endpoints=service_endpoints, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + virtual_network_name: Optional[pulumi.Input[str]] = None, + delegations: Optional[pulumi.Input[Sequence[pulumi.Input['SubnetDelegationArgs']]]] = None, + enforce_private_link_endpoint_network_policies: Optional[pulumi.Input[bool]] = None, + enforce_private_link_service_network_policies: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + private_endpoint_network_policies_enabled: Optional[pulumi.Input[bool]] = None, + private_link_service_network_policies_enabled: Optional[pulumi.Input[bool]] = None, + service_endpoint_policy_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + service_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefixes is None and 'addressPrefixes' in kwargs: + address_prefixes = kwargs['addressPrefixes'] + if address_prefixes is None: + raise TypeError("Missing 'address_prefixes' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if virtual_network_name is None and 'virtualNetworkName' in kwargs: + virtual_network_name = kwargs['virtualNetworkName'] + if virtual_network_name is None: + raise TypeError("Missing 'virtual_network_name' argument") + if enforce_private_link_endpoint_network_policies is None and 'enforcePrivateLinkEndpointNetworkPolicies' in kwargs: + enforce_private_link_endpoint_network_policies = kwargs['enforcePrivateLinkEndpointNetworkPolicies'] + if enforce_private_link_service_network_policies is None and 'enforcePrivateLinkServiceNetworkPolicies' in kwargs: + enforce_private_link_service_network_policies = kwargs['enforcePrivateLinkServiceNetworkPolicies'] + if private_endpoint_network_policies_enabled is None and 'privateEndpointNetworkPoliciesEnabled' in kwargs: + private_endpoint_network_policies_enabled = kwargs['privateEndpointNetworkPoliciesEnabled'] + if private_link_service_network_policies_enabled is None and 'privateLinkServiceNetworkPoliciesEnabled' in kwargs: + private_link_service_network_policies_enabled = kwargs['privateLinkServiceNetworkPoliciesEnabled'] + if service_endpoint_policy_ids is None and 'serviceEndpointPolicyIds' in kwargs: + service_endpoint_policy_ids = kwargs['serviceEndpointPolicyIds'] + if service_endpoints is None and 'serviceEndpoints' in kwargs: + service_endpoints = kwargs['serviceEndpoints'] + + _setter("address_prefixes", address_prefixes) + _setter("resource_group_name", resource_group_name) + _setter("virtual_network_name", virtual_network_name) if delegations is not None: - pulumi.set(__self__, "delegations", delegations) + _setter("delegations", delegations) if enforce_private_link_endpoint_network_policies is not None: warnings.warn("""`enforce_private_link_endpoint_network_policies` will be removed in favour of the property `private_endpoint_network_policies_enabled` in version 4.0 of the AzureRM Provider""", DeprecationWarning) pulumi.log.warn("""enforce_private_link_endpoint_network_policies is deprecated: `enforce_private_link_endpoint_network_policies` will be removed in favour of the property `private_endpoint_network_policies_enabled` in version 4.0 of the AzureRM Provider""") if enforce_private_link_endpoint_network_policies is not None: - pulumi.set(__self__, "enforce_private_link_endpoint_network_policies", enforce_private_link_endpoint_network_policies) + _setter("enforce_private_link_endpoint_network_policies", enforce_private_link_endpoint_network_policies) if enforce_private_link_service_network_policies is not None: warnings.warn("""`enforce_private_link_service_network_policies` will be removed in favour of the property `private_link_service_network_policies_enabled` in version 4.0 of the AzureRM Provider""", DeprecationWarning) pulumi.log.warn("""enforce_private_link_service_network_policies is deprecated: `enforce_private_link_service_network_policies` will be removed in favour of the property `private_link_service_network_policies_enabled` in version 4.0 of the AzureRM Provider""") if enforce_private_link_service_network_policies is not None: - pulumi.set(__self__, "enforce_private_link_service_network_policies", enforce_private_link_service_network_policies) + _setter("enforce_private_link_service_network_policies", enforce_private_link_service_network_policies) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_endpoint_network_policies_enabled is not None: - pulumi.set(__self__, "private_endpoint_network_policies_enabled", private_endpoint_network_policies_enabled) + _setter("private_endpoint_network_policies_enabled", private_endpoint_network_policies_enabled) if private_link_service_network_policies_enabled is not None: - pulumi.set(__self__, "private_link_service_network_policies_enabled", private_link_service_network_policies_enabled) + _setter("private_link_service_network_policies_enabled", private_link_service_network_policies_enabled) if service_endpoint_policy_ids is not None: - pulumi.set(__self__, "service_endpoint_policy_ids", service_endpoint_policy_ids) + _setter("service_endpoint_policy_ids", service_endpoint_policy_ids) if service_endpoints is not None: - pulumi.set(__self__, "service_endpoints", service_endpoints) + _setter("service_endpoints", service_endpoints) @property @pulumi.getter(name="addressPrefixes") @@ -248,34 +303,83 @@ def __init__(__self__, *, > **NOTE:** In order to use `Microsoft.Storage.Global` service endpoint (which allows access to virtual networks in other regions), you must enable the `AllowGlobalTagsForStorage` feature in your subscription. This is currently a preview feature, please see the [official documentation](https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-cli#enabling-access-to-virtual-networks-in-other-regions-preview) for more information. :param pulumi.Input[str] virtual_network_name: The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created. """ + _SubnetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefixes=address_prefixes, + delegations=delegations, + enforce_private_link_endpoint_network_policies=enforce_private_link_endpoint_network_policies, + enforce_private_link_service_network_policies=enforce_private_link_service_network_policies, + name=name, + private_endpoint_network_policies_enabled=private_endpoint_network_policies_enabled, + private_link_service_network_policies_enabled=private_link_service_network_policies_enabled, + resource_group_name=resource_group_name, + service_endpoint_policy_ids=service_endpoint_policy_ids, + service_endpoints=service_endpoints, + virtual_network_name=virtual_network_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + delegations: Optional[pulumi.Input[Sequence[pulumi.Input['SubnetDelegationArgs']]]] = None, + enforce_private_link_endpoint_network_policies: Optional[pulumi.Input[bool]] = None, + enforce_private_link_service_network_policies: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + private_endpoint_network_policies_enabled: Optional[pulumi.Input[bool]] = None, + private_link_service_network_policies_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_endpoint_policy_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + service_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + virtual_network_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefixes is None and 'addressPrefixes' in kwargs: + address_prefixes = kwargs['addressPrefixes'] + if enforce_private_link_endpoint_network_policies is None and 'enforcePrivateLinkEndpointNetworkPolicies' in kwargs: + enforce_private_link_endpoint_network_policies = kwargs['enforcePrivateLinkEndpointNetworkPolicies'] + if enforce_private_link_service_network_policies is None and 'enforcePrivateLinkServiceNetworkPolicies' in kwargs: + enforce_private_link_service_network_policies = kwargs['enforcePrivateLinkServiceNetworkPolicies'] + if private_endpoint_network_policies_enabled is None and 'privateEndpointNetworkPoliciesEnabled' in kwargs: + private_endpoint_network_policies_enabled = kwargs['privateEndpointNetworkPoliciesEnabled'] + if private_link_service_network_policies_enabled is None and 'privateLinkServiceNetworkPoliciesEnabled' in kwargs: + private_link_service_network_policies_enabled = kwargs['privateLinkServiceNetworkPoliciesEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_endpoint_policy_ids is None and 'serviceEndpointPolicyIds' in kwargs: + service_endpoint_policy_ids = kwargs['serviceEndpointPolicyIds'] + if service_endpoints is None and 'serviceEndpoints' in kwargs: + service_endpoints = kwargs['serviceEndpoints'] + if virtual_network_name is None and 'virtualNetworkName' in kwargs: + virtual_network_name = kwargs['virtualNetworkName'] + if address_prefixes is not None: - pulumi.set(__self__, "address_prefixes", address_prefixes) + _setter("address_prefixes", address_prefixes) if delegations is not None: - pulumi.set(__self__, "delegations", delegations) + _setter("delegations", delegations) if enforce_private_link_endpoint_network_policies is not None: warnings.warn("""`enforce_private_link_endpoint_network_policies` will be removed in favour of the property `private_endpoint_network_policies_enabled` in version 4.0 of the AzureRM Provider""", DeprecationWarning) pulumi.log.warn("""enforce_private_link_endpoint_network_policies is deprecated: `enforce_private_link_endpoint_network_policies` will be removed in favour of the property `private_endpoint_network_policies_enabled` in version 4.0 of the AzureRM Provider""") if enforce_private_link_endpoint_network_policies is not None: - pulumi.set(__self__, "enforce_private_link_endpoint_network_policies", enforce_private_link_endpoint_network_policies) + _setter("enforce_private_link_endpoint_network_policies", enforce_private_link_endpoint_network_policies) if enforce_private_link_service_network_policies is not None: warnings.warn("""`enforce_private_link_service_network_policies` will be removed in favour of the property `private_link_service_network_policies_enabled` in version 4.0 of the AzureRM Provider""", DeprecationWarning) pulumi.log.warn("""enforce_private_link_service_network_policies is deprecated: `enforce_private_link_service_network_policies` will be removed in favour of the property `private_link_service_network_policies_enabled` in version 4.0 of the AzureRM Provider""") if enforce_private_link_service_network_policies is not None: - pulumi.set(__self__, "enforce_private_link_service_network_policies", enforce_private_link_service_network_policies) + _setter("enforce_private_link_service_network_policies", enforce_private_link_service_network_policies) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_endpoint_network_policies_enabled is not None: - pulumi.set(__self__, "private_endpoint_network_policies_enabled", private_endpoint_network_policies_enabled) + _setter("private_endpoint_network_policies_enabled", private_endpoint_network_policies_enabled) if private_link_service_network_policies_enabled is not None: - pulumi.set(__self__, "private_link_service_network_policies_enabled", private_link_service_network_policies_enabled) + _setter("private_link_service_network_policies_enabled", private_link_service_network_policies_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_endpoint_policy_ids is not None: - pulumi.set(__self__, "service_endpoint_policy_ids", service_endpoint_policy_ids) + _setter("service_endpoint_policy_ids", service_endpoint_policy_ids) if service_endpoints is not None: - pulumi.set(__self__, "service_endpoints", service_endpoints) + _setter("service_endpoints", service_endpoints) if virtual_network_name is not None: - pulumi.set(__self__, "virtual_network_name", virtual_network_name) + _setter("virtual_network_name", virtual_network_name) @property @pulumi.getter(name="addressPrefixes") @@ -555,6 +659,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubnetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/subnet_nat_gateway_association.py b/sdk/python/pulumi_azure/network/subnet_nat_gateway_association.py index 5f31417e3f..2e940ba95e 100644 --- a/sdk/python/pulumi_azure/network/subnet_nat_gateway_association.py +++ b/sdk/python/pulumi_azure/network/subnet_nat_gateway_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SubnetNatGatewayAssociationArgs', 'SubnetNatGatewayAssociation'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] nat_gateway_id: The ID of the NAT Gateway which should be associated with the Subnet. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ID of the Subnet. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "nat_gateway_id", nat_gateway_id) - pulumi.set(__self__, "subnet_id", subnet_id) + SubnetNatGatewayAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + nat_gateway_id=nat_gateway_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + nat_gateway_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if nat_gateway_id is None and 'natGatewayId' in kwargs: + nat_gateway_id = kwargs['natGatewayId'] + if nat_gateway_id is None: + raise TypeError("Missing 'nat_gateway_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("nat_gateway_id", nat_gateway_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="natGatewayId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] nat_gateway_id: The ID of the NAT Gateway which should be associated with the Subnet. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ID of the Subnet. Changing this forces a new resource to be created. """ + _SubnetNatGatewayAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + nat_gateway_id=nat_gateway_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + nat_gateway_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if nat_gateway_id is None and 'natGatewayId' in kwargs: + nat_gateway_id = kwargs['natGatewayId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if nat_gateway_id is not None: - pulumi.set(__self__, "nat_gateway_id", nat_gateway_id) + _setter("nat_gateway_id", nat_gateway_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="natGatewayId") @@ -186,6 +224,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubnetNatGatewayAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/subnet_network_security_group_association.py b/sdk/python/pulumi_azure/network/subnet_network_security_group_association.py index 6190e0286b..0ba5c42681 100644 --- a/sdk/python/pulumi_azure/network/subnet_network_security_group_association.py +++ b/sdk/python/pulumi_azure/network/subnet_network_security_group_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SubnetNetworkSecurityGroupAssociationArgs', 'SubnetNetworkSecurityGroupAssociation'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] network_security_group_id: The ID of the Network Security Group which should be associated with the Subnet. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ID of the Subnet. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "network_security_group_id", network_security_group_id) - pulumi.set(__self__, "subnet_id", subnet_id) + SubnetNetworkSecurityGroupAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_security_group_id=network_security_group_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_security_group_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + if network_security_group_id is None: + raise TypeError("Missing 'network_security_group_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("network_security_group_id", network_security_group_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="networkSecurityGroupId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] network_security_group_id: The ID of the Network Security Group which should be associated with the Subnet. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ID of the Subnet. Changing this forces a new resource to be created. """ + _SubnetNetworkSecurityGroupAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_security_group_id=network_security_group_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_security_group_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_security_group_id is None and 'networkSecurityGroupId' in kwargs: + network_security_group_id = kwargs['networkSecurityGroupId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if network_security_group_id is not None: - pulumi.set(__self__, "network_security_group_id", network_security_group_id) + _setter("network_security_group_id", network_security_group_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="networkSecurityGroupId") @@ -208,6 +246,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubnetNetworkSecurityGroupAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/subnet_route_table_association.py b/sdk/python/pulumi_azure/network/subnet_route_table_association.py index 8504181cbb..8056e6747d 100644 --- a/sdk/python/pulumi_azure/network/subnet_route_table_association.py +++ b/sdk/python/pulumi_azure/network/subnet_route_table_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SubnetRouteTableAssociationArgs', 'SubnetRouteTableAssociation'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] route_table_id: The ID of the Route Table which should be associated with the Subnet. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ID of the Subnet. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "route_table_id", route_table_id) - pulumi.set(__self__, "subnet_id", subnet_id) + SubnetRouteTableAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + route_table_id=route_table_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + route_table_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if route_table_id is None and 'routeTableId' in kwargs: + route_table_id = kwargs['routeTableId'] + if route_table_id is None: + raise TypeError("Missing 'route_table_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("route_table_id", route_table_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="routeTableId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] route_table_id: The ID of the Route Table which should be associated with the Subnet. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ID of the Subnet. Changing this forces a new resource to be created. """ + _SubnetRouteTableAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + route_table_id=route_table_id, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + route_table_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if route_table_id is None and 'routeTableId' in kwargs: + route_table_id = kwargs['routeTableId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if route_table_id is not None: - pulumi.set(__self__, "route_table_id", route_table_id) + _setter("route_table_id", route_table_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="routeTableId") @@ -198,6 +236,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubnetRouteTableAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/subnet_service_endpoint_storage_policy.py b/sdk/python/pulumi_azure/network/subnet_service_endpoint_storage_policy.py index ef861854f0..7a5f092f23 100644 --- a/sdk/python/pulumi_azure/network/subnet_service_endpoint_storage_policy.py +++ b/sdk/python/pulumi_azure/network/subnet_service_endpoint_storage_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,15 +29,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + SubnetServiceEndpointStoragePolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + definition=definition, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + definition: Optional[pulumi.Input['SubnetServiceEndpointStoragePolicyDefinitionArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if definition is not None: - pulumi.set(__self__, "definition", definition) + _setter("definition", definition) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -116,16 +139,37 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy. """ + _SubnetServiceEndpointStoragePolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + definition=definition, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + definition: Optional[pulumi.Input['SubnetServiceEndpointStoragePolicyDefinitionArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if definition is not None: - pulumi.set(__self__, "definition", definition) + _setter("definition", definition) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -245,6 +289,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubnetServiceEndpointStoragePolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -264,6 +312,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = SubnetServiceEndpointStoragePolicyArgs.__new__(SubnetServiceEndpointStoragePolicyArgs) + if definition is not None and not isinstance(definition, SubnetServiceEndpointStoragePolicyDefinitionArgs): + definition = definition or {} + def _setter(key, value): + definition[key] = value + SubnetServiceEndpointStoragePolicyDefinitionArgs._configure(_setter, **definition) __props__.__dict__["definition"] = definition __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/network/traffic_manager_azure_endpoint.py b/sdk/python/pulumi_azure/network/traffic_manager_azure_endpoint.py index 079ebdda10..02d34e67ac 100644 --- a/sdk/python/pulumi_azure/network/traffic_manager_azure_endpoint.py +++ b/sdk/python/pulumi_azure/network/traffic_manager_azure_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,22 +37,61 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['TrafficManagerAzureEndpointSubnetArgs']]] subnets: One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. :param pulumi.Input[int] weight: Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. """ - pulumi.set(__self__, "profile_id", profile_id) - pulumi.set(__self__, "target_resource_id", target_resource_id) + TrafficManagerAzureEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + profile_id=profile_id, + target_resource_id=target_resource_id, + custom_headers=custom_headers, + enabled=enabled, + geo_mappings=geo_mappings, + name=name, + priority=priority, + subnets=subnets, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + profile_id: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + custom_headers: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerAzureEndpointCustomHeaderArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + geo_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + subnets: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerAzureEndpointSubnetArgs']]]] = None, + weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if profile_id is None and 'profileId' in kwargs: + profile_id = kwargs['profileId'] + if profile_id is None: + raise TypeError("Missing 'profile_id' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + if geo_mappings is None and 'geoMappings' in kwargs: + geo_mappings = kwargs['geoMappings'] + + _setter("profile_id", profile_id) + _setter("target_resource_id", target_resource_id) if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if geo_mappings is not None: - pulumi.set(__self__, "geo_mappings", geo_mappings) + _setter("geo_mappings", geo_mappings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if subnets is not None: - pulumi.set(__self__, "subnets", subnets) + _setter("subnets", subnets) if weight is not None: - pulumi.set(__self__, "weight", weight) + _setter("weight", weight) @property @pulumi.getter(name="profileId") @@ -187,24 +226,59 @@ def __init__(__self__, *, :param pulumi.Input[str] target_resource_id: The ID of the Azure Resource which should be used as a target. :param pulumi.Input[int] weight: Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. """ + _TrafficManagerAzureEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_headers=custom_headers, + enabled=enabled, + geo_mappings=geo_mappings, + name=name, + priority=priority, + profile_id=profile_id, + subnets=subnets, + target_resource_id=target_resource_id, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_headers: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerAzureEndpointCustomHeaderArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + geo_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + profile_id: Optional[pulumi.Input[str]] = None, + subnets: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerAzureEndpointSubnetArgs']]]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + if geo_mappings is None and 'geoMappings' in kwargs: + geo_mappings = kwargs['geoMappings'] + if profile_id is None and 'profileId' in kwargs: + profile_id = kwargs['profileId'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if geo_mappings is not None: - pulumi.set(__self__, "geo_mappings", geo_mappings) + _setter("geo_mappings", geo_mappings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if profile_id is not None: - pulumi.set(__self__, "profile_id", profile_id) + _setter("profile_id", profile_id) if subnets is not None: - pulumi.set(__self__, "subnets", subnets) + _setter("subnets", subnets) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) if weight is not None: - pulumi.set(__self__, "weight", weight) + _setter("weight", weight) @property @pulumi.getter(name="customHeaders") @@ -452,6 +526,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TrafficManagerAzureEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/traffic_manager_external_endpoint.py b/sdk/python/pulumi_azure/network/traffic_manager_external_endpoint.py index 7aa181308e..f92eeffaa3 100644 --- a/sdk/python/pulumi_azure/network/traffic_manager_external_endpoint.py +++ b/sdk/python/pulumi_azure/network/traffic_manager_external_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,24 +39,65 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointSubnetArgs']]] subnets: One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. :param pulumi.Input[int] weight: Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. """ - pulumi.set(__self__, "profile_id", profile_id) - pulumi.set(__self__, "target", target) + TrafficManagerExternalEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + profile_id=profile_id, + target=target, + custom_headers=custom_headers, + enabled=enabled, + endpoint_location=endpoint_location, + geo_mappings=geo_mappings, + name=name, + priority=priority, + subnets=subnets, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + profile_id: Optional[pulumi.Input[str]] = None, + target: Optional[pulumi.Input[str]] = None, + custom_headers: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointCustomHeaderArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + endpoint_location: Optional[pulumi.Input[str]] = None, + geo_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + subnets: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointSubnetArgs']]]] = None, + weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if profile_id is None and 'profileId' in kwargs: + profile_id = kwargs['profileId'] + if profile_id is None: + raise TypeError("Missing 'profile_id' argument") + if target is None: + raise TypeError("Missing 'target' argument") + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + if endpoint_location is None and 'endpointLocation' in kwargs: + endpoint_location = kwargs['endpointLocation'] + if geo_mappings is None and 'geoMappings' in kwargs: + geo_mappings = kwargs['geoMappings'] + + _setter("profile_id", profile_id) + _setter("target", target) if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if endpoint_location is not None: - pulumi.set(__self__, "endpoint_location", endpoint_location) + _setter("endpoint_location", endpoint_location) if geo_mappings is not None: - pulumi.set(__self__, "geo_mappings", geo_mappings) + _setter("geo_mappings", geo_mappings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if subnets is not None: - pulumi.set(__self__, "subnets", subnets) + _setter("subnets", subnets) if weight is not None: - pulumi.set(__self__, "weight", weight) + _setter("weight", weight) @property @pulumi.getter(name="profileId") @@ -205,26 +246,63 @@ def __init__(__self__, *, :param pulumi.Input[str] target: The FQDN DNS name of the target. :param pulumi.Input[int] weight: Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. """ + _TrafficManagerExternalEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_headers=custom_headers, + enabled=enabled, + endpoint_location=endpoint_location, + geo_mappings=geo_mappings, + name=name, + priority=priority, + profile_id=profile_id, + subnets=subnets, + target=target, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_headers: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointCustomHeaderArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + endpoint_location: Optional[pulumi.Input[str]] = None, + geo_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + profile_id: Optional[pulumi.Input[str]] = None, + subnets: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerExternalEndpointSubnetArgs']]]] = None, + target: Optional[pulumi.Input[str]] = None, + weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + if endpoint_location is None and 'endpointLocation' in kwargs: + endpoint_location = kwargs['endpointLocation'] + if geo_mappings is None and 'geoMappings' in kwargs: + geo_mappings = kwargs['geoMappings'] + if profile_id is None and 'profileId' in kwargs: + profile_id = kwargs['profileId'] + if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if endpoint_location is not None: - pulumi.set(__self__, "endpoint_location", endpoint_location) + _setter("endpoint_location", endpoint_location) if geo_mappings is not None: - pulumi.set(__self__, "geo_mappings", geo_mappings) + _setter("geo_mappings", geo_mappings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if profile_id is not None: - pulumi.set(__self__, "profile_id", profile_id) + _setter("profile_id", profile_id) if subnets is not None: - pulumi.set(__self__, "subnets", subnets) + _setter("subnets", subnets) if target is not None: - pulumi.set(__self__, "target", target) + _setter("target", target) if weight is not None: - pulumi.set(__self__, "weight", weight) + _setter("weight", weight) @property @pulumi.getter(name="customHeaders") @@ -476,6 +554,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TrafficManagerExternalEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/traffic_manager_nested_endpoint.py b/sdk/python/pulumi_azure/network/traffic_manager_nested_endpoint.py index 7525f05c63..e8c6d6804d 100644 --- a/sdk/python/pulumi_azure/network/traffic_manager_nested_endpoint.py +++ b/sdk/python/pulumi_azure/network/traffic_manager_nested_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,29 +47,86 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['TrafficManagerNestedEndpointSubnetArgs']]] subnets: One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. :param pulumi.Input[int] weight: Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. """ - pulumi.set(__self__, "minimum_child_endpoints", minimum_child_endpoints) - pulumi.set(__self__, "profile_id", profile_id) - pulumi.set(__self__, "target_resource_id", target_resource_id) + TrafficManagerNestedEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + minimum_child_endpoints=minimum_child_endpoints, + profile_id=profile_id, + target_resource_id=target_resource_id, + custom_headers=custom_headers, + enabled=enabled, + endpoint_location=endpoint_location, + geo_mappings=geo_mappings, + minimum_required_child_endpoints_ipv4=minimum_required_child_endpoints_ipv4, + minimum_required_child_endpoints_ipv6=minimum_required_child_endpoints_ipv6, + name=name, + priority=priority, + subnets=subnets, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + minimum_child_endpoints: Optional[pulumi.Input[int]] = None, + profile_id: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + custom_headers: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerNestedEndpointCustomHeaderArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + endpoint_location: Optional[pulumi.Input[str]] = None, + geo_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + minimum_required_child_endpoints_ipv4: Optional[pulumi.Input[int]] = None, + minimum_required_child_endpoints_ipv6: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + subnets: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerNestedEndpointSubnetArgs']]]] = None, + weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if minimum_child_endpoints is None and 'minimumChildEndpoints' in kwargs: + minimum_child_endpoints = kwargs['minimumChildEndpoints'] + if minimum_child_endpoints is None: + raise TypeError("Missing 'minimum_child_endpoints' argument") + if profile_id is None and 'profileId' in kwargs: + profile_id = kwargs['profileId'] + if profile_id is None: + raise TypeError("Missing 'profile_id' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + if endpoint_location is None and 'endpointLocation' in kwargs: + endpoint_location = kwargs['endpointLocation'] + if geo_mappings is None and 'geoMappings' in kwargs: + geo_mappings = kwargs['geoMappings'] + if minimum_required_child_endpoints_ipv4 is None and 'minimumRequiredChildEndpointsIpv4' in kwargs: + minimum_required_child_endpoints_ipv4 = kwargs['minimumRequiredChildEndpointsIpv4'] + if minimum_required_child_endpoints_ipv6 is None and 'minimumRequiredChildEndpointsIpv6' in kwargs: + minimum_required_child_endpoints_ipv6 = kwargs['minimumRequiredChildEndpointsIpv6'] + + _setter("minimum_child_endpoints", minimum_child_endpoints) + _setter("profile_id", profile_id) + _setter("target_resource_id", target_resource_id) if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if endpoint_location is not None: - pulumi.set(__self__, "endpoint_location", endpoint_location) + _setter("endpoint_location", endpoint_location) if geo_mappings is not None: - pulumi.set(__self__, "geo_mappings", geo_mappings) + _setter("geo_mappings", geo_mappings) if minimum_required_child_endpoints_ipv4 is not None: - pulumi.set(__self__, "minimum_required_child_endpoints_ipv4", minimum_required_child_endpoints_ipv4) + _setter("minimum_required_child_endpoints_ipv4", minimum_required_child_endpoints_ipv4) if minimum_required_child_endpoints_ipv6 is not None: - pulumi.set(__self__, "minimum_required_child_endpoints_ipv6", minimum_required_child_endpoints_ipv6) + _setter("minimum_required_child_endpoints_ipv6", minimum_required_child_endpoints_ipv6) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if subnets is not None: - pulumi.set(__self__, "subnets", subnets) + _setter("subnets", subnets) if weight is not None: - pulumi.set(__self__, "weight", weight) + _setter("weight", weight) @property @pulumi.getter(name="minimumChildEndpoints") @@ -264,32 +321,83 @@ def __init__(__self__, *, :param pulumi.Input[str] target_resource_id: The resource id of an Azure resource to target. :param pulumi.Input[int] weight: Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. """ + _TrafficManagerNestedEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_headers=custom_headers, + enabled=enabled, + endpoint_location=endpoint_location, + geo_mappings=geo_mappings, + minimum_child_endpoints=minimum_child_endpoints, + minimum_required_child_endpoints_ipv4=minimum_required_child_endpoints_ipv4, + minimum_required_child_endpoints_ipv6=minimum_required_child_endpoints_ipv6, + name=name, + priority=priority, + profile_id=profile_id, + subnets=subnets, + target_resource_id=target_resource_id, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_headers: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerNestedEndpointCustomHeaderArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + endpoint_location: Optional[pulumi.Input[str]] = None, + geo_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + minimum_child_endpoints: Optional[pulumi.Input[int]] = None, + minimum_required_child_endpoints_ipv4: Optional[pulumi.Input[int]] = None, + minimum_required_child_endpoints_ipv6: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + profile_id: Optional[pulumi.Input[str]] = None, + subnets: Optional[pulumi.Input[Sequence[pulumi.Input['TrafficManagerNestedEndpointSubnetArgs']]]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + if endpoint_location is None and 'endpointLocation' in kwargs: + endpoint_location = kwargs['endpointLocation'] + if geo_mappings is None and 'geoMappings' in kwargs: + geo_mappings = kwargs['geoMappings'] + if minimum_child_endpoints is None and 'minimumChildEndpoints' in kwargs: + minimum_child_endpoints = kwargs['minimumChildEndpoints'] + if minimum_required_child_endpoints_ipv4 is None and 'minimumRequiredChildEndpointsIpv4' in kwargs: + minimum_required_child_endpoints_ipv4 = kwargs['minimumRequiredChildEndpointsIpv4'] + if minimum_required_child_endpoints_ipv6 is None and 'minimumRequiredChildEndpointsIpv6' in kwargs: + minimum_required_child_endpoints_ipv6 = kwargs['minimumRequiredChildEndpointsIpv6'] + if profile_id is None and 'profileId' in kwargs: + profile_id = kwargs['profileId'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if endpoint_location is not None: - pulumi.set(__self__, "endpoint_location", endpoint_location) + _setter("endpoint_location", endpoint_location) if geo_mappings is not None: - pulumi.set(__self__, "geo_mappings", geo_mappings) + _setter("geo_mappings", geo_mappings) if minimum_child_endpoints is not None: - pulumi.set(__self__, "minimum_child_endpoints", minimum_child_endpoints) + _setter("minimum_child_endpoints", minimum_child_endpoints) if minimum_required_child_endpoints_ipv4 is not None: - pulumi.set(__self__, "minimum_required_child_endpoints_ipv4", minimum_required_child_endpoints_ipv4) + _setter("minimum_required_child_endpoints_ipv4", minimum_required_child_endpoints_ipv4) if minimum_required_child_endpoints_ipv6 is not None: - pulumi.set(__self__, "minimum_required_child_endpoints_ipv6", minimum_required_child_endpoints_ipv6) + _setter("minimum_required_child_endpoints_ipv6", minimum_required_child_endpoints_ipv6) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if profile_id is not None: - pulumi.set(__self__, "profile_id", profile_id) + _setter("profile_id", profile_id) if subnets is not None: - pulumi.set(__self__, "subnets", subnets) + _setter("subnets", subnets) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) if weight is not None: - pulumi.set(__self__, "weight", weight) + _setter("weight", weight) @property @pulumi.getter(name="customHeaders") @@ -625,6 +733,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TrafficManagerNestedEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/traffic_manager_profile.py b/sdk/python/pulumi_azure/network/traffic_manager_profile.py index 3a479424e4..ce123334a1 100644 --- a/sdk/python/pulumi_azure/network/traffic_manager_profile.py +++ b/sdk/python/pulumi_azure/network/traffic_manager_profile.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,20 +39,69 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] traffic_view_enabled: Indicates whether Traffic View is enabled for the Traffic Manager profile. """ - pulumi.set(__self__, "dns_config", dns_config) - pulumi.set(__self__, "monitor_config", monitor_config) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "traffic_routing_method", traffic_routing_method) + TrafficManagerProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_config=dns_config, + monitor_config=monitor_config, + resource_group_name=resource_group_name, + traffic_routing_method=traffic_routing_method, + max_return=max_return, + name=name, + profile_status=profile_status, + tags=tags, + traffic_view_enabled=traffic_view_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_config: Optional[pulumi.Input['TrafficManagerProfileDnsConfigArgs']] = None, + monitor_config: Optional[pulumi.Input['TrafficManagerProfileMonitorConfigArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + traffic_routing_method: Optional[pulumi.Input[str]] = None, + max_return: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + profile_status: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + traffic_view_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_config is None and 'dnsConfig' in kwargs: + dns_config = kwargs['dnsConfig'] + if dns_config is None: + raise TypeError("Missing 'dns_config' argument") + if monitor_config is None and 'monitorConfig' in kwargs: + monitor_config = kwargs['monitorConfig'] + if monitor_config is None: + raise TypeError("Missing 'monitor_config' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if traffic_routing_method is None and 'trafficRoutingMethod' in kwargs: + traffic_routing_method = kwargs['trafficRoutingMethod'] + if traffic_routing_method is None: + raise TypeError("Missing 'traffic_routing_method' argument") + if max_return is None and 'maxReturn' in kwargs: + max_return = kwargs['maxReturn'] + if profile_status is None and 'profileStatus' in kwargs: + profile_status = kwargs['profileStatus'] + if traffic_view_enabled is None and 'trafficViewEnabled' in kwargs: + traffic_view_enabled = kwargs['trafficViewEnabled'] + + _setter("dns_config", dns_config) + _setter("monitor_config", monitor_config) + _setter("resource_group_name", resource_group_name) + _setter("traffic_routing_method", traffic_routing_method) if max_return is not None: - pulumi.set(__self__, "max_return", max_return) + _setter("max_return", max_return) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if profile_status is not None: - pulumi.set(__self__, "profile_status", profile_status) + _setter("profile_status", profile_status) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if traffic_view_enabled is not None: - pulumi.set(__self__, "traffic_view_enabled", traffic_view_enabled) + _setter("traffic_view_enabled", traffic_view_enabled) @property @pulumi.getter(name="dnsConfig") @@ -193,26 +242,69 @@ def __init__(__self__, *, :param pulumi.Input[str] traffic_routing_method: Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. :param pulumi.Input[bool] traffic_view_enabled: Indicates whether Traffic View is enabled for the Traffic Manager profile. """ + _TrafficManagerProfileState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_config=dns_config, + fqdn=fqdn, + max_return=max_return, + monitor_config=monitor_config, + name=name, + profile_status=profile_status, + resource_group_name=resource_group_name, + tags=tags, + traffic_routing_method=traffic_routing_method, + traffic_view_enabled=traffic_view_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_config: Optional[pulumi.Input['TrafficManagerProfileDnsConfigArgs']] = None, + fqdn: Optional[pulumi.Input[str]] = None, + max_return: Optional[pulumi.Input[int]] = None, + monitor_config: Optional[pulumi.Input['TrafficManagerProfileMonitorConfigArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + profile_status: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + traffic_routing_method: Optional[pulumi.Input[str]] = None, + traffic_view_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_config is None and 'dnsConfig' in kwargs: + dns_config = kwargs['dnsConfig'] + if max_return is None and 'maxReturn' in kwargs: + max_return = kwargs['maxReturn'] + if monitor_config is None and 'monitorConfig' in kwargs: + monitor_config = kwargs['monitorConfig'] + if profile_status is None and 'profileStatus' in kwargs: + profile_status = kwargs['profileStatus'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if traffic_routing_method is None and 'trafficRoutingMethod' in kwargs: + traffic_routing_method = kwargs['trafficRoutingMethod'] + if traffic_view_enabled is None and 'trafficViewEnabled' in kwargs: + traffic_view_enabled = kwargs['trafficViewEnabled'] + if dns_config is not None: - pulumi.set(__self__, "dns_config", dns_config) + _setter("dns_config", dns_config) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if max_return is not None: - pulumi.set(__self__, "max_return", max_return) + _setter("max_return", max_return) if monitor_config is not None: - pulumi.set(__self__, "monitor_config", monitor_config) + _setter("monitor_config", monitor_config) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if profile_status is not None: - pulumi.set(__self__, "profile_status", profile_status) + _setter("profile_status", profile_status) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if traffic_routing_method is not None: - pulumi.set(__self__, "traffic_routing_method", traffic_routing_method) + _setter("traffic_routing_method", traffic_routing_method) if traffic_view_enabled is not None: - pulumi.set(__self__, "traffic_view_enabled", traffic_view_enabled) + _setter("traffic_view_enabled", traffic_view_enabled) @property @pulumi.getter(name="dnsConfig") @@ -470,6 +562,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TrafficManagerProfileArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -493,10 +589,20 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = TrafficManagerProfileArgs.__new__(TrafficManagerProfileArgs) + if dns_config is not None and not isinstance(dns_config, TrafficManagerProfileDnsConfigArgs): + dns_config = dns_config or {} + def _setter(key, value): + dns_config[key] = value + TrafficManagerProfileDnsConfigArgs._configure(_setter, **dns_config) if dns_config is None and not opts.urn: raise TypeError("Missing required property 'dns_config'") __props__.__dict__["dns_config"] = dns_config __props__.__dict__["max_return"] = max_return + if monitor_config is not None and not isinstance(monitor_config, TrafficManagerProfileMonitorConfigArgs): + monitor_config = monitor_config or {} + def _setter(key, value): + monitor_config[key] = value + TrafficManagerProfileMonitorConfigArgs._configure(_setter, **monitor_config) if monitor_config is None and not opts.urn: raise TypeError("Missing required property 'monitor_config'") __props__.__dict__["monitor_config"] = monitor_config diff --git a/sdk/python/pulumi_azure/network/virtual_hub.py b/sdk/python/pulumi_azure/network/virtual_hub.py index 7c71219f30..a3ac6e453c 100644 --- a/sdk/python/pulumi_azure/network/virtual_hub.py +++ b/sdk/python/pulumi_azure/network/virtual_hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,25 +39,66 @@ def __init__(__self__, *, :param pulumi.Input[int] virtual_router_auto_scale_min_capacity: Minimum instance capacity for the scaling configuration of the Virtual Hub Router. :param pulumi.Input[str] virtual_wan_id: The ID of a Virtual WAN within which the Virtual Hub should be created. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + VirtualHubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + address_prefix=address_prefix, + hub_routing_preference=hub_routing_preference, + location=location, + name=name, + routes=routes, + sku=sku, + tags=tags, + virtual_router_auto_scale_min_capacity=virtual_router_auto_scale_min_capacity, + virtual_wan_id=virtual_wan_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + address_prefix: Optional[pulumi.Input[str]] = None, + hub_routing_preference: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + routes: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualHubRouteArgs']]]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_router_auto_scale_min_capacity: Optional[pulumi.Input[int]] = None, + virtual_wan_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if address_prefix is None and 'addressPrefix' in kwargs: + address_prefix = kwargs['addressPrefix'] + if hub_routing_preference is None and 'hubRoutingPreference' in kwargs: + hub_routing_preference = kwargs['hubRoutingPreference'] + if virtual_router_auto_scale_min_capacity is None and 'virtualRouterAutoScaleMinCapacity' in kwargs: + virtual_router_auto_scale_min_capacity = kwargs['virtualRouterAutoScaleMinCapacity'] + if virtual_wan_id is None and 'virtualWanId' in kwargs: + virtual_wan_id = kwargs['virtualWanId'] + + _setter("resource_group_name", resource_group_name) if address_prefix is not None: - pulumi.set(__self__, "address_prefix", address_prefix) + _setter("address_prefix", address_prefix) if hub_routing_preference is not None: - pulumi.set(__self__, "hub_routing_preference", hub_routing_preference) + _setter("hub_routing_preference", hub_routing_preference) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if routes is not None: - pulumi.set(__self__, "routes", routes) + _setter("routes", routes) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_router_auto_scale_min_capacity is not None: - pulumi.set(__self__, "virtual_router_auto_scale_min_capacity", virtual_router_auto_scale_min_capacity) + _setter("virtual_router_auto_scale_min_capacity", virtual_router_auto_scale_min_capacity) if virtual_wan_id is not None: - pulumi.set(__self__, "virtual_wan_id", virtual_wan_id) + _setter("virtual_wan_id", virtual_wan_id) @property @pulumi.getter(name="resourceGroupName") @@ -212,32 +253,83 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_router_ips: The IP addresses of the Virtual Hub BGP router. :param pulumi.Input[str] virtual_wan_id: The ID of a Virtual WAN within which the Virtual Hub should be created. Changing this forces a new resource to be created. """ + _VirtualHubState._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_prefix=address_prefix, + default_route_table_id=default_route_table_id, + hub_routing_preference=hub_routing_preference, + location=location, + name=name, + resource_group_name=resource_group_name, + routes=routes, + sku=sku, + tags=tags, + virtual_router_asn=virtual_router_asn, + virtual_router_auto_scale_min_capacity=virtual_router_auto_scale_min_capacity, + virtual_router_ips=virtual_router_ips, + virtual_wan_id=virtual_wan_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_prefix: Optional[pulumi.Input[str]] = None, + default_route_table_id: Optional[pulumi.Input[str]] = None, + hub_routing_preference: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + routes: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualHubRouteArgs']]]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_router_asn: Optional[pulumi.Input[int]] = None, + virtual_router_auto_scale_min_capacity: Optional[pulumi.Input[int]] = None, + virtual_router_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + virtual_wan_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_prefix is None and 'addressPrefix' in kwargs: + address_prefix = kwargs['addressPrefix'] + if default_route_table_id is None and 'defaultRouteTableId' in kwargs: + default_route_table_id = kwargs['defaultRouteTableId'] + if hub_routing_preference is None and 'hubRoutingPreference' in kwargs: + hub_routing_preference = kwargs['hubRoutingPreference'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if virtual_router_asn is None and 'virtualRouterAsn' in kwargs: + virtual_router_asn = kwargs['virtualRouterAsn'] + if virtual_router_auto_scale_min_capacity is None and 'virtualRouterAutoScaleMinCapacity' in kwargs: + virtual_router_auto_scale_min_capacity = kwargs['virtualRouterAutoScaleMinCapacity'] + if virtual_router_ips is None and 'virtualRouterIps' in kwargs: + virtual_router_ips = kwargs['virtualRouterIps'] + if virtual_wan_id is None and 'virtualWanId' in kwargs: + virtual_wan_id = kwargs['virtualWanId'] + if address_prefix is not None: - pulumi.set(__self__, "address_prefix", address_prefix) + _setter("address_prefix", address_prefix) if default_route_table_id is not None: - pulumi.set(__self__, "default_route_table_id", default_route_table_id) + _setter("default_route_table_id", default_route_table_id) if hub_routing_preference is not None: - pulumi.set(__self__, "hub_routing_preference", hub_routing_preference) + _setter("hub_routing_preference", hub_routing_preference) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if routes is not None: - pulumi.set(__self__, "routes", routes) + _setter("routes", routes) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_router_asn is not None: - pulumi.set(__self__, "virtual_router_asn", virtual_router_asn) + _setter("virtual_router_asn", virtual_router_asn) if virtual_router_auto_scale_min_capacity is not None: - pulumi.set(__self__, "virtual_router_auto_scale_min_capacity", virtual_router_auto_scale_min_capacity) + _setter("virtual_router_auto_scale_min_capacity", virtual_router_auto_scale_min_capacity) if virtual_router_ips is not None: - pulumi.set(__self__, "virtual_router_ips", virtual_router_ips) + _setter("virtual_router_ips", virtual_router_ips) if virtual_wan_id is not None: - pulumi.set(__self__, "virtual_wan_id", virtual_wan_id) + _setter("virtual_wan_id", virtual_wan_id) @property @pulumi.getter(name="addressPrefix") @@ -497,6 +589,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualHubArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/virtual_hub_connection.py b/sdk/python/pulumi_azure/network/virtual_hub_connection.py index 15acbbbd04..058bcab09a 100644 --- a/sdk/python/pulumi_azure/network/virtual_hub_connection.py +++ b/sdk/python/pulumi_azure/network/virtual_hub_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created. :param pulumi.Input['VirtualHubConnectionRoutingArgs'] routing: A `routing` block as defined below. """ - pulumi.set(__self__, "remote_virtual_network_id", remote_virtual_network_id) - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + VirtualHubConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + remote_virtual_network_id=remote_virtual_network_id, + virtual_hub_id=virtual_hub_id, + internet_security_enabled=internet_security_enabled, + name=name, + routing=routing, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + remote_virtual_network_id: Optional[pulumi.Input[str]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + internet_security_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + routing: Optional[pulumi.Input['VirtualHubConnectionRoutingArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if remote_virtual_network_id is None and 'remoteVirtualNetworkId' in kwargs: + remote_virtual_network_id = kwargs['remoteVirtualNetworkId'] + if remote_virtual_network_id is None: + raise TypeError("Missing 'remote_virtual_network_id' argument") + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + if internet_security_enabled is None and 'internetSecurityEnabled' in kwargs: + internet_security_enabled = kwargs['internetSecurityEnabled'] + + _setter("remote_virtual_network_id", remote_virtual_network_id) + _setter("virtual_hub_id", virtual_hub_id) if internet_security_enabled is not None: - pulumi.set(__self__, "internet_security_enabled", internet_security_enabled) + _setter("internet_security_enabled", internet_security_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if routing is not None: - pulumi.set(__self__, "routing", routing) + _setter("routing", routing) @property @pulumi.getter(name="remoteVirtualNetworkId") @@ -115,16 +144,41 @@ def __init__(__self__, *, :param pulumi.Input['VirtualHubConnectionRoutingArgs'] routing: A `routing` block as defined below. :param pulumi.Input[str] virtual_hub_id: The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created. """ + _VirtualHubConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + internet_security_enabled=internet_security_enabled, + name=name, + remote_virtual_network_id=remote_virtual_network_id, + routing=routing, + virtual_hub_id=virtual_hub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + internet_security_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + remote_virtual_network_id: Optional[pulumi.Input[str]] = None, + routing: Optional[pulumi.Input['VirtualHubConnectionRoutingArgs']] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if internet_security_enabled is None and 'internetSecurityEnabled' in kwargs: + internet_security_enabled = kwargs['internetSecurityEnabled'] + if remote_virtual_network_id is None and 'remoteVirtualNetworkId' in kwargs: + remote_virtual_network_id = kwargs['remoteVirtualNetworkId'] + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if internet_security_enabled is not None: - pulumi.set(__self__, "internet_security_enabled", internet_security_enabled) + _setter("internet_security_enabled", internet_security_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if remote_virtual_network_id is not None: - pulumi.set(__self__, "remote_virtual_network_id", remote_virtual_network_id) + _setter("remote_virtual_network_id", remote_virtual_network_id) if routing is not None: - pulumi.set(__self__, "routing", routing) + _setter("routing", routing) if virtual_hub_id is not None: - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + _setter("virtual_hub_id", virtual_hub_id) @property @pulumi.getter(name="internetSecurityEnabled") @@ -292,6 +346,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualHubConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -316,6 +374,11 @@ def _internal_init(__self__, if remote_virtual_network_id is None and not opts.urn: raise TypeError("Missing required property 'remote_virtual_network_id'") __props__.__dict__["remote_virtual_network_id"] = remote_virtual_network_id + if routing is not None and not isinstance(routing, VirtualHubConnectionRoutingArgs): + routing = routing or {} + def _setter(key, value): + routing[key] = value + VirtualHubConnectionRoutingArgs._configure(_setter, **routing) __props__.__dict__["routing"] = routing if virtual_hub_id is None and not opts.urn: raise TypeError("Missing required property 'virtual_hub_id'") diff --git a/sdk/python/pulumi_azure/network/virtual_hub_ip.py b/sdk/python/pulumi_azure/network/virtual_hub_ip.py index 091bce2c3b..d7375bd610 100644 --- a/sdk/python/pulumi_azure/network/virtual_hub_ip.py +++ b/sdk/python/pulumi_azure/network/virtual_hub_ip.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VirtualHubIpArgs', 'VirtualHubIp'] @@ -29,15 +29,52 @@ def __init__(__self__, *, :param pulumi.Input[str] private_ip_address: The private IP address of the IP configuration. :param pulumi.Input[str] private_ip_allocation_method: The private IP address allocation method. Possible values are `Static` and `Dynamic` is allowed. Defaults to `Dynamic`. """ - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) - pulumi.set(__self__, "subnet_id", subnet_id) - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + VirtualHubIpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + virtual_hub_id=virtual_hub_id, + name=name, + private_ip_address=private_ip_address, + private_ip_allocation_method=private_ip_allocation_method, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_ip_address_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + private_ip_allocation_method: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_allocation_method is None and 'privateIpAllocationMethod' in kwargs: + private_ip_allocation_method = kwargs['privateIpAllocationMethod'] + + _setter("public_ip_address_id", public_ip_address_id) + _setter("subnet_id", subnet_id) + _setter("virtual_hub_id", virtual_hub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_allocation_method is not None: - pulumi.set(__self__, "private_ip_allocation_method", private_ip_allocation_method) + _setter("private_ip_allocation_method", private_ip_allocation_method) @property @pulumi.getter(name="publicIpAddressId") @@ -130,18 +167,49 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_hub_id: The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created. """ + _VirtualHubIpState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + private_ip_address=private_ip_address, + private_ip_allocation_method=private_ip_allocation_method, + public_ip_address_id=public_ip_address_id, + subnet_id=subnet_id, + virtual_hub_id=virtual_hub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + private_ip_allocation_method: Optional[pulumi.Input[str]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_allocation_method is None and 'privateIpAllocationMethod' in kwargs: + private_ip_allocation_method = kwargs['privateIpAllocationMethod'] + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_allocation_method is not None: - pulumi.set(__self__, "private_ip_allocation_method", private_ip_allocation_method) + _setter("private_ip_allocation_method", private_ip_allocation_method) if public_ip_address_id is not None: - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + _setter("public_ip_address_id", public_ip_address_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if virtual_hub_id is not None: - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + _setter("virtual_hub_id", virtual_hub_id) @property @pulumi.getter @@ -343,6 +411,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualHubIpArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/virtual_hub_route_table.py b/sdk/python/pulumi_azure/network/virtual_hub_route_table.py index 32452a6d85..3484b8b4c4 100644 --- a/sdk/python/pulumi_azure/network/virtual_hub_route_table.py +++ b/sdk/python/pulumi_azure/network/virtual_hub_route_table.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,13 +27,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for Virtual Hub Route Table. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['VirtualHubRouteTableRouteArgs']]] routes: One or more `route` blocks as defined below. """ - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + VirtualHubRouteTableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + virtual_hub_id=virtual_hub_id, + labels=labels, + name=name, + routes=routes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + virtual_hub_id: Optional[pulumi.Input[str]] = None, + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + routes: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualHubRouteTableRouteArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + + _setter("virtual_hub_id", virtual_hub_id) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if routes is not None: - pulumi.set(__self__, "routes", routes) + _setter("routes", routes) @property @pulumi.getter(name="virtualHubId") @@ -98,14 +119,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['VirtualHubRouteTableRouteArgs']]] routes: One or more `route` blocks as defined below. :param pulumi.Input[str] virtual_hub_id: The ID of the Virtual Hub within which this route table should be created. Changing this forces a new resource to be created. """ + _VirtualHubRouteTableState._configure( + lambda key, value: pulumi.set(__self__, key, value), + labels=labels, + name=name, + routes=routes, + virtual_hub_id=virtual_hub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + routes: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualHubRouteTableRouteArgs']]]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if routes is not None: - pulumi.set(__self__, "routes", routes) + _setter("routes", routes) if virtual_hub_id is not None: - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + _setter("virtual_hub_id", virtual_hub_id) @property @pulumi.getter @@ -299,6 +339,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualHubRouteTableArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/virtual_hub_route_table_route.py b/sdk/python/pulumi_azure/network/virtual_hub_route_table_route.py index a8fedf6a52..874b7ff662 100644 --- a/sdk/python/pulumi_azure/network/virtual_hub_route_table_route.py +++ b/sdk/python/pulumi_azure/network/virtual_hub_route_table_route.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VirtualHubRouteTableRouteInitArgs', 'VirtualHubRouteTableRoute'] @@ -29,14 +29,51 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this route. Changing this forces a new resource to be created. :param pulumi.Input[str] next_hop_type: The type of next hop. Currently the only possible value is `ResourceId`. Defaults to `ResourceId`. """ - pulumi.set(__self__, "destinations", destinations) - pulumi.set(__self__, "destinations_type", destinations_type) - pulumi.set(__self__, "next_hop", next_hop) - pulumi.set(__self__, "route_table_id", route_table_id) + VirtualHubRouteTableRouteInitArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destinations=destinations, + destinations_type=destinations_type, + next_hop=next_hop, + route_table_id=route_table_id, + name=name, + next_hop_type=next_hop_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destinations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destinations_type: Optional[pulumi.Input[str]] = None, + next_hop: Optional[pulumi.Input[str]] = None, + route_table_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + next_hop_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destinations is None: + raise TypeError("Missing 'destinations' argument") + if destinations_type is None and 'destinationsType' in kwargs: + destinations_type = kwargs['destinationsType'] + if destinations_type is None: + raise TypeError("Missing 'destinations_type' argument") + if next_hop is None and 'nextHop' in kwargs: + next_hop = kwargs['nextHop'] + if next_hop is None: + raise TypeError("Missing 'next_hop' argument") + if route_table_id is None and 'routeTableId' in kwargs: + route_table_id = kwargs['routeTableId'] + if route_table_id is None: + raise TypeError("Missing 'route_table_id' argument") + if next_hop_type is None and 'nextHopType' in kwargs: + next_hop_type = kwargs['nextHopType'] + + _setter("destinations", destinations) + _setter("destinations_type", destinations_type) + _setter("next_hop", next_hop) + _setter("route_table_id", route_table_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if next_hop_type is not None: - pulumi.set(__self__, "next_hop_type", next_hop_type) + _setter("next_hop_type", next_hop_type) @property @pulumi.getter @@ -129,18 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[str] next_hop_type: The type of next hop. Currently the only possible value is `ResourceId`. Defaults to `ResourceId`. :param pulumi.Input[str] route_table_id: The ID of the Virtual Hub Route Table to link this route to. Changing this forces a new resource to be created. """ + _VirtualHubRouteTableRouteState._configure( + lambda key, value: pulumi.set(__self__, key, value), + destinations=destinations, + destinations_type=destinations_type, + name=name, + next_hop=next_hop, + next_hop_type=next_hop_type, + route_table_id=route_table_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destinations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destinations_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + next_hop: Optional[pulumi.Input[str]] = None, + next_hop_type: Optional[pulumi.Input[str]] = None, + route_table_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destinations_type is None and 'destinationsType' in kwargs: + destinations_type = kwargs['destinationsType'] + if next_hop is None and 'nextHop' in kwargs: + next_hop = kwargs['nextHop'] + if next_hop_type is None and 'nextHopType' in kwargs: + next_hop_type = kwargs['nextHopType'] + if route_table_id is None and 'routeTableId' in kwargs: + route_table_id = kwargs['routeTableId'] + if destinations is not None: - pulumi.set(__self__, "destinations", destinations) + _setter("destinations", destinations) if destinations_type is not None: - pulumi.set(__self__, "destinations_type", destinations_type) + _setter("destinations_type", destinations_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if next_hop is not None: - pulumi.set(__self__, "next_hop", next_hop) + _setter("next_hop", next_hop) if next_hop_type is not None: - pulumi.set(__self__, "next_hop_type", next_hop_type) + _setter("next_hop_type", next_hop_type) if route_table_id is not None: - pulumi.set(__self__, "route_table_id", route_table_id) + _setter("route_table_id", route_table_id) @property @pulumi.getter @@ -370,6 +436,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualHubRouteTableRouteInitArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/virtual_network.py b/sdk/python/pulumi_azure/network/virtual_network.py index c48516b82d..0eb31064a3 100644 --- a/sdk/python/pulumi_azure/network/virtual_network.py +++ b/sdk/python/pulumi_azure/network/virtual_network.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,28 +49,79 @@ def __init__(__self__, *, > **NOTE** Since `subnet` can be configured both inline and via the separate `network.Subnet` resource, we have to explicitly set it to empty slice (`[]`) to remove it. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "address_spaces", address_spaces) - pulumi.set(__self__, "resource_group_name", resource_group_name) + VirtualNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_spaces=address_spaces, + resource_group_name=resource_group_name, + bgp_community=bgp_community, + ddos_protection_plan=ddos_protection_plan, + dns_servers=dns_servers, + edge_zone=edge_zone, + encryption=encryption, + flow_timeout_in_minutes=flow_timeout_in_minutes, + location=location, + name=name, + subnets=subnets, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_spaces: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + bgp_community: Optional[pulumi.Input[str]] = None, + ddos_protection_plan: Optional[pulumi.Input['VirtualNetworkDdosProtectionPlanArgs']] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + encryption: Optional[pulumi.Input['VirtualNetworkEncryptionArgs']] = None, + flow_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + subnets: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualNetworkSubnetArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_spaces is None and 'addressSpaces' in kwargs: + address_spaces = kwargs['addressSpaces'] + if address_spaces is None: + raise TypeError("Missing 'address_spaces' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if bgp_community is None and 'bgpCommunity' in kwargs: + bgp_community = kwargs['bgpCommunity'] + if ddos_protection_plan is None and 'ddosProtectionPlan' in kwargs: + ddos_protection_plan = kwargs['ddosProtectionPlan'] + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if flow_timeout_in_minutes is None and 'flowTimeoutInMinutes' in kwargs: + flow_timeout_in_minutes = kwargs['flowTimeoutInMinutes'] + + _setter("address_spaces", address_spaces) + _setter("resource_group_name", resource_group_name) if bgp_community is not None: - pulumi.set(__self__, "bgp_community", bgp_community) + _setter("bgp_community", bgp_community) if ddos_protection_plan is not None: - pulumi.set(__self__, "ddos_protection_plan", ddos_protection_plan) + _setter("ddos_protection_plan", ddos_protection_plan) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if flow_timeout_in_minutes is not None: - pulumi.set(__self__, "flow_timeout_in_minutes", flow_timeout_in_minutes) + _setter("flow_timeout_in_minutes", flow_timeout_in_minutes) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subnets is not None: - pulumi.set(__self__, "subnets", subnets) + _setter("subnets", subnets) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="addressSpaces") @@ -261,32 +312,81 @@ def __init__(__self__, *, > **NOTE** Since `subnet` can be configured both inline and via the separate `network.Subnet` resource, we have to explicitly set it to empty slice (`[]`) to remove it. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _VirtualNetworkState._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_spaces=address_spaces, + bgp_community=bgp_community, + ddos_protection_plan=ddos_protection_plan, + dns_servers=dns_servers, + edge_zone=edge_zone, + encryption=encryption, + flow_timeout_in_minutes=flow_timeout_in_minutes, + guid=guid, + location=location, + name=name, + resource_group_name=resource_group_name, + subnets=subnets, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_spaces: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + bgp_community: Optional[pulumi.Input[str]] = None, + ddos_protection_plan: Optional[pulumi.Input['VirtualNetworkDdosProtectionPlanArgs']] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + encryption: Optional[pulumi.Input['VirtualNetworkEncryptionArgs']] = None, + flow_timeout_in_minutes: Optional[pulumi.Input[int]] = None, + guid: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subnets: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualNetworkSubnetArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_spaces is None and 'addressSpaces' in kwargs: + address_spaces = kwargs['addressSpaces'] + if bgp_community is None and 'bgpCommunity' in kwargs: + bgp_community = kwargs['bgpCommunity'] + if ddos_protection_plan is None and 'ddosProtectionPlan' in kwargs: + ddos_protection_plan = kwargs['ddosProtectionPlan'] + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if flow_timeout_in_minutes is None and 'flowTimeoutInMinutes' in kwargs: + flow_timeout_in_minutes = kwargs['flowTimeoutInMinutes'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if address_spaces is not None: - pulumi.set(__self__, "address_spaces", address_spaces) + _setter("address_spaces", address_spaces) if bgp_community is not None: - pulumi.set(__self__, "bgp_community", bgp_community) + _setter("bgp_community", bgp_community) if ddos_protection_plan is not None: - pulumi.set(__self__, "ddos_protection_plan", ddos_protection_plan) + _setter("ddos_protection_plan", ddos_protection_plan) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if flow_timeout_in_minutes is not None: - pulumi.set(__self__, "flow_timeout_in_minutes", flow_timeout_in_minutes) + _setter("flow_timeout_in_minutes", flow_timeout_in_minutes) if guid is not None: - pulumi.set(__self__, "guid", guid) + _setter("guid", guid) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if subnets is not None: - pulumi.set(__self__, "subnets", subnets) + _setter("subnets", subnets) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="addressSpaces") @@ -610,6 +710,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -640,9 +744,19 @@ def _internal_init(__self__, raise TypeError("Missing required property 'address_spaces'") __props__.__dict__["address_spaces"] = address_spaces __props__.__dict__["bgp_community"] = bgp_community + if ddos_protection_plan is not None and not isinstance(ddos_protection_plan, VirtualNetworkDdosProtectionPlanArgs): + ddos_protection_plan = ddos_protection_plan or {} + def _setter(key, value): + ddos_protection_plan[key] = value + VirtualNetworkDdosProtectionPlanArgs._configure(_setter, **ddos_protection_plan) __props__.__dict__["ddos_protection_plan"] = ddos_protection_plan __props__.__dict__["dns_servers"] = dns_servers __props__.__dict__["edge_zone"] = edge_zone + if encryption is not None and not isinstance(encryption, VirtualNetworkEncryptionArgs): + encryption = encryption or {} + def _setter(key, value): + encryption[key] = value + VirtualNetworkEncryptionArgs._configure(_setter, **encryption) __props__.__dict__["encryption"] = encryption __props__.__dict__["flow_timeout_in_minutes"] = flow_timeout_in_minutes __props__.__dict__["location"] = location diff --git a/sdk/python/pulumi_azure/network/virtual_network_dns_servers.py b/sdk/python/pulumi_azure/network/virtual_network_dns_servers.py index 8daf08a22d..5235cbd665 100644 --- a/sdk/python/pulumi_azure/network/virtual_network_dns_servers.py +++ b/sdk/python/pulumi_azure/network/virtual_network_dns_servers.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VirtualNetworkDnsServersArgs', 'VirtualNetworkDnsServers'] @@ -21,9 +21,28 @@ def __init__(__self__, *, :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_servers: List of IP addresses of DNS servers """ - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + VirtualNetworkDnsServersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + virtual_network_id=virtual_network_id, + dns_servers=dns_servers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + virtual_network_id: Optional[pulumi.Input[str]] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if virtual_network_id is None: + raise TypeError("Missing 'virtual_network_id' argument") + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + + _setter("virtual_network_id", virtual_network_id) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) @property @pulumi.getter(name="virtualNetworkId") @@ -60,10 +79,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_servers: List of IP addresses of DNS servers :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created. """ + _VirtualNetworkDnsServersState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_servers=dns_servers, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="dnsServers") @@ -185,6 +221,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkDnsServersArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/virtual_network_gateway.py b/sdk/python/pulumi_azure/network/virtual_network_gateway.py index ca1eaff473..f0d7f15bf6 100644 --- a/sdk/python/pulumi_azure/network/virtual_network_gateway.py +++ b/sdk/python/pulumi_azure/network/virtual_network_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -62,36 +62,109 @@ def __init__(__self__, *, :param pulumi.Input['VirtualNetworkGatewayVpnClientConfigurationArgs'] vpn_client_configuration: A `vpn_client_configuration` block which is documented below. In this block the Virtual Network Gateway can be configured to accept IPSec point-to-site connections. :param pulumi.Input[str] vpn_type: The routing type of the Virtual Network Gateway. Valid options are `RouteBased` or `PolicyBased`. Defaults to `RouteBased`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) - pulumi.set(__self__, "type", type) + VirtualNetworkGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + resource_group_name=resource_group_name, + sku=sku, + type=type, + active_active=active_active, + bgp_settings=bgp_settings, + custom_route=custom_route, + default_local_network_gateway_id=default_local_network_gateway_id, + edge_zone=edge_zone, + enable_bgp=enable_bgp, + generation=generation, + location=location, + name=name, + private_ip_address_enabled=private_ip_address_enabled, + tags=tags, + vpn_client_configuration=vpn_client_configuration, + vpn_type=vpn_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualNetworkGatewayIpConfigurationArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + active_active: Optional[pulumi.Input[bool]] = None, + bgp_settings: Optional[pulumi.Input['VirtualNetworkGatewayBgpSettingsArgs']] = None, + custom_route: Optional[pulumi.Input['VirtualNetworkGatewayCustomRouteArgs']] = None, + default_local_network_gateway_id: Optional[pulumi.Input[str]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + enable_bgp: Optional[pulumi.Input[bool]] = None, + generation: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_ip_address_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + vpn_client_configuration: Optional[pulumi.Input['VirtualNetworkGatewayVpnClientConfigurationArgs']] = None, + vpn_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if active_active is None and 'activeActive' in kwargs: + active_active = kwargs['activeActive'] + if bgp_settings is None and 'bgpSettings' in kwargs: + bgp_settings = kwargs['bgpSettings'] + if custom_route is None and 'customRoute' in kwargs: + custom_route = kwargs['customRoute'] + if default_local_network_gateway_id is None and 'defaultLocalNetworkGatewayId' in kwargs: + default_local_network_gateway_id = kwargs['defaultLocalNetworkGatewayId'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if enable_bgp is None and 'enableBgp' in kwargs: + enable_bgp = kwargs['enableBgp'] + if private_ip_address_enabled is None and 'privateIpAddressEnabled' in kwargs: + private_ip_address_enabled = kwargs['privateIpAddressEnabled'] + if vpn_client_configuration is None and 'vpnClientConfiguration' in kwargs: + vpn_client_configuration = kwargs['vpnClientConfiguration'] + if vpn_type is None and 'vpnType' in kwargs: + vpn_type = kwargs['vpnType'] + + _setter("ip_configurations", ip_configurations) + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) + _setter("type", type) if active_active is not None: - pulumi.set(__self__, "active_active", active_active) + _setter("active_active", active_active) if bgp_settings is not None: - pulumi.set(__self__, "bgp_settings", bgp_settings) + _setter("bgp_settings", bgp_settings) if custom_route is not None: - pulumi.set(__self__, "custom_route", custom_route) + _setter("custom_route", custom_route) if default_local_network_gateway_id is not None: - pulumi.set(__self__, "default_local_network_gateway_id", default_local_network_gateway_id) + _setter("default_local_network_gateway_id", default_local_network_gateway_id) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if enable_bgp is not None: - pulumi.set(__self__, "enable_bgp", enable_bgp) + _setter("enable_bgp", enable_bgp) if generation is not None: - pulumi.set(__self__, "generation", generation) + _setter("generation", generation) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_ip_address_enabled is not None: - pulumi.set(__self__, "private_ip_address_enabled", private_ip_address_enabled) + _setter("private_ip_address_enabled", private_ip_address_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if vpn_client_configuration is not None: - pulumi.set(__self__, "vpn_client_configuration", vpn_client_configuration) + _setter("vpn_client_configuration", vpn_client_configuration) if vpn_type is not None: - pulumi.set(__self__, "vpn_type", vpn_type) + _setter("vpn_type", vpn_type) @property @pulumi.getter(name="ipConfigurations") @@ -356,40 +429,105 @@ def __init__(__self__, *, :param pulumi.Input['VirtualNetworkGatewayVpnClientConfigurationArgs'] vpn_client_configuration: A `vpn_client_configuration` block which is documented below. In this block the Virtual Network Gateway can be configured to accept IPSec point-to-site connections. :param pulumi.Input[str] vpn_type: The routing type of the Virtual Network Gateway. Valid options are `RouteBased` or `PolicyBased`. Defaults to `RouteBased`. Changing this forces a new resource to be created. """ + _VirtualNetworkGatewayState._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_active=active_active, + bgp_settings=bgp_settings, + custom_route=custom_route, + default_local_network_gateway_id=default_local_network_gateway_id, + edge_zone=edge_zone, + enable_bgp=enable_bgp, + generation=generation, + ip_configurations=ip_configurations, + location=location, + name=name, + private_ip_address_enabled=private_ip_address_enabled, + resource_group_name=resource_group_name, + sku=sku, + tags=tags, + type=type, + vpn_client_configuration=vpn_client_configuration, + vpn_type=vpn_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_active: Optional[pulumi.Input[bool]] = None, + bgp_settings: Optional[pulumi.Input['VirtualNetworkGatewayBgpSettingsArgs']] = None, + custom_route: Optional[pulumi.Input['VirtualNetworkGatewayCustomRouteArgs']] = None, + default_local_network_gateway_id: Optional[pulumi.Input[str]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + enable_bgp: Optional[pulumi.Input[bool]] = None, + generation: Optional[pulumi.Input[str]] = None, + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualNetworkGatewayIpConfigurationArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_ip_address_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + vpn_client_configuration: Optional[pulumi.Input['VirtualNetworkGatewayVpnClientConfigurationArgs']] = None, + vpn_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_active is None and 'activeActive' in kwargs: + active_active = kwargs['activeActive'] + if bgp_settings is None and 'bgpSettings' in kwargs: + bgp_settings = kwargs['bgpSettings'] + if custom_route is None and 'customRoute' in kwargs: + custom_route = kwargs['customRoute'] + if default_local_network_gateway_id is None and 'defaultLocalNetworkGatewayId' in kwargs: + default_local_network_gateway_id = kwargs['defaultLocalNetworkGatewayId'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if enable_bgp is None and 'enableBgp' in kwargs: + enable_bgp = kwargs['enableBgp'] + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if private_ip_address_enabled is None and 'privateIpAddressEnabled' in kwargs: + private_ip_address_enabled = kwargs['privateIpAddressEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if vpn_client_configuration is None and 'vpnClientConfiguration' in kwargs: + vpn_client_configuration = kwargs['vpnClientConfiguration'] + if vpn_type is None and 'vpnType' in kwargs: + vpn_type = kwargs['vpnType'] + if active_active is not None: - pulumi.set(__self__, "active_active", active_active) + _setter("active_active", active_active) if bgp_settings is not None: - pulumi.set(__self__, "bgp_settings", bgp_settings) + _setter("bgp_settings", bgp_settings) if custom_route is not None: - pulumi.set(__self__, "custom_route", custom_route) + _setter("custom_route", custom_route) if default_local_network_gateway_id is not None: - pulumi.set(__self__, "default_local_network_gateway_id", default_local_network_gateway_id) + _setter("default_local_network_gateway_id", default_local_network_gateway_id) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if enable_bgp is not None: - pulumi.set(__self__, "enable_bgp", enable_bgp) + _setter("enable_bgp", enable_bgp) if generation is not None: - pulumi.set(__self__, "generation", generation) + _setter("generation", generation) if ip_configurations is not None: - pulumi.set(__self__, "ip_configurations", ip_configurations) + _setter("ip_configurations", ip_configurations) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_ip_address_enabled is not None: - pulumi.set(__self__, "private_ip_address_enabled", private_ip_address_enabled) + _setter("private_ip_address_enabled", private_ip_address_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if vpn_client_configuration is not None: - pulumi.set(__self__, "vpn_client_configuration", vpn_client_configuration) + _setter("vpn_client_configuration", vpn_client_configuration) if vpn_type is not None: - pulumi.set(__self__, "vpn_type", vpn_type) + _setter("vpn_type", vpn_type) @property @pulumi.getter(name="activeActive") @@ -831,6 +969,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkGatewayArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -863,7 +1005,17 @@ def _internal_init(__self__, __props__ = VirtualNetworkGatewayArgs.__new__(VirtualNetworkGatewayArgs) __props__.__dict__["active_active"] = active_active + if bgp_settings is not None and not isinstance(bgp_settings, VirtualNetworkGatewayBgpSettingsArgs): + bgp_settings = bgp_settings or {} + def _setter(key, value): + bgp_settings[key] = value + VirtualNetworkGatewayBgpSettingsArgs._configure(_setter, **bgp_settings) __props__.__dict__["bgp_settings"] = bgp_settings + if custom_route is not None and not isinstance(custom_route, VirtualNetworkGatewayCustomRouteArgs): + custom_route = custom_route or {} + def _setter(key, value): + custom_route[key] = value + VirtualNetworkGatewayCustomRouteArgs._configure(_setter, **custom_route) __props__.__dict__["custom_route"] = custom_route __props__.__dict__["default_local_network_gateway_id"] = default_local_network_gateway_id __props__.__dict__["edge_zone"] = edge_zone @@ -885,6 +1037,11 @@ def _internal_init(__self__, if type is None and not opts.urn: raise TypeError("Missing required property 'type'") __props__.__dict__["type"] = type + if vpn_client_configuration is not None and not isinstance(vpn_client_configuration, VirtualNetworkGatewayVpnClientConfigurationArgs): + vpn_client_configuration = vpn_client_configuration or {} + def _setter(key, value): + vpn_client_configuration[key] = value + VirtualNetworkGatewayVpnClientConfigurationArgs._configure(_setter, **vpn_client_configuration) __props__.__dict__["vpn_client_configuration"] = vpn_client_configuration __props__.__dict__["vpn_type"] = vpn_type super(VirtualNetworkGateway, __self__).__init__( diff --git a/sdk/python/pulumi_azure/network/virtual_network_gateway_connection.py b/sdk/python/pulumi_azure/network/virtual_network_gateway_connection.py index e951842963..779aa7ea17 100644 --- a/sdk/python/pulumi_azure/network/virtual_network_gateway_connection.py +++ b/sdk/python/pulumi_azure/network/virtual_network_gateway_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -74,51 +74,154 @@ def __init__(__self__, *, For details about traffic selectors refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-connect-multiple-policybased-rm-ps). :param pulumi.Input[bool] use_policy_based_traffic_selectors: If `true`, policy-based traffic selectors are enabled for this connection. Enabling policy-based traffic selectors requires an `ipsec_policy` block. Defaults to `false`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "virtual_network_gateway_id", virtual_network_gateway_id) + VirtualNetworkGatewayConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + type=type, + virtual_network_gateway_id=virtual_network_gateway_id, + authorization_key=authorization_key, + connection_mode=connection_mode, + connection_protocol=connection_protocol, + custom_bgp_addresses=custom_bgp_addresses, + dpd_timeout_seconds=dpd_timeout_seconds, + egress_nat_rule_ids=egress_nat_rule_ids, + enable_bgp=enable_bgp, + express_route_circuit_id=express_route_circuit_id, + express_route_gateway_bypass=express_route_gateway_bypass, + ingress_nat_rule_ids=ingress_nat_rule_ids, + ipsec_policy=ipsec_policy, + local_azure_ip_address_enabled=local_azure_ip_address_enabled, + local_network_gateway_id=local_network_gateway_id, + location=location, + name=name, + peer_virtual_network_gateway_id=peer_virtual_network_gateway_id, + routing_weight=routing_weight, + shared_key=shared_key, + tags=tags, + traffic_selector_policy=traffic_selector_policy, + use_policy_based_traffic_selectors=use_policy_based_traffic_selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + virtual_network_gateway_id: Optional[pulumi.Input[str]] = None, + authorization_key: Optional[pulumi.Input[str]] = None, + connection_mode: Optional[pulumi.Input[str]] = None, + connection_protocol: Optional[pulumi.Input[str]] = None, + custom_bgp_addresses: Optional[pulumi.Input['VirtualNetworkGatewayConnectionCustomBgpAddressesArgs']] = None, + dpd_timeout_seconds: Optional[pulumi.Input[int]] = None, + egress_nat_rule_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enable_bgp: Optional[pulumi.Input[bool]] = None, + express_route_circuit_id: Optional[pulumi.Input[str]] = None, + express_route_gateway_bypass: Optional[pulumi.Input[bool]] = None, + ingress_nat_rule_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ipsec_policy: Optional[pulumi.Input['VirtualNetworkGatewayConnectionIpsecPolicyArgs']] = None, + local_azure_ip_address_enabled: Optional[pulumi.Input[bool]] = None, + local_network_gateway_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + peer_virtual_network_gateway_id: Optional[pulumi.Input[str]] = None, + routing_weight: Optional[pulumi.Input[int]] = None, + shared_key: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + traffic_selector_policy: Optional[pulumi.Input['VirtualNetworkGatewayConnectionTrafficSelectorPolicyArgs']] = None, + use_policy_based_traffic_selectors: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if virtual_network_gateway_id is None and 'virtualNetworkGatewayId' in kwargs: + virtual_network_gateway_id = kwargs['virtualNetworkGatewayId'] + if virtual_network_gateway_id is None: + raise TypeError("Missing 'virtual_network_gateway_id' argument") + if authorization_key is None and 'authorizationKey' in kwargs: + authorization_key = kwargs['authorizationKey'] + if connection_mode is None and 'connectionMode' in kwargs: + connection_mode = kwargs['connectionMode'] + if connection_protocol is None and 'connectionProtocol' in kwargs: + connection_protocol = kwargs['connectionProtocol'] + if custom_bgp_addresses is None and 'customBgpAddresses' in kwargs: + custom_bgp_addresses = kwargs['customBgpAddresses'] + if dpd_timeout_seconds is None and 'dpdTimeoutSeconds' in kwargs: + dpd_timeout_seconds = kwargs['dpdTimeoutSeconds'] + if egress_nat_rule_ids is None and 'egressNatRuleIds' in kwargs: + egress_nat_rule_ids = kwargs['egressNatRuleIds'] + if enable_bgp is None and 'enableBgp' in kwargs: + enable_bgp = kwargs['enableBgp'] + if express_route_circuit_id is None and 'expressRouteCircuitId' in kwargs: + express_route_circuit_id = kwargs['expressRouteCircuitId'] + if express_route_gateway_bypass is None and 'expressRouteGatewayBypass' in kwargs: + express_route_gateway_bypass = kwargs['expressRouteGatewayBypass'] + if ingress_nat_rule_ids is None and 'ingressNatRuleIds' in kwargs: + ingress_nat_rule_ids = kwargs['ingressNatRuleIds'] + if ipsec_policy is None and 'ipsecPolicy' in kwargs: + ipsec_policy = kwargs['ipsecPolicy'] + if local_azure_ip_address_enabled is None and 'localAzureIpAddressEnabled' in kwargs: + local_azure_ip_address_enabled = kwargs['localAzureIpAddressEnabled'] + if local_network_gateway_id is None and 'localNetworkGatewayId' in kwargs: + local_network_gateway_id = kwargs['localNetworkGatewayId'] + if peer_virtual_network_gateway_id is None and 'peerVirtualNetworkGatewayId' in kwargs: + peer_virtual_network_gateway_id = kwargs['peerVirtualNetworkGatewayId'] + if routing_weight is None and 'routingWeight' in kwargs: + routing_weight = kwargs['routingWeight'] + if shared_key is None and 'sharedKey' in kwargs: + shared_key = kwargs['sharedKey'] + if traffic_selector_policy is None and 'trafficSelectorPolicy' in kwargs: + traffic_selector_policy = kwargs['trafficSelectorPolicy'] + if use_policy_based_traffic_selectors is None and 'usePolicyBasedTrafficSelectors' in kwargs: + use_policy_based_traffic_selectors = kwargs['usePolicyBasedTrafficSelectors'] + + _setter("resource_group_name", resource_group_name) + _setter("type", type) + _setter("virtual_network_gateway_id", virtual_network_gateway_id) if authorization_key is not None: - pulumi.set(__self__, "authorization_key", authorization_key) + _setter("authorization_key", authorization_key) if connection_mode is not None: - pulumi.set(__self__, "connection_mode", connection_mode) + _setter("connection_mode", connection_mode) if connection_protocol is not None: - pulumi.set(__self__, "connection_protocol", connection_protocol) + _setter("connection_protocol", connection_protocol) if custom_bgp_addresses is not None: - pulumi.set(__self__, "custom_bgp_addresses", custom_bgp_addresses) + _setter("custom_bgp_addresses", custom_bgp_addresses) if dpd_timeout_seconds is not None: - pulumi.set(__self__, "dpd_timeout_seconds", dpd_timeout_seconds) + _setter("dpd_timeout_seconds", dpd_timeout_seconds) if egress_nat_rule_ids is not None: - pulumi.set(__self__, "egress_nat_rule_ids", egress_nat_rule_ids) + _setter("egress_nat_rule_ids", egress_nat_rule_ids) if enable_bgp is not None: - pulumi.set(__self__, "enable_bgp", enable_bgp) + _setter("enable_bgp", enable_bgp) if express_route_circuit_id is not None: - pulumi.set(__self__, "express_route_circuit_id", express_route_circuit_id) + _setter("express_route_circuit_id", express_route_circuit_id) if express_route_gateway_bypass is not None: - pulumi.set(__self__, "express_route_gateway_bypass", express_route_gateway_bypass) + _setter("express_route_gateway_bypass", express_route_gateway_bypass) if ingress_nat_rule_ids is not None: - pulumi.set(__self__, "ingress_nat_rule_ids", ingress_nat_rule_ids) + _setter("ingress_nat_rule_ids", ingress_nat_rule_ids) if ipsec_policy is not None: - pulumi.set(__self__, "ipsec_policy", ipsec_policy) + _setter("ipsec_policy", ipsec_policy) if local_azure_ip_address_enabled is not None: - pulumi.set(__self__, "local_azure_ip_address_enabled", local_azure_ip_address_enabled) + _setter("local_azure_ip_address_enabled", local_azure_ip_address_enabled) if local_network_gateway_id is not None: - pulumi.set(__self__, "local_network_gateway_id", local_network_gateway_id) + _setter("local_network_gateway_id", local_network_gateway_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if peer_virtual_network_gateway_id is not None: - pulumi.set(__self__, "peer_virtual_network_gateway_id", peer_virtual_network_gateway_id) + _setter("peer_virtual_network_gateway_id", peer_virtual_network_gateway_id) if routing_weight is not None: - pulumi.set(__self__, "routing_weight", routing_weight) + _setter("routing_weight", routing_weight) if shared_key is not None: - pulumi.set(__self__, "shared_key", shared_key) + _setter("shared_key", shared_key) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if traffic_selector_policy is not None: - pulumi.set(__self__, "traffic_selector_policy", traffic_selector_policy) + _setter("traffic_selector_policy", traffic_selector_policy) if use_policy_based_traffic_selectors is not None: - pulumi.set(__self__, "use_policy_based_traffic_selectors", use_policy_based_traffic_selectors) + _setter("use_policy_based_traffic_selectors", use_policy_based_traffic_selectors) @property @pulumi.getter(name="resourceGroupName") @@ -477,54 +580,151 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_policy_based_traffic_selectors: If `true`, policy-based traffic selectors are enabled for this connection. Enabling policy-based traffic selectors requires an `ipsec_policy` block. Defaults to `false`. :param pulumi.Input[str] virtual_network_gateway_id: The ID of the Virtual Network Gateway in which the connection will be created. Changing this forces a new resource to be created. """ + _VirtualNetworkGatewayConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorization_key=authorization_key, + connection_mode=connection_mode, + connection_protocol=connection_protocol, + custom_bgp_addresses=custom_bgp_addresses, + dpd_timeout_seconds=dpd_timeout_seconds, + egress_nat_rule_ids=egress_nat_rule_ids, + enable_bgp=enable_bgp, + express_route_circuit_id=express_route_circuit_id, + express_route_gateway_bypass=express_route_gateway_bypass, + ingress_nat_rule_ids=ingress_nat_rule_ids, + ipsec_policy=ipsec_policy, + local_azure_ip_address_enabled=local_azure_ip_address_enabled, + local_network_gateway_id=local_network_gateway_id, + location=location, + name=name, + peer_virtual_network_gateway_id=peer_virtual_network_gateway_id, + resource_group_name=resource_group_name, + routing_weight=routing_weight, + shared_key=shared_key, + tags=tags, + traffic_selector_policy=traffic_selector_policy, + type=type, + use_policy_based_traffic_selectors=use_policy_based_traffic_selectors, + virtual_network_gateway_id=virtual_network_gateway_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorization_key: Optional[pulumi.Input[str]] = None, + connection_mode: Optional[pulumi.Input[str]] = None, + connection_protocol: Optional[pulumi.Input[str]] = None, + custom_bgp_addresses: Optional[pulumi.Input['VirtualNetworkGatewayConnectionCustomBgpAddressesArgs']] = None, + dpd_timeout_seconds: Optional[pulumi.Input[int]] = None, + egress_nat_rule_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enable_bgp: Optional[pulumi.Input[bool]] = None, + express_route_circuit_id: Optional[pulumi.Input[str]] = None, + express_route_gateway_bypass: Optional[pulumi.Input[bool]] = None, + ingress_nat_rule_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ipsec_policy: Optional[pulumi.Input['VirtualNetworkGatewayConnectionIpsecPolicyArgs']] = None, + local_azure_ip_address_enabled: Optional[pulumi.Input[bool]] = None, + local_network_gateway_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + peer_virtual_network_gateway_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + routing_weight: Optional[pulumi.Input[int]] = None, + shared_key: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + traffic_selector_policy: Optional[pulumi.Input['VirtualNetworkGatewayConnectionTrafficSelectorPolicyArgs']] = None, + type: Optional[pulumi.Input[str]] = None, + use_policy_based_traffic_selectors: Optional[pulumi.Input[bool]] = None, + virtual_network_gateway_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorization_key is None and 'authorizationKey' in kwargs: + authorization_key = kwargs['authorizationKey'] + if connection_mode is None and 'connectionMode' in kwargs: + connection_mode = kwargs['connectionMode'] + if connection_protocol is None and 'connectionProtocol' in kwargs: + connection_protocol = kwargs['connectionProtocol'] + if custom_bgp_addresses is None and 'customBgpAddresses' in kwargs: + custom_bgp_addresses = kwargs['customBgpAddresses'] + if dpd_timeout_seconds is None and 'dpdTimeoutSeconds' in kwargs: + dpd_timeout_seconds = kwargs['dpdTimeoutSeconds'] + if egress_nat_rule_ids is None and 'egressNatRuleIds' in kwargs: + egress_nat_rule_ids = kwargs['egressNatRuleIds'] + if enable_bgp is None and 'enableBgp' in kwargs: + enable_bgp = kwargs['enableBgp'] + if express_route_circuit_id is None and 'expressRouteCircuitId' in kwargs: + express_route_circuit_id = kwargs['expressRouteCircuitId'] + if express_route_gateway_bypass is None and 'expressRouteGatewayBypass' in kwargs: + express_route_gateway_bypass = kwargs['expressRouteGatewayBypass'] + if ingress_nat_rule_ids is None and 'ingressNatRuleIds' in kwargs: + ingress_nat_rule_ids = kwargs['ingressNatRuleIds'] + if ipsec_policy is None and 'ipsecPolicy' in kwargs: + ipsec_policy = kwargs['ipsecPolicy'] + if local_azure_ip_address_enabled is None and 'localAzureIpAddressEnabled' in kwargs: + local_azure_ip_address_enabled = kwargs['localAzureIpAddressEnabled'] + if local_network_gateway_id is None and 'localNetworkGatewayId' in kwargs: + local_network_gateway_id = kwargs['localNetworkGatewayId'] + if peer_virtual_network_gateway_id is None and 'peerVirtualNetworkGatewayId' in kwargs: + peer_virtual_network_gateway_id = kwargs['peerVirtualNetworkGatewayId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if routing_weight is None and 'routingWeight' in kwargs: + routing_weight = kwargs['routingWeight'] + if shared_key is None and 'sharedKey' in kwargs: + shared_key = kwargs['sharedKey'] + if traffic_selector_policy is None and 'trafficSelectorPolicy' in kwargs: + traffic_selector_policy = kwargs['trafficSelectorPolicy'] + if use_policy_based_traffic_selectors is None and 'usePolicyBasedTrafficSelectors' in kwargs: + use_policy_based_traffic_selectors = kwargs['usePolicyBasedTrafficSelectors'] + if virtual_network_gateway_id is None and 'virtualNetworkGatewayId' in kwargs: + virtual_network_gateway_id = kwargs['virtualNetworkGatewayId'] + if authorization_key is not None: - pulumi.set(__self__, "authorization_key", authorization_key) + _setter("authorization_key", authorization_key) if connection_mode is not None: - pulumi.set(__self__, "connection_mode", connection_mode) + _setter("connection_mode", connection_mode) if connection_protocol is not None: - pulumi.set(__self__, "connection_protocol", connection_protocol) + _setter("connection_protocol", connection_protocol) if custom_bgp_addresses is not None: - pulumi.set(__self__, "custom_bgp_addresses", custom_bgp_addresses) + _setter("custom_bgp_addresses", custom_bgp_addresses) if dpd_timeout_seconds is not None: - pulumi.set(__self__, "dpd_timeout_seconds", dpd_timeout_seconds) + _setter("dpd_timeout_seconds", dpd_timeout_seconds) if egress_nat_rule_ids is not None: - pulumi.set(__self__, "egress_nat_rule_ids", egress_nat_rule_ids) + _setter("egress_nat_rule_ids", egress_nat_rule_ids) if enable_bgp is not None: - pulumi.set(__self__, "enable_bgp", enable_bgp) + _setter("enable_bgp", enable_bgp) if express_route_circuit_id is not None: - pulumi.set(__self__, "express_route_circuit_id", express_route_circuit_id) + _setter("express_route_circuit_id", express_route_circuit_id) if express_route_gateway_bypass is not None: - pulumi.set(__self__, "express_route_gateway_bypass", express_route_gateway_bypass) + _setter("express_route_gateway_bypass", express_route_gateway_bypass) if ingress_nat_rule_ids is not None: - pulumi.set(__self__, "ingress_nat_rule_ids", ingress_nat_rule_ids) + _setter("ingress_nat_rule_ids", ingress_nat_rule_ids) if ipsec_policy is not None: - pulumi.set(__self__, "ipsec_policy", ipsec_policy) + _setter("ipsec_policy", ipsec_policy) if local_azure_ip_address_enabled is not None: - pulumi.set(__self__, "local_azure_ip_address_enabled", local_azure_ip_address_enabled) + _setter("local_azure_ip_address_enabled", local_azure_ip_address_enabled) if local_network_gateway_id is not None: - pulumi.set(__self__, "local_network_gateway_id", local_network_gateway_id) + _setter("local_network_gateway_id", local_network_gateway_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if peer_virtual_network_gateway_id is not None: - pulumi.set(__self__, "peer_virtual_network_gateway_id", peer_virtual_network_gateway_id) + _setter("peer_virtual_network_gateway_id", peer_virtual_network_gateway_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if routing_weight is not None: - pulumi.set(__self__, "routing_weight", routing_weight) + _setter("routing_weight", routing_weight) if shared_key is not None: - pulumi.set(__self__, "shared_key", shared_key) + _setter("shared_key", shared_key) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if traffic_selector_policy is not None: - pulumi.set(__self__, "traffic_selector_policy", traffic_selector_policy) + _setter("traffic_selector_policy", traffic_selector_policy) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if use_policy_based_traffic_selectors is not None: - pulumi.set(__self__, "use_policy_based_traffic_selectors", use_policy_based_traffic_selectors) + _setter("use_policy_based_traffic_selectors", use_policy_based_traffic_selectors) if virtual_network_gateway_id is not None: - pulumi.set(__self__, "virtual_network_gateway_id", virtual_network_gateway_id) + _setter("virtual_network_gateway_id", virtual_network_gateway_id) @property @pulumi.getter(name="authorizationKey") @@ -1168,6 +1368,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkGatewayConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1209,6 +1413,11 @@ def _internal_init(__self__, __props__.__dict__["authorization_key"] = None if authorization_key is None else pulumi.Output.secret(authorization_key) __props__.__dict__["connection_mode"] = connection_mode __props__.__dict__["connection_protocol"] = connection_protocol + if custom_bgp_addresses is not None and not isinstance(custom_bgp_addresses, VirtualNetworkGatewayConnectionCustomBgpAddressesArgs): + custom_bgp_addresses = custom_bgp_addresses or {} + def _setter(key, value): + custom_bgp_addresses[key] = value + VirtualNetworkGatewayConnectionCustomBgpAddressesArgs._configure(_setter, **custom_bgp_addresses) __props__.__dict__["custom_bgp_addresses"] = custom_bgp_addresses __props__.__dict__["dpd_timeout_seconds"] = dpd_timeout_seconds __props__.__dict__["egress_nat_rule_ids"] = egress_nat_rule_ids @@ -1216,6 +1425,11 @@ def _internal_init(__self__, __props__.__dict__["express_route_circuit_id"] = express_route_circuit_id __props__.__dict__["express_route_gateway_bypass"] = express_route_gateway_bypass __props__.__dict__["ingress_nat_rule_ids"] = ingress_nat_rule_ids + if ipsec_policy is not None and not isinstance(ipsec_policy, VirtualNetworkGatewayConnectionIpsecPolicyArgs): + ipsec_policy = ipsec_policy or {} + def _setter(key, value): + ipsec_policy[key] = value + VirtualNetworkGatewayConnectionIpsecPolicyArgs._configure(_setter, **ipsec_policy) __props__.__dict__["ipsec_policy"] = ipsec_policy __props__.__dict__["local_azure_ip_address_enabled"] = local_azure_ip_address_enabled __props__.__dict__["local_network_gateway_id"] = local_network_gateway_id @@ -1228,6 +1442,11 @@ def _internal_init(__self__, __props__.__dict__["routing_weight"] = routing_weight __props__.__dict__["shared_key"] = None if shared_key is None else pulumi.Output.secret(shared_key) __props__.__dict__["tags"] = tags + if traffic_selector_policy is not None and not isinstance(traffic_selector_policy, VirtualNetworkGatewayConnectionTrafficSelectorPolicyArgs): + traffic_selector_policy = traffic_selector_policy or {} + def _setter(key, value): + traffic_selector_policy[key] = value + VirtualNetworkGatewayConnectionTrafficSelectorPolicyArgs._configure(_setter, **traffic_selector_policy) __props__.__dict__["traffic_selector_policy"] = traffic_selector_policy if type is None and not opts.urn: raise TypeError("Missing required property 'type'") diff --git a/sdk/python/pulumi_azure/network/virtual_network_gateway_nat_rule.py b/sdk/python/pulumi_azure/network/virtual_network_gateway_nat_rule.py index 1e8469efbb..05f1131aa0 100644 --- a/sdk/python/pulumi_azure/network/virtual_network_gateway_nat_rule.py +++ b/sdk/python/pulumi_azure/network/virtual_network_gateway_nat_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,18 +35,61 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Virtual Network Gateway Nat Rule. Changing this forces a new resource to be created. :param pulumi.Input[str] type: The type of the Virtual Network Gateway Nat Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "external_mappings", external_mappings) - pulumi.set(__self__, "internal_mappings", internal_mappings) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "virtual_network_gateway_id", virtual_network_gateway_id) + VirtualNetworkGatewayNatRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + external_mappings=external_mappings, + internal_mappings=internal_mappings, + resource_group_name=resource_group_name, + virtual_network_gateway_id=virtual_network_gateway_id, + ip_configuration_id=ip_configuration_id, + mode=mode, + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + external_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualNetworkGatewayNatRuleExternalMappingArgs']]]] = None, + internal_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualNetworkGatewayNatRuleInternalMappingArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + virtual_network_gateway_id: Optional[pulumi.Input[str]] = None, + ip_configuration_id: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if external_mappings is None and 'externalMappings' in kwargs: + external_mappings = kwargs['externalMappings'] + if external_mappings is None: + raise TypeError("Missing 'external_mappings' argument") + if internal_mappings is None and 'internalMappings' in kwargs: + internal_mappings = kwargs['internalMappings'] + if internal_mappings is None: + raise TypeError("Missing 'internal_mappings' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if virtual_network_gateway_id is None and 'virtualNetworkGatewayId' in kwargs: + virtual_network_gateway_id = kwargs['virtualNetworkGatewayId'] + if virtual_network_gateway_id is None: + raise TypeError("Missing 'virtual_network_gateway_id' argument") + if ip_configuration_id is None and 'ipConfigurationId' in kwargs: + ip_configuration_id = kwargs['ipConfigurationId'] + + _setter("external_mappings", external_mappings) + _setter("internal_mappings", internal_mappings) + _setter("resource_group_name", resource_group_name) + _setter("virtual_network_gateway_id", virtual_network_gateway_id) if ip_configuration_id is not None: - pulumi.set(__self__, "ip_configuration_id", ip_configuration_id) + _setter("ip_configuration_id", ip_configuration_id) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="externalMappings") @@ -167,22 +210,57 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of the Virtual Network Gateway Nat Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_network_gateway_id: The ID of the Virtual Network Gateway that this Virtual Network Gateway Nat Rule belongs to. Changing this forces a new resource to be created. """ + _VirtualNetworkGatewayNatRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + external_mappings=external_mappings, + internal_mappings=internal_mappings, + ip_configuration_id=ip_configuration_id, + mode=mode, + name=name, + resource_group_name=resource_group_name, + type=type, + virtual_network_gateway_id=virtual_network_gateway_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + external_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualNetworkGatewayNatRuleExternalMappingArgs']]]] = None, + internal_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualNetworkGatewayNatRuleInternalMappingArgs']]]] = None, + ip_configuration_id: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + virtual_network_gateway_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if external_mappings is None and 'externalMappings' in kwargs: + external_mappings = kwargs['externalMappings'] + if internal_mappings is None and 'internalMappings' in kwargs: + internal_mappings = kwargs['internalMappings'] + if ip_configuration_id is None and 'ipConfigurationId' in kwargs: + ip_configuration_id = kwargs['ipConfigurationId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if virtual_network_gateway_id is None and 'virtualNetworkGatewayId' in kwargs: + virtual_network_gateway_id = kwargs['virtualNetworkGatewayId'] + if external_mappings is not None: - pulumi.set(__self__, "external_mappings", external_mappings) + _setter("external_mappings", external_mappings) if internal_mappings is not None: - pulumi.set(__self__, "internal_mappings", internal_mappings) + _setter("internal_mappings", internal_mappings) if ip_configuration_id is not None: - pulumi.set(__self__, "ip_configuration_id", ip_configuration_id) + _setter("ip_configuration_id", ip_configuration_id) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if virtual_network_gateway_id is not None: - pulumi.set(__self__, "virtual_network_gateway_id", virtual_network_gateway_id) + _setter("virtual_network_gateway_id", virtual_network_gateway_id) @property @pulumi.getter(name="externalMappings") @@ -344,6 +422,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkGatewayNatRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/virtual_network_peering.py b/sdk/python/pulumi_azure/network/virtual_network_peering.py index e421f3c1ec..8a5d2eb6b6 100644 --- a/sdk/python/pulumi_azure/network/virtual_network_peering.py +++ b/sdk/python/pulumi_azure/network/virtual_network_peering.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VirtualNetworkPeeringArgs', 'VirtualNetworkPeering'] @@ -37,21 +37,68 @@ def __init__(__self__, *, > **NOTE:** `use_remote_gateways` must be set to `false` if using Global Virtual Network Peerings. """ - pulumi.set(__self__, "remote_virtual_network_id", remote_virtual_network_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "virtual_network_name", virtual_network_name) + VirtualNetworkPeeringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + remote_virtual_network_id=remote_virtual_network_id, + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + allow_forwarded_traffic=allow_forwarded_traffic, + allow_gateway_transit=allow_gateway_transit, + allow_virtual_network_access=allow_virtual_network_access, + name=name, + triggers=triggers, + use_remote_gateways=use_remote_gateways, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + remote_virtual_network_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + virtual_network_name: Optional[pulumi.Input[str]] = None, + allow_forwarded_traffic: Optional[pulumi.Input[bool]] = None, + allow_gateway_transit: Optional[pulumi.Input[bool]] = None, + allow_virtual_network_access: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + use_remote_gateways: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if remote_virtual_network_id is None and 'remoteVirtualNetworkId' in kwargs: + remote_virtual_network_id = kwargs['remoteVirtualNetworkId'] + if remote_virtual_network_id is None: + raise TypeError("Missing 'remote_virtual_network_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if virtual_network_name is None and 'virtualNetworkName' in kwargs: + virtual_network_name = kwargs['virtualNetworkName'] + if virtual_network_name is None: + raise TypeError("Missing 'virtual_network_name' argument") + if allow_forwarded_traffic is None and 'allowForwardedTraffic' in kwargs: + allow_forwarded_traffic = kwargs['allowForwardedTraffic'] + if allow_gateway_transit is None and 'allowGatewayTransit' in kwargs: + allow_gateway_transit = kwargs['allowGatewayTransit'] + if allow_virtual_network_access is None and 'allowVirtualNetworkAccess' in kwargs: + allow_virtual_network_access = kwargs['allowVirtualNetworkAccess'] + if use_remote_gateways is None and 'useRemoteGateways' in kwargs: + use_remote_gateways = kwargs['useRemoteGateways'] + + _setter("remote_virtual_network_id", remote_virtual_network_id) + _setter("resource_group_name", resource_group_name) + _setter("virtual_network_name", virtual_network_name) if allow_forwarded_traffic is not None: - pulumi.set(__self__, "allow_forwarded_traffic", allow_forwarded_traffic) + _setter("allow_forwarded_traffic", allow_forwarded_traffic) if allow_gateway_transit is not None: - pulumi.set(__self__, "allow_gateway_transit", allow_gateway_transit) + _setter("allow_gateway_transit", allow_gateway_transit) if allow_virtual_network_access is not None: - pulumi.set(__self__, "allow_virtual_network_access", allow_virtual_network_access) + _setter("allow_virtual_network_access", allow_virtual_network_access) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if triggers is not None: - pulumi.set(__self__, "triggers", triggers) + _setter("triggers", triggers) if use_remote_gateways is not None: - pulumi.set(__self__, "use_remote_gateways", use_remote_gateways) + _setter("use_remote_gateways", use_remote_gateways) @property @pulumi.getter(name="remoteVirtualNetworkId") @@ -190,24 +237,65 @@ def __init__(__self__, *, > **NOTE:** `use_remote_gateways` must be set to `false` if using Global Virtual Network Peerings. :param pulumi.Input[str] virtual_network_name: The name of the virtual network. Changing this forces a new resource to be created. """ + _VirtualNetworkPeeringState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_forwarded_traffic=allow_forwarded_traffic, + allow_gateway_transit=allow_gateway_transit, + allow_virtual_network_access=allow_virtual_network_access, + name=name, + remote_virtual_network_id=remote_virtual_network_id, + resource_group_name=resource_group_name, + triggers=triggers, + use_remote_gateways=use_remote_gateways, + virtual_network_name=virtual_network_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_forwarded_traffic: Optional[pulumi.Input[bool]] = None, + allow_gateway_transit: Optional[pulumi.Input[bool]] = None, + allow_virtual_network_access: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + remote_virtual_network_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + use_remote_gateways: Optional[pulumi.Input[bool]] = None, + virtual_network_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_forwarded_traffic is None and 'allowForwardedTraffic' in kwargs: + allow_forwarded_traffic = kwargs['allowForwardedTraffic'] + if allow_gateway_transit is None and 'allowGatewayTransit' in kwargs: + allow_gateway_transit = kwargs['allowGatewayTransit'] + if allow_virtual_network_access is None and 'allowVirtualNetworkAccess' in kwargs: + allow_virtual_network_access = kwargs['allowVirtualNetworkAccess'] + if remote_virtual_network_id is None and 'remoteVirtualNetworkId' in kwargs: + remote_virtual_network_id = kwargs['remoteVirtualNetworkId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if use_remote_gateways is None and 'useRemoteGateways' in kwargs: + use_remote_gateways = kwargs['useRemoteGateways'] + if virtual_network_name is None and 'virtualNetworkName' in kwargs: + virtual_network_name = kwargs['virtualNetworkName'] + if allow_forwarded_traffic is not None: - pulumi.set(__self__, "allow_forwarded_traffic", allow_forwarded_traffic) + _setter("allow_forwarded_traffic", allow_forwarded_traffic) if allow_gateway_transit is not None: - pulumi.set(__self__, "allow_gateway_transit", allow_gateway_transit) + _setter("allow_gateway_transit", allow_gateway_transit) if allow_virtual_network_access is not None: - pulumi.set(__self__, "allow_virtual_network_access", allow_virtual_network_access) + _setter("allow_virtual_network_access", allow_virtual_network_access) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if remote_virtual_network_id is not None: - pulumi.set(__self__, "remote_virtual_network_id", remote_virtual_network_id) + _setter("remote_virtual_network_id", remote_virtual_network_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if triggers is not None: - pulumi.set(__self__, "triggers", triggers) + _setter("triggers", triggers) if use_remote_gateways is not None: - pulumi.set(__self__, "use_remote_gateways", use_remote_gateways) + _setter("use_remote_gateways", use_remote_gateways) if virtual_network_name is not None: - pulumi.set(__self__, "virtual_network_name", virtual_network_name) + _setter("virtual_network_name", virtual_network_name) @property @pulumi.getter(name="allowForwardedTraffic") @@ -445,6 +533,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkPeeringArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/virtual_wan.py b/sdk/python/pulumi_azure/network/virtual_wan.py index df66300cec..d84951088c 100644 --- a/sdk/python/pulumi_azure/network/virtual_wan.py +++ b/sdk/python/pulumi_azure/network/virtual_wan.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VirtualWanArgs', 'VirtualWan'] @@ -33,21 +33,56 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Virtual WAN. :param pulumi.Input[str] type: Specifies the Virtual WAN type. Possible Values include: `Basic` and `Standard`. Defaults to `Standard`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + VirtualWanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + allow_branch_to_branch_traffic=allow_branch_to_branch_traffic, + disable_vpn_encryption=disable_vpn_encryption, + location=location, + name=name, + office365_local_breakout_category=office365_local_breakout_category, + tags=tags, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + allow_branch_to_branch_traffic: Optional[pulumi.Input[bool]] = None, + disable_vpn_encryption: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + office365_local_breakout_category: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if allow_branch_to_branch_traffic is None and 'allowBranchToBranchTraffic' in kwargs: + allow_branch_to_branch_traffic = kwargs['allowBranchToBranchTraffic'] + if disable_vpn_encryption is None and 'disableVpnEncryption' in kwargs: + disable_vpn_encryption = kwargs['disableVpnEncryption'] + if office365_local_breakout_category is None and 'office365LocalBreakoutCategory' in kwargs: + office365_local_breakout_category = kwargs['office365LocalBreakoutCategory'] + + _setter("resource_group_name", resource_group_name) if allow_branch_to_branch_traffic is not None: - pulumi.set(__self__, "allow_branch_to_branch_traffic", allow_branch_to_branch_traffic) + _setter("allow_branch_to_branch_traffic", allow_branch_to_branch_traffic) if disable_vpn_encryption is not None: - pulumi.set(__self__, "disable_vpn_encryption", disable_vpn_encryption) + _setter("disable_vpn_encryption", disable_vpn_encryption) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if office365_local_breakout_category is not None: - pulumi.set(__self__, "office365_local_breakout_category", office365_local_breakout_category) + _setter("office365_local_breakout_category", office365_local_breakout_category) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="resourceGroupName") @@ -168,22 +203,55 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Virtual WAN. :param pulumi.Input[str] type: Specifies the Virtual WAN type. Possible Values include: `Basic` and `Standard`. Defaults to `Standard`. """ + _VirtualWanState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_branch_to_branch_traffic=allow_branch_to_branch_traffic, + disable_vpn_encryption=disable_vpn_encryption, + location=location, + name=name, + office365_local_breakout_category=office365_local_breakout_category, + resource_group_name=resource_group_name, + tags=tags, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_branch_to_branch_traffic: Optional[pulumi.Input[bool]] = None, + disable_vpn_encryption: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + office365_local_breakout_category: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_branch_to_branch_traffic is None and 'allowBranchToBranchTraffic' in kwargs: + allow_branch_to_branch_traffic = kwargs['allowBranchToBranchTraffic'] + if disable_vpn_encryption is None and 'disableVpnEncryption' in kwargs: + disable_vpn_encryption = kwargs['disableVpnEncryption'] + if office365_local_breakout_category is None and 'office365LocalBreakoutCategory' in kwargs: + office365_local_breakout_category = kwargs['office365LocalBreakoutCategory'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if allow_branch_to_branch_traffic is not None: - pulumi.set(__self__, "allow_branch_to_branch_traffic", allow_branch_to_branch_traffic) + _setter("allow_branch_to_branch_traffic", allow_branch_to_branch_traffic) if disable_vpn_encryption is not None: - pulumi.set(__self__, "disable_vpn_encryption", disable_vpn_encryption) + _setter("disable_vpn_encryption", disable_vpn_encryption) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if office365_local_breakout_category is not None: - pulumi.set(__self__, "office365_local_breakout_category", office365_local_breakout_category) + _setter("office365_local_breakout_category", office365_local_breakout_category) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="allowBranchToBranchTraffic") @@ -369,6 +437,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualWanArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/vnp_gateway_nat_rule.py b/sdk/python/pulumi_azure/network/vnp_gateway_nat_rule.py index 0a4f26586e..c0c5c602c3 100644 --- a/sdk/python/pulumi_azure/network/vnp_gateway_nat_rule.py +++ b/sdk/python/pulumi_azure/network/vnp_gateway_nat_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,30 +43,77 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this VPN Gateway NAT Rule. Changing this forces a new resource to be created. :param pulumi.Input[str] type: The type of the VPN Gateway NAT Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "vpn_gateway_id", vpn_gateway_id) + VnpGatewayNatRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + vpn_gateway_id=vpn_gateway_id, + external_address_space_mappings=external_address_space_mappings, + external_mappings=external_mappings, + internal_address_space_mappings=internal_address_space_mappings, + internal_mappings=internal_mappings, + ip_configuration_id=ip_configuration_id, + mode=mode, + name=name, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + vpn_gateway_id: Optional[pulumi.Input[str]] = None, + external_address_space_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + external_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['VnpGatewayNatRuleExternalMappingArgs']]]] = None, + internal_address_space_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + internal_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['VnpGatewayNatRuleInternalMappingArgs']]]] = None, + ip_configuration_id: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if vpn_gateway_id is None and 'vpnGatewayId' in kwargs: + vpn_gateway_id = kwargs['vpnGatewayId'] + if vpn_gateway_id is None: + raise TypeError("Missing 'vpn_gateway_id' argument") + if external_address_space_mappings is None and 'externalAddressSpaceMappings' in kwargs: + external_address_space_mappings = kwargs['externalAddressSpaceMappings'] + if external_mappings is None and 'externalMappings' in kwargs: + external_mappings = kwargs['externalMappings'] + if internal_address_space_mappings is None and 'internalAddressSpaceMappings' in kwargs: + internal_address_space_mappings = kwargs['internalAddressSpaceMappings'] + if internal_mappings is None and 'internalMappings' in kwargs: + internal_mappings = kwargs['internalMappings'] + if ip_configuration_id is None and 'ipConfigurationId' in kwargs: + ip_configuration_id = kwargs['ipConfigurationId'] + + _setter("resource_group_name", resource_group_name) + _setter("vpn_gateway_id", vpn_gateway_id) if external_address_space_mappings is not None: warnings.warn("""`external_address_space_mappings` will be removed in favour of the property `external_mapping` in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""external_address_space_mappings is deprecated: `external_address_space_mappings` will be removed in favour of the property `external_mapping` in version 4.0 of the AzureRM Provider.""") if external_address_space_mappings is not None: - pulumi.set(__self__, "external_address_space_mappings", external_address_space_mappings) + _setter("external_address_space_mappings", external_address_space_mappings) if external_mappings is not None: - pulumi.set(__self__, "external_mappings", external_mappings) + _setter("external_mappings", external_mappings) if internal_address_space_mappings is not None: warnings.warn("""`internal_address_space_mappings` will be removed in favour of the property `internal_mapping` in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""internal_address_space_mappings is deprecated: `internal_address_space_mappings` will be removed in favour of the property `internal_mapping` in version 4.0 of the AzureRM Provider.""") if internal_address_space_mappings is not None: - pulumi.set(__self__, "internal_address_space_mappings", internal_address_space_mappings) + _setter("internal_address_space_mappings", internal_address_space_mappings) if internal_mappings is not None: - pulumi.set(__self__, "internal_mappings", internal_mappings) + _setter("internal_mappings", internal_mappings) if ip_configuration_id is not None: - pulumi.set(__self__, "ip_configuration_id", ip_configuration_id) + _setter("ip_configuration_id", ip_configuration_id) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="resourceGroupName") @@ -229,32 +276,75 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of the VPN Gateway NAT Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. :param pulumi.Input[str] vpn_gateway_id: The ID of the VPN Gateway that this VPN Gateway NAT Rule belongs to. Changing this forces a new resource to be created. """ + _VnpGatewayNatRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + external_address_space_mappings=external_address_space_mappings, + external_mappings=external_mappings, + internal_address_space_mappings=internal_address_space_mappings, + internal_mappings=internal_mappings, + ip_configuration_id=ip_configuration_id, + mode=mode, + name=name, + resource_group_name=resource_group_name, + type=type, + vpn_gateway_id=vpn_gateway_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + external_address_space_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + external_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['VnpGatewayNatRuleExternalMappingArgs']]]] = None, + internal_address_space_mappings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + internal_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['VnpGatewayNatRuleInternalMappingArgs']]]] = None, + ip_configuration_id: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + vpn_gateway_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if external_address_space_mappings is None and 'externalAddressSpaceMappings' in kwargs: + external_address_space_mappings = kwargs['externalAddressSpaceMappings'] + if external_mappings is None and 'externalMappings' in kwargs: + external_mappings = kwargs['externalMappings'] + if internal_address_space_mappings is None and 'internalAddressSpaceMappings' in kwargs: + internal_address_space_mappings = kwargs['internalAddressSpaceMappings'] + if internal_mappings is None and 'internalMappings' in kwargs: + internal_mappings = kwargs['internalMappings'] + if ip_configuration_id is None and 'ipConfigurationId' in kwargs: + ip_configuration_id = kwargs['ipConfigurationId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if vpn_gateway_id is None and 'vpnGatewayId' in kwargs: + vpn_gateway_id = kwargs['vpnGatewayId'] + if external_address_space_mappings is not None: warnings.warn("""`external_address_space_mappings` will be removed in favour of the property `external_mapping` in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""external_address_space_mappings is deprecated: `external_address_space_mappings` will be removed in favour of the property `external_mapping` in version 4.0 of the AzureRM Provider.""") if external_address_space_mappings is not None: - pulumi.set(__self__, "external_address_space_mappings", external_address_space_mappings) + _setter("external_address_space_mappings", external_address_space_mappings) if external_mappings is not None: - pulumi.set(__self__, "external_mappings", external_mappings) + _setter("external_mappings", external_mappings) if internal_address_space_mappings is not None: warnings.warn("""`internal_address_space_mappings` will be removed in favour of the property `internal_mapping` in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""internal_address_space_mappings is deprecated: `internal_address_space_mappings` will be removed in favour of the property `internal_mapping` in version 4.0 of the AzureRM Provider.""") if internal_address_space_mappings is not None: - pulumi.set(__self__, "internal_address_space_mappings", internal_address_space_mappings) + _setter("internal_address_space_mappings", internal_address_space_mappings) if internal_mappings is not None: - pulumi.set(__self__, "internal_mappings", internal_mappings) + _setter("internal_mappings", internal_mappings) if ip_configuration_id is not None: - pulumi.set(__self__, "ip_configuration_id", ip_configuration_id) + _setter("ip_configuration_id", ip_configuration_id) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if vpn_gateway_id is not None: - pulumi.set(__self__, "vpn_gateway_id", vpn_gateway_id) + _setter("vpn_gateway_id", vpn_gateway_id) @property @pulumi.getter(name="externalAddressSpaceMappings") @@ -518,6 +608,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VnpGatewayNatRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/vpn_gateway.py b/sdk/python/pulumi_azure/network/vpn_gateway.py index 9142ceb381..5ed542d935 100644 --- a/sdk/python/pulumi_azure/network/vpn_gateway.py +++ b/sdk/python/pulumi_azure/network/vpn_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,22 +37,65 @@ def __init__(__self__, *, :param pulumi.Input[int] scale_unit: The Scale Unit for this VPN Gateway. Defaults to `1`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the VPN Gateway. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + VpnGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + virtual_hub_id=virtual_hub_id, + bgp_route_translation_for_nat_enabled=bgp_route_translation_for_nat_enabled, + bgp_settings=bgp_settings, + location=location, + name=name, + routing_preference=routing_preference, + scale_unit=scale_unit, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + bgp_route_translation_for_nat_enabled: Optional[pulumi.Input[bool]] = None, + bgp_settings: Optional[pulumi.Input['VpnGatewayBgpSettingsArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + routing_preference: Optional[pulumi.Input[str]] = None, + scale_unit: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + if bgp_route_translation_for_nat_enabled is None and 'bgpRouteTranslationForNatEnabled' in kwargs: + bgp_route_translation_for_nat_enabled = kwargs['bgpRouteTranslationForNatEnabled'] + if bgp_settings is None and 'bgpSettings' in kwargs: + bgp_settings = kwargs['bgpSettings'] + if routing_preference is None and 'routingPreference' in kwargs: + routing_preference = kwargs['routingPreference'] + if scale_unit is None and 'scaleUnit' in kwargs: + scale_unit = kwargs['scaleUnit'] + + _setter("resource_group_name", resource_group_name) + _setter("virtual_hub_id", virtual_hub_id) if bgp_route_translation_for_nat_enabled is not None: - pulumi.set(__self__, "bgp_route_translation_for_nat_enabled", bgp_route_translation_for_nat_enabled) + _setter("bgp_route_translation_for_nat_enabled", bgp_route_translation_for_nat_enabled) if bgp_settings is not None: - pulumi.set(__self__, "bgp_settings", bgp_settings) + _setter("bgp_settings", bgp_settings) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if routing_preference is not None: - pulumi.set(__self__, "routing_preference", routing_preference) + _setter("routing_preference", routing_preference) if scale_unit is not None: - pulumi.set(__self__, "scale_unit", scale_unit) + _setter("scale_unit", scale_unit) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -187,24 +230,63 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the VPN Gateway. :param pulumi.Input[str] virtual_hub_id: The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created. """ + _VpnGatewayState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bgp_route_translation_for_nat_enabled=bgp_route_translation_for_nat_enabled, + bgp_settings=bgp_settings, + location=location, + name=name, + resource_group_name=resource_group_name, + routing_preference=routing_preference, + scale_unit=scale_unit, + tags=tags, + virtual_hub_id=virtual_hub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bgp_route_translation_for_nat_enabled: Optional[pulumi.Input[bool]] = None, + bgp_settings: Optional[pulumi.Input['VpnGatewayBgpSettingsArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + routing_preference: Optional[pulumi.Input[str]] = None, + scale_unit: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bgp_route_translation_for_nat_enabled is None and 'bgpRouteTranslationForNatEnabled' in kwargs: + bgp_route_translation_for_nat_enabled = kwargs['bgpRouteTranslationForNatEnabled'] + if bgp_settings is None and 'bgpSettings' in kwargs: + bgp_settings = kwargs['bgpSettings'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if routing_preference is None and 'routingPreference' in kwargs: + routing_preference = kwargs['routingPreference'] + if scale_unit is None and 'scaleUnit' in kwargs: + scale_unit = kwargs['scaleUnit'] + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if bgp_route_translation_for_nat_enabled is not None: - pulumi.set(__self__, "bgp_route_translation_for_nat_enabled", bgp_route_translation_for_nat_enabled) + _setter("bgp_route_translation_for_nat_enabled", bgp_route_translation_for_nat_enabled) if bgp_settings is not None: - pulumi.set(__self__, "bgp_settings", bgp_settings) + _setter("bgp_settings", bgp_settings) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if routing_preference is not None: - pulumi.set(__self__, "routing_preference", routing_preference) + _setter("routing_preference", routing_preference) if scale_unit is not None: - pulumi.set(__self__, "scale_unit", scale_unit) + _setter("scale_unit", scale_unit) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_hub_id is not None: - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + _setter("virtual_hub_id", virtual_hub_id) @property @pulumi.getter(name="bgpRouteTranslationForNatEnabled") @@ -430,6 +512,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VpnGatewayArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -454,6 +540,11 @@ def _internal_init(__self__, __props__ = VpnGatewayArgs.__new__(VpnGatewayArgs) __props__.__dict__["bgp_route_translation_for_nat_enabled"] = bgp_route_translation_for_nat_enabled + if bgp_settings is not None and not isinstance(bgp_settings, VpnGatewayBgpSettingsArgs): + bgp_settings = bgp_settings or {} + def _setter(key, value): + bgp_settings[key] = value + VpnGatewayBgpSettingsArgs._configure(_setter, **bgp_settings) __props__.__dict__["bgp_settings"] = bgp_settings __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/network/vpn_gateway_connection.py b/sdk/python/pulumi_azure/network/vpn_gateway_connection.py index 6c4aedc2bf..65829644c4 100644 --- a/sdk/python/pulumi_azure/network/vpn_gateway_connection.py +++ b/sdk/python/pulumi_azure/network/vpn_gateway_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,56 @@ def __init__(__self__, *, :param pulumi.Input['VpnGatewayConnectionRoutingArgs'] routing: A `routing` block as defined below. If this is not specified, there will be a default route table created implicitly. :param pulumi.Input[Sequence[pulumi.Input['VpnGatewayConnectionTrafficSelectorPolicyArgs']]] traffic_selector_policies: One or more `traffic_selector_policy` blocks as defined below. """ - pulumi.set(__self__, "remote_vpn_site_id", remote_vpn_site_id) - pulumi.set(__self__, "vpn_gateway_id", vpn_gateway_id) - pulumi.set(__self__, "vpn_links", vpn_links) + VpnGatewayConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + remote_vpn_site_id=remote_vpn_site_id, + vpn_gateway_id=vpn_gateway_id, + vpn_links=vpn_links, + internet_security_enabled=internet_security_enabled, + name=name, + routing=routing, + traffic_selector_policies=traffic_selector_policies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + remote_vpn_site_id: Optional[pulumi.Input[str]] = None, + vpn_gateway_id: Optional[pulumi.Input[str]] = None, + vpn_links: Optional[pulumi.Input[Sequence[pulumi.Input['VpnGatewayConnectionVpnLinkArgs']]]] = None, + internet_security_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + routing: Optional[pulumi.Input['VpnGatewayConnectionRoutingArgs']] = None, + traffic_selector_policies: Optional[pulumi.Input[Sequence[pulumi.Input['VpnGatewayConnectionTrafficSelectorPolicyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if remote_vpn_site_id is None and 'remoteVpnSiteId' in kwargs: + remote_vpn_site_id = kwargs['remoteVpnSiteId'] + if remote_vpn_site_id is None: + raise TypeError("Missing 'remote_vpn_site_id' argument") + if vpn_gateway_id is None and 'vpnGatewayId' in kwargs: + vpn_gateway_id = kwargs['vpnGatewayId'] + if vpn_gateway_id is None: + raise TypeError("Missing 'vpn_gateway_id' argument") + if vpn_links is None and 'vpnLinks' in kwargs: + vpn_links = kwargs['vpnLinks'] + if vpn_links is None: + raise TypeError("Missing 'vpn_links' argument") + if internet_security_enabled is None and 'internetSecurityEnabled' in kwargs: + internet_security_enabled = kwargs['internetSecurityEnabled'] + if traffic_selector_policies is None and 'trafficSelectorPolicies' in kwargs: + traffic_selector_policies = kwargs['trafficSelectorPolicies'] + + _setter("remote_vpn_site_id", remote_vpn_site_id) + _setter("vpn_gateway_id", vpn_gateway_id) + _setter("vpn_links", vpn_links) if internet_security_enabled is not None: - pulumi.set(__self__, "internet_security_enabled", internet_security_enabled) + _setter("internet_security_enabled", internet_security_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if routing is not None: - pulumi.set(__self__, "routing", routing) + _setter("routing", routing) if traffic_selector_policies is not None: - pulumi.set(__self__, "traffic_selector_policies", traffic_selector_policies) + _setter("traffic_selector_policies", traffic_selector_policies) @property @pulumi.getter(name="remoteVpnSiteId") @@ -150,20 +189,53 @@ def __init__(__self__, *, :param pulumi.Input[str] vpn_gateway_id: The ID of the VPN Gateway that this VPN Gateway Connection belongs to. Changing this forces a new VPN Gateway Connection to be created. :param pulumi.Input[Sequence[pulumi.Input['VpnGatewayConnectionVpnLinkArgs']]] vpn_links: One or more `vpn_link` blocks as defined below. """ + _VpnGatewayConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + internet_security_enabled=internet_security_enabled, + name=name, + remote_vpn_site_id=remote_vpn_site_id, + routing=routing, + traffic_selector_policies=traffic_selector_policies, + vpn_gateway_id=vpn_gateway_id, + vpn_links=vpn_links, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + internet_security_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + remote_vpn_site_id: Optional[pulumi.Input[str]] = None, + routing: Optional[pulumi.Input['VpnGatewayConnectionRoutingArgs']] = None, + traffic_selector_policies: Optional[pulumi.Input[Sequence[pulumi.Input['VpnGatewayConnectionTrafficSelectorPolicyArgs']]]] = None, + vpn_gateway_id: Optional[pulumi.Input[str]] = None, + vpn_links: Optional[pulumi.Input[Sequence[pulumi.Input['VpnGatewayConnectionVpnLinkArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if internet_security_enabled is None and 'internetSecurityEnabled' in kwargs: + internet_security_enabled = kwargs['internetSecurityEnabled'] + if remote_vpn_site_id is None and 'remoteVpnSiteId' in kwargs: + remote_vpn_site_id = kwargs['remoteVpnSiteId'] + if traffic_selector_policies is None and 'trafficSelectorPolicies' in kwargs: + traffic_selector_policies = kwargs['trafficSelectorPolicies'] + if vpn_gateway_id is None and 'vpnGatewayId' in kwargs: + vpn_gateway_id = kwargs['vpnGatewayId'] + if vpn_links is None and 'vpnLinks' in kwargs: + vpn_links = kwargs['vpnLinks'] + if internet_security_enabled is not None: - pulumi.set(__self__, "internet_security_enabled", internet_security_enabled) + _setter("internet_security_enabled", internet_security_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if remote_vpn_site_id is not None: - pulumi.set(__self__, "remote_vpn_site_id", remote_vpn_site_id) + _setter("remote_vpn_site_id", remote_vpn_site_id) if routing is not None: - pulumi.set(__self__, "routing", routing) + _setter("routing", routing) if traffic_selector_policies is not None: - pulumi.set(__self__, "traffic_selector_policies", traffic_selector_policies) + _setter("traffic_selector_policies", traffic_selector_policies) if vpn_gateway_id is not None: - pulumi.set(__self__, "vpn_gateway_id", vpn_gateway_id) + _setter("vpn_gateway_id", vpn_gateway_id) if vpn_links is not None: - pulumi.set(__self__, "vpn_links", vpn_links) + _setter("vpn_links", vpn_links) @property @pulumi.getter(name="internetSecurityEnabled") @@ -407,6 +479,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VpnGatewayConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -433,6 +509,11 @@ def _internal_init(__self__, if remote_vpn_site_id is None and not opts.urn: raise TypeError("Missing required property 'remote_vpn_site_id'") __props__.__dict__["remote_vpn_site_id"] = remote_vpn_site_id + if routing is not None and not isinstance(routing, VpnGatewayConnectionRoutingArgs): + routing = routing or {} + def _setter(key, value): + routing[key] = value + VpnGatewayConnectionRoutingArgs._configure(_setter, **routing) __props__.__dict__["routing"] = routing __props__.__dict__["traffic_selector_policies"] = traffic_selector_policies if vpn_gateway_id is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/network/vpn_server_configuration.py b/sdk/python/pulumi_azure/network/vpn_server_configuration.py index c4b29b8e4c..b5b3e3b239 100644 --- a/sdk/python/pulumi_azure/network/vpn_server_configuration.py +++ b/sdk/python/pulumi_azure/network/vpn_server_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,26 +41,75 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[Sequence[pulumi.Input[str]]] vpn_protocols: A list of VPN Protocols to use for this Server Configuration. Possible values are `IkeV2` and `OpenVPN`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "vpn_authentication_types", vpn_authentication_types) + VpnServerConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + vpn_authentication_types=vpn_authentication_types, + azure_active_directory_authentications=azure_active_directory_authentications, + client_revoked_certificates=client_revoked_certificates, + client_root_certificates=client_root_certificates, + ipsec_policy=ipsec_policy, + location=location, + name=name, + radius=radius, + tags=tags, + vpn_protocols=vpn_protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + vpn_authentication_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + azure_active_directory_authentications: Optional[pulumi.Input[Sequence[pulumi.Input['VpnServerConfigurationAzureActiveDirectoryAuthenticationArgs']]]] = None, + client_revoked_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['VpnServerConfigurationClientRevokedCertificateArgs']]]] = None, + client_root_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['VpnServerConfigurationClientRootCertificateArgs']]]] = None, + ipsec_policy: Optional[pulumi.Input['VpnServerConfigurationIpsecPolicyArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + radius: Optional[pulumi.Input['VpnServerConfigurationRadiusArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + vpn_protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if vpn_authentication_types is None and 'vpnAuthenticationTypes' in kwargs: + vpn_authentication_types = kwargs['vpnAuthenticationTypes'] + if vpn_authentication_types is None: + raise TypeError("Missing 'vpn_authentication_types' argument") + if azure_active_directory_authentications is None and 'azureActiveDirectoryAuthentications' in kwargs: + azure_active_directory_authentications = kwargs['azureActiveDirectoryAuthentications'] + if client_revoked_certificates is None and 'clientRevokedCertificates' in kwargs: + client_revoked_certificates = kwargs['clientRevokedCertificates'] + if client_root_certificates is None and 'clientRootCertificates' in kwargs: + client_root_certificates = kwargs['clientRootCertificates'] + if ipsec_policy is None and 'ipsecPolicy' in kwargs: + ipsec_policy = kwargs['ipsecPolicy'] + if vpn_protocols is None and 'vpnProtocols' in kwargs: + vpn_protocols = kwargs['vpnProtocols'] + + _setter("resource_group_name", resource_group_name) + _setter("vpn_authentication_types", vpn_authentication_types) if azure_active_directory_authentications is not None: - pulumi.set(__self__, "azure_active_directory_authentications", azure_active_directory_authentications) + _setter("azure_active_directory_authentications", azure_active_directory_authentications) if client_revoked_certificates is not None: - pulumi.set(__self__, "client_revoked_certificates", client_revoked_certificates) + _setter("client_revoked_certificates", client_revoked_certificates) if client_root_certificates is not None: - pulumi.set(__self__, "client_root_certificates", client_root_certificates) + _setter("client_root_certificates", client_root_certificates) if ipsec_policy is not None: - pulumi.set(__self__, "ipsec_policy", ipsec_policy) + _setter("ipsec_policy", ipsec_policy) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if radius is not None: - pulumi.set(__self__, "radius", radius) + _setter("radius", radius) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if vpn_protocols is not None: - pulumi.set(__self__, "vpn_protocols", vpn_protocols) + _setter("vpn_protocols", vpn_protocols) @property @pulumi.getter(name="resourceGroupName") @@ -223,28 +272,73 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] vpn_authentication_types: A list of Authentication Types applicable for this VPN Server Configuration. Possible values are `AAD` (Azure Active Directory), `Certificate` and `Radius`. :param pulumi.Input[Sequence[pulumi.Input[str]]] vpn_protocols: A list of VPN Protocols to use for this Server Configuration. Possible values are `IkeV2` and `OpenVPN`. """ + _VpnServerConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_active_directory_authentications=azure_active_directory_authentications, + client_revoked_certificates=client_revoked_certificates, + client_root_certificates=client_root_certificates, + ipsec_policy=ipsec_policy, + location=location, + name=name, + radius=radius, + resource_group_name=resource_group_name, + tags=tags, + vpn_authentication_types=vpn_authentication_types, + vpn_protocols=vpn_protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_active_directory_authentications: Optional[pulumi.Input[Sequence[pulumi.Input['VpnServerConfigurationAzureActiveDirectoryAuthenticationArgs']]]] = None, + client_revoked_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['VpnServerConfigurationClientRevokedCertificateArgs']]]] = None, + client_root_certificates: Optional[pulumi.Input[Sequence[pulumi.Input['VpnServerConfigurationClientRootCertificateArgs']]]] = None, + ipsec_policy: Optional[pulumi.Input['VpnServerConfigurationIpsecPolicyArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + radius: Optional[pulumi.Input['VpnServerConfigurationRadiusArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + vpn_authentication_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + vpn_protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_active_directory_authentications is None and 'azureActiveDirectoryAuthentications' in kwargs: + azure_active_directory_authentications = kwargs['azureActiveDirectoryAuthentications'] + if client_revoked_certificates is None and 'clientRevokedCertificates' in kwargs: + client_revoked_certificates = kwargs['clientRevokedCertificates'] + if client_root_certificates is None and 'clientRootCertificates' in kwargs: + client_root_certificates = kwargs['clientRootCertificates'] + if ipsec_policy is None and 'ipsecPolicy' in kwargs: + ipsec_policy = kwargs['ipsecPolicy'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if vpn_authentication_types is None and 'vpnAuthenticationTypes' in kwargs: + vpn_authentication_types = kwargs['vpnAuthenticationTypes'] + if vpn_protocols is None and 'vpnProtocols' in kwargs: + vpn_protocols = kwargs['vpnProtocols'] + if azure_active_directory_authentications is not None: - pulumi.set(__self__, "azure_active_directory_authentications", azure_active_directory_authentications) + _setter("azure_active_directory_authentications", azure_active_directory_authentications) if client_revoked_certificates is not None: - pulumi.set(__self__, "client_revoked_certificates", client_revoked_certificates) + _setter("client_revoked_certificates", client_revoked_certificates) if client_root_certificates is not None: - pulumi.set(__self__, "client_root_certificates", client_root_certificates) + _setter("client_root_certificates", client_root_certificates) if ipsec_policy is not None: - pulumi.set(__self__, "ipsec_policy", ipsec_policy) + _setter("ipsec_policy", ipsec_policy) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if radius is not None: - pulumi.set(__self__, "radius", radius) + _setter("radius", radius) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if vpn_authentication_types is not None: - pulumi.set(__self__, "vpn_authentication_types", vpn_authentication_types) + _setter("vpn_authentication_types", vpn_authentication_types) if vpn_protocols is not None: - pulumi.set(__self__, "vpn_protocols", vpn_protocols) + _setter("vpn_protocols", vpn_protocols) @property @pulumi.getter(name="azureActiveDirectoryAuthentications") @@ -522,6 +616,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VpnServerConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -550,9 +648,19 @@ def _internal_init(__self__, __props__.__dict__["azure_active_directory_authentications"] = azure_active_directory_authentications __props__.__dict__["client_revoked_certificates"] = client_revoked_certificates __props__.__dict__["client_root_certificates"] = client_root_certificates + if ipsec_policy is not None and not isinstance(ipsec_policy, VpnServerConfigurationIpsecPolicyArgs): + ipsec_policy = ipsec_policy or {} + def _setter(key, value): + ipsec_policy[key] = value + VpnServerConfigurationIpsecPolicyArgs._configure(_setter, **ipsec_policy) __props__.__dict__["ipsec_policy"] = ipsec_policy __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if radius is not None and not isinstance(radius, VpnServerConfigurationRadiusArgs): + radius = radius or {} + def _setter(key, value): + radius[key] = value + VpnServerConfigurationRadiusArgs._configure(_setter, **radius) __props__.__dict__["radius"] = radius if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") diff --git a/sdk/python/pulumi_azure/network/vpn_server_configuration_policy_group.py b/sdk/python/pulumi_azure/network/vpn_server_configuration_policy_group.py index 1d6d5ae8ad..8aabc99e0b 100644 --- a/sdk/python/pulumi_azure/network/vpn_server_configuration_policy_group.py +++ b/sdk/python/pulumi_azure/network/vpn_server_configuration_policy_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Name which should be used for this VPN Server Configuration Policy Group. Changing this forces a new resource to be created. :param pulumi.Input[int] priority: The priority of this VPN Server Configuration Policy Group. Defaults to `0`. """ - pulumi.set(__self__, "policies", policies) - pulumi.set(__self__, "vpn_server_configuration_id", vpn_server_configuration_id) + VpnServerConfigurationPolicyGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policies=policies, + vpn_server_configuration_id=vpn_server_configuration_id, + is_default=is_default, + name=name, + priority=priority, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policies: Optional[pulumi.Input[Sequence[pulumi.Input['VpnServerConfigurationPolicyGroupPolicyArgs']]]] = None, + vpn_server_configuration_id: Optional[pulumi.Input[str]] = None, + is_default: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + priority: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policies is None: + raise TypeError("Missing 'policies' argument") + if vpn_server_configuration_id is None and 'vpnServerConfigurationId' in kwargs: + vpn_server_configuration_id = kwargs['vpnServerConfigurationId'] + if vpn_server_configuration_id is None: + raise TypeError("Missing 'vpn_server_configuration_id' argument") + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + + _setter("policies", policies) + _setter("vpn_server_configuration_id", vpn_server_configuration_id) if is_default is not None: - pulumi.set(__self__, "is_default", is_default) + _setter("is_default", is_default) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) @property @pulumi.getter @@ -115,16 +142,39 @@ def __init__(__self__, *, :param pulumi.Input[int] priority: The priority of this VPN Server Configuration Policy Group. Defaults to `0`. :param pulumi.Input[str] vpn_server_configuration_id: The ID of the VPN Server Configuration that the VPN Server Configuration Policy Group belongs to. Changing this forces a new resource to be created. """ + _VpnServerConfigurationPolicyGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_default=is_default, + name=name, + policies=policies, + priority=priority, + vpn_server_configuration_id=vpn_server_configuration_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_default: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + policies: Optional[pulumi.Input[Sequence[pulumi.Input['VpnServerConfigurationPolicyGroupPolicyArgs']]]] = None, + priority: Optional[pulumi.Input[int]] = None, + vpn_server_configuration_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_default is None and 'isDefault' in kwargs: + is_default = kwargs['isDefault'] + if vpn_server_configuration_id is None and 'vpnServerConfigurationId' in kwargs: + vpn_server_configuration_id = kwargs['vpnServerConfigurationId'] + if is_default is not None: - pulumi.set(__self__, "is_default", is_default) + _setter("is_default", is_default) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policies is not None: - pulumi.set(__self__, "policies", policies) + _setter("policies", policies) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if vpn_server_configuration_id is not None: - pulumi.set(__self__, "vpn_server_configuration_id", vpn_server_configuration_id) + _setter("vpn_server_configuration_id", vpn_server_configuration_id) @property @pulumi.getter(name="isDefault") @@ -298,6 +348,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VpnServerConfigurationPolicyGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/network/vpn_site.py b/sdk/python/pulumi_azure/network/vpn_site.py index 61afc6cfec..e30fd5434e 100644 --- a/sdk/python/pulumi_azure/network/vpn_site.py +++ b/sdk/python/pulumi_azure/network/vpn_site.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,24 +41,69 @@ def __init__(__self__, *, :param pulumi.Input['VpnSiteO365PolicyArgs'] o365_policy: An `o365_policy` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the VPN Site. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "virtual_wan_id", virtual_wan_id) + VpnSiteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + virtual_wan_id=virtual_wan_id, + address_cidrs=address_cidrs, + device_model=device_model, + device_vendor=device_vendor, + links=links, + location=location, + name=name, + o365_policy=o365_policy, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + virtual_wan_id: Optional[pulumi.Input[str]] = None, + address_cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + device_model: Optional[pulumi.Input[str]] = None, + device_vendor: Optional[pulumi.Input[str]] = None, + links: Optional[pulumi.Input[Sequence[pulumi.Input['VpnSiteLinkArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + o365_policy: Optional[pulumi.Input['VpnSiteO365PolicyArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if virtual_wan_id is None and 'virtualWanId' in kwargs: + virtual_wan_id = kwargs['virtualWanId'] + if virtual_wan_id is None: + raise TypeError("Missing 'virtual_wan_id' argument") + if address_cidrs is None and 'addressCidrs' in kwargs: + address_cidrs = kwargs['addressCidrs'] + if device_model is None and 'deviceModel' in kwargs: + device_model = kwargs['deviceModel'] + if device_vendor is None and 'deviceVendor' in kwargs: + device_vendor = kwargs['deviceVendor'] + if o365_policy is None and 'o365Policy' in kwargs: + o365_policy = kwargs['o365Policy'] + + _setter("resource_group_name", resource_group_name) + _setter("virtual_wan_id", virtual_wan_id) if address_cidrs is not None: - pulumi.set(__self__, "address_cidrs", address_cidrs) + _setter("address_cidrs", address_cidrs) if device_model is not None: - pulumi.set(__self__, "device_model", device_model) + _setter("device_model", device_model) if device_vendor is not None: - pulumi.set(__self__, "device_vendor", device_vendor) + _setter("device_vendor", device_vendor) if links is not None: - pulumi.set(__self__, "links", links) + _setter("links", links) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if o365_policy is not None: - pulumi.set(__self__, "o365_policy", o365_policy) + _setter("o365_policy", o365_policy) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -211,26 +256,67 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the VPN Site. :param pulumi.Input[str] virtual_wan_id: The ID of the Virtual Wan where this VPN site resides in. Changing this forces a new VPN Site to be created. """ + _VpnSiteState._configure( + lambda key, value: pulumi.set(__self__, key, value), + address_cidrs=address_cidrs, + device_model=device_model, + device_vendor=device_vendor, + links=links, + location=location, + name=name, + o365_policy=o365_policy, + resource_group_name=resource_group_name, + tags=tags, + virtual_wan_id=virtual_wan_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address_cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + device_model: Optional[pulumi.Input[str]] = None, + device_vendor: Optional[pulumi.Input[str]] = None, + links: Optional[pulumi.Input[Sequence[pulumi.Input['VpnSiteLinkArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + o365_policy: Optional[pulumi.Input['VpnSiteO365PolicyArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_wan_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if address_cidrs is None and 'addressCidrs' in kwargs: + address_cidrs = kwargs['addressCidrs'] + if device_model is None and 'deviceModel' in kwargs: + device_model = kwargs['deviceModel'] + if device_vendor is None and 'deviceVendor' in kwargs: + device_vendor = kwargs['deviceVendor'] + if o365_policy is None and 'o365Policy' in kwargs: + o365_policy = kwargs['o365Policy'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if virtual_wan_id is None and 'virtualWanId' in kwargs: + virtual_wan_id = kwargs['virtualWanId'] + if address_cidrs is not None: - pulumi.set(__self__, "address_cidrs", address_cidrs) + _setter("address_cidrs", address_cidrs) if device_model is not None: - pulumi.set(__self__, "device_model", device_model) + _setter("device_model", device_model) if device_vendor is not None: - pulumi.set(__self__, "device_vendor", device_vendor) + _setter("device_vendor", device_vendor) if links is not None: - pulumi.set(__self__, "links", links) + _setter("links", links) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if o365_policy is not None: - pulumi.set(__self__, "o365_policy", o365_policy) + _setter("o365_policy", o365_policy) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_wan_id is not None: - pulumi.set(__self__, "virtual_wan_id", virtual_wan_id) + _setter("virtual_wan_id", virtual_wan_id) @property @pulumi.getter(name="addressCidrs") @@ -466,6 +552,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VpnSiteArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -496,6 +586,11 @@ def _internal_init(__self__, __props__.__dict__["links"] = links __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if o365_policy is not None and not isinstance(o365_policy, VpnSiteO365PolicyArgs): + o365_policy = o365_policy or {} + def _setter(key, value): + o365_policy[key] = value + VpnSiteO365PolicyArgs._configure(_setter, **o365_policy) __props__.__dict__["o365_policy"] = o365_policy if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") diff --git a/sdk/python/pulumi_azure/networkfunction/_inputs.py b/sdk/python/pulumi_azure/networkfunction/_inputs.py index e4f1c42698..43bb7b8270 100644 --- a/sdk/python/pulumi_azure/networkfunction/_inputs.py +++ b/sdk/python/pulumi_azure/networkfunction/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -21,7 +21,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] destination_types: A list of emission destination types. The only possible value is `AzureMonitor`. Changing this forces a new Network Function Collector Policy to be created. """ - pulumi.set(__self__, "destination_types", destination_types) + CollectorPolicyIpfxEmissionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_types=destination_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_types: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_types is None and 'destinationTypes' in kwargs: + destination_types = kwargs['destinationTypes'] + if destination_types is None: + raise TypeError("Missing 'destination_types' argument") + + _setter("destination_types", destination_types) @property @pulumi.getter(name="destinationTypes") @@ -43,7 +58,22 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] source_resource_ids: A list of ingestion source resource IDs. Changing this forces a new Network Function Collector Policy to be created. """ - pulumi.set(__self__, "source_resource_ids", source_resource_ids) + CollectorPolicyIpfxIngestionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + source_resource_ids=source_resource_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + source_resource_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if source_resource_ids is None and 'sourceResourceIds' in kwargs: + source_resource_ids = kwargs['sourceResourceIds'] + if source_resource_ids is None: + raise TypeError("Missing 'source_resource_ids' argument") + + _setter("source_resource_ids", source_resource_ids) @property @pulumi.getter(name="sourceResourceIds") diff --git a/sdk/python/pulumi_azure/networkfunction/azure_traffic_collector.py b/sdk/python/pulumi_azure/networkfunction/azure_traffic_collector.py index cc82019e05..28f22ef7b6 100644 --- a/sdk/python/pulumi_azure/networkfunction/azure_traffic_collector.py +++ b/sdk/python/pulumi_azure/networkfunction/azure_traffic_collector.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AzureTrafficCollectorArgs', 'AzureTrafficCollector'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Network Function Azure Traffic Collector. Changing this forces a new Network Function Azure Traffic Collector to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Network Function Azure Traffic Collector. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + AzureTrafficCollectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -100,18 +121,45 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Network Function Azure Traffic Collector. :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_hub_ids: The Resource ID of virtual hub. """ + _AzureTrafficCollectorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + collector_policy_ids=collector_policy_ids, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + virtual_hub_ids=virtual_hub_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + collector_policy_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_hub_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if collector_policy_ids is None and 'collectorPolicyIds' in kwargs: + collector_policy_ids = kwargs['collectorPolicyIds'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if virtual_hub_ids is None and 'virtualHubIds' in kwargs: + virtual_hub_ids = kwargs['virtualHubIds'] + if collector_policy_ids is not None: - pulumi.set(__self__, "collector_policy_ids", collector_policy_ids) + _setter("collector_policy_ids", collector_policy_ids) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_hub_ids is not None: - pulumi.set(__self__, "virtual_hub_ids", virtual_hub_ids) + _setter("virtual_hub_ids", virtual_hub_ids) @property @pulumi.getter(name="collectorPolicyIds") @@ -271,6 +319,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AzureTrafficCollectorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/networkfunction/collector_policy.py b/sdk/python/pulumi_azure/networkfunction/collector_policy.py index 7a07eaf746..edca1202fb 100644 --- a/sdk/python/pulumi_azure/networkfunction/collector_policy.py +++ b/sdk/python/pulumi_azure/networkfunction/collector_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,15 +31,48 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Network Function Collector Policy. """ - pulumi.set(__self__, "ipfx_emission", ipfx_emission) - pulumi.set(__self__, "ipfx_ingestion", ipfx_ingestion) - pulumi.set(__self__, "traffic_collector_id", traffic_collector_id) + CollectorPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ipfx_emission=ipfx_emission, + ipfx_ingestion=ipfx_ingestion, + traffic_collector_id=traffic_collector_id, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ipfx_emission: Optional[pulumi.Input['CollectorPolicyIpfxEmissionArgs']] = None, + ipfx_ingestion: Optional[pulumi.Input['CollectorPolicyIpfxIngestionArgs']] = None, + traffic_collector_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ipfx_emission is None and 'ipfxEmission' in kwargs: + ipfx_emission = kwargs['ipfxEmission'] + if ipfx_emission is None: + raise TypeError("Missing 'ipfx_emission' argument") + if ipfx_ingestion is None and 'ipfxIngestion' in kwargs: + ipfx_ingestion = kwargs['ipfxIngestion'] + if ipfx_ingestion is None: + raise TypeError("Missing 'ipfx_ingestion' argument") + if traffic_collector_id is None and 'trafficCollectorId' in kwargs: + traffic_collector_id = kwargs['trafficCollectorId'] + if traffic_collector_id is None: + raise TypeError("Missing 'traffic_collector_id' argument") + + _setter("ipfx_emission", ipfx_emission) + _setter("ipfx_ingestion", ipfx_ingestion) + _setter("traffic_collector_id", traffic_collector_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="ipfxEmission") @@ -132,18 +165,45 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Network Function Collector Policy. :param pulumi.Input[str] traffic_collector_id: Specifies the Azure Traffic Collector ID of the Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created. """ + _CollectorPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + ipfx_emission=ipfx_emission, + ipfx_ingestion=ipfx_ingestion, + location=location, + name=name, + tags=tags, + traffic_collector_id=traffic_collector_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ipfx_emission: Optional[pulumi.Input['CollectorPolicyIpfxEmissionArgs']] = None, + ipfx_ingestion: Optional[pulumi.Input['CollectorPolicyIpfxIngestionArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + traffic_collector_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ipfx_emission is None and 'ipfxEmission' in kwargs: + ipfx_emission = kwargs['ipfxEmission'] + if ipfx_ingestion is None and 'ipfxIngestion' in kwargs: + ipfx_ingestion = kwargs['ipfxIngestion'] + if traffic_collector_id is None and 'trafficCollectorId' in kwargs: + traffic_collector_id = kwargs['trafficCollectorId'] + if ipfx_emission is not None: - pulumi.set(__self__, "ipfx_emission", ipfx_emission) + _setter("ipfx_emission", ipfx_emission) if ipfx_ingestion is not None: - pulumi.set(__self__, "ipfx_ingestion", ipfx_ingestion) + _setter("ipfx_ingestion", ipfx_ingestion) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if traffic_collector_id is not None: - pulumi.set(__self__, "traffic_collector_id", traffic_collector_id) + _setter("traffic_collector_id", traffic_collector_id) @property @pulumi.getter(name="ipfxEmission") @@ -277,6 +337,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CollectorPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -297,9 +361,19 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = CollectorPolicyArgs.__new__(CollectorPolicyArgs) + if ipfx_emission is not None and not isinstance(ipfx_emission, CollectorPolicyIpfxEmissionArgs): + ipfx_emission = ipfx_emission or {} + def _setter(key, value): + ipfx_emission[key] = value + CollectorPolicyIpfxEmissionArgs._configure(_setter, **ipfx_emission) if ipfx_emission is None and not opts.urn: raise TypeError("Missing required property 'ipfx_emission'") __props__.__dict__["ipfx_emission"] = ipfx_emission + if ipfx_ingestion is not None and not isinstance(ipfx_ingestion, CollectorPolicyIpfxIngestionArgs): + ipfx_ingestion = ipfx_ingestion or {} + def _setter(key, value): + ipfx_ingestion[key] = value + CollectorPolicyIpfxIngestionArgs._configure(_setter, **ipfx_ingestion) if ipfx_ingestion is None and not opts.urn: raise TypeError("Missing required property 'ipfx_ingestion'") __props__.__dict__["ipfx_ingestion"] = ipfx_ingestion diff --git a/sdk/python/pulumi_azure/networkfunction/outputs.py b/sdk/python/pulumi_azure/networkfunction/outputs.py index c9d8145dc8..a2f93b50a0 100644 --- a/sdk/python/pulumi_azure/networkfunction/outputs.py +++ b/sdk/python/pulumi_azure/networkfunction/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -38,7 +38,22 @@ def __init__(__self__, *, """ :param str destination_types: A list of emission destination types. The only possible value is `AzureMonitor`. Changing this forces a new Network Function Collector Policy to be created. """ - pulumi.set(__self__, "destination_types", destination_types) + CollectorPolicyIpfxEmission._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_types=destination_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_types: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_types is None and 'destinationTypes' in kwargs: + destination_types = kwargs['destinationTypes'] + if destination_types is None: + raise TypeError("Missing 'destination_types' argument") + + _setter("destination_types", destination_types) @property @pulumi.getter(name="destinationTypes") @@ -73,7 +88,22 @@ def __init__(__self__, *, """ :param Sequence[str] source_resource_ids: A list of ingestion source resource IDs. Changing this forces a new Network Function Collector Policy to be created. """ - pulumi.set(__self__, "source_resource_ids", source_resource_ids) + CollectorPolicyIpfxIngestion._configure( + lambda key, value: pulumi.set(__self__, key, value), + source_resource_ids=source_resource_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + source_resource_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if source_resource_ids is None and 'sourceResourceIds' in kwargs: + source_resource_ids = kwargs['sourceResourceIds'] + if source_resource_ids is None: + raise TypeError("Missing 'source_resource_ids' argument") + + _setter("source_resource_ids", source_resource_ids) @property @pulumi.getter(name="sourceResourceIds") diff --git a/sdk/python/pulumi_azure/newrelic/_inputs.py b/sdk/python/pulumi_azure/newrelic/_inputs.py index e9ccb0a4b0..eda64c80f4 100644 --- a/sdk/python/pulumi_azure/newrelic/_inputs.py +++ b/sdk/python/pulumi_azure/newrelic/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -29,13 +29,40 @@ def __init__(__self__, *, :param pulumi.Input[str] plan_id: Specifies the plan id published by NewRelic. The only possible value is `newrelic-pay-as-you-go-free-live`. Defaults to `newrelic-pay-as-you-go-free-live`. Changing this forces a new Azure Native New Relic Monitor to be created. :param pulumi.Input[str] usage_type: Specifies the usage type. Possible values are `COMMITTED` and `PAYG`. Defaults to `PAYG`. Changing this forces a new Azure Native New Relic Monitor to be created. """ - pulumi.set(__self__, "effective_date", effective_date) + MonitorPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + effective_date=effective_date, + billing_cycle=billing_cycle, + plan_id=plan_id, + usage_type=usage_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + effective_date: Optional[pulumi.Input[str]] = None, + billing_cycle: Optional[pulumi.Input[str]] = None, + plan_id: Optional[pulumi.Input[str]] = None, + usage_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if effective_date is None and 'effectiveDate' in kwargs: + effective_date = kwargs['effectiveDate'] + if effective_date is None: + raise TypeError("Missing 'effective_date' argument") + if billing_cycle is None and 'billingCycle' in kwargs: + billing_cycle = kwargs['billingCycle'] + if plan_id is None and 'planId' in kwargs: + plan_id = kwargs['planId'] + if usage_type is None and 'usageType' in kwargs: + usage_type = kwargs['usageType'] + + _setter("effective_date", effective_date) if billing_cycle is not None: - pulumi.set(__self__, "billing_cycle", billing_cycle) + _setter("billing_cycle", billing_cycle) if plan_id is not None: - pulumi.set(__self__, "plan_id", plan_id) + _setter("plan_id", plan_id) if usage_type is not None: - pulumi.set(__self__, "usage_type", usage_type) + _setter("usage_type", usage_type) @property @pulumi.getter(name="effectiveDate") @@ -99,10 +126,41 @@ def __init__(__self__, *, :param pulumi.Input[str] last_name: Specifies the last name. Changing this forces a new Azure Native New Relic Monitor to be created. :param pulumi.Input[str] phone_number: Specifies the contact phone number. Changing this forces a new Azure Native New Relic Monitor to be created. """ - pulumi.set(__self__, "email", email) - pulumi.set(__self__, "first_name", first_name) - pulumi.set(__self__, "last_name", last_name) - pulumi.set(__self__, "phone_number", phone_number) + MonitorUserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + first_name=first_name, + last_name=last_name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input[str]] = None, + first_name: Optional[pulumi.Input[str]] = None, + last_name: Optional[pulumi.Input[str]] = None, + phone_number: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + if first_name is None and 'firstName' in kwargs: + first_name = kwargs['firstName'] + if first_name is None: + raise TypeError("Missing 'first_name' argument") + if last_name is None and 'lastName' in kwargs: + last_name = kwargs['lastName'] + if last_name is None: + raise TypeError("Missing 'last_name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("email", email) + _setter("first_name", first_name) + _setter("last_name", last_name) + _setter("phone_number", phone_number) @property @pulumi.getter @@ -164,9 +222,30 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name (also known as the key) of the tag. :param pulumi.Input[str] value: Specifies the value of the tag. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + TagRuleLogTagFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("action", action) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -216,9 +295,30 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name (also known as the key) of the tag. :param pulumi.Input[str] value: Specifies the value of the tag. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + TagRuleMetricTagFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("action", action) + _setter("name", name) + _setter("value", value) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/newrelic/monitor.py b/sdk/python/pulumi_azure/newrelic/monitor.py index 35028cdd48..c5a5c5cd45 100644 --- a/sdk/python/pulumi_azure/newrelic/monitor.py +++ b/sdk/python/pulumi_azure/newrelic/monitor.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,25 +41,76 @@ def __init__(__self__, *, :param pulumi.Input[str] organization_id: Specifies the organization id. Changing this forces a new Azure Native New Relic Monitor to be created. :param pulumi.Input[str] user_id: Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created. """ - pulumi.set(__self__, "plan", plan) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "user", user) + MonitorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + plan=plan, + resource_group_name=resource_group_name, + user=user, + account_creation_source=account_creation_source, + account_id=account_id, + ingestion_key=ingestion_key, + location=location, + name=name, + org_creation_source=org_creation_source, + organization_id=organization_id, + user_id=user_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + plan: Optional[pulumi.Input['MonitorPlanArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + user: Optional[pulumi.Input['MonitorUserArgs']] = None, + account_creation_source: Optional[pulumi.Input[str]] = None, + account_id: Optional[pulumi.Input[str]] = None, + ingestion_key: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + org_creation_source: Optional[pulumi.Input[str]] = None, + organization_id: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if plan is None: + raise TypeError("Missing 'plan' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if user is None: + raise TypeError("Missing 'user' argument") + if account_creation_source is None and 'accountCreationSource' in kwargs: + account_creation_source = kwargs['accountCreationSource'] + if account_id is None and 'accountId' in kwargs: + account_id = kwargs['accountId'] + if ingestion_key is None and 'ingestionKey' in kwargs: + ingestion_key = kwargs['ingestionKey'] + if org_creation_source is None and 'orgCreationSource' in kwargs: + org_creation_source = kwargs['orgCreationSource'] + if organization_id is None and 'organizationId' in kwargs: + organization_id = kwargs['organizationId'] + if user_id is None and 'userId' in kwargs: + user_id = kwargs['userId'] + + _setter("plan", plan) + _setter("resource_group_name", resource_group_name) + _setter("user", user) if account_creation_source is not None: - pulumi.set(__self__, "account_creation_source", account_creation_source) + _setter("account_creation_source", account_creation_source) if account_id is not None: - pulumi.set(__self__, "account_id", account_id) + _setter("account_id", account_id) if ingestion_key is not None: - pulumi.set(__self__, "ingestion_key", ingestion_key) + _setter("ingestion_key", ingestion_key) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if org_creation_source is not None: - pulumi.set(__self__, "org_creation_source", org_creation_source) + _setter("org_creation_source", org_creation_source) if organization_id is not None: - pulumi.set(__self__, "organization_id", organization_id) + _setter("organization_id", organization_id) if user_id is not None: - pulumi.set(__self__, "user_id", user_id) + _setter("user_id", user_id) @property @pulumi.getter @@ -222,28 +273,73 @@ def __init__(__self__, *, :param pulumi.Input['MonitorUserArgs'] user: A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created. :param pulumi.Input[str] user_id: Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created. """ + _MonitorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_creation_source=account_creation_source, + account_id=account_id, + ingestion_key=ingestion_key, + location=location, + name=name, + org_creation_source=org_creation_source, + organization_id=organization_id, + plan=plan, + resource_group_name=resource_group_name, + user=user, + user_id=user_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_creation_source: Optional[pulumi.Input[str]] = None, + account_id: Optional[pulumi.Input[str]] = None, + ingestion_key: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + org_creation_source: Optional[pulumi.Input[str]] = None, + organization_id: Optional[pulumi.Input[str]] = None, + plan: Optional[pulumi.Input['MonitorPlanArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + user: Optional[pulumi.Input['MonitorUserArgs']] = None, + user_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_creation_source is None and 'accountCreationSource' in kwargs: + account_creation_source = kwargs['accountCreationSource'] + if account_id is None and 'accountId' in kwargs: + account_id = kwargs['accountId'] + if ingestion_key is None and 'ingestionKey' in kwargs: + ingestion_key = kwargs['ingestionKey'] + if org_creation_source is None and 'orgCreationSource' in kwargs: + org_creation_source = kwargs['orgCreationSource'] + if organization_id is None and 'organizationId' in kwargs: + organization_id = kwargs['organizationId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if user_id is None and 'userId' in kwargs: + user_id = kwargs['userId'] + if account_creation_source is not None: - pulumi.set(__self__, "account_creation_source", account_creation_source) + _setter("account_creation_source", account_creation_source) if account_id is not None: - pulumi.set(__self__, "account_id", account_id) + _setter("account_id", account_id) if ingestion_key is not None: - pulumi.set(__self__, "ingestion_key", ingestion_key) + _setter("ingestion_key", ingestion_key) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if org_creation_source is not None: - pulumi.set(__self__, "org_creation_source", org_creation_source) + _setter("org_creation_source", org_creation_source) if organization_id is not None: - pulumi.set(__self__, "organization_id", organization_id) + _setter("organization_id", organization_id) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if user is not None: - pulumi.set(__self__, "user", user) + _setter("user", user) if user_id is not None: - pulumi.set(__self__, "user_id", user_id) + _setter("user_id", user_id) @property @pulumi.getter(name="accountCreationSource") @@ -489,6 +585,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MonitorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -521,12 +621,22 @@ def _internal_init(__self__, __props__.__dict__["name"] = name __props__.__dict__["org_creation_source"] = org_creation_source __props__.__dict__["organization_id"] = organization_id + if plan is not None and not isinstance(plan, MonitorPlanArgs): + plan = plan or {} + def _setter(key, value): + plan[key] = value + MonitorPlanArgs._configure(_setter, **plan) if plan is None and not opts.urn: raise TypeError("Missing required property 'plan'") __props__.__dict__["plan"] = plan if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if user is not None and not isinstance(user, MonitorUserArgs): + user = user or {} + def _setter(key, value): + user[key] = value + MonitorUserArgs._configure(_setter, **user) if user is None and not opts.urn: raise TypeError("Missing required property 'user'") __props__.__dict__["user"] = user diff --git a/sdk/python/pulumi_azure/newrelic/outputs.py b/sdk/python/pulumi_azure/newrelic/outputs.py index 4dbab9bded..5c93615b70 100644 --- a/sdk/python/pulumi_azure/newrelic/outputs.py +++ b/sdk/python/pulumi_azure/newrelic/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -52,13 +52,40 @@ def __init__(__self__, *, :param str plan_id: Specifies the plan id published by NewRelic. The only possible value is `newrelic-pay-as-you-go-free-live`. Defaults to `newrelic-pay-as-you-go-free-live`. Changing this forces a new Azure Native New Relic Monitor to be created. :param str usage_type: Specifies the usage type. Possible values are `COMMITTED` and `PAYG`. Defaults to `PAYG`. Changing this forces a new Azure Native New Relic Monitor to be created. """ - pulumi.set(__self__, "effective_date", effective_date) + MonitorPlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + effective_date=effective_date, + billing_cycle=billing_cycle, + plan_id=plan_id, + usage_type=usage_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + effective_date: Optional[str] = None, + billing_cycle: Optional[str] = None, + plan_id: Optional[str] = None, + usage_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if effective_date is None and 'effectiveDate' in kwargs: + effective_date = kwargs['effectiveDate'] + if effective_date is None: + raise TypeError("Missing 'effective_date' argument") + if billing_cycle is None and 'billingCycle' in kwargs: + billing_cycle = kwargs['billingCycle'] + if plan_id is None and 'planId' in kwargs: + plan_id = kwargs['planId'] + if usage_type is None and 'usageType' in kwargs: + usage_type = kwargs['usageType'] + + _setter("effective_date", effective_date) if billing_cycle is not None: - pulumi.set(__self__, "billing_cycle", billing_cycle) + _setter("billing_cycle", billing_cycle) if plan_id is not None: - pulumi.set(__self__, "plan_id", plan_id) + _setter("plan_id", plan_id) if usage_type is not None: - pulumi.set(__self__, "usage_type", usage_type) + _setter("usage_type", usage_type) @property @pulumi.getter(name="effectiveDate") @@ -127,10 +154,41 @@ def __init__(__self__, *, :param str last_name: Specifies the last name. Changing this forces a new Azure Native New Relic Monitor to be created. :param str phone_number: Specifies the contact phone number. Changing this forces a new Azure Native New Relic Monitor to be created. """ - pulumi.set(__self__, "email", email) - pulumi.set(__self__, "first_name", first_name) - pulumi.set(__self__, "last_name", last_name) - pulumi.set(__self__, "phone_number", phone_number) + MonitorUser._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + first_name=first_name, + last_name=last_name, + phone_number=phone_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[str] = None, + first_name: Optional[str] = None, + last_name: Optional[str] = None, + phone_number: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + if first_name is None and 'firstName' in kwargs: + first_name = kwargs['firstName'] + if first_name is None: + raise TypeError("Missing 'first_name' argument") + if last_name is None and 'lastName' in kwargs: + last_name = kwargs['lastName'] + if last_name is None: + raise TypeError("Missing 'last_name' argument") + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + + _setter("email", email) + _setter("first_name", first_name) + _setter("last_name", last_name) + _setter("phone_number", phone_number) @property @pulumi.getter @@ -176,9 +234,30 @@ def __init__(__self__, *, :param str name: Specifies the name (also known as the key) of the tag. :param str value: Specifies the value of the tag. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + TagRuleLogTagFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("action", action) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -216,9 +295,30 @@ def __init__(__self__, *, :param str name: Specifies the name (also known as the key) of the tag. :param str value: Specifies the value of the tag. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + TagRuleMetricTagFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("action", action) + _setter("name", name) + _setter("value", value) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/newrelic/tag_rule.py b/sdk/python/pulumi_azure/newrelic/tag_rule.py index b9aaf7833d..b25b2b968c 100644 --- a/sdk/python/pulumi_azure/newrelic/tag_rule.py +++ b/sdk/python/pulumi_azure/newrelic/tag_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,19 +33,58 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['TagRuleMetricTagFilterArgs']]] metric_tag_filters: A `metric_tag_filter` block as defined below. :param pulumi.Input[bool] subscription_log_enabled: Whether subscription logs should be sent for the Monitor resource. Defaults to `false`. """ - pulumi.set(__self__, "monitor_id", monitor_id) + TagRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + monitor_id=monitor_id, + activity_log_enabled=activity_log_enabled, + azure_active_directory_log_enabled=azure_active_directory_log_enabled, + log_tag_filters=log_tag_filters, + metric_enabled=metric_enabled, + metric_tag_filters=metric_tag_filters, + subscription_log_enabled=subscription_log_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + monitor_id: Optional[pulumi.Input[str]] = None, + activity_log_enabled: Optional[pulumi.Input[bool]] = None, + azure_active_directory_log_enabled: Optional[pulumi.Input[bool]] = None, + log_tag_filters: Optional[pulumi.Input[Sequence[pulumi.Input['TagRuleLogTagFilterArgs']]]] = None, + metric_enabled: Optional[pulumi.Input[bool]] = None, + metric_tag_filters: Optional[pulumi.Input[Sequence[pulumi.Input['TagRuleMetricTagFilterArgs']]]] = None, + subscription_log_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if monitor_id is None and 'monitorId' in kwargs: + monitor_id = kwargs['monitorId'] + if monitor_id is None: + raise TypeError("Missing 'monitor_id' argument") + if activity_log_enabled is None and 'activityLogEnabled' in kwargs: + activity_log_enabled = kwargs['activityLogEnabled'] + if azure_active_directory_log_enabled is None and 'azureActiveDirectoryLogEnabled' in kwargs: + azure_active_directory_log_enabled = kwargs['azureActiveDirectoryLogEnabled'] + if log_tag_filters is None and 'logTagFilters' in kwargs: + log_tag_filters = kwargs['logTagFilters'] + if metric_enabled is None and 'metricEnabled' in kwargs: + metric_enabled = kwargs['metricEnabled'] + if metric_tag_filters is None and 'metricTagFilters' in kwargs: + metric_tag_filters = kwargs['metricTagFilters'] + if subscription_log_enabled is None and 'subscriptionLogEnabled' in kwargs: + subscription_log_enabled = kwargs['subscriptionLogEnabled'] + + _setter("monitor_id", monitor_id) if activity_log_enabled is not None: - pulumi.set(__self__, "activity_log_enabled", activity_log_enabled) + _setter("activity_log_enabled", activity_log_enabled) if azure_active_directory_log_enabled is not None: - pulumi.set(__self__, "azure_active_directory_log_enabled", azure_active_directory_log_enabled) + _setter("azure_active_directory_log_enabled", azure_active_directory_log_enabled) if log_tag_filters is not None: - pulumi.set(__self__, "log_tag_filters", log_tag_filters) + _setter("log_tag_filters", log_tag_filters) if metric_enabled is not None: - pulumi.set(__self__, "metric_enabled", metric_enabled) + _setter("metric_enabled", metric_enabled) if metric_tag_filters is not None: - pulumi.set(__self__, "metric_tag_filters", metric_tag_filters) + _setter("metric_tag_filters", metric_tag_filters) if subscription_log_enabled is not None: - pulumi.set(__self__, "subscription_log_enabled", subscription_log_enabled) + _setter("subscription_log_enabled", subscription_log_enabled) @property @pulumi.getter(name="monitorId") @@ -152,20 +191,57 @@ def __init__(__self__, *, :param pulumi.Input[str] monitor_id: Specifies the ID of the New Relic Monitor this Tag Rule should be created within. Changing this forces a new Azure Native New Relic Tag Rule to be created. :param pulumi.Input[bool] subscription_log_enabled: Whether subscription logs should be sent for the Monitor resource. Defaults to `false`. """ + _TagRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + activity_log_enabled=activity_log_enabled, + azure_active_directory_log_enabled=azure_active_directory_log_enabled, + log_tag_filters=log_tag_filters, + metric_enabled=metric_enabled, + metric_tag_filters=metric_tag_filters, + monitor_id=monitor_id, + subscription_log_enabled=subscription_log_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + activity_log_enabled: Optional[pulumi.Input[bool]] = None, + azure_active_directory_log_enabled: Optional[pulumi.Input[bool]] = None, + log_tag_filters: Optional[pulumi.Input[Sequence[pulumi.Input['TagRuleLogTagFilterArgs']]]] = None, + metric_enabled: Optional[pulumi.Input[bool]] = None, + metric_tag_filters: Optional[pulumi.Input[Sequence[pulumi.Input['TagRuleMetricTagFilterArgs']]]] = None, + monitor_id: Optional[pulumi.Input[str]] = None, + subscription_log_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if activity_log_enabled is None and 'activityLogEnabled' in kwargs: + activity_log_enabled = kwargs['activityLogEnabled'] + if azure_active_directory_log_enabled is None and 'azureActiveDirectoryLogEnabled' in kwargs: + azure_active_directory_log_enabled = kwargs['azureActiveDirectoryLogEnabled'] + if log_tag_filters is None and 'logTagFilters' in kwargs: + log_tag_filters = kwargs['logTagFilters'] + if metric_enabled is None and 'metricEnabled' in kwargs: + metric_enabled = kwargs['metricEnabled'] + if metric_tag_filters is None and 'metricTagFilters' in kwargs: + metric_tag_filters = kwargs['metricTagFilters'] + if monitor_id is None and 'monitorId' in kwargs: + monitor_id = kwargs['monitorId'] + if subscription_log_enabled is None and 'subscriptionLogEnabled' in kwargs: + subscription_log_enabled = kwargs['subscriptionLogEnabled'] + if activity_log_enabled is not None: - pulumi.set(__self__, "activity_log_enabled", activity_log_enabled) + _setter("activity_log_enabled", activity_log_enabled) if azure_active_directory_log_enabled is not None: - pulumi.set(__self__, "azure_active_directory_log_enabled", azure_active_directory_log_enabled) + _setter("azure_active_directory_log_enabled", azure_active_directory_log_enabled) if log_tag_filters is not None: - pulumi.set(__self__, "log_tag_filters", log_tag_filters) + _setter("log_tag_filters", log_tag_filters) if metric_enabled is not None: - pulumi.set(__self__, "metric_enabled", metric_enabled) + _setter("metric_enabled", metric_enabled) if metric_tag_filters is not None: - pulumi.set(__self__, "metric_tag_filters", metric_tag_filters) + _setter("metric_tag_filters", metric_tag_filters) if monitor_id is not None: - pulumi.set(__self__, "monitor_id", monitor_id) + _setter("monitor_id", monitor_id) if subscription_log_enabled is not None: - pulumi.set(__self__, "subscription_log_enabled", subscription_log_enabled) + _setter("subscription_log_enabled", subscription_log_enabled) @property @pulumi.getter(name="activityLogEnabled") @@ -387,6 +463,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TagRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/nginx/_inputs.py b/sdk/python/pulumi_azure/nginx/_inputs.py index a5eab61c82..9e6c92ecdf 100644 --- a/sdk/python/pulumi_azure/nginx/_inputs.py +++ b/sdk/python/pulumi_azure/nginx/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -28,8 +28,27 @@ def __init__(__self__, *, :param pulumi.Input[str] content: Specifies the base-64 encoded contents of this config file. :param pulumi.Input[str] virtual_path: Specify the path of this config file. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "virtual_path", virtual_path) + ConfigurationConfigFileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + virtual_path=virtual_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + virtual_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if virtual_path is None: + raise TypeError("Missing 'virtual_path' argument") + + _setter("content", content) + _setter("virtual_path", virtual_path) @property @pulumi.getter @@ -65,8 +84,27 @@ def __init__(__self__, *, :param pulumi.Input[str] content: Specifies the base-64 encoded contents of this config file (Sensitive). :param pulumi.Input[str] virtual_path: Specify the path of this config file. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "virtual_path", virtual_path) + ConfigurationProtectedFileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + virtual_path=virtual_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + virtual_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if virtual_path is None: + raise TypeError("Missing 'virtual_path' argument") + + _setter("content", content) + _setter("virtual_path", virtual_path) @property @pulumi.getter @@ -104,9 +142,36 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_address: Specify the IP Address of this private IP. :param pulumi.Input[str] subnet_id: Specify the SubNet Resource ID to this Nginx Deployment. """ - pulumi.set(__self__, "allocation_method", allocation_method) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "subnet_id", subnet_id) + DeploymentFrontendPrivateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allocation_method=allocation_method, + ip_address=ip_address, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allocation_method: Optional[pulumi.Input[str]] = None, + ip_address: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allocation_method is None and 'allocationMethod' in kwargs: + allocation_method = kwargs['allocationMethod'] + if allocation_method is None: + raise TypeError("Missing 'allocation_method' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("allocation_method", allocation_method) + _setter("ip_address", ip_address) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="allocationMethod") @@ -152,8 +217,21 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_addresses: Specifies a list of Public IP Resouce ID to this Nginx Deployment. """ + DeploymentFrontendPublicArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_addresses=ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) @property @pulumi.getter(name="ipAddresses") @@ -179,13 +257,38 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Specifies the identity type of the Nginx Deployment. Possible values is `UserAssigned` where you can specify the Service Principal IDs in the `identity_ids` field. :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: Specifies a list of user managed identity ids to be assigned. Required if `type` is `UserAssigned`. """ - pulumi.set(__self__, "type", type) + DeploymentIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -239,10 +342,25 @@ def __init__(__self__, *, :param pulumi.Input[str] container_name: Specify the container name of Stoage Account for logging. :param pulumi.Input[str] name: The account name of the StorageAccount for Nginx Logging. """ + DeploymentLoggingStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is not None: - pulumi.set(__self__, "container_name", container_name) + _setter("container_name", container_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="containerName") @@ -276,7 +394,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] subnet_id: Specify The SubNet Resource ID to this Nginx Deployment. """ - pulumi.set(__self__, "subnet_id", subnet_id) + DeploymentNetworkInterfaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="subnetId") diff --git a/sdk/python/pulumi_azure/nginx/certificate.py b/sdk/python/pulumi_azure/nginx/certificate.py index e6727519a8..49c6ee71c0 100644 --- a/sdk/python/pulumi_azure/nginx/certificate.py +++ b/sdk/python/pulumi_azure/nginx/certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CertificateArgs', 'Certificate'] @@ -27,12 +27,47 @@ def __init__(__self__, *, :param pulumi.Input[str] nginx_deployment_id: The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created. :param pulumi.Input[str] name: The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created. """ - pulumi.set(__self__, "certificate_virtual_path", certificate_virtual_path) - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) - pulumi.set(__self__, "key_virtual_path", key_virtual_path) - pulumi.set(__self__, "nginx_deployment_id", nginx_deployment_id) + CertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_virtual_path=certificate_virtual_path, + key_vault_secret_id=key_vault_secret_id, + key_virtual_path=key_virtual_path, + nginx_deployment_id=nginx_deployment_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_virtual_path: Optional[pulumi.Input[str]] = None, + key_vault_secret_id: Optional[pulumi.Input[str]] = None, + key_virtual_path: Optional[pulumi.Input[str]] = None, + nginx_deployment_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_virtual_path is None and 'certificateVirtualPath' in kwargs: + certificate_virtual_path = kwargs['certificateVirtualPath'] + if certificate_virtual_path is None: + raise TypeError("Missing 'certificate_virtual_path' argument") + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + if key_vault_secret_id is None: + raise TypeError("Missing 'key_vault_secret_id' argument") + if key_virtual_path is None and 'keyVirtualPath' in kwargs: + key_virtual_path = kwargs['keyVirtualPath'] + if key_virtual_path is None: + raise TypeError("Missing 'key_virtual_path' argument") + if nginx_deployment_id is None and 'nginxDeploymentId' in kwargs: + nginx_deployment_id = kwargs['nginxDeploymentId'] + if nginx_deployment_id is None: + raise TypeError("Missing 'nginx_deployment_id' argument") + + _setter("certificate_virtual_path", certificate_virtual_path) + _setter("key_vault_secret_id", key_vault_secret_id) + _setter("key_virtual_path", key_virtual_path) + _setter("nginx_deployment_id", nginx_deployment_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="certificateVirtualPath") @@ -111,16 +146,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Nginx Certificate. Changing this forces a new Nginx Certificate to be created. :param pulumi.Input[str] nginx_deployment_id: The ID of the Nginx Deployment that this Certificate should be associated with. Changing this forces a new Nginx Certificate to be created. """ + _CertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_virtual_path=certificate_virtual_path, + key_vault_secret_id=key_vault_secret_id, + key_virtual_path=key_virtual_path, + name=name, + nginx_deployment_id=nginx_deployment_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_virtual_path: Optional[pulumi.Input[str]] = None, + key_vault_secret_id: Optional[pulumi.Input[str]] = None, + key_virtual_path: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + nginx_deployment_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_virtual_path is None and 'certificateVirtualPath' in kwargs: + certificate_virtual_path = kwargs['certificateVirtualPath'] + if key_vault_secret_id is None and 'keyVaultSecretId' in kwargs: + key_vault_secret_id = kwargs['keyVaultSecretId'] + if key_virtual_path is None and 'keyVirtualPath' in kwargs: + key_virtual_path = kwargs['keyVirtualPath'] + if nginx_deployment_id is None and 'nginxDeploymentId' in kwargs: + nginx_deployment_id = kwargs['nginxDeploymentId'] + if certificate_virtual_path is not None: - pulumi.set(__self__, "certificate_virtual_path", certificate_virtual_path) + _setter("certificate_virtual_path", certificate_virtual_path) if key_vault_secret_id is not None: - pulumi.set(__self__, "key_vault_secret_id", key_vault_secret_id) + _setter("key_vault_secret_id", key_vault_secret_id) if key_virtual_path is not None: - pulumi.set(__self__, "key_virtual_path", key_virtual_path) + _setter("key_virtual_path", key_virtual_path) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if nginx_deployment_id is not None: - pulumi.set(__self__, "nginx_deployment_id", nginx_deployment_id) + _setter("nginx_deployment_id", nginx_deployment_id) @property @pulumi.getter(name="certificateVirtualPath") @@ -400,6 +462,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/nginx/configuration.py b/sdk/python/pulumi_azure/nginx/configuration.py index 600af7593d..25619a7f57 100644 --- a/sdk/python/pulumi_azure/nginx/configuration.py +++ b/sdk/python/pulumi_azure/nginx/configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] package_data: Specify the package data for this configuration. :param pulumi.Input[Sequence[pulumi.Input['ConfigurationProtectedFileArgs']]] protected_files: One or more `protected_file` (Protected File) blocks with sensitive information as defined below. If specified `config_file` must also be specified. """ - pulumi.set(__self__, "nginx_deployment_id", nginx_deployment_id) - pulumi.set(__self__, "root_file", root_file) + ConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + nginx_deployment_id=nginx_deployment_id, + root_file=root_file, + config_files=config_files, + package_data=package_data, + protected_files=protected_files, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + nginx_deployment_id: Optional[pulumi.Input[str]] = None, + root_file: Optional[pulumi.Input[str]] = None, + config_files: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationConfigFileArgs']]]] = None, + package_data: Optional[pulumi.Input[str]] = None, + protected_files: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationProtectedFileArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if nginx_deployment_id is None and 'nginxDeploymentId' in kwargs: + nginx_deployment_id = kwargs['nginxDeploymentId'] + if nginx_deployment_id is None: + raise TypeError("Missing 'nginx_deployment_id' argument") + if root_file is None and 'rootFile' in kwargs: + root_file = kwargs['rootFile'] + if root_file is None: + raise TypeError("Missing 'root_file' argument") + if config_files is None and 'configFiles' in kwargs: + config_files = kwargs['configFiles'] + if package_data is None and 'packageData' in kwargs: + package_data = kwargs['packageData'] + if protected_files is None and 'protectedFiles' in kwargs: + protected_files = kwargs['protectedFiles'] + + _setter("nginx_deployment_id", nginx_deployment_id) + _setter("root_file", root_file) if config_files is not None: - pulumi.set(__self__, "config_files", config_files) + _setter("config_files", config_files) if package_data is not None: - pulumi.set(__self__, "package_data", package_data) + _setter("package_data", package_data) if protected_files is not None: - pulumi.set(__self__, "protected_files", protected_files) + _setter("protected_files", protected_files) @property @pulumi.getter(name="nginxDeploymentId") @@ -115,16 +148,45 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ConfigurationProtectedFileArgs']]] protected_files: One or more `protected_file` (Protected File) blocks with sensitive information as defined below. If specified `config_file` must also be specified. :param pulumi.Input[str] root_file: Specify the root file path of this Nginx Configuration. """ + _ConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + config_files=config_files, + nginx_deployment_id=nginx_deployment_id, + package_data=package_data, + protected_files=protected_files, + root_file=root_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + config_files: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationConfigFileArgs']]]] = None, + nginx_deployment_id: Optional[pulumi.Input[str]] = None, + package_data: Optional[pulumi.Input[str]] = None, + protected_files: Optional[pulumi.Input[Sequence[pulumi.Input['ConfigurationProtectedFileArgs']]]] = None, + root_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if config_files is None and 'configFiles' in kwargs: + config_files = kwargs['configFiles'] + if nginx_deployment_id is None and 'nginxDeploymentId' in kwargs: + nginx_deployment_id = kwargs['nginxDeploymentId'] + if package_data is None and 'packageData' in kwargs: + package_data = kwargs['packageData'] + if protected_files is None and 'protectedFiles' in kwargs: + protected_files = kwargs['protectedFiles'] + if root_file is None and 'rootFile' in kwargs: + root_file = kwargs['rootFile'] + if config_files is not None: - pulumi.set(__self__, "config_files", config_files) + _setter("config_files", config_files) if nginx_deployment_id is not None: - pulumi.set(__self__, "nginx_deployment_id", nginx_deployment_id) + _setter("nginx_deployment_id", nginx_deployment_id) if package_data is not None: - pulumi.set(__self__, "package_data", package_data) + _setter("package_data", package_data) if protected_files is not None: - pulumi.set(__self__, "protected_files", protected_files) + _setter("protected_files", protected_files) if root_file is not None: - pulumi.set(__self__, "root_file", root_file) + _setter("root_file", root_file) @property @pulumi.getter(name="configFiles") @@ -244,6 +306,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/nginx/deployment.py b/sdk/python/pulumi_azure/nginx/deployment.py index b67aa10613..7ee9288441 100644 --- a/sdk/python/pulumi_azure/nginx/deployment.py +++ b/sdk/python/pulumi_azure/nginx/deployment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -49,32 +49,87 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DeploymentNetworkInterfaceArgs']]] network_interfaces: One or more `network_interface` blocks as defined below. Changing this forces a new Nginx Deployment to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Nginx Deployment. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + DeploymentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + capacity=capacity, + diagnose_support_enabled=diagnose_support_enabled, + email=email, + frontend_privates=frontend_privates, + frontend_public=frontend_public, + identity=identity, + location=location, + logging_storage_accounts=logging_storage_accounts, + managed_resource_group=managed_resource_group, + name=name, + network_interfaces=network_interfaces, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + capacity: Optional[pulumi.Input[int]] = None, + diagnose_support_enabled: Optional[pulumi.Input[bool]] = None, + email: Optional[pulumi.Input[str]] = None, + frontend_privates: Optional[pulumi.Input[Sequence[pulumi.Input['DeploymentFrontendPrivateArgs']]]] = None, + frontend_public: Optional[pulumi.Input['DeploymentFrontendPublicArgs']] = None, + identity: Optional[pulumi.Input['DeploymentIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + logging_storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['DeploymentLoggingStorageAccountArgs']]]] = None, + managed_resource_group: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['DeploymentNetworkInterfaceArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if diagnose_support_enabled is None and 'diagnoseSupportEnabled' in kwargs: + diagnose_support_enabled = kwargs['diagnoseSupportEnabled'] + if frontend_privates is None and 'frontendPrivates' in kwargs: + frontend_privates = kwargs['frontendPrivates'] + if frontend_public is None and 'frontendPublic' in kwargs: + frontend_public = kwargs['frontendPublic'] + if logging_storage_accounts is None and 'loggingStorageAccounts' in kwargs: + logging_storage_accounts = kwargs['loggingStorageAccounts'] + if managed_resource_group is None and 'managedResourceGroup' in kwargs: + managed_resource_group = kwargs['managedResourceGroup'] + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if diagnose_support_enabled is not None: - pulumi.set(__self__, "diagnose_support_enabled", diagnose_support_enabled) + _setter("diagnose_support_enabled", diagnose_support_enabled) if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if frontend_privates is not None: - pulumi.set(__self__, "frontend_privates", frontend_privates) + _setter("frontend_privates", frontend_privates) if frontend_public is not None: - pulumi.set(__self__, "frontend_public", frontend_public) + _setter("frontend_public", frontend_public) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logging_storage_accounts is not None: - pulumi.set(__self__, "logging_storage_accounts", logging_storage_accounts) + _setter("logging_storage_accounts", logging_storage_accounts) if managed_resource_group is not None: - pulumi.set(__self__, "managed_resource_group", managed_resource_group) + _setter("managed_resource_group", managed_resource_group) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_interfaces is not None: - pulumi.set(__self__, "network_interfaces", network_interfaces) + _setter("network_interfaces", network_interfaces) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -287,38 +342,97 @@ def __init__(__self__, *, :param pulumi.Input[str] sku: Specify the Name of Nginx deployment SKU. The possible value are `publicpreview_Monthly_gmz7xq9ge3py` and `standard_Monthly`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Nginx Deployment. """ + _DeploymentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + diagnose_support_enabled=diagnose_support_enabled, + email=email, + frontend_privates=frontend_privates, + frontend_public=frontend_public, + identity=identity, + ip_address=ip_address, + location=location, + logging_storage_accounts=logging_storage_accounts, + managed_resource_group=managed_resource_group, + name=name, + network_interfaces=network_interfaces, + nginx_version=nginx_version, + resource_group_name=resource_group_name, + sku=sku, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + diagnose_support_enabled: Optional[pulumi.Input[bool]] = None, + email: Optional[pulumi.Input[str]] = None, + frontend_privates: Optional[pulumi.Input[Sequence[pulumi.Input['DeploymentFrontendPrivateArgs']]]] = None, + frontend_public: Optional[pulumi.Input['DeploymentFrontendPublicArgs']] = None, + identity: Optional[pulumi.Input['DeploymentIdentityArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + logging_storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['DeploymentLoggingStorageAccountArgs']]]] = None, + managed_resource_group: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['DeploymentNetworkInterfaceArgs']]]] = None, + nginx_version: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if diagnose_support_enabled is None and 'diagnoseSupportEnabled' in kwargs: + diagnose_support_enabled = kwargs['diagnoseSupportEnabled'] + if frontend_privates is None and 'frontendPrivates' in kwargs: + frontend_privates = kwargs['frontendPrivates'] + if frontend_public is None and 'frontendPublic' in kwargs: + frontend_public = kwargs['frontendPublic'] + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if logging_storage_accounts is None and 'loggingStorageAccounts' in kwargs: + logging_storage_accounts = kwargs['loggingStorageAccounts'] + if managed_resource_group is None and 'managedResourceGroup' in kwargs: + managed_resource_group = kwargs['managedResourceGroup'] + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if nginx_version is None and 'nginxVersion' in kwargs: + nginx_version = kwargs['nginxVersion'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if diagnose_support_enabled is not None: - pulumi.set(__self__, "diagnose_support_enabled", diagnose_support_enabled) + _setter("diagnose_support_enabled", diagnose_support_enabled) if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if frontend_privates is not None: - pulumi.set(__self__, "frontend_privates", frontend_privates) + _setter("frontend_privates", frontend_privates) if frontend_public is not None: - pulumi.set(__self__, "frontend_public", frontend_public) + _setter("frontend_public", frontend_public) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if logging_storage_accounts is not None: - pulumi.set(__self__, "logging_storage_accounts", logging_storage_accounts) + _setter("logging_storage_accounts", logging_storage_accounts) if managed_resource_group is not None: - pulumi.set(__self__, "managed_resource_group", managed_resource_group) + _setter("managed_resource_group", managed_resource_group) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_interfaces is not None: - pulumi.set(__self__, "network_interfaces", network_interfaces) + _setter("network_interfaces", network_interfaces) if nginx_version is not None: - pulumi.set(__self__, "nginx_version", nginx_version) + _setter("nginx_version", nginx_version) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -684,6 +798,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DeploymentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -716,7 +834,17 @@ def _internal_init(__self__, __props__.__dict__["diagnose_support_enabled"] = diagnose_support_enabled __props__.__dict__["email"] = email __props__.__dict__["frontend_privates"] = frontend_privates + if frontend_public is not None and not isinstance(frontend_public, DeploymentFrontendPublicArgs): + frontend_public = frontend_public or {} + def _setter(key, value): + frontend_public[key] = value + DeploymentFrontendPublicArgs._configure(_setter, **frontend_public) __props__.__dict__["frontend_public"] = frontend_public + if identity is not None and not isinstance(identity, DeploymentIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + DeploymentIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["logging_storage_accounts"] = logging_storage_accounts diff --git a/sdk/python/pulumi_azure/nginx/outputs.py b/sdk/python/pulumi_azure/nginx/outputs.py index 016f927018..5a58ddc6d6 100644 --- a/sdk/python/pulumi_azure/nginx/outputs.py +++ b/sdk/python/pulumi_azure/nginx/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -45,8 +45,27 @@ def __init__(__self__, *, :param str content: Specifies the base-64 encoded contents of this config file. :param str virtual_path: Specify the path of this config file. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "virtual_path", virtual_path) + ConfigurationConfigFile._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + virtual_path=virtual_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[str] = None, + virtual_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if virtual_path is None: + raise TypeError("Missing 'virtual_path' argument") + + _setter("content", content) + _setter("virtual_path", virtual_path) @property @pulumi.getter @@ -91,8 +110,27 @@ def __init__(__self__, *, :param str content: Specifies the base-64 encoded contents of this config file (Sensitive). :param str virtual_path: Specify the path of this config file. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "virtual_path", virtual_path) + ConfigurationProtectedFile._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + virtual_path=virtual_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[str] = None, + virtual_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if virtual_path is None and 'virtualPath' in kwargs: + virtual_path = kwargs['virtualPath'] + if virtual_path is None: + raise TypeError("Missing 'virtual_path' argument") + + _setter("content", content) + _setter("virtual_path", virtual_path) @property @pulumi.getter @@ -143,9 +181,36 @@ def __init__(__self__, *, :param str ip_address: Specify the IP Address of this private IP. :param str subnet_id: Specify the SubNet Resource ID to this Nginx Deployment. """ - pulumi.set(__self__, "allocation_method", allocation_method) - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "subnet_id", subnet_id) + DeploymentFrontendPrivate._configure( + lambda key, value: pulumi.set(__self__, key, value), + allocation_method=allocation_method, + ip_address=ip_address, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allocation_method: Optional[str] = None, + ip_address: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allocation_method is None and 'allocationMethod' in kwargs: + allocation_method = kwargs['allocationMethod'] + if allocation_method is None: + raise TypeError("Missing 'allocation_method' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("allocation_method", allocation_method) + _setter("ip_address", ip_address) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="allocationMethod") @@ -196,8 +261,21 @@ def __init__(__self__, *, """ :param Sequence[str] ip_addresses: Specifies a list of Public IP Resouce ID to this Nginx Deployment. """ + DeploymentFrontendPublic._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_addresses=ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_addresses: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) @property @pulumi.getter(name="ipAddresses") @@ -240,13 +318,38 @@ def __init__(__self__, *, :param str type: Specifies the identity type of the Nginx Deployment. Possible values is `UserAssigned` where you can specify the Service Principal IDs in the `identity_ids` field. :param Sequence[str] identity_ids: Specifies a list of user managed identity ids to be assigned. Required if `type` is `UserAssigned`. """ - pulumi.set(__self__, "type", type) + DeploymentIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -301,10 +404,25 @@ def __init__(__self__, *, :param str container_name: Specify the container name of Stoage Account for logging. :param str name: The account name of the StorageAccount for Nginx Logging. """ + DeploymentLoggingStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is not None: - pulumi.set(__self__, "container_name", container_name) + _setter("container_name", container_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="containerName") @@ -347,7 +465,22 @@ def __init__(__self__, *, """ :param str subnet_id: Specify The SubNet Resource ID to this Nginx Deployment. """ - pulumi.set(__self__, "subnet_id", subnet_id) + DeploymentNetworkInterface._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="subnetId") diff --git a/sdk/python/pulumi_azure/notificationhub/_inputs.py b/sdk/python/pulumi_azure/notificationhub/_inputs.py index e9f61bcfa2..f654cb0787 100644 --- a/sdk/python/pulumi_azure/notificationhub/_inputs.py +++ b/sdk/python/pulumi_azure/notificationhub/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -29,11 +29,48 @@ def __init__(__self__, *, :param pulumi.Input[str] team_id: The ID of the team the Token. :param pulumi.Input[str] token: The Push Token associated with the Apple Developer Account. This is the contents of the `key` downloaded from [the Apple Developer Portal](https://developer.apple.com/account/ios/authkey/) between the `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----` blocks. """ - pulumi.set(__self__, "application_mode", application_mode) - pulumi.set(__self__, "bundle_id", bundle_id) - pulumi.set(__self__, "key_id", key_id) - pulumi.set(__self__, "team_id", team_id) - pulumi.set(__self__, "token", token) + HubApnsCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_mode=application_mode, + bundle_id=bundle_id, + key_id=key_id, + team_id=team_id, + token=token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_mode: Optional[pulumi.Input[str]] = None, + bundle_id: Optional[pulumi.Input[str]] = None, + key_id: Optional[pulumi.Input[str]] = None, + team_id: Optional[pulumi.Input[str]] = None, + token: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_mode is None and 'applicationMode' in kwargs: + application_mode = kwargs['applicationMode'] + if application_mode is None: + raise TypeError("Missing 'application_mode' argument") + if bundle_id is None and 'bundleId' in kwargs: + bundle_id = kwargs['bundleId'] + if bundle_id is None: + raise TypeError("Missing 'bundle_id' argument") + if key_id is None and 'keyId' in kwargs: + key_id = kwargs['keyId'] + if key_id is None: + raise TypeError("Missing 'key_id' argument") + if team_id is None and 'teamId' in kwargs: + team_id = kwargs['teamId'] + if team_id is None: + raise TypeError("Missing 'team_id' argument") + if token is None: + raise TypeError("Missing 'token' argument") + + _setter("application_mode", application_mode) + _setter("bundle_id", bundle_id) + _setter("key_id", key_id) + _setter("team_id", team_id) + _setter("token", token) @property @pulumi.getter(name="applicationMode") @@ -103,7 +140,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] api_key: The API Key associated with the Google Cloud Messaging service. """ - pulumi.set(__self__, "api_key", api_key) + HubGcmCredentialArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_key=api_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_key is None and 'apiKey' in kwargs: + api_key = kwargs['apiKey'] + if api_key is None: + raise TypeError("Missing 'api_key' argument") + + _setter("api_key", api_key) @property @pulumi.getter(name="apiKey") diff --git a/sdk/python/pulumi_azure/notificationhub/authorization_rule.py b/sdk/python/pulumi_azure/notificationhub/authorization_rule.py index 7d41c81d95..813cf7f857 100644 --- a/sdk/python/pulumi_azure/notificationhub/authorization_rule.py +++ b/sdk/python/pulumi_azure/notificationhub/authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AuthorizationRuleArgs', 'AuthorizationRule'] @@ -33,17 +33,52 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name to use for this Authorization Rule. Changing this forces a new resource to be created. :param pulumi.Input[bool] send: Does this Authorization Rule have Send access to the Notification Hub? Defaults to `false`. """ - pulumi.set(__self__, "namespace_name", namespace_name) - pulumi.set(__self__, "notification_hub_name", notification_hub_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + AuthorizationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_name=namespace_name, + notification_hub_name=notification_hub_name, + resource_group_name=resource_group_name, + listen=listen, + manage=manage, + name=name, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_name: Optional[pulumi.Input[str]] = None, + notification_hub_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if namespace_name is None: + raise TypeError("Missing 'namespace_name' argument") + if notification_hub_name is None and 'notificationHubName' in kwargs: + notification_hub_name = kwargs['notificationHubName'] + if notification_hub_name is None: + raise TypeError("Missing 'notification_hub_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("namespace_name", namespace_name) + _setter("notification_hub_name", notification_hub_name) + _setter("resource_group_name", resource_group_name) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="namespaceName") @@ -158,24 +193,61 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_access_key: The Secondary Access Key associated with this Authorization Rule. :param pulumi.Input[bool] send: Does this Authorization Rule have Send access to the Notification Hub? Defaults to `false`. """ + _AuthorizationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + listen=listen, + manage=manage, + name=name, + namespace_name=namespace_name, + notification_hub_name=notification_hub_name, + primary_access_key=primary_access_key, + resource_group_name=resource_group_name, + secondary_access_key=secondary_access_key, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + notification_hub_name: Optional[pulumi.Input[str]] = None, + primary_access_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_access_key: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if notification_hub_name is None and 'notificationHubName' in kwargs: + notification_hub_name = kwargs['notificationHubName'] + if primary_access_key is None and 'primaryAccessKey' in kwargs: + primary_access_key = kwargs['primaryAccessKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_access_key is None and 'secondaryAccessKey' in kwargs: + secondary_access_key = kwargs['secondaryAccessKey'] + if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if notification_hub_name is not None: - pulumi.set(__self__, "notification_hub_name", notification_hub_name) + _setter("notification_hub_name", notification_hub_name) if primary_access_key is not None: - pulumi.set(__self__, "primary_access_key", primary_access_key) + _setter("primary_access_key", primary_access_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_access_key is not None: - pulumi.set(__self__, "secondary_access_key", secondary_access_key) + _setter("secondary_access_key", secondary_access_key) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter @@ -401,6 +473,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AuthorizationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/notificationhub/get_hub.py b/sdk/python/pulumi_azure/notificationhub/get_hub.py index 94ca56dcb0..4c88d1270a 100644 --- a/sdk/python/pulumi_azure/notificationhub/get_hub.py +++ b/sdk/python/pulumi_azure/notificationhub/get_hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/notificationhub/get_namespace.py b/sdk/python/pulumi_azure/notificationhub/get_namespace.py index f8a55434f5..0cf3a29759 100644 --- a/sdk/python/pulumi_azure/notificationhub/get_namespace.py +++ b/sdk/python/pulumi_azure/notificationhub/get_namespace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/notificationhub/hub.py b/sdk/python/pulumi_azure/notificationhub/hub.py index 69515662aa..ca0a62211d 100644 --- a/sdk/python/pulumi_azure/notificationhub/hub.py +++ b/sdk/python/pulumi_azure/notificationhub/hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,18 +37,53 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name to use for this Notification Hub. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "namespace_name", namespace_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + HubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_name=namespace_name, + resource_group_name=resource_group_name, + apns_credential=apns_credential, + gcm_credential=gcm_credential, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + apns_credential: Optional[pulumi.Input['HubApnsCredentialArgs']] = None, + gcm_credential: Optional[pulumi.Input['HubGcmCredentialArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if namespace_name is None: + raise TypeError("Missing 'namespace_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if apns_credential is None and 'apnsCredential' in kwargs: + apns_credential = kwargs['apnsCredential'] + if gcm_credential is None and 'gcmCredential' in kwargs: + gcm_credential = kwargs['gcmCredential'] + + _setter("namespace_name", namespace_name) + _setter("resource_group_name", resource_group_name) if apns_credential is not None: - pulumi.set(__self__, "apns_credential", apns_credential) + _setter("apns_credential", apns_credential) if gcm_credential is not None: - pulumi.set(__self__, "gcm_credential", gcm_credential) + _setter("gcm_credential", gcm_credential) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="namespaceName") @@ -163,20 +198,51 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _HubState._configure( + lambda key, value: pulumi.set(__self__, key, value), + apns_credential=apns_credential, + gcm_credential=gcm_credential, + location=location, + name=name, + namespace_name=namespace_name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + apns_credential: Optional[pulumi.Input['HubApnsCredentialArgs']] = None, + gcm_credential: Optional[pulumi.Input['HubGcmCredentialArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if apns_credential is None and 'apnsCredential' in kwargs: + apns_credential = kwargs['apnsCredential'] + if gcm_credential is None and 'gcmCredential' in kwargs: + gcm_credential = kwargs['gcmCredential'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if apns_credential is not None: - pulumi.set(__self__, "apns_credential", apns_credential) + _setter("apns_credential", apns_credential) if gcm_credential is not None: - pulumi.set(__self__, "gcm_credential", gcm_credential) + _setter("gcm_credential", gcm_credential) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="apnsCredential") @@ -368,6 +434,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HubArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -389,7 +459,17 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = HubArgs.__new__(HubArgs) + if apns_credential is not None and not isinstance(apns_credential, HubApnsCredentialArgs): + apns_credential = apns_credential or {} + def _setter(key, value): + apns_credential[key] = value + HubApnsCredentialArgs._configure(_setter, **apns_credential) __props__.__dict__["apns_credential"] = apns_credential + if gcm_credential is not None and not isinstance(gcm_credential, HubGcmCredentialArgs): + gcm_credential = gcm_credential or {} + def _setter(key, value): + gcm_credential[key] = value + HubGcmCredentialArgs._configure(_setter, **gcm_credential) __props__.__dict__["gcm_credential"] = gcm_credential __props__.__dict__["location"] = location __props__.__dict__["name"] = name diff --git a/sdk/python/pulumi_azure/notificationhub/namespace.py b/sdk/python/pulumi_azure/notificationhub/namespace.py index edd9bce28f..fcb20fd489 100644 --- a/sdk/python/pulumi_azure/notificationhub/namespace.py +++ b/sdk/python/pulumi_azure/notificationhub/namespace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NamespaceArgs', 'Namespace'] @@ -31,17 +31,52 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "namespace_type", namespace_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + NamespaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_type=namespace_type, + resource_group_name=resource_group_name, + sku_name=sku_name, + enabled=enabled, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_type is None and 'namespaceType' in kwargs: + namespace_type = kwargs['namespaceType'] + if namespace_type is None: + raise TypeError("Missing 'namespace_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + + _setter("namespace_type", namespace_type) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="namespaceType") @@ -150,22 +185,55 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_name: The name of the SKU to use for this Notification Hub Namespace. Possible values are `Free`, `Basic` or `Standard`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _NamespaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + location=location, + name=name, + namespace_type=namespace_type, + resource_group_name=resource_group_name, + servicebus_endpoint=servicebus_endpoint, + sku_name=sku_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + servicebus_endpoint: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_type is None and 'namespaceType' in kwargs: + namespace_type = kwargs['namespaceType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if servicebus_endpoint is None and 'servicebusEndpoint' in kwargs: + servicebus_endpoint = kwargs['servicebusEndpoint'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_type is not None: - pulumi.set(__self__, "namespace_type", namespace_type) + _setter("namespace_type", namespace_type) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if servicebus_endpoint is not None: - pulumi.set(__self__, "servicebus_endpoint", servicebus_endpoint) + _setter("servicebus_endpoint", servicebus_endpoint) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -353,6 +421,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NamespaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/notificationhub/outputs.py b/sdk/python/pulumi_azure/notificationhub/outputs.py index 6ed1678d39..5dabb3a068 100644 --- a/sdk/python/pulumi_azure/notificationhub/outputs.py +++ b/sdk/python/pulumi_azure/notificationhub/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -55,11 +55,48 @@ def __init__(__self__, *, :param str team_id: The ID of the team the Token. :param str token: The Push Token associated with the Apple Developer Account. This is the contents of the `key` downloaded from [the Apple Developer Portal](https://developer.apple.com/account/ios/authkey/) between the `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----` blocks. """ - pulumi.set(__self__, "application_mode", application_mode) - pulumi.set(__self__, "bundle_id", bundle_id) - pulumi.set(__self__, "key_id", key_id) - pulumi.set(__self__, "team_id", team_id) - pulumi.set(__self__, "token", token) + HubApnsCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_mode=application_mode, + bundle_id=bundle_id, + key_id=key_id, + team_id=team_id, + token=token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_mode: Optional[str] = None, + bundle_id: Optional[str] = None, + key_id: Optional[str] = None, + team_id: Optional[str] = None, + token: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_mode is None and 'applicationMode' in kwargs: + application_mode = kwargs['applicationMode'] + if application_mode is None: + raise TypeError("Missing 'application_mode' argument") + if bundle_id is None and 'bundleId' in kwargs: + bundle_id = kwargs['bundleId'] + if bundle_id is None: + raise TypeError("Missing 'bundle_id' argument") + if key_id is None and 'keyId' in kwargs: + key_id = kwargs['keyId'] + if key_id is None: + raise TypeError("Missing 'key_id' argument") + if team_id is None and 'teamId' in kwargs: + team_id = kwargs['teamId'] + if team_id is None: + raise TypeError("Missing 'team_id' argument") + if token is None: + raise TypeError("Missing 'token' argument") + + _setter("application_mode", application_mode) + _setter("bundle_id", bundle_id) + _setter("key_id", key_id) + _setter("team_id", team_id) + _setter("token", token) @property @pulumi.getter(name="applicationMode") @@ -126,7 +163,22 @@ def __init__(__self__, *, """ :param str api_key: The API Key associated with the Google Cloud Messaging service. """ - pulumi.set(__self__, "api_key", api_key) + HubGcmCredential._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_key=api_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_key is None and 'apiKey' in kwargs: + api_key = kwargs['apiKey'] + if api_key is None: + raise TypeError("Missing 'api_key' argument") + + _setter("api_key", api_key) @property @pulumi.getter(name="apiKey") @@ -152,11 +204,48 @@ def __init__(__self__, *, :param str team_id: The ID of the team the Token. :param str token: The Push Token associated with the Apple Developer Account. """ - pulumi.set(__self__, "application_mode", application_mode) - pulumi.set(__self__, "bundle_id", bundle_id) - pulumi.set(__self__, "key_id", key_id) - pulumi.set(__self__, "team_id", team_id) - pulumi.set(__self__, "token", token) + GetHubApnsCredentialResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_mode=application_mode, + bundle_id=bundle_id, + key_id=key_id, + team_id=team_id, + token=token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_mode: Optional[str] = None, + bundle_id: Optional[str] = None, + key_id: Optional[str] = None, + team_id: Optional[str] = None, + token: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_mode is None and 'applicationMode' in kwargs: + application_mode = kwargs['applicationMode'] + if application_mode is None: + raise TypeError("Missing 'application_mode' argument") + if bundle_id is None and 'bundleId' in kwargs: + bundle_id = kwargs['bundleId'] + if bundle_id is None: + raise TypeError("Missing 'bundle_id' argument") + if key_id is None and 'keyId' in kwargs: + key_id = kwargs['keyId'] + if key_id is None: + raise TypeError("Missing 'key_id' argument") + if team_id is None and 'teamId' in kwargs: + team_id = kwargs['teamId'] + if team_id is None: + raise TypeError("Missing 'team_id' argument") + if token is None: + raise TypeError("Missing 'token' argument") + + _setter("application_mode", application_mode) + _setter("bundle_id", bundle_id) + _setter("key_id", key_id) + _setter("team_id", team_id) + _setter("token", token) @property @pulumi.getter(name="applicationMode") @@ -206,7 +295,22 @@ def __init__(__self__, *, """ :param str api_key: The API Key associated with the Google Cloud Messaging service. """ - pulumi.set(__self__, "api_key", api_key) + GetHubGcmCredentialResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_key=api_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_key is None and 'apiKey' in kwargs: + api_key = kwargs['apiKey'] + if api_key is None: + raise TypeError("Missing 'api_key' argument") + + _setter("api_key", api_key) @property @pulumi.getter(name="apiKey") @@ -224,7 +328,20 @@ def __init__(__self__, *, """ :param str name: Specifies the Name of the Notification Hub Namespace. """ - pulumi.set(__self__, "name", name) + GetNamespaceSkuResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/operationalinsights/_inputs.py b/sdk/python/pulumi_azure/operationalinsights/_inputs.py index e74490f074..10cb5ad03d 100644 --- a/sdk/python/pulumi_azure/operationalinsights/_inputs.py +++ b/sdk/python/pulumi_azure/operationalinsights/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -25,12 +25,35 @@ def __init__(__self__, *, :param pulumi.Input[str] publisher: The publisher of the solution. For example `Microsoft`. Changing this forces a new resource to be created. :param pulumi.Input[str] promotion_code: A promotion code to be used with the solution. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + AnalyticsSolutionPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + product=product, + publisher=publisher, + name=name, + promotion_code=promotion_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + product: Optional[pulumi.Input[str]] = None, + publisher: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + promotion_code: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if promotion_code is None and 'promotionCode' in kwargs: + promotion_code = kwargs['promotionCode'] + + _setter("product", product) + _setter("publisher", publisher) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if promotion_code is not None: - pulumi.set(__self__, "promotion_code", promotion_code) + _setter("promotion_code", promotion_code) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/operationalinsights/analytics_solution.py b/sdk/python/pulumi_azure/operationalinsights/analytics_solution.py index 3b09646188..d4ec9599b1 100644 --- a/sdk/python/pulumi_azure/operationalinsights/analytics_solution.py +++ b/sdk/python/pulumi_azure/operationalinsights/analytics_solution.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,15 +33,56 @@ def __init__(__self__, *, :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "plan", plan) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "solution_name", solution_name) - pulumi.set(__self__, "workspace_name", workspace_name) - pulumi.set(__self__, "workspace_resource_id", workspace_resource_id) + AnalyticsSolutionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + plan=plan, + resource_group_name=resource_group_name, + solution_name=solution_name, + workspace_name=workspace_name, + workspace_resource_id=workspace_resource_id, + location=location, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + plan: Optional[pulumi.Input['AnalyticsSolutionPlanArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + solution_name: Optional[pulumi.Input[str]] = None, + workspace_name: Optional[pulumi.Input[str]] = None, + workspace_resource_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if plan is None: + raise TypeError("Missing 'plan' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if solution_name is None and 'solutionName' in kwargs: + solution_name = kwargs['solutionName'] + if solution_name is None: + raise TypeError("Missing 'solution_name' argument") + if workspace_name is None and 'workspaceName' in kwargs: + workspace_name = kwargs['workspaceName'] + if workspace_name is None: + raise TypeError("Missing 'workspace_name' argument") + if workspace_resource_id is None and 'workspaceResourceId' in kwargs: + workspace_resource_id = kwargs['workspaceResourceId'] + if workspace_resource_id is None: + raise TypeError("Missing 'workspace_resource_id' argument") + + _setter("plan", plan) + _setter("resource_group_name", resource_group_name) + _setter("solution_name", solution_name) + _setter("workspace_name", workspace_name) + _setter("workspace_resource_id", workspace_resource_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -148,20 +189,51 @@ def __init__(__self__, *, :param pulumi.Input[str] workspace_name: The full name of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created. :param pulumi.Input[str] workspace_resource_id: The full resource ID of the Log Analytics workspace with which the solution will be linked. Changing this forces a new resource to be created. """ + _AnalyticsSolutionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + plan=plan, + resource_group_name=resource_group_name, + solution_name=solution_name, + tags=tags, + workspace_name=workspace_name, + workspace_resource_id=workspace_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + plan: Optional[pulumi.Input['AnalyticsSolutionPlanArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + solution_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workspace_name: Optional[pulumi.Input[str]] = None, + workspace_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if solution_name is None and 'solutionName' in kwargs: + solution_name = kwargs['solutionName'] + if workspace_name is None and 'workspaceName' in kwargs: + workspace_name = kwargs['workspaceName'] + if workspace_resource_id is None and 'workspaceResourceId' in kwargs: + workspace_resource_id = kwargs['workspaceResourceId'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if plan is not None: - pulumi.set(__self__, "plan", plan) + _setter("plan", plan) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if solution_name is not None: - pulumi.set(__self__, "solution_name", solution_name) + _setter("solution_name", solution_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if workspace_name is not None: - pulumi.set(__self__, "workspace_name", workspace_name) + _setter("workspace_name", workspace_name) if workspace_resource_id is not None: - pulumi.set(__self__, "workspace_resource_id", workspace_resource_id) + _setter("workspace_resource_id", workspace_resource_id) @property @pulumi.getter @@ -367,6 +439,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AnalyticsSolutionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -389,6 +465,11 @@ def _internal_init(__self__, __props__ = AnalyticsSolutionArgs.__new__(AnalyticsSolutionArgs) __props__.__dict__["location"] = location + if plan is not None and not isinstance(plan, AnalyticsSolutionPlanArgs): + plan = plan or {} + def _setter(key, value): + plan[key] = value + AnalyticsSolutionPlanArgs._configure(_setter, **plan) if plan is None and not opts.urn: raise TypeError("Missing required property 'plan'") __props__.__dict__["plan"] = plan diff --git a/sdk/python/pulumi_azure/operationalinsights/analytics_workspace.py b/sdk/python/pulumi_azure/operationalinsights/analytics_workspace.py index 26722df060..47290919e8 100644 --- a/sdk/python/pulumi_azure/operationalinsights/analytics_workspace.py +++ b/sdk/python/pulumi_azure/operationalinsights/analytics_workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AnalyticsWorkspaceArgs', 'AnalyticsWorkspace'] @@ -57,33 +57,92 @@ def __init__(__self__, *, > **NOTE:** If a `operationalinsights.AnalyticsWorkspace` is connected to a `loganalytics.Cluster` via a `loganalytics.LinkedService` you will not be able to modify the workspaces `sku` field until the link between the workspace and the cluster has been broken by deleting the `loganalytics.LinkedService` resource. All other fields are modifiable while the workspace is linked to a cluster. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + AnalyticsWorkspaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + allow_resource_only_permissions=allow_resource_only_permissions, + cmk_for_query_forced=cmk_for_query_forced, + daily_quota_gb=daily_quota_gb, + data_collection_rule_id=data_collection_rule_id, + internet_ingestion_enabled=internet_ingestion_enabled, + internet_query_enabled=internet_query_enabled, + local_authentication_disabled=local_authentication_disabled, + location=location, + name=name, + reservation_capacity_in_gb_per_day=reservation_capacity_in_gb_per_day, + retention_in_days=retention_in_days, + sku=sku, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + allow_resource_only_permissions: Optional[pulumi.Input[bool]] = None, + cmk_for_query_forced: Optional[pulumi.Input[bool]] = None, + daily_quota_gb: Optional[pulumi.Input[float]] = None, + data_collection_rule_id: Optional[pulumi.Input[str]] = None, + internet_ingestion_enabled: Optional[pulumi.Input[bool]] = None, + internet_query_enabled: Optional[pulumi.Input[bool]] = None, + local_authentication_disabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + reservation_capacity_in_gb_per_day: Optional[pulumi.Input[int]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if allow_resource_only_permissions is None and 'allowResourceOnlyPermissions' in kwargs: + allow_resource_only_permissions = kwargs['allowResourceOnlyPermissions'] + if cmk_for_query_forced is None and 'cmkForQueryForced' in kwargs: + cmk_for_query_forced = kwargs['cmkForQueryForced'] + if daily_quota_gb is None and 'dailyQuotaGb' in kwargs: + daily_quota_gb = kwargs['dailyQuotaGb'] + if data_collection_rule_id is None and 'dataCollectionRuleId' in kwargs: + data_collection_rule_id = kwargs['dataCollectionRuleId'] + if internet_ingestion_enabled is None and 'internetIngestionEnabled' in kwargs: + internet_ingestion_enabled = kwargs['internetIngestionEnabled'] + if internet_query_enabled is None and 'internetQueryEnabled' in kwargs: + internet_query_enabled = kwargs['internetQueryEnabled'] + if local_authentication_disabled is None and 'localAuthenticationDisabled' in kwargs: + local_authentication_disabled = kwargs['localAuthenticationDisabled'] + if reservation_capacity_in_gb_per_day is None and 'reservationCapacityInGbPerDay' in kwargs: + reservation_capacity_in_gb_per_day = kwargs['reservationCapacityInGbPerDay'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + + _setter("resource_group_name", resource_group_name) if allow_resource_only_permissions is not None: - pulumi.set(__self__, "allow_resource_only_permissions", allow_resource_only_permissions) + _setter("allow_resource_only_permissions", allow_resource_only_permissions) if cmk_for_query_forced is not None: - pulumi.set(__self__, "cmk_for_query_forced", cmk_for_query_forced) + _setter("cmk_for_query_forced", cmk_for_query_forced) if daily_quota_gb is not None: - pulumi.set(__self__, "daily_quota_gb", daily_quota_gb) + _setter("daily_quota_gb", daily_quota_gb) if data_collection_rule_id is not None: - pulumi.set(__self__, "data_collection_rule_id", data_collection_rule_id) + _setter("data_collection_rule_id", data_collection_rule_id) if internet_ingestion_enabled is not None: - pulumi.set(__self__, "internet_ingestion_enabled", internet_ingestion_enabled) + _setter("internet_ingestion_enabled", internet_ingestion_enabled) if internet_query_enabled is not None: - pulumi.set(__self__, "internet_query_enabled", internet_query_enabled) + _setter("internet_query_enabled", internet_query_enabled) if local_authentication_disabled is not None: - pulumi.set(__self__, "local_authentication_disabled", local_authentication_disabled) + _setter("local_authentication_disabled", local_authentication_disabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if reservation_capacity_in_gb_per_day is not None: - pulumi.set(__self__, "reservation_capacity_in_gb_per_day", reservation_capacity_in_gb_per_day) + _setter("reservation_capacity_in_gb_per_day", reservation_capacity_in_gb_per_day) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -318,40 +377,109 @@ def __init__(__self__, *, > **NOTE:** If a `operationalinsights.AnalyticsWorkspace` is connected to a `loganalytics.Cluster` via a `loganalytics.LinkedService` you will not be able to modify the workspaces `sku` field until the link between the workspace and the cluster has been broken by deleting the `loganalytics.LinkedService` resource. All other fields are modifiable while the workspace is linked to a cluster. :param pulumi.Input[str] workspace_id: The Workspace (or Customer) ID for the Log Analytics Workspace. """ + _AnalyticsWorkspaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_resource_only_permissions=allow_resource_only_permissions, + cmk_for_query_forced=cmk_for_query_forced, + daily_quota_gb=daily_quota_gb, + data_collection_rule_id=data_collection_rule_id, + internet_ingestion_enabled=internet_ingestion_enabled, + internet_query_enabled=internet_query_enabled, + local_authentication_disabled=local_authentication_disabled, + location=location, + name=name, + primary_shared_key=primary_shared_key, + reservation_capacity_in_gb_per_day=reservation_capacity_in_gb_per_day, + resource_group_name=resource_group_name, + retention_in_days=retention_in_days, + secondary_shared_key=secondary_shared_key, + sku=sku, + tags=tags, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_resource_only_permissions: Optional[pulumi.Input[bool]] = None, + cmk_for_query_forced: Optional[pulumi.Input[bool]] = None, + daily_quota_gb: Optional[pulumi.Input[float]] = None, + data_collection_rule_id: Optional[pulumi.Input[str]] = None, + internet_ingestion_enabled: Optional[pulumi.Input[bool]] = None, + internet_query_enabled: Optional[pulumi.Input[bool]] = None, + local_authentication_disabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_shared_key: Optional[pulumi.Input[str]] = None, + reservation_capacity_in_gb_per_day: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + secondary_shared_key: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_resource_only_permissions is None and 'allowResourceOnlyPermissions' in kwargs: + allow_resource_only_permissions = kwargs['allowResourceOnlyPermissions'] + if cmk_for_query_forced is None and 'cmkForQueryForced' in kwargs: + cmk_for_query_forced = kwargs['cmkForQueryForced'] + if daily_quota_gb is None and 'dailyQuotaGb' in kwargs: + daily_quota_gb = kwargs['dailyQuotaGb'] + if data_collection_rule_id is None and 'dataCollectionRuleId' in kwargs: + data_collection_rule_id = kwargs['dataCollectionRuleId'] + if internet_ingestion_enabled is None and 'internetIngestionEnabled' in kwargs: + internet_ingestion_enabled = kwargs['internetIngestionEnabled'] + if internet_query_enabled is None and 'internetQueryEnabled' in kwargs: + internet_query_enabled = kwargs['internetQueryEnabled'] + if local_authentication_disabled is None and 'localAuthenticationDisabled' in kwargs: + local_authentication_disabled = kwargs['localAuthenticationDisabled'] + if primary_shared_key is None and 'primarySharedKey' in kwargs: + primary_shared_key = kwargs['primarySharedKey'] + if reservation_capacity_in_gb_per_day is None and 'reservationCapacityInGbPerDay' in kwargs: + reservation_capacity_in_gb_per_day = kwargs['reservationCapacityInGbPerDay'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if secondary_shared_key is None and 'secondarySharedKey' in kwargs: + secondary_shared_key = kwargs['secondarySharedKey'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if allow_resource_only_permissions is not None: - pulumi.set(__self__, "allow_resource_only_permissions", allow_resource_only_permissions) + _setter("allow_resource_only_permissions", allow_resource_only_permissions) if cmk_for_query_forced is not None: - pulumi.set(__self__, "cmk_for_query_forced", cmk_for_query_forced) + _setter("cmk_for_query_forced", cmk_for_query_forced) if daily_quota_gb is not None: - pulumi.set(__self__, "daily_quota_gb", daily_quota_gb) + _setter("daily_quota_gb", daily_quota_gb) if data_collection_rule_id is not None: - pulumi.set(__self__, "data_collection_rule_id", data_collection_rule_id) + _setter("data_collection_rule_id", data_collection_rule_id) if internet_ingestion_enabled is not None: - pulumi.set(__self__, "internet_ingestion_enabled", internet_ingestion_enabled) + _setter("internet_ingestion_enabled", internet_ingestion_enabled) if internet_query_enabled is not None: - pulumi.set(__self__, "internet_query_enabled", internet_query_enabled) + _setter("internet_query_enabled", internet_query_enabled) if local_authentication_disabled is not None: - pulumi.set(__self__, "local_authentication_disabled", local_authentication_disabled) + _setter("local_authentication_disabled", local_authentication_disabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_shared_key is not None: - pulumi.set(__self__, "primary_shared_key", primary_shared_key) + _setter("primary_shared_key", primary_shared_key) if reservation_capacity_in_gb_per_day is not None: - pulumi.set(__self__, "reservation_capacity_in_gb_per_day", reservation_capacity_in_gb_per_day) + _setter("reservation_capacity_in_gb_per_day", reservation_capacity_in_gb_per_day) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) if secondary_shared_key is not None: - pulumi.set(__self__, "secondary_shared_key", secondary_shared_key) + _setter("secondary_shared_key", secondary_shared_key) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter(name="allowResourceOnlyPermissions") @@ -685,6 +813,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AnalyticsWorkspaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/operationalinsights/get_analytics_workspace.py b/sdk/python/pulumi_azure/operationalinsights/get_analytics_workspace.py index fffe3f53bd..a6a9e30cb6 100644 --- a/sdk/python/pulumi_azure/operationalinsights/get_analytics_workspace.py +++ b/sdk/python/pulumi_azure/operationalinsights/get_analytics_workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/operationalinsights/outputs.py b/sdk/python/pulumi_azure/operationalinsights/outputs.py index 9b5909e8c7..0b36c2beab 100644 --- a/sdk/python/pulumi_azure/operationalinsights/outputs.py +++ b/sdk/python/pulumi_azure/operationalinsights/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -42,12 +42,35 @@ def __init__(__self__, *, :param str publisher: The publisher of the solution. For example `Microsoft`. Changing this forces a new resource to be created. :param str promotion_code: A promotion code to be used with the solution. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "product", product) - pulumi.set(__self__, "publisher", publisher) + AnalyticsSolutionPlan._configure( + lambda key, value: pulumi.set(__self__, key, value), + product=product, + publisher=publisher, + name=name, + promotion_code=promotion_code, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + product: Optional[str] = None, + publisher: Optional[str] = None, + name: Optional[str] = None, + promotion_code: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if product is None: + raise TypeError("Missing 'product' argument") + if publisher is None: + raise TypeError("Missing 'publisher' argument") + if promotion_code is None and 'promotionCode' in kwargs: + promotion_code = kwargs['promotionCode'] + + _setter("product", product) + _setter("publisher", publisher) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if promotion_code is not None: - pulumi.set(__self__, "promotion_code", promotion_code) + _setter("promotion_code", promotion_code) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/operationalinsights/query_pack_query.py b/sdk/python/pulumi_azure/operationalinsights/query_pack_query.py index 5fce862065..967fdbfc85 100644 --- a/sdk/python/pulumi_azure/operationalinsights/query_pack_query.py +++ b/sdk/python/pulumi_azure/operationalinsights/query_pack_query.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['QueryPackQueryArgs', 'QueryPackQuery'] @@ -37,23 +37,66 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] solutions: A list of the related Log Analytics solutions for the function. Possible values are `AADDomainServices`, `ADAssessment`, `ADAssessmentPlus`, `ADReplication`, `ADSecurityAssessment`, `AlertManagement`, `AntiMalware`, `ApplicationInsights`, `AzureAssessment`, `AzureSecurityOfThings`, `AzureSentinelDSRE`, `AzureSentinelPrivatePreview`, `BehaviorAnalyticsInsights`, `ChangeTracking`, `CompatibilityAssessment`, `ContainerInsights`, `Containers`, `CustomizedWindowsEventsFiltering`, `DeviceHealthProd`, `DnsAnalytics`, `ExchangeAssessment`, `ExchangeOnlineAssessment`, `IISAssessmentPlus`, `InfrastructureInsights`, `InternalWindowsEvent`, `LogManagement`, `Microsoft365Analytics`, `NetworkMonitoring`, `SCCMAssessmentPlus`, `SCOMAssessment`, `SCOMAssessmentPlus`, `Security`, `SecurityCenter`, `SecurityCenterFree`, `SecurityInsights`, `ServiceMap`, `SfBAssessment`, `SfBOnlineAssessment`, `SharePointOnlineAssessment`, `SPAssessment`, `SQLAdvancedThreatProtection`, `SQLAssessment`, `SQLAssessmentPlus`, `SQLDataClassification`, `SQLThreatDetection`, `SQLVulnerabilityAssessment`, `SurfaceHub`, `Updates`, `VMInsights`, `WEFInternalUat`, `WEF_10x`, `WEF_10xDSRE`, `WaaSUpdateInsights`, `WinLog`, `WindowsClientAssessmentPlus`, `WindowsEventForwarding`, `WindowsFirewall`, `WindowsServerAssessment`, `WireData` and `WireData2`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Log Analytics Query Pack Query. """ - pulumi.set(__self__, "body", body) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "query_pack_id", query_pack_id) + QueryPackQueryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + body=body, + display_name=display_name, + query_pack_id=query_pack_id, + additional_settings_json=additional_settings_json, + categories=categories, + description=description, + name=name, + resource_types=resource_types, + solutions=solutions, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + body: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + query_pack_id: Optional[pulumi.Input[str]] = None, + additional_settings_json: Optional[pulumi.Input[str]] = None, + categories: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + solutions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if body is None: + raise TypeError("Missing 'body' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if query_pack_id is None and 'queryPackId' in kwargs: + query_pack_id = kwargs['queryPackId'] + if query_pack_id is None: + raise TypeError("Missing 'query_pack_id' argument") + if additional_settings_json is None and 'additionalSettingsJson' in kwargs: + additional_settings_json = kwargs['additionalSettingsJson'] + if resource_types is None and 'resourceTypes' in kwargs: + resource_types = kwargs['resourceTypes'] + + _setter("body", body) + _setter("display_name", display_name) + _setter("query_pack_id", query_pack_id) if additional_settings_json is not None: - pulumi.set(__self__, "additional_settings_json", additional_settings_json) + _setter("additional_settings_json", additional_settings_json) if categories is not None: - pulumi.set(__self__, "categories", categories) + _setter("categories", categories) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_types is not None: - pulumi.set(__self__, "resource_types", resource_types) + _setter("resource_types", resource_types) if solutions is not None: - pulumi.set(__self__, "solutions", solutions) + _setter("solutions", solutions) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -202,26 +245,63 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] solutions: A list of the related Log Analytics solutions for the function. Possible values are `AADDomainServices`, `ADAssessment`, `ADAssessmentPlus`, `ADReplication`, `ADSecurityAssessment`, `AlertManagement`, `AntiMalware`, `ApplicationInsights`, `AzureAssessment`, `AzureSecurityOfThings`, `AzureSentinelDSRE`, `AzureSentinelPrivatePreview`, `BehaviorAnalyticsInsights`, `ChangeTracking`, `CompatibilityAssessment`, `ContainerInsights`, `Containers`, `CustomizedWindowsEventsFiltering`, `DeviceHealthProd`, `DnsAnalytics`, `ExchangeAssessment`, `ExchangeOnlineAssessment`, `IISAssessmentPlus`, `InfrastructureInsights`, `InternalWindowsEvent`, `LogManagement`, `Microsoft365Analytics`, `NetworkMonitoring`, `SCCMAssessmentPlus`, `SCOMAssessment`, `SCOMAssessmentPlus`, `Security`, `SecurityCenter`, `SecurityCenterFree`, `SecurityInsights`, `ServiceMap`, `SfBAssessment`, `SfBOnlineAssessment`, `SharePointOnlineAssessment`, `SPAssessment`, `SQLAdvancedThreatProtection`, `SQLAssessment`, `SQLAssessmentPlus`, `SQLDataClassification`, `SQLThreatDetection`, `SQLVulnerabilityAssessment`, `SurfaceHub`, `Updates`, `VMInsights`, `WEFInternalUat`, `WEF_10x`, `WEF_10xDSRE`, `WaaSUpdateInsights`, `WinLog`, `WindowsClientAssessmentPlus`, `WindowsEventForwarding`, `WindowsFirewall`, `WindowsServerAssessment`, `WireData` and `WireData2`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Log Analytics Query Pack Query. """ + _QueryPackQueryState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_settings_json=additional_settings_json, + body=body, + categories=categories, + description=description, + display_name=display_name, + name=name, + query_pack_id=query_pack_id, + resource_types=resource_types, + solutions=solutions, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_settings_json: Optional[pulumi.Input[str]] = None, + body: Optional[pulumi.Input[str]] = None, + categories: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + query_pack_id: Optional[pulumi.Input[str]] = None, + resource_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + solutions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_settings_json is None and 'additionalSettingsJson' in kwargs: + additional_settings_json = kwargs['additionalSettingsJson'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if query_pack_id is None and 'queryPackId' in kwargs: + query_pack_id = kwargs['queryPackId'] + if resource_types is None and 'resourceTypes' in kwargs: + resource_types = kwargs['resourceTypes'] + if additional_settings_json is not None: - pulumi.set(__self__, "additional_settings_json", additional_settings_json) + _setter("additional_settings_json", additional_settings_json) if body is not None: - pulumi.set(__self__, "body", body) + _setter("body", body) if categories is not None: - pulumi.set(__self__, "categories", categories) + _setter("categories", categories) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if query_pack_id is not None: - pulumi.set(__self__, "query_pack_id", query_pack_id) + _setter("query_pack_id", query_pack_id) if resource_types is not None: - pulumi.set(__self__, "resource_types", resource_types) + _setter("resource_types", resource_types) if solutions is not None: - pulumi.set(__self__, "solutions", solutions) + _setter("solutions", solutions) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="additionalSettingsJson") @@ -467,6 +547,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + QueryPackQueryArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/orbital/_inputs.py b/sdk/python/pulumi_azure/orbital/_inputs.py index 8102485e98..2d8c494090 100644 --- a/sdk/python/pulumi_azure/orbital/_inputs.py +++ b/sdk/python/pulumi_azure/orbital/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -29,10 +29,35 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Name of the link. :param pulumi.Input[str] polarization: Polarization of the link. Possible values are `LHCP`, `RHCP`, `linearVertical` and `linearHorizontal`. """ - pulumi.set(__self__, "channels", channels) - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "polarization", polarization) + ContactProfileLinkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + channels=channels, + direction=direction, + name=name, + polarization=polarization, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + channels: Optional[pulumi.Input[Sequence[pulumi.Input['ContactProfileLinkChannelArgs']]]] = None, + direction: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + polarization: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if channels is None: + raise TypeError("Missing 'channels' argument") + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if polarization is None: + raise TypeError("Missing 'polarization' argument") + + _setter("channels", channels) + _setter("direction", direction) + _setter("name", name) + _setter("polarization", polarization) @property @pulumi.getter @@ -100,14 +125,53 @@ def __init__(__self__, *, :param pulumi.Input[str] demodulation_configuration: Copy of the modem configuration file such as Kratos QRadio or Kratos QuantumRx. Only valid for downlink directions. If provided, the modem connects to the customer endpoint and sends demodulated data instead of a VITA.49 stream. :param pulumi.Input[str] modulation_configuration: Copy of the modem configuration file such as Kratos QRadio. Only valid for uplink directions. If provided, the modem connects to the customer endpoint and accepts commands from the customer instead of a VITA.49 stream. """ - pulumi.set(__self__, "bandwidth_mhz", bandwidth_mhz) - pulumi.set(__self__, "center_frequency_mhz", center_frequency_mhz) - pulumi.set(__self__, "end_points", end_points) - pulumi.set(__self__, "name", name) + ContactProfileLinkChannelArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bandwidth_mhz=bandwidth_mhz, + center_frequency_mhz=center_frequency_mhz, + end_points=end_points, + name=name, + demodulation_configuration=demodulation_configuration, + modulation_configuration=modulation_configuration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bandwidth_mhz: Optional[pulumi.Input[float]] = None, + center_frequency_mhz: Optional[pulumi.Input[float]] = None, + end_points: Optional[pulumi.Input[Sequence[pulumi.Input['ContactProfileLinkChannelEndPointArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + demodulation_configuration: Optional[pulumi.Input[str]] = None, + modulation_configuration: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bandwidth_mhz is None and 'bandwidthMhz' in kwargs: + bandwidth_mhz = kwargs['bandwidthMhz'] + if bandwidth_mhz is None: + raise TypeError("Missing 'bandwidth_mhz' argument") + if center_frequency_mhz is None and 'centerFrequencyMhz' in kwargs: + center_frequency_mhz = kwargs['centerFrequencyMhz'] + if center_frequency_mhz is None: + raise TypeError("Missing 'center_frequency_mhz' argument") + if end_points is None and 'endPoints' in kwargs: + end_points = kwargs['endPoints'] + if end_points is None: + raise TypeError("Missing 'end_points' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if demodulation_configuration is None and 'demodulationConfiguration' in kwargs: + demodulation_configuration = kwargs['demodulationConfiguration'] + if modulation_configuration is None and 'modulationConfiguration' in kwargs: + modulation_configuration = kwargs['modulationConfiguration'] + + _setter("bandwidth_mhz", bandwidth_mhz) + _setter("center_frequency_mhz", center_frequency_mhz) + _setter("end_points", end_points) + _setter("name", name) if demodulation_configuration is not None: - pulumi.set(__self__, "demodulation_configuration", demodulation_configuration) + _setter("demodulation_configuration", demodulation_configuration) if modulation_configuration is not None: - pulumi.set(__self__, "modulation_configuration", modulation_configuration) + _setter("modulation_configuration", modulation_configuration) @property @pulumi.getter(name="bandwidthMhz") @@ -195,11 +259,38 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol: Protocol of an end point. Possible values are `TCP` and `UDP`. :param pulumi.Input[str] ip_address: IP address of an end point. """ - pulumi.set(__self__, "end_point_name", end_point_name) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "protocol", protocol) + ContactProfileLinkChannelEndPointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_point_name=end_point_name, + port=port, + protocol=protocol, + ip_address=ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_point_name: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_point_name is None and 'endPointName' in kwargs: + end_point_name = kwargs['endPointName'] + if end_point_name is None: + raise TypeError("Missing 'end_point_name' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + + _setter("end_point_name", end_point_name) + _setter("port", port) + _setter("protocol", protocol) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) @property @pulumi.getter(name="endPointName") @@ -265,11 +356,44 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Name of the link. :param pulumi.Input[str] polarization: Polarization. Possible values are `RHCP`, `LHCP`, `linearVertical` and `linearHorizontal`. """ - pulumi.set(__self__, "bandwidth_mhz", bandwidth_mhz) - pulumi.set(__self__, "center_frequency_mhz", center_frequency_mhz) - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "polarization", polarization) + SpacecraftLinkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + bandwidth_mhz=bandwidth_mhz, + center_frequency_mhz=center_frequency_mhz, + direction=direction, + name=name, + polarization=polarization, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bandwidth_mhz: Optional[pulumi.Input[float]] = None, + center_frequency_mhz: Optional[pulumi.Input[float]] = None, + direction: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + polarization: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bandwidth_mhz is None and 'bandwidthMhz' in kwargs: + bandwidth_mhz = kwargs['bandwidthMhz'] + if bandwidth_mhz is None: + raise TypeError("Missing 'bandwidth_mhz' argument") + if center_frequency_mhz is None and 'centerFrequencyMhz' in kwargs: + center_frequency_mhz = kwargs['centerFrequencyMhz'] + if center_frequency_mhz is None: + raise TypeError("Missing 'center_frequency_mhz' argument") + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if polarization is None: + raise TypeError("Missing 'polarization' argument") + + _setter("bandwidth_mhz", bandwidth_mhz) + _setter("center_frequency_mhz", center_frequency_mhz) + _setter("direction", direction) + _setter("name", name) + _setter("polarization", polarization) @property @pulumi.getter(name="bandwidthMhz") diff --git a/sdk/python/pulumi_azure/orbital/contact.py b/sdk/python/pulumi_azure/orbital/contact.py index eb6220c0da..ae03b643a6 100644 --- a/sdk/python/pulumi_azure/orbital/contact.py +++ b/sdk/python/pulumi_azure/orbital/contact.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ContactArgs', 'Contact'] @@ -29,13 +29,54 @@ def __init__(__self__, *, :param pulumi.Input[str] spacecraft_id: The ID of the spacecraft which the contact will be made to. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the Contact. Changing this forces a new resource to be created. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "contact_profile_id", contact_profile_id) - pulumi.set(__self__, "ground_station_name", ground_station_name) - pulumi.set(__self__, "reservation_end_time", reservation_end_time) - pulumi.set(__self__, "reservation_start_time", reservation_start_time) - pulumi.set(__self__, "spacecraft_id", spacecraft_id) + ContactArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + contact_profile_id=contact_profile_id, + ground_station_name=ground_station_name, + reservation_end_time=reservation_end_time, + reservation_start_time=reservation_start_time, + spacecraft_id=spacecraft_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contact_profile_id: Optional[pulumi.Input[str]] = None, + ground_station_name: Optional[pulumi.Input[str]] = None, + reservation_end_time: Optional[pulumi.Input[str]] = None, + reservation_start_time: Optional[pulumi.Input[str]] = None, + spacecraft_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if contact_profile_id is None and 'contactProfileId' in kwargs: + contact_profile_id = kwargs['contactProfileId'] + if contact_profile_id is None: + raise TypeError("Missing 'contact_profile_id' argument") + if ground_station_name is None and 'groundStationName' in kwargs: + ground_station_name = kwargs['groundStationName'] + if ground_station_name is None: + raise TypeError("Missing 'ground_station_name' argument") + if reservation_end_time is None and 'reservationEndTime' in kwargs: + reservation_end_time = kwargs['reservationEndTime'] + if reservation_end_time is None: + raise TypeError("Missing 'reservation_end_time' argument") + if reservation_start_time is None and 'reservationStartTime' in kwargs: + reservation_start_time = kwargs['reservationStartTime'] + if reservation_start_time is None: + raise TypeError("Missing 'reservation_start_time' argument") + if spacecraft_id is None and 'spacecraftId' in kwargs: + spacecraft_id = kwargs['spacecraftId'] + if spacecraft_id is None: + raise TypeError("Missing 'spacecraft_id' argument") + + _setter("contact_profile_id", contact_profile_id) + _setter("ground_station_name", ground_station_name) + _setter("reservation_end_time", reservation_end_time) + _setter("reservation_start_time", reservation_start_time) + _setter("spacecraft_id", spacecraft_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="contactProfileId") @@ -128,18 +169,49 @@ def __init__(__self__, *, :param pulumi.Input[str] reservation_start_time: Reservation start time of the Contact. Changing this forces a new resource to be created. :param pulumi.Input[str] spacecraft_id: The ID of the spacecraft which the contact will be made to. Changing this forces a new resource to be created. """ + _ContactState._configure( + lambda key, value: pulumi.set(__self__, key, value), + contact_profile_id=contact_profile_id, + ground_station_name=ground_station_name, + name=name, + reservation_end_time=reservation_end_time, + reservation_start_time=reservation_start_time, + spacecraft_id=spacecraft_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + contact_profile_id: Optional[pulumi.Input[str]] = None, + ground_station_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + reservation_end_time: Optional[pulumi.Input[str]] = None, + reservation_start_time: Optional[pulumi.Input[str]] = None, + spacecraft_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if contact_profile_id is None and 'contactProfileId' in kwargs: + contact_profile_id = kwargs['contactProfileId'] + if ground_station_name is None and 'groundStationName' in kwargs: + ground_station_name = kwargs['groundStationName'] + if reservation_end_time is None and 'reservationEndTime' in kwargs: + reservation_end_time = kwargs['reservationEndTime'] + if reservation_start_time is None and 'reservationStartTime' in kwargs: + reservation_start_time = kwargs['reservationStartTime'] + if spacecraft_id is None and 'spacecraftId' in kwargs: + spacecraft_id = kwargs['spacecraftId'] + if contact_profile_id is not None: - pulumi.set(__self__, "contact_profile_id", contact_profile_id) + _setter("contact_profile_id", contact_profile_id) if ground_station_name is not None: - pulumi.set(__self__, "ground_station_name", ground_station_name) + _setter("ground_station_name", ground_station_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if reservation_end_time is not None: - pulumi.set(__self__, "reservation_end_time", reservation_end_time) + _setter("reservation_end_time", reservation_end_time) if reservation_start_time is not None: - pulumi.set(__self__, "reservation_start_time", reservation_start_time) + _setter("reservation_start_time", reservation_start_time) if spacecraft_id is not None: - pulumi.set(__self__, "spacecraft_id", spacecraft_id) + _setter("spacecraft_id", spacecraft_id) @property @pulumi.getter(name="contactProfileId") @@ -425,6 +497,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ContactArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/orbital/contact_profile.py b/sdk/python/pulumi_azure/orbital/contact_profile.py index 873c370006..cf3420033d 100644 --- a/sdk/python/pulumi_azure/orbital/contact_profile.py +++ b/sdk/python/pulumi_azure/orbital/contact_profile.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,21 +39,72 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the contact profile. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "auto_tracking", auto_tracking) - pulumi.set(__self__, "links", links) - pulumi.set(__self__, "minimum_variable_contact_duration", minimum_variable_contact_duration) - pulumi.set(__self__, "network_configuration_subnet_id", network_configuration_subnet_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ContactProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_tracking=auto_tracking, + links=links, + minimum_variable_contact_duration=minimum_variable_contact_duration, + network_configuration_subnet_id=network_configuration_subnet_id, + resource_group_name=resource_group_name, + event_hub_uri=event_hub_uri, + location=location, + minimum_elevation_degrees=minimum_elevation_degrees, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_tracking: Optional[pulumi.Input[str]] = None, + links: Optional[pulumi.Input[Sequence[pulumi.Input['ContactProfileLinkArgs']]]] = None, + minimum_variable_contact_duration: Optional[pulumi.Input[str]] = None, + network_configuration_subnet_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + event_hub_uri: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_elevation_degrees: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_tracking is None and 'autoTracking' in kwargs: + auto_tracking = kwargs['autoTracking'] + if auto_tracking is None: + raise TypeError("Missing 'auto_tracking' argument") + if links is None: + raise TypeError("Missing 'links' argument") + if minimum_variable_contact_duration is None and 'minimumVariableContactDuration' in kwargs: + minimum_variable_contact_duration = kwargs['minimumVariableContactDuration'] + if minimum_variable_contact_duration is None: + raise TypeError("Missing 'minimum_variable_contact_duration' argument") + if network_configuration_subnet_id is None and 'networkConfigurationSubnetId' in kwargs: + network_configuration_subnet_id = kwargs['networkConfigurationSubnetId'] + if network_configuration_subnet_id is None: + raise TypeError("Missing 'network_configuration_subnet_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if event_hub_uri is None and 'eventHubUri' in kwargs: + event_hub_uri = kwargs['eventHubUri'] + if minimum_elevation_degrees is None and 'minimumElevationDegrees' in kwargs: + minimum_elevation_degrees = kwargs['minimumElevationDegrees'] + + _setter("auto_tracking", auto_tracking) + _setter("links", links) + _setter("minimum_variable_contact_duration", minimum_variable_contact_duration) + _setter("network_configuration_subnet_id", network_configuration_subnet_id) + _setter("resource_group_name", resource_group_name) if event_hub_uri is not None: - pulumi.set(__self__, "event_hub_uri", event_hub_uri) + _setter("event_hub_uri", event_hub_uri) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_elevation_degrees is not None: - pulumi.set(__self__, "minimum_elevation_degrees", minimum_elevation_degrees) + _setter("minimum_elevation_degrees", minimum_elevation_degrees) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="autoTracking") @@ -202,26 +253,67 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the contact profile exists. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ContactProfileState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_tracking=auto_tracking, + event_hub_uri=event_hub_uri, + links=links, + location=location, + minimum_elevation_degrees=minimum_elevation_degrees, + minimum_variable_contact_duration=minimum_variable_contact_duration, + name=name, + network_configuration_subnet_id=network_configuration_subnet_id, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_tracking: Optional[pulumi.Input[str]] = None, + event_hub_uri: Optional[pulumi.Input[str]] = None, + links: Optional[pulumi.Input[Sequence[pulumi.Input['ContactProfileLinkArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_elevation_degrees: Optional[pulumi.Input[float]] = None, + minimum_variable_contact_duration: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_configuration_subnet_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_tracking is None and 'autoTracking' in kwargs: + auto_tracking = kwargs['autoTracking'] + if event_hub_uri is None and 'eventHubUri' in kwargs: + event_hub_uri = kwargs['eventHubUri'] + if minimum_elevation_degrees is None and 'minimumElevationDegrees' in kwargs: + minimum_elevation_degrees = kwargs['minimumElevationDegrees'] + if minimum_variable_contact_duration is None and 'minimumVariableContactDuration' in kwargs: + minimum_variable_contact_duration = kwargs['minimumVariableContactDuration'] + if network_configuration_subnet_id is None and 'networkConfigurationSubnetId' in kwargs: + network_configuration_subnet_id = kwargs['networkConfigurationSubnetId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if auto_tracking is not None: - pulumi.set(__self__, "auto_tracking", auto_tracking) + _setter("auto_tracking", auto_tracking) if event_hub_uri is not None: - pulumi.set(__self__, "event_hub_uri", event_hub_uri) + _setter("event_hub_uri", event_hub_uri) if links is not None: - pulumi.set(__self__, "links", links) + _setter("links", links) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_elevation_degrees is not None: - pulumi.set(__self__, "minimum_elevation_degrees", minimum_elevation_degrees) + _setter("minimum_elevation_degrees", minimum_elevation_degrees) if minimum_variable_contact_duration is not None: - pulumi.set(__self__, "minimum_variable_contact_duration", minimum_variable_contact_duration) + _setter("minimum_variable_contact_duration", minimum_variable_contact_duration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_configuration_subnet_id is not None: - pulumi.set(__self__, "network_configuration_subnet_id", network_configuration_subnet_id) + _setter("network_configuration_subnet_id", network_configuration_subnet_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="autoTracking") @@ -513,6 +605,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ContactProfileArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/orbital/outputs.py b/sdk/python/pulumi_azure/orbital/outputs.py index 978c6b9dce..dbd277b840 100644 --- a/sdk/python/pulumi_azure/orbital/outputs.py +++ b/sdk/python/pulumi_azure/orbital/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -30,10 +30,35 @@ def __init__(__self__, *, :param str name: Name of the link. :param str polarization: Polarization of the link. Possible values are `LHCP`, `RHCP`, `linearVertical` and `linearHorizontal`. """ - pulumi.set(__self__, "channels", channels) - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "polarization", polarization) + ContactProfileLink._configure( + lambda key, value: pulumi.set(__self__, key, value), + channels=channels, + direction=direction, + name=name, + polarization=polarization, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + channels: Optional[Sequence['outputs.ContactProfileLinkChannel']] = None, + direction: Optional[str] = None, + name: Optional[str] = None, + polarization: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if channels is None: + raise TypeError("Missing 'channels' argument") + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if polarization is None: + raise TypeError("Missing 'polarization' argument") + + _setter("channels", channels) + _setter("direction", direction) + _setter("name", name) + _setter("polarization", polarization) @property @pulumi.getter @@ -110,14 +135,53 @@ def __init__(__self__, *, :param str demodulation_configuration: Copy of the modem configuration file such as Kratos QRadio or Kratos QuantumRx. Only valid for downlink directions. If provided, the modem connects to the customer endpoint and sends demodulated data instead of a VITA.49 stream. :param str modulation_configuration: Copy of the modem configuration file such as Kratos QRadio. Only valid for uplink directions. If provided, the modem connects to the customer endpoint and accepts commands from the customer instead of a VITA.49 stream. """ - pulumi.set(__self__, "bandwidth_mhz", bandwidth_mhz) - pulumi.set(__self__, "center_frequency_mhz", center_frequency_mhz) - pulumi.set(__self__, "end_points", end_points) - pulumi.set(__self__, "name", name) + ContactProfileLinkChannel._configure( + lambda key, value: pulumi.set(__self__, key, value), + bandwidth_mhz=bandwidth_mhz, + center_frequency_mhz=center_frequency_mhz, + end_points=end_points, + name=name, + demodulation_configuration=demodulation_configuration, + modulation_configuration=modulation_configuration, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bandwidth_mhz: Optional[float] = None, + center_frequency_mhz: Optional[float] = None, + end_points: Optional[Sequence['outputs.ContactProfileLinkChannelEndPoint']] = None, + name: Optional[str] = None, + demodulation_configuration: Optional[str] = None, + modulation_configuration: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bandwidth_mhz is None and 'bandwidthMhz' in kwargs: + bandwidth_mhz = kwargs['bandwidthMhz'] + if bandwidth_mhz is None: + raise TypeError("Missing 'bandwidth_mhz' argument") + if center_frequency_mhz is None and 'centerFrequencyMhz' in kwargs: + center_frequency_mhz = kwargs['centerFrequencyMhz'] + if center_frequency_mhz is None: + raise TypeError("Missing 'center_frequency_mhz' argument") + if end_points is None and 'endPoints' in kwargs: + end_points = kwargs['endPoints'] + if end_points is None: + raise TypeError("Missing 'end_points' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if demodulation_configuration is None and 'demodulationConfiguration' in kwargs: + demodulation_configuration = kwargs['demodulationConfiguration'] + if modulation_configuration is None and 'modulationConfiguration' in kwargs: + modulation_configuration = kwargs['modulationConfiguration'] + + _setter("bandwidth_mhz", bandwidth_mhz) + _setter("center_frequency_mhz", center_frequency_mhz) + _setter("end_points", end_points) + _setter("name", name) if demodulation_configuration is not None: - pulumi.set(__self__, "demodulation_configuration", demodulation_configuration) + _setter("demodulation_configuration", demodulation_configuration) if modulation_configuration is not None: - pulumi.set(__self__, "modulation_configuration", modulation_configuration) + _setter("modulation_configuration", modulation_configuration) @property @pulumi.getter(name="bandwidthMhz") @@ -200,11 +264,38 @@ def __init__(__self__, *, :param str protocol: Protocol of an end point. Possible values are `TCP` and `UDP`. :param str ip_address: IP address of an end point. """ - pulumi.set(__self__, "end_point_name", end_point_name) - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "protocol", protocol) + ContactProfileLinkChannelEndPoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_point_name=end_point_name, + port=port, + protocol=protocol, + ip_address=ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_point_name: Optional[str] = None, + port: Optional[str] = None, + protocol: Optional[str] = None, + ip_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_point_name is None and 'endPointName' in kwargs: + end_point_name = kwargs['endPointName'] + if end_point_name is None: + raise TypeError("Missing 'end_point_name' argument") + if port is None: + raise TypeError("Missing 'port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + + _setter("end_point_name", end_point_name) + _setter("port", port) + _setter("protocol", protocol) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) @property @pulumi.getter(name="endPointName") @@ -273,11 +364,44 @@ def __init__(__self__, *, :param str name: Name of the link. :param str polarization: Polarization. Possible values are `RHCP`, `LHCP`, `linearVertical` and `linearHorizontal`. """ - pulumi.set(__self__, "bandwidth_mhz", bandwidth_mhz) - pulumi.set(__self__, "center_frequency_mhz", center_frequency_mhz) - pulumi.set(__self__, "direction", direction) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "polarization", polarization) + SpacecraftLink._configure( + lambda key, value: pulumi.set(__self__, key, value), + bandwidth_mhz=bandwidth_mhz, + center_frequency_mhz=center_frequency_mhz, + direction=direction, + name=name, + polarization=polarization, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bandwidth_mhz: Optional[float] = None, + center_frequency_mhz: Optional[float] = None, + direction: Optional[str] = None, + name: Optional[str] = None, + polarization: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bandwidth_mhz is None and 'bandwidthMhz' in kwargs: + bandwidth_mhz = kwargs['bandwidthMhz'] + if bandwidth_mhz is None: + raise TypeError("Missing 'bandwidth_mhz' argument") + if center_frequency_mhz is None and 'centerFrequencyMhz' in kwargs: + center_frequency_mhz = kwargs['centerFrequencyMhz'] + if center_frequency_mhz is None: + raise TypeError("Missing 'center_frequency_mhz' argument") + if direction is None: + raise TypeError("Missing 'direction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if polarization is None: + raise TypeError("Missing 'polarization' argument") + + _setter("bandwidth_mhz", bandwidth_mhz) + _setter("center_frequency_mhz", center_frequency_mhz) + _setter("direction", direction) + _setter("name", name) + _setter("polarization", polarization) @property @pulumi.getter(name="bandwidthMhz") diff --git a/sdk/python/pulumi_azure/orbital/spacecraft.py b/sdk/python/pulumi_azure/orbital/spacecraft.py index 31de1fc323..6cd383ac05 100644 --- a/sdk/python/pulumi_azure/orbital/spacecraft.py +++ b/sdk/python/pulumi_azure/orbital/spacecraft.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,17 +35,60 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Spacecraft. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "links", links) - pulumi.set(__self__, "norad_id", norad_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "title_line", title_line) - pulumi.set(__self__, "two_line_elements", two_line_elements) + SpacecraftArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + links=links, + norad_id=norad_id, + resource_group_name=resource_group_name, + title_line=title_line, + two_line_elements=two_line_elements, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + links: Optional[pulumi.Input[Sequence[pulumi.Input['SpacecraftLinkArgs']]]] = None, + norad_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + title_line: Optional[pulumi.Input[str]] = None, + two_line_elements: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if links is None: + raise TypeError("Missing 'links' argument") + if norad_id is None and 'noradId' in kwargs: + norad_id = kwargs['noradId'] + if norad_id is None: + raise TypeError("Missing 'norad_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if title_line is None and 'titleLine' in kwargs: + title_line = kwargs['titleLine'] + if title_line is None: + raise TypeError("Missing 'title_line' argument") + if two_line_elements is None and 'twoLineElements' in kwargs: + two_line_elements = kwargs['twoLineElements'] + if two_line_elements is None: + raise TypeError("Missing 'two_line_elements' argument") + + _setter("links", links) + _setter("norad_id", norad_id) + _setter("resource_group_name", resource_group_name) + _setter("title_line", title_line) + _setter("two_line_elements", two_line_elements) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -166,22 +209,55 @@ def __init__(__self__, *, :param pulumi.Input[str] title_line: Title of the two line elements (TLE). :param pulumi.Input[Sequence[pulumi.Input[str]]] two_line_elements: A list of the two line elements (TLE), the first string being the first of the TLE, the second string being the second line of the TLE. Changing this forces a new resource to be created. """ + _SpacecraftState._configure( + lambda key, value: pulumi.set(__self__, key, value), + links=links, + location=location, + name=name, + norad_id=norad_id, + resource_group_name=resource_group_name, + tags=tags, + title_line=title_line, + two_line_elements=two_line_elements, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + links: Optional[pulumi.Input[Sequence[pulumi.Input['SpacecraftLinkArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + norad_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + title_line: Optional[pulumi.Input[str]] = None, + two_line_elements: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if norad_id is None and 'noradId' in kwargs: + norad_id = kwargs['noradId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if title_line is None and 'titleLine' in kwargs: + title_line = kwargs['titleLine'] + if two_line_elements is None and 'twoLineElements' in kwargs: + two_line_elements = kwargs['twoLineElements'] + if links is not None: - pulumi.set(__self__, "links", links) + _setter("links", links) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if norad_id is not None: - pulumi.set(__self__, "norad_id", norad_id) + _setter("norad_id", norad_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if title_line is not None: - pulumi.set(__self__, "title_line", title_line) + _setter("title_line", title_line) if two_line_elements is not None: - pulumi.set(__self__, "two_line_elements", two_line_elements) + _setter("two_line_elements", two_line_elements) @property @pulumi.getter @@ -399,6 +475,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SpacecraftArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/paloalto/_inputs.py b/sdk/python/pulumi_azure/paloalto/_inputs.py index d47be3bf9e..be4c96b868 100644 --- a/sdk/python/pulumi_azure/paloalto/_inputs.py +++ b/sdk/python/pulumi_azure/paloalto/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -48,9 +48,26 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] custom_urls: Specifies a list of URL categories to match. Possible values include `abortion`, `abused-drugs`, `adult`, `alcohol-and-tobacco`, `auctions`, `business-and-economy`, `command-and-control`, `computer-and-internet-info`, `content-delivery-networks`, `copyright-infringement`, `cryptocurrency`, `dating`, `dynamic-dns`, `educational-institutions`, `entertainment-and-arts`, `extremism`, `financial-services`, `gambling`, `games`, `government`, `grayware`, `hacking`, `health-and-medicine`, `high-risk`, `home-and-garden`, `hunting-and-fishing`, `insufficient-content`, `internet-communications-and-telephony`, `internet-portals`, `job-search`, `legal`, `low-risk`, `malware`, `medium-risk`, `military`, `motor-vehicles`, `music`, `newly-registered-domain`, `news`, `not-resolved`, `nudity`, `online-storage-and-backup`, `parked`, `peer-to-peer`, `personal-sites-and-blogs`, `philosophy-and-political-advocacy`, `phishing`, `private-ip-addresses`, `proxy-avoidance-and-anonymizers`, `questionable`, `real-estate`, `real-time-detection`, `recreation-and-hobbies`, `reference-and-research`, `religion`, `search-engines`, `sex-education`, `shareware-and-freeware`, `shopping`, `social-networking`, `society`, `sports`, `stock-advice-and-tools`, `streaming-media`, `swimsuits-and-intimate-apparel`, `training-and-tools`, `translation`, `travel`, `unknown`, `weapons`, `web-advertisements`, `web-based-email`, and `web-hosting`. :param pulumi.Input[Sequence[pulumi.Input[str]]] feeds: Specifies a list of feeds to match. """ - pulumi.set(__self__, "custom_urls", custom_urls) + LocalRulestackRuleCategoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_urls=custom_urls, + feeds=feeds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + feeds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_urls is None and 'customUrls' in kwargs: + custom_urls = kwargs['customUrls'] + if custom_urls is None: + raise TypeError("Missing 'custom_urls' argument") + + _setter("custom_urls", custom_urls) if feeds is not None: - pulumi.set(__self__, "feeds", feeds) + _setter("feeds", feeds) @property @pulumi.getter(name="customUrls") @@ -96,16 +113,39 @@ def __init__(__self__, *, > **Note:** This is a list of names of Prefix Lists configured on the same Local Rulestack as this Rule is being created. """ + LocalRulestackRuleDestinationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cidrs=cidrs, + countries=countries, + feeds=feeds, + local_rulestack_fqdn_list_ids=local_rulestack_fqdn_list_ids, + local_rulestack_prefix_list_ids=local_rulestack_prefix_list_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + countries: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + feeds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + local_rulestack_fqdn_list_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + local_rulestack_prefix_list_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_rulestack_fqdn_list_ids is None and 'localRulestackFqdnListIds' in kwargs: + local_rulestack_fqdn_list_ids = kwargs['localRulestackFqdnListIds'] + if local_rulestack_prefix_list_ids is None and 'localRulestackPrefixListIds' in kwargs: + local_rulestack_prefix_list_ids = kwargs['localRulestackPrefixListIds'] + if cidrs is not None: - pulumi.set(__self__, "cidrs", cidrs) + _setter("cidrs", cidrs) if countries is not None: - pulumi.set(__self__, "countries", countries) + _setter("countries", countries) if feeds is not None: - pulumi.set(__self__, "feeds", feeds) + _setter("feeds", feeds) if local_rulestack_fqdn_list_ids is not None: - pulumi.set(__self__, "local_rulestack_fqdn_list_ids", local_rulestack_fqdn_list_ids) + _setter("local_rulestack_fqdn_list_ids", local_rulestack_fqdn_list_ids) if local_rulestack_prefix_list_ids is not None: - pulumi.set(__self__, "local_rulestack_prefix_list_ids", local_rulestack_prefix_list_ids) + _setter("local_rulestack_prefix_list_ids", local_rulestack_prefix_list_ids) @property @pulumi.getter @@ -187,14 +227,33 @@ def __init__(__self__, *, > **Note:** This is a list of names of Prefix Lists configured on the same Local Rulestack as this Rule is being created. """ + LocalRulestackRuleSourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cidrs=cidrs, + countries=countries, + feeds=feeds, + local_rulestack_prefix_list_ids=local_rulestack_prefix_list_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + countries: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + feeds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + local_rulestack_prefix_list_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_rulestack_prefix_list_ids is None and 'localRulestackPrefixListIds' in kwargs: + local_rulestack_prefix_list_ids = kwargs['localRulestackPrefixListIds'] + if cidrs is not None: - pulumi.set(__self__, "cidrs", cidrs) + _setter("cidrs", cidrs) if countries is not None: - pulumi.set(__self__, "countries", countries) + _setter("countries", countries) if feeds is not None: - pulumi.set(__self__, "feeds", feeds) + _setter("feeds", feeds) if local_rulestack_prefix_list_ids is not None: - pulumi.set(__self__, "local_rulestack_prefix_list_ids", local_rulestack_prefix_list_ids) + _setter("local_rulestack_prefix_list_ids", local_rulestack_prefix_list_ids) @property @pulumi.getter @@ -254,12 +313,37 @@ def __init__(__self__, *, protocol: pulumi.Input[str], backend_config: Optional[pulumi.Input['NextGenerationFirewallVirtualHubLocalRulestackDestinationNatBackendConfigArgs']] = None, frontend_config: Optional[pulumi.Input['NextGenerationFirewallVirtualHubLocalRulestackDestinationNatFrontendConfigArgs']] = None): - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + NextGenerationFirewallVirtualHubLocalRulestackDestinationNatArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocol=protocol, + backend_config=backend_config, + frontend_config=frontend_config, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + backend_config: Optional[pulumi.Input['NextGenerationFirewallVirtualHubLocalRulestackDestinationNatBackendConfigArgs']] = None, + frontend_config: Optional[pulumi.Input['NextGenerationFirewallVirtualHubLocalRulestackDestinationNatFrontendConfigArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if backend_config is None and 'backendConfig' in kwargs: + backend_config = kwargs['backendConfig'] + if frontend_config is None and 'frontendConfig' in kwargs: + frontend_config = kwargs['frontendConfig'] + + _setter("name", name) + _setter("protocol", protocol) if backend_config is not None: - pulumi.set(__self__, "backend_config", backend_config) + _setter("backend_config", backend_config) if frontend_config is not None: - pulumi.set(__self__, "frontend_config", frontend_config) + _setter("frontend_config", frontend_config) @property @pulumi.getter @@ -303,8 +387,27 @@ class NextGenerationFirewallVirtualHubLocalRulestackDestinationNatBackendConfigA def __init__(__self__, *, port: pulumi.Input[int], public_ip_address: pulumi.Input[str]): - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address", public_ip_address) + NextGenerationFirewallVirtualHubLocalRulestackDestinationNatBackendConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address=public_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + public_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address is None and 'publicIpAddress' in kwargs: + public_ip_address = kwargs['publicIpAddress'] + if public_ip_address is None: + raise TypeError("Missing 'public_ip_address' argument") + + _setter("port", port) + _setter("public_ip_address", public_ip_address) @property @pulumi.getter @@ -330,8 +433,27 @@ class NextGenerationFirewallVirtualHubLocalRulestackDestinationNatFrontendConfig def __init__(__self__, *, port: pulumi.Input[int], public_ip_address_id: pulumi.Input[str]): - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + NextGenerationFirewallVirtualHubLocalRulestackDestinationNatFrontendConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address_id=public_ip_address_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + + _setter("port", port) + _setter("public_ip_address_id", public_ip_address_id) @property @pulumi.getter @@ -358,12 +480,33 @@ def __init__(__self__, *, azure_dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, use_azure_dns: Optional[pulumi.Input[bool]] = None): + NextGenerationFirewallVirtualHubLocalRulestackDnsSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_dns_servers=azure_dns_servers, + dns_servers=dns_servers, + use_azure_dns=use_azure_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + use_azure_dns: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_dns_servers is None and 'azureDnsServers' in kwargs: + azure_dns_servers = kwargs['azureDnsServers'] + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if use_azure_dns is None and 'useAzureDns' in kwargs: + use_azure_dns = kwargs['useAzureDns'] + if azure_dns_servers is not None: - pulumi.set(__self__, "azure_dns_servers", azure_dns_servers) + _setter("azure_dns_servers", azure_dns_servers) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if use_azure_dns is not None: - pulumi.set(__self__, "use_azure_dns", use_azure_dns) + _setter("use_azure_dns", use_azure_dns) @property @pulumi.getter(name="azureDnsServers") @@ -405,21 +548,72 @@ def __init__(__self__, *, public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, trusted_subnet_id: Optional[pulumi.Input[str]] = None, untrusted_subnet_id: Optional[pulumi.Input[str]] = None): - pulumi.set(__self__, "network_virtual_appliance_id", network_virtual_appliance_id) - pulumi.set(__self__, "public_ip_address_ids", public_ip_address_ids) - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + NextGenerationFirewallVirtualHubLocalRulestackNetworkProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_virtual_appliance_id=network_virtual_appliance_id, + public_ip_address_ids=public_ip_address_ids, + virtual_hub_id=virtual_hub_id, + egress_nat_ip_address_ids=egress_nat_ip_address_ids, + egress_nat_ip_addresses=egress_nat_ip_addresses, + ip_of_trust_for_user_defined_routes=ip_of_trust_for_user_defined_routes, + public_ip_addresses=public_ip_addresses, + trusted_subnet_id=trusted_subnet_id, + untrusted_subnet_id=untrusted_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_virtual_appliance_id: Optional[pulumi.Input[str]] = None, + public_ip_address_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + egress_nat_ip_address_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + egress_nat_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ip_of_trust_for_user_defined_routes: Optional[pulumi.Input[str]] = None, + public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + trusted_subnet_id: Optional[pulumi.Input[str]] = None, + untrusted_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_virtual_appliance_id is None and 'networkVirtualApplianceId' in kwargs: + network_virtual_appliance_id = kwargs['networkVirtualApplianceId'] + if network_virtual_appliance_id is None: + raise TypeError("Missing 'network_virtual_appliance_id' argument") + if public_ip_address_ids is None and 'publicIpAddressIds' in kwargs: + public_ip_address_ids = kwargs['publicIpAddressIds'] + if public_ip_address_ids is None: + raise TypeError("Missing 'public_ip_address_ids' argument") + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + if egress_nat_ip_address_ids is None and 'egressNatIpAddressIds' in kwargs: + egress_nat_ip_address_ids = kwargs['egressNatIpAddressIds'] + if egress_nat_ip_addresses is None and 'egressNatIpAddresses' in kwargs: + egress_nat_ip_addresses = kwargs['egressNatIpAddresses'] + if ip_of_trust_for_user_defined_routes is None and 'ipOfTrustForUserDefinedRoutes' in kwargs: + ip_of_trust_for_user_defined_routes = kwargs['ipOfTrustForUserDefinedRoutes'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if trusted_subnet_id is None and 'trustedSubnetId' in kwargs: + trusted_subnet_id = kwargs['trustedSubnetId'] + if untrusted_subnet_id is None and 'untrustedSubnetId' in kwargs: + untrusted_subnet_id = kwargs['untrustedSubnetId'] + + _setter("network_virtual_appliance_id", network_virtual_appliance_id) + _setter("public_ip_address_ids", public_ip_address_ids) + _setter("virtual_hub_id", virtual_hub_id) if egress_nat_ip_address_ids is not None: - pulumi.set(__self__, "egress_nat_ip_address_ids", egress_nat_ip_address_ids) + _setter("egress_nat_ip_address_ids", egress_nat_ip_address_ids) if egress_nat_ip_addresses is not None: - pulumi.set(__self__, "egress_nat_ip_addresses", egress_nat_ip_addresses) + _setter("egress_nat_ip_addresses", egress_nat_ip_addresses) if ip_of_trust_for_user_defined_routes is not None: - pulumi.set(__self__, "ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) + _setter("ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if trusted_subnet_id is not None: - pulumi.set(__self__, "trusted_subnet_id", trusted_subnet_id) + _setter("trusted_subnet_id", trusted_subnet_id) if untrusted_subnet_id is not None: - pulumi.set(__self__, "untrusted_subnet_id", untrusted_subnet_id) + _setter("untrusted_subnet_id", untrusted_subnet_id) @property @pulumi.getter(name="networkVirtualApplianceId") @@ -510,12 +704,37 @@ def __init__(__self__, *, protocol: pulumi.Input[str], backend_config: Optional[pulumi.Input['NextGenerationFirewallVirtualHubPanoramaDestinationNatBackendConfigArgs']] = None, frontend_config: Optional[pulumi.Input['NextGenerationFirewallVirtualHubPanoramaDestinationNatFrontendConfigArgs']] = None): - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + NextGenerationFirewallVirtualHubPanoramaDestinationNatArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocol=protocol, + backend_config=backend_config, + frontend_config=frontend_config, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + backend_config: Optional[pulumi.Input['NextGenerationFirewallVirtualHubPanoramaDestinationNatBackendConfigArgs']] = None, + frontend_config: Optional[pulumi.Input['NextGenerationFirewallVirtualHubPanoramaDestinationNatFrontendConfigArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if backend_config is None and 'backendConfig' in kwargs: + backend_config = kwargs['backendConfig'] + if frontend_config is None and 'frontendConfig' in kwargs: + frontend_config = kwargs['frontendConfig'] + + _setter("name", name) + _setter("protocol", protocol) if backend_config is not None: - pulumi.set(__self__, "backend_config", backend_config) + _setter("backend_config", backend_config) if frontend_config is not None: - pulumi.set(__self__, "frontend_config", frontend_config) + _setter("frontend_config", frontend_config) @property @pulumi.getter @@ -559,8 +778,27 @@ class NextGenerationFirewallVirtualHubPanoramaDestinationNatBackendConfigArgs: def __init__(__self__, *, port: pulumi.Input[int], public_ip_address: pulumi.Input[str]): - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address", public_ip_address) + NextGenerationFirewallVirtualHubPanoramaDestinationNatBackendConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address=public_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + public_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address is None and 'publicIpAddress' in kwargs: + public_ip_address = kwargs['publicIpAddress'] + if public_ip_address is None: + raise TypeError("Missing 'public_ip_address' argument") + + _setter("port", port) + _setter("public_ip_address", public_ip_address) @property @pulumi.getter @@ -586,8 +824,27 @@ class NextGenerationFirewallVirtualHubPanoramaDestinationNatFrontendConfigArgs: def __init__(__self__, *, port: pulumi.Input[int], public_ip_address_id: pulumi.Input[str]): - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + NextGenerationFirewallVirtualHubPanoramaDestinationNatFrontendConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address_id=public_ip_address_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + + _setter("port", port) + _setter("public_ip_address_id", public_ip_address_id) @property @pulumi.getter @@ -614,12 +871,33 @@ def __init__(__self__, *, azure_dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, use_azure_dns: Optional[pulumi.Input[bool]] = None): + NextGenerationFirewallVirtualHubPanoramaDnsSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_dns_servers=azure_dns_servers, + dns_servers=dns_servers, + use_azure_dns=use_azure_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + use_azure_dns: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_dns_servers is None and 'azureDnsServers' in kwargs: + azure_dns_servers = kwargs['azureDnsServers'] + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if use_azure_dns is None and 'useAzureDns' in kwargs: + use_azure_dns = kwargs['useAzureDns'] + if azure_dns_servers is not None: - pulumi.set(__self__, "azure_dns_servers", azure_dns_servers) + _setter("azure_dns_servers", azure_dns_servers) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if use_azure_dns is not None: - pulumi.set(__self__, "use_azure_dns", use_azure_dns) + _setter("use_azure_dns", use_azure_dns) @property @pulumi.getter(name="azureDnsServers") @@ -661,21 +939,72 @@ def __init__(__self__, *, public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, trusted_subnet_id: Optional[pulumi.Input[str]] = None, untrusted_subnet_id: Optional[pulumi.Input[str]] = None): - pulumi.set(__self__, "network_virtual_appliance_id", network_virtual_appliance_id) - pulumi.set(__self__, "public_ip_address_ids", public_ip_address_ids) - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + NextGenerationFirewallVirtualHubPanoramaNetworkProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_virtual_appliance_id=network_virtual_appliance_id, + public_ip_address_ids=public_ip_address_ids, + virtual_hub_id=virtual_hub_id, + egress_nat_ip_address_ids=egress_nat_ip_address_ids, + egress_nat_ip_addresses=egress_nat_ip_addresses, + ip_of_trust_for_user_defined_routes=ip_of_trust_for_user_defined_routes, + public_ip_addresses=public_ip_addresses, + trusted_subnet_id=trusted_subnet_id, + untrusted_subnet_id=untrusted_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_virtual_appliance_id: Optional[pulumi.Input[str]] = None, + public_ip_address_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + egress_nat_ip_address_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + egress_nat_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ip_of_trust_for_user_defined_routes: Optional[pulumi.Input[str]] = None, + public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + trusted_subnet_id: Optional[pulumi.Input[str]] = None, + untrusted_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_virtual_appliance_id is None and 'networkVirtualApplianceId' in kwargs: + network_virtual_appliance_id = kwargs['networkVirtualApplianceId'] + if network_virtual_appliance_id is None: + raise TypeError("Missing 'network_virtual_appliance_id' argument") + if public_ip_address_ids is None and 'publicIpAddressIds' in kwargs: + public_ip_address_ids = kwargs['publicIpAddressIds'] + if public_ip_address_ids is None: + raise TypeError("Missing 'public_ip_address_ids' argument") + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + if egress_nat_ip_address_ids is None and 'egressNatIpAddressIds' in kwargs: + egress_nat_ip_address_ids = kwargs['egressNatIpAddressIds'] + if egress_nat_ip_addresses is None and 'egressNatIpAddresses' in kwargs: + egress_nat_ip_addresses = kwargs['egressNatIpAddresses'] + if ip_of_trust_for_user_defined_routes is None and 'ipOfTrustForUserDefinedRoutes' in kwargs: + ip_of_trust_for_user_defined_routes = kwargs['ipOfTrustForUserDefinedRoutes'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if trusted_subnet_id is None and 'trustedSubnetId' in kwargs: + trusted_subnet_id = kwargs['trustedSubnetId'] + if untrusted_subnet_id is None and 'untrustedSubnetId' in kwargs: + untrusted_subnet_id = kwargs['untrustedSubnetId'] + + _setter("network_virtual_appliance_id", network_virtual_appliance_id) + _setter("public_ip_address_ids", public_ip_address_ids) + _setter("virtual_hub_id", virtual_hub_id) if egress_nat_ip_address_ids is not None: - pulumi.set(__self__, "egress_nat_ip_address_ids", egress_nat_ip_address_ids) + _setter("egress_nat_ip_address_ids", egress_nat_ip_address_ids) if egress_nat_ip_addresses is not None: - pulumi.set(__self__, "egress_nat_ip_addresses", egress_nat_ip_addresses) + _setter("egress_nat_ip_addresses", egress_nat_ip_addresses) if ip_of_trust_for_user_defined_routes is not None: - pulumi.set(__self__, "ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) + _setter("ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if trusted_subnet_id is not None: - pulumi.set(__self__, "trusted_subnet_id", trusted_subnet_id) + _setter("trusted_subnet_id", trusted_subnet_id) if untrusted_subnet_id is not None: - pulumi.set(__self__, "untrusted_subnet_id", untrusted_subnet_id) + _setter("untrusted_subnet_id", untrusted_subnet_id) @property @pulumi.getter(name="networkVirtualApplianceId") @@ -769,20 +1098,55 @@ def __init__(__self__, *, panorama_server2: Optional[pulumi.Input[str]] = None, template_name: Optional[pulumi.Input[str]] = None, virtual_machine_ssh_key: Optional[pulumi.Input[str]] = None): + NextGenerationFirewallVirtualHubPanoramaPanoramaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + device_group_name=device_group_name, + host_name=host_name, + name=name, + panorama_server1=panorama_server1, + panorama_server2=panorama_server2, + template_name=template_name, + virtual_machine_ssh_key=virtual_machine_ssh_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + device_group_name: Optional[pulumi.Input[str]] = None, + host_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + panorama_server1: Optional[pulumi.Input[str]] = None, + panorama_server2: Optional[pulumi.Input[str]] = None, + template_name: Optional[pulumi.Input[str]] = None, + virtual_machine_ssh_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if device_group_name is None and 'deviceGroupName' in kwargs: + device_group_name = kwargs['deviceGroupName'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if panorama_server1 is None and 'panoramaServer1' in kwargs: + panorama_server1 = kwargs['panoramaServer1'] + if panorama_server2 is None and 'panoramaServer2' in kwargs: + panorama_server2 = kwargs['panoramaServer2'] + if template_name is None and 'templateName' in kwargs: + template_name = kwargs['templateName'] + if virtual_machine_ssh_key is None and 'virtualMachineSshKey' in kwargs: + virtual_machine_ssh_key = kwargs['virtualMachineSshKey'] + if device_group_name is not None: - pulumi.set(__self__, "device_group_name", device_group_name) + _setter("device_group_name", device_group_name) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if panorama_server1 is not None: - pulumi.set(__self__, "panorama_server1", panorama_server1) + _setter("panorama_server1", panorama_server1) if panorama_server2 is not None: - pulumi.set(__self__, "panorama_server2", panorama_server2) + _setter("panorama_server2", panorama_server2) if template_name is not None: - pulumi.set(__self__, "template_name", template_name) + _setter("template_name", template_name) if virtual_machine_ssh_key is not None: - pulumi.set(__self__, "virtual_machine_ssh_key", virtual_machine_ssh_key) + _setter("virtual_machine_ssh_key", virtual_machine_ssh_key) @property @pulumi.getter(name="deviceGroupName") @@ -861,12 +1225,37 @@ def __init__(__self__, *, :param pulumi.Input['NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatBackendConfigArgs'] backend_config: A `backend_config` block as defined above. :param pulumi.Input['NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatFrontendConfigArgs'] frontend_config: A `frontend_config` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocol=protocol, + backend_config=backend_config, + frontend_config=frontend_config, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + backend_config: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatBackendConfigArgs']] = None, + frontend_config: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatFrontendConfigArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if backend_config is None and 'backendConfig' in kwargs: + backend_config = kwargs['backendConfig'] + if frontend_config is None and 'frontendConfig' in kwargs: + frontend_config = kwargs['frontendConfig'] + + _setter("name", name) + _setter("protocol", protocol) if backend_config is not None: - pulumi.set(__self__, "backend_config", backend_config) + _setter("backend_config", backend_config) if frontend_config is not None: - pulumi.set(__self__, "frontend_config", frontend_config) + _setter("frontend_config", frontend_config) @property @pulumi.getter @@ -926,8 +1315,27 @@ def __init__(__self__, *, :param pulumi.Input[int] port: The port number to send traffic to. :param pulumi.Input[str] public_ip_address: The IP Address to send the traffic to. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address", public_ip_address) + NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatBackendConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address=public_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + public_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address is None and 'publicIpAddress' in kwargs: + public_ip_address = kwargs['publicIpAddress'] + if public_ip_address is None: + raise TypeError("Missing 'public_ip_address' argument") + + _setter("port", port) + _setter("public_ip_address", public_ip_address) @property @pulumi.getter @@ -965,8 +1373,27 @@ def __init__(__self__, *, > **Note:** This must be an Azure Public IP address ID also specified in the `public_ip_address_ids` list. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatFrontendConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address_id=public_ip_address_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + + _setter("port", port) + _setter("public_ip_address_id", public_ip_address_id) @property @pulumi.getter @@ -1005,12 +1432,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_servers: Specifies a list of DNS servers to use. Conflicts with `dns_settings.0.use_azure_dns`. :param pulumi.Input[bool] use_azure_dns: Should the Firewall use Azure Supplied DNS servers. Conflicts with `dns_settings.0.dns_servers`. Defaults to `false`. """ + NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_dns_servers=azure_dns_servers, + dns_servers=dns_servers, + use_azure_dns=use_azure_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + use_azure_dns: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_dns_servers is None and 'azureDnsServers' in kwargs: + azure_dns_servers = kwargs['azureDnsServers'] + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if use_azure_dns is None and 'useAzureDns' in kwargs: + use_azure_dns = kwargs['useAzureDns'] + if azure_dns_servers is not None: - pulumi.set(__self__, "azure_dns_servers", azure_dns_servers) + _setter("azure_dns_servers", azure_dns_servers) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if use_azure_dns is not None: - pulumi.set(__self__, "use_azure_dns", use_azure_dns) + _setter("use_azure_dns", use_azure_dns) @property @pulumi.getter(name="azureDnsServers") @@ -1059,14 +1507,47 @@ def __init__(__self__, *, :param pulumi.Input['NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileVnetConfigurationArgs'] vnet_configuration: A `vnet_configuration` block as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] egress_nat_ip_address_ids: Specifies a list of Azure Public IP Address IDs that can be used for Egress (Source) Network Address Translation. """ - pulumi.set(__self__, "public_ip_address_ids", public_ip_address_ids) - pulumi.set(__self__, "vnet_configuration", vnet_configuration) + NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_ip_address_ids=public_ip_address_ids, + vnet_configuration=vnet_configuration, + egress_nat_ip_address_ids=egress_nat_ip_address_ids, + egress_nat_ip_addresses=egress_nat_ip_addresses, + public_ip_addresses=public_ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_ip_address_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + vnet_configuration: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileVnetConfigurationArgs']] = None, + egress_nat_ip_address_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + egress_nat_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_ip_address_ids is None and 'publicIpAddressIds' in kwargs: + public_ip_address_ids = kwargs['publicIpAddressIds'] + if public_ip_address_ids is None: + raise TypeError("Missing 'public_ip_address_ids' argument") + if vnet_configuration is None and 'vnetConfiguration' in kwargs: + vnet_configuration = kwargs['vnetConfiguration'] + if vnet_configuration is None: + raise TypeError("Missing 'vnet_configuration' argument") + if egress_nat_ip_address_ids is None and 'egressNatIpAddressIds' in kwargs: + egress_nat_ip_address_ids = kwargs['egressNatIpAddressIds'] + if egress_nat_ip_addresses is None and 'egressNatIpAddresses' in kwargs: + egress_nat_ip_addresses = kwargs['egressNatIpAddresses'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + + _setter("public_ip_address_ids", public_ip_address_ids) + _setter("vnet_configuration", vnet_configuration) if egress_nat_ip_address_ids is not None: - pulumi.set(__self__, "egress_nat_ip_address_ids", egress_nat_ip_address_ids) + _setter("egress_nat_ip_address_ids", egress_nat_ip_address_ids) if egress_nat_ip_addresses is not None: - pulumi.set(__self__, "egress_nat_ip_addresses", egress_nat_ip_addresses) + _setter("egress_nat_ip_addresses", egress_nat_ip_addresses) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) @property @pulumi.getter(name="publicIpAddressIds") @@ -1135,13 +1616,40 @@ def __init__(__self__, *, :param pulumi.Input[str] trusted_subnet_id: The ID of the Trust subnet. :param pulumi.Input[str] untrusted_subnet_id: The ID of the UnTrust subnet. """ - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileVnetConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + virtual_network_id=virtual_network_id, + ip_of_trust_for_user_defined_routes=ip_of_trust_for_user_defined_routes, + trusted_subnet_id=trusted_subnet_id, + untrusted_subnet_id=untrusted_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + virtual_network_id: Optional[pulumi.Input[str]] = None, + ip_of_trust_for_user_defined_routes: Optional[pulumi.Input[str]] = None, + trusted_subnet_id: Optional[pulumi.Input[str]] = None, + untrusted_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if virtual_network_id is None: + raise TypeError("Missing 'virtual_network_id' argument") + if ip_of_trust_for_user_defined_routes is None and 'ipOfTrustForUserDefinedRoutes' in kwargs: + ip_of_trust_for_user_defined_routes = kwargs['ipOfTrustForUserDefinedRoutes'] + if trusted_subnet_id is None and 'trustedSubnetId' in kwargs: + trusted_subnet_id = kwargs['trustedSubnetId'] + if untrusted_subnet_id is None and 'untrustedSubnetId' in kwargs: + untrusted_subnet_id = kwargs['untrustedSubnetId'] + + _setter("virtual_network_id", virtual_network_id) if ip_of_trust_for_user_defined_routes is not None: - pulumi.set(__self__, "ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) + _setter("ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) if trusted_subnet_id is not None: - pulumi.set(__self__, "trusted_subnet_id", trusted_subnet_id) + _setter("trusted_subnet_id", trusted_subnet_id) if untrusted_subnet_id is not None: - pulumi.set(__self__, "untrusted_subnet_id", untrusted_subnet_id) + _setter("untrusted_subnet_id", untrusted_subnet_id) @property @pulumi.getter(name="virtualNetworkId") @@ -1202,12 +1710,37 @@ def __init__(__self__, *, :param pulumi.Input['NextGenerationFirewallVirtualNetworkPanoramaDestinationNatBackendConfigArgs'] backend_config: A `backend_config` block as defined above. :param pulumi.Input['NextGenerationFirewallVirtualNetworkPanoramaDestinationNatFrontendConfigArgs'] frontend_config: A `frontend_config` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + NextGenerationFirewallVirtualNetworkPanoramaDestinationNatArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocol=protocol, + backend_config=backend_config, + frontend_config=frontend_config, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + backend_config: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkPanoramaDestinationNatBackendConfigArgs']] = None, + frontend_config: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkPanoramaDestinationNatFrontendConfigArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if backend_config is None and 'backendConfig' in kwargs: + backend_config = kwargs['backendConfig'] + if frontend_config is None and 'frontendConfig' in kwargs: + frontend_config = kwargs['frontendConfig'] + + _setter("name", name) + _setter("protocol", protocol) if backend_config is not None: - pulumi.set(__self__, "backend_config", backend_config) + _setter("backend_config", backend_config) if frontend_config is not None: - pulumi.set(__self__, "frontend_config", frontend_config) + _setter("frontend_config", frontend_config) @property @pulumi.getter @@ -1267,8 +1800,27 @@ def __init__(__self__, *, :param pulumi.Input[int] port: The port number to send traffic to. :param pulumi.Input[str] public_ip_address: The IP Address to send the traffic to. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address", public_ip_address) + NextGenerationFirewallVirtualNetworkPanoramaDestinationNatBackendConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address=public_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + public_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address is None and 'publicIpAddress' in kwargs: + public_ip_address = kwargs['publicIpAddress'] + if public_ip_address is None: + raise TypeError("Missing 'public_ip_address' argument") + + _setter("port", port) + _setter("public_ip_address", public_ip_address) @property @pulumi.getter @@ -1306,8 +1858,27 @@ def __init__(__self__, *, > **Note:** This must be an Azure Public IP address ID also specified in the `public_ip_address_ids` list. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + NextGenerationFirewallVirtualNetworkPanoramaDestinationNatFrontendConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address_id=public_ip_address_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + public_ip_address_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + + _setter("port", port) + _setter("public_ip_address_id", public_ip_address_id) @property @pulumi.getter @@ -1346,12 +1917,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_servers: Specifies a list of DNS servers to use. Conflicts with `dns_settings.0.use_azure_dns`. :param pulumi.Input[bool] use_azure_dns: Should the Firewall use Azure Supplied DNS servers. Conflicts with `dns_settings.0.dns_servers`. Defaults to `false`. """ + NextGenerationFirewallVirtualNetworkPanoramaDnsSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_dns_servers=azure_dns_servers, + dns_servers=dns_servers, + use_azure_dns=use_azure_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + use_azure_dns: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_dns_servers is None and 'azureDnsServers' in kwargs: + azure_dns_servers = kwargs['azureDnsServers'] + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if use_azure_dns is None and 'useAzureDns' in kwargs: + use_azure_dns = kwargs['useAzureDns'] + if azure_dns_servers is not None: - pulumi.set(__self__, "azure_dns_servers", azure_dns_servers) + _setter("azure_dns_servers", azure_dns_servers) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if use_azure_dns is not None: - pulumi.set(__self__, "use_azure_dns", use_azure_dns) + _setter("use_azure_dns", use_azure_dns) @property @pulumi.getter(name="azureDnsServers") @@ -1400,14 +1992,47 @@ def __init__(__self__, *, :param pulumi.Input['NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileVnetConfigurationArgs'] vnet_configuration: A `vnet_configuration` block as defined below. :param pulumi.Input[Sequence[pulumi.Input[str]]] egress_nat_ip_address_ids: Specifies a list of Azure Public IP Address IDs that can be used for Egress (Source) Network Address Translation. """ - pulumi.set(__self__, "public_ip_address_ids", public_ip_address_ids) - pulumi.set(__self__, "vnet_configuration", vnet_configuration) + NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_ip_address_ids=public_ip_address_ids, + vnet_configuration=vnet_configuration, + egress_nat_ip_address_ids=egress_nat_ip_address_ids, + egress_nat_ip_addresses=egress_nat_ip_addresses, + public_ip_addresses=public_ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_ip_address_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + vnet_configuration: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileVnetConfigurationArgs']] = None, + egress_nat_ip_address_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + egress_nat_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + public_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_ip_address_ids is None and 'publicIpAddressIds' in kwargs: + public_ip_address_ids = kwargs['publicIpAddressIds'] + if public_ip_address_ids is None: + raise TypeError("Missing 'public_ip_address_ids' argument") + if vnet_configuration is None and 'vnetConfiguration' in kwargs: + vnet_configuration = kwargs['vnetConfiguration'] + if vnet_configuration is None: + raise TypeError("Missing 'vnet_configuration' argument") + if egress_nat_ip_address_ids is None and 'egressNatIpAddressIds' in kwargs: + egress_nat_ip_address_ids = kwargs['egressNatIpAddressIds'] + if egress_nat_ip_addresses is None and 'egressNatIpAddresses' in kwargs: + egress_nat_ip_addresses = kwargs['egressNatIpAddresses'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + + _setter("public_ip_address_ids", public_ip_address_ids) + _setter("vnet_configuration", vnet_configuration) if egress_nat_ip_address_ids is not None: - pulumi.set(__self__, "egress_nat_ip_address_ids", egress_nat_ip_address_ids) + _setter("egress_nat_ip_address_ids", egress_nat_ip_address_ids) if egress_nat_ip_addresses is not None: - pulumi.set(__self__, "egress_nat_ip_addresses", egress_nat_ip_addresses) + _setter("egress_nat_ip_addresses", egress_nat_ip_addresses) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) @property @pulumi.getter(name="publicIpAddressIds") @@ -1476,13 +2101,40 @@ def __init__(__self__, *, :param pulumi.Input[str] trusted_subnet_id: The ID of the Trust subnet. :param pulumi.Input[str] untrusted_subnet_id: The ID of the UnTrust subnet. """ - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileVnetConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + virtual_network_id=virtual_network_id, + ip_of_trust_for_user_defined_routes=ip_of_trust_for_user_defined_routes, + trusted_subnet_id=trusted_subnet_id, + untrusted_subnet_id=untrusted_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + virtual_network_id: Optional[pulumi.Input[str]] = None, + ip_of_trust_for_user_defined_routes: Optional[pulumi.Input[str]] = None, + trusted_subnet_id: Optional[pulumi.Input[str]] = None, + untrusted_subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if virtual_network_id is None: + raise TypeError("Missing 'virtual_network_id' argument") + if ip_of_trust_for_user_defined_routes is None and 'ipOfTrustForUserDefinedRoutes' in kwargs: + ip_of_trust_for_user_defined_routes = kwargs['ipOfTrustForUserDefinedRoutes'] + if trusted_subnet_id is None and 'trustedSubnetId' in kwargs: + trusted_subnet_id = kwargs['trustedSubnetId'] + if untrusted_subnet_id is None and 'untrustedSubnetId' in kwargs: + untrusted_subnet_id = kwargs['untrustedSubnetId'] + + _setter("virtual_network_id", virtual_network_id) if ip_of_trust_for_user_defined_routes is not None: - pulumi.set(__self__, "ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) + _setter("ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) if trusted_subnet_id is not None: - pulumi.set(__self__, "trusted_subnet_id", trusted_subnet_id) + _setter("trusted_subnet_id", trusted_subnet_id) if untrusted_subnet_id is not None: - pulumi.set(__self__, "untrusted_subnet_id", untrusted_subnet_id) + _setter("untrusted_subnet_id", untrusted_subnet_id) @property @pulumi.getter(name="virtualNetworkId") @@ -1549,20 +2201,55 @@ def __init__(__self__, *, :param pulumi.Input[str] template_name: The name of the Panorama Template applied to this Firewall Resource. :param pulumi.Input[str] virtual_machine_ssh_key: The SSH Key to connect to the Firewall Resource. """ + NextGenerationFirewallVirtualNetworkPanoramaPanoramaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + device_group_name=device_group_name, + host_name=host_name, + name=name, + panorama_server1=panorama_server1, + panorama_server2=panorama_server2, + template_name=template_name, + virtual_machine_ssh_key=virtual_machine_ssh_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + device_group_name: Optional[pulumi.Input[str]] = None, + host_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + panorama_server1: Optional[pulumi.Input[str]] = None, + panorama_server2: Optional[pulumi.Input[str]] = None, + template_name: Optional[pulumi.Input[str]] = None, + virtual_machine_ssh_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if device_group_name is None and 'deviceGroupName' in kwargs: + device_group_name = kwargs['deviceGroupName'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if panorama_server1 is None and 'panoramaServer1' in kwargs: + panorama_server1 = kwargs['panoramaServer1'] + if panorama_server2 is None and 'panoramaServer2' in kwargs: + panorama_server2 = kwargs['panoramaServer2'] + if template_name is None and 'templateName' in kwargs: + template_name = kwargs['templateName'] + if virtual_machine_ssh_key is None and 'virtualMachineSshKey' in kwargs: + virtual_machine_ssh_key = kwargs['virtualMachineSshKey'] + if device_group_name is not None: - pulumi.set(__self__, "device_group_name", device_group_name) + _setter("device_group_name", device_group_name) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if panorama_server1 is not None: - pulumi.set(__self__, "panorama_server1", panorama_server1) + _setter("panorama_server1", panorama_server1) if panorama_server2 is not None: - pulumi.set(__self__, "panorama_server2", panorama_server2) + _setter("panorama_server2", panorama_server2) if template_name is not None: - pulumi.set(__self__, "template_name", template_name) + _setter("template_name", template_name) if virtual_machine_ssh_key is not None: - pulumi.set(__self__, "virtual_machine_ssh_key", virtual_machine_ssh_key) + _setter("virtual_machine_ssh_key", virtual_machine_ssh_key) @property @pulumi.getter(name="deviceGroupName") diff --git a/sdk/python/pulumi_azure/paloalto/get_local_rulestack.py b/sdk/python/pulumi_azure/paloalto/get_local_rulestack.py index 32035eba71..6c2e6daf75 100644 --- a/sdk/python/pulumi_azure/paloalto/get_local_rulestack.py +++ b/sdk/python/pulumi_azure/paloalto/get_local_rulestack.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/paloalto/local_rulestack.py b/sdk/python/pulumi_azure/paloalto/local_rulestack.py index d4414c8b7e..69498877d7 100644 --- a/sdk/python/pulumi_azure/paloalto/local_rulestack.py +++ b/sdk/python/pulumi_azure/paloalto/local_rulestack.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LocalRulestackArgs', 'LocalRulestack'] @@ -37,25 +37,70 @@ def __init__(__self__, *, :param pulumi.Input[str] url_filtering_profile: The setting to use for the URL Filtering Profile. Possible values include `BestPractice`, and `Custom`. :param pulumi.Input[str] vulnerability_profile: The setting to use for the Vulnerability Profile. Possible values include `BestPractice`, and `Custom`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + LocalRulestackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + anti_spyware_profile=anti_spyware_profile, + anti_virus_profile=anti_virus_profile, + description=description, + dns_subscription=dns_subscription, + file_blocking_profile=file_blocking_profile, + location=location, + name=name, + url_filtering_profile=url_filtering_profile, + vulnerability_profile=vulnerability_profile, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + anti_spyware_profile: Optional[pulumi.Input[str]] = None, + anti_virus_profile: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + dns_subscription: Optional[pulumi.Input[str]] = None, + file_blocking_profile: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + url_filtering_profile: Optional[pulumi.Input[str]] = None, + vulnerability_profile: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if anti_spyware_profile is None and 'antiSpywareProfile' in kwargs: + anti_spyware_profile = kwargs['antiSpywareProfile'] + if anti_virus_profile is None and 'antiVirusProfile' in kwargs: + anti_virus_profile = kwargs['antiVirusProfile'] + if dns_subscription is None and 'dnsSubscription' in kwargs: + dns_subscription = kwargs['dnsSubscription'] + if file_blocking_profile is None and 'fileBlockingProfile' in kwargs: + file_blocking_profile = kwargs['fileBlockingProfile'] + if url_filtering_profile is None and 'urlFilteringProfile' in kwargs: + url_filtering_profile = kwargs['urlFilteringProfile'] + if vulnerability_profile is None and 'vulnerabilityProfile' in kwargs: + vulnerability_profile = kwargs['vulnerabilityProfile'] + + _setter("resource_group_name", resource_group_name) if anti_spyware_profile is not None: - pulumi.set(__self__, "anti_spyware_profile", anti_spyware_profile) + _setter("anti_spyware_profile", anti_spyware_profile) if anti_virus_profile is not None: - pulumi.set(__self__, "anti_virus_profile", anti_virus_profile) + _setter("anti_virus_profile", anti_virus_profile) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if dns_subscription is not None: - pulumi.set(__self__, "dns_subscription", dns_subscription) + _setter("dns_subscription", dns_subscription) if file_blocking_profile is not None: - pulumi.set(__self__, "file_blocking_profile", file_blocking_profile) + _setter("file_blocking_profile", file_blocking_profile) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if url_filtering_profile is not None: - pulumi.set(__self__, "url_filtering_profile", url_filtering_profile) + _setter("url_filtering_profile", url_filtering_profile) if vulnerability_profile is not None: - pulumi.set(__self__, "vulnerability_profile", vulnerability_profile) + _setter("vulnerability_profile", vulnerability_profile) @property @pulumi.getter(name="resourceGroupName") @@ -204,26 +249,69 @@ def __init__(__self__, *, :param pulumi.Input[str] url_filtering_profile: The setting to use for the URL Filtering Profile. Possible values include `BestPractice`, and `Custom`. :param pulumi.Input[str] vulnerability_profile: The setting to use for the Vulnerability Profile. Possible values include `BestPractice`, and `Custom`. """ + _LocalRulestackState._configure( + lambda key, value: pulumi.set(__self__, key, value), + anti_spyware_profile=anti_spyware_profile, + anti_virus_profile=anti_virus_profile, + description=description, + dns_subscription=dns_subscription, + file_blocking_profile=file_blocking_profile, + location=location, + name=name, + resource_group_name=resource_group_name, + url_filtering_profile=url_filtering_profile, + vulnerability_profile=vulnerability_profile, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + anti_spyware_profile: Optional[pulumi.Input[str]] = None, + anti_virus_profile: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + dns_subscription: Optional[pulumi.Input[str]] = None, + file_blocking_profile: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + url_filtering_profile: Optional[pulumi.Input[str]] = None, + vulnerability_profile: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if anti_spyware_profile is None and 'antiSpywareProfile' in kwargs: + anti_spyware_profile = kwargs['antiSpywareProfile'] + if anti_virus_profile is None and 'antiVirusProfile' in kwargs: + anti_virus_profile = kwargs['antiVirusProfile'] + if dns_subscription is None and 'dnsSubscription' in kwargs: + dns_subscription = kwargs['dnsSubscription'] + if file_blocking_profile is None and 'fileBlockingProfile' in kwargs: + file_blocking_profile = kwargs['fileBlockingProfile'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if url_filtering_profile is None and 'urlFilteringProfile' in kwargs: + url_filtering_profile = kwargs['urlFilteringProfile'] + if vulnerability_profile is None and 'vulnerabilityProfile' in kwargs: + vulnerability_profile = kwargs['vulnerabilityProfile'] + if anti_spyware_profile is not None: - pulumi.set(__self__, "anti_spyware_profile", anti_spyware_profile) + _setter("anti_spyware_profile", anti_spyware_profile) if anti_virus_profile is not None: - pulumi.set(__self__, "anti_virus_profile", anti_virus_profile) + _setter("anti_virus_profile", anti_virus_profile) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if dns_subscription is not None: - pulumi.set(__self__, "dns_subscription", dns_subscription) + _setter("dns_subscription", dns_subscription) if file_blocking_profile is not None: - pulumi.set(__self__, "file_blocking_profile", file_blocking_profile) + _setter("file_blocking_profile", file_blocking_profile) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if url_filtering_profile is not None: - pulumi.set(__self__, "url_filtering_profile", url_filtering_profile) + _setter("url_filtering_profile", url_filtering_profile) if vulnerability_profile is not None: - pulumi.set(__self__, "vulnerability_profile", vulnerability_profile) + _setter("vulnerability_profile", vulnerability_profile) @property @pulumi.getter(name="antiSpywareProfile") @@ -437,6 +525,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LocalRulestackArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/paloalto/local_rulestack_certificate.py b/sdk/python/pulumi_azure/paloalto/local_rulestack_certificate.py index b538e0f921..0cc9221dd0 100644 --- a/sdk/python/pulumi_azure/paloalto/local_rulestack_certificate.py +++ b/sdk/python/pulumi_azure/paloalto/local_rulestack_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LocalRulestackCertificateArgs', 'LocalRulestackCertificate'] @@ -31,17 +31,48 @@ def __init__(__self__, *, > **Note:** One and only one of `self_signed` or `key_vault_certificate_id` must be specified. """ - pulumi.set(__self__, "rulestack_id", rulestack_id) + LocalRulestackCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + rulestack_id=rulestack_id, + audit_comment=audit_comment, + description=description, + key_vault_certificate_id=key_vault_certificate_id, + name=name, + self_signed=self_signed, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rulestack_id: Optional[pulumi.Input[str]] = None, + audit_comment: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + key_vault_certificate_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + self_signed: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rulestack_id is None and 'rulestackId' in kwargs: + rulestack_id = kwargs['rulestackId'] + if rulestack_id is None: + raise TypeError("Missing 'rulestack_id' argument") + if audit_comment is None and 'auditComment' in kwargs: + audit_comment = kwargs['auditComment'] + if key_vault_certificate_id is None and 'keyVaultCertificateId' in kwargs: + key_vault_certificate_id = kwargs['keyVaultCertificateId'] + if self_signed is None and 'selfSigned' in kwargs: + self_signed = kwargs['selfSigned'] + + _setter("rulestack_id", rulestack_id) if audit_comment is not None: - pulumi.set(__self__, "audit_comment", audit_comment) + _setter("audit_comment", audit_comment) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if key_vault_certificate_id is not None: - pulumi.set(__self__, "key_vault_certificate_id", key_vault_certificate_id) + _setter("key_vault_certificate_id", key_vault_certificate_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if self_signed is not None: - pulumi.set(__self__, "self_signed", self_signed) + _setter("self_signed", self_signed) @property @pulumi.getter(name="rulestackId") @@ -138,18 +169,47 @@ def __init__(__self__, *, > **Note:** One and only one of `self_signed` or `key_vault_certificate_id` must be specified. """ + _LocalRulestackCertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + audit_comment=audit_comment, + description=description, + key_vault_certificate_id=key_vault_certificate_id, + name=name, + rulestack_id=rulestack_id, + self_signed=self_signed, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audit_comment: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + key_vault_certificate_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rulestack_id: Optional[pulumi.Input[str]] = None, + self_signed: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audit_comment is None and 'auditComment' in kwargs: + audit_comment = kwargs['auditComment'] + if key_vault_certificate_id is None and 'keyVaultCertificateId' in kwargs: + key_vault_certificate_id = kwargs['keyVaultCertificateId'] + if rulestack_id is None and 'rulestackId' in kwargs: + rulestack_id = kwargs['rulestackId'] + if self_signed is None and 'selfSigned' in kwargs: + self_signed = kwargs['selfSigned'] + if audit_comment is not None: - pulumi.set(__self__, "audit_comment", audit_comment) + _setter("audit_comment", audit_comment) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if key_vault_certificate_id is not None: - pulumi.set(__self__, "key_vault_certificate_id", key_vault_certificate_id) + _setter("key_vault_certificate_id", key_vault_certificate_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rulestack_id is not None: - pulumi.set(__self__, "rulestack_id", rulestack_id) + _setter("rulestack_id", rulestack_id) if self_signed is not None: - pulumi.set(__self__, "self_signed", self_signed) + _setter("self_signed", self_signed) @property @pulumi.getter(name="auditComment") @@ -317,6 +377,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LocalRulestackCertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/paloalto/local_rulestack_fqdn_list.py b/sdk/python/pulumi_azure/paloalto/local_rulestack_fqdn_list.py index 305a981a51..482b345571 100644 --- a/sdk/python/pulumi_azure/paloalto/local_rulestack_fqdn_list.py +++ b/sdk/python/pulumi_azure/paloalto/local_rulestack_fqdn_list.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LocalRulestackFqdnListArgs', 'LocalRulestackFqdnList'] @@ -27,14 +27,43 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description for the FQDN List. :param pulumi.Input[str] name: The name which should be used for this Palo Alto Local Rulestack FQDN List. """ - pulumi.set(__self__, "fully_qualified_domain_names", fully_qualified_domain_names) - pulumi.set(__self__, "rulestack_id", rulestack_id) + LocalRulestackFqdnListArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fully_qualified_domain_names=fully_qualified_domain_names, + rulestack_id=rulestack_id, + audit_comment=audit_comment, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fully_qualified_domain_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + rulestack_id: Optional[pulumi.Input[str]] = None, + audit_comment: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fully_qualified_domain_names is None and 'fullyQualifiedDomainNames' in kwargs: + fully_qualified_domain_names = kwargs['fullyQualifiedDomainNames'] + if fully_qualified_domain_names is None: + raise TypeError("Missing 'fully_qualified_domain_names' argument") + if rulestack_id is None and 'rulestackId' in kwargs: + rulestack_id = kwargs['rulestackId'] + if rulestack_id is None: + raise TypeError("Missing 'rulestack_id' argument") + if audit_comment is None and 'auditComment' in kwargs: + audit_comment = kwargs['auditComment'] + + _setter("fully_qualified_domain_names", fully_qualified_domain_names) + _setter("rulestack_id", rulestack_id) if audit_comment is not None: - pulumi.set(__self__, "audit_comment", audit_comment) + _setter("audit_comment", audit_comment) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="fullyQualifiedDomainNames") @@ -113,16 +142,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Palo Alto Local Rulestack FQDN List. :param pulumi.Input[str] rulestack_id: The ID of the TODO. Changing this forces a new Palo Alto Local Rulestack FQDN List to be created. """ + _LocalRulestackFqdnListState._configure( + lambda key, value: pulumi.set(__self__, key, value), + audit_comment=audit_comment, + description=description, + fully_qualified_domain_names=fully_qualified_domain_names, + name=name, + rulestack_id=rulestack_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audit_comment: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + fully_qualified_domain_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + rulestack_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audit_comment is None and 'auditComment' in kwargs: + audit_comment = kwargs['auditComment'] + if fully_qualified_domain_names is None and 'fullyQualifiedDomainNames' in kwargs: + fully_qualified_domain_names = kwargs['fullyQualifiedDomainNames'] + if rulestack_id is None and 'rulestackId' in kwargs: + rulestack_id = kwargs['rulestackId'] + if audit_comment is not None: - pulumi.set(__self__, "audit_comment", audit_comment) + _setter("audit_comment", audit_comment) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if fully_qualified_domain_names is not None: - pulumi.set(__self__, "fully_qualified_domain_names", fully_qualified_domain_names) + _setter("fully_qualified_domain_names", fully_qualified_domain_names) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rulestack_id is not None: - pulumi.set(__self__, "rulestack_id", rulestack_id) + _setter("rulestack_id", rulestack_id) @property @pulumi.getter(name="auditComment") @@ -272,6 +326,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LocalRulestackFqdnListArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/paloalto/local_rulestack_outbound_trust_certificate_association.py b/sdk/python/pulumi_azure/paloalto/local_rulestack_outbound_trust_certificate_association.py index c6cd9c596c..1a5680bf91 100644 --- a/sdk/python/pulumi_azure/paloalto/local_rulestack_outbound_trust_certificate_association.py +++ b/sdk/python/pulumi_azure/paloalto/local_rulestack_outbound_trust_certificate_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LocalRulestackOutboundTrustCertificateAssociationArgs', 'LocalRulestackOutboundTrustCertificateAssociation'] @@ -19,7 +19,22 @@ def __init__(__self__, *, The set of arguments for constructing a LocalRulestackOutboundTrustCertificateAssociation resource. :param pulumi.Input[str] certificate_id: The ID of the Certificate to use as the Outbound Trust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Trust Certificate Association to be created. """ - pulumi.set(__self__, "certificate_id", certificate_id) + LocalRulestackOutboundTrustCertificateAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_id=certificate_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_id is None and 'certificateId' in kwargs: + certificate_id = kwargs['certificateId'] + if certificate_id is None: + raise TypeError("Missing 'certificate_id' argument") + + _setter("certificate_id", certificate_id) @property @pulumi.getter(name="certificateId") @@ -42,8 +57,21 @@ def __init__(__self__, *, Input properties used for looking up and filtering LocalRulestackOutboundTrustCertificateAssociation resources. :param pulumi.Input[str] certificate_id: The ID of the Certificate to use as the Outbound Trust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Trust Certificate Association to be created. """ + _LocalRulestackOutboundTrustCertificateAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_id=certificate_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_id is None and 'certificateId' in kwargs: + certificate_id = kwargs['certificateId'] + if certificate_id is not None: - pulumi.set(__self__, "certificate_id", certificate_id) + _setter("certificate_id", certificate_id) @property @pulumi.getter(name="certificateId") @@ -123,6 +151,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LocalRulestackOutboundTrustCertificateAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/paloalto/local_rulestack_outbound_untrust_certificate_association.py b/sdk/python/pulumi_azure/paloalto/local_rulestack_outbound_untrust_certificate_association.py index 9556598754..5dbfdae1b5 100644 --- a/sdk/python/pulumi_azure/paloalto/local_rulestack_outbound_untrust_certificate_association.py +++ b/sdk/python/pulumi_azure/paloalto/local_rulestack_outbound_untrust_certificate_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LocalRulestackOutboundUntrustCertificateAssociationArgs', 'LocalRulestackOutboundUntrustCertificateAssociation'] @@ -19,7 +19,22 @@ def __init__(__self__, *, The set of arguments for constructing a LocalRulestackOutboundUntrustCertificateAssociation resource. :param pulumi.Input[str] certificate_id: The ID of the Certificate to use as the Outbound Untrust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Untrust Certificate Association to be created. """ - pulumi.set(__self__, "certificate_id", certificate_id) + LocalRulestackOutboundUntrustCertificateAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_id=certificate_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_id is None and 'certificateId' in kwargs: + certificate_id = kwargs['certificateId'] + if certificate_id is None: + raise TypeError("Missing 'certificate_id' argument") + + _setter("certificate_id", certificate_id) @property @pulumi.getter(name="certificateId") @@ -42,8 +57,21 @@ def __init__(__self__, *, Input properties used for looking up and filtering LocalRulestackOutboundUntrustCertificateAssociation resources. :param pulumi.Input[str] certificate_id: The ID of the Certificate to use as the Outbound Untrust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Untrust Certificate Association to be created. """ + _LocalRulestackOutboundUntrustCertificateAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_id=certificate_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_id is None and 'certificateId' in kwargs: + certificate_id = kwargs['certificateId'] + if certificate_id is not None: - pulumi.set(__self__, "certificate_id", certificate_id) + _setter("certificate_id", certificate_id) @property @pulumi.getter(name="certificateId") @@ -123,6 +151,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LocalRulestackOutboundUntrustCertificateAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/paloalto/local_rulestack_prefix_list.py b/sdk/python/pulumi_azure/paloalto/local_rulestack_prefix_list.py index 8568f9ccf2..c4eded908d 100644 --- a/sdk/python/pulumi_azure/paloalto/local_rulestack_prefix_list.py +++ b/sdk/python/pulumi_azure/paloalto/local_rulestack_prefix_list.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LocalRulestackPrefixListArgs', 'LocalRulestackPrefixList'] @@ -27,14 +27,43 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description for the Prefix List. :param pulumi.Input[str] name: The name which should be used for this Palo Alto Local Rulestack Prefix List. """ - pulumi.set(__self__, "prefix_lists", prefix_lists) - pulumi.set(__self__, "rulestack_id", rulestack_id) + LocalRulestackPrefixListArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + prefix_lists=prefix_lists, + rulestack_id=rulestack_id, + audit_comment=audit_comment, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + prefix_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + rulestack_id: Optional[pulumi.Input[str]] = None, + audit_comment: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if prefix_lists is None and 'prefixLists' in kwargs: + prefix_lists = kwargs['prefixLists'] + if prefix_lists is None: + raise TypeError("Missing 'prefix_lists' argument") + if rulestack_id is None and 'rulestackId' in kwargs: + rulestack_id = kwargs['rulestackId'] + if rulestack_id is None: + raise TypeError("Missing 'rulestack_id' argument") + if audit_comment is None and 'auditComment' in kwargs: + audit_comment = kwargs['auditComment'] + + _setter("prefix_lists", prefix_lists) + _setter("rulestack_id", rulestack_id) if audit_comment is not None: - pulumi.set(__self__, "audit_comment", audit_comment) + _setter("audit_comment", audit_comment) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="prefixLists") @@ -113,16 +142,41 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] prefix_lists: Specifies a list of Prefixes. :param pulumi.Input[str] rulestack_id: The ID of the Local Rulestack on which to create this Prefix List. Changing this forces a new Palo Alto Local Rulestack Prefix List to be created. """ + _LocalRulestackPrefixListState._configure( + lambda key, value: pulumi.set(__self__, key, value), + audit_comment=audit_comment, + description=description, + name=name, + prefix_lists=prefix_lists, + rulestack_id=rulestack_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + audit_comment: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + prefix_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + rulestack_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audit_comment is None and 'auditComment' in kwargs: + audit_comment = kwargs['auditComment'] + if prefix_lists is None and 'prefixLists' in kwargs: + prefix_lists = kwargs['prefixLists'] + if rulestack_id is None and 'rulestackId' in kwargs: + rulestack_id = kwargs['rulestackId'] + if audit_comment is not None: - pulumi.set(__self__, "audit_comment", audit_comment) + _setter("audit_comment", audit_comment) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if prefix_lists is not None: - pulumi.set(__self__, "prefix_lists", prefix_lists) + _setter("prefix_lists", prefix_lists) if rulestack_id is not None: - pulumi.set(__self__, "rulestack_id", rulestack_id) + _setter("rulestack_id", rulestack_id) @property @pulumi.getter(name="auditComment") @@ -272,6 +326,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LocalRulestackPrefixListArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/paloalto/local_rulestack_rule.py b/sdk/python/pulumi_azure/paloalto/local_rulestack_rule.py index 30a59eb1a3..ce7a7e0bf6 100644 --- a/sdk/python/pulumi_azure/paloalto/local_rulestack_rule.py +++ b/sdk/python/pulumi_azure/paloalto/local_rulestack_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,38 +59,113 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] protocol_ports: Specifies a list of Protocol:Port entries. E.g. `[ "TCP:80", "UDP:5431" ]`. Conflicts with `protocol`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Palo Alto Local Rulestack Rule. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "applications", applications) - pulumi.set(__self__, "destination", destination) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "rulestack_id", rulestack_id) - pulumi.set(__self__, "source", source) + LocalRulestackRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + applications=applications, + destination=destination, + priority=priority, + rulestack_id=rulestack_id, + source=source, + audit_comment=audit_comment, + category=category, + decryption_rule_type=decryption_rule_type, + description=description, + enabled=enabled, + inspection_certificate_id=inspection_certificate_id, + logging_enabled=logging_enabled, + name=name, + negate_destination=negate_destination, + negate_source=negate_source, + protocol=protocol, + protocol_ports=protocol_ports, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + destination: Optional[pulumi.Input['LocalRulestackRuleDestinationArgs']] = None, + priority: Optional[pulumi.Input[int]] = None, + rulestack_id: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input['LocalRulestackRuleSourceArgs']] = None, + audit_comment: Optional[pulumi.Input[str]] = None, + category: Optional[pulumi.Input['LocalRulestackRuleCategoryArgs']] = None, + decryption_rule_type: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + inspection_certificate_id: Optional[pulumi.Input[str]] = None, + logging_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + negate_destination: Optional[pulumi.Input[bool]] = None, + negate_source: Optional[pulumi.Input[bool]] = None, + protocol: Optional[pulumi.Input[str]] = None, + protocol_ports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if applications is None: + raise TypeError("Missing 'applications' argument") + if destination is None: + raise TypeError("Missing 'destination' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if rulestack_id is None and 'rulestackId' in kwargs: + rulestack_id = kwargs['rulestackId'] + if rulestack_id is None: + raise TypeError("Missing 'rulestack_id' argument") + if source is None: + raise TypeError("Missing 'source' argument") + if audit_comment is None and 'auditComment' in kwargs: + audit_comment = kwargs['auditComment'] + if decryption_rule_type is None and 'decryptionRuleType' in kwargs: + decryption_rule_type = kwargs['decryptionRuleType'] + if inspection_certificate_id is None and 'inspectionCertificateId' in kwargs: + inspection_certificate_id = kwargs['inspectionCertificateId'] + if logging_enabled is None and 'loggingEnabled' in kwargs: + logging_enabled = kwargs['loggingEnabled'] + if negate_destination is None and 'negateDestination' in kwargs: + negate_destination = kwargs['negateDestination'] + if negate_source is None and 'negateSource' in kwargs: + negate_source = kwargs['negateSource'] + if protocol_ports is None and 'protocolPorts' in kwargs: + protocol_ports = kwargs['protocolPorts'] + + _setter("action", action) + _setter("applications", applications) + _setter("destination", destination) + _setter("priority", priority) + _setter("rulestack_id", rulestack_id) + _setter("source", source) if audit_comment is not None: - pulumi.set(__self__, "audit_comment", audit_comment) + _setter("audit_comment", audit_comment) if category is not None: - pulumi.set(__self__, "category", category) + _setter("category", category) if decryption_rule_type is not None: - pulumi.set(__self__, "decryption_rule_type", decryption_rule_type) + _setter("decryption_rule_type", decryption_rule_type) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if inspection_certificate_id is not None: - pulumi.set(__self__, "inspection_certificate_id", inspection_certificate_id) + _setter("inspection_certificate_id", inspection_certificate_id) if logging_enabled is not None: - pulumi.set(__self__, "logging_enabled", logging_enabled) + _setter("logging_enabled", logging_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if negate_destination is not None: - pulumi.set(__self__, "negate_destination", negate_destination) + _setter("negate_destination", negate_destination) if negate_source is not None: - pulumi.set(__self__, "negate_source", negate_source) + _setter("negate_source", negate_source) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if protocol_ports is not None: - pulumi.set(__self__, "protocol_ports", protocol_ports) + _setter("protocol_ports", protocol_ports) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -369,44 +444,107 @@ def __init__(__self__, *, :param pulumi.Input['LocalRulestackRuleSourceArgs'] source: One or more `source` blocks as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Palo Alto Local Rulestack Rule. """ + _LocalRulestackRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + applications=applications, + audit_comment=audit_comment, + category=category, + decryption_rule_type=decryption_rule_type, + description=description, + destination=destination, + enabled=enabled, + inspection_certificate_id=inspection_certificate_id, + logging_enabled=logging_enabled, + name=name, + negate_destination=negate_destination, + negate_source=negate_source, + priority=priority, + protocol=protocol, + protocol_ports=protocol_ports, + rulestack_id=rulestack_id, + source=source, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + applications: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + audit_comment: Optional[pulumi.Input[str]] = None, + category: Optional[pulumi.Input['LocalRulestackRuleCategoryArgs']] = None, + decryption_rule_type: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + destination: Optional[pulumi.Input['LocalRulestackRuleDestinationArgs']] = None, + enabled: Optional[pulumi.Input[bool]] = None, + inspection_certificate_id: Optional[pulumi.Input[str]] = None, + logging_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + negate_destination: Optional[pulumi.Input[bool]] = None, + negate_source: Optional[pulumi.Input[bool]] = None, + priority: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + protocol_ports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + rulestack_id: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input['LocalRulestackRuleSourceArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if audit_comment is None and 'auditComment' in kwargs: + audit_comment = kwargs['auditComment'] + if decryption_rule_type is None and 'decryptionRuleType' in kwargs: + decryption_rule_type = kwargs['decryptionRuleType'] + if inspection_certificate_id is None and 'inspectionCertificateId' in kwargs: + inspection_certificate_id = kwargs['inspectionCertificateId'] + if logging_enabled is None and 'loggingEnabled' in kwargs: + logging_enabled = kwargs['loggingEnabled'] + if negate_destination is None and 'negateDestination' in kwargs: + negate_destination = kwargs['negateDestination'] + if negate_source is None and 'negateSource' in kwargs: + negate_source = kwargs['negateSource'] + if protocol_ports is None and 'protocolPorts' in kwargs: + protocol_ports = kwargs['protocolPorts'] + if rulestack_id is None and 'rulestackId' in kwargs: + rulestack_id = kwargs['rulestackId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if applications is not None: - pulumi.set(__self__, "applications", applications) + _setter("applications", applications) if audit_comment is not None: - pulumi.set(__self__, "audit_comment", audit_comment) + _setter("audit_comment", audit_comment) if category is not None: - pulumi.set(__self__, "category", category) + _setter("category", category) if decryption_rule_type is not None: - pulumi.set(__self__, "decryption_rule_type", decryption_rule_type) + _setter("decryption_rule_type", decryption_rule_type) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if destination is not None: - pulumi.set(__self__, "destination", destination) + _setter("destination", destination) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if inspection_certificate_id is not None: - pulumi.set(__self__, "inspection_certificate_id", inspection_certificate_id) + _setter("inspection_certificate_id", inspection_certificate_id) if logging_enabled is not None: - pulumi.set(__self__, "logging_enabled", logging_enabled) + _setter("logging_enabled", logging_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if negate_destination is not None: - pulumi.set(__self__, "negate_destination", negate_destination) + _setter("negate_destination", negate_destination) if negate_source is not None: - pulumi.set(__self__, "negate_source", negate_source) + _setter("negate_source", negate_source) if priority is not None: - pulumi.set(__self__, "priority", priority) + _setter("priority", priority) if protocol is not None: - pulumi.set(__self__, "protocol", protocol) + _setter("protocol", protocol) if protocol_ports is not None: - pulumi.set(__self__, "protocol_ports", protocol_ports) + _setter("protocol_ports", protocol_ports) if rulestack_id is not None: - pulumi.set(__self__, "rulestack_id", rulestack_id) + _setter("rulestack_id", rulestack_id) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -772,6 +910,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LocalRulestackRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -812,9 +954,19 @@ def _internal_init(__self__, raise TypeError("Missing required property 'applications'") __props__.__dict__["applications"] = applications __props__.__dict__["audit_comment"] = audit_comment + if category is not None and not isinstance(category, LocalRulestackRuleCategoryArgs): + category = category or {} + def _setter(key, value): + category[key] = value + LocalRulestackRuleCategoryArgs._configure(_setter, **category) __props__.__dict__["category"] = category __props__.__dict__["decryption_rule_type"] = decryption_rule_type __props__.__dict__["description"] = description + if destination is not None and not isinstance(destination, LocalRulestackRuleDestinationArgs): + destination = destination or {} + def _setter(key, value): + destination[key] = value + LocalRulestackRuleDestinationArgs._configure(_setter, **destination) if destination is None and not opts.urn: raise TypeError("Missing required property 'destination'") __props__.__dict__["destination"] = destination @@ -832,6 +984,11 @@ def _internal_init(__self__, if rulestack_id is None and not opts.urn: raise TypeError("Missing required property 'rulestack_id'") __props__.__dict__["rulestack_id"] = rulestack_id + if source is not None and not isinstance(source, LocalRulestackRuleSourceArgs): + source = source or {} + def _setter(key, value): + source[key] = value + LocalRulestackRuleSourceArgs._configure(_setter, **source) if source is None and not opts.urn: raise TypeError("Missing required property 'source'") __props__.__dict__["source"] = source diff --git a/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_hub_local_rulestack.py b/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_hub_local_rulestack.py index 4a234ea90f..70bc4d6469 100644 --- a/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_hub_local_rulestack.py +++ b/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_hub_local_rulestack.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -26,17 +26,56 @@ def __init__(__self__, *, """ The set of arguments for constructing a NextGenerationFirewallVirtualHubLocalRulestack resource. """ - pulumi.set(__self__, "network_profile", network_profile) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "rulestack_id", rulestack_id) + NextGenerationFirewallVirtualHubLocalRulestackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_profile=network_profile, + resource_group_name=resource_group_name, + rulestack_id=rulestack_id, + destination_nats=destination_nats, + dns_settings=dns_settings, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_profile: Optional[pulumi.Input['NextGenerationFirewallVirtualHubLocalRulestackNetworkProfileArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rulestack_id: Optional[pulumi.Input[str]] = None, + destination_nats: Optional[pulumi.Input[Sequence[pulumi.Input['NextGenerationFirewallVirtualHubLocalRulestackDestinationNatArgs']]]] = None, + dns_settings: Optional[pulumi.Input['NextGenerationFirewallVirtualHubLocalRulestackDnsSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if network_profile is None: + raise TypeError("Missing 'network_profile' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if rulestack_id is None and 'rulestackId' in kwargs: + rulestack_id = kwargs['rulestackId'] + if rulestack_id is None: + raise TypeError("Missing 'rulestack_id' argument") + if destination_nats is None and 'destinationNats' in kwargs: + destination_nats = kwargs['destinationNats'] + if dns_settings is None and 'dnsSettings' in kwargs: + dns_settings = kwargs['dnsSettings'] + + _setter("network_profile", network_profile) + _setter("resource_group_name", resource_group_name) + _setter("rulestack_id", rulestack_id) if destination_nats is not None: - pulumi.set(__self__, "destination_nats", destination_nats) + _setter("destination_nats", destination_nats) if dns_settings is not None: - pulumi.set(__self__, "dns_settings", dns_settings) + _setter("dns_settings", dns_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="networkProfile") @@ -115,20 +154,53 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering NextGenerationFirewallVirtualHubLocalRulestack resources. """ + _NextGenerationFirewallVirtualHubLocalRulestackState._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_nats=destination_nats, + dns_settings=dns_settings, + name=name, + network_profile=network_profile, + resource_group_name=resource_group_name, + rulestack_id=rulestack_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_nats: Optional[pulumi.Input[Sequence[pulumi.Input['NextGenerationFirewallVirtualHubLocalRulestackDestinationNatArgs']]]] = None, + dns_settings: Optional[pulumi.Input['NextGenerationFirewallVirtualHubLocalRulestackDnsSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network_profile: Optional[pulumi.Input['NextGenerationFirewallVirtualHubLocalRulestackNetworkProfileArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rulestack_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_nats is None and 'destinationNats' in kwargs: + destination_nats = kwargs['destinationNats'] + if dns_settings is None and 'dnsSettings' in kwargs: + dns_settings = kwargs['dnsSettings'] + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if rulestack_id is None and 'rulestackId' in kwargs: + rulestack_id = kwargs['rulestackId'] + if destination_nats is not None: - pulumi.set(__self__, "destination_nats", destination_nats) + _setter("destination_nats", destination_nats) if dns_settings is not None: - pulumi.set(__self__, "dns_settings", dns_settings) + _setter("dns_settings", dns_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_profile is not None: - pulumi.set(__self__, "network_profile", network_profile) + _setter("network_profile", network_profile) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rulestack_id is not None: - pulumi.set(__self__, "rulestack_id", rulestack_id) + _setter("rulestack_id", rulestack_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="destinationNats") @@ -230,6 +302,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NextGenerationFirewallVirtualHubLocalRulestackArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -252,8 +328,18 @@ def _internal_init(__self__, __props__ = NextGenerationFirewallVirtualHubLocalRulestackArgs.__new__(NextGenerationFirewallVirtualHubLocalRulestackArgs) __props__.__dict__["destination_nats"] = destination_nats + if dns_settings is not None and not isinstance(dns_settings, NextGenerationFirewallVirtualHubLocalRulestackDnsSettingsArgs): + dns_settings = dns_settings or {} + def _setter(key, value): + dns_settings[key] = value + NextGenerationFirewallVirtualHubLocalRulestackDnsSettingsArgs._configure(_setter, **dns_settings) __props__.__dict__["dns_settings"] = dns_settings __props__.__dict__["name"] = name + if network_profile is not None and not isinstance(network_profile, NextGenerationFirewallVirtualHubLocalRulestackNetworkProfileArgs): + network_profile = network_profile or {} + def _setter(key, value): + network_profile[key] = value + NextGenerationFirewallVirtualHubLocalRulestackNetworkProfileArgs._configure(_setter, **network_profile) if network_profile is None and not opts.urn: raise TypeError("Missing required property 'network_profile'") __props__.__dict__["network_profile"] = network_profile diff --git a/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_hub_panorama.py b/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_hub_panorama.py index aaced3e64f..0fe4c38459 100644 --- a/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_hub_panorama.py +++ b/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_hub_panorama.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,19 +27,60 @@ def __init__(__self__, *, """ The set of arguments for constructing a NextGenerationFirewallVirtualHubPanorama resource. """ - pulumi.set(__self__, "network_profile", network_profile) - pulumi.set(__self__, "panorama_base64_config", panorama_base64_config) - pulumi.set(__self__, "resource_group_name", resource_group_name) + NextGenerationFirewallVirtualHubPanoramaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_profile=network_profile, + panorama_base64_config=panorama_base64_config, + resource_group_name=resource_group_name, + destination_nats=destination_nats, + dns_settings=dns_settings, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_profile: Optional[pulumi.Input['NextGenerationFirewallVirtualHubPanoramaNetworkProfileArgs']] = None, + panorama_base64_config: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + destination_nats: Optional[pulumi.Input[Sequence[pulumi.Input['NextGenerationFirewallVirtualHubPanoramaDestinationNatArgs']]]] = None, + dns_settings: Optional[pulumi.Input['NextGenerationFirewallVirtualHubPanoramaDnsSettingsArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if network_profile is None: + raise TypeError("Missing 'network_profile' argument") + if panorama_base64_config is None and 'panoramaBase64Config' in kwargs: + panorama_base64_config = kwargs['panoramaBase64Config'] + if panorama_base64_config is None: + raise TypeError("Missing 'panorama_base64_config' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if destination_nats is None and 'destinationNats' in kwargs: + destination_nats = kwargs['destinationNats'] + if dns_settings is None and 'dnsSettings' in kwargs: + dns_settings = kwargs['dnsSettings'] + + _setter("network_profile", network_profile) + _setter("panorama_base64_config", panorama_base64_config) + _setter("resource_group_name", resource_group_name) if destination_nats is not None: - pulumi.set(__self__, "destination_nats", destination_nats) + _setter("destination_nats", destination_nats) if dns_settings is not None: - pulumi.set(__self__, "dns_settings", dns_settings) + _setter("dns_settings", dns_settings) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="networkProfile") @@ -129,24 +170,61 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering NextGenerationFirewallVirtualHubPanorama resources. """ + _NextGenerationFirewallVirtualHubPanoramaState._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_nats=destination_nats, + dns_settings=dns_settings, + location=location, + name=name, + network_profile=network_profile, + panorama_base64_config=panorama_base64_config, + panoramas=panoramas, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_nats: Optional[pulumi.Input[Sequence[pulumi.Input['NextGenerationFirewallVirtualHubPanoramaDestinationNatArgs']]]] = None, + dns_settings: Optional[pulumi.Input['NextGenerationFirewallVirtualHubPanoramaDnsSettingsArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_profile: Optional[pulumi.Input['NextGenerationFirewallVirtualHubPanoramaNetworkProfileArgs']] = None, + panorama_base64_config: Optional[pulumi.Input[str]] = None, + panoramas: Optional[pulumi.Input[Sequence[pulumi.Input['NextGenerationFirewallVirtualHubPanoramaPanoramaArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_nats is None and 'destinationNats' in kwargs: + destination_nats = kwargs['destinationNats'] + if dns_settings is None and 'dnsSettings' in kwargs: + dns_settings = kwargs['dnsSettings'] + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if panorama_base64_config is None and 'panoramaBase64Config' in kwargs: + panorama_base64_config = kwargs['panoramaBase64Config'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if destination_nats is not None: - pulumi.set(__self__, "destination_nats", destination_nats) + _setter("destination_nats", destination_nats) if dns_settings is not None: - pulumi.set(__self__, "dns_settings", dns_settings) + _setter("dns_settings", dns_settings) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_profile is not None: - pulumi.set(__self__, "network_profile", network_profile) + _setter("network_profile", network_profile) if panorama_base64_config is not None: - pulumi.set(__self__, "panorama_base64_config", panorama_base64_config) + _setter("panorama_base64_config", panorama_base64_config) if panoramas is not None: - pulumi.set(__self__, "panoramas", panoramas) + _setter("panoramas", panoramas) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="destinationNats") @@ -267,6 +345,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NextGenerationFirewallVirtualHubPanoramaArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -290,9 +372,19 @@ def _internal_init(__self__, __props__ = NextGenerationFirewallVirtualHubPanoramaArgs.__new__(NextGenerationFirewallVirtualHubPanoramaArgs) __props__.__dict__["destination_nats"] = destination_nats + if dns_settings is not None and not isinstance(dns_settings, NextGenerationFirewallVirtualHubPanoramaDnsSettingsArgs): + dns_settings = dns_settings or {} + def _setter(key, value): + dns_settings[key] = value + NextGenerationFirewallVirtualHubPanoramaDnsSettingsArgs._configure(_setter, **dns_settings) __props__.__dict__["dns_settings"] = dns_settings __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if network_profile is not None and not isinstance(network_profile, NextGenerationFirewallVirtualHubPanoramaNetworkProfileArgs): + network_profile = network_profile or {} + def _setter(key, value): + network_profile[key] = value + NextGenerationFirewallVirtualHubPanoramaNetworkProfileArgs._configure(_setter, **network_profile) if network_profile is None and not opts.urn: raise TypeError("Missing required property 'network_profile'") __props__.__dict__["network_profile"] = network_profile diff --git a/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_network_local_rulestack.py b/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_network_local_rulestack.py index e60a627102..df536a1447 100644 --- a/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_network_local_rulestack.py +++ b/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_network_local_rulestack.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,56 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Local Rulestack. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Local Rulestack to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Local Rulestack. """ - pulumi.set(__self__, "network_profile", network_profile) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "rulestack_id", rulestack_id) + NextGenerationFirewallVirtualNetworkLocalRulestackArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_profile=network_profile, + resource_group_name=resource_group_name, + rulestack_id=rulestack_id, + destination_nats=destination_nats, + dns_settings=dns_settings, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_profile: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rulestack_id: Optional[pulumi.Input[str]] = None, + destination_nats: Optional[pulumi.Input[Sequence[pulumi.Input['NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatArgs']]]] = None, + dns_settings: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if network_profile is None: + raise TypeError("Missing 'network_profile' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if rulestack_id is None and 'rulestackId' in kwargs: + rulestack_id = kwargs['rulestackId'] + if rulestack_id is None: + raise TypeError("Missing 'rulestack_id' argument") + if destination_nats is None and 'destinationNats' in kwargs: + destination_nats = kwargs['destinationNats'] + if dns_settings is None and 'dnsSettings' in kwargs: + dns_settings = kwargs['dnsSettings'] + + _setter("network_profile", network_profile) + _setter("resource_group_name", resource_group_name) + _setter("rulestack_id", rulestack_id) if destination_nats is not None: - pulumi.set(__self__, "destination_nats", destination_nats) + _setter("destination_nats", destination_nats) if dns_settings is not None: - pulumi.set(__self__, "dns_settings", dns_settings) + _setter("dns_settings", dns_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="networkProfile") @@ -150,20 +189,53 @@ def __init__(__self__, *, :param pulumi.Input[str] rulestack_id: The ID of the Local Rulestack which will be used to configure this Firewall Resource. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Local Rulestack. """ + _NextGenerationFirewallVirtualNetworkLocalRulestackState._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_nats=destination_nats, + dns_settings=dns_settings, + name=name, + network_profile=network_profile, + resource_group_name=resource_group_name, + rulestack_id=rulestack_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_nats: Optional[pulumi.Input[Sequence[pulumi.Input['NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatArgs']]]] = None, + dns_settings: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettingsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + network_profile: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + rulestack_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_nats is None and 'destinationNats' in kwargs: + destination_nats = kwargs['destinationNats'] + if dns_settings is None and 'dnsSettings' in kwargs: + dns_settings = kwargs['dnsSettings'] + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if rulestack_id is None and 'rulestackId' in kwargs: + rulestack_id = kwargs['rulestackId'] + if destination_nats is not None: - pulumi.set(__self__, "destination_nats", destination_nats) + _setter("destination_nats", destination_nats) if dns_settings is not None: - pulumi.set(__self__, "dns_settings", dns_settings) + _setter("dns_settings", dns_settings) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_profile is not None: - pulumi.set(__self__, "network_profile", network_profile) + _setter("network_profile", network_profile) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if rulestack_id is not None: - pulumi.set(__self__, "rulestack_id", rulestack_id) + _setter("rulestack_id", rulestack_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="destinationNats") @@ -311,6 +383,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NextGenerationFirewallVirtualNetworkLocalRulestackArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -333,8 +409,18 @@ def _internal_init(__self__, __props__ = NextGenerationFirewallVirtualNetworkLocalRulestackArgs.__new__(NextGenerationFirewallVirtualNetworkLocalRulestackArgs) __props__.__dict__["destination_nats"] = destination_nats + if dns_settings is not None and not isinstance(dns_settings, NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettingsArgs): + dns_settings = dns_settings or {} + def _setter(key, value): + dns_settings[key] = value + NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettingsArgs._configure(_setter, **dns_settings) __props__.__dict__["dns_settings"] = dns_settings __props__.__dict__["name"] = name + if network_profile is not None and not isinstance(network_profile, NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileArgs): + network_profile = network_profile or {} + def _setter(key, value): + network_profile[key] = value + NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileArgs._configure(_setter, **network_profile) if network_profile is None and not opts.urn: raise TypeError("Missing required property 'network_profile'") __props__.__dict__["network_profile"] = network_profile diff --git a/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_network_panorama.py b/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_network_panorama.py index a3f207f94d..b7071e4df5 100644 --- a/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_network_panorama.py +++ b/sdk/python/pulumi_azure/paloalto/next_generation_firewall_virtual_network_panorama.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,19 +35,60 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Panorama. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Panorama. """ - pulumi.set(__self__, "network_profile", network_profile) - pulumi.set(__self__, "panorama_base64_config", panorama_base64_config) - pulumi.set(__self__, "resource_group_name", resource_group_name) + NextGenerationFirewallVirtualNetworkPanoramaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_profile=network_profile, + panorama_base64_config=panorama_base64_config, + resource_group_name=resource_group_name, + destination_nats=destination_nats, + dns_settings=dns_settings, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_profile: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileArgs']] = None, + panorama_base64_config: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + destination_nats: Optional[pulumi.Input[Sequence[pulumi.Input['NextGenerationFirewallVirtualNetworkPanoramaDestinationNatArgs']]]] = None, + dns_settings: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkPanoramaDnsSettingsArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if network_profile is None: + raise TypeError("Missing 'network_profile' argument") + if panorama_base64_config is None and 'panoramaBase64Config' in kwargs: + panorama_base64_config = kwargs['panoramaBase64Config'] + if panorama_base64_config is None: + raise TypeError("Missing 'panorama_base64_config' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if destination_nats is None and 'destinationNats' in kwargs: + destination_nats = kwargs['destinationNats'] + if dns_settings is None and 'dnsSettings' in kwargs: + dns_settings = kwargs['dnsSettings'] + + _setter("network_profile", network_profile) + _setter("panorama_base64_config", panorama_base64_config) + _setter("resource_group_name", resource_group_name) if destination_nats is not None: - pulumi.set(__self__, "destination_nats", destination_nats) + _setter("destination_nats", destination_nats) if dns_settings is not None: - pulumi.set(__self__, "dns_settings", dns_settings) + _setter("dns_settings", dns_settings) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="networkProfile") @@ -170,24 +211,61 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Panorama. """ + _NextGenerationFirewallVirtualNetworkPanoramaState._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_nats=destination_nats, + dns_settings=dns_settings, + location=location, + name=name, + network_profile=network_profile, + panorama_base64_config=panorama_base64_config, + panoramas=panoramas, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_nats: Optional[pulumi.Input[Sequence[pulumi.Input['NextGenerationFirewallVirtualNetworkPanoramaDestinationNatArgs']]]] = None, + dns_settings: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkPanoramaDnsSettingsArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_profile: Optional[pulumi.Input['NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileArgs']] = None, + panorama_base64_config: Optional[pulumi.Input[str]] = None, + panoramas: Optional[pulumi.Input[Sequence[pulumi.Input['NextGenerationFirewallVirtualNetworkPanoramaPanoramaArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_nats is None and 'destinationNats' in kwargs: + destination_nats = kwargs['destinationNats'] + if dns_settings is None and 'dnsSettings' in kwargs: + dns_settings = kwargs['dnsSettings'] + if network_profile is None and 'networkProfile' in kwargs: + network_profile = kwargs['networkProfile'] + if panorama_base64_config is None and 'panoramaBase64Config' in kwargs: + panorama_base64_config = kwargs['panoramaBase64Config'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if destination_nats is not None: - pulumi.set(__self__, "destination_nats", destination_nats) + _setter("destination_nats", destination_nats) if dns_settings is not None: - pulumi.set(__self__, "dns_settings", dns_settings) + _setter("dns_settings", dns_settings) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_profile is not None: - pulumi.set(__self__, "network_profile", network_profile) + _setter("network_profile", network_profile) if panorama_base64_config is not None: - pulumi.set(__self__, "panorama_base64_config", panorama_base64_config) + _setter("panorama_base64_config", panorama_base64_config) if panoramas is not None: - pulumi.set(__self__, "panoramas", panoramas) + _setter("panoramas", panoramas) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="destinationNats") @@ -489,6 +567,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NextGenerationFirewallVirtualNetworkPanoramaArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -512,9 +594,19 @@ def _internal_init(__self__, __props__ = NextGenerationFirewallVirtualNetworkPanoramaArgs.__new__(NextGenerationFirewallVirtualNetworkPanoramaArgs) __props__.__dict__["destination_nats"] = destination_nats + if dns_settings is not None and not isinstance(dns_settings, NextGenerationFirewallVirtualNetworkPanoramaDnsSettingsArgs): + dns_settings = dns_settings or {} + def _setter(key, value): + dns_settings[key] = value + NextGenerationFirewallVirtualNetworkPanoramaDnsSettingsArgs._configure(_setter, **dns_settings) __props__.__dict__["dns_settings"] = dns_settings __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if network_profile is not None and not isinstance(network_profile, NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileArgs): + network_profile = network_profile or {} + def _setter(key, value): + network_profile[key] = value + NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileArgs._configure(_setter, **network_profile) if network_profile is None and not opts.urn: raise TypeError("Missing required property 'network_profile'") __props__.__dict__["network_profile"] = network_profile diff --git a/sdk/python/pulumi_azure/paloalto/outputs.py b/sdk/python/pulumi_azure/paloalto/outputs.py index 87d2319042..a5467e3f1f 100644 --- a/sdk/python/pulumi_azure/paloalto/outputs.py +++ b/sdk/python/pulumi_azure/paloalto/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -66,9 +66,26 @@ def __init__(__self__, *, :param Sequence[str] custom_urls: Specifies a list of URL categories to match. Possible values include `abortion`, `abused-drugs`, `adult`, `alcohol-and-tobacco`, `auctions`, `business-and-economy`, `command-and-control`, `computer-and-internet-info`, `content-delivery-networks`, `copyright-infringement`, `cryptocurrency`, `dating`, `dynamic-dns`, `educational-institutions`, `entertainment-and-arts`, `extremism`, `financial-services`, `gambling`, `games`, `government`, `grayware`, `hacking`, `health-and-medicine`, `high-risk`, `home-and-garden`, `hunting-and-fishing`, `insufficient-content`, `internet-communications-and-telephony`, `internet-portals`, `job-search`, `legal`, `low-risk`, `malware`, `medium-risk`, `military`, `motor-vehicles`, `music`, `newly-registered-domain`, `news`, `not-resolved`, `nudity`, `online-storage-and-backup`, `parked`, `peer-to-peer`, `personal-sites-and-blogs`, `philosophy-and-political-advocacy`, `phishing`, `private-ip-addresses`, `proxy-avoidance-and-anonymizers`, `questionable`, `real-estate`, `real-time-detection`, `recreation-and-hobbies`, `reference-and-research`, `religion`, `search-engines`, `sex-education`, `shareware-and-freeware`, `shopping`, `social-networking`, `society`, `sports`, `stock-advice-and-tools`, `streaming-media`, `swimsuits-and-intimate-apparel`, `training-and-tools`, `translation`, `travel`, `unknown`, `weapons`, `web-advertisements`, `web-based-email`, and `web-hosting`. :param Sequence[str] feeds: Specifies a list of feeds to match. """ - pulumi.set(__self__, "custom_urls", custom_urls) + LocalRulestackRuleCategory._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_urls=custom_urls, + feeds=feeds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_urls: Optional[Sequence[str]] = None, + feeds: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_urls is None and 'customUrls' in kwargs: + custom_urls = kwargs['customUrls'] + if custom_urls is None: + raise TypeError("Missing 'custom_urls' argument") + + _setter("custom_urls", custom_urls) if feeds is not None: - pulumi.set(__self__, "feeds", feeds) + _setter("feeds", feeds) @property @pulumi.getter(name="customUrls") @@ -125,16 +142,39 @@ def __init__(__self__, *, > **Note:** This is a list of names of Prefix Lists configured on the same Local Rulestack as this Rule is being created. """ + LocalRulestackRuleDestination._configure( + lambda key, value: pulumi.set(__self__, key, value), + cidrs=cidrs, + countries=countries, + feeds=feeds, + local_rulestack_fqdn_list_ids=local_rulestack_fqdn_list_ids, + local_rulestack_prefix_list_ids=local_rulestack_prefix_list_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cidrs: Optional[Sequence[str]] = None, + countries: Optional[Sequence[str]] = None, + feeds: Optional[Sequence[str]] = None, + local_rulestack_fqdn_list_ids: Optional[Sequence[str]] = None, + local_rulestack_prefix_list_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_rulestack_fqdn_list_ids is None and 'localRulestackFqdnListIds' in kwargs: + local_rulestack_fqdn_list_ids = kwargs['localRulestackFqdnListIds'] + if local_rulestack_prefix_list_ids is None and 'localRulestackPrefixListIds' in kwargs: + local_rulestack_prefix_list_ids = kwargs['localRulestackPrefixListIds'] + if cidrs is not None: - pulumi.set(__self__, "cidrs", cidrs) + _setter("cidrs", cidrs) if countries is not None: - pulumi.set(__self__, "countries", countries) + _setter("countries", countries) if feeds is not None: - pulumi.set(__self__, "feeds", feeds) + _setter("feeds", feeds) if local_rulestack_fqdn_list_ids is not None: - pulumi.set(__self__, "local_rulestack_fqdn_list_ids", local_rulestack_fqdn_list_ids) + _setter("local_rulestack_fqdn_list_ids", local_rulestack_fqdn_list_ids) if local_rulestack_prefix_list_ids is not None: - pulumi.set(__self__, "local_rulestack_prefix_list_ids", local_rulestack_prefix_list_ids) + _setter("local_rulestack_prefix_list_ids", local_rulestack_prefix_list_ids) @property @pulumi.getter @@ -213,14 +253,33 @@ def __init__(__self__, *, > **Note:** This is a list of names of Prefix Lists configured on the same Local Rulestack as this Rule is being created. """ + LocalRulestackRuleSource._configure( + lambda key, value: pulumi.set(__self__, key, value), + cidrs=cidrs, + countries=countries, + feeds=feeds, + local_rulestack_prefix_list_ids=local_rulestack_prefix_list_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cidrs: Optional[Sequence[str]] = None, + countries: Optional[Sequence[str]] = None, + feeds: Optional[Sequence[str]] = None, + local_rulestack_prefix_list_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if local_rulestack_prefix_list_ids is None and 'localRulestackPrefixListIds' in kwargs: + local_rulestack_prefix_list_ids = kwargs['localRulestackPrefixListIds'] + if cidrs is not None: - pulumi.set(__self__, "cidrs", cidrs) + _setter("cidrs", cidrs) if countries is not None: - pulumi.set(__self__, "countries", countries) + _setter("countries", countries) if feeds is not None: - pulumi.set(__self__, "feeds", feeds) + _setter("feeds", feeds) if local_rulestack_prefix_list_ids is not None: - pulumi.set(__self__, "local_rulestack_prefix_list_ids", local_rulestack_prefix_list_ids) + _setter("local_rulestack_prefix_list_ids", local_rulestack_prefix_list_ids) @property @pulumi.getter @@ -283,12 +342,37 @@ def __init__(__self__, *, protocol: str, backend_config: Optional['outputs.NextGenerationFirewallVirtualHubLocalRulestackDestinationNatBackendConfig'] = None, frontend_config: Optional['outputs.NextGenerationFirewallVirtualHubLocalRulestackDestinationNatFrontendConfig'] = None): - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + NextGenerationFirewallVirtualHubLocalRulestackDestinationNat._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocol=protocol, + backend_config=backend_config, + frontend_config=frontend_config, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + protocol: Optional[str] = None, + backend_config: Optional['outputs.NextGenerationFirewallVirtualHubLocalRulestackDestinationNatBackendConfig'] = None, + frontend_config: Optional['outputs.NextGenerationFirewallVirtualHubLocalRulestackDestinationNatFrontendConfig'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if backend_config is None and 'backendConfig' in kwargs: + backend_config = kwargs['backendConfig'] + if frontend_config is None and 'frontendConfig' in kwargs: + frontend_config = kwargs['frontendConfig'] + + _setter("name", name) + _setter("protocol", protocol) if backend_config is not None: - pulumi.set(__self__, "backend_config", backend_config) + _setter("backend_config", backend_config) if frontend_config is not None: - pulumi.set(__self__, "frontend_config", frontend_config) + _setter("frontend_config", frontend_config) @property @pulumi.getter @@ -333,8 +417,27 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, port: int, public_ip_address: str): - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address", public_ip_address) + NextGenerationFirewallVirtualHubLocalRulestackDestinationNatBackendConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address=public_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + public_ip_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address is None and 'publicIpAddress' in kwargs: + public_ip_address = kwargs['publicIpAddress'] + if public_ip_address is None: + raise TypeError("Missing 'public_ip_address' argument") + + _setter("port", port) + _setter("public_ip_address", public_ip_address) @property @pulumi.getter @@ -369,8 +472,27 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, port: int, public_ip_address_id: str): - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + NextGenerationFirewallVirtualHubLocalRulestackDestinationNatFrontendConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address_id=public_ip_address_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + public_ip_address_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + + _setter("port", port) + _setter("public_ip_address_id", public_ip_address_id) @property @pulumi.getter @@ -410,12 +532,33 @@ def __init__(__self__, *, azure_dns_servers: Optional[Sequence[str]] = None, dns_servers: Optional[Sequence[str]] = None, use_azure_dns: Optional[bool] = None): + NextGenerationFirewallVirtualHubLocalRulestackDnsSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_dns_servers=azure_dns_servers, + dns_servers=dns_servers, + use_azure_dns=use_azure_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_dns_servers: Optional[Sequence[str]] = None, + dns_servers: Optional[Sequence[str]] = None, + use_azure_dns: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_dns_servers is None and 'azureDnsServers' in kwargs: + azure_dns_servers = kwargs['azureDnsServers'] + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if use_azure_dns is None and 'useAzureDns' in kwargs: + use_azure_dns = kwargs['useAzureDns'] + if azure_dns_servers is not None: - pulumi.set(__self__, "azure_dns_servers", azure_dns_servers) + _setter("azure_dns_servers", azure_dns_servers) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if use_azure_dns is not None: - pulumi.set(__self__, "use_azure_dns", use_azure_dns) + _setter("use_azure_dns", use_azure_dns) @property @pulumi.getter(name="azureDnsServers") @@ -478,21 +621,72 @@ def __init__(__self__, *, public_ip_addresses: Optional[Sequence[str]] = None, trusted_subnet_id: Optional[str] = None, untrusted_subnet_id: Optional[str] = None): - pulumi.set(__self__, "network_virtual_appliance_id", network_virtual_appliance_id) - pulumi.set(__self__, "public_ip_address_ids", public_ip_address_ids) - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + NextGenerationFirewallVirtualHubLocalRulestackNetworkProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_virtual_appliance_id=network_virtual_appliance_id, + public_ip_address_ids=public_ip_address_ids, + virtual_hub_id=virtual_hub_id, + egress_nat_ip_address_ids=egress_nat_ip_address_ids, + egress_nat_ip_addresses=egress_nat_ip_addresses, + ip_of_trust_for_user_defined_routes=ip_of_trust_for_user_defined_routes, + public_ip_addresses=public_ip_addresses, + trusted_subnet_id=trusted_subnet_id, + untrusted_subnet_id=untrusted_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_virtual_appliance_id: Optional[str] = None, + public_ip_address_ids: Optional[Sequence[str]] = None, + virtual_hub_id: Optional[str] = None, + egress_nat_ip_address_ids: Optional[Sequence[str]] = None, + egress_nat_ip_addresses: Optional[Sequence[str]] = None, + ip_of_trust_for_user_defined_routes: Optional[str] = None, + public_ip_addresses: Optional[Sequence[str]] = None, + trusted_subnet_id: Optional[str] = None, + untrusted_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_virtual_appliance_id is None and 'networkVirtualApplianceId' in kwargs: + network_virtual_appliance_id = kwargs['networkVirtualApplianceId'] + if network_virtual_appliance_id is None: + raise TypeError("Missing 'network_virtual_appliance_id' argument") + if public_ip_address_ids is None and 'publicIpAddressIds' in kwargs: + public_ip_address_ids = kwargs['publicIpAddressIds'] + if public_ip_address_ids is None: + raise TypeError("Missing 'public_ip_address_ids' argument") + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + if egress_nat_ip_address_ids is None and 'egressNatIpAddressIds' in kwargs: + egress_nat_ip_address_ids = kwargs['egressNatIpAddressIds'] + if egress_nat_ip_addresses is None and 'egressNatIpAddresses' in kwargs: + egress_nat_ip_addresses = kwargs['egressNatIpAddresses'] + if ip_of_trust_for_user_defined_routes is None and 'ipOfTrustForUserDefinedRoutes' in kwargs: + ip_of_trust_for_user_defined_routes = kwargs['ipOfTrustForUserDefinedRoutes'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if trusted_subnet_id is None and 'trustedSubnetId' in kwargs: + trusted_subnet_id = kwargs['trustedSubnetId'] + if untrusted_subnet_id is None and 'untrustedSubnetId' in kwargs: + untrusted_subnet_id = kwargs['untrustedSubnetId'] + + _setter("network_virtual_appliance_id", network_virtual_appliance_id) + _setter("public_ip_address_ids", public_ip_address_ids) + _setter("virtual_hub_id", virtual_hub_id) if egress_nat_ip_address_ids is not None: - pulumi.set(__self__, "egress_nat_ip_address_ids", egress_nat_ip_address_ids) + _setter("egress_nat_ip_address_ids", egress_nat_ip_address_ids) if egress_nat_ip_addresses is not None: - pulumi.set(__self__, "egress_nat_ip_addresses", egress_nat_ip_addresses) + _setter("egress_nat_ip_addresses", egress_nat_ip_addresses) if ip_of_trust_for_user_defined_routes is not None: - pulumi.set(__self__, "ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) + _setter("ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if trusted_subnet_id is not None: - pulumi.set(__self__, "trusted_subnet_id", trusted_subnet_id) + _setter("trusted_subnet_id", trusted_subnet_id) if untrusted_subnet_id is not None: - pulumi.set(__self__, "untrusted_subnet_id", untrusted_subnet_id) + _setter("untrusted_subnet_id", untrusted_subnet_id) @property @pulumi.getter(name="networkVirtualApplianceId") @@ -566,12 +760,37 @@ def __init__(__self__, *, protocol: str, backend_config: Optional['outputs.NextGenerationFirewallVirtualHubPanoramaDestinationNatBackendConfig'] = None, frontend_config: Optional['outputs.NextGenerationFirewallVirtualHubPanoramaDestinationNatFrontendConfig'] = None): - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + NextGenerationFirewallVirtualHubPanoramaDestinationNat._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocol=protocol, + backend_config=backend_config, + frontend_config=frontend_config, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + protocol: Optional[str] = None, + backend_config: Optional['outputs.NextGenerationFirewallVirtualHubPanoramaDestinationNatBackendConfig'] = None, + frontend_config: Optional['outputs.NextGenerationFirewallVirtualHubPanoramaDestinationNatFrontendConfig'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if backend_config is None and 'backendConfig' in kwargs: + backend_config = kwargs['backendConfig'] + if frontend_config is None and 'frontendConfig' in kwargs: + frontend_config = kwargs['frontendConfig'] + + _setter("name", name) + _setter("protocol", protocol) if backend_config is not None: - pulumi.set(__self__, "backend_config", backend_config) + _setter("backend_config", backend_config) if frontend_config is not None: - pulumi.set(__self__, "frontend_config", frontend_config) + _setter("frontend_config", frontend_config) @property @pulumi.getter @@ -616,8 +835,27 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, port: int, public_ip_address: str): - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address", public_ip_address) + NextGenerationFirewallVirtualHubPanoramaDestinationNatBackendConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address=public_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + public_ip_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address is None and 'publicIpAddress' in kwargs: + public_ip_address = kwargs['publicIpAddress'] + if public_ip_address is None: + raise TypeError("Missing 'public_ip_address' argument") + + _setter("port", port) + _setter("public_ip_address", public_ip_address) @property @pulumi.getter @@ -652,8 +890,27 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, port: int, public_ip_address_id: str): - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + NextGenerationFirewallVirtualHubPanoramaDestinationNatFrontendConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address_id=public_ip_address_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + public_ip_address_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + + _setter("port", port) + _setter("public_ip_address_id", public_ip_address_id) @property @pulumi.getter @@ -693,12 +950,33 @@ def __init__(__self__, *, azure_dns_servers: Optional[Sequence[str]] = None, dns_servers: Optional[Sequence[str]] = None, use_azure_dns: Optional[bool] = None): + NextGenerationFirewallVirtualHubPanoramaDnsSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_dns_servers=azure_dns_servers, + dns_servers=dns_servers, + use_azure_dns=use_azure_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_dns_servers: Optional[Sequence[str]] = None, + dns_servers: Optional[Sequence[str]] = None, + use_azure_dns: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_dns_servers is None and 'azureDnsServers' in kwargs: + azure_dns_servers = kwargs['azureDnsServers'] + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if use_azure_dns is None and 'useAzureDns' in kwargs: + use_azure_dns = kwargs['useAzureDns'] + if azure_dns_servers is not None: - pulumi.set(__self__, "azure_dns_servers", azure_dns_servers) + _setter("azure_dns_servers", azure_dns_servers) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if use_azure_dns is not None: - pulumi.set(__self__, "use_azure_dns", use_azure_dns) + _setter("use_azure_dns", use_azure_dns) @property @pulumi.getter(name="azureDnsServers") @@ -761,21 +1039,72 @@ def __init__(__self__, *, public_ip_addresses: Optional[Sequence[str]] = None, trusted_subnet_id: Optional[str] = None, untrusted_subnet_id: Optional[str] = None): - pulumi.set(__self__, "network_virtual_appliance_id", network_virtual_appliance_id) - pulumi.set(__self__, "public_ip_address_ids", public_ip_address_ids) - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + NextGenerationFirewallVirtualHubPanoramaNetworkProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_virtual_appliance_id=network_virtual_appliance_id, + public_ip_address_ids=public_ip_address_ids, + virtual_hub_id=virtual_hub_id, + egress_nat_ip_address_ids=egress_nat_ip_address_ids, + egress_nat_ip_addresses=egress_nat_ip_addresses, + ip_of_trust_for_user_defined_routes=ip_of_trust_for_user_defined_routes, + public_ip_addresses=public_ip_addresses, + trusted_subnet_id=trusted_subnet_id, + untrusted_subnet_id=untrusted_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_virtual_appliance_id: Optional[str] = None, + public_ip_address_ids: Optional[Sequence[str]] = None, + virtual_hub_id: Optional[str] = None, + egress_nat_ip_address_ids: Optional[Sequence[str]] = None, + egress_nat_ip_addresses: Optional[Sequence[str]] = None, + ip_of_trust_for_user_defined_routes: Optional[str] = None, + public_ip_addresses: Optional[Sequence[str]] = None, + trusted_subnet_id: Optional[str] = None, + untrusted_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_virtual_appliance_id is None and 'networkVirtualApplianceId' in kwargs: + network_virtual_appliance_id = kwargs['networkVirtualApplianceId'] + if network_virtual_appliance_id is None: + raise TypeError("Missing 'network_virtual_appliance_id' argument") + if public_ip_address_ids is None and 'publicIpAddressIds' in kwargs: + public_ip_address_ids = kwargs['publicIpAddressIds'] + if public_ip_address_ids is None: + raise TypeError("Missing 'public_ip_address_ids' argument") + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + if egress_nat_ip_address_ids is None and 'egressNatIpAddressIds' in kwargs: + egress_nat_ip_address_ids = kwargs['egressNatIpAddressIds'] + if egress_nat_ip_addresses is None and 'egressNatIpAddresses' in kwargs: + egress_nat_ip_addresses = kwargs['egressNatIpAddresses'] + if ip_of_trust_for_user_defined_routes is None and 'ipOfTrustForUserDefinedRoutes' in kwargs: + ip_of_trust_for_user_defined_routes = kwargs['ipOfTrustForUserDefinedRoutes'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + if trusted_subnet_id is None and 'trustedSubnetId' in kwargs: + trusted_subnet_id = kwargs['trustedSubnetId'] + if untrusted_subnet_id is None and 'untrustedSubnetId' in kwargs: + untrusted_subnet_id = kwargs['untrustedSubnetId'] + + _setter("network_virtual_appliance_id", network_virtual_appliance_id) + _setter("public_ip_address_ids", public_ip_address_ids) + _setter("virtual_hub_id", virtual_hub_id) if egress_nat_ip_address_ids is not None: - pulumi.set(__self__, "egress_nat_ip_address_ids", egress_nat_ip_address_ids) + _setter("egress_nat_ip_address_ids", egress_nat_ip_address_ids) if egress_nat_ip_addresses is not None: - pulumi.set(__self__, "egress_nat_ip_addresses", egress_nat_ip_addresses) + _setter("egress_nat_ip_addresses", egress_nat_ip_addresses) if ip_of_trust_for_user_defined_routes is not None: - pulumi.set(__self__, "ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) + _setter("ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) if trusted_subnet_id is not None: - pulumi.set(__self__, "trusted_subnet_id", trusted_subnet_id) + _setter("trusted_subnet_id", trusted_subnet_id) if untrusted_subnet_id is not None: - pulumi.set(__self__, "untrusted_subnet_id", untrusted_subnet_id) + _setter("untrusted_subnet_id", untrusted_subnet_id) @property @pulumi.getter(name="networkVirtualApplianceId") @@ -860,20 +1189,55 @@ def __init__(__self__, *, panorama_server2: Optional[str] = None, template_name: Optional[str] = None, virtual_machine_ssh_key: Optional[str] = None): + NextGenerationFirewallVirtualHubPanoramaPanorama._configure( + lambda key, value: pulumi.set(__self__, key, value), + device_group_name=device_group_name, + host_name=host_name, + name=name, + panorama_server1=panorama_server1, + panorama_server2=panorama_server2, + template_name=template_name, + virtual_machine_ssh_key=virtual_machine_ssh_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + device_group_name: Optional[str] = None, + host_name: Optional[str] = None, + name: Optional[str] = None, + panorama_server1: Optional[str] = None, + panorama_server2: Optional[str] = None, + template_name: Optional[str] = None, + virtual_machine_ssh_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if device_group_name is None and 'deviceGroupName' in kwargs: + device_group_name = kwargs['deviceGroupName'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if panorama_server1 is None and 'panoramaServer1' in kwargs: + panorama_server1 = kwargs['panoramaServer1'] + if panorama_server2 is None and 'panoramaServer2' in kwargs: + panorama_server2 = kwargs['panoramaServer2'] + if template_name is None and 'templateName' in kwargs: + template_name = kwargs['templateName'] + if virtual_machine_ssh_key is None and 'virtualMachineSshKey' in kwargs: + virtual_machine_ssh_key = kwargs['virtualMachineSshKey'] + if device_group_name is not None: - pulumi.set(__self__, "device_group_name", device_group_name) + _setter("device_group_name", device_group_name) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if panorama_server1 is not None: - pulumi.set(__self__, "panorama_server1", panorama_server1) + _setter("panorama_server1", panorama_server1) if panorama_server2 is not None: - pulumi.set(__self__, "panorama_server2", panorama_server2) + _setter("panorama_server2", panorama_server2) if template_name is not None: - pulumi.set(__self__, "template_name", template_name) + _setter("template_name", template_name) if virtual_machine_ssh_key is not None: - pulumi.set(__self__, "virtual_machine_ssh_key", virtual_machine_ssh_key) + _setter("virtual_machine_ssh_key", virtual_machine_ssh_key) @property @pulumi.getter(name="deviceGroupName") @@ -943,12 +1307,37 @@ def __init__(__self__, *, :param 'NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatBackendConfigArgs' backend_config: A `backend_config` block as defined above. :param 'NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatFrontendConfigArgs' frontend_config: A `frontend_config` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNat._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocol=protocol, + backend_config=backend_config, + frontend_config=frontend_config, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + protocol: Optional[str] = None, + backend_config: Optional['outputs.NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatBackendConfig'] = None, + frontend_config: Optional['outputs.NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatFrontendConfig'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if backend_config is None and 'backendConfig' in kwargs: + backend_config = kwargs['backendConfig'] + if frontend_config is None and 'frontendConfig' in kwargs: + frontend_config = kwargs['frontendConfig'] + + _setter("name", name) + _setter("protocol", protocol) if backend_config is not None: - pulumi.set(__self__, "backend_config", backend_config) + _setter("backend_config", backend_config) if frontend_config is not None: - pulumi.set(__self__, "frontend_config", frontend_config) + _setter("frontend_config", frontend_config) @property @pulumi.getter @@ -1009,8 +1398,27 @@ def __init__(__self__, *, :param int port: The port number to send traffic to. :param str public_ip_address: The IP Address to send the traffic to. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address", public_ip_address) + NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatBackendConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address=public_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + public_ip_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address is None and 'publicIpAddress' in kwargs: + public_ip_address = kwargs['publicIpAddress'] + if public_ip_address is None: + raise TypeError("Missing 'public_ip_address' argument") + + _setter("port", port) + _setter("public_ip_address", public_ip_address) @property @pulumi.getter @@ -1057,8 +1465,27 @@ def __init__(__self__, *, > **Note:** This must be an Azure Public IP address ID also specified in the `public_ip_address_ids` list. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatFrontendConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address_id=public_ip_address_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + public_ip_address_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + + _setter("port", port) + _setter("public_ip_address_id", public_ip_address_id) @property @pulumi.getter @@ -1110,12 +1537,33 @@ def __init__(__self__, *, :param Sequence[str] dns_servers: Specifies a list of DNS servers to use. Conflicts with `dns_settings.0.use_azure_dns`. :param bool use_azure_dns: Should the Firewall use Azure Supplied DNS servers. Conflicts with `dns_settings.0.dns_servers`. Defaults to `false`. """ + NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_dns_servers=azure_dns_servers, + dns_servers=dns_servers, + use_azure_dns=use_azure_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_dns_servers: Optional[Sequence[str]] = None, + dns_servers: Optional[Sequence[str]] = None, + use_azure_dns: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_dns_servers is None and 'azureDnsServers' in kwargs: + azure_dns_servers = kwargs['azureDnsServers'] + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if use_azure_dns is None and 'useAzureDns' in kwargs: + use_azure_dns = kwargs['useAzureDns'] + if azure_dns_servers is not None: - pulumi.set(__self__, "azure_dns_servers", azure_dns_servers) + _setter("azure_dns_servers", azure_dns_servers) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if use_azure_dns is not None: - pulumi.set(__self__, "use_azure_dns", use_azure_dns) + _setter("use_azure_dns", use_azure_dns) @property @pulumi.getter(name="azureDnsServers") @@ -1177,14 +1625,47 @@ def __init__(__self__, *, :param 'NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileVnetConfigurationArgs' vnet_configuration: A `vnet_configuration` block as defined below. :param Sequence[str] egress_nat_ip_address_ids: Specifies a list of Azure Public IP Address IDs that can be used for Egress (Source) Network Address Translation. """ - pulumi.set(__self__, "public_ip_address_ids", public_ip_address_ids) - pulumi.set(__self__, "vnet_configuration", vnet_configuration) + NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_ip_address_ids=public_ip_address_ids, + vnet_configuration=vnet_configuration, + egress_nat_ip_address_ids=egress_nat_ip_address_ids, + egress_nat_ip_addresses=egress_nat_ip_addresses, + public_ip_addresses=public_ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_ip_address_ids: Optional[Sequence[str]] = None, + vnet_configuration: Optional['outputs.NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileVnetConfiguration'] = None, + egress_nat_ip_address_ids: Optional[Sequence[str]] = None, + egress_nat_ip_addresses: Optional[Sequence[str]] = None, + public_ip_addresses: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_ip_address_ids is None and 'publicIpAddressIds' in kwargs: + public_ip_address_ids = kwargs['publicIpAddressIds'] + if public_ip_address_ids is None: + raise TypeError("Missing 'public_ip_address_ids' argument") + if vnet_configuration is None and 'vnetConfiguration' in kwargs: + vnet_configuration = kwargs['vnetConfiguration'] + if vnet_configuration is None: + raise TypeError("Missing 'vnet_configuration' argument") + if egress_nat_ip_address_ids is None and 'egressNatIpAddressIds' in kwargs: + egress_nat_ip_address_ids = kwargs['egressNatIpAddressIds'] + if egress_nat_ip_addresses is None and 'egressNatIpAddresses' in kwargs: + egress_nat_ip_addresses = kwargs['egressNatIpAddresses'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + + _setter("public_ip_address_ids", public_ip_address_ids) + _setter("vnet_configuration", vnet_configuration) if egress_nat_ip_address_ids is not None: - pulumi.set(__self__, "egress_nat_ip_address_ids", egress_nat_ip_address_ids) + _setter("egress_nat_ip_address_ids", egress_nat_ip_address_ids) if egress_nat_ip_addresses is not None: - pulumi.set(__self__, "egress_nat_ip_addresses", egress_nat_ip_addresses) + _setter("egress_nat_ip_addresses", egress_nat_ip_addresses) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) @property @pulumi.getter(name="publicIpAddressIds") @@ -1256,13 +1737,40 @@ def __init__(__self__, *, :param str trusted_subnet_id: The ID of the Trust subnet. :param str untrusted_subnet_id: The ID of the UnTrust subnet. """ - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileVnetConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + virtual_network_id=virtual_network_id, + ip_of_trust_for_user_defined_routes=ip_of_trust_for_user_defined_routes, + trusted_subnet_id=trusted_subnet_id, + untrusted_subnet_id=untrusted_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + virtual_network_id: Optional[str] = None, + ip_of_trust_for_user_defined_routes: Optional[str] = None, + trusted_subnet_id: Optional[str] = None, + untrusted_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if virtual_network_id is None: + raise TypeError("Missing 'virtual_network_id' argument") + if ip_of_trust_for_user_defined_routes is None and 'ipOfTrustForUserDefinedRoutes' in kwargs: + ip_of_trust_for_user_defined_routes = kwargs['ipOfTrustForUserDefinedRoutes'] + if trusted_subnet_id is None and 'trustedSubnetId' in kwargs: + trusted_subnet_id = kwargs['trustedSubnetId'] + if untrusted_subnet_id is None and 'untrustedSubnetId' in kwargs: + untrusted_subnet_id = kwargs['untrustedSubnetId'] + + _setter("virtual_network_id", virtual_network_id) if ip_of_trust_for_user_defined_routes is not None: - pulumi.set(__self__, "ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) + _setter("ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) if trusted_subnet_id is not None: - pulumi.set(__self__, "trusted_subnet_id", trusted_subnet_id) + _setter("trusted_subnet_id", trusted_subnet_id) if untrusted_subnet_id is not None: - pulumi.set(__self__, "untrusted_subnet_id", untrusted_subnet_id) + _setter("untrusted_subnet_id", untrusted_subnet_id) @property @pulumi.getter(name="virtualNetworkId") @@ -1326,12 +1834,37 @@ def __init__(__self__, *, :param 'NextGenerationFirewallVirtualNetworkPanoramaDestinationNatBackendConfigArgs' backend_config: A `backend_config` block as defined above. :param 'NextGenerationFirewallVirtualNetworkPanoramaDestinationNatFrontendConfigArgs' frontend_config: A `frontend_config` block as defined below. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "protocol", protocol) + NextGenerationFirewallVirtualNetworkPanoramaDestinationNat._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + protocol=protocol, + backend_config=backend_config, + frontend_config=frontend_config, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + protocol: Optional[str] = None, + backend_config: Optional['outputs.NextGenerationFirewallVirtualNetworkPanoramaDestinationNatBackendConfig'] = None, + frontend_config: Optional['outputs.NextGenerationFirewallVirtualNetworkPanoramaDestinationNatFrontendConfig'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if backend_config is None and 'backendConfig' in kwargs: + backend_config = kwargs['backendConfig'] + if frontend_config is None and 'frontendConfig' in kwargs: + frontend_config = kwargs['frontendConfig'] + + _setter("name", name) + _setter("protocol", protocol) if backend_config is not None: - pulumi.set(__self__, "backend_config", backend_config) + _setter("backend_config", backend_config) if frontend_config is not None: - pulumi.set(__self__, "frontend_config", frontend_config) + _setter("frontend_config", frontend_config) @property @pulumi.getter @@ -1392,8 +1925,27 @@ def __init__(__self__, *, :param int port: The port number to send traffic to. :param str public_ip_address: The IP Address to send the traffic to. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address", public_ip_address) + NextGenerationFirewallVirtualNetworkPanoramaDestinationNatBackendConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address=public_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + public_ip_address: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address is None and 'publicIpAddress' in kwargs: + public_ip_address = kwargs['publicIpAddress'] + if public_ip_address is None: + raise TypeError("Missing 'public_ip_address' argument") + + _setter("port", port) + _setter("public_ip_address", public_ip_address) @property @pulumi.getter @@ -1440,8 +1992,27 @@ def __init__(__self__, *, > **Note:** This must be an Azure Public IP address ID also specified in the `public_ip_address_ids` list. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "public_ip_address_id", public_ip_address_id) + NextGenerationFirewallVirtualNetworkPanoramaDestinationNatFrontendConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + public_ip_address_id=public_ip_address_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + public_ip_address_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if public_ip_address_id is None and 'publicIpAddressId' in kwargs: + public_ip_address_id = kwargs['publicIpAddressId'] + if public_ip_address_id is None: + raise TypeError("Missing 'public_ip_address_id' argument") + + _setter("port", port) + _setter("public_ip_address_id", public_ip_address_id) @property @pulumi.getter @@ -1493,12 +2064,33 @@ def __init__(__self__, *, :param Sequence[str] dns_servers: Specifies a list of DNS servers to use. Conflicts with `dns_settings.0.use_azure_dns`. :param bool use_azure_dns: Should the Firewall use Azure Supplied DNS servers. Conflicts with `dns_settings.0.dns_servers`. Defaults to `false`. """ + NextGenerationFirewallVirtualNetworkPanoramaDnsSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_dns_servers=azure_dns_servers, + dns_servers=dns_servers, + use_azure_dns=use_azure_dns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_dns_servers: Optional[Sequence[str]] = None, + dns_servers: Optional[Sequence[str]] = None, + use_azure_dns: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_dns_servers is None and 'azureDnsServers' in kwargs: + azure_dns_servers = kwargs['azureDnsServers'] + if dns_servers is None and 'dnsServers' in kwargs: + dns_servers = kwargs['dnsServers'] + if use_azure_dns is None and 'useAzureDns' in kwargs: + use_azure_dns = kwargs['useAzureDns'] + if azure_dns_servers is not None: - pulumi.set(__self__, "azure_dns_servers", azure_dns_servers) + _setter("azure_dns_servers", azure_dns_servers) if dns_servers is not None: - pulumi.set(__self__, "dns_servers", dns_servers) + _setter("dns_servers", dns_servers) if use_azure_dns is not None: - pulumi.set(__self__, "use_azure_dns", use_azure_dns) + _setter("use_azure_dns", use_azure_dns) @property @pulumi.getter(name="azureDnsServers") @@ -1560,14 +2152,47 @@ def __init__(__self__, *, :param 'NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileVnetConfigurationArgs' vnet_configuration: A `vnet_configuration` block as defined below. :param Sequence[str] egress_nat_ip_address_ids: Specifies a list of Azure Public IP Address IDs that can be used for Egress (Source) Network Address Translation. """ - pulumi.set(__self__, "public_ip_address_ids", public_ip_address_ids) - pulumi.set(__self__, "vnet_configuration", vnet_configuration) + NextGenerationFirewallVirtualNetworkPanoramaNetworkProfile._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_ip_address_ids=public_ip_address_ids, + vnet_configuration=vnet_configuration, + egress_nat_ip_address_ids=egress_nat_ip_address_ids, + egress_nat_ip_addresses=egress_nat_ip_addresses, + public_ip_addresses=public_ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_ip_address_ids: Optional[Sequence[str]] = None, + vnet_configuration: Optional['outputs.NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileVnetConfiguration'] = None, + egress_nat_ip_address_ids: Optional[Sequence[str]] = None, + egress_nat_ip_addresses: Optional[Sequence[str]] = None, + public_ip_addresses: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_ip_address_ids is None and 'publicIpAddressIds' in kwargs: + public_ip_address_ids = kwargs['publicIpAddressIds'] + if public_ip_address_ids is None: + raise TypeError("Missing 'public_ip_address_ids' argument") + if vnet_configuration is None and 'vnetConfiguration' in kwargs: + vnet_configuration = kwargs['vnetConfiguration'] + if vnet_configuration is None: + raise TypeError("Missing 'vnet_configuration' argument") + if egress_nat_ip_address_ids is None and 'egressNatIpAddressIds' in kwargs: + egress_nat_ip_address_ids = kwargs['egressNatIpAddressIds'] + if egress_nat_ip_addresses is None and 'egressNatIpAddresses' in kwargs: + egress_nat_ip_addresses = kwargs['egressNatIpAddresses'] + if public_ip_addresses is None and 'publicIpAddresses' in kwargs: + public_ip_addresses = kwargs['publicIpAddresses'] + + _setter("public_ip_address_ids", public_ip_address_ids) + _setter("vnet_configuration", vnet_configuration) if egress_nat_ip_address_ids is not None: - pulumi.set(__self__, "egress_nat_ip_address_ids", egress_nat_ip_address_ids) + _setter("egress_nat_ip_address_ids", egress_nat_ip_address_ids) if egress_nat_ip_addresses is not None: - pulumi.set(__self__, "egress_nat_ip_addresses", egress_nat_ip_addresses) + _setter("egress_nat_ip_addresses", egress_nat_ip_addresses) if public_ip_addresses is not None: - pulumi.set(__self__, "public_ip_addresses", public_ip_addresses) + _setter("public_ip_addresses", public_ip_addresses) @property @pulumi.getter(name="publicIpAddressIds") @@ -1639,13 +2264,40 @@ def __init__(__self__, *, :param str trusted_subnet_id: The ID of the Trust subnet. :param str untrusted_subnet_id: The ID of the UnTrust subnet. """ - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileVnetConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + virtual_network_id=virtual_network_id, + ip_of_trust_for_user_defined_routes=ip_of_trust_for_user_defined_routes, + trusted_subnet_id=trusted_subnet_id, + untrusted_subnet_id=untrusted_subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + virtual_network_id: Optional[str] = None, + ip_of_trust_for_user_defined_routes: Optional[str] = None, + trusted_subnet_id: Optional[str] = None, + untrusted_subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if virtual_network_id is None: + raise TypeError("Missing 'virtual_network_id' argument") + if ip_of_trust_for_user_defined_routes is None and 'ipOfTrustForUserDefinedRoutes' in kwargs: + ip_of_trust_for_user_defined_routes = kwargs['ipOfTrustForUserDefinedRoutes'] + if trusted_subnet_id is None and 'trustedSubnetId' in kwargs: + trusted_subnet_id = kwargs['trustedSubnetId'] + if untrusted_subnet_id is None and 'untrustedSubnetId' in kwargs: + untrusted_subnet_id = kwargs['untrustedSubnetId'] + + _setter("virtual_network_id", virtual_network_id) if ip_of_trust_for_user_defined_routes is not None: - pulumi.set(__self__, "ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) + _setter("ip_of_trust_for_user_defined_routes", ip_of_trust_for_user_defined_routes) if trusted_subnet_id is not None: - pulumi.set(__self__, "trusted_subnet_id", trusted_subnet_id) + _setter("trusted_subnet_id", trusted_subnet_id) if untrusted_subnet_id is not None: - pulumi.set(__self__, "untrusted_subnet_id", untrusted_subnet_id) + _setter("untrusted_subnet_id", untrusted_subnet_id) @property @pulumi.getter(name="virtualNetworkId") @@ -1723,20 +2375,55 @@ def __init__(__self__, *, :param str template_name: The name of the Panorama Template applied to this Firewall Resource. :param str virtual_machine_ssh_key: The SSH Key to connect to the Firewall Resource. """ + NextGenerationFirewallVirtualNetworkPanoramaPanorama._configure( + lambda key, value: pulumi.set(__self__, key, value), + device_group_name=device_group_name, + host_name=host_name, + name=name, + panorama_server1=panorama_server1, + panorama_server2=panorama_server2, + template_name=template_name, + virtual_machine_ssh_key=virtual_machine_ssh_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + device_group_name: Optional[str] = None, + host_name: Optional[str] = None, + name: Optional[str] = None, + panorama_server1: Optional[str] = None, + panorama_server2: Optional[str] = None, + template_name: Optional[str] = None, + virtual_machine_ssh_key: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if device_group_name is None and 'deviceGroupName' in kwargs: + device_group_name = kwargs['deviceGroupName'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if panorama_server1 is None and 'panoramaServer1' in kwargs: + panorama_server1 = kwargs['panoramaServer1'] + if panorama_server2 is None and 'panoramaServer2' in kwargs: + panorama_server2 = kwargs['panoramaServer2'] + if template_name is None and 'templateName' in kwargs: + template_name = kwargs['templateName'] + if virtual_machine_ssh_key is None and 'virtualMachineSshKey' in kwargs: + virtual_machine_ssh_key = kwargs['virtualMachineSshKey'] + if device_group_name is not None: - pulumi.set(__self__, "device_group_name", device_group_name) + _setter("device_group_name", device_group_name) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if panorama_server1 is not None: - pulumi.set(__self__, "panorama_server1", panorama_server1) + _setter("panorama_server1", panorama_server1) if panorama_server2 is not None: - pulumi.set(__self__, "panorama_server2", panorama_server2) + _setter("panorama_server2", panorama_server2) if template_name is not None: - pulumi.set(__self__, "template_name", template_name) + _setter("template_name", template_name) if virtual_machine_ssh_key is not None: - pulumi.set(__self__, "virtual_machine_ssh_key", virtual_machine_ssh_key) + _setter("virtual_machine_ssh_key", virtual_machine_ssh_key) @property @pulumi.getter(name="deviceGroupName") diff --git a/sdk/python/pulumi_azure/paloalto/virtual_network_appliance.py b/sdk/python/pulumi_azure/paloalto/virtual_network_appliance.py index 8771ea84c1..e9733b312c 100644 --- a/sdk/python/pulumi_azure/paloalto/virtual_network_appliance.py +++ b/sdk/python/pulumi_azure/paloalto/virtual_network_appliance.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VirtualNetworkApplianceArgs', 'VirtualNetworkAppliance'] @@ -19,9 +19,26 @@ def __init__(__self__, *, """ The set of arguments for constructing a VirtualNetworkAppliance resource. """ - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + VirtualNetworkApplianceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + virtual_hub_id=virtual_hub_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + virtual_hub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if virtual_hub_id is None: + raise TypeError("Missing 'virtual_hub_id' argument") + + _setter("virtual_hub_id", virtual_hub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="virtualHubId") @@ -50,10 +67,25 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering VirtualNetworkAppliance resources. """ + _VirtualNetworkApplianceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + virtual_hub_id=virtual_hub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + virtual_hub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_hub_id is None and 'virtualHubId' in kwargs: + virtual_hub_id = kwargs['virtualHubId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if virtual_hub_id is not None: - pulumi.set(__self__, "virtual_hub_id", virtual_hub_id) + _setter("virtual_hub_id", virtual_hub_id) @property @pulumi.getter @@ -105,6 +137,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkApplianceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/pim/_inputs.py b/sdk/python/pulumi_azure/pim/_inputs.py index 7a71f8aa9a..304fce07df 100644 --- a/sdk/python/pulumi_azure/pim/_inputs.py +++ b/sdk/python/pulumi_azure/pim/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -27,10 +27,25 @@ def __init__(__self__, *, :param pulumi.Input['ActiveRoleAssignmentScheduleExpirationArgs'] expiration: A `expiration` block as defined above. :param pulumi.Input[str] start_date_time: The start date time of the role assignment. Changing this forces a new Pim Active Role Assignment to be created. """ + ActiveRoleAssignmentScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiration=expiration, + start_date_time=start_date_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiration: Optional[pulumi.Input['ActiveRoleAssignmentScheduleExpirationArgs']] = None, + start_date_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start_date_time is None and 'startDateTime' in kwargs: + start_date_time = kwargs['startDateTime'] + if expiration is not None: - pulumi.set(__self__, "expiration", expiration) + _setter("expiration", expiration) if start_date_time is not None: - pulumi.set(__self__, "start_date_time", start_date_time) + _setter("start_date_time", start_date_time) @property @pulumi.getter @@ -68,12 +83,33 @@ def __init__(__self__, *, :param pulumi.Input[int] duration_hours: The duration of the role assignment in hours. Conflicts with `schedule.0.expiration.0.duration_days`,`schedule.0.expiration.0.end_date_time` Changing this forces a new Pim Active Role Assignment to be created. :param pulumi.Input[str] end_date_time: The end date time of the role assignment. Conflicts with `schedule.0.expiration.0.duration_days`,`schedule.0.expiration.0.duration_hours` Changing this forces a new Pim Active Role Assignment to be created. """ + ActiveRoleAssignmentScheduleExpirationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration_days=duration_days, + duration_hours=duration_hours, + end_date_time=end_date_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration_days: Optional[pulumi.Input[int]] = None, + duration_hours: Optional[pulumi.Input[int]] = None, + end_date_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration_days is None and 'durationDays' in kwargs: + duration_days = kwargs['durationDays'] + if duration_hours is None and 'durationHours' in kwargs: + duration_hours = kwargs['durationHours'] + if end_date_time is None and 'endDateTime' in kwargs: + end_date_time = kwargs['endDateTime'] + if duration_days is not None: - pulumi.set(__self__, "duration_days", duration_days) + _setter("duration_days", duration_days) if duration_hours is not None: - pulumi.set(__self__, "duration_hours", duration_hours) + _setter("duration_hours", duration_hours) if end_date_time is not None: - pulumi.set(__self__, "end_date_time", end_date_time) + _setter("end_date_time", end_date_time) @property @pulumi.getter(name="durationDays") @@ -121,10 +157,23 @@ def __init__(__self__, *, :param pulumi.Input[str] number: The ticket number. :param pulumi.Input[str] system: The ticket system. """ + ActiveRoleAssignmentTicketArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + number=number, + system=system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + number: Optional[pulumi.Input[str]] = None, + system: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if number is not None: - pulumi.set(__self__, "number", number) + _setter("number", number) if system is not None: - pulumi.set(__self__, "system", system) + _setter("system", system) @property @pulumi.getter @@ -160,10 +209,25 @@ def __init__(__self__, *, :param pulumi.Input['EligibleRoleAssignmentScheduleExpirationArgs'] expiration: A `expiration` block as defined above. :param pulumi.Input[str] start_date_time: The start date time of the role assignment. Changing this forces a new Pim Eligible Role Assignment to be created. """ + EligibleRoleAssignmentScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiration=expiration, + start_date_time=start_date_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiration: Optional[pulumi.Input['EligibleRoleAssignmentScheduleExpirationArgs']] = None, + start_date_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start_date_time is None and 'startDateTime' in kwargs: + start_date_time = kwargs['startDateTime'] + if expiration is not None: - pulumi.set(__self__, "expiration", expiration) + _setter("expiration", expiration) if start_date_time is not None: - pulumi.set(__self__, "start_date_time", start_date_time) + _setter("start_date_time", start_date_time) @property @pulumi.getter @@ -201,12 +265,33 @@ def __init__(__self__, *, :param pulumi.Input[int] duration_hours: The duration of the role assignment in hours. Conflicts with `schedule.0.expiration.0.duration_days`,`schedule.0.expiration.0.end_date_time` Changing this forces a new Pim Eligible Role Assignment to be created. :param pulumi.Input[str] end_date_time: The end date time of the role assignment. Conflicts with `schedule.0.expiration.0.duration_days`,`schedule.0.expiration.0.duration_hours` Changing this forces a new Pim Eligible Role Assignment to be created. """ + EligibleRoleAssignmentScheduleExpirationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration_days=duration_days, + duration_hours=duration_hours, + end_date_time=end_date_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration_days: Optional[pulumi.Input[int]] = None, + duration_hours: Optional[pulumi.Input[int]] = None, + end_date_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration_days is None and 'durationDays' in kwargs: + duration_days = kwargs['durationDays'] + if duration_hours is None and 'durationHours' in kwargs: + duration_hours = kwargs['durationHours'] + if end_date_time is None and 'endDateTime' in kwargs: + end_date_time = kwargs['endDateTime'] + if duration_days is not None: - pulumi.set(__self__, "duration_days", duration_days) + _setter("duration_days", duration_days) if duration_hours is not None: - pulumi.set(__self__, "duration_hours", duration_hours) + _setter("duration_hours", duration_hours) if end_date_time is not None: - pulumi.set(__self__, "end_date_time", end_date_time) + _setter("end_date_time", end_date_time) @property @pulumi.getter(name="durationDays") @@ -254,10 +339,23 @@ def __init__(__self__, *, :param pulumi.Input[str] number: The ticket number. :param pulumi.Input[str] system: The ticket system. """ + EligibleRoleAssignmentTicketArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + number=number, + system=system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + number: Optional[pulumi.Input[str]] = None, + system: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if number is not None: - pulumi.set(__self__, "number", number) + _setter("number", number) if system is not None: - pulumi.set(__self__, "system", system) + _setter("system", system) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/pim/active_role_assignment.py b/sdk/python/pulumi_azure/pim/active_role_assignment.py index a7278d9d41..d7e824e999 100644 --- a/sdk/python/pulumi_azure/pim/active_role_assignment.py +++ b/sdk/python/pulumi_azure/pim/active_role_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,15 +31,46 @@ def __init__(__self__, *, :param pulumi.Input['ActiveRoleAssignmentScheduleArgs'] schedule: A `schedule` block as defined below. Changing this forces a new Pim Active Role Assignment to be created. :param pulumi.Input['ActiveRoleAssignmentTicketArgs'] ticket: A `ticket` block as defined below. Changing this forces a new Pim Active Role Assignment to be created. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "role_definition_id", role_definition_id) - pulumi.set(__self__, "scope", scope) + ActiveRoleAssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + role_definition_id=role_definition_id, + scope=scope, + justification=justification, + schedule=schedule, + ticket=ticket, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + justification: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['ActiveRoleAssignmentScheduleArgs']] = None, + ticket: Optional[pulumi.Input['ActiveRoleAssignmentTicketArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_id is None: + raise TypeError("Missing 'role_definition_id' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + + _setter("principal_id", principal_id) + _setter("role_definition_id", role_definition_id) + _setter("scope", scope) if justification is not None: - pulumi.set(__self__, "justification", justification) + _setter("justification", justification) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if ticket is not None: - pulumi.set(__self__, "ticket", ticket) + _setter("ticket", ticket) @property @pulumi.getter(name="principalId") @@ -134,20 +165,49 @@ def __init__(__self__, *, :param pulumi.Input[str] scope: The scope. Changing this forces a new Pim Active Role Assignment to be created. :param pulumi.Input['ActiveRoleAssignmentTicketArgs'] ticket: A `ticket` block as defined below. Changing this forces a new Pim Active Role Assignment to be created. """ + _ActiveRoleAssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + justification=justification, + principal_id=principal_id, + principal_type=principal_type, + role_definition_id=role_definition_id, + schedule=schedule, + scope=scope, + ticket=ticket, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + justification: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + principal_type: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['ActiveRoleAssignmentScheduleArgs']] = None, + scope: Optional[pulumi.Input[str]] = None, + ticket: Optional[pulumi.Input['ActiveRoleAssignmentTicketArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_type is None and 'principalType' in kwargs: + principal_type = kwargs['principalType'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if justification is not None: - pulumi.set(__self__, "justification", justification) + _setter("justification", justification) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if principal_type is not None: - pulumi.set(__self__, "principal_type", principal_type) + _setter("principal_type", principal_type) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if ticket is not None: - pulumi.set(__self__, "ticket", ticket) + _setter("ticket", ticket) @property @pulumi.getter @@ -405,6 +465,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ActiveRoleAssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -432,10 +496,20 @@ def _internal_init(__self__, if role_definition_id is None and not opts.urn: raise TypeError("Missing required property 'role_definition_id'") __props__.__dict__["role_definition_id"] = role_definition_id + if schedule is not None and not isinstance(schedule, ActiveRoleAssignmentScheduleArgs): + schedule = schedule or {} + def _setter(key, value): + schedule[key] = value + ActiveRoleAssignmentScheduleArgs._configure(_setter, **schedule) __props__.__dict__["schedule"] = schedule if scope is None and not opts.urn: raise TypeError("Missing required property 'scope'") __props__.__dict__["scope"] = scope + if ticket is not None and not isinstance(ticket, ActiveRoleAssignmentTicketArgs): + ticket = ticket or {} + def _setter(key, value): + ticket[key] = value + ActiveRoleAssignmentTicketArgs._configure(_setter, **ticket) __props__.__dict__["ticket"] = ticket __props__.__dict__["principal_type"] = None super(ActiveRoleAssignment, __self__).__init__( diff --git a/sdk/python/pulumi_azure/pim/eligible_role_assignment.py b/sdk/python/pulumi_azure/pim/eligible_role_assignment.py index e9fdab7653..11516d4887 100644 --- a/sdk/python/pulumi_azure/pim/eligible_role_assignment.py +++ b/sdk/python/pulumi_azure/pim/eligible_role_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,15 +31,46 @@ def __init__(__self__, *, :param pulumi.Input['EligibleRoleAssignmentScheduleArgs'] schedule: A `schedule` block as defined below. Changing this forces a new Pim Eligible Role Assignment to be created. :param pulumi.Input['EligibleRoleAssignmentTicketArgs'] ticket: A `ticket` block as defined below. Changing this forces a new Pim Eligible Role Assignment to be created. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "role_definition_id", role_definition_id) - pulumi.set(__self__, "scope", scope) + EligibleRoleAssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + role_definition_id=role_definition_id, + scope=scope, + justification=justification, + schedule=schedule, + ticket=ticket, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + justification: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['EligibleRoleAssignmentScheduleArgs']] = None, + ticket: Optional[pulumi.Input['EligibleRoleAssignmentTicketArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_id is None: + raise TypeError("Missing 'role_definition_id' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + + _setter("principal_id", principal_id) + _setter("role_definition_id", role_definition_id) + _setter("scope", scope) if justification is not None: - pulumi.set(__self__, "justification", justification) + _setter("justification", justification) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if ticket is not None: - pulumi.set(__self__, "ticket", ticket) + _setter("ticket", ticket) @property @pulumi.getter(name="principalId") @@ -135,20 +166,49 @@ def __init__(__self__, *, :param pulumi.Input[str] scope: The scope. Changing this forces a new Pim Eligible Role Assignment to be created. :param pulumi.Input['EligibleRoleAssignmentTicketArgs'] ticket: A `ticket` block as defined below. Changing this forces a new Pim Eligible Role Assignment to be created. """ + _EligibleRoleAssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + justification=justification, + principal_id=principal_id, + principal_type=principal_type, + role_definition_id=role_definition_id, + schedule=schedule, + scope=scope, + ticket=ticket, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + justification: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + principal_type: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input['EligibleRoleAssignmentScheduleArgs']] = None, + scope: Optional[pulumi.Input[str]] = None, + ticket: Optional[pulumi.Input['EligibleRoleAssignmentTicketArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_type is None and 'principalType' in kwargs: + principal_type = kwargs['principalType'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if justification is not None: - pulumi.set(__self__, "justification", justification) + _setter("justification", justification) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if principal_type is not None: - pulumi.set(__self__, "principal_type", principal_type) + _setter("principal_type", principal_type) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) if schedule is not None: - pulumi.set(__self__, "schedule", schedule) + _setter("schedule", schedule) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if ticket is not None: - pulumi.set(__self__, "ticket", ticket) + _setter("ticket", ticket) @property @pulumi.getter @@ -407,6 +467,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EligibleRoleAssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -434,10 +498,20 @@ def _internal_init(__self__, if role_definition_id is None and not opts.urn: raise TypeError("Missing required property 'role_definition_id'") __props__.__dict__["role_definition_id"] = role_definition_id + if schedule is not None and not isinstance(schedule, EligibleRoleAssignmentScheduleArgs): + schedule = schedule or {} + def _setter(key, value): + schedule[key] = value + EligibleRoleAssignmentScheduleArgs._configure(_setter, **schedule) __props__.__dict__["schedule"] = schedule if scope is None and not opts.urn: raise TypeError("Missing required property 'scope'") __props__.__dict__["scope"] = scope + if ticket is not None and not isinstance(ticket, EligibleRoleAssignmentTicketArgs): + ticket = ticket or {} + def _setter(key, value): + ticket[key] = value + EligibleRoleAssignmentTicketArgs._configure(_setter, **ticket) __props__.__dict__["ticket"] = ticket __props__.__dict__["principal_type"] = None super(EligibleRoleAssignment, __self__).__init__( diff --git a/sdk/python/pulumi_azure/pim/outputs.py b/sdk/python/pulumi_azure/pim/outputs.py index 98af45d834..7c270f7e06 100644 --- a/sdk/python/pulumi_azure/pim/outputs.py +++ b/sdk/python/pulumi_azure/pim/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -45,10 +45,25 @@ def __init__(__self__, *, :param 'ActiveRoleAssignmentScheduleExpirationArgs' expiration: A `expiration` block as defined above. :param str start_date_time: The start date time of the role assignment. Changing this forces a new Pim Active Role Assignment to be created. """ + ActiveRoleAssignmentSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiration=expiration, + start_date_time=start_date_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiration: Optional['outputs.ActiveRoleAssignmentScheduleExpiration'] = None, + start_date_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start_date_time is None and 'startDateTime' in kwargs: + start_date_time = kwargs['startDateTime'] + if expiration is not None: - pulumi.set(__self__, "expiration", expiration) + _setter("expiration", expiration) if start_date_time is not None: - pulumi.set(__self__, "start_date_time", start_date_time) + _setter("start_date_time", start_date_time) @property @pulumi.getter @@ -99,12 +114,33 @@ def __init__(__self__, *, :param int duration_hours: The duration of the role assignment in hours. Conflicts with `schedule.0.expiration.0.duration_days`,`schedule.0.expiration.0.end_date_time` Changing this forces a new Pim Active Role Assignment to be created. :param str end_date_time: The end date time of the role assignment. Conflicts with `schedule.0.expiration.0.duration_days`,`schedule.0.expiration.0.duration_hours` Changing this forces a new Pim Active Role Assignment to be created. """ + ActiveRoleAssignmentScheduleExpiration._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration_days=duration_days, + duration_hours=duration_hours, + end_date_time=end_date_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration_days: Optional[int] = None, + duration_hours: Optional[int] = None, + end_date_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration_days is None and 'durationDays' in kwargs: + duration_days = kwargs['durationDays'] + if duration_hours is None and 'durationHours' in kwargs: + duration_hours = kwargs['durationHours'] + if end_date_time is None and 'endDateTime' in kwargs: + end_date_time = kwargs['endDateTime'] + if duration_days is not None: - pulumi.set(__self__, "duration_days", duration_days) + _setter("duration_days", duration_days) if duration_hours is not None: - pulumi.set(__self__, "duration_hours", duration_hours) + _setter("duration_hours", duration_hours) if end_date_time is not None: - pulumi.set(__self__, "end_date_time", end_date_time) + _setter("end_date_time", end_date_time) @property @pulumi.getter(name="durationDays") @@ -140,10 +176,23 @@ def __init__(__self__, *, :param str number: The ticket number. :param str system: The ticket system. """ + ActiveRoleAssignmentTicket._configure( + lambda key, value: pulumi.set(__self__, key, value), + number=number, + system=system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + number: Optional[str] = None, + system: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if number is not None: - pulumi.set(__self__, "number", number) + _setter("number", number) if system is not None: - pulumi.set(__self__, "system", system) + _setter("system", system) @property @pulumi.getter @@ -188,10 +237,25 @@ def __init__(__self__, *, :param 'EligibleRoleAssignmentScheduleExpirationArgs' expiration: A `expiration` block as defined above. :param str start_date_time: The start date time of the role assignment. Changing this forces a new Pim Eligible Role Assignment to be created. """ + EligibleRoleAssignmentSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiration=expiration, + start_date_time=start_date_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiration: Optional['outputs.EligibleRoleAssignmentScheduleExpiration'] = None, + start_date_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start_date_time is None and 'startDateTime' in kwargs: + start_date_time = kwargs['startDateTime'] + if expiration is not None: - pulumi.set(__self__, "expiration", expiration) + _setter("expiration", expiration) if start_date_time is not None: - pulumi.set(__self__, "start_date_time", start_date_time) + _setter("start_date_time", start_date_time) @property @pulumi.getter @@ -242,12 +306,33 @@ def __init__(__self__, *, :param int duration_hours: The duration of the role assignment in hours. Conflicts with `schedule.0.expiration.0.duration_days`,`schedule.0.expiration.0.end_date_time` Changing this forces a new Pim Eligible Role Assignment to be created. :param str end_date_time: The end date time of the role assignment. Conflicts with `schedule.0.expiration.0.duration_days`,`schedule.0.expiration.0.duration_hours` Changing this forces a new Pim Eligible Role Assignment to be created. """ + EligibleRoleAssignmentScheduleExpiration._configure( + lambda key, value: pulumi.set(__self__, key, value), + duration_days=duration_days, + duration_hours=duration_hours, + end_date_time=end_date_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + duration_days: Optional[int] = None, + duration_hours: Optional[int] = None, + end_date_time: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if duration_days is None and 'durationDays' in kwargs: + duration_days = kwargs['durationDays'] + if duration_hours is None and 'durationHours' in kwargs: + duration_hours = kwargs['durationHours'] + if end_date_time is None and 'endDateTime' in kwargs: + end_date_time = kwargs['endDateTime'] + if duration_days is not None: - pulumi.set(__self__, "duration_days", duration_days) + _setter("duration_days", duration_days) if duration_hours is not None: - pulumi.set(__self__, "duration_hours", duration_hours) + _setter("duration_hours", duration_hours) if end_date_time is not None: - pulumi.set(__self__, "end_date_time", end_date_time) + _setter("end_date_time", end_date_time) @property @pulumi.getter(name="durationDays") @@ -283,10 +368,23 @@ def __init__(__self__, *, :param str number: The ticket number. :param str system: The ticket system. """ + EligibleRoleAssignmentTicket._configure( + lambda key, value: pulumi.set(__self__, key, value), + number=number, + system=system, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + number: Optional[str] = None, + system: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if number is not None: - pulumi.set(__self__, "number", number) + _setter("number", number) if system is not None: - pulumi.set(__self__, "system", system) + _setter("system", system) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/policy/_inputs.py b/sdk/python/pulumi_azure/policy/_inputs.py index bd45e826eb..89e74cd353 100644 --- a/sdk/python/pulumi_azure/policy/_inputs.py +++ b/sdk/python/pulumi_azure/policy/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -31,15 +31,40 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of this policy definition group. :param pulumi.Input[str] display_name: The display name of this policy definition group. """ - pulumi.set(__self__, "name", name) + PolicySetDefinitionPolicyDefinitionGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + additional_metadata_resource_id=additional_metadata_resource_id, + category=category, + description=description, + display_name=display_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + additional_metadata_resource_id: Optional[pulumi.Input[str]] = None, + category: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if additional_metadata_resource_id is None and 'additionalMetadataResourceId' in kwargs: + additional_metadata_resource_id = kwargs['additionalMetadataResourceId'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + + _setter("name", name) if additional_metadata_resource_id is not None: - pulumi.set(__self__, "additional_metadata_resource_id", additional_metadata_resource_id) + _setter("additional_metadata_resource_id", additional_metadata_resource_id) if category is not None: - pulumi.set(__self__, "category", category) + _setter("category", category) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) @property @pulumi.getter @@ -115,13 +140,40 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] policy_group_names: A list of names of the policy definition groups that this policy definition reference belongs to. :param pulumi.Input[str] reference_id: A unique ID within this policy set definition for this policy definition reference. """ - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + PolicySetDefinitionPolicyDefinitionReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy_definition_id=policy_definition_id, + parameter_values=parameter_values, + policy_group_names=policy_group_names, + reference_id=reference_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy_definition_id: Optional[pulumi.Input[str]] = None, + parameter_values: Optional[pulumi.Input[str]] = None, + policy_group_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + reference_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_id is None: + raise TypeError("Missing 'policy_definition_id' argument") + if parameter_values is None and 'parameterValues' in kwargs: + parameter_values = kwargs['parameterValues'] + if policy_group_names is None and 'policyGroupNames' in kwargs: + policy_group_names = kwargs['policyGroupNames'] + if reference_id is None and 'referenceId' in kwargs: + reference_id = kwargs['referenceId'] + + _setter("policy_definition_id", policy_definition_id) if parameter_values is not None: - pulumi.set(__self__, "parameter_values", parameter_values) + _setter("parameter_values", parameter_values) if policy_group_names is not None: - pulumi.set(__self__, "policy_group_names", policy_group_names) + _setter("policy_group_names", policy_group_names) if reference_id is not None: - pulumi.set(__self__, "reference_id", reference_id) + _setter("reference_id", reference_id) @property @pulumi.getter(name="policyDefinitionId") @@ -189,16 +241,41 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['VirtualMachineConfigurationAssignmentConfigurationParameterArgs']]] parameters: One or more `parameter` blocks as defined below which define what configuration parameters and values against. :param pulumi.Input[str] version: The version of the Guest Configuration that will be assigned in this Guest Configuration Assignment. """ + VirtualMachineConfigurationAssignmentConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + assignment_type=assignment_type, + content_hash=content_hash, + content_uri=content_uri, + parameters=parameters, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assignment_type: Optional[pulumi.Input[str]] = None, + content_hash: Optional[pulumi.Input[str]] = None, + content_uri: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineConfigurationAssignmentConfigurationParameterArgs']]]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assignment_type is None and 'assignmentType' in kwargs: + assignment_type = kwargs['assignmentType'] + if content_hash is None and 'contentHash' in kwargs: + content_hash = kwargs['contentHash'] + if content_uri is None and 'contentUri' in kwargs: + content_uri = kwargs['contentUri'] + if assignment_type is not None: - pulumi.set(__self__, "assignment_type", assignment_type) + _setter("assignment_type", assignment_type) if content_hash is not None: - pulumi.set(__self__, "content_hash", content_hash) + _setter("content_hash", content_hash) if content_uri is not None: - pulumi.set(__self__, "content_uri", content_uri) + _setter("content_uri", content_uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="assignmentType") @@ -272,8 +349,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the configuration parameter to check. :param pulumi.Input[str] value: The value to check the configuration parameter with. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + VirtualMachineConfigurationAssignmentConfigurationParameterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/policy/definition.py b/sdk/python/pulumi_azure/policy/definition.py index 2cde1c8008..ef4456d473 100644 --- a/sdk/python/pulumi_azure/policy/definition.py +++ b/sdk/python/pulumi_azure/policy/definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DefinitionArgs', 'Definition'] @@ -37,21 +37,62 @@ def __init__(__self__, *, :param pulumi.Input[str] parameters: Parameters for the policy definition. This field is a JSON string that allows you to parameterize your policy definition. :param pulumi.Input[str] policy_rule: The policy rule for the policy definition. This is a JSON string representing the rule that contains an if and a then block. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "mode", mode) - pulumi.set(__self__, "policy_type", policy_type) + DefinitionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + mode=mode, + policy_type=policy_type, + description=description, + management_group_id=management_group_id, + metadata=metadata, + name=name, + parameters=parameters, + policy_rule=policy_rule, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + policy_type: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + management_group_id: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + policy_rule: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if mode is None: + raise TypeError("Missing 'mode' argument") + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if policy_type is None: + raise TypeError("Missing 'policy_type' argument") + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if policy_rule is None and 'policyRule' in kwargs: + policy_rule = kwargs['policyRule'] + + _setter("display_name", display_name) + _setter("mode", mode) + _setter("policy_type", policy_type) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if management_group_id is not None: - pulumi.set(__self__, "management_group_id", management_group_id) + _setter("management_group_id", management_group_id) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if policy_rule is not None: - pulumi.set(__self__, "policy_rule", policy_rule) + _setter("policy_rule", policy_rule) @property @pulumi.getter(name="displayName") @@ -192,26 +233,65 @@ def __init__(__self__, *, :param pulumi.Input[str] policy_type: The policy type. Possible values are `BuiltIn`, `Custom`, `NotSpecified` and `Static`. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] role_definition_ids: A list of role definition id extracted from `policy_rule` required for remediation. """ + _DefinitionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + display_name=display_name, + management_group_id=management_group_id, + metadata=metadata, + mode=mode, + name=name, + parameters=parameters, + policy_rule=policy_rule, + policy_type=policy_type, + role_definition_ids=role_definition_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + management_group_id: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + policy_rule: Optional[pulumi.Input[str]] = None, + policy_type: Optional[pulumi.Input[str]] = None, + role_definition_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if policy_rule is None and 'policyRule' in kwargs: + policy_rule = kwargs['policyRule'] + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if role_definition_ids is None and 'roleDefinitionIds' in kwargs: + role_definition_ids = kwargs['roleDefinitionIds'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if management_group_id is not None: - pulumi.set(__self__, "management_group_id", management_group_id) + _setter("management_group_id", management_group_id) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if policy_rule is not None: - pulumi.set(__self__, "policy_rule", policy_rule) + _setter("policy_rule", policy_rule) if policy_type is not None: - pulumi.set(__self__, "policy_type", policy_type) + _setter("policy_type", policy_type) if role_definition_ids is not None: - pulumi.set(__self__, "role_definition_ids", role_definition_ids) + _setter("role_definition_ids", role_definition_ids) @property @pulumi.getter @@ -505,6 +585,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DefinitionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/policy/get_policy_assignment.py b/sdk/python/pulumi_azure/policy/get_policy_assignment.py index 20e9497972..731e4e8324 100644 --- a/sdk/python/pulumi_azure/policy/get_policy_assignment.py +++ b/sdk/python/pulumi_azure/policy/get_policy_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/policy/get_policy_defintion.py b/sdk/python/pulumi_azure/policy/get_policy_defintion.py index 07438b17ec..2d85aa1848 100644 --- a/sdk/python/pulumi_azure/policy/get_policy_defintion.py +++ b/sdk/python/pulumi_azure/policy/get_policy_defintion.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/policy/get_policy_defintion_built_in.py b/sdk/python/pulumi_azure/policy/get_policy_defintion_built_in.py index d8df19a327..f75909f605 100644 --- a/sdk/python/pulumi_azure/policy/get_policy_defintion_built_in.py +++ b/sdk/python/pulumi_azure/policy/get_policy_defintion_built_in.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/policy/get_policy_set_definition.py b/sdk/python/pulumi_azure/policy/get_policy_set_definition.py index 615cc71715..97a2ee22b8 100644 --- a/sdk/python/pulumi_azure/policy/get_policy_set_definition.py +++ b/sdk/python/pulumi_azure/policy/get_policy_set_definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/policy/get_virtual_machine_configuration_assignment.py b/sdk/python/pulumi_azure/policy/get_virtual_machine_configuration_assignment.py index 689c2294cf..26291947bc 100644 --- a/sdk/python/pulumi_azure/policy/get_virtual_machine_configuration_assignment.py +++ b/sdk/python/pulumi_azure/policy/get_virtual_machine_configuration_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/policy/outputs.py b/sdk/python/pulumi_azure/policy/outputs.py index 49bafeb5e9..42717a0797 100644 --- a/sdk/python/pulumi_azure/policy/outputs.py +++ b/sdk/python/pulumi_azure/policy/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -55,15 +55,40 @@ def __init__(__self__, *, :param str description: The description of this policy definition group. :param str display_name: The display name of this policy definition group. """ - pulumi.set(__self__, "name", name) + PolicySetDefinitionPolicyDefinitionGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + additional_metadata_resource_id=additional_metadata_resource_id, + category=category, + description=description, + display_name=display_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + additional_metadata_resource_id: Optional[str] = None, + category: Optional[str] = None, + description: Optional[str] = None, + display_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if additional_metadata_resource_id is None and 'additionalMetadataResourceId' in kwargs: + additional_metadata_resource_id = kwargs['additionalMetadataResourceId'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + + _setter("name", name) if additional_metadata_resource_id is not None: - pulumi.set(__self__, "additional_metadata_resource_id", additional_metadata_resource_id) + _setter("additional_metadata_resource_id", additional_metadata_resource_id) if category is not None: - pulumi.set(__self__, "category", category) + _setter("category", category) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) @property @pulumi.getter @@ -142,13 +167,40 @@ def __init__(__self__, *, :param Sequence[str] policy_group_names: A list of names of the policy definition groups that this policy definition reference belongs to. :param str reference_id: A unique ID within this policy set definition for this policy definition reference. """ - pulumi.set(__self__, "policy_definition_id", policy_definition_id) + PolicySetDefinitionPolicyDefinitionReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy_definition_id=policy_definition_id, + parameter_values=parameter_values, + policy_group_names=policy_group_names, + reference_id=reference_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy_definition_id: Optional[str] = None, + parameter_values: Optional[str] = None, + policy_group_names: Optional[Sequence[str]] = None, + reference_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_id is None: + raise TypeError("Missing 'policy_definition_id' argument") + if parameter_values is None and 'parameterValues' in kwargs: + parameter_values = kwargs['parameterValues'] + if policy_group_names is None and 'policyGroupNames' in kwargs: + policy_group_names = kwargs['policyGroupNames'] + if reference_id is None and 'referenceId' in kwargs: + reference_id = kwargs['referenceId'] + + _setter("policy_definition_id", policy_definition_id) if parameter_values is not None: - pulumi.set(__self__, "parameter_values", parameter_values) + _setter("parameter_values", parameter_values) if policy_group_names is not None: - pulumi.set(__self__, "policy_group_names", policy_group_names) + _setter("policy_group_names", policy_group_names) if reference_id is not None: - pulumi.set(__self__, "reference_id", reference_id) + _setter("reference_id", reference_id) @property @pulumi.getter(name="policyDefinitionId") @@ -221,16 +273,41 @@ def __init__(__self__, *, :param Sequence['VirtualMachineConfigurationAssignmentConfigurationParameterArgs'] parameters: One or more `parameter` blocks as defined below which define what configuration parameters and values against. :param str version: The version of the Guest Configuration that will be assigned in this Guest Configuration Assignment. """ + VirtualMachineConfigurationAssignmentConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + assignment_type=assignment_type, + content_hash=content_hash, + content_uri=content_uri, + parameters=parameters, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assignment_type: Optional[str] = None, + content_hash: Optional[str] = None, + content_uri: Optional[str] = None, + parameters: Optional[Sequence['outputs.VirtualMachineConfigurationAssignmentConfigurationParameter']] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assignment_type is None and 'assignmentType' in kwargs: + assignment_type = kwargs['assignmentType'] + if content_hash is None and 'contentHash' in kwargs: + content_hash = kwargs['contentHash'] + if content_uri is None and 'contentUri' in kwargs: + content_uri = kwargs['contentUri'] + if assignment_type is not None: - pulumi.set(__self__, "assignment_type", assignment_type) + _setter("assignment_type", assignment_type) if content_hash is not None: - pulumi.set(__self__, "content_hash", content_hash) + _setter("content_hash", content_hash) if content_uri is not None: - pulumi.set(__self__, "content_uri", content_uri) + _setter("content_uri", content_uri) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="assignmentType") @@ -284,8 +361,25 @@ def __init__(__self__, *, :param str name: The name of the configuration parameter to check. :param str value: The value to check the configuration parameter with. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + VirtualMachineConfigurationAssignmentConfigurationParameter._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -317,10 +411,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID of the Policy Assignment for this Resource. :param str type: The Type of Managed Identity which is added to this Policy Assignment. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetPolicyAssignmentIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -364,8 +489,27 @@ def __init__(__self__, *, :param str content: The non-compliance message text. :param str policy_definition_reference_id: The ID of the Policy Definition that the non-compliance message applies to. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "policy_definition_reference_id", policy_definition_reference_id) + GetPolicyAssignmentNonComplianceMessageResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + policy_definition_reference_id=policy_definition_reference_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[str] = None, + policy_definition_reference_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if policy_definition_reference_id is None and 'policyDefinitionReferenceId' in kwargs: + policy_definition_reference_id = kwargs['policyDefinitionReferenceId'] + if policy_definition_reference_id is None: + raise TypeError("Missing 'policy_definition_reference_id' argument") + + _setter("content", content) + _setter("policy_definition_reference_id", policy_definition_reference_id) @property @pulumi.getter @@ -401,11 +545,44 @@ def __init__(__self__, *, **NOTE** As `display_name` is not unique errors may occur when there are multiple policy set definitions with same display name. :param str name: Specifies the name of the Policy Set Definition. Conflicts with `display_name`. """ - pulumi.set(__self__, "additional_metadata_resource_id", additional_metadata_resource_id) - pulumi.set(__self__, "category", category) - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "name", name) + GetPolicySetDefinitionPolicyDefinitionGroupResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_metadata_resource_id=additional_metadata_resource_id, + category=category, + description=description, + display_name=display_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_metadata_resource_id: Optional[str] = None, + category: Optional[str] = None, + description: Optional[str] = None, + display_name: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_metadata_resource_id is None and 'additionalMetadataResourceId' in kwargs: + additional_metadata_resource_id = kwargs['additionalMetadataResourceId'] + if additional_metadata_resource_id is None: + raise TypeError("Missing 'additional_metadata_resource_id' argument") + if category is None: + raise TypeError("Missing 'category' argument") + if description is None: + raise TypeError("Missing 'description' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("additional_metadata_resource_id", additional_metadata_resource_id) + _setter("category", category) + _setter("description", description) + _setter("display_name", display_name) + _setter("name", name) @property @pulumi.getter(name="additionalMetadataResourceId") @@ -465,11 +642,48 @@ def __init__(__self__, *, :param Sequence[str] policy_group_names: The list of names of the policy definition groups that this policy definition reference belongs to. :param str reference_id: The unique ID within this policy set definition for this policy definition reference. """ - pulumi.set(__self__, "parameter_values", parameter_values) - pulumi.set(__self__, "parameters", parameters) - pulumi.set(__self__, "policy_definition_id", policy_definition_id) - pulumi.set(__self__, "policy_group_names", policy_group_names) - pulumi.set(__self__, "reference_id", reference_id) + GetPolicySetDefinitionPolicyDefinitionReferenceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + parameter_values=parameter_values, + parameters=parameters, + policy_definition_id=policy_definition_id, + policy_group_names=policy_group_names, + reference_id=reference_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + parameter_values: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + policy_definition_id: Optional[str] = None, + policy_group_names: Optional[Sequence[str]] = None, + reference_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parameter_values is None and 'parameterValues' in kwargs: + parameter_values = kwargs['parameterValues'] + if parameter_values is None: + raise TypeError("Missing 'parameter_values' argument") + if parameters is None: + raise TypeError("Missing 'parameters' argument") + if policy_definition_id is None and 'policyDefinitionId' in kwargs: + policy_definition_id = kwargs['policyDefinitionId'] + if policy_definition_id is None: + raise TypeError("Missing 'policy_definition_id' argument") + if policy_group_names is None and 'policyGroupNames' in kwargs: + policy_group_names = kwargs['policyGroupNames'] + if policy_group_names is None: + raise TypeError("Missing 'policy_group_names' argument") + if reference_id is None and 'referenceId' in kwargs: + reference_id = kwargs['referenceId'] + if reference_id is None: + raise TypeError("Missing 'reference_id' argument") + + _setter("parameter_values", parameter_values) + _setter("parameters", parameters) + _setter("policy_definition_id", policy_definition_id) + _setter("policy_group_names", policy_group_names) + _setter("reference_id", reference_id) @property @pulumi.getter(name="parameterValues") diff --git a/sdk/python/pulumi_azure/policy/policy_set_definition.py b/sdk/python/pulumi_azure/policy/policy_set_definition.py index 1d22f312e3..0905d03bf0 100644 --- a/sdk/python/pulumi_azure/policy/policy_set_definition.py +++ b/sdk/python/pulumi_azure/policy/policy_set_definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,21 +37,64 @@ def __init__(__self__, *, :param pulumi.Input[str] parameters: Parameters for the policy set definition. This field is a JSON object that allows you to parameterize your policy definition. :param pulumi.Input[Sequence[pulumi.Input['PolicySetDefinitionPolicyDefinitionGroupArgs']]] policy_definition_groups: One or more `policy_definition_group` blocks as defined below. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "policy_definition_references", policy_definition_references) - pulumi.set(__self__, "policy_type", policy_type) + PolicySetDefinitionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + policy_definition_references=policy_definition_references, + policy_type=policy_type, + description=description, + management_group_id=management_group_id, + metadata=metadata, + name=name, + parameters=parameters, + policy_definition_groups=policy_definition_groups, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + policy_definition_references: Optional[pulumi.Input[Sequence[pulumi.Input['PolicySetDefinitionPolicyDefinitionReferenceArgs']]]] = None, + policy_type: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + management_group_id: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + policy_definition_groups: Optional[pulumi.Input[Sequence[pulumi.Input['PolicySetDefinitionPolicyDefinitionGroupArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if policy_definition_references is None and 'policyDefinitionReferences' in kwargs: + policy_definition_references = kwargs['policyDefinitionReferences'] + if policy_definition_references is None: + raise TypeError("Missing 'policy_definition_references' argument") + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if policy_type is None: + raise TypeError("Missing 'policy_type' argument") + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if policy_definition_groups is None and 'policyDefinitionGroups' in kwargs: + policy_definition_groups = kwargs['policyDefinitionGroups'] + + _setter("display_name", display_name) + _setter("policy_definition_references", policy_definition_references) + _setter("policy_type", policy_type) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if management_group_id is not None: - pulumi.set(__self__, "management_group_id", management_group_id) + _setter("management_group_id", management_group_id) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if policy_definition_groups is not None: - pulumi.set(__self__, "policy_definition_groups", policy_definition_groups) + _setter("policy_definition_groups", policy_definition_groups) @property @pulumi.getter(name="displayName") @@ -186,24 +229,61 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['PolicySetDefinitionPolicyDefinitionReferenceArgs']]] policy_definition_references: One or more `policy_definition_reference` blocks as defined below. :param pulumi.Input[str] policy_type: The policy set type. Possible values are `BuiltIn`, `Custom`, `NotSpecified` and `Static`. Changing this forces a new resource to be created. """ + _PolicySetDefinitionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + display_name=display_name, + management_group_id=management_group_id, + metadata=metadata, + name=name, + parameters=parameters, + policy_definition_groups=policy_definition_groups, + policy_definition_references=policy_definition_references, + policy_type=policy_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + management_group_id: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[str]] = None, + policy_definition_groups: Optional[pulumi.Input[Sequence[pulumi.Input['PolicySetDefinitionPolicyDefinitionGroupArgs']]]] = None, + policy_definition_references: Optional[pulumi.Input[Sequence[pulumi.Input['PolicySetDefinitionPolicyDefinitionReferenceArgs']]]] = None, + policy_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if management_group_id is None and 'managementGroupId' in kwargs: + management_group_id = kwargs['managementGroupId'] + if policy_definition_groups is None and 'policyDefinitionGroups' in kwargs: + policy_definition_groups = kwargs['policyDefinitionGroups'] + if policy_definition_references is None and 'policyDefinitionReferences' in kwargs: + policy_definition_references = kwargs['policyDefinitionReferences'] + if policy_type is None and 'policyType' in kwargs: + policy_type = kwargs['policyType'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if management_group_id is not None: - pulumi.set(__self__, "management_group_id", management_group_id) + _setter("management_group_id", management_group_id) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if policy_definition_groups is not None: - pulumi.set(__self__, "policy_definition_groups", policy_definition_groups) + _setter("policy_definition_groups", policy_definition_groups) if policy_definition_references is not None: - pulumi.set(__self__, "policy_definition_references", policy_definition_references) + _setter("policy_definition_references", policy_definition_references) if policy_type is not None: - pulumi.set(__self__, "policy_type", policy_type) + _setter("policy_type", policy_type) @property @pulumi.getter @@ -457,6 +537,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PolicySetDefinitionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/policy/virtual_machine_configuration_assignment.py b/sdk/python/pulumi_azure/policy/virtual_machine_configuration_assignment.py index c48039e235..79d9bf0dfe 100644 --- a/sdk/python/pulumi_azure/policy/virtual_machine_configuration_assignment.py +++ b/sdk/python/pulumi_azure/policy/virtual_machine_configuration_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,12 +27,35 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The Azure location where the Policy Virtual Machine Configuration Assignment should exist. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the Guest Configuration that will be assigned in this Guest Configuration Assignment. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "configuration", configuration) - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + VirtualMachineConfigurationAssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + configuration=configuration, + virtual_machine_id=virtual_machine_id, + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + configuration: Optional[pulumi.Input['VirtualMachineConfigurationAssignmentConfigurationArgs']] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if configuration is None: + raise TypeError("Missing 'configuration' argument") + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_id is None: + raise TypeError("Missing 'virtual_machine_id' argument") + + _setter("configuration", configuration) + _setter("virtual_machine_id", virtual_machine_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -97,14 +120,33 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Guest Configuration that will be assigned in this Guest Configuration Assignment. Changing this forces a new resource to be created. :param pulumi.Input[str] virtual_machine_id: The resource ID of the Policy Virtual Machine which this Guest Configuration Assignment should apply to. Changing this forces a new resource to be created. """ + _VirtualMachineConfigurationAssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + configuration=configuration, + location=location, + name=name, + virtual_machine_id=virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + configuration: Optional[pulumi.Input['VirtualMachineConfigurationAssignmentConfigurationArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if configuration is not None: - pulumi.set(__self__, "configuration", configuration) + _setter("configuration", configuration) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) @property @pulumi.getter @@ -374,6 +416,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualMachineConfigurationAssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -392,6 +438,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = VirtualMachineConfigurationAssignmentArgs.__new__(VirtualMachineConfigurationAssignmentArgs) + if configuration is not None and not isinstance(configuration, VirtualMachineConfigurationAssignmentConfigurationArgs): + configuration = configuration or {} + def _setter(key, value): + configuration[key] = value + VirtualMachineConfigurationAssignmentConfigurationArgs._configure(_setter, **configuration) if configuration is None and not opts.urn: raise TypeError("Missing required property 'configuration'") __props__.__dict__["configuration"] = configuration diff --git a/sdk/python/pulumi_azure/portal/dashboard.py b/sdk/python/pulumi_azure/portal/dashboard.py index 717a99f732..ae1e854452 100644 --- a/sdk/python/pulumi_azure/portal/dashboard.py +++ b/sdk/python/pulumi_azure/portal/dashboard.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DashboardArgs', 'Dashboard'] @@ -29,15 +29,40 @@ def __init__(__self__, *, > **Note**: You can specify a tag with the key `hidden-title` to set a more user-friendly title for this Dashboard. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + DashboardArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + dashboard_properties=dashboard_properties, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + dashboard_properties: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if dashboard_properties is None and 'dashboardProperties' in kwargs: + dashboard_properties = kwargs['dashboardProperties'] + + _setter("resource_group_name", resource_group_name) if dashboard_properties is not None: - pulumi.set(__self__, "dashboard_properties", dashboard_properties) + _setter("dashboard_properties", dashboard_properties) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -120,16 +145,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _DashboardState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dashboard_properties=dashboard_properties, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dashboard_properties: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dashboard_properties is None and 'dashboardProperties' in kwargs: + dashboard_properties = kwargs['dashboardProperties'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if dashboard_properties is not None: - pulumi.set(__self__, "dashboard_properties", dashboard_properties) + _setter("dashboard_properties", dashboard_properties) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dashboardProperties") @@ -531,6 +579,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DashboardArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/portal/get_dashboard.py b/sdk/python/pulumi_azure/portal/get_dashboard.py index 92de507280..2dfdc97d37 100644 --- a/sdk/python/pulumi_azure/portal/get_dashboard.py +++ b/sdk/python/pulumi_azure/portal/get_dashboard.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/portal/portal_dashboard.py b/sdk/python/pulumi_azure/portal/portal_dashboard.py index 1e365a8975..333798712b 100644 --- a/sdk/python/pulumi_azure/portal/portal_dashboard.py +++ b/sdk/python/pulumi_azure/portal/portal_dashboard.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PortalDashboardArgs', 'PortalDashboard'] @@ -29,14 +29,41 @@ def __init__(__self__, *, > **Note**: You can specify a tag with the key `hidden-title` to set a more user-friendly title for this Dashboard. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "dashboard_properties", dashboard_properties) - pulumi.set(__self__, "resource_group_name", resource_group_name) + PortalDashboardArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dashboard_properties=dashboard_properties, + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dashboard_properties: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dashboard_properties is None and 'dashboardProperties' in kwargs: + dashboard_properties = kwargs['dashboardProperties'] + if dashboard_properties is None: + raise TypeError("Missing 'dashboard_properties' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("dashboard_properties", dashboard_properties) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dashboardProperties") @@ -119,16 +146,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _PortalDashboardState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dashboard_properties=dashboard_properties, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dashboard_properties: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dashboard_properties is None and 'dashboardProperties' in kwargs: + dashboard_properties = kwargs['dashboardProperties'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if dashboard_properties is not None: - pulumi.set(__self__, "dashboard_properties", dashboard_properties) + _setter("dashboard_properties", dashboard_properties) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="dashboardProperties") @@ -252,6 +302,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PortalDashboardArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/postgresql/_inputs.py b/sdk/python/pulumi_azure/postgresql/_inputs.py index c13b13f789..34d8cc9143 100644 --- a/sdk/python/pulumi_azure/postgresql/_inputs.py +++ b/sdk/python/pulumi_azure/postgresql/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -34,12 +34,33 @@ def __init__(__self__, *, > **Note:** `tenant_id` is required when `active_directory_auth_enabled` is set to `true`. And it should not be specified when `active_directory_auth_enabled` is set to `false` """ + FlexibleServerAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directory_auth_enabled=active_directory_auth_enabled, + password_auth_enabled=password_auth_enabled, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directory_auth_enabled: Optional[pulumi.Input[bool]] = None, + password_auth_enabled: Optional[pulumi.Input[bool]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directory_auth_enabled is None and 'activeDirectoryAuthEnabled' in kwargs: + active_directory_auth_enabled = kwargs['activeDirectoryAuthEnabled'] + if password_auth_enabled is None and 'passwordAuthEnabled' in kwargs: + password_auth_enabled = kwargs['passwordAuthEnabled'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if active_directory_auth_enabled is not None: - pulumi.set(__self__, "active_directory_auth_enabled", active_directory_auth_enabled) + _setter("active_directory_auth_enabled", active_directory_auth_enabled) if password_auth_enabled is not None: - pulumi.set(__self__, "password_auth_enabled", password_auth_enabled) + _setter("password_auth_enabled", password_auth_enabled) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="activeDirectoryAuthEnabled") @@ -97,14 +118,39 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault Key. :param pulumi.Input[str] primary_user_assigned_identity_id: Specifies the primary user managed identity id for a Customer Managed Key. Should be added with `identity_ids`. """ + FlexibleServerCustomerManagedKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + geo_backup_key_vault_key_id=geo_backup_key_vault_key_id, + geo_backup_user_assigned_identity_id=geo_backup_user_assigned_identity_id, + key_vault_key_id=key_vault_key_id, + primary_user_assigned_identity_id=primary_user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + geo_backup_key_vault_key_id: Optional[pulumi.Input[str]] = None, + geo_backup_user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + primary_user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if geo_backup_key_vault_key_id is None and 'geoBackupKeyVaultKeyId' in kwargs: + geo_backup_key_vault_key_id = kwargs['geoBackupKeyVaultKeyId'] + if geo_backup_user_assigned_identity_id is None and 'geoBackupUserAssignedIdentityId' in kwargs: + geo_backup_user_assigned_identity_id = kwargs['geoBackupUserAssignedIdentityId'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if primary_user_assigned_identity_id is None and 'primaryUserAssignedIdentityId' in kwargs: + primary_user_assigned_identity_id = kwargs['primaryUserAssignedIdentityId'] + if geo_backup_key_vault_key_id is not None: - pulumi.set(__self__, "geo_backup_key_vault_key_id", geo_backup_key_vault_key_id) + _setter("geo_backup_key_vault_key_id", geo_backup_key_vault_key_id) if geo_backup_user_assigned_identity_id is not None: - pulumi.set(__self__, "geo_backup_user_assigned_identity_id", geo_backup_user_assigned_identity_id) + _setter("geo_backup_user_assigned_identity_id", geo_backup_user_assigned_identity_id) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if primary_user_assigned_identity_id is not None: - pulumi.set(__self__, "primary_user_assigned_identity_id", primary_user_assigned_identity_id) + _setter("primary_user_assigned_identity_id", primary_user_assigned_identity_id) @property @pulumi.getter(name="geoBackupKeyVaultKeyId") @@ -165,9 +211,26 @@ def __init__(__self__, *, """ :param pulumi.Input[str] mode: The high availability mode for the PostgreSQL Flexible Server. Possible value are `SameZone` or `ZoneRedundant`. """ - pulumi.set(__self__, "mode", mode) + FlexibleServerHighAvailabilityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + standby_availability_zone=standby_availability_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + standby_availability_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if standby_availability_zone is None and 'standbyAvailabilityZone' in kwargs: + standby_availability_zone = kwargs['standbyAvailabilityZone'] + + _setter("mode", mode) if standby_availability_zone is not None: - pulumi.set(__self__, "standby_availability_zone", standby_availability_zone) + _setter("standby_availability_zone", standby_availability_zone) @property @pulumi.getter @@ -200,8 +263,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: A list of User Assigned Managed Identity IDs to be assigned to this PostgreSQL Flexible Server. Required if used together with `customer_managed_key` block. :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Flexible Server. The only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + FlexibleServerIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -239,12 +321,33 @@ def __init__(__self__, *, :param pulumi.Input[int] start_hour: The start hour for maintenance window. Defaults to `0`. :param pulumi.Input[int] start_minute: The start minute for maintenance window. Defaults to `0`. """ + FlexibleServerMaintenanceWindowArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + start_hour=start_hour, + start_minute=start_minute, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[pulumi.Input[int]] = None, + start_hour: Optional[pulumi.Input[int]] = None, + start_minute: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if start_hour is None and 'startHour' in kwargs: + start_hour = kwargs['startHour'] + if start_minute is None and 'startMinute' in kwargs: + start_minute = kwargs['startMinute'] + if day_of_week is not None: - pulumi.set(__self__, "day_of_week", day_of_week) + _setter("day_of_week", day_of_week) if start_hour is not None: - pulumi.set(__self__, "start_hour", start_hour) + _setter("start_hour", start_hour) if start_minute is not None: - pulumi.set(__self__, "start_minute", start_minute) + _setter("start_minute", start_minute) @property @pulumi.getter(name="dayOfWeek") @@ -294,11 +397,32 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ServerIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -356,20 +480,55 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. :param pulumi.Input[str] storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. """ + ServerThreatDetectionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins=email_account_admins, + email_addresses=email_addresses, + enabled=enabled, + retention_days=retention_days, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_account_admins: Optional[pulumi.Input[bool]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + retention_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins is None and 'emailAccountAdmins' in kwargs: + email_account_admins = kwargs['emailAccountAdmins'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins is not None: - pulumi.set(__self__, "email_account_admins", email_account_admins) + _setter("email_account_admins", email_account_admins) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") diff --git a/sdk/python/pulumi_azure/postgresql/active_directory_administrator.py b/sdk/python/pulumi_azure/postgresql/active_directory_administrator.py index 547f580127..83b556a349 100644 --- a/sdk/python/pulumi_azure/postgresql/active_directory_administrator.py +++ b/sdk/python/pulumi_azure/postgresql/active_directory_administrator.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ActiveDirectoryAdministratorArgs', 'ActiveDirectoryAdministrator'] @@ -27,11 +27,48 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created. :param pulumi.Input[str] tenant_id: The Azure Tenant ID """ - pulumi.set(__self__, "login", login) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "tenant_id", tenant_id) + ActiveDirectoryAdministratorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + object_id=object_id, + resource_group_name=resource_group_name, + server_name=server_name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("login", login) + _setter("object_id", object_id) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -110,16 +147,43 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created. :param pulumi.Input[str] tenant_id: The Azure Tenant ID """ + _ActiveDirectoryAdministratorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + object_id=object_id, + resource_group_name=resource_group_name, + server_name=server_name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if login is not None: - pulumi.set(__self__, "login", login) + _setter("login", login) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -287,6 +351,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ActiveDirectoryAdministratorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/postgresql/configuration.py b/sdk/python/pulumi_azure/postgresql/configuration.py index f5e2ec0926..48fe9be847 100644 --- a/sdk/python/pulumi_azure/postgresql/configuration.py +++ b/sdk/python/pulumi_azure/postgresql/configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ConfigurationArgs', 'Configuration'] @@ -25,10 +25,39 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. :param pulumi.Input[str] value: Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "value", value) + ConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("value", value) @property @pulumi.getter @@ -93,14 +122,35 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. :param pulumi.Input[str] value: Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. """ + _ConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -266,6 +316,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/postgresql/database.py b/sdk/python/pulumi_azure/postgresql/database.py index 8b5b9a980c..1c9ac9df1b 100644 --- a/sdk/python/pulumi_azure/postgresql/database.py +++ b/sdk/python/pulumi_azure/postgresql/database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DatabaseArgs', 'Database'] @@ -27,12 +27,43 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a new resource to be created. """ - pulumi.set(__self__, "charset", charset) - pulumi.set(__self__, "collation", collation) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) + DatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + charset=charset, + collation=collation, + resource_group_name=resource_group_name, + server_name=server_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + charset: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if charset is None: + raise TypeError("Missing 'charset' argument") + if collation is None: + raise TypeError("Missing 'collation' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + + _setter("charset", charset) + _setter("collation", collation) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -111,16 +142,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. :param pulumi.Input[str] server_name: Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. """ + _DatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + charset=charset, + collation=collation, + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + charset: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if charset is not None: - pulumi.set(__self__, "charset", charset) + _setter("charset", charset) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) @property @pulumi.getter @@ -292,6 +346,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/postgresql/firewall_rule.py b/sdk/python/pulumi_azure/postgresql/firewall_rule.py index 2da0c5e18c..b30f0456f1 100644 --- a/sdk/python/pulumi_azure/postgresql/firewall_rule.py +++ b/sdk/python/pulumi_azure/postgresql/firewall_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FirewallRuleArgs', 'FirewallRule'] @@ -29,12 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] start_ip_address: Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "end_ip_address", end_ip_address) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "start_ip_address", start_ip_address) + FirewallRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + resource_group_name=resource_group_name, + server_name=server_name, + start_ip_address=start_ip_address, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if end_ip_address is None: + raise TypeError("Missing 'end_ip_address' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if start_ip_address is None: + raise TypeError("Missing 'start_ip_address' argument") + + _setter("end_ip_address", end_ip_address) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("start_ip_address", start_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="endIpAddress") @@ -117,16 +152,43 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. :param pulumi.Input[str] start_ip_address: Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. """ + _FirewallRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + start_ip_address=start_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if end_ip_address is not None: - pulumi.set(__self__, "end_ip_address", end_ip_address) + _setter("end_ip_address", end_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if start_ip_address is not None: - pulumi.set(__self__, "start_ip_address", start_ip_address) + _setter("start_ip_address", start_ip_address) @property @pulumi.getter(name="endIpAddress") @@ -322,6 +384,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/postgresql/flexible_server.py b/sdk/python/pulumi_azure/postgresql/flexible_server.py index e9a57cee59..911285233b 100644 --- a/sdk/python/pulumi_azure/postgresql/flexible_server.py +++ b/sdk/python/pulumi_azure/postgresql/flexible_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -80,53 +80,146 @@ def __init__(__self__, *, > **Note:** When `create_mode` is `Update`, upgrading version wouldn't force a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + FlexibleServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + administrator_login=administrator_login, + administrator_password=administrator_password, + authentication=authentication, + auto_grow_enabled=auto_grow_enabled, + backup_retention_days=backup_retention_days, + create_mode=create_mode, + customer_managed_key=customer_managed_key, + delegated_subnet_id=delegated_subnet_id, + geo_redundant_backup_enabled=geo_redundant_backup_enabled, + high_availability=high_availability, + identity=identity, + location=location, + maintenance_window=maintenance_window, + name=name, + point_in_time_restore_time_in_utc=point_in_time_restore_time_in_utc, + private_dns_zone_id=private_dns_zone_id, + replication_role=replication_role, + sku_name=sku_name, + source_server_id=source_server_id, + storage_mb=storage_mb, + tags=tags, + version=version, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_password: Optional[pulumi.Input[str]] = None, + authentication: Optional[pulumi.Input['FlexibleServerAuthenticationArgs']] = None, + auto_grow_enabled: Optional[pulumi.Input[bool]] = None, + backup_retention_days: Optional[pulumi.Input[int]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + customer_managed_key: Optional[pulumi.Input['FlexibleServerCustomerManagedKeyArgs']] = None, + delegated_subnet_id: Optional[pulumi.Input[str]] = None, + geo_redundant_backup_enabled: Optional[pulumi.Input[bool]] = None, + high_availability: Optional[pulumi.Input['FlexibleServerHighAvailabilityArgs']] = None, + identity: Optional[pulumi.Input['FlexibleServerIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_window: Optional[pulumi.Input['FlexibleServerMaintenanceWindowArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + point_in_time_restore_time_in_utc: Optional[pulumi.Input[str]] = None, + private_dns_zone_id: Optional[pulumi.Input[str]] = None, + replication_role: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + source_server_id: Optional[pulumi.Input[str]] = None, + storage_mb: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_password is None and 'administratorPassword' in kwargs: + administrator_password = kwargs['administratorPassword'] + if auto_grow_enabled is None and 'autoGrowEnabled' in kwargs: + auto_grow_enabled = kwargs['autoGrowEnabled'] + if backup_retention_days is None and 'backupRetentionDays' in kwargs: + backup_retention_days = kwargs['backupRetentionDays'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if delegated_subnet_id is None and 'delegatedSubnetId' in kwargs: + delegated_subnet_id = kwargs['delegatedSubnetId'] + if geo_redundant_backup_enabled is None and 'geoRedundantBackupEnabled' in kwargs: + geo_redundant_backup_enabled = kwargs['geoRedundantBackupEnabled'] + if high_availability is None and 'highAvailability' in kwargs: + high_availability = kwargs['highAvailability'] + if maintenance_window is None and 'maintenanceWindow' in kwargs: + maintenance_window = kwargs['maintenanceWindow'] + if point_in_time_restore_time_in_utc is None and 'pointInTimeRestoreTimeInUtc' in kwargs: + point_in_time_restore_time_in_utc = kwargs['pointInTimeRestoreTimeInUtc'] + if private_dns_zone_id is None and 'privateDnsZoneId' in kwargs: + private_dns_zone_id = kwargs['privateDnsZoneId'] + if replication_role is None and 'replicationRole' in kwargs: + replication_role = kwargs['replicationRole'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if source_server_id is None and 'sourceServerId' in kwargs: + source_server_id = kwargs['sourceServerId'] + if storage_mb is None and 'storageMb' in kwargs: + storage_mb = kwargs['storageMb'] + + _setter("resource_group_name", resource_group_name) if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_password is not None: - pulumi.set(__self__, "administrator_password", administrator_password) + _setter("administrator_password", administrator_password) if authentication is not None: - pulumi.set(__self__, "authentication", authentication) + _setter("authentication", authentication) if auto_grow_enabled is not None: - pulumi.set(__self__, "auto_grow_enabled", auto_grow_enabled) + _setter("auto_grow_enabled", auto_grow_enabled) if backup_retention_days is not None: - pulumi.set(__self__, "backup_retention_days", backup_retention_days) + _setter("backup_retention_days", backup_retention_days) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if delegated_subnet_id is not None: - pulumi.set(__self__, "delegated_subnet_id", delegated_subnet_id) + _setter("delegated_subnet_id", delegated_subnet_id) if geo_redundant_backup_enabled is not None: - pulumi.set(__self__, "geo_redundant_backup_enabled", geo_redundant_backup_enabled) + _setter("geo_redundant_backup_enabled", geo_redundant_backup_enabled) if high_availability is not None: - pulumi.set(__self__, "high_availability", high_availability) + _setter("high_availability", high_availability) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_window is not None: - pulumi.set(__self__, "maintenance_window", maintenance_window) + _setter("maintenance_window", maintenance_window) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if point_in_time_restore_time_in_utc is not None: - pulumi.set(__self__, "point_in_time_restore_time_in_utc", point_in_time_restore_time_in_utc) + _setter("point_in_time_restore_time_in_utc", point_in_time_restore_time_in_utc) if private_dns_zone_id is not None: - pulumi.set(__self__, "private_dns_zone_id", private_dns_zone_id) + _setter("private_dns_zone_id", private_dns_zone_id) if replication_role is not None: - pulumi.set(__self__, "replication_role", replication_role) + _setter("replication_role", replication_role) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if source_server_id is not None: - pulumi.set(__self__, "source_server_id", source_server_id) + _setter("source_server_id", source_server_id) if storage_mb is not None: - pulumi.set(__self__, "storage_mb", storage_mb) + _setter("storage_mb", storage_mb) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="resourceGroupName") @@ -499,58 +592,155 @@ def __init__(__self__, *, > **Note:** When `create_mode` is `Update`, upgrading version wouldn't force a new resource to be created. """ + _FlexibleServerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_password=administrator_password, + authentication=authentication, + auto_grow_enabled=auto_grow_enabled, + backup_retention_days=backup_retention_days, + create_mode=create_mode, + customer_managed_key=customer_managed_key, + delegated_subnet_id=delegated_subnet_id, + fqdn=fqdn, + geo_redundant_backup_enabled=geo_redundant_backup_enabled, + high_availability=high_availability, + identity=identity, + location=location, + maintenance_window=maintenance_window, + name=name, + point_in_time_restore_time_in_utc=point_in_time_restore_time_in_utc, + private_dns_zone_id=private_dns_zone_id, + public_network_access_enabled=public_network_access_enabled, + replication_role=replication_role, + resource_group_name=resource_group_name, + sku_name=sku_name, + source_server_id=source_server_id, + storage_mb=storage_mb, + tags=tags, + version=version, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_password: Optional[pulumi.Input[str]] = None, + authentication: Optional[pulumi.Input['FlexibleServerAuthenticationArgs']] = None, + auto_grow_enabled: Optional[pulumi.Input[bool]] = None, + backup_retention_days: Optional[pulumi.Input[int]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + customer_managed_key: Optional[pulumi.Input['FlexibleServerCustomerManagedKeyArgs']] = None, + delegated_subnet_id: Optional[pulumi.Input[str]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + geo_redundant_backup_enabled: Optional[pulumi.Input[bool]] = None, + high_availability: Optional[pulumi.Input['FlexibleServerHighAvailabilityArgs']] = None, + identity: Optional[pulumi.Input['FlexibleServerIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + maintenance_window: Optional[pulumi.Input['FlexibleServerMaintenanceWindowArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + point_in_time_restore_time_in_utc: Optional[pulumi.Input[str]] = None, + private_dns_zone_id: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + replication_role: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + source_server_id: Optional[pulumi.Input[str]] = None, + storage_mb: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_password is None and 'administratorPassword' in kwargs: + administrator_password = kwargs['administratorPassword'] + if auto_grow_enabled is None and 'autoGrowEnabled' in kwargs: + auto_grow_enabled = kwargs['autoGrowEnabled'] + if backup_retention_days is None and 'backupRetentionDays' in kwargs: + backup_retention_days = kwargs['backupRetentionDays'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if delegated_subnet_id is None and 'delegatedSubnetId' in kwargs: + delegated_subnet_id = kwargs['delegatedSubnetId'] + if geo_redundant_backup_enabled is None and 'geoRedundantBackupEnabled' in kwargs: + geo_redundant_backup_enabled = kwargs['geoRedundantBackupEnabled'] + if high_availability is None and 'highAvailability' in kwargs: + high_availability = kwargs['highAvailability'] + if maintenance_window is None and 'maintenanceWindow' in kwargs: + maintenance_window = kwargs['maintenanceWindow'] + if point_in_time_restore_time_in_utc is None and 'pointInTimeRestoreTimeInUtc' in kwargs: + point_in_time_restore_time_in_utc = kwargs['pointInTimeRestoreTimeInUtc'] + if private_dns_zone_id is None and 'privateDnsZoneId' in kwargs: + private_dns_zone_id = kwargs['privateDnsZoneId'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if replication_role is None and 'replicationRole' in kwargs: + replication_role = kwargs['replicationRole'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if source_server_id is None and 'sourceServerId' in kwargs: + source_server_id = kwargs['sourceServerId'] + if storage_mb is None and 'storageMb' in kwargs: + storage_mb = kwargs['storageMb'] + if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_password is not None: - pulumi.set(__self__, "administrator_password", administrator_password) + _setter("administrator_password", administrator_password) if authentication is not None: - pulumi.set(__self__, "authentication", authentication) + _setter("authentication", authentication) if auto_grow_enabled is not None: - pulumi.set(__self__, "auto_grow_enabled", auto_grow_enabled) + _setter("auto_grow_enabled", auto_grow_enabled) if backup_retention_days is not None: - pulumi.set(__self__, "backup_retention_days", backup_retention_days) + _setter("backup_retention_days", backup_retention_days) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if delegated_subnet_id is not None: - pulumi.set(__self__, "delegated_subnet_id", delegated_subnet_id) + _setter("delegated_subnet_id", delegated_subnet_id) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if geo_redundant_backup_enabled is not None: - pulumi.set(__self__, "geo_redundant_backup_enabled", geo_redundant_backup_enabled) + _setter("geo_redundant_backup_enabled", geo_redundant_backup_enabled) if high_availability is not None: - pulumi.set(__self__, "high_availability", high_availability) + _setter("high_availability", high_availability) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if maintenance_window is not None: - pulumi.set(__self__, "maintenance_window", maintenance_window) + _setter("maintenance_window", maintenance_window) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if point_in_time_restore_time_in_utc is not None: - pulumi.set(__self__, "point_in_time_restore_time_in_utc", point_in_time_restore_time_in_utc) + _setter("point_in_time_restore_time_in_utc", point_in_time_restore_time_in_utc) if private_dns_zone_id is not None: - pulumi.set(__self__, "private_dns_zone_id", private_dns_zone_id) + _setter("private_dns_zone_id", private_dns_zone_id) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if replication_role is not None: - pulumi.set(__self__, "replication_role", replication_role) + _setter("replication_role", replication_role) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if source_server_id is not None: - pulumi.set(__self__, "source_server_id", source_server_id) + _setter("source_server_id", source_server_id) if storage_mb is not None: - pulumi.set(__self__, "storage_mb", storage_mb) + _setter("storage_mb", storage_mb) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="administratorLogin") @@ -1068,6 +1258,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FlexibleServerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1108,16 +1302,41 @@ def _internal_init(__self__, __props__.__dict__["administrator_login"] = administrator_login __props__.__dict__["administrator_password"] = None if administrator_password is None else pulumi.Output.secret(administrator_password) + if authentication is not None and not isinstance(authentication, FlexibleServerAuthenticationArgs): + authentication = authentication or {} + def _setter(key, value): + authentication[key] = value + FlexibleServerAuthenticationArgs._configure(_setter, **authentication) __props__.__dict__["authentication"] = authentication __props__.__dict__["auto_grow_enabled"] = auto_grow_enabled __props__.__dict__["backup_retention_days"] = backup_retention_days __props__.__dict__["create_mode"] = create_mode + if customer_managed_key is not None and not isinstance(customer_managed_key, FlexibleServerCustomerManagedKeyArgs): + customer_managed_key = customer_managed_key or {} + def _setter(key, value): + customer_managed_key[key] = value + FlexibleServerCustomerManagedKeyArgs._configure(_setter, **customer_managed_key) __props__.__dict__["customer_managed_key"] = customer_managed_key __props__.__dict__["delegated_subnet_id"] = delegated_subnet_id __props__.__dict__["geo_redundant_backup_enabled"] = geo_redundant_backup_enabled + if high_availability is not None and not isinstance(high_availability, FlexibleServerHighAvailabilityArgs): + high_availability = high_availability or {} + def _setter(key, value): + high_availability[key] = value + FlexibleServerHighAvailabilityArgs._configure(_setter, **high_availability) __props__.__dict__["high_availability"] = high_availability + if identity is not None and not isinstance(identity, FlexibleServerIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + FlexibleServerIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location + if maintenance_window is not None and not isinstance(maintenance_window, FlexibleServerMaintenanceWindowArgs): + maintenance_window = maintenance_window or {} + def _setter(key, value): + maintenance_window[key] = value + FlexibleServerMaintenanceWindowArgs._configure(_setter, **maintenance_window) __props__.__dict__["maintenance_window"] = maintenance_window __props__.__dict__["name"] = name __props__.__dict__["point_in_time_restore_time_in_utc"] = point_in_time_restore_time_in_utc diff --git a/sdk/python/pulumi_azure/postgresql/flexible_server_active_directory_administrator.py b/sdk/python/pulumi_azure/postgresql/flexible_server_active_directory_administrator.py index 93a358b7e3..fbb6362609 100644 --- a/sdk/python/pulumi_azure/postgresql/flexible_server_active_directory_administrator.py +++ b/sdk/python/pulumi_azure/postgresql/flexible_server_active_directory_administrator.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FlexibleServerActiveDirectoryAdministratorArgs', 'FlexibleServerActiveDirectoryAdministrator'] @@ -29,12 +29,57 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created. :param pulumi.Input[str] tenant_id: The Azure Tenant ID. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "principal_name", principal_name) - pulumi.set(__self__, "principal_type", principal_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "tenant_id", tenant_id) + FlexibleServerActiveDirectoryAdministratorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + object_id=object_id, + principal_name=principal_name, + principal_type=principal_type, + resource_group_name=resource_group_name, + server_name=server_name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + object_id: Optional[pulumi.Input[str]] = None, + principal_name: Optional[pulumi.Input[str]] = None, + principal_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if principal_name is None and 'principalName' in kwargs: + principal_name = kwargs['principalName'] + if principal_name is None: + raise TypeError("Missing 'principal_name' argument") + if principal_type is None and 'principalType' in kwargs: + principal_type = kwargs['principalType'] + if principal_type is None: + raise TypeError("Missing 'principal_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("object_id", object_id) + _setter("principal_name", principal_name) + _setter("principal_type", principal_type) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="objectId") @@ -127,18 +172,51 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created. :param pulumi.Input[str] tenant_id: The Azure Tenant ID. Changing this forces a new resource to be created. """ + _FlexibleServerActiveDirectoryAdministratorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + object_id=object_id, + principal_name=principal_name, + principal_type=principal_type, + resource_group_name=resource_group_name, + server_name=server_name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + object_id: Optional[pulumi.Input[str]] = None, + principal_name: Optional[pulumi.Input[str]] = None, + principal_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if principal_name is None and 'principalName' in kwargs: + principal_name = kwargs['principalName'] + if principal_type is None and 'principalType' in kwargs: + principal_type = kwargs['principalType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if principal_name is not None: - pulumi.set(__self__, "principal_name", principal_name) + _setter("principal_name", principal_name) if principal_type is not None: - pulumi.set(__self__, "principal_type", principal_type) + _setter("principal_type", principal_type) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="objectId") @@ -336,6 +414,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FlexibleServerActiveDirectoryAdministratorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/postgresql/flexible_server_configuration.py b/sdk/python/pulumi_azure/postgresql/flexible_server_configuration.py index 379e1e1a77..51a90de753 100644 --- a/sdk/python/pulumi_azure/postgresql/flexible_server_configuration.py +++ b/sdk/python/pulumi_azure/postgresql/flexible_server_configuration.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FlexibleServerConfigurationArgs', 'FlexibleServerConfiguration'] @@ -25,10 +25,31 @@ def __init__(__self__, *, > **Note:** PostgreSQL provides the ability to extend the functionality using azure extensions, with PostgreSQL azure extensions you should specify the `name` value as `azure.extensions` and the `value` you wish to allow in the [extensions list](https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-extensions?WT.mc_id=Portal-Microsoft_Azure_OSSDatabases#postgres-13-extensions). """ - pulumi.set(__self__, "server_id", server_id) - pulumi.set(__self__, "value", value) + FlexibleServerConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + server_id=server_id, + value=value, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server_id: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("server_id", server_id) + _setter("value", value) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="serverId") @@ -83,12 +104,29 @@ def __init__(__self__, *, :param pulumi.Input[str] server_id: The ID of the PostgreSQL Flexible Server where we want to change configuration. Changing this forces a new PostgreSQL Flexible Server Configuration resource. :param pulumi.Input[str] value: Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. """ + _FlexibleServerConfigurationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + server_id=server_id, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -262,6 +300,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FlexibleServerConfigurationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/postgresql/flexible_server_database.py b/sdk/python/pulumi_azure/postgresql/flexible_server_database.py index c13d9339b0..15239f3edd 100644 --- a/sdk/python/pulumi_azure/postgresql/flexible_server_database.py +++ b/sdk/python/pulumi_azure/postgresql/flexible_server_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FlexibleServerDatabaseArgs', 'FlexibleServerDatabase'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] collation: Specifies the Collation for the Azure PostgreSQL Flexible Server Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Defaults to `en_US.utf8`. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. :param pulumi.Input[str] name: The name which should be used for this Azure PostgreSQL Flexible Server Database. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. """ - pulumi.set(__self__, "server_id", server_id) + FlexibleServerDatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + server_id=server_id, + charset=charset, + collation=collation, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + server_id: Optional[pulumi.Input[str]] = None, + charset: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + + _setter("server_id", server_id) if charset is not None: - pulumi.set(__self__, "charset", charset) + _setter("charset", charset) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="serverId") @@ -96,14 +117,33 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Azure PostgreSQL Flexible Server Database. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. :param pulumi.Input[str] server_id: The ID of the Azure PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Database. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. """ + _FlexibleServerDatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + charset=charset, + collation=collation, + name=name, + server_id=server_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + charset: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if charset is not None: - pulumi.set(__self__, "charset", charset) + _setter("charset", charset) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) @property @pulumi.getter @@ -251,6 +291,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FlexibleServerDatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/postgresql/flexible_server_firewall_rule.py b/sdk/python/pulumi_azure/postgresql/flexible_server_firewall_rule.py index 3388c73fbb..2f804a7b5d 100644 --- a/sdk/python/pulumi_azure/postgresql/flexible_server_firewall_rule.py +++ b/sdk/python/pulumi_azure/postgresql/flexible_server_firewall_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FlexibleServerFirewallRuleArgs', 'FlexibleServerFirewallRule'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] start_ip_address: The Start IP Address associated with this PostgreSQL Flexible Server Firewall Rule. :param pulumi.Input[str] name: The name which should be used for this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. """ - pulumi.set(__self__, "end_ip_address", end_ip_address) - pulumi.set(__self__, "server_id", server_id) - pulumi.set(__self__, "start_ip_address", start_ip_address) + FlexibleServerFirewallRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + server_id=server_id, + start_ip_address=start_ip_address, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if end_ip_address is None: + raise TypeError("Missing 'end_ip_address' argument") + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if start_ip_address is None: + raise TypeError("Missing 'start_ip_address' argument") + + _setter("end_ip_address", end_ip_address) + _setter("server_id", server_id) + _setter("start_ip_address", start_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="endIpAddress") @@ -94,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[str] server_id: The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. :param pulumi.Input[str] start_ip_address: The Start IP Address associated with this PostgreSQL Flexible Server Firewall Rule. """ + _FlexibleServerFirewallRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + name=name, + server_id=server_id, + start_ip_address=start_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if end_ip_address is not None: - pulumi.set(__self__, "end_ip_address", end_ip_address) + _setter("end_ip_address", end_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) if start_ip_address is not None: - pulumi.set(__self__, "start_ip_address", start_ip_address) + _setter("start_ip_address", start_ip_address) @property @pulumi.getter(name="endIpAddress") @@ -249,6 +301,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FlexibleServerFirewallRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/postgresql/get_flexible_server.py b/sdk/python/pulumi_azure/postgresql/get_flexible_server.py index 37c311c42e..cedcb8e4fb 100644 --- a/sdk/python/pulumi_azure/postgresql/get_flexible_server.py +++ b/sdk/python/pulumi_azure/postgresql/get_flexible_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/postgresql/get_server.py b/sdk/python/pulumi_azure/postgresql/get_server.py index ac0c16bde9..e6744539d5 100644 --- a/sdk/python/pulumi_azure/postgresql/get_server.py +++ b/sdk/python/pulumi_azure/postgresql/get_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/postgresql/outputs.py b/sdk/python/pulumi_azure/postgresql/outputs.py index 486de1e69e..92521acf0c 100644 --- a/sdk/python/pulumi_azure/postgresql/outputs.py +++ b/sdk/python/pulumi_azure/postgresql/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -56,12 +56,33 @@ def __init__(__self__, *, > **Note:** `tenant_id` is required when `active_directory_auth_enabled` is set to `true`. And it should not be specified when `active_directory_auth_enabled` is set to `false` """ + FlexibleServerAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directory_auth_enabled=active_directory_auth_enabled, + password_auth_enabled=password_auth_enabled, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directory_auth_enabled: Optional[bool] = None, + password_auth_enabled: Optional[bool] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directory_auth_enabled is None and 'activeDirectoryAuthEnabled' in kwargs: + active_directory_auth_enabled = kwargs['activeDirectoryAuthEnabled'] + if password_auth_enabled is None and 'passwordAuthEnabled' in kwargs: + password_auth_enabled = kwargs['passwordAuthEnabled'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if active_directory_auth_enabled is not None: - pulumi.set(__self__, "active_directory_auth_enabled", active_directory_auth_enabled) + _setter("active_directory_auth_enabled", active_directory_auth_enabled) if password_auth_enabled is not None: - pulumi.set(__self__, "password_auth_enabled", password_auth_enabled) + _setter("password_auth_enabled", password_auth_enabled) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="activeDirectoryAuthEnabled") @@ -130,14 +151,39 @@ def __init__(__self__, *, :param str key_vault_key_id: The ID of the Key Vault Key. :param str primary_user_assigned_identity_id: Specifies the primary user managed identity id for a Customer Managed Key. Should be added with `identity_ids`. """ + FlexibleServerCustomerManagedKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + geo_backup_key_vault_key_id=geo_backup_key_vault_key_id, + geo_backup_user_assigned_identity_id=geo_backup_user_assigned_identity_id, + key_vault_key_id=key_vault_key_id, + primary_user_assigned_identity_id=primary_user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + geo_backup_key_vault_key_id: Optional[str] = None, + geo_backup_user_assigned_identity_id: Optional[str] = None, + key_vault_key_id: Optional[str] = None, + primary_user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if geo_backup_key_vault_key_id is None and 'geoBackupKeyVaultKeyId' in kwargs: + geo_backup_key_vault_key_id = kwargs['geoBackupKeyVaultKeyId'] + if geo_backup_user_assigned_identity_id is None and 'geoBackupUserAssignedIdentityId' in kwargs: + geo_backup_user_assigned_identity_id = kwargs['geoBackupUserAssignedIdentityId'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if primary_user_assigned_identity_id is None and 'primaryUserAssignedIdentityId' in kwargs: + primary_user_assigned_identity_id = kwargs['primaryUserAssignedIdentityId'] + if geo_backup_key_vault_key_id is not None: - pulumi.set(__self__, "geo_backup_key_vault_key_id", geo_backup_key_vault_key_id) + _setter("geo_backup_key_vault_key_id", geo_backup_key_vault_key_id) if geo_backup_user_assigned_identity_id is not None: - pulumi.set(__self__, "geo_backup_user_assigned_identity_id", geo_backup_user_assigned_identity_id) + _setter("geo_backup_user_assigned_identity_id", geo_backup_user_assigned_identity_id) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if primary_user_assigned_identity_id is not None: - pulumi.set(__self__, "primary_user_assigned_identity_id", primary_user_assigned_identity_id) + _setter("primary_user_assigned_identity_id", primary_user_assigned_identity_id) @property @pulumi.getter(name="geoBackupKeyVaultKeyId") @@ -199,9 +245,26 @@ def __init__(__self__, *, """ :param str mode: The high availability mode for the PostgreSQL Flexible Server. Possible value are `SameZone` or `ZoneRedundant`. """ - pulumi.set(__self__, "mode", mode) + FlexibleServerHighAvailability._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + standby_availability_zone=standby_availability_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + standby_availability_zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if standby_availability_zone is None and 'standbyAvailabilityZone' in kwargs: + standby_availability_zone = kwargs['standbyAvailabilityZone'] + + _setter("mode", mode) if standby_availability_zone is not None: - pulumi.set(__self__, "standby_availability_zone", standby_availability_zone) + _setter("standby_availability_zone", standby_availability_zone) @property @pulumi.getter @@ -243,8 +306,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: A list of User Assigned Managed Identity IDs to be assigned to this PostgreSQL Flexible Server. Required if used together with `customer_managed_key` block. :param str type: Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Flexible Server. The only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + FlexibleServerIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -295,12 +377,33 @@ def __init__(__self__, *, :param int start_hour: The start hour for maintenance window. Defaults to `0`. :param int start_minute: The start minute for maintenance window. Defaults to `0`. """ + FlexibleServerMaintenanceWindow._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + start_hour=start_hour, + start_minute=start_minute, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[int] = None, + start_hour: Optional[int] = None, + start_minute: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if start_hour is None and 'startHour' in kwargs: + start_hour = kwargs['startHour'] + if start_minute is None and 'startMinute' in kwargs: + start_minute = kwargs['startMinute'] + if day_of_week is not None: - pulumi.set(__self__, "day_of_week", day_of_week) + _setter("day_of_week", day_of_week) if start_hour is not None: - pulumi.set(__self__, "start_hour", start_hour) + _setter("start_hour", start_hour) if start_minute is not None: - pulumi.set(__self__, "start_minute", start_minute) + _setter("start_minute", start_minute) @property @pulumi.getter(name="dayOfWeek") @@ -357,11 +460,32 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ServerIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -434,20 +558,55 @@ def __init__(__self__, *, :param str storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. :param str storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. """ + ServerThreatDetectionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins=email_account_admins, + email_addresses=email_addresses, + enabled=enabled, + retention_days=retention_days, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[Sequence[str]] = None, + email_account_admins: Optional[bool] = None, + email_addresses: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + retention_days: Optional[int] = None, + storage_account_access_key: Optional[str] = None, + storage_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins is None and 'emailAccountAdmins' in kwargs: + email_account_admins = kwargs['emailAccountAdmins'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins is not None: - pulumi.set(__self__, "email_account_admins", email_account_admins) + _setter("email_account_admins", email_account_admins) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") @@ -517,9 +676,34 @@ def __init__(__self__, *, :param str tenant_id: The ID of the Tenant of the System Managed Service Principal assigned to the PostgreSQL Server. :param str type: The identity type of the Managed Identity assigned to the PostgreSQL Server. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetServerIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="principalId") diff --git a/sdk/python/pulumi_azure/postgresql/server.py b/sdk/python/pulumi_azure/postgresql/server.py index b7d704ee12..9b58883df4 100644 --- a/sdk/python/pulumi_azure/postgresql/server.py +++ b/sdk/python/pulumi_azure/postgresql/server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -67,44 +67,135 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input['ServerThreatDetectionPolicyArgs'] threat_detection_policy: Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threat_detection_policy` block supports fields documented below. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "ssl_enforcement_enabled", ssl_enforcement_enabled) - pulumi.set(__self__, "version", version) + ServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + ssl_enforcement_enabled=ssl_enforcement_enabled, + version=version, + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + auto_grow_enabled=auto_grow_enabled, + backup_retention_days=backup_retention_days, + create_mode=create_mode, + creation_source_server_id=creation_source_server_id, + geo_redundant_backup_enabled=geo_redundant_backup_enabled, + identity=identity, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + restore_point_in_time=restore_point_in_time, + ssl_minimal_tls_version_enforced=ssl_minimal_tls_version_enforced, + storage_mb=storage_mb, + tags=tags, + threat_detection_policy=threat_detection_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + ssl_enforcement_enabled: Optional[pulumi.Input[bool]] = None, + version: Optional[pulumi.Input[str]] = None, + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + auto_grow_enabled: Optional[pulumi.Input[bool]] = None, + backup_retention_days: Optional[pulumi.Input[int]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + creation_source_server_id: Optional[pulumi.Input[str]] = None, + geo_redundant_backup_enabled: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['ServerIdentityArgs']] = None, + infrastructure_encryption_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + restore_point_in_time: Optional[pulumi.Input[str]] = None, + ssl_minimal_tls_version_enforced: Optional[pulumi.Input[str]] = None, + storage_mb: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_detection_policy: Optional[pulumi.Input['ServerThreatDetectionPolicyArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if ssl_enforcement_enabled is None and 'sslEnforcementEnabled' in kwargs: + ssl_enforcement_enabled = kwargs['sslEnforcementEnabled'] + if ssl_enforcement_enabled is None: + raise TypeError("Missing 'ssl_enforcement_enabled' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if auto_grow_enabled is None and 'autoGrowEnabled' in kwargs: + auto_grow_enabled = kwargs['autoGrowEnabled'] + if backup_retention_days is None and 'backupRetentionDays' in kwargs: + backup_retention_days = kwargs['backupRetentionDays'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if creation_source_server_id is None and 'creationSourceServerId' in kwargs: + creation_source_server_id = kwargs['creationSourceServerId'] + if geo_redundant_backup_enabled is None and 'geoRedundantBackupEnabled' in kwargs: + geo_redundant_backup_enabled = kwargs['geoRedundantBackupEnabled'] + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if restore_point_in_time is None and 'restorePointInTime' in kwargs: + restore_point_in_time = kwargs['restorePointInTime'] + if ssl_minimal_tls_version_enforced is None and 'sslMinimalTlsVersionEnforced' in kwargs: + ssl_minimal_tls_version_enforced = kwargs['sslMinimalTlsVersionEnforced'] + if storage_mb is None and 'storageMb' in kwargs: + storage_mb = kwargs['storageMb'] + if threat_detection_policy is None and 'threatDetectionPolicy' in kwargs: + threat_detection_policy = kwargs['threatDetectionPolicy'] + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("ssl_enforcement_enabled", ssl_enforcement_enabled) + _setter("version", version) if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_login_password is not None: - pulumi.set(__self__, "administrator_login_password", administrator_login_password) + _setter("administrator_login_password", administrator_login_password) if auto_grow_enabled is not None: - pulumi.set(__self__, "auto_grow_enabled", auto_grow_enabled) + _setter("auto_grow_enabled", auto_grow_enabled) if backup_retention_days is not None: - pulumi.set(__self__, "backup_retention_days", backup_retention_days) + _setter("backup_retention_days", backup_retention_days) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if creation_source_server_id is not None: - pulumi.set(__self__, "creation_source_server_id", creation_source_server_id) + _setter("creation_source_server_id", creation_source_server_id) if geo_redundant_backup_enabled is not None: - pulumi.set(__self__, "geo_redundant_backup_enabled", geo_redundant_backup_enabled) + _setter("geo_redundant_backup_enabled", geo_redundant_backup_enabled) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if restore_point_in_time is not None: - pulumi.set(__self__, "restore_point_in_time", restore_point_in_time) + _setter("restore_point_in_time", restore_point_in_time) if ssl_minimal_tls_version_enforced is not None: - pulumi.set(__self__, "ssl_minimal_tls_version_enforced", ssl_minimal_tls_version_enforced) + _setter("ssl_minimal_tls_version_enforced", ssl_minimal_tls_version_enforced) if storage_mb is not None: - pulumi.set(__self__, "storage_mb", storage_mb) + _setter("storage_mb", storage_mb) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_detection_policy is not None: - pulumi.set(__self__, "threat_detection_policy", threat_detection_policy) + _setter("threat_detection_policy", threat_detection_policy) @property @pulumi.getter(name="resourceGroupName") @@ -421,50 +512,135 @@ def __init__(__self__, *, :param pulumi.Input['ServerThreatDetectionPolicyArgs'] threat_detection_policy: Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threat_detection_policy` block supports fields documented below. :param pulumi.Input[str] version: Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10`, `10.0`, `10.2` and `11`. Changing this forces a new resource to be created. """ + _ServerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + auto_grow_enabled=auto_grow_enabled, + backup_retention_days=backup_retention_days, + create_mode=create_mode, + creation_source_server_id=creation_source_server_id, + fqdn=fqdn, + geo_redundant_backup_enabled=geo_redundant_backup_enabled, + identity=identity, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + restore_point_in_time=restore_point_in_time, + sku_name=sku_name, + ssl_enforcement_enabled=ssl_enforcement_enabled, + ssl_minimal_tls_version_enforced=ssl_minimal_tls_version_enforced, + storage_mb=storage_mb, + tags=tags, + threat_detection_policy=threat_detection_policy, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + auto_grow_enabled: Optional[pulumi.Input[bool]] = None, + backup_retention_days: Optional[pulumi.Input[int]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + creation_source_server_id: Optional[pulumi.Input[str]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + geo_redundant_backup_enabled: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['ServerIdentityArgs']] = None, + infrastructure_encryption_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + restore_point_in_time: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + ssl_enforcement_enabled: Optional[pulumi.Input[bool]] = None, + ssl_minimal_tls_version_enforced: Optional[pulumi.Input[str]] = None, + storage_mb: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_detection_policy: Optional[pulumi.Input['ServerThreatDetectionPolicyArgs']] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if auto_grow_enabled is None and 'autoGrowEnabled' in kwargs: + auto_grow_enabled = kwargs['autoGrowEnabled'] + if backup_retention_days is None and 'backupRetentionDays' in kwargs: + backup_retention_days = kwargs['backupRetentionDays'] + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if creation_source_server_id is None and 'creationSourceServerId' in kwargs: + creation_source_server_id = kwargs['creationSourceServerId'] + if geo_redundant_backup_enabled is None and 'geoRedundantBackupEnabled' in kwargs: + geo_redundant_backup_enabled = kwargs['geoRedundantBackupEnabled'] + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if restore_point_in_time is None and 'restorePointInTime' in kwargs: + restore_point_in_time = kwargs['restorePointInTime'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if ssl_enforcement_enabled is None and 'sslEnforcementEnabled' in kwargs: + ssl_enforcement_enabled = kwargs['sslEnforcementEnabled'] + if ssl_minimal_tls_version_enforced is None and 'sslMinimalTlsVersionEnforced' in kwargs: + ssl_minimal_tls_version_enforced = kwargs['sslMinimalTlsVersionEnforced'] + if storage_mb is None and 'storageMb' in kwargs: + storage_mb = kwargs['storageMb'] + if threat_detection_policy is None and 'threatDetectionPolicy' in kwargs: + threat_detection_policy = kwargs['threatDetectionPolicy'] + if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_login_password is not None: - pulumi.set(__self__, "administrator_login_password", administrator_login_password) + _setter("administrator_login_password", administrator_login_password) if auto_grow_enabled is not None: - pulumi.set(__self__, "auto_grow_enabled", auto_grow_enabled) + _setter("auto_grow_enabled", auto_grow_enabled) if backup_retention_days is not None: - pulumi.set(__self__, "backup_retention_days", backup_retention_days) + _setter("backup_retention_days", backup_retention_days) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if creation_source_server_id is not None: - pulumi.set(__self__, "creation_source_server_id", creation_source_server_id) + _setter("creation_source_server_id", creation_source_server_id) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if geo_redundant_backup_enabled is not None: - pulumi.set(__self__, "geo_redundant_backup_enabled", geo_redundant_backup_enabled) + _setter("geo_redundant_backup_enabled", geo_redundant_backup_enabled) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if restore_point_in_time is not None: - pulumi.set(__self__, "restore_point_in_time", restore_point_in_time) + _setter("restore_point_in_time", restore_point_in_time) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if ssl_enforcement_enabled is not None: - pulumi.set(__self__, "ssl_enforcement_enabled", ssl_enforcement_enabled) + _setter("ssl_enforcement_enabled", ssl_enforcement_enabled) if ssl_minimal_tls_version_enforced is not None: - pulumi.set(__self__, "ssl_minimal_tls_version_enforced", ssl_minimal_tls_version_enforced) + _setter("ssl_minimal_tls_version_enforced", ssl_minimal_tls_version_enforced) if storage_mb is not None: - pulumi.set(__self__, "storage_mb", storage_mb) + _setter("storage_mb", storage_mb) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_detection_policy is not None: - pulumi.set(__self__, "threat_detection_policy", threat_detection_policy) + _setter("threat_detection_policy", threat_detection_policy) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="administratorLogin") @@ -878,6 +1054,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -920,6 +1100,11 @@ def _internal_init(__self__, __props__.__dict__["create_mode"] = create_mode __props__.__dict__["creation_source_server_id"] = creation_source_server_id __props__.__dict__["geo_redundant_backup_enabled"] = geo_redundant_backup_enabled + if identity is not None and not isinstance(identity, ServerIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ServerIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["infrastructure_encryption_enabled"] = infrastructure_encryption_enabled __props__.__dict__["location"] = location @@ -938,6 +1123,11 @@ def _internal_init(__self__, __props__.__dict__["ssl_minimal_tls_version_enforced"] = ssl_minimal_tls_version_enforced __props__.__dict__["storage_mb"] = storage_mb __props__.__dict__["tags"] = tags + if threat_detection_policy is not None and not isinstance(threat_detection_policy, ServerThreatDetectionPolicyArgs): + threat_detection_policy = threat_detection_policy or {} + def _setter(key, value): + threat_detection_policy[key] = value + ServerThreatDetectionPolicyArgs._configure(_setter, **threat_detection_policy) __props__.__dict__["threat_detection_policy"] = threat_detection_policy if version is None and not opts.urn: raise TypeError("Missing required property 'version'") diff --git a/sdk/python/pulumi_azure/postgresql/server_key.py b/sdk/python/pulumi_azure/postgresql/server_key.py index dbe8d2caae..10124acd53 100644 --- a/sdk/python/pulumi_azure/postgresql/server_key.py +++ b/sdk/python/pulumi_azure/postgresql/server_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServerKeyArgs', 'ServerKey'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The URL to a Key Vault Key. :param pulumi.Input[str] server_id: The ID of the PostgreSQL Server. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) - pulumi.set(__self__, "server_id", server_id) + ServerKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + server_id=server_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if server_id is None: + raise TypeError("Missing 'server_id' argument") + + _setter("key_vault_key_id", key_vault_key_id) + _setter("server_id", server_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The URL to a Key Vault Key. :param pulumi.Input[str] server_id: The ID of the PostgreSQL Server. Changing this forces a new resource to be created. """ + _ServerKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + server_id=server_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + server_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if server_id is None and 'serverId' in kwargs: + server_id = kwargs['serverId'] + if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if server_id is not None: - pulumi.set(__self__, "server_id", server_id) + _setter("server_id", server_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -296,6 +334,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerKeyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/postgresql/virtual_network_rule.py b/sdk/python/pulumi_azure/postgresql/virtual_network_rule.py index 5dbd043072..fa5295fc78 100644 --- a/sdk/python/pulumi_azure/postgresql/virtual_network_rule.py +++ b/sdk/python/pulumi_azure/postgresql/virtual_network_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VirtualNetworkRuleArgs', 'VirtualNetworkRule'] @@ -33,13 +33,46 @@ def __init__(__self__, *, 2. Cannot start with a number or hyphen 3. Cannot end with a hyphen """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "subnet_id", subnet_id) + VirtualNetworkRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + server_name=server_name, + subnet_id=subnet_id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + ignore_missing_vnet_service_endpoint: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("subnet_id", subnet_id) if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="resourceGroupName") @@ -130,16 +163,43 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ID of the subnet that the PostgreSQL server will be connected to. """ + _VirtualNetworkRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ignore_missing_vnet_service_endpoint: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="ignoreMissingVnetServiceEndpoint") @@ -341,6 +401,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/powerbi/embedded.py b/sdk/python/pulumi_azure/powerbi/embedded.py index a98999ef62..9007f67200 100644 --- a/sdk/python/pulumi_azure/powerbi/embedded.py +++ b/sdk/python/pulumi_azure/powerbi/embedded.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EmbeddedArgs', 'Embedded'] @@ -31,17 +31,50 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the PowerBI Embedded. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "administrators", administrators) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + EmbeddedArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrators=administrators, + resource_group_name=resource_group_name, + sku_name=sku_name, + location=location, + mode=mode, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrators: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrators is None: + raise TypeError("Missing 'administrators' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + + _setter("administrators", administrators) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -148,20 +181,47 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_name: Sets the PowerBI Embedded's pricing level's SKU. Possible values include: `A1`, `A2`, `A3`, `A4`, `A5`, `A6`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _EmbeddedState._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrators=administrators, + location=location, + mode=mode, + name=name, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrators: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if administrators is not None: - pulumi.set(__self__, "administrators", administrators) + _setter("administrators", administrators) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -337,6 +397,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EmbeddedArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/_inputs.py b/sdk/python/pulumi_azure/privatedns/_inputs.py index 032c125fcf..94bc284ae1 100644 --- a/sdk/python/pulumi_azure/privatedns/_inputs.py +++ b/sdk/python/pulumi_azure/privatedns/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -36,13 +36,44 @@ def __init__(__self__, *, :param pulumi.Input[str] private_ip_address: Specifies a Private Static IP Address for this IP Configuration. :param pulumi.Input[str] private_ip_address_version: The version of the IP Protocol which should be used. At this time the only supported value is `IPv4`. Defaults to `IPv4`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "primary", primary) - pulumi.set(__self__, "subnet_id", subnet_id) + LinkServiceNatIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + primary=primary, + subnet_id=subnet_id, + private_ip_address=private_ip_address, + private_ip_address_version=private_ip_address_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + primary: Optional[pulumi.Input[bool]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + private_ip_address_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address_version is None and 'privateIpAddressVersion' in kwargs: + private_ip_address_version = kwargs['privateIpAddressVersion'] + + _setter("name", name) + _setter("primary", primary) + _setter("subnet_id", subnet_id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_address_version is not None: - pulumi.set(__self__, "private_ip_address_version", private_ip_address_version) + _setter("private_ip_address_version", private_ip_address_version) @property @pulumi.getter @@ -116,8 +147,25 @@ def __init__(__self__, *, :param pulumi.Input[str] exchange: The FQDN of the exchange to MX record points to. :param pulumi.Input[int] preference: The preference of the MX record. """ - pulumi.set(__self__, "exchange", exchange) - pulumi.set(__self__, "preference", preference) + MxRecordRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + exchange=exchange, + preference=preference, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exchange: Optional[pulumi.Input[str]] = None, + preference: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exchange is None: + raise TypeError("Missing 'exchange' argument") + if preference is None: + raise TypeError("Missing 'preference' argument") + + _setter("exchange", exchange) + _setter("preference", preference) @property @pulumi.getter @@ -153,9 +201,26 @@ def __init__(__self__, *, :param pulumi.Input[str] ip_address: DNS server IP address. :param pulumi.Input[int] port: DNS server port. """ - pulumi.set(__self__, "ip_address", ip_address) + ResolverForwardingRuleTargetDnsServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_address=ip_address, + port=port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_address: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + + _setter("ip_address", ip_address) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) @property @pulumi.getter(name="ipAddress") @@ -193,11 +258,34 @@ def __init__(__self__, *, :param pulumi.Input[str] private_ip_address: Private IP address of the IP configuration. :param pulumi.Input[str] private_ip_allocation_method: Private IP address allocation method. Allowed value is `Dynamic`. Defaults to `Dynamic`. """ - pulumi.set(__self__, "subnet_id", subnet_id) + ResolverInboundEndpointIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + private_ip_address=private_ip_address, + private_ip_allocation_method=private_ip_allocation_method, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + private_ip_allocation_method: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_allocation_method is None and 'privateIpAllocationMethod' in kwargs: + private_ip_allocation_method = kwargs['privateIpAllocationMethod'] + + _setter("subnet_id", subnet_id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_allocation_method is not None: - pulumi.set(__self__, "private_ip_allocation_method", private_ip_allocation_method) + _setter("private_ip_allocation_method", private_ip_allocation_method) @property @pulumi.getter(name="subnetId") @@ -249,10 +337,35 @@ def __init__(__self__, *, :param pulumi.Input[str] target: The FQDN of the service. :param pulumi.Input[int] weight: The Weight of the SRV record. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "target", target) - pulumi.set(__self__, "weight", weight) + SRVRecordRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + priority=priority, + target=target, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + priority: Optional[pulumi.Input[int]] = None, + target: Optional[pulumi.Input[str]] = None, + weight: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if target is None: + raise TypeError("Missing 'target' argument") + if weight is None: + raise TypeError("Missing 'weight' argument") + + _setter("port", port) + _setter("priority", priority) + _setter("target", target) + _setter("weight", weight) @property @pulumi.getter @@ -310,7 +423,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] value: The value of the TXT record. Max length: 1024 characters """ - pulumi.set(__self__, "value", value) + TxtRecordRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) @property @pulumi.getter @@ -350,25 +476,68 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Record Set. :param pulumi.Input[int] ttl: The Time To Live of the SOA Record in seconds. Defaults to `3600`. """ - pulumi.set(__self__, "email", email) + ZoneSoaRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + expire_time=expire_time, + fqdn=fqdn, + host_name=host_name, + minimum_ttl=minimum_ttl, + refresh_time=refresh_time, + retry_time=retry_time, + serial_number=serial_number, + tags=tags, + ttl=ttl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input[str]] = None, + expire_time: Optional[pulumi.Input[int]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + host_name: Optional[pulumi.Input[str]] = None, + minimum_ttl: Optional[pulumi.Input[int]] = None, + refresh_time: Optional[pulumi.Input[int]] = None, + retry_time: Optional[pulumi.Input[int]] = None, + serial_number: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + if expire_time is None and 'expireTime' in kwargs: + expire_time = kwargs['expireTime'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if minimum_ttl is None and 'minimumTtl' in kwargs: + minimum_ttl = kwargs['minimumTtl'] + if refresh_time is None and 'refreshTime' in kwargs: + refresh_time = kwargs['refreshTime'] + if retry_time is None and 'retryTime' in kwargs: + retry_time = kwargs['retryTime'] + if serial_number is None and 'serialNumber' in kwargs: + serial_number = kwargs['serialNumber'] + + _setter("email", email) if expire_time is not None: - pulumi.set(__self__, "expire_time", expire_time) + _setter("expire_time", expire_time) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if minimum_ttl is not None: - pulumi.set(__self__, "minimum_ttl", minimum_ttl) + _setter("minimum_ttl", minimum_ttl) if refresh_time is not None: - pulumi.set(__self__, "refresh_time", refresh_time) + _setter("refresh_time", refresh_time) if retry_time is not None: - pulumi.set(__self__, "retry_time", retry_time) + _setter("retry_time", retry_time) if serial_number is not None: - pulumi.set(__self__, "serial_number", serial_number) + _setter("serial_number", serial_number) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/privatedns/a_record.py b/sdk/python/pulumi_azure/privatedns/a_record.py index bd0348a772..efcc8a03d3 100644 --- a/sdk/python/pulumi_azure/privatedns/a_record.py +++ b/sdk/python/pulumi_azure/privatedns/a_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ARecordArgs', 'ARecord'] @@ -29,14 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the DNS A Record. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "records", records) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + ARecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + records=records, + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if records is None: + raise TypeError("Missing 'records' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + + _setter("records", records) + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -131,20 +164,47 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _ARecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -320,6 +380,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ARecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/aaaa_record.py b/sdk/python/pulumi_azure/privatedns/aaaa_record.py index 0b5c1a762b..8eb7b8a129 100644 --- a/sdk/python/pulumi_azure/privatedns/aaaa_record.py +++ b/sdk/python/pulumi_azure/privatedns/aaaa_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AAAARecordArgs', 'AAAARecord'] @@ -29,14 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the DNS A Record. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "records", records) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + AAAARecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + records=records, + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if records is None: + raise TypeError("Missing 'records' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + + _setter("records", records) + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -131,20 +164,47 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _AAAARecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -326,6 +386,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AAAARecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/cname_record.py b/sdk/python/pulumi_azure/privatedns/cname_record.py index 0c0949cfac..6e111a0db6 100644 --- a/sdk/python/pulumi_azure/privatedns/cname_record.py +++ b/sdk/python/pulumi_azure/privatedns/cname_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CnameRecordArgs', 'CnameRecord'] @@ -29,14 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the DNS CNAME Record. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "record", record) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + CnameRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + record=record, + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + record: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if record is None: + raise TypeError("Missing 'record' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + + _setter("record", record) + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -131,20 +164,47 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _CnameRecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + record=record, + resource_group_name=resource_group_name, + tags=tags, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + record: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if record is not None: - pulumi.set(__self__, "record", record) + _setter("record", record) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -320,6 +380,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CnameRecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/get_a_record.py b/sdk/python/pulumi_azure/privatedns/get_a_record.py index 896cefa154..dea881cc05 100644 --- a/sdk/python/pulumi_azure/privatedns/get_a_record.py +++ b/sdk/python/pulumi_azure/privatedns/get_a_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/privatedns/get_aaaa_record.py b/sdk/python/pulumi_azure/privatedns/get_aaaa_record.py index bc7e500af2..c815adb8d4 100644 --- a/sdk/python/pulumi_azure/privatedns/get_aaaa_record.py +++ b/sdk/python/pulumi_azure/privatedns/get_aaaa_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/privatedns/get_cname_record.py b/sdk/python/pulumi_azure/privatedns/get_cname_record.py index ef5f12c754..a7806ab732 100644 --- a/sdk/python/pulumi_azure/privatedns/get_cname_record.py +++ b/sdk/python/pulumi_azure/privatedns/get_cname_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/privatedns/get_dns_zone.py b/sdk/python/pulumi_azure/privatedns/get_dns_zone.py index 5de1eb4b10..aca013ee97 100644 --- a/sdk/python/pulumi_azure/privatedns/get_dns_zone.py +++ b/sdk/python/pulumi_azure/privatedns/get_dns_zone.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/privatedns/get_mx_record.py b/sdk/python/pulumi_azure/privatedns/get_mx_record.py index 483c7957f5..9b22ccd190 100644 --- a/sdk/python/pulumi_azure/privatedns/get_mx_record.py +++ b/sdk/python/pulumi_azure/privatedns/get_mx_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/privatedns/get_ptr_record.py b/sdk/python/pulumi_azure/privatedns/get_ptr_record.py index 963d626112..978053883d 100644 --- a/sdk/python/pulumi_azure/privatedns/get_ptr_record.py +++ b/sdk/python/pulumi_azure/privatedns/get_ptr_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/privatedns/get_resolver.py b/sdk/python/pulumi_azure/privatedns/get_resolver.py index b50c04e11f..615e80e98e 100644 --- a/sdk/python/pulumi_azure/privatedns/get_resolver.py +++ b/sdk/python/pulumi_azure/privatedns/get_resolver.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/privatedns/get_resolver_dns_forwarding_ruleset.py b/sdk/python/pulumi_azure/privatedns/get_resolver_dns_forwarding_ruleset.py index 73d6f4ea48..43483b94fb 100644 --- a/sdk/python/pulumi_azure/privatedns/get_resolver_dns_forwarding_ruleset.py +++ b/sdk/python/pulumi_azure/privatedns/get_resolver_dns_forwarding_ruleset.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/privatedns/get_resolver_forwarding_rule.py b/sdk/python/pulumi_azure/privatedns/get_resolver_forwarding_rule.py index b64f51b02f..00b12d8c99 100644 --- a/sdk/python/pulumi_azure/privatedns/get_resolver_forwarding_rule.py +++ b/sdk/python/pulumi_azure/privatedns/get_resolver_forwarding_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/privatedns/get_resolver_inbound_endpoint.py b/sdk/python/pulumi_azure/privatedns/get_resolver_inbound_endpoint.py index 8631426016..e4afdfda09 100644 --- a/sdk/python/pulumi_azure/privatedns/get_resolver_inbound_endpoint.py +++ b/sdk/python/pulumi_azure/privatedns/get_resolver_inbound_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/privatedns/get_resolver_outbound_endpoint.py b/sdk/python/pulumi_azure/privatedns/get_resolver_outbound_endpoint.py index 1c96d37ae7..bfc53ec838 100644 --- a/sdk/python/pulumi_azure/privatedns/get_resolver_outbound_endpoint.py +++ b/sdk/python/pulumi_azure/privatedns/get_resolver_outbound_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/privatedns/get_resolver_virtual_network_link.py b/sdk/python/pulumi_azure/privatedns/get_resolver_virtual_network_link.py index bf5c9250bd..e2c64309c9 100644 --- a/sdk/python/pulumi_azure/privatedns/get_resolver_virtual_network_link.py +++ b/sdk/python/pulumi_azure/privatedns/get_resolver_virtual_network_link.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/privatedns/get_soa_record.py b/sdk/python/pulumi_azure/privatedns/get_soa_record.py index db2844e9fb..c01f0cb9e1 100644 --- a/sdk/python/pulumi_azure/privatedns/get_soa_record.py +++ b/sdk/python/pulumi_azure/privatedns/get_soa_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/privatedns/get_srv_record.py b/sdk/python/pulumi_azure/privatedns/get_srv_record.py index d647baab7e..9e76fe1c91 100644 --- a/sdk/python/pulumi_azure/privatedns/get_srv_record.py +++ b/sdk/python/pulumi_azure/privatedns/get_srv_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/privatedns/get_txt_record.py b/sdk/python/pulumi_azure/privatedns/get_txt_record.py index 8de0f6dad1..e81dd1a776 100644 --- a/sdk/python/pulumi_azure/privatedns/get_txt_record.py +++ b/sdk/python/pulumi_azure/privatedns/get_txt_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/privatedns/get_zone_virtual_network_link.py b/sdk/python/pulumi_azure/privatedns/get_zone_virtual_network_link.py index 9cded8b045..f9871e143f 100644 --- a/sdk/python/pulumi_azure/privatedns/get_zone_virtual_network_link.py +++ b/sdk/python/pulumi_azure/privatedns/get_zone_virtual_network_link.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/privatedns/link_service.py b/sdk/python/pulumi_azure/privatedns/link_service.py index 41cc33ad7d..1f74a792a0 100644 --- a/sdk/python/pulumi_azure/privatedns/link_service.py +++ b/sdk/python/pulumi_azure/privatedns/link_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,23 +41,70 @@ def __init__(__self__, *, > **NOTE:** If no Subscription IDs are specified then Azure allows every Subscription to see this Private Link Service. """ - pulumi.set(__self__, "load_balancer_frontend_ip_configuration_ids", load_balancer_frontend_ip_configuration_ids) - pulumi.set(__self__, "nat_ip_configurations", nat_ip_configurations) - pulumi.set(__self__, "resource_group_name", resource_group_name) + LinkServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + load_balancer_frontend_ip_configuration_ids=load_balancer_frontend_ip_configuration_ids, + nat_ip_configurations=nat_ip_configurations, + resource_group_name=resource_group_name, + auto_approval_subscription_ids=auto_approval_subscription_ids, + enable_proxy_protocol=enable_proxy_protocol, + fqdns=fqdns, + location=location, + name=name, + tags=tags, + visibility_subscription_ids=visibility_subscription_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + load_balancer_frontend_ip_configuration_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + nat_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['LinkServiceNatIpConfigurationArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + auto_approval_subscription_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enable_proxy_protocol: Optional[pulumi.Input[bool]] = None, + fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + visibility_subscription_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if load_balancer_frontend_ip_configuration_ids is None and 'loadBalancerFrontendIpConfigurationIds' in kwargs: + load_balancer_frontend_ip_configuration_ids = kwargs['loadBalancerFrontendIpConfigurationIds'] + if load_balancer_frontend_ip_configuration_ids is None: + raise TypeError("Missing 'load_balancer_frontend_ip_configuration_ids' argument") + if nat_ip_configurations is None and 'natIpConfigurations' in kwargs: + nat_ip_configurations = kwargs['natIpConfigurations'] + if nat_ip_configurations is None: + raise TypeError("Missing 'nat_ip_configurations' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if auto_approval_subscription_ids is None and 'autoApprovalSubscriptionIds' in kwargs: + auto_approval_subscription_ids = kwargs['autoApprovalSubscriptionIds'] + if enable_proxy_protocol is None and 'enableProxyProtocol' in kwargs: + enable_proxy_protocol = kwargs['enableProxyProtocol'] + if visibility_subscription_ids is None and 'visibilitySubscriptionIds' in kwargs: + visibility_subscription_ids = kwargs['visibilitySubscriptionIds'] + + _setter("load_balancer_frontend_ip_configuration_ids", load_balancer_frontend_ip_configuration_ids) + _setter("nat_ip_configurations", nat_ip_configurations) + _setter("resource_group_name", resource_group_name) if auto_approval_subscription_ids is not None: - pulumi.set(__self__, "auto_approval_subscription_ids", auto_approval_subscription_ids) + _setter("auto_approval_subscription_ids", auto_approval_subscription_ids) if enable_proxy_protocol is not None: - pulumi.set(__self__, "enable_proxy_protocol", enable_proxy_protocol) + _setter("enable_proxy_protocol", enable_proxy_protocol) if fqdns is not None: - pulumi.set(__self__, "fqdns", fqdns) + _setter("fqdns", fqdns) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if visibility_subscription_ids is not None: - pulumi.set(__self__, "visibility_subscription_ids", visibility_subscription_ids) + _setter("visibility_subscription_ids", visibility_subscription_ids) @property @pulumi.getter(name="loadBalancerFrontendIpConfigurationIds") @@ -212,28 +259,71 @@ def __init__(__self__, *, > **NOTE:** If no Subscription IDs are specified then Azure allows every Subscription to see this Private Link Service. """ + _LinkServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alias=alias, + auto_approval_subscription_ids=auto_approval_subscription_ids, + enable_proxy_protocol=enable_proxy_protocol, + fqdns=fqdns, + load_balancer_frontend_ip_configuration_ids=load_balancer_frontend_ip_configuration_ids, + location=location, + name=name, + nat_ip_configurations=nat_ip_configurations, + resource_group_name=resource_group_name, + tags=tags, + visibility_subscription_ids=visibility_subscription_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alias: Optional[pulumi.Input[str]] = None, + auto_approval_subscription_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enable_proxy_protocol: Optional[pulumi.Input[bool]] = None, + fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + load_balancer_frontend_ip_configuration_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + nat_ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['LinkServiceNatIpConfigurationArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + visibility_subscription_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_approval_subscription_ids is None and 'autoApprovalSubscriptionIds' in kwargs: + auto_approval_subscription_ids = kwargs['autoApprovalSubscriptionIds'] + if enable_proxy_protocol is None and 'enableProxyProtocol' in kwargs: + enable_proxy_protocol = kwargs['enableProxyProtocol'] + if load_balancer_frontend_ip_configuration_ids is None and 'loadBalancerFrontendIpConfigurationIds' in kwargs: + load_balancer_frontend_ip_configuration_ids = kwargs['loadBalancerFrontendIpConfigurationIds'] + if nat_ip_configurations is None and 'natIpConfigurations' in kwargs: + nat_ip_configurations = kwargs['natIpConfigurations'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if visibility_subscription_ids is None and 'visibilitySubscriptionIds' in kwargs: + visibility_subscription_ids = kwargs['visibilitySubscriptionIds'] + if alias is not None: - pulumi.set(__self__, "alias", alias) + _setter("alias", alias) if auto_approval_subscription_ids is not None: - pulumi.set(__self__, "auto_approval_subscription_ids", auto_approval_subscription_ids) + _setter("auto_approval_subscription_ids", auto_approval_subscription_ids) if enable_proxy_protocol is not None: - pulumi.set(__self__, "enable_proxy_protocol", enable_proxy_protocol) + _setter("enable_proxy_protocol", enable_proxy_protocol) if fqdns is not None: - pulumi.set(__self__, "fqdns", fqdns) + _setter("fqdns", fqdns) if load_balancer_frontend_ip_configuration_ids is not None: - pulumi.set(__self__, "load_balancer_frontend_ip_configuration_ids", load_balancer_frontend_ip_configuration_ids) + _setter("load_balancer_frontend_ip_configuration_ids", load_balancer_frontend_ip_configuration_ids) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if nat_ip_configurations is not None: - pulumi.set(__self__, "nat_ip_configurations", nat_ip_configurations) + _setter("nat_ip_configurations", nat_ip_configurations) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if visibility_subscription_ids is not None: - pulumi.set(__self__, "visibility_subscription_ids", visibility_subscription_ids) + _setter("visibility_subscription_ids", visibility_subscription_ids) @property @pulumi.getter @@ -549,6 +639,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/mx_record.py b/sdk/python/pulumi_azure/privatedns/mx_record.py index c982ce3403..a86dce75d3 100644 --- a/sdk/python/pulumi_azure/privatedns/mx_record.py +++ b/sdk/python/pulumi_azure/privatedns/mx_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,14 +31,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the DNS MX Record. Changing this forces a new resource to be created. Default to '@' for root zone entry. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "records", records) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + MxRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + records=records, + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + records: Optional[pulumi.Input[Sequence[pulumi.Input['MxRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if records is None: + raise TypeError("Missing 'records' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + + _setter("records", records) + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -133,20 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _MxRecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input['MxRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -346,6 +406,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MxRecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/outputs.py b/sdk/python/pulumi_azure/privatedns/outputs.py index 19bf062185..e5ac17fac7 100644 --- a/sdk/python/pulumi_azure/privatedns/outputs.py +++ b/sdk/python/pulumi_azure/privatedns/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -62,13 +62,44 @@ def __init__(__self__, *, :param str private_ip_address: Specifies a Private Static IP Address for this IP Configuration. :param str private_ip_address_version: The version of the IP Protocol which should be used. At this time the only supported value is `IPv4`. Defaults to `IPv4`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "primary", primary) - pulumi.set(__self__, "subnet_id", subnet_id) + LinkServiceNatIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + primary=primary, + subnet_id=subnet_id, + private_ip_address=private_ip_address, + private_ip_address_version=private_ip_address_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + primary: Optional[bool] = None, + subnet_id: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_address_version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address_version is None and 'privateIpAddressVersion' in kwargs: + private_ip_address_version = kwargs['privateIpAddressVersion'] + + _setter("name", name) + _setter("primary", primary) + _setter("subnet_id", subnet_id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_address_version is not None: - pulumi.set(__self__, "private_ip_address_version", private_ip_address_version) + _setter("private_ip_address_version", private_ip_address_version) @property @pulumi.getter @@ -122,8 +153,25 @@ def __init__(__self__, *, :param str exchange: The FQDN of the exchange to MX record points to. :param int preference: The preference of the MX record. """ - pulumi.set(__self__, "exchange", exchange) - pulumi.set(__self__, "preference", preference) + MxRecordRecord._configure( + lambda key, value: pulumi.set(__self__, key, value), + exchange=exchange, + preference=preference, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exchange: Optional[str] = None, + preference: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exchange is None: + raise TypeError("Missing 'exchange' argument") + if preference is None: + raise TypeError("Missing 'preference' argument") + + _setter("exchange", exchange) + _setter("preference", preference) @property @pulumi.getter @@ -168,9 +216,26 @@ def __init__(__self__, *, :param str ip_address: DNS server IP address. :param int port: DNS server port. """ - pulumi.set(__self__, "ip_address", ip_address) + ResolverForwardingRuleTargetDnsServer._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_address=ip_address, + port=port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_address: Optional[str] = None, + port: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + + _setter("ip_address", ip_address) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) @property @pulumi.getter(name="ipAddress") @@ -221,11 +286,34 @@ def __init__(__self__, *, :param str private_ip_address: Private IP address of the IP configuration. :param str private_ip_allocation_method: Private IP address allocation method. Allowed value is `Dynamic`. Defaults to `Dynamic`. """ - pulumi.set(__self__, "subnet_id", subnet_id) + ResolverInboundEndpointIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + private_ip_address=private_ip_address, + private_ip_allocation_method=private_ip_allocation_method, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_allocation_method is None and 'privateIpAllocationMethod' in kwargs: + private_ip_allocation_method = kwargs['privateIpAllocationMethod'] + + _setter("subnet_id", subnet_id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if private_ip_allocation_method is not None: - pulumi.set(__self__, "private_ip_allocation_method", private_ip_allocation_method) + _setter("private_ip_allocation_method", private_ip_allocation_method) @property @pulumi.getter(name="subnetId") @@ -265,10 +353,35 @@ def __init__(__self__, *, :param str target: The FQDN of the service. :param int weight: The Weight of the SRV record. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "target", target) - pulumi.set(__self__, "weight", weight) + SRVRecordRecord._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + priority=priority, + target=target, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + priority: Optional[int] = None, + target: Optional[str] = None, + weight: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if target is None: + raise TypeError("Missing 'target' argument") + if weight is None: + raise TypeError("Missing 'weight' argument") + + _setter("port", port) + _setter("priority", priority) + _setter("target", target) + _setter("weight", weight) @property @pulumi.getter @@ -310,7 +423,20 @@ def __init__(__self__, *, """ :param str value: The value of the TXT record. Max length: 1024 characters """ - pulumi.set(__self__, "value", value) + TxtRecordRecord._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) @property @pulumi.getter @@ -373,25 +499,68 @@ def __init__(__self__, *, :param Mapping[str, str] tags: A mapping of tags to assign to the Record Set. :param int ttl: The Time To Live of the SOA Record in seconds. Defaults to `3600`. """ - pulumi.set(__self__, "email", email) + ZoneSoaRecord._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + expire_time=expire_time, + fqdn=fqdn, + host_name=host_name, + minimum_ttl=minimum_ttl, + refresh_time=refresh_time, + retry_time=retry_time, + serial_number=serial_number, + tags=tags, + ttl=ttl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[str] = None, + expire_time: Optional[int] = None, + fqdn: Optional[str] = None, + host_name: Optional[str] = None, + minimum_ttl: Optional[int] = None, + refresh_time: Optional[int] = None, + retry_time: Optional[int] = None, + serial_number: Optional[int] = None, + tags: Optional[Mapping[str, str]] = None, + ttl: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is None: + raise TypeError("Missing 'email' argument") + if expire_time is None and 'expireTime' in kwargs: + expire_time = kwargs['expireTime'] + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if minimum_ttl is None and 'minimumTtl' in kwargs: + minimum_ttl = kwargs['minimumTtl'] + if refresh_time is None and 'refreshTime' in kwargs: + refresh_time = kwargs['refreshTime'] + if retry_time is None and 'retryTime' in kwargs: + retry_time = kwargs['retryTime'] + if serial_number is None and 'serialNumber' in kwargs: + serial_number = kwargs['serialNumber'] + + _setter("email", email) if expire_time is not None: - pulumi.set(__self__, "expire_time", expire_time) + _setter("expire_time", expire_time) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if host_name is not None: - pulumi.set(__self__, "host_name", host_name) + _setter("host_name", host_name) if minimum_ttl is not None: - pulumi.set(__self__, "minimum_ttl", minimum_ttl) + _setter("minimum_ttl", minimum_ttl) if refresh_time is not None: - pulumi.set(__self__, "refresh_time", refresh_time) + _setter("refresh_time", refresh_time) if retry_time is not None: - pulumi.set(__self__, "retry_time", retry_time) + _setter("retry_time", retry_time) if serial_number is not None: - pulumi.set(__self__, "serial_number", serial_number) + _setter("serial_number", serial_number) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) @property @pulumi.getter @@ -483,8 +652,25 @@ def __init__(__self__, *, :param str exchange: The mail server responsible for the domain covered by the MX record. :param int preference: String representing the "preference” value of the MX records. Records with lower preference value take priority. """ - pulumi.set(__self__, "exchange", exchange) - pulumi.set(__self__, "preference", preference) + GetMxRecordRecordResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + exchange=exchange, + preference=preference, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exchange: Optional[str] = None, + preference: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exchange is None: + raise TypeError("Missing 'exchange' argument") + if preference is None: + raise TypeError("Missing 'preference' argument") + + _setter("exchange", exchange) + _setter("preference", preference) @property @pulumi.getter @@ -512,8 +698,27 @@ def __init__(__self__, *, :param str ip_address: The DNS server IP address. :param int port: The DNS server port. """ - pulumi.set(__self__, "ip_address", ip_address) - pulumi.set(__self__, "port", port) + GetResolverForwardingRuleTargetDnsServerResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_address=ip_address, + port=port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_address: Optional[str] = None, + port: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if ip_address is None: + raise TypeError("Missing 'ip_address' argument") + if port is None: + raise TypeError("Missing 'port' argument") + + _setter("ip_address", ip_address) + _setter("port", port) @property @pulumi.getter(name="ipAddress") @@ -543,9 +748,36 @@ def __init__(__self__, *, :param str private_ip_allocation_method: The private IP address allocation method. :param str subnet_id: The subnet ID of the IP configuration. """ - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "private_ip_allocation_method", private_ip_allocation_method) - pulumi.set(__self__, "subnet_id", subnet_id) + GetResolverInboundEndpointIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_ip_address=private_ip_address, + private_ip_allocation_method=private_ip_allocation_method, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if private_ip_allocation_method is None and 'privateIpAllocationMethod' in kwargs: + private_ip_allocation_method = kwargs['privateIpAllocationMethod'] + if private_ip_allocation_method is None: + raise TypeError("Missing 'private_ip_allocation_method' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("private_ip_address", private_ip_address) + _setter("private_ip_allocation_method", private_ip_allocation_method) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="privateIpAddress") @@ -585,10 +817,35 @@ def __init__(__self__, *, :param str target: FQDN of the service. :param int weight: Weight of the SRV record. """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "target", target) - pulumi.set(__self__, "weight", weight) + GetSrvRecordRecordResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + priority=priority, + target=target, + weight=weight, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + priority: Optional[int] = None, + target: Optional[str] = None, + weight: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if target is None: + raise TypeError("Missing 'target' argument") + if weight is None: + raise TypeError("Missing 'weight' argument") + + _setter("port", port) + _setter("priority", priority) + _setter("target", target) + _setter("weight", weight) @property @pulumi.getter @@ -630,7 +887,20 @@ def __init__(__self__, *, """ :param str value: The value of the record. Max length: 1024 characters """ - pulumi.set(__self__, "value", value) + GetTxtRecordRecordResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("value", value) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/privatedns/ptr_record.py b/sdk/python/pulumi_azure/privatedns/ptr_record.py index 7601524f36..da3785ac9a 100644 --- a/sdk/python/pulumi_azure/privatedns/ptr_record.py +++ b/sdk/python/pulumi_azure/privatedns/ptr_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PTRRecordArgs', 'PTRRecord'] @@ -29,14 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the DNS PTR Record. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "records", records) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + PTRRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + records=records, + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if records is None: + raise TypeError("Missing 'records' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + + _setter("records", records) + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -131,20 +164,47 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _PTRRecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -320,6 +380,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PTRRecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/resolver.py b/sdk/python/pulumi_azure/privatedns/resolver.py index c6066c6996..f5ce839ca4 100644 --- a/sdk/python/pulumi_azure/privatedns/resolver.py +++ b/sdk/python/pulumi_azure/privatedns/resolver.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ResolverArgs', 'Resolver'] @@ -27,14 +27,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Private DNS Resolver. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + ResolverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + virtual_network_id=virtual_network_id, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if virtual_network_id is None: + raise TypeError("Missing 'virtual_network_id' argument") + + _setter("resource_group_name", resource_group_name) + _setter("virtual_network_id", virtual_network_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -113,16 +140,39 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Private DNS Resolver. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network that is linked to the Private DNS Resolver. Changing this forces a new Private DNS Resolver to be created. """ + _ResolverState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -276,6 +326,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResolverArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/resolver_dns_forwarding_ruleset.py b/sdk/python/pulumi_azure/privatedns/resolver_dns_forwarding_ruleset.py index 62cfcb51b6..fe10014612 100644 --- a/sdk/python/pulumi_azure/privatedns/resolver_dns_forwarding_ruleset.py +++ b/sdk/python/pulumi_azure/privatedns/resolver_dns_forwarding_ruleset.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ResolverDnsForwardingRulesetArgs', 'ResolverDnsForwardingRuleset'] @@ -27,14 +27,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Private DNS Resolver Dns Forwarding Ruleset. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Private DNS Resolver Dns Forwarding Ruleset. """ - pulumi.set(__self__, "private_dns_resolver_outbound_endpoint_ids", private_dns_resolver_outbound_endpoint_ids) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ResolverDnsForwardingRulesetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_dns_resolver_outbound_endpoint_ids=private_dns_resolver_outbound_endpoint_ids, + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_dns_resolver_outbound_endpoint_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_dns_resolver_outbound_endpoint_ids is None and 'privateDnsResolverOutboundEndpointIds' in kwargs: + private_dns_resolver_outbound_endpoint_ids = kwargs['privateDnsResolverOutboundEndpointIds'] + if private_dns_resolver_outbound_endpoint_ids is None: + raise TypeError("Missing 'private_dns_resolver_outbound_endpoint_ids' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("private_dns_resolver_outbound_endpoint_ids", private_dns_resolver_outbound_endpoint_ids) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="privateDnsResolverOutboundEndpointIds") @@ -113,16 +140,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group where the Private DNS Resolver Dns Forwarding Ruleset should exist. Changing this forces a new Private DNS Resolver Dns Forwarding Ruleset to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Private DNS Resolver Dns Forwarding Ruleset. """ + _ResolverDnsForwardingRulesetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + private_dns_resolver_outbound_endpoint_ids=private_dns_resolver_outbound_endpoint_ids, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_dns_resolver_outbound_endpoint_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_dns_resolver_outbound_endpoint_ids is None and 'privateDnsResolverOutboundEndpointIds' in kwargs: + private_dns_resolver_outbound_endpoint_ids = kwargs['privateDnsResolverOutboundEndpointIds'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_dns_resolver_outbound_endpoint_ids is not None: - pulumi.set(__self__, "private_dns_resolver_outbound_endpoint_ids", private_dns_resolver_outbound_endpoint_ids) + _setter("private_dns_resolver_outbound_endpoint_ids", private_dns_resolver_outbound_endpoint_ids) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -326,6 +376,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResolverDnsForwardingRulesetArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/resolver_forwarding_rule.py b/sdk/python/pulumi_azure/privatedns/resolver_forwarding_rule.py index fe27c796dd..615126b91c 100644 --- a/sdk/python/pulumi_azure/privatedns/resolver_forwarding_rule.py +++ b/sdk/python/pulumi_azure/privatedns/resolver_forwarding_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,15 +31,48 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] metadata: Metadata attached to the Private DNS Resolver Forwarding Rule. :param pulumi.Input[str] name: Specifies the name which should be used for this Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created. """ - pulumi.set(__self__, "dns_forwarding_ruleset_id", dns_forwarding_ruleset_id) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "target_dns_servers", target_dns_servers) + ResolverForwardingRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_forwarding_ruleset_id=dns_forwarding_ruleset_id, + domain_name=domain_name, + target_dns_servers=target_dns_servers, + enabled=enabled, + metadata=metadata, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_forwarding_ruleset_id: Optional[pulumi.Input[str]] = None, + domain_name: Optional[pulumi.Input[str]] = None, + target_dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input['ResolverForwardingRuleTargetDnsServerArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_forwarding_ruleset_id is None and 'dnsForwardingRulesetId' in kwargs: + dns_forwarding_ruleset_id = kwargs['dnsForwardingRulesetId'] + if dns_forwarding_ruleset_id is None: + raise TypeError("Missing 'dns_forwarding_ruleset_id' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if target_dns_servers is None and 'targetDnsServers' in kwargs: + target_dns_servers = kwargs['targetDnsServers'] + if target_dns_servers is None: + raise TypeError("Missing 'target_dns_servers' argument") + + _setter("dns_forwarding_ruleset_id", dns_forwarding_ruleset_id) + _setter("domain_name", domain_name) + _setter("target_dns_servers", target_dns_servers) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="dnsForwardingRulesetId") @@ -132,18 +165,45 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Private DNS Resolver Forwarding Rule. Changing this forces a new Private DNS Resolver Forwarding Rule to be created. :param pulumi.Input[Sequence[pulumi.Input['ResolverForwardingRuleTargetDnsServerArgs']]] target_dns_servers: Can be specified multiple times to define multiple target DNS servers. Each `target_dns_servers` block as defined below. """ + _ResolverForwardingRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_forwarding_ruleset_id=dns_forwarding_ruleset_id, + domain_name=domain_name, + enabled=enabled, + metadata=metadata, + name=name, + target_dns_servers=target_dns_servers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_forwarding_ruleset_id: Optional[pulumi.Input[str]] = None, + domain_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + target_dns_servers: Optional[pulumi.Input[Sequence[pulumi.Input['ResolverForwardingRuleTargetDnsServerArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_forwarding_ruleset_id is None and 'dnsForwardingRulesetId' in kwargs: + dns_forwarding_ruleset_id = kwargs['dnsForwardingRulesetId'] + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if target_dns_servers is None and 'targetDnsServers' in kwargs: + target_dns_servers = kwargs['targetDnsServers'] + if dns_forwarding_ruleset_id is not None: - pulumi.set(__self__, "dns_forwarding_ruleset_id", dns_forwarding_ruleset_id) + _setter("dns_forwarding_ruleset_id", dns_forwarding_ruleset_id) if domain_name is not None: - pulumi.set(__self__, "domain_name", domain_name) + _setter("domain_name", domain_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if target_dns_servers is not None: - pulumi.set(__self__, "target_dns_servers", target_dns_servers) + _setter("target_dns_servers", target_dns_servers) @property @pulumi.getter(name="dnsForwardingRulesetId") @@ -377,6 +437,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResolverForwardingRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/resolver_inbound_endpoint.py b/sdk/python/pulumi_azure/privatedns/resolver_inbound_endpoint.py index 77453caa22..249e0a8217 100644 --- a/sdk/python/pulumi_azure/privatedns/resolver_inbound_endpoint.py +++ b/sdk/python/pulumi_azure/privatedns/resolver_inbound_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Private DNS Resolver Inbound Endpoint. """ - pulumi.set(__self__, "ip_configurations", ip_configurations) - pulumi.set(__self__, "private_dns_resolver_id", private_dns_resolver_id) + ResolverInboundEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + private_dns_resolver_id=private_dns_resolver_id, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ResolverInboundEndpointIpConfigurationArgs']]]] = None, + private_dns_resolver_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if ip_configurations is None: + raise TypeError("Missing 'ip_configurations' argument") + if private_dns_resolver_id is None and 'privateDnsResolverId' in kwargs: + private_dns_resolver_id = kwargs['privateDnsResolverId'] + if private_dns_resolver_id is None: + raise TypeError("Missing 'private_dns_resolver_id' argument") + + _setter("ip_configurations", ip_configurations) + _setter("private_dns_resolver_id", private_dns_resolver_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="ipConfigurations") @@ -115,16 +142,39 @@ def __init__(__self__, *, :param pulumi.Input[str] private_dns_resolver_id: Specifies the ID of the Private DNS Resolver Inbound Endpoint. Changing this forces a new Private DNS Resolver Inbound Endpoint to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Private DNS Resolver Inbound Endpoint. """ + _ResolverInboundEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + ip_configurations=ip_configurations, + location=location, + name=name, + private_dns_resolver_id=private_dns_resolver_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['ResolverInboundEndpointIpConfigurationArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_dns_resolver_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if private_dns_resolver_id is None and 'privateDnsResolverId' in kwargs: + private_dns_resolver_id = kwargs['privateDnsResolverId'] + if ip_configurations is not None: - pulumi.set(__self__, "ip_configurations", ip_configurations) + _setter("ip_configurations", ip_configurations) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_dns_resolver_id is not None: - pulumi.set(__self__, "private_dns_resolver_id", private_dns_resolver_id) + _setter("private_dns_resolver_id", private_dns_resolver_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="ipConfigurations") @@ -320,6 +370,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResolverInboundEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/resolver_outbound_endpoint.py b/sdk/python/pulumi_azure/privatedns/resolver_outbound_endpoint.py index e761ceb7f9..ba5e79223c 100644 --- a/sdk/python/pulumi_azure/privatedns/resolver_outbound_endpoint.py +++ b/sdk/python/pulumi_azure/privatedns/resolver_outbound_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ResolverOutboundEndpointArgs', 'ResolverOutboundEndpoint'] @@ -27,14 +27,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Private DNS Resolver Outbound Endpoint. Changing this forces a new Private DNS Resolver Outbound Endpoint to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Private DNS Resolver Outbound Endpoint. """ - pulumi.set(__self__, "private_dns_resolver_id", private_dns_resolver_id) - pulumi.set(__self__, "subnet_id", subnet_id) + ResolverOutboundEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_dns_resolver_id=private_dns_resolver_id, + subnet_id=subnet_id, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_dns_resolver_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_dns_resolver_id is None and 'privateDnsResolverId' in kwargs: + private_dns_resolver_id = kwargs['privateDnsResolverId'] + if private_dns_resolver_id is None: + raise TypeError("Missing 'private_dns_resolver_id' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("private_dns_resolver_id", private_dns_resolver_id) + _setter("subnet_id", subnet_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="privateDnsResolverId") @@ -113,16 +140,39 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet that is linked to the Private DNS Resolver Outbound Endpoint. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Private DNS Resolver Outbound Endpoint. """ + _ResolverOutboundEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + private_dns_resolver_id=private_dns_resolver_id, + subnet_id=subnet_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_dns_resolver_id: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_dns_resolver_id is None and 'privateDnsResolverId' in kwargs: + private_dns_resolver_id = kwargs['privateDnsResolverId'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_dns_resolver_id is not None: - pulumi.set(__self__, "private_dns_resolver_id", private_dns_resolver_id) + _setter("private_dns_resolver_id", private_dns_resolver_id) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -312,6 +362,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResolverOutboundEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/resolver_virtual_network_link.py b/sdk/python/pulumi_azure/privatedns/resolver_virtual_network_link.py index 46e352dc9f..3291fe1850 100644 --- a/sdk/python/pulumi_azure/privatedns/resolver_virtual_network_link.py +++ b/sdk/python/pulumi_azure/privatedns/resolver_virtual_network_link.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ResolverVirtualNetworkLinkArgs', 'ResolverVirtualNetworkLink'] @@ -25,12 +25,37 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] metadata: Metadata attached to the Private DNS Resolver Virtual Network Link. :param pulumi.Input[str] name: Specifies the name which should be used for this Private DNS Resolver Virtual Network Link. Changing this forces a new Private DNS Resolver Virtual Network Link to be created. """ - pulumi.set(__self__, "dns_forwarding_ruleset_id", dns_forwarding_ruleset_id) - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + ResolverVirtualNetworkLinkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_forwarding_ruleset_id=dns_forwarding_ruleset_id, + virtual_network_id=virtual_network_id, + metadata=metadata, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_forwarding_ruleset_id: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_forwarding_ruleset_id is None and 'dnsForwardingRulesetId' in kwargs: + dns_forwarding_ruleset_id = kwargs['dnsForwardingRulesetId'] + if dns_forwarding_ruleset_id is None: + raise TypeError("Missing 'dns_forwarding_ruleset_id' argument") + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if virtual_network_id is None: + raise TypeError("Missing 'virtual_network_id' argument") + + _setter("dns_forwarding_ruleset_id", dns_forwarding_ruleset_id) + _setter("virtual_network_id", virtual_network_id) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="dnsForwardingRulesetId") @@ -95,14 +120,35 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Private DNS Resolver Virtual Network Link. Changing this forces a new Private DNS Resolver Virtual Network Link to be created. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network that is linked to the Private DNS Resolver Virtual Network Link. Changing this forces a new resource to be created. """ + _ResolverVirtualNetworkLinkState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_forwarding_ruleset_id=dns_forwarding_ruleset_id, + metadata=metadata, + name=name, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_forwarding_ruleset_id: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_forwarding_ruleset_id is None and 'dnsForwardingRulesetId' in kwargs: + dns_forwarding_ruleset_id = kwargs['dnsForwardingRulesetId'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if dns_forwarding_ruleset_id is not None: - pulumi.set(__self__, "dns_forwarding_ruleset_id", dns_forwarding_ruleset_id) + _setter("dns_forwarding_ruleset_id", dns_forwarding_ruleset_id) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter(name="dnsForwardingRulesetId") @@ -304,6 +350,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResolverVirtualNetworkLinkArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/srv_record.py b/sdk/python/pulumi_azure/privatedns/srv_record.py index 1f2485f540..031d6defe7 100644 --- a/sdk/python/pulumi_azure/privatedns/srv_record.py +++ b/sdk/python/pulumi_azure/privatedns/srv_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,14 +31,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the DNS SRV Record. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "records", records) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + SRVRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + records=records, + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + records: Optional[pulumi.Input[Sequence[pulumi.Input['SRVRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if records is None: + raise TypeError("Missing 'records' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + + _setter("records", records) + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -133,20 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _SRVRecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input['SRVRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -354,6 +414,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SRVRecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/txt_record.py b/sdk/python/pulumi_azure/privatedns/txt_record.py index b0018568a6..6261ecd17b 100644 --- a/sdk/python/pulumi_azure/privatedns/txt_record.py +++ b/sdk/python/pulumi_azure/privatedns/txt_record.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,14 +31,47 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the DNS TXT Record. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "records", records) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "ttl", ttl) - pulumi.set(__self__, "zone_name", zone_name) + TxtRecordArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + records=records, + resource_group_name=resource_group_name, + ttl=ttl, + zone_name=zone_name, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + records: Optional[pulumi.Input[Sequence[pulumi.Input['TxtRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if records is None: + raise TypeError("Missing 'records' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if zone_name is None: + raise TypeError("Missing 'zone_name' argument") + + _setter("records", records) + _setter("resource_group_name", resource_group_name) + _setter("ttl", ttl) + _setter("zone_name", zone_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -133,20 +166,47 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The Time To Live (TTL) of the DNS record in seconds. :param pulumi.Input[str] zone_name: Specifies the Private DNS Zone where the resource exists. Changing this forces a new resource to be created. """ + _TxtRecordState._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + name=name, + records=records, + resource_group_name=resource_group_name, + tags=tags, + ttl=ttl, + zone_name=zone_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + records: Optional[pulumi.Input[Sequence[pulumi.Input['TxtRecordRecordArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ttl: Optional[pulumi.Input[int]] = None, + zone_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_name is None and 'zoneName' in kwargs: + zone_name = kwargs['zoneName'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if records is not None: - pulumi.set(__self__, "records", records) + _setter("records", records) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if zone_name is not None: - pulumi.set(__self__, "zone_name", zone_name) + _setter("zone_name", zone_name) @property @pulumi.getter @@ -326,6 +386,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TxtRecordArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatedns/zone.py b/sdk/python/pulumi_azure/privatedns/zone.py index 5bb62bfc16..b834d72839 100644 --- a/sdk/python/pulumi_azure/privatedns/zone.py +++ b/sdk/python/pulumi_azure/privatedns/zone.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,13 +29,36 @@ def __init__(__self__, *, :param pulumi.Input['ZoneSoaRecordArgs'] soa_record: An `soa_record` block as defined below. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + ZoneArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + name=name, + soa_record=soa_record, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + soa_record: Optional[pulumi.Input['ZoneSoaRecordArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if soa_record is None and 'soaRecord' in kwargs: + soa_record = kwargs['soaRecord'] + + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if soa_record is not None: - pulumi.set(__self__, "soa_record", soa_record) + _setter("soa_record", soa_record) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -112,22 +135,59 @@ def __init__(__self__, *, :param pulumi.Input['ZoneSoaRecordArgs'] soa_record: An `soa_record` block as defined below. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ZoneState._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_number_of_record_sets=max_number_of_record_sets, + max_number_of_virtual_network_links=max_number_of_virtual_network_links, + max_number_of_virtual_network_links_with_registration=max_number_of_virtual_network_links_with_registration, + name=name, + number_of_record_sets=number_of_record_sets, + resource_group_name=resource_group_name, + soa_record=soa_record, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_number_of_record_sets: Optional[pulumi.Input[int]] = None, + max_number_of_virtual_network_links: Optional[pulumi.Input[int]] = None, + max_number_of_virtual_network_links_with_registration: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + number_of_record_sets: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + soa_record: Optional[pulumi.Input['ZoneSoaRecordArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_number_of_record_sets is None and 'maxNumberOfRecordSets' in kwargs: + max_number_of_record_sets = kwargs['maxNumberOfRecordSets'] + if max_number_of_virtual_network_links is None and 'maxNumberOfVirtualNetworkLinks' in kwargs: + max_number_of_virtual_network_links = kwargs['maxNumberOfVirtualNetworkLinks'] + if max_number_of_virtual_network_links_with_registration is None and 'maxNumberOfVirtualNetworkLinksWithRegistration' in kwargs: + max_number_of_virtual_network_links_with_registration = kwargs['maxNumberOfVirtualNetworkLinksWithRegistration'] + if number_of_record_sets is None and 'numberOfRecordSets' in kwargs: + number_of_record_sets = kwargs['numberOfRecordSets'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if soa_record is None and 'soaRecord' in kwargs: + soa_record = kwargs['soaRecord'] + if max_number_of_record_sets is not None: - pulumi.set(__self__, "max_number_of_record_sets", max_number_of_record_sets) + _setter("max_number_of_record_sets", max_number_of_record_sets) if max_number_of_virtual_network_links is not None: - pulumi.set(__self__, "max_number_of_virtual_network_links", max_number_of_virtual_network_links) + _setter("max_number_of_virtual_network_links", max_number_of_virtual_network_links) if max_number_of_virtual_network_links_with_registration is not None: - pulumi.set(__self__, "max_number_of_virtual_network_links_with_registration", max_number_of_virtual_network_links_with_registration) + _setter("max_number_of_virtual_network_links_with_registration", max_number_of_virtual_network_links_with_registration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if number_of_record_sets is not None: - pulumi.set(__self__, "number_of_record_sets", number_of_record_sets) + _setter("number_of_record_sets", number_of_record_sets) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if soa_record is not None: - pulumi.set(__self__, "soa_record", soa_record) + _setter("soa_record", soa_record) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="maxNumberOfRecordSets") @@ -305,6 +365,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ZoneArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -327,6 +391,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if soa_record is not None and not isinstance(soa_record, ZoneSoaRecordArgs): + soa_record = soa_record or {} + def _setter(key, value): + soa_record[key] = value + ZoneSoaRecordArgs._configure(_setter, **soa_record) __props__.__dict__["soa_record"] = soa_record __props__.__dict__["tags"] = tags __props__.__dict__["max_number_of_record_sets"] = None diff --git a/sdk/python/pulumi_azure/privatedns/zone_virtual_network_link.py b/sdk/python/pulumi_azure/privatedns/zone_virtual_network_link.py index 40802c5b90..29b025f7a5 100644 --- a/sdk/python/pulumi_azure/privatedns/zone_virtual_network_link.py +++ b/sdk/python/pulumi_azure/privatedns/zone_virtual_network_link.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ZoneVirtualNetworkLinkArgs', 'ZoneVirtualNetworkLink'] @@ -29,15 +29,50 @@ def __init__(__self__, *, :param pulumi.Input[bool] registration_enabled: Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to `false`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "private_dns_zone_name", private_dns_zone_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + ZoneVirtualNetworkLinkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_dns_zone_name=private_dns_zone_name, + resource_group_name=resource_group_name, + virtual_network_id=virtual_network_id, + name=name, + registration_enabled=registration_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_dns_zone_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + registration_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_dns_zone_name is None and 'privateDnsZoneName' in kwargs: + private_dns_zone_name = kwargs['privateDnsZoneName'] + if private_dns_zone_name is None: + raise TypeError("Missing 'private_dns_zone_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if virtual_network_id is None: + raise TypeError("Missing 'virtual_network_id' argument") + if registration_enabled is None and 'registrationEnabled' in kwargs: + registration_enabled = kwargs['registrationEnabled'] + + _setter("private_dns_zone_name", private_dns_zone_name) + _setter("resource_group_name", resource_group_name) + _setter("virtual_network_id", virtual_network_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if registration_enabled is not None: - pulumi.set(__self__, "registration_enabled", registration_enabled) + _setter("registration_enabled", registration_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="privateDnsZoneName") @@ -130,18 +165,47 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] virtual_network_id: The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created. """ + _ZoneVirtualNetworkLinkState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + private_dns_zone_name=private_dns_zone_name, + registration_enabled=registration_enabled, + resource_group_name=resource_group_name, + tags=tags, + virtual_network_id=virtual_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + private_dns_zone_name: Optional[pulumi.Input[str]] = None, + registration_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + virtual_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_dns_zone_name is None and 'privateDnsZoneName' in kwargs: + private_dns_zone_name = kwargs['privateDnsZoneName'] + if registration_enabled is None and 'registrationEnabled' in kwargs: + registration_enabled = kwargs['registrationEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if virtual_network_id is None and 'virtualNetworkId' in kwargs: + virtual_network_id = kwargs['virtualNetworkId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_dns_zone_name is not None: - pulumi.set(__self__, "private_dns_zone_name", private_dns_zone_name) + _setter("private_dns_zone_name", private_dns_zone_name) if registration_enabled is not None: - pulumi.set(__self__, "registration_enabled", registration_enabled) + _setter("registration_enabled", registration_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if virtual_network_id is not None: - pulumi.set(__self__, "virtual_network_id", virtual_network_id) + _setter("virtual_network_id", virtual_network_id) @property @pulumi.getter @@ -311,6 +375,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ZoneVirtualNetworkLinkArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatelink/_inputs.py b/sdk/python/pulumi_azure/privatelink/_inputs.py index 2451658704..19e60bf46a 100644 --- a/sdk/python/pulumi_azure/privatelink/_inputs.py +++ b/sdk/python/pulumi_azure/privatelink/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -28,10 +28,25 @@ def __init__(__self__, *, :param pulumi.Input[str] fqdn: The fully qualified domain name to the `private_dns_zone`. :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_addresses: A list of all IP Addresses that map to the `private_dns_zone` fqdn. """ + EndpointCustomDnsConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + ip_addresses=ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) @property @pulumi.getter @@ -73,12 +88,39 @@ def __init__(__self__, *, > **NOTE:** `member_name` will be required and will not take the value of `subresource_name` in the next major version. :param pulumi.Input[str] subresource_name: Specifies the subresource this IP address applies to. `subresource_names` corresponds to `group_id`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "private_ip_address", private_ip_address) + EndpointIpConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + private_ip_address=private_ip_address, + member_name=member_name, + subresource_name=subresource_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + member_name: Optional[pulumi.Input[str]] = None, + subresource_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if member_name is None and 'memberName' in kwargs: + member_name = kwargs['memberName'] + if subresource_name is None and 'subresourceName' in kwargs: + subresource_name = kwargs['subresourceName'] + + _setter("name", name) + _setter("private_ip_address", private_ip_address) if member_name is not None: - pulumi.set(__self__, "member_name", member_name) + _setter("member_name", member_name) if subresource_name is not None: - pulumi.set(__self__, "subresource_name", subresource_name) + _setter("subresource_name", subresource_name) @property @pulumi.getter @@ -140,10 +182,23 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID of the Private DNS Zone Config. :param pulumi.Input[str] name: Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created. """ + EndpointNetworkInterfaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -183,14 +238,35 @@ def __init__(__self__, *, :param pulumi.Input[str] private_dns_zone_id: A list of IP Addresses :param pulumi.Input[Sequence[pulumi.Input['EndpointPrivateDnsZoneConfigRecordSetArgs']]] record_sets: A `record_sets` block as defined below. """ + EndpointPrivateDnsZoneConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + private_dns_zone_id=private_dns_zone_id, + record_sets=record_sets, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_dns_zone_id: Optional[pulumi.Input[str]] = None, + record_sets: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointPrivateDnsZoneConfigRecordSetArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_dns_zone_id is None and 'privateDnsZoneId' in kwargs: + private_dns_zone_id = kwargs['privateDnsZoneId'] + if record_sets is None and 'recordSets' in kwargs: + record_sets = kwargs['recordSets'] + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_dns_zone_id is not None: - pulumi.set(__self__, "private_dns_zone_id", private_dns_zone_id) + _setter("private_dns_zone_id", private_dns_zone_id) if record_sets is not None: - pulumi.set(__self__, "record_sets", record_sets) + _setter("record_sets", record_sets) @property @pulumi.getter @@ -256,16 +332,37 @@ def __init__(__self__, *, :param pulumi.Input[int] ttl: The time to live for each connection to the `private_dns_zone`. :param pulumi.Input[str] type: The type of DNS record. """ + EndpointPrivateDnsZoneConfigRecordSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + ip_addresses=ip_addresses, + name=name, + ttl=ttl, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[pulumi.Input[str]] = None, + ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -339,10 +436,31 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] private_dns_zone_ids: Specifies the list of Private DNS Zones to include within the `private_dns_zone_group`. :param pulumi.Input[str] id: The ID of the Private DNS Zone Config. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "private_dns_zone_ids", private_dns_zone_ids) + EndpointPrivateDnsZoneGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + private_dns_zone_ids=private_dns_zone_ids, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + private_dns_zone_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if private_dns_zone_ids is None and 'privateDnsZoneIds' in kwargs: + private_dns_zone_ids = kwargs['privateDnsZoneIds'] + if private_dns_zone_ids is None: + raise TypeError("Missing 'private_dns_zone_ids' argument") + + _setter("name", name) + _setter("private_dns_zone_ids", private_dns_zone_ids) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -404,18 +522,57 @@ def __init__(__self__, *, > **NOTE:** Some resource types (such as Storage Account) only support 1 subresource per private endpoint. """ - pulumi.set(__self__, "is_manual_connection", is_manual_connection) - pulumi.set(__self__, "name", name) + EndpointPrivateServiceConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_manual_connection=is_manual_connection, + name=name, + private_connection_resource_alias=private_connection_resource_alias, + private_connection_resource_id=private_connection_resource_id, + private_ip_address=private_ip_address, + request_message=request_message, + subresource_names=subresource_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_manual_connection: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + private_connection_resource_alias: Optional[pulumi.Input[str]] = None, + private_connection_resource_id: Optional[pulumi.Input[str]] = None, + private_ip_address: Optional[pulumi.Input[str]] = None, + request_message: Optional[pulumi.Input[str]] = None, + subresource_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_manual_connection is None and 'isManualConnection' in kwargs: + is_manual_connection = kwargs['isManualConnection'] + if is_manual_connection is None: + raise TypeError("Missing 'is_manual_connection' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if private_connection_resource_alias is None and 'privateConnectionResourceAlias' in kwargs: + private_connection_resource_alias = kwargs['privateConnectionResourceAlias'] + if private_connection_resource_id is None and 'privateConnectionResourceId' in kwargs: + private_connection_resource_id = kwargs['privateConnectionResourceId'] + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if request_message is None and 'requestMessage' in kwargs: + request_message = kwargs['requestMessage'] + if subresource_names is None and 'subresourceNames' in kwargs: + subresource_names = kwargs['subresourceNames'] + + _setter("is_manual_connection", is_manual_connection) + _setter("name", name) if private_connection_resource_alias is not None: - pulumi.set(__self__, "private_connection_resource_alias", private_connection_resource_alias) + _setter("private_connection_resource_alias", private_connection_resource_alias) if private_connection_resource_id is not None: - pulumi.set(__self__, "private_connection_resource_id", private_connection_resource_id) + _setter("private_connection_resource_id", private_connection_resource_id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if request_message is not None: - pulumi.set(__self__, "request_message", request_message) + _setter("request_message", request_message) if subresource_names is not None: - pulumi.set(__self__, "subresource_names", subresource_names) + _setter("subresource_names", subresource_names) @property @pulumi.getter(name="isManualConnection") diff --git a/sdk/python/pulumi_azure/privatelink/application_security_group_association.py b/sdk/python/pulumi_azure/privatelink/application_security_group_association.py index 21b41419e9..c60a92a880 100644 --- a/sdk/python/pulumi_azure/privatelink/application_security_group_association.py +++ b/sdk/python/pulumi_azure/privatelink/application_security_group_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ApplicationSecurityGroupAssociationArgs', 'ApplicationSecurityGroupAssociation'] @@ -21,8 +21,29 @@ def __init__(__self__, *, :param pulumi.Input[str] application_security_group_id: The id of application security group to associate. Changing this forces a new resource to be created. :param pulumi.Input[str] private_endpoint_id: The id of private endpoint to associate. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "application_security_group_id", application_security_group_id) - pulumi.set(__self__, "private_endpoint_id", private_endpoint_id) + ApplicationSecurityGroupAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_security_group_id=application_security_group_id, + private_endpoint_id=private_endpoint_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_security_group_id: Optional[pulumi.Input[str]] = None, + private_endpoint_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_security_group_id is None and 'applicationSecurityGroupId' in kwargs: + application_security_group_id = kwargs['applicationSecurityGroupId'] + if application_security_group_id is None: + raise TypeError("Missing 'application_security_group_id' argument") + if private_endpoint_id is None and 'privateEndpointId' in kwargs: + private_endpoint_id = kwargs['privateEndpointId'] + if private_endpoint_id is None: + raise TypeError("Missing 'private_endpoint_id' argument") + + _setter("application_security_group_id", application_security_group_id) + _setter("private_endpoint_id", private_endpoint_id) @property @pulumi.getter(name="applicationSecurityGroupId") @@ -59,10 +80,27 @@ def __init__(__self__, *, :param pulumi.Input[str] application_security_group_id: The id of application security group to associate. Changing this forces a new resource to be created. :param pulumi.Input[str] private_endpoint_id: The id of private endpoint to associate. Changing this forces a new resource to be created. """ + _ApplicationSecurityGroupAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_security_group_id=application_security_group_id, + private_endpoint_id=private_endpoint_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_security_group_id: Optional[pulumi.Input[str]] = None, + private_endpoint_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_security_group_id is None and 'applicationSecurityGroupId' in kwargs: + application_security_group_id = kwargs['applicationSecurityGroupId'] + if private_endpoint_id is None and 'privateEndpointId' in kwargs: + private_endpoint_id = kwargs['privateEndpointId'] + if application_security_group_id is not None: - pulumi.set(__self__, "application_security_group_id", application_security_group_id) + _setter("application_security_group_id", application_security_group_id) if private_endpoint_id is not None: - pulumi.set(__self__, "private_endpoint_id", private_endpoint_id) + _setter("private_endpoint_id", private_endpoint_id) @property @pulumi.getter(name="applicationSecurityGroupId") @@ -266,6 +304,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ApplicationSecurityGroupAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/privatelink/endpoint.py b/sdk/python/pulumi_azure/privatelink/endpoint.py index 281c8811b8..c9783f793f 100644 --- a/sdk/python/pulumi_azure/privatelink/endpoint.py +++ b/sdk/python/pulumi_azure/privatelink/endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,21 +37,66 @@ def __init__(__self__, *, :param pulumi.Input['EndpointPrivateDnsZoneGroupArgs'] private_dns_zone_group: A `private_dns_zone_group` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "private_service_connection", private_service_connection) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "subnet_id", subnet_id) + EndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + private_service_connection=private_service_connection, + resource_group_name=resource_group_name, + subnet_id=subnet_id, + custom_network_interface_name=custom_network_interface_name, + ip_configurations=ip_configurations, + location=location, + name=name, + private_dns_zone_group=private_dns_zone_group, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + private_service_connection: Optional[pulumi.Input['EndpointPrivateServiceConnectionArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + custom_network_interface_name: Optional[pulumi.Input[str]] = None, + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointIpConfigurationArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + private_dns_zone_group: Optional[pulumi.Input['EndpointPrivateDnsZoneGroupArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_service_connection is None and 'privateServiceConnection' in kwargs: + private_service_connection = kwargs['privateServiceConnection'] + if private_service_connection is None: + raise TypeError("Missing 'private_service_connection' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if custom_network_interface_name is None and 'customNetworkInterfaceName' in kwargs: + custom_network_interface_name = kwargs['customNetworkInterfaceName'] + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if private_dns_zone_group is None and 'privateDnsZoneGroup' in kwargs: + private_dns_zone_group = kwargs['privateDnsZoneGroup'] + + _setter("private_service_connection", private_service_connection) + _setter("resource_group_name", resource_group_name) + _setter("subnet_id", subnet_id) if custom_network_interface_name is not None: - pulumi.set(__self__, "custom_network_interface_name", custom_network_interface_name) + _setter("custom_network_interface_name", custom_network_interface_name) if ip_configurations is not None: - pulumi.set(__self__, "ip_configurations", ip_configurations) + _setter("ip_configurations", ip_configurations) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_dns_zone_group is not None: - pulumi.set(__self__, "private_dns_zone_group", private_dns_zone_group) + _setter("private_dns_zone_group", private_dns_zone_group) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="privateServiceConnection") @@ -192,30 +237,81 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _EndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_dns_configs=custom_dns_configs, + custom_network_interface_name=custom_network_interface_name, + ip_configurations=ip_configurations, + location=location, + name=name, + network_interfaces=network_interfaces, + private_dns_zone_configs=private_dns_zone_configs, + private_dns_zone_group=private_dns_zone_group, + private_service_connection=private_service_connection, + resource_group_name=resource_group_name, + subnet_id=subnet_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_dns_configs: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointCustomDnsConfigArgs']]]] = None, + custom_network_interface_name: Optional[pulumi.Input[str]] = None, + ip_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointIpConfigurationArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointNetworkInterfaceArgs']]]] = None, + private_dns_zone_configs: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointPrivateDnsZoneConfigArgs']]]] = None, + private_dns_zone_group: Optional[pulumi.Input['EndpointPrivateDnsZoneGroupArgs']] = None, + private_service_connection: Optional[pulumi.Input['EndpointPrivateServiceConnectionArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_dns_configs is None and 'customDnsConfigs' in kwargs: + custom_dns_configs = kwargs['customDnsConfigs'] + if custom_network_interface_name is None and 'customNetworkInterfaceName' in kwargs: + custom_network_interface_name = kwargs['customNetworkInterfaceName'] + if ip_configurations is None and 'ipConfigurations' in kwargs: + ip_configurations = kwargs['ipConfigurations'] + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if private_dns_zone_configs is None and 'privateDnsZoneConfigs' in kwargs: + private_dns_zone_configs = kwargs['privateDnsZoneConfigs'] + if private_dns_zone_group is None and 'privateDnsZoneGroup' in kwargs: + private_dns_zone_group = kwargs['privateDnsZoneGroup'] + if private_service_connection is None and 'privateServiceConnection' in kwargs: + private_service_connection = kwargs['privateServiceConnection'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if custom_dns_configs is not None: - pulumi.set(__self__, "custom_dns_configs", custom_dns_configs) + _setter("custom_dns_configs", custom_dns_configs) if custom_network_interface_name is not None: - pulumi.set(__self__, "custom_network_interface_name", custom_network_interface_name) + _setter("custom_network_interface_name", custom_network_interface_name) if ip_configurations is not None: - pulumi.set(__self__, "ip_configurations", ip_configurations) + _setter("ip_configurations", ip_configurations) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_interfaces is not None: - pulumi.set(__self__, "network_interfaces", network_interfaces) + _setter("network_interfaces", network_interfaces) if private_dns_zone_configs is not None: - pulumi.set(__self__, "private_dns_zone_configs", private_dns_zone_configs) + _setter("private_dns_zone_configs", private_dns_zone_configs) if private_dns_zone_group is not None: - pulumi.set(__self__, "private_dns_zone_group", private_dns_zone_group) + _setter("private_dns_zone_group", private_dns_zone_group) if private_service_connection is not None: - pulumi.set(__self__, "private_service_connection", private_service_connection) + _setter("private_service_connection", private_service_connection) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="customDnsConfigs") @@ -423,6 +519,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -450,7 +550,17 @@ def _internal_init(__self__, __props__.__dict__["ip_configurations"] = ip_configurations __props__.__dict__["location"] = location __props__.__dict__["name"] = name + if private_dns_zone_group is not None and not isinstance(private_dns_zone_group, EndpointPrivateDnsZoneGroupArgs): + private_dns_zone_group = private_dns_zone_group or {} + def _setter(key, value): + private_dns_zone_group[key] = value + EndpointPrivateDnsZoneGroupArgs._configure(_setter, **private_dns_zone_group) __props__.__dict__["private_dns_zone_group"] = private_dns_zone_group + if private_service_connection is not None and not isinstance(private_service_connection, EndpointPrivateServiceConnectionArgs): + private_service_connection = private_service_connection or {} + def _setter(key, value): + private_service_connection[key] = value + EndpointPrivateServiceConnectionArgs._configure(_setter, **private_service_connection) if private_service_connection is None and not opts.urn: raise TypeError("Missing required property 'private_service_connection'") __props__.__dict__["private_service_connection"] = private_service_connection diff --git a/sdk/python/pulumi_azure/privatelink/get_endpoint_connection.py b/sdk/python/pulumi_azure/privatelink/get_endpoint_connection.py index d1c8dc3fa7..12e4cb0140 100644 --- a/sdk/python/pulumi_azure/privatelink/get_endpoint_connection.py +++ b/sdk/python/pulumi_azure/privatelink/get_endpoint_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/privatelink/get_service.py b/sdk/python/pulumi_azure/privatelink/get_service.py index 1363215075..0b11457581 100644 --- a/sdk/python/pulumi_azure/privatelink/get_service.py +++ b/sdk/python/pulumi_azure/privatelink/get_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/privatelink/get_service_endpoint_connections.py b/sdk/python/pulumi_azure/privatelink/get_service_endpoint_connections.py index 8b0abb1461..b2e5d0c582 100644 --- a/sdk/python/pulumi_azure/privatelink/get_service_endpoint_connections.py +++ b/sdk/python/pulumi_azure/privatelink/get_service_endpoint_connections.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/privatelink/outputs.py b/sdk/python/pulumi_azure/privatelink/outputs.py index 18599408e8..a27e92f08a 100644 --- a/sdk/python/pulumi_azure/privatelink/outputs.py +++ b/sdk/python/pulumi_azure/privatelink/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -50,10 +50,25 @@ def __init__(__self__, *, :param str fqdn: The fully qualified domain name to the `private_dns_zone`. :param Sequence[str] ip_addresses: A list of all IP Addresses that map to the `private_dns_zone` fqdn. """ + EndpointCustomDnsConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + ip_addresses=ip_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[str] = None, + ip_addresses: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) @property @pulumi.getter @@ -108,12 +123,39 @@ def __init__(__self__, *, > **NOTE:** `member_name` will be required and will not take the value of `subresource_name` in the next major version. :param str subresource_name: Specifies the subresource this IP address applies to. `subresource_names` corresponds to `group_id`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "private_ip_address", private_ip_address) + EndpointIpConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + private_ip_address=private_ip_address, + member_name=member_name, + subresource_name=subresource_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + member_name: Optional[str] = None, + subresource_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if member_name is None and 'memberName' in kwargs: + member_name = kwargs['memberName'] + if subresource_name is None and 'subresourceName' in kwargs: + subresource_name = kwargs['subresourceName'] + + _setter("name", name) + _setter("private_ip_address", private_ip_address) if member_name is not None: - pulumi.set(__self__, "member_name", member_name) + _setter("member_name", member_name) if subresource_name is not None: - pulumi.set(__self__, "subresource_name", subresource_name) + _setter("subresource_name", subresource_name) @property @pulumi.getter @@ -159,10 +201,23 @@ def __init__(__self__, *, :param str id: The ID of the Private DNS Zone Config. :param str name: Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created. """ + EndpointNetworkInterface._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -213,14 +268,35 @@ def __init__(__self__, *, :param str private_dns_zone_id: A list of IP Addresses :param Sequence['EndpointPrivateDnsZoneConfigRecordSetArgs'] record_sets: A `record_sets` block as defined below. """ + EndpointPrivateDnsZoneConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + private_dns_zone_id=private_dns_zone_id, + record_sets=record_sets, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + private_dns_zone_id: Optional[str] = None, + record_sets: Optional[Sequence['outputs.EndpointPrivateDnsZoneConfigRecordSet']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if private_dns_zone_id is None and 'privateDnsZoneId' in kwargs: + private_dns_zone_id = kwargs['privateDnsZoneId'] + if record_sets is None and 'recordSets' in kwargs: + record_sets = kwargs['recordSets'] + if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if private_dns_zone_id is not None: - pulumi.set(__self__, "private_dns_zone_id", private_dns_zone_id) + _setter("private_dns_zone_id", private_dns_zone_id) if record_sets is not None: - pulumi.set(__self__, "record_sets", record_sets) + _setter("record_sets", record_sets) @property @pulumi.getter @@ -287,16 +363,37 @@ def __init__(__self__, *, :param int ttl: The time to live for each connection to the `private_dns_zone`. :param str type: The type of DNS record. """ + EndpointPrivateDnsZoneConfigRecordSet._configure( + lambda key, value: pulumi.set(__self__, key, value), + fqdn=fqdn, + ip_addresses=ip_addresses, + name=name, + ttl=ttl, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fqdn: Optional[str] = None, + ip_addresses: Optional[Sequence[str]] = None, + name: Optional[str] = None, + ttl: Optional[int] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ip_addresses is None and 'ipAddresses' in kwargs: + ip_addresses = kwargs['ipAddresses'] + if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if ip_addresses is not None: - pulumi.set(__self__, "ip_addresses", ip_addresses) + _setter("ip_addresses", ip_addresses) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if ttl is not None: - pulumi.set(__self__, "ttl", ttl) + _setter("ttl", ttl) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -367,10 +464,31 @@ def __init__(__self__, *, :param Sequence[str] private_dns_zone_ids: Specifies the list of Private DNS Zones to include within the `private_dns_zone_group`. :param str id: The ID of the Private DNS Zone Config. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "private_dns_zone_ids", private_dns_zone_ids) + EndpointPrivateDnsZoneGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + private_dns_zone_ids=private_dns_zone_ids, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + private_dns_zone_ids: Optional[Sequence[str]] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if private_dns_zone_ids is None and 'privateDnsZoneIds' in kwargs: + private_dns_zone_ids = kwargs['privateDnsZoneIds'] + if private_dns_zone_ids is None: + raise TypeError("Missing 'private_dns_zone_ids' argument") + + _setter("name", name) + _setter("private_dns_zone_ids", private_dns_zone_ids) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) @property @pulumi.getter @@ -447,18 +565,57 @@ def __init__(__self__, *, > **NOTE:** Some resource types (such as Storage Account) only support 1 subresource per private endpoint. """ - pulumi.set(__self__, "is_manual_connection", is_manual_connection) - pulumi.set(__self__, "name", name) + EndpointPrivateServiceConnection._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_manual_connection=is_manual_connection, + name=name, + private_connection_resource_alias=private_connection_resource_alias, + private_connection_resource_id=private_connection_resource_id, + private_ip_address=private_ip_address, + request_message=request_message, + subresource_names=subresource_names, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_manual_connection: Optional[bool] = None, + name: Optional[str] = None, + private_connection_resource_alias: Optional[str] = None, + private_connection_resource_id: Optional[str] = None, + private_ip_address: Optional[str] = None, + request_message: Optional[str] = None, + subresource_names: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_manual_connection is None and 'isManualConnection' in kwargs: + is_manual_connection = kwargs['isManualConnection'] + if is_manual_connection is None: + raise TypeError("Missing 'is_manual_connection' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if private_connection_resource_alias is None and 'privateConnectionResourceAlias' in kwargs: + private_connection_resource_alias = kwargs['privateConnectionResourceAlias'] + if private_connection_resource_id is None and 'privateConnectionResourceId' in kwargs: + private_connection_resource_id = kwargs['privateConnectionResourceId'] + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if request_message is None and 'requestMessage' in kwargs: + request_message = kwargs['requestMessage'] + if subresource_names is None and 'subresourceNames' in kwargs: + subresource_names = kwargs['subresourceNames'] + + _setter("is_manual_connection", is_manual_connection) + _setter("name", name) if private_connection_resource_alias is not None: - pulumi.set(__self__, "private_connection_resource_alias", private_connection_resource_alias) + _setter("private_connection_resource_alias", private_connection_resource_alias) if private_connection_resource_id is not None: - pulumi.set(__self__, "private_connection_resource_id", private_connection_resource_id) + _setter("private_connection_resource_id", private_connection_resource_id) if private_ip_address is not None: - pulumi.set(__self__, "private_ip_address", private_ip_address) + _setter("private_ip_address", private_ip_address) if request_message is not None: - pulumi.set(__self__, "request_message", request_message) + _setter("request_message", request_message) if subresource_names is not None: - pulumi.set(__self__, "subresource_names", subresource_names) + _setter("subresource_names", subresource_names) @property @pulumi.getter(name="isManualConnection") @@ -530,8 +687,25 @@ def __init__(__self__, *, :param str id: The ID of the network interface associated with the private endpoint. :param str name: Specifies the Name of the private endpoint. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) + GetEndpointConnectionNetworkInterfaceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("id", id) + _setter("name", name) @property @pulumi.getter @@ -568,10 +742,39 @@ def __init__(__self__, *, `request/response message` | If you submitted a manual private endpoint connection request, while in the `Pending` status the `request_response` will display the same text from your `request_message` in the `private_service_connection` block above. If the private endpoint connection request was `Rejected` by the owner of the remote resource, the text for the rejection will be displayed as the `request_response` text, if the private endpoint connection request was `Approved` by the owner of the remote resource, the text for the approval will be displayed as the `request_response` text :param str status: The current status of the private endpoint request, possible values will be `Pending`, `Approved`, `Rejected`, or `Disconnected`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "request_response", request_response) - pulumi.set(__self__, "status", status) + GetEndpointConnectionPrivateServiceConnectionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + private_ip_address=private_ip_address, + request_response=request_response, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + request_response: Optional[str] = None, + status: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if request_response is None and 'requestResponse' in kwargs: + request_response = kwargs['requestResponse'] + if request_response is None: + raise TypeError("Missing 'request_response' argument") + if status is None: + raise TypeError("Missing 'status' argument") + + _setter("name", name) + _setter("private_ip_address", private_ip_address) + _setter("request_response", request_response) + _setter("status", status) @property @pulumi.getter @@ -630,13 +833,60 @@ def __init__(__self__, *, :param str private_endpoint_name: The name of the private link endpoint. :param str status: Indicates the state of the connection between the private link service and the private link endpoint, possible values are `Pending`, `Approved` or `Rejected`. """ - pulumi.set(__self__, "action_required", action_required) - pulumi.set(__self__, "connection_id", connection_id) - pulumi.set(__self__, "connection_name", connection_name) - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "private_endpoint_id", private_endpoint_id) - pulumi.set(__self__, "private_endpoint_name", private_endpoint_name) - pulumi.set(__self__, "status", status) + GetServiceEndpointConnectionsPrivateEndpointConnectionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_required=action_required, + connection_id=connection_id, + connection_name=connection_name, + description=description, + private_endpoint_id=private_endpoint_id, + private_endpoint_name=private_endpoint_name, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_required: Optional[str] = None, + connection_id: Optional[str] = None, + connection_name: Optional[str] = None, + description: Optional[str] = None, + private_endpoint_id: Optional[str] = None, + private_endpoint_name: Optional[str] = None, + status: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_required is None and 'actionRequired' in kwargs: + action_required = kwargs['actionRequired'] + if action_required is None: + raise TypeError("Missing 'action_required' argument") + if connection_id is None and 'connectionId' in kwargs: + connection_id = kwargs['connectionId'] + if connection_id is None: + raise TypeError("Missing 'connection_id' argument") + if connection_name is None and 'connectionName' in kwargs: + connection_name = kwargs['connectionName'] + if connection_name is None: + raise TypeError("Missing 'connection_name' argument") + if description is None: + raise TypeError("Missing 'description' argument") + if private_endpoint_id is None and 'privateEndpointId' in kwargs: + private_endpoint_id = kwargs['privateEndpointId'] + if private_endpoint_id is None: + raise TypeError("Missing 'private_endpoint_id' argument") + if private_endpoint_name is None and 'privateEndpointName' in kwargs: + private_endpoint_name = kwargs['privateEndpointName'] + if private_endpoint_name is None: + raise TypeError("Missing 'private_endpoint_name' argument") + if status is None: + raise TypeError("Missing 'status' argument") + + _setter("action_required", action_required) + _setter("connection_id", connection_id) + _setter("connection_name", connection_name) + _setter("description", description) + _setter("private_endpoint_id", private_endpoint_id) + _setter("private_endpoint_name", private_endpoint_name) + _setter("status", status) @property @pulumi.getter(name="actionRequired") @@ -710,11 +960,46 @@ def __init__(__self__, *, :param str private_ip_address_version: The version of the IP Protocol. :param str subnet_id: The ID of the subnet to be used by the service. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "primary", primary) - pulumi.set(__self__, "private_ip_address", private_ip_address) - pulumi.set(__self__, "private_ip_address_version", private_ip_address_version) - pulumi.set(__self__, "subnet_id", subnet_id) + GetServiceNatIpConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + primary=primary, + private_ip_address=private_ip_address, + private_ip_address_version=private_ip_address_version, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + primary: Optional[bool] = None, + private_ip_address: Optional[str] = None, + private_ip_address_version: Optional[str] = None, + subnet_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if primary is None: + raise TypeError("Missing 'primary' argument") + if private_ip_address is None and 'privateIpAddress' in kwargs: + private_ip_address = kwargs['privateIpAddress'] + if private_ip_address is None: + raise TypeError("Missing 'private_ip_address' argument") + if private_ip_address_version is None and 'privateIpAddressVersion' in kwargs: + private_ip_address_version = kwargs['privateIpAddressVersion'] + if private_ip_address_version is None: + raise TypeError("Missing 'private_ip_address_version' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + + _setter("name", name) + _setter("primary", primary) + _setter("private_ip_address", private_ip_address) + _setter("private_ip_address_version", private_ip_address_version) + _setter("subnet_id", subnet_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/provider.py b/sdk/python/pulumi_azure/provider.py index a4b2f22857..dc4490fc88 100644 --- a/sdk/python/pulumi_azure/provider.py +++ b/sdk/python/pulumi_azure/provider.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from ._inputs import * @@ -75,68 +75,177 @@ def __init__(__self__, *, :param pulumi.Input[bool] use_msi: Allow Managed Service Identity to be used for Authentication. :param pulumi.Input[bool] use_oidc: Allow OpenID Connect to be used for authentication """ + ProviderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + auxiliary_tenant_ids=auxiliary_tenant_ids, + client_certificate=client_certificate, + client_certificate_password=client_certificate_password, + client_certificate_path=client_certificate_path, + client_id=client_id, + client_id_file_path=client_id_file_path, + client_secret=client_secret, + client_secret_file_path=client_secret_file_path, + disable_correlation_request_id=disable_correlation_request_id, + disable_terraform_partner_id=disable_terraform_partner_id, + environment=environment, + features=features, + metadata_host=metadata_host, + msi_endpoint=msi_endpoint, + oidc_request_token=oidc_request_token, + oidc_request_url=oidc_request_url, + oidc_token=oidc_token, + oidc_token_file_path=oidc_token_file_path, + partner_id=partner_id, + skip_provider_registration=skip_provider_registration, + storage_use_azuread=storage_use_azuread, + subscription_id=subscription_id, + tenant_id=tenant_id, + use_cli=use_cli, + use_msi=use_msi, + use_oidc=use_oidc, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auxiliary_tenant_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + client_certificate: Optional[pulumi.Input[str]] = None, + client_certificate_password: Optional[pulumi.Input[str]] = None, + client_certificate_path: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + client_id_file_path: Optional[pulumi.Input[str]] = None, + client_secret: Optional[pulumi.Input[str]] = None, + client_secret_file_path: Optional[pulumi.Input[str]] = None, + disable_correlation_request_id: Optional[pulumi.Input[bool]] = None, + disable_terraform_partner_id: Optional[pulumi.Input[bool]] = None, + environment: Optional[pulumi.Input[str]] = None, + features: Optional[pulumi.Input['ProviderFeaturesArgs']] = None, + metadata_host: Optional[pulumi.Input[str]] = None, + msi_endpoint: Optional[pulumi.Input[str]] = None, + oidc_request_token: Optional[pulumi.Input[str]] = None, + oidc_request_url: Optional[pulumi.Input[str]] = None, + oidc_token: Optional[pulumi.Input[str]] = None, + oidc_token_file_path: Optional[pulumi.Input[str]] = None, + partner_id: Optional[pulumi.Input[str]] = None, + skip_provider_registration: Optional[pulumi.Input[bool]] = None, + storage_use_azuread: Optional[pulumi.Input[bool]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + use_cli: Optional[pulumi.Input[bool]] = None, + use_msi: Optional[pulumi.Input[bool]] = None, + use_oidc: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auxiliary_tenant_ids is None and 'auxiliaryTenantIds' in kwargs: + auxiliary_tenant_ids = kwargs['auxiliaryTenantIds'] + if client_certificate is None and 'clientCertificate' in kwargs: + client_certificate = kwargs['clientCertificate'] + if client_certificate_password is None and 'clientCertificatePassword' in kwargs: + client_certificate_password = kwargs['clientCertificatePassword'] + if client_certificate_path is None and 'clientCertificatePath' in kwargs: + client_certificate_path = kwargs['clientCertificatePath'] + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id_file_path is None and 'clientIdFilePath' in kwargs: + client_id_file_path = kwargs['clientIdFilePath'] + if client_secret is None and 'clientSecret' in kwargs: + client_secret = kwargs['clientSecret'] + if client_secret_file_path is None and 'clientSecretFilePath' in kwargs: + client_secret_file_path = kwargs['clientSecretFilePath'] + if disable_correlation_request_id is None and 'disableCorrelationRequestId' in kwargs: + disable_correlation_request_id = kwargs['disableCorrelationRequestId'] + if disable_terraform_partner_id is None and 'disableTerraformPartnerId' in kwargs: + disable_terraform_partner_id = kwargs['disableTerraformPartnerId'] + if metadata_host is None and 'metadataHost' in kwargs: + metadata_host = kwargs['metadataHost'] + if msi_endpoint is None and 'msiEndpoint' in kwargs: + msi_endpoint = kwargs['msiEndpoint'] + if oidc_request_token is None and 'oidcRequestToken' in kwargs: + oidc_request_token = kwargs['oidcRequestToken'] + if oidc_request_url is None and 'oidcRequestUrl' in kwargs: + oidc_request_url = kwargs['oidcRequestUrl'] + if oidc_token is None and 'oidcToken' in kwargs: + oidc_token = kwargs['oidcToken'] + if oidc_token_file_path is None and 'oidcTokenFilePath' in kwargs: + oidc_token_file_path = kwargs['oidcTokenFilePath'] + if partner_id is None and 'partnerId' in kwargs: + partner_id = kwargs['partnerId'] + if skip_provider_registration is None and 'skipProviderRegistration' in kwargs: + skip_provider_registration = kwargs['skipProviderRegistration'] + if storage_use_azuread is None and 'storageUseAzuread' in kwargs: + storage_use_azuread = kwargs['storageUseAzuread'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if use_cli is None and 'useCli' in kwargs: + use_cli = kwargs['useCli'] + if use_msi is None and 'useMsi' in kwargs: + use_msi = kwargs['useMsi'] + if use_oidc is None and 'useOidc' in kwargs: + use_oidc = kwargs['useOidc'] + if auxiliary_tenant_ids is not None: - pulumi.set(__self__, "auxiliary_tenant_ids", auxiliary_tenant_ids) + _setter("auxiliary_tenant_ids", auxiliary_tenant_ids) if client_certificate is not None: - pulumi.set(__self__, "client_certificate", client_certificate) + _setter("client_certificate", client_certificate) if client_certificate_password is not None: - pulumi.set(__self__, "client_certificate_password", client_certificate_password) + _setter("client_certificate_password", client_certificate_password) if client_certificate_path is not None: - pulumi.set(__self__, "client_certificate_path", client_certificate_path) + _setter("client_certificate_path", client_certificate_path) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if client_id_file_path is not None: - pulumi.set(__self__, "client_id_file_path", client_id_file_path) + _setter("client_id_file_path", client_id_file_path) if client_secret is not None: - pulumi.set(__self__, "client_secret", client_secret) + _setter("client_secret", client_secret) if client_secret_file_path is not None: - pulumi.set(__self__, "client_secret_file_path", client_secret_file_path) + _setter("client_secret_file_path", client_secret_file_path) if disable_correlation_request_id is not None: - pulumi.set(__self__, "disable_correlation_request_id", disable_correlation_request_id) + _setter("disable_correlation_request_id", disable_correlation_request_id) if disable_terraform_partner_id is not None: - pulumi.set(__self__, "disable_terraform_partner_id", disable_terraform_partner_id) + _setter("disable_terraform_partner_id", disable_terraform_partner_id) if environment is None: environment = (_utilities.get_env('AZURE_ENVIRONMENT', 'ARM_ENVIRONMENT') or 'public') if environment is not None: - pulumi.set(__self__, "environment", environment) + _setter("environment", environment) if features is not None: - pulumi.set(__self__, "features", features) + _setter("features", features) if metadata_host is None: metadata_host = _utilities.get_env('ARM_METADATA_HOSTNAME') if metadata_host is not None: - pulumi.set(__self__, "metadata_host", metadata_host) + _setter("metadata_host", metadata_host) if msi_endpoint is not None: - pulumi.set(__self__, "msi_endpoint", msi_endpoint) + _setter("msi_endpoint", msi_endpoint) if oidc_request_token is not None: - pulumi.set(__self__, "oidc_request_token", oidc_request_token) + _setter("oidc_request_token", oidc_request_token) if oidc_request_url is not None: - pulumi.set(__self__, "oidc_request_url", oidc_request_url) + _setter("oidc_request_url", oidc_request_url) if oidc_token is not None: - pulumi.set(__self__, "oidc_token", oidc_token) + _setter("oidc_token", oidc_token) if oidc_token_file_path is not None: - pulumi.set(__self__, "oidc_token_file_path", oidc_token_file_path) + _setter("oidc_token_file_path", oidc_token_file_path) if partner_id is not None: - pulumi.set(__self__, "partner_id", partner_id) + _setter("partner_id", partner_id) if skip_provider_registration is None: skip_provider_registration = (_utilities.get_env_bool('ARM_SKIP_PROVIDER_REGISTRATION') or False) if skip_provider_registration is not None: - pulumi.set(__self__, "skip_provider_registration", skip_provider_registration) + _setter("skip_provider_registration", skip_provider_registration) if storage_use_azuread is None: storage_use_azuread = (_utilities.get_env_bool('ARM_STORAGE_USE_AZUREAD') or False) if storage_use_azuread is not None: - pulumi.set(__self__, "storage_use_azuread", storage_use_azuread) + _setter("storage_use_azuread", storage_use_azuread) if subscription_id is None: subscription_id = (_utilities.get_env('ARM_SUBSCRIPTION_ID') or '') if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if use_cli is not None: - pulumi.set(__self__, "use_cli", use_cli) + _setter("use_cli", use_cli) if use_msi is not None: - pulumi.set(__self__, "use_msi", use_msi) + _setter("use_msi", use_msi) if use_oidc is not None: - pulumi.set(__self__, "use_oidc", use_oidc) + _setter("use_oidc", use_oidc) @property @pulumi.getter(name="auxiliaryTenantIds") @@ -546,6 +655,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProviderArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -599,6 +712,11 @@ def _internal_init(__self__, if environment is None: environment = (_utilities.get_env('AZURE_ENVIRONMENT', 'ARM_ENVIRONMENT') or 'public') __props__.__dict__["environment"] = environment + if features is not None and not isinstance(features, ProviderFeaturesArgs): + features = features or {} + def _setter(key, value): + features[key] = value + ProviderFeaturesArgs._configure(_setter, **features) __props__.__dict__["features"] = pulumi.Output.from_input(features).apply(pulumi.runtime.to_json) if features is not None else None if metadata_host is None: metadata_host = _utilities.get_env('ARM_METADATA_HOSTNAME') diff --git a/sdk/python/pulumi_azure/proximity/get_placement_group.py b/sdk/python/pulumi_azure/proximity/get_placement_group.py index eee2d796ae..1d232548f4 100644 --- a/sdk/python/pulumi_azure/proximity/get_placement_group.py +++ b/sdk/python/pulumi_azure/proximity/get_placement_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/proximity/placement_group.py b/sdk/python/pulumi_azure/proximity/placement_group.py index c5296f2e66..4dabbe3e9b 100644 --- a/sdk/python/pulumi_azure/proximity/placement_group.py +++ b/sdk/python/pulumi_azure/proximity/placement_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PlacementGroupArgs', 'PlacementGroup'] @@ -33,17 +33,44 @@ def __init__(__self__, *, > **NOTE:** `allowed_vm_sizes` must be set when `zone` is specified. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + PlacementGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + allowed_vm_sizes=allowed_vm_sizes, + location=location, + name=name, + tags=tags, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + allowed_vm_sizes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if allowed_vm_sizes is None and 'allowedVmSizes' in kwargs: + allowed_vm_sizes = kwargs['allowedVmSizes'] + + _setter("resource_group_name", resource_group_name) if allowed_vm_sizes is not None: - pulumi.set(__self__, "allowed_vm_sizes", allowed_vm_sizes) + _setter("allowed_vm_sizes", allowed_vm_sizes) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="resourceGroupName") @@ -144,18 +171,43 @@ def __init__(__self__, *, > **NOTE:** `allowed_vm_sizes` must be set when `zone` is specified. """ + _PlacementGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_vm_sizes=allowed_vm_sizes, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + zone=zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_vm_sizes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_vm_sizes is None and 'allowedVmSizes' in kwargs: + allowed_vm_sizes = kwargs['allowedVmSizes'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if allowed_vm_sizes is not None: - pulumi.set(__self__, "allowed_vm_sizes", allowed_vm_sizes) + _setter("allowed_vm_sizes", allowed_vm_sizes) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone is not None: - pulumi.set(__self__, "zone", zone) + _setter("zone", zone) @property @pulumi.getter(name="allowedVmSizes") @@ -327,6 +379,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PlacementGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/purview/_inputs.py b/sdk/python/pulumi_azure/purview/_inputs.py index 119ebe6f03..0a2a913c13 100644 --- a/sdk/python/pulumi_azure/purview/_inputs.py +++ b/sdk/python/pulumi_azure/purview/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -29,13 +29,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + AccountIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -99,12 +124,33 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_id: The ID of the managed resource group. :param pulumi.Input[str] storage_account_id: The ID of the managed storage account. """ + AccountManagedResourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_hub_namespace_id=event_hub_namespace_id, + resource_group_id=resource_group_id, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_hub_namespace_id: Optional[pulumi.Input[str]] = None, + resource_group_id: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_hub_namespace_id is None and 'eventHubNamespaceId' in kwargs: + event_hub_namespace_id = kwargs['eventHubNamespaceId'] + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if event_hub_namespace_id is not None: - pulumi.set(__self__, "event_hub_namespace_id", event_hub_namespace_id) + _setter("event_hub_namespace_id", event_hub_namespace_id) if resource_group_id is not None: - pulumi.set(__self__, "resource_group_id", resource_group_id) + _setter("resource_group_id", resource_group_id) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="eventHubNamespaceId") diff --git a/sdk/python/pulumi_azure/purview/account.py b/sdk/python/pulumi_azure/purview/account.py index 27150e9bf5..fea736809a 100644 --- a/sdk/python/pulumi_azure/purview/account.py +++ b/sdk/python/pulumi_azure/purview/account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,18 +35,51 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_enabled: Should the Purview Account be visible to the public network? Defaults to `true`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Purview Account. """ - pulumi.set(__self__, "identity", identity) - pulumi.set(__self__, "resource_group_name", resource_group_name) + AccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity=identity, + resource_group_name=resource_group_name, + location=location, + managed_resource_group_name=managed_resource_group_name, + name=name, + public_network_enabled=public_network_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity is None: + raise TypeError("Missing 'identity' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if managed_resource_group_name is None and 'managedResourceGroupName' in kwargs: + managed_resource_group_name = kwargs['managedResourceGroupName'] + if public_network_enabled is None and 'publicNetworkEnabled' in kwargs: + public_network_enabled = kwargs['publicNetworkEnabled'] + + _setter("identity", identity) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_resource_group_name is not None: - pulumi.set(__self__, "managed_resource_group_name", managed_resource_group_name) + _setter("managed_resource_group_name", managed_resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_enabled is not None: - pulumi.set(__self__, "public_network_enabled", public_network_enabled) + _setter("public_network_enabled", public_network_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -169,32 +202,85 @@ def __init__(__self__, *, :param pulumi.Input[str] scan_endpoint: Scan endpoint. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Purview Account. """ + _AccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + atlas_kafka_endpoint_primary_connection_string=atlas_kafka_endpoint_primary_connection_string, + atlas_kafka_endpoint_secondary_connection_string=atlas_kafka_endpoint_secondary_connection_string, + catalog_endpoint=catalog_endpoint, + guardian_endpoint=guardian_endpoint, + identity=identity, + location=location, + managed_resource_group_name=managed_resource_group_name, + managed_resources=managed_resources, + name=name, + public_network_enabled=public_network_enabled, + resource_group_name=resource_group_name, + scan_endpoint=scan_endpoint, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + atlas_kafka_endpoint_primary_connection_string: Optional[pulumi.Input[str]] = None, + atlas_kafka_endpoint_secondary_connection_string: Optional[pulumi.Input[str]] = None, + catalog_endpoint: Optional[pulumi.Input[str]] = None, + guardian_endpoint: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + managed_resource_group_name: Optional[pulumi.Input[str]] = None, + managed_resources: Optional[pulumi.Input[Sequence[pulumi.Input['AccountManagedResourceArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scan_endpoint: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if atlas_kafka_endpoint_primary_connection_string is None and 'atlasKafkaEndpointPrimaryConnectionString' in kwargs: + atlas_kafka_endpoint_primary_connection_string = kwargs['atlasKafkaEndpointPrimaryConnectionString'] + if atlas_kafka_endpoint_secondary_connection_string is None and 'atlasKafkaEndpointSecondaryConnectionString' in kwargs: + atlas_kafka_endpoint_secondary_connection_string = kwargs['atlasKafkaEndpointSecondaryConnectionString'] + if catalog_endpoint is None and 'catalogEndpoint' in kwargs: + catalog_endpoint = kwargs['catalogEndpoint'] + if guardian_endpoint is None and 'guardianEndpoint' in kwargs: + guardian_endpoint = kwargs['guardianEndpoint'] + if managed_resource_group_name is None and 'managedResourceGroupName' in kwargs: + managed_resource_group_name = kwargs['managedResourceGroupName'] + if managed_resources is None and 'managedResources' in kwargs: + managed_resources = kwargs['managedResources'] + if public_network_enabled is None and 'publicNetworkEnabled' in kwargs: + public_network_enabled = kwargs['publicNetworkEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if scan_endpoint is None and 'scanEndpoint' in kwargs: + scan_endpoint = kwargs['scanEndpoint'] + if atlas_kafka_endpoint_primary_connection_string is not None: - pulumi.set(__self__, "atlas_kafka_endpoint_primary_connection_string", atlas_kafka_endpoint_primary_connection_string) + _setter("atlas_kafka_endpoint_primary_connection_string", atlas_kafka_endpoint_primary_connection_string) if atlas_kafka_endpoint_secondary_connection_string is not None: - pulumi.set(__self__, "atlas_kafka_endpoint_secondary_connection_string", atlas_kafka_endpoint_secondary_connection_string) + _setter("atlas_kafka_endpoint_secondary_connection_string", atlas_kafka_endpoint_secondary_connection_string) if catalog_endpoint is not None: - pulumi.set(__self__, "catalog_endpoint", catalog_endpoint) + _setter("catalog_endpoint", catalog_endpoint) if guardian_endpoint is not None: - pulumi.set(__self__, "guardian_endpoint", guardian_endpoint) + _setter("guardian_endpoint", guardian_endpoint) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_resource_group_name is not None: - pulumi.set(__self__, "managed_resource_group_name", managed_resource_group_name) + _setter("managed_resource_group_name", managed_resource_group_name) if managed_resources is not None: - pulumi.set(__self__, "managed_resources", managed_resources) + _setter("managed_resources", managed_resources) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_enabled is not None: - pulumi.set(__self__, "public_network_enabled", public_network_enabled) + _setter("public_network_enabled", public_network_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scan_endpoint is not None: - pulumi.set(__self__, "scan_endpoint", scan_endpoint) + _setter("scan_endpoint", scan_endpoint) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="atlasKafkaEndpointPrimaryConnectionString") @@ -448,6 +534,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -469,6 +559,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = AccountArgs.__new__(AccountArgs) + if identity is not None and not isinstance(identity, AccountIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + AccountIdentityArgs._configure(_setter, **identity) if identity is None and not opts.urn: raise TypeError("Missing required property 'identity'") __props__.__dict__["identity"] = identity diff --git a/sdk/python/pulumi_azure/purview/outputs.py b/sdk/python/pulumi_azure/purview/outputs.py index 71ae510078..7915053faf 100644 --- a/sdk/python/pulumi_azure/purview/outputs.py +++ b/sdk/python/pulumi_azure/purview/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -50,13 +50,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + AccountIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -125,12 +150,33 @@ def __init__(__self__, *, :param str resource_group_id: The ID of the managed resource group. :param str storage_account_id: The ID of the managed storage account. """ + AccountManagedResource._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_hub_namespace_id=event_hub_namespace_id, + resource_group_id=resource_group_id, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_hub_namespace_id: Optional[str] = None, + resource_group_id: Optional[str] = None, + storage_account_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_hub_namespace_id is None and 'eventHubNamespaceId' in kwargs: + event_hub_namespace_id = kwargs['eventHubNamespaceId'] + if resource_group_id is None and 'resourceGroupId' in kwargs: + resource_group_id = kwargs['resourceGroupId'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if event_hub_namespace_id is not None: - pulumi.set(__self__, "event_hub_namespace_id", event_hub_namespace_id) + _setter("event_hub_namespace_id", event_hub_namespace_id) if resource_group_id is not None: - pulumi.set(__self__, "resource_group_id", resource_group_id) + _setter("resource_group_id", resource_group_id) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="eventHubNamespaceId") diff --git a/sdk/python/pulumi_azure/recoveryservices/_inputs.py b/sdk/python/pulumi_azure/recoveryservices/_inputs.py index d342a7ef90..9e9f322a00 100644 --- a/sdk/python/pulumi_azure/recoveryservices/_inputs.py +++ b/sdk/python/pulumi_azure/recoveryservices/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -32,12 +32,41 @@ def __init__(__self__, *, !> **Note:** Once `infrastructure_encryption_enabled` has been set it's not possible to change it. :param pulumi.Input[str] user_assigned_identity_id: Specifies the user assigned identity ID to be used. """ - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) - pulumi.set(__self__, "key_id", key_id) + VaultEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + key_id=key_id, + use_system_assigned_identity=use_system_assigned_identity, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + infrastructure_encryption_enabled: Optional[pulumi.Input[bool]] = None, + key_id: Optional[pulumi.Input[str]] = None, + use_system_assigned_identity: Optional[pulumi.Input[bool]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + if infrastructure_encryption_enabled is None: + raise TypeError("Missing 'infrastructure_encryption_enabled' argument") + if key_id is None and 'keyId' in kwargs: + key_id = kwargs['keyId'] + if key_id is None: + raise TypeError("Missing 'key_id' argument") + if use_system_assigned_identity is None and 'useSystemAssignedIdentity' in kwargs: + use_system_assigned_identity = kwargs['useSystemAssignedIdentity'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("key_id", key_id) if use_system_assigned_identity is not None: - pulumi.set(__self__, "use_system_assigned_identity", use_system_assigned_identity) + _setter("use_system_assigned_identity", use_system_assigned_identity) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="infrastructureEncryptionEnabled") @@ -107,13 +136,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + VaultIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -175,10 +229,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] alerts_for_all_job_failures_enabled: Enabling/Disabling built-in Azure Monitor alerts for security scenarios and job failure scenarios. Defaults to `true`. :param pulumi.Input[bool] alerts_for_critical_operation_failures_enabled: Enabling/Disabling alerts from the older (classic alerts) solution. Defaults to `true`. More details could be found [here](https://learn.microsoft.com/en-us/azure/backup/monitoring-and-alerts-overview). """ + VaultMonitoringArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + alerts_for_all_job_failures_enabled=alerts_for_all_job_failures_enabled, + alerts_for_critical_operation_failures_enabled=alerts_for_critical_operation_failures_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alerts_for_all_job_failures_enabled: Optional[pulumi.Input[bool]] = None, + alerts_for_critical_operation_failures_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alerts_for_all_job_failures_enabled is None and 'alertsForAllJobFailuresEnabled' in kwargs: + alerts_for_all_job_failures_enabled = kwargs['alertsForAllJobFailuresEnabled'] + if alerts_for_critical_operation_failures_enabled is None and 'alertsForCriticalOperationFailuresEnabled' in kwargs: + alerts_for_critical_operation_failures_enabled = kwargs['alertsForCriticalOperationFailuresEnabled'] + if alerts_for_all_job_failures_enabled is not None: - pulumi.set(__self__, "alerts_for_all_job_failures_enabled", alerts_for_all_job_failures_enabled) + _setter("alerts_for_all_job_failures_enabled", alerts_for_all_job_failures_enabled) if alerts_for_critical_operation_failures_enabled is not None: - pulumi.set(__self__, "alerts_for_critical_operation_failures_enabled", alerts_for_critical_operation_failures_enabled) + _setter("alerts_for_critical_operation_failures_enabled", alerts_for_critical_operation_failures_enabled) @property @pulumi.getter(name="alertsForAllJobFailuresEnabled") diff --git a/sdk/python/pulumi_azure/recoveryservices/get_vault.py b/sdk/python/pulumi_azure/recoveryservices/get_vault.py index 03384705a3..921de3fc61 100644 --- a/sdk/python/pulumi_azure/recoveryservices/get_vault.py +++ b/sdk/python/pulumi_azure/recoveryservices/get_vault.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/recoveryservices/outputs.py b/sdk/python/pulumi_azure/recoveryservices/outputs.py index b069287019..4ca5e07ac8 100644 --- a/sdk/python/pulumi_azure/recoveryservices/outputs.py +++ b/sdk/python/pulumi_azure/recoveryservices/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -55,12 +55,41 @@ def __init__(__self__, *, !> **Note:** Once `infrastructure_encryption_enabled` has been set it's not possible to change it. :param str user_assigned_identity_id: Specifies the user assigned identity ID to be used. """ - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) - pulumi.set(__self__, "key_id", key_id) + VaultEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + key_id=key_id, + use_system_assigned_identity=use_system_assigned_identity, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + infrastructure_encryption_enabled: Optional[bool] = None, + key_id: Optional[str] = None, + use_system_assigned_identity: Optional[bool] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + if infrastructure_encryption_enabled is None: + raise TypeError("Missing 'infrastructure_encryption_enabled' argument") + if key_id is None and 'keyId' in kwargs: + key_id = kwargs['keyId'] + if key_id is None: + raise TypeError("Missing 'key_id' argument") + if use_system_assigned_identity is None and 'useSystemAssignedIdentity' in kwargs: + use_system_assigned_identity = kwargs['useSystemAssignedIdentity'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("key_id", key_id) if use_system_assigned_identity is not None: - pulumi.set(__self__, "use_system_assigned_identity", use_system_assigned_identity) + _setter("use_system_assigned_identity", use_system_assigned_identity) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="infrastructureEncryptionEnabled") @@ -135,13 +164,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + VaultIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -206,10 +260,27 @@ def __init__(__self__, *, :param bool alerts_for_all_job_failures_enabled: Enabling/Disabling built-in Azure Monitor alerts for security scenarios and job failure scenarios. Defaults to `true`. :param bool alerts_for_critical_operation_failures_enabled: Enabling/Disabling alerts from the older (classic alerts) solution. Defaults to `true`. More details could be found [here](https://learn.microsoft.com/en-us/azure/backup/monitoring-and-alerts-overview). """ + VaultMonitoring._configure( + lambda key, value: pulumi.set(__self__, key, value), + alerts_for_all_job_failures_enabled=alerts_for_all_job_failures_enabled, + alerts_for_critical_operation_failures_enabled=alerts_for_critical_operation_failures_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alerts_for_all_job_failures_enabled: Optional[bool] = None, + alerts_for_critical_operation_failures_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alerts_for_all_job_failures_enabled is None and 'alertsForAllJobFailuresEnabled' in kwargs: + alerts_for_all_job_failures_enabled = kwargs['alertsForAllJobFailuresEnabled'] + if alerts_for_critical_operation_failures_enabled is None and 'alertsForCriticalOperationFailuresEnabled' in kwargs: + alerts_for_critical_operation_failures_enabled = kwargs['alertsForCriticalOperationFailuresEnabled'] + if alerts_for_all_job_failures_enabled is not None: - pulumi.set(__self__, "alerts_for_all_job_failures_enabled", alerts_for_all_job_failures_enabled) + _setter("alerts_for_all_job_failures_enabled", alerts_for_all_job_failures_enabled) if alerts_for_critical_operation_failures_enabled is not None: - pulumi.set(__self__, "alerts_for_critical_operation_failures_enabled", alerts_for_critical_operation_failures_enabled) + _setter("alerts_for_critical_operation_failures_enabled", alerts_for_critical_operation_failures_enabled) @property @pulumi.getter(name="alertsForAllJobFailuresEnabled") diff --git a/sdk/python/pulumi_azure/recoveryservices/vault.py b/sdk/python/pulumi_azure/recoveryservices/vault.py index 4c67b033d4..55f3f93259 100644 --- a/sdk/python/pulumi_azure/recoveryservices/vault.py +++ b/sdk/python/pulumi_azure/recoveryservices/vault.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -51,32 +51,85 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_mode_type: The storage type of the Recovery Services Vault. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Defaults to `GeoRedundant`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + VaultArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + classic_vmware_replication_enabled=classic_vmware_replication_enabled, + cross_region_restore_enabled=cross_region_restore_enabled, + encryption=encryption, + identity=identity, + immutability=immutability, + location=location, + monitoring=monitoring, + name=name, + public_network_access_enabled=public_network_access_enabled, + soft_delete_enabled=soft_delete_enabled, + storage_mode_type=storage_mode_type, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + classic_vmware_replication_enabled: Optional[pulumi.Input[bool]] = None, + cross_region_restore_enabled: Optional[pulumi.Input[bool]] = None, + encryption: Optional[pulumi.Input['VaultEncryptionArgs']] = None, + identity: Optional[pulumi.Input['VaultIdentityArgs']] = None, + immutability: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + monitoring: Optional[pulumi.Input['VaultMonitoringArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + soft_delete_enabled: Optional[pulumi.Input[bool]] = None, + storage_mode_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if classic_vmware_replication_enabled is None and 'classicVmwareReplicationEnabled' in kwargs: + classic_vmware_replication_enabled = kwargs['classicVmwareReplicationEnabled'] + if cross_region_restore_enabled is None and 'crossRegionRestoreEnabled' in kwargs: + cross_region_restore_enabled = kwargs['crossRegionRestoreEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if soft_delete_enabled is None and 'softDeleteEnabled' in kwargs: + soft_delete_enabled = kwargs['softDeleteEnabled'] + if storage_mode_type is None and 'storageModeType' in kwargs: + storage_mode_type = kwargs['storageModeType'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if classic_vmware_replication_enabled is not None: - pulumi.set(__self__, "classic_vmware_replication_enabled", classic_vmware_replication_enabled) + _setter("classic_vmware_replication_enabled", classic_vmware_replication_enabled) if cross_region_restore_enabled is not None: - pulumi.set(__self__, "cross_region_restore_enabled", cross_region_restore_enabled) + _setter("cross_region_restore_enabled", cross_region_restore_enabled) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if immutability is not None: - pulumi.set(__self__, "immutability", immutability) + _setter("immutability", immutability) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if monitoring is not None: - pulumi.set(__self__, "monitoring", monitoring) + _setter("monitoring", monitoring) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if soft_delete_enabled is not None: - pulumi.set(__self__, "soft_delete_enabled", soft_delete_enabled) + _setter("soft_delete_enabled", soft_delete_enabled) if storage_mode_type is not None: - pulumi.set(__self__, "storage_mode_type", storage_mode_type) + _setter("storage_mode_type", storage_mode_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -289,34 +342,83 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_mode_type: The storage type of the Recovery Services Vault. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Defaults to `GeoRedundant`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _VaultState._configure( + lambda key, value: pulumi.set(__self__, key, value), + classic_vmware_replication_enabled=classic_vmware_replication_enabled, + cross_region_restore_enabled=cross_region_restore_enabled, + encryption=encryption, + identity=identity, + immutability=immutability, + location=location, + monitoring=monitoring, + name=name, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + sku=sku, + soft_delete_enabled=soft_delete_enabled, + storage_mode_type=storage_mode_type, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + classic_vmware_replication_enabled: Optional[pulumi.Input[bool]] = None, + cross_region_restore_enabled: Optional[pulumi.Input[bool]] = None, + encryption: Optional[pulumi.Input['VaultEncryptionArgs']] = None, + identity: Optional[pulumi.Input['VaultIdentityArgs']] = None, + immutability: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + monitoring: Optional[pulumi.Input['VaultMonitoringArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + soft_delete_enabled: Optional[pulumi.Input[bool]] = None, + storage_mode_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if classic_vmware_replication_enabled is None and 'classicVmwareReplicationEnabled' in kwargs: + classic_vmware_replication_enabled = kwargs['classicVmwareReplicationEnabled'] + if cross_region_restore_enabled is None and 'crossRegionRestoreEnabled' in kwargs: + cross_region_restore_enabled = kwargs['crossRegionRestoreEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if soft_delete_enabled is None and 'softDeleteEnabled' in kwargs: + soft_delete_enabled = kwargs['softDeleteEnabled'] + if storage_mode_type is None and 'storageModeType' in kwargs: + storage_mode_type = kwargs['storageModeType'] + if classic_vmware_replication_enabled is not None: - pulumi.set(__self__, "classic_vmware_replication_enabled", classic_vmware_replication_enabled) + _setter("classic_vmware_replication_enabled", classic_vmware_replication_enabled) if cross_region_restore_enabled is not None: - pulumi.set(__self__, "cross_region_restore_enabled", cross_region_restore_enabled) + _setter("cross_region_restore_enabled", cross_region_restore_enabled) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if immutability is not None: - pulumi.set(__self__, "immutability", immutability) + _setter("immutability", immutability) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if monitoring is not None: - pulumi.set(__self__, "monitoring", monitoring) + _setter("monitoring", monitoring) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if soft_delete_enabled is not None: - pulumi.set(__self__, "soft_delete_enabled", soft_delete_enabled) + _setter("soft_delete_enabled", soft_delete_enabled) if storage_mode_type is not None: - pulumi.set(__self__, "storage_mode_type", storage_mode_type) + _setter("storage_mode_type", storage_mode_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="classicVmwareReplicationEnabled") @@ -598,6 +700,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VaultArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -628,10 +734,25 @@ def _internal_init(__self__, __props__.__dict__["classic_vmware_replication_enabled"] = classic_vmware_replication_enabled __props__.__dict__["cross_region_restore_enabled"] = cross_region_restore_enabled + if encryption is not None and not isinstance(encryption, VaultEncryptionArgs): + encryption = encryption or {} + def _setter(key, value): + encryption[key] = value + VaultEncryptionArgs._configure(_setter, **encryption) __props__.__dict__["encryption"] = encryption + if identity is not None and not isinstance(identity, VaultIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + VaultIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["immutability"] = immutability __props__.__dict__["location"] = location + if monitoring is not None and not isinstance(monitoring, VaultMonitoringArgs): + monitoring = monitoring or {} + def _setter(key, value): + monitoring[key] = value + VaultMonitoringArgs._configure(_setter, **monitoring) __props__.__dict__["monitoring"] = monitoring __props__.__dict__["name"] = name __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled diff --git a/sdk/python/pulumi_azure/recoveryservices/vault_resource_guard_association.py b/sdk/python/pulumi_azure/recoveryservices/vault_resource_guard_association.py index 3cfa9d410c..054858b3ca 100644 --- a/sdk/python/pulumi_azure/recoveryservices/vault_resource_guard_association.py +++ b/sdk/python/pulumi_azure/recoveryservices/vault_resource_guard_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VaultResourceGuardAssociationArgs', 'VaultResourceGuardAssociation'] @@ -25,13 +25,36 @@ def __init__(__self__, *, > **NOTE:** `name` has been deprecated and will be removed in version 4.0 of the provider. """ - pulumi.set(__self__, "resource_guard_id", resource_guard_id) - pulumi.set(__self__, "vault_id", vault_id) + VaultResourceGuardAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_guard_id=resource_guard_id, + vault_id=vault_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_guard_id: Optional[pulumi.Input[str]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_guard_id is None and 'resourceGuardId' in kwargs: + resource_guard_id = kwargs['resourceGuardId'] + if resource_guard_id is None: + raise TypeError("Missing 'resource_guard_id' argument") + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if vault_id is None: + raise TypeError("Missing 'vault_id' argument") + + _setter("resource_guard_id", resource_guard_id) + _setter("vault_id", vault_id) if name is not None: warnings.warn("""The `name` field will be removed in v4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""name is deprecated: The `name` field will be removed in v4.0 of the AzureRM Provider.""") if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="resourceGuardId") @@ -89,15 +112,34 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_guard_id: ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created. :param pulumi.Input[str] vault_id: ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created. """ + _VaultResourceGuardAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_guard_id=resource_guard_id, + vault_id=vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_guard_id: Optional[pulumi.Input[str]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_guard_id is None and 'resourceGuardId' in kwargs: + resource_guard_id = kwargs['resourceGuardId'] + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if name is not None: warnings.warn("""The `name` field will be removed in v4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""name is deprecated: The `name` field will be removed in v4.0 of the AzureRM Provider.""") if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_guard_id is not None: - pulumi.set(__self__, "resource_guard_id", resource_guard_id) + _setter("resource_guard_id", resource_guard_id) if vault_id is not None: - pulumi.set(__self__, "vault_id", vault_id) + _setter("vault_id", vault_id) @property @pulumi.getter @@ -236,6 +278,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VaultResourceGuardAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/redis/_inputs.py b/sdk/python/pulumi_azure/redis/_inputs.py index e2930f2748..b23dac9dbd 100644 --- a/sdk/python/pulumi_azure/redis/_inputs.py +++ b/sdk/python/pulumi_azure/redis/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -29,13 +29,38 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. """ - pulumi.set(__self__, "type", type) + CacheIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -95,11 +120,34 @@ def __init__(__self__, *, > **Note:** The Patch Window lasts for `5` hours from the `start_hour_utc`. """ - pulumi.set(__self__, "day_of_week", day_of_week) + CachePatchScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + maintenance_window=maintenance_window, + start_hour_utc=start_hour_utc, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[pulumi.Input[str]] = None, + maintenance_window: Optional[pulumi.Input[str]] = None, + start_hour_utc: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if day_of_week is None: + raise TypeError("Missing 'day_of_week' argument") + if maintenance_window is None and 'maintenanceWindow' in kwargs: + maintenance_window = kwargs['maintenanceWindow'] + if start_hour_utc is None and 'startHourUtc' in kwargs: + start_hour_utc = kwargs['startHourUtc'] + + _setter("day_of_week", day_of_week) if maintenance_window is not None: - pulumi.set(__self__, "maintenance_window", maintenance_window) + _setter("maintenance_window", maintenance_window) if start_hour_utc is not None: - pulumi.set(__self__, "start_hour_utc", start_hour_utc) + _setter("start_hour_utc", start_hour_utc) @property @pulumi.getter(name="dayOfWeek") @@ -191,34 +239,97 @@ def __init__(__self__, *, > **NOTE:** There's a bug in the Redis API where the original storage connection string isn't being returned, which [is being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/3037). In the interim you can use [the `ignoreChanges` attribute to ignore changes to this field](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) e.g.: """ + CacheRedisConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aof_backup_enabled=aof_backup_enabled, + aof_storage_connection_string0=aof_storage_connection_string0, + aof_storage_connection_string1=aof_storage_connection_string1, + enable_authentication=enable_authentication, + maxclients=maxclients, + maxfragmentationmemory_reserved=maxfragmentationmemory_reserved, + maxmemory_delta=maxmemory_delta, + maxmemory_policy=maxmemory_policy, + maxmemory_reserved=maxmemory_reserved, + notify_keyspace_events=notify_keyspace_events, + rdb_backup_enabled=rdb_backup_enabled, + rdb_backup_frequency=rdb_backup_frequency, + rdb_backup_max_snapshot_count=rdb_backup_max_snapshot_count, + rdb_storage_connection_string=rdb_storage_connection_string, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aof_backup_enabled: Optional[pulumi.Input[bool]] = None, + aof_storage_connection_string0: Optional[pulumi.Input[str]] = None, + aof_storage_connection_string1: Optional[pulumi.Input[str]] = None, + enable_authentication: Optional[pulumi.Input[bool]] = None, + maxclients: Optional[pulumi.Input[int]] = None, + maxfragmentationmemory_reserved: Optional[pulumi.Input[int]] = None, + maxmemory_delta: Optional[pulumi.Input[int]] = None, + maxmemory_policy: Optional[pulumi.Input[str]] = None, + maxmemory_reserved: Optional[pulumi.Input[int]] = None, + notify_keyspace_events: Optional[pulumi.Input[str]] = None, + rdb_backup_enabled: Optional[pulumi.Input[bool]] = None, + rdb_backup_frequency: Optional[pulumi.Input[int]] = None, + rdb_backup_max_snapshot_count: Optional[pulumi.Input[int]] = None, + rdb_storage_connection_string: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aof_backup_enabled is None and 'aofBackupEnabled' in kwargs: + aof_backup_enabled = kwargs['aofBackupEnabled'] + if aof_storage_connection_string0 is None and 'aofStorageConnectionString0' in kwargs: + aof_storage_connection_string0 = kwargs['aofStorageConnectionString0'] + if aof_storage_connection_string1 is None and 'aofStorageConnectionString1' in kwargs: + aof_storage_connection_string1 = kwargs['aofStorageConnectionString1'] + if enable_authentication is None and 'enableAuthentication' in kwargs: + enable_authentication = kwargs['enableAuthentication'] + if maxfragmentationmemory_reserved is None and 'maxfragmentationmemoryReserved' in kwargs: + maxfragmentationmemory_reserved = kwargs['maxfragmentationmemoryReserved'] + if maxmemory_delta is None and 'maxmemoryDelta' in kwargs: + maxmemory_delta = kwargs['maxmemoryDelta'] + if maxmemory_policy is None and 'maxmemoryPolicy' in kwargs: + maxmemory_policy = kwargs['maxmemoryPolicy'] + if maxmemory_reserved is None and 'maxmemoryReserved' in kwargs: + maxmemory_reserved = kwargs['maxmemoryReserved'] + if notify_keyspace_events is None and 'notifyKeyspaceEvents' in kwargs: + notify_keyspace_events = kwargs['notifyKeyspaceEvents'] + if rdb_backup_enabled is None and 'rdbBackupEnabled' in kwargs: + rdb_backup_enabled = kwargs['rdbBackupEnabled'] + if rdb_backup_frequency is None and 'rdbBackupFrequency' in kwargs: + rdb_backup_frequency = kwargs['rdbBackupFrequency'] + if rdb_backup_max_snapshot_count is None and 'rdbBackupMaxSnapshotCount' in kwargs: + rdb_backup_max_snapshot_count = kwargs['rdbBackupMaxSnapshotCount'] + if rdb_storage_connection_string is None and 'rdbStorageConnectionString' in kwargs: + rdb_storage_connection_string = kwargs['rdbStorageConnectionString'] + if aof_backup_enabled is not None: - pulumi.set(__self__, "aof_backup_enabled", aof_backup_enabled) + _setter("aof_backup_enabled", aof_backup_enabled) if aof_storage_connection_string0 is not None: - pulumi.set(__self__, "aof_storage_connection_string0", aof_storage_connection_string0) + _setter("aof_storage_connection_string0", aof_storage_connection_string0) if aof_storage_connection_string1 is not None: - pulumi.set(__self__, "aof_storage_connection_string1", aof_storage_connection_string1) + _setter("aof_storage_connection_string1", aof_storage_connection_string1) if enable_authentication is not None: - pulumi.set(__self__, "enable_authentication", enable_authentication) + _setter("enable_authentication", enable_authentication) if maxclients is not None: - pulumi.set(__self__, "maxclients", maxclients) + _setter("maxclients", maxclients) if maxfragmentationmemory_reserved is not None: - pulumi.set(__self__, "maxfragmentationmemory_reserved", maxfragmentationmemory_reserved) + _setter("maxfragmentationmemory_reserved", maxfragmentationmemory_reserved) if maxmemory_delta is not None: - pulumi.set(__self__, "maxmemory_delta", maxmemory_delta) + _setter("maxmemory_delta", maxmemory_delta) if maxmemory_policy is not None: - pulumi.set(__self__, "maxmemory_policy", maxmemory_policy) + _setter("maxmemory_policy", maxmemory_policy) if maxmemory_reserved is not None: - pulumi.set(__self__, "maxmemory_reserved", maxmemory_reserved) + _setter("maxmemory_reserved", maxmemory_reserved) if notify_keyspace_events is not None: - pulumi.set(__self__, "notify_keyspace_events", notify_keyspace_events) + _setter("notify_keyspace_events", notify_keyspace_events) if rdb_backup_enabled is not None: - pulumi.set(__self__, "rdb_backup_enabled", rdb_backup_enabled) + _setter("rdb_backup_enabled", rdb_backup_enabled) if rdb_backup_frequency is not None: - pulumi.set(__self__, "rdb_backup_frequency", rdb_backup_frequency) + _setter("rdb_backup_frequency", rdb_backup_frequency) if rdb_backup_max_snapshot_count is not None: - pulumi.set(__self__, "rdb_backup_max_snapshot_count", rdb_backup_max_snapshot_count) + _setter("rdb_backup_max_snapshot_count", rdb_backup_max_snapshot_count) if rdb_storage_connection_string is not None: - pulumi.set(__self__, "rdb_storage_connection_string", rdb_storage_connection_string) + _setter("rdb_storage_connection_string", rdb_storage_connection_string) @property @pulumi.getter(name="aofBackupEnabled") @@ -417,11 +528,28 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this module. Possible values are `RedisBloom`, `RedisTimeSeries`, `RediSearch` and `RedisJSON`. Changing this forces a new Redis Enterprise Database to be created. :param pulumi.Input[str] args: Configuration options for the module (e.g. `ERROR_RATE 0.00 INITIAL_SIZE 400`). Changing this forces a new resource to be created. Defaults to `""`. """ - pulumi.set(__self__, "name", name) + EnterpriseDatabaseModuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + args=args, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + args: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if args is not None: - pulumi.set(__self__, "args", args) + _setter("args", args) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/redis/cache.py b/sdk/python/pulumi_azure/redis/cache.py index 8b2c4997c5..6d25863fc6 100644 --- a/sdk/python/pulumi_azure/redis/cache.py +++ b/sdk/python/pulumi_azure/redis/cache.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -67,44 +67,131 @@ def __init__(__self__, *, > **Please Note**: Availability Zones are [in Preview and only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview) - as such you must be opted into the Preview to use this functionality. You can [opt into the Availability Zones Preview in the Azure Portal](https://aka.ms/azenroll). """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "family", family) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + CacheArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + family=family, + resource_group_name=resource_group_name, + sku_name=sku_name, + enable_non_ssl_port=enable_non_ssl_port, + identity=identity, + location=location, + minimum_tls_version=minimum_tls_version, + name=name, + patch_schedules=patch_schedules, + private_static_ip_address=private_static_ip_address, + public_network_access_enabled=public_network_access_enabled, + redis_configuration=redis_configuration, + redis_version=redis_version, + replicas_per_master=replicas_per_master, + replicas_per_primary=replicas_per_primary, + shard_count=shard_count, + subnet_id=subnet_id, + tags=tags, + tenant_settings=tenant_settings, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + family: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + enable_non_ssl_port: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['CacheIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + patch_schedules: Optional[pulumi.Input[Sequence[pulumi.Input['CachePatchScheduleArgs']]]] = None, + private_static_ip_address: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + redis_configuration: Optional[pulumi.Input['CacheRedisConfigurationArgs']] = None, + redis_version: Optional[pulumi.Input[str]] = None, + replicas_per_master: Optional[pulumi.Input[int]] = None, + replicas_per_primary: Optional[pulumi.Input[int]] = None, + shard_count: Optional[pulumi.Input[int]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if family is None: + raise TypeError("Missing 'family' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if enable_non_ssl_port is None and 'enableNonSslPort' in kwargs: + enable_non_ssl_port = kwargs['enableNonSslPort'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if patch_schedules is None and 'patchSchedules' in kwargs: + patch_schedules = kwargs['patchSchedules'] + if private_static_ip_address is None and 'privateStaticIpAddress' in kwargs: + private_static_ip_address = kwargs['privateStaticIpAddress'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if redis_configuration is None and 'redisConfiguration' in kwargs: + redis_configuration = kwargs['redisConfiguration'] + if redis_version is None and 'redisVersion' in kwargs: + redis_version = kwargs['redisVersion'] + if replicas_per_master is None and 'replicasPerMaster' in kwargs: + replicas_per_master = kwargs['replicasPerMaster'] + if replicas_per_primary is None and 'replicasPerPrimary' in kwargs: + replicas_per_primary = kwargs['replicasPerPrimary'] + if shard_count is None and 'shardCount' in kwargs: + shard_count = kwargs['shardCount'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if tenant_settings is None and 'tenantSettings' in kwargs: + tenant_settings = kwargs['tenantSettings'] + + _setter("capacity", capacity) + _setter("family", family) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if enable_non_ssl_port is not None: - pulumi.set(__self__, "enable_non_ssl_port", enable_non_ssl_port) + _setter("enable_non_ssl_port", enable_non_ssl_port) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if patch_schedules is not None: - pulumi.set(__self__, "patch_schedules", patch_schedules) + _setter("patch_schedules", patch_schedules) if private_static_ip_address is not None: - pulumi.set(__self__, "private_static_ip_address", private_static_ip_address) + _setter("private_static_ip_address", private_static_ip_address) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if redis_configuration is not None: - pulumi.set(__self__, "redis_configuration", redis_configuration) + _setter("redis_configuration", redis_configuration) if redis_version is not None: - pulumi.set(__self__, "redis_version", redis_version) + _setter("redis_version", redis_version) if replicas_per_master is not None: - pulumi.set(__self__, "replicas_per_master", replicas_per_master) + _setter("replicas_per_master", replicas_per_master) if replicas_per_primary is not None: - pulumi.set(__self__, "replicas_per_primary", replicas_per_primary) + _setter("replicas_per_primary", replicas_per_primary) if shard_count is not None: - pulumi.set(__self__, "shard_count", shard_count) + _setter("shard_count", shard_count) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_settings is not None: - pulumi.set(__self__, "tenant_settings", tenant_settings) + _setter("tenant_settings", tenant_settings) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -433,62 +520,165 @@ def __init__(__self__, *, > **Please Note**: Availability Zones are [in Preview and only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview) - as such you must be opted into the Preview to use this functionality. You can [opt into the Availability Zones Preview in the Azure Portal](https://aka.ms/azenroll). """ + _CacheState._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + enable_non_ssl_port=enable_non_ssl_port, + family=family, + hostname=hostname, + identity=identity, + location=location, + minimum_tls_version=minimum_tls_version, + name=name, + patch_schedules=patch_schedules, + port=port, + primary_access_key=primary_access_key, + primary_connection_string=primary_connection_string, + private_static_ip_address=private_static_ip_address, + public_network_access_enabled=public_network_access_enabled, + redis_configuration=redis_configuration, + redis_version=redis_version, + replicas_per_master=replicas_per_master, + replicas_per_primary=replicas_per_primary, + resource_group_name=resource_group_name, + secondary_access_key=secondary_access_key, + secondary_connection_string=secondary_connection_string, + shard_count=shard_count, + sku_name=sku_name, + ssl_port=ssl_port, + subnet_id=subnet_id, + tags=tags, + tenant_settings=tenant_settings, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + enable_non_ssl_port: Optional[pulumi.Input[bool]] = None, + family: Optional[pulumi.Input[str]] = None, + hostname: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['CacheIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + patch_schedules: Optional[pulumi.Input[Sequence[pulumi.Input['CachePatchScheduleArgs']]]] = None, + port: Optional[pulumi.Input[int]] = None, + primary_access_key: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + private_static_ip_address: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + redis_configuration: Optional[pulumi.Input['CacheRedisConfigurationArgs']] = None, + redis_version: Optional[pulumi.Input[str]] = None, + replicas_per_master: Optional[pulumi.Input[int]] = None, + replicas_per_primary: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_access_key: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + shard_count: Optional[pulumi.Input[int]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + ssl_port: Optional[pulumi.Input[int]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_settings: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enable_non_ssl_port is None and 'enableNonSslPort' in kwargs: + enable_non_ssl_port = kwargs['enableNonSslPort'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if patch_schedules is None and 'patchSchedules' in kwargs: + patch_schedules = kwargs['patchSchedules'] + if primary_access_key is None and 'primaryAccessKey' in kwargs: + primary_access_key = kwargs['primaryAccessKey'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if private_static_ip_address is None and 'privateStaticIpAddress' in kwargs: + private_static_ip_address = kwargs['privateStaticIpAddress'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if redis_configuration is None and 'redisConfiguration' in kwargs: + redis_configuration = kwargs['redisConfiguration'] + if redis_version is None and 'redisVersion' in kwargs: + redis_version = kwargs['redisVersion'] + if replicas_per_master is None and 'replicasPerMaster' in kwargs: + replicas_per_master = kwargs['replicasPerMaster'] + if replicas_per_primary is None and 'replicasPerPrimary' in kwargs: + replicas_per_primary = kwargs['replicasPerPrimary'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_access_key is None and 'secondaryAccessKey' in kwargs: + secondary_access_key = kwargs['secondaryAccessKey'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if shard_count is None and 'shardCount' in kwargs: + shard_count = kwargs['shardCount'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if ssl_port is None and 'sslPort' in kwargs: + ssl_port = kwargs['sslPort'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if tenant_settings is None and 'tenantSettings' in kwargs: + tenant_settings = kwargs['tenantSettings'] + if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if enable_non_ssl_port is not None: - pulumi.set(__self__, "enable_non_ssl_port", enable_non_ssl_port) + _setter("enable_non_ssl_port", enable_non_ssl_port) if family is not None: - pulumi.set(__self__, "family", family) + _setter("family", family) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if patch_schedules is not None: - pulumi.set(__self__, "patch_schedules", patch_schedules) + _setter("patch_schedules", patch_schedules) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if primary_access_key is not None: - pulumi.set(__self__, "primary_access_key", primary_access_key) + _setter("primary_access_key", primary_access_key) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if private_static_ip_address is not None: - pulumi.set(__self__, "private_static_ip_address", private_static_ip_address) + _setter("private_static_ip_address", private_static_ip_address) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if redis_configuration is not None: - pulumi.set(__self__, "redis_configuration", redis_configuration) + _setter("redis_configuration", redis_configuration) if redis_version is not None: - pulumi.set(__self__, "redis_version", redis_version) + _setter("redis_version", redis_version) if replicas_per_master is not None: - pulumi.set(__self__, "replicas_per_master", replicas_per_master) + _setter("replicas_per_master", replicas_per_master) if replicas_per_primary is not None: - pulumi.set(__self__, "replicas_per_primary", replicas_per_primary) + _setter("replicas_per_primary", replicas_per_primary) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_access_key is not None: - pulumi.set(__self__, "secondary_access_key", secondary_access_key) + _setter("secondary_access_key", secondary_access_key) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if shard_count is not None: - pulumi.set(__self__, "shard_count", shard_count) + _setter("shard_count", shard_count) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if ssl_port is not None: - pulumi.set(__self__, "ssl_port", ssl_port) + _setter("ssl_port", ssl_port) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_settings is not None: - pulumi.set(__self__, "tenant_settings", tenant_settings) + _setter("tenant_settings", tenant_settings) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -982,6 +1172,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CacheArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1024,6 +1218,11 @@ def _internal_init(__self__, if family is None and not opts.urn: raise TypeError("Missing required property 'family'") __props__.__dict__["family"] = family + if identity is not None and not isinstance(identity, CacheIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + CacheIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["minimum_tls_version"] = minimum_tls_version @@ -1031,6 +1230,11 @@ def _internal_init(__self__, __props__.__dict__["patch_schedules"] = patch_schedules __props__.__dict__["private_static_ip_address"] = private_static_ip_address __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled + if redis_configuration is not None and not isinstance(redis_configuration, CacheRedisConfigurationArgs): + redis_configuration = redis_configuration or {} + def _setter(key, value): + redis_configuration[key] = value + CacheRedisConfigurationArgs._configure(_setter, **redis_configuration) __props__.__dict__["redis_configuration"] = redis_configuration __props__.__dict__["redis_version"] = redis_version __props__.__dict__["replicas_per_master"] = replicas_per_master diff --git a/sdk/python/pulumi_azure/redis/enterprise_cluster.py b/sdk/python/pulumi_azure/redis/enterprise_cluster.py index 9189f658c6..1f0f6718d8 100644 --- a/sdk/python/pulumi_azure/redis/enterprise_cluster.py +++ b/sdk/python/pulumi_azure/redis/enterprise_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EnterpriseClusterArgs', 'EnterpriseCluster'] @@ -31,18 +31,51 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Redis Enterprise Cluster. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + EnterpriseClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + location=location, + minimum_tls_version=minimum_tls_version, + name=name, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter(name="resourceGroupName") @@ -151,22 +184,53 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Redis Enterprise Cluster. :param pulumi.Input[Sequence[pulumi.Input[str]]] zones: Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. """ + _EnterpriseClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + hostname=hostname, + location=location, + minimum_tls_version=minimum_tls_version, + name=name, + resource_group_name=resource_group_name, + sku_name=sku_name, + tags=tags, + zones=zones, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hostname: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zones is not None: - pulumi.set(__self__, "zones", zones) + _setter("zones", zones) @property @pulumi.getter @@ -352,6 +416,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EnterpriseClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/redis/enterprise_database.py b/sdk/python/pulumi_azure/redis/enterprise_database.py index 0b6f7a26f3..707cc156c0 100644 --- a/sdk/python/pulumi_azure/redis/enterprise_database.py +++ b/sdk/python/pulumi_azure/redis/enterprise_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,28 +43,73 @@ def __init__(__self__, *, :param pulumi.Input[int] port: TCP port of the database endpoint. Specified at create time. Defaults to an available port. Changing this forces a new Redis Enterprise Database to be created. Defaults to `10000`. :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Redis Enterprise Database should exist. Changing this forces a new Redis Enterprise Database to be created. """ - pulumi.set(__self__, "cluster_id", cluster_id) + EnterpriseDatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster_id=cluster_id, + client_protocol=client_protocol, + clustering_policy=clustering_policy, + eviction_policy=eviction_policy, + linked_database_group_nickname=linked_database_group_nickname, + linked_database_ids=linked_database_ids, + modules=modules, + name=name, + port=port, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster_id: Optional[pulumi.Input[str]] = None, + client_protocol: Optional[pulumi.Input[str]] = None, + clustering_policy: Optional[pulumi.Input[str]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + linked_database_group_nickname: Optional[pulumi.Input[str]] = None, + linked_database_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + modules: Optional[pulumi.Input[Sequence[pulumi.Input['EnterpriseDatabaseModuleArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if cluster_id is None: + raise TypeError("Missing 'cluster_id' argument") + if client_protocol is None and 'clientProtocol' in kwargs: + client_protocol = kwargs['clientProtocol'] + if clustering_policy is None and 'clusteringPolicy' in kwargs: + clustering_policy = kwargs['clusteringPolicy'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if linked_database_group_nickname is None and 'linkedDatabaseGroupNickname' in kwargs: + linked_database_group_nickname = kwargs['linkedDatabaseGroupNickname'] + if linked_database_ids is None and 'linkedDatabaseIds' in kwargs: + linked_database_ids = kwargs['linkedDatabaseIds'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + + _setter("cluster_id", cluster_id) if client_protocol is not None: - pulumi.set(__self__, "client_protocol", client_protocol) + _setter("client_protocol", client_protocol) if clustering_policy is not None: - pulumi.set(__self__, "clustering_policy", clustering_policy) + _setter("clustering_policy", clustering_policy) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if linked_database_group_nickname is not None: - pulumi.set(__self__, "linked_database_group_nickname", linked_database_group_nickname) + _setter("linked_database_group_nickname", linked_database_group_nickname) if linked_database_ids is not None: - pulumi.set(__self__, "linked_database_ids", linked_database_ids) + _setter("linked_database_ids", linked_database_ids) if modules is not None: - pulumi.set(__self__, "modules", modules) + _setter("modules", modules) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if resource_group_name is not None: warnings.warn("""This field is no longer used and will be removed in the next major version of the Azure Provider""", DeprecationWarning) pulumi.log.warn("""resource_group_name is deprecated: This field is no longer used and will be removed in the next major version of the Azure Provider""") if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="clusterId") @@ -228,33 +273,84 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Redis Enterprise Database should exist. Changing this forces a new Redis Enterprise Database to be created. :param pulumi.Input[str] secondary_access_key: The Secondary Access Key for the Redis Enterprise Database Instance. """ + _EnterpriseDatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_protocol=client_protocol, + cluster_id=cluster_id, + clustering_policy=clustering_policy, + eviction_policy=eviction_policy, + linked_database_group_nickname=linked_database_group_nickname, + linked_database_ids=linked_database_ids, + modules=modules, + name=name, + port=port, + primary_access_key=primary_access_key, + resource_group_name=resource_group_name, + secondary_access_key=secondary_access_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_protocol: Optional[pulumi.Input[str]] = None, + cluster_id: Optional[pulumi.Input[str]] = None, + clustering_policy: Optional[pulumi.Input[str]] = None, + eviction_policy: Optional[pulumi.Input[str]] = None, + linked_database_group_nickname: Optional[pulumi.Input[str]] = None, + linked_database_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + modules: Optional[pulumi.Input[Sequence[pulumi.Input['EnterpriseDatabaseModuleArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + primary_access_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_access_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_protocol is None and 'clientProtocol' in kwargs: + client_protocol = kwargs['clientProtocol'] + if cluster_id is None and 'clusterId' in kwargs: + cluster_id = kwargs['clusterId'] + if clustering_policy is None and 'clusteringPolicy' in kwargs: + clustering_policy = kwargs['clusteringPolicy'] + if eviction_policy is None and 'evictionPolicy' in kwargs: + eviction_policy = kwargs['evictionPolicy'] + if linked_database_group_nickname is None and 'linkedDatabaseGroupNickname' in kwargs: + linked_database_group_nickname = kwargs['linkedDatabaseGroupNickname'] + if linked_database_ids is None and 'linkedDatabaseIds' in kwargs: + linked_database_ids = kwargs['linkedDatabaseIds'] + if primary_access_key is None and 'primaryAccessKey' in kwargs: + primary_access_key = kwargs['primaryAccessKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_access_key is None and 'secondaryAccessKey' in kwargs: + secondary_access_key = kwargs['secondaryAccessKey'] + if client_protocol is not None: - pulumi.set(__self__, "client_protocol", client_protocol) + _setter("client_protocol", client_protocol) if cluster_id is not None: - pulumi.set(__self__, "cluster_id", cluster_id) + _setter("cluster_id", cluster_id) if clustering_policy is not None: - pulumi.set(__self__, "clustering_policy", clustering_policy) + _setter("clustering_policy", clustering_policy) if eviction_policy is not None: - pulumi.set(__self__, "eviction_policy", eviction_policy) + _setter("eviction_policy", eviction_policy) if linked_database_group_nickname is not None: - pulumi.set(__self__, "linked_database_group_nickname", linked_database_group_nickname) + _setter("linked_database_group_nickname", linked_database_group_nickname) if linked_database_ids is not None: - pulumi.set(__self__, "linked_database_ids", linked_database_ids) + _setter("linked_database_ids", linked_database_ids) if modules is not None: - pulumi.set(__self__, "modules", modules) + _setter("modules", modules) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if port is not None: - pulumi.set(__self__, "port", port) + _setter("port", port) if primary_access_key is not None: - pulumi.set(__self__, "primary_access_key", primary_access_key) + _setter("primary_access_key", primary_access_key) if resource_group_name is not None: warnings.warn("""This field is no longer used and will be removed in the next major version of the Azure Provider""", DeprecationWarning) pulumi.log.warn("""resource_group_name is deprecated: This field is no longer used and will be removed in the next major version of the Azure Provider""") if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_access_key is not None: - pulumi.set(__self__, "secondary_access_key", secondary_access_key) + _setter("secondary_access_key", secondary_access_key) @property @pulumi.getter(name="clientProtocol") @@ -537,6 +633,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EnterpriseDatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/redis/firewall_rule.py b/sdk/python/pulumi_azure/redis/firewall_rule.py index c39e11a313..8e1a2933cb 100644 --- a/sdk/python/pulumi_azure/redis/firewall_rule.py +++ b/sdk/python/pulumi_azure/redis/firewall_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FirewallRuleArgs', 'FirewallRule'] @@ -27,12 +27,47 @@ def __init__(__self__, *, :param pulumi.Input[str] start_ip: The lowest IP address included in the range :param pulumi.Input[str] name: The name of the Firewall Rule. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "end_ip", end_ip) - pulumi.set(__self__, "redis_cache_name", redis_cache_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "start_ip", start_ip) + FirewallRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip=end_ip, + redis_cache_name=redis_cache_name, + resource_group_name=resource_group_name, + start_ip=start_ip, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip: Optional[pulumi.Input[str]] = None, + redis_cache_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + start_ip: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip is None and 'endIp' in kwargs: + end_ip = kwargs['endIp'] + if end_ip is None: + raise TypeError("Missing 'end_ip' argument") + if redis_cache_name is None and 'redisCacheName' in kwargs: + redis_cache_name = kwargs['redisCacheName'] + if redis_cache_name is None: + raise TypeError("Missing 'redis_cache_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if start_ip is None and 'startIp' in kwargs: + start_ip = kwargs['startIp'] + if start_ip is None: + raise TypeError("Missing 'start_ip' argument") + + _setter("end_ip", end_ip) + _setter("redis_cache_name", redis_cache_name) + _setter("resource_group_name", resource_group_name) + _setter("start_ip", start_ip) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="endIp") @@ -111,16 +146,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created. :param pulumi.Input[str] start_ip: The lowest IP address included in the range """ + _FirewallRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip=end_ip, + name=name, + redis_cache_name=redis_cache_name, + resource_group_name=resource_group_name, + start_ip=start_ip, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + redis_cache_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + start_ip: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip is None and 'endIp' in kwargs: + end_ip = kwargs['endIp'] + if redis_cache_name is None and 'redisCacheName' in kwargs: + redis_cache_name = kwargs['redisCacheName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if start_ip is None and 'startIp' in kwargs: + start_ip = kwargs['startIp'] + if end_ip is not None: - pulumi.set(__self__, "end_ip", end_ip) + _setter("end_ip", end_ip) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if redis_cache_name is not None: - pulumi.set(__self__, "redis_cache_name", redis_cache_name) + _setter("redis_cache_name", redis_cache_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if start_ip is not None: - pulumi.set(__self__, "start_ip", start_ip) + _setter("start_ip", start_ip) @property @pulumi.getter(name="endIp") @@ -304,6 +366,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/redis/get_cache.py b/sdk/python/pulumi_azure/redis/get_cache.py index 7d7abf3089..56147d97a4 100644 --- a/sdk/python/pulumi_azure/redis/get_cache.py +++ b/sdk/python/pulumi_azure/redis/get_cache.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/redis/get_enterprise_database.py b/sdk/python/pulumi_azure/redis/get_enterprise_database.py index 485dc85992..bc76a12ab1 100644 --- a/sdk/python/pulumi_azure/redis/get_enterprise_database.py +++ b/sdk/python/pulumi_azure/redis/get_enterprise_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/redis/linked_server.py b/sdk/python/pulumi_azure/redis/linked_server.py index 04e5397351..fc34468d9a 100644 --- a/sdk/python/pulumi_azure/redis/linked_server.py +++ b/sdk/python/pulumi_azure/redis/linked_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LinkedServerArgs', 'LinkedServer'] @@ -27,11 +27,50 @@ def __init__(__self__, *, :param pulumi.Input[str] server_role: The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are `Primary` and `Secondary`. :param pulumi.Input[str] target_redis_cache_name: The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role) """ - pulumi.set(__self__, "linked_redis_cache_id", linked_redis_cache_id) - pulumi.set(__self__, "linked_redis_cache_location", linked_redis_cache_location) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_role", server_role) - pulumi.set(__self__, "target_redis_cache_name", target_redis_cache_name) + LinkedServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_redis_cache_id=linked_redis_cache_id, + linked_redis_cache_location=linked_redis_cache_location, + resource_group_name=resource_group_name, + server_role=server_role, + target_redis_cache_name=target_redis_cache_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_redis_cache_id: Optional[pulumi.Input[str]] = None, + linked_redis_cache_location: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_role: Optional[pulumi.Input[str]] = None, + target_redis_cache_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_redis_cache_id is None and 'linkedRedisCacheId' in kwargs: + linked_redis_cache_id = kwargs['linkedRedisCacheId'] + if linked_redis_cache_id is None: + raise TypeError("Missing 'linked_redis_cache_id' argument") + if linked_redis_cache_location is None and 'linkedRedisCacheLocation' in kwargs: + linked_redis_cache_location = kwargs['linkedRedisCacheLocation'] + if linked_redis_cache_location is None: + raise TypeError("Missing 'linked_redis_cache_location' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_role is None and 'serverRole' in kwargs: + server_role = kwargs['serverRole'] + if server_role is None: + raise TypeError("Missing 'server_role' argument") + if target_redis_cache_name is None and 'targetRedisCacheName' in kwargs: + target_redis_cache_name = kwargs['targetRedisCacheName'] + if target_redis_cache_name is None: + raise TypeError("Missing 'target_redis_cache_name' argument") + + _setter("linked_redis_cache_id", linked_redis_cache_id) + _setter("linked_redis_cache_location", linked_redis_cache_location) + _setter("resource_group_name", resource_group_name) + _setter("server_role", server_role) + _setter("target_redis_cache_name", target_redis_cache_name) @property @pulumi.getter(name="linkedRedisCacheId") @@ -112,18 +151,49 @@ def __init__(__self__, *, :param pulumi.Input[str] server_role: The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are `Primary` and `Secondary`. :param pulumi.Input[str] target_redis_cache_name: The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role) """ + _LinkedServerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + linked_redis_cache_id=linked_redis_cache_id, + linked_redis_cache_location=linked_redis_cache_location, + name=name, + resource_group_name=resource_group_name, + server_role=server_role, + target_redis_cache_name=target_redis_cache_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + linked_redis_cache_id: Optional[pulumi.Input[str]] = None, + linked_redis_cache_location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_role: Optional[pulumi.Input[str]] = None, + target_redis_cache_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if linked_redis_cache_id is None and 'linkedRedisCacheId' in kwargs: + linked_redis_cache_id = kwargs['linkedRedisCacheId'] + if linked_redis_cache_location is None and 'linkedRedisCacheLocation' in kwargs: + linked_redis_cache_location = kwargs['linkedRedisCacheLocation'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_role is None and 'serverRole' in kwargs: + server_role = kwargs['serverRole'] + if target_redis_cache_name is None and 'targetRedisCacheName' in kwargs: + target_redis_cache_name = kwargs['targetRedisCacheName'] + if linked_redis_cache_id is not None: - pulumi.set(__self__, "linked_redis_cache_id", linked_redis_cache_id) + _setter("linked_redis_cache_id", linked_redis_cache_id) if linked_redis_cache_location is not None: - pulumi.set(__self__, "linked_redis_cache_location", linked_redis_cache_location) + _setter("linked_redis_cache_location", linked_redis_cache_location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_role is not None: - pulumi.set(__self__, "server_role", server_role) + _setter("server_role", server_role) if target_redis_cache_name is not None: - pulumi.set(__self__, "target_redis_cache_name", target_redis_cache_name) + _setter("target_redis_cache_name", target_redis_cache_name) @property @pulumi.getter(name="linkedRedisCacheId") @@ -335,6 +405,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/redis/outputs.py b/sdk/python/pulumi_azure/redis/outputs.py index ed3b88568d..ae8778a074 100644 --- a/sdk/python/pulumi_azure/redis/outputs.py +++ b/sdk/python/pulumi_azure/redis/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -52,13 +52,38 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. """ - pulumi.set(__self__, "type", type) + CacheIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -123,11 +148,34 @@ def __init__(__self__, *, > **Note:** The Patch Window lasts for `5` hours from the `start_hour_utc`. """ - pulumi.set(__self__, "day_of_week", day_of_week) + CachePatchSchedule._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + maintenance_window=maintenance_window, + start_hour_utc=start_hour_utc, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[str] = None, + maintenance_window: Optional[str] = None, + start_hour_utc: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if day_of_week is None: + raise TypeError("Missing 'day_of_week' argument") + if maintenance_window is None and 'maintenanceWindow' in kwargs: + maintenance_window = kwargs['maintenanceWindow'] + if start_hour_utc is None and 'startHourUtc' in kwargs: + start_hour_utc = kwargs['startHourUtc'] + + _setter("day_of_week", day_of_week) if maintenance_window is not None: - pulumi.set(__self__, "maintenance_window", maintenance_window) + _setter("maintenance_window", maintenance_window) if start_hour_utc is not None: - pulumi.set(__self__, "start_hour_utc", start_hour_utc) + _setter("start_hour_utc", start_hour_utc) @property @pulumi.getter(name="dayOfWeek") @@ -248,34 +296,97 @@ def __init__(__self__, *, > **NOTE:** There's a bug in the Redis API where the original storage connection string isn't being returned, which [is being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/3037). In the interim you can use [the `ignoreChanges` attribute to ignore changes to this field](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) e.g.: """ + CacheRedisConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + aof_backup_enabled=aof_backup_enabled, + aof_storage_connection_string0=aof_storage_connection_string0, + aof_storage_connection_string1=aof_storage_connection_string1, + enable_authentication=enable_authentication, + maxclients=maxclients, + maxfragmentationmemory_reserved=maxfragmentationmemory_reserved, + maxmemory_delta=maxmemory_delta, + maxmemory_policy=maxmemory_policy, + maxmemory_reserved=maxmemory_reserved, + notify_keyspace_events=notify_keyspace_events, + rdb_backup_enabled=rdb_backup_enabled, + rdb_backup_frequency=rdb_backup_frequency, + rdb_backup_max_snapshot_count=rdb_backup_max_snapshot_count, + rdb_storage_connection_string=rdb_storage_connection_string, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aof_backup_enabled: Optional[bool] = None, + aof_storage_connection_string0: Optional[str] = None, + aof_storage_connection_string1: Optional[str] = None, + enable_authentication: Optional[bool] = None, + maxclients: Optional[int] = None, + maxfragmentationmemory_reserved: Optional[int] = None, + maxmemory_delta: Optional[int] = None, + maxmemory_policy: Optional[str] = None, + maxmemory_reserved: Optional[int] = None, + notify_keyspace_events: Optional[str] = None, + rdb_backup_enabled: Optional[bool] = None, + rdb_backup_frequency: Optional[int] = None, + rdb_backup_max_snapshot_count: Optional[int] = None, + rdb_storage_connection_string: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aof_backup_enabled is None and 'aofBackupEnabled' in kwargs: + aof_backup_enabled = kwargs['aofBackupEnabled'] + if aof_storage_connection_string0 is None and 'aofStorageConnectionString0' in kwargs: + aof_storage_connection_string0 = kwargs['aofStorageConnectionString0'] + if aof_storage_connection_string1 is None and 'aofStorageConnectionString1' in kwargs: + aof_storage_connection_string1 = kwargs['aofStorageConnectionString1'] + if enable_authentication is None and 'enableAuthentication' in kwargs: + enable_authentication = kwargs['enableAuthentication'] + if maxfragmentationmemory_reserved is None and 'maxfragmentationmemoryReserved' in kwargs: + maxfragmentationmemory_reserved = kwargs['maxfragmentationmemoryReserved'] + if maxmemory_delta is None and 'maxmemoryDelta' in kwargs: + maxmemory_delta = kwargs['maxmemoryDelta'] + if maxmemory_policy is None and 'maxmemoryPolicy' in kwargs: + maxmemory_policy = kwargs['maxmemoryPolicy'] + if maxmemory_reserved is None and 'maxmemoryReserved' in kwargs: + maxmemory_reserved = kwargs['maxmemoryReserved'] + if notify_keyspace_events is None and 'notifyKeyspaceEvents' in kwargs: + notify_keyspace_events = kwargs['notifyKeyspaceEvents'] + if rdb_backup_enabled is None and 'rdbBackupEnabled' in kwargs: + rdb_backup_enabled = kwargs['rdbBackupEnabled'] + if rdb_backup_frequency is None and 'rdbBackupFrequency' in kwargs: + rdb_backup_frequency = kwargs['rdbBackupFrequency'] + if rdb_backup_max_snapshot_count is None and 'rdbBackupMaxSnapshotCount' in kwargs: + rdb_backup_max_snapshot_count = kwargs['rdbBackupMaxSnapshotCount'] + if rdb_storage_connection_string is None and 'rdbStorageConnectionString' in kwargs: + rdb_storage_connection_string = kwargs['rdbStorageConnectionString'] + if aof_backup_enabled is not None: - pulumi.set(__self__, "aof_backup_enabled", aof_backup_enabled) + _setter("aof_backup_enabled", aof_backup_enabled) if aof_storage_connection_string0 is not None: - pulumi.set(__self__, "aof_storage_connection_string0", aof_storage_connection_string0) + _setter("aof_storage_connection_string0", aof_storage_connection_string0) if aof_storage_connection_string1 is not None: - pulumi.set(__self__, "aof_storage_connection_string1", aof_storage_connection_string1) + _setter("aof_storage_connection_string1", aof_storage_connection_string1) if enable_authentication is not None: - pulumi.set(__self__, "enable_authentication", enable_authentication) + _setter("enable_authentication", enable_authentication) if maxclients is not None: - pulumi.set(__self__, "maxclients", maxclients) + _setter("maxclients", maxclients) if maxfragmentationmemory_reserved is not None: - pulumi.set(__self__, "maxfragmentationmemory_reserved", maxfragmentationmemory_reserved) + _setter("maxfragmentationmemory_reserved", maxfragmentationmemory_reserved) if maxmemory_delta is not None: - pulumi.set(__self__, "maxmemory_delta", maxmemory_delta) + _setter("maxmemory_delta", maxmemory_delta) if maxmemory_policy is not None: - pulumi.set(__self__, "maxmemory_policy", maxmemory_policy) + _setter("maxmemory_policy", maxmemory_policy) if maxmemory_reserved is not None: - pulumi.set(__self__, "maxmemory_reserved", maxmemory_reserved) + _setter("maxmemory_reserved", maxmemory_reserved) if notify_keyspace_events is not None: - pulumi.set(__self__, "notify_keyspace_events", notify_keyspace_events) + _setter("notify_keyspace_events", notify_keyspace_events) if rdb_backup_enabled is not None: - pulumi.set(__self__, "rdb_backup_enabled", rdb_backup_enabled) + _setter("rdb_backup_enabled", rdb_backup_enabled) if rdb_backup_frequency is not None: - pulumi.set(__self__, "rdb_backup_frequency", rdb_backup_frequency) + _setter("rdb_backup_frequency", rdb_backup_frequency) if rdb_backup_max_snapshot_count is not None: - pulumi.set(__self__, "rdb_backup_max_snapshot_count", rdb_backup_max_snapshot_count) + _setter("rdb_backup_max_snapshot_count", rdb_backup_max_snapshot_count) if rdb_storage_connection_string is not None: - pulumi.set(__self__, "rdb_storage_connection_string", rdb_storage_connection_string) + _setter("rdb_storage_connection_string", rdb_storage_connection_string) @property @pulumi.getter(name="aofBackupEnabled") @@ -418,11 +529,28 @@ def __init__(__self__, *, :param str name: The name which should be used for this module. Possible values are `RedisBloom`, `RedisTimeSeries`, `RediSearch` and `RedisJSON`. Changing this forces a new Redis Enterprise Database to be created. :param str args: Configuration options for the module (e.g. `ERROR_RATE 0.00 INITIAL_SIZE 400`). Changing this forces a new resource to be created. Defaults to `""`. """ - pulumi.set(__self__, "name", name) + EnterpriseDatabaseModule._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + args=args, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + args: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if args is not None: - pulumi.set(__self__, "args", args) + _setter("args", args) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter @@ -457,9 +585,36 @@ def __init__(__self__, *, :param str maintenance_window: The ISO 8601 timespan which specifies the amount of time the Redis Cache can be updated. :param int start_hour_utc: The Start Hour for maintenance in UTC """ - pulumi.set(__self__, "day_of_week", day_of_week) - pulumi.set(__self__, "maintenance_window", maintenance_window) - pulumi.set(__self__, "start_hour_utc", start_hour_utc) + GetCachePatchScheduleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + day_of_week=day_of_week, + maintenance_window=maintenance_window, + start_hour_utc=start_hour_utc, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + day_of_week: Optional[str] = None, + maintenance_window: Optional[str] = None, + start_hour_utc: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if day_of_week is None and 'dayOfWeek' in kwargs: + day_of_week = kwargs['dayOfWeek'] + if day_of_week is None: + raise TypeError("Missing 'day_of_week' argument") + if maintenance_window is None and 'maintenanceWindow' in kwargs: + maintenance_window = kwargs['maintenanceWindow'] + if maintenance_window is None: + raise TypeError("Missing 'maintenance_window' argument") + if start_hour_utc is None and 'startHourUtc' in kwargs: + start_hour_utc = kwargs['startHourUtc'] + if start_hour_utc is None: + raise TypeError("Missing 'start_hour_utc' argument") + + _setter("day_of_week", day_of_week) + _setter("maintenance_window", maintenance_window) + _setter("start_hour_utc", start_hour_utc) @property @pulumi.getter(name="dayOfWeek") @@ -514,20 +669,111 @@ def __init__(__self__, *, :param int rdb_backup_max_snapshot_count: The maximum number of snapshots that can be created as a backup. :param str rdb_storage_connection_string: The Connection String to the Storage Account. Only supported for Premium SKUs. """ - pulumi.set(__self__, "aof_backup_enabled", aof_backup_enabled) - pulumi.set(__self__, "aof_storage_connection_string0", aof_storage_connection_string0) - pulumi.set(__self__, "aof_storage_connection_string1", aof_storage_connection_string1) - pulumi.set(__self__, "enable_authentication", enable_authentication) - pulumi.set(__self__, "maxclients", maxclients) - pulumi.set(__self__, "maxfragmentationmemory_reserved", maxfragmentationmemory_reserved) - pulumi.set(__self__, "maxmemory_delta", maxmemory_delta) - pulumi.set(__self__, "maxmemory_policy", maxmemory_policy) - pulumi.set(__self__, "maxmemory_reserved", maxmemory_reserved) - pulumi.set(__self__, "notify_keyspace_events", notify_keyspace_events) - pulumi.set(__self__, "rdb_backup_enabled", rdb_backup_enabled) - pulumi.set(__self__, "rdb_backup_frequency", rdb_backup_frequency) - pulumi.set(__self__, "rdb_backup_max_snapshot_count", rdb_backup_max_snapshot_count) - pulumi.set(__self__, "rdb_storage_connection_string", rdb_storage_connection_string) + GetCacheRedisConfigurationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + aof_backup_enabled=aof_backup_enabled, + aof_storage_connection_string0=aof_storage_connection_string0, + aof_storage_connection_string1=aof_storage_connection_string1, + enable_authentication=enable_authentication, + maxclients=maxclients, + maxfragmentationmemory_reserved=maxfragmentationmemory_reserved, + maxmemory_delta=maxmemory_delta, + maxmemory_policy=maxmemory_policy, + maxmemory_reserved=maxmemory_reserved, + notify_keyspace_events=notify_keyspace_events, + rdb_backup_enabled=rdb_backup_enabled, + rdb_backup_frequency=rdb_backup_frequency, + rdb_backup_max_snapshot_count=rdb_backup_max_snapshot_count, + rdb_storage_connection_string=rdb_storage_connection_string, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aof_backup_enabled: Optional[bool] = None, + aof_storage_connection_string0: Optional[str] = None, + aof_storage_connection_string1: Optional[str] = None, + enable_authentication: Optional[bool] = None, + maxclients: Optional[int] = None, + maxfragmentationmemory_reserved: Optional[int] = None, + maxmemory_delta: Optional[int] = None, + maxmemory_policy: Optional[str] = None, + maxmemory_reserved: Optional[int] = None, + notify_keyspace_events: Optional[str] = None, + rdb_backup_enabled: Optional[bool] = None, + rdb_backup_frequency: Optional[int] = None, + rdb_backup_max_snapshot_count: Optional[int] = None, + rdb_storage_connection_string: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aof_backup_enabled is None and 'aofBackupEnabled' in kwargs: + aof_backup_enabled = kwargs['aofBackupEnabled'] + if aof_backup_enabled is None: + raise TypeError("Missing 'aof_backup_enabled' argument") + if aof_storage_connection_string0 is None and 'aofStorageConnectionString0' in kwargs: + aof_storage_connection_string0 = kwargs['aofStorageConnectionString0'] + if aof_storage_connection_string0 is None: + raise TypeError("Missing 'aof_storage_connection_string0' argument") + if aof_storage_connection_string1 is None and 'aofStorageConnectionString1' in kwargs: + aof_storage_connection_string1 = kwargs['aofStorageConnectionString1'] + if aof_storage_connection_string1 is None: + raise TypeError("Missing 'aof_storage_connection_string1' argument") + if enable_authentication is None and 'enableAuthentication' in kwargs: + enable_authentication = kwargs['enableAuthentication'] + if enable_authentication is None: + raise TypeError("Missing 'enable_authentication' argument") + if maxclients is None: + raise TypeError("Missing 'maxclients' argument") + if maxfragmentationmemory_reserved is None and 'maxfragmentationmemoryReserved' in kwargs: + maxfragmentationmemory_reserved = kwargs['maxfragmentationmemoryReserved'] + if maxfragmentationmemory_reserved is None: + raise TypeError("Missing 'maxfragmentationmemory_reserved' argument") + if maxmemory_delta is None and 'maxmemoryDelta' in kwargs: + maxmemory_delta = kwargs['maxmemoryDelta'] + if maxmemory_delta is None: + raise TypeError("Missing 'maxmemory_delta' argument") + if maxmemory_policy is None and 'maxmemoryPolicy' in kwargs: + maxmemory_policy = kwargs['maxmemoryPolicy'] + if maxmemory_policy is None: + raise TypeError("Missing 'maxmemory_policy' argument") + if maxmemory_reserved is None and 'maxmemoryReserved' in kwargs: + maxmemory_reserved = kwargs['maxmemoryReserved'] + if maxmemory_reserved is None: + raise TypeError("Missing 'maxmemory_reserved' argument") + if notify_keyspace_events is None and 'notifyKeyspaceEvents' in kwargs: + notify_keyspace_events = kwargs['notifyKeyspaceEvents'] + if notify_keyspace_events is None: + raise TypeError("Missing 'notify_keyspace_events' argument") + if rdb_backup_enabled is None and 'rdbBackupEnabled' in kwargs: + rdb_backup_enabled = kwargs['rdbBackupEnabled'] + if rdb_backup_enabled is None: + raise TypeError("Missing 'rdb_backup_enabled' argument") + if rdb_backup_frequency is None and 'rdbBackupFrequency' in kwargs: + rdb_backup_frequency = kwargs['rdbBackupFrequency'] + if rdb_backup_frequency is None: + raise TypeError("Missing 'rdb_backup_frequency' argument") + if rdb_backup_max_snapshot_count is None and 'rdbBackupMaxSnapshotCount' in kwargs: + rdb_backup_max_snapshot_count = kwargs['rdbBackupMaxSnapshotCount'] + if rdb_backup_max_snapshot_count is None: + raise TypeError("Missing 'rdb_backup_max_snapshot_count' argument") + if rdb_storage_connection_string is None and 'rdbStorageConnectionString' in kwargs: + rdb_storage_connection_string = kwargs['rdbStorageConnectionString'] + if rdb_storage_connection_string is None: + raise TypeError("Missing 'rdb_storage_connection_string' argument") + + _setter("aof_backup_enabled", aof_backup_enabled) + _setter("aof_storage_connection_string0", aof_storage_connection_string0) + _setter("aof_storage_connection_string1", aof_storage_connection_string1) + _setter("enable_authentication", enable_authentication) + _setter("maxclients", maxclients) + _setter("maxfragmentationmemory_reserved", maxfragmentationmemory_reserved) + _setter("maxmemory_delta", maxmemory_delta) + _setter("maxmemory_policy", maxmemory_policy) + _setter("maxmemory_reserved", maxmemory_reserved) + _setter("notify_keyspace_events", notify_keyspace_events) + _setter("rdb_backup_enabled", rdb_backup_enabled) + _setter("rdb_backup_frequency", rdb_backup_frequency) + _setter("rdb_backup_max_snapshot_count", rdb_backup_max_snapshot_count) + _setter("rdb_storage_connection_string", rdb_storage_connection_string) @property @pulumi.getter(name="aofBackupEnabled") diff --git a/sdk/python/pulumi_azure/relay/hybrid_connection.py b/sdk/python/pulumi_azure/relay/hybrid_connection.py index 0e22342a5c..66081a1ae6 100644 --- a/sdk/python/pulumi_azure/relay/hybrid_connection.py +++ b/sdk/python/pulumi_azure/relay/hybrid_connection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['HybridConnectionArgs', 'HybridConnection'] @@ -27,14 +27,45 @@ def __init__(__self__, *, :param pulumi.Input[bool] requires_client_authorization: Specify if client authorization is needed for this hybrid connection. True by default. Changing this forces a new resource to be created. Defaults to `true`. :param pulumi.Input[str] user_metadata: The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored. """ - pulumi.set(__self__, "relay_namespace_name", relay_namespace_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + HybridConnectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + relay_namespace_name=relay_namespace_name, + resource_group_name=resource_group_name, + name=name, + requires_client_authorization=requires_client_authorization, + user_metadata=user_metadata, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + relay_namespace_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + requires_client_authorization: Optional[pulumi.Input[bool]] = None, + user_metadata: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if relay_namespace_name is None and 'relayNamespaceName' in kwargs: + relay_namespace_name = kwargs['relayNamespaceName'] + if relay_namespace_name is None: + raise TypeError("Missing 'relay_namespace_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if requires_client_authorization is None and 'requiresClientAuthorization' in kwargs: + requires_client_authorization = kwargs['requiresClientAuthorization'] + if user_metadata is None and 'userMetadata' in kwargs: + user_metadata = kwargs['userMetadata'] + + _setter("relay_namespace_name", relay_namespace_name) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if requires_client_authorization is not None: - pulumi.set(__self__, "requires_client_authorization", requires_client_authorization) + _setter("requires_client_authorization", requires_client_authorization) if user_metadata is not None: - pulumi.set(__self__, "user_metadata", user_metadata) + _setter("user_metadata", user_metadata) @property @pulumi.getter(name="relayNamespaceName") @@ -113,16 +144,43 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created. :param pulumi.Input[str] user_metadata: The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored. """ + _HybridConnectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + relay_namespace_name=relay_namespace_name, + requires_client_authorization=requires_client_authorization, + resource_group_name=resource_group_name, + user_metadata=user_metadata, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + relay_namespace_name: Optional[pulumi.Input[str]] = None, + requires_client_authorization: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + user_metadata: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if relay_namespace_name is None and 'relayNamespaceName' in kwargs: + relay_namespace_name = kwargs['relayNamespaceName'] + if requires_client_authorization is None and 'requiresClientAuthorization' in kwargs: + requires_client_authorization = kwargs['requiresClientAuthorization'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if user_metadata is None and 'userMetadata' in kwargs: + user_metadata = kwargs['userMetadata'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if relay_namespace_name is not None: - pulumi.set(__self__, "relay_namespace_name", relay_namespace_name) + _setter("relay_namespace_name", relay_namespace_name) if requires_client_authorization is not None: - pulumi.set(__self__, "requires_client_authorization", requires_client_authorization) + _setter("requires_client_authorization", requires_client_authorization) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if user_metadata is not None: - pulumi.set(__self__, "user_metadata", user_metadata) + _setter("user_metadata", user_metadata) @property @pulumi.getter @@ -284,6 +342,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HybridConnectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/relay/hybrid_connection_authorization_rule.py b/sdk/python/pulumi_azure/relay/hybrid_connection_authorization_rule.py index b74999e866..df2220493a 100644 --- a/sdk/python/pulumi_azure/relay/hybrid_connection_authorization_rule.py +++ b/sdk/python/pulumi_azure/relay/hybrid_connection_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['HybridConnectionAuthorizationRuleArgs', 'HybridConnectionAuthorizationRule'] @@ -31,17 +31,52 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Azure Relay Hybrid Connection Authorization Rule. Changing this forces a new Azure Relay Hybrid Connection Authorization Rule to be created. :param pulumi.Input[bool] send: Grants send access to this Authorization Rule. Defaults to `false`. """ - pulumi.set(__self__, "hybrid_connection_name", hybrid_connection_name) - pulumi.set(__self__, "namespace_name", namespace_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + HybridConnectionAuthorizationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + hybrid_connection_name=hybrid_connection_name, + namespace_name=namespace_name, + resource_group_name=resource_group_name, + listen=listen, + manage=manage, + name=name, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hybrid_connection_name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hybrid_connection_name is None and 'hybridConnectionName' in kwargs: + hybrid_connection_name = kwargs['hybridConnectionName'] + if hybrid_connection_name is None: + raise TypeError("Missing 'hybrid_connection_name' argument") + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if namespace_name is None: + raise TypeError("Missing 'namespace_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("hybrid_connection_name", hybrid_connection_name) + _setter("namespace_name", namespace_name) + _setter("resource_group_name", resource_group_name) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="hybridConnectionName") @@ -156,28 +191,73 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_key: The Secondary Key for the Azure Relay Hybrid Connection Authorization Rule. :param pulumi.Input[bool] send: Grants send access to this Authorization Rule. Defaults to `false`. """ + _HybridConnectionAuthorizationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + hybrid_connection_name=hybrid_connection_name, + listen=listen, + manage=manage, + name=name, + namespace_name=namespace_name, + primary_connection_string=primary_connection_string, + primary_key=primary_key, + resource_group_name=resource_group_name, + secondary_connection_string=secondary_connection_string, + secondary_key=secondary_key, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hybrid_connection_name: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hybrid_connection_name is None and 'hybridConnectionName' in kwargs: + hybrid_connection_name = kwargs['hybridConnectionName'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if hybrid_connection_name is not None: - pulumi.set(__self__, "hybrid_connection_name", hybrid_connection_name) + _setter("hybrid_connection_name", hybrid_connection_name) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="hybridConnectionName") @@ -429,6 +509,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HybridConnectionAuthorizationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/relay/namespace.py b/sdk/python/pulumi_azure/relay/namespace.py index 75bc6b5244..08455b9620 100644 --- a/sdk/python/pulumi_azure/relay/namespace.py +++ b/sdk/python/pulumi_azure/relay/namespace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NamespaceArgs', 'Namespace'] @@ -27,14 +27,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Azure Relay Namespace. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) + NamespaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku_name=sku_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -123,26 +150,69 @@ def __init__(__self__, *, :param pulumi.Input[str] sku_name: The name of the SKU to use. At this time the only supported value is `Standard`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _NamespaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + metric_id=metric_id, + name=name, + primary_connection_string=primary_connection_string, + primary_key=primary_key, + resource_group_name=resource_group_name, + secondary_connection_string=secondary_connection_string, + secondary_key=secondary_key, + sku_name=sku_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + metric_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if metric_id is None and 'metricId' in kwargs: + metric_id = kwargs['metricId'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if metric_id is not None: - pulumi.set(__self__, "metric_id", metric_id) + _setter("metric_id", metric_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -354,6 +424,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NamespaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/relay/namespace_authorization_rule.py b/sdk/python/pulumi_azure/relay/namespace_authorization_rule.py index 63c9313673..776c0adbac 100644 --- a/sdk/python/pulumi_azure/relay/namespace_authorization_rule.py +++ b/sdk/python/pulumi_azure/relay/namespace_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NamespaceAuthorizationRuleArgs', 'NamespaceAuthorizationRule'] @@ -29,16 +29,45 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Azure Relay Namespace Authorization Rule. Changing this forces a new Azure Relay Namespace Authorization Rule to be created. :param pulumi.Input[bool] send: Grants send access to this Authorization Rule. Defaults to `false`. """ - pulumi.set(__self__, "namespace_name", namespace_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + NamespaceAuthorizationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_name=namespace_name, + resource_group_name=resource_group_name, + listen=listen, + manage=manage, + name=name, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if namespace_name is None: + raise TypeError("Missing 'namespace_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("namespace_name", namespace_name) + _setter("resource_group_name", resource_group_name) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="namespaceName") @@ -139,26 +168,67 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_key: The Secondary Key for the Azure Relay Namespace Authorization Rule. :param pulumi.Input[bool] send: Grants send access to this Authorization Rule. Defaults to `false`. """ + _NamespaceAuthorizationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + listen=listen, + manage=manage, + name=name, + namespace_name=namespace_name, + primary_connection_string=primary_connection_string, + primary_key=primary_key, + resource_group_name=resource_group_name, + secondary_connection_string=secondary_connection_string, + secondary_key=secondary_key, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter @@ -384,6 +454,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NamespaceAuthorizationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/role/_inputs.py b/sdk/python/pulumi_azure/role/_inputs.py index 68e8270679..8aeb910254 100644 --- a/sdk/python/pulumi_azure/role/_inputs.py +++ b/sdk/python/pulumi_azure/role/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -26,14 +26,37 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] not_actions: One or more Disallowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. :param pulumi.Input[Sequence[pulumi.Input[str]]] not_data_actions: One or more Disallowed Data Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. """ + DefinitionPermissionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + data_actions=data_actions, + not_actions=not_actions, + not_data_actions=not_data_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + data_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + not_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + not_data_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_actions is None and 'dataActions' in kwargs: + data_actions = kwargs['dataActions'] + if not_actions is None and 'notActions' in kwargs: + not_actions = kwargs['notActions'] + if not_data_actions is None and 'notDataActions' in kwargs: + not_data_actions = kwargs['notDataActions'] + if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if data_actions is not None: - pulumi.set(__self__, "data_actions", data_actions) + _setter("data_actions", data_actions) if not_actions is not None: - pulumi.set(__self__, "not_actions", not_actions) + _setter("not_actions", not_actions) if not_data_actions is not None: - pulumi.set(__self__, "not_data_actions", not_data_actions) + _setter("not_data_actions", not_data_actions) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/role/assignment.py b/sdk/python/pulumi_azure/role/assignment.py index 5f12a99bc7..81f0c9cb72 100644 --- a/sdk/python/pulumi_azure/role/assignment.py +++ b/sdk/python/pulumi_azure/role/assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AssignmentArgs', 'Assignment'] @@ -43,24 +43,69 @@ def __init__(__self__, *, > **NOTE:** If it is not a `Service Principal` identity it will cause the role assignment to fail. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "scope", scope) + AssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + scope=scope, + condition=condition, + condition_version=condition_version, + delegated_managed_identity_resource_id=delegated_managed_identity_resource_id, + description=description, + name=name, + role_definition_id=role_definition_id, + role_definition_name=role_definition_name, + skip_service_principal_aad_check=skip_service_principal_aad_check, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + condition: Optional[pulumi.Input[str]] = None, + condition_version: Optional[pulumi.Input[str]] = None, + delegated_managed_identity_resource_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + role_definition_name: Optional[pulumi.Input[str]] = None, + skip_service_principal_aad_check: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + if condition_version is None and 'conditionVersion' in kwargs: + condition_version = kwargs['conditionVersion'] + if delegated_managed_identity_resource_id is None and 'delegatedManagedIdentityResourceId' in kwargs: + delegated_managed_identity_resource_id = kwargs['delegatedManagedIdentityResourceId'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_name is None and 'roleDefinitionName' in kwargs: + role_definition_name = kwargs['roleDefinitionName'] + if skip_service_principal_aad_check is None and 'skipServicePrincipalAadCheck' in kwargs: + skip_service_principal_aad_check = kwargs['skipServicePrincipalAadCheck'] + + _setter("principal_id", principal_id) + _setter("scope", scope) if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if condition_version is not None: - pulumi.set(__self__, "condition_version", condition_version) + _setter("condition_version", condition_version) if delegated_managed_identity_resource_id is not None: - pulumi.set(__self__, "delegated_managed_identity_resource_id", delegated_managed_identity_resource_id) + _setter("delegated_managed_identity_resource_id", delegated_managed_identity_resource_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) if role_definition_name is not None: - pulumi.set(__self__, "role_definition_name", role_definition_name) + _setter("role_definition_name", role_definition_name) if skip_service_principal_aad_check is not None: - pulumi.set(__self__, "skip_service_principal_aad_check", skip_service_principal_aad_check) + _setter("skip_service_principal_aad_check", skip_service_principal_aad_check) @property @pulumi.getter(name="principalId") @@ -223,28 +268,73 @@ def __init__(__self__, *, > **NOTE:** If it is not a `Service Principal` identity it will cause the role assignment to fail. """ + _AssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + condition=condition, + condition_version=condition_version, + delegated_managed_identity_resource_id=delegated_managed_identity_resource_id, + description=description, + name=name, + principal_id=principal_id, + principal_type=principal_type, + role_definition_id=role_definition_id, + role_definition_name=role_definition_name, + scope=scope, + skip_service_principal_aad_check=skip_service_principal_aad_check, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + condition: Optional[pulumi.Input[str]] = None, + condition_version: Optional[pulumi.Input[str]] = None, + delegated_managed_identity_resource_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + principal_type: Optional[pulumi.Input[str]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + role_definition_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + skip_service_principal_aad_check: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if condition_version is None and 'conditionVersion' in kwargs: + condition_version = kwargs['conditionVersion'] + if delegated_managed_identity_resource_id is None and 'delegatedManagedIdentityResourceId' in kwargs: + delegated_managed_identity_resource_id = kwargs['delegatedManagedIdentityResourceId'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_type is None and 'principalType' in kwargs: + principal_type = kwargs['principalType'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_name is None and 'roleDefinitionName' in kwargs: + role_definition_name = kwargs['roleDefinitionName'] + if skip_service_principal_aad_check is None and 'skipServicePrincipalAadCheck' in kwargs: + skip_service_principal_aad_check = kwargs['skipServicePrincipalAadCheck'] + if condition is not None: - pulumi.set(__self__, "condition", condition) + _setter("condition", condition) if condition_version is not None: - pulumi.set(__self__, "condition_version", condition_version) + _setter("condition_version", condition_version) if delegated_managed_identity_resource_id is not None: - pulumi.set(__self__, "delegated_managed_identity_resource_id", delegated_managed_identity_resource_id) + _setter("delegated_managed_identity_resource_id", delegated_managed_identity_resource_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if principal_type is not None: - pulumi.set(__self__, "principal_type", principal_type) + _setter("principal_type", principal_type) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) if role_definition_name is not None: - pulumi.set(__self__, "role_definition_name", role_definition_name) + _setter("role_definition_name", role_definition_name) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if skip_service_principal_aad_check is not None: - pulumi.set(__self__, "skip_service_principal_aad_check", skip_service_principal_aad_check) + _setter("skip_service_principal_aad_check", skip_service_principal_aad_check) @property @pulumi.getter @@ -631,6 +721,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/role/definition.py b/sdk/python/pulumi_azure/role/definition.py index fb7f81cbd6..c23fd50f41 100644 --- a/sdk/python/pulumi_azure/role/definition.py +++ b/sdk/python/pulumi_azure/role/definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,44 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['DefinitionPermissionArgs']]] permissions: A `permissions` block as defined below. :param pulumi.Input[str] role_definition_id: A unique UUID/GUID which identifies this role - one will be generated if not specified. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "scope", scope) + DefinitionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + scope=scope, + assignable_scopes=assignable_scopes, + description=description, + name=name, + permissions=permissions, + role_definition_id=role_definition_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + scope: Optional[pulumi.Input[str]] = None, + assignable_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[Sequence[pulumi.Input['DefinitionPermissionArgs']]]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if scope is None: + raise TypeError("Missing 'scope' argument") + if assignable_scopes is None and 'assignableScopes' in kwargs: + assignable_scopes = kwargs['assignableScopes'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + + _setter("scope", scope) if assignable_scopes is not None: - pulumi.set(__self__, "assignable_scopes", assignable_scopes) + _setter("assignable_scopes", assignable_scopes) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if permissions is not None: - pulumi.set(__self__, "permissions", permissions) + _setter("permissions", permissions) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) @property @pulumi.getter @@ -142,20 +169,49 @@ def __init__(__self__, *, :param pulumi.Input[str] role_definition_resource_id: The Azure Resource Manager ID for the resource. :param pulumi.Input[str] scope: The scope at which the Role Definition applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. It is recommended to use the first entry of the `assignable_scopes`. Changing this forces a new resource to be created. """ + _DefinitionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + assignable_scopes=assignable_scopes, + description=description, + name=name, + permissions=permissions, + role_definition_id=role_definition_id, + role_definition_resource_id=role_definition_resource_id, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assignable_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[Sequence[pulumi.Input['DefinitionPermissionArgs']]]] = None, + role_definition_id: Optional[pulumi.Input[str]] = None, + role_definition_resource_id: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assignable_scopes is None and 'assignableScopes' in kwargs: + assignable_scopes = kwargs['assignableScopes'] + if role_definition_id is None and 'roleDefinitionId' in kwargs: + role_definition_id = kwargs['roleDefinitionId'] + if role_definition_resource_id is None and 'roleDefinitionResourceId' in kwargs: + role_definition_resource_id = kwargs['roleDefinitionResourceId'] + if assignable_scopes is not None: - pulumi.set(__self__, "assignable_scopes", assignable_scopes) + _setter("assignable_scopes", assignable_scopes) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if permissions is not None: - pulumi.set(__self__, "permissions", permissions) + _setter("permissions", permissions) if role_definition_id is not None: - pulumi.set(__self__, "role_definition_id", role_definition_id) + _setter("role_definition_id", role_definition_id) if role_definition_resource_id is not None: - pulumi.set(__self__, "role_definition_resource_id", role_definition_resource_id) + _setter("role_definition_resource_id", role_definition_resource_id) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter(name="assignableScopes") @@ -344,6 +400,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DefinitionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/role/get_role_definition.py b/sdk/python/pulumi_azure/role/get_role_definition.py index fb2f484d65..b77813f631 100644 --- a/sdk/python/pulumi_azure/role/get_role_definition.py +++ b/sdk/python/pulumi_azure/role/get_role_definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/role/outputs.py b/sdk/python/pulumi_azure/role/outputs.py index 507ea836c8..8ea99e3361 100644 --- a/sdk/python/pulumi_azure/role/outputs.py +++ b/sdk/python/pulumi_azure/role/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -48,14 +48,37 @@ def __init__(__self__, *, :param Sequence[str] not_actions: One or more Disallowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. :param Sequence[str] not_data_actions: One or more Disallowed Data Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. """ + DefinitionPermission._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + data_actions=data_actions, + not_actions=not_actions, + not_data_actions=not_data_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[Sequence[str]] = None, + data_actions: Optional[Sequence[str]] = None, + not_actions: Optional[Sequence[str]] = None, + not_data_actions: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if data_actions is None and 'dataActions' in kwargs: + data_actions = kwargs['dataActions'] + if not_actions is None and 'notActions' in kwargs: + not_actions = kwargs['notActions'] + if not_data_actions is None and 'notDataActions' in kwargs: + not_data_actions = kwargs['notDataActions'] + if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if data_actions is not None: - pulumi.set(__self__, "data_actions", data_actions) + _setter("data_actions", data_actions) if not_actions is not None: - pulumi.set(__self__, "not_actions", not_actions) + _setter("not_actions", not_actions) if not_data_actions is not None: - pulumi.set(__self__, "not_data_actions", not_data_actions) + _setter("not_data_actions", not_data_actions) @property @pulumi.getter @@ -101,12 +124,39 @@ def __init__(__self__, *, :param Sequence[str] actions: a list of actions supported by this role :param Sequence[str] not_actions: a list of actions which are denied by this role """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "not_actions", not_actions) + GetRoleDefinitionPermissionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + not_actions=not_actions, + data_actions=data_actions, + not_data_actions=not_data_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[Sequence[str]] = None, + not_actions: Optional[Sequence[str]] = None, + data_actions: Optional[Sequence[str]] = None, + not_data_actions: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if not_actions is None and 'notActions' in kwargs: + not_actions = kwargs['notActions'] + if not_actions is None: + raise TypeError("Missing 'not_actions' argument") + if data_actions is None and 'dataActions' in kwargs: + data_actions = kwargs['dataActions'] + if not_data_actions is None and 'notDataActions' in kwargs: + not_data_actions = kwargs['notDataActions'] + + _setter("actions", actions) + _setter("not_actions", not_actions) if data_actions is not None: - pulumi.set(__self__, "data_actions", data_actions) + _setter("data_actions", data_actions) if not_data_actions is not None: - pulumi.set(__self__, "not_data_actions", not_data_actions) + _setter("not_data_actions", not_data_actions) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/search/_inputs.py b/sdk/python/pulumi_azure/search/_inputs.py index 2eea35e972..5b339c7c6b 100644 --- a/sdk/python/pulumi_azure/search/_inputs.py +++ b/sdk/python/pulumi_azure/search/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -25,11 +25,32 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ServiceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -77,10 +98,23 @@ def __init__(__self__, *, :param pulumi.Input[str] key: The value of this Query Key. :param pulumi.Input[str] name: The Name which should be used for this Search Service. Changing this forces a new Search Service to be created. """ + ServiceQueryKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/search/get_service.py b/sdk/python/pulumi_azure/search/get_service.py index af07aff3a3..e8210997f0 100644 --- a/sdk/python/pulumi_azure/search/get_service.py +++ b/sdk/python/pulumi_azure/search/get_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/search/outputs.py b/sdk/python/pulumi_azure/search/outputs.py index 6fd3ef9a96..f41dfb25a1 100644 --- a/sdk/python/pulumi_azure/search/outputs.py +++ b/sdk/python/pulumi_azure/search/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -46,11 +46,32 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ServiceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -86,10 +107,23 @@ def __init__(__self__, *, :param str key: The value of this Query Key. :param str name: The Name which should be used for this Search Service. Changing this forces a new Search Service to be created. """ + ServiceQueryKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -119,9 +153,34 @@ def __init__(__self__, *, :param str tenant_id: The ID of the Tenant the Service Principal is assigned in. :param str type: The identity type of this Managed Service Identity. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetServiceIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="principalId") @@ -157,8 +216,25 @@ def __init__(__self__, *, :param str key: The value of this Query Key. :param str name: The Name of the Search Service. """ - pulumi.set(__self__, "key", key) - pulumi.set(__self__, "name", name) + GetServiceQueryKeyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("key", key) + _setter("name", name) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/search/service.py b/sdk/python/pulumi_azure/search/service.py index 8952810b71..eb0991dcab 100644 --- a/sdk/python/pulumi_azure/search/service.py +++ b/sdk/python/pulumi_azure/search/service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -63,34 +63,97 @@ def __init__(__self__, *, > **NOTE:** The `semantic_search_sku` cannot be defined if your Search Services `sku` is set to `free`. The Semantic Search feature is only available in certain regions, please see the [product documentation](https://learn.microsoft.com/azure/search/semantic-search-overview#availability-and-pricing) for more information. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Specifies a mapping of tags which should be assigned to this Search Service. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + ServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + allowed_ips=allowed_ips, + authentication_failure_mode=authentication_failure_mode, + customer_managed_key_enforcement_enabled=customer_managed_key_enforcement_enabled, + hosting_mode=hosting_mode, + identity=identity, + local_authentication_enabled=local_authentication_enabled, + location=location, + name=name, + partition_count=partition_count, + public_network_access_enabled=public_network_access_enabled, + replica_count=replica_count, + semantic_search_sku=semantic_search_sku, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + allowed_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + authentication_failure_mode: Optional[pulumi.Input[str]] = None, + customer_managed_key_enforcement_enabled: Optional[pulumi.Input[bool]] = None, + hosting_mode: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ServiceIdentityArgs']] = None, + local_authentication_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_count: Optional[pulumi.Input[int]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + replica_count: Optional[pulumi.Input[int]] = None, + semantic_search_sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if allowed_ips is None and 'allowedIps' in kwargs: + allowed_ips = kwargs['allowedIps'] + if authentication_failure_mode is None and 'authenticationFailureMode' in kwargs: + authentication_failure_mode = kwargs['authenticationFailureMode'] + if customer_managed_key_enforcement_enabled is None and 'customerManagedKeyEnforcementEnabled' in kwargs: + customer_managed_key_enforcement_enabled = kwargs['customerManagedKeyEnforcementEnabled'] + if hosting_mode is None and 'hostingMode' in kwargs: + hosting_mode = kwargs['hostingMode'] + if local_authentication_enabled is None and 'localAuthenticationEnabled' in kwargs: + local_authentication_enabled = kwargs['localAuthenticationEnabled'] + if partition_count is None and 'partitionCount' in kwargs: + partition_count = kwargs['partitionCount'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if replica_count is None and 'replicaCount' in kwargs: + replica_count = kwargs['replicaCount'] + if semantic_search_sku is None and 'semanticSearchSku' in kwargs: + semantic_search_sku = kwargs['semanticSearchSku'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if allowed_ips is not None: - pulumi.set(__self__, "allowed_ips", allowed_ips) + _setter("allowed_ips", allowed_ips) if authentication_failure_mode is not None: - pulumi.set(__self__, "authentication_failure_mode", authentication_failure_mode) + _setter("authentication_failure_mode", authentication_failure_mode) if customer_managed_key_enforcement_enabled is not None: - pulumi.set(__self__, "customer_managed_key_enforcement_enabled", customer_managed_key_enforcement_enabled) + _setter("customer_managed_key_enforcement_enabled", customer_managed_key_enforcement_enabled) if hosting_mode is not None: - pulumi.set(__self__, "hosting_mode", hosting_mode) + _setter("hosting_mode", hosting_mode) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_authentication_enabled is not None: - pulumi.set(__self__, "local_authentication_enabled", local_authentication_enabled) + _setter("local_authentication_enabled", local_authentication_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_count is not None: - pulumi.set(__self__, "partition_count", partition_count) + _setter("partition_count", partition_count) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if replica_count is not None: - pulumi.set(__self__, "replica_count", replica_count) + _setter("replica_count", replica_count) if semantic_search_sku is not None: - pulumi.set(__self__, "semantic_search_sku", semantic_search_sku) + _setter("semantic_search_sku", semantic_search_sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -343,42 +406,113 @@ def __init__(__self__, *, > **NOTE:** The SKUs `standard2`, `standard3`, `storage_optimized_l1` and `storage_optimized_l2` are only available by submitting a quota increase request to Microsoft. Please see the [product documentation](https://learn.microsoft.com/azure/azure-resource-manager/troubleshooting/error-resource-quota?tabs=azure-cli) on how to submit a quota increase request. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Specifies a mapping of tags which should be assigned to this Search Service. """ + _ServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_ips=allowed_ips, + authentication_failure_mode=authentication_failure_mode, + customer_managed_key_enforcement_enabled=customer_managed_key_enforcement_enabled, + hosting_mode=hosting_mode, + identity=identity, + local_authentication_enabled=local_authentication_enabled, + location=location, + name=name, + partition_count=partition_count, + primary_key=primary_key, + public_network_access_enabled=public_network_access_enabled, + query_keys=query_keys, + replica_count=replica_count, + resource_group_name=resource_group_name, + secondary_key=secondary_key, + semantic_search_sku=semantic_search_sku, + sku=sku, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + authentication_failure_mode: Optional[pulumi.Input[str]] = None, + customer_managed_key_enforcement_enabled: Optional[pulumi.Input[bool]] = None, + hosting_mode: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ServiceIdentityArgs']] = None, + local_authentication_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_count: Optional[pulumi.Input[int]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + query_keys: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceQueryKeyArgs']]]] = None, + replica_count: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + semantic_search_sku: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_ips is None and 'allowedIps' in kwargs: + allowed_ips = kwargs['allowedIps'] + if authentication_failure_mode is None and 'authenticationFailureMode' in kwargs: + authentication_failure_mode = kwargs['authenticationFailureMode'] + if customer_managed_key_enforcement_enabled is None and 'customerManagedKeyEnforcementEnabled' in kwargs: + customer_managed_key_enforcement_enabled = kwargs['customerManagedKeyEnforcementEnabled'] + if hosting_mode is None and 'hostingMode' in kwargs: + hosting_mode = kwargs['hostingMode'] + if local_authentication_enabled is None and 'localAuthenticationEnabled' in kwargs: + local_authentication_enabled = kwargs['localAuthenticationEnabled'] + if partition_count is None and 'partitionCount' in kwargs: + partition_count = kwargs['partitionCount'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if query_keys is None and 'queryKeys' in kwargs: + query_keys = kwargs['queryKeys'] + if replica_count is None and 'replicaCount' in kwargs: + replica_count = kwargs['replicaCount'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if semantic_search_sku is None and 'semanticSearchSku' in kwargs: + semantic_search_sku = kwargs['semanticSearchSku'] + if allowed_ips is not None: - pulumi.set(__self__, "allowed_ips", allowed_ips) + _setter("allowed_ips", allowed_ips) if authentication_failure_mode is not None: - pulumi.set(__self__, "authentication_failure_mode", authentication_failure_mode) + _setter("authentication_failure_mode", authentication_failure_mode) if customer_managed_key_enforcement_enabled is not None: - pulumi.set(__self__, "customer_managed_key_enforcement_enabled", customer_managed_key_enforcement_enabled) + _setter("customer_managed_key_enforcement_enabled", customer_managed_key_enforcement_enabled) if hosting_mode is not None: - pulumi.set(__self__, "hosting_mode", hosting_mode) + _setter("hosting_mode", hosting_mode) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_authentication_enabled is not None: - pulumi.set(__self__, "local_authentication_enabled", local_authentication_enabled) + _setter("local_authentication_enabled", local_authentication_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_count is not None: - pulumi.set(__self__, "partition_count", partition_count) + _setter("partition_count", partition_count) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if query_keys is not None: - pulumi.set(__self__, "query_keys", query_keys) + _setter("query_keys", query_keys) if replica_count is not None: - pulumi.set(__self__, "replica_count", replica_count) + _setter("replica_count", replica_count) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if semantic_search_sku is not None: - pulumi.set(__self__, "semantic_search_sku", semantic_search_sku) + _setter("semantic_search_sku", semantic_search_sku) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="allowedIps") @@ -784,6 +918,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -817,6 +955,11 @@ def _internal_init(__self__, __props__.__dict__["authentication_failure_mode"] = authentication_failure_mode __props__.__dict__["customer_managed_key_enforcement_enabled"] = customer_managed_key_enforcement_enabled __props__.__dict__["hosting_mode"] = hosting_mode + if identity is not None and not isinstance(identity, ServiceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ServiceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["local_authentication_enabled"] = local_authentication_enabled __props__.__dict__["location"] = location diff --git a/sdk/python/pulumi_azure/search/shared_private_link_service.py b/sdk/python/pulumi_azure/search/shared_private_link_service.py index 503dd65c9c..12570befe2 100644 --- a/sdk/python/pulumi_azure/search/shared_private_link_service.py +++ b/sdk/python/pulumi_azure/search/shared_private_link_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SharedPrivateLinkServiceArgs', 'SharedPrivateLinkService'] @@ -29,13 +29,46 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specify the name of the Azure Search Shared Private Link Resource. Changing this forces a new resource to be created. :param pulumi.Input[str] request_message: Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. """ - pulumi.set(__self__, "search_service_id", search_service_id) - pulumi.set(__self__, "subresource_name", subresource_name) - pulumi.set(__self__, "target_resource_id", target_resource_id) + SharedPrivateLinkServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + search_service_id=search_service_id, + subresource_name=subresource_name, + target_resource_id=target_resource_id, + name=name, + request_message=request_message, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + search_service_id: Optional[pulumi.Input[str]] = None, + subresource_name: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + request_message: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if search_service_id is None and 'searchServiceId' in kwargs: + search_service_id = kwargs['searchServiceId'] + if search_service_id is None: + raise TypeError("Missing 'search_service_id' argument") + if subresource_name is None and 'subresourceName' in kwargs: + subresource_name = kwargs['subresourceName'] + if subresource_name is None: + raise TypeError("Missing 'subresource_name' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + if request_message is None and 'requestMessage' in kwargs: + request_message = kwargs['requestMessage'] + + _setter("search_service_id", search_service_id) + _setter("subresource_name", subresource_name) + _setter("target_resource_id", target_resource_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if request_message is not None: - pulumi.set(__self__, "request_message", request_message) + _setter("request_message", request_message) @property @pulumi.getter(name="searchServiceId") @@ -120,18 +153,47 @@ def __init__(__self__, *, > **NOTE:** The sub resource name should match with the type of the target resource id that's being specified. """ + _SharedPrivateLinkServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + request_message=request_message, + search_service_id=search_service_id, + status=status, + subresource_name=subresource_name, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + request_message: Optional[pulumi.Input[str]] = None, + search_service_id: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + subresource_name: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if request_message is None and 'requestMessage' in kwargs: + request_message = kwargs['requestMessage'] + if search_service_id is None and 'searchServiceId' in kwargs: + search_service_id = kwargs['searchServiceId'] + if subresource_name is None and 'subresourceName' in kwargs: + subresource_name = kwargs['subresourceName'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if request_message is not None: - pulumi.set(__self__, "request_message", request_message) + _setter("request_message", request_message) if search_service_id is not None: - pulumi.set(__self__, "search_service_id", search_service_id) + _setter("search_service_id", search_service_id) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if subresource_name is not None: - pulumi.set(__self__, "subresource_name", subresource_name) + _setter("subresource_name", subresource_name) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter @@ -313,6 +375,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SharedPrivateLinkServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/securitycenter/_inputs.py b/sdk/python/pulumi_azure/securitycenter/_inputs.py index e060edd99a..012140b155 100644 --- a/sdk/python/pulumi_azure/securitycenter/_inputs.py +++ b/sdk/python/pulumi_azure/securitycenter/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -29,11 +29,28 @@ def __init__(__self__, *, :param pulumi.Input[str] cause: Specifies the cause of the assessment status. :param pulumi.Input[str] description: Specifies the human readable description of the assessment status. """ - pulumi.set(__self__, "code", code) + AssessmentStatusArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + code=code, + cause=cause, + description=description, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + code: Optional[pulumi.Input[str]] = None, + cause: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if code is None: + raise TypeError("Missing 'code' argument") + + _setter("code", code) if cause is not None: - pulumi.set(__self__, "cause", cause) + _setter("cause", cause) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) @property @pulumi.getter @@ -85,12 +102,39 @@ def __init__(__self__, *, :param pulumi.Input[str] connection_string: (Optional, but required when `type` is `EventHub`) A connection string to send data to the target Event Hub namespace, this should include a key with send permissions. :param pulumi.Input[str] trigger_url: (Optional, but required when `type` is `LogicApp`) The callback URL to trigger the Logic App that will receive and process data sent by this automation. This can be found in the Azure Portal under "See trigger history" """ - pulumi.set(__self__, "resource_id", resource_id) - pulumi.set(__self__, "type", type) + AutomationActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_id=resource_id, + type=type, + connection_string=connection_string, + trigger_url=trigger_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_id: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + connection_string: Optional[pulumi.Input[str]] = None, + trigger_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if trigger_url is None and 'triggerUrl' in kwargs: + trigger_url = kwargs['triggerUrl'] + + _setter("resource_id", resource_id) + _setter("type", type) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if trigger_url is not None: - pulumi.set(__self__, "trigger_url", trigger_url) + _setter("trigger_url", trigger_url) @property @pulumi.getter(name="resourceId") @@ -152,9 +196,28 @@ def __init__(__self__, *, > **NOTE:** When multiple `rule_set` block are provided, a logical 'OR' is applied to the evaluation of them. """ - pulumi.set(__self__, "event_source", event_source) + AutomationSourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_source=event_source, + rule_sets=rule_sets, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_source: Optional[pulumi.Input[str]] = None, + rule_sets: Optional[pulumi.Input[Sequence[pulumi.Input['AutomationSourceRuleSetArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_source is None and 'eventSource' in kwargs: + event_source = kwargs['eventSource'] + if event_source is None: + raise TypeError("Missing 'event_source' argument") + if rule_sets is None and 'ruleSets' in kwargs: + rule_sets = kwargs['ruleSets'] + + _setter("event_source", event_source) if rule_sets is not None: - pulumi.set(__self__, "rule_sets", rule_sets) + _setter("rule_sets", rule_sets) @property @pulumi.getter(name="eventSource") @@ -192,7 +255,20 @@ def __init__(__self__, *, > **NOTE:** This automation will trigger when all of the `rule`s in this `rule_set` are evaluated as 'true'. This is equivalent to a logical 'AND'. """ - pulumi.set(__self__, "rules", rules) + AutomationSourceRuleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rules: Optional[pulumi.Input[Sequence[pulumi.Input['AutomationSourceRuleSetRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rules is None: + raise TypeError("Missing 'rules' argument") + + _setter("rules", rules) @property @pulumi.getter @@ -224,10 +300,41 @@ def __init__(__self__, *, > **NOTE:** The schema for Security Center alerts (when `event_source` is "Alerts") [can be found here](https://docs.microsoft.com/azure/security-center/alerts-schemas?tabs=schema-continuousexport) """ - pulumi.set(__self__, "expected_value", expected_value) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "property_path", property_path) - pulumi.set(__self__, "property_type", property_type) + AutomationSourceRuleSetRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + expected_value=expected_value, + operator=operator, + property_path=property_path, + property_type=property_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expected_value: Optional[pulumi.Input[str]] = None, + operator: Optional[pulumi.Input[str]] = None, + property_path: Optional[pulumi.Input[str]] = None, + property_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expected_value is None and 'expectedValue' in kwargs: + expected_value = kwargs['expectedValue'] + if expected_value is None: + raise TypeError("Missing 'expected_value' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if property_path is None and 'propertyPath' in kwargs: + property_path = kwargs['propertyPath'] + if property_path is None: + raise TypeError("Missing 'property_path' argument") + if property_type is None and 'propertyType' in kwargs: + property_type = kwargs['propertyType'] + if property_type is None: + raise TypeError("Missing 'property_type' argument") + + _setter("expected_value", expected_value) + _setter("operator", operator) + _setter("property_path", property_path) + _setter("property_type", property_type) @property @pulumi.getter(name="expectedValue") @@ -293,9 +400,26 @@ def __init__(__self__, *, > **NOTE:** Changing the pricing tier to `Standard` affects all resources of the given type in the subscription and could be quite costly. """ - pulumi.set(__self__, "name", name) + SubscriptionPricingExtensionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + additional_extension_properties=additional_extension_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + additional_extension_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if additional_extension_properties is None and 'additionalExtensionProperties' in kwargs: + additional_extension_properties = kwargs['additionalExtensionProperties'] + + _setter("name", name) if additional_extension_properties is not None: - pulumi.set(__self__, "additional_extension_properties", additional_extension_properties) + _setter("additional_extension_properties", additional_extension_properties) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/securitycenter/advanced_threat_protection.py b/sdk/python/pulumi_azure/securitycenter/advanced_threat_protection.py index 36f6a0b5e2..21ed0cd452 100644 --- a/sdk/python/pulumi_azure/securitycenter/advanced_threat_protection.py +++ b/sdk/python/pulumi_azure/securitycenter/advanced_threat_protection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AdvancedThreatProtectionArgs', 'AdvancedThreatProtection'] @@ -21,8 +21,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Should Advanced Threat Protection be enabled on this resource? :param pulumi.Input[str] target_resource_id: The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "target_resource_id", target_resource_id) + AdvancedThreatProtectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + + _setter("enabled", enabled) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter @@ -59,10 +78,25 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Should Advanced Threat Protection be enabled on this resource? :param pulumi.Input[str] target_resource_id: The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created. """ + _AdvancedThreatProtectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter @@ -180,6 +214,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AdvancedThreatProtectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/securitycenter/assessment.py b/sdk/python/pulumi_azure/securitycenter/assessment.py index b948661e2e..38a6732022 100644 --- a/sdk/python/pulumi_azure/securitycenter/assessment.py +++ b/sdk/python/pulumi_azure/securitycenter/assessment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,11 +27,40 @@ def __init__(__self__, *, :param pulumi.Input[str] target_resource_id: The ID of the target resource. Changing this forces a new security Assessment to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] additional_data: A map of additional data to associate with the assessment. """ - pulumi.set(__self__, "assessment_policy_id", assessment_policy_id) - pulumi.set(__self__, "status", status) - pulumi.set(__self__, "target_resource_id", target_resource_id) + AssessmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + assessment_policy_id=assessment_policy_id, + status=status, + target_resource_id=target_resource_id, + additional_data=additional_data, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + assessment_policy_id: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input['AssessmentStatusArgs']] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + additional_data: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if assessment_policy_id is None and 'assessmentPolicyId' in kwargs: + assessment_policy_id = kwargs['assessmentPolicyId'] + if assessment_policy_id is None: + raise TypeError("Missing 'assessment_policy_id' argument") + if status is None: + raise TypeError("Missing 'status' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + if additional_data is None and 'additionalData' in kwargs: + additional_data = kwargs['additionalData'] + + _setter("assessment_policy_id", assessment_policy_id) + _setter("status", status) + _setter("target_resource_id", target_resource_id) if additional_data is not None: - pulumi.set(__self__, "additional_data", additional_data) + _setter("additional_data", additional_data) @property @pulumi.getter(name="assessmentPolicyId") @@ -96,14 +125,37 @@ def __init__(__self__, *, :param pulumi.Input['AssessmentStatusArgs'] status: A `status` block as defined below. :param pulumi.Input[str] target_resource_id: The ID of the target resource. Changing this forces a new security Assessment to be created. """ + _AssessmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_data=additional_data, + assessment_policy_id=assessment_policy_id, + status=status, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_data: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + assessment_policy_id: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input['AssessmentStatusArgs']] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_data is None and 'additionalData' in kwargs: + additional_data = kwargs['additionalData'] + if assessment_policy_id is None and 'assessmentPolicyId' in kwargs: + assessment_policy_id = kwargs['assessmentPolicyId'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if additional_data is not None: - pulumi.set(__self__, "additional_data", additional_data) + _setter("additional_data", additional_data) if assessment_policy_id is not None: - pulumi.set(__self__, "assessment_policy_id", assessment_policy_id) + _setter("assessment_policy_id", assessment_policy_id) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter(name="additionalData") @@ -321,6 +373,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AssessmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -343,6 +399,11 @@ def _internal_init(__self__, if assessment_policy_id is None and not opts.urn: raise TypeError("Missing required property 'assessment_policy_id'") __props__.__dict__["assessment_policy_id"] = assessment_policy_id + if status is not None and not isinstance(status, AssessmentStatusArgs): + status = status or {} + def _setter(key, value): + status[key] = value + AssessmentStatusArgs._configure(_setter, **status) if status is None and not opts.urn: raise TypeError("Missing required property 'status'") __props__.__dict__["status"] = status diff --git a/sdk/python/pulumi_azure/securitycenter/assessment_policy.py b/sdk/python/pulumi_azure/securitycenter/assessment_policy.py index 45b7cc038b..d2307173b0 100644 --- a/sdk/python/pulumi_azure/securitycenter/assessment_policy.py +++ b/sdk/python/pulumi_azure/securitycenter/assessment_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AssessmentPolicyArgs', 'AssessmentPolicy'] @@ -33,20 +33,57 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] threats: A list of the threat impacts for the Security Center Assessment. Possible values are `AccountBreach`, `DataExfiltration`, `DataSpillage`, `DenialOfService`, `ElevationOfPrivilege`, `MaliciousInsider`, `MissingCoverage` and `ThreatResistance`. :param pulumi.Input[str] user_impact: The user impact of the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "display_name", display_name) + AssessmentPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + display_name=display_name, + categories=categories, + implementation_effort=implementation_effort, + remediation_description=remediation_description, + severity=severity, + threats=threats, + user_impact=user_impact, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + categories: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + implementation_effort: Optional[pulumi.Input[str]] = None, + remediation_description: Optional[pulumi.Input[str]] = None, + severity: Optional[pulumi.Input[str]] = None, + threats: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_impact: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if implementation_effort is None and 'implementationEffort' in kwargs: + implementation_effort = kwargs['implementationEffort'] + if remediation_description is None and 'remediationDescription' in kwargs: + remediation_description = kwargs['remediationDescription'] + if user_impact is None and 'userImpact' in kwargs: + user_impact = kwargs['userImpact'] + + _setter("description", description) + _setter("display_name", display_name) if categories is not None: - pulumi.set(__self__, "categories", categories) + _setter("categories", categories) if implementation_effort is not None: - pulumi.set(__self__, "implementation_effort", implementation_effort) + _setter("implementation_effort", implementation_effort) if remediation_description is not None: - pulumi.set(__self__, "remediation_description", remediation_description) + _setter("remediation_description", remediation_description) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if threats is not None: - pulumi.set(__self__, "threats", threats) + _setter("threats", threats) if user_impact is not None: - pulumi.set(__self__, "user_impact", user_impact) + _setter("user_impact", user_impact) @property @pulumi.getter @@ -169,24 +206,59 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] threats: A list of the threat impacts for the Security Center Assessment. Possible values are `AccountBreach`, `DataExfiltration`, `DataSpillage`, `DenialOfService`, `ElevationOfPrivilege`, `MaliciousInsider`, `MissingCoverage` and `ThreatResistance`. :param pulumi.Input[str] user_impact: The user impact of the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`. """ + _AssessmentPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + categories=categories, + description=description, + display_name=display_name, + implementation_effort=implementation_effort, + name=name, + remediation_description=remediation_description, + severity=severity, + threats=threats, + user_impact=user_impact, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + categories: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + implementation_effort: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + remediation_description: Optional[pulumi.Input[str]] = None, + severity: Optional[pulumi.Input[str]] = None, + threats: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_impact: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if implementation_effort is None and 'implementationEffort' in kwargs: + implementation_effort = kwargs['implementationEffort'] + if remediation_description is None and 'remediationDescription' in kwargs: + remediation_description = kwargs['remediationDescription'] + if user_impact is None and 'userImpact' in kwargs: + user_impact = kwargs['userImpact'] + if categories is not None: - pulumi.set(__self__, "categories", categories) + _setter("categories", categories) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if implementation_effort is not None: - pulumi.set(__self__, "implementation_effort", implementation_effort) + _setter("implementation_effort", implementation_effort) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if remediation_description is not None: - pulumi.set(__self__, "remediation_description", remediation_description) + _setter("remediation_description", remediation_description) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if threats is not None: - pulumi.set(__self__, "threats", threats) + _setter("threats", threats) if user_impact is not None: - pulumi.set(__self__, "user_impact", user_impact) + _setter("user_impact", user_impact) @property @pulumi.getter @@ -384,6 +456,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AssessmentPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/securitycenter/auto_provisioning.py b/sdk/python/pulumi_azure/securitycenter/auto_provisioning.py index 7a1dace26e..31a126e294 100644 --- a/sdk/python/pulumi_azure/securitycenter/auto_provisioning.py +++ b/sdk/python/pulumi_azure/securitycenter/auto_provisioning.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AutoProvisioningArgs', 'AutoProvisioning'] @@ -19,7 +19,22 @@ def __init__(__self__, *, The set of arguments for constructing a AutoProvisioning resource. :param pulumi.Input[str] auto_provision: Should the security agent be automatically provisioned on Virtual Machines in this subscription? Possible values are `On` (to install the security agent automatically, if it's missing) or `Off` (to not install the security agent automatically). """ - pulumi.set(__self__, "auto_provision", auto_provision) + AutoProvisioningArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_provision=auto_provision, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_provision: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_provision is None and 'autoProvision' in kwargs: + auto_provision = kwargs['autoProvision'] + if auto_provision is None: + raise TypeError("Missing 'auto_provision' argument") + + _setter("auto_provision", auto_provision) @property @pulumi.getter(name="autoProvision") @@ -42,8 +57,21 @@ def __init__(__self__, *, Input properties used for looking up and filtering AutoProvisioning resources. :param pulumi.Input[str] auto_provision: Should the security agent be automatically provisioned on Virtual Machines in this subscription? Possible values are `On` (to install the security agent automatically, if it's missing) or `Off` (to not install the security agent automatically). """ + _AutoProvisioningState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_provision=auto_provision, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_provision: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_provision is None and 'autoProvision' in kwargs: + auto_provision = kwargs['autoProvision'] + if auto_provision is not None: - pulumi.set(__self__, "auto_provision", auto_provision) + _setter("auto_provision", auto_provision) @property @pulumi.getter(name="autoProvision") @@ -129,6 +157,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AutoProvisioningArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/securitycenter/automation.py b/sdk/python/pulumi_azure/securitycenter/automation.py index 88c248c006..3bcc190ffa 100644 --- a/sdk/python/pulumi_azure/securitycenter/automation.py +++ b/sdk/python/pulumi_azure/securitycenter/automation.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,20 +37,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Security Center Automation. Changing this forces a new Security Center Automation to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource. """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "scopes", scopes) - pulumi.set(__self__, "sources", sources) + AutomationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + resource_group_name=resource_group_name, + scopes=scopes, + sources=sources, + description=description, + enabled=enabled, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input['AutomationActionArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input['AutomationSourceArgs']]]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if scopes is None: + raise TypeError("Missing 'scopes' argument") + if sources is None: + raise TypeError("Missing 'sources' argument") + + _setter("actions", actions) + _setter("resource_group_name", resource_group_name) + _setter("scopes", scopes) + _setter("sources", sources) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -185,24 +222,53 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['AutomationSourceArgs']]] sources: One or more `source` blocks as defined below. A `source` defines what data types will be processed and a set of rules to filter that data. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource. """ + _AutomationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + description=description, + enabled=enabled, + location=location, + name=name, + resource_group_name=resource_group_name, + scopes=scopes, + sources=sources, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input[Sequence[pulumi.Input['AutomationActionArgs']]]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input['AutomationSourceArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if actions is not None: - pulumi.set(__self__, "actions", actions) + _setter("actions", actions) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if scopes is not None: - pulumi.set(__self__, "scopes", scopes) + _setter("scopes", scopes) if sources is not None: - pulumi.set(__self__, "sources", sources) + _setter("sources", sources) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -472,6 +538,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AutomationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/securitycenter/contact.py b/sdk/python/pulumi_azure/securitycenter/contact.py index 777a3a87c3..75c9e5e9de 100644 --- a/sdk/python/pulumi_azure/securitycenter/contact.py +++ b/sdk/python/pulumi_azure/securitycenter/contact.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ContactArgs', 'Contact'] @@ -27,13 +27,42 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Security Center Contact. Defaults to `default1`. :param pulumi.Input[str] phone: The phone number of the Security Center Contact. """ - pulumi.set(__self__, "alert_notifications", alert_notifications) - pulumi.set(__self__, "alerts_to_admins", alerts_to_admins) - pulumi.set(__self__, "email", email) + ContactArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_notifications=alert_notifications, + alerts_to_admins=alerts_to_admins, + email=email, + name=name, + phone=phone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_notifications: Optional[pulumi.Input[bool]] = None, + alerts_to_admins: Optional[pulumi.Input[bool]] = None, + email: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + phone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_notifications is None and 'alertNotifications' in kwargs: + alert_notifications = kwargs['alertNotifications'] + if alert_notifications is None: + raise TypeError("Missing 'alert_notifications' argument") + if alerts_to_admins is None and 'alertsToAdmins' in kwargs: + alerts_to_admins = kwargs['alertsToAdmins'] + if alerts_to_admins is None: + raise TypeError("Missing 'alerts_to_admins' argument") + if email is None: + raise TypeError("Missing 'email' argument") + + _setter("alert_notifications", alert_notifications) + _setter("alerts_to_admins", alerts_to_admins) + _setter("email", email) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if phone is not None: - pulumi.set(__self__, "phone", phone) + _setter("phone", phone) @property @pulumi.getter(name="alertNotifications") @@ -112,16 +141,39 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Security Center Contact. Defaults to `default1`. :param pulumi.Input[str] phone: The phone number of the Security Center Contact. """ + _ContactState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_notifications=alert_notifications, + alerts_to_admins=alerts_to_admins, + email=email, + name=name, + phone=phone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_notifications: Optional[pulumi.Input[bool]] = None, + alerts_to_admins: Optional[pulumi.Input[bool]] = None, + email: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + phone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_notifications is None and 'alertNotifications' in kwargs: + alert_notifications = kwargs['alertNotifications'] + if alerts_to_admins is None and 'alertsToAdmins' in kwargs: + alerts_to_admins = kwargs['alertsToAdmins'] + if alert_notifications is not None: - pulumi.set(__self__, "alert_notifications", alert_notifications) + _setter("alert_notifications", alert_notifications) if alerts_to_admins is not None: - pulumi.set(__self__, "alerts_to_admins", alerts_to_admins) + _setter("alerts_to_admins", alerts_to_admins) if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if phone is not None: - pulumi.set(__self__, "phone", phone) + _setter("phone", phone) @property @pulumi.getter(name="alertNotifications") @@ -271,6 +323,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ContactArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/securitycenter/outputs.py b/sdk/python/pulumi_azure/securitycenter/outputs.py index 876a4b04f4..08f7d149fb 100644 --- a/sdk/python/pulumi_azure/securitycenter/outputs.py +++ b/sdk/python/pulumi_azure/securitycenter/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -30,11 +30,28 @@ def __init__(__self__, *, :param str cause: Specifies the cause of the assessment status. :param str description: Specifies the human readable description of the assessment status. """ - pulumi.set(__self__, "code", code) + AssessmentStatus._configure( + lambda key, value: pulumi.set(__self__, key, value), + code=code, + cause=cause, + description=description, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + code: Optional[str] = None, + cause: Optional[str] = None, + description: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if code is None: + raise TypeError("Missing 'code' argument") + + _setter("code", code) if cause is not None: - pulumi.set(__self__, "cause", cause) + _setter("cause", cause) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) @property @pulumi.getter @@ -95,12 +112,39 @@ def __init__(__self__, *, :param str connection_string: (Optional, but required when `type` is `EventHub`) A connection string to send data to the target Event Hub namespace, this should include a key with send permissions. :param str trigger_url: (Optional, but required when `type` is `LogicApp`) The callback URL to trigger the Logic App that will receive and process data sent by this automation. This can be found in the Azure Portal under "See trigger history" """ - pulumi.set(__self__, "resource_id", resource_id) - pulumi.set(__self__, "type", type) + AutomationAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_id=resource_id, + type=type, + connection_string=connection_string, + trigger_url=trigger_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_id: Optional[str] = None, + type: Optional[str] = None, + connection_string: Optional[str] = None, + trigger_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_id is None and 'resourceId' in kwargs: + resource_id = kwargs['resourceId'] + if resource_id is None: + raise TypeError("Missing 'resource_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if connection_string is None and 'connectionString' in kwargs: + connection_string = kwargs['connectionString'] + if trigger_url is None and 'triggerUrl' in kwargs: + trigger_url = kwargs['triggerUrl'] + + _setter("resource_id", resource_id) + _setter("type", type) if connection_string is not None: - pulumi.set(__self__, "connection_string", connection_string) + _setter("connection_string", connection_string) if trigger_url is not None: - pulumi.set(__self__, "trigger_url", trigger_url) + _setter("trigger_url", trigger_url) @property @pulumi.getter(name="resourceId") @@ -165,9 +209,28 @@ def __init__(__self__, *, > **NOTE:** When multiple `rule_set` block are provided, a logical 'OR' is applied to the evaluation of them. """ - pulumi.set(__self__, "event_source", event_source) + AutomationSource._configure( + lambda key, value: pulumi.set(__self__, key, value), + event_source=event_source, + rule_sets=rule_sets, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + event_source: Optional[str] = None, + rule_sets: Optional[Sequence['outputs.AutomationSourceRuleSet']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if event_source is None and 'eventSource' in kwargs: + event_source = kwargs['eventSource'] + if event_source is None: + raise TypeError("Missing 'event_source' argument") + if rule_sets is None and 'ruleSets' in kwargs: + rule_sets = kwargs['ruleSets'] + + _setter("event_source", event_source) if rule_sets is not None: - pulumi.set(__self__, "rule_sets", rule_sets) + _setter("rule_sets", rule_sets) @property @pulumi.getter(name="eventSource") @@ -197,7 +260,20 @@ def __init__(__self__, *, > **NOTE:** This automation will trigger when all of the `rule`s in this `rule_set` are evaluated as 'true'. This is equivalent to a logical 'AND'. """ - pulumi.set(__self__, "rules", rules) + AutomationSourceRuleSet._configure( + lambda key, value: pulumi.set(__self__, key, value), + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rules: Optional[Sequence['outputs.AutomationSourceRuleSetRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rules is None: + raise TypeError("Missing 'rules' argument") + + _setter("rules", rules) @property @pulumi.getter @@ -246,10 +322,41 @@ def __init__(__self__, *, > **NOTE:** The schema for Security Center alerts (when `event_source` is "Alerts") [can be found here](https://docs.microsoft.com/azure/security-center/alerts-schemas?tabs=schema-continuousexport) """ - pulumi.set(__self__, "expected_value", expected_value) - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "property_path", property_path) - pulumi.set(__self__, "property_type", property_type) + AutomationSourceRuleSetRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + expected_value=expected_value, + operator=operator, + property_path=property_path, + property_type=property_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expected_value: Optional[str] = None, + operator: Optional[str] = None, + property_path: Optional[str] = None, + property_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expected_value is None and 'expectedValue' in kwargs: + expected_value = kwargs['expectedValue'] + if expected_value is None: + raise TypeError("Missing 'expected_value' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if property_path is None and 'propertyPath' in kwargs: + property_path = kwargs['propertyPath'] + if property_path is None: + raise TypeError("Missing 'property_path' argument") + if property_type is None and 'propertyType' in kwargs: + property_type = kwargs['propertyType'] + if property_type is None: + raise TypeError("Missing 'property_type' argument") + + _setter("expected_value", expected_value) + _setter("operator", operator) + _setter("property_path", property_path) + _setter("property_type", property_type) @property @pulumi.getter(name="expectedValue") @@ -316,9 +423,26 @@ def __init__(__self__, *, > **NOTE:** Changing the pricing tier to `Standard` affects all resources of the given type in the subscription and could be quite costly. """ - pulumi.set(__self__, "name", name) + SubscriptionPricingExtension._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + additional_extension_properties=additional_extension_properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + additional_extension_properties: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if additional_extension_properties is None and 'additionalExtensionProperties' in kwargs: + additional_extension_properties = kwargs['additionalExtensionProperties'] + + _setter("name", name) if additional_extension_properties is not None: - pulumi.set(__self__, "additional_extension_properties", additional_extension_properties) + _setter("additional_extension_properties", additional_extension_properties) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/securitycenter/server_vulnerability_assessment.py b/sdk/python/pulumi_azure/securitycenter/server_vulnerability_assessment.py index 9b2ec518f5..5112fefb10 100644 --- a/sdk/python/pulumi_azure/securitycenter/server_vulnerability_assessment.py +++ b/sdk/python/pulumi_azure/securitycenter/server_vulnerability_assessment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServerVulnerabilityAssessmentArgs', 'ServerVulnerabilityAssessment'] @@ -25,10 +25,27 @@ def __init__(__self__, *, > **NOTE:** One of either `virtual_machine_id` or `hybrid_machine_id` must be set. """ + ServerVulnerabilityAssessmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + hybrid_machine_id=hybrid_machine_id, + virtual_machine_id=virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hybrid_machine_id: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hybrid_machine_id is None and 'hybridMachineId' in kwargs: + hybrid_machine_id = kwargs['hybridMachineId'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if hybrid_machine_id is not None: - pulumi.set(__self__, "hybrid_machine_id", hybrid_machine_id) + _setter("hybrid_machine_id", hybrid_machine_id) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) @property @pulumi.getter(name="hybridMachineId") @@ -73,10 +90,27 @@ def __init__(__self__, *, > **NOTE:** One of either `virtual_machine_id` or `hybrid_machine_id` must be set. """ + _ServerVulnerabilityAssessmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + hybrid_machine_id=hybrid_machine_id, + virtual_machine_id=virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hybrid_machine_id: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hybrid_machine_id is None and 'hybridMachineId' in kwargs: + hybrid_machine_id = kwargs['hybridMachineId'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if hybrid_machine_id is not None: - pulumi.set(__self__, "hybrid_machine_id", hybrid_machine_id) + _setter("hybrid_machine_id", hybrid_machine_id) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) @property @pulumi.getter(name="hybridMachineId") @@ -272,6 +306,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerVulnerabilityAssessmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/securitycenter/server_vulnerability_assessment_virtual_machine.py b/sdk/python/pulumi_azure/securitycenter/server_vulnerability_assessment_virtual_machine.py index 6b2b745a92..ed420315fd 100644 --- a/sdk/python/pulumi_azure/securitycenter/server_vulnerability_assessment_virtual_machine.py +++ b/sdk/python/pulumi_azure/securitycenter/server_vulnerability_assessment_virtual_machine.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServerVulnerabilityAssessmentVirtualMachineArgs', 'ServerVulnerabilityAssessmentVirtualMachine'] @@ -19,7 +19,22 @@ def __init__(__self__, *, The set of arguments for constructing a ServerVulnerabilityAssessmentVirtualMachine resource. :param pulumi.Input[str] virtual_machine_id: The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + ServerVulnerabilityAssessmentVirtualMachineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + virtual_machine_id=virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_id is None: + raise TypeError("Missing 'virtual_machine_id' argument") + + _setter("virtual_machine_id", virtual_machine_id) @property @pulumi.getter(name="virtualMachineId") @@ -42,8 +57,21 @@ def __init__(__self__, *, Input properties used for looking up and filtering ServerVulnerabilityAssessmentVirtualMachine resources. :param pulumi.Input[str] virtual_machine_id: The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created. """ + _ServerVulnerabilityAssessmentVirtualMachineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + virtual_machine_id=virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) @property @pulumi.getter(name="virtualMachineId") @@ -201,6 +229,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServerVulnerabilityAssessmentVirtualMachineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/securitycenter/setting.py b/sdk/python/pulumi_azure/securitycenter/setting.py index b9707d223a..b64248efbd 100644 --- a/sdk/python/pulumi_azure/securitycenter/setting.py +++ b/sdk/python/pulumi_azure/securitycenter/setting.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SettingArgs', 'Setting'] @@ -21,8 +21,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Boolean flag to enable/disable data access. :param pulumi.Input[str] setting_name: The setting to manage. Possible values are `MCAS` , `WDATP` and `SENTINEL`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "setting_name", setting_name) + SettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + setting_name=setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if setting_name is None and 'settingName' in kwargs: + setting_name = kwargs['settingName'] + if setting_name is None: + raise TypeError("Missing 'setting_name' argument") + + _setter("enabled", enabled) + _setter("setting_name", setting_name) @property @pulumi.getter @@ -59,10 +78,25 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Boolean flag to enable/disable data access. :param pulumi.Input[str] setting_name: The setting to manage. Possible values are `MCAS` , `WDATP` and `SENTINEL`. Changing this forces a new resource to be created. """ + _SettingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + setting_name=setting_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + setting_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if setting_name is None and 'settingName' in kwargs: + setting_name = kwargs['settingName'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if setting_name is not None: - pulumi.set(__self__, "setting_name", setting_name) + _setter("setting_name", setting_name) @property @pulumi.getter @@ -170,6 +204,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SettingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/securitycenter/storage_defender.py b/sdk/python/pulumi_azure/securitycenter/storage_defender.py index 83a97acee1..abcffadafd 100644 --- a/sdk/python/pulumi_azure/securitycenter/storage_defender.py +++ b/sdk/python/pulumi_azure/securitycenter/storage_defender.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['StorageDefenderArgs', 'StorageDefender'] @@ -27,15 +27,46 @@ def __init__(__self__, *, :param pulumi.Input[bool] override_subscription_settings_enabled: Whether the settings defined for this storage account should override the settings defined for the subscription. Defaults to `false`. :param pulumi.Input[bool] sensitive_data_discovery_enabled: Whether Sensitive Data Discovery should be enabled. Defaults to `false`. """ - pulumi.set(__self__, "storage_account_id", storage_account_id) + StorageDefenderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_id=storage_account_id, + malware_scanning_on_upload_cap_gb_per_month=malware_scanning_on_upload_cap_gb_per_month, + malware_scanning_on_upload_enabled=malware_scanning_on_upload_enabled, + override_subscription_settings_enabled=override_subscription_settings_enabled, + sensitive_data_discovery_enabled=sensitive_data_discovery_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_id: Optional[pulumi.Input[str]] = None, + malware_scanning_on_upload_cap_gb_per_month: Optional[pulumi.Input[int]] = None, + malware_scanning_on_upload_enabled: Optional[pulumi.Input[bool]] = None, + override_subscription_settings_enabled: Optional[pulumi.Input[bool]] = None, + sensitive_data_discovery_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if malware_scanning_on_upload_cap_gb_per_month is None and 'malwareScanningOnUploadCapGbPerMonth' in kwargs: + malware_scanning_on_upload_cap_gb_per_month = kwargs['malwareScanningOnUploadCapGbPerMonth'] + if malware_scanning_on_upload_enabled is None and 'malwareScanningOnUploadEnabled' in kwargs: + malware_scanning_on_upload_enabled = kwargs['malwareScanningOnUploadEnabled'] + if override_subscription_settings_enabled is None and 'overrideSubscriptionSettingsEnabled' in kwargs: + override_subscription_settings_enabled = kwargs['overrideSubscriptionSettingsEnabled'] + if sensitive_data_discovery_enabled is None and 'sensitiveDataDiscoveryEnabled' in kwargs: + sensitive_data_discovery_enabled = kwargs['sensitiveDataDiscoveryEnabled'] + + _setter("storage_account_id", storage_account_id) if malware_scanning_on_upload_cap_gb_per_month is not None: - pulumi.set(__self__, "malware_scanning_on_upload_cap_gb_per_month", malware_scanning_on_upload_cap_gb_per_month) + _setter("malware_scanning_on_upload_cap_gb_per_month", malware_scanning_on_upload_cap_gb_per_month) if malware_scanning_on_upload_enabled is not None: - pulumi.set(__self__, "malware_scanning_on_upload_enabled", malware_scanning_on_upload_enabled) + _setter("malware_scanning_on_upload_enabled", malware_scanning_on_upload_enabled) if override_subscription_settings_enabled is not None: - pulumi.set(__self__, "override_subscription_settings_enabled", override_subscription_settings_enabled) + _setter("override_subscription_settings_enabled", override_subscription_settings_enabled) if sensitive_data_discovery_enabled is not None: - pulumi.set(__self__, "sensitive_data_discovery_enabled", sensitive_data_discovery_enabled) + _setter("sensitive_data_discovery_enabled", sensitive_data_discovery_enabled) @property @pulumi.getter(name="storageAccountId") @@ -114,16 +145,45 @@ def __init__(__self__, *, :param pulumi.Input[bool] sensitive_data_discovery_enabled: Whether Sensitive Data Discovery should be enabled. Defaults to `false`. :param pulumi.Input[str] storage_account_id: The ID of the storage account the defender applied to. Changing this forces a new resource to be created. """ + _StorageDefenderState._configure( + lambda key, value: pulumi.set(__self__, key, value), + malware_scanning_on_upload_cap_gb_per_month=malware_scanning_on_upload_cap_gb_per_month, + malware_scanning_on_upload_enabled=malware_scanning_on_upload_enabled, + override_subscription_settings_enabled=override_subscription_settings_enabled, + sensitive_data_discovery_enabled=sensitive_data_discovery_enabled, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + malware_scanning_on_upload_cap_gb_per_month: Optional[pulumi.Input[int]] = None, + malware_scanning_on_upload_enabled: Optional[pulumi.Input[bool]] = None, + override_subscription_settings_enabled: Optional[pulumi.Input[bool]] = None, + sensitive_data_discovery_enabled: Optional[pulumi.Input[bool]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if malware_scanning_on_upload_cap_gb_per_month is None and 'malwareScanningOnUploadCapGbPerMonth' in kwargs: + malware_scanning_on_upload_cap_gb_per_month = kwargs['malwareScanningOnUploadCapGbPerMonth'] + if malware_scanning_on_upload_enabled is None and 'malwareScanningOnUploadEnabled' in kwargs: + malware_scanning_on_upload_enabled = kwargs['malwareScanningOnUploadEnabled'] + if override_subscription_settings_enabled is None and 'overrideSubscriptionSettingsEnabled' in kwargs: + override_subscription_settings_enabled = kwargs['overrideSubscriptionSettingsEnabled'] + if sensitive_data_discovery_enabled is None and 'sensitiveDataDiscoveryEnabled' in kwargs: + sensitive_data_discovery_enabled = kwargs['sensitiveDataDiscoveryEnabled'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if malware_scanning_on_upload_cap_gb_per_month is not None: - pulumi.set(__self__, "malware_scanning_on_upload_cap_gb_per_month", malware_scanning_on_upload_cap_gb_per_month) + _setter("malware_scanning_on_upload_cap_gb_per_month", malware_scanning_on_upload_cap_gb_per_month) if malware_scanning_on_upload_enabled is not None: - pulumi.set(__self__, "malware_scanning_on_upload_enabled", malware_scanning_on_upload_enabled) + _setter("malware_scanning_on_upload_enabled", malware_scanning_on_upload_enabled) if override_subscription_settings_enabled is not None: - pulumi.set(__self__, "override_subscription_settings_enabled", override_subscription_settings_enabled) + _setter("override_subscription_settings_enabled", override_subscription_settings_enabled) if sensitive_data_discovery_enabled is not None: - pulumi.set(__self__, "sensitive_data_discovery_enabled", sensitive_data_discovery_enabled) + _setter("sensitive_data_discovery_enabled", sensitive_data_discovery_enabled) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="malwareScanningOnUploadCapGbPerMonth") @@ -273,6 +333,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StorageDefenderArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/securitycenter/subscription_pricing.py b/sdk/python/pulumi_azure/securitycenter/subscription_pricing.py index 666760cff5..13dbe37233 100644 --- a/sdk/python/pulumi_azure/securitycenter/subscription_pricing.py +++ b/sdk/python/pulumi_azure/securitycenter/subscription_pricing.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,13 +27,34 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_type: The resource type this setting affects. Possible values are `Api`, `AppServices`, `ContainerRegistry`, `KeyVaults`, `KubernetesService`, `SqlServers`, `SqlServerVirtualMachines`, `StorageAccounts`, `VirtualMachines`, `Arm`, `Dns`, `OpenSourceRelationalDatabases`, `Containers`, `CosmosDbs` and `CloudPosture`. Defaults to `VirtualMachines` :param pulumi.Input[str] subplan: Resource type pricing subplan. Contact your MSFT representative for possible values. """ - pulumi.set(__self__, "tier", tier) + SubscriptionPricingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + tier=tier, + extensions=extensions, + resource_type=resource_type, + subplan=subplan, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tier: Optional[pulumi.Input[str]] = None, + extensions: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionPricingExtensionArgs']]]] = None, + resource_type: Optional[pulumi.Input[str]] = None, + subplan: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tier is None: + raise TypeError("Missing 'tier' argument") + if resource_type is None and 'resourceType' in kwargs: + resource_type = kwargs['resourceType'] + + _setter("tier", tier) if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if resource_type is not None: - pulumi.set(__self__, "resource_type", resource_type) + _setter("resource_type", resource_type) if subplan is not None: - pulumi.set(__self__, "subplan", subplan) + _setter("subplan", subplan) @property @pulumi.getter @@ -98,14 +119,33 @@ def __init__(__self__, *, :param pulumi.Input[str] subplan: Resource type pricing subplan. Contact your MSFT representative for possible values. :param pulumi.Input[str] tier: The pricing tier to use. Possible values are `Free` and `Standard`. """ + _SubscriptionPricingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + extensions=extensions, + resource_type=resource_type, + subplan=subplan, + tier=tier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + extensions: Optional[pulumi.Input[Sequence[pulumi.Input['SubscriptionPricingExtensionArgs']]]] = None, + resource_type: Optional[pulumi.Input[str]] = None, + subplan: Optional[pulumi.Input[str]] = None, + tier: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_type is None and 'resourceType' in kwargs: + resource_type = kwargs['resourceType'] + if extensions is not None: - pulumi.set(__self__, "extensions", extensions) + _setter("extensions", extensions) if resource_type is not None: - pulumi.set(__self__, "resource_type", resource_type) + _setter("resource_type", resource_type) if subplan is not None: - pulumi.set(__self__, "subplan", subplan) + _setter("subplan", subplan) if tier is not None: - pulumi.set(__self__, "tier", tier) + _setter("tier", tier) @property @pulumi.getter @@ -293,6 +333,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubscriptionPricingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/securitycenter/workspace.py b/sdk/python/pulumi_azure/securitycenter/workspace.py index 4cb0dd5064..88407aaae4 100644 --- a/sdk/python/pulumi_azure/securitycenter/workspace.py +++ b/sdk/python/pulumi_azure/securitycenter/workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WorkspaceArgs', 'Workspace'] @@ -21,8 +21,27 @@ def __init__(__self__, *, :param pulumi.Input[str] scope: The scope of VMs to send their security data to the desired workspace, unless overridden by a setting with more specific scope. :param pulumi.Input[str] workspace_id: The ID of the Log Analytics Workspace to save the data in. """ - pulumi.set(__self__, "scope", scope) - pulumi.set(__self__, "workspace_id", workspace_id) + WorkspaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + scope=scope, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + scope: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if scope is None: + raise TypeError("Missing 'scope' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + + _setter("scope", scope) + _setter("workspace_id", workspace_id) @property @pulumi.getter @@ -59,10 +78,25 @@ def __init__(__self__, *, :param pulumi.Input[str] scope: The scope of VMs to send their security data to the desired workspace, unless overridden by a setting with more specific scope. :param pulumi.Input[str] workspace_id: The ID of the Log Analytics Workspace to save the data in. """ + _WorkspaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + scope=scope, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + scope: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter @@ -176,6 +210,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/_inputs.py b/sdk/python/pulumi_azure/sentinel/_inputs.py index 38d9e64df5..f670cf0e22 100644 --- a/sdk/python/pulumi_azure/sentinel/_inputs.py +++ b/sdk/python/pulumi_azure/sentinel/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -68,14 +68,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] supported_values: A list of supported values of the single select observation. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: A list of values of the single select observation. """ + AlertRuleAnomalyBuiltInMultiSelectObservationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + name=name, + supported_values=supported_values, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + supported_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if supported_values is None and 'supportedValues' in kwargs: + supported_values = kwargs['supportedValues'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if supported_values is not None: - pulumi.set(__self__, "supported_values", supported_values) + _setter("supported_values", supported_values) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -139,14 +158,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Name of the built-in Anomaly Alert Rule. Changing this forces a new Built-in Anomaly Alert Rule to be created. :param pulumi.Input[str] prioritize: The prioritized value per `description`. """ + AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + exclude=exclude, + name=name, + prioritize=prioritize, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + exclude: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + prioritize: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if exclude is not None: - pulumi.set(__self__, "exclude", exclude) + _setter("exclude", exclude) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if prioritize is not None: - pulumi.set(__self__, "prioritize", prioritize) + _setter("prioritize", prioritize) @property @pulumi.getter @@ -206,10 +242,27 @@ def __init__(__self__, *, :param pulumi.Input[str] connector_id: The ID of the required Data Connector. :param pulumi.Input[Sequence[pulumi.Input[str]]] data_types: A list of data types of the required Data Connector. """ + AlertRuleAnomalyBuiltInRequiredDataConnectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connector_id=connector_id, + data_types=data_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connector_id: Optional[pulumi.Input[str]] = None, + data_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connector_id is None and 'connectorId' in kwargs: + connector_id = kwargs['connectorId'] + if data_types is None and 'dataTypes' in kwargs: + data_types = kwargs['dataTypes'] + if connector_id is not None: - pulumi.set(__self__, "connector_id", connector_id) + _setter("connector_id", connector_id) if data_types is not None: - pulumi.set(__self__, "data_types", data_types) + _setter("data_types", data_types) @property @pulumi.getter(name="connectorId") @@ -249,14 +302,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] supported_values: A list of supported values of the single select observation. :param pulumi.Input[str] value: The value of the threshold observation. """ + AlertRuleAnomalyBuiltInSingleSelectObservationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + name=name, + supported_values=supported_values, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + supported_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if supported_values is None and 'supportedValues' in kwargs: + supported_values = kwargs['supportedValues'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if supported_values is not None: - pulumi.set(__self__, "supported_values", supported_values) + _setter("supported_values", supported_values) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -322,16 +394,35 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Name of the built-in Anomaly Alert Rule. Changing this forces a new Built-in Anomaly Alert Rule to be created. :param pulumi.Input[str] value: The value of the threshold observation. """ + AlertRuleAnomalyBuiltInThresholdObservationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + max=max, + min=min, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + max: Optional[pulumi.Input[str]] = None, + min: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if max is not None: - pulumi.set(__self__, "max", max) + _setter("max", max) if min is not None: - pulumi.set(__self__, "min", min) + _setter("min", min) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -407,12 +498,35 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the multi select observation. :param pulumi.Input[Sequence[pulumi.Input[str]]] supported_values: A list of supported values of the multi select observation. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + AlertRuleAnomalyDuplicateMultiSelectObservationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + description=description, + supported_values=supported_values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + supported_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + if supported_values is None and 'supportedValues' in kwargs: + supported_values = kwargs['supportedValues'] + + _setter("name", name) + _setter("values", values) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if supported_values is not None: - pulumi.set(__self__, "supported_values", supported_values) + _setter("supported_values", supported_values) @property @pulumi.getter @@ -476,13 +590,32 @@ def __init__(__self__, *, :param pulumi.Input[str] exclude: The excluded value per `description`. :param pulumi.Input[str] prioritize: The prioritized value per `description`. """ - pulumi.set(__self__, "name", name) + AlertRuleAnomalyDuplicatePrioritizedExcludeObservationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + exclude=exclude, + prioritize=prioritize, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + exclude: Optional[pulumi.Input[str]] = None, + prioritize: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if exclude is not None: - pulumi.set(__self__, "exclude", exclude) + _setter("exclude", exclude) if prioritize is not None: - pulumi.set(__self__, "prioritize", prioritize) + _setter("prioritize", prioritize) @property @pulumi.getter @@ -542,10 +675,27 @@ def __init__(__self__, *, :param pulumi.Input[str] connector_id: The ID of the required Data Connector. :param pulumi.Input[Sequence[pulumi.Input[str]]] data_types: A list of data types of the required Data Connector. """ + AlertRuleAnomalyDuplicateRequiredDataConnectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connector_id=connector_id, + data_types=data_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connector_id: Optional[pulumi.Input[str]] = None, + data_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connector_id is None and 'connectorId' in kwargs: + connector_id = kwargs['connectorId'] + if data_types is None and 'dataTypes' in kwargs: + data_types = kwargs['dataTypes'] + if connector_id is not None: - pulumi.set(__self__, "connector_id", connector_id) + _setter("connector_id", connector_id) if data_types is not None: - pulumi.set(__self__, "data_types", data_types) + _setter("data_types", data_types) @property @pulumi.getter(name="connectorId") @@ -585,12 +735,35 @@ def __init__(__self__, *, :param pulumi.Input[str] description: The description of the single select observation. :param pulumi.Input[Sequence[pulumi.Input[str]]] supported_values: A list of supported values of the single select observation. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AlertRuleAnomalyDuplicateSingleSelectObservationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + description=description, + supported_values=supported_values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + supported_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + if supported_values is None and 'supportedValues' in kwargs: + supported_values = kwargs['supportedValues'] + + _setter("name", name) + _setter("value", value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if supported_values is not None: - pulumi.set(__self__, "supported_values", supported_values) + _setter("supported_values", supported_values) @property @pulumi.getter @@ -656,14 +829,37 @@ def __init__(__self__, *, :param pulumi.Input[str] max: The max value of the threshold observation. :param pulumi.Input[str] min: The min value of the threshold observation. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AlertRuleAnomalyDuplicateThresholdObservationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + description=description, + max=max, + min=min, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + max: Optional[pulumi.Input[str]] = None, + min: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if max is not None: - pulumi.set(__self__, "max", max) + _setter("max", max) if min is not None: - pulumi.set(__self__, "min", min) + _setter("min", min) @property @pulumi.getter @@ -737,11 +933,30 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Whether this source signal is enabled or disabled in Fusion detection? Defaults to `true`. :param pulumi.Input[Sequence[pulumi.Input['AlertRuleFusionSourceSubTypeArgs']]] sub_types: One or more `sub_type` blocks as defined below. """ - pulumi.set(__self__, "name", name) + AlertRuleFusionSourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + enabled=enabled, + sub_types=sub_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + sub_types: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleFusionSourceSubTypeArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if sub_types is None and 'subTypes' in kwargs: + sub_types = kwargs['subTypes'] + + _setter("name", name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if sub_types is not None: - pulumi.set(__self__, "sub_types", sub_types) + _setter("sub_types", sub_types) @property @pulumi.getter @@ -791,10 +1006,31 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] severities_alloweds: A list of severities that are enabled for this source subtype consumed in Fusion detection. Possible values for each element are `High`, `Medium`, `Low`, `Informational`. :param pulumi.Input[bool] enabled: Whether this source subtype under source signal is enabled or disabled in Fusion detection. Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "severities_alloweds", severities_alloweds) + AlertRuleFusionSourceSubTypeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + severities_alloweds=severities_alloweds, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + severities_alloweds: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if severities_alloweds is None and 'severitiesAlloweds' in kwargs: + severities_alloweds = kwargs['severitiesAlloweds'] + if severities_alloweds is None: + raise TypeError("Missing 'severities_alloweds' argument") + + _setter("name", name) + _setter("severities_alloweds", severities_alloweds) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -848,16 +1084,45 @@ def __init__(__self__, *, :param pulumi.Input[str] severity_column_name: The column name to take the alert severity from. :param pulumi.Input[str] tactics_column_name: The column name to take the alert tactics from. """ + AlertRuleNrtAlertDetailsOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + description_format=description_format, + display_name_format=display_name_format, + dynamic_properties=dynamic_properties, + severity_column_name=severity_column_name, + tactics_column_name=tactics_column_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description_format: Optional[pulumi.Input[str]] = None, + display_name_format: Optional[pulumi.Input[str]] = None, + dynamic_properties: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleNrtAlertDetailsOverrideDynamicPropertyArgs']]]] = None, + severity_column_name: Optional[pulumi.Input[str]] = None, + tactics_column_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description_format is None and 'descriptionFormat' in kwargs: + description_format = kwargs['descriptionFormat'] + if display_name_format is None and 'displayNameFormat' in kwargs: + display_name_format = kwargs['displayNameFormat'] + if dynamic_properties is None and 'dynamicProperties' in kwargs: + dynamic_properties = kwargs['dynamicProperties'] + if severity_column_name is None and 'severityColumnName' in kwargs: + severity_column_name = kwargs['severityColumnName'] + if tactics_column_name is None and 'tacticsColumnName' in kwargs: + tactics_column_name = kwargs['tacticsColumnName'] + if description_format is not None: - pulumi.set(__self__, "description_format", description_format) + _setter("description_format", description_format) if display_name_format is not None: - pulumi.set(__self__, "display_name_format", display_name_format) + _setter("display_name_format", display_name_format) if dynamic_properties is not None: - pulumi.set(__self__, "dynamic_properties", dynamic_properties) + _setter("dynamic_properties", dynamic_properties) if severity_column_name is not None: - pulumi.set(__self__, "severity_column_name", severity_column_name) + _setter("severity_column_name", severity_column_name) if tactics_column_name is not None: - pulumi.set(__self__, "tactics_column_name", tactics_column_name) + _setter("tactics_column_name", tactics_column_name) @property @pulumi.getter(name="descriptionFormat") @@ -929,8 +1194,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the dynamic property. Possible Values are `AlertLink`, `ConfidenceLevel`, `ConfidenceScore`, `ExtendedLinks`, `ProductComponentName`, `ProductName`, `ProviderName`, `RemediationSteps` and `Techniques`. :param pulumi.Input[str] value: The value of the dynamic property. Pssible Values are `Caller`, `dcount_ResourceId` and `EventSubmissionTimestamp`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AlertRuleNrtAlertDetailsOverrideDynamicPropertyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -966,8 +1248,29 @@ def __init__(__self__, *, :param pulumi.Input[str] entity_type: The type of the entity. Possible values are `Account`, `AzureResource`, `CloudApplication`, `DNS`, `File`, `FileHash`, `Host`, `IP`, `Mailbox`, `MailCluster`, `MailMessage`, `Malware`, `Process`, `RegistryKey`, `RegistryValue`, `SecurityGroup`, `SubmissionMail`, `URL`. :param pulumi.Input[Sequence[pulumi.Input['AlertRuleNrtEntityMappingFieldMappingArgs']]] field_mappings: A list of `field_mapping` blocks as defined below. """ - pulumi.set(__self__, "entity_type", entity_type) - pulumi.set(__self__, "field_mappings", field_mappings) + AlertRuleNrtEntityMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + entity_type=entity_type, + field_mappings=field_mappings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + entity_type: Optional[pulumi.Input[str]] = None, + field_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleNrtEntityMappingFieldMappingArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if entity_type is None and 'entityType' in kwargs: + entity_type = kwargs['entityType'] + if entity_type is None: + raise TypeError("Missing 'entity_type' argument") + if field_mappings is None and 'fieldMappings' in kwargs: + field_mappings = kwargs['fieldMappings'] + if field_mappings is None: + raise TypeError("Missing 'field_mappings' argument") + + _setter("entity_type", entity_type) + _setter("field_mappings", field_mappings) @property @pulumi.getter(name="entityType") @@ -1003,8 +1306,27 @@ def __init__(__self__, *, :param pulumi.Input[str] column_name: The column name to be mapped to the identifier. :param pulumi.Input[str] identifier: The identifier of the entity. """ - pulumi.set(__self__, "column_name", column_name) - pulumi.set(__self__, "identifier", identifier) + AlertRuleNrtEntityMappingFieldMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + column_name=column_name, + identifier=identifier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + column_name: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if column_name is None and 'columnName' in kwargs: + column_name = kwargs['columnName'] + if column_name is None: + raise TypeError("Missing 'column_name' argument") + if identifier is None: + raise TypeError("Missing 'identifier' argument") + + _setter("column_name", column_name) + _setter("identifier", identifier) @property @pulumi.getter(name="columnName") @@ -1038,7 +1360,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] aggregation_method: The aggregation type of grouping the events. Possible values are `AlertPerResult` and `SingleAlert`. """ - pulumi.set(__self__, "aggregation_method", aggregation_method) + AlertRuleNrtEventGroupingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aggregation_method=aggregation_method, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aggregation_method: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aggregation_method is None and 'aggregationMethod' in kwargs: + aggregation_method = kwargs['aggregationMethod'] + if aggregation_method is None: + raise TypeError("Missing 'aggregation_method' argument") + + _setter("aggregation_method", aggregation_method) @property @pulumi.getter(name="aggregationMethod") @@ -1062,8 +1399,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] create_incident_enabled: Whether to create an incident from alerts triggered by this Sentinel NRT Alert Rule? :param pulumi.Input['AlertRuleNrtIncidentGroupingArgs'] grouping: A `grouping` block as defined below. """ - pulumi.set(__self__, "create_incident_enabled", create_incident_enabled) - pulumi.set(__self__, "grouping", grouping) + AlertRuleNrtIncidentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_incident_enabled=create_incident_enabled, + grouping=grouping, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_incident_enabled: Optional[pulumi.Input[bool]] = None, + grouping: Optional[pulumi.Input['AlertRuleNrtIncidentGroupingArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_incident_enabled is None and 'createIncidentEnabled' in kwargs: + create_incident_enabled = kwargs['createIncidentEnabled'] + if create_incident_enabled is None: + raise TypeError("Missing 'create_incident_enabled' argument") + if grouping is None: + raise TypeError("Missing 'grouping' argument") + + _setter("create_incident_enabled", create_incident_enabled) + _setter("grouping", grouping) @property @pulumi.getter(name="createIncidentEnabled") @@ -1109,20 +1465,55 @@ def __init__(__self__, *, :param pulumi.Input[str] lookback_duration: Limit the group to alerts created within the lookback duration (in ISO 8601 duration format). Defaults to `PT5M`. :param pulumi.Input[bool] reopen_closed_incidents: Whether to re-open closed matching incidents? Defaults to `false`. """ + AlertRuleNrtIncidentGroupingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + by_alert_details=by_alert_details, + by_custom_details=by_custom_details, + by_entities=by_entities, + enabled=enabled, + entity_matching_method=entity_matching_method, + lookback_duration=lookback_duration, + reopen_closed_incidents=reopen_closed_incidents, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + by_alert_details: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + by_custom_details: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + by_entities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + entity_matching_method: Optional[pulumi.Input[str]] = None, + lookback_duration: Optional[pulumi.Input[str]] = None, + reopen_closed_incidents: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if by_alert_details is None and 'byAlertDetails' in kwargs: + by_alert_details = kwargs['byAlertDetails'] + if by_custom_details is None and 'byCustomDetails' in kwargs: + by_custom_details = kwargs['byCustomDetails'] + if by_entities is None and 'byEntities' in kwargs: + by_entities = kwargs['byEntities'] + if entity_matching_method is None and 'entityMatchingMethod' in kwargs: + entity_matching_method = kwargs['entityMatchingMethod'] + if lookback_duration is None and 'lookbackDuration' in kwargs: + lookback_duration = kwargs['lookbackDuration'] + if reopen_closed_incidents is None and 'reopenClosedIncidents' in kwargs: + reopen_closed_incidents = kwargs['reopenClosedIncidents'] + if by_alert_details is not None: - pulumi.set(__self__, "by_alert_details", by_alert_details) + _setter("by_alert_details", by_alert_details) if by_custom_details is not None: - pulumi.set(__self__, "by_custom_details", by_custom_details) + _setter("by_custom_details", by_custom_details) if by_entities is not None: - pulumi.set(__self__, "by_entities", by_entities) + _setter("by_entities", by_entities) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if entity_matching_method is not None: - pulumi.set(__self__, "entity_matching_method", entity_matching_method) + _setter("entity_matching_method", entity_matching_method) if lookback_duration is not None: - pulumi.set(__self__, "lookback_duration", lookback_duration) + _setter("lookback_duration", lookback_duration) if reopen_closed_incidents is not None: - pulumi.set(__self__, "reopen_closed_incidents", reopen_closed_incidents) + _setter("reopen_closed_incidents", reopen_closed_incidents) @property @pulumi.getter(name="byAlertDetails") @@ -1216,7 +1607,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] column_name: The column name to be mapped to the identifier. """ - pulumi.set(__self__, "column_name", column_name) + AlertRuleNrtSentinelEntityMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + column_name=column_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + column_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if column_name is None and 'columnName' in kwargs: + column_name = kwargs['columnName'] + if column_name is None: + raise TypeError("Missing 'column_name' argument") + + _setter("column_name", column_name) @property @pulumi.getter(name="columnName") @@ -1246,16 +1652,45 @@ def __init__(__self__, *, :param pulumi.Input[str] severity_column_name: The column name to take the alert severity from. :param pulumi.Input[str] tactics_column_name: The column name to take the alert tactics from. """ + AlertRuleScheduledAlertDetailsOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + description_format=description_format, + display_name_format=display_name_format, + dynamic_properties=dynamic_properties, + severity_column_name=severity_column_name, + tactics_column_name=tactics_column_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description_format: Optional[pulumi.Input[str]] = None, + display_name_format: Optional[pulumi.Input[str]] = None, + dynamic_properties: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleScheduledAlertDetailsOverrideDynamicPropertyArgs']]]] = None, + severity_column_name: Optional[pulumi.Input[str]] = None, + tactics_column_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description_format is None and 'descriptionFormat' in kwargs: + description_format = kwargs['descriptionFormat'] + if display_name_format is None and 'displayNameFormat' in kwargs: + display_name_format = kwargs['displayNameFormat'] + if dynamic_properties is None and 'dynamicProperties' in kwargs: + dynamic_properties = kwargs['dynamicProperties'] + if severity_column_name is None and 'severityColumnName' in kwargs: + severity_column_name = kwargs['severityColumnName'] + if tactics_column_name is None and 'tacticsColumnName' in kwargs: + tactics_column_name = kwargs['tacticsColumnName'] + if description_format is not None: - pulumi.set(__self__, "description_format", description_format) + _setter("description_format", description_format) if display_name_format is not None: - pulumi.set(__self__, "display_name_format", display_name_format) + _setter("display_name_format", display_name_format) if dynamic_properties is not None: - pulumi.set(__self__, "dynamic_properties", dynamic_properties) + _setter("dynamic_properties", dynamic_properties) if severity_column_name is not None: - pulumi.set(__self__, "severity_column_name", severity_column_name) + _setter("severity_column_name", severity_column_name) if tactics_column_name is not None: - pulumi.set(__self__, "tactics_column_name", tactics_column_name) + _setter("tactics_column_name", tactics_column_name) @property @pulumi.getter(name="descriptionFormat") @@ -1327,8 +1762,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the dynamic property. Possible Values are `AlertLink`, `ConfidenceLevel`, `ConfidenceScore`, `ExtendedLinks`, `ProductComponentName`, `ProductName`, `ProviderName`, `RemediationSteps` and `Techniques`. :param pulumi.Input[str] value: The value of the dynamic property. Pssible Values are `Caller`, `dcount_ResourceId` and `EventSubmissionTimestamp`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AlertRuleScheduledAlertDetailsOverrideDynamicPropertyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1364,8 +1816,29 @@ def __init__(__self__, *, :param pulumi.Input[str] entity_type: The type of the entity. Possible values are `Account`, `AzureResource`, `CloudApplication`, `DNS`, `File`, `FileHash`, `Host`, `IP`, `Mailbox`, `MailCluster`, `MailMessage`, `Malware`, `Process`, `RegistryKey`, `RegistryValue`, `SecurityGroup`, `SubmissionMail`, `URL`. :param pulumi.Input[Sequence[pulumi.Input['AlertRuleScheduledEntityMappingFieldMappingArgs']]] field_mappings: A list of `field_mapping` blocks as defined below. """ - pulumi.set(__self__, "entity_type", entity_type) - pulumi.set(__self__, "field_mappings", field_mappings) + AlertRuleScheduledEntityMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + entity_type=entity_type, + field_mappings=field_mappings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + entity_type: Optional[pulumi.Input[str]] = None, + field_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleScheduledEntityMappingFieldMappingArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if entity_type is None and 'entityType' in kwargs: + entity_type = kwargs['entityType'] + if entity_type is None: + raise TypeError("Missing 'entity_type' argument") + if field_mappings is None and 'fieldMappings' in kwargs: + field_mappings = kwargs['fieldMappings'] + if field_mappings is None: + raise TypeError("Missing 'field_mappings' argument") + + _setter("entity_type", entity_type) + _setter("field_mappings", field_mappings) @property @pulumi.getter(name="entityType") @@ -1401,8 +1874,27 @@ def __init__(__self__, *, :param pulumi.Input[str] column_name: The column name to be mapped to the identifier. :param pulumi.Input[str] identifier: The identifier of the entity. """ - pulumi.set(__self__, "column_name", column_name) - pulumi.set(__self__, "identifier", identifier) + AlertRuleScheduledEntityMappingFieldMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + column_name=column_name, + identifier=identifier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + column_name: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if column_name is None and 'columnName' in kwargs: + column_name = kwargs['columnName'] + if column_name is None: + raise TypeError("Missing 'column_name' argument") + if identifier is None: + raise TypeError("Missing 'identifier' argument") + + _setter("column_name", column_name) + _setter("identifier", identifier) @property @pulumi.getter(name="columnName") @@ -1436,7 +1928,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] aggregation_method: The aggregation type of grouping the events. Possible values are `AlertPerResult` and `SingleAlert`. """ - pulumi.set(__self__, "aggregation_method", aggregation_method) + AlertRuleScheduledEventGroupingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aggregation_method=aggregation_method, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aggregation_method: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aggregation_method is None and 'aggregationMethod' in kwargs: + aggregation_method = kwargs['aggregationMethod'] + if aggregation_method is None: + raise TypeError("Missing 'aggregation_method' argument") + + _setter("aggregation_method", aggregation_method) @property @pulumi.getter(name="aggregationMethod") @@ -1460,8 +1967,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] create_incident: Whether to create an incident from alerts triggered by this Sentinel Scheduled Alert Rule? :param pulumi.Input['AlertRuleScheduledIncidentConfigurationGroupingArgs'] grouping: A `grouping` block as defined below. """ - pulumi.set(__self__, "create_incident", create_incident) - pulumi.set(__self__, "grouping", grouping) + AlertRuleScheduledIncidentConfigurationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_incident=create_incident, + grouping=grouping, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_incident: Optional[pulumi.Input[bool]] = None, + grouping: Optional[pulumi.Input['AlertRuleScheduledIncidentConfigurationGroupingArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_incident is None and 'createIncident' in kwargs: + create_incident = kwargs['createIncident'] + if create_incident is None: + raise TypeError("Missing 'create_incident' argument") + if grouping is None: + raise TypeError("Missing 'grouping' argument") + + _setter("create_incident", create_incident) + _setter("grouping", grouping) @property @pulumi.getter(name="createIncident") @@ -1507,20 +2033,55 @@ def __init__(__self__, *, :param pulumi.Input[str] lookback_duration: Limit the group to alerts created within the lookback duration (in ISO 8601 duration format). Defaults to `PT5M`. :param pulumi.Input[bool] reopen_closed_incidents: Whether to re-open closed matching incidents? Defaults to `false`. """ + AlertRuleScheduledIncidentConfigurationGroupingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + entity_matching_method=entity_matching_method, + group_by_alert_details=group_by_alert_details, + group_by_custom_details=group_by_custom_details, + group_by_entities=group_by_entities, + lookback_duration=lookback_duration, + reopen_closed_incidents=reopen_closed_incidents, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + entity_matching_method: Optional[pulumi.Input[str]] = None, + group_by_alert_details: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + group_by_custom_details: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + group_by_entities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + lookback_duration: Optional[pulumi.Input[str]] = None, + reopen_closed_incidents: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if entity_matching_method is None and 'entityMatchingMethod' in kwargs: + entity_matching_method = kwargs['entityMatchingMethod'] + if group_by_alert_details is None and 'groupByAlertDetails' in kwargs: + group_by_alert_details = kwargs['groupByAlertDetails'] + if group_by_custom_details is None and 'groupByCustomDetails' in kwargs: + group_by_custom_details = kwargs['groupByCustomDetails'] + if group_by_entities is None and 'groupByEntities' in kwargs: + group_by_entities = kwargs['groupByEntities'] + if lookback_duration is None and 'lookbackDuration' in kwargs: + lookback_duration = kwargs['lookbackDuration'] + if reopen_closed_incidents is None and 'reopenClosedIncidents' in kwargs: + reopen_closed_incidents = kwargs['reopenClosedIncidents'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if entity_matching_method is not None: - pulumi.set(__self__, "entity_matching_method", entity_matching_method) + _setter("entity_matching_method", entity_matching_method) if group_by_alert_details is not None: - pulumi.set(__self__, "group_by_alert_details", group_by_alert_details) + _setter("group_by_alert_details", group_by_alert_details) if group_by_custom_details is not None: - pulumi.set(__self__, "group_by_custom_details", group_by_custom_details) + _setter("group_by_custom_details", group_by_custom_details) if group_by_entities is not None: - pulumi.set(__self__, "group_by_entities", group_by_entities) + _setter("group_by_entities", group_by_entities) if lookback_duration is not None: - pulumi.set(__self__, "lookback_duration", lookback_duration) + _setter("lookback_duration", lookback_duration) if reopen_closed_incidents is not None: - pulumi.set(__self__, "reopen_closed_incidents", reopen_closed_incidents) + _setter("reopen_closed_incidents", reopen_closed_incidents) @property @pulumi.getter @@ -1614,7 +2175,22 @@ def __init__(__self__, *, """ :param pulumi.Input[str] column_name: The column name to be mapped to the identifier. """ - pulumi.set(__self__, "column_name", column_name) + AlertRuleScheduledSentinelEntityMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + column_name=column_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + column_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if column_name is None and 'columnName' in kwargs: + column_name = kwargs['columnName'] + if column_name is None: + raise TypeError("Missing 'column_name' argument") + + _setter("column_name", column_name) @property @pulumi.getter(name="columnName") @@ -1654,19 +2230,48 @@ def __init__(__self__, *, > **Note:**: At least one of `status`, `labels`, `owner_id` and `severity` has to be set. :param pulumi.Input[str] status: The status to set to the incident. Possible values are: `Active`, `Closed`, `New`. """ - pulumi.set(__self__, "order", order) + AuthomationRuleActionIncidentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + order=order, + classification=classification, + classification_comment=classification_comment, + labels=labels, + owner_id=owner_id, + severity=severity, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + order: Optional[pulumi.Input[int]] = None, + classification: Optional[pulumi.Input[str]] = None, + classification_comment: Optional[pulumi.Input[str]] = None, + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + owner_id: Optional[pulumi.Input[str]] = None, + severity: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if order is None: + raise TypeError("Missing 'order' argument") + if classification_comment is None and 'classificationComment' in kwargs: + classification_comment = kwargs['classificationComment'] + if owner_id is None and 'ownerId' in kwargs: + owner_id = kwargs['ownerId'] + + _setter("order", order) if classification is not None: - pulumi.set(__self__, "classification", classification) + _setter("classification", classification) if classification_comment is not None: - pulumi.set(__self__, "classification_comment", classification_comment) + _setter("classification_comment", classification_comment) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if owner_id is not None: - pulumi.set(__self__, "owner_id", owner_id) + _setter("owner_id", owner_id) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) @property @pulumi.getter @@ -1770,10 +2375,33 @@ def __init__(__self__, *, :param pulumi.Input[int] order: The execution order of this action. :param pulumi.Input[str] tenant_id: The ID of the Tenant that owns the playbook. """ - pulumi.set(__self__, "logic_app_id", logic_app_id) - pulumi.set(__self__, "order", order) + AuthomationRuleActionPlaybookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + logic_app_id=logic_app_id, + order=order, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + logic_app_id: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if logic_app_id is None: + raise TypeError("Missing 'logic_app_id' argument") + if order is None: + raise TypeError("Missing 'order' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("logic_app_id", logic_app_id) + _setter("order", order) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logicAppId") @@ -1823,9 +2451,30 @@ def __init__(__self__, *, :param pulumi.Input[str] property: The property to use for evaluate the condition. Possible values include: `AccountAadTenantId`, `AccountAadUserId`, `AccountNTDomain`, `AccountName`, `AccountObjectGuid`, `AccountPUID`, `AccountSid`, `AccountUPNSuffix`, `AzureResourceResourceId`, `AzureResourceSubscriptionId`, `CloudApplicationAppId`, `CloudApplicationAppName`, `DNSDomainName`, `FileDirectory`, `FileHashValue`, `FileName`, `HostAzureID`, `HostNTDomain`, `HostName`, `HostNetBiosName`, `HostOSVersion`, `IPAddress`, `IncidentDescription`, `IncidentProviderName`, `IncidentRelatedAnalyticRuleIds`, `IncidentSeverity`, `IncidentStatus`, `IncidentTactics`, `IncidentTitle`, `IoTDeviceId`, `IoTDeviceModel`, `IoTDeviceName`, `IoTDeviceOperatingSystem`, `IoTDeviceType`, `IoTDeviceVendor`, `MailMessageDeliveryAction`, `MailMessageDeliveryLocation`, `MailMessageP1Sender`, `MailMessageP2Sender`, `MailMessageRecipient`, `MailMessageSenderIP`, `MailMessageSubject`, `MailboxDisplayName`, `MailboxPrimaryAddress`, `MailboxUPN`, `MalwareCategory`, `MalwareName`, `ProcessCommandLine`, `ProcessId`, `RegistryKey`, `RegistryValueData`, `Url`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to use for evaluate the condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "property", property) - pulumi.set(__self__, "values", values) + AuthomationRuleConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + property=property, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + property: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if property is None: + raise TypeError("Missing 'property' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("property", property) + _setter("values", values) @property @pulumi.getter @@ -1889,19 +2538,48 @@ def __init__(__self__, *, > **Note:**: At least one of `status`, `labels`, `owner_id` and `severity` has to be set. :param pulumi.Input[str] status: The status to set to the incident. Possible values are: `Active`, `Closed`, `New`. """ - pulumi.set(__self__, "order", order) + AutomationRuleActionIncidentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + order=order, + classification=classification, + classification_comment=classification_comment, + labels=labels, + owner_id=owner_id, + severity=severity, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + order: Optional[pulumi.Input[int]] = None, + classification: Optional[pulumi.Input[str]] = None, + classification_comment: Optional[pulumi.Input[str]] = None, + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + owner_id: Optional[pulumi.Input[str]] = None, + severity: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if order is None: + raise TypeError("Missing 'order' argument") + if classification_comment is None and 'classificationComment' in kwargs: + classification_comment = kwargs['classificationComment'] + if owner_id is None and 'ownerId' in kwargs: + owner_id = kwargs['ownerId'] + + _setter("order", order) if classification is not None: - pulumi.set(__self__, "classification", classification) + _setter("classification", classification) if classification_comment is not None: - pulumi.set(__self__, "classification_comment", classification_comment) + _setter("classification_comment", classification_comment) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if owner_id is not None: - pulumi.set(__self__, "owner_id", owner_id) + _setter("owner_id", owner_id) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) @property @pulumi.getter @@ -2005,10 +2683,33 @@ def __init__(__self__, *, :param pulumi.Input[int] order: The execution order of this action. :param pulumi.Input[str] tenant_id: The ID of the Tenant that owns the playbook. """ - pulumi.set(__self__, "logic_app_id", logic_app_id) - pulumi.set(__self__, "order", order) + AutomationRuleActionPlaybookArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + logic_app_id=logic_app_id, + order=order, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + logic_app_id: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if logic_app_id is None: + raise TypeError("Missing 'logic_app_id' argument") + if order is None: + raise TypeError("Missing 'order' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("logic_app_id", logic_app_id) + _setter("order", order) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logicAppId") @@ -2058,9 +2759,30 @@ def __init__(__self__, *, :param pulumi.Input[str] property: The property to use for evaluate the condition. Possible values include: `AccountAadTenantId`, `AccountAadUserId`, `AccountNTDomain`, `AccountName`, `AccountObjectGuid`, `AccountPUID`, `AccountSid`, `AccountUPNSuffix`, `AzureResourceResourceId`, `AzureResourceSubscriptionId`, `CloudApplicationAppId`, `CloudApplicationAppName`, `DNSDomainName`, `FileDirectory`, `FileHashValue`, `FileName`, `HostAzureID`, `HostNTDomain`, `HostName`, `HostNetBiosName`, `HostOSVersion`, `IPAddress`, `IncidentDescription`, `IncidentProviderName`, `IncidentRelatedAnalyticRuleIds`, `IncidentSeverity`, `IncidentStatus`, `IncidentTactics`, `IncidentTitle`, `IoTDeviceId`, `IoTDeviceModel`, `IoTDeviceName`, `IoTDeviceOperatingSystem`, `IoTDeviceType`, `IoTDeviceVendor`, `MailMessageDeliveryAction`, `MailMessageDeliveryLocation`, `MailMessageP1Sender`, `MailMessageP2Sender`, `MailMessageRecipient`, `MailMessageSenderIP`, `MailMessageSubject`, `MailboxDisplayName`, `MailboxPrimaryAddress`, `MailboxUPN`, `MalwareCategory`, `MalwareName`, `ProcessCommandLine`, `ProcessId`, `RegistryKey`, `RegistryValueData`, `Url`. :param pulumi.Input[Sequence[pulumi.Input[str]]] values: Specifies a list of values to use for evaluate the condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "property", property) - pulumi.set(__self__, "values", values) + AutomationRuleConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + property=property, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[pulumi.Input[str]] = None, + property: Optional[pulumi.Input[str]] = None, + values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if property is None: + raise TypeError("Missing 'property' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("property", property) + _setter("values", values) @property @pulumi.getter @@ -2110,12 +2832,27 @@ def __init__(__self__, *, :param pulumi.Input[str] link: The link for author/vendor page. :param pulumi.Input[str] name: The name of the author, company or person. """ + MetadataAuthorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + link=link, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input[str]] = None, + link: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if link is not None: - pulumi.set(__self__, "link", link) + _setter("link", link) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -2163,10 +2900,23 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] domains: Specifies a list of domains for the solution content item. :param pulumi.Input[Sequence[pulumi.Input[str]]] verticals: Specifies a list of industry verticals for the solution content item. """ + MetadataCategoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + domains=domains, + verticals=verticals, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domains: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + verticals: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domains is not None: - pulumi.set(__self__, "domains", domains) + _setter("domains", domains) if verticals is not None: - pulumi.set(__self__, "verticals", verticals) + _setter("verticals", verticals) @property @pulumi.getter @@ -2204,11 +2954,28 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The id of the content source, the solution ID, Log Analytics Workspace name etc. :param pulumi.Input[str] name: The name of the content source, repo name, solution name, Log Analytics Workspace name, etc. """ - pulumi.set(__self__, "kind", kind) + MetadataSourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + kind=kind, + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kind: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kind is None: + raise TypeError("Missing 'kind' argument") + + _setter("kind", kind) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -2260,13 +3027,32 @@ def __init__(__self__, *, :param pulumi.Input[str] link: The link for support help. :param pulumi.Input[str] name: The name of the support contact. """ - pulumi.set(__self__, "tier", tier) + MetadataSupportArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + tier=tier, + email=email, + link=link, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tier: Optional[pulumi.Input[str]] = None, + email: Optional[pulumi.Input[str]] = None, + link: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("tier", tier) if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if link is not None: - pulumi.set(__self__, "link", link) + _setter("link", link) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -2332,16 +3118,37 @@ def __init__(__self__, *, :param pulumi.Input[str] source_name: The source name of the external reference of the Threat Intelligence Indicator. :param pulumi.Input[str] url: The url of the external reference of the Threat Intelligence Indicator. """ + ThreatIntelligenceIndicatorExternalReferenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + hashes=hashes, + id=id, + source_name=source_name, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + hashes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + id: Optional[pulumi.Input[str]] = None, + source_name: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if source_name is None and 'sourceName' in kwargs: + source_name = kwargs['sourceName'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if hashes is not None: - pulumi.set(__self__, "hashes", hashes) + _setter("hashes", hashes) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if source_name is not None: - pulumi.set(__self__, "source_name", source_name) + _setter("source_name", source_name) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter @@ -2415,12 +3222,29 @@ def __init__(__self__, *, :param pulumi.Input[str] marking_ref: The reference of the granular marking of the Threat Intelligence Indicator. :param pulumi.Input[Sequence[pulumi.Input[str]]] selectors: A list of selectors of the granular marking of the Threat Intelligence Indicator. """ + ThreatIntelligenceIndicatorGranularMarkingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + language=language, + marking_ref=marking_ref, + selectors=selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + language: Optional[pulumi.Input[str]] = None, + marking_ref: Optional[pulumi.Input[str]] = None, + selectors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if marking_ref is None and 'markingRef' in kwargs: + marking_ref = kwargs['markingRef'] + if language is not None: - pulumi.set(__self__, "language", language) + _setter("language", language) if marking_ref is not None: - pulumi.set(__self__, "marking_ref", marking_ref) + _setter("marking_ref", marking_ref) if selectors is not None: - pulumi.set(__self__, "selectors", selectors) + _setter("selectors", selectors) @property @pulumi.getter @@ -2466,8 +3290,19 @@ def __init__(__self__, *, """ :param pulumi.Input[str] name: The name which should be used for the Lockheed Martin cyber kill chain phase. """ + ThreatIntelligenceIndicatorKillChainPhaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -2491,10 +3326,27 @@ def __init__(__self__, *, :param pulumi.Input[str] pattern_type_key: The type key of parsed pattern. :param pulumi.Input[Sequence[pulumi.Input['ThreatIntelligenceIndicatorParsedPatternPatternTypeValueArgs']]] pattern_type_values: A `pattern_type_values` block as defined below. """ + ThreatIntelligenceIndicatorParsedPatternArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + pattern_type_key=pattern_type_key, + pattern_type_values=pattern_type_values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + pattern_type_key: Optional[pulumi.Input[str]] = None, + pattern_type_values: Optional[pulumi.Input[Sequence[pulumi.Input['ThreatIntelligenceIndicatorParsedPatternPatternTypeValueArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if pattern_type_key is None and 'patternTypeKey' in kwargs: + pattern_type_key = kwargs['patternTypeKey'] + if pattern_type_values is None and 'patternTypeValues' in kwargs: + pattern_type_values = kwargs['patternTypeValues'] + if pattern_type_key is not None: - pulumi.set(__self__, "pattern_type_key", pattern_type_key) + _setter("pattern_type_key", pattern_type_key) if pattern_type_values is not None: - pulumi.set(__self__, "pattern_type_values", pattern_type_values) + _setter("pattern_type_values", pattern_type_values) @property @pulumi.getter(name="patternTypeKey") @@ -2530,10 +3382,25 @@ def __init__(__self__, *, :param pulumi.Input[str] value: The value of the parsed pattern type. :param pulumi.Input[str] value_type: The type of the value of the parsed pattern type value. """ + ThreatIntelligenceIndicatorParsedPatternPatternTypeValueArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + value_type=value_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[pulumi.Input[str]] = None, + value_type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value_type is None and 'valueType' in kwargs: + value_type = kwargs['valueType'] + if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) if value_type is not None: - pulumi.set(__self__, "value_type", value_type) + _setter("value_type", value_type) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/sentinel/alert_rule_anomaly_built_in.py b/sdk/python/pulumi_azure/sentinel/alert_rule_anomaly_built_in.py index 34d4850ff6..d196e3ef3b 100644 --- a/sdk/python/pulumi_azure/sentinel/alert_rule_anomaly_built_in.py +++ b/sdk/python/pulumi_azure/sentinel/alert_rule_anomaly_built_in.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,13 +31,42 @@ def __init__(__self__, *, > **Note:** One of `name` or `display_name` block must be specified. :param pulumi.Input[str] name: The Name of the built-in Anomaly Alert Rule. Changing this forces a new Built-in Anomaly Alert Rule to be created. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "mode", mode) + AlertRuleAnomalyBuiltInArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + log_analytics_workspace_id=log_analytics_workspace_id, + mode=mode, + display_name=display_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if mode is None: + raise TypeError("Missing 'mode' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + + _setter("enabled", enabled) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("mode", mode) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -144,40 +173,103 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] techniques: A list of techniques of attacks by which to classify the rule. :param pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyBuiltInThresholdObservationArgs']]] threshold_observations: A list of `threshold_observation` blocks as defined below. """ + _AlertRuleAnomalyBuiltInState._configure( + lambda key, value: pulumi.set(__self__, key, value), + anomaly_settings_version=anomaly_settings_version, + anomaly_version=anomaly_version, + description=description, + display_name=display_name, + enabled=enabled, + frequency=frequency, + log_analytics_workspace_id=log_analytics_workspace_id, + mode=mode, + multi_select_observations=multi_select_observations, + name=name, + prioritized_exclude_observations=prioritized_exclude_observations, + required_data_connectors=required_data_connectors, + settings_definition_id=settings_definition_id, + single_select_observations=single_select_observations, + tactics=tactics, + techniques=techniques, + threshold_observations=threshold_observations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + anomaly_settings_version: Optional[pulumi.Input[int]] = None, + anomaly_version: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + frequency: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + multi_select_observations: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyBuiltInMultiSelectObservationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + prioritized_exclude_observations: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArgs']]]] = None, + required_data_connectors: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyBuiltInRequiredDataConnectorArgs']]]] = None, + settings_definition_id: Optional[pulumi.Input[str]] = None, + single_select_observations: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyBuiltInSingleSelectObservationArgs']]]] = None, + tactics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + techniques: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + threshold_observations: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyBuiltInThresholdObservationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if anomaly_settings_version is None and 'anomalySettingsVersion' in kwargs: + anomaly_settings_version = kwargs['anomalySettingsVersion'] + if anomaly_version is None and 'anomalyVersion' in kwargs: + anomaly_version = kwargs['anomalyVersion'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if multi_select_observations is None and 'multiSelectObservations' in kwargs: + multi_select_observations = kwargs['multiSelectObservations'] + if prioritized_exclude_observations is None and 'prioritizedExcludeObservations' in kwargs: + prioritized_exclude_observations = kwargs['prioritizedExcludeObservations'] + if required_data_connectors is None and 'requiredDataConnectors' in kwargs: + required_data_connectors = kwargs['requiredDataConnectors'] + if settings_definition_id is None and 'settingsDefinitionId' in kwargs: + settings_definition_id = kwargs['settingsDefinitionId'] + if single_select_observations is None and 'singleSelectObservations' in kwargs: + single_select_observations = kwargs['singleSelectObservations'] + if threshold_observations is None and 'thresholdObservations' in kwargs: + threshold_observations = kwargs['thresholdObservations'] + if anomaly_settings_version is not None: - pulumi.set(__self__, "anomaly_settings_version", anomaly_settings_version) + _setter("anomaly_settings_version", anomaly_settings_version) if anomaly_version is not None: - pulumi.set(__self__, "anomaly_version", anomaly_version) + _setter("anomaly_version", anomaly_version) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if multi_select_observations is not None: - pulumi.set(__self__, "multi_select_observations", multi_select_observations) + _setter("multi_select_observations", multi_select_observations) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if prioritized_exclude_observations is not None: - pulumi.set(__self__, "prioritized_exclude_observations", prioritized_exclude_observations) + _setter("prioritized_exclude_observations", prioritized_exclude_observations) if required_data_connectors is not None: - pulumi.set(__self__, "required_data_connectors", required_data_connectors) + _setter("required_data_connectors", required_data_connectors) if settings_definition_id is not None: - pulumi.set(__self__, "settings_definition_id", settings_definition_id) + _setter("settings_definition_id", settings_definition_id) if single_select_observations is not None: - pulumi.set(__self__, "single_select_observations", single_select_observations) + _setter("single_select_observations", single_select_observations) if tactics is not None: - pulumi.set(__self__, "tactics", tactics) + _setter("tactics", tactics) if techniques is not None: - pulumi.set(__self__, "techniques", techniques) + _setter("techniques", techniques) if threshold_observations is not None: - pulumi.set(__self__, "threshold_observations", threshold_observations) + _setter("threshold_observations", threshold_observations) @property @pulumi.getter(name="anomalySettingsVersion") @@ -487,6 +579,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AlertRuleAnomalyBuiltInArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/alert_rule_anomaly_duplicate.py b/sdk/python/pulumi_azure/sentinel/alert_rule_anomaly_duplicate.py index 6554baa818..9114b2bdf1 100644 --- a/sdk/python/pulumi_azure/sentinel/alert_rule_anomaly_duplicate.py +++ b/sdk/python/pulumi_azure/sentinel/alert_rule_anomaly_duplicate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,19 +39,70 @@ def __init__(__self__, *, > **NOTE:** un-specified `multi_select_observation`, `single_select_observation`, `prioritized_exclude_observation` and `threshold_observation` will be inherited from the built-in Anomaly Alert Rule. """ - pulumi.set(__self__, "built_in_rule_id", built_in_rule_id) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "mode", mode) + AlertRuleAnomalyDuplicateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + built_in_rule_id=built_in_rule_id, + display_name=display_name, + enabled=enabled, + log_analytics_workspace_id=log_analytics_workspace_id, + mode=mode, + multi_select_observations=multi_select_observations, + prioritized_exclude_observations=prioritized_exclude_observations, + single_select_observations=single_select_observations, + threshold_observations=threshold_observations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + built_in_rule_id: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + multi_select_observations: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyDuplicateMultiSelectObservationArgs']]]] = None, + prioritized_exclude_observations: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyDuplicatePrioritizedExcludeObservationArgs']]]] = None, + single_select_observations: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyDuplicateSingleSelectObservationArgs']]]] = None, + threshold_observations: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyDuplicateThresholdObservationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if built_in_rule_id is None and 'builtInRuleId' in kwargs: + built_in_rule_id = kwargs['builtInRuleId'] + if built_in_rule_id is None: + raise TypeError("Missing 'built_in_rule_id' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if mode is None: + raise TypeError("Missing 'mode' argument") + if multi_select_observations is None and 'multiSelectObservations' in kwargs: + multi_select_observations = kwargs['multiSelectObservations'] + if prioritized_exclude_observations is None and 'prioritizedExcludeObservations' in kwargs: + prioritized_exclude_observations = kwargs['prioritizedExcludeObservations'] + if single_select_observations is None and 'singleSelectObservations' in kwargs: + single_select_observations = kwargs['singleSelectObservations'] + if threshold_observations is None and 'thresholdObservations' in kwargs: + threshold_observations = kwargs['thresholdObservations'] + + _setter("built_in_rule_id", built_in_rule_id) + _setter("display_name", display_name) + _setter("enabled", enabled) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("mode", mode) if multi_select_observations is not None: - pulumi.set(__self__, "multi_select_observations", multi_select_observations) + _setter("multi_select_observations", multi_select_observations) if prioritized_exclude_observations is not None: - pulumi.set(__self__, "prioritized_exclude_observations", prioritized_exclude_observations) + _setter("prioritized_exclude_observations", prioritized_exclude_observations) if single_select_observations is not None: - pulumi.set(__self__, "single_select_observations", single_select_observations) + _setter("single_select_observations", single_select_observations) if threshold_observations is not None: - pulumi.set(__self__, "threshold_observations", threshold_observations) + _setter("threshold_observations", threshold_observations) @property @pulumi.getter(name="builtInRuleId") @@ -210,44 +261,115 @@ def __init__(__self__, *, > **NOTE:** un-specified `multi_select_observation`, `single_select_observation`, `prioritized_exclude_observation` and `threshold_observation` will be inherited from the built-in Anomaly Alert Rule. """ + _AlertRuleAnomalyDuplicateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + anomaly_settings_version=anomaly_settings_version, + anomaly_version=anomaly_version, + built_in_rule_id=built_in_rule_id, + description=description, + display_name=display_name, + enabled=enabled, + frequency=frequency, + is_default_settings=is_default_settings, + log_analytics_workspace_id=log_analytics_workspace_id, + mode=mode, + multi_select_observations=multi_select_observations, + name=name, + prioritized_exclude_observations=prioritized_exclude_observations, + required_data_connectors=required_data_connectors, + settings_definition_id=settings_definition_id, + single_select_observations=single_select_observations, + tactics=tactics, + techniques=techniques, + threshold_observations=threshold_observations, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + anomaly_settings_version: Optional[pulumi.Input[int]] = None, + anomaly_version: Optional[pulumi.Input[str]] = None, + built_in_rule_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + frequency: Optional[pulumi.Input[str]] = None, + is_default_settings: Optional[pulumi.Input[bool]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input[str]] = None, + multi_select_observations: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyDuplicateMultiSelectObservationArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + prioritized_exclude_observations: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyDuplicatePrioritizedExcludeObservationArgs']]]] = None, + required_data_connectors: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyDuplicateRequiredDataConnectorArgs']]]] = None, + settings_definition_id: Optional[pulumi.Input[str]] = None, + single_select_observations: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyDuplicateSingleSelectObservationArgs']]]] = None, + tactics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + techniques: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + threshold_observations: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleAnomalyDuplicateThresholdObservationArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if anomaly_settings_version is None and 'anomalySettingsVersion' in kwargs: + anomaly_settings_version = kwargs['anomalySettingsVersion'] + if anomaly_version is None and 'anomalyVersion' in kwargs: + anomaly_version = kwargs['anomalyVersion'] + if built_in_rule_id is None and 'builtInRuleId' in kwargs: + built_in_rule_id = kwargs['builtInRuleId'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if is_default_settings is None and 'isDefaultSettings' in kwargs: + is_default_settings = kwargs['isDefaultSettings'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if multi_select_observations is None and 'multiSelectObservations' in kwargs: + multi_select_observations = kwargs['multiSelectObservations'] + if prioritized_exclude_observations is None and 'prioritizedExcludeObservations' in kwargs: + prioritized_exclude_observations = kwargs['prioritizedExcludeObservations'] + if required_data_connectors is None and 'requiredDataConnectors' in kwargs: + required_data_connectors = kwargs['requiredDataConnectors'] + if settings_definition_id is None and 'settingsDefinitionId' in kwargs: + settings_definition_id = kwargs['settingsDefinitionId'] + if single_select_observations is None and 'singleSelectObservations' in kwargs: + single_select_observations = kwargs['singleSelectObservations'] + if threshold_observations is None and 'thresholdObservations' in kwargs: + threshold_observations = kwargs['thresholdObservations'] + if anomaly_settings_version is not None: - pulumi.set(__self__, "anomaly_settings_version", anomaly_settings_version) + _setter("anomaly_settings_version", anomaly_settings_version) if anomaly_version is not None: - pulumi.set(__self__, "anomaly_version", anomaly_version) + _setter("anomaly_version", anomaly_version) if built_in_rule_id is not None: - pulumi.set(__self__, "built_in_rule_id", built_in_rule_id) + _setter("built_in_rule_id", built_in_rule_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if frequency is not None: - pulumi.set(__self__, "frequency", frequency) + _setter("frequency", frequency) if is_default_settings is not None: - pulumi.set(__self__, "is_default_settings", is_default_settings) + _setter("is_default_settings", is_default_settings) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if multi_select_observations is not None: - pulumi.set(__self__, "multi_select_observations", multi_select_observations) + _setter("multi_select_observations", multi_select_observations) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if prioritized_exclude_observations is not None: - pulumi.set(__self__, "prioritized_exclude_observations", prioritized_exclude_observations) + _setter("prioritized_exclude_observations", prioritized_exclude_observations) if required_data_connectors is not None: - pulumi.set(__self__, "required_data_connectors", required_data_connectors) + _setter("required_data_connectors", required_data_connectors) if settings_definition_id is not None: - pulumi.set(__self__, "settings_definition_id", settings_definition_id) + _setter("settings_definition_id", settings_definition_id) if single_select_observations is not None: - pulumi.set(__self__, "single_select_observations", single_select_observations) + _setter("single_select_observations", single_select_observations) if tactics is not None: - pulumi.set(__self__, "tactics", tactics) + _setter("tactics", tactics) if techniques is not None: - pulumi.set(__self__, "techniques", techniques) + _setter("techniques", techniques) if threshold_observations is not None: - pulumi.set(__self__, "threshold_observations", threshold_observations) + _setter("threshold_observations", threshold_observations) @property @pulumi.getter(name="anomalySettingsVersion") @@ -603,6 +725,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AlertRuleAnomalyDuplicateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/alert_rule_fusion.py b/sdk/python/pulumi_azure/sentinel/alert_rule_fusion.py index 887de6d0e6..005100f4c6 100644 --- a/sdk/python/pulumi_azure/sentinel/alert_rule_fusion.py +++ b/sdk/python/pulumi_azure/sentinel/alert_rule_fusion.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Sentinel Fusion Alert Rule. Changing this forces a new Sentinel Fusion Alert Rule to be created. :param pulumi.Input[Sequence[pulumi.Input['AlertRuleFusionSourceArgs']]] sources: One or more `source` blocks as defined below. """ - pulumi.set(__self__, "alert_rule_template_guid", alert_rule_template_guid) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + AlertRuleFusionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_rule_template_guid=alert_rule_template_guid, + log_analytics_workspace_id=log_analytics_workspace_id, + enabled=enabled, + name=name, + sources=sources, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_rule_template_guid: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleFusionSourceArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_rule_template_guid is None and 'alertRuleTemplateGuid' in kwargs: + alert_rule_template_guid = kwargs['alertRuleTemplateGuid'] + if alert_rule_template_guid is None: + raise TypeError("Missing 'alert_rule_template_guid' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + + _setter("alert_rule_template_guid", alert_rule_template_guid) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sources is not None: - pulumi.set(__self__, "sources", sources) + _setter("sources", sources) @property @pulumi.getter(name="alertRuleTemplateGuid") @@ -115,16 +142,39 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Sentinel Fusion Alert Rule. Changing this forces a new Sentinel Fusion Alert Rule to be created. :param pulumi.Input[Sequence[pulumi.Input['AlertRuleFusionSourceArgs']]] sources: One or more `source` blocks as defined below. """ + _AlertRuleFusionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_rule_template_guid=alert_rule_template_guid, + enabled=enabled, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + sources=sources, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_rule_template_guid: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleFusionSourceArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_rule_template_guid is None and 'alertRuleTemplateGuid' in kwargs: + alert_rule_template_guid = kwargs['alertRuleTemplateGuid'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if alert_rule_template_guid is not None: - pulumi.set(__self__, "alert_rule_template_guid", alert_rule_template_guid) + _setter("alert_rule_template_guid", alert_rule_template_guid) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sources is not None: - pulumi.set(__self__, "sources", sources) + _setter("sources", sources) @property @pulumi.getter(name="alertRuleTemplateGuid") @@ -296,6 +346,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AlertRuleFusionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/alert_rule_machine_learning_behavior_analytics.py b/sdk/python/pulumi_azure/sentinel/alert_rule_machine_learning_behavior_analytics.py index 456460be82..044975d920 100644 --- a/sdk/python/pulumi_azure/sentinel/alert_rule_machine_learning_behavior_analytics.py +++ b/sdk/python/pulumi_azure/sentinel/alert_rule_machine_learning_behavior_analytics.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AlertRuleMachineLearningBehaviorAnalyticsArgs', 'AlertRuleMachineLearningBehaviorAnalytics'] @@ -25,12 +25,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Should this Sentinel Machine Learning Behavior Analytics Alert Rule be enabled? Defaults to `true`. :param pulumi.Input[str] name: The name which should be used for this SentinelMachine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. """ - pulumi.set(__self__, "alert_rule_template_guid", alert_rule_template_guid) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + AlertRuleMachineLearningBehaviorAnalyticsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_rule_template_guid=alert_rule_template_guid, + log_analytics_workspace_id=log_analytics_workspace_id, + enabled=enabled, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_rule_template_guid: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_rule_template_guid is None and 'alertRuleTemplateGuid' in kwargs: + alert_rule_template_guid = kwargs['alertRuleTemplateGuid'] + if alert_rule_template_guid is None: + raise TypeError("Missing 'alert_rule_template_guid' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + + _setter("alert_rule_template_guid", alert_rule_template_guid) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="alertRuleTemplateGuid") @@ -95,14 +120,35 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The ID of the Log Analytics Workspace this SentinelMachine Learning Behavior Analytics Alert Rule belongs to. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. :param pulumi.Input[str] name: The name which should be used for this SentinelMachine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. """ + _AlertRuleMachineLearningBehaviorAnalyticsState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_rule_template_guid=alert_rule_template_guid, + enabled=enabled, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_rule_template_guid: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_rule_template_guid is None and 'alertRuleTemplateGuid' in kwargs: + alert_rule_template_guid = kwargs['alertRuleTemplateGuid'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if alert_rule_template_guid is not None: - pulumi.set(__self__, "alert_rule_template_guid", alert_rule_template_guid) + _setter("alert_rule_template_guid", alert_rule_template_guid) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="alertRuleTemplateGuid") @@ -242,6 +288,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AlertRuleMachineLearningBehaviorAnalyticsArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/alert_rule_ms_security_incident.py b/sdk/python/pulumi_azure/sentinel/alert_rule_ms_security_incident.py index d0e05f4169..9a665e7d69 100644 --- a/sdk/python/pulumi_azure/sentinel/alert_rule_ms_security_incident.py +++ b/sdk/python/pulumi_azure/sentinel/alert_rule_ms_security_incident.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AlertRuleMsSecurityIncidentArgs', 'AlertRuleMsSecurityIncident'] @@ -39,22 +39,73 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Should this Sentinel MS Security Incident Alert Rule be enabled? Defaults to `true`. :param pulumi.Input[str] name: The name which should be used for this Sentinel MS Security Incident Alert Rule. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "product_filter", product_filter) - pulumi.set(__self__, "severity_filters", severity_filters) + AlertRuleMsSecurityIncidentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + log_analytics_workspace_id=log_analytics_workspace_id, + product_filter=product_filter, + severity_filters=severity_filters, + alert_rule_template_guid=alert_rule_template_guid, + description=description, + display_name_exclude_filters=display_name_exclude_filters, + display_name_filters=display_name_filters, + enabled=enabled, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + product_filter: Optional[pulumi.Input[str]] = None, + severity_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + alert_rule_template_guid: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name_exclude_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + display_name_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if product_filter is None and 'productFilter' in kwargs: + product_filter = kwargs['productFilter'] + if product_filter is None: + raise TypeError("Missing 'product_filter' argument") + if severity_filters is None and 'severityFilters' in kwargs: + severity_filters = kwargs['severityFilters'] + if severity_filters is None: + raise TypeError("Missing 'severity_filters' argument") + if alert_rule_template_guid is None and 'alertRuleTemplateGuid' in kwargs: + alert_rule_template_guid = kwargs['alertRuleTemplateGuid'] + if display_name_exclude_filters is None and 'displayNameExcludeFilters' in kwargs: + display_name_exclude_filters = kwargs['displayNameExcludeFilters'] + if display_name_filters is None and 'displayNameFilters' in kwargs: + display_name_filters = kwargs['displayNameFilters'] + + _setter("display_name", display_name) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("product_filter", product_filter) + _setter("severity_filters", severity_filters) if alert_rule_template_guid is not None: - pulumi.set(__self__, "alert_rule_template_guid", alert_rule_template_guid) + _setter("alert_rule_template_guid", alert_rule_template_guid) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name_exclude_filters is not None: - pulumi.set(__self__, "display_name_exclude_filters", display_name_exclude_filters) + _setter("display_name_exclude_filters", display_name_exclude_filters) if display_name_filters is not None: - pulumi.set(__self__, "display_name_filters", display_name_filters) + _setter("display_name_filters", display_name_filters) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="displayName") @@ -207,26 +258,69 @@ def __init__(__self__, *, > **NOTE** At least one of the severity filters need to be set. """ + _AlertRuleMsSecurityIncidentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_rule_template_guid=alert_rule_template_guid, + description=description, + display_name=display_name, + display_name_exclude_filters=display_name_exclude_filters, + display_name_filters=display_name_filters, + enabled=enabled, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + product_filter=product_filter, + severity_filters=severity_filters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_rule_template_guid: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + display_name_exclude_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + display_name_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + product_filter: Optional[pulumi.Input[str]] = None, + severity_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_rule_template_guid is None and 'alertRuleTemplateGuid' in kwargs: + alert_rule_template_guid = kwargs['alertRuleTemplateGuid'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name_exclude_filters is None and 'displayNameExcludeFilters' in kwargs: + display_name_exclude_filters = kwargs['displayNameExcludeFilters'] + if display_name_filters is None and 'displayNameFilters' in kwargs: + display_name_filters = kwargs['displayNameFilters'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if product_filter is None and 'productFilter' in kwargs: + product_filter = kwargs['productFilter'] + if severity_filters is None and 'severityFilters' in kwargs: + severity_filters = kwargs['severityFilters'] + if alert_rule_template_guid is not None: - pulumi.set(__self__, "alert_rule_template_guid", alert_rule_template_guid) + _setter("alert_rule_template_guid", alert_rule_template_guid) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if display_name_exclude_filters is not None: - pulumi.set(__self__, "display_name_exclude_filters", display_name_exclude_filters) + _setter("display_name_exclude_filters", display_name_exclude_filters) if display_name_filters is not None: - pulumi.set(__self__, "display_name_filters", display_name_filters) + _setter("display_name_filters", display_name_filters) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if product_filter is not None: - pulumi.set(__self__, "product_filter", product_filter) + _setter("product_filter", product_filter) if severity_filters is not None: - pulumi.set(__self__, "severity_filters", severity_filters) + _setter("severity_filters", severity_filters) @property @pulumi.getter(name="alertRuleTemplateGuid") @@ -458,6 +552,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AlertRuleMsSecurityIncidentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/alert_rule_nrt.py b/sdk/python/pulumi_azure/sentinel/alert_rule_nrt.py index d58c30a5b1..ad24a61554 100644 --- a/sdk/python/pulumi_azure/sentinel/alert_rule_nrt.py +++ b/sdk/python/pulumi_azure/sentinel/alert_rule_nrt.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -61,40 +61,117 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] tactics: A list of categories of attacks by which to classify the rule. Possible values are `Collection`, `CommandAndControl`, `CredentialAccess`, `DefenseEvasion`, `Discovery`, `Execution`, `Exfiltration`, `Impact`, `InitialAccess`, `LateralMovement`, `Persistence`, `PrivilegeEscalation` and `PreAttack`. :param pulumi.Input[Sequence[pulumi.Input[str]]] techniques: A list of techniques of attacks by which to classify the rule. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "query", query) - pulumi.set(__self__, "severity", severity) + AlertRuleNrtArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + log_analytics_workspace_id=log_analytics_workspace_id, + query=query, + severity=severity, + alert_details_overrides=alert_details_overrides, + alert_rule_template_guid=alert_rule_template_guid, + alert_rule_template_version=alert_rule_template_version, + custom_details=custom_details, + description=description, + enabled=enabled, + entity_mappings=entity_mappings, + event_grouping=event_grouping, + incident=incident, + name=name, + sentinel_entity_mappings=sentinel_entity_mappings, + suppression_duration=suppression_duration, + suppression_enabled=suppression_enabled, + tactics=tactics, + techniques=techniques, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + query: Optional[pulumi.Input[str]] = None, + severity: Optional[pulumi.Input[str]] = None, + alert_details_overrides: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleNrtAlertDetailsOverrideArgs']]]] = None, + alert_rule_template_guid: Optional[pulumi.Input[str]] = None, + alert_rule_template_version: Optional[pulumi.Input[str]] = None, + custom_details: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + entity_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleNrtEntityMappingArgs']]]] = None, + event_grouping: Optional[pulumi.Input['AlertRuleNrtEventGroupingArgs']] = None, + incident: Optional[pulumi.Input['AlertRuleNrtIncidentArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + sentinel_entity_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleNrtSentinelEntityMappingArgs']]]] = None, + suppression_duration: Optional[pulumi.Input[str]] = None, + suppression_enabled: Optional[pulumi.Input[bool]] = None, + tactics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + techniques: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if query is None: + raise TypeError("Missing 'query' argument") + if severity is None: + raise TypeError("Missing 'severity' argument") + if alert_details_overrides is None and 'alertDetailsOverrides' in kwargs: + alert_details_overrides = kwargs['alertDetailsOverrides'] + if alert_rule_template_guid is None and 'alertRuleTemplateGuid' in kwargs: + alert_rule_template_guid = kwargs['alertRuleTemplateGuid'] + if alert_rule_template_version is None and 'alertRuleTemplateVersion' in kwargs: + alert_rule_template_version = kwargs['alertRuleTemplateVersion'] + if custom_details is None and 'customDetails' in kwargs: + custom_details = kwargs['customDetails'] + if entity_mappings is None and 'entityMappings' in kwargs: + entity_mappings = kwargs['entityMappings'] + if event_grouping is None and 'eventGrouping' in kwargs: + event_grouping = kwargs['eventGrouping'] + if sentinel_entity_mappings is None and 'sentinelEntityMappings' in kwargs: + sentinel_entity_mappings = kwargs['sentinelEntityMappings'] + if suppression_duration is None and 'suppressionDuration' in kwargs: + suppression_duration = kwargs['suppressionDuration'] + if suppression_enabled is None and 'suppressionEnabled' in kwargs: + suppression_enabled = kwargs['suppressionEnabled'] + + _setter("display_name", display_name) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("query", query) + _setter("severity", severity) if alert_details_overrides is not None: - pulumi.set(__self__, "alert_details_overrides", alert_details_overrides) + _setter("alert_details_overrides", alert_details_overrides) if alert_rule_template_guid is not None: - pulumi.set(__self__, "alert_rule_template_guid", alert_rule_template_guid) + _setter("alert_rule_template_guid", alert_rule_template_guid) if alert_rule_template_version is not None: - pulumi.set(__self__, "alert_rule_template_version", alert_rule_template_version) + _setter("alert_rule_template_version", alert_rule_template_version) if custom_details is not None: - pulumi.set(__self__, "custom_details", custom_details) + _setter("custom_details", custom_details) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if entity_mappings is not None: - pulumi.set(__self__, "entity_mappings", entity_mappings) + _setter("entity_mappings", entity_mappings) if event_grouping is not None: - pulumi.set(__self__, "event_grouping", event_grouping) + _setter("event_grouping", event_grouping) if incident is not None: - pulumi.set(__self__, "incident", incident) + _setter("incident", incident) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sentinel_entity_mappings is not None: - pulumi.set(__self__, "sentinel_entity_mappings", sentinel_entity_mappings) + _setter("sentinel_entity_mappings", sentinel_entity_mappings) if suppression_duration is not None: - pulumi.set(__self__, "suppression_duration", suppression_duration) + _setter("suppression_duration", suppression_duration) if suppression_enabled is not None: - pulumi.set(__self__, "suppression_enabled", suppression_enabled) + _setter("suppression_enabled", suppression_enabled) if tactics is not None: - pulumi.set(__self__, "tactics", tactics) + _setter("tactics", tactics) if techniques is not None: - pulumi.set(__self__, "techniques", techniques) + _setter("techniques", techniques) @property @pulumi.getter(name="displayName") @@ -377,44 +454,113 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] tactics: A list of categories of attacks by which to classify the rule. Possible values are `Collection`, `CommandAndControl`, `CredentialAccess`, `DefenseEvasion`, `Discovery`, `Execution`, `Exfiltration`, `Impact`, `InitialAccess`, `LateralMovement`, `Persistence`, `PrivilegeEscalation` and `PreAttack`. :param pulumi.Input[Sequence[pulumi.Input[str]]] techniques: A list of techniques of attacks by which to classify the rule. """ + _AlertRuleNrtState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_details_overrides=alert_details_overrides, + alert_rule_template_guid=alert_rule_template_guid, + alert_rule_template_version=alert_rule_template_version, + custom_details=custom_details, + description=description, + display_name=display_name, + enabled=enabled, + entity_mappings=entity_mappings, + event_grouping=event_grouping, + incident=incident, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + query=query, + sentinel_entity_mappings=sentinel_entity_mappings, + severity=severity, + suppression_duration=suppression_duration, + suppression_enabled=suppression_enabled, + tactics=tactics, + techniques=techniques, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_details_overrides: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleNrtAlertDetailsOverrideArgs']]]] = None, + alert_rule_template_guid: Optional[pulumi.Input[str]] = None, + alert_rule_template_version: Optional[pulumi.Input[str]] = None, + custom_details: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + entity_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleNrtEntityMappingArgs']]]] = None, + event_grouping: Optional[pulumi.Input['AlertRuleNrtEventGroupingArgs']] = None, + incident: Optional[pulumi.Input['AlertRuleNrtIncidentArgs']] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + query: Optional[pulumi.Input[str]] = None, + sentinel_entity_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleNrtSentinelEntityMappingArgs']]]] = None, + severity: Optional[pulumi.Input[str]] = None, + suppression_duration: Optional[pulumi.Input[str]] = None, + suppression_enabled: Optional[pulumi.Input[bool]] = None, + tactics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + techniques: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_details_overrides is None and 'alertDetailsOverrides' in kwargs: + alert_details_overrides = kwargs['alertDetailsOverrides'] + if alert_rule_template_guid is None and 'alertRuleTemplateGuid' in kwargs: + alert_rule_template_guid = kwargs['alertRuleTemplateGuid'] + if alert_rule_template_version is None and 'alertRuleTemplateVersion' in kwargs: + alert_rule_template_version = kwargs['alertRuleTemplateVersion'] + if custom_details is None and 'customDetails' in kwargs: + custom_details = kwargs['customDetails'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if entity_mappings is None and 'entityMappings' in kwargs: + entity_mappings = kwargs['entityMappings'] + if event_grouping is None and 'eventGrouping' in kwargs: + event_grouping = kwargs['eventGrouping'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if sentinel_entity_mappings is None and 'sentinelEntityMappings' in kwargs: + sentinel_entity_mappings = kwargs['sentinelEntityMappings'] + if suppression_duration is None and 'suppressionDuration' in kwargs: + suppression_duration = kwargs['suppressionDuration'] + if suppression_enabled is None and 'suppressionEnabled' in kwargs: + suppression_enabled = kwargs['suppressionEnabled'] + if alert_details_overrides is not None: - pulumi.set(__self__, "alert_details_overrides", alert_details_overrides) + _setter("alert_details_overrides", alert_details_overrides) if alert_rule_template_guid is not None: - pulumi.set(__self__, "alert_rule_template_guid", alert_rule_template_guid) + _setter("alert_rule_template_guid", alert_rule_template_guid) if alert_rule_template_version is not None: - pulumi.set(__self__, "alert_rule_template_version", alert_rule_template_version) + _setter("alert_rule_template_version", alert_rule_template_version) if custom_details is not None: - pulumi.set(__self__, "custom_details", custom_details) + _setter("custom_details", custom_details) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if entity_mappings is not None: - pulumi.set(__self__, "entity_mappings", entity_mappings) + _setter("entity_mappings", entity_mappings) if event_grouping is not None: - pulumi.set(__self__, "event_grouping", event_grouping) + _setter("event_grouping", event_grouping) if incident is not None: - pulumi.set(__self__, "incident", incident) + _setter("incident", incident) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if query is not None: - pulumi.set(__self__, "query", query) + _setter("query", query) if sentinel_entity_mappings is not None: - pulumi.set(__self__, "sentinel_entity_mappings", sentinel_entity_mappings) + _setter("sentinel_entity_mappings", sentinel_entity_mappings) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if suppression_duration is not None: - pulumi.set(__self__, "suppression_duration", suppression_duration) + _setter("suppression_duration", suppression_duration) if suppression_enabled is not None: - pulumi.set(__self__, "suppression_enabled", suppression_enabled) + _setter("suppression_enabled", suppression_enabled) if tactics is not None: - pulumi.set(__self__, "tactics", tactics) + _setter("tactics", tactics) if techniques is not None: - pulumi.set(__self__, "techniques", techniques) + _setter("techniques", techniques) @property @pulumi.getter(name="alertDetailsOverrides") @@ -784,6 +930,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AlertRuleNrtArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -827,7 +977,17 @@ def _internal_init(__self__, __props__.__dict__["display_name"] = display_name __props__.__dict__["enabled"] = enabled __props__.__dict__["entity_mappings"] = entity_mappings + if event_grouping is not None and not isinstance(event_grouping, AlertRuleNrtEventGroupingArgs): + event_grouping = event_grouping or {} + def _setter(key, value): + event_grouping[key] = value + AlertRuleNrtEventGroupingArgs._configure(_setter, **event_grouping) __props__.__dict__["event_grouping"] = event_grouping + if incident is not None and not isinstance(incident, AlertRuleNrtIncidentArgs): + incident = incident or {} + def _setter(key, value): + incident[key] = value + AlertRuleNrtIncidentArgs._configure(_setter, **incident) __props__.__dict__["incident"] = incident if log_analytics_workspace_id is None and not opts.urn: raise TypeError("Missing required property 'log_analytics_workspace_id'") diff --git a/sdk/python/pulumi_azure/sentinel/alert_rule_scheduled.py b/sdk/python/pulumi_azure/sentinel/alert_rule_scheduled.py index 3409c8b56f..815ffb32f6 100644 --- a/sdk/python/pulumi_azure/sentinel/alert_rule_scheduled.py +++ b/sdk/python/pulumi_azure/sentinel/alert_rule_scheduled.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -71,48 +71,143 @@ def __init__(__self__, *, :param pulumi.Input[str] trigger_operator: The alert trigger operator, combined with `trigger_threshold`, setting alert threshold of this Sentinel Scheduled Alert Rule. Possible values are `Equal`, `GreaterThan`, `LessThan`, `NotEqual`. :param pulumi.Input[int] trigger_threshold: The baseline number of query results generated, combined with `trigger_operator`, setting alert threshold of this Sentinel Scheduled Alert Rule. Defaults to `0`. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "query", query) - pulumi.set(__self__, "severity", severity) + AlertRuleScheduledArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + log_analytics_workspace_id=log_analytics_workspace_id, + query=query, + severity=severity, + alert_details_overrides=alert_details_overrides, + alert_rule_template_guid=alert_rule_template_guid, + alert_rule_template_version=alert_rule_template_version, + custom_details=custom_details, + description=description, + enabled=enabled, + entity_mappings=entity_mappings, + event_grouping=event_grouping, + incident_configuration=incident_configuration, + name=name, + query_frequency=query_frequency, + query_period=query_period, + sentinel_entity_mappings=sentinel_entity_mappings, + suppression_duration=suppression_duration, + suppression_enabled=suppression_enabled, + tactics=tactics, + techniques=techniques, + trigger_operator=trigger_operator, + trigger_threshold=trigger_threshold, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + query: Optional[pulumi.Input[str]] = None, + severity: Optional[pulumi.Input[str]] = None, + alert_details_overrides: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleScheduledAlertDetailsOverrideArgs']]]] = None, + alert_rule_template_guid: Optional[pulumi.Input[str]] = None, + alert_rule_template_version: Optional[pulumi.Input[str]] = None, + custom_details: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + entity_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleScheduledEntityMappingArgs']]]] = None, + event_grouping: Optional[pulumi.Input['AlertRuleScheduledEventGroupingArgs']] = None, + incident_configuration: Optional[pulumi.Input['AlertRuleScheduledIncidentConfigurationArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + query_frequency: Optional[pulumi.Input[str]] = None, + query_period: Optional[pulumi.Input[str]] = None, + sentinel_entity_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleScheduledSentinelEntityMappingArgs']]]] = None, + suppression_duration: Optional[pulumi.Input[str]] = None, + suppression_enabled: Optional[pulumi.Input[bool]] = None, + tactics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + techniques: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + trigger_operator: Optional[pulumi.Input[str]] = None, + trigger_threshold: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if query is None: + raise TypeError("Missing 'query' argument") + if severity is None: + raise TypeError("Missing 'severity' argument") + if alert_details_overrides is None and 'alertDetailsOverrides' in kwargs: + alert_details_overrides = kwargs['alertDetailsOverrides'] + if alert_rule_template_guid is None and 'alertRuleTemplateGuid' in kwargs: + alert_rule_template_guid = kwargs['alertRuleTemplateGuid'] + if alert_rule_template_version is None and 'alertRuleTemplateVersion' in kwargs: + alert_rule_template_version = kwargs['alertRuleTemplateVersion'] + if custom_details is None and 'customDetails' in kwargs: + custom_details = kwargs['customDetails'] + if entity_mappings is None and 'entityMappings' in kwargs: + entity_mappings = kwargs['entityMappings'] + if event_grouping is None and 'eventGrouping' in kwargs: + event_grouping = kwargs['eventGrouping'] + if incident_configuration is None and 'incidentConfiguration' in kwargs: + incident_configuration = kwargs['incidentConfiguration'] + if query_frequency is None and 'queryFrequency' in kwargs: + query_frequency = kwargs['queryFrequency'] + if query_period is None and 'queryPeriod' in kwargs: + query_period = kwargs['queryPeriod'] + if sentinel_entity_mappings is None and 'sentinelEntityMappings' in kwargs: + sentinel_entity_mappings = kwargs['sentinelEntityMappings'] + if suppression_duration is None and 'suppressionDuration' in kwargs: + suppression_duration = kwargs['suppressionDuration'] + if suppression_enabled is None and 'suppressionEnabled' in kwargs: + suppression_enabled = kwargs['suppressionEnabled'] + if trigger_operator is None and 'triggerOperator' in kwargs: + trigger_operator = kwargs['triggerOperator'] + if trigger_threshold is None and 'triggerThreshold' in kwargs: + trigger_threshold = kwargs['triggerThreshold'] + + _setter("display_name", display_name) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("query", query) + _setter("severity", severity) if alert_details_overrides is not None: - pulumi.set(__self__, "alert_details_overrides", alert_details_overrides) + _setter("alert_details_overrides", alert_details_overrides) if alert_rule_template_guid is not None: - pulumi.set(__self__, "alert_rule_template_guid", alert_rule_template_guid) + _setter("alert_rule_template_guid", alert_rule_template_guid) if alert_rule_template_version is not None: - pulumi.set(__self__, "alert_rule_template_version", alert_rule_template_version) + _setter("alert_rule_template_version", alert_rule_template_version) if custom_details is not None: - pulumi.set(__self__, "custom_details", custom_details) + _setter("custom_details", custom_details) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if entity_mappings is not None: - pulumi.set(__self__, "entity_mappings", entity_mappings) + _setter("entity_mappings", entity_mappings) if event_grouping is not None: - pulumi.set(__self__, "event_grouping", event_grouping) + _setter("event_grouping", event_grouping) if incident_configuration is not None: - pulumi.set(__self__, "incident_configuration", incident_configuration) + _setter("incident_configuration", incident_configuration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if query_frequency is not None: - pulumi.set(__self__, "query_frequency", query_frequency) + _setter("query_frequency", query_frequency) if query_period is not None: - pulumi.set(__self__, "query_period", query_period) + _setter("query_period", query_period) if sentinel_entity_mappings is not None: - pulumi.set(__self__, "sentinel_entity_mappings", sentinel_entity_mappings) + _setter("sentinel_entity_mappings", sentinel_entity_mappings) if suppression_duration is not None: - pulumi.set(__self__, "suppression_duration", suppression_duration) + _setter("suppression_duration", suppression_duration) if suppression_enabled is not None: - pulumi.set(__self__, "suppression_enabled", suppression_enabled) + _setter("suppression_enabled", suppression_enabled) if tactics is not None: - pulumi.set(__self__, "tactics", tactics) + _setter("tactics", tactics) if techniques is not None: - pulumi.set(__self__, "techniques", techniques) + _setter("techniques", techniques) if trigger_operator is not None: - pulumi.set(__self__, "trigger_operator", trigger_operator) + _setter("trigger_operator", trigger_operator) if trigger_threshold is not None: - pulumi.set(__self__, "trigger_threshold", trigger_threshold) + _setter("trigger_threshold", trigger_threshold) @property @pulumi.getter(name="displayName") @@ -455,52 +550,139 @@ def __init__(__self__, *, :param pulumi.Input[str] trigger_operator: The alert trigger operator, combined with `trigger_threshold`, setting alert threshold of this Sentinel Scheduled Alert Rule. Possible values are `Equal`, `GreaterThan`, `LessThan`, `NotEqual`. :param pulumi.Input[int] trigger_threshold: The baseline number of query results generated, combined with `trigger_operator`, setting alert threshold of this Sentinel Scheduled Alert Rule. Defaults to `0`. """ + _AlertRuleScheduledState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_details_overrides=alert_details_overrides, + alert_rule_template_guid=alert_rule_template_guid, + alert_rule_template_version=alert_rule_template_version, + custom_details=custom_details, + description=description, + display_name=display_name, + enabled=enabled, + entity_mappings=entity_mappings, + event_grouping=event_grouping, + incident_configuration=incident_configuration, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + query=query, + query_frequency=query_frequency, + query_period=query_period, + sentinel_entity_mappings=sentinel_entity_mappings, + severity=severity, + suppression_duration=suppression_duration, + suppression_enabled=suppression_enabled, + tactics=tactics, + techniques=techniques, + trigger_operator=trigger_operator, + trigger_threshold=trigger_threshold, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_details_overrides: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleScheduledAlertDetailsOverrideArgs']]]] = None, + alert_rule_template_guid: Optional[pulumi.Input[str]] = None, + alert_rule_template_version: Optional[pulumi.Input[str]] = None, + custom_details: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + entity_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleScheduledEntityMappingArgs']]]] = None, + event_grouping: Optional[pulumi.Input['AlertRuleScheduledEventGroupingArgs']] = None, + incident_configuration: Optional[pulumi.Input['AlertRuleScheduledIncidentConfigurationArgs']] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + query: Optional[pulumi.Input[str]] = None, + query_frequency: Optional[pulumi.Input[str]] = None, + query_period: Optional[pulumi.Input[str]] = None, + sentinel_entity_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['AlertRuleScheduledSentinelEntityMappingArgs']]]] = None, + severity: Optional[pulumi.Input[str]] = None, + suppression_duration: Optional[pulumi.Input[str]] = None, + suppression_enabled: Optional[pulumi.Input[bool]] = None, + tactics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + techniques: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + trigger_operator: Optional[pulumi.Input[str]] = None, + trigger_threshold: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_details_overrides is None and 'alertDetailsOverrides' in kwargs: + alert_details_overrides = kwargs['alertDetailsOverrides'] + if alert_rule_template_guid is None and 'alertRuleTemplateGuid' in kwargs: + alert_rule_template_guid = kwargs['alertRuleTemplateGuid'] + if alert_rule_template_version is None and 'alertRuleTemplateVersion' in kwargs: + alert_rule_template_version = kwargs['alertRuleTemplateVersion'] + if custom_details is None and 'customDetails' in kwargs: + custom_details = kwargs['customDetails'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if entity_mappings is None and 'entityMappings' in kwargs: + entity_mappings = kwargs['entityMappings'] + if event_grouping is None and 'eventGrouping' in kwargs: + event_grouping = kwargs['eventGrouping'] + if incident_configuration is None and 'incidentConfiguration' in kwargs: + incident_configuration = kwargs['incidentConfiguration'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if query_frequency is None and 'queryFrequency' in kwargs: + query_frequency = kwargs['queryFrequency'] + if query_period is None and 'queryPeriod' in kwargs: + query_period = kwargs['queryPeriod'] + if sentinel_entity_mappings is None and 'sentinelEntityMappings' in kwargs: + sentinel_entity_mappings = kwargs['sentinelEntityMappings'] + if suppression_duration is None and 'suppressionDuration' in kwargs: + suppression_duration = kwargs['suppressionDuration'] + if suppression_enabled is None and 'suppressionEnabled' in kwargs: + suppression_enabled = kwargs['suppressionEnabled'] + if trigger_operator is None and 'triggerOperator' in kwargs: + trigger_operator = kwargs['triggerOperator'] + if trigger_threshold is None and 'triggerThreshold' in kwargs: + trigger_threshold = kwargs['triggerThreshold'] + if alert_details_overrides is not None: - pulumi.set(__self__, "alert_details_overrides", alert_details_overrides) + _setter("alert_details_overrides", alert_details_overrides) if alert_rule_template_guid is not None: - pulumi.set(__self__, "alert_rule_template_guid", alert_rule_template_guid) + _setter("alert_rule_template_guid", alert_rule_template_guid) if alert_rule_template_version is not None: - pulumi.set(__self__, "alert_rule_template_version", alert_rule_template_version) + _setter("alert_rule_template_version", alert_rule_template_version) if custom_details is not None: - pulumi.set(__self__, "custom_details", custom_details) + _setter("custom_details", custom_details) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if entity_mappings is not None: - pulumi.set(__self__, "entity_mappings", entity_mappings) + _setter("entity_mappings", entity_mappings) if event_grouping is not None: - pulumi.set(__self__, "event_grouping", event_grouping) + _setter("event_grouping", event_grouping) if incident_configuration is not None: - pulumi.set(__self__, "incident_configuration", incident_configuration) + _setter("incident_configuration", incident_configuration) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if query is not None: - pulumi.set(__self__, "query", query) + _setter("query", query) if query_frequency is not None: - pulumi.set(__self__, "query_frequency", query_frequency) + _setter("query_frequency", query_frequency) if query_period is not None: - pulumi.set(__self__, "query_period", query_period) + _setter("query_period", query_period) if sentinel_entity_mappings is not None: - pulumi.set(__self__, "sentinel_entity_mappings", sentinel_entity_mappings) + _setter("sentinel_entity_mappings", sentinel_entity_mappings) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if suppression_duration is not None: - pulumi.set(__self__, "suppression_duration", suppression_duration) + _setter("suppression_duration", suppression_duration) if suppression_enabled is not None: - pulumi.set(__self__, "suppression_enabled", suppression_enabled) + _setter("suppression_enabled", suppression_enabled) if tactics is not None: - pulumi.set(__self__, "tactics", tactics) + _setter("tactics", tactics) if techniques is not None: - pulumi.set(__self__, "techniques", techniques) + _setter("techniques", techniques) if trigger_operator is not None: - pulumi.set(__self__, "trigger_operator", trigger_operator) + _setter("trigger_operator", trigger_operator) if trigger_threshold is not None: - pulumi.set(__self__, "trigger_threshold", trigger_threshold) + _setter("trigger_threshold", trigger_threshold) @property @pulumi.getter(name="alertDetailsOverrides") @@ -930,6 +1112,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AlertRuleScheduledArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -977,7 +1163,17 @@ def _internal_init(__self__, __props__.__dict__["display_name"] = display_name __props__.__dict__["enabled"] = enabled __props__.__dict__["entity_mappings"] = entity_mappings + if event_grouping is not None and not isinstance(event_grouping, AlertRuleScheduledEventGroupingArgs): + event_grouping = event_grouping or {} + def _setter(key, value): + event_grouping[key] = value + AlertRuleScheduledEventGroupingArgs._configure(_setter, **event_grouping) __props__.__dict__["event_grouping"] = event_grouping + if incident_configuration is not None and not isinstance(incident_configuration, AlertRuleScheduledIncidentConfigurationArgs): + incident_configuration = incident_configuration or {} + def _setter(key, value): + incident_configuration[key] = value + AlertRuleScheduledIncidentConfigurationArgs._configure(_setter, **incident_configuration) __props__.__dict__["incident_configuration"] = incident_configuration if log_analytics_workspace_id is None and not opts.urn: raise TypeError("Missing required property 'log_analytics_workspace_id'") diff --git a/sdk/python/pulumi_azure/sentinel/alert_rule_threat_intelligence.py b/sdk/python/pulumi_azure/sentinel/alert_rule_threat_intelligence.py index aac36e71ee..d3ba315b8a 100644 --- a/sdk/python/pulumi_azure/sentinel/alert_rule_threat_intelligence.py +++ b/sdk/python/pulumi_azure/sentinel/alert_rule_threat_intelligence.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['AlertRuleThreatIntelligenceArgs', 'AlertRuleThreatIntelligence'] @@ -25,12 +25,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Whether the Threat Intelligence Alert rule enabled? Defaults to `true`. :param pulumi.Input[str] name: The name which should be used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. """ - pulumi.set(__self__, "alert_rule_template_guid", alert_rule_template_guid) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + AlertRuleThreatIntelligenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_rule_template_guid=alert_rule_template_guid, + log_analytics_workspace_id=log_analytics_workspace_id, + enabled=enabled, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_rule_template_guid: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_rule_template_guid is None and 'alertRuleTemplateGuid' in kwargs: + alert_rule_template_guid = kwargs['alertRuleTemplateGuid'] + if alert_rule_template_guid is None: + raise TypeError("Missing 'alert_rule_template_guid' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + + _setter("alert_rule_template_guid", alert_rule_template_guid) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="alertRuleTemplateGuid") @@ -95,14 +120,35 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The ID of the Log Analytics Workspace this Sentinel Threat Intelligence Alert Rule belongs to. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. :param pulumi.Input[str] name: The name which should be used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. """ + _AlertRuleThreatIntelligenceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alert_rule_template_guid=alert_rule_template_guid, + enabled=enabled, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alert_rule_template_guid: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alert_rule_template_guid is None and 'alertRuleTemplateGuid' in kwargs: + alert_rule_template_guid = kwargs['alertRuleTemplateGuid'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if alert_rule_template_guid is not None: - pulumi.set(__self__, "alert_rule_template_guid", alert_rule_template_guid) + _setter("alert_rule_template_guid", alert_rule_template_guid) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="alertRuleTemplateGuid") @@ -264,6 +310,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AlertRuleThreatIntelligenceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/authomation_rule.py b/sdk/python/pulumi_azure/sentinel/authomation_rule.py index 46194efbef..bc1402bde5 100644 --- a/sdk/python/pulumi_azure/sentinel/authomation_rule.py +++ b/sdk/python/pulumi_azure/sentinel/authomation_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,30 +47,83 @@ def __init__(__self__, *, :param pulumi.Input[str] triggers_on: Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. :param pulumi.Input[str] triggers_when: Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "order", order) + AuthomationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + log_analytics_workspace_id=log_analytics_workspace_id, + order=order, + action_incidents=action_incidents, + action_playbooks=action_playbooks, + condition_json=condition_json, + conditions=conditions, + enabled=enabled, + expiration=expiration, + name=name, + triggers_on=triggers_on, + triggers_when=triggers_when, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + action_incidents: Optional[pulumi.Input[Sequence[pulumi.Input['AuthomationRuleActionIncidentArgs']]]] = None, + action_playbooks: Optional[pulumi.Input[Sequence[pulumi.Input['AuthomationRuleActionPlaybookArgs']]]] = None, + condition_json: Optional[pulumi.Input[str]] = None, + conditions: Optional[pulumi.Input[Sequence[pulumi.Input['AuthomationRuleConditionArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + expiration: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + triggers_on: Optional[pulumi.Input[str]] = None, + triggers_when: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if order is None: + raise TypeError("Missing 'order' argument") + if action_incidents is None and 'actionIncidents' in kwargs: + action_incidents = kwargs['actionIncidents'] + if action_playbooks is None and 'actionPlaybooks' in kwargs: + action_playbooks = kwargs['actionPlaybooks'] + if condition_json is None and 'conditionJson' in kwargs: + condition_json = kwargs['conditionJson'] + if triggers_on is None and 'triggersOn' in kwargs: + triggers_on = kwargs['triggersOn'] + if triggers_when is None and 'triggersWhen' in kwargs: + triggers_when = kwargs['triggersWhen'] + + _setter("display_name", display_name) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("order", order) if action_incidents is not None: - pulumi.set(__self__, "action_incidents", action_incidents) + _setter("action_incidents", action_incidents) if action_playbooks is not None: - pulumi.set(__self__, "action_playbooks", action_playbooks) + _setter("action_playbooks", action_playbooks) if condition_json is not None: - pulumi.set(__self__, "condition_json", condition_json) + _setter("condition_json", condition_json) if conditions is not None: warnings.warn("""This is deprecated in favor of `condition_json`""", DeprecationWarning) pulumi.log.warn("""conditions is deprecated: This is deprecated in favor of `condition_json`""") if conditions is not None: - pulumi.set(__self__, "conditions", conditions) + _setter("conditions", conditions) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if expiration is not None: - pulumi.set(__self__, "expiration", expiration) + _setter("expiration", expiration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if triggers_on is not None: - pulumi.set(__self__, "triggers_on", triggers_on) + _setter("triggers_on", triggers_on) if triggers_when is not None: - pulumi.set(__self__, "triggers_when", triggers_when) + _setter("triggers_when", triggers_when) @property @pulumi.getter(name="displayName") @@ -258,33 +311,80 @@ def __init__(__self__, *, :param pulumi.Input[str] triggers_on: Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. :param pulumi.Input[str] triggers_when: Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. """ + _AuthomationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_incidents=action_incidents, + action_playbooks=action_playbooks, + condition_json=condition_json, + conditions=conditions, + display_name=display_name, + enabled=enabled, + expiration=expiration, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + order=order, + triggers_on=triggers_on, + triggers_when=triggers_when, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_incidents: Optional[pulumi.Input[Sequence[pulumi.Input['AuthomationRuleActionIncidentArgs']]]] = None, + action_playbooks: Optional[pulumi.Input[Sequence[pulumi.Input['AuthomationRuleActionPlaybookArgs']]]] = None, + condition_json: Optional[pulumi.Input[str]] = None, + conditions: Optional[pulumi.Input[Sequence[pulumi.Input['AuthomationRuleConditionArgs']]]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + expiration: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + triggers_on: Optional[pulumi.Input[str]] = None, + triggers_when: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_incidents is None and 'actionIncidents' in kwargs: + action_incidents = kwargs['actionIncidents'] + if action_playbooks is None and 'actionPlaybooks' in kwargs: + action_playbooks = kwargs['actionPlaybooks'] + if condition_json is None and 'conditionJson' in kwargs: + condition_json = kwargs['conditionJson'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if triggers_on is None and 'triggersOn' in kwargs: + triggers_on = kwargs['triggersOn'] + if triggers_when is None and 'triggersWhen' in kwargs: + triggers_when = kwargs['triggersWhen'] + if action_incidents is not None: - pulumi.set(__self__, "action_incidents", action_incidents) + _setter("action_incidents", action_incidents) if action_playbooks is not None: - pulumi.set(__self__, "action_playbooks", action_playbooks) + _setter("action_playbooks", action_playbooks) if condition_json is not None: - pulumi.set(__self__, "condition_json", condition_json) + _setter("condition_json", condition_json) if conditions is not None: warnings.warn("""This is deprecated in favor of `condition_json`""", DeprecationWarning) pulumi.log.warn("""conditions is deprecated: This is deprecated in favor of `condition_json`""") if conditions is not None: - pulumi.set(__self__, "conditions", conditions) + _setter("conditions", conditions) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if expiration is not None: - pulumi.set(__self__, "expiration", expiration) + _setter("expiration", expiration) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if order is not None: - pulumi.set(__self__, "order", order) + _setter("order", order) if triggers_on is not None: - pulumi.set(__self__, "triggers_on", triggers_on) + _setter("triggers_on", triggers_on) if triggers_when is not None: - pulumi.set(__self__, "triggers_when", triggers_when) + _setter("triggers_when", triggers_when) @property @pulumi.getter(name="actionIncidents") @@ -562,6 +662,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AuthomationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/automation_rule.py b/sdk/python/pulumi_azure/sentinel/automation_rule.py index d2283ebaa1..39f048c084 100644 --- a/sdk/python/pulumi_azure/sentinel/automation_rule.py +++ b/sdk/python/pulumi_azure/sentinel/automation_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,30 +47,83 @@ def __init__(__self__, *, :param pulumi.Input[str] triggers_on: Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. :param pulumi.Input[str] triggers_when: Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "order", order) + AutomationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + log_analytics_workspace_id=log_analytics_workspace_id, + order=order, + action_incidents=action_incidents, + action_playbooks=action_playbooks, + condition_json=condition_json, + conditions=conditions, + enabled=enabled, + expiration=expiration, + name=name, + triggers_on=triggers_on, + triggers_when=triggers_when, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + action_incidents: Optional[pulumi.Input[Sequence[pulumi.Input['AutomationRuleActionIncidentArgs']]]] = None, + action_playbooks: Optional[pulumi.Input[Sequence[pulumi.Input['AutomationRuleActionPlaybookArgs']]]] = None, + condition_json: Optional[pulumi.Input[str]] = None, + conditions: Optional[pulumi.Input[Sequence[pulumi.Input['AutomationRuleConditionArgs']]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + expiration: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + triggers_on: Optional[pulumi.Input[str]] = None, + triggers_when: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if order is None: + raise TypeError("Missing 'order' argument") + if action_incidents is None and 'actionIncidents' in kwargs: + action_incidents = kwargs['actionIncidents'] + if action_playbooks is None and 'actionPlaybooks' in kwargs: + action_playbooks = kwargs['actionPlaybooks'] + if condition_json is None and 'conditionJson' in kwargs: + condition_json = kwargs['conditionJson'] + if triggers_on is None and 'triggersOn' in kwargs: + triggers_on = kwargs['triggersOn'] + if triggers_when is None and 'triggersWhen' in kwargs: + triggers_when = kwargs['triggersWhen'] + + _setter("display_name", display_name) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("order", order) if action_incidents is not None: - pulumi.set(__self__, "action_incidents", action_incidents) + _setter("action_incidents", action_incidents) if action_playbooks is not None: - pulumi.set(__self__, "action_playbooks", action_playbooks) + _setter("action_playbooks", action_playbooks) if condition_json is not None: - pulumi.set(__self__, "condition_json", condition_json) + _setter("condition_json", condition_json) if conditions is not None: warnings.warn("""This is deprecated in favor of `condition_json`""", DeprecationWarning) pulumi.log.warn("""conditions is deprecated: This is deprecated in favor of `condition_json`""") if conditions is not None: - pulumi.set(__self__, "conditions", conditions) + _setter("conditions", conditions) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if expiration is not None: - pulumi.set(__self__, "expiration", expiration) + _setter("expiration", expiration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if triggers_on is not None: - pulumi.set(__self__, "triggers_on", triggers_on) + _setter("triggers_on", triggers_on) if triggers_when is not None: - pulumi.set(__self__, "triggers_when", triggers_when) + _setter("triggers_when", triggers_when) @property @pulumi.getter(name="displayName") @@ -258,33 +311,80 @@ def __init__(__self__, *, :param pulumi.Input[str] triggers_on: Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. :param pulumi.Input[str] triggers_when: Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. """ + _AutomationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + action_incidents=action_incidents, + action_playbooks=action_playbooks, + condition_json=condition_json, + conditions=conditions, + display_name=display_name, + enabled=enabled, + expiration=expiration, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + order=order, + triggers_on=triggers_on, + triggers_when=triggers_when, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action_incidents: Optional[pulumi.Input[Sequence[pulumi.Input['AutomationRuleActionIncidentArgs']]]] = None, + action_playbooks: Optional[pulumi.Input[Sequence[pulumi.Input['AutomationRuleActionPlaybookArgs']]]] = None, + condition_json: Optional[pulumi.Input[str]] = None, + conditions: Optional[pulumi.Input[Sequence[pulumi.Input['AutomationRuleConditionArgs']]]] = None, + display_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + expiration: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + order: Optional[pulumi.Input[int]] = None, + triggers_on: Optional[pulumi.Input[str]] = None, + triggers_when: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action_incidents is None and 'actionIncidents' in kwargs: + action_incidents = kwargs['actionIncidents'] + if action_playbooks is None and 'actionPlaybooks' in kwargs: + action_playbooks = kwargs['actionPlaybooks'] + if condition_json is None and 'conditionJson' in kwargs: + condition_json = kwargs['conditionJson'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if triggers_on is None and 'triggersOn' in kwargs: + triggers_on = kwargs['triggersOn'] + if triggers_when is None and 'triggersWhen' in kwargs: + triggers_when = kwargs['triggersWhen'] + if action_incidents is not None: - pulumi.set(__self__, "action_incidents", action_incidents) + _setter("action_incidents", action_incidents) if action_playbooks is not None: - pulumi.set(__self__, "action_playbooks", action_playbooks) + _setter("action_playbooks", action_playbooks) if condition_json is not None: - pulumi.set(__self__, "condition_json", condition_json) + _setter("condition_json", condition_json) if conditions is not None: warnings.warn("""This is deprecated in favor of `condition_json`""", DeprecationWarning) pulumi.log.warn("""conditions is deprecated: This is deprecated in favor of `condition_json`""") if conditions is not None: - pulumi.set(__self__, "conditions", conditions) + _setter("conditions", conditions) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if expiration is not None: - pulumi.set(__self__, "expiration", expiration) + _setter("expiration", expiration) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if order is not None: - pulumi.set(__self__, "order", order) + _setter("order", order) if triggers_on is not None: - pulumi.set(__self__, "triggers_on", triggers_on) + _setter("triggers_on", triggers_on) if triggers_when is not None: - pulumi.set(__self__, "triggers_when", triggers_when) + _setter("triggers_when", triggers_when) @property @pulumi.getter(name="actionIncidents") @@ -557,6 +657,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AutomationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_aws_cloud_trail.py b/sdk/python/pulumi_azure/sentinel/data_connector_aws_cloud_trail.py index 79faba2fe2..ed518bdfb8 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_aws_cloud_trail.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_aws_cloud_trail.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorAwsCloudTrailArgs', 'DataConnectorAwsCloudTrail'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The ID of the Log Analytics Workspace that this AWS CloudTrail Data Connector resides in. Changing this forces a new AWS CloudTrail Data Connector to be created. :param pulumi.Input[str] name: The name which should be used for this AWS CloudTrail Data Connector. Changing this forces a new AWS CloudTrail Data Connector to be created. """ - pulumi.set(__self__, "aws_role_arn", aws_role_arn) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorAwsCloudTrailArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + aws_role_arn=aws_role_arn, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aws_role_arn: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aws_role_arn is None and 'awsRoleArn' in kwargs: + aws_role_arn = kwargs['awsRoleArn'] + if aws_role_arn is None: + raise TypeError("Missing 'aws_role_arn' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + + _setter("aws_role_arn", aws_role_arn) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="awsRoleArn") @@ -77,12 +100,31 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The ID of the Log Analytics Workspace that this AWS CloudTrail Data Connector resides in. Changing this forces a new AWS CloudTrail Data Connector to be created. :param pulumi.Input[str] name: The name which should be used for this AWS CloudTrail Data Connector. Changing this forces a new AWS CloudTrail Data Connector to be created. """ + _DataConnectorAwsCloudTrailState._configure( + lambda key, value: pulumi.set(__self__, key, value), + aws_role_arn=aws_role_arn, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aws_role_arn: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aws_role_arn is None and 'awsRoleArn' in kwargs: + aws_role_arn = kwargs['awsRoleArn'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if aws_role_arn is not None: - pulumi.set(__self__, "aws_role_arn", aws_role_arn) + _setter("aws_role_arn", aws_role_arn) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="awsRoleArn") @@ -208,6 +250,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorAwsCloudTrailArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_aws_s3.py b/sdk/python/pulumi_azure/sentinel/data_connector_aws_s3.py index 1aafb15834..4a2f40d6f2 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_aws_s3.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_aws_s3.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorAwsS3Args', 'DataConnectorAwsS3'] @@ -27,12 +27,47 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] sqs_urls: Specifies a list of AWS SQS urls for the AWS S3 Data Connector. :param pulumi.Input[str] name: The name which should be used for this AWS S3 Data Connector. Changing this forces a new AWS S3 Data Connector to be created. """ - pulumi.set(__self__, "aws_role_arn", aws_role_arn) - pulumi.set(__self__, "destination_table", destination_table) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) - pulumi.set(__self__, "sqs_urls", sqs_urls) + DataConnectorAwsS3Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + aws_role_arn=aws_role_arn, + destination_table=destination_table, + log_analytics_workspace_id=log_analytics_workspace_id, + sqs_urls=sqs_urls, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aws_role_arn: Optional[pulumi.Input[str]] = None, + destination_table: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + sqs_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aws_role_arn is None and 'awsRoleArn' in kwargs: + aws_role_arn = kwargs['awsRoleArn'] + if aws_role_arn is None: + raise TypeError("Missing 'aws_role_arn' argument") + if destination_table is None and 'destinationTable' in kwargs: + destination_table = kwargs['destinationTable'] + if destination_table is None: + raise TypeError("Missing 'destination_table' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if sqs_urls is None and 'sqsUrls' in kwargs: + sqs_urls = kwargs['sqsUrls'] + if sqs_urls is None: + raise TypeError("Missing 'sqs_urls' argument") + + _setter("aws_role_arn", aws_role_arn) + _setter("destination_table", destination_table) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) + _setter("sqs_urls", sqs_urls) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="awsRoleArn") @@ -111,16 +146,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this AWS S3 Data Connector. Changing this forces a new AWS S3 Data Connector to be created. :param pulumi.Input[Sequence[pulumi.Input[str]]] sqs_urls: Specifies a list of AWS SQS urls for the AWS S3 Data Connector. """ + _DataConnectorAwsS3State._configure( + lambda key, value: pulumi.set(__self__, key, value), + aws_role_arn=aws_role_arn, + destination_table=destination_table, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + sqs_urls=sqs_urls, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aws_role_arn: Optional[pulumi.Input[str]] = None, + destination_table: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sqs_urls: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aws_role_arn is None and 'awsRoleArn' in kwargs: + aws_role_arn = kwargs['awsRoleArn'] + if destination_table is None and 'destinationTable' in kwargs: + destination_table = kwargs['destinationTable'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if sqs_urls is None and 'sqsUrls' in kwargs: + sqs_urls = kwargs['sqsUrls'] + if aws_role_arn is not None: - pulumi.set(__self__, "aws_role_arn", aws_role_arn) + _setter("aws_role_arn", aws_role_arn) if destination_table is not None: - pulumi.set(__self__, "destination_table", destination_table) + _setter("destination_table", destination_table) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sqs_urls is not None: - pulumi.set(__self__, "sqs_urls", sqs_urls) + _setter("sqs_urls", sqs_urls) @property @pulumi.getter(name="awsRoleArn") @@ -278,6 +340,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorAwsS3Args._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_azure_active_directory.py b/sdk/python/pulumi_azure/sentinel/data_connector_azure_active_directory.py index a34d813029..9e5f4b5690 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_azure_active_directory.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_azure_active_directory.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorAzureActiveDirectoryArgs', 'DataConnectorAzureActiveDirectory'] @@ -25,11 +25,32 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorAzureActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -84,12 +105,31 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ + _DataConnectorAzureActiveDirectoryState._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -215,6 +255,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorAzureActiveDirectoryArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_azure_advanced_thread_protection.py b/sdk/python/pulumi_azure/sentinel/data_connector_azure_advanced_thread_protection.py index e0acad67af..170a4fbcff 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_azure_advanced_thread_protection.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_azure_advanced_thread_protection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorAzureAdvancedThreadProtectionArgs', 'DataConnectorAzureAdvancedThreadProtection'] @@ -25,11 +25,32 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorAzureAdvancedThreadProtectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -84,12 +105,31 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ + _DataConnectorAzureAdvancedThreadProtectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -219,6 +259,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorAzureAdvancedThreadProtectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_azure_security_center.py b/sdk/python/pulumi_azure/sentinel/data_connector_azure_security_center.py index 0aeff4795d..1615e6ed4f 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_azure_security_center.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_azure_security_center.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorAzureSecurityCenterArgs', 'DataConnectorAzureSecurityCenter'] @@ -23,11 +23,32 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Azure Security Center Data Connector. Changing this forces a new Azure Security Center Data Connector to be created. :param pulumi.Input[str] subscription_id: The ID of the subscription that this Azure Security Center Data Connector connects to. Changing this forces a new Azure Security Center Data Connector to be created. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorAzureSecurityCenterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -78,12 +99,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Azure Security Center Data Connector. Changing this forces a new Azure Security Center Data Connector to be created. :param pulumi.Input[str] subscription_id: The ID of the subscription that this Azure Security Center Data Connector connects to. Changing this forces a new Azure Security Center Data Connector to be created. """ + _DataConnectorAzureSecurityCenterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -205,6 +245,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorAzureSecurityCenterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_dynamics365.py b/sdk/python/pulumi_azure/sentinel/data_connector_dynamics365.py index 440f8a92de..ba0c47e06d 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_dynamics365.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_dynamics365.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorDynamics365Args', 'DataConnectorDynamics365'] @@ -25,11 +25,32 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorDynamics365Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -84,12 +105,31 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ + _DataConnectorDynamics365State._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -215,6 +255,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorDynamics365Args._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_iot.py b/sdk/python/pulumi_azure/sentinel/data_connector_iot.py index e444ba0e73..825e21ef4c 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_iot.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_iot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorIotArgs', 'DataConnectorIot'] @@ -23,11 +23,32 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Iot Data Connector. Changing this forces a new Iot Data Connector to be created. :param pulumi.Input[str] subscription_id: The ID of the subscription that this Iot Data Connector connects to. Changing this forces a new Iot Data Connector to be created. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorIotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -78,12 +99,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Iot Data Connector. Changing this forces a new Iot Data Connector to be created. :param pulumi.Input[str] subscription_id: The ID of the subscription that this Iot Data Connector connects to. Changing this forces a new Iot Data Connector to be created. """ + _DataConnectorIotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -205,6 +245,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorIotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_cloud_app_security.py b/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_cloud_app_security.py index 32e98acb1f..738f68b7dd 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_cloud_app_security.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_cloud_app_security.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorMicrosoftCloudAppSecurityArgs', 'DataConnectorMicrosoftCloudAppSecurity'] @@ -31,15 +31,44 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorMicrosoftCloudAppSecurityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + alerts_enabled=alerts_enabled, + discovery_logs_enabled=discovery_logs_enabled, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + alerts_enabled: Optional[pulumi.Input[bool]] = None, + discovery_logs_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if alerts_enabled is None and 'alertsEnabled' in kwargs: + alerts_enabled = kwargs['alertsEnabled'] + if discovery_logs_enabled is None and 'discoveryLogsEnabled' in kwargs: + discovery_logs_enabled = kwargs['discoveryLogsEnabled'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if alerts_enabled is not None: - pulumi.set(__self__, "alerts_enabled", alerts_enabled) + _setter("alerts_enabled", alerts_enabled) if discovery_logs_enabled is not None: - pulumi.set(__self__, "discovery_logs_enabled", discovery_logs_enabled) + _setter("discovery_logs_enabled", discovery_logs_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -126,16 +155,43 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ + _DataConnectorMicrosoftCloudAppSecurityState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alerts_enabled=alerts_enabled, + discovery_logs_enabled=discovery_logs_enabled, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alerts_enabled: Optional[pulumi.Input[bool]] = None, + discovery_logs_enabled: Optional[pulumi.Input[bool]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alerts_enabled is None and 'alertsEnabled' in kwargs: + alerts_enabled = kwargs['alertsEnabled'] + if discovery_logs_enabled is None and 'discoveryLogsEnabled' in kwargs: + discovery_logs_enabled = kwargs['discoveryLogsEnabled'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if alerts_enabled is not None: - pulumi.set(__self__, "alerts_enabled", alerts_enabled) + _setter("alerts_enabled", alerts_enabled) if discovery_logs_enabled is not None: - pulumi.set(__self__, "discovery_logs_enabled", discovery_logs_enabled) + _setter("discovery_logs_enabled", discovery_logs_enabled) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="alertsEnabled") @@ -297,6 +353,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorMicrosoftCloudAppSecurityArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_defender_advanced_threat_protection.py b/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_defender_advanced_threat_protection.py index 88f55d873f..c7df692f75 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_defender_advanced_threat_protection.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_defender_advanced_threat_protection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorMicrosoftDefenderAdvancedThreatProtectionArgs', 'DataConnectorMicrosoftDefenderAdvancedThreatProtection'] @@ -25,11 +25,32 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorMicrosoftDefenderAdvancedThreatProtectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -84,12 +105,31 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ + _DataConnectorMicrosoftDefenderAdvancedThreatProtectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -215,6 +255,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorMicrosoftDefenderAdvancedThreatProtectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_threat_intelligence.py b/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_threat_intelligence.py index 4e52c9a6b2..d5d5f1c056 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_threat_intelligence.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_threat_intelligence.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorMicrosoftThreatIntelligenceArgs', 'DataConnectorMicrosoftThreatIntelligence'] @@ -35,18 +35,47 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorMicrosoftThreatIntelligenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + bing_safety_phishing_url_lookback_date=bing_safety_phishing_url_lookback_date, + microsoft_emerging_threat_feed_lookback_date=microsoft_emerging_threat_feed_lookback_date, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + bing_safety_phishing_url_lookback_date: Optional[pulumi.Input[str]] = None, + microsoft_emerging_threat_feed_lookback_date: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if bing_safety_phishing_url_lookback_date is None and 'bingSafetyPhishingUrlLookbackDate' in kwargs: + bing_safety_phishing_url_lookback_date = kwargs['bingSafetyPhishingUrlLookbackDate'] + if microsoft_emerging_threat_feed_lookback_date is None and 'microsoftEmergingThreatFeedLookbackDate' in kwargs: + microsoft_emerging_threat_feed_lookback_date = kwargs['microsoftEmergingThreatFeedLookbackDate'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if bing_safety_phishing_url_lookback_date is not None: warnings.warn("""This field is deprecated and will be removed in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""bing_safety_phishing_url_lookback_date is deprecated: This field is deprecated and will be removed in version 4.0 of the AzureRM Provider.""") if bing_safety_phishing_url_lookback_date is not None: - pulumi.set(__self__, "bing_safety_phishing_url_lookback_date", bing_safety_phishing_url_lookback_date) + _setter("bing_safety_phishing_url_lookback_date", bing_safety_phishing_url_lookback_date) if microsoft_emerging_threat_feed_lookback_date is not None: - pulumi.set(__self__, "microsoft_emerging_threat_feed_lookback_date", microsoft_emerging_threat_feed_lookback_date) + _setter("microsoft_emerging_threat_feed_lookback_date", microsoft_emerging_threat_feed_lookback_date) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -144,19 +173,46 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ + _DataConnectorMicrosoftThreatIntelligenceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bing_safety_phishing_url_lookback_date=bing_safety_phishing_url_lookback_date, + log_analytics_workspace_id=log_analytics_workspace_id, + microsoft_emerging_threat_feed_lookback_date=microsoft_emerging_threat_feed_lookback_date, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bing_safety_phishing_url_lookback_date: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + microsoft_emerging_threat_feed_lookback_date: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if bing_safety_phishing_url_lookback_date is None and 'bingSafetyPhishingUrlLookbackDate' in kwargs: + bing_safety_phishing_url_lookback_date = kwargs['bingSafetyPhishingUrlLookbackDate'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if microsoft_emerging_threat_feed_lookback_date is None and 'microsoftEmergingThreatFeedLookbackDate' in kwargs: + microsoft_emerging_threat_feed_lookback_date = kwargs['microsoftEmergingThreatFeedLookbackDate'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if bing_safety_phishing_url_lookback_date is not None: warnings.warn("""This field is deprecated and will be removed in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""bing_safety_phishing_url_lookback_date is deprecated: This field is deprecated and will be removed in version 4.0 of the AzureRM Provider.""") if bing_safety_phishing_url_lookback_date is not None: - pulumi.set(__self__, "bing_safety_phishing_url_lookback_date", bing_safety_phishing_url_lookback_date) + _setter("bing_safety_phishing_url_lookback_date", bing_safety_phishing_url_lookback_date) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if microsoft_emerging_threat_feed_lookback_date is not None: - pulumi.set(__self__, "microsoft_emerging_threat_feed_lookback_date", microsoft_emerging_threat_feed_lookback_date) + _setter("microsoft_emerging_threat_feed_lookback_date", microsoft_emerging_threat_feed_lookback_date) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="bingSafetyPhishingUrlLookbackDate") @@ -329,6 +385,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorMicrosoftThreatIntelligenceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_threat_protection.py b/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_threat_protection.py index 7331a3aae7..2e8d7c4e96 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_threat_protection.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_microsoft_threat_protection.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorMicrosoftThreatProtectionArgs', 'DataConnectorMicrosoftThreatProtection'] @@ -25,11 +25,32 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorMicrosoftThreatProtectionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -84,12 +105,31 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ + _DataConnectorMicrosoftThreatProtectionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -215,6 +255,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorMicrosoftThreatProtectionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_office365.py b/sdk/python/pulumi_azure/sentinel/data_connector_office365.py index 045aed19d8..d95c9274ec 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_office365.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_office365.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorOffice365Args', 'DataConnectorOffice365'] @@ -33,17 +33,50 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorOffice365Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + exchange_enabled=exchange_enabled, + name=name, + sharepoint_enabled=sharepoint_enabled, + teams_enabled=teams_enabled, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + exchange_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + sharepoint_enabled: Optional[pulumi.Input[bool]] = None, + teams_enabled: Optional[pulumi.Input[bool]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if exchange_enabled is None and 'exchangeEnabled' in kwargs: + exchange_enabled = kwargs['exchangeEnabled'] + if sharepoint_enabled is None and 'sharepointEnabled' in kwargs: + sharepoint_enabled = kwargs['sharepointEnabled'] + if teams_enabled is None and 'teamsEnabled' in kwargs: + teams_enabled = kwargs['teamsEnabled'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if exchange_enabled is not None: - pulumi.set(__self__, "exchange_enabled", exchange_enabled) + _setter("exchange_enabled", exchange_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sharepoint_enabled is not None: - pulumi.set(__self__, "sharepoint_enabled", sharepoint_enabled) + _setter("sharepoint_enabled", sharepoint_enabled) if teams_enabled is not None: - pulumi.set(__self__, "teams_enabled", teams_enabled) + _setter("teams_enabled", teams_enabled) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -144,18 +177,49 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ + _DataConnectorOffice365State._configure( + lambda key, value: pulumi.set(__self__, key, value), + exchange_enabled=exchange_enabled, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + sharepoint_enabled=sharepoint_enabled, + teams_enabled=teams_enabled, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + exchange_enabled: Optional[pulumi.Input[bool]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sharepoint_enabled: Optional[pulumi.Input[bool]] = None, + teams_enabled: Optional[pulumi.Input[bool]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if exchange_enabled is None and 'exchangeEnabled' in kwargs: + exchange_enabled = kwargs['exchangeEnabled'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if sharepoint_enabled is None and 'sharepointEnabled' in kwargs: + sharepoint_enabled = kwargs['sharepointEnabled'] + if teams_enabled is None and 'teamsEnabled' in kwargs: + teams_enabled = kwargs['teamsEnabled'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if exchange_enabled is not None: - pulumi.set(__self__, "exchange_enabled", exchange_enabled) + _setter("exchange_enabled", exchange_enabled) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sharepoint_enabled is not None: - pulumi.set(__self__, "sharepoint_enabled", sharepoint_enabled) + _setter("sharepoint_enabled", sharepoint_enabled) if teams_enabled is not None: - pulumi.set(__self__, "teams_enabled", teams_enabled) + _setter("teams_enabled", teams_enabled) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="exchangeEnabled") @@ -327,6 +391,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorOffice365Args._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_office365_project.py b/sdk/python/pulumi_azure/sentinel/data_connector_office365_project.py index bf8d9def04..688a2f0f0a 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_office365_project.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_office365_project.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorOffice365ProjectArgs', 'DataConnectorOffice365Project'] @@ -25,11 +25,32 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorOffice365ProjectArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -84,12 +105,31 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ + _DataConnectorOffice365ProjectState._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -215,6 +255,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorOffice365ProjectArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_office_atp.py b/sdk/python/pulumi_azure/sentinel/data_connector_office_atp.py index 374dadfa14..18f3ff396e 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_office_atp.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_office_atp.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorOfficeAtpArgs', 'DataConnectorOfficeAtp'] @@ -25,11 +25,32 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorOfficeAtpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -84,12 +105,31 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ + _DataConnectorOfficeAtpState._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -215,6 +255,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorOfficeAtpArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_office_irm.py b/sdk/python/pulumi_azure/sentinel/data_connector_office_irm.py index 837c5db7a1..d8405a6e78 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_office_irm.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_office_irm.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorOfficeIrmArgs', 'DataConnectorOfficeIrm'] @@ -25,11 +25,32 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorOfficeIrmArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -84,12 +105,31 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ + _DataConnectorOfficeIrmState._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -215,6 +255,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorOfficeIrmArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_office_power_bi.py b/sdk/python/pulumi_azure/sentinel/data_connector_office_power_bi.py index b288ffe7c7..3dde055356 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_office_power_bi.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_office_power_bi.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorOfficePowerBiArgs', 'DataConnectorOfficePowerBi'] @@ -25,11 +25,32 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorOfficePowerBiArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -84,12 +105,31 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ + _DataConnectorOfficePowerBiState._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -215,6 +255,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorOfficePowerBiArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_threat_intelligence.py b/sdk/python/pulumi_azure/sentinel/data_connector_threat_intelligence.py index 16138d59b6..6d25146711 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_threat_intelligence.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_threat_intelligence.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorThreatIntelligenceArgs', 'DataConnectorThreatIntelligence'] @@ -27,13 +27,38 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorThreatIntelligenceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + lookback_date=lookback_date, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + lookback_date: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if lookback_date is None and 'lookbackDate' in kwargs: + lookback_date = kwargs['lookbackDate'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if lookback_date is not None: - pulumi.set(__self__, "lookback_date", lookback_date) + _setter("lookback_date", lookback_date) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -102,14 +127,37 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. """ + _DataConnectorThreatIntelligenceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_analytics_workspace_id=log_analytics_workspace_id, + lookback_date=lookback_date, + name=name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + lookback_date: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if lookback_date is None and 'lookbackDate' in kwargs: + lookback_date = kwargs['lookbackDate'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if lookback_date is not None: - pulumi.set(__self__, "lookback_date", lookback_date) + _setter("lookback_date", lookback_date) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logAnalyticsWorkspaceId") @@ -249,6 +297,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorThreatIntelligenceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/data_connector_threat_intelligence_taxii.py b/sdk/python/pulumi_azure/sentinel/data_connector_threat_intelligence_taxii.py index a7e70793ea..8d5642a4d6 100644 --- a/sdk/python/pulumi_azure/sentinel/data_connector_threat_intelligence_taxii.py +++ b/sdk/python/pulumi_azure/sentinel/data_connector_threat_intelligence_taxii.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DataConnectorThreatIntelligenceTaxiiArgs', 'DataConnectorThreatIntelligenceTaxii'] @@ -39,22 +39,75 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. :param pulumi.Input[str] user_name: The user name for the TAXII server. """ - pulumi.set(__self__, "api_root_url", api_root_url) - pulumi.set(__self__, "collection_id", collection_id) - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + DataConnectorThreatIntelligenceTaxiiArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_root_url=api_root_url, + collection_id=collection_id, + display_name=display_name, + log_analytics_workspace_id=log_analytics_workspace_id, + lookback_date=lookback_date, + name=name, + password=password, + polling_frequency=polling_frequency, + tenant_id=tenant_id, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_root_url: Optional[pulumi.Input[str]] = None, + collection_id: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + lookback_date: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + polling_frequency: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + user_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_root_url is None and 'apiRootUrl' in kwargs: + api_root_url = kwargs['apiRootUrl'] + if api_root_url is None: + raise TypeError("Missing 'api_root_url' argument") + if collection_id is None and 'collectionId' in kwargs: + collection_id = kwargs['collectionId'] + if collection_id is None: + raise TypeError("Missing 'collection_id' argument") + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if lookback_date is None and 'lookbackDate' in kwargs: + lookback_date = kwargs['lookbackDate'] + if polling_frequency is None and 'pollingFrequency' in kwargs: + polling_frequency = kwargs['pollingFrequency'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + + _setter("api_root_url", api_root_url) + _setter("collection_id", collection_id) + _setter("display_name", display_name) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if lookback_date is not None: - pulumi.set(__self__, "lookback_date", lookback_date) + _setter("lookback_date", lookback_date) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if polling_frequency is not None: - pulumi.set(__self__, "polling_frequency", polling_frequency) + _setter("polling_frequency", polling_frequency) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if user_name is not None: - pulumi.set(__self__, "user_name", user_name) + _setter("user_name", user_name) @property @pulumi.getter(name="apiRootUrl") @@ -207,26 +260,71 @@ def __init__(__self__, *, > **NOTE** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. :param pulumi.Input[str] user_name: The user name for the TAXII server. """ + _DataConnectorThreatIntelligenceTaxiiState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_root_url=api_root_url, + collection_id=collection_id, + display_name=display_name, + log_analytics_workspace_id=log_analytics_workspace_id, + lookback_date=lookback_date, + name=name, + password=password, + polling_frequency=polling_frequency, + tenant_id=tenant_id, + user_name=user_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_root_url: Optional[pulumi.Input[str]] = None, + collection_id: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + lookback_date: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + polling_frequency: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + user_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_root_url is None and 'apiRootUrl' in kwargs: + api_root_url = kwargs['apiRootUrl'] + if collection_id is None and 'collectionId' in kwargs: + collection_id = kwargs['collectionId'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if lookback_date is None and 'lookbackDate' in kwargs: + lookback_date = kwargs['lookbackDate'] + if polling_frequency is None and 'pollingFrequency' in kwargs: + polling_frequency = kwargs['pollingFrequency'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if user_name is None and 'userName' in kwargs: + user_name = kwargs['userName'] + if api_root_url is not None: - pulumi.set(__self__, "api_root_url", api_root_url) + _setter("api_root_url", api_root_url) if collection_id is not None: - pulumi.set(__self__, "collection_id", collection_id) + _setter("collection_id", collection_id) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if lookback_date is not None: - pulumi.set(__self__, "lookback_date", lookback_date) + _setter("lookback_date", lookback_date) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if polling_frequency is not None: - pulumi.set(__self__, "polling_frequency", polling_frequency) + _setter("polling_frequency", polling_frequency) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) if user_name is not None: - pulumi.set(__self__, "user_name", user_name) + _setter("user_name", user_name) @property @pulumi.getter(name="apiRootUrl") @@ -458,6 +556,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataConnectorThreatIntelligenceTaxiiArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/get_alert_rule.py b/sdk/python/pulumi_azure/sentinel/get_alert_rule.py index 222c956f82..f197ee5d41 100644 --- a/sdk/python/pulumi_azure/sentinel/get_alert_rule.py +++ b/sdk/python/pulumi_azure/sentinel/get_alert_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/sentinel/get_alert_rule_anomaly.py b/sdk/python/pulumi_azure/sentinel/get_alert_rule_anomaly.py index e92d89bf24..cc8c438fbd 100644 --- a/sdk/python/pulumi_azure/sentinel/get_alert_rule_anomaly.py +++ b/sdk/python/pulumi_azure/sentinel/get_alert_rule_anomaly.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/sentinel/get_alert_rule_template.py b/sdk/python/pulumi_azure/sentinel/get_alert_rule_template.py index 44d6eeb254..7f1142071f 100644 --- a/sdk/python/pulumi_azure/sentinel/get_alert_rule_template.py +++ b/sdk/python/pulumi_azure/sentinel/get_alert_rule_template.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/sentinel/log_analytics_workspace_onboarding.py b/sdk/python/pulumi_azure/sentinel/log_analytics_workspace_onboarding.py index af7c000b42..62b8a9beb7 100644 --- a/sdk/python/pulumi_azure/sentinel/log_analytics_workspace_onboarding.py +++ b/sdk/python/pulumi_azure/sentinel/log_analytics_workspace_onboarding.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['LogAnalyticsWorkspaceOnboardingArgs', 'LogAnalyticsWorkspaceOnboarding'] @@ -28,20 +28,45 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group where the Security Insights Sentinel Onboarding States should exist. Changing this forces the Log Analytics Workspace off the board and onboard again. :param pulumi.Input[str] workspace_name: Specifies the Workspace Name. Changing this forces the Log Analytics Workspace off the board and onboard again. Changing this forces a new resource to be created. """ + LogAnalyticsWorkspaceOnboardingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + customer_managed_key_enabled=customer_managed_key_enabled, + resource_group_name=resource_group_name, + workspace_id=workspace_id, + workspace_name=workspace_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + customer_managed_key_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + workspace_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if customer_managed_key_enabled is None and 'customerManagedKeyEnabled' in kwargs: + customer_managed_key_enabled = kwargs['customerManagedKeyEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_name is None and 'workspaceName' in kwargs: + workspace_name = kwargs['workspaceName'] + if customer_managed_key_enabled is not None: - pulumi.set(__self__, "customer_managed_key_enabled", customer_managed_key_enabled) + _setter("customer_managed_key_enabled", customer_managed_key_enabled) if resource_group_name is not None: warnings.warn("""this property has been deprecated in favour of `workspace_id`""", DeprecationWarning) pulumi.log.warn("""resource_group_name is deprecated: this property has been deprecated in favour of `workspace_id`""") if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) if workspace_name is not None: warnings.warn("""this property will be removed in favour of `workspace_id` in version 4.0 of the AzureRM Provider""", DeprecationWarning) pulumi.log.warn("""workspace_name is deprecated: this property will be removed in favour of `workspace_id` in version 4.0 of the AzureRM Provider""") if workspace_name is not None: - pulumi.set(__self__, "workspace_name", workspace_name) + _setter("workspace_name", workspace_name) @property @pulumi.getter(name="customerManagedKeyEnabled") @@ -116,20 +141,45 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group where the Security Insights Sentinel Onboarding States should exist. Changing this forces the Log Analytics Workspace off the board and onboard again. :param pulumi.Input[str] workspace_name: Specifies the Workspace Name. Changing this forces the Log Analytics Workspace off the board and onboard again. Changing this forces a new resource to be created. """ + _LogAnalyticsWorkspaceOnboardingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + customer_managed_key_enabled=customer_managed_key_enabled, + resource_group_name=resource_group_name, + workspace_id=workspace_id, + workspace_name=workspace_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + customer_managed_key_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + workspace_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if customer_managed_key_enabled is None and 'customerManagedKeyEnabled' in kwargs: + customer_managed_key_enabled = kwargs['customerManagedKeyEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_name is None and 'workspaceName' in kwargs: + workspace_name = kwargs['workspaceName'] + if customer_managed_key_enabled is not None: - pulumi.set(__self__, "customer_managed_key_enabled", customer_managed_key_enabled) + _setter("customer_managed_key_enabled", customer_managed_key_enabled) if resource_group_name is not None: warnings.warn("""this property has been deprecated in favour of `workspace_id`""", DeprecationWarning) pulumi.log.warn("""resource_group_name is deprecated: this property has been deprecated in favour of `workspace_id`""") if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) if workspace_name is not None: warnings.warn("""this property will be removed in favour of `workspace_id` in version 4.0 of the AzureRM Provider""", DeprecationWarning) pulumi.log.warn("""workspace_name is deprecated: this property will be removed in favour of `workspace_id` in version 4.0 of the AzureRM Provider""") if workspace_name is not None: - pulumi.set(__self__, "workspace_name", workspace_name) + _setter("workspace_name", workspace_name) @property @pulumi.getter(name="customerManagedKeyEnabled") @@ -279,6 +329,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LogAnalyticsWorkspaceOnboardingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/metadata.py b/sdk/python/pulumi_azure/sentinel/metadata.py index 43e2488d30..dce6912eca 100644 --- a/sdk/python/pulumi_azure/sentinel/metadata.py +++ b/sdk/python/pulumi_azure/sentinel/metadata.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,44 +59,127 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] threat_analysis_techniques: Specifies a list of techniques the resource covers. :param pulumi.Input[str] version: Version of the content. """ - pulumi.set(__self__, "content_id", content_id) - pulumi.set(__self__, "kind", kind) - pulumi.set(__self__, "parent_id", parent_id) - pulumi.set(__self__, "workspace_id", workspace_id) + MetadataArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_id=content_id, + kind=kind, + parent_id=parent_id, + workspace_id=workspace_id, + author=author, + category=category, + content_schema_version=content_schema_version, + custom_version=custom_version, + dependency=dependency, + first_publish_date=first_publish_date, + icon_id=icon_id, + last_publish_date=last_publish_date, + name=name, + preview_images=preview_images, + preview_images_darks=preview_images_darks, + providers=providers, + source=source, + support=support, + threat_analysis_tactics=threat_analysis_tactics, + threat_analysis_techniques=threat_analysis_techniques, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + parent_id: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + author: Optional[pulumi.Input['MetadataAuthorArgs']] = None, + category: Optional[pulumi.Input['MetadataCategoryArgs']] = None, + content_schema_version: Optional[pulumi.Input[str]] = None, + custom_version: Optional[pulumi.Input[str]] = None, + dependency: Optional[pulumi.Input[str]] = None, + first_publish_date: Optional[pulumi.Input[str]] = None, + icon_id: Optional[pulumi.Input[str]] = None, + last_publish_date: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + preview_images: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + preview_images_darks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + providers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source: Optional[pulumi.Input['MetadataSourceArgs']] = None, + support: Optional[pulumi.Input['MetadataSupportArgs']] = None, + threat_analysis_tactics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + threat_analysis_techniques: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_id is None and 'contentId' in kwargs: + content_id = kwargs['contentId'] + if content_id is None: + raise TypeError("Missing 'content_id' argument") + if kind is None: + raise TypeError("Missing 'kind' argument") + if parent_id is None and 'parentId' in kwargs: + parent_id = kwargs['parentId'] + if parent_id is None: + raise TypeError("Missing 'parent_id' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if content_schema_version is None and 'contentSchemaVersion' in kwargs: + content_schema_version = kwargs['contentSchemaVersion'] + if custom_version is None and 'customVersion' in kwargs: + custom_version = kwargs['customVersion'] + if first_publish_date is None and 'firstPublishDate' in kwargs: + first_publish_date = kwargs['firstPublishDate'] + if icon_id is None and 'iconId' in kwargs: + icon_id = kwargs['iconId'] + if last_publish_date is None and 'lastPublishDate' in kwargs: + last_publish_date = kwargs['lastPublishDate'] + if preview_images is None and 'previewImages' in kwargs: + preview_images = kwargs['previewImages'] + if preview_images_darks is None and 'previewImagesDarks' in kwargs: + preview_images_darks = kwargs['previewImagesDarks'] + if threat_analysis_tactics is None and 'threatAnalysisTactics' in kwargs: + threat_analysis_tactics = kwargs['threatAnalysisTactics'] + if threat_analysis_techniques is None and 'threatAnalysisTechniques' in kwargs: + threat_analysis_techniques = kwargs['threatAnalysisTechniques'] + + _setter("content_id", content_id) + _setter("kind", kind) + _setter("parent_id", parent_id) + _setter("workspace_id", workspace_id) if author is not None: - pulumi.set(__self__, "author", author) + _setter("author", author) if category is not None: - pulumi.set(__self__, "category", category) + _setter("category", category) if content_schema_version is not None: - pulumi.set(__self__, "content_schema_version", content_schema_version) + _setter("content_schema_version", content_schema_version) if custom_version is not None: - pulumi.set(__self__, "custom_version", custom_version) + _setter("custom_version", custom_version) if dependency is not None: - pulumi.set(__self__, "dependency", dependency) + _setter("dependency", dependency) if first_publish_date is not None: - pulumi.set(__self__, "first_publish_date", first_publish_date) + _setter("first_publish_date", first_publish_date) if icon_id is not None: - pulumi.set(__self__, "icon_id", icon_id) + _setter("icon_id", icon_id) if last_publish_date is not None: - pulumi.set(__self__, "last_publish_date", last_publish_date) + _setter("last_publish_date", last_publish_date) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if preview_images is not None: - pulumi.set(__self__, "preview_images", preview_images) + _setter("preview_images", preview_images) if preview_images_darks is not None: - pulumi.set(__self__, "preview_images_darks", preview_images_darks) + _setter("preview_images_darks", preview_images_darks) if providers is not None: - pulumi.set(__self__, "providers", providers) + _setter("providers", providers) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) if support is not None: - pulumi.set(__self__, "support", support) + _setter("support", support) if threat_analysis_tactics is not None: - pulumi.set(__self__, "threat_analysis_tactics", threat_analysis_tactics) + _setter("threat_analysis_tactics", threat_analysis_tactics) if threat_analysis_techniques is not None: - pulumi.set(__self__, "threat_analysis_techniques", threat_analysis_techniques) + _setter("threat_analysis_techniques", threat_analysis_techniques) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="contentId") @@ -391,48 +474,123 @@ def __init__(__self__, *, :param pulumi.Input[str] version: Version of the content. :param pulumi.Input[str] workspace_id: The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Metadata to be created. """ + _MetadataState._configure( + lambda key, value: pulumi.set(__self__, key, value), + author=author, + category=category, + content_id=content_id, + content_schema_version=content_schema_version, + custom_version=custom_version, + dependency=dependency, + first_publish_date=first_publish_date, + icon_id=icon_id, + kind=kind, + last_publish_date=last_publish_date, + name=name, + parent_id=parent_id, + preview_images=preview_images, + preview_images_darks=preview_images_darks, + providers=providers, + source=source, + support=support, + threat_analysis_tactics=threat_analysis_tactics, + threat_analysis_techniques=threat_analysis_techniques, + version=version, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + author: Optional[pulumi.Input['MetadataAuthorArgs']] = None, + category: Optional[pulumi.Input['MetadataCategoryArgs']] = None, + content_id: Optional[pulumi.Input[str]] = None, + content_schema_version: Optional[pulumi.Input[str]] = None, + custom_version: Optional[pulumi.Input[str]] = None, + dependency: Optional[pulumi.Input[str]] = None, + first_publish_date: Optional[pulumi.Input[str]] = None, + icon_id: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + last_publish_date: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + parent_id: Optional[pulumi.Input[str]] = None, + preview_images: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + preview_images_darks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + providers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + source: Optional[pulumi.Input['MetadataSourceArgs']] = None, + support: Optional[pulumi.Input['MetadataSupportArgs']] = None, + threat_analysis_tactics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + threat_analysis_techniques: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_id is None and 'contentId' in kwargs: + content_id = kwargs['contentId'] + if content_schema_version is None and 'contentSchemaVersion' in kwargs: + content_schema_version = kwargs['contentSchemaVersion'] + if custom_version is None and 'customVersion' in kwargs: + custom_version = kwargs['customVersion'] + if first_publish_date is None and 'firstPublishDate' in kwargs: + first_publish_date = kwargs['firstPublishDate'] + if icon_id is None and 'iconId' in kwargs: + icon_id = kwargs['iconId'] + if last_publish_date is None and 'lastPublishDate' in kwargs: + last_publish_date = kwargs['lastPublishDate'] + if parent_id is None and 'parentId' in kwargs: + parent_id = kwargs['parentId'] + if preview_images is None and 'previewImages' in kwargs: + preview_images = kwargs['previewImages'] + if preview_images_darks is None and 'previewImagesDarks' in kwargs: + preview_images_darks = kwargs['previewImagesDarks'] + if threat_analysis_tactics is None and 'threatAnalysisTactics' in kwargs: + threat_analysis_tactics = kwargs['threatAnalysisTactics'] + if threat_analysis_techniques is None and 'threatAnalysisTechniques' in kwargs: + threat_analysis_techniques = kwargs['threatAnalysisTechniques'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if author is not None: - pulumi.set(__self__, "author", author) + _setter("author", author) if category is not None: - pulumi.set(__self__, "category", category) + _setter("category", category) if content_id is not None: - pulumi.set(__self__, "content_id", content_id) + _setter("content_id", content_id) if content_schema_version is not None: - pulumi.set(__self__, "content_schema_version", content_schema_version) + _setter("content_schema_version", content_schema_version) if custom_version is not None: - pulumi.set(__self__, "custom_version", custom_version) + _setter("custom_version", custom_version) if dependency is not None: - pulumi.set(__self__, "dependency", dependency) + _setter("dependency", dependency) if first_publish_date is not None: - pulumi.set(__self__, "first_publish_date", first_publish_date) + _setter("first_publish_date", first_publish_date) if icon_id is not None: - pulumi.set(__self__, "icon_id", icon_id) + _setter("icon_id", icon_id) if kind is not None: - pulumi.set(__self__, "kind", kind) + _setter("kind", kind) if last_publish_date is not None: - pulumi.set(__self__, "last_publish_date", last_publish_date) + _setter("last_publish_date", last_publish_date) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parent_id is not None: - pulumi.set(__self__, "parent_id", parent_id) + _setter("parent_id", parent_id) if preview_images is not None: - pulumi.set(__self__, "preview_images", preview_images) + _setter("preview_images", preview_images) if preview_images_darks is not None: - pulumi.set(__self__, "preview_images_darks", preview_images_darks) + _setter("preview_images_darks", preview_images_darks) if providers is not None: - pulumi.set(__self__, "providers", providers) + _setter("providers", providers) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) if support is not None: - pulumi.set(__self__, "support", support) + _setter("support", support) if threat_analysis_tactics is not None: - pulumi.set(__self__, "threat_analysis_tactics", threat_analysis_tactics) + _setter("threat_analysis_tactics", threat_analysis_tactics) if threat_analysis_techniques is not None: - pulumi.set(__self__, "threat_analysis_techniques", threat_analysis_techniques) + _setter("threat_analysis_techniques", threat_analysis_techniques) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter @@ -842,6 +1000,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MetadataArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -877,7 +1039,17 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = MetadataArgs.__new__(MetadataArgs) + if author is not None and not isinstance(author, MetadataAuthorArgs): + author = author or {} + def _setter(key, value): + author[key] = value + MetadataAuthorArgs._configure(_setter, **author) __props__.__dict__["author"] = author + if category is not None and not isinstance(category, MetadataCategoryArgs): + category = category or {} + def _setter(key, value): + category[key] = value + MetadataCategoryArgs._configure(_setter, **category) __props__.__dict__["category"] = category if content_id is None and not opts.urn: raise TypeError("Missing required property 'content_id'") @@ -898,7 +1070,17 @@ def _internal_init(__self__, __props__.__dict__["preview_images"] = preview_images __props__.__dict__["preview_images_darks"] = preview_images_darks __props__.__dict__["providers"] = providers + if source is not None and not isinstance(source, MetadataSourceArgs): + source = source or {} + def _setter(key, value): + source[key] = value + MetadataSourceArgs._configure(_setter, **source) __props__.__dict__["source"] = source + if support is not None and not isinstance(support, MetadataSupportArgs): + support = support or {} + def _setter(key, value): + support[key] = value + MetadataSupportArgs._configure(_setter, **support) __props__.__dict__["support"] = support __props__.__dict__["threat_analysis_tactics"] = threat_analysis_tactics __props__.__dict__["threat_analysis_techniques"] = threat_analysis_techniques diff --git a/sdk/python/pulumi_azure/sentinel/outputs.py b/sdk/python/pulumi_azure/sentinel/outputs.py index 75f4027059..6ab6d621ae 100644 --- a/sdk/python/pulumi_azure/sentinel/outputs.py +++ b/sdk/python/pulumi_azure/sentinel/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -94,14 +94,33 @@ def __init__(__self__, *, :param Sequence[str] supported_values: A list of supported values of the single select observation. :param Sequence[str] values: A list of values of the single select observation. """ + AlertRuleAnomalyBuiltInMultiSelectObservation._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + name=name, + supported_values=supported_values, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + name: Optional[str] = None, + supported_values: Optional[Sequence[str]] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if supported_values is None and 'supportedValues' in kwargs: + supported_values = kwargs['supportedValues'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if supported_values is not None: - pulumi.set(__self__, "supported_values", supported_values) + _setter("supported_values", supported_values) if values is not None: - pulumi.set(__self__, "values", values) + _setter("values", values) @property @pulumi.getter @@ -149,14 +168,31 @@ def __init__(__self__, *, :param str name: The Name of the built-in Anomaly Alert Rule. Changing this forces a new Built-in Anomaly Alert Rule to be created. :param str prioritize: The prioritized value per `description`. """ + AlertRuleAnomalyBuiltInPrioritizedExcludeObservation._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + exclude=exclude, + name=name, + prioritize=prioritize, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + exclude: Optional[str] = None, + name: Optional[str] = None, + prioritize: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if exclude is not None: - pulumi.set(__self__, "exclude", exclude) + _setter("exclude", exclude) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if prioritize is not None: - pulumi.set(__self__, "prioritize", prioritize) + _setter("prioritize", prioritize) @property @pulumi.getter @@ -219,10 +255,27 @@ def __init__(__self__, *, :param str connector_id: The ID of the required Data Connector. :param Sequence[str] data_types: A list of data types of the required Data Connector. """ + AlertRuleAnomalyBuiltInRequiredDataConnector._configure( + lambda key, value: pulumi.set(__self__, key, value), + connector_id=connector_id, + data_types=data_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connector_id: Optional[str] = None, + data_types: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connector_id is None and 'connectorId' in kwargs: + connector_id = kwargs['connectorId'] + if data_types is None and 'dataTypes' in kwargs: + data_types = kwargs['dataTypes'] + if connector_id is not None: - pulumi.set(__self__, "connector_id", connector_id) + _setter("connector_id", connector_id) if data_types is not None: - pulumi.set(__self__, "data_types", data_types) + _setter("data_types", data_types) @property @pulumi.getter(name="connectorId") @@ -271,14 +324,33 @@ def __init__(__self__, *, :param Sequence[str] supported_values: A list of supported values of the single select observation. :param str value: The value of the threshold observation. """ + AlertRuleAnomalyBuiltInSingleSelectObservation._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + name=name, + supported_values=supported_values, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + name: Optional[str] = None, + supported_values: Optional[Sequence[str]] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if supported_values is None and 'supportedValues' in kwargs: + supported_values = kwargs['supportedValues'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if supported_values is not None: - pulumi.set(__self__, "supported_values", supported_values) + _setter("supported_values", supported_values) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -328,16 +400,35 @@ def __init__(__self__, *, :param str name: The Name of the built-in Anomaly Alert Rule. Changing this forces a new Built-in Anomaly Alert Rule to be created. :param str value: The value of the threshold observation. """ + AlertRuleAnomalyBuiltInThresholdObservation._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + max=max, + min=min, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + max: Optional[str] = None, + min: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if max is not None: - pulumi.set(__self__, "max", max) + _setter("max", max) if min is not None: - pulumi.set(__self__, "min", min) + _setter("min", min) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) @property @pulumi.getter @@ -410,12 +501,35 @@ def __init__(__self__, *, :param str description: The description of the multi select observation. :param Sequence[str] supported_values: A list of supported values of the multi select observation. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "values", values) + AlertRuleAnomalyDuplicateMultiSelectObservation._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + values=values, + description=description, + supported_values=supported_values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + values: Optional[Sequence[str]] = None, + description: Optional[str] = None, + supported_values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if values is None: + raise TypeError("Missing 'values' argument") + if supported_values is None and 'supportedValues' in kwargs: + supported_values = kwargs['supportedValues'] + + _setter("name", name) + _setter("values", values) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if supported_values is not None: - pulumi.set(__self__, "supported_values", supported_values) + _setter("supported_values", supported_values) @property @pulumi.getter @@ -463,13 +577,32 @@ def __init__(__self__, *, :param str exclude: The excluded value per `description`. :param str prioritize: The prioritized value per `description`. """ - pulumi.set(__self__, "name", name) + AlertRuleAnomalyDuplicatePrioritizedExcludeObservation._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + description=description, + exclude=exclude, + prioritize=prioritize, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + description: Optional[str] = None, + exclude: Optional[str] = None, + prioritize: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if exclude is not None: - pulumi.set(__self__, "exclude", exclude) + _setter("exclude", exclude) if prioritize is not None: - pulumi.set(__self__, "prioritize", prioritize) + _setter("prioritize", prioritize) @property @pulumi.getter @@ -532,10 +665,27 @@ def __init__(__self__, *, :param str connector_id: The ID of the required Data Connector. :param Sequence[str] data_types: A list of data types of the required Data Connector. """ + AlertRuleAnomalyDuplicateRequiredDataConnector._configure( + lambda key, value: pulumi.set(__self__, key, value), + connector_id=connector_id, + data_types=data_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connector_id: Optional[str] = None, + data_types: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connector_id is None and 'connectorId' in kwargs: + connector_id = kwargs['connectorId'] + if data_types is None and 'dataTypes' in kwargs: + data_types = kwargs['dataTypes'] + if connector_id is not None: - pulumi.set(__self__, "connector_id", connector_id) + _setter("connector_id", connector_id) if data_types is not None: - pulumi.set(__self__, "data_types", data_types) + _setter("data_types", data_types) @property @pulumi.getter(name="connectorId") @@ -584,12 +734,35 @@ def __init__(__self__, *, :param str description: The description of the single select observation. :param Sequence[str] supported_values: A list of supported values of the single select observation. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AlertRuleAnomalyDuplicateSingleSelectObservation._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + description=description, + supported_values=supported_values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + description: Optional[str] = None, + supported_values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + if supported_values is None and 'supportedValues' in kwargs: + supported_values = kwargs['supportedValues'] + + _setter("name", name) + _setter("value", value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if supported_values is not None: - pulumi.set(__self__, "supported_values", supported_values) + _setter("supported_values", supported_values) @property @pulumi.getter @@ -639,14 +812,37 @@ def __init__(__self__, *, :param str max: The max value of the threshold observation. :param str min: The min value of the threshold observation. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AlertRuleAnomalyDuplicateThresholdObservation._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + description=description, + max=max, + min=min, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + description: Optional[str] = None, + max: Optional[str] = None, + min: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if max is not None: - pulumi.set(__self__, "max", max) + _setter("max", max) if min is not None: - pulumi.set(__self__, "min", min) + _setter("min", min) @property @pulumi.getter @@ -717,11 +913,30 @@ def __init__(__self__, *, :param bool enabled: Whether this source signal is enabled or disabled in Fusion detection? Defaults to `true`. :param Sequence['AlertRuleFusionSourceSubTypeArgs'] sub_types: One or more `sub_type` blocks as defined below. """ - pulumi.set(__self__, "name", name) + AlertRuleFusionSource._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + enabled=enabled, + sub_types=sub_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + enabled: Optional[bool] = None, + sub_types: Optional[Sequence['outputs.AlertRuleFusionSourceSubType']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if sub_types is None and 'subTypes' in kwargs: + sub_types = kwargs['subTypes'] + + _setter("name", name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if sub_types is not None: - pulumi.set(__self__, "sub_types", sub_types) + _setter("sub_types", sub_types) @property @pulumi.getter @@ -776,10 +991,31 @@ def __init__(__self__, *, :param Sequence[str] severities_alloweds: A list of severities that are enabled for this source subtype consumed in Fusion detection. Possible values for each element are `High`, `Medium`, `Low`, `Informational`. :param bool enabled: Whether this source subtype under source signal is enabled or disabled in Fusion detection. Defaults to `true`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "severities_alloweds", severities_alloweds) + AlertRuleFusionSourceSubType._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + severities_alloweds=severities_alloweds, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + severities_alloweds: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if severities_alloweds is None and 'severitiesAlloweds' in kwargs: + severities_alloweds = kwargs['severitiesAlloweds'] + if severities_alloweds is None: + raise TypeError("Missing 'severities_alloweds' argument") + + _setter("name", name) + _setter("severities_alloweds", severities_alloweds) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -846,16 +1082,45 @@ def __init__(__self__, *, :param str severity_column_name: The column name to take the alert severity from. :param str tactics_column_name: The column name to take the alert tactics from. """ + AlertRuleNrtAlertDetailsOverride._configure( + lambda key, value: pulumi.set(__self__, key, value), + description_format=description_format, + display_name_format=display_name_format, + dynamic_properties=dynamic_properties, + severity_column_name=severity_column_name, + tactics_column_name=tactics_column_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description_format: Optional[str] = None, + display_name_format: Optional[str] = None, + dynamic_properties: Optional[Sequence['outputs.AlertRuleNrtAlertDetailsOverrideDynamicProperty']] = None, + severity_column_name: Optional[str] = None, + tactics_column_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description_format is None and 'descriptionFormat' in kwargs: + description_format = kwargs['descriptionFormat'] + if display_name_format is None and 'displayNameFormat' in kwargs: + display_name_format = kwargs['displayNameFormat'] + if dynamic_properties is None and 'dynamicProperties' in kwargs: + dynamic_properties = kwargs['dynamicProperties'] + if severity_column_name is None and 'severityColumnName' in kwargs: + severity_column_name = kwargs['severityColumnName'] + if tactics_column_name is None and 'tacticsColumnName' in kwargs: + tactics_column_name = kwargs['tacticsColumnName'] + if description_format is not None: - pulumi.set(__self__, "description_format", description_format) + _setter("description_format", description_format) if display_name_format is not None: - pulumi.set(__self__, "display_name_format", display_name_format) + _setter("display_name_format", display_name_format) if dynamic_properties is not None: - pulumi.set(__self__, "dynamic_properties", dynamic_properties) + _setter("dynamic_properties", dynamic_properties) if severity_column_name is not None: - pulumi.set(__self__, "severity_column_name", severity_column_name) + _setter("severity_column_name", severity_column_name) if tactics_column_name is not None: - pulumi.set(__self__, "tactics_column_name", tactics_column_name) + _setter("tactics_column_name", tactics_column_name) @property @pulumi.getter(name="descriptionFormat") @@ -907,8 +1172,25 @@ def __init__(__self__, *, :param str name: The name of the dynamic property. Possible Values are `AlertLink`, `ConfidenceLevel`, `ConfidenceScore`, `ExtendedLinks`, `ProductComponentName`, `ProductName`, `ProviderName`, `RemediationSteps` and `Techniques`. :param str value: The value of the dynamic property. Pssible Values are `Caller`, `dcount_ResourceId` and `EventSubmissionTimestamp`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AlertRuleNrtAlertDetailsOverrideDynamicProperty._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -955,8 +1237,29 @@ def __init__(__self__, *, :param str entity_type: The type of the entity. Possible values are `Account`, `AzureResource`, `CloudApplication`, `DNS`, `File`, `FileHash`, `Host`, `IP`, `Mailbox`, `MailCluster`, `MailMessage`, `Malware`, `Process`, `RegistryKey`, `RegistryValue`, `SecurityGroup`, `SubmissionMail`, `URL`. :param Sequence['AlertRuleNrtEntityMappingFieldMappingArgs'] field_mappings: A list of `field_mapping` blocks as defined below. """ - pulumi.set(__self__, "entity_type", entity_type) - pulumi.set(__self__, "field_mappings", field_mappings) + AlertRuleNrtEntityMapping._configure( + lambda key, value: pulumi.set(__self__, key, value), + entity_type=entity_type, + field_mappings=field_mappings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + entity_type: Optional[str] = None, + field_mappings: Optional[Sequence['outputs.AlertRuleNrtEntityMappingFieldMapping']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if entity_type is None and 'entityType' in kwargs: + entity_type = kwargs['entityType'] + if entity_type is None: + raise TypeError("Missing 'entity_type' argument") + if field_mappings is None and 'fieldMappings' in kwargs: + field_mappings = kwargs['fieldMappings'] + if field_mappings is None: + raise TypeError("Missing 'field_mappings' argument") + + _setter("entity_type", entity_type) + _setter("field_mappings", field_mappings) @property @pulumi.getter(name="entityType") @@ -1001,8 +1304,27 @@ def __init__(__self__, *, :param str column_name: The column name to be mapped to the identifier. :param str identifier: The identifier of the entity. """ - pulumi.set(__self__, "column_name", column_name) - pulumi.set(__self__, "identifier", identifier) + AlertRuleNrtEntityMappingFieldMapping._configure( + lambda key, value: pulumi.set(__self__, key, value), + column_name=column_name, + identifier=identifier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + column_name: Optional[str] = None, + identifier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if column_name is None and 'columnName' in kwargs: + column_name = kwargs['columnName'] + if column_name is None: + raise TypeError("Missing 'column_name' argument") + if identifier is None: + raise TypeError("Missing 'identifier' argument") + + _setter("column_name", column_name) + _setter("identifier", identifier) @property @pulumi.getter(name="columnName") @@ -1045,7 +1367,22 @@ def __init__(__self__, *, """ :param str aggregation_method: The aggregation type of grouping the events. Possible values are `AlertPerResult` and `SingleAlert`. """ - pulumi.set(__self__, "aggregation_method", aggregation_method) + AlertRuleNrtEventGrouping._configure( + lambda key, value: pulumi.set(__self__, key, value), + aggregation_method=aggregation_method, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aggregation_method: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aggregation_method is None and 'aggregationMethod' in kwargs: + aggregation_method = kwargs['aggregationMethod'] + if aggregation_method is None: + raise TypeError("Missing 'aggregation_method' argument") + + _setter("aggregation_method", aggregation_method) @property @pulumi.getter(name="aggregationMethod") @@ -1082,8 +1419,27 @@ def __init__(__self__, *, :param bool create_incident_enabled: Whether to create an incident from alerts triggered by this Sentinel NRT Alert Rule? :param 'AlertRuleNrtIncidentGroupingArgs' grouping: A `grouping` block as defined below. """ - pulumi.set(__self__, "create_incident_enabled", create_incident_enabled) - pulumi.set(__self__, "grouping", grouping) + AlertRuleNrtIncident._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_incident_enabled=create_incident_enabled, + grouping=grouping, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_incident_enabled: Optional[bool] = None, + grouping: Optional['outputs.AlertRuleNrtIncidentGrouping'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_incident_enabled is None and 'createIncidentEnabled' in kwargs: + create_incident_enabled = kwargs['createIncidentEnabled'] + if create_incident_enabled is None: + raise TypeError("Missing 'create_incident_enabled' argument") + if grouping is None: + raise TypeError("Missing 'grouping' argument") + + _setter("create_incident_enabled", create_incident_enabled) + _setter("grouping", grouping) @property @pulumi.getter(name="createIncidentEnabled") @@ -1148,20 +1504,55 @@ def __init__(__self__, *, :param str lookback_duration: Limit the group to alerts created within the lookback duration (in ISO 8601 duration format). Defaults to `PT5M`. :param bool reopen_closed_incidents: Whether to re-open closed matching incidents? Defaults to `false`. """ + AlertRuleNrtIncidentGrouping._configure( + lambda key, value: pulumi.set(__self__, key, value), + by_alert_details=by_alert_details, + by_custom_details=by_custom_details, + by_entities=by_entities, + enabled=enabled, + entity_matching_method=entity_matching_method, + lookback_duration=lookback_duration, + reopen_closed_incidents=reopen_closed_incidents, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + by_alert_details: Optional[Sequence[str]] = None, + by_custom_details: Optional[Sequence[str]] = None, + by_entities: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + entity_matching_method: Optional[str] = None, + lookback_duration: Optional[str] = None, + reopen_closed_incidents: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if by_alert_details is None and 'byAlertDetails' in kwargs: + by_alert_details = kwargs['byAlertDetails'] + if by_custom_details is None and 'byCustomDetails' in kwargs: + by_custom_details = kwargs['byCustomDetails'] + if by_entities is None and 'byEntities' in kwargs: + by_entities = kwargs['byEntities'] + if entity_matching_method is None and 'entityMatchingMethod' in kwargs: + entity_matching_method = kwargs['entityMatchingMethod'] + if lookback_duration is None and 'lookbackDuration' in kwargs: + lookback_duration = kwargs['lookbackDuration'] + if reopen_closed_incidents is None and 'reopenClosedIncidents' in kwargs: + reopen_closed_incidents = kwargs['reopenClosedIncidents'] + if by_alert_details is not None: - pulumi.set(__self__, "by_alert_details", by_alert_details) + _setter("by_alert_details", by_alert_details) if by_custom_details is not None: - pulumi.set(__self__, "by_custom_details", by_custom_details) + _setter("by_custom_details", by_custom_details) if by_entities is not None: - pulumi.set(__self__, "by_entities", by_entities) + _setter("by_entities", by_entities) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if entity_matching_method is not None: - pulumi.set(__self__, "entity_matching_method", entity_matching_method) + _setter("entity_matching_method", entity_matching_method) if lookback_duration is not None: - pulumi.set(__self__, "lookback_duration", lookback_duration) + _setter("lookback_duration", lookback_duration) if reopen_closed_incidents is not None: - pulumi.set(__self__, "reopen_closed_incidents", reopen_closed_incidents) + _setter("reopen_closed_incidents", reopen_closed_incidents) @property @pulumi.getter(name="byAlertDetails") @@ -1244,7 +1635,22 @@ def __init__(__self__, *, """ :param str column_name: The column name to be mapped to the identifier. """ - pulumi.set(__self__, "column_name", column_name) + AlertRuleNrtSentinelEntityMapping._configure( + lambda key, value: pulumi.set(__self__, key, value), + column_name=column_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + column_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if column_name is None and 'columnName' in kwargs: + column_name = kwargs['columnName'] + if column_name is None: + raise TypeError("Missing 'column_name' argument") + + _setter("column_name", column_name) @property @pulumi.getter(name="columnName") @@ -1295,16 +1701,45 @@ def __init__(__self__, *, :param str severity_column_name: The column name to take the alert severity from. :param str tactics_column_name: The column name to take the alert tactics from. """ + AlertRuleScheduledAlertDetailsOverride._configure( + lambda key, value: pulumi.set(__self__, key, value), + description_format=description_format, + display_name_format=display_name_format, + dynamic_properties=dynamic_properties, + severity_column_name=severity_column_name, + tactics_column_name=tactics_column_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description_format: Optional[str] = None, + display_name_format: Optional[str] = None, + dynamic_properties: Optional[Sequence['outputs.AlertRuleScheduledAlertDetailsOverrideDynamicProperty']] = None, + severity_column_name: Optional[str] = None, + tactics_column_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description_format is None and 'descriptionFormat' in kwargs: + description_format = kwargs['descriptionFormat'] + if display_name_format is None and 'displayNameFormat' in kwargs: + display_name_format = kwargs['displayNameFormat'] + if dynamic_properties is None and 'dynamicProperties' in kwargs: + dynamic_properties = kwargs['dynamicProperties'] + if severity_column_name is None and 'severityColumnName' in kwargs: + severity_column_name = kwargs['severityColumnName'] + if tactics_column_name is None and 'tacticsColumnName' in kwargs: + tactics_column_name = kwargs['tacticsColumnName'] + if description_format is not None: - pulumi.set(__self__, "description_format", description_format) + _setter("description_format", description_format) if display_name_format is not None: - pulumi.set(__self__, "display_name_format", display_name_format) + _setter("display_name_format", display_name_format) if dynamic_properties is not None: - pulumi.set(__self__, "dynamic_properties", dynamic_properties) + _setter("dynamic_properties", dynamic_properties) if severity_column_name is not None: - pulumi.set(__self__, "severity_column_name", severity_column_name) + _setter("severity_column_name", severity_column_name) if tactics_column_name is not None: - pulumi.set(__self__, "tactics_column_name", tactics_column_name) + _setter("tactics_column_name", tactics_column_name) @property @pulumi.getter(name="descriptionFormat") @@ -1356,8 +1791,25 @@ def __init__(__self__, *, :param str name: The name of the dynamic property. Possible Values are `AlertLink`, `ConfidenceLevel`, `ConfidenceScore`, `ExtendedLinks`, `ProductComponentName`, `ProductName`, `ProviderName`, `RemediationSteps` and `Techniques`. :param str value: The value of the dynamic property. Pssible Values are `Caller`, `dcount_ResourceId` and `EventSubmissionTimestamp`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + AlertRuleScheduledAlertDetailsOverrideDynamicProperty._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -1404,8 +1856,29 @@ def __init__(__self__, *, :param str entity_type: The type of the entity. Possible values are `Account`, `AzureResource`, `CloudApplication`, `DNS`, `File`, `FileHash`, `Host`, `IP`, `Mailbox`, `MailCluster`, `MailMessage`, `Malware`, `Process`, `RegistryKey`, `RegistryValue`, `SecurityGroup`, `SubmissionMail`, `URL`. :param Sequence['AlertRuleScheduledEntityMappingFieldMappingArgs'] field_mappings: A list of `field_mapping` blocks as defined below. """ - pulumi.set(__self__, "entity_type", entity_type) - pulumi.set(__self__, "field_mappings", field_mappings) + AlertRuleScheduledEntityMapping._configure( + lambda key, value: pulumi.set(__self__, key, value), + entity_type=entity_type, + field_mappings=field_mappings, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + entity_type: Optional[str] = None, + field_mappings: Optional[Sequence['outputs.AlertRuleScheduledEntityMappingFieldMapping']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if entity_type is None and 'entityType' in kwargs: + entity_type = kwargs['entityType'] + if entity_type is None: + raise TypeError("Missing 'entity_type' argument") + if field_mappings is None and 'fieldMappings' in kwargs: + field_mappings = kwargs['fieldMappings'] + if field_mappings is None: + raise TypeError("Missing 'field_mappings' argument") + + _setter("entity_type", entity_type) + _setter("field_mappings", field_mappings) @property @pulumi.getter(name="entityType") @@ -1450,8 +1923,27 @@ def __init__(__self__, *, :param str column_name: The column name to be mapped to the identifier. :param str identifier: The identifier of the entity. """ - pulumi.set(__self__, "column_name", column_name) - pulumi.set(__self__, "identifier", identifier) + AlertRuleScheduledEntityMappingFieldMapping._configure( + lambda key, value: pulumi.set(__self__, key, value), + column_name=column_name, + identifier=identifier, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + column_name: Optional[str] = None, + identifier: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if column_name is None and 'columnName' in kwargs: + column_name = kwargs['columnName'] + if column_name is None: + raise TypeError("Missing 'column_name' argument") + if identifier is None: + raise TypeError("Missing 'identifier' argument") + + _setter("column_name", column_name) + _setter("identifier", identifier) @property @pulumi.getter(name="columnName") @@ -1494,7 +1986,22 @@ def __init__(__self__, *, """ :param str aggregation_method: The aggregation type of grouping the events. Possible values are `AlertPerResult` and `SingleAlert`. """ - pulumi.set(__self__, "aggregation_method", aggregation_method) + AlertRuleScheduledEventGrouping._configure( + lambda key, value: pulumi.set(__self__, key, value), + aggregation_method=aggregation_method, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aggregation_method: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aggregation_method is None and 'aggregationMethod' in kwargs: + aggregation_method = kwargs['aggregationMethod'] + if aggregation_method is None: + raise TypeError("Missing 'aggregation_method' argument") + + _setter("aggregation_method", aggregation_method) @property @pulumi.getter(name="aggregationMethod") @@ -1531,8 +2038,27 @@ def __init__(__self__, *, :param bool create_incident: Whether to create an incident from alerts triggered by this Sentinel Scheduled Alert Rule? :param 'AlertRuleScheduledIncidentConfigurationGroupingArgs' grouping: A `grouping` block as defined below. """ - pulumi.set(__self__, "create_incident", create_incident) - pulumi.set(__self__, "grouping", grouping) + AlertRuleScheduledIncidentConfiguration._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_incident=create_incident, + grouping=grouping, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_incident: Optional[bool] = None, + grouping: Optional['outputs.AlertRuleScheduledIncidentConfigurationGrouping'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_incident is None and 'createIncident' in kwargs: + create_incident = kwargs['createIncident'] + if create_incident is None: + raise TypeError("Missing 'create_incident' argument") + if grouping is None: + raise TypeError("Missing 'grouping' argument") + + _setter("create_incident", create_incident) + _setter("grouping", grouping) @property @pulumi.getter(name="createIncident") @@ -1597,20 +2123,55 @@ def __init__(__self__, *, :param str lookback_duration: Limit the group to alerts created within the lookback duration (in ISO 8601 duration format). Defaults to `PT5M`. :param bool reopen_closed_incidents: Whether to re-open closed matching incidents? Defaults to `false`. """ + AlertRuleScheduledIncidentConfigurationGrouping._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + entity_matching_method=entity_matching_method, + group_by_alert_details=group_by_alert_details, + group_by_custom_details=group_by_custom_details, + group_by_entities=group_by_entities, + lookback_duration=lookback_duration, + reopen_closed_incidents=reopen_closed_incidents, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + entity_matching_method: Optional[str] = None, + group_by_alert_details: Optional[Sequence[str]] = None, + group_by_custom_details: Optional[Sequence[str]] = None, + group_by_entities: Optional[Sequence[str]] = None, + lookback_duration: Optional[str] = None, + reopen_closed_incidents: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if entity_matching_method is None and 'entityMatchingMethod' in kwargs: + entity_matching_method = kwargs['entityMatchingMethod'] + if group_by_alert_details is None and 'groupByAlertDetails' in kwargs: + group_by_alert_details = kwargs['groupByAlertDetails'] + if group_by_custom_details is None and 'groupByCustomDetails' in kwargs: + group_by_custom_details = kwargs['groupByCustomDetails'] + if group_by_entities is None and 'groupByEntities' in kwargs: + group_by_entities = kwargs['groupByEntities'] + if lookback_duration is None and 'lookbackDuration' in kwargs: + lookback_duration = kwargs['lookbackDuration'] + if reopen_closed_incidents is None and 'reopenClosedIncidents' in kwargs: + reopen_closed_incidents = kwargs['reopenClosedIncidents'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if entity_matching_method is not None: - pulumi.set(__self__, "entity_matching_method", entity_matching_method) + _setter("entity_matching_method", entity_matching_method) if group_by_alert_details is not None: - pulumi.set(__self__, "group_by_alert_details", group_by_alert_details) + _setter("group_by_alert_details", group_by_alert_details) if group_by_custom_details is not None: - pulumi.set(__self__, "group_by_custom_details", group_by_custom_details) + _setter("group_by_custom_details", group_by_custom_details) if group_by_entities is not None: - pulumi.set(__self__, "group_by_entities", group_by_entities) + _setter("group_by_entities", group_by_entities) if lookback_duration is not None: - pulumi.set(__self__, "lookback_duration", lookback_duration) + _setter("lookback_duration", lookback_duration) if reopen_closed_incidents is not None: - pulumi.set(__self__, "reopen_closed_incidents", reopen_closed_incidents) + _setter("reopen_closed_incidents", reopen_closed_incidents) @property @pulumi.getter @@ -1693,7 +2254,22 @@ def __init__(__self__, *, """ :param str column_name: The column name to be mapped to the identifier. """ - pulumi.set(__self__, "column_name", column_name) + AlertRuleScheduledSentinelEntityMapping._configure( + lambda key, value: pulumi.set(__self__, key, value), + column_name=column_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + column_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if column_name is None and 'columnName' in kwargs: + column_name = kwargs['columnName'] + if column_name is None: + raise TypeError("Missing 'column_name' argument") + + _setter("column_name", column_name) @property @pulumi.getter(name="columnName") @@ -1748,19 +2324,48 @@ def __init__(__self__, *, > **Note:**: At least one of `status`, `labels`, `owner_id` and `severity` has to be set. :param str status: The status to set to the incident. Possible values are: `Active`, `Closed`, `New`. """ - pulumi.set(__self__, "order", order) + AuthomationRuleActionIncident._configure( + lambda key, value: pulumi.set(__self__, key, value), + order=order, + classification=classification, + classification_comment=classification_comment, + labels=labels, + owner_id=owner_id, + severity=severity, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + order: Optional[int] = None, + classification: Optional[str] = None, + classification_comment: Optional[str] = None, + labels: Optional[Sequence[str]] = None, + owner_id: Optional[str] = None, + severity: Optional[str] = None, + status: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if order is None: + raise TypeError("Missing 'order' argument") + if classification_comment is None and 'classificationComment' in kwargs: + classification_comment = kwargs['classificationComment'] + if owner_id is None and 'ownerId' in kwargs: + owner_id = kwargs['ownerId'] + + _setter("order", order) if classification is not None: - pulumi.set(__self__, "classification", classification) + _setter("classification", classification) if classification_comment is not None: - pulumi.set(__self__, "classification_comment", classification_comment) + _setter("classification_comment", classification_comment) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if owner_id is not None: - pulumi.set(__self__, "owner_id", owner_id) + _setter("owner_id", owner_id) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) @property @pulumi.getter @@ -1855,10 +2460,33 @@ def __init__(__self__, *, :param int order: The execution order of this action. :param str tenant_id: The ID of the Tenant that owns the playbook. """ - pulumi.set(__self__, "logic_app_id", logic_app_id) - pulumi.set(__self__, "order", order) + AuthomationRuleActionPlaybook._configure( + lambda key, value: pulumi.set(__self__, key, value), + logic_app_id=logic_app_id, + order=order, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + logic_app_id: Optional[str] = None, + order: Optional[int] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if logic_app_id is None: + raise TypeError("Missing 'logic_app_id' argument") + if order is None: + raise TypeError("Missing 'order' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("logic_app_id", logic_app_id) + _setter("order", order) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logicAppId") @@ -1896,9 +2524,30 @@ def __init__(__self__, *, :param str property: The property to use for evaluate the condition. Possible values include: `AccountAadTenantId`, `AccountAadUserId`, `AccountNTDomain`, `AccountName`, `AccountObjectGuid`, `AccountPUID`, `AccountSid`, `AccountUPNSuffix`, `AzureResourceResourceId`, `AzureResourceSubscriptionId`, `CloudApplicationAppId`, `CloudApplicationAppName`, `DNSDomainName`, `FileDirectory`, `FileHashValue`, `FileName`, `HostAzureID`, `HostNTDomain`, `HostName`, `HostNetBiosName`, `HostOSVersion`, `IPAddress`, `IncidentDescription`, `IncidentProviderName`, `IncidentRelatedAnalyticRuleIds`, `IncidentSeverity`, `IncidentStatus`, `IncidentTactics`, `IncidentTitle`, `IoTDeviceId`, `IoTDeviceModel`, `IoTDeviceName`, `IoTDeviceOperatingSystem`, `IoTDeviceType`, `IoTDeviceVendor`, `MailMessageDeliveryAction`, `MailMessageDeliveryLocation`, `MailMessageP1Sender`, `MailMessageP2Sender`, `MailMessageRecipient`, `MailMessageSenderIP`, `MailMessageSubject`, `MailboxDisplayName`, `MailboxPrimaryAddress`, `MailboxUPN`, `MalwareCategory`, `MalwareName`, `ProcessCommandLine`, `ProcessId`, `RegistryKey`, `RegistryValueData`, `Url`. :param Sequence[str] values: Specifies a list of values to use for evaluate the condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "property", property) - pulumi.set(__self__, "values", values) + AuthomationRuleCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + property=property, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + property: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if property is None: + raise TypeError("Missing 'property' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("property", property) + _setter("values", values) @property @pulumi.getter @@ -1969,19 +2618,48 @@ def __init__(__self__, *, > **Note:**: At least one of `status`, `labels`, `owner_id` and `severity` has to be set. :param str status: The status to set to the incident. Possible values are: `Active`, `Closed`, `New`. """ - pulumi.set(__self__, "order", order) + AutomationRuleActionIncident._configure( + lambda key, value: pulumi.set(__self__, key, value), + order=order, + classification=classification, + classification_comment=classification_comment, + labels=labels, + owner_id=owner_id, + severity=severity, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + order: Optional[int] = None, + classification: Optional[str] = None, + classification_comment: Optional[str] = None, + labels: Optional[Sequence[str]] = None, + owner_id: Optional[str] = None, + severity: Optional[str] = None, + status: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if order is None: + raise TypeError("Missing 'order' argument") + if classification_comment is None and 'classificationComment' in kwargs: + classification_comment = kwargs['classificationComment'] + if owner_id is None and 'ownerId' in kwargs: + owner_id = kwargs['ownerId'] + + _setter("order", order) if classification is not None: - pulumi.set(__self__, "classification", classification) + _setter("classification", classification) if classification_comment is not None: - pulumi.set(__self__, "classification_comment", classification_comment) + _setter("classification_comment", classification_comment) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if owner_id is not None: - pulumi.set(__self__, "owner_id", owner_id) + _setter("owner_id", owner_id) if severity is not None: - pulumi.set(__self__, "severity", severity) + _setter("severity", severity) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) @property @pulumi.getter @@ -2076,10 +2754,33 @@ def __init__(__self__, *, :param int order: The execution order of this action. :param str tenant_id: The ID of the Tenant that owns the playbook. """ - pulumi.set(__self__, "logic_app_id", logic_app_id) - pulumi.set(__self__, "order", order) + AutomationRuleActionPlaybook._configure( + lambda key, value: pulumi.set(__self__, key, value), + logic_app_id=logic_app_id, + order=order, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + logic_app_id: Optional[str] = None, + order: Optional[int] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if logic_app_id is None and 'logicAppId' in kwargs: + logic_app_id = kwargs['logicAppId'] + if logic_app_id is None: + raise TypeError("Missing 'logic_app_id' argument") + if order is None: + raise TypeError("Missing 'order' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("logic_app_id", logic_app_id) + _setter("order", order) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="logicAppId") @@ -2117,9 +2818,30 @@ def __init__(__self__, *, :param str property: The property to use for evaluate the condition. Possible values include: `AccountAadTenantId`, `AccountAadUserId`, `AccountNTDomain`, `AccountName`, `AccountObjectGuid`, `AccountPUID`, `AccountSid`, `AccountUPNSuffix`, `AzureResourceResourceId`, `AzureResourceSubscriptionId`, `CloudApplicationAppId`, `CloudApplicationAppName`, `DNSDomainName`, `FileDirectory`, `FileHashValue`, `FileName`, `HostAzureID`, `HostNTDomain`, `HostName`, `HostNetBiosName`, `HostOSVersion`, `IPAddress`, `IncidentDescription`, `IncidentProviderName`, `IncidentRelatedAnalyticRuleIds`, `IncidentSeverity`, `IncidentStatus`, `IncidentTactics`, `IncidentTitle`, `IoTDeviceId`, `IoTDeviceModel`, `IoTDeviceName`, `IoTDeviceOperatingSystem`, `IoTDeviceType`, `IoTDeviceVendor`, `MailMessageDeliveryAction`, `MailMessageDeliveryLocation`, `MailMessageP1Sender`, `MailMessageP2Sender`, `MailMessageRecipient`, `MailMessageSenderIP`, `MailMessageSubject`, `MailboxDisplayName`, `MailboxPrimaryAddress`, `MailboxUPN`, `MalwareCategory`, `MalwareName`, `ProcessCommandLine`, `ProcessId`, `RegistryKey`, `RegistryValueData`, `Url`. :param Sequence[str] values: Specifies a list of values to use for evaluate the condition. """ - pulumi.set(__self__, "operator", operator) - pulumi.set(__self__, "property", property) - pulumi.set(__self__, "values", values) + AutomationRuleCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + operator=operator, + property=property, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + operator: Optional[str] = None, + property: Optional[str] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if operator is None: + raise TypeError("Missing 'operator' argument") + if property is None: + raise TypeError("Missing 'property' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("operator", operator) + _setter("property", property) + _setter("values", values) @property @pulumi.getter @@ -2157,12 +2879,27 @@ def __init__(__self__, *, :param str link: The link for author/vendor page. :param str name: The name of the author, company or person. """ + MetadataAuthor._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + link=link, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[str] = None, + link: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if link is not None: - pulumi.set(__self__, "link", link) + _setter("link", link) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -2198,10 +2935,23 @@ def __init__(__self__, *, :param Sequence[str] domains: Specifies a list of domains for the solution content item. :param Sequence[str] verticals: Specifies a list of industry verticals for the solution content item. """ + MetadataCategory._configure( + lambda key, value: pulumi.set(__self__, key, value), + domains=domains, + verticals=verticals, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domains: Optional[Sequence[str]] = None, + verticals: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domains is not None: - pulumi.set(__self__, "domains", domains) + _setter("domains", domains) if verticals is not None: - pulumi.set(__self__, "verticals", verticals) + _setter("verticals", verticals) @property @pulumi.getter @@ -2231,11 +2981,28 @@ def __init__(__self__, *, :param str id: The id of the content source, the solution ID, Log Analytics Workspace name etc. :param str name: The name of the content source, repo name, solution name, Log Analytics Workspace name, etc. """ - pulumi.set(__self__, "kind", kind) + MetadataSource._configure( + lambda key, value: pulumi.set(__self__, key, value), + kind=kind, + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + kind: Optional[str] = None, + id: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if kind is None: + raise TypeError("Missing 'kind' argument") + + _setter("kind", kind) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -2275,13 +3042,32 @@ def __init__(__self__, *, :param str link: The link for support help. :param str name: The name of the support contact. """ - pulumi.set(__self__, "tier", tier) + MetadataSupport._configure( + lambda key, value: pulumi.set(__self__, key, value), + tier=tier, + email=email, + link=link, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tier: Optional[str] = None, + email: Optional[str] = None, + link: Optional[str] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tier is None: + raise TypeError("Missing 'tier' argument") + + _setter("tier", tier) if email is not None: - pulumi.set(__self__, "email", email) + _setter("email", email) if link is not None: - pulumi.set(__self__, "link", link) + _setter("link", link) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -2348,16 +3134,37 @@ def __init__(__self__, *, :param str source_name: The source name of the external reference of the Threat Intelligence Indicator. :param str url: The url of the external reference of the Threat Intelligence Indicator. """ + ThreatIntelligenceIndicatorExternalReference._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + hashes=hashes, + id=id, + source_name=source_name, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + hashes: Optional[Mapping[str, str]] = None, + id: Optional[str] = None, + source_name: Optional[str] = None, + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if source_name is None and 'sourceName' in kwargs: + source_name = kwargs['sourceName'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if hashes is not None: - pulumi.set(__self__, "hashes", hashes) + _setter("hashes", hashes) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if source_name is not None: - pulumi.set(__self__, "source_name", source_name) + _setter("source_name", source_name) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter @@ -2428,12 +3235,29 @@ def __init__(__self__, *, :param str marking_ref: The reference of the granular marking of the Threat Intelligence Indicator. :param Sequence[str] selectors: A list of selectors of the granular marking of the Threat Intelligence Indicator. """ + ThreatIntelligenceIndicatorGranularMarking._configure( + lambda key, value: pulumi.set(__self__, key, value), + language=language, + marking_ref=marking_ref, + selectors=selectors, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + language: Optional[str] = None, + marking_ref: Optional[str] = None, + selectors: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if marking_ref is None and 'markingRef' in kwargs: + marking_ref = kwargs['markingRef'] + if language is not None: - pulumi.set(__self__, "language", language) + _setter("language", language) if marking_ref is not None: - pulumi.set(__self__, "marking_ref", marking_ref) + _setter("marking_ref", marking_ref) if selectors is not None: - pulumi.set(__self__, "selectors", selectors) + _setter("selectors", selectors) @property @pulumi.getter @@ -2467,8 +3291,19 @@ def __init__(__self__, *, """ :param str name: The name which should be used for the Lockheed Martin cyber kill chain phase. """ + ThreatIntelligenceIndicatorKillChainPhase._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -2507,10 +3342,27 @@ def __init__(__self__, *, :param str pattern_type_key: The type key of parsed pattern. :param Sequence['ThreatIntelligenceIndicatorParsedPatternPatternTypeValueArgs'] pattern_type_values: A `pattern_type_values` block as defined below. """ + ThreatIntelligenceIndicatorParsedPattern._configure( + lambda key, value: pulumi.set(__self__, key, value), + pattern_type_key=pattern_type_key, + pattern_type_values=pattern_type_values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + pattern_type_key: Optional[str] = None, + pattern_type_values: Optional[Sequence['outputs.ThreatIntelligenceIndicatorParsedPatternPatternTypeValue']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if pattern_type_key is None and 'patternTypeKey' in kwargs: + pattern_type_key = kwargs['patternTypeKey'] + if pattern_type_values is None and 'patternTypeValues' in kwargs: + pattern_type_values = kwargs['patternTypeValues'] + if pattern_type_key is not None: - pulumi.set(__self__, "pattern_type_key", pattern_type_key) + _setter("pattern_type_key", pattern_type_key) if pattern_type_values is not None: - pulumi.set(__self__, "pattern_type_values", pattern_type_values) + _setter("pattern_type_values", pattern_type_values) @property @pulumi.getter(name="patternTypeKey") @@ -2555,10 +3407,25 @@ def __init__(__self__, *, :param str value: The value of the parsed pattern type. :param str value_type: The type of the value of the parsed pattern type value. """ + ThreatIntelligenceIndicatorParsedPatternPatternTypeValue._configure( + lambda key, value: pulumi.set(__self__, key, value), + value=value, + value_type=value_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + value: Optional[str] = None, + value_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if value_type is None and 'valueType' in kwargs: + value_type = kwargs['valueType'] + if value is not None: - pulumi.set(__self__, "value", value) + _setter("value", value) if value_type is not None: - pulumi.set(__self__, "value_type", value_type) + _setter("value_type", value_type) @property @pulumi.getter @@ -2590,10 +3457,37 @@ def __init__(__self__, *, :param Sequence[str] supported_values: A list of supported values of the single select observation. :param Sequence[str] values: A list of values of the single select observation. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "supported_values", supported_values) - pulumi.set(__self__, "values", values) + GetAlertRuleAnomalyMultiSelectObservationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + name=name, + supported_values=supported_values, + values=values, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + name: Optional[str] = None, + supported_values: Optional[Sequence[str]] = None, + values: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if supported_values is None and 'supportedValues' in kwargs: + supported_values = kwargs['supportedValues'] + if supported_values is None: + raise TypeError("Missing 'supported_values' argument") + if values is None: + raise TypeError("Missing 'values' argument") + + _setter("description", description) + _setter("name", name) + _setter("supported_values", supported_values) + _setter("values", values) @property @pulumi.getter @@ -2641,10 +3535,35 @@ def __init__(__self__, *, :param str name: The guid of this Sentinel Alert Rule Template. Either `display_name` or `name` have to be specified. :param str prioritize: The prioritized value per `description`. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "exclude", exclude) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "prioritize", prioritize) + GetAlertRuleAnomalyPrioritizedExcludeObservationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + exclude=exclude, + name=name, + prioritize=prioritize, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + exclude: Optional[str] = None, + name: Optional[str] = None, + prioritize: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if exclude is None: + raise TypeError("Missing 'exclude' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if prioritize is None: + raise TypeError("Missing 'prioritize' argument") + + _setter("description", description) + _setter("exclude", exclude) + _setter("name", name) + _setter("prioritize", prioritize) @property @pulumi.getter @@ -2688,8 +3607,29 @@ def __init__(__self__, *, :param str connector_id: The ID of the required Data Connector. :param Sequence[str] data_types: A list of data types of the required Data Connector. """ - pulumi.set(__self__, "connector_id", connector_id) - pulumi.set(__self__, "data_types", data_types) + GetAlertRuleAnomalyRequiredDataConnectorResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + connector_id=connector_id, + data_types=data_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connector_id: Optional[str] = None, + data_types: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connector_id is None and 'connectorId' in kwargs: + connector_id = kwargs['connectorId'] + if connector_id is None: + raise TypeError("Missing 'connector_id' argument") + if data_types is None and 'dataTypes' in kwargs: + data_types = kwargs['dataTypes'] + if data_types is None: + raise TypeError("Missing 'data_types' argument") + + _setter("connector_id", connector_id) + _setter("data_types", data_types) @property @pulumi.getter(name="connectorId") @@ -2721,10 +3661,37 @@ def __init__(__self__, *, :param Sequence[str] supported_values: A list of supported values of the single select observation. :param str value: The value of the threshold observation. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "supported_values", supported_values) - pulumi.set(__self__, "value", value) + GetAlertRuleAnomalySingleSelectObservationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + name=name, + supported_values=supported_values, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + name: Optional[str] = None, + supported_values: Optional[Sequence[str]] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if supported_values is None and 'supportedValues' in kwargs: + supported_values = kwargs['supportedValues'] + if supported_values is None: + raise TypeError("Missing 'supported_values' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("description", description) + _setter("name", name) + _setter("supported_values", supported_values) + _setter("value", value) @property @pulumi.getter @@ -2774,11 +3741,40 @@ def __init__(__self__, *, :param str name: The guid of this Sentinel Alert Rule Template. Either `display_name` or `name` have to be specified. :param str value: The value of the threshold observation. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "max", max) - pulumi.set(__self__, "min", min) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + GetAlertRuleAnomalyThresholdObservationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + max=max, + min=min, + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + max: Optional[str] = None, + min: Optional[str] = None, + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if max is None: + raise TypeError("Missing 'max' argument") + if min is None: + raise TypeError("Missing 'min' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("description", description) + _setter("max", max) + _setter("min", min) + _setter("name", name) + _setter("value", value) @property @pulumi.getter @@ -2834,10 +3830,35 @@ def __init__(__self__, *, :param str severity: The alert severity of this Sentinel Scheduled Alert Rule Template. :param Sequence[str] tactics: A list of categories of attacks by which to classify the rule. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "query", query) - pulumi.set(__self__, "severity", severity) - pulumi.set(__self__, "tactics", tactics) + GetAlertRuleTemplateNrtTemplateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + query=query, + severity=severity, + tactics=tactics, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + query: Optional[str] = None, + severity: Optional[str] = None, + tactics: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if query is None: + raise TypeError("Missing 'query' argument") + if severity is None: + raise TypeError("Missing 'severity' argument") + if tactics is None: + raise TypeError("Missing 'tactics' argument") + + _setter("description", description) + _setter("query", query) + _setter("severity", severity) + _setter("tactics", tactics) @property @pulumi.getter @@ -2893,14 +3914,63 @@ def __init__(__self__, *, :param str trigger_operator: The alert trigger operator, combined with `trigger_threshold`, setting alert threshold of this Sentinel Scheduled Alert Rule Template. :param int trigger_threshold: The baseline number of query results generated, combined with `trigger_operator`, setting alert threshold of this Sentinel Scheduled Alert Rule Template. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "query", query) - pulumi.set(__self__, "query_frequency", query_frequency) - pulumi.set(__self__, "query_period", query_period) - pulumi.set(__self__, "severity", severity) - pulumi.set(__self__, "tactics", tactics) - pulumi.set(__self__, "trigger_operator", trigger_operator) - pulumi.set(__self__, "trigger_threshold", trigger_threshold) + GetAlertRuleTemplateScheduledTemplateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + query=query, + query_frequency=query_frequency, + query_period=query_period, + severity=severity, + tactics=tactics, + trigger_operator=trigger_operator, + trigger_threshold=trigger_threshold, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + query: Optional[str] = None, + query_frequency: Optional[str] = None, + query_period: Optional[str] = None, + severity: Optional[str] = None, + tactics: Optional[Sequence[str]] = None, + trigger_operator: Optional[str] = None, + trigger_threshold: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if query is None: + raise TypeError("Missing 'query' argument") + if query_frequency is None and 'queryFrequency' in kwargs: + query_frequency = kwargs['queryFrequency'] + if query_frequency is None: + raise TypeError("Missing 'query_frequency' argument") + if query_period is None and 'queryPeriod' in kwargs: + query_period = kwargs['queryPeriod'] + if query_period is None: + raise TypeError("Missing 'query_period' argument") + if severity is None: + raise TypeError("Missing 'severity' argument") + if tactics is None: + raise TypeError("Missing 'tactics' argument") + if trigger_operator is None and 'triggerOperator' in kwargs: + trigger_operator = kwargs['triggerOperator'] + if trigger_operator is None: + raise TypeError("Missing 'trigger_operator' argument") + if trigger_threshold is None and 'triggerThreshold' in kwargs: + trigger_threshold = kwargs['triggerThreshold'] + if trigger_threshold is None: + raise TypeError("Missing 'trigger_threshold' argument") + + _setter("description", description) + _setter("query", query) + _setter("query_frequency", query_frequency) + _setter("query_period", query_period) + _setter("severity", severity) + _setter("tactics", tactics) + _setter("trigger_operator", trigger_operator) + _setter("trigger_threshold", trigger_threshold) @property @pulumi.getter @@ -2976,8 +4046,27 @@ def __init__(__self__, *, :param str description: The description of this Sentinel Scheduled Alert Rule Template. :param str product_filter: The Microsoft Security Service from where the alert will be generated. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "product_filter", product_filter) + GetAlertRuleTemplateSecurityIncidentTemplateResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + product_filter=product_filter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + product_filter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if product_filter is None and 'productFilter' in kwargs: + product_filter = kwargs['productFilter'] + if product_filter is None: + raise TypeError("Missing 'product_filter' argument") + + _setter("description", description) + _setter("product_filter", product_filter) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/sentinel/threat_intelligence_indicator.py b/sdk/python/pulumi_azure/sentinel/threat_intelligence_indicator.py index 363f4b80f0..a209dd5a3d 100644 --- a/sdk/python/pulumi_azure/sentinel/threat_intelligence_indicator.py +++ b/sdk/python/pulumi_azure/sentinel/threat_intelligence_indicator.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,40 +59,125 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] threat_types: Specifies a list of threat types of this Threat Intelligence Indicator. :param pulumi.Input[str] validate_until_utc: The end of validate date of the Threat Intelligence Indicator in RFC3339 format. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "pattern", pattern) - pulumi.set(__self__, "pattern_type", pattern_type) - pulumi.set(__self__, "source", source) - pulumi.set(__self__, "validate_from_utc", validate_from_utc) - pulumi.set(__self__, "workspace_id", workspace_id) + ThreatIntelligenceIndicatorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + pattern=pattern, + pattern_type=pattern_type, + source=source, + validate_from_utc=validate_from_utc, + workspace_id=workspace_id, + confidence=confidence, + created_by=created_by, + description=description, + extension=extension, + external_references=external_references, + granular_markings=granular_markings, + kill_chain_phases=kill_chain_phases, + language=language, + object_marking_refs=object_marking_refs, + pattern_version=pattern_version, + revoked=revoked, + tags=tags, + threat_types=threat_types, + validate_until_utc=validate_until_utc, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + pattern: Optional[pulumi.Input[str]] = None, + pattern_type: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input[str]] = None, + validate_from_utc: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + confidence: Optional[pulumi.Input[int]] = None, + created_by: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + extension: Optional[pulumi.Input[str]] = None, + external_references: Optional[pulumi.Input[Sequence[pulumi.Input['ThreatIntelligenceIndicatorExternalReferenceArgs']]]] = None, + granular_markings: Optional[pulumi.Input[Sequence[pulumi.Input['ThreatIntelligenceIndicatorGranularMarkingArgs']]]] = None, + kill_chain_phases: Optional[pulumi.Input[Sequence[pulumi.Input['ThreatIntelligenceIndicatorKillChainPhaseArgs']]]] = None, + language: Optional[pulumi.Input[str]] = None, + object_marking_refs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + pattern_version: Optional[pulumi.Input[str]] = None, + revoked: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + threat_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + validate_until_utc: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if pattern is None: + raise TypeError("Missing 'pattern' argument") + if pattern_type is None and 'patternType' in kwargs: + pattern_type = kwargs['patternType'] + if pattern_type is None: + raise TypeError("Missing 'pattern_type' argument") + if source is None: + raise TypeError("Missing 'source' argument") + if validate_from_utc is None and 'validateFromUtc' in kwargs: + validate_from_utc = kwargs['validateFromUtc'] + if validate_from_utc is None: + raise TypeError("Missing 'validate_from_utc' argument") + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if workspace_id is None: + raise TypeError("Missing 'workspace_id' argument") + if created_by is None and 'createdBy' in kwargs: + created_by = kwargs['createdBy'] + if external_references is None and 'externalReferences' in kwargs: + external_references = kwargs['externalReferences'] + if granular_markings is None and 'granularMarkings' in kwargs: + granular_markings = kwargs['granularMarkings'] + if kill_chain_phases is None and 'killChainPhases' in kwargs: + kill_chain_phases = kwargs['killChainPhases'] + if object_marking_refs is None and 'objectMarkingRefs' in kwargs: + object_marking_refs = kwargs['objectMarkingRefs'] + if pattern_version is None and 'patternVersion' in kwargs: + pattern_version = kwargs['patternVersion'] + if threat_types is None and 'threatTypes' in kwargs: + threat_types = kwargs['threatTypes'] + if validate_until_utc is None and 'validateUntilUtc' in kwargs: + validate_until_utc = kwargs['validateUntilUtc'] + + _setter("display_name", display_name) + _setter("pattern", pattern) + _setter("pattern_type", pattern_type) + _setter("source", source) + _setter("validate_from_utc", validate_from_utc) + _setter("workspace_id", workspace_id) if confidence is not None: - pulumi.set(__self__, "confidence", confidence) + _setter("confidence", confidence) if created_by is not None: - pulumi.set(__self__, "created_by", created_by) + _setter("created_by", created_by) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if extension is not None: - pulumi.set(__self__, "extension", extension) + _setter("extension", extension) if external_references is not None: - pulumi.set(__self__, "external_references", external_references) + _setter("external_references", external_references) if granular_markings is not None: - pulumi.set(__self__, "granular_markings", granular_markings) + _setter("granular_markings", granular_markings) if kill_chain_phases is not None: - pulumi.set(__self__, "kill_chain_phases", kill_chain_phases) + _setter("kill_chain_phases", kill_chain_phases) if language is not None: - pulumi.set(__self__, "language", language) + _setter("language", language) if object_marking_refs is not None: - pulumi.set(__self__, "object_marking_refs", object_marking_refs) + _setter("object_marking_refs", object_marking_refs) if pattern_version is not None: - pulumi.set(__self__, "pattern_version", pattern_version) + _setter("pattern_version", pattern_version) if revoked is not None: - pulumi.set(__self__, "revoked", revoked) + _setter("revoked", revoked) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_types is not None: - pulumi.set(__self__, "threat_types", threat_types) + _setter("threat_types", threat_types) if validate_until_utc is not None: - pulumi.set(__self__, "validate_until_utc", validate_until_utc) + _setter("validate_until_utc", validate_until_utc) @property @pulumi.getter(name="displayName") @@ -396,62 +481,163 @@ def __init__(__self__, *, :param pulumi.Input[str] validate_until_utc: The end of validate date of the Threat Intelligence Indicator in RFC3339 format. :param pulumi.Input[str] workspace_id: The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Threat Intelligence Indicator to be created. """ + _ThreatIntelligenceIndicatorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + confidence=confidence, + created_by=created_by, + created_on=created_on, + defanged=defanged, + description=description, + display_name=display_name, + extension=extension, + external_id=external_id, + external_last_updated_time_utc=external_last_updated_time_utc, + external_references=external_references, + granular_markings=granular_markings, + guid=guid, + indicator_types=indicator_types, + kill_chain_phases=kill_chain_phases, + language=language, + last_updated_time_utc=last_updated_time_utc, + object_marking_refs=object_marking_refs, + parsed_patterns=parsed_patterns, + pattern=pattern, + pattern_type=pattern_type, + pattern_version=pattern_version, + revoked=revoked, + source=source, + tags=tags, + threat_types=threat_types, + validate_from_utc=validate_from_utc, + validate_until_utc=validate_until_utc, + workspace_id=workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + confidence: Optional[pulumi.Input[int]] = None, + created_by: Optional[pulumi.Input[str]] = None, + created_on: Optional[pulumi.Input[str]] = None, + defanged: Optional[pulumi.Input[bool]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + extension: Optional[pulumi.Input[str]] = None, + external_id: Optional[pulumi.Input[str]] = None, + external_last_updated_time_utc: Optional[pulumi.Input[str]] = None, + external_references: Optional[pulumi.Input[Sequence[pulumi.Input['ThreatIntelligenceIndicatorExternalReferenceArgs']]]] = None, + granular_markings: Optional[pulumi.Input[Sequence[pulumi.Input['ThreatIntelligenceIndicatorGranularMarkingArgs']]]] = None, + guid: Optional[pulumi.Input[str]] = None, + indicator_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + kill_chain_phases: Optional[pulumi.Input[Sequence[pulumi.Input['ThreatIntelligenceIndicatorKillChainPhaseArgs']]]] = None, + language: Optional[pulumi.Input[str]] = None, + last_updated_time_utc: Optional[pulumi.Input[str]] = None, + object_marking_refs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + parsed_patterns: Optional[pulumi.Input[Sequence[pulumi.Input['ThreatIntelligenceIndicatorParsedPatternArgs']]]] = None, + pattern: Optional[pulumi.Input[str]] = None, + pattern_type: Optional[pulumi.Input[str]] = None, + pattern_version: Optional[pulumi.Input[str]] = None, + revoked: Optional[pulumi.Input[bool]] = None, + source: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + threat_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + validate_from_utc: Optional[pulumi.Input[str]] = None, + validate_until_utc: Optional[pulumi.Input[str]] = None, + workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if created_by is None and 'createdBy' in kwargs: + created_by = kwargs['createdBy'] + if created_on is None and 'createdOn' in kwargs: + created_on = kwargs['createdOn'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if external_id is None and 'externalId' in kwargs: + external_id = kwargs['externalId'] + if external_last_updated_time_utc is None and 'externalLastUpdatedTimeUtc' in kwargs: + external_last_updated_time_utc = kwargs['externalLastUpdatedTimeUtc'] + if external_references is None and 'externalReferences' in kwargs: + external_references = kwargs['externalReferences'] + if granular_markings is None and 'granularMarkings' in kwargs: + granular_markings = kwargs['granularMarkings'] + if indicator_types is None and 'indicatorTypes' in kwargs: + indicator_types = kwargs['indicatorTypes'] + if kill_chain_phases is None and 'killChainPhases' in kwargs: + kill_chain_phases = kwargs['killChainPhases'] + if last_updated_time_utc is None and 'lastUpdatedTimeUtc' in kwargs: + last_updated_time_utc = kwargs['lastUpdatedTimeUtc'] + if object_marking_refs is None and 'objectMarkingRefs' in kwargs: + object_marking_refs = kwargs['objectMarkingRefs'] + if parsed_patterns is None and 'parsedPatterns' in kwargs: + parsed_patterns = kwargs['parsedPatterns'] + if pattern_type is None and 'patternType' in kwargs: + pattern_type = kwargs['patternType'] + if pattern_version is None and 'patternVersion' in kwargs: + pattern_version = kwargs['patternVersion'] + if threat_types is None and 'threatTypes' in kwargs: + threat_types = kwargs['threatTypes'] + if validate_from_utc is None and 'validateFromUtc' in kwargs: + validate_from_utc = kwargs['validateFromUtc'] + if validate_until_utc is None and 'validateUntilUtc' in kwargs: + validate_until_utc = kwargs['validateUntilUtc'] + if workspace_id is None and 'workspaceId' in kwargs: + workspace_id = kwargs['workspaceId'] + if confidence is not None: - pulumi.set(__self__, "confidence", confidence) + _setter("confidence", confidence) if created_by is not None: - pulumi.set(__self__, "created_by", created_by) + _setter("created_by", created_by) if created_on is not None: - pulumi.set(__self__, "created_on", created_on) + _setter("created_on", created_on) if defanged is not None: - pulumi.set(__self__, "defanged", defanged) + _setter("defanged", defanged) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if extension is not None: - pulumi.set(__self__, "extension", extension) + _setter("extension", extension) if external_id is not None: - pulumi.set(__self__, "external_id", external_id) + _setter("external_id", external_id) if external_last_updated_time_utc is not None: - pulumi.set(__self__, "external_last_updated_time_utc", external_last_updated_time_utc) + _setter("external_last_updated_time_utc", external_last_updated_time_utc) if external_references is not None: - pulumi.set(__self__, "external_references", external_references) + _setter("external_references", external_references) if granular_markings is not None: - pulumi.set(__self__, "granular_markings", granular_markings) + _setter("granular_markings", granular_markings) if guid is not None: - pulumi.set(__self__, "guid", guid) + _setter("guid", guid) if indicator_types is not None: - pulumi.set(__self__, "indicator_types", indicator_types) + _setter("indicator_types", indicator_types) if kill_chain_phases is not None: - pulumi.set(__self__, "kill_chain_phases", kill_chain_phases) + _setter("kill_chain_phases", kill_chain_phases) if language is not None: - pulumi.set(__self__, "language", language) + _setter("language", language) if last_updated_time_utc is not None: - pulumi.set(__self__, "last_updated_time_utc", last_updated_time_utc) + _setter("last_updated_time_utc", last_updated_time_utc) if object_marking_refs is not None: - pulumi.set(__self__, "object_marking_refs", object_marking_refs) + _setter("object_marking_refs", object_marking_refs) if parsed_patterns is not None: - pulumi.set(__self__, "parsed_patterns", parsed_patterns) + _setter("parsed_patterns", parsed_patterns) if pattern is not None: - pulumi.set(__self__, "pattern", pattern) + _setter("pattern", pattern) if pattern_type is not None: - pulumi.set(__self__, "pattern_type", pattern_type) + _setter("pattern_type", pattern_type) if pattern_version is not None: - pulumi.set(__self__, "pattern_version", pattern_version) + _setter("pattern_version", pattern_version) if revoked is not None: - pulumi.set(__self__, "revoked", revoked) + _setter("revoked", revoked) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_types is not None: - pulumi.set(__self__, "threat_types", threat_types) + _setter("threat_types", threat_types) if validate_from_utc is not None: - pulumi.set(__self__, "validate_from_utc", validate_from_utc) + _setter("validate_from_utc", validate_from_utc) if validate_until_utc is not None: - pulumi.set(__self__, "validate_until_utc", validate_until_utc) + _setter("validate_until_utc", validate_until_utc) if workspace_id is not None: - pulumi.set(__self__, "workspace_id", workspace_id) + _setter("workspace_id", workspace_id) @property @pulumi.getter @@ -924,6 +1110,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ThreatIntelligenceIndicatorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/watchlist.py b/sdk/python/pulumi_azure/sentinel/watchlist.py index 64abc629a8..4ce240f2f7 100644 --- a/sdk/python/pulumi_azure/sentinel/watchlist.py +++ b/sdk/python/pulumi_azure/sentinel/watchlist.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WatchlistArgs', 'Watchlist'] @@ -31,17 +31,54 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] labels: Specifies a list of labels related to this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. :param pulumi.Input[str] name: The name which should be used for this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. """ - pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "item_search_key", item_search_key) - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + WatchlistArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + display_name=display_name, + item_search_key=item_search_key, + log_analytics_workspace_id=log_analytics_workspace_id, + default_duration=default_duration, + description=description, + labels=labels, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + display_name: Optional[pulumi.Input[str]] = None, + item_search_key: Optional[pulumi.Input[str]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + default_duration: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if display_name is None: + raise TypeError("Missing 'display_name' argument") + if item_search_key is None and 'itemSearchKey' in kwargs: + item_search_key = kwargs['itemSearchKey'] + if item_search_key is None: + raise TypeError("Missing 'item_search_key' argument") + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if log_analytics_workspace_id is None: + raise TypeError("Missing 'log_analytics_workspace_id' argument") + if default_duration is None and 'defaultDuration' in kwargs: + default_duration = kwargs['defaultDuration'] + + _setter("display_name", display_name) + _setter("item_search_key", item_search_key) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if default_duration is not None: - pulumi.set(__self__, "default_duration", default_duration) + _setter("default_duration", default_duration) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="displayName") @@ -148,20 +185,51 @@ def __init__(__self__, *, :param pulumi.Input[str] log_analytics_workspace_id: The ID of the Log Analytics Workspace where this Sentinel Watchlist resides in. Changing this forces a new Sentinel Watchlist to be created. :param pulumi.Input[str] name: The name which should be used for this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. """ + _WatchlistState._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_duration=default_duration, + description=description, + display_name=display_name, + item_search_key=item_search_key, + labels=labels, + log_analytics_workspace_id=log_analytics_workspace_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_duration: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + item_search_key: Optional[pulumi.Input[str]] = None, + labels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + log_analytics_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_duration is None and 'defaultDuration' in kwargs: + default_duration = kwargs['defaultDuration'] + if display_name is None and 'displayName' in kwargs: + display_name = kwargs['displayName'] + if item_search_key is None and 'itemSearchKey' in kwargs: + item_search_key = kwargs['itemSearchKey'] + if log_analytics_workspace_id is None and 'logAnalyticsWorkspaceId' in kwargs: + log_analytics_workspace_id = kwargs['logAnalyticsWorkspaceId'] + if default_duration is not None: - pulumi.set(__self__, "default_duration", default_duration) + _setter("default_duration", default_duration) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if display_name is not None: - pulumi.set(__self__, "display_name", display_name) + _setter("display_name", display_name) if item_search_key is not None: - pulumi.set(__self__, "item_search_key", item_search_key) + _setter("item_search_key", item_search_key) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if log_analytics_workspace_id is not None: - pulumi.set(__self__, "log_analytics_workspace_id", log_analytics_workspace_id) + _setter("log_analytics_workspace_id", log_analytics_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="defaultDuration") @@ -345,6 +413,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WatchlistArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sentinel/watchlist_item.py b/sdk/python/pulumi_azure/sentinel/watchlist_item.py index 695d45a49f..ea4559d759 100644 --- a/sdk/python/pulumi_azure/sentinel/watchlist_item.py +++ b/sdk/python/pulumi_azure/sentinel/watchlist_item.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WatchlistItemArgs', 'WatchlistItem'] @@ -23,10 +23,31 @@ def __init__(__self__, *, :param pulumi.Input[str] watchlist_id: The ID of the Sentinel Watchlist that this Item resides in. Changing this forces a new Sentinel Watchlist Item to be created. :param pulumi.Input[str] name: The name in UUID format which should be used for this Sentinel Watchlist Item. Changing this forces a new Sentinel Watchlist Item to be created. """ - pulumi.set(__self__, "properties", properties) - pulumi.set(__self__, "watchlist_id", watchlist_id) + WatchlistItemArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + properties=properties, + watchlist_id=watchlist_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + watchlist_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if properties is None: + raise TypeError("Missing 'properties' argument") + if watchlist_id is None and 'watchlistId' in kwargs: + watchlist_id = kwargs['watchlistId'] + if watchlist_id is None: + raise TypeError("Missing 'watchlist_id' argument") + + _setter("properties", properties) + _setter("watchlist_id", watchlist_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -77,12 +98,29 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] properties: The key value pairs of the Sentinel Watchlist Item. :param pulumi.Input[str] watchlist_id: The ID of the Sentinel Watchlist that this Item resides in. Changing this forces a new Sentinel Watchlist Item to be created. """ + _WatchlistItemState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + properties=properties, + watchlist_id=watchlist_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + watchlist_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if watchlist_id is None and 'watchlistId' in kwargs: + watchlist_id = kwargs['watchlistId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) if watchlist_id is not None: - pulumi.set(__self__, "watchlist_id", watchlist_id) + _setter("watchlist_id", watchlist_id) @property @pulumi.getter @@ -222,6 +260,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WatchlistItemArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/servicebus/_inputs.py b/sdk/python/pulumi_azure/servicebus/_inputs.py index ddd78fa5aa..74cbd98a93 100644 --- a/sdk/python/pulumi_azure/servicebus/_inputs.py +++ b/sdk/python/pulumi_azure/servicebus/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -29,10 +29,35 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault Key which should be used to Encrypt the data in this ServiceBus Namespace. :param pulumi.Input[bool] infrastructure_encryption_enabled: Used to specify whether enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created. """ - pulumi.set(__self__, "identity_id", identity_id) - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + NamespaceCustomerManagedKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_id=identity_id, + key_vault_key_id=key_vault_key_id, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_id: Optional[pulumi.Input[str]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + infrastructure_encryption_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if identity_id is None: + raise TypeError("Missing 'identity_id' argument") + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + + _setter("identity_id", identity_id) + _setter("key_vault_key_id", key_vault_key_id) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) @property @pulumi.getter(name="identityId") @@ -86,13 +111,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this ServiceBus Namespace. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this ServiceBus Namespace. """ - pulumi.set(__self__, "type", type) + NamespaceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -160,16 +210,45 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`. :param pulumi.Input[bool] trusted_services_allowed: Are Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration? See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md) """ + NamespaceNetworkRuleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + network_rules=network_rules, + public_network_access_enabled=public_network_access_enabled, + trusted_services_allowed=trusted_services_allowed, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + network_rules: Optional[pulumi.Input[Sequence[pulumi.Input['NamespaceNetworkRuleSetNetworkRuleArgs']]]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + trusted_services_allowed: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if network_rules is None and 'networkRules' in kwargs: + network_rules = kwargs['networkRules'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if trusted_services_allowed is None and 'trustedServicesAllowed' in kwargs: + trusted_services_allowed = kwargs['trustedServicesAllowed'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if network_rules is not None: - pulumi.set(__self__, "network_rules", network_rules) + _setter("network_rules", network_rules) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if trusted_services_allowed is not None: - pulumi.set(__self__, "trusted_services_allowed", trusted_services_allowed) + _setter("trusted_services_allowed", trusted_services_allowed) @property @pulumi.getter(name="defaultAction") @@ -241,9 +320,28 @@ def __init__(__self__, *, :param pulumi.Input[str] subnet_id: The Subnet ID which should be able to access this ServiceBus Namespace. :param pulumi.Input[bool] ignore_missing_vnet_service_endpoint: Should the ServiceBus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to `false`. """ - pulumi.set(__self__, "subnet_id", subnet_id) + NamespaceNetworkRuleSetNetworkRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[pulumi.Input[str]] = None, + ignore_missing_vnet_service_endpoint: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + + _setter("subnet_id", subnet_id) if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) @property @pulumi.getter(name="subnetId") @@ -283,12 +381,33 @@ def __init__(__self__, *, :param pulumi.Input[bool] is_client_scoped_subscription_durable: Whether the client scoped subscription is durable. This property can only be controlled from the application side. :param pulumi.Input[bool] is_client_scoped_subscription_shareable: Whether the client scoped subscription is shareable. Defaults to `true` Changing this forces a new resource to be created. """ + SubscriptionClientScopedSubscriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + is_client_scoped_subscription_durable=is_client_scoped_subscription_durable, + is_client_scoped_subscription_shareable=is_client_scoped_subscription_shareable, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + is_client_scoped_subscription_durable: Optional[pulumi.Input[bool]] = None, + is_client_scoped_subscription_shareable: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if is_client_scoped_subscription_durable is None and 'isClientScopedSubscriptionDurable' in kwargs: + is_client_scoped_subscription_durable = kwargs['isClientScopedSubscriptionDurable'] + if is_client_scoped_subscription_shareable is None and 'isClientScopedSubscriptionShareable' in kwargs: + is_client_scoped_subscription_shareable = kwargs['isClientScopedSubscriptionShareable'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if is_client_scoped_subscription_durable is not None: - pulumi.set(__self__, "is_client_scoped_subscription_durable", is_client_scoped_subscription_durable) + _setter("is_client_scoped_subscription_durable", is_client_scoped_subscription_durable) if is_client_scoped_subscription_shareable is not None: - pulumi.set(__self__, "is_client_scoped_subscription_shareable", is_client_scoped_subscription_shareable) + _setter("is_client_scoped_subscription_shareable", is_client_scoped_subscription_shareable) @property @pulumi.getter(name="clientId") @@ -354,24 +473,63 @@ def __init__(__self__, *, :param pulumi.Input[str] session_id: Session identifier. :param pulumi.Input[str] to: Address to send to. """ + SubscriptionRuleCorrelationFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + correlation_id=correlation_id, + label=label, + message_id=message_id, + properties=properties, + reply_to=reply_to, + reply_to_session_id=reply_to_session_id, + session_id=session_id, + to=to, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[pulumi.Input[str]] = None, + correlation_id: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + message_id: Optional[pulumi.Input[str]] = None, + properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + reply_to: Optional[pulumi.Input[str]] = None, + reply_to_session_id: Optional[pulumi.Input[str]] = None, + session_id: Optional[pulumi.Input[str]] = None, + to: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if correlation_id is None and 'correlationId' in kwargs: + correlation_id = kwargs['correlationId'] + if message_id is None and 'messageId' in kwargs: + message_id = kwargs['messageId'] + if reply_to is None and 'replyTo' in kwargs: + reply_to = kwargs['replyTo'] + if reply_to_session_id is None and 'replyToSessionId' in kwargs: + reply_to_session_id = kwargs['replyToSessionId'] + if session_id is None and 'sessionId' in kwargs: + session_id = kwargs['sessionId'] + if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if correlation_id is not None: - pulumi.set(__self__, "correlation_id", correlation_id) + _setter("correlation_id", correlation_id) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if message_id is not None: - pulumi.set(__self__, "message_id", message_id) + _setter("message_id", message_id) if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) if reply_to is not None: - pulumi.set(__self__, "reply_to", reply_to) + _setter("reply_to", reply_to) if reply_to_session_id is not None: - pulumi.set(__self__, "reply_to_session_id", reply_to_session_id) + _setter("reply_to_session_id", reply_to_session_id) if session_id is not None: - pulumi.set(__self__, "session_id", session_id) + _setter("session_id", session_id) if to is not None: - pulumi.set(__self__, "to", to) + _setter("to", to) @property @pulumi.getter(name="contentType") diff --git a/sdk/python/pulumi_azure/servicebus/get_namespace.py b/sdk/python/pulumi_azure/servicebus/get_namespace.py index 4b17b083b2..10dfba715b 100644 --- a/sdk/python/pulumi_azure/servicebus/get_namespace.py +++ b/sdk/python/pulumi_azure/servicebus/get_namespace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/servicebus/get_namespace_authorization_rule.py b/sdk/python/pulumi_azure/servicebus/get_namespace_authorization_rule.py index dc4963dfea..82d4f47cdb 100644 --- a/sdk/python/pulumi_azure/servicebus/get_namespace_authorization_rule.py +++ b/sdk/python/pulumi_azure/servicebus/get_namespace_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/servicebus/get_namespace_disaster_recovery_config.py b/sdk/python/pulumi_azure/servicebus/get_namespace_disaster_recovery_config.py index f5ec534334..a3f9a506d0 100644 --- a/sdk/python/pulumi_azure/servicebus/get_namespace_disaster_recovery_config.py +++ b/sdk/python/pulumi_azure/servicebus/get_namespace_disaster_recovery_config.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/servicebus/get_queue.py b/sdk/python/pulumi_azure/servicebus/get_queue.py index c62a8ea3cd..909951fccd 100644 --- a/sdk/python/pulumi_azure/servicebus/get_queue.py +++ b/sdk/python/pulumi_azure/servicebus/get_queue.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/servicebus/get_queue_authorization_rule.py b/sdk/python/pulumi_azure/servicebus/get_queue_authorization_rule.py index fa8607e80d..715e021784 100644 --- a/sdk/python/pulumi_azure/servicebus/get_queue_authorization_rule.py +++ b/sdk/python/pulumi_azure/servicebus/get_queue_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/servicebus/get_subscription.py b/sdk/python/pulumi_azure/servicebus/get_subscription.py index 4dcb6e6f6c..4766db8239 100644 --- a/sdk/python/pulumi_azure/servicebus/get_subscription.py +++ b/sdk/python/pulumi_azure/servicebus/get_subscription.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/servicebus/get_topic.py b/sdk/python/pulumi_azure/servicebus/get_topic.py index b9903f3ce6..d568900f91 100644 --- a/sdk/python/pulumi_azure/servicebus/get_topic.py +++ b/sdk/python/pulumi_azure/servicebus/get_topic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/servicebus/get_topic_authorization_rule.py b/sdk/python/pulumi_azure/servicebus/get_topic_authorization_rule.py index 5a788f9476..bff087c073 100644 --- a/sdk/python/pulumi_azure/servicebus/get_topic_authorization_rule.py +++ b/sdk/python/pulumi_azure/servicebus/get_topic_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/servicebus/namespace.py b/sdk/python/pulumi_azure/servicebus/namespace.py index b6ff46fe92..e1bb9cadd6 100644 --- a/sdk/python/pulumi_azure/servicebus/namespace.py +++ b/sdk/python/pulumi_azure/servicebus/namespace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -46,30 +46,83 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] zone_redundant: Whether or not this resource is zone redundant. `sku` needs to be `Premium`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + NamespaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + capacity=capacity, + customer_managed_key=customer_managed_key, + identity=identity, + local_auth_enabled=local_auth_enabled, + location=location, + minimum_tls_version=minimum_tls_version, + name=name, + network_rule_set=network_rule_set, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + capacity: Optional[pulumi.Input[int]] = None, + customer_managed_key: Optional[pulumi.Input['NamespaceCustomerManagedKeyArgs']] = None, + identity: Optional[pulumi.Input['NamespaceIdentityArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_rule_set: Optional[pulumi.Input['NamespaceNetworkRuleSetArgs']] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if network_rule_set is None and 'networkRuleSet' in kwargs: + network_rule_set = kwargs['networkRuleSet'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_rule_set is not None: - pulumi.set(__self__, "network_rule_set", network_rule_set) + _setter("network_rule_set", network_rule_set) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="resourceGroupName") @@ -272,42 +325,109 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] zone_redundant: Whether or not this resource is zone redundant. `sku` needs to be `Premium`. Changing this forces a new resource to be created. """ + _NamespaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + customer_managed_key=customer_managed_key, + default_primary_connection_string=default_primary_connection_string, + default_primary_key=default_primary_key, + default_secondary_connection_string=default_secondary_connection_string, + default_secondary_key=default_secondary_key, + endpoint=endpoint, + identity=identity, + local_auth_enabled=local_auth_enabled, + location=location, + minimum_tls_version=minimum_tls_version, + name=name, + network_rule_set=network_rule_set, + public_network_access_enabled=public_network_access_enabled, + resource_group_name=resource_group_name, + sku=sku, + tags=tags, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + customer_managed_key: Optional[pulumi.Input['NamespaceCustomerManagedKeyArgs']] = None, + default_primary_connection_string: Optional[pulumi.Input[str]] = None, + default_primary_key: Optional[pulumi.Input[str]] = None, + default_secondary_connection_string: Optional[pulumi.Input[str]] = None, + default_secondary_key: Optional[pulumi.Input[str]] = None, + endpoint: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['NamespaceIdentityArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_rule_set: Optional[pulumi.Input['NamespaceNetworkRuleSetArgs']] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if default_primary_connection_string is None and 'defaultPrimaryConnectionString' in kwargs: + default_primary_connection_string = kwargs['defaultPrimaryConnectionString'] + if default_primary_key is None and 'defaultPrimaryKey' in kwargs: + default_primary_key = kwargs['defaultPrimaryKey'] + if default_secondary_connection_string is None and 'defaultSecondaryConnectionString' in kwargs: + default_secondary_connection_string = kwargs['defaultSecondaryConnectionString'] + if default_secondary_key is None and 'defaultSecondaryKey' in kwargs: + default_secondary_key = kwargs['defaultSecondaryKey'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if network_rule_set is None and 'networkRuleSet' in kwargs: + network_rule_set = kwargs['networkRuleSet'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if default_primary_connection_string is not None: - pulumi.set(__self__, "default_primary_connection_string", default_primary_connection_string) + _setter("default_primary_connection_string", default_primary_connection_string) if default_primary_key is not None: - pulumi.set(__self__, "default_primary_key", default_primary_key) + _setter("default_primary_key", default_primary_key) if default_secondary_connection_string is not None: - pulumi.set(__self__, "default_secondary_connection_string", default_secondary_connection_string) + _setter("default_secondary_connection_string", default_secondary_connection_string) if default_secondary_key is not None: - pulumi.set(__self__, "default_secondary_key", default_secondary_key) + _setter("default_secondary_key", default_secondary_key) if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_rule_set is not None: - pulumi.set(__self__, "network_rule_set", network_rule_set) + _setter("network_rule_set", network_rule_set) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter @@ -633,6 +753,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NamespaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -661,12 +785,27 @@ def _internal_init(__self__, __props__ = NamespaceArgs.__new__(NamespaceArgs) __props__.__dict__["capacity"] = capacity + if customer_managed_key is not None and not isinstance(customer_managed_key, NamespaceCustomerManagedKeyArgs): + customer_managed_key = customer_managed_key or {} + def _setter(key, value): + customer_managed_key[key] = value + NamespaceCustomerManagedKeyArgs._configure(_setter, **customer_managed_key) __props__.__dict__["customer_managed_key"] = customer_managed_key + if identity is not None and not isinstance(identity, NamespaceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + NamespaceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["local_auth_enabled"] = local_auth_enabled __props__.__dict__["location"] = location __props__.__dict__["minimum_tls_version"] = minimum_tls_version __props__.__dict__["name"] = name + if network_rule_set is not None and not isinstance(network_rule_set, NamespaceNetworkRuleSetArgs): + network_rule_set = network_rule_set or {} + def _setter(key, value): + network_rule_set[key] = value + NamespaceNetworkRuleSetArgs._configure(_setter, **network_rule_set) __props__.__dict__["network_rule_set"] = network_rule_set __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled if resource_group_name is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/servicebus/namespace_authorization_rule.py b/sdk/python/pulumi_azure/servicebus/namespace_authorization_rule.py index 85405bef89..556f432804 100644 --- a/sdk/python/pulumi_azure/servicebus/namespace_authorization_rule.py +++ b/sdk/python/pulumi_azure/servicebus/namespace_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NamespaceAuthorizationRuleArgs', 'NamespaceAuthorizationRule'] @@ -29,15 +29,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created. :param pulumi.Input[bool] send: Grants send access to this this Authorization Rule. Defaults to `false`. """ - pulumi.set(__self__, "namespace_id", namespace_id) + NamespaceAuthorizationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_id=namespace_id, + listen=listen, + manage=manage, + name=name, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_id: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if namespace_id is None: + raise TypeError("Missing 'namespace_id' argument") + + _setter("namespace_id", namespace_id) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="namespaceId") @@ -132,28 +155,73 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_key: The Secondary Key for the ServiceBus Namespace authorization Rule. :param pulumi.Input[bool] send: Grants send access to this this Authorization Rule. Defaults to `false`. """ + _NamespaceAuthorizationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + listen=listen, + manage=manage, + name=name, + namespace_id=namespace_id, + primary_connection_string=primary_connection_string, + primary_connection_string_alias=primary_connection_string_alias, + primary_key=primary_key, + secondary_connection_string=secondary_connection_string, + secondary_connection_string_alias=secondary_connection_string_alias, + secondary_key=secondary_key, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_id: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_connection_string_alias: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_connection_string_alias: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_connection_string_alias is None and 'primaryConnectionStringAlias' in kwargs: + primary_connection_string_alias = kwargs['primaryConnectionStringAlias'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_connection_string_alias is None and 'secondaryConnectionStringAlias' in kwargs: + secondary_connection_string_alias = kwargs['secondaryConnectionStringAlias'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_id is not None: - pulumi.set(__self__, "namespace_id", namespace_id) + _setter("namespace_id", namespace_id) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_connection_string_alias is not None: - pulumi.set(__self__, "primary_connection_string_alias", primary_connection_string_alias) + _setter("primary_connection_string_alias", primary_connection_string_alias) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_connection_string_alias is not None: - pulumi.set(__self__, "secondary_connection_string_alias", secondary_connection_string_alias) + _setter("secondary_connection_string_alias", secondary_connection_string_alias) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter @@ -391,6 +459,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NamespaceAuthorizationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/servicebus/namespace_disaster_recovery_config.py b/sdk/python/pulumi_azure/servicebus/namespace_disaster_recovery_config.py index 12ff9d33db..0c5890a586 100644 --- a/sdk/python/pulumi_azure/servicebus/namespace_disaster_recovery_config.py +++ b/sdk/python/pulumi_azure/servicebus/namespace_disaster_recovery_config.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NamespaceDisasterRecoveryConfigArgs', 'NamespaceDisasterRecoveryConfig'] @@ -25,12 +25,39 @@ def __init__(__self__, *, :param pulumi.Input[str] alias_authorization_rule_id: The Shared access policies used to access the connection string for the alias. :param pulumi.Input[str] name: Specifies the name of the Disaster Recovery Config. This is the alias DNS name that will be created. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "partner_namespace_id", partner_namespace_id) - pulumi.set(__self__, "primary_namespace_id", primary_namespace_id) + NamespaceDisasterRecoveryConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + partner_namespace_id=partner_namespace_id, + primary_namespace_id=primary_namespace_id, + alias_authorization_rule_id=alias_authorization_rule_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + partner_namespace_id: Optional[pulumi.Input[str]] = None, + primary_namespace_id: Optional[pulumi.Input[str]] = None, + alias_authorization_rule_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if partner_namespace_id is None and 'partnerNamespaceId' in kwargs: + partner_namespace_id = kwargs['partnerNamespaceId'] + if partner_namespace_id is None: + raise TypeError("Missing 'partner_namespace_id' argument") + if primary_namespace_id is None and 'primaryNamespaceId' in kwargs: + primary_namespace_id = kwargs['primaryNamespaceId'] + if primary_namespace_id is None: + raise TypeError("Missing 'primary_namespace_id' argument") + if alias_authorization_rule_id is None and 'aliasAuthorizationRuleId' in kwargs: + alias_authorization_rule_id = kwargs['aliasAuthorizationRuleId'] + + _setter("partner_namespace_id", partner_namespace_id) + _setter("primary_namespace_id", primary_namespace_id) if alias_authorization_rule_id is not None: - pulumi.set(__self__, "alias_authorization_rule_id", alias_authorization_rule_id) + _setter("alias_authorization_rule_id", alias_authorization_rule_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="partnerNamespaceId") @@ -103,22 +130,61 @@ def __init__(__self__, *, :param pulumi.Input[str] primary_namespace_id: The ID of the primary Service Bus Namespace to replicate. Changing this forces a new resource to be created. :param pulumi.Input[str] secondary_connection_string_alias: The alias Secondary Connection String for the ServiceBus Namespace """ + _NamespaceDisasterRecoveryConfigState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alias_authorization_rule_id=alias_authorization_rule_id, + default_primary_key=default_primary_key, + default_secondary_key=default_secondary_key, + name=name, + partner_namespace_id=partner_namespace_id, + primary_connection_string_alias=primary_connection_string_alias, + primary_namespace_id=primary_namespace_id, + secondary_connection_string_alias=secondary_connection_string_alias, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alias_authorization_rule_id: Optional[pulumi.Input[str]] = None, + default_primary_key: Optional[pulumi.Input[str]] = None, + default_secondary_key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partner_namespace_id: Optional[pulumi.Input[str]] = None, + primary_connection_string_alias: Optional[pulumi.Input[str]] = None, + primary_namespace_id: Optional[pulumi.Input[str]] = None, + secondary_connection_string_alias: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alias_authorization_rule_id is None and 'aliasAuthorizationRuleId' in kwargs: + alias_authorization_rule_id = kwargs['aliasAuthorizationRuleId'] + if default_primary_key is None and 'defaultPrimaryKey' in kwargs: + default_primary_key = kwargs['defaultPrimaryKey'] + if default_secondary_key is None and 'defaultSecondaryKey' in kwargs: + default_secondary_key = kwargs['defaultSecondaryKey'] + if partner_namespace_id is None and 'partnerNamespaceId' in kwargs: + partner_namespace_id = kwargs['partnerNamespaceId'] + if primary_connection_string_alias is None and 'primaryConnectionStringAlias' in kwargs: + primary_connection_string_alias = kwargs['primaryConnectionStringAlias'] + if primary_namespace_id is None and 'primaryNamespaceId' in kwargs: + primary_namespace_id = kwargs['primaryNamespaceId'] + if secondary_connection_string_alias is None and 'secondaryConnectionStringAlias' in kwargs: + secondary_connection_string_alias = kwargs['secondaryConnectionStringAlias'] + if alias_authorization_rule_id is not None: - pulumi.set(__self__, "alias_authorization_rule_id", alias_authorization_rule_id) + _setter("alias_authorization_rule_id", alias_authorization_rule_id) if default_primary_key is not None: - pulumi.set(__self__, "default_primary_key", default_primary_key) + _setter("default_primary_key", default_primary_key) if default_secondary_key is not None: - pulumi.set(__self__, "default_secondary_key", default_secondary_key) + _setter("default_secondary_key", default_secondary_key) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partner_namespace_id is not None: - pulumi.set(__self__, "partner_namespace_id", partner_namespace_id) + _setter("partner_namespace_id", partner_namespace_id) if primary_connection_string_alias is not None: - pulumi.set(__self__, "primary_connection_string_alias", primary_connection_string_alias) + _setter("primary_connection_string_alias", primary_connection_string_alias) if primary_namespace_id is not None: - pulumi.set(__self__, "primary_namespace_id", primary_namespace_id) + _setter("primary_namespace_id", primary_namespace_id) if secondary_connection_string_alias is not None: - pulumi.set(__self__, "secondary_connection_string_alias", secondary_connection_string_alias) + _setter("secondary_connection_string_alias", secondary_connection_string_alias) @property @pulumi.getter(name="aliasAuthorizationRuleId") @@ -332,6 +398,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NamespaceDisasterRecoveryConfigArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/servicebus/namespace_network_rule_set.py b/sdk/python/pulumi_azure/servicebus/namespace_network_rule_set.py index bb5474a4e3..c31bdf2db1 100644 --- a/sdk/python/pulumi_azure/servicebus/namespace_network_rule_set.py +++ b/sdk/python/pulumi_azure/servicebus/namespace_network_rule_set.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,52 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`. :param pulumi.Input[bool] trusted_services_allowed: If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md) """ - pulumi.set(__self__, "namespace_id", namespace_id) + NamespaceNetworkRuleSetInitArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_id=namespace_id, + default_action=default_action, + ip_rules=ip_rules, + network_rules=network_rules, + public_network_access_enabled=public_network_access_enabled, + trusted_services_allowed=trusted_services_allowed, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_id: Optional[pulumi.Input[str]] = None, + default_action: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + network_rules: Optional[pulumi.Input[Sequence[pulumi.Input['NamespaceNetworkRuleSetNetworkRuleArgs']]]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + trusted_services_allowed: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if namespace_id is None: + raise TypeError("Missing 'namespace_id' argument") + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if network_rules is None and 'networkRules' in kwargs: + network_rules = kwargs['networkRules'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if trusted_services_allowed is None and 'trustedServicesAllowed' in kwargs: + trusted_services_allowed = kwargs['trustedServicesAllowed'] + + _setter("namespace_id", namespace_id) if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if network_rules is not None: - pulumi.set(__self__, "network_rules", network_rules) + _setter("network_rules", network_rules) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if trusted_services_allowed is not None: - pulumi.set(__self__, "trusted_services_allowed", trusted_services_allowed) + _setter("trusted_services_allowed", trusted_services_allowed) @property @pulumi.getter(name="namespaceId") @@ -140,18 +175,51 @@ def __init__(__self__, *, :param pulumi.Input[bool] public_network_access_enabled: Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`. :param pulumi.Input[bool] trusted_services_allowed: If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md) """ + _NamespaceNetworkRuleSetState._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + namespace_id=namespace_id, + network_rules=network_rules, + public_network_access_enabled=public_network_access_enabled, + trusted_services_allowed=trusted_services_allowed, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + namespace_id: Optional[pulumi.Input[str]] = None, + network_rules: Optional[pulumi.Input[Sequence[pulumi.Input['NamespaceNetworkRuleSetNetworkRuleArgs']]]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + trusted_services_allowed: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if network_rules is None and 'networkRules' in kwargs: + network_rules = kwargs['networkRules'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if trusted_services_allowed is None and 'trustedServicesAllowed' in kwargs: + trusted_services_allowed = kwargs['trustedServicesAllowed'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if namespace_id is not None: - pulumi.set(__self__, "namespace_id", namespace_id) + _setter("namespace_id", namespace_id) if network_rules is not None: - pulumi.set(__self__, "network_rules", network_rules) + _setter("network_rules", network_rules) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if trusted_services_allowed is not None: - pulumi.set(__self__, "trusted_services_allowed", trusted_services_allowed) + _setter("trusted_services_allowed", trusted_services_allowed) @property @pulumi.getter(name="defaultAction") @@ -361,6 +429,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NamespaceNetworkRuleSetInitArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/servicebus/outputs.py b/sdk/python/pulumi_azure/servicebus/outputs.py index 59470d089e..f5b2acb099 100644 --- a/sdk/python/pulumi_azure/servicebus/outputs.py +++ b/sdk/python/pulumi_azure/servicebus/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -51,10 +51,35 @@ def __init__(__self__, *, :param str key_vault_key_id: The ID of the Key Vault Key which should be used to Encrypt the data in this ServiceBus Namespace. :param bool infrastructure_encryption_enabled: Used to specify whether enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created. """ - pulumi.set(__self__, "identity_id", identity_id) - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + NamespaceCustomerManagedKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_id=identity_id, + key_vault_key_id=key_vault_key_id, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_id: Optional[str] = None, + key_vault_key_id: Optional[str] = None, + infrastructure_encryption_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_id is None and 'identityId' in kwargs: + identity_id = kwargs['identityId'] + if identity_id is None: + raise TypeError("Missing 'identity_id' argument") + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + + _setter("identity_id", identity_id) + _setter("key_vault_key_id", key_vault_key_id) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) @property @pulumi.getter(name="identityId") @@ -117,13 +142,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this ServiceBus Namespace. :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this ServiceBus Namespace. """ - pulumi.set(__self__, "type", type) + NamespaceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -200,16 +250,45 @@ def __init__(__self__, *, :param bool public_network_access_enabled: Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`. :param bool trusted_services_allowed: Are Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration? See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md) """ + NamespaceNetworkRuleSet._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + ip_rules=ip_rules, + network_rules=network_rules, + public_network_access_enabled=public_network_access_enabled, + trusted_services_allowed=trusted_services_allowed, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[str] = None, + ip_rules: Optional[Sequence[str]] = None, + network_rules: Optional[Sequence['outputs.NamespaceNetworkRuleSetNetworkRule']] = None, + public_network_access_enabled: Optional[bool] = None, + trusted_services_allowed: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if network_rules is None and 'networkRules' in kwargs: + network_rules = kwargs['networkRules'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if trusted_services_allowed is None and 'trustedServicesAllowed' in kwargs: + trusted_services_allowed = kwargs['trustedServicesAllowed'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if network_rules is not None: - pulumi.set(__self__, "network_rules", network_rules) + _setter("network_rules", network_rules) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if trusted_services_allowed is not None: - pulumi.set(__self__, "trusted_services_allowed", trusted_services_allowed) + _setter("trusted_services_allowed", trusted_services_allowed) @property @pulumi.getter(name="defaultAction") @@ -280,9 +359,28 @@ def __init__(__self__, *, :param str subnet_id: The Subnet ID which should be able to access this ServiceBus Namespace. :param bool ignore_missing_vnet_service_endpoint: Should the ServiceBus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to `false`. """ - pulumi.set(__self__, "subnet_id", subnet_id) + NamespaceNetworkRuleSetNetworkRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + subnet_id=subnet_id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subnet_id: Optional[str] = None, + ignore_missing_vnet_service_endpoint: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + + _setter("subnet_id", subnet_id) if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) @property @pulumi.getter(name="subnetId") @@ -335,12 +433,33 @@ def __init__(__self__, *, :param bool is_client_scoped_subscription_durable: Whether the client scoped subscription is durable. This property can only be controlled from the application side. :param bool is_client_scoped_subscription_shareable: Whether the client scoped subscription is shareable. Defaults to `true` Changing this forces a new resource to be created. """ + SubscriptionClientScopedSubscription._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + is_client_scoped_subscription_durable=is_client_scoped_subscription_durable, + is_client_scoped_subscription_shareable=is_client_scoped_subscription_shareable, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[str] = None, + is_client_scoped_subscription_durable: Optional[bool] = None, + is_client_scoped_subscription_shareable: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if is_client_scoped_subscription_durable is None and 'isClientScopedSubscriptionDurable' in kwargs: + is_client_scoped_subscription_durable = kwargs['isClientScopedSubscriptionDurable'] + if is_client_scoped_subscription_shareable is None and 'isClientScopedSubscriptionShareable' in kwargs: + is_client_scoped_subscription_shareable = kwargs['isClientScopedSubscriptionShareable'] + if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if is_client_scoped_subscription_durable is not None: - pulumi.set(__self__, "is_client_scoped_subscription_durable", is_client_scoped_subscription_durable) + _setter("is_client_scoped_subscription_durable", is_client_scoped_subscription_durable) if is_client_scoped_subscription_shareable is not None: - pulumi.set(__self__, "is_client_scoped_subscription_shareable", is_client_scoped_subscription_shareable) + _setter("is_client_scoped_subscription_shareable", is_client_scoped_subscription_shareable) @property @pulumi.getter(name="clientId") @@ -421,24 +540,63 @@ def __init__(__self__, *, :param str session_id: Session identifier. :param str to: Address to send to. """ + SubscriptionRuleCorrelationFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_type=content_type, + correlation_id=correlation_id, + label=label, + message_id=message_id, + properties=properties, + reply_to=reply_to, + reply_to_session_id=reply_to_session_id, + session_id=session_id, + to=to, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_type: Optional[str] = None, + correlation_id: Optional[str] = None, + label: Optional[str] = None, + message_id: Optional[str] = None, + properties: Optional[Mapping[str, str]] = None, + reply_to: Optional[str] = None, + reply_to_session_id: Optional[str] = None, + session_id: Optional[str] = None, + to: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if correlation_id is None and 'correlationId' in kwargs: + correlation_id = kwargs['correlationId'] + if message_id is None and 'messageId' in kwargs: + message_id = kwargs['messageId'] + if reply_to is None and 'replyTo' in kwargs: + reply_to = kwargs['replyTo'] + if reply_to_session_id is None and 'replyToSessionId' in kwargs: + reply_to_session_id = kwargs['replyToSessionId'] + if session_id is None and 'sessionId' in kwargs: + session_id = kwargs['sessionId'] + if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if correlation_id is not None: - pulumi.set(__self__, "correlation_id", correlation_id) + _setter("correlation_id", correlation_id) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if message_id is not None: - pulumi.set(__self__, "message_id", message_id) + _setter("message_id", message_id) if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) if reply_to is not None: - pulumi.set(__self__, "reply_to", reply_to) + _setter("reply_to", reply_to) if reply_to_session_id is not None: - pulumi.set(__self__, "reply_to_session_id", reply_to_session_id) + _setter("reply_to_session_id", reply_to_session_id) if session_id is not None: - pulumi.set(__self__, "session_id", session_id) + _setter("session_id", session_id) if to is not None: - pulumi.set(__self__, "to", to) + _setter("to", to) @property @pulumi.getter(name="contentType") diff --git a/sdk/python/pulumi_azure/servicebus/queue.py b/sdk/python/pulumi_azure/servicebus/queue.py index 3dd1e4d5a6..5bc523383f 100644 --- a/sdk/python/pulumi_azure/servicebus/queue.py +++ b/sdk/python/pulumi_azure/servicebus/queue.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['QueueArgs', 'Queue'] @@ -57,41 +57,120 @@ def __init__(__self__, *, :param pulumi.Input[bool] requires_session: Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`. :param pulumi.Input[str] status: The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`. """ - pulumi.set(__self__, "namespace_id", namespace_id) + QueueArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_id=namespace_id, + auto_delete_on_idle=auto_delete_on_idle, + dead_lettering_on_message_expiration=dead_lettering_on_message_expiration, + default_message_ttl=default_message_ttl, + duplicate_detection_history_time_window=duplicate_detection_history_time_window, + enable_batched_operations=enable_batched_operations, + enable_express=enable_express, + enable_partitioning=enable_partitioning, + forward_dead_lettered_messages_to=forward_dead_lettered_messages_to, + forward_to=forward_to, + lock_duration=lock_duration, + max_delivery_count=max_delivery_count, + max_message_size_in_kilobytes=max_message_size_in_kilobytes, + max_size_in_megabytes=max_size_in_megabytes, + name=name, + requires_duplicate_detection=requires_duplicate_detection, + requires_session=requires_session, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_id: Optional[pulumi.Input[str]] = None, + auto_delete_on_idle: Optional[pulumi.Input[str]] = None, + dead_lettering_on_message_expiration: Optional[pulumi.Input[bool]] = None, + default_message_ttl: Optional[pulumi.Input[str]] = None, + duplicate_detection_history_time_window: Optional[pulumi.Input[str]] = None, + enable_batched_operations: Optional[pulumi.Input[bool]] = None, + enable_express: Optional[pulumi.Input[bool]] = None, + enable_partitioning: Optional[pulumi.Input[bool]] = None, + forward_dead_lettered_messages_to: Optional[pulumi.Input[str]] = None, + forward_to: Optional[pulumi.Input[str]] = None, + lock_duration: Optional[pulumi.Input[str]] = None, + max_delivery_count: Optional[pulumi.Input[int]] = None, + max_message_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + max_size_in_megabytes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + requires_duplicate_detection: Optional[pulumi.Input[bool]] = None, + requires_session: Optional[pulumi.Input[bool]] = None, + status: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if namespace_id is None: + raise TypeError("Missing 'namespace_id' argument") + if auto_delete_on_idle is None and 'autoDeleteOnIdle' in kwargs: + auto_delete_on_idle = kwargs['autoDeleteOnIdle'] + if dead_lettering_on_message_expiration is None and 'deadLetteringOnMessageExpiration' in kwargs: + dead_lettering_on_message_expiration = kwargs['deadLetteringOnMessageExpiration'] + if default_message_ttl is None and 'defaultMessageTtl' in kwargs: + default_message_ttl = kwargs['defaultMessageTtl'] + if duplicate_detection_history_time_window is None and 'duplicateDetectionHistoryTimeWindow' in kwargs: + duplicate_detection_history_time_window = kwargs['duplicateDetectionHistoryTimeWindow'] + if enable_batched_operations is None and 'enableBatchedOperations' in kwargs: + enable_batched_operations = kwargs['enableBatchedOperations'] + if enable_express is None and 'enableExpress' in kwargs: + enable_express = kwargs['enableExpress'] + if enable_partitioning is None and 'enablePartitioning' in kwargs: + enable_partitioning = kwargs['enablePartitioning'] + if forward_dead_lettered_messages_to is None and 'forwardDeadLetteredMessagesTo' in kwargs: + forward_dead_lettered_messages_to = kwargs['forwardDeadLetteredMessagesTo'] + if forward_to is None and 'forwardTo' in kwargs: + forward_to = kwargs['forwardTo'] + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if max_message_size_in_kilobytes is None and 'maxMessageSizeInKilobytes' in kwargs: + max_message_size_in_kilobytes = kwargs['maxMessageSizeInKilobytes'] + if max_size_in_megabytes is None and 'maxSizeInMegabytes' in kwargs: + max_size_in_megabytes = kwargs['maxSizeInMegabytes'] + if requires_duplicate_detection is None and 'requiresDuplicateDetection' in kwargs: + requires_duplicate_detection = kwargs['requiresDuplicateDetection'] + if requires_session is None and 'requiresSession' in kwargs: + requires_session = kwargs['requiresSession'] + + _setter("namespace_id", namespace_id) if auto_delete_on_idle is not None: - pulumi.set(__self__, "auto_delete_on_idle", auto_delete_on_idle) + _setter("auto_delete_on_idle", auto_delete_on_idle) if dead_lettering_on_message_expiration is not None: - pulumi.set(__self__, "dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) + _setter("dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) if default_message_ttl is not None: - pulumi.set(__self__, "default_message_ttl", default_message_ttl) + _setter("default_message_ttl", default_message_ttl) if duplicate_detection_history_time_window is not None: - pulumi.set(__self__, "duplicate_detection_history_time_window", duplicate_detection_history_time_window) + _setter("duplicate_detection_history_time_window", duplicate_detection_history_time_window) if enable_batched_operations is not None: - pulumi.set(__self__, "enable_batched_operations", enable_batched_operations) + _setter("enable_batched_operations", enable_batched_operations) if enable_express is not None: - pulumi.set(__self__, "enable_express", enable_express) + _setter("enable_express", enable_express) if enable_partitioning is not None: - pulumi.set(__self__, "enable_partitioning", enable_partitioning) + _setter("enable_partitioning", enable_partitioning) if forward_dead_lettered_messages_to is not None: - pulumi.set(__self__, "forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) + _setter("forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) if forward_to is not None: - pulumi.set(__self__, "forward_to", forward_to) + _setter("forward_to", forward_to) if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) if max_message_size_in_kilobytes is not None: - pulumi.set(__self__, "max_message_size_in_kilobytes", max_message_size_in_kilobytes) + _setter("max_message_size_in_kilobytes", max_message_size_in_kilobytes) if max_size_in_megabytes is not None: - pulumi.set(__self__, "max_size_in_megabytes", max_size_in_megabytes) + _setter("max_size_in_megabytes", max_size_in_megabytes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if requires_duplicate_detection is not None: - pulumi.set(__self__, "requires_duplicate_detection", requires_duplicate_detection) + _setter("requires_duplicate_detection", requires_duplicate_detection) if requires_session is not None: - pulumi.set(__self__, "requires_session", requires_session) + _setter("requires_session", requires_session) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) @property @pulumi.getter(name="namespaceId") @@ -362,46 +441,131 @@ def __init__(__self__, *, :param pulumi.Input[bool] requires_session: Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`. :param pulumi.Input[str] status: The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`. """ + _QueueState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_delete_on_idle=auto_delete_on_idle, + dead_lettering_on_message_expiration=dead_lettering_on_message_expiration, + default_message_ttl=default_message_ttl, + duplicate_detection_history_time_window=duplicate_detection_history_time_window, + enable_batched_operations=enable_batched_operations, + enable_express=enable_express, + enable_partitioning=enable_partitioning, + forward_dead_lettered_messages_to=forward_dead_lettered_messages_to, + forward_to=forward_to, + lock_duration=lock_duration, + max_delivery_count=max_delivery_count, + max_message_size_in_kilobytes=max_message_size_in_kilobytes, + max_size_in_megabytes=max_size_in_megabytes, + name=name, + namespace_id=namespace_id, + namespace_name=namespace_name, + requires_duplicate_detection=requires_duplicate_detection, + requires_session=requires_session, + resource_group_name=resource_group_name, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_delete_on_idle: Optional[pulumi.Input[str]] = None, + dead_lettering_on_message_expiration: Optional[pulumi.Input[bool]] = None, + default_message_ttl: Optional[pulumi.Input[str]] = None, + duplicate_detection_history_time_window: Optional[pulumi.Input[str]] = None, + enable_batched_operations: Optional[pulumi.Input[bool]] = None, + enable_express: Optional[pulumi.Input[bool]] = None, + enable_partitioning: Optional[pulumi.Input[bool]] = None, + forward_dead_lettered_messages_to: Optional[pulumi.Input[str]] = None, + forward_to: Optional[pulumi.Input[str]] = None, + lock_duration: Optional[pulumi.Input[str]] = None, + max_delivery_count: Optional[pulumi.Input[int]] = None, + max_message_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + max_size_in_megabytes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_id: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + requires_duplicate_detection: Optional[pulumi.Input[bool]] = None, + requires_session: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_delete_on_idle is None and 'autoDeleteOnIdle' in kwargs: + auto_delete_on_idle = kwargs['autoDeleteOnIdle'] + if dead_lettering_on_message_expiration is None and 'deadLetteringOnMessageExpiration' in kwargs: + dead_lettering_on_message_expiration = kwargs['deadLetteringOnMessageExpiration'] + if default_message_ttl is None and 'defaultMessageTtl' in kwargs: + default_message_ttl = kwargs['defaultMessageTtl'] + if duplicate_detection_history_time_window is None and 'duplicateDetectionHistoryTimeWindow' in kwargs: + duplicate_detection_history_time_window = kwargs['duplicateDetectionHistoryTimeWindow'] + if enable_batched_operations is None and 'enableBatchedOperations' in kwargs: + enable_batched_operations = kwargs['enableBatchedOperations'] + if enable_express is None and 'enableExpress' in kwargs: + enable_express = kwargs['enableExpress'] + if enable_partitioning is None and 'enablePartitioning' in kwargs: + enable_partitioning = kwargs['enablePartitioning'] + if forward_dead_lettered_messages_to is None and 'forwardDeadLetteredMessagesTo' in kwargs: + forward_dead_lettered_messages_to = kwargs['forwardDeadLetteredMessagesTo'] + if forward_to is None and 'forwardTo' in kwargs: + forward_to = kwargs['forwardTo'] + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if max_message_size_in_kilobytes is None and 'maxMessageSizeInKilobytes' in kwargs: + max_message_size_in_kilobytes = kwargs['maxMessageSizeInKilobytes'] + if max_size_in_megabytes is None and 'maxSizeInMegabytes' in kwargs: + max_size_in_megabytes = kwargs['maxSizeInMegabytes'] + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if requires_duplicate_detection is None and 'requiresDuplicateDetection' in kwargs: + requires_duplicate_detection = kwargs['requiresDuplicateDetection'] + if requires_session is None and 'requiresSession' in kwargs: + requires_session = kwargs['requiresSession'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if auto_delete_on_idle is not None: - pulumi.set(__self__, "auto_delete_on_idle", auto_delete_on_idle) + _setter("auto_delete_on_idle", auto_delete_on_idle) if dead_lettering_on_message_expiration is not None: - pulumi.set(__self__, "dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) + _setter("dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) if default_message_ttl is not None: - pulumi.set(__self__, "default_message_ttl", default_message_ttl) + _setter("default_message_ttl", default_message_ttl) if duplicate_detection_history_time_window is not None: - pulumi.set(__self__, "duplicate_detection_history_time_window", duplicate_detection_history_time_window) + _setter("duplicate_detection_history_time_window", duplicate_detection_history_time_window) if enable_batched_operations is not None: - pulumi.set(__self__, "enable_batched_operations", enable_batched_operations) + _setter("enable_batched_operations", enable_batched_operations) if enable_express is not None: - pulumi.set(__self__, "enable_express", enable_express) + _setter("enable_express", enable_express) if enable_partitioning is not None: - pulumi.set(__self__, "enable_partitioning", enable_partitioning) + _setter("enable_partitioning", enable_partitioning) if forward_dead_lettered_messages_to is not None: - pulumi.set(__self__, "forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) + _setter("forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) if forward_to is not None: - pulumi.set(__self__, "forward_to", forward_to) + _setter("forward_to", forward_to) if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) if max_message_size_in_kilobytes is not None: - pulumi.set(__self__, "max_message_size_in_kilobytes", max_message_size_in_kilobytes) + _setter("max_message_size_in_kilobytes", max_message_size_in_kilobytes) if max_size_in_megabytes is not None: - pulumi.set(__self__, "max_size_in_megabytes", max_size_in_megabytes) + _setter("max_size_in_megabytes", max_size_in_megabytes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_id is not None: - pulumi.set(__self__, "namespace_id", namespace_id) + _setter("namespace_id", namespace_id) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if requires_duplicate_detection is not None: - pulumi.set(__self__, "requires_duplicate_detection", requires_duplicate_detection) + _setter("requires_duplicate_detection", requires_duplicate_detection) if requires_session is not None: - pulumi.set(__self__, "requires_session", requires_session) + _setter("requires_session", requires_session) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) @property @pulumi.getter(name="autoDeleteOnIdle") @@ -767,6 +931,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + QueueArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/servicebus/queue_authorization_rule.py b/sdk/python/pulumi_azure/servicebus/queue_authorization_rule.py index 976e342579..5ad393d2c0 100644 --- a/sdk/python/pulumi_azure/servicebus/queue_authorization_rule.py +++ b/sdk/python/pulumi_azure/servicebus/queue_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['QueueAuthorizationRuleArgs', 'QueueAuthorizationRule'] @@ -29,15 +29,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Authorization Rule. Changing this forces a new resource to be created. :param pulumi.Input[bool] send: Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`. """ - pulumi.set(__self__, "queue_id", queue_id) + QueueAuthorizationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + queue_id=queue_id, + listen=listen, + manage=manage, + name=name, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + queue_id: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if queue_id is None and 'queueId' in kwargs: + queue_id = kwargs['queueId'] + if queue_id is None: + raise TypeError("Missing 'queue_id' argument") + + _setter("queue_id", queue_id) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="queueId") @@ -132,28 +155,73 @@ def __init__(__self__, *, :param pulumi.Input[str] secondary_key: The Secondary Key for the Authorization Rule. :param pulumi.Input[bool] send: Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`. """ + _QueueAuthorizationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + listen=listen, + manage=manage, + name=name, + primary_connection_string=primary_connection_string, + primary_connection_string_alias=primary_connection_string_alias, + primary_key=primary_key, + queue_id=queue_id, + secondary_connection_string=secondary_connection_string, + secondary_connection_string_alias=secondary_connection_string_alias, + secondary_key=secondary_key, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_connection_string_alias: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + queue_id: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_connection_string_alias: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_connection_string_alias is None and 'primaryConnectionStringAlias' in kwargs: + primary_connection_string_alias = kwargs['primaryConnectionStringAlias'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if queue_id is None and 'queueId' in kwargs: + queue_id = kwargs['queueId'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_connection_string_alias is None and 'secondaryConnectionStringAlias' in kwargs: + secondary_connection_string_alias = kwargs['secondaryConnectionStringAlias'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_connection_string_alias is not None: - pulumi.set(__self__, "primary_connection_string_alias", primary_connection_string_alias) + _setter("primary_connection_string_alias", primary_connection_string_alias) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if queue_id is not None: - pulumi.set(__self__, "queue_id", queue_id) + _setter("queue_id", queue_id) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_connection_string_alias is not None: - pulumi.set(__self__, "secondary_connection_string_alias", secondary_connection_string_alias) + _setter("secondary_connection_string_alias", secondary_connection_string_alias) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter @@ -397,6 +465,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + QueueAuthorizationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/servicebus/subscription.py b/sdk/python/pulumi_azure/servicebus/subscription.py index 7d064a959a..384008fa87 100644 --- a/sdk/python/pulumi_azure/servicebus/subscription.py +++ b/sdk/python/pulumi_azure/servicebus/subscription.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -51,34 +51,103 @@ def __init__(__self__, *, :param pulumi.Input[bool] requires_session: Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created. :param pulumi.Input[str] status: The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`. """ - pulumi.set(__self__, "max_delivery_count", max_delivery_count) - pulumi.set(__self__, "topic_id", topic_id) + SubscriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_delivery_count=max_delivery_count, + topic_id=topic_id, + auto_delete_on_idle=auto_delete_on_idle, + client_scoped_subscription=client_scoped_subscription, + client_scoped_subscription_enabled=client_scoped_subscription_enabled, + dead_lettering_on_filter_evaluation_error=dead_lettering_on_filter_evaluation_error, + dead_lettering_on_message_expiration=dead_lettering_on_message_expiration, + default_message_ttl=default_message_ttl, + enable_batched_operations=enable_batched_operations, + forward_dead_lettered_messages_to=forward_dead_lettered_messages_to, + forward_to=forward_to, + lock_duration=lock_duration, + name=name, + requires_session=requires_session, + status=status, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_delivery_count: Optional[pulumi.Input[int]] = None, + topic_id: Optional[pulumi.Input[str]] = None, + auto_delete_on_idle: Optional[pulumi.Input[str]] = None, + client_scoped_subscription: Optional[pulumi.Input['SubscriptionClientScopedSubscriptionArgs']] = None, + client_scoped_subscription_enabled: Optional[pulumi.Input[bool]] = None, + dead_lettering_on_filter_evaluation_error: Optional[pulumi.Input[bool]] = None, + dead_lettering_on_message_expiration: Optional[pulumi.Input[bool]] = None, + default_message_ttl: Optional[pulumi.Input[str]] = None, + enable_batched_operations: Optional[pulumi.Input[bool]] = None, + forward_dead_lettered_messages_to: Optional[pulumi.Input[str]] = None, + forward_to: Optional[pulumi.Input[str]] = None, + lock_duration: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + requires_session: Optional[pulumi.Input[bool]] = None, + status: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if max_delivery_count is None: + raise TypeError("Missing 'max_delivery_count' argument") + if topic_id is None and 'topicId' in kwargs: + topic_id = kwargs['topicId'] + if topic_id is None: + raise TypeError("Missing 'topic_id' argument") + if auto_delete_on_idle is None and 'autoDeleteOnIdle' in kwargs: + auto_delete_on_idle = kwargs['autoDeleteOnIdle'] + if client_scoped_subscription is None and 'clientScopedSubscription' in kwargs: + client_scoped_subscription = kwargs['clientScopedSubscription'] + if client_scoped_subscription_enabled is None and 'clientScopedSubscriptionEnabled' in kwargs: + client_scoped_subscription_enabled = kwargs['clientScopedSubscriptionEnabled'] + if dead_lettering_on_filter_evaluation_error is None and 'deadLetteringOnFilterEvaluationError' in kwargs: + dead_lettering_on_filter_evaluation_error = kwargs['deadLetteringOnFilterEvaluationError'] + if dead_lettering_on_message_expiration is None and 'deadLetteringOnMessageExpiration' in kwargs: + dead_lettering_on_message_expiration = kwargs['deadLetteringOnMessageExpiration'] + if default_message_ttl is None and 'defaultMessageTtl' in kwargs: + default_message_ttl = kwargs['defaultMessageTtl'] + if enable_batched_operations is None and 'enableBatchedOperations' in kwargs: + enable_batched_operations = kwargs['enableBatchedOperations'] + if forward_dead_lettered_messages_to is None and 'forwardDeadLetteredMessagesTo' in kwargs: + forward_dead_lettered_messages_to = kwargs['forwardDeadLetteredMessagesTo'] + if forward_to is None and 'forwardTo' in kwargs: + forward_to = kwargs['forwardTo'] + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if requires_session is None and 'requiresSession' in kwargs: + requires_session = kwargs['requiresSession'] + + _setter("max_delivery_count", max_delivery_count) + _setter("topic_id", topic_id) if auto_delete_on_idle is not None: - pulumi.set(__self__, "auto_delete_on_idle", auto_delete_on_idle) + _setter("auto_delete_on_idle", auto_delete_on_idle) if client_scoped_subscription is not None: - pulumi.set(__self__, "client_scoped_subscription", client_scoped_subscription) + _setter("client_scoped_subscription", client_scoped_subscription) if client_scoped_subscription_enabled is not None: - pulumi.set(__self__, "client_scoped_subscription_enabled", client_scoped_subscription_enabled) + _setter("client_scoped_subscription_enabled", client_scoped_subscription_enabled) if dead_lettering_on_filter_evaluation_error is not None: - pulumi.set(__self__, "dead_lettering_on_filter_evaluation_error", dead_lettering_on_filter_evaluation_error) + _setter("dead_lettering_on_filter_evaluation_error", dead_lettering_on_filter_evaluation_error) if dead_lettering_on_message_expiration is not None: - pulumi.set(__self__, "dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) + _setter("dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) if default_message_ttl is not None: - pulumi.set(__self__, "default_message_ttl", default_message_ttl) + _setter("default_message_ttl", default_message_ttl) if enable_batched_operations is not None: - pulumi.set(__self__, "enable_batched_operations", enable_batched_operations) + _setter("enable_batched_operations", enable_batched_operations) if forward_dead_lettered_messages_to is not None: - pulumi.set(__self__, "forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) + _setter("forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) if forward_to is not None: - pulumi.set(__self__, "forward_to", forward_to) + _setter("forward_to", forward_to) if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if requires_session is not None: - pulumi.set(__self__, "requires_session", requires_session) + _setter("requires_session", requires_session) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) @property @pulumi.getter(name="maxDeliveryCount") @@ -301,36 +370,101 @@ def __init__(__self__, *, :param pulumi.Input[str] status: The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`. :param pulumi.Input[str] topic_id: The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created. """ + _SubscriptionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_delete_on_idle=auto_delete_on_idle, + client_scoped_subscription=client_scoped_subscription, + client_scoped_subscription_enabled=client_scoped_subscription_enabled, + dead_lettering_on_filter_evaluation_error=dead_lettering_on_filter_evaluation_error, + dead_lettering_on_message_expiration=dead_lettering_on_message_expiration, + default_message_ttl=default_message_ttl, + enable_batched_operations=enable_batched_operations, + forward_dead_lettered_messages_to=forward_dead_lettered_messages_to, + forward_to=forward_to, + lock_duration=lock_duration, + max_delivery_count=max_delivery_count, + name=name, + requires_session=requires_session, + status=status, + topic_id=topic_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_delete_on_idle: Optional[pulumi.Input[str]] = None, + client_scoped_subscription: Optional[pulumi.Input['SubscriptionClientScopedSubscriptionArgs']] = None, + client_scoped_subscription_enabled: Optional[pulumi.Input[bool]] = None, + dead_lettering_on_filter_evaluation_error: Optional[pulumi.Input[bool]] = None, + dead_lettering_on_message_expiration: Optional[pulumi.Input[bool]] = None, + default_message_ttl: Optional[pulumi.Input[str]] = None, + enable_batched_operations: Optional[pulumi.Input[bool]] = None, + forward_dead_lettered_messages_to: Optional[pulumi.Input[str]] = None, + forward_to: Optional[pulumi.Input[str]] = None, + lock_duration: Optional[pulumi.Input[str]] = None, + max_delivery_count: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + requires_session: Optional[pulumi.Input[bool]] = None, + status: Optional[pulumi.Input[str]] = None, + topic_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_delete_on_idle is None and 'autoDeleteOnIdle' in kwargs: + auto_delete_on_idle = kwargs['autoDeleteOnIdle'] + if client_scoped_subscription is None and 'clientScopedSubscription' in kwargs: + client_scoped_subscription = kwargs['clientScopedSubscription'] + if client_scoped_subscription_enabled is None and 'clientScopedSubscriptionEnabled' in kwargs: + client_scoped_subscription_enabled = kwargs['clientScopedSubscriptionEnabled'] + if dead_lettering_on_filter_evaluation_error is None and 'deadLetteringOnFilterEvaluationError' in kwargs: + dead_lettering_on_filter_evaluation_error = kwargs['deadLetteringOnFilterEvaluationError'] + if dead_lettering_on_message_expiration is None and 'deadLetteringOnMessageExpiration' in kwargs: + dead_lettering_on_message_expiration = kwargs['deadLetteringOnMessageExpiration'] + if default_message_ttl is None and 'defaultMessageTtl' in kwargs: + default_message_ttl = kwargs['defaultMessageTtl'] + if enable_batched_operations is None and 'enableBatchedOperations' in kwargs: + enable_batched_operations = kwargs['enableBatchedOperations'] + if forward_dead_lettered_messages_to is None and 'forwardDeadLetteredMessagesTo' in kwargs: + forward_dead_lettered_messages_to = kwargs['forwardDeadLetteredMessagesTo'] + if forward_to is None and 'forwardTo' in kwargs: + forward_to = kwargs['forwardTo'] + if lock_duration is None and 'lockDuration' in kwargs: + lock_duration = kwargs['lockDuration'] + if max_delivery_count is None and 'maxDeliveryCount' in kwargs: + max_delivery_count = kwargs['maxDeliveryCount'] + if requires_session is None and 'requiresSession' in kwargs: + requires_session = kwargs['requiresSession'] + if topic_id is None and 'topicId' in kwargs: + topic_id = kwargs['topicId'] + if auto_delete_on_idle is not None: - pulumi.set(__self__, "auto_delete_on_idle", auto_delete_on_idle) + _setter("auto_delete_on_idle", auto_delete_on_idle) if client_scoped_subscription is not None: - pulumi.set(__self__, "client_scoped_subscription", client_scoped_subscription) + _setter("client_scoped_subscription", client_scoped_subscription) if client_scoped_subscription_enabled is not None: - pulumi.set(__self__, "client_scoped_subscription_enabled", client_scoped_subscription_enabled) + _setter("client_scoped_subscription_enabled", client_scoped_subscription_enabled) if dead_lettering_on_filter_evaluation_error is not None: - pulumi.set(__self__, "dead_lettering_on_filter_evaluation_error", dead_lettering_on_filter_evaluation_error) + _setter("dead_lettering_on_filter_evaluation_error", dead_lettering_on_filter_evaluation_error) if dead_lettering_on_message_expiration is not None: - pulumi.set(__self__, "dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) + _setter("dead_lettering_on_message_expiration", dead_lettering_on_message_expiration) if default_message_ttl is not None: - pulumi.set(__self__, "default_message_ttl", default_message_ttl) + _setter("default_message_ttl", default_message_ttl) if enable_batched_operations is not None: - pulumi.set(__self__, "enable_batched_operations", enable_batched_operations) + _setter("enable_batched_operations", enable_batched_operations) if forward_dead_lettered_messages_to is not None: - pulumi.set(__self__, "forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) + _setter("forward_dead_lettered_messages_to", forward_dead_lettered_messages_to) if forward_to is not None: - pulumi.set(__self__, "forward_to", forward_to) + _setter("forward_to", forward_to) if lock_duration is not None: - pulumi.set(__self__, "lock_duration", lock_duration) + _setter("lock_duration", lock_duration) if max_delivery_count is not None: - pulumi.set(__self__, "max_delivery_count", max_delivery_count) + _setter("max_delivery_count", max_delivery_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if requires_session is not None: - pulumi.set(__self__, "requires_session", requires_session) + _setter("requires_session", requires_session) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if topic_id is not None: - pulumi.set(__self__, "topic_id", topic_id) + _setter("topic_id", topic_id) @property @pulumi.getter(name="autoDeleteOnIdle") @@ -638,6 +772,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubscriptionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -668,6 +806,11 @@ def _internal_init(__self__, __props__ = SubscriptionArgs.__new__(SubscriptionArgs) __props__.__dict__["auto_delete_on_idle"] = auto_delete_on_idle + if client_scoped_subscription is not None and not isinstance(client_scoped_subscription, SubscriptionClientScopedSubscriptionArgs): + client_scoped_subscription = client_scoped_subscription or {} + def _setter(key, value): + client_scoped_subscription[key] = value + SubscriptionClientScopedSubscriptionArgs._configure(_setter, **client_scoped_subscription) __props__.__dict__["client_scoped_subscription"] = client_scoped_subscription __props__.__dict__["client_scoped_subscription_enabled"] = client_scoped_subscription_enabled __props__.__dict__["dead_lettering_on_filter_evaluation_error"] = dead_lettering_on_filter_evaluation_error diff --git a/sdk/python/pulumi_azure/servicebus/subscription_rule.py b/sdk/python/pulumi_azure/servicebus/subscription_rule.py index 492acc9a2d..9b55b0a14b 100644 --- a/sdk/python/pulumi_azure/servicebus/subscription_rule.py +++ b/sdk/python/pulumi_azure/servicebus/subscription_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,16 +31,49 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created. :param pulumi.Input[str] sql_filter: Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `SqlFilter`. """ - pulumi.set(__self__, "filter_type", filter_type) - pulumi.set(__self__, "subscription_id", subscription_id) + SubscriptionRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filter_type=filter_type, + subscription_id=subscription_id, + action=action, + correlation_filter=correlation_filter, + name=name, + sql_filter=sql_filter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filter_type: Optional[pulumi.Input[str]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + action: Optional[pulumi.Input[str]] = None, + correlation_filter: Optional[pulumi.Input['SubscriptionRuleCorrelationFilterArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + sql_filter: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filter_type is None and 'filterType' in kwargs: + filter_type = kwargs['filterType'] + if filter_type is None: + raise TypeError("Missing 'filter_type' argument") + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if subscription_id is None: + raise TypeError("Missing 'subscription_id' argument") + if correlation_filter is None and 'correlationFilter' in kwargs: + correlation_filter = kwargs['correlationFilter'] + if sql_filter is None and 'sqlFilter' in kwargs: + sql_filter = kwargs['sqlFilter'] + + _setter("filter_type", filter_type) + _setter("subscription_id", subscription_id) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if correlation_filter is not None: - pulumi.set(__self__, "correlation_filter", correlation_filter) + _setter("correlation_filter", correlation_filter) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sql_filter is not None: - pulumi.set(__self__, "sql_filter", sql_filter) + _setter("sql_filter", sql_filter) @property @pulumi.getter(name="filterType") @@ -134,20 +167,53 @@ def __init__(__self__, *, :param pulumi.Input[str] sql_filter: Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `SqlFilter`. :param pulumi.Input[str] subscription_id: The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created. """ + _SubscriptionRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + correlation_filter=correlation_filter, + filter_type=filter_type, + name=name, + sql_filter=sql_filter, + sql_filter_compatibility_level=sql_filter_compatibility_level, + subscription_id=subscription_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + correlation_filter: Optional[pulumi.Input['SubscriptionRuleCorrelationFilterArgs']] = None, + filter_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sql_filter: Optional[pulumi.Input[str]] = None, + sql_filter_compatibility_level: Optional[pulumi.Input[int]] = None, + subscription_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if correlation_filter is None and 'correlationFilter' in kwargs: + correlation_filter = kwargs['correlationFilter'] + if filter_type is None and 'filterType' in kwargs: + filter_type = kwargs['filterType'] + if sql_filter is None and 'sqlFilter' in kwargs: + sql_filter = kwargs['sqlFilter'] + if sql_filter_compatibility_level is None and 'sqlFilterCompatibilityLevel' in kwargs: + sql_filter_compatibility_level = kwargs['sqlFilterCompatibilityLevel'] + if subscription_id is None and 'subscriptionId' in kwargs: + subscription_id = kwargs['subscriptionId'] + if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if correlation_filter is not None: - pulumi.set(__self__, "correlation_filter", correlation_filter) + _setter("correlation_filter", correlation_filter) if filter_type is not None: - pulumi.set(__self__, "filter_type", filter_type) + _setter("filter_type", filter_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sql_filter is not None: - pulumi.set(__self__, "sql_filter", sql_filter) + _setter("sql_filter", sql_filter) if sql_filter_compatibility_level is not None: - pulumi.set(__self__, "sql_filter_compatibility_level", sql_filter_compatibility_level) + _setter("sql_filter_compatibility_level", sql_filter_compatibility_level) if subscription_id is not None: - pulumi.set(__self__, "subscription_id", subscription_id) + _setter("subscription_id", subscription_id) @property @pulumi.getter @@ -406,6 +472,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SubscriptionRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -427,6 +497,11 @@ def _internal_init(__self__, __props__ = SubscriptionRuleArgs.__new__(SubscriptionRuleArgs) __props__.__dict__["action"] = action + if correlation_filter is not None and not isinstance(correlation_filter, SubscriptionRuleCorrelationFilterArgs): + correlation_filter = correlation_filter or {} + def _setter(key, value): + correlation_filter[key] = value + SubscriptionRuleCorrelationFilterArgs._configure(_setter, **correlation_filter) __props__.__dict__["correlation_filter"] = correlation_filter if filter_type is None and not opts.urn: raise TypeError("Missing required property 'filter_type'") diff --git a/sdk/python/pulumi_azure/servicebus/topic.py b/sdk/python/pulumi_azure/servicebus/topic.py index 844e9365e5..e84c167717 100644 --- a/sdk/python/pulumi_azure/servicebus/topic.py +++ b/sdk/python/pulumi_azure/servicebus/topic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TopicArgs', 'Topic'] @@ -48,31 +48,90 @@ def __init__(__self__, *, :param pulumi.Input[str] status: The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`. :param pulumi.Input[bool] support_ordering: Boolean flag which controls whether the Topic supports ordering. """ - pulumi.set(__self__, "namespace_id", namespace_id) + TopicArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + namespace_id=namespace_id, + auto_delete_on_idle=auto_delete_on_idle, + default_message_ttl=default_message_ttl, + duplicate_detection_history_time_window=duplicate_detection_history_time_window, + enable_batched_operations=enable_batched_operations, + enable_express=enable_express, + enable_partitioning=enable_partitioning, + max_message_size_in_kilobytes=max_message_size_in_kilobytes, + max_size_in_megabytes=max_size_in_megabytes, + name=name, + requires_duplicate_detection=requires_duplicate_detection, + status=status, + support_ordering=support_ordering, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + namespace_id: Optional[pulumi.Input[str]] = None, + auto_delete_on_idle: Optional[pulumi.Input[str]] = None, + default_message_ttl: Optional[pulumi.Input[str]] = None, + duplicate_detection_history_time_window: Optional[pulumi.Input[str]] = None, + enable_batched_operations: Optional[pulumi.Input[bool]] = None, + enable_express: Optional[pulumi.Input[bool]] = None, + enable_partitioning: Optional[pulumi.Input[bool]] = None, + max_message_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + max_size_in_megabytes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + requires_duplicate_detection: Optional[pulumi.Input[bool]] = None, + status: Optional[pulumi.Input[str]] = None, + support_ordering: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if namespace_id is None: + raise TypeError("Missing 'namespace_id' argument") + if auto_delete_on_idle is None and 'autoDeleteOnIdle' in kwargs: + auto_delete_on_idle = kwargs['autoDeleteOnIdle'] + if default_message_ttl is None and 'defaultMessageTtl' in kwargs: + default_message_ttl = kwargs['defaultMessageTtl'] + if duplicate_detection_history_time_window is None and 'duplicateDetectionHistoryTimeWindow' in kwargs: + duplicate_detection_history_time_window = kwargs['duplicateDetectionHistoryTimeWindow'] + if enable_batched_operations is None and 'enableBatchedOperations' in kwargs: + enable_batched_operations = kwargs['enableBatchedOperations'] + if enable_express is None and 'enableExpress' in kwargs: + enable_express = kwargs['enableExpress'] + if enable_partitioning is None and 'enablePartitioning' in kwargs: + enable_partitioning = kwargs['enablePartitioning'] + if max_message_size_in_kilobytes is None and 'maxMessageSizeInKilobytes' in kwargs: + max_message_size_in_kilobytes = kwargs['maxMessageSizeInKilobytes'] + if max_size_in_megabytes is None and 'maxSizeInMegabytes' in kwargs: + max_size_in_megabytes = kwargs['maxSizeInMegabytes'] + if requires_duplicate_detection is None and 'requiresDuplicateDetection' in kwargs: + requires_duplicate_detection = kwargs['requiresDuplicateDetection'] + if support_ordering is None and 'supportOrdering' in kwargs: + support_ordering = kwargs['supportOrdering'] + + _setter("namespace_id", namespace_id) if auto_delete_on_idle is not None: - pulumi.set(__self__, "auto_delete_on_idle", auto_delete_on_idle) + _setter("auto_delete_on_idle", auto_delete_on_idle) if default_message_ttl is not None: - pulumi.set(__self__, "default_message_ttl", default_message_ttl) + _setter("default_message_ttl", default_message_ttl) if duplicate_detection_history_time_window is not None: - pulumi.set(__self__, "duplicate_detection_history_time_window", duplicate_detection_history_time_window) + _setter("duplicate_detection_history_time_window", duplicate_detection_history_time_window) if enable_batched_operations is not None: - pulumi.set(__self__, "enable_batched_operations", enable_batched_operations) + _setter("enable_batched_operations", enable_batched_operations) if enable_express is not None: - pulumi.set(__self__, "enable_express", enable_express) + _setter("enable_express", enable_express) if enable_partitioning is not None: - pulumi.set(__self__, "enable_partitioning", enable_partitioning) + _setter("enable_partitioning", enable_partitioning) if max_message_size_in_kilobytes is not None: - pulumi.set(__self__, "max_message_size_in_kilobytes", max_message_size_in_kilobytes) + _setter("max_message_size_in_kilobytes", max_message_size_in_kilobytes) if max_size_in_megabytes is not None: - pulumi.set(__self__, "max_size_in_megabytes", max_size_in_megabytes) + _setter("max_size_in_megabytes", max_size_in_megabytes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if requires_duplicate_detection is not None: - pulumi.set(__self__, "requires_duplicate_detection", requires_duplicate_detection) + _setter("requires_duplicate_detection", requires_duplicate_detection) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if support_ordering is not None: - pulumi.set(__self__, "support_ordering", support_ordering) + _setter("support_ordering", support_ordering) @property @pulumi.getter(name="namespaceId") @@ -275,36 +334,101 @@ def __init__(__self__, *, :param pulumi.Input[str] status: The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`. :param pulumi.Input[bool] support_ordering: Boolean flag which controls whether the Topic supports ordering. """ + _TopicState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_delete_on_idle=auto_delete_on_idle, + default_message_ttl=default_message_ttl, + duplicate_detection_history_time_window=duplicate_detection_history_time_window, + enable_batched_operations=enable_batched_operations, + enable_express=enable_express, + enable_partitioning=enable_partitioning, + max_message_size_in_kilobytes=max_message_size_in_kilobytes, + max_size_in_megabytes=max_size_in_megabytes, + name=name, + namespace_id=namespace_id, + namespace_name=namespace_name, + requires_duplicate_detection=requires_duplicate_detection, + resource_group_name=resource_group_name, + status=status, + support_ordering=support_ordering, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_delete_on_idle: Optional[pulumi.Input[str]] = None, + default_message_ttl: Optional[pulumi.Input[str]] = None, + duplicate_detection_history_time_window: Optional[pulumi.Input[str]] = None, + enable_batched_operations: Optional[pulumi.Input[bool]] = None, + enable_express: Optional[pulumi.Input[bool]] = None, + enable_partitioning: Optional[pulumi.Input[bool]] = None, + max_message_size_in_kilobytes: Optional[pulumi.Input[int]] = None, + max_size_in_megabytes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + namespace_id: Optional[pulumi.Input[str]] = None, + namespace_name: Optional[pulumi.Input[str]] = None, + requires_duplicate_detection: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + support_ordering: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_delete_on_idle is None and 'autoDeleteOnIdle' in kwargs: + auto_delete_on_idle = kwargs['autoDeleteOnIdle'] + if default_message_ttl is None and 'defaultMessageTtl' in kwargs: + default_message_ttl = kwargs['defaultMessageTtl'] + if duplicate_detection_history_time_window is None and 'duplicateDetectionHistoryTimeWindow' in kwargs: + duplicate_detection_history_time_window = kwargs['duplicateDetectionHistoryTimeWindow'] + if enable_batched_operations is None and 'enableBatchedOperations' in kwargs: + enable_batched_operations = kwargs['enableBatchedOperations'] + if enable_express is None and 'enableExpress' in kwargs: + enable_express = kwargs['enableExpress'] + if enable_partitioning is None and 'enablePartitioning' in kwargs: + enable_partitioning = kwargs['enablePartitioning'] + if max_message_size_in_kilobytes is None and 'maxMessageSizeInKilobytes' in kwargs: + max_message_size_in_kilobytes = kwargs['maxMessageSizeInKilobytes'] + if max_size_in_megabytes is None and 'maxSizeInMegabytes' in kwargs: + max_size_in_megabytes = kwargs['maxSizeInMegabytes'] + if namespace_id is None and 'namespaceId' in kwargs: + namespace_id = kwargs['namespaceId'] + if namespace_name is None and 'namespaceName' in kwargs: + namespace_name = kwargs['namespaceName'] + if requires_duplicate_detection is None and 'requiresDuplicateDetection' in kwargs: + requires_duplicate_detection = kwargs['requiresDuplicateDetection'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if support_ordering is None and 'supportOrdering' in kwargs: + support_ordering = kwargs['supportOrdering'] + if auto_delete_on_idle is not None: - pulumi.set(__self__, "auto_delete_on_idle", auto_delete_on_idle) + _setter("auto_delete_on_idle", auto_delete_on_idle) if default_message_ttl is not None: - pulumi.set(__self__, "default_message_ttl", default_message_ttl) + _setter("default_message_ttl", default_message_ttl) if duplicate_detection_history_time_window is not None: - pulumi.set(__self__, "duplicate_detection_history_time_window", duplicate_detection_history_time_window) + _setter("duplicate_detection_history_time_window", duplicate_detection_history_time_window) if enable_batched_operations is not None: - pulumi.set(__self__, "enable_batched_operations", enable_batched_operations) + _setter("enable_batched_operations", enable_batched_operations) if enable_express is not None: - pulumi.set(__self__, "enable_express", enable_express) + _setter("enable_express", enable_express) if enable_partitioning is not None: - pulumi.set(__self__, "enable_partitioning", enable_partitioning) + _setter("enable_partitioning", enable_partitioning) if max_message_size_in_kilobytes is not None: - pulumi.set(__self__, "max_message_size_in_kilobytes", max_message_size_in_kilobytes) + _setter("max_message_size_in_kilobytes", max_message_size_in_kilobytes) if max_size_in_megabytes is not None: - pulumi.set(__self__, "max_size_in_megabytes", max_size_in_megabytes) + _setter("max_size_in_megabytes", max_size_in_megabytes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if namespace_id is not None: - pulumi.set(__self__, "namespace_id", namespace_id) + _setter("namespace_id", namespace_id) if namespace_name is not None: - pulumi.set(__self__, "namespace_name", namespace_name) + _setter("namespace_name", namespace_name) if requires_duplicate_detection is not None: - pulumi.set(__self__, "requires_duplicate_detection", requires_duplicate_detection) + _setter("requires_duplicate_detection", requires_duplicate_detection) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if support_ordering is not None: - pulumi.set(__self__, "support_ordering", support_ordering) + _setter("support_ordering", support_ordering) @property @pulumi.getter(name="autoDeleteOnIdle") @@ -606,6 +730,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TopicArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/servicebus/topic_authorization_rule.py b/sdk/python/pulumi_azure/servicebus/topic_authorization_rule.py index f7e33cf40d..98d4d0d656 100644 --- a/sdk/python/pulumi_azure/servicebus/topic_authorization_rule.py +++ b/sdk/python/pulumi_azure/servicebus/topic_authorization_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TopicAuthorizationRuleArgs', 'TopicAuthorizationRule'] @@ -29,15 +29,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created. :param pulumi.Input[bool] send: Grants send access to this this Authorization Rule. Defaults to `false`. """ - pulumi.set(__self__, "topic_id", topic_id) + TopicAuthorizationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + topic_id=topic_id, + listen=listen, + manage=manage, + name=name, + send=send, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + topic_id: Optional[pulumi.Input[str]] = None, + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if topic_id is None and 'topicId' in kwargs: + topic_id = kwargs['topicId'] + if topic_id is None: + raise TypeError("Missing 'topic_id' argument") + + _setter("topic_id", topic_id) if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) @property @pulumi.getter(name="topicId") @@ -132,28 +155,73 @@ def __init__(__self__, *, > **NOTE** At least one of the 3 permissions below needs to be set. """ + _TopicAuthorizationRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + listen=listen, + manage=manage, + name=name, + primary_connection_string=primary_connection_string, + primary_connection_string_alias=primary_connection_string_alias, + primary_key=primary_key, + secondary_connection_string=secondary_connection_string, + secondary_connection_string_alias=secondary_connection_string_alias, + secondary_key=secondary_key, + send=send, + topic_id=topic_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + listen: Optional[pulumi.Input[bool]] = None, + manage: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_connection_string_alias: Optional[pulumi.Input[str]] = None, + primary_key: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_connection_string_alias: Optional[pulumi.Input[str]] = None, + secondary_key: Optional[pulumi.Input[str]] = None, + send: Optional[pulumi.Input[bool]] = None, + topic_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_connection_string_alias is None and 'primaryConnectionStringAlias' in kwargs: + primary_connection_string_alias = kwargs['primaryConnectionStringAlias'] + if primary_key is None and 'primaryKey' in kwargs: + primary_key = kwargs['primaryKey'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_connection_string_alias is None and 'secondaryConnectionStringAlias' in kwargs: + secondary_connection_string_alias = kwargs['secondaryConnectionStringAlias'] + if secondary_key is None and 'secondaryKey' in kwargs: + secondary_key = kwargs['secondaryKey'] + if topic_id is None and 'topicId' in kwargs: + topic_id = kwargs['topicId'] + if listen is not None: - pulumi.set(__self__, "listen", listen) + _setter("listen", listen) if manage is not None: - pulumi.set(__self__, "manage", manage) + _setter("manage", manage) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_connection_string_alias is not None: - pulumi.set(__self__, "primary_connection_string_alias", primary_connection_string_alias) + _setter("primary_connection_string_alias", primary_connection_string_alias) if primary_key is not None: - pulumi.set(__self__, "primary_key", primary_key) + _setter("primary_key", primary_key) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_connection_string_alias is not None: - pulumi.set(__self__, "secondary_connection_string_alias", secondary_connection_string_alias) + _setter("secondary_connection_string_alias", secondary_connection_string_alias) if secondary_key is not None: - pulumi.set(__self__, "secondary_key", secondary_key) + _setter("secondary_key", secondary_key) if send is not None: - pulumi.set(__self__, "send", send) + _setter("send", send) if topic_id is not None: - pulumi.set(__self__, "topic_id", topic_id) + _setter("topic_id", topic_id) @property @pulumi.getter @@ -393,6 +461,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TopicAuthorizationRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/servicefabric/_inputs.py b/sdk/python/pulumi_azure/servicefabric/_inputs.py index 513341cee6..a4e5c66869 100644 --- a/sdk/python/pulumi_azure/servicefabric/_inputs.py +++ b/sdk/python/pulumi_azure/servicefabric/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -48,9 +48,36 @@ def __init__(__self__, *, :param pulumi.Input[str] cluster_application_id: The Azure Active Directory Cluster Application ID. :param pulumi.Input[str] tenant_id: The Azure Active Directory Tenant ID. """ - pulumi.set(__self__, "client_application_id", client_application_id) - pulumi.set(__self__, "cluster_application_id", cluster_application_id) - pulumi.set(__self__, "tenant_id", tenant_id) + ClusterAzureActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_application_id=client_application_id, + cluster_application_id=cluster_application_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_application_id: Optional[pulumi.Input[str]] = None, + cluster_application_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_application_id is None and 'clientApplicationId' in kwargs: + client_application_id = kwargs['clientApplicationId'] + if client_application_id is None: + raise TypeError("Missing 'client_application_id' argument") + if cluster_application_id is None and 'clusterApplicationId' in kwargs: + cluster_application_id = kwargs['clusterApplicationId'] + if cluster_application_id is None: + raise TypeError("Missing 'cluster_application_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("client_application_id", client_application_id) + _setter("cluster_application_id", cluster_application_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="clientApplicationId") @@ -100,10 +127,33 @@ def __init__(__self__, *, :param pulumi.Input[str] x509_store_name: The X509 Store where the Certificate Exists, such as `My`. :param pulumi.Input[str] thumbprint_secondary: The Secondary Thumbprint of the Certificate. """ - pulumi.set(__self__, "thumbprint", thumbprint) - pulumi.set(__self__, "x509_store_name", x509_store_name) + ClusterCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + thumbprint=thumbprint, + x509_store_name=x509_store_name, + thumbprint_secondary=thumbprint_secondary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + thumbprint: Optional[pulumi.Input[str]] = None, + x509_store_name: Optional[pulumi.Input[str]] = None, + thumbprint_secondary: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + if x509_store_name is None and 'x509StoreName' in kwargs: + x509_store_name = kwargs['x509StoreName'] + if x509_store_name is None: + raise TypeError("Missing 'x509_store_name' argument") + if thumbprint_secondary is None and 'thumbprintSecondary' in kwargs: + thumbprint_secondary = kwargs['thumbprintSecondary'] + + _setter("thumbprint", thumbprint) + _setter("x509_store_name", x509_store_name) if thumbprint_secondary is not None: - pulumi.set(__self__, "thumbprint_secondary", thumbprint_secondary) + _setter("thumbprint_secondary", thumbprint_secondary) @property @pulumi.getter @@ -151,8 +201,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ClusterCertificateCommonNamesCommonNameArgs']]] common_names: A `common_names` block as defined below. :param pulumi.Input[str] x509_store_name: The X509 Store where the Certificate Exists, such as `My`. """ - pulumi.set(__self__, "common_names", common_names) - pulumi.set(__self__, "x509_store_name", x509_store_name) + ClusterCertificateCommonNamesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + common_names=common_names, + x509_store_name=x509_store_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + common_names: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterCertificateCommonNamesCommonNameArgs']]]] = None, + x509_store_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if common_names is None and 'commonNames' in kwargs: + common_names = kwargs['commonNames'] + if common_names is None: + raise TypeError("Missing 'common_names' argument") + if x509_store_name is None and 'x509StoreName' in kwargs: + x509_store_name = kwargs['x509StoreName'] + if x509_store_name is None: + raise TypeError("Missing 'x509_store_name' argument") + + _setter("common_names", common_names) + _setter("x509_store_name", x509_store_name) @property @pulumi.getter(name="commonNames") @@ -190,9 +261,28 @@ def __init__(__self__, *, > **NOTE:** Certificate Issuer Thumbprint may become required in the future, `https://docs.microsoft.com/azure/service-fabric/service-fabric-create-cluster-using-cert-cn#download-and-update-a-sample-template`. """ - pulumi.set(__self__, "certificate_common_name", certificate_common_name) + ClusterCertificateCommonNamesCommonNameArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_common_name=certificate_common_name, + certificate_issuer_thumbprint=certificate_issuer_thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_common_name: Optional[pulumi.Input[str]] = None, + certificate_issuer_thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_common_name is None and 'certificateCommonName' in kwargs: + certificate_common_name = kwargs['certificateCommonName'] + if certificate_common_name is None: + raise TypeError("Missing 'certificate_common_name' argument") + if certificate_issuer_thumbprint is None and 'certificateIssuerThumbprint' in kwargs: + certificate_issuer_thumbprint = kwargs['certificateIssuerThumbprint'] + + _setter("certificate_common_name", certificate_common_name) if certificate_issuer_thumbprint is not None: - pulumi.set(__self__, "certificate_issuer_thumbprint", certificate_issuer_thumbprint) + _setter("certificate_issuer_thumbprint", certificate_issuer_thumbprint) @property @pulumi.getter(name="certificateCommonName") @@ -234,10 +324,35 @@ def __init__(__self__, *, > **NOTE:** Certificate Issuer Thumbprint may become required in the future, `https://docs.microsoft.com/azure/service-fabric/service-fabric-create-cluster-using-cert-cn#download-and-update-a-sample-template`. """ - pulumi.set(__self__, "common_name", common_name) - pulumi.set(__self__, "is_admin", is_admin) + ClusterClientCertificateCommonNameArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + common_name=common_name, + is_admin=is_admin, + issuer_thumbprint=issuer_thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + common_name: Optional[pulumi.Input[str]] = None, + is_admin: Optional[pulumi.Input[bool]] = None, + issuer_thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if common_name is None and 'commonName' in kwargs: + common_name = kwargs['commonName'] + if common_name is None: + raise TypeError("Missing 'common_name' argument") + if is_admin is None and 'isAdmin' in kwargs: + is_admin = kwargs['isAdmin'] + if is_admin is None: + raise TypeError("Missing 'is_admin' argument") + if issuer_thumbprint is None and 'issuerThumbprint' in kwargs: + issuer_thumbprint = kwargs['issuerThumbprint'] + + _setter("common_name", common_name) + _setter("is_admin", is_admin) if issuer_thumbprint is not None: - pulumi.set(__self__, "issuer_thumbprint", issuer_thumbprint) + _setter("issuer_thumbprint", issuer_thumbprint) @property @pulumi.getter(name="commonName") @@ -287,8 +402,27 @@ def __init__(__self__, *, :param pulumi.Input[bool] is_admin: Does the Client Certificate have Admin Access to the cluster? Non-admin clients can only perform read only operations on the cluster. :param pulumi.Input[str] thumbprint: The Thumbprint associated with the Client Certificate. """ - pulumi.set(__self__, "is_admin", is_admin) - pulumi.set(__self__, "thumbprint", thumbprint) + ClusterClientCertificateThumbprintArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_admin=is_admin, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_admin: Optional[pulumi.Input[bool]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_admin is None and 'isAdmin' in kwargs: + is_admin = kwargs['isAdmin'] + if is_admin is None: + raise TypeError("Missing 'is_admin' argument") + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + + _setter("is_admin", is_admin) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="isAdmin") @@ -330,11 +464,50 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_name: The name of the Storage Account where the Diagnostics should be sent to. :param pulumi.Input[str] table_endpoint: The Table Endpoint of the Storage Account. """ - pulumi.set(__self__, "blob_endpoint", blob_endpoint) - pulumi.set(__self__, "protected_account_key_name", protected_account_key_name) - pulumi.set(__self__, "queue_endpoint", queue_endpoint) - pulumi.set(__self__, "storage_account_name", storage_account_name) - pulumi.set(__self__, "table_endpoint", table_endpoint) + ClusterDiagnosticsConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_endpoint=blob_endpoint, + protected_account_key_name=protected_account_key_name, + queue_endpoint=queue_endpoint, + storage_account_name=storage_account_name, + table_endpoint=table_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_endpoint: Optional[pulumi.Input[str]] = None, + protected_account_key_name: Optional[pulumi.Input[str]] = None, + queue_endpoint: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + table_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_endpoint is None and 'blobEndpoint' in kwargs: + blob_endpoint = kwargs['blobEndpoint'] + if blob_endpoint is None: + raise TypeError("Missing 'blob_endpoint' argument") + if protected_account_key_name is None and 'protectedAccountKeyName' in kwargs: + protected_account_key_name = kwargs['protectedAccountKeyName'] + if protected_account_key_name is None: + raise TypeError("Missing 'protected_account_key_name' argument") + if queue_endpoint is None and 'queueEndpoint' in kwargs: + queue_endpoint = kwargs['queueEndpoint'] + if queue_endpoint is None: + raise TypeError("Missing 'queue_endpoint' argument") + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if table_endpoint is None and 'tableEndpoint' in kwargs: + table_endpoint = kwargs['tableEndpoint'] + if table_endpoint is None: + raise TypeError("Missing 'table_endpoint' argument") + + _setter("blob_endpoint", blob_endpoint) + _setter("protected_account_key_name", protected_account_key_name) + _setter("queue_endpoint", queue_endpoint) + _setter("storage_account_name", storage_account_name) + _setter("table_endpoint", table_endpoint) @property @pulumi.getter(name="blobEndpoint") @@ -406,9 +579,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Fabric Setting, such as `Security` or `Federation`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map containing settings for the specified Fabric Setting. """ - pulumi.set(__self__, "name", name) + ClusterFabricSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -466,27 +654,94 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run. :param pulumi.Input[int] reverse_proxy_endpoint_port: The Port used for the Reverse Proxy Endpoint for this Node Type. Changing this will upgrade the cluster. """ - pulumi.set(__self__, "client_endpoint_port", client_endpoint_port) - pulumi.set(__self__, "http_endpoint_port", http_endpoint_port) - pulumi.set(__self__, "instance_count", instance_count) - pulumi.set(__self__, "is_primary", is_primary) - pulumi.set(__self__, "name", name) + ClusterNodeTypeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_endpoint_port=client_endpoint_port, + http_endpoint_port=http_endpoint_port, + instance_count=instance_count, + is_primary=is_primary, + name=name, + application_ports=application_ports, + capacities=capacities, + durability_level=durability_level, + ephemeral_ports=ephemeral_ports, + is_stateless=is_stateless, + multiple_availability_zones=multiple_availability_zones, + placement_properties=placement_properties, + reverse_proxy_endpoint_port=reverse_proxy_endpoint_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_endpoint_port: Optional[pulumi.Input[int]] = None, + http_endpoint_port: Optional[pulumi.Input[int]] = None, + instance_count: Optional[pulumi.Input[int]] = None, + is_primary: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + application_ports: Optional[pulumi.Input['ClusterNodeTypeApplicationPortsArgs']] = None, + capacities: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + durability_level: Optional[pulumi.Input[str]] = None, + ephemeral_ports: Optional[pulumi.Input['ClusterNodeTypeEphemeralPortsArgs']] = None, + is_stateless: Optional[pulumi.Input[bool]] = None, + multiple_availability_zones: Optional[pulumi.Input[bool]] = None, + placement_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + reverse_proxy_endpoint_port: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_endpoint_port is None and 'clientEndpointPort' in kwargs: + client_endpoint_port = kwargs['clientEndpointPort'] + if client_endpoint_port is None: + raise TypeError("Missing 'client_endpoint_port' argument") + if http_endpoint_port is None and 'httpEndpointPort' in kwargs: + http_endpoint_port = kwargs['httpEndpointPort'] + if http_endpoint_port is None: + raise TypeError("Missing 'http_endpoint_port' argument") + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if instance_count is None: + raise TypeError("Missing 'instance_count' argument") + if is_primary is None and 'isPrimary' in kwargs: + is_primary = kwargs['isPrimary'] + if is_primary is None: + raise TypeError("Missing 'is_primary' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if application_ports is None and 'applicationPorts' in kwargs: + application_ports = kwargs['applicationPorts'] + if durability_level is None and 'durabilityLevel' in kwargs: + durability_level = kwargs['durabilityLevel'] + if ephemeral_ports is None and 'ephemeralPorts' in kwargs: + ephemeral_ports = kwargs['ephemeralPorts'] + if is_stateless is None and 'isStateless' in kwargs: + is_stateless = kwargs['isStateless'] + if multiple_availability_zones is None and 'multipleAvailabilityZones' in kwargs: + multiple_availability_zones = kwargs['multipleAvailabilityZones'] + if placement_properties is None and 'placementProperties' in kwargs: + placement_properties = kwargs['placementProperties'] + if reverse_proxy_endpoint_port is None and 'reverseProxyEndpointPort' in kwargs: + reverse_proxy_endpoint_port = kwargs['reverseProxyEndpointPort'] + + _setter("client_endpoint_port", client_endpoint_port) + _setter("http_endpoint_port", http_endpoint_port) + _setter("instance_count", instance_count) + _setter("is_primary", is_primary) + _setter("name", name) if application_ports is not None: - pulumi.set(__self__, "application_ports", application_ports) + _setter("application_ports", application_ports) if capacities is not None: - pulumi.set(__self__, "capacities", capacities) + _setter("capacities", capacities) if durability_level is not None: - pulumi.set(__self__, "durability_level", durability_level) + _setter("durability_level", durability_level) if ephemeral_ports is not None: - pulumi.set(__self__, "ephemeral_ports", ephemeral_ports) + _setter("ephemeral_ports", ephemeral_ports) if is_stateless is not None: - pulumi.set(__self__, "is_stateless", is_stateless) + _setter("is_stateless", is_stateless) if multiple_availability_zones is not None: - pulumi.set(__self__, "multiple_availability_zones", multiple_availability_zones) + _setter("multiple_availability_zones", multiple_availability_zones) if placement_properties is not None: - pulumi.set(__self__, "placement_properties", placement_properties) + _setter("placement_properties", placement_properties) if reverse_proxy_endpoint_port is not None: - pulumi.set(__self__, "reverse_proxy_endpoint_port", reverse_proxy_endpoint_port) + _setter("reverse_proxy_endpoint_port", reverse_proxy_endpoint_port) @property @pulumi.getter(name="clientEndpointPort") @@ -654,8 +909,29 @@ def __init__(__self__, *, :param pulumi.Input[int] end_port: The end of the Application Port Range on this Node Type. :param pulumi.Input[int] start_port: The start of the Application Port Range on this Node Type. """ - pulumi.set(__self__, "end_port", end_port) - pulumi.set(__self__, "start_port", start_port) + ClusterNodeTypeApplicationPortsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_port=end_port, + start_port=start_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_port: Optional[pulumi.Input[int]] = None, + start_port: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_port is None and 'endPort' in kwargs: + end_port = kwargs['endPort'] + if end_port is None: + raise TypeError("Missing 'end_port' argument") + if start_port is None and 'startPort' in kwargs: + start_port = kwargs['startPort'] + if start_port is None: + raise TypeError("Missing 'start_port' argument") + + _setter("end_port", end_port) + _setter("start_port", start_port) @property @pulumi.getter(name="endPort") @@ -691,8 +967,29 @@ def __init__(__self__, *, :param pulumi.Input[int] end_port: The end of the Ephemeral Port Range on this Node Type. :param pulumi.Input[int] start_port: The start of the Ephemeral Port Range on this Node Type. """ - pulumi.set(__self__, "end_port", end_port) - pulumi.set(__self__, "start_port", start_port) + ClusterNodeTypeEphemeralPortsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_port=end_port, + start_port=start_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_port: Optional[pulumi.Input[int]] = None, + start_port: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_port is None and 'endPort' in kwargs: + end_port = kwargs['endPort'] + if end_port is None: + raise TypeError("Missing 'end_port' argument") + if start_port is None and 'startPort' in kwargs: + start_port = kwargs['startPort'] + if start_port is None: + raise TypeError("Missing 'start_port' argument") + + _setter("end_port", end_port) + _setter("start_port", start_port) @property @pulumi.getter(name="endPort") @@ -730,10 +1027,33 @@ def __init__(__self__, *, :param pulumi.Input[str] x509_store_name: The X509 Store where the Certificate Exists, such as `My`. :param pulumi.Input[str] thumbprint_secondary: The Secondary Thumbprint of the Certificate. """ - pulumi.set(__self__, "thumbprint", thumbprint) - pulumi.set(__self__, "x509_store_name", x509_store_name) + ClusterReverseProxyCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + thumbprint=thumbprint, + x509_store_name=x509_store_name, + thumbprint_secondary=thumbprint_secondary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + thumbprint: Optional[pulumi.Input[str]] = None, + x509_store_name: Optional[pulumi.Input[str]] = None, + thumbprint_secondary: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + if x509_store_name is None and 'x509StoreName' in kwargs: + x509_store_name = kwargs['x509StoreName'] + if x509_store_name is None: + raise TypeError("Missing 'x509_store_name' argument") + if thumbprint_secondary is None and 'thumbprintSecondary' in kwargs: + thumbprint_secondary = kwargs['thumbprintSecondary'] + + _setter("thumbprint", thumbprint) + _setter("x509_store_name", x509_store_name) if thumbprint_secondary is not None: - pulumi.set(__self__, "thumbprint_secondary", thumbprint_secondary) + _setter("thumbprint_secondary", thumbprint_secondary) @property @pulumi.getter @@ -781,8 +1101,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ClusterReverseProxyCertificateCommonNamesCommonNameArgs']]] common_names: A `common_names` block as defined below. :param pulumi.Input[str] x509_store_name: The X509 Store where the Certificate Exists, such as `My`. """ - pulumi.set(__self__, "common_names", common_names) - pulumi.set(__self__, "x509_store_name", x509_store_name) + ClusterReverseProxyCertificateCommonNamesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + common_names=common_names, + x509_store_name=x509_store_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + common_names: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterReverseProxyCertificateCommonNamesCommonNameArgs']]]] = None, + x509_store_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if common_names is None and 'commonNames' in kwargs: + common_names = kwargs['commonNames'] + if common_names is None: + raise TypeError("Missing 'common_names' argument") + if x509_store_name is None and 'x509StoreName' in kwargs: + x509_store_name = kwargs['x509StoreName'] + if x509_store_name is None: + raise TypeError("Missing 'x509_store_name' argument") + + _setter("common_names", common_names) + _setter("x509_store_name", x509_store_name) @property @pulumi.getter(name="commonNames") @@ -820,9 +1161,28 @@ def __init__(__self__, *, > **NOTE:** Certificate Issuer Thumbprint may become required in the future, `https://docs.microsoft.com/azure/service-fabric/service-fabric-create-cluster-using-cert-cn#download-and-update-a-sample-template`. """ - pulumi.set(__self__, "certificate_common_name", certificate_common_name) + ClusterReverseProxyCertificateCommonNamesCommonNameArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_common_name=certificate_common_name, + certificate_issuer_thumbprint=certificate_issuer_thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_common_name: Optional[pulumi.Input[str]] = None, + certificate_issuer_thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_common_name is None and 'certificateCommonName' in kwargs: + certificate_common_name = kwargs['certificateCommonName'] + if certificate_common_name is None: + raise TypeError("Missing 'certificate_common_name' argument") + if certificate_issuer_thumbprint is None and 'certificateIssuerThumbprint' in kwargs: + certificate_issuer_thumbprint = kwargs['certificateIssuerThumbprint'] + + _setter("certificate_common_name", certificate_common_name) if certificate_issuer_thumbprint is not None: - pulumi.set(__self__, "certificate_issuer_thumbprint", certificate_issuer_thumbprint) + _setter("certificate_issuer_thumbprint", certificate_issuer_thumbprint) @property @pulumi.getter(name="certificateCommonName") @@ -874,24 +1234,69 @@ def __init__(__self__, *, :param pulumi.Input[str] upgrade_replica_set_check_timeout: Specifies the duration, in "hh:mm:ss" string format, that Service Fabric waits for a replica set to reconfigure into a safe state, if it is not already in a safe state, before Service Fabric proceeds with the upgrade. Defaults to `10675199.02:48:05.4775807`. :param pulumi.Input[str] upgrade_timeout: Specifies the duration, in "hh:mm:ss" string format, that Service Fabric takes for the entire upgrade. After this period, the upgrade fails. Defaults to `12:00:00`. """ + ClusterUpgradePolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + delta_health_policy=delta_health_policy, + force_restart_enabled=force_restart_enabled, + health_check_retry_timeout=health_check_retry_timeout, + health_check_stable_duration=health_check_stable_duration, + health_check_wait_duration=health_check_wait_duration, + health_policy=health_policy, + upgrade_domain_timeout=upgrade_domain_timeout, + upgrade_replica_set_check_timeout=upgrade_replica_set_check_timeout, + upgrade_timeout=upgrade_timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + delta_health_policy: Optional[pulumi.Input['ClusterUpgradePolicyDeltaHealthPolicyArgs']] = None, + force_restart_enabled: Optional[pulumi.Input[bool]] = None, + health_check_retry_timeout: Optional[pulumi.Input[str]] = None, + health_check_stable_duration: Optional[pulumi.Input[str]] = None, + health_check_wait_duration: Optional[pulumi.Input[str]] = None, + health_policy: Optional[pulumi.Input['ClusterUpgradePolicyHealthPolicyArgs']] = None, + upgrade_domain_timeout: Optional[pulumi.Input[str]] = None, + upgrade_replica_set_check_timeout: Optional[pulumi.Input[str]] = None, + upgrade_timeout: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if delta_health_policy is None and 'deltaHealthPolicy' in kwargs: + delta_health_policy = kwargs['deltaHealthPolicy'] + if force_restart_enabled is None and 'forceRestartEnabled' in kwargs: + force_restart_enabled = kwargs['forceRestartEnabled'] + if health_check_retry_timeout is None and 'healthCheckRetryTimeout' in kwargs: + health_check_retry_timeout = kwargs['healthCheckRetryTimeout'] + if health_check_stable_duration is None and 'healthCheckStableDuration' in kwargs: + health_check_stable_duration = kwargs['healthCheckStableDuration'] + if health_check_wait_duration is None and 'healthCheckWaitDuration' in kwargs: + health_check_wait_duration = kwargs['healthCheckWaitDuration'] + if health_policy is None and 'healthPolicy' in kwargs: + health_policy = kwargs['healthPolicy'] + if upgrade_domain_timeout is None and 'upgradeDomainTimeout' in kwargs: + upgrade_domain_timeout = kwargs['upgradeDomainTimeout'] + if upgrade_replica_set_check_timeout is None and 'upgradeReplicaSetCheckTimeout' in kwargs: + upgrade_replica_set_check_timeout = kwargs['upgradeReplicaSetCheckTimeout'] + if upgrade_timeout is None and 'upgradeTimeout' in kwargs: + upgrade_timeout = kwargs['upgradeTimeout'] + if delta_health_policy is not None: - pulumi.set(__self__, "delta_health_policy", delta_health_policy) + _setter("delta_health_policy", delta_health_policy) if force_restart_enabled is not None: - pulumi.set(__self__, "force_restart_enabled", force_restart_enabled) + _setter("force_restart_enabled", force_restart_enabled) if health_check_retry_timeout is not None: - pulumi.set(__self__, "health_check_retry_timeout", health_check_retry_timeout) + _setter("health_check_retry_timeout", health_check_retry_timeout) if health_check_stable_duration is not None: - pulumi.set(__self__, "health_check_stable_duration", health_check_stable_duration) + _setter("health_check_stable_duration", health_check_stable_duration) if health_check_wait_duration is not None: - pulumi.set(__self__, "health_check_wait_duration", health_check_wait_duration) + _setter("health_check_wait_duration", health_check_wait_duration) if health_policy is not None: - pulumi.set(__self__, "health_policy", health_policy) + _setter("health_policy", health_policy) if upgrade_domain_timeout is not None: - pulumi.set(__self__, "upgrade_domain_timeout", upgrade_domain_timeout) + _setter("upgrade_domain_timeout", upgrade_domain_timeout) if upgrade_replica_set_check_timeout is not None: - pulumi.set(__self__, "upgrade_replica_set_check_timeout", upgrade_replica_set_check_timeout) + _setter("upgrade_replica_set_check_timeout", upgrade_replica_set_check_timeout) if upgrade_timeout is not None: - pulumi.set(__self__, "upgrade_timeout", upgrade_timeout) + _setter("upgrade_timeout", upgrade_timeout) @property @pulumi.getter(name="deltaHealthPolicy") @@ -1013,12 +1418,33 @@ def __init__(__self__, *, :param pulumi.Input[int] max_delta_unhealthy_nodes_percent: Specifies the maximum tolerated percentage of delta unhealthy nodes that can have aggregated health states of error. If the current unhealthy nodes do not respect the percentage relative to the state at the beginning of the upgrade, the cluster is unhealthy. Defaults to `0`. :param pulumi.Input[int] max_upgrade_domain_delta_unhealthy_nodes_percent: Specifies the maximum tolerated percentage of upgrade domain delta unhealthy nodes that can have aggregated health state of error. If there is any upgrade domain where the current unhealthy nodes do not respect the percentage relative to the state at the beginning of the upgrade, the cluster is unhealthy. Defaults to `0`. """ + ClusterUpgradePolicyDeltaHealthPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_delta_unhealthy_applications_percent=max_delta_unhealthy_applications_percent, + max_delta_unhealthy_nodes_percent=max_delta_unhealthy_nodes_percent, + max_upgrade_domain_delta_unhealthy_nodes_percent=max_upgrade_domain_delta_unhealthy_nodes_percent, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_delta_unhealthy_applications_percent: Optional[pulumi.Input[int]] = None, + max_delta_unhealthy_nodes_percent: Optional[pulumi.Input[int]] = None, + max_upgrade_domain_delta_unhealthy_nodes_percent: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_delta_unhealthy_applications_percent is None and 'maxDeltaUnhealthyApplicationsPercent' in kwargs: + max_delta_unhealthy_applications_percent = kwargs['maxDeltaUnhealthyApplicationsPercent'] + if max_delta_unhealthy_nodes_percent is None and 'maxDeltaUnhealthyNodesPercent' in kwargs: + max_delta_unhealthy_nodes_percent = kwargs['maxDeltaUnhealthyNodesPercent'] + if max_upgrade_domain_delta_unhealthy_nodes_percent is None and 'maxUpgradeDomainDeltaUnhealthyNodesPercent' in kwargs: + max_upgrade_domain_delta_unhealthy_nodes_percent = kwargs['maxUpgradeDomainDeltaUnhealthyNodesPercent'] + if max_delta_unhealthy_applications_percent is not None: - pulumi.set(__self__, "max_delta_unhealthy_applications_percent", max_delta_unhealthy_applications_percent) + _setter("max_delta_unhealthy_applications_percent", max_delta_unhealthy_applications_percent) if max_delta_unhealthy_nodes_percent is not None: - pulumi.set(__self__, "max_delta_unhealthy_nodes_percent", max_delta_unhealthy_nodes_percent) + _setter("max_delta_unhealthy_nodes_percent", max_delta_unhealthy_nodes_percent) if max_upgrade_domain_delta_unhealthy_nodes_percent is not None: - pulumi.set(__self__, "max_upgrade_domain_delta_unhealthy_nodes_percent", max_upgrade_domain_delta_unhealthy_nodes_percent) + _setter("max_upgrade_domain_delta_unhealthy_nodes_percent", max_upgrade_domain_delta_unhealthy_nodes_percent) @property @pulumi.getter(name="maxDeltaUnhealthyApplicationsPercent") @@ -1066,10 +1492,27 @@ def __init__(__self__, *, :param pulumi.Input[int] max_unhealthy_applications_percent: Specifies the maximum tolerated percentage of applications that can have aggregated health state of error. If the upgrade exceeds this percentage, the cluster is unhealthy. Defaults to `0`. :param pulumi.Input[int] max_unhealthy_nodes_percent: Specifies the maximum tolerated percentage of nodes that can have aggregated health states of error. If an upgrade exceeds this percentage, the cluster is unhealthy. Defaults to `0`. """ + ClusterUpgradePolicyHealthPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_unhealthy_applications_percent=max_unhealthy_applications_percent, + max_unhealthy_nodes_percent=max_unhealthy_nodes_percent, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_unhealthy_applications_percent: Optional[pulumi.Input[int]] = None, + max_unhealthy_nodes_percent: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_unhealthy_applications_percent is None and 'maxUnhealthyApplicationsPercent' in kwargs: + max_unhealthy_applications_percent = kwargs['maxUnhealthyApplicationsPercent'] + if max_unhealthy_nodes_percent is None and 'maxUnhealthyNodesPercent' in kwargs: + max_unhealthy_nodes_percent = kwargs['maxUnhealthyNodesPercent'] + if max_unhealthy_applications_percent is not None: - pulumi.set(__self__, "max_unhealthy_applications_percent", max_unhealthy_applications_percent) + _setter("max_unhealthy_applications_percent", max_unhealthy_applications_percent) if max_unhealthy_nodes_percent is not None: - pulumi.set(__self__, "max_unhealthy_nodes_percent", max_unhealthy_nodes_percent) + _setter("max_unhealthy_nodes_percent", max_unhealthy_nodes_percent) @property @pulumi.getter(name="maxUnhealthyApplicationsPercent") @@ -1105,10 +1548,25 @@ def __init__(__self__, *, :param pulumi.Input['ManagedClusterAuthenticationActiveDirectoryArgs'] active_directory: A `active_directory` block as defined above. :param pulumi.Input[Sequence[pulumi.Input['ManagedClusterAuthenticationCertificateArgs']]] certificates: One or more `certificate` blocks as defined below. """ + ManagedClusterAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directory=active_directory, + certificates=certificates, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directory: Optional[pulumi.Input['ManagedClusterAuthenticationActiveDirectoryArgs']] = None, + certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ManagedClusterAuthenticationCertificateArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if certificates is not None: - pulumi.set(__self__, "certificates", certificates) + _setter("certificates", certificates) @property @pulumi.getter(name="activeDirectory") @@ -1146,9 +1604,36 @@ def __init__(__self__, *, :param pulumi.Input[str] cluster_application_id: The ID of the Cluster Application. :param pulumi.Input[str] tenant_id: The ID of the Tenant. """ - pulumi.set(__self__, "client_application_id", client_application_id) - pulumi.set(__self__, "cluster_application_id", cluster_application_id) - pulumi.set(__self__, "tenant_id", tenant_id) + ManagedClusterAuthenticationActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_application_id=client_application_id, + cluster_application_id=cluster_application_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_application_id: Optional[pulumi.Input[str]] = None, + cluster_application_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_application_id is None and 'clientApplicationId' in kwargs: + client_application_id = kwargs['clientApplicationId'] + if client_application_id is None: + raise TypeError("Missing 'client_application_id' argument") + if cluster_application_id is None and 'clusterApplicationId' in kwargs: + cluster_application_id = kwargs['clusterApplicationId'] + if cluster_application_id is None: + raise TypeError("Missing 'cluster_application_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("client_application_id", client_application_id) + _setter("cluster_application_id", cluster_application_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="clientApplicationId") @@ -1198,10 +1683,31 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of the certificate. Can be `AdminClient` or `ReadOnlyClient`. :param pulumi.Input[str] common_name: The certificate's CN. """ - pulumi.set(__self__, "thumbprint", thumbprint) - pulumi.set(__self__, "type", type) + ManagedClusterAuthenticationCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + thumbprint=thumbprint, + type=type, + common_name=common_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + thumbprint: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + common_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if common_name is None and 'commonName' in kwargs: + common_name = kwargs['commonName'] + + _setter("thumbprint", thumbprint) + _setter("type", type) if common_name is not None: - pulumi.set(__self__, "common_name", common_name) + _setter("common_name", common_name) @property @pulumi.getter @@ -1251,9 +1757,30 @@ def __init__(__self__, *, :param pulumi.Input[str] section: Section name. :param pulumi.Input[str] value: Parameter value. """ - pulumi.set(__self__, "parameter", parameter) - pulumi.set(__self__, "section", section) - pulumi.set(__self__, "value", value) + ManagedClusterCustomFabricSettingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + parameter=parameter, + section=section, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + parameter: Optional[pulumi.Input[str]] = None, + section: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parameter is None: + raise TypeError("Missing 'parameter' argument") + if section is None: + raise TypeError("Missing 'section' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("parameter", parameter) + _setter("section", section) + _setter("value", value) @property @pulumi.getter @@ -1307,12 +1834,47 @@ def __init__(__self__, *, :param pulumi.Input[str] protocol: The transport protocol used in this rule. Can be one of `tcp` or `udp`. :param pulumi.Input[str] probe_request_path: Path for the probe to check, when probe protocol is set to `http`. """ - pulumi.set(__self__, "backend_port", backend_port) - pulumi.set(__self__, "frontend_port", frontend_port) - pulumi.set(__self__, "probe_protocol", probe_protocol) - pulumi.set(__self__, "protocol", protocol) + ManagedClusterLbRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + frontend_port=frontend_port, + probe_protocol=probe_protocol, + protocol=protocol, + probe_request_path=probe_request_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[pulumi.Input[int]] = None, + frontend_port: Optional[pulumi.Input[int]] = None, + probe_protocol: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, + probe_request_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if backend_port is None: + raise TypeError("Missing 'backend_port' argument") + if frontend_port is None and 'frontendPort' in kwargs: + frontend_port = kwargs['frontendPort'] + if frontend_port is None: + raise TypeError("Missing 'frontend_port' argument") + if probe_protocol is None and 'probeProtocol' in kwargs: + probe_protocol = kwargs['probeProtocol'] + if probe_protocol is None: + raise TypeError("Missing 'probe_protocol' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if probe_request_path is None and 'probeRequestPath' in kwargs: + probe_request_path = kwargs['probeRequestPath'] + + _setter("backend_port", backend_port) + _setter("frontend_port", frontend_port) + _setter("probe_protocol", probe_protocol) + _setter("protocol", protocol) if probe_request_path is not None: - pulumi.set(__self__, "probe_request_path", probe_request_path) + _setter("probe_request_path", probe_request_path) @property @pulumi.getter(name="backendPort") @@ -1416,32 +1978,123 @@ def __init__(__self__, *, :param pulumi.Input[bool] stateless: If set to true, only stateless workloads can run on this node type. :param pulumi.Input[Sequence[pulumi.Input['ManagedClusterNodeTypeVmSecretArgs']]] vm_secrets: One or more `vm_secrets` blocks as defined below. """ - pulumi.set(__self__, "application_port_range", application_port_range) - pulumi.set(__self__, "data_disk_size_gb", data_disk_size_gb) - pulumi.set(__self__, "ephemeral_port_range", ephemeral_port_range) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "vm_image_offer", vm_image_offer) - pulumi.set(__self__, "vm_image_publisher", vm_image_publisher) - pulumi.set(__self__, "vm_image_sku", vm_image_sku) - pulumi.set(__self__, "vm_image_version", vm_image_version) - pulumi.set(__self__, "vm_instance_count", vm_instance_count) - pulumi.set(__self__, "vm_size", vm_size) + ManagedClusterNodeTypeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_port_range=application_port_range, + data_disk_size_gb=data_disk_size_gb, + ephemeral_port_range=ephemeral_port_range, + name=name, + vm_image_offer=vm_image_offer, + vm_image_publisher=vm_image_publisher, + vm_image_sku=vm_image_sku, + vm_image_version=vm_image_version, + vm_instance_count=vm_instance_count, + vm_size=vm_size, + capacities=capacities, + data_disk_type=data_disk_type, + id=id, + multiple_placement_groups_enabled=multiple_placement_groups_enabled, + placement_properties=placement_properties, + primary=primary, + stateless=stateless, + vm_secrets=vm_secrets, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_port_range: Optional[pulumi.Input[str]] = None, + data_disk_size_gb: Optional[pulumi.Input[int]] = None, + ephemeral_port_range: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + vm_image_offer: Optional[pulumi.Input[str]] = None, + vm_image_publisher: Optional[pulumi.Input[str]] = None, + vm_image_sku: Optional[pulumi.Input[str]] = None, + vm_image_version: Optional[pulumi.Input[str]] = None, + vm_instance_count: Optional[pulumi.Input[int]] = None, + vm_size: Optional[pulumi.Input[str]] = None, + capacities: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + data_disk_type: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + multiple_placement_groups_enabled: Optional[pulumi.Input[bool]] = None, + placement_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + primary: Optional[pulumi.Input[bool]] = None, + stateless: Optional[pulumi.Input[bool]] = None, + vm_secrets: Optional[pulumi.Input[Sequence[pulumi.Input['ManagedClusterNodeTypeVmSecretArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_port_range is None and 'applicationPortRange' in kwargs: + application_port_range = kwargs['applicationPortRange'] + if application_port_range is None: + raise TypeError("Missing 'application_port_range' argument") + if data_disk_size_gb is None and 'dataDiskSizeGb' in kwargs: + data_disk_size_gb = kwargs['dataDiskSizeGb'] + if data_disk_size_gb is None: + raise TypeError("Missing 'data_disk_size_gb' argument") + if ephemeral_port_range is None and 'ephemeralPortRange' in kwargs: + ephemeral_port_range = kwargs['ephemeralPortRange'] + if ephemeral_port_range is None: + raise TypeError("Missing 'ephemeral_port_range' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if vm_image_offer is None and 'vmImageOffer' in kwargs: + vm_image_offer = kwargs['vmImageOffer'] + if vm_image_offer is None: + raise TypeError("Missing 'vm_image_offer' argument") + if vm_image_publisher is None and 'vmImagePublisher' in kwargs: + vm_image_publisher = kwargs['vmImagePublisher'] + if vm_image_publisher is None: + raise TypeError("Missing 'vm_image_publisher' argument") + if vm_image_sku is None and 'vmImageSku' in kwargs: + vm_image_sku = kwargs['vmImageSku'] + if vm_image_sku is None: + raise TypeError("Missing 'vm_image_sku' argument") + if vm_image_version is None and 'vmImageVersion' in kwargs: + vm_image_version = kwargs['vmImageVersion'] + if vm_image_version is None: + raise TypeError("Missing 'vm_image_version' argument") + if vm_instance_count is None and 'vmInstanceCount' in kwargs: + vm_instance_count = kwargs['vmInstanceCount'] + if vm_instance_count is None: + raise TypeError("Missing 'vm_instance_count' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if data_disk_type is None and 'dataDiskType' in kwargs: + data_disk_type = kwargs['dataDiskType'] + if multiple_placement_groups_enabled is None and 'multiplePlacementGroupsEnabled' in kwargs: + multiple_placement_groups_enabled = kwargs['multiplePlacementGroupsEnabled'] + if placement_properties is None and 'placementProperties' in kwargs: + placement_properties = kwargs['placementProperties'] + if vm_secrets is None and 'vmSecrets' in kwargs: + vm_secrets = kwargs['vmSecrets'] + + _setter("application_port_range", application_port_range) + _setter("data_disk_size_gb", data_disk_size_gb) + _setter("ephemeral_port_range", ephemeral_port_range) + _setter("name", name) + _setter("vm_image_offer", vm_image_offer) + _setter("vm_image_publisher", vm_image_publisher) + _setter("vm_image_sku", vm_image_sku) + _setter("vm_image_version", vm_image_version) + _setter("vm_instance_count", vm_instance_count) + _setter("vm_size", vm_size) if capacities is not None: - pulumi.set(__self__, "capacities", capacities) + _setter("capacities", capacities) if data_disk_type is not None: - pulumi.set(__self__, "data_disk_type", data_disk_type) + _setter("data_disk_type", data_disk_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if multiple_placement_groups_enabled is not None: - pulumi.set(__self__, "multiple_placement_groups_enabled", multiple_placement_groups_enabled) + _setter("multiple_placement_groups_enabled", multiple_placement_groups_enabled) if placement_properties is not None: - pulumi.set(__self__, "placement_properties", placement_properties) + _setter("placement_properties", placement_properties) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) if stateless is not None: - pulumi.set(__self__, "stateless", stateless) + _setter("stateless", stateless) if vm_secrets is not None: - pulumi.set(__self__, "vm_secrets", vm_secrets) + _setter("vm_secrets", vm_secrets) @property @pulumi.getter(name="applicationPortRange") @@ -1669,8 +2322,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ManagedClusterNodeTypeVmSecretCertificateArgs']]] certificates: One or more `certificates` blocks as defined above. :param pulumi.Input[str] vault_id: The ID of the Vault that contain the certificates. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "vault_id", vault_id) + ManagedClusterNodeTypeVmSecretArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + vault_id=vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[pulumi.Input[Sequence[pulumi.Input['ManagedClusterNodeTypeVmSecretCertificateArgs']]]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if vault_id is None: + raise TypeError("Missing 'vault_id' argument") + + _setter("certificates", certificates) + _setter("vault_id", vault_id) @property @pulumi.getter @@ -1706,8 +2378,25 @@ def __init__(__self__, *, :param pulumi.Input[str] store: The certificate store on the Virtual Machine to which the certificate should be added. :param pulumi.Input[str] url: The URL of a certificate that has been uploaded to Key Vault as a secret """ - pulumi.set(__self__, "store", store) - pulumi.set(__self__, "url", url) + ManagedClusterNodeTypeVmSecretCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + store=store, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + store: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if store is None: + raise TypeError("Missing 'store' argument") + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("store", store) + _setter("url", url) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/servicefabric/cluster.py b/sdk/python/pulumi_azure/servicefabric/cluster.py index 358fbd9488..a2e0f02ae3 100644 --- a/sdk/python/pulumi_azure/servicefabric/cluster.py +++ b/sdk/python/pulumi_azure/servicefabric/cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -69,46 +69,151 @@ def __init__(__self__, *, :param pulumi.Input['ClusterUpgradePolicyArgs'] upgrade_policy: A `upgrade_policy` block as defined below. :param pulumi.Input[str] vmss_zonal_upgrade_mode: Specifies the upgrade mode for the virtual machine scale set updates that happen in all availability zones at once. Possible values are `Hierarchical` or `Parallel`. """ - pulumi.set(__self__, "management_endpoint", management_endpoint) - pulumi.set(__self__, "node_types", node_types) - pulumi.set(__self__, "reliability_level", reliability_level) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "upgrade_mode", upgrade_mode) - pulumi.set(__self__, "vm_image", vm_image) + ClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + management_endpoint=management_endpoint, + node_types=node_types, + reliability_level=reliability_level, + resource_group_name=resource_group_name, + upgrade_mode=upgrade_mode, + vm_image=vm_image, + add_on_features=add_on_features, + azure_active_directory=azure_active_directory, + certificate=certificate, + certificate_common_names=certificate_common_names, + client_certificate_common_names=client_certificate_common_names, + client_certificate_thumbprints=client_certificate_thumbprints, + cluster_code_version=cluster_code_version, + diagnostics_config=diagnostics_config, + fabric_settings=fabric_settings, + location=location, + name=name, + reverse_proxy_certificate=reverse_proxy_certificate, + reverse_proxy_certificate_common_names=reverse_proxy_certificate_common_names, + service_fabric_zonal_upgrade_mode=service_fabric_zonal_upgrade_mode, + tags=tags, + upgrade_policy=upgrade_policy, + vmss_zonal_upgrade_mode=vmss_zonal_upgrade_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + management_endpoint: Optional[pulumi.Input[str]] = None, + node_types: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterNodeTypeArgs']]]] = None, + reliability_level: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + upgrade_mode: Optional[pulumi.Input[str]] = None, + vm_image: Optional[pulumi.Input[str]] = None, + add_on_features: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + azure_active_directory: Optional[pulumi.Input['ClusterAzureActiveDirectoryArgs']] = None, + certificate: Optional[pulumi.Input['ClusterCertificateArgs']] = None, + certificate_common_names: Optional[pulumi.Input['ClusterCertificateCommonNamesArgs']] = None, + client_certificate_common_names: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterClientCertificateCommonNameArgs']]]] = None, + client_certificate_thumbprints: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterClientCertificateThumbprintArgs']]]] = None, + cluster_code_version: Optional[pulumi.Input[str]] = None, + diagnostics_config: Optional[pulumi.Input['ClusterDiagnosticsConfigArgs']] = None, + fabric_settings: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterFabricSettingArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + reverse_proxy_certificate: Optional[pulumi.Input['ClusterReverseProxyCertificateArgs']] = None, + reverse_proxy_certificate_common_names: Optional[pulumi.Input['ClusterReverseProxyCertificateCommonNamesArgs']] = None, + service_fabric_zonal_upgrade_mode: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + upgrade_policy: Optional[pulumi.Input['ClusterUpgradePolicyArgs']] = None, + vmss_zonal_upgrade_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if management_endpoint is None and 'managementEndpoint' in kwargs: + management_endpoint = kwargs['managementEndpoint'] + if management_endpoint is None: + raise TypeError("Missing 'management_endpoint' argument") + if node_types is None and 'nodeTypes' in kwargs: + node_types = kwargs['nodeTypes'] + if node_types is None: + raise TypeError("Missing 'node_types' argument") + if reliability_level is None and 'reliabilityLevel' in kwargs: + reliability_level = kwargs['reliabilityLevel'] + if reliability_level is None: + raise TypeError("Missing 'reliability_level' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if upgrade_mode is None and 'upgradeMode' in kwargs: + upgrade_mode = kwargs['upgradeMode'] + if upgrade_mode is None: + raise TypeError("Missing 'upgrade_mode' argument") + if vm_image is None and 'vmImage' in kwargs: + vm_image = kwargs['vmImage'] + if vm_image is None: + raise TypeError("Missing 'vm_image' argument") + if add_on_features is None and 'addOnFeatures' in kwargs: + add_on_features = kwargs['addOnFeatures'] + if azure_active_directory is None and 'azureActiveDirectory' in kwargs: + azure_active_directory = kwargs['azureActiveDirectory'] + if certificate_common_names is None and 'certificateCommonNames' in kwargs: + certificate_common_names = kwargs['certificateCommonNames'] + if client_certificate_common_names is None and 'clientCertificateCommonNames' in kwargs: + client_certificate_common_names = kwargs['clientCertificateCommonNames'] + if client_certificate_thumbprints is None and 'clientCertificateThumbprints' in kwargs: + client_certificate_thumbprints = kwargs['clientCertificateThumbprints'] + if cluster_code_version is None and 'clusterCodeVersion' in kwargs: + cluster_code_version = kwargs['clusterCodeVersion'] + if diagnostics_config is None and 'diagnosticsConfig' in kwargs: + diagnostics_config = kwargs['diagnosticsConfig'] + if fabric_settings is None and 'fabricSettings' in kwargs: + fabric_settings = kwargs['fabricSettings'] + if reverse_proxy_certificate is None and 'reverseProxyCertificate' in kwargs: + reverse_proxy_certificate = kwargs['reverseProxyCertificate'] + if reverse_proxy_certificate_common_names is None and 'reverseProxyCertificateCommonNames' in kwargs: + reverse_proxy_certificate_common_names = kwargs['reverseProxyCertificateCommonNames'] + if service_fabric_zonal_upgrade_mode is None and 'serviceFabricZonalUpgradeMode' in kwargs: + service_fabric_zonal_upgrade_mode = kwargs['serviceFabricZonalUpgradeMode'] + if upgrade_policy is None and 'upgradePolicy' in kwargs: + upgrade_policy = kwargs['upgradePolicy'] + if vmss_zonal_upgrade_mode is None and 'vmssZonalUpgradeMode' in kwargs: + vmss_zonal_upgrade_mode = kwargs['vmssZonalUpgradeMode'] + + _setter("management_endpoint", management_endpoint) + _setter("node_types", node_types) + _setter("reliability_level", reliability_level) + _setter("resource_group_name", resource_group_name) + _setter("upgrade_mode", upgrade_mode) + _setter("vm_image", vm_image) if add_on_features is not None: - pulumi.set(__self__, "add_on_features", add_on_features) + _setter("add_on_features", add_on_features) if azure_active_directory is not None: - pulumi.set(__self__, "azure_active_directory", azure_active_directory) + _setter("azure_active_directory", azure_active_directory) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_common_names is not None: - pulumi.set(__self__, "certificate_common_names", certificate_common_names) + _setter("certificate_common_names", certificate_common_names) if client_certificate_common_names is not None: - pulumi.set(__self__, "client_certificate_common_names", client_certificate_common_names) + _setter("client_certificate_common_names", client_certificate_common_names) if client_certificate_thumbprints is not None: - pulumi.set(__self__, "client_certificate_thumbprints", client_certificate_thumbprints) + _setter("client_certificate_thumbprints", client_certificate_thumbprints) if cluster_code_version is not None: - pulumi.set(__self__, "cluster_code_version", cluster_code_version) + _setter("cluster_code_version", cluster_code_version) if diagnostics_config is not None: - pulumi.set(__self__, "diagnostics_config", diagnostics_config) + _setter("diagnostics_config", diagnostics_config) if fabric_settings is not None: - pulumi.set(__self__, "fabric_settings", fabric_settings) + _setter("fabric_settings", fabric_settings) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if reverse_proxy_certificate is not None: - pulumi.set(__self__, "reverse_proxy_certificate", reverse_proxy_certificate) + _setter("reverse_proxy_certificate", reverse_proxy_certificate) if reverse_proxy_certificate_common_names is not None: - pulumi.set(__self__, "reverse_proxy_certificate_common_names", reverse_proxy_certificate_common_names) + _setter("reverse_proxy_certificate_common_names", reverse_proxy_certificate_common_names) if service_fabric_zonal_upgrade_mode is not None: - pulumi.set(__self__, "service_fabric_zonal_upgrade_mode", service_fabric_zonal_upgrade_mode) + _setter("service_fabric_zonal_upgrade_mode", service_fabric_zonal_upgrade_mode) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if upgrade_policy is not None: - pulumi.set(__self__, "upgrade_policy", upgrade_policy) + _setter("upgrade_policy", upgrade_policy) if vmss_zonal_upgrade_mode is not None: - pulumi.set(__self__, "vmss_zonal_upgrade_mode", vmss_zonal_upgrade_mode) + _setter("vmss_zonal_upgrade_mode", vmss_zonal_upgrade_mode) @property @pulumi.getter(name="managementEndpoint") @@ -449,54 +554,151 @@ def __init__(__self__, *, :param pulumi.Input[str] vm_image: Specifies the Image expected for the Service Fabric Cluster, such as `Windows`. Changing this forces a new resource to be created. :param pulumi.Input[str] vmss_zonal_upgrade_mode: Specifies the upgrade mode for the virtual machine scale set updates that happen in all availability zones at once. Possible values are `Hierarchical` or `Parallel`. """ + _ClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + add_on_features=add_on_features, + azure_active_directory=azure_active_directory, + certificate=certificate, + certificate_common_names=certificate_common_names, + client_certificate_common_names=client_certificate_common_names, + client_certificate_thumbprints=client_certificate_thumbprints, + cluster_code_version=cluster_code_version, + cluster_endpoint=cluster_endpoint, + diagnostics_config=diagnostics_config, + fabric_settings=fabric_settings, + location=location, + management_endpoint=management_endpoint, + name=name, + node_types=node_types, + reliability_level=reliability_level, + resource_group_name=resource_group_name, + reverse_proxy_certificate=reverse_proxy_certificate, + reverse_proxy_certificate_common_names=reverse_proxy_certificate_common_names, + service_fabric_zonal_upgrade_mode=service_fabric_zonal_upgrade_mode, + tags=tags, + upgrade_mode=upgrade_mode, + upgrade_policy=upgrade_policy, + vm_image=vm_image, + vmss_zonal_upgrade_mode=vmss_zonal_upgrade_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + add_on_features: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + azure_active_directory: Optional[pulumi.Input['ClusterAzureActiveDirectoryArgs']] = None, + certificate: Optional[pulumi.Input['ClusterCertificateArgs']] = None, + certificate_common_names: Optional[pulumi.Input['ClusterCertificateCommonNamesArgs']] = None, + client_certificate_common_names: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterClientCertificateCommonNameArgs']]]] = None, + client_certificate_thumbprints: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterClientCertificateThumbprintArgs']]]] = None, + cluster_code_version: Optional[pulumi.Input[str]] = None, + cluster_endpoint: Optional[pulumi.Input[str]] = None, + diagnostics_config: Optional[pulumi.Input['ClusterDiagnosticsConfigArgs']] = None, + fabric_settings: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterFabricSettingArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + management_endpoint: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_types: Optional[pulumi.Input[Sequence[pulumi.Input['ClusterNodeTypeArgs']]]] = None, + reliability_level: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + reverse_proxy_certificate: Optional[pulumi.Input['ClusterReverseProxyCertificateArgs']] = None, + reverse_proxy_certificate_common_names: Optional[pulumi.Input['ClusterReverseProxyCertificateCommonNamesArgs']] = None, + service_fabric_zonal_upgrade_mode: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + upgrade_mode: Optional[pulumi.Input[str]] = None, + upgrade_policy: Optional[pulumi.Input['ClusterUpgradePolicyArgs']] = None, + vm_image: Optional[pulumi.Input[str]] = None, + vmss_zonal_upgrade_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if add_on_features is None and 'addOnFeatures' in kwargs: + add_on_features = kwargs['addOnFeatures'] + if azure_active_directory is None and 'azureActiveDirectory' in kwargs: + azure_active_directory = kwargs['azureActiveDirectory'] + if certificate_common_names is None and 'certificateCommonNames' in kwargs: + certificate_common_names = kwargs['certificateCommonNames'] + if client_certificate_common_names is None and 'clientCertificateCommonNames' in kwargs: + client_certificate_common_names = kwargs['clientCertificateCommonNames'] + if client_certificate_thumbprints is None and 'clientCertificateThumbprints' in kwargs: + client_certificate_thumbprints = kwargs['clientCertificateThumbprints'] + if cluster_code_version is None and 'clusterCodeVersion' in kwargs: + cluster_code_version = kwargs['clusterCodeVersion'] + if cluster_endpoint is None and 'clusterEndpoint' in kwargs: + cluster_endpoint = kwargs['clusterEndpoint'] + if diagnostics_config is None and 'diagnosticsConfig' in kwargs: + diagnostics_config = kwargs['diagnosticsConfig'] + if fabric_settings is None and 'fabricSettings' in kwargs: + fabric_settings = kwargs['fabricSettings'] + if management_endpoint is None and 'managementEndpoint' in kwargs: + management_endpoint = kwargs['managementEndpoint'] + if node_types is None and 'nodeTypes' in kwargs: + node_types = kwargs['nodeTypes'] + if reliability_level is None and 'reliabilityLevel' in kwargs: + reliability_level = kwargs['reliabilityLevel'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if reverse_proxy_certificate is None and 'reverseProxyCertificate' in kwargs: + reverse_proxy_certificate = kwargs['reverseProxyCertificate'] + if reverse_proxy_certificate_common_names is None and 'reverseProxyCertificateCommonNames' in kwargs: + reverse_proxy_certificate_common_names = kwargs['reverseProxyCertificateCommonNames'] + if service_fabric_zonal_upgrade_mode is None and 'serviceFabricZonalUpgradeMode' in kwargs: + service_fabric_zonal_upgrade_mode = kwargs['serviceFabricZonalUpgradeMode'] + if upgrade_mode is None and 'upgradeMode' in kwargs: + upgrade_mode = kwargs['upgradeMode'] + if upgrade_policy is None and 'upgradePolicy' in kwargs: + upgrade_policy = kwargs['upgradePolicy'] + if vm_image is None and 'vmImage' in kwargs: + vm_image = kwargs['vmImage'] + if vmss_zonal_upgrade_mode is None and 'vmssZonalUpgradeMode' in kwargs: + vmss_zonal_upgrade_mode = kwargs['vmssZonalUpgradeMode'] + if add_on_features is not None: - pulumi.set(__self__, "add_on_features", add_on_features) + _setter("add_on_features", add_on_features) if azure_active_directory is not None: - pulumi.set(__self__, "azure_active_directory", azure_active_directory) + _setter("azure_active_directory", azure_active_directory) if certificate is not None: - pulumi.set(__self__, "certificate", certificate) + _setter("certificate", certificate) if certificate_common_names is not None: - pulumi.set(__self__, "certificate_common_names", certificate_common_names) + _setter("certificate_common_names", certificate_common_names) if client_certificate_common_names is not None: - pulumi.set(__self__, "client_certificate_common_names", client_certificate_common_names) + _setter("client_certificate_common_names", client_certificate_common_names) if client_certificate_thumbprints is not None: - pulumi.set(__self__, "client_certificate_thumbprints", client_certificate_thumbprints) + _setter("client_certificate_thumbprints", client_certificate_thumbprints) if cluster_code_version is not None: - pulumi.set(__self__, "cluster_code_version", cluster_code_version) + _setter("cluster_code_version", cluster_code_version) if cluster_endpoint is not None: - pulumi.set(__self__, "cluster_endpoint", cluster_endpoint) + _setter("cluster_endpoint", cluster_endpoint) if diagnostics_config is not None: - pulumi.set(__self__, "diagnostics_config", diagnostics_config) + _setter("diagnostics_config", diagnostics_config) if fabric_settings is not None: - pulumi.set(__self__, "fabric_settings", fabric_settings) + _setter("fabric_settings", fabric_settings) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if management_endpoint is not None: - pulumi.set(__self__, "management_endpoint", management_endpoint) + _setter("management_endpoint", management_endpoint) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_types is not None: - pulumi.set(__self__, "node_types", node_types) + _setter("node_types", node_types) if reliability_level is not None: - pulumi.set(__self__, "reliability_level", reliability_level) + _setter("reliability_level", reliability_level) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if reverse_proxy_certificate is not None: - pulumi.set(__self__, "reverse_proxy_certificate", reverse_proxy_certificate) + _setter("reverse_proxy_certificate", reverse_proxy_certificate) if reverse_proxy_certificate_common_names is not None: - pulumi.set(__self__, "reverse_proxy_certificate_common_names", reverse_proxy_certificate_common_names) + _setter("reverse_proxy_certificate_common_names", reverse_proxy_certificate_common_names) if service_fabric_zonal_upgrade_mode is not None: - pulumi.set(__self__, "service_fabric_zonal_upgrade_mode", service_fabric_zonal_upgrade_mode) + _setter("service_fabric_zonal_upgrade_mode", service_fabric_zonal_upgrade_mode) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if upgrade_mode is not None: - pulumi.set(__self__, "upgrade_mode", upgrade_mode) + _setter("upgrade_mode", upgrade_mode) if upgrade_policy is not None: - pulumi.set(__self__, "upgrade_policy", upgrade_policy) + _setter("upgrade_policy", upgrade_policy) if vm_image is not None: - pulumi.set(__self__, "vm_image", vm_image) + _setter("vm_image", vm_image) if vmss_zonal_upgrade_mode is not None: - pulumi.set(__self__, "vmss_zonal_upgrade_mode", vmss_zonal_upgrade_mode) + _setter("vmss_zonal_upgrade_mode", vmss_zonal_upgrade_mode) @property @pulumi.getter(name="addOnFeatures") @@ -936,6 +1138,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -974,12 +1180,32 @@ def _internal_init(__self__, __props__ = ClusterArgs.__new__(ClusterArgs) __props__.__dict__["add_on_features"] = add_on_features + if azure_active_directory is not None and not isinstance(azure_active_directory, ClusterAzureActiveDirectoryArgs): + azure_active_directory = azure_active_directory or {} + def _setter(key, value): + azure_active_directory[key] = value + ClusterAzureActiveDirectoryArgs._configure(_setter, **azure_active_directory) __props__.__dict__["azure_active_directory"] = azure_active_directory + if certificate is not None and not isinstance(certificate, ClusterCertificateArgs): + certificate = certificate or {} + def _setter(key, value): + certificate[key] = value + ClusterCertificateArgs._configure(_setter, **certificate) __props__.__dict__["certificate"] = certificate + if certificate_common_names is not None and not isinstance(certificate_common_names, ClusterCertificateCommonNamesArgs): + certificate_common_names = certificate_common_names or {} + def _setter(key, value): + certificate_common_names[key] = value + ClusterCertificateCommonNamesArgs._configure(_setter, **certificate_common_names) __props__.__dict__["certificate_common_names"] = certificate_common_names __props__.__dict__["client_certificate_common_names"] = client_certificate_common_names __props__.__dict__["client_certificate_thumbprints"] = client_certificate_thumbprints __props__.__dict__["cluster_code_version"] = cluster_code_version + if diagnostics_config is not None and not isinstance(diagnostics_config, ClusterDiagnosticsConfigArgs): + diagnostics_config = diagnostics_config or {} + def _setter(key, value): + diagnostics_config[key] = value + ClusterDiagnosticsConfigArgs._configure(_setter, **diagnostics_config) __props__.__dict__["diagnostics_config"] = diagnostics_config __props__.__dict__["fabric_settings"] = fabric_settings __props__.__dict__["location"] = location @@ -996,13 +1222,28 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if reverse_proxy_certificate is not None and not isinstance(reverse_proxy_certificate, ClusterReverseProxyCertificateArgs): + reverse_proxy_certificate = reverse_proxy_certificate or {} + def _setter(key, value): + reverse_proxy_certificate[key] = value + ClusterReverseProxyCertificateArgs._configure(_setter, **reverse_proxy_certificate) __props__.__dict__["reverse_proxy_certificate"] = reverse_proxy_certificate + if reverse_proxy_certificate_common_names is not None and not isinstance(reverse_proxy_certificate_common_names, ClusterReverseProxyCertificateCommonNamesArgs): + reverse_proxy_certificate_common_names = reverse_proxy_certificate_common_names or {} + def _setter(key, value): + reverse_proxy_certificate_common_names[key] = value + ClusterReverseProxyCertificateCommonNamesArgs._configure(_setter, **reverse_proxy_certificate_common_names) __props__.__dict__["reverse_proxy_certificate_common_names"] = reverse_proxy_certificate_common_names __props__.__dict__["service_fabric_zonal_upgrade_mode"] = service_fabric_zonal_upgrade_mode __props__.__dict__["tags"] = tags if upgrade_mode is None and not opts.urn: raise TypeError("Missing required property 'upgrade_mode'") __props__.__dict__["upgrade_mode"] = upgrade_mode + if upgrade_policy is not None and not isinstance(upgrade_policy, ClusterUpgradePolicyArgs): + upgrade_policy = upgrade_policy or {} + def _setter(key, value): + upgrade_policy[key] = value + ClusterUpgradePolicyArgs._configure(_setter, **upgrade_policy) __props__.__dict__["upgrade_policy"] = upgrade_policy if vm_image is None and not opts.urn: raise TypeError("Missing required property 'vm_image'") diff --git a/sdk/python/pulumi_azure/servicefabric/managed_cluster.py b/sdk/python/pulumi_azure/servicefabric/managed_cluster.py index 263cb9f6c1..fa5ee01d8f 100644 --- a/sdk/python/pulumi_azure/servicefabric/managed_cluster.py +++ b/sdk/python/pulumi_azure/servicefabric/managed_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -53,36 +53,107 @@ def __init__(__self__, *, :param pulumi.Input[str] upgrade_wave: Upgrade wave for the fabric runtime. Default is `Wave0`, allowed value must be one of `Wave0`, `Wave1`, or `Wave2`. :param pulumi.Input[str] username: Administrator password for the VMs that will be created as part of this cluster. """ - pulumi.set(__self__, "client_connection_port", client_connection_port) - pulumi.set(__self__, "http_gateway_port", http_gateway_port) - pulumi.set(__self__, "lb_rules", lb_rules) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ManagedClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_connection_port=client_connection_port, + http_gateway_port=http_gateway_port, + lb_rules=lb_rules, + resource_group_name=resource_group_name, + authentication=authentication, + backup_service_enabled=backup_service_enabled, + custom_fabric_settings=custom_fabric_settings, + dns_name=dns_name, + dns_service_enabled=dns_service_enabled, + location=location, + name=name, + node_types=node_types, + password=password, + sku=sku, + tags=tags, + upgrade_wave=upgrade_wave, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_connection_port: Optional[pulumi.Input[int]] = None, + http_gateway_port: Optional[pulumi.Input[int]] = None, + lb_rules: Optional[pulumi.Input[Sequence[pulumi.Input['ManagedClusterLbRuleArgs']]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + authentication: Optional[pulumi.Input['ManagedClusterAuthenticationArgs']] = None, + backup_service_enabled: Optional[pulumi.Input[bool]] = None, + custom_fabric_settings: Optional[pulumi.Input[Sequence[pulumi.Input['ManagedClusterCustomFabricSettingArgs']]]] = None, + dns_name: Optional[pulumi.Input[str]] = None, + dns_service_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_types: Optional[pulumi.Input[Sequence[pulumi.Input['ManagedClusterNodeTypeArgs']]]] = None, + password: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + upgrade_wave: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_connection_port is None and 'clientConnectionPort' in kwargs: + client_connection_port = kwargs['clientConnectionPort'] + if client_connection_port is None: + raise TypeError("Missing 'client_connection_port' argument") + if http_gateway_port is None and 'httpGatewayPort' in kwargs: + http_gateway_port = kwargs['httpGatewayPort'] + if http_gateway_port is None: + raise TypeError("Missing 'http_gateway_port' argument") + if lb_rules is None and 'lbRules' in kwargs: + lb_rules = kwargs['lbRules'] + if lb_rules is None: + raise TypeError("Missing 'lb_rules' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if backup_service_enabled is None and 'backupServiceEnabled' in kwargs: + backup_service_enabled = kwargs['backupServiceEnabled'] + if custom_fabric_settings is None and 'customFabricSettings' in kwargs: + custom_fabric_settings = kwargs['customFabricSettings'] + if dns_name is None and 'dnsName' in kwargs: + dns_name = kwargs['dnsName'] + if dns_service_enabled is None and 'dnsServiceEnabled' in kwargs: + dns_service_enabled = kwargs['dnsServiceEnabled'] + if node_types is None and 'nodeTypes' in kwargs: + node_types = kwargs['nodeTypes'] + if upgrade_wave is None and 'upgradeWave' in kwargs: + upgrade_wave = kwargs['upgradeWave'] + + _setter("client_connection_port", client_connection_port) + _setter("http_gateway_port", http_gateway_port) + _setter("lb_rules", lb_rules) + _setter("resource_group_name", resource_group_name) if authentication is not None: - pulumi.set(__self__, "authentication", authentication) + _setter("authentication", authentication) if backup_service_enabled is not None: - pulumi.set(__self__, "backup_service_enabled", backup_service_enabled) + _setter("backup_service_enabled", backup_service_enabled) if custom_fabric_settings is not None: - pulumi.set(__self__, "custom_fabric_settings", custom_fabric_settings) + _setter("custom_fabric_settings", custom_fabric_settings) if dns_name is not None: - pulumi.set(__self__, "dns_name", dns_name) + _setter("dns_name", dns_name) if dns_service_enabled is not None: - pulumi.set(__self__, "dns_service_enabled", dns_service_enabled) + _setter("dns_service_enabled", dns_service_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_types is not None: - pulumi.set(__self__, "node_types", node_types) + _setter("node_types", node_types) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if upgrade_wave is not None: - pulumi.set(__self__, "upgrade_wave", upgrade_wave) + _setter("upgrade_wave", upgrade_wave) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="clientConnectionPort") @@ -329,40 +400,103 @@ def __init__(__self__, *, :param pulumi.Input[str] upgrade_wave: Upgrade wave for the fabric runtime. Default is `Wave0`, allowed value must be one of `Wave0`, `Wave1`, or `Wave2`. :param pulumi.Input[str] username: Administrator password for the VMs that will be created as part of this cluster. """ + _ManagedClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication=authentication, + backup_service_enabled=backup_service_enabled, + client_connection_port=client_connection_port, + custom_fabric_settings=custom_fabric_settings, + dns_name=dns_name, + dns_service_enabled=dns_service_enabled, + http_gateway_port=http_gateway_port, + lb_rules=lb_rules, + location=location, + name=name, + node_types=node_types, + password=password, + resource_group_name=resource_group_name, + sku=sku, + tags=tags, + upgrade_wave=upgrade_wave, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication: Optional[pulumi.Input['ManagedClusterAuthenticationArgs']] = None, + backup_service_enabled: Optional[pulumi.Input[bool]] = None, + client_connection_port: Optional[pulumi.Input[int]] = None, + custom_fabric_settings: Optional[pulumi.Input[Sequence[pulumi.Input['ManagedClusterCustomFabricSettingArgs']]]] = None, + dns_name: Optional[pulumi.Input[str]] = None, + dns_service_enabled: Optional[pulumi.Input[bool]] = None, + http_gateway_port: Optional[pulumi.Input[int]] = None, + lb_rules: Optional[pulumi.Input[Sequence[pulumi.Input['ManagedClusterLbRuleArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_types: Optional[pulumi.Input[Sequence[pulumi.Input['ManagedClusterNodeTypeArgs']]]] = None, + password: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + upgrade_wave: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backup_service_enabled is None and 'backupServiceEnabled' in kwargs: + backup_service_enabled = kwargs['backupServiceEnabled'] + if client_connection_port is None and 'clientConnectionPort' in kwargs: + client_connection_port = kwargs['clientConnectionPort'] + if custom_fabric_settings is None and 'customFabricSettings' in kwargs: + custom_fabric_settings = kwargs['customFabricSettings'] + if dns_name is None and 'dnsName' in kwargs: + dns_name = kwargs['dnsName'] + if dns_service_enabled is None and 'dnsServiceEnabled' in kwargs: + dns_service_enabled = kwargs['dnsServiceEnabled'] + if http_gateway_port is None and 'httpGatewayPort' in kwargs: + http_gateway_port = kwargs['httpGatewayPort'] + if lb_rules is None and 'lbRules' in kwargs: + lb_rules = kwargs['lbRules'] + if node_types is None and 'nodeTypes' in kwargs: + node_types = kwargs['nodeTypes'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if upgrade_wave is None and 'upgradeWave' in kwargs: + upgrade_wave = kwargs['upgradeWave'] + if authentication is not None: - pulumi.set(__self__, "authentication", authentication) + _setter("authentication", authentication) if backup_service_enabled is not None: - pulumi.set(__self__, "backup_service_enabled", backup_service_enabled) + _setter("backup_service_enabled", backup_service_enabled) if client_connection_port is not None: - pulumi.set(__self__, "client_connection_port", client_connection_port) + _setter("client_connection_port", client_connection_port) if custom_fabric_settings is not None: - pulumi.set(__self__, "custom_fabric_settings", custom_fabric_settings) + _setter("custom_fabric_settings", custom_fabric_settings) if dns_name is not None: - pulumi.set(__self__, "dns_name", dns_name) + _setter("dns_name", dns_name) if dns_service_enabled is not None: - pulumi.set(__self__, "dns_service_enabled", dns_service_enabled) + _setter("dns_service_enabled", dns_service_enabled) if http_gateway_port is not None: - pulumi.set(__self__, "http_gateway_port", http_gateway_port) + _setter("http_gateway_port", http_gateway_port) if lb_rules is not None: - pulumi.set(__self__, "lb_rules", lb_rules) + _setter("lb_rules", lb_rules) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_types is not None: - pulumi.set(__self__, "node_types", node_types) + _setter("node_types", node_types) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if upgrade_wave is not None: - pulumi.set(__self__, "upgrade_wave", upgrade_wave) + _setter("upgrade_wave", upgrade_wave) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -716,6 +850,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -747,6 +885,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ManagedClusterArgs.__new__(ManagedClusterArgs) + if authentication is not None and not isinstance(authentication, ManagedClusterAuthenticationArgs): + authentication = authentication or {} + def _setter(key, value): + authentication[key] = value + ManagedClusterAuthenticationArgs._configure(_setter, **authentication) __props__.__dict__["authentication"] = authentication __props__.__dict__["backup_service_enabled"] = backup_service_enabled if client_connection_port is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/servicefabric/outputs.py b/sdk/python/pulumi_azure/servicefabric/outputs.py index 8d9d8a9b66..ed8b5358b3 100644 --- a/sdk/python/pulumi_azure/servicefabric/outputs.py +++ b/sdk/python/pulumi_azure/servicefabric/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -70,9 +70,36 @@ def __init__(__self__, *, :param str cluster_application_id: The Azure Active Directory Cluster Application ID. :param str tenant_id: The Azure Active Directory Tenant ID. """ - pulumi.set(__self__, "client_application_id", client_application_id) - pulumi.set(__self__, "cluster_application_id", cluster_application_id) - pulumi.set(__self__, "tenant_id", tenant_id) + ClusterAzureActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_application_id=client_application_id, + cluster_application_id=cluster_application_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_application_id: Optional[str] = None, + cluster_application_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_application_id is None and 'clientApplicationId' in kwargs: + client_application_id = kwargs['clientApplicationId'] + if client_application_id is None: + raise TypeError("Missing 'client_application_id' argument") + if cluster_application_id is None and 'clusterApplicationId' in kwargs: + cluster_application_id = kwargs['clusterApplicationId'] + if cluster_application_id is None: + raise TypeError("Missing 'cluster_application_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("client_application_id", client_application_id) + _setter("cluster_application_id", cluster_application_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="clientApplicationId") @@ -129,10 +156,33 @@ def __init__(__self__, *, :param str x509_store_name: The X509 Store where the Certificate Exists, such as `My`. :param str thumbprint_secondary: The Secondary Thumbprint of the Certificate. """ - pulumi.set(__self__, "thumbprint", thumbprint) - pulumi.set(__self__, "x509_store_name", x509_store_name) + ClusterCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + thumbprint=thumbprint, + x509_store_name=x509_store_name, + thumbprint_secondary=thumbprint_secondary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + thumbprint: Optional[str] = None, + x509_store_name: Optional[str] = None, + thumbprint_secondary: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + if x509_store_name is None and 'x509StoreName' in kwargs: + x509_store_name = kwargs['x509StoreName'] + if x509_store_name is None: + raise TypeError("Missing 'x509_store_name' argument") + if thumbprint_secondary is None and 'thumbprintSecondary' in kwargs: + thumbprint_secondary = kwargs['thumbprintSecondary'] + + _setter("thumbprint", thumbprint) + _setter("x509_store_name", x509_store_name) if thumbprint_secondary is not None: - pulumi.set(__self__, "thumbprint_secondary", thumbprint_secondary) + _setter("thumbprint_secondary", thumbprint_secondary) @property @pulumi.getter @@ -187,8 +237,29 @@ def __init__(__self__, *, :param Sequence['ClusterCertificateCommonNamesCommonNameArgs'] common_names: A `common_names` block as defined below. :param str x509_store_name: The X509 Store where the Certificate Exists, such as `My`. """ - pulumi.set(__self__, "common_names", common_names) - pulumi.set(__self__, "x509_store_name", x509_store_name) + ClusterCertificateCommonNames._configure( + lambda key, value: pulumi.set(__self__, key, value), + common_names=common_names, + x509_store_name=x509_store_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + common_names: Optional[Sequence['outputs.ClusterCertificateCommonNamesCommonName']] = None, + x509_store_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if common_names is None and 'commonNames' in kwargs: + common_names = kwargs['commonNames'] + if common_names is None: + raise TypeError("Missing 'common_names' argument") + if x509_store_name is None and 'x509StoreName' in kwargs: + x509_store_name = kwargs['x509StoreName'] + if x509_store_name is None: + raise TypeError("Missing 'x509_store_name' argument") + + _setter("common_names", common_names) + _setter("x509_store_name", x509_store_name) @property @pulumi.getter(name="commonNames") @@ -237,9 +308,28 @@ def __init__(__self__, *, > **NOTE:** Certificate Issuer Thumbprint may become required in the future, `https://docs.microsoft.com/azure/service-fabric/service-fabric-create-cluster-using-cert-cn#download-and-update-a-sample-template`. """ - pulumi.set(__self__, "certificate_common_name", certificate_common_name) + ClusterCertificateCommonNamesCommonName._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_common_name=certificate_common_name, + certificate_issuer_thumbprint=certificate_issuer_thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_common_name: Optional[str] = None, + certificate_issuer_thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_common_name is None and 'certificateCommonName' in kwargs: + certificate_common_name = kwargs['certificateCommonName'] + if certificate_common_name is None: + raise TypeError("Missing 'certificate_common_name' argument") + if certificate_issuer_thumbprint is None and 'certificateIssuerThumbprint' in kwargs: + certificate_issuer_thumbprint = kwargs['certificateIssuerThumbprint'] + + _setter("certificate_common_name", certificate_common_name) if certificate_issuer_thumbprint is not None: - pulumi.set(__self__, "certificate_issuer_thumbprint", certificate_issuer_thumbprint) + _setter("certificate_issuer_thumbprint", certificate_issuer_thumbprint) @property @pulumi.getter(name="certificateCommonName") @@ -294,10 +384,35 @@ def __init__(__self__, *, > **NOTE:** Certificate Issuer Thumbprint may become required in the future, `https://docs.microsoft.com/azure/service-fabric/service-fabric-create-cluster-using-cert-cn#download-and-update-a-sample-template`. """ - pulumi.set(__self__, "common_name", common_name) - pulumi.set(__self__, "is_admin", is_admin) + ClusterClientCertificateCommonName._configure( + lambda key, value: pulumi.set(__self__, key, value), + common_name=common_name, + is_admin=is_admin, + issuer_thumbprint=issuer_thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + common_name: Optional[str] = None, + is_admin: Optional[bool] = None, + issuer_thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if common_name is None and 'commonName' in kwargs: + common_name = kwargs['commonName'] + if common_name is None: + raise TypeError("Missing 'common_name' argument") + if is_admin is None and 'isAdmin' in kwargs: + is_admin = kwargs['isAdmin'] + if is_admin is None: + raise TypeError("Missing 'is_admin' argument") + if issuer_thumbprint is None and 'issuerThumbprint' in kwargs: + issuer_thumbprint = kwargs['issuerThumbprint'] + + _setter("common_name", common_name) + _setter("is_admin", is_admin) if issuer_thumbprint is not None: - pulumi.set(__self__, "issuer_thumbprint", issuer_thumbprint) + _setter("issuer_thumbprint", issuer_thumbprint) @property @pulumi.getter(name="commonName") @@ -352,8 +467,27 @@ def __init__(__self__, *, :param bool is_admin: Does the Client Certificate have Admin Access to the cluster? Non-admin clients can only perform read only operations on the cluster. :param str thumbprint: The Thumbprint associated with the Client Certificate. """ - pulumi.set(__self__, "is_admin", is_admin) - pulumi.set(__self__, "thumbprint", thumbprint) + ClusterClientCertificateThumbprint._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_admin=is_admin, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_admin: Optional[bool] = None, + thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_admin is None and 'isAdmin' in kwargs: + is_admin = kwargs['isAdmin'] + if is_admin is None: + raise TypeError("Missing 'is_admin' argument") + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + + _setter("is_admin", is_admin) + _setter("thumbprint", thumbprint) @property @pulumi.getter(name="isAdmin") @@ -412,11 +546,50 @@ def __init__(__self__, *, :param str storage_account_name: The name of the Storage Account where the Diagnostics should be sent to. :param str table_endpoint: The Table Endpoint of the Storage Account. """ - pulumi.set(__self__, "blob_endpoint", blob_endpoint) - pulumi.set(__self__, "protected_account_key_name", protected_account_key_name) - pulumi.set(__self__, "queue_endpoint", queue_endpoint) - pulumi.set(__self__, "storage_account_name", storage_account_name) - pulumi.set(__self__, "table_endpoint", table_endpoint) + ClusterDiagnosticsConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_endpoint=blob_endpoint, + protected_account_key_name=protected_account_key_name, + queue_endpoint=queue_endpoint, + storage_account_name=storage_account_name, + table_endpoint=table_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_endpoint: Optional[str] = None, + protected_account_key_name: Optional[str] = None, + queue_endpoint: Optional[str] = None, + storage_account_name: Optional[str] = None, + table_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_endpoint is None and 'blobEndpoint' in kwargs: + blob_endpoint = kwargs['blobEndpoint'] + if blob_endpoint is None: + raise TypeError("Missing 'blob_endpoint' argument") + if protected_account_key_name is None and 'protectedAccountKeyName' in kwargs: + protected_account_key_name = kwargs['protectedAccountKeyName'] + if protected_account_key_name is None: + raise TypeError("Missing 'protected_account_key_name' argument") + if queue_endpoint is None and 'queueEndpoint' in kwargs: + queue_endpoint = kwargs['queueEndpoint'] + if queue_endpoint is None: + raise TypeError("Missing 'queue_endpoint' argument") + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if table_endpoint is None and 'tableEndpoint' in kwargs: + table_endpoint = kwargs['tableEndpoint'] + if table_endpoint is None: + raise TypeError("Missing 'table_endpoint' argument") + + _setter("blob_endpoint", blob_endpoint) + _setter("protected_account_key_name", protected_account_key_name) + _setter("queue_endpoint", queue_endpoint) + _setter("storage_account_name", storage_account_name) + _setter("table_endpoint", table_endpoint) @property @pulumi.getter(name="blobEndpoint") @@ -468,9 +641,24 @@ def __init__(__self__, *, :param str name: The name of the Fabric Setting, such as `Security` or `Federation`. :param Mapping[str, str] parameters: A map containing settings for the specified Fabric Setting. """ - pulumi.set(__self__, "name", name) + ClusterFabricSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -557,27 +745,94 @@ def __init__(__self__, *, :param Mapping[str, str] placement_properties: The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run. :param int reverse_proxy_endpoint_port: The Port used for the Reverse Proxy Endpoint for this Node Type. Changing this will upgrade the cluster. """ - pulumi.set(__self__, "client_endpoint_port", client_endpoint_port) - pulumi.set(__self__, "http_endpoint_port", http_endpoint_port) - pulumi.set(__self__, "instance_count", instance_count) - pulumi.set(__self__, "is_primary", is_primary) - pulumi.set(__self__, "name", name) + ClusterNodeType._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_endpoint_port=client_endpoint_port, + http_endpoint_port=http_endpoint_port, + instance_count=instance_count, + is_primary=is_primary, + name=name, + application_ports=application_ports, + capacities=capacities, + durability_level=durability_level, + ephemeral_ports=ephemeral_ports, + is_stateless=is_stateless, + multiple_availability_zones=multiple_availability_zones, + placement_properties=placement_properties, + reverse_proxy_endpoint_port=reverse_proxy_endpoint_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_endpoint_port: Optional[int] = None, + http_endpoint_port: Optional[int] = None, + instance_count: Optional[int] = None, + is_primary: Optional[bool] = None, + name: Optional[str] = None, + application_ports: Optional['outputs.ClusterNodeTypeApplicationPorts'] = None, + capacities: Optional[Mapping[str, str]] = None, + durability_level: Optional[str] = None, + ephemeral_ports: Optional['outputs.ClusterNodeTypeEphemeralPorts'] = None, + is_stateless: Optional[bool] = None, + multiple_availability_zones: Optional[bool] = None, + placement_properties: Optional[Mapping[str, str]] = None, + reverse_proxy_endpoint_port: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_endpoint_port is None and 'clientEndpointPort' in kwargs: + client_endpoint_port = kwargs['clientEndpointPort'] + if client_endpoint_port is None: + raise TypeError("Missing 'client_endpoint_port' argument") + if http_endpoint_port is None and 'httpEndpointPort' in kwargs: + http_endpoint_port = kwargs['httpEndpointPort'] + if http_endpoint_port is None: + raise TypeError("Missing 'http_endpoint_port' argument") + if instance_count is None and 'instanceCount' in kwargs: + instance_count = kwargs['instanceCount'] + if instance_count is None: + raise TypeError("Missing 'instance_count' argument") + if is_primary is None and 'isPrimary' in kwargs: + is_primary = kwargs['isPrimary'] + if is_primary is None: + raise TypeError("Missing 'is_primary' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if application_ports is None and 'applicationPorts' in kwargs: + application_ports = kwargs['applicationPorts'] + if durability_level is None and 'durabilityLevel' in kwargs: + durability_level = kwargs['durabilityLevel'] + if ephemeral_ports is None and 'ephemeralPorts' in kwargs: + ephemeral_ports = kwargs['ephemeralPorts'] + if is_stateless is None and 'isStateless' in kwargs: + is_stateless = kwargs['isStateless'] + if multiple_availability_zones is None and 'multipleAvailabilityZones' in kwargs: + multiple_availability_zones = kwargs['multipleAvailabilityZones'] + if placement_properties is None and 'placementProperties' in kwargs: + placement_properties = kwargs['placementProperties'] + if reverse_proxy_endpoint_port is None and 'reverseProxyEndpointPort' in kwargs: + reverse_proxy_endpoint_port = kwargs['reverseProxyEndpointPort'] + + _setter("client_endpoint_port", client_endpoint_port) + _setter("http_endpoint_port", http_endpoint_port) + _setter("instance_count", instance_count) + _setter("is_primary", is_primary) + _setter("name", name) if application_ports is not None: - pulumi.set(__self__, "application_ports", application_ports) + _setter("application_ports", application_ports) if capacities is not None: - pulumi.set(__self__, "capacities", capacities) + _setter("capacities", capacities) if durability_level is not None: - pulumi.set(__self__, "durability_level", durability_level) + _setter("durability_level", durability_level) if ephemeral_ports is not None: - pulumi.set(__self__, "ephemeral_ports", ephemeral_ports) + _setter("ephemeral_ports", ephemeral_ports) if is_stateless is not None: - pulumi.set(__self__, "is_stateless", is_stateless) + _setter("is_stateless", is_stateless) if multiple_availability_zones is not None: - pulumi.set(__self__, "multiple_availability_zones", multiple_availability_zones) + _setter("multiple_availability_zones", multiple_availability_zones) if placement_properties is not None: - pulumi.set(__self__, "placement_properties", placement_properties) + _setter("placement_properties", placement_properties) if reverse_proxy_endpoint_port is not None: - pulumi.set(__self__, "reverse_proxy_endpoint_port", reverse_proxy_endpoint_port) + _setter("reverse_proxy_endpoint_port", reverse_proxy_endpoint_port) @property @pulumi.getter(name="clientEndpointPort") @@ -712,8 +967,29 @@ def __init__(__self__, *, :param int end_port: The end of the Application Port Range on this Node Type. :param int start_port: The start of the Application Port Range on this Node Type. """ - pulumi.set(__self__, "end_port", end_port) - pulumi.set(__self__, "start_port", start_port) + ClusterNodeTypeApplicationPorts._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_port=end_port, + start_port=start_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_port: Optional[int] = None, + start_port: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_port is None and 'endPort' in kwargs: + end_port = kwargs['endPort'] + if end_port is None: + raise TypeError("Missing 'end_port' argument") + if start_port is None and 'startPort' in kwargs: + start_port = kwargs['startPort'] + if start_port is None: + raise TypeError("Missing 'start_port' argument") + + _setter("end_port", end_port) + _setter("start_port", start_port) @property @pulumi.getter(name="endPort") @@ -760,8 +1036,29 @@ def __init__(__self__, *, :param int end_port: The end of the Ephemeral Port Range on this Node Type. :param int start_port: The start of the Ephemeral Port Range on this Node Type. """ - pulumi.set(__self__, "end_port", end_port) - pulumi.set(__self__, "start_port", start_port) + ClusterNodeTypeEphemeralPorts._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_port=end_port, + start_port=start_port, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_port: Optional[int] = None, + start_port: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_port is None and 'endPort' in kwargs: + end_port = kwargs['endPort'] + if end_port is None: + raise TypeError("Missing 'end_port' argument") + if start_port is None and 'startPort' in kwargs: + start_port = kwargs['startPort'] + if start_port is None: + raise TypeError("Missing 'start_port' argument") + + _setter("end_port", end_port) + _setter("start_port", start_port) @property @pulumi.getter(name="endPort") @@ -810,10 +1107,33 @@ def __init__(__self__, *, :param str x509_store_name: The X509 Store where the Certificate Exists, such as `My`. :param str thumbprint_secondary: The Secondary Thumbprint of the Certificate. """ - pulumi.set(__self__, "thumbprint", thumbprint) - pulumi.set(__self__, "x509_store_name", x509_store_name) + ClusterReverseProxyCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + thumbprint=thumbprint, + x509_store_name=x509_store_name, + thumbprint_secondary=thumbprint_secondary, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + thumbprint: Optional[str] = None, + x509_store_name: Optional[str] = None, + thumbprint_secondary: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + if x509_store_name is None and 'x509StoreName' in kwargs: + x509_store_name = kwargs['x509StoreName'] + if x509_store_name is None: + raise TypeError("Missing 'x509_store_name' argument") + if thumbprint_secondary is None and 'thumbprintSecondary' in kwargs: + thumbprint_secondary = kwargs['thumbprintSecondary'] + + _setter("thumbprint", thumbprint) + _setter("x509_store_name", x509_store_name) if thumbprint_secondary is not None: - pulumi.set(__self__, "thumbprint_secondary", thumbprint_secondary) + _setter("thumbprint_secondary", thumbprint_secondary) @property @pulumi.getter @@ -868,8 +1188,29 @@ def __init__(__self__, *, :param Sequence['ClusterReverseProxyCertificateCommonNamesCommonNameArgs'] common_names: A `common_names` block as defined below. :param str x509_store_name: The X509 Store where the Certificate Exists, such as `My`. """ - pulumi.set(__self__, "common_names", common_names) - pulumi.set(__self__, "x509_store_name", x509_store_name) + ClusterReverseProxyCertificateCommonNames._configure( + lambda key, value: pulumi.set(__self__, key, value), + common_names=common_names, + x509_store_name=x509_store_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + common_names: Optional[Sequence['outputs.ClusterReverseProxyCertificateCommonNamesCommonName']] = None, + x509_store_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if common_names is None and 'commonNames' in kwargs: + common_names = kwargs['commonNames'] + if common_names is None: + raise TypeError("Missing 'common_names' argument") + if x509_store_name is None and 'x509StoreName' in kwargs: + x509_store_name = kwargs['x509StoreName'] + if x509_store_name is None: + raise TypeError("Missing 'x509_store_name' argument") + + _setter("common_names", common_names) + _setter("x509_store_name", x509_store_name) @property @pulumi.getter(name="commonNames") @@ -918,9 +1259,28 @@ def __init__(__self__, *, > **NOTE:** Certificate Issuer Thumbprint may become required in the future, `https://docs.microsoft.com/azure/service-fabric/service-fabric-create-cluster-using-cert-cn#download-and-update-a-sample-template`. """ - pulumi.set(__self__, "certificate_common_name", certificate_common_name) + ClusterReverseProxyCertificateCommonNamesCommonName._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_common_name=certificate_common_name, + certificate_issuer_thumbprint=certificate_issuer_thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_common_name: Optional[str] = None, + certificate_issuer_thumbprint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_common_name is None and 'certificateCommonName' in kwargs: + certificate_common_name = kwargs['certificateCommonName'] + if certificate_common_name is None: + raise TypeError("Missing 'certificate_common_name' argument") + if certificate_issuer_thumbprint is None and 'certificateIssuerThumbprint' in kwargs: + certificate_issuer_thumbprint = kwargs['certificateIssuerThumbprint'] + + _setter("certificate_common_name", certificate_common_name) if certificate_issuer_thumbprint is not None: - pulumi.set(__self__, "certificate_issuer_thumbprint", certificate_issuer_thumbprint) + _setter("certificate_issuer_thumbprint", certificate_issuer_thumbprint) @property @pulumi.getter(name="certificateCommonName") @@ -997,24 +1357,69 @@ def __init__(__self__, *, :param str upgrade_replica_set_check_timeout: Specifies the duration, in "hh:mm:ss" string format, that Service Fabric waits for a replica set to reconfigure into a safe state, if it is not already in a safe state, before Service Fabric proceeds with the upgrade. Defaults to `10675199.02:48:05.4775807`. :param str upgrade_timeout: Specifies the duration, in "hh:mm:ss" string format, that Service Fabric takes for the entire upgrade. After this period, the upgrade fails. Defaults to `12:00:00`. """ + ClusterUpgradePolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + delta_health_policy=delta_health_policy, + force_restart_enabled=force_restart_enabled, + health_check_retry_timeout=health_check_retry_timeout, + health_check_stable_duration=health_check_stable_duration, + health_check_wait_duration=health_check_wait_duration, + health_policy=health_policy, + upgrade_domain_timeout=upgrade_domain_timeout, + upgrade_replica_set_check_timeout=upgrade_replica_set_check_timeout, + upgrade_timeout=upgrade_timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + delta_health_policy: Optional['outputs.ClusterUpgradePolicyDeltaHealthPolicy'] = None, + force_restart_enabled: Optional[bool] = None, + health_check_retry_timeout: Optional[str] = None, + health_check_stable_duration: Optional[str] = None, + health_check_wait_duration: Optional[str] = None, + health_policy: Optional['outputs.ClusterUpgradePolicyHealthPolicy'] = None, + upgrade_domain_timeout: Optional[str] = None, + upgrade_replica_set_check_timeout: Optional[str] = None, + upgrade_timeout: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if delta_health_policy is None and 'deltaHealthPolicy' in kwargs: + delta_health_policy = kwargs['deltaHealthPolicy'] + if force_restart_enabled is None and 'forceRestartEnabled' in kwargs: + force_restart_enabled = kwargs['forceRestartEnabled'] + if health_check_retry_timeout is None and 'healthCheckRetryTimeout' in kwargs: + health_check_retry_timeout = kwargs['healthCheckRetryTimeout'] + if health_check_stable_duration is None and 'healthCheckStableDuration' in kwargs: + health_check_stable_duration = kwargs['healthCheckStableDuration'] + if health_check_wait_duration is None and 'healthCheckWaitDuration' in kwargs: + health_check_wait_duration = kwargs['healthCheckWaitDuration'] + if health_policy is None and 'healthPolicy' in kwargs: + health_policy = kwargs['healthPolicy'] + if upgrade_domain_timeout is None and 'upgradeDomainTimeout' in kwargs: + upgrade_domain_timeout = kwargs['upgradeDomainTimeout'] + if upgrade_replica_set_check_timeout is None and 'upgradeReplicaSetCheckTimeout' in kwargs: + upgrade_replica_set_check_timeout = kwargs['upgradeReplicaSetCheckTimeout'] + if upgrade_timeout is None and 'upgradeTimeout' in kwargs: + upgrade_timeout = kwargs['upgradeTimeout'] + if delta_health_policy is not None: - pulumi.set(__self__, "delta_health_policy", delta_health_policy) + _setter("delta_health_policy", delta_health_policy) if force_restart_enabled is not None: - pulumi.set(__self__, "force_restart_enabled", force_restart_enabled) + _setter("force_restart_enabled", force_restart_enabled) if health_check_retry_timeout is not None: - pulumi.set(__self__, "health_check_retry_timeout", health_check_retry_timeout) + _setter("health_check_retry_timeout", health_check_retry_timeout) if health_check_stable_duration is not None: - pulumi.set(__self__, "health_check_stable_duration", health_check_stable_duration) + _setter("health_check_stable_duration", health_check_stable_duration) if health_check_wait_duration is not None: - pulumi.set(__self__, "health_check_wait_duration", health_check_wait_duration) + _setter("health_check_wait_duration", health_check_wait_duration) if health_policy is not None: - pulumi.set(__self__, "health_policy", health_policy) + _setter("health_policy", health_policy) if upgrade_domain_timeout is not None: - pulumi.set(__self__, "upgrade_domain_timeout", upgrade_domain_timeout) + _setter("upgrade_domain_timeout", upgrade_domain_timeout) if upgrade_replica_set_check_timeout is not None: - pulumi.set(__self__, "upgrade_replica_set_check_timeout", upgrade_replica_set_check_timeout) + _setter("upgrade_replica_set_check_timeout", upgrade_replica_set_check_timeout) if upgrade_timeout is not None: - pulumi.set(__self__, "upgrade_timeout", upgrade_timeout) + _setter("upgrade_timeout", upgrade_timeout) @property @pulumi.getter(name="deltaHealthPolicy") @@ -1121,12 +1526,33 @@ def __init__(__self__, *, :param int max_delta_unhealthy_nodes_percent: Specifies the maximum tolerated percentage of delta unhealthy nodes that can have aggregated health states of error. If the current unhealthy nodes do not respect the percentage relative to the state at the beginning of the upgrade, the cluster is unhealthy. Defaults to `0`. :param int max_upgrade_domain_delta_unhealthy_nodes_percent: Specifies the maximum tolerated percentage of upgrade domain delta unhealthy nodes that can have aggregated health state of error. If there is any upgrade domain where the current unhealthy nodes do not respect the percentage relative to the state at the beginning of the upgrade, the cluster is unhealthy. Defaults to `0`. """ + ClusterUpgradePolicyDeltaHealthPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_delta_unhealthy_applications_percent=max_delta_unhealthy_applications_percent, + max_delta_unhealthy_nodes_percent=max_delta_unhealthy_nodes_percent, + max_upgrade_domain_delta_unhealthy_nodes_percent=max_upgrade_domain_delta_unhealthy_nodes_percent, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_delta_unhealthy_applications_percent: Optional[int] = None, + max_delta_unhealthy_nodes_percent: Optional[int] = None, + max_upgrade_domain_delta_unhealthy_nodes_percent: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_delta_unhealthy_applications_percent is None and 'maxDeltaUnhealthyApplicationsPercent' in kwargs: + max_delta_unhealthy_applications_percent = kwargs['maxDeltaUnhealthyApplicationsPercent'] + if max_delta_unhealthy_nodes_percent is None and 'maxDeltaUnhealthyNodesPercent' in kwargs: + max_delta_unhealthy_nodes_percent = kwargs['maxDeltaUnhealthyNodesPercent'] + if max_upgrade_domain_delta_unhealthy_nodes_percent is None and 'maxUpgradeDomainDeltaUnhealthyNodesPercent' in kwargs: + max_upgrade_domain_delta_unhealthy_nodes_percent = kwargs['maxUpgradeDomainDeltaUnhealthyNodesPercent'] + if max_delta_unhealthy_applications_percent is not None: - pulumi.set(__self__, "max_delta_unhealthy_applications_percent", max_delta_unhealthy_applications_percent) + _setter("max_delta_unhealthy_applications_percent", max_delta_unhealthy_applications_percent) if max_delta_unhealthy_nodes_percent is not None: - pulumi.set(__self__, "max_delta_unhealthy_nodes_percent", max_delta_unhealthy_nodes_percent) + _setter("max_delta_unhealthy_nodes_percent", max_delta_unhealthy_nodes_percent) if max_upgrade_domain_delta_unhealthy_nodes_percent is not None: - pulumi.set(__self__, "max_upgrade_domain_delta_unhealthy_nodes_percent", max_upgrade_domain_delta_unhealthy_nodes_percent) + _setter("max_upgrade_domain_delta_unhealthy_nodes_percent", max_upgrade_domain_delta_unhealthy_nodes_percent) @property @pulumi.getter(name="maxDeltaUnhealthyApplicationsPercent") @@ -1181,10 +1607,27 @@ def __init__(__self__, *, :param int max_unhealthy_applications_percent: Specifies the maximum tolerated percentage of applications that can have aggregated health state of error. If the upgrade exceeds this percentage, the cluster is unhealthy. Defaults to `0`. :param int max_unhealthy_nodes_percent: Specifies the maximum tolerated percentage of nodes that can have aggregated health states of error. If an upgrade exceeds this percentage, the cluster is unhealthy. Defaults to `0`. """ + ClusterUpgradePolicyHealthPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_unhealthy_applications_percent=max_unhealthy_applications_percent, + max_unhealthy_nodes_percent=max_unhealthy_nodes_percent, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_unhealthy_applications_percent: Optional[int] = None, + max_unhealthy_nodes_percent: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_unhealthy_applications_percent is None and 'maxUnhealthyApplicationsPercent' in kwargs: + max_unhealthy_applications_percent = kwargs['maxUnhealthyApplicationsPercent'] + if max_unhealthy_nodes_percent is None and 'maxUnhealthyNodesPercent' in kwargs: + max_unhealthy_nodes_percent = kwargs['maxUnhealthyNodesPercent'] + if max_unhealthy_applications_percent is not None: - pulumi.set(__self__, "max_unhealthy_applications_percent", max_unhealthy_applications_percent) + _setter("max_unhealthy_applications_percent", max_unhealthy_applications_percent) if max_unhealthy_nodes_percent is not None: - pulumi.set(__self__, "max_unhealthy_nodes_percent", max_unhealthy_nodes_percent) + _setter("max_unhealthy_nodes_percent", max_unhealthy_nodes_percent) @property @pulumi.getter(name="maxUnhealthyApplicationsPercent") @@ -1229,10 +1672,25 @@ def __init__(__self__, *, :param 'ManagedClusterAuthenticationActiveDirectoryArgs' active_directory: A `active_directory` block as defined above. :param Sequence['ManagedClusterAuthenticationCertificateArgs'] certificates: One or more `certificate` blocks as defined below. """ + ManagedClusterAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directory=active_directory, + certificates=certificates, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directory: Optional['outputs.ManagedClusterAuthenticationActiveDirectory'] = None, + certificates: Optional[Sequence['outputs.ManagedClusterAuthenticationCertificate']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) if certificates is not None: - pulumi.set(__self__, "certificates", certificates) + _setter("certificates", certificates) @property @pulumi.getter(name="activeDirectory") @@ -1283,9 +1741,36 @@ def __init__(__self__, *, :param str cluster_application_id: The ID of the Cluster Application. :param str tenant_id: The ID of the Tenant. """ - pulumi.set(__self__, "client_application_id", client_application_id) - pulumi.set(__self__, "cluster_application_id", cluster_application_id) - pulumi.set(__self__, "tenant_id", tenant_id) + ManagedClusterAuthenticationActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_application_id=client_application_id, + cluster_application_id=cluster_application_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_application_id: Optional[str] = None, + cluster_application_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_application_id is None and 'clientApplicationId' in kwargs: + client_application_id = kwargs['clientApplicationId'] + if client_application_id is None: + raise TypeError("Missing 'client_application_id' argument") + if cluster_application_id is None and 'clusterApplicationId' in kwargs: + cluster_application_id = kwargs['clusterApplicationId'] + if cluster_application_id is None: + raise TypeError("Missing 'cluster_application_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("client_application_id", client_application_id) + _setter("cluster_application_id", cluster_application_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="clientApplicationId") @@ -1340,10 +1825,31 @@ def __init__(__self__, *, :param str type: The type of the certificate. Can be `AdminClient` or `ReadOnlyClient`. :param str common_name: The certificate's CN. """ - pulumi.set(__self__, "thumbprint", thumbprint) - pulumi.set(__self__, "type", type) + ManagedClusterAuthenticationCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + thumbprint=thumbprint, + type=type, + common_name=common_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + thumbprint: Optional[str] = None, + type: Optional[str] = None, + common_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if thumbprint is None: + raise TypeError("Missing 'thumbprint' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if common_name is None and 'commonName' in kwargs: + common_name = kwargs['commonName'] + + _setter("thumbprint", thumbprint) + _setter("type", type) if common_name is not None: - pulumi.set(__self__, "common_name", common_name) + _setter("common_name", common_name) @property @pulumi.getter @@ -1381,9 +1887,30 @@ def __init__(__self__, *, :param str section: Section name. :param str value: Parameter value. """ - pulumi.set(__self__, "parameter", parameter) - pulumi.set(__self__, "section", section) - pulumi.set(__self__, "value", value) + ManagedClusterCustomFabricSetting._configure( + lambda key, value: pulumi.set(__self__, key, value), + parameter=parameter, + section=section, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + parameter: Optional[str] = None, + section: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parameter is None: + raise TypeError("Missing 'parameter' argument") + if section is None: + raise TypeError("Missing 'section' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("parameter", parameter) + _setter("section", section) + _setter("value", value) @property @pulumi.getter @@ -1448,12 +1975,47 @@ def __init__(__self__, *, :param str protocol: The transport protocol used in this rule. Can be one of `tcp` or `udp`. :param str probe_request_path: Path for the probe to check, when probe protocol is set to `http`. """ - pulumi.set(__self__, "backend_port", backend_port) - pulumi.set(__self__, "frontend_port", frontend_port) - pulumi.set(__self__, "probe_protocol", probe_protocol) - pulumi.set(__self__, "protocol", protocol) + ManagedClusterLbRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + backend_port=backend_port, + frontend_port=frontend_port, + probe_protocol=probe_protocol, + protocol=protocol, + probe_request_path=probe_request_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + backend_port: Optional[int] = None, + frontend_port: Optional[int] = None, + probe_protocol: Optional[str] = None, + protocol: Optional[str] = None, + probe_request_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if backend_port is None and 'backendPort' in kwargs: + backend_port = kwargs['backendPort'] + if backend_port is None: + raise TypeError("Missing 'backend_port' argument") + if frontend_port is None and 'frontendPort' in kwargs: + frontend_port = kwargs['frontendPort'] + if frontend_port is None: + raise TypeError("Missing 'frontend_port' argument") + if probe_protocol is None and 'probeProtocol' in kwargs: + probe_protocol = kwargs['probeProtocol'] + if probe_protocol is None: + raise TypeError("Missing 'probe_protocol' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if probe_request_path is None and 'probeRequestPath' in kwargs: + probe_request_path = kwargs['probeRequestPath'] + + _setter("backend_port", backend_port) + _setter("frontend_port", frontend_port) + _setter("probe_protocol", probe_protocol) + _setter("protocol", protocol) if probe_request_path is not None: - pulumi.set(__self__, "probe_request_path", probe_request_path) + _setter("probe_request_path", probe_request_path) @property @pulumi.getter(name="backendPort") @@ -1578,32 +2140,123 @@ def __init__(__self__, *, :param bool stateless: If set to true, only stateless workloads can run on this node type. :param Sequence['ManagedClusterNodeTypeVmSecretArgs'] vm_secrets: One or more `vm_secrets` blocks as defined below. """ - pulumi.set(__self__, "application_port_range", application_port_range) - pulumi.set(__self__, "data_disk_size_gb", data_disk_size_gb) - pulumi.set(__self__, "ephemeral_port_range", ephemeral_port_range) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "vm_image_offer", vm_image_offer) - pulumi.set(__self__, "vm_image_publisher", vm_image_publisher) - pulumi.set(__self__, "vm_image_sku", vm_image_sku) - pulumi.set(__self__, "vm_image_version", vm_image_version) - pulumi.set(__self__, "vm_instance_count", vm_instance_count) - pulumi.set(__self__, "vm_size", vm_size) + ManagedClusterNodeType._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_port_range=application_port_range, + data_disk_size_gb=data_disk_size_gb, + ephemeral_port_range=ephemeral_port_range, + name=name, + vm_image_offer=vm_image_offer, + vm_image_publisher=vm_image_publisher, + vm_image_sku=vm_image_sku, + vm_image_version=vm_image_version, + vm_instance_count=vm_instance_count, + vm_size=vm_size, + capacities=capacities, + data_disk_type=data_disk_type, + id=id, + multiple_placement_groups_enabled=multiple_placement_groups_enabled, + placement_properties=placement_properties, + primary=primary, + stateless=stateless, + vm_secrets=vm_secrets, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_port_range: Optional[str] = None, + data_disk_size_gb: Optional[int] = None, + ephemeral_port_range: Optional[str] = None, + name: Optional[str] = None, + vm_image_offer: Optional[str] = None, + vm_image_publisher: Optional[str] = None, + vm_image_sku: Optional[str] = None, + vm_image_version: Optional[str] = None, + vm_instance_count: Optional[int] = None, + vm_size: Optional[str] = None, + capacities: Optional[Mapping[str, str]] = None, + data_disk_type: Optional[str] = None, + id: Optional[str] = None, + multiple_placement_groups_enabled: Optional[bool] = None, + placement_properties: Optional[Mapping[str, str]] = None, + primary: Optional[bool] = None, + stateless: Optional[bool] = None, + vm_secrets: Optional[Sequence['outputs.ManagedClusterNodeTypeVmSecret']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_port_range is None and 'applicationPortRange' in kwargs: + application_port_range = kwargs['applicationPortRange'] + if application_port_range is None: + raise TypeError("Missing 'application_port_range' argument") + if data_disk_size_gb is None and 'dataDiskSizeGb' in kwargs: + data_disk_size_gb = kwargs['dataDiskSizeGb'] + if data_disk_size_gb is None: + raise TypeError("Missing 'data_disk_size_gb' argument") + if ephemeral_port_range is None and 'ephemeralPortRange' in kwargs: + ephemeral_port_range = kwargs['ephemeralPortRange'] + if ephemeral_port_range is None: + raise TypeError("Missing 'ephemeral_port_range' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if vm_image_offer is None and 'vmImageOffer' in kwargs: + vm_image_offer = kwargs['vmImageOffer'] + if vm_image_offer is None: + raise TypeError("Missing 'vm_image_offer' argument") + if vm_image_publisher is None and 'vmImagePublisher' in kwargs: + vm_image_publisher = kwargs['vmImagePublisher'] + if vm_image_publisher is None: + raise TypeError("Missing 'vm_image_publisher' argument") + if vm_image_sku is None and 'vmImageSku' in kwargs: + vm_image_sku = kwargs['vmImageSku'] + if vm_image_sku is None: + raise TypeError("Missing 'vm_image_sku' argument") + if vm_image_version is None and 'vmImageVersion' in kwargs: + vm_image_version = kwargs['vmImageVersion'] + if vm_image_version is None: + raise TypeError("Missing 'vm_image_version' argument") + if vm_instance_count is None and 'vmInstanceCount' in kwargs: + vm_instance_count = kwargs['vmInstanceCount'] + if vm_instance_count is None: + raise TypeError("Missing 'vm_instance_count' argument") + if vm_size is None and 'vmSize' in kwargs: + vm_size = kwargs['vmSize'] + if vm_size is None: + raise TypeError("Missing 'vm_size' argument") + if data_disk_type is None and 'dataDiskType' in kwargs: + data_disk_type = kwargs['dataDiskType'] + if multiple_placement_groups_enabled is None and 'multiplePlacementGroupsEnabled' in kwargs: + multiple_placement_groups_enabled = kwargs['multiplePlacementGroupsEnabled'] + if placement_properties is None and 'placementProperties' in kwargs: + placement_properties = kwargs['placementProperties'] + if vm_secrets is None and 'vmSecrets' in kwargs: + vm_secrets = kwargs['vmSecrets'] + + _setter("application_port_range", application_port_range) + _setter("data_disk_size_gb", data_disk_size_gb) + _setter("ephemeral_port_range", ephemeral_port_range) + _setter("name", name) + _setter("vm_image_offer", vm_image_offer) + _setter("vm_image_publisher", vm_image_publisher) + _setter("vm_image_sku", vm_image_sku) + _setter("vm_image_version", vm_image_version) + _setter("vm_instance_count", vm_instance_count) + _setter("vm_size", vm_size) if capacities is not None: - pulumi.set(__self__, "capacities", capacities) + _setter("capacities", capacities) if data_disk_type is not None: - pulumi.set(__self__, "data_disk_type", data_disk_type) + _setter("data_disk_type", data_disk_type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if multiple_placement_groups_enabled is not None: - pulumi.set(__self__, "multiple_placement_groups_enabled", multiple_placement_groups_enabled) + _setter("multiple_placement_groups_enabled", multiple_placement_groups_enabled) if placement_properties is not None: - pulumi.set(__self__, "placement_properties", placement_properties) + _setter("placement_properties", placement_properties) if primary is not None: - pulumi.set(__self__, "primary", primary) + _setter("primary", primary) if stateless is not None: - pulumi.set(__self__, "stateless", stateless) + _setter("stateless", stateless) if vm_secrets is not None: - pulumi.set(__self__, "vm_secrets", vm_secrets) + _setter("vm_secrets", vm_secrets) @property @pulumi.getter(name="applicationPortRange") @@ -1776,8 +2429,27 @@ def __init__(__self__, *, :param Sequence['ManagedClusterNodeTypeVmSecretCertificateArgs'] certificates: One or more `certificates` blocks as defined above. :param str vault_id: The ID of the Vault that contain the certificates. """ - pulumi.set(__self__, "certificates", certificates) - pulumi.set(__self__, "vault_id", vault_id) + ManagedClusterNodeTypeVmSecret._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificates=certificates, + vault_id=vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificates: Optional[Sequence['outputs.ManagedClusterNodeTypeVmSecretCertificate']] = None, + vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificates is None: + raise TypeError("Missing 'certificates' argument") + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if vault_id is None: + raise TypeError("Missing 'vault_id' argument") + + _setter("certificates", certificates) + _setter("vault_id", vault_id) @property @pulumi.getter @@ -1805,8 +2477,25 @@ def __init__(__self__, *, :param str store: The certificate store on the Virtual Machine to which the certificate should be added. :param str url: The URL of a certificate that has been uploaded to Key Vault as a secret """ - pulumi.set(__self__, "store", store) - pulumi.set(__self__, "url", url) + ManagedClusterNodeTypeVmSecretCertificate._configure( + lambda key, value: pulumi.set(__self__, key, value), + store=store, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + store: Optional[str] = None, + url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if store is None: + raise TypeError("Missing 'store' argument") + if url is None: + raise TypeError("Missing 'url' argument") + + _setter("store", store) + _setter("url", url) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/signalr/_inputs.py b/sdk/python/pulumi_azure/signalr/_inputs.py index 356f2aecaf..f2ba238bab 100644 --- a/sdk/python/pulumi_azure/signalr/_inputs.py +++ b/sdk/python/pulumi_azure/signalr/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -26,7 +26,22 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_origins: A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls. """ - pulumi.set(__self__, "allowed_origins", allowed_origins) + ServiceCorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + + _setter("allowed_origins", allowed_origins) @property @pulumi.getter(name="allowedOrigins") @@ -54,13 +69,38 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `UserAssigned` """ - pulumi.set(__self__, "type", type) + ServiceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -120,14 +160,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] http_request_logs_enabled: Whether the log category `HttpRequestLogs` is enabled? Defaults to `true` :param pulumi.Input[bool] messaging_logs_enabled: Whether the log category `MessagingLogs` is enabled? Defaults to `true` """ + ServiceLiveTraceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connectivity_logs_enabled=connectivity_logs_enabled, + enabled=enabled, + http_request_logs_enabled=http_request_logs_enabled, + messaging_logs_enabled=messaging_logs_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connectivity_logs_enabled: Optional[pulumi.Input[bool]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + http_request_logs_enabled: Optional[pulumi.Input[bool]] = None, + messaging_logs_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connectivity_logs_enabled is None and 'connectivityLogsEnabled' in kwargs: + connectivity_logs_enabled = kwargs['connectivityLogsEnabled'] + if http_request_logs_enabled is None and 'httpRequestLogsEnabled' in kwargs: + http_request_logs_enabled = kwargs['httpRequestLogsEnabled'] + if messaging_logs_enabled is None and 'messagingLogsEnabled' in kwargs: + messaging_logs_enabled = kwargs['messagingLogsEnabled'] + if connectivity_logs_enabled is not None: - pulumi.set(__self__, "connectivity_logs_enabled", connectivity_logs_enabled) + _setter("connectivity_logs_enabled", connectivity_logs_enabled) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if http_request_logs_enabled is not None: - pulumi.set(__self__, "http_request_logs_enabled", http_request_logs_enabled) + _setter("http_request_logs_enabled", http_request_logs_enabled) if messaging_logs_enabled is not None: - pulumi.set(__self__, "messaging_logs_enabled", messaging_logs_enabled) + _setter("messaging_logs_enabled", messaging_logs_enabled) @property @pulumi.getter(name="connectivityLogsEnabled") @@ -195,11 +258,32 @@ def __init__(__self__, *, > **Note:** `allowed_request_types` - (Optional) and `denied_request_types` cannot be set together. """ - pulumi.set(__self__, "id", id) + ServiceNetworkAclPrivateEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + allowed_request_types=allowed_request_types, + denied_request_types=denied_request_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + allowed_request_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + denied_request_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if allowed_request_types is None and 'allowedRequestTypes' in kwargs: + allowed_request_types = kwargs['allowedRequestTypes'] + if denied_request_types is None and 'deniedRequestTypes' in kwargs: + denied_request_types = kwargs['deniedRequestTypes'] + + _setter("id", id) if allowed_request_types is not None: - pulumi.set(__self__, "allowed_request_types", allowed_request_types) + _setter("allowed_request_types", allowed_request_types) if denied_request_types is not None: - pulumi.set(__self__, "denied_request_types", denied_request_types) + _setter("denied_request_types", denied_request_types) @property @pulumi.getter @@ -259,10 +343,27 @@ def __init__(__self__, *, > **Note:** `allowed_request_types` - (Optional) and `denied_request_types` cannot be set together. """ + ServiceNetworkAclPublicNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_request_types=allowed_request_types, + denied_request_types=denied_request_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_request_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + denied_request_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_request_types is None and 'allowedRequestTypes' in kwargs: + allowed_request_types = kwargs['allowedRequestTypes'] + if denied_request_types is None and 'deniedRequestTypes' in kwargs: + denied_request_types = kwargs['deniedRequestTypes'] + if allowed_request_types is not None: - pulumi.set(__self__, "allowed_request_types", allowed_request_types) + _setter("allowed_request_types", allowed_request_types) if denied_request_types is not None: - pulumi.set(__self__, "denied_request_types", denied_request_types) + _setter("denied_request_types", denied_request_types) @property @pulumi.getter(name="allowedRequestTypes") @@ -304,8 +405,25 @@ def __init__(__self__, *, :param pulumi.Input[int] capacity: Specifies the number of units associated with this SignalR service. Valid values are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `90` and `100`. :param pulumi.Input[str] name: Specifies which tier to use. Valid values are `Free_F1`, `Standard_S1` and `Premium_P1`. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + ServiceSkuArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("capacity", capacity) + _setter("name", name) @property @pulumi.getter @@ -347,12 +465,49 @@ def __init__(__self__, *, :param pulumi.Input[str] url_template: The upstream URL Template. This can be a url or a template such as `http://host.com/{hub}/api/{category}/{event}`. :param pulumi.Input[str] user_assigned_identity_id: Specifies the Managed Identity IDs to be assigned to this signalR upstream setting by using resource uuid as both system assigned and user assigned identity is supported. """ - pulumi.set(__self__, "category_patterns", category_patterns) - pulumi.set(__self__, "event_patterns", event_patterns) - pulumi.set(__self__, "hub_patterns", hub_patterns) - pulumi.set(__self__, "url_template", url_template) + ServiceUpstreamEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + category_patterns=category_patterns, + event_patterns=event_patterns, + hub_patterns=hub_patterns, + url_template=url_template, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category_patterns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + event_patterns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + hub_patterns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + url_template: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category_patterns is None and 'categoryPatterns' in kwargs: + category_patterns = kwargs['categoryPatterns'] + if category_patterns is None: + raise TypeError("Missing 'category_patterns' argument") + if event_patterns is None and 'eventPatterns' in kwargs: + event_patterns = kwargs['eventPatterns'] + if event_patterns is None: + raise TypeError("Missing 'event_patterns' argument") + if hub_patterns is None and 'hubPatterns' in kwargs: + hub_patterns = kwargs['hubPatterns'] + if hub_patterns is None: + raise TypeError("Missing 'hub_patterns' argument") + if url_template is None and 'urlTemplate' in kwargs: + url_template = kwargs['urlTemplate'] + if url_template is None: + raise TypeError("Missing 'url_template' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + + _setter("category_patterns", category_patterns) + _setter("event_patterns", event_patterns) + _setter("hub_patterns", hub_patterns) + _setter("url_template", url_template) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="categoryPatterns") diff --git a/sdk/python/pulumi_azure/signalr/get_service.py b/sdk/python/pulumi_azure/signalr/get_service.py index 7b880d00c1..68025575ff 100644 --- a/sdk/python/pulumi_azure/signalr/get_service.py +++ b/sdk/python/pulumi_azure/signalr/get_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/signalr/outputs.py b/sdk/python/pulumi_azure/signalr/outputs.py index 59a7924d49..3b7365b87a 100644 --- a/sdk/python/pulumi_azure/signalr/outputs.py +++ b/sdk/python/pulumi_azure/signalr/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -43,7 +43,22 @@ def __init__(__self__, *, """ :param Sequence[str] allowed_origins: A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls. """ - pulumi.set(__self__, "allowed_origins", allowed_origins) + ServiceCor._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_origins=allowed_origins, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_origins: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + + _setter("allowed_origins", allowed_origins) @property @pulumi.getter(name="allowedOrigins") @@ -88,13 +103,38 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `UserAssigned` """ - pulumi.set(__self__, "type", type) + ServiceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -159,14 +199,37 @@ def __init__(__self__, *, :param bool http_request_logs_enabled: Whether the log category `HttpRequestLogs` is enabled? Defaults to `true` :param bool messaging_logs_enabled: Whether the log category `MessagingLogs` is enabled? Defaults to `true` """ + ServiceLiveTrace._configure( + lambda key, value: pulumi.set(__self__, key, value), + connectivity_logs_enabled=connectivity_logs_enabled, + enabled=enabled, + http_request_logs_enabled=http_request_logs_enabled, + messaging_logs_enabled=messaging_logs_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connectivity_logs_enabled: Optional[bool] = None, + enabled: Optional[bool] = None, + http_request_logs_enabled: Optional[bool] = None, + messaging_logs_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connectivity_logs_enabled is None and 'connectivityLogsEnabled' in kwargs: + connectivity_logs_enabled = kwargs['connectivityLogsEnabled'] + if http_request_logs_enabled is None and 'httpRequestLogsEnabled' in kwargs: + http_request_logs_enabled = kwargs['httpRequestLogsEnabled'] + if messaging_logs_enabled is None and 'messagingLogsEnabled' in kwargs: + messaging_logs_enabled = kwargs['messagingLogsEnabled'] + if connectivity_logs_enabled is not None: - pulumi.set(__self__, "connectivity_logs_enabled", connectivity_logs_enabled) + _setter("connectivity_logs_enabled", connectivity_logs_enabled) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if http_request_logs_enabled is not None: - pulumi.set(__self__, "http_request_logs_enabled", http_request_logs_enabled) + _setter("http_request_logs_enabled", http_request_logs_enabled) if messaging_logs_enabled is not None: - pulumi.set(__self__, "messaging_logs_enabled", messaging_logs_enabled) + _setter("messaging_logs_enabled", messaging_logs_enabled) @property @pulumi.getter(name="connectivityLogsEnabled") @@ -237,11 +300,32 @@ def __init__(__self__, *, > **Note:** `allowed_request_types` - (Optional) and `denied_request_types` cannot be set together. """ - pulumi.set(__self__, "id", id) + ServiceNetworkAclPrivateEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + allowed_request_types=allowed_request_types, + denied_request_types=denied_request_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + allowed_request_types: Optional[Sequence[str]] = None, + denied_request_types: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if allowed_request_types is None and 'allowedRequestTypes' in kwargs: + allowed_request_types = kwargs['allowedRequestTypes'] + if denied_request_types is None and 'deniedRequestTypes' in kwargs: + denied_request_types = kwargs['deniedRequestTypes'] + + _setter("id", id) if allowed_request_types is not None: - pulumi.set(__self__, "allowed_request_types", allowed_request_types) + _setter("allowed_request_types", allowed_request_types) if denied_request_types is not None: - pulumi.set(__self__, "denied_request_types", denied_request_types) + _setter("denied_request_types", denied_request_types) @property @pulumi.getter @@ -308,10 +392,27 @@ def __init__(__self__, *, > **Note:** `allowed_request_types` - (Optional) and `denied_request_types` cannot be set together. """ + ServiceNetworkAclPublicNetwork._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_request_types=allowed_request_types, + denied_request_types=denied_request_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_request_types: Optional[Sequence[str]] = None, + denied_request_types: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_request_types is None and 'allowedRequestTypes' in kwargs: + allowed_request_types = kwargs['allowedRequestTypes'] + if denied_request_types is None and 'deniedRequestTypes' in kwargs: + denied_request_types = kwargs['deniedRequestTypes'] + if allowed_request_types is not None: - pulumi.set(__self__, "allowed_request_types", allowed_request_types) + _setter("allowed_request_types", allowed_request_types) if denied_request_types is not None: - pulumi.set(__self__, "denied_request_types", denied_request_types) + _setter("denied_request_types", denied_request_types) @property @pulumi.getter(name="allowedRequestTypes") @@ -345,8 +446,25 @@ def __init__(__self__, *, :param int capacity: Specifies the number of units associated with this SignalR service. Valid values are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `90` and `100`. :param str name: Specifies which tier to use. Valid values are `Free_F1`, `Standard_S1` and `Premium_P1`. """ - pulumi.set(__self__, "capacity", capacity) - pulumi.set(__self__, "name", name) + ServiceSku._configure( + lambda key, value: pulumi.set(__self__, key, value), + capacity=capacity, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + capacity: Optional[int] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if capacity is None: + raise TypeError("Missing 'capacity' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("capacity", capacity) + _setter("name", name) @property @pulumi.getter @@ -405,12 +523,49 @@ def __init__(__self__, *, :param str url_template: The upstream URL Template. This can be a url or a template such as `http://host.com/{hub}/api/{category}/{event}`. :param str user_assigned_identity_id: Specifies the Managed Identity IDs to be assigned to this signalR upstream setting by using resource uuid as both system assigned and user assigned identity is supported. """ - pulumi.set(__self__, "category_patterns", category_patterns) - pulumi.set(__self__, "event_patterns", event_patterns) - pulumi.set(__self__, "hub_patterns", hub_patterns) - pulumi.set(__self__, "url_template", url_template) + ServiceUpstreamEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + category_patterns=category_patterns, + event_patterns=event_patterns, + hub_patterns=hub_patterns, + url_template=url_template, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category_patterns: Optional[Sequence[str]] = None, + event_patterns: Optional[Sequence[str]] = None, + hub_patterns: Optional[Sequence[str]] = None, + url_template: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category_patterns is None and 'categoryPatterns' in kwargs: + category_patterns = kwargs['categoryPatterns'] + if category_patterns is None: + raise TypeError("Missing 'category_patterns' argument") + if event_patterns is None and 'eventPatterns' in kwargs: + event_patterns = kwargs['eventPatterns'] + if event_patterns is None: + raise TypeError("Missing 'event_patterns' argument") + if hub_patterns is None and 'hubPatterns' in kwargs: + hub_patterns = kwargs['hubPatterns'] + if hub_patterns is None: + raise TypeError("Missing 'hub_patterns' argument") + if url_template is None and 'urlTemplate' in kwargs: + url_template = kwargs['urlTemplate'] + if url_template is None: + raise TypeError("Missing 'url_template' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + + _setter("category_patterns", category_patterns) + _setter("event_patterns", event_patterns) + _setter("hub_patterns", hub_patterns) + _setter("url_template", url_template) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="categoryPatterns") diff --git a/sdk/python/pulumi_azure/signalr/service.py b/sdk/python/pulumi_azure/signalr/service.py index faa86131f6..3d954c0d65 100644 --- a/sdk/python/pulumi_azure/signalr/service.py +++ b/sdk/python/pulumi_azure/signalr/service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -61,45 +61,122 @@ def __init__(__self__, *, > **Note:** `tls_client_cert_enabled` cannot be set to `true` in `Free` sku tier. :param pulumi.Input[Sequence[pulumi.Input['ServiceUpstreamEndpointArgs']]] upstream_endpoints: An `upstream_endpoint` block as documented below. Using this block requires the SignalR service to be Serverless. When creating multiple blocks they will be processed in the order they are defined in. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + ServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + aad_auth_enabled=aad_auth_enabled, + connectivity_logs_enabled=connectivity_logs_enabled, + cors=cors, + http_request_logs_enabled=http_request_logs_enabled, + identity=identity, + live_trace=live_trace, + live_trace_enabled=live_trace_enabled, + local_auth_enabled=local_auth_enabled, + location=location, + messaging_logs_enabled=messaging_logs_enabled, + name=name, + public_network_access_enabled=public_network_access_enabled, + serverless_connection_timeout_in_seconds=serverless_connection_timeout_in_seconds, + service_mode=service_mode, + tags=tags, + tls_client_cert_enabled=tls_client_cert_enabled, + upstream_endpoints=upstream_endpoints, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['ServiceSkuArgs']] = None, + aad_auth_enabled: Optional[pulumi.Input[bool]] = None, + connectivity_logs_enabled: Optional[pulumi.Input[bool]] = None, + cors: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceCorArgs']]]] = None, + http_request_logs_enabled: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['ServiceIdentityArgs']] = None, + live_trace: Optional[pulumi.Input['ServiceLiveTraceArgs']] = None, + live_trace_enabled: Optional[pulumi.Input[bool]] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + messaging_logs_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + serverless_connection_timeout_in_seconds: Optional[pulumi.Input[int]] = None, + service_mode: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tls_client_cert_enabled: Optional[pulumi.Input[bool]] = None, + upstream_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceUpstreamEndpointArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if aad_auth_enabled is None and 'aadAuthEnabled' in kwargs: + aad_auth_enabled = kwargs['aadAuthEnabled'] + if connectivity_logs_enabled is None and 'connectivityLogsEnabled' in kwargs: + connectivity_logs_enabled = kwargs['connectivityLogsEnabled'] + if http_request_logs_enabled is None and 'httpRequestLogsEnabled' in kwargs: + http_request_logs_enabled = kwargs['httpRequestLogsEnabled'] + if live_trace is None and 'liveTrace' in kwargs: + live_trace = kwargs['liveTrace'] + if live_trace_enabled is None and 'liveTraceEnabled' in kwargs: + live_trace_enabled = kwargs['liveTraceEnabled'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if messaging_logs_enabled is None and 'messagingLogsEnabled' in kwargs: + messaging_logs_enabled = kwargs['messagingLogsEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if serverless_connection_timeout_in_seconds is None and 'serverlessConnectionTimeoutInSeconds' in kwargs: + serverless_connection_timeout_in_seconds = kwargs['serverlessConnectionTimeoutInSeconds'] + if service_mode is None and 'serviceMode' in kwargs: + service_mode = kwargs['serviceMode'] + if tls_client_cert_enabled is None and 'tlsClientCertEnabled' in kwargs: + tls_client_cert_enabled = kwargs['tlsClientCertEnabled'] + if upstream_endpoints is None and 'upstreamEndpoints' in kwargs: + upstream_endpoints = kwargs['upstreamEndpoints'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if aad_auth_enabled is not None: - pulumi.set(__self__, "aad_auth_enabled", aad_auth_enabled) + _setter("aad_auth_enabled", aad_auth_enabled) if connectivity_logs_enabled is not None: - pulumi.set(__self__, "connectivity_logs_enabled", connectivity_logs_enabled) + _setter("connectivity_logs_enabled", connectivity_logs_enabled) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if http_request_logs_enabled is not None: - pulumi.set(__self__, "http_request_logs_enabled", http_request_logs_enabled) + _setter("http_request_logs_enabled", http_request_logs_enabled) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if live_trace is not None: - pulumi.set(__self__, "live_trace", live_trace) + _setter("live_trace", live_trace) if live_trace_enabled is not None: warnings.warn("""`live_trace_enabled` has been deprecated in favor of `live_trace` and will be removed in 4.0.""", DeprecationWarning) pulumi.log.warn("""live_trace_enabled is deprecated: `live_trace_enabled` has been deprecated in favor of `live_trace` and will be removed in 4.0.""") if live_trace_enabled is not None: - pulumi.set(__self__, "live_trace_enabled", live_trace_enabled) + _setter("live_trace_enabled", live_trace_enabled) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if messaging_logs_enabled is not None: - pulumi.set(__self__, "messaging_logs_enabled", messaging_logs_enabled) + _setter("messaging_logs_enabled", messaging_logs_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if serverless_connection_timeout_in_seconds is not None: - pulumi.set(__self__, "serverless_connection_timeout_in_seconds", serverless_connection_timeout_in_seconds) + _setter("serverless_connection_timeout_in_seconds", serverless_connection_timeout_in_seconds) if service_mode is not None: - pulumi.set(__self__, "service_mode", service_mode) + _setter("service_mode", service_mode) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tls_client_cert_enabled is not None: - pulumi.set(__self__, "tls_client_cert_enabled", tls_client_cert_enabled) + _setter("tls_client_cert_enabled", tls_client_cert_enabled) if upstream_endpoints is not None: - pulumi.set(__self__, "upstream_endpoints", upstream_endpoints) + _setter("upstream_endpoints", upstream_endpoints) @property @pulumi.getter(name="resourceGroupName") @@ -401,63 +478,166 @@ def __init__(__self__, *, > **Note:** `tls_client_cert_enabled` cannot be set to `true` in `Free` sku tier. :param pulumi.Input[Sequence[pulumi.Input['ServiceUpstreamEndpointArgs']]] upstream_endpoints: An `upstream_endpoint` block as documented below. Using this block requires the SignalR service to be Serverless. When creating multiple blocks they will be processed in the order they are defined in. """ + _ServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + aad_auth_enabled=aad_auth_enabled, + connectivity_logs_enabled=connectivity_logs_enabled, + cors=cors, + hostname=hostname, + http_request_logs_enabled=http_request_logs_enabled, + identity=identity, + ip_address=ip_address, + live_trace=live_trace, + live_trace_enabled=live_trace_enabled, + local_auth_enabled=local_auth_enabled, + location=location, + messaging_logs_enabled=messaging_logs_enabled, + name=name, + primary_access_key=primary_access_key, + primary_connection_string=primary_connection_string, + public_network_access_enabled=public_network_access_enabled, + public_port=public_port, + resource_group_name=resource_group_name, + secondary_access_key=secondary_access_key, + secondary_connection_string=secondary_connection_string, + server_port=server_port, + serverless_connection_timeout_in_seconds=serverless_connection_timeout_in_seconds, + service_mode=service_mode, + sku=sku, + tags=tags, + tls_client_cert_enabled=tls_client_cert_enabled, + upstream_endpoints=upstream_endpoints, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aad_auth_enabled: Optional[pulumi.Input[bool]] = None, + connectivity_logs_enabled: Optional[pulumi.Input[bool]] = None, + cors: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceCorArgs']]]] = None, + hostname: Optional[pulumi.Input[str]] = None, + http_request_logs_enabled: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['ServiceIdentityArgs']] = None, + ip_address: Optional[pulumi.Input[str]] = None, + live_trace: Optional[pulumi.Input['ServiceLiveTraceArgs']] = None, + live_trace_enabled: Optional[pulumi.Input[bool]] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + messaging_logs_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_access_key: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + public_port: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_access_key: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + server_port: Optional[pulumi.Input[int]] = None, + serverless_connection_timeout_in_seconds: Optional[pulumi.Input[int]] = None, + service_mode: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input['ServiceSkuArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tls_client_cert_enabled: Optional[pulumi.Input[bool]] = None, + upstream_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceUpstreamEndpointArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aad_auth_enabled is None and 'aadAuthEnabled' in kwargs: + aad_auth_enabled = kwargs['aadAuthEnabled'] + if connectivity_logs_enabled is None and 'connectivityLogsEnabled' in kwargs: + connectivity_logs_enabled = kwargs['connectivityLogsEnabled'] + if http_request_logs_enabled is None and 'httpRequestLogsEnabled' in kwargs: + http_request_logs_enabled = kwargs['httpRequestLogsEnabled'] + if ip_address is None and 'ipAddress' in kwargs: + ip_address = kwargs['ipAddress'] + if live_trace is None and 'liveTrace' in kwargs: + live_trace = kwargs['liveTrace'] + if live_trace_enabled is None and 'liveTraceEnabled' in kwargs: + live_trace_enabled = kwargs['liveTraceEnabled'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if messaging_logs_enabled is None and 'messagingLogsEnabled' in kwargs: + messaging_logs_enabled = kwargs['messagingLogsEnabled'] + if primary_access_key is None and 'primaryAccessKey' in kwargs: + primary_access_key = kwargs['primaryAccessKey'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if public_port is None and 'publicPort' in kwargs: + public_port = kwargs['publicPort'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_access_key is None and 'secondaryAccessKey' in kwargs: + secondary_access_key = kwargs['secondaryAccessKey'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if server_port is None and 'serverPort' in kwargs: + server_port = kwargs['serverPort'] + if serverless_connection_timeout_in_seconds is None and 'serverlessConnectionTimeoutInSeconds' in kwargs: + serverless_connection_timeout_in_seconds = kwargs['serverlessConnectionTimeoutInSeconds'] + if service_mode is None and 'serviceMode' in kwargs: + service_mode = kwargs['serviceMode'] + if tls_client_cert_enabled is None and 'tlsClientCertEnabled' in kwargs: + tls_client_cert_enabled = kwargs['tlsClientCertEnabled'] + if upstream_endpoints is None and 'upstreamEndpoints' in kwargs: + upstream_endpoints = kwargs['upstreamEndpoints'] + if aad_auth_enabled is not None: - pulumi.set(__self__, "aad_auth_enabled", aad_auth_enabled) + _setter("aad_auth_enabled", aad_auth_enabled) if connectivity_logs_enabled is not None: - pulumi.set(__self__, "connectivity_logs_enabled", connectivity_logs_enabled) + _setter("connectivity_logs_enabled", connectivity_logs_enabled) if cors is not None: - pulumi.set(__self__, "cors", cors) + _setter("cors", cors) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if http_request_logs_enabled is not None: - pulumi.set(__self__, "http_request_logs_enabled", http_request_logs_enabled) + _setter("http_request_logs_enabled", http_request_logs_enabled) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if ip_address is not None: - pulumi.set(__self__, "ip_address", ip_address) + _setter("ip_address", ip_address) if live_trace is not None: - pulumi.set(__self__, "live_trace", live_trace) + _setter("live_trace", live_trace) if live_trace_enabled is not None: warnings.warn("""`live_trace_enabled` has been deprecated in favor of `live_trace` and will be removed in 4.0.""", DeprecationWarning) pulumi.log.warn("""live_trace_enabled is deprecated: `live_trace_enabled` has been deprecated in favor of `live_trace` and will be removed in 4.0.""") if live_trace_enabled is not None: - pulumi.set(__self__, "live_trace_enabled", live_trace_enabled) + _setter("live_trace_enabled", live_trace_enabled) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if messaging_logs_enabled is not None: - pulumi.set(__self__, "messaging_logs_enabled", messaging_logs_enabled) + _setter("messaging_logs_enabled", messaging_logs_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_access_key is not None: - pulumi.set(__self__, "primary_access_key", primary_access_key) + _setter("primary_access_key", primary_access_key) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if public_port is not None: - pulumi.set(__self__, "public_port", public_port) + _setter("public_port", public_port) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_access_key is not None: - pulumi.set(__self__, "secondary_access_key", secondary_access_key) + _setter("secondary_access_key", secondary_access_key) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if server_port is not None: - pulumi.set(__self__, "server_port", server_port) + _setter("server_port", server_port) if serverless_connection_timeout_in_seconds is not None: - pulumi.set(__self__, "serverless_connection_timeout_in_seconds", serverless_connection_timeout_in_seconds) + _setter("serverless_connection_timeout_in_seconds", serverless_connection_timeout_in_seconds) if service_mode is not None: - pulumi.set(__self__, "service_mode", service_mode) + _setter("service_mode", service_mode) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tls_client_cert_enabled is not None: - pulumi.set(__self__, "tls_client_cert_enabled", tls_client_cert_enabled) + _setter("tls_client_cert_enabled", tls_client_cert_enabled) if upstream_endpoints is not None: - pulumi.set(__self__, "upstream_endpoints", upstream_endpoints) + _setter("upstream_endpoints", upstream_endpoints) @property @pulumi.getter(name="aadAuthEnabled") @@ -944,6 +1124,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -981,7 +1165,17 @@ def _internal_init(__self__, __props__.__dict__["connectivity_logs_enabled"] = connectivity_logs_enabled __props__.__dict__["cors"] = cors __props__.__dict__["http_request_logs_enabled"] = http_request_logs_enabled + if identity is not None and not isinstance(identity, ServiceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ServiceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity + if live_trace is not None and not isinstance(live_trace, ServiceLiveTraceArgs): + live_trace = live_trace or {} + def _setter(key, value): + live_trace[key] = value + ServiceLiveTraceArgs._configure(_setter, **live_trace) __props__.__dict__["live_trace"] = live_trace __props__.__dict__["live_trace_enabled"] = live_trace_enabled __props__.__dict__["local_auth_enabled"] = local_auth_enabled @@ -994,6 +1188,11 @@ def _internal_init(__self__, __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["serverless_connection_timeout_in_seconds"] = serverless_connection_timeout_in_seconds __props__.__dict__["service_mode"] = service_mode + if sku is not None and not isinstance(sku, ServiceSkuArgs): + sku = sku or {} + def _setter(key, value): + sku[key] = value + ServiceSkuArgs._configure(_setter, **sku) if sku is None and not opts.urn: raise TypeError("Missing required property 'sku'") __props__.__dict__["sku"] = sku diff --git a/sdk/python/pulumi_azure/signalr/service_custom_certificate.py b/sdk/python/pulumi_azure/signalr/service_custom_certificate.py index 6e3ae24a1b..19fc0fc0ba 100644 --- a/sdk/python/pulumi_azure/signalr/service_custom_certificate.py +++ b/sdk/python/pulumi_azure/signalr/service_custom_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServiceCustomCertificateArgs', 'ServiceCustomCertificate'] @@ -27,10 +27,33 @@ def __init__(__self__, *, > **Note:** Custom Certificate is only available for SignalR Premium tier. Please enable managed identity in the corresponding SignalR Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret. :param pulumi.Input[str] name: The name of the SignalR Custom Certificate. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "custom_certificate_id", custom_certificate_id) - pulumi.set(__self__, "signalr_service_id", signalr_service_id) + ServiceCustomCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_certificate_id=custom_certificate_id, + signalr_service_id=signalr_service_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_certificate_id: Optional[pulumi.Input[str]] = None, + signalr_service_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_certificate_id is None and 'customCertificateId' in kwargs: + custom_certificate_id = kwargs['customCertificateId'] + if custom_certificate_id is None: + raise TypeError("Missing 'custom_certificate_id' argument") + if signalr_service_id is None and 'signalrServiceId' in kwargs: + signalr_service_id = kwargs['signalrServiceId'] + if signalr_service_id is None: + raise TypeError("Missing 'signalr_service_id' argument") + + _setter("custom_certificate_id", custom_certificate_id) + _setter("signalr_service_id", signalr_service_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="customCertificateId") @@ -91,14 +114,37 @@ def __init__(__self__, *, > **Note:** Custom Certificate is only available for SignalR Premium tier. Please enable managed identity in the corresponding SignalR Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret. """ + _ServiceCustomCertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_version=certificate_version, + custom_certificate_id=custom_certificate_id, + name=name, + signalr_service_id=signalr_service_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_version: Optional[pulumi.Input[str]] = None, + custom_certificate_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + signalr_service_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_version is None and 'certificateVersion' in kwargs: + certificate_version = kwargs['certificateVersion'] + if custom_certificate_id is None and 'customCertificateId' in kwargs: + custom_certificate_id = kwargs['customCertificateId'] + if signalr_service_id is None and 'signalrServiceId' in kwargs: + signalr_service_id = kwargs['signalrServiceId'] + if certificate_version is not None: - pulumi.set(__self__, "certificate_version", certificate_version) + _setter("certificate_version", certificate_version) if custom_certificate_id is not None: - pulumi.set(__self__, "custom_certificate_id", custom_certificate_id) + _setter("custom_certificate_id", custom_certificate_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if signalr_service_id is not None: - pulumi.set(__self__, "signalr_service_id", signalr_service_id) + _setter("signalr_service_id", signalr_service_id) @property @pulumi.getter(name="certificateVersion") @@ -338,6 +384,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceCustomCertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/signalr/service_custom_domain.py b/sdk/python/pulumi_azure/signalr/service_custom_domain.py index 8795db6df8..0cd2aa308f 100644 --- a/sdk/python/pulumi_azure/signalr/service_custom_domain.py +++ b/sdk/python/pulumi_azure/signalr/service_custom_domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServiceCustomDomainArgs', 'ServiceCustomDomain'] @@ -27,11 +27,40 @@ def __init__(__self__, *, :param pulumi.Input[str] signalr_service_id: Specifies the SignalR ID of the SignalR Custom Domain. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the SignalR Custom Domain. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "signalr_custom_certificate_id", signalr_custom_certificate_id) - pulumi.set(__self__, "signalr_service_id", signalr_service_id) + ServiceCustomDomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name=domain_name, + signalr_custom_certificate_id=signalr_custom_certificate_id, + signalr_service_id=signalr_service_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name: Optional[pulumi.Input[str]] = None, + signalr_custom_certificate_id: Optional[pulumi.Input[str]] = None, + signalr_service_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if signalr_custom_certificate_id is None and 'signalrCustomCertificateId' in kwargs: + signalr_custom_certificate_id = kwargs['signalrCustomCertificateId'] + if signalr_custom_certificate_id is None: + raise TypeError("Missing 'signalr_custom_certificate_id' argument") + if signalr_service_id is None and 'signalrServiceId' in kwargs: + signalr_service_id = kwargs['signalrServiceId'] + if signalr_service_id is None: + raise TypeError("Missing 'signalr_service_id' argument") + + _setter("domain_name", domain_name) + _setter("signalr_custom_certificate_id", signalr_custom_certificate_id) + _setter("signalr_service_id", signalr_service_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="domainName") @@ -100,14 +129,37 @@ def __init__(__self__, *, :param pulumi.Input[str] signalr_custom_certificate_id: Specifies the SignalR Custom Certificate ID of the SignalR Custom Domain. Changing this forces a new resource to be created. :param pulumi.Input[str] signalr_service_id: Specifies the SignalR ID of the SignalR Custom Domain. Changing this forces a new resource to be created. """ + _ServiceCustomDomainState._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name=domain_name, + name=name, + signalr_custom_certificate_id=signalr_custom_certificate_id, + signalr_service_id=signalr_service_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + signalr_custom_certificate_id: Optional[pulumi.Input[str]] = None, + signalr_service_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if signalr_custom_certificate_id is None and 'signalrCustomCertificateId' in kwargs: + signalr_custom_certificate_id = kwargs['signalrCustomCertificateId'] + if signalr_service_id is None and 'signalrServiceId' in kwargs: + signalr_service_id = kwargs['signalrServiceId'] + if domain_name is not None: - pulumi.set(__self__, "domain_name", domain_name) + _setter("domain_name", domain_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if signalr_custom_certificate_id is not None: - pulumi.set(__self__, "signalr_custom_certificate_id", signalr_custom_certificate_id) + _setter("signalr_custom_certificate_id", signalr_custom_certificate_id) if signalr_service_id is not None: - pulumi.set(__self__, "signalr_service_id", signalr_service_id) + _setter("signalr_service_id", signalr_service_id) @property @pulumi.getter(name="domainName") @@ -353,6 +405,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceCustomDomainArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/signalr/service_network_acl.py b/sdk/python/pulumi_azure/signalr/service_network_acl.py index 810dca6164..9bda8527b1 100644 --- a/sdk/python/pulumi_azure/signalr/service_network_acl.py +++ b/sdk/python/pulumi_azure/signalr/service_network_acl.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,11 +27,42 @@ def __init__(__self__, *, :param pulumi.Input[str] signalr_service_id: The ID of the SignalR service. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['ServiceNetworkAclPrivateEndpointArgs']]] private_endpoints: A `private_endpoint` block as defined below. """ - pulumi.set(__self__, "default_action", default_action) - pulumi.set(__self__, "public_network", public_network) - pulumi.set(__self__, "signalr_service_id", signalr_service_id) + ServiceNetworkAclArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + public_network=public_network, + signalr_service_id=signalr_service_id, + private_endpoints=private_endpoints, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + public_network: Optional[pulumi.Input['ServiceNetworkAclPublicNetworkArgs']] = None, + signalr_service_id: Optional[pulumi.Input[str]] = None, + private_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceNetworkAclPrivateEndpointArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if default_action is None: + raise TypeError("Missing 'default_action' argument") + if public_network is None and 'publicNetwork' in kwargs: + public_network = kwargs['publicNetwork'] + if public_network is None: + raise TypeError("Missing 'public_network' argument") + if signalr_service_id is None and 'signalrServiceId' in kwargs: + signalr_service_id = kwargs['signalrServiceId'] + if signalr_service_id is None: + raise TypeError("Missing 'signalr_service_id' argument") + if private_endpoints is None and 'privateEndpoints' in kwargs: + private_endpoints = kwargs['privateEndpoints'] + + _setter("default_action", default_action) + _setter("public_network", public_network) + _setter("signalr_service_id", signalr_service_id) if private_endpoints is not None: - pulumi.set(__self__, "private_endpoints", private_endpoints) + _setter("private_endpoints", private_endpoints) @property @pulumi.getter(name="defaultAction") @@ -96,14 +127,39 @@ def __init__(__self__, *, :param pulumi.Input['ServiceNetworkAclPublicNetworkArgs'] public_network: A `public_network` block as defined below. :param pulumi.Input[str] signalr_service_id: The ID of the SignalR service. Changing this forces a new resource to be created. """ + _ServiceNetworkAclState._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + private_endpoints=private_endpoints, + public_network=public_network, + signalr_service_id=signalr_service_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + private_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['ServiceNetworkAclPrivateEndpointArgs']]]] = None, + public_network: Optional[pulumi.Input['ServiceNetworkAclPublicNetworkArgs']] = None, + signalr_service_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if private_endpoints is None and 'privateEndpoints' in kwargs: + private_endpoints = kwargs['privateEndpoints'] + if public_network is None and 'publicNetwork' in kwargs: + public_network = kwargs['publicNetwork'] + if signalr_service_id is None and 'signalrServiceId' in kwargs: + signalr_service_id = kwargs['signalrServiceId'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if private_endpoints is not None: - pulumi.set(__self__, "private_endpoints", private_endpoints) + _setter("private_endpoints", private_endpoints) if public_network is not None: - pulumi.set(__self__, "public_network", public_network) + _setter("public_network", public_network) if signalr_service_id is not None: - pulumi.set(__self__, "signalr_service_id", signalr_service_id) + _setter("signalr_service_id", signalr_service_id) @property @pulumi.getter(name="defaultAction") @@ -299,6 +355,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceNetworkAclArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -321,6 +381,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'default_action'") __props__.__dict__["default_action"] = default_action __props__.__dict__["private_endpoints"] = private_endpoints + if public_network is not None and not isinstance(public_network, ServiceNetworkAclPublicNetworkArgs): + public_network = public_network or {} + def _setter(key, value): + public_network[key] = value + ServiceNetworkAclPublicNetworkArgs._configure(_setter, **public_network) if public_network is None and not opts.urn: raise TypeError("Missing required property 'public_network'") __props__.__dict__["public_network"] = public_network diff --git a/sdk/python/pulumi_azure/signalr/shared_private_link_resource.py b/sdk/python/pulumi_azure/signalr/shared_private_link_resource.py index 48ec7abef8..9b686b7398 100644 --- a/sdk/python/pulumi_azure/signalr/shared_private_link_resource.py +++ b/sdk/python/pulumi_azure/signalr/shared_private_link_resource.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SharedPrivateLinkResourceArgs', 'SharedPrivateLinkResource'] @@ -29,13 +29,46 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Signalr Shared Private Link Resource. Changing this forces a new resource to be created. :param pulumi.Input[str] request_message: The request message for requesting approval of the Shared Private Link Enabled Remote Resource. """ - pulumi.set(__self__, "signalr_service_id", signalr_service_id) - pulumi.set(__self__, "sub_resource_name", sub_resource_name) - pulumi.set(__self__, "target_resource_id", target_resource_id) + SharedPrivateLinkResourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + signalr_service_id=signalr_service_id, + sub_resource_name=sub_resource_name, + target_resource_id=target_resource_id, + name=name, + request_message=request_message, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + signalr_service_id: Optional[pulumi.Input[str]] = None, + sub_resource_name: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + request_message: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if signalr_service_id is None and 'signalrServiceId' in kwargs: + signalr_service_id = kwargs['signalrServiceId'] + if signalr_service_id is None: + raise TypeError("Missing 'signalr_service_id' argument") + if sub_resource_name is None and 'subResourceName' in kwargs: + sub_resource_name = kwargs['subResourceName'] + if sub_resource_name is None: + raise TypeError("Missing 'sub_resource_name' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + if request_message is None and 'requestMessage' in kwargs: + request_message = kwargs['requestMessage'] + + _setter("signalr_service_id", signalr_service_id) + _setter("sub_resource_name", sub_resource_name) + _setter("target_resource_id", target_resource_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if request_message is not None: - pulumi.set(__self__, "request_message", request_message) + _setter("request_message", request_message) @property @pulumi.getter(name="signalrServiceId") @@ -120,18 +153,47 @@ def __init__(__self__, *, > **NOTE:** The `sub_resource_name` should match with the type of the `target_resource_id` that's being specified. """ + _SharedPrivateLinkResourceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + request_message=request_message, + signalr_service_id=signalr_service_id, + status=status, + sub_resource_name=sub_resource_name, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + request_message: Optional[pulumi.Input[str]] = None, + signalr_service_id: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + sub_resource_name: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if request_message is None and 'requestMessage' in kwargs: + request_message = kwargs['requestMessage'] + if signalr_service_id is None and 'signalrServiceId' in kwargs: + signalr_service_id = kwargs['signalrServiceId'] + if sub_resource_name is None and 'subResourceName' in kwargs: + sub_resource_name = kwargs['subResourceName'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if request_message is not None: - pulumi.set(__self__, "request_message", request_message) + _setter("request_message", request_message) if signalr_service_id is not None: - pulumi.set(__self__, "signalr_service_id", signalr_service_id) + _setter("signalr_service_id", signalr_service_id) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if sub_resource_name is not None: - pulumi.set(__self__, "sub_resource_name", sub_resource_name) + _setter("sub_resource_name", sub_resource_name) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter @@ -335,6 +397,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SharedPrivateLinkResourceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/siterecovery/_inputs.py b/sdk/python/pulumi_azure/siterecovery/_inputs.py index 434f4b28a4..7e5a927c4f 100644 --- a/sdk/python/pulumi_azure/siterecovery/_inputs.py +++ b/sdk/python/pulumi_azure/siterecovery/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -51,12 +51,31 @@ def __init__(__self__, *, > **Note:** The setting applies to all Azure VMs protected in the same container. For more details see [this document](https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-autoupdate#enable-automatic-updates) """ + ProtectionContainerMappingAutomaticUpdateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_type=authentication_type, + automation_account_id=automation_account_id, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_type: Optional[pulumi.Input[str]] = None, + automation_account_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if automation_account_id is None and 'automationAccountId' in kwargs: + automation_account_id = kwargs['automationAccountId'] + if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if automation_account_id is not None: - pulumi.set(__self__, "automation_account_id", automation_account_id) + _setter("automation_account_id", automation_account_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="authenticationType") @@ -124,15 +143,62 @@ def __init__(__self__, *, > **NOTE:** Creating replicated vm with `target_disk_encryption_set_id` wil take more time (up to 5 hours), please extend the `timeout` for `create`. """ - pulumi.set(__self__, "disk_id", disk_id) - pulumi.set(__self__, "staging_storage_account_id", staging_storage_account_id) - pulumi.set(__self__, "target_disk_type", target_disk_type) - pulumi.set(__self__, "target_replica_disk_type", target_replica_disk_type) - pulumi.set(__self__, "target_resource_group_id", target_resource_group_id) + ReplicatedVMManagedDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_id=disk_id, + staging_storage_account_id=staging_storage_account_id, + target_disk_type=target_disk_type, + target_replica_disk_type=target_replica_disk_type, + target_resource_group_id=target_resource_group_id, + target_disk_encryption=target_disk_encryption, + target_disk_encryption_set_id=target_disk_encryption_set_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_id: Optional[pulumi.Input[str]] = None, + staging_storage_account_id: Optional[pulumi.Input[str]] = None, + target_disk_type: Optional[pulumi.Input[str]] = None, + target_replica_disk_type: Optional[pulumi.Input[str]] = None, + target_resource_group_id: Optional[pulumi.Input[str]] = None, + target_disk_encryption: Optional[pulumi.Input['ReplicatedVMManagedDiskTargetDiskEncryptionArgs']] = None, + target_disk_encryption_set_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_id is None and 'diskId' in kwargs: + disk_id = kwargs['diskId'] + if disk_id is None: + raise TypeError("Missing 'disk_id' argument") + if staging_storage_account_id is None and 'stagingStorageAccountId' in kwargs: + staging_storage_account_id = kwargs['stagingStorageAccountId'] + if staging_storage_account_id is None: + raise TypeError("Missing 'staging_storage_account_id' argument") + if target_disk_type is None and 'targetDiskType' in kwargs: + target_disk_type = kwargs['targetDiskType'] + if target_disk_type is None: + raise TypeError("Missing 'target_disk_type' argument") + if target_replica_disk_type is None and 'targetReplicaDiskType' in kwargs: + target_replica_disk_type = kwargs['targetReplicaDiskType'] + if target_replica_disk_type is None: + raise TypeError("Missing 'target_replica_disk_type' argument") + if target_resource_group_id is None and 'targetResourceGroupId' in kwargs: + target_resource_group_id = kwargs['targetResourceGroupId'] + if target_resource_group_id is None: + raise TypeError("Missing 'target_resource_group_id' argument") + if target_disk_encryption is None and 'targetDiskEncryption' in kwargs: + target_disk_encryption = kwargs['targetDiskEncryption'] + if target_disk_encryption_set_id is None and 'targetDiskEncryptionSetId' in kwargs: + target_disk_encryption_set_id = kwargs['targetDiskEncryptionSetId'] + + _setter("disk_id", disk_id) + _setter("staging_storage_account_id", staging_storage_account_id) + _setter("target_disk_type", target_disk_type) + _setter("target_replica_disk_type", target_replica_disk_type) + _setter("target_resource_group_id", target_resource_group_id) if target_disk_encryption is not None: - pulumi.set(__self__, "target_disk_encryption", target_disk_encryption) + _setter("target_disk_encryption", target_disk_encryption) if target_disk_encryption_set_id is not None: - pulumi.set(__self__, "target_disk_encryption_set_id", target_disk_encryption_set_id) + _setter("target_disk_encryption_set_id", target_disk_encryption_set_id) @property @pulumi.getter(name="diskId") @@ -230,9 +296,28 @@ def __init__(__self__, *, :param pulumi.Input['ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyArgs'] disk_encryption_key: A `disk_encryption_key` block as defined below. :param pulumi.Input['ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKeyArgs'] key_encryption_key: A `key_encryption_key` block as defined below. """ - pulumi.set(__self__, "disk_encryption_key", disk_encryption_key) + ReplicatedVMManagedDiskTargetDiskEncryptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_encryption_key=disk_encryption_key, + key_encryption_key=key_encryption_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_encryption_key: Optional[pulumi.Input['ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyArgs']] = None, + key_encryption_key: Optional[pulumi.Input['ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKeyArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_encryption_key is None and 'diskEncryptionKey' in kwargs: + disk_encryption_key = kwargs['diskEncryptionKey'] + if disk_encryption_key is None: + raise TypeError("Missing 'disk_encryption_key' argument") + if key_encryption_key is None and 'keyEncryptionKey' in kwargs: + key_encryption_key = kwargs['keyEncryptionKey'] + + _setter("disk_encryption_key", disk_encryption_key) if key_encryption_key is not None: - pulumi.set(__self__, "key_encryption_key", key_encryption_key) + _setter("key_encryption_key", key_encryption_key) @property @pulumi.getter(name="diskEncryptionKey") @@ -268,8 +353,29 @@ def __init__(__self__, *, :param pulumi.Input[str] secret_url: The URL to the Key Vault Secret used as the Disk Encryption Key that the Managed Disk will be associated with. This can be found as `id` on the `keyvault.Secret` resource. Changing this forces a new resource to be created. :param pulumi.Input[str] vault_id: The ID of the Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "vault_id", vault_id) + ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + vault_id=vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[pulumi.Input[str]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if vault_id is None: + raise TypeError("Missing 'vault_id' argument") + + _setter("secret_url", secret_url) + _setter("vault_id", vault_id) @property @pulumi.getter(name="secretUrl") @@ -305,8 +411,29 @@ def __init__(__self__, *, :param pulumi.Input[str] key_url: The URL to the Key Vault Key used as the Key Encryption Key that the Managed Disk will be associated with. This can be found as `id` on the `keyvault.Key` resource. Changing this forces a new resource to be created. :param pulumi.Input[str] vault_id: The ID of the Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "key_url", key_url) - pulumi.set(__self__, "vault_id", vault_id) + ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_url=key_url, + vault_id=vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_url: Optional[pulumi.Input[str]] = None, + vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_url is None and 'keyUrl' in kwargs: + key_url = kwargs['keyUrl'] + if key_url is None: + raise TypeError("Missing 'key_url' argument") + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if vault_id is None: + raise TypeError("Missing 'vault_id' argument") + + _setter("key_url", key_url) + _setter("vault_id", vault_id) @property @pulumi.getter(name="keyUrl") @@ -353,25 +480,66 @@ def __init__(__self__, *, :param pulumi.Input[str] target_static_ip: Static IP to assign when a failover is done. :param pulumi.Input[str] target_subnet_name: Name of the subnet to to use when a failover is done. """ + ReplicatedVMNetworkInterfaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + failover_test_public_ip_address_id=failover_test_public_ip_address_id, + failover_test_static_ip=failover_test_static_ip, + failover_test_subnet_name=failover_test_subnet_name, + is_primary=is_primary, + recovery_public_ip_address_id=recovery_public_ip_address_id, + source_network_interface_id=source_network_interface_id, + target_static_ip=target_static_ip, + target_subnet_name=target_subnet_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + failover_test_public_ip_address_id: Optional[pulumi.Input[str]] = None, + failover_test_static_ip: Optional[pulumi.Input[str]] = None, + failover_test_subnet_name: Optional[pulumi.Input[str]] = None, + is_primary: Optional[pulumi.Input[bool]] = None, + recovery_public_ip_address_id: Optional[pulumi.Input[str]] = None, + source_network_interface_id: Optional[pulumi.Input[str]] = None, + target_static_ip: Optional[pulumi.Input[str]] = None, + target_subnet_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failover_test_public_ip_address_id is None and 'failoverTestPublicIpAddressId' in kwargs: + failover_test_public_ip_address_id = kwargs['failoverTestPublicIpAddressId'] + if failover_test_static_ip is None and 'failoverTestStaticIp' in kwargs: + failover_test_static_ip = kwargs['failoverTestStaticIp'] + if failover_test_subnet_name is None and 'failoverTestSubnetName' in kwargs: + failover_test_subnet_name = kwargs['failoverTestSubnetName'] + if is_primary is None and 'isPrimary' in kwargs: + is_primary = kwargs['isPrimary'] + if recovery_public_ip_address_id is None and 'recoveryPublicIpAddressId' in kwargs: + recovery_public_ip_address_id = kwargs['recoveryPublicIpAddressId'] + if source_network_interface_id is None and 'sourceNetworkInterfaceId' in kwargs: + source_network_interface_id = kwargs['sourceNetworkInterfaceId'] + if target_static_ip is None and 'targetStaticIp' in kwargs: + target_static_ip = kwargs['targetStaticIp'] + if target_subnet_name is None and 'targetSubnetName' in kwargs: + target_subnet_name = kwargs['targetSubnetName'] + if failover_test_public_ip_address_id is not None: - pulumi.set(__self__, "failover_test_public_ip_address_id", failover_test_public_ip_address_id) + _setter("failover_test_public_ip_address_id", failover_test_public_ip_address_id) if failover_test_static_ip is not None: - pulumi.set(__self__, "failover_test_static_ip", failover_test_static_ip) + _setter("failover_test_static_ip", failover_test_static_ip) if failover_test_subnet_name is not None: - pulumi.set(__self__, "failover_test_subnet_name", failover_test_subnet_name) + _setter("failover_test_subnet_name", failover_test_subnet_name) if is_primary is not None: warnings.warn("""this property is not used and will be removed in version 4.0 of the provider""", DeprecationWarning) pulumi.log.warn("""is_primary is deprecated: this property is not used and will be removed in version 4.0 of the provider""") if is_primary is not None: - pulumi.set(__self__, "is_primary", is_primary) + _setter("is_primary", is_primary) if recovery_public_ip_address_id is not None: - pulumi.set(__self__, "recovery_public_ip_address_id", recovery_public_ip_address_id) + _setter("recovery_public_ip_address_id", recovery_public_ip_address_id) if source_network_interface_id is not None: - pulumi.set(__self__, "source_network_interface_id", source_network_interface_id) + _setter("source_network_interface_id", source_network_interface_id) if target_static_ip is not None: - pulumi.set(__self__, "target_static_ip", target_static_ip) + _setter("target_static_ip", target_static_ip) if target_subnet_name is not None: - pulumi.set(__self__, "target_subnet_name", target_subnet_name) + _setter("target_subnet_name", target_subnet_name) @property @pulumi.getter(name="failoverTestPublicIpAddressId") @@ -481,9 +649,36 @@ def __init__(__self__, *, :param pulumi.Input[str] staging_storage_account_id: Storage account that should be used for caching. :param pulumi.Input[str] target_storage_account_id: Storage account disk should belong to when a failover is done. """ - pulumi.set(__self__, "disk_uri", disk_uri) - pulumi.set(__self__, "staging_storage_account_id", staging_storage_account_id) - pulumi.set(__self__, "target_storage_account_id", target_storage_account_id) + ReplicatedVMUnmanagedDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_uri=disk_uri, + staging_storage_account_id=staging_storage_account_id, + target_storage_account_id=target_storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_uri: Optional[pulumi.Input[str]] = None, + staging_storage_account_id: Optional[pulumi.Input[str]] = None, + target_storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_uri is None and 'diskUri' in kwargs: + disk_uri = kwargs['diskUri'] + if disk_uri is None: + raise TypeError("Missing 'disk_uri' argument") + if staging_storage_account_id is None and 'stagingStorageAccountId' in kwargs: + staging_storage_account_id = kwargs['stagingStorageAccountId'] + if staging_storage_account_id is None: + raise TypeError("Missing 'staging_storage_account_id' argument") + if target_storage_account_id is None and 'targetStorageAccountId' in kwargs: + target_storage_account_id = kwargs['targetStorageAccountId'] + if target_storage_account_id is None: + raise TypeError("Missing 'target_storage_account_id' argument") + + _setter("disk_uri", disk_uri) + _setter("staging_storage_account_id", staging_storage_account_id) + _setter("target_storage_account_id", target_storage_account_id) @property @pulumi.getter(name="diskUri") @@ -539,14 +734,39 @@ def __init__(__self__, *, > **Note:** `primary_zone` and `recovery_zone` must be specified together. """ + ReplicationRecoveryPlanAzureToAzureSettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + primary_edge_zone=primary_edge_zone, + primary_zone=primary_zone, + recovery_edge_zone=recovery_edge_zone, + recovery_zone=recovery_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + primary_edge_zone: Optional[pulumi.Input[str]] = None, + primary_zone: Optional[pulumi.Input[str]] = None, + recovery_edge_zone: Optional[pulumi.Input[str]] = None, + recovery_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary_edge_zone is None and 'primaryEdgeZone' in kwargs: + primary_edge_zone = kwargs['primaryEdgeZone'] + if primary_zone is None and 'primaryZone' in kwargs: + primary_zone = kwargs['primaryZone'] + if recovery_edge_zone is None and 'recoveryEdgeZone' in kwargs: + recovery_edge_zone = kwargs['recoveryEdgeZone'] + if recovery_zone is None and 'recoveryZone' in kwargs: + recovery_zone = kwargs['recoveryZone'] + if primary_edge_zone is not None: - pulumi.set(__self__, "primary_edge_zone", primary_edge_zone) + _setter("primary_edge_zone", primary_edge_zone) if primary_zone is not None: - pulumi.set(__self__, "primary_zone", primary_zone) + _setter("primary_zone", primary_zone) if recovery_edge_zone is not None: - pulumi.set(__self__, "recovery_edge_zone", recovery_edge_zone) + _setter("recovery_edge_zone", recovery_edge_zone) if recovery_zone is not None: - pulumi.set(__self__, "recovery_zone", recovery_zone) + _setter("recovery_zone", recovery_zone) @property @pulumi.getter(name="primaryEdgeZone") @@ -612,12 +832,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanBootRecoveryGroupPreActionArgs']]] pre_actions: one or more `action` block as defined below. which will be executed before the group recovery. :param pulumi.Input[Sequence[pulumi.Input[str]]] replicated_protected_items: One or more protected VM IDs. It must not be specified when `type` is `Shutdown`. """ + ReplicationRecoveryPlanBootRecoveryGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + post_actions=post_actions, + pre_actions=pre_actions, + replicated_protected_items=replicated_protected_items, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + post_actions: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanBootRecoveryGroupPostActionArgs']]]] = None, + pre_actions: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanBootRecoveryGroupPreActionArgs']]]] = None, + replicated_protected_items: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if post_actions is None and 'postActions' in kwargs: + post_actions = kwargs['postActions'] + if pre_actions is None and 'preActions' in kwargs: + pre_actions = kwargs['preActions'] + if replicated_protected_items is None and 'replicatedProtectedItems' in kwargs: + replicated_protected_items = kwargs['replicatedProtectedItems'] + if post_actions is not None: - pulumi.set(__self__, "post_actions", post_actions) + _setter("post_actions", post_actions) if pre_actions is not None: - pulumi.set(__self__, "pre_actions", pre_actions) + _setter("pre_actions", pre_actions) if replicated_protected_items is not None: - pulumi.set(__self__, "replicated_protected_items", replicated_protected_items) + _setter("replicated_protected_items", replicated_protected_items) @property @pulumi.getter(name="postActions") @@ -685,18 +926,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanBootRecoveryGroupPostActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + fail_over_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + fabric_location: Optional[pulumi.Input[str]] = None, + manual_action_instruction: Optional[pulumi.Input[str]] = None, + runbook_id: Optional[pulumi.Input[str]] = None, + script_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -832,18 +1118,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanBootRecoveryGroupPreActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + fail_over_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + fabric_location: Optional[pulumi.Input[str]] = None, + manual_action_instruction: Optional[pulumi.Input[str]] = None, + runbook_id: Optional[pulumi.Input[str]] = None, + script_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -959,10 +1290,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanFailoverRecoveryGroupPostActionArgs']]] post_actions: one or more `action` block as defined below. which will be executed after the group recovery. :param pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanFailoverRecoveryGroupPreActionArgs']]] pre_actions: one or more `action` block as defined below. which will be executed before the group recovery. """ + ReplicationRecoveryPlanFailoverRecoveryGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + post_actions=post_actions, + pre_actions=pre_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + post_actions: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanFailoverRecoveryGroupPostActionArgs']]]] = None, + pre_actions: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanFailoverRecoveryGroupPreActionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if post_actions is None and 'postActions' in kwargs: + post_actions = kwargs['postActions'] + if pre_actions is None and 'preActions' in kwargs: + pre_actions = kwargs['preActions'] + if post_actions is not None: - pulumi.set(__self__, "post_actions", post_actions) + _setter("post_actions", post_actions) if pre_actions is not None: - pulumi.set(__self__, "pre_actions", pre_actions) + _setter("pre_actions", pre_actions) @property @pulumi.getter(name="postActions") @@ -1018,18 +1366,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanFailoverRecoveryGroupPostActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + fail_over_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + fabric_location: Optional[pulumi.Input[str]] = None, + manual_action_instruction: Optional[pulumi.Input[str]] = None, + runbook_id: Optional[pulumi.Input[str]] = None, + script_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -1165,18 +1558,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanFailoverRecoveryGroupPreActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + fail_over_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + fabric_location: Optional[pulumi.Input[str]] = None, + manual_action_instruction: Optional[pulumi.Input[str]] = None, + runbook_id: Optional[pulumi.Input[str]] = None, + script_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -1296,13 +1734,38 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanRecoveryGroupPreActionArgs']]] pre_actions: one or more `action` block as defined below. which will be executed before the group recovery. :param pulumi.Input[Sequence[pulumi.Input[str]]] replicated_protected_items: One or more protected VM IDs. It must not be specified when `type` is `Shutdown`. """ - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanRecoveryGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + post_actions=post_actions, + pre_actions=pre_actions, + replicated_protected_items=replicated_protected_items, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + post_actions: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanRecoveryGroupPostActionArgs']]]] = None, + pre_actions: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanRecoveryGroupPreActionArgs']]]] = None, + replicated_protected_items: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if post_actions is None and 'postActions' in kwargs: + post_actions = kwargs['postActions'] + if pre_actions is None and 'preActions' in kwargs: + pre_actions = kwargs['preActions'] + if replicated_protected_items is None and 'replicatedProtectedItems' in kwargs: + replicated_protected_items = kwargs['replicatedProtectedItems'] + + _setter("type", type) if post_actions is not None: - pulumi.set(__self__, "post_actions", post_actions) + _setter("post_actions", post_actions) if pre_actions is not None: - pulumi.set(__self__, "pre_actions", pre_actions) + _setter("pre_actions", pre_actions) if replicated_protected_items is not None: - pulumi.set(__self__, "replicated_protected_items", replicated_protected_items) + _setter("replicated_protected_items", replicated_protected_items) @property @pulumi.getter @@ -1382,18 +1845,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanRecoveryGroupPostActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + fail_over_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + fabric_location: Optional[pulumi.Input[str]] = None, + manual_action_instruction: Optional[pulumi.Input[str]] = None, + runbook_id: Optional[pulumi.Input[str]] = None, + script_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -1529,18 +2037,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanRecoveryGroupPreActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + fail_over_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + fabric_location: Optional[pulumi.Input[str]] = None, + manual_action_instruction: Optional[pulumi.Input[str]] = None, + runbook_id: Optional[pulumi.Input[str]] = None, + script_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -1656,10 +2209,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanShutdownRecoveryGroupPostActionArgs']]] post_actions: one or more `action` block as defined below. which will be executed after the group recovery. :param pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanShutdownRecoveryGroupPreActionArgs']]] pre_actions: one or more `action` block as defined below. which will be executed before the group recovery. """ + ReplicationRecoveryPlanShutdownRecoveryGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + post_actions=post_actions, + pre_actions=pre_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + post_actions: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanShutdownRecoveryGroupPostActionArgs']]]] = None, + pre_actions: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanShutdownRecoveryGroupPreActionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if post_actions is None and 'postActions' in kwargs: + post_actions = kwargs['postActions'] + if pre_actions is None and 'preActions' in kwargs: + pre_actions = kwargs['preActions'] + if post_actions is not None: - pulumi.set(__self__, "post_actions", post_actions) + _setter("post_actions", post_actions) if pre_actions is not None: - pulumi.set(__self__, "pre_actions", pre_actions) + _setter("pre_actions", pre_actions) @property @pulumi.getter(name="postActions") @@ -1715,18 +2285,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanShutdownRecoveryGroupPostActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + fail_over_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + fabric_location: Optional[pulumi.Input[str]] = None, + manual_action_instruction: Optional[pulumi.Input[str]] = None, + runbook_id: Optional[pulumi.Input[str]] = None, + script_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -1862,18 +2477,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanShutdownRecoveryGroupPreActionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + fail_over_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + fabric_location: Optional[pulumi.Input[str]] = None, + manual_action_instruction: Optional[pulumi.Input[str]] = None, + runbook_id: Optional[pulumi.Input[str]] = None, + script_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") diff --git a/sdk/python/pulumi_azure/siterecovery/fabric.py b/sdk/python/pulumi_azure/siterecovery/fabric.py index 7d6d58e836..2acbe4ce17 100644 --- a/sdk/python/pulumi_azure/siterecovery/fabric.py +++ b/sdk/python/pulumi_azure/siterecovery/fabric.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FabricArgs', 'Fabric'] @@ -25,12 +25,37 @@ def __init__(__self__, *, :param pulumi.Input[str] location: In what region should the fabric be located. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the network mapping. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + FabricArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if recovery_vault_name is None: + raise TypeError("Missing 'recovery_vault_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("recovery_vault_name", recovery_vault_name) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="recoveryVaultName") @@ -95,14 +120,35 @@ def __init__(__self__, *, :param pulumi.Input[str] recovery_vault_name: The name of the vault that should be updated. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. """ + _FabricState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_vault_name is not None: - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) + _setter("recovery_vault_name", recovery_vault_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter @@ -244,6 +290,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FabricArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/siterecovery/get_fabric.py b/sdk/python/pulumi_azure/siterecovery/get_fabric.py index b36f59f7bf..0af9e37c6b 100644 --- a/sdk/python/pulumi_azure/siterecovery/get_fabric.py +++ b/sdk/python/pulumi_azure/siterecovery/get_fabric.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/siterecovery/get_protection_container.py b/sdk/python/pulumi_azure/siterecovery/get_protection_container.py index a8d1001de5..03e8355e49 100644 --- a/sdk/python/pulumi_azure/siterecovery/get_protection_container.py +++ b/sdk/python/pulumi_azure/siterecovery/get_protection_container.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/siterecovery/get_replication_policy.py b/sdk/python/pulumi_azure/siterecovery/get_replication_policy.py index 41e5aa2df0..c4590f4000 100644 --- a/sdk/python/pulumi_azure/siterecovery/get_replication_policy.py +++ b/sdk/python/pulumi_azure/siterecovery/get_replication_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/siterecovery/get_replication_recovery_plan.py b/sdk/python/pulumi_azure/siterecovery/get_replication_recovery_plan.py index e2c0aa5140..465f05e247 100644 --- a/sdk/python/pulumi_azure/siterecovery/get_replication_recovery_plan.py +++ b/sdk/python/pulumi_azure/siterecovery/get_replication_recovery_plan.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/siterecovery/hyper_v_replication_policy.py b/sdk/python/pulumi_azure/siterecovery/hyper_v_replication_policy.py index 7a3b29e2bd..e9c59aa935 100644 --- a/sdk/python/pulumi_azure/siterecovery/hyper_v_replication_policy.py +++ b/sdk/python/pulumi_azure/siterecovery/hyper_v_replication_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['HyperVReplicationPolicyArgs', 'HyperVReplicationPolicy'] @@ -26,12 +26,47 @@ def __init__(__self__, *, :param pulumi.Input[int] replication_interval_in_seconds: Specifies how frequently data should be synchronized between source and target locations. Possible values are `30` and `300`. :param pulumi.Input[str] name: The name of the replication policy. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "application_consistent_snapshot_frequency_in_hours", application_consistent_snapshot_frequency_in_hours) - pulumi.set(__self__, "recovery_point_retention_in_hours", recovery_point_retention_in_hours) - pulumi.set(__self__, "recovery_vault_id", recovery_vault_id) - pulumi.set(__self__, "replication_interval_in_seconds", replication_interval_in_seconds) + HyperVReplicationPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_consistent_snapshot_frequency_in_hours=application_consistent_snapshot_frequency_in_hours, + recovery_point_retention_in_hours=recovery_point_retention_in_hours, + recovery_vault_id=recovery_vault_id, + replication_interval_in_seconds=replication_interval_in_seconds, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_consistent_snapshot_frequency_in_hours: Optional[pulumi.Input[int]] = None, + recovery_point_retention_in_hours: Optional[pulumi.Input[int]] = None, + recovery_vault_id: Optional[pulumi.Input[str]] = None, + replication_interval_in_seconds: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_consistent_snapshot_frequency_in_hours is None and 'applicationConsistentSnapshotFrequencyInHours' in kwargs: + application_consistent_snapshot_frequency_in_hours = kwargs['applicationConsistentSnapshotFrequencyInHours'] + if application_consistent_snapshot_frequency_in_hours is None: + raise TypeError("Missing 'application_consistent_snapshot_frequency_in_hours' argument") + if recovery_point_retention_in_hours is None and 'recoveryPointRetentionInHours' in kwargs: + recovery_point_retention_in_hours = kwargs['recoveryPointRetentionInHours'] + if recovery_point_retention_in_hours is None: + raise TypeError("Missing 'recovery_point_retention_in_hours' argument") + if recovery_vault_id is None and 'recoveryVaultId' in kwargs: + recovery_vault_id = kwargs['recoveryVaultId'] + if recovery_vault_id is None: + raise TypeError("Missing 'recovery_vault_id' argument") + if replication_interval_in_seconds is None and 'replicationIntervalInSeconds' in kwargs: + replication_interval_in_seconds = kwargs['replicationIntervalInSeconds'] + if replication_interval_in_seconds is None: + raise TypeError("Missing 'replication_interval_in_seconds' argument") + + _setter("application_consistent_snapshot_frequency_in_hours", application_consistent_snapshot_frequency_in_hours) + _setter("recovery_point_retention_in_hours", recovery_point_retention_in_hours) + _setter("recovery_vault_id", recovery_vault_id) + _setter("replication_interval_in_seconds", replication_interval_in_seconds) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="applicationConsistentSnapshotFrequencyInHours") @@ -106,16 +141,43 @@ def __init__(__self__, *, :param pulumi.Input[int] recovery_point_retention_in_hours: The duration in hours for which the recovery points need to be stored. :param pulumi.Input[int] replication_interval_in_seconds: Specifies how frequently data should be synchronized between source and target locations. Possible values are `30` and `300`. """ + _HyperVReplicationPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_consistent_snapshot_frequency_in_hours=application_consistent_snapshot_frequency_in_hours, + name=name, + recovery_point_retention_in_hours=recovery_point_retention_in_hours, + recovery_vault_id=recovery_vault_id, + replication_interval_in_seconds=replication_interval_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_consistent_snapshot_frequency_in_hours: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + recovery_point_retention_in_hours: Optional[pulumi.Input[int]] = None, + recovery_vault_id: Optional[pulumi.Input[str]] = None, + replication_interval_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_consistent_snapshot_frequency_in_hours is None and 'applicationConsistentSnapshotFrequencyInHours' in kwargs: + application_consistent_snapshot_frequency_in_hours = kwargs['applicationConsistentSnapshotFrequencyInHours'] + if recovery_point_retention_in_hours is None and 'recoveryPointRetentionInHours' in kwargs: + recovery_point_retention_in_hours = kwargs['recoveryPointRetentionInHours'] + if recovery_vault_id is None and 'recoveryVaultId' in kwargs: + recovery_vault_id = kwargs['recoveryVaultId'] + if replication_interval_in_seconds is None and 'replicationIntervalInSeconds' in kwargs: + replication_interval_in_seconds = kwargs['replicationIntervalInSeconds'] + if application_consistent_snapshot_frequency_in_hours is not None: - pulumi.set(__self__, "application_consistent_snapshot_frequency_in_hours", application_consistent_snapshot_frequency_in_hours) + _setter("application_consistent_snapshot_frequency_in_hours", application_consistent_snapshot_frequency_in_hours) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_point_retention_in_hours is not None: - pulumi.set(__self__, "recovery_point_retention_in_hours", recovery_point_retention_in_hours) + _setter("recovery_point_retention_in_hours", recovery_point_retention_in_hours) if recovery_vault_id is not None: - pulumi.set(__self__, "recovery_vault_id", recovery_vault_id) + _setter("recovery_vault_id", recovery_vault_id) if replication_interval_in_seconds is not None: - pulumi.set(__self__, "replication_interval_in_seconds", replication_interval_in_seconds) + _setter("replication_interval_in_seconds", replication_interval_in_seconds) @property @pulumi.getter(name="applicationConsistentSnapshotFrequencyInHours") @@ -267,6 +329,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HyperVReplicationPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/siterecovery/hyper_v_replication_policy_association.py b/sdk/python/pulumi_azure/siterecovery/hyper_v_replication_policy_association.py index 9b5494e4db..f015f499b4 100644 --- a/sdk/python/pulumi_azure/siterecovery/hyper_v_replication_policy_association.py +++ b/sdk/python/pulumi_azure/siterecovery/hyper_v_replication_policy_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['HyperVReplicationPolicyAssociationArgs', 'HyperVReplicationPolicyAssociation'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] policy_id: The ID of the HyperV replication policy which to be associated. Changing this forces a new association to be created. :param pulumi.Input[str] name: The name of the replication policy association. Changing this forces a new association to be created. """ - pulumi.set(__self__, "hyperv_site_id", hyperv_site_id) - pulumi.set(__self__, "policy_id", policy_id) + HyperVReplicationPolicyAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + hyperv_site_id=hyperv_site_id, + policy_id=policy_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hyperv_site_id: Optional[pulumi.Input[str]] = None, + policy_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hyperv_site_id is None and 'hypervSiteId' in kwargs: + hyperv_site_id = kwargs['hypervSiteId'] + if hyperv_site_id is None: + raise TypeError("Missing 'hyperv_site_id' argument") + if policy_id is None and 'policyId' in kwargs: + policy_id = kwargs['policyId'] + if policy_id is None: + raise TypeError("Missing 'policy_id' argument") + + _setter("hyperv_site_id", hyperv_site_id) + _setter("policy_id", policy_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="hypervSiteId") @@ -77,12 +100,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the replication policy association. Changing this forces a new association to be created. :param pulumi.Input[str] policy_id: The ID of the HyperV replication policy which to be associated. Changing this forces a new association to be created. """ + _HyperVReplicationPolicyAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + hyperv_site_id=hyperv_site_id, + name=name, + policy_id=policy_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hyperv_site_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hyperv_site_id is None and 'hypervSiteId' in kwargs: + hyperv_site_id = kwargs['hypervSiteId'] + if policy_id is None and 'policyId' in kwargs: + policy_id = kwargs['policyId'] + if hyperv_site_id is not None: - pulumi.set(__self__, "hyperv_site_id", hyperv_site_id) + _setter("hyperv_site_id", hyperv_site_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_id is not None: - pulumi.set(__self__, "policy_id", policy_id) + _setter("policy_id", policy_id) @property @pulumi.getter(name="hypervSiteId") @@ -218,6 +260,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HyperVReplicationPolicyAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/siterecovery/hyper_v_site.py b/sdk/python/pulumi_azure/siterecovery/hyper_v_site.py index 52b8d06bbf..c2c69272e2 100644 --- a/sdk/python/pulumi_azure/siterecovery/hyper_v_site.py +++ b/sdk/python/pulumi_azure/siterecovery/hyper_v_site.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['HyperVSiteArgs', 'HyperVSite'] @@ -21,9 +21,26 @@ def __init__(__self__, *, :param pulumi.Input[str] recovery_vault_id: The ID of the Recovery Services Vault where the Site created. Changing this forces a new Site to be created. :param pulumi.Input[str] name: The name which should be used for this Recovery Service. Changing this forces a new Site to be created. """ - pulumi.set(__self__, "recovery_vault_id", recovery_vault_id) + HyperVSiteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + recovery_vault_id=recovery_vault_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recovery_vault_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_vault_id is None and 'recoveryVaultId' in kwargs: + recovery_vault_id = kwargs['recoveryVaultId'] + if recovery_vault_id is None: + raise TypeError("Missing 'recovery_vault_id' argument") + + _setter("recovery_vault_id", recovery_vault_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="recoveryVaultId") @@ -60,10 +77,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Recovery Service. Changing this forces a new Site to be created. :param pulumi.Input[str] recovery_vault_id: The ID of the Recovery Services Vault where the Site created. Changing this forces a new Site to be created. """ + _HyperVSiteState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + recovery_vault_id=recovery_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + recovery_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_vault_id is None and 'recoveryVaultId' in kwargs: + recovery_vault_id = kwargs['recoveryVaultId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_vault_id is not None: - pulumi.set(__self__, "recovery_vault_id", recovery_vault_id) + _setter("recovery_vault_id", recovery_vault_id) @property @pulumi.getter @@ -171,6 +203,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HyperVSiteArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/siterecovery/hyperv_network_mapping.py b/sdk/python/pulumi_azure/siterecovery/hyperv_network_mapping.py index dac153f331..c4194c7e82 100644 --- a/sdk/python/pulumi_azure/siterecovery/hyperv_network_mapping.py +++ b/sdk/python/pulumi_azure/siterecovery/hyperv_network_mapping.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['HypervNetworkMappingArgs', 'HypervNetworkMapping'] @@ -27,12 +27,47 @@ def __init__(__self__, *, :param pulumi.Input[str] target_network_id: The id of the recovery network. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the HyperV network mapping. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "recovery_vault_id", recovery_vault_id) - pulumi.set(__self__, "source_network_name", source_network_name) - pulumi.set(__self__, "source_system_center_virtual_machine_manager_name", source_system_center_virtual_machine_manager_name) - pulumi.set(__self__, "target_network_id", target_network_id) + HypervNetworkMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + recovery_vault_id=recovery_vault_id, + source_network_name=source_network_name, + source_system_center_virtual_machine_manager_name=source_system_center_virtual_machine_manager_name, + target_network_id=target_network_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recovery_vault_id: Optional[pulumi.Input[str]] = None, + source_network_name: Optional[pulumi.Input[str]] = None, + source_system_center_virtual_machine_manager_name: Optional[pulumi.Input[str]] = None, + target_network_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_vault_id is None and 'recoveryVaultId' in kwargs: + recovery_vault_id = kwargs['recoveryVaultId'] + if recovery_vault_id is None: + raise TypeError("Missing 'recovery_vault_id' argument") + if source_network_name is None and 'sourceNetworkName' in kwargs: + source_network_name = kwargs['sourceNetworkName'] + if source_network_name is None: + raise TypeError("Missing 'source_network_name' argument") + if source_system_center_virtual_machine_manager_name is None and 'sourceSystemCenterVirtualMachineManagerName' in kwargs: + source_system_center_virtual_machine_manager_name = kwargs['sourceSystemCenterVirtualMachineManagerName'] + if source_system_center_virtual_machine_manager_name is None: + raise TypeError("Missing 'source_system_center_virtual_machine_manager_name' argument") + if target_network_id is None and 'targetNetworkId' in kwargs: + target_network_id = kwargs['targetNetworkId'] + if target_network_id is None: + raise TypeError("Missing 'target_network_id' argument") + + _setter("recovery_vault_id", recovery_vault_id) + _setter("source_network_name", source_network_name) + _setter("source_system_center_virtual_machine_manager_name", source_system_center_virtual_machine_manager_name) + _setter("target_network_id", target_network_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="recoveryVaultId") @@ -111,16 +146,43 @@ def __init__(__self__, *, :param pulumi.Input[str] source_system_center_virtual_machine_manager_name: Specifies the name of source System Center Virtual Machine Manager where the source network exists. Changing this forces a new resource to be created. :param pulumi.Input[str] target_network_id: The id of the recovery network. Changing this forces a new resource to be created. """ + _HypervNetworkMappingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + recovery_vault_id=recovery_vault_id, + source_network_name=source_network_name, + source_system_center_virtual_machine_manager_name=source_system_center_virtual_machine_manager_name, + target_network_id=target_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + recovery_vault_id: Optional[pulumi.Input[str]] = None, + source_network_name: Optional[pulumi.Input[str]] = None, + source_system_center_virtual_machine_manager_name: Optional[pulumi.Input[str]] = None, + target_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_vault_id is None and 'recoveryVaultId' in kwargs: + recovery_vault_id = kwargs['recoveryVaultId'] + if source_network_name is None and 'sourceNetworkName' in kwargs: + source_network_name = kwargs['sourceNetworkName'] + if source_system_center_virtual_machine_manager_name is None and 'sourceSystemCenterVirtualMachineManagerName' in kwargs: + source_system_center_virtual_machine_manager_name = kwargs['sourceSystemCenterVirtualMachineManagerName'] + if target_network_id is None and 'targetNetworkId' in kwargs: + target_network_id = kwargs['targetNetworkId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_vault_id is not None: - pulumi.set(__self__, "recovery_vault_id", recovery_vault_id) + _setter("recovery_vault_id", recovery_vault_id) if source_network_name is not None: - pulumi.set(__self__, "source_network_name", source_network_name) + _setter("source_network_name", source_network_name) if source_system_center_virtual_machine_manager_name is not None: - pulumi.set(__self__, "source_system_center_virtual_machine_manager_name", source_system_center_virtual_machine_manager_name) + _setter("source_system_center_virtual_machine_manager_name", source_system_center_virtual_machine_manager_name) if target_network_id is not None: - pulumi.set(__self__, "target_network_id", target_network_id) + _setter("target_network_id", target_network_id) @property @pulumi.getter @@ -284,6 +346,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HypervNetworkMappingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/siterecovery/network_mapping.py b/sdk/python/pulumi_azure/siterecovery/network_mapping.py index 427d2055b1..acd6a55a3e 100644 --- a/sdk/python/pulumi_azure/siterecovery/network_mapping.py +++ b/sdk/python/pulumi_azure/siterecovery/network_mapping.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['NetworkMappingArgs', 'NetworkMapping'] @@ -31,14 +31,61 @@ def __init__(__self__, *, :param pulumi.Input[str] target_recovery_fabric_name: The Azure Site Recovery fabric object corresponding to the recovery Azure region. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the network mapping. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "source_network_id", source_network_id) - pulumi.set(__self__, "source_recovery_fabric_name", source_recovery_fabric_name) - pulumi.set(__self__, "target_network_id", target_network_id) - pulumi.set(__self__, "target_recovery_fabric_name", target_recovery_fabric_name) + NetworkMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + source_network_id=source_network_id, + source_recovery_fabric_name=source_recovery_fabric_name, + target_network_id=target_network_id, + target_recovery_fabric_name=target_recovery_fabric_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source_network_id: Optional[pulumi.Input[str]] = None, + source_recovery_fabric_name: Optional[pulumi.Input[str]] = None, + target_network_id: Optional[pulumi.Input[str]] = None, + target_recovery_fabric_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if recovery_vault_name is None: + raise TypeError("Missing 'recovery_vault_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if source_network_id is None and 'sourceNetworkId' in kwargs: + source_network_id = kwargs['sourceNetworkId'] + if source_network_id is None: + raise TypeError("Missing 'source_network_id' argument") + if source_recovery_fabric_name is None and 'sourceRecoveryFabricName' in kwargs: + source_recovery_fabric_name = kwargs['sourceRecoveryFabricName'] + if source_recovery_fabric_name is None: + raise TypeError("Missing 'source_recovery_fabric_name' argument") + if target_network_id is None and 'targetNetworkId' in kwargs: + target_network_id = kwargs['targetNetworkId'] + if target_network_id is None: + raise TypeError("Missing 'target_network_id' argument") + if target_recovery_fabric_name is None and 'targetRecoveryFabricName' in kwargs: + target_recovery_fabric_name = kwargs['targetRecoveryFabricName'] + if target_recovery_fabric_name is None: + raise TypeError("Missing 'target_recovery_fabric_name' argument") + + _setter("recovery_vault_name", recovery_vault_name) + _setter("resource_group_name", resource_group_name) + _setter("source_network_id", source_network_id) + _setter("source_recovery_fabric_name", source_recovery_fabric_name) + _setter("target_network_id", target_network_id) + _setter("target_recovery_fabric_name", target_recovery_fabric_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="recoveryVaultName") @@ -145,20 +192,55 @@ def __init__(__self__, *, :param pulumi.Input[str] target_network_id: The id of the recovery network. Changing this forces a new resource to be created. :param pulumi.Input[str] target_recovery_fabric_name: The Azure Site Recovery fabric object corresponding to the recovery Azure region. Changing this forces a new resource to be created. """ + _NetworkMappingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + source_network_id=source_network_id, + source_recovery_fabric_name=source_recovery_fabric_name, + target_network_id=target_network_id, + target_recovery_fabric_name=target_recovery_fabric_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source_network_id: Optional[pulumi.Input[str]] = None, + source_recovery_fabric_name: Optional[pulumi.Input[str]] = None, + target_network_id: Optional[pulumi.Input[str]] = None, + target_recovery_fabric_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if source_network_id is None and 'sourceNetworkId' in kwargs: + source_network_id = kwargs['sourceNetworkId'] + if source_recovery_fabric_name is None and 'sourceRecoveryFabricName' in kwargs: + source_recovery_fabric_name = kwargs['sourceRecoveryFabricName'] + if target_network_id is None and 'targetNetworkId' in kwargs: + target_network_id = kwargs['targetNetworkId'] + if target_recovery_fabric_name is None and 'targetRecoveryFabricName' in kwargs: + target_recovery_fabric_name = kwargs['targetRecoveryFabricName'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_vault_name is not None: - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) + _setter("recovery_vault_name", recovery_vault_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if source_network_id is not None: - pulumi.set(__self__, "source_network_id", source_network_id) + _setter("source_network_id", source_network_id) if source_recovery_fabric_name is not None: - pulumi.set(__self__, "source_recovery_fabric_name", source_recovery_fabric_name) + _setter("source_recovery_fabric_name", source_recovery_fabric_name) if target_network_id is not None: - pulumi.set(__self__, "target_network_id", target_network_id) + _setter("target_network_id", target_network_id) if target_recovery_fabric_name is not None: - pulumi.set(__self__, "target_recovery_fabric_name", target_recovery_fabric_name) + _setter("target_recovery_fabric_name", target_recovery_fabric_name) @property @pulumi.getter @@ -384,6 +466,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkMappingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/siterecovery/outputs.py b/sdk/python/pulumi_azure/siterecovery/outputs.py index 69abe49cc5..ba8ae220e3 100644 --- a/sdk/python/pulumi_azure/siterecovery/outputs.py +++ b/sdk/python/pulumi_azure/siterecovery/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -75,12 +75,31 @@ def __init__(__self__, *, > **Note:** The setting applies to all Azure VMs protected in the same container. For more details see [this document](https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-autoupdate#enable-automatic-updates) """ + ProtectionContainerMappingAutomaticUpdate._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_type=authentication_type, + automation_account_id=automation_account_id, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_type: Optional[str] = None, + automation_account_id: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if automation_account_id is None and 'automationAccountId' in kwargs: + automation_account_id = kwargs['automationAccountId'] + if authentication_type is not None: - pulumi.set(__self__, "authentication_type", authentication_type) + _setter("authentication_type", authentication_type) if automation_account_id is not None: - pulumi.set(__self__, "automation_account_id", automation_account_id) + _setter("automation_account_id", automation_account_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="authenticationType") @@ -165,15 +184,62 @@ def __init__(__self__, *, > **NOTE:** Creating replicated vm with `target_disk_encryption_set_id` wil take more time (up to 5 hours), please extend the `timeout` for `create`. """ - pulumi.set(__self__, "disk_id", disk_id) - pulumi.set(__self__, "staging_storage_account_id", staging_storage_account_id) - pulumi.set(__self__, "target_disk_type", target_disk_type) - pulumi.set(__self__, "target_replica_disk_type", target_replica_disk_type) - pulumi.set(__self__, "target_resource_group_id", target_resource_group_id) + ReplicatedVMManagedDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_id=disk_id, + staging_storage_account_id=staging_storage_account_id, + target_disk_type=target_disk_type, + target_replica_disk_type=target_replica_disk_type, + target_resource_group_id=target_resource_group_id, + target_disk_encryption=target_disk_encryption, + target_disk_encryption_set_id=target_disk_encryption_set_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_id: Optional[str] = None, + staging_storage_account_id: Optional[str] = None, + target_disk_type: Optional[str] = None, + target_replica_disk_type: Optional[str] = None, + target_resource_group_id: Optional[str] = None, + target_disk_encryption: Optional['outputs.ReplicatedVMManagedDiskTargetDiskEncryption'] = None, + target_disk_encryption_set_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_id is None and 'diskId' in kwargs: + disk_id = kwargs['diskId'] + if disk_id is None: + raise TypeError("Missing 'disk_id' argument") + if staging_storage_account_id is None and 'stagingStorageAccountId' in kwargs: + staging_storage_account_id = kwargs['stagingStorageAccountId'] + if staging_storage_account_id is None: + raise TypeError("Missing 'staging_storage_account_id' argument") + if target_disk_type is None and 'targetDiskType' in kwargs: + target_disk_type = kwargs['targetDiskType'] + if target_disk_type is None: + raise TypeError("Missing 'target_disk_type' argument") + if target_replica_disk_type is None and 'targetReplicaDiskType' in kwargs: + target_replica_disk_type = kwargs['targetReplicaDiskType'] + if target_replica_disk_type is None: + raise TypeError("Missing 'target_replica_disk_type' argument") + if target_resource_group_id is None and 'targetResourceGroupId' in kwargs: + target_resource_group_id = kwargs['targetResourceGroupId'] + if target_resource_group_id is None: + raise TypeError("Missing 'target_resource_group_id' argument") + if target_disk_encryption is None and 'targetDiskEncryption' in kwargs: + target_disk_encryption = kwargs['targetDiskEncryption'] + if target_disk_encryption_set_id is None and 'targetDiskEncryptionSetId' in kwargs: + target_disk_encryption_set_id = kwargs['targetDiskEncryptionSetId'] + + _setter("disk_id", disk_id) + _setter("staging_storage_account_id", staging_storage_account_id) + _setter("target_disk_type", target_disk_type) + _setter("target_replica_disk_type", target_replica_disk_type) + _setter("target_resource_group_id", target_resource_group_id) if target_disk_encryption is not None: - pulumi.set(__self__, "target_disk_encryption", target_disk_encryption) + _setter("target_disk_encryption", target_disk_encryption) if target_disk_encryption_set_id is not None: - pulumi.set(__self__, "target_disk_encryption_set_id", target_disk_encryption_set_id) + _setter("target_disk_encryption_set_id", target_disk_encryption_set_id) @property @pulumi.getter(name="diskId") @@ -262,9 +328,28 @@ def __init__(__self__, *, :param 'ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyArgs' disk_encryption_key: A `disk_encryption_key` block as defined below. :param 'ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKeyArgs' key_encryption_key: A `key_encryption_key` block as defined below. """ - pulumi.set(__self__, "disk_encryption_key", disk_encryption_key) + ReplicatedVMManagedDiskTargetDiskEncryption._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_encryption_key=disk_encryption_key, + key_encryption_key=key_encryption_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_encryption_key: Optional['outputs.ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKey'] = None, + key_encryption_key: Optional['outputs.ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKey'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_encryption_key is None and 'diskEncryptionKey' in kwargs: + disk_encryption_key = kwargs['diskEncryptionKey'] + if disk_encryption_key is None: + raise TypeError("Missing 'disk_encryption_key' argument") + if key_encryption_key is None and 'keyEncryptionKey' in kwargs: + key_encryption_key = kwargs['keyEncryptionKey'] + + _setter("disk_encryption_key", disk_encryption_key) if key_encryption_key is not None: - pulumi.set(__self__, "key_encryption_key", key_encryption_key) + _setter("key_encryption_key", key_encryption_key) @property @pulumi.getter(name="diskEncryptionKey") @@ -311,8 +396,29 @@ def __init__(__self__, *, :param str secret_url: The URL to the Key Vault Secret used as the Disk Encryption Key that the Managed Disk will be associated with. This can be found as `id` on the `keyvault.Secret` resource. Changing this forces a new resource to be created. :param str vault_id: The ID of the Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "secret_url", secret_url) - pulumi.set(__self__, "vault_id", vault_id) + ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + secret_url=secret_url, + vault_id=vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + secret_url: Optional[str] = None, + vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if secret_url is None and 'secretUrl' in kwargs: + secret_url = kwargs['secretUrl'] + if secret_url is None: + raise TypeError("Missing 'secret_url' argument") + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if vault_id is None: + raise TypeError("Missing 'vault_id' argument") + + _setter("secret_url", secret_url) + _setter("vault_id", vault_id) @property @pulumi.getter(name="secretUrl") @@ -359,8 +465,29 @@ def __init__(__self__, *, :param str key_url: The URL to the Key Vault Key used as the Key Encryption Key that the Managed Disk will be associated with. This can be found as `id` on the `keyvault.Key` resource. Changing this forces a new resource to be created. :param str vault_id: The ID of the Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "key_url", key_url) - pulumi.set(__self__, "vault_id", vault_id) + ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_url=key_url, + vault_id=vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_url: Optional[str] = None, + vault_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_url is None and 'keyUrl' in kwargs: + key_url = kwargs['keyUrl'] + if key_url is None: + raise TypeError("Missing 'key_url' argument") + if vault_id is None and 'vaultId' in kwargs: + vault_id = kwargs['vaultId'] + if vault_id is None: + raise TypeError("Missing 'vault_id' argument") + + _setter("key_url", key_url) + _setter("vault_id", vault_id) @property @pulumi.getter(name="keyUrl") @@ -430,22 +557,63 @@ def __init__(__self__, *, :param str target_static_ip: Static IP to assign when a failover is done. :param str target_subnet_name: Name of the subnet to to use when a failover is done. """ + ReplicatedVMNetworkInterface._configure( + lambda key, value: pulumi.set(__self__, key, value), + failover_test_public_ip_address_id=failover_test_public_ip_address_id, + failover_test_static_ip=failover_test_static_ip, + failover_test_subnet_name=failover_test_subnet_name, + is_primary=is_primary, + recovery_public_ip_address_id=recovery_public_ip_address_id, + source_network_interface_id=source_network_interface_id, + target_static_ip=target_static_ip, + target_subnet_name=target_subnet_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + failover_test_public_ip_address_id: Optional[str] = None, + failover_test_static_ip: Optional[str] = None, + failover_test_subnet_name: Optional[str] = None, + is_primary: Optional[bool] = None, + recovery_public_ip_address_id: Optional[str] = None, + source_network_interface_id: Optional[str] = None, + target_static_ip: Optional[str] = None, + target_subnet_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if failover_test_public_ip_address_id is None and 'failoverTestPublicIpAddressId' in kwargs: + failover_test_public_ip_address_id = kwargs['failoverTestPublicIpAddressId'] + if failover_test_static_ip is None and 'failoverTestStaticIp' in kwargs: + failover_test_static_ip = kwargs['failoverTestStaticIp'] + if failover_test_subnet_name is None and 'failoverTestSubnetName' in kwargs: + failover_test_subnet_name = kwargs['failoverTestSubnetName'] + if is_primary is None and 'isPrimary' in kwargs: + is_primary = kwargs['isPrimary'] + if recovery_public_ip_address_id is None and 'recoveryPublicIpAddressId' in kwargs: + recovery_public_ip_address_id = kwargs['recoveryPublicIpAddressId'] + if source_network_interface_id is None and 'sourceNetworkInterfaceId' in kwargs: + source_network_interface_id = kwargs['sourceNetworkInterfaceId'] + if target_static_ip is None and 'targetStaticIp' in kwargs: + target_static_ip = kwargs['targetStaticIp'] + if target_subnet_name is None and 'targetSubnetName' in kwargs: + target_subnet_name = kwargs['targetSubnetName'] + if failover_test_public_ip_address_id is not None: - pulumi.set(__self__, "failover_test_public_ip_address_id", failover_test_public_ip_address_id) + _setter("failover_test_public_ip_address_id", failover_test_public_ip_address_id) if failover_test_static_ip is not None: - pulumi.set(__self__, "failover_test_static_ip", failover_test_static_ip) + _setter("failover_test_static_ip", failover_test_static_ip) if failover_test_subnet_name is not None: - pulumi.set(__self__, "failover_test_subnet_name", failover_test_subnet_name) + _setter("failover_test_subnet_name", failover_test_subnet_name) if is_primary is not None: - pulumi.set(__self__, "is_primary", is_primary) + _setter("is_primary", is_primary) if recovery_public_ip_address_id is not None: - pulumi.set(__self__, "recovery_public_ip_address_id", recovery_public_ip_address_id) + _setter("recovery_public_ip_address_id", recovery_public_ip_address_id) if source_network_interface_id is not None: - pulumi.set(__self__, "source_network_interface_id", source_network_interface_id) + _setter("source_network_interface_id", source_network_interface_id) if target_static_ip is not None: - pulumi.set(__self__, "target_static_ip", target_static_ip) + _setter("target_static_ip", target_static_ip) if target_subnet_name is not None: - pulumi.set(__self__, "target_subnet_name", target_subnet_name) + _setter("target_subnet_name", target_subnet_name) @property @pulumi.getter(name="failoverTestPublicIpAddressId") @@ -544,9 +712,36 @@ def __init__(__self__, *, :param str staging_storage_account_id: Storage account that should be used for caching. :param str target_storage_account_id: Storage account disk should belong to when a failover is done. """ - pulumi.set(__self__, "disk_uri", disk_uri) - pulumi.set(__self__, "staging_storage_account_id", staging_storage_account_id) - pulumi.set(__self__, "target_storage_account_id", target_storage_account_id) + ReplicatedVMUnmanagedDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + disk_uri=disk_uri, + staging_storage_account_id=staging_storage_account_id, + target_storage_account_id=target_storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disk_uri: Optional[str] = None, + staging_storage_account_id: Optional[str] = None, + target_storage_account_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disk_uri is None and 'diskUri' in kwargs: + disk_uri = kwargs['diskUri'] + if disk_uri is None: + raise TypeError("Missing 'disk_uri' argument") + if staging_storage_account_id is None and 'stagingStorageAccountId' in kwargs: + staging_storage_account_id = kwargs['stagingStorageAccountId'] + if staging_storage_account_id is None: + raise TypeError("Missing 'staging_storage_account_id' argument") + if target_storage_account_id is None and 'targetStorageAccountId' in kwargs: + target_storage_account_id = kwargs['targetStorageAccountId'] + if target_storage_account_id is None: + raise TypeError("Missing 'target_storage_account_id' argument") + + _setter("disk_uri", disk_uri) + _setter("staging_storage_account_id", staging_storage_account_id) + _setter("target_storage_account_id", target_storage_account_id) @property @pulumi.getter(name="diskUri") @@ -613,14 +808,39 @@ def __init__(__self__, *, > **Note:** `primary_zone` and `recovery_zone` must be specified together. """ + ReplicationRecoveryPlanAzureToAzureSettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + primary_edge_zone=primary_edge_zone, + primary_zone=primary_zone, + recovery_edge_zone=recovery_edge_zone, + recovery_zone=recovery_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + primary_edge_zone: Optional[str] = None, + primary_zone: Optional[str] = None, + recovery_edge_zone: Optional[str] = None, + recovery_zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary_edge_zone is None and 'primaryEdgeZone' in kwargs: + primary_edge_zone = kwargs['primaryEdgeZone'] + if primary_zone is None and 'primaryZone' in kwargs: + primary_zone = kwargs['primaryZone'] + if recovery_edge_zone is None and 'recoveryEdgeZone' in kwargs: + recovery_edge_zone = kwargs['recoveryEdgeZone'] + if recovery_zone is None and 'recoveryZone' in kwargs: + recovery_zone = kwargs['recoveryZone'] + if primary_edge_zone is not None: - pulumi.set(__self__, "primary_edge_zone", primary_edge_zone) + _setter("primary_edge_zone", primary_edge_zone) if primary_zone is not None: - pulumi.set(__self__, "primary_zone", primary_zone) + _setter("primary_zone", primary_zone) if recovery_edge_zone is not None: - pulumi.set(__self__, "recovery_edge_zone", recovery_edge_zone) + _setter("recovery_edge_zone", recovery_edge_zone) if recovery_zone is not None: - pulumi.set(__self__, "recovery_zone", recovery_zone) + _setter("recovery_zone", recovery_zone) @property @pulumi.getter(name="primaryEdgeZone") @@ -691,12 +911,33 @@ def __init__(__self__, *, :param Sequence['ReplicationRecoveryPlanBootRecoveryGroupPreActionArgs'] pre_actions: one or more `action` block as defined below. which will be executed before the group recovery. :param Sequence[str] replicated_protected_items: One or more protected VM IDs. It must not be specified when `type` is `Shutdown`. """ + ReplicationRecoveryPlanBootRecoveryGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + post_actions=post_actions, + pre_actions=pre_actions, + replicated_protected_items=replicated_protected_items, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + post_actions: Optional[Sequence['outputs.ReplicationRecoveryPlanBootRecoveryGroupPostAction']] = None, + pre_actions: Optional[Sequence['outputs.ReplicationRecoveryPlanBootRecoveryGroupPreAction']] = None, + replicated_protected_items: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if post_actions is None and 'postActions' in kwargs: + post_actions = kwargs['postActions'] + if pre_actions is None and 'preActions' in kwargs: + pre_actions = kwargs['preActions'] + if replicated_protected_items is None and 'replicatedProtectedItems' in kwargs: + replicated_protected_items = kwargs['replicatedProtectedItems'] + if post_actions is not None: - pulumi.set(__self__, "post_actions", post_actions) + _setter("post_actions", post_actions) if pre_actions is not None: - pulumi.set(__self__, "pre_actions", pre_actions) + _setter("pre_actions", pre_actions) if replicated_protected_items is not None: - pulumi.set(__self__, "replicated_protected_items", replicated_protected_items) + _setter("replicated_protected_items", replicated_protected_items) @property @pulumi.getter(name="postActions") @@ -779,18 +1020,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanBootRecoveryGroupPostAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[Sequence[str]] = None, + fail_over_types: Optional[Sequence[str]] = None, + name: Optional[str] = None, + type: Optional[str] = None, + fabric_location: Optional[str] = None, + manual_action_instruction: Optional[str] = None, + runbook_id: Optional[str] = None, + script_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -921,18 +1207,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanBootRecoveryGroupPreAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[Sequence[str]] = None, + fail_over_types: Optional[Sequence[str]] = None, + name: Optional[str] = None, + type: Optional[str] = None, + fabric_location: Optional[str] = None, + manual_action_instruction: Optional[str] = None, + runbook_id: Optional[str] = None, + script_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -1035,10 +1366,27 @@ def __init__(__self__, *, :param Sequence['ReplicationRecoveryPlanFailoverRecoveryGroupPostActionArgs'] post_actions: one or more `action` block as defined below. which will be executed after the group recovery. :param Sequence['ReplicationRecoveryPlanFailoverRecoveryGroupPreActionArgs'] pre_actions: one or more `action` block as defined below. which will be executed before the group recovery. """ + ReplicationRecoveryPlanFailoverRecoveryGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + post_actions=post_actions, + pre_actions=pre_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + post_actions: Optional[Sequence['outputs.ReplicationRecoveryPlanFailoverRecoveryGroupPostAction']] = None, + pre_actions: Optional[Sequence['outputs.ReplicationRecoveryPlanFailoverRecoveryGroupPreAction']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if post_actions is None and 'postActions' in kwargs: + post_actions = kwargs['postActions'] + if pre_actions is None and 'preActions' in kwargs: + pre_actions = kwargs['preActions'] + if post_actions is not None: - pulumi.set(__self__, "post_actions", post_actions) + _setter("post_actions", post_actions) if pre_actions is not None: - pulumi.set(__self__, "pre_actions", pre_actions) + _setter("pre_actions", pre_actions) @property @pulumi.getter(name="postActions") @@ -1113,18 +1461,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanFailoverRecoveryGroupPostAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[Sequence[str]] = None, + fail_over_types: Optional[Sequence[str]] = None, + name: Optional[str] = None, + type: Optional[str] = None, + fabric_location: Optional[str] = None, + manual_action_instruction: Optional[str] = None, + runbook_id: Optional[str] = None, + script_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -1255,18 +1648,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanFailoverRecoveryGroupPreAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[Sequence[str]] = None, + fail_over_types: Optional[Sequence[str]] = None, + name: Optional[str] = None, + type: Optional[str] = None, + fabric_location: Optional[str] = None, + manual_action_instruction: Optional[str] = None, + runbook_id: Optional[str] = None, + script_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -1375,13 +1813,38 @@ def __init__(__self__, *, :param Sequence['ReplicationRecoveryPlanRecoveryGroupPreActionArgs'] pre_actions: one or more `action` block as defined below. which will be executed before the group recovery. :param Sequence[str] replicated_protected_items: One or more protected VM IDs. It must not be specified when `type` is `Shutdown`. """ - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanRecoveryGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + post_actions=post_actions, + pre_actions=pre_actions, + replicated_protected_items=replicated_protected_items, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + post_actions: Optional[Sequence['outputs.ReplicationRecoveryPlanRecoveryGroupPostAction']] = None, + pre_actions: Optional[Sequence['outputs.ReplicationRecoveryPlanRecoveryGroupPreAction']] = None, + replicated_protected_items: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if post_actions is None and 'postActions' in kwargs: + post_actions = kwargs['postActions'] + if pre_actions is None and 'preActions' in kwargs: + pre_actions = kwargs['preActions'] + if replicated_protected_items is None and 'replicatedProtectedItems' in kwargs: + replicated_protected_items = kwargs['replicatedProtectedItems'] + + _setter("type", type) if post_actions is not None: - pulumi.set(__self__, "post_actions", post_actions) + _setter("post_actions", post_actions) if pre_actions is not None: - pulumi.set(__self__, "pre_actions", pre_actions) + _setter("pre_actions", pre_actions) if replicated_protected_items is not None: - pulumi.set(__self__, "replicated_protected_items", replicated_protected_items) + _setter("replicated_protected_items", replicated_protected_items) @property @pulumi.getter @@ -1472,18 +1935,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanRecoveryGroupPostAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[Sequence[str]] = None, + fail_over_types: Optional[Sequence[str]] = None, + name: Optional[str] = None, + type: Optional[str] = None, + fabric_location: Optional[str] = None, + manual_action_instruction: Optional[str] = None, + runbook_id: Optional[str] = None, + script_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -1614,18 +2122,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanRecoveryGroupPreAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[Sequence[str]] = None, + fail_over_types: Optional[Sequence[str]] = None, + name: Optional[str] = None, + type: Optional[str] = None, + fabric_location: Optional[str] = None, + manual_action_instruction: Optional[str] = None, + runbook_id: Optional[str] = None, + script_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -1728,10 +2281,27 @@ def __init__(__self__, *, :param Sequence['ReplicationRecoveryPlanShutdownRecoveryGroupPostActionArgs'] post_actions: one or more `action` block as defined below. which will be executed after the group recovery. :param Sequence['ReplicationRecoveryPlanShutdownRecoveryGroupPreActionArgs'] pre_actions: one or more `action` block as defined below. which will be executed before the group recovery. """ + ReplicationRecoveryPlanShutdownRecoveryGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + post_actions=post_actions, + pre_actions=pre_actions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + post_actions: Optional[Sequence['outputs.ReplicationRecoveryPlanShutdownRecoveryGroupPostAction']] = None, + pre_actions: Optional[Sequence['outputs.ReplicationRecoveryPlanShutdownRecoveryGroupPreAction']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if post_actions is None and 'postActions' in kwargs: + post_actions = kwargs['postActions'] + if pre_actions is None and 'preActions' in kwargs: + pre_actions = kwargs['preActions'] + if post_actions is not None: - pulumi.set(__self__, "post_actions", post_actions) + _setter("post_actions", post_actions) if pre_actions is not None: - pulumi.set(__self__, "pre_actions", pre_actions) + _setter("pre_actions", pre_actions) @property @pulumi.getter(name="postActions") @@ -1806,18 +2376,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanShutdownRecoveryGroupPostAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[Sequence[str]] = None, + fail_over_types: Optional[Sequence[str]] = None, + name: Optional[str] = None, + type: Optional[str] = None, + fabric_location: Optional[str] = None, + manual_action_instruction: Optional[str] = None, + runbook_id: Optional[str] = None, + script_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -1948,18 +2563,63 @@ def __init__(__self__, *, > **NOTE:** This property is required when `type` is set to `ScriptActionDetails`. """ - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "type", type) + ReplicationRecoveryPlanShutdownRecoveryGroupPreAction._configure( + lambda key, value: pulumi.set(__self__, key, value), + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + name=name, + type=type, + fabric_location=fabric_location, + manual_action_instruction=manual_action_instruction, + runbook_id=runbook_id, + script_path=script_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fail_over_directions: Optional[Sequence[str]] = None, + fail_over_types: Optional[Sequence[str]] = None, + name: Optional[str] = None, + type: Optional[str] = None, + fabric_location: Optional[str] = None, + manual_action_instruction: Optional[str] = None, + runbook_id: Optional[str] = None, + script_path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("name", name) + _setter("type", type) if fabric_location is not None: - pulumi.set(__self__, "fabric_location", fabric_location) + _setter("fabric_location", fabric_location) if manual_action_instruction is not None: - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) + _setter("manual_action_instruction", manual_action_instruction) if runbook_id is not None: - pulumi.set(__self__, "runbook_id", runbook_id) + _setter("runbook_id", runbook_id) if script_path is not None: - pulumi.set(__self__, "script_path", script_path) + _setter("script_path", script_path) @property @pulumi.getter(name="failOverDirections") @@ -2041,10 +2701,43 @@ def __init__(__self__, *, primary_zone: str, recovery_edge_zone: str, recovery_zone: str): - pulumi.set(__self__, "primary_edge_zone", primary_edge_zone) - pulumi.set(__self__, "primary_zone", primary_zone) - pulumi.set(__self__, "recovery_edge_zone", recovery_edge_zone) - pulumi.set(__self__, "recovery_zone", recovery_zone) + GetReplicationRecoveryPlanAzureToAzureSettingResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + primary_edge_zone=primary_edge_zone, + primary_zone=primary_zone, + recovery_edge_zone=recovery_edge_zone, + recovery_zone=recovery_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + primary_edge_zone: Optional[str] = None, + primary_zone: Optional[str] = None, + recovery_edge_zone: Optional[str] = None, + recovery_zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary_edge_zone is None and 'primaryEdgeZone' in kwargs: + primary_edge_zone = kwargs['primaryEdgeZone'] + if primary_edge_zone is None: + raise TypeError("Missing 'primary_edge_zone' argument") + if primary_zone is None and 'primaryZone' in kwargs: + primary_zone = kwargs['primaryZone'] + if primary_zone is None: + raise TypeError("Missing 'primary_zone' argument") + if recovery_edge_zone is None and 'recoveryEdgeZone' in kwargs: + recovery_edge_zone = kwargs['recoveryEdgeZone'] + if recovery_edge_zone is None: + raise TypeError("Missing 'recovery_edge_zone' argument") + if recovery_zone is None and 'recoveryZone' in kwargs: + recovery_zone = kwargs['recoveryZone'] + if recovery_zone is None: + raise TypeError("Missing 'recovery_zone' argument") + + _setter("primary_edge_zone", primary_edge_zone) + _setter("primary_zone", primary_zone) + _setter("recovery_edge_zone", recovery_edge_zone) + _setter("recovery_zone", recovery_zone) @property @pulumi.getter(name="primaryEdgeZone") @@ -2080,10 +2773,41 @@ def __init__(__self__, *, :param Sequence[str] replicated_protected_items: one or more id of protected VM. :param str type: Type of the action detail. """ - pulumi.set(__self__, "post_actions", post_actions) - pulumi.set(__self__, "pre_actions", pre_actions) - pulumi.set(__self__, "replicated_protected_items", replicated_protected_items) - pulumi.set(__self__, "type", type) + GetReplicationRecoveryPlanRecoveryGroupResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + post_actions=post_actions, + pre_actions=pre_actions, + replicated_protected_items=replicated_protected_items, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + post_actions: Optional[Sequence[Sequence['outputs.GetReplicationRecoveryPlanRecoveryGroupPostActionResult']]] = None, + pre_actions: Optional[Sequence[Sequence['outputs.GetReplicationRecoveryPlanRecoveryGroupPreActionResult']]] = None, + replicated_protected_items: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if post_actions is None and 'postActions' in kwargs: + post_actions = kwargs['postActions'] + if post_actions is None: + raise TypeError("Missing 'post_actions' argument") + if pre_actions is None and 'preActions' in kwargs: + pre_actions = kwargs['preActions'] + if pre_actions is None: + raise TypeError("Missing 'pre_actions' argument") + if replicated_protected_items is None and 'replicatedProtectedItems' in kwargs: + replicated_protected_items = kwargs['replicatedProtectedItems'] + if replicated_protected_items is None: + raise TypeError("Missing 'replicated_protected_items' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("post_actions", post_actions) + _setter("pre_actions", pre_actions) + _setter("replicated_protected_items", replicated_protected_items) + _setter("type", type) @property @pulumi.getter(name="postActions") @@ -2139,14 +2863,67 @@ def __init__(__self__, *, :param str script_path: Path of action script. :param str type: Type of the action detail. """ - pulumi.set(__self__, "fabric_location", fabric_location) - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "runbook_id", runbook_id) - pulumi.set(__self__, "script_path", script_path) - pulumi.set(__self__, "type", type) + GetReplicationRecoveryPlanRecoveryGroupPostActionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + fabric_location=fabric_location, + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + manual_action_instruction=manual_action_instruction, + name=name, + runbook_id=runbook_id, + script_path=script_path, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fabric_location: Optional[str] = None, + fail_over_directions: Optional[Sequence[str]] = None, + fail_over_types: Optional[Sequence[str]] = None, + manual_action_instruction: Optional[str] = None, + name: Optional[str] = None, + runbook_id: Optional[str] = None, + script_path: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if fabric_location is None: + raise TypeError("Missing 'fabric_location' argument") + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if manual_action_instruction is None: + raise TypeError("Missing 'manual_action_instruction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if runbook_id is None: + raise TypeError("Missing 'runbook_id' argument") + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + if script_path is None: + raise TypeError("Missing 'script_path' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("fabric_location", fabric_location) + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("manual_action_instruction", manual_action_instruction) + _setter("name", name) + _setter("runbook_id", runbook_id) + _setter("script_path", script_path) + _setter("type", type) @property @pulumi.getter(name="fabricLocation") @@ -2234,14 +3011,67 @@ def __init__(__self__, *, :param str script_path: Path of action script. :param str type: Type of the action detail. """ - pulumi.set(__self__, "fabric_location", fabric_location) - pulumi.set(__self__, "fail_over_directions", fail_over_directions) - pulumi.set(__self__, "fail_over_types", fail_over_types) - pulumi.set(__self__, "manual_action_instruction", manual_action_instruction) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "runbook_id", runbook_id) - pulumi.set(__self__, "script_path", script_path) - pulumi.set(__self__, "type", type) + GetReplicationRecoveryPlanRecoveryGroupPreActionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + fabric_location=fabric_location, + fail_over_directions=fail_over_directions, + fail_over_types=fail_over_types, + manual_action_instruction=manual_action_instruction, + name=name, + runbook_id=runbook_id, + script_path=script_path, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + fabric_location: Optional[str] = None, + fail_over_directions: Optional[Sequence[str]] = None, + fail_over_types: Optional[Sequence[str]] = None, + manual_action_instruction: Optional[str] = None, + name: Optional[str] = None, + runbook_id: Optional[str] = None, + script_path: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if fabric_location is None and 'fabricLocation' in kwargs: + fabric_location = kwargs['fabricLocation'] + if fabric_location is None: + raise TypeError("Missing 'fabric_location' argument") + if fail_over_directions is None and 'failOverDirections' in kwargs: + fail_over_directions = kwargs['failOverDirections'] + if fail_over_directions is None: + raise TypeError("Missing 'fail_over_directions' argument") + if fail_over_types is None and 'failOverTypes' in kwargs: + fail_over_types = kwargs['failOverTypes'] + if fail_over_types is None: + raise TypeError("Missing 'fail_over_types' argument") + if manual_action_instruction is None and 'manualActionInstruction' in kwargs: + manual_action_instruction = kwargs['manualActionInstruction'] + if manual_action_instruction is None: + raise TypeError("Missing 'manual_action_instruction' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if runbook_id is None and 'runbookId' in kwargs: + runbook_id = kwargs['runbookId'] + if runbook_id is None: + raise TypeError("Missing 'runbook_id' argument") + if script_path is None and 'scriptPath' in kwargs: + script_path = kwargs['scriptPath'] + if script_path is None: + raise TypeError("Missing 'script_path' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("fabric_location", fabric_location) + _setter("fail_over_directions", fail_over_directions) + _setter("fail_over_types", fail_over_types) + _setter("manual_action_instruction", manual_action_instruction) + _setter("name", name) + _setter("runbook_id", runbook_id) + _setter("script_path", script_path) + _setter("type", type) @property @pulumi.getter(name="fabricLocation") diff --git a/sdk/python/pulumi_azure/siterecovery/protection_container.py b/sdk/python/pulumi_azure/siterecovery/protection_container.py index b6ee2c38c4..7023e69b11 100644 --- a/sdk/python/pulumi_azure/siterecovery/protection_container.py +++ b/sdk/python/pulumi_azure/siterecovery/protection_container.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ProtectionContainerArgs', 'ProtectionContainer'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the protection container. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "recovery_fabric_name", recovery_fabric_name) - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ProtectionContainerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + recovery_fabric_name=recovery_fabric_name, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recovery_fabric_name: Optional[pulumi.Input[str]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_fabric_name is None and 'recoveryFabricName' in kwargs: + recovery_fabric_name = kwargs['recoveryFabricName'] + if recovery_fabric_name is None: + raise TypeError("Missing 'recovery_fabric_name' argument") + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if recovery_vault_name is None: + raise TypeError("Missing 'recovery_vault_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("recovery_fabric_name", recovery_fabric_name) + _setter("recovery_vault_name", recovery_vault_name) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="recoveryFabricName") @@ -94,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[str] recovery_vault_name: The name of the vault that should be updated. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. """ + _ProtectionContainerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + recovery_fabric_name=recovery_fabric_name, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + recovery_fabric_name: Optional[pulumi.Input[str]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_fabric_name is None and 'recoveryFabricName' in kwargs: + recovery_fabric_name = kwargs['recoveryFabricName'] + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_fabric_name is not None: - pulumi.set(__self__, "recovery_fabric_name", recovery_fabric_name) + _setter("recovery_fabric_name", recovery_fabric_name) if recovery_vault_name is not None: - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) + _setter("recovery_vault_name", recovery_vault_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter @@ -251,6 +303,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProtectionContainerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/siterecovery/protection_container_mapping.py b/sdk/python/pulumi_azure/siterecovery/protection_container_mapping.py index 7415274690..f5863456d0 100644 --- a/sdk/python/pulumi_azure/siterecovery/protection_container_mapping.py +++ b/sdk/python/pulumi_azure/siterecovery/protection_container_mapping.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -35,16 +35,67 @@ def __init__(__self__, *, :param pulumi.Input['ProtectionContainerMappingAutomaticUpdateArgs'] automatic_update: a `automatic_update` block defined as below. :param pulumi.Input[str] name: The name of the protection container mapping. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "recovery_fabric_name", recovery_fabric_name) - pulumi.set(__self__, "recovery_replication_policy_id", recovery_replication_policy_id) - pulumi.set(__self__, "recovery_source_protection_container_name", recovery_source_protection_container_name) - pulumi.set(__self__, "recovery_target_protection_container_id", recovery_target_protection_container_id) - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ProtectionContainerMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + recovery_fabric_name=recovery_fabric_name, + recovery_replication_policy_id=recovery_replication_policy_id, + recovery_source_protection_container_name=recovery_source_protection_container_name, + recovery_target_protection_container_id=recovery_target_protection_container_id, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + automatic_update=automatic_update, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recovery_fabric_name: Optional[pulumi.Input[str]] = None, + recovery_replication_policy_id: Optional[pulumi.Input[str]] = None, + recovery_source_protection_container_name: Optional[pulumi.Input[str]] = None, + recovery_target_protection_container_id: Optional[pulumi.Input[str]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + automatic_update: Optional[pulumi.Input['ProtectionContainerMappingAutomaticUpdateArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_fabric_name is None and 'recoveryFabricName' in kwargs: + recovery_fabric_name = kwargs['recoveryFabricName'] + if recovery_fabric_name is None: + raise TypeError("Missing 'recovery_fabric_name' argument") + if recovery_replication_policy_id is None and 'recoveryReplicationPolicyId' in kwargs: + recovery_replication_policy_id = kwargs['recoveryReplicationPolicyId'] + if recovery_replication_policy_id is None: + raise TypeError("Missing 'recovery_replication_policy_id' argument") + if recovery_source_protection_container_name is None and 'recoverySourceProtectionContainerName' in kwargs: + recovery_source_protection_container_name = kwargs['recoverySourceProtectionContainerName'] + if recovery_source_protection_container_name is None: + raise TypeError("Missing 'recovery_source_protection_container_name' argument") + if recovery_target_protection_container_id is None and 'recoveryTargetProtectionContainerId' in kwargs: + recovery_target_protection_container_id = kwargs['recoveryTargetProtectionContainerId'] + if recovery_target_protection_container_id is None: + raise TypeError("Missing 'recovery_target_protection_container_id' argument") + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if recovery_vault_name is None: + raise TypeError("Missing 'recovery_vault_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if automatic_update is None and 'automaticUpdate' in kwargs: + automatic_update = kwargs['automaticUpdate'] + + _setter("recovery_fabric_name", recovery_fabric_name) + _setter("recovery_replication_policy_id", recovery_replication_policy_id) + _setter("recovery_source_protection_container_name", recovery_source_protection_container_name) + _setter("recovery_target_protection_container_id", recovery_target_protection_container_id) + _setter("recovery_vault_name", recovery_vault_name) + _setter("resource_group_name", resource_group_name) if automatic_update is not None: - pulumi.set(__self__, "automatic_update", automatic_update) + _setter("automatic_update", automatic_update) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="recoveryFabricName") @@ -165,22 +216,61 @@ def __init__(__self__, *, :param pulumi.Input[str] recovery_vault_name: The name of the vault that should be updated. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. """ + _ProtectionContainerMappingState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automatic_update=automatic_update, + name=name, + recovery_fabric_name=recovery_fabric_name, + recovery_replication_policy_id=recovery_replication_policy_id, + recovery_source_protection_container_name=recovery_source_protection_container_name, + recovery_target_protection_container_id=recovery_target_protection_container_id, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automatic_update: Optional[pulumi.Input['ProtectionContainerMappingAutomaticUpdateArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + recovery_fabric_name: Optional[pulumi.Input[str]] = None, + recovery_replication_policy_id: Optional[pulumi.Input[str]] = None, + recovery_source_protection_container_name: Optional[pulumi.Input[str]] = None, + recovery_target_protection_container_id: Optional[pulumi.Input[str]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automatic_update is None and 'automaticUpdate' in kwargs: + automatic_update = kwargs['automaticUpdate'] + if recovery_fabric_name is None and 'recoveryFabricName' in kwargs: + recovery_fabric_name = kwargs['recoveryFabricName'] + if recovery_replication_policy_id is None and 'recoveryReplicationPolicyId' in kwargs: + recovery_replication_policy_id = kwargs['recoveryReplicationPolicyId'] + if recovery_source_protection_container_name is None and 'recoverySourceProtectionContainerName' in kwargs: + recovery_source_protection_container_name = kwargs['recoverySourceProtectionContainerName'] + if recovery_target_protection_container_id is None and 'recoveryTargetProtectionContainerId' in kwargs: + recovery_target_protection_container_id = kwargs['recoveryTargetProtectionContainerId'] + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if automatic_update is not None: - pulumi.set(__self__, "automatic_update", automatic_update) + _setter("automatic_update", automatic_update) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_fabric_name is not None: - pulumi.set(__self__, "recovery_fabric_name", recovery_fabric_name) + _setter("recovery_fabric_name", recovery_fabric_name) if recovery_replication_policy_id is not None: - pulumi.set(__self__, "recovery_replication_policy_id", recovery_replication_policy_id) + _setter("recovery_replication_policy_id", recovery_replication_policy_id) if recovery_source_protection_container_name is not None: - pulumi.set(__self__, "recovery_source_protection_container_name", recovery_source_protection_container_name) + _setter("recovery_source_protection_container_name", recovery_source_protection_container_name) if recovery_target_protection_container_id is not None: - pulumi.set(__self__, "recovery_target_protection_container_id", recovery_target_protection_container_id) + _setter("recovery_target_protection_container_id", recovery_target_protection_container_id) if recovery_vault_name is not None: - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) + _setter("recovery_vault_name", recovery_vault_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="automaticUpdate") @@ -426,6 +516,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProtectionContainerMappingArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -448,6 +542,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ProtectionContainerMappingArgs.__new__(ProtectionContainerMappingArgs) + if automatic_update is not None and not isinstance(automatic_update, ProtectionContainerMappingAutomaticUpdateArgs): + automatic_update = automatic_update or {} + def _setter(key, value): + automatic_update[key] = value + ProtectionContainerMappingAutomaticUpdateArgs._configure(_setter, **automatic_update) __props__.__dict__["automatic_update"] = automatic_update __props__.__dict__["name"] = name if recovery_fabric_name is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/siterecovery/replicated_vm.py b/sdk/python/pulumi_azure/siterecovery/replicated_vm.py index 47aeee2c95..dd494f261a 100644 --- a/sdk/python/pulumi_azure/siterecovery/replicated_vm.py +++ b/sdk/python/pulumi_azure/siterecovery/replicated_vm.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -66,43 +66,160 @@ def __init__(__self__, *, :param pulumi.Input[str] test_network_id: Network to use when a test failover is done. :param pulumi.Input[Sequence[pulumi.Input['ReplicatedVMUnmanagedDiskArgs']]] unmanaged_disks: One or more `unmanaged_disk` block. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "recovery_replication_policy_id", recovery_replication_policy_id) - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "source_recovery_fabric_name", source_recovery_fabric_name) - pulumi.set(__self__, "source_recovery_protection_container_name", source_recovery_protection_container_name) - pulumi.set(__self__, "source_vm_id", source_vm_id) - pulumi.set(__self__, "target_recovery_fabric_id", target_recovery_fabric_id) - pulumi.set(__self__, "target_recovery_protection_container_id", target_recovery_protection_container_id) - pulumi.set(__self__, "target_resource_group_id", target_resource_group_id) + ReplicatedVMArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + recovery_replication_policy_id=recovery_replication_policy_id, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + source_recovery_fabric_name=source_recovery_fabric_name, + source_recovery_protection_container_name=source_recovery_protection_container_name, + source_vm_id=source_vm_id, + target_recovery_fabric_id=target_recovery_fabric_id, + target_recovery_protection_container_id=target_recovery_protection_container_id, + target_resource_group_id=target_resource_group_id, + managed_disks=managed_disks, + multi_vm_group_name=multi_vm_group_name, + name=name, + network_interfaces=network_interfaces, + target_availability_set_id=target_availability_set_id, + target_boot_diagnostic_storage_account_id=target_boot_diagnostic_storage_account_id, + target_capacity_reservation_group_id=target_capacity_reservation_group_id, + target_edge_zone=target_edge_zone, + target_network_id=target_network_id, + target_proximity_placement_group_id=target_proximity_placement_group_id, + target_virtual_machine_scale_set_id=target_virtual_machine_scale_set_id, + target_zone=target_zone, + test_network_id=test_network_id, + unmanaged_disks=unmanaged_disks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recovery_replication_policy_id: Optional[pulumi.Input[str]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source_recovery_fabric_name: Optional[pulumi.Input[str]] = None, + source_recovery_protection_container_name: Optional[pulumi.Input[str]] = None, + source_vm_id: Optional[pulumi.Input[str]] = None, + target_recovery_fabric_id: Optional[pulumi.Input[str]] = None, + target_recovery_protection_container_id: Optional[pulumi.Input[str]] = None, + target_resource_group_id: Optional[pulumi.Input[str]] = None, + managed_disks: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicatedVMManagedDiskArgs']]]] = None, + multi_vm_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicatedVMNetworkInterfaceArgs']]]] = None, + target_availability_set_id: Optional[pulumi.Input[str]] = None, + target_boot_diagnostic_storage_account_id: Optional[pulumi.Input[str]] = None, + target_capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + target_edge_zone: Optional[pulumi.Input[str]] = None, + target_network_id: Optional[pulumi.Input[str]] = None, + target_proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + target_virtual_machine_scale_set_id: Optional[pulumi.Input[str]] = None, + target_zone: Optional[pulumi.Input[str]] = None, + test_network_id: Optional[pulumi.Input[str]] = None, + unmanaged_disks: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicatedVMUnmanagedDiskArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_replication_policy_id is None and 'recoveryReplicationPolicyId' in kwargs: + recovery_replication_policy_id = kwargs['recoveryReplicationPolicyId'] + if recovery_replication_policy_id is None: + raise TypeError("Missing 'recovery_replication_policy_id' argument") + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if recovery_vault_name is None: + raise TypeError("Missing 'recovery_vault_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if source_recovery_fabric_name is None and 'sourceRecoveryFabricName' in kwargs: + source_recovery_fabric_name = kwargs['sourceRecoveryFabricName'] + if source_recovery_fabric_name is None: + raise TypeError("Missing 'source_recovery_fabric_name' argument") + if source_recovery_protection_container_name is None and 'sourceRecoveryProtectionContainerName' in kwargs: + source_recovery_protection_container_name = kwargs['sourceRecoveryProtectionContainerName'] + if source_recovery_protection_container_name is None: + raise TypeError("Missing 'source_recovery_protection_container_name' argument") + if source_vm_id is None and 'sourceVmId' in kwargs: + source_vm_id = kwargs['sourceVmId'] + if source_vm_id is None: + raise TypeError("Missing 'source_vm_id' argument") + if target_recovery_fabric_id is None and 'targetRecoveryFabricId' in kwargs: + target_recovery_fabric_id = kwargs['targetRecoveryFabricId'] + if target_recovery_fabric_id is None: + raise TypeError("Missing 'target_recovery_fabric_id' argument") + if target_recovery_protection_container_id is None and 'targetRecoveryProtectionContainerId' in kwargs: + target_recovery_protection_container_id = kwargs['targetRecoveryProtectionContainerId'] + if target_recovery_protection_container_id is None: + raise TypeError("Missing 'target_recovery_protection_container_id' argument") + if target_resource_group_id is None and 'targetResourceGroupId' in kwargs: + target_resource_group_id = kwargs['targetResourceGroupId'] + if target_resource_group_id is None: + raise TypeError("Missing 'target_resource_group_id' argument") + if managed_disks is None and 'managedDisks' in kwargs: + managed_disks = kwargs['managedDisks'] + if multi_vm_group_name is None and 'multiVmGroupName' in kwargs: + multi_vm_group_name = kwargs['multiVmGroupName'] + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if target_availability_set_id is None and 'targetAvailabilitySetId' in kwargs: + target_availability_set_id = kwargs['targetAvailabilitySetId'] + if target_boot_diagnostic_storage_account_id is None and 'targetBootDiagnosticStorageAccountId' in kwargs: + target_boot_diagnostic_storage_account_id = kwargs['targetBootDiagnosticStorageAccountId'] + if target_capacity_reservation_group_id is None and 'targetCapacityReservationGroupId' in kwargs: + target_capacity_reservation_group_id = kwargs['targetCapacityReservationGroupId'] + if target_edge_zone is None and 'targetEdgeZone' in kwargs: + target_edge_zone = kwargs['targetEdgeZone'] + if target_network_id is None and 'targetNetworkId' in kwargs: + target_network_id = kwargs['targetNetworkId'] + if target_proximity_placement_group_id is None and 'targetProximityPlacementGroupId' in kwargs: + target_proximity_placement_group_id = kwargs['targetProximityPlacementGroupId'] + if target_virtual_machine_scale_set_id is None and 'targetVirtualMachineScaleSetId' in kwargs: + target_virtual_machine_scale_set_id = kwargs['targetVirtualMachineScaleSetId'] + if target_zone is None and 'targetZone' in kwargs: + target_zone = kwargs['targetZone'] + if test_network_id is None and 'testNetworkId' in kwargs: + test_network_id = kwargs['testNetworkId'] + if unmanaged_disks is None and 'unmanagedDisks' in kwargs: + unmanaged_disks = kwargs['unmanagedDisks'] + + _setter("recovery_replication_policy_id", recovery_replication_policy_id) + _setter("recovery_vault_name", recovery_vault_name) + _setter("resource_group_name", resource_group_name) + _setter("source_recovery_fabric_name", source_recovery_fabric_name) + _setter("source_recovery_protection_container_name", source_recovery_protection_container_name) + _setter("source_vm_id", source_vm_id) + _setter("target_recovery_fabric_id", target_recovery_fabric_id) + _setter("target_recovery_protection_container_id", target_recovery_protection_container_id) + _setter("target_resource_group_id", target_resource_group_id) if managed_disks is not None: - pulumi.set(__self__, "managed_disks", managed_disks) + _setter("managed_disks", managed_disks) if multi_vm_group_name is not None: - pulumi.set(__self__, "multi_vm_group_name", multi_vm_group_name) + _setter("multi_vm_group_name", multi_vm_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_interfaces is not None: - pulumi.set(__self__, "network_interfaces", network_interfaces) + _setter("network_interfaces", network_interfaces) if target_availability_set_id is not None: - pulumi.set(__self__, "target_availability_set_id", target_availability_set_id) + _setter("target_availability_set_id", target_availability_set_id) if target_boot_diagnostic_storage_account_id is not None: - pulumi.set(__self__, "target_boot_diagnostic_storage_account_id", target_boot_diagnostic_storage_account_id) + _setter("target_boot_diagnostic_storage_account_id", target_boot_diagnostic_storage_account_id) if target_capacity_reservation_group_id is not None: - pulumi.set(__self__, "target_capacity_reservation_group_id", target_capacity_reservation_group_id) + _setter("target_capacity_reservation_group_id", target_capacity_reservation_group_id) if target_edge_zone is not None: - pulumi.set(__self__, "target_edge_zone", target_edge_zone) + _setter("target_edge_zone", target_edge_zone) if target_network_id is not None: - pulumi.set(__self__, "target_network_id", target_network_id) + _setter("target_network_id", target_network_id) if target_proximity_placement_group_id is not None: - pulumi.set(__self__, "target_proximity_placement_group_id", target_proximity_placement_group_id) + _setter("target_proximity_placement_group_id", target_proximity_placement_group_id) if target_virtual_machine_scale_set_id is not None: - pulumi.set(__self__, "target_virtual_machine_scale_set_id", target_virtual_machine_scale_set_id) + _setter("target_virtual_machine_scale_set_id", target_virtual_machine_scale_set_id) if target_zone is not None: - pulumi.set(__self__, "target_zone", target_zone) + _setter("target_zone", target_zone) if test_network_id is not None: - pulumi.set(__self__, "test_network_id", test_network_id) + _setter("test_network_id", test_network_id) if unmanaged_disks is not None: - pulumi.set(__self__, "unmanaged_disks", unmanaged_disks) + _setter("unmanaged_disks", unmanaged_disks) @property @pulumi.getter(name="recoveryReplicationPolicyId") @@ -435,52 +552,151 @@ def __init__(__self__, *, :param pulumi.Input[str] test_network_id: Network to use when a test failover is done. :param pulumi.Input[Sequence[pulumi.Input['ReplicatedVMUnmanagedDiskArgs']]] unmanaged_disks: One or more `unmanaged_disk` block. Changing this forces a new resource to be created. """ + _ReplicatedVMState._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_disks=managed_disks, + multi_vm_group_name=multi_vm_group_name, + name=name, + network_interfaces=network_interfaces, + recovery_replication_policy_id=recovery_replication_policy_id, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + source_recovery_fabric_name=source_recovery_fabric_name, + source_recovery_protection_container_name=source_recovery_protection_container_name, + source_vm_id=source_vm_id, + target_availability_set_id=target_availability_set_id, + target_boot_diagnostic_storage_account_id=target_boot_diagnostic_storage_account_id, + target_capacity_reservation_group_id=target_capacity_reservation_group_id, + target_edge_zone=target_edge_zone, + target_network_id=target_network_id, + target_proximity_placement_group_id=target_proximity_placement_group_id, + target_recovery_fabric_id=target_recovery_fabric_id, + target_recovery_protection_container_id=target_recovery_protection_container_id, + target_resource_group_id=target_resource_group_id, + target_virtual_machine_scale_set_id=target_virtual_machine_scale_set_id, + target_zone=target_zone, + test_network_id=test_network_id, + unmanaged_disks=unmanaged_disks, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_disks: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicatedVMManagedDiskArgs']]]] = None, + multi_vm_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicatedVMNetworkInterfaceArgs']]]] = None, + recovery_replication_policy_id: Optional[pulumi.Input[str]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + source_recovery_fabric_name: Optional[pulumi.Input[str]] = None, + source_recovery_protection_container_name: Optional[pulumi.Input[str]] = None, + source_vm_id: Optional[pulumi.Input[str]] = None, + target_availability_set_id: Optional[pulumi.Input[str]] = None, + target_boot_diagnostic_storage_account_id: Optional[pulumi.Input[str]] = None, + target_capacity_reservation_group_id: Optional[pulumi.Input[str]] = None, + target_edge_zone: Optional[pulumi.Input[str]] = None, + target_network_id: Optional[pulumi.Input[str]] = None, + target_proximity_placement_group_id: Optional[pulumi.Input[str]] = None, + target_recovery_fabric_id: Optional[pulumi.Input[str]] = None, + target_recovery_protection_container_id: Optional[pulumi.Input[str]] = None, + target_resource_group_id: Optional[pulumi.Input[str]] = None, + target_virtual_machine_scale_set_id: Optional[pulumi.Input[str]] = None, + target_zone: Optional[pulumi.Input[str]] = None, + test_network_id: Optional[pulumi.Input[str]] = None, + unmanaged_disks: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicatedVMUnmanagedDiskArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_disks is None and 'managedDisks' in kwargs: + managed_disks = kwargs['managedDisks'] + if multi_vm_group_name is None and 'multiVmGroupName' in kwargs: + multi_vm_group_name = kwargs['multiVmGroupName'] + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if recovery_replication_policy_id is None and 'recoveryReplicationPolicyId' in kwargs: + recovery_replication_policy_id = kwargs['recoveryReplicationPolicyId'] + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if source_recovery_fabric_name is None and 'sourceRecoveryFabricName' in kwargs: + source_recovery_fabric_name = kwargs['sourceRecoveryFabricName'] + if source_recovery_protection_container_name is None and 'sourceRecoveryProtectionContainerName' in kwargs: + source_recovery_protection_container_name = kwargs['sourceRecoveryProtectionContainerName'] + if source_vm_id is None and 'sourceVmId' in kwargs: + source_vm_id = kwargs['sourceVmId'] + if target_availability_set_id is None and 'targetAvailabilitySetId' in kwargs: + target_availability_set_id = kwargs['targetAvailabilitySetId'] + if target_boot_diagnostic_storage_account_id is None and 'targetBootDiagnosticStorageAccountId' in kwargs: + target_boot_diagnostic_storage_account_id = kwargs['targetBootDiagnosticStorageAccountId'] + if target_capacity_reservation_group_id is None and 'targetCapacityReservationGroupId' in kwargs: + target_capacity_reservation_group_id = kwargs['targetCapacityReservationGroupId'] + if target_edge_zone is None and 'targetEdgeZone' in kwargs: + target_edge_zone = kwargs['targetEdgeZone'] + if target_network_id is None and 'targetNetworkId' in kwargs: + target_network_id = kwargs['targetNetworkId'] + if target_proximity_placement_group_id is None and 'targetProximityPlacementGroupId' in kwargs: + target_proximity_placement_group_id = kwargs['targetProximityPlacementGroupId'] + if target_recovery_fabric_id is None and 'targetRecoveryFabricId' in kwargs: + target_recovery_fabric_id = kwargs['targetRecoveryFabricId'] + if target_recovery_protection_container_id is None and 'targetRecoveryProtectionContainerId' in kwargs: + target_recovery_protection_container_id = kwargs['targetRecoveryProtectionContainerId'] + if target_resource_group_id is None and 'targetResourceGroupId' in kwargs: + target_resource_group_id = kwargs['targetResourceGroupId'] + if target_virtual_machine_scale_set_id is None and 'targetVirtualMachineScaleSetId' in kwargs: + target_virtual_machine_scale_set_id = kwargs['targetVirtualMachineScaleSetId'] + if target_zone is None and 'targetZone' in kwargs: + target_zone = kwargs['targetZone'] + if test_network_id is None and 'testNetworkId' in kwargs: + test_network_id = kwargs['testNetworkId'] + if unmanaged_disks is None and 'unmanagedDisks' in kwargs: + unmanaged_disks = kwargs['unmanagedDisks'] + if managed_disks is not None: - pulumi.set(__self__, "managed_disks", managed_disks) + _setter("managed_disks", managed_disks) if multi_vm_group_name is not None: - pulumi.set(__self__, "multi_vm_group_name", multi_vm_group_name) + _setter("multi_vm_group_name", multi_vm_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_interfaces is not None: - pulumi.set(__self__, "network_interfaces", network_interfaces) + _setter("network_interfaces", network_interfaces) if recovery_replication_policy_id is not None: - pulumi.set(__self__, "recovery_replication_policy_id", recovery_replication_policy_id) + _setter("recovery_replication_policy_id", recovery_replication_policy_id) if recovery_vault_name is not None: - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) + _setter("recovery_vault_name", recovery_vault_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if source_recovery_fabric_name is not None: - pulumi.set(__self__, "source_recovery_fabric_name", source_recovery_fabric_name) + _setter("source_recovery_fabric_name", source_recovery_fabric_name) if source_recovery_protection_container_name is not None: - pulumi.set(__self__, "source_recovery_protection_container_name", source_recovery_protection_container_name) + _setter("source_recovery_protection_container_name", source_recovery_protection_container_name) if source_vm_id is not None: - pulumi.set(__self__, "source_vm_id", source_vm_id) + _setter("source_vm_id", source_vm_id) if target_availability_set_id is not None: - pulumi.set(__self__, "target_availability_set_id", target_availability_set_id) + _setter("target_availability_set_id", target_availability_set_id) if target_boot_diagnostic_storage_account_id is not None: - pulumi.set(__self__, "target_boot_diagnostic_storage_account_id", target_boot_diagnostic_storage_account_id) + _setter("target_boot_diagnostic_storage_account_id", target_boot_diagnostic_storage_account_id) if target_capacity_reservation_group_id is not None: - pulumi.set(__self__, "target_capacity_reservation_group_id", target_capacity_reservation_group_id) + _setter("target_capacity_reservation_group_id", target_capacity_reservation_group_id) if target_edge_zone is not None: - pulumi.set(__self__, "target_edge_zone", target_edge_zone) + _setter("target_edge_zone", target_edge_zone) if target_network_id is not None: - pulumi.set(__self__, "target_network_id", target_network_id) + _setter("target_network_id", target_network_id) if target_proximity_placement_group_id is not None: - pulumi.set(__self__, "target_proximity_placement_group_id", target_proximity_placement_group_id) + _setter("target_proximity_placement_group_id", target_proximity_placement_group_id) if target_recovery_fabric_id is not None: - pulumi.set(__self__, "target_recovery_fabric_id", target_recovery_fabric_id) + _setter("target_recovery_fabric_id", target_recovery_fabric_id) if target_recovery_protection_container_id is not None: - pulumi.set(__self__, "target_recovery_protection_container_id", target_recovery_protection_container_id) + _setter("target_recovery_protection_container_id", target_recovery_protection_container_id) if target_resource_group_id is not None: - pulumi.set(__self__, "target_resource_group_id", target_resource_group_id) + _setter("target_resource_group_id", target_resource_group_id) if target_virtual_machine_scale_set_id is not None: - pulumi.set(__self__, "target_virtual_machine_scale_set_id", target_virtual_machine_scale_set_id) + _setter("target_virtual_machine_scale_set_id", target_virtual_machine_scale_set_id) if target_zone is not None: - pulumi.set(__self__, "target_zone", target_zone) + _setter("target_zone", target_zone) if test_network_id is not None: - pulumi.set(__self__, "test_network_id", test_network_id) + _setter("test_network_id", test_network_id) if unmanaged_disks is not None: - pulumi.set(__self__, "unmanaged_disks", unmanaged_disks) + _setter("unmanaged_disks", unmanaged_disks) @property @pulumi.getter(name="managedDisks") @@ -1136,6 +1352,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ReplicatedVMArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/siterecovery/replication_policy.py b/sdk/python/pulumi_azure/siterecovery/replication_policy.py index 7898beecae..4affa89c4a 100644 --- a/sdk/python/pulumi_azure/siterecovery/replication_policy.py +++ b/sdk/python/pulumi_azure/siterecovery/replication_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ReplicationPolicyArgs', 'ReplicationPolicy'] @@ -29,12 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the replication policy. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "application_consistent_snapshot_frequency_in_minutes", application_consistent_snapshot_frequency_in_minutes) - pulumi.set(__self__, "recovery_point_retention_in_minutes", recovery_point_retention_in_minutes) - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ReplicationPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_consistent_snapshot_frequency_in_minutes=application_consistent_snapshot_frequency_in_minutes, + recovery_point_retention_in_minutes=recovery_point_retention_in_minutes, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_consistent_snapshot_frequency_in_minutes: Optional[pulumi.Input[int]] = None, + recovery_point_retention_in_minutes: Optional[pulumi.Input[int]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_consistent_snapshot_frequency_in_minutes is None and 'applicationConsistentSnapshotFrequencyInMinutes' in kwargs: + application_consistent_snapshot_frequency_in_minutes = kwargs['applicationConsistentSnapshotFrequencyInMinutes'] + if application_consistent_snapshot_frequency_in_minutes is None: + raise TypeError("Missing 'application_consistent_snapshot_frequency_in_minutes' argument") + if recovery_point_retention_in_minutes is None and 'recoveryPointRetentionInMinutes' in kwargs: + recovery_point_retention_in_minutes = kwargs['recoveryPointRetentionInMinutes'] + if recovery_point_retention_in_minutes is None: + raise TypeError("Missing 'recovery_point_retention_in_minutes' argument") + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if recovery_vault_name is None: + raise TypeError("Missing 'recovery_vault_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("application_consistent_snapshot_frequency_in_minutes", application_consistent_snapshot_frequency_in_minutes) + _setter("recovery_point_retention_in_minutes", recovery_point_retention_in_minutes) + _setter("recovery_vault_name", recovery_vault_name) + _setter("resource_group_name", resource_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="applicationConsistentSnapshotFrequencyInMinutes") @@ -117,16 +152,43 @@ def __init__(__self__, *, :param pulumi.Input[str] recovery_vault_name: The name of the vault that should be updated. Changing this forces a new resource to be created. :param pulumi.Input[str] resource_group_name: Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. """ + _ReplicationPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_consistent_snapshot_frequency_in_minutes=application_consistent_snapshot_frequency_in_minutes, + name=name, + recovery_point_retention_in_minutes=recovery_point_retention_in_minutes, + recovery_vault_name=recovery_vault_name, + resource_group_name=resource_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_consistent_snapshot_frequency_in_minutes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + recovery_point_retention_in_minutes: Optional[pulumi.Input[int]] = None, + recovery_vault_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_consistent_snapshot_frequency_in_minutes is None and 'applicationConsistentSnapshotFrequencyInMinutes' in kwargs: + application_consistent_snapshot_frequency_in_minutes = kwargs['applicationConsistentSnapshotFrequencyInMinutes'] + if recovery_point_retention_in_minutes is None and 'recoveryPointRetentionInMinutes' in kwargs: + recovery_point_retention_in_minutes = kwargs['recoveryPointRetentionInMinutes'] + if recovery_vault_name is None and 'recoveryVaultName' in kwargs: + recovery_vault_name = kwargs['recoveryVaultName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if application_consistent_snapshot_frequency_in_minutes is not None: - pulumi.set(__self__, "application_consistent_snapshot_frequency_in_minutes", application_consistent_snapshot_frequency_in_minutes) + _setter("application_consistent_snapshot_frequency_in_minutes", application_consistent_snapshot_frequency_in_minutes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_point_retention_in_minutes is not None: - pulumi.set(__self__, "recovery_point_retention_in_minutes", recovery_point_retention_in_minutes) + _setter("recovery_point_retention_in_minutes", recovery_point_retention_in_minutes) if recovery_vault_name is not None: - pulumi.set(__self__, "recovery_vault_name", recovery_vault_name) + _setter("recovery_vault_name", recovery_vault_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) @property @pulumi.getter(name="applicationConsistentSnapshotFrequencyInMinutes") @@ -286,6 +348,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ReplicationPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/siterecovery/replication_recovery_plan.py b/sdk/python/pulumi_azure/siterecovery/replication_recovery_plan.py index 60bc5a7d8f..abe48295a2 100644 --- a/sdk/python/pulumi_azure/siterecovery/replication_recovery_plan.py +++ b/sdk/python/pulumi_azure/siterecovery/replication_recovery_plan.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,24 +45,73 @@ def __init__(__self__, *, > **NOTE:** `shutdown_recovery_group` will be required in the next major version of the AzureRM Provider. """ - pulumi.set(__self__, "recovery_vault_id", recovery_vault_id) - pulumi.set(__self__, "source_recovery_fabric_id", source_recovery_fabric_id) - pulumi.set(__self__, "target_recovery_fabric_id", target_recovery_fabric_id) + ReplicationRecoveryPlanArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + recovery_vault_id=recovery_vault_id, + source_recovery_fabric_id=source_recovery_fabric_id, + target_recovery_fabric_id=target_recovery_fabric_id, + azure_to_azure_settings=azure_to_azure_settings, + boot_recovery_groups=boot_recovery_groups, + failover_recovery_group=failover_recovery_group, + name=name, + recovery_groups=recovery_groups, + shutdown_recovery_group=shutdown_recovery_group, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recovery_vault_id: Optional[pulumi.Input[str]] = None, + source_recovery_fabric_id: Optional[pulumi.Input[str]] = None, + target_recovery_fabric_id: Optional[pulumi.Input[str]] = None, + azure_to_azure_settings: Optional[pulumi.Input['ReplicationRecoveryPlanAzureToAzureSettingsArgs']] = None, + boot_recovery_groups: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanBootRecoveryGroupArgs']]]] = None, + failover_recovery_group: Optional[pulumi.Input['ReplicationRecoveryPlanFailoverRecoveryGroupArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + recovery_groups: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanRecoveryGroupArgs']]]] = None, + shutdown_recovery_group: Optional[pulumi.Input['ReplicationRecoveryPlanShutdownRecoveryGroupArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recovery_vault_id is None and 'recoveryVaultId' in kwargs: + recovery_vault_id = kwargs['recoveryVaultId'] + if recovery_vault_id is None: + raise TypeError("Missing 'recovery_vault_id' argument") + if source_recovery_fabric_id is None and 'sourceRecoveryFabricId' in kwargs: + source_recovery_fabric_id = kwargs['sourceRecoveryFabricId'] + if source_recovery_fabric_id is None: + raise TypeError("Missing 'source_recovery_fabric_id' argument") + if target_recovery_fabric_id is None and 'targetRecoveryFabricId' in kwargs: + target_recovery_fabric_id = kwargs['targetRecoveryFabricId'] + if target_recovery_fabric_id is None: + raise TypeError("Missing 'target_recovery_fabric_id' argument") + if azure_to_azure_settings is None and 'azureToAzureSettings' in kwargs: + azure_to_azure_settings = kwargs['azureToAzureSettings'] + if boot_recovery_groups is None and 'bootRecoveryGroups' in kwargs: + boot_recovery_groups = kwargs['bootRecoveryGroups'] + if failover_recovery_group is None and 'failoverRecoveryGroup' in kwargs: + failover_recovery_group = kwargs['failoverRecoveryGroup'] + if recovery_groups is None and 'recoveryGroups' in kwargs: + recovery_groups = kwargs['recoveryGroups'] + if shutdown_recovery_group is None and 'shutdownRecoveryGroup' in kwargs: + shutdown_recovery_group = kwargs['shutdownRecoveryGroup'] + + _setter("recovery_vault_id", recovery_vault_id) + _setter("source_recovery_fabric_id", source_recovery_fabric_id) + _setter("target_recovery_fabric_id", target_recovery_fabric_id) if azure_to_azure_settings is not None: - pulumi.set(__self__, "azure_to_azure_settings", azure_to_azure_settings) + _setter("azure_to_azure_settings", azure_to_azure_settings) if boot_recovery_groups is not None: - pulumi.set(__self__, "boot_recovery_groups", boot_recovery_groups) + _setter("boot_recovery_groups", boot_recovery_groups) if failover_recovery_group is not None: - pulumi.set(__self__, "failover_recovery_group", failover_recovery_group) + _setter("failover_recovery_group", failover_recovery_group) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_groups is not None: warnings.warn("""the `recovery_group` block has been deprecated in favour of the `shutdown_recovery_group`, `failover_recovery_group` and `boot_recovery_group` and will be removed in version 4.0 of the provider.""", DeprecationWarning) pulumi.log.warn("""recovery_groups is deprecated: the `recovery_group` block has been deprecated in favour of the `shutdown_recovery_group`, `failover_recovery_group` and `boot_recovery_group` and will be removed in version 4.0 of the provider.""") if recovery_groups is not None: - pulumi.set(__self__, "recovery_groups", recovery_groups) + _setter("recovery_groups", recovery_groups) if shutdown_recovery_group is not None: - pulumi.set(__self__, "shutdown_recovery_group", shutdown_recovery_group) + _setter("shutdown_recovery_group", shutdown_recovery_group) @property @pulumi.getter(name="recoveryVaultId") @@ -216,27 +265,70 @@ def __init__(__self__, *, :param pulumi.Input[str] source_recovery_fabric_id: ID of source fabric to be recovered from. Changing this forces a new Replication Plan to be created. :param pulumi.Input[str] target_recovery_fabric_id: ID of target fabric to recover. Changing this forces a new Replication Plan to be created. """ + _ReplicationRecoveryPlanState._configure( + lambda key, value: pulumi.set(__self__, key, value), + azure_to_azure_settings=azure_to_azure_settings, + boot_recovery_groups=boot_recovery_groups, + failover_recovery_group=failover_recovery_group, + name=name, + recovery_groups=recovery_groups, + recovery_vault_id=recovery_vault_id, + shutdown_recovery_group=shutdown_recovery_group, + source_recovery_fabric_id=source_recovery_fabric_id, + target_recovery_fabric_id=target_recovery_fabric_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azure_to_azure_settings: Optional[pulumi.Input['ReplicationRecoveryPlanAzureToAzureSettingsArgs']] = None, + boot_recovery_groups: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanBootRecoveryGroupArgs']]]] = None, + failover_recovery_group: Optional[pulumi.Input['ReplicationRecoveryPlanFailoverRecoveryGroupArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + recovery_groups: Optional[pulumi.Input[Sequence[pulumi.Input['ReplicationRecoveryPlanRecoveryGroupArgs']]]] = None, + recovery_vault_id: Optional[pulumi.Input[str]] = None, + shutdown_recovery_group: Optional[pulumi.Input['ReplicationRecoveryPlanShutdownRecoveryGroupArgs']] = None, + source_recovery_fabric_id: Optional[pulumi.Input[str]] = None, + target_recovery_fabric_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azure_to_azure_settings is None and 'azureToAzureSettings' in kwargs: + azure_to_azure_settings = kwargs['azureToAzureSettings'] + if boot_recovery_groups is None and 'bootRecoveryGroups' in kwargs: + boot_recovery_groups = kwargs['bootRecoveryGroups'] + if failover_recovery_group is None and 'failoverRecoveryGroup' in kwargs: + failover_recovery_group = kwargs['failoverRecoveryGroup'] + if recovery_groups is None and 'recoveryGroups' in kwargs: + recovery_groups = kwargs['recoveryGroups'] + if recovery_vault_id is None and 'recoveryVaultId' in kwargs: + recovery_vault_id = kwargs['recoveryVaultId'] + if shutdown_recovery_group is None and 'shutdownRecoveryGroup' in kwargs: + shutdown_recovery_group = kwargs['shutdownRecoveryGroup'] + if source_recovery_fabric_id is None and 'sourceRecoveryFabricId' in kwargs: + source_recovery_fabric_id = kwargs['sourceRecoveryFabricId'] + if target_recovery_fabric_id is None and 'targetRecoveryFabricId' in kwargs: + target_recovery_fabric_id = kwargs['targetRecoveryFabricId'] + if azure_to_azure_settings is not None: - pulumi.set(__self__, "azure_to_azure_settings", azure_to_azure_settings) + _setter("azure_to_azure_settings", azure_to_azure_settings) if boot_recovery_groups is not None: - pulumi.set(__self__, "boot_recovery_groups", boot_recovery_groups) + _setter("boot_recovery_groups", boot_recovery_groups) if failover_recovery_group is not None: - pulumi.set(__self__, "failover_recovery_group", failover_recovery_group) + _setter("failover_recovery_group", failover_recovery_group) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_groups is not None: warnings.warn("""the `recovery_group` block has been deprecated in favour of the `shutdown_recovery_group`, `failover_recovery_group` and `boot_recovery_group` and will be removed in version 4.0 of the provider.""", DeprecationWarning) pulumi.log.warn("""recovery_groups is deprecated: the `recovery_group` block has been deprecated in favour of the `shutdown_recovery_group`, `failover_recovery_group` and `boot_recovery_group` and will be removed in version 4.0 of the provider.""") if recovery_groups is not None: - pulumi.set(__self__, "recovery_groups", recovery_groups) + _setter("recovery_groups", recovery_groups) if recovery_vault_id is not None: - pulumi.set(__self__, "recovery_vault_id", recovery_vault_id) + _setter("recovery_vault_id", recovery_vault_id) if shutdown_recovery_group is not None: - pulumi.set(__self__, "shutdown_recovery_group", shutdown_recovery_group) + _setter("shutdown_recovery_group", shutdown_recovery_group) if source_recovery_fabric_id is not None: - pulumi.set(__self__, "source_recovery_fabric_id", source_recovery_fabric_id) + _setter("source_recovery_fabric_id", source_recovery_fabric_id) if target_recovery_fabric_id is not None: - pulumi.set(__self__, "target_recovery_fabric_id", target_recovery_fabric_id) + _setter("target_recovery_fabric_id", target_recovery_fabric_id) @property @pulumi.getter(name="azureToAzureSettings") @@ -731,6 +823,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ReplicationRecoveryPlanArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -754,14 +850,29 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ReplicationRecoveryPlanArgs.__new__(ReplicationRecoveryPlanArgs) + if azure_to_azure_settings is not None and not isinstance(azure_to_azure_settings, ReplicationRecoveryPlanAzureToAzureSettingsArgs): + azure_to_azure_settings = azure_to_azure_settings or {} + def _setter(key, value): + azure_to_azure_settings[key] = value + ReplicationRecoveryPlanAzureToAzureSettingsArgs._configure(_setter, **azure_to_azure_settings) __props__.__dict__["azure_to_azure_settings"] = azure_to_azure_settings __props__.__dict__["boot_recovery_groups"] = boot_recovery_groups + if failover_recovery_group is not None and not isinstance(failover_recovery_group, ReplicationRecoveryPlanFailoverRecoveryGroupArgs): + failover_recovery_group = failover_recovery_group or {} + def _setter(key, value): + failover_recovery_group[key] = value + ReplicationRecoveryPlanFailoverRecoveryGroupArgs._configure(_setter, **failover_recovery_group) __props__.__dict__["failover_recovery_group"] = failover_recovery_group __props__.__dict__["name"] = name __props__.__dict__["recovery_groups"] = recovery_groups if recovery_vault_id is None and not opts.urn: raise TypeError("Missing required property 'recovery_vault_id'") __props__.__dict__["recovery_vault_id"] = recovery_vault_id + if shutdown_recovery_group is not None and not isinstance(shutdown_recovery_group, ReplicationRecoveryPlanShutdownRecoveryGroupArgs): + shutdown_recovery_group = shutdown_recovery_group or {} + def _setter(key, value): + shutdown_recovery_group[key] = value + ReplicationRecoveryPlanShutdownRecoveryGroupArgs._configure(_setter, **shutdown_recovery_group) __props__.__dict__["shutdown_recovery_group"] = shutdown_recovery_group if source_recovery_fabric_id is None and not opts.urn: raise TypeError("Missing required property 'source_recovery_fabric_id'") diff --git a/sdk/python/pulumi_azure/siterecovery/vm_ware_replication_policy.py b/sdk/python/pulumi_azure/siterecovery/vm_ware_replication_policy.py index 77eb17bb46..47a4eaaef7 100644 --- a/sdk/python/pulumi_azure/siterecovery/vm_ware_replication_policy.py +++ b/sdk/python/pulumi_azure/siterecovery/vm_ware_replication_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VMWareReplicationPolicyArgs', 'VMWareReplicationPolicy'] @@ -25,11 +25,40 @@ def __init__(__self__, *, :param pulumi.Input[str] recovery_vault_id: ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created. :param pulumi.Input[str] name: The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created. """ - pulumi.set(__self__, "application_consistent_snapshot_frequency_in_minutes", application_consistent_snapshot_frequency_in_minutes) - pulumi.set(__self__, "recovery_point_retention_in_minutes", recovery_point_retention_in_minutes) - pulumi.set(__self__, "recovery_vault_id", recovery_vault_id) + VMWareReplicationPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_consistent_snapshot_frequency_in_minutes=application_consistent_snapshot_frequency_in_minutes, + recovery_point_retention_in_minutes=recovery_point_retention_in_minutes, + recovery_vault_id=recovery_vault_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_consistent_snapshot_frequency_in_minutes: Optional[pulumi.Input[int]] = None, + recovery_point_retention_in_minutes: Optional[pulumi.Input[int]] = None, + recovery_vault_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_consistent_snapshot_frequency_in_minutes is None and 'applicationConsistentSnapshotFrequencyInMinutes' in kwargs: + application_consistent_snapshot_frequency_in_minutes = kwargs['applicationConsistentSnapshotFrequencyInMinutes'] + if application_consistent_snapshot_frequency_in_minutes is None: + raise TypeError("Missing 'application_consistent_snapshot_frequency_in_minutes' argument") + if recovery_point_retention_in_minutes is None and 'recoveryPointRetentionInMinutes' in kwargs: + recovery_point_retention_in_minutes = kwargs['recoveryPointRetentionInMinutes'] + if recovery_point_retention_in_minutes is None: + raise TypeError("Missing 'recovery_point_retention_in_minutes' argument") + if recovery_vault_id is None and 'recoveryVaultId' in kwargs: + recovery_vault_id = kwargs['recoveryVaultId'] + if recovery_vault_id is None: + raise TypeError("Missing 'recovery_vault_id' argument") + + _setter("application_consistent_snapshot_frequency_in_minutes", application_consistent_snapshot_frequency_in_minutes) + _setter("recovery_point_retention_in_minutes", recovery_point_retention_in_minutes) + _setter("recovery_vault_id", recovery_vault_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="applicationConsistentSnapshotFrequencyInMinutes") @@ -94,14 +123,37 @@ def __init__(__self__, *, :param pulumi.Input[int] recovery_point_retention_in_minutes: Specifies the period up to which the recovery points will be retained. Must between `0` to `21600`. :param pulumi.Input[str] recovery_vault_id: ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created. """ + _VMWareReplicationPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + application_consistent_snapshot_frequency_in_minutes=application_consistent_snapshot_frequency_in_minutes, + name=name, + recovery_point_retention_in_minutes=recovery_point_retention_in_minutes, + recovery_vault_id=recovery_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + application_consistent_snapshot_frequency_in_minutes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + recovery_point_retention_in_minutes: Optional[pulumi.Input[int]] = None, + recovery_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if application_consistent_snapshot_frequency_in_minutes is None and 'applicationConsistentSnapshotFrequencyInMinutes' in kwargs: + application_consistent_snapshot_frequency_in_minutes = kwargs['applicationConsistentSnapshotFrequencyInMinutes'] + if recovery_point_retention_in_minutes is None and 'recoveryPointRetentionInMinutes' in kwargs: + recovery_point_retention_in_minutes = kwargs['recoveryPointRetentionInMinutes'] + if recovery_vault_id is None and 'recoveryVaultId' in kwargs: + recovery_vault_id = kwargs['recoveryVaultId'] + if application_consistent_snapshot_frequency_in_minutes is not None: - pulumi.set(__self__, "application_consistent_snapshot_frequency_in_minutes", application_consistent_snapshot_frequency_in_minutes) + _setter("application_consistent_snapshot_frequency_in_minutes", application_consistent_snapshot_frequency_in_minutes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_point_retention_in_minutes is not None: - pulumi.set(__self__, "recovery_point_retention_in_minutes", recovery_point_retention_in_minutes) + _setter("recovery_point_retention_in_minutes", recovery_point_retention_in_minutes) if recovery_vault_id is not None: - pulumi.set(__self__, "recovery_vault_id", recovery_vault_id) + _setter("recovery_vault_id", recovery_vault_id) @property @pulumi.getter(name="applicationConsistentSnapshotFrequencyInMinutes") @@ -245,6 +297,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VMWareReplicationPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/siterecovery/vmware_replication_policy_association.py b/sdk/python/pulumi_azure/siterecovery/vmware_replication_policy_association.py index 1478d3d47e..dd62d5ed1f 100644 --- a/sdk/python/pulumi_azure/siterecovery/vmware_replication_policy_association.py +++ b/sdk/python/pulumi_azure/siterecovery/vmware_replication_policy_association.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VmwareReplicationPolicyAssociationArgs', 'VmwareReplicationPolicyAssociation'] @@ -26,10 +26,33 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the replication policy association. Changing this forces a new association to be created. """ - pulumi.set(__self__, "policy_id", policy_id) - pulumi.set(__self__, "recovery_vault_id", recovery_vault_id) + VmwareReplicationPolicyAssociationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy_id=policy_id, + recovery_vault_id=recovery_vault_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy_id: Optional[pulumi.Input[str]] = None, + recovery_vault_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_id is None and 'policyId' in kwargs: + policy_id = kwargs['policyId'] + if policy_id is None: + raise TypeError("Missing 'policy_id' argument") + if recovery_vault_id is None and 'recoveryVaultId' in kwargs: + recovery_vault_id = kwargs['recoveryVaultId'] + if recovery_vault_id is None: + raise TypeError("Missing 'recovery_vault_id' argument") + + _setter("policy_id", policy_id) + _setter("recovery_vault_id", recovery_vault_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="policyId") @@ -86,12 +109,31 @@ def __init__(__self__, *, :param pulumi.Input[str] recovery_vault_id: The ID of the Recovery Service Vault to which the policy should be associated. Changing this forces a new association to be created. """ + _VmwareReplicationPolicyAssociationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + policy_id=policy_id, + recovery_vault_id=recovery_vault_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + policy_id: Optional[pulumi.Input[str]] = None, + recovery_vault_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_id is None and 'policyId' in kwargs: + policy_id = kwargs['policyId'] + if recovery_vault_id is None and 'recoveryVaultId' in kwargs: + recovery_vault_id = kwargs['recoveryVaultId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_id is not None: - pulumi.set(__self__, "policy_id", policy_id) + _setter("policy_id", policy_id) if recovery_vault_id is not None: - pulumi.set(__self__, "recovery_vault_id", recovery_vault_id) + _setter("recovery_vault_id", recovery_vault_id) @property @pulumi.getter @@ -229,6 +271,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VmwareReplicationPolicyAssociationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sql/_inputs.py b/sdk/python/pulumi_azure/sql/_inputs.py index 02e8f6b703..9ca8417173 100644 --- a/sdk/python/pulumi_azure/sql/_inputs.py +++ b/sdk/python/pulumi_azure/sql/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -41,14 +41,63 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_uri: Specifies the blob URI of the .bacpac file. :param pulumi.Input[str] operation_mode: Specifies the type of import operation being performed. The only allowable value is `Import`. """ - pulumi.set(__self__, "administrator_login", administrator_login) - pulumi.set(__self__, "administrator_login_password", administrator_login_password) - pulumi.set(__self__, "authentication_type", authentication_type) - pulumi.set(__self__, "storage_key", storage_key) - pulumi.set(__self__, "storage_key_type", storage_key_type) - pulumi.set(__self__, "storage_uri", storage_uri) + DatabaseImportArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + authentication_type=authentication_type, + storage_key=storage_key, + storage_key_type=storage_key_type, + storage_uri=storage_uri, + operation_mode=operation_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + authentication_type: Optional[pulumi.Input[str]] = None, + storage_key: Optional[pulumi.Input[str]] = None, + storage_key_type: Optional[pulumi.Input[str]] = None, + storage_uri: Optional[pulumi.Input[str]] = None, + operation_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login is None: + raise TypeError("Missing 'administrator_login' argument") + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if administrator_login_password is None: + raise TypeError("Missing 'administrator_login_password' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if authentication_type is None: + raise TypeError("Missing 'authentication_type' argument") + if storage_key is None and 'storageKey' in kwargs: + storage_key = kwargs['storageKey'] + if storage_key is None: + raise TypeError("Missing 'storage_key' argument") + if storage_key_type is None and 'storageKeyType' in kwargs: + storage_key_type = kwargs['storageKeyType'] + if storage_key_type is None: + raise TypeError("Missing 'storage_key_type' argument") + if storage_uri is None and 'storageUri' in kwargs: + storage_uri = kwargs['storageUri'] + if storage_uri is None: + raise TypeError("Missing 'storage_uri' argument") + if operation_mode is None and 'operationMode' in kwargs: + operation_mode = kwargs['operationMode'] + + _setter("administrator_login", administrator_login) + _setter("administrator_login_password", administrator_login_password) + _setter("authentication_type", authentication_type) + _setter("storage_key", storage_key) + _setter("storage_key_type", storage_key_type) + _setter("storage_uri", storage_uri) if operation_mode is not None: - pulumi.set(__self__, "operation_mode", operation_mode) + _setter("operation_mode", operation_mode) @property @pulumi.getter(name="administratorLogin") @@ -154,20 +203,55 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. Required if `state` is `Enabled`. :param pulumi.Input[str] storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. Required if `state` is `Enabled`. """ + DatabaseThreatDetectionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins=email_account_admins, + email_addresses=email_addresses, + retention_days=retention_days, + state=state, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_account_admins: Optional[pulumi.Input[str]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + retention_days: Optional[pulumi.Input[int]] = None, + state: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins is None and 'emailAccountAdmins' in kwargs: + email_account_admins = kwargs['emailAccountAdmins'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins is not None: - pulumi.set(__self__, "email_account_admins", email_account_admins) + _setter("email_account_admins", email_account_admins) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") @@ -265,11 +349,28 @@ def __init__(__self__, *, :param pulumi.Input[str] location: the location of the failover group. :param pulumi.Input[str] role: local replication role of the failover group instance. """ - pulumi.set(__self__, "id", id) + FailoverGroupPartnerServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + location=location, + role=role, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("id", id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if role is not None: - pulumi.set(__self__, "role", role) + _setter("role", role) @property @pulumi.getter @@ -317,9 +418,26 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: the failover mode. Possible values are `Manual`, `Automatic` :param pulumi.Input[int] grace_minutes: Applies only if `mode` is `Automatic`. The grace period in minutes before failover with data loss is attempted """ - pulumi.set(__self__, "mode", mode) + FailoverGroupReadWriteEndpointFailoverPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + grace_minutes=grace_minutes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + grace_minutes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if grace_minutes is None and 'graceMinutes' in kwargs: + grace_minutes = kwargs['graceMinutes'] + + _setter("mode", mode) if grace_minutes is not None: - pulumi.set(__self__, "grace_minutes", grace_minutes) + _setter("grace_minutes", grace_minutes) @property @pulumi.getter @@ -353,7 +471,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] mode: Failover policy for the read-only endpoint. Possible values are `Enabled`, and `Disabled` """ - pulumi.set(__self__, "mode", mode) + FailoverGroupReadonlyEndpointFailoverPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + + _setter("mode", mode) @property @pulumi.getter @@ -377,10 +508,23 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created. :param pulumi.Input[str] role: The partner replication role of the SQL Instance Failover Group. """ + ManagedInstanceFailoverGroupPartnerRegionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + role=role, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if role is not None: - pulumi.set(__self__, "role", role) + _setter("role", role) @property @pulumi.getter @@ -416,9 +560,26 @@ def __init__(__self__, *, :param pulumi.Input[str] mode: The failover mode. Possible values are `Manual`, `Automatic` :param pulumi.Input[int] grace_minutes: Applies only if `mode` is `Automatic`. The grace period in minutes before failover with data loss is attempted. """ - pulumi.set(__self__, "mode", mode) + ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + grace_minutes=grace_minutes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[pulumi.Input[str]] = None, + grace_minutes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if grace_minutes is None and 'graceMinutes' in kwargs: + grace_minutes = kwargs['graceMinutes'] + + _setter("mode", mode) if grace_minutes is not None: - pulumi.set(__self__, "grace_minutes", grace_minutes) + _setter("grace_minutes", grace_minutes) @property @pulumi.getter @@ -456,11 +617,32 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance. """ - pulumi.set(__self__, "type", type) + ManagedInstanceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -512,11 +694,32 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Identity of this SQL Server. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Identity of this SQL Server. """ - pulumi.set(__self__, "type", type) + SqlServerIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -576,20 +779,55 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. Required if `state` is `Enabled`. :param pulumi.Input[str] storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. Required if `state` is `Enabled`. """ + SqlServerThreatDetectionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins=email_account_admins, + email_addresses=email_addresses, + retention_days=retention_days, + state=state, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_account_admins: Optional[pulumi.Input[bool]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + retention_days: Optional[pulumi.Input[int]] = None, + state: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins is None and 'emailAccountAdmins' in kwargs: + email_account_admins = kwargs['emailAccountAdmins'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins is not None: - pulumi.set(__self__, "email_account_admins", email_account_admins) + _setter("email_account_admins", email_account_admins) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") diff --git a/sdk/python/pulumi_azure/sql/active_directory_administrator.py b/sdk/python/pulumi_azure/sql/active_directory_administrator.py index 31bb5aad45..b759e1899a 100644 --- a/sdk/python/pulumi_azure/sql/active_directory_administrator.py +++ b/sdk/python/pulumi_azure/sql/active_directory_administrator.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ActiveDirectoryAdministratorArgs', 'ActiveDirectoryAdministrator'] @@ -29,13 +29,54 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The Azure Tenant ID :param pulumi.Input[bool] azuread_authentication_only: Specifies whether only AD Users and administrators can be used to login (`true`) or also local database users (`false`). """ - pulumi.set(__self__, "login", login) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "tenant_id", tenant_id) + ActiveDirectoryAdministratorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + object_id=object_id, + resource_group_name=resource_group_name, + server_name=server_name, + tenant_id=tenant_id, + azuread_authentication_only=azuread_authentication_only, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + azuread_authentication_only: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if azuread_authentication_only is None and 'azureadAuthenticationOnly' in kwargs: + azuread_authentication_only = kwargs['azureadAuthenticationOnly'] + + _setter("login", login) + _setter("object_id", object_id) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("tenant_id", tenant_id) if azuread_authentication_only is not None: - pulumi.set(__self__, "azuread_authentication_only", azuread_authentication_only) + _setter("azuread_authentication_only", azuread_authentication_only) @property @pulumi.getter @@ -128,18 +169,49 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: The name of the SQL Server on which to set the administrator. Changing this forces a new resource to be created. :param pulumi.Input[str] tenant_id: The Azure Tenant ID """ + _ActiveDirectoryAdministratorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + azuread_authentication_only=azuread_authentication_only, + login=login, + object_id=object_id, + resource_group_name=resource_group_name, + server_name=server_name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azuread_authentication_only: Optional[pulumi.Input[bool]] = None, + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azuread_authentication_only is None and 'azureadAuthenticationOnly' in kwargs: + azuread_authentication_only = kwargs['azureadAuthenticationOnly'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if azuread_authentication_only is not None: - pulumi.set(__self__, "azuread_authentication_only", azuread_authentication_only) + _setter("azuread_authentication_only", azuread_authentication_only) if login is not None: - pulumi.set(__self__, "login", login) + _setter("login", login) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="azureadAuthenticationOnly") @@ -321,6 +393,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ActiveDirectoryAdministratorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sql/database.py b/sdk/python/pulumi_azure/sql/database.py index 33c76f5717..3204d323f9 100644 --- a/sdk/python/pulumi_azure/sql/database.py +++ b/sdk/python/pulumi_azure/sql/database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,44 +59,127 @@ def __init__(__self__, *, :param pulumi.Input['DatabaseThreatDetectionPolicyArgs'] threat_detection_policy: Threat detection policy configuration. The `threat_detection_policy` block supports fields documented below. :param pulumi.Input[bool] zone_redundant: Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) + DatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + server_name=server_name, + collation=collation, + create_mode=create_mode, + edition=edition, + elastic_pool_name=elastic_pool_name, + import_=import_, + location=location, + max_size_bytes=max_size_bytes, + max_size_gb=max_size_gb, + name=name, + read_scale=read_scale, + requested_service_objective_id=requested_service_objective_id, + requested_service_objective_name=requested_service_objective_name, + restore_point_in_time=restore_point_in_time, + source_database_deletion_date=source_database_deletion_date, + source_database_id=source_database_id, + tags=tags, + threat_detection_policy=threat_detection_policy, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + edition: Optional[pulumi.Input[str]] = None, + elastic_pool_name: Optional[pulumi.Input[str]] = None, + import_: Optional[pulumi.Input['DatabaseImportArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + max_size_bytes: Optional[pulumi.Input[str]] = None, + max_size_gb: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + read_scale: Optional[pulumi.Input[bool]] = None, + requested_service_objective_id: Optional[pulumi.Input[str]] = None, + requested_service_objective_name: Optional[pulumi.Input[str]] = None, + restore_point_in_time: Optional[pulumi.Input[str]] = None, + source_database_deletion_date: Optional[pulumi.Input[str]] = None, + source_database_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_detection_policy: Optional[pulumi.Input['DatabaseThreatDetectionPolicyArgs']] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if elastic_pool_name is None and 'elasticPoolName' in kwargs: + elastic_pool_name = kwargs['elasticPoolName'] + if import_ is None and 'import' in kwargs: + import_ = kwargs['import'] + if max_size_bytes is None and 'maxSizeBytes' in kwargs: + max_size_bytes = kwargs['maxSizeBytes'] + if max_size_gb is None and 'maxSizeGb' in kwargs: + max_size_gb = kwargs['maxSizeGb'] + if read_scale is None and 'readScale' in kwargs: + read_scale = kwargs['readScale'] + if requested_service_objective_id is None and 'requestedServiceObjectiveId' in kwargs: + requested_service_objective_id = kwargs['requestedServiceObjectiveId'] + if requested_service_objective_name is None and 'requestedServiceObjectiveName' in kwargs: + requested_service_objective_name = kwargs['requestedServiceObjectiveName'] + if restore_point_in_time is None and 'restorePointInTime' in kwargs: + restore_point_in_time = kwargs['restorePointInTime'] + if source_database_deletion_date is None and 'sourceDatabaseDeletionDate' in kwargs: + source_database_deletion_date = kwargs['sourceDatabaseDeletionDate'] + if source_database_id is None and 'sourceDatabaseId' in kwargs: + source_database_id = kwargs['sourceDatabaseId'] + if threat_detection_policy is None and 'threatDetectionPolicy' in kwargs: + threat_detection_policy = kwargs['threatDetectionPolicy'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if edition is not None: - pulumi.set(__self__, "edition", edition) + _setter("edition", edition) if elastic_pool_name is not None: - pulumi.set(__self__, "elastic_pool_name", elastic_pool_name) + _setter("elastic_pool_name", elastic_pool_name) if import_ is not None: - pulumi.set(__self__, "import_", import_) + _setter("import_", import_) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_size_bytes is not None: - pulumi.set(__self__, "max_size_bytes", max_size_bytes) + _setter("max_size_bytes", max_size_bytes) if max_size_gb is not None: - pulumi.set(__self__, "max_size_gb", max_size_gb) + _setter("max_size_gb", max_size_gb) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if read_scale is not None: - pulumi.set(__self__, "read_scale", read_scale) + _setter("read_scale", read_scale) if requested_service_objective_id is not None: - pulumi.set(__self__, "requested_service_objective_id", requested_service_objective_id) + _setter("requested_service_objective_id", requested_service_objective_id) if requested_service_objective_name is not None: - pulumi.set(__self__, "requested_service_objective_name", requested_service_objective_name) + _setter("requested_service_objective_name", requested_service_objective_name) if restore_point_in_time is not None: - pulumi.set(__self__, "restore_point_in_time", restore_point_in_time) + _setter("restore_point_in_time", restore_point_in_time) if source_database_deletion_date is not None: - pulumi.set(__self__, "source_database_deletion_date", source_database_deletion_date) + _setter("source_database_deletion_date", source_database_deletion_date) if source_database_id is not None: - pulumi.set(__self__, "source_database_id", source_database_id) + _setter("source_database_id", source_database_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_detection_policy is not None: - pulumi.set(__self__, "threat_detection_policy", threat_detection_policy) + _setter("threat_detection_policy", threat_detection_policy) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter(name="resourceGroupName") @@ -388,52 +471,141 @@ def __init__(__self__, *, :param pulumi.Input['DatabaseThreatDetectionPolicyArgs'] threat_detection_policy: Threat detection policy configuration. The `threat_detection_policy` block supports fields documented below. :param pulumi.Input[bool] zone_redundant: Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. """ + _DatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + collation=collation, + create_mode=create_mode, + creation_date=creation_date, + default_secondary_location=default_secondary_location, + edition=edition, + elastic_pool_name=elastic_pool_name, + encryption=encryption, + import_=import_, + location=location, + max_size_bytes=max_size_bytes, + max_size_gb=max_size_gb, + name=name, + read_scale=read_scale, + requested_service_objective_id=requested_service_objective_id, + requested_service_objective_name=requested_service_objective_name, + resource_group_name=resource_group_name, + restore_point_in_time=restore_point_in_time, + server_name=server_name, + source_database_deletion_date=source_database_deletion_date, + source_database_id=source_database_id, + tags=tags, + threat_detection_policy=threat_detection_policy, + zone_redundant=zone_redundant, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + collation: Optional[pulumi.Input[str]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + creation_date: Optional[pulumi.Input[str]] = None, + default_secondary_location: Optional[pulumi.Input[str]] = None, + edition: Optional[pulumi.Input[str]] = None, + elastic_pool_name: Optional[pulumi.Input[str]] = None, + encryption: Optional[pulumi.Input[str]] = None, + import_: Optional[pulumi.Input['DatabaseImportArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + max_size_bytes: Optional[pulumi.Input[str]] = None, + max_size_gb: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + read_scale: Optional[pulumi.Input[bool]] = None, + requested_service_objective_id: Optional[pulumi.Input[str]] = None, + requested_service_objective_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + restore_point_in_time: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + source_database_deletion_date: Optional[pulumi.Input[str]] = None, + source_database_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_detection_policy: Optional[pulumi.Input['DatabaseThreatDetectionPolicyArgs']] = None, + zone_redundant: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if creation_date is None and 'creationDate' in kwargs: + creation_date = kwargs['creationDate'] + if default_secondary_location is None and 'defaultSecondaryLocation' in kwargs: + default_secondary_location = kwargs['defaultSecondaryLocation'] + if elastic_pool_name is None and 'elasticPoolName' in kwargs: + elastic_pool_name = kwargs['elasticPoolName'] + if import_ is None and 'import' in kwargs: + import_ = kwargs['import'] + if max_size_bytes is None and 'maxSizeBytes' in kwargs: + max_size_bytes = kwargs['maxSizeBytes'] + if max_size_gb is None and 'maxSizeGb' in kwargs: + max_size_gb = kwargs['maxSizeGb'] + if read_scale is None and 'readScale' in kwargs: + read_scale = kwargs['readScale'] + if requested_service_objective_id is None and 'requestedServiceObjectiveId' in kwargs: + requested_service_objective_id = kwargs['requestedServiceObjectiveId'] + if requested_service_objective_name is None and 'requestedServiceObjectiveName' in kwargs: + requested_service_objective_name = kwargs['requestedServiceObjectiveName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if restore_point_in_time is None and 'restorePointInTime' in kwargs: + restore_point_in_time = kwargs['restorePointInTime'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if source_database_deletion_date is None and 'sourceDatabaseDeletionDate' in kwargs: + source_database_deletion_date = kwargs['sourceDatabaseDeletionDate'] + if source_database_id is None and 'sourceDatabaseId' in kwargs: + source_database_id = kwargs['sourceDatabaseId'] + if threat_detection_policy is None and 'threatDetectionPolicy' in kwargs: + threat_detection_policy = kwargs['threatDetectionPolicy'] + if zone_redundant is None and 'zoneRedundant' in kwargs: + zone_redundant = kwargs['zoneRedundant'] + if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if creation_date is not None: - pulumi.set(__self__, "creation_date", creation_date) + _setter("creation_date", creation_date) if default_secondary_location is not None: - pulumi.set(__self__, "default_secondary_location", default_secondary_location) + _setter("default_secondary_location", default_secondary_location) if edition is not None: - pulumi.set(__self__, "edition", edition) + _setter("edition", edition) if elastic_pool_name is not None: - pulumi.set(__self__, "elastic_pool_name", elastic_pool_name) + _setter("elastic_pool_name", elastic_pool_name) if encryption is not None: - pulumi.set(__self__, "encryption", encryption) + _setter("encryption", encryption) if import_ is not None: - pulumi.set(__self__, "import_", import_) + _setter("import_", import_) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if max_size_bytes is not None: - pulumi.set(__self__, "max_size_bytes", max_size_bytes) + _setter("max_size_bytes", max_size_bytes) if max_size_gb is not None: - pulumi.set(__self__, "max_size_gb", max_size_gb) + _setter("max_size_gb", max_size_gb) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if read_scale is not None: - pulumi.set(__self__, "read_scale", read_scale) + _setter("read_scale", read_scale) if requested_service_objective_id is not None: - pulumi.set(__self__, "requested_service_objective_id", requested_service_objective_id) + _setter("requested_service_objective_id", requested_service_objective_id) if requested_service_objective_name is not None: - pulumi.set(__self__, "requested_service_objective_name", requested_service_objective_name) + _setter("requested_service_objective_name", requested_service_objective_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if restore_point_in_time is not None: - pulumi.set(__self__, "restore_point_in_time", restore_point_in_time) + _setter("restore_point_in_time", restore_point_in_time) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if source_database_deletion_date is not None: - pulumi.set(__self__, "source_database_deletion_date", source_database_deletion_date) + _setter("source_database_deletion_date", source_database_deletion_date) if source_database_id is not None: - pulumi.set(__self__, "source_database_id", source_database_id) + _setter("source_database_id", source_database_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_detection_policy is not None: - pulumi.set(__self__, "threat_detection_policy", threat_detection_policy) + _setter("threat_detection_policy", threat_detection_policy) if zone_redundant is not None: - pulumi.set(__self__, "zone_redundant", zone_redundant) + _setter("zone_redundant", zone_redundant) @property @pulumi.getter @@ -858,6 +1030,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -896,6 +1072,11 @@ def _internal_init(__self__, __props__.__dict__["create_mode"] = create_mode __props__.__dict__["edition"] = edition __props__.__dict__["elastic_pool_name"] = elastic_pool_name + if import_ is not None and not isinstance(import_, DatabaseImportArgs): + import_ = import_ or {} + def _setter(key, value): + import_[key] = value + DatabaseImportArgs._configure(_setter, **import_) __props__.__dict__["import_"] = import_ __props__.__dict__["location"] = location __props__.__dict__["max_size_bytes"] = max_size_bytes @@ -914,6 +1095,11 @@ def _internal_init(__self__, __props__.__dict__["source_database_deletion_date"] = source_database_deletion_date __props__.__dict__["source_database_id"] = source_database_id __props__.__dict__["tags"] = tags + if threat_detection_policy is not None and not isinstance(threat_detection_policy, DatabaseThreatDetectionPolicyArgs): + threat_detection_policy = threat_detection_policy or {} + def _setter(key, value): + threat_detection_policy[key] = value + DatabaseThreatDetectionPolicyArgs._configure(_setter, **threat_detection_policy) __props__.__dict__["threat_detection_policy"] = threat_detection_policy __props__.__dict__["zone_redundant"] = zone_redundant __props__.__dict__["creation_date"] = None diff --git a/sdk/python/pulumi_azure/sql/elastic_pool.py b/sdk/python/pulumi_azure/sql/elastic_pool.py index da4462ba7e..23cb6390a3 100644 --- a/sdk/python/pulumi_azure/sql/elastic_pool.py +++ b/sdk/python/pulumi_azure/sql/elastic_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ElasticPoolArgs', 'ElasticPool'] @@ -37,22 +37,69 @@ def __init__(__self__, *, :param pulumi.Input[int] pool_size: The maximum size in MB that all databases in the elastic pool can grow to. The maximum size must be consistent with combination of `edition` and `dtu` and the limits documented in [Azure SQL Database Service Tiers](https://docs.microsoft.com/en-gb/azure/sql-database/sql-database-service-tiers#elastic-pool-service-tiers-and-performance-in-edtus). If not defined when creating an elastic pool, the value is set to the size implied by `edition` and `dtu`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "dtu", dtu) - pulumi.set(__self__, "edition", edition) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) + ElasticPoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dtu=dtu, + edition=edition, + resource_group_name=resource_group_name, + server_name=server_name, + db_dtu_max=db_dtu_max, + db_dtu_min=db_dtu_min, + location=location, + name=name, + pool_size=pool_size, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dtu: Optional[pulumi.Input[int]] = None, + edition: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + db_dtu_max: Optional[pulumi.Input[int]] = None, + db_dtu_min: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + pool_size: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dtu is None: + raise TypeError("Missing 'dtu' argument") + if edition is None: + raise TypeError("Missing 'edition' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if db_dtu_max is None and 'dbDtuMax' in kwargs: + db_dtu_max = kwargs['dbDtuMax'] + if db_dtu_min is None and 'dbDtuMin' in kwargs: + db_dtu_min = kwargs['dbDtuMin'] + if pool_size is None and 'poolSize' in kwargs: + pool_size = kwargs['poolSize'] + + _setter("dtu", dtu) + _setter("edition", edition) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) if db_dtu_max is not None: - pulumi.set(__self__, "db_dtu_max", db_dtu_max) + _setter("db_dtu_max", db_dtu_max) if db_dtu_min is not None: - pulumi.set(__self__, "db_dtu_min", db_dtu_min) + _setter("db_dtu_min", db_dtu_min) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pool_size is not None: - pulumi.set(__self__, "pool_size", pool_size) + _setter("pool_size", pool_size) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -203,28 +250,71 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _ElasticPoolState._configure( + lambda key, value: pulumi.set(__self__, key, value), + creation_date=creation_date, + db_dtu_max=db_dtu_max, + db_dtu_min=db_dtu_min, + dtu=dtu, + edition=edition, + location=location, + name=name, + pool_size=pool_size, + resource_group_name=resource_group_name, + server_name=server_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + creation_date: Optional[pulumi.Input[str]] = None, + db_dtu_max: Optional[pulumi.Input[int]] = None, + db_dtu_min: Optional[pulumi.Input[int]] = None, + dtu: Optional[pulumi.Input[int]] = None, + edition: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + pool_size: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if creation_date is None and 'creationDate' in kwargs: + creation_date = kwargs['creationDate'] + if db_dtu_max is None and 'dbDtuMax' in kwargs: + db_dtu_max = kwargs['dbDtuMax'] + if db_dtu_min is None and 'dbDtuMin' in kwargs: + db_dtu_min = kwargs['dbDtuMin'] + if pool_size is None and 'poolSize' in kwargs: + pool_size = kwargs['poolSize'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if creation_date is not None: - pulumi.set(__self__, "creation_date", creation_date) + _setter("creation_date", creation_date) if db_dtu_max is not None: - pulumi.set(__self__, "db_dtu_max", db_dtu_max) + _setter("db_dtu_max", db_dtu_max) if db_dtu_min is not None: - pulumi.set(__self__, "db_dtu_min", db_dtu_min) + _setter("db_dtu_min", db_dtu_min) if dtu is not None: - pulumi.set(__self__, "dtu", dtu) + _setter("dtu", dtu) if edition is not None: - pulumi.set(__self__, "edition", edition) + _setter("edition", edition) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if pool_size is not None: - pulumi.set(__self__, "pool_size", pool_size) + _setter("pool_size", pool_size) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="creationDate") @@ -482,6 +572,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ElasticPoolArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sql/failover_group.py b/sdk/python/pulumi_azure/sql/failover_group.py index 07bf431541..7527053866 100644 --- a/sdk/python/pulumi_azure/sql/failover_group.py +++ b/sdk/python/pulumi_azure/sql/failover_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,18 +37,61 @@ def __init__(__self__, *, :param pulumi.Input['FailoverGroupReadonlyEndpointFailoverPolicyArgs'] readonly_endpoint_failover_policy: a read-only policy as documented below :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "partner_servers", partner_servers) - pulumi.set(__self__, "read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) + FailoverGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + partner_servers=partner_servers, + read_write_endpoint_failover_policy=read_write_endpoint_failover_policy, + resource_group_name=resource_group_name, + server_name=server_name, + databases=databases, + name=name, + readonly_endpoint_failover_policy=readonly_endpoint_failover_policy, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + partner_servers: Optional[pulumi.Input[Sequence[pulumi.Input['FailoverGroupPartnerServerArgs']]]] = None, + read_write_endpoint_failover_policy: Optional[pulumi.Input['FailoverGroupReadWriteEndpointFailoverPolicyArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + databases: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + readonly_endpoint_failover_policy: Optional[pulumi.Input['FailoverGroupReadonlyEndpointFailoverPolicyArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if partner_servers is None and 'partnerServers' in kwargs: + partner_servers = kwargs['partnerServers'] + if partner_servers is None: + raise TypeError("Missing 'partner_servers' argument") + if read_write_endpoint_failover_policy is None and 'readWriteEndpointFailoverPolicy' in kwargs: + read_write_endpoint_failover_policy = kwargs['readWriteEndpointFailoverPolicy'] + if read_write_endpoint_failover_policy is None: + raise TypeError("Missing 'read_write_endpoint_failover_policy' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if readonly_endpoint_failover_policy is None and 'readonlyEndpointFailoverPolicy' in kwargs: + readonly_endpoint_failover_policy = kwargs['readonlyEndpointFailoverPolicy'] + + _setter("partner_servers", partner_servers) + _setter("read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) if databases is not None: - pulumi.set(__self__, "databases", databases) + _setter("databases", databases) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if readonly_endpoint_failover_policy is not None: - pulumi.set(__self__, "readonly_endpoint_failover_policy", readonly_endpoint_failover_policy) + _setter("readonly_endpoint_failover_policy", readonly_endpoint_failover_policy) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="partnerServers") @@ -177,26 +220,65 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: The name of the primary SQL server. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _FailoverGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + databases=databases, + location=location, + name=name, + partner_servers=partner_servers, + read_write_endpoint_failover_policy=read_write_endpoint_failover_policy, + readonly_endpoint_failover_policy=readonly_endpoint_failover_policy, + resource_group_name=resource_group_name, + role=role, + server_name=server_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + databases: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partner_servers: Optional[pulumi.Input[Sequence[pulumi.Input['FailoverGroupPartnerServerArgs']]]] = None, + read_write_endpoint_failover_policy: Optional[pulumi.Input['FailoverGroupReadWriteEndpointFailoverPolicyArgs']] = None, + readonly_endpoint_failover_policy: Optional[pulumi.Input['FailoverGroupReadonlyEndpointFailoverPolicyArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if partner_servers is None and 'partnerServers' in kwargs: + partner_servers = kwargs['partnerServers'] + if read_write_endpoint_failover_policy is None and 'readWriteEndpointFailoverPolicy' in kwargs: + read_write_endpoint_failover_policy = kwargs['readWriteEndpointFailoverPolicy'] + if readonly_endpoint_failover_policy is None and 'readonlyEndpointFailoverPolicy' in kwargs: + readonly_endpoint_failover_policy = kwargs['readonlyEndpointFailoverPolicy'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if databases is not None: - pulumi.set(__self__, "databases", databases) + _setter("databases", databases) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partner_servers is not None: - pulumi.set(__self__, "partner_servers", partner_servers) + _setter("partner_servers", partner_servers) if read_write_endpoint_failover_policy is not None: - pulumi.set(__self__, "read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) + _setter("read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) if readonly_endpoint_failover_policy is not None: - pulumi.set(__self__, "readonly_endpoint_failover_policy", readonly_endpoint_failover_policy) + _setter("readonly_endpoint_failover_policy", readonly_endpoint_failover_policy) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if role is not None: - pulumi.set(__self__, "role", role) + _setter("role", role) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -462,6 +544,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FailoverGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -489,9 +575,19 @@ def _internal_init(__self__, if partner_servers is None and not opts.urn: raise TypeError("Missing required property 'partner_servers'") __props__.__dict__["partner_servers"] = partner_servers + if read_write_endpoint_failover_policy is not None and not isinstance(read_write_endpoint_failover_policy, FailoverGroupReadWriteEndpointFailoverPolicyArgs): + read_write_endpoint_failover_policy = read_write_endpoint_failover_policy or {} + def _setter(key, value): + read_write_endpoint_failover_policy[key] = value + FailoverGroupReadWriteEndpointFailoverPolicyArgs._configure(_setter, **read_write_endpoint_failover_policy) if read_write_endpoint_failover_policy is None and not opts.urn: raise TypeError("Missing required property 'read_write_endpoint_failover_policy'") __props__.__dict__["read_write_endpoint_failover_policy"] = read_write_endpoint_failover_policy + if readonly_endpoint_failover_policy is not None and not isinstance(readonly_endpoint_failover_policy, FailoverGroupReadonlyEndpointFailoverPolicyArgs): + readonly_endpoint_failover_policy = readonly_endpoint_failover_policy or {} + def _setter(key, value): + readonly_endpoint_failover_policy[key] = value + FailoverGroupReadonlyEndpointFailoverPolicyArgs._configure(_setter, **readonly_endpoint_failover_policy) __props__.__dict__["readonly_endpoint_failover_policy"] = readonly_endpoint_failover_policy if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") diff --git a/sdk/python/pulumi_azure/sql/firewall_rule.py b/sdk/python/pulumi_azure/sql/firewall_rule.py index f869761ce3..a8b810111f 100644 --- a/sdk/python/pulumi_azure/sql/firewall_rule.py +++ b/sdk/python/pulumi_azure/sql/firewall_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FirewallRuleArgs', 'FirewallRule'] @@ -29,12 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] start_ip_address: The starting IP address to allow through the firewall for this rule. :param pulumi.Input[str] name: The name of the firewall rule. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "end_ip_address", end_ip_address) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "start_ip_address", start_ip_address) + FirewallRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + resource_group_name=resource_group_name, + server_name=server_name, + start_ip_address=start_ip_address, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if end_ip_address is None: + raise TypeError("Missing 'end_ip_address' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if start_ip_address is None: + raise TypeError("Missing 'start_ip_address' argument") + + _setter("end_ip_address", end_ip_address) + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("start_ip_address", start_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="endIpAddress") @@ -117,16 +152,43 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: The name of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created. :param pulumi.Input[str] start_ip_address: The starting IP address to allow through the firewall for this rule. """ + _FirewallRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + start_ip_address=start_ip_address, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if end_ip_address is not None: - pulumi.set(__self__, "end_ip_address", end_ip_address) + _setter("end_ip_address", end_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if start_ip_address is not None: - pulumi.set(__self__, "start_ip_address", start_ip_address) + _setter("start_ip_address", start_ip_address) @property @pulumi.getter(name="endIpAddress") @@ -294,6 +356,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sql/get_database.py b/sdk/python/pulumi_azure/sql/get_database.py index 01ade4d745..db2d4d8b83 100644 --- a/sdk/python/pulumi_azure/sql/get_database.py +++ b/sdk/python/pulumi_azure/sql/get_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/sql/get_server.py b/sdk/python/pulumi_azure/sql/get_server.py index bedbbebc61..39fc54cc68 100644 --- a/sdk/python/pulumi_azure/sql/get_server.py +++ b/sdk/python/pulumi_azure/sql/get_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/sql/get_sql_managed_instance.py b/sdk/python/pulumi_azure/sql/get_sql_managed_instance.py index e93a3d5aa1..bc05a3f1f1 100644 --- a/sdk/python/pulumi_azure/sql/get_sql_managed_instance.py +++ b/sdk/python/pulumi_azure/sql/get_sql_managed_instance.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/sql/managed_database.py b/sdk/python/pulumi_azure/sql/managed_database.py index 7aead15759..0d0a1dc79b 100644 --- a/sdk/python/pulumi_azure/sql/managed_database.py +++ b/sdk/python/pulumi_azure/sql/managed_database.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManagedDatabaseArgs', 'ManagedDatabase'] @@ -23,11 +23,30 @@ def __init__(__self__, *, :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the SQL Managed Instance. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "sql_managed_instance_id", sql_managed_instance_id) + ManagedDatabaseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + sql_managed_instance_id=sql_managed_instance_id, + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sql_managed_instance_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sql_managed_instance_id is None and 'sqlManagedInstanceId' in kwargs: + sql_managed_instance_id = kwargs['sqlManagedInstanceId'] + if sql_managed_instance_id is None: + raise TypeError("Missing 'sql_managed_instance_id' argument") + + _setter("sql_managed_instance_id", sql_managed_instance_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="sqlManagedInstanceId") @@ -78,12 +97,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the SQL Managed Instance. Changing this forces a new resource to be created. :param pulumi.Input[str] sql_managed_instance_id: The SQL Managed Instance ID that this Managed Database will be associated with. Changing this forces a new resource to be created. """ + _ManagedDatabaseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + sql_managed_instance_id=sql_managed_instance_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sql_managed_instance_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sql_managed_instance_id is None and 'sqlManagedInstanceId' in kwargs: + sql_managed_instance_id = kwargs['sqlManagedInstanceId'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sql_managed_instance_id is not None: - pulumi.set(__self__, "sql_managed_instance_id", sql_managed_instance_id) + _setter("sql_managed_instance_id", sql_managed_instance_id) @property @pulumi.getter @@ -239,6 +275,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedDatabaseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sql/managed_instance.py b/sdk/python/pulumi_azure/sql/managed_instance.py index eb9db493e6..a054fce749 100644 --- a/sdk/python/pulumi_azure/sql/managed_instance.py +++ b/sdk/python/pulumi_azure/sql/managed_instance.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -57,36 +57,125 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[str] timezone_id: The TimeZone ID that the SQL Managed Instance will be operating in. Default value is `UTC`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "administrator_login", administrator_login) - pulumi.set(__self__, "administrator_login_password", administrator_login_password) - pulumi.set(__self__, "license_type", license_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "storage_size_in_gb", storage_size_in_gb) - pulumi.set(__self__, "subnet_id", subnet_id) - pulumi.set(__self__, "vcores", vcores) + ManagedInstanceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + license_type=license_type, + resource_group_name=resource_group_name, + sku_name=sku_name, + storage_size_in_gb=storage_size_in_gb, + subnet_id=subnet_id, + vcores=vcores, + collation=collation, + dns_zone_partner_id=dns_zone_partner_id, + identity=identity, + location=location, + minimum_tls_version=minimum_tls_version, + name=name, + proxy_override=proxy_override, + public_data_endpoint_enabled=public_data_endpoint_enabled, + storage_account_type=storage_account_type, + tags=tags, + timezone_id=timezone_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + license_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storage_size_in_gb: Optional[pulumi.Input[int]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + vcores: Optional[pulumi.Input[int]] = None, + collation: Optional[pulumi.Input[str]] = None, + dns_zone_partner_id: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ManagedInstanceIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + proxy_override: Optional[pulumi.Input[str]] = None, + public_data_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timezone_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login is None: + raise TypeError("Missing 'administrator_login' argument") + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if administrator_login_password is None: + raise TypeError("Missing 'administrator_login_password' argument") + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if license_type is None: + raise TypeError("Missing 'license_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if storage_size_in_gb is None and 'storageSizeInGb' in kwargs: + storage_size_in_gb = kwargs['storageSizeInGb'] + if storage_size_in_gb is None: + raise TypeError("Missing 'storage_size_in_gb' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if vcores is None: + raise TypeError("Missing 'vcores' argument") + if dns_zone_partner_id is None and 'dnsZonePartnerId' in kwargs: + dns_zone_partner_id = kwargs['dnsZonePartnerId'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if proxy_override is None and 'proxyOverride' in kwargs: + proxy_override = kwargs['proxyOverride'] + if public_data_endpoint_enabled is None and 'publicDataEndpointEnabled' in kwargs: + public_data_endpoint_enabled = kwargs['publicDataEndpointEnabled'] + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if timezone_id is None and 'timezoneId' in kwargs: + timezone_id = kwargs['timezoneId'] + + _setter("administrator_login", administrator_login) + _setter("administrator_login_password", administrator_login_password) + _setter("license_type", license_type) + _setter("resource_group_name", resource_group_name) + _setter("sku_name", sku_name) + _setter("storage_size_in_gb", storage_size_in_gb) + _setter("subnet_id", subnet_id) + _setter("vcores", vcores) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if dns_zone_partner_id is not None: - pulumi.set(__self__, "dns_zone_partner_id", dns_zone_partner_id) + _setter("dns_zone_partner_id", dns_zone_partner_id) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if proxy_override is not None: - pulumi.set(__self__, "proxy_override", proxy_override) + _setter("proxy_override", proxy_override) if public_data_endpoint_enabled is not None: - pulumi.set(__self__, "public_data_endpoint_enabled", public_data_endpoint_enabled) + _setter("public_data_endpoint_enabled", public_data_endpoint_enabled) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timezone_id is not None: - pulumi.set(__self__, "timezone_id", timezone_id) + _setter("timezone_id", timezone_id) @property @pulumi.getter(name="administratorLogin") @@ -363,46 +452,121 @@ def __init__(__self__, *, :param pulumi.Input[str] timezone_id: The TimeZone ID that the SQL Managed Instance will be operating in. Default value is `UTC`. Changing this forces a new resource to be created. :param pulumi.Input[int] vcores: Number of cores that should be assigned to your instance. Values can be `8`, `16`, or `24` if `sku_name` is `GP_Gen4`, or `8`, `16`, `24`, `32`, or `40` if `sku_name` is `GP_Gen5`. """ + _ManagedInstanceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + collation=collation, + dns_zone_partner_id=dns_zone_partner_id, + fqdn=fqdn, + identity=identity, + license_type=license_type, + location=location, + minimum_tls_version=minimum_tls_version, + name=name, + proxy_override=proxy_override, + public_data_endpoint_enabled=public_data_endpoint_enabled, + resource_group_name=resource_group_name, + sku_name=sku_name, + storage_account_type=storage_account_type, + storage_size_in_gb=storage_size_in_gb, + subnet_id=subnet_id, + tags=tags, + timezone_id=timezone_id, + vcores=vcores, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + dns_zone_partner_id: Optional[pulumi.Input[str]] = None, + fqdn: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ManagedInstanceIdentityArgs']] = None, + license_type: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + minimum_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + proxy_override: Optional[pulumi.Input[str]] = None, + public_data_endpoint_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + storage_size_in_gb: Optional[pulumi.Input[int]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timezone_id: Optional[pulumi.Input[str]] = None, + vcores: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if dns_zone_partner_id is None and 'dnsZonePartnerId' in kwargs: + dns_zone_partner_id = kwargs['dnsZonePartnerId'] + if license_type is None and 'licenseType' in kwargs: + license_type = kwargs['licenseType'] + if minimum_tls_version is None and 'minimumTlsVersion' in kwargs: + minimum_tls_version = kwargs['minimumTlsVersion'] + if proxy_override is None and 'proxyOverride' in kwargs: + proxy_override = kwargs['proxyOverride'] + if public_data_endpoint_enabled is None and 'publicDataEndpointEnabled' in kwargs: + public_data_endpoint_enabled = kwargs['publicDataEndpointEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if storage_size_in_gb is None and 'storageSizeInGb' in kwargs: + storage_size_in_gb = kwargs['storageSizeInGb'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if timezone_id is None and 'timezoneId' in kwargs: + timezone_id = kwargs['timezoneId'] + if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_login_password is not None: - pulumi.set(__self__, "administrator_login_password", administrator_login_password) + _setter("administrator_login_password", administrator_login_password) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if dns_zone_partner_id is not None: - pulumi.set(__self__, "dns_zone_partner_id", dns_zone_partner_id) + _setter("dns_zone_partner_id", dns_zone_partner_id) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if license_type is not None: - pulumi.set(__self__, "license_type", license_type) + _setter("license_type", license_type) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if minimum_tls_version is not None: - pulumi.set(__self__, "minimum_tls_version", minimum_tls_version) + _setter("minimum_tls_version", minimum_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if proxy_override is not None: - pulumi.set(__self__, "proxy_override", proxy_override) + _setter("proxy_override", proxy_override) if public_data_endpoint_enabled is not None: - pulumi.set(__self__, "public_data_endpoint_enabled", public_data_endpoint_enabled) + _setter("public_data_endpoint_enabled", public_data_endpoint_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) if storage_size_in_gb is not None: - pulumi.set(__self__, "storage_size_in_gb", storage_size_in_gb) + _setter("storage_size_in_gb", storage_size_in_gb) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if timezone_id is not None: - pulumi.set(__self__, "timezone_id", timezone_id) + _setter("timezone_id", timezone_id) if vcores is not None: - pulumi.set(__self__, "vcores", vcores) + _setter("vcores", vcores) @property @pulumi.getter(name="administratorLogin") @@ -1046,6 +1210,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedInstanceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1087,6 +1255,11 @@ def _internal_init(__self__, __props__.__dict__["administrator_login_password"] = None if administrator_login_password is None else pulumi.Output.secret(administrator_login_password) __props__.__dict__["collation"] = collation __props__.__dict__["dns_zone_partner_id"] = dns_zone_partner_id + if identity is not None and not isinstance(identity, ManagedInstanceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ManagedInstanceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity if license_type is None and not opts.urn: raise TypeError("Missing required property 'license_type'") diff --git a/sdk/python/pulumi_azure/sql/managed_instance_active_directory_administrator.py b/sdk/python/pulumi_azure/sql/managed_instance_active_directory_administrator.py index c1b91e166e..c97c2b89a4 100644 --- a/sdk/python/pulumi_azure/sql/managed_instance_active_directory_administrator.py +++ b/sdk/python/pulumi_azure/sql/managed_instance_active_directory_administrator.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManagedInstanceActiveDirectoryAdministratorArgs', 'ManagedInstanceActiveDirectoryAdministrator'] @@ -29,13 +29,54 @@ def __init__(__self__, *, :param pulumi.Input[str] tenant_id: The Azure Tenant ID :param pulumi.Input[bool] azuread_authentication_only: Specifies whether only AD Users and administrators can be used to login (`true`) or also local database users (`false`). Defaults to `false`. """ - pulumi.set(__self__, "login", login) - pulumi.set(__self__, "managed_instance_name", managed_instance_name) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "tenant_id", tenant_id) + ManagedInstanceActiveDirectoryAdministratorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + managed_instance_name=managed_instance_name, + object_id=object_id, + resource_group_name=resource_group_name, + tenant_id=tenant_id, + azuread_authentication_only=azuread_authentication_only, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input[str]] = None, + managed_instance_name: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + azuread_authentication_only: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if managed_instance_name is None and 'managedInstanceName' in kwargs: + managed_instance_name = kwargs['managedInstanceName'] + if managed_instance_name is None: + raise TypeError("Missing 'managed_instance_name' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if azuread_authentication_only is None and 'azureadAuthenticationOnly' in kwargs: + azuread_authentication_only = kwargs['azureadAuthenticationOnly'] + + _setter("login", login) + _setter("managed_instance_name", managed_instance_name) + _setter("object_id", object_id) + _setter("resource_group_name", resource_group_name) + _setter("tenant_id", tenant_id) if azuread_authentication_only is not None: - pulumi.set(__self__, "azuread_authentication_only", azuread_authentication_only) + _setter("azuread_authentication_only", azuread_authentication_only) @property @pulumi.getter @@ -128,18 +169,49 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group for the SQL Managed Instance. Changing this forces a new resource to be created. :param pulumi.Input[str] tenant_id: The Azure Tenant ID """ + _ManagedInstanceActiveDirectoryAdministratorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + azuread_authentication_only=azuread_authentication_only, + login=login, + managed_instance_name=managed_instance_name, + object_id=object_id, + resource_group_name=resource_group_name, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + azuread_authentication_only: Optional[pulumi.Input[bool]] = None, + login: Optional[pulumi.Input[str]] = None, + managed_instance_name: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if azuread_authentication_only is None and 'azureadAuthenticationOnly' in kwargs: + azuread_authentication_only = kwargs['azureadAuthenticationOnly'] + if managed_instance_name is None and 'managedInstanceName' in kwargs: + managed_instance_name = kwargs['managedInstanceName'] + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if azuread_authentication_only is not None: - pulumi.set(__self__, "azuread_authentication_only", azuread_authentication_only) + _setter("azuread_authentication_only", azuread_authentication_only) if login is not None: - pulumi.set(__self__, "login", login) + _setter("login", login) if managed_instance_name is not None: - pulumi.set(__self__, "managed_instance_name", managed_instance_name) + _setter("managed_instance_name", managed_instance_name) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="azureadAuthenticationOnly") @@ -337,6 +409,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedInstanceActiveDirectoryAdministratorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/sql/managed_instance_failover_group.py b/sdk/python/pulumi_azure/sql/managed_instance_failover_group.py index daf73bb039..ca709918be 100644 --- a/sdk/python/pulumi_azure/sql/managed_instance_failover_group.py +++ b/sdk/python/pulumi_azure/sql/managed_instance_failover_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,16 +33,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this SQL Instance Failover Group. Changing this forces a new SQL Instance Failover Group to be created. :param pulumi.Input[bool] readonly_endpoint_failover_policy_enabled: Failover policy for the read-only endpoint. Defaults to `true`. """ - pulumi.set(__self__, "managed_instance_name", managed_instance_name) - pulumi.set(__self__, "partner_managed_instance_id", partner_managed_instance_id) - pulumi.set(__self__, "read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) - pulumi.set(__self__, "resource_group_name", resource_group_name) + ManagedInstanceFailoverGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_instance_name=managed_instance_name, + partner_managed_instance_id=partner_managed_instance_id, + read_write_endpoint_failover_policy=read_write_endpoint_failover_policy, + resource_group_name=resource_group_name, + location=location, + name=name, + readonly_endpoint_failover_policy_enabled=readonly_endpoint_failover_policy_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_instance_name: Optional[pulumi.Input[str]] = None, + partner_managed_instance_id: Optional[pulumi.Input[str]] = None, + read_write_endpoint_failover_policy: Optional[pulumi.Input['ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + readonly_endpoint_failover_policy_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_instance_name is None and 'managedInstanceName' in kwargs: + managed_instance_name = kwargs['managedInstanceName'] + if managed_instance_name is None: + raise TypeError("Missing 'managed_instance_name' argument") + if partner_managed_instance_id is None and 'partnerManagedInstanceId' in kwargs: + partner_managed_instance_id = kwargs['partnerManagedInstanceId'] + if partner_managed_instance_id is None: + raise TypeError("Missing 'partner_managed_instance_id' argument") + if read_write_endpoint_failover_policy is None and 'readWriteEndpointFailoverPolicy' in kwargs: + read_write_endpoint_failover_policy = kwargs['readWriteEndpointFailoverPolicy'] + if read_write_endpoint_failover_policy is None: + raise TypeError("Missing 'read_write_endpoint_failover_policy' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if readonly_endpoint_failover_policy_enabled is None and 'readonlyEndpointFailoverPolicyEnabled' in kwargs: + readonly_endpoint_failover_policy_enabled = kwargs['readonlyEndpointFailoverPolicyEnabled'] + + _setter("managed_instance_name", managed_instance_name) + _setter("partner_managed_instance_id", partner_managed_instance_id) + _setter("read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if readonly_endpoint_failover_policy_enabled is not None: - pulumi.set(__self__, "readonly_endpoint_failover_policy_enabled", readonly_endpoint_failover_policy_enabled) + _setter("readonly_endpoint_failover_policy_enabled", readonly_endpoint_failover_policy_enabled) @property @pulumi.getter(name="managedInstanceName") @@ -153,24 +194,63 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the SQL Instance Failover Group should exist. Changing this forces a new SQL Instance Failover Group to be created. :param pulumi.Input[str] role: The partner replication role of the SQL Instance Failover Group. """ + _ManagedInstanceFailoverGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + managed_instance_name=managed_instance_name, + name=name, + partner_managed_instance_id=partner_managed_instance_id, + partner_regions=partner_regions, + read_write_endpoint_failover_policy=read_write_endpoint_failover_policy, + readonly_endpoint_failover_policy_enabled=readonly_endpoint_failover_policy_enabled, + resource_group_name=resource_group_name, + role=role, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + managed_instance_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partner_managed_instance_id: Optional[pulumi.Input[str]] = None, + partner_regions: Optional[pulumi.Input[Sequence[pulumi.Input['ManagedInstanceFailoverGroupPartnerRegionArgs']]]] = None, + read_write_endpoint_failover_policy: Optional[pulumi.Input['ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs']] = None, + readonly_endpoint_failover_policy_enabled: Optional[pulumi.Input[bool]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_instance_name is None and 'managedInstanceName' in kwargs: + managed_instance_name = kwargs['managedInstanceName'] + if partner_managed_instance_id is None and 'partnerManagedInstanceId' in kwargs: + partner_managed_instance_id = kwargs['partnerManagedInstanceId'] + if partner_regions is None and 'partnerRegions' in kwargs: + partner_regions = kwargs['partnerRegions'] + if read_write_endpoint_failover_policy is None and 'readWriteEndpointFailoverPolicy' in kwargs: + read_write_endpoint_failover_policy = kwargs['readWriteEndpointFailoverPolicy'] + if readonly_endpoint_failover_policy_enabled is None and 'readonlyEndpointFailoverPolicyEnabled' in kwargs: + readonly_endpoint_failover_policy_enabled = kwargs['readonlyEndpointFailoverPolicyEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_instance_name is not None: - pulumi.set(__self__, "managed_instance_name", managed_instance_name) + _setter("managed_instance_name", managed_instance_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partner_managed_instance_id is not None: - pulumi.set(__self__, "partner_managed_instance_id", partner_managed_instance_id) + _setter("partner_managed_instance_id", partner_managed_instance_id) if partner_regions is not None: - pulumi.set(__self__, "partner_regions", partner_regions) + _setter("partner_regions", partner_regions) if read_write_endpoint_failover_policy is not None: - pulumi.set(__self__, "read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) + _setter("read_write_endpoint_failover_policy", read_write_endpoint_failover_policy) if readonly_endpoint_failover_policy_enabled is not None: - pulumi.set(__self__, "readonly_endpoint_failover_policy_enabled", readonly_endpoint_failover_policy_enabled) + _setter("readonly_endpoint_failover_policy_enabled", readonly_endpoint_failover_policy_enabled) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if role is not None: - pulumi.set(__self__, "role", role) + _setter("role", role) @property @pulumi.getter @@ -338,6 +418,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedInstanceFailoverGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -367,6 +451,11 @@ def _internal_init(__self__, if partner_managed_instance_id is None and not opts.urn: raise TypeError("Missing required property 'partner_managed_instance_id'") __props__.__dict__["partner_managed_instance_id"] = partner_managed_instance_id + if read_write_endpoint_failover_policy is not None and not isinstance(read_write_endpoint_failover_policy, ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs): + read_write_endpoint_failover_policy = read_write_endpoint_failover_policy or {} + def _setter(key, value): + read_write_endpoint_failover_policy[key] = value + ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs._configure(_setter, **read_write_endpoint_failover_policy) if read_write_endpoint_failover_policy is None and not opts.urn: raise TypeError("Missing required property 'read_write_endpoint_failover_policy'") __props__.__dict__["read_write_endpoint_failover_policy"] = read_write_endpoint_failover_policy diff --git a/sdk/python/pulumi_azure/sql/outputs.py b/sdk/python/pulumi_azure/sql/outputs.py index 2d4585d20c..7ecbb5f2cc 100644 --- a/sdk/python/pulumi_azure/sql/outputs.py +++ b/sdk/python/pulumi_azure/sql/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -72,14 +72,63 @@ def __init__(__self__, *, :param str storage_uri: Specifies the blob URI of the .bacpac file. :param str operation_mode: Specifies the type of import operation being performed. The only allowable value is `Import`. """ - pulumi.set(__self__, "administrator_login", administrator_login) - pulumi.set(__self__, "administrator_login_password", administrator_login_password) - pulumi.set(__self__, "authentication_type", authentication_type) - pulumi.set(__self__, "storage_key", storage_key) - pulumi.set(__self__, "storage_key_type", storage_key_type) - pulumi.set(__self__, "storage_uri", storage_uri) + DatabaseImport._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + authentication_type=authentication_type, + storage_key=storage_key, + storage_key_type=storage_key_type, + storage_uri=storage_uri, + operation_mode=operation_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[str] = None, + administrator_login_password: Optional[str] = None, + authentication_type: Optional[str] = None, + storage_key: Optional[str] = None, + storage_key_type: Optional[str] = None, + storage_uri: Optional[str] = None, + operation_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login is None: + raise TypeError("Missing 'administrator_login' argument") + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if administrator_login_password is None: + raise TypeError("Missing 'administrator_login_password' argument") + if authentication_type is None and 'authenticationType' in kwargs: + authentication_type = kwargs['authenticationType'] + if authentication_type is None: + raise TypeError("Missing 'authentication_type' argument") + if storage_key is None and 'storageKey' in kwargs: + storage_key = kwargs['storageKey'] + if storage_key is None: + raise TypeError("Missing 'storage_key' argument") + if storage_key_type is None and 'storageKeyType' in kwargs: + storage_key_type = kwargs['storageKeyType'] + if storage_key_type is None: + raise TypeError("Missing 'storage_key_type' argument") + if storage_uri is None and 'storageUri' in kwargs: + storage_uri = kwargs['storageUri'] + if storage_uri is None: + raise TypeError("Missing 'storage_uri' argument") + if operation_mode is None and 'operationMode' in kwargs: + operation_mode = kwargs['operationMode'] + + _setter("administrator_login", administrator_login) + _setter("administrator_login_password", administrator_login_password) + _setter("authentication_type", authentication_type) + _setter("storage_key", storage_key) + _setter("storage_key_type", storage_key_type) + _setter("storage_uri", storage_uri) if operation_mode is not None: - pulumi.set(__self__, "operation_mode", operation_mode) + _setter("operation_mode", operation_mode) @property @pulumi.getter(name="administratorLogin") @@ -184,20 +233,55 @@ def __init__(__self__, *, :param str storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. Required if `state` is `Enabled`. :param str storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. Required if `state` is `Enabled`. """ + DatabaseThreatDetectionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins=email_account_admins, + email_addresses=email_addresses, + retention_days=retention_days, + state=state, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[Sequence[str]] = None, + email_account_admins: Optional[str] = None, + email_addresses: Optional[Sequence[str]] = None, + retention_days: Optional[int] = None, + state: Optional[str] = None, + storage_account_access_key: Optional[str] = None, + storage_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins is None and 'emailAccountAdmins' in kwargs: + email_account_admins = kwargs['emailAccountAdmins'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins is not None: - pulumi.set(__self__, "email_account_admins", email_account_admins) + _setter("email_account_admins", email_account_admins) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") @@ -267,11 +351,28 @@ def __init__(__self__, *, :param str location: the location of the failover group. :param str role: local replication role of the failover group instance. """ - pulumi.set(__self__, "id", id) + FailoverGroupPartnerServer._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + location=location, + role=role, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + location: Optional[str] = None, + role: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("id", id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if role is not None: - pulumi.set(__self__, "role", role) + _setter("role", role) @property @pulumi.getter @@ -324,9 +425,26 @@ def __init__(__self__, *, :param str mode: the failover mode. Possible values are `Manual`, `Automatic` :param int grace_minutes: Applies only if `mode` is `Automatic`. The grace period in minutes before failover with data loss is attempted """ - pulumi.set(__self__, "mode", mode) + FailoverGroupReadWriteEndpointFailoverPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + grace_minutes=grace_minutes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + grace_minutes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if grace_minutes is None and 'graceMinutes' in kwargs: + grace_minutes = kwargs['graceMinutes'] + + _setter("mode", mode) if grace_minutes is not None: - pulumi.set(__self__, "grace_minutes", grace_minutes) + _setter("grace_minutes", grace_minutes) @property @pulumi.getter @@ -352,7 +470,20 @@ def __init__(__self__, *, """ :param str mode: Failover policy for the read-only endpoint. Possible values are `Enabled`, and `Disabled` """ - pulumi.set(__self__, "mode", mode) + FailoverGroupReadonlyEndpointFailoverPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + + _setter("mode", mode) @property @pulumi.getter @@ -372,10 +503,23 @@ def __init__(__self__, *, :param str location: The Azure Region where the SQL Instance Failover Group exists. Changing this forces a new resource to be created. :param str role: The partner replication role of the SQL Instance Failover Group. """ + ManagedInstanceFailoverGroupPartnerRegion._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + role=role, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[str] = None, + role: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if role is not None: - pulumi.set(__self__, "role", role) + _setter("role", role) @property @pulumi.getter @@ -420,9 +564,26 @@ def __init__(__self__, *, :param str mode: The failover mode. Possible values are `Manual`, `Automatic` :param int grace_minutes: Applies only if `mode` is `Automatic`. The grace period in minutes before failover with data loss is attempted. """ - pulumi.set(__self__, "mode", mode) + ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + mode=mode, + grace_minutes=grace_minutes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + mode: Optional[str] = None, + grace_minutes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mode is None: + raise TypeError("Missing 'mode' argument") + if grace_minutes is None and 'graceMinutes' in kwargs: + grace_minutes = kwargs['graceMinutes'] + + _setter("mode", mode) if grace_minutes is not None: - pulumi.set(__self__, "grace_minutes", grace_minutes) + _setter("grace_minutes", grace_minutes) @property @pulumi.getter @@ -471,11 +632,32 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance. :param str tenant_id: The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance. """ - pulumi.set(__self__, "type", type) + ManagedInstanceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -534,11 +716,32 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Identity of this SQL Server. :param str tenant_id: The Tenant ID for the Service Principal associated with the Identity of this SQL Server. """ - pulumi.set(__self__, "type", type) + SqlServerIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -613,20 +816,55 @@ def __init__(__self__, *, :param str storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. Required if `state` is `Enabled`. :param str storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. Required if `state` is `Enabled`. """ + SqlServerThreatDetectionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins=email_account_admins, + email_addresses=email_addresses, + retention_days=retention_days, + state=state, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[Sequence[str]] = None, + email_account_admins: Optional[bool] = None, + email_addresses: Optional[Sequence[str]] = None, + retention_days: Optional[int] = None, + state: Optional[str] = None, + storage_account_access_key: Optional[str] = None, + storage_endpoint: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins is None and 'emailAccountAdmins' in kwargs: + email_account_admins = kwargs['emailAccountAdmins'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins is not None: - pulumi.set(__self__, "email_account_admins", email_account_admins) + _setter("email_account_admins", email_account_admins) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if state is not None: - pulumi.set(__self__, "state", state) + _setter("state", state) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") @@ -696,9 +934,34 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID associated with this Managed Service Identity. :param str type: The identity type of this Managed Service Identity. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetServerIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="principalId") @@ -735,9 +998,34 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance. :param str tenant_id: The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetSqlManagedInstanceIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="principalId") diff --git a/sdk/python/pulumi_azure/sql/sql_server.py b/sdk/python/pulumi_azure/sql/sql_server.py index 0a61c5247e..3bc0fa71b3 100644 --- a/sdk/python/pulumi_azure/sql/sql_server.py +++ b/sdk/python/pulumi_azure/sql/sql_server.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,22 +39,69 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input['SqlServerThreatDetectionPolicyArgs'] threat_detection_policy: Threat detection policy configuration. The `threat_detection_policy` block supports fields documented below. """ - pulumi.set(__self__, "administrator_login", administrator_login) - pulumi.set(__self__, "administrator_login_password", administrator_login_password) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "version", version) + SqlServerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + resource_group_name=resource_group_name, + version=version, + connection_policy=connection_policy, + identity=identity, + location=location, + name=name, + tags=tags, + threat_detection_policy=threat_detection_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + connection_policy: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['SqlServerIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_detection_policy: Optional[pulumi.Input['SqlServerThreatDetectionPolicyArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login is None: + raise TypeError("Missing 'administrator_login' argument") + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if administrator_login_password is None: + raise TypeError("Missing 'administrator_login_password' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if connection_policy is None and 'connectionPolicy' in kwargs: + connection_policy = kwargs['connectionPolicy'] + if threat_detection_policy is None and 'threatDetectionPolicy' in kwargs: + threat_detection_policy = kwargs['threatDetectionPolicy'] + + _setter("administrator_login", administrator_login) + _setter("administrator_login_password", administrator_login_password) + _setter("resource_group_name", resource_group_name) + _setter("version", version) if connection_policy is not None: - pulumi.set(__self__, "connection_policy", connection_policy) + _setter("connection_policy", connection_policy) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_detection_policy is not None: - pulumi.set(__self__, "threat_detection_policy", threat_detection_policy) + _setter("threat_detection_policy", threat_detection_policy) @property @pulumi.getter(name="administratorLogin") @@ -205,28 +252,71 @@ def __init__(__self__, *, :param pulumi.Input['SqlServerThreatDetectionPolicyArgs'] threat_detection_policy: Threat detection policy configuration. The `threat_detection_policy` block supports fields documented below. :param pulumi.Input[str] version: The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created. """ + _SqlServerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + administrator_login=administrator_login, + administrator_login_password=administrator_login_password, + connection_policy=connection_policy, + fully_qualified_domain_name=fully_qualified_domain_name, + identity=identity, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + threat_detection_policy=threat_detection_policy, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + administrator_login: Optional[pulumi.Input[str]] = None, + administrator_login_password: Optional[pulumi.Input[str]] = None, + connection_policy: Optional[pulumi.Input[str]] = None, + fully_qualified_domain_name: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['SqlServerIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + threat_detection_policy: Optional[pulumi.Input['SqlServerThreatDetectionPolicyArgs']] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if administrator_login is None and 'administratorLogin' in kwargs: + administrator_login = kwargs['administratorLogin'] + if administrator_login_password is None and 'administratorLoginPassword' in kwargs: + administrator_login_password = kwargs['administratorLoginPassword'] + if connection_policy is None and 'connectionPolicy' in kwargs: + connection_policy = kwargs['connectionPolicy'] + if fully_qualified_domain_name is None and 'fullyQualifiedDomainName' in kwargs: + fully_qualified_domain_name = kwargs['fullyQualifiedDomainName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if threat_detection_policy is None and 'threatDetectionPolicy' in kwargs: + threat_detection_policy = kwargs['threatDetectionPolicy'] + if administrator_login is not None: - pulumi.set(__self__, "administrator_login", administrator_login) + _setter("administrator_login", administrator_login) if administrator_login_password is not None: - pulumi.set(__self__, "administrator_login_password", administrator_login_password) + _setter("administrator_login_password", administrator_login_password) if connection_policy is not None: - pulumi.set(__self__, "connection_policy", connection_policy) + _setter("connection_policy", connection_policy) if fully_qualified_domain_name is not None: - pulumi.set(__self__, "fully_qualified_domain_name", fully_qualified_domain_name) + _setter("fully_qualified_domain_name", fully_qualified_domain_name) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if threat_detection_policy is not None: - pulumi.set(__self__, "threat_detection_policy", threat_detection_policy) + _setter("threat_detection_policy", threat_detection_policy) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="administratorLogin") @@ -474,6 +564,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlServerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -505,6 +599,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'administrator_login_password'") __props__.__dict__["administrator_login_password"] = None if administrator_login_password is None else pulumi.Output.secret(administrator_login_password) __props__.__dict__["connection_policy"] = connection_policy + if identity is not None and not isinstance(identity, SqlServerIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + SqlServerIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["location"] = location __props__.__dict__["name"] = name @@ -512,6 +611,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name __props__.__dict__["tags"] = tags + if threat_detection_policy is not None and not isinstance(threat_detection_policy, SqlServerThreatDetectionPolicyArgs): + threat_detection_policy = threat_detection_policy or {} + def _setter(key, value): + threat_detection_policy[key] = value + SqlServerThreatDetectionPolicyArgs._configure(_setter, **threat_detection_policy) __props__.__dict__["threat_detection_policy"] = threat_detection_policy if version is None and not opts.urn: raise TypeError("Missing required property 'version'") diff --git a/sdk/python/pulumi_azure/sql/virtual_network_rule.py b/sdk/python/pulumi_azure/sql/virtual_network_rule.py index 124e2d0386..26356bb603 100644 --- a/sdk/python/pulumi_azure/sql/virtual_network_rule.py +++ b/sdk/python/pulumi_azure/sql/virtual_network_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['VirtualNetworkRuleArgs', 'VirtualNetworkRule'] @@ -35,13 +35,46 @@ def __init__(__self__, *, 2. Cannot start with a number or hyphen 3. Cannot end with a hyphen """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server_name", server_name) - pulumi.set(__self__, "subnet_id", subnet_id) + VirtualNetworkRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + server_name=server_name, + subnet_id=subnet_id, + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + ignore_missing_vnet_service_endpoint: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if server_name is None: + raise TypeError("Missing 'server_name' argument") + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if subnet_id is None: + raise TypeError("Missing 'subnet_id' argument") + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + + _setter("resource_group_name", resource_group_name) + _setter("server_name", server_name) + _setter("subnet_id", subnet_id) if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="resourceGroupName") @@ -136,16 +169,43 @@ def __init__(__self__, *, :param pulumi.Input[str] server_name: The name of the SQL Server to which this SQL virtual network rule will be applied to. Changing this forces a new resource to be created. :param pulumi.Input[str] subnet_id: The ID of the subnet that the SQL server will be connected to. """ + _VirtualNetworkRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint, + name=name, + resource_group_name=resource_group_name, + server_name=server_name, + subnet_id=subnet_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + ignore_missing_vnet_service_endpoint: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server_name: Optional[pulumi.Input[str]] = None, + subnet_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if ignore_missing_vnet_service_endpoint is None and 'ignoreMissingVnetServiceEndpoint' in kwargs: + ignore_missing_vnet_service_endpoint = kwargs['ignoreMissingVnetServiceEndpoint'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if server_name is None and 'serverName' in kwargs: + server_name = kwargs['serverName'] + if subnet_id is None and 'subnetId' in kwargs: + subnet_id = kwargs['subnetId'] + if ignore_missing_vnet_service_endpoint is not None: - pulumi.set(__self__, "ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) + _setter("ignore_missing_vnet_service_endpoint", ignore_missing_vnet_service_endpoint) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server_name is not None: - pulumi.set(__self__, "server_name", server_name) + _setter("server_name", server_name) if subnet_id is not None: - pulumi.set(__self__, "subnet_id", subnet_id) + _setter("subnet_id", subnet_id) @property @pulumi.getter(name="ignoreMissingVnetServiceEndpoint") @@ -341,6 +401,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualNetworkRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/stack/hci_cluster.py b/sdk/python/pulumi_azure/stack/hci_cluster.py index b2ede1d5dd..1db29e6b97 100644 --- a/sdk/python/pulumi_azure/stack/hci_cluster.py +++ b/sdk/python/pulumi_azure/stack/hci_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['HciClusterArgs', 'HciCluster'] @@ -33,18 +33,53 @@ def __init__(__self__, *, > **NOTE** If unspecified the Tenant ID of the Provider will be used. """ - pulumi.set(__self__, "client_id", client_id) - pulumi.set(__self__, "resource_group_name", resource_group_name) + HciClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_id=client_id, + resource_group_name=resource_group_name, + automanage_configuration_id=automanage_configuration_id, + location=location, + name=name, + tags=tags, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + automanage_configuration_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if client_id is None: + raise TypeError("Missing 'client_id' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if automanage_configuration_id is None and 'automanageConfigurationId' in kwargs: + automanage_configuration_id = kwargs['automanageConfigurationId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("client_id", client_id) + _setter("resource_group_name", resource_group_name) if automanage_configuration_id is not None: - pulumi.set(__self__, "automanage_configuration_id", automanage_configuration_id) + _setter("automanage_configuration_id", automanage_configuration_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="clientId") @@ -155,20 +190,51 @@ def __init__(__self__, *, > **NOTE** If unspecified the Tenant ID of the Provider will be used. """ + _HciClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + automanage_configuration_id=automanage_configuration_id, + client_id=client_id, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + automanage_configuration_id: Optional[pulumi.Input[str]] = None, + client_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if automanage_configuration_id is None and 'automanageConfigurationId' in kwargs: + automanage_configuration_id = kwargs['automanageConfigurationId'] + if client_id is None and 'clientId' in kwargs: + client_id = kwargs['clientId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if automanage_configuration_id is not None: - pulumi.set(__self__, "automanage_configuration_id", automanage_configuration_id) + _setter("automanage_configuration_id", automanage_configuration_id) if client_id is not None: - pulumi.set(__self__, "client_id", client_id) + _setter("client_id", client_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="automanageConfigurationId") @@ -354,6 +420,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HciClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/_inputs.py b/sdk/python/pulumi_azure/storage/_inputs.py index 1709843ad9..39211d87f7 100644 --- a/sdk/python/pulumi_azure/storage/_inputs.py +++ b/sdk/python/pulumi_azure/storage/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -72,9 +72,28 @@ def __init__(__self__, *, :param pulumi.Input[str] directory_type: Specifies the directory service used. Possible values are `AADDS`, `AD` and `AADKERB`. :param pulumi.Input['AccountAzureFilesAuthenticationActiveDirectoryArgs'] active_directory: A `active_directory` block as defined below. Required when `directory_type` is `AD`. """ - pulumi.set(__self__, "directory_type", directory_type) + AccountAzureFilesAuthenticationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + directory_type=directory_type, + active_directory=active_directory, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + directory_type: Optional[pulumi.Input[str]] = None, + active_directory: Optional[pulumi.Input['AccountAzureFilesAuthenticationActiveDirectoryArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if directory_type is None and 'directoryType' in kwargs: + directory_type = kwargs['directoryType'] + if directory_type is None: + raise TypeError("Missing 'directory_type' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + + _setter("directory_type", directory_type) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) @property @pulumi.getter(name="directoryType") @@ -118,16 +137,53 @@ def __init__(__self__, *, :param pulumi.Input[str] netbios_domain_name: Specifies the NetBIOS domain name. This is required when `directory_type` is set to `AD`. :param pulumi.Input[str] storage_sid: Specifies the security identifier (SID) for Azure Storage. This is required when `directory_type` is set to `AD`. """ - pulumi.set(__self__, "domain_guid", domain_guid) - pulumi.set(__self__, "domain_name", domain_name) + AccountAzureFilesAuthenticationActiveDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_guid=domain_guid, + domain_name=domain_name, + domain_sid=domain_sid, + forest_name=forest_name, + netbios_domain_name=netbios_domain_name, + storage_sid=storage_sid, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_guid: Optional[pulumi.Input[str]] = None, + domain_name: Optional[pulumi.Input[str]] = None, + domain_sid: Optional[pulumi.Input[str]] = None, + forest_name: Optional[pulumi.Input[str]] = None, + netbios_domain_name: Optional[pulumi.Input[str]] = None, + storage_sid: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_guid is None and 'domainGuid' in kwargs: + domain_guid = kwargs['domainGuid'] + if domain_guid is None: + raise TypeError("Missing 'domain_guid' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_sid is None and 'domainSid' in kwargs: + domain_sid = kwargs['domainSid'] + if forest_name is None and 'forestName' in kwargs: + forest_name = kwargs['forestName'] + if netbios_domain_name is None and 'netbiosDomainName' in kwargs: + netbios_domain_name = kwargs['netbiosDomainName'] + if storage_sid is None and 'storageSid' in kwargs: + storage_sid = kwargs['storageSid'] + + _setter("domain_guid", domain_guid) + _setter("domain_name", domain_name) if domain_sid is not None: - pulumi.set(__self__, "domain_sid", domain_sid) + _setter("domain_sid", domain_sid) if forest_name is not None: - pulumi.set(__self__, "forest_name", forest_name) + _setter("forest_name", forest_name) if netbios_domain_name is not None: - pulumi.set(__self__, "netbios_domain_name", netbios_domain_name) + _setter("netbios_domain_name", netbios_domain_name) if storage_sid is not None: - pulumi.set(__self__, "storage_sid", storage_sid) + _setter("storage_sid", storage_sid) @property @pulumi.getter(name="domainGuid") @@ -235,24 +291,69 @@ def __init__(__self__, *, > **NOTE:** This field cannot be configured when `kind` is set to `Storage` (V1). """ + AccountBlobPropertiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + change_feed_enabled=change_feed_enabled, + change_feed_retention_in_days=change_feed_retention_in_days, + container_delete_retention_policy=container_delete_retention_policy, + cors_rules=cors_rules, + default_service_version=default_service_version, + delete_retention_policy=delete_retention_policy, + last_access_time_enabled=last_access_time_enabled, + restore_policy=restore_policy, + versioning_enabled=versioning_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + change_feed_enabled: Optional[pulumi.Input[bool]] = None, + change_feed_retention_in_days: Optional[pulumi.Input[int]] = None, + container_delete_retention_policy: Optional[pulumi.Input['AccountBlobPropertiesContainerDeleteRetentionPolicyArgs']] = None, + cors_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AccountBlobPropertiesCorsRuleArgs']]]] = None, + default_service_version: Optional[pulumi.Input[str]] = None, + delete_retention_policy: Optional[pulumi.Input['AccountBlobPropertiesDeleteRetentionPolicyArgs']] = None, + last_access_time_enabled: Optional[pulumi.Input[bool]] = None, + restore_policy: Optional[pulumi.Input['AccountBlobPropertiesRestorePolicyArgs']] = None, + versioning_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if change_feed_enabled is None and 'changeFeedEnabled' in kwargs: + change_feed_enabled = kwargs['changeFeedEnabled'] + if change_feed_retention_in_days is None and 'changeFeedRetentionInDays' in kwargs: + change_feed_retention_in_days = kwargs['changeFeedRetentionInDays'] + if container_delete_retention_policy is None and 'containerDeleteRetentionPolicy' in kwargs: + container_delete_retention_policy = kwargs['containerDeleteRetentionPolicy'] + if cors_rules is None and 'corsRules' in kwargs: + cors_rules = kwargs['corsRules'] + if default_service_version is None and 'defaultServiceVersion' in kwargs: + default_service_version = kwargs['defaultServiceVersion'] + if delete_retention_policy is None and 'deleteRetentionPolicy' in kwargs: + delete_retention_policy = kwargs['deleteRetentionPolicy'] + if last_access_time_enabled is None and 'lastAccessTimeEnabled' in kwargs: + last_access_time_enabled = kwargs['lastAccessTimeEnabled'] + if restore_policy is None and 'restorePolicy' in kwargs: + restore_policy = kwargs['restorePolicy'] + if versioning_enabled is None and 'versioningEnabled' in kwargs: + versioning_enabled = kwargs['versioningEnabled'] + if change_feed_enabled is not None: - pulumi.set(__self__, "change_feed_enabled", change_feed_enabled) + _setter("change_feed_enabled", change_feed_enabled) if change_feed_retention_in_days is not None: - pulumi.set(__self__, "change_feed_retention_in_days", change_feed_retention_in_days) + _setter("change_feed_retention_in_days", change_feed_retention_in_days) if container_delete_retention_policy is not None: - pulumi.set(__self__, "container_delete_retention_policy", container_delete_retention_policy) + _setter("container_delete_retention_policy", container_delete_retention_policy) if cors_rules is not None: - pulumi.set(__self__, "cors_rules", cors_rules) + _setter("cors_rules", cors_rules) if default_service_version is not None: - pulumi.set(__self__, "default_service_version", default_service_version) + _setter("default_service_version", default_service_version) if delete_retention_policy is not None: - pulumi.set(__self__, "delete_retention_policy", delete_retention_policy) + _setter("delete_retention_policy", delete_retention_policy) if last_access_time_enabled is not None: - pulumi.set(__self__, "last_access_time_enabled", last_access_time_enabled) + _setter("last_access_time_enabled", last_access_time_enabled) if restore_policy is not None: - pulumi.set(__self__, "restore_policy", restore_policy) + _setter("restore_policy", restore_policy) if versioning_enabled is not None: - pulumi.set(__self__, "versioning_enabled", versioning_enabled) + _setter("versioning_enabled", versioning_enabled) @property @pulumi.getter(name="changeFeedEnabled") @@ -380,8 +481,19 @@ def __init__(__self__, *, """ :param pulumi.Input[int] days: Specifies the number of days that the container should be retained, between `1` and `365` days. Defaults to `7`. """ + AccountBlobPropertiesContainerDeleteRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -412,11 +524,50 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] exposed_headers: A list of response headers that are exposed to CORS clients. :param pulumi.Input[int] max_age_in_seconds: The number of seconds the client should cache a preflight response. """ - pulumi.set(__self__, "allowed_headers", allowed_headers) - pulumi.set(__self__, "allowed_methods", allowed_methods) - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "exposed_headers", exposed_headers) - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + AccountBlobPropertiesCorsRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + exposed_headers=exposed_headers, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + exposed_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + max_age_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_headers is None: + raise TypeError("Missing 'allowed_headers' argument") + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_methods is None: + raise TypeError("Missing 'allowed_methods' argument") + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if exposed_headers is None and 'exposedHeaders' in kwargs: + exposed_headers = kwargs['exposedHeaders'] + if exposed_headers is None: + raise TypeError("Missing 'exposed_headers' argument") + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + if max_age_in_seconds is None: + raise TypeError("Missing 'max_age_in_seconds' argument") + + _setter("allowed_headers", allowed_headers) + _setter("allowed_methods", allowed_methods) + _setter("allowed_origins", allowed_origins) + _setter("exposed_headers", exposed_headers) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowedHeaders") @@ -487,8 +638,19 @@ def __init__(__self__, *, """ :param pulumi.Input[int] days: Specifies the number of days that the blob should be retained, between `1` and `365` days. Defaults to `7`. """ + AccountBlobPropertiesDeleteRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -510,7 +672,20 @@ def __init__(__self__, *, """ :param pulumi.Input[int] days: Specifies the number of days that the blob can be restored, between `1` and `365` days. This must be less than the `days` specified for `delete_retention_policy`. """ - pulumi.set(__self__, "days", days) + AccountBlobPropertiesRestorePolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + + _setter("days", days) @property @pulumi.getter @@ -534,9 +709,26 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The Custom Domain Name to use for the Storage Account, which will be validated by Azure. :param pulumi.Input[bool] use_subdomain: Should the Custom Domain Name be validated by using indirect CNAME validation? """ - pulumi.set(__self__, "name", name) + AccountCustomDomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + use_subdomain=use_subdomain, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + use_subdomain: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if use_subdomain is None and 'useSubdomain' in kwargs: + use_subdomain = kwargs['useSubdomain'] + + _setter("name", name) if use_subdomain is not None: - pulumi.set(__self__, "use_subdomain", use_subdomain) + _setter("use_subdomain", use_subdomain) @property @pulumi.getter @@ -574,8 +766,29 @@ def __init__(__self__, *, > **NOTE:** `customer_managed_key` can only be set when the `account_kind` is set to `StorageV2` or `account_tier` set to `Premium`, and the identity type is `UserAssigned`. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + AccountCustomerManagedKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_assigned_identity_id is None: + raise TypeError("Missing 'user_assigned_identity_id' argument") + + _setter("key_vault_key_id", key_vault_key_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -621,13 +834,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Identity of this Storage Account. :param pulumi.Input[str] tenant_id: The Tenant ID for the Service Principal associated with the Identity of this Storage Account. """ - pulumi.set(__self__, "type", type) + AccountIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -693,9 +931,34 @@ def __init__(__self__, *, :param pulumi.Input[int] period_since_creation_in_days: The immutability period for the blobs in the container since the policy creation, in days. :param pulumi.Input[str] state: Defines the mode of the policy. `Disabled` state disables the policy, `Unlocked` state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, `Locked` state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. """ - pulumi.set(__self__, "allow_protected_append_writes", allow_protected_append_writes) - pulumi.set(__self__, "period_since_creation_in_days", period_since_creation_in_days) - pulumi.set(__self__, "state", state) + AccountImmutabilityPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_protected_append_writes=allow_protected_append_writes, + period_since_creation_in_days=period_since_creation_in_days, + state=state, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_protected_append_writes: Optional[pulumi.Input[bool]] = None, + period_since_creation_in_days: Optional[pulumi.Input[int]] = None, + state: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_protected_append_writes is None and 'allowProtectedAppendWrites' in kwargs: + allow_protected_append_writes = kwargs['allowProtectedAppendWrites'] + if allow_protected_append_writes is None: + raise TypeError("Missing 'allow_protected_append_writes' argument") + if period_since_creation_in_days is None and 'periodSinceCreationInDays' in kwargs: + period_since_creation_in_days = kwargs['periodSinceCreationInDays'] + if period_since_creation_in_days is None: + raise TypeError("Missing 'period_since_creation_in_days' argument") + if state is None: + raise TypeError("Missing 'state' argument") + + _setter("allow_protected_append_writes", allow_protected_append_writes) + _setter("period_since_creation_in_days", period_since_creation_in_days) + _setter("state", state) @property @pulumi.getter(name="allowProtectedAppendWrites") @@ -757,15 +1020,44 @@ def __init__(__self__, *, > **Note:** [More information on Validation is available here](https://docs.microsoft.com/en-gb/azure/storage/blobs/storage-custom-domain-name) :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_network_subnet_ids: A list of resource ids for subnets. """ - pulumi.set(__self__, "default_action", default_action) + AccountNetworkRulesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + bypasses=bypasses, + ip_rules=ip_rules, + private_link_accesses=private_link_accesses, + virtual_network_subnet_ids=virtual_network_subnet_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + bypasses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + private_link_accesses: Optional[pulumi.Input[Sequence[pulumi.Input['AccountNetworkRulesPrivateLinkAccessArgs']]]] = None, + virtual_network_subnet_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if default_action is None: + raise TypeError("Missing 'default_action' argument") + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if private_link_accesses is None and 'privateLinkAccesses' in kwargs: + private_link_accesses = kwargs['privateLinkAccesses'] + if virtual_network_subnet_ids is None and 'virtualNetworkSubnetIds' in kwargs: + virtual_network_subnet_ids = kwargs['virtualNetworkSubnetIds'] + + _setter("default_action", default_action) if bypasses is not None: - pulumi.set(__self__, "bypasses", bypasses) + _setter("bypasses", bypasses) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if private_link_accesses is not None: - pulumi.set(__self__, "private_link_accesses", private_link_accesses) + _setter("private_link_accesses", private_link_accesses) if virtual_network_subnet_ids is not None: - pulumi.set(__self__, "virtual_network_subnet_ids", virtual_network_subnet_ids) + _setter("virtual_network_subnet_ids", virtual_network_subnet_ids) @property @pulumi.getter(name="defaultAction") @@ -845,9 +1137,28 @@ def __init__(__self__, *, :param pulumi.Input[str] endpoint_resource_id: The resource id of the resource access rule to be granted access. :param pulumi.Input[str] endpoint_tenant_id: The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id. """ - pulumi.set(__self__, "endpoint_resource_id", endpoint_resource_id) + AccountNetworkRulesPrivateLinkAccessArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint_resource_id=endpoint_resource_id, + endpoint_tenant_id=endpoint_tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint_resource_id: Optional[pulumi.Input[str]] = None, + endpoint_tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_resource_id is None and 'endpointResourceId' in kwargs: + endpoint_resource_id = kwargs['endpointResourceId'] + if endpoint_resource_id is None: + raise TypeError("Missing 'endpoint_resource_id' argument") + if endpoint_tenant_id is None and 'endpointTenantId' in kwargs: + endpoint_tenant_id = kwargs['endpointTenantId'] + + _setter("endpoint_resource_id", endpoint_resource_id) if endpoint_tenant_id is not None: - pulumi.set(__self__, "endpoint_tenant_id", endpoint_tenant_id) + _setter("endpoint_tenant_id", endpoint_tenant_id) @property @pulumi.getter(name="endpointResourceId") @@ -883,9 +1194,28 @@ def __init__(__self__, *, :param pulumi.Input[str] endpoint_resource_id: The resource id of the resource access rule to be granted access. :param pulumi.Input[str] endpoint_tenant_id: The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id. """ - pulumi.set(__self__, "endpoint_resource_id", endpoint_resource_id) + AccountNetworkRulesPrivateLinkAccessRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint_resource_id=endpoint_resource_id, + endpoint_tenant_id=endpoint_tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint_resource_id: Optional[pulumi.Input[str]] = None, + endpoint_tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_resource_id is None and 'endpointResourceId' in kwargs: + endpoint_resource_id = kwargs['endpointResourceId'] + if endpoint_resource_id is None: + raise TypeError("Missing 'endpoint_resource_id' argument") + if endpoint_tenant_id is None and 'endpointTenantId' in kwargs: + endpoint_tenant_id = kwargs['endpointTenantId'] + + _setter("endpoint_resource_id", endpoint_resource_id) if endpoint_tenant_id is not None: - pulumi.set(__self__, "endpoint_tenant_id", endpoint_tenant_id) + _setter("endpoint_tenant_id", endpoint_tenant_id) @property @pulumi.getter(name="endpointResourceId") @@ -925,14 +1255,37 @@ def __init__(__self__, *, :param pulumi.Input['AccountQueuePropertiesLoggingArgs'] logging: A `logging` block as defined below. :param pulumi.Input['AccountQueuePropertiesMinuteMetricsArgs'] minute_metrics: A `minute_metrics` block as defined below. """ + AccountQueuePropertiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cors_rules=cors_rules, + hour_metrics=hour_metrics, + logging=logging, + minute_metrics=minute_metrics, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cors_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AccountQueuePropertiesCorsRuleArgs']]]] = None, + hour_metrics: Optional[pulumi.Input['AccountQueuePropertiesHourMetricsArgs']] = None, + logging: Optional[pulumi.Input['AccountQueuePropertiesLoggingArgs']] = None, + minute_metrics: Optional[pulumi.Input['AccountQueuePropertiesMinuteMetricsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cors_rules is None and 'corsRules' in kwargs: + cors_rules = kwargs['corsRules'] + if hour_metrics is None and 'hourMetrics' in kwargs: + hour_metrics = kwargs['hourMetrics'] + if minute_metrics is None and 'minuteMetrics' in kwargs: + minute_metrics = kwargs['minuteMetrics'] + if cors_rules is not None: - pulumi.set(__self__, "cors_rules", cors_rules) + _setter("cors_rules", cors_rules) if hour_metrics is not None: - pulumi.set(__self__, "hour_metrics", hour_metrics) + _setter("hour_metrics", hour_metrics) if logging is not None: - pulumi.set(__self__, "logging", logging) + _setter("logging", logging) if minute_metrics is not None: - pulumi.set(__self__, "minute_metrics", minute_metrics) + _setter("minute_metrics", minute_metrics) @property @pulumi.getter(name="corsRules") @@ -999,11 +1352,50 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] exposed_headers: A list of response headers that are exposed to CORS clients. :param pulumi.Input[int] max_age_in_seconds: The number of seconds the client should cache a preflight response. """ - pulumi.set(__self__, "allowed_headers", allowed_headers) - pulumi.set(__self__, "allowed_methods", allowed_methods) - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "exposed_headers", exposed_headers) - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + AccountQueuePropertiesCorsRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + exposed_headers=exposed_headers, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + exposed_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + max_age_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_headers is None: + raise TypeError("Missing 'allowed_headers' argument") + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_methods is None: + raise TypeError("Missing 'allowed_methods' argument") + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if exposed_headers is None and 'exposedHeaders' in kwargs: + exposed_headers = kwargs['exposedHeaders'] + if exposed_headers is None: + raise TypeError("Missing 'exposed_headers' argument") + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + if max_age_in_seconds is None: + raise TypeError("Missing 'max_age_in_seconds' argument") + + _setter("allowed_headers", allowed_headers) + _setter("allowed_methods", allowed_methods) + _setter("allowed_origins", allowed_origins) + _setter("exposed_headers", exposed_headers) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowedHeaders") @@ -1080,12 +1472,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] include_apis: Indicates whether metrics should generate summary statistics for called API operations. :param pulumi.Input[int] retention_policy_days: Specifies the number of days that logs will be retained. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "version", version) + AccountQueuePropertiesHourMetricsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + version=version, + include_apis=include_apis, + retention_policy_days=retention_policy_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + version: Optional[pulumi.Input[str]] = None, + include_apis: Optional[pulumi.Input[bool]] = None, + retention_policy_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if include_apis is None and 'includeApis' in kwargs: + include_apis = kwargs['includeApis'] + if retention_policy_days is None and 'retentionPolicyDays' in kwargs: + retention_policy_days = kwargs['retentionPolicyDays'] + + _setter("enabled", enabled) + _setter("version", version) if include_apis is not None: - pulumi.set(__self__, "include_apis", include_apis) + _setter("include_apis", include_apis) if retention_policy_days is not None: - pulumi.set(__self__, "retention_policy_days", retention_policy_days) + _setter("retention_policy_days", retention_policy_days) @property @pulumi.getter @@ -1151,12 +1568,41 @@ def __init__(__self__, *, :param pulumi.Input[bool] write: Indicates whether all write requests should be logged. :param pulumi.Input[int] retention_policy_days: Specifies the number of days that logs will be retained. """ - pulumi.set(__self__, "delete", delete) - pulumi.set(__self__, "read", read) - pulumi.set(__self__, "version", version) - pulumi.set(__self__, "write", write) + AccountQueuePropertiesLoggingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + delete=delete, + read=read, + version=version, + write=write, + retention_policy_days=retention_policy_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + delete: Optional[pulumi.Input[bool]] = None, + read: Optional[pulumi.Input[bool]] = None, + version: Optional[pulumi.Input[str]] = None, + write: Optional[pulumi.Input[bool]] = None, + retention_policy_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if delete is None: + raise TypeError("Missing 'delete' argument") + if read is None: + raise TypeError("Missing 'read' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if write is None: + raise TypeError("Missing 'write' argument") + if retention_policy_days is None and 'retentionPolicyDays' in kwargs: + retention_policy_days = kwargs['retentionPolicyDays'] + + _setter("delete", delete) + _setter("read", read) + _setter("version", version) + _setter("write", write) if retention_policy_days is not None: - pulumi.set(__self__, "retention_policy_days", retention_policy_days) + _setter("retention_policy_days", retention_policy_days) @property @pulumi.getter @@ -1232,12 +1678,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] include_apis: Indicates whether metrics should generate summary statistics for called API operations. :param pulumi.Input[int] retention_policy_days: Specifies the number of days that logs will be retained. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "version", version) + AccountQueuePropertiesMinuteMetricsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + version=version, + include_apis=include_apis, + retention_policy_days=retention_policy_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + version: Optional[pulumi.Input[str]] = None, + include_apis: Optional[pulumi.Input[bool]] = None, + retention_policy_days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if include_apis is None and 'includeApis' in kwargs: + include_apis = kwargs['includeApis'] + if retention_policy_days is None and 'retentionPolicyDays' in kwargs: + retention_policy_days = kwargs['retentionPolicyDays'] + + _setter("enabled", enabled) + _setter("version", version) if include_apis is not None: - pulumi.set(__self__, "include_apis", include_apis) + _setter("include_apis", include_apis) if retention_policy_days is not None: - pulumi.set(__self__, "retention_policy_days", retention_policy_days) + _setter("retention_policy_days", retention_policy_days) @property @pulumi.getter @@ -1299,12 +1770,31 @@ def __init__(__self__, *, :param pulumi.Input[bool] publish_internet_endpoints: Should internet routing storage endpoints be published? Defaults to `false`. :param pulumi.Input[bool] publish_microsoft_endpoints: Should Microsoft routing storage endpoints be published? Defaults to `false`. """ + AccountRoutingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + choice=choice, + publish_internet_endpoints=publish_internet_endpoints, + publish_microsoft_endpoints=publish_microsoft_endpoints, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + choice: Optional[pulumi.Input[str]] = None, + publish_internet_endpoints: Optional[pulumi.Input[bool]] = None, + publish_microsoft_endpoints: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if publish_internet_endpoints is None and 'publishInternetEndpoints' in kwargs: + publish_internet_endpoints = kwargs['publishInternetEndpoints'] + if publish_microsoft_endpoints is None and 'publishMicrosoftEndpoints' in kwargs: + publish_microsoft_endpoints = kwargs['publishMicrosoftEndpoints'] + if choice is not None: - pulumi.set(__self__, "choice", choice) + _setter("choice", choice) if publish_internet_endpoints is not None: - pulumi.set(__self__, "publish_internet_endpoints", publish_internet_endpoints) + _setter("publish_internet_endpoints", publish_internet_endpoints) if publish_microsoft_endpoints is not None: - pulumi.set(__self__, "publish_microsoft_endpoints", publish_microsoft_endpoints) + _setter("publish_microsoft_endpoints", publish_microsoft_endpoints) @property @pulumi.getter @@ -1352,9 +1842,28 @@ def __init__(__self__, *, :param pulumi.Input[str] expiration_period: The SAS expiration period in format of `DD.HH:MM:SS`. :param pulumi.Input[str] expiration_action: The SAS expiration action. The only possible value is `Log` at this moment. Defaults to `Log`. """ - pulumi.set(__self__, "expiration_period", expiration_period) + AccountSasPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiration_period=expiration_period, + expiration_action=expiration_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiration_period: Optional[pulumi.Input[str]] = None, + expiration_action: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiration_period is None and 'expirationPeriod' in kwargs: + expiration_period = kwargs['expirationPeriod'] + if expiration_period is None: + raise TypeError("Missing 'expiration_period' argument") + if expiration_action is None and 'expirationAction' in kwargs: + expiration_action = kwargs['expirationAction'] + + _setter("expiration_period", expiration_period) if expiration_action is not None: - pulumi.set(__self__, "expiration_action", expiration_action) + _setter("expiration_action", expiration_action) @property @pulumi.getter(name="expirationPeriod") @@ -1392,12 +1901,31 @@ def __init__(__self__, *, :param pulumi.Input['AccountSharePropertiesRetentionPolicyArgs'] retention_policy: A `retention_policy` block as defined below. :param pulumi.Input['AccountSharePropertiesSmbArgs'] smb: A `smb` block as defined below. """ + AccountSharePropertiesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cors_rules=cors_rules, + retention_policy=retention_policy, + smb=smb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cors_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AccountSharePropertiesCorsRuleArgs']]]] = None, + retention_policy: Optional[pulumi.Input['AccountSharePropertiesRetentionPolicyArgs']] = None, + smb: Optional[pulumi.Input['AccountSharePropertiesSmbArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cors_rules is None and 'corsRules' in kwargs: + cors_rules = kwargs['corsRules'] + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if cors_rules is not None: - pulumi.set(__self__, "cors_rules", cors_rules) + _setter("cors_rules", cors_rules) if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) if smb is not None: - pulumi.set(__self__, "smb", smb) + _setter("smb", smb) @property @pulumi.getter(name="corsRules") @@ -1452,11 +1980,50 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] exposed_headers: A list of response headers that are exposed to CORS clients. :param pulumi.Input[int] max_age_in_seconds: The number of seconds the client should cache a preflight response. """ - pulumi.set(__self__, "allowed_headers", allowed_headers) - pulumi.set(__self__, "allowed_methods", allowed_methods) - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "exposed_headers", exposed_headers) - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + AccountSharePropertiesCorsRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + exposed_headers=exposed_headers, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_origins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + exposed_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + max_age_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_headers is None: + raise TypeError("Missing 'allowed_headers' argument") + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_methods is None: + raise TypeError("Missing 'allowed_methods' argument") + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if exposed_headers is None and 'exposedHeaders' in kwargs: + exposed_headers = kwargs['exposedHeaders'] + if exposed_headers is None: + raise TypeError("Missing 'exposed_headers' argument") + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + if max_age_in_seconds is None: + raise TypeError("Missing 'max_age_in_seconds' argument") + + _setter("allowed_headers", allowed_headers) + _setter("allowed_methods", allowed_methods) + _setter("allowed_origins", allowed_origins) + _setter("exposed_headers", exposed_headers) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowedHeaders") @@ -1527,8 +2094,19 @@ def __init__(__self__, *, """ :param pulumi.Input[int] days: Specifies the number of days that the `storage.Share` should be retained, between `1` and `365` days. Defaults to `7`. """ + AccountSharePropertiesRetentionPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -1558,16 +2136,43 @@ def __init__(__self__, *, :param pulumi.Input[bool] multichannel_enabled: Indicates whether multichannel is enabled. Defaults to `false`. This is only supported on Premium storage accounts. :param pulumi.Input[Sequence[pulumi.Input[str]]] versions: A set of SMB protocol versions. Possible values are `SMB2.1`, `SMB3.0`, and `SMB3.1.1`. """ + AccountSharePropertiesSmbArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_types=authentication_types, + channel_encryption_types=channel_encryption_types, + kerberos_ticket_encryption_types=kerberos_ticket_encryption_types, + multichannel_enabled=multichannel_enabled, + versions=versions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + channel_encryption_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + kerberos_ticket_encryption_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + multichannel_enabled: Optional[pulumi.Input[bool]] = None, + versions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_types is None and 'authenticationTypes' in kwargs: + authentication_types = kwargs['authenticationTypes'] + if channel_encryption_types is None and 'channelEncryptionTypes' in kwargs: + channel_encryption_types = kwargs['channelEncryptionTypes'] + if kerberos_ticket_encryption_types is None and 'kerberosTicketEncryptionTypes' in kwargs: + kerberos_ticket_encryption_types = kwargs['kerberosTicketEncryptionTypes'] + if multichannel_enabled is None and 'multichannelEnabled' in kwargs: + multichannel_enabled = kwargs['multichannelEnabled'] + if authentication_types is not None: - pulumi.set(__self__, "authentication_types", authentication_types) + _setter("authentication_types", authentication_types) if channel_encryption_types is not None: - pulumi.set(__self__, "channel_encryption_types", channel_encryption_types) + _setter("channel_encryption_types", channel_encryption_types) if kerberos_ticket_encryption_types is not None: - pulumi.set(__self__, "kerberos_ticket_encryption_types", kerberos_ticket_encryption_types) + _setter("kerberos_ticket_encryption_types", kerberos_ticket_encryption_types) if multichannel_enabled is not None: - pulumi.set(__self__, "multichannel_enabled", multichannel_enabled) + _setter("multichannel_enabled", multichannel_enabled) if versions is not None: - pulumi.set(__self__, "versions", versions) + _setter("versions", versions) @property @pulumi.getter(name="authenticationTypes") @@ -1639,10 +2244,27 @@ def __init__(__self__, *, :param pulumi.Input[str] error404_document: The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file. :param pulumi.Input[str] index_document: The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html. The value is case-sensitive. """ + AccountStaticWebsiteArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + error404_document=error404_document, + index_document=index_document, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + error404_document: Optional[pulumi.Input[str]] = None, + index_document: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if error404_document is None and 'error404Document' in kwargs: + error404_document = kwargs['error404Document'] + if index_document is None and 'indexDocument' in kwargs: + index_document = kwargs['indexDocument'] + if error404_document is not None: - pulumi.set(__self__, "error404_document", error404_document) + _setter("error404_document", error404_document) if index_document is not None: - pulumi.set(__self__, "index_document", index_document) + _setter("index_document", index_document) @property @pulumi.getter(name="error404Document") @@ -1688,14 +2310,53 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_container_name: The storage container name to store the blob inventory files for this rule. :param pulumi.Input['BlobInventoryPolicyRuleFilterArgs'] filter: A `filter` block as defined above. Can only be set when the `scope` is `Blob`. """ - pulumi.set(__self__, "format", format) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "schema_fields", schema_fields) - pulumi.set(__self__, "scope", scope) - pulumi.set(__self__, "storage_container_name", storage_container_name) + BlobInventoryPolicyRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + format=format, + name=name, + schedule=schedule, + schema_fields=schema_fields, + scope=scope, + storage_container_name=storage_container_name, + filter=filter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + format: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + schedule: Optional[pulumi.Input[str]] = None, + schema_fields: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + scope: Optional[pulumi.Input[str]] = None, + storage_container_name: Optional[pulumi.Input[str]] = None, + filter: Optional[pulumi.Input['BlobInventoryPolicyRuleFilterArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if format is None: + raise TypeError("Missing 'format' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if schema_fields is None and 'schemaFields' in kwargs: + schema_fields = kwargs['schemaFields'] + if schema_fields is None: + raise TypeError("Missing 'schema_fields' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if storage_container_name is None: + raise TypeError("Missing 'storage_container_name' argument") + + _setter("format", format) + _setter("name", name) + _setter("schedule", schedule) + _setter("schema_fields", schema_fields) + _setter("scope", scope) + _setter("storage_container_name", storage_container_name) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) @property @pulumi.getter @@ -1807,17 +2468,52 @@ def __init__(__self__, *, > **NOTE**: The `rules.*.schema_fields` for this rule has to include `Snapshot` so that you can specify the `include_snapshots`. :param pulumi.Input[Sequence[pulumi.Input[str]]] prefix_matches: A set of strings for blob prefixes to be matched. Maximum of 10 blob prefixes. """ - pulumi.set(__self__, "blob_types", blob_types) + BlobInventoryPolicyRuleFilterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_types=blob_types, + exclude_prefixes=exclude_prefixes, + include_blob_versions=include_blob_versions, + include_deleted=include_deleted, + include_snapshots=include_snapshots, + prefix_matches=prefix_matches, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + exclude_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + include_blob_versions: Optional[pulumi.Input[bool]] = None, + include_deleted: Optional[pulumi.Input[bool]] = None, + include_snapshots: Optional[pulumi.Input[bool]] = None, + prefix_matches: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_types is None and 'blobTypes' in kwargs: + blob_types = kwargs['blobTypes'] + if blob_types is None: + raise TypeError("Missing 'blob_types' argument") + if exclude_prefixes is None and 'excludePrefixes' in kwargs: + exclude_prefixes = kwargs['excludePrefixes'] + if include_blob_versions is None and 'includeBlobVersions' in kwargs: + include_blob_versions = kwargs['includeBlobVersions'] + if include_deleted is None and 'includeDeleted' in kwargs: + include_deleted = kwargs['includeDeleted'] + if include_snapshots is None and 'includeSnapshots' in kwargs: + include_snapshots = kwargs['includeSnapshots'] + if prefix_matches is None and 'prefixMatches' in kwargs: + prefix_matches = kwargs['prefixMatches'] + + _setter("blob_types", blob_types) if exclude_prefixes is not None: - pulumi.set(__self__, "exclude_prefixes", exclude_prefixes) + _setter("exclude_prefixes", exclude_prefixes) if include_blob_versions is not None: - pulumi.set(__self__, "include_blob_versions", include_blob_versions) + _setter("include_blob_versions", include_blob_versions) if include_deleted is not None: - pulumi.set(__self__, "include_deleted", include_deleted) + _setter("include_deleted", include_deleted) if include_snapshots is not None: - pulumi.set(__self__, "include_snapshots", include_snapshots) + _setter("include_snapshots", include_snapshots) if prefix_matches is not None: - pulumi.set(__self__, "prefix_matches", prefix_matches) + _setter("prefix_matches", prefix_matches) @property @pulumi.getter(name="blobTypes") @@ -1915,12 +2611,33 @@ def __init__(__self__, *, :param pulumi.Input[str] id: Specifies the Object ID of the Azure Active Directory User or Group that the entry relates to. Only valid for `user` or `group` entries. :param pulumi.Input[str] scope: Specifies whether the ACE represents an `access` entry or a `default` entry. Default value is `access`. """ - pulumi.set(__self__, "permissions", permissions) - pulumi.set(__self__, "type", type) + DataLakeGen2FilesystemAceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + permissions=permissions, + type=type, + id=id, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + permissions: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if permissions is None: + raise TypeError("Missing 'permissions' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("permissions", permissions) + _setter("type", type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter @@ -1985,12 +2702,33 @@ def __init__(__self__, *, :param pulumi.Input[str] id: Specifies the Object ID of the Azure Active Directory User or Group that the entry relates to. Only valid for `user` or `group` entries. :param pulumi.Input[str] scope: Specifies whether the ACE represents an `access` entry or a `default` entry. Default value is `access`. """ - pulumi.set(__self__, "permissions", permissions) - pulumi.set(__self__, "type", type) + DataLakeGen2PathAceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + permissions=permissions, + type=type, + id=id, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + permissions: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if permissions is None: + raise TypeError("Missing 'permissions' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("permissions", permissions) + _setter("type", type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter @@ -2049,9 +2787,32 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_name: The container name (when `service` is set to `blob`) or the file share name (when `service` is set to `file`), used by the Storage Account Local User. :param pulumi.Input[str] service: The storage service used by this Storage Account Local User. Possible values are `blob` and `file`. """ - pulumi.set(__self__, "permissions", permissions) - pulumi.set(__self__, "resource_name", resource_name) - pulumi.set(__self__, "service", service) + LocalUserPermissionScopeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + permissions=permissions, + resource_name=resource_name, + service=service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + permissions: Optional[pulumi.Input['LocalUserPermissionScopePermissionsArgs']] = None, + resource_name: Optional[pulumi.Input[str]] = None, + service: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if permissions is None: + raise TypeError("Missing 'permissions' argument") + if resource_name is None and 'resourceName' in kwargs: + resource_name = kwargs['resourceName'] + if resource_name is None: + raise TypeError("Missing 'resource_name' argument") + if service is None: + raise TypeError("Missing 'service' argument") + + _setter("permissions", permissions) + _setter("resource_name", resource_name) + _setter("service", service) @property @pulumi.getter @@ -2105,16 +2866,35 @@ def __init__(__self__, *, :param pulumi.Input[bool] read: Specifies if the Local User has the read permission for this scope. Defaults to `false`. :param pulumi.Input[bool] write: Specifies if the Local User has the write permission for this scope. Defaults to `false`. """ + LocalUserPermissionScopePermissionsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + create=create, + delete=delete, + list=list, + read=read, + write=write, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create: Optional[pulumi.Input[bool]] = None, + delete: Optional[pulumi.Input[bool]] = None, + list: Optional[pulumi.Input[bool]] = None, + read: Optional[pulumi.Input[bool]] = None, + write: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create is not None: - pulumi.set(__self__, "create", create) + _setter("create", create) if delete is not None: - pulumi.set(__self__, "delete", delete) + _setter("delete", delete) if list is not None: - pulumi.set(__self__, "list", list) + _setter("list", list) if read is not None: - pulumi.set(__self__, "read", read) + _setter("read", read) if write is not None: - pulumi.set(__self__, "write", write) + _setter("write", write) @property @pulumi.getter @@ -2186,9 +2966,24 @@ def __init__(__self__, *, :param pulumi.Input[str] key: The public key value of this SSH authorized key. :param pulumi.Input[str] description: The description of this SSH authorized key. """ - pulumi.set(__self__, "key", key) + LocalUserSshAuthorizedKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + description=description, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) @property @pulumi.getter @@ -2228,10 +3023,35 @@ def __init__(__self__, *, :param pulumi.Input['ManagementPolicyRuleFiltersArgs'] filters: A `filters` block as documented below. :param pulumi.Input[str] name: The name of the rule. Rule name is case-sensitive. It must be unique within a policy. """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "filters", filters) - pulumi.set(__self__, "name", name) + ManagementPolicyRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + enabled=enabled, + filters=filters, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[pulumi.Input['ManagementPolicyRuleActionsArgs']] = None, + enabled: Optional[pulumi.Input[bool]] = None, + filters: Optional[pulumi.Input['ManagementPolicyRuleFiltersArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if filters is None: + raise TypeError("Missing 'filters' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("actions", actions) + _setter("enabled", enabled) + _setter("filters", filters) + _setter("name", name) @property @pulumi.getter @@ -2293,12 +3113,29 @@ def __init__(__self__, *, :param pulumi.Input['ManagementPolicyRuleActionsSnapshotArgs'] snapshot: A `snapshot` block as documented below. :param pulumi.Input['ManagementPolicyRuleActionsVersionArgs'] version: A `version` block as documented below. """ + ManagementPolicyRuleActionsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + base_blob=base_blob, + snapshot=snapshot, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + base_blob: Optional[pulumi.Input['ManagementPolicyRuleActionsBaseBlobArgs']] = None, + snapshot: Optional[pulumi.Input['ManagementPolicyRuleActionsSnapshotArgs']] = None, + version: Optional[pulumi.Input['ManagementPolicyRuleActionsVersionArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if base_blob is None and 'baseBlob' in kwargs: + base_blob = kwargs['baseBlob'] + if base_blob is not None: - pulumi.set(__self__, "base_blob", base_blob) + _setter("base_blob", base_blob) if snapshot is not None: - pulumi.set(__self__, "snapshot", snapshot) + _setter("snapshot", snapshot) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="baseBlob") @@ -2382,34 +3219,99 @@ def __init__(__self__, *, :param pulumi.Input[int] tier_to_cool_after_days_since_last_access_time_greater_than: The age in days after last access time to tier blobs to cool storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. :param pulumi.Input[int] tier_to_cool_after_days_since_modification_greater_than: The age in days after last modification to tier blobs to cool storage. Supports blob currently at Hot tier. Must be between 0 and 99999. Defaults to `-1`. """ + ManagementPolicyRuleActionsBaseBlobArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_tier_to_hot_from_cool_enabled=auto_tier_to_hot_from_cool_enabled, + delete_after_days_since_creation_greater_than=delete_after_days_since_creation_greater_than, + delete_after_days_since_last_access_time_greater_than=delete_after_days_since_last_access_time_greater_than, + delete_after_days_since_modification_greater_than=delete_after_days_since_modification_greater_than, + tier_to_archive_after_days_since_creation_greater_than=tier_to_archive_after_days_since_creation_greater_than, + tier_to_archive_after_days_since_last_access_time_greater_than=tier_to_archive_after_days_since_last_access_time_greater_than, + tier_to_archive_after_days_since_last_tier_change_greater_than=tier_to_archive_after_days_since_last_tier_change_greater_than, + tier_to_archive_after_days_since_modification_greater_than=tier_to_archive_after_days_since_modification_greater_than, + tier_to_cold_after_days_since_creation_greater_than=tier_to_cold_after_days_since_creation_greater_than, + tier_to_cold_after_days_since_last_access_time_greater_than=tier_to_cold_after_days_since_last_access_time_greater_than, + tier_to_cold_after_days_since_modification_greater_than=tier_to_cold_after_days_since_modification_greater_than, + tier_to_cool_after_days_since_creation_greater_than=tier_to_cool_after_days_since_creation_greater_than, + tier_to_cool_after_days_since_last_access_time_greater_than=tier_to_cool_after_days_since_last_access_time_greater_than, + tier_to_cool_after_days_since_modification_greater_than=tier_to_cool_after_days_since_modification_greater_than, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_tier_to_hot_from_cool_enabled: Optional[pulumi.Input[bool]] = None, + delete_after_days_since_creation_greater_than: Optional[pulumi.Input[int]] = None, + delete_after_days_since_last_access_time_greater_than: Optional[pulumi.Input[int]] = None, + delete_after_days_since_modification_greater_than: Optional[pulumi.Input[int]] = None, + tier_to_archive_after_days_since_creation_greater_than: Optional[pulumi.Input[int]] = None, + tier_to_archive_after_days_since_last_access_time_greater_than: Optional[pulumi.Input[int]] = None, + tier_to_archive_after_days_since_last_tier_change_greater_than: Optional[pulumi.Input[int]] = None, + tier_to_archive_after_days_since_modification_greater_than: Optional[pulumi.Input[int]] = None, + tier_to_cold_after_days_since_creation_greater_than: Optional[pulumi.Input[int]] = None, + tier_to_cold_after_days_since_last_access_time_greater_than: Optional[pulumi.Input[int]] = None, + tier_to_cold_after_days_since_modification_greater_than: Optional[pulumi.Input[int]] = None, + tier_to_cool_after_days_since_creation_greater_than: Optional[pulumi.Input[int]] = None, + tier_to_cool_after_days_since_last_access_time_greater_than: Optional[pulumi.Input[int]] = None, + tier_to_cool_after_days_since_modification_greater_than: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_tier_to_hot_from_cool_enabled is None and 'autoTierToHotFromCoolEnabled' in kwargs: + auto_tier_to_hot_from_cool_enabled = kwargs['autoTierToHotFromCoolEnabled'] + if delete_after_days_since_creation_greater_than is None and 'deleteAfterDaysSinceCreationGreaterThan' in kwargs: + delete_after_days_since_creation_greater_than = kwargs['deleteAfterDaysSinceCreationGreaterThan'] + if delete_after_days_since_last_access_time_greater_than is None and 'deleteAfterDaysSinceLastAccessTimeGreaterThan' in kwargs: + delete_after_days_since_last_access_time_greater_than = kwargs['deleteAfterDaysSinceLastAccessTimeGreaterThan'] + if delete_after_days_since_modification_greater_than is None and 'deleteAfterDaysSinceModificationGreaterThan' in kwargs: + delete_after_days_since_modification_greater_than = kwargs['deleteAfterDaysSinceModificationGreaterThan'] + if tier_to_archive_after_days_since_creation_greater_than is None and 'tierToArchiveAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_archive_after_days_since_creation_greater_than = kwargs['tierToArchiveAfterDaysSinceCreationGreaterThan'] + if tier_to_archive_after_days_since_last_access_time_greater_than is None and 'tierToArchiveAfterDaysSinceLastAccessTimeGreaterThan' in kwargs: + tier_to_archive_after_days_since_last_access_time_greater_than = kwargs['tierToArchiveAfterDaysSinceLastAccessTimeGreaterThan'] + if tier_to_archive_after_days_since_last_tier_change_greater_than is None and 'tierToArchiveAfterDaysSinceLastTierChangeGreaterThan' in kwargs: + tier_to_archive_after_days_since_last_tier_change_greater_than = kwargs['tierToArchiveAfterDaysSinceLastTierChangeGreaterThan'] + if tier_to_archive_after_days_since_modification_greater_than is None and 'tierToArchiveAfterDaysSinceModificationGreaterThan' in kwargs: + tier_to_archive_after_days_since_modification_greater_than = kwargs['tierToArchiveAfterDaysSinceModificationGreaterThan'] + if tier_to_cold_after_days_since_creation_greater_than is None and 'tierToColdAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_cold_after_days_since_creation_greater_than = kwargs['tierToColdAfterDaysSinceCreationGreaterThan'] + if tier_to_cold_after_days_since_last_access_time_greater_than is None and 'tierToColdAfterDaysSinceLastAccessTimeGreaterThan' in kwargs: + tier_to_cold_after_days_since_last_access_time_greater_than = kwargs['tierToColdAfterDaysSinceLastAccessTimeGreaterThan'] + if tier_to_cold_after_days_since_modification_greater_than is None and 'tierToColdAfterDaysSinceModificationGreaterThan' in kwargs: + tier_to_cold_after_days_since_modification_greater_than = kwargs['tierToColdAfterDaysSinceModificationGreaterThan'] + if tier_to_cool_after_days_since_creation_greater_than is None and 'tierToCoolAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_cool_after_days_since_creation_greater_than = kwargs['tierToCoolAfterDaysSinceCreationGreaterThan'] + if tier_to_cool_after_days_since_last_access_time_greater_than is None and 'tierToCoolAfterDaysSinceLastAccessTimeGreaterThan' in kwargs: + tier_to_cool_after_days_since_last_access_time_greater_than = kwargs['tierToCoolAfterDaysSinceLastAccessTimeGreaterThan'] + if tier_to_cool_after_days_since_modification_greater_than is None and 'tierToCoolAfterDaysSinceModificationGreaterThan' in kwargs: + tier_to_cool_after_days_since_modification_greater_than = kwargs['tierToCoolAfterDaysSinceModificationGreaterThan'] + if auto_tier_to_hot_from_cool_enabled is not None: - pulumi.set(__self__, "auto_tier_to_hot_from_cool_enabled", auto_tier_to_hot_from_cool_enabled) + _setter("auto_tier_to_hot_from_cool_enabled", auto_tier_to_hot_from_cool_enabled) if delete_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "delete_after_days_since_creation_greater_than", delete_after_days_since_creation_greater_than) + _setter("delete_after_days_since_creation_greater_than", delete_after_days_since_creation_greater_than) if delete_after_days_since_last_access_time_greater_than is not None: - pulumi.set(__self__, "delete_after_days_since_last_access_time_greater_than", delete_after_days_since_last_access_time_greater_than) + _setter("delete_after_days_since_last_access_time_greater_than", delete_after_days_since_last_access_time_greater_than) if delete_after_days_since_modification_greater_than is not None: - pulumi.set(__self__, "delete_after_days_since_modification_greater_than", delete_after_days_since_modification_greater_than) + _setter("delete_after_days_since_modification_greater_than", delete_after_days_since_modification_greater_than) if tier_to_archive_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "tier_to_archive_after_days_since_creation_greater_than", tier_to_archive_after_days_since_creation_greater_than) + _setter("tier_to_archive_after_days_since_creation_greater_than", tier_to_archive_after_days_since_creation_greater_than) if tier_to_archive_after_days_since_last_access_time_greater_than is not None: - pulumi.set(__self__, "tier_to_archive_after_days_since_last_access_time_greater_than", tier_to_archive_after_days_since_last_access_time_greater_than) + _setter("tier_to_archive_after_days_since_last_access_time_greater_than", tier_to_archive_after_days_since_last_access_time_greater_than) if tier_to_archive_after_days_since_last_tier_change_greater_than is not None: - pulumi.set(__self__, "tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) + _setter("tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) if tier_to_archive_after_days_since_modification_greater_than is not None: - pulumi.set(__self__, "tier_to_archive_after_days_since_modification_greater_than", tier_to_archive_after_days_since_modification_greater_than) + _setter("tier_to_archive_after_days_since_modification_greater_than", tier_to_archive_after_days_since_modification_greater_than) if tier_to_cold_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) + _setter("tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) if tier_to_cold_after_days_since_last_access_time_greater_than is not None: - pulumi.set(__self__, "tier_to_cold_after_days_since_last_access_time_greater_than", tier_to_cold_after_days_since_last_access_time_greater_than) + _setter("tier_to_cold_after_days_since_last_access_time_greater_than", tier_to_cold_after_days_since_last_access_time_greater_than) if tier_to_cold_after_days_since_modification_greater_than is not None: - pulumi.set(__self__, "tier_to_cold_after_days_since_modification_greater_than", tier_to_cold_after_days_since_modification_greater_than) + _setter("tier_to_cold_after_days_since_modification_greater_than", tier_to_cold_after_days_since_modification_greater_than) if tier_to_cool_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "tier_to_cool_after_days_since_creation_greater_than", tier_to_cool_after_days_since_creation_greater_than) + _setter("tier_to_cool_after_days_since_creation_greater_than", tier_to_cool_after_days_since_creation_greater_than) if tier_to_cool_after_days_since_last_access_time_greater_than is not None: - pulumi.set(__self__, "tier_to_cool_after_days_since_last_access_time_greater_than", tier_to_cool_after_days_since_last_access_time_greater_than) + _setter("tier_to_cool_after_days_since_last_access_time_greater_than", tier_to_cool_after_days_since_last_access_time_greater_than) if tier_to_cool_after_days_since_modification_greater_than is not None: - pulumi.set(__self__, "tier_to_cool_after_days_since_modification_greater_than", tier_to_cool_after_days_since_modification_greater_than) + _setter("tier_to_cool_after_days_since_modification_greater_than", tier_to_cool_after_days_since_modification_greater_than) @property @pulumi.getter(name="autoTierToHotFromCoolEnabled") @@ -2607,16 +3509,45 @@ def __init__(__self__, *, :param pulumi.Input[int] tier_to_archive_after_days_since_last_tier_change_greater_than: The age in days after last tier change to the blobs to skip to be archved. Must be between 0 and 99999. Defaults to `-1`. :param pulumi.Input[int] tier_to_cold_after_days_since_creation_greater_than: The age in days after creation to cold storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. """ + ManagementPolicyRuleActionsSnapshotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + change_tier_to_archive_after_days_since_creation=change_tier_to_archive_after_days_since_creation, + change_tier_to_cool_after_days_since_creation=change_tier_to_cool_after_days_since_creation, + delete_after_days_since_creation_greater_than=delete_after_days_since_creation_greater_than, + tier_to_archive_after_days_since_last_tier_change_greater_than=tier_to_archive_after_days_since_last_tier_change_greater_than, + tier_to_cold_after_days_since_creation_greater_than=tier_to_cold_after_days_since_creation_greater_than, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + change_tier_to_archive_after_days_since_creation: Optional[pulumi.Input[int]] = None, + change_tier_to_cool_after_days_since_creation: Optional[pulumi.Input[int]] = None, + delete_after_days_since_creation_greater_than: Optional[pulumi.Input[int]] = None, + tier_to_archive_after_days_since_last_tier_change_greater_than: Optional[pulumi.Input[int]] = None, + tier_to_cold_after_days_since_creation_greater_than: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if change_tier_to_archive_after_days_since_creation is None and 'changeTierToArchiveAfterDaysSinceCreation' in kwargs: + change_tier_to_archive_after_days_since_creation = kwargs['changeTierToArchiveAfterDaysSinceCreation'] + if change_tier_to_cool_after_days_since_creation is None and 'changeTierToCoolAfterDaysSinceCreation' in kwargs: + change_tier_to_cool_after_days_since_creation = kwargs['changeTierToCoolAfterDaysSinceCreation'] + if delete_after_days_since_creation_greater_than is None and 'deleteAfterDaysSinceCreationGreaterThan' in kwargs: + delete_after_days_since_creation_greater_than = kwargs['deleteAfterDaysSinceCreationGreaterThan'] + if tier_to_archive_after_days_since_last_tier_change_greater_than is None and 'tierToArchiveAfterDaysSinceLastTierChangeGreaterThan' in kwargs: + tier_to_archive_after_days_since_last_tier_change_greater_than = kwargs['tierToArchiveAfterDaysSinceLastTierChangeGreaterThan'] + if tier_to_cold_after_days_since_creation_greater_than is None and 'tierToColdAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_cold_after_days_since_creation_greater_than = kwargs['tierToColdAfterDaysSinceCreationGreaterThan'] + if change_tier_to_archive_after_days_since_creation is not None: - pulumi.set(__self__, "change_tier_to_archive_after_days_since_creation", change_tier_to_archive_after_days_since_creation) + _setter("change_tier_to_archive_after_days_since_creation", change_tier_to_archive_after_days_since_creation) if change_tier_to_cool_after_days_since_creation is not None: - pulumi.set(__self__, "change_tier_to_cool_after_days_since_creation", change_tier_to_cool_after_days_since_creation) + _setter("change_tier_to_cool_after_days_since_creation", change_tier_to_cool_after_days_since_creation) if delete_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "delete_after_days_since_creation_greater_than", delete_after_days_since_creation_greater_than) + _setter("delete_after_days_since_creation_greater_than", delete_after_days_since_creation_greater_than) if tier_to_archive_after_days_since_last_tier_change_greater_than is not None: - pulumi.set(__self__, "tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) + _setter("tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) if tier_to_cold_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) + _setter("tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) @property @pulumi.getter(name="changeTierToArchiveAfterDaysSinceCreation") @@ -2694,16 +3625,45 @@ def __init__(__self__, *, :param pulumi.Input[int] tier_to_archive_after_days_since_last_tier_change_greater_than: The age in days after last tier change to the blobs to skip to be archved. Must be between 0 and 99999. Defaults to `-1`. :param pulumi.Input[int] tier_to_cold_after_days_since_creation_greater_than: The age in days after creation to cold storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. """ + ManagementPolicyRuleActionsVersionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + change_tier_to_archive_after_days_since_creation=change_tier_to_archive_after_days_since_creation, + change_tier_to_cool_after_days_since_creation=change_tier_to_cool_after_days_since_creation, + delete_after_days_since_creation=delete_after_days_since_creation, + tier_to_archive_after_days_since_last_tier_change_greater_than=tier_to_archive_after_days_since_last_tier_change_greater_than, + tier_to_cold_after_days_since_creation_greater_than=tier_to_cold_after_days_since_creation_greater_than, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + change_tier_to_archive_after_days_since_creation: Optional[pulumi.Input[int]] = None, + change_tier_to_cool_after_days_since_creation: Optional[pulumi.Input[int]] = None, + delete_after_days_since_creation: Optional[pulumi.Input[int]] = None, + tier_to_archive_after_days_since_last_tier_change_greater_than: Optional[pulumi.Input[int]] = None, + tier_to_cold_after_days_since_creation_greater_than: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if change_tier_to_archive_after_days_since_creation is None and 'changeTierToArchiveAfterDaysSinceCreation' in kwargs: + change_tier_to_archive_after_days_since_creation = kwargs['changeTierToArchiveAfterDaysSinceCreation'] + if change_tier_to_cool_after_days_since_creation is None and 'changeTierToCoolAfterDaysSinceCreation' in kwargs: + change_tier_to_cool_after_days_since_creation = kwargs['changeTierToCoolAfterDaysSinceCreation'] + if delete_after_days_since_creation is None and 'deleteAfterDaysSinceCreation' in kwargs: + delete_after_days_since_creation = kwargs['deleteAfterDaysSinceCreation'] + if tier_to_archive_after_days_since_last_tier_change_greater_than is None and 'tierToArchiveAfterDaysSinceLastTierChangeGreaterThan' in kwargs: + tier_to_archive_after_days_since_last_tier_change_greater_than = kwargs['tierToArchiveAfterDaysSinceLastTierChangeGreaterThan'] + if tier_to_cold_after_days_since_creation_greater_than is None and 'tierToColdAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_cold_after_days_since_creation_greater_than = kwargs['tierToColdAfterDaysSinceCreationGreaterThan'] + if change_tier_to_archive_after_days_since_creation is not None: - pulumi.set(__self__, "change_tier_to_archive_after_days_since_creation", change_tier_to_archive_after_days_since_creation) + _setter("change_tier_to_archive_after_days_since_creation", change_tier_to_archive_after_days_since_creation) if change_tier_to_cool_after_days_since_creation is not None: - pulumi.set(__self__, "change_tier_to_cool_after_days_since_creation", change_tier_to_cool_after_days_since_creation) + _setter("change_tier_to_cool_after_days_since_creation", change_tier_to_cool_after_days_since_creation) if delete_after_days_since_creation is not None: - pulumi.set(__self__, "delete_after_days_since_creation", delete_after_days_since_creation) + _setter("delete_after_days_since_creation", delete_after_days_since_creation) if tier_to_archive_after_days_since_last_tier_change_greater_than is not None: - pulumi.set(__self__, "tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) + _setter("tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) if tier_to_cold_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) + _setter("tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) @property @pulumi.getter(name="changeTierToArchiveAfterDaysSinceCreation") @@ -2779,11 +3739,34 @@ def __init__(__self__, *, > **NOTE:** The `match_blob_index_tag` property requires enabling the `blobIndex` feature with [PSH or CLI commands](https://azure.microsoft.com/en-us/blog/manage-and-find-data-with-blob-index-for-azure-storage-now-in-preview/). :param pulumi.Input[Sequence[pulumi.Input[str]]] prefix_matches: An array of strings for prefixes to be matched. """ - pulumi.set(__self__, "blob_types", blob_types) + ManagementPolicyRuleFiltersArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_types=blob_types, + match_blob_index_tags=match_blob_index_tags, + prefix_matches=prefix_matches, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + match_blob_index_tags: Optional[pulumi.Input[Sequence[pulumi.Input['ManagementPolicyRuleFiltersMatchBlobIndexTagArgs']]]] = None, + prefix_matches: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_types is None and 'blobTypes' in kwargs: + blob_types = kwargs['blobTypes'] + if blob_types is None: + raise TypeError("Missing 'blob_types' argument") + if match_blob_index_tags is None and 'matchBlobIndexTags' in kwargs: + match_blob_index_tags = kwargs['matchBlobIndexTags'] + if prefix_matches is None and 'prefixMatches' in kwargs: + prefix_matches = kwargs['prefixMatches'] + + _setter("blob_types", blob_types) if match_blob_index_tags is not None: - pulumi.set(__self__, "match_blob_index_tags", match_blob_index_tags) + _setter("match_blob_index_tags", match_blob_index_tags) if prefix_matches is not None: - pulumi.set(__self__, "prefix_matches", prefix_matches) + _setter("prefix_matches", prefix_matches) @property @pulumi.getter(name="blobTypes") @@ -2835,10 +3818,29 @@ def __init__(__self__, *, :param pulumi.Input[str] value: The filter tag value used for tag based filtering for blob objects. :param pulumi.Input[str] operation: The comparison operator which is used for object comparison and filtering. Possible value is `==`. Defaults to `==`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + ManagementPolicyRuleFiltersMatchBlobIndexTagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + operation=operation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + operation: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) if operation is not None: - pulumi.set(__self__, "operation", operation) + _setter("operation", operation) @property @pulumi.getter @@ -2891,14 +3893,45 @@ def __init__(__self__, *, :param pulumi.Input[str] copy_blobs_created_after: The time after which the Block Blobs created will be copies to the destination. Possible values are `OnlyNewObjects`, `Everything` and time in RFC3339 format: `2006-01-02T15:04:00Z`. :param pulumi.Input[Sequence[pulumi.Input[str]]] filter_out_blobs_with_prefixes: Specifies a list of filters prefixes, the blobs whose names begin with which will be replicated. """ - pulumi.set(__self__, "destination_container_name", destination_container_name) - pulumi.set(__self__, "source_container_name", source_container_name) + ObjectReplicationRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_container_name=destination_container_name, + source_container_name=source_container_name, + copy_blobs_created_after=copy_blobs_created_after, + filter_out_blobs_with_prefixes=filter_out_blobs_with_prefixes, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_container_name: Optional[pulumi.Input[str]] = None, + source_container_name: Optional[pulumi.Input[str]] = None, + copy_blobs_created_after: Optional[pulumi.Input[str]] = None, + filter_out_blobs_with_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_container_name is None and 'destinationContainerName' in kwargs: + destination_container_name = kwargs['destinationContainerName'] + if destination_container_name is None: + raise TypeError("Missing 'destination_container_name' argument") + if source_container_name is None and 'sourceContainerName' in kwargs: + source_container_name = kwargs['sourceContainerName'] + if source_container_name is None: + raise TypeError("Missing 'source_container_name' argument") + if copy_blobs_created_after is None and 'copyBlobsCreatedAfter' in kwargs: + copy_blobs_created_after = kwargs['copyBlobsCreatedAfter'] + if filter_out_blobs_with_prefixes is None and 'filterOutBlobsWithPrefixes' in kwargs: + filter_out_blobs_with_prefixes = kwargs['filterOutBlobsWithPrefixes'] + + _setter("destination_container_name", destination_container_name) + _setter("source_container_name", source_container_name) if copy_blobs_created_after is not None: - pulumi.set(__self__, "copy_blobs_created_after", copy_blobs_created_after) + _setter("copy_blobs_created_after", copy_blobs_created_after) if filter_out_blobs_with_prefixes is not None: - pulumi.set(__self__, "filter_out_blobs_with_prefixes", filter_out_blobs_with_prefixes) + _setter("filter_out_blobs_with_prefixes", filter_out_blobs_with_prefixes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="destinationContainerName") @@ -2967,9 +4000,26 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID which should be used for this Shared Identifier. :param pulumi.Input[Sequence[pulumi.Input['ShareAclAccessPolicyArgs']]] access_policies: An `access_policy` block as defined below. """ - pulumi.set(__self__, "id", id) + ShareAclArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + access_policies=access_policies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + access_policies: Optional[pulumi.Input[Sequence[pulumi.Input['ShareAclAccessPolicyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if access_policies is None and 'accessPolicies' in kwargs: + access_policies = kwargs['accessPolicies'] + + _setter("id", id) if access_policies is not None: - pulumi.set(__self__, "access_policies", access_policies) + _setter("access_policies", access_policies) @property @pulumi.getter @@ -3009,11 +4059,28 @@ def __init__(__self__, *, :param pulumi.Input[str] expiry: The time at which this Access Policy should be valid until, in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format. :param pulumi.Input[str] start: The time at which this Access Policy should be valid from, in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format. """ - pulumi.set(__self__, "permissions", permissions) + ShareAclAccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + permissions=permissions, + expiry=expiry, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + permissions: Optional[pulumi.Input[str]] = None, + expiry: Optional[pulumi.Input[str]] = None, + start: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if permissions is None: + raise TypeError("Missing 'permissions' argument") + + _setter("permissions", permissions) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if start is not None: - pulumi.set(__self__, "start", start) + _setter("start", start) @property @pulumi.getter @@ -3063,9 +4130,26 @@ def __init__(__self__, *, :param pulumi.Input[str] id: The ID which should be used for this Shared Identifier. :param pulumi.Input[Sequence[pulumi.Input['TableAclAccessPolicyArgs']]] access_policies: An `access_policy` block as defined below. """ - pulumi.set(__self__, "id", id) + TableAclArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + access_policies=access_policies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + access_policies: Optional[pulumi.Input[Sequence[pulumi.Input['TableAclAccessPolicyArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if access_policies is None and 'accessPolicies' in kwargs: + access_policies = kwargs['accessPolicies'] + + _setter("id", id) if access_policies is not None: - pulumi.set(__self__, "access_policies", access_policies) + _setter("access_policies", access_policies) @property @pulumi.getter @@ -3103,9 +4187,30 @@ def __init__(__self__, *, :param pulumi.Input[str] permissions: The permissions which should associated with this Shared Identifier. :param pulumi.Input[str] start: The ISO8061 UTC time at which this Access Policy should be valid from. """ - pulumi.set(__self__, "expiry", expiry) - pulumi.set(__self__, "permissions", permissions) - pulumi.set(__self__, "start", start) + TableAclAccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiry=expiry, + permissions=permissions, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiry: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[str]] = None, + start: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiry is None: + raise TypeError("Missing 'expiry' argument") + if permissions is None: + raise TypeError("Missing 'permissions' argument") + if start is None: + raise TypeError("Missing 'start' argument") + + _setter("expiry", expiry) + _setter("permissions", permissions) + _setter("start", start) @property @pulumi.getter @@ -3164,12 +4269,45 @@ def __init__(__self__, *, :param bool read: Should Read permissions be enabled for this SAS? :param bool write: Should Write permissions be enabled for this SAS? """ - pulumi.set(__self__, "add", add) - pulumi.set(__self__, "create", create) - pulumi.set(__self__, "delete", delete) - pulumi.set(__self__, "list", list) - pulumi.set(__self__, "read", read) - pulumi.set(__self__, "write", write) + GetAccountBlobContainerSASPermissionsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + add=add, + create=create, + delete=delete, + list=list, + read=read, + write=write, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + add: Optional[bool] = None, + create: Optional[bool] = None, + delete: Optional[bool] = None, + list: Optional[bool] = None, + read: Optional[bool] = None, + write: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if add is None: + raise TypeError("Missing 'add' argument") + if create is None: + raise TypeError("Missing 'create' argument") + if delete is None: + raise TypeError("Missing 'delete' argument") + if list is None: + raise TypeError("Missing 'list' argument") + if read is None: + raise TypeError("Missing 'read' argument") + if write is None: + raise TypeError("Missing 'write' argument") + + _setter("add", add) + _setter("create", create) + _setter("delete", delete) + _setter("list", list) + _setter("read", read) + _setter("write", write) @property @pulumi.getter @@ -3275,16 +4413,65 @@ def __init__(__self__, *, :param bool update: Should Update permissions be enabled for this SAS? :param bool write: Should Write permissions be enabled for this SAS? """ - pulumi.set(__self__, "add", add) - pulumi.set(__self__, "create", create) - pulumi.set(__self__, "delete", delete) - pulumi.set(__self__, "filter", filter) - pulumi.set(__self__, "list", list) - pulumi.set(__self__, "process", process) - pulumi.set(__self__, "read", read) - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "update", update) - pulumi.set(__self__, "write", write) + GetAccountSASPermissionsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + add=add, + create=create, + delete=delete, + filter=filter, + list=list, + process=process, + read=read, + tag=tag, + update=update, + write=write, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + add: Optional[bool] = None, + create: Optional[bool] = None, + delete: Optional[bool] = None, + filter: Optional[bool] = None, + list: Optional[bool] = None, + process: Optional[bool] = None, + read: Optional[bool] = None, + tag: Optional[bool] = None, + update: Optional[bool] = None, + write: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if add is None: + raise TypeError("Missing 'add' argument") + if create is None: + raise TypeError("Missing 'create' argument") + if delete is None: + raise TypeError("Missing 'delete' argument") + if filter is None: + raise TypeError("Missing 'filter' argument") + if list is None: + raise TypeError("Missing 'list' argument") + if process is None: + raise TypeError("Missing 'process' argument") + if read is None: + raise TypeError("Missing 'read' argument") + if tag is None: + raise TypeError("Missing 'tag' argument") + if update is None: + raise TypeError("Missing 'update' argument") + if write is None: + raise TypeError("Missing 'write' argument") + + _setter("add", add) + _setter("create", create) + _setter("delete", delete) + _setter("filter", filter) + _setter("list", list) + _setter("process", process) + _setter("read", read) + _setter("tag", tag) + _setter("update", update) + _setter("write", write) @property @pulumi.getter @@ -3421,9 +4608,30 @@ def __init__(__self__, *, :param bool object: Should permission be granted only to a specific object? :param bool service: Should permission be granted to the entire service? """ - pulumi.set(__self__, "container", container) - pulumi.set(__self__, "object", object) - pulumi.set(__self__, "service", service) + GetAccountSASResourceTypesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container=container, + object=object, + service=service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container: Optional[bool] = None, + object: Optional[bool] = None, + service: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container is None: + raise TypeError("Missing 'container' argument") + if object is None: + raise TypeError("Missing 'object' argument") + if service is None: + raise TypeError("Missing 'service' argument") + + _setter("container", container) + _setter("object", object) + _setter("service", service) @property @pulumi.getter @@ -3475,10 +4683,35 @@ def __init__(__self__, *, :param bool queue: Should permission be granted to `queue` services within this storage account? :param bool table: Should permission be granted to `table` services within this storage account? """ - pulumi.set(__self__, "blob", blob) - pulumi.set(__self__, "file", file) - pulumi.set(__self__, "queue", queue) - pulumi.set(__self__, "table", table) + GetAccountSASServicesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob=blob, + file=file, + queue=queue, + table=table, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob: Optional[bool] = None, + file: Optional[bool] = None, + queue: Optional[bool] = None, + table: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob is None: + raise TypeError("Missing 'blob' argument") + if file is None: + raise TypeError("Missing 'file' argument") + if queue is None: + raise TypeError("Missing 'queue' argument") + if table is None: + raise TypeError("Missing 'table' argument") + + _setter("blob", blob) + _setter("file", file) + _setter("queue", queue) + _setter("table", table) @property @pulumi.getter @@ -3538,8 +4771,27 @@ def __init__(__self__, *, :param Sequence['GetShareAclAccessPolicyArgs'] access_policies: An `access_policy` block as defined below. :param str id: The ID which should be used for this Shared Identifier. """ - pulumi.set(__self__, "access_policies", access_policies) - pulumi.set(__self__, "id", id) + GetShareAclArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_policies=access_policies, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_policies: Optional[Sequence['GetShareAclAccessPolicyArgs']] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_policies is None and 'accessPolicies' in kwargs: + access_policies = kwargs['accessPolicies'] + if access_policies is None: + raise TypeError("Missing 'access_policies' argument") + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("access_policies", access_policies) + _setter("id", id) @property @pulumi.getter(name="accessPolicies") @@ -3577,9 +4829,30 @@ def __init__(__self__, *, :param str permissions: The permissions which should be associated with this Shared Identifier. Possible value is combination of `r` (read), `w` (write), `d` (delete), and `l` (list). :param str start: The time at which this Access Policy should be valid from, in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format. """ - pulumi.set(__self__, "expiry", expiry) - pulumi.set(__self__, "permissions", permissions) - pulumi.set(__self__, "start", start) + GetShareAclAccessPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiry=expiry, + permissions=permissions, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiry: Optional[str] = None, + permissions: Optional[str] = None, + start: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiry is None: + raise TypeError("Missing 'expiry' argument") + if permissions is None: + raise TypeError("Missing 'permissions' argument") + if start is None: + raise TypeError("Missing 'start' argument") + + _setter("expiry", expiry) + _setter("permissions", permissions) + _setter("start", start) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/storage/account.py b/sdk/python/pulumi_azure/storage/account.py index ffd39ed406..877a8ea7bc 100644 --- a/sdk/python/pulumi_azure/storage/account.py +++ b/sdk/python/pulumi_azure/storage/account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -112,75 +112,224 @@ def __init__(__self__, *, > **NOTE:** For the `queue_encryption_key_type` and `table_encryption_key_type`, the `Account` key type is only allowed when the `account_kind` is set to `StorageV2` :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ - pulumi.set(__self__, "account_replication_type", account_replication_type) - pulumi.set(__self__, "account_tier", account_tier) - pulumi.set(__self__, "resource_group_name", resource_group_name) + AccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_replication_type=account_replication_type, + account_tier=account_tier, + resource_group_name=resource_group_name, + access_tier=access_tier, + account_kind=account_kind, + allow_nested_items_to_be_public=allow_nested_items_to_be_public, + allowed_copy_scope=allowed_copy_scope, + azure_files_authentication=azure_files_authentication, + blob_properties=blob_properties, + cross_tenant_replication_enabled=cross_tenant_replication_enabled, + custom_domain=custom_domain, + customer_managed_key=customer_managed_key, + default_to_oauth_authentication=default_to_oauth_authentication, + edge_zone=edge_zone, + enable_https_traffic_only=enable_https_traffic_only, + identity=identity, + immutability_policy=immutability_policy, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + is_hns_enabled=is_hns_enabled, + large_file_share_enabled=large_file_share_enabled, + location=location, + min_tls_version=min_tls_version, + name=name, + network_rules=network_rules, + nfsv3_enabled=nfsv3_enabled, + public_network_access_enabled=public_network_access_enabled, + queue_encryption_key_type=queue_encryption_key_type, + queue_properties=queue_properties, + routing=routing, + sas_policy=sas_policy, + sftp_enabled=sftp_enabled, + share_properties=share_properties, + shared_access_key_enabled=shared_access_key_enabled, + static_website=static_website, + table_encryption_key_type=table_encryption_key_type, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_replication_type: Optional[pulumi.Input[str]] = None, + account_tier: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + access_tier: Optional[pulumi.Input[str]] = None, + account_kind: Optional[pulumi.Input[str]] = None, + allow_nested_items_to_be_public: Optional[pulumi.Input[bool]] = None, + allowed_copy_scope: Optional[pulumi.Input[str]] = None, + azure_files_authentication: Optional[pulumi.Input['AccountAzureFilesAuthenticationArgs']] = None, + blob_properties: Optional[pulumi.Input['AccountBlobPropertiesArgs']] = None, + cross_tenant_replication_enabled: Optional[pulumi.Input[bool]] = None, + custom_domain: Optional[pulumi.Input['AccountCustomDomainArgs']] = None, + customer_managed_key: Optional[pulumi.Input['AccountCustomerManagedKeyArgs']] = None, + default_to_oauth_authentication: Optional[pulumi.Input[bool]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + enable_https_traffic_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + immutability_policy: Optional[pulumi.Input['AccountImmutabilityPolicyArgs']] = None, + infrastructure_encryption_enabled: Optional[pulumi.Input[bool]] = None, + is_hns_enabled: Optional[pulumi.Input[bool]] = None, + large_file_share_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + min_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_rules: Optional[pulumi.Input['AccountNetworkRulesArgs']] = None, + nfsv3_enabled: Optional[pulumi.Input[bool]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + queue_encryption_key_type: Optional[pulumi.Input[str]] = None, + queue_properties: Optional[pulumi.Input['AccountQueuePropertiesArgs']] = None, + routing: Optional[pulumi.Input['AccountRoutingArgs']] = None, + sas_policy: Optional[pulumi.Input['AccountSasPolicyArgs']] = None, + sftp_enabled: Optional[pulumi.Input[bool]] = None, + share_properties: Optional[pulumi.Input['AccountSharePropertiesArgs']] = None, + shared_access_key_enabled: Optional[pulumi.Input[bool]] = None, + static_website: Optional[pulumi.Input['AccountStaticWebsiteArgs']] = None, + table_encryption_key_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_replication_type is None and 'accountReplicationType' in kwargs: + account_replication_type = kwargs['accountReplicationType'] + if account_replication_type is None: + raise TypeError("Missing 'account_replication_type' argument") + if account_tier is None and 'accountTier' in kwargs: + account_tier = kwargs['accountTier'] + if account_tier is None: + raise TypeError("Missing 'account_tier' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if access_tier is None and 'accessTier' in kwargs: + access_tier = kwargs['accessTier'] + if account_kind is None and 'accountKind' in kwargs: + account_kind = kwargs['accountKind'] + if allow_nested_items_to_be_public is None and 'allowNestedItemsToBePublic' in kwargs: + allow_nested_items_to_be_public = kwargs['allowNestedItemsToBePublic'] + if allowed_copy_scope is None and 'allowedCopyScope' in kwargs: + allowed_copy_scope = kwargs['allowedCopyScope'] + if azure_files_authentication is None and 'azureFilesAuthentication' in kwargs: + azure_files_authentication = kwargs['azureFilesAuthentication'] + if blob_properties is None and 'blobProperties' in kwargs: + blob_properties = kwargs['blobProperties'] + if cross_tenant_replication_enabled is None and 'crossTenantReplicationEnabled' in kwargs: + cross_tenant_replication_enabled = kwargs['crossTenantReplicationEnabled'] + if custom_domain is None and 'customDomain' in kwargs: + custom_domain = kwargs['customDomain'] + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if default_to_oauth_authentication is None and 'defaultToOauthAuthentication' in kwargs: + default_to_oauth_authentication = kwargs['defaultToOauthAuthentication'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if enable_https_traffic_only is None and 'enableHttpsTrafficOnly' in kwargs: + enable_https_traffic_only = kwargs['enableHttpsTrafficOnly'] + if immutability_policy is None and 'immutabilityPolicy' in kwargs: + immutability_policy = kwargs['immutabilityPolicy'] + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + if is_hns_enabled is None and 'isHnsEnabled' in kwargs: + is_hns_enabled = kwargs['isHnsEnabled'] + if large_file_share_enabled is None and 'largeFileShareEnabled' in kwargs: + large_file_share_enabled = kwargs['largeFileShareEnabled'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if network_rules is None and 'networkRules' in kwargs: + network_rules = kwargs['networkRules'] + if nfsv3_enabled is None and 'nfsv3Enabled' in kwargs: + nfsv3_enabled = kwargs['nfsv3Enabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if queue_encryption_key_type is None and 'queueEncryptionKeyType' in kwargs: + queue_encryption_key_type = kwargs['queueEncryptionKeyType'] + if queue_properties is None and 'queueProperties' in kwargs: + queue_properties = kwargs['queueProperties'] + if sas_policy is None and 'sasPolicy' in kwargs: + sas_policy = kwargs['sasPolicy'] + if sftp_enabled is None and 'sftpEnabled' in kwargs: + sftp_enabled = kwargs['sftpEnabled'] + if share_properties is None and 'shareProperties' in kwargs: + share_properties = kwargs['shareProperties'] + if shared_access_key_enabled is None and 'sharedAccessKeyEnabled' in kwargs: + shared_access_key_enabled = kwargs['sharedAccessKeyEnabled'] + if static_website is None and 'staticWebsite' in kwargs: + static_website = kwargs['staticWebsite'] + if table_encryption_key_type is None and 'tableEncryptionKeyType' in kwargs: + table_encryption_key_type = kwargs['tableEncryptionKeyType'] + + _setter("account_replication_type", account_replication_type) + _setter("account_tier", account_tier) + _setter("resource_group_name", resource_group_name) if access_tier is not None: - pulumi.set(__self__, "access_tier", access_tier) + _setter("access_tier", access_tier) if account_kind is not None: - pulumi.set(__self__, "account_kind", account_kind) + _setter("account_kind", account_kind) if allow_nested_items_to_be_public is not None: - pulumi.set(__self__, "allow_nested_items_to_be_public", allow_nested_items_to_be_public) + _setter("allow_nested_items_to_be_public", allow_nested_items_to_be_public) if allowed_copy_scope is not None: - pulumi.set(__self__, "allowed_copy_scope", allowed_copy_scope) + _setter("allowed_copy_scope", allowed_copy_scope) if azure_files_authentication is not None: - pulumi.set(__self__, "azure_files_authentication", azure_files_authentication) + _setter("azure_files_authentication", azure_files_authentication) if blob_properties is not None: - pulumi.set(__self__, "blob_properties", blob_properties) + _setter("blob_properties", blob_properties) if cross_tenant_replication_enabled is not None: - pulumi.set(__self__, "cross_tenant_replication_enabled", cross_tenant_replication_enabled) + _setter("cross_tenant_replication_enabled", cross_tenant_replication_enabled) if custom_domain is not None: - pulumi.set(__self__, "custom_domain", custom_domain) + _setter("custom_domain", custom_domain) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if default_to_oauth_authentication is not None: - pulumi.set(__self__, "default_to_oauth_authentication", default_to_oauth_authentication) + _setter("default_to_oauth_authentication", default_to_oauth_authentication) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if enable_https_traffic_only is not None: - pulumi.set(__self__, "enable_https_traffic_only", enable_https_traffic_only) + _setter("enable_https_traffic_only", enable_https_traffic_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if immutability_policy is not None: - pulumi.set(__self__, "immutability_policy", immutability_policy) + _setter("immutability_policy", immutability_policy) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) if is_hns_enabled is not None: - pulumi.set(__self__, "is_hns_enabled", is_hns_enabled) + _setter("is_hns_enabled", is_hns_enabled) if large_file_share_enabled is not None: - pulumi.set(__self__, "large_file_share_enabled", large_file_share_enabled) + _setter("large_file_share_enabled", large_file_share_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_rules is not None: - pulumi.set(__self__, "network_rules", network_rules) + _setter("network_rules", network_rules) if nfsv3_enabled is not None: - pulumi.set(__self__, "nfsv3_enabled", nfsv3_enabled) + _setter("nfsv3_enabled", nfsv3_enabled) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if queue_encryption_key_type is not None: - pulumi.set(__self__, "queue_encryption_key_type", queue_encryption_key_type) + _setter("queue_encryption_key_type", queue_encryption_key_type) if queue_properties is not None: - pulumi.set(__self__, "queue_properties", queue_properties) + _setter("queue_properties", queue_properties) if routing is not None: - pulumi.set(__self__, "routing", routing) + _setter("routing", routing) if sas_policy is not None: - pulumi.set(__self__, "sas_policy", sas_policy) + _setter("sas_policy", sas_policy) if sftp_enabled is not None: - pulumi.set(__self__, "sftp_enabled", sftp_enabled) + _setter("sftp_enabled", sftp_enabled) if share_properties is not None: - pulumi.set(__self__, "share_properties", share_properties) + _setter("share_properties", share_properties) if shared_access_key_enabled is not None: - pulumi.set(__self__, "shared_access_key_enabled", shared_access_key_enabled) + _setter("shared_access_key_enabled", shared_access_key_enabled) if static_website is not None: - pulumi.set(__self__, "static_website", static_website) + _setter("static_website", static_website) if table_encryption_key_type is not None: - pulumi.set(__self__, "table_encryption_key_type", table_encryption_key_type) + _setter("table_encryption_key_type", table_encryption_key_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="accountReplicationType") @@ -797,142 +946,413 @@ def __init__(__self__, *, > **NOTE:** For the `queue_encryption_key_type` and `table_encryption_key_type`, the `Account` key type is only allowed when the `account_kind` is set to `StorageV2` :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. """ + _AccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_tier=access_tier, + account_kind=account_kind, + account_replication_type=account_replication_type, + account_tier=account_tier, + allow_nested_items_to_be_public=allow_nested_items_to_be_public, + allowed_copy_scope=allowed_copy_scope, + azure_files_authentication=azure_files_authentication, + blob_properties=blob_properties, + cross_tenant_replication_enabled=cross_tenant_replication_enabled, + custom_domain=custom_domain, + customer_managed_key=customer_managed_key, + default_to_oauth_authentication=default_to_oauth_authentication, + edge_zone=edge_zone, + enable_https_traffic_only=enable_https_traffic_only, + identity=identity, + immutability_policy=immutability_policy, + infrastructure_encryption_enabled=infrastructure_encryption_enabled, + is_hns_enabled=is_hns_enabled, + large_file_share_enabled=large_file_share_enabled, + location=location, + min_tls_version=min_tls_version, + name=name, + network_rules=network_rules, + nfsv3_enabled=nfsv3_enabled, + primary_access_key=primary_access_key, + primary_blob_connection_string=primary_blob_connection_string, + primary_blob_endpoint=primary_blob_endpoint, + primary_blob_host=primary_blob_host, + primary_connection_string=primary_connection_string, + primary_dfs_endpoint=primary_dfs_endpoint, + primary_dfs_host=primary_dfs_host, + primary_file_endpoint=primary_file_endpoint, + primary_file_host=primary_file_host, + primary_location=primary_location, + primary_queue_endpoint=primary_queue_endpoint, + primary_queue_host=primary_queue_host, + primary_table_endpoint=primary_table_endpoint, + primary_table_host=primary_table_host, + primary_web_endpoint=primary_web_endpoint, + primary_web_host=primary_web_host, + public_network_access_enabled=public_network_access_enabled, + queue_encryption_key_type=queue_encryption_key_type, + queue_properties=queue_properties, + resource_group_name=resource_group_name, + routing=routing, + sas_policy=sas_policy, + secondary_access_key=secondary_access_key, + secondary_blob_connection_string=secondary_blob_connection_string, + secondary_blob_endpoint=secondary_blob_endpoint, + secondary_blob_host=secondary_blob_host, + secondary_connection_string=secondary_connection_string, + secondary_dfs_endpoint=secondary_dfs_endpoint, + secondary_dfs_host=secondary_dfs_host, + secondary_file_endpoint=secondary_file_endpoint, + secondary_file_host=secondary_file_host, + secondary_location=secondary_location, + secondary_queue_endpoint=secondary_queue_endpoint, + secondary_queue_host=secondary_queue_host, + secondary_table_endpoint=secondary_table_endpoint, + secondary_table_host=secondary_table_host, + secondary_web_endpoint=secondary_web_endpoint, + secondary_web_host=secondary_web_host, + sftp_enabled=sftp_enabled, + share_properties=share_properties, + shared_access_key_enabled=shared_access_key_enabled, + static_website=static_website, + table_encryption_key_type=table_encryption_key_type, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_tier: Optional[pulumi.Input[str]] = None, + account_kind: Optional[pulumi.Input[str]] = None, + account_replication_type: Optional[pulumi.Input[str]] = None, + account_tier: Optional[pulumi.Input[str]] = None, + allow_nested_items_to_be_public: Optional[pulumi.Input[bool]] = None, + allowed_copy_scope: Optional[pulumi.Input[str]] = None, + azure_files_authentication: Optional[pulumi.Input['AccountAzureFilesAuthenticationArgs']] = None, + blob_properties: Optional[pulumi.Input['AccountBlobPropertiesArgs']] = None, + cross_tenant_replication_enabled: Optional[pulumi.Input[bool]] = None, + custom_domain: Optional[pulumi.Input['AccountCustomDomainArgs']] = None, + customer_managed_key: Optional[pulumi.Input['AccountCustomerManagedKeyArgs']] = None, + default_to_oauth_authentication: Optional[pulumi.Input[bool]] = None, + edge_zone: Optional[pulumi.Input[str]] = None, + enable_https_traffic_only: Optional[pulumi.Input[bool]] = None, + identity: Optional[pulumi.Input['AccountIdentityArgs']] = None, + immutability_policy: Optional[pulumi.Input['AccountImmutabilityPolicyArgs']] = None, + infrastructure_encryption_enabled: Optional[pulumi.Input[bool]] = None, + is_hns_enabled: Optional[pulumi.Input[bool]] = None, + large_file_share_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + min_tls_version: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + network_rules: Optional[pulumi.Input['AccountNetworkRulesArgs']] = None, + nfsv3_enabled: Optional[pulumi.Input[bool]] = None, + primary_access_key: Optional[pulumi.Input[str]] = None, + primary_blob_connection_string: Optional[pulumi.Input[str]] = None, + primary_blob_endpoint: Optional[pulumi.Input[str]] = None, + primary_blob_host: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + primary_dfs_endpoint: Optional[pulumi.Input[str]] = None, + primary_dfs_host: Optional[pulumi.Input[str]] = None, + primary_file_endpoint: Optional[pulumi.Input[str]] = None, + primary_file_host: Optional[pulumi.Input[str]] = None, + primary_location: Optional[pulumi.Input[str]] = None, + primary_queue_endpoint: Optional[pulumi.Input[str]] = None, + primary_queue_host: Optional[pulumi.Input[str]] = None, + primary_table_endpoint: Optional[pulumi.Input[str]] = None, + primary_table_host: Optional[pulumi.Input[str]] = None, + primary_web_endpoint: Optional[pulumi.Input[str]] = None, + primary_web_host: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + queue_encryption_key_type: Optional[pulumi.Input[str]] = None, + queue_properties: Optional[pulumi.Input['AccountQueuePropertiesArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + routing: Optional[pulumi.Input['AccountRoutingArgs']] = None, + sas_policy: Optional[pulumi.Input['AccountSasPolicyArgs']] = None, + secondary_access_key: Optional[pulumi.Input[str]] = None, + secondary_blob_connection_string: Optional[pulumi.Input[str]] = None, + secondary_blob_endpoint: Optional[pulumi.Input[str]] = None, + secondary_blob_host: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + secondary_dfs_endpoint: Optional[pulumi.Input[str]] = None, + secondary_dfs_host: Optional[pulumi.Input[str]] = None, + secondary_file_endpoint: Optional[pulumi.Input[str]] = None, + secondary_file_host: Optional[pulumi.Input[str]] = None, + secondary_location: Optional[pulumi.Input[str]] = None, + secondary_queue_endpoint: Optional[pulumi.Input[str]] = None, + secondary_queue_host: Optional[pulumi.Input[str]] = None, + secondary_table_endpoint: Optional[pulumi.Input[str]] = None, + secondary_table_host: Optional[pulumi.Input[str]] = None, + secondary_web_endpoint: Optional[pulumi.Input[str]] = None, + secondary_web_host: Optional[pulumi.Input[str]] = None, + sftp_enabled: Optional[pulumi.Input[bool]] = None, + share_properties: Optional[pulumi.Input['AccountSharePropertiesArgs']] = None, + shared_access_key_enabled: Optional[pulumi.Input[bool]] = None, + static_website: Optional[pulumi.Input['AccountStaticWebsiteArgs']] = None, + table_encryption_key_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_tier is None and 'accessTier' in kwargs: + access_tier = kwargs['accessTier'] + if account_kind is None and 'accountKind' in kwargs: + account_kind = kwargs['accountKind'] + if account_replication_type is None and 'accountReplicationType' in kwargs: + account_replication_type = kwargs['accountReplicationType'] + if account_tier is None and 'accountTier' in kwargs: + account_tier = kwargs['accountTier'] + if allow_nested_items_to_be_public is None and 'allowNestedItemsToBePublic' in kwargs: + allow_nested_items_to_be_public = kwargs['allowNestedItemsToBePublic'] + if allowed_copy_scope is None and 'allowedCopyScope' in kwargs: + allowed_copy_scope = kwargs['allowedCopyScope'] + if azure_files_authentication is None and 'azureFilesAuthentication' in kwargs: + azure_files_authentication = kwargs['azureFilesAuthentication'] + if blob_properties is None and 'blobProperties' in kwargs: + blob_properties = kwargs['blobProperties'] + if cross_tenant_replication_enabled is None and 'crossTenantReplicationEnabled' in kwargs: + cross_tenant_replication_enabled = kwargs['crossTenantReplicationEnabled'] + if custom_domain is None and 'customDomain' in kwargs: + custom_domain = kwargs['customDomain'] + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if default_to_oauth_authentication is None and 'defaultToOauthAuthentication' in kwargs: + default_to_oauth_authentication = kwargs['defaultToOauthAuthentication'] + if edge_zone is None and 'edgeZone' in kwargs: + edge_zone = kwargs['edgeZone'] + if enable_https_traffic_only is None and 'enableHttpsTrafficOnly' in kwargs: + enable_https_traffic_only = kwargs['enableHttpsTrafficOnly'] + if immutability_policy is None and 'immutabilityPolicy' in kwargs: + immutability_policy = kwargs['immutabilityPolicy'] + if infrastructure_encryption_enabled is None and 'infrastructureEncryptionEnabled' in kwargs: + infrastructure_encryption_enabled = kwargs['infrastructureEncryptionEnabled'] + if is_hns_enabled is None and 'isHnsEnabled' in kwargs: + is_hns_enabled = kwargs['isHnsEnabled'] + if large_file_share_enabled is None and 'largeFileShareEnabled' in kwargs: + large_file_share_enabled = kwargs['largeFileShareEnabled'] + if min_tls_version is None and 'minTlsVersion' in kwargs: + min_tls_version = kwargs['minTlsVersion'] + if network_rules is None and 'networkRules' in kwargs: + network_rules = kwargs['networkRules'] + if nfsv3_enabled is None and 'nfsv3Enabled' in kwargs: + nfsv3_enabled = kwargs['nfsv3Enabled'] + if primary_access_key is None and 'primaryAccessKey' in kwargs: + primary_access_key = kwargs['primaryAccessKey'] + if primary_blob_connection_string is None and 'primaryBlobConnectionString' in kwargs: + primary_blob_connection_string = kwargs['primaryBlobConnectionString'] + if primary_blob_endpoint is None and 'primaryBlobEndpoint' in kwargs: + primary_blob_endpoint = kwargs['primaryBlobEndpoint'] + if primary_blob_host is None and 'primaryBlobHost' in kwargs: + primary_blob_host = kwargs['primaryBlobHost'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if primary_dfs_endpoint is None and 'primaryDfsEndpoint' in kwargs: + primary_dfs_endpoint = kwargs['primaryDfsEndpoint'] + if primary_dfs_host is None and 'primaryDfsHost' in kwargs: + primary_dfs_host = kwargs['primaryDfsHost'] + if primary_file_endpoint is None and 'primaryFileEndpoint' in kwargs: + primary_file_endpoint = kwargs['primaryFileEndpoint'] + if primary_file_host is None and 'primaryFileHost' in kwargs: + primary_file_host = kwargs['primaryFileHost'] + if primary_location is None and 'primaryLocation' in kwargs: + primary_location = kwargs['primaryLocation'] + if primary_queue_endpoint is None and 'primaryQueueEndpoint' in kwargs: + primary_queue_endpoint = kwargs['primaryQueueEndpoint'] + if primary_queue_host is None and 'primaryQueueHost' in kwargs: + primary_queue_host = kwargs['primaryQueueHost'] + if primary_table_endpoint is None and 'primaryTableEndpoint' in kwargs: + primary_table_endpoint = kwargs['primaryTableEndpoint'] + if primary_table_host is None and 'primaryTableHost' in kwargs: + primary_table_host = kwargs['primaryTableHost'] + if primary_web_endpoint is None and 'primaryWebEndpoint' in kwargs: + primary_web_endpoint = kwargs['primaryWebEndpoint'] + if primary_web_host is None and 'primaryWebHost' in kwargs: + primary_web_host = kwargs['primaryWebHost'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if queue_encryption_key_type is None and 'queueEncryptionKeyType' in kwargs: + queue_encryption_key_type = kwargs['queueEncryptionKeyType'] + if queue_properties is None and 'queueProperties' in kwargs: + queue_properties = kwargs['queueProperties'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sas_policy is None and 'sasPolicy' in kwargs: + sas_policy = kwargs['sasPolicy'] + if secondary_access_key is None and 'secondaryAccessKey' in kwargs: + secondary_access_key = kwargs['secondaryAccessKey'] + if secondary_blob_connection_string is None and 'secondaryBlobConnectionString' in kwargs: + secondary_blob_connection_string = kwargs['secondaryBlobConnectionString'] + if secondary_blob_endpoint is None and 'secondaryBlobEndpoint' in kwargs: + secondary_blob_endpoint = kwargs['secondaryBlobEndpoint'] + if secondary_blob_host is None and 'secondaryBlobHost' in kwargs: + secondary_blob_host = kwargs['secondaryBlobHost'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if secondary_dfs_endpoint is None and 'secondaryDfsEndpoint' in kwargs: + secondary_dfs_endpoint = kwargs['secondaryDfsEndpoint'] + if secondary_dfs_host is None and 'secondaryDfsHost' in kwargs: + secondary_dfs_host = kwargs['secondaryDfsHost'] + if secondary_file_endpoint is None and 'secondaryFileEndpoint' in kwargs: + secondary_file_endpoint = kwargs['secondaryFileEndpoint'] + if secondary_file_host is None and 'secondaryFileHost' in kwargs: + secondary_file_host = kwargs['secondaryFileHost'] + if secondary_location is None and 'secondaryLocation' in kwargs: + secondary_location = kwargs['secondaryLocation'] + if secondary_queue_endpoint is None and 'secondaryQueueEndpoint' in kwargs: + secondary_queue_endpoint = kwargs['secondaryQueueEndpoint'] + if secondary_queue_host is None and 'secondaryQueueHost' in kwargs: + secondary_queue_host = kwargs['secondaryQueueHost'] + if secondary_table_endpoint is None and 'secondaryTableEndpoint' in kwargs: + secondary_table_endpoint = kwargs['secondaryTableEndpoint'] + if secondary_table_host is None and 'secondaryTableHost' in kwargs: + secondary_table_host = kwargs['secondaryTableHost'] + if secondary_web_endpoint is None and 'secondaryWebEndpoint' in kwargs: + secondary_web_endpoint = kwargs['secondaryWebEndpoint'] + if secondary_web_host is None and 'secondaryWebHost' in kwargs: + secondary_web_host = kwargs['secondaryWebHost'] + if sftp_enabled is None and 'sftpEnabled' in kwargs: + sftp_enabled = kwargs['sftpEnabled'] + if share_properties is None and 'shareProperties' in kwargs: + share_properties = kwargs['shareProperties'] + if shared_access_key_enabled is None and 'sharedAccessKeyEnabled' in kwargs: + shared_access_key_enabled = kwargs['sharedAccessKeyEnabled'] + if static_website is None and 'staticWebsite' in kwargs: + static_website = kwargs['staticWebsite'] + if table_encryption_key_type is None and 'tableEncryptionKeyType' in kwargs: + table_encryption_key_type = kwargs['tableEncryptionKeyType'] + if access_tier is not None: - pulumi.set(__self__, "access_tier", access_tier) + _setter("access_tier", access_tier) if account_kind is not None: - pulumi.set(__self__, "account_kind", account_kind) + _setter("account_kind", account_kind) if account_replication_type is not None: - pulumi.set(__self__, "account_replication_type", account_replication_type) + _setter("account_replication_type", account_replication_type) if account_tier is not None: - pulumi.set(__self__, "account_tier", account_tier) + _setter("account_tier", account_tier) if allow_nested_items_to_be_public is not None: - pulumi.set(__self__, "allow_nested_items_to_be_public", allow_nested_items_to_be_public) + _setter("allow_nested_items_to_be_public", allow_nested_items_to_be_public) if allowed_copy_scope is not None: - pulumi.set(__self__, "allowed_copy_scope", allowed_copy_scope) + _setter("allowed_copy_scope", allowed_copy_scope) if azure_files_authentication is not None: - pulumi.set(__self__, "azure_files_authentication", azure_files_authentication) + _setter("azure_files_authentication", azure_files_authentication) if blob_properties is not None: - pulumi.set(__self__, "blob_properties", blob_properties) + _setter("blob_properties", blob_properties) if cross_tenant_replication_enabled is not None: - pulumi.set(__self__, "cross_tenant_replication_enabled", cross_tenant_replication_enabled) + _setter("cross_tenant_replication_enabled", cross_tenant_replication_enabled) if custom_domain is not None: - pulumi.set(__self__, "custom_domain", custom_domain) + _setter("custom_domain", custom_domain) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if default_to_oauth_authentication is not None: - pulumi.set(__self__, "default_to_oauth_authentication", default_to_oauth_authentication) + _setter("default_to_oauth_authentication", default_to_oauth_authentication) if edge_zone is not None: - pulumi.set(__self__, "edge_zone", edge_zone) + _setter("edge_zone", edge_zone) if enable_https_traffic_only is not None: - pulumi.set(__self__, "enable_https_traffic_only", enable_https_traffic_only) + _setter("enable_https_traffic_only", enable_https_traffic_only) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if immutability_policy is not None: - pulumi.set(__self__, "immutability_policy", immutability_policy) + _setter("immutability_policy", immutability_policy) if infrastructure_encryption_enabled is not None: - pulumi.set(__self__, "infrastructure_encryption_enabled", infrastructure_encryption_enabled) + _setter("infrastructure_encryption_enabled", infrastructure_encryption_enabled) if is_hns_enabled is not None: - pulumi.set(__self__, "is_hns_enabled", is_hns_enabled) + _setter("is_hns_enabled", is_hns_enabled) if large_file_share_enabled is not None: - pulumi.set(__self__, "large_file_share_enabled", large_file_share_enabled) + _setter("large_file_share_enabled", large_file_share_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if min_tls_version is not None: - pulumi.set(__self__, "min_tls_version", min_tls_version) + _setter("min_tls_version", min_tls_version) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_rules is not None: - pulumi.set(__self__, "network_rules", network_rules) + _setter("network_rules", network_rules) if nfsv3_enabled is not None: - pulumi.set(__self__, "nfsv3_enabled", nfsv3_enabled) + _setter("nfsv3_enabled", nfsv3_enabled) if primary_access_key is not None: - pulumi.set(__self__, "primary_access_key", primary_access_key) + _setter("primary_access_key", primary_access_key) if primary_blob_connection_string is not None: - pulumi.set(__self__, "primary_blob_connection_string", primary_blob_connection_string) + _setter("primary_blob_connection_string", primary_blob_connection_string) if primary_blob_endpoint is not None: - pulumi.set(__self__, "primary_blob_endpoint", primary_blob_endpoint) + _setter("primary_blob_endpoint", primary_blob_endpoint) if primary_blob_host is not None: - pulumi.set(__self__, "primary_blob_host", primary_blob_host) + _setter("primary_blob_host", primary_blob_host) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if primary_dfs_endpoint is not None: - pulumi.set(__self__, "primary_dfs_endpoint", primary_dfs_endpoint) + _setter("primary_dfs_endpoint", primary_dfs_endpoint) if primary_dfs_host is not None: - pulumi.set(__self__, "primary_dfs_host", primary_dfs_host) + _setter("primary_dfs_host", primary_dfs_host) if primary_file_endpoint is not None: - pulumi.set(__self__, "primary_file_endpoint", primary_file_endpoint) + _setter("primary_file_endpoint", primary_file_endpoint) if primary_file_host is not None: - pulumi.set(__self__, "primary_file_host", primary_file_host) + _setter("primary_file_host", primary_file_host) if primary_location is not None: - pulumi.set(__self__, "primary_location", primary_location) + _setter("primary_location", primary_location) if primary_queue_endpoint is not None: - pulumi.set(__self__, "primary_queue_endpoint", primary_queue_endpoint) + _setter("primary_queue_endpoint", primary_queue_endpoint) if primary_queue_host is not None: - pulumi.set(__self__, "primary_queue_host", primary_queue_host) + _setter("primary_queue_host", primary_queue_host) if primary_table_endpoint is not None: - pulumi.set(__self__, "primary_table_endpoint", primary_table_endpoint) + _setter("primary_table_endpoint", primary_table_endpoint) if primary_table_host is not None: - pulumi.set(__self__, "primary_table_host", primary_table_host) + _setter("primary_table_host", primary_table_host) if primary_web_endpoint is not None: - pulumi.set(__self__, "primary_web_endpoint", primary_web_endpoint) + _setter("primary_web_endpoint", primary_web_endpoint) if primary_web_host is not None: - pulumi.set(__self__, "primary_web_host", primary_web_host) + _setter("primary_web_host", primary_web_host) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if queue_encryption_key_type is not None: - pulumi.set(__self__, "queue_encryption_key_type", queue_encryption_key_type) + _setter("queue_encryption_key_type", queue_encryption_key_type) if queue_properties is not None: - pulumi.set(__self__, "queue_properties", queue_properties) + _setter("queue_properties", queue_properties) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if routing is not None: - pulumi.set(__self__, "routing", routing) + _setter("routing", routing) if sas_policy is not None: - pulumi.set(__self__, "sas_policy", sas_policy) + _setter("sas_policy", sas_policy) if secondary_access_key is not None: - pulumi.set(__self__, "secondary_access_key", secondary_access_key) + _setter("secondary_access_key", secondary_access_key) if secondary_blob_connection_string is not None: - pulumi.set(__self__, "secondary_blob_connection_string", secondary_blob_connection_string) + _setter("secondary_blob_connection_string", secondary_blob_connection_string) if secondary_blob_endpoint is not None: - pulumi.set(__self__, "secondary_blob_endpoint", secondary_blob_endpoint) + _setter("secondary_blob_endpoint", secondary_blob_endpoint) if secondary_blob_host is not None: - pulumi.set(__self__, "secondary_blob_host", secondary_blob_host) + _setter("secondary_blob_host", secondary_blob_host) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if secondary_dfs_endpoint is not None: - pulumi.set(__self__, "secondary_dfs_endpoint", secondary_dfs_endpoint) + _setter("secondary_dfs_endpoint", secondary_dfs_endpoint) if secondary_dfs_host is not None: - pulumi.set(__self__, "secondary_dfs_host", secondary_dfs_host) + _setter("secondary_dfs_host", secondary_dfs_host) if secondary_file_endpoint is not None: - pulumi.set(__self__, "secondary_file_endpoint", secondary_file_endpoint) + _setter("secondary_file_endpoint", secondary_file_endpoint) if secondary_file_host is not None: - pulumi.set(__self__, "secondary_file_host", secondary_file_host) + _setter("secondary_file_host", secondary_file_host) if secondary_location is not None: - pulumi.set(__self__, "secondary_location", secondary_location) + _setter("secondary_location", secondary_location) if secondary_queue_endpoint is not None: - pulumi.set(__self__, "secondary_queue_endpoint", secondary_queue_endpoint) + _setter("secondary_queue_endpoint", secondary_queue_endpoint) if secondary_queue_host is not None: - pulumi.set(__self__, "secondary_queue_host", secondary_queue_host) + _setter("secondary_queue_host", secondary_queue_host) if secondary_table_endpoint is not None: - pulumi.set(__self__, "secondary_table_endpoint", secondary_table_endpoint) + _setter("secondary_table_endpoint", secondary_table_endpoint) if secondary_table_host is not None: - pulumi.set(__self__, "secondary_table_host", secondary_table_host) + _setter("secondary_table_host", secondary_table_host) if secondary_web_endpoint is not None: - pulumi.set(__self__, "secondary_web_endpoint", secondary_web_endpoint) + _setter("secondary_web_endpoint", secondary_web_endpoint) if secondary_web_host is not None: - pulumi.set(__self__, "secondary_web_host", secondary_web_host) + _setter("secondary_web_host", secondary_web_host) if sftp_enabled is not None: - pulumi.set(__self__, "sftp_enabled", sftp_enabled) + _setter("sftp_enabled", sftp_enabled) if share_properties is not None: - pulumi.set(__self__, "share_properties", share_properties) + _setter("share_properties", share_properties) if shared_access_key_enabled is not None: - pulumi.set(__self__, "shared_access_key_enabled", shared_access_key_enabled) + _setter("shared_access_key_enabled", shared_access_key_enabled) if static_website is not None: - pulumi.set(__self__, "static_website", static_website) + _setter("static_website", static_website) if table_encryption_key_type is not None: - pulumi.set(__self__, "table_encryption_key_type", table_encryption_key_type) + _setter("table_encryption_key_type", table_encryption_key_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="accessTier") @@ -2010,6 +2430,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -2070,15 +2494,45 @@ def _internal_init(__self__, __props__.__dict__["account_tier"] = account_tier __props__.__dict__["allow_nested_items_to_be_public"] = allow_nested_items_to_be_public __props__.__dict__["allowed_copy_scope"] = allowed_copy_scope + if azure_files_authentication is not None and not isinstance(azure_files_authentication, AccountAzureFilesAuthenticationArgs): + azure_files_authentication = azure_files_authentication or {} + def _setter(key, value): + azure_files_authentication[key] = value + AccountAzureFilesAuthenticationArgs._configure(_setter, **azure_files_authentication) __props__.__dict__["azure_files_authentication"] = azure_files_authentication + if blob_properties is not None and not isinstance(blob_properties, AccountBlobPropertiesArgs): + blob_properties = blob_properties or {} + def _setter(key, value): + blob_properties[key] = value + AccountBlobPropertiesArgs._configure(_setter, **blob_properties) __props__.__dict__["blob_properties"] = blob_properties __props__.__dict__["cross_tenant_replication_enabled"] = cross_tenant_replication_enabled + if custom_domain is not None and not isinstance(custom_domain, AccountCustomDomainArgs): + custom_domain = custom_domain or {} + def _setter(key, value): + custom_domain[key] = value + AccountCustomDomainArgs._configure(_setter, **custom_domain) __props__.__dict__["custom_domain"] = custom_domain + if customer_managed_key is not None and not isinstance(customer_managed_key, AccountCustomerManagedKeyArgs): + customer_managed_key = customer_managed_key or {} + def _setter(key, value): + customer_managed_key[key] = value + AccountCustomerManagedKeyArgs._configure(_setter, **customer_managed_key) __props__.__dict__["customer_managed_key"] = customer_managed_key __props__.__dict__["default_to_oauth_authentication"] = default_to_oauth_authentication __props__.__dict__["edge_zone"] = edge_zone __props__.__dict__["enable_https_traffic_only"] = enable_https_traffic_only + if identity is not None and not isinstance(identity, AccountIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + AccountIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity + if immutability_policy is not None and not isinstance(immutability_policy, AccountImmutabilityPolicyArgs): + immutability_policy = immutability_policy or {} + def _setter(key, value): + immutability_policy[key] = value + AccountImmutabilityPolicyArgs._configure(_setter, **immutability_policy) __props__.__dict__["immutability_policy"] = immutability_policy __props__.__dict__["infrastructure_encryption_enabled"] = infrastructure_encryption_enabled __props__.__dict__["is_hns_enabled"] = is_hns_enabled @@ -2086,19 +2540,49 @@ def _internal_init(__self__, __props__.__dict__["location"] = location __props__.__dict__["min_tls_version"] = min_tls_version __props__.__dict__["name"] = name + if network_rules is not None and not isinstance(network_rules, AccountNetworkRulesArgs): + network_rules = network_rules or {} + def _setter(key, value): + network_rules[key] = value + AccountNetworkRulesArgs._configure(_setter, **network_rules) __props__.__dict__["network_rules"] = network_rules __props__.__dict__["nfsv3_enabled"] = nfsv3_enabled __props__.__dict__["public_network_access_enabled"] = public_network_access_enabled __props__.__dict__["queue_encryption_key_type"] = queue_encryption_key_type + if queue_properties is not None and not isinstance(queue_properties, AccountQueuePropertiesArgs): + queue_properties = queue_properties or {} + def _setter(key, value): + queue_properties[key] = value + AccountQueuePropertiesArgs._configure(_setter, **queue_properties) __props__.__dict__["queue_properties"] = queue_properties if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if routing is not None and not isinstance(routing, AccountRoutingArgs): + routing = routing or {} + def _setter(key, value): + routing[key] = value + AccountRoutingArgs._configure(_setter, **routing) __props__.__dict__["routing"] = routing + if sas_policy is not None and not isinstance(sas_policy, AccountSasPolicyArgs): + sas_policy = sas_policy or {} + def _setter(key, value): + sas_policy[key] = value + AccountSasPolicyArgs._configure(_setter, **sas_policy) __props__.__dict__["sas_policy"] = sas_policy __props__.__dict__["sftp_enabled"] = sftp_enabled + if share_properties is not None and not isinstance(share_properties, AccountSharePropertiesArgs): + share_properties = share_properties or {} + def _setter(key, value): + share_properties[key] = value + AccountSharePropertiesArgs._configure(_setter, **share_properties) __props__.__dict__["share_properties"] = share_properties __props__.__dict__["shared_access_key_enabled"] = shared_access_key_enabled + if static_website is not None and not isinstance(static_website, AccountStaticWebsiteArgs): + static_website = static_website or {} + def _setter(key, value): + static_website[key] = value + AccountStaticWebsiteArgs._configure(_setter, **static_website) __props__.__dict__["static_website"] = static_website __props__.__dict__["table_encryption_key_type"] = table_encryption_key_type __props__.__dict__["tags"] = tags diff --git a/sdk/python/pulumi_azure/storage/account_network_rules.py b/sdk/python/pulumi_azure/storage/account_network_rules.py index 88b32857de..c8e842be3e 100644 --- a/sdk/python/pulumi_azure/storage/account_network_rules.py +++ b/sdk/python/pulumi_azure/storage/account_network_rules.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,16 +41,51 @@ def __init__(__self__, *, > **NOTE** User has to explicitly set `virtual_network_subnet_ids` to empty slice (`[]`) to remove it. """ - pulumi.set(__self__, "default_action", default_action) - pulumi.set(__self__, "storage_account_id", storage_account_id) + AccountNetworkRulesInitArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + storage_account_id=storage_account_id, + bypasses=bypasses, + ip_rules=ip_rules, + private_link_access_rules=private_link_access_rules, + virtual_network_subnet_ids=virtual_network_subnet_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + bypasses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + private_link_access_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AccountNetworkRulesPrivateLinkAccessRuleArgs']]]] = None, + virtual_network_subnet_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if default_action is None: + raise TypeError("Missing 'default_action' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if private_link_access_rules is None and 'privateLinkAccessRules' in kwargs: + private_link_access_rules = kwargs['privateLinkAccessRules'] + if virtual_network_subnet_ids is None and 'virtualNetworkSubnetIds' in kwargs: + virtual_network_subnet_ids = kwargs['virtualNetworkSubnetIds'] + + _setter("default_action", default_action) + _setter("storage_account_id", storage_account_id) if bypasses is not None: - pulumi.set(__self__, "bypasses", bypasses) + _setter("bypasses", bypasses) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if private_link_access_rules is not None: - pulumi.set(__self__, "private_link_access_rules", private_link_access_rules) + _setter("private_link_access_rules", private_link_access_rules) if virtual_network_subnet_ids is not None: - pulumi.set(__self__, "virtual_network_subnet_ids", virtual_network_subnet_ids) + _setter("virtual_network_subnet_ids", virtual_network_subnet_ids) @property @pulumi.getter(name="defaultAction") @@ -163,18 +198,49 @@ def __init__(__self__, *, > **NOTE** User has to explicitly set `virtual_network_subnet_ids` to empty slice (`[]`) to remove it. """ + _AccountNetworkRulesState._configure( + lambda key, value: pulumi.set(__self__, key, value), + bypasses=bypasses, + default_action=default_action, + ip_rules=ip_rules, + private_link_access_rules=private_link_access_rules, + storage_account_id=storage_account_id, + virtual_network_subnet_ids=virtual_network_subnet_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + bypasses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + default_action: Optional[pulumi.Input[str]] = None, + ip_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + private_link_access_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AccountNetworkRulesPrivateLinkAccessRuleArgs']]]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + virtual_network_subnet_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if private_link_access_rules is None and 'privateLinkAccessRules' in kwargs: + private_link_access_rules = kwargs['privateLinkAccessRules'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if virtual_network_subnet_ids is None and 'virtualNetworkSubnetIds' in kwargs: + virtual_network_subnet_ids = kwargs['virtualNetworkSubnetIds'] + if bypasses is not None: - pulumi.set(__self__, "bypasses", bypasses) + _setter("bypasses", bypasses) if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if private_link_access_rules is not None: - pulumi.set(__self__, "private_link_access_rules", private_link_access_rules) + _setter("private_link_access_rules", private_link_access_rules) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if virtual_network_subnet_ids is not None: - pulumi.set(__self__, "virtual_network_subnet_ids", virtual_network_subnet_ids) + _setter("virtual_network_subnet_ids", virtual_network_subnet_ids) @property @pulumi.getter @@ -404,6 +470,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AccountNetworkRulesInitArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/blob.py b/sdk/python/pulumi_azure/storage/blob.py index 841345a7a1..60c5227fc1 100644 --- a/sdk/python/pulumi_azure/storage/blob.py +++ b/sdk/python/pulumi_azure/storage/blob.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['BlobArgs', 'Blob'] @@ -50,31 +50,90 @@ def __init__(__self__, *, :param pulumi.Input[str] source_content: The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if `source` or `source_uri` is specified. Changing this forces a new resource to be created. :param pulumi.Input[str] source_uri: The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if `source` or `source_content` is specified. """ - pulumi.set(__self__, "storage_account_name", storage_account_name) - pulumi.set(__self__, "storage_container_name", storage_container_name) - pulumi.set(__self__, "type", type) + BlobArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_name=storage_account_name, + storage_container_name=storage_container_name, + type=type, + access_tier=access_tier, + cache_control=cache_control, + content_md5=content_md5, + content_type=content_type, + metadata=metadata, + name=name, + parallelism=parallelism, + size=size, + source=source, + source_content=source_content, + source_uri=source_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_container_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + access_tier: Optional[pulumi.Input[str]] = None, + cache_control: Optional[pulumi.Input[str]] = None, + content_md5: Optional[pulumi.Input[str]] = None, + content_type: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + parallelism: Optional[pulumi.Input[int]] = None, + size: Optional[pulumi.Input[int]] = None, + source: Optional[pulumi.Input[Union[pulumi.Asset, pulumi.Archive]]] = None, + source_content: Optional[pulumi.Input[str]] = None, + source_uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if storage_container_name is None: + raise TypeError("Missing 'storage_container_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if access_tier is None and 'accessTier' in kwargs: + access_tier = kwargs['accessTier'] + if cache_control is None and 'cacheControl' in kwargs: + cache_control = kwargs['cacheControl'] + if content_md5 is None and 'contentMd5' in kwargs: + content_md5 = kwargs['contentMd5'] + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if source_content is None and 'sourceContent' in kwargs: + source_content = kwargs['sourceContent'] + if source_uri is None and 'sourceUri' in kwargs: + source_uri = kwargs['sourceUri'] + + _setter("storage_account_name", storage_account_name) + _setter("storage_container_name", storage_container_name) + _setter("type", type) if access_tier is not None: - pulumi.set(__self__, "access_tier", access_tier) + _setter("access_tier", access_tier) if cache_control is not None: - pulumi.set(__self__, "cache_control", cache_control) + _setter("cache_control", cache_control) if content_md5 is not None: - pulumi.set(__self__, "content_md5", content_md5) + _setter("content_md5", content_md5) if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parallelism is not None: - pulumi.set(__self__, "parallelism", parallelism) + _setter("parallelism", parallelism) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) if source_content is not None: - pulumi.set(__self__, "source_content", source_content) + _setter("source_content", source_content) if source_uri is not None: - pulumi.set(__self__, "source_uri", source_uri) + _setter("source_uri", source_uri) @property @pulumi.getter(name="storageAccountName") @@ -291,36 +350,91 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The type of the storage blob to be created. Possible values are `Append`, `Block` or `Page`. Changing this forces a new resource to be created. :param pulumi.Input[str] url: The URL of the blob """ + _BlobState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_tier=access_tier, + cache_control=cache_control, + content_md5=content_md5, + content_type=content_type, + metadata=metadata, + name=name, + parallelism=parallelism, + size=size, + source=source, + source_content=source_content, + source_uri=source_uri, + storage_account_name=storage_account_name, + storage_container_name=storage_container_name, + type=type, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_tier: Optional[pulumi.Input[str]] = None, + cache_control: Optional[pulumi.Input[str]] = None, + content_md5: Optional[pulumi.Input[str]] = None, + content_type: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + parallelism: Optional[pulumi.Input[int]] = None, + size: Optional[pulumi.Input[int]] = None, + source: Optional[pulumi.Input[Union[pulumi.Asset, pulumi.Archive]]] = None, + source_content: Optional[pulumi.Input[str]] = None, + source_uri: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_container_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_tier is None and 'accessTier' in kwargs: + access_tier = kwargs['accessTier'] + if cache_control is None and 'cacheControl' in kwargs: + cache_control = kwargs['cacheControl'] + if content_md5 is None and 'contentMd5' in kwargs: + content_md5 = kwargs['contentMd5'] + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if source_content is None and 'sourceContent' in kwargs: + source_content = kwargs['sourceContent'] + if source_uri is None and 'sourceUri' in kwargs: + source_uri = kwargs['sourceUri'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if access_tier is not None: - pulumi.set(__self__, "access_tier", access_tier) + _setter("access_tier", access_tier) if cache_control is not None: - pulumi.set(__self__, "cache_control", cache_control) + _setter("cache_control", cache_control) if content_md5 is not None: - pulumi.set(__self__, "content_md5", content_md5) + _setter("content_md5", content_md5) if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parallelism is not None: - pulumi.set(__self__, "parallelism", parallelism) + _setter("parallelism", parallelism) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) if source_content is not None: - pulumi.set(__self__, "source_content", source_content) + _setter("source_content", source_content) if source_uri is not None: - pulumi.set(__self__, "source_uri", source_uri) + _setter("source_uri", source_uri) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_container_name is not None: - pulumi.set(__self__, "storage_container_name", storage_container_name) + _setter("storage_container_name", storage_container_name) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="accessTier") @@ -632,6 +746,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BlobArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/blob_inventory_policy.py b/sdk/python/pulumi_azure/storage/blob_inventory_policy.py index f876f14592..fcefea62ef 100644 --- a/sdk/python/pulumi_azure/storage/blob_inventory_policy.py +++ b/sdk/python/pulumi_azure/storage/blob_inventory_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -23,8 +23,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['BlobInventoryPolicyRuleArgs']]] rules: One or more `rules` blocks as defined below. :param pulumi.Input[str] storage_account_id: The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created. """ - pulumi.set(__self__, "rules", rules) - pulumi.set(__self__, "storage_account_id", storage_account_id) + BlobInventoryPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + rules=rules, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rules: Optional[pulumi.Input[Sequence[pulumi.Input['BlobInventoryPolicyRuleArgs']]]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rules is None: + raise TypeError("Missing 'rules' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + + _setter("rules", rules) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter @@ -61,10 +80,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['BlobInventoryPolicyRuleArgs']]] rules: One or more `rules` blocks as defined below. :param pulumi.Input[str] storage_account_id: The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created. """ + _BlobInventoryPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + rules=rules, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rules: Optional[pulumi.Input[Sequence[pulumi.Input['BlobInventoryPolicyRuleArgs']]]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter @@ -208,6 +242,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + BlobInventoryPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/container.py b/sdk/python/pulumi_azure/storage/container.py index 31a300f1fc..233f056959 100644 --- a/sdk/python/pulumi_azure/storage/container.py +++ b/sdk/python/pulumi_azure/storage/container.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ContainerArgs', 'Container'] @@ -25,13 +25,36 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] metadata: A mapping of MetaData for this Container. All metadata keys should be lowercase. :param pulumi.Input[str] name: The name of the Container which should be created within the Storage Account. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "storage_account_name", storage_account_name) + ContainerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_name=storage_account_name, + container_access_type=container_access_type, + metadata=metadata, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_name: Optional[pulumi.Input[str]] = None, + container_access_type: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if container_access_type is None and 'containerAccessType' in kwargs: + container_access_type = kwargs['containerAccessType'] + + _setter("storage_account_name", storage_account_name) if container_access_type is not None: - pulumi.set(__self__, "container_access_type", container_access_type) + _setter("container_access_type", container_access_type) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="storageAccountName") @@ -102,20 +125,53 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_manager_id: The Resource Manager ID of this Storage Container. :param pulumi.Input[str] storage_account_name: The name of the Storage Account where the Container should be created. Changing this forces a new resource to be created. """ + _ContainerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_access_type=container_access_type, + has_immutability_policy=has_immutability_policy, + has_legal_hold=has_legal_hold, + metadata=metadata, + name=name, + resource_manager_id=resource_manager_id, + storage_account_name=storage_account_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_access_type: Optional[pulumi.Input[str]] = None, + has_immutability_policy: Optional[pulumi.Input[bool]] = None, + has_legal_hold: Optional[pulumi.Input[bool]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_manager_id: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_access_type is None and 'containerAccessType' in kwargs: + container_access_type = kwargs['containerAccessType'] + if has_immutability_policy is None and 'hasImmutabilityPolicy' in kwargs: + has_immutability_policy = kwargs['hasImmutabilityPolicy'] + if has_legal_hold is None and 'hasLegalHold' in kwargs: + has_legal_hold = kwargs['hasLegalHold'] + if resource_manager_id is None and 'resourceManagerId' in kwargs: + resource_manager_id = kwargs['resourceManagerId'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if container_access_type is not None: - pulumi.set(__self__, "container_access_type", container_access_type) + _setter("container_access_type", container_access_type) if has_immutability_policy is not None: - pulumi.set(__self__, "has_immutability_policy", has_immutability_policy) + _setter("has_immutability_policy", has_immutability_policy) if has_legal_hold is not None: - pulumi.set(__self__, "has_legal_hold", has_legal_hold) + _setter("has_legal_hold", has_legal_hold) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_manager_id is not None: - pulumi.set(__self__, "resource_manager_id", resource_manager_id) + _setter("resource_manager_id", resource_manager_id) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) @property @pulumi.getter(name="containerAccessType") @@ -297,6 +353,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ContainerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/customer_managed_key.py b/sdk/python/pulumi_azure/storage/customer_managed_key.py index 2cf3dcc5ab..c869ff3211 100644 --- a/sdk/python/pulumi_azure/storage/customer_managed_key.py +++ b/sdk/python/pulumi_azure/storage/customer_managed_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CustomerManagedKeyArgs', 'CustomerManagedKey'] @@ -30,18 +30,59 @@ def __init__(__self__, *, :param pulumi.Input[str] key_version: The version of Key Vault Key. Remove or omit this argument to enable Automatic Key Rotation. :param pulumi.Input[str] user_assigned_identity_id: The ID of a user assigned identity. """ - pulumi.set(__self__, "key_name", key_name) - pulumi.set(__self__, "storage_account_id", storage_account_id) + CustomerManagedKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_name=key_name, + storage_account_id=storage_account_id, + federated_identity_client_id=federated_identity_client_id, + key_vault_id=key_vault_id, + key_vault_uri=key_vault_uri, + key_version=key_version, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + federated_identity_client_id: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + key_vault_uri: Optional[pulumi.Input[str]] = None, + key_version: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_name is None and 'keyName' in kwargs: + key_name = kwargs['keyName'] + if key_name is None: + raise TypeError("Missing 'key_name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if federated_identity_client_id is None and 'federatedIdentityClientId' in kwargs: + federated_identity_client_id = kwargs['federatedIdentityClientId'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_uri is None and 'keyVaultUri' in kwargs: + key_vault_uri = kwargs['keyVaultUri'] + if key_version is None and 'keyVersion' in kwargs: + key_version = kwargs['keyVersion'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + + _setter("key_name", key_name) + _setter("storage_account_id", storage_account_id) if federated_identity_client_id is not None: - pulumi.set(__self__, "federated_identity_client_id", federated_identity_client_id) + _setter("federated_identity_client_id", federated_identity_client_id) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if key_vault_uri is not None: - pulumi.set(__self__, "key_vault_uri", key_vault_uri) + _setter("key_vault_uri", key_vault_uri) if key_version is not None: - pulumi.set(__self__, "key_version", key_version) + _setter("key_version", key_version) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="keyName") @@ -144,20 +185,57 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_id: The ID of the Storage Account. Changing this forces a new resource to be created. :param pulumi.Input[str] user_assigned_identity_id: The ID of a user assigned identity. """ + _CustomerManagedKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + federated_identity_client_id=federated_identity_client_id, + key_name=key_name, + key_vault_id=key_vault_id, + key_vault_uri=key_vault_uri, + key_version=key_version, + storage_account_id=storage_account_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + federated_identity_client_id: Optional[pulumi.Input[str]] = None, + key_name: Optional[pulumi.Input[str]] = None, + key_vault_id: Optional[pulumi.Input[str]] = None, + key_vault_uri: Optional[pulumi.Input[str]] = None, + key_version: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if federated_identity_client_id is None and 'federatedIdentityClientId' in kwargs: + federated_identity_client_id = kwargs['federatedIdentityClientId'] + if key_name is None and 'keyName' in kwargs: + key_name = kwargs['keyName'] + if key_vault_id is None and 'keyVaultId' in kwargs: + key_vault_id = kwargs['keyVaultId'] + if key_vault_uri is None and 'keyVaultUri' in kwargs: + key_vault_uri = kwargs['keyVaultUri'] + if key_version is None and 'keyVersion' in kwargs: + key_version = kwargs['keyVersion'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if federated_identity_client_id is not None: - pulumi.set(__self__, "federated_identity_client_id", federated_identity_client_id) + _setter("federated_identity_client_id", federated_identity_client_id) if key_name is not None: - pulumi.set(__self__, "key_name", key_name) + _setter("key_name", key_name) if key_vault_id is not None: - pulumi.set(__self__, "key_vault_id", key_vault_id) + _setter("key_vault_id", key_vault_id) if key_vault_uri is not None: - pulumi.set(__self__, "key_vault_uri", key_vault_uri) + _setter("key_vault_uri", key_vault_uri) if key_version is not None: - pulumi.set(__self__, "key_version", key_version) + _setter("key_version", key_version) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if user_assigned_identity_id is not None: - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="federatedIdentityClientId") @@ -457,6 +535,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CustomerManagedKeyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/data_lake_gen2_filesystem.py b/sdk/python/pulumi_azure/storage/data_lake_gen2_filesystem.py index 3acf579032..56d73c905c 100644 --- a/sdk/python/pulumi_azure/storage/data_lake_gen2_filesystem.py +++ b/sdk/python/pulumi_azure/storage/data_lake_gen2_filesystem.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,17 +33,42 @@ def __init__(__self__, *, :param pulumi.Input[str] owner: Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] properties: A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System. """ - pulumi.set(__self__, "storage_account_id", storage_account_id) + DataLakeGen2FilesystemArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_id=storage_account_id, + aces=aces, + group=group, + name=name, + owner=owner, + properties=properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_id: Optional[pulumi.Input[str]] = None, + aces: Optional[pulumi.Input[Sequence[pulumi.Input['DataLakeGen2FilesystemAceArgs']]]] = None, + group: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + owner: Optional[pulumi.Input[str]] = None, + properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + + _setter("storage_account_id", storage_account_id) if aces is not None: - pulumi.set(__self__, "aces", aces) + _setter("aces", aces) if group is not None: - pulumi.set(__self__, "group", group) + _setter("group", group) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if owner is not None: - pulumi.set(__self__, "owner", owner) + _setter("owner", owner) if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) @property @pulumi.getter(name="storageAccountId") @@ -140,18 +165,41 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] properties: A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System. :param pulumi.Input[str] storage_account_id: Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created. """ + _DataLakeGen2FilesystemState._configure( + lambda key, value: pulumi.set(__self__, key, value), + aces=aces, + group=group, + name=name, + owner=owner, + properties=properties, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aces: Optional[pulumi.Input[Sequence[pulumi.Input['DataLakeGen2FilesystemAceArgs']]]] = None, + group: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + owner: Optional[pulumi.Input[str]] = None, + properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if aces is not None: - pulumi.set(__self__, "aces", aces) + _setter("aces", aces) if group is not None: - pulumi.set(__self__, "group", group) + _setter("group", group) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if owner is not None: - pulumi.set(__self__, "owner", owner) + _setter("owner", owner) if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter @@ -335,6 +383,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataLakeGen2FilesystemArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/data_lake_gen2_path.py b/sdk/python/pulumi_azure/storage/data_lake_gen2_path.py index c9023acdb1..d861cc7e21 100644 --- a/sdk/python/pulumi_azure/storage/data_lake_gen2_path.py +++ b/sdk/python/pulumi_azure/storage/data_lake_gen2_path.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,16 +33,51 @@ def __init__(__self__, *, :param pulumi.Input[str] group: Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include `$superuser`. :param pulumi.Input[str] owner: Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include `$superuser`. """ - pulumi.set(__self__, "filesystem_name", filesystem_name) - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "resource", resource) - pulumi.set(__self__, "storage_account_id", storage_account_id) + DataLakeGen2PathArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + filesystem_name=filesystem_name, + path=path, + resource=resource, + storage_account_id=storage_account_id, + aces=aces, + group=group, + owner=owner, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + filesystem_name: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + resource: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + aces: Optional[pulumi.Input[Sequence[pulumi.Input['DataLakeGen2PathAceArgs']]]] = None, + group: Optional[pulumi.Input[str]] = None, + owner: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filesystem_name is None and 'filesystemName' in kwargs: + filesystem_name = kwargs['filesystemName'] + if filesystem_name is None: + raise TypeError("Missing 'filesystem_name' argument") + if path is None: + raise TypeError("Missing 'path' argument") + if resource is None: + raise TypeError("Missing 'resource' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + + _setter("filesystem_name", filesystem_name) + _setter("path", path) + _setter("resource", resource) + _setter("storage_account_id", storage_account_id) if aces is not None: - pulumi.set(__self__, "aces", aces) + _setter("aces", aces) if group is not None: - pulumi.set(__self__, "group", group) + _setter("group", group) if owner is not None: - pulumi.set(__self__, "owner", owner) + _setter("owner", owner) @property @pulumi.getter(name="filesystemName") @@ -149,20 +184,47 @@ def __init__(__self__, *, :param pulumi.Input[str] resource: Specifies the type for path to create. Currently only `directory` is supported. Changing this forces a new resource to be created. :param pulumi.Input[str] storage_account_id: Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created. """ + _DataLakeGen2PathState._configure( + lambda key, value: pulumi.set(__self__, key, value), + aces=aces, + filesystem_name=filesystem_name, + group=group, + owner=owner, + path=path, + resource=resource, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aces: Optional[pulumi.Input[Sequence[pulumi.Input['DataLakeGen2PathAceArgs']]]] = None, + filesystem_name: Optional[pulumi.Input[str]] = None, + group: Optional[pulumi.Input[str]] = None, + owner: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + resource: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if filesystem_name is None and 'filesystemName' in kwargs: + filesystem_name = kwargs['filesystemName'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if aces is not None: - pulumi.set(__self__, "aces", aces) + _setter("aces", aces) if filesystem_name is not None: - pulumi.set(__self__, "filesystem_name", filesystem_name) + _setter("filesystem_name", filesystem_name) if group is not None: - pulumi.set(__self__, "group", group) + _setter("group", group) if owner is not None: - pulumi.set(__self__, "owner", owner) + _setter("owner", owner) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if resource is not None: - pulumi.set(__self__, "resource", resource) + _setter("resource", resource) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter @@ -358,6 +420,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DataLakeGen2PathArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/encryption_scope.py b/sdk/python/pulumi_azure/storage/encryption_scope.py index b26c7cabbe..4e14907d9c 100644 --- a/sdk/python/pulumi_azure/storage/encryption_scope.py +++ b/sdk/python/pulumi_azure/storage/encryption_scope.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EncryptionScopeArgs', 'EncryptionScope'] @@ -27,14 +27,43 @@ def __init__(__self__, *, :param pulumi.Input[str] key_vault_key_id: The ID of the Key Vault Key. Required when `source` is `Microsoft.KeyVault`. :param pulumi.Input[str] name: The name which should be used for this Storage Encryption Scope. Changing this forces a new Storage Encryption Scope to be created. """ - pulumi.set(__self__, "source", source) - pulumi.set(__self__, "storage_account_id", storage_account_id) + EncryptionScopeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + source=source, + storage_account_id=storage_account_id, + infrastructure_encryption_required=infrastructure_encryption_required, + key_vault_key_id=key_vault_key_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + source: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + infrastructure_encryption_required: Optional[pulumi.Input[bool]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if source is None: + raise TypeError("Missing 'source' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if infrastructure_encryption_required is None and 'infrastructureEncryptionRequired' in kwargs: + infrastructure_encryption_required = kwargs['infrastructureEncryptionRequired'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + + _setter("source", source) + _setter("storage_account_id", storage_account_id) if infrastructure_encryption_required is not None: - pulumi.set(__self__, "infrastructure_encryption_required", infrastructure_encryption_required) + _setter("infrastructure_encryption_required", infrastructure_encryption_required) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -113,16 +142,41 @@ def __init__(__self__, *, :param pulumi.Input[str] source: The source of the Storage Encryption Scope. Possible values are `Microsoft.KeyVault` and `Microsoft.Storage`. :param pulumi.Input[str] storage_account_id: The ID of the Storage Account where this Storage Encryption Scope is created. Changing this forces a new Storage Encryption Scope to be created. """ + _EncryptionScopeState._configure( + lambda key, value: pulumi.set(__self__, key, value), + infrastructure_encryption_required=infrastructure_encryption_required, + key_vault_key_id=key_vault_key_id, + name=name, + source=source, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + infrastructure_encryption_required: Optional[pulumi.Input[bool]] = None, + key_vault_key_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if infrastructure_encryption_required is None and 'infrastructureEncryptionRequired' in kwargs: + infrastructure_encryption_required = kwargs['infrastructureEncryptionRequired'] + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if infrastructure_encryption_required is not None: - pulumi.set(__self__, "infrastructure_encryption_required", infrastructure_encryption_required) + _setter("infrastructure_encryption_required", infrastructure_encryption_required) if key_vault_key_id is not None: - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) + _setter("key_vault_key_id", key_vault_key_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="infrastructureEncryptionRequired") @@ -286,6 +340,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EncryptionScopeArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/get_account.py b/sdk/python/pulumi_azure/storage/get_account.py index 40915fff93..414f47a617 100644 --- a/sdk/python/pulumi_azure/storage/get_account.py +++ b/sdk/python/pulumi_azure/storage/get_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/storage/get_account_blob_container_sas.py b/sdk/python/pulumi_azure/storage/get_account_blob_container_sas.py index 69427963cb..8795eabeda 100644 --- a/sdk/python/pulumi_azure/storage/get_account_blob_container_sas.py +++ b/sdk/python/pulumi_azure/storage/get_account_blob_container_sas.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * diff --git a/sdk/python/pulumi_azure/storage/get_account_sas.py b/sdk/python/pulumi_azure/storage/get_account_sas.py index 8a886cd9cd..28b1ea4a62 100644 --- a/sdk/python/pulumi_azure/storage/get_account_sas.py +++ b/sdk/python/pulumi_azure/storage/get_account_sas.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * diff --git a/sdk/python/pulumi_azure/storage/get_blob.py b/sdk/python/pulumi_azure/storage/get_blob.py index f4efad30c9..dc3c2a8510 100644 --- a/sdk/python/pulumi_azure/storage/get_blob.py +++ b/sdk/python/pulumi_azure/storage/get_blob.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/storage/get_encryption_scope.py b/sdk/python/pulumi_azure/storage/get_encryption_scope.py index 493ba903ec..a8521808c3 100644 --- a/sdk/python/pulumi_azure/storage/get_encryption_scope.py +++ b/sdk/python/pulumi_azure/storage/get_encryption_scope.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/storage/get_policy.py b/sdk/python/pulumi_azure/storage/get_policy.py index 2bcc92119b..845396195f 100644 --- a/sdk/python/pulumi_azure/storage/get_policy.py +++ b/sdk/python/pulumi_azure/storage/get_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/storage/get_share.py b/sdk/python/pulumi_azure/storage/get_share.py index 447eefee40..c9156f050b 100644 --- a/sdk/python/pulumi_azure/storage/get_share.py +++ b/sdk/python/pulumi_azure/storage/get_share.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * diff --git a/sdk/python/pulumi_azure/storage/get_storage_container.py b/sdk/python/pulumi_azure/storage/get_storage_container.py index 1182a13df3..2c90c124fd 100644 --- a/sdk/python/pulumi_azure/storage/get_storage_container.py +++ b/sdk/python/pulumi_azure/storage/get_storage_container.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/storage/get_sync.py b/sdk/python/pulumi_azure/storage/get_sync.py index f5df74b2e5..8e690836f2 100644 --- a/sdk/python/pulumi_azure/storage/get_sync.py +++ b/sdk/python/pulumi_azure/storage/get_sync.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/storage/get_sync_group.py b/sdk/python/pulumi_azure/storage/get_sync_group.py index d9ff5cf46b..46429eae2c 100644 --- a/sdk/python/pulumi_azure/storage/get_sync_group.py +++ b/sdk/python/pulumi_azure/storage/get_sync_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/storage/get_table_entity.py b/sdk/python/pulumi_azure/storage/get_table_entity.py index e6d6a1ad5e..8935c34659 100644 --- a/sdk/python/pulumi_azure/storage/get_table_entity.py +++ b/sdk/python/pulumi_azure/storage/get_table_entity.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/storage/local_user.py b/sdk/python/pulumi_azure/storage/local_user.py index 4e31c7f4b3..13d53c07e7 100644 --- a/sdk/python/pulumi_azure/storage/local_user.py +++ b/sdk/python/pulumi_azure/storage/local_user.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,19 +33,56 @@ def __init__(__self__, *, :param pulumi.Input[bool] ssh_key_enabled: Specifies whether SSH Key Authentication is enabled. Defaults to `false`. :param pulumi.Input[bool] ssh_password_enabled: Specifies whether SSH Password Authentication is enabled. Defaults to `false`. """ - pulumi.set(__self__, "storage_account_id", storage_account_id) + LocalUserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_id=storage_account_id, + home_directory=home_directory, + name=name, + permission_scopes=permission_scopes, + ssh_authorized_keys=ssh_authorized_keys, + ssh_key_enabled=ssh_key_enabled, + ssh_password_enabled=ssh_password_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_id: Optional[pulumi.Input[str]] = None, + home_directory: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + permission_scopes: Optional[pulumi.Input[Sequence[pulumi.Input['LocalUserPermissionScopeArgs']]]] = None, + ssh_authorized_keys: Optional[pulumi.Input[Sequence[pulumi.Input['LocalUserSshAuthorizedKeyArgs']]]] = None, + ssh_key_enabled: Optional[pulumi.Input[bool]] = None, + ssh_password_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if home_directory is None and 'homeDirectory' in kwargs: + home_directory = kwargs['homeDirectory'] + if permission_scopes is None and 'permissionScopes' in kwargs: + permission_scopes = kwargs['permissionScopes'] + if ssh_authorized_keys is None and 'sshAuthorizedKeys' in kwargs: + ssh_authorized_keys = kwargs['sshAuthorizedKeys'] + if ssh_key_enabled is None and 'sshKeyEnabled' in kwargs: + ssh_key_enabled = kwargs['sshKeyEnabled'] + if ssh_password_enabled is None and 'sshPasswordEnabled' in kwargs: + ssh_password_enabled = kwargs['sshPasswordEnabled'] + + _setter("storage_account_id", storage_account_id) if home_directory is not None: - pulumi.set(__self__, "home_directory", home_directory) + _setter("home_directory", home_directory) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if permission_scopes is not None: - pulumi.set(__self__, "permission_scopes", permission_scopes) + _setter("permission_scopes", permission_scopes) if ssh_authorized_keys is not None: - pulumi.set(__self__, "ssh_authorized_keys", ssh_authorized_keys) + _setter("ssh_authorized_keys", ssh_authorized_keys) if ssh_key_enabled is not None: - pulumi.set(__self__, "ssh_key_enabled", ssh_key_enabled) + _setter("ssh_key_enabled", ssh_key_enabled) if ssh_password_enabled is not None: - pulumi.set(__self__, "ssh_password_enabled", ssh_password_enabled) + _setter("ssh_password_enabled", ssh_password_enabled) @property @pulumi.getter(name="storageAccountId") @@ -156,24 +193,63 @@ def __init__(__self__, *, :param pulumi.Input[bool] ssh_password_enabled: Specifies whether SSH Password Authentication is enabled. Defaults to `false`. :param pulumi.Input[str] storage_account_id: The ID of the Storage Account that this Storage Account Local User resides in. Changing this forces a new Storage Account Local User to be created. """ + _LocalUserState._configure( + lambda key, value: pulumi.set(__self__, key, value), + home_directory=home_directory, + name=name, + password=password, + permission_scopes=permission_scopes, + sid=sid, + ssh_authorized_keys=ssh_authorized_keys, + ssh_key_enabled=ssh_key_enabled, + ssh_password_enabled=ssh_password_enabled, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + home_directory: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + permission_scopes: Optional[pulumi.Input[Sequence[pulumi.Input['LocalUserPermissionScopeArgs']]]] = None, + sid: Optional[pulumi.Input[str]] = None, + ssh_authorized_keys: Optional[pulumi.Input[Sequence[pulumi.Input['LocalUserSshAuthorizedKeyArgs']]]] = None, + ssh_key_enabled: Optional[pulumi.Input[bool]] = None, + ssh_password_enabled: Optional[pulumi.Input[bool]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if home_directory is None and 'homeDirectory' in kwargs: + home_directory = kwargs['homeDirectory'] + if permission_scopes is None and 'permissionScopes' in kwargs: + permission_scopes = kwargs['permissionScopes'] + if ssh_authorized_keys is None and 'sshAuthorizedKeys' in kwargs: + ssh_authorized_keys = kwargs['sshAuthorizedKeys'] + if ssh_key_enabled is None and 'sshKeyEnabled' in kwargs: + ssh_key_enabled = kwargs['sshKeyEnabled'] + if ssh_password_enabled is None and 'sshPasswordEnabled' in kwargs: + ssh_password_enabled = kwargs['sshPasswordEnabled'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if home_directory is not None: - pulumi.set(__self__, "home_directory", home_directory) + _setter("home_directory", home_directory) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if permission_scopes is not None: - pulumi.set(__self__, "permission_scopes", permission_scopes) + _setter("permission_scopes", permission_scopes) if sid is not None: - pulumi.set(__self__, "sid", sid) + _setter("sid", sid) if ssh_authorized_keys is not None: - pulumi.set(__self__, "ssh_authorized_keys", ssh_authorized_keys) + _setter("ssh_authorized_keys", ssh_authorized_keys) if ssh_key_enabled is not None: - pulumi.set(__self__, "ssh_key_enabled", ssh_key_enabled) + _setter("ssh_key_enabled", ssh_key_enabled) if ssh_password_enabled is not None: - pulumi.set(__self__, "ssh_password_enabled", ssh_password_enabled) + _setter("ssh_password_enabled", ssh_password_enabled) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter(name="homeDirectory") @@ -425,6 +501,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LocalUserArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/management_policy.py b/sdk/python/pulumi_azure/storage/management_policy.py index d743b5e725..1567fd0050 100644 --- a/sdk/python/pulumi_azure/storage/management_policy.py +++ b/sdk/python/pulumi_azure/storage/management_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -23,9 +23,26 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_id: Specifies the id of the storage account to apply the management policy to. Changing this forces a new resource to be created. :param pulumi.Input[Sequence[pulumi.Input['ManagementPolicyRuleArgs']]] rules: A `rule` block as documented below. """ - pulumi.set(__self__, "storage_account_id", storage_account_id) + ManagementPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_id=storage_account_id, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_id: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['ManagementPolicyRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + + _setter("storage_account_id", storage_account_id) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter(name="storageAccountId") @@ -62,10 +79,25 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ManagementPolicyRuleArgs']]] rules: A `rule` block as documented below. :param pulumi.Input[str] storage_account_id: Specifies the id of the storage account to apply the management policy to. Changing this forces a new resource to be created. """ + _ManagementPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + rules=rules, + storage_account_id=storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rules: Optional[pulumi.Input[Sequence[pulumi.Input['ManagementPolicyRuleArgs']]]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) @property @pulumi.getter @@ -283,6 +315,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagementPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/mover.py b/sdk/python/pulumi_azure/storage/mover.py index 479d54871e..7e0d0e1d3f 100644 --- a/sdk/python/pulumi_azure/storage/mover.py +++ b/sdk/python/pulumi_azure/storage/mover.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['MoverArgs', 'Mover'] @@ -27,15 +27,38 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Storage Mover. Changing this forces a new Storage Mover to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Storage Mover. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + MoverArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + description=description, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -114,16 +137,37 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: Specifies the name of the Resource Group where the Storage Mover should exist. Changing this forces a new Storage Mover to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Storage Mover. """ + _MoverState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -275,6 +319,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MoverArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/mover_agent.py b/sdk/python/pulumi_azure/storage/mover_agent.py index e3867f14fe..994059b859 100644 --- a/sdk/python/pulumi_azure/storage/mover_agent.py +++ b/sdk/python/pulumi_azure/storage/mover_agent.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['MoverAgentArgs', 'MoverAgent'] @@ -27,13 +27,44 @@ def __init__(__self__, *, :param pulumi.Input[str] description: Specifies a description for this Storage Mover Agent. :param pulumi.Input[str] name: Specifies the name which should be used for this Storage Mover Agent. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "arc_virtual_machine_id", arc_virtual_machine_id) - pulumi.set(__self__, "arc_virtual_machine_uuid", arc_virtual_machine_uuid) - pulumi.set(__self__, "storage_mover_id", storage_mover_id) + MoverAgentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + arc_virtual_machine_id=arc_virtual_machine_id, + arc_virtual_machine_uuid=arc_virtual_machine_uuid, + storage_mover_id=storage_mover_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + arc_virtual_machine_id: Optional[pulumi.Input[str]] = None, + arc_virtual_machine_uuid: Optional[pulumi.Input[str]] = None, + storage_mover_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if arc_virtual_machine_id is None and 'arcVirtualMachineId' in kwargs: + arc_virtual_machine_id = kwargs['arcVirtualMachineId'] + if arc_virtual_machine_id is None: + raise TypeError("Missing 'arc_virtual_machine_id' argument") + if arc_virtual_machine_uuid is None and 'arcVirtualMachineUuid' in kwargs: + arc_virtual_machine_uuid = kwargs['arcVirtualMachineUuid'] + if arc_virtual_machine_uuid is None: + raise TypeError("Missing 'arc_virtual_machine_uuid' argument") + if storage_mover_id is None and 'storageMoverId' in kwargs: + storage_mover_id = kwargs['storageMoverId'] + if storage_mover_id is None: + raise TypeError("Missing 'storage_mover_id' argument") + + _setter("arc_virtual_machine_id", arc_virtual_machine_id) + _setter("arc_virtual_machine_uuid", arc_virtual_machine_uuid) + _setter("storage_mover_id", storage_mover_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="arcVirtualMachineId") @@ -112,16 +143,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Storage Mover Agent. Changing this forces a new resource to be created. :param pulumi.Input[str] storage_mover_id: Specifies the ID of the Storage Mover that this Agent should be connected to. Changing this forces a new resource to be created. """ + _MoverAgentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + arc_virtual_machine_id=arc_virtual_machine_id, + arc_virtual_machine_uuid=arc_virtual_machine_uuid, + description=description, + name=name, + storage_mover_id=storage_mover_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + arc_virtual_machine_id: Optional[pulumi.Input[str]] = None, + arc_virtual_machine_uuid: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_mover_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if arc_virtual_machine_id is None and 'arcVirtualMachineId' in kwargs: + arc_virtual_machine_id = kwargs['arcVirtualMachineId'] + if arc_virtual_machine_uuid is None and 'arcVirtualMachineUuid' in kwargs: + arc_virtual_machine_uuid = kwargs['arcVirtualMachineUuid'] + if storage_mover_id is None and 'storageMoverId' in kwargs: + storage_mover_id = kwargs['storageMoverId'] + if arc_virtual_machine_id is not None: - pulumi.set(__self__, "arc_virtual_machine_id", arc_virtual_machine_id) + _setter("arc_virtual_machine_id", arc_virtual_machine_id) if arc_virtual_machine_uuid is not None: - pulumi.set(__self__, "arc_virtual_machine_uuid", arc_virtual_machine_uuid) + _setter("arc_virtual_machine_uuid", arc_virtual_machine_uuid) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_mover_id is not None: - pulumi.set(__self__, "storage_mover_id", storage_mover_id) + _setter("storage_mover_id", storage_mover_id) @property @pulumi.getter(name="arcVirtualMachineId") @@ -271,6 +327,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MoverAgentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/mover_job_definition.py b/sdk/python/pulumi_azure/storage/mover_job_definition.py index 6c1d698d46..71dc283a48 100644 --- a/sdk/python/pulumi_azure/storage/mover_job_definition.py +++ b/sdk/python/pulumi_azure/storage/mover_job_definition.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['MoverJobDefinitionArgs', 'MoverJobDefinition'] @@ -35,20 +35,69 @@ def __init__(__self__, *, :param pulumi.Input[str] source_sub_path: Specifies the sub path to use when reading from the Storage Mover Source Endpoint. Changing this forces a new resource to be created. :param pulumi.Input[str] target_sub_path: Specifies the sub path to use when writing to the Storage Mover Target Endpoint. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "copy_mode", copy_mode) - pulumi.set(__self__, "source_name", source_name) - pulumi.set(__self__, "storage_mover_project_id", storage_mover_project_id) - pulumi.set(__self__, "target_name", target_name) + MoverJobDefinitionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + copy_mode=copy_mode, + source_name=source_name, + storage_mover_project_id=storage_mover_project_id, + target_name=target_name, + agent_name=agent_name, + description=description, + name=name, + source_sub_path=source_sub_path, + target_sub_path=target_sub_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + copy_mode: Optional[pulumi.Input[str]] = None, + source_name: Optional[pulumi.Input[str]] = None, + storage_mover_project_id: Optional[pulumi.Input[str]] = None, + target_name: Optional[pulumi.Input[str]] = None, + agent_name: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + source_sub_path: Optional[pulumi.Input[str]] = None, + target_sub_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if copy_mode is None and 'copyMode' in kwargs: + copy_mode = kwargs['copyMode'] + if copy_mode is None: + raise TypeError("Missing 'copy_mode' argument") + if source_name is None and 'sourceName' in kwargs: + source_name = kwargs['sourceName'] + if source_name is None: + raise TypeError("Missing 'source_name' argument") + if storage_mover_project_id is None and 'storageMoverProjectId' in kwargs: + storage_mover_project_id = kwargs['storageMoverProjectId'] + if storage_mover_project_id is None: + raise TypeError("Missing 'storage_mover_project_id' argument") + if target_name is None and 'targetName' in kwargs: + target_name = kwargs['targetName'] + if target_name is None: + raise TypeError("Missing 'target_name' argument") + if agent_name is None and 'agentName' in kwargs: + agent_name = kwargs['agentName'] + if source_sub_path is None and 'sourceSubPath' in kwargs: + source_sub_path = kwargs['sourceSubPath'] + if target_sub_path is None and 'targetSubPath' in kwargs: + target_sub_path = kwargs['targetSubPath'] + + _setter("copy_mode", copy_mode) + _setter("source_name", source_name) + _setter("storage_mover_project_id", storage_mover_project_id) + _setter("target_name", target_name) if agent_name is not None: - pulumi.set(__self__, "agent_name", agent_name) + _setter("agent_name", agent_name) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if source_sub_path is not None: - pulumi.set(__self__, "source_sub_path", source_sub_path) + _setter("source_sub_path", source_sub_path) if target_sub_path is not None: - pulumi.set(__self__, "target_sub_path", target_sub_path) + _setter("target_sub_path", target_sub_path) @property @pulumi.getter(name="copyMode") @@ -183,24 +232,65 @@ def __init__(__self__, *, :param pulumi.Input[str] target_name: Specifies the name of the Storage Mover target Endpoint. Changing this forces a new resource to be created. :param pulumi.Input[str] target_sub_path: Specifies the sub path to use when writing to the Storage Mover Target Endpoint. Changing this forces a new resource to be created. """ + _MoverJobDefinitionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + agent_name=agent_name, + copy_mode=copy_mode, + description=description, + name=name, + source_name=source_name, + source_sub_path=source_sub_path, + storage_mover_project_id=storage_mover_project_id, + target_name=target_name, + target_sub_path=target_sub_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + agent_name: Optional[pulumi.Input[str]] = None, + copy_mode: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + source_name: Optional[pulumi.Input[str]] = None, + source_sub_path: Optional[pulumi.Input[str]] = None, + storage_mover_project_id: Optional[pulumi.Input[str]] = None, + target_name: Optional[pulumi.Input[str]] = None, + target_sub_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if agent_name is None and 'agentName' in kwargs: + agent_name = kwargs['agentName'] + if copy_mode is None and 'copyMode' in kwargs: + copy_mode = kwargs['copyMode'] + if source_name is None and 'sourceName' in kwargs: + source_name = kwargs['sourceName'] + if source_sub_path is None and 'sourceSubPath' in kwargs: + source_sub_path = kwargs['sourceSubPath'] + if storage_mover_project_id is None and 'storageMoverProjectId' in kwargs: + storage_mover_project_id = kwargs['storageMoverProjectId'] + if target_name is None and 'targetName' in kwargs: + target_name = kwargs['targetName'] + if target_sub_path is None and 'targetSubPath' in kwargs: + target_sub_path = kwargs['targetSubPath'] + if agent_name is not None: - pulumi.set(__self__, "agent_name", agent_name) + _setter("agent_name", agent_name) if copy_mode is not None: - pulumi.set(__self__, "copy_mode", copy_mode) + _setter("copy_mode", copy_mode) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if source_name is not None: - pulumi.set(__self__, "source_name", source_name) + _setter("source_name", source_name) if source_sub_path is not None: - pulumi.set(__self__, "source_sub_path", source_sub_path) + _setter("source_sub_path", source_sub_path) if storage_mover_project_id is not None: - pulumi.set(__self__, "storage_mover_project_id", storage_mover_project_id) + _setter("storage_mover_project_id", storage_mover_project_id) if target_name is not None: - pulumi.set(__self__, "target_name", target_name) + _setter("target_name", target_name) if target_sub_path is not None: - pulumi.set(__self__, "target_sub_path", target_sub_path) + _setter("target_sub_path", target_sub_path) @property @pulumi.getter(name="agentName") @@ -460,6 +550,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MoverJobDefinitionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/mover_project.py b/sdk/python/pulumi_azure/storage/mover_project.py index 36638c67d2..11b7f890c9 100644 --- a/sdk/python/pulumi_azure/storage/mover_project.py +++ b/sdk/python/pulumi_azure/storage/mover_project.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['MoverProjectArgs', 'MoverProject'] @@ -23,11 +23,30 @@ def __init__(__self__, *, :param pulumi.Input[str] description: Specifies a description for this Storage Mover Project. :param pulumi.Input[str] name: Specifies the name which should be used for this Storage Mover Project. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "storage_mover_id", storage_mover_id) + MoverProjectArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_mover_id=storage_mover_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_mover_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_mover_id is None and 'storageMoverId' in kwargs: + storage_mover_id = kwargs['storageMoverId'] + if storage_mover_id is None: + raise TypeError("Missing 'storage_mover_id' argument") + + _setter("storage_mover_id", storage_mover_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="storageMoverId") @@ -78,12 +97,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Storage Mover Project. Changing this forces a new resource to be created. :param pulumi.Input[str] storage_mover_id: Specifies the ID of the storage mover for this Storage Mover Project. Changing this forces a new resource to be created. """ + _MoverProjectState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + name=name, + storage_mover_id=storage_mover_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_mover_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_mover_id is None and 'storageMoverId' in kwargs: + storage_mover_id = kwargs['storageMoverId'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_mover_id is not None: - pulumi.set(__self__, "storage_mover_id", storage_mover_id) + _setter("storage_mover_id", storage_mover_id) @property @pulumi.getter @@ -205,6 +241,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MoverProjectArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/mover_source_endpoint.py b/sdk/python/pulumi_azure/storage/mover_source_endpoint.py index e15ecd9e0f..4178e7f659 100644 --- a/sdk/python/pulumi_azure/storage/mover_source_endpoint.py +++ b/sdk/python/pulumi_azure/storage/mover_source_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['MoverSourceEndpointArgs', 'MoverSourceEndpoint'] @@ -29,16 +29,45 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Storage Mover Source Endpoint. Changing this forces a new resource to be created. :param pulumi.Input[str] nfs_version: Specifies the NFS protocol version. Possible values are `NFSauto`, `NFSv3` and `NFSv4`. Defaults to `NFSauto`. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "host", host) - pulumi.set(__self__, "storage_mover_id", storage_mover_id) + MoverSourceEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host=host, + storage_mover_id=storage_mover_id, + description=description, + export=export, + name=name, + nfs_version=nfs_version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host: Optional[pulumi.Input[str]] = None, + storage_mover_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + export: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + nfs_version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host is None: + raise TypeError("Missing 'host' argument") + if storage_mover_id is None and 'storageMoverId' in kwargs: + storage_mover_id = kwargs['storageMoverId'] + if storage_mover_id is None: + raise TypeError("Missing 'storage_mover_id' argument") + if nfs_version is None and 'nfsVersion' in kwargs: + nfs_version = kwargs['nfsVersion'] + + _setter("host", host) + _setter("storage_mover_id", storage_mover_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if export is not None: - pulumi.set(__self__, "export", export) + _setter("export", export) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if nfs_version is not None: - pulumi.set(__self__, "nfs_version", nfs_version) + _setter("nfs_version", nfs_version) @property @pulumi.getter @@ -131,18 +160,43 @@ def __init__(__self__, *, :param pulumi.Input[str] nfs_version: Specifies the NFS protocol version. Possible values are `NFSauto`, `NFSv3` and `NFSv4`. Defaults to `NFSauto`. Changing this forces a new resource to be created. :param pulumi.Input[str] storage_mover_id: Specifies the ID of the Storage Mover for this Storage Mover Source Endpoint. Changing this forces a new resource to be created. """ + _MoverSourceEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + export=export, + host=host, + name=name, + nfs_version=nfs_version, + storage_mover_id=storage_mover_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + export: Optional[pulumi.Input[str]] = None, + host: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + nfs_version: Optional[pulumi.Input[str]] = None, + storage_mover_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if nfs_version is None and 'nfsVersion' in kwargs: + nfs_version = kwargs['nfsVersion'] + if storage_mover_id is None and 'storageMoverId' in kwargs: + storage_mover_id = kwargs['storageMoverId'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if export is not None: - pulumi.set(__self__, "export", export) + _setter("export", export) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if nfs_version is not None: - pulumi.set(__self__, "nfs_version", nfs_version) + _setter("nfs_version", nfs_version) if storage_mover_id is not None: - pulumi.set(__self__, "storage_mover_id", storage_mover_id) + _setter("storage_mover_id", storage_mover_id) @property @pulumi.getter @@ -310,6 +364,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MoverSourceEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/mover_target_endpoint.py b/sdk/python/pulumi_azure/storage/mover_target_endpoint.py index a665424b3e..a39e53c6f3 100644 --- a/sdk/python/pulumi_azure/storage/mover_target_endpoint.py +++ b/sdk/python/pulumi_azure/storage/mover_target_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['MoverTargetEndpointArgs', 'MoverTargetEndpoint'] @@ -27,13 +27,44 @@ def __init__(__self__, *, :param pulumi.Input[str] description: Specifies a description for the Storage Mover Target Endpoint. :param pulumi.Input[str] name: Specifies the name which should be used for this Storage Mover Target Endpoint. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "storage_container_name", storage_container_name) - pulumi.set(__self__, "storage_mover_id", storage_mover_id) + MoverTargetEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_id=storage_account_id, + storage_container_name=storage_container_name, + storage_mover_id=storage_mover_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_container_name: Optional[pulumi.Input[str]] = None, + storage_mover_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if storage_container_name is None: + raise TypeError("Missing 'storage_container_name' argument") + if storage_mover_id is None and 'storageMoverId' in kwargs: + storage_mover_id = kwargs['storageMoverId'] + if storage_mover_id is None: + raise TypeError("Missing 'storage_mover_id' argument") + + _setter("storage_account_id", storage_account_id) + _setter("storage_container_name", storage_container_name) + _setter("storage_mover_id", storage_mover_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="storageAccountId") @@ -112,16 +143,41 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_container_name: Specifies the name of the storage blob container for this Storage Mover Target Endpoint. Changing this forces a new resource to be created. :param pulumi.Input[str] storage_mover_id: Specifies the ID of the storage mover for this Storage Mover Target Endpoint. Changing this forces a new resource to be created. """ + _MoverTargetEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + name=name, + storage_account_id=storage_account_id, + storage_container_name=storage_container_name, + storage_mover_id=storage_mover_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_container_name: Optional[pulumi.Input[str]] = None, + storage_mover_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if storage_mover_id is None and 'storageMoverId' in kwargs: + storage_mover_id = kwargs['storageMoverId'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if storage_container_name is not None: - pulumi.set(__self__, "storage_container_name", storage_container_name) + _setter("storage_container_name", storage_container_name) if storage_mover_id is not None: - pulumi.set(__self__, "storage_mover_id", storage_mover_id) + _setter("storage_mover_id", storage_mover_id) @property @pulumi.getter @@ -293,6 +349,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + MoverTargetEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/object_replication.py b/sdk/python/pulumi_azure/storage/object_replication.py index c34ea8216c..57694303fc 100644 --- a/sdk/python/pulumi_azure/storage/object_replication.py +++ b/sdk/python/pulumi_azure/storage/object_replication.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -25,9 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ObjectReplicationRuleArgs']]] rules: One or more `rules` blocks as defined below. :param pulumi.Input[str] source_storage_account_id: The ID of the source storage account. Changing this forces a new Storage Object Replication to be created. """ - pulumi.set(__self__, "destination_storage_account_id", destination_storage_account_id) - pulumi.set(__self__, "rules", rules) - pulumi.set(__self__, "source_storage_account_id", source_storage_account_id) + ObjectReplicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_storage_account_id=destination_storage_account_id, + rules=rules, + source_storage_account_id=source_storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_storage_account_id: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['ObjectReplicationRuleArgs']]]] = None, + source_storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_storage_account_id is None and 'destinationStorageAccountId' in kwargs: + destination_storage_account_id = kwargs['destinationStorageAccountId'] + if destination_storage_account_id is None: + raise TypeError("Missing 'destination_storage_account_id' argument") + if rules is None: + raise TypeError("Missing 'rules' argument") + if source_storage_account_id is None and 'sourceStorageAccountId' in kwargs: + source_storage_account_id = kwargs['sourceStorageAccountId'] + if source_storage_account_id is None: + raise TypeError("Missing 'source_storage_account_id' argument") + + _setter("destination_storage_account_id", destination_storage_account_id) + _setter("rules", rules) + _setter("source_storage_account_id", source_storage_account_id) @property @pulumi.getter(name="destinationStorageAccountId") @@ -82,16 +107,43 @@ def __init__(__self__, *, :param pulumi.Input[str] source_object_replication_id: The ID of the Object Replication in the source storage account. :param pulumi.Input[str] source_storage_account_id: The ID of the source storage account. Changing this forces a new Storage Object Replication to be created. """ + _ObjectReplicationState._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_object_replication_id=destination_object_replication_id, + destination_storage_account_id=destination_storage_account_id, + rules=rules, + source_object_replication_id=source_object_replication_id, + source_storage_account_id=source_storage_account_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_object_replication_id: Optional[pulumi.Input[str]] = None, + destination_storage_account_id: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['ObjectReplicationRuleArgs']]]] = None, + source_object_replication_id: Optional[pulumi.Input[str]] = None, + source_storage_account_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_object_replication_id is None and 'destinationObjectReplicationId' in kwargs: + destination_object_replication_id = kwargs['destinationObjectReplicationId'] + if destination_storage_account_id is None and 'destinationStorageAccountId' in kwargs: + destination_storage_account_id = kwargs['destinationStorageAccountId'] + if source_object_replication_id is None and 'sourceObjectReplicationId' in kwargs: + source_object_replication_id = kwargs['sourceObjectReplicationId'] + if source_storage_account_id is None and 'sourceStorageAccountId' in kwargs: + source_storage_account_id = kwargs['sourceStorageAccountId'] + if destination_object_replication_id is not None: - pulumi.set(__self__, "destination_object_replication_id", destination_object_replication_id) + _setter("destination_object_replication_id", destination_object_replication_id) if destination_storage_account_id is not None: - pulumi.set(__self__, "destination_storage_account_id", destination_storage_account_id) + _setter("destination_storage_account_id", destination_storage_account_id) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) if source_object_replication_id is not None: - pulumi.set(__self__, "source_object_replication_id", source_object_replication_id) + _setter("source_object_replication_id", source_object_replication_id) if source_storage_account_id is not None: - pulumi.set(__self__, "source_storage_account_id", source_storage_account_id) + _setter("source_storage_account_id", source_storage_account_id) @property @pulumi.getter(name="destinationObjectReplicationId") @@ -289,6 +341,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ObjectReplicationArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/outputs.py b/sdk/python/pulumi_azure/storage/outputs.py index 66e40afe53..7350db5d20 100644 --- a/sdk/python/pulumi_azure/storage/outputs.py +++ b/sdk/python/pulumi_azure/storage/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -103,9 +103,28 @@ def __init__(__self__, *, :param str directory_type: Specifies the directory service used. Possible values are `AADDS`, `AD` and `AADKERB`. :param 'AccountAzureFilesAuthenticationActiveDirectoryArgs' active_directory: A `active_directory` block as defined below. Required when `directory_type` is `AD`. """ - pulumi.set(__self__, "directory_type", directory_type) + AccountAzureFilesAuthentication._configure( + lambda key, value: pulumi.set(__self__, key, value), + directory_type=directory_type, + active_directory=active_directory, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + directory_type: Optional[str] = None, + active_directory: Optional['outputs.AccountAzureFilesAuthenticationActiveDirectory'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if directory_type is None and 'directoryType' in kwargs: + directory_type = kwargs['directoryType'] + if directory_type is None: + raise TypeError("Missing 'directory_type' argument") + if active_directory is None and 'activeDirectory' in kwargs: + active_directory = kwargs['activeDirectory'] + + _setter("directory_type", directory_type) if active_directory is not None: - pulumi.set(__self__, "active_directory", active_directory) + _setter("active_directory", active_directory) @property @pulumi.getter(name="directoryType") @@ -168,16 +187,53 @@ def __init__(__self__, *, :param str netbios_domain_name: Specifies the NetBIOS domain name. This is required when `directory_type` is set to `AD`. :param str storage_sid: Specifies the security identifier (SID) for Azure Storage. This is required when `directory_type` is set to `AD`. """ - pulumi.set(__self__, "domain_guid", domain_guid) - pulumi.set(__self__, "domain_name", domain_name) + AccountAzureFilesAuthenticationActiveDirectory._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_guid=domain_guid, + domain_name=domain_name, + domain_sid=domain_sid, + forest_name=forest_name, + netbios_domain_name=netbios_domain_name, + storage_sid=storage_sid, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_guid: Optional[str] = None, + domain_name: Optional[str] = None, + domain_sid: Optional[str] = None, + forest_name: Optional[str] = None, + netbios_domain_name: Optional[str] = None, + storage_sid: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_guid is None and 'domainGuid' in kwargs: + domain_guid = kwargs['domainGuid'] + if domain_guid is None: + raise TypeError("Missing 'domain_guid' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_sid is None and 'domainSid' in kwargs: + domain_sid = kwargs['domainSid'] + if forest_name is None and 'forestName' in kwargs: + forest_name = kwargs['forestName'] + if netbios_domain_name is None and 'netbiosDomainName' in kwargs: + netbios_domain_name = kwargs['netbiosDomainName'] + if storage_sid is None and 'storageSid' in kwargs: + storage_sid = kwargs['storageSid'] + + _setter("domain_guid", domain_guid) + _setter("domain_name", domain_name) if domain_sid is not None: - pulumi.set(__self__, "domain_sid", domain_sid) + _setter("domain_sid", domain_sid) if forest_name is not None: - pulumi.set(__self__, "forest_name", forest_name) + _setter("forest_name", forest_name) if netbios_domain_name is not None: - pulumi.set(__self__, "netbios_domain_name", netbios_domain_name) + _setter("netbios_domain_name", netbios_domain_name) if storage_sid is not None: - pulumi.set(__self__, "storage_sid", storage_sid) + _setter("storage_sid", storage_sid) @property @pulumi.getter(name="domainGuid") @@ -294,24 +350,69 @@ def __init__(__self__, *, > **NOTE:** This field cannot be configured when `kind` is set to `Storage` (V1). """ + AccountBlobProperties._configure( + lambda key, value: pulumi.set(__self__, key, value), + change_feed_enabled=change_feed_enabled, + change_feed_retention_in_days=change_feed_retention_in_days, + container_delete_retention_policy=container_delete_retention_policy, + cors_rules=cors_rules, + default_service_version=default_service_version, + delete_retention_policy=delete_retention_policy, + last_access_time_enabled=last_access_time_enabled, + restore_policy=restore_policy, + versioning_enabled=versioning_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + change_feed_enabled: Optional[bool] = None, + change_feed_retention_in_days: Optional[int] = None, + container_delete_retention_policy: Optional['outputs.AccountBlobPropertiesContainerDeleteRetentionPolicy'] = None, + cors_rules: Optional[Sequence['outputs.AccountBlobPropertiesCorsRule']] = None, + default_service_version: Optional[str] = None, + delete_retention_policy: Optional['outputs.AccountBlobPropertiesDeleteRetentionPolicy'] = None, + last_access_time_enabled: Optional[bool] = None, + restore_policy: Optional['outputs.AccountBlobPropertiesRestorePolicy'] = None, + versioning_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if change_feed_enabled is None and 'changeFeedEnabled' in kwargs: + change_feed_enabled = kwargs['changeFeedEnabled'] + if change_feed_retention_in_days is None and 'changeFeedRetentionInDays' in kwargs: + change_feed_retention_in_days = kwargs['changeFeedRetentionInDays'] + if container_delete_retention_policy is None and 'containerDeleteRetentionPolicy' in kwargs: + container_delete_retention_policy = kwargs['containerDeleteRetentionPolicy'] + if cors_rules is None and 'corsRules' in kwargs: + cors_rules = kwargs['corsRules'] + if default_service_version is None and 'defaultServiceVersion' in kwargs: + default_service_version = kwargs['defaultServiceVersion'] + if delete_retention_policy is None and 'deleteRetentionPolicy' in kwargs: + delete_retention_policy = kwargs['deleteRetentionPolicy'] + if last_access_time_enabled is None and 'lastAccessTimeEnabled' in kwargs: + last_access_time_enabled = kwargs['lastAccessTimeEnabled'] + if restore_policy is None and 'restorePolicy' in kwargs: + restore_policy = kwargs['restorePolicy'] + if versioning_enabled is None and 'versioningEnabled' in kwargs: + versioning_enabled = kwargs['versioningEnabled'] + if change_feed_enabled is not None: - pulumi.set(__self__, "change_feed_enabled", change_feed_enabled) + _setter("change_feed_enabled", change_feed_enabled) if change_feed_retention_in_days is not None: - pulumi.set(__self__, "change_feed_retention_in_days", change_feed_retention_in_days) + _setter("change_feed_retention_in_days", change_feed_retention_in_days) if container_delete_retention_policy is not None: - pulumi.set(__self__, "container_delete_retention_policy", container_delete_retention_policy) + _setter("container_delete_retention_policy", container_delete_retention_policy) if cors_rules is not None: - pulumi.set(__self__, "cors_rules", cors_rules) + _setter("cors_rules", cors_rules) if default_service_version is not None: - pulumi.set(__self__, "default_service_version", default_service_version) + _setter("default_service_version", default_service_version) if delete_retention_policy is not None: - pulumi.set(__self__, "delete_retention_policy", delete_retention_policy) + _setter("delete_retention_policy", delete_retention_policy) if last_access_time_enabled is not None: - pulumi.set(__self__, "last_access_time_enabled", last_access_time_enabled) + _setter("last_access_time_enabled", last_access_time_enabled) if restore_policy is not None: - pulumi.set(__self__, "restore_policy", restore_policy) + _setter("restore_policy", restore_policy) if versioning_enabled is not None: - pulumi.set(__self__, "versioning_enabled", versioning_enabled) + _setter("versioning_enabled", versioning_enabled) @property @pulumi.getter(name="changeFeedEnabled") @@ -403,8 +504,19 @@ def __init__(__self__, *, """ :param int days: Specifies the number of days that the container should be retained, between `1` and `365` days. Defaults to `7`. """ + AccountBlobPropertiesContainerDeleteRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -456,11 +568,50 @@ def __init__(__self__, *, :param Sequence[str] exposed_headers: A list of response headers that are exposed to CORS clients. :param int max_age_in_seconds: The number of seconds the client should cache a preflight response. """ - pulumi.set(__self__, "allowed_headers", allowed_headers) - pulumi.set(__self__, "allowed_methods", allowed_methods) - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "exposed_headers", exposed_headers) - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + AccountBlobPropertiesCorsRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + exposed_headers=exposed_headers, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_headers: Optional[Sequence[str]] = None, + allowed_methods: Optional[Sequence[str]] = None, + allowed_origins: Optional[Sequence[str]] = None, + exposed_headers: Optional[Sequence[str]] = None, + max_age_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_headers is None: + raise TypeError("Missing 'allowed_headers' argument") + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_methods is None: + raise TypeError("Missing 'allowed_methods' argument") + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if exposed_headers is None and 'exposedHeaders' in kwargs: + exposed_headers = kwargs['exposedHeaders'] + if exposed_headers is None: + raise TypeError("Missing 'exposed_headers' argument") + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + if max_age_in_seconds is None: + raise TypeError("Missing 'max_age_in_seconds' argument") + + _setter("allowed_headers", allowed_headers) + _setter("allowed_methods", allowed_methods) + _setter("allowed_origins", allowed_origins) + _setter("exposed_headers", exposed_headers) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowedHeaders") @@ -511,8 +662,19 @@ def __init__(__self__, *, """ :param int days: Specifies the number of days that the blob should be retained, between `1` and `365` days. Defaults to `7`. """ + AccountBlobPropertiesDeleteRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -530,7 +692,20 @@ def __init__(__self__, *, """ :param int days: Specifies the number of days that the blob can be restored, between `1` and `365` days. This must be less than the `days` specified for `delete_retention_policy`. """ - pulumi.set(__self__, "days", days) + AccountBlobPropertiesRestorePolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is None: + raise TypeError("Missing 'days' argument") + + _setter("days", days) @property @pulumi.getter @@ -567,9 +742,26 @@ def __init__(__self__, *, :param str name: The Custom Domain Name to use for the Storage Account, which will be validated by Azure. :param bool use_subdomain: Should the Custom Domain Name be validated by using indirect CNAME validation? """ - pulumi.set(__self__, "name", name) + AccountCustomDomain._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + use_subdomain=use_subdomain, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + use_subdomain: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if use_subdomain is None and 'useSubdomain' in kwargs: + use_subdomain = kwargs['useSubdomain'] + + _setter("name", name) if use_subdomain is not None: - pulumi.set(__self__, "use_subdomain", use_subdomain) + _setter("use_subdomain", use_subdomain) @property @pulumi.getter @@ -618,8 +810,29 @@ def __init__(__self__, *, > **NOTE:** `customer_managed_key` can only be set when the `account_kind` is set to `StorageV2` or `account_tier` set to `Premium`, and the identity type is `UserAssigned`. """ - pulumi.set(__self__, "key_vault_key_id", key_vault_key_id) - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + AccountCustomerManagedKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_vault_key_id=key_vault_key_id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_vault_key_id: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_vault_key_id is None and 'keyVaultKeyId' in kwargs: + key_vault_key_id = kwargs['keyVaultKeyId'] + if key_vault_key_id is None: + raise TypeError("Missing 'key_vault_key_id' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_assigned_identity_id is None: + raise TypeError("Missing 'user_assigned_identity_id' argument") + + _setter("key_vault_key_id", key_vault_key_id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter(name="keyVaultKeyId") @@ -678,13 +891,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Identity of this Storage Account. :param str tenant_id: The Tenant ID for the Service Principal associated with the Identity of this Storage Account. """ - pulumi.set(__self__, "type", type) + AccountIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -753,9 +991,34 @@ def __init__(__self__, *, :param int period_since_creation_in_days: The immutability period for the blobs in the container since the policy creation, in days. :param str state: Defines the mode of the policy. `Disabled` state disables the policy, `Unlocked` state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, `Locked` state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. """ - pulumi.set(__self__, "allow_protected_append_writes", allow_protected_append_writes) - pulumi.set(__self__, "period_since_creation_in_days", period_since_creation_in_days) - pulumi.set(__self__, "state", state) + AccountImmutabilityPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_protected_append_writes=allow_protected_append_writes, + period_since_creation_in_days=period_since_creation_in_days, + state=state, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_protected_append_writes: Optional[bool] = None, + period_since_creation_in_days: Optional[int] = None, + state: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_protected_append_writes is None and 'allowProtectedAppendWrites' in kwargs: + allow_protected_append_writes = kwargs['allowProtectedAppendWrites'] + if allow_protected_append_writes is None: + raise TypeError("Missing 'allow_protected_append_writes' argument") + if period_since_creation_in_days is None and 'periodSinceCreationInDays' in kwargs: + period_since_creation_in_days = kwargs['periodSinceCreationInDays'] + if period_since_creation_in_days is None: + raise TypeError("Missing 'period_since_creation_in_days' argument") + if state is None: + raise TypeError("Missing 'state' argument") + + _setter("allow_protected_append_writes", allow_protected_append_writes) + _setter("period_since_creation_in_days", period_since_creation_in_days) + _setter("state", state) @property @pulumi.getter(name="allowProtectedAppendWrites") @@ -828,15 +1091,44 @@ def __init__(__self__, *, > **Note:** [More information on Validation is available here](https://docs.microsoft.com/en-gb/azure/storage/blobs/storage-custom-domain-name) :param Sequence[str] virtual_network_subnet_ids: A list of resource ids for subnets. """ - pulumi.set(__self__, "default_action", default_action) + AccountNetworkRules._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + bypasses=bypasses, + ip_rules=ip_rules, + private_link_accesses=private_link_accesses, + virtual_network_subnet_ids=virtual_network_subnet_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[str] = None, + bypasses: Optional[Sequence[str]] = None, + ip_rules: Optional[Sequence[str]] = None, + private_link_accesses: Optional[Sequence['outputs.AccountNetworkRulesPrivateLinkAccess']] = None, + virtual_network_subnet_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if default_action is None: + raise TypeError("Missing 'default_action' argument") + if ip_rules is None and 'ipRules' in kwargs: + ip_rules = kwargs['ipRules'] + if private_link_accesses is None and 'privateLinkAccesses' in kwargs: + private_link_accesses = kwargs['privateLinkAccesses'] + if virtual_network_subnet_ids is None and 'virtualNetworkSubnetIds' in kwargs: + virtual_network_subnet_ids = kwargs['virtualNetworkSubnetIds'] + + _setter("default_action", default_action) if bypasses is not None: - pulumi.set(__self__, "bypasses", bypasses) + _setter("bypasses", bypasses) if ip_rules is not None: - pulumi.set(__self__, "ip_rules", ip_rules) + _setter("ip_rules", ip_rules) if private_link_accesses is not None: - pulumi.set(__self__, "private_link_accesses", private_link_accesses) + _setter("private_link_accesses", private_link_accesses) if virtual_network_subnet_ids is not None: - pulumi.set(__self__, "virtual_network_subnet_ids", virtual_network_subnet_ids) + _setter("virtual_network_subnet_ids", virtual_network_subnet_ids) @property @pulumi.getter(name="defaultAction") @@ -915,9 +1207,28 @@ def __init__(__self__, *, :param str endpoint_resource_id: The resource id of the resource access rule to be granted access. :param str endpoint_tenant_id: The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id. """ - pulumi.set(__self__, "endpoint_resource_id", endpoint_resource_id) + AccountNetworkRulesPrivateLinkAccess._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint_resource_id=endpoint_resource_id, + endpoint_tenant_id=endpoint_tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint_resource_id: Optional[str] = None, + endpoint_tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_resource_id is None and 'endpointResourceId' in kwargs: + endpoint_resource_id = kwargs['endpointResourceId'] + if endpoint_resource_id is None: + raise TypeError("Missing 'endpoint_resource_id' argument") + if endpoint_tenant_id is None and 'endpointTenantId' in kwargs: + endpoint_tenant_id = kwargs['endpointTenantId'] + + _setter("endpoint_resource_id", endpoint_resource_id) if endpoint_tenant_id is not None: - pulumi.set(__self__, "endpoint_tenant_id", endpoint_tenant_id) + _setter("endpoint_tenant_id", endpoint_tenant_id) @property @pulumi.getter(name="endpointResourceId") @@ -964,9 +1275,28 @@ def __init__(__self__, *, :param str endpoint_resource_id: The resource id of the resource access rule to be granted access. :param str endpoint_tenant_id: The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id. """ - pulumi.set(__self__, "endpoint_resource_id", endpoint_resource_id) + AccountNetworkRulesPrivateLinkAccessRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint_resource_id=endpoint_resource_id, + endpoint_tenant_id=endpoint_tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint_resource_id: Optional[str] = None, + endpoint_tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint_resource_id is None and 'endpointResourceId' in kwargs: + endpoint_resource_id = kwargs['endpointResourceId'] + if endpoint_resource_id is None: + raise TypeError("Missing 'endpoint_resource_id' argument") + if endpoint_tenant_id is None and 'endpointTenantId' in kwargs: + endpoint_tenant_id = kwargs['endpointTenantId'] + + _setter("endpoint_resource_id", endpoint_resource_id) if endpoint_tenant_id is not None: - pulumi.set(__self__, "endpoint_tenant_id", endpoint_tenant_id) + _setter("endpoint_tenant_id", endpoint_tenant_id) @property @pulumi.getter(name="endpointResourceId") @@ -1019,14 +1349,37 @@ def __init__(__self__, *, :param 'AccountQueuePropertiesLoggingArgs' logging: A `logging` block as defined below. :param 'AccountQueuePropertiesMinuteMetricsArgs' minute_metrics: A `minute_metrics` block as defined below. """ + AccountQueueProperties._configure( + lambda key, value: pulumi.set(__self__, key, value), + cors_rules=cors_rules, + hour_metrics=hour_metrics, + logging=logging, + minute_metrics=minute_metrics, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cors_rules: Optional[Sequence['outputs.AccountQueuePropertiesCorsRule']] = None, + hour_metrics: Optional['outputs.AccountQueuePropertiesHourMetrics'] = None, + logging: Optional['outputs.AccountQueuePropertiesLogging'] = None, + minute_metrics: Optional['outputs.AccountQueuePropertiesMinuteMetrics'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cors_rules is None and 'corsRules' in kwargs: + cors_rules = kwargs['corsRules'] + if hour_metrics is None and 'hourMetrics' in kwargs: + hour_metrics = kwargs['hourMetrics'] + if minute_metrics is None and 'minuteMetrics' in kwargs: + minute_metrics = kwargs['minuteMetrics'] + if cors_rules is not None: - pulumi.set(__self__, "cors_rules", cors_rules) + _setter("cors_rules", cors_rules) if hour_metrics is not None: - pulumi.set(__self__, "hour_metrics", hour_metrics) + _setter("hour_metrics", hour_metrics) if logging is not None: - pulumi.set(__self__, "logging", logging) + _setter("logging", logging) if minute_metrics is not None: - pulumi.set(__self__, "minute_metrics", minute_metrics) + _setter("minute_metrics", minute_metrics) @property @pulumi.getter(name="corsRules") @@ -1102,11 +1455,50 @@ def __init__(__self__, *, :param Sequence[str] exposed_headers: A list of response headers that are exposed to CORS clients. :param int max_age_in_seconds: The number of seconds the client should cache a preflight response. """ - pulumi.set(__self__, "allowed_headers", allowed_headers) - pulumi.set(__self__, "allowed_methods", allowed_methods) - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "exposed_headers", exposed_headers) - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + AccountQueuePropertiesCorsRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + exposed_headers=exposed_headers, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_headers: Optional[Sequence[str]] = None, + allowed_methods: Optional[Sequence[str]] = None, + allowed_origins: Optional[Sequence[str]] = None, + exposed_headers: Optional[Sequence[str]] = None, + max_age_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_headers is None: + raise TypeError("Missing 'allowed_headers' argument") + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_methods is None: + raise TypeError("Missing 'allowed_methods' argument") + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if exposed_headers is None and 'exposedHeaders' in kwargs: + exposed_headers = kwargs['exposedHeaders'] + if exposed_headers is None: + raise TypeError("Missing 'exposed_headers' argument") + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + if max_age_in_seconds is None: + raise TypeError("Missing 'max_age_in_seconds' argument") + + _setter("allowed_headers", allowed_headers) + _setter("allowed_methods", allowed_methods) + _setter("allowed_origins", allowed_origins) + _setter("exposed_headers", exposed_headers) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowedHeaders") @@ -1182,12 +1574,37 @@ def __init__(__self__, *, :param bool include_apis: Indicates whether metrics should generate summary statistics for called API operations. :param int retention_policy_days: Specifies the number of days that logs will be retained. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "version", version) + AccountQueuePropertiesHourMetrics._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + version=version, + include_apis=include_apis, + retention_policy_days=retention_policy_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + version: Optional[str] = None, + include_apis: Optional[bool] = None, + retention_policy_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if include_apis is None and 'includeApis' in kwargs: + include_apis = kwargs['includeApis'] + if retention_policy_days is None and 'retentionPolicyDays' in kwargs: + retention_policy_days = kwargs['retentionPolicyDays'] + + _setter("enabled", enabled) + _setter("version", version) if include_apis is not None: - pulumi.set(__self__, "include_apis", include_apis) + _setter("include_apis", include_apis) if retention_policy_days is not None: - pulumi.set(__self__, "retention_policy_days", retention_policy_days) + _setter("retention_policy_days", retention_policy_days) @property @pulumi.getter @@ -1254,12 +1671,41 @@ def __init__(__self__, *, :param bool write: Indicates whether all write requests should be logged. :param int retention_policy_days: Specifies the number of days that logs will be retained. """ - pulumi.set(__self__, "delete", delete) - pulumi.set(__self__, "read", read) - pulumi.set(__self__, "version", version) - pulumi.set(__self__, "write", write) + AccountQueuePropertiesLogging._configure( + lambda key, value: pulumi.set(__self__, key, value), + delete=delete, + read=read, + version=version, + write=write, + retention_policy_days=retention_policy_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + delete: Optional[bool] = None, + read: Optional[bool] = None, + version: Optional[str] = None, + write: Optional[bool] = None, + retention_policy_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if delete is None: + raise TypeError("Missing 'delete' argument") + if read is None: + raise TypeError("Missing 'read' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if write is None: + raise TypeError("Missing 'write' argument") + if retention_policy_days is None and 'retentionPolicyDays' in kwargs: + retention_policy_days = kwargs['retentionPolicyDays'] + + _setter("delete", delete) + _setter("read", read) + _setter("version", version) + _setter("write", write) if retention_policy_days is not None: - pulumi.set(__self__, "retention_policy_days", retention_policy_days) + _setter("retention_policy_days", retention_policy_days) @property @pulumi.getter @@ -1334,12 +1780,37 @@ def __init__(__self__, *, :param bool include_apis: Indicates whether metrics should generate summary statistics for called API operations. :param int retention_policy_days: Specifies the number of days that logs will be retained. """ - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "version", version) + AccountQueuePropertiesMinuteMetrics._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + version=version, + include_apis=include_apis, + retention_policy_days=retention_policy_days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + version: Optional[str] = None, + include_apis: Optional[bool] = None, + retention_policy_days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if version is None: + raise TypeError("Missing 'version' argument") + if include_apis is None and 'includeApis' in kwargs: + include_apis = kwargs['includeApis'] + if retention_policy_days is None and 'retentionPolicyDays' in kwargs: + retention_policy_days = kwargs['retentionPolicyDays'] + + _setter("enabled", enabled) + _setter("version", version) if include_apis is not None: - pulumi.set(__self__, "include_apis", include_apis) + _setter("include_apis", include_apis) if retention_policy_days is not None: - pulumi.set(__self__, "retention_policy_days", retention_policy_days) + _setter("retention_policy_days", retention_policy_days) @property @pulumi.getter @@ -1404,12 +1875,31 @@ def __init__(__self__, *, :param bool publish_internet_endpoints: Should internet routing storage endpoints be published? Defaults to `false`. :param bool publish_microsoft_endpoints: Should Microsoft routing storage endpoints be published? Defaults to `false`. """ + AccountRouting._configure( + lambda key, value: pulumi.set(__self__, key, value), + choice=choice, + publish_internet_endpoints=publish_internet_endpoints, + publish_microsoft_endpoints=publish_microsoft_endpoints, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + choice: Optional[str] = None, + publish_internet_endpoints: Optional[bool] = None, + publish_microsoft_endpoints: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if publish_internet_endpoints is None and 'publishInternetEndpoints' in kwargs: + publish_internet_endpoints = kwargs['publishInternetEndpoints'] + if publish_microsoft_endpoints is None and 'publishMicrosoftEndpoints' in kwargs: + publish_microsoft_endpoints = kwargs['publishMicrosoftEndpoints'] + if choice is not None: - pulumi.set(__self__, "choice", choice) + _setter("choice", choice) if publish_internet_endpoints is not None: - pulumi.set(__self__, "publish_internet_endpoints", publish_internet_endpoints) + _setter("publish_internet_endpoints", publish_internet_endpoints) if publish_microsoft_endpoints is not None: - pulumi.set(__self__, "publish_microsoft_endpoints", publish_microsoft_endpoints) + _setter("publish_microsoft_endpoints", publish_microsoft_endpoints) @property @pulumi.getter @@ -1464,9 +1954,28 @@ def __init__(__self__, *, :param str expiration_period: The SAS expiration period in format of `DD.HH:MM:SS`. :param str expiration_action: The SAS expiration action. The only possible value is `Log` at this moment. Defaults to `Log`. """ - pulumi.set(__self__, "expiration_period", expiration_period) + AccountSasPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiration_period=expiration_period, + expiration_action=expiration_action, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiration_period: Optional[str] = None, + expiration_action: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiration_period is None and 'expirationPeriod' in kwargs: + expiration_period = kwargs['expirationPeriod'] + if expiration_period is None: + raise TypeError("Missing 'expiration_period' argument") + if expiration_action is None and 'expirationAction' in kwargs: + expiration_action = kwargs['expirationAction'] + + _setter("expiration_period", expiration_period) if expiration_action is not None: - pulumi.set(__self__, "expiration_action", expiration_action) + _setter("expiration_action", expiration_action) @property @pulumi.getter(name="expirationPeriod") @@ -1515,12 +2024,31 @@ def __init__(__self__, *, :param 'AccountSharePropertiesRetentionPolicyArgs' retention_policy: A `retention_policy` block as defined below. :param 'AccountSharePropertiesSmbArgs' smb: A `smb` block as defined below. """ + AccountShareProperties._configure( + lambda key, value: pulumi.set(__self__, key, value), + cors_rules=cors_rules, + retention_policy=retention_policy, + smb=smb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cors_rules: Optional[Sequence['outputs.AccountSharePropertiesCorsRule']] = None, + retention_policy: Optional['outputs.AccountSharePropertiesRetentionPolicy'] = None, + smb: Optional['outputs.AccountSharePropertiesSmb'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cors_rules is None and 'corsRules' in kwargs: + cors_rules = kwargs['corsRules'] + if retention_policy is None and 'retentionPolicy' in kwargs: + retention_policy = kwargs['retentionPolicy'] + if cors_rules is not None: - pulumi.set(__self__, "cors_rules", cors_rules) + _setter("cors_rules", cors_rules) if retention_policy is not None: - pulumi.set(__self__, "retention_policy", retention_policy) + _setter("retention_policy", retention_policy) if smb is not None: - pulumi.set(__self__, "smb", smb) + _setter("smb", smb) @property @pulumi.getter(name="corsRules") @@ -1588,11 +2116,50 @@ def __init__(__self__, *, :param Sequence[str] exposed_headers: A list of response headers that are exposed to CORS clients. :param int max_age_in_seconds: The number of seconds the client should cache a preflight response. """ - pulumi.set(__self__, "allowed_headers", allowed_headers) - pulumi.set(__self__, "allowed_methods", allowed_methods) - pulumi.set(__self__, "allowed_origins", allowed_origins) - pulumi.set(__self__, "exposed_headers", exposed_headers) - pulumi.set(__self__, "max_age_in_seconds", max_age_in_seconds) + AccountSharePropertiesCorsRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_headers=allowed_headers, + allowed_methods=allowed_methods, + allowed_origins=allowed_origins, + exposed_headers=exposed_headers, + max_age_in_seconds=max_age_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_headers: Optional[Sequence[str]] = None, + allowed_methods: Optional[Sequence[str]] = None, + allowed_origins: Optional[Sequence[str]] = None, + exposed_headers: Optional[Sequence[str]] = None, + max_age_in_seconds: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_headers is None and 'allowedHeaders' in kwargs: + allowed_headers = kwargs['allowedHeaders'] + if allowed_headers is None: + raise TypeError("Missing 'allowed_headers' argument") + if allowed_methods is None and 'allowedMethods' in kwargs: + allowed_methods = kwargs['allowedMethods'] + if allowed_methods is None: + raise TypeError("Missing 'allowed_methods' argument") + if allowed_origins is None and 'allowedOrigins' in kwargs: + allowed_origins = kwargs['allowedOrigins'] + if allowed_origins is None: + raise TypeError("Missing 'allowed_origins' argument") + if exposed_headers is None and 'exposedHeaders' in kwargs: + exposed_headers = kwargs['exposedHeaders'] + if exposed_headers is None: + raise TypeError("Missing 'exposed_headers' argument") + if max_age_in_seconds is None and 'maxAgeInSeconds' in kwargs: + max_age_in_seconds = kwargs['maxAgeInSeconds'] + if max_age_in_seconds is None: + raise TypeError("Missing 'max_age_in_seconds' argument") + + _setter("allowed_headers", allowed_headers) + _setter("allowed_methods", allowed_methods) + _setter("allowed_origins", allowed_origins) + _setter("exposed_headers", exposed_headers) + _setter("max_age_in_seconds", max_age_in_seconds) @property @pulumi.getter(name="allowedHeaders") @@ -1643,8 +2210,19 @@ def __init__(__self__, *, """ :param int days: Specifies the number of days that the `storage.Share` should be retained, between `1` and `365` days. Defaults to `7`. """ + AccountSharePropertiesRetentionPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + days=days, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + days: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if days is not None: - pulumi.set(__self__, "days", days) + _setter("days", days) @property @pulumi.getter @@ -1693,16 +2271,43 @@ def __init__(__self__, *, :param bool multichannel_enabled: Indicates whether multichannel is enabled. Defaults to `false`. This is only supported on Premium storage accounts. :param Sequence[str] versions: A set of SMB protocol versions. Possible values are `SMB2.1`, `SMB3.0`, and `SMB3.1.1`. """ + AccountSharePropertiesSmb._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_types=authentication_types, + channel_encryption_types=channel_encryption_types, + kerberos_ticket_encryption_types=kerberos_ticket_encryption_types, + multichannel_enabled=multichannel_enabled, + versions=versions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_types: Optional[Sequence[str]] = None, + channel_encryption_types: Optional[Sequence[str]] = None, + kerberos_ticket_encryption_types: Optional[Sequence[str]] = None, + multichannel_enabled: Optional[bool] = None, + versions: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_types is None and 'authenticationTypes' in kwargs: + authentication_types = kwargs['authenticationTypes'] + if channel_encryption_types is None and 'channelEncryptionTypes' in kwargs: + channel_encryption_types = kwargs['channelEncryptionTypes'] + if kerberos_ticket_encryption_types is None and 'kerberosTicketEncryptionTypes' in kwargs: + kerberos_ticket_encryption_types = kwargs['kerberosTicketEncryptionTypes'] + if multichannel_enabled is None and 'multichannelEnabled' in kwargs: + multichannel_enabled = kwargs['multichannelEnabled'] + if authentication_types is not None: - pulumi.set(__self__, "authentication_types", authentication_types) + _setter("authentication_types", authentication_types) if channel_encryption_types is not None: - pulumi.set(__self__, "channel_encryption_types", channel_encryption_types) + _setter("channel_encryption_types", channel_encryption_types) if kerberos_ticket_encryption_types is not None: - pulumi.set(__self__, "kerberos_ticket_encryption_types", kerberos_ticket_encryption_types) + _setter("kerberos_ticket_encryption_types", kerberos_ticket_encryption_types) if multichannel_enabled is not None: - pulumi.set(__self__, "multichannel_enabled", multichannel_enabled) + _setter("multichannel_enabled", multichannel_enabled) if versions is not None: - pulumi.set(__self__, "versions", versions) + _setter("versions", versions) @property @pulumi.getter(name="authenticationTypes") @@ -1773,10 +2378,27 @@ def __init__(__self__, *, :param str error404_document: The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file. :param str index_document: The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html. The value is case-sensitive. """ + AccountStaticWebsite._configure( + lambda key, value: pulumi.set(__self__, key, value), + error404_document=error404_document, + index_document=index_document, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + error404_document: Optional[str] = None, + index_document: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if error404_document is None and 'error404Document' in kwargs: + error404_document = kwargs['error404Document'] + if index_document is None and 'indexDocument' in kwargs: + index_document = kwargs['indexDocument'] + if error404_document is not None: - pulumi.set(__self__, "error404_document", error404_document) + _setter("error404_document", error404_document) if index_document is not None: - pulumi.set(__self__, "index_document", index_document) + _setter("index_document", index_document) @property @pulumi.getter(name="error404Document") @@ -1833,14 +2455,53 @@ def __init__(__self__, *, :param str storage_container_name: The storage container name to store the blob inventory files for this rule. :param 'BlobInventoryPolicyRuleFilterArgs' filter: A `filter` block as defined above. Can only be set when the `scope` is `Blob`. """ - pulumi.set(__self__, "format", format) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "schedule", schedule) - pulumi.set(__self__, "schema_fields", schema_fields) - pulumi.set(__self__, "scope", scope) - pulumi.set(__self__, "storage_container_name", storage_container_name) + BlobInventoryPolicyRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + format=format, + name=name, + schedule=schedule, + schema_fields=schema_fields, + scope=scope, + storage_container_name=storage_container_name, + filter=filter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + format: Optional[str] = None, + name: Optional[str] = None, + schedule: Optional[str] = None, + schema_fields: Optional[Sequence[str]] = None, + scope: Optional[str] = None, + storage_container_name: Optional[str] = None, + filter: Optional['outputs.BlobInventoryPolicyRuleFilter'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if format is None: + raise TypeError("Missing 'format' argument") + if name is None: + raise TypeError("Missing 'name' argument") + if schedule is None: + raise TypeError("Missing 'schedule' argument") + if schema_fields is None and 'schemaFields' in kwargs: + schema_fields = kwargs['schemaFields'] + if schema_fields is None: + raise TypeError("Missing 'schema_fields' argument") + if scope is None: + raise TypeError("Missing 'scope' argument") + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if storage_container_name is None: + raise TypeError("Missing 'storage_container_name' argument") + + _setter("format", format) + _setter("name", name) + _setter("schedule", schedule) + _setter("schema_fields", schema_fields) + _setter("scope", scope) + _setter("storage_container_name", storage_container_name) if filter is not None: - pulumi.set(__self__, "filter", filter) + _setter("filter", filter) @property @pulumi.getter @@ -1951,17 +2612,52 @@ def __init__(__self__, *, > **NOTE**: The `rules.*.schema_fields` for this rule has to include `Snapshot` so that you can specify the `include_snapshots`. :param Sequence[str] prefix_matches: A set of strings for blob prefixes to be matched. Maximum of 10 blob prefixes. """ - pulumi.set(__self__, "blob_types", blob_types) + BlobInventoryPolicyRuleFilter._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_types=blob_types, + exclude_prefixes=exclude_prefixes, + include_blob_versions=include_blob_versions, + include_deleted=include_deleted, + include_snapshots=include_snapshots, + prefix_matches=prefix_matches, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_types: Optional[Sequence[str]] = None, + exclude_prefixes: Optional[Sequence[str]] = None, + include_blob_versions: Optional[bool] = None, + include_deleted: Optional[bool] = None, + include_snapshots: Optional[bool] = None, + prefix_matches: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_types is None and 'blobTypes' in kwargs: + blob_types = kwargs['blobTypes'] + if blob_types is None: + raise TypeError("Missing 'blob_types' argument") + if exclude_prefixes is None and 'excludePrefixes' in kwargs: + exclude_prefixes = kwargs['excludePrefixes'] + if include_blob_versions is None and 'includeBlobVersions' in kwargs: + include_blob_versions = kwargs['includeBlobVersions'] + if include_deleted is None and 'includeDeleted' in kwargs: + include_deleted = kwargs['includeDeleted'] + if include_snapshots is None and 'includeSnapshots' in kwargs: + include_snapshots = kwargs['includeSnapshots'] + if prefix_matches is None and 'prefixMatches' in kwargs: + prefix_matches = kwargs['prefixMatches'] + + _setter("blob_types", blob_types) if exclude_prefixes is not None: - pulumi.set(__self__, "exclude_prefixes", exclude_prefixes) + _setter("exclude_prefixes", exclude_prefixes) if include_blob_versions is not None: - pulumi.set(__self__, "include_blob_versions", include_blob_versions) + _setter("include_blob_versions", include_blob_versions) if include_deleted is not None: - pulumi.set(__self__, "include_deleted", include_deleted) + _setter("include_deleted", include_deleted) if include_snapshots is not None: - pulumi.set(__self__, "include_snapshots", include_snapshots) + _setter("include_snapshots", include_snapshots) if prefix_matches is not None: - pulumi.set(__self__, "prefix_matches", prefix_matches) + _setter("prefix_matches", prefix_matches) @property @pulumi.getter(name="blobTypes") @@ -2035,12 +2731,33 @@ def __init__(__self__, *, :param str id: Specifies the Object ID of the Azure Active Directory User or Group that the entry relates to. Only valid for `user` or `group` entries. :param str scope: Specifies whether the ACE represents an `access` entry or a `default` entry. Default value is `access`. """ - pulumi.set(__self__, "permissions", permissions) - pulumi.set(__self__, "type", type) + DataLakeGen2FilesystemAce._configure( + lambda key, value: pulumi.set(__self__, key, value), + permissions=permissions, + type=type, + id=id, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + permissions: Optional[str] = None, + type: Optional[str] = None, + id: Optional[str] = None, + scope: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if permissions is None: + raise TypeError("Missing 'permissions' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("permissions", permissions) + _setter("type", type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter @@ -2089,12 +2806,33 @@ def __init__(__self__, *, :param str id: Specifies the Object ID of the Azure Active Directory User or Group that the entry relates to. Only valid for `user` or `group` entries. :param str scope: Specifies whether the ACE represents an `access` entry or a `default` entry. Default value is `access`. """ - pulumi.set(__self__, "permissions", permissions) - pulumi.set(__self__, "type", type) + DataLakeGen2PathAce._configure( + lambda key, value: pulumi.set(__self__, key, value), + permissions=permissions, + type=type, + id=id, + scope=scope, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + permissions: Optional[str] = None, + type: Optional[str] = None, + id: Optional[str] = None, + scope: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if permissions is None: + raise TypeError("Missing 'permissions' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("permissions", permissions) + _setter("type", type) if id is not None: - pulumi.set(__self__, "id", id) + _setter("id", id) if scope is not None: - pulumi.set(__self__, "scope", scope) + _setter("scope", scope) @property @pulumi.getter @@ -2154,9 +2892,32 @@ def __init__(__self__, *, :param str resource_name: The container name (when `service` is set to `blob`) or the file share name (when `service` is set to `file`), used by the Storage Account Local User. :param str service: The storage service used by this Storage Account Local User. Possible values are `blob` and `file`. """ - pulumi.set(__self__, "permissions", permissions) - pulumi.set(__self__, "resource_name", resource_name) - pulumi.set(__self__, "service", service) + LocalUserPermissionScope._configure( + lambda key, value: pulumi.set(__self__, key, value), + permissions=permissions, + resource_name=resource_name, + service=service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + permissions: Optional['outputs.LocalUserPermissionScopePermissions'] = None, + resource_name: Optional[str] = None, + service: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if permissions is None: + raise TypeError("Missing 'permissions' argument") + if resource_name is None and 'resourceName' in kwargs: + resource_name = kwargs['resourceName'] + if resource_name is None: + raise TypeError("Missing 'resource_name' argument") + if service is None: + raise TypeError("Missing 'service' argument") + + _setter("permissions", permissions) + _setter("resource_name", resource_name) + _setter("service", service) @property @pulumi.getter @@ -2198,16 +2959,35 @@ def __init__(__self__, *, :param bool read: Specifies if the Local User has the read permission for this scope. Defaults to `false`. :param bool write: Specifies if the Local User has the write permission for this scope. Defaults to `false`. """ + LocalUserPermissionScopePermissions._configure( + lambda key, value: pulumi.set(__self__, key, value), + create=create, + delete=delete, + list=list, + read=read, + write=write, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create: Optional[bool] = None, + delete: Optional[bool] = None, + list: Optional[bool] = None, + read: Optional[bool] = None, + write: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create is not None: - pulumi.set(__self__, "create", create) + _setter("create", create) if delete is not None: - pulumi.set(__self__, "delete", delete) + _setter("delete", delete) if list is not None: - pulumi.set(__self__, "list", list) + _setter("list", list) if read is not None: - pulumi.set(__self__, "read", read) + _setter("read", read) if write is not None: - pulumi.set(__self__, "write", write) + _setter("write", write) @property @pulumi.getter @@ -2259,9 +3039,24 @@ def __init__(__self__, *, :param str key: The public key value of this SSH authorized key. :param str description: The description of this SSH authorized key. """ - pulumi.set(__self__, "key", key) + LocalUserSshAuthorizedKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + description=description, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + description: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key is None: + raise TypeError("Missing 'key' argument") + + _setter("key", key) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) @property @pulumi.getter @@ -2293,10 +3088,35 @@ def __init__(__self__, *, :param 'ManagementPolicyRuleFiltersArgs' filters: A `filters` block as documented below. :param str name: The name of the rule. Rule name is case-sensitive. It must be unique within a policy. """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "filters", filters) - pulumi.set(__self__, "name", name) + ManagementPolicyRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + enabled=enabled, + filters=filters, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional['outputs.ManagementPolicyRuleActions'] = None, + enabled: Optional[bool] = None, + filters: Optional['outputs.ManagementPolicyRuleFilters'] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if filters is None: + raise TypeError("Missing 'filters' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("actions", actions) + _setter("enabled", enabled) + _setter("filters", filters) + _setter("name", name) @property @pulumi.getter @@ -2359,12 +3179,29 @@ def __init__(__self__, *, :param 'ManagementPolicyRuleActionsSnapshotArgs' snapshot: A `snapshot` block as documented below. :param 'ManagementPolicyRuleActionsVersionArgs' version: A `version` block as documented below. """ + ManagementPolicyRuleActions._configure( + lambda key, value: pulumi.set(__self__, key, value), + base_blob=base_blob, + snapshot=snapshot, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + base_blob: Optional['outputs.ManagementPolicyRuleActionsBaseBlob'] = None, + snapshot: Optional['outputs.ManagementPolicyRuleActionsSnapshot'] = None, + version: Optional['outputs.ManagementPolicyRuleActionsVersion'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if base_blob is None and 'baseBlob' in kwargs: + base_blob = kwargs['baseBlob'] + if base_blob is not None: - pulumi.set(__self__, "base_blob", base_blob) + _setter("base_blob", base_blob) if snapshot is not None: - pulumi.set(__self__, "snapshot", snapshot) + _setter("snapshot", snapshot) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="baseBlob") @@ -2479,34 +3316,99 @@ def __init__(__self__, *, :param int tier_to_cool_after_days_since_last_access_time_greater_than: The age in days after last access time to tier blobs to cool storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. :param int tier_to_cool_after_days_since_modification_greater_than: The age in days after last modification to tier blobs to cool storage. Supports blob currently at Hot tier. Must be between 0 and 99999. Defaults to `-1`. """ + ManagementPolicyRuleActionsBaseBlob._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_tier_to_hot_from_cool_enabled=auto_tier_to_hot_from_cool_enabled, + delete_after_days_since_creation_greater_than=delete_after_days_since_creation_greater_than, + delete_after_days_since_last_access_time_greater_than=delete_after_days_since_last_access_time_greater_than, + delete_after_days_since_modification_greater_than=delete_after_days_since_modification_greater_than, + tier_to_archive_after_days_since_creation_greater_than=tier_to_archive_after_days_since_creation_greater_than, + tier_to_archive_after_days_since_last_access_time_greater_than=tier_to_archive_after_days_since_last_access_time_greater_than, + tier_to_archive_after_days_since_last_tier_change_greater_than=tier_to_archive_after_days_since_last_tier_change_greater_than, + tier_to_archive_after_days_since_modification_greater_than=tier_to_archive_after_days_since_modification_greater_than, + tier_to_cold_after_days_since_creation_greater_than=tier_to_cold_after_days_since_creation_greater_than, + tier_to_cold_after_days_since_last_access_time_greater_than=tier_to_cold_after_days_since_last_access_time_greater_than, + tier_to_cold_after_days_since_modification_greater_than=tier_to_cold_after_days_since_modification_greater_than, + tier_to_cool_after_days_since_creation_greater_than=tier_to_cool_after_days_since_creation_greater_than, + tier_to_cool_after_days_since_last_access_time_greater_than=tier_to_cool_after_days_since_last_access_time_greater_than, + tier_to_cool_after_days_since_modification_greater_than=tier_to_cool_after_days_since_modification_greater_than, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_tier_to_hot_from_cool_enabled: Optional[bool] = None, + delete_after_days_since_creation_greater_than: Optional[int] = None, + delete_after_days_since_last_access_time_greater_than: Optional[int] = None, + delete_after_days_since_modification_greater_than: Optional[int] = None, + tier_to_archive_after_days_since_creation_greater_than: Optional[int] = None, + tier_to_archive_after_days_since_last_access_time_greater_than: Optional[int] = None, + tier_to_archive_after_days_since_last_tier_change_greater_than: Optional[int] = None, + tier_to_archive_after_days_since_modification_greater_than: Optional[int] = None, + tier_to_cold_after_days_since_creation_greater_than: Optional[int] = None, + tier_to_cold_after_days_since_last_access_time_greater_than: Optional[int] = None, + tier_to_cold_after_days_since_modification_greater_than: Optional[int] = None, + tier_to_cool_after_days_since_creation_greater_than: Optional[int] = None, + tier_to_cool_after_days_since_last_access_time_greater_than: Optional[int] = None, + tier_to_cool_after_days_since_modification_greater_than: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_tier_to_hot_from_cool_enabled is None and 'autoTierToHotFromCoolEnabled' in kwargs: + auto_tier_to_hot_from_cool_enabled = kwargs['autoTierToHotFromCoolEnabled'] + if delete_after_days_since_creation_greater_than is None and 'deleteAfterDaysSinceCreationGreaterThan' in kwargs: + delete_after_days_since_creation_greater_than = kwargs['deleteAfterDaysSinceCreationGreaterThan'] + if delete_after_days_since_last_access_time_greater_than is None and 'deleteAfterDaysSinceLastAccessTimeGreaterThan' in kwargs: + delete_after_days_since_last_access_time_greater_than = kwargs['deleteAfterDaysSinceLastAccessTimeGreaterThan'] + if delete_after_days_since_modification_greater_than is None and 'deleteAfterDaysSinceModificationGreaterThan' in kwargs: + delete_after_days_since_modification_greater_than = kwargs['deleteAfterDaysSinceModificationGreaterThan'] + if tier_to_archive_after_days_since_creation_greater_than is None and 'tierToArchiveAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_archive_after_days_since_creation_greater_than = kwargs['tierToArchiveAfterDaysSinceCreationGreaterThan'] + if tier_to_archive_after_days_since_last_access_time_greater_than is None and 'tierToArchiveAfterDaysSinceLastAccessTimeGreaterThan' in kwargs: + tier_to_archive_after_days_since_last_access_time_greater_than = kwargs['tierToArchiveAfterDaysSinceLastAccessTimeGreaterThan'] + if tier_to_archive_after_days_since_last_tier_change_greater_than is None and 'tierToArchiveAfterDaysSinceLastTierChangeGreaterThan' in kwargs: + tier_to_archive_after_days_since_last_tier_change_greater_than = kwargs['tierToArchiveAfterDaysSinceLastTierChangeGreaterThan'] + if tier_to_archive_after_days_since_modification_greater_than is None and 'tierToArchiveAfterDaysSinceModificationGreaterThan' in kwargs: + tier_to_archive_after_days_since_modification_greater_than = kwargs['tierToArchiveAfterDaysSinceModificationGreaterThan'] + if tier_to_cold_after_days_since_creation_greater_than is None and 'tierToColdAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_cold_after_days_since_creation_greater_than = kwargs['tierToColdAfterDaysSinceCreationGreaterThan'] + if tier_to_cold_after_days_since_last_access_time_greater_than is None and 'tierToColdAfterDaysSinceLastAccessTimeGreaterThan' in kwargs: + tier_to_cold_after_days_since_last_access_time_greater_than = kwargs['tierToColdAfterDaysSinceLastAccessTimeGreaterThan'] + if tier_to_cold_after_days_since_modification_greater_than is None and 'tierToColdAfterDaysSinceModificationGreaterThan' in kwargs: + tier_to_cold_after_days_since_modification_greater_than = kwargs['tierToColdAfterDaysSinceModificationGreaterThan'] + if tier_to_cool_after_days_since_creation_greater_than is None and 'tierToCoolAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_cool_after_days_since_creation_greater_than = kwargs['tierToCoolAfterDaysSinceCreationGreaterThan'] + if tier_to_cool_after_days_since_last_access_time_greater_than is None and 'tierToCoolAfterDaysSinceLastAccessTimeGreaterThan' in kwargs: + tier_to_cool_after_days_since_last_access_time_greater_than = kwargs['tierToCoolAfterDaysSinceLastAccessTimeGreaterThan'] + if tier_to_cool_after_days_since_modification_greater_than is None and 'tierToCoolAfterDaysSinceModificationGreaterThan' in kwargs: + tier_to_cool_after_days_since_modification_greater_than = kwargs['tierToCoolAfterDaysSinceModificationGreaterThan'] + if auto_tier_to_hot_from_cool_enabled is not None: - pulumi.set(__self__, "auto_tier_to_hot_from_cool_enabled", auto_tier_to_hot_from_cool_enabled) + _setter("auto_tier_to_hot_from_cool_enabled", auto_tier_to_hot_from_cool_enabled) if delete_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "delete_after_days_since_creation_greater_than", delete_after_days_since_creation_greater_than) + _setter("delete_after_days_since_creation_greater_than", delete_after_days_since_creation_greater_than) if delete_after_days_since_last_access_time_greater_than is not None: - pulumi.set(__self__, "delete_after_days_since_last_access_time_greater_than", delete_after_days_since_last_access_time_greater_than) + _setter("delete_after_days_since_last_access_time_greater_than", delete_after_days_since_last_access_time_greater_than) if delete_after_days_since_modification_greater_than is not None: - pulumi.set(__self__, "delete_after_days_since_modification_greater_than", delete_after_days_since_modification_greater_than) + _setter("delete_after_days_since_modification_greater_than", delete_after_days_since_modification_greater_than) if tier_to_archive_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "tier_to_archive_after_days_since_creation_greater_than", tier_to_archive_after_days_since_creation_greater_than) + _setter("tier_to_archive_after_days_since_creation_greater_than", tier_to_archive_after_days_since_creation_greater_than) if tier_to_archive_after_days_since_last_access_time_greater_than is not None: - pulumi.set(__self__, "tier_to_archive_after_days_since_last_access_time_greater_than", tier_to_archive_after_days_since_last_access_time_greater_than) + _setter("tier_to_archive_after_days_since_last_access_time_greater_than", tier_to_archive_after_days_since_last_access_time_greater_than) if tier_to_archive_after_days_since_last_tier_change_greater_than is not None: - pulumi.set(__self__, "tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) + _setter("tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) if tier_to_archive_after_days_since_modification_greater_than is not None: - pulumi.set(__self__, "tier_to_archive_after_days_since_modification_greater_than", tier_to_archive_after_days_since_modification_greater_than) + _setter("tier_to_archive_after_days_since_modification_greater_than", tier_to_archive_after_days_since_modification_greater_than) if tier_to_cold_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) + _setter("tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) if tier_to_cold_after_days_since_last_access_time_greater_than is not None: - pulumi.set(__self__, "tier_to_cold_after_days_since_last_access_time_greater_than", tier_to_cold_after_days_since_last_access_time_greater_than) + _setter("tier_to_cold_after_days_since_last_access_time_greater_than", tier_to_cold_after_days_since_last_access_time_greater_than) if tier_to_cold_after_days_since_modification_greater_than is not None: - pulumi.set(__self__, "tier_to_cold_after_days_since_modification_greater_than", tier_to_cold_after_days_since_modification_greater_than) + _setter("tier_to_cold_after_days_since_modification_greater_than", tier_to_cold_after_days_since_modification_greater_than) if tier_to_cool_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "tier_to_cool_after_days_since_creation_greater_than", tier_to_cool_after_days_since_creation_greater_than) + _setter("tier_to_cool_after_days_since_creation_greater_than", tier_to_cool_after_days_since_creation_greater_than) if tier_to_cool_after_days_since_last_access_time_greater_than is not None: - pulumi.set(__self__, "tier_to_cool_after_days_since_last_access_time_greater_than", tier_to_cool_after_days_since_last_access_time_greater_than) + _setter("tier_to_cool_after_days_since_last_access_time_greater_than", tier_to_cool_after_days_since_last_access_time_greater_than) if tier_to_cool_after_days_since_modification_greater_than is not None: - pulumi.set(__self__, "tier_to_cool_after_days_since_modification_greater_than", tier_to_cool_after_days_since_modification_greater_than) + _setter("tier_to_cool_after_days_since_modification_greater_than", tier_to_cool_after_days_since_modification_greater_than) @property @pulumi.getter(name="autoTierToHotFromCoolEnabled") @@ -2673,16 +3575,45 @@ def __init__(__self__, *, :param int tier_to_archive_after_days_since_last_tier_change_greater_than: The age in days after last tier change to the blobs to skip to be archved. Must be between 0 and 99999. Defaults to `-1`. :param int tier_to_cold_after_days_since_creation_greater_than: The age in days after creation to cold storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. """ + ManagementPolicyRuleActionsSnapshot._configure( + lambda key, value: pulumi.set(__self__, key, value), + change_tier_to_archive_after_days_since_creation=change_tier_to_archive_after_days_since_creation, + change_tier_to_cool_after_days_since_creation=change_tier_to_cool_after_days_since_creation, + delete_after_days_since_creation_greater_than=delete_after_days_since_creation_greater_than, + tier_to_archive_after_days_since_last_tier_change_greater_than=tier_to_archive_after_days_since_last_tier_change_greater_than, + tier_to_cold_after_days_since_creation_greater_than=tier_to_cold_after_days_since_creation_greater_than, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + change_tier_to_archive_after_days_since_creation: Optional[int] = None, + change_tier_to_cool_after_days_since_creation: Optional[int] = None, + delete_after_days_since_creation_greater_than: Optional[int] = None, + tier_to_archive_after_days_since_last_tier_change_greater_than: Optional[int] = None, + tier_to_cold_after_days_since_creation_greater_than: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if change_tier_to_archive_after_days_since_creation is None and 'changeTierToArchiveAfterDaysSinceCreation' in kwargs: + change_tier_to_archive_after_days_since_creation = kwargs['changeTierToArchiveAfterDaysSinceCreation'] + if change_tier_to_cool_after_days_since_creation is None and 'changeTierToCoolAfterDaysSinceCreation' in kwargs: + change_tier_to_cool_after_days_since_creation = kwargs['changeTierToCoolAfterDaysSinceCreation'] + if delete_after_days_since_creation_greater_than is None and 'deleteAfterDaysSinceCreationGreaterThan' in kwargs: + delete_after_days_since_creation_greater_than = kwargs['deleteAfterDaysSinceCreationGreaterThan'] + if tier_to_archive_after_days_since_last_tier_change_greater_than is None and 'tierToArchiveAfterDaysSinceLastTierChangeGreaterThan' in kwargs: + tier_to_archive_after_days_since_last_tier_change_greater_than = kwargs['tierToArchiveAfterDaysSinceLastTierChangeGreaterThan'] + if tier_to_cold_after_days_since_creation_greater_than is None and 'tierToColdAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_cold_after_days_since_creation_greater_than = kwargs['tierToColdAfterDaysSinceCreationGreaterThan'] + if change_tier_to_archive_after_days_since_creation is not None: - pulumi.set(__self__, "change_tier_to_archive_after_days_since_creation", change_tier_to_archive_after_days_since_creation) + _setter("change_tier_to_archive_after_days_since_creation", change_tier_to_archive_after_days_since_creation) if change_tier_to_cool_after_days_since_creation is not None: - pulumi.set(__self__, "change_tier_to_cool_after_days_since_creation", change_tier_to_cool_after_days_since_creation) + _setter("change_tier_to_cool_after_days_since_creation", change_tier_to_cool_after_days_since_creation) if delete_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "delete_after_days_since_creation_greater_than", delete_after_days_since_creation_greater_than) + _setter("delete_after_days_since_creation_greater_than", delete_after_days_since_creation_greater_than) if tier_to_archive_after_days_since_last_tier_change_greater_than is not None: - pulumi.set(__self__, "tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) + _setter("tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) if tier_to_cold_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) + _setter("tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) @property @pulumi.getter(name="changeTierToArchiveAfterDaysSinceCreation") @@ -2765,16 +3696,45 @@ def __init__(__self__, *, :param int tier_to_archive_after_days_since_last_tier_change_greater_than: The age in days after last tier change to the blobs to skip to be archved. Must be between 0 and 99999. Defaults to `-1`. :param int tier_to_cold_after_days_since_creation_greater_than: The age in days after creation to cold storage. Supports blob currently at Hot tier. Must be between `0` and `99999`. Defaults to `-1`. """ + ManagementPolicyRuleActionsVersion._configure( + lambda key, value: pulumi.set(__self__, key, value), + change_tier_to_archive_after_days_since_creation=change_tier_to_archive_after_days_since_creation, + change_tier_to_cool_after_days_since_creation=change_tier_to_cool_after_days_since_creation, + delete_after_days_since_creation=delete_after_days_since_creation, + tier_to_archive_after_days_since_last_tier_change_greater_than=tier_to_archive_after_days_since_last_tier_change_greater_than, + tier_to_cold_after_days_since_creation_greater_than=tier_to_cold_after_days_since_creation_greater_than, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + change_tier_to_archive_after_days_since_creation: Optional[int] = None, + change_tier_to_cool_after_days_since_creation: Optional[int] = None, + delete_after_days_since_creation: Optional[int] = None, + tier_to_archive_after_days_since_last_tier_change_greater_than: Optional[int] = None, + tier_to_cold_after_days_since_creation_greater_than: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if change_tier_to_archive_after_days_since_creation is None and 'changeTierToArchiveAfterDaysSinceCreation' in kwargs: + change_tier_to_archive_after_days_since_creation = kwargs['changeTierToArchiveAfterDaysSinceCreation'] + if change_tier_to_cool_after_days_since_creation is None and 'changeTierToCoolAfterDaysSinceCreation' in kwargs: + change_tier_to_cool_after_days_since_creation = kwargs['changeTierToCoolAfterDaysSinceCreation'] + if delete_after_days_since_creation is None and 'deleteAfterDaysSinceCreation' in kwargs: + delete_after_days_since_creation = kwargs['deleteAfterDaysSinceCreation'] + if tier_to_archive_after_days_since_last_tier_change_greater_than is None and 'tierToArchiveAfterDaysSinceLastTierChangeGreaterThan' in kwargs: + tier_to_archive_after_days_since_last_tier_change_greater_than = kwargs['tierToArchiveAfterDaysSinceLastTierChangeGreaterThan'] + if tier_to_cold_after_days_since_creation_greater_than is None and 'tierToColdAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_cold_after_days_since_creation_greater_than = kwargs['tierToColdAfterDaysSinceCreationGreaterThan'] + if change_tier_to_archive_after_days_since_creation is not None: - pulumi.set(__self__, "change_tier_to_archive_after_days_since_creation", change_tier_to_archive_after_days_since_creation) + _setter("change_tier_to_archive_after_days_since_creation", change_tier_to_archive_after_days_since_creation) if change_tier_to_cool_after_days_since_creation is not None: - pulumi.set(__self__, "change_tier_to_cool_after_days_since_creation", change_tier_to_cool_after_days_since_creation) + _setter("change_tier_to_cool_after_days_since_creation", change_tier_to_cool_after_days_since_creation) if delete_after_days_since_creation is not None: - pulumi.set(__self__, "delete_after_days_since_creation", delete_after_days_since_creation) + _setter("delete_after_days_since_creation", delete_after_days_since_creation) if tier_to_archive_after_days_since_last_tier_change_greater_than is not None: - pulumi.set(__self__, "tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) + _setter("tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) if tier_to_cold_after_days_since_creation_greater_than is not None: - pulumi.set(__self__, "tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) + _setter("tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) @property @pulumi.getter(name="changeTierToArchiveAfterDaysSinceCreation") @@ -2851,11 +3811,34 @@ def __init__(__self__, *, > **NOTE:** The `match_blob_index_tag` property requires enabling the `blobIndex` feature with [PSH or CLI commands](https://azure.microsoft.com/en-us/blog/manage-and-find-data-with-blob-index-for-azure-storage-now-in-preview/). :param Sequence[str] prefix_matches: An array of strings for prefixes to be matched. """ - pulumi.set(__self__, "blob_types", blob_types) + ManagementPolicyRuleFilters._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_types=blob_types, + match_blob_index_tags=match_blob_index_tags, + prefix_matches=prefix_matches, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_types: Optional[Sequence[str]] = None, + match_blob_index_tags: Optional[Sequence['outputs.ManagementPolicyRuleFiltersMatchBlobIndexTag']] = None, + prefix_matches: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_types is None and 'blobTypes' in kwargs: + blob_types = kwargs['blobTypes'] + if blob_types is None: + raise TypeError("Missing 'blob_types' argument") + if match_blob_index_tags is None and 'matchBlobIndexTags' in kwargs: + match_blob_index_tags = kwargs['matchBlobIndexTags'] + if prefix_matches is None and 'prefixMatches' in kwargs: + prefix_matches = kwargs['prefixMatches'] + + _setter("blob_types", blob_types) if match_blob_index_tags is not None: - pulumi.set(__self__, "match_blob_index_tags", match_blob_index_tags) + _setter("match_blob_index_tags", match_blob_index_tags) if prefix_matches is not None: - pulumi.set(__self__, "prefix_matches", prefix_matches) + _setter("prefix_matches", prefix_matches) @property @pulumi.getter(name="blobTypes") @@ -2895,10 +3878,29 @@ def __init__(__self__, *, :param str value: The filter tag value used for tag based filtering for blob objects. :param str operation: The comparison operator which is used for object comparison and filtering. Possible value is `==`. Defaults to `==`. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + ManagementPolicyRuleFiltersMatchBlobIndexTag._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + operation=operation, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + operation: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) if operation is not None: - pulumi.set(__self__, "operation", operation) + _setter("operation", operation) @property @pulumi.getter @@ -2962,14 +3964,45 @@ def __init__(__self__, *, :param str copy_blobs_created_after: The time after which the Block Blobs created will be copies to the destination. Possible values are `OnlyNewObjects`, `Everything` and time in RFC3339 format: `2006-01-02T15:04:00Z`. :param Sequence[str] filter_out_blobs_with_prefixes: Specifies a list of filters prefixes, the blobs whose names begin with which will be replicated. """ - pulumi.set(__self__, "destination_container_name", destination_container_name) - pulumi.set(__self__, "source_container_name", source_container_name) + ObjectReplicationRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + destination_container_name=destination_container_name, + source_container_name=source_container_name, + copy_blobs_created_after=copy_blobs_created_after, + filter_out_blobs_with_prefixes=filter_out_blobs_with_prefixes, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + destination_container_name: Optional[str] = None, + source_container_name: Optional[str] = None, + copy_blobs_created_after: Optional[str] = None, + filter_out_blobs_with_prefixes: Optional[Sequence[str]] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if destination_container_name is None and 'destinationContainerName' in kwargs: + destination_container_name = kwargs['destinationContainerName'] + if destination_container_name is None: + raise TypeError("Missing 'destination_container_name' argument") + if source_container_name is None and 'sourceContainerName' in kwargs: + source_container_name = kwargs['sourceContainerName'] + if source_container_name is None: + raise TypeError("Missing 'source_container_name' argument") + if copy_blobs_created_after is None and 'copyBlobsCreatedAfter' in kwargs: + copy_blobs_created_after = kwargs['copyBlobsCreatedAfter'] + if filter_out_blobs_with_prefixes is None and 'filterOutBlobsWithPrefixes' in kwargs: + filter_out_blobs_with_prefixes = kwargs['filterOutBlobsWithPrefixes'] + + _setter("destination_container_name", destination_container_name) + _setter("source_container_name", source_container_name) if copy_blobs_created_after is not None: - pulumi.set(__self__, "copy_blobs_created_after", copy_blobs_created_after) + _setter("copy_blobs_created_after", copy_blobs_created_after) if filter_out_blobs_with_prefixes is not None: - pulumi.set(__self__, "filter_out_blobs_with_prefixes", filter_out_blobs_with_prefixes) + _setter("filter_out_blobs_with_prefixes", filter_out_blobs_with_prefixes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="destinationContainerName") @@ -3035,9 +4068,26 @@ def __init__(__self__, *, :param str id: The ID which should be used for this Shared Identifier. :param Sequence['ShareAclAccessPolicyArgs'] access_policies: An `access_policy` block as defined below. """ - pulumi.set(__self__, "id", id) + ShareAcl._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + access_policies=access_policies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + access_policies: Optional[Sequence['outputs.ShareAclAccessPolicy']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if access_policies is None and 'accessPolicies' in kwargs: + access_policies = kwargs['accessPolicies'] + + _setter("id", id) if access_policies is not None: - pulumi.set(__self__, "access_policies", access_policies) + _setter("access_policies", access_policies) @property @pulumi.getter @@ -3069,11 +4119,28 @@ def __init__(__self__, *, :param str expiry: The time at which this Access Policy should be valid until, in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format. :param str start: The time at which this Access Policy should be valid from, in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format. """ - pulumi.set(__self__, "permissions", permissions) + ShareAclAccessPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + permissions=permissions, + expiry=expiry, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + permissions: Optional[str] = None, + expiry: Optional[str] = None, + start: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if permissions is None: + raise TypeError("Missing 'permissions' argument") + + _setter("permissions", permissions) if expiry is not None: - pulumi.set(__self__, "expiry", expiry) + _setter("expiry", expiry) if start is not None: - pulumi.set(__self__, "start", start) + _setter("start", start) @property @pulumi.getter @@ -3128,9 +4195,26 @@ def __init__(__self__, *, :param str id: The ID which should be used for this Shared Identifier. :param Sequence['TableAclAccessPolicyArgs'] access_policies: An `access_policy` block as defined below. """ - pulumi.set(__self__, "id", id) + TableAcl._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + access_policies=access_policies, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + access_policies: Optional[Sequence['outputs.TableAclAccessPolicy']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if access_policies is None and 'accessPolicies' in kwargs: + access_policies = kwargs['accessPolicies'] + + _setter("id", id) if access_policies is not None: - pulumi.set(__self__, "access_policies", access_policies) + _setter("access_policies", access_policies) @property @pulumi.getter @@ -3160,9 +4244,30 @@ def __init__(__self__, *, :param str permissions: The permissions which should associated with this Shared Identifier. :param str start: The ISO8061 UTC time at which this Access Policy should be valid from. """ - pulumi.set(__self__, "expiry", expiry) - pulumi.set(__self__, "permissions", permissions) - pulumi.set(__self__, "start", start) + TableAclAccessPolicy._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiry=expiry, + permissions=permissions, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiry: Optional[str] = None, + permissions: Optional[str] = None, + start: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiry is None: + raise TypeError("Missing 'expiry' argument") + if permissions is None: + raise TypeError("Missing 'permissions' argument") + if start is None: + raise TypeError("Missing 'start' argument") + + _setter("expiry", expiry) + _setter("permissions", permissions) + _setter("start", start) @property @pulumi.getter @@ -3198,8 +4303,29 @@ def __init__(__self__, *, :param Sequence['GetAccountAzureFilesAuthenticationActiveDirectoryArgs'] active_directories: An `active_directory` block as documented below. :param str directory_type: The directory service used for this Storage Account. """ - pulumi.set(__self__, "active_directories", active_directories) - pulumi.set(__self__, "directory_type", directory_type) + GetAccountAzureFilesAuthenticationResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_directories=active_directories, + directory_type=directory_type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_directories: Optional[Sequence['outputs.GetAccountAzureFilesAuthenticationActiveDirectoryResult']] = None, + directory_type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_directories is None and 'activeDirectories' in kwargs: + active_directories = kwargs['activeDirectories'] + if active_directories is None: + raise TypeError("Missing 'active_directories' argument") + if directory_type is None and 'directoryType' in kwargs: + directory_type = kwargs['directoryType'] + if directory_type is None: + raise TypeError("Missing 'directory_type' argument") + + _setter("active_directories", active_directories) + _setter("directory_type", directory_type) @property @pulumi.getter(name="activeDirectories") @@ -3235,12 +4361,57 @@ def __init__(__self__, *, :param str netbios_domain_name: The NetBIOS domain name. :param str storage_sid: The security identifier for Azure Storage. """ - pulumi.set(__self__, "domain_guid", domain_guid) - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "domain_sid", domain_sid) - pulumi.set(__self__, "forest_name", forest_name) - pulumi.set(__self__, "netbios_domain_name", netbios_domain_name) - pulumi.set(__self__, "storage_sid", storage_sid) + GetAccountAzureFilesAuthenticationActiveDirectoryResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_guid=domain_guid, + domain_name=domain_name, + domain_sid=domain_sid, + forest_name=forest_name, + netbios_domain_name=netbios_domain_name, + storage_sid=storage_sid, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_guid: Optional[str] = None, + domain_name: Optional[str] = None, + domain_sid: Optional[str] = None, + forest_name: Optional[str] = None, + netbios_domain_name: Optional[str] = None, + storage_sid: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_guid is None and 'domainGuid' in kwargs: + domain_guid = kwargs['domainGuid'] + if domain_guid is None: + raise TypeError("Missing 'domain_guid' argument") + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if domain_sid is None and 'domainSid' in kwargs: + domain_sid = kwargs['domainSid'] + if domain_sid is None: + raise TypeError("Missing 'domain_sid' argument") + if forest_name is None and 'forestName' in kwargs: + forest_name = kwargs['forestName'] + if forest_name is None: + raise TypeError("Missing 'forest_name' argument") + if netbios_domain_name is None and 'netbiosDomainName' in kwargs: + netbios_domain_name = kwargs['netbiosDomainName'] + if netbios_domain_name is None: + raise TypeError("Missing 'netbios_domain_name' argument") + if storage_sid is None and 'storageSid' in kwargs: + storage_sid = kwargs['storageSid'] + if storage_sid is None: + raise TypeError("Missing 'storage_sid' argument") + + _setter("domain_guid", domain_guid) + _setter("domain_name", domain_name) + _setter("domain_sid", domain_sid) + _setter("forest_name", forest_name) + _setter("netbios_domain_name", netbios_domain_name) + _setter("storage_sid", storage_sid) @property @pulumi.getter(name="domainGuid") @@ -3311,12 +4482,45 @@ def __init__(__self__, *, :param bool read: Should Read permissions be enabled for this SAS? :param bool write: Should Write permissions be enabled for this SAS? """ - pulumi.set(__self__, "add", add) - pulumi.set(__self__, "create", create) - pulumi.set(__self__, "delete", delete) - pulumi.set(__self__, "list", list) - pulumi.set(__self__, "read", read) - pulumi.set(__self__, "write", write) + GetAccountBlobContainerSASPermissionsResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + add=add, + create=create, + delete=delete, + list=list, + read=read, + write=write, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + add: Optional[bool] = None, + create: Optional[bool] = None, + delete: Optional[bool] = None, + list: Optional[bool] = None, + read: Optional[bool] = None, + write: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if add is None: + raise TypeError("Missing 'add' argument") + if create is None: + raise TypeError("Missing 'create' argument") + if delete is None: + raise TypeError("Missing 'delete' argument") + if list is None: + raise TypeError("Missing 'list' argument") + if read is None: + raise TypeError("Missing 'read' argument") + if write is None: + raise TypeError("Missing 'write' argument") + + _setter("add", add) + _setter("create", create) + _setter("delete", delete) + _setter("list", list) + _setter("read", read) + _setter("write", write) @property @pulumi.getter @@ -3377,7 +4581,20 @@ def __init__(__self__, *, """ :param str name: Specifies the name of the Storage Account """ - pulumi.set(__self__, "name", name) + GetAccountCustomDomainResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) @property @pulumi.getter @@ -3401,10 +4618,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID for the Service Principal associated with the Identity of this Storage Account. :param str type: The type of Managed Service Identity that is configured on this Storage Account """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetAccountIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -3467,16 +4715,65 @@ def __init__(__self__, *, :param bool update: Should Update permissions be enabled for this SAS? :param bool write: Should Write permissions be enabled for this SAS? """ - pulumi.set(__self__, "add", add) - pulumi.set(__self__, "create", create) - pulumi.set(__self__, "delete", delete) - pulumi.set(__self__, "filter", filter) - pulumi.set(__self__, "list", list) - pulumi.set(__self__, "process", process) - pulumi.set(__self__, "read", read) - pulumi.set(__self__, "tag", tag) - pulumi.set(__self__, "update", update) - pulumi.set(__self__, "write", write) + GetAccountSASPermissionsResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + add=add, + create=create, + delete=delete, + filter=filter, + list=list, + process=process, + read=read, + tag=tag, + update=update, + write=write, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + add: Optional[bool] = None, + create: Optional[bool] = None, + delete: Optional[bool] = None, + filter: Optional[bool] = None, + list: Optional[bool] = None, + process: Optional[bool] = None, + read: Optional[bool] = None, + tag: Optional[bool] = None, + update: Optional[bool] = None, + write: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if add is None: + raise TypeError("Missing 'add' argument") + if create is None: + raise TypeError("Missing 'create' argument") + if delete is None: + raise TypeError("Missing 'delete' argument") + if filter is None: + raise TypeError("Missing 'filter' argument") + if list is None: + raise TypeError("Missing 'list' argument") + if process is None: + raise TypeError("Missing 'process' argument") + if read is None: + raise TypeError("Missing 'read' argument") + if tag is None: + raise TypeError("Missing 'tag' argument") + if update is None: + raise TypeError("Missing 'update' argument") + if write is None: + raise TypeError("Missing 'write' argument") + + _setter("add", add) + _setter("create", create) + _setter("delete", delete) + _setter("filter", filter) + _setter("list", list) + _setter("process", process) + _setter("read", read) + _setter("tag", tag) + _setter("update", update) + _setter("write", write) @property @pulumi.getter @@ -3573,9 +4870,30 @@ def __init__(__self__, *, :param bool object: Should permission be granted only to a specific object? :param bool service: Should permission be granted to the entire service? """ - pulumi.set(__self__, "container", container) - pulumi.set(__self__, "object", object) - pulumi.set(__self__, "service", service) + GetAccountSASResourceTypesResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + container=container, + object=object, + service=service, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container: Optional[bool] = None, + object: Optional[bool] = None, + service: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container is None: + raise TypeError("Missing 'container' argument") + if object is None: + raise TypeError("Missing 'object' argument") + if service is None: + raise TypeError("Missing 'service' argument") + + _setter("container", container) + _setter("object", object) + _setter("service", service) @property @pulumi.getter @@ -3615,10 +4933,35 @@ def __init__(__self__, *, :param bool queue: Should permission be granted to `queue` services within this storage account? :param bool table: Should permission be granted to `table` services within this storage account? """ - pulumi.set(__self__, "blob", blob) - pulumi.set(__self__, "file", file) - pulumi.set(__self__, "queue", queue) - pulumi.set(__self__, "table", table) + GetAccountSASServicesResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob=blob, + file=file, + queue=queue, + table=table, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob: Optional[bool] = None, + file: Optional[bool] = None, + queue: Optional[bool] = None, + table: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob is None: + raise TypeError("Missing 'blob' argument") + if file is None: + raise TypeError("Missing 'file' argument") + if queue is None: + raise TypeError("Missing 'queue' argument") + if table is None: + raise TypeError("Missing 'table' argument") + + _setter("blob", blob) + _setter("file", file) + _setter("queue", queue) + _setter("table", table) @property @pulumi.getter @@ -3666,10 +5009,35 @@ def __init__(__self__, *, :param Sequence['GetPolicyRuleFilterArgs'] filters: A `filter` block as documented below. :param str name: The filter tag name used for tag based filtering for blob objects. """ - pulumi.set(__self__, "actions", actions) - pulumi.set(__self__, "enabled", enabled) - pulumi.set(__self__, "filters", filters) - pulumi.set(__self__, "name", name) + GetPolicyRuleResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + actions=actions, + enabled=enabled, + filters=filters, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + actions: Optional[Sequence['outputs.GetPolicyRuleActionResult']] = None, + enabled: Optional[bool] = None, + filters: Optional[Sequence['outputs.GetPolicyRuleFilterResult']] = None, + name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if actions is None: + raise TypeError("Missing 'actions' argument") + if enabled is None: + raise TypeError("Missing 'enabled' argument") + if filters is None: + raise TypeError("Missing 'filters' argument") + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("actions", actions) + _setter("enabled", enabled) + _setter("filters", filters) + _setter("name", name) @property @pulumi.getter @@ -3715,9 +5083,32 @@ def __init__(__self__, *, :param Sequence['GetPolicyRuleActionSnapshotArgs'] snapshots: A `snapshot` block as documented below. :param Sequence['GetPolicyRuleActionVersionArgs'] versions: A `version` block as documented below. """ - pulumi.set(__self__, "base_blobs", base_blobs) - pulumi.set(__self__, "snapshots", snapshots) - pulumi.set(__self__, "versions", versions) + GetPolicyRuleActionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + base_blobs=base_blobs, + snapshots=snapshots, + versions=versions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + base_blobs: Optional[Sequence['outputs.GetPolicyRuleActionBaseBlobResult']] = None, + snapshots: Optional[Sequence['outputs.GetPolicyRuleActionSnapshotResult']] = None, + versions: Optional[Sequence['outputs.GetPolicyRuleActionVersionResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if base_blobs is None and 'baseBlobs' in kwargs: + base_blobs = kwargs['baseBlobs'] + if base_blobs is None: + raise TypeError("Missing 'base_blobs' argument") + if snapshots is None: + raise TypeError("Missing 'snapshots' argument") + if versions is None: + raise TypeError("Missing 'versions' argument") + + _setter("base_blobs", base_blobs) + _setter("snapshots", snapshots) + _setter("versions", versions) @property @pulumi.getter(name="baseBlobs") @@ -3777,20 +5168,113 @@ def __init__(__self__, *, :param int tier_to_cool_after_days_since_last_access_time_greater_than: The age in days after last access time to tier blobs to cool storage. Supports blob currently at Hot tier. :param int tier_to_cool_after_days_since_modification_greater_than: The age in days after last modification to tier blobs to cool storage. Supports blob currently at Hot tier. """ - pulumi.set(__self__, "auto_tier_to_hot_from_cool_enabled", auto_tier_to_hot_from_cool_enabled) - pulumi.set(__self__, "delete_after_days_since_creation_greater_than", delete_after_days_since_creation_greater_than) - pulumi.set(__self__, "delete_after_days_since_last_access_time_greater_than", delete_after_days_since_last_access_time_greater_than) - pulumi.set(__self__, "delete_after_days_since_modification_greater_than", delete_after_days_since_modification_greater_than) - pulumi.set(__self__, "tier_to_archive_after_days_since_creation_greater_than", tier_to_archive_after_days_since_creation_greater_than) - pulumi.set(__self__, "tier_to_archive_after_days_since_last_access_time_greater_than", tier_to_archive_after_days_since_last_access_time_greater_than) - pulumi.set(__self__, "tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) - pulumi.set(__self__, "tier_to_archive_after_days_since_modification_greater_than", tier_to_archive_after_days_since_modification_greater_than) - pulumi.set(__self__, "tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) - pulumi.set(__self__, "tier_to_cold_after_days_since_last_access_time_greater_than", tier_to_cold_after_days_since_last_access_time_greater_than) - pulumi.set(__self__, "tier_to_cold_after_days_since_modification_greater_than", tier_to_cold_after_days_since_modification_greater_than) - pulumi.set(__self__, "tier_to_cool_after_days_since_creation_greater_than", tier_to_cool_after_days_since_creation_greater_than) - pulumi.set(__self__, "tier_to_cool_after_days_since_last_access_time_greater_than", tier_to_cool_after_days_since_last_access_time_greater_than) - pulumi.set(__self__, "tier_to_cool_after_days_since_modification_greater_than", tier_to_cool_after_days_since_modification_greater_than) + GetPolicyRuleActionBaseBlobResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_tier_to_hot_from_cool_enabled=auto_tier_to_hot_from_cool_enabled, + delete_after_days_since_creation_greater_than=delete_after_days_since_creation_greater_than, + delete_after_days_since_last_access_time_greater_than=delete_after_days_since_last_access_time_greater_than, + delete_after_days_since_modification_greater_than=delete_after_days_since_modification_greater_than, + tier_to_archive_after_days_since_creation_greater_than=tier_to_archive_after_days_since_creation_greater_than, + tier_to_archive_after_days_since_last_access_time_greater_than=tier_to_archive_after_days_since_last_access_time_greater_than, + tier_to_archive_after_days_since_last_tier_change_greater_than=tier_to_archive_after_days_since_last_tier_change_greater_than, + tier_to_archive_after_days_since_modification_greater_than=tier_to_archive_after_days_since_modification_greater_than, + tier_to_cold_after_days_since_creation_greater_than=tier_to_cold_after_days_since_creation_greater_than, + tier_to_cold_after_days_since_last_access_time_greater_than=tier_to_cold_after_days_since_last_access_time_greater_than, + tier_to_cold_after_days_since_modification_greater_than=tier_to_cold_after_days_since_modification_greater_than, + tier_to_cool_after_days_since_creation_greater_than=tier_to_cool_after_days_since_creation_greater_than, + tier_to_cool_after_days_since_last_access_time_greater_than=tier_to_cool_after_days_since_last_access_time_greater_than, + tier_to_cool_after_days_since_modification_greater_than=tier_to_cool_after_days_since_modification_greater_than, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_tier_to_hot_from_cool_enabled: Optional[bool] = None, + delete_after_days_since_creation_greater_than: Optional[int] = None, + delete_after_days_since_last_access_time_greater_than: Optional[int] = None, + delete_after_days_since_modification_greater_than: Optional[int] = None, + tier_to_archive_after_days_since_creation_greater_than: Optional[int] = None, + tier_to_archive_after_days_since_last_access_time_greater_than: Optional[int] = None, + tier_to_archive_after_days_since_last_tier_change_greater_than: Optional[int] = None, + tier_to_archive_after_days_since_modification_greater_than: Optional[int] = None, + tier_to_cold_after_days_since_creation_greater_than: Optional[int] = None, + tier_to_cold_after_days_since_last_access_time_greater_than: Optional[int] = None, + tier_to_cold_after_days_since_modification_greater_than: Optional[int] = None, + tier_to_cool_after_days_since_creation_greater_than: Optional[int] = None, + tier_to_cool_after_days_since_last_access_time_greater_than: Optional[int] = None, + tier_to_cool_after_days_since_modification_greater_than: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_tier_to_hot_from_cool_enabled is None and 'autoTierToHotFromCoolEnabled' in kwargs: + auto_tier_to_hot_from_cool_enabled = kwargs['autoTierToHotFromCoolEnabled'] + if auto_tier_to_hot_from_cool_enabled is None: + raise TypeError("Missing 'auto_tier_to_hot_from_cool_enabled' argument") + if delete_after_days_since_creation_greater_than is None and 'deleteAfterDaysSinceCreationGreaterThan' in kwargs: + delete_after_days_since_creation_greater_than = kwargs['deleteAfterDaysSinceCreationGreaterThan'] + if delete_after_days_since_creation_greater_than is None: + raise TypeError("Missing 'delete_after_days_since_creation_greater_than' argument") + if delete_after_days_since_last_access_time_greater_than is None and 'deleteAfterDaysSinceLastAccessTimeGreaterThan' in kwargs: + delete_after_days_since_last_access_time_greater_than = kwargs['deleteAfterDaysSinceLastAccessTimeGreaterThan'] + if delete_after_days_since_last_access_time_greater_than is None: + raise TypeError("Missing 'delete_after_days_since_last_access_time_greater_than' argument") + if delete_after_days_since_modification_greater_than is None and 'deleteAfterDaysSinceModificationGreaterThan' in kwargs: + delete_after_days_since_modification_greater_than = kwargs['deleteAfterDaysSinceModificationGreaterThan'] + if delete_after_days_since_modification_greater_than is None: + raise TypeError("Missing 'delete_after_days_since_modification_greater_than' argument") + if tier_to_archive_after_days_since_creation_greater_than is None and 'tierToArchiveAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_archive_after_days_since_creation_greater_than = kwargs['tierToArchiveAfterDaysSinceCreationGreaterThan'] + if tier_to_archive_after_days_since_creation_greater_than is None: + raise TypeError("Missing 'tier_to_archive_after_days_since_creation_greater_than' argument") + if tier_to_archive_after_days_since_last_access_time_greater_than is None and 'tierToArchiveAfterDaysSinceLastAccessTimeGreaterThan' in kwargs: + tier_to_archive_after_days_since_last_access_time_greater_than = kwargs['tierToArchiveAfterDaysSinceLastAccessTimeGreaterThan'] + if tier_to_archive_after_days_since_last_access_time_greater_than is None: + raise TypeError("Missing 'tier_to_archive_after_days_since_last_access_time_greater_than' argument") + if tier_to_archive_after_days_since_last_tier_change_greater_than is None and 'tierToArchiveAfterDaysSinceLastTierChangeGreaterThan' in kwargs: + tier_to_archive_after_days_since_last_tier_change_greater_than = kwargs['tierToArchiveAfterDaysSinceLastTierChangeGreaterThan'] + if tier_to_archive_after_days_since_last_tier_change_greater_than is None: + raise TypeError("Missing 'tier_to_archive_after_days_since_last_tier_change_greater_than' argument") + if tier_to_archive_after_days_since_modification_greater_than is None and 'tierToArchiveAfterDaysSinceModificationGreaterThan' in kwargs: + tier_to_archive_after_days_since_modification_greater_than = kwargs['tierToArchiveAfterDaysSinceModificationGreaterThan'] + if tier_to_archive_after_days_since_modification_greater_than is None: + raise TypeError("Missing 'tier_to_archive_after_days_since_modification_greater_than' argument") + if tier_to_cold_after_days_since_creation_greater_than is None and 'tierToColdAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_cold_after_days_since_creation_greater_than = kwargs['tierToColdAfterDaysSinceCreationGreaterThan'] + if tier_to_cold_after_days_since_creation_greater_than is None: + raise TypeError("Missing 'tier_to_cold_after_days_since_creation_greater_than' argument") + if tier_to_cold_after_days_since_last_access_time_greater_than is None and 'tierToColdAfterDaysSinceLastAccessTimeGreaterThan' in kwargs: + tier_to_cold_after_days_since_last_access_time_greater_than = kwargs['tierToColdAfterDaysSinceLastAccessTimeGreaterThan'] + if tier_to_cold_after_days_since_last_access_time_greater_than is None: + raise TypeError("Missing 'tier_to_cold_after_days_since_last_access_time_greater_than' argument") + if tier_to_cold_after_days_since_modification_greater_than is None and 'tierToColdAfterDaysSinceModificationGreaterThan' in kwargs: + tier_to_cold_after_days_since_modification_greater_than = kwargs['tierToColdAfterDaysSinceModificationGreaterThan'] + if tier_to_cold_after_days_since_modification_greater_than is None: + raise TypeError("Missing 'tier_to_cold_after_days_since_modification_greater_than' argument") + if tier_to_cool_after_days_since_creation_greater_than is None and 'tierToCoolAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_cool_after_days_since_creation_greater_than = kwargs['tierToCoolAfterDaysSinceCreationGreaterThan'] + if tier_to_cool_after_days_since_creation_greater_than is None: + raise TypeError("Missing 'tier_to_cool_after_days_since_creation_greater_than' argument") + if tier_to_cool_after_days_since_last_access_time_greater_than is None and 'tierToCoolAfterDaysSinceLastAccessTimeGreaterThan' in kwargs: + tier_to_cool_after_days_since_last_access_time_greater_than = kwargs['tierToCoolAfterDaysSinceLastAccessTimeGreaterThan'] + if tier_to_cool_after_days_since_last_access_time_greater_than is None: + raise TypeError("Missing 'tier_to_cool_after_days_since_last_access_time_greater_than' argument") + if tier_to_cool_after_days_since_modification_greater_than is None and 'tierToCoolAfterDaysSinceModificationGreaterThan' in kwargs: + tier_to_cool_after_days_since_modification_greater_than = kwargs['tierToCoolAfterDaysSinceModificationGreaterThan'] + if tier_to_cool_after_days_since_modification_greater_than is None: + raise TypeError("Missing 'tier_to_cool_after_days_since_modification_greater_than' argument") + + _setter("auto_tier_to_hot_from_cool_enabled", auto_tier_to_hot_from_cool_enabled) + _setter("delete_after_days_since_creation_greater_than", delete_after_days_since_creation_greater_than) + _setter("delete_after_days_since_last_access_time_greater_than", delete_after_days_since_last_access_time_greater_than) + _setter("delete_after_days_since_modification_greater_than", delete_after_days_since_modification_greater_than) + _setter("tier_to_archive_after_days_since_creation_greater_than", tier_to_archive_after_days_since_creation_greater_than) + _setter("tier_to_archive_after_days_since_last_access_time_greater_than", tier_to_archive_after_days_since_last_access_time_greater_than) + _setter("tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) + _setter("tier_to_archive_after_days_since_modification_greater_than", tier_to_archive_after_days_since_modification_greater_than) + _setter("tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) + _setter("tier_to_cold_after_days_since_last_access_time_greater_than", tier_to_cold_after_days_since_last_access_time_greater_than) + _setter("tier_to_cold_after_days_since_modification_greater_than", tier_to_cold_after_days_since_modification_greater_than) + _setter("tier_to_cool_after_days_since_creation_greater_than", tier_to_cool_after_days_since_creation_greater_than) + _setter("tier_to_cool_after_days_since_last_access_time_greater_than", tier_to_cool_after_days_since_last_access_time_greater_than) + _setter("tier_to_cool_after_days_since_modification_greater_than", tier_to_cool_after_days_since_modification_greater_than) @property @pulumi.getter(name="autoTierToHotFromCoolEnabled") @@ -3920,11 +5404,50 @@ def __init__(__self__, *, :param int tier_to_archive_after_days_since_last_tier_change_greater_than: The age in days after last tier change to the blobs to skip to be archived. :param int tier_to_cold_after_days_since_creation_greater_than: Optional The age in days after creation to cold storage. Supports blob currently at Hot tier. """ - pulumi.set(__self__, "change_tier_to_archive_after_days_since_creation", change_tier_to_archive_after_days_since_creation) - pulumi.set(__self__, "change_tier_to_cool_after_days_since_creation", change_tier_to_cool_after_days_since_creation) - pulumi.set(__self__, "delete_after_days_since_creation_greater_than", delete_after_days_since_creation_greater_than) - pulumi.set(__self__, "tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) - pulumi.set(__self__, "tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) + GetPolicyRuleActionSnapshotResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + change_tier_to_archive_after_days_since_creation=change_tier_to_archive_after_days_since_creation, + change_tier_to_cool_after_days_since_creation=change_tier_to_cool_after_days_since_creation, + delete_after_days_since_creation_greater_than=delete_after_days_since_creation_greater_than, + tier_to_archive_after_days_since_last_tier_change_greater_than=tier_to_archive_after_days_since_last_tier_change_greater_than, + tier_to_cold_after_days_since_creation_greater_than=tier_to_cold_after_days_since_creation_greater_than, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + change_tier_to_archive_after_days_since_creation: Optional[int] = None, + change_tier_to_cool_after_days_since_creation: Optional[int] = None, + delete_after_days_since_creation_greater_than: Optional[int] = None, + tier_to_archive_after_days_since_last_tier_change_greater_than: Optional[int] = None, + tier_to_cold_after_days_since_creation_greater_than: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if change_tier_to_archive_after_days_since_creation is None and 'changeTierToArchiveAfterDaysSinceCreation' in kwargs: + change_tier_to_archive_after_days_since_creation = kwargs['changeTierToArchiveAfterDaysSinceCreation'] + if change_tier_to_archive_after_days_since_creation is None: + raise TypeError("Missing 'change_tier_to_archive_after_days_since_creation' argument") + if change_tier_to_cool_after_days_since_creation is None and 'changeTierToCoolAfterDaysSinceCreation' in kwargs: + change_tier_to_cool_after_days_since_creation = kwargs['changeTierToCoolAfterDaysSinceCreation'] + if change_tier_to_cool_after_days_since_creation is None: + raise TypeError("Missing 'change_tier_to_cool_after_days_since_creation' argument") + if delete_after_days_since_creation_greater_than is None and 'deleteAfterDaysSinceCreationGreaterThan' in kwargs: + delete_after_days_since_creation_greater_than = kwargs['deleteAfterDaysSinceCreationGreaterThan'] + if delete_after_days_since_creation_greater_than is None: + raise TypeError("Missing 'delete_after_days_since_creation_greater_than' argument") + if tier_to_archive_after_days_since_last_tier_change_greater_than is None and 'tierToArchiveAfterDaysSinceLastTierChangeGreaterThan' in kwargs: + tier_to_archive_after_days_since_last_tier_change_greater_than = kwargs['tierToArchiveAfterDaysSinceLastTierChangeGreaterThan'] + if tier_to_archive_after_days_since_last_tier_change_greater_than is None: + raise TypeError("Missing 'tier_to_archive_after_days_since_last_tier_change_greater_than' argument") + if tier_to_cold_after_days_since_creation_greater_than is None and 'tierToColdAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_cold_after_days_since_creation_greater_than = kwargs['tierToColdAfterDaysSinceCreationGreaterThan'] + if tier_to_cold_after_days_since_creation_greater_than is None: + raise TypeError("Missing 'tier_to_cold_after_days_since_creation_greater_than' argument") + + _setter("change_tier_to_archive_after_days_since_creation", change_tier_to_archive_after_days_since_creation) + _setter("change_tier_to_cool_after_days_since_creation", change_tier_to_cool_after_days_since_creation) + _setter("delete_after_days_since_creation_greater_than", delete_after_days_since_creation_greater_than) + _setter("tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) + _setter("tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) @property @pulumi.getter(name="changeTierToArchiveAfterDaysSinceCreation") @@ -3982,11 +5505,50 @@ def __init__(__self__, *, :param int tier_to_archive_after_days_since_last_tier_change_greater_than: The age in days after last tier change to the blobs to skip to be archived. :param int tier_to_cold_after_days_since_creation_greater_than: Optional The age in days after creation to cold storage. Supports blob currently at Hot tier. """ - pulumi.set(__self__, "change_tier_to_archive_after_days_since_creation", change_tier_to_archive_after_days_since_creation) - pulumi.set(__self__, "change_tier_to_cool_after_days_since_creation", change_tier_to_cool_after_days_since_creation) - pulumi.set(__self__, "delete_after_days_since_creation", delete_after_days_since_creation) - pulumi.set(__self__, "tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) - pulumi.set(__self__, "tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) + GetPolicyRuleActionVersionResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + change_tier_to_archive_after_days_since_creation=change_tier_to_archive_after_days_since_creation, + change_tier_to_cool_after_days_since_creation=change_tier_to_cool_after_days_since_creation, + delete_after_days_since_creation=delete_after_days_since_creation, + tier_to_archive_after_days_since_last_tier_change_greater_than=tier_to_archive_after_days_since_last_tier_change_greater_than, + tier_to_cold_after_days_since_creation_greater_than=tier_to_cold_after_days_since_creation_greater_than, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + change_tier_to_archive_after_days_since_creation: Optional[int] = None, + change_tier_to_cool_after_days_since_creation: Optional[int] = None, + delete_after_days_since_creation: Optional[int] = None, + tier_to_archive_after_days_since_last_tier_change_greater_than: Optional[int] = None, + tier_to_cold_after_days_since_creation_greater_than: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if change_tier_to_archive_after_days_since_creation is None and 'changeTierToArchiveAfterDaysSinceCreation' in kwargs: + change_tier_to_archive_after_days_since_creation = kwargs['changeTierToArchiveAfterDaysSinceCreation'] + if change_tier_to_archive_after_days_since_creation is None: + raise TypeError("Missing 'change_tier_to_archive_after_days_since_creation' argument") + if change_tier_to_cool_after_days_since_creation is None and 'changeTierToCoolAfterDaysSinceCreation' in kwargs: + change_tier_to_cool_after_days_since_creation = kwargs['changeTierToCoolAfterDaysSinceCreation'] + if change_tier_to_cool_after_days_since_creation is None: + raise TypeError("Missing 'change_tier_to_cool_after_days_since_creation' argument") + if delete_after_days_since_creation is None and 'deleteAfterDaysSinceCreation' in kwargs: + delete_after_days_since_creation = kwargs['deleteAfterDaysSinceCreation'] + if delete_after_days_since_creation is None: + raise TypeError("Missing 'delete_after_days_since_creation' argument") + if tier_to_archive_after_days_since_last_tier_change_greater_than is None and 'tierToArchiveAfterDaysSinceLastTierChangeGreaterThan' in kwargs: + tier_to_archive_after_days_since_last_tier_change_greater_than = kwargs['tierToArchiveAfterDaysSinceLastTierChangeGreaterThan'] + if tier_to_archive_after_days_since_last_tier_change_greater_than is None: + raise TypeError("Missing 'tier_to_archive_after_days_since_last_tier_change_greater_than' argument") + if tier_to_cold_after_days_since_creation_greater_than is None and 'tierToColdAfterDaysSinceCreationGreaterThan' in kwargs: + tier_to_cold_after_days_since_creation_greater_than = kwargs['tierToColdAfterDaysSinceCreationGreaterThan'] + if tier_to_cold_after_days_since_creation_greater_than is None: + raise TypeError("Missing 'tier_to_cold_after_days_since_creation_greater_than' argument") + + _setter("change_tier_to_archive_after_days_since_creation", change_tier_to_archive_after_days_since_creation) + _setter("change_tier_to_cool_after_days_since_creation", change_tier_to_cool_after_days_since_creation) + _setter("delete_after_days_since_creation", delete_after_days_since_creation) + _setter("tier_to_archive_after_days_since_last_tier_change_greater_than", tier_to_archive_after_days_since_last_tier_change_greater_than) + _setter("tier_to_cold_after_days_since_creation_greater_than", tier_to_cold_after_days_since_creation_greater_than) @property @pulumi.getter(name="changeTierToArchiveAfterDaysSinceCreation") @@ -4040,9 +5602,36 @@ def __init__(__self__, *, :param Sequence['GetPolicyRuleFilterMatchBlobIndexTagArgs'] match_blob_index_tags: A `match_blob_index_tag` block as defined below. The block defines the blob index tag based filtering for blob objects. :param Sequence[str] prefix_matches: An array of strings for prefixes to be matched. """ - pulumi.set(__self__, "blob_types", blob_types) - pulumi.set(__self__, "match_blob_index_tags", match_blob_index_tags) - pulumi.set(__self__, "prefix_matches", prefix_matches) + GetPolicyRuleFilterResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + blob_types=blob_types, + match_blob_index_tags=match_blob_index_tags, + prefix_matches=prefix_matches, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + blob_types: Optional[Sequence[str]] = None, + match_blob_index_tags: Optional[Sequence['outputs.GetPolicyRuleFilterMatchBlobIndexTagResult']] = None, + prefix_matches: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if blob_types is None and 'blobTypes' in kwargs: + blob_types = kwargs['blobTypes'] + if blob_types is None: + raise TypeError("Missing 'blob_types' argument") + if match_blob_index_tags is None and 'matchBlobIndexTags' in kwargs: + match_blob_index_tags = kwargs['matchBlobIndexTags'] + if match_blob_index_tags is None: + raise TypeError("Missing 'match_blob_index_tags' argument") + if prefix_matches is None and 'prefixMatches' in kwargs: + prefix_matches = kwargs['prefixMatches'] + if prefix_matches is None: + raise TypeError("Missing 'prefix_matches' argument") + + _setter("blob_types", blob_types) + _setter("match_blob_index_tags", match_blob_index_tags) + _setter("prefix_matches", prefix_matches) @property @pulumi.getter(name="blobTypes") @@ -4080,9 +5669,30 @@ def __init__(__self__, *, :param str operation: The comparison operator which is used for object comparison and filtering. Possible value is `==`. Defaults to `==`. :param str value: The filter tag value used for tag based filtering for blob objects. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "operation", operation) - pulumi.set(__self__, "value", value) + GetPolicyRuleFilterMatchBlobIndexTagResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + operation=operation, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + operation: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if operation is None: + raise TypeError("Missing 'operation' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("operation", operation) + _setter("value", value) @property @pulumi.getter @@ -4118,8 +5728,27 @@ def __init__(__self__, *, :param Sequence['GetShareAclAccessPolicyArgs'] access_policies: An `access_policy` block as defined below. :param str id: The ID which should be used for this Shared Identifier. """ - pulumi.set(__self__, "access_policies", access_policies) - pulumi.set(__self__, "id", id) + GetShareAclResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_policies=access_policies, + id=id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_policies: Optional[Sequence['outputs.GetShareAclAccessPolicyResult']] = None, + id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_policies is None and 'accessPolicies' in kwargs: + access_policies = kwargs['accessPolicies'] + if access_policies is None: + raise TypeError("Missing 'access_policies' argument") + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("access_policies", access_policies) + _setter("id", id) @property @pulumi.getter(name="accessPolicies") @@ -4149,9 +5778,30 @@ def __init__(__self__, *, :param str permissions: The permissions which should be associated with this Shared Identifier. Possible value is combination of `r` (read), `w` (write), `d` (delete), and `l` (list). :param str start: The time at which this Access Policy should be valid from, in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format. """ - pulumi.set(__self__, "expiry", expiry) - pulumi.set(__self__, "permissions", permissions) - pulumi.set(__self__, "start", start) + GetShareAclAccessPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + expiry=expiry, + permissions=permissions, + start=start, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + expiry: Optional[str] = None, + permissions: Optional[str] = None, + start: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if expiry is None: + raise TypeError("Missing 'expiry' argument") + if permissions is None: + raise TypeError("Missing 'permissions' argument") + if start is None: + raise TypeError("Missing 'start' argument") + + _setter("expiry", expiry) + _setter("permissions", permissions) + _setter("start", start) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/storage/queue.py b/sdk/python/pulumi_azure/storage/queue.py index ae8c1719f6..2965ca8a78 100644 --- a/sdk/python/pulumi_azure/storage/queue.py +++ b/sdk/python/pulumi_azure/storage/queue.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['QueueArgs', 'Queue'] @@ -23,11 +23,30 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] metadata: A mapping of MetaData which should be assigned to this Storage Queue. :param pulumi.Input[str] name: The name of the Queue which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "storage_account_name", storage_account_name) + QueueArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_name=storage_account_name, + metadata=metadata, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_name: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + + _setter("storage_account_name", storage_account_name) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="storageAccountName") @@ -80,14 +99,35 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_manager_id: The Resource Manager ID of this Storage Queue. :param pulumi.Input[str] storage_account_name: Specifies the Storage Account in which the Storage Queue should exist. Changing this forces a new resource to be created. """ + _QueueState._configure( + lambda key, value: pulumi.set(__self__, key, value), + metadata=metadata, + name=name, + resource_manager_id=resource_manager_id, + storage_account_name=storage_account_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_manager_id: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_manager_id is None and 'resourceManagerId' in kwargs: + resource_manager_id = kwargs['resourceManagerId'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_manager_id is not None: - pulumi.set(__self__, "resource_manager_id", resource_manager_id) + _setter("resource_manager_id", resource_manager_id) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) @property @pulumi.getter @@ -221,6 +261,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + QueueArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/share.py b/sdk/python/pulumi_azure/storage/share.py index 9d5c085590..f6b1898bea 100644 --- a/sdk/python/pulumi_azure/storage/share.py +++ b/sdk/python/pulumi_azure/storage/share.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,18 +41,51 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] metadata: A mapping of MetaData for this File Share. :param pulumi.Input[str] name: The name of the share. Must be unique within the storage account where the share is located. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "quota", quota) - pulumi.set(__self__, "storage_account_name", storage_account_name) + ShareArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + quota=quota, + storage_account_name=storage_account_name, + access_tier=access_tier, + acls=acls, + enabled_protocol=enabled_protocol, + metadata=metadata, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + quota: Optional[pulumi.Input[int]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + access_tier: Optional[pulumi.Input[str]] = None, + acls: Optional[pulumi.Input[Sequence[pulumi.Input['ShareAclArgs']]]] = None, + enabled_protocol: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if quota is None: + raise TypeError("Missing 'quota' argument") + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if access_tier is None and 'accessTier' in kwargs: + access_tier = kwargs['accessTier'] + if enabled_protocol is None and 'enabledProtocol' in kwargs: + enabled_protocol = kwargs['enabledProtocol'] + + _setter("quota", quota) + _setter("storage_account_name", storage_account_name) if access_tier is not None: - pulumi.set(__self__, "access_tier", access_tier) + _setter("access_tier", access_tier) if acls is not None: - pulumi.set(__self__, "acls", acls) + _setter("acls", acls) if enabled_protocol is not None: - pulumi.set(__self__, "enabled_protocol", enabled_protocol) + _setter("enabled_protocol", enabled_protocol) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -179,24 +212,59 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_name: Specifies the storage account in which to create the share. Changing this forces a new resource to be created. :param pulumi.Input[str] url: The URL of the File Share """ + _ShareState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_tier=access_tier, + acls=acls, + enabled_protocol=enabled_protocol, + metadata=metadata, + name=name, + quota=quota, + resource_manager_id=resource_manager_id, + storage_account_name=storage_account_name, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_tier: Optional[pulumi.Input[str]] = None, + acls: Optional[pulumi.Input[Sequence[pulumi.Input['ShareAclArgs']]]] = None, + enabled_protocol: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + quota: Optional[pulumi.Input[int]] = None, + resource_manager_id: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_tier is None and 'accessTier' in kwargs: + access_tier = kwargs['accessTier'] + if enabled_protocol is None and 'enabledProtocol' in kwargs: + enabled_protocol = kwargs['enabledProtocol'] + if resource_manager_id is None and 'resourceManagerId' in kwargs: + resource_manager_id = kwargs['resourceManagerId'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if access_tier is not None: - pulumi.set(__self__, "access_tier", access_tier) + _setter("access_tier", access_tier) if acls is not None: - pulumi.set(__self__, "acls", acls) + _setter("acls", acls) if enabled_protocol is not None: - pulumi.set(__self__, "enabled_protocol", enabled_protocol) + _setter("enabled_protocol", enabled_protocol) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if quota is not None: - pulumi.set(__self__, "quota", quota) + _setter("quota", quota) if resource_manager_id is not None: - pulumi.set(__self__, "resource_manager_id", resource_manager_id) + _setter("resource_manager_id", resource_manager_id) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="accessTier") @@ -438,6 +506,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ShareArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/share_directory.py b/sdk/python/pulumi_azure/storage/share_directory.py index 7d45bb9c99..f4eaaab383 100644 --- a/sdk/python/pulumi_azure/storage/share_directory.py +++ b/sdk/python/pulumi_azure/storage/share_directory.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ShareDirectoryArgs', 'ShareDirectory'] @@ -25,12 +25,37 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] metadata: A mapping of metadata to assign to this Directory. :param pulumi.Input[str] name: The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "share_name", share_name) - pulumi.set(__self__, "storage_account_name", storage_account_name) + ShareDirectoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + share_name=share_name, + storage_account_name=storage_account_name, + metadata=metadata, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + share_name: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if share_name is None: + raise TypeError("Missing 'share_name' argument") + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + + _setter("share_name", share_name) + _setter("storage_account_name", storage_account_name) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="shareName") @@ -95,14 +120,35 @@ def __init__(__self__, *, :param pulumi.Input[str] share_name: The name of the File Share where this Directory should be created. Changing this forces a new resource to be created. :param pulumi.Input[str] storage_account_name: The name of the Storage Account within which the File Share is located. Changing this forces a new resource to be created. """ + _ShareDirectoryState._configure( + lambda key, value: pulumi.set(__self__, key, value), + metadata=metadata, + name=name, + share_name=share_name, + storage_account_name=storage_account_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + share_name: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if share_name is None and 'shareName' in kwargs: + share_name = kwargs['shareName'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if share_name is not None: - pulumi.set(__self__, "share_name", share_name) + _setter("share_name", share_name) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) @property @pulumi.getter @@ -248,6 +294,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ShareDirectoryArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/share_file.py b/sdk/python/pulumi_azure/storage/share_file.py index 20fd84063d..b6cc219ad6 100644 --- a/sdk/python/pulumi_azure/storage/share_file.py +++ b/sdk/python/pulumi_azure/storage/share_file.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ShareFileArgs', 'ShareFile'] @@ -35,23 +35,62 @@ def __init__(__self__, *, :param pulumi.Input[str] path: The storage share directory that you would like the file placed into. Changing this forces a new resource to be created. Defaults to `""`. :param pulumi.Input[str] source: An absolute path to a file on the local system. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "storage_share_id", storage_share_id) + ShareFileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_share_id=storage_share_id, + content_disposition=content_disposition, + content_encoding=content_encoding, + content_md5=content_md5, + content_type=content_type, + metadata=metadata, + name=name, + path=path, + source=source, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_share_id: Optional[pulumi.Input[str]] = None, + content_disposition: Optional[pulumi.Input[str]] = None, + content_encoding: Optional[pulumi.Input[str]] = None, + content_md5: Optional[pulumi.Input[str]] = None, + content_type: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_share_id is None and 'storageShareId' in kwargs: + storage_share_id = kwargs['storageShareId'] + if storage_share_id is None: + raise TypeError("Missing 'storage_share_id' argument") + if content_disposition is None and 'contentDisposition' in kwargs: + content_disposition = kwargs['contentDisposition'] + if content_encoding is None and 'contentEncoding' in kwargs: + content_encoding = kwargs['contentEncoding'] + if content_md5 is None and 'contentMd5' in kwargs: + content_md5 = kwargs['contentMd5'] + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + + _setter("storage_share_id", storage_share_id) if content_disposition is not None: - pulumi.set(__self__, "content_disposition", content_disposition) + _setter("content_disposition", content_disposition) if content_encoding is not None: - pulumi.set(__self__, "content_encoding", content_encoding) + _setter("content_encoding", content_encoding) if content_md5 is not None: - pulumi.set(__self__, "content_md5", content_md5) + _setter("content_md5", content_md5) if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) @property @pulumi.getter(name="storageShareId") @@ -188,26 +227,67 @@ def __init__(__self__, *, :param pulumi.Input[str] source: An absolute path to a file on the local system. Changing this forces a new resource to be created. :param pulumi.Input[str] storage_share_id: The Storage Share ID in which this file will be placed into. Changing this forces a new resource to be created. """ + _ShareFileState._configure( + lambda key, value: pulumi.set(__self__, key, value), + content_disposition=content_disposition, + content_encoding=content_encoding, + content_length=content_length, + content_md5=content_md5, + content_type=content_type, + metadata=metadata, + name=name, + path=path, + source=source, + storage_share_id=storage_share_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content_disposition: Optional[pulumi.Input[str]] = None, + content_encoding: Optional[pulumi.Input[str]] = None, + content_length: Optional[pulumi.Input[int]] = None, + content_md5: Optional[pulumi.Input[str]] = None, + content_type: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input[str]] = None, + storage_share_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content_disposition is None and 'contentDisposition' in kwargs: + content_disposition = kwargs['contentDisposition'] + if content_encoding is None and 'contentEncoding' in kwargs: + content_encoding = kwargs['contentEncoding'] + if content_length is None and 'contentLength' in kwargs: + content_length = kwargs['contentLength'] + if content_md5 is None and 'contentMd5' in kwargs: + content_md5 = kwargs['contentMd5'] + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if storage_share_id is None and 'storageShareId' in kwargs: + storage_share_id = kwargs['storageShareId'] + if content_disposition is not None: - pulumi.set(__self__, "content_disposition", content_disposition) + _setter("content_disposition", content_disposition) if content_encoding is not None: - pulumi.set(__self__, "content_encoding", content_encoding) + _setter("content_encoding", content_encoding) if content_length is not None: - pulumi.set(__self__, "content_length", content_length) + _setter("content_length", content_length) if content_md5 is not None: - pulumi.set(__self__, "content_md5", content_md5) + _setter("content_md5", content_md5) if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if source is not None: - pulumi.set(__self__, "source", source) + _setter("source", source) if storage_share_id is not None: - pulumi.set(__self__, "storage_share_id", storage_share_id) + _setter("storage_share_id", storage_share_id) @property @pulumi.getter(name="contentDisposition") @@ -435,6 +515,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ShareFileArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/sync.py b/sdk/python/pulumi_azure/storage/sync.py index 4d0e4e6983..73053d961e 100644 --- a/sdk/python/pulumi_azure/storage/sync.py +++ b/sdk/python/pulumi_azure/storage/sync.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SyncArgs', 'Sync'] @@ -27,15 +27,40 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Storage Sync. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + SyncArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + incoming_traffic_policy=incoming_traffic_policy, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + incoming_traffic_policy: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if incoming_traffic_policy is None and 'incomingTrafficPolicy' in kwargs: + incoming_traffic_policy = kwargs['incomingTrafficPolicy'] + + _setter("resource_group_name", resource_group_name) if incoming_traffic_policy is not None: - pulumi.set(__self__, "incoming_traffic_policy", incoming_traffic_policy) + _setter("incoming_traffic_policy", incoming_traffic_policy) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -114,16 +139,39 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Storage Sync. """ + _SyncState._configure( + lambda key, value: pulumi.set(__self__, key, value), + incoming_traffic_policy=incoming_traffic_policy, + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + incoming_traffic_policy: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if incoming_traffic_policy is None and 'incomingTrafficPolicy' in kwargs: + incoming_traffic_policy = kwargs['incomingTrafficPolicy'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if incoming_traffic_policy is not None: - pulumi.set(__self__, "incoming_traffic_policy", incoming_traffic_policy) + _setter("incoming_traffic_policy", incoming_traffic_policy) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="incomingTrafficPolicy") @@ -273,6 +321,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SyncArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/sync_cloud_endpoint.py b/sdk/python/pulumi_azure/storage/sync_cloud_endpoint.py index f3fa832a20..a8525feeab 100644 --- a/sdk/python/pulumi_azure/storage/sync_cloud_endpoint.py +++ b/sdk/python/pulumi_azure/storage/sync_cloud_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SyncCloudEndpointArgs', 'SyncCloudEndpoint'] @@ -27,13 +27,46 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created. :param pulumi.Input[str] storage_account_tenant_id: The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id. """ - pulumi.set(__self__, "file_share_name", file_share_name) - pulumi.set(__self__, "storage_account_id", storage_account_id) - pulumi.set(__self__, "storage_sync_group_id", storage_sync_group_id) + SyncCloudEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_share_name=file_share_name, + storage_account_id=storage_account_id, + storage_sync_group_id=storage_sync_group_id, + name=name, + storage_account_tenant_id=storage_account_tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_share_name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_sync_group_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account_tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_share_name is None and 'fileShareName' in kwargs: + file_share_name = kwargs['fileShareName'] + if file_share_name is None: + raise TypeError("Missing 'file_share_name' argument") + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_id is None: + raise TypeError("Missing 'storage_account_id' argument") + if storage_sync_group_id is None and 'storageSyncGroupId' in kwargs: + storage_sync_group_id = kwargs['storageSyncGroupId'] + if storage_sync_group_id is None: + raise TypeError("Missing 'storage_sync_group_id' argument") + if storage_account_tenant_id is None and 'storageAccountTenantId' in kwargs: + storage_account_tenant_id = kwargs['storageAccountTenantId'] + + _setter("file_share_name", file_share_name) + _setter("storage_account_id", storage_account_id) + _setter("storage_sync_group_id", storage_sync_group_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_account_tenant_id is not None: - pulumi.set(__self__, "storage_account_tenant_id", storage_account_tenant_id) + _setter("storage_account_tenant_id", storage_account_tenant_id) @property @pulumi.getter(name="fileShareName") @@ -112,16 +145,43 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_tenant_id: The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id. :param pulumi.Input[str] storage_sync_group_id: The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created. """ + _SyncCloudEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + file_share_name=file_share_name, + name=name, + storage_account_id=storage_account_id, + storage_account_tenant_id=storage_account_tenant_id, + storage_sync_group_id=storage_sync_group_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + file_share_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account_id: Optional[pulumi.Input[str]] = None, + storage_account_tenant_id: Optional[pulumi.Input[str]] = None, + storage_sync_group_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_share_name is None and 'fileShareName' in kwargs: + file_share_name = kwargs['fileShareName'] + if storage_account_id is None and 'storageAccountId' in kwargs: + storage_account_id = kwargs['storageAccountId'] + if storage_account_tenant_id is None and 'storageAccountTenantId' in kwargs: + storage_account_tenant_id = kwargs['storageAccountTenantId'] + if storage_sync_group_id is None and 'storageSyncGroupId' in kwargs: + storage_sync_group_id = kwargs['storageSyncGroupId'] + if file_share_name is not None: - pulumi.set(__self__, "file_share_name", file_share_name) + _setter("file_share_name", file_share_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_account_id is not None: - pulumi.set(__self__, "storage_account_id", storage_account_id) + _setter("storage_account_id", storage_account_id) if storage_account_tenant_id is not None: - pulumi.set(__self__, "storage_account_tenant_id", storage_account_tenant_id) + _setter("storage_account_tenant_id", storage_account_tenant_id) if storage_sync_group_id is not None: - pulumi.set(__self__, "storage_sync_group_id", storage_sync_group_id) + _setter("storage_sync_group_id", storage_sync_group_id) @property @pulumi.getter(name="fileShareName") @@ -307,6 +367,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SyncCloudEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/sync_group.py b/sdk/python/pulumi_azure/storage/sync_group.py index 6c79b3a8c0..94e0a0e5e2 100644 --- a/sdk/python/pulumi_azure/storage/sync_group.py +++ b/sdk/python/pulumi_azure/storage/sync_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SyncGroupArgs', 'SyncGroup'] @@ -21,9 +21,26 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_sync_id: The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created. :param pulumi.Input[str] name: The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created. """ - pulumi.set(__self__, "storage_sync_id", storage_sync_id) + SyncGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_sync_id=storage_sync_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_sync_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_sync_id is None and 'storageSyncId' in kwargs: + storage_sync_id = kwargs['storageSyncId'] + if storage_sync_id is None: + raise TypeError("Missing 'storage_sync_id' argument") + + _setter("storage_sync_id", storage_sync_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="storageSyncId") @@ -60,10 +77,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created. :param pulumi.Input[str] storage_sync_id: The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created. """ + _SyncGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + storage_sync_id=storage_sync_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + storage_sync_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_sync_id is None and 'storageSyncId' in kwargs: + storage_sync_id = kwargs['storageSyncId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_sync_id is not None: - pulumi.set(__self__, "storage_sync_id", storage_sync_id) + _setter("storage_sync_id", storage_sync_id) @property @pulumi.getter @@ -167,6 +199,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SyncGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/table.py b/sdk/python/pulumi_azure/storage/table.py index 3cc21739e9..b535a52f8e 100644 --- a/sdk/python/pulumi_azure/storage/table.py +++ b/sdk/python/pulumi_azure/storage/table.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -25,11 +25,30 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['TableAclArgs']]] acls: One or more `acl` blocks as defined below. :param pulumi.Input[str] name: The name of the storage table. Only Alphanumeric characters allowed, starting with a letter. Must be unique within the storage account the table is located. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "storage_account_name", storage_account_name) + TableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_name=storage_account_name, + acls=acls, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_name: Optional[pulumi.Input[str]] = None, + acls: Optional[pulumi.Input[Sequence[pulumi.Input['TableAclArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + + _setter("storage_account_name", storage_account_name) if acls is not None: - pulumi.set(__self__, "acls", acls) + _setter("acls", acls) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="storageAccountName") @@ -80,12 +99,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the storage table. Only Alphanumeric characters allowed, starting with a letter. Must be unique within the storage account the table is located. Changing this forces a new resource to be created. :param pulumi.Input[str] storage_account_name: Specifies the storage account in which to create the storage table. Changing this forces a new resource to be created. """ + _TableState._configure( + lambda key, value: pulumi.set(__self__, key, value), + acls=acls, + name=name, + storage_account_name=storage_account_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + acls: Optional[pulumi.Input[Sequence[pulumi.Input['TableAclArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if acls is not None: - pulumi.set(__self__, "acls", acls) + _setter("acls", acls) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) @property @pulumi.getter @@ -207,6 +243,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TableArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/table_entity.py b/sdk/python/pulumi_azure/storage/table_entity.py index 9a7bb7e070..82ffb7202f 100644 --- a/sdk/python/pulumi_azure/storage/table_entity.py +++ b/sdk/python/pulumi_azure/storage/table_entity.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['TableEntityArgs', 'TableEntity'] @@ -27,11 +27,48 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_name: Specifies the storage account in which to create the storage table entity. Changing this forces a new resource to be created. :param pulumi.Input[str] table_name: The name of the storage table in which to create the storage table entity. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "entity", entity) - pulumi.set(__self__, "partition_key", partition_key) - pulumi.set(__self__, "row_key", row_key) - pulumi.set(__self__, "storage_account_name", storage_account_name) - pulumi.set(__self__, "table_name", table_name) + TableEntityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + entity=entity, + partition_key=partition_key, + row_key=row_key, + storage_account_name=storage_account_name, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + entity: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + row_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if entity is None: + raise TypeError("Missing 'entity' argument") + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + if partition_key is None: + raise TypeError("Missing 'partition_key' argument") + if row_key is None and 'rowKey' in kwargs: + row_key = kwargs['rowKey'] + if row_key is None: + raise TypeError("Missing 'row_key' argument") + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if table_name is None: + raise TypeError("Missing 'table_name' argument") + + _setter("entity", entity) + _setter("partition_key", partition_key) + _setter("row_key", row_key) + _setter("storage_account_name", storage_account_name) + _setter("table_name", table_name) @property @pulumi.getter @@ -110,16 +147,43 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_name: Specifies the storage account in which to create the storage table entity. Changing this forces a new resource to be created. :param pulumi.Input[str] table_name: The name of the storage table in which to create the storage table entity. Changing this forces a new resource to be created. """ + _TableEntityState._configure( + lambda key, value: pulumi.set(__self__, key, value), + entity=entity, + partition_key=partition_key, + row_key=row_key, + storage_account_name=storage_account_name, + table_name=table_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + entity: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + row_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + table_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + if row_key is None and 'rowKey' in kwargs: + row_key = kwargs['rowKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if table_name is None and 'tableName' in kwargs: + table_name = kwargs['tableName'] + if entity is not None: - pulumi.set(__self__, "entity", entity) + _setter("entity", entity) if partition_key is not None: - pulumi.set(__self__, "partition_key", partition_key) + _setter("partition_key", partition_key) if row_key is not None: - pulumi.set(__self__, "row_key", row_key) + _setter("row_key", row_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if table_name is not None: - pulumi.set(__self__, "table_name", table_name) + _setter("table_name", table_name) @property @pulumi.getter @@ -285,6 +349,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TableEntityArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/storage/zip_blob.py b/sdk/python/pulumi_azure/storage/zip_blob.py index dd8d60a8cd..a98c357fbc 100644 --- a/sdk/python/pulumi_azure/storage/zip_blob.py +++ b/sdk/python/pulumi_azure/storage/zip_blob.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ZipBlobArgs', 'ZipBlob'] @@ -31,31 +31,90 @@ def __init__(__self__, *, """ The set of arguments for constructing a ZipBlob resource. """ - pulumi.set(__self__, "storage_account_name", storage_account_name) - pulumi.set(__self__, "storage_container_name", storage_container_name) - pulumi.set(__self__, "type", type) + ZipBlobArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_account_name=storage_account_name, + storage_container_name=storage_container_name, + type=type, + access_tier=access_tier, + cache_control=cache_control, + content=content, + content_md5=content_md5, + content_type=content_type, + metadata=metadata, + name=name, + parallelism=parallelism, + size=size, + source_content=source_content, + source_uri=source_uri, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_container_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + access_tier: Optional[pulumi.Input[str]] = None, + cache_control: Optional[pulumi.Input[str]] = None, + content: Optional[pulumi.Input[pulumi.Archive]] = None, + content_md5: Optional[pulumi.Input[str]] = None, + content_type: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + parallelism: Optional[pulumi.Input[int]] = None, + size: Optional[pulumi.Input[int]] = None, + source_content: Optional[pulumi.Input[str]] = None, + source_uri: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if storage_container_name is None: + raise TypeError("Missing 'storage_container_name' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if access_tier is None and 'accessTier' in kwargs: + access_tier = kwargs['accessTier'] + if cache_control is None and 'cacheControl' in kwargs: + cache_control = kwargs['cacheControl'] + if content_md5 is None and 'contentMd5' in kwargs: + content_md5 = kwargs['contentMd5'] + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if source_content is None and 'sourceContent' in kwargs: + source_content = kwargs['sourceContent'] + if source_uri is None and 'sourceUri' in kwargs: + source_uri = kwargs['sourceUri'] + + _setter("storage_account_name", storage_account_name) + _setter("storage_container_name", storage_container_name) + _setter("type", type) if access_tier is not None: - pulumi.set(__self__, "access_tier", access_tier) + _setter("access_tier", access_tier) if cache_control is not None: - pulumi.set(__self__, "cache_control", cache_control) + _setter("cache_control", cache_control) if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if content_md5 is not None: - pulumi.set(__self__, "content_md5", content_md5) + _setter("content_md5", content_md5) if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parallelism is not None: - pulumi.set(__self__, "parallelism", parallelism) + _setter("parallelism", parallelism) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if source_content is not None: - pulumi.set(__self__, "source_content", source_content) + _setter("source_content", source_content) if source_uri is not None: - pulumi.set(__self__, "source_uri", source_uri) + _setter("source_uri", source_uri) @property @pulumi.getter(name="storageAccountName") @@ -205,36 +264,91 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering ZipBlob resources. """ + _ZipBlobState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_tier=access_tier, + cache_control=cache_control, + content=content, + content_md5=content_md5, + content_type=content_type, + metadata=metadata, + name=name, + parallelism=parallelism, + size=size, + source_content=source_content, + source_uri=source_uri, + storage_account_name=storage_account_name, + storage_container_name=storage_container_name, + type=type, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_tier: Optional[pulumi.Input[str]] = None, + cache_control: Optional[pulumi.Input[str]] = None, + content: Optional[pulumi.Input[pulumi.Archive]] = None, + content_md5: Optional[pulumi.Input[str]] = None, + content_type: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + parallelism: Optional[pulumi.Input[int]] = None, + size: Optional[pulumi.Input[int]] = None, + source_content: Optional[pulumi.Input[str]] = None, + source_uri: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_container_name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_tier is None and 'accessTier' in kwargs: + access_tier = kwargs['accessTier'] + if cache_control is None and 'cacheControl' in kwargs: + cache_control = kwargs['cacheControl'] + if content_md5 is None and 'contentMd5' in kwargs: + content_md5 = kwargs['contentMd5'] + if content_type is None and 'contentType' in kwargs: + content_type = kwargs['contentType'] + if source_content is None and 'sourceContent' in kwargs: + source_content = kwargs['sourceContent'] + if source_uri is None and 'sourceUri' in kwargs: + source_uri = kwargs['sourceUri'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if access_tier is not None: - pulumi.set(__self__, "access_tier", access_tier) + _setter("access_tier", access_tier) if cache_control is not None: - pulumi.set(__self__, "cache_control", cache_control) + _setter("cache_control", cache_control) if content is not None: - pulumi.set(__self__, "content", content) + _setter("content", content) if content_md5 is not None: - pulumi.set(__self__, "content_md5", content_md5) + _setter("content_md5", content_md5) if content_type is not None: - pulumi.set(__self__, "content_type", content_type) + _setter("content_type", content_type) if metadata is not None: - pulumi.set(__self__, "metadata", metadata) + _setter("metadata", metadata) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parallelism is not None: - pulumi.set(__self__, "parallelism", parallelism) + _setter("parallelism", parallelism) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if source_content is not None: - pulumi.set(__self__, "source_content", source_content) + _setter("source_content", source_content) if source_uri is not None: - pulumi.set(__self__, "source_uri", source_uri) + _setter("source_uri", source_uri) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_container_name is not None: - pulumi.set(__self__, "storage_container_name", storage_container_name) + _setter("storage_container_name", storage_container_name) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="accessTier") @@ -420,6 +534,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ZipBlobArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/streamanalytics/_inputs.py b/sdk/python/pulumi_azure/streamanalytics/_inputs.py index 70d35d3ac8..d15e895a45 100644 --- a/sdk/python/pulumi_azure/streamanalytics/_inputs.py +++ b/sdk/python/pulumi_azure/streamanalytics/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -36,9 +36,26 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The Data Type for the Input Argument of this JavaScript Function. Possible values include `array`, `any`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. :param pulumi.Input[bool] configuration_parameter: Is this input parameter a configuration parameter? Defaults to `false`. """ - pulumi.set(__self__, "type", type) + FunctionJavaScriptUDFInputArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + configuration_parameter=configuration_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + configuration_parameter: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if configuration_parameter is None and 'configurationParameter' in kwargs: + configuration_parameter = kwargs['configurationParameter'] + + _setter("type", type) if configuration_parameter is not None: - pulumi.set(__self__, "configuration_parameter", configuration_parameter) + _setter("configuration_parameter", configuration_parameter) @property @pulumi.getter @@ -72,7 +89,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] type: The Data Type output from this JavaScript Function. Possible values include `array`, `any`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. """ - pulumi.set(__self__, "type", type) + FunctionJavaScriptUDFOutputArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("type", type) @property @pulumi.getter @@ -96,9 +126,26 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The input data type of this JavaScript Function. Possible values include `any`, `array`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. :param pulumi.Input[bool] configuration_parameter: Is this input parameter a configuration parameter? Defaults to `false`. """ - pulumi.set(__self__, "type", type) + FunctionJavascriptUdaInputArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + configuration_parameter=configuration_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + configuration_parameter: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if configuration_parameter is None and 'configurationParameter' in kwargs: + configuration_parameter = kwargs['configurationParameter'] + + _setter("type", type) if configuration_parameter is not None: - pulumi.set(__self__, "configuration_parameter", configuration_parameter) + _setter("configuration_parameter", configuration_parameter) @property @pulumi.getter @@ -132,7 +179,20 @@ def __init__(__self__, *, """ :param pulumi.Input[str] type: The output data type from this JavaScript Function. Possible values include `any`, `array`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. """ - pulumi.set(__self__, "type", type) + FunctionJavascriptUdaOutputArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("type", type) @property @pulumi.getter @@ -158,11 +218,32 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + JobIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -212,10 +293,35 @@ def __init__(__self__, *, :param pulumi.Input[str] account_name: The name of the Azure storage account. :param pulumi.Input[str] authentication_mode: The authentication mode of the storage account. The only supported value is `ConnectionString`. Defaults to `ConnectionString`. """ - pulumi.set(__self__, "account_key", account_key) - pulumi.set(__self__, "account_name", account_name) + JobJobStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_key=account_key, + account_name=account_name, + authentication_mode=authentication_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_key: Optional[pulumi.Input[str]] = None, + account_name: Optional[pulumi.Input[str]] = None, + authentication_mode: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if account_key is None: + raise TypeError("Missing 'account_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + + _setter("account_key", account_key) + _setter("account_name", account_name) if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) @property @pulumi.getter(name="accountKey") @@ -275,13 +381,34 @@ def __init__(__self__, *, > **NOTE:** This is Required and can only be specified when `type` is set to `Json`. """ - pulumi.set(__self__, "type", type) + OutputBlobSerializationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + format=format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + field_delimiter: Optional[pulumi.Input[str]] = None, + format: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) if format is not None: - pulumi.set(__self__, "format", format) + _setter("format", format) @property @pulumi.getter @@ -359,13 +486,34 @@ def __init__(__self__, *, > **NOTE:** This is Required and can only be specified when `type` is set to `Json`. """ - pulumi.set(__self__, "type", type) + OutputEventHubSerializationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + format=format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + field_delimiter: Optional[pulumi.Input[str]] = None, + format: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) if format is not None: - pulumi.set(__self__, "format", format) + _setter("format", format) @property @pulumi.getter @@ -441,13 +589,34 @@ def __init__(__self__, *, > **NOTE:** This is Required and can only be specified when `type` is set to `Json`. """ - pulumi.set(__self__, "type", type) + OutputServiceBusQueueSerializationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + format=format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + field_delimiter: Optional[pulumi.Input[str]] = None, + format: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) if format is not None: - pulumi.set(__self__, "format", format) + _setter("format", format) @property @pulumi.getter @@ -523,13 +692,34 @@ def __init__(__self__, *, > **NOTE:** This is Required and can only be specified when `type` is set to `Json`. """ - pulumi.set(__self__, "type", type) + OutputServicebusTopicSerializationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + format=format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + field_delimiter: Optional[pulumi.Input[str]] = None, + format: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) if format is not None: - pulumi.set(__self__, "format", format) + _setter("format", format) @property @pulumi.getter @@ -601,11 +791,30 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `Csv`. """ - pulumi.set(__self__, "type", type) + ReferenceInputBlobSerializationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + field_delimiter: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) @property @pulumi.getter @@ -663,11 +872,30 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `Csv`. """ - pulumi.set(__self__, "type", type) + StreamInputBlobSerializationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + field_delimiter: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) @property @pulumi.getter @@ -725,11 +953,30 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `Csv`. """ - pulumi.set(__self__, "type", type) + StreamInputEventHubSerializationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + field_delimiter: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) @property @pulumi.getter @@ -787,11 +1034,30 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `Csv`. """ - pulumi.set(__self__, "type", type) + StreamInputEventHubV2SerializationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + field_delimiter: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) @property @pulumi.getter @@ -849,11 +1115,30 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `Csv`. """ - pulumi.set(__self__, "type", type) + StreamInputIotHubSerializationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + encoding: Optional[pulumi.Input[str]] = None, + field_delimiter: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/streamanalytics/cluster.py b/sdk/python/pulumi_azure/streamanalytics/cluster.py index 7c48c1c851..8c20a12bb7 100644 --- a/sdk/python/pulumi_azure/streamanalytics/cluster.py +++ b/sdk/python/pulumi_azure/streamanalytics/cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ClusterArgs', 'Cluster'] @@ -27,14 +27,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Stream Analytics Cluster. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Stream Analytics. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "streaming_capacity", streaming_capacity) + ClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + streaming_capacity=streaming_capacity, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + streaming_capacity: Optional[pulumi.Input[int]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if streaming_capacity is None and 'streamingCapacity' in kwargs: + streaming_capacity = kwargs['streamingCapacity'] + if streaming_capacity is None: + raise TypeError("Missing 'streaming_capacity' argument") + + _setter("resource_group_name", resource_group_name) + _setter("streaming_capacity", streaming_capacity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -113,16 +140,39 @@ def __init__(__self__, *, :param pulumi.Input[int] streaming_capacity: The number of streaming units supported by the Cluster. Accepted values are multiples of `36` in the range of `36` to `216`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Stream Analytics. """ + _ClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + streaming_capacity=streaming_capacity, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + streaming_capacity: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if streaming_capacity is None and 'streamingCapacity' in kwargs: + streaming_capacity = kwargs['streamingCapacity'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if streaming_capacity is not None: - pulumi.set(__self__, "streaming_capacity", streaming_capacity) + _setter("streaming_capacity", streaming_capacity) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -268,6 +318,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/streamanalytics/function_java_script_udf.py b/sdk/python/pulumi_azure/streamanalytics/function_java_script_udf.py index d91b132436..1df6cea76a 100644 --- a/sdk/python/pulumi_azure/streamanalytics/function_java_script_udf.py +++ b/sdk/python/pulumi_azure/streamanalytics/function_java_script_udf.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,13 +31,48 @@ def __init__(__self__, *, :param pulumi.Input[str] stream_analytics_job_name: The name of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the JavaScript UDF Function. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "inputs", inputs) - pulumi.set(__self__, "output", output) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "script", script) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + FunctionJavaScriptUDFArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + inputs=inputs, + output=output, + resource_group_name=resource_group_name, + script=script, + stream_analytics_job_name=stream_analytics_job_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + inputs: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionJavaScriptUDFInputArgs']]]] = None, + output: Optional[pulumi.Input['FunctionJavaScriptUDFOutputArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + script: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if inputs is None: + raise TypeError("Missing 'inputs' argument") + if output is None: + raise TypeError("Missing 'output' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if script is None: + raise TypeError("Missing 'script' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + + _setter("inputs", inputs) + _setter("output", output) + _setter("resource_group_name", resource_group_name) + _setter("script", script) + _setter("stream_analytics_job_name", stream_analytics_job_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -130,18 +165,43 @@ def __init__(__self__, *, :param pulumi.Input[str] script: The JavaScript of this UDF Function. :param pulumi.Input[str] stream_analytics_job_name: The name of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. """ + _FunctionJavaScriptUDFState._configure( + lambda key, value: pulumi.set(__self__, key, value), + inputs=inputs, + name=name, + output=output, + resource_group_name=resource_group_name, + script=script, + stream_analytics_job_name=stream_analytics_job_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + inputs: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionJavaScriptUDFInputArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + output: Optional[pulumi.Input['FunctionJavaScriptUDFOutputArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + script: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if inputs is not None: - pulumi.set(__self__, "inputs", inputs) + _setter("inputs", inputs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if output is not None: - pulumi.set(__self__, "output", output) + _setter("output", output) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if script is not None: - pulumi.set(__self__, "script", script) + _setter("script", script) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) @property @pulumi.getter @@ -323,6 +383,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FunctionJavaScriptUDFArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -347,6 +411,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'inputs'") __props__.__dict__["inputs"] = inputs __props__.__dict__["name"] = name + if output is not None and not isinstance(output, FunctionJavaScriptUDFOutputArgs): + output = output or {} + def _setter(key, value): + output[key] = value + FunctionJavaScriptUDFOutputArgs._configure(_setter, **output) if output is None and not opts.urn: raise TypeError("Missing required property 'output'") __props__.__dict__["output"] = output diff --git a/sdk/python/pulumi_azure/streamanalytics/function_javascript_uda.py b/sdk/python/pulumi_azure/streamanalytics/function_javascript_uda.py index 30cf6c0360..02919f45b4 100644 --- a/sdk/python/pulumi_azure/streamanalytics/function_javascript_uda.py +++ b/sdk/python/pulumi_azure/streamanalytics/function_javascript_uda.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,12 +29,41 @@ def __init__(__self__, *, :param pulumi.Input[str] stream_analytics_job_id: The resource ID of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the JavaScript UDA Function. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "inputs", inputs) - pulumi.set(__self__, "output", output) - pulumi.set(__self__, "script", script) - pulumi.set(__self__, "stream_analytics_job_id", stream_analytics_job_id) + FunctionJavascriptUdaArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + inputs=inputs, + output=output, + script=script, + stream_analytics_job_id=stream_analytics_job_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + inputs: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionJavascriptUdaInputArgs']]]] = None, + output: Optional[pulumi.Input['FunctionJavascriptUdaOutputArgs']] = None, + script: Optional[pulumi.Input[str]] = None, + stream_analytics_job_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if inputs is None: + raise TypeError("Missing 'inputs' argument") + if output is None: + raise TypeError("Missing 'output' argument") + if script is None: + raise TypeError("Missing 'script' argument") + if stream_analytics_job_id is None and 'streamAnalyticsJobId' in kwargs: + stream_analytics_job_id = kwargs['streamAnalyticsJobId'] + if stream_analytics_job_id is None: + raise TypeError("Missing 'stream_analytics_job_id' argument") + + _setter("inputs", inputs) + _setter("output", output) + _setter("script", script) + _setter("stream_analytics_job_id", stream_analytics_job_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -113,16 +142,37 @@ def __init__(__self__, *, :param pulumi.Input[str] script: The JavaScript of this UDA Function. :param pulumi.Input[str] stream_analytics_job_id: The resource ID of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. """ + _FunctionJavascriptUdaState._configure( + lambda key, value: pulumi.set(__self__, key, value), + inputs=inputs, + name=name, + output=output, + script=script, + stream_analytics_job_id=stream_analytics_job_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + inputs: Optional[pulumi.Input[Sequence[pulumi.Input['FunctionJavascriptUdaInputArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + output: Optional[pulumi.Input['FunctionJavascriptUdaOutputArgs']] = None, + script: Optional[pulumi.Input[str]] = None, + stream_analytics_job_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if stream_analytics_job_id is None and 'streamAnalyticsJobId' in kwargs: + stream_analytics_job_id = kwargs['streamAnalyticsJobId'] + if inputs is not None: - pulumi.set(__self__, "inputs", inputs) + _setter("inputs", inputs) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if output is not None: - pulumi.set(__self__, "output", output) + _setter("output", output) if script is not None: - pulumi.set(__self__, "script", script) + _setter("script", script) if stream_analytics_job_id is not None: - pulumi.set(__self__, "stream_analytics_job_id", stream_analytics_job_id) + _setter("stream_analytics_job_id", stream_analytics_job_id) @property @pulumi.getter @@ -308,6 +358,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FunctionJavascriptUdaArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -331,6 +385,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'inputs'") __props__.__dict__["inputs"] = inputs __props__.__dict__["name"] = name + if output is not None and not isinstance(output, FunctionJavascriptUdaOutputArgs): + output = output or {} + def _setter(key, value): + output[key] = value + FunctionJavascriptUdaOutputArgs._configure(_setter, **output) if output is None and not opts.urn: raise TypeError("Missing required property 'output'") __props__.__dict__["output"] = output diff --git a/sdk/python/pulumi_azure/streamanalytics/get_job.py b/sdk/python/pulumi_azure/streamanalytics/get_job.py index 8998191bb4..f08a84ba6e 100644 --- a/sdk/python/pulumi_azure/streamanalytics/get_job.py +++ b/sdk/python/pulumi_azure/streamanalytics/get_job.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/streamanalytics/job.py b/sdk/python/pulumi_azure/streamanalytics/job.py index 89375c8749..ff530001ac 100644 --- a/sdk/python/pulumi_azure/streamanalytics/job.py +++ b/sdk/python/pulumi_azure/streamanalytics/job.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -59,38 +59,109 @@ def __init__(__self__, *, > **NOTE:** `Edge` doesn't support `stream_analytics_cluster_id` and `streaming_units`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "transformation_query", transformation_query) + JobArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + transformation_query=transformation_query, + compatibility_level=compatibility_level, + content_storage_policy=content_storage_policy, + data_locale=data_locale, + events_late_arrival_max_delay_in_seconds=events_late_arrival_max_delay_in_seconds, + events_out_of_order_max_delay_in_seconds=events_out_of_order_max_delay_in_seconds, + events_out_of_order_policy=events_out_of_order_policy, + identity=identity, + job_storage_accounts=job_storage_accounts, + location=location, + name=name, + output_error_policy=output_error_policy, + stream_analytics_cluster_id=stream_analytics_cluster_id, + streaming_units=streaming_units, + tags=tags, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + transformation_query: Optional[pulumi.Input[str]] = None, + compatibility_level: Optional[pulumi.Input[str]] = None, + content_storage_policy: Optional[pulumi.Input[str]] = None, + data_locale: Optional[pulumi.Input[str]] = None, + events_late_arrival_max_delay_in_seconds: Optional[pulumi.Input[int]] = None, + events_out_of_order_max_delay_in_seconds: Optional[pulumi.Input[int]] = None, + events_out_of_order_policy: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['JobIdentityArgs']] = None, + job_storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['JobJobStorageAccountArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + output_error_policy: Optional[pulumi.Input[str]] = None, + stream_analytics_cluster_id: Optional[pulumi.Input[str]] = None, + streaming_units: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if transformation_query is None and 'transformationQuery' in kwargs: + transformation_query = kwargs['transformationQuery'] + if transformation_query is None: + raise TypeError("Missing 'transformation_query' argument") + if compatibility_level is None and 'compatibilityLevel' in kwargs: + compatibility_level = kwargs['compatibilityLevel'] + if content_storage_policy is None and 'contentStoragePolicy' in kwargs: + content_storage_policy = kwargs['contentStoragePolicy'] + if data_locale is None and 'dataLocale' in kwargs: + data_locale = kwargs['dataLocale'] + if events_late_arrival_max_delay_in_seconds is None and 'eventsLateArrivalMaxDelayInSeconds' in kwargs: + events_late_arrival_max_delay_in_seconds = kwargs['eventsLateArrivalMaxDelayInSeconds'] + if events_out_of_order_max_delay_in_seconds is None and 'eventsOutOfOrderMaxDelayInSeconds' in kwargs: + events_out_of_order_max_delay_in_seconds = kwargs['eventsOutOfOrderMaxDelayInSeconds'] + if events_out_of_order_policy is None and 'eventsOutOfOrderPolicy' in kwargs: + events_out_of_order_policy = kwargs['eventsOutOfOrderPolicy'] + if job_storage_accounts is None and 'jobStorageAccounts' in kwargs: + job_storage_accounts = kwargs['jobStorageAccounts'] + if output_error_policy is None and 'outputErrorPolicy' in kwargs: + output_error_policy = kwargs['outputErrorPolicy'] + if stream_analytics_cluster_id is None and 'streamAnalyticsClusterId' in kwargs: + stream_analytics_cluster_id = kwargs['streamAnalyticsClusterId'] + if streaming_units is None and 'streamingUnits' in kwargs: + streaming_units = kwargs['streamingUnits'] + + _setter("resource_group_name", resource_group_name) + _setter("transformation_query", transformation_query) if compatibility_level is not None: - pulumi.set(__self__, "compatibility_level", compatibility_level) + _setter("compatibility_level", compatibility_level) if content_storage_policy is not None: - pulumi.set(__self__, "content_storage_policy", content_storage_policy) + _setter("content_storage_policy", content_storage_policy) if data_locale is not None: - pulumi.set(__self__, "data_locale", data_locale) + _setter("data_locale", data_locale) if events_late_arrival_max_delay_in_seconds is not None: - pulumi.set(__self__, "events_late_arrival_max_delay_in_seconds", events_late_arrival_max_delay_in_seconds) + _setter("events_late_arrival_max_delay_in_seconds", events_late_arrival_max_delay_in_seconds) if events_out_of_order_max_delay_in_seconds is not None: - pulumi.set(__self__, "events_out_of_order_max_delay_in_seconds", events_out_of_order_max_delay_in_seconds) + _setter("events_out_of_order_max_delay_in_seconds", events_out_of_order_max_delay_in_seconds) if events_out_of_order_policy is not None: - pulumi.set(__self__, "events_out_of_order_policy", events_out_of_order_policy) + _setter("events_out_of_order_policy", events_out_of_order_policy) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if job_storage_accounts is not None: - pulumi.set(__self__, "job_storage_accounts", job_storage_accounts) + _setter("job_storage_accounts", job_storage_accounts) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if output_error_policy is not None: - pulumi.set(__self__, "output_error_policy", output_error_policy) + _setter("output_error_policy", output_error_policy) if stream_analytics_cluster_id is not None: - pulumi.set(__self__, "stream_analytics_cluster_id", stream_analytics_cluster_id) + _setter("stream_analytics_cluster_id", stream_analytics_cluster_id) if streaming_units is not None: - pulumi.set(__self__, "streaming_units", streaming_units) + _setter("streaming_units", streaming_units) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="resourceGroupName") @@ -351,42 +422,113 @@ def __init__(__self__, *, > **NOTE:** `Edge` doesn't support `stream_analytics_cluster_id` and `streaming_units`. """ + _JobState._configure( + lambda key, value: pulumi.set(__self__, key, value), + compatibility_level=compatibility_level, + content_storage_policy=content_storage_policy, + data_locale=data_locale, + events_late_arrival_max_delay_in_seconds=events_late_arrival_max_delay_in_seconds, + events_out_of_order_max_delay_in_seconds=events_out_of_order_max_delay_in_seconds, + events_out_of_order_policy=events_out_of_order_policy, + identity=identity, + job_id=job_id, + job_storage_accounts=job_storage_accounts, + location=location, + name=name, + output_error_policy=output_error_policy, + resource_group_name=resource_group_name, + stream_analytics_cluster_id=stream_analytics_cluster_id, + streaming_units=streaming_units, + tags=tags, + transformation_query=transformation_query, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compatibility_level: Optional[pulumi.Input[str]] = None, + content_storage_policy: Optional[pulumi.Input[str]] = None, + data_locale: Optional[pulumi.Input[str]] = None, + events_late_arrival_max_delay_in_seconds: Optional[pulumi.Input[int]] = None, + events_out_of_order_max_delay_in_seconds: Optional[pulumi.Input[int]] = None, + events_out_of_order_policy: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['JobIdentityArgs']] = None, + job_id: Optional[pulumi.Input[str]] = None, + job_storage_accounts: Optional[pulumi.Input[Sequence[pulumi.Input['JobJobStorageAccountArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + output_error_policy: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + stream_analytics_cluster_id: Optional[pulumi.Input[str]] = None, + streaming_units: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + transformation_query: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compatibility_level is None and 'compatibilityLevel' in kwargs: + compatibility_level = kwargs['compatibilityLevel'] + if content_storage_policy is None and 'contentStoragePolicy' in kwargs: + content_storage_policy = kwargs['contentStoragePolicy'] + if data_locale is None and 'dataLocale' in kwargs: + data_locale = kwargs['dataLocale'] + if events_late_arrival_max_delay_in_seconds is None and 'eventsLateArrivalMaxDelayInSeconds' in kwargs: + events_late_arrival_max_delay_in_seconds = kwargs['eventsLateArrivalMaxDelayInSeconds'] + if events_out_of_order_max_delay_in_seconds is None and 'eventsOutOfOrderMaxDelayInSeconds' in kwargs: + events_out_of_order_max_delay_in_seconds = kwargs['eventsOutOfOrderMaxDelayInSeconds'] + if events_out_of_order_policy is None and 'eventsOutOfOrderPolicy' in kwargs: + events_out_of_order_policy = kwargs['eventsOutOfOrderPolicy'] + if job_id is None and 'jobId' in kwargs: + job_id = kwargs['jobId'] + if job_storage_accounts is None and 'jobStorageAccounts' in kwargs: + job_storage_accounts = kwargs['jobStorageAccounts'] + if output_error_policy is None and 'outputErrorPolicy' in kwargs: + output_error_policy = kwargs['outputErrorPolicy'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if stream_analytics_cluster_id is None and 'streamAnalyticsClusterId' in kwargs: + stream_analytics_cluster_id = kwargs['streamAnalyticsClusterId'] + if streaming_units is None and 'streamingUnits' in kwargs: + streaming_units = kwargs['streamingUnits'] + if transformation_query is None and 'transformationQuery' in kwargs: + transformation_query = kwargs['transformationQuery'] + if compatibility_level is not None: - pulumi.set(__self__, "compatibility_level", compatibility_level) + _setter("compatibility_level", compatibility_level) if content_storage_policy is not None: - pulumi.set(__self__, "content_storage_policy", content_storage_policy) + _setter("content_storage_policy", content_storage_policy) if data_locale is not None: - pulumi.set(__self__, "data_locale", data_locale) + _setter("data_locale", data_locale) if events_late_arrival_max_delay_in_seconds is not None: - pulumi.set(__self__, "events_late_arrival_max_delay_in_seconds", events_late_arrival_max_delay_in_seconds) + _setter("events_late_arrival_max_delay_in_seconds", events_late_arrival_max_delay_in_seconds) if events_out_of_order_max_delay_in_seconds is not None: - pulumi.set(__self__, "events_out_of_order_max_delay_in_seconds", events_out_of_order_max_delay_in_seconds) + _setter("events_out_of_order_max_delay_in_seconds", events_out_of_order_max_delay_in_seconds) if events_out_of_order_policy is not None: - pulumi.set(__self__, "events_out_of_order_policy", events_out_of_order_policy) + _setter("events_out_of_order_policy", events_out_of_order_policy) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if job_id is not None: - pulumi.set(__self__, "job_id", job_id) + _setter("job_id", job_id) if job_storage_accounts is not None: - pulumi.set(__self__, "job_storage_accounts", job_storage_accounts) + _setter("job_storage_accounts", job_storage_accounts) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if output_error_policy is not None: - pulumi.set(__self__, "output_error_policy", output_error_policy) + _setter("output_error_policy", output_error_policy) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if stream_analytics_cluster_id is not None: - pulumi.set(__self__, "stream_analytics_cluster_id", stream_analytics_cluster_id) + _setter("stream_analytics_cluster_id", stream_analytics_cluster_id) if streaming_units is not None: - pulumi.set(__self__, "streaming_units", streaming_units) + _setter("streaming_units", streaming_units) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if transformation_query is not None: - pulumi.set(__self__, "transformation_query", transformation_query) + _setter("transformation_query", transformation_query) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="compatibilityLevel") @@ -750,6 +892,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + JobArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -787,6 +933,11 @@ def _internal_init(__self__, __props__.__dict__["events_late_arrival_max_delay_in_seconds"] = events_late_arrival_max_delay_in_seconds __props__.__dict__["events_out_of_order_max_delay_in_seconds"] = events_out_of_order_max_delay_in_seconds __props__.__dict__["events_out_of_order_policy"] = events_out_of_order_policy + if identity is not None and not isinstance(identity, JobIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + JobIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["job_storage_accounts"] = job_storage_accounts __props__.__dict__["location"] = location diff --git a/sdk/python/pulumi_azure/streamanalytics/job_schedule.py b/sdk/python/pulumi_azure/streamanalytics/job_schedule.py index 343ed98eae..542ba57f1c 100644 --- a/sdk/python/pulumi_azure/streamanalytics/job_schedule.py +++ b/sdk/python/pulumi_azure/streamanalytics/job_schedule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['JobScheduleArgs', 'JobSchedule'] @@ -25,10 +25,35 @@ def __init__(__self__, *, :param pulumi.Input[str] stream_analytics_job_id: The ID of the Stream Analytics Job that should be scheduled or started. Changing this forces a new resource to be created. :param pulumi.Input[str] start_time: The time in ISO8601 format at which the Stream Analytics Job should be started e.g. `2022-04-01T00:00:00Z`. This property can only be specified if `start_mode` is set to `CustomTime` """ - pulumi.set(__self__, "start_mode", start_mode) - pulumi.set(__self__, "stream_analytics_job_id", stream_analytics_job_id) + JobScheduleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + start_mode=start_mode, + stream_analytics_job_id=stream_analytics_job_id, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + start_mode: Optional[pulumi.Input[str]] = None, + stream_analytics_job_id: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if start_mode is None and 'startMode' in kwargs: + start_mode = kwargs['startMode'] + if start_mode is None: + raise TypeError("Missing 'start_mode' argument") + if stream_analytics_job_id is None and 'streamAnalyticsJobId' in kwargs: + stream_analytics_job_id = kwargs['streamAnalyticsJobId'] + if stream_analytics_job_id is None: + raise TypeError("Missing 'stream_analytics_job_id' argument") + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("start_mode", start_mode) + _setter("stream_analytics_job_id", stream_analytics_job_id) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="startMode") @@ -85,14 +110,39 @@ def __init__(__self__, *, :param pulumi.Input[str] start_time: The time in ISO8601 format at which the Stream Analytics Job should be started e.g. `2022-04-01T00:00:00Z`. This property can only be specified if `start_mode` is set to `CustomTime` :param pulumi.Input[str] stream_analytics_job_id: The ID of the Stream Analytics Job that should be scheduled or started. Changing this forces a new resource to be created. """ + _JobScheduleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + last_output_time=last_output_time, + start_mode=start_mode, + start_time=start_time, + stream_analytics_job_id=stream_analytics_job_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + last_output_time: Optional[pulumi.Input[str]] = None, + start_mode: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + stream_analytics_job_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if last_output_time is None and 'lastOutputTime' in kwargs: + last_output_time = kwargs['lastOutputTime'] + if start_mode is None and 'startMode' in kwargs: + start_mode = kwargs['startMode'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if stream_analytics_job_id is None and 'streamAnalyticsJobId' in kwargs: + stream_analytics_job_id = kwargs['streamAnalyticsJobId'] + if last_output_time is not None: - pulumi.set(__self__, "last_output_time", last_output_time) + _setter("last_output_time", last_output_time) if start_mode is not None: - pulumi.set(__self__, "start_mode", start_mode) + _setter("start_mode", start_mode) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if stream_analytics_job_id is not None: - pulumi.set(__self__, "stream_analytics_job_id", stream_analytics_job_id) + _setter("stream_analytics_job_id", stream_analytics_job_id) @property @pulumi.getter(name="lastOutputTime") @@ -348,6 +398,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + JobScheduleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/streamanalytics/managed_private_endpoint.py b/sdk/python/pulumi_azure/streamanalytics/managed_private_endpoint.py index 8e5d194929..50400fcd91 100644 --- a/sdk/python/pulumi_azure/streamanalytics/managed_private_endpoint.py +++ b/sdk/python/pulumi_azure/streamanalytics/managed_private_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManagedPrivateEndpointArgs', 'ManagedPrivateEndpoint'] @@ -27,12 +27,47 @@ def __init__(__self__, *, :param pulumi.Input[str] target_resource_id: The ID of the Private Link Enabled Remote Resource which this Stream Analytics Private endpoint should be connected to. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name which should be used for this Stream Analytics Managed Private Endpoint. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "stream_analytics_cluster_name", stream_analytics_cluster_name) - pulumi.set(__self__, "subresource_name", subresource_name) - pulumi.set(__self__, "target_resource_id", target_resource_id) + ManagedPrivateEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + stream_analytics_cluster_name=stream_analytics_cluster_name, + subresource_name=subresource_name, + target_resource_id=target_resource_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + stream_analytics_cluster_name: Optional[pulumi.Input[str]] = None, + subresource_name: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if stream_analytics_cluster_name is None and 'streamAnalyticsClusterName' in kwargs: + stream_analytics_cluster_name = kwargs['streamAnalyticsClusterName'] + if stream_analytics_cluster_name is None: + raise TypeError("Missing 'stream_analytics_cluster_name' argument") + if subresource_name is None and 'subresourceName' in kwargs: + subresource_name = kwargs['subresourceName'] + if subresource_name is None: + raise TypeError("Missing 'subresource_name' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + + _setter("resource_group_name", resource_group_name) + _setter("stream_analytics_cluster_name", stream_analytics_cluster_name) + _setter("subresource_name", subresource_name) + _setter("target_resource_id", target_resource_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="resourceGroupName") @@ -111,16 +146,43 @@ def __init__(__self__, *, :param pulumi.Input[str] subresource_name: Specifies the sub resource name which the Stream Analytics Private Endpoint is able to connect to. Changing this forces a new resource to be created. :param pulumi.Input[str] target_resource_id: The ID of the Private Link Enabled Remote Resource which this Stream Analytics Private endpoint should be connected to. Changing this forces a new resource to be created. """ + _ManagedPrivateEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + stream_analytics_cluster_name=stream_analytics_cluster_name, + subresource_name=subresource_name, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + stream_analytics_cluster_name: Optional[pulumi.Input[str]] = None, + subresource_name: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if stream_analytics_cluster_name is None and 'streamAnalyticsClusterName' in kwargs: + stream_analytics_cluster_name = kwargs['streamAnalyticsClusterName'] + if subresource_name is None and 'subresourceName' in kwargs: + subresource_name = kwargs['subresourceName'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if stream_analytics_cluster_name is not None: - pulumi.set(__self__, "stream_analytics_cluster_name", stream_analytics_cluster_name) + _setter("stream_analytics_cluster_name", stream_analytics_cluster_name) if subresource_name is not None: - pulumi.set(__self__, "subresource_name", subresource_name) + _setter("subresource_name", subresource_name) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter @@ -290,6 +352,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedPrivateEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/streamanalytics/output_blob.py b/sdk/python/pulumi_azure/streamanalytics/output_blob.py index f1c0d68153..e2dd0eed95 100644 --- a/sdk/python/pulumi_azure/streamanalytics/output_blob.py +++ b/sdk/python/pulumi_azure/streamanalytics/output_blob.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,24 +45,97 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Stream Output. Changing this forces a new resource to be created. :param pulumi.Input[str] storage_account_key: The Access Key which should be used to connect to this Storage Account. """ - pulumi.set(__self__, "date_format", date_format) - pulumi.set(__self__, "path_pattern", path_pattern) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "serialization", serialization) - pulumi.set(__self__, "storage_account_name", storage_account_name) - pulumi.set(__self__, "storage_container_name", storage_container_name) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) - pulumi.set(__self__, "time_format", time_format) + OutputBlobArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + date_format=date_format, + path_pattern=path_pattern, + resource_group_name=resource_group_name, + serialization=serialization, + storage_account_name=storage_account_name, + storage_container_name=storage_container_name, + stream_analytics_job_name=stream_analytics_job_name, + time_format=time_format, + authentication_mode=authentication_mode, + batch_max_wait_time=batch_max_wait_time, + batch_min_rows=batch_min_rows, + name=name, + storage_account_key=storage_account_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + date_format: Optional[pulumi.Input[str]] = None, + path_pattern: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['OutputBlobSerializationArgs']] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_container_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + time_format: Optional[pulumi.Input[str]] = None, + authentication_mode: Optional[pulumi.Input[str]] = None, + batch_max_wait_time: Optional[pulumi.Input[str]] = None, + batch_min_rows: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if date_format is None and 'dateFormat' in kwargs: + date_format = kwargs['dateFormat'] + if date_format is None: + raise TypeError("Missing 'date_format' argument") + if path_pattern is None and 'pathPattern' in kwargs: + path_pattern = kwargs['pathPattern'] + if path_pattern is None: + raise TypeError("Missing 'path_pattern' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if serialization is None: + raise TypeError("Missing 'serialization' argument") + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if storage_container_name is None: + raise TypeError("Missing 'storage_container_name' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + if time_format is None and 'timeFormat' in kwargs: + time_format = kwargs['timeFormat'] + if time_format is None: + raise TypeError("Missing 'time_format' argument") + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if batch_max_wait_time is None and 'batchMaxWaitTime' in kwargs: + batch_max_wait_time = kwargs['batchMaxWaitTime'] + if batch_min_rows is None and 'batchMinRows' in kwargs: + batch_min_rows = kwargs['batchMinRows'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + + _setter("date_format", date_format) + _setter("path_pattern", path_pattern) + _setter("resource_group_name", resource_group_name) + _setter("serialization", serialization) + _setter("storage_account_name", storage_account_name) + _setter("storage_container_name", storage_container_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) + _setter("time_format", time_format) if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if batch_max_wait_time is not None: - pulumi.set(__self__, "batch_max_wait_time", batch_max_wait_time) + _setter("batch_max_wait_time", batch_max_wait_time) if batch_min_rows is not None: - pulumi.set(__self__, "batch_min_rows", batch_min_rows) + _setter("batch_min_rows", batch_min_rows) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) @property @pulumi.getter(name="dateFormat") @@ -253,32 +326,89 @@ def __init__(__self__, *, :param pulumi.Input[str] stream_analytics_job_name: The name of the Stream Analytics Job. Changing this forces a new resource to be created. :param pulumi.Input[str] time_format: The time format. Wherever `{time}` appears in `path_pattern`, the value of this property is used as the time format instead. """ + _OutputBlobState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_mode=authentication_mode, + batch_max_wait_time=batch_max_wait_time, + batch_min_rows=batch_min_rows, + date_format=date_format, + name=name, + path_pattern=path_pattern, + resource_group_name=resource_group_name, + serialization=serialization, + storage_account_key=storage_account_key, + storage_account_name=storage_account_name, + storage_container_name=storage_container_name, + stream_analytics_job_name=stream_analytics_job_name, + time_format=time_format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_mode: Optional[pulumi.Input[str]] = None, + batch_max_wait_time: Optional[pulumi.Input[str]] = None, + batch_min_rows: Optional[pulumi.Input[int]] = None, + date_format: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + path_pattern: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['OutputBlobSerializationArgs']] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_container_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + time_format: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if batch_max_wait_time is None and 'batchMaxWaitTime' in kwargs: + batch_max_wait_time = kwargs['batchMaxWaitTime'] + if batch_min_rows is None and 'batchMinRows' in kwargs: + batch_min_rows = kwargs['batchMinRows'] + if date_format is None and 'dateFormat' in kwargs: + date_format = kwargs['dateFormat'] + if path_pattern is None and 'pathPattern' in kwargs: + path_pattern = kwargs['pathPattern'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if time_format is None and 'timeFormat' in kwargs: + time_format = kwargs['timeFormat'] + if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if batch_max_wait_time is not None: - pulumi.set(__self__, "batch_max_wait_time", batch_max_wait_time) + _setter("batch_max_wait_time", batch_max_wait_time) if batch_min_rows is not None: - pulumi.set(__self__, "batch_min_rows", batch_min_rows) + _setter("batch_min_rows", batch_min_rows) if date_format is not None: - pulumi.set(__self__, "date_format", date_format) + _setter("date_format", date_format) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if path_pattern is not None: - pulumi.set(__self__, "path_pattern", path_pattern) + _setter("path_pattern", path_pattern) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if serialization is not None: - pulumi.set(__self__, "serialization", serialization) + _setter("serialization", serialization) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_container_name is not None: - pulumi.set(__self__, "storage_container_name", storage_container_name) + _setter("storage_container_name", storage_container_name) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) if time_format is not None: - pulumi.set(__self__, "time_format", time_format) + _setter("time_format", time_format) @property @pulumi.getter(name="authenticationMode") @@ -576,6 +706,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OutputBlobArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -616,6 +750,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if serialization is not None and not isinstance(serialization, OutputBlobSerializationArgs): + serialization = serialization or {} + def _setter(key, value): + serialization[key] = value + OutputBlobSerializationArgs._configure(_setter, **serialization) if serialization is None and not opts.urn: raise TypeError("Missing required property 'serialization'") __props__.__dict__["serialization"] = serialization diff --git a/sdk/python/pulumi_azure/streamanalytics/output_cosmosdb.py b/sdk/python/pulumi_azure/streamanalytics/output_cosmosdb.py index abc113f8b0..3c318a88f1 100644 --- a/sdk/python/pulumi_azure/streamanalytics/output_cosmosdb.py +++ b/sdk/python/pulumi_azure/streamanalytics/output_cosmosdb.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['OutputCosmosdbArgs', 'OutputCosmosdb'] @@ -31,16 +31,59 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Stream Analytics Output. Changing this forces a new resource to be created. :param pulumi.Input[str] partition_key: The name of the field in output events used to specify the key for partitioning output across collections. If `container_name` contains `{partition}` token, this property is required to be specified. """ - pulumi.set(__self__, "container_name", container_name) - pulumi.set(__self__, "cosmosdb_account_key", cosmosdb_account_key) - pulumi.set(__self__, "cosmosdb_sql_database_id", cosmosdb_sql_database_id) - pulumi.set(__self__, "stream_analytics_job_id", stream_analytics_job_id) + OutputCosmosdbArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + cosmosdb_account_key=cosmosdb_account_key, + cosmosdb_sql_database_id=cosmosdb_sql_database_id, + stream_analytics_job_id=stream_analytics_job_id, + document_id=document_id, + name=name, + partition_key=partition_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[pulumi.Input[str]] = None, + cosmosdb_account_key: Optional[pulumi.Input[str]] = None, + cosmosdb_sql_database_id: Optional[pulumi.Input[str]] = None, + stream_analytics_job_id: Optional[pulumi.Input[str]] = None, + document_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if container_name is None: + raise TypeError("Missing 'container_name' argument") + if cosmosdb_account_key is None and 'cosmosdbAccountKey' in kwargs: + cosmosdb_account_key = kwargs['cosmosdbAccountKey'] + if cosmosdb_account_key is None: + raise TypeError("Missing 'cosmosdb_account_key' argument") + if cosmosdb_sql_database_id is None and 'cosmosdbSqlDatabaseId' in kwargs: + cosmosdb_sql_database_id = kwargs['cosmosdbSqlDatabaseId'] + if cosmosdb_sql_database_id is None: + raise TypeError("Missing 'cosmosdb_sql_database_id' argument") + if stream_analytics_job_id is None and 'streamAnalyticsJobId' in kwargs: + stream_analytics_job_id = kwargs['streamAnalyticsJobId'] + if stream_analytics_job_id is None: + raise TypeError("Missing 'stream_analytics_job_id' argument") + if document_id is None and 'documentId' in kwargs: + document_id = kwargs['documentId'] + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + + _setter("container_name", container_name) + _setter("cosmosdb_account_key", cosmosdb_account_key) + _setter("cosmosdb_sql_database_id", cosmosdb_sql_database_id) + _setter("stream_analytics_job_id", stream_analytics_job_id) if document_id is not None: - pulumi.set(__self__, "document_id", document_id) + _setter("document_id", document_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key is not None: - pulumi.set(__self__, "partition_key", partition_key) + _setter("partition_key", partition_key) @property @pulumi.getter(name="containerName") @@ -147,20 +190,55 @@ def __init__(__self__, *, :param pulumi.Input[str] partition_key: The name of the field in output events used to specify the key for partitioning output across collections. If `container_name` contains `{partition}` token, this property is required to be specified. :param pulumi.Input[str] stream_analytics_job_id: The ID of the Stream Analytics Job. Changing this forces a new resource to be created. """ + _OutputCosmosdbState._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_name=container_name, + cosmosdb_account_key=cosmosdb_account_key, + cosmosdb_sql_database_id=cosmosdb_sql_database_id, + document_id=document_id, + name=name, + partition_key=partition_key, + stream_analytics_job_id=stream_analytics_job_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_name: Optional[pulumi.Input[str]] = None, + cosmosdb_account_key: Optional[pulumi.Input[str]] = None, + cosmosdb_sql_database_id: Optional[pulumi.Input[str]] = None, + document_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + stream_analytics_job_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_name is None and 'containerName' in kwargs: + container_name = kwargs['containerName'] + if cosmosdb_account_key is None and 'cosmosdbAccountKey' in kwargs: + cosmosdb_account_key = kwargs['cosmosdbAccountKey'] + if cosmosdb_sql_database_id is None and 'cosmosdbSqlDatabaseId' in kwargs: + cosmosdb_sql_database_id = kwargs['cosmosdbSqlDatabaseId'] + if document_id is None and 'documentId' in kwargs: + document_id = kwargs['documentId'] + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + if stream_analytics_job_id is None and 'streamAnalyticsJobId' in kwargs: + stream_analytics_job_id = kwargs['streamAnalyticsJobId'] + if container_name is not None: - pulumi.set(__self__, "container_name", container_name) + _setter("container_name", container_name) if cosmosdb_account_key is not None: - pulumi.set(__self__, "cosmosdb_account_key", cosmosdb_account_key) + _setter("cosmosdb_account_key", cosmosdb_account_key) if cosmosdb_sql_database_id is not None: - pulumi.set(__self__, "cosmosdb_sql_database_id", cosmosdb_sql_database_id) + _setter("cosmosdb_sql_database_id", cosmosdb_sql_database_id) if document_id is not None: - pulumi.set(__self__, "document_id", document_id) + _setter("document_id", document_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key is not None: - pulumi.set(__self__, "partition_key", partition_key) + _setter("partition_key", partition_key) if stream_analytics_job_id is not None: - pulumi.set(__self__, "stream_analytics_job_id", stream_analytics_job_id) + _setter("stream_analytics_job_id", stream_analytics_job_id) @property @pulumi.getter(name="containerName") @@ -388,6 +466,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OutputCosmosdbArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/streamanalytics/output_event_hub.py b/sdk/python/pulumi_azure/streamanalytics/output_event_hub.py index f3046fd348..f9647f4255 100644 --- a/sdk/python/pulumi_azure/streamanalytics/output_event_hub.py +++ b/sdk/python/pulumi_azure/streamanalytics/output_event_hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,23 +41,82 @@ def __init__(__self__, *, :param pulumi.Input[str] shared_access_policy_key: The shared access policy key for the specified shared access policy. Required when `authentication_mode` is set to `ConnectionString`. :param pulumi.Input[str] shared_access_policy_name: The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required when `authentication_mode` is set to `ConnectionString`. """ - pulumi.set(__self__, "eventhub_name", eventhub_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "serialization", serialization) - pulumi.set(__self__, "servicebus_namespace", servicebus_namespace) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + OutputEventHubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_name=eventhub_name, + resource_group_name=resource_group_name, + serialization=serialization, + servicebus_namespace=servicebus_namespace, + stream_analytics_job_name=stream_analytics_job_name, + authentication_mode=authentication_mode, + name=name, + partition_key=partition_key, + property_columns=property_columns, + shared_access_policy_key=shared_access_policy_key, + shared_access_policy_name=shared_access_policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['OutputEventHubSerializationArgs']] = None, + servicebus_namespace: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + authentication_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + property_columns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + shared_access_policy_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_name is None: + raise TypeError("Missing 'eventhub_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if serialization is None: + raise TypeError("Missing 'serialization' argument") + if servicebus_namespace is None and 'servicebusNamespace' in kwargs: + servicebus_namespace = kwargs['servicebusNamespace'] + if servicebus_namespace is None: + raise TypeError("Missing 'servicebus_namespace' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + if property_columns is None and 'propertyColumns' in kwargs: + property_columns = kwargs['propertyColumns'] + if shared_access_policy_key is None and 'sharedAccessPolicyKey' in kwargs: + shared_access_policy_key = kwargs['sharedAccessPolicyKey'] + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + + _setter("eventhub_name", eventhub_name) + _setter("resource_group_name", resource_group_name) + _setter("serialization", serialization) + _setter("servicebus_namespace", servicebus_namespace) + _setter("stream_analytics_job_name", stream_analytics_job_name) if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key is not None: - pulumi.set(__self__, "partition_key", partition_key) + _setter("partition_key", partition_key) if property_columns is not None: - pulumi.set(__self__, "property_columns", property_columns) + _setter("property_columns", property_columns) if shared_access_policy_key is not None: - pulumi.set(__self__, "shared_access_policy_key", shared_access_policy_key) + _setter("shared_access_policy_key", shared_access_policy_key) if shared_access_policy_name is not None: - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) + _setter("shared_access_policy_name", shared_access_policy_name) @property @pulumi.getter(name="eventhubName") @@ -220,28 +279,77 @@ def __init__(__self__, *, :param pulumi.Input[str] shared_access_policy_name: The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required when `authentication_mode` is set to `ConnectionString`. :param pulumi.Input[str] stream_analytics_job_name: The name of the Stream Analytics Job. Changing this forces a new resource to be created. """ + _OutputEventHubState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_mode=authentication_mode, + eventhub_name=eventhub_name, + name=name, + partition_key=partition_key, + property_columns=property_columns, + resource_group_name=resource_group_name, + serialization=serialization, + servicebus_namespace=servicebus_namespace, + shared_access_policy_key=shared_access_policy_key, + shared_access_policy_name=shared_access_policy_name, + stream_analytics_job_name=stream_analytics_job_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_mode: Optional[pulumi.Input[str]] = None, + eventhub_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + property_columns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['OutputEventHubSerializationArgs']] = None, + servicebus_namespace: Optional[pulumi.Input[str]] = None, + shared_access_policy_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + if property_columns is None and 'propertyColumns' in kwargs: + property_columns = kwargs['propertyColumns'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if servicebus_namespace is None and 'servicebusNamespace' in kwargs: + servicebus_namespace = kwargs['servicebusNamespace'] + if shared_access_policy_key is None and 'sharedAccessPolicyKey' in kwargs: + shared_access_policy_key = kwargs['sharedAccessPolicyKey'] + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key is not None: - pulumi.set(__self__, "partition_key", partition_key) + _setter("partition_key", partition_key) if property_columns is not None: - pulumi.set(__self__, "property_columns", property_columns) + _setter("property_columns", property_columns) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if serialization is not None: - pulumi.set(__self__, "serialization", serialization) + _setter("serialization", serialization) if servicebus_namespace is not None: - pulumi.set(__self__, "servicebus_namespace", servicebus_namespace) + _setter("servicebus_namespace", servicebus_namespace) if shared_access_policy_key is not None: - pulumi.set(__self__, "shared_access_policy_key", shared_access_policy_key) + _setter("shared_access_policy_key", shared_access_policy_key) if shared_access_policy_name is not None: - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) + _setter("shared_access_policy_name", shared_access_policy_name) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) @property @pulumi.getter(name="authenticationMode") @@ -507,6 +615,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OutputEventHubArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -542,6 +654,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if serialization is not None and not isinstance(serialization, OutputEventHubSerializationArgs): + serialization = serialization or {} + def _setter(key, value): + serialization[key] = value + OutputEventHubSerializationArgs._configure(_setter, **serialization) if serialization is None and not opts.urn: raise TypeError("Missing required property 'serialization'") __props__.__dict__["serialization"] = serialization diff --git a/sdk/python/pulumi_azure/streamanalytics/output_function.py b/sdk/python/pulumi_azure/streamanalytics/output_function.py index 946b839a5b..fa837908b5 100644 --- a/sdk/python/pulumi_azure/streamanalytics/output_function.py +++ b/sdk/python/pulumi_azure/streamanalytics/output_function.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['OutputFunctionArgs', 'OutputFunction'] @@ -33,17 +33,66 @@ def __init__(__self__, *, :param pulumi.Input[int] batch_max_in_bytes: The maximum batch size in bytes that's sent to the function. Defaults to `262144` (256 kB). :param pulumi.Input[str] name: The name which should be used for this Stream Analytics Output. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "api_key", api_key) - pulumi.set(__self__, "function_app", function_app) - pulumi.set(__self__, "function_name", function_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + OutputFunctionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_key=api_key, + function_app=function_app, + function_name=function_name, + resource_group_name=resource_group_name, + stream_analytics_job_name=stream_analytics_job_name, + batch_max_count=batch_max_count, + batch_max_in_bytes=batch_max_in_bytes, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_key: Optional[pulumi.Input[str]] = None, + function_app: Optional[pulumi.Input[str]] = None, + function_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + batch_max_count: Optional[pulumi.Input[int]] = None, + batch_max_in_bytes: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_key is None and 'apiKey' in kwargs: + api_key = kwargs['apiKey'] + if api_key is None: + raise TypeError("Missing 'api_key' argument") + if function_app is None and 'functionApp' in kwargs: + function_app = kwargs['functionApp'] + if function_app is None: + raise TypeError("Missing 'function_app' argument") + if function_name is None and 'functionName' in kwargs: + function_name = kwargs['functionName'] + if function_name is None: + raise TypeError("Missing 'function_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + if batch_max_count is None and 'batchMaxCount' in kwargs: + batch_max_count = kwargs['batchMaxCount'] + if batch_max_in_bytes is None and 'batchMaxInBytes' in kwargs: + batch_max_in_bytes = kwargs['batchMaxInBytes'] + + _setter("api_key", api_key) + _setter("function_app", function_app) + _setter("function_name", function_name) + _setter("resource_group_name", resource_group_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) if batch_max_count is not None: - pulumi.set(__self__, "batch_max_count", batch_max_count) + _setter("batch_max_count", batch_max_count) if batch_max_in_bytes is not None: - pulumi.set(__self__, "batch_max_in_bytes", batch_max_in_bytes) + _setter("batch_max_in_bytes", batch_max_in_bytes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="apiKey") @@ -164,22 +213,61 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the Resource Group where the Stream Analytics Output should exist. Changing this forces a new resource to be created. :param pulumi.Input[str] stream_analytics_job_name: The name of the Stream Analytics Job. Changing this forces a new resource to be created. """ + _OutputFunctionState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_key=api_key, + batch_max_count=batch_max_count, + batch_max_in_bytes=batch_max_in_bytes, + function_app=function_app, + function_name=function_name, + name=name, + resource_group_name=resource_group_name, + stream_analytics_job_name=stream_analytics_job_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_key: Optional[pulumi.Input[str]] = None, + batch_max_count: Optional[pulumi.Input[int]] = None, + batch_max_in_bytes: Optional[pulumi.Input[int]] = None, + function_app: Optional[pulumi.Input[str]] = None, + function_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_key is None and 'apiKey' in kwargs: + api_key = kwargs['apiKey'] + if batch_max_count is None and 'batchMaxCount' in kwargs: + batch_max_count = kwargs['batchMaxCount'] + if batch_max_in_bytes is None and 'batchMaxInBytes' in kwargs: + batch_max_in_bytes = kwargs['batchMaxInBytes'] + if function_app is None and 'functionApp' in kwargs: + function_app = kwargs['functionApp'] + if function_name is None and 'functionName' in kwargs: + function_name = kwargs['functionName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if api_key is not None: - pulumi.set(__self__, "api_key", api_key) + _setter("api_key", api_key) if batch_max_count is not None: - pulumi.set(__self__, "batch_max_count", batch_max_count) + _setter("batch_max_count", batch_max_count) if batch_max_in_bytes is not None: - pulumi.set(__self__, "batch_max_in_bytes", batch_max_in_bytes) + _setter("batch_max_in_bytes", batch_max_in_bytes) if function_app is not None: - pulumi.set(__self__, "function_app", function_app) + _setter("function_app", function_app) if function_name is not None: - pulumi.set(__self__, "function_name", function_name) + _setter("function_name", function_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) @property @pulumi.getter(name="apiKey") @@ -431,6 +519,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OutputFunctionArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/streamanalytics/output_mssql.py b/sdk/python/pulumi_azure/streamanalytics/output_mssql.py index 47c014e68d..a2c0298f9f 100644 --- a/sdk/python/pulumi_azure/streamanalytics/output_mssql.py +++ b/sdk/python/pulumi_azure/streamanalytics/output_mssql.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['OutputMssqlArgs', 'OutputMssql'] @@ -39,23 +39,74 @@ def __init__(__self__, *, :param pulumi.Input[str] password: Password used together with username, to login to the Microsoft SQL Server. Required if `authentication_mode` is `ConnectionString`. :param pulumi.Input[str] user: Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created. Required if `authentication_mode` is `ConnectionString`. """ - pulumi.set(__self__, "database", database) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) - pulumi.set(__self__, "table", table) + OutputMssqlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database=database, + resource_group_name=resource_group_name, + server=server, + stream_analytics_job_name=stream_analytics_job_name, + table=table, + authentication_mode=authentication_mode, + max_batch_count=max_batch_count, + max_writer_count=max_writer_count, + name=name, + password=password, + user=user, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + table: Optional[pulumi.Input[str]] = None, + authentication_mode: Optional[pulumi.Input[str]] = None, + max_batch_count: Optional[pulumi.Input[float]] = None, + max_writer_count: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + user: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database is None: + raise TypeError("Missing 'database' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + if table is None: + raise TypeError("Missing 'table' argument") + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if max_batch_count is None and 'maxBatchCount' in kwargs: + max_batch_count = kwargs['maxBatchCount'] + if max_writer_count is None and 'maxWriterCount' in kwargs: + max_writer_count = kwargs['maxWriterCount'] + + _setter("database", database) + _setter("resource_group_name", resource_group_name) + _setter("server", server) + _setter("stream_analytics_job_name", stream_analytics_job_name) + _setter("table", table) if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if max_batch_count is not None: - pulumi.set(__self__, "max_batch_count", max_batch_count) + _setter("max_batch_count", max_batch_count) if max_writer_count is not None: - pulumi.set(__self__, "max_writer_count", max_writer_count) + _setter("max_writer_count", max_writer_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if user is not None: - pulumi.set(__self__, "user", user) + _setter("user", user) @property @pulumi.getter @@ -218,28 +269,69 @@ def __init__(__self__, *, :param pulumi.Input[str] table: Table in the database that the output points to. Changing this forces a new resource to be created. :param pulumi.Input[str] user: Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created. Required if `authentication_mode` is `ConnectionString`. """ + _OutputMssqlState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_mode=authentication_mode, + database=database, + max_batch_count=max_batch_count, + max_writer_count=max_writer_count, + name=name, + password=password, + resource_group_name=resource_group_name, + server=server, + stream_analytics_job_name=stream_analytics_job_name, + table=table, + user=user, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_mode: Optional[pulumi.Input[str]] = None, + database: Optional[pulumi.Input[str]] = None, + max_batch_count: Optional[pulumi.Input[float]] = None, + max_writer_count: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + table: Optional[pulumi.Input[str]] = None, + user: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if max_batch_count is None and 'maxBatchCount' in kwargs: + max_batch_count = kwargs['maxBatchCount'] + if max_writer_count is None and 'maxWriterCount' in kwargs: + max_writer_count = kwargs['maxWriterCount'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if database is not None: - pulumi.set(__self__, "database", database) + _setter("database", database) if max_batch_count is not None: - pulumi.set(__self__, "max_batch_count", max_batch_count) + _setter("max_batch_count", max_batch_count) if max_writer_count is not None: - pulumi.set(__self__, "max_writer_count", max_writer_count) + _setter("max_writer_count", max_writer_count) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server is not None: - pulumi.set(__self__, "server", server) + _setter("server", server) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) if table is not None: - pulumi.set(__self__, "table", table) + _setter("table", table) if user is not None: - pulumi.set(__self__, "user", user) + _setter("user", user) @property @pulumi.getter(name="authenticationMode") @@ -509,6 +601,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OutputMssqlArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/streamanalytics/output_powerbi.py b/sdk/python/pulumi_azure/streamanalytics/output_powerbi.py index faddd7e585..d2285c4f99 100644 --- a/sdk/python/pulumi_azure/streamanalytics/output_powerbi.py +++ b/sdk/python/pulumi_azure/streamanalytics/output_powerbi.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['OutputPowerbiArgs', 'OutputPowerbi'] @@ -33,17 +33,62 @@ def __init__(__self__, *, :param pulumi.Input[str] token_user_display_name: The user display name of the user that was used to obtain the refresh token. :param pulumi.Input[str] token_user_principal_name: The user principal name (UPN) of the user that was used to obtain the refresh token. """ - pulumi.set(__self__, "dataset", dataset) - pulumi.set(__self__, "group_id", group_id) - pulumi.set(__self__, "group_name", group_name) - pulumi.set(__self__, "stream_analytics_job_id", stream_analytics_job_id) - pulumi.set(__self__, "table", table) + OutputPowerbiArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dataset=dataset, + group_id=group_id, + group_name=group_name, + stream_analytics_job_id=stream_analytics_job_id, + table=table, + name=name, + token_user_display_name=token_user_display_name, + token_user_principal_name=token_user_principal_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dataset: Optional[pulumi.Input[str]] = None, + group_id: Optional[pulumi.Input[str]] = None, + group_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_id: Optional[pulumi.Input[str]] = None, + table: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + token_user_display_name: Optional[pulumi.Input[str]] = None, + token_user_principal_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dataset is None: + raise TypeError("Missing 'dataset' argument") + if group_id is None and 'groupId' in kwargs: + group_id = kwargs['groupId'] + if group_id is None: + raise TypeError("Missing 'group_id' argument") + if group_name is None and 'groupName' in kwargs: + group_name = kwargs['groupName'] + if group_name is None: + raise TypeError("Missing 'group_name' argument") + if stream_analytics_job_id is None and 'streamAnalyticsJobId' in kwargs: + stream_analytics_job_id = kwargs['streamAnalyticsJobId'] + if stream_analytics_job_id is None: + raise TypeError("Missing 'stream_analytics_job_id' argument") + if table is None: + raise TypeError("Missing 'table' argument") + if token_user_display_name is None and 'tokenUserDisplayName' in kwargs: + token_user_display_name = kwargs['tokenUserDisplayName'] + if token_user_principal_name is None and 'tokenUserPrincipalName' in kwargs: + token_user_principal_name = kwargs['tokenUserPrincipalName'] + + _setter("dataset", dataset) + _setter("group_id", group_id) + _setter("group_name", group_name) + _setter("stream_analytics_job_id", stream_analytics_job_id) + _setter("table", table) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if token_user_display_name is not None: - pulumi.set(__self__, "token_user_display_name", token_user_display_name) + _setter("token_user_display_name", token_user_display_name) if token_user_principal_name is not None: - pulumi.set(__self__, "token_user_principal_name", token_user_principal_name) + _setter("token_user_principal_name", token_user_principal_name) @property @pulumi.getter @@ -164,22 +209,57 @@ def __init__(__self__, *, :param pulumi.Input[str] token_user_display_name: The user display name of the user that was used to obtain the refresh token. :param pulumi.Input[str] token_user_principal_name: The user principal name (UPN) of the user that was used to obtain the refresh token. """ + _OutputPowerbiState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dataset=dataset, + group_id=group_id, + group_name=group_name, + name=name, + stream_analytics_job_id=stream_analytics_job_id, + table=table, + token_user_display_name=token_user_display_name, + token_user_principal_name=token_user_principal_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dataset: Optional[pulumi.Input[str]] = None, + group_id: Optional[pulumi.Input[str]] = None, + group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_id: Optional[pulumi.Input[str]] = None, + table: Optional[pulumi.Input[str]] = None, + token_user_display_name: Optional[pulumi.Input[str]] = None, + token_user_principal_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if group_id is None and 'groupId' in kwargs: + group_id = kwargs['groupId'] + if group_name is None and 'groupName' in kwargs: + group_name = kwargs['groupName'] + if stream_analytics_job_id is None and 'streamAnalyticsJobId' in kwargs: + stream_analytics_job_id = kwargs['streamAnalyticsJobId'] + if token_user_display_name is None and 'tokenUserDisplayName' in kwargs: + token_user_display_name = kwargs['tokenUserDisplayName'] + if token_user_principal_name is None and 'tokenUserPrincipalName' in kwargs: + token_user_principal_name = kwargs['tokenUserPrincipalName'] + if dataset is not None: - pulumi.set(__self__, "dataset", dataset) + _setter("dataset", dataset) if group_id is not None: - pulumi.set(__self__, "group_id", group_id) + _setter("group_id", group_id) if group_name is not None: - pulumi.set(__self__, "group_name", group_name) + _setter("group_name", group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if stream_analytics_job_id is not None: - pulumi.set(__self__, "stream_analytics_job_id", stream_analytics_job_id) + _setter("stream_analytics_job_id", stream_analytics_job_id) if table is not None: - pulumi.set(__self__, "table", table) + _setter("table", table) if token_user_display_name is not None: - pulumi.set(__self__, "token_user_display_name", token_user_display_name) + _setter("token_user_display_name", token_user_display_name) if token_user_principal_name is not None: - pulumi.set(__self__, "token_user_principal_name", token_user_principal_name) + _setter("token_user_principal_name", token_user_principal_name) @property @pulumi.getter @@ -375,6 +455,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OutputPowerbiArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/streamanalytics/output_service_bus_queue.py b/sdk/python/pulumi_azure/streamanalytics/output_service_bus_queue.py index c2770ddcfa..617e3d6d70 100644 --- a/sdk/python/pulumi_azure/streamanalytics/output_service_bus_queue.py +++ b/sdk/python/pulumi_azure/streamanalytics/output_service_bus_queue.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,23 +43,82 @@ def __init__(__self__, *, > **NOTE:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. """ - pulumi.set(__self__, "queue_name", queue_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "serialization", serialization) - pulumi.set(__self__, "servicebus_namespace", servicebus_namespace) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + OutputServiceBusQueueArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + queue_name=queue_name, + resource_group_name=resource_group_name, + serialization=serialization, + servicebus_namespace=servicebus_namespace, + stream_analytics_job_name=stream_analytics_job_name, + authentication_mode=authentication_mode, + name=name, + property_columns=property_columns, + shared_access_policy_key=shared_access_policy_key, + shared_access_policy_name=shared_access_policy_name, + system_property_columns=system_property_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + queue_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['OutputServiceBusQueueSerializationArgs']] = None, + servicebus_namespace: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + authentication_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + property_columns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + shared_access_policy_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + system_property_columns: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if queue_name is None and 'queueName' in kwargs: + queue_name = kwargs['queueName'] + if queue_name is None: + raise TypeError("Missing 'queue_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if serialization is None: + raise TypeError("Missing 'serialization' argument") + if servicebus_namespace is None and 'servicebusNamespace' in kwargs: + servicebus_namespace = kwargs['servicebusNamespace'] + if servicebus_namespace is None: + raise TypeError("Missing 'servicebus_namespace' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if property_columns is None and 'propertyColumns' in kwargs: + property_columns = kwargs['propertyColumns'] + if shared_access_policy_key is None and 'sharedAccessPolicyKey' in kwargs: + shared_access_policy_key = kwargs['sharedAccessPolicyKey'] + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + if system_property_columns is None and 'systemPropertyColumns' in kwargs: + system_property_columns = kwargs['systemPropertyColumns'] + + _setter("queue_name", queue_name) + _setter("resource_group_name", resource_group_name) + _setter("serialization", serialization) + _setter("servicebus_namespace", servicebus_namespace) + _setter("stream_analytics_job_name", stream_analytics_job_name) if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if property_columns is not None: - pulumi.set(__self__, "property_columns", property_columns) + _setter("property_columns", property_columns) if shared_access_policy_key is not None: - pulumi.set(__self__, "shared_access_policy_key", shared_access_policy_key) + _setter("shared_access_policy_key", shared_access_policy_key) if shared_access_policy_name is not None: - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) + _setter("shared_access_policy_name", shared_access_policy_name) if system_property_columns is not None: - pulumi.set(__self__, "system_property_columns", system_property_columns) + _setter("system_property_columns", system_property_columns) @property @pulumi.getter(name="queueName") @@ -226,28 +285,77 @@ def __init__(__self__, *, > **NOTE:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. """ + _OutputServiceBusQueueState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_mode=authentication_mode, + name=name, + property_columns=property_columns, + queue_name=queue_name, + resource_group_name=resource_group_name, + serialization=serialization, + servicebus_namespace=servicebus_namespace, + shared_access_policy_key=shared_access_policy_key, + shared_access_policy_name=shared_access_policy_name, + stream_analytics_job_name=stream_analytics_job_name, + system_property_columns=system_property_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + property_columns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + queue_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['OutputServiceBusQueueSerializationArgs']] = None, + servicebus_namespace: Optional[pulumi.Input[str]] = None, + shared_access_policy_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + system_property_columns: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if property_columns is None and 'propertyColumns' in kwargs: + property_columns = kwargs['propertyColumns'] + if queue_name is None and 'queueName' in kwargs: + queue_name = kwargs['queueName'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if servicebus_namespace is None and 'servicebusNamespace' in kwargs: + servicebus_namespace = kwargs['servicebusNamespace'] + if shared_access_policy_key is None and 'sharedAccessPolicyKey' in kwargs: + shared_access_policy_key = kwargs['sharedAccessPolicyKey'] + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if system_property_columns is None and 'systemPropertyColumns' in kwargs: + system_property_columns = kwargs['systemPropertyColumns'] + if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if property_columns is not None: - pulumi.set(__self__, "property_columns", property_columns) + _setter("property_columns", property_columns) if queue_name is not None: - pulumi.set(__self__, "queue_name", queue_name) + _setter("queue_name", queue_name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if serialization is not None: - pulumi.set(__self__, "serialization", serialization) + _setter("serialization", serialization) if servicebus_namespace is not None: - pulumi.set(__self__, "servicebus_namespace", servicebus_namespace) + _setter("servicebus_namespace", servicebus_namespace) if shared_access_policy_key is not None: - pulumi.set(__self__, "shared_access_policy_key", shared_access_policy_key) + _setter("shared_access_policy_key", shared_access_policy_key) if shared_access_policy_name is not None: - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) + _setter("shared_access_policy_name", shared_access_policy_name) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) if system_property_columns is not None: - pulumi.set(__self__, "system_property_columns", system_property_columns) + _setter("system_property_columns", system_property_columns) @property @pulumi.getter(name="authenticationMode") @@ -513,6 +621,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OutputServiceBusQueueArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -547,6 +659,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if serialization is not None and not isinstance(serialization, OutputServiceBusQueueSerializationArgs): + serialization = serialization or {} + def _setter(key, value): + serialization[key] = value + OutputServiceBusQueueSerializationArgs._configure(_setter, **serialization) if serialization is None and not opts.urn: raise TypeError("Missing required property 'serialization'") __props__.__dict__["serialization"] = serialization diff --git a/sdk/python/pulumi_azure/streamanalytics/output_servicebus_topic.py b/sdk/python/pulumi_azure/streamanalytics/output_servicebus_topic.py index 06c8f71d89..d0bc6769b4 100644 --- a/sdk/python/pulumi_azure/streamanalytics/output_servicebus_topic.py +++ b/sdk/python/pulumi_azure/streamanalytics/output_servicebus_topic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,23 +43,82 @@ def __init__(__self__, *, > **NOTE:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "serialization", serialization) - pulumi.set(__self__, "servicebus_namespace", servicebus_namespace) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) - pulumi.set(__self__, "topic_name", topic_name) + OutputServicebusTopicArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + serialization=serialization, + servicebus_namespace=servicebus_namespace, + stream_analytics_job_name=stream_analytics_job_name, + topic_name=topic_name, + authentication_mode=authentication_mode, + name=name, + property_columns=property_columns, + shared_access_policy_key=shared_access_policy_key, + shared_access_policy_name=shared_access_policy_name, + system_property_columns=system_property_columns, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['OutputServicebusTopicSerializationArgs']] = None, + servicebus_namespace: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + topic_name: Optional[pulumi.Input[str]] = None, + authentication_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + property_columns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + shared_access_policy_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + system_property_columns: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if serialization is None: + raise TypeError("Missing 'serialization' argument") + if servicebus_namespace is None and 'servicebusNamespace' in kwargs: + servicebus_namespace = kwargs['servicebusNamespace'] + if servicebus_namespace is None: + raise TypeError("Missing 'servicebus_namespace' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + if topic_name is None and 'topicName' in kwargs: + topic_name = kwargs['topicName'] + if topic_name is None: + raise TypeError("Missing 'topic_name' argument") + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if property_columns is None and 'propertyColumns' in kwargs: + property_columns = kwargs['propertyColumns'] + if shared_access_policy_key is None and 'sharedAccessPolicyKey' in kwargs: + shared_access_policy_key = kwargs['sharedAccessPolicyKey'] + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + if system_property_columns is None and 'systemPropertyColumns' in kwargs: + system_property_columns = kwargs['systemPropertyColumns'] + + _setter("resource_group_name", resource_group_name) + _setter("serialization", serialization) + _setter("servicebus_namespace", servicebus_namespace) + _setter("stream_analytics_job_name", stream_analytics_job_name) + _setter("topic_name", topic_name) if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if property_columns is not None: - pulumi.set(__self__, "property_columns", property_columns) + _setter("property_columns", property_columns) if shared_access_policy_key is not None: - pulumi.set(__self__, "shared_access_policy_key", shared_access_policy_key) + _setter("shared_access_policy_key", shared_access_policy_key) if shared_access_policy_name is not None: - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) + _setter("shared_access_policy_name", shared_access_policy_name) if system_property_columns is not None: - pulumi.set(__self__, "system_property_columns", system_property_columns) + _setter("system_property_columns", system_property_columns) @property @pulumi.getter(name="resourceGroupName") @@ -226,28 +285,77 @@ def __init__(__self__, *, > **NOTE:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. :param pulumi.Input[str] topic_name: The name of the Service Bus Topic. """ + _OutputServicebusTopicState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_mode=authentication_mode, + name=name, + property_columns=property_columns, + resource_group_name=resource_group_name, + serialization=serialization, + servicebus_namespace=servicebus_namespace, + shared_access_policy_key=shared_access_policy_key, + shared_access_policy_name=shared_access_policy_name, + stream_analytics_job_name=stream_analytics_job_name, + system_property_columns=system_property_columns, + topic_name=topic_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + property_columns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['OutputServicebusTopicSerializationArgs']] = None, + servicebus_namespace: Optional[pulumi.Input[str]] = None, + shared_access_policy_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + system_property_columns: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + topic_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if property_columns is None and 'propertyColumns' in kwargs: + property_columns = kwargs['propertyColumns'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if servicebus_namespace is None and 'servicebusNamespace' in kwargs: + servicebus_namespace = kwargs['servicebusNamespace'] + if shared_access_policy_key is None and 'sharedAccessPolicyKey' in kwargs: + shared_access_policy_key = kwargs['sharedAccessPolicyKey'] + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if system_property_columns is None and 'systemPropertyColumns' in kwargs: + system_property_columns = kwargs['systemPropertyColumns'] + if topic_name is None and 'topicName' in kwargs: + topic_name = kwargs['topicName'] + if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if property_columns is not None: - pulumi.set(__self__, "property_columns", property_columns) + _setter("property_columns", property_columns) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if serialization is not None: - pulumi.set(__self__, "serialization", serialization) + _setter("serialization", serialization) if servicebus_namespace is not None: - pulumi.set(__self__, "servicebus_namespace", servicebus_namespace) + _setter("servicebus_namespace", servicebus_namespace) if shared_access_policy_key is not None: - pulumi.set(__self__, "shared_access_policy_key", shared_access_policy_key) + _setter("shared_access_policy_key", shared_access_policy_key) if shared_access_policy_name is not None: - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) + _setter("shared_access_policy_name", shared_access_policy_name) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) if system_property_columns is not None: - pulumi.set(__self__, "system_property_columns", system_property_columns) + _setter("system_property_columns", system_property_columns) if topic_name is not None: - pulumi.set(__self__, "topic_name", topic_name) + _setter("topic_name", topic_name) @property @pulumi.getter(name="authenticationMode") @@ -521,6 +629,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OutputServicebusTopicArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -552,6 +664,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if serialization is not None and not isinstance(serialization, OutputServicebusTopicSerializationArgs): + serialization = serialization or {} + def _setter(key, value): + serialization[key] = value + OutputServicebusTopicSerializationArgs._configure(_setter, **serialization) if serialization is None and not opts.urn: raise TypeError("Missing required property 'serialization'") __props__.__dict__["serialization"] = serialization diff --git a/sdk/python/pulumi_azure/streamanalytics/output_synapse.py b/sdk/python/pulumi_azure/streamanalytics/output_synapse.py index 928fcd1e20..b5b3142199 100644 --- a/sdk/python/pulumi_azure/streamanalytics/output_synapse.py +++ b/sdk/python/pulumi_azure/streamanalytics/output_synapse.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['OutputSynapseArgs', 'OutputSynapse'] @@ -33,15 +33,58 @@ def __init__(__self__, *, :param pulumi.Input[str] user: The user name that will be used to connect to the Azure SQL database. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the Stream Output. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "database", database) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) - pulumi.set(__self__, "table", table) - pulumi.set(__self__, "user", user) + OutputSynapseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database=database, + password=password, + resource_group_name=resource_group_name, + server=server, + stream_analytics_job_name=stream_analytics_job_name, + table=table, + user=user, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + table: Optional[pulumi.Input[str]] = None, + user: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database is None: + raise TypeError("Missing 'database' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + if table is None: + raise TypeError("Missing 'table' argument") + if user is None: + raise TypeError("Missing 'user' argument") + + _setter("database", database) + _setter("password", password) + _setter("resource_group_name", resource_group_name) + _setter("server", server) + _setter("stream_analytics_job_name", stream_analytics_job_name) + _setter("table", table) + _setter("user", user) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -162,22 +205,51 @@ def __init__(__self__, *, :param pulumi.Input[str] table: The name of the table in the Azure SQL database. Changing this forces a new resource to be created. :param pulumi.Input[str] user: The user name that will be used to connect to the Azure SQL database. Changing this forces a new resource to be created. """ + _OutputSynapseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + database=database, + name=name, + password=password, + resource_group_name=resource_group_name, + server=server, + stream_analytics_job_name=stream_analytics_job_name, + table=table, + user=user, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + table: Optional[pulumi.Input[str]] = None, + user: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if database is not None: - pulumi.set(__self__, "database", database) + _setter("database", database) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server is not None: - pulumi.set(__self__, "server", server) + _setter("server", server) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) if table is not None: - pulumi.set(__self__, "table", table) + _setter("table", table) if user is not None: - pulumi.set(__self__, "user", user) + _setter("user", user) @property @pulumi.getter @@ -411,6 +483,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OutputSynapseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/streamanalytics/output_table.py b/sdk/python/pulumi_azure/streamanalytics/output_table.py index 0f0aac9467..392c290287 100644 --- a/sdk/python/pulumi_azure/streamanalytics/output_table.py +++ b/sdk/python/pulumi_azure/streamanalytics/output_table.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['OutputTableArgs', 'OutputTable'] @@ -37,18 +37,79 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] columns_to_removes: A list of the column names to be removed from output event entities. :param pulumi.Input[str] name: The name of the Stream Output. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "batch_size", batch_size) - pulumi.set(__self__, "partition_key", partition_key) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "row_key", row_key) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "storage_account_name", storage_account_name) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) - pulumi.set(__self__, "table", table) + OutputTableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + batch_size=batch_size, + partition_key=partition_key, + resource_group_name=resource_group_name, + row_key=row_key, + storage_account_key=storage_account_key, + storage_account_name=storage_account_name, + stream_analytics_job_name=stream_analytics_job_name, + table=table, + columns_to_removes=columns_to_removes, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + batch_size: Optional[pulumi.Input[int]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + row_key: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + table: Optional[pulumi.Input[str]] = None, + columns_to_removes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if batch_size is None and 'batchSize' in kwargs: + batch_size = kwargs['batchSize'] + if batch_size is None: + raise TypeError("Missing 'batch_size' argument") + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + if partition_key is None: + raise TypeError("Missing 'partition_key' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if row_key is None and 'rowKey' in kwargs: + row_key = kwargs['rowKey'] + if row_key is None: + raise TypeError("Missing 'row_key' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + if table is None: + raise TypeError("Missing 'table' argument") + if columns_to_removes is None and 'columnsToRemoves' in kwargs: + columns_to_removes = kwargs['columnsToRemoves'] + + _setter("batch_size", batch_size) + _setter("partition_key", partition_key) + _setter("resource_group_name", resource_group_name) + _setter("row_key", row_key) + _setter("storage_account_key", storage_account_key) + _setter("storage_account_name", storage_account_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) + _setter("table", table) if columns_to_removes is not None: - pulumi.set(__self__, "columns_to_removes", columns_to_removes) + _setter("columns_to_removes", columns_to_removes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="batchSize") @@ -197,26 +258,71 @@ def __init__(__self__, *, :param pulumi.Input[str] stream_analytics_job_name: The name of the Stream Analytics Job. Changing this forces a new resource to be created. :param pulumi.Input[str] table: The name of the table where the stream should be output to. """ + _OutputTableState._configure( + lambda key, value: pulumi.set(__self__, key, value), + batch_size=batch_size, + columns_to_removes=columns_to_removes, + name=name, + partition_key=partition_key, + resource_group_name=resource_group_name, + row_key=row_key, + storage_account_key=storage_account_key, + storage_account_name=storage_account_name, + stream_analytics_job_name=stream_analytics_job_name, + table=table, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + batch_size: Optional[pulumi.Input[int]] = None, + columns_to_removes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + row_key: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + table: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if batch_size is None and 'batchSize' in kwargs: + batch_size = kwargs['batchSize'] + if columns_to_removes is None and 'columnsToRemoves' in kwargs: + columns_to_removes = kwargs['columnsToRemoves'] + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if row_key is None and 'rowKey' in kwargs: + row_key = kwargs['rowKey'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if batch_size is not None: - pulumi.set(__self__, "batch_size", batch_size) + _setter("batch_size", batch_size) if columns_to_removes is not None: - pulumi.set(__self__, "columns_to_removes", columns_to_removes) + _setter("columns_to_removes", columns_to_removes) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key is not None: - pulumi.set(__self__, "partition_key", partition_key) + _setter("partition_key", partition_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if row_key is not None: - pulumi.set(__self__, "row_key", row_key) + _setter("row_key", row_key) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) if table is not None: - pulumi.set(__self__, "table", table) + _setter("table", table) @property @pulumi.getter(name="batchSize") @@ -458,6 +564,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + OutputTableArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/streamanalytics/outputs.py b/sdk/python/pulumi_azure/streamanalytics/outputs.py index 4c12e9c756..423e73de74 100644 --- a/sdk/python/pulumi_azure/streamanalytics/outputs.py +++ b/sdk/python/pulumi_azure/streamanalytics/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -54,9 +54,26 @@ def __init__(__self__, *, :param str type: The Data Type for the Input Argument of this JavaScript Function. Possible values include `array`, `any`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. :param bool configuration_parameter: Is this input parameter a configuration parameter? Defaults to `false`. """ - pulumi.set(__self__, "type", type) + FunctionJavaScriptUDFInput._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + configuration_parameter=configuration_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + configuration_parameter: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if configuration_parameter is None and 'configurationParameter' in kwargs: + configuration_parameter = kwargs['configurationParameter'] + + _setter("type", type) if configuration_parameter is not None: - pulumi.set(__self__, "configuration_parameter", configuration_parameter) + _setter("configuration_parameter", configuration_parameter) @property @pulumi.getter @@ -82,7 +99,20 @@ def __init__(__self__, *, """ :param str type: The Data Type output from this JavaScript Function. Possible values include `array`, `any`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. """ - pulumi.set(__self__, "type", type) + FunctionJavaScriptUDFOutput._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("type", type) @property @pulumi.getter @@ -119,9 +149,26 @@ def __init__(__self__, *, :param str type: The input data type of this JavaScript Function. Possible values include `any`, `array`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. :param bool configuration_parameter: Is this input parameter a configuration parameter? Defaults to `false`. """ - pulumi.set(__self__, "type", type) + FunctionJavascriptUdaInput._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + configuration_parameter=configuration_parameter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + configuration_parameter: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if configuration_parameter is None and 'configurationParameter' in kwargs: + configuration_parameter = kwargs['configurationParameter'] + + _setter("type", type) if configuration_parameter is not None: - pulumi.set(__self__, "configuration_parameter", configuration_parameter) + _setter("configuration_parameter", configuration_parameter) @property @pulumi.getter @@ -147,7 +194,20 @@ def __init__(__self__, *, """ :param str type: The output data type from this JavaScript Function. Possible values include `any`, `array`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. """ - pulumi.set(__self__, "type", type) + FunctionJavascriptUdaOutput._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("type", type) @property @pulumi.getter @@ -188,11 +248,32 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + JobIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -251,10 +332,35 @@ def __init__(__self__, *, :param str account_name: The name of the Azure storage account. :param str authentication_mode: The authentication mode of the storage account. The only supported value is `ConnectionString`. Defaults to `ConnectionString`. """ - pulumi.set(__self__, "account_key", account_key) - pulumi.set(__self__, "account_name", account_name) + JobJobStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_key=account_key, + account_name=account_name, + authentication_mode=authentication_mode, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_key: Optional[str] = None, + account_name: Optional[str] = None, + authentication_mode: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_key is None and 'accountKey' in kwargs: + account_key = kwargs['accountKey'] + if account_key is None: + raise TypeError("Missing 'account_key' argument") + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + + _setter("account_key", account_key) + _setter("account_name", account_name) if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) @property @pulumi.getter(name="accountKey") @@ -319,13 +425,34 @@ def __init__(__self__, *, > **NOTE:** This is Required and can only be specified when `type` is set to `Json`. """ - pulumi.set(__self__, "type", type) + OutputBlobSerialization._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + format=format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + encoding: Optional[str] = None, + field_delimiter: Optional[str] = None, + format: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) if format is not None: - pulumi.set(__self__, "format", format) + _setter("format", format) @property @pulumi.getter @@ -404,13 +531,34 @@ def __init__(__self__, *, > **NOTE:** This is Required and can only be specified when `type` is set to `Json`. """ - pulumi.set(__self__, "type", type) + OutputEventHubSerialization._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + format=format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + encoding: Optional[str] = None, + field_delimiter: Optional[str] = None, + format: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) if format is not None: - pulumi.set(__self__, "format", format) + _setter("format", format) @property @pulumi.getter @@ -487,13 +635,34 @@ def __init__(__self__, *, > **NOTE:** This is Required and can only be specified when `type` is set to `Json`. """ - pulumi.set(__self__, "type", type) + OutputServiceBusQueueSerialization._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + format=format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + encoding: Optional[str] = None, + field_delimiter: Optional[str] = None, + format: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) if format is not None: - pulumi.set(__self__, "format", format) + _setter("format", format) @property @pulumi.getter @@ -570,13 +739,34 @@ def __init__(__self__, *, > **NOTE:** This is Required and can only be specified when `type` is set to `Json`. """ - pulumi.set(__self__, "type", type) + OutputServicebusTopicSerialization._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + format=format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + encoding: Optional[str] = None, + field_delimiter: Optional[str] = None, + format: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) if format is not None: - pulumi.set(__self__, "format", format) + _setter("format", format) @property @pulumi.getter @@ -649,11 +839,30 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `Csv`. """ - pulumi.set(__self__, "type", type) + ReferenceInputBlobSerialization._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + encoding: Optional[str] = None, + field_delimiter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) @property @pulumi.getter @@ -716,11 +925,30 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `Csv`. """ - pulumi.set(__self__, "type", type) + StreamInputBlobSerialization._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + encoding: Optional[str] = None, + field_delimiter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) @property @pulumi.getter @@ -783,11 +1011,30 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `Csv`. """ - pulumi.set(__self__, "type", type) + StreamInputEventHubSerialization._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + encoding: Optional[str] = None, + field_delimiter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) @property @pulumi.getter @@ -850,11 +1097,30 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `Csv`. """ - pulumi.set(__self__, "type", type) + StreamInputEventHubV2Serialization._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + encoding: Optional[str] = None, + field_delimiter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) @property @pulumi.getter @@ -917,11 +1183,30 @@ def __init__(__self__, *, > **NOTE:** This is required when `type` is set to `Csv`. """ - pulumi.set(__self__, "type", type) + StreamInputIotHubSerialization._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + encoding=encoding, + field_delimiter=field_delimiter, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + encoding: Optional[str] = None, + field_delimiter: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if field_delimiter is None and 'fieldDelimiter' in kwargs: + field_delimiter = kwargs['fieldDelimiter'] + + _setter("type", type) if encoding is not None: - pulumi.set(__self__, "encoding", encoding) + _setter("encoding", encoding) if field_delimiter is not None: - pulumi.set(__self__, "field_delimiter", field_delimiter) + _setter("field_delimiter", field_delimiter) @property @pulumi.getter @@ -963,9 +1248,34 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID associated with this Managed Service Identity. :param str type: The identity type of this Managed Service Identity. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetJobIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="principalId") diff --git a/sdk/python/pulumi_azure/streamanalytics/reference_input_blob.py b/sdk/python/pulumi_azure/streamanalytics/reference_input_blob.py index 3a780feb7a..c4583fe79e 100644 --- a/sdk/python/pulumi_azure/streamanalytics/reference_input_blob.py +++ b/sdk/python/pulumi_azure/streamanalytics/reference_input_blob.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,20 +41,85 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Reference Input Blob. Changing this forces a new resource to be created. :param pulumi.Input[str] storage_account_key: The Access Key which should be used to connect to this Storage Account. Required if `authentication_mode` is `ConnectionString`. """ - pulumi.set(__self__, "date_format", date_format) - pulumi.set(__self__, "path_pattern", path_pattern) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "serialization", serialization) - pulumi.set(__self__, "storage_account_name", storage_account_name) - pulumi.set(__self__, "storage_container_name", storage_container_name) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) - pulumi.set(__self__, "time_format", time_format) + ReferenceInputBlobArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + date_format=date_format, + path_pattern=path_pattern, + resource_group_name=resource_group_name, + serialization=serialization, + storage_account_name=storage_account_name, + storage_container_name=storage_container_name, + stream_analytics_job_name=stream_analytics_job_name, + time_format=time_format, + authentication_mode=authentication_mode, + name=name, + storage_account_key=storage_account_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + date_format: Optional[pulumi.Input[str]] = None, + path_pattern: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['ReferenceInputBlobSerializationArgs']] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_container_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + time_format: Optional[pulumi.Input[str]] = None, + authentication_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if date_format is None and 'dateFormat' in kwargs: + date_format = kwargs['dateFormat'] + if date_format is None: + raise TypeError("Missing 'date_format' argument") + if path_pattern is None and 'pathPattern' in kwargs: + path_pattern = kwargs['pathPattern'] + if path_pattern is None: + raise TypeError("Missing 'path_pattern' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if serialization is None: + raise TypeError("Missing 'serialization' argument") + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if storage_container_name is None: + raise TypeError("Missing 'storage_container_name' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + if time_format is None and 'timeFormat' in kwargs: + time_format = kwargs['timeFormat'] + if time_format is None: + raise TypeError("Missing 'time_format' argument") + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + + _setter("date_format", date_format) + _setter("path_pattern", path_pattern) + _setter("resource_group_name", resource_group_name) + _setter("serialization", serialization) + _setter("storage_account_name", storage_account_name) + _setter("storage_container_name", storage_container_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) + _setter("time_format", time_format) if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) @property @pulumi.getter(name="dateFormat") @@ -217,28 +282,77 @@ def __init__(__self__, *, :param pulumi.Input[str] stream_analytics_job_name: The name of the Stream Analytics Job. Changing this forces a new resource to be created. :param pulumi.Input[str] time_format: The time format. Wherever `{time}` appears in `path_pattern`, the value of this property is used as the time format instead. """ + _ReferenceInputBlobState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_mode=authentication_mode, + date_format=date_format, + name=name, + path_pattern=path_pattern, + resource_group_name=resource_group_name, + serialization=serialization, + storage_account_key=storage_account_key, + storage_account_name=storage_account_name, + storage_container_name=storage_container_name, + stream_analytics_job_name=stream_analytics_job_name, + time_format=time_format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_mode: Optional[pulumi.Input[str]] = None, + date_format: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + path_pattern: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['ReferenceInputBlobSerializationArgs']] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_container_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + time_format: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if date_format is None and 'dateFormat' in kwargs: + date_format = kwargs['dateFormat'] + if path_pattern is None and 'pathPattern' in kwargs: + path_pattern = kwargs['pathPattern'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if time_format is None and 'timeFormat' in kwargs: + time_format = kwargs['timeFormat'] + if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if date_format is not None: - pulumi.set(__self__, "date_format", date_format) + _setter("date_format", date_format) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if path_pattern is not None: - pulumi.set(__self__, "path_pattern", path_pattern) + _setter("path_pattern", path_pattern) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if serialization is not None: - pulumi.set(__self__, "serialization", serialization) + _setter("serialization", serialization) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_container_name is not None: - pulumi.set(__self__, "storage_container_name", storage_container_name) + _setter("storage_container_name", storage_container_name) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) if time_format is not None: - pulumi.set(__self__, "time_format", time_format) + _setter("time_format", time_format) @property @pulumi.getter(name="authenticationMode") @@ -506,6 +620,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ReferenceInputBlobArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -542,6 +660,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if serialization is not None and not isinstance(serialization, ReferenceInputBlobSerializationArgs): + serialization = serialization or {} + def _setter(key, value): + serialization[key] = value + ReferenceInputBlobSerializationArgs._configure(_setter, **serialization) if serialization is None and not opts.urn: raise TypeError("Missing required property 'serialization'") __props__.__dict__["serialization"] = serialization diff --git a/sdk/python/pulumi_azure/streamanalytics/reference_input_mssql.py b/sdk/python/pulumi_azure/streamanalytics/reference_input_mssql.py index 86a9aecfd8..6b272d515b 100644 --- a/sdk/python/pulumi_azure/streamanalytics/reference_input_mssql.py +++ b/sdk/python/pulumi_azure/streamanalytics/reference_input_mssql.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ReferenceInputMssqlArgs', 'ReferenceInputMssql'] @@ -41,22 +41,83 @@ def __init__(__self__, *, :param pulumi.Input[str] refresh_interval_duration: The frequency in `hh:mm:ss` with which the reference data should be retrieved from the MS SQL database e.g. `00:20:00` for every 20 minutes. Must be set when `refresh_type` is `RefreshPeriodicallyWithFull` or `RefreshPeriodicallyWithDelta`. :param pulumi.Input[str] table: The name of the table in the Azure SQL database. """ - pulumi.set(__self__, "database", database) - pulumi.set(__self__, "full_snapshot_query", full_snapshot_query) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "refresh_type", refresh_type) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "server", server) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) - pulumi.set(__self__, "username", username) + ReferenceInputMssqlArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + database=database, + full_snapshot_query=full_snapshot_query, + password=password, + refresh_type=refresh_type, + resource_group_name=resource_group_name, + server=server, + stream_analytics_job_name=stream_analytics_job_name, + username=username, + delta_snapshot_query=delta_snapshot_query, + name=name, + refresh_interval_duration=refresh_interval_duration, + table=table, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database: Optional[pulumi.Input[str]] = None, + full_snapshot_query: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + refresh_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + delta_snapshot_query: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + refresh_interval_duration: Optional[pulumi.Input[str]] = None, + table: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if database is None: + raise TypeError("Missing 'database' argument") + if full_snapshot_query is None and 'fullSnapshotQuery' in kwargs: + full_snapshot_query = kwargs['fullSnapshotQuery'] + if full_snapshot_query is None: + raise TypeError("Missing 'full_snapshot_query' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if refresh_type is None and 'refreshType' in kwargs: + refresh_type = kwargs['refreshType'] + if refresh_type is None: + raise TypeError("Missing 'refresh_type' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if server is None: + raise TypeError("Missing 'server' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if delta_snapshot_query is None and 'deltaSnapshotQuery' in kwargs: + delta_snapshot_query = kwargs['deltaSnapshotQuery'] + if refresh_interval_duration is None and 'refreshIntervalDuration' in kwargs: + refresh_interval_duration = kwargs['refreshIntervalDuration'] + + _setter("database", database) + _setter("full_snapshot_query", full_snapshot_query) + _setter("password", password) + _setter("refresh_type", refresh_type) + _setter("resource_group_name", resource_group_name) + _setter("server", server) + _setter("stream_analytics_job_name", stream_analytics_job_name) + _setter("username", username) if delta_snapshot_query is not None: - pulumi.set(__self__, "delta_snapshot_query", delta_snapshot_query) + _setter("delta_snapshot_query", delta_snapshot_query) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if refresh_interval_duration is not None: - pulumi.set(__self__, "refresh_interval_duration", refresh_interval_duration) + _setter("refresh_interval_duration", refresh_interval_duration) if table is not None: - pulumi.set(__self__, "table", table) + _setter("table", table) @property @pulumi.getter @@ -233,30 +294,75 @@ def __init__(__self__, *, :param pulumi.Input[str] table: The name of the table in the Azure SQL database. :param pulumi.Input[str] username: The username to connect to the MS SQL database. """ + _ReferenceInputMssqlState._configure( + lambda key, value: pulumi.set(__self__, key, value), + database=database, + delta_snapshot_query=delta_snapshot_query, + full_snapshot_query=full_snapshot_query, + name=name, + password=password, + refresh_interval_duration=refresh_interval_duration, + refresh_type=refresh_type, + resource_group_name=resource_group_name, + server=server, + stream_analytics_job_name=stream_analytics_job_name, + table=table, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + database: Optional[pulumi.Input[str]] = None, + delta_snapshot_query: Optional[pulumi.Input[str]] = None, + full_snapshot_query: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + refresh_interval_duration: Optional[pulumi.Input[str]] = None, + refresh_type: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + server: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + table: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if delta_snapshot_query is None and 'deltaSnapshotQuery' in kwargs: + delta_snapshot_query = kwargs['deltaSnapshotQuery'] + if full_snapshot_query is None and 'fullSnapshotQuery' in kwargs: + full_snapshot_query = kwargs['fullSnapshotQuery'] + if refresh_interval_duration is None and 'refreshIntervalDuration' in kwargs: + refresh_interval_duration = kwargs['refreshIntervalDuration'] + if refresh_type is None and 'refreshType' in kwargs: + refresh_type = kwargs['refreshType'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if database is not None: - pulumi.set(__self__, "database", database) + _setter("database", database) if delta_snapshot_query is not None: - pulumi.set(__self__, "delta_snapshot_query", delta_snapshot_query) + _setter("delta_snapshot_query", delta_snapshot_query) if full_snapshot_query is not None: - pulumi.set(__self__, "full_snapshot_query", full_snapshot_query) + _setter("full_snapshot_query", full_snapshot_query) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if refresh_interval_duration is not None: - pulumi.set(__self__, "refresh_interval_duration", refresh_interval_duration) + _setter("refresh_interval_duration", refresh_interval_duration) if refresh_type is not None: - pulumi.set(__self__, "refresh_type", refresh_type) + _setter("refresh_type", refresh_type) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if server is not None: - pulumi.set(__self__, "server", server) + _setter("server", server) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) if table is not None: - pulumi.set(__self__, "table", table) + _setter("table", table) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -536,6 +642,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ReferenceInputMssqlArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/streamanalytics/stream_input_blob.py b/sdk/python/pulumi_azure/streamanalytics/stream_input_blob.py index 16edf9954f..06ca93bed2 100644 --- a/sdk/python/pulumi_azure/streamanalytics/stream_input_blob.py +++ b/sdk/python/pulumi_azure/streamanalytics/stream_input_blob.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,17 +39,80 @@ def __init__(__self__, *, :param pulumi.Input[str] time_format: The time format. Wherever `{time}` appears in `path_pattern`, the value of this property is used as the time format instead. :param pulumi.Input[str] name: The name of the Stream Input Blob. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "date_format", date_format) - pulumi.set(__self__, "path_pattern", path_pattern) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "serialization", serialization) - pulumi.set(__self__, "storage_account_key", storage_account_key) - pulumi.set(__self__, "storage_account_name", storage_account_name) - pulumi.set(__self__, "storage_container_name", storage_container_name) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) - pulumi.set(__self__, "time_format", time_format) + StreamInputBlobArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + date_format=date_format, + path_pattern=path_pattern, + resource_group_name=resource_group_name, + serialization=serialization, + storage_account_key=storage_account_key, + storage_account_name=storage_account_name, + storage_container_name=storage_container_name, + stream_analytics_job_name=stream_analytics_job_name, + time_format=time_format, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + date_format: Optional[pulumi.Input[str]] = None, + path_pattern: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['StreamInputBlobSerializationArgs']] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_container_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + time_format: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if date_format is None and 'dateFormat' in kwargs: + date_format = kwargs['dateFormat'] + if date_format is None: + raise TypeError("Missing 'date_format' argument") + if path_pattern is None and 'pathPattern' in kwargs: + path_pattern = kwargs['pathPattern'] + if path_pattern is None: + raise TypeError("Missing 'path_pattern' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if serialization is None: + raise TypeError("Missing 'serialization' argument") + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_key is None: + raise TypeError("Missing 'storage_account_key' argument") + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_account_name is None: + raise TypeError("Missing 'storage_account_name' argument") + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if storage_container_name is None: + raise TypeError("Missing 'storage_container_name' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + if time_format is None and 'timeFormat' in kwargs: + time_format = kwargs['timeFormat'] + if time_format is None: + raise TypeError("Missing 'time_format' argument") + + _setter("date_format", date_format) + _setter("path_pattern", path_pattern) + _setter("resource_group_name", resource_group_name) + _setter("serialization", serialization) + _setter("storage_account_key", storage_account_key) + _setter("storage_account_name", storage_account_name) + _setter("storage_container_name", storage_container_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) + _setter("time_format", time_format) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="dateFormat") @@ -198,26 +261,71 @@ def __init__(__self__, *, :param pulumi.Input[str] stream_analytics_job_name: The name of the Stream Analytics Job. Changing this forces a new resource to be created. :param pulumi.Input[str] time_format: The time format. Wherever `{time}` appears in `path_pattern`, the value of this property is used as the time format instead. """ + _StreamInputBlobState._configure( + lambda key, value: pulumi.set(__self__, key, value), + date_format=date_format, + name=name, + path_pattern=path_pattern, + resource_group_name=resource_group_name, + serialization=serialization, + storage_account_key=storage_account_key, + storage_account_name=storage_account_name, + storage_container_name=storage_container_name, + stream_analytics_job_name=stream_analytics_job_name, + time_format=time_format, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + date_format: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + path_pattern: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['StreamInputBlobSerializationArgs']] = None, + storage_account_key: Optional[pulumi.Input[str]] = None, + storage_account_name: Optional[pulumi.Input[str]] = None, + storage_container_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + time_format: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if date_format is None and 'dateFormat' in kwargs: + date_format = kwargs['dateFormat'] + if path_pattern is None and 'pathPattern' in kwargs: + path_pattern = kwargs['pathPattern'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_account_key is None and 'storageAccountKey' in kwargs: + storage_account_key = kwargs['storageAccountKey'] + if storage_account_name is None and 'storageAccountName' in kwargs: + storage_account_name = kwargs['storageAccountName'] + if storage_container_name is None and 'storageContainerName' in kwargs: + storage_container_name = kwargs['storageContainerName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if time_format is None and 'timeFormat' in kwargs: + time_format = kwargs['timeFormat'] + if date_format is not None: - pulumi.set(__self__, "date_format", date_format) + _setter("date_format", date_format) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if path_pattern is not None: - pulumi.set(__self__, "path_pattern", path_pattern) + _setter("path_pattern", path_pattern) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if serialization is not None: - pulumi.set(__self__, "serialization", serialization) + _setter("serialization", serialization) if storage_account_key is not None: - pulumi.set(__self__, "storage_account_key", storage_account_key) + _setter("storage_account_key", storage_account_key) if storage_account_name is not None: - pulumi.set(__self__, "storage_account_name", storage_account_name) + _setter("storage_account_name", storage_account_name) if storage_container_name is not None: - pulumi.set(__self__, "storage_container_name", storage_container_name) + _setter("storage_container_name", storage_container_name) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) if time_format is not None: - pulumi.set(__self__, "time_format", time_format) + _setter("time_format", time_format) @property @pulumi.getter(name="dateFormat") @@ -471,6 +579,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StreamInputBlobArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -505,6 +617,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if serialization is not None and not isinstance(serialization, StreamInputBlobSerializationArgs): + serialization = serialization or {} + def _setter(key, value): + serialization[key] = value + StreamInputBlobSerializationArgs._configure(_setter, **serialization) if serialization is None and not opts.urn: raise TypeError("Missing required property 'serialization'") __props__.__dict__["serialization"] = serialization diff --git a/sdk/python/pulumi_azure/streamanalytics/stream_input_event_hub.py b/sdk/python/pulumi_azure/streamanalytics/stream_input_event_hub.py index 7dd2c569bc..e87d43619f 100644 --- a/sdk/python/pulumi_azure/streamanalytics/stream_input_event_hub.py +++ b/sdk/python/pulumi_azure/streamanalytics/stream_input_event_hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,23 +41,82 @@ def __init__(__self__, *, :param pulumi.Input[str] shared_access_policy_key: The shared access policy key for the specified shared access policy. :param pulumi.Input[str] shared_access_policy_name: The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. """ - pulumi.set(__self__, "eventhub_name", eventhub_name) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "serialization", serialization) - pulumi.set(__self__, "servicebus_namespace", servicebus_namespace) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + StreamInputEventHubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_name=eventhub_name, + resource_group_name=resource_group_name, + serialization=serialization, + servicebus_namespace=servicebus_namespace, + stream_analytics_job_name=stream_analytics_job_name, + authentication_mode=authentication_mode, + eventhub_consumer_group_name=eventhub_consumer_group_name, + name=name, + partition_key=partition_key, + shared_access_policy_key=shared_access_policy_key, + shared_access_policy_name=shared_access_policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['StreamInputEventHubSerializationArgs']] = None, + servicebus_namespace: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + authentication_mode: Optional[pulumi.Input[str]] = None, + eventhub_consumer_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_name is None: + raise TypeError("Missing 'eventhub_name' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if serialization is None: + raise TypeError("Missing 'serialization' argument") + if servicebus_namespace is None and 'servicebusNamespace' in kwargs: + servicebus_namespace = kwargs['servicebusNamespace'] + if servicebus_namespace is None: + raise TypeError("Missing 'servicebus_namespace' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if eventhub_consumer_group_name is None and 'eventhubConsumerGroupName' in kwargs: + eventhub_consumer_group_name = kwargs['eventhubConsumerGroupName'] + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + if shared_access_policy_key is None and 'sharedAccessPolicyKey' in kwargs: + shared_access_policy_key = kwargs['sharedAccessPolicyKey'] + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + + _setter("eventhub_name", eventhub_name) + _setter("resource_group_name", resource_group_name) + _setter("serialization", serialization) + _setter("servicebus_namespace", servicebus_namespace) + _setter("stream_analytics_job_name", stream_analytics_job_name) if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if eventhub_consumer_group_name is not None: - pulumi.set(__self__, "eventhub_consumer_group_name", eventhub_consumer_group_name) + _setter("eventhub_consumer_group_name", eventhub_consumer_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key is not None: - pulumi.set(__self__, "partition_key", partition_key) + _setter("partition_key", partition_key) if shared_access_policy_key is not None: - pulumi.set(__self__, "shared_access_policy_key", shared_access_policy_key) + _setter("shared_access_policy_key", shared_access_policy_key) if shared_access_policy_name is not None: - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) + _setter("shared_access_policy_name", shared_access_policy_name) @property @pulumi.getter(name="eventhubName") @@ -220,28 +279,77 @@ def __init__(__self__, *, :param pulumi.Input[str] shared_access_policy_name: The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. :param pulumi.Input[str] stream_analytics_job_name: The name of the Stream Analytics Job. Changing this forces a new resource to be created. """ + _StreamInputEventHubState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_mode=authentication_mode, + eventhub_consumer_group_name=eventhub_consumer_group_name, + eventhub_name=eventhub_name, + name=name, + partition_key=partition_key, + resource_group_name=resource_group_name, + serialization=serialization, + servicebus_namespace=servicebus_namespace, + shared_access_policy_key=shared_access_policy_key, + shared_access_policy_name=shared_access_policy_name, + stream_analytics_job_name=stream_analytics_job_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_mode: Optional[pulumi.Input[str]] = None, + eventhub_consumer_group_name: Optional[pulumi.Input[str]] = None, + eventhub_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['StreamInputEventHubSerializationArgs']] = None, + servicebus_namespace: Optional[pulumi.Input[str]] = None, + shared_access_policy_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if eventhub_consumer_group_name is None and 'eventhubConsumerGroupName' in kwargs: + eventhub_consumer_group_name = kwargs['eventhubConsumerGroupName'] + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if servicebus_namespace is None and 'servicebusNamespace' in kwargs: + servicebus_namespace = kwargs['servicebusNamespace'] + if shared_access_policy_key is None and 'sharedAccessPolicyKey' in kwargs: + shared_access_policy_key = kwargs['sharedAccessPolicyKey'] + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if eventhub_consumer_group_name is not None: - pulumi.set(__self__, "eventhub_consumer_group_name", eventhub_consumer_group_name) + _setter("eventhub_consumer_group_name", eventhub_consumer_group_name) if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key is not None: - pulumi.set(__self__, "partition_key", partition_key) + _setter("partition_key", partition_key) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if serialization is not None: - pulumi.set(__self__, "serialization", serialization) + _setter("serialization", serialization) if servicebus_namespace is not None: - pulumi.set(__self__, "servicebus_namespace", servicebus_namespace) + _setter("servicebus_namespace", servicebus_namespace) if shared_access_policy_key is not None: - pulumi.set(__self__, "shared_access_policy_key", shared_access_policy_key) + _setter("shared_access_policy_key", shared_access_policy_key) if shared_access_policy_name is not None: - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) + _setter("shared_access_policy_name", shared_access_policy_name) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) @property @pulumi.getter(name="authenticationMode") @@ -523,6 +631,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StreamInputEventHubArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -558,6 +670,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if serialization is not None and not isinstance(serialization, StreamInputEventHubSerializationArgs): + serialization = serialization or {} + def _setter(key, value): + serialization[key] = value + StreamInputEventHubSerializationArgs._configure(_setter, **serialization) if serialization is None and not opts.urn: raise TypeError("Missing required property 'serialization'") __props__.__dict__["serialization"] = serialization diff --git a/sdk/python/pulumi_azure/streamanalytics/stream_input_event_hub_v2.py b/sdk/python/pulumi_azure/streamanalytics/stream_input_event_hub_v2.py index 341b2cebe4..9960ca0053 100644 --- a/sdk/python/pulumi_azure/streamanalytics/stream_input_event_hub_v2.py +++ b/sdk/python/pulumi_azure/streamanalytics/stream_input_event_hub_v2.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,22 +39,75 @@ def __init__(__self__, *, :param pulumi.Input[str] shared_access_policy_key: The shared access policy key for the specified shared access policy. :param pulumi.Input[str] shared_access_policy_name: The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. """ - pulumi.set(__self__, "eventhub_name", eventhub_name) - pulumi.set(__self__, "serialization", serialization) - pulumi.set(__self__, "servicebus_namespace", servicebus_namespace) - pulumi.set(__self__, "stream_analytics_job_id", stream_analytics_job_id) + StreamInputEventHubV2Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_name=eventhub_name, + serialization=serialization, + servicebus_namespace=servicebus_namespace, + stream_analytics_job_id=stream_analytics_job_id, + authentication_mode=authentication_mode, + eventhub_consumer_group_name=eventhub_consumer_group_name, + name=name, + partition_key=partition_key, + shared_access_policy_key=shared_access_policy_key, + shared_access_policy_name=shared_access_policy_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['StreamInputEventHubV2SerializationArgs']] = None, + servicebus_namespace: Optional[pulumi.Input[str]] = None, + stream_analytics_job_id: Optional[pulumi.Input[str]] = None, + authentication_mode: Optional[pulumi.Input[str]] = None, + eventhub_consumer_group_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_name is None: + raise TypeError("Missing 'eventhub_name' argument") + if serialization is None: + raise TypeError("Missing 'serialization' argument") + if servicebus_namespace is None and 'servicebusNamespace' in kwargs: + servicebus_namespace = kwargs['servicebusNamespace'] + if servicebus_namespace is None: + raise TypeError("Missing 'servicebus_namespace' argument") + if stream_analytics_job_id is None and 'streamAnalyticsJobId' in kwargs: + stream_analytics_job_id = kwargs['streamAnalyticsJobId'] + if stream_analytics_job_id is None: + raise TypeError("Missing 'stream_analytics_job_id' argument") + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if eventhub_consumer_group_name is None and 'eventhubConsumerGroupName' in kwargs: + eventhub_consumer_group_name = kwargs['eventhubConsumerGroupName'] + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + if shared_access_policy_key is None and 'sharedAccessPolicyKey' in kwargs: + shared_access_policy_key = kwargs['sharedAccessPolicyKey'] + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + + _setter("eventhub_name", eventhub_name) + _setter("serialization", serialization) + _setter("servicebus_namespace", servicebus_namespace) + _setter("stream_analytics_job_id", stream_analytics_job_id) if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if eventhub_consumer_group_name is not None: - pulumi.set(__self__, "eventhub_consumer_group_name", eventhub_consumer_group_name) + _setter("eventhub_consumer_group_name", eventhub_consumer_group_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key is not None: - pulumi.set(__self__, "partition_key", partition_key) + _setter("partition_key", partition_key) if shared_access_policy_key is not None: - pulumi.set(__self__, "shared_access_policy_key", shared_access_policy_key) + _setter("shared_access_policy_key", shared_access_policy_key) if shared_access_policy_name is not None: - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) + _setter("shared_access_policy_name", shared_access_policy_name) @property @pulumi.getter(name="eventhubName") @@ -203,26 +256,71 @@ def __init__(__self__, *, :param pulumi.Input[str] shared_access_policy_name: The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. :param pulumi.Input[str] stream_analytics_job_id: The name of the Stream Analytics Job. Changing this forces a new resource to be created. """ + _StreamInputEventHubV2State._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_mode=authentication_mode, + eventhub_consumer_group_name=eventhub_consumer_group_name, + eventhub_name=eventhub_name, + name=name, + partition_key=partition_key, + serialization=serialization, + servicebus_namespace=servicebus_namespace, + shared_access_policy_key=shared_access_policy_key, + shared_access_policy_name=shared_access_policy_name, + stream_analytics_job_id=stream_analytics_job_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_mode: Optional[pulumi.Input[str]] = None, + eventhub_consumer_group_name: Optional[pulumi.Input[str]] = None, + eventhub_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + partition_key: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['StreamInputEventHubV2SerializationArgs']] = None, + servicebus_namespace: Optional[pulumi.Input[str]] = None, + shared_access_policy_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_mode is None and 'authenticationMode' in kwargs: + authentication_mode = kwargs['authenticationMode'] + if eventhub_consumer_group_name is None and 'eventhubConsumerGroupName' in kwargs: + eventhub_consumer_group_name = kwargs['eventhubConsumerGroupName'] + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if partition_key is None and 'partitionKey' in kwargs: + partition_key = kwargs['partitionKey'] + if servicebus_namespace is None and 'servicebusNamespace' in kwargs: + servicebus_namespace = kwargs['servicebusNamespace'] + if shared_access_policy_key is None and 'sharedAccessPolicyKey' in kwargs: + shared_access_policy_key = kwargs['sharedAccessPolicyKey'] + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + if stream_analytics_job_id is None and 'streamAnalyticsJobId' in kwargs: + stream_analytics_job_id = kwargs['streamAnalyticsJobId'] + if authentication_mode is not None: - pulumi.set(__self__, "authentication_mode", authentication_mode) + _setter("authentication_mode", authentication_mode) if eventhub_consumer_group_name is not None: - pulumi.set(__self__, "eventhub_consumer_group_name", eventhub_consumer_group_name) + _setter("eventhub_consumer_group_name", eventhub_consumer_group_name) if eventhub_name is not None: - pulumi.set(__self__, "eventhub_name", eventhub_name) + _setter("eventhub_name", eventhub_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if partition_key is not None: - pulumi.set(__self__, "partition_key", partition_key) + _setter("partition_key", partition_key) if serialization is not None: - pulumi.set(__self__, "serialization", serialization) + _setter("serialization", serialization) if servicebus_namespace is not None: - pulumi.set(__self__, "servicebus_namespace", servicebus_namespace) + _setter("servicebus_namespace", servicebus_namespace) if shared_access_policy_key is not None: - pulumi.set(__self__, "shared_access_policy_key", shared_access_policy_key) + _setter("shared_access_policy_key", shared_access_policy_key) if shared_access_policy_name is not None: - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) + _setter("shared_access_policy_name", shared_access_policy_name) if stream_analytics_job_id is not None: - pulumi.set(__self__, "stream_analytics_job_id", stream_analytics_job_id) + _setter("stream_analytics_job_id", stream_analytics_job_id) @property @pulumi.getter(name="authenticationMode") @@ -488,6 +586,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StreamInputEventHubV2Args._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -519,6 +621,11 @@ def _internal_init(__self__, __props__.__dict__["eventhub_name"] = eventhub_name __props__.__dict__["name"] = name __props__.__dict__["partition_key"] = partition_key + if serialization is not None and not isinstance(serialization, StreamInputEventHubV2SerializationArgs): + serialization = serialization or {} + def _setter(key, value): + serialization[key] = value + StreamInputEventHubV2SerializationArgs._configure(_setter, **serialization) if serialization is None and not opts.urn: raise TypeError("Missing required property 'serialization'") __props__.__dict__["serialization"] = serialization diff --git a/sdk/python/pulumi_azure/streamanalytics/stream_input_iot_hub.py b/sdk/python/pulumi_azure/streamanalytics/stream_input_iot_hub.py index 816472504b..90fee77b3d 100644 --- a/sdk/python/pulumi_azure/streamanalytics/stream_input_iot_hub.py +++ b/sdk/python/pulumi_azure/streamanalytics/stream_input_iot_hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -37,16 +37,71 @@ def __init__(__self__, *, :param pulumi.Input[str] stream_analytics_job_name: The name of the Stream Analytics Job. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The name of the Stream Input IoTHub. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "endpoint", endpoint) - pulumi.set(__self__, "eventhub_consumer_group_name", eventhub_consumer_group_name) - pulumi.set(__self__, "iothub_namespace", iothub_namespace) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "serialization", serialization) - pulumi.set(__self__, "shared_access_policy_key", shared_access_policy_key) - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + StreamInputIotHubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint=endpoint, + eventhub_consumer_group_name=eventhub_consumer_group_name, + iothub_namespace=iothub_namespace, + resource_group_name=resource_group_name, + serialization=serialization, + shared_access_policy_key=shared_access_policy_key, + shared_access_policy_name=shared_access_policy_name, + stream_analytics_job_name=stream_analytics_job_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint: Optional[pulumi.Input[str]] = None, + eventhub_consumer_group_name: Optional[pulumi.Input[str]] = None, + iothub_namespace: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['StreamInputIotHubSerializationArgs']] = None, + shared_access_policy_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if endpoint is None: + raise TypeError("Missing 'endpoint' argument") + if eventhub_consumer_group_name is None and 'eventhubConsumerGroupName' in kwargs: + eventhub_consumer_group_name = kwargs['eventhubConsumerGroupName'] + if eventhub_consumer_group_name is None: + raise TypeError("Missing 'eventhub_consumer_group_name' argument") + if iothub_namespace is None and 'iothubNamespace' in kwargs: + iothub_namespace = kwargs['iothubNamespace'] + if iothub_namespace is None: + raise TypeError("Missing 'iothub_namespace' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if serialization is None: + raise TypeError("Missing 'serialization' argument") + if shared_access_policy_key is None and 'sharedAccessPolicyKey' in kwargs: + shared_access_policy_key = kwargs['sharedAccessPolicyKey'] + if shared_access_policy_key is None: + raise TypeError("Missing 'shared_access_policy_key' argument") + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + if shared_access_policy_name is None: + raise TypeError("Missing 'shared_access_policy_name' argument") + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if stream_analytics_job_name is None: + raise TypeError("Missing 'stream_analytics_job_name' argument") + + _setter("endpoint", endpoint) + _setter("eventhub_consumer_group_name", eventhub_consumer_group_name) + _setter("iothub_namespace", iothub_namespace) + _setter("resource_group_name", resource_group_name) + _setter("serialization", serialization) + _setter("shared_access_policy_key", shared_access_policy_key) + _setter("shared_access_policy_name", shared_access_policy_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -181,24 +236,63 @@ def __init__(__self__, *, :param pulumi.Input[str] shared_access_policy_name: The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. :param pulumi.Input[str] stream_analytics_job_name: The name of the Stream Analytics Job. Changing this forces a new resource to be created. """ + _StreamInputIotHubState._configure( + lambda key, value: pulumi.set(__self__, key, value), + endpoint=endpoint, + eventhub_consumer_group_name=eventhub_consumer_group_name, + iothub_namespace=iothub_namespace, + name=name, + resource_group_name=resource_group_name, + serialization=serialization, + shared_access_policy_key=shared_access_policy_key, + shared_access_policy_name=shared_access_policy_name, + stream_analytics_job_name=stream_analytics_job_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + endpoint: Optional[pulumi.Input[str]] = None, + eventhub_consumer_group_name: Optional[pulumi.Input[str]] = None, + iothub_namespace: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + serialization: Optional[pulumi.Input['StreamInputIotHubSerializationArgs']] = None, + shared_access_policy_key: Optional[pulumi.Input[str]] = None, + shared_access_policy_name: Optional[pulumi.Input[str]] = None, + stream_analytics_job_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_consumer_group_name is None and 'eventhubConsumerGroupName' in kwargs: + eventhub_consumer_group_name = kwargs['eventhubConsumerGroupName'] + if iothub_namespace is None and 'iothubNamespace' in kwargs: + iothub_namespace = kwargs['iothubNamespace'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if shared_access_policy_key is None and 'sharedAccessPolicyKey' in kwargs: + shared_access_policy_key = kwargs['sharedAccessPolicyKey'] + if shared_access_policy_name is None and 'sharedAccessPolicyName' in kwargs: + shared_access_policy_name = kwargs['sharedAccessPolicyName'] + if stream_analytics_job_name is None and 'streamAnalyticsJobName' in kwargs: + stream_analytics_job_name = kwargs['streamAnalyticsJobName'] + if endpoint is not None: - pulumi.set(__self__, "endpoint", endpoint) + _setter("endpoint", endpoint) if eventhub_consumer_group_name is not None: - pulumi.set(__self__, "eventhub_consumer_group_name", eventhub_consumer_group_name) + _setter("eventhub_consumer_group_name", eventhub_consumer_group_name) if iothub_namespace is not None: - pulumi.set(__self__, "iothub_namespace", iothub_namespace) + _setter("iothub_namespace", iothub_namespace) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if serialization is not None: - pulumi.set(__self__, "serialization", serialization) + _setter("serialization", serialization) if shared_access_policy_key is not None: - pulumi.set(__self__, "shared_access_policy_key", shared_access_policy_key) + _setter("shared_access_policy_key", shared_access_policy_key) if shared_access_policy_name is not None: - pulumi.set(__self__, "shared_access_policy_name", shared_access_policy_name) + _setter("shared_access_policy_name", shared_access_policy_name) if stream_analytics_job_name is not None: - pulumi.set(__self__, "stream_analytics_job_name", stream_analytics_job_name) + _setter("stream_analytics_job_name", stream_analytics_job_name) @property @pulumi.getter @@ -434,6 +528,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StreamInputIotHubArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -470,6 +568,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if serialization is not None and not isinstance(serialization, StreamInputIotHubSerializationArgs): + serialization = serialization or {} + def _setter(key, value): + serialization[key] = value + StreamInputIotHubSerializationArgs._configure(_setter, **serialization) if serialization is None and not opts.urn: raise TypeError("Missing required property 'serialization'") __props__.__dict__["serialization"] = serialization diff --git a/sdk/python/pulumi_azure/synapse/_inputs.py b/sdk/python/pulumi_azure/synapse/_inputs.py index e0e8fff199..2139254ca1 100644 --- a/sdk/python/pulumi_azure/synapse/_inputs.py +++ b/sdk/python/pulumi_azure/synapse/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -36,9 +36,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The integration runtime reference to associate with the Synapse Linked Service. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the integration runtime. """ - pulumi.set(__self__, "name", name) + LinkedServiceIntegrationRuntimeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -72,7 +87,22 @@ def __init__(__self__, *, """ :param pulumi.Input[int] delay_in_minutes: Number of minutes of idle time before the Spark Pool is automatically paused. Must be between `5` and `10080`. """ - pulumi.set(__self__, "delay_in_minutes", delay_in_minutes) + SparkPoolAutoPauseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + delay_in_minutes=delay_in_minutes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + delay_in_minutes: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if delay_in_minutes is None and 'delayInMinutes' in kwargs: + delay_in_minutes = kwargs['delayInMinutes'] + if delay_in_minutes is None: + raise TypeError("Missing 'delay_in_minutes' argument") + + _setter("delay_in_minutes", delay_in_minutes) @property @pulumi.getter(name="delayInMinutes") @@ -96,8 +126,29 @@ def __init__(__self__, *, :param pulumi.Input[int] max_node_count: The maximum number of nodes the Spark Pool can support. Must be between `3` and `200`. :param pulumi.Input[int] min_node_count: The minimum number of nodes the Spark Pool can support. Must be between `3` and `200`. """ - pulumi.set(__self__, "max_node_count", max_node_count) - pulumi.set(__self__, "min_node_count", min_node_count) + SparkPoolAutoScaleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_node_count=max_node_count, + min_node_count=min_node_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_node_count: Optional[pulumi.Input[int]] = None, + min_node_count: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_node_count is None and 'maxNodeCount' in kwargs: + max_node_count = kwargs['maxNodeCount'] + if max_node_count is None: + raise TypeError("Missing 'max_node_count' argument") + if min_node_count is None and 'minNodeCount' in kwargs: + min_node_count = kwargs['minNodeCount'] + if min_node_count is None: + raise TypeError("Missing 'min_node_count' argument") + + _setter("max_node_count", max_node_count) + _setter("min_node_count", min_node_count) @property @pulumi.getter(name="maxNodeCount") @@ -133,8 +184,25 @@ def __init__(__self__, *, :param pulumi.Input[str] content: The content of library requirements. :param pulumi.Input[str] filename: The name of the library requirements file. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "filename", filename) + SparkPoolLibraryRequirementArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + filename=filename, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + filename: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if filename is None: + raise TypeError("Missing 'filename' argument") + + _setter("content", content) + _setter("filename", filename) @property @pulumi.getter @@ -170,8 +238,25 @@ def __init__(__self__, *, :param pulumi.Input[str] content: The contents of a spark configuration. :param pulumi.Input[str] filename: The name of the file where the spark configuration `content` will be stored. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "filename", filename) + SparkPoolSparkConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + filename=filename, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[pulumi.Input[str]] = None, + filename: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if filename is None: + raise TypeError("Missing 'filename' argument") + + _setter("content", content) + _setter("filename", filename) @property @pulumi.getter @@ -207,8 +292,29 @@ def __init__(__self__, *, :param pulumi.Input[str] point_in_time: Specifies the Snapshot time to restore formatted as an RFC3339 date string. Changing this forces a new Synapse SQL Pool to be created. :param pulumi.Input[str] source_database_id: The ID of the Synapse SQL Pool or SQL Database which is to restore. Changing this forces a new Synapse SQL Pool to be created. """ - pulumi.set(__self__, "point_in_time", point_in_time) - pulumi.set(__self__, "source_database_id", source_database_id) + SqlPoolRestoreArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + point_in_time=point_in_time, + source_database_id=source_database_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + point_in_time: Optional[pulumi.Input[str]] = None, + source_database_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if point_in_time is None and 'pointInTime' in kwargs: + point_in_time = kwargs['pointInTime'] + if point_in_time is None: + raise TypeError("Missing 'point_in_time' argument") + if source_database_id is None and 'sourceDatabaseId' in kwargs: + source_database_id = kwargs['sourceDatabaseId'] + if source_database_id is None: + raise TypeError("Missing 'source_database_id' argument") + + _setter("point_in_time", point_in_time) + _setter("source_database_id", source_database_id) @property @pulumi.getter(name="pointInTime") @@ -242,7 +348,20 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input[str]]] results: Specifies a list of rule baseline result. """ - pulumi.set(__self__, "results", results) + SqlPoolVulnerabilityAssessmentBaselineBaselineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + results=results, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + results: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if results is None: + raise TypeError("Missing 'results' argument") + + _setter("results", results) @property @pulumi.getter @@ -268,12 +387,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] emails: Specifies an array of email addresses to which the scan notification is sent. :param pulumi.Input[bool] enabled: Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to `false`. """ + SqlPoolVulnerabilityAssessmentRecurringScansArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_subscription_admins_enabled=email_subscription_admins_enabled, + emails=emails, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_subscription_admins_enabled: Optional[pulumi.Input[bool]] = None, + emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_subscription_admins_enabled is None and 'emailSubscriptionAdminsEnabled' in kwargs: + email_subscription_admins_enabled = kwargs['emailSubscriptionAdminsEnabled'] + if email_subscription_admins_enabled is not None: - pulumi.set(__self__, "email_subscription_admins_enabled", email_subscription_admins_enabled) + _setter("email_subscription_admins_enabled", email_subscription_admins_enabled) if emails is not None: - pulumi.set(__self__, "emails", emails) + _setter("emails", emails) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="emailSubscriptionAdminsEnabled") @@ -323,9 +459,34 @@ def __init__(__self__, *, :param pulumi.Input[str] object_id: The object id of the Azure AD Administrator of this Synapse Workspace. :param pulumi.Input[str] tenant_id: The tenant id of the Azure AD Administrator of this Synapse Workspace. """ - pulumi.set(__self__, "login", login) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "tenant_id", tenant_id) + WorkspaceAadAdminArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + object_id=object_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("login", login) + _setter("object_id", object_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -383,15 +544,62 @@ def __init__(__self__, *, :param pulumi.Input[str] last_commit_id: The last commit ID. :param pulumi.Input[str] tenant_id: the ID of the tenant for the Azure DevOps account. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "branch_name", branch_name) - pulumi.set(__self__, "project_name", project_name) - pulumi.set(__self__, "repository_name", repository_name) - pulumi.set(__self__, "root_folder", root_folder) + WorkspaceAzureDevopsRepoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + branch_name=branch_name, + project_name=project_name, + repository_name=repository_name, + root_folder=root_folder, + last_commit_id=last_commit_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + branch_name: Optional[pulumi.Input[str]] = None, + project_name: Optional[pulumi.Input[str]] = None, + repository_name: Optional[pulumi.Input[str]] = None, + root_folder: Optional[pulumi.Input[str]] = None, + last_commit_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if branch_name is None and 'branchName' in kwargs: + branch_name = kwargs['branchName'] + if branch_name is None: + raise TypeError("Missing 'branch_name' argument") + if project_name is None and 'projectName' in kwargs: + project_name = kwargs['projectName'] + if project_name is None: + raise TypeError("Missing 'project_name' argument") + if repository_name is None and 'repositoryName' in kwargs: + repository_name = kwargs['repositoryName'] + if repository_name is None: + raise TypeError("Missing 'repository_name' argument") + if root_folder is None and 'rootFolder' in kwargs: + root_folder = kwargs['rootFolder'] + if root_folder is None: + raise TypeError("Missing 'root_folder' argument") + if last_commit_id is None and 'lastCommitId' in kwargs: + last_commit_id = kwargs['lastCommitId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("account_name", account_name) + _setter("branch_name", branch_name) + _setter("project_name", project_name) + _setter("repository_name", repository_name) + _setter("root_folder", root_folder) if last_commit_id is not None: - pulumi.set(__self__, "last_commit_id", last_commit_id) + _setter("last_commit_id", last_commit_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="accountName") @@ -487,9 +695,28 @@ def __init__(__self__, *, :param pulumi.Input[str] key_versionless_id: The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption (e.g. `https://example-keyvault.vault.azure.net/type/cmk/`). :param pulumi.Input[str] key_name: An identifier for the key. Name needs to match the name of the key used with the `synapse.WorkspaceKey` resource. Defaults to "cmk" if not specified. """ - pulumi.set(__self__, "key_versionless_id", key_versionless_id) + WorkspaceCustomerManagedKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_versionless_id=key_versionless_id, + key_name=key_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_versionless_id: Optional[pulumi.Input[str]] = None, + key_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_versionless_id is None and 'keyVersionlessId' in kwargs: + key_versionless_id = kwargs['keyVersionlessId'] + if key_versionless_id is None: + raise TypeError("Missing 'key_versionless_id' argument") + if key_name is None and 'keyName' in kwargs: + key_name = kwargs['keyName'] + + _setter("key_versionless_id", key_versionless_id) if key_name is not None: - pulumi.set(__self__, "key_name", key_name) + _setter("key_name", key_name) @property @pulumi.getter(name="keyVersionlessId") @@ -535,14 +762,55 @@ def __init__(__self__, *, > **Note:** You must log in to the Synapse UI to complete the authentication to the GitHub repository. :param pulumi.Input[str] last_commit_id: The last commit ID. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "branch_name", branch_name) - pulumi.set(__self__, "repository_name", repository_name) - pulumi.set(__self__, "root_folder", root_folder) + WorkspaceGithubRepoArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + branch_name=branch_name, + repository_name=repository_name, + root_folder=root_folder, + git_url=git_url, + last_commit_id=last_commit_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[pulumi.Input[str]] = None, + branch_name: Optional[pulumi.Input[str]] = None, + repository_name: Optional[pulumi.Input[str]] = None, + root_folder: Optional[pulumi.Input[str]] = None, + git_url: Optional[pulumi.Input[str]] = None, + last_commit_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if branch_name is None and 'branchName' in kwargs: + branch_name = kwargs['branchName'] + if branch_name is None: + raise TypeError("Missing 'branch_name' argument") + if repository_name is None and 'repositoryName' in kwargs: + repository_name = kwargs['repositoryName'] + if repository_name is None: + raise TypeError("Missing 'repository_name' argument") + if root_folder is None and 'rootFolder' in kwargs: + root_folder = kwargs['rootFolder'] + if root_folder is None: + raise TypeError("Missing 'root_folder' argument") + if git_url is None and 'gitUrl' in kwargs: + git_url = kwargs['gitUrl'] + if last_commit_id is None and 'lastCommitId' in kwargs: + last_commit_id = kwargs['lastCommitId'] + + _setter("account_name", account_name) + _setter("branch_name", branch_name) + _setter("repository_name", repository_name) + _setter("root_folder", root_folder) if git_url is not None: - pulumi.set(__self__, "git_url", git_url) + _setter("git_url", git_url) if last_commit_id is not None: - pulumi.set(__self__, "last_commit_id", last_commit_id) + _setter("last_commit_id", last_commit_id) @property @pulumi.getter(name="accountName") @@ -634,13 +902,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Synapse Workspace. :param pulumi.Input[str] tenant_id: The tenant id of the Azure AD Administrator of this Synapse Workspace. """ - pulumi.set(__self__, "type", type) + WorkspaceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -704,9 +997,34 @@ def __init__(__self__, *, :param pulumi.Input[str] object_id: The object id of the Azure AD Administrator of this Synapse Workspace SQL. :param pulumi.Input[str] tenant_id: The tenant id of the Azure AD Administrator of this Synapse Workspace SQL. """ - pulumi.set(__self__, "login", login) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "tenant_id", tenant_id) + WorkspaceSqlAadAdminArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + object_id=object_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("login", login) + _setter("object_id", object_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -756,12 +1074,29 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] emails: Specifies an array of email addresses to which the scan notification is sent. :param pulumi.Input[bool] enabled: Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to `false`. """ + WorkspaceVulnerabilityAssessmentRecurringScansArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_subscription_admins_enabled=email_subscription_admins_enabled, + emails=emails, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_subscription_admins_enabled: Optional[pulumi.Input[bool]] = None, + emails: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_subscription_admins_enabled is None and 'emailSubscriptionAdminsEnabled' in kwargs: + email_subscription_admins_enabled = kwargs['emailSubscriptionAdminsEnabled'] + if email_subscription_admins_enabled is not None: - pulumi.set(__self__, "email_subscription_admins_enabled", email_subscription_admins_enabled) + _setter("email_subscription_admins_enabled", email_subscription_admins_enabled) if emails is not None: - pulumi.set(__self__, "emails", emails) + _setter("emails", emails) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="emailSubscriptionAdminsEnabled") diff --git a/sdk/python/pulumi_azure/synapse/firewall_rule.py b/sdk/python/pulumi_azure/synapse/firewall_rule.py index 164e978305..df70b5c28f 100644 --- a/sdk/python/pulumi_azure/synapse/firewall_rule.py +++ b/sdk/python/pulumi_azure/synapse/firewall_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['FirewallRuleArgs', 'FirewallRule'] @@ -29,11 +29,40 @@ def __init__(__self__, *, :param pulumi.Input[str] synapse_workspace_id: The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created. :param pulumi.Input[str] name: The Name of the firewall rule. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "end_ip_address", end_ip_address) - pulumi.set(__self__, "start_ip_address", start_ip_address) - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + FirewallRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + start_ip_address=start_ip_address, + synapse_workspace_id=synapse_workspace_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if end_ip_address is None: + raise TypeError("Missing 'end_ip_address' argument") + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if start_ip_address is None: + raise TypeError("Missing 'start_ip_address' argument") + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if synapse_workspace_id is None: + raise TypeError("Missing 'synapse_workspace_id' argument") + + _setter("end_ip_address", end_ip_address) + _setter("start_ip_address", start_ip_address) + _setter("synapse_workspace_id", synapse_workspace_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="endIpAddress") @@ -106,14 +135,37 @@ def __init__(__self__, *, :param pulumi.Input[str] start_ip_address: The starting IP address to allow through the firewall for this rule. :param pulumi.Input[str] synapse_workspace_id: The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created. """ + _FirewallRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + end_ip_address=end_ip_address, + name=name, + start_ip_address=start_ip_address, + synapse_workspace_id=synapse_workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + end_ip_address: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + start_ip_address: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_ip_address is None and 'endIpAddress' in kwargs: + end_ip_address = kwargs['endIpAddress'] + if start_ip_address is None and 'startIpAddress' in kwargs: + start_ip_address = kwargs['startIpAddress'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if end_ip_address is not None: - pulumi.set(__self__, "end_ip_address", end_ip_address) + _setter("end_ip_address", end_ip_address) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if start_ip_address is not None: - pulumi.set(__self__, "start_ip_address", start_ip_address) + _setter("start_ip_address", start_ip_address) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) @property @pulumi.getter(name="endIpAddress") @@ -287,6 +339,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FirewallRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/get_workspace.py b/sdk/python/pulumi_azure/synapse/get_workspace.py index 8e97f1dcfb..0cd81f87eb 100644 --- a/sdk/python/pulumi_azure/synapse/get_workspace.py +++ b/sdk/python/pulumi_azure/synapse/get_workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/synapse/integration_runtime_azure.py b/sdk/python/pulumi_azure/synapse/integration_runtime_azure.py index 25bd263d3a..902e43ffc5 100644 --- a/sdk/python/pulumi_azure/synapse/integration_runtime_azure.py +++ b/sdk/python/pulumi_azure/synapse/integration_runtime_azure.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IntegrationRuntimeAzureArgs', 'IntegrationRuntimeAzure'] @@ -31,19 +31,52 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Synapse Azure Integration Runtime. Changing this forces a new Synapse Azure Integration Runtime to be created. :param pulumi.Input[int] time_to_live_min: Time to live (in minutes) setting of the cluster which will execute data flow job. Defaults to `0`. """ - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + IntegrationRuntimeAzureArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + synapse_workspace_id=synapse_workspace_id, + compute_type=compute_type, + core_count=core_count, + description=description, + location=location, + name=name, + time_to_live_min=time_to_live_min, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + compute_type: Optional[pulumi.Input[str]] = None, + core_count: Optional[pulumi.Input[int]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + time_to_live_min: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if synapse_workspace_id is None: + raise TypeError("Missing 'synapse_workspace_id' argument") + if compute_type is None and 'computeType' in kwargs: + compute_type = kwargs['computeType'] + if core_count is None and 'coreCount' in kwargs: + core_count = kwargs['coreCount'] + if time_to_live_min is None and 'timeToLiveMin' in kwargs: + time_to_live_min = kwargs['timeToLiveMin'] + + _setter("synapse_workspace_id", synapse_workspace_id) if compute_type is not None: - pulumi.set(__self__, "compute_type", compute_type) + _setter("compute_type", compute_type) if core_count is not None: - pulumi.set(__self__, "core_count", core_count) + _setter("core_count", core_count) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if time_to_live_min is not None: - pulumi.set(__self__, "time_to_live_min", time_to_live_min) + _setter("time_to_live_min", time_to_live_min) @property @pulumi.getter(name="synapseWorkspaceId") @@ -150,20 +183,51 @@ def __init__(__self__, *, :param pulumi.Input[str] synapse_workspace_id: The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Azure Integration Runtime to be created. :param pulumi.Input[int] time_to_live_min: Time to live (in minutes) setting of the cluster which will execute data flow job. Defaults to `0`. """ + _IntegrationRuntimeAzureState._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_type=compute_type, + core_count=core_count, + description=description, + location=location, + name=name, + synapse_workspace_id=synapse_workspace_id, + time_to_live_min=time_to_live_min, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_type: Optional[pulumi.Input[str]] = None, + core_count: Optional[pulumi.Input[int]] = None, + description: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + time_to_live_min: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_type is None and 'computeType' in kwargs: + compute_type = kwargs['computeType'] + if core_count is None and 'coreCount' in kwargs: + core_count = kwargs['coreCount'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if time_to_live_min is None and 'timeToLiveMin' in kwargs: + time_to_live_min = kwargs['timeToLiveMin'] + if compute_type is not None: - pulumi.set(__self__, "compute_type", compute_type) + _setter("compute_type", compute_type) if core_count is not None: - pulumi.set(__self__, "core_count", core_count) + _setter("core_count", core_count) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) if time_to_live_min is not None: - pulumi.set(__self__, "time_to_live_min", time_to_live_min) + _setter("time_to_live_min", time_to_live_min) @property @pulumi.getter(name="computeType") @@ -381,6 +445,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationRuntimeAzureArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/integration_runtime_self_hosted.py b/sdk/python/pulumi_azure/synapse/integration_runtime_self_hosted.py index f1749c6ec8..838e043d6d 100644 --- a/sdk/python/pulumi_azure/synapse/integration_runtime_self_hosted.py +++ b/sdk/python/pulumi_azure/synapse/integration_runtime_self_hosted.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['IntegrationRuntimeSelfHostedArgs', 'IntegrationRuntimeSelfHosted'] @@ -23,11 +23,30 @@ def __init__(__self__, *, :param pulumi.Input[str] description: Integration runtime description. :param pulumi.Input[str] name: The name which should be used for this Synapse Self-hosted Integration Runtime. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. """ - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + IntegrationRuntimeSelfHostedArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + synapse_workspace_id=synapse_workspace_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if synapse_workspace_id is None: + raise TypeError("Missing 'synapse_workspace_id' argument") + + _setter("synapse_workspace_id", synapse_workspace_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="synapseWorkspaceId") @@ -82,16 +101,41 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Synapse Self-hosted Integration Runtime. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. :param pulumi.Input[str] synapse_workspace_id: The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. """ + _IntegrationRuntimeSelfHostedState._configure( + lambda key, value: pulumi.set(__self__, key, value), + authorization_key_primary=authorization_key_primary, + authorization_key_secondary=authorization_key_secondary, + description=description, + name=name, + synapse_workspace_id=synapse_workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authorization_key_primary: Optional[pulumi.Input[str]] = None, + authorization_key_secondary: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authorization_key_primary is None and 'authorizationKeyPrimary' in kwargs: + authorization_key_primary = kwargs['authorizationKeyPrimary'] + if authorization_key_secondary is None and 'authorizationKeySecondary' in kwargs: + authorization_key_secondary = kwargs['authorizationKeySecondary'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if authorization_key_primary is not None: - pulumi.set(__self__, "authorization_key_primary", authorization_key_primary) + _setter("authorization_key_primary", authorization_key_primary) if authorization_key_secondary is not None: - pulumi.set(__self__, "authorization_key_secondary", authorization_key_secondary) + _setter("authorization_key_secondary", authorization_key_secondary) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) @property @pulumi.getter(name="authorizationKeyPrimary") @@ -273,6 +317,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + IntegrationRuntimeSelfHostedArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/linked_service.py b/sdk/python/pulumi_azure/synapse/linked_service.py index a67ace2dee..ff73763ea7 100644 --- a/sdk/python/pulumi_azure/synapse/linked_service.py +++ b/sdk/python/pulumi_azure/synapse/linked_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -45,21 +45,62 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Synapse Linked Service. Changing this forces a new Synapse Linked Service to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of parameters to associate with the Synapse Linked Service. """ - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) - pulumi.set(__self__, "type", type) - pulumi.set(__self__, "type_properties_json", type_properties_json) + LinkedServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + synapse_workspace_id=synapse_workspace_id, + type=type, + type_properties_json=type_properties_json, + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime=integration_runtime, + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + type_properties_json: Optional[pulumi.Input[str]] = None, + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime: Optional[pulumi.Input['LinkedServiceIntegrationRuntimeArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if synapse_workspace_id is None: + raise TypeError("Missing 'synapse_workspace_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if type_properties_json is None and 'typePropertiesJson' in kwargs: + type_properties_json = kwargs['typePropertiesJson'] + if type_properties_json is None: + raise TypeError("Missing 'type_properties_json' argument") + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime is None and 'integrationRuntime' in kwargs: + integration_runtime = kwargs['integrationRuntime'] + + _setter("synapse_workspace_id", synapse_workspace_id) + _setter("type", type) + _setter("type_properties_json", type_properties_json) if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime is not None: - pulumi.set(__self__, "integration_runtime", integration_runtime) + _setter("integration_runtime", integration_runtime) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter(name="synapseWorkspaceId") @@ -210,24 +251,59 @@ def __init__(__self__, *, `SapTable`, `ServiceNow`, `Sftp`, `SharePointOnlineList`, `Shopify`, `Snowflake`, `Spark`, `Square`, `Sybase`, `Teradata`, `Vertica`, `Web`, `Xero`, `Zoho`. :param pulumi.Input[str] type_properties_json: A JSON object that contains the properties of the Synapse Linked Service. """ + _LinkedServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + additional_properties=additional_properties, + annotations=annotations, + description=description, + integration_runtime=integration_runtime, + name=name, + parameters=parameters, + synapse_workspace_id=synapse_workspace_id, + type=type, + type_properties_json=type_properties_json, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + annotations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + integration_runtime: Optional[pulumi.Input['LinkedServiceIntegrationRuntimeArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + type_properties_json: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if additional_properties is None and 'additionalProperties' in kwargs: + additional_properties = kwargs['additionalProperties'] + if integration_runtime is None and 'integrationRuntime' in kwargs: + integration_runtime = kwargs['integrationRuntime'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if type_properties_json is None and 'typePropertiesJson' in kwargs: + type_properties_json = kwargs['typePropertiesJson'] + if additional_properties is not None: - pulumi.set(__self__, "additional_properties", additional_properties) + _setter("additional_properties", additional_properties) if annotations is not None: - pulumi.set(__self__, "annotations", annotations) + _setter("annotations", annotations) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if integration_runtime is not None: - pulumi.set(__self__, "integration_runtime", integration_runtime) + _setter("integration_runtime", integration_runtime) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if type_properties_json is not None: - pulumi.set(__self__, "type_properties_json", type_properties_json) + _setter("type_properties_json", type_properties_json) @property @pulumi.getter(name="additionalProperties") @@ -507,6 +583,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LinkedServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -533,6 +613,11 @@ def _internal_init(__self__, __props__.__dict__["additional_properties"] = additional_properties __props__.__dict__["annotations"] = annotations __props__.__dict__["description"] = description + if integration_runtime is not None and not isinstance(integration_runtime, LinkedServiceIntegrationRuntimeArgs): + integration_runtime = integration_runtime or {} + def _setter(key, value): + integration_runtime[key] = value + LinkedServiceIntegrationRuntimeArgs._configure(_setter, **integration_runtime) __props__.__dict__["integration_runtime"] = integration_runtime __props__.__dict__["name"] = name __props__.__dict__["parameters"] = parameters diff --git a/sdk/python/pulumi_azure/synapse/managed_private_endpoint.py b/sdk/python/pulumi_azure/synapse/managed_private_endpoint.py index 3399d63c99..d9601ef224 100644 --- a/sdk/python/pulumi_azure/synapse/managed_private_endpoint.py +++ b/sdk/python/pulumi_azure/synapse/managed_private_endpoint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ManagedPrivateEndpointArgs', 'ManagedPrivateEndpoint'] @@ -29,11 +29,40 @@ def __init__(__self__, *, :param pulumi.Input[str] target_resource_id: The ID of the Private Link Enabled Remote Resource which this Synapse Private Endpoint should be connected to. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "subresource_name", subresource_name) - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) - pulumi.set(__self__, "target_resource_id", target_resource_id) + ManagedPrivateEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subresource_name=subresource_name, + synapse_workspace_id=synapse_workspace_id, + target_resource_id=target_resource_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subresource_name: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subresource_name is None and 'subresourceName' in kwargs: + subresource_name = kwargs['subresourceName'] + if subresource_name is None: + raise TypeError("Missing 'subresource_name' argument") + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if synapse_workspace_id is None: + raise TypeError("Missing 'synapse_workspace_id' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + + _setter("subresource_name", subresource_name) + _setter("synapse_workspace_id", synapse_workspace_id) + _setter("target_resource_id", target_resource_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="subresourceName") @@ -106,14 +135,37 @@ def __init__(__self__, *, > **NOTE:** A Synapse firewall rule including local IP is needed for managing current resource. :param pulumi.Input[str] target_resource_id: The ID of the Private Link Enabled Remote Resource which this Synapse Private Endpoint should be connected to. Changing this forces a new resource to be created. """ + _ManagedPrivateEndpointState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + subresource_name=subresource_name, + synapse_workspace_id=synapse_workspace_id, + target_resource_id=target_resource_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + subresource_name: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subresource_name is None and 'subresourceName' in kwargs: + subresource_name = kwargs['subresourceName'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if subresource_name is not None: - pulumi.set(__self__, "subresource_name", subresource_name) + _setter("subresource_name", subresource_name) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) @property @pulumi.getter @@ -311,6 +363,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ManagedPrivateEndpointArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/outputs.py b/sdk/python/pulumi_azure/synapse/outputs.py index 3ba3c9b01b..f16ab7fb7f 100644 --- a/sdk/python/pulumi_azure/synapse/outputs.py +++ b/sdk/python/pulumi_azure/synapse/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -37,9 +37,24 @@ def __init__(__self__, *, :param str name: The integration runtime reference to associate with the Synapse Linked Service. :param Mapping[str, str] parameters: A map of parameters to associate with the integration runtime. """ - pulumi.set(__self__, "name", name) + LinkedServiceIntegrationRuntime._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + parameters=parameters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + parameters: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + + _setter("name", name) if parameters is not None: - pulumi.set(__self__, "parameters", parameters) + _setter("parameters", parameters) @property @pulumi.getter @@ -82,7 +97,22 @@ def __init__(__self__, *, """ :param int delay_in_minutes: Number of minutes of idle time before the Spark Pool is automatically paused. Must be between `5` and `10080`. """ - pulumi.set(__self__, "delay_in_minutes", delay_in_minutes) + SparkPoolAutoPause._configure( + lambda key, value: pulumi.set(__self__, key, value), + delay_in_minutes=delay_in_minutes, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + delay_in_minutes: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if delay_in_minutes is None and 'delayInMinutes' in kwargs: + delay_in_minutes = kwargs['delayInMinutes'] + if delay_in_minutes is None: + raise TypeError("Missing 'delay_in_minutes' argument") + + _setter("delay_in_minutes", delay_in_minutes) @property @pulumi.getter(name="delayInMinutes") @@ -121,8 +151,29 @@ def __init__(__self__, *, :param int max_node_count: The maximum number of nodes the Spark Pool can support. Must be between `3` and `200`. :param int min_node_count: The minimum number of nodes the Spark Pool can support. Must be between `3` and `200`. """ - pulumi.set(__self__, "max_node_count", max_node_count) - pulumi.set(__self__, "min_node_count", min_node_count) + SparkPoolAutoScale._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_node_count=max_node_count, + min_node_count=min_node_count, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_node_count: Optional[int] = None, + min_node_count: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_node_count is None and 'maxNodeCount' in kwargs: + max_node_count = kwargs['maxNodeCount'] + if max_node_count is None: + raise TypeError("Missing 'max_node_count' argument") + if min_node_count is None and 'minNodeCount' in kwargs: + min_node_count = kwargs['minNodeCount'] + if min_node_count is None: + raise TypeError("Missing 'min_node_count' argument") + + _setter("max_node_count", max_node_count) + _setter("min_node_count", min_node_count) @property @pulumi.getter(name="maxNodeCount") @@ -150,8 +201,25 @@ def __init__(__self__, *, :param str content: The content of library requirements. :param str filename: The name of the library requirements file. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "filename", filename) + SparkPoolLibraryRequirement._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + filename=filename, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[str] = None, + filename: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if filename is None: + raise TypeError("Missing 'filename' argument") + + _setter("content", content) + _setter("filename", filename) @property @pulumi.getter @@ -179,8 +247,25 @@ def __init__(__self__, *, :param str content: The contents of a spark configuration. :param str filename: The name of the file where the spark configuration `content` will be stored. """ - pulumi.set(__self__, "content", content) - pulumi.set(__self__, "filename", filename) + SparkPoolSparkConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + content=content, + filename=filename, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + content: Optional[str] = None, + filename: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if content is None: + raise TypeError("Missing 'content' argument") + if filename is None: + raise TypeError("Missing 'filename' argument") + + _setter("content", content) + _setter("filename", filename) @property @pulumi.getter @@ -227,8 +312,29 @@ def __init__(__self__, *, :param str point_in_time: Specifies the Snapshot time to restore formatted as an RFC3339 date string. Changing this forces a new Synapse SQL Pool to be created. :param str source_database_id: The ID of the Synapse SQL Pool or SQL Database which is to restore. Changing this forces a new Synapse SQL Pool to be created. """ - pulumi.set(__self__, "point_in_time", point_in_time) - pulumi.set(__self__, "source_database_id", source_database_id) + SqlPoolRestore._configure( + lambda key, value: pulumi.set(__self__, key, value), + point_in_time=point_in_time, + source_database_id=source_database_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + point_in_time: Optional[str] = None, + source_database_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if point_in_time is None and 'pointInTime' in kwargs: + point_in_time = kwargs['pointInTime'] + if point_in_time is None: + raise TypeError("Missing 'point_in_time' argument") + if source_database_id is None and 'sourceDatabaseId' in kwargs: + source_database_id = kwargs['sourceDatabaseId'] + if source_database_id is None: + raise TypeError("Missing 'source_database_id' argument") + + _setter("point_in_time", point_in_time) + _setter("source_database_id", source_database_id) @property @pulumi.getter(name="pointInTime") @@ -254,7 +360,20 @@ def __init__(__self__, *, """ :param Sequence[str] results: Specifies a list of rule baseline result. """ - pulumi.set(__self__, "results", results) + SqlPoolVulnerabilityAssessmentBaselineBaseline._configure( + lambda key, value: pulumi.set(__self__, key, value), + results=results, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + results: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if results is None: + raise TypeError("Missing 'results' argument") + + _setter("results", results) @property @pulumi.getter @@ -293,12 +412,29 @@ def __init__(__self__, *, :param Sequence[str] emails: Specifies an array of email addresses to which the scan notification is sent. :param bool enabled: Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to `false`. """ + SqlPoolVulnerabilityAssessmentRecurringScans._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_subscription_admins_enabled=email_subscription_admins_enabled, + emails=emails, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_subscription_admins_enabled: Optional[bool] = None, + emails: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_subscription_admins_enabled is None and 'emailSubscriptionAdminsEnabled' in kwargs: + email_subscription_admins_enabled = kwargs['emailSubscriptionAdminsEnabled'] + if email_subscription_admins_enabled is not None: - pulumi.set(__self__, "email_subscription_admins_enabled", email_subscription_admins_enabled) + _setter("email_subscription_admins_enabled", email_subscription_admins_enabled) if emails is not None: - pulumi.set(__self__, "emails", emails) + _setter("emails", emails) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="emailSubscriptionAdminsEnabled") @@ -355,9 +491,34 @@ def __init__(__self__, *, :param str object_id: The object id of the Azure AD Administrator of this Synapse Workspace. :param str tenant_id: The tenant id of the Azure AD Administrator of this Synapse Workspace. """ - pulumi.set(__self__, "login", login) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "tenant_id", tenant_id) + WorkspaceAadAdmin._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + object_id=object_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[str] = None, + object_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("login", login) + _setter("object_id", object_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -432,15 +593,62 @@ def __init__(__self__, *, :param str last_commit_id: The last commit ID. :param str tenant_id: the ID of the tenant for the Azure DevOps account. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "branch_name", branch_name) - pulumi.set(__self__, "project_name", project_name) - pulumi.set(__self__, "repository_name", repository_name) - pulumi.set(__self__, "root_folder", root_folder) + WorkspaceAzureDevopsRepo._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + branch_name=branch_name, + project_name=project_name, + repository_name=repository_name, + root_folder=root_folder, + last_commit_id=last_commit_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[str] = None, + branch_name: Optional[str] = None, + project_name: Optional[str] = None, + repository_name: Optional[str] = None, + root_folder: Optional[str] = None, + last_commit_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if branch_name is None and 'branchName' in kwargs: + branch_name = kwargs['branchName'] + if branch_name is None: + raise TypeError("Missing 'branch_name' argument") + if project_name is None and 'projectName' in kwargs: + project_name = kwargs['projectName'] + if project_name is None: + raise TypeError("Missing 'project_name' argument") + if repository_name is None and 'repositoryName' in kwargs: + repository_name = kwargs['repositoryName'] + if repository_name is None: + raise TypeError("Missing 'repository_name' argument") + if root_folder is None and 'rootFolder' in kwargs: + root_folder = kwargs['rootFolder'] + if root_folder is None: + raise TypeError("Missing 'root_folder' argument") + if last_commit_id is None and 'lastCommitId' in kwargs: + last_commit_id = kwargs['lastCommitId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("account_name", account_name) + _setter("branch_name", branch_name) + _setter("project_name", project_name) + _setter("repository_name", repository_name) + _setter("root_folder", root_folder) if last_commit_id is not None: - pulumi.set(__self__, "last_commit_id", last_commit_id) + _setter("last_commit_id", last_commit_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter(name="accountName") @@ -527,9 +735,28 @@ def __init__(__self__, *, :param str key_versionless_id: The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption (e.g. `https://example-keyvault.vault.azure.net/type/cmk/`). :param str key_name: An identifier for the key. Name needs to match the name of the key used with the `synapse.WorkspaceKey` resource. Defaults to "cmk" if not specified. """ - pulumi.set(__self__, "key_versionless_id", key_versionless_id) + WorkspaceCustomerManagedKey._configure( + lambda key, value: pulumi.set(__self__, key, value), + key_versionless_id=key_versionless_id, + key_name=key_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key_versionless_id: Optional[str] = None, + key_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if key_versionless_id is None and 'keyVersionlessId' in kwargs: + key_versionless_id = kwargs['keyVersionlessId'] + if key_versionless_id is None: + raise TypeError("Missing 'key_versionless_id' argument") + if key_name is None and 'keyName' in kwargs: + key_name = kwargs['keyName'] + + _setter("key_versionless_id", key_versionless_id) if key_name is not None: - pulumi.set(__self__, "key_name", key_name) + _setter("key_name", key_name) @property @pulumi.getter(name="keyVersionlessId") @@ -594,14 +821,55 @@ def __init__(__self__, *, > **Note:** You must log in to the Synapse UI to complete the authentication to the GitHub repository. :param str last_commit_id: The last commit ID. """ - pulumi.set(__self__, "account_name", account_name) - pulumi.set(__self__, "branch_name", branch_name) - pulumi.set(__self__, "repository_name", repository_name) - pulumi.set(__self__, "root_folder", root_folder) + WorkspaceGithubRepo._configure( + lambda key, value: pulumi.set(__self__, key, value), + account_name=account_name, + branch_name=branch_name, + repository_name=repository_name, + root_folder=root_folder, + git_url=git_url, + last_commit_id=last_commit_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + account_name: Optional[str] = None, + branch_name: Optional[str] = None, + repository_name: Optional[str] = None, + root_folder: Optional[str] = None, + git_url: Optional[str] = None, + last_commit_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if account_name is None and 'accountName' in kwargs: + account_name = kwargs['accountName'] + if account_name is None: + raise TypeError("Missing 'account_name' argument") + if branch_name is None and 'branchName' in kwargs: + branch_name = kwargs['branchName'] + if branch_name is None: + raise TypeError("Missing 'branch_name' argument") + if repository_name is None and 'repositoryName' in kwargs: + repository_name = kwargs['repositoryName'] + if repository_name is None: + raise TypeError("Missing 'repository_name' argument") + if root_folder is None and 'rootFolder' in kwargs: + root_folder = kwargs['rootFolder'] + if root_folder is None: + raise TypeError("Missing 'root_folder' argument") + if git_url is None and 'gitUrl' in kwargs: + git_url = kwargs['gitUrl'] + if last_commit_id is None and 'lastCommitId' in kwargs: + last_commit_id = kwargs['lastCommitId'] + + _setter("account_name", account_name) + _setter("branch_name", branch_name) + _setter("repository_name", repository_name) + _setter("root_folder", root_folder) if git_url is not None: - pulumi.set(__self__, "git_url", git_url) + _setter("git_url", git_url) if last_commit_id is not None: - pulumi.set(__self__, "last_commit_id", last_commit_id) + _setter("last_commit_id", last_commit_id) @property @pulumi.getter(name="accountName") @@ -690,13 +958,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID for the Service Principal associated with the Managed Service Identity of this Synapse Workspace. :param str tenant_id: The tenant id of the Azure AD Administrator of this Synapse Workspace. """ - pulumi.set(__self__, "type", type) + WorkspaceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -763,9 +1056,34 @@ def __init__(__self__, *, :param str object_id: The object id of the Azure AD Administrator of this Synapse Workspace SQL. :param str tenant_id: The tenant id of the Azure AD Administrator of this Synapse Workspace SQL. """ - pulumi.set(__self__, "login", login) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "tenant_id", tenant_id) + WorkspaceSqlAadAdmin._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + object_id=object_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[str] = None, + object_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("login", login) + _setter("object_id", object_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -820,12 +1138,29 @@ def __init__(__self__, *, :param Sequence[str] emails: Specifies an array of email addresses to which the scan notification is sent. :param bool enabled: Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to `false`. """ + WorkspaceVulnerabilityAssessmentRecurringScans._configure( + lambda key, value: pulumi.set(__self__, key, value), + email_subscription_admins_enabled=email_subscription_admins_enabled, + emails=emails, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email_subscription_admins_enabled: Optional[bool] = None, + emails: Optional[Sequence[str]] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if email_subscription_admins_enabled is None and 'emailSubscriptionAdminsEnabled' in kwargs: + email_subscription_admins_enabled = kwargs['emailSubscriptionAdminsEnabled'] + if email_subscription_admins_enabled is not None: - pulumi.set(__self__, "email_subscription_admins_enabled", email_subscription_admins_enabled) + _setter("email_subscription_admins_enabled", email_subscription_admins_enabled) if emails is not None: - pulumi.set(__self__, "emails", emails) + _setter("emails", emails) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter(name="emailSubscriptionAdminsEnabled") @@ -864,10 +1199,41 @@ def __init__(__self__, *, :param str tenant_id: The Tenant ID for the Service Principal associated with the Managed Service Identity of this Synapse Workspace. :param str type: The Identity Type for the Service Principal associated with the Managed Service Identity of this Synapse Workspace. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "tenant_id", tenant_id) - pulumi.set(__self__, "type", type) + GetWorkspaceIdentityResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("principal_id", principal_id) + _setter("tenant_id", tenant_id) + _setter("type", type) @property @pulumi.getter(name="identityIds") diff --git a/sdk/python/pulumi_azure/synapse/private_link_hub.py b/sdk/python/pulumi_azure/synapse/private_link_hub.py index eca6102b3e..14057b350b 100644 --- a/sdk/python/pulumi_azure/synapse/private_link_hub.py +++ b/sdk/python/pulumi_azure/synapse/private_link_hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['PrivateLinkHubArgs', 'PrivateLinkHub'] @@ -25,13 +25,34 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Synapse Private Link Hub. Changing this forces a new Synapse Private Link Hub to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Synapse Private Link Hub. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) + PrivateLinkHubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + + _setter("resource_group_name", resource_group_name) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -96,14 +117,33 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Synapse Private Link Hub. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Synapse Private Link Hub. """ + _PrivateLinkHubState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -231,6 +271,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PrivateLinkHubArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/role_assignment.py b/sdk/python/pulumi_azure/synapse/role_assignment.py index 4877f288f4..e6b04027a8 100644 --- a/sdk/python/pulumi_azure/synapse/role_assignment.py +++ b/sdk/python/pulumi_azure/synapse/role_assignment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['RoleAssignmentArgs', 'RoleAssignment'] @@ -31,12 +31,41 @@ def __init__(__self__, *, > **NOTE:** A Synapse firewall rule including local IP is needed to allow access. Only one of `synapse_workspace_id`, `synapse_spark_pool_id` must be set. :param pulumi.Input[str] synapse_workspace_id: The Synapse Workspace which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "principal_id", principal_id) - pulumi.set(__self__, "role_name", role_name) + RoleAssignmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + role_name=role_name, + synapse_spark_pool_id=synapse_spark_pool_id, + synapse_workspace_id=synapse_workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[pulumi.Input[str]] = None, + role_name: Optional[pulumi.Input[str]] = None, + synapse_spark_pool_id: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if principal_id is None: + raise TypeError("Missing 'principal_id' argument") + if role_name is None and 'roleName' in kwargs: + role_name = kwargs['roleName'] + if role_name is None: + raise TypeError("Missing 'role_name' argument") + if synapse_spark_pool_id is None and 'synapseSparkPoolId' in kwargs: + synapse_spark_pool_id = kwargs['synapseSparkPoolId'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + + _setter("principal_id", principal_id) + _setter("role_name", role_name) if synapse_spark_pool_id is not None: - pulumi.set(__self__, "synapse_spark_pool_id", synapse_spark_pool_id) + _setter("synapse_spark_pool_id", synapse_spark_pool_id) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) @property @pulumi.getter(name="principalId") @@ -113,14 +142,39 @@ def __init__(__self__, *, > **NOTE:** A Synapse firewall rule including local IP is needed to allow access. Only one of `synapse_workspace_id`, `synapse_spark_pool_id` must be set. :param pulumi.Input[str] synapse_workspace_id: The Synapse Workspace which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. """ + _RoleAssignmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + principal_id=principal_id, + role_name=role_name, + synapse_spark_pool_id=synapse_spark_pool_id, + synapse_workspace_id=synapse_workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + principal_id: Optional[pulumi.Input[str]] = None, + role_name: Optional[pulumi.Input[str]] = None, + synapse_spark_pool_id: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if role_name is None and 'roleName' in kwargs: + role_name = kwargs['roleName'] + if synapse_spark_pool_id is None and 'synapseSparkPoolId' in kwargs: + synapse_spark_pool_id = kwargs['synapseSparkPoolId'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if role_name is not None: - pulumi.set(__self__, "role_name", role_name) + _setter("role_name", role_name) if synapse_spark_pool_id is not None: - pulumi.set(__self__, "synapse_spark_pool_id", synapse_spark_pool_id) + _setter("synapse_spark_pool_id", synapse_spark_pool_id) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) @property @pulumi.getter(name="principalId") @@ -310,6 +364,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RoleAssignmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/spark_pool.py b/sdk/python/pulumi_azure/synapse/spark_pool.py index 9521c0611f..0e0d76c4de 100644 --- a/sdk/python/pulumi_azure/synapse/spark_pool.py +++ b/sdk/python/pulumi_azure/synapse/spark_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -57,41 +57,128 @@ def __init__(__self__, *, :param pulumi.Input[str] spark_version: The Apache Spark version. Possible values are `2.4` , `3.1` , `3.2` and `3.3`. Defaults to `2.4`. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Synapse Spark Pool. """ - pulumi.set(__self__, "node_size", node_size) - pulumi.set(__self__, "node_size_family", node_size_family) - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + SparkPoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + node_size=node_size, + node_size_family=node_size_family, + synapse_workspace_id=synapse_workspace_id, + auto_pause=auto_pause, + auto_scale=auto_scale, + cache_size=cache_size, + compute_isolation_enabled=compute_isolation_enabled, + dynamic_executor_allocation_enabled=dynamic_executor_allocation_enabled, + library_requirement=library_requirement, + max_executors=max_executors, + min_executors=min_executors, + name=name, + node_count=node_count, + session_level_packages_enabled=session_level_packages_enabled, + spark_config=spark_config, + spark_events_folder=spark_events_folder, + spark_log_folder=spark_log_folder, + spark_version=spark_version, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + node_size: Optional[pulumi.Input[str]] = None, + node_size_family: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + auto_pause: Optional[pulumi.Input['SparkPoolAutoPauseArgs']] = None, + auto_scale: Optional[pulumi.Input['SparkPoolAutoScaleArgs']] = None, + cache_size: Optional[pulumi.Input[int]] = None, + compute_isolation_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_executor_allocation_enabled: Optional[pulumi.Input[bool]] = None, + library_requirement: Optional[pulumi.Input['SparkPoolLibraryRequirementArgs']] = None, + max_executors: Optional[pulumi.Input[int]] = None, + min_executors: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + node_count: Optional[pulumi.Input[int]] = None, + session_level_packages_enabled: Optional[pulumi.Input[bool]] = None, + spark_config: Optional[pulumi.Input['SparkPoolSparkConfigArgs']] = None, + spark_events_folder: Optional[pulumi.Input[str]] = None, + spark_log_folder: Optional[pulumi.Input[str]] = None, + spark_version: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if node_size is None and 'nodeSize' in kwargs: + node_size = kwargs['nodeSize'] + if node_size is None: + raise TypeError("Missing 'node_size' argument") + if node_size_family is None and 'nodeSizeFamily' in kwargs: + node_size_family = kwargs['nodeSizeFamily'] + if node_size_family is None: + raise TypeError("Missing 'node_size_family' argument") + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if synapse_workspace_id is None: + raise TypeError("Missing 'synapse_workspace_id' argument") + if auto_pause is None and 'autoPause' in kwargs: + auto_pause = kwargs['autoPause'] + if auto_scale is None and 'autoScale' in kwargs: + auto_scale = kwargs['autoScale'] + if cache_size is None and 'cacheSize' in kwargs: + cache_size = kwargs['cacheSize'] + if compute_isolation_enabled is None and 'computeIsolationEnabled' in kwargs: + compute_isolation_enabled = kwargs['computeIsolationEnabled'] + if dynamic_executor_allocation_enabled is None and 'dynamicExecutorAllocationEnabled' in kwargs: + dynamic_executor_allocation_enabled = kwargs['dynamicExecutorAllocationEnabled'] + if library_requirement is None and 'libraryRequirement' in kwargs: + library_requirement = kwargs['libraryRequirement'] + if max_executors is None and 'maxExecutors' in kwargs: + max_executors = kwargs['maxExecutors'] + if min_executors is None and 'minExecutors' in kwargs: + min_executors = kwargs['minExecutors'] + if node_count is None and 'nodeCount' in kwargs: + node_count = kwargs['nodeCount'] + if session_level_packages_enabled is None and 'sessionLevelPackagesEnabled' in kwargs: + session_level_packages_enabled = kwargs['sessionLevelPackagesEnabled'] + if spark_config is None and 'sparkConfig' in kwargs: + spark_config = kwargs['sparkConfig'] + if spark_events_folder is None and 'sparkEventsFolder' in kwargs: + spark_events_folder = kwargs['sparkEventsFolder'] + if spark_log_folder is None and 'sparkLogFolder' in kwargs: + spark_log_folder = kwargs['sparkLogFolder'] + if spark_version is None and 'sparkVersion' in kwargs: + spark_version = kwargs['sparkVersion'] + + _setter("node_size", node_size) + _setter("node_size_family", node_size_family) + _setter("synapse_workspace_id", synapse_workspace_id) if auto_pause is not None: - pulumi.set(__self__, "auto_pause", auto_pause) + _setter("auto_pause", auto_pause) if auto_scale is not None: - pulumi.set(__self__, "auto_scale", auto_scale) + _setter("auto_scale", auto_scale) if cache_size is not None: - pulumi.set(__self__, "cache_size", cache_size) + _setter("cache_size", cache_size) if compute_isolation_enabled is not None: - pulumi.set(__self__, "compute_isolation_enabled", compute_isolation_enabled) + _setter("compute_isolation_enabled", compute_isolation_enabled) if dynamic_executor_allocation_enabled is not None: - pulumi.set(__self__, "dynamic_executor_allocation_enabled", dynamic_executor_allocation_enabled) + _setter("dynamic_executor_allocation_enabled", dynamic_executor_allocation_enabled) if library_requirement is not None: - pulumi.set(__self__, "library_requirement", library_requirement) + _setter("library_requirement", library_requirement) if max_executors is not None: - pulumi.set(__self__, "max_executors", max_executors) + _setter("max_executors", max_executors) if min_executors is not None: - pulumi.set(__self__, "min_executors", min_executors) + _setter("min_executors", min_executors) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_count is not None: - pulumi.set(__self__, "node_count", node_count) + _setter("node_count", node_count) if session_level_packages_enabled is not None: - pulumi.set(__self__, "session_level_packages_enabled", session_level_packages_enabled) + _setter("session_level_packages_enabled", session_level_packages_enabled) if spark_config is not None: - pulumi.set(__self__, "spark_config", spark_config) + _setter("spark_config", spark_config) if spark_events_folder is not None: - pulumi.set(__self__, "spark_events_folder", spark_events_folder) + _setter("spark_events_folder", spark_events_folder) if spark_log_folder is not None: - pulumi.set(__self__, "spark_log_folder", spark_log_folder) + _setter("spark_log_folder", spark_log_folder) if spark_version is not None: - pulumi.set(__self__, "spark_version", spark_version) + _setter("spark_version", spark_version) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="nodeSize") @@ -366,44 +453,125 @@ def __init__(__self__, *, :param pulumi.Input[str] synapse_workspace_id: The ID of the Synapse Workspace where the Synapse Spark Pool should exist. Changing this forces a new Synapse Spark Pool to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Synapse Spark Pool. """ + _SparkPoolState._configure( + lambda key, value: pulumi.set(__self__, key, value), + auto_pause=auto_pause, + auto_scale=auto_scale, + cache_size=cache_size, + compute_isolation_enabled=compute_isolation_enabled, + dynamic_executor_allocation_enabled=dynamic_executor_allocation_enabled, + library_requirement=library_requirement, + max_executors=max_executors, + min_executors=min_executors, + name=name, + node_count=node_count, + node_size=node_size, + node_size_family=node_size_family, + session_level_packages_enabled=session_level_packages_enabled, + spark_config=spark_config, + spark_events_folder=spark_events_folder, + spark_log_folder=spark_log_folder, + spark_version=spark_version, + synapse_workspace_id=synapse_workspace_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + auto_pause: Optional[pulumi.Input['SparkPoolAutoPauseArgs']] = None, + auto_scale: Optional[pulumi.Input['SparkPoolAutoScaleArgs']] = None, + cache_size: Optional[pulumi.Input[int]] = None, + compute_isolation_enabled: Optional[pulumi.Input[bool]] = None, + dynamic_executor_allocation_enabled: Optional[pulumi.Input[bool]] = None, + library_requirement: Optional[pulumi.Input['SparkPoolLibraryRequirementArgs']] = None, + max_executors: Optional[pulumi.Input[int]] = None, + min_executors: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + node_count: Optional[pulumi.Input[int]] = None, + node_size: Optional[pulumi.Input[str]] = None, + node_size_family: Optional[pulumi.Input[str]] = None, + session_level_packages_enabled: Optional[pulumi.Input[bool]] = None, + spark_config: Optional[pulumi.Input['SparkPoolSparkConfigArgs']] = None, + spark_events_folder: Optional[pulumi.Input[str]] = None, + spark_log_folder: Optional[pulumi.Input[str]] = None, + spark_version: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if auto_pause is None and 'autoPause' in kwargs: + auto_pause = kwargs['autoPause'] + if auto_scale is None and 'autoScale' in kwargs: + auto_scale = kwargs['autoScale'] + if cache_size is None and 'cacheSize' in kwargs: + cache_size = kwargs['cacheSize'] + if compute_isolation_enabled is None and 'computeIsolationEnabled' in kwargs: + compute_isolation_enabled = kwargs['computeIsolationEnabled'] + if dynamic_executor_allocation_enabled is None and 'dynamicExecutorAllocationEnabled' in kwargs: + dynamic_executor_allocation_enabled = kwargs['dynamicExecutorAllocationEnabled'] + if library_requirement is None and 'libraryRequirement' in kwargs: + library_requirement = kwargs['libraryRequirement'] + if max_executors is None and 'maxExecutors' in kwargs: + max_executors = kwargs['maxExecutors'] + if min_executors is None and 'minExecutors' in kwargs: + min_executors = kwargs['minExecutors'] + if node_count is None and 'nodeCount' in kwargs: + node_count = kwargs['nodeCount'] + if node_size is None and 'nodeSize' in kwargs: + node_size = kwargs['nodeSize'] + if node_size_family is None and 'nodeSizeFamily' in kwargs: + node_size_family = kwargs['nodeSizeFamily'] + if session_level_packages_enabled is None and 'sessionLevelPackagesEnabled' in kwargs: + session_level_packages_enabled = kwargs['sessionLevelPackagesEnabled'] + if spark_config is None and 'sparkConfig' in kwargs: + spark_config = kwargs['sparkConfig'] + if spark_events_folder is None and 'sparkEventsFolder' in kwargs: + spark_events_folder = kwargs['sparkEventsFolder'] + if spark_log_folder is None and 'sparkLogFolder' in kwargs: + spark_log_folder = kwargs['sparkLogFolder'] + if spark_version is None and 'sparkVersion' in kwargs: + spark_version = kwargs['sparkVersion'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if auto_pause is not None: - pulumi.set(__self__, "auto_pause", auto_pause) + _setter("auto_pause", auto_pause) if auto_scale is not None: - pulumi.set(__self__, "auto_scale", auto_scale) + _setter("auto_scale", auto_scale) if cache_size is not None: - pulumi.set(__self__, "cache_size", cache_size) + _setter("cache_size", cache_size) if compute_isolation_enabled is not None: - pulumi.set(__self__, "compute_isolation_enabled", compute_isolation_enabled) + _setter("compute_isolation_enabled", compute_isolation_enabled) if dynamic_executor_allocation_enabled is not None: - pulumi.set(__self__, "dynamic_executor_allocation_enabled", dynamic_executor_allocation_enabled) + _setter("dynamic_executor_allocation_enabled", dynamic_executor_allocation_enabled) if library_requirement is not None: - pulumi.set(__self__, "library_requirement", library_requirement) + _setter("library_requirement", library_requirement) if max_executors is not None: - pulumi.set(__self__, "max_executors", max_executors) + _setter("max_executors", max_executors) if min_executors is not None: - pulumi.set(__self__, "min_executors", min_executors) + _setter("min_executors", min_executors) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if node_count is not None: - pulumi.set(__self__, "node_count", node_count) + _setter("node_count", node_count) if node_size is not None: - pulumi.set(__self__, "node_size", node_size) + _setter("node_size", node_size) if node_size_family is not None: - pulumi.set(__self__, "node_size_family", node_size_family) + _setter("node_size_family", node_size_family) if session_level_packages_enabled is not None: - pulumi.set(__self__, "session_level_packages_enabled", session_level_packages_enabled) + _setter("session_level_packages_enabled", session_level_packages_enabled) if spark_config is not None: - pulumi.set(__self__, "spark_config", spark_config) + _setter("spark_config", spark_config) if spark_events_folder is not None: - pulumi.set(__self__, "spark_events_folder", spark_events_folder) + _setter("spark_events_folder", spark_events_folder) if spark_log_folder is not None: - pulumi.set(__self__, "spark_log_folder", spark_log_folder) + _setter("spark_log_folder", spark_log_folder) if spark_version is not None: - pulumi.set(__self__, "spark_version", spark_version) + _setter("spark_version", spark_version) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="autoPause") @@ -719,6 +887,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SparkPoolArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -752,11 +924,26 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = SparkPoolArgs.__new__(SparkPoolArgs) + if auto_pause is not None and not isinstance(auto_pause, SparkPoolAutoPauseArgs): + auto_pause = auto_pause or {} + def _setter(key, value): + auto_pause[key] = value + SparkPoolAutoPauseArgs._configure(_setter, **auto_pause) __props__.__dict__["auto_pause"] = auto_pause + if auto_scale is not None and not isinstance(auto_scale, SparkPoolAutoScaleArgs): + auto_scale = auto_scale or {} + def _setter(key, value): + auto_scale[key] = value + SparkPoolAutoScaleArgs._configure(_setter, **auto_scale) __props__.__dict__["auto_scale"] = auto_scale __props__.__dict__["cache_size"] = cache_size __props__.__dict__["compute_isolation_enabled"] = compute_isolation_enabled __props__.__dict__["dynamic_executor_allocation_enabled"] = dynamic_executor_allocation_enabled + if library_requirement is not None and not isinstance(library_requirement, SparkPoolLibraryRequirementArgs): + library_requirement = library_requirement or {} + def _setter(key, value): + library_requirement[key] = value + SparkPoolLibraryRequirementArgs._configure(_setter, **library_requirement) __props__.__dict__["library_requirement"] = library_requirement __props__.__dict__["max_executors"] = max_executors __props__.__dict__["min_executors"] = min_executors @@ -769,6 +956,11 @@ def _internal_init(__self__, raise TypeError("Missing required property 'node_size_family'") __props__.__dict__["node_size_family"] = node_size_family __props__.__dict__["session_level_packages_enabled"] = session_level_packages_enabled + if spark_config is not None and not isinstance(spark_config, SparkPoolSparkConfigArgs): + spark_config = spark_config or {} + def _setter(key, value): + spark_config[key] = value + SparkPoolSparkConfigArgs._configure(_setter, **spark_config) __props__.__dict__["spark_config"] = spark_config __props__.__dict__["spark_events_folder"] = spark_events_folder __props__.__dict__["spark_log_folder"] = spark_log_folder diff --git a/sdk/python/pulumi_azure/synapse/sql_pool.py b/sdk/python/pulumi_azure/synapse/sql_pool.py index 7b739a6c0e..e3e115db95 100644 --- a/sdk/python/pulumi_azure/synapse/sql_pool.py +++ b/sdk/python/pulumi_azure/synapse/sql_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -41,26 +41,75 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_type: The storage account type that will be used to store backups for this Synapse SQL Pool. Possible values are `LRS` or `GRS`. Changing this forces a new Synapse SQL Pool to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Synapse SQL Pool. """ - pulumi.set(__self__, "sku_name", sku_name) - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + SqlPoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + sku_name=sku_name, + synapse_workspace_id=synapse_workspace_id, + collation=collation, + create_mode=create_mode, + data_encrypted=data_encrypted, + geo_backup_policy_enabled=geo_backup_policy_enabled, + name=name, + recovery_database_id=recovery_database_id, + restore=restore, + storage_account_type=storage_account_type, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sku_name: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + collation: Optional[pulumi.Input[str]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + data_encrypted: Optional[pulumi.Input[bool]] = None, + geo_backup_policy_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + recovery_database_id: Optional[pulumi.Input[str]] = None, + restore: Optional[pulumi.Input['SqlPoolRestoreArgs']] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if sku_name is None: + raise TypeError("Missing 'sku_name' argument") + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if synapse_workspace_id is None: + raise TypeError("Missing 'synapse_workspace_id' argument") + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if data_encrypted is None and 'dataEncrypted' in kwargs: + data_encrypted = kwargs['dataEncrypted'] + if geo_backup_policy_enabled is None and 'geoBackupPolicyEnabled' in kwargs: + geo_backup_policy_enabled = kwargs['geoBackupPolicyEnabled'] + if recovery_database_id is None and 'recoveryDatabaseId' in kwargs: + recovery_database_id = kwargs['recoveryDatabaseId'] + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + + _setter("sku_name", sku_name) + _setter("synapse_workspace_id", synapse_workspace_id) if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if data_encrypted is not None: - pulumi.set(__self__, "data_encrypted", data_encrypted) + _setter("data_encrypted", data_encrypted) if geo_backup_policy_enabled is not None: - pulumi.set(__self__, "geo_backup_policy_enabled", geo_backup_policy_enabled) + _setter("geo_backup_policy_enabled", geo_backup_policy_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_database_id is not None: - pulumi.set(__self__, "recovery_database_id", recovery_database_id) + _setter("recovery_database_id", recovery_database_id) if restore is not None: - pulumi.set(__self__, "restore", restore) + _setter("restore", restore) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="skuName") @@ -223,28 +272,73 @@ def __init__(__self__, *, :param pulumi.Input[str] synapse_workspace_id: The ID of Synapse Workspace within which this SQL Pool should be created. Changing this forces a new Synapse SQL Pool to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Synapse SQL Pool. """ + _SqlPoolState._configure( + lambda key, value: pulumi.set(__self__, key, value), + collation=collation, + create_mode=create_mode, + data_encrypted=data_encrypted, + geo_backup_policy_enabled=geo_backup_policy_enabled, + name=name, + recovery_database_id=recovery_database_id, + restore=restore, + sku_name=sku_name, + storage_account_type=storage_account_type, + synapse_workspace_id=synapse_workspace_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + collation: Optional[pulumi.Input[str]] = None, + create_mode: Optional[pulumi.Input[str]] = None, + data_encrypted: Optional[pulumi.Input[bool]] = None, + geo_backup_policy_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + recovery_database_id: Optional[pulumi.Input[str]] = None, + restore: Optional[pulumi.Input['SqlPoolRestoreArgs']] = None, + sku_name: Optional[pulumi.Input[str]] = None, + storage_account_type: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_mode is None and 'createMode' in kwargs: + create_mode = kwargs['createMode'] + if data_encrypted is None and 'dataEncrypted' in kwargs: + data_encrypted = kwargs['dataEncrypted'] + if geo_backup_policy_enabled is None and 'geoBackupPolicyEnabled' in kwargs: + geo_backup_policy_enabled = kwargs['geoBackupPolicyEnabled'] + if recovery_database_id is None and 'recoveryDatabaseId' in kwargs: + recovery_database_id = kwargs['recoveryDatabaseId'] + if sku_name is None and 'skuName' in kwargs: + sku_name = kwargs['skuName'] + if storage_account_type is None and 'storageAccountType' in kwargs: + storage_account_type = kwargs['storageAccountType'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if collation is not None: - pulumi.set(__self__, "collation", collation) + _setter("collation", collation) if create_mode is not None: - pulumi.set(__self__, "create_mode", create_mode) + _setter("create_mode", create_mode) if data_encrypted is not None: - pulumi.set(__self__, "data_encrypted", data_encrypted) + _setter("data_encrypted", data_encrypted) if geo_backup_policy_enabled is not None: - pulumi.set(__self__, "geo_backup_policy_enabled", geo_backup_policy_enabled) + _setter("geo_backup_policy_enabled", geo_backup_policy_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if recovery_database_id is not None: - pulumi.set(__self__, "recovery_database_id", recovery_database_id) + _setter("recovery_database_id", recovery_database_id) if restore is not None: - pulumi.set(__self__, "restore", restore) + _setter("restore", restore) if sku_name is not None: - pulumi.set(__self__, "sku_name", sku_name) + _setter("sku_name", sku_name) if storage_account_type is not None: - pulumi.set(__self__, "storage_account_type", storage_account_type) + _setter("storage_account_type", storage_account_type) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -508,6 +602,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlPoolArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -539,6 +637,11 @@ def _internal_init(__self__, __props__.__dict__["geo_backup_policy_enabled"] = geo_backup_policy_enabled __props__.__dict__["name"] = name __props__.__dict__["recovery_database_id"] = recovery_database_id + if restore is not None and not isinstance(restore, SqlPoolRestoreArgs): + restore = restore or {} + def _setter(key, value): + restore[key] = value + SqlPoolRestoreArgs._configure(_setter, **restore) __props__.__dict__["restore"] = restore if sku_name is None and not opts.urn: raise TypeError("Missing required property 'sku_name'") diff --git a/sdk/python/pulumi_azure/synapse/sql_pool_extended_auditing_policy.py b/sdk/python/pulumi_azure/synapse/sql_pool_extended_auditing_policy.py index 338ce0ca06..ae81a2795f 100644 --- a/sdk/python/pulumi_azure/synapse/sql_pool_extended_auditing_policy.py +++ b/sdk/python/pulumi_azure/synapse/sql_pool_extended_auditing_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SqlPoolExtendedAuditingPolicyArgs', 'SqlPoolExtendedAuditingPolicy'] @@ -29,17 +29,52 @@ def __init__(__self__, *, :param pulumi.Input[bool] storage_account_access_key_is_secondary: Is `storage_account_access_key` value the storage's secondary key? :param pulumi.Input[str] storage_endpoint: The blob storage endpoint (e.g. ). This blob storage will hold all extended auditing logs. """ - pulumi.set(__self__, "sql_pool_id", sql_pool_id) + SqlPoolExtendedAuditingPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + sql_pool_id=sql_pool_id, + log_monitoring_enabled=log_monitoring_enabled, + retention_in_days=retention_in_days, + storage_account_access_key=storage_account_access_key, + storage_account_access_key_is_secondary=storage_account_access_key_is_secondary, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sql_pool_id: Optional[pulumi.Input[str]] = None, + log_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_access_key_is_secondary: Optional[pulumi.Input[bool]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sql_pool_id is None and 'sqlPoolId' in kwargs: + sql_pool_id = kwargs['sqlPoolId'] + if sql_pool_id is None: + raise TypeError("Missing 'sql_pool_id' argument") + if log_monitoring_enabled is None and 'logMonitoringEnabled' in kwargs: + log_monitoring_enabled = kwargs['logMonitoringEnabled'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key_is_secondary is None and 'storageAccountAccessKeyIsSecondary' in kwargs: + storage_account_access_key_is_secondary = kwargs['storageAccountAccessKeyIsSecondary'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + + _setter("sql_pool_id", sql_pool_id) if log_monitoring_enabled is not None: - pulumi.set(__self__, "log_monitoring_enabled", log_monitoring_enabled) + _setter("log_monitoring_enabled", log_monitoring_enabled) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_access_key_is_secondary is not None: - pulumi.set(__self__, "storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) + _setter("storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="sqlPoolId") @@ -132,18 +167,51 @@ def __init__(__self__, *, :param pulumi.Input[bool] storage_account_access_key_is_secondary: Is `storage_account_access_key` value the storage's secondary key? :param pulumi.Input[str] storage_endpoint: The blob storage endpoint (e.g. ). This blob storage will hold all extended auditing logs. """ + _SqlPoolExtendedAuditingPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_monitoring_enabled=log_monitoring_enabled, + retention_in_days=retention_in_days, + sql_pool_id=sql_pool_id, + storage_account_access_key=storage_account_access_key, + storage_account_access_key_is_secondary=storage_account_access_key_is_secondary, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + sql_pool_id: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_access_key_is_secondary: Optional[pulumi.Input[bool]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_monitoring_enabled is None and 'logMonitoringEnabled' in kwargs: + log_monitoring_enabled = kwargs['logMonitoringEnabled'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if sql_pool_id is None and 'sqlPoolId' in kwargs: + sql_pool_id = kwargs['sqlPoolId'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key_is_secondary is None and 'storageAccountAccessKeyIsSecondary' in kwargs: + storage_account_access_key_is_secondary = kwargs['storageAccountAccessKeyIsSecondary'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if log_monitoring_enabled is not None: - pulumi.set(__self__, "log_monitoring_enabled", log_monitoring_enabled) + _setter("log_monitoring_enabled", log_monitoring_enabled) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) if sql_pool_id is not None: - pulumi.set(__self__, "sql_pool_id", sql_pool_id) + _setter("sql_pool_id", sql_pool_id) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_access_key_is_secondary is not None: - pulumi.set(__self__, "storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) + _setter("storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="logMonitoringEnabled") @@ -357,6 +425,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlPoolExtendedAuditingPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/sql_pool_security_alert_policy.py b/sdk/python/pulumi_azure/synapse/sql_pool_security_alert_policy.py index 0b95e5bcaa..c3ef2985e3 100644 --- a/sdk/python/pulumi_azure/synapse/sql_pool_security_alert_policy.py +++ b/sdk/python/pulumi_azure/synapse/sql_pool_security_alert_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SqlPoolSecurityAlertPolicyArgs', 'SqlPoolSecurityAlertPolicy'] @@ -33,20 +33,65 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. :param pulumi.Input[str] storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. """ - pulumi.set(__self__, "policy_state", policy_state) - pulumi.set(__self__, "sql_pool_id", sql_pool_id) + SqlPoolSecurityAlertPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy_state=policy_state, + sql_pool_id=sql_pool_id, + disabled_alerts=disabled_alerts, + email_account_admins_enabled=email_account_admins_enabled, + email_addresses=email_addresses, + retention_days=retention_days, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy_state: Optional[pulumi.Input[str]] = None, + sql_pool_id: Optional[pulumi.Input[str]] = None, + disabled_alerts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_account_admins_enabled: Optional[pulumi.Input[bool]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + retention_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_state is None and 'policyState' in kwargs: + policy_state = kwargs['policyState'] + if policy_state is None: + raise TypeError("Missing 'policy_state' argument") + if sql_pool_id is None and 'sqlPoolId' in kwargs: + sql_pool_id = kwargs['sqlPoolId'] + if sql_pool_id is None: + raise TypeError("Missing 'sql_pool_id' argument") + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins_enabled is None and 'emailAccountAdminsEnabled' in kwargs: + email_account_admins_enabled = kwargs['emailAccountAdminsEnabled'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + + _setter("policy_state", policy_state) + _setter("sql_pool_id", sql_pool_id) if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins_enabled is not None: - pulumi.set(__self__, "email_account_admins_enabled", email_account_admins_enabled) + _setter("email_account_admins_enabled", email_account_admins_enabled) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="policyState") @@ -167,22 +212,63 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. :param pulumi.Input[str] storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. """ + _SqlPoolSecurityAlertPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins_enabled=email_account_admins_enabled, + email_addresses=email_addresses, + policy_state=policy_state, + retention_days=retention_days, + sql_pool_id=sql_pool_id, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_account_admins_enabled: Optional[pulumi.Input[bool]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + policy_state: Optional[pulumi.Input[str]] = None, + retention_days: Optional[pulumi.Input[int]] = None, + sql_pool_id: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins_enabled is None and 'emailAccountAdminsEnabled' in kwargs: + email_account_admins_enabled = kwargs['emailAccountAdminsEnabled'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if policy_state is None and 'policyState' in kwargs: + policy_state = kwargs['policyState'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if sql_pool_id is None and 'sqlPoolId' in kwargs: + sql_pool_id = kwargs['sqlPoolId'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins_enabled is not None: - pulumi.set(__self__, "email_account_admins_enabled", email_account_admins_enabled) + _setter("email_account_admins_enabled", email_account_admins_enabled) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if policy_state is not None: - pulumi.set(__self__, "policy_state", policy_state) + _setter("policy_state", policy_state) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if sql_pool_id is not None: - pulumi.set(__self__, "sql_pool_id", sql_pool_id) + _setter("sql_pool_id", sql_pool_id) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="disabledAlerts") @@ -450,6 +536,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlPoolSecurityAlertPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/sql_pool_vulnerability_assessment.py b/sdk/python/pulumi_azure/synapse/sql_pool_vulnerability_assessment.py index 0b4db84357..33c64fc674 100644 --- a/sdk/python/pulumi_azure/synapse/sql_pool_vulnerability_assessment.py +++ b/sdk/python/pulumi_azure/synapse/sql_pool_vulnerability_assessment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_access_key: Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storage_container_sas_key` isn't specified, `storage_account_access_key` is required. :param pulumi.Input[str] storage_container_sas_key: A shared access signature (SAS Key) that has write access to the blob container specified in `storage_container_path` parameter. If `storage_account_access_key` isn't specified, `storage_container_sas_key` is required. """ - pulumi.set(__self__, "sql_pool_security_alert_policy_id", sql_pool_security_alert_policy_id) - pulumi.set(__self__, "storage_container_path", storage_container_path) + SqlPoolVulnerabilityAssessmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + sql_pool_security_alert_policy_id=sql_pool_security_alert_policy_id, + storage_container_path=storage_container_path, + recurring_scans=recurring_scans, + storage_account_access_key=storage_account_access_key, + storage_container_sas_key=storage_container_sas_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + sql_pool_security_alert_policy_id: Optional[pulumi.Input[str]] = None, + storage_container_path: Optional[pulumi.Input[str]] = None, + recurring_scans: Optional[pulumi.Input['SqlPoolVulnerabilityAssessmentRecurringScansArgs']] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_container_sas_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if sql_pool_security_alert_policy_id is None and 'sqlPoolSecurityAlertPolicyId' in kwargs: + sql_pool_security_alert_policy_id = kwargs['sqlPoolSecurityAlertPolicyId'] + if sql_pool_security_alert_policy_id is None: + raise TypeError("Missing 'sql_pool_security_alert_policy_id' argument") + if storage_container_path is None and 'storageContainerPath' in kwargs: + storage_container_path = kwargs['storageContainerPath'] + if storage_container_path is None: + raise TypeError("Missing 'storage_container_path' argument") + if recurring_scans is None and 'recurringScans' in kwargs: + recurring_scans = kwargs['recurringScans'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_container_sas_key is None and 'storageContainerSasKey' in kwargs: + storage_container_sas_key = kwargs['storageContainerSasKey'] + + _setter("sql_pool_security_alert_policy_id", sql_pool_security_alert_policy_id) + _setter("storage_container_path", storage_container_path) if recurring_scans is not None: - pulumi.set(__self__, "recurring_scans", recurring_scans) + _setter("recurring_scans", recurring_scans) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_container_sas_key is not None: - pulumi.set(__self__, "storage_container_sas_key", storage_container_sas_key) + _setter("storage_container_sas_key", storage_container_sas_key) @property @pulumi.getter(name="sqlPoolSecurityAlertPolicyId") @@ -115,16 +148,45 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_container_path: A blob storage container path to hold the scan results (e.g. ). :param pulumi.Input[str] storage_container_sas_key: A shared access signature (SAS Key) that has write access to the blob container specified in `storage_container_path` parameter. If `storage_account_access_key` isn't specified, `storage_container_sas_key` is required. """ + _SqlPoolVulnerabilityAssessmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + recurring_scans=recurring_scans, + sql_pool_security_alert_policy_id=sql_pool_security_alert_policy_id, + storage_account_access_key=storage_account_access_key, + storage_container_path=storage_container_path, + storage_container_sas_key=storage_container_sas_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recurring_scans: Optional[pulumi.Input['SqlPoolVulnerabilityAssessmentRecurringScansArgs']] = None, + sql_pool_security_alert_policy_id: Optional[pulumi.Input[str]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_container_path: Optional[pulumi.Input[str]] = None, + storage_container_sas_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recurring_scans is None and 'recurringScans' in kwargs: + recurring_scans = kwargs['recurringScans'] + if sql_pool_security_alert_policy_id is None and 'sqlPoolSecurityAlertPolicyId' in kwargs: + sql_pool_security_alert_policy_id = kwargs['sqlPoolSecurityAlertPolicyId'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_container_path is None and 'storageContainerPath' in kwargs: + storage_container_path = kwargs['storageContainerPath'] + if storage_container_sas_key is None and 'storageContainerSasKey' in kwargs: + storage_container_sas_key = kwargs['storageContainerSasKey'] + if recurring_scans is not None: - pulumi.set(__self__, "recurring_scans", recurring_scans) + _setter("recurring_scans", recurring_scans) if sql_pool_security_alert_policy_id is not None: - pulumi.set(__self__, "sql_pool_security_alert_policy_id", sql_pool_security_alert_policy_id) + _setter("sql_pool_security_alert_policy_id", sql_pool_security_alert_policy_id) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_container_path is not None: - pulumi.set(__self__, "storage_container_path", storage_container_path) + _setter("storage_container_path", storage_container_path) if storage_container_sas_key is not None: - pulumi.set(__self__, "storage_container_sas_key", storage_container_sas_key) + _setter("storage_container_sas_key", storage_container_sas_key) @property @pulumi.getter(name="recurringScans") @@ -376,6 +438,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlPoolVulnerabilityAssessmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -395,6 +461,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = SqlPoolVulnerabilityAssessmentArgs.__new__(SqlPoolVulnerabilityAssessmentArgs) + if recurring_scans is not None and not isinstance(recurring_scans, SqlPoolVulnerabilityAssessmentRecurringScansArgs): + recurring_scans = recurring_scans or {} + def _setter(key, value): + recurring_scans[key] = value + SqlPoolVulnerabilityAssessmentRecurringScansArgs._configure(_setter, **recurring_scans) __props__.__dict__["recurring_scans"] = recurring_scans if sql_pool_security_alert_policy_id is None and not opts.urn: raise TypeError("Missing required property 'sql_pool_security_alert_policy_id'") diff --git a/sdk/python/pulumi_azure/synapse/sql_pool_vulnerability_assessment_baseline.py b/sdk/python/pulumi_azure/synapse/sql_pool_vulnerability_assessment_baseline.py index 14a92bc0d9..fbb3aea9af 100644 --- a/sdk/python/pulumi_azure/synapse/sql_pool_vulnerability_assessment_baseline.py +++ b/sdk/python/pulumi_azure/synapse/sql_pool_vulnerability_assessment_baseline.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,12 +27,37 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['SqlPoolVulnerabilityAssessmentBaselineBaselineArgs']]] baselines: One or more `baseline` blocks as defined below. :param pulumi.Input[str] name: The name which should be used for this Synapse SQL Pool Vulnerability Assessment Rule Baseline. """ - pulumi.set(__self__, "rule_name", rule_name) - pulumi.set(__self__, "sql_pool_vulnerability_assessment_id", sql_pool_vulnerability_assessment_id) + SqlPoolVulnerabilityAssessmentBaselineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_name=rule_name, + sql_pool_vulnerability_assessment_id=sql_pool_vulnerability_assessment_id, + baselines=baselines, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_name: Optional[pulumi.Input[str]] = None, + sql_pool_vulnerability_assessment_id: Optional[pulumi.Input[str]] = None, + baselines: Optional[pulumi.Input[Sequence[pulumi.Input['SqlPoolVulnerabilityAssessmentBaselineBaselineArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_name is None and 'ruleName' in kwargs: + rule_name = kwargs['ruleName'] + if rule_name is None: + raise TypeError("Missing 'rule_name' argument") + if sql_pool_vulnerability_assessment_id is None and 'sqlPoolVulnerabilityAssessmentId' in kwargs: + sql_pool_vulnerability_assessment_id = kwargs['sqlPoolVulnerabilityAssessmentId'] + if sql_pool_vulnerability_assessment_id is None: + raise TypeError("Missing 'sql_pool_vulnerability_assessment_id' argument") + + _setter("rule_name", rule_name) + _setter("sql_pool_vulnerability_assessment_id", sql_pool_vulnerability_assessment_id) if baselines is not None: - pulumi.set(__self__, "baselines", baselines) + _setter("baselines", baselines) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="ruleName") @@ -97,14 +122,35 @@ def __init__(__self__, *, :param pulumi.Input[str] rule_name: The ID of the vulnerability assessment rule. :param pulumi.Input[str] sql_pool_vulnerability_assessment_id: The ID of the Synapse SQL Pool Vulnerability Assessment. Changing this forces a new Synapse SQL Pool Vulnerability Assessment Rule Baseline to be created. """ + _SqlPoolVulnerabilityAssessmentBaselineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + baselines=baselines, + name=name, + rule_name=rule_name, + sql_pool_vulnerability_assessment_id=sql_pool_vulnerability_assessment_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + baselines: Optional[pulumi.Input[Sequence[pulumi.Input['SqlPoolVulnerabilityAssessmentBaselineBaselineArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + rule_name: Optional[pulumi.Input[str]] = None, + sql_pool_vulnerability_assessment_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_name is None and 'ruleName' in kwargs: + rule_name = kwargs['ruleName'] + if sql_pool_vulnerability_assessment_id is None and 'sqlPoolVulnerabilityAssessmentId' in kwargs: + sql_pool_vulnerability_assessment_id = kwargs['sqlPoolVulnerabilityAssessmentId'] + if baselines is not None: - pulumi.set(__self__, "baselines", baselines) + _setter("baselines", baselines) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rule_name is not None: - pulumi.set(__self__, "rule_name", rule_name) + _setter("rule_name", rule_name) if sql_pool_vulnerability_assessment_id is not None: - pulumi.set(__self__, "sql_pool_vulnerability_assessment_id", sql_pool_vulnerability_assessment_id) + _setter("sql_pool_vulnerability_assessment_id", sql_pool_vulnerability_assessment_id) @property @pulumi.getter @@ -326,6 +372,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlPoolVulnerabilityAssessmentBaselineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/sql_pool_workload_classifier.py b/sdk/python/pulumi_azure/synapse/sql_pool_workload_classifier.py index 6bdffdd306..a9348df879 100644 --- a/sdk/python/pulumi_azure/synapse/sql_pool_workload_classifier.py +++ b/sdk/python/pulumi_azure/synapse/sql_pool_workload_classifier.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SqlPoolWorkloadClassifierArgs', 'SqlPoolWorkloadClassifier'] @@ -33,20 +33,57 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Synapse SQL Pool Workload Classifier. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. :param pulumi.Input[str] start_time: The workload classifier start time for classification. It's of the `HH:MM` format in UTC time zone. """ - pulumi.set(__self__, "member_name", member_name) - pulumi.set(__self__, "workload_group_id", workload_group_id) + SqlPoolWorkloadClassifierArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + member_name=member_name, + workload_group_id=workload_group_id, + context=context, + end_time=end_time, + importance=importance, + label=label, + name=name, + start_time=start_time, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + member_name: Optional[pulumi.Input[str]] = None, + workload_group_id: Optional[pulumi.Input[str]] = None, + context: Optional[pulumi.Input[str]] = None, + end_time: Optional[pulumi.Input[str]] = None, + importance: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if member_name is None and 'memberName' in kwargs: + member_name = kwargs['memberName'] + if member_name is None: + raise TypeError("Missing 'member_name' argument") + if workload_group_id is None and 'workloadGroupId' in kwargs: + workload_group_id = kwargs['workloadGroupId'] + if workload_group_id is None: + raise TypeError("Missing 'workload_group_id' argument") + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + + _setter("member_name", member_name) + _setter("workload_group_id", workload_group_id) if context is not None: - pulumi.set(__self__, "context", context) + _setter("context", context) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if importance is not None: - pulumi.set(__self__, "importance", importance) + _setter("importance", importance) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) @property @pulumi.getter(name="memberName") @@ -167,22 +204,55 @@ def __init__(__self__, *, :param pulumi.Input[str] start_time: The workload classifier start time for classification. It's of the `HH:MM` format in UTC time zone. :param pulumi.Input[str] workload_group_id: The ID of the Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. """ + _SqlPoolWorkloadClassifierState._configure( + lambda key, value: pulumi.set(__self__, key, value), + context=context, + end_time=end_time, + importance=importance, + label=label, + member_name=member_name, + name=name, + start_time=start_time, + workload_group_id=workload_group_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + context: Optional[pulumi.Input[str]] = None, + end_time: Optional[pulumi.Input[str]] = None, + importance: Optional[pulumi.Input[str]] = None, + label: Optional[pulumi.Input[str]] = None, + member_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + start_time: Optional[pulumi.Input[str]] = None, + workload_group_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if end_time is None and 'endTime' in kwargs: + end_time = kwargs['endTime'] + if member_name is None and 'memberName' in kwargs: + member_name = kwargs['memberName'] + if start_time is None and 'startTime' in kwargs: + start_time = kwargs['startTime'] + if workload_group_id is None and 'workloadGroupId' in kwargs: + workload_group_id = kwargs['workloadGroupId'] + if context is not None: - pulumi.set(__self__, "context", context) + _setter("context", context) if end_time is not None: - pulumi.set(__self__, "end_time", end_time) + _setter("end_time", end_time) if importance is not None: - pulumi.set(__self__, "importance", importance) + _setter("importance", importance) if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if member_name is not None: - pulumi.set(__self__, "member_name", member_name) + _setter("member_name", member_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if start_time is not None: - pulumi.set(__self__, "start_time", start_time) + _setter("start_time", start_time) if workload_group_id is not None: - pulumi.set(__self__, "workload_group_id", workload_group_id) + _setter("workload_group_id", workload_group_id) @property @pulumi.getter @@ -434,6 +504,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlPoolWorkloadClassifierArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/sql_pool_workload_group.py b/sdk/python/pulumi_azure/synapse/sql_pool_workload_group.py index f509784961..b17138e238 100644 --- a/sdk/python/pulumi_azure/synapse/sql_pool_workload_group.py +++ b/sdk/python/pulumi_azure/synapse/sql_pool_workload_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SqlPoolWorkloadGroupArgs', 'SqlPoolWorkloadGroup'] @@ -33,19 +33,62 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name which should be used for this Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Group to be created. :param pulumi.Input[int] query_execution_timeout_in_seconds: The workload group query execution timeout. """ - pulumi.set(__self__, "max_resource_percent", max_resource_percent) - pulumi.set(__self__, "min_resource_percent", min_resource_percent) - pulumi.set(__self__, "sql_pool_id", sql_pool_id) + SqlPoolWorkloadGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_resource_percent=max_resource_percent, + min_resource_percent=min_resource_percent, + sql_pool_id=sql_pool_id, + importance=importance, + max_resource_percent_per_request=max_resource_percent_per_request, + min_resource_percent_per_request=min_resource_percent_per_request, + name=name, + query_execution_timeout_in_seconds=query_execution_timeout_in_seconds, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_resource_percent: Optional[pulumi.Input[int]] = None, + min_resource_percent: Optional[pulumi.Input[int]] = None, + sql_pool_id: Optional[pulumi.Input[str]] = None, + importance: Optional[pulumi.Input[str]] = None, + max_resource_percent_per_request: Optional[pulumi.Input[float]] = None, + min_resource_percent_per_request: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + query_execution_timeout_in_seconds: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_resource_percent is None and 'maxResourcePercent' in kwargs: + max_resource_percent = kwargs['maxResourcePercent'] + if max_resource_percent is None: + raise TypeError("Missing 'max_resource_percent' argument") + if min_resource_percent is None and 'minResourcePercent' in kwargs: + min_resource_percent = kwargs['minResourcePercent'] + if min_resource_percent is None: + raise TypeError("Missing 'min_resource_percent' argument") + if sql_pool_id is None and 'sqlPoolId' in kwargs: + sql_pool_id = kwargs['sqlPoolId'] + if sql_pool_id is None: + raise TypeError("Missing 'sql_pool_id' argument") + if max_resource_percent_per_request is None and 'maxResourcePercentPerRequest' in kwargs: + max_resource_percent_per_request = kwargs['maxResourcePercentPerRequest'] + if min_resource_percent_per_request is None and 'minResourcePercentPerRequest' in kwargs: + min_resource_percent_per_request = kwargs['minResourcePercentPerRequest'] + if query_execution_timeout_in_seconds is None and 'queryExecutionTimeoutInSeconds' in kwargs: + query_execution_timeout_in_seconds = kwargs['queryExecutionTimeoutInSeconds'] + + _setter("max_resource_percent", max_resource_percent) + _setter("min_resource_percent", min_resource_percent) + _setter("sql_pool_id", sql_pool_id) if importance is not None: - pulumi.set(__self__, "importance", importance) + _setter("importance", importance) if max_resource_percent_per_request is not None: - pulumi.set(__self__, "max_resource_percent_per_request", max_resource_percent_per_request) + _setter("max_resource_percent_per_request", max_resource_percent_per_request) if min_resource_percent_per_request is not None: - pulumi.set(__self__, "min_resource_percent_per_request", min_resource_percent_per_request) + _setter("min_resource_percent_per_request", min_resource_percent_per_request) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if query_execution_timeout_in_seconds is not None: - pulumi.set(__self__, "query_execution_timeout_in_seconds", query_execution_timeout_in_seconds) + _setter("query_execution_timeout_in_seconds", query_execution_timeout_in_seconds) @property @pulumi.getter(name="maxResourcePercent") @@ -166,22 +209,59 @@ def __init__(__self__, *, :param pulumi.Input[int] query_execution_timeout_in_seconds: The workload group query execution timeout. :param pulumi.Input[str] sql_pool_id: The ID of the Synapse SQL Pool. Changing this forces a new Synapse SQL Pool Workload Group to be created. """ + _SqlPoolWorkloadGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + importance=importance, + max_resource_percent=max_resource_percent, + max_resource_percent_per_request=max_resource_percent_per_request, + min_resource_percent=min_resource_percent, + min_resource_percent_per_request=min_resource_percent_per_request, + name=name, + query_execution_timeout_in_seconds=query_execution_timeout_in_seconds, + sql_pool_id=sql_pool_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + importance: Optional[pulumi.Input[str]] = None, + max_resource_percent: Optional[pulumi.Input[int]] = None, + max_resource_percent_per_request: Optional[pulumi.Input[float]] = None, + min_resource_percent: Optional[pulumi.Input[int]] = None, + min_resource_percent_per_request: Optional[pulumi.Input[float]] = None, + name: Optional[pulumi.Input[str]] = None, + query_execution_timeout_in_seconds: Optional[pulumi.Input[int]] = None, + sql_pool_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_resource_percent is None and 'maxResourcePercent' in kwargs: + max_resource_percent = kwargs['maxResourcePercent'] + if max_resource_percent_per_request is None and 'maxResourcePercentPerRequest' in kwargs: + max_resource_percent_per_request = kwargs['maxResourcePercentPerRequest'] + if min_resource_percent is None and 'minResourcePercent' in kwargs: + min_resource_percent = kwargs['minResourcePercent'] + if min_resource_percent_per_request is None and 'minResourcePercentPerRequest' in kwargs: + min_resource_percent_per_request = kwargs['minResourcePercentPerRequest'] + if query_execution_timeout_in_seconds is None and 'queryExecutionTimeoutInSeconds' in kwargs: + query_execution_timeout_in_seconds = kwargs['queryExecutionTimeoutInSeconds'] + if sql_pool_id is None and 'sqlPoolId' in kwargs: + sql_pool_id = kwargs['sqlPoolId'] + if importance is not None: - pulumi.set(__self__, "importance", importance) + _setter("importance", importance) if max_resource_percent is not None: - pulumi.set(__self__, "max_resource_percent", max_resource_percent) + _setter("max_resource_percent", max_resource_percent) if max_resource_percent_per_request is not None: - pulumi.set(__self__, "max_resource_percent_per_request", max_resource_percent_per_request) + _setter("max_resource_percent_per_request", max_resource_percent_per_request) if min_resource_percent is not None: - pulumi.set(__self__, "min_resource_percent", min_resource_percent) + _setter("min_resource_percent", min_resource_percent) if min_resource_percent_per_request is not None: - pulumi.set(__self__, "min_resource_percent_per_request", min_resource_percent_per_request) + _setter("min_resource_percent_per_request", min_resource_percent_per_request) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if query_execution_timeout_in_seconds is not None: - pulumi.set(__self__, "query_execution_timeout_in_seconds", query_execution_timeout_in_seconds) + _setter("query_execution_timeout_in_seconds", query_execution_timeout_in_seconds) if sql_pool_id is not None: - pulumi.set(__self__, "sql_pool_id", sql_pool_id) + _setter("sql_pool_id", sql_pool_id) @property @pulumi.getter @@ -417,6 +497,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SqlPoolWorkloadGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/workspace.py b/sdk/python/pulumi_azure/synapse/workspace.py index 64c5472d68..28849394bf 100644 --- a/sdk/python/pulumi_azure/synapse/workspace.py +++ b/sdk/python/pulumi_azure/synapse/workspace.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -63,48 +63,141 @@ def __init__(__self__, *, :param pulumi.Input[bool] sql_identity_control_enabled: Are pipelines (running as workspace's system assigned identity) allowed to access SQL pools? :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Synapse Workspace. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_data_lake_gen2_filesystem_id", storage_data_lake_gen2_filesystem_id) + WorkspaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + storage_data_lake_gen2_filesystem_id=storage_data_lake_gen2_filesystem_id, + aad_admin=aad_admin, + azure_devops_repo=azure_devops_repo, + azuread_authentication_only=azuread_authentication_only, + compute_subnet_id=compute_subnet_id, + customer_managed_key=customer_managed_key, + data_exfiltration_protection_enabled=data_exfiltration_protection_enabled, + github_repo=github_repo, + identity=identity, + linking_allowed_for_aad_tenant_ids=linking_allowed_for_aad_tenant_ids, + location=location, + managed_resource_group_name=managed_resource_group_name, + managed_virtual_network_enabled=managed_virtual_network_enabled, + name=name, + public_network_access_enabled=public_network_access_enabled, + purview_id=purview_id, + sql_aad_admin=sql_aad_admin, + sql_administrator_login=sql_administrator_login, + sql_administrator_login_password=sql_administrator_login_password, + sql_identity_control_enabled=sql_identity_control_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_data_lake_gen2_filesystem_id: Optional[pulumi.Input[str]] = None, + aad_admin: Optional[pulumi.Input['WorkspaceAadAdminArgs']] = None, + azure_devops_repo: Optional[pulumi.Input['WorkspaceAzureDevopsRepoArgs']] = None, + azuread_authentication_only: Optional[pulumi.Input[bool]] = None, + compute_subnet_id: Optional[pulumi.Input[str]] = None, + customer_managed_key: Optional[pulumi.Input['WorkspaceCustomerManagedKeyArgs']] = None, + data_exfiltration_protection_enabled: Optional[pulumi.Input[bool]] = None, + github_repo: Optional[pulumi.Input['WorkspaceGithubRepoArgs']] = None, + identity: Optional[pulumi.Input['WorkspaceIdentityArgs']] = None, + linking_allowed_for_aad_tenant_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_resource_group_name: Optional[pulumi.Input[str]] = None, + managed_virtual_network_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + purview_id: Optional[pulumi.Input[str]] = None, + sql_aad_admin: Optional[pulumi.Input['WorkspaceSqlAadAdminArgs']] = None, + sql_administrator_login: Optional[pulumi.Input[str]] = None, + sql_administrator_login_password: Optional[pulumi.Input[str]] = None, + sql_identity_control_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_data_lake_gen2_filesystem_id is None and 'storageDataLakeGen2FilesystemId' in kwargs: + storage_data_lake_gen2_filesystem_id = kwargs['storageDataLakeGen2FilesystemId'] + if storage_data_lake_gen2_filesystem_id is None: + raise TypeError("Missing 'storage_data_lake_gen2_filesystem_id' argument") + if aad_admin is None and 'aadAdmin' in kwargs: + aad_admin = kwargs['aadAdmin'] + if azure_devops_repo is None and 'azureDevopsRepo' in kwargs: + azure_devops_repo = kwargs['azureDevopsRepo'] + if azuread_authentication_only is None and 'azureadAuthenticationOnly' in kwargs: + azuread_authentication_only = kwargs['azureadAuthenticationOnly'] + if compute_subnet_id is None and 'computeSubnetId' in kwargs: + compute_subnet_id = kwargs['computeSubnetId'] + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if data_exfiltration_protection_enabled is None and 'dataExfiltrationProtectionEnabled' in kwargs: + data_exfiltration_protection_enabled = kwargs['dataExfiltrationProtectionEnabled'] + if github_repo is None and 'githubRepo' in kwargs: + github_repo = kwargs['githubRepo'] + if linking_allowed_for_aad_tenant_ids is None and 'linkingAllowedForAadTenantIds' in kwargs: + linking_allowed_for_aad_tenant_ids = kwargs['linkingAllowedForAadTenantIds'] + if managed_resource_group_name is None and 'managedResourceGroupName' in kwargs: + managed_resource_group_name = kwargs['managedResourceGroupName'] + if managed_virtual_network_enabled is None and 'managedVirtualNetworkEnabled' in kwargs: + managed_virtual_network_enabled = kwargs['managedVirtualNetworkEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if purview_id is None and 'purviewId' in kwargs: + purview_id = kwargs['purviewId'] + if sql_aad_admin is None and 'sqlAadAdmin' in kwargs: + sql_aad_admin = kwargs['sqlAadAdmin'] + if sql_administrator_login is None and 'sqlAdministratorLogin' in kwargs: + sql_administrator_login = kwargs['sqlAdministratorLogin'] + if sql_administrator_login_password is None and 'sqlAdministratorLoginPassword' in kwargs: + sql_administrator_login_password = kwargs['sqlAdministratorLoginPassword'] + if sql_identity_control_enabled is None and 'sqlIdentityControlEnabled' in kwargs: + sql_identity_control_enabled = kwargs['sqlIdentityControlEnabled'] + + _setter("resource_group_name", resource_group_name) + _setter("storage_data_lake_gen2_filesystem_id", storage_data_lake_gen2_filesystem_id) if aad_admin is not None: - pulumi.set(__self__, "aad_admin", aad_admin) + _setter("aad_admin", aad_admin) if azure_devops_repo is not None: - pulumi.set(__self__, "azure_devops_repo", azure_devops_repo) + _setter("azure_devops_repo", azure_devops_repo) if azuread_authentication_only is not None: - pulumi.set(__self__, "azuread_authentication_only", azuread_authentication_only) + _setter("azuread_authentication_only", azuread_authentication_only) if compute_subnet_id is not None: - pulumi.set(__self__, "compute_subnet_id", compute_subnet_id) + _setter("compute_subnet_id", compute_subnet_id) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if data_exfiltration_protection_enabled is not None: - pulumi.set(__self__, "data_exfiltration_protection_enabled", data_exfiltration_protection_enabled) + _setter("data_exfiltration_protection_enabled", data_exfiltration_protection_enabled) if github_repo is not None: - pulumi.set(__self__, "github_repo", github_repo) + _setter("github_repo", github_repo) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if linking_allowed_for_aad_tenant_ids is not None: - pulumi.set(__self__, "linking_allowed_for_aad_tenant_ids", linking_allowed_for_aad_tenant_ids) + _setter("linking_allowed_for_aad_tenant_ids", linking_allowed_for_aad_tenant_ids) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_resource_group_name is not None: - pulumi.set(__self__, "managed_resource_group_name", managed_resource_group_name) + _setter("managed_resource_group_name", managed_resource_group_name) if managed_virtual_network_enabled is not None: - pulumi.set(__self__, "managed_virtual_network_enabled", managed_virtual_network_enabled) + _setter("managed_virtual_network_enabled", managed_virtual_network_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if purview_id is not None: - pulumi.set(__self__, "purview_id", purview_id) + _setter("purview_id", purview_id) if sql_aad_admin is not None: - pulumi.set(__self__, "sql_aad_admin", sql_aad_admin) + _setter("sql_aad_admin", sql_aad_admin) if sql_administrator_login is not None: - pulumi.set(__self__, "sql_administrator_login", sql_administrator_login) + _setter("sql_administrator_login", sql_administrator_login) if sql_administrator_login_password is not None: - pulumi.set(__self__, "sql_administrator_login_password", sql_administrator_login_password) + _setter("sql_administrator_login_password", sql_administrator_login_password) if sql_identity_control_enabled is not None: - pulumi.set(__self__, "sql_identity_control_enabled", sql_identity_control_enabled) + _setter("sql_identity_control_enabled", sql_identity_control_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="resourceGroupName") @@ -423,52 +516,145 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_data_lake_gen2_filesystem_id: Specifies the ID of storage data lake gen2 filesystem resource. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Synapse Workspace. """ + _WorkspaceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + aad_admin=aad_admin, + azure_devops_repo=azure_devops_repo, + azuread_authentication_only=azuread_authentication_only, + compute_subnet_id=compute_subnet_id, + connectivity_endpoints=connectivity_endpoints, + customer_managed_key=customer_managed_key, + data_exfiltration_protection_enabled=data_exfiltration_protection_enabled, + github_repo=github_repo, + identity=identity, + linking_allowed_for_aad_tenant_ids=linking_allowed_for_aad_tenant_ids, + location=location, + managed_resource_group_name=managed_resource_group_name, + managed_virtual_network_enabled=managed_virtual_network_enabled, + name=name, + public_network_access_enabled=public_network_access_enabled, + purview_id=purview_id, + resource_group_name=resource_group_name, + sql_aad_admin=sql_aad_admin, + sql_administrator_login=sql_administrator_login, + sql_administrator_login_password=sql_administrator_login_password, + sql_identity_control_enabled=sql_identity_control_enabled, + storage_data_lake_gen2_filesystem_id=storage_data_lake_gen2_filesystem_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aad_admin: Optional[pulumi.Input['WorkspaceAadAdminArgs']] = None, + azure_devops_repo: Optional[pulumi.Input['WorkspaceAzureDevopsRepoArgs']] = None, + azuread_authentication_only: Optional[pulumi.Input[bool]] = None, + compute_subnet_id: Optional[pulumi.Input[str]] = None, + connectivity_endpoints: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + customer_managed_key: Optional[pulumi.Input['WorkspaceCustomerManagedKeyArgs']] = None, + data_exfiltration_protection_enabled: Optional[pulumi.Input[bool]] = None, + github_repo: Optional[pulumi.Input['WorkspaceGithubRepoArgs']] = None, + identity: Optional[pulumi.Input['WorkspaceIdentityArgs']] = None, + linking_allowed_for_aad_tenant_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_resource_group_name: Optional[pulumi.Input[str]] = None, + managed_virtual_network_enabled: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + purview_id: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + sql_aad_admin: Optional[pulumi.Input['WorkspaceSqlAadAdminArgs']] = None, + sql_administrator_login: Optional[pulumi.Input[str]] = None, + sql_administrator_login_password: Optional[pulumi.Input[str]] = None, + sql_identity_control_enabled: Optional[pulumi.Input[bool]] = None, + storage_data_lake_gen2_filesystem_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aad_admin is None and 'aadAdmin' in kwargs: + aad_admin = kwargs['aadAdmin'] + if azure_devops_repo is None and 'azureDevopsRepo' in kwargs: + azure_devops_repo = kwargs['azureDevopsRepo'] + if azuread_authentication_only is None and 'azureadAuthenticationOnly' in kwargs: + azuread_authentication_only = kwargs['azureadAuthenticationOnly'] + if compute_subnet_id is None and 'computeSubnetId' in kwargs: + compute_subnet_id = kwargs['computeSubnetId'] + if connectivity_endpoints is None and 'connectivityEndpoints' in kwargs: + connectivity_endpoints = kwargs['connectivityEndpoints'] + if customer_managed_key is None and 'customerManagedKey' in kwargs: + customer_managed_key = kwargs['customerManagedKey'] + if data_exfiltration_protection_enabled is None and 'dataExfiltrationProtectionEnabled' in kwargs: + data_exfiltration_protection_enabled = kwargs['dataExfiltrationProtectionEnabled'] + if github_repo is None and 'githubRepo' in kwargs: + github_repo = kwargs['githubRepo'] + if linking_allowed_for_aad_tenant_ids is None and 'linkingAllowedForAadTenantIds' in kwargs: + linking_allowed_for_aad_tenant_ids = kwargs['linkingAllowedForAadTenantIds'] + if managed_resource_group_name is None and 'managedResourceGroupName' in kwargs: + managed_resource_group_name = kwargs['managedResourceGroupName'] + if managed_virtual_network_enabled is None and 'managedVirtualNetworkEnabled' in kwargs: + managed_virtual_network_enabled = kwargs['managedVirtualNetworkEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if purview_id is None and 'purviewId' in kwargs: + purview_id = kwargs['purviewId'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if sql_aad_admin is None and 'sqlAadAdmin' in kwargs: + sql_aad_admin = kwargs['sqlAadAdmin'] + if sql_administrator_login is None and 'sqlAdministratorLogin' in kwargs: + sql_administrator_login = kwargs['sqlAdministratorLogin'] + if sql_administrator_login_password is None and 'sqlAdministratorLoginPassword' in kwargs: + sql_administrator_login_password = kwargs['sqlAdministratorLoginPassword'] + if sql_identity_control_enabled is None and 'sqlIdentityControlEnabled' in kwargs: + sql_identity_control_enabled = kwargs['sqlIdentityControlEnabled'] + if storage_data_lake_gen2_filesystem_id is None and 'storageDataLakeGen2FilesystemId' in kwargs: + storage_data_lake_gen2_filesystem_id = kwargs['storageDataLakeGen2FilesystemId'] + if aad_admin is not None: - pulumi.set(__self__, "aad_admin", aad_admin) + _setter("aad_admin", aad_admin) if azure_devops_repo is not None: - pulumi.set(__self__, "azure_devops_repo", azure_devops_repo) + _setter("azure_devops_repo", azure_devops_repo) if azuread_authentication_only is not None: - pulumi.set(__self__, "azuread_authentication_only", azuread_authentication_only) + _setter("azuread_authentication_only", azuread_authentication_only) if compute_subnet_id is not None: - pulumi.set(__self__, "compute_subnet_id", compute_subnet_id) + _setter("compute_subnet_id", compute_subnet_id) if connectivity_endpoints is not None: - pulumi.set(__self__, "connectivity_endpoints", connectivity_endpoints) + _setter("connectivity_endpoints", connectivity_endpoints) if customer_managed_key is not None: - pulumi.set(__self__, "customer_managed_key", customer_managed_key) + _setter("customer_managed_key", customer_managed_key) if data_exfiltration_protection_enabled is not None: - pulumi.set(__self__, "data_exfiltration_protection_enabled", data_exfiltration_protection_enabled) + _setter("data_exfiltration_protection_enabled", data_exfiltration_protection_enabled) if github_repo is not None: - pulumi.set(__self__, "github_repo", github_repo) + _setter("github_repo", github_repo) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if linking_allowed_for_aad_tenant_ids is not None: - pulumi.set(__self__, "linking_allowed_for_aad_tenant_ids", linking_allowed_for_aad_tenant_ids) + _setter("linking_allowed_for_aad_tenant_ids", linking_allowed_for_aad_tenant_ids) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_resource_group_name is not None: - pulumi.set(__self__, "managed_resource_group_name", managed_resource_group_name) + _setter("managed_resource_group_name", managed_resource_group_name) if managed_virtual_network_enabled is not None: - pulumi.set(__self__, "managed_virtual_network_enabled", managed_virtual_network_enabled) + _setter("managed_virtual_network_enabled", managed_virtual_network_enabled) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if purview_id is not None: - pulumi.set(__self__, "purview_id", purview_id) + _setter("purview_id", purview_id) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if sql_aad_admin is not None: - pulumi.set(__self__, "sql_aad_admin", sql_aad_admin) + _setter("sql_aad_admin", sql_aad_admin) if sql_administrator_login is not None: - pulumi.set(__self__, "sql_administrator_login", sql_administrator_login) + _setter("sql_administrator_login", sql_administrator_login) if sql_administrator_login_password is not None: - pulumi.set(__self__, "sql_administrator_login_password", sql_administrator_login_password) + _setter("sql_administrator_login_password", sql_administrator_login_password) if sql_identity_control_enabled is not None: - pulumi.set(__self__, "sql_identity_control_enabled", sql_identity_control_enabled) + _setter("sql_identity_control_enabled", sql_identity_control_enabled) if storage_data_lake_gen2_filesystem_id is not None: - pulumi.set(__self__, "storage_data_lake_gen2_filesystem_id", storage_data_lake_gen2_filesystem_id) + _setter("storage_data_lake_gen2_filesystem_id", storage_data_lake_gen2_filesystem_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="aadAdmin") @@ -1066,6 +1252,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -1102,13 +1292,38 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = WorkspaceArgs.__new__(WorkspaceArgs) + if aad_admin is not None and not isinstance(aad_admin, WorkspaceAadAdminArgs): + aad_admin = aad_admin or {} + def _setter(key, value): + aad_admin[key] = value + WorkspaceAadAdminArgs._configure(_setter, **aad_admin) __props__.__dict__["aad_admin"] = aad_admin + if azure_devops_repo is not None and not isinstance(azure_devops_repo, WorkspaceAzureDevopsRepoArgs): + azure_devops_repo = azure_devops_repo or {} + def _setter(key, value): + azure_devops_repo[key] = value + WorkspaceAzureDevopsRepoArgs._configure(_setter, **azure_devops_repo) __props__.__dict__["azure_devops_repo"] = azure_devops_repo __props__.__dict__["azuread_authentication_only"] = azuread_authentication_only __props__.__dict__["compute_subnet_id"] = compute_subnet_id + if customer_managed_key is not None and not isinstance(customer_managed_key, WorkspaceCustomerManagedKeyArgs): + customer_managed_key = customer_managed_key or {} + def _setter(key, value): + customer_managed_key[key] = value + WorkspaceCustomerManagedKeyArgs._configure(_setter, **customer_managed_key) __props__.__dict__["customer_managed_key"] = customer_managed_key __props__.__dict__["data_exfiltration_protection_enabled"] = data_exfiltration_protection_enabled + if github_repo is not None and not isinstance(github_repo, WorkspaceGithubRepoArgs): + github_repo = github_repo or {} + def _setter(key, value): + github_repo[key] = value + WorkspaceGithubRepoArgs._configure(_setter, **github_repo) __props__.__dict__["github_repo"] = github_repo + if identity is not None and not isinstance(identity, WorkspaceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + WorkspaceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity __props__.__dict__["linking_allowed_for_aad_tenant_ids"] = linking_allowed_for_aad_tenant_ids __props__.__dict__["location"] = location @@ -1120,6 +1335,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if sql_aad_admin is not None and not isinstance(sql_aad_admin, WorkspaceSqlAadAdminArgs): + sql_aad_admin = sql_aad_admin or {} + def _setter(key, value): + sql_aad_admin[key] = value + WorkspaceSqlAadAdminArgs._configure(_setter, **sql_aad_admin) __props__.__dict__["sql_aad_admin"] = sql_aad_admin __props__.__dict__["sql_administrator_login"] = sql_administrator_login __props__.__dict__["sql_administrator_login_password"] = None if sql_administrator_login_password is None else pulumi.Output.secret(sql_administrator_login_password) diff --git a/sdk/python/pulumi_azure/synapse/workspace_aad_admin.py b/sdk/python/pulumi_azure/synapse/workspace_aad_admin.py index c274dc3ab3..5d266da221 100644 --- a/sdk/python/pulumi_azure/synapse/workspace_aad_admin.py +++ b/sdk/python/pulumi_azure/synapse/workspace_aad_admin.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WorkspaceAadAdminInitArgs', 'WorkspaceAadAdmin'] @@ -25,10 +25,41 @@ def __init__(__self__, *, :param pulumi.Input[str] synapse_workspace_id: The ID of the Synapse Workspace where the Azure AD Administrator should be configured. :param pulumi.Input[str] tenant_id: The tenant id of the Azure AD Administrator of this Synapse Workspace. """ - pulumi.set(__self__, "login", login) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) - pulumi.set(__self__, "tenant_id", tenant_id) + WorkspaceAadAdminInitArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + object_id=object_id, + synapse_workspace_id=synapse_workspace_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if synapse_workspace_id is None: + raise TypeError("Missing 'synapse_workspace_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("login", login) + _setter("object_id", object_id) + _setter("synapse_workspace_id", synapse_workspace_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -93,14 +124,37 @@ def __init__(__self__, *, :param pulumi.Input[str] synapse_workspace_id: The ID of the Synapse Workspace where the Azure AD Administrator should be configured. :param pulumi.Input[str] tenant_id: The tenant id of the Azure AD Administrator of this Synapse Workspace. """ + _WorkspaceAadAdminState._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + object_id=object_id, + synapse_workspace_id=synapse_workspace_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if login is not None: - pulumi.set(__self__, "login", login) + _setter("login", login) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -328,6 +382,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceAadAdminInitArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/workspace_extended_auditing_policy.py b/sdk/python/pulumi_azure/synapse/workspace_extended_auditing_policy.py index fffffa919a..fffd1936cb 100644 --- a/sdk/python/pulumi_azure/synapse/workspace_extended_auditing_policy.py +++ b/sdk/python/pulumi_azure/synapse/workspace_extended_auditing_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WorkspaceExtendedAuditingPolicyArgs', 'WorkspaceExtendedAuditingPolicy'] @@ -29,17 +29,52 @@ def __init__(__self__, *, :param pulumi.Input[bool] storage_account_access_key_is_secondary: Is `storage_account_access_key` value the storage's secondary key? :param pulumi.Input[str] storage_endpoint: The blob storage endpoint (e.g. ). This blob storage will hold all extended auditing logs. """ - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + WorkspaceExtendedAuditingPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + synapse_workspace_id=synapse_workspace_id, + log_monitoring_enabled=log_monitoring_enabled, + retention_in_days=retention_in_days, + storage_account_access_key=storage_account_access_key, + storage_account_access_key_is_secondary=storage_account_access_key_is_secondary, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + log_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_access_key_is_secondary: Optional[pulumi.Input[bool]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if synapse_workspace_id is None: + raise TypeError("Missing 'synapse_workspace_id' argument") + if log_monitoring_enabled is None and 'logMonitoringEnabled' in kwargs: + log_monitoring_enabled = kwargs['logMonitoringEnabled'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key_is_secondary is None and 'storageAccountAccessKeyIsSecondary' in kwargs: + storage_account_access_key_is_secondary = kwargs['storageAccountAccessKeyIsSecondary'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + + _setter("synapse_workspace_id", synapse_workspace_id) if log_monitoring_enabled is not None: - pulumi.set(__self__, "log_monitoring_enabled", log_monitoring_enabled) + _setter("log_monitoring_enabled", log_monitoring_enabled) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_access_key_is_secondary is not None: - pulumi.set(__self__, "storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) + _setter("storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="synapseWorkspaceId") @@ -132,18 +167,51 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_endpoint: The blob storage endpoint (e.g. ). This blob storage will hold all extended auditing logs. :param pulumi.Input[str] synapse_workspace_id: The ID of the Synapse workspace to set the extended auditing policy. Changing this forces a new resource to be created. """ + _WorkspaceExtendedAuditingPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + log_monitoring_enabled=log_monitoring_enabled, + retention_in_days=retention_in_days, + storage_account_access_key=storage_account_access_key, + storage_account_access_key_is_secondary=storage_account_access_key_is_secondary, + storage_endpoint=storage_endpoint, + synapse_workspace_id=synapse_workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + log_monitoring_enabled: Optional[pulumi.Input[bool]] = None, + retention_in_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_account_access_key_is_secondary: Optional[pulumi.Input[bool]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if log_monitoring_enabled is None and 'logMonitoringEnabled' in kwargs: + log_monitoring_enabled = kwargs['logMonitoringEnabled'] + if retention_in_days is None and 'retentionInDays' in kwargs: + retention_in_days = kwargs['retentionInDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_account_access_key_is_secondary is None and 'storageAccountAccessKeyIsSecondary' in kwargs: + storage_account_access_key_is_secondary = kwargs['storageAccountAccessKeyIsSecondary'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if log_monitoring_enabled is not None: - pulumi.set(__self__, "log_monitoring_enabled", log_monitoring_enabled) + _setter("log_monitoring_enabled", log_monitoring_enabled) if retention_in_days is not None: - pulumi.set(__self__, "retention_in_days", retention_in_days) + _setter("retention_in_days", retention_in_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_account_access_key_is_secondary is not None: - pulumi.set(__self__, "storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) + _setter("storage_account_access_key_is_secondary", storage_account_access_key_is_secondary) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) @property @pulumi.getter(name="logMonitoringEnabled") @@ -349,6 +417,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceExtendedAuditingPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/workspace_key.py b/sdk/python/pulumi_azure/synapse/workspace_key.py index 6725168c8e..e3d2b02dab 100644 --- a/sdk/python/pulumi_azure/synapse/workspace_key.py +++ b/sdk/python/pulumi_azure/synapse/workspace_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WorkspaceKeyArgs', 'WorkspaceKey'] @@ -27,11 +27,40 @@ def __init__(__self__, *, :param pulumi.Input[str] synapse_workspace_id: The ID of the Synapse Workspace where the encryption key should be configured. :param pulumi.Input[str] customer_managed_key_versionless_id: The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption """ - pulumi.set(__self__, "active", active) - pulumi.set(__self__, "customer_managed_key_name", customer_managed_key_name) - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + WorkspaceKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + active=active, + customer_managed_key_name=customer_managed_key_name, + synapse_workspace_id=synapse_workspace_id, + customer_managed_key_versionless_id=customer_managed_key_versionless_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active: Optional[pulumi.Input[bool]] = None, + customer_managed_key_name: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + customer_managed_key_versionless_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active is None: + raise TypeError("Missing 'active' argument") + if customer_managed_key_name is None and 'customerManagedKeyName' in kwargs: + customer_managed_key_name = kwargs['customerManagedKeyName'] + if customer_managed_key_name is None: + raise TypeError("Missing 'customer_managed_key_name' argument") + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if synapse_workspace_id is None: + raise TypeError("Missing 'synapse_workspace_id' argument") + if customer_managed_key_versionless_id is None and 'customerManagedKeyVersionlessId' in kwargs: + customer_managed_key_versionless_id = kwargs['customerManagedKeyVersionlessId'] + + _setter("active", active) + _setter("customer_managed_key_name", customer_managed_key_name) + _setter("synapse_workspace_id", synapse_workspace_id) if customer_managed_key_versionless_id is not None: - pulumi.set(__self__, "customer_managed_key_versionless_id", customer_managed_key_versionless_id) + _setter("customer_managed_key_versionless_id", customer_managed_key_versionless_id) @property @pulumi.getter @@ -100,14 +129,37 @@ def __init__(__self__, *, :param pulumi.Input[str] customer_managed_key_versionless_id: The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption :param pulumi.Input[str] synapse_workspace_id: The ID of the Synapse Workspace where the encryption key should be configured. """ + _WorkspaceKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + active=active, + customer_managed_key_name=customer_managed_key_name, + customer_managed_key_versionless_id=customer_managed_key_versionless_id, + synapse_workspace_id=synapse_workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active: Optional[pulumi.Input[bool]] = None, + customer_managed_key_name: Optional[pulumi.Input[str]] = None, + customer_managed_key_versionless_id: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if customer_managed_key_name is None and 'customerManagedKeyName' in kwargs: + customer_managed_key_name = kwargs['customerManagedKeyName'] + if customer_managed_key_versionless_id is None and 'customerManagedKeyVersionlessId' in kwargs: + customer_managed_key_versionless_id = kwargs['customerManagedKeyVersionlessId'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if active is not None: - pulumi.set(__self__, "active", active) + _setter("active", active) if customer_managed_key_name is not None: - pulumi.set(__self__, "customer_managed_key_name", customer_managed_key_name) + _setter("customer_managed_key_name", customer_managed_key_name) if customer_managed_key_versionless_id is not None: - pulumi.set(__self__, "customer_managed_key_versionless_id", customer_managed_key_versionless_id) + _setter("customer_managed_key_versionless_id", customer_managed_key_versionless_id) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) @property @pulumi.getter @@ -371,6 +423,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceKeyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/workspace_security_alert_policy.py b/sdk/python/pulumi_azure/synapse/workspace_security_alert_policy.py index 486e2d5baf..18f575404f 100644 --- a/sdk/python/pulumi_azure/synapse/workspace_security_alert_policy.py +++ b/sdk/python/pulumi_azure/synapse/workspace_security_alert_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WorkspaceSecurityAlertPolicyArgs', 'WorkspaceSecurityAlertPolicy'] @@ -33,20 +33,65 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_access_key: Specifies the identifier key of the Threat Detection audit storage account. :param pulumi.Input[str] storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. """ - pulumi.set(__self__, "policy_state", policy_state) - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + WorkspaceSecurityAlertPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy_state=policy_state, + synapse_workspace_id=synapse_workspace_id, + disabled_alerts=disabled_alerts, + email_account_admins_enabled=email_account_admins_enabled, + email_addresses=email_addresses, + retention_days=retention_days, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy_state: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + disabled_alerts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_account_admins_enabled: Optional[pulumi.Input[bool]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + retention_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if policy_state is None and 'policyState' in kwargs: + policy_state = kwargs['policyState'] + if policy_state is None: + raise TypeError("Missing 'policy_state' argument") + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if synapse_workspace_id is None: + raise TypeError("Missing 'synapse_workspace_id' argument") + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins_enabled is None and 'emailAccountAdminsEnabled' in kwargs: + email_account_admins_enabled = kwargs['emailAccountAdminsEnabled'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + + _setter("policy_state", policy_state) + _setter("synapse_workspace_id", synapse_workspace_id) if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins_enabled is not None: - pulumi.set(__self__, "email_account_admins_enabled", email_account_admins_enabled) + _setter("email_account_admins_enabled", email_account_admins_enabled) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) @property @pulumi.getter(name="policyState") @@ -167,22 +212,63 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_endpoint: Specifies the blob storage endpoint (e.g. ). This blob storage will hold all Threat Detection audit logs. :param pulumi.Input[str] synapse_workspace_id: Specifies the ID of the Synapse Workspace. Changing this forces a new resource to be created. """ + _WorkspaceSecurityAlertPolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + disabled_alerts=disabled_alerts, + email_account_admins_enabled=email_account_admins_enabled, + email_addresses=email_addresses, + policy_state=policy_state, + retention_days=retention_days, + storage_account_access_key=storage_account_access_key, + storage_endpoint=storage_endpoint, + synapse_workspace_id=synapse_workspace_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disabled_alerts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + email_account_admins_enabled: Optional[pulumi.Input[bool]] = None, + email_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + policy_state: Optional[pulumi.Input[str]] = None, + retention_days: Optional[pulumi.Input[int]] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_endpoint: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disabled_alerts is None and 'disabledAlerts' in kwargs: + disabled_alerts = kwargs['disabledAlerts'] + if email_account_admins_enabled is None and 'emailAccountAdminsEnabled' in kwargs: + email_account_admins_enabled = kwargs['emailAccountAdminsEnabled'] + if email_addresses is None and 'emailAddresses' in kwargs: + email_addresses = kwargs['emailAddresses'] + if policy_state is None and 'policyState' in kwargs: + policy_state = kwargs['policyState'] + if retention_days is None and 'retentionDays' in kwargs: + retention_days = kwargs['retentionDays'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_endpoint is None and 'storageEndpoint' in kwargs: + storage_endpoint = kwargs['storageEndpoint'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if disabled_alerts is not None: - pulumi.set(__self__, "disabled_alerts", disabled_alerts) + _setter("disabled_alerts", disabled_alerts) if email_account_admins_enabled is not None: - pulumi.set(__self__, "email_account_admins_enabled", email_account_admins_enabled) + _setter("email_account_admins_enabled", email_account_admins_enabled) if email_addresses is not None: - pulumi.set(__self__, "email_addresses", email_addresses) + _setter("email_addresses", email_addresses) if policy_state is not None: - pulumi.set(__self__, "policy_state", policy_state) + _setter("policy_state", policy_state) if retention_days is not None: - pulumi.set(__self__, "retention_days", retention_days) + _setter("retention_days", retention_days) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_endpoint is not None: - pulumi.set(__self__, "storage_endpoint", storage_endpoint) + _setter("storage_endpoint", storage_endpoint) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) @property @pulumi.getter(name="disabledAlerts") @@ -442,6 +528,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceSecurityAlertPolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/workspace_sql_aad_admin.py b/sdk/python/pulumi_azure/synapse/workspace_sql_aad_admin.py index 0ba0671366..49eebd2e28 100644 --- a/sdk/python/pulumi_azure/synapse/workspace_sql_aad_admin.py +++ b/sdk/python/pulumi_azure/synapse/workspace_sql_aad_admin.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['WorkspaceSqlAadAdminInitArgs', 'WorkspaceSqlAadAdmin'] @@ -25,10 +25,41 @@ def __init__(__self__, *, :param pulumi.Input[str] synapse_workspace_id: The ID of the Synapse Workspace where the Azure AD Administrator should be configured. :param pulumi.Input[str] tenant_id: The tenant id of the Azure AD Administrator of this Synapse Workspace. """ - pulumi.set(__self__, "login", login) - pulumi.set(__self__, "object_id", object_id) - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) - pulumi.set(__self__, "tenant_id", tenant_id) + WorkspaceSqlAadAdminInitArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + object_id=object_id, + synapse_workspace_id=synapse_workspace_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if login is None: + raise TypeError("Missing 'login' argument") + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if object_id is None: + raise TypeError("Missing 'object_id' argument") + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if synapse_workspace_id is None: + raise TypeError("Missing 'synapse_workspace_id' argument") + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if tenant_id is None: + raise TypeError("Missing 'tenant_id' argument") + + _setter("login", login) + _setter("object_id", object_id) + _setter("synapse_workspace_id", synapse_workspace_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -93,14 +124,37 @@ def __init__(__self__, *, :param pulumi.Input[str] synapse_workspace_id: The ID of the Synapse Workspace where the Azure AD Administrator should be configured. :param pulumi.Input[str] tenant_id: The tenant id of the Azure AD Administrator of this Synapse Workspace. """ + _WorkspaceSqlAadAdminState._configure( + lambda key, value: pulumi.set(__self__, key, value), + login=login, + object_id=object_id, + synapse_workspace_id=synapse_workspace_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + login: Optional[pulumi.Input[str]] = None, + object_id: Optional[pulumi.Input[str]] = None, + synapse_workspace_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if object_id is None and 'objectId' in kwargs: + object_id = kwargs['objectId'] + if synapse_workspace_id is None and 'synapseWorkspaceId' in kwargs: + synapse_workspace_id = kwargs['synapseWorkspaceId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + if login is not None: - pulumi.set(__self__, "login", login) + _setter("login", login) if object_id is not None: - pulumi.set(__self__, "object_id", object_id) + _setter("object_id", object_id) if synapse_workspace_id is not None: - pulumi.set(__self__, "synapse_workspace_id", synapse_workspace_id) + _setter("synapse_workspace_id", synapse_workspace_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -328,6 +382,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceSqlAadAdminInitArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/synapse/workspace_vulnerability_assessment.py b/sdk/python/pulumi_azure/synapse/workspace_vulnerability_assessment.py index 0296b0a830..82c1bdf27d 100644 --- a/sdk/python/pulumi_azure/synapse/workspace_vulnerability_assessment.py +++ b/sdk/python/pulumi_azure/synapse/workspace_vulnerability_assessment.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -29,14 +29,47 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_account_access_key: Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storage_container_sas_key` isn't specified, `storage_account_access_key` is required. :param pulumi.Input[str] storage_container_sas_key: A shared access signature (SAS Key) that has write access to the blob container specified in `storage_container_path` parameter. If `storage_account_access_key` isn't specified, `storage_container_sas_key` is required. """ - pulumi.set(__self__, "storage_container_path", storage_container_path) - pulumi.set(__self__, "workspace_security_alert_policy_id", workspace_security_alert_policy_id) + WorkspaceVulnerabilityAssessmentArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_container_path=storage_container_path, + workspace_security_alert_policy_id=workspace_security_alert_policy_id, + recurring_scans=recurring_scans, + storage_account_access_key=storage_account_access_key, + storage_container_sas_key=storage_container_sas_key, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_container_path: Optional[pulumi.Input[str]] = None, + workspace_security_alert_policy_id: Optional[pulumi.Input[str]] = None, + recurring_scans: Optional[pulumi.Input['WorkspaceVulnerabilityAssessmentRecurringScansArgs']] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_container_sas_key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_container_path is None and 'storageContainerPath' in kwargs: + storage_container_path = kwargs['storageContainerPath'] + if storage_container_path is None: + raise TypeError("Missing 'storage_container_path' argument") + if workspace_security_alert_policy_id is None and 'workspaceSecurityAlertPolicyId' in kwargs: + workspace_security_alert_policy_id = kwargs['workspaceSecurityAlertPolicyId'] + if workspace_security_alert_policy_id is None: + raise TypeError("Missing 'workspace_security_alert_policy_id' argument") + if recurring_scans is None and 'recurringScans' in kwargs: + recurring_scans = kwargs['recurringScans'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_container_sas_key is None and 'storageContainerSasKey' in kwargs: + storage_container_sas_key = kwargs['storageContainerSasKey'] + + _setter("storage_container_path", storage_container_path) + _setter("workspace_security_alert_policy_id", workspace_security_alert_policy_id) if recurring_scans is not None: - pulumi.set(__self__, "recurring_scans", recurring_scans) + _setter("recurring_scans", recurring_scans) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_container_sas_key is not None: - pulumi.set(__self__, "storage_container_sas_key", storage_container_sas_key) + _setter("storage_container_sas_key", storage_container_sas_key) @property @pulumi.getter(name="storageContainerPath") @@ -115,16 +148,45 @@ def __init__(__self__, *, :param pulumi.Input[str] storage_container_sas_key: A shared access signature (SAS Key) that has write access to the blob container specified in `storage_container_path` parameter. If `storage_account_access_key` isn't specified, `storage_container_sas_key` is required. :param pulumi.Input[str] workspace_security_alert_policy_id: The ID of the security alert policy of the Synapse Workspace. Changing this forces a new resource to be created. """ + _WorkspaceVulnerabilityAssessmentState._configure( + lambda key, value: pulumi.set(__self__, key, value), + recurring_scans=recurring_scans, + storage_account_access_key=storage_account_access_key, + storage_container_path=storage_container_path, + storage_container_sas_key=storage_container_sas_key, + workspace_security_alert_policy_id=workspace_security_alert_policy_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + recurring_scans: Optional[pulumi.Input['WorkspaceVulnerabilityAssessmentRecurringScansArgs']] = None, + storage_account_access_key: Optional[pulumi.Input[str]] = None, + storage_container_path: Optional[pulumi.Input[str]] = None, + storage_container_sas_key: Optional[pulumi.Input[str]] = None, + workspace_security_alert_policy_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if recurring_scans is None and 'recurringScans' in kwargs: + recurring_scans = kwargs['recurringScans'] + if storage_account_access_key is None and 'storageAccountAccessKey' in kwargs: + storage_account_access_key = kwargs['storageAccountAccessKey'] + if storage_container_path is None and 'storageContainerPath' in kwargs: + storage_container_path = kwargs['storageContainerPath'] + if storage_container_sas_key is None and 'storageContainerSasKey' in kwargs: + storage_container_sas_key = kwargs['storageContainerSasKey'] + if workspace_security_alert_policy_id is None and 'workspaceSecurityAlertPolicyId' in kwargs: + workspace_security_alert_policy_id = kwargs['workspaceSecurityAlertPolicyId'] + if recurring_scans is not None: - pulumi.set(__self__, "recurring_scans", recurring_scans) + _setter("recurring_scans", recurring_scans) if storage_account_access_key is not None: - pulumi.set(__self__, "storage_account_access_key", storage_account_access_key) + _setter("storage_account_access_key", storage_account_access_key) if storage_container_path is not None: - pulumi.set(__self__, "storage_container_path", storage_container_path) + _setter("storage_container_path", storage_container_path) if storage_container_sas_key is not None: - pulumi.set(__self__, "storage_container_sas_key", storage_container_sas_key) + _setter("storage_container_sas_key", storage_container_sas_key) if workspace_security_alert_policy_id is not None: - pulumi.set(__self__, "workspace_security_alert_policy_id", workspace_security_alert_policy_id) + _setter("workspace_security_alert_policy_id", workspace_security_alert_policy_id) @property @pulumi.getter(name="recurringScans") @@ -368,6 +430,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + WorkspaceVulnerabilityAssessmentArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -387,6 +453,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = WorkspaceVulnerabilityAssessmentArgs.__new__(WorkspaceVulnerabilityAssessmentArgs) + if recurring_scans is not None and not isinstance(recurring_scans, WorkspaceVulnerabilityAssessmentRecurringScansArgs): + recurring_scans = recurring_scans or {} + def _setter(key, value): + recurring_scans[key] = value + WorkspaceVulnerabilityAssessmentRecurringScansArgs._configure(_setter, **recurring_scans) __props__.__dict__["recurring_scans"] = recurring_scans __props__.__dict__["storage_account_access_key"] = None if storage_account_access_key is None else pulumi.Output.secret(storage_account_access_key) if storage_container_path is None and not opts.urn: diff --git a/sdk/python/pulumi_azure/trafficmanager/_inputs.py b/sdk/python/pulumi_azure/trafficmanager/_inputs.py index d42d0c6e15..65a93fe6dd 100644 --- a/sdk/python/pulumi_azure/trafficmanager/_inputs.py +++ b/sdk/python/pulumi_azure/trafficmanager/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -24,8 +24,27 @@ def __init__(__self__, *, :param pulumi.Input[str] relative_name: The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created. :param pulumi.Input[int] ttl: The TTL value of the Profile used by Local DNS resolvers and clients. """ - pulumi.set(__self__, "relative_name", relative_name) - pulumi.set(__self__, "ttl", ttl) + ProfileDnsConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + relative_name=relative_name, + ttl=ttl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + relative_name: Optional[pulumi.Input[str]] = None, + ttl: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if relative_name is None and 'relativeName' in kwargs: + relative_name = kwargs['relativeName'] + if relative_name is None: + raise TypeError("Missing 'relative_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + + _setter("relative_name", relative_name) + _setter("ttl", ttl) @property @pulumi.getter(name="relativeName") @@ -73,20 +92,59 @@ def __init__(__self__, *, :param pulumi.Input[int] timeout_in_seconds: The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If `interval_in_seconds` is set to `30`, then `timeout_in_seconds` can be between `5` and `10`. The default value is `10`. If `interval_in_seconds` is set to `10`, then valid values are between `5` and `9` and `timeout_in_seconds` is required. :param pulumi.Input[int] tolerated_number_of_failures: The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between `0` and `9`. The default value is `3` """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "protocol", protocol) + ProfileMonitorConfigArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + protocol=protocol, + custom_headers=custom_headers, + expected_status_code_ranges=expected_status_code_ranges, + interval_in_seconds=interval_in_seconds, + path=path, + timeout_in_seconds=timeout_in_seconds, + tolerated_number_of_failures=tolerated_number_of_failures, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None, + custom_headers: Optional[pulumi.Input[Sequence[pulumi.Input['ProfileMonitorConfigCustomHeaderArgs']]]] = None, + expected_status_code_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + interval_in_seconds: Optional[pulumi.Input[int]] = None, + path: Optional[pulumi.Input[str]] = None, + timeout_in_seconds: Optional[pulumi.Input[int]] = None, + tolerated_number_of_failures: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + if expected_status_code_ranges is None and 'expectedStatusCodeRanges' in kwargs: + expected_status_code_ranges = kwargs['expectedStatusCodeRanges'] + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + if tolerated_number_of_failures is None and 'toleratedNumberOfFailures' in kwargs: + tolerated_number_of_failures = kwargs['toleratedNumberOfFailures'] + + _setter("port", port) + _setter("protocol", protocol) if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if expected_status_code_ranges is not None: - pulumi.set(__self__, "expected_status_code_ranges", expected_status_code_ranges) + _setter("expected_status_code_ranges", expected_status_code_ranges) if interval_in_seconds is not None: - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) + _setter("interval_in_seconds", interval_in_seconds) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) if tolerated_number_of_failures is not None: - pulumi.set(__self__, "tolerated_number_of_failures", tolerated_number_of_failures) + _setter("tolerated_number_of_failures", tolerated_number_of_failures) @property @pulumi.getter @@ -194,8 +252,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the custom header. :param pulumi.Input[str] value: The value of custom header. Applicable for HTTP and HTTPS protocol. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + ProfileMonitorConfigCustomHeaderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + value: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/trafficmanager/get_geographical_location.py b/sdk/python/pulumi_azure/trafficmanager/get_geographical_location.py index c34d775e70..d9dc02f5a4 100644 --- a/sdk/python/pulumi_azure/trafficmanager/get_geographical_location.py +++ b/sdk/python/pulumi_azure/trafficmanager/get_geographical_location.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/trafficmanager/outputs.py b/sdk/python/pulumi_azure/trafficmanager/outputs.py index 66dc8ab6ad..9d6460581c 100644 --- a/sdk/python/pulumi_azure/trafficmanager/outputs.py +++ b/sdk/python/pulumi_azure/trafficmanager/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -42,8 +42,27 @@ def __init__(__self__, *, :param str relative_name: The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created. :param int ttl: The TTL value of the Profile used by Local DNS resolvers and clients. """ - pulumi.set(__self__, "relative_name", relative_name) - pulumi.set(__self__, "ttl", ttl) + ProfileDnsConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + relative_name=relative_name, + ttl=ttl, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + relative_name: Optional[str] = None, + ttl: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if relative_name is None and 'relativeName' in kwargs: + relative_name = kwargs['relativeName'] + if relative_name is None: + raise TypeError("Missing 'relative_name' argument") + if ttl is None: + raise TypeError("Missing 'ttl' argument") + + _setter("relative_name", relative_name) + _setter("ttl", ttl) @property @pulumi.getter(name="relativeName") @@ -108,20 +127,59 @@ def __init__(__self__, *, :param int timeout_in_seconds: The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If `interval_in_seconds` is set to `30`, then `timeout_in_seconds` can be between `5` and `10`. The default value is `10`. If `interval_in_seconds` is set to `10`, then valid values are between `5` and `9` and `timeout_in_seconds` is required. :param int tolerated_number_of_failures: The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between `0` and `9`. The default value is `3` """ - pulumi.set(__self__, "port", port) - pulumi.set(__self__, "protocol", protocol) + ProfileMonitorConfig._configure( + lambda key, value: pulumi.set(__self__, key, value), + port=port, + protocol=protocol, + custom_headers=custom_headers, + expected_status_code_ranges=expected_status_code_ranges, + interval_in_seconds=interval_in_seconds, + path=path, + timeout_in_seconds=timeout_in_seconds, + tolerated_number_of_failures=tolerated_number_of_failures, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + port: Optional[int] = None, + protocol: Optional[str] = None, + custom_headers: Optional[Sequence['outputs.ProfileMonitorConfigCustomHeader']] = None, + expected_status_code_ranges: Optional[Sequence[str]] = None, + interval_in_seconds: Optional[int] = None, + path: Optional[str] = None, + timeout_in_seconds: Optional[int] = None, + tolerated_number_of_failures: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if port is None: + raise TypeError("Missing 'port' argument") + if protocol is None: + raise TypeError("Missing 'protocol' argument") + if custom_headers is None and 'customHeaders' in kwargs: + custom_headers = kwargs['customHeaders'] + if expected_status_code_ranges is None and 'expectedStatusCodeRanges' in kwargs: + expected_status_code_ranges = kwargs['expectedStatusCodeRanges'] + if interval_in_seconds is None and 'intervalInSeconds' in kwargs: + interval_in_seconds = kwargs['intervalInSeconds'] + if timeout_in_seconds is None and 'timeoutInSeconds' in kwargs: + timeout_in_seconds = kwargs['timeoutInSeconds'] + if tolerated_number_of_failures is None and 'toleratedNumberOfFailures' in kwargs: + tolerated_number_of_failures = kwargs['toleratedNumberOfFailures'] + + _setter("port", port) + _setter("protocol", protocol) if custom_headers is not None: - pulumi.set(__self__, "custom_headers", custom_headers) + _setter("custom_headers", custom_headers) if expected_status_code_ranges is not None: - pulumi.set(__self__, "expected_status_code_ranges", expected_status_code_ranges) + _setter("expected_status_code_ranges", expected_status_code_ranges) if interval_in_seconds is not None: - pulumi.set(__self__, "interval_in_seconds", interval_in_seconds) + _setter("interval_in_seconds", interval_in_seconds) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if timeout_in_seconds is not None: - pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds) + _setter("timeout_in_seconds", timeout_in_seconds) if tolerated_number_of_failures is not None: - pulumi.set(__self__, "tolerated_number_of_failures", tolerated_number_of_failures) + _setter("tolerated_number_of_failures", tolerated_number_of_failures) @property @pulumi.getter @@ -197,8 +255,25 @@ def __init__(__self__, *, :param str name: The name of the custom header. :param str value: The value of custom header. Applicable for HTTP and HTTPS protocol. """ - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "value", value) + ProfileMonitorConfigCustomHeader._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + value=value, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[str] = None, + value: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if name is None: + raise TypeError("Missing 'name' argument") + if value is None: + raise TypeError("Missing 'value' argument") + + _setter("name", name) + _setter("value", value) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/trafficmanager/profile.py b/sdk/python/pulumi_azure/trafficmanager/profile.py index c61fda7b6f..e7acccb0e4 100644 --- a/sdk/python/pulumi_azure/trafficmanager/profile.py +++ b/sdk/python/pulumi_azure/trafficmanager/profile.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -39,20 +39,69 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] traffic_view_enabled: Indicates whether Traffic View is enabled for the Traffic Manager profile. """ - pulumi.set(__self__, "dns_config", dns_config) - pulumi.set(__self__, "monitor_config", monitor_config) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "traffic_routing_method", traffic_routing_method) + ProfileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_config=dns_config, + monitor_config=monitor_config, + resource_group_name=resource_group_name, + traffic_routing_method=traffic_routing_method, + max_return=max_return, + name=name, + profile_status=profile_status, + tags=tags, + traffic_view_enabled=traffic_view_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_config: Optional[pulumi.Input['ProfileDnsConfigArgs']] = None, + monitor_config: Optional[pulumi.Input['ProfileMonitorConfigArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + traffic_routing_method: Optional[pulumi.Input[str]] = None, + max_return: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + profile_status: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + traffic_view_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_config is None and 'dnsConfig' in kwargs: + dns_config = kwargs['dnsConfig'] + if dns_config is None: + raise TypeError("Missing 'dns_config' argument") + if monitor_config is None and 'monitorConfig' in kwargs: + monitor_config = kwargs['monitorConfig'] + if monitor_config is None: + raise TypeError("Missing 'monitor_config' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if traffic_routing_method is None and 'trafficRoutingMethod' in kwargs: + traffic_routing_method = kwargs['trafficRoutingMethod'] + if traffic_routing_method is None: + raise TypeError("Missing 'traffic_routing_method' argument") + if max_return is None and 'maxReturn' in kwargs: + max_return = kwargs['maxReturn'] + if profile_status is None and 'profileStatus' in kwargs: + profile_status = kwargs['profileStatus'] + if traffic_view_enabled is None and 'trafficViewEnabled' in kwargs: + traffic_view_enabled = kwargs['trafficViewEnabled'] + + _setter("dns_config", dns_config) + _setter("monitor_config", monitor_config) + _setter("resource_group_name", resource_group_name) + _setter("traffic_routing_method", traffic_routing_method) if max_return is not None: - pulumi.set(__self__, "max_return", max_return) + _setter("max_return", max_return) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if profile_status is not None: - pulumi.set(__self__, "profile_status", profile_status) + _setter("profile_status", profile_status) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if traffic_view_enabled is not None: - pulumi.set(__self__, "traffic_view_enabled", traffic_view_enabled) + _setter("traffic_view_enabled", traffic_view_enabled) @property @pulumi.getter(name="dnsConfig") @@ -193,26 +242,69 @@ def __init__(__self__, *, :param pulumi.Input[str] traffic_routing_method: Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. :param pulumi.Input[bool] traffic_view_enabled: Indicates whether Traffic View is enabled for the Traffic Manager profile. """ + _ProfileState._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_config=dns_config, + fqdn=fqdn, + max_return=max_return, + monitor_config=monitor_config, + name=name, + profile_status=profile_status, + resource_group_name=resource_group_name, + tags=tags, + traffic_routing_method=traffic_routing_method, + traffic_view_enabled=traffic_view_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_config: Optional[pulumi.Input['ProfileDnsConfigArgs']] = None, + fqdn: Optional[pulumi.Input[str]] = None, + max_return: Optional[pulumi.Input[int]] = None, + monitor_config: Optional[pulumi.Input['ProfileMonitorConfigArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + profile_status: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + traffic_routing_method: Optional[pulumi.Input[str]] = None, + traffic_view_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_config is None and 'dnsConfig' in kwargs: + dns_config = kwargs['dnsConfig'] + if max_return is None and 'maxReturn' in kwargs: + max_return = kwargs['maxReturn'] + if monitor_config is None and 'monitorConfig' in kwargs: + monitor_config = kwargs['monitorConfig'] + if profile_status is None and 'profileStatus' in kwargs: + profile_status = kwargs['profileStatus'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if traffic_routing_method is None and 'trafficRoutingMethod' in kwargs: + traffic_routing_method = kwargs['trafficRoutingMethod'] + if traffic_view_enabled is None and 'trafficViewEnabled' in kwargs: + traffic_view_enabled = kwargs['trafficViewEnabled'] + if dns_config is not None: - pulumi.set(__self__, "dns_config", dns_config) + _setter("dns_config", dns_config) if fqdn is not None: - pulumi.set(__self__, "fqdn", fqdn) + _setter("fqdn", fqdn) if max_return is not None: - pulumi.set(__self__, "max_return", max_return) + _setter("max_return", max_return) if monitor_config is not None: - pulumi.set(__self__, "monitor_config", monitor_config) + _setter("monitor_config", monitor_config) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if profile_status is not None: - pulumi.set(__self__, "profile_status", profile_status) + _setter("profile_status", profile_status) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if traffic_routing_method is not None: - pulumi.set(__self__, "traffic_routing_method", traffic_routing_method) + _setter("traffic_routing_method", traffic_routing_method) if traffic_view_enabled is not None: - pulumi.set(__self__, "traffic_view_enabled", traffic_view_enabled) + _setter("traffic_view_enabled", traffic_view_enabled) @property @pulumi.getter(name="dnsConfig") @@ -475,6 +567,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProfileArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -499,10 +595,20 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ProfileArgs.__new__(ProfileArgs) + if dns_config is not None and not isinstance(dns_config, ProfileDnsConfigArgs): + dns_config = dns_config or {} + def _setter(key, value): + dns_config[key] = value + ProfileDnsConfigArgs._configure(_setter, **dns_config) if dns_config is None and not opts.urn: raise TypeError("Missing required property 'dns_config'") __props__.__dict__["dns_config"] = dns_config __props__.__dict__["max_return"] = max_return + if monitor_config is not None and not isinstance(monitor_config, ProfileMonitorConfigArgs): + monitor_config = monitor_config or {} + def _setter(key, value): + monitor_config[key] = value + ProfileMonitorConfigArgs._configure(_setter, **monitor_config) if monitor_config is None and not opts.urn: raise TypeError("Missing required property 'monitor_config'") __props__.__dict__["monitor_config"] = monitor_config diff --git a/sdk/python/pulumi_azure/videoanalyzer/_inputs.py b/sdk/python/pulumi_azure/videoanalyzer/_inputs.py index caa27f1ee7..259a19ea20 100644 --- a/sdk/python/pulumi_azure/videoanalyzer/_inputs.py +++ b/sdk/python/pulumi_azure/videoanalyzer/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -23,8 +23,27 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] identity_ids: Specifies a list of User Assigned Managed Identity IDs to be assigned to this Video Analyzer instance. :param pulumi.Input[str] type: Specifies the type of Managed Service Identity that should be configured on this Video Analyzer instance. Only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + AnalyzerIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -60,8 +79,27 @@ def __init__(__self__, *, :param pulumi.Input[str] id: Specifies the ID of the Storage Account that will be associated with the Video Analyzer instance. :param pulumi.Input[str] user_assigned_identity_id: Specifies the User Assigned Identity ID which should be assigned to access this Storage Account. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + AnalyzerStorageAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + user_assigned_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_assigned_identity_id is None: + raise TypeError("Missing 'user_assigned_identity_id' argument") + + _setter("id", id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/videoanalyzer/analyzer.py b/sdk/python/pulumi_azure/videoanalyzer/analyzer.py index 2eb4349a94..7b0ca5fb21 100644 --- a/sdk/python/pulumi_azure/videoanalyzer/analyzer.py +++ b/sdk/python/pulumi_azure/videoanalyzer/analyzer.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -31,15 +31,46 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name of the Video Analyzer. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource. """ - pulumi.set(__self__, "identity", identity) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "storage_account", storage_account) + AnalyzerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity=identity, + resource_group_name=resource_group_name, + storage_account=storage_account, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity: Optional[pulumi.Input['AnalyzerIdentityArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account: Optional[pulumi.Input['AnalyzerStorageAccountArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity is None: + raise TypeError("Missing 'identity' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if storage_account is None and 'storageAccount' in kwargs: + storage_account = kwargs['storageAccount'] + if storage_account is None: + raise TypeError("Missing 'storage_account' argument") + + _setter("identity", identity) + _setter("resource_group_name", resource_group_name) + _setter("storage_account", storage_account) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -132,18 +163,43 @@ def __init__(__self__, *, :param pulumi.Input['AnalyzerStorageAccountArgs'] storage_account: A `storage_account` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags assigned to the resource. """ + _AnalyzerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity=identity, + location=location, + name=name, + resource_group_name=resource_group_name, + storage_account=storage_account, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity: Optional[pulumi.Input['AnalyzerIdentityArgs']] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + storage_account: Optional[pulumi.Input['AnalyzerStorageAccountArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if storage_account is None and 'storageAccount' in kwargs: + storage_account = kwargs['storageAccount'] + if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if storage_account is not None: - pulumi.set(__self__, "storage_account", storage_account) + _setter("storage_account", storage_account) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -367,6 +423,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + AnalyzerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -387,6 +447,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = AnalyzerArgs.__new__(AnalyzerArgs) + if identity is not None and not isinstance(identity, AnalyzerIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + AnalyzerIdentityArgs._configure(_setter, **identity) if identity is None and not opts.urn: raise TypeError("Missing required property 'identity'") __props__.__dict__["identity"] = identity @@ -395,6 +460,11 @@ def _internal_init(__self__, if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") __props__.__dict__["resource_group_name"] = resource_group_name + if storage_account is not None and not isinstance(storage_account, AnalyzerStorageAccountArgs): + storage_account = storage_account or {} + def _setter(key, value): + storage_account[key] = value + AnalyzerStorageAccountArgs._configure(_setter, **storage_account) if storage_account is None and not opts.urn: raise TypeError("Missing required property 'storage_account'") __props__.__dict__["storage_account"] = storage_account diff --git a/sdk/python/pulumi_azure/videoanalyzer/edge_module.py b/sdk/python/pulumi_azure/videoanalyzer/edge_module.py index a6bf6de2fd..6e1f007aac 100644 --- a/sdk/python/pulumi_azure/videoanalyzer/edge_module.py +++ b/sdk/python/pulumi_azure/videoanalyzer/edge_module.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EdgeModuleArgs', 'EdgeModule'] @@ -23,10 +23,33 @@ def __init__(__self__, *, :param pulumi.Input[str] video_analyzer_name: The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the Video Analyzer Edge Module. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "video_analyzer_name", video_analyzer_name) + EdgeModuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + video_analyzer_name=video_analyzer_name, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + video_analyzer_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if video_analyzer_name is None and 'videoAnalyzerName' in kwargs: + video_analyzer_name = kwargs['videoAnalyzerName'] + if video_analyzer_name is None: + raise TypeError("Missing 'video_analyzer_name' argument") + + _setter("resource_group_name", resource_group_name) + _setter("video_analyzer_name", video_analyzer_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="resourceGroupName") @@ -77,12 +100,31 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create the Video Analyzer Edge Module. Changing this forces a new resource to be created. :param pulumi.Input[str] video_analyzer_name: The name of the Video Analyzer in which to create the Edge Module. Changing this forces a new resource to be created. """ + _EdgeModuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + resource_group_name=resource_group_name, + video_analyzer_name=video_analyzer_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + video_analyzer_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if video_analyzer_name is None and 'videoAnalyzerName' in kwargs: + video_analyzer_name = kwargs['videoAnalyzerName'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if video_analyzer_name is not None: - pulumi.set(__self__, "video_analyzer_name", video_analyzer_name) + _setter("video_analyzer_name", video_analyzer_name) @property @pulumi.getter @@ -272,6 +314,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EdgeModuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/videoanalyzer/outputs.py b/sdk/python/pulumi_azure/videoanalyzer/outputs.py index 852ce26dfc..5828d0134d 100644 --- a/sdk/python/pulumi_azure/videoanalyzer/outputs.py +++ b/sdk/python/pulumi_azure/videoanalyzer/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -40,8 +40,27 @@ def __init__(__self__, *, :param Sequence[str] identity_ids: Specifies a list of User Assigned Managed Identity IDs to be assigned to this Video Analyzer instance. :param str type: Specifies the type of Managed Service Identity that should be configured on this Video Analyzer instance. Only possible value is `UserAssigned`. """ - pulumi.set(__self__, "identity_ids", identity_ids) - pulumi.set(__self__, "type", type) + AnalyzerIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + identity_ids=identity_ids, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + identity_ids: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if identity_ids is None: + raise TypeError("Missing 'identity_ids' argument") + if type is None: + raise TypeError("Missing 'type' argument") + + _setter("identity_ids", identity_ids) + _setter("type", type) @property @pulumi.getter(name="identityIds") @@ -86,8 +105,27 @@ def __init__(__self__, *, :param str id: Specifies the ID of the Storage Account that will be associated with the Video Analyzer instance. :param str user_assigned_identity_id: Specifies the User Assigned Identity ID which should be assigned to access this Storage Account. """ - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "user_assigned_identity_id", user_assigned_identity_id) + AnalyzerStorageAccount._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + user_assigned_identity_id=user_assigned_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + user_assigned_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if user_assigned_identity_id is None and 'userAssignedIdentityId' in kwargs: + user_assigned_identity_id = kwargs['userAssignedIdentityId'] + if user_assigned_identity_id is None: + raise TypeError("Missing 'user_assigned_identity_id' argument") + + _setter("id", id) + _setter("user_assigned_identity_id", user_assigned_identity_id) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/voice/_inputs.py b/sdk/python/pulumi_azure/voice/_inputs.py index 38c09aa64b..c1d51fe972 100644 --- a/sdk/python/pulumi_azure/voice/_inputs.py +++ b/sdk/python/pulumi_azure/voice/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -30,14 +30,45 @@ def __init__(__self__, *, !> **NOTE:** The `esrp_addresses` must be specified for each `service_location` when the`e911_type` is set to `DirectToEsrp`. The `esrp_addresses` must not be specified for each `service_location` when the`e911_type` is set to `Standard`. """ - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "operator_addresses", operator_addresses) + ServicesCommunicationsGatewayServiceLocationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + operator_addresses=operator_addresses, + allowed_media_source_address_prefixes=allowed_media_source_address_prefixes, + allowed_signaling_source_address_prefixes=allowed_signaling_source_address_prefixes, + esrp_addresses=esrp_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + operator_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_media_source_address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allowed_signaling_source_address_prefixes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + esrp_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is None: + raise TypeError("Missing 'location' argument") + if operator_addresses is None and 'operatorAddresses' in kwargs: + operator_addresses = kwargs['operatorAddresses'] + if operator_addresses is None: + raise TypeError("Missing 'operator_addresses' argument") + if allowed_media_source_address_prefixes is None and 'allowedMediaSourceAddressPrefixes' in kwargs: + allowed_media_source_address_prefixes = kwargs['allowedMediaSourceAddressPrefixes'] + if allowed_signaling_source_address_prefixes is None and 'allowedSignalingSourceAddressPrefixes' in kwargs: + allowed_signaling_source_address_prefixes = kwargs['allowedSignalingSourceAddressPrefixes'] + if esrp_addresses is None and 'esrpAddresses' in kwargs: + esrp_addresses = kwargs['esrpAddresses'] + + _setter("location", location) + _setter("operator_addresses", operator_addresses) if allowed_media_source_address_prefixes is not None: - pulumi.set(__self__, "allowed_media_source_address_prefixes", allowed_media_source_address_prefixes) + _setter("allowed_media_source_address_prefixes", allowed_media_source_address_prefixes) if allowed_signaling_source_address_prefixes is not None: - pulumi.set(__self__, "allowed_signaling_source_address_prefixes", allowed_signaling_source_address_prefixes) + _setter("allowed_signaling_source_address_prefixes", allowed_signaling_source_address_prefixes) if esrp_addresses is not None: - pulumi.set(__self__, "esrp_addresses", esrp_addresses) + _setter("esrp_addresses", esrp_addresses) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/voice/outputs.py b/sdk/python/pulumi_azure/voice/outputs.py index 15634b93d9..8e7d9b1fe7 100644 --- a/sdk/python/pulumi_azure/voice/outputs.py +++ b/sdk/python/pulumi_azure/voice/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -53,14 +53,45 @@ def __init__(__self__, *, !> **NOTE:** The `esrp_addresses` must be specified for each `service_location` when the`e911_type` is set to `DirectToEsrp`. The `esrp_addresses` must not be specified for each `service_location` when the`e911_type` is set to `Standard`. """ - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "operator_addresses", operator_addresses) + ServicesCommunicationsGatewayServiceLocation._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + operator_addresses=operator_addresses, + allowed_media_source_address_prefixes=allowed_media_source_address_prefixes, + allowed_signaling_source_address_prefixes=allowed_signaling_source_address_prefixes, + esrp_addresses=esrp_addresses, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[str] = None, + operator_addresses: Optional[Sequence[str]] = None, + allowed_media_source_address_prefixes: Optional[Sequence[str]] = None, + allowed_signaling_source_address_prefixes: Optional[Sequence[str]] = None, + esrp_addresses: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if location is None: + raise TypeError("Missing 'location' argument") + if operator_addresses is None and 'operatorAddresses' in kwargs: + operator_addresses = kwargs['operatorAddresses'] + if operator_addresses is None: + raise TypeError("Missing 'operator_addresses' argument") + if allowed_media_source_address_prefixes is None and 'allowedMediaSourceAddressPrefixes' in kwargs: + allowed_media_source_address_prefixes = kwargs['allowedMediaSourceAddressPrefixes'] + if allowed_signaling_source_address_prefixes is None and 'allowedSignalingSourceAddressPrefixes' in kwargs: + allowed_signaling_source_address_prefixes = kwargs['allowedSignalingSourceAddressPrefixes'] + if esrp_addresses is None and 'esrpAddresses' in kwargs: + esrp_addresses = kwargs['esrpAddresses'] + + _setter("location", location) + _setter("operator_addresses", operator_addresses) if allowed_media_source_address_prefixes is not None: - pulumi.set(__self__, "allowed_media_source_address_prefixes", allowed_media_source_address_prefixes) + _setter("allowed_media_source_address_prefixes", allowed_media_source_address_prefixes) if allowed_signaling_source_address_prefixes is not None: - pulumi.set(__self__, "allowed_signaling_source_address_prefixes", allowed_signaling_source_address_prefixes) + _setter("allowed_signaling_source_address_prefixes", allowed_signaling_source_address_prefixes) if esrp_addresses is not None: - pulumi.set(__self__, "esrp_addresses", esrp_addresses) + _setter("esrp_addresses", esrp_addresses) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/voice/services_communications_gateway.py b/sdk/python/pulumi_azure/voice/services_communications_gateway.py index 1b40aa265c..7bc9dbd794 100644 --- a/sdk/python/pulumi_azure/voice/services_communications_gateway.py +++ b/sdk/python/pulumi_azure/voice/services_communications_gateway.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -47,28 +47,93 @@ def __init__(__self__, *, :param pulumi.Input[bool] on_prem_mcp_enabled: Whether an on-premises Mobile Control Point is in use. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Voice Services Communications Gateways. """ - pulumi.set(__self__, "codecs", codecs) - pulumi.set(__self__, "connectivity", connectivity) - pulumi.set(__self__, "e911_type", e911_type) - pulumi.set(__self__, "platforms", platforms) - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "service_locations", service_locations) + ServicesCommunicationsGatewayArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + codecs=codecs, + connectivity=connectivity, + e911_type=e911_type, + platforms=platforms, + resource_group_name=resource_group_name, + service_locations=service_locations, + api_bridge=api_bridge, + auto_generated_domain_name_label_scope=auto_generated_domain_name_label_scope, + emergency_dial_strings=emergency_dial_strings, + location=location, + microsoft_teams_voicemail_pilot_number=microsoft_teams_voicemail_pilot_number, + name=name, + on_prem_mcp_enabled=on_prem_mcp_enabled, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + codecs: Optional[pulumi.Input[str]] = None, + connectivity: Optional[pulumi.Input[str]] = None, + e911_type: Optional[pulumi.Input[str]] = None, + platforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_locations: Optional[pulumi.Input[Sequence[pulumi.Input['ServicesCommunicationsGatewayServiceLocationArgs']]]] = None, + api_bridge: Optional[pulumi.Input[str]] = None, + auto_generated_domain_name_label_scope: Optional[pulumi.Input[str]] = None, + emergency_dial_strings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + microsoft_teams_voicemail_pilot_number: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + on_prem_mcp_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if codecs is None: + raise TypeError("Missing 'codecs' argument") + if connectivity is None: + raise TypeError("Missing 'connectivity' argument") + if e911_type is None and 'e911Type' in kwargs: + e911_type = kwargs['e911Type'] + if e911_type is None: + raise TypeError("Missing 'e911_type' argument") + if platforms is None: + raise TypeError("Missing 'platforms' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if service_locations is None and 'serviceLocations' in kwargs: + service_locations = kwargs['serviceLocations'] + if service_locations is None: + raise TypeError("Missing 'service_locations' argument") + if api_bridge is None and 'apiBridge' in kwargs: + api_bridge = kwargs['apiBridge'] + if auto_generated_domain_name_label_scope is None and 'autoGeneratedDomainNameLabelScope' in kwargs: + auto_generated_domain_name_label_scope = kwargs['autoGeneratedDomainNameLabelScope'] + if emergency_dial_strings is None and 'emergencyDialStrings' in kwargs: + emergency_dial_strings = kwargs['emergencyDialStrings'] + if microsoft_teams_voicemail_pilot_number is None and 'microsoftTeamsVoicemailPilotNumber' in kwargs: + microsoft_teams_voicemail_pilot_number = kwargs['microsoftTeamsVoicemailPilotNumber'] + if on_prem_mcp_enabled is None and 'onPremMcpEnabled' in kwargs: + on_prem_mcp_enabled = kwargs['onPremMcpEnabled'] + + _setter("codecs", codecs) + _setter("connectivity", connectivity) + _setter("e911_type", e911_type) + _setter("platforms", platforms) + _setter("resource_group_name", resource_group_name) + _setter("service_locations", service_locations) if api_bridge is not None: - pulumi.set(__self__, "api_bridge", api_bridge) + _setter("api_bridge", api_bridge) if auto_generated_domain_name_label_scope is not None: - pulumi.set(__self__, "auto_generated_domain_name_label_scope", auto_generated_domain_name_label_scope) + _setter("auto_generated_domain_name_label_scope", auto_generated_domain_name_label_scope) if emergency_dial_strings is not None: - pulumi.set(__self__, "emergency_dial_strings", emergency_dial_strings) + _setter("emergency_dial_strings", emergency_dial_strings) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if microsoft_teams_voicemail_pilot_number is not None: - pulumi.set(__self__, "microsoft_teams_voicemail_pilot_number", microsoft_teams_voicemail_pilot_number) + _setter("microsoft_teams_voicemail_pilot_number", microsoft_teams_voicemail_pilot_number) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if on_prem_mcp_enabled is not None: - pulumi.set(__self__, "on_prem_mcp_enabled", on_prem_mcp_enabled) + _setter("on_prem_mcp_enabled", on_prem_mcp_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -273,34 +338,87 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['ServicesCommunicationsGatewayServiceLocationArgs']]] service_locations: A `service_location` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Voice Services Communications Gateways. """ + _ServicesCommunicationsGatewayState._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_bridge=api_bridge, + auto_generated_domain_name_label_scope=auto_generated_domain_name_label_scope, + codecs=codecs, + connectivity=connectivity, + e911_type=e911_type, + emergency_dial_strings=emergency_dial_strings, + location=location, + microsoft_teams_voicemail_pilot_number=microsoft_teams_voicemail_pilot_number, + name=name, + on_prem_mcp_enabled=on_prem_mcp_enabled, + platforms=platforms, + resource_group_name=resource_group_name, + service_locations=service_locations, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_bridge: Optional[pulumi.Input[str]] = None, + auto_generated_domain_name_label_scope: Optional[pulumi.Input[str]] = None, + codecs: Optional[pulumi.Input[str]] = None, + connectivity: Optional[pulumi.Input[str]] = None, + e911_type: Optional[pulumi.Input[str]] = None, + emergency_dial_strings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + microsoft_teams_voicemail_pilot_number: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + on_prem_mcp_enabled: Optional[pulumi.Input[bool]] = None, + platforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + service_locations: Optional[pulumi.Input[Sequence[pulumi.Input['ServicesCommunicationsGatewayServiceLocationArgs']]]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if api_bridge is None and 'apiBridge' in kwargs: + api_bridge = kwargs['apiBridge'] + if auto_generated_domain_name_label_scope is None and 'autoGeneratedDomainNameLabelScope' in kwargs: + auto_generated_domain_name_label_scope = kwargs['autoGeneratedDomainNameLabelScope'] + if e911_type is None and 'e911Type' in kwargs: + e911_type = kwargs['e911Type'] + if emergency_dial_strings is None and 'emergencyDialStrings' in kwargs: + emergency_dial_strings = kwargs['emergencyDialStrings'] + if microsoft_teams_voicemail_pilot_number is None and 'microsoftTeamsVoicemailPilotNumber' in kwargs: + microsoft_teams_voicemail_pilot_number = kwargs['microsoftTeamsVoicemailPilotNumber'] + if on_prem_mcp_enabled is None and 'onPremMcpEnabled' in kwargs: + on_prem_mcp_enabled = kwargs['onPremMcpEnabled'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if service_locations is None and 'serviceLocations' in kwargs: + service_locations = kwargs['serviceLocations'] + if api_bridge is not None: - pulumi.set(__self__, "api_bridge", api_bridge) + _setter("api_bridge", api_bridge) if auto_generated_domain_name_label_scope is not None: - pulumi.set(__self__, "auto_generated_domain_name_label_scope", auto_generated_domain_name_label_scope) + _setter("auto_generated_domain_name_label_scope", auto_generated_domain_name_label_scope) if codecs is not None: - pulumi.set(__self__, "codecs", codecs) + _setter("codecs", codecs) if connectivity is not None: - pulumi.set(__self__, "connectivity", connectivity) + _setter("connectivity", connectivity) if e911_type is not None: - pulumi.set(__self__, "e911_type", e911_type) + _setter("e911_type", e911_type) if emergency_dial_strings is not None: - pulumi.set(__self__, "emergency_dial_strings", emergency_dial_strings) + _setter("emergency_dial_strings", emergency_dial_strings) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if microsoft_teams_voicemail_pilot_number is not None: - pulumi.set(__self__, "microsoft_teams_voicemail_pilot_number", microsoft_teams_voicemail_pilot_number) + _setter("microsoft_teams_voicemail_pilot_number", microsoft_teams_voicemail_pilot_number) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if on_prem_mcp_enabled is not None: - pulumi.set(__self__, "on_prem_mcp_enabled", on_prem_mcp_enabled) + _setter("on_prem_mcp_enabled", on_prem_mcp_enabled) if platforms is not None: - pulumi.set(__self__, "platforms", platforms) + _setter("platforms", platforms) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if service_locations is not None: - pulumi.set(__self__, "service_locations", service_locations) + _setter("service_locations", service_locations) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="apiBridge") @@ -648,6 +766,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServicesCommunicationsGatewayArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/voice/services_communications_gateway_test_line.py b/sdk/python/pulumi_azure/voice/services_communications_gateway_test_line.py index e0fe43cfc6..f47bd0df41 100644 --- a/sdk/python/pulumi_azure/voice/services_communications_gateway_test_line.py +++ b/sdk/python/pulumi_azure/voice/services_communications_gateway_test_line.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['ServicesCommunicationsGatewayTestLineArgs', 'ServicesCommunicationsGatewayTestLine'] @@ -29,15 +29,46 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specifies the name which should be used for this Voice Services Communications Gateway Test Line. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Voice Services Communications Gateway Test Line. """ - pulumi.set(__self__, "phone_number", phone_number) - pulumi.set(__self__, "purpose", purpose) - pulumi.set(__self__, "voice_services_communications_gateway_id", voice_services_communications_gateway_id) + ServicesCommunicationsGatewayTestLineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + phone_number=phone_number, + purpose=purpose, + voice_services_communications_gateway_id=voice_services_communications_gateway_id, + location=location, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + phone_number: Optional[pulumi.Input[str]] = None, + purpose: Optional[pulumi.Input[str]] = None, + voice_services_communications_gateway_id: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if phone_number is None: + raise TypeError("Missing 'phone_number' argument") + if purpose is None: + raise TypeError("Missing 'purpose' argument") + if voice_services_communications_gateway_id is None and 'voiceServicesCommunicationsGatewayId' in kwargs: + voice_services_communications_gateway_id = kwargs['voiceServicesCommunicationsGatewayId'] + if voice_services_communications_gateway_id is None: + raise TypeError("Missing 'voice_services_communications_gateway_id' argument") + + _setter("phone_number", phone_number) + _setter("purpose", purpose) + _setter("voice_services_communications_gateway_id", voice_services_communications_gateway_id) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="phoneNumber") @@ -130,18 +161,43 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags which should be assigned to the Voice Services Communications Gateway Test Line. :param pulumi.Input[str] voice_services_communications_gateway_id: Specifies the ID of the Voice Services Communications Gateway. Changing this forces a new resource to be created. """ + _ServicesCommunicationsGatewayTestLineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + phone_number=phone_number, + purpose=purpose, + tags=tags, + voice_services_communications_gateway_id=voice_services_communications_gateway_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + phone_number: Optional[pulumi.Input[str]] = None, + purpose: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + voice_services_communications_gateway_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if phone_number is None and 'phoneNumber' in kwargs: + phone_number = kwargs['phoneNumber'] + if voice_services_communications_gateway_id is None and 'voiceServicesCommunicationsGatewayId' in kwargs: + voice_services_communications_gateway_id = kwargs['voiceServicesCommunicationsGatewayId'] + if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if phone_number is not None: - pulumi.set(__self__, "phone_number", phone_number) + _setter("phone_number", phone_number) if purpose is not None: - pulumi.set(__self__, "purpose", purpose) + _setter("purpose", purpose) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if voice_services_communications_gateway_id is not None: - pulumi.set(__self__, "voice_services_communications_gateway_id", voice_services_communications_gateway_id) + _setter("voice_services_communications_gateway_id", voice_services_communications_gateway_id) @property @pulumi.getter @@ -311,6 +367,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServicesCommunicationsGatewayTestLineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/waf/_inputs.py b/sdk/python/pulumi_azure/waf/_inputs.py index 9ce22628ba..0874095d28 100644 --- a/sdk/python/pulumi_azure/waf/_inputs.py +++ b/sdk/python/pulumi_azure/waf/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -48,20 +48,65 @@ def __init__(__self__, *, :param pulumi.Input[str] rate_limit_duration: Specifies the duration at which the rate limit policy will be applied. Should be used with `RateLimitRule` rule type. Possible values are `FiveMins` and `OneMin`. :param pulumi.Input[int] rate_limit_threshold: Specifies the threshold value for the rate limit policy. Must be greater than or equal to 1 if provided. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "match_conditions", match_conditions) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "rule_type", rule_type) + PolicyCustomRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + match_conditions=match_conditions, + priority=priority, + rule_type=rule_type, + enabled=enabled, + group_rate_limit_by=group_rate_limit_by, + name=name, + rate_limit_duration=rate_limit_duration, + rate_limit_threshold=rate_limit_threshold, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[pulumi.Input[str]] = None, + match_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyCustomRuleMatchConditionArgs']]]] = None, + priority: Optional[pulumi.Input[int]] = None, + rule_type: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + group_rate_limit_by: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rate_limit_duration: Optional[pulumi.Input[str]] = None, + rate_limit_threshold: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if match_conditions is None and 'matchConditions' in kwargs: + match_conditions = kwargs['matchConditions'] + if match_conditions is None: + raise TypeError("Missing 'match_conditions' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if rule_type is None and 'ruleType' in kwargs: + rule_type = kwargs['ruleType'] + if rule_type is None: + raise TypeError("Missing 'rule_type' argument") + if group_rate_limit_by is None and 'groupRateLimitBy' in kwargs: + group_rate_limit_by = kwargs['groupRateLimitBy'] + if rate_limit_duration is None and 'rateLimitDuration' in kwargs: + rate_limit_duration = kwargs['rateLimitDuration'] + if rate_limit_threshold is None and 'rateLimitThreshold' in kwargs: + rate_limit_threshold = kwargs['rateLimitThreshold'] + + _setter("action", action) + _setter("match_conditions", match_conditions) + _setter("priority", priority) + _setter("rule_type", rule_type) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if group_rate_limit_by is not None: - pulumi.set(__self__, "group_rate_limit_by", group_rate_limit_by) + _setter("group_rate_limit_by", group_rate_limit_by) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rate_limit_duration is not None: - pulumi.set(__self__, "rate_limit_duration", rate_limit_duration) + _setter("rate_limit_duration", rate_limit_duration) if rate_limit_threshold is not None: - pulumi.set(__self__, "rate_limit_threshold", rate_limit_threshold) + _setter("rate_limit_threshold", rate_limit_threshold) @property @pulumi.getter @@ -187,14 +232,43 @@ def __init__(__self__, *, :param pulumi.Input[bool] negation_condition: Describes if this is negate condition or not :param pulumi.Input[Sequence[pulumi.Input[str]]] transforms: A list of transformations to do before the match is attempted. Possible values are `HtmlEntityDecode`, `Lowercase`, `RemoveNulls`, `Trim`, `UrlDecode` and `UrlEncode`. """ - pulumi.set(__self__, "match_variables", match_variables) - pulumi.set(__self__, "operator", operator) + PolicyCustomRuleMatchConditionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variables=match_variables, + operator=operator, + match_values=match_values, + negation_condition=negation_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variables: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyCustomRuleMatchConditionMatchVariableArgs']]]] = None, + operator: Optional[pulumi.Input[str]] = None, + match_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + negation_condition: Optional[pulumi.Input[bool]] = None, + transforms: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variables is None and 'matchVariables' in kwargs: + match_variables = kwargs['matchVariables'] + if match_variables is None: + raise TypeError("Missing 'match_variables' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negation_condition is None and 'negationCondition' in kwargs: + negation_condition = kwargs['negationCondition'] + + _setter("match_variables", match_variables) + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negation_condition is not None: - pulumi.set(__self__, "negation_condition", negation_condition) + _setter("negation_condition", negation_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="matchVariables") @@ -266,9 +340,26 @@ def __init__(__self__, *, :param pulumi.Input[str] variable_name: The name of the Match Variable. Possible values are `RemoteAddr`, `RequestMethod`, `QueryString`, `PostArgs`, `RequestUri`, `RequestHeaders`, `RequestBody` and `RequestCookies`. :param pulumi.Input[str] selector: Describes field of the matchVariable collection """ - pulumi.set(__self__, "variable_name", variable_name) + PolicyCustomRuleMatchConditionMatchVariableArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + variable_name=variable_name, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + variable_name: Optional[pulumi.Input[str]] = None, + selector: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if variable_name is None and 'variableName' in kwargs: + variable_name = kwargs['variableName'] + if variable_name is None: + raise TypeError("Missing 'variable_name' argument") + + _setter("variable_name", variable_name) if selector is not None: - pulumi.set(__self__, "selector", selector) + _setter("selector", selector) @property @pulumi.getter(name="variableName") @@ -304,9 +395,26 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['PolicyManagedRulesManagedRuleSetArgs']]] managed_rule_sets: One or more `managed_rule_set` block defined below. :param pulumi.Input[Sequence[pulumi.Input['PolicyManagedRulesExclusionArgs']]] exclusions: One or more `exclusion` block defined below. """ - pulumi.set(__self__, "managed_rule_sets", managed_rule_sets) + PolicyManagedRulesArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_rule_sets=managed_rule_sets, + exclusions=exclusions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_rule_sets: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyManagedRulesManagedRuleSetArgs']]]] = None, + exclusions: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyManagedRulesExclusionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_rule_sets is None and 'managedRuleSets' in kwargs: + managed_rule_sets = kwargs['managedRuleSets'] + if managed_rule_sets is None: + raise TypeError("Missing 'managed_rule_sets' argument") + + _setter("managed_rule_sets", managed_rule_sets) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) @property @pulumi.getter(name="managedRuleSets") @@ -346,11 +454,40 @@ def __init__(__self__, *, :param pulumi.Input[str] selector_match_operator: Describes operator to be matched. Possible values: `Contains`, `EndsWith`, `Equals`, `EqualsAny`, `StartsWith`. :param pulumi.Input['PolicyManagedRulesExclusionExcludedRuleSetArgs'] excluded_rule_set: One or more `excluded_rule_set` block defined below. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "selector", selector) - pulumi.set(__self__, "selector_match_operator", selector_match_operator) + PolicyManagedRulesExclusionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + selector=selector, + selector_match_operator=selector_match_operator, + excluded_rule_set=excluded_rule_set, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[pulumi.Input[str]] = None, + selector: Optional[pulumi.Input[str]] = None, + selector_match_operator: Optional[pulumi.Input[str]] = None, + excluded_rule_set: Optional[pulumi.Input['PolicyManagedRulesExclusionExcludedRuleSetArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + if selector_match_operator is None and 'selectorMatchOperator' in kwargs: + selector_match_operator = kwargs['selectorMatchOperator'] + if selector_match_operator is None: + raise TypeError("Missing 'selector_match_operator' argument") + if excluded_rule_set is None and 'excludedRuleSet' in kwargs: + excluded_rule_set = kwargs['excludedRuleSet'] + + _setter("match_variable", match_variable) + _setter("selector", selector) + _setter("selector_match_operator", selector_match_operator) if excluded_rule_set is not None: - pulumi.set(__self__, "excluded_rule_set", excluded_rule_set) + _setter("excluded_rule_set", excluded_rule_set) @property @pulumi.getter(name="matchVariable") @@ -412,12 +549,29 @@ def __init__(__self__, *, :param pulumi.Input[str] type: The rule set type. The only possible value is `OWASP` . Defaults to `OWASP`. :param pulumi.Input[str] version: The rule set version. The only possible value is `3.2` . Defaults to `3.2`. """ + PolicyManagedRulesExclusionExcludedRuleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_groups=rule_groups, + type=type, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_groups: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyManagedRulesExclusionExcludedRuleSetRuleGroupArgs']]]] = None, + type: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_groups is None and 'ruleGroups' in kwargs: + rule_groups = kwargs['ruleGroups'] + if rule_groups is not None: - pulumi.set(__self__, "rule_groups", rule_groups) + _setter("rule_groups", rule_groups) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="ruleGroups") @@ -465,9 +619,28 @@ def __init__(__self__, *, :param pulumi.Input[str] rule_group_name: The name of rule group for exclusion. Possible values are `BadBots`, `crs_20_protocol_violations`, `crs_21_protocol_anomalies`, `crs_23_request_limits`, `crs_30_http_policy`, `crs_35_bad_robots`, `crs_40_generic_attacks`, `crs_41_sql_injection_attacks`, `crs_41_xss_attacks`, `crs_42_tight_security`, `crs_45_trojans`, `General`, `GoodBots`, `Known-CVEs`, `REQUEST-911-METHOD-ENFORCEMENT`, `REQUEST-913-SCANNER-DETECTION`, `REQUEST-920-PROTOCOL-ENFORCEMENT`, `REQUEST-921-PROTOCOL-ATTACK`, `REQUEST-930-APPLICATION-ATTACK-LFI`, `REQUEST-931-APPLICATION-ATTACK-RFI`, `REQUEST-932-APPLICATION-ATTACK-RCE`, `REQUEST-933-APPLICATION-ATTACK-PHP`, `REQUEST-941-APPLICATION-ATTACK-XSS`, `REQUEST-942-APPLICATION-ATTACK-SQLI`, `REQUEST-943-APPLICATION-ATTACK-SESSION-FIXATION`, `REQUEST-944-APPLICATION-ATTACK-JAVA` and `UnknownBots`. :param pulumi.Input[Sequence[pulumi.Input[str]]] excluded_rules: One or more Rule IDs for exclusion. """ - pulumi.set(__self__, "rule_group_name", rule_group_name) + PolicyManagedRulesExclusionExcludedRuleSetRuleGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_group_name=rule_group_name, + excluded_rules=excluded_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_group_name: Optional[pulumi.Input[str]] = None, + excluded_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_group_name is None and 'ruleGroupName' in kwargs: + rule_group_name = kwargs['ruleGroupName'] + if rule_group_name is None: + raise TypeError("Missing 'rule_group_name' argument") + if excluded_rules is None and 'excludedRules' in kwargs: + excluded_rules = kwargs['excludedRules'] + + _setter("rule_group_name", rule_group_name) if excluded_rules is not None: - pulumi.set(__self__, "excluded_rules", excluded_rules) + _setter("excluded_rules", excluded_rules) @property @pulumi.getter(name="ruleGroupName") @@ -505,11 +678,30 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['PolicyManagedRulesManagedRuleSetRuleGroupOverrideArgs']]] rule_group_overrides: One or more `rule_group_override` block defined below. :param pulumi.Input[str] type: The rule set type. Possible values: `Microsoft_BotManagerRuleSet` and `OWASP`. """ - pulumi.set(__self__, "version", version) + PolicyManagedRulesManagedRuleSetArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + version=version, + rule_group_overrides=rule_group_overrides, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + version: Optional[pulumi.Input[str]] = None, + rule_group_overrides: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyManagedRulesManagedRuleSetRuleGroupOverrideArgs']]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if version is None: + raise TypeError("Missing 'version' argument") + if rule_group_overrides is None and 'ruleGroupOverrides' in kwargs: + rule_group_overrides = kwargs['ruleGroupOverrides'] + + _setter("version", version) if rule_group_overrides is not None: - pulumi.set(__self__, "rule_group_overrides", rule_group_overrides) + _setter("rule_group_overrides", rule_group_overrides) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -558,14 +750,35 @@ def __init__(__self__, *, :param pulumi.Input[str] rule_group_name: The name of the Rule Group. Possible values are `BadBots`, `crs_20_protocol_violations`, `crs_21_protocol_anomalies`, `crs_23_request_limits`, `crs_30_http_policy`, `crs_35_bad_robots`, `crs_40_generic_attacks`, `crs_41_sql_injection_attacks`, `crs_41_xss_attacks`, `crs_42_tight_security`, `crs_45_trojans`, `General`, `GoodBots`, `Known-CVEs`, `REQUEST-911-METHOD-ENFORCEMENT`, `REQUEST-913-SCANNER-DETECTION`, `REQUEST-920-PROTOCOL-ENFORCEMENT`, `REQUEST-921-PROTOCOL-ATTACK`, `REQUEST-930-APPLICATION-ATTACK-LFI`, `REQUEST-931-APPLICATION-ATTACK-RFI`, `REQUEST-932-APPLICATION-ATTACK-RCE`, `REQUEST-933-APPLICATION-ATTACK-PHP`, `REQUEST-941-APPLICATION-ATTACK-XSS`, `REQUEST-942-APPLICATION-ATTACK-SQLI`, `REQUEST-943-APPLICATION-ATTACK-SESSION-FIXATION`, `REQUEST-944-APPLICATION-ATTACK-JAVA` and `UnknownBots`. :param pulumi.Input[Sequence[pulumi.Input['PolicyManagedRulesManagedRuleSetRuleGroupOverrideRuleArgs']]] rules: One or more `rule` block defined below. """ - pulumi.set(__self__, "rule_group_name", rule_group_name) + PolicyManagedRulesManagedRuleSetRuleGroupOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_group_name=rule_group_name, + disabled_rules=disabled_rules, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_group_name: Optional[pulumi.Input[str]] = None, + disabled_rules: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyManagedRulesManagedRuleSetRuleGroupOverrideRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_group_name is None and 'ruleGroupName' in kwargs: + rule_group_name = kwargs['ruleGroupName'] + if rule_group_name is None: + raise TypeError("Missing 'rule_group_name' argument") + if disabled_rules is None and 'disabledRules' in kwargs: + disabled_rules = kwargs['disabledRules'] + + _setter("rule_group_name", rule_group_name) if disabled_rules is not None: warnings.warn("""`disabled_rules` will be removed in favour of the `rule` property in version 4.0 of the AzureRM Provider.""", DeprecationWarning) pulumi.log.warn("""disabled_rules is deprecated: `disabled_rules` will be removed in favour of the `rule` property in version 4.0 of the AzureRM Provider.""") if disabled_rules is not None: - pulumi.set(__self__, "disabled_rules", disabled_rules) + _setter("disabled_rules", disabled_rules) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter(name="ruleGroupName") @@ -615,11 +828,28 @@ def __init__(__self__, *, :param pulumi.Input[str] action: Describes the override action to be applied when rule matches. Possible values are `Allow`, `AnomalyScoring`, `Block` and `Log`. :param pulumi.Input[bool] enabled: Describes if the managed rule is in enabled state or disabled state. """ - pulumi.set(__self__, "id", id) + PolicyManagedRulesManagedRuleSetRuleGroupOverrideRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + action=action, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + action: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("id", id) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -677,20 +907,53 @@ def __init__(__self__, *, :param pulumi.Input[bool] request_body_check: Is Request Body Inspection enabled? Defaults to `true`. :param pulumi.Input[int] request_body_inspect_limit_in_kb: Specifies the maximum request body inspection limit in KB for the Web Application Firewall. Defaults to `128`. """ + PolicyPolicySettingsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + file_upload_limit_in_mb=file_upload_limit_in_mb, + log_scrubbing=log_scrubbing, + max_request_body_size_in_kb=max_request_body_size_in_kb, + mode=mode, + request_body_check=request_body_check, + request_body_inspect_limit_in_kb=request_body_inspect_limit_in_kb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + file_upload_limit_in_mb: Optional[pulumi.Input[int]] = None, + log_scrubbing: Optional[pulumi.Input['PolicyPolicySettingsLogScrubbingArgs']] = None, + max_request_body_size_in_kb: Optional[pulumi.Input[int]] = None, + mode: Optional[pulumi.Input[str]] = None, + request_body_check: Optional[pulumi.Input[bool]] = None, + request_body_inspect_limit_in_kb: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_upload_limit_in_mb is None and 'fileUploadLimitInMb' in kwargs: + file_upload_limit_in_mb = kwargs['fileUploadLimitInMb'] + if log_scrubbing is None and 'logScrubbing' in kwargs: + log_scrubbing = kwargs['logScrubbing'] + if max_request_body_size_in_kb is None and 'maxRequestBodySizeInKb' in kwargs: + max_request_body_size_in_kb = kwargs['maxRequestBodySizeInKb'] + if request_body_check is None and 'requestBodyCheck' in kwargs: + request_body_check = kwargs['requestBodyCheck'] + if request_body_inspect_limit_in_kb is None and 'requestBodyInspectLimitInKb' in kwargs: + request_body_inspect_limit_in_kb = kwargs['requestBodyInspectLimitInKb'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if file_upload_limit_in_mb is not None: - pulumi.set(__self__, "file_upload_limit_in_mb", file_upload_limit_in_mb) + _setter("file_upload_limit_in_mb", file_upload_limit_in_mb) if log_scrubbing is not None: - pulumi.set(__self__, "log_scrubbing", log_scrubbing) + _setter("log_scrubbing", log_scrubbing) if max_request_body_size_in_kb is not None: - pulumi.set(__self__, "max_request_body_size_in_kb", max_request_body_size_in_kb) + _setter("max_request_body_size_in_kb", max_request_body_size_in_kb) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if request_body_check is not None: - pulumi.set(__self__, "request_body_check", request_body_check) + _setter("request_body_check", request_body_check) if request_body_inspect_limit_in_kb is not None: - pulumi.set(__self__, "request_body_inspect_limit_in_kb", request_body_inspect_limit_in_kb) + _setter("request_body_inspect_limit_in_kb", request_body_inspect_limit_in_kb) @property @pulumi.getter @@ -786,10 +1049,23 @@ def __init__(__self__, *, :param pulumi.Input[bool] enabled: Whether the log scrubbing is enabled or disabled. Defaults to `true`. :param pulumi.Input[Sequence[pulumi.Input['PolicyPolicySettingsLogScrubbingRuleArgs']]] rules: One or more `scrubbing_rule` as define below. """ + PolicyPolicySettingsLogScrubbingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[pulumi.Input[bool]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyPolicySettingsLogScrubbingRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter @@ -829,13 +1105,36 @@ def __init__(__self__, *, :param pulumi.Input[str] selector: Describes field of the matchVariable collection. :param pulumi.Input[str] selector_match_operator: Describes operator to be matched. Possible values: `Contains`, `EndsWith`, `Equals`, `EqualsAny`, `StartsWith`. """ - pulumi.set(__self__, "match_variable", match_variable) + PolicyPolicySettingsLogScrubbingRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + enabled=enabled, + selector=selector, + selector_match_operator=selector_match_operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + selector: Optional[pulumi.Input[str]] = None, + selector_match_operator: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if selector_match_operator is None and 'selectorMatchOperator' in kwargs: + selector_match_operator = kwargs['selectorMatchOperator'] + + _setter("match_variable", match_variable) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if selector is not None: - pulumi.set(__self__, "selector", selector) + _setter("selector", selector) if selector_match_operator is not None: - pulumi.set(__self__, "selector_match_operator", selector_match_operator) + _setter("selector_match_operator", selector_match_operator) @property @pulumi.getter(name="matchVariable") diff --git a/sdk/python/pulumi_azure/waf/get_firewall_policy.py b/sdk/python/pulumi_azure/waf/get_firewall_policy.py index 40652dd5df..91a641b280 100644 --- a/sdk/python/pulumi_azure/waf/get_firewall_policy.py +++ b/sdk/python/pulumi_azure/waf/get_firewall_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/waf/outputs.py b/sdk/python/pulumi_azure/waf/outputs.py index 75c54f6987..0e0de5e314 100644 --- a/sdk/python/pulumi_azure/waf/outputs.py +++ b/sdk/python/pulumi_azure/waf/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -74,20 +74,65 @@ def __init__(__self__, *, :param str rate_limit_duration: Specifies the duration at which the rate limit policy will be applied. Should be used with `RateLimitRule` rule type. Possible values are `FiveMins` and `OneMin`. :param int rate_limit_threshold: Specifies the threshold value for the rate limit policy. Must be greater than or equal to 1 if provided. """ - pulumi.set(__self__, "action", action) - pulumi.set(__self__, "match_conditions", match_conditions) - pulumi.set(__self__, "priority", priority) - pulumi.set(__self__, "rule_type", rule_type) + PolicyCustomRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + action=action, + match_conditions=match_conditions, + priority=priority, + rule_type=rule_type, + enabled=enabled, + group_rate_limit_by=group_rate_limit_by, + name=name, + rate_limit_duration=rate_limit_duration, + rate_limit_threshold=rate_limit_threshold, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + action: Optional[str] = None, + match_conditions: Optional[Sequence['outputs.PolicyCustomRuleMatchCondition']] = None, + priority: Optional[int] = None, + rule_type: Optional[str] = None, + enabled: Optional[bool] = None, + group_rate_limit_by: Optional[str] = None, + name: Optional[str] = None, + rate_limit_duration: Optional[str] = None, + rate_limit_threshold: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if action is None: + raise TypeError("Missing 'action' argument") + if match_conditions is None and 'matchConditions' in kwargs: + match_conditions = kwargs['matchConditions'] + if match_conditions is None: + raise TypeError("Missing 'match_conditions' argument") + if priority is None: + raise TypeError("Missing 'priority' argument") + if rule_type is None and 'ruleType' in kwargs: + rule_type = kwargs['ruleType'] + if rule_type is None: + raise TypeError("Missing 'rule_type' argument") + if group_rate_limit_by is None and 'groupRateLimitBy' in kwargs: + group_rate_limit_by = kwargs['groupRateLimitBy'] + if rate_limit_duration is None and 'rateLimitDuration' in kwargs: + rate_limit_duration = kwargs['rateLimitDuration'] + if rate_limit_threshold is None and 'rateLimitThreshold' in kwargs: + rate_limit_threshold = kwargs['rateLimitThreshold'] + + _setter("action", action) + _setter("match_conditions", match_conditions) + _setter("priority", priority) + _setter("rule_type", rule_type) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if group_rate_limit_by is not None: - pulumi.set(__self__, "group_rate_limit_by", group_rate_limit_by) + _setter("group_rate_limit_by", group_rate_limit_by) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if rate_limit_duration is not None: - pulumi.set(__self__, "rate_limit_duration", rate_limit_duration) + _setter("rate_limit_duration", rate_limit_duration) if rate_limit_threshold is not None: - pulumi.set(__self__, "rate_limit_threshold", rate_limit_threshold) + _setter("rate_limit_threshold", rate_limit_threshold) @property @pulumi.getter @@ -198,14 +243,43 @@ def __init__(__self__, *, :param bool negation_condition: Describes if this is negate condition or not :param Sequence[str] transforms: A list of transformations to do before the match is attempted. Possible values are `HtmlEntityDecode`, `Lowercase`, `RemoveNulls`, `Trim`, `UrlDecode` and `UrlEncode`. """ - pulumi.set(__self__, "match_variables", match_variables) - pulumi.set(__self__, "operator", operator) + PolicyCustomRuleMatchCondition._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variables=match_variables, + operator=operator, + match_values=match_values, + negation_condition=negation_condition, + transforms=transforms, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variables: Optional[Sequence['outputs.PolicyCustomRuleMatchConditionMatchVariable']] = None, + operator: Optional[str] = None, + match_values: Optional[Sequence[str]] = None, + negation_condition: Optional[bool] = None, + transforms: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variables is None and 'matchVariables' in kwargs: + match_variables = kwargs['matchVariables'] + if match_variables is None: + raise TypeError("Missing 'match_variables' argument") + if operator is None: + raise TypeError("Missing 'operator' argument") + if match_values is None and 'matchValues' in kwargs: + match_values = kwargs['matchValues'] + if negation_condition is None and 'negationCondition' in kwargs: + negation_condition = kwargs['negationCondition'] + + _setter("match_variables", match_variables) + _setter("operator", operator) if match_values is not None: - pulumi.set(__self__, "match_values", match_values) + _setter("match_values", match_values) if negation_condition is not None: - pulumi.set(__self__, "negation_condition", negation_condition) + _setter("negation_condition", negation_condition) if transforms is not None: - pulumi.set(__self__, "transforms", transforms) + _setter("transforms", transforms) @property @pulumi.getter(name="matchVariables") @@ -274,9 +348,26 @@ def __init__(__self__, *, :param str variable_name: The name of the Match Variable. Possible values are `RemoteAddr`, `RequestMethod`, `QueryString`, `PostArgs`, `RequestUri`, `RequestHeaders`, `RequestBody` and `RequestCookies`. :param str selector: Describes field of the matchVariable collection """ - pulumi.set(__self__, "variable_name", variable_name) + PolicyCustomRuleMatchConditionMatchVariable._configure( + lambda key, value: pulumi.set(__self__, key, value), + variable_name=variable_name, + selector=selector, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + variable_name: Optional[str] = None, + selector: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if variable_name is None and 'variableName' in kwargs: + variable_name = kwargs['variableName'] + if variable_name is None: + raise TypeError("Missing 'variable_name' argument") + + _setter("variable_name", variable_name) if selector is not None: - pulumi.set(__self__, "selector", selector) + _setter("selector", selector) @property @pulumi.getter(name="variableName") @@ -321,9 +412,26 @@ def __init__(__self__, *, :param Sequence['PolicyManagedRulesManagedRuleSetArgs'] managed_rule_sets: One or more `managed_rule_set` block defined below. :param Sequence['PolicyManagedRulesExclusionArgs'] exclusions: One or more `exclusion` block defined below. """ - pulumi.set(__self__, "managed_rule_sets", managed_rule_sets) + PolicyManagedRules._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_rule_sets=managed_rule_sets, + exclusions=exclusions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_rule_sets: Optional[Sequence['outputs.PolicyManagedRulesManagedRuleSet']] = None, + exclusions: Optional[Sequence['outputs.PolicyManagedRulesExclusion']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_rule_sets is None and 'managedRuleSets' in kwargs: + managed_rule_sets = kwargs['managedRuleSets'] + if managed_rule_sets is None: + raise TypeError("Missing 'managed_rule_sets' argument") + + _setter("managed_rule_sets", managed_rule_sets) if exclusions is not None: - pulumi.set(__self__, "exclusions", exclusions) + _setter("exclusions", exclusions) @property @pulumi.getter(name="managedRuleSets") @@ -376,11 +484,40 @@ def __init__(__self__, *, :param str selector_match_operator: Describes operator to be matched. Possible values: `Contains`, `EndsWith`, `Equals`, `EqualsAny`, `StartsWith`. :param 'PolicyManagedRulesExclusionExcludedRuleSetArgs' excluded_rule_set: One or more `excluded_rule_set` block defined below. """ - pulumi.set(__self__, "match_variable", match_variable) - pulumi.set(__self__, "selector", selector) - pulumi.set(__self__, "selector_match_operator", selector_match_operator) + PolicyManagedRulesExclusion._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + selector=selector, + selector_match_operator=selector_match_operator, + excluded_rule_set=excluded_rule_set, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[str] = None, + selector: Optional[str] = None, + selector_match_operator: Optional[str] = None, + excluded_rule_set: Optional['outputs.PolicyManagedRulesExclusionExcludedRuleSet'] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if selector is None: + raise TypeError("Missing 'selector' argument") + if selector_match_operator is None and 'selectorMatchOperator' in kwargs: + selector_match_operator = kwargs['selectorMatchOperator'] + if selector_match_operator is None: + raise TypeError("Missing 'selector_match_operator' argument") + if excluded_rule_set is None and 'excludedRuleSet' in kwargs: + excluded_rule_set = kwargs['excludedRuleSet'] + + _setter("match_variable", match_variable) + _setter("selector", selector) + _setter("selector_match_operator", selector_match_operator) if excluded_rule_set is not None: - pulumi.set(__self__, "excluded_rule_set", excluded_rule_set) + _setter("excluded_rule_set", excluded_rule_set) @property @pulumi.getter(name="matchVariable") @@ -443,12 +580,29 @@ def __init__(__self__, *, :param str type: The rule set type. The only possible value is `OWASP` . Defaults to `OWASP`. :param str version: The rule set version. The only possible value is `3.2` . Defaults to `3.2`. """ + PolicyManagedRulesExclusionExcludedRuleSet._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_groups=rule_groups, + type=type, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_groups: Optional[Sequence['outputs.PolicyManagedRulesExclusionExcludedRuleSetRuleGroup']] = None, + type: Optional[str] = None, + version: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_groups is None and 'ruleGroups' in kwargs: + rule_groups = kwargs['ruleGroups'] + if rule_groups is not None: - pulumi.set(__self__, "rule_groups", rule_groups) + _setter("rule_groups", rule_groups) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="ruleGroups") @@ -503,9 +657,28 @@ def __init__(__self__, *, :param str rule_group_name: The name of rule group for exclusion. Possible values are `BadBots`, `crs_20_protocol_violations`, `crs_21_protocol_anomalies`, `crs_23_request_limits`, `crs_30_http_policy`, `crs_35_bad_robots`, `crs_40_generic_attacks`, `crs_41_sql_injection_attacks`, `crs_41_xss_attacks`, `crs_42_tight_security`, `crs_45_trojans`, `General`, `GoodBots`, `Known-CVEs`, `REQUEST-911-METHOD-ENFORCEMENT`, `REQUEST-913-SCANNER-DETECTION`, `REQUEST-920-PROTOCOL-ENFORCEMENT`, `REQUEST-921-PROTOCOL-ATTACK`, `REQUEST-930-APPLICATION-ATTACK-LFI`, `REQUEST-931-APPLICATION-ATTACK-RFI`, `REQUEST-932-APPLICATION-ATTACK-RCE`, `REQUEST-933-APPLICATION-ATTACK-PHP`, `REQUEST-941-APPLICATION-ATTACK-XSS`, `REQUEST-942-APPLICATION-ATTACK-SQLI`, `REQUEST-943-APPLICATION-ATTACK-SESSION-FIXATION`, `REQUEST-944-APPLICATION-ATTACK-JAVA` and `UnknownBots`. :param Sequence[str] excluded_rules: One or more Rule IDs for exclusion. """ - pulumi.set(__self__, "rule_group_name", rule_group_name) + PolicyManagedRulesExclusionExcludedRuleSetRuleGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_group_name=rule_group_name, + excluded_rules=excluded_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_group_name: Optional[str] = None, + excluded_rules: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_group_name is None and 'ruleGroupName' in kwargs: + rule_group_name = kwargs['ruleGroupName'] + if rule_group_name is None: + raise TypeError("Missing 'rule_group_name' argument") + if excluded_rules is None and 'excludedRules' in kwargs: + excluded_rules = kwargs['excludedRules'] + + _setter("rule_group_name", rule_group_name) if excluded_rules is not None: - pulumi.set(__self__, "excluded_rules", excluded_rules) + _setter("excluded_rules", excluded_rules) @property @pulumi.getter(name="ruleGroupName") @@ -552,11 +725,30 @@ def __init__(__self__, *, :param Sequence['PolicyManagedRulesManagedRuleSetRuleGroupOverrideArgs'] rule_group_overrides: One or more `rule_group_override` block defined below. :param str type: The rule set type. Possible values: `Microsoft_BotManagerRuleSet` and `OWASP`. """ - pulumi.set(__self__, "version", version) + PolicyManagedRulesManagedRuleSet._configure( + lambda key, value: pulumi.set(__self__, key, value), + version=version, + rule_group_overrides=rule_group_overrides, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + version: Optional[str] = None, + rule_group_overrides: Optional[Sequence['outputs.PolicyManagedRulesManagedRuleSetRuleGroupOverride']] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if version is None: + raise TypeError("Missing 'version' argument") + if rule_group_overrides is None and 'ruleGroupOverrides' in kwargs: + rule_group_overrides = kwargs['ruleGroupOverrides'] + + _setter("version", version) if rule_group_overrides is not None: - pulumi.set(__self__, "rule_group_overrides", rule_group_overrides) + _setter("rule_group_overrides", rule_group_overrides) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -612,11 +804,32 @@ def __init__(__self__, *, :param str rule_group_name: The name of the Rule Group. Possible values are `BadBots`, `crs_20_protocol_violations`, `crs_21_protocol_anomalies`, `crs_23_request_limits`, `crs_30_http_policy`, `crs_35_bad_robots`, `crs_40_generic_attacks`, `crs_41_sql_injection_attacks`, `crs_41_xss_attacks`, `crs_42_tight_security`, `crs_45_trojans`, `General`, `GoodBots`, `Known-CVEs`, `REQUEST-911-METHOD-ENFORCEMENT`, `REQUEST-913-SCANNER-DETECTION`, `REQUEST-920-PROTOCOL-ENFORCEMENT`, `REQUEST-921-PROTOCOL-ATTACK`, `REQUEST-930-APPLICATION-ATTACK-LFI`, `REQUEST-931-APPLICATION-ATTACK-RFI`, `REQUEST-932-APPLICATION-ATTACK-RCE`, `REQUEST-933-APPLICATION-ATTACK-PHP`, `REQUEST-941-APPLICATION-ATTACK-XSS`, `REQUEST-942-APPLICATION-ATTACK-SQLI`, `REQUEST-943-APPLICATION-ATTACK-SESSION-FIXATION`, `REQUEST-944-APPLICATION-ATTACK-JAVA` and `UnknownBots`. :param Sequence['PolicyManagedRulesManagedRuleSetRuleGroupOverrideRuleArgs'] rules: One or more `rule` block defined below. """ - pulumi.set(__self__, "rule_group_name", rule_group_name) + PolicyManagedRulesManagedRuleSetRuleGroupOverride._configure( + lambda key, value: pulumi.set(__self__, key, value), + rule_group_name=rule_group_name, + disabled_rules=disabled_rules, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + rule_group_name: Optional[str] = None, + disabled_rules: Optional[Sequence[str]] = None, + rules: Optional[Sequence['outputs.PolicyManagedRulesManagedRuleSetRuleGroupOverrideRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if rule_group_name is None and 'ruleGroupName' in kwargs: + rule_group_name = kwargs['ruleGroupName'] + if rule_group_name is None: + raise TypeError("Missing 'rule_group_name' argument") + if disabled_rules is None and 'disabledRules' in kwargs: + disabled_rules = kwargs['disabledRules'] + + _setter("rule_group_name", rule_group_name) if disabled_rules is not None: - pulumi.set(__self__, "disabled_rules", disabled_rules) + _setter("disabled_rules", disabled_rules) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter(name="ruleGroupName") @@ -654,11 +867,28 @@ def __init__(__self__, *, :param str action: Describes the override action to be applied when rule matches. Possible values are `Allow`, `AnomalyScoring`, `Block` and `Log`. :param bool enabled: Describes if the managed rule is in enabled state or disabled state. """ - pulumi.set(__self__, "id", id) + PolicyManagedRulesManagedRuleSetRuleGroupOverrideRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + action=action, + enabled=enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + action: Optional[str] = None, + enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + + _setter("id", id) if action is not None: - pulumi.set(__self__, "action", action) + _setter("action", action) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) @property @pulumi.getter @@ -729,20 +959,53 @@ def __init__(__self__, *, :param bool request_body_check: Is Request Body Inspection enabled? Defaults to `true`. :param int request_body_inspect_limit_in_kb: Specifies the maximum request body inspection limit in KB for the Web Application Firewall. Defaults to `128`. """ + PolicyPolicySettings._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + file_upload_limit_in_mb=file_upload_limit_in_mb, + log_scrubbing=log_scrubbing, + max_request_body_size_in_kb=max_request_body_size_in_kb, + mode=mode, + request_body_check=request_body_check, + request_body_inspect_limit_in_kb=request_body_inspect_limit_in_kb, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + file_upload_limit_in_mb: Optional[int] = None, + log_scrubbing: Optional['outputs.PolicyPolicySettingsLogScrubbing'] = None, + max_request_body_size_in_kb: Optional[int] = None, + mode: Optional[str] = None, + request_body_check: Optional[bool] = None, + request_body_inspect_limit_in_kb: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_upload_limit_in_mb is None and 'fileUploadLimitInMb' in kwargs: + file_upload_limit_in_mb = kwargs['fileUploadLimitInMb'] + if log_scrubbing is None and 'logScrubbing' in kwargs: + log_scrubbing = kwargs['logScrubbing'] + if max_request_body_size_in_kb is None and 'maxRequestBodySizeInKb' in kwargs: + max_request_body_size_in_kb = kwargs['maxRequestBodySizeInKb'] + if request_body_check is None and 'requestBodyCheck' in kwargs: + request_body_check = kwargs['requestBodyCheck'] + if request_body_inspect_limit_in_kb is None and 'requestBodyInspectLimitInKb' in kwargs: + request_body_inspect_limit_in_kb = kwargs['requestBodyInspectLimitInKb'] + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if file_upload_limit_in_mb is not None: - pulumi.set(__self__, "file_upload_limit_in_mb", file_upload_limit_in_mb) + _setter("file_upload_limit_in_mb", file_upload_limit_in_mb) if log_scrubbing is not None: - pulumi.set(__self__, "log_scrubbing", log_scrubbing) + _setter("log_scrubbing", log_scrubbing) if max_request_body_size_in_kb is not None: - pulumi.set(__self__, "max_request_body_size_in_kb", max_request_body_size_in_kb) + _setter("max_request_body_size_in_kb", max_request_body_size_in_kb) if mode is not None: - pulumi.set(__self__, "mode", mode) + _setter("mode", mode) if request_body_check is not None: - pulumi.set(__self__, "request_body_check", request_body_check) + _setter("request_body_check", request_body_check) if request_body_inspect_limit_in_kb is not None: - pulumi.set(__self__, "request_body_inspect_limit_in_kb", request_body_inspect_limit_in_kb) + _setter("request_body_inspect_limit_in_kb", request_body_inspect_limit_in_kb) @property @pulumi.getter @@ -810,10 +1073,23 @@ def __init__(__self__, *, :param bool enabled: Whether the log scrubbing is enabled or disabled. Defaults to `true`. :param Sequence['PolicyPolicySettingsLogScrubbingRuleArgs'] rules: One or more `scrubbing_rule` as define below. """ + PolicyPolicySettingsLogScrubbing._configure( + lambda key, value: pulumi.set(__self__, key, value), + enabled=enabled, + rules=rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + enabled: Optional[bool] = None, + rules: Optional[Sequence['outputs.PolicyPolicySettingsLogScrubbingRule']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if rules is not None: - pulumi.set(__self__, "rules", rules) + _setter("rules", rules) @property @pulumi.getter @@ -864,13 +1140,36 @@ def __init__(__self__, *, :param str selector: Describes field of the matchVariable collection. :param str selector_match_operator: Describes operator to be matched. Possible values: `Contains`, `EndsWith`, `Equals`, `EqualsAny`, `StartsWith`. """ - pulumi.set(__self__, "match_variable", match_variable) + PolicyPolicySettingsLogScrubbingRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + match_variable=match_variable, + enabled=enabled, + selector=selector, + selector_match_operator=selector_match_operator, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + match_variable: Optional[str] = None, + enabled: Optional[bool] = None, + selector: Optional[str] = None, + selector_match_operator: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if match_variable is None and 'matchVariable' in kwargs: + match_variable = kwargs['matchVariable'] + if match_variable is None: + raise TypeError("Missing 'match_variable' argument") + if selector_match_operator is None and 'selectorMatchOperator' in kwargs: + selector_match_operator = kwargs['selectorMatchOperator'] + + _setter("match_variable", match_variable) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if selector is not None: - pulumi.set(__self__, "selector", selector) + _setter("selector", selector) if selector_match_operator is not None: - pulumi.set(__self__, "selector_match_operator", selector_match_operator) + _setter("selector_match_operator", selector_match_operator) @property @pulumi.getter(name="matchVariable") diff --git a/sdk/python/pulumi_azure/waf/policy.py b/sdk/python/pulumi_azure/waf/policy.py index 49abdf0e48..c2ffbc1efb 100644 --- a/sdk/python/pulumi_azure/waf/policy.py +++ b/sdk/python/pulumi_azure/waf/policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -33,18 +33,53 @@ def __init__(__self__, *, :param pulumi.Input['PolicyPolicySettingsArgs'] policy_settings: A `policy_settings` block as defined below. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Web Application Firewall Policy. """ - pulumi.set(__self__, "managed_rules", managed_rules) - pulumi.set(__self__, "resource_group_name", resource_group_name) + PolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_rules=managed_rules, + resource_group_name=resource_group_name, + custom_rules=custom_rules, + location=location, + name=name, + policy_settings=policy_settings, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_rules: Optional[pulumi.Input['PolicyManagedRulesArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + custom_rules: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyCustomRuleArgs']]]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + policy_settings: Optional[pulumi.Input['PolicyPolicySettingsArgs']] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_rules is None and 'managedRules' in kwargs: + managed_rules = kwargs['managedRules'] + if managed_rules is None: + raise TypeError("Missing 'managed_rules' argument") + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if custom_rules is None and 'customRules' in kwargs: + custom_rules = kwargs['customRules'] + if policy_settings is None and 'policySettings' in kwargs: + policy_settings = kwargs['policySettings'] + + _setter("managed_rules", managed_rules) + _setter("resource_group_name", resource_group_name) if custom_rules is not None: - pulumi.set(__self__, "custom_rules", custom_rules) + _setter("custom_rules", custom_rules) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if policy_settings is not None: - pulumi.set(__self__, "policy_settings", policy_settings) + _setter("policy_settings", policy_settings) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="managedRules") @@ -155,24 +190,63 @@ def __init__(__self__, *, :param pulumi.Input[str] resource_group_name: The name of the resource group. Changing this forces a new resource to be created. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the Web Application Firewall Policy. """ + _PolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_rules=custom_rules, + http_listener_ids=http_listener_ids, + location=location, + managed_rules=managed_rules, + name=name, + path_based_rule_ids=path_based_rule_ids, + policy_settings=policy_settings, + resource_group_name=resource_group_name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_rules: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyCustomRuleArgs']]]] = None, + http_listener_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + location: Optional[pulumi.Input[str]] = None, + managed_rules: Optional[pulumi.Input['PolicyManagedRulesArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + path_based_rule_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + policy_settings: Optional[pulumi.Input['PolicyPolicySettingsArgs']] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_rules is None and 'customRules' in kwargs: + custom_rules = kwargs['customRules'] + if http_listener_ids is None and 'httpListenerIds' in kwargs: + http_listener_ids = kwargs['httpListenerIds'] + if managed_rules is None and 'managedRules' in kwargs: + managed_rules = kwargs['managedRules'] + if path_based_rule_ids is None and 'pathBasedRuleIds' in kwargs: + path_based_rule_ids = kwargs['pathBasedRuleIds'] + if policy_settings is None and 'policySettings' in kwargs: + policy_settings = kwargs['policySettings'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if custom_rules is not None: - pulumi.set(__self__, "custom_rules", custom_rules) + _setter("custom_rules", custom_rules) if http_listener_ids is not None: - pulumi.set(__self__, "http_listener_ids", http_listener_ids) + _setter("http_listener_ids", http_listener_ids) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if managed_rules is not None: - pulumi.set(__self__, "managed_rules", managed_rules) + _setter("managed_rules", managed_rules) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if path_based_rule_ids is not None: - pulumi.set(__self__, "path_based_rule_ids", path_based_rule_ids) + _setter("path_based_rule_ids", path_based_rule_ids) if policy_settings is not None: - pulumi.set(__self__, "policy_settings", policy_settings) + _setter("policy_settings", policy_settings) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="customRules") @@ -536,6 +610,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + PolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -559,10 +637,20 @@ def _internal_init(__self__, __props__.__dict__["custom_rules"] = custom_rules __props__.__dict__["location"] = location + if managed_rules is not None and not isinstance(managed_rules, PolicyManagedRulesArgs): + managed_rules = managed_rules or {} + def _setter(key, value): + managed_rules[key] = value + PolicyManagedRulesArgs._configure(_setter, **managed_rules) if managed_rules is None and not opts.urn: raise TypeError("Missing required property 'managed_rules'") __props__.__dict__["managed_rules"] = managed_rules __props__.__dict__["name"] = name + if policy_settings is not None and not isinstance(policy_settings, PolicyPolicySettingsArgs): + policy_settings = policy_settings or {} + def _setter(key, value): + policy_settings[key] = value + PolicyPolicySettingsArgs._configure(_setter, **policy_settings) __props__.__dict__["policy_settings"] = policy_settings if resource_group_name is None and not opts.urn: raise TypeError("Missing required property 'resource_group_name'") diff --git a/sdk/python/pulumi_azure/webpubsub/_inputs.py b/sdk/python/pulumi_azure/webpubsub/_inputs.py index 7f4ca5afa1..11fc10280a 100644 --- a/sdk/python/pulumi_azure/webpubsub/_inputs.py +++ b/sdk/python/pulumi_azure/webpubsub/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ @@ -32,13 +32,38 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] system_events: Specifies the list of system events. Supported values are `connect`, `connected` and `disconnected`. :param pulumi.Input[str] user_event_pattern: Specifies the matching event names. There are 3 kind of patterns supported: * `*` matches any event name * `,` Combine multiple events with `,` for example `event1,event2`, it matches event `event1` and `event2` * The single event name, for example `event1`, it matches `event1`. """ - pulumi.set(__self__, "url_template", url_template) + HubEventHandlerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + url_template=url_template, + auth=auth, + system_events=system_events, + user_event_pattern=user_event_pattern, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url_template: Optional[pulumi.Input[str]] = None, + auth: Optional[pulumi.Input['HubEventHandlerAuthArgs']] = None, + system_events: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_event_pattern: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url_template is None and 'urlTemplate' in kwargs: + url_template = kwargs['urlTemplate'] + if url_template is None: + raise TypeError("Missing 'url_template' argument") + if system_events is None and 'systemEvents' in kwargs: + system_events = kwargs['systemEvents'] + if user_event_pattern is None and 'userEventPattern' in kwargs: + user_event_pattern = kwargs['userEventPattern'] + + _setter("url_template", url_template) if auth is not None: - pulumi.set(__self__, "auth", auth) + _setter("auth", auth) if system_events is not None: - pulumi.set(__self__, "system_events", system_events) + _setter("system_events", system_events) if user_event_pattern is not None: - pulumi.set(__self__, "user_event_pattern", user_event_pattern) + _setter("user_event_pattern", user_event_pattern) @property @pulumi.getter(name="urlTemplate") @@ -98,7 +123,22 @@ def __init__(__self__, *, > **NOTE:** `managed_identity_id` is required if the auth block is defined """ - pulumi.set(__self__, "managed_identity_id", managed_identity_id) + HubEventHandlerAuthArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_identity_id=managed_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_identity_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_identity_id is None and 'managedIdentityId' in kwargs: + managed_identity_id = kwargs['managedIdentityId'] + if managed_identity_id is None: + raise TypeError("Missing 'managed_identity_id' argument") + + _setter("managed_identity_id", managed_identity_id) @property @pulumi.getter(name="managedIdentityId") @@ -128,12 +168,41 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] system_event_name_filters: Specifies the list of system events. Supported values are `connected` and `disconnected`. :param pulumi.Input[Sequence[pulumi.Input[str]]] user_event_name_filters: Specifies the list of matching user event names. `["*"]` can be used to match all events. """ - pulumi.set(__self__, "eventhub_name", eventhub_name) - pulumi.set(__self__, "eventhub_namespace_name", eventhub_namespace_name) + HubEventListenerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_name=eventhub_name, + eventhub_namespace_name=eventhub_namespace_name, + system_event_name_filters=system_event_name_filters, + user_event_name_filters=user_event_name_filters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_name: Optional[pulumi.Input[str]] = None, + eventhub_namespace_name: Optional[pulumi.Input[str]] = None, + system_event_name_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_event_name_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_name is None: + raise TypeError("Missing 'eventhub_name' argument") + if eventhub_namespace_name is None and 'eventhubNamespaceName' in kwargs: + eventhub_namespace_name = kwargs['eventhubNamespaceName'] + if eventhub_namespace_name is None: + raise TypeError("Missing 'eventhub_namespace_name' argument") + if system_event_name_filters is None and 'systemEventNameFilters' in kwargs: + system_event_name_filters = kwargs['systemEventNameFilters'] + if user_event_name_filters is None and 'userEventNameFilters' in kwargs: + user_event_name_filters = kwargs['userEventNameFilters'] + + _setter("eventhub_name", eventhub_name) + _setter("eventhub_namespace_name", eventhub_namespace_name) if system_event_name_filters is not None: - pulumi.set(__self__, "system_event_name_filters", system_event_name_filters) + _setter("system_event_name_filters", system_event_name_filters) if user_event_name_filters is not None: - pulumi.set(__self__, "user_event_name_filters", user_event_name_filters) + _setter("user_event_name_filters", user_event_name_filters) @property @pulumi.getter(name="eventhubName") @@ -197,11 +266,32 @@ def __init__(__self__, *, > **NOTE:** When `default_action` is `Allow`, `allowed_request_types`cannot be set. When `default_action` is `Deny`, `denied_request_types`cannot be set. """ - pulumi.set(__self__, "id", id) + NetworkAclPrivateEndpointArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + allowed_request_types=allowed_request_types, + denied_request_types=denied_request_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[pulumi.Input[str]] = None, + allowed_request_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + denied_request_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if allowed_request_types is None and 'allowedRequestTypes' in kwargs: + allowed_request_types = kwargs['allowedRequestTypes'] + if denied_request_types is None and 'deniedRequestTypes' in kwargs: + denied_request_types = kwargs['deniedRequestTypes'] + + _setter("id", id) if allowed_request_types is not None: - pulumi.set(__self__, "allowed_request_types", allowed_request_types) + _setter("allowed_request_types", allowed_request_types) if denied_request_types is not None: - pulumi.set(__self__, "denied_request_types", denied_request_types) + _setter("denied_request_types", denied_request_types) @property @pulumi.getter @@ -253,10 +343,27 @@ def __init__(__self__, *, > **NOTE:** When `default_action` is `Allow`, `allowed_request_types`cannot be set. When `default_action` is `Deny`, `denied_request_types`cannot be set. """ + NetworkAclPublicNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_request_types=allowed_request_types, + denied_request_types=denied_request_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_request_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + denied_request_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_request_types is None and 'allowedRequestTypes' in kwargs: + allowed_request_types = kwargs['allowedRequestTypes'] + if denied_request_types is None and 'deniedRequestTypes' in kwargs: + denied_request_types = kwargs['deniedRequestTypes'] + if allowed_request_types is not None: - pulumi.set(__self__, "allowed_request_types", allowed_request_types) + _setter("allowed_request_types", allowed_request_types) if denied_request_types is not None: - pulumi.set(__self__, "denied_request_types", denied_request_types) + _setter("denied_request_types", denied_request_types) @property @pulumi.getter(name="allowedRequestTypes") @@ -300,13 +407,38 @@ def __init__(__self__, *, :param pulumi.Input[str] principal_id: The Principal ID associated with this Managed Service Identity. :param pulumi.Input[str] tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ServiceIdentityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[pulumi.Input[str]] = None, + identity_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + principal_id: Optional[pulumi.Input[str]] = None, + tenant_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -372,14 +504,37 @@ def __init__(__self__, *, :param pulumi.Input[bool] http_request_logs_enabled: Whether the log category `HttpRequestLogs` is enabled? Defaults to `true` :param pulumi.Input[bool] messaging_logs_enabled: Whether the log category `MessagingLogs` is enabled? Defaults to `true` """ + ServiceLiveTraceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connectivity_logs_enabled=connectivity_logs_enabled, + enabled=enabled, + http_request_logs_enabled=http_request_logs_enabled, + messaging_logs_enabled=messaging_logs_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connectivity_logs_enabled: Optional[pulumi.Input[bool]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + http_request_logs_enabled: Optional[pulumi.Input[bool]] = None, + messaging_logs_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connectivity_logs_enabled is None and 'connectivityLogsEnabled' in kwargs: + connectivity_logs_enabled = kwargs['connectivityLogsEnabled'] + if http_request_logs_enabled is None and 'httpRequestLogsEnabled' in kwargs: + http_request_logs_enabled = kwargs['httpRequestLogsEnabled'] + if messaging_logs_enabled is None and 'messagingLogsEnabled' in kwargs: + messaging_logs_enabled = kwargs['messagingLogsEnabled'] + if connectivity_logs_enabled is not None: - pulumi.set(__self__, "connectivity_logs_enabled", connectivity_logs_enabled) + _setter("connectivity_logs_enabled", connectivity_logs_enabled) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if http_request_logs_enabled is not None: - pulumi.set(__self__, "http_request_logs_enabled", http_request_logs_enabled) + _setter("http_request_logs_enabled", http_request_logs_enabled) if messaging_logs_enabled is not None: - pulumi.set(__self__, "messaging_logs_enabled", messaging_logs_enabled) + _setter("messaging_logs_enabled", messaging_logs_enabled) @property @pulumi.getter(name="connectivityLogsEnabled") diff --git a/sdk/python/pulumi_azure/webpubsub/custom_certificate.py b/sdk/python/pulumi_azure/webpubsub/custom_certificate.py index cd933e0bc7..007fc6b193 100644 --- a/sdk/python/pulumi_azure/webpubsub/custom_certificate.py +++ b/sdk/python/pulumi_azure/webpubsub/custom_certificate.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CustomCertificateArgs', 'CustomCertificate'] @@ -27,10 +27,33 @@ def __init__(__self__, *, > **Note:** custom certificate is only available for Web PubSub Premium tier. Please enable managed identity in the corresponding Web PubSub Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret. :param pulumi.Input[str] name: The name of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "custom_certificate_id", custom_certificate_id) - pulumi.set(__self__, "web_pubsub_id", web_pubsub_id) + CustomCertificateArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_certificate_id=custom_certificate_id, + web_pubsub_id=web_pubsub_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_certificate_id: Optional[pulumi.Input[str]] = None, + web_pubsub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_certificate_id is None and 'customCertificateId' in kwargs: + custom_certificate_id = kwargs['customCertificateId'] + if custom_certificate_id is None: + raise TypeError("Missing 'custom_certificate_id' argument") + if web_pubsub_id is None and 'webPubsubId' in kwargs: + web_pubsub_id = kwargs['webPubsubId'] + if web_pubsub_id is None: + raise TypeError("Missing 'web_pubsub_id' argument") + + _setter("custom_certificate_id", custom_certificate_id) + _setter("web_pubsub_id", web_pubsub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="customCertificateId") @@ -91,14 +114,37 @@ def __init__(__self__, *, > **Note:** custom certificate is only available for Web PubSub Premium tier. Please enable managed identity in the corresponding Web PubSub Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret. """ + _CustomCertificateState._configure( + lambda key, value: pulumi.set(__self__, key, value), + certificate_version=certificate_version, + custom_certificate_id=custom_certificate_id, + name=name, + web_pubsub_id=web_pubsub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + certificate_version: Optional[pulumi.Input[str]] = None, + custom_certificate_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + web_pubsub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if certificate_version is None and 'certificateVersion' in kwargs: + certificate_version = kwargs['certificateVersion'] + if custom_certificate_id is None and 'customCertificateId' in kwargs: + custom_certificate_id = kwargs['customCertificateId'] + if web_pubsub_id is None and 'webPubsubId' in kwargs: + web_pubsub_id = kwargs['webPubsubId'] + if certificate_version is not None: - pulumi.set(__self__, "certificate_version", certificate_version) + _setter("certificate_version", certificate_version) if custom_certificate_id is not None: - pulumi.set(__self__, "custom_certificate_id", custom_certificate_id) + _setter("custom_certificate_id", custom_certificate_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if web_pubsub_id is not None: - pulumi.set(__self__, "web_pubsub_id", web_pubsub_id) + _setter("web_pubsub_id", web_pubsub_id) @property @pulumi.getter(name="certificateVersion") @@ -210,6 +256,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CustomCertificateArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/webpubsub/custom_domain.py b/sdk/python/pulumi_azure/webpubsub/custom_domain.py index 02c9418d38..269555a6ca 100644 --- a/sdk/python/pulumi_azure/webpubsub/custom_domain.py +++ b/sdk/python/pulumi_azure/webpubsub/custom_domain.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['CustomDomainArgs', 'CustomDomain'] @@ -27,11 +27,40 @@ def __init__(__self__, *, :param pulumi.Input[str] web_pubsub_id: Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. :param pulumi.Input[str] name: Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "domain_name", domain_name) - pulumi.set(__self__, "web_pubsub_custom_certificate_id", web_pubsub_custom_certificate_id) - pulumi.set(__self__, "web_pubsub_id", web_pubsub_id) + CustomDomainArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name=domain_name, + web_pubsub_custom_certificate_id=web_pubsub_custom_certificate_id, + web_pubsub_id=web_pubsub_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name: Optional[pulumi.Input[str]] = None, + web_pubsub_custom_certificate_id: Optional[pulumi.Input[str]] = None, + web_pubsub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if domain_name is None: + raise TypeError("Missing 'domain_name' argument") + if web_pubsub_custom_certificate_id is None and 'webPubsubCustomCertificateId' in kwargs: + web_pubsub_custom_certificate_id = kwargs['webPubsubCustomCertificateId'] + if web_pubsub_custom_certificate_id is None: + raise TypeError("Missing 'web_pubsub_custom_certificate_id' argument") + if web_pubsub_id is None and 'webPubsubId' in kwargs: + web_pubsub_id = kwargs['webPubsubId'] + if web_pubsub_id is None: + raise TypeError("Missing 'web_pubsub_id' argument") + + _setter("domain_name", domain_name) + _setter("web_pubsub_custom_certificate_id", web_pubsub_custom_certificate_id) + _setter("web_pubsub_id", web_pubsub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="domainName") @@ -100,14 +129,37 @@ def __init__(__self__, *, :param pulumi.Input[str] web_pubsub_custom_certificate_id: Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. :param pulumi.Input[str] web_pubsub_id: Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. """ + _CustomDomainState._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain_name=domain_name, + name=name, + web_pubsub_custom_certificate_id=web_pubsub_custom_certificate_id, + web_pubsub_id=web_pubsub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain_name: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + web_pubsub_custom_certificate_id: Optional[pulumi.Input[str]] = None, + web_pubsub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain_name is None and 'domainName' in kwargs: + domain_name = kwargs['domainName'] + if web_pubsub_custom_certificate_id is None and 'webPubsubCustomCertificateId' in kwargs: + web_pubsub_custom_certificate_id = kwargs['webPubsubCustomCertificateId'] + if web_pubsub_id is None and 'webPubsubId' in kwargs: + web_pubsub_id = kwargs['webPubsubId'] + if domain_name is not None: - pulumi.set(__self__, "domain_name", domain_name) + _setter("domain_name", domain_name) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if web_pubsub_custom_certificate_id is not None: - pulumi.set(__self__, "web_pubsub_custom_certificate_id", web_pubsub_custom_certificate_id) + _setter("web_pubsub_custom_certificate_id", web_pubsub_custom_certificate_id) if web_pubsub_id is not None: - pulumi.set(__self__, "web_pubsub_id", web_pubsub_id) + _setter("web_pubsub_id", web_pubsub_id) @property @pulumi.getter(name="domainName") @@ -217,6 +269,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CustomDomainArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/webpubsub/get_private_link_resource.py b/sdk/python/pulumi_azure/webpubsub/get_private_link_resource.py index f13c5c1d7a..dafd2891e7 100644 --- a/sdk/python/pulumi_azure/webpubsub/get_private_link_resource.py +++ b/sdk/python/pulumi_azure/webpubsub/get_private_link_resource.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs diff --git a/sdk/python/pulumi_azure/webpubsub/get_service.py b/sdk/python/pulumi_azure/webpubsub/get_service.py index a6085ed99b..586787e39e 100644 --- a/sdk/python/pulumi_azure/webpubsub/get_service.py +++ b/sdk/python/pulumi_azure/webpubsub/get_service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ diff --git a/sdk/python/pulumi_azure/webpubsub/hub.py b/sdk/python/pulumi_azure/webpubsub/hub.py index 3f290e972a..c6575da52e 100644 --- a/sdk/python/pulumi_azure/webpubsub/hub.py +++ b/sdk/python/pulumi_azure/webpubsub/hub.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -34,15 +34,44 @@ def __init__(__self__, *, > **NOTE:** The managed identity of Web PubSub service must be enabled and the identity must have the "Azure Event Hubs Data sender" role to access the Event Hub. :param pulumi.Input[str] name: The name of the Web Pubsub hub service. Changing this forces a new resource to be created. """ - pulumi.set(__self__, "web_pubsub_id", web_pubsub_id) + HubArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + web_pubsub_id=web_pubsub_id, + anonymous_connections_enabled=anonymous_connections_enabled, + event_handlers=event_handlers, + event_listeners=event_listeners, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + web_pubsub_id: Optional[pulumi.Input[str]] = None, + anonymous_connections_enabled: Optional[pulumi.Input[bool]] = None, + event_handlers: Optional[pulumi.Input[Sequence[pulumi.Input['HubEventHandlerArgs']]]] = None, + event_listeners: Optional[pulumi.Input[Sequence[pulumi.Input['HubEventListenerArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if web_pubsub_id is None and 'webPubsubId' in kwargs: + web_pubsub_id = kwargs['webPubsubId'] + if web_pubsub_id is None: + raise TypeError("Missing 'web_pubsub_id' argument") + if anonymous_connections_enabled is None and 'anonymousConnectionsEnabled' in kwargs: + anonymous_connections_enabled = kwargs['anonymousConnectionsEnabled'] + if event_handlers is None and 'eventHandlers' in kwargs: + event_handlers = kwargs['eventHandlers'] + if event_listeners is None and 'eventListeners' in kwargs: + event_listeners = kwargs['eventListeners'] + + _setter("web_pubsub_id", web_pubsub_id) if anonymous_connections_enabled is not None: - pulumi.set(__self__, "anonymous_connections_enabled", anonymous_connections_enabled) + _setter("anonymous_connections_enabled", anonymous_connections_enabled) if event_handlers is not None: - pulumi.set(__self__, "event_handlers", event_handlers) + _setter("event_handlers", event_handlers) if event_listeners is not None: - pulumi.set(__self__, "event_listeners", event_listeners) + _setter("event_listeners", event_listeners) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="webPubsubId") @@ -131,16 +160,43 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the Web Pubsub hub service. Changing this forces a new resource to be created. :param pulumi.Input[str] web_pubsub_id: Specifies the id of the Web Pubsub. Changing this forces a new resource to be created. """ + _HubState._configure( + lambda key, value: pulumi.set(__self__, key, value), + anonymous_connections_enabled=anonymous_connections_enabled, + event_handlers=event_handlers, + event_listeners=event_listeners, + name=name, + web_pubsub_id=web_pubsub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + anonymous_connections_enabled: Optional[pulumi.Input[bool]] = None, + event_handlers: Optional[pulumi.Input[Sequence[pulumi.Input['HubEventHandlerArgs']]]] = None, + event_listeners: Optional[pulumi.Input[Sequence[pulumi.Input['HubEventListenerArgs']]]] = None, + name: Optional[pulumi.Input[str]] = None, + web_pubsub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if anonymous_connections_enabled is None and 'anonymousConnectionsEnabled' in kwargs: + anonymous_connections_enabled = kwargs['anonymousConnectionsEnabled'] + if event_handlers is None and 'eventHandlers' in kwargs: + event_handlers = kwargs['eventHandlers'] + if event_listeners is None and 'eventListeners' in kwargs: + event_listeners = kwargs['eventListeners'] + if web_pubsub_id is None and 'webPubsubId' in kwargs: + web_pubsub_id = kwargs['webPubsubId'] + if anonymous_connections_enabled is not None: - pulumi.set(__self__, "anonymous_connections_enabled", anonymous_connections_enabled) + _setter("anonymous_connections_enabled", anonymous_connections_enabled) if event_handlers is not None: - pulumi.set(__self__, "event_handlers", event_handlers) + _setter("event_handlers", event_handlers) if event_listeners is not None: - pulumi.set(__self__, "event_listeners", event_listeners) + _setter("event_listeners", event_listeners) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if web_pubsub_id is not None: - pulumi.set(__self__, "web_pubsub_id", web_pubsub_id) + _setter("web_pubsub_id", web_pubsub_id) @property @pulumi.getter(name="anonymousConnectionsEnabled") @@ -394,6 +450,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HubArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_azure/webpubsub/network_acl.py b/sdk/python/pulumi_azure/webpubsub/network_acl.py index 01e35a4f9e..f6509feac0 100644 --- a/sdk/python/pulumi_azure/webpubsub/network_acl.py +++ b/sdk/python/pulumi_azure/webpubsub/network_acl.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -27,12 +27,41 @@ def __init__(__self__, *, :param pulumi.Input[str] default_action: The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`. Defaults to `Deny`. :param pulumi.Input[Sequence[pulumi.Input['NetworkAclPrivateEndpointArgs']]] private_endpoints: A `private_endpoint` block as defined below. """ - pulumi.set(__self__, "public_network", public_network) - pulumi.set(__self__, "web_pubsub_id", web_pubsub_id) + NetworkAclArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + public_network=public_network, + web_pubsub_id=web_pubsub_id, + default_action=default_action, + private_endpoints=private_endpoints, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + public_network: Optional[pulumi.Input['NetworkAclPublicNetworkArgs']] = None, + web_pubsub_id: Optional[pulumi.Input[str]] = None, + default_action: Optional[pulumi.Input[str]] = None, + private_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkAclPrivateEndpointArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if public_network is None and 'publicNetwork' in kwargs: + public_network = kwargs['publicNetwork'] + if public_network is None: + raise TypeError("Missing 'public_network' argument") + if web_pubsub_id is None and 'webPubsubId' in kwargs: + web_pubsub_id = kwargs['webPubsubId'] + if web_pubsub_id is None: + raise TypeError("Missing 'web_pubsub_id' argument") + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if private_endpoints is None and 'privateEndpoints' in kwargs: + private_endpoints = kwargs['privateEndpoints'] + + _setter("public_network", public_network) + _setter("web_pubsub_id", web_pubsub_id) if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if private_endpoints is not None: - pulumi.set(__self__, "private_endpoints", private_endpoints) + _setter("private_endpoints", private_endpoints) @property @pulumi.getter(name="publicNetwork") @@ -97,14 +126,39 @@ def __init__(__self__, *, :param pulumi.Input['NetworkAclPublicNetworkArgs'] public_network: A `public_network` block as defined below. :param pulumi.Input[str] web_pubsub_id: The ID of the Web Pubsub service. Changing this forces a new resource to be created. """ + _NetworkAclState._configure( + lambda key, value: pulumi.set(__self__, key, value), + default_action=default_action, + private_endpoints=private_endpoints, + public_network=public_network, + web_pubsub_id=web_pubsub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + default_action: Optional[pulumi.Input[str]] = None, + private_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkAclPrivateEndpointArgs']]]] = None, + public_network: Optional[pulumi.Input['NetworkAclPublicNetworkArgs']] = None, + web_pubsub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if default_action is None and 'defaultAction' in kwargs: + default_action = kwargs['defaultAction'] + if private_endpoints is None and 'privateEndpoints' in kwargs: + private_endpoints = kwargs['privateEndpoints'] + if public_network is None and 'publicNetwork' in kwargs: + public_network = kwargs['publicNetwork'] + if web_pubsub_id is None and 'webPubsubId' in kwargs: + web_pubsub_id = kwargs['webPubsubId'] + if default_action is not None: - pulumi.set(__self__, "default_action", default_action) + _setter("default_action", default_action) if private_endpoints is not None: - pulumi.set(__self__, "private_endpoints", private_endpoints) + _setter("private_endpoints", private_endpoints) if public_network is not None: - pulumi.set(__self__, "public_network", public_network) + _setter("public_network", public_network) if web_pubsub_id is not None: - pulumi.set(__self__, "web_pubsub_id", web_pubsub_id) + _setter("web_pubsub_id", web_pubsub_id) @property @pulumi.getter(name="defaultAction") @@ -304,6 +358,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NetworkAclArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -324,6 +382,11 @@ def _internal_init(__self__, __props__.__dict__["default_action"] = default_action __props__.__dict__["private_endpoints"] = private_endpoints + if public_network is not None and not isinstance(public_network, NetworkAclPublicNetworkArgs): + public_network = public_network or {} + def _setter(key, value): + public_network[key] = value + NetworkAclPublicNetworkArgs._configure(_setter, **public_network) if public_network is None and not opts.urn: raise TypeError("Missing required property 'public_network'") __props__.__dict__["public_network"] = public_network diff --git a/sdk/python/pulumi_azure/webpubsub/outputs.py b/sdk/python/pulumi_azure/webpubsub/outputs.py index 3520987c2d..c2456943cd 100644 --- a/sdk/python/pulumi_azure/webpubsub/outputs.py +++ b/sdk/python/pulumi_azure/webpubsub/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs @@ -55,13 +55,38 @@ def __init__(__self__, *, :param Sequence[str] system_events: Specifies the list of system events. Supported values are `connect`, `connected` and `disconnected`. :param str user_event_pattern: Specifies the matching event names. There are 3 kind of patterns supported: * `*` matches any event name * `,` Combine multiple events with `,` for example `event1,event2`, it matches event `event1` and `event2` * The single event name, for example `event1`, it matches `event1`. """ - pulumi.set(__self__, "url_template", url_template) + HubEventHandler._configure( + lambda key, value: pulumi.set(__self__, key, value), + url_template=url_template, + auth=auth, + system_events=system_events, + user_event_pattern=user_event_pattern, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + url_template: Optional[str] = None, + auth: Optional['outputs.HubEventHandlerAuth'] = None, + system_events: Optional[Sequence[str]] = None, + user_event_pattern: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if url_template is None and 'urlTemplate' in kwargs: + url_template = kwargs['urlTemplate'] + if url_template is None: + raise TypeError("Missing 'url_template' argument") + if system_events is None and 'systemEvents' in kwargs: + system_events = kwargs['systemEvents'] + if user_event_pattern is None and 'userEventPattern' in kwargs: + user_event_pattern = kwargs['userEventPattern'] + + _setter("url_template", url_template) if auth is not None: - pulumi.set(__self__, "auth", auth) + _setter("auth", auth) if system_events is not None: - pulumi.set(__self__, "system_events", system_events) + _setter("system_events", system_events) if user_event_pattern is not None: - pulumi.set(__self__, "user_event_pattern", user_event_pattern) + _setter("user_event_pattern", user_event_pattern) @property @pulumi.getter(name="urlTemplate") @@ -122,7 +147,22 @@ def __init__(__self__, *, > **NOTE:** `managed_identity_id` is required if the auth block is defined """ - pulumi.set(__self__, "managed_identity_id", managed_identity_id) + HubEventHandlerAuth._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_identity_id=managed_identity_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_identity_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_identity_id is None and 'managedIdentityId' in kwargs: + managed_identity_id = kwargs['managedIdentityId'] + if managed_identity_id is None: + raise TypeError("Missing 'managed_identity_id' argument") + + _setter("managed_identity_id", managed_identity_id) @property @pulumi.getter(name="managedIdentityId") @@ -171,12 +211,41 @@ def __init__(__self__, *, :param Sequence[str] system_event_name_filters: Specifies the list of system events. Supported values are `connected` and `disconnected`. :param Sequence[str] user_event_name_filters: Specifies the list of matching user event names. `["*"]` can be used to match all events. """ - pulumi.set(__self__, "eventhub_name", eventhub_name) - pulumi.set(__self__, "eventhub_namespace_name", eventhub_namespace_name) + HubEventListener._configure( + lambda key, value: pulumi.set(__self__, key, value), + eventhub_name=eventhub_name, + eventhub_namespace_name=eventhub_namespace_name, + system_event_name_filters=system_event_name_filters, + user_event_name_filters=user_event_name_filters, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eventhub_name: Optional[str] = None, + eventhub_namespace_name: Optional[str] = None, + system_event_name_filters: Optional[Sequence[str]] = None, + user_event_name_filters: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eventhub_name is None and 'eventhubName' in kwargs: + eventhub_name = kwargs['eventhubName'] + if eventhub_name is None: + raise TypeError("Missing 'eventhub_name' argument") + if eventhub_namespace_name is None and 'eventhubNamespaceName' in kwargs: + eventhub_namespace_name = kwargs['eventhubNamespaceName'] + if eventhub_namespace_name is None: + raise TypeError("Missing 'eventhub_namespace_name' argument") + if system_event_name_filters is None and 'systemEventNameFilters' in kwargs: + system_event_name_filters = kwargs['systemEventNameFilters'] + if user_event_name_filters is None and 'userEventNameFilters' in kwargs: + user_event_name_filters = kwargs['userEventNameFilters'] + + _setter("eventhub_name", eventhub_name) + _setter("eventhub_namespace_name", eventhub_namespace_name) if system_event_name_filters is not None: - pulumi.set(__self__, "system_event_name_filters", system_event_name_filters) + _setter("system_event_name_filters", system_event_name_filters) if user_event_name_filters is not None: - pulumi.set(__self__, "user_event_name_filters", user_event_name_filters) + _setter("user_event_name_filters", user_event_name_filters) @property @pulumi.getter(name="eventhubName") @@ -243,11 +312,32 @@ def __init__(__self__, *, > **NOTE:** When `default_action` is `Allow`, `allowed_request_types`cannot be set. When `default_action` is `Deny`, `denied_request_types`cannot be set. """ - pulumi.set(__self__, "id", id) + NetworkAclPrivateEndpoint._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + allowed_request_types=allowed_request_types, + denied_request_types=denied_request_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: Optional[str] = None, + allowed_request_types: Optional[Sequence[str]] = None, + denied_request_types: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if id is None: + raise TypeError("Missing 'id' argument") + if allowed_request_types is None and 'allowedRequestTypes' in kwargs: + allowed_request_types = kwargs['allowedRequestTypes'] + if denied_request_types is None and 'deniedRequestTypes' in kwargs: + denied_request_types = kwargs['deniedRequestTypes'] + + _setter("id", id) if allowed_request_types is not None: - pulumi.set(__self__, "allowed_request_types", allowed_request_types) + _setter("allowed_request_types", allowed_request_types) if denied_request_types is not None: - pulumi.set(__self__, "denied_request_types", denied_request_types) + _setter("denied_request_types", denied_request_types) @property @pulumi.getter @@ -306,10 +396,27 @@ def __init__(__self__, *, > **NOTE:** When `default_action` is `Allow`, `allowed_request_types`cannot be set. When `default_action` is `Deny`, `denied_request_types`cannot be set. """ + NetworkAclPublicNetwork._configure( + lambda key, value: pulumi.set(__self__, key, value), + allowed_request_types=allowed_request_types, + denied_request_types=denied_request_types, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allowed_request_types: Optional[Sequence[str]] = None, + denied_request_types: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allowed_request_types is None and 'allowedRequestTypes' in kwargs: + allowed_request_types = kwargs['allowedRequestTypes'] + if denied_request_types is None and 'deniedRequestTypes' in kwargs: + denied_request_types = kwargs['deniedRequestTypes'] + if allowed_request_types is not None: - pulumi.set(__self__, "allowed_request_types", allowed_request_types) + _setter("allowed_request_types", allowed_request_types) if denied_request_types is not None: - pulumi.set(__self__, "denied_request_types", denied_request_types) + _setter("denied_request_types", denied_request_types) @property @pulumi.getter(name="allowedRequestTypes") @@ -366,13 +473,38 @@ def __init__(__self__, *, :param str principal_id: The Principal ID associated with this Managed Service Identity. :param str tenant_id: The Tenant ID associated with this Managed Service Identity. """ - pulumi.set(__self__, "type", type) + ServiceIdentity._configure( + lambda key, value: pulumi.set(__self__, key, value), + type=type, + identity_ids=identity_ids, + principal_id=principal_id, + tenant_id=tenant_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + type: Optional[str] = None, + identity_ids: Optional[Sequence[str]] = None, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if type is None: + raise TypeError("Missing 'type' argument") + if identity_ids is None and 'identityIds' in kwargs: + identity_ids = kwargs['identityIds'] + if principal_id is None and 'principalId' in kwargs: + principal_id = kwargs['principalId'] + if tenant_id is None and 'tenantId' in kwargs: + tenant_id = kwargs['tenantId'] + + _setter("type", type) if identity_ids is not None: - pulumi.set(__self__, "identity_ids", identity_ids) + _setter("identity_ids", identity_ids) if principal_id is not None: - pulumi.set(__self__, "principal_id", principal_id) + _setter("principal_id", principal_id) if tenant_id is not None: - pulumi.set(__self__, "tenant_id", tenant_id) + _setter("tenant_id", tenant_id) @property @pulumi.getter @@ -443,14 +575,37 @@ def __init__(__self__, *, :param bool http_request_logs_enabled: Whether the log category `HttpRequestLogs` is enabled? Defaults to `true` :param bool messaging_logs_enabled: Whether the log category `MessagingLogs` is enabled? Defaults to `true` """ + ServiceLiveTrace._configure( + lambda key, value: pulumi.set(__self__, key, value), + connectivity_logs_enabled=connectivity_logs_enabled, + enabled=enabled, + http_request_logs_enabled=http_request_logs_enabled, + messaging_logs_enabled=messaging_logs_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connectivity_logs_enabled: Optional[bool] = None, + enabled: Optional[bool] = None, + http_request_logs_enabled: Optional[bool] = None, + messaging_logs_enabled: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if connectivity_logs_enabled is None and 'connectivityLogsEnabled' in kwargs: + connectivity_logs_enabled = kwargs['connectivityLogsEnabled'] + if http_request_logs_enabled is None and 'httpRequestLogsEnabled' in kwargs: + http_request_logs_enabled = kwargs['httpRequestLogsEnabled'] + if messaging_logs_enabled is None and 'messagingLogsEnabled' in kwargs: + messaging_logs_enabled = kwargs['messagingLogsEnabled'] + if connectivity_logs_enabled is not None: - pulumi.set(__self__, "connectivity_logs_enabled", connectivity_logs_enabled) + _setter("connectivity_logs_enabled", connectivity_logs_enabled) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if http_request_logs_enabled is not None: - pulumi.set(__self__, "http_request_logs_enabled", http_request_logs_enabled) + _setter("http_request_logs_enabled", http_request_logs_enabled) if messaging_logs_enabled is not None: - pulumi.set(__self__, "messaging_logs_enabled", messaging_logs_enabled) + _setter("messaging_logs_enabled", messaging_logs_enabled) @property @pulumi.getter(name="connectivityLogsEnabled") @@ -494,8 +649,27 @@ def __init__(__self__, *, :param str description: The description of the resource type that has been onboarded to private link service. :param str subresource_name: The name for the resource that has been onboarded to private link service. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "subresource_name", subresource_name) + GetPrivateLinkResourceSharedPrivateLinkResourceTypeResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + subresource_name=subresource_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[str] = None, + subresource_name: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if subresource_name is None and 'subresourceName' in kwargs: + subresource_name = kwargs['subresourceName'] + if subresource_name is None: + raise TypeError("Missing 'subresource_name' argument") + + _setter("description", description) + _setter("subresource_name", subresource_name) @property @pulumi.getter diff --git a/sdk/python/pulumi_azure/webpubsub/service.py b/sdk/python/pulumi_azure/webpubsub/service.py index 57a557583d..9e839af502 100644 --- a/sdk/python/pulumi_azure/webpubsub/service.py +++ b/sdk/python/pulumi_azure/webpubsub/service.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * @@ -43,28 +43,77 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] tls_client_cert_enabled: Whether to request client certificate during TLS handshake? Defaults to `false`. """ - pulumi.set(__self__, "resource_group_name", resource_group_name) - pulumi.set(__self__, "sku", sku) + ServiceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_group_name=resource_group_name, + sku=sku, + aad_auth_enabled=aad_auth_enabled, + capacity=capacity, + identity=identity, + live_trace=live_trace, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + public_network_access_enabled=public_network_access_enabled, + tags=tags, + tls_client_cert_enabled=tls_client_cert_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_group_name: Optional[pulumi.Input[str]] = None, + sku: Optional[pulumi.Input[str]] = None, + aad_auth_enabled: Optional[pulumi.Input[bool]] = None, + capacity: Optional[pulumi.Input[int]] = None, + identity: Optional[pulumi.Input['ServiceIdentityArgs']] = None, + live_trace: Optional[pulumi.Input['ServiceLiveTraceArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tls_client_cert_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if resource_group_name is None: + raise TypeError("Missing 'resource_group_name' argument") + if sku is None: + raise TypeError("Missing 'sku' argument") + if aad_auth_enabled is None and 'aadAuthEnabled' in kwargs: + aad_auth_enabled = kwargs['aadAuthEnabled'] + if live_trace is None and 'liveTrace' in kwargs: + live_trace = kwargs['liveTrace'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if tls_client_cert_enabled is None and 'tlsClientCertEnabled' in kwargs: + tls_client_cert_enabled = kwargs['tlsClientCertEnabled'] + + _setter("resource_group_name", resource_group_name) + _setter("sku", sku) if aad_auth_enabled is not None: - pulumi.set(__self__, "aad_auth_enabled", aad_auth_enabled) + _setter("aad_auth_enabled", aad_auth_enabled) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if live_trace is not None: - pulumi.set(__self__, "live_trace", live_trace) + _setter("live_trace", live_trace) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tls_client_cert_enabled is not None: - pulumi.set(__self__, "tls_client_cert_enabled", tls_client_cert_enabled) + _setter("tls_client_cert_enabled", tls_client_cert_enabled) @property @pulumi.getter(name="resourceGroupName") @@ -258,48 +307,125 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A mapping of tags to assign to the resource. :param pulumi.Input[bool] tls_client_cert_enabled: Whether to request client certificate during TLS handshake? Defaults to `false`. """ + _ServiceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + aad_auth_enabled=aad_auth_enabled, + capacity=capacity, + external_ip=external_ip, + hostname=hostname, + identity=identity, + live_trace=live_trace, + local_auth_enabled=local_auth_enabled, + location=location, + name=name, + primary_access_key=primary_access_key, + primary_connection_string=primary_connection_string, + public_network_access_enabled=public_network_access_enabled, + public_port=public_port, + resource_group_name=resource_group_name, + secondary_access_key=secondary_access_key, + secondary_connection_string=secondary_connection_string, + server_port=server_port, + sku=sku, + tags=tags, + tls_client_cert_enabled=tls_client_cert_enabled, + version=version, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + aad_auth_enabled: Optional[pulumi.Input[bool]] = None, + capacity: Optional[pulumi.Input[int]] = None, + external_ip: Optional[pulumi.Input[str]] = None, + hostname: Optional[pulumi.Input[str]] = None, + identity: Optional[pulumi.Input['ServiceIdentityArgs']] = None, + live_trace: Optional[pulumi.Input['ServiceLiveTraceArgs']] = None, + local_auth_enabled: Optional[pulumi.Input[bool]] = None, + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + primary_access_key: Optional[pulumi.Input[str]] = None, + primary_connection_string: Optional[pulumi.Input[str]] = None, + public_network_access_enabled: Optional[pulumi.Input[bool]] = None, + public_port: Optional[pulumi.Input[int]] = None, + resource_group_name: Optional[pulumi.Input[str]] = None, + secondary_access_key: Optional[pulumi.Input[str]] = None, + secondary_connection_string: Optional[pulumi.Input[str]] = None, + server_port: Optional[pulumi.Input[int]] = None, + sku: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + tls_client_cert_enabled: Optional[pulumi.Input[bool]] = None, + version: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if aad_auth_enabled is None and 'aadAuthEnabled' in kwargs: + aad_auth_enabled = kwargs['aadAuthEnabled'] + if external_ip is None and 'externalIp' in kwargs: + external_ip = kwargs['externalIp'] + if live_trace is None and 'liveTrace' in kwargs: + live_trace = kwargs['liveTrace'] + if local_auth_enabled is None and 'localAuthEnabled' in kwargs: + local_auth_enabled = kwargs['localAuthEnabled'] + if primary_access_key is None and 'primaryAccessKey' in kwargs: + primary_access_key = kwargs['primaryAccessKey'] + if primary_connection_string is None and 'primaryConnectionString' in kwargs: + primary_connection_string = kwargs['primaryConnectionString'] + if public_network_access_enabled is None and 'publicNetworkAccessEnabled' in kwargs: + public_network_access_enabled = kwargs['publicNetworkAccessEnabled'] + if public_port is None and 'publicPort' in kwargs: + public_port = kwargs['publicPort'] + if resource_group_name is None and 'resourceGroupName' in kwargs: + resource_group_name = kwargs['resourceGroupName'] + if secondary_access_key is None and 'secondaryAccessKey' in kwargs: + secondary_access_key = kwargs['secondaryAccessKey'] + if secondary_connection_string is None and 'secondaryConnectionString' in kwargs: + secondary_connection_string = kwargs['secondaryConnectionString'] + if server_port is None and 'serverPort' in kwargs: + server_port = kwargs['serverPort'] + if tls_client_cert_enabled is None and 'tlsClientCertEnabled' in kwargs: + tls_client_cert_enabled = kwargs['tlsClientCertEnabled'] + if aad_auth_enabled is not None: - pulumi.set(__self__, "aad_auth_enabled", aad_auth_enabled) + _setter("aad_auth_enabled", aad_auth_enabled) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if external_ip is not None: - pulumi.set(__self__, "external_ip", external_ip) + _setter("external_ip", external_ip) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if identity is not None: - pulumi.set(__self__, "identity", identity) + _setter("identity", identity) if live_trace is not None: - pulumi.set(__self__, "live_trace", live_trace) + _setter("live_trace", live_trace) if local_auth_enabled is not None: - pulumi.set(__self__, "local_auth_enabled", local_auth_enabled) + _setter("local_auth_enabled", local_auth_enabled) if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if primary_access_key is not None: - pulumi.set(__self__, "primary_access_key", primary_access_key) + _setter("primary_access_key", primary_access_key) if primary_connection_string is not None: - pulumi.set(__self__, "primary_connection_string", primary_connection_string) + _setter("primary_connection_string", primary_connection_string) if public_network_access_enabled is not None: - pulumi.set(__self__, "public_network_access_enabled", public_network_access_enabled) + _setter("public_network_access_enabled", public_network_access_enabled) if public_port is not None: - pulumi.set(__self__, "public_port", public_port) + _setter("public_port", public_port) if resource_group_name is not None: - pulumi.set(__self__, "resource_group_name", resource_group_name) + _setter("resource_group_name", resource_group_name) if secondary_access_key is not None: - pulumi.set(__self__, "secondary_access_key", secondary_access_key) + _setter("secondary_access_key", secondary_access_key) if secondary_connection_string is not None: - pulumi.set(__self__, "secondary_connection_string", secondary_connection_string) + _setter("secondary_connection_string", secondary_connection_string) if server_port is not None: - pulumi.set(__self__, "server_port", server_port) + _setter("server_port", server_port) if sku is not None: - pulumi.set(__self__, "sku", sku) + _setter("sku", sku) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tls_client_cert_enabled is not None: - pulumi.set(__self__, "tls_client_cert_enabled", tls_client_cert_enabled) + _setter("tls_client_cert_enabled", tls_client_cert_enabled) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) @property @pulumi.getter(name="aadAuthEnabled") @@ -668,6 +794,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ServiceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -696,7 +826,17 @@ def _internal_init(__self__, __props__.__dict__["aad_auth_enabled"] = aad_auth_enabled __props__.__dict__["capacity"] = capacity + if identity is not None and not isinstance(identity, ServiceIdentityArgs): + identity = identity or {} + def _setter(key, value): + identity[key] = value + ServiceIdentityArgs._configure(_setter, **identity) __props__.__dict__["identity"] = identity + if live_trace is not None and not isinstance(live_trace, ServiceLiveTraceArgs): + live_trace = live_trace or {} + def _setter(key, value): + live_trace[key] = value + ServiceLiveTraceArgs._configure(_setter, **live_trace) __props__.__dict__["live_trace"] = live_trace __props__.__dict__["local_auth_enabled"] = local_auth_enabled __props__.__dict__["location"] = location diff --git a/sdk/python/pulumi_azure/webpubsub/shared_private_link_resource.py b/sdk/python/pulumi_azure/webpubsub/shared_private_link_resource.py index 77491b1698..3a2efa7758 100644 --- a/sdk/python/pulumi_azure/webpubsub/shared_private_link_resource.py +++ b/sdk/python/pulumi_azure/webpubsub/shared_private_link_resource.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['SharedPrivateLinkResourceArgs', 'SharedPrivateLinkResource'] @@ -31,13 +31,46 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Specify the name of the Web Pubsub Shared Private Link Resource. Changing this forces a new resource to be created. :param pulumi.Input[str] request_message: Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. """ - pulumi.set(__self__, "subresource_name", subresource_name) - pulumi.set(__self__, "target_resource_id", target_resource_id) - pulumi.set(__self__, "web_pubsub_id", web_pubsub_id) + SharedPrivateLinkResourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + subresource_name=subresource_name, + target_resource_id=target_resource_id, + web_pubsub_id=web_pubsub_id, + name=name, + request_message=request_message, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + subresource_name: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + web_pubsub_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + request_message: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if subresource_name is None and 'subresourceName' in kwargs: + subresource_name = kwargs['subresourceName'] + if subresource_name is None: + raise TypeError("Missing 'subresource_name' argument") + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if target_resource_id is None: + raise TypeError("Missing 'target_resource_id' argument") + if web_pubsub_id is None and 'webPubsubId' in kwargs: + web_pubsub_id = kwargs['webPubsubId'] + if web_pubsub_id is None: + raise TypeError("Missing 'web_pubsub_id' argument") + if request_message is None and 'requestMessage' in kwargs: + request_message = kwargs['requestMessage'] + + _setter("subresource_name", subresource_name) + _setter("target_resource_id", target_resource_id) + _setter("web_pubsub_id", web_pubsub_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if request_message is not None: - pulumi.set(__self__, "request_message", request_message) + _setter("request_message", request_message) @property @pulumi.getter(name="subresourceName") @@ -126,18 +159,47 @@ def __init__(__self__, *, > **NOTE:** The sub resource name should match with the type of the target resource id that's being specified. :param pulumi.Input[str] web_pubsub_id: Specify the id of the Web Pubsub. Changing this forces a new resource to be created. """ + _SharedPrivateLinkResourceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + request_message=request_message, + status=status, + subresource_name=subresource_name, + target_resource_id=target_resource_id, + web_pubsub_id=web_pubsub_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + request_message: Optional[pulumi.Input[str]] = None, + status: Optional[pulumi.Input[str]] = None, + subresource_name: Optional[pulumi.Input[str]] = None, + target_resource_id: Optional[pulumi.Input[str]] = None, + web_pubsub_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if request_message is None and 'requestMessage' in kwargs: + request_message = kwargs['requestMessage'] + if subresource_name is None and 'subresourceName' in kwargs: + subresource_name = kwargs['subresourceName'] + if target_resource_id is None and 'targetResourceId' in kwargs: + target_resource_id = kwargs['targetResourceId'] + if web_pubsub_id is None and 'webPubsubId' in kwargs: + web_pubsub_id = kwargs['webPubsubId'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if request_message is not None: - pulumi.set(__self__, "request_message", request_message) + _setter("request_message", request_message) if status is not None: - pulumi.set(__self__, "status", status) + _setter("status", status) if subresource_name is not None: - pulumi.set(__self__, "subresource_name", subresource_name) + _setter("subresource_name", subresource_name) if target_resource_id is not None: - pulumi.set(__self__, "target_resource_id", target_resource_id) + _setter("target_resource_id", target_resource_id) if web_pubsub_id is not None: - pulumi.set(__self__, "web_pubsub_id", web_pubsub_id) + _setter("web_pubsub_id", web_pubsub_id) @property @pulumi.getter @@ -341,6 +403,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + SharedPrivateLinkResourceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__,